quasar 2.6.5 → 2.7.1

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 (218) hide show
  1. package/dist/api/QBreadcrumbsEl.json +1 -1
  2. package/dist/api/QBtn.json +1 -1
  3. package/dist/api/QBtnDropdown.json +2 -1
  4. package/dist/api/QBtnToggle.json +1 -0
  5. package/dist/api/QCarousel.json +2 -1
  6. package/dist/api/QCheckbox.json +1 -0
  7. package/dist/api/QChip.json +3 -1
  8. package/dist/api/QColor.json +1 -0
  9. package/dist/api/QDate.json +1 -0
  10. package/dist/api/QEditor.json +3 -1
  11. package/dist/api/QExpansionItem.json +2 -1
  12. package/dist/api/QFab.json +1 -0
  13. package/dist/api/QFile.json +1 -0
  14. package/dist/api/QFooter.json +1 -0
  15. package/dist/api/QHeader.json +1 -0
  16. package/dist/api/QImg.json +23 -0
  17. package/dist/api/QInput.json +1 -0
  18. package/dist/api/QItem.json +4 -2
  19. package/dist/api/QKnob.json +1 -0
  20. package/dist/api/QOptionGroup.json +1 -0
  21. package/dist/api/QPagination.json +1 -0
  22. package/dist/api/QPopupEdit.json +1 -0
  23. package/dist/api/QPopupProxy.json +1 -0
  24. package/dist/api/QRadio.json +1 -0
  25. package/dist/api/QRange.json +1 -0
  26. package/dist/api/QRating.json +1 -0
  27. package/dist/api/QRouteTab.json +1 -1
  28. package/dist/api/QSelect.json +1 -0
  29. package/dist/api/QSlider.json +1 -0
  30. package/dist/api/QSplitter.json +1 -0
  31. package/dist/api/QTable.json +5 -1
  32. package/dist/api/QTabs.json +1 -0
  33. package/dist/api/QTime.json +1 -0
  34. package/dist/api/QToggle.json +1 -0
  35. package/dist/api/QTree.json +6 -3
  36. package/dist/api/QVideo.json +43 -0
  37. package/dist/icon-set/bootstrap-icons.umd.prod.js +1 -1
  38. package/dist/icon-set/eva-icons.umd.prod.js +1 -1
  39. package/dist/icon-set/fontawesome-v5-pro.umd.prod.js +1 -1
  40. package/dist/icon-set/fontawesome-v5.umd.prod.js +1 -1
  41. package/dist/icon-set/fontawesome-v6-pro.umd.prod.js +1 -1
  42. package/dist/icon-set/fontawesome-v6.umd.prod.js +1 -1
  43. package/dist/icon-set/ionicons-v4.umd.prod.js +1 -1
  44. package/dist/icon-set/line-awesome.umd.prod.js +1 -1
  45. package/dist/icon-set/material-icons-outlined.umd.prod.js +1 -1
  46. package/dist/icon-set/material-icons-round.umd.prod.js +1 -1
  47. package/dist/icon-set/material-icons-sharp.umd.prod.js +1 -1
  48. package/dist/icon-set/material-icons.umd.prod.js +1 -1
  49. package/dist/icon-set/material-symbols-outlined.umd.prod.js +6 -0
  50. package/dist/icon-set/material-symbols-rounded.umd.prod.js +6 -0
  51. package/dist/icon-set/material-symbols-sharp.umd.prod.js +6 -0
  52. package/dist/icon-set/mdi-v3.umd.prod.js +1 -1
  53. package/dist/icon-set/mdi-v4.umd.prod.js +1 -1
  54. package/dist/icon-set/mdi-v5.umd.prod.js +1 -1
  55. package/dist/icon-set/mdi-v6.umd.prod.js +1 -1
  56. package/dist/icon-set/svg-bootstrap-icons.umd.prod.js +1 -1
  57. package/dist/icon-set/svg-eva-icons.umd.prod.js +1 -1
  58. package/dist/icon-set/svg-fontawesome-v5.umd.prod.js +1 -1
  59. package/dist/icon-set/svg-fontawesome-v6.umd.prod.js +1 -1
  60. package/dist/icon-set/svg-ionicons-v4.umd.prod.js +1 -1
  61. package/dist/icon-set/svg-ionicons-v5.umd.prod.js +1 -1
  62. package/dist/icon-set/svg-ionicons-v6.umd.prod.js +1 -1
  63. package/dist/icon-set/svg-line-awesome.umd.prod.js +1 -1
  64. package/dist/icon-set/svg-material-icons-outlined.umd.prod.js +1 -1
  65. package/dist/icon-set/svg-material-icons-round.umd.prod.js +1 -1
  66. package/dist/icon-set/svg-material-icons-sharp.umd.prod.js +1 -1
  67. package/dist/icon-set/svg-material-icons.umd.prod.js +1 -1
  68. package/dist/icon-set/svg-material-symbols-outlined.umd.prod.js +6 -0
  69. package/dist/icon-set/svg-material-symbols-rounded.umd.prod.js +6 -0
  70. package/dist/icon-set/svg-material-symbols-sharp.umd.prod.js +6 -0
  71. package/dist/icon-set/svg-mdi-v6.umd.prod.js +1 -1
  72. package/dist/icon-set/svg-themify.umd.prod.js +1 -1
  73. package/dist/icon-set/themify.umd.prod.js +1 -1
  74. package/dist/lang/ar-TN.umd.prod.js +1 -1
  75. package/dist/lang/ar.umd.prod.js +1 -1
  76. package/dist/lang/az-Latn.umd.prod.js +1 -1
  77. package/dist/lang/bg.umd.prod.js +1 -1
  78. package/dist/lang/bn.umd.prod.js +1 -1
  79. package/dist/lang/ca.umd.prod.js +1 -1
  80. package/dist/lang/cs.umd.prod.js +1 -1
  81. package/dist/lang/da.umd.prod.js +1 -1
  82. package/dist/lang/de.umd.prod.js +1 -1
  83. package/dist/lang/el.umd.prod.js +1 -1
  84. package/dist/lang/en-GB.umd.prod.js +1 -1
  85. package/dist/lang/en-US.umd.prod.js +1 -1
  86. package/dist/lang/eo.umd.prod.js +1 -1
  87. package/dist/lang/es.umd.prod.js +2 -2
  88. package/dist/lang/et.umd.prod.js +1 -1
  89. package/dist/lang/eu.umd.prod.js +1 -1
  90. package/dist/lang/fa-IR.umd.prod.js +1 -1
  91. package/dist/lang/fa.umd.prod.js +1 -1
  92. package/dist/lang/fi.umd.prod.js +1 -1
  93. package/dist/lang/fr.umd.prod.js +1 -1
  94. package/dist/lang/gn.umd.prod.js +1 -1
  95. package/dist/lang/he.umd.prod.js +1 -1
  96. package/dist/lang/hr.umd.prod.js +1 -1
  97. package/dist/lang/hu.umd.prod.js +1 -1
  98. package/dist/lang/id.umd.prod.js +1 -1
  99. package/dist/lang/is.umd.prod.js +1 -1
  100. package/dist/lang/it.umd.prod.js +1 -1
  101. package/dist/lang/ja.umd.prod.js +1 -1
  102. package/dist/lang/km.umd.prod.js +1 -1
  103. package/dist/lang/ko-KR.umd.prod.js +1 -1
  104. package/dist/lang/kur-CKB.umd.prod.js +1 -1
  105. package/dist/lang/kz.umd.prod.js +1 -1
  106. package/dist/lang/lt.umd.prod.js +1 -1
  107. package/dist/lang/lu.umd.prod.js +1 -1
  108. package/dist/lang/lv.umd.prod.js +1 -1
  109. package/dist/lang/ml.umd.prod.js +1 -1
  110. package/dist/lang/mm.umd.prod.js +6 -0
  111. package/dist/lang/ms.umd.prod.js +1 -1
  112. package/dist/lang/my.umd.prod.js +1 -1
  113. package/dist/lang/nb-NO.umd.prod.js +1 -1
  114. package/dist/lang/nl.umd.prod.js +1 -1
  115. package/dist/lang/pl.umd.prod.js +1 -1
  116. package/dist/lang/pt-BR.umd.prod.js +1 -1
  117. package/dist/lang/pt.umd.prod.js +1 -1
  118. package/dist/lang/ro.umd.prod.js +1 -1
  119. package/dist/lang/ru.umd.prod.js +1 -1
  120. package/dist/lang/sk.umd.prod.js +1 -1
  121. package/dist/lang/sl.umd.prod.js +1 -1
  122. package/dist/lang/sr-CYR.umd.prod.js +1 -1
  123. package/dist/lang/sr.umd.prod.js +1 -1
  124. package/dist/lang/sv.umd.prod.js +1 -1
  125. package/dist/lang/ta.umd.prod.js +1 -1
  126. package/dist/lang/th.umd.prod.js +1 -1
  127. package/dist/lang/tr.umd.prod.js +1 -1
  128. package/dist/lang/ug.umd.prod.js +1 -1
  129. package/dist/lang/uk.umd.prod.js +1 -1
  130. package/dist/lang/vi.umd.prod.js +1 -1
  131. package/dist/lang/zh-CN.umd.prod.js +1 -1
  132. package/dist/lang/zh-TW.umd.prod.js +1 -1
  133. package/dist/quasar.addon.rtl.css +251 -0
  134. package/dist/quasar.cjs.prod.js +2 -2
  135. package/dist/quasar.css +11 -10
  136. package/dist/quasar.esm.prod.js +2 -2
  137. package/dist/quasar.prod.css +1 -1
  138. package/dist/quasar.rtl.css +1237 -16
  139. package/dist/quasar.rtl.prod.css +1 -1
  140. package/dist/quasar.sass +11 -10
  141. package/dist/quasar.umd.js +223 -135
  142. package/dist/quasar.umd.prod.js +2 -2
  143. package/dist/types/api/quploader.d.ts +7 -7
  144. package/dist/types/api/validation.d.ts +1 -1
  145. package/dist/types/extras/icon-set.d.ts +6 -0
  146. package/dist/types/index.d.ts +298 -255
  147. package/dist/types/utils/dom.d.ts +1 -1
  148. package/dist/types/utils.d.ts +11 -0
  149. package/dist/vetur/quasar-attributes.json +16 -0
  150. package/dist/vetur/quasar-tags.json +5 -1
  151. package/dist/web-types/web-types.json +48 -8
  152. package/icon-set/material-symbols-outlined.js +133 -0
  153. package/icon-set/material-symbols-outlined.mjs +128 -0
  154. package/icon-set/material-symbols-rounded.js +133 -0
  155. package/icon-set/material-symbols-rounded.mjs +128 -0
  156. package/icon-set/material-symbols-sharp.js +133 -0
  157. package/icon-set/material-symbols-sharp.mjs +128 -0
  158. package/icon-set/svg-material-symbols-outlined.js +201 -0
  159. package/icon-set/svg-material-symbols-outlined.mjs +201 -0
  160. package/icon-set/svg-material-symbols-rounded.js +201 -0
  161. package/icon-set/svg-material-symbols-rounded.mjs +201 -0
  162. package/icon-set/svg-material-symbols-sharp.js +201 -0
  163. package/icon-set/svg-material-symbols-sharp.mjs +201 -0
  164. package/lang/es.js +1 -1
  165. package/lang/es.mjs +1 -1
  166. package/lang/index.json +4 -0
  167. package/lang/mm.js +96 -0
  168. package/lang/mm.mjs +91 -0
  169. package/package.json +9 -11
  170. package/src/api.extends.json +1 -0
  171. package/src/components/avatar/__tests__/QAvatar.spec.js +1 -1
  172. package/src/components/badge/QBadge.js +2 -2
  173. package/src/components/badge/__tests__/QBadge.spec.js +1 -1
  174. package/src/components/btn/QBtn.js +2 -2
  175. package/src/components/btn/use-btn.json +1 -1
  176. package/src/components/checkbox/use-checkbox.js +8 -7
  177. package/src/components/dialog/QDialog.js +4 -4
  178. package/src/components/dialog/QDialog.sass +2 -2
  179. package/src/components/editor/QEditor.js +21 -29
  180. package/src/components/icon/QIcon.js +25 -2
  181. package/src/components/icon/QIcon.sass +4 -1
  182. package/src/components/img/QImg.js +5 -0
  183. package/src/components/img/QImg.json +19 -1
  184. package/src/components/infinite-scroll/QInfiniteScroll.js +10 -10
  185. package/src/components/input/QInput.js +6 -1
  186. package/src/components/item/QItem.js +5 -2
  187. package/src/components/item/QItem.json +2 -1
  188. package/src/components/layout/QLayout.js +2 -1
  189. package/src/components/menu/QMenu.js +2 -1
  190. package/src/components/radio/QRadio.js +2 -2
  191. package/src/components/select/QSelect.js +2 -2
  192. package/src/components/slider/use-slider.js +1 -1
  193. package/src/components/table/QTable.js +1 -1
  194. package/src/components/table/QTable.json +3 -0
  195. package/src/components/tabs/QTabs.sass +0 -6
  196. package/src/components/tooltip/QTooltip.js +2 -1
  197. package/src/components/tree/QTree.sass +1 -1
  198. package/src/components/uploader/uploader-core.js +22 -18
  199. package/src/components/video/QVideo.js +17 -1
  200. package/src/components/video/QVideo.json +36 -0
  201. package/src/components/virtual-scroll/QVirtualScroll.sass +4 -1
  202. package/src/components/virtual-scroll/use-virtual-scroll.js +21 -23
  203. package/src/composables/private/__tests__/use-model-toggle.spec.js +2 -2
  204. package/src/composables/private/__tests__/use-size.spec.js +2 -2
  205. package/src/composables/private/__tests__/use-validate.spec.js +1 -1
  206. package/src/composables/private/use-field.js +1 -0
  207. package/src/composables/private/use-key-composition.js +15 -8
  208. package/src/composables/private/use-portal.js +15 -2
  209. package/src/composables/private/use-router-link.json +1 -1
  210. package/src/history.js +2 -2
  211. package/src/utils/copy-to-clipboard.js +1 -1
  212. package/src/utils/patterns.js +8 -0
  213. package/src/utils/private/date-persian.js +0 -9
  214. package/src/utils/private/global-dialog.js +22 -10
  215. package/src/utils/private/position-engine.js +0 -5
  216. package/src/utils/private/sort.js +0 -11
  217. package/src/utils/private/web-storage.js +1 -1
  218. package/src/utils/uid.js +1 -1
