@quidgest/ui 0.20.1 → 0.21.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 (151) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/README.md +10 -0
  3. package/dist/json/api.json +219 -3
  4. package/dist/manifest/components.json +1 -0
  5. package/dist/ui.css +239 -248
  6. package/dist/ui.esm.js +1306 -1139
  7. package/dist/ui.js +788 -621
  8. package/dist/ui.min.css +1 -1
  9. package/dist/ui.min.js +788 -621
  10. package/dist/ui.scss +291 -34
  11. package/esm/components/QAccordion/QAccordionItem.vue.js +1 -1
  12. package/esm/components/QBadge/QBadge.d.ts.map +1 -1
  13. package/esm/components/QBadge/QBadge.vue.js +20 -24
  14. package/esm/components/QButton/QButton.d.ts.map +1 -1
  15. package/esm/components/QButton/QButton.vue.js +32 -29
  16. package/esm/components/QCheckbox/QCheckbox.vue.js +1 -1
  17. package/esm/components/QDialog/QDialog.d.ts +4 -2
  18. package/esm/components/QDialog/QDialog.d.ts.map +1 -1
  19. package/esm/components/QDialog/QDialog.vue.js +84 -74
  20. package/esm/components/QDialog/QDialogProvider.d.ts.map +1 -1
  21. package/esm/components/QDialog/QDialogProvider.vue.js +21 -12
  22. package/esm/components/QDialog/index.d.ts +72 -3
  23. package/esm/components/QDialog/index.d.ts.map +1 -1
  24. package/esm/components/QDialog/types.d.ts +10 -1
  25. package/esm/components/QDialog/types.d.ts.map +1 -1
  26. package/esm/components/QDismissibleLayer/QDismissibleLayer.d.ts.map +1 -1
  27. package/esm/components/QDismissibleLayer/QDismissibleLayer.vue.js +9 -8
  28. package/esm/components/QDivider/QDivider.d.ts.map +1 -1
  29. package/esm/components/QDivider/QDivider.vue.js +3 -3
  30. package/esm/components/QFileUpload/QFileUpload.vue.js +1 -1
  31. package/esm/components/QGauge/QGauge.vue.js +1 -1
  32. package/esm/components/QList/QListItem.d.ts.map +1 -1
  33. package/esm/components/QList/QListItem.vue.js +5 -2
  34. package/esm/components/QList/QListItemGroup.vue.js +1 -1
  35. package/esm/components/QObfuscation/QObfuscation.d.ts +1 -1
  36. package/esm/components/QObfuscation/QObfuscation.d.ts.map +1 -1
  37. package/esm/components/QObfuscation/QObfuscation.vue.js +53 -56
  38. package/esm/components/QObfuscation/index.d.ts +6 -6
  39. package/esm/components/QObfuscation/types.d.ts +1 -1
  40. package/esm/components/QObfuscation/types.d.ts.map +1 -1
  41. package/esm/components/QOverflow/QOverflow.d.ts +43 -0
  42. package/esm/components/QOverflow/QOverflow.d.ts.map +1 -0
  43. package/esm/components/QOverflow/QOverflow.vue.js +281 -0
  44. package/esm/components/QOverflow/QOverflow2.vue.js +5 -0
  45. package/esm/components/QOverflow/constants.d.ts +30 -0
  46. package/esm/components/QOverflow/constants.d.ts.map +1 -0
  47. package/esm/components/QOverflow/constants.js +12 -0
  48. package/esm/components/QOverflow/index.d.ts +58 -0
  49. package/esm/components/QOverflow/index.d.ts.map +1 -0
  50. package/esm/components/QOverflow/index.js +6 -0
  51. package/esm/components/QOverflow/types.d.ts +119 -0
  52. package/esm/components/QOverflow/types.d.ts.map +1 -0
  53. package/esm/components/QPhoneField/QPhoneField.d.ts.map +1 -1
  54. package/esm/components/QPhoneField/QPhoneField.vue.js +1 -1
  55. package/esm/components/QPropertyList/QPropertyListGroup.vue.js +1 -1
  56. package/esm/components/QPropertyList/QPropertyListRow.vue.js +1 -1
  57. package/esm/components/QPropertyList/index.d.ts.map +1 -1
  58. package/esm/components/QRadioGroup/QRadioButton.vue.js +1 -1
  59. package/esm/components/QRadioGroup/QRadioGroup.vue.js +2 -2
  60. package/esm/components/QSelect/QSelect.d.ts.map +1 -1
  61. package/esm/components/QSelect/QSelect.vue.js +1 -1
  62. package/esm/components/QSidebar/QSidebar.d.ts.map +1 -1
  63. package/esm/components/QSidebar/QSidebar.vue.js +19 -10
  64. package/esm/components/QSidebar/QSidebarItem.d.ts.map +1 -1
  65. package/esm/components/QSidebar/QSidebarItem.vue.js +51 -49
  66. package/esm/components/QSidebar/context.d.ts +7 -0
  67. package/esm/components/QSidebar/context.d.ts.map +1 -1
  68. package/esm/components/QSwitch/QSwitch.vue.js +1 -1
  69. package/esm/components/QTabs/QTab.d.ts.map +1 -1
  70. package/esm/components/QTabs/QTab.vue.js +52 -50
  71. package/esm/components/QTabs/QTabs.d.ts.map +1 -1
  72. package/esm/components/QTabs/QTabs.vue.js +37 -12
  73. package/esm/components/QTabs/context.d.ts +7 -0
  74. package/esm/components/QTabs/context.d.ts.map +1 -1
  75. package/esm/components/QTextArea/QTextArea.vue.js +1 -1
  76. package/esm/components/QTextField/QTextField.d.ts.map +1 -1
  77. package/esm/components/QTextField/QTextField.vue.js +1 -1
  78. package/esm/components/QThemeProvider/QThemeProvider.vue.js +1 -1
  79. package/esm/components/QToast/QToast.d.ts +4 -2
  80. package/esm/components/QToast/QToast.d.ts.map +1 -1
  81. package/esm/components/QToast/QToast.vue.js +80 -67
  82. package/esm/components/QToast/QToaster.d.ts.map +1 -1
  83. package/esm/components/QToast/QToaster.vue.js +21 -16
  84. package/esm/components/QToast/index.d.ts +39 -3
  85. package/esm/components/QToast/index.d.ts.map +1 -1
  86. package/esm/components/QToast/types.d.ts +6 -2
  87. package/esm/components/QToast/types.d.ts.map +1 -1
  88. package/esm/components/QToggleGroup/QToggleGroupItem.vue.js +1 -1
  89. package/esm/components/QTooltip/QTooltip.vue.js +1 -1
  90. package/esm/components/index.d.ts +1 -0
  91. package/esm/components/index.d.ts.map +1 -1
  92. package/esm/components/index.js +58 -56
  93. package/esm/composables/index.d.ts +2 -2
  94. package/esm/composables/index.d.ts.map +1 -1
  95. package/esm/composables/useColor/index.d.ts +46 -17
  96. package/esm/composables/useColor/index.d.ts.map +1 -1
  97. package/esm/composables/useColor/index.js +57 -29
  98. package/esm/composables/useColor/types.d.ts +4 -1
  99. package/esm/composables/useColor/types.d.ts.map +1 -1
  100. package/esm/composables/useDialog/_internal.d.ts +2 -0
  101. package/esm/composables/useDialog/_internal.d.ts.map +1 -0
  102. package/esm/composables/useDialog/_internal.js +65 -0
  103. package/esm/composables/useDialog/index.d.ts +11 -3
  104. package/esm/composables/useDialog/index.d.ts.map +1 -1
  105. package/esm/composables/useDialog/index.js +38 -22
  106. package/esm/composables/useDialog/types.d.ts +25 -11
  107. package/esm/composables/useDialog/types.d.ts.map +1 -1
  108. package/esm/composables/useDismissibleLayerStack/index.d.ts +17 -2
  109. package/esm/composables/useDismissibleLayerStack/index.d.ts.map +1 -1
  110. package/esm/composables/useDismissibleLayerStack/index.js +28 -11
  111. package/esm/composables/useGroup/index.d.ts.map +1 -1
  112. package/esm/composables/useGroup/index.js +12 -1
  113. package/esm/composables/useId/index.d.ts +18 -0
  114. package/esm/composables/useId/index.d.ts.map +1 -0
  115. package/esm/composables/useId/index.js +10 -0
  116. package/esm/composables/useToast/_internal.d.ts +2 -0
  117. package/esm/composables/useToast/_internal.d.ts.map +1 -0
  118. package/esm/composables/useToast/_internal.js +142 -0
  119. package/esm/composables/useToast/index.d.ts +8 -25
  120. package/esm/composables/useToast/index.d.ts.map +1 -1
  121. package/esm/composables/useToast/index.js +29 -26
  122. package/esm/composables/useToast/types.d.ts +31 -17
  123. package/esm/composables/useToast/types.d.ts.map +1 -1
  124. package/esm/framework.d.ts.map +1 -1
  125. package/esm/framework.js +16 -12
  126. package/esm/index.d.ts +1 -0
  127. package/esm/templates/theme.js +39 -39
  128. package/esm/utils/color/contrast.d.ts +11 -4
  129. package/esm/utils/color/contrast.d.ts.map +1 -1
  130. package/esm/utils/color/contrast.js +16 -3
  131. package/esm/utils/color/index.d.ts +1 -0
  132. package/esm/utils/color/index.d.ts.map +1 -1
  133. package/esm/utils/color/merge.d.ts +9 -0
  134. package/esm/utils/color/merge.d.ts.map +1 -1
  135. package/esm/utils/color/merge.js +21 -22
  136. package/esm/utils/color/parse.d.ts +21 -5
  137. package/esm/utils/color/parse.d.ts.map +1 -1
  138. package/esm/utils/color/parse.js +88 -20
  139. package/esm/utils/color/theme-colors.d.ts +35 -0
  140. package/esm/utils/color/theme-colors.d.ts.map +1 -0
  141. package/esm/utils/color/theme-colors.js +25 -0
  142. package/esm/utils/index.js +50 -42
  143. package/package.json +3 -5
  144. package/esm/composables/uid.d.ts +0 -9
  145. package/esm/composables/uid.d.ts.map +0 -1
  146. package/esm/composables/uid.js +0 -8
  147. package/esm/composables/useToast/types.js +0 -4
  148. package/esm/vendors/uuid/dist/native.js +0 -3
  149. package/esm/vendors/uuid/dist/rng.js +0 -11
  150. package/esm/vendors/uuid/dist/stringify.js +0 -8
  151. package/esm/vendors/uuid/dist/v4.js +0 -20
