welcome-ui 10.0.0-alpha.4 → 10.0.0-alpha.5

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