kitzo 2.3.6 → 2.3.8

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 (37) hide show
  1. package/README.md +39 -258
  2. package/dist/fns.d.ts +3 -0
  3. package/dist/fns.js +4 -0
  4. package/dist/functions/copy/copy.js +23 -0
  5. package/dist/index.d.ts +119 -0
  6. package/dist/index.js +14 -0
  7. package/dist/react/components/toast/Toaster.js +71 -0
  8. package/dist/react/components/toast/helpers/addToastStyles.js +259 -0
  9. package/dist/react/components/toast/helpers/createToast.js +45 -0
  10. package/dist/react/components/toast/helpers/listenar.js +14 -0
  11. package/dist/react/components/toast/helpers/manageToasts/addToasts.js +12 -0
  12. package/dist/react/components/toast/helpers/manageToasts/dismissToasts.js +17 -0
  13. package/dist/react/components/toast/helpers/manageToasts/manageToasts.js +9 -0
  14. package/dist/react/components/toast/helpers/manageToasts/timers.js +39 -0
  15. package/dist/react/components/toast/helpers/manageToasts/updateToasts.js +10 -0
  16. package/dist/react/components/toast/helpers/triggerToasts.js +99 -0
  17. package/dist/react/components/toast/partials/Svgs.js +98 -0
  18. package/dist/react/components/toast/partials/Toast.js +54 -0
  19. package/dist/react/components/toast/partials/ToastContainer.js +59 -0
  20. package/dist/react/components/tooltip/Tooltip.js +67 -0
  21. package/dist/react/components/tooltip/helpers/addTooltipStyles.js +230 -0
  22. package/dist/react/components/tooltip/helpers/getAnimationProperties.js +12 -0
  23. package/dist/react/components/tooltip/helpers/getPositionClass.js +27 -0
  24. package/dist/react/components/tooltip/partials/TooltipWrapper.js +29 -0
  25. package/dist/react/hooks/useCopy.js +38 -0
  26. package/dist/react/hooks/useDebounce.js +16 -0
  27. package/dist/react/hooks/useWindowSize.js +26 -0
  28. package/package.json +73 -77
  29. package/dist/functions/index.js +0 -36
  30. package/dist/functions/index.js.map +0 -1
  31. package/dist/functions/types.d.ts +0 -2
  32. package/dist/react/index.js +0 -1086
  33. package/dist/react/index.js.map +0 -1
  34. package/dist/react/types/hooks.d.ts +0 -34
  35. package/dist/react/types/toast.d.ts +0 -60
  36. package/dist/react/types/tooltip.d.ts +0 -55
  37. package/dist/react/types.d.ts +0 -3
