@orchidui/dashboard 1.8.1-96 → 1.8.1-97

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 (166) hide show
  1. package/dist/Dashboard/Card/OcCard.js +1 -1
  2. package/dist/Dashboard/TextEditor/QuillEditor.js +1 -1
  3. package/dist/{OcCard-B3SCzVwn.js → OcCard-D3be6IMj.js} +58 -54
  4. package/dist/OcCodeBlock-uFQyGnLq.js +37 -0
  5. package/dist/{OcLottieAnimation-DeMoIDaX.js → OcLottieAnimation-BB7AK2AO.js} +62 -62
  6. package/dist/{QuillEditor-hFQ0MJZO.js → QuillEditor-DRwC0sgJ.js} +579 -556
  7. package/dist/index.js +4 -4
  8. package/package.json +3 -265
  9. package/dist/AccordionTrigger.vue_vue_type_script_setup_true_lang-BdmLII9i.js +0 -295
  10. package/dist/CalendarPrevButton.vue_vue_type_script_setup_true_lang-DpJRpFhK.js +0 -891
  11. package/dist/CardTitle.vue_vue_type_script_setup_true_lang-D2_Bj3jw.js +0 -68
  12. package/dist/Checkbox.vue_vue_type_script_setup_true_lang-C51LjITJ.js +0 -172
  13. package/dist/CollapsibleTrigger-fCarY5DJ.js +0 -154
  14. package/dist/Collection-COudIl-A.js +0 -55
  15. package/dist/ConfigProvider-7mV0D7Sp.js +0 -6
  16. package/dist/DialogContent.vue_vue_type_script_setup_true_lang-CdrrrG29.js +0 -68
  17. package/dist/DialogOverlay-Cj3UTjZ8.js +0 -309
  18. package/dist/DialogPortal-zAvO8zt4.js +0 -23
  19. package/dist/DialogTrigger-BIF1A4hk.js +0 -72
  20. package/dist/DismissableLayer-C7IJliOb.js +0 -151
  21. package/dist/FocusScope--pJ6bboI.js +0 -121
  22. package/dist/FormMessage.vue_vue_type_script_setup_true_lang-DwlnFEn2.js +0 -92
  23. package/dist/Input.vue_vue_type_script_setup_true_lang-BrjsUUvL.js +0 -27
  24. package/dist/Label.vue_vue_type_script_setup_true_lang-D_LMIKBv.js +0 -51
  25. package/dist/ListboxItem-CjMk-mEX.js +0 -417
  26. package/dist/MenuSubTrigger-CUrxnPwO.js +0 -845
  27. package/dist/OcCodeBlock-CBdVqav7.js +0 -37
  28. package/dist/PopoverTrigger.vue_vue_type_script_setup_true_lang-DtI_qIyx.js +0 -394
  29. package/dist/PopperContent-BT3Svcc3.js +0 -1465
  30. package/dist/Presence-CxfTrw6l.js +0 -133
  31. package/dist/Primitive-B3twiLO1.js +0 -44
  32. package/dist/RadioGroupItem.vue_vue_type_script_setup_true_lang-BNfRYIhL.js +0 -297
  33. package/dist/RovingFocusGroup-0OHdFQl0.js +0 -92
  34. package/dist/RovingFocusItem-s7Ug6oxb.js +0 -82
  35. package/dist/SelectValue.vue_vue_type_script_setup_true_lang-CVsYrN1R.js +0 -1255
  36. package/dist/Separator-DRam5i7g.js +0 -54
  37. package/dist/Separator.vue_vue_type_script_setup_true_lang-DGPbh6Dt.js +0 -27
  38. package/dist/Skeleton.vue_vue_type_script_setup_true_lang-k1A7l6Y-.js +0 -17
  39. package/dist/Switch.vue_vue_type_script_setup_true_lang-94ZKgnTz.js +0 -135
  40. package/dist/Teleport-DnUewq5H.js +0 -25
  41. package/dist/Textarea.vue_vue_type_script_setup_true_lang-DKazues9.js +0 -27
  42. package/dist/TooltipTrigger.vue_vue_type_script_setup_true_lang-CZ3AuN38.js +0 -426
  43. package/dist/VisuallyHidden-DMAU4heD.js +0 -41
  44. package/dist/VisuallyHiddenInput-DvJnsVHt.js +0 -59
  45. package/dist/_commonjsHelpers-B4e78b8K.js +0 -28
  46. package/dist/_plugin-vue_export-helper-CHgC5LLL.js +0 -9
  47. package/dist/array-CqVTtuYm.js +0 -6
  48. package/dist/arrays-4jDZqbdb.js +0 -20
  49. package/dist/check-C2tzJ0Gk.js +0 -11
  50. package/dist/chevron-down-CnpAlizg.js +0 -13
  51. package/dist/chevron-left-BOwFasou.js +0 -13
  52. package/dist/chevron-right-D308801z.js +0 -13
  53. package/dist/circle-A-6NpYiX.js +0 -13
  54. package/dist/clamp-BL1Rb24G.js +0 -22
  55. package/dist/constant-CuDQlTIy.js +0 -3433
  56. package/dist/createContext-CZEfaSVa.js +0 -17
  57. package/dist/createLucideIcon-eXqDwUWj.js +0 -71
  58. package/dist/ellipsis-CEG9G7eN.js +0 -15
  59. package/dist/getActiveElement-B-HWdUIb.js +0 -11
  60. package/dist/handleAndDispatchCustomEvent-Byh08EHr.js +0 -11
  61. package/dist/index-B3LW8uSH.js +0 -133
  62. package/dist/index-BIlpXuWX.js +0 -3430
  63. package/dist/index-BlGEiPHj.js +0 -1246
  64. package/dist/index-BwPb_idr.js +0 -574
  65. package/dist/index-C9julNQm.js +0 -173
  66. package/dist/index-C_aI-Wfj.js +0 -34
  67. package/dist/index-CumjCvqB.js +0 -5703
  68. package/dist/index-LqWMCtOd.js +0 -809
  69. package/dist/index-OpE2oGce.js +0 -110
  70. package/dist/isValueEqualOrExist-BDSMUv8t.js +0 -8
  71. package/dist/lib/utils.js +0 -5
  72. package/dist/nullish-CjWwlQS3.js +0 -6
  73. package/dist/ohash.D__AXeF1-DX2n0b2C.js +0 -106
  74. package/dist/plus-CgluTYQY.js +0 -14
  75. package/dist/text-zwICaAnx.js +0 -743
  76. package/dist/ui/accordion/index.js +0 -7
  77. package/dist/ui/alert/index.js +0 -64
  78. package/dist/ui/alert-dialog/index.js +0 -356
  79. package/dist/ui/aspect-ratio/index.js +0 -50
  80. package/dist/ui/auto-form/constant.js +0 -5
  81. package/dist/ui/auto-form/dependencies.js +0 -61
  82. package/dist/ui/auto-form/index.js +0 -227
  83. package/dist/ui/auto-form/interface.js +0 -4
  84. package/dist/ui/auto-form/utils.js +0 -89
  85. package/dist/ui/avatar/index.js +0 -189
  86. package/dist/ui/badge/index.js +0 -37
  87. package/dist/ui/breadcrumb/index.js +0 -126
  88. package/dist/ui/button/index.js +0 -55
  89. package/dist/ui/calendar/index.js +0 -15
  90. package/dist/ui/card/index.js +0 -38
  91. package/dist/ui/carousel/index.js +0 -174
  92. package/dist/ui/carousel/interface.js +0 -1
  93. package/dist/ui/carousel/useCarousel.js +0 -1288
  94. package/dist/ui/chart/index.js +0 -8
  95. package/dist/ui/chart/interface.js +0 -1
  96. package/dist/ui/chart-area/index.js +0 -331
  97. package/dist/ui/chart-bar/index.js +0 -490
  98. package/dist/ui/chart-donut/index.js +0 -509
  99. package/dist/ui/chart-line/index.js +0 -110
  100. package/dist/ui/checkbox/index.js +0 -4
  101. package/dist/ui/collapsible/index.js +0 -60
  102. package/dist/ui/combobox/index.js +0 -877
  103. package/dist/ui/command/index.js +0 -323
  104. package/dist/ui/context-menu/index.js +0 -734
  105. package/dist/ui/dialog/index.js +0 -169
  106. package/dist/ui/drawer/index.js +0 -971
  107. package/dist/ui/dropdown-menu/index.js +0 -723
  108. package/dist/ui/form/index.js +0 -13
  109. package/dist/ui/form/injectionKeys.js +0 -4
  110. package/dist/ui/form/useFormField.js +0 -25
  111. package/dist/ui/hover-card/index.js +0 -331
  112. package/dist/ui/input/index.js +0 -4
  113. package/dist/ui/label/index.js +0 -4
  114. package/dist/ui/menubar/index.js +0 -862
  115. package/dist/ui/navigation-menu/index.js +0 -873
  116. package/dist/ui/number-field/index.js +0 -682
  117. package/dist/ui/pagination/index.js +0 -444
  118. package/dist/ui/pin-input/index.js +0 -308
  119. package/dist/ui/popover/index.js +0 -6
  120. package/dist/ui/progress/index.js +0 -137
  121. package/dist/ui/radio-group/index.js +0 -5
  122. package/dist/ui/range-calendar/index.js +0 -986
  123. package/dist/ui/resizable/index.js +0 -1432
  124. package/dist/ui/scroll-area/index.js +0 -775
  125. package/dist/ui/select/index.js +0 -135
  126. package/dist/ui/separator/index.js +0 -4
  127. package/dist/ui/sheet/index.js +0 -188
  128. package/dist/ui/sidebar/index.js +0 -652
  129. package/dist/ui/sidebar/utils.js +0 -12
  130. package/dist/ui/skeleton/index.js +0 -4
  131. package/dist/ui/slider/index.js +0 -478
  132. package/dist/ui/sonner/index.js +0 -892
  133. package/dist/ui/stepper/index.js +0 -442
  134. package/dist/ui/switch/index.js +0 -4
  135. package/dist/ui/table/index.js +0 -153
  136. package/dist/ui/tabs/index.js +0 -280
  137. package/dist/ui/tags-input/index.js +0 -449
  138. package/dist/ui/textarea/index.js +0 -4
  139. package/dist/ui/toast/index.js +0 -738
  140. package/dist/ui/toast/use-toast.js +0 -85
  141. package/dist/ui/toggle/index.js +0 -6
  142. package/dist/ui/toggle-group/index.js +0 -112
  143. package/dist/ui/tooltip/index.js +0 -29
  144. package/dist/useArrowNavigation-BRMPveaB.js +0 -49
  145. package/dist/useBodyScrollLock-CazCRZjZ.js +0 -153
  146. package/dist/useDirection-C3C_TLKm.js +0 -14
  147. package/dist/useFocusGuards-CyjC9cG9.js +0 -26
  148. package/dist/useFormControl-CFVC51Lp.js +0 -11
  149. package/dist/useForwardExpose-DZT6mL_U.js +0 -37
  150. package/dist/useForwardPropsEmits-0XKBv1pB.js +0 -33
  151. package/dist/useGraceArea-D7-GP1ii.js +0 -137
  152. package/dist/useId-reAg216X.js +0 -13
  153. package/dist/useKbd-BJNupnml.js +0 -41
  154. package/dist/useLocale-BfU0LC8Z.js +0 -14
  155. package/dist/useNonce-C1ZOgOp5.js +0 -14
  156. package/dist/usePrimitiveElement-BjwUvHih.js +0 -15
  157. package/dist/useSingleOrMultipleValue-BkTAaaJB.js +0 -43
  158. package/dist/useSize-BnyQ8FZF.js +0 -37
  159. package/dist/useTypeahead-oSidjyFF.js +0 -40
  160. package/dist/utils-DKNaYMZh.js +0 -57
  161. package/dist/utils-Dx9la83v.js +0 -35
  162. package/dist/utils-DxQ_ywGa.js +0 -55
  163. package/dist/utils-SFgRDk1R.js +0 -2748
  164. package/dist/utils-W-UiqiPE.js +0 -1869
  165. package/dist/vee-validate-Cf8JDJ_k.js +0 -2232
  166. package/dist/x-Cl6YllUK.js +0 -14