@@ -2,15 +2,15 @@ import { useGroupItem as e } from "../../composables/useGroup/index.js";
2
2
  import { DEFAULT_TEXTS as t } from "../__internal__/QRequiredIndicator/constants.js";
3
3
  import { QButton as n } from "../QButton/index.js";
4
4
  import { QRequiredIndicator as r } from "../__internal__/QRequiredIndicator/index.js";
5
- import { useId as i } from "../../composables/uid.js";
5
+ import { useId as i } from "../../composables/useId/index.js";
6
6
  import { TabsSymbol as a } from "./context.js";
7
- import { Fragment as o, Teleport as s, computed as c, createBlock as l, createCommentVNode as u, createElementBlock as d, createElementVNode as f, createVNode as p, defineComponent as m, inject as h, normalizeClass as g, onBeforeMount as _, onBeforeUnmount as v, openBlock as y, renderSlot as b, toDisplayString as x, toRef as S, unref as C, useTemplateRef as w, vShow as T, withCtx as E, withDirectives as D } from "vue";
7
+ import { Fragment as o, Teleport as s, computed as c, createBlock as l, createCommentVNode as u, createElementBlock as d, createElementVNode as f, createVNode as p, defineComponent as m, inject as h, normalizeClass as g, onBeforeMount as _, onBeforeUnmount as v, openBlock as y, renderSlot as b, toDisplayString as x, toRef as S, unref as C, useTemplateRef as w, vShow as T, watch as E, withCtx as D, withDirectives as O } from "vue";
8
8
  //#region src/components/QTabs/QTab.vue?vue&type=script&setup=true&lang.ts
