quasar 2.17.6 → 2.18.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 (291) hide show
  1. package/dist/api/QBtnDropdown.json +1 -1
  2. package/dist/api/QDialog.json +1 -1
  3. package/dist/api/QMenu.json +1 -1
  4. package/dist/api/QOptionGroup.json +1 -1
  5. package/dist/api/QSelect.json +1 -1
  6. package/dist/api/QTable.json +1 -1
  7. package/dist/icon-set/bootstrap-icons.umd.prod.js +1 -1
  8. package/dist/icon-set/eva-icons.umd.prod.js +1 -1
  9. package/dist/icon-set/fontawesome-v5-pro.umd.prod.js +1 -1
  10. package/dist/icon-set/fontawesome-v5.umd.prod.js +1 -1
  11. package/dist/icon-set/fontawesome-v6-pro.umd.prod.js +1 -1
  12. package/dist/icon-set/fontawesome-v6.umd.prod.js +1 -1
  13. package/dist/icon-set/ionicons-v4.umd.prod.js +1 -1
  14. package/dist/icon-set/line-awesome.umd.prod.js +1 -1
  15. package/dist/icon-set/material-icons-outlined.umd.prod.js +1 -1
  16. package/dist/icon-set/material-icons-round.umd.prod.js +1 -1
  17. package/dist/icon-set/material-icons-sharp.umd.prod.js +1 -1
  18. package/dist/icon-set/material-icons.umd.prod.js +1 -1
  19. package/dist/icon-set/material-symbols-outlined.umd.prod.js +1 -1
  20. package/dist/icon-set/material-symbols-rounded.umd.prod.js +1 -1
  21. package/dist/icon-set/material-symbols-sharp.umd.prod.js +1 -1
  22. package/dist/icon-set/mdi-v3.umd.prod.js +1 -1
  23. package/dist/icon-set/mdi-v4.umd.prod.js +1 -1
  24. package/dist/icon-set/mdi-v5.umd.prod.js +1 -1
  25. package/dist/icon-set/mdi-v6.umd.prod.js +1 -1
  26. package/dist/icon-set/mdi-v7.umd.prod.js +1 -1
  27. package/dist/icon-set/svg-bootstrap-icons.umd.prod.js +1 -1
  28. package/dist/icon-set/svg-eva-icons.umd.prod.js +1 -1
  29. package/dist/icon-set/svg-fontawesome-v5.umd.prod.js +1 -1
  30. package/dist/icon-set/svg-fontawesome-v6.umd.prod.js +1 -1
  31. package/dist/icon-set/svg-ionicons-v4.umd.prod.js +1 -1
  32. package/dist/icon-set/svg-ionicons-v5.umd.prod.js +1 -1
  33. package/dist/icon-set/svg-ionicons-v6.umd.prod.js +1 -1
  34. package/dist/icon-set/svg-line-awesome.umd.prod.js +1 -1
  35. package/dist/icon-set/svg-material-icons-outlined.umd.prod.js +1 -1
  36. package/dist/icon-set/svg-material-icons-round.umd.prod.js +1 -1
  37. package/dist/icon-set/svg-material-icons-sharp.umd.prod.js +1 -1
  38. package/dist/icon-set/svg-material-icons.umd.prod.js +1 -1
  39. package/dist/icon-set/svg-material-symbols-outlined.umd.prod.js +1 -1
  40. package/dist/icon-set/svg-material-symbols-rounded.umd.prod.js +1 -1
  41. package/dist/icon-set/svg-material-symbols-sharp.umd.prod.js +1 -1
  42. package/dist/icon-set/svg-mdi-v6.umd.prod.js +1 -1
  43. package/dist/icon-set/svg-mdi-v7.umd.prod.js +1 -1
  44. package/dist/icon-set/svg-themify.umd.prod.js +1 -1
  45. package/dist/icon-set/themify.umd.prod.js +1 -1
  46. package/dist/lang/ar-TN.umd.prod.js +2 -2
  47. package/dist/lang/ar.umd.prod.js +2 -2
  48. package/dist/lang/az-Latn.umd.prod.js +2 -2
  49. package/dist/lang/bg.umd.prod.js +2 -2
  50. package/dist/lang/bn.umd.prod.js +2 -2
  51. package/dist/lang/bs-BA.umd.prod.js +2 -2
  52. package/dist/lang/ca.umd.prod.js +2 -2
  53. package/dist/lang/cs.umd.prod.js +2 -2
  54. package/dist/lang/da.umd.prod.js +2 -2
  55. package/dist/lang/de-CH.umd.prod.js +2 -2
  56. package/dist/lang/de-DE.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/hi.umd.prod.js +2 -2
  72. package/dist/lang/hr.umd.prod.js +2 -2
  73. package/dist/lang/hu.umd.prod.js +2 -2
  74. package/dist/lang/id.umd.prod.js +2 -2
  75. package/dist/lang/is.umd.prod.js +2 -2
  76. package/dist/lang/it.umd.prod.js +2 -2
  77. package/dist/lang/ja.umd.prod.js +2 -2
  78. package/dist/lang/kk.umd.prod.js +2 -2
  79. package/dist/lang/km.umd.prod.js +2 -2
  80. package/dist/lang/ko-KR.umd.prod.js +2 -2
  81. package/dist/lang/kur-CKB.umd.prod.js +2 -2
  82. package/dist/lang/lt.umd.prod.js +2 -2
  83. package/dist/lang/lu.umd.prod.js +2 -2
  84. package/dist/lang/lv.umd.prod.js +2 -2
  85. package/dist/lang/mk.umd.prod.js +2 -2
  86. package/dist/lang/ml.umd.prod.js +2 -2
  87. package/dist/lang/mm.umd.prod.js +2 -2
  88. package/dist/lang/ms-MY.umd.prod.js +2 -2
  89. package/dist/lang/ms.umd.prod.js +2 -2
  90. package/dist/lang/my.umd.prod.js +2 -2
  91. package/dist/lang/nb-NO.umd.prod.js +2 -2
  92. package/dist/lang/nl.umd.prod.js +2 -2
  93. package/dist/lang/pl.umd.prod.js +2 -2
  94. package/dist/lang/pt-BR.umd.prod.js +2 -2
  95. package/dist/lang/pt.umd.prod.js +2 -2
  96. package/dist/lang/ro.umd.prod.js +2 -2
  97. package/dist/lang/ru.umd.prod.js +2 -2
  98. package/dist/lang/sk.umd.prod.js +2 -2
  99. package/dist/lang/sl.umd.prod.js +2 -2
  100. package/dist/lang/sm.umd.prod.js +2 -2
  101. package/dist/lang/sr-CYR.umd.prod.js +2 -2
  102. package/dist/lang/sr.umd.prod.js +2 -2
  103. package/dist/lang/sv.umd.prod.js +2 -2
  104. package/dist/lang/ta.umd.prod.js +2 -2
  105. package/dist/lang/th.umd.prod.js +2 -2
  106. package/dist/lang/tl.umd.prod.js +2 -2
  107. package/dist/lang/tr.umd.prod.js +2 -2
  108. package/dist/lang/ug.umd.prod.js +1 -1
  109. package/dist/lang/uk.umd.prod.js +2 -2
  110. package/dist/lang/ur-PK.umd.prod.js +7 -0
  111. package/dist/lang/uz-Cyrl.umd.prod.js +2 -2
  112. package/dist/lang/uz-Latn.umd.prod.js +2 -2
  113. package/dist/lang/vi.umd.prod.js +2 -2
  114. package/dist/lang/zh-CN.umd.prod.js +2 -2
  115. package/dist/lang/zh-TW.umd.prod.js +2 -2
  116. package/dist/quasar.client.js +252 -179
  117. package/dist/quasar.css +1 -1
  118. package/dist/quasar.prod.css +1 -1
  119. package/dist/quasar.rtl.css +1 -1
  120. package/dist/quasar.rtl.prod.css +1 -1
  121. package/dist/quasar.sass +2 -2
  122. package/dist/quasar.server.prod.cjs +36 -36
  123. package/dist/quasar.server.prod.js +37 -37
  124. package/dist/quasar.umd.js +252 -179
  125. package/dist/quasar.umd.prod.js +42 -42
  126. package/dist/types/index.d.ts +86 -17
  127. package/dist/vetur/quasar-attributes.json +1 -1
  128. package/dist/vetur/quasar-tags.json +1 -1
  129. package/dist/web-types/web-types.json +1 -1
  130. package/lang/ar-TN.js +6 -0
  131. package/lang/ar.js +6 -0
  132. package/lang/az-Latn.js +6 -0
  133. package/lang/bg.js +6 -0
  134. package/lang/bn.js +6 -0
  135. package/lang/bs-BA.js +6 -0
  136. package/lang/ca.js +6 -0
  137. package/lang/cs.js +6 -0
  138. package/lang/da.js +6 -0
  139. package/lang/de-CH.js +6 -0
  140. package/lang/de-DE.js +6 -0
  141. package/lang/de.js +6 -0
  142. package/lang/el.js +6 -0
  143. package/lang/en-GB.js +6 -0
  144. package/lang/en-US.js +6 -0
  145. package/lang/eo.js +6 -0
  146. package/lang/es.js +6 -0
  147. package/lang/et.js +6 -0
  148. package/lang/eu.js +6 -0
  149. package/lang/fa-IR.js +6 -0
  150. package/lang/fa.js +6 -0
  151. package/lang/fi.js +6 -0
  152. package/lang/fr.js +6 -0
  153. package/lang/gn.js +6 -0
  154. package/lang/he.js +6 -0
  155. package/lang/hi.js +6 -0
  156. package/lang/hr.js +6 -0
  157. package/lang/hu.js +6 -0
  158. package/lang/id.js +6 -0
  159. package/lang/index.json +1 -1
  160. package/lang/is.js +6 -0
  161. package/lang/it.js +6 -0
  162. package/lang/ja.js +6 -0
  163. package/lang/kk.js +6 -0
  164. package/lang/km.js +6 -0
  165. package/lang/ko-KR.js +6 -0
  166. package/lang/kur-CKB.js +6 -0
  167. package/lang/lt.js +6 -0
  168. package/lang/lu.js +6 -0
  169. package/lang/lv.js +6 -0
  170. package/lang/mk.js +6 -0
  171. package/lang/ml.js +6 -0
  172. package/lang/mm.js +6 -0
  173. package/lang/ms-MY.js +6 -0
  174. package/lang/ms.js +6 -0
  175. package/lang/my.js +6 -0
  176. package/lang/nb-NO.js +6 -0
  177. package/lang/nl.js +6 -0
  178. package/lang/pl.js +6 -0
  179. package/lang/pt-BR.js +6 -0
  180. package/lang/pt.js +6 -0
  181. package/lang/ro.js +6 -0
  182. package/lang/ru.js +6 -0
  183. package/lang/sk.js +6 -0
  184. package/lang/sl.js +6 -0
  185. package/lang/sm.js +6 -0
  186. package/lang/sr-CYR.js +6 -0
  187. package/lang/sr.js +6 -0
  188. package/lang/sv.js +6 -0
  189. package/lang/ta.js +6 -0
  190. package/lang/th.js +6 -0
  191. package/lang/tl.js +6 -0
  192. package/lang/tr.js +6 -0
  193. package/lang/uk.js +6 -0
  194. package/lang/ur-PK.js +111 -0
  195. package/lang/uz-Cyrl.js +6 -0
  196. package/lang/uz-Latn.js +6 -0
  197. package/lang/vi.js +6 -0
  198. package/lang/zh-CN.js +6 -0
  199. package/lang/zh-TW.js +6 -0
  200. package/package.json +4 -4
  201. package/src/components/breadcrumbs/QBreadcrumbs.js +2 -2
  202. package/src/components/btn/QBtn.js +7 -8
  203. package/src/components/btn-dropdown/QBtnDropdown.js +10 -4
  204. package/src/components/btn-dropdown/QBtnDropdown.json +21 -0
  205. package/src/components/color/QColor.js +1 -1
  206. package/src/components/date/QDate.js +14 -7
  207. package/src/components/dialog/QDialog.js +2 -2
  208. package/src/components/dialog/QDialog.json +1 -1
  209. package/src/components/drawer/QDrawer.js +3 -5
  210. package/src/components/editor/QEditor.js +1 -1
  211. package/src/components/editor/editor-caret.js +1 -1
  212. package/src/components/editor/editor-utils.js +2 -2
  213. package/src/components/expansion-item/QExpansionItem.js +6 -3
  214. package/src/components/fab/QFab.js +2 -2
  215. package/src/components/form/QForm.js +2 -2
  216. package/src/components/form/QFormChildMixin.js +6 -4
  217. package/src/components/icon/QIcon.js +2 -2
  218. package/src/components/infinite-scroll/QInfiniteScroll.js +2 -4
  219. package/src/components/input/QInput.js +3 -3
  220. package/src/components/item/QItem.js +1 -1
  221. package/src/components/menu/QMenu.js +8 -5
  222. package/src/components/menu/QMenu.json +8 -1
  223. package/src/components/option-group/QOptionGroup.json +1 -17
  224. package/src/components/pagination/QPagination.js +8 -4
  225. package/src/components/parallax/QParallax.js +1 -1
  226. package/src/components/popup-edit/QPopupEdit.js +2 -2
  227. package/src/components/pull-to-refresh/QPullToRefresh.js +1 -1
  228. package/src/components/rating/QRating.sass +1 -1
  229. package/src/components/resize-observer/QResizeObserver.js +1 -1
  230. package/src/components/scroll-observer/QScrollObserver.js +2 -2
  231. package/src/components/select/QSelect.js +8 -6
  232. package/src/components/select/QSelect.json +2 -2
  233. package/src/components/slide-transition/QSlideTransition.js +2 -2
  234. package/src/components/stepper/StepHeader.js +1 -1
  235. package/src/components/table/QTable.js +84 -36
  236. package/src/components/table/QTable.json +138 -0
  237. package/src/components/table/QTr.js +4 -1
  238. package/src/components/table/table-sort.js +1 -1
  239. package/src/components/tabs/QTabs.js +2 -2
  240. package/src/components/tabs/use-tab.js +4 -4
  241. package/src/components/time/QTime.js +1 -1
  242. package/src/components/tree/QTree.js +2 -3
  243. package/src/components/virtual-scroll/use-virtual-scroll.js +3 -3
  244. package/src/composables/private.use-field/use-field.js +5 -5
  245. package/src/composables/private.use-file/use-file.js +6 -3
  246. package/src/composables/private.use-model-toggle/use-model-toggle.js +2 -2
  247. package/src/composables/private.use-refocus-target/use-refocus-target.js +6 -5
  248. package/src/composables/private.use-validate/use-validate.js +1 -1
  249. package/src/directives/intersection/Intersection.js +2 -2
  250. package/src/directives/morph/Morph.js +2 -2
  251. package/src/directives/mutation/Mutation.js +2 -2
  252. package/src/directives/touch-hold/TouchHold.js +2 -2
  253. package/src/directives/touch-pan/TouchPan.js +2 -2
  254. package/src/directives/touch-repeat/TouchRepeat.js +3 -3
  255. package/src/directives/touch-swipe/TouchSwipe.js +3 -3
  256. package/src/plugins/lang/Lang.test.js +12 -0
  257. package/src/plugins/loading/Loading.js +1 -1
  258. package/src/plugins/notify/Notify.js +1 -1
  259. package/src/plugins/private.body/Body.js +1 -1
  260. package/src/plugins/private.history/History.js +1 -1
  261. package/src/plugins/screen/Screen.js +1 -1
  262. package/src/utils/morph/morph.js +13 -10
  263. package/src/utils/open-url/open-url.js +3 -3
  264. package/src/utils/private.dialog/create-dialog.js +2 -2
  265. package/src/utils/private.portal/portal.js +1 -1
  266. package/src/components/date/__tests__/QDate.cy.js +0 -189
  267. package/src/components/date/__tests__/use-datetime.cy.js +0 -83
  268. package/src/components/editor/__tests__/QEditor.cy.js +0 -195
  269. package/src/components/field/__tests__/QField.cy.js +0 -156
  270. package/src/components/input/__tests__/QInput.cy.js +0 -786
  271. package/src/components/input/__tests__/use-mask.cy.js +0 -124
  272. package/src/components/menu/__tests__/QMenu.cy.js +0 -634
  273. package/src/components/menu/__tests__/WrapperOne.vue +0 -51
  274. package/src/components/menu/__tests__/WrapperTwo.vue +0 -38
  275. package/src/components/select/__tests__/QSelect.cy.js +0 -2018
  276. package/src/components/table/__tests__/QTable.cy.js +0 -635
  277. package/src/components/table/__tests__/QTd.cy.js +0 -35
  278. package/src/components/table/__tests__/QTh.cy.js +0 -27
  279. package/src/components/table/__tests__/QTr.cy.js +0 -27
  280. package/src/components/tabs/__tests__/QTab.cy.js +0 -79
  281. package/src/components/tabs/__tests__/QTabs.cy.js +0 -147
  282. package/src/components/uploader/__tests__/QUploader.cy.js +0 -191
  283. package/src/composables/__tests__/FieldWrapper.vue +0 -54
  284. package/src/composables/__tests__/use-anchor.cy.js +0 -98
  285. package/src/composables/__tests__/use-field.cy.js +0 -547
  286. package/src/composables/__tests__/use-file.cy.js +0 -69
  287. package/src/composables/__tests__/use-fullscreen.cy.js +0 -37
  288. package/src/composables/__tests__/use-model-toggle.cy.js +0 -350
  289. package/src/composables/__tests__/use-portal.cy.js +0 -4
  290. package/src/composables/__tests__/use-router-link.cy.js +0 -55
  291. package/src/composables/__tests__/use-validate.cy.js +0 -257
