quasar 2.22.0 → 2.23.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 (146) hide show
  1. package/dist/api/Mutation.json +1 -1
  2. package/dist/api/QLinearProgress.json +1 -1
  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/fontawesome-v7-pro.umd.prod.js +1 -1
  10. package/dist/icon-set/fontawesome-v7.umd.prod.js +1 -1
  11. package/dist/icon-set/ionicons-v4.umd.prod.js +1 -1
  12. package/dist/icon-set/line-awesome.umd.prod.js +1 -1
  13. package/dist/icon-set/material-icons-outlined.umd.prod.js +1 -1
  14. package/dist/icon-set/material-icons-round.umd.prod.js +1 -1
  15. package/dist/icon-set/material-icons-sharp.umd.prod.js +1 -1
  16. package/dist/icon-set/material-icons.umd.prod.js +1 -1
  17. package/dist/icon-set/material-symbols-outlined.umd.prod.js +1 -1
  18. package/dist/icon-set/material-symbols-rounded.umd.prod.js +1 -1
  19. package/dist/icon-set/material-symbols-sharp.umd.prod.js +1 -1
  20. package/dist/icon-set/mdi-v3.umd.prod.js +1 -1
  21. package/dist/icon-set/mdi-v4.umd.prod.js +1 -1
  22. package/dist/icon-set/mdi-v5.umd.prod.js +1 -1
  23. package/dist/icon-set/mdi-v6.umd.prod.js +1 -1
  24. package/dist/icon-set/mdi-v7.umd.prod.js +1 -1
  25. package/dist/icon-set/svg-bootstrap-icons.umd.prod.js +1 -1
  26. package/dist/icon-set/svg-eva-icons.umd.prod.js +1 -1
  27. package/dist/icon-set/svg-fontawesome-v5.umd.prod.js +1 -1
  28. package/dist/icon-set/svg-fontawesome-v6.umd.prod.js +1 -1
  29. package/dist/icon-set/svg-fontawesome-v7.umd.prod.js +1 -1
  30. package/dist/icon-set/svg-ionicons-v4.umd.prod.js +1 -1
  31. package/dist/icon-set/svg-ionicons-v5.umd.prod.js +1 -1
  32. package/dist/icon-set/svg-ionicons-v6.umd.prod.js +1 -1
  33. package/dist/icon-set/svg-ionicons-v7.umd.prod.js +1 -1
  34. package/dist/icon-set/svg-ionicons-v8.umd.prod.js +1 -1
  35. package/dist/icon-set/svg-line-awesome.umd.prod.js +1 -1
  36. package/dist/icon-set/svg-material-icons-outlined.umd.prod.js +1 -1
  37. package/dist/icon-set/svg-material-icons-round.umd.prod.js +1 -1
  38. package/dist/icon-set/svg-material-icons-sharp.umd.prod.js +1 -1
  39. package/dist/icon-set/svg-material-icons.umd.prod.js +1 -1
  40. package/dist/icon-set/svg-material-symbols-outlined.umd.prod.js +1 -1
  41. package/dist/icon-set/svg-material-symbols-rounded.umd.prod.js +1 -1
  42. package/dist/icon-set/svg-material-symbols-sharp.umd.prod.js +1 -1
  43. package/dist/icon-set/svg-mdi-v6.umd.prod.js +1 -1
  44. package/dist/icon-set/svg-mdi-v7.umd.prod.js +1 -1
  45. package/dist/icon-set/svg-themify.umd.prod.js +1 -1
  46. package/dist/icon-set/themify.umd.prod.js +1 -1
  47. package/dist/lang/ar-TN.umd.prod.js +1 -1
  48. package/dist/lang/ar.umd.prod.js +1 -1
  49. package/dist/lang/az-Latn.umd.prod.js +1 -1
  50. package/dist/lang/bg.umd.prod.js +1 -1
  51. package/dist/lang/bn.umd.prod.js +1 -1
  52. package/dist/lang/bs-BA.umd.prod.js +1 -1
  53. package/dist/lang/ca.umd.prod.js +1 -1
  54. package/dist/lang/cs.umd.prod.js +1 -1
  55. package/dist/lang/da.umd.prod.js +1 -1
  56. package/dist/lang/de-CH.umd.prod.js +1 -1
  57. package/dist/lang/de-DE.umd.prod.js +1 -1
  58. package/dist/lang/de.umd.prod.js +1 -1
  59. package/dist/lang/el.umd.prod.js +1 -1
  60. package/dist/lang/en-GB.umd.prod.js +1 -1
  61. package/dist/lang/en-US.umd.prod.js +1 -1
  62. package/dist/lang/eo.umd.prod.js +1 -1
  63. package/dist/lang/es.umd.prod.js +1 -1
  64. package/dist/lang/et.umd.prod.js +1 -1
  65. package/dist/lang/eu.umd.prod.js +1 -1
  66. package/dist/lang/fa-IR.umd.prod.js +1 -1
  67. package/dist/lang/fa.umd.prod.js +1 -1
  68. package/dist/lang/fi.umd.prod.js +1 -1
  69. package/dist/lang/fr.umd.prod.js +1 -1
  70. package/dist/lang/gn.umd.prod.js +1 -1
  71. package/dist/lang/he.umd.prod.js +1 -1
  72. package/dist/lang/hi.umd.prod.js +1 -1
  73. package/dist/lang/hr.umd.prod.js +1 -1
  74. package/dist/lang/hu.umd.prod.js +1 -1
  75. package/dist/lang/id.umd.prod.js +1 -1
  76. package/dist/lang/is.umd.prod.js +1 -1
  77. package/dist/lang/it.umd.prod.js +1 -1
  78. package/dist/lang/ja.umd.prod.js +1 -1
  79. package/dist/lang/kk.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/lb.umd.prod.js +1 -1
  84. package/dist/lang/lt.umd.prod.js +1 -1
  85. package/dist/lang/lu.umd.prod.js +1 -1
  86. package/dist/lang/lv.umd.prod.js +1 -1
  87. package/dist/lang/mk.umd.prod.js +1 -1
  88. package/dist/lang/ml.umd.prod.js +1 -1
  89. package/dist/lang/mm.umd.prod.js +1 -1
  90. package/dist/lang/ms-MY.umd.prod.js +1 -1
  91. package/dist/lang/ms.umd.prod.js +1 -1
  92. package/dist/lang/my.umd.prod.js +1 -1
  93. package/dist/lang/nb-NO.umd.prod.js +1 -1
  94. package/dist/lang/nl.umd.prod.js +1 -1
  95. package/dist/lang/pl.umd.prod.js +1 -1
  96. package/dist/lang/pt-BR.umd.prod.js +1 -1
  97. package/dist/lang/pt.umd.prod.js +1 -1
  98. package/dist/lang/ro.umd.prod.js +1 -1
  99. package/dist/lang/ru.umd.prod.js +1 -1
  100. package/dist/lang/sk.umd.prod.js +1 -1
  101. package/dist/lang/sl.umd.prod.js +1 -1
  102. package/dist/lang/sm.umd.prod.js +1 -1
  103. package/dist/lang/sq.umd.prod.js +1 -1
  104. package/dist/lang/sr-CYR.umd.prod.js +1 -1
  105. package/dist/lang/sr.umd.prod.js +1 -1
  106. package/dist/lang/sv.umd.prod.js +1 -1
  107. package/dist/lang/ta.umd.prod.js +1 -1
  108. package/dist/lang/th.umd.prod.js +1 -1
  109. package/dist/lang/tl.umd.prod.js +1 -1
  110. package/dist/lang/tr.umd.prod.js +1 -1
  111. package/dist/lang/ug.umd.prod.js +1 -1
  112. package/dist/lang/uk.umd.prod.js +1 -1
  113. package/dist/lang/ur-PK.umd.prod.js +1 -1
  114. package/dist/lang/uz-Cyrl.umd.prod.js +1 -1
  115. package/dist/lang/uz-Latn.umd.prod.js +1 -1
  116. package/dist/lang/vi.umd.prod.js +1 -1
  117. package/dist/lang/zh-CN.umd.prod.js +1 -1
  118. package/dist/lang/zh-TW.umd.prod.js +1 -1
  119. package/dist/quasar.client.js +92 -30
  120. package/dist/quasar.css +16 -11
  121. package/dist/quasar.prod.css +1 -1
  122. package/dist/quasar.rtl.css +20 -20
  123. package/dist/quasar.rtl.prod.css +1 -1
  124. package/dist/quasar.sass +18 -12
  125. package/dist/quasar.server.prod.cjs +4 -4
  126. package/dist/quasar.server.prod.js +4 -4
  127. package/dist/quasar.umd.js +92 -29
  128. package/dist/quasar.umd.prod.js +31 -31
  129. package/dist/transforms/import-map.json +1 -1
  130. package/dist/types/composables.d.ts +5 -0
  131. package/dist/types/index.d.ts +1 -1
  132. package/dist/web-types/web-types.json +1 -1
  133. package/package.json +1 -1
  134. package/src/components/btn/QBtn.js +1 -1
  135. package/src/components/fab/QFab.sass +11 -9
  136. package/src/components/linear-progress/QLinearProgress.js +4 -11
  137. package/src/components/linear-progress/QLinearProgress.json +1 -1
  138. package/src/components/linear-progress/QLinearProgress.sass +7 -2
  139. package/src/composables/private.use-fullscreen/use-fullscreen.js +72 -17
  140. package/src/composables/private.use-fullscreen/use-fullscreen.test.js +158 -0
  141. package/src/composables/use-animation-frame/use-animation-frame.js +47 -0
  142. package/src/composables/use-animation-frame/use-animation-frame.test.js +122 -0
  143. package/src/composables.js +1 -1
  144. package/src/directives/mutation/Mutation.json +1 -1
  145. package/src/utils/private.click-outside/click-outside.js +27 -12
  146. package/src/utils/private.click-outside/click-outside.test.js +132 -0
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Quasar Framework v2.22.0
2
+ * Quasar Framework v2.23.0
3
3
  * (c) 2015-present Razvan Stoenescu
