quasar 2.4.10 → 2.5.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 (228) hide show
  1. package/dist/api/BottomSheet.json +4 -0
  2. package/dist/api/Dialog.json +5 -1
  3. package/dist/api/LoadingBar.json +7 -0
  4. package/dist/api/Notify.json +20 -10
  5. package/dist/api/Platform.json +171 -0
  6. package/dist/api/QAjaxBar.json +13 -1
  7. package/dist/api/QBtnDropdown.json +4 -2
  8. package/dist/api/QCheckbox.json +27 -0
  9. package/dist/api/QEditor.json +4 -2
  10. package/dist/api/QExpansionItem.json +6 -3
  11. package/dist/api/QFab.json +4 -2
  12. package/dist/api/QFabAction.json +4 -2
  13. package/dist/api/QFile.json +4 -2
  14. package/dist/api/QImg.json +1 -2
  15. package/dist/api/QInnerLoading.json +2 -1
  16. package/dist/api/QInput.json +4 -2
  17. package/dist/api/QPagination.json +4 -2
  18. package/dist/api/QRadio.json +18 -0
  19. package/dist/api/QRange.json +9 -0
  20. package/dist/api/QScrollArea.json +13 -5
  21. package/dist/api/QSelect.json +6 -3
  22. package/dist/api/QSlider.json +9 -0
  23. package/dist/api/QSplitter.json +8 -4
  24. package/dist/api/QTable.json +9 -0
  25. package/dist/api/QTime.json +8 -2
  26. package/dist/api/QToggle.json +24 -24
  27. package/dist/icon-set/bootstrap-icons.umd.prod.js +1 -1
  28. package/dist/icon-set/eva-icons.umd.prod.js +1 -1
  29. package/dist/icon-set/fontawesome-v5-pro.umd.prod.js +1 -1
  30. package/dist/icon-set/fontawesome-v5.umd.prod.js +1 -1
  31. package/dist/icon-set/ionicons-v4.umd.prod.js +1 -1
  32. package/dist/icon-set/line-awesome.umd.prod.js +1 -1
  33. package/dist/icon-set/material-icons-outlined.umd.prod.js +1 -1
  34. package/dist/icon-set/material-icons-round.umd.prod.js +1 -1
  35. package/dist/icon-set/material-icons-sharp.umd.prod.js +1 -1
  36. package/dist/icon-set/material-icons.umd.prod.js +1 -1
  37. package/dist/icon-set/mdi-v3.umd.prod.js +1 -1
  38. package/dist/icon-set/mdi-v4.umd.prod.js +1 -1
  39. package/dist/icon-set/mdi-v5.umd.prod.js +1 -1
  40. package/dist/icon-set/mdi-v6.umd.prod.js +1 -1
  41. package/dist/icon-set/svg-bootstrap-icons.umd.prod.js +1 -1
  42. package/dist/icon-set/svg-eva-icons.umd.prod.js +1 -1
  43. package/dist/icon-set/svg-fontawesome-v5.umd.prod.js +1 -1
  44. package/dist/icon-set/svg-ionicons-v4.umd.prod.js +1 -1
  45. package/dist/icon-set/svg-ionicons-v5.umd.prod.js +1 -1
  46. package/dist/icon-set/svg-ionicons-v6.umd.prod.js +1 -1
  47. package/dist/icon-set/svg-line-awesome.umd.prod.js +1 -1
  48. package/dist/icon-set/svg-material-icons-outlined.umd.prod.js +1 -1
  49. package/dist/icon-set/svg-material-icons-round.umd.prod.js +1 -1
  50. package/dist/icon-set/svg-material-icons-sharp.umd.prod.js +1 -1
  51. package/dist/icon-set/svg-material-icons.umd.prod.js +1 -1
  52. package/dist/icon-set/svg-mdi-v4.umd.prod.js +1 -1
  53. package/dist/icon-set/svg-mdi-v5.umd.prod.js +1 -1
  54. package/dist/icon-set/svg-mdi-v6.umd.prod.js +1 -1
  55. package/dist/icon-set/svg-themify.umd.prod.js +1 -1
  56. package/dist/icon-set/themify.umd.prod.js +1 -1
  57. package/dist/lang/ar.umd.prod.js +1 -1
  58. package/dist/lang/az-Latn.umd.prod.js +1 -1
  59. package/dist/lang/bg.umd.prod.js +1 -1
  60. package/dist/lang/bn.umd.prod.js +1 -1
  61. package/dist/lang/ca.umd.prod.js +1 -1
  62. package/dist/lang/cs.umd.prod.js +1 -1
  63. package/dist/lang/da.umd.prod.js +1 -1
  64. package/dist/lang/de.umd.prod.js +1 -1
  65. package/dist/lang/el.umd.prod.js +1 -1
  66. package/dist/lang/en-GB.umd.prod.js +1 -1
  67. package/dist/lang/en-US.umd.prod.js +1 -1
  68. package/dist/lang/eo.umd.prod.js +1 -1
  69. package/dist/lang/es.umd.prod.js +1 -1
  70. package/dist/lang/et.umd.prod.js +1 -1
  71. package/dist/lang/fa-IR.umd.prod.js +1 -1
  72. package/dist/lang/fa.umd.prod.js +1 -1
  73. package/dist/lang/fi.umd.prod.js +1 -1
  74. package/dist/lang/fr.umd.prod.js +1 -1
  75. package/dist/lang/gn.umd.prod.js +1 -1
  76. package/dist/lang/he.umd.prod.js +1 -1
  77. package/dist/lang/hr.umd.prod.js +1 -1
  78. package/dist/lang/hu.umd.prod.js +1 -1
  79. package/dist/lang/id.umd.prod.js +1 -1
  80. package/dist/lang/is.umd.prod.js +1 -1
  81. package/dist/lang/it.umd.prod.js +1 -1
  82. package/dist/lang/ja.umd.prod.js +1 -1
  83. package/dist/lang/km.umd.prod.js +1 -1
  84. package/dist/lang/ko-KR.umd.prod.js +1 -1
  85. package/dist/lang/kur-CKB.umd.prod.js +1 -1
  86. package/dist/lang/lt.umd.prod.js +1 -1
  87. package/dist/lang/lu.umd.prod.js +1 -1
  88. package/dist/lang/lv.umd.prod.js +1 -1
  89. package/dist/lang/ml.umd.prod.js +1 -1
  90. package/dist/lang/ms.umd.prod.js +1 -1
  91. package/dist/lang/my.umd.prod.js +1 -1
  92. package/dist/lang/nb-NO.umd.prod.js +1 -1
  93. package/dist/lang/nl.umd.prod.js +1 -1
  94. package/dist/lang/pl.umd.prod.js +1 -1
  95. package/dist/lang/pt-BR.umd.prod.js +1 -1
  96. package/dist/lang/pt.umd.prod.js +1 -1
  97. package/dist/lang/ro.umd.prod.js +1 -1
  98. package/dist/lang/ru.umd.prod.js +1 -1
  99. package/dist/lang/sk.umd.prod.js +1 -1
  100. package/dist/lang/sl.umd.prod.js +1 -1
  101. package/dist/lang/sr-CYR.umd.prod.js +1 -1
  102. package/dist/lang/sr.umd.prod.js +1 -1
  103. package/dist/lang/sv.umd.prod.js +1 -1
  104. package/dist/lang/ta.umd.prod.js +1 -1
  105. package/dist/lang/th.umd.prod.js +1 -1
  106. package/dist/lang/tr.umd.prod.js +1 -1
  107. package/dist/lang/ug.umd.prod.js +1 -1
  108. package/dist/lang/uk.umd.prod.js +1 -1
  109. package/dist/lang/vi.umd.prod.js +1 -1
  110. package/dist/lang/zh-CN.umd.prod.js +1 -1
  111. package/dist/lang/zh-TW.umd.prod.js +1 -1
  112. package/dist/quasar.cjs.prod.js +2 -2
  113. package/dist/quasar.css +39 -10
  114. package/dist/quasar.esm.prod.js +2 -2
  115. package/dist/quasar.prod.css +1 -1
  116. package/dist/quasar.rtl.css +56 -23
  117. package/dist/quasar.rtl.prod.css +1 -1
  118. package/dist/quasar.sass +32 -11
  119. package/dist/quasar.umd.js +276 -118
  120. package/dist/quasar.umd.prod.js +2 -2
  121. package/dist/ssr-directives/Morph.js +1 -1
  122. package/dist/transforms/auto-import.json +39 -3
  123. package/dist/transforms/import-map.json +18 -0
  124. package/dist/types/api/slider.d.ts +6 -7
  125. package/dist/types/api/validation.d.ts +1 -1
  126. package/dist/types/api/vue-prop-types.ts +15 -0
  127. package/dist/types/api.d.ts +1 -0
  128. package/dist/types/index.d.ts +246 -188
  129. package/dist/types/utils/dom.d.ts +4 -2
  130. package/dist/types/utils.d.ts +3 -1
  131. package/dist/vetur/quasar-attributes.json +62 -42
  132. package/dist/vetur/quasar-tags.json +8 -3
  133. package/dist/web-types/web-types.json +103 -58
  134. package/package.json +13 -3
  135. package/src/components/ajax-bar/QAjaxBar.js +22 -12
  136. package/src/components/ajax-bar/QAjaxBar.json +16 -1
  137. package/src/components/avatar/__tests__/QAvatar.spec.js +121 -0
  138. package/src/components/badge/__tests__/QBadge.spec.js +74 -0
  139. package/src/components/breadcrumbs/QBreadcrumbs.js +1 -1
  140. package/src/components/btn/__tests__/QBtn.spec.js +55 -0
  141. package/src/components/btn/__tests__/use-btn.spec.js +189 -0
  142. package/src/components/btn-dropdown/QBtnDropdown.json +4 -2
  143. package/src/components/checkbox/QCheckbox.js +34 -3
  144. package/src/components/checkbox/QCheckbox.json +17 -0
  145. package/src/components/checkbox/QCheckbox.sass +17 -5
  146. package/src/components/checkbox/use-checkbox.js +4 -0
  147. package/src/components/checkbox/use-checkbox.json +18 -0
  148. package/src/components/chip/__tests__/QChip.spec.js +155 -0
  149. package/src/components/date/__tests__/QDate.spec.js +189 -0
  150. package/src/components/date/__tests__/use-datetime.spec.js +83 -0
  151. package/src/components/dialog/QDialog.js +1 -1
  152. package/src/components/dialog/__tests__/QDialog.spec.js +129 -0
  153. package/src/components/editor/QEditor.js +1 -1
  154. package/src/components/editor/QEditor.json +3 -1
  155. package/src/components/editor/__tests__/QEditor.spec.js +195 -0
  156. package/src/components/expansion-item/QExpansionItem.json +6 -3
  157. package/src/components/fab/use-fab.json +4 -2
  158. package/src/components/file/QFile.json +4 -2
  159. package/src/components/form/QForm.js +12 -2
  160. package/src/components/img/QImg.json +2 -3
  161. package/src/components/infinite-scroll/QInfiniteScroll.js +3 -2
  162. package/src/components/inner-loading/QInnerLoading.json +2 -1
  163. package/src/components/input/QInput.js +10 -1
  164. package/src/components/input/QInput.json +4 -2
  165. package/src/components/input/__tests__/QInput.spec.js +105 -0
  166. package/src/components/input/__tests__/use-mask.spec.js +29 -0
  167. package/src/components/menu/QMenu.js +2 -1
  168. package/src/components/menu/__tests__/QMenu.spec.js +610 -0
  169. package/src/components/menu/__tests__/WrapperOne.vue +51 -0
  170. package/src/components/menu/__tests__/WrapperTwo.vue +38 -0
  171. package/src/components/pagination/QPagination.json +4 -2
  172. package/src/components/radio/QRadio.js +26 -1
  173. package/src/components/radio/QRadio.json +16 -0
  174. package/src/components/radio/QRadio.sass +17 -6
  175. package/src/components/scroll-area/QScrollArea.js +21 -1
  176. package/src/components/scroll-area/QScrollArea.json +13 -5
  177. package/src/components/select/QSelect.js +13 -9
  178. package/src/components/select/QSelect.json +6 -3
  179. package/src/components/select/QSelect.sass +1 -0
  180. package/src/components/select/__tests__/QSelect.spec.js +2003 -0
  181. package/src/components/select/__tests__/WrapperOne.vue +28 -0
  182. package/src/components/slider/use-slider.json +9 -0
  183. package/src/components/splitter/QSplitter.json +8 -4
  184. package/src/components/stepper/QStep.js +19 -14
  185. package/src/components/stepper/QStepper.sass +3 -0
  186. package/src/components/table/QTable.json +9 -0
  187. package/src/components/table/__tests__/QTable.spec.js +635 -0
  188. package/src/components/table/__tests__/QTd.spec.js +35 -0
  189. package/src/components/table/__tests__/QTh.spec.js +27 -0
  190. package/src/components/table/__tests__/QTr.spec.js +27 -0
  191. package/src/components/tabs/QTabs.js +10 -2
  192. package/src/components/tabs/__tests__/QRouteTab.spec.js +9 -0
  193. package/src/components/tabs/__tests__/QTab.spec.js +79 -0
  194. package/src/components/tabs/__tests__/QTabs.spec.js +147 -0
  195. package/src/components/time/QTime.json +2 -2
  196. package/src/components/toggle/QToggle.js +5 -13
  197. package/src/components/toggle/QToggle.json +3 -12
  198. package/src/components/tree/QTree.js +5 -3
  199. package/src/components/uploader/__tests__/QUploader.spec.js +161 -0
  200. package/src/components/virtual-scroll/use-virtual-scroll.js +20 -9
  201. package/src/composables/private/__tests__/FieldWrapper.vue +39 -0
  202. package/src/composables/private/__tests__/use-anchor.spec.js +99 -0
  203. package/src/composables/private/__tests__/use-field.spec.js +351 -0
  204. package/src/composables/private/__tests__/use-file.spec.js +69 -0
  205. package/src/composables/private/__tests__/use-form.spec.js +11 -0
  206. package/src/composables/private/__tests__/use-fullscreen.spec.js +37 -0
  207. package/src/composables/private/__tests__/use-model-toggle.spec.js +306 -0
  208. package/src/composables/private/__tests__/use-portal.spec.js +4 -0
  209. package/src/composables/private/__tests__/use-router-link.spec.js +55 -0
  210. package/src/composables/private/__tests__/use-size.spec.js +37 -0
  211. package/src/composables/private/__tests__/use-transition.spec.js +108 -0
  212. package/src/composables/private/__tests__/use-validate.spec.js +111 -0
  213. package/src/composables/private/use-field.js +16 -9
  214. package/src/composables/private/use-fullscreen.js +1 -1
  215. package/src/composables/private/use-model-toggle.js +1 -1
  216. package/src/composables/private/use-validate.js +9 -5
  217. package/src/plugins/BottomSheet.json +1 -0
  218. package/src/plugins/Dialog.json +1 -0
  219. package/src/plugins/LoadingBar.js +3 -3
  220. package/src/plugins/LoadingBar.json +8 -0
  221. package/src/plugins/Meta.js +1 -1
  222. package/src/plugins/Notify.json +20 -10
  223. package/src/plugins/Platform.js +15 -8
  224. package/src/plugins/Platform.json +166 -0
  225. package/src/plugins/Screen.js +11 -8
  226. package/src/utils/date.js +5 -5
  227. package/src/utils/private/global-dialog.json +3 -0
  228. package/src/utils/private/vm.js +14 -8
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Quasar Framework v2.4.10
2
+ * Quasar Framework v2.5.0
3
3
  * (c) 2015-present Razvan Stoenescu