@@ -1,7 +1,7 @@
1
1
  import { h, computed } from 'vue'
2
2
 
3
3
  import { createComponent } from '../../utils/private/create.js'
4
- import { hSlot } from '../../utils/private/render.js'
4
+ import { hMergeSlot } from '../../utils/private/render.js'
5
5
 
6
6
  const alignValues = [ 'top', 'middle', 'bottom' ]
7
7
 
@@ -55,6 +55,6 @@ export default createComponent({
55
55
  style: style.value,
56
56
  role: 'alert',
57
57
  'aria-label': props.label
58
- }, props.label !== void 0 ? props.label : hSlot(slots.default))
58
+ }, hMergeSlot(slots.default, props.label !== void 0 ? [ props.label ] : []))
59
59
  }
60
60
  })
@@ -1,5 +1,5 @@
1
1
  // import { mount } from '@cypress/vue'
2
- // import QBadge from '../QBadge'
2
+ // import QBadge from '../QBadge.js'
3
3
 
4
4
  // const snapshotOptions = { customSnapshotsDir: '../src/components/badge/__tests__' }
5
5
 
@@ -329,10 +329,10 @@ export default createComponent({
329
329
  if (props.loading === true && props.percentage !== void 0) {
330
330
  child.push(
331
331
  h('span', {
332
- class: 'q-btn__progress absolute-full overflow-hidden'
332
+ class: 'q-btn__progress absolute-full overflow-hidden' + (props.darkPercentage === true ? ' q-btn__progress--dark' : '')
333
333
  }, [
334
334
  h('span', {
335
- class: 'q-btn__progress-indicator fit block' + (props.darkPercentage === true ? ' q-btn__progress--dark' : ''),
335
+ class: 'q-btn__progress-indicator fit block',
336
336
  style: percentageStyle.value
337
337
  })
338
338
  ])
@@ -33,7 +33,7 @@
33
33
  "href": {
34
34
  "type": "String",
35
35
  "desc": "Native <a> link href attribute; Has priority over the 'to' and 'replace' props",
36
- "examples": [ "http://quasar.dev", "href=\"https://quasar.dev\" target=\"_blank\"" ],
36
+ "examples": [ "https://quasar.dev", "href=\"https://quasar.dev\" target=\"_blank\"" ],
37
37
  "category": "navigation",
38
38
  "addedIn": "v2.4"
39
39
  },
@@ -1,4 +1,4 @@
1
- import { h, ref, computed, getCurrentInstance } from 'vue'
1
+ import { h, ref, computed, getCurrentInstance, toRaw } from 'vue'
2
2
 
3
3
  import useDark, { useDarkProps } from '../../composables/private/use-dark.js'
4
4
  import useSize, { useSizeProps } from '../../composables/private/use-size.js'
@@ -61,22 +61,23 @@ export default function (type, getInner) {
61
61
  props.val !== void 0 && Array.isArray(props.modelValue)
62
62
  )
63
63
 
64
- const index = computed(() => (
65
- modelIsArray.value === true
66
- ? props.modelValue.indexOf(props.val)
64
+ const index = computed(() => {
65
+ const val = toRaw(props.val)
66
+ return modelIsArray.value === true
67
+ ? props.modelValue.findIndex(opt => toRaw(opt) === val)
67
68
  : -1
68
- ))
69
+ })
69
70
 
70
71
  const isTrue = computed(() => (
71
72
  modelIsArray.value === true
72
73
  ? index.value > -1
73
- : props.modelValue === props.trueValue
74
+ : toRaw(props.modelValue) === toRaw(props.trueValue)
74
75
  ))
75
76
 
76
77
  const isFalse = computed(() => (
77
78
  modelIsArray.value === true
78
79
  ? index.value === -1
79
- : props.modelValue === props.falseValue
80
+ : toRaw(props.modelValue) === toRaw(props.falseValue)
80
81
  ))
81
82
 
82
83
  const isIndeterminate = computed(() =>
@@ -96,7 +96,7 @@ export default createComponent({
96
96
  const { registerTimeout, removeTimeout } = useTimeout()
97
97
  const { registerTick, removeTick } = useTick()
98
98
 
99
- const { showPortal, hidePortal, portalIsActive, renderPortal } = usePortal(
99
+ const { showPortal, hidePortal, portalIsAccessible, renderPortal } = usePortal(
100
100
  vm, innerRef, renderPortalContent, /* pls do check if on a global dialog */ true
101
101
  )
102
102
 
@@ -235,6 +235,7 @@ export default createComponent({
235
235
  removeFromHistory()
236
236
  cleanup(true)
237
237
  animating.value = true
238
+ hidePortal()
238
239
 
239
240
  if (refocusTarget !== null) {
240
241
  refocusTarget.focus()
@@ -242,7 +243,7 @@ export default createComponent({
242
243
  }
243
244
 
244
245
  registerTimeout(() => {
245
- hidePortal()
246
+ hidePortal(true) // done hiding, now destroy
246
247
  animating.value = false
247
248
  emit('hide', evt)
248
249
  }, props.transitionDuration)
@@ -350,8 +351,7 @@ export default createComponent({
350
351
  function onFocusChange (evt) {
351
352
  // the focus is not in a vue child component
352
353
  if (
353
- showing.value === true
354
- && portalIsActive.value === true
354
+ portalIsAccessible.value === true
355
355
  && childHasFocus(innerRef.value, evt.target) !== true
356
356
  ) {
357
357
  focus('[tabindex]:not([tabindex="-1"])')
@@ -39,8 +39,8 @@
39
39
  max-height: 100vh
40
40
  max-width: 100vw
41
41
  border-radius: 0 !important
42
- top: 0px !important
43
- left: 0px !important
42
+ top: 0 !important
43
+ left: 0 !important
44
44
 
45
45
  &--top, &--bottom
46
46
  padding-top: 0 !important
@@ -1,4 +1,4 @@
1
- import { h, ref, computed, watch, onMounted, nextTick, getCurrentInstance } from 'vue'
1
+ import { h, ref, computed, watch, onMounted, onBeforeUnmount, nextTick, getCurrentInstance } from 'vue'
2
2
 
3
3
  import Caret from './editor-caret.js'
4
4
  import { getToolbar, getFonts, getLinkEditor } from './editor-utils.js'
@@ -368,11 +368,14 @@ export default createComponent({
368
368
  }
369
369
 
370
370
  function onFocusin (e) {
371
+ const root = rootRef.value
372
+
371
373
  if (
372
- rootRef.value.contains(e.target) === true
374
+ root !== null
375
+ && root.contains(e.target) === true
373
376
  && (
374
377
  e.relatedTarget === null
375
- || rootRef.value.contains(e.relatedTarget) !== true
378
+ || root.contains(e.relatedTarget) !== true
376
379
  )
377
380
  ) {
378
381
  const prop = `inner${ isViewingSource.value === true ? 'Text' : 'HTML' }`
@@ -382,11 +385,14 @@ export default createComponent({
382
385
  }
383
386
 
384
387
  function onFocusout (e) {
388
+ const root = rootRef.value
389
+
385
390
  if (
386
- rootRef.value.contains(e.target) === true
391
+ root !== null
392
+ && root.contains(e.target) === true
387
393
  && (
388
394
  e.relatedTarget === null
389
- || rootRef.value.contains(e.relatedTarget) !== true
395
+ || root.contains(e.relatedTarget) !== true
390
396
  )
391
397
  ) {
392
398
  eVm.caret.savePosition()
@@ -394,27 +400,12 @@ export default createComponent({
394
400
  }
395
401
  }
396
402
 
397
- function onMousedown () {
398
- offsetBottom = void 0
399
- }
400
-
401
- function onMouseup (e) {
402
- eVm.caret.save()
403
- emit('mouseup', e)
404
- }
405
-
406
- function onTouchstartPassive () {
403
+ function onPointerStart () {
407
404
  offsetBottom = void 0
408
405
  }
409
406
 
410
- function onKeyup (e) {
407
+ function onSelectionchange (e) {
411
408
  eVm.caret.save()
412
- emit('keyup', e)
413
- }
414
-
415
- function onTouchend (e) {
416
- eVm.caret.save()
417
- emit('touchend', e)
418
409
  }
419
410
 
420
411
  function setContent (v, restorePosition) {
@@ -471,6 +462,12 @@ export default createComponent({
471
462
  eVm.caret = proxy.caret = new Caret(contentRef.value, eVm)
472
463
  setContent(props.modelValue)
473
464
  refreshToolbar()
465
+
466
+ document.addEventListener('selectionchange', onSelectionchange)
467
+ })
468
+
469
+ onBeforeUnmount(() => {
470
+ document.removeEventListener('selectionchange', onSelectionchange)
474
471
  })
475
472
 
476
473
  return () => {
@@ -526,13 +523,8 @@ export default createComponent({
526
523
  onFocus,
527
524
 
528
525
  // clean saved scroll position
529
- onMousedown,
530
- onTouchstartPassive,
531
-
532
- // save caret
533
- onMouseup,
534
- onKeyup,
535
- onTouchend
526
+ onMousedown: onPointerStart,
527
+ onTouchstartPassive: onPointerStart
536
528
  })
537
529
  ])
538
530
  }
@@ -29,8 +29,15 @@ const matMap = {
29
29
  s_: '-sharp'
30
30
  }
31
31
 
32
+ const symMap = {
33
+ sym_o_: '-outlined',
34
+ sym_r_: '-rounded',
35
+ sym_s_: '-sharp'
36
+ }
37
+
32
38
  const libRE = new RegExp('^(' + Object.keys(libMap).join('|') + ')')
33
39
  const matRE = new RegExp('^(' + Object.keys(matMap).join('|') + ')')
40
+ const symRE = new RegExp('^(' + Object.keys(symMap).join('|') + ')')
34
41
  const mRE = /^[Mm]\s?[-+]?\.?\d/
35
42
  const imgRE = /^img:/
36
43
  const svgUseRE = /^svguse:/
@@ -133,7 +140,23 @@ export default createComponent({
133
140
  cls = icon
134
141
  }
135
142
  else if (ionRE.test(icon) === true) {
136
- cls = `ionicons ion-${ $q.platform.is.ios === true ? 'ios' : 'md' }${ icon.substr(3) }`
143
+ cls = `ionicons ion-${ $q.platform.is.ios === true ? 'ios' : 'md' }${ icon.substring(3) }`
144
+ }
145
+ else if (symRE.test(icon) === true) {
146
+ // "notranslate" class is for Google Translate
147
+ // to avoid tampering with Material Symbols ligature font
148
+ //
149
+ // Caution: To be able to add suffix to the class name,
150
+ // keep the 'material-symbols' at the end of the string.
151
+ cls = 'notranslate material-symbols'
152
+
153
+ const matches = icon.match(symRE)
154
+ if (matches !== null) {
155
+ icon = icon.substring(6)
156
+ cls += symMap[ matches[ 1 ] ]
157
+ }
158
+
159
+ content = icon
137
160
  }
138
161
  else {
139
162
  // "notranslate" class is for Google Translate
@@ -179,7 +202,7 @@ export default createComponent({
179
202
  if (type.value.svg === true) {
180
203
  return h('span', data, hMergeSlot(slots.default, [
181
204
  h('svg', {
182
- viewBox: type.value.viewBox
205
+ viewBox: type.value.viewBox || '0 0 24 24'
183
206
  }, type.value.nodes)
184
207
  ]))
185
208
  }
@@ -28,7 +28,10 @@
28
28
  .material-icons,
29
29
  .material-icons-outlined,
30
30
  .material-icons-round,
31
- .material-icons-sharp
31
+ .material-icons-sharp,
32
+ .material-symbols-outlined,
33
+ .material-symbols-rounded,
34
+ .material-symbols-sharp
32
35
  user-select: none
33
36
  cursor: inherit
34
37
  font-size: inherit
@@ -31,6 +31,10 @@ export default createComponent({
31
31
  type: String,
32
32
  default: 'lazy'
33
33
  },
34
+ fetchpriority: {
35
+ type: String,
36
+ default: 'auto'
37
+ },
34
38
  width: String,
35
39
  height: String,
36
40
  initialRatio: {
@@ -193,6 +197,7 @@ export default createComponent({
193
197
  height: props.height,
194
198
  width: props.width,
195
199
  loading: props.loading,
200
+ fetchpriority: props.fetchpriority,
196
201
  'aria-hidden': 'true',
197
202
  draggable: props.draggable,
198
203
  ...img
@@ -116,8 +116,26 @@
116
116
  "referrerpolicy": {
117
117
  "type": "String",
118
118
  "desc": "Same syntax as <img> referrerpolicy attribute",
119
+ "values": [
120
+ "no-referrer",
121
+ "no-referrer-when-downgrade",
122
+ "origin",
123
+ "origin-when-cross-origin",
124
+ "same-origin",
125
+ "strict-origin",
126
+ "strict-origin-when-cross-origin",
127
+ "unsafe-url"
128
+ ],
129
+ "category": "behavior"
130
+ },
131
+
132
+ "fetchpriority": {
133
+ "type": "String",
134
+ "desc": "Provides a hint of the relative priority to use when fetching the image",
135
+ "default": "auto",
136
+ "values": [ "high", "low", "auto" ],
119
137
  "category": "behavior",
120
- "__exemption": [ "examples" ]
138
+ "addedIn": "v2.6.6"
121
139
  },
122
140
 
123
141
  "fit": {
@@ -135,6 +135,16 @@ export default createComponent({
135
135
 
136
136
  if (isWorking.value === true) {
137
137
  localScrollTarget.addEventListener('scroll', poll, passive)
138
+
139
+ if (props.reverse === true) {
140
+ const
141
+ scrollHeight = getScrollHeight(localScrollTarget),
142
+ containerHeight = height(localScrollTarget)
143
+
144
+ setVerticalScrollPosition(localScrollTarget, scrollHeight - containerHeight)
145
+ }
146
+
147
+ immediatePoll()
138
148
  }
139
149
  }
140
150
 
@@ -205,16 +215,6 @@ export default createComponent({
205
215
  setDebounce(props.debounce)
206
216
 
207
217
  updateScrollTarget()
208
-
209
- if (props.reverse === true) {
210
- const
211
- scrollHeight = getScrollHeight(localScrollTarget),
212
- containerHeight = height(localScrollTarget)
213
-
214
- setVerticalScrollPosition(localScrollTarget, scrollHeight - containerHeight)
215
- }
216
-
217
- immediatePoll()
218
218
  })
219
219
 
220
220
  return () => {
@@ -208,7 +208,7 @@ export default createComponent({
208
208
  }
209
209
 
210
210
  function onInput (e) {
211
- if (!e || !e.target || e.target.composing === true) {
211
+ if (!e || !e.target || e.target.qComposing === true) {
212
212
  return
213
213
  }
214
214
 
@@ -253,6 +253,8 @@ export default createComponent({
253
253
  }
254
254
 
255
255
  if (props.modelValue !== val && emitCachedValue !== val) {
256
+ emitCachedValue = val
257
+
256
258
  stopWatcher === true && (stopValueWatcher = true)
257
259
  emit('update:modelValue', val)
258
260
 
@@ -284,13 +286,16 @@ export default createComponent({
284
286
  const inp = inputRef.value
285
287
  if (inp !== null) {
286
288
  const parentStyle = inp.parentNode.style
289
+ const { overflow } = inp.style
287
290
 
288
291
  // reset height of textarea to a small size to detect the real height
289
292
  // but keep the total control size the same
290
293
  parentStyle.marginBottom = (inp.scrollHeight - 1) + 'px'
291
294
  inp.style.height = '1px'
295
+ inp.style.overflow = 'hidden'
292
296
 
293
297
  inp.style.height = inp.scrollHeight + 'px'
298
+ inp.style.overflow = overflow
294
299
  parentStyle.marginBottom = ''
295
300
  }
296
301
  }
@@ -20,7 +20,10 @@ export default createComponent({
20
20
  default: 'div'
21
21
  },
22
22
 
23
- active: Boolean,
23
+ active: {
24
+ type: Boolean,
25
+ default: null
26
+ },
24
27
 
25
28
  clickable: Boolean,
26
29
  dense: Boolean,
@@ -58,7 +61,7 @@ export default createComponent({
58
61
  + (props.dense === true ? ' q-item--dense' : '')
59
62
  + (isDark.value === true ? ' q-item--dark' : '')
60
63
  + (
61
- hasLink.value === true
64
+ hasLink.value === true && props.active === null
62
65
  ? linkClass.value
63
66
  : (
64
67
  props.active === true
@@ -9,7 +9,8 @@
9
9
  "active": {
10
10
  "type": "Boolean",
11
11
  "desc": "Put item into 'active' state",
12
- "category": "state"
12
+ "category": "state",
13
+ "default": null
13
14
  },
14
15
 
15
16
  "dark": {
@@ -231,7 +231,8 @@ export default createComponent({
231
231
  const layout = h('div', {
232
232
  class: classes.value,
233
233
  style: style.value,
234
- ref: props.container === true ? void 0 : rootRef
234
+ ref: props.container === true ? void 0 : rootRef,
235
+ tabindex: -1
235
236
  }, content)
236
237
 
237
238
  if (props.container === true) {
@@ -244,6 +244,7 @@ export default createComponent({
244
244
  function handleHide (evt) {
245
245
  removeTick()
246
246
  removeTimeout()
247
+ hidePortal()
247
248
 
248
249
  anchorCleanup(true)
249
250
 
@@ -261,7 +262,7 @@ export default createComponent({
261
262
  }
262
263
 
263
264
  registerTimeout(() => {
264
- hidePortal()
265
+ hidePortal(true) // done hiding, now destroy
265
266
  emit('hide', evt)
266
267
  }, props.transitionDuration)
267
268
  }
@@ -1,4 +1,4 @@
1
- import { h, ref, computed, getCurrentInstance } from 'vue'
1
+ import { h, ref, computed, getCurrentInstance, toRaw } from 'vue'
2
2
 
3
3
  import QIcon from '../icon/QIcon.js'
4
4
 
@@ -64,7 +64,7 @@ export default createComponent({
64
64
  const rootRef = ref(null)
65
65
  const { refocusTargetEl, refocusTarget } = useRefocusTarget(props, rootRef)
66
66
 
67
- const isTrue = computed(() => props.modelValue === props.val)
67
+ const isTrue = computed(() => toRaw(props.modelValue) === toRaw(props.val))
68
68
 
69
69
  const classes = computed(() =>
70
70
  'q-radio cursor-pointer no-outline row inline no-wrap items-center'
@@ -165,7 +165,7 @@ export default createComponent({
165
165
 
166
166
  const virtualScrollItemSizeComputed = computed(() => (
167
167
  props.virtualScrollItemSize === void 0
168
- ? (props.dense === true ? 24 : 48)
168
+ ? (props.optionsDense === true ? 24 : 48)
169
169
  : props.virtualScrollItemSize
170
170
  ))
171
171
 
@@ -1013,7 +1013,7 @@ export default createComponent({
1013
1013
  function onInput (e) {
1014
1014
  clearTimeout(inputTimer)
1015
1015
 
1016
- if (e && e.target && e.target.composing === true) {
1016
+ if (e && e.target && e.target.qComposing === true) {
1017
1017
  return
1018
1018
  }
1019
1019
 
@@ -129,7 +129,7 @@ export default function ({ updateValue, updatePosition, getDragging, formAttrs }
129
129
  && innerMin.value < innerMax.value
130
130
  ))
131
131
 
132
- const decimals = computed(() => (String(props.step).trim('0').split('.')[ 1 ] || '').length)
132
+ const decimals = computed(() => (String(props.step).trim().split('.')[ 1 ] || '').length)
133
133
  const step = computed(() => (props.step === 0 ? 1 : props.step))
134
134
  const tabindex = computed(() => (editable.value === true ? props.tabindex || 0 : -1))
135
135
 
@@ -978,7 +978,7 @@ export default createComponent({
978
978
 
979
979
  return h('div', {
980
980
  class: 'q-table__grid-item col-xs-12 col-sm-6 col-md-4 col-lg-3'
981
- + (scope.selected === true ? 'q-table__grid-item--selected' : '')
981
+ + (scope.selected === true ? ' q-table__grid-item--selected' : '')
982
982
  }, [
983
983
  h('div', data, child)
984
984
  ])
@@ -676,6 +676,7 @@
676
676
  "examples": [ 100, 200 ]
677
677
  }
678
678
  },
679
+ "syncable": true,
679
680
  "examples": [
680
681
  ":pagination=\"myInitialPagination\"",
681
682
  "v-model:pagination=\"myPagination\""
@@ -706,6 +707,7 @@
706
707
  "type": "Array",
707
708
  "desc": "Keeps the user selection array",
708
709
  "default": "[]",
710
+ "syncable": true,
709
711
  "examples": [
710
712
  "v-model:selected=\"selection\""
711
713
  ],
@@ -716,6 +718,7 @@
716
718
  "type": "Array",
717
719
  "desc": "Keeps the array with expanded rows keys",
718
720
  "default": "[]",
721
+ "syncable": true,
719
722
  "examples": [
720
723
  "v-model:expanded=\"expanded\""
721
724
  ],
@@ -181,9 +181,3 @@
181
181
  min-height: 36px
182
182
  &--full
183
183
  min-height: 52px
184
-
185
-
186
- @media (min-width: $breakpoint-lg-min)
187
- .q-header, .q-footer
188
- .q-tab__content
189
- min-width: 128px
@@ -175,11 +175,12 @@ export default createComponent({
175
175
  function handleHide (evt) {
176
176
  removeTick()
177
177
  removeTimeout()
178
+ hidePortal()
178
179
 
179
180
  anchorCleanup()
180
181
 
181
182
  registerTimeout(() => {
182
- hidePortal()
183
+ hidePortal(true) // done hiding, now destroy
183
184
  emit('hide', evt)
184
185
  }, props.transitionDuration)
185
186
  }
@@ -101,10 +101,10 @@
101
101
  &__arrow,
102
102
  &__spinner
103
103
  font-size: 16px
104
+ margin-right: 4px
104
105
 
105
106
  &__arrow
106
107
  transition: transform .3s
107
- margin-right: 4px
108
108
 
109
109
  &--rotate
110
110
  transform: rotate3d(0, 0, 1, 90deg)
@@ -339,28 +339,32 @@ export function getRenderer (getPlugin) {
339
339
 
340
340
  return [
341
341
  h('div', {
342
- class: 'q-uploader__header-content flex flex-center no-wrap q-gutter-xs'
342
+ class: 'q-uploader__header-content column'
343
343
  }, [
344
- getBtn(state.queuedFiles.value.length > 0, 'removeQueue', removeQueuedFiles),
345
- getBtn(state.uploadedFiles.value.length > 0, 'removeUploaded', removeUploadedFiles),
346
-
347
- state.isUploading.value === true
348
- ? h(QSpinner, { class: 'q-uploader__spinner' })
349
- : null,
350
-
351
- h('div', { class: 'col column justify-center' }, [
352
- props.label !== void 0
353
- ? h('div', { class: 'q-uploader__title' }, [ props.label ])
344
+ h('div', {
345
+ class: 'flex flex-center no-wrap q-gutter-xs'
346
+ }, [
347
+ getBtn(state.queuedFiles.value.length > 0, 'removeQueue', removeQueuedFiles),
348
+ getBtn(state.uploadedFiles.value.length > 0, 'removeUploaded', removeUploadedFiles),
349
+
350
+ state.isUploading.value === true
351
+ ? h(QSpinner, { class: 'q-uploader__spinner' })
354
352
  : null,
355
353
 
356
- h('div', { class: 'q-uploader__subtitle' }, [
357
- uploadSizeLabel.value + ' / ' + uploadProgressLabel.value
358
- ])
359
- ]),
354
+ h('div', { class: 'col column justify-center' }, [
355
+ props.label !== void 0
356
+ ? h('div', { class: 'q-uploader__title' }, [ props.label ])
357
+ : null,
358
+
359
+ h('div', { class: 'q-uploader__subtitle' }, [
360
+ uploadSizeLabel.value + ' / ' + uploadProgressLabel.value
361
+ ])
362
+ ]),
360
363
 
361
- getBtn(canAddFiles.value, 'add'),
362
- getBtn(props.hideUploadBtn === false && canUpload.value === true, 'upload', state.upload),
363
- getBtn(state.isUploading.value, 'clear', state.abort)
364
+ getBtn(canAddFiles.value, 'add'),
365
+ getBtn(props.hideUploadBtn === false && canUpload.value === true, 'upload', state.upload),
366
+ getBtn(state.isUploading.value, 'clear', state.abort)
367
+ ])
364
368
  ])
365
369
  ]
366
370
  }