From d10f6b4613e71ff1db9f32ef9a4d2bdec7d607e9 Mon Sep 17 00:00:00 2001 From: Razvan Stoenescu Date: Fri, 3 May 2024 21:02:16 +0300 Subject: [PATCH] refactor(QTab/QRouteTab): JSON restructuring --- ui/src/components/tabs/QRouteTab.json | 5 +- ui/src/components/tabs/QTab.json | 66 +----------------------- ui/src/components/tabs/use-tab.json | 72 +++++++++++++++++++++++++++ 3 files changed, 76 insertions(+), 67 deletions(-) create mode 100644 ui/src/components/tabs/use-tab.json diff --git a/ui/src/components/tabs/QRouteTab.json b/ui/src/components/tabs/QRouteTab.json index 5f41ee623ea..ec7e53efe7b 100644 --- a/ui/src/components/tabs/QRouteTab.json +++ b/ui/src/components/tabs/QRouteTab.json @@ -1,13 +1,14 @@ { + "mixins": [ "components/tabs/use-tab", "composables/private.use-router-link/use-router-link" ], + "meta": { "docsUrl": "https://v2.quasar.dev/vue-components/tabs" }, - "mixins": [ "components/tabs/QTab", "composables/private.use-router-link/use-router-link" ], - "events": { "click": { "desc": "Emitted when the component is clicked", + "internal": false, "params": { "evt": { "extends": "evt", diff --git a/ui/src/components/tabs/QTab.json b/ui/src/components/tabs/QTab.json index f05a836b706..e6e81ca23cc 100644 --- a/ui/src/components/tabs/QTab.json +++ b/ui/src/components/tabs/QTab.json @@ -3,69 +3,5 @@ "docsUrl": "https://v2.quasar.dev/vue-components/tabs" }, - "props": { - "icon": { - "extends": "icon" - }, - - "label": { - "type": [ "Number", "String" ], - "desc": "A number or string to label the tab", - "examples": [ "'Home'" ], - "category": "content" - }, - - "alert": { - "type": [ "Boolean", "String" ], - "desc": "Adds an alert symbol to the tab, notifying the user there are some updates; If its value is not a Boolean, then you can specify a color", - "examples": [ "'purple'" ], - "category": "content" - }, - - "alert-icon": { - "type": "String", - "desc": "Adds a floating icon to the tab, notifying the user there are some updates; It's displayed only if 'alert' is set; Can use the color specified by 'alert' prop", - "examples": [ "'alarm_on'" ], - "category": "content" - }, - - "name": { - "type": [ "Number", "String" ], - "desc": "Panel name", - "default": "# a random UUID", - "examples": [ "'home'", "1" ], - "category": "general" - }, - - "no-caps": { - "type": "Boolean", - "desc": "Turns off capitalizing all letters within the tab (which is the default)", - "category": "content" - }, - - "content-class": { - "type": "String", - "desc": "Class definitions to be attributed to the content wrapper", - "examples": [ "'my-special-class'" ], - "category": "style" - }, - - "ripple": { - "extends": "ripple" - }, - - "tabindex": { - "extends": "tabindex" - }, - - "disable": { - "extends": "disable" - } - }, - - "slots": { - "default": { - "desc": "Suggestion: QMenu, QTooltip" - } - } + "mixins": [ "components/tabs/use-tab" ] } diff --git a/ui/src/components/tabs/use-tab.json b/ui/src/components/tabs/use-tab.json new file mode 100644 index 00000000000..79a3b8741e4 --- /dev/null +++ b/ui/src/components/tabs/use-tab.json @@ -0,0 +1,72 @@ +{ + "props": { + "icon": { + "extends": "icon" + }, + + "label": { + "type": [ "Number", "String" ], + "desc": "A number or string to label the tab", + "examples": [ "'Home'" ], + "category": "content" + }, + + "alert": { + "type": [ "Boolean", "String" ], + "desc": "Adds an alert symbol to the tab, notifying the user there are some updates; If its value is not a Boolean, then you can specify a color", + "examples": [ "'purple'" ], + "category": "content" + }, + + "alert-icon": { + "type": "String", + "desc": "Adds a floating icon to the tab, notifying the user there are some updates; It's displayed only if 'alert' is set; Can use the color specified by 'alert' prop", + "examples": [ "'alarm_on'" ], + "category": "content" + }, + + "name": { + "type": [ "Number", "String" ], + "desc": "Panel name", + "default": "# a random UUID", + "examples": [ "'home'", "1" ], + "category": "general" + }, + + "no-caps": { + "type": "Boolean", + "desc": "Turns off capitalizing all letters within the tab (which is the default)", + "category": "content" + }, + + "content-class": { + "type": "String", + "desc": "Class definitions to be attributed to the content wrapper", + "examples": [ "'my-special-class'" ], + "category": "style" + }, + + "ripple": { + "extends": "ripple" + }, + + "tabindex": { + "extends": "tabindex" + }, + + "disable": { + "extends": "disable" + } + }, + + "slots": { + "default": { + "desc": "Suggestion: QMenu, QTooltip" + } + }, + + "events": { + "click": { "internal": true }, + "keydown": { "internal": true } + } +}