9
- var O = { class: "q-tab__title" }, k = { class: "q-tab__title-text" }, A = [
9
+ var k = { class: "q-tab__title" }, A = { class: "q-tab__title-text" }, j = [
10
10
  "id",
11
11
  "aria-labelledby",
12
12
  "tabindex"
13
- ], j = /*@__PURE__*/ m({
13
+ ], M = /*@__PURE__*/ m({
14
14
  __name: "QTab",
15
15
  props: {
16
16
  id: {},
@@ -22,77 +22,79 @@ var O = { class: "q-tab__title" }, k = { class: "q-tab__title-text" }, A = [
22
22
  texts: { default: () => t }
23
23
  },
24
24
  setup(t) {
25
- let m = t, j = h(a, void 0);
26
- if (!j) throw Error("QTab: Failed to retrieve tabs context. Ensure the component is used within a QTabs context.");
27
- let M = i(S(m, "value")), N = i(), P = i(), F = e(M);
28
- if (!F) throw Error("QTab: Failed to retrieve group item. Ensure the component is used within a QTabs context.");
29
- let I = w("tabBtn"), L = c(() => j.tabListEl.value), R = c(() => !!m.disabled), z = c(() => {
30
- if (!R.value) return F.isActive.value ? 0 : -1;
31
- }), B = c(() => [
25
+ let m = t, M = h(a, void 0);
26
+ if (!M) throw Error("QTab: Failed to retrieve tabs context. Ensure the component is used within a QTabs context.");
27
+ let N = i(S(m, "value")), P = i(), F = i(), I = e(N);
28
+ if (!I) throw Error("QTab: Failed to retrieve group item. Ensure the component is used within a QTabs context.");
29
+ let L = w("tabBtn"), R = c(() => M.tabListEl.value), z = c(() => !!m.disabled), B = c(() => {
30
+ if (!z.value) return I.isActive.value ? 0 : -1;
31
+ }), V = c(() => [
32
32
  "q-tab",
33
33
  {
34
- "q-tab--active": F.isActive.value,
35
- "q-tab--disabled": R.value
34
+ "q-tab--active": I.isActive.value,
35
+ "q-tab--disabled": z.value
36
36
  },
37
37
  m.class
38
38
  ]);
39
- function V() {
40
- (I.value?.$el)?.focus?.();
41
- }
42
39
  function H() {
43
- R.value || F?.isActive.value || F?.toggle();
40
+ (L.value?.$el)?.focus?.();
44
41
  }
45
42
  function U() {
46
- H();
43
+ z.value || I?.isActive.value || I?.toggle();
44
+ }
45
+ function W() {
46
+ U();
47
47
  }
48
- function W(e) {
49
- let t = j?.direction.value === "horizontal";
48
+ function G(e) {
49
+ let t = M?.direction.value === "horizontal";
50
50
  if (t && e.key === "ArrowRight" || !t && e.key === "ArrowDown") {
51
- e.preventDefault(), j?.focusAdjacent(M.value, 1);
51
+ e.preventDefault(), M?.focusAdjacent(N.value, 1);
52
52
  return;
53
53
  }
54
54
  if (t && e.key === "ArrowLeft" || !t && e.key === "ArrowUp") {
55
- e.preventDefault(), j?.focusAdjacent(M.value, -1);
55
+ e.preventDefault(), M?.focusAdjacent(N.value, -1);
56
56
  return;
57
57
  }
58
58
  if (e.key === "Home") {
59
- e.preventDefault(), j?.focusFirst();
59
+ e.preventDefault(), M?.focusFirst();
60
60
  return;
61
61
  }
62
- e.key === "End" && (e.preventDefault(), j?.focusLast());
62
+ e.key === "End" && (e.preventDefault(), M?.focusLast());
63
63
  }
64
64
  return _(() => {
65
- j.register({
66
- value: M.value,
67
- disabled: R,
68
- tabRef: I,
69
- focus: V,
70
- select: H
65
+ M.register({
66
+ value: N.value,
67
+ disabled: z,
68
+ tabRef: L,
69
+ focus: H,
70
+ select: U
71
71
  });
72
+ }), E(N, (e, t) => {
73
+ e !== t && M.updateValue(t, e);
72
74
  }), v(() => {
73
- j.unregister(M.value);
74
- }), (e, t) => (y(), d(o, null, [L.value ? (y(), l(s, {
75
+ M.unregister(N.value);
76
+ }), (e, t) => (y(), d(o, null, [R.value ? (y(), l(s, {
75
77
  key: 0,
76
- to: L.value
78
+ to: R.value
77
79
  }, [p(C(n), {
78
- id: C(N),
80
+ id: C(P),
79
81
  ref: "tabBtn",
80
82
  borderless: "",
81
83
  role: "tab",
82
84
  variant: "text",
83
- class: g(B.value),
84
- disabled: R.value,
85
- "data-value": C(M),
86
- "aria-selected": C(F).isActive.value,
87
- "aria-controls": C(P),
85
+ class: g(V.value),
86
+ disabled: z.value,
87
+ "data-value": C(N),
88
+ "aria-selected": C(I).isActive.value,
89
+ "aria-controls": C(F),
88
90
  "aria-required": m.required || void 0,
89
- tabindex: z.value,
90
- onClick: U,
91
- onKeydown: W
91
+ tabindex: B.value,
92
+ onClick: W,
93
+ onKeydown: G
92
94
  }, {
93
- default: E(() => [f("span", O, [
95
+ default: D(() => [f("span", k, [
94
96
  b(e.$slots, "title.prepend"),
95
- b(e.$slots, "title", {}, () => [f("span", k, x(m.title), 1)]),
97
+ b(e.$slots, "title", {}, () => [f("span", A, x(m.title), 1)]),
96
98
  m.required ? (y(), l(C(r), {
97
99
  key: 0,
98
100
  announce: "",
@@ -110,14 +112,14 @@ var O = { class: "q-tab__title" }, k = { class: "q-tab__title-text" }, A = [
110
112
  "aria-controls",
111
113
  "aria-required",
112
114
  "tabindex"
113
- ])], 8, ["to"])) : u("v-if", !0), D(f("div", {
114
- id: C(P),
115
+ ])], 8, ["to"])) : u("v-if", !0), O(f("div", {
116
+ id: C(F),
115
117
  class: "q-tabs__panel",
116
118
  role: "tabpanel",
117
- "aria-labelledby": C(N),
118
- tabindex: C(F).isActive.value ? 0 : void 0
119
- }, [b(e.$slots, "default")], 8, A), [[T, C(F).isActive.value]])], 64));
119
+ "aria-labelledby": C(P),
120
+ tabindex: C(I).isActive.value ? 0 : void 0
121
+ }, [b(e.$slots, "default")], 8, j), [[T, C(I).isActive.value]])], 64));
120
122
  }
121
123
  });
122
124
  //#endregion
123
- export { j as default };
125
+ export { M as default };
@@ -1 +1 @@
1
- {"version":3,"file":"QTabs.vue.d.ts","sourceRoot":"","sources":["../../../src/components/QTabs/QTabs.vue"],"names":[],"mappings":"AAuBA;AAyVC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AAiBzC,KAAK,WAAW,GAAG,UAAU,CAAC;AA0S/B,KAAK,iBAAiB,GAAG;IACzB,UAAU,CAAC,EAAE,MAAM,CAAC;CACnB,GAAG,WAAW,CAAC;AAKhB,iBAAS,cAAc;WAmDT,OAAO,IAA6B;;yBAZrB,GAAG;;;;;;;EAiB/B;AAaD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;;;;;;kBAUnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAapG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"QTabs.vue.d.ts","sourceRoot":"","sources":["../../../src/components/QTabs/QTabs.vue"],"names":[],"mappings":"AAuBA;AA2YC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AAiBzC,KAAK,WAAW,GAAG,UAAU,CAAC;AA4V/B,KAAK,iBAAiB,GAAG;IACzB,UAAU,CAAC,EAAE,MAAM,CAAC;CACnB,GAAG,WAAW,CAAC;AAKhB,iBAAS,cAAc;WAmDT,OAAO,IAA6B;;yBAZrB,GAAG;;;;;;;EAiB/B;AAaD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;;;;;;kBAUnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAapG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -105,27 +105,51 @@ var C = ["id"], w = {
105
105
  let e = B();
106
106
  e.length && (e.some((e) => e.value === D.value) || (D.value = e[0].value));
107
107
  }
108
- function H(e) {
109
- A.value = [...A.value, e], V();
108
+ let H;
109
+ function U() {
110
+ H ||= l(() => {
111
+ H = void 0, V();
112
+ });
113
+ }
114
+ function W(e) {
115
+ if (A.value = [...A.value, e], !D.value) {
116
+ V();
117
+ return;
118
+ }
119
+ U();
110
120
  }
111
- function U(e) {
121
+ function G(e) {
112
122
  A.value = A.value.filter((t) => t.value !== e);
113
123
  }
114
- function W(e, t) {
124
+ function K(e, t) {
125
+ if (e === t) return;
126
+ let n = A.value.findIndex((t) => t.value === e);
127
+ if (n !== -1) {
128
+ if (A.value = A.value.map((e, r) => r === n ? {
129
+ ...e,
130
+ value: t
131
+ } : e), D.value === e || D.value === t) {
132
+ D.value = t;
133
+ return;
134
+ }
135
+ V();
136
+ }
137
+ }
138
+ function q(e, t) {
115
139
  let n = B();
116
140
  if (!n.length) return;
117
141
  let r = n.findIndex((t) => t.value === e), i = n[r === -1 ? 0 : (r + t + n.length) % n.length];
118
142
  i.select(), i.focus();
119
143
  }
120
- function G() {
144
+ function J() {
121
145
  let e = B()[0];
122
146
  e && (e.select(), e.focus());
123
147
  }
124
- function K() {
148
+ function Y() {
125
149
  let e = B(), t = e[e.length - 1];
126
150
  t && (t.select(), t.focus());
127
151
  }
128
- return S(() => A.value.map((e) => [e.value, y(e.disabled)]), () => V()), S(() => [
152
+ return S(() => A.value.map((e) => [e.value, y(e.disabled)]), () => U()), S(() => [
129
153
  D.value,
130
154
  A.value.length,
131
155
  c.direction,
@@ -136,11 +160,12 @@ var C = ["id"], w = {
136
160
  }), m(n, {
137
161
  tabListEl: k,
138
162
  direction: r(() => c.direction),
139
- register: H,
140
- unregister: U,
141
- focusAdjacent: W,
142
- focusFirst: G,
143
- focusLast: K
163
+ register: W,
164
+ unregister: G,
165
+ updateValue: K,
166
+ focusAdjacent: q,
167
+ focusFirst: J,
168
+ focusLast: Y
144
169
  }), (e, t) => (p(), a("div", {
145
170
  id: c.id,
146
171
  class: u(F.value)
@@ -62,6 +62,13 @@ export type TabsContext = {
62
62
  * @param value - The tab `value` to remove.
63
63
  */
64
64
  unregister: (value: string) => void;
65
+ /**
66
+ * Updates a registered tab's value in place so keyboard order is preserved.
67
+ *
68
+ * @param oldValue - The previously registered tab value.
69
+ * @param newValue - The updated tab value.
70
+ */
71
+ updateValue: (oldValue: string, newValue: string) => void;
65
72
  /**
66
73
  * Activates and focuses the next or previous enabled tab relative to `currentValue`.
67
74
  *
@@ -1 +1 @@
1
- {"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../src/components/QTabs/context.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,GAAG,EAAE,MAAM,KAAK,CAAA;AACzD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAE7C;;;;;GAKG;AACH,MAAM,MAAM,eAAe,GAAG;IAC7B;;OAEG;IACH,KAAK,EAAE,MAAM,CAAA;IAEb;;;;OAIG;IACH,QAAQ,EAAE,WAAW,CAAC,OAAO,CAAC,CAAA;IAE9B;;OAEG;IACH,MAAM,EAAE,GAAG,CAAC;QAAE,GAAG,CAAC,EAAE,WAAW,CAAA;KAAE,GAAG,WAAW,GAAG,IAAI,CAAC,CAAA;IAEvD;;OAEG;IACH,KAAK,EAAE,MAAM,IAAI,CAAA;IAEjB;;OAEG;IACH,MAAM,EAAE,MAAM,IAAI,CAAA;CAClB,CAAA;AAED;;;;GAIG;AACH,MAAM,MAAM,WAAW,GAAG;IACzB;;;;OAIG;IACH,SAAS,EAAE,GAAG,CAAC,WAAW,GAAG,IAAI,CAAC,CAAA;IAElC;;;;OAIG;IACH,SAAS,EAAE,WAAW,CAAC,cAAc,CAAC,CAAA;IAEtC;;;;OAIG;IACH,QAAQ,EAAE,CAAC,GAAG,EAAE,eAAe,KAAK,IAAI,CAAA;IAExC;;;;OAIG;IACH,UAAU,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IAEnC;;;;;OAKG;IACH,aAAa,EAAE,CAAC,YAAY,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IAE5D;;OAEG;IACH,UAAU,EAAE,MAAM,IAAI,CAAA;IAEtB;;OAEG;IACH,SAAS,EAAE,MAAM,IAAI,CAAA;CACrB,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,UAAU,EAAE,YAAY,CAAC,WAAW,CAAoB,CAAA"}
1
+ {"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../src/components/QTabs/context.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,GAAG,EAAE,MAAM,KAAK,CAAA;AACzD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAE7C;;;;;GAKG;AACH,MAAM,MAAM,eAAe,GAAG;IAC7B;;OAEG;IACH,KAAK,EAAE,MAAM,CAAA;IAEb;;;;OAIG;IACH,QAAQ,EAAE,WAAW,CAAC,OAAO,CAAC,CAAA;IAE9B;;OAEG;IACH,MAAM,EAAE,GAAG,CAAC;QAAE,GAAG,CAAC,EAAE,WAAW,CAAA;KAAE,GAAG,WAAW,GAAG,IAAI,CAAC,CAAA;IAEvD;;OAEG;IACH,KAAK,EAAE,MAAM,IAAI,CAAA;IAEjB;;OAEG;IACH,MAAM,EAAE,MAAM,IAAI,CAAA;CAClB,CAAA;AAED;;;;GAIG;AACH,MAAM,MAAM,WAAW,GAAG;IACzB;;;;OAIG;IACH,SAAS,EAAE,GAAG,CAAC,WAAW,GAAG,IAAI,CAAC,CAAA;IAElC;;;;OAIG;IACH,SAAS,EAAE,WAAW,CAAC,cAAc,CAAC,CAAA;IAEtC;;;;OAIG;IACH,QAAQ,EAAE,CAAC,GAAG,EAAE,eAAe,KAAK,IAAI,CAAA;IAExC;;;;OAIG;IACH,UAAU,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IAEnC;;;;;OAKG;IACH,WAAW,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAA;IAEzD;;;;;OAKG;IACH,aAAa,EAAE,CAAC,YAAY,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IAE5D;;OAEG;IACH,UAAU,EAAE,MAAM,IAAI,CAAA;IAEtB;;OAEG;IACH,SAAS,EAAE,MAAM,IAAI,CAAA;CACrB,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,UAAU,EAAE,YAAY,CAAC,WAAW,CAAoB,CAAA"}
@@ -1,4 +1,4 @@
1
- import { useId as e } from "../../composables/uid.js";
1
+ import { useId as e } from "../../composables/useId/index.js";
2
2
  import { QField as t } from "../QField/index.js";
3
3
  import { useTextareaAutosize as n } from "../../composables/useTextareaAutosize/index.js";
4
4
  import { computed as r, createBlock as i, createElementVNode as a, createSlots as o, defineComponent as s, mergeModels as c, mergeProps as l, normalizeClass as u, onBeforeUnmount as d, openBlock as f, ref as p, renderSlot as m, toHandlers as h, toRef as g, unref as _, useModel as v, vModelText as y, watch as b, withCtx as x, withDirectives as S } from "vue";
@@ -1 +1 @@
1
- {"version":3,"file":"QTextField.vue.d.ts","sourceRoot":"","sources":["../../../src/components/QTextField/QTextField.vue"],"names":[],"mappings":"AAqDA;AAsIC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,GAAG,CAAA;AAKxC,KAAK,WAAW,GAAG,eAAe,CAAC;AAoEpC,KAAK,iBAAiB,GAAG;IACzB,UAAU,CAAC,EAAE,MAAM,CAAC;CACnB,GAAG,WAAW,CAAC;AAKhB,iBAAS,cAAc;WAqIT,OAAO,IAA6B;;iCAjBb,GAAG;gCACJ,GAAG;yBACV,GAAG;wBACH,GAAG;wBACH,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCAmEk2d,GAAG,8CAA8C,GAAG,yBAAyB,GAAG,6DAAmC,GAAG;;;;;;;;;;;;;;;;;;;;EAjDv/d;AAiBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oCA+B62d,GAAG,8CAA8C,GAAG,yBAAyB,GAAG,6DAAmC,GAAG;;;;;;;;;;;;;;;;;;OArBt/d,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAapG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"QTextField.vue.d.ts","sourceRoot":"","sources":["../../../src/components/QTextField/QTextField.vue"],"names":[],"mappings":"AAqDA;AAsIC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,GAAG,CAAA;AAKxC,KAAK,WAAW,GAAG,eAAe,CAAC;AAoEpC,KAAK,iBAAiB,GAAG;IACzB,UAAU,CAAC,EAAE,MAAM,CAAC;CACnB,GAAG,WAAW,CAAC;AAKhB,iBAAS,cAAc;WAqIT,OAAO,IAA6B;;iCAjBb,GAAG;gCACJ,GAAG;yBACV,GAAG;wBACH,GAAG;wBACH,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wCAmE81d,GAAG,8CAA8C,GAAG,yBAAyB,GAAG,6DAAmC,GAAG;;;;;;;;;;;;;;;;;;;;EAjDn/d;AAiBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oCA+By2d,GAAG,8CAA8C,GAAG,yBAAyB,GAAG,6DAAmC,GAAG;;;;;;;;;;;;;;;;;;OArBl/d,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAapG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -1,4 +1,4 @@
1
- import { useId as e } from "../../composables/uid.js";
1
+ import { useId as e } from "../../composables/useId/index.js";
2
2
  import { QField as t } from "../QField/index.js";
3
3
  import { QClearButton as n } from "../__internal__/QClearButton/index.js";
4
4
  import { computed as r, createBlock as i, createCommentVNode as a, createElementVNode as o, createSlots as s, defineComponent as c, mergeModels as l, mergeProps as u, normalizeClass as d, openBlock as f, renderSlot as p, toRef as m, unref as h, useModel as g, useTemplateRef as _, vModelDynamic as v, watch as y, withCtx as b, withDirectives as x } from "vue";
@@ -1,5 +1,5 @@
1
1
  import { provideTheme as e } from "../../composables/theme.js";
2
- import { useId as t } from "../../composables/uid.js";
2
+ import { useId as t } from "../../composables/useId/index.js";
3
3
  import { createElementBlock as n, defineComponent as r, normalizeClass as i, onBeforeUnmount as a, openBlock as o, renderSlot as s, toRef as c, unref as l, watchEffect as u } from "vue";
4
4
  //#region src/components/QThemeProvider/QThemeProvider.vue?vue&type=script&setup=true&lang.ts
5
5
  var d = ["id"], f = /*@__PURE__*/ r({
@@ -1,5 +1,6 @@
1
1
  import { DEFAULT_ICONS } from './constants';
2
2
  import { QToastProps } from '.';
3
+ type __VLS_Props = QToastProps & {};
3
4
  declare function __VLS_template(): {
4
5
  attrs: Partial<{}>;
5
6
  slots: {
@@ -13,15 +14,16 @@ declare function __VLS_template(): {
13
14
  rootEl: any;
14
15
  };
15
16
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
16
- declare const __VLS_component: import('vue').DefineComponent<QToastProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
17
+ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
17
18
  dismiss: () => any;
18
- }, string, import('vue').PublicProps, Readonly<QToastProps> & Readonly<{
19
+ }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
19
20
  onDismiss?: (() => any) | undefined;
20
21
  }>, {
21
22
  variant: import('./types').QToastVariant;
22
23
  color: string;
23
24
  elevation: import('..').QCardElevation;
24
25
  icons: typeof DEFAULT_ICONS;
26
+ entryKey: string;
25
27
  timeout: number;
26
28
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
27
29
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
@@ -1 +1 @@
1
- {"version":3,"file":"QToast.vue.d.ts","sourceRoot":"","sources":["../../../src/components/QToast/QToast.vue"],"names":[],"mappings":"AAwEA;AAyMC,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAa3C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,GAAG,CAAA;AAyHrC,iBAAS,cAAc;WAqOT,OAAO,IAA6B;;iCAdZ,GAAG;gCACJ,GAAG;yBACV,GAAG;yBAEH,GAAG;yBADH,GAAG;;;;EAgBhC;AAoBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;;;;;6EASnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAapG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"QToast.vue.d.ts","sourceRoot":"","sources":["../../../src/components/QToast/QToast.vue"],"names":[],"mappings":"AAwEA;AA0PC,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAc3C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,GAAG,CAAA;AAMpC,KAAK,WAAW,GAAG,WAAW,GAAG,EAG9B,CAAC;AAiKL,iBAAS,cAAc;WAqOT,OAAO,IAA6B;;iCAdZ,GAAG;gCACJ,GAAG;yBACV,GAAG;yBAEH,GAAG;yBADH,GAAG;;;;EAgBhC;AAsBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;;;;cAnaN,MAAM;;6EA4anB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAapG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -1,16 +1,17 @@
1
1
  import { rgbToHex as e } from "../../utils/color/conversion.js";
2
2
  import { parseColor as t } from "../../utils/color/parse.js";
3
3
  import { lighten as n } from "../../utils/color/manipulate.js";
4
- import { useTheme as r } from "../../composables/theme.js";
5
- import { useColor as i } from "../../composables/useColor/index.js";
6
- import { QButton as a } from "../QButton/index.js";
7
- import { QCard as o } from "../QCard/index.js";
8
- import { QIcon as s } from "../QIcon/index.js";
4
+ import { useColor as r } from "../../composables/useColor/index.js";
5
+ import { QButton as i } from "../QButton/index.js";
6
+ import { QCard as a } from "../QCard/index.js";
7
+ import { QIcon as o } from "../QIcon/index.js";
8
+ import { useId as s } from "../../composables/useId/index.js";
9
9
  import { QCol as c, QContainer as l, QRow as u } from "../QGrid/index.js";
10
- import { DEFAULT_ICONS as d } from "./constants.js";
11
- import { computed as f, createBlock as p, createCommentVNode as m, createElementVNode as h, createSlots as g, createVNode as _, defineComponent as v, guardReactiveProps as y, normalizeClass as b, normalizeProps as x, normalizeStyle as S, onMounted as C, onUnmounted as w, openBlock as T, renderSlot as E, toDisplayString as D, toRef as O, unref as k, withCtx as A } from "vue";
10
+ import { ToastSymbol as d } from "../../composables/useToast/_internal.js";
11
+ import { DEFAULT_ICONS as f } from "./constants.js";
12
+ import { computed as p, createBlock as m, createCommentVNode as h, createElementVNode as g, createSlots as _, createVNode as v, defineComponent as y, guardReactiveProps as b, inject as x, normalizeClass as S, normalizeProps as C, normalizeStyle as w, onMounted as T, onUnmounted as E, openBlock as D, renderSlot as O, toDisplayString as k, toRef as A, unref as j, watch as M, withCtx as N } from "vue";
12
13
  //#region src/components/QToast/QToast.vue?vue&type=script&setup=true&lang.ts
13
- var j = { class: "q-toast__title" }, M = /*@__PURE__*/ v({
14
+ var P = { class: "q-toast__title" }, F = /*@__PURE__*/ y({
14
15
  __name: "QToast",
15
16
  props: {
16
17
  id: {},
@@ -22,72 +23,84 @@ var j = { class: "q-toast__title" }, M = /*@__PURE__*/ v({
22
23
  elevation: { default: "medium" },
23
24
  variant: { default: "tonal" },
24
25
  timeout: { default: 5e3 },
25
- icons: { default: () => d }
26
+ icons: { default: () => f },
27
+ entryKey: { default: void 0 }
26
28
  },
27
29
  emits: ["dismiss"],
28
- setup(d, { emit: v }) {
29
- let M = d, N = v, P = r(), { isUtilityColor: F, style: I } = i(O(M, "color")), L = f(() => {
30
- let e = F.value ? `q-toast--${M.color}` : void 0, t = M.block ? "q-toast--block" : void 0, n = M.title ? "q-toast--vertical" : void 0;
30
+ setup(f, { emit: y }) {
31
+ let F = f, I = y, L = s(A(F, "id")), R = F.entryKey ? x(d, null) : null;
32
+ F.entryKey && (R?.registerToastEntry(F.entryKey, L.value), M(L, (e, t) => {
33
+ e === t || !F.entryKey || R?.updateToastEntryId(F.entryKey, e);
34
+ }));
35
+ let { style: z } = r(A(F, "color")), B = p(() => {
36
+ let e = F.block ? "q-toast--block" : void 0, t = F.title ? "q-toast--vertical" : void 0;
31
37
  return [
32
38
  "q-toast",
33
- `q-toast--${M.variant}`,
39
+ `q-toast--${F.variant}`,
34
40
  e,
35
41
  t,
36
- n,
37
- M.class
42
+ F.class
38
43
  ];
39
- }), R = f(() => {
40
- let r = F.value ? W(M.color) : I.value?.mainColor;
44
+ }), V = p(() => {
45
+ let r = z.value?.mainColor;
41
46
  if (r) return e(n(t(r), 88));
42
- }), z = f(() => F.value ? { "--q-toast-tonal-color": R.value } : {
43
- "--q-toast-main-color": I.value?.mainColor,
44
- "--q-toast-on-main-color": I.value?.onMainColor,
45
- "--q-toast-hover-color": I.value?.hoverColor,
46
- "--q-toast-tonal-color": R.value
47
- }), B = f(() => M.variant === "bold" ? "bold" : "ghost"), V;
48
- function H() {
49
- V !== void 0 && window.clearTimeout(V), N("dismiss");
47
+ }), H = p(() => z.value ? {
48
+ "--q-toast-main-color": z.value.mainColor,
49
+ "--q-toast-on-main-color": z.value.onMainColor,
50
+ "--q-toast-hover-color": z.value.hoverColor,
51
+ "--q-toast-tonal-color": V.value
52
+ } : { "--q-toast-tonal-color": V.value }), U = p(() => F.variant === "bold" ? "bold" : "ghost"), W = p(() => F.variant === "tonal" && z.value?.hoverColor ? z.value.hoverColor : F.color), G, K, q;
53
+ function J() {
54
+ G !== void 0 && (window.clearTimeout(G), G = void 0), K = void 0, q = void 0, I("dismiss");
50
55
  }
51
- function U() {
52
- V = window.setTimeout(H, M.timeout);
56
+ function Y(e) {
57
+ q = e, K = Date.now(), G = window.setTimeout(J, e);
53
58
  }
54
- function W(e) {
55
- let t = P.current.value.scheme;
56
- if (e in t) return t[e];
57
- }
58
- return C(() => {
59
- M.timeout > 0 && U();
60
- }), w(() => {
61
- V !== void 0 && window.clearTimeout(V);
62
- }), (e, t) => (T(), p(k(o), {
63
- id: M.id,
64
- elevation: M.elevation,
65
- width: M.block ? "block" : void 0,
66
- class: b(L.value),
67
- style: S(z.value)
68
- }, g({
69
- default: A(() => [_(k(l), {
59
+ return T(() => {
60
+ if (!F.entryKey) {
61
+ F.timeout > 0 && Y(F.timeout);
62
+ return;
63
+ }
64
+ let e = R?.consumeRemainingTimeout(F.entryKey);
65
+ if (e !== void 0) {
66
+ e > 0 ? Y(e) : J();
67
+ return;
68
+ }
69
+ F.timeout > 0 && Y(F.timeout);
70
+ }), E(() => {
71
+ if (G !== void 0 && (window.clearTimeout(G), F.entryKey && R && K !== void 0 && q !== void 0)) {
72
+ let e = Date.now() - K, t = Math.max(0, q - e);
73
+ R.setRemainingTimeout(F.entryKey, t);
74
+ }
75
+ }), (e, t) => (D(), m(j(a), {
76
+ id: j(L),
77
+ elevation: F.elevation,
78
+ width: F.block ? "block" : void 0,
79
+ class: S(B.value),
80
+ style: w(H.value)
81
+ }, _({
82
+ default: N(() => [v(j(l), {
70
83
  fluid: "",
71
84
  class: "q-toast__body"
72
85
  }, {
73
- default: A(() => [_(k(u), {
86
+ default: N(() => [v(j(u), {
74
87
  align: "center",
75
88
  justify: "between"
76
89
  }, {
77
- default: A(() => [_(k(c), null, {
78
- default: A(() => [E(e.$slots, "default", {}, () => [h("span", null, D(M.text), 1)])]),
90
+ default: N(() => [v(j(c), null, {
91
+ default: N(() => [O(e.$slots, "default", {}, () => [g("span", null, k(F.text), 1)])]),
79
92
  _: 3
80
- }), M.title ? m("v-if", !0) : (T(), p(k(c), {
93
+ }), F.title ? h("v-if", !0) : (D(), m(j(c), {
81
94
  key: 0,
82
95
  cols: "auto"
83
96
  }, {
84
- default: A(() => [E(e.$slots, "dismiss", {}, () => [_(k(a), {
97
+ default: N(() => [O(e.$slots, "dismiss", {}, () => [v(j(i), {
85
98
  class: "q-toast__dismiss",
86
- variant: B.value,
87
- color: M.color,
88
- onClick: H
99
+ variant: U.value,
100
+ color: W.value,
101
+ onClick: J
89
102
  }, {
90
- default: A(() => [_(k(s), x(y(M.icons.close)), null, 16)]),
103
+ default: N(() => [v(j(o), C(b(F.icons.close)), null, 16)]),
91
104
  _: 1
92
105
  }, 8, ["variant", "color"])])]),
93
106
  _: 3
@@ -97,28 +110,28 @@ var j = { class: "q-toast__title" }, M = /*@__PURE__*/ v({
97
110
  _: 3
98
111
  })]),
99
112
  _: 2
100
- }, [M.title ? {
113
+ }, [F.title ? {
101
114
  name: "header",
102
- fn: A(() => [_(k(l), { fluid: "" }, {
103
- default: A(() => [_(k(u), {
115
+ fn: N(() => [v(j(l), { fluid: "" }, {
116
+ default: N(() => [v(j(u), {
104
117
  align: "center",
105
118
  justify: "between"
106
119
  }, {
107
- default: A(() => [_(k(c), null, {
108
- default: A(() => [h("div", j, [
109
- e.$slots["title.prepend"] ? E(e.$slots, "title.prepend", { key: 0 }) : m("v-if", !0),
110
- h("h4", null, D(M.title), 1),
111
- e.$slots["title.append"] ? E(e.$slots, "title.append", { key: 1 }) : m("v-if", !0)
120
+ default: N(() => [v(j(c), null, {
121
+ default: N(() => [g("div", P, [
122
+ e.$slots["title.prepend"] ? O(e.$slots, "title.prepend", { key: 0 }) : h("v-if", !0),
123
+ g("h4", null, k(F.title), 1),
124
+ e.$slots["title.append"] ? O(e.$slots, "title.append", { key: 1 }) : h("v-if", !0)
112
125
  ])]),
113
126
  _: 3
114
- }), _(k(c), { cols: "auto" }, {
115
- default: A(() => [E(e.$slots, "dismiss", {}, () => [_(k(a), {
127
+ }), v(j(c), { cols: "auto" }, {
128
+ default: N(() => [O(e.$slots, "dismiss", {}, () => [v(j(i), {
116
129
  class: "q-toast__dismiss",
117
- variant: B.value,
118
- color: M.color,
119
- onClick: H
130
+ variant: U.value,
131
+ color: W.value,
132
+ onClick: J
120
133
  }, {
121
- default: A(() => [_(k(s), x(y(M.icons.close)), null, 16)]),
134
+ default: N(() => [v(j(o), C(b(F.icons.close)), null, 16)]),
122
135
  _: 1
123
136
  }, 8, ["variant", "color"])])]),
124
137
  _: 3
@@ -138,4 +151,4 @@ var j = { class: "q-toast__title" }, M = /*@__PURE__*/ v({
138
151
  }
139
152
  });
140
153
  //#endregion
141
- export { M as default };
154
+ export { F as default };
@@ -1 +1 @@
1
- {"version":3,"file":"QToaster.vue.d.ts","sourceRoot":"","sources":["../../../src/components/QToast/QToaster.vue"],"names":[],"mappings":"AAkBA;AAwDC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,GAAG,CAAA;;;;AAyGvC,wBAQG"}
1
+ {"version":3,"file":"QToaster.vue.d.ts","sourceRoot":"","sources":["../../../src/components/QToast/QToaster.vue"],"names":[],"mappings":"AAmBA;AAgFC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,GAAG,CAAA;;;;AA4HvC,wBAQG"}
@@ -1,8 +1,8 @@
1
- import { useToast as e } from "../../composables/useToast/index.js";
2
- import { QToast as t } from "./index.js";
3
- import { Fragment as n, TransitionGroup as r, computed as i, createBlock as a, createElementBlock as o, createVNode as s, defineComponent as c, mergeProps as l, normalizeClass as u, openBlock as d, renderList as f, unref as p, withCtx as m } from "vue";
1
+ import { injectToastInstance as e, removeToastByEntryKey as t } from "../../composables/useToast/_internal.js";
2
+ import { QToast as n } from "./index.js";
3
+ import { Fragment as r, TransitionGroup as i, computed as a, createBlock as o, createElementBlock as s, createVNode as c, defineComponent as l, mergeProps as u, normalizeClass as d, onUnmounted as f, openBlock as p, renderList as m, unref as h, watch as g, withCtx as _ } from "vue";
4
4
  //#region src/components/QToast/QToaster.vue?vue&type=script&setup=true&lang.ts
5
- var h = /*@__PURE__*/ c({
5
+ var v = /*@__PURE__*/ l({
6
6
  __name: "QToaster",
7
7
  props: {
8
8
  id: {},
@@ -11,22 +11,27 @@ var h = /*@__PURE__*/ c({
11
11
  maxToasts: {},
12
12
  reverseOrder: { type: Boolean }
13
13
  },
14
- setup(c) {
15
- let h = c, { toasts: g, removeToast: _ } = e(), v = i(() => {
16
- let e = [...g.value];
17
- return h.reverseOrder && (e = e.reverse()), e.slice(0, h.maxToasts);
14
+ setup(l) {
15
+ let v = l, y = e(), { toasts: b } = y;
16
+ y.registerToaster(), f(() => y.unregisterToaster()), g(() => v.maxToasts, (e) => y.setMaxToasts(e), { immediate: !0 });
17
+ let x = a(() => {
18
+ let e = [...b.value];
19
+ return v.reverseOrder ? e.reverse() : e;
18
20
  });
19
- return (e, i) => (d(), a(r, {
20
- id: h.id,
21
+ function S(e) {
22
+ t(y, e.entryKey);
23
+ }
24
+ return (e, t) => (p(), o(i, {
25
+ id: v.id,
21
26
  name: "toast-stack",
22
27
  tag: "div",
23
- class: u(["q-toaster", h.class]),
24
- "data-placement": h.placement
28
+ class: d(["q-toaster", v.class]),
29
+ "data-placement": v.placement
25
30
  }, {
26
- default: m(() => [(d(!0), o(n, null, f(v.value, (e) => (d(), o("div", {
27
- key: e.id,
31
+ default: _(() => [(p(!0), s(r, null, m(x.value, (e) => (p(), s("div", {
32
+ key: e.entryKey,
28
33
  class: "q-toast__container"
29
- }, [s(p(t), l({ ref_for: !0 }, e.props, { onDismiss: () => p(_)(e.id) }), null, 16, ["onDismiss"])]))), 128))]),
34
+ }, [c(h(n), u({ "entry-key": e.entryKey }, { ref_for: !0 }, e.props, { onDismiss: () => S(e) }), null, 16, ["entry-key", "onDismiss"])]))), 128))]),
30
35
  _: 1
31
36
  }, 8, [
32
37
  "id",
@@ -36,4 +41,4 @@ var h = /*@__PURE__*/ c({
36
41
  }
37
42
  });
38
43
  //#endregion
39
- export { h as default };
44
+ export { v as default };