@@ -703,7 +703,7 @@ export default createComponent({
703
703
  ))
704
704
 
705
705
  watch(() => props.modelValue, v => {
706
- if (lastEmitValue === v) {
706
+ if (lastEmitValue === JSON.stringify(v)) {
707
707
  lastEmitValue = 0
708
708
  }
709
709
  else {
@@ -732,6 +732,10 @@ export default createComponent({
732
732
  innerLocale.value = val
733
733
  })
734
734
 
735
+ function setLastValue (v) {
736
+ lastEmitValue = JSON.stringify(v)
737
+ }
738
+
735
739
  function setToday () {
736
740
  const { year, month, day } = today.value
737
741
 
@@ -902,7 +906,7 @@ export default createComponent({
902
906
 
903
907
  function toggleDate (date, monthHash) {
904
908
  const month = daysMap.value[ monthHash ]
905
- const fn = month !== void 0 && month.includes(date.day) === true
909
+ const fn = month?.includes(date.day) === true
906
910
  ? removeFromModel
907
911
  : addToModel
908
912
 
@@ -958,9 +962,9 @@ export default createComponent({
958
962
  ? val[ 0 ]
959
963
  : val
960
964
 
961
- lastEmitValue = value
962
-
963
965
  const { reason, details } = getEmitParams(action, date)
966
+
967
+ setLastValue(value)
964
968
  emit('update:modelValue', value, reason, details)
965
969
  }
966
970
 
@@ -981,9 +985,9 @@ export default createComponent({
981
985
  date.day = Math.min(Math.max(1, date.day), maxDay)
982
986
 
983
987
  const value = encodeEntry(date)
984
- lastEmitValue = value
985
-
986
988
  const { details } = getEmitParams('', date)
989
+
990
+ setLastValue(value)
987
991
  emit('update:modelValue', value, reason, details)
988
992
  })
989
993
  }
@@ -1080,7 +1084,10 @@ export default createComponent({
1080
1084
  : entry.dateHash !== null
1081
1085
  })
1082
1086
 
1083
- emit('update:modelValue', (props.multiple === true ? model : model[ 0 ]) || null, reason)
1087
+ const value = (props.multiple === true ? model : model[ 0 ]) || null
1088
+
1089
+ setLastValue(value)
1090
+ emit('update:modelValue', value, reason)
1084
1091
  }
1085
1092
 
1086
1093
  function getHeader () {
@@ -180,7 +180,7 @@ export default createComponent({
180
180
  animating.value = true
181
181
 
182
182
  if (props.noFocus !== true) {
183
- document.activeElement !== null && document.activeElement.blur()
183
+ document.activeElement?.blur()
184
184
  registerTick(focus)
185
185
  }
186
186
  else {
@@ -230,7 +230,7 @@ export default createComponent({
230
230
  hidePortal()
231
231
 
232
232
  if (refocusTarget !== null) {
233
- ((evt && evt.type.indexOf('key') === 0
233
+ ((evt?.type.indexOf('key') === 0
234
234
  ? refocusTarget.closest('[tabindex]:not([tabindex^="-"])')
235
235
  : void 0
236
236
  ) || refocusTarget).focus()
@@ -134,7 +134,7 @@
134
134
  },
135
135
 
136
136
  "escape-key": {
137
- "desc": "Emitted when ESC key is pressed; Does not get emitted if Dialog is 'persistent' or it has 'no-esc-key' set"
137
+ "desc": "Emitted when ESC key is pressed; Does not get emitted if Dialog is 'persistent' or it has 'no-esc-dismiss' set"
138
138
  },
139
139
 
140
140
  "click": { "internal": true }
@@ -120,7 +120,7 @@ export default createComponent({
120
120
 
121
121
  if (belowBreakpoint.value === true) {
122
122
  const otherInstance = $layout.instances[ otherSide.value ]
123
- if (otherInstance !== void 0 && otherInstance.belowBreakpoint === true) {
123
+ if (otherInstance?.belowBreakpoint === true) {
124
124
  otherInstance.hide(false)
125
125
  }
126
126
 
@@ -472,9 +472,7 @@ export default createComponent({
472
472
  timerMini = setTimeout(() => {
473
473
  timerMini = null
474
474
  flagMiniAnimate.value = false
475
- if (vm && vm.proxy && vm.proxy.$el) {
476
- vm.proxy.$el.classList.remove('q-drawer--mini-animate')
477
- }
475
+ vm?.proxy?.$el?.classList.remove('q-drawer--mini-animate')
478
476
  }, 150)
479
477
  }
480
478
 
@@ -622,7 +620,7 @@ export default createComponent({
622
620
  })
623
621
 
624
622
  onBeforeUnmount(() => {
625
- layoutTotalWidthWatcher !== void 0 && layoutTotalWidthWatcher()
623
+ layoutTotalWidthWatcher?.()
626
624
 
627
625
  if (timerMini !== null) {
628
626
  clearTimeout(timerMini)
@@ -451,7 +451,7 @@ export default createComponent({
451
451
 
452
452
  function focus () {
453
453
  addFocusFn(() => {
454
- contentRef.value !== null && contentRef.value.focus({ preventScroll: true })
454
+ contentRef.value?.focus({ preventScroll: true })
455
455
  })
456
456
  }
457
457
 
@@ -91,7 +91,7 @@ export default class Caret {
91
91
  get range () {
92
92
  const sel = this.selection
93
93
 
94
- if (sel !== null && sel.rangeCount) {
94
+ if (sel?.rangeCount) {
95
95
  return sel.getRangeAt(0)
96
96
  }
97
97
 
@@ -54,7 +54,7 @@ function getBtn (eVm, btn, clickHandler, active = false) {
54
54
  disable: btn.disable ? (typeof btn.disable === 'function' ? btn.disable(eVm) : true) : false,
55
55
  size: 'sm',
56
56
  onClick (e) {
57
- clickHandler && clickHandler()
57
+ clickHandler?.()
58
58
  run(e, btn, eVm)
59
59
  }
60
60
  }, () => child)
@@ -120,7 +120,7 @@ function getDropdown (eVm, btn) {
120
120
  dense: true,
121
121
  onClick (e) {
122
122
  closeDropdown()
123
- eVm.contentRef.value !== null && eVm.contentRef.value.focus()
123
+ e?.qAvoidFocus !== true && eVm.contentRef.value?.focus()
124
124
  eVm.caret.restore()
125
125
  run(e, btn, eVm)
126
126
  }
@@ -150,7 +150,7 @@ export default createComponent({
150
150
  })
151
151
 
152
152
  watch(() => props.group, name => {
153
- exitGroup !== void 0 && exitGroup()
153
+ exitGroup?.()
154
154
  name !== void 0 && enterGroup()
155
155
  })
156
156
 
@@ -164,7 +164,10 @@ export default createComponent({
164
164
  }
165
165
 
166
166
  function toggleIcon (e, keyboard) {
167
- keyboard !== true && blurTargetRef.value !== null && blurTargetRef.value.focus()
167
+ if (keyboard !== true && e.qAvoidFocus !== true) {
168
+ blurTargetRef.value?.focus()
169
+ }
170
+
168
171
  toggle(e)
169
172
  stopAndPrevent(e)
170
173
  }
@@ -360,7 +363,7 @@ export default createComponent({
360
363
  props.group !== void 0 && enterGroup()
361
364
 
362
365
  onBeforeUnmount(() => {
363
- exitGroup !== void 0 && exitGroup()
366
+ exitGroup?.()
364
367
  })
365
368
 
366
369
  return () => h('div', { class: classes.value }, [
@@ -128,8 +128,8 @@ export default createComponent({
128
128
  onChildClick (evt) {
129
129
  hide(evt)
130
130
 
131
- if (triggerRef.value !== null) {
132
- triggerRef.value.$el.focus()
131
+ if (evt?.qAvoidFocus !== true) {
132
+ triggerRef.value?.$el.focus()
133
133
  }
134
134
  }
135
135
  })
@@ -114,7 +114,7 @@ export default createComponent({
114
114
  if (props.onSubmit !== void 0) {
115
115
  emit('submit', evt)
116
116
  }
117
- else if (evt !== void 0 && evt.target !== void 0 && typeof evt.target.submit === 'function') {
117
+ else if (evt?.target !== void 0 && typeof evt.target.submit === 'function') {
118
118
  evt.target.submit()
119
119
  }
120
120
  }
@@ -143,7 +143,7 @@ export default createComponent({
143
143
  || rootRef.value.querySelector('[autofocus], [data-autofocus]')
144
144
  || Array.prototype.find.call(rootRef.value.querySelectorAll('[tabindex]'), el => el.tabIndex !== -1)
145
145
 
146
- target !== null && target !== void 0 && target.focus({ preventScroll: true })
146
+ target?.focus({ preventScroll: true })
147
147
  })
148
148
  }
149
149
 
@@ -30,13 +30,15 @@ export default {
30
30
 
31
31
  mounted () {
32
32
  // register to parent QForm
33
- const $form = this.$.provides[ formKey ]
34
- $form !== void 0 && this.disable !== true && $form.bindComponent(this)
33
+ if (this.disable !== true) {
34
+ this.$.provides[ formKey ]?.bindComponent(this)
35
+ }
35
36
  },
36
37
 
37
38
  beforeUnmount () {
38
39
  // un-register from parent QForm
39
- const $form = this.$.provides[ formKey ]
40
- $form !== void 0 && this.disable !== true && $form.unbindComponent(this)
40
+ if (this.disable !== true) {
41
+ this.$.provides[ formKey ]?.unbindComponent(this)
42
+ }
41
43
  }
42
44
  }
@@ -20,7 +20,8 @@ const libMap = {
20
20
  'ion-logo': ionFn,
21
21
  'iconfont ': sameFn,
22
22
  'ti-': i => `themify-icon ${ i }`,
23
- 'bi-': i => `bootstrap-icons ${ i }`
23
+ 'bi-': i => `bootstrap-icons ${ i }`,
24
+ 'i-': sameFn // UnoCSS pure icons
24
25
  }
25
26
 
26
27
  const matMap = {
@@ -186,7 +187,6 @@ export default createComponent({
186
187
  class: classes.value,
187
188
  style: sizeStyle.value,
188
189
  'aria-hidden': 'true',
189
- role: 'presentation'
190
190
  }
191
191
 
192
192
  if (type.value.none === true) {
@@ -126,9 +126,7 @@ export default createComponent({
126
126
  isWorking.value = false
127
127
  isFetching.value = false
128
128
  localScrollTarget.removeEventListener('scroll', poll, passive)
129
- if (poll !== void 0 && poll.cancel !== void 0) {
130
- poll.cancel()
131
- }
129
+ poll?.cancel?.()
132
130
  }
133
131
  }
134
132
 
@@ -240,7 +238,7 @@ export default createComponent({
240
238
  // expose public methods
241
239
  const vm = getCurrentInstance()
242
240
  Object.assign(vm.proxy, {
243
- poll: () => { poll !== void 0 && poll() },
241
+ poll: () => { poll?.() },
244
242
  trigger, stop, reset, resume, setIndex, updateScrollTarget
245
243
  })
246
244
 
@@ -203,7 +203,7 @@ export default createComponent({
203
203
  }
204
204
 
205
205
  function select () {
206
- inputRef.value !== null && inputRef.value.select()
206
+ inputRef.value?.select()
207
207
  }
208
208
 
209
209
  function onPaste (e) {
@@ -340,7 +340,7 @@ export default createComponent({
340
340
  emitTimer = null
341
341
  }
342
342
 
343
- emitValueFn !== void 0 && emitValueFn()
343
+ emitValueFn?.()
344
344
 
345
345
  emit('change', e.target.value)
346
346
  }
@@ -353,7 +353,7 @@ export default createComponent({
353
353
  emitTimer = null
354
354
  }
355
355
 
356
- emitValueFn !== void 0 && emitValueFn()
356
+ emitValueFn?.()
357
357
 
358
358
  typedNumber = false
359
359
  stopValueWatcher = false
@@ -92,7 +92,7 @@ export default createComponent({
92
92
 
93
93
  function onClick (e) {
94
94
  if (isClickable.value === true) {
95
- if (blurTargetRef.value !== null) {
95
+ if (blurTargetRef.value !== null && e.qAvoidFocus !== true) {
96
96
  if (e.qKeyEvent !== true && document.activeElement === rootRef.value) {
97
97
  blurTargetRef.value.focus()
98
98
  }
@@ -38,7 +38,7 @@ export default createComponent({
38
38
  persistent: Boolean,
39
39
  autoClose: Boolean,
40
40
  separateClosePopup: Boolean,
41
-
41
+ noEscDismiss: Boolean,
42
42
  noRouteDismiss: Boolean,
43
43
  noRefocus: Boolean,
44
44
  noFocus: Boolean,
@@ -177,7 +177,7 @@ export default createComponent({
177
177
  addFocusFn(() => {
178
178
  let node = innerRef.value
179
179
 
180
- if (node && node.contains(document.activeElement) !== true) {
180
+ if (node && (node.contains(document.activeElement) !== true)) {
181
181
  node = node.querySelector('[autofocus][tabindex], [data-autofocus][tabindex]')
182
182
  || node.querySelector('[autofocus] [tabindex], [data-autofocus] [tabindex]')
183
183
  || node.querySelector('[autofocus], [data-autofocus]')
@@ -256,10 +256,11 @@ export default createComponent({
256
256
  || evt.qClickOutside !== true
257
257
  )
258
258
  ) {
259
- ((evt && evt.type.indexOf('key') === 0
259
+ ((evt?.type.indexOf('key') === 0
260
260
  ? refocusTarget.closest('[tabindex]:not([tabindex^="-"])')
261
261
  : void 0
262
262
  ) || refocusTarget).focus()
263
+
263
264
  refocusTarget = null
264
265
  }
265
266
 
@@ -321,8 +322,10 @@ export default createComponent({
321
322
  }
322
323
 
323
324
  function onEscapeKey (evt) {
324
- emit('escapeKey')
325
- hide(evt)
325
+ if (props.noEscDismiss !== true) {
326
+ emit('escapeKey')
327
+ hide(evt)
328
+ }
326
329
  }
327
330
 
328
331
  function updatePosition () {
@@ -67,6 +67,13 @@
67
67
  "category": "behavior"
68
68
  },
69
69
 
70
+ "no-esc-dismiss": {
71
+ "type": "Boolean",
72
+ "desc": "User cannot dismiss the popup by hitting ESC key; No need to set it if 'persistent' prop is also set",
73
+ "category": "behavior",
74
+ "addedIn": "v2.18"
75
+ },
76
+
70
77
  "no-route-dismiss": {
71
78
  "type": "Boolean",
72
79
  "desc": "Changing route app won't dismiss the popup; No need to set it if 'persistent' prop is also set",
@@ -128,7 +135,7 @@
128
135
 
129
136
  "events": {
130
137
  "escape-key": {
131
- "desc": "Emitted when ESC key is pressed; Does not get emitted if Menu is 'persistent'"
138
+ "desc": "Emitted when ESC key is pressed; Does not get emitted if Menu is 'persistent' or it has 'no-esc-dismiss' set"
132
139
  },
133
140
 
134
141
  "click": { "internal": true }
@@ -14,25 +14,9 @@
14
14
 
15
15
  "options": {
16
16
  "type": "Array",
17
- "desc": "Array of objects with value, label, and disable (optional) props. The binary components will be created according to this array; Props from QToggle, QCheckbox or QRadio can also be added as key/value pairs to control the components singularly",
17
+ "desc": "Array of objects that the binary components will be created from. For best performance reference a variable in your scope. Canonical form of each object is with 'label' (String), 'value' (Any) and optional 'disable' (Boolean) props (can be customized with options-value/option-label/option-disable props) along with any other props from QToggle, QCheckbox, or QRadio.",
18
18
  "default": "[]",
19
19
  "definition": {
20
- "label": {
21
- "type": "String",
22
- "desc": "Label to display along the component",
23
- "required": true,
24
- "examples": [ "'Option 1'", "'Option 2'", "'Option 3'" ]
25
- },
26
- "value": {
27
- "type": "Any",
28
- "desc": "Value of the option that will be used by the component model",
29
- "required": true,
30
- "examples": [ "'op1'", "'op2'", "'op3'" ]
31
- },
32
- "disable": {
33
- "type": "Boolean",
34
- "desc": "If true, the option will be disabled"
35
- },
36
20
  "...props": {
37
21
  "type": "Any",
38
22
  "desc": "Any other props from QToggle, QCheckbox, or QRadio",
@@ -317,7 +317,8 @@ export default createComponent({
317
317
  getBtn({
318
318
  key: 'bls',
319
319
  disable: props.disable || props.modelValue <= minProp.value,
320
- icon: icons.value[ 0 ]
320
+ icon: icons.value[ 0 ],
321
+ 'aria-label': $q.lang.pagination.first
321
322
  }, minProp.value)
322
323
  )
323
324
 
@@ -325,7 +326,8 @@ export default createComponent({
325
326
  getBtn({
326
327
  key: 'ble',
327
328
  disable: props.disable || props.modelValue >= maxProp.value,
328
- icon: icons.value[ 3 ]
329
+ icon: icons.value[ 3 ],
330
+ 'aria-label': $q.lang.pagination.last
329
331
  }, maxProp.value)
330
332
  )
331
333
  }
@@ -335,7 +337,8 @@ export default createComponent({
335
337
  getBtn({
336
338
  key: 'bdp',
337
339
  disable: props.disable || props.modelValue <= minProp.value,
338
- icon: icons.value[ 1 ]
340
+ icon: icons.value[ 1 ],
341
+ 'aria-label': $q.lang.pagination.prev
339
342
  }, props.modelValue - 1)
340
343
  )
341
344
 
@@ -343,7 +346,8 @@ export default createComponent({
343
346
  getBtn({
344
347
  key: 'bdn',
345
348
  disable: props.disable || props.modelValue >= maxProp.value,
346
- icon: icons.value[ 2 ]
349
+ icon: icons.value[ 2 ],
350
+ 'aria-label': $q.lang.pagination.next
347
351
  }, props.modelValue + 1)
348
352
  )
349
353
  }
@@ -134,7 +134,7 @@ export default createComponent({
134
134
 
135
135
  onBeforeUnmount(() => {
136
136
  stop()
137
- observer !== void 0 && observer.disconnect()
137
+ observer?.disconnect()
138
138
  mediaEl.onload = mediaEl.onloadstart = mediaEl.loadedmetadata = null
139
139
  })
140
140
 
@@ -163,8 +163,8 @@ export default createComponent({
163
163
  Object.assign(proxy, {
164
164
  set,
165
165
  cancel,
166
- show (e) { menuRef.value !== null && menuRef.value.show(e) },
167
- hide (e) { menuRef.value !== null && menuRef.value.hide(e) },
166
+ show (e) { menuRef.value?.show(e) },
167
+ hide (e) { menuRef.value?.hide(e) },
168
168
  updatePosition
169
169
  })
170
170
 
@@ -149,7 +149,7 @@ export default createComponent({
149
149
  timer = setTimeout(() => {
150
150
  timer = null
151
151
  animating.value = false
152
- done && done()
152
+ done?.()
153
153
  }, 300)
154
154
  }
155
155
 
@@ -14,7 +14,7 @@
14
14
  text-shadow: $rating-shadow
15
15
  position: relative
16
16
  opacity: .4
17
- transition: transform .2s ease-in, opacity .2s ease-in
17
+ transition: transform .2s ease-in, opacity .2s ease-in, color .2s ease-in
18
18
 
19
19
  &--hovered
20
20
  transform: scale(1.3)
@@ -117,7 +117,7 @@ export default createComponent({
117
117
  function onObjLoad () {
118
118
  cleanup()
119
119
 
120
- if (targetEl && targetEl.contentDocument) {
120
+ if (targetEl?.contentDocument) {
121
121
  curDocView = targetEl.contentDocument.defaultView
122
122
  curDocView.addEventListener('resize', trigger, listenOpts.passive)
123
123
  emitEvent()
@@ -53,7 +53,7 @@ export default createComponent({
53
53
  })
54
54
 
55
55
  function emitEvent () {
56
- clearTimer !== null && clearTimer()
56
+ clearTimer?.()
57
57
 
58
58
  const top = Math.max(0, getVerticalScrollPosition(localScrollTarget))
59
59
  const left = getHorizontalScrollPosition(localScrollTarget)
@@ -123,7 +123,7 @@ export default createComponent({
123
123
  })
124
124
 
125
125
  onBeforeUnmount(() => {
126
- clearTimer !== null && clearTimer()
126
+ clearTimer?.()
127
127
  unconfigureScrollTarget()
128
128
  })
129
129
 
@@ -273,7 +273,7 @@ export default createComponent({
273
273
  const needsHtmlFn = computed(() => (
274
274
  props.optionsHtml === true
275
275
  ? () => true
276
- : opt => opt !== void 0 && opt !== null && opt.html === true
276
+ : opt => opt?.html === true
277
277
  ))
278
278
 
279
279
  const valueAsHtml = computed(() => (
@@ -533,7 +533,7 @@ export default createComponent({
533
533
  hidePopup()
534
534
  }
535
535
 
536
- targetRef.value !== null && targetRef.value.focus()
536
+ targetRef.value?.focus()
537
537
 
538
538
  if (
539
539
  innerValue.value.length === 0
@@ -545,7 +545,9 @@ export default createComponent({
545
545
  return
546
546
  }
547
547
 
548
- (hasDialog !== true || dialogFieldFocused.value === true) && state.focus()
548
+ if (hasDialog !== true || dialogFieldFocused.value === true) {
549
+ state.focus()
550
+ }
549
551
 
550
552
  selectInputText()
551
553
 
@@ -894,7 +896,7 @@ export default createComponent({
894
896
  fn(val, mode === 'add-unique')
895
897
 
896
898
  if (props.multiple !== true) {
897
- targetRef.value !== null && targetRef.value.focus()
899
+ targetRef.value?.focus()
898
900
  hidePopup()
899
901
  }
900
902
  }
@@ -1214,7 +1216,7 @@ export default createComponent({
1214
1216
 
1215
1217
  function onDialogFieldFocus (e) {
1216
1218
  stop(e)
1217
- targetRef.value !== null && targetRef.value.focus()
1219
+ targetRef.value?.focus()
1218
1220
  dialogFieldFocused.value = true
1219
1221
  window.scrollTo(window.pageXOffset || window.scrollX || document.body.scrollLeft || 0, 0)
1220
1222
  }
@@ -1511,7 +1513,7 @@ export default createComponent({
1511
1513
 
1512
1514
  if (hasDialog !== true && menu.value === true) {
1513
1515
  closeMenu()
1514
- targetRef.value !== null && targetRef.value.focus()
1516
+ targetRef.value?.focus()
1515
1517
  return
1516
1518
  }
1517
1519
 
@@ -34,7 +34,7 @@
34
34
 
35
35
  "options": {
36
36
  "type": "Array",
37
- "desc": "Available options that the user can select from. For best performance freeze the list of options.",
37
+ "desc": "Array of objects with available options that the user can select from. For best performance freeze the list of options. Canonical form of each object is with 'label' (String), 'value' (Any) and optional 'disable' (Boolean) props (can be customized with options-value/option-label/option-disable props).",
38
38
  "default": "[]",
39
39
  "examples": [
40
40
  "[ 'Tesla', 'iPhone' ]",
@@ -260,7 +260,7 @@
260
260
 
261
261
  "fill-input": {
262
262
  "type": "Boolean",
263
- "desc": "Fills the input with current value; Useful along with 'hide-selected'; Does NOT works along with 'multiple' selection",
263
+ "desc": "Fills the input with current value; Useful along with 'hide-selected'; Does NOT work along with 'multiple' selection",
264
264
  "category": "behavior"
265
265
  },
266
266
 
@@ -20,7 +20,7 @@ export default createComponent({
20
20
  let timer = null, timerFallback = null, animListener, lastEvent
21
21
 
22
22
  function cleanup () {
23
- doneFn && doneFn()
23
+ doneFn?.()
24
24
  doneFn = null
25
25
  animating = false
26
26
 
@@ -34,7 +34,7 @@ export default createComponent({
34
34
  timerFallback = null
35
35
  }
36
36
 
37
- element !== void 0 && element.removeEventListener('transitionend', animListener)
37
+ element?.removeEventListener('transitionend', animListener)
38
38
  animListener = null
39
39
  }
40
40
 
@@ -119,7 +119,7 @@ export default createComponent({
119
119
  ))
120
120
 
121
121
  function onActivate () {
122
- blurRef.value !== null && blurRef.value.focus()
122
+ blurRef.value?.focus()
123
123
  isActive.value === false && props.goToPanel(props.step.name)
124
124
  }
125
125