Skip to content

Commit

Permalink
refactor(QTab/QRouteTab): JSON restructuring
Browse files Browse the repository at this point in the history
  • Loading branch information
rstoenescu committed May 3, 2024
1 parent 69ee36a commit d10f6b4
Show file tree
Hide file tree
Showing 3 changed files with 76 additions and 67 deletions.
5 changes: 3 additions & 2 deletions ui/src/components/tabs/QRouteTab.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
66 changes: 1 addition & 65 deletions ui/src/components/tabs/QTab.json
Original file line number Diff line number Diff line change
Expand Up @@ -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" ]
}
72 changes: 72 additions & 0 deletions ui/src/components/tabs/use-tab.json
Original file line number Diff line number Diff line change
@@ -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 }
}
}

0 comments on commit d10f6b4

Please sign in to comment.