quasar 2.4.11 → 2.5.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 (216) hide show
  1. package/dist/api/BottomSheet.json +4 -0
  2. package/dist/api/Dialog.json +5 -1
  3. package/dist/api/Notify.json +20 -10
  4. package/dist/api/QBtnDropdown.json +4 -2
  5. package/dist/api/QCheckbox.json +27 -0
  6. package/dist/api/QEditor.json +4 -2
  7. package/dist/api/QExpansionItem.json +6 -3
  8. package/dist/api/QFab.json +4 -2
  9. package/dist/api/QFabAction.json +4 -2
  10. package/dist/api/QFile.json +4 -2
  11. package/dist/api/QImg.json +1 -2
  12. package/dist/api/QInnerLoading.json +2 -1
  13. package/dist/api/QInput.json +4 -2
  14. package/dist/api/QPagination.json +4 -2
  15. package/dist/api/QRadio.json +18 -0
  16. package/dist/api/QRange.json +9 -0
  17. package/dist/api/QScrollArea.json +13 -5
  18. package/dist/api/QSelect.json +6 -3
  19. package/dist/api/QSlider.json +9 -0
  20. package/dist/api/QSplitter.json +8 -4
  21. package/dist/api/QTable.json +9 -0
  22. package/dist/api/QTime.json +8 -2
  23. package/dist/api/QToggle.json +24 -24
  24. package/dist/icon-set/bootstrap-icons.umd.prod.js +1 -1
  25. package/dist/icon-set/eva-icons.umd.prod.js +1 -1
  26. package/dist/icon-set/fontawesome-v5-pro.umd.prod.js +1 -1
  27. package/dist/icon-set/fontawesome-v5.umd.prod.js +1 -1
  28. package/dist/icon-set/ionicons-v4.umd.prod.js +1 -1
  29. package/dist/icon-set/line-awesome.umd.prod.js +1 -1
  30. package/dist/icon-set/material-icons-outlined.umd.prod.js +1 -1
  31. package/dist/icon-set/material-icons-round.umd.prod.js +1 -1
  32. package/dist/icon-set/material-icons-sharp.umd.prod.js +1 -1
  33. package/dist/icon-set/material-icons.umd.prod.js +1 -1
  34. package/dist/icon-set/mdi-v3.umd.prod.js +1 -1
  35. package/dist/icon-set/mdi-v4.umd.prod.js +1 -1
  36. package/dist/icon-set/mdi-v5.umd.prod.js +1 -1
  37. package/dist/icon-set/mdi-v6.umd.prod.js +1 -1
  38. package/dist/icon-set/svg-bootstrap-icons.umd.prod.js +1 -1
  39. package/dist/icon-set/svg-eva-icons.umd.prod.js +1 -1
  40. package/dist/icon-set/svg-fontawesome-v5.umd.prod.js +1 -1
  41. package/dist/icon-set/svg-ionicons-v4.umd.prod.js +1 -1
  42. package/dist/icon-set/svg-ionicons-v5.umd.prod.js +1 -1
  43. package/dist/icon-set/svg-ionicons-v6.umd.prod.js +1 -1
  44. package/dist/icon-set/svg-line-awesome.umd.prod.js +1 -1
  45. package/dist/icon-set/svg-material-icons-outlined.umd.prod.js +1 -1
  46. package/dist/icon-set/svg-material-icons-round.umd.prod.js +1 -1
  47. package/dist/icon-set/svg-material-icons-sharp.umd.prod.js +1 -1
  48. package/dist/icon-set/svg-material-icons.umd.prod.js +1 -1
  49. package/dist/icon-set/svg-mdi-v4.umd.prod.js +1 -1
  50. package/dist/icon-set/svg-mdi-v5.umd.prod.js +1 -1
  51. package/dist/icon-set/svg-mdi-v6.umd.prod.js +1 -1
  52. package/dist/icon-set/svg-themify.umd.prod.js +1 -1
  53. package/dist/icon-set/themify.umd.prod.js +1 -1
  54. package/dist/lang/ar.umd.prod.js +1 -1
  55. package/dist/lang/az-Latn.umd.prod.js +1 -1
  56. package/dist/lang/bg.umd.prod.js +1 -1
  57. package/dist/lang/bn.umd.prod.js +1 -1
  58. package/dist/lang/ca.umd.prod.js +1 -1
  59. package/dist/lang/cs.umd.prod.js +1 -1
  60. package/dist/lang/da.umd.prod.js +1 -1
  61. package/dist/lang/de.umd.prod.js +1 -1
  62. package/dist/lang/el.umd.prod.js +1 -1
  63. package/dist/lang/en-GB.umd.prod.js +1 -1
  64. package/dist/lang/en-US.umd.prod.js +1 -1
  65. package/dist/lang/eo.umd.prod.js +1 -1
  66. package/dist/lang/es.umd.prod.js +1 -1
  67. package/dist/lang/et.umd.prod.js +1 -1
  68. package/dist/lang/fa-IR.umd.prod.js +1 -1
  69. package/dist/lang/fa.umd.prod.js +1 -1
  70. package/dist/lang/fi.umd.prod.js +1 -1
  71. package/dist/lang/fr.umd.prod.js +1 -1
  72. package/dist/lang/gn.umd.prod.js +1 -1
  73. package/dist/lang/he.umd.prod.js +1 -1
  74. package/dist/lang/hr.umd.prod.js +1 -1
  75. package/dist/lang/hu.umd.prod.js +1 -1
  76. package/dist/lang/id.umd.prod.js +1 -1
  77. package/dist/lang/is.umd.prod.js +1 -1
  78. package/dist/lang/it.umd.prod.js +1 -1
  79. package/dist/lang/ja.umd.prod.js +1 -1
  80. package/dist/lang/km.umd.prod.js +1 -1
  81. package/dist/lang/ko-KR.umd.prod.js +1 -1
  82. package/dist/lang/kur-CKB.umd.prod.js +1 -1
  83. package/dist/lang/lt.umd.prod.js +1 -1
  84. package/dist/lang/lu.umd.prod.js +1 -1
  85. package/dist/lang/lv.umd.prod.js +1 -1
  86. package/dist/lang/ml.umd.prod.js +1 -1
  87. package/dist/lang/ms.umd.prod.js +1 -1
  88. package/dist/lang/my.umd.prod.js +1 -1
  89. package/dist/lang/nb-NO.umd.prod.js +1 -1
  90. package/dist/lang/nl.umd.prod.js +1 -1
  91. package/dist/lang/pl.umd.prod.js +1 -1
  92. package/dist/lang/pt-BR.umd.prod.js +1 -1
  93. package/dist/lang/pt.umd.prod.js +1 -1
  94. package/dist/lang/ro.umd.prod.js +1 -1
  95. package/dist/lang/ru.umd.prod.js +1 -1
  96. package/dist/lang/sk.umd.prod.js +1 -1
  97. package/dist/lang/sl.umd.prod.js +1 -1
  98. package/dist/lang/sr-CYR.umd.prod.js +1 -1
  99. package/dist/lang/sr.umd.prod.js +1 -1
  100. package/dist/lang/sv.umd.prod.js +1 -1
  101. package/dist/lang/ta.umd.prod.js +1 -1
  102. package/dist/lang/th.umd.prod.js +1 -1
  103. package/dist/lang/tr.umd.prod.js +1 -1
  104. package/dist/lang/ug.umd.prod.js +1 -1
  105. package/dist/lang/uk.umd.prod.js +1 -1
  106. package/dist/lang/vi.umd.prod.js +1 -1
  107. package/dist/lang/zh-CN.umd.prod.js +1 -1
  108. package/dist/lang/zh-TW.umd.prod.js +1 -1
  109. package/dist/quasar.cjs.prod.js +2 -2
  110. package/dist/quasar.css +43 -10
  111. package/dist/quasar.esm.prod.js +2 -2
  112. package/dist/quasar.prod.css +1 -1
  113. package/dist/quasar.rtl.css +60 -23
  114. package/dist/quasar.rtl.prod.css +1 -1
  115. package/dist/quasar.sass +34 -11
  116. package/dist/quasar.umd.js +314 -157
  117. package/dist/quasar.umd.prod.js +2 -2
  118. package/dist/ssr-directives/Morph.js +1 -1
  119. package/dist/transforms/auto-import.json +39 -3
  120. package/dist/transforms/import-map.json +18 -0
  121. package/dist/types/api/slider.d.ts +6 -7
  122. package/dist/types/api/vue-prop-types.ts +15 -0
  123. package/dist/types/api.d.ts +1 -0
  124. package/dist/types/index.d.ts +110 -184
  125. package/dist/types/utils/date.d.ts +25 -13
  126. package/dist/types/utils/dom.d.ts +4 -2
  127. package/dist/types/utils.d.ts +3 -1
  128. package/dist/vetur/quasar-attributes.json +62 -42
  129. package/dist/vetur/quasar-tags.json +8 -3
  130. package/dist/web-types/web-types.json +103 -58
  131. package/package.json +13 -3
  132. package/src/components/avatar/__tests__/QAvatar.spec.js +121 -0
  133. package/src/components/badge/__tests__/QBadge.spec.js +74 -0
  134. package/src/components/breadcrumbs/QBreadcrumbs.js +1 -1
  135. package/src/components/btn/__tests__/QBtn.spec.js +55 -0
  136. package/src/components/btn/__tests__/use-btn.spec.js +189 -0
  137. package/src/components/btn-dropdown/QBtnDropdown.json +4 -2
  138. package/src/components/checkbox/QCheckbox.js +34 -3
  139. package/src/components/checkbox/QCheckbox.json +17 -0
  140. package/src/components/checkbox/QCheckbox.sass +17 -5
  141. package/src/components/checkbox/use-checkbox.js +4 -0
  142. package/src/components/checkbox/use-checkbox.json +18 -0
  143. package/src/components/chip/__tests__/QChip.spec.js +155 -0
  144. package/src/components/date/__tests__/QDate.spec.js +189 -0
  145. package/src/components/date/__tests__/use-datetime.spec.js +83 -0
  146. package/src/components/dialog/QDialog.js +1 -1
  147. package/src/components/dialog/__tests__/QDialog.spec.js +129 -0
  148. package/src/components/editor/QEditor.js +1 -1
  149. package/src/components/editor/QEditor.json +3 -1
  150. package/src/components/editor/__tests__/QEditor.spec.js +195 -0
  151. package/src/components/expansion-item/QExpansionItem.json +6 -3
  152. package/src/components/fab/use-fab.json +4 -2
  153. package/src/components/field/QField.sass +2 -0
  154. package/src/components/file/QFile.json +4 -2
  155. package/src/components/form/QForm.js +27 -25
  156. package/src/components/img/QImg.json +2 -3
  157. package/src/components/inner-loading/QInnerLoading.json +2 -1
  158. package/src/components/input/QInput.js +10 -1
  159. package/src/components/input/QInput.json +4 -2
  160. package/src/components/input/__tests__/QInput.spec.js +105 -0
  161. package/src/components/input/__tests__/use-mask.spec.js +29 -0
  162. package/src/components/menu/QMenu.js +2 -1
  163. package/src/components/menu/__tests__/QMenu.spec.js +610 -0
  164. package/src/components/menu/__tests__/WrapperOne.vue +51 -0
  165. package/src/components/menu/__tests__/WrapperTwo.vue +38 -0
  166. package/src/components/pagination/QPagination.json +4 -2
  167. package/src/components/radio/QRadio.js +26 -1
  168. package/src/components/radio/QRadio.json +16 -0
  169. package/src/components/radio/QRadio.sass +17 -6
  170. package/src/components/scroll-area/QScrollArea.json +13 -5
  171. package/src/components/select/QSelect.js +13 -9
  172. package/src/components/select/QSelect.json +6 -3
  173. package/src/components/select/QSelect.sass +1 -0
  174. package/src/components/select/__tests__/QSelect.spec.js +2003 -0
  175. package/src/components/select/__tests__/WrapperOne.vue +28 -0
  176. package/src/components/slider/use-slider.json +9 -0
  177. package/src/components/splitter/QSplitter.json +8 -4
  178. package/src/components/stepper/QStep.js +19 -14
  179. package/src/components/stepper/QStepper.sass +3 -0
  180. package/src/components/table/QTable.json +9 -0
  181. package/src/components/table/__tests__/QTable.spec.js +635 -0
  182. package/src/components/table/__tests__/QTd.spec.js +35 -0
  183. package/src/components/table/__tests__/QTh.spec.js +27 -0
  184. package/src/components/table/__tests__/QTr.spec.js +27 -0
  185. package/src/components/tabs/__tests__/QRouteTab.spec.js +9 -0
  186. package/src/components/tabs/__tests__/QTab.spec.js +79 -0
  187. package/src/components/tabs/__tests__/QTabs.spec.js +147 -0
  188. package/src/components/time/QTime.json +2 -2
  189. package/src/components/toggle/QToggle.js +5 -13
  190. package/src/components/toggle/QToggle.json +3 -12
  191. package/src/components/uploader/__tests__/QUploader.spec.js +161 -0
  192. package/src/components/virtual-scroll/use-virtual-scroll.js +9 -6
  193. package/src/composables/private/__tests__/FieldWrapper.vue +39 -0
  194. package/src/composables/private/__tests__/use-anchor.spec.js +99 -0
  195. package/src/composables/private/__tests__/use-field.spec.js +351 -0
  196. package/src/composables/private/__tests__/use-file.spec.js +69 -0
  197. package/src/composables/private/__tests__/use-form.spec.js +11 -0
  198. package/src/composables/private/__tests__/use-fullscreen.spec.js +37 -0
  199. package/src/composables/private/__tests__/use-model-toggle.spec.js +306 -0
  200. package/src/composables/private/__tests__/use-portal.spec.js +4 -0
  201. package/src/composables/private/__tests__/use-router-link.spec.js +55 -0
  202. package/src/composables/private/__tests__/use-size.spec.js +37 -0
  203. package/src/composables/private/__tests__/use-transition.spec.js +108 -0
  204. package/src/composables/private/__tests__/use-validate.spec.js +111 -0
  205. package/src/composables/private/use-field.js +5 -8
  206. package/src/composables/private/use-fullscreen.js +1 -1
  207. package/src/composables/private/use-model-toggle.js +1 -1
  208. package/src/composables/private/use-validate.js +22 -22
  209. package/src/plugins/BottomSheet.json +1 -0
  210. package/src/plugins/Dialog.json +1 -0
  211. package/src/plugins/Meta.js +1 -1
  212. package/src/plugins/Notify.json +20 -10
  213. package/src/plugins/Screen.js +11 -8
  214. package/src/utils/date.js +111 -32
  215. package/src/utils/private/global-dialog.json +3 -0
  216. package/src/utils/private/vm.js +14 -8
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Quasar Framework v2.4.11
2
+ * Quasar Framework v2.5.1
3
3
  * (c) 2015-present Razvan Stoenescu