@@ -1,892 +0,0 @@
1
- var tt = Object.defineProperty;
2
- var st = (o, e, s) => e in o ? tt(o, e, { enumerable: !0, configurable: !0, writable: !0, value: s }) : o[e] = s;
3
- var E = (o, e, s) => st(o, typeof e != "symbol" ? e + "" : e, s);
4
- import { defineComponent as Te, useAttrs as ot, ref as v, computed as B, watchEffect as te, nextTick as it, watch as Je, createElementBlock as g, openBlock as c, Fragment as Y, createCommentVNode as G, createElementVNode as R, unref as C, renderList as $e, mergeProps as le, createBlock as Q, normalizeStyle as we, normalizeClass as F, withCtx as _, renderSlot as L, createVNode as ee, isVNode as ne, onMounted as Oe, onBeforeUnmount as nt, resolveDynamicComponent as ae, normalizeProps as qe, createTextVNode as Ge, toDisplayString as ye } from "vue";
5
- let Ae = 1;
6
- var at = class {
7
- constructor() {
8
- E(this, "subscribers");
9
- E(this, "toasts");
10
- E(this, "dismissedToasts");
11
- E(this, "subscribe", (o) => (this.subscribers.push(o), () => {
12
- const e = this.subscribers.indexOf(o);
13
- this.subscribers.splice(e, 1);
14
- }));
15
- E(this, "publish", (o) => {
16
- this.subscribers.forEach((e) => e(o));
17
- });
18
- E(this, "addToast", (o) => {
19
- this.publish(o), this.toasts = [...this.toasts, o];
20
- });
21
- E(this, "create", (o) => {
22
- var $;
23
- const { message: e, ...s } = o, n = typeof o.id == "number" || o.id && (($ = o.id) == null ? void 0 : $.length) > 0 ? o.id : Ae++, p = this.toasts.find((w) => w.id === n), D = o.dismissible === void 0 ? !0 : o.dismissible;
24
- return this.dismissedToasts.has(n) && this.dismissedToasts.delete(n), p ? this.toasts = this.toasts.map((w) => w.id === n ? (this.publish({
25
- ...w,
26
- ...o,
27
- id: n,
28
- title: e
29
- }), {
30
- ...w,
31
- ...o,
32
- id: n,
33
- dismissible: D,
34
- title: e
35
- }) : w) : this.addToast({
36
- title: e,
37
- ...s,
38
- dismissible: D,
39
- id: n
40
- }), n;
41
- });
42
- E(this, "dismiss", (o) => (o ? (this.dismissedToasts.add(o), requestAnimationFrame(() => this.subscribers.forEach((e) => e({
43
- id: o,
44
- dismiss: !0
45
- })))) : this.toasts.forEach((e) => {
46
- this.subscribers.forEach((s) => s({
47
- id: e.id,
48
- dismiss: !0
49
- }));
50
- }), o));
51
- E(this, "message", (o, e) => this.create({
52
- ...e,
53
- message: o,
54
- type: "default"
55
- }));
56
- E(this, "error", (o, e) => this.create({
57
- ...e,
58
- type: "error",
59
- message: o
60
- }));
61
- E(this, "success", (o, e) => this.create({
62
- ...e,
63
- type: "success",
64
- message: o
65
- }));
66
- E(this, "info", (o, e) => this.create({
67
- ...e,
68
- type: "info",
69
- message: o
70
- }));
71
- E(this, "warning", (o, e) => this.create({
72
- ...e,
73
- type: "warning",
74
- message: o
75
- }));
76
- E(this, "loading", (o, e) => this.create({
77
- ...e,
78
- type: "loading",
79
- message: o
80
- }));
81
- E(this, "promise", (o, e) => {
82
- if (!e) return;
83
- let s;
84
- e.loading !== void 0 && (s = this.create({
85
- ...e,
86
- promise: o,
87
- type: "loading",
88
- message: e.loading,
89
- description: typeof e.description != "function" ? e.description : void 0
90
- }));
91
- const n = Promise.resolve(o instanceof Function ? o() : o);
92
- let p = s !== void 0, D;
93
- const $ = n.then(async (a) => {
94
- if (D = ["resolve", a], ne(a))
95
- p = !1, this.create({
96
- id: s,
97
- type: "default",
98
- message: a
99
- });
100
- else if (rt(a) && !a.ok) {
101
- p = !1;
102
- const r = typeof e.error == "function" ? await e.error(`HTTP error! status: ${a.status}`) : e.error, k = typeof e.description == "function" ? await e.description(`HTTP error! status: ${a.status}`) : e.description, S = typeof r == "object" && !ne(r) ? r : {
103
- message: r || "",
104
- id: s || ""
105
- };
106
- this.create({
107
- id: s,
108
- type: "error",
109
- description: k,
110
- ...S
111
- });
112
- } else if (a instanceof Error) {
113
- p = !1;
114
- const r = typeof e.error == "function" ? await e.error(a) : e.error, k = typeof e.description == "function" ? await e.description(a) : e.description, S = typeof r == "object" && !ne(r) ? r : {
115
- message: r || "",
116
- id: s || ""
117
- };
118
- this.create({
119
- id: s,
120
- type: "error",
121
- description: k,
122
- ...S
123
- });
124
- } else if (e.success !== void 0) {
125
- p = !1;
126
- const r = typeof e.success == "function" ? await e.success(a) : e.success, k = typeof e.description == "function" ? await e.description(a) : e.description, S = typeof r == "object" && !ne(r) ? r : {
127
- message: r || "",
128
- id: s || ""
129
- };
130
- this.create({
131
- id: s,
132
- type: "success",
133
- description: k,
134
- ...S
135
- });
136
- }
137
- }).catch(async (a) => {
138
- if (D = ["reject", a], e.error !== void 0) {
139
- p = !1;
140
- const d = typeof e.error == "function" ? await e.error(a) : e.error, r = typeof e.description == "function" ? await e.description(a) : e.description, M = typeof d == "object" && !ne(d) ? d : {
141
- message: d || "",
142
- id: s || ""
143
- };
144
- this.create({
145
- id: s,
146
- type: "error",
147
- description: r,
148
- ...M
149
- });
150
- }
151
- }).finally(() => {
152
- var a;
153
- p && (this.dismiss(s), s = void 0), (a = e.finally) == null || a.call(e);
154
- }), w = () => new Promise((a, d) => $.then(() => D[0] === "reject" ? d(D[1]) : a(D[1])).catch(d));
155
- return typeof s != "string" && typeof s != "number" ? { unwrap: w } : Object.assign(s, { unwrap: w });
156
- });
157
- E(this, "custom", (o, e) => {
158
- const s = (e == null ? void 0 : e.id) || Ae++;
159
- return this.publish({
160
- component: o,
161
- id: s,
162
- ...e
163
- }), s;
164
- });
165
- E(this, "getActiveToasts", () => this.toasts.filter((o) => !this.dismissedToasts.has(o.id)));
166
- this.subscribers = [], this.toasts = [], this.dismissedToasts = /* @__PURE__ */ new Set();
167
- }
168
- };
169
- const P = new at();
170
- function lt(o, e) {
171
- const s = (e == null ? void 0 : e.id) || Ae++;
172
- return P.create({
173
- message: o,
174
- id: s,
175
- type: "default",
176
- ...e
177
- }), s;
178
- }
179
- const rt = (o) => o && typeof o == "object" && "ok" in o && typeof o.ok == "boolean" && "status" in o && typeof o.status == "number", ut = lt, ct = () => P.toasts, dt = () => P.getActiveToasts();
180
- Object.assign(ut, {
181
- success: P.success,
182
- info: P.info,
183
- warning: P.warning,
184
- error: P.error,
185
- custom: P.custom,
186
- message: P.message,
187
- promise: P.promise,
188
- dismiss: P.dismiss,
189
- loading: P.loading
190
- }, {
191
- getHistory: ct,
192
- getToasts: dt
193
- });
194
- function be(o) {
195
- return o.label !== void 0;
196
- }
197
- const pt = 3, Ze = "24px", _e = "16px", Qe = 4e3, ft = 356, vt = 14, ht = 45, mt = 200;
198
- function gt() {
199
- const o = v(!1);
200
- return te(() => {
201
- const e = () => {
202
- o.value = document.hidden;
203
- };
204
- return document.addEventListener("visibilitychange", e), () => window.removeEventListener("visibilitychange", e);
205
- }), { isDocumentHidden: o };
206
- }
207
- function X(...o) {
208
- return o.filter(Boolean).join(" ");
209
- }
210
- function yt(o) {
211
- const [e, s] = o.split("-"), n = [];
212
- return e && n.push(e), s && n.push(s), n;
213
- }
214
- function bt(o, e) {
215
- const s = {};
216
- return [o, e].forEach((n, p) => {
217
- const D = p === 1, $ = D ? "--mobile-offset" : "--offset", w = D ? _e : Ze;
218
- function a(d) {
219
- [
220
- "top",
221
- "right",
222
- "bottom",
223
- "left"
224
- ].forEach((r) => {
225
- s[`${$}-${r}`] = typeof d == "number" ? `${d}px` : d;
226
- });
227
- }
228
- typeof n == "number" || typeof n == "string" ? a(n) : typeof n == "object" ? [
229
- "top",
230
- "right",
231
- "bottom",
232
- "left"
233
- ].forEach((d) => {
234
- n[d] === void 0 ? s[`${$}-${d}`] = w : s[`${$}-${d}`] = typeof n[d] == "number" ? `${n[d]}px` : n[d];
235
- }) : a(w);
236
- }), s;
237
- }
238
- const wt = [
239
- "data-rich-colors",
240
- "data-styled",
241
- "data-mounted",
242
- "data-promise",
243
- "data-swiped",
244
- "data-removed",
245
- "data-visible",
246
- "data-y-position",
247
- "data-x-position",
248
- "data-index",
249
- "data-front",
250
- "data-swiping",
251
- "data-dismissible",
252
- "data-type",
253
- "data-invert",
254
- "data-swipe-out",
255
- "data-swipe-direction",
256
- "data-expanded"
257
- ], Tt = ["aria-label", "data-disabled"];
258
- var Bt = /* @__PURE__ */ Te({
259
- __name: "Toast",
260
- props: {
261
- toast: {},
262
- toasts: {},
263
- index: {},
264
- swipeDirections: {},
265
- expanded: { type: Boolean },
266
- invert: { type: Boolean },
267
- heights: {},
268
- gap: {},
269
- position: {},
270
- visibleToasts: {},
271
- expandByDefault: { type: Boolean },
272
- closeButton: { type: Boolean },
273
- interacting: { type: Boolean },
274
- style: {},
275
- cancelButtonStyle: {},
276
- actionButtonStyle: {},
277
- duration: {},
278
- class: {},
279
- unstyled: { type: Boolean },
280
- descriptionClass: {},
281
- loadingIcon: {},
282
- classes: {},
283
- icons: {},
284
- closeButtonAriaLabel: {},
285
- defaultRichColors: { type: Boolean }
286
- },
287
- emits: ["update:heights", "removeToast"],
288
- setup(o, { emit: e }) {
289
- const s = o, n = e, p = v(null), D = v(null), $ = v(!1), w = v(!1), a = v(!1), d = v(!1), r = v(!1), k = v(0), M = v(0), S = v(s.toast.duration || s.duration || Qe), ue = v(null), I = v(null), Be = B(() => s.index === 0), De = B(() => s.index + 1 <= s.visibleToasts), A = B(() => s.toast.type), N = B(() => s.toast.dismissible !== !1), ke = B(() => s.toast.class || ""), Ee = B(() => s.descriptionClass || ""), ce = B(() => s.heights.findIndex((t) => t.toastId === s.toast.id) || 0), Ce = B(() => s.toast.closeButton ?? s.closeButton), i = B(() => s.toast.duration || s.duration || Qe), u = v(0), l = v(0), y = v(null), O = B(() => s.position.split("-")), V = B(() => O.value[0]), J = B(() => O.value[1]), de = B(() => typeof s.toast.title != "string"), pe = B(() => typeof s.toast.description != "string"), { isDocumentHidden: fe } = gt(), Z = B(() => A.value && A.value === "loading"), ve = B(() => s.heights.reduce((t, f, m) => m >= ce.value ? t : t + f.height, 0)), q = B(() => ce.value * s.gap + ve.value || 0);
290
- Oe(() => {
291
- S.value = i.value;
292
- }), Oe(() => {
293
- if (!$.value) return;
294
- const t = I.value, f = t == null ? void 0 : t.style.height;
295
- t.style.height = "auto";
296
- const m = t.getBoundingClientRect().height;
297
- t.style.height = f, M.value = m;
298
- let b;
299
- s.heights.find((h) => h.toastId === s.toast.id) ? b = s.heights.map((h) => h.toastId === s.toast.id ? {
300
- ...h,
301
- height: m
302
- } : h) : b = [{
303
- toastId: s.toast.id,
304
- height: m,
305
- position: s.toast.position
306
- }, ...s.heights], n("update:heights", b);
307
- });
308
- function z() {
309
- w.value = !0, k.value = q.value;
310
- const t = s.heights.filter((f) => f.toastId !== s.toast.id);
311
- n("update:heights", t), setTimeout(() => {
312
- n("removeToast", s.toast);
313
- }, mt);
314
- }
315
- function se() {
316
- var t, f;
317
- if (Z.value || !N.value) return {};
318
- z(), (f = (t = s.toast).onDismiss) == null || f.call(t, s.toast);
319
- }
320
- function he(t) {
321
- Z.value || !N.value || (ue.value = /* @__PURE__ */ new Date(), k.value = q.value, t.target.setPointerCapture(t.pointerId), t.target.tagName !== "BUTTON" && (a.value = !0, y.value = {
322
- x: t.clientX,
323
- y: t.clientY
324
- }));
325
- }
326
- function me() {
327
- var h, j, x, U, W, K, H;
328
- if (d.value || !N.value) return;
329
- y.value = null;
330
- const t = Number(((h = I.value) == null ? void 0 : h.style.getPropertyValue("--swipe-amount-x").replace("px", "")) || 0), f = Number(((j = I.value) == null ? void 0 : j.style.getPropertyValue("--swipe-amount-y").replace("px", "")) || 0), m = (/* @__PURE__ */ new Date()).getTime() - (((x = ue.value) == null ? void 0 : x.getTime()) || 0), b = p.value === "x" ? t : f, T = Math.abs(b) / m;
331
- if (Math.abs(b) >= ht || T > 0.11) {
332
- k.value = q.value, (W = (U = s.toast).onDismiss) == null || W.call(U, s.toast), p.value === "x" ? D.value = t > 0 ? "right" : "left" : D.value = f > 0 ? "down" : "up", z(), d.value = !0;
333
- return;
334
- } else
335
- (K = I.value) == null || K.style.setProperty("--swipe-amount-x", "0px"), (H = I.value) == null || H.style.setProperty("--swipe-amount-y", "0px");
336
- r.value = !1, a.value = !1, p.value = null;
337
- }
338
- function Se(t) {
339
- var x, U, W, K;
340
- if (!y.value || !N.value || (((U = (x = window == null ? void 0 : window.getSelection()) == null ? void 0 : x.toString()) == null ? void 0 : U.length) ?? !1)) return;
341
- const m = t.clientY - y.value.y, b = t.clientX - y.value.x, T = s.swipeDirections ?? yt(s.position);
342
- !p.value && (Math.abs(b) > 1 || Math.abs(m) > 1) && (p.value = Math.abs(b) > Math.abs(m) ? "x" : "y");
343
- let h = {
344
- x: 0,
345
- y: 0
346
- };
347
- const j = (H) => 1 / (1.5 + Math.abs(H) / 20);
348
- if (p.value === "y") {
349
- if (T.includes("top") || T.includes("bottom")) if (T.includes("top") && m < 0 || T.includes("bottom") && m > 0) h.y = m;
350
- else {
351
- const H = m * j(m);
352
- h.y = Math.abs(H) < Math.abs(m) ? H : m;
353
- }
354
- } else if (p.value === "x" && (T.includes("left") || T.includes("right")))
355
- if (T.includes("left") && b < 0 || T.includes("right") && b > 0) h.x = b;
356
- else {
357
- const H = b * j(b);
358
- h.x = Math.abs(H) < Math.abs(b) ? H : b;
359
- }
360
- (Math.abs(h.x) > 0 || Math.abs(h.y) > 0) && (r.value = !0), (W = I.value) == null || W.style.setProperty("--swipe-amount-x", `${h.x}px`), (K = I.value) == null || K.style.setProperty("--swipe-amount-y", `${h.y}px`);
361
- }
362
- Oe(() => {
363
- if ($.value = !0, !I.value) return;
364
- const t = I.value.getBoundingClientRect().height;
365
- M.value = t;
366
- const f = [{
367
- toastId: s.toast.id,
368
- height: t,
369
- position: s.toast.position
370
- }, ...s.heights];
371
- n("update:heights", f);
372
- }), nt(() => {
373
- if (I.value) {
374
- const t = s.heights.filter((f) => f.toastId !== s.toast.id);
375
- n("update:heights", t);
376
- }
377
- }), te((t) => {
378
- if (s.toast.promise && A.value === "loading" || s.toast.duration === 1 / 0 || s.toast.type === "loading") return;
379
- let f;
380
- const m = () => {
381
- if (l.value < u.value) {
382
- const T = (/* @__PURE__ */ new Date()).getTime() - u.value;
383
- S.value = S.value - T;
384
- }
385
- l.value = (/* @__PURE__ */ new Date()).getTime();
386
- }, b = () => {
387
- S.value !== 1 / 0 && (u.value = (/* @__PURE__ */ new Date()).getTime(), f = setTimeout(() => {
388
- var T, h;
389
- (h = (T = s.toast).onAutoClose) == null || h.call(T, s.toast), z();
390
- }, S.value));
391
- };
392
- s.expanded || s.interacting || fe.value ? m() : b(), t(() => {
393
- clearTimeout(f);
394
- });
395
- }), Je(() => s.toast.delete, (t) => {
396
- t !== void 0 && t && z();
397
- }, { deep: !0 });
398
- function et() {
399
- a.value = !1, p.value = null, y.value = null;
400
- }
401
- return (t, f) => {
402
- var m, b, T, h, j, x, U, W, K, H, Me, Pe, Ie, He, Le, Re, Ne, ze, Fe, Ve, je, xe, Ue, We, Ke, Xe, Ye;
403
- return c(), g("li", {
404
- tabindex: "0",
405
- ref_key: "toastRef",
406
- ref: I,
407
- class: F(C(X)(s.class, ke.value, (m = t.classes) == null ? void 0 : m.toast, (b = t.toast.classes) == null ? void 0 : b.toast, (T = t.classes) == null ? void 0 : T[A.value], (j = (h = t.toast) == null ? void 0 : h.classes) == null ? void 0 : j[A.value])),
408
- "data-sonner-toast": "",
409
- "data-rich-colors": t.toast.richColors ?? t.defaultRichColors,
410
- "data-styled": !(t.toast.component || (x = t.toast) != null && x.unstyled || t.unstyled),
411
- "data-mounted": $.value,
412
- "data-promise": !!t.toast.promise,
413
- "data-swiped": r.value,
414
- "data-removed": w.value,
415
- "data-visible": De.value,
416
- "data-y-position": V.value,
417
- "data-x-position": J.value,
418
- "data-index": t.index,
419
- "data-front": Be.value,
420
- "data-swiping": a.value,
421
- "data-dismissible": N.value,
422
- "data-type": A.value,
423
- "data-invert": t.toast.invert || t.invert,
424
- "data-swipe-out": d.value,
425
- "data-swipe-direction": D.value,
426
- "data-expanded": !!(t.expanded || t.expandByDefault && $.value),
427
- style: we({
428
- "--index": t.index,
429
- "--toasts-before": t.index,
430
- "--z-index": t.toasts.length - t.index,
431
- "--offset": `${w.value ? k.value : q.value}px`,
432
- "--initial-height": t.expandByDefault ? "auto" : `${M.value}px`,
433
- ...t.style,
434
- ...s.toast.style
435
- }),
436
- onDragend: et,
437
- onPointerdown: he,
438
- onPointerup: me,
439
- onPointermove: Se
440
- }, [Ce.value && !t.toast.component && A.value !== "loading" ? (c(), g("button", {
441
- key: 0,
442
- "aria-label": t.closeButtonAriaLabel || "Close toast",
443
- "data-disabled": Z.value,
444
- "data-close-button": "true",
445
- class: F(C(X)((U = t.classes) == null ? void 0 : U.closeButton, (K = (W = t.toast) == null ? void 0 : W.classes) == null ? void 0 : K.closeButton)),
446
- onClick: se
447
- }, [(H = t.icons) != null && H.close ? (c(), Q(ae((Me = t.icons) == null ? void 0 : Me.close), { key: 0 })) : L(t.$slots, "close-icon", { key: 1 })], 10, Tt)) : G("v-if", !0), t.toast.component ? (c(), Q(ae(t.toast.component), le({ key: 1 }, t.toast.componentProps, { onCloseToast: se }), null, 16)) : (c(), g(Y, { key: 2 }, [
448
- A.value !== "default" || t.toast.icon || t.toast.promise ? (c(), g("div", {
449
- key: 0,
450
- "data-icon": "",
451
- class: F(C(X)((Pe = t.classes) == null ? void 0 : Pe.icon, (He = (Ie = t.toast) == null ? void 0 : Ie.classes) == null ? void 0 : He.icon))
452
- }, [t.toast.icon ? (c(), Q(ae(t.toast.icon), { key: 0 })) : (c(), g(Y, { key: 1 }, [A.value === "loading" ? L(t.$slots, "loading-icon", { key: 0 }) : A.value === "success" ? L(t.$slots, "success-icon", { key: 1 }) : A.value === "error" ? L(t.$slots, "error-icon", { key: 2 }) : A.value === "warning" ? L(t.$slots, "warning-icon", { key: 3 }) : A.value === "info" ? L(t.$slots, "info-icon", { key: 4 }) : G("v-if", !0)], 64))], 2)) : G("v-if", !0),
453
- R("div", {
454
- "data-content": "",
455
- class: F(C(X)((Le = t.classes) == null ? void 0 : Le.content, (Ne = (Re = t.toast) == null ? void 0 : Re.classes) == null ? void 0 : Ne.content))
456
- }, [R("div", {
457
- "data-title": "",
458
- class: F(C(X)((ze = t.classes) == null ? void 0 : ze.title, (Fe = t.toast.classes) == null ? void 0 : Fe.title))
459
- }, [de.value ? (c(), Q(ae(t.toast.title), qe(le({ key: 0 }, t.toast.componentProps)), null, 16)) : (c(), g(Y, { key: 1 }, [Ge(ye(t.toast.title), 1)], 64))], 2), t.toast.description ? (c(), g("div", {
460
- key: 0,
461
- "data-description": "",
462
- class: F(C(X)(t.descriptionClass, Ee.value, (Ve = t.classes) == null ? void 0 : Ve.description, (je = t.toast.classes) == null ? void 0 : je.description))
463
- }, [pe.value ? (c(), Q(ae(t.toast.description), qe(le({ key: 0 }, t.toast.componentProps)), null, 16)) : (c(), g(Y, { key: 1 }, [Ge(ye(t.toast.description), 1)], 64))], 2)) : G("v-if", !0)], 2),
464
- t.toast.cancel ? (c(), g("button", {
465
- key: 1,
466
- style: we(t.toast.cancelButtonStyle || t.cancelButtonStyle),
467
- class: F(C(X)((xe = t.classes) == null ? void 0 : xe.cancelButton, (Ue = t.toast.classes) == null ? void 0 : Ue.cancelButton)),
468
- "data-button": "",
469
- "data-cancel": "",
470
- onClick: f[0] || (f[0] = (ge) => {
471
- var oe, ie;
472
- C(be)(t.toast.cancel) && N.value && ((ie = (oe = t.toast.cancel).onClick) == null || ie.call(oe, ge), z());
473
- })
474
- }, ye(C(be)(t.toast.cancel) ? (We = t.toast.cancel) == null ? void 0 : We.label : t.toast.cancel), 7)) : G("v-if", !0),
475
- t.toast.action ? (c(), g("button", {
476
- key: 2,
477
- style: we(t.toast.actionButtonStyle || t.actionButtonStyle),
478
- class: F(C(X)((Ke = t.classes) == null ? void 0 : Ke.actionButton, (Xe = t.toast.classes) == null ? void 0 : Xe.actionButton)),
479
- "data-button": "",
480
- "data-action": "",
481
- onClick: f[1] || (f[1] = (ge) => {
482
- var oe, ie;
483
- C(be)(t.toast.action) && ((ie = (oe = t.toast.action).onClick) == null || ie.call(oe, ge), !ge.defaultPrevented && z());
484
- })
485
- }, ye(C(be)(t.toast.action) ? (Ye = t.toast.action) == null ? void 0 : Ye.label : t.toast.action), 7)) : G("v-if", !0)
486
- ], 64))], 46, wt);
487
- };
488
- }
489
- }), Dt = Bt, re = (o, e) => {
490
- const s = o.__vccOpts || o;
491
- for (const [n, p] of e) s[n] = p;
492
- return s;
493
- };
494
- const kt = {}, Et = {
495
- xmlns: "http://www.w3.org/2000/svg",
496
- width: "12",
497
- height: "12",
498
- viewBox: "0 0 24 24",
499
- fill: "none",
500
- stroke: "currentColor",
501
- "stoke-width": "1.5",
502
- "stroke-linecap": "round",
503
- "stroke-linejoin": "round"
504
- };
505
- function Ct(o, e) {
506
- return c(), g("svg", Et, e[0] || (e[0] = [R("line", {
507
- x1: "18",
508
- y1: "6",
509
- x2: "6",
510
- y2: "18"
511
- }, null, -1), R("line", {
512
- x1: "6",
513
- y1: "6",
514
- x2: "18",
515
- y2: "18"
516
- }, null, -1)]));
517
- }
518
- var St = /* @__PURE__ */ re(kt, [["render", Ct]]);
519
- const Mt = ["data-visible"], Ot = { class: "sonner-spinner" };
520
- var $t = /* @__PURE__ */ Te({
521
- __name: "Loader",
522
- props: { visible: { type: Boolean } },
523
- setup(o) {
524
- const e = Array(12).fill(0);
525
- return (s, n) => (c(), g("div", {
526
- class: "sonner-loading-wrapper",
527
- "data-visible": s.visible
528
- }, [R("div", Ot, [(c(!0), g(Y, null, $e(C(e), (p) => (c(), g("div", {
529
- key: `spinner-bar-${p}`,
530
- class: "sonner-loading-bar"
531
- }))), 128))])], 8, Mt));
532
- }
533
- }), At = $t;
534
- const Pt = {}, It = {
535
- xmlns: "http://www.w3.org/2000/svg",
536
- viewBox: "0 0 20 20",
537
- fill: "currentColor",
538
- height: "20",
539
- width: "20"
540
- };
541
- function Ht(o, e) {
542
- return c(), g("svg", It, e[0] || (e[0] = [R("path", {
543
- "fill-rule": "evenodd",
544
- d: "M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",
545
- "clip-rule": "evenodd"
546
- }, null, -1)]));
547
- }
548
- var Lt = /* @__PURE__ */ re(Pt, [["render", Ht]]);
549
- const Rt = {}, Nt = {
550
- xmlns: "http://www.w3.org/2000/svg",
551
- viewBox: "0 0 20 20",
552
- fill: "currentColor",
553
- height: "20",
554
- width: "20"
555
- };
556
- function zt(o, e) {
557
- return c(), g("svg", Nt, e[0] || (e[0] = [R("path", {
558
- "fill-rule": "evenodd",
559
- d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",
560
- "clip-rule": "evenodd"
561
- }, null, -1)]));
562
- }
563
- var Ft = /* @__PURE__ */ re(Rt, [["render", zt]]);
564
- const Vt = {}, jt = {
565
- xmlns: "http://www.w3.org/2000/svg",
566
- viewBox: "0 0 24 24",
567
- fill: "currentColor",
568
- height: "20",
569
- width: "20"
570
- };
571
- function xt(o, e) {
572
- return c(), g("svg", jt, e[0] || (e[0] = [R("path", {
573
- "fill-rule": "evenodd",
574
- d: "M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",
575
- "clip-rule": "evenodd"
576
- }, null, -1)]));
577
- }
578
- var Ut = /* @__PURE__ */ re(Vt, [["render", xt]]);
579
- const Wt = {}, Kt = {
580
- xmlns: "http://www.w3.org/2000/svg",
581
- viewBox: "0 0 20 20",
582
- fill: "currentColor",
583
- height: "20",
584
- width: "20"
585
- };
586
- function Xt(o, e) {
587
- return c(), g("svg", Kt, e[0] || (e[0] = [R("path", {
588
- "fill-rule": "evenodd",
589
- d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",
590
- "clip-rule": "evenodd"
591
- }, null, -1)]));
592
- }
593
- var Yt = /* @__PURE__ */ re(Wt, [["render", Xt]]);
594
- const qt = ["aria-label"], Gt = [
595
- "data-sonner-theme",
596
- "dir",
597
- "data-theme",
598
- "data-rich-colors",
599
- "data-y-position",
600
- "data-x-position",
601
- "data-lifted"
602
- ], Qt = typeof window < "u" && typeof document < "u";
603
- function Jt() {
604
- if (typeof window > "u" || typeof document > "u") return "ltr";
605
- const o = document.documentElement.getAttribute("dir");
606
- return o === "auto" || !o ? window.getComputedStyle(document.documentElement).direction : o;
607
- }
608
- var Zt = /* @__PURE__ */ Te({
609
- name: "Toaster",
610
- inheritAttrs: !1,
611
- __name: "Toaster",
612
- props: {
613
- invert: {
614
- type: Boolean,
615
- default: !1
616
- },
617
- theme: { default: "light" },
618
- position: { default: "bottom-right" },
619
- hotkey: { default: () => ["altKey", "KeyT"] },
620
- richColors: {
621
- type: Boolean,
622
- default: !1
623
- },
624
- expand: {
625
- type: Boolean,
626
- default: !1
627
- },
628
- duration: {},
629
- gap: { default: vt },
630
- visibleToasts: { default: pt },
631
- closeButton: {
632
- type: Boolean,
633
- default: !1
634
- },
635
- toastOptions: { default: () => ({}) },
636
- class: { default: "" },
637
- style: {},
638
- offset: { default: Ze },
639
- mobileOffset: { default: _e },
640
- dir: { default: "auto" },
641
- swipeDirections: {},
642
- icons: {},
643
- containerAriaLabel: { default: "Notifications" }
644
- },
645
- setup(o) {
646
- const e = o, s = ot(), n = v([]);
647
- function p(i, u) {
648
- return n.value.filter((l) => !l.position && u === 0 || l.position === i);
649
- }
650
- const D = B(() => {
651
- const i = n.value.filter((u) => u.position).map((u) => u.position);
652
- return i.length > 0 ? Array.from(new Set([e.position].concat(i))) : [e.position];
653
- }), $ = B(() => {
654
- const i = {};
655
- return D.value.forEach((u) => {
656
- i[u] = n.value.filter((l) => l.position === u);
657
- }), i;
658
- }), w = v([]), a = v(!1), d = v(!1), r = v(e.theme !== "system" ? e.theme : typeof window < "u" && window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light"), k = v(null), M = v(null), S = v(!1), ue = e.hotkey.join("+").replace(/Key/g, "").replace(/Digit/g, "");
659
- function I(i) {
660
- var u;
661
- (u = n.value.find((l) => l.id === i.id)) != null && u.delete || P.dismiss(i.id), n.value = n.value.filter(({ id: l }) => l !== i.id);
662
- }
663
- function Be(i) {
664
- var u, l;
665
- S.value && !((l = (u = i.currentTarget) == null ? void 0 : u.contains) != null && l.call(u, i.relatedTarget)) && (S.value = !1, M.value && (M.value.focus({ preventScroll: !0 }), M.value = null));
666
- }
667
- function De(i) {
668
- i.target instanceof HTMLElement && i.target.dataset.dismissible === "false" || S.value || (S.value = !0, M.value = i.relatedTarget);
669
- }
670
- function A(i) {
671
- i.target && i.target instanceof HTMLElement && i.target.dataset.dismissible === "false" || (d.value = !0);
672
- }
673
- te((i) => {
674
- const u = P.subscribe((l) => {
675
- if (l.dismiss) {
676
- requestAnimationFrame(() => {
677
- n.value = n.value.map((y) => y.id === l.id ? {
678
- ...y,
679
- delete: !0
680
- } : y);
681
- });
682
- return;
683
- }
684
- it(() => {
685
- const y = n.value.findIndex((O) => O.id === l.id);
686
- y !== -1 ? n.value = [
687
- ...n.value.slice(0, y),
688
- {
689
- ...n.value[y],
690
- ...l
691
- },
692
- ...n.value.slice(y + 1)
693
- ] : n.value = [l, ...n.value];
694
- });
695
- });
696
- i(u);
697
- }), Je(() => e.theme, (i) => {
698
- if (i !== "system") {
699
- r.value = i;
700
- return;
701
- }
702
- if (i === "system" && (window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? r.value = "dark" : r.value = "light"), typeof window > "u") return;
703
- const u = window.matchMedia("(prefers-color-scheme: dark)");
704
- try {
705
- u.addEventListener("change", ({ matches: l }) => {
706
- l ? r.value = "dark" : r.value = "light";
707
- });
708
- } catch {
709
- u.addListener(({ matches: y }) => {
710
- try {
711
- y ? r.value = "dark" : r.value = "light";
712
- } catch (O) {
713
- console.error(O);
714
- }
715
- });
716
- }
717
- }), te(() => {
718
- k.value && M.value && (M.value.focus({ preventScroll: !0 }), M.value = null, S.value = !1);
719
- }), te(() => {
720
- n.value.length <= 1 && (a.value = !1);
721
- }), te((i) => {
722
- function u(l) {
723
- const y = e.hotkey.every((J) => l[J] || l.code === J), O = Array.isArray(k.value) ? k.value[0] : k.value;
724
- y && (a.value = !0, O == null || O.focus());
725
- const V = document.activeElement === k.value || (O == null ? void 0 : O.contains(document.activeElement));
726
- l.code === "Escape" && V && (a.value = !1);
727
- }
728
- Qt && (document.addEventListener("keydown", u), i(() => {
729
- document.removeEventListener("keydown", u);
730
- }));
731
- });
732
- function N() {
733
- a.value = !0;
734
- }
735
- function ke() {
736
- d.value || (a.value = !1);
737
- }
738
- function Ee() {
739
- a.value = !1;
740
- }
741
- function ce() {
742
- d.value = !1;
743
- }
744
- function Ce(i) {
745
- w.value = i;
746
- }
747
- return (i, u) => (c(), g(Y, null, [G(" Remove item from normal navigation flow, only available via hotkey "), R("section", {
748
- "aria-label": `${i.containerAriaLabel} ${C(ue)}`,
749
- tabIndex: -1,
750
- "aria-live": "polite",
751
- "aria-relevant": "additions text",
752
- "aria-atomic": "false"
753
- }, [(c(!0), g(Y, null, $e(D.value, (l, y) => {
754
- var O;
755
- return c(), g("ol", le({
756
- key: l,
757
- ref_for: !0,
758
- ref_key: "listRef",
759
- ref: k,
760
- "data-sonner-toaster": "",
761
- "data-sonner-theme": r.value,
762
- class: e.class,
763
- dir: i.dir === "auto" ? Jt() : i.dir,
764
- tabIndex: -1,
765
- "data-theme": i.theme,
766
- "data-rich-colors": i.richColors,
767
- "data-y-position": l.split("-")[0],
768
- "data-x-position": l.split("-")[1],
769
- "data-lifted": a.value && n.value.length > 1 && !i.expand,
770
- style: {
771
- "--front-toast-height": `${((O = w.value[0]) == null ? void 0 : O.height) || 0}px`,
772
- "--width": `${C(ft)}px`,
773
- "--gap": `${i.gap}px`,
774
- ...i.style,
775
- ...C(s).style,
776
- ...C(bt)(i.offset, i.mobileOffset)
777
- }
778
- }, i.$attrs, {
779
- onBlur: Be,
780
- onFocus: De,
781
- onMouseenter: N,
782
- onMousemove: N,
783
- onMouseleave: ke,
784
- onDragend: Ee,
785
- onPointerdown: A,
786
- onPointerup: ce
787
- }), [(c(!0), g(Y, null, $e(p(l, y), (V, J) => {
788
- var de, pe, fe, Z, ve, q, z, se, he, me;
789
- return c(), Q(Dt, {
790
- key: V.id,
791
- heights: w.value.filter((Se) => Se.position === V.position),
792
- icons: i.icons,
793
- index: J,
794
- toast: V,
795
- defaultRichColors: i.richColors,
796
- duration: ((de = i.toastOptions) == null ? void 0 : de.duration) ?? i.duration,
797
- class: F(((pe = i.toastOptions) == null ? void 0 : pe.class) ?? ""),
798
- descriptionClass: (fe = i.toastOptions) == null ? void 0 : fe.descriptionClass,
799
- invert: i.invert,
800
- visibleToasts: i.visibleToasts,
801
- closeButton: ((Z = i.toastOptions) == null ? void 0 : Z.closeButton) ?? i.closeButton,
802
- interacting: d.value,
803
- position: l,
804
- style: we((ve = i.toastOptions) == null ? void 0 : ve.style),
805
- unstyled: (q = i.toastOptions) == null ? void 0 : q.unstyled,
806
- classes: (z = i.toastOptions) == null ? void 0 : z.classes,
807
- cancelButtonStyle: (se = i.toastOptions) == null ? void 0 : se.cancelButtonStyle,
808
- actionButtonStyle: (he = i.toastOptions) == null ? void 0 : he.actionButtonStyle,
809
- "close-button-aria-label": (me = i.toastOptions) == null ? void 0 : me.closeButtonAriaLabel,
810
- toasts: $.value[l],
811
- expandByDefault: i.expand,
812
- gap: i.gap,
813
- expanded: a.value,
814
- swipeDirections: e.swipeDirections,
815
- "onUpdate:heights": Ce,
816
- onRemoveToast: I
817
- }, {
818
- "close-icon": _(() => [L(i.$slots, "close-icon", {}, () => [ee(St)])]),
819
- "loading-icon": _(() => [L(i.$slots, "loading-icon", {}, () => [ee(At, { visible: V.type === "loading" }, null, 8, ["visible"])])]),
820
- "success-icon": _(() => [L(i.$slots, "success-icon", {}, () => [ee(Lt)])]),
821
- "error-icon": _(() => [L(i.$slots, "error-icon", {}, () => [ee(Yt)])]),
822
- "warning-icon": _(() => [L(i.$slots, "warning-icon", {}, () => [ee(Ut)])]),
823
- "info-icon": _(() => [L(i.$slots, "info-icon", {}, () => [ee(Ft)])]),
824
- _: 2
825
- }, 1032, [
826
- "heights",
827
- "icons",
828
- "index",
829
- "toast",
830
- "defaultRichColors",
831
- "duration",
832
- "class",
833
- "descriptionClass",
834
- "invert",
835
- "visibleToasts",
836
- "closeButton",
837
- "interacting",
838
- "position",
839
- "style",
840
- "unstyled",
841
- "classes",
842
- "cancelButtonStyle",
843
- "actionButtonStyle",
844
- "close-button-aria-label",
845
- "toasts",
846
- "expandByDefault",
847
- "gap",
848
- "expanded",
849
- "swipeDirections"
850
- ]);
851
- }), 128))], 16, Gt);
852
- }), 128))], 8, qt)], 2112));
853
- }
854
- }), _t = Zt;
855
- const ss = /* @__PURE__ */ Te({
856
- __name: "Sonner",
857
- props: {
858
- invert: { type: Boolean },
859
- theme: {},
860
- position: {},
861
- hotkey: {},
862
- richColors: { type: Boolean },
863
- expand: { type: Boolean },
864
- duration: {},
865
- gap: {},
866
- visibleToasts: {},
867
- closeButton: { type: Boolean },
868
- toastOptions: {},
869
- class: {},
870
- style: {},
871
- offset: {},
872
- mobileOffset: {},
873
- dir: {},
874
- swipeDirections: {},
875
- icons: {},
876
- containerAriaLabel: {}
877
- },
878
- setup(o) {
879
- const e = o;
880
- return (s, n) => (c(), Q(C(_t), le({ class: "toaster group" }, e, { "toast-options": {
881
- classes: {
882
- toast: "group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",
883
- description: "group-[.toast]:text-muted-foreground",
884
- actionButton: "group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",
885
- cancelButton: "group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"
886
- }
887
- } }), null, 16));
888
- }
889
- });
890
- export {
891
- ss as Toaster
892
- };