4
4
  * Released under the MIT License.
5
5
  */
@@ -1101,7 +1101,7 @@
1101
1101
  };
1102
1102
  }
1103
1103
  var install_quasar_default = function installQuasar(parentApp, opts = {}) {
1104
- const $q = { version: "2.22.0" };
1104
+ const $q = { version: "2.23.0" };
1105
1105
  if (!globalConfigIsFrozen) {
1106
1106
  if (opts.config !== void 0) Object.assign(globalConfig, opts.config);
1107
1107
  $q.config = { ...globalConfig };
@@ -2441,7 +2441,7 @@
2441
2441
  const blurTarget = blurTargetRef.value;
2442
2442
  if (!destroying && (touchTarget === rootRef.value || mouseTarget === rootRef.value) && blurTarget !== null && blurTarget !== document.activeElement) {
2443
2443
  blurTarget.setAttribute("tabindex", -1);
2444
- blurTarget.focus();
2444
+ blurTarget.focus({ preventScroll: true });
2445
2445
  }
2446
2446
  if (touchTarget === rootRef.value) {
2447
2447
  if (localTouchTargetEl !== null) {
@@ -3285,19 +3285,25 @@
3285
3285
  }
3286
3286
  const target = evt.target;
3287
3287
  if (target === void 0 || target.nodeType === 8 || target.classList.contains("no-pointer-events")) return;
3288
- let portalIndex = portalProxyList.length - 1;
3289
- while (portalIndex >= 0) {
3290
- const proxy = portalProxyList[portalIndex].$;
3291
- if (proxy.type.name === "QTooltip") {
3292
- portalIndex--;
3288
+ let closableContentEls = null;
3289
+ let sawClosablePortal = false;
3290
+ for (let i = portalProxyList.length - 1; i >= 0; i--) {
3291
+ const proxy = portalProxyList[i].$;
3292
+ const name = proxy.type.name;
3293
+ if (name === "QTooltip") continue;
3294
+ if (name === "QDialog") {
3295
+ if (proxy.props.seamless !== true) {
3296
+ if (sawClosablePortal === false) return;
3297
+ closableContentEls = new Set(portalProxyList.slice(i + 1).map((vm) => vm.contentEl));
3298
+ break;
3299
+ }
3293
3300
  continue;
3294
3301
  }
3295
- if (proxy.type.name !== "QDialog") break;
3296
- if (!proxy.props.seamless) return;
3297
- portalIndex--;
3302
+ sawClosablePortal = true;
3298
3303
  }
3299
3304
  for (let i = registeredList.length - 1; i >= 0; i--) {
3300
3305
  const state = registeredList[i];
3306
+ if (closableContentEls !== null && !closableContentEls.has(state.innerRef.value)) return;
3301
3307
  if ((state.anchorEl.value === null || !state.anchorEl.value.contains(target)) && (target === document.body || state.innerRef.value !== null && !state.innerRef.value.contains(target))) {
3302
3308
  evt.qClickOutside = true;
3303
3309
  state.onClickOutside(evt);
@@ -4621,8 +4627,33 @@
4621
4627
  };
4622
4628
  }
4623
4629
  //#endregion
4630
+ //#region src/composables/use-animation-frame/use-animation-frame.js
4631
+ function useAnimationFrame() {
4632
+ let frameId = null;
4633
+ const vm = (0, vue.getCurrentInstance)();
4634
+ function removeAnimationFrame() {
4635
+ if (frameId !== null) {
4636
+ cancelAnimationFrame(frameId);
4637
+ frameId = null;
4638
+ }
4639
+ }
4640
+ (0, vue.onDeactivated)(removeAnimationFrame);
4641
+ (0, vue.onBeforeUnmount)(removeAnimationFrame);
4642
+ return {
4643
+ removeAnimationFrame,
4644
+ registerAnimationFrame(fn) {
4645
+ removeAnimationFrame();
4646
+ if (!vmIsDestroyed(vm)) frameId = requestAnimationFrame(() => {
4647
+ frameId = null;
4648
+ fn();
4649
+ });
4650
+ }
4651
+ };
4652
+ }
4653
+ //#endregion
4624
4654
  //#region src/composables/private.use-fullscreen/use-fullscreen.js
4625
4655
  let counter = 0;
4656
+ let restoreState = null;
4626
4657
  const useFullscreenProps = {
4627
4658
  fullscreen: Boolean,
4628
4659
  noRouteFullscreenExit: Boolean
@@ -4631,8 +4662,10 @@
4631
4662
  function useFullscreen() {
4632
4663
  const vm = (0, vue.getCurrentInstance)();
4633
4664
  const { props, emit, proxy } = vm;
4634
- let historyEntry, fullscreenFillerNode, isUnmounting = false;
4665
+ let historyEntry, fullscreenFillerNode;
4635
4666
  const inFullscreen = (0, vue.ref)(false);
4667
+ const { registerTick, removeTick } = useTick();
4668
+ const { registerAnimationFrame, removeAnimationFrame } = useAnimationFrame();
4636
4669
  if (vmHasRouter(vm)) (0, vue.watch)(() => proxy.$route.fullPath, () => {
4637
4670
  if (!props.noRouteFullscreenExit) exitFullscreen();
4638
4671
  });
@@ -4648,7 +4681,15 @@
4648
4681
  else setFullscreen();
4649
4682
  }
4650
4683
  function setFullscreen() {
4651
- if (inFullscreen.value) return;
4684
+ if (vmIsDestroyed(vm) || inFullscreen.value) return;
4685
+ removeAnimationFrame();
4686
+ removeTick();
4687
+ if (counter === 0) restoreState = {
4688
+ left: getHorizontalScrollPosition(window),
4689
+ top: getVerticalScrollPosition(window),
4690
+ width: window.innerWidth,
4691
+ height: window.innerHeight
4692
+ };
4652
4693
  inFullscreen.value = true;
4653
4694
  proxy.$el.replaceWith(fullscreenFillerNode);
4654
4695
  document.body.append(proxy.$el);
@@ -4657,21 +4698,40 @@
4657
4698
  historyEntry = { handler: exitFullscreen };
4658
4699
  History_default.add(historyEntry);
4659
4700
  }
4660
- function exitFullscreen() {
4701
+ function exitFullscreenImpl(shouldRestoreElement) {
4661
4702
  if (!inFullscreen.value) return;
4662
4703
  if (historyEntry !== void 0) {
4663
4704
  History_default.remove(historyEntry);
4664
4705
  historyEntry = void 0;
4665
4706
  }
4666
- fullscreenFillerNode.replaceWith(proxy.$el);
4707
+ if (shouldRestoreElement === true) fullscreenFillerNode.replaceWith(proxy.$el);
4708
+ else fullscreenFillerNode.remove();
4667
4709
  inFullscreen.value = false;
4668
4710
  counter = Math.max(0, counter - 1);
4669
- if (counter === 0) {
4670
- document.body.classList.remove("q-body--fullscreen-mixin");
4671
- if (!isUnmounting && proxy.$el.scrollIntoView !== void 0) setTimeout(() => {
4711
+ if (counter !== 0) return;
4712
+ document.body.classList.remove("q-body--fullscreen-mixin");
4713
+ if (restoreState === null) return;
4714
+ const { left, top, width, height } = restoreState;
4715
+ restoreState = null;
4716
+ if (vmIsDestroyed(vm)) return;
4717
+ registerTick(() => {
4718
+ if (counter !== 0) return;
4719
+ registerAnimationFrame(() => {
4720
+ if (counter !== 0) return;
4721
+ if (window.innerWidth !== width || window.innerHeight !== height)
4722
+ /**
4723
+ * If user has resized the window while in fullscreen mode,
4724
+ * we cannot restore the scroll position because it will be wrong.
4725
+ * So we just scroll the element into view instead,
4726
+ * which is the best we can do.
4727
+ */
4672
4728
  proxy.$el.scrollIntoView();
4673
- }, 0);
4674
- }
4729
+ else window.scrollTo(left, top);
4730
+ });
4731
+ });
4732
+ }
4733
+ function exitFullscreen() {
4734
+ exitFullscreenImpl(true);
4675
4735
  }
4676
4736
  (0, vue.onBeforeMount)(() => {
4677
4737
  fullscreenFillerNode = document.createElement("span");
@@ -4679,10 +4739,13 @@
4679
4739
  (0, vue.onMounted)(() => {
4680
4740
  if (props.fullscreen) setFullscreen();
4681
4741
  });
4682
- (0, vue.onBeforeUnmount)(() => {
4683
- isUnmounting = true;
4684
- exitFullscreen();
4742
+ (0, vue.onDeactivated)(() => {
4743
+ exitFullscreenImpl(proxy.$el.isConnected);
4744
+ });
4745
+ (0, vue.onActivated)(() => {
4746
+ if (props.fullscreen) setFullscreen();
4685
4747
  });
4748
+ (0, vue.onBeforeUnmount)(exitFullscreen);
4686
4749
  Object.assign(proxy, {
4687
4750
  toggleFullscreen,
4688
4751
  setFullscreen,
@@ -15395,8 +15458,8 @@
15395
15458
  lg: 10,
15396
15459
  xl: 14
15397
15460
  };
15398
- function width(val, reverse, $q) {
15399
- return { transform: reverse ? `translateX(${$q.lang.rtl ? "-" : ""}100%) scale3d(${-val},1,1)` : `scale3d(${val},1,1)` };
15461
+ function width(val) {
15462
+ return { transform: `scale3d(${val},1,1)` };
15400
15463
  }
15401
15464
  var QLinearProgress_default = createComponent({
15402
15465
  name: "QLinearProgress",
@@ -15426,16 +15489,15 @@
15426
15489
  const isDark = useDark(props, proxy.$q);
15427
15490
  const sizeStyle = useSize(props, defaultSizes);
15428
15491
  const motion = (0, vue.computed)(() => props.indeterminate || props.query);
15429
- const widthReverse = (0, vue.computed)(() => props.reverse !== props.query);
15430
15492
  const style = (0, vue.computed)(() => ({
15431
15493
  ...sizeStyle.value !== null ? sizeStyle.value : {},
15432
15494
  "--q-linear-progress-speed": `${props.animationSpeed}ms`
15433
15495
  }));
15434
15496
  const classes = (0, vue.computed)(() => "q-linear-progress" + (props.color !== void 0 ? ` text-${props.color}` : "") + (props.reverse || props.query ? " q-linear-progress--reverse" : "") + (props.rounded ? " rounded-borders" : ""));
15435
- const trackStyle = (0, vue.computed)(() => width(props.buffer !== void 0 ? props.buffer : 1, widthReverse.value, proxy.$q));
15497
+ const trackStyle = (0, vue.computed)(() => width(props.buffer !== void 0 ? props.buffer : 1));
15436
15498
  const transitionSuffix = (0, vue.computed)(() => `with${props.instantFeedback ? "out" : ""}-transition`);
15437
15499
  const trackClass = (0, vue.computed)(() => `q-linear-progress__track absolute-full q-linear-progress__track--${transitionSuffix.value} q-linear-progress__track--${isDark.value ? "dark" : "light"}` + (props.trackColor !== void 0 ? ` bg-${props.trackColor}` : ""));
15438
- const modelStyle = (0, vue.computed)(() => width(motion.value ? 1 : props.value, widthReverse.value, proxy.$q));
15500
+ const modelStyle = (0, vue.computed)(() => width(motion.value ? 1 : props.value));
15439
15501
  const modelClass = (0, vue.computed)(() => `q-linear-progress__model absolute-full q-linear-progress__model--${transitionSuffix.value} q-linear-progress__model--${motion.value ? "in" : ""}determinate`);
15440
15502
  const stripeStyle = (0, vue.computed)(() => ({ width: `${props.value * 100}%` }));
15441
15503
  const stripeClass = (0, vue.computed)(() => `q-linear-progress__stripe absolute-${props.reverse ? "right" : "left"} q-linear-progress__stripe--${transitionSuffix.value}`);
@@ -26368,6 +26430,7 @@
26368
26430
  //#endregion
26369
26431
  //#region src/composables.js
26370
26432
  var composables_exports = /* @__PURE__ */ __exportAll({
26433
+ useAnimationFrame: () => useAnimationFrame,
26371
26434
  useDialogPluginComponent: () => useDialogPluginComponent,
26372
26435
  useFormChild: () => useFormChild,
26373
26436
  useHydration: () => useHydration,
@@ -26387,7 +26450,7 @@
26387
26450
  */
26388
26451
  if (window.Vue === void 0) console.error("[ Quasar ] Vue is required to run. Please add a script tag for it before loading Quasar.");
26389
26452
  window.Quasar = {
26390
- version: "2.22.0",
26453
+ version: "2.23.0",
26391
26454
  install(app, opts) {
26392
26455
  install_quasar_default(app, {
26393
26456
  components: components_exports,