4
4
  * Released under the MIT License.
5
5
  */
@@ -633,12 +633,19 @@
633
633
  return
634
634
  }
635
635
 
636
+ const { visualViewport } = window;
637
+ const target = visualViewport || window;
638
+ const getSize = visualViewport === void 0
639
+ ? () => [ window.innerWidth, window.innerHeight ]
640
+ : () => [
641
+ visualViewport.width * visualViewport.scale + window.innerWidth - document.scrollingElement.clientWidth,
642
+ visualViewport.height * visualViewport.scale + window.innerHeight - document.scrollingElement.clientHeight
643
+ ];
644
+
636
645
  const classes = $q.config.screen !== void 0 && $q.config.screen.bodyClasses === true;
637
646
 
638
647
  this.__update = force => {
639
- const
640
- w = window.innerWidth,
641
- h = window.innerHeight;
648
+ const [ w, h ] = getSize();
642
649
 
643
650
  if (h !== this.height) {
644
651
  this.height = h;
@@ -696,11 +703,7 @@
696
703
  };
697
704
 
698
705
  const start = () => {
699
- const
700
- style = getComputedStyle(document.body),
701
- target = window.visualViewport !== void 0
702
- ? window.visualViewport
703
- : window;
706
+ const style = getComputedStyle(document.body);
704
707
 
705
708
  // if css props available
706
709
  if (style.getPropertyValue('--q-size-sm')) {
@@ -1456,7 +1459,7 @@
1456
1459
  }
1457
1460
 
1458
1461
  var installQuasar = function (parentApp, opts = {}) {
1459
- const $q = { version: '2.4.11' };
1462
+ const $q = { version: '2.5.1' };
1460
1463
 
1461
1464
  if (globalConfigIsFrozen === false) {
1462
1465
  if (opts.config !== void 0) {
@@ -2335,19 +2338,25 @@
2335
2338
  }
2336
2339
  }
2337
2340
 
2341
+ function fillNormalizedVNodes (children, vnode) {
2342
+ if (typeof vnode.type === 'symbol') {
2343
+ if (Array.isArray(vnode.children) === true) {
2344
+ vnode.children.forEach(child => {
2345
+ fillNormalizedVNodes(children, child);
2346
+ });
2347
+ }
2348
+ }
2349
+ else {
2350
+ children.add(vnode);
2351
+ }
2352
+ }
2353
+
2338
2354
  // vnodes from rendered in advanced slots
2339
2355
  function getNormalizedVNodes (vnodes) {
2340
2356
  const children = new Set();
2341
2357
 
2342
2358
  vnodes.forEach(vnode => {
2343
- if (typeof vnode.type === 'symbol' && Array.isArray(vnode.children) === true) {
2344
- vnode.children.forEach(child => {
2345
- children.add(child);
2346
- });
2347
- }
2348
- else {
2349
- children.add(vnode);
2350
- }
2359
+ fillNormalizedVNodes(children, vnode);
2351
2360
  });
2352
2361
 
2353
2362
  return Array.from(children)
@@ -2398,7 +2407,7 @@
2398
2407
  hSlot(slots.default)
2399
2408
  );
2400
2409
 
2401
- if (vnodes === void 0) { return }
2410
+ if (vnodes.length === 0) { return }
2402
2411
 
2403
2412
  let els = 1;
2404
2413
 
@@ -4059,7 +4068,7 @@
4059
4068
  vue.watch(() => props.modelValue, processModelChange);
4060
4069
 
4061
4070
  if (hideOnRouteChange !== void 0 && vmHasRouter(vm) === true) {
4062
- vue.watch(() => proxy.$route, () => {
4071
+ vue.watch(() => proxy.$route.fullPath, () => {
4063
4072
  if (hideOnRouteChange.value === true && showing.value === true) {
4064
4073
  hide();
4065
4074
  }
@@ -5131,7 +5140,7 @@
5131
5140
 
5132
5141
  if (node && node.contains(document.activeElement) !== true) {
5133
5142
  node = node.querySelector('[autofocus], [data-autofocus]') || node;
5134
- node.focus();
5143
+ node.focus({ preventScroll: true });
5135
5144
  }
5136
5145
  });
5137
5146
  }
@@ -5259,6 +5268,7 @@
5259
5268
  // the focus is not in a vue child component
5260
5269
  if (
5261
5270
  handlesFocus.value === true
5271
+ && props.noFocus !== true
5262
5272
  && childHasFocus(innerRef.value, evt.target) !== true
5263
5273
  ) {
5264
5274
  focus();
@@ -6413,7 +6423,7 @@
6413
6423
  let historyEntry, fullscreenFillerNode, container;
6414
6424
  const inFullscreen = vue.ref(false);
6415
6425
 
6416
- vmHasRouter(vm) === true && vue.watch(() => proxy.$route, () => {
6426
+ vmHasRouter(vm) === true && vue.watch(() => proxy.$route.fullPath, () => {
6417
6427
  props.noRouteFullscreenExit !== true && exitFullscreen();
6418
6428
  });
6419
6429
 
@@ -7170,6 +7180,10 @@
7170
7180
  falseValue: { default: false },
7171
7181
  indeterminateValue: { default: null },
7172
7182
 
7183
+ checkedIcon: String,
7184
+ uncheckedIcon: String,
7185
+ indeterminateIcon: String,
7186
+
7173
7187
  toggleOrder: {
7174
7188
  type: String,
7175
7189
  validator: v => v === 'tf' || v === 'ft'
@@ -7382,6 +7396,7 @@
7382
7396
  }
7383
7397
 
7384
7398
  const bgNode = vue.h('div', {
7399
+ key: 'svg',
7385
7400
  class: 'q-checkbox__bg absolute'
7386
7401
  }, [
7387
7402
  vue.h('svg', {
@@ -7408,8 +7423,36 @@
7408
7423
  props: useCheckboxProps,
7409
7424
  emits: useCheckboxEmits,
7410
7425
 
7411
- setup () {
7412
- return useCheckbox('checkbox', () => () => [ bgNode ])
7426
+ setup (props) {
7427
+ function getInner (isTrue, isIndeterminate) {
7428
+ const icon = vue.computed(() =>
7429
+ (isTrue.value === true
7430
+ ? props.checkedIcon
7431
+ : (isIndeterminate.value === true
7432
+ ? props.indeterminateIcon
7433
+ : props.uncheckedIcon
7434
+ )
7435
+ ) || null
7436
+ );
7437
+
7438
+ return () => (
7439
+ icon.value !== null
7440
+ ? [
7441
+ vue.h('div', {
7442
+ key: 'icon',
7443
+ class: 'q-checkbox__icon-container absolute flex flex-center no-wrap'
7444
+ }, [
7445
+ vue.h(QIcon, {
7446
+ class: 'q-checkbox__icon',
7447
+ name: icon.value
7448
+ })
7449
+ ])
7450
+ ]
7451
+ : [ bgNode ]
7452
+ )
7453
+ }
7454
+
7455
+ return useCheckbox('checkbox', getInner)
7413
7456
  }
7414
7457
  });
7415
7458
 
@@ -11736,19 +11779,18 @@
11736
11779
  function applyYearMonthDayChange (date, mod, sign) {
11737
11780
  let
11738
11781
  year = date.getFullYear(),
11739
- month = date.getMonth(),
11740
- day = date.getDate();
11782
+ month = date.getMonth();
11741
11783
 
11742
- if (mod.years !== void 0) {
11743
- year += sign * mod.years;
11744
- }
11784
+ const day = date.getDate();
11745
11785
 
11746
- if (mod.months !== void 0) {
11747
- month += sign * mod.months;
11786
+ if (mod.year !== void 0) {
11787
+ year += sign * mod.year;
11788
+ delete mod.year;
11748
11789
  }
11749
11790
 
11750
- if (mod.days !== void 0) {
11751
- day += sign * mod.days;
11791
+ if (mod.month !== void 0) {
11792
+ month += sign * mod.month;
11793
+ delete mod.month;
11752
11794
  }
11753
11795
 
11754
11796
  date.setDate(1);
@@ -11756,26 +11798,14 @@
11756
11798
 
11757
11799
  date.setFullYear(year);
11758
11800
  date.setMonth(month);
11759
- date.setDate(day);
11760
-
11761
- return date
11762
- }
11763
-
11764
- function getChange (date, mod, sign) {
11765
- const
11766
- d = new Date(date),
11767
- t = mod.years !== void 0 || mod.months !== void 0 || mod.days !== void 0
11768
- ? applyYearMonthDayChange(d, mod, sign)
11769
- : d;
11801
+ date.setDate(Math.min(day, daysInMonth(date)));
11770
11802
 
11771
- for (const key in mod) {
11772
- if (key !== 'years' && key !== 'months' && key !== 'days') {
11773
- const op = capitalize(key);
11774
- t[ `set${ op }` ](t[ `get${ op }` ]() + sign * mod[ key ]);
11775
- }
11803
+ if (mod.date !== void 0) {
11804
+ date.setDate(date.getDate() + sign * mod.date);
11805
+ delete mod.date;
11776
11806
  }
11777
11807
 
11778
- return t
11808
+ return date
11779
11809
  }
11780
11810
 
11781
11811
  function applyYearMonthDay (date, mod, middle) {
@@ -11792,22 +11822,86 @@
11792
11822
  date[ `set${ middle }Month` ](month);
11793
11823
  date[ `set${ middle }Date` ](day);
11794
11824
 
11825
+ delete mod.year;
11826
+ delete mod.month;
11827
+ delete mod.date;
11828
+
11795
11829
  return date
11796
11830
  }
11797
11831
 
11798
- function adjustDate (date, mod, utc) {
11832
+ function getChange (date, rawMod, sign) {
11833
+ const
11834
+ mod = normalizeMod(rawMod),
11835
+ d = new Date(date),
11836
+ t = mod.year !== void 0 || mod.month !== void 0 || mod.date !== void 0
11837
+ ? applyYearMonthDayChange(d, mod, sign) // removes year/month/day
11838
+ : d;
11839
+
11840
+ for (const key in mod) {
11841
+ const op = capitalize(key);
11842
+ t[ `set${ op }` ](t[ `get${ op }` ]() + sign * mod[ key ]);
11843
+ }
11844
+
11845
+ return t
11846
+ }
11847
+
11848
+ function normalizeMod (mod) {
11849
+ const acc = { ...mod };
11850
+
11851
+ if (mod.years !== void 0) {
11852
+ acc.year = mod.years;
11853
+ delete acc.years;
11854
+ }
11855
+
11856
+ if (mod.months !== void 0) {
11857
+ acc.month = mod.months;
11858
+ delete acc.months;
11859
+ }
11860
+
11861
+ if (mod.days !== void 0) {
11862
+ acc.date = mod.days;
11863
+ delete acc.days;
11864
+ }
11865
+ if (mod.day !== void 0) {
11866
+ acc.date = mod.day;
11867
+ delete acc.day;
11868
+ }
11869
+
11870
+ if (mod.hour !== void 0) {
11871
+ acc.hours = mod.hour;
11872
+ delete acc.hour;
11873
+ }
11874
+
11875
+ if (mod.minute !== void 0) {
11876
+ acc.minutes = mod.minute;
11877
+ delete acc.minute;
11878
+ }
11879
+
11880
+ if (mod.second !== void 0) {
11881
+ acc.seconds = mod.second;
11882
+ delete acc.second;
11883
+ }
11884
+
11885
+ if (mod.millisecond !== void 0) {
11886
+ acc.milliseconds = mod.millisecond;
11887
+ delete acc.millisecond;
11888
+ }
11889
+
11890
+ return acc
11891
+ }
11892
+
11893
+ function adjustDate (date, rawMod, utc) {
11799
11894
  const
11895
+ mod = normalizeMod(rawMod),
11800
11896
  middle = utc === true ? 'UTC' : '',
11801
11897
  d = new Date(date),
11802
11898
  t = mod.year !== void 0 || mod.month !== void 0 || mod.date !== void 0
11803
- ? applyYearMonthDay(d, mod, middle)
11899
+ ? applyYearMonthDay(d, mod, middle) // removes year/month/day
11804
11900
  : d;
11805
11901
 
11806
11902
  for (const key in mod) {
11807
- if (key !== 'year' && key !== 'month' && key !== 'date') {
11808
- const op = key.charAt(0).toUpperCase() + key.slice(1);
11809
- t[ `set${ middle }${ op }` ](mod[ key ]);
11810
- }
11903
+ const op = key.charAt(0).toUpperCase() + key.slice(1);
11904
+ t[ `set${ middle }${ op }` ](mod[ key ]);
11811
11905
  }
11812
11906
 
11813
11907
  return t
@@ -12041,16 +12135,23 @@
12041
12135
 
12042
12136
  switch (unit) {
12043
12137
  case 'year':
12138
+ case 'years':
12044
12139
  t[ `${ prefix }Month` ](0);
12045
12140
  case 'month':
12141
+ case 'months':
12046
12142
  t[ `${ prefix }Date` ](1);
12047
12143
  case 'day':
12144
+ case 'days':
12145
+ case 'date':
12048
12146
  t[ `${ prefix }Hours` ](0);
12049
12147
  case 'hour':
12148
+ case 'hours':
12050
12149
  t[ `${ prefix }Minutes` ](0);
12051
12150
  case 'minute':
12151
+ case 'minutes':
12052
12152
  t[ `${ prefix }Seconds` ](0);
12053
12153
  case 'second':
12154
+ case 'seconds':
12054
12155
  t[ `${ prefix }Milliseconds` ](0);
12055
12156
  }
12056
12157
  return t
@@ -12063,16 +12164,23 @@
12063
12164
 
12064
12165
  switch (unit) {
12065
12166
  case 'year':
12167
+ case 'years':
12066
12168
  t[ `${ prefix }Month` ](11);
12067
12169
  case 'month':
12170
+ case 'months':
12068
12171
  t[ `${ prefix }Date` ](daysInMonth(t));
12069
12172
  case 'day':
12173
+ case 'days':
12174
+ case 'date':
12070
12175
  t[ `${ prefix }Hours` ](23);
12071
12176
  case 'hour':
12177
+ case 'hours':
12072
12178
  t[ `${ prefix }Minutes` ](59);
12073
12179
  case 'minute':
12180
+ case 'minutes':
12074
12181
  t[ `${ prefix }Seconds` ](59);
12075
12182
  case 'second':
12183
+ case 'seconds':
12076
12184
  t[ `${ prefix }Milliseconds` ](999);
12077
12185
  }
12078
12186
  return t
@@ -12108,21 +12216,28 @@
12108
12216
 
12109
12217
  switch (unit) {
12110
12218
  case 'years':
12219
+ case 'year':
12111
12220
  return (t.getFullYear() - sub.getFullYear())
12112
12221
 
12113
12222
  case 'months':
12223
+ case 'month':
12114
12224
  return (t.getFullYear() - sub.getFullYear()) * 12 + t.getMonth() - sub.getMonth()
12115
12225
 
12116
12226
  case 'days':
12227
+ case 'day':
12228
+ case 'date':
12117
12229
  return getDiff(startOfDate(t, 'day'), startOfDate(sub, 'day'), MILLISECONDS_IN_DAY)
12118
12230
 
12119
12231
  case 'hours':
12232
+ case 'hour':
12120
12233
  return getDiff(startOfDate(t, 'hour'), startOfDate(sub, 'hour'), MILLISECONDS_IN_HOUR)
12121
12234
 
12122
12235
  case 'minutes':
12236
+ case 'minute':
12123
12237
  return getDiff(startOfDate(t, 'minute'), startOfDate(sub, 'minute'), MILLISECONDS_IN_MINUTE)
12124
12238
 
12125
12239
  case 'seconds':
12240
+ case 'second':
12126
12241
  return getDiff(startOfDate(t, 'second'), startOfDate(sub, 'second'), 1000)
12127
12242
  }
12128
12243
  }
@@ -12168,26 +12283,33 @@
12168
12283
 
12169
12284
  switch (unit) {
12170
12285
  case 'second':
12286
+ case 'seconds':
12171
12287
  if (t.getSeconds() !== d.getSeconds()) {
12172
12288
  return false
12173
12289
  }
12174
12290
  case 'minute': // intentional fall-through
12291
+ case 'minutes':
12175
12292
  if (t.getMinutes() !== d.getMinutes()) {
12176
12293
  return false
12177
12294
  }
12178
12295
  case 'hour': // intentional fall-through
12296
+ case 'hours':
12179
12297
  if (t.getHours() !== d.getHours()) {
12180
12298
  return false
12181
12299
  }
12182
12300
  case 'day': // intentional fall-through
12301
+ case 'days':
12302
+ case 'date':
12183
12303
  if (t.getDate() !== d.getDate()) {
12184
12304
  return false
12185
12305
  }
12186
12306
  case 'month': // intentional fall-through
12307
+ case 'months':
12187
12308
  if (t.getMonth() !== d.getMonth()) {
12188
12309
  return false
12189
12310
  }
12190
12311
  case 'year': // intentional fall-through
12312
+ case 'years':
12191
12313
  if (t.getFullYear() !== d.getFullYear()) {
12192
12314
  return false
12193
12315
  }
@@ -14417,7 +14539,7 @@
14417
14539
  }
14418
14540
 
14419
14541
  node = node.querySelector('[autofocus], [data-autofocus]') || node;
14420
- node.focus();
14542
+ node.focus({ preventScroll: true });
14421
14543
  });
14422
14544
  }
14423
14545
 
@@ -16919,7 +17041,7 @@
16919
17041
 
16920
17042
  function focus () {
16921
17043
  addFocusFn(() => {
16922
- contentRef.value !== null && contentRef.value.focus();
17044
+ contentRef.value !== null && contentRef.value.focus({ preventScroll: true });
16923
17045
  });
16924
17046
  }
16925
17047
 
@@ -20217,12 +20339,16 @@
20217
20339
  let validateIndex = 0, unwatchRules;
20218
20340
 
20219
20341
  const hasRules = vue.computed(() =>
20220
- props.disable !== true
20221
- && props.rules !== void 0
20342
+ props.rules !== void 0
20222
20343
  && props.rules !== null
20223
20344
  && props.rules.length > 0
20224
20345
  );
20225
20346
 
20347
+ const hasActiveRules = vue.computed(() =>
20348
+ props.disable !== true
20349
+ && hasRules.value === true
20350
+ );
20351
+
20226
20352
  const hasError = vue.computed(() =>
20227
20353
  props.error === true || innerError.value === true
20228
20354
  );
@@ -20260,7 +20386,14 @@
20260
20386
  else if (isDirtyModel.value === false) {
20261
20387
  isDirtyModel.value = true;
20262
20388
 
20263
- if (hasRules.value === true && props.lazyRules !== 'ondemand') {
20389
+ if (
20390
+ hasActiveRules.value === true
20391
+ && props.lazyRules !== 'ondemand'
20392
+ // Don't re-trigger if it's already in progress;
20393
+ // It might mean that focus switched to submit btn and
20394
+ // QForm's submit() has been called already (ENTER key)
20395
+ && innerLoading.value === false
20396
+ ) {
20264
20397
  debouncedValidate();
20265
20398
  }
20266
20399
  }
@@ -20282,11 +20415,11 @@
20282
20415
  * - Promise (pending async validation)
20283
20416
  */
20284
20417
  function validate (val = props.modelValue) {
20285
- if (hasRules.value !== true) {
20418
+ if (hasActiveRules.value !== true) {
20286
20419
  return true
20287
20420
  }
20288
20421
 
20289
- validateIndex++;
20422
+ const index = ++validateIndex;
20290
20423
 
20291
20424
  if (innerLoading.value !== true && props.lazyRules !== true) {
20292
20425
  isDirtyModel.value = true;
@@ -20303,9 +20436,7 @@
20303
20436
  innerErrorMessage.value = m;
20304
20437
  }
20305
20438
 
20306
- if (innerLoading.value !== false) {
20307
- innerLoading.value = false;
20308
- }
20439
+ innerLoading.value = false;
20309
20440
  };
20310
20441
 
20311
20442
  const promises = [];
@@ -20335,42 +20466,33 @@
20335
20466
  return true
20336
20467
  }
20337
20468
 
20338
- if (innerLoading.value !== true) {
20339
- innerLoading.value = true;
20340
- }
20341
-
20342
- const index = validateIndex;
20469
+ innerLoading.value = true;
20343
20470
 
20344
20471
  return Promise.all(promises).then(
20345
20472
  res => {
20346
- if (index !== validateIndex) {
20347
- return true
20348
- }
20349
-
20350
20473
  if (res === void 0 || Array.isArray(res) === false || res.length === 0) {
20351
- update(false);
20474
+ index === validateIndex && update(false);
20352
20475
  return true
20353
20476
  }
20354
20477
 
20355
20478
  const msg = res.find(r => r === false || typeof r === 'string');
20356
- update(msg !== void 0, msg);
20479
+ index === validateIndex && update(msg !== void 0, msg);
20357
20480
  return msg === void 0
20358
20481
  },
20359
20482
  e => {
20360
20483
  if (index === validateIndex) {
20361
20484
  console.error(e);
20362
20485
  update(true);
20363
- return false
20364
20486
  }
20365
20487
 
20366
- return true
20488
+ return false
20367
20489
  }
20368
20490
  )
20369
20491
  }
20370
20492
 
20371
20493
  function validateIfNeeded (changedRules) {
20372
20494
  if (
20373
- hasRules.value === true
20495
+ hasActiveRules.value === true
20374
20496
  && props.lazyRules !== 'ondemand'
20375
20497
  && (isDirtyModel.value === true || (props.lazyRules !== true && changedRules !== true))
20376
20498
  ) {
@@ -20656,7 +20778,7 @@
20656
20778
  if (target && (el === null || el.id !== state.targetUid.value)) {
20657
20779
  target.hasAttribute('tabindex') === true || (target = target.querySelector('[tabindex]'));
20658
20780
  if (target && target !== el) {
20659
- target.focus();
20781
+ target.focus({ preventScroll: true });
20660
20782
  }
20661
20783
  }
20662
20784
  }
@@ -20674,6 +20796,7 @@
20674
20796
  }
20675
20797
 
20676
20798
  function onControlFocusin (e) {
20799
+ clearTimeout(focusoutTimer);
20677
20800
  if (state.editable.value === true && state.focused.value === false) {
20678
20801
  state.focused.value = true;
20679
20802
  emit('focus', e);
@@ -20686,13 +20809,9 @@
20686
20809
  if (
20687
20810
  document.hasFocus() === true && (
20688
20811
  state.hasPopupOpen === true
20689
- || (
20690
- state.controlRef !== void 0
20691
- && (
20692
- state.controlRef.value === null
20693
- || state.controlRef.value.contains(document.activeElement) !== false
20694
- )
20695
- )
20812
+ || state.controlRef === void 0
20813
+ || state.controlRef.value === null
20814
+ || state.controlRef.value.contains(document.activeElement) !== false
20696
20815
  )
20697
20816
  ) {
20698
20817
  return
@@ -21526,7 +21645,7 @@
21526
21645
  ? shouldFocus
21527
21646
  : props.noErrorFocus !== true;
21528
21647
 
21529
- validateIndex++;
21648
+ const index = ++validateIndex;
21530
21649
 
21531
21650
  const emitEvent = (res, ref) => {
21532
21651
  emit('validation-' + (res === true ? 'success' : 'error'), ref);
@@ -21540,7 +21659,7 @@
21540
21659
  promises.push(
21541
21660
  valid.then(
21542
21661
  valid => ({ valid, comp }),
21543
- error => ({ valid: false, comp, error })
21662
+ err => ({ valid: false, comp, err })
21544
21663
  )
21545
21664
  );
21546
21665
  }
@@ -21564,34 +21683,33 @@
21564
21683
  return Promise.resolve(true)
21565
21684
  }
21566
21685
 
21567
- const index = validateIndex;
21568
-
21569
- return Promise.all(promises).then(
21570
- res => {
21571
- if (index === validateIndex) {
21572
- const errors = res.filter(r => r.valid !== true);
21686
+ return Promise.all(promises).then(res => {
21687
+ const errors = res.filter(r => r.valid !== true);
21573
21688
 
21574
- if (errors.length === 0) {
21575
- emitEvent(true);
21576
- return true
21577
- }
21689
+ if (errors.length === 0) {
21690
+ index === validateIndex && emitEvent(true);
21691
+ return true
21692
+ }
21578
21693
 
21579
- const { valid, comp } = errors[ 0 ];
21694
+ const { valid, comp, err } = errors[ 0 ];
21580
21695
 
21581
- emitEvent(false, comp);
21696
+ // if not outdated already
21697
+ if (index === validateIndex) {
21698
+ err !== void 0 && console.error(err);
21582
21699
 
21583
- if (
21584
- focus === true
21585
- && valid !== true
21586
- && typeof comp.focus === 'function'
21587
- ) {
21588
- comp.focus();
21589
- }
21700
+ emitEvent(false, comp);
21590
21701
 
21591
- return false
21702
+ if (
21703
+ focus === true
21704
+ && valid !== true
21705
+ && typeof comp.focus === 'function'
21706
+ ) {
21707
+ comp.focus();
21592
21708
  }
21593
21709
  }
21594
- )
21710
+
21711
+ return false
21712
+ })
21595
21713
  }
21596
21714
 
21597
21715
  function resetValidation () {
@@ -21605,8 +21723,11 @@
21605
21723
  function submit (evt) {
21606
21724
  evt !== void 0 && stopAndPrevent(evt);
21607
21725
 
21726
+ const index = validateIndex + 1;
21727
+
21608
21728
  validate().then(val => {
21609
- if (val === true) {
21729
+ // if not outdated && validation succeeded
21730
+ if (index === validateIndex && val === true) {
21610
21731
  if (props.onSubmit !== void 0) {
21611
21732
  emit('submit', evt);
21612
21733
  }
@@ -21637,7 +21758,7 @@
21637
21758
  const target = rootRef.value.querySelector('[autofocus], [data-autofocus]')
21638
21759
  || Array.prototype.find.call(rootRef.value.querySelectorAll('[tabindex]'), el => el.tabIndex > -1);
21639
21760
 
21640
- target !== null && target !== void 0 && target.focus();
21761
+ target !== null && target !== void 0 && target.focus({ preventScroll: true });
21641
21762
  });
21642
21763
  }
21643
21764
 
@@ -23169,6 +23290,15 @@
23169
23290
  return attrs
23170
23291
  });
23171
23292
 
23293
+ // some browsers lose the native input value
23294
+ // so we need to reattach it dynamically
23295
+ // (like type="password" <-> type="text"; see #12078)
23296
+ vue.watch(() => props.type, () => {
23297
+ if (inputRef.value) {
23298
+ inputRef.value.value = props.modelValue;
23299
+ }
23300
+ });
23301
+
23172
23302
  vue.watch(() => props.modelValue, v => {
23173
23303
  if (hasMask.value === true) {
23174
23304
  if (stopValueWatcher === true) {
@@ -23221,7 +23351,7 @@
23221
23351
  && inputRef.value !== el
23222
23352
  && (el === null || el.id !== state.targetUid.value)
23223
23353
  ) {
23224
- inputRef.value.focus();
23354
+ inputRef.value.focus({ preventScroll: true });
23225
23355
  }
23226
23356
  });
23227
23357
  }
@@ -24388,6 +24518,7 @@
24388
24518
  });
24389
24519
 
24390
24520
  const svg$m = vue.h('svg', {
24521
+ key: 'svg',
24391
24522
  class: 'q-radio__bg absolute non-selectable',
24392
24523
  viewBox: '0 0 24 24',
24393
24524
  'aria-hidden': 'true'
@@ -24416,6 +24547,9 @@
24416
24547
  label: String,
24417
24548
  leftLabel: Boolean,
24418
24549
 
24550
+ checkedIcon: String,
24551
+ uncheckedIcon: String,
24552
+
24419
24553
  color: String,
24420
24554
  keepColor: Boolean,
24421
24555
  dense: Boolean,
@@ -24457,6 +24591,13 @@
24457
24591
  + `q-radio__inner--${ isTrue.value === true ? 'truthy' : 'falsy' }${ color }`
24458
24592
  });
24459
24593
 
24594
+ const icon = vue.computed(() =>
24595
+ (isTrue.value === true
24596
+ ? props.checkedIcon
24597
+ : props.uncheckedIcon
24598
+ ) || null
24599
+ );
24600
+
24460
24601
  const tabindex = vue.computed(() => (
24461
24602
  props.disable === true ? -1 : props.tabindex || 0
24462
24603
  ));
@@ -24502,7 +24643,19 @@
24502
24643
  Object.assign(proxy, { set: onClick });
24503
24644
 
24504
24645
  return () => {
24505
- const content = [ svg$m ];
24646
+ const content = icon.value !== null
24647
+ ? [
24648
+ vue.h('div', {
24649
+ key: 'icon',
24650
+ class: 'q-radio__icon-container absolute flex flex-center no-wrap'
24651
+ }, [
24652
+ vue.h(QIcon, {
24653
+ class: 'q-radio__icon',
24654
+ name: icon.value
24655
+ })
24656
+ ])
24657
+ ]
24658
+ : [ svg$m ];
24506
24659
 
24507
24660
  props.disable !== true && injectFormInput(
24508
24661
  content,
@@ -24554,10 +24707,6 @@
24554
24707
  ...useCheckboxProps,
24555
24708
 
24556
24709
  icon: String,
24557
- checkedIcon: String,
24558
- uncheckedIcon: String,
24559
- indeterminateIcon: String,
24560
-
24561
24710
  iconColor: String
24562
24711
  },
24563
24712
 
@@ -24565,29 +24714,25 @@
24565
24714
 
24566
24715
  setup (props) {
24567
24716
  function getInner (isTrue, isIndeterminate) {
24568
- const computedIcon = vue.computed(() =>
24717
+ const icon = vue.computed(() =>
24569
24718
  (isTrue.value === true
24570
24719
  ? props.checkedIcon
24571
24720
  : (isIndeterminate.value === true ? props.indeterminateIcon : props.uncheckedIcon)
24572
24721
  ) || props.icon
24573
24722
  );
24574
24723
 
24575
- const computedIconColor = vue.computed(() => {
24576
- if (isTrue.value === true) {
24577
- return props.iconColor
24578
- }
24579
- });
24724
+ const color = vue.computed(() => (isTrue.value === true ? props.iconColor : null));
24580
24725
 
24581
24726
  return () => [
24582
24727
  vue.h('div', { class: 'q-toggle__track' }),
24583
24728
 
24584
24729
  vue.h('div', {
24585
24730
  class: 'q-toggle__thumb absolute flex flex-center no-wrap'
24586
- }, computedIcon.value !== void 0
24731
+ }, icon.value !== void 0
24587
24732
  ? [
24588
24733
  vue.h(QIcon, {
24589
- name: computedIcon.value,
24590
- color: computedIconColor.value
24734
+ name: icon.value,
24735
+ color: color.value
24591
24736
  })
24592
24737
  ]
24593
24738
  : void 0
@@ -27805,13 +27950,14 @@
27805
27950
  prevToIndex = -1;
27806
27951
  prevScrollStart = void 0;
27807
27952
 
27953
+ virtualScrollPaddingBefore.value = sumSize(virtualScrollSizesAgg, virtualScrollSizes, 0, virtualScrollSliceRange.value.from);
27954
+ virtualScrollPaddingAfter.value = sumSize(virtualScrollSizesAgg, virtualScrollSizes, virtualScrollSliceRange.value.to, virtualScrollLength.value);
27955
+
27808
27956
  if (toIndex >= 0) {
27809
27957
  updateVirtualScrollSizes(virtualScrollSliceRange.value.from);
27810
27958
  vue.nextTick(() => { scrollTo(toIndex); });
27811
27959
  }
27812
27960
  else {
27813
- virtualScrollPaddingBefore.value = sumSize(virtualScrollSizesAgg, virtualScrollSizes, 0, virtualScrollSliceRange.value.from);
27814
- virtualScrollPaddingAfter.value = sumSize(virtualScrollSizesAgg, virtualScrollSizes, virtualScrollSliceRange.value.to, virtualScrollLength.value);
27815
27961
  onVirtualScrollEvt();
27816
27962
  }
27817
27963
  }
@@ -27836,7 +27982,9 @@
27836
27982
 
27837
27983
  localScrollViewSize = scrollViewSize;
27838
27984
 
27839
- const multiplier = 1 + props.virtualScrollSliceRatioBefore + props.virtualScrollSliceRatioAfter;
27985
+ const virtualScrollSliceRatioBefore = parseFloat(props.virtualScrollSliceRatioBefore) || 0;
27986
+ const virtualScrollSliceRatioAfter = parseFloat(props.virtualScrollSliceRatioAfter) || 0;
27987
+ const multiplier = 1 + virtualScrollSliceRatioBefore + virtualScrollSliceRatioAfter;
27840
27988
  const view = scrollViewSize === void 0 || scrollViewSize <= 0
27841
27989
  ? 1
27842
27990
  : Math.ceil(scrollViewSize / virtualScrollItemSizeComputed.value);
@@ -27849,9 +27997,9 @@
27849
27997
 
27850
27998
  virtualScrollSliceSizeComputed.value = {
27851
27999
  total: Math.ceil(baseSize * multiplier),
27852
- start: Math.ceil(baseSize * props.virtualScrollSliceRatioBefore),
27853
- center: Math.ceil(baseSize * (0.5 + props.virtualScrollSliceRatioBefore)),
27854
- end: Math.ceil(baseSize * (1 + props.virtualScrollSliceRatioBefore)),
28000
+ start: Math.ceil(baseSize * virtualScrollSliceRatioBefore),
28001
+ center: Math.ceil(baseSize * (0.5 + virtualScrollSliceRatioBefore)),
28002
+ end: Math.ceil(baseSize * (1 + virtualScrollSliceRatioBefore)),
27855
28003
  view
27856
28004
  };
27857
28005
  }
@@ -28572,8 +28720,12 @@
28572
28720
  return innerOptionsValue.value.find(v => isDeepEqual(v, val)) !== void 0
28573
28721
  }
28574
28722
 
28575
- function selectInputText () {
28576
- if (props.useInput === true && targetRef.value !== null) {
28723
+ function selectInputText (e) {
28724
+ if (
28725
+ props.useInput === true
28726
+ && targetRef.value !== null
28727
+ && (e === void 0 || (targetRef.value === e.target && e.target.value === selectedString.value))
28728
+ ) {
28577
28729
  targetRef.value.select();
28578
28730
  }
28579
28731
  }
@@ -28943,7 +29095,7 @@
28943
29095
  type: 'search',
28944
29096
  ...comboboxAttrs.value,
28945
29097
  ...state.splitAttrs.attributes.value,
28946
- id: state.targetUid.value,
29098
+ id: isTarget === true ? state.targetUid.value : void 0,
28947
29099
  maxlength: props.maxlength,
28948
29100
  autocomplete: props.autocomplete,
28949
29101
  'data-autofocus': (fromDialog !== true && props.autofocus === true) || void 0,
@@ -28954,7 +29106,7 @@
28954
29106
 
28955
29107
  if (fromDialog !== true && hasDialog === true) {
28956
29108
  if (Array.isArray(data.class) === true) {
28957
- data.class[ 0 ] += ' no-pointer-events';
29109
+ data.class = [ ...data.class, 'no-pointer-events' ];
28958
29110
  }
28959
29111
  else {
28960
29112
  data.class += ' no-pointer-events';
@@ -29347,7 +29499,7 @@
29347
29499
  filter, updateMenuPosition, updateInputValue,
29348
29500
  isOptionSelected,
29349
29501
  getEmittingOptionValue,
29350
- isOptionDisabled: (...args) => isOptionDisabled.value.apply(null, args),
29502
+ isOptionDisabled: (...args) => isOptionDisabled.value.apply(null, args) === true,
29351
29503
  getOptionValue: (...args) => getOptionValue.value.apply(null, args),
29352
29504
  getOptionLabel: (...args) => getOptionLabel.value.apply(null, args)
29353
29505
  });
@@ -29420,13 +29572,13 @@
29420
29572
  child.push(getInput(fromDialog, isTarget));
29421
29573
  }
29422
29574
  // there can be only one (when dialog is opened the control in dialog should be target)
29423
- else if (state.editable.value === true && isTarget === true) {
29575
+ else if (state.editable.value === true) {
29424
29576
  child.push(
29425
29577
  vue.h('div', {
29426
- ref: targetRef,
29578
+ ref: isTarget === true ? targetRef : void 0,
29427
29579
  key: 'd_t',
29428
29580
  class: 'q-select__focus-target',
29429
- id: state.targetUid.value,
29581
+ id: isTarget === true ? state.targetUid.value : void 0,
29430
29582
  ...comboboxAttrs.value,
29431
29583
  onKeydown: onTargetKeydown,
29432
29584
  onKeyup: onTargetKeyup,
@@ -29434,7 +29586,7 @@
29434
29586
  })
29435
29587
  );
29436
29588
 
29437
- if (typeof props.autocomplete === 'string' && props.autocomplete.length > 0) {
29589
+ if (isTarget === true && typeof props.autocomplete === 'string' && props.autocomplete.length > 0) {
29438
29590
  child.push(
29439
29591
  vue.h('input', {
29440
29592
  class: 'q-select__autocomplete-input',
@@ -32143,7 +32295,9 @@
32143
32295
  error: Boolean
32144
32296
  },
32145
32297
 
32146
- setup (props, { slots }) {
32298
+ setup (props, { attrs, slots }) {
32299
+ const { proxy: { $q } } = vue.getCurrentInstance();
32300
+
32147
32301
  const $stepper = vue.inject(stepperKey, () => {
32148
32302
  console.error('QStep needs to be child of QStepper');
32149
32303
  });
@@ -32154,18 +32308,21 @@
32154
32308
 
32155
32309
  const isActive = vue.computed(() => $stepper.value.modelValue === props.name);
32156
32310
 
32157
- vue.watch(isActive, active => {
32158
- if (
32159
- active === true
32160
- && $stepper.value.vertical === true
32161
- ) {
32162
- vue.nextTick(() => {
32163
- if (rootRef.value !== null) {
32164
- rootRef.value.scrollTop = 0;
32311
+ const scrollEvent = vue.computed(() => (
32312
+ ($q.platform.is.ios !== true && $q.platform.is.chrome === true)
32313
+ || isActive.value !== true
32314
+ || $stepper.value.vertical !== true
32315
+ ? {}
32316
+ : {
32317
+ onScroll (e) {
32318
+ const { target } = e;
32319
+ if (target.scrollTop > 0) {
32320
+ target.scrollTop = 0;
32321
+ }
32322
+ attrs.onScroll !== void 0 && attrs.onScroll(e);
32165
32323
  }
32166
- });
32167
- }
32168
- });
32324
+ }
32325
+ ));
32169
32326
 
32170
32327
  const contentKey = vue.computed(() => (
32171
32328
  typeof props.name === 'string' || typeof props.name === 'number'
@@ -32201,7 +32358,7 @@
32201
32358
 
32202
32359
  return () => vue.h(
32203
32360
  'div',
32204
- { ref: rootRef, class: 'q-stepper__step' },
32361
+ { ref: rootRef, class: 'q-stepper__step', ...scrollEvent.value },
32205
32362
  $stepper.value.vertical === true
32206
32363
  ? [
32207
32364
  vue.h(StepHeader, {
@@ -39359,7 +39516,7 @@
39359
39516
  });
39360
39517
 
39361
39518
  var index_umd = {
39362
- version: '2.4.11',
39519
+ version: '2.5.1',
39363
39520
  install (app, opts) {
39364
39521
  installQuasar(app, {
39365
39522
  components,