4
4
  * Released under the MIT License.
5
5
  */
@@ -40,19 +40,15 @@
40
40
  let iosCorrection;
41
41
 
42
42
  function getMatch (userAgent, platformMatch) {
43
- const match = /(edge|edga|edgios)\/([\w.]+)/.exec(userAgent)
43
+ const match = /(edg|edge|edga|edgios)\/([\w.]+)/.exec(userAgent)
44
44
  || /(opr)[\/]([\w.]+)/.exec(userAgent)
45
45
  || /(vivaldi)[\/]([\w.]+)/.exec(userAgent)
46
46
  || /(chrome|crios)[\/]([\w.]+)/.exec(userAgent)
47
- || /(iemobile)[\/]([\w.]+)/.exec(userAgent)
48
47
  || /(version)(applewebkit)[\/]([\w.]+).*(safari)[\/]([\w.]+)/.exec(userAgent)
49
48
  || /(webkit)[\/]([\w.]+).*(version)[\/]([\w.]+).*(safari)[\/]([\w.]+)/.exec(userAgent)
50
49
  || /(firefox|fxios)[\/]([\w.]+)/.exec(userAgent)
51
50
  || /(webkit)[\/]([\w.]+)/.exec(userAgent)
52
51
  || /(opera)(?:.*version|)[\/]([\w.]+)/.exec(userAgent)
53
- || /(msie) ([\w.]+)/.exec(userAgent)
54
- || (userAgent.indexOf('trident') >= 0 && /(rv)(?::| )([\w.]+)/.exec(userAgent))
55
- || (userAgent.indexOf('compatible') < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec(userAgent))
56
52
  || [];
57
53
 
58
54
  return {
@@ -75,6 +71,8 @@
75
71
  || /(mac)/.exec(userAgent)
76
72
  || /(linux)/.exec(userAgent)
77
73
  || /(cros)/.exec(userAgent)
74
+ // TODO: Remove BlackBerry detection. BlackBerry OS, BlackBerry 10, and BlackBerry PlayBook OS
75
+ // is officially dead as of January 4, 2022 (https://www.blackberry.com/us/en/support/devices/end-of-life)
78
76
  || /(playbook)/.exec(userAgent)
79
77
  || /(bb)/.exec(userAgent)
80
78
  || /(blackberry)/.exec(userAgent)
@@ -164,6 +162,10 @@
164
162
  delete browser[ 'windows phone' ];
165
163
  }
166
164
 
165
+ // TODO: The assumption about WebKit based browsers below is not completely accurate.
166
+ // Google released Blink(a fork of WebKit) engine on April 3, 2013, which is really different than WebKit today.
167
+ // Today, one might want to check for WebKit to deal with its bugs, which is used on all browsers on iOS, and Safari browser on all platforms.
168
+
167
169
  // Chrome, Opera 15+, Vivaldi and Safari are webkit based browsers
168
170
  if (
169
171
  browser.chrome
@@ -180,8 +182,15 @@
180
182
  browser.webkit = true;
181
183
  }
182
184
 
185
+ // TODO: (Qv3) rename the terms 'edge' to 'edge legacy'(or remove it) then 'edge chromium' to 'edge' to match with the known up-to-date terms
186
+ // Microsoft Edge is the new Chromium-based browser. Microsoft Edge Legacy is the old EdgeHTML-based browser (EOL: March 9, 2021).
187
+ if (browser.edg) {
188
+ matched.browser = 'edgechromium';
189
+ browser.edgeChromium = true;
190
+ }
191
+
183
192
  // Blackberry browsers are marked as Safari on BlackBerry
184
- if (browser.safari && browser.blackberry || browser.bb) {
193
+ if ((browser.safari && browser.blackberry) || browser.bb) {
185
194
  matched.browser = 'blackberry';
186
195
  browser.blackberry = true;
187
196
  }
@@ -624,12 +633,19 @@
624
633
  return
625
634
  }
626
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
+
627
645
  const classes = $q.config.screen !== void 0 && $q.config.screen.bodyClasses === true;
628
646
 
629
647
  this.__update = force => {
630
- const
631
- w = window.innerWidth,
632
- h = window.innerHeight;
648
+ const [ w, h ] = getSize();
633
649
 
634
650
  if (h !== this.height) {
635
651
  this.height = h;
@@ -687,11 +703,7 @@
687
703
  };
688
704
 
689
705
  const start = () => {
690
- const
691
- style = getComputedStyle(document.body),
692
- target = window.visualViewport !== void 0
693
- ? window.visualViewport
694
- : window;
706
+ const style = getComputedStyle(document.body);
695
707
 
696
708
  // if css props available
697
709
  if (style.getPropertyValue('--q-size-sm')) {
@@ -1447,7 +1459,7 @@
1447
1459
  }
1448
1460
 
1449
1461
  var installQuasar = function (parentApp, opts = {}) {
1450
- const $q = { version: '2.4.10' };
1462
+ const $q = { version: '2.5.0' };
1451
1463
 
1452
1464
  if (globalConfigIsFrozen === false) {
1453
1465
  if (opts.config !== void 0) {
@@ -1646,7 +1658,7 @@
1646
1658
  const onScreen = vue.ref(false);
1647
1659
  const animate = vue.ref(true);
1648
1660
 
1649
- let calls = 0, timer, speed;
1661
+ let sessions = 0, timer, speed;
1650
1662
 
1651
1663
  const classes = vue.computed(() =>
1652
1664
  `q-loading-bar q-loading-bar--${ props.position }`
@@ -1692,16 +1704,17 @@
1692
1704
  const oldSpeed = speed;
1693
1705
  speed = Math.max(0, newSpeed) || 0;
1694
1706
 
1695
- calls++;
1707
+ sessions++;
1696
1708
 
1697
- if (calls > 1) {
1709
+ if (sessions > 1) {
1698
1710
  if (oldSpeed === 0 && newSpeed > 0) {
1699
1711
  planNextStep();
1700
1712
  }
1701
1713
  else if (oldSpeed > 0 && newSpeed <= 0) {
1702
1714
  clearTimeout(timer);
1703
1715
  }
1704
- return
1716
+
1717
+ return sessions
1705
1718
  }
1706
1719
 
1707
1720
  clearTimeout(timer);
@@ -1709,25 +1722,32 @@
1709
1722
 
1710
1723
  progress.value = 0;
1711
1724
 
1712
- if (onScreen.value === true) { return }
1713
-
1714
- onScreen.value = true;
1715
- animate.value = false;
1716
1725
  timer = setTimeout(() => {
1717
1726
  animate.value = true;
1718
1727
  newSpeed > 0 && planNextStep();
1719
- }, 100);
1728
+ }, onScreen.value === true ? 500 : 1);
1729
+
1730
+ if (onScreen.value !== true) {
1731
+ onScreen.value = true;
1732
+ animate.value = false;
1733
+ }
1734
+
1735
+ return sessions
1720
1736
  }
1721
1737
 
1722
1738
  function increment (amount) {
1723
- if (calls > 0) {
1739
+ if (sessions > 0) {
1724
1740
  progress.value = inc(progress.value, amount);
1725
1741
  }
1742
+
1743
+ return sessions
1726
1744
  }
1727
1745
 
1728
1746
  function stop () {
1729
- calls = Math.max(0, calls - 1);
1730
- if (calls > 0) { return }
1747
+ sessions = Math.max(0, sessions - 1);
1748
+ if (sessions > 0) {
1749
+ return sessions
1750
+ }
1731
1751
 
1732
1752
  clearTimeout(timer);
1733
1753
  emit('stop');
@@ -1746,6 +1766,8 @@
1746
1766
  else {
1747
1767
  end();
1748
1768
  }
1769
+
1770
+ return sessions
1749
1771
  }
1750
1772
 
1751
1773
  function planNextStep () {
@@ -2316,19 +2338,25 @@
2316
2338
  }
2317
2339
  }
2318
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
+
2319
2354
  // vnodes from rendered in advanced slots
2320
2355
  function getNormalizedVNodes (vnodes) {
2321
2356
  const children = new Set();
2322
2357
 
2323
2358
  vnodes.forEach(vnode => {
2324
- if (typeof vnode.type === 'symbol' && Array.isArray(vnode.children) === true) {
2325
- vnode.children.forEach(child => {
2326
- children.add(child);
2327
- });
2328
- }
2329
- else {
2330
- children.add(vnode);
2331
- }
2359
+ fillNormalizedVNodes(children, vnode);
2332
2360
  });
2333
2361
 
2334
2362
  return Array.from(children)
@@ -2379,7 +2407,7 @@
2379
2407
  hSlot(slots.default)
2380
2408
  );
2381
2409
 
2382
- if (vnodes === void 0) { return }
2410
+ if (vnodes.length === 0) { return }
2383
2411
 
2384
2412
  let els = 1;
2385
2413
 
@@ -4040,7 +4068,7 @@
4040
4068
  vue.watch(() => props.modelValue, processModelChange);
4041
4069
 
4042
4070
  if (hideOnRouteChange !== void 0 && vmHasRouter(vm) === true) {
4043
- vue.watch(() => proxy.$route, () => {
4071
+ vue.watch(() => proxy.$route.fullPath, () => {
4044
4072
  if (hideOnRouteChange.value === true && showing.value === true) {
4045
4073
  hide();
4046
4074
  }
@@ -5112,7 +5140,7 @@
5112
5140
 
5113
5141
  if (node && node.contains(document.activeElement) !== true) {
5114
5142
  node = node.querySelector('[autofocus], [data-autofocus]') || node;
5115
- node.focus();
5143
+ node.focus({ preventScroll: true });
5116
5144
  }
5117
5145
  });
5118
5146
  }
@@ -5240,6 +5268,7 @@
5240
5268
  // the focus is not in a vue child component
5241
5269
  if (
5242
5270
  handlesFocus.value === true
5271
+ && props.noFocus !== true
5243
5272
  && childHasFocus(innerRef.value, evt.target) !== true
5244
5273
  ) {
5245
5274
  focus();
@@ -6394,7 +6423,7 @@
6394
6423
  let historyEntry, fullscreenFillerNode, container;
6395
6424
  const inFullscreen = vue.ref(false);
6396
6425
 
6397
- vmHasRouter(vm) === true && vue.watch(() => proxy.$route, () => {
6426
+ vmHasRouter(vm) === true && vue.watch(() => proxy.$route.fullPath, () => {
6398
6427
  props.noRouteFullscreenExit !== true && exitFullscreen();
6399
6428
  });
6400
6429
 
@@ -7151,6 +7180,10 @@
7151
7180
  falseValue: { default: false },
7152
7181
  indeterminateValue: { default: null },
7153
7182
 
7183
+ checkedIcon: String,
7184
+ uncheckedIcon: String,
7185
+ indeterminateIcon: String,
7186
+
7154
7187
  toggleOrder: {
7155
7188
  type: String,
7156
7189
  validator: v => v === 'tf' || v === 'ft'
@@ -7363,6 +7396,7 @@
7363
7396
  }
7364
7397
 
7365
7398
  const bgNode = vue.h('div', {
7399
+ key: 'svg',
7366
7400
  class: 'q-checkbox__bg absolute'
7367
7401
  }, [
7368
7402
  vue.h('svg', {
@@ -7389,8 +7423,36 @@
7389
7423
  props: useCheckboxProps,
7390
7424
  emits: useCheckboxEmits,
7391
7425
 
7392
- setup () {
7393
- 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)
7394
7456
  }
7395
7457
  });
7396
7458
 
@@ -9690,7 +9752,15 @@
9690
9752
  unwatchRoute !== void 0 && unwatchRoute();
9691
9753
  });
9692
9754
 
9693
- vue.onActivated(recalculateScroll);
9755
+ let shouldActivate = false;
9756
+
9757
+ vue.onDeactivated(() => {
9758
+ shouldActivate = true;
9759
+ });
9760
+
9761
+ vue.onActivated(() => {
9762
+ shouldActivate === true && recalculateScroll();
9763
+ });
9694
9764
 
9695
9765
  return () => {
9696
9766
  const child = [
@@ -11720,16 +11790,16 @@
11720
11790
  month += sign * mod.months;
11721
11791
  }
11722
11792
 
11723
- if (mod.days !== void 0) {
11724
- day += sign * mod.days;
11725
- }
11726
-
11727
11793
  date.setDate(1);
11728
11794
  date.setMonth(2);
11729
11795
 
11730
11796
  date.setFullYear(year);
11731
11797
  date.setMonth(month);
11732
- date.setDate(day);
11798
+ date.setDate(Math.min(day, daysInMonth(date)));
11799
+
11800
+ if (mod.days !== void 0) {
11801
+ date.setDate(date.getDate() + sign * mod.days);
11802
+ }
11733
11803
 
11734
11804
  return date
11735
11805
  }
@@ -14390,7 +14460,7 @@
14390
14460
  }
14391
14461
 
14392
14462
  node = node.querySelector('[autofocus], [data-autofocus]') || node;
14393
- node.focus();
14463
+ node.focus({ preventScroll: true });
14394
14464
  });
14395
14465
  }
14396
14466
 
@@ -16892,7 +16962,7 @@
16892
16962
 
16893
16963
  function focus () {
16894
16964
  addFocusFn(() => {
16895
- contentRef.value !== null && contentRef.value.focus();
16965
+ contentRef.value !== null && contentRef.value.focus({ preventScroll: true });
16896
16966
  });
16897
16967
  }
16898
16968
 
@@ -20190,12 +20260,16 @@
20190
20260
  let validateIndex = 0, unwatchRules;
20191
20261
 
20192
20262
  const hasRules = vue.computed(() =>
20193
- props.disable !== true
20194
- && props.rules !== void 0
20263
+ props.rules !== void 0
20195
20264
  && props.rules !== null
20196
20265
  && props.rules.length > 0
20197
20266
  );
20198
20267
 
20268
+ const hasActiveRules = vue.computed(() =>
20269
+ props.disable !== true
20270
+ && hasRules.value === true
20271
+ );
20272
+
20199
20273
  const hasError = vue.computed(() =>
20200
20274
  props.error === true || innerError.value === true
20201
20275
  );
@@ -20233,7 +20307,7 @@
20233
20307
  else if (isDirtyModel.value === false) {
20234
20308
  isDirtyModel.value = true;
20235
20309
 
20236
- if (hasRules.value === true && props.lazyRules !== 'ondemand') {
20310
+ if (hasActiveRules.value === true && props.lazyRules !== 'ondemand') {
20237
20311
  debouncedValidate();
20238
20312
  }
20239
20313
  }
@@ -20255,7 +20329,7 @@
20255
20329
  * - Promise (pending async validation)
20256
20330
  */
20257
20331
  function validate (val = props.modelValue) {
20258
- if (hasRules.value !== true) {
20332
+ if (hasActiveRules.value !== true) {
20259
20333
  return true
20260
20334
  }
20261
20335
 
@@ -20343,7 +20417,7 @@
20343
20417
 
20344
20418
  function validateIfNeeded (changedRules) {
20345
20419
  if (
20346
- hasRules.value === true
20420
+ hasActiveRules.value === true
20347
20421
  && props.lazyRules !== 'ondemand'
20348
20422
  && (isDirtyModel.value === true || (props.lazyRules !== true && changedRules !== true))
20349
20423
  ) {
@@ -20629,7 +20703,7 @@
20629
20703
  if (target && (el === null || el.id !== state.targetUid.value)) {
20630
20704
  target.hasAttribute('tabindex') === true || (target = target.querySelector('[tabindex]'));
20631
20705
  if (target && target !== el) {
20632
- target.focus();
20706
+ target.focus({ preventScroll: true });
20633
20707
  }
20634
20708
  }
20635
20709
  }
@@ -20647,6 +20721,7 @@
20647
20721
  }
20648
20722
 
20649
20723
  function onControlFocusin (e) {
20724
+ clearTimeout(focusoutTimer);
20650
20725
  if (state.editable.value === true && state.focused.value === false) {
20651
20726
  state.focused.value = true;
20652
20727
  emit('focus', e);
@@ -20659,13 +20734,9 @@
20659
20734
  if (
20660
20735
  document.hasFocus() === true && (
20661
20736
  state.hasPopupOpen === true
20662
- || (
20663
- state.controlRef !== void 0
20664
- && (
20665
- state.controlRef.value === null
20666
- || state.controlRef.value.contains(document.activeElement) !== false
20667
- )
20668
- )
20737
+ || state.controlRef === void 0
20738
+ || state.controlRef.value === null
20739
+ || state.controlRef.value.contains(document.activeElement) !== false
20669
20740
  )
20670
20741
  ) {
20671
20742
  return
@@ -20891,6 +20962,16 @@
20891
20962
  // expose public methods
20892
20963
  Object.assign(proxy, { focus, blur });
20893
20964
 
20965
+ let shouldActivate = false;
20966
+
20967
+ vue.onDeactivated(() => {
20968
+ shouldActivate = true;
20969
+ });
20970
+
20971
+ vue.onActivated(() => {
20972
+ shouldActivate === true && props.autofocus === true && proxy.focus();
20973
+ });
20974
+
20894
20975
  vue.onMounted(() => {
20895
20976
  if (isRuntimeSsrPreHydration.value === true && props.for === void 0) {
20896
20977
  state.targetUid.value = getTargetUid();
@@ -21600,7 +21681,7 @@
21600
21681
  const target = rootRef.value.querySelector('[autofocus], [data-autofocus]')
21601
21682
  || Array.prototype.find.call(rootRef.value.querySelectorAll('[tabindex]'), el => el.tabIndex > -1);
21602
21683
 
21603
- target !== null && target !== void 0 && target.focus();
21684
+ target !== null && target !== void 0 && target.focus({ preventScroll: true });
21604
21685
  });
21605
21686
  }
21606
21687
 
@@ -21617,6 +21698,16 @@
21617
21698
  }
21618
21699
  });
21619
21700
 
21701
+ let shouldActivate = false;
21702
+
21703
+ vue.onDeactivated(() => {
21704
+ shouldActivate = true;
21705
+ });
21706
+
21707
+ vue.onActivated(() => {
21708
+ shouldActivate === true && props.autofocus === true && focus();
21709
+ });
21710
+
21620
21711
  vue.onMounted(() => {
21621
21712
  props.autofocus === true && focus();
21622
21713
  });
@@ -22174,7 +22265,6 @@
22174
22265
  const rootRef = vue.ref(null);
22175
22266
 
22176
22267
  let index = props.initialIndex || 0;
22177
- let scrollPos = false;
22178
22268
  let localScrollTarget, poll;
22179
22269
 
22180
22270
  const classes = vue.computed(() =>
@@ -22313,8 +22403,10 @@
22313
22403
  vue.watch(() => props.scrollTarget, updateScrollTarget);
22314
22404
  vue.watch(() => props.debounce, setDebounce);
22315
22405
 
22406
+ let scrollPos = false;
22407
+
22316
22408
  vue.onActivated(() => {
22317
- if (localScrollTarget && scrollPos !== false) {
22409
+ if (scrollPos !== false && localScrollTarget) {
22318
22410
  setVerticalScrollPosition(localScrollTarget, scrollPos);
22319
22411
  }
22320
22412
  });
@@ -23121,6 +23213,15 @@
23121
23213
  return attrs
23122
23214
  });
23123
23215
 
23216
+ // some browsers lose the native input value
23217
+ // so we need to reattach it dynamically
23218
+ // (like type="password" <-> type="text"; see #12078)
23219
+ vue.watch(() => props.type, () => {
23220
+ if (inputRef.value) {
23221
+ inputRef.value.value = props.modelValue;
23222
+ }
23223
+ });
23224
+
23124
23225
  vue.watch(() => props.modelValue, v => {
23125
23226
  if (hasMask.value === true) {
23126
23227
  if (stopValueWatcher === true) {
@@ -23173,7 +23274,7 @@
23173
23274
  && inputRef.value !== el
23174
23275
  && (el === null || el.id !== state.targetUid.value)
23175
23276
  ) {
23176
- inputRef.value.focus();
23277
+ inputRef.value.focus({ preventScroll: true });
23177
23278
  }
23178
23279
  });
23179
23280
  }
@@ -24340,6 +24441,7 @@
24340
24441
  });
24341
24442
 
24342
24443
  const svg$m = vue.h('svg', {
24444
+ key: 'svg',
24343
24445
  class: 'q-radio__bg absolute non-selectable',
24344
24446
  viewBox: '0 0 24 24',
24345
24447
  'aria-hidden': 'true'
@@ -24368,6 +24470,9 @@
24368
24470
  label: String,
24369
24471
  leftLabel: Boolean,
24370
24472
 
24473
+ checkedIcon: String,
24474
+ uncheckedIcon: String,
24475
+
24371
24476
  color: String,
24372
24477
  keepColor: Boolean,
24373
24478
  dense: Boolean,
@@ -24409,6 +24514,13 @@
24409
24514
  + `q-radio__inner--${ isTrue.value === true ? 'truthy' : 'falsy' }${ color }`
24410
24515
  });
24411
24516
 
24517
+ const icon = vue.computed(() =>
24518
+ (isTrue.value === true
24519
+ ? props.checkedIcon
24520
+ : props.uncheckedIcon
24521
+ ) || null
24522
+ );
24523
+
24412
24524
  const tabindex = vue.computed(() => (
24413
24525
  props.disable === true ? -1 : props.tabindex || 0
24414
24526
  ));
@@ -24454,7 +24566,19 @@
24454
24566
  Object.assign(proxy, { set: onClick });
24455
24567
 
24456
24568
  return () => {
24457
- const content = [ svg$m ];
24569
+ const content = icon.value !== null
24570
+ ? [
24571
+ vue.h('div', {
24572
+ key: 'icon',
24573
+ class: 'q-radio__icon-container absolute flex flex-center no-wrap'
24574
+ }, [
24575
+ vue.h(QIcon, {
24576
+ class: 'q-radio__icon',
24577
+ name: icon.value
24578
+ })
24579
+ ])
24580
+ ]
24581
+ : [ svg$m ];
24458
24582
 
24459
24583
  props.disable !== true && injectFormInput(
24460
24584
  content,
@@ -24506,10 +24630,6 @@
24506
24630
  ...useCheckboxProps,
24507
24631
 
24508
24632
  icon: String,
24509
- checkedIcon: String,
24510
- uncheckedIcon: String,
24511
- indeterminateIcon: String,
24512
-
24513
24633
  iconColor: String
24514
24634
  },
24515
24635
 
@@ -24517,29 +24637,25 @@
24517
24637
 
24518
24638
  setup (props) {
24519
24639
  function getInner (isTrue, isIndeterminate) {
24520
- const computedIcon = vue.computed(() =>
24640
+ const icon = vue.computed(() =>
24521
24641
  (isTrue.value === true
24522
24642
  ? props.checkedIcon
24523
24643
  : (isIndeterminate.value === true ? props.indeterminateIcon : props.uncheckedIcon)
24524
24644
  ) || props.icon
24525
24645
  );
24526
24646
 
24527
- const computedIconColor = vue.computed(() => {
24528
- if (isTrue.value === true) {
24529
- return props.iconColor
24530
- }
24531
- });
24647
+ const color = vue.computed(() => (isTrue.value === true ? props.iconColor : null));
24532
24648
 
24533
24649
  return () => [
24534
24650
  vue.h('div', { class: 'q-toggle__track' }),
24535
24651
 
24536
24652
  vue.h('div', {
24537
24653
  class: 'q-toggle__thumb absolute flex flex-center no-wrap'
24538
- }, computedIcon.value !== void 0
24654
+ }, icon.value !== void 0
24539
24655
  ? [
24540
24656
  vue.h(QIcon, {
24541
- name: computedIcon.value,
24542
- color: computedIconColor.value
24657
+ name: icon.value,
24658
+ color: color.value
24543
24659
  })
24544
24660
  ]
24545
24661
  : void 0
@@ -27110,6 +27226,26 @@
27110
27226
  }
27111
27227
  });
27112
27228
 
27229
+ let scrollPosition = null;
27230
+
27231
+ vue.onDeactivated(() => {
27232
+ scrollPosition = {
27233
+ top: scroll.vertical.position.value,
27234
+ left: scroll.horizontal.position.value
27235
+ };
27236
+ });
27237
+
27238
+ vue.onActivated(() => {
27239
+ if (scrollPosition === null) { return }
27240
+
27241
+ const scrollTarget = targetRef.value;
27242
+
27243
+ if (scrollTarget !== null) {
27244
+ setHorizontalScrollPosition(scrollTarget, scrollPosition.left);
27245
+ setVerticalScrollPosition(scrollTarget, scrollPosition.top);
27246
+ }
27247
+ });
27248
+
27113
27249
  vue.onBeforeUnmount(emitScroll.cancel);
27114
27250
 
27115
27251
  return () => {
@@ -27737,13 +27873,14 @@
27737
27873
  prevToIndex = -1;
27738
27874
  prevScrollStart = void 0;
27739
27875
 
27876
+ virtualScrollPaddingBefore.value = sumSize(virtualScrollSizesAgg, virtualScrollSizes, 0, virtualScrollSliceRange.value.from);
27877
+ virtualScrollPaddingAfter.value = sumSize(virtualScrollSizesAgg, virtualScrollSizes, virtualScrollSliceRange.value.to, virtualScrollLength.value);
27878
+
27740
27879
  if (toIndex >= 0) {
27741
27880
  updateVirtualScrollSizes(virtualScrollSliceRange.value.from);
27742
27881
  vue.nextTick(() => { scrollTo(toIndex); });
27743
27882
  }
27744
27883
  else {
27745
- virtualScrollPaddingBefore.value = sumSize(virtualScrollSizesAgg, virtualScrollSizes, 0, virtualScrollSliceRange.value.from);
27746
- virtualScrollPaddingAfter.value = sumSize(virtualScrollSizesAgg, virtualScrollSizes, virtualScrollSliceRange.value.to, virtualScrollLength.value);
27747
27884
  onVirtualScrollEvt();
27748
27885
  }
27749
27886
  }
@@ -27768,22 +27905,24 @@
27768
27905
 
27769
27906
  localScrollViewSize = scrollViewSize;
27770
27907
 
27771
- const multiplier = 1 + props.virtualScrollSliceRatioBefore + props.virtualScrollSliceRatioAfter;
27908
+ const virtualScrollSliceRatioBefore = parseFloat(props.virtualScrollSliceRatioBefore) || 0;
27909
+ const virtualScrollSliceRatioAfter = parseFloat(props.virtualScrollSliceRatioAfter) || 0;
27910
+ const multiplier = 1 + virtualScrollSliceRatioBefore + virtualScrollSliceRatioAfter;
27772
27911
  const view = scrollViewSize === void 0 || scrollViewSize <= 0
27773
27912
  ? 1
27774
27913
  : Math.ceil(scrollViewSize / virtualScrollItemSizeComputed.value);
27775
27914
 
27776
27915
  const baseSize = Math.max(
27777
- 10,
27916
+ 1,
27778
27917
  view,
27779
- Math.ceil(props.virtualScrollSliceSize / multiplier)
27918
+ Math.ceil((props.virtualScrollSliceSize > 0 ? props.virtualScrollSliceSize : 10) / multiplier)
27780
27919
  );
27781
27920
 
27782
27921
  virtualScrollSliceSizeComputed.value = {
27783
27922
  total: Math.ceil(baseSize * multiplier),
27784
- start: Math.ceil(baseSize * props.virtualScrollSliceRatioBefore),
27785
- center: Math.ceil(baseSize * (0.5 + props.virtualScrollSliceRatioBefore)),
27786
- end: Math.ceil(baseSize * (1 + props.virtualScrollSliceRatioBefore)),
27923
+ start: Math.ceil(baseSize * virtualScrollSliceRatioBefore),
27924
+ center: Math.ceil(baseSize * (0.5 + virtualScrollSliceRatioBefore)),
27925
+ end: Math.ceil(baseSize * (1 + virtualScrollSliceRatioBefore)),
27787
27926
  view
27788
27927
  };
27789
27928
  }
@@ -27869,7 +28008,15 @@
27869
28008
  setVirtualScrollSize();
27870
28009
  });
27871
28010
 
28011
+ let shouldActivate = false;
28012
+
28013
+ vue.onDeactivated(() => {
28014
+ shouldActivate = true;
28015
+ });
28016
+
27872
28017
  vue.onActivated(() => {
28018
+ if (shouldActivate !== true) { return }
28019
+
27873
28020
  const scrollEl = getVirtualScrollTarget();
27874
28021
 
27875
28022
  if (prevScrollStart !== void 0 && scrollEl !== void 0 && scrollEl !== null && scrollEl.nodeType !== 8) {
@@ -28496,8 +28643,12 @@
28496
28643
  return innerOptionsValue.value.find(v => isDeepEqual(v, val)) !== void 0
28497
28644
  }
28498
28645
 
28499
- function selectInputText () {
28500
- if (props.useInput === true && targetRef.value !== null) {
28646
+ function selectInputText (e) {
28647
+ if (
28648
+ props.useInput === true
28649
+ && targetRef.value !== null
28650
+ && (e === void 0 || (targetRef.value === e.target && e.target.value === selectedString.value))
28651
+ ) {
28501
28652
  targetRef.value.select();
28502
28653
  }
28503
28654
  }
@@ -28867,7 +29018,7 @@
28867
29018
  type: 'search',
28868
29019
  ...comboboxAttrs.value,
28869
29020
  ...state.splitAttrs.attributes.value,
28870
- id: state.targetUid.value,
29021
+ id: isTarget === true ? state.targetUid.value : void 0,
28871
29022
  maxlength: props.maxlength,
28872
29023
  autocomplete: props.autocomplete,
28873
29024
  'data-autofocus': (fromDialog !== true && props.autofocus === true) || void 0,
@@ -28878,7 +29029,7 @@
28878
29029
 
28879
29030
  if (fromDialog !== true && hasDialog === true) {
28880
29031
  if (Array.isArray(data.class) === true) {
28881
- data.class[ 0 ] += ' no-pointer-events';
29032
+ data.class = [ ...data.class, 'no-pointer-events' ];
28882
29033
  }
28883
29034
  else {
28884
29035
  data.class += ' no-pointer-events';
@@ -29271,7 +29422,7 @@
29271
29422
  filter, updateMenuPosition, updateInputValue,
29272
29423
  isOptionSelected,
29273
29424
  getEmittingOptionValue,
29274
- isOptionDisabled: (...args) => isOptionDisabled.value.apply(null, args),
29425
+ isOptionDisabled: (...args) => isOptionDisabled.value.apply(null, args) === true,
29275
29426
  getOptionValue: (...args) => getOptionValue.value.apply(null, args),
29276
29427
  getOptionLabel: (...args) => getOptionLabel.value.apply(null, args)
29277
29428
  });
@@ -29344,13 +29495,13 @@
29344
29495
  child.push(getInput(fromDialog, isTarget));
29345
29496
  }
29346
29497
  // there can be only one (when dialog is opened the control in dialog should be target)
29347
- else if (state.editable.value === true && isTarget === true) {
29498
+ else if (state.editable.value === true) {
29348
29499
  child.push(
29349
29500
  vue.h('div', {
29350
- ref: targetRef,
29501
+ ref: isTarget === true ? targetRef : void 0,
29351
29502
  key: 'd_t',
29352
29503
  class: 'q-select__focus-target',
29353
- id: state.targetUid.value,
29504
+ id: isTarget === true ? state.targetUid.value : void 0,
29354
29505
  ...comboboxAttrs.value,
29355
29506
  onKeydown: onTargetKeydown,
29356
29507
  onKeyup: onTargetKeyup,
@@ -29358,7 +29509,7 @@
29358
29509
  })
29359
29510
  );
29360
29511
 
29361
- if (typeof props.autocomplete === 'string' && props.autocomplete.length > 0) {
29512
+ if (isTarget === true && typeof props.autocomplete === 'string' && props.autocomplete.length > 0) {
29362
29513
  child.push(
29363
29514
  vue.h('input', {
29364
29515
  class: 'q-select__autocomplete-input',
@@ -32067,7 +32218,9 @@
32067
32218
  error: Boolean
32068
32219
  },
32069
32220
 
32070
- setup (props, { slots }) {
32221
+ setup (props, { attrs, slots }) {
32222
+ const { proxy: { $q } } = vue.getCurrentInstance();
32223
+
32071
32224
  const $stepper = vue.inject(stepperKey, () => {
32072
32225
  console.error('QStep needs to be child of QStepper');
32073
32226
  });
@@ -32078,18 +32231,21 @@
32078
32231
 
32079
32232
  const isActive = vue.computed(() => $stepper.value.modelValue === props.name);
32080
32233
 
32081
- vue.watch(isActive, active => {
32082
- if (
32083
- active === true
32084
- && $stepper.value.vertical === true
32085
- ) {
32086
- vue.nextTick(() => {
32087
- if (rootRef.value !== null) {
32088
- rootRef.value.scrollTop = 0;
32234
+ const scrollEvent = vue.computed(() => (
32235
+ ($q.platform.is.ios !== true && $q.platform.is.chrome === true)
32236
+ || isActive.value !== true
32237
+ || $stepper.value.vertical !== true
32238
+ ? {}
32239
+ : {
32240
+ onScroll (e) {
32241
+ const { target } = e;
32242
+ if (target.scrollTop > 0) {
32243
+ target.scrollTop = 0;
32244
+ }
32245
+ attrs.onScroll !== void 0 && attrs.onScroll(e);
32089
32246
  }
32090
- });
32091
- }
32092
- });
32247
+ }
32248
+ ));
32093
32249
 
32094
32250
  const contentKey = vue.computed(() => (
32095
32251
  typeof props.name === 'string' || typeof props.name === 'number'
@@ -32125,7 +32281,7 @@
32125
32281
 
32126
32282
  return () => vue.h(
32127
32283
  'div',
32128
- { ref: rootRef, class: 'q-stepper__step' },
32284
+ { ref: rootRef, class: 'q-stepper__step', ...scrollEvent.value },
32129
32285
  $stepper.value.vertical === true
32130
32286
  ? [
32131
32287
  vue.h(StepHeader, {
@@ -35895,9 +36051,11 @@
35895
36051
 
35896
36052
  if (hasSelection.value) {
35897
36053
  if (meta.selectable) {
35898
- const val = meta.key !== props.selected ? meta.key : null;
35899
- if (props.noSelectionUnset !== true || val !== null) {
35900
- emit('update:selected', val);
36054
+ if (props.noSelectionUnset === false) {
36055
+ emit('update:selected', meta.key !== props.selected ? meta.key : null);
36056
+ }
36057
+ else if (meta.key !== props.selected) {
36058
+ emit('update:selected', meta.key || null);
35901
36059
  }
35902
36060
  }
35903
36061
  }
@@ -38339,11 +38497,11 @@
38339
38497
  Object.assign(this, {
38340
38498
  start (speed) {
38341
38499
  barRef.value.start(speed);
38342
- Plugin$3.isActive = barRef.value.calls > 0;
38500
+ Plugin$3.isActive = true;
38343
38501
  },
38344
38502
  stop () {
38345
- barRef.value.stop();
38346
- Plugin$3.isActive = barRef.value.calls > 0;
38503
+ const sessions = barRef.value.stop();
38504
+ Plugin$3.isActive = sessions > 0;
38347
38505
  },
38348
38506
  increment () {
38349
38507
  barRef.value.increment.apply(null, arguments);
@@ -39281,7 +39439,7 @@
39281
39439
  });
39282
39440
 
39283
39441
  var index_umd = {
39284
- version: '2.4.10',
39442
+ version: '2.5.0',
39285
39443
  install (app, opts) {
39286
39444
  installQuasar(app, {
39287
39445
  components,