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.
Files changed (314) hide show
  1. package/dist/api/QBreadcrumbsEl.json +52 -0
  2. package/dist/api/QBtn.json +41 -6
  3. package/dist/api/QBtnDropdown.json +9 -0
  4. package/dist/api/QChip.json +9 -0
  5. package/dist/api/QCircularProgress.json +6 -0
  6. package/dist/api/QEditor.json +7 -0
  7. package/dist/api/QExpansionItem.json +59 -0
  8. package/dist/api/QItem.json +52 -0
  9. package/dist/api/QRating.json +13 -0
  10. package/dist/api/QRouteTab.json +42 -6
  11. package/dist/api/QTable.json +2 -2
  12. package/dist/icon-set/bootstrap-icons.umd.prod.js +1 -1
  13. package/dist/icon-set/eva-icons.umd.prod.js +1 -1
  14. package/dist/icon-set/fontawesome-v5-pro.umd.prod.js +1 -1
  15. package/dist/icon-set/fontawesome-v5.umd.prod.js +1 -1
  16. package/dist/icon-set/fontawesome-v6-pro.umd.prod.js +1 -1
  17. package/dist/icon-set/fontawesome-v6.umd.prod.js +1 -1
  18. package/dist/icon-set/ionicons-v4.umd.prod.js +1 -1
  19. package/dist/icon-set/line-awesome.umd.prod.js +1 -1
  20. package/dist/icon-set/material-icons-outlined.umd.prod.js +1 -1
  21. package/dist/icon-set/material-icons-round.umd.prod.js +1 -1
  22. package/dist/icon-set/material-icons-sharp.umd.prod.js +1 -1
  23. package/dist/icon-set/material-icons.umd.prod.js +1 -1
  24. package/dist/icon-set/material-symbols-outlined.umd.prod.js +1 -1
  25. package/dist/icon-set/material-symbols-rounded.umd.prod.js +1 -1
  26. package/dist/icon-set/material-symbols-sharp.umd.prod.js +1 -1
  27. package/dist/icon-set/mdi-v3.umd.prod.js +1 -1
  28. package/dist/icon-set/mdi-v4.umd.prod.js +1 -1
  29. package/dist/icon-set/mdi-v5.umd.prod.js +1 -1
  30. package/dist/icon-set/mdi-v6.umd.prod.js +1 -1
  31. package/dist/icon-set/svg-bootstrap-icons.umd.prod.js +1 -1
  32. package/dist/icon-set/svg-eva-icons.umd.prod.js +1 -1
  33. package/dist/icon-set/svg-fontawesome-v5.umd.prod.js +1 -1
  34. package/dist/icon-set/svg-fontawesome-v6.umd.prod.js +1 -1
  35. package/dist/icon-set/svg-ionicons-v4.umd.prod.js +1 -1
  36. package/dist/icon-set/svg-ionicons-v5.umd.prod.js +1 -1
  37. package/dist/icon-set/svg-ionicons-v6.umd.prod.js +1 -1
  38. package/dist/icon-set/svg-line-awesome.umd.prod.js +1 -1
  39. package/dist/icon-set/svg-material-icons-outlined.umd.prod.js +1 -1
  40. package/dist/icon-set/svg-material-icons-round.umd.prod.js +1 -1
  41. package/dist/icon-set/svg-material-icons-sharp.umd.prod.js +1 -1
  42. package/dist/icon-set/svg-material-icons.umd.prod.js +1 -1
  43. package/dist/icon-set/svg-material-symbols-outlined.umd.prod.js +1 -1
  44. package/dist/icon-set/svg-material-symbols-rounded.umd.prod.js +1 -1
  45. package/dist/icon-set/svg-material-symbols-sharp.umd.prod.js +1 -1
  46. package/dist/icon-set/svg-mdi-v6.umd.prod.js +1 -1
  47. package/dist/icon-set/svg-themify.umd.prod.js +1 -1
  48. package/dist/icon-set/themify.umd.prod.js +1 -1
  49. package/dist/lang/ar-TN.umd.prod.js +2 -2
  50. package/dist/lang/ar.umd.prod.js +2 -2
  51. package/dist/lang/az-Latn.umd.prod.js +2 -2
  52. package/dist/lang/bg.umd.prod.js +2 -2
  53. package/dist/lang/bn.umd.prod.js +2 -2
  54. package/dist/lang/ca.umd.prod.js +2 -2
  55. package/dist/lang/cs.umd.prod.js +2 -2
  56. package/dist/lang/da.umd.prod.js +2 -2
  57. package/dist/lang/de.umd.prod.js +2 -2
  58. package/dist/lang/el.umd.prod.js +2 -2
  59. package/dist/lang/en-GB.umd.prod.js +2 -2
  60. package/dist/lang/en-US.umd.prod.js +2 -2
  61. package/dist/lang/eo.umd.prod.js +2 -2
  62. package/dist/lang/es.umd.prod.js +2 -2
  63. package/dist/lang/et.umd.prod.js +2 -2
  64. package/dist/lang/eu.umd.prod.js +2 -2
  65. package/dist/lang/fa-IR.umd.prod.js +2 -2
  66. package/dist/lang/fa.umd.prod.js +2 -2
  67. package/dist/lang/fi.umd.prod.js +2 -2
  68. package/dist/lang/fr.umd.prod.js +2 -2
  69. package/dist/lang/gn.umd.prod.js +2 -2
  70. package/dist/lang/he.umd.prod.js +2 -2
  71. package/dist/lang/hr.umd.prod.js +2 -2
  72. package/dist/lang/hu.umd.prod.js +2 -2
  73. package/dist/lang/id.umd.prod.js +2 -2
  74. package/dist/lang/is.umd.prod.js +2 -2
  75. package/dist/lang/it.umd.prod.js +2 -2
  76. package/dist/lang/ja.umd.prod.js +2 -2
  77. package/dist/lang/km.umd.prod.js +2 -2
  78. package/dist/lang/ko-KR.umd.prod.js +2 -2
  79. package/dist/lang/kur-CKB.umd.prod.js +2 -2
  80. package/dist/lang/kz.umd.prod.js +2 -2
  81. package/dist/lang/lt.umd.prod.js +2 -2
  82. package/dist/lang/lu.umd.prod.js +2 -2
  83. package/dist/lang/lv.umd.prod.js +2 -2
  84. package/dist/lang/ml.umd.prod.js +2 -2
  85. package/dist/lang/mm.umd.prod.js +2 -2
  86. package/dist/lang/ms.umd.prod.js +2 -2
  87. package/dist/lang/my.umd.prod.js +2 -2
  88. package/dist/lang/nb-NO.umd.prod.js +2 -2
  89. package/dist/lang/nl.umd.prod.js +2 -2
  90. package/dist/lang/pl.umd.prod.js +2 -2
  91. package/dist/lang/pt-BR.umd.prod.js +2 -2
  92. package/dist/lang/pt.umd.prod.js +2 -2
  93. package/dist/lang/ro.umd.prod.js +2 -2
  94. package/dist/lang/ru.umd.prod.js +2 -2
  95. package/dist/lang/sk.umd.prod.js +2 -2
  96. package/dist/lang/sl.umd.prod.js +2 -2
  97. package/dist/lang/sm.umd.prod.js +2 -2
  98. package/dist/lang/sr-CYR.umd.prod.js +2 -2
  99. package/dist/lang/sr.umd.prod.js +2 -2
  100. package/dist/lang/sv.umd.prod.js +2 -2
  101. package/dist/lang/ta.umd.prod.js +2 -2
  102. package/dist/lang/th.umd.prod.js +2 -2
  103. package/dist/lang/tr.umd.prod.js +2 -2
  104. package/dist/lang/ug.umd.prod.js +2 -2
  105. package/dist/lang/uk.umd.prod.js +2 -2
  106. package/dist/lang/uz-Cyrl.umd.prod.js +2 -2
  107. package/dist/lang/uz-Latn.umd.prod.js +2 -2
  108. package/dist/lang/vi.umd.prod.js +2 -2
  109. package/dist/lang/zh-CN.umd.prod.js +2 -2
  110. package/dist/lang/zh-TW.umd.prod.js +2 -2
  111. package/dist/quasar.cjs.prod.js +2 -2
  112. package/dist/quasar.esm.js +16157 -15723
  113. package/dist/quasar.esm.prod.js +2 -2
  114. package/dist/quasar.sass +1 -1
  115. package/dist/quasar.umd.js +16290 -15854
  116. package/dist/quasar.umd.prod.js +2 -2
  117. package/dist/transforms/import-map.json +2 -0
  118. package/dist/types/api/qeditor.d.ts +17 -0
  119. package/dist/types/api/qloading.d.ts +5 -0
  120. package/dist/types/api.d.ts +2 -0
  121. package/dist/types/index.d.ts +133 -9
  122. package/dist/types/utils/is.d.ts +67 -0
  123. package/dist/types/utils/run-sequential-promises.d.ts +119 -0
  124. package/dist/types/utils.d.ts +9 -0
  125. package/dist/vetur/quasar-attributes.json +25 -1
  126. package/dist/vetur/quasar-tags.json +7 -1
  127. package/dist/web-types/web-types.json +108 -10
  128. package/lang/ar-TN.js +3 -1
  129. package/lang/ar-TN.mjs +3 -1
  130. package/lang/ar.js +3 -1
  131. package/lang/ar.mjs +3 -1
  132. package/lang/az-Latn.js +3 -1
  133. package/lang/az-Latn.mjs +3 -1
  134. package/lang/bg.js +3 -1
  135. package/lang/bg.mjs +3 -1
  136. package/lang/bn.js +3 -1
  137. package/lang/bn.mjs +3 -1
  138. package/lang/ca.js +3 -1
  139. package/lang/ca.mjs +3 -1
  140. package/lang/cs.js +3 -1
  141. package/lang/cs.mjs +3 -1
  142. package/lang/da.js +3 -1
  143. package/lang/da.mjs +3 -1
  144. package/lang/de.js +3 -1
  145. package/lang/de.mjs +3 -1
  146. package/lang/el.js +3 -1
  147. package/lang/el.mjs +3 -1
  148. package/lang/en-GB.js +3 -1
  149. package/lang/en-GB.mjs +3 -1
  150. package/lang/en-US.js +3 -1
  151. package/lang/en-US.mjs +3 -1
  152. package/lang/eo.js +3 -1
  153. package/lang/eo.mjs +3 -1
  154. package/lang/es.js +3 -1
  155. package/lang/es.mjs +3 -1
  156. package/lang/et.js +3 -1
  157. package/lang/et.mjs +3 -1
  158. package/lang/eu.js +3 -1
  159. package/lang/eu.mjs +3 -1
  160. package/lang/fa-IR.js +5 -3
  161. package/lang/fa-IR.mjs +5 -3
  162. package/lang/fa.js +5 -3
  163. package/lang/fa.mjs +5 -3
  164. package/lang/fi.js +3 -1
  165. package/lang/fi.mjs +3 -1
  166. package/lang/fr.js +3 -1
  167. package/lang/fr.mjs +3 -1
  168. package/lang/gn.js +3 -1
  169. package/lang/gn.mjs +3 -1
  170. package/lang/he.js +3 -1
  171. package/lang/he.mjs +3 -1
  172. package/lang/hr.js +3 -1
  173. package/lang/hr.mjs +3 -1
  174. package/lang/hu.js +3 -1
  175. package/lang/hu.mjs +3 -1
  176. package/lang/id.js +3 -1
  177. package/lang/id.mjs +3 -1
  178. package/lang/is.js +3 -1
  179. package/lang/is.mjs +3 -1
  180. package/lang/it.js +3 -1
  181. package/lang/it.mjs +3 -1
  182. package/lang/ja.js +3 -1
  183. package/lang/ja.mjs +3 -1
  184. package/lang/km.js +3 -1
  185. package/lang/km.mjs +3 -1
  186. package/lang/ko-KR.js +3 -1
  187. package/lang/ko-KR.mjs +3 -1
  188. package/lang/kur-CKB.js +3 -1
  189. package/lang/kur-CKB.mjs +3 -1
  190. package/lang/kz.js +3 -1
  191. package/lang/kz.mjs +3 -1
  192. package/lang/lt.js +3 -1
  193. package/lang/lt.mjs +3 -1
  194. package/lang/lu.js +3 -1
  195. package/lang/lu.mjs +3 -1
  196. package/lang/lv.js +3 -1
  197. package/lang/lv.mjs +3 -1
  198. package/lang/ml.js +3 -1
  199. package/lang/ml.mjs +3 -1
  200. package/lang/mm.js +4 -1
  201. package/lang/mm.mjs +4 -1
  202. package/lang/ms.js +3 -1
  203. package/lang/ms.mjs +3 -1
  204. package/lang/my.js +3 -1
  205. package/lang/my.mjs +3 -1
  206. package/lang/nb-NO.js +3 -1
  207. package/lang/nb-NO.mjs +3 -1
  208. package/lang/nl.js +3 -1
  209. package/lang/nl.mjs +3 -1
  210. package/lang/pl.js +3 -1
  211. package/lang/pl.mjs +3 -1
  212. package/lang/pt-BR.js +3 -1
  213. package/lang/pt-BR.mjs +3 -1
  214. package/lang/pt.js +3 -1
  215. package/lang/pt.mjs +3 -1
  216. package/lang/ro.js +3 -1
  217. package/lang/ro.mjs +3 -1
  218. package/lang/ru.js +3 -1
  219. package/lang/ru.mjs +3 -1
  220. package/lang/sk.js +3 -1
  221. package/lang/sk.mjs +3 -1
  222. package/lang/sl.js +3 -1
  223. package/lang/sl.mjs +3 -1
  224. package/lang/sm.js +3 -1
  225. package/lang/sm.mjs +3 -1
  226. package/lang/sr-CYR.js +3 -1
  227. package/lang/sr-CYR.mjs +3 -1
  228. package/lang/sr.js +3 -1
  229. package/lang/sr.mjs +3 -1
  230. package/lang/sv.js +3 -1
  231. package/lang/sv.mjs +3 -1
  232. package/lang/ta.js +3 -1
  233. package/lang/ta.mjs +3 -1
  234. package/lang/th.js +3 -1
  235. package/lang/th.mjs +3 -1
  236. package/lang/tr.js +3 -1
  237. package/lang/tr.mjs +3 -1
  238. package/lang/ug.js +5 -3
  239. package/lang/ug.mjs +5 -3
  240. package/lang/uk.js +3 -1
  241. package/lang/uk.mjs +3 -1
  242. package/lang/uz-Cyrl.js +3 -1
  243. package/lang/uz-Cyrl.mjs +3 -1
  244. package/lang/uz-Latn.js +3 -1
  245. package/lang/uz-Latn.mjs +3 -1
  246. package/lang/vi.js +3 -1
  247. package/lang/vi.mjs +3 -1
  248. package/lang/zh-CN.js +3 -1
  249. package/lang/zh-CN.mjs +3 -1
  250. package/lang/zh-TW.js +3 -1
  251. package/lang/zh-TW.mjs +3 -1
  252. package/package.json +6 -5
  253. package/src/components/breadcrumbs/QBreadcrumbsEl.js +6 -7
  254. package/src/components/breadcrumbs/QBreadcrumbsEl.json +53 -0
  255. package/src/components/btn/QBtn.js +19 -19
  256. package/src/components/btn/QBtn.json +41 -6
  257. package/src/components/btn/use-btn.js +6 -4
  258. package/src/components/btn-dropdown/QBtnDropdown.js +10 -2
  259. package/src/components/btn-dropdown/QBtnDropdown.json +8 -0
  260. package/src/components/checkbox/QCheckbox.js +1 -2
  261. package/src/components/checkbox/use-checkbox.js +2 -1
  262. package/src/components/chip/QChip.js +9 -2
  263. package/src/components/chip/QChip.json +8 -0
  264. package/src/components/chip/__tests__/QChip.spec.js +359 -46
  265. package/src/components/circular-progress/QCircularProgress.js +4 -2
  266. package/src/components/circular-progress/QCircularProgress.json +7 -0
  267. package/src/components/circular-progress/use-circular-progress.js +1 -0
  268. package/src/components/dialog/QDialog.js +7 -4
  269. package/src/components/drawer/QDrawer.js +7 -4
  270. package/src/components/editor/QEditor.json +9 -0
  271. package/src/components/expansion-item/QExpansionItem.js +37 -8
  272. package/src/components/expansion-item/QExpansionItem.json +67 -0
  273. package/src/components/fab/QFab.js +20 -1
  274. package/src/components/form/QForm.js +35 -40
  275. package/src/components/form/QFormChildMixin.js +3 -1
  276. package/src/components/item/QItem.js +4 -5
  277. package/src/components/item/QItem.json +53 -0
  278. package/src/components/menu/QMenu.js +5 -5
  279. package/src/components/menu/__tests__/QMenu.spec.js +7 -0
  280. package/src/components/page/QPage.js +1 -1
  281. package/src/components/popup-edit/QPopupEdit.js +2 -5
  282. package/src/components/radio/QRadio.js +3 -3
  283. package/src/components/rating/QRating.js +48 -10
  284. package/src/components/rating/QRating.json +11 -0
  285. package/src/components/select/QSelect.js +1 -4
  286. package/src/components/stepper/QStep.js +5 -3
  287. package/src/components/table/QTable.js +4 -6
  288. package/src/components/table/QTable.json +2 -2
  289. package/src/components/tabs/QRouteTab.js +6 -4
  290. package/src/components/tabs/QRouteTab.json +42 -6
  291. package/src/components/tabs/QTabs.js +188 -107
  292. package/src/components/tabs/use-tab.js +62 -38
  293. package/src/components/time/QTime.js +2 -2
  294. package/src/components/tooltip/QTooltip.js +7 -13
  295. package/src/components/tree/QTree.js +1 -1
  296. package/src/components/uploader/uploader-core.js +2 -3
  297. package/src/composables/private/__tests__/use-model-toggle.spec.js +2 -0
  298. package/src/composables/private/__tests__/use-transition.spec.js +4 -0
  299. package/src/composables/private/use-file.js +1 -1
  300. package/src/composables/private/use-router-link.js +80 -43
  301. package/src/composables/private/use-tick.js +15 -9
  302. package/src/composables/private/use-timeout.js +20 -7
  303. package/src/composables/private/use-validate.js +7 -13
  304. package/src/composables/use-form-child.js +6 -4
  305. package/src/directives/TouchPan.js +1 -1
  306. package/src/directives/TouchRepeat.js +1 -1
  307. package/src/directives/TouchSwipe.js +1 -1
  308. package/src/utils/EventBus.js +64 -0
  309. package/src/utils/extend.js +19 -19
  310. package/src/utils/private/inject-obj-prop.js +2 -0
  311. package/src/utils/private/rtl.js +10 -7
  312. package/src/utils/private/vm.js +4 -0
  313. package/src/utils/run-sequential-promises.js +115 -0
  314. 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', 'touchstart', 'mousedown', 'keyup' ],
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
- hasRouterLink, hasLink, linkTag, navigateToRouterLink,
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
- onTouchstartPassive: onLoadingEvt,
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
- return {
85
+ const acc = {
84
86
  onClick,
85
87
  onKeydown,
86
- onMousedown,
87
- onTouchstart
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
- if (hasRouterLink.value === true) {
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 (activated)",
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 set synchronously 'evt.navigate' to false"
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
- "navigateFn": {
58
+ "go": {
59
59
  "type": "Function",
60
- "desc": "When you need to control the time at which the button should trigger the route navigation then set 'evt.navigate' to false and call this function; Useful if you have async work to be done before the actual route navigation",
61
- "params": null,
62
- "returns": null
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, linkProps, navigateToRouterLink } = useRouterLink('button')
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, linkProps.value)
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
- navigateToRouterLink,
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,8 +11,7 @@ const bgNode = h('div', {
11
11
  }, [
12
12
  h('svg', {
13
13
  class: 'q-checkbox__svg fit absolute-full',
14
- viewBox: '0 0 24 24',
15
- 'aria-hidden': 'true'
14
+ viewBox: '0 0 24 24'
16
15
  }, [
17
16
  h('path', {
18
17
  class: 'q-checkbox__truthy',
@@ -211,7 +211,8 @@ export default function (type, getInner) {
211
211
  const child = [
212
212
  h('div', {
213
213
  class: innerClass.value,
214
- style: sizeStyle.value
214
+ style: sizeStyle.value,
215
+ 'aria-hidden': 'true'
215
216
  }, inner)
216
217
  ]
217
218
 
@@ -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
- : { tabindex: props.tabindex || 0 }
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
  },