welcome-ui 0.0.0-dev.1763389246174 → 0.0.0-dev.1763736449682

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 (128) hide show
  1. package/dist/2W3RN7C5-DMC82gDP.js +61 -0
  2. package/dist/{4I4MLMKD-z3Xm3qCo.js → 4I4MLMKD-BO6Lcy7s.js} +17 -17
  3. package/dist/Accordion.js +11 -10
  4. package/dist/Alert.js +39 -31
  5. package/dist/Avatar.js +12 -11
  6. package/dist/{B7UTNDHN-BDa2-8JK.js → B7UTNDHN-BghjolIs.js} +30 -30
  7. package/dist/Breadcrumb.js +75 -71
  8. package/dist/Button.css +1 -1
  9. package/dist/Button.js +42 -41
  10. package/dist/ButtonGroup.js +5 -4
  11. package/dist/Card.css +1 -1
  12. package/dist/Card.js +67 -15
  13. package/dist/Checkbox.js +29 -29
  14. package/dist/CloseButton.js +6 -5
  15. package/dist/{CustomPopper-vwbOQq72.js → CustomPopper-C1wIDHbM.js} +5 -4
  16. package/dist/{DSAASPLT-C-2xDjIv.js → DSAASPLT-Fx1kuAsk.js} +3 -3
  17. package/dist/DatePicker.js +81 -78
  18. package/dist/DateTimePicker.js +22 -21
  19. package/dist/Drawer.js +100 -80
  20. package/dist/DropdownMenu.css +1 -1
  21. package/dist/DropdownMenu.js +898 -462
  22. package/dist/FieldGroup.js +8 -7
  23. package/dist/FileDrop.js +183 -176
  24. package/dist/FileUpload.js +42 -40
  25. package/dist/{GVVKDT6A-C66-lr0B.js → GVVKDT6A-CF9ejW_c.js} +103 -103
  26. package/dist/Hint.js +8 -7
  27. package/dist/Icon.js +20 -15
  28. package/dist/InputText.css +1 -1
  29. package/dist/InputText.js +63 -62
  30. package/dist/{KPUWHTQJ-Byij2al4.js → KPUWHTQJ-Dv3cAqjP.js} +33 -31
  31. package/dist/Label.js +8 -7
  32. package/dist/Link.css +1 -1
  33. package/dist/Link.js +51 -48
  34. package/dist/Loader.js +11 -10
  35. package/dist/Logo.js +20 -13
  36. package/dist/Modal.js +144 -114
  37. package/dist/{NI3IVY7K-DpF3td-7.js → NI3IVY7K-Dy240mkD.js} +160 -160
  38. package/dist/{NMGNQVTG-BgAqqGOq.js → NMGNQVTG-DRO2uXZT.js} +6 -6
  39. package/dist/{OE2EFRVA-DkdhQLJL.js → OE2EFRVA-Dg1R6gaC.js} +186 -170
  40. package/dist/{OLVWQA7U-wHytlFYu.js → OLVWQA7U-Dia3UUnG.js} +36 -36
  41. package/dist/Pagination.js +38 -37
  42. package/dist/PasswordInput.js +20 -17
  43. package/dist/Popover.js +88 -72
  44. package/dist/{RTNCFSKZ-LcIdBwa8.js → RTNCFSKZ-BywELldk.js} +42 -42
  45. package/dist/Radio.js +19 -19
  46. package/dist/RadioGroup.js +28 -27
  47. package/dist/RadioTab.js +1 -1
  48. package/dist/{SBSPVDDI-BoxPz2JY.js → SBSPVDDI-CmtnvvUX.js} +46 -46
  49. package/dist/SQZLCNLX-Dg4KKdNJ.js +83 -0
  50. package/dist/Search.css +1 -1
  51. package/dist/Search.js +107 -101
  52. package/dist/Select.css +1 -1
  53. package/dist/Select.js +203 -202
  54. package/dist/Slider.js +65 -61
  55. package/dist/Stepper.js +33 -27
  56. package/dist/StickyNote.js +29 -23
  57. package/dist/Swiper.js +51 -50
  58. package/dist/{T22PY7TE-CzEDuEn1.js → T22PY7TE-gLuJpoOm.js} +46 -46
  59. package/dist/Table.js +33 -21
  60. package/dist/Tabs.js +160 -152
  61. package/dist/Tag.css +1 -1
  62. package/dist/Tag.js +69 -65
  63. package/dist/Text.js +3 -2
  64. package/dist/Textarea.css +1 -1
  65. package/dist/Textarea.js +25 -18
  66. package/dist/TimePicker.js +22 -21
  67. package/dist/Toast.js +226 -201
  68. package/dist/Toggle.js +15 -14
  69. package/dist/Tooltip.js +28 -27
  70. package/dist/VariantIcon.js +6 -5
  71. package/dist/VisuallyHidden.js +7 -6
  72. package/dist/WelcomeLoader.js +3 -2
  73. package/dist/XCKGTAUF-CJwwVibW.js +25 -0
  74. package/dist/{Y67KZUMI-BDyUNSJw.js → Y67KZUMI-BwLWwpNF.js} +2 -2
  75. package/dist/{ZTXFEM5L-CjFLRObi.js → ZTXFEM5L-WGHY_jqg.js} +3 -3
  76. package/dist/types/components/Alert/components/Title.d.ts +4 -1
  77. package/dist/types/components/Alert/index.d.ts +4 -1
  78. package/dist/types/components/Card/Body.d.ts +2 -3
  79. package/dist/types/components/Card/Footer.d.ts +6 -0
  80. package/dist/types/components/Card/Header.d.ts +5 -0
  81. package/dist/types/components/Card/index.d.ts +7 -8
  82. package/dist/types/components/Card/types.d.ts +16 -3
  83. package/dist/types/components/Checkbox/index.d.ts +1 -2
  84. package/dist/types/components/Checkbox/types.d.ts +3 -1
  85. package/dist/types/components/DateTimePickerCommon/CustomHeader.d.ts +4 -1
  86. package/dist/types/components/DateTimePickerCommon/CustomPopper.d.ts +6 -3
  87. package/dist/types/components/Drawer/AssetDrawer/Header.d.ts +4 -1
  88. package/dist/types/components/Drawer/AssetDrawer/IconBlock.d.ts +4 -1
  89. package/dist/types/components/Drawer/components/Close.d.ts +4 -1
  90. package/dist/types/components/Drawer/components/Title.d.ts +4 -1
  91. package/dist/types/components/Drawer/index.d.ts +12 -3
  92. package/dist/types/components/DropdownMenu/Action.d.ts +2 -0
  93. package/dist/types/components/DropdownMenu/Group.d.ts +4 -0
  94. package/dist/types/components/DropdownMenu/Item.d.ts +7 -0
  95. package/dist/types/components/DropdownMenu/Search.d.ts +2 -0
  96. package/dist/types/components/DropdownMenu/Submenu.d.ts +4 -0
  97. package/dist/types/components/DropdownMenu/index.d.ts +11 -0
  98. package/dist/types/components/DropdownMenu/types.d.ts +26 -5
  99. package/dist/types/components/FileDrop/components/FilePreview.d.ts +4 -1
  100. package/dist/types/components/FileDrop/components/Message.d.ts +4 -1
  101. package/dist/types/components/Icon/icons.d.ts +4 -3
  102. package/dist/types/components/Loader/index.d.ts +4 -1
  103. package/dist/types/components/Modal/Assets/AssetContent.d.ts +4 -1
  104. package/dist/types/components/Modal/Assets/AssetTitle.d.ts +4 -1
  105. package/dist/types/components/Modal/Assets/CloseButton.d.ts +4 -1
  106. package/dist/types/components/Modal/Assets/Dialog.d.ts +4 -1
  107. package/dist/types/components/Modal/Assets/Iframe.d.ts +4 -1
  108. package/dist/types/components/Modal/Assets/index.d.ts +16 -4
  109. package/dist/types/components/Modal/components/Close.d.ts +4 -1
  110. package/dist/types/components/Modal/index.d.ts +16 -4
  111. package/dist/types/components/PasswordInput/ToggleButton.d.ts +4 -1
  112. package/dist/types/components/Popover/Arrow.d.ts +4 -1
  113. package/dist/types/components/Popover/ContentWrapper.d.ts +4 -1
  114. package/dist/types/components/RadioGroup/index.d.ts +4 -1
  115. package/dist/types/components/Stepper/index.d.ts +8 -2
  116. package/dist/types/components/StickyNote/components/Button.d.ts +4 -1
  117. package/dist/types/components/StickyNote/components/Title.d.ts +4 -1
  118. package/dist/types/components/StickyNote/index.d.ts +8 -2
  119. package/dist/types/components/Swiper/index.d.ts +4 -1
  120. package/dist/types/components/Table/index.d.ts +20 -5
  121. package/dist/types/components/Tabs/components/ActiveBar/index.d.ts +4 -1
  122. package/dist/types/components/Tag/types.d.ts +4 -2
  123. package/dist/types/components/Textarea/types.d.ts +1 -0
  124. package/dist/types/components/Toast/index.d.ts +4 -1
  125. package/package.json +1 -1
  126. package/dist/2W3RN7C5-uG7eBeTQ.js +0 -61
  127. package/dist/SQZLCNLX-CUlXoT69.js +0 -82
  128. package/dist/XCKGTAUF-CahZE721.js +0 -25
