quasar 2.8.3 → 2.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/QBreadcrumbsEl.json +52 -0
- package/dist/api/QBtn.json +41 -6
- package/dist/api/QBtnDropdown.json +9 -0
- package/dist/api/QChip.json +9 -0
- package/dist/api/QCircularProgress.json +6 -0
- package/dist/api/QEditor.json +7 -0
- package/dist/api/QExpansionItem.json +59 -0
- package/dist/api/QItem.json +52 -0
- package/dist/api/QRating.json +13 -0
- package/dist/api/QRouteTab.json +42 -6
- package/dist/api/QTable.json +2 -2
- package/dist/icon-set/bootstrap-icons.umd.prod.js +1 -1
- package/dist/icon-set/eva-icons.umd.prod.js +1 -1
- package/dist/icon-set/fontawesome-v5-pro.umd.prod.js +1 -1
- package/dist/icon-set/fontawesome-v5.umd.prod.js +1 -1
- package/dist/icon-set/fontawesome-v6-pro.umd.prod.js +1 -1
- package/dist/icon-set/fontawesome-v6.umd.prod.js +1 -1
- package/dist/icon-set/ionicons-v4.umd.prod.js +1 -1
- package/dist/icon-set/line-awesome.umd.prod.js +1 -1
- package/dist/icon-set/material-icons-outlined.umd.prod.js +1 -1
- package/dist/icon-set/material-icons-round.umd.prod.js +1 -1
- package/dist/icon-set/material-icons-sharp.umd.prod.js +1 -1
- package/dist/icon-set/material-icons.umd.prod.js +1 -1
- package/dist/icon-set/material-symbols-outlined.umd.prod.js +1 -1
- package/dist/icon-set/material-symbols-rounded.umd.prod.js +1 -1
- package/dist/icon-set/material-symbols-sharp.umd.prod.js +1 -1
- package/dist/icon-set/mdi-v3.umd.prod.js +1 -1
- package/dist/icon-set/mdi-v4.umd.prod.js +1 -1
- package/dist/icon-set/mdi-v5.umd.prod.js +1 -1
- package/dist/icon-set/mdi-v6.umd.prod.js +1 -1
- package/dist/icon-set/svg-bootstrap-icons.umd.prod.js +1 -1
- package/dist/icon-set/svg-eva-icons.umd.prod.js +1 -1
- package/dist/icon-set/svg-fontawesome-v5.umd.prod.js +1 -1
- package/dist/icon-set/svg-fontawesome-v6.umd.prod.js +1 -1
- package/dist/icon-set/svg-ionicons-v4.umd.prod.js +1 -1
- package/dist/icon-set/svg-ionicons-v5.umd.prod.js +1 -1
- package/dist/icon-set/svg-ionicons-v6.umd.prod.js +1 -1
- package/dist/icon-set/svg-line-awesome.umd.prod.js +1 -1
- package/dist/icon-set/svg-material-icons-outlined.umd.prod.js +1 -1
- package/dist/icon-set/svg-material-icons-round.umd.prod.js +1 -1
- package/dist/icon-set/svg-material-icons-sharp.umd.prod.js +1 -1
- package/dist/icon-set/svg-material-icons.umd.prod.js +1 -1
- package/dist/icon-set/svg-material-symbols-outlined.umd.prod.js +1 -1
- package/dist/icon-set/svg-material-symbols-rounded.umd.prod.js +1 -1
- package/dist/icon-set/svg-material-symbols-sharp.umd.prod.js +1 -1
- package/dist/icon-set/svg-mdi-v6.umd.prod.js +1 -1
- package/dist/icon-set/svg-themify.umd.prod.js +1 -1
- package/dist/icon-set/themify.umd.prod.js +1 -1
- package/dist/lang/ar-TN.umd.prod.js +2 -2
- package/dist/lang/ar.umd.prod.js +2 -2
- package/dist/lang/az-Latn.umd.prod.js +2 -2
- package/dist/lang/bg.umd.prod.js +2 -2
- package/dist/lang/bn.umd.prod.js +2 -2
- package/dist/lang/ca.umd.prod.js +2 -2
- package/dist/lang/cs.umd.prod.js +2 -2
- package/dist/lang/da.umd.prod.js +2 -2
- package/dist/lang/de.umd.prod.js +2 -2
- package/dist/lang/el.umd.prod.js +2 -2
- package/dist/lang/en-GB.umd.prod.js +2 -2
- package/dist/lang/en-US.umd.prod.js +2 -2
- package/dist/lang/eo.umd.prod.js +2 -2
- package/dist/lang/es.umd.prod.js +2 -2
- package/dist/lang/et.umd.prod.js +2 -2
- package/dist/lang/eu.umd.prod.js +2 -2
- package/dist/lang/fa-IR.umd.prod.js +2 -2
- package/dist/lang/fa.umd.prod.js +2 -2
- package/dist/lang/fi.umd.prod.js +2 -2
- package/dist/lang/fr.umd.prod.js +2 -2
- package/dist/lang/gn.umd.prod.js +2 -2
- package/dist/lang/he.umd.prod.js +2 -2
- package/dist/lang/hr.umd.prod.js +2 -2
- package/dist/lang/hu.umd.prod.js +2 -2
- package/dist/lang/id.umd.prod.js +2 -2
- package/dist/lang/is.umd.prod.js +2 -2
- package/dist/lang/it.umd.prod.js +2 -2
- package/dist/lang/ja.umd.prod.js +2 -2
- package/dist/lang/km.umd.prod.js +2 -2
- package/dist/lang/ko-KR.umd.prod.js +2 -2
- package/dist/lang/kur-CKB.umd.prod.js +2 -2
- package/dist/lang/kz.umd.prod.js +2 -2
- package/dist/lang/lt.umd.prod.js +2 -2
- package/dist/lang/lu.umd.prod.js +2 -2
- package/dist/lang/lv.umd.prod.js +2 -2
- package/dist/lang/ml.umd.prod.js +2 -2
- package/dist/lang/mm.umd.prod.js +2 -2
- package/dist/lang/ms.umd.prod.js +2 -2
- package/dist/lang/my.umd.prod.js +2 -2
- package/dist/lang/nb-NO.umd.prod.js +2 -2
- package/dist/lang/nl.umd.prod.js +2 -2
- package/dist/lang/pl.umd.prod.js +2 -2
- package/dist/lang/pt-BR.umd.prod.js +2 -2
- package/dist/lang/pt.umd.prod.js +2 -2
- package/dist/lang/ro.umd.prod.js +2 -2
- package/dist/lang/ru.umd.prod.js +2 -2
- package/dist/lang/sk.umd.prod.js +2 -2
- package/dist/lang/sl.umd.prod.js +2 -2
- package/dist/lang/sm.umd.prod.js +2 -2
- package/dist/lang/sr-CYR.umd.prod.js +2 -2
- package/dist/lang/sr.umd.prod.js +2 -2
- package/dist/lang/sv.umd.prod.js +2 -2
- package/dist/lang/ta.umd.prod.js +2 -2
- package/dist/lang/th.umd.prod.js +2 -2
- package/dist/lang/tr.umd.prod.js +2 -2
- package/dist/lang/ug.umd.prod.js +2 -2
- package/dist/lang/uk.umd.prod.js +2 -2
- package/dist/lang/uz-Cyrl.umd.prod.js +2 -2
- package/dist/lang/uz-Latn.umd.prod.js +2 -2
- package/dist/lang/vi.umd.prod.js +2 -2
- package/dist/lang/zh-CN.umd.prod.js +2 -2
- package/dist/lang/zh-TW.umd.prod.js +2 -2
- package/dist/quasar.cjs.prod.js +2 -2
- package/dist/quasar.esm.js +16157 -15723
- package/dist/quasar.esm.prod.js +2 -2
- package/dist/quasar.sass +1 -1
- package/dist/quasar.umd.js +16290 -15854
- package/dist/quasar.umd.prod.js +2 -2
- package/dist/transforms/import-map.json +2 -0
- package/dist/types/api/qeditor.d.ts +17 -0
- package/dist/types/api/qloading.d.ts +5 -0
- package/dist/types/api.d.ts +2 -0
- package/dist/types/index.d.ts +133 -9
- package/dist/types/utils/is.d.ts +67 -0
- package/dist/types/utils/run-sequential-promises.d.ts +119 -0
- package/dist/types/utils.d.ts +9 -0
- package/dist/vetur/quasar-attributes.json +25 -1
- package/dist/vetur/quasar-tags.json +7 -1
- package/dist/web-types/web-types.json +108 -10
- package/lang/ar-TN.js +3 -1
- package/lang/ar-TN.mjs +3 -1
- package/lang/ar.js +3 -1
- package/lang/ar.mjs +3 -1
- package/lang/az-Latn.js +3 -1
- package/lang/az-Latn.mjs +3 -1
- package/lang/bg.js +3 -1
- package/lang/bg.mjs +3 -1
- package/lang/bn.js +3 -1
- package/lang/bn.mjs +3 -1
- package/lang/ca.js +3 -1
- package/lang/ca.mjs +3 -1
- package/lang/cs.js +3 -1
- package/lang/cs.mjs +3 -1
- package/lang/da.js +3 -1
- package/lang/da.mjs +3 -1
- package/lang/de.js +3 -1
- package/lang/de.mjs +3 -1
- package/lang/el.js +3 -1
- package/lang/el.mjs +3 -1
- package/lang/en-GB.js +3 -1
- package/lang/en-GB.mjs +3 -1
- package/lang/en-US.js +3 -1
- package/lang/en-US.mjs +3 -1
- package/lang/eo.js +3 -1
- package/lang/eo.mjs +3 -1
- package/lang/es.js +3 -1
- package/lang/es.mjs +3 -1
- package/lang/et.js +3 -1
- package/lang/et.mjs +3 -1
- package/lang/eu.js +3 -1
- package/lang/eu.mjs +3 -1
- package/lang/fa-IR.js +5 -3
- package/lang/fa-IR.mjs +5 -3
- package/lang/fa.js +5 -3
- package/lang/fa.mjs +5 -3
- package/lang/fi.js +3 -1
- package/lang/fi.mjs +3 -1
- package/lang/fr.js +3 -1
- package/lang/fr.mjs +3 -1
- package/lang/gn.js +3 -1
- package/lang/gn.mjs +3 -1
- package/lang/he.js +3 -1
- package/lang/he.mjs +3 -1
- package/lang/hr.js +3 -1
- package/lang/hr.mjs +3 -1
- package/lang/hu.js +3 -1
- package/lang/hu.mjs +3 -1
- package/lang/id.js +3 -1
- package/lang/id.mjs +3 -1
- package/lang/is.js +3 -1
- package/lang/is.mjs +3 -1
- package/lang/it.js +3 -1
- package/lang/it.mjs +3 -1
- package/lang/ja.js +3 -1
- package/lang/ja.mjs +3 -1
- package/lang/km.js +3 -1
- package/lang/km.mjs +3 -1
- package/lang/ko-KR.js +3 -1
- package/lang/ko-KR.mjs +3 -1
- package/lang/kur-CKB.js +3 -1
- package/lang/kur-CKB.mjs +3 -1
- package/lang/kz.js +3 -1
- package/lang/kz.mjs +3 -1
- package/lang/lt.js +3 -1
- package/lang/lt.mjs +3 -1
- package/lang/lu.js +3 -1
- package/lang/lu.mjs +3 -1
- package/lang/lv.js +3 -1
- package/lang/lv.mjs +3 -1
- package/lang/ml.js +3 -1
- package/lang/ml.mjs +3 -1
- package/lang/mm.js +4 -1
- package/lang/mm.mjs +4 -1
- package/lang/ms.js +3 -1
- package/lang/ms.mjs +3 -1
- package/lang/my.js +3 -1
- package/lang/my.mjs +3 -1
- package/lang/nb-NO.js +3 -1
- package/lang/nb-NO.mjs +3 -1
- package/lang/nl.js +3 -1
- package/lang/nl.mjs +3 -1
- package/lang/pl.js +3 -1
- package/lang/pl.mjs +3 -1
- package/lang/pt-BR.js +3 -1
- package/lang/pt-BR.mjs +3 -1
- package/lang/pt.js +3 -1
- package/lang/pt.mjs +3 -1
- package/lang/ro.js +3 -1
- package/lang/ro.mjs +3 -1
- package/lang/ru.js +3 -1
- package/lang/ru.mjs +3 -1
- package/lang/sk.js +3 -1
- package/lang/sk.mjs +3 -1
- package/lang/sl.js +3 -1
- package/lang/sl.mjs +3 -1
- package/lang/sm.js +3 -1
- package/lang/sm.mjs +3 -1
- package/lang/sr-CYR.js +3 -1
- package/lang/sr-CYR.mjs +3 -1
- package/lang/sr.js +3 -1
- package/lang/sr.mjs +3 -1
- package/lang/sv.js +3 -1
- package/lang/sv.mjs +3 -1
- package/lang/ta.js +3 -1
- package/lang/ta.mjs +3 -1
- package/lang/th.js +3 -1
- package/lang/th.mjs +3 -1
- package/lang/tr.js +3 -1
- package/lang/tr.mjs +3 -1
- package/lang/ug.js +5 -3
- package/lang/ug.mjs +5 -3
- package/lang/uk.js +3 -1
- package/lang/uk.mjs +3 -1
- package/lang/uz-Cyrl.js +3 -1
- package/lang/uz-Cyrl.mjs +3 -1
- package/lang/uz-Latn.js +3 -1
- package/lang/uz-Latn.mjs +3 -1
- package/lang/vi.js +3 -1
- package/lang/vi.mjs +3 -1
- package/lang/zh-CN.js +3 -1
- package/lang/zh-CN.mjs +3 -1
- package/lang/zh-TW.js +3 -1
- package/lang/zh-TW.mjs +3 -1
- package/package.json +6 -5
- package/src/components/breadcrumbs/QBreadcrumbsEl.js +6 -7
- package/src/components/breadcrumbs/QBreadcrumbsEl.json +53 -0
- package/src/components/btn/QBtn.js +19 -19
- package/src/components/btn/QBtn.json +41 -6
- package/src/components/btn/use-btn.js +6 -4
- package/src/components/btn-dropdown/QBtnDropdown.js +10 -2
- package/src/components/btn-dropdown/QBtnDropdown.json +8 -0
- package/src/components/checkbox/QCheckbox.js +1 -2
- package/src/components/checkbox/use-checkbox.js +2 -1
- package/src/components/chip/QChip.js +9 -2
- package/src/components/chip/QChip.json +8 -0
- package/src/components/chip/__tests__/QChip.spec.js +359 -46
- package/src/components/circular-progress/QCircularProgress.js +4 -2
- package/src/components/circular-progress/QCircularProgress.json +7 -0
- package/src/components/circular-progress/use-circular-progress.js +1 -0
- package/src/components/dialog/QDialog.js +7 -4
- package/src/components/drawer/QDrawer.js +7 -4
- package/src/components/editor/QEditor.json +9 -0
- package/src/components/expansion-item/QExpansionItem.js +37 -8
- package/src/components/expansion-item/QExpansionItem.json +67 -0
- package/src/components/fab/QFab.js +20 -1
- package/src/components/form/QForm.js +35 -40
- package/src/components/form/QFormChildMixin.js +3 -1
- package/src/components/item/QItem.js +4 -5
- package/src/components/item/QItem.json +53 -0
- package/src/components/menu/QMenu.js +5 -5
- package/src/components/menu/__tests__/QMenu.spec.js +7 -0
- package/src/components/page/QPage.js +1 -1
- package/src/components/popup-edit/QPopupEdit.js +2 -5
- package/src/components/radio/QRadio.js +3 -3
- package/src/components/rating/QRating.js +48 -10
- package/src/components/rating/QRating.json +11 -0
- package/src/components/select/QSelect.js +1 -4
- package/src/components/stepper/QStep.js +5 -3
- package/src/components/table/QTable.js +4 -6
- package/src/components/table/QTable.json +2 -2
- package/src/components/tabs/QRouteTab.js +6 -4
- package/src/components/tabs/QRouteTab.json +42 -6
- package/src/components/tabs/QTabs.js +188 -107
- package/src/components/tabs/use-tab.js +62 -38
- package/src/components/time/QTime.js +2 -2
- package/src/components/tooltip/QTooltip.js +7 -13
- package/src/components/tree/QTree.js +1 -1
- package/src/components/uploader/uploader-core.js +2 -3
- package/src/composables/private/__tests__/use-model-toggle.spec.js +2 -0
- package/src/composables/private/__tests__/use-transition.spec.js +4 -0
- package/src/composables/private/use-file.js +1 -1
- package/src/composables/private/use-router-link.js +80 -43
- package/src/composables/private/use-tick.js +15 -9
- package/src/composables/private/use-timeout.js +20 -7
- package/src/composables/private/use-validate.js +7 -13
- package/src/composables/use-form-child.js +6 -4
- package/src/directives/TouchPan.js +1 -1
- package/src/directives/TouchRepeat.js +1 -1
- package/src/directives/TouchSwipe.js +1 -1
- package/src/utils/EventBus.js +64 -0
- package/src/utils/extend.js +19 -19
- package/src/utils/private/inject-obj-prop.js +2 -0
- package/src/utils/private/rtl.js +10 -7
- package/src/utils/private/vm.js +4 -0
- package/src/utils/run-sequential-promises.js +115 -0
- package/src/utils.js +4 -0
|
@@ -32,5 +32,58 @@
|
|
|
32
32
|
"default": {
|
|
33
33
|
"desc": "This is where custom content goes, unless 'icon' and 'label' props are not enough"
|
|
34
34
|
}
|
|
35
|
+
},
|
|
36
|
+
|
|
37
|
+
"events": {
|
|
38
|
+
"click": {
|
|
39
|
+
"desc": "Emitted when the component is clicked",
|
|
40
|
+
"params": {
|
|
41
|
+
"evt": {
|
|
42
|
+
"extends": "evt",
|
|
43
|
+
"desc": "JS event object; If you are using route navigation ('to'/'replace' props) and you want to cancel navigation then call evt.preventDefault() synchronously in your event handler"
|
|
44
|
+
},
|
|
45
|
+
"go": {
|
|
46
|
+
"type": "Function",
|
|
47
|
+
"desc": "Available ONLY if you are using route navigation ('to'/'replace' props); When you need to control the time at which the component should trigger the route navigation then call evt.preventDefault() synchronously and then call this function at your convenience; Useful if you have async work to be done before the actual route navigation or if you want to redirect somewhere else",
|
|
48
|
+
"required": false,
|
|
49
|
+
"addedIn": "v2.9",
|
|
50
|
+
"params": {
|
|
51
|
+
"opts": {
|
|
52
|
+
"type": "Object",
|
|
53
|
+
"desc": "Optional options",
|
|
54
|
+
"required": false,
|
|
55
|
+
"definition": {
|
|
56
|
+
"to": {
|
|
57
|
+
"type": [ "String", "Object" ],
|
|
58
|
+
"desc": "Equivalent to Vue Router <router-link> 'to' property; Specify it explicitly otherwise it will be set with same value as component's 'to' prop",
|
|
59
|
+
"required": false,
|
|
60
|
+
"examples": [
|
|
61
|
+
"/home/dashboard",
|
|
62
|
+
"{ name: 'my-route-name' }"
|
|
63
|
+
]
|
|
64
|
+
},
|
|
65
|
+
|
|
66
|
+
"replace": {
|
|
67
|
+
"type": "Boolean",
|
|
68
|
+
"desc": "Equivalent to Vue Router <router-link> 'replace' property; Specify it explicitly otherwise it will be set with same value as component's 'replace' prop",
|
|
69
|
+
"required": false
|
|
70
|
+
},
|
|
71
|
+
|
|
72
|
+
"returnRouterError": {
|
|
73
|
+
"type": "Boolean",
|
|
74
|
+
"desc": "Return the router error, if any; Otherwise the returned Promise will always fulfill",
|
|
75
|
+
"required": false
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
"returns": {
|
|
81
|
+
"type": "Promise<any>",
|
|
82
|
+
"desc": "Returns the router's navigation promise",
|
|
83
|
+
"__exemption": [ "examples" ]
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}
|
|
35
88
|
}
|
|
36
89
|
}
|
|
@@ -26,10 +26,12 @@ export default createComponent({
|
|
|
26
26
|
...useBtnProps,
|
|
27
27
|
|
|
28
28
|
percentage: Number,
|
|
29
|
-
darkPercentage: Boolean
|
|
29
|
+
darkPercentage: Boolean,
|
|
30
|
+
|
|
31
|
+
onTouchstart: [ Function, Array ]
|
|
30
32
|
},
|
|
31
33
|
|
|
32
|
-
emits: [ 'click', 'keydown', '
|
|
34
|
+
emits: [ 'click', 'keydown', 'mousedown', 'keyup' ],
|
|
33
35
|
|
|
34
36
|
setup (props, { slots, emit }) {
|
|
35
37
|
const { proxy } = getCurrentInstance()
|
|
@@ -37,7 +39,7 @@ export default createComponent({
|
|
|
37
39
|
const {
|
|
38
40
|
classes, style, innerClasses,
|
|
39
41
|
attributes,
|
|
40
|
-
|
|
42
|
+
hasLink, linkTag, navigateOnClick,
|
|
41
43
|
isActionable
|
|
42
44
|
} = useBtn(props)
|
|
43
45
|
|
|
@@ -72,7 +74,7 @@ export default createComponent({
|
|
|
72
74
|
if (props.loading === true) {
|
|
73
75
|
return {
|
|
74
76
|
onMousedown: onLoadingEvt,
|
|
75
|
-
|
|
77
|
+
onTouchstart: onLoadingEvt,
|
|
76
78
|
onClick: onLoadingEvt,
|
|
77
79
|
onKeydown: onLoadingEvt,
|
|
78
80
|
onKeyup: onLoadingEvt
|
|
@@ -80,12 +82,21 @@ export default createComponent({
|
|
|
80
82
|
}
|
|
81
83
|
|
|
82
84
|
if (isActionable.value === true) {
|
|
83
|
-
|
|
85
|
+
const acc = {
|
|
84
86
|
onClick,
|
|
85
87
|
onKeydown,
|
|
86
|
-
onMousedown
|
|
87
|
-
|
|
88
|
+
onMousedown
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
if (proxy.$q.platform.has.touch === true) {
|
|
92
|
+
const suffix = props.onTouchstart !== void 0
|
|
93
|
+
? ''
|
|
94
|
+
: 'Passive'
|
|
95
|
+
|
|
96
|
+
acc[ `onTouchstart${ suffix }` ] = onTouchstart
|
|
88
97
|
}
|
|
98
|
+
|
|
99
|
+
return acc
|
|
89
100
|
}
|
|
90
101
|
|
|
91
102
|
return {
|
|
@@ -135,18 +146,7 @@ export default createComponent({
|
|
|
135
146
|
}
|
|
136
147
|
}
|
|
137
148
|
|
|
138
|
-
|
|
139
|
-
const go = () => {
|
|
140
|
-
e.__qNavigate = true
|
|
141
|
-
navigateToRouterLink(e)
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
emit('click', e, go)
|
|
145
|
-
e.defaultPrevented !== true && go()
|
|
146
|
-
}
|
|
147
|
-
else {
|
|
148
|
-
emit('click', e)
|
|
149
|
-
}
|
|
149
|
+
navigateOnClick(e)
|
|
150
150
|
}
|
|
151
151
|
|
|
152
152
|
function onKeydown (e) {
|
|
@@ -49,17 +49,52 @@
|
|
|
49
49
|
|
|
50
50
|
"events": {
|
|
51
51
|
"click": {
|
|
52
|
-
"desc": "Emitted when component is clicked
|
|
52
|
+
"desc": "Emitted when the component is clicked",
|
|
53
53
|
"params": {
|
|
54
54
|
"evt": {
|
|
55
55
|
"extends": "evt",
|
|
56
|
-
"desc": "JS event object; If you want to cancel navigation
|
|
56
|
+
"desc": "JS event object; If you are using route navigation ('to'/'replace' props) and you want to cancel navigation then call evt.preventDefault() synchronously in your event handler"
|
|
57
57
|
},
|
|
58
|
-
"
|
|
58
|
+
"go": {
|
|
59
59
|
"type": "Function",
|
|
60
|
-
"desc": "When you need to control the time at which the
|
|
61
|
-
"
|
|
62
|
-
"
|
|
60
|
+
"desc": "Available ONLY if you are using route navigation ('to'/'replace' props); When you need to control the time at which the component should trigger the route navigation then call evt.preventDefault() synchronously and then call this function at your convenience; Useful if you have async work to be done before the actual route navigation or if you want to redirect somewhere else",
|
|
61
|
+
"required": false,
|
|
62
|
+
"addedIn": "v2.9",
|
|
63
|
+
"params": {
|
|
64
|
+
"opts": {
|
|
65
|
+
"type": "Object",
|
|
66
|
+
"desc": "Optional options",
|
|
67
|
+
"required": false,
|
|
68
|
+
"definition": {
|
|
69
|
+
"to": {
|
|
70
|
+
"type": [ "String", "Object" ],
|
|
71
|
+
"desc": "Equivalent to Vue Router <router-link> 'to' property; Specify it explicitly otherwise it will be set with same value as component's 'to' prop",
|
|
72
|
+
"required": false,
|
|
73
|
+
"examples": [
|
|
74
|
+
"/home/dashboard",
|
|
75
|
+
"{ name: 'my-route-name' }"
|
|
76
|
+
]
|
|
77
|
+
},
|
|
78
|
+
|
|
79
|
+
"replace": {
|
|
80
|
+
"type": "Boolean",
|
|
81
|
+
"desc": "Equivalent to Vue Router <router-link> 'replace' property; Specify it explicitly otherwise it will be set with same value as component's 'replace' prop",
|
|
82
|
+
"required": false
|
|
83
|
+
},
|
|
84
|
+
|
|
85
|
+
"returnRouterError": {
|
|
86
|
+
"type": "Boolean",
|
|
87
|
+
"desc": "Return the router error, if any; Otherwise the returned Promise will always fulfill",
|
|
88
|
+
"required": false
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
"returns": {
|
|
94
|
+
"type": "Promise<any>",
|
|
95
|
+
"desc": "Returns the router's navigation promise",
|
|
96
|
+
"__exemption": [ "examples" ]
|
|
97
|
+
}
|
|
63
98
|
}
|
|
64
99
|
}
|
|
65
100
|
}
|
|
@@ -80,7 +80,9 @@ export const useBtnProps = {
|
|
|
80
80
|
export default function (props) {
|
|
81
81
|
const sizeStyle = useSize(props, defaultSizes)
|
|
82
82
|
const alignClass = useAlign(props)
|
|
83
|
-
const { hasRouterLink, hasLink, linkTag,
|
|
83
|
+
const { hasRouterLink, hasLink, linkTag, linkAttrs, navigateOnClick } = useRouterLink({
|
|
84
|
+
fallbackTag: 'button'
|
|
85
|
+
})
|
|
84
86
|
|
|
85
87
|
const style = computed(() => {
|
|
86
88
|
const obj = props.fab === false && props.fabMini === false
|
|
@@ -123,7 +125,7 @@ export default function (props) {
|
|
|
123
125
|
const acc = { tabindex: tabIndex.value }
|
|
124
126
|
|
|
125
127
|
if (hasLink.value === true) {
|
|
126
|
-
Object.assign(acc,
|
|
128
|
+
Object.assign(acc, linkAttrs.value)
|
|
127
129
|
}
|
|
128
130
|
else if (formTypes.includes(props.type) === true) {
|
|
129
131
|
acc.type = props.type
|
|
@@ -136,6 +138,7 @@ export default function (props) {
|
|
|
136
138
|
else if (acc.href === void 0) {
|
|
137
139
|
acc.role = 'button'
|
|
138
140
|
}
|
|
141
|
+
|
|
139
142
|
if (hasRouterLink.value !== true && mediaTypeRE.test(props.type) === true) {
|
|
140
143
|
acc.type = props.type
|
|
141
144
|
}
|
|
@@ -198,10 +201,9 @@ export default function (props) {
|
|
|
198
201
|
style,
|
|
199
202
|
innerClasses,
|
|
200
203
|
attributes,
|
|
201
|
-
hasRouterLink,
|
|
202
204
|
hasLink,
|
|
203
205
|
linkTag,
|
|
204
|
-
|
|
206
|
+
navigateOnClick,
|
|
205
207
|
isActionable
|
|
206
208
|
}
|
|
207
209
|
}
|
|
@@ -9,6 +9,7 @@ import { useBtnProps } from '../btn/use-btn.js'
|
|
|
9
9
|
|
|
10
10
|
import { createComponent } from '../../utils/private/create.js'
|
|
11
11
|
import { stop } from '../../utils/event.js'
|
|
12
|
+
import uid from '../../utils/uid.js'
|
|
12
13
|
import { hSlot } from '../../utils/private/render.js'
|
|
13
14
|
|
|
14
15
|
export default createComponent({
|
|
@@ -42,7 +43,9 @@ export default createComponent({
|
|
|
42
43
|
disableMainBtn: Boolean,
|
|
43
44
|
disableDropdown: Boolean,
|
|
44
45
|
|
|
45
|
-
noIconAnimation: Boolean
|
|
46
|
+
noIconAnimation: Boolean,
|
|
47
|
+
|
|
48
|
+
toggleAriaLabel: String
|
|
46
49
|
},
|
|
47
50
|
|
|
48
51
|
emits: [ 'update:modelValue', 'click', 'before-show', 'show', 'before-hide', 'hide' ],
|
|
@@ -52,11 +55,15 @@ export default createComponent({
|
|
|
52
55
|
|
|
53
56
|
const showing = ref(props.modelValue)
|
|
54
57
|
const menuRef = ref(null)
|
|
58
|
+
const targetUid = uid()
|
|
55
59
|
|
|
56
60
|
const attributes = computed(() => {
|
|
57
61
|
const acc = {
|
|
58
62
|
'aria-expanded': showing.value === true ? 'true' : 'false',
|
|
59
|
-
'aria-haspopup': 'true'
|
|
63
|
+
'aria-haspopup': 'true',
|
|
64
|
+
'aria-controls': targetUid,
|
|
65
|
+
'aria-owns': targetUid,
|
|
66
|
+
'aria-label': props.toggleAriaLabel || proxy.$q.lang.label[ showing.value === true ? 'collapse' : 'expand' ](props.label)
|
|
60
67
|
}
|
|
61
68
|
|
|
62
69
|
if (
|
|
@@ -146,6 +153,7 @@ export default createComponent({
|
|
|
146
153
|
props.disableDropdown !== true && Arrow.push(
|
|
147
154
|
h(QMenu, {
|
|
148
155
|
ref: menuRef,
|
|
156
|
+
id: targetUid,
|
|
149
157
|
class: props.contentClass,
|
|
150
158
|
style: props.contentStyle,
|
|
151
159
|
cover: props.cover,
|
|
@@ -119,6 +119,14 @@
|
|
|
119
119
|
"desc": "An array of two numbers to offset the menu horizontally and vertically in pixels",
|
|
120
120
|
"examples": [ "[8, 8]", "[5, 10]" ],
|
|
121
121
|
"category": "position"
|
|
122
|
+
},
|
|
123
|
+
|
|
124
|
+
"toggle-aria-label": {
|
|
125
|
+
"type": "String",
|
|
126
|
+
"desc": "aria-label to be used on the dropdown toggle element",
|
|
127
|
+
"examples": [ "Open menu" ],
|
|
128
|
+
"category": "accessibility",
|
|
129
|
+
"addedIn": "v2.8.4"
|
|
122
130
|
}
|
|
123
131
|
},
|
|
124
132
|
|
|
@@ -11,7 +11,7 @@ import { createComponent } from '../../utils/private/create.js'
|
|
|
11
11
|
import { stopAndPrevent } from '../../utils/event.js'
|
|
12
12
|
import { hMergeSlotSafely, hDir } from '../../utils/private/render.js'
|
|
13
13
|
|
|
14
|
-
const defaultSizes = {
|
|
14
|
+
export const defaultSizes = {
|
|
15
15
|
xs: 8,
|
|
16
16
|
sm: 10,
|
|
17
17
|
md: 14,
|
|
@@ -51,6 +51,8 @@ export default createComponent({
|
|
|
51
51
|
clickable: Boolean,
|
|
52
52
|
removable: Boolean,
|
|
53
53
|
|
|
54
|
+
removeAriaLabel: String,
|
|
55
|
+
|
|
54
56
|
tabindex: [ String, Number ],
|
|
55
57
|
disable: Boolean,
|
|
56
58
|
|
|
@@ -103,7 +105,12 @@ export default createComponent({
|
|
|
103
105
|
const attributes = computed(() => (
|
|
104
106
|
props.disable === true
|
|
105
107
|
? { tabindex: -1, 'aria-disabled': 'true' }
|
|
106
|
-
: {
|
|
108
|
+
: {
|
|
109
|
+
tabindex: props.tabindex || 0,
|
|
110
|
+
role: 'button',
|
|
111
|
+
'aria-hidden': 'false',
|
|
112
|
+
'aria-label': props.removeAriaLabel || $q.lang.label.remove
|
|
113
|
+
}
|
|
107
114
|
))
|
|
108
115
|
|
|
109
116
|
function onKeyup (e) {
|
|
@@ -95,6 +95,14 @@
|
|
|
95
95
|
"extends": "ripple"
|
|
96
96
|
},
|
|
97
97
|
|
|
98
|
+
"remove-aria-label": {
|
|
99
|
+
"type": "String",
|
|
100
|
+
"desc": "aria-label to be used on the remove icon",
|
|
101
|
+
"examples": [ "Remove item" ],
|
|
102
|
+
"category": "accessibility",
|
|
103
|
+
"addedIn": "v2.8.4"
|
|
104
|
+
},
|
|
105
|
+
|
|
98
106
|
"tabindex": {
|
|
99
107
|
"extends": "tabindex"
|
|
100
108
|
},
|