quasar 2.10.1 → 2.10.2

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 (138) hide show
  1. package/dist/api/Dialog.json +3 -1
  2. package/dist/api/QPopupProxy.json +21 -0
  3. package/dist/icon-set/bootstrap-icons.umd.prod.js +1 -1
  4. package/dist/icon-set/eva-icons.umd.prod.js +1 -1
  5. package/dist/icon-set/fontawesome-v5-pro.umd.prod.js +1 -1
  6. package/dist/icon-set/fontawesome-v5.umd.prod.js +1 -1
  7. package/dist/icon-set/fontawesome-v6-pro.umd.prod.js +1 -1
  8. package/dist/icon-set/fontawesome-v6.umd.prod.js +1 -1
  9. package/dist/icon-set/ionicons-v4.umd.prod.js +1 -1
  10. package/dist/icon-set/line-awesome.umd.prod.js +1 -1
  11. package/dist/icon-set/material-icons-outlined.umd.prod.js +1 -1
  12. package/dist/icon-set/material-icons-round.umd.prod.js +1 -1
  13. package/dist/icon-set/material-icons-sharp.umd.prod.js +1 -1
  14. package/dist/icon-set/material-icons.umd.prod.js +1 -1
  15. package/dist/icon-set/material-symbols-outlined.umd.prod.js +1 -1
  16. package/dist/icon-set/material-symbols-rounded.umd.prod.js +1 -1
  17. package/dist/icon-set/material-symbols-sharp.umd.prod.js +1 -1
  18. package/dist/icon-set/mdi-v3.umd.prod.js +1 -1
  19. package/dist/icon-set/mdi-v4.umd.prod.js +1 -1
  20. package/dist/icon-set/mdi-v5.umd.prod.js +1 -1
  21. package/dist/icon-set/mdi-v6.umd.prod.js +1 -1
  22. package/dist/icon-set/mdi-v7.umd.prod.js +6 -0
  23. package/dist/icon-set/svg-bootstrap-icons.umd.prod.js +1 -1
  24. package/dist/icon-set/svg-eva-icons.umd.prod.js +1 -1
  25. package/dist/icon-set/svg-fontawesome-v5.umd.prod.js +1 -1
  26. package/dist/icon-set/svg-fontawesome-v6.umd.prod.js +1 -1
  27. package/dist/icon-set/svg-ionicons-v4.umd.prod.js +1 -1
  28. package/dist/icon-set/svg-ionicons-v5.umd.prod.js +1 -1
  29. package/dist/icon-set/svg-ionicons-v6.umd.prod.js +1 -1
  30. package/dist/icon-set/svg-line-awesome.umd.prod.js +1 -1
  31. package/dist/icon-set/svg-material-icons-outlined.umd.prod.js +1 -1
  32. package/dist/icon-set/svg-material-icons-round.umd.prod.js +1 -1
  33. package/dist/icon-set/svg-material-icons-sharp.umd.prod.js +1 -1
  34. package/dist/icon-set/svg-material-icons.umd.prod.js +1 -1
  35. package/dist/icon-set/svg-material-symbols-outlined.umd.prod.js +1 -1
  36. package/dist/icon-set/svg-material-symbols-rounded.umd.prod.js +1 -1
  37. package/dist/icon-set/svg-material-symbols-sharp.umd.prod.js +1 -1
  38. package/dist/icon-set/svg-mdi-v6.umd.prod.js +1 -1
  39. package/dist/icon-set/svg-mdi-v7.umd.prod.js +6 -0
  40. package/dist/icon-set/svg-themify.umd.prod.js +1 -1
  41. package/dist/icon-set/themify.umd.prod.js +1 -1
  42. package/dist/lang/ar-TN.umd.prod.js +1 -1
  43. package/dist/lang/ar.umd.prod.js +1 -1
  44. package/dist/lang/az-Latn.umd.prod.js +1 -1
  45. package/dist/lang/bg.umd.prod.js +1 -1
  46. package/dist/lang/bn.umd.prod.js +1 -1
  47. package/dist/lang/ca.umd.prod.js +1 -1
  48. package/dist/lang/cs.umd.prod.js +1 -1
  49. package/dist/lang/da.umd.prod.js +1 -1
  50. package/dist/lang/de.umd.prod.js +1 -1
  51. package/dist/lang/el.umd.prod.js +1 -1
  52. package/dist/lang/en-GB.umd.prod.js +1 -1
  53. package/dist/lang/en-US.umd.prod.js +1 -1
  54. package/dist/lang/eo.umd.prod.js +1 -1
  55. package/dist/lang/es.umd.prod.js +1 -1
  56. package/dist/lang/et.umd.prod.js +1 -1
  57. package/dist/lang/eu.umd.prod.js +1 -1
  58. package/dist/lang/fa-IR.umd.prod.js +1 -1
  59. package/dist/lang/fa.umd.prod.js +1 -1
  60. package/dist/lang/fi.umd.prod.js +1 -1
  61. package/dist/lang/fr.umd.prod.js +1 -1
  62. package/dist/lang/gn.umd.prod.js +1 -1
  63. package/dist/lang/he.umd.prod.js +1 -1
  64. package/dist/lang/hr.umd.prod.js +1 -1
  65. package/dist/lang/hu.umd.prod.js +1 -1
  66. package/dist/lang/id.umd.prod.js +1 -1
  67. package/dist/lang/is.umd.prod.js +1 -1
  68. package/dist/lang/it.umd.prod.js +1 -1
  69. package/dist/lang/ja.umd.prod.js +1 -1
  70. package/dist/lang/km.umd.prod.js +1 -1
  71. package/dist/lang/ko-KR.umd.prod.js +1 -1
  72. package/dist/lang/kur-CKB.umd.prod.js +1 -1
  73. package/dist/lang/kz.umd.prod.js +1 -1
  74. package/dist/lang/lt.umd.prod.js +1 -1
  75. package/dist/lang/lu.umd.prod.js +1 -1
  76. package/dist/lang/lv.umd.prod.js +1 -1
  77. package/dist/lang/ml.umd.prod.js +1 -1
  78. package/dist/lang/mm.umd.prod.js +1 -1
  79. package/dist/lang/ms.umd.prod.js +1 -1
  80. package/dist/lang/my.umd.prod.js +1 -1
  81. package/dist/lang/nb-NO.umd.prod.js +1 -1
  82. package/dist/lang/nl.umd.prod.js +1 -1
  83. package/dist/lang/pl.umd.prod.js +1 -1
  84. package/dist/lang/pt-BR.umd.prod.js +1 -1
  85. package/dist/lang/pt.umd.prod.js +1 -1
  86. package/dist/lang/ro.umd.prod.js +1 -1
  87. package/dist/lang/ru.umd.prod.js +1 -1
  88. package/dist/lang/sk.umd.prod.js +1 -1
  89. package/dist/lang/sl.umd.prod.js +1 -1
  90. package/dist/lang/sm.umd.prod.js +1 -1
  91. package/dist/lang/sr-CYR.umd.prod.js +1 -1
  92. package/dist/lang/sr.umd.prod.js +1 -1
  93. package/dist/lang/sv.umd.prod.js +1 -1
  94. package/dist/lang/ta.umd.prod.js +1 -1
  95. package/dist/lang/th.umd.prod.js +1 -1
  96. package/dist/lang/tr.umd.prod.js +1 -1
  97. package/dist/lang/ug.umd.prod.js +1 -1
  98. package/dist/lang/uk.umd.prod.js +1 -1
  99. package/dist/lang/uz-Cyrl.umd.prod.js +1 -1
  100. package/dist/lang/uz-Latn.umd.prod.js +1 -1
  101. package/dist/lang/vi.umd.prod.js +1 -1
  102. package/dist/lang/zh-CN.umd.prod.js +1 -1
  103. package/dist/lang/zh-TW.umd.prod.js +1 -1
  104. package/dist/quasar.cjs.prod.js +2 -2
  105. package/dist/quasar.css +1 -1
  106. package/dist/quasar.esm.js +82 -59
  107. package/dist/quasar.esm.prod.js +2 -2
  108. package/dist/quasar.prod.css +1 -1
  109. package/dist/quasar.rtl.css +8 -1
  110. package/dist/quasar.rtl.prod.css +1 -1
  111. package/dist/quasar.sass +3 -2
  112. package/dist/quasar.umd.js +81 -58
  113. package/dist/quasar.umd.prod.js +2 -2
  114. package/dist/types/api/dialog.d.ts +101 -0
  115. package/dist/types/api/qpopupproxy.d.ts +3 -0
  116. package/dist/types/api.d.ts +2 -0
  117. package/dist/types/index.d.ts +18 -54
  118. package/dist/web-types/web-types.json +1 -1
  119. package/icon-set/mdi-v7.js +146 -0
  120. package/icon-set/mdi-v7.mjs +141 -0
  121. package/icon-set/svg-mdi-v7.js +224 -0
  122. package/icon-set/svg-mdi-v7.mjs +224 -0
  123. package/package.json +2 -2
  124. package/src/components/btn-dropdown/QBtnDropdown.js +0 -1
  125. package/src/components/date/QDate.js +3 -1
  126. package/src/components/dialog/QDialog.js +7 -4
  127. package/src/components/expansion-item/QExpansionItem.js +0 -1
  128. package/src/components/fab/QFab.js +3 -6
  129. package/src/components/fab/QFab.sass +2 -1
  130. package/src/components/img/QImg.js +20 -19
  131. package/src/components/input/QInput.js +8 -2
  132. package/src/components/input/use-mask.js +2 -0
  133. package/src/components/item/QList.js +1 -1
  134. package/src/components/menu/QMenu.js +4 -1
  135. package/src/components/popup-proxy/QPopupProxy.js +6 -0
  136. package/src/components/popup-proxy/QPopupProxy.json +19 -0
  137. package/src/components/select/QSelect.js +26 -21
  138. package/src/plugins/Dialog.json +3 -1