package/dist/Toast.js CHANGED
@@ -1,78 +1,78 @@
1
1
  "use client";
2
2
  import './Toast.css';
3
- import { jsxs as N, jsx as y, Fragment as B } from "react/jsx-runtime";
3
+ import { jsxs as z, jsx as y, Fragment as B } from "react/jsx-runtime";
4
4
  import * as f from "react";
5
- import { useRef as Y, useCallback as z, useEffect as S, useState as de, forwardRef as Z, cloneElement as pe } from "react";
5
+ import { useRef as Y, useCallback as j, useEffect as C, useState as fe, forwardRef as Z, cloneElement as ge } from "react";
6
6
  import { c as L } from "./index-PAaZGbyz.js";
7
7
  import { Button as K } from "./Button.js";
8
8
  import { CloseButton as Q } from "./CloseButton.js";
9
9
  import { Icon as V } from "./Icon.js";
10
10
  import { Text as P } from "./Text.js";
11
11
  import { f as J } from "./forwardRefWithAs-8eP3ZN15.js";
12
- let me = { data: "" }, ue = (e) => typeof window == "object" ? ((e ? e.querySelector("#_goober") : window._goober) || Object.assign((e || document.head).appendChild(document.createElement("style")), { innerHTML: " ", id: "_goober" })).firstChild : e || me, fe = /(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g, ge = /\/\*[^]*?\*\/| +/g, W = /\n+/g, w = (e, t) => {
13
- let r = "", s = "", i = "";
12
+ let ye = { data: "" }, be = (e) => typeof window == "object" ? ((e ? e.querySelector("#_goober") : window._goober) || Object.assign((e || document.head).appendChild(document.createElement("style")), { innerHTML: " ", id: "_goober" })).firstChild : e || ye, he = /(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g, ve = /\/\*[^]*?\*\/| +/g, W = /\n+/g, w = (e, t) => {
13
+ let a = "", s = "", i = "";
14
14
  for (let o in e) {
15
- let a = e[o];
16
- o[0] == "@" ? o[1] == "i" ? r = o + " " + a + ";" : s += o[1] == "f" ? w(a, o) : o + "{" + w(a, o[1] == "k" ? "" : t) + "}" : typeof a == "object" ? s += w(a, t ? t.replace(/([^,])+/g, (n) => o.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g, (l) => /&/.test(l) ? l.replace(/&/g, n) : n ? n + " " + l : l)) : o) : a != null && (o = /^--/.test(o) ? o : o.replace(/[A-Z]/g, "-$&").toLowerCase(), i += w.p ? w.p(o, a) : o + ":" + a + ";");
15
+ let r = e[o];
16
+ o[0] == "@" ? o[1] == "i" ? a = o + " " + r + ";" : s += o[1] == "f" ? w(r, o) : o + "{" + w(r, o[1] == "k" ? "" : t) + "}" : typeof r == "object" ? s += w(r, t ? t.replace(/([^,])+/g, (n) => o.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g, (l) => /&/.test(l) ? l.replace(/&/g, n) : n ? n + " " + l : l)) : o) : r != null && (o = /^--/.test(o) ? o : o.replace(/[A-Z]/g, "-$&").toLowerCase(), i += w.p ? w.p(o, r) : o + ":" + r + ";");
17
17
  }
18
- return r + (t && i ? t + "{" + i + "}" : i) + s;
18
+ return a + (t && i ? t + "{" + i + "}" : i) + s;
19
19
  }, v = {}, X = (e) => {
20
20
  if (typeof e == "object") {
21
21
  let t = "";
22
- for (let r in e) t += r + X(e[r]);
22
+ for (let a in e) t += a + X(e[a]);
23
23
  return t;
24
24
  }
25
25
  return e;
26
- }, ye = (e, t, r, s, i) => {
27
- let o = X(e), a = v[o] || (v[o] = ((l) => {
26
+ }, xe = (e, t, a, s, i) => {
27
+ let o = X(e), r = v[o] || (v[o] = ((l) => {
28
28
  let c = 0, d = 11;
29
29
  for (; c < l.length; ) d = 101 * d + l.charCodeAt(c++) >>> 0;
30
30
  return "go" + d;
31
31
  })(o));
32
- if (!v[a]) {
32
+ if (!v[r]) {
33
33
  let l = o !== e ? e : ((c) => {
34
- let d, p, u = [{}];
35
- for (; d = fe.exec(c.replace(ge, "")); ) d[4] ? u.shift() : d[3] ? (p = d[3].replace(W, " ").trim(), u.unshift(u[0][p] = u[0][p] || {})) : u[0][d[1]] = d[2].replace(W, " ").trim();
36
- return u[0];
34
+ let d, m, p = [{}];
35
+ for (; d = he.exec(c.replace(ve, "")); ) d[4] ? p.shift() : d[3] ? (m = d[3].replace(W, " ").trim(), p.unshift(p[0][m] = p[0][m] || {})) : p[0][d[1]] = d[2].replace(W, " ").trim();
36
+ return p[0];
37
37
  })(e);
38
- v[a] = w(i ? { ["@keyframes " + a]: l } : l, r ? "" : "." + a);
38
+ v[r] = w(i ? { ["@keyframes " + r]: l } : l, a ? "" : "." + r);
39
39
  }
40
- let n = r && v.g ? v.g : null;
41
- return r && (v.g = v[a]), ((l, c, d, p) => {
42
- p ? c.data = c.data.replace(p, l) : c.data.indexOf(l) === -1 && (c.data = d ? l + c.data : c.data + l);
43
- })(v[a], t, s, n), a;
44
- }, be = (e, t, r) => e.reduce((s, i, o) => {
45
- let a = t[o];
46
- if (a && a.call) {
47
- let n = a(r), l = n && n.props && n.props.className || /^go/.test(n) && n;
48
- a = l ? "." + l : n && typeof n == "object" ? n.props ? "" : w(n, "") : n === !1 ? "" : n;
40
+ let n = a && v.g ? v.g : null;
41
+ return a && (v.g = v[r]), ((l, c, d, m) => {
42
+ m ? c.data = c.data.replace(m, l) : c.data.indexOf(l) === -1 && (c.data = d ? l + c.data : c.data + l);
43
+ })(v[r], t, s, n), r;
44
+ }, we = (e, t, a) => e.reduce((s, i, o) => {
45
+ let r = t[o];
46
+ if (r && r.call) {
47
+ let n = r(a), l = n && n.props && n.props.className || /^go/.test(n) && n;
48
+ r = l ? "." + l : n && typeof n == "object" ? n.props ? "" : w(n, "") : n === !1 ? "" : n;
49
49
  }
50
- return s + i + (a ?? "");
50
+ return s + i + (r ?? "");
51
51
  }, "");
52
- function q(e) {
53
- let t = this || {}, r = e.call ? e(t.p) : e;
54
- return ye(r.unshift ? r.raw ? be(r, [].slice.call(arguments, 1), t.p) : r.reduce((s, i) => Object.assign(s, i && i.call ? i(t.p) : i), {}) : r, ue(t.target), t.g, t.o, t.k);
52
+ function A(e) {
53
+ let t = this || {}, a = e.call ? e(t.p) : e;
54
+ return xe(a.unshift ? a.raw ? we(a, [].slice.call(arguments, 1), t.p) : a.reduce((s, i) => Object.assign(s, i && i.call ? i(t.p) : i), {}) : a, be(t.target), t.g, t.o, t.k);
55
55
  }
56
56
  let ee, R, F;
57
- q.bind({ g: 1 });
58
- let x = q.bind({ k: 1 });
59
- function he(e, t, r, s) {
60
- w.p = t, ee = e, R = r, F = s;
57
+ A.bind({ g: 1 });
58
+ let x = A.bind({ k: 1 });
59
+ function _e(e, t, a, s) {
60
+ w.p = t, ee = e, R = a, F = s;
61
61
  }
62
62
  function _(e, t) {
63
- let r = this || {};
63
+ let a = this || {};
64
64
  return function() {
65
65
  let s = arguments;
66
- function i(o, a) {
66
+ function i(o, r) {
67
67
  let n = Object.assign({}, o), l = n.className || i.className;
68
- r.p = Object.assign({ theme: R && R() }, n), r.o = / *go\d+/.test(l), n.className = q.apply(r, s) + (l ? " " + l : "");
68
+ a.p = Object.assign({ theme: R && R() }, n), a.o = / *go\d+/.test(l), n.className = A.apply(a, s) + (l ? " " + l : "");
69
69
  let c = e;
70
70
  return e[0] && (c = n.as || e, delete n.as), F && c[0] && F(n), ee(c, n);
71
71
  }
72
72
  return i;
73
73
  };
74
74
  }
75
- var ve = (e) => typeof e == "function", D = (e, t) => ve(e) ? e(t) : e, xe = /* @__PURE__ */ (() => {
75
+ var Ne = (e) => typeof e == "function", D = (e, t) => Ne(e) ? e(t) : e, je = /* @__PURE__ */ (() => {
76
76
  let e = 0;
77
77
  return () => (++e).toString();
78
78
  })(), te = /* @__PURE__ */ (() => {
@@ -84,115 +84,115 @@ var ve = (e) => typeof e == "function", D = (e, t) => ve(e) ? e(t) : e, xe = /*
84
84
  }
85
85
  return e;
86
86
  };
87
- })(), we = 20, M = "default", re = (e, t) => {
88
- let { toastLimit: r } = e.settings;
87
+ })(), ze = 20, M = "default", ae = (e, t) => {
88
+ let { toastLimit: a } = e.settings;
89
89
  switch (t.type) {
90
90
  case 0:
91
- return { ...e, toasts: [t.toast, ...e.toasts].slice(0, r) };
91
+ return { ...e, toasts: [t.toast, ...e.toasts].slice(0, a) };
92
92
  case 1:
93
- return { ...e, toasts: e.toasts.map((a) => a.id === t.toast.id ? { ...a, ...t.toast } : a) };
93
+ return { ...e, toasts: e.toasts.map((r) => r.id === t.toast.id ? { ...r, ...t.toast } : r) };
94
94
  case 2:
95
95
  let { toast: s } = t;
96
- return re(e, { type: e.toasts.find((a) => a.id === s.id) ? 1 : 0, toast: s });
96
+ return ae(e, { type: e.toasts.find((r) => r.id === s.id) ? 1 : 0, toast: s });
97
97
  case 3:
98
98
  let { toastId: i } = t;
99
- return { ...e, toasts: e.toasts.map((a) => a.id === i || i === void 0 ? { ...a, dismissed: !0, visible: !1 } : a) };
99
+ return { ...e, toasts: e.toasts.map((r) => r.id === i || i === void 0 ? { ...r, dismissed: !0, visible: !1 } : r) };
100
100
  case 4:
101
- return t.toastId === void 0 ? { ...e, toasts: [] } : { ...e, toasts: e.toasts.filter((a) => a.id !== t.toastId) };
101
+ return t.toastId === void 0 ? { ...e, toasts: [] } : { ...e, toasts: e.toasts.filter((r) => r.id !== t.toastId) };
102
102
  case 5:
103
103
  return { ...e, pausedAt: t.time };
104
104
  case 6:
105
105
  let o = t.time - (e.pausedAt || 0);
106
- return { ...e, pausedAt: void 0, toasts: e.toasts.map((a) => ({ ...a, pauseDuration: a.pauseDuration + o })) };
106
+ return { ...e, pausedAt: void 0, toasts: e.toasts.map((r) => ({ ...r, pauseDuration: r.pauseDuration + o })) };
107
107
  }
108
- }, C = [], ae = { toasts: [], pausedAt: void 0, settings: { toastLimit: we } }, h = {}, se = (e, t = M) => {
109
- h[t] = re(h[t] || ae, e), C.forEach(([r, s]) => {
110
- r === t && s(h[t]);
108
+ }, O = [], re = { toasts: [], pausedAt: void 0, settings: { toastLimit: ze } }, h = {}, se = (e, t = M) => {
109
+ h[t] = ae(h[t] || re, e), O.forEach(([a, s]) => {
110
+ a === t && s(h[t]);
111
111
  });
112
- }, oe = (e) => Object.keys(h).forEach((t) => se(e, t)), _e = (e) => Object.keys(h).find((t) => h[t].toasts.some((r) => r.id === e)), A = (e = M) => (t) => {
112
+ }, oe = (e) => Object.keys(h).forEach((t) => se(e, t)), ke = (e) => Object.keys(h).find((t) => h[t].toasts.some((a) => a.id === e)), q = (e = M) => (t) => {
113
113
  se(t, e);
114
- }, je = { blank: 4e3, error: 4e3, success: 2e3, loading: 1 / 0, custom: 4e3 }, ze = (e = {}, t = M) => {
115
- let [r, s] = de(h[t] || ae), i = Y(h[t]);
116
- S(() => (i.current !== h[t] && s(h[t]), C.push([t, s]), () => {
117
- let a = C.findIndex(([n]) => n === t);
118
- a > -1 && C.splice(a, 1);
114
+ }, $e = { blank: 4e3, error: 4e3, success: 2e3, loading: 1 / 0, custom: 4e3 }, Ee = (e = {}, t = M) => {
115
+ let [a, s] = fe(h[t] || re), i = Y(h[t]);
116
+ C(() => (i.current !== h[t] && s(h[t]), O.push([t, s]), () => {
117
+ let r = O.findIndex(([n]) => n === t);
118
+ r > -1 && O.splice(r, 1);
119
119
  }), [t]);
120
- let o = r.toasts.map((a) => {
120
+ let o = a.toasts.map((r) => {
121
121
  var n, l, c;
122
- return { ...e, ...e[a.type], ...a, removeDelay: a.removeDelay || ((n = e[a.type]) == null ? void 0 : n.removeDelay) || (e == null ? void 0 : e.removeDelay), duration: a.duration || ((l = e[a.type]) == null ? void 0 : l.duration) || (e == null ? void 0 : e.duration) || je[a.type], style: { ...e.style, ...(c = e[a.type]) == null ? void 0 : c.style, ...a.style } };
122
+ return { ...e, ...e[r.type], ...r, removeDelay: r.removeDelay || ((n = e[r.type]) == null ? void 0 : n.removeDelay) || (e == null ? void 0 : e.removeDelay), duration: r.duration || ((l = e[r.type]) == null ? void 0 : l.duration) || (e == null ? void 0 : e.duration) || $e[r.type], style: { ...e.style, ...(c = e[r.type]) == null ? void 0 : c.style, ...r.style } };
123
123
  });
124
- return { ...r, toasts: o };
125
- }, Ne = (e, t = "blank", r) => ({ createdAt: Date.now(), visible: !0, dismissed: !1, type: t, ariaProps: { role: "status", "aria-live": "polite" }, message: e, pauseDuration: 0, ...r, id: (r == null ? void 0 : r.id) || xe() }), $ = (e) => (t, r) => {
126
- let s = Ne(t, e, r);
127
- return A(s.toasterId || _e(s.id))({ type: 2, toast: s }), s.id;
128
- }, m = (e, t) => $("blank")(e, t);
129
- m.error = $("error");
130
- m.success = $("success");
131
- m.loading = $("loading");
132
- m.custom = $("custom");
133
- m.dismiss = (e, t) => {
134
- let r = { type: 3, toastId: e };
135
- t ? A(t)(r) : oe(r);
124
+ return { ...a, toasts: o };
125
+ }, Te = (e, t = "blank", a) => ({ createdAt: Date.now(), visible: !0, dismissed: !1, type: t, ariaProps: { role: "status", "aria-live": "polite" }, message: e, pauseDuration: 0, ...a, id: (a == null ? void 0 : a.id) || je() }), $ = (e) => (t, a) => {
126
+ let s = Te(t, e, a);
127
+ return q(s.toasterId || ke(s.id))({ type: 2, toast: s }), s.id;
128
+ }, u = (e, t) => $("blank")(e, t);
129
+ u.error = $("error");
130
+ u.success = $("success");
131
+ u.loading = $("loading");
132
+ u.custom = $("custom");
133
+ u.dismiss = (e, t) => {
134
+ let a = { type: 3, toastId: e };
135
+ t ? q(t)(a) : oe(a);
136
136
  };
137
- m.dismissAll = (e) => m.dismiss(void 0, e);
138
- m.remove = (e, t) => {
139
- let r = { type: 4, toastId: e };
140
- t ? A(t)(r) : oe(r);
137
+ u.dismissAll = (e) => u.dismiss(void 0, e);
138
+ u.remove = (e, t) => {
139
+ let a = { type: 4, toastId: e };
140
+ t ? q(t)(a) : oe(a);
141
141
  };
142
- m.removeAll = (e) => m.remove(void 0, e);
143
- m.promise = (e, t, r) => {
144
- let s = m.loading(t.loading, { ...r, ...r == null ? void 0 : r.loading });
142
+ u.removeAll = (e) => u.remove(void 0, e);
143
+ u.promise = (e, t, a) => {
144
+ let s = u.loading(t.loading, { ...a, ...a == null ? void 0 : a.loading });
145
145
  return typeof e == "function" && (e = e()), e.then((i) => {
146
146
  let o = t.success ? D(t.success, i) : void 0;
147
- return o ? m.success(o, { id: s, ...r, ...r == null ? void 0 : r.success }) : m.dismiss(s), i;
147
+ return o ? u.success(o, { id: s, ...a, ...a == null ? void 0 : a.success }) : u.dismiss(s), i;
148
148
  }).catch((i) => {
149
149
  let o = t.error ? D(t.error, i) : void 0;
150
- o ? m.error(o, { id: s, ...r, ...r == null ? void 0 : r.error }) : m.dismiss(s);
150
+ o ? u.error(o, { id: s, ...a, ...a == null ? void 0 : a.error }) : u.dismiss(s);
151
151
  }), e;
152
152
  };
153
- var ke = 1e3, $e = (e, t = "default") => {
154
- let { toasts: r, pausedAt: s } = ze(e, t), i = Y(/* @__PURE__ */ new Map()).current, o = z((p, u = ke) => {
155
- if (i.has(p)) return;
153
+ var Oe = 1e3, De = (e, t = "default") => {
154
+ let { toasts: a, pausedAt: s } = Ee(e, t), i = Y(/* @__PURE__ */ new Map()).current, o = j((m, p = Oe) => {
155
+ if (i.has(m)) return;
156
156
  let g = setTimeout(() => {
157
- i.delete(p), a({ type: 4, toastId: p });
158
- }, u);
159
- i.set(p, g);
157
+ i.delete(m), r({ type: 4, toastId: m });
158
+ }, p);
159
+ i.set(m, g);
160
160
  }, []);
161
- S(() => {
161
+ C(() => {
162
162
  if (s) return;
163
- let p = Date.now(), u = r.map((g) => {
163
+ let m = Date.now(), p = a.map((g) => {
164
164
  if (g.duration === 1 / 0) return;
165
- let E = (g.duration || 0) + g.pauseDuration - (p - g.createdAt);
165
+ let E = (g.duration || 0) + g.pauseDuration - (m - g.createdAt);
166
166
  if (E < 0) {
167
- g.visible && m.dismiss(g.id);
167
+ g.visible && u.dismiss(g.id);
168
168
  return;
169
169
  }
170
- return setTimeout(() => m.dismiss(g.id, t), E);
170
+ return setTimeout(() => u.dismiss(g.id, t), E);
171
171
  });
172
172
  return () => {
173
- u.forEach((g) => g && clearTimeout(g));
173
+ p.forEach((g) => g && clearTimeout(g));
174
174
  };
175
- }, [r, s, t]);
176
- let a = z(A(t), [t]), n = z(() => {
177
- a({ type: 5, time: Date.now() });
178
- }, [a]), l = z((p, u) => {
179
- a({ type: 1, toast: { id: p, height: u } });
180
- }, [a]), c = z(() => {
181
- s && a({ type: 6, time: Date.now() });
182
- }, [s, a]), d = z((p, u) => {
183
- let { reverseOrder: g = !1, gutter: E = 8, defaultPosition: G } = u || {}, I = r.filter((b) => (b.position || G) === (p.position || G) && b.height), ce = I.findIndex((b) => b.id === p.id), U = I.filter((b, T) => T < ce && b.visible).length;
184
- return I.filter((b) => b.visible).slice(...g ? [U + 1] : [0, U]).reduce((b, T) => b + (T.height || 0) + E, 0);
185
- }, [r]);
186
- return S(() => {
187
- r.forEach((p) => {
188
- if (p.dismissed) o(p.id, p.removeDelay);
175
+ }, [a, s, t]);
176
+ let r = j(q(t), [t]), n = j(() => {
177
+ r({ type: 5, time: Date.now() });
178
+ }, [r]), l = j((m, p) => {
179
+ r({ type: 1, toast: { id: m, height: p } });
180
+ }, [r]), c = j(() => {
181
+ s && r({ type: 6, time: Date.now() });
182
+ }, [s, r]), d = j((m, p) => {
183
+ let { reverseOrder: g = !1, gutter: E = 8, defaultPosition: G } = p || {}, I = a.filter((b) => (b.position || G) === (m.position || G) && b.height), pe = I.findIndex((b) => b.id === m.id), U = I.filter((b, S) => S < pe && b.visible).length;
184
+ return I.filter((b) => b.visible).slice(...g ? [U + 1] : [0, U]).reduce((b, S) => b + (S.height || 0) + E, 0);
185
+ }, [a]);
186
+ return C(() => {
187
+ a.forEach((m) => {
188
+ if (m.dismissed) o(m.id, m.removeDelay);
189
189
  else {
190
- let u = i.get(p.id);
191
- u && (clearTimeout(u), i.delete(p.id));
190
+ let p = i.get(m.id);
191
+ p && (clearTimeout(p), i.delete(m.id));
192
192
  }
193
193
  });
194
- }, [r, o]), { toasts: r, handlers: { updateHeight: l, startPause: n, endPause: c, calculateOffset: d } };
195
- }, Ee = x`
194
+ }, [a, o]), { toasts: a, handlers: { updateHeight: l, startPause: n, endPause: c, calculateOffset: d } };
195
+ }, Ae = x`
196
196
  from {
197
197
  transform: scale(0) rotate(45deg);
198
198
  opacity: 0;
@@ -200,7 +200,7 @@ from {
200
200
  to {
201
201
  transform: scale(1) rotate(45deg);
202
202
  opacity: 1;
203
- }`, Oe = x`
203
+ }`, qe = x`
204
204
  from {
205
205
  transform: scale(0);
206
206
  opacity: 0;
@@ -208,7 +208,7 @@ from {
208
208
  to {
209
209
  transform: scale(1);
210
210
  opacity: 1;
211
- }`, Ce = x`
211
+ }`, Ie = x`
212
212
  from {
213
213
  transform: scale(0) rotate(90deg);
214
214
  opacity: 0;
@@ -216,7 +216,7 @@ from {
216
216
  to {
217
217
  transform: scale(1) rotate(90deg);
218
218
  opacity: 1;
219
- }`, De = _("div")`
219
+ }`, Se = _("div")`
220
220
  width: 20px;
221
221
  opacity: 0;
222
222
  height: 20px;
@@ -225,14 +225,14 @@ to {
225
225
  position: relative;
226
226
  transform: rotate(45deg);
227
227
 
228
- animation: ${Ee} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
228
+ animation: ${Ae} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
229
229
  forwards;
230
230
  animation-delay: 100ms;
231
231
 
232
232
  &:after,
233
233
  &:before {
234
234
  content: '';
235
- animation: ${Oe} 0.15s ease-out forwards;
235
+ animation: ${qe} 0.15s ease-out forwards;
236
236
  animation-delay: 150ms;
237
237
  position: absolute;
238
238
  border-radius: 3px;
@@ -245,18 +245,18 @@ to {
245
245
  }
246
246
 
247
247
  &:before {
248
- animation: ${Ce} 0.15s ease-out forwards;
248
+ animation: ${Ie} 0.15s ease-out forwards;
249
249
  animation-delay: 180ms;
250
250
  transform: rotate(90deg);
251
251
  }
252
- `, qe = x`
252
+ `, Ce = x`
253
253
  from {
254
254
  transform: rotate(0deg);
255
255
  }
256
256
  to {
257
257
  transform: rotate(360deg);
258
258
  }
259
- `, Ae = _("div")`
259
+ `, Pe = _("div")`
260
260
  width: 12px;
261
261
  height: 12px;
262
262
  box-sizing: border-box;
@@ -264,8 +264,8 @@ to {
264
264
  border-radius: 100%;
265
265
  border-color: ${(e) => e.secondary || "#e0e0e0"};
266
266
  border-right-color: ${(e) => e.primary || "#616161"};
267
- animation: ${qe} 1s linear infinite;
268
- `, Ie = x`
267
+ animation: ${Ce} 1s linear infinite;
268
+ `, Re = x`
269
269
  from {
270
270
  transform: scale(0) rotate(45deg);
271
271
  opacity: 0;
@@ -273,7 +273,7 @@ from {
273
273
  to {
274
274
  transform: scale(1) rotate(45deg);
275
275
  opacity: 1;
276
- }`, Te = x`
276
+ }`, Fe = x`
277
277
  0% {
278
278
  height: 0;
279
279
  width: 0;
@@ -287,7 +287,7 @@ to {
287
287
  100% {
288
288
  opacity: 1;
289
289
  height: 10px;
290
- }`, Se = _("div")`
290
+ }`, Le = _("div")`
291
291
  width: 20px;
292
292
  opacity: 0;
293
293
  height: 20px;
@@ -296,13 +296,13 @@ to {
296
296
  position: relative;
297
297
  transform: rotate(45deg);
298
298
 
299
- animation: ${Ie} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
299
+ animation: ${Re} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
300
300
  forwards;
301
301
  animation-delay: 100ms;
302
302
  &:after {
303
303
  content: '';
304
304
  box-sizing: border-box;
305
- animation: ${Te} 0.2s ease-out forwards;
305
+ animation: ${Fe} 0.2s ease-out forwards;
306
306
  opacity: 0;
307
307
  animation-delay: 200ms;
308
308
  position: absolute;
@@ -314,16 +314,16 @@ to {
314
314
  height: 10px;
315
315
  width: 6px;
316
316
  }
317
- `, Pe = _("div")`
317
+ `, Me = _("div")`
318
318
  position: absolute;
319
- `, Re = _("div")`
319
+ `, He = _("div")`
320
320
  position: relative;
321
321
  display: flex;
322
322
  justify-content: center;
323
323
  align-items: center;
324
324
  min-width: 20px;
325
325
  min-height: 20px;
326
- `, Fe = x`
326
+ `, Ge = x`
327
327
  from {
328
328
  transform: scale(0.6);
329
329
  opacity: 0.4;
@@ -331,23 +331,23 @@ from {
331
331
  to {
332
332
  transform: scale(1);
333
333
  opacity: 1;
334
- }`, Le = _("div")`
334
+ }`, Ue = _("div")`
335
335
  position: relative;
336
336
  transform: scale(0.6);
337
337
  opacity: 0.4;
338
338
  min-width: 20px;
339
- animation: ${Fe} 0.3s 0.12s cubic-bezier(0.175, 0.885, 0.32, 1.275)
339
+ animation: ${Ge} 0.3s 0.12s cubic-bezier(0.175, 0.885, 0.32, 1.275)
340
340
  forwards;
341
- `, Me = ({ toast: e }) => {
342
- let { icon: t, type: r, iconTheme: s } = e;
343
- return t !== void 0 ? typeof t == "string" ? f.createElement(Le, null, t) : t : r === "blank" ? null : f.createElement(Re, null, f.createElement(Ae, { ...s }), r !== "loading" && f.createElement(Pe, null, r === "error" ? f.createElement(De, { ...s }) : f.createElement(Se, { ...s })));
344
- }, He = (e) => `
341
+ `, We = ({ toast: e }) => {
342
+ let { icon: t, type: a, iconTheme: s } = e;
343
+ return t !== void 0 ? typeof t == "string" ? f.createElement(Ue, null, t) : t : a === "blank" ? null : f.createElement(He, null, f.createElement(Pe, { ...s }), a !== "loading" && f.createElement(Me, null, a === "error" ? f.createElement(Se, { ...s }) : f.createElement(Le, { ...s })));
344
+ }, Be = (e) => `
345
345
  0% {transform: translate3d(0,${e * -200}%,0) scale(.6); opacity:.5;}
346
346
  100% {transform: translate3d(0,0,0) scale(1); opacity:1;}
347
- `, Ge = (e) => `
347
+ `, Ye = (e) => `
348
348
  0% {transform: translate3d(0,0,-1px) scale(1); opacity:1;}
349
349
  100% {transform: translate3d(0,${e * -150}%,-1px) scale(.6); opacity:0;}
350
- `, Ue = "0%{opacity:0;} 100%{opacity:1;}", We = "0%{opacity:1;} 100%{opacity:0;}", Be = _("div")`
350
+ `, Ze = "0%{opacity:0;} 100%{opacity:1;}", Ke = "0%{opacity:1;} 100%{opacity:0;}", Qe = _("div")`
351
351
  display: flex;
352
352
  align-items: center;
353
353
  background: #fff;
@@ -359,117 +359,136 @@ to {
359
359
  pointer-events: auto;
360
360
  padding: 8px 10px;
361
361
  border-radius: 8px;
362
- `, Ye = _("div")`
362
+ `, Ve = _("div")`
363
363
  display: flex;
364
364
  justify-content: center;
365
365
  margin: 4px 10px;
366
366
  color: inherit;
367
367
  flex: 1 1 auto;
368
368
  white-space: pre-line;
369
- `, Ze = (e, t) => {
370
- let r = e.includes("top") ? 1 : -1, [s, i] = te() ? [Ue, We] : [He(r), Ge(r)];
369
+ `, Je = (e, t) => {
370
+ let a = e.includes("top") ? 1 : -1, [s, i] = te() ? [Ze, Ke] : [Be(a), Ye(a)];
371
371
  return { animation: t ? `${x(s)} 0.35s cubic-bezier(.21,1.02,.73,1) forwards` : `${x(i)} 0.4s forwards cubic-bezier(.06,.71,.55,1)` };
372
- }, Ke = f.memo(({ toast: e, position: t, style: r, children: s }) => {
373
- let i = e.height ? Ze(e.position || t || "top-center", e.visible) : { opacity: 0 }, o = f.createElement(Me, { toast: e }), a = f.createElement(Ye, { ...e.ariaProps }, D(e.message, e));
374
- return f.createElement(Be, { className: e.className, style: { ...i, ...r, ...e.style } }, typeof s == "function" ? s({ icon: o, message: a }) : f.createElement(f.Fragment, null, o, a));
372
+ }, Xe = f.memo(({ toast: e, position: t, style: a, children: s }) => {
373
+ let i = e.height ? Je(e.position || t || "top-center", e.visible) : { opacity: 0 }, o = f.createElement(We, { toast: e }), r = f.createElement(Ve, { ...e.ariaProps }, D(e.message, e));
374
+ return f.createElement(Qe, { className: e.className, style: { ...i, ...a, ...e.style } }, typeof s == "function" ? s({ icon: o, message: r }) : f.createElement(f.Fragment, null, o, r));
375
375
  });
376
- he(f.createElement);
377
- var Qe = ({ id: e, className: t, style: r, onHeightUpdate: s, children: i }) => {
378
- let o = f.useCallback((a) => {
379
- if (a) {
376
+ _e(f.createElement);
377
+ var et = ({ id: e, className: t, style: a, onHeightUpdate: s, children: i }) => {
378
+ let o = f.useCallback((r) => {
379
+ if (r) {
380
380
  let n = () => {
381
- let l = a.getBoundingClientRect().height;
381
+ let l = r.getBoundingClientRect().height;
382
382
  s(e, l);
383
383
  };
384
- n(), new MutationObserver(n).observe(a, { subtree: !0, childList: !0, characterData: !0 });
384
+ n(), new MutationObserver(n).observe(r, { subtree: !0, childList: !0, characterData: !0 });
385
385
  }
386
386
  }, [e, s]);
387
- return f.createElement("div", { ref: o, className: t, style: r }, i);
388
- }, Ve = (e, t) => {
389
- let r = e.includes("top"), s = r ? { top: 0 } : { bottom: 0 }, i = e.includes("center") ? { justifyContent: "center" } : e.includes("right") ? { justifyContent: "flex-end" } : {};
390
- return { left: 0, right: 0, display: "flex", position: "absolute", transition: te() ? void 0 : "all 230ms cubic-bezier(.21,1.02,.73,1)", transform: `translateY(${t * (r ? 1 : -1)}px)`, ...s, ...i };
391
- }, Je = q`
387
+ return f.createElement("div", { ref: o, className: t, style: a }, i);
388
+ }, tt = (e, t) => {
389
+ let a = e.includes("top"), s = a ? { top: 0 } : { bottom: 0 }, i = e.includes("center") ? { justifyContent: "center" } : e.includes("right") ? { justifyContent: "flex-end" } : {};
390
+ return { left: 0, right: 0, display: "flex", position: "absolute", transition: te() ? void 0 : "all 230ms cubic-bezier(.21,1.02,.73,1)", transform: `translateY(${t * (a ? 1 : -1)}px)`, ...s, ...i };
391
+ }, at = A`
392
392
  z-index: 9999;
393
393
  > * {
394
394
  pointer-events: auto;
395
395
  }
396
- `, O = 16, Xe = ({ reverseOrder: e, position: t = "top-center", toastOptions: r, gutter: s, children: i, toasterId: o, containerStyle: a, containerClassName: n }) => {
397
- let { toasts: l, handlers: c } = $e(r, o);
398
- return f.createElement("div", { "data-rht-toaster": o || "", style: { position: "fixed", zIndex: 9999, top: O, left: O, right: O, bottom: O, pointerEvents: "none", ...a }, className: n, onMouseEnter: c.startPause, onMouseLeave: c.endPause }, l.map((d) => {
399
- let p = d.position || t, u = c.calculateOffset(d, { reverseOrder: e, gutter: s, defaultPosition: t }), g = Ve(p, u);
400
- return f.createElement(Qe, { id: d.id, key: d.id, onHeightUpdate: c.updateHeight, className: d.visible ? Je : "", style: g }, d.type === "custom" ? D(d.message, d) : i ? i(d) : f.createElement(Ke, { toast: d, position: p }));
396
+ `, T = 16, ie = ({ reverseOrder: e, position: t = "top-center", toastOptions: a, gutter: s, children: i, toasterId: o, containerStyle: r, containerClassName: n }) => {
397
+ let { toasts: l, handlers: c } = De(a, o);
398
+ return f.createElement("div", { "data-rht-toaster": o || "", style: { position: "fixed", zIndex: 9999, top: T, left: T, right: T, bottom: T, pointerEvents: "none", ...r }, className: n, onMouseEnter: c.startPause, onMouseLeave: c.endPause }, l.map((d) => {
399
+ let m = d.position || t, p = c.calculateOffset(d, { reverseOrder: e, gutter: s, defaultPosition: t }), g = tt(m, p);
400
+ return f.createElement(et, { id: d.id, key: d.id, onHeightUpdate: c.updateHeight, className: d.visible ? at : "", style: g }, d.type === "custom" ? D(d.message, d) : i ? i(d) : f.createElement(Xe, { toast: d, position: m }));
401
401
  }));
402
402
  };
403
- const et = "_root_q0jyz_2", tt = "_icon_q0jyz_17", rt = "_progress_q0jyz_40", at = "_snackbar_q0jyz_63", st = "_growl_q0jyz_71", ot = "_content_q0jyz_79", it = "_title_q0jyz_91", H = {
404
- root: et,
405
- icon: tt,
403
+ const rt = "_root_q0jyz_2", st = "_icon_q0jyz_17", ot = "_progress_q0jyz_40", it = "_snackbar_q0jyz_63", nt = "_growl_q0jyz_71", lt = "_content_q0jyz_79", ct = "_title_q0jyz_91", H = {
404
+ root: rt,
405
+ icon: st,
406
406
  "variant-error": "_variant-error_q0jyz_24",
407
407
  "variant-warning": "_variant-warning_q0jyz_28",
408
408
  "variant-success": "_variant-success_q0jyz_32",
409
409
  "variant-info": "_variant-info_q0jyz_36",
410
- progress: rt,
410
+ progress: ot,
411
411
  "progress-bar": "_progress-bar_q0jyz_45",
412
412
  "toast-progress": "_toast-progress_q0jyz_1",
413
413
  "hide-progress-bar": "_hide-progress-bar_q0jyz_52",
414
- snackbar: at,
415
- growl: st,
416
- content: ot,
414
+ snackbar: it,
415
+ growl: nt,
416
+ content: lt,
417
417
  "close-button": "_close-button_q0jyz_85",
418
- title: it
419
- }, j = L(H), ie = Z(
418
+ title: ct
419
+ }, N = L(H), ne = Z(
420
420
  ({
421
421
  children: e,
422
422
  className: t,
423
- cta: r,
423
+ cta: a,
424
424
  duration: s,
425
425
  hasCloseButton: i = !0,
426
426
  onClose: o,
427
- showProgressBar: a = !1,
427
+ showProgressBar: r = !1,
428
428
  title: n,
429
429
  variant: l = "info",
430
430
  ...c
431
- }, d) => /* @__PURE__ */ N("div", { className: j("root", `variant-${l}`, t), ref: d, ...c, children: [
432
- /* @__PURE__ */ N("div", { className: j("growl"), children: [
433
- l ? /* @__PURE__ */ y(V, { className: j("icon"), name: le[l], size: "lg" }) : null,
434
- /* @__PURE__ */ N("div", { className: j("content"), children: [
435
- /* @__PURE__ */ N("span", { children: [
431
+ }, d) => /* @__PURE__ */ z("div", { className: N("root", `variant-${l}`, t), ref: d, ...c, children: [
432
+ /* @__PURE__ */ z("div", { className: N("growl"), children: [
433
+ l ? /* @__PURE__ */ y(V, { className: N("icon"), name: me[l], size: "lg" }) : null,
434
+ /* @__PURE__ */ z("div", { className: N("content"), children: [
435
+ /* @__PURE__ */ z("span", { children: [
436
436
  /* @__PURE__ */ y(P, { variant: "body-md-strong", children: n }),
437
437
  /* @__PURE__ */ y(P, { variant: "body-md", children: e })
438
438
  ] }),
439
- r ? /* @__PURE__ */ y(B, { children: r }) : null
439
+ a ? /* @__PURE__ */ y(B, { children: a }) : null
440
440
  ] }),
441
- i ? /* @__PURE__ */ y(Q, { className: j("close-button"), onClick: o, size: "sm" }) : null
441
+ i ? /* @__PURE__ */ y(
442
+ Q,
443
+ {
444
+ className: N("close-button"),
445
+ onClick: (m) => {
446
+ m.preventDefault(), o == null || o();
447
+ },
448
+ size: "sm"
449
+ }
450
+ ) : null
442
451
  ] }),
443
452
  /* @__PURE__ */ y(
444
453
  "div",
445
454
  {
446
- className: j(a && "progress"),
455
+ className: N(r && "progress"),
447
456
  style: {
448
457
  "--duration": i ? `${s}ms` : "5000ms"
449
458
  },
450
- children: /* @__PURE__ */ y("div", { className: j("progress-bar") })
459
+ children: /* @__PURE__ */ y("div", { className: N("progress-bar") })
451
460
  }
452
461
  )
453
462
  ] })
454
- ), nt = J((e, t) => /* @__PURE__ */ y(K, { ref: t, size: "md", variant: "secondary", ...e }));
455
- ie.displayName = "Growl";
456
- const k = L(H), ne = Z(
463
+ );
464
+ ne.displayName = "Toast.Growl";
465
+ const le = J((e, t) => /* @__PURE__ */ y(K, { ref: t, size: "md", variant: "secondary", ...e }));
466
+ le.displayName = "Toast.GrowlAction";
467
+ const k = L(H), ce = Z(
457
468
  ({
458
469
  children: e,
459
470
  className: t,
460
- cta: r,
471
+ cta: a,
461
472
  duration: s,
462
473
  hasCloseButton: i = !0,
463
474
  hideProgressBar: o = !1,
464
- onClose: a,
475
+ onClose: r,
465
476
  variant: n = "info",
466
477
  ...l
467
- }, c) => /* @__PURE__ */ N("div", { className: k("root", `variant-${n}`, t), ref: c, ...l, children: [
468
- /* @__PURE__ */ N("div", { className: k("snackbar"), children: [
469
- n ? /* @__PURE__ */ y(V, { className: k("icon"), name: le[n], size: "lg" }) : null,
478
+ }, c) => /* @__PURE__ */ z("div", { className: k("root", `variant-${n}`, t), ref: c, ...l, children: [
479
+ /* @__PURE__ */ z("div", { className: k("snackbar"), children: [
480
+ n ? /* @__PURE__ */ y(V, { className: k("icon"), name: me[n], size: "lg" }) : null,
470
481
  /* @__PURE__ */ y(P, { variant: "body-md-strong", children: e }),
471
- r ? /* @__PURE__ */ y(B, { children: r }) : null,
472
- i ? /* @__PURE__ */ y(Q, { onClick: a, size: "sm" }) : null
482
+ a ? /* @__PURE__ */ y(B, { children: a }) : null,
483
+ i ? /* @__PURE__ */ y(
484
+ Q,
485
+ {
486
+ onClick: (d) => {
487
+ d.preventDefault(), r == null || r();
488
+ },
489
+ size: "sm"
490
+ }
491
+ ) : null
473
492
  ] }),
474
493
  /* @__PURE__ */ y(
475
494
  "div",
@@ -482,23 +501,27 @@ const k = L(H), ne = Z(
482
501
  }
483
502
  )
484
503
  ] })
485
- ), lt = J((e, t) => /* @__PURE__ */ y(K, { ref: t, size: "md", variant: "secondary", ...e }));
486
- ne.displayName = "Snackbar";
487
- const ct = L(H), le = {
504
+ );
505
+ ce.displayName = "Toast.Snackbar";
506
+ const de = J((e, t) => /* @__PURE__ */ y(K, { ref: t, size: "md", variant: "secondary", ...e }));
507
+ de.displayName = "Toast.SnackbarAction";
508
+ const dt = L(H), me = {
488
509
  error: "exclamation-octagon",
489
510
  info: "info-circle",
490
511
  success: "check-circle",
491
512
  warning: "exclamation-triangle"
492
- }, dt = {
513
+ }, mt = {
493
514
  error: 8e3,
494
515
  info: 7e3,
495
516
  success: 7e3,
496
517
  warning: 8e3
497
- }, pt = ({ children: e, className: t, ...r }) => /* @__PURE__ */ y("p", { className: ct("title", t), ...r, children: e }), xt = (e, t) => {
518
+ }, ue = ({ children: e, className: t, ...a }) => /* @__PURE__ */ y("p", { className: dt("title", t), ...a, children: e });
519
+ ue.displayName = "Toast.Title";
520
+ const xt = (e, t) => {
498
521
  const s = ("type" in e ? e.type.displayName || e.type.name : void 0) === "Growl" ? "top-right" : "bottom-center", i = () => {
499
- t.onClose && t.onClose(), m.dismiss(t.id);
500
- }, o = e.props.variant || "info", a = {
501
- duration: dt[o],
522
+ t != null && t.onClose && t.onClose(), u.dismiss(t == null ? void 0 : t.id);
523
+ }, o = e.props.variant || "info", r = {
524
+ duration: mt[o],
502
525
  position: s,
503
526
  style: {
504
527
  backgroundColor: "transparent",
@@ -508,19 +531,21 @@ const ct = L(H), le = {
508
531
  },
509
532
  ...t
510
533
  };
511
- return m(
512
- pe(e, { duration: a.duration, onClose: i }),
513
- a
534
+ return u(
535
+ ge(e, { duration: r.duration, onClose: i }),
536
+ r
514
537
  );
515
- }, wt = Object.assign(Xe, {
516
- Growl: ie,
517
- GrowlAction: nt,
518
- Snackbar: ne,
519
- SnackbarAction: lt,
520
- Title: pt
538
+ };
539
+ ie.displayName = "Toast";
540
+ const wt = Object.assign(ie, {
541
+ Growl: ne,
542
+ GrowlAction: le,
543
+ Snackbar: ce,
544
+ SnackbarAction: de,
545
+ Title: ue
521
546
  });
522
547
  export {
523
- le as ICON,
548
+ me as ICON,
524
549
  wt as Toast,
525
550
  xt as toast
526
551
  };