@@ -0,0 +1,259 @@
1
+ const r = `.kitzo-toaster {
2
+ --default-bg: hsl(0, 0%, 100%);
3
+ --default-text: hsl(0, 0%, 10%);
4
+ --default-border: hsl(0, 0%, 94%);
5
+
6
+ --success-bg: var(--default-bg);
7
+ --success-text: var(--default-text);
8
+ --success-border: var(--default-border);
9
+
10
+ --warning-bg: var(--default-bg);
11
+ --warning-text: var(--default-text);
12
+ --warning-border: var(--default-border);
13
+
14
+ --error-bg: var(--default-bg);
15
+ --error-text: var(--default-text);
16
+ --error-border: var(--default-border);
17
+
18
+ --info-bg: var(--default-bg);
19
+ --info-text: var(--default-text);
20
+ --info-border: var(--default-border);
21
+
22
+ --loader-stroke: hsl(0, 0%, 20%);
23
+ --loader-bg: hsl(0, 0%, 80%);
24
+ }
25
+
26
+ .kitzo-toaster.kitzo-toaster-dark {
27
+ --default-bg: hsl(0, 0%, 15%);
28
+ --default-text: hsl(0, 0%, 95%);
29
+ --default-border: hsl(0, 0%, 17%);
30
+
31
+ --success-bg: var(--default-bg);
32
+ --success-text: var(--default-text);
33
+ --success-border: var(--default-border);
34
+
35
+ --warning-bg: var(--default-bg);
36
+ --warning-text: var(--default-text);
37
+ --warning-border: var(--default-border);
38
+
39
+ --error-bg: var(--default-bg);
40
+ --error-text: var(--default-text);
41
+ --error-border: var(--default-border);
42
+
43
+ --info-bg: var(--default-bg);
44
+ --info-text: var(--default-text);
45
+ --info-border: var(--default-border);
46
+
47
+ --loader-stroke: hsl(0, 0%, 90%);
48
+ --loader-bg: hsl(0, 0%, 40%);
49
+ }
50
+
51
+ .kitzo-toaster.kitzo-toaster-rich-colors {
52
+ --success-bg: hsl(142, 65%, 95%);
53
+ --success-text: hsl(142, 98%, 30%);
54
+ --success-border: hsl(142, 100%, 93%);
55
+
56
+ --warning-bg: hsl(35, 68%, 95%);
57
+ --warning-text: hsl(35, 98%, 40%);
58
+ --warning-border: hsl(35, 100%, 94%);
59
+
60
+ --error-bg: hsl(0, 65%, 95%);
61
+ --error-text: hsl(0, 98%, 40%);
62
+ --error-border: hsl(0, 100%, 94%);
63
+
64
+ --info-bg: hsl(210, 65%, 95%);
65
+ --info-text: hsl(210, 100%, 20%);
66
+ --info-border: hsl(210, 100%, 94%);
67
+ }
68
+
69
+ .kitzo-toaster.kitzo-toaster-rich-colors.kitzo-toaster-dark {
70
+ --success-bg: hsl(142, 65%, 15%);
71
+ --success-text: hsl(142, 98%, 70%);
72
+ --success-border: hsl(142, 100%, 15%);
73
+
74
+ --warning-bg: hsl(35, 65%, 15%);
75
+ --warning-text: hsl(35, 98%, 70%);
76
+ --warning-border: hsl(35, 100%, 15%);
77
+
78
+ --error-bg: hsl(0, 65%, 15%);
79
+ --error-text: hsl(0, 98%, 70%);
80
+ --error-border: hsl(0, 100%, 15%);
81
+
82
+ --info-bg: hsl(210, 65%, 15%);
83
+ --info-text: hsl(210, 100%, 70%);
84
+ --info-border: hsl(210, 100%, 16%);
85
+ }
86
+
87
+ .kitzo-toast {
88
+ font-family: inherit;
89
+ font-size: 0.875rem;
90
+ transition:
91
+ transform 280ms,
92
+ opacity 280ms;
93
+ will-change: transform, opacity;
94
+ }
95
+
96
+ /*! toast transfor origin */
97
+ .kitzo-toast.transform-origin-top-left {
98
+ transform-origin: top left;
99
+ }
100
+ .kitzo-toast.transform-origin-top-center {
101
+ transform-origin: top center;
102
+ }
103
+ .kitzo-toast.transform-origin-top-right {
104
+ transform-origin: top right;
105
+ }
106
+ .kitzo-toast.transform-origin-bottom-left {
107
+ transform-origin: bottom left;
108
+ }
109
+ .kitzo-toast.transform-origin-bottom-center {
110
+ transform-origin: bottom center;
111
+ }
112
+ .kitzo-toast.transform-origin-bottom-right {
113
+ transform-origin: bottom right;
114
+ }
115
+
116
+ /*! Toast theme styles */
117
+ .kitzo-toast.type-default {
118
+ background-color: var(--default-bg);
119
+ color: var(--default-text);
120
+ border: 1px solid var(--default-border);
121
+ }
122
+ .kitzo-toast.type-loading {
123
+ background-color: var(--default-bg);
124
+ color: var(--default-text);
125
+ border: 1px solid var(--default-border);
126
+ }
127
+
128
+ .kitzo-toast.type-success {
129
+ background-color: var(--success-bg);
130
+ color: var(--success-text);
131
+ border: 1px solid var(--success-border);
132
+ }
133
+
134
+ .kitzo-toast.type-warning {
135
+ background-color: var(--warning-bg);
136
+ color: var(--warning-text);
137
+ border: 1px solid var(--warning-border);
138
+ }
139
+
140
+ .kitzo-toast.type-error {
141
+ background-color: var(--error-bg);
142
+ color: var(--error-text);
143
+ border: 1px solid var(--error-border);
144
+ }
145
+
146
+ .kitzo-toast.type-info {
147
+ background-color: var(--info-bg);
148
+ color: var(--info-text);
149
+ border: 1px solid var(--info-border);
150
+ }
151
+
152
+ .kitzo-toast.type-default,
153
+ .kitzo-toast.type-loading,
154
+ .kitzo-toast.type-success,
155
+ .kitzo-toast.type-warning,
156
+ .kitzo-toast.type-error,
157
+ .kitzo-toast.type-info {
158
+ border-radius: 0.425rem;
159
+ padding: 0.375rem 0.625rem;
160
+ box-shadow: 0 3px 8px -3px hsl(0, 0%, 0%, 0.15);
161
+ }
162
+
163
+ /*! toast transition styles */
164
+ .kitzo-toast.status-entering.pos-y-top {
165
+ opacity: 0;
166
+ transform: translateY(-120%) scale(0.6);
167
+ }
168
+
169
+ .kitzo-toast.status-visible.pos-y-top {
170
+ opacity: 1;
171
+ transform: translateY(0) scale(1);
172
+ }
173
+
174
+ .kitzo-toast.status-leaving.pos-y-top {
175
+ transform-origin: top;
176
+ opacity: 0;
177
+ transform: translateY(-120%) scale(0.6);
178
+ }
179
+
180
+ .kitzo-toast.status-entering.pos-y-bottom {
181
+ opacity: 0;
182
+ transform: translateY(120%) scale(0.6);
183
+ }
184
+
185
+ .kitzo-toast.status-visible.pos-y-bottom {
186
+ opacity: 1;
187
+ transform: translateY(0) scale(1);
188
+ }
189
+
190
+ .kitzo-toast.status-leaving.pos-y-bottom {
191
+ transform-origin: bottom;
192
+ opacity: 0;
193
+ transform: translateY(120%) scale(0.6);
194
+ }
195
+
196
+ .action-update {
197
+ animation: update 150ms ease;
198
+ }
199
+
200
+ @keyframes update {
201
+ 0% {
202
+ transform: scale(0.95);
203
+ opacity: 0.5;
204
+ }
205
+ 100% {
206
+ opacity: 1;
207
+ transform: scale(1);
208
+ }
209
+ }
210
+
211
+ /*! svg stylings */
212
+ .svg-container {
213
+ display: grid;
214
+ place-items: center;
215
+ height: 20px;
216
+ width: 20px;
217
+ overflow: hidden;
218
+ }
219
+
220
+ .loading-svg-container {
221
+ width: 20px;
222
+ height: 20px;
223
+ display: grid;
224
+ place-items: center;
225
+
226
+ .loader {
227
+ width: 14px;
228
+ height: 14px;
229
+ background-image: conic-gradient(
230
+ var(--loader-stroke) 0 25%,
231
+ var(--loader-bg) 0 100%
232
+ );
233
+ border-radius: 10rem;
234
+ position: relative;
235
+ animation: rotate-infinity 1000ms linear infinite;
236
+ }
237
+ .loader::before {
238
+ content: '';
239
+ position: absolute;
240
+ inset: 2px;
241
+ border-radius: inherit;
242
+ background-color: var(--default-bg);
243
+ }
244
+ }
245
+
246
+ @keyframes rotate-infinity {
247
+ to {
248
+ rotate: 360deg;
249
+ }
250
+ }`;
251
+ function o() {
252
+ if (!document.getElementById("kitzo-toast-styles")) {
253
+ const t = document.createElement("style");
254
+ t.id = "kitzo-toast-styles", t.textContent = r, document.head.appendChild(t);
255
+ }
256
+ }
257
+ export {
258
+ o as default
259
+ };
@@ -0,0 +1,45 @@
1
+ const i = {
2
+ duration: 2800,
3
+ showIcon: !0,
4
+ animateTransformOrigin: void 0,
5
+ position: "top-center"
6
+ };
7
+ let e = 0;
8
+ const s = () => crypto.randomUUID?.() ?? `kitzo_toast_id_${++e}`;
9
+ let d = 1;
10
+ function u({
11
+ type: a,
12
+ action: r,
13
+ content: o,
14
+ options: n
15
+ }) {
16
+ const t = typeof n == "object" && n !== null ? n : {};
17
+ return {
18
+ id: t.id ?? s(),
19
+ duration: t.duration ?? i.duration,
20
+ showIcon: t.showIcon ?? i.showIcon,
21
+ animateTransformOrigin: t.animateTransformOrigin ?? i.animateTransformOrigin,
22
+ position: t.position ?? i.position,
23
+ icon: t.icon,
24
+ type: a,
25
+ status: "entering",
26
+ zIndex: ++d,
27
+ content: o,
28
+ action: r
29
+ };
30
+ }
31
+ function p({ id: a, content: r, options: o }) {
32
+ const n = typeof o == "object" && o !== null ? o : {};
33
+ return {
34
+ ...n,
35
+ id: a,
36
+ content: r,
37
+ action: "update",
38
+ duration: n.duration ?? i.duration
39
+ };
40
+ }
41
+ export {
42
+ u as createToast,
43
+ s as genId,
44
+ p as updateToast
45
+ };
@@ -0,0 +1,14 @@
1
+ import n from "./addToastStyles.js";
2
+ const e = /* @__PURE__ */ new Set();
3
+ function s(t) {
4
+ return n(), e.add(t), () => {
5
+ e.delete(t);
6
+ };
7
+ }
8
+ function i(t) {
9
+ e.forEach((o) => o(t));
10
+ }
11
+ export {
12
+ i as notify,
13
+ s as subscribe
14
+ };
@@ -0,0 +1,12 @@
1
+ import { addTimers as f } from "./timers.js";
2
+ function m({ toast: r, setToasts: e }) {
3
+ let n = !1;
4
+ e((i) => (n = !!i.find((d) => d.id === r.id), n ? i : [r, ...i])), !n && (requestAnimationFrame(() => {
5
+ e(
6
+ (i) => i.map((d) => d.id === r.id ? { ...d, status: "visible" } : d)
7
+ );
8
+ }), f(r, e));
9
+ }
10
+ export {
11
+ m as default
12
+ };
@@ -0,0 +1,17 @@
1
+ import { LEAVE_DELAY as d, clearAllTimers as l, clearTimer as u } from "./timers.js";
2
+ function f({ toast: r, setToasts: m }) {
3
+ if (!r.id) {
4
+ m((e) => e.map((i) => ({ ...i, status: "leaving" }))), setTimeout(() => {
5
+ m([]);
6
+ }, d), l();
7
+ return;
8
+ }
9
+ u(r.id), m(
10
+ (e) => e.map((i) => i.id === r.id ? { ...i, status: "leaving" } : i)
11
+ ), setTimeout(() => {
12
+ m((e) => e.filter((i) => i.id !== r.id));
13
+ }, d);
14
+ }
15
+ export {
16
+ f as default
17
+ };
@@ -0,0 +1,9 @@
1
+ import m from "./dismissToasts.js";
2
+ import a from "./addToasts.js";
3
+ import f from "./updateToasts.js";
4
+ function p({ toast: i, setToasts: d }) {
5
+ i.action === "dismiss" && m({ toast: i, setToasts: d }), i.action === "add" && a({ toast: i, setToasts: d }), i.action === "update" && f({ toast: i, setToasts: d });
6
+ }
7
+ export {
8
+ p as default
9
+ };
@@ -0,0 +1,39 @@
1
+ const t = /* @__PURE__ */ new Map(), o = 600, a = 700;
2
+ function m(e) {
3
+ const i = Number(e);
4
+ if (!isFinite(i)) return null;
5
+ const n = Math.max(a, i);
6
+ return {
7
+ leaving: n,
8
+ left: n + o
9
+ };
10
+ }
11
+ function d(e) {
12
+ const i = t.get(e);
13
+ i && (clearTimeout(i.leaving), clearTimeout(i.left), t.delete(e));
14
+ }
15
+ function f() {
16
+ t.forEach(({ leaving: e, left: i }) => {
17
+ clearTimeout(e), clearTimeout(i);
18
+ }), t.clear();
19
+ }
20
+ function s(e, i) {
21
+ const n = m(e.duration);
22
+ if (!n) return;
23
+ d(e.id);
24
+ const c = setTimeout(() => {
25
+ i(
26
+ (l) => l.map((r) => r.id === e.id ? { ...r, status: "leaving" } : r)
27
+ );
28
+ }, n.leaving), u = setTimeout(() => {
29
+ i((l) => l.filter((r) => r.id !== e.id)), t.delete(e.id);
30
+ }, n.left);
31
+ t.set(e.id, { leaving: c, left: u });
32
+ }
33
+ export {
34
+ o as LEAVE_DELAY,
35
+ a as MIN_VISIBLE,
36
+ s as addTimers,
37
+ f as clearAllTimers,
38
+ d as clearTimer
39
+ };
@@ -0,0 +1,10 @@
1
+ import { addTimers as u } from "./timers.js";
2
+ function t({ toast: e, setToasts: d }) {
3
+ let r = !0;
4
+ d((s) => s.find((i) => i.id === e.id) ? s.map(
5
+ (i) => i.id === e.id ? { ...i, ...e, status: "visible" } : i
6
+ ) : (r = !1, s)), r && u(e, d);
7
+ }
8
+ export {
9
+ t as default
10
+ };
@@ -0,0 +1,99 @@
1
+ import { createToast as n, updateToast as c, genId as s } from "./createToast.js";
2
+ import { notify as a } from "./listenar.js";
3
+ const i = (r, t) => {
4
+ r != null && a(
5
+ n({
6
+ type: "default",
7
+ action: "add",
8
+ content: r,
9
+ options: t
10
+ })
11
+ );
12
+ };
13
+ i.dismiss = (r) => {
14
+ a({ action: "dismiss", id: r });
15
+ };
16
+ i.info = (r, t) => {
17
+ r != null && a(
18
+ n({
19
+ action: "add",
20
+ type: "info",
21
+ content: r,
22
+ options: t
23
+ })
24
+ );
25
+ };
26
+ i.success = (r, t) => {
27
+ r != null && a(
28
+ n({
29
+ action: "add",
30
+ type: "success",
31
+ content: r,
32
+ options: t
33
+ })
34
+ );
35
+ };
36
+ i.warning = (r, t) => {
37
+ r != null && a(
38
+ n({
39
+ action: "add",
40
+ type: "warning",
41
+ content: r,
42
+ options: t
43
+ })
44
+ );
45
+ };
46
+ i.error = (r, t) => {
47
+ r != null && a(
48
+ n({
49
+ action: "add",
50
+ type: "error",
51
+ content: r,
52
+ options: t
53
+ })
54
+ );
55
+ };
56
+ i.loading = (r, t) => {
57
+ r != null && a(
58
+ n({
59
+ action: "add",
60
+ type: "loading",
61
+ content: r,
62
+ options: { duration: 1 / 0, ...t }
63
+ })
64
+ );
65
+ };
66
+ i.custom = (r, t) => {
67
+ r != null && a(
68
+ n({
69
+ action: "add",
70
+ type: "custom",
71
+ content: r,
72
+ options: t
73
+ })
74
+ );
75
+ };
76
+ i.update = (r, t, e) => {
77
+ t != null && a(c({ id: r, content: t, options: e }));
78
+ };
79
+ i.promise = (async (r, t, e) => {
80
+ const u = s();
81
+ a(
82
+ n({
83
+ action: "add",
84
+ type: "loading",
85
+ content: t.loading,
86
+ options: { ...e, id: u, duration: 1 / 0 }
87
+ })
88
+ );
89
+ try {
90
+ const o = await r, d = typeof t.success == "function" ? await t.success(o) : t.success;
91
+ return i.update(u, d, { ...e, type: "success" }), o;
92
+ } catch (o) {
93
+ const d = typeof t.error == "function" ? await t.error(o) : t.error;
94
+ throw i.update(u, d, { ...e, type: "error" }), o;
95
+ }
96
+ });
97
+ export {
98
+ i as default
99
+ };
@@ -0,0 +1,98 @@
1
+ import { jsxs as t, jsx as r } from "react/jsx-runtime";
2
+ function i({ size: n = 16, className: o = "" }) {
3
+ return /* @__PURE__ */ t(
4
+ "svg",
5
+ {
6
+ xmlns: "http://www.w3.org/2000/svg",
7
+ width: n,
8
+ height: n,
9
+ className: o,
10
+ viewBox: "0 0 24 24",
11
+ fill: "none",
12
+ stroke: "currentColor",
13
+ strokeWidth: "2",
14
+ strokeLinecap: "round",
15
+ strokeLinejoin: "round",
16
+ children: [
17
+ /* @__PURE__ */ r("circle", { cx: "12", cy: "12", r: "10" }),
18
+ /* @__PURE__ */ r("path", { d: "m9 12 2 2 4-4" })
19
+ ]
20
+ }
21
+ );
22
+ }
23
+ function c({ size: n = 16, className: o = "" }) {
24
+ return /* @__PURE__ */ t(
25
+ "svg",
26
+ {
27
+ xmlns: "http://www.w3.org/2000/svg",
28
+ width: n,
29
+ height: n,
30
+ className: o,
31
+ viewBox: "0 0 24 24",
32
+ fill: "none",
33
+ stroke: "currentColor",
34
+ strokeWidth: "2",
35
+ strokeLinecap: "round",
36
+ strokeLinejoin: "round",
37
+ children: [
38
+ /* @__PURE__ */ r("path", { d: "m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3" }),
39
+ /* @__PURE__ */ r("path", { d: "M12 9v4" }),
40
+ /* @__PURE__ */ r("path", { d: "M12 17h.01" })
41
+ ]
42
+ }
43
+ );
44
+ }
45
+ function s({ size: n = 16, className: o = "" }) {
46
+ return /* @__PURE__ */ t(
47
+ "svg",
48
+ {
49
+ xmlns: "http://www.w3.org/2000/svg",
50
+ width: n,
51
+ height: n,
52
+ className: o,
53
+ viewBox: "0 0 24 24",
54
+ fill: "none",
55
+ stroke: "currentColor",
56
+ strokeWidth: "2",
57
+ strokeLinecap: "round",
58
+ strokeLinejoin: "round",
59
+ children: [
60
+ /* @__PURE__ */ r("circle", { cx: "12", cy: "12", r: "10" }),
61
+ /* @__PURE__ */ r("path", { d: "m15 9-6 6" }),
62
+ /* @__PURE__ */ r("path", { d: "m9 9 6 6" })
63
+ ]
64
+ }
65
+ );
66
+ }
67
+ function h({ size: n = 16, className: o = "" }) {
68
+ return /* @__PURE__ */ t(
69
+ "svg",
70
+ {
71
+ xmlns: "http://www.w3.org/2000/svg",
72
+ width: n,
73
+ height: n,
74
+ className: o,
75
+ viewBox: "0 0 24 24",
76
+ fill: "none",
77
+ stroke: "currentColor",
78
+ strokeWidth: "2",
79
+ strokeLinecap: "round",
80
+ strokeLinejoin: "round",
81
+ children: [
82
+ /* @__PURE__ */ r("circle", { cx: "12", cy: "12", r: "10" }),
83
+ /* @__PURE__ */ r("line", { x1: "12", x2: "12", y1: "8", y2: "12" }),
84
+ /* @__PURE__ */ r("line", { x1: "12", x2: "12.01", y1: "16", y2: "16" })
85
+ ]
86
+ }
87
+ );
88
+ }
89
+ function d() {
90
+ return /* @__PURE__ */ r("div", { className: "loading-svg-container", children: /* @__PURE__ */ r("div", { className: "loader" }) });
91
+ }
92
+ export {
93
+ s as ErrorSvg,
94
+ h as InfoSvg,
95
+ d as LoadingSvg,
96
+ i as SuccessSvg,
97
+ c as WarningSvg
98
+ };
@@ -0,0 +1,54 @@
1
+ import { jsxs as m, jsx as n, Fragment as e } from "react/jsx-runtime";
2
+ import p from "../helpers/triggerToasts.js";
3
+ import { InfoSvg as u, ErrorSvg as v, WarningSvg as h, SuccessSvg as y, LoadingSvg as x } from "./Svgs.js";
4
+ function I({
5
+ t: l,
6
+ position: s,
7
+ shouldAnimateTransformOrigin: a
8
+ }) {
9
+ const { id: c, type: i, action: d, content: r, status: f, showIcon: g, icon: t } = l, o = {
10
+ loading: /* @__PURE__ */ n(x, {}),
11
+ success: /* @__PURE__ */ n(y, {}),
12
+ warning: /* @__PURE__ */ n(h, {}),
13
+ error: /* @__PURE__ */ n(v, {}),
14
+ info: /* @__PURE__ */ n(u, {}),
15
+ default: null,
16
+ custom: null
17
+ };
18
+ return /* @__PURE__ */ m(
19
+ "div",
20
+ {
21
+ style: {
22
+ pointerEvents: "all",
23
+ display: "flex",
24
+ alignItems: "center",
25
+ gap: 8
26
+ },
27
+ className: `kitzo-toast type-${i} action-${d} status-${f} pos-y-${s.split("-")[0]} pos-x-${s.split("-")[1]} ${a ? `transform-origin-${s}` : ""}`,
28
+ children: [
29
+ g && /* @__PURE__ */ n(e, { children: t ? /* @__PURE__ */ n(e, { children: typeof t == "string" || typeof t == "number" ? /* @__PURE__ */ n(
30
+ "div",
31
+ {
32
+ style: {
33
+ flexShrink: 0
34
+ },
35
+ className: "svg-container",
36
+ children: t
37
+ }
38
+ ) : /* @__PURE__ */ n(e, { children: t }) }) : /* @__PURE__ */ n(e, { children: o[i] && /* @__PURE__ */ n("div", { style: { flexShrink: 0 }, className: "svg-container", children: o[i] }) }) }),
39
+ /* @__PURE__ */ n(
40
+ "div",
41
+ {
42
+ style: {
43
+ flex: 1
44
+ },
45
+ children: typeof r == "function" ? r(() => p.dismiss(c)) : r
46
+ }
47
+ )
48
+ ]
49
+ }
50
+ );
51
+ }
52
+ export {
53
+ I as default
54
+ };