@@ -258,7 +258,10 @@ export default createComponent({
258
258
  || evt.qClickOutside !== true
259
259
  )
260
260
  ) {
261
- refocusTarget.focus()
261
+ ((evt && evt.type.indexOf('key') === 0
262
+ ? refocusTarget.closest('[tabindex]:not([tabindex^="-"])')
263
+ : void 0
264
+ ) || refocusTarget).focus()
262
265
  refocusTarget = null
263
266
  }
264
267
 
@@ -6,6 +6,7 @@ import QMenu from '../menu/QMenu.js'
6
6
  import useAnchor, { useAnchorProps } from '../../composables/private/use-anchor.js'
7
7
 
8
8
  import { createComponent } from '../../utils/private/create.js'
9
+ import { injectProp } from '../../utils/private/inject-obj-prop.js'
9
10
 
10
11
  export default createComponent({
11
12
  name: 'QPopupProxy',
@@ -67,6 +68,11 @@ export default createComponent({
67
68
  toggle (evt) { popupRef.value.toggle(evt) }
68
69
  })
69
70
 
71
+ injectProp(proxy, 'currentComponent', () => ({
72
+ type: type.value,
73
+ ref: popupRef.value
74
+ }))
75
+
70
76
  return () => {
71
77
  const data = {
72
78
  ref: popupRef,
@@ -61,5 +61,24 @@
61
61
  "toggle": {
62
62
  "extends": "toggle"
63
63
  }
64
+ },
65
+
66
+ "computedProps": {
67
+ "currentComponent": {
68
+ "type": "Object",
69
+ "desc": "Access current underlying component (QMenu or QDialog)",
70
+ "definition": {
71
+ "type": {
72
+ "type": "String",
73
+ "desc": "Component type",
74
+ "values": [ "dialog", "menu" ]
75
+ },
76
+ "ref": {
77
+ "type": "Component",
78
+ "tsType": "QPopupProxyInnerComponent",
79
+ "desc": "The actual component (QMenu or QDialog); Access it directly, without '.value'"
80
+ }
81
+ }
82
+ }
64
83
  }
65
84
  }
@@ -251,6 +251,11 @@ export default createComponent({
251
251
  .join(', ')
252
252
  )
253
253
 
254
+ const ariaCurrentValue = computed(() => (props.displayValue !== void 0
255
+ ? props.displayValue
256
+ : selectedString.value
257
+ ))
258
+
254
259
  const needsHtmlFn = computed(() => (
255
260
  props.optionsHtml === true
256
261
  ? () => true
@@ -268,22 +273,15 @@ export default createComponent({
268
273
 
269
274
  const tabindex = computed(() => (state.focused.value === true ? props.tabindex : -1))
270
275
 
271
- const comboboxAttrs = computed(() => ({
272
- tabindex: props.tabindex,
273
- role: 'combobox',
274
- 'aria-label': props.label,
275
- 'aria-readonly': props.readonly === true ? 'true' : 'false',
276
- 'aria-autocomplete': props.useInput === true ? 'list' : 'none',
277
- 'aria-expanded': menu.value === true ? 'true' : 'false',
278
- 'aria-owns': `${ state.targetUid.value }_lb`,
279
- 'aria-controls': `${ state.targetUid.value }_lb`
280
- }))
281
-
282
- const listboxAttrs = computed(() => {
276
+ const comboboxAttrs = computed(() => {
283
277
  const attrs = {
284
- id: `${ state.targetUid.value }_lb`,
285
- role: 'listbox',
286
- 'aria-multiselectable': props.multiple === true ? 'true' : 'false'
278
+ tabindex: props.tabindex,
279
+ role: 'combobox',
280
+ 'aria-label': props.label,
281
+ 'aria-readonly': props.readonly === true ? 'true' : 'false',
282
+ 'aria-autocomplete': props.useInput === true ? 'list' : 'none',
283
+ 'aria-expanded': menu.value === true ? 'true' : 'false',
284
+ 'aria-controls': `${ state.targetUid.value }_lb`
287
285
  }
288
286
 
289
287
  if (optionIndex.value >= 0) {
@@ -293,6 +291,12 @@ export default createComponent({
293
291
  return attrs
294
292
  })
295
293
 
294
+ const listboxAttrs = computed(() => ({
295
+ id: `${ state.targetUid.value }_lb`,
296
+ role: 'listbox',
297
+ 'aria-multiselectable': props.multiple === true ? 'true' : 'false'
298
+ }))
299
+
296
300
  const selectedScope = computed(() => {
297
301
  return innerValue.value.map((opt, i) => ({
298
302
  index: i,
@@ -788,7 +792,9 @@ export default createComponent({
788
792
  && props.useInput !== true
789
793
  && e.key !== void 0
790
794
  && e.key.length === 1 // printable char
791
- && e.altKey === e.ctrlKey // not kbd shortcut
795
+ && e.altKey === false // not kbd shortcut
796
+ && e.ctrlKey === false // not kbd shortcut
797
+ && e.metaKey === false // not kbd shortcut, especially on macOS with Command key
792
798
  && (e.keyCode !== 32 || searchBuffer.length > 0) // space in middle of search
793
799
  ) {
794
800
  menu.value !== true && showPopup(e)
@@ -935,9 +941,7 @@ export default createComponent({
935
941
 
936
942
  return [
937
943
  h('span', {
938
- [ valueAsHtml.value === true ? 'innerHTML' : 'textContent' ]: props.displayValue !== void 0
939
- ? props.displayValue
940
- : selectedString.value
944
+ [ valueAsHtml.value === true ? 'innerHTML' : 'textContent' ]: ariaCurrentValue.value
941
945
  })
942
946
  ]
943
947
  }
@@ -992,7 +996,7 @@ export default createComponent({
992
996
  id: isTarget === true ? state.targetUid.value : void 0,
993
997
  maxlength: props.maxlength,
994
998
  autocomplete: props.autocomplete,
995
- 'data-autofocus': (fromDialog !== true && props.autofocus === true) || void 0,
999
+ 'data-autofocus': fromDialog === true || props.autofocus === true || void 0,
996
1000
  disabled: props.disable === true,
997
1001
  readonly: props.readonly === true,
998
1002
  ...inputControlEvents.value
@@ -1492,8 +1496,9 @@ export default createComponent({
1492
1496
  key: 'd_t',
1493
1497
  class: 'q-select__focus-target',
1494
1498
  id: isTarget === true ? state.targetUid.value : void 0,
1499
+ value: ariaCurrentValue.value,
1495
1500
  readonly: true,
1496
- 'data-autofocus': (fromDialog !== true && props.autofocus === true) || void 0,
1501
+ 'data-autofocus': fromDialog === true || props.autofocus === true || void 0,
1497
1502
  ...attrs,
1498
1503
  onKeydown: onTargetKeydown,
1499
1504
  onKeyup: onTargetKeyup,
@@ -42,6 +42,7 @@
42
42
 
43
43
  "prompt": {
44
44
  "type": "Object",
45
+ "tsType": "QDialogInputPrompt",
45
46
  "desc": "An object definition of the input field for the prompting question.",
46
47
  "examples": [ "prompt: { model: this.promptVal, type: 'number' }" ],
47
48
  "definition": {
@@ -95,6 +96,7 @@
95
96
 
96
97
  "options": {
97
98
  "type": "Object",
99
+ "tsType": "QDialogSelectionPrompt",
98
100
  "desc": "An object definition for creating the selection form content",
99
101
  "examples": [ "{ model: this.dialogSelection, type: 'radio', items: [...listOfItems] }" ],
100
102
  "definition": {
@@ -114,7 +116,7 @@
114
116
 
115
117
  "items": {
116
118
  "type": "Array",
117
- "desc": "The list of options to interact with; Equivalent to options prop of the QOptionsGroup component",
119
+ "desc": "The list of options to interact with; Equivalent to options prop of the QOptionGroup component",
118
120
  "examples": [
119
121
  "[ { label: 'Option 1', value: 'op1' }, { label: 'Option 2', value: 'op2' }, { label: 'Option 3', value: 'op3' } ]"
120
122
  ]