@smudi/designsystem 1.5.2 → 2.0.0
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.
- package/@smudi/components/button/button.d.ts +19 -1
- package/@smudi/components/button/button.d.ts.map +1 -1
- package/@smudi/components/button/button.js +16 -15
- package/@smudi/components/card/card-icon-block.d.ts +18 -0
- package/@smudi/components/card/card-icon-block.d.ts.map +1 -1
- package/@smudi/components/card/card.d.ts +13 -0
- package/@smudi/components/card/card.d.ts.map +1 -1
- package/@smudi/components/dialog/dialog.d.ts +12 -0
- package/@smudi/components/dialog/dialog.d.ts.map +1 -1
- package/@smudi/components/dropdown/dropdown-button.d.ts +15 -6
- package/@smudi/components/dropdown/dropdown-button.d.ts.map +1 -1
- package/@smudi/components/dropdown/dropdown-item.d.ts +11 -1
- package/@smudi/components/dropdown/dropdown-item.d.ts.map +1 -1
- package/@smudi/components/dropdown/dropdown-list.d.ts +11 -1
- package/@smudi/components/dropdown/dropdown-list.d.ts.map +1 -1
- package/@smudi/components/dropdown/dropdown.d.ts +16 -1
- package/@smudi/components/dropdown/dropdown.d.ts.map +1 -1
- package/@smudi/components/file-upload/file-upload.d.ts +6 -0
- package/@smudi/components/file-upload/file-upload.d.ts.map +1 -0
- package/@smudi/components/file-upload/file-upload.js +7 -0
- package/@smudi/components/header/header-content.d.ts +11 -0
- package/@smudi/components/header/header-content.d.ts.map +1 -1
- package/@smudi/components/header/header-divider.d.ts +14 -0
- package/@smudi/components/header/header-divider.d.ts.map +1 -1
- package/@smudi/components/header/header-menu/header-menu-button.d.ts +9 -0
- package/@smudi/components/header/header-menu/header-menu-button.d.ts.map +1 -1
- package/@smudi/components/header/header-menu/header-menu-content.d.ts +13 -0
- package/@smudi/components/header/header-menu/header-menu-content.d.ts.map +1 -1
- package/@smudi/components/header/header-menu/header-menu-group.d.ts +10 -0
- package/@smudi/components/header/header-menu/header-menu-group.d.ts.map +1 -1
- package/@smudi/components/header/header-menu/header-menu-item.d.ts +16 -0
- package/@smudi/components/header/header-menu/header-menu-item.d.ts.map +1 -1
- package/@smudi/components/header/header-menu/header-menu.d.ts +15 -0
- package/@smudi/components/header/header-menu/header-menu.d.ts.map +1 -1
- package/@smudi/components/header/header-search/header-search-button.d.ts +17 -0
- package/@smudi/components/header/header-search/header-search-button.d.ts.map +1 -1
- package/@smudi/components/header/header-search/header-search.d.ts +18 -0
- package/@smudi/components/header/header-search/header-search.d.ts.map +1 -1
- package/@smudi/components/header/header.d.ts +65 -23
- package/@smudi/components/header/header.d.ts.map +1 -1
- package/@smudi/components/layout-components/cluster-layouts/cluster-layout.module.css.js +1 -1
- package/@smudi/components/layout-components/split-view/index.d.ts +8 -0
- package/@smudi/components/layout-components/split-view/index.d.ts.map +1 -0
- package/@smudi/components/layout-components/split-view/index.js +10 -0
- package/@smudi/components/layout-components/split-view/split-view-divider.d.ts +8 -0
- package/@smudi/components/layout-components/split-view/split-view-divider.d.ts.map +1 -0
- package/@smudi/components/layout-components/split-view/split-view-divider.js +44 -0
- package/@smudi/components/layout-components/split-view/split-view-divider.module.css.js +9 -0
- package/@smudi/components/layout-components/split-view/split-view-panel.d.ts +23 -0
- package/@smudi/components/layout-components/split-view/split-view-panel.d.ts.map +1 -0
- package/@smudi/components/layout-components/split-view/split-view-panel.js +8 -0
- package/@smudi/components/layout-components/split-view/split-view.d.ts +14 -0
- package/@smudi/components/layout-components/split-view/split-view.d.ts.map +1 -0
- package/@smudi/components/layout-components/split-view/split-view.js +67 -0
- package/@smudi/components/layout-components/split-view/split-view.module.css.js +8 -0
- package/@smudi/components/layout-components/split-view/use-resize.d.ts +34 -0
- package/@smudi/components/layout-components/split-view/use-resize.d.ts.map +1 -0
- package/@smudi/components/layout-components/split-view/use-resize.js +67 -0
- package/@smudi/components/select/select.d.ts +7 -0
- package/@smudi/components/select/select.d.ts.map +1 -1
- package/@smudi/components/select/select.js +13 -6
- package/@smudi/components/suggestion/smudi-suggestion/smudi-suggestion-list.d.ts +4 -0
- package/@smudi/components/suggestion/smudi-suggestion/smudi-suggestion-list.d.ts.map +1 -1
- package/@smudi/components/suggestion/smudi-suggestion/smudi-suggestion.d.ts +17 -0
- package/@smudi/components/suggestion/smudi-suggestion/smudi-suggestion.d.ts.map +1 -1
- package/@smudi/components/suggestion/smudi-suggestion/smudi-suggestion.js +43 -82
- package/@smudi/components/suggestion/suggestion-no-chips/suggestion-no-chips.d.ts +10 -0
- package/@smudi/components/suggestion/suggestion-no-chips/suggestion-no-chips.d.ts.map +1 -1
- package/@smudi/components/suggestion/suggestion-no-chips/suggestion-no-chips.js +44 -33
- package/@smudi/components/suggestion/suggestion.d.ts +1 -0
- package/@smudi/components/suggestion/suggestion.d.ts.map +1 -1
- package/@smudi/components/table/table.d.ts +25 -3
- package/@smudi/components/table/table.d.ts.map +1 -1
- package/@smudi/components/table/table.js +21 -3
- package/@smudi/components/toast/toast.d.ts +45 -0
- package/@smudi/components/toast/toast.d.ts.map +1 -1
- package/@smudi/components/toast/toast.js +144 -141
- package/@smudi/icons/generated/index.js +11 -0
- package/@smudi/react.js +94 -94
- package/@smudi/smudi/icons/metadata.d.ts +9 -9
- package/@smudi/smudi/react.d.ts +3 -2
- package/@smudi/smudi/react.d.ts.map +1 -1
- package/@smudi/styles.css +1 -1
- package/@smudi/types/modular-scale.type.d.ts +1 -1
- package/README.md +33 -0
- package/package.json +11 -10
- package/@smudi/components/stepper/index.js +0 -17
- package/@smudi/components/stepper/step/step-list.js +0 -40
- package/@smudi/components/stepper/step/step-list.module.css.js +0 -7
- package/@smudi/components/stepper/step/step.js +0 -86
- package/@smudi/components/stepper/step/step.module.css.js +0 -10
- package/@smudi/components/stepper/step-content/step-content-list.js +0 -25
- package/@smudi/components/stepper/step-content/step-content-list.module.css.js +0 -7
- package/@smudi/components/stepper/step-content/step-content.js +0 -28
- package/@smudi/components/stepper/step-content/step-content.module.css.js +0 -7
- package/@smudi/components/stepper/stepper-context.js +0 -23
- package/@smudi/components/stepper/stepper.js +0 -62
- package/@smudi/components/stepper/stepper.module.css.js +0 -7
- package/@smudi/components/stepper/use-stepper-state.js +0 -17
|
@@ -1,54 +1,51 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as
|
|
3
|
-
import { XMarkIcon as
|
|
4
|
-
import {
|
|
5
|
-
import { Alert as
|
|
6
|
-
import { Button as
|
|
7
|
-
const
|
|
2
|
+
import { jsxs as O, jsx as T } from "react/jsx-runtime";
|
|
3
|
+
import { XMarkIcon as B } from "@navikt/aksel-icons";
|
|
4
|
+
import { useId as z, useState as j, useRef as x, useEffect as I } from "react";
|
|
5
|
+
import { Alert as $ } from "../alert/alert.js";
|
|
6
|
+
import { Button as G } from "../button/button.js";
|
|
7
|
+
const V = 5e3, X = 300, H = 280, D = "info", K = "md", b = "Lukk toast", Z = "[smudi] Ingen ToastProvider er montert. Monter ToastProvider i app-roten.";
|
|
8
8
|
let g = null;
|
|
9
9
|
const h = [], p = /* @__PURE__ */ new Map();
|
|
10
|
-
let
|
|
11
|
-
function
|
|
12
|
-
return
|
|
13
|
-
}
|
|
14
|
-
function Q() {
|
|
15
|
-
return O += 1, `smudi-toast-provider-${O}`;
|
|
10
|
+
let M = 0, E = !1, C = null;
|
|
11
|
+
function q() {
|
|
12
|
+
return M += 1, `smudi-toast-${M}`;
|
|
16
13
|
}
|
|
17
14
|
function N(t) {
|
|
18
|
-
return t?.id ??
|
|
15
|
+
return t?.id ?? q();
|
|
19
16
|
}
|
|
20
|
-
function
|
|
17
|
+
function F() {
|
|
21
18
|
return h[h.length - 1] ?? null;
|
|
22
19
|
}
|
|
23
|
-
function
|
|
24
|
-
return t ? h.find((
|
|
20
|
+
function L(t) {
|
|
21
|
+
return t ? h.find((r) => r.id === t)?.api ?? null : null;
|
|
25
22
|
}
|
|
26
|
-
function
|
|
27
|
-
const t =
|
|
28
|
-
return t || (g ??
|
|
23
|
+
function _() {
|
|
24
|
+
const t = L(C);
|
|
25
|
+
return t || (g ?? F()?.api ?? null);
|
|
29
26
|
}
|
|
30
|
-
function
|
|
31
|
-
p.forEach((e,
|
|
32
|
-
e === t && p.delete(
|
|
27
|
+
function J(t) {
|
|
28
|
+
p.forEach((e, r) => {
|
|
29
|
+
e === t && p.delete(r);
|
|
33
30
|
});
|
|
34
31
|
}
|
|
35
|
-
function
|
|
36
|
-
|
|
32
|
+
function Q(t) {
|
|
33
|
+
C = t, g = L(t) ?? g;
|
|
37
34
|
}
|
|
38
|
-
function
|
|
39
|
-
const
|
|
40
|
-
return a ? (p.set(
|
|
41
|
-
id:
|
|
42
|
-
close: () => g?.dismiss(
|
|
35
|
+
function Y(t, e = {}) {
|
|
36
|
+
const r = N(e), a = _();
|
|
37
|
+
return a ? (p.set(r, a), a.show(t, { ...e, id: r })) : (typeof console < "u" && !E && (console.warn(Z), E = !0), {
|
|
38
|
+
id: r,
|
|
39
|
+
close: () => g?.dismiss(r)
|
|
43
40
|
});
|
|
44
41
|
}
|
|
45
|
-
function
|
|
46
|
-
function
|
|
42
|
+
function tt(t, e) {
|
|
43
|
+
function r(o, u = {}) {
|
|
47
44
|
const c = N(u);
|
|
48
45
|
return t(o, { ...u, id: c });
|
|
49
46
|
}
|
|
50
|
-
const a = (o) => (u, c = {}) =>
|
|
51
|
-
return Object.assign(
|
|
47
|
+
const a = (o) => (u, c = {}) => r(u, { ...c, color: o });
|
|
48
|
+
return Object.assign(r, {
|
|
52
49
|
dismiss(o) {
|
|
53
50
|
e(o);
|
|
54
51
|
},
|
|
@@ -58,21 +55,21 @@ function rt(t, e) {
|
|
|
58
55
|
warning: a("warning"),
|
|
59
56
|
neutral: a("neutral"),
|
|
60
57
|
async promise(o, u) {
|
|
61
|
-
const { loading: c, success: v, error: l, ...d } = u, A =
|
|
58
|
+
const { loading: c, success: v, error: l, ...d } = u, A = r(c, {
|
|
62
59
|
...d,
|
|
63
60
|
busy: !0,
|
|
64
|
-
color: d.color ??
|
|
61
|
+
color: d.color ?? D
|
|
65
62
|
});
|
|
66
63
|
try {
|
|
67
64
|
const f = await o();
|
|
68
|
-
return
|
|
65
|
+
return r(v, {
|
|
69
66
|
...d,
|
|
70
67
|
busy: !1,
|
|
71
68
|
color: "success",
|
|
72
69
|
id: A.id
|
|
73
70
|
}), f;
|
|
74
71
|
} catch (f) {
|
|
75
|
-
throw
|
|
72
|
+
throw r(l, {
|
|
76
73
|
...d,
|
|
77
74
|
busy: !1,
|
|
78
75
|
color: "danger",
|
|
@@ -82,160 +79,166 @@ function rt(t, e) {
|
|
|
82
79
|
}
|
|
83
80
|
});
|
|
84
81
|
}
|
|
85
|
-
const
|
|
86
|
-
(t, e) =>
|
|
82
|
+
const vt = tt(
|
|
83
|
+
(t, e) => Y(t, e),
|
|
87
84
|
(t) => {
|
|
88
|
-
const e = p.get(t) ??
|
|
85
|
+
const e = p.get(t) ?? _();
|
|
89
86
|
p.delete(t), e?.dismiss(t);
|
|
90
87
|
}
|
|
91
88
|
);
|
|
92
|
-
function
|
|
89
|
+
function et(t, e, r) {
|
|
93
90
|
return {
|
|
94
|
-
id:
|
|
91
|
+
id: r,
|
|
95
92
|
className: e.className,
|
|
96
93
|
content: t,
|
|
97
|
-
color: e.color ??
|
|
98
|
-
size: e["data-size"] ??
|
|
94
|
+
color: e.color ?? D,
|
|
95
|
+
size: e["data-size"] ?? K,
|
|
99
96
|
width: e.width,
|
|
100
97
|
minWidth: e.minWidth,
|
|
101
98
|
maxWidth: e.maxWidth,
|
|
102
|
-
duration: e.duration ??
|
|
99
|
+
duration: e.duration ?? V,
|
|
103
100
|
busy: e.busy ?? !1,
|
|
104
101
|
closing: !1,
|
|
105
102
|
shifting: !1
|
|
106
103
|
};
|
|
107
104
|
}
|
|
108
|
-
function
|
|
109
|
-
const
|
|
110
|
-
|
|
105
|
+
function R(t, e) {
|
|
106
|
+
const r = e.get(t);
|
|
107
|
+
r && (clearTimeout(r), e.delete(t));
|
|
111
108
|
}
|
|
112
|
-
function
|
|
109
|
+
function nt(t, e) {
|
|
113
110
|
return t.map(
|
|
114
|
-
(
|
|
111
|
+
(r) => r.id === e ? { ...r, closing: !0 } : r
|
|
115
112
|
);
|
|
116
113
|
}
|
|
117
|
-
function
|
|
118
|
-
return t.filter((
|
|
114
|
+
function rt(t, e) {
|
|
115
|
+
return t.filter((r) => r.id !== e);
|
|
119
116
|
}
|
|
120
|
-
function
|
|
117
|
+
function it(t, e) {
|
|
121
118
|
return [
|
|
122
119
|
e,
|
|
123
|
-
...t.map((
|
|
120
|
+
...t.map((r) => r.closing ? r : { ...r, shifting: !0 })
|
|
124
121
|
];
|
|
125
122
|
}
|
|
126
|
-
function
|
|
127
|
-
return t.map((
|
|
123
|
+
function ot(t, e) {
|
|
124
|
+
return t.map((r) => r.id === e.id ? e : r);
|
|
128
125
|
}
|
|
129
|
-
function
|
|
126
|
+
function st(t) {
|
|
130
127
|
return t.map(
|
|
131
128
|
(e) => e.shifting ? { ...e, shifting: !1 } : e
|
|
132
129
|
);
|
|
133
130
|
}
|
|
134
|
-
function
|
|
135
|
-
h.push({ id: t, api: e }), g = e,
|
|
131
|
+
function at(t, e) {
|
|
132
|
+
h.push({ id: t, api: e }), g = e, C = t, E = !1;
|
|
136
133
|
}
|
|
137
|
-
function
|
|
138
|
-
const
|
|
134
|
+
function ut(t, e) {
|
|
135
|
+
const r = h.findIndex(
|
|
139
136
|
(o) => o.id === t
|
|
140
137
|
);
|
|
141
|
-
|
|
142
|
-
const a =
|
|
143
|
-
g = a?.api ?? null,
|
|
138
|
+
r !== -1 && h.splice(r, 1), J(e);
|
|
139
|
+
const a = F();
|
|
140
|
+
g = a?.api ?? null, C === t && (C = a?.id ?? null);
|
|
144
141
|
}
|
|
145
|
-
function
|
|
142
|
+
function ct(t) {
|
|
146
143
|
t.forEach((e) => clearTimeout(e)), t.clear();
|
|
147
144
|
}
|
|
148
|
-
function
|
|
145
|
+
function lt(t) {
|
|
149
146
|
t.forEach((e) => {
|
|
150
147
|
e.timeout && clearTimeout(e.timeout);
|
|
151
148
|
}), t.clear();
|
|
152
149
|
}
|
|
153
|
-
function
|
|
154
|
-
return /* @__PURE__ */
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
"
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
150
|
+
function dt(t, e) {
|
|
151
|
+
return /* @__PURE__ */ O(
|
|
152
|
+
"div",
|
|
153
|
+
{
|
|
154
|
+
className: t.busy ? void 0 : "smudi-toast-content-with-close",
|
|
155
|
+
children: [
|
|
156
|
+
/* @__PURE__ */ T("div", { children: t.content }),
|
|
157
|
+
!t.busy && /* @__PURE__ */ T(
|
|
158
|
+
G,
|
|
159
|
+
{
|
|
160
|
+
"aria-label": b,
|
|
161
|
+
className: "smudi-toast-close-button",
|
|
162
|
+
"data-size": "sm",
|
|
163
|
+
icon: !0,
|
|
164
|
+
onClick: () => e(t.id),
|
|
165
|
+
title: b,
|
|
166
|
+
variant: "tertiary",
|
|
167
|
+
children: /* @__PURE__ */ T(B, { "aria-hidden": !0 })
|
|
168
|
+
}
|
|
169
|
+
)
|
|
170
|
+
]
|
|
171
|
+
}
|
|
172
|
+
);
|
|
170
173
|
}
|
|
171
|
-
function
|
|
172
|
-
const e =
|
|
173
|
-
const i = o.current.get(
|
|
174
|
-
i && (i.timeout && clearTimeout(i.timeout), o.current.delete(
|
|
175
|
-
}, d = (
|
|
176
|
-
l(
|
|
174
|
+
function At({ children: t }) {
|
|
175
|
+
const e = `smudi-toast-provider-${z().replace(/:/g, "-")}`, [r, a] = j([]), o = x(/* @__PURE__ */ new Map()), u = x(/* @__PURE__ */ new Map()), c = x(null), v = x(null), l = (n) => {
|
|
176
|
+
const i = o.current.get(n);
|
|
177
|
+
i && (i.timeout && clearTimeout(i.timeout), o.current.delete(n));
|
|
178
|
+
}, d = (n, i) => {
|
|
179
|
+
l(n);
|
|
177
180
|
const s = {
|
|
178
181
|
remaining: i,
|
|
179
182
|
startedAt: Date.now(),
|
|
180
183
|
timeout: null
|
|
181
184
|
};
|
|
182
185
|
s.timeout = setTimeout(() => {
|
|
183
|
-
m(
|
|
184
|
-
}, i), o.current.set(
|
|
185
|
-
}, A = (
|
|
186
|
-
const i = o.current.get(
|
|
186
|
+
m(n);
|
|
187
|
+
}, i), o.current.set(n, s);
|
|
188
|
+
}, A = (n) => {
|
|
189
|
+
const i = o.current.get(n);
|
|
187
190
|
!i || !i.timeout || (clearTimeout(i.timeout), i.remaining = Math.max(
|
|
188
191
|
0,
|
|
189
192
|
i.remaining - (Date.now() - i.startedAt)
|
|
190
|
-
), i.timeout = null, o.current.set(
|
|
191
|
-
}, f = (
|
|
192
|
-
const i = o.current.get(
|
|
193
|
+
), i.timeout = null, o.current.set(n, i));
|
|
194
|
+
}, f = (n) => {
|
|
195
|
+
const i = o.current.get(n);
|
|
193
196
|
if (!(!i || i.timeout)) {
|
|
194
197
|
if (i.remaining <= 0) {
|
|
195
|
-
m(
|
|
198
|
+
m(n);
|
|
196
199
|
return;
|
|
197
200
|
}
|
|
198
201
|
i.startedAt = Date.now(), i.timeout = setTimeout(() => {
|
|
199
|
-
m(
|
|
200
|
-
}, i.remaining), o.current.set(
|
|
202
|
+
m(n);
|
|
203
|
+
}, i.remaining), o.current.set(n, i);
|
|
201
204
|
}
|
|
202
|
-
},
|
|
205
|
+
}, W = (n, i) => {
|
|
203
206
|
const s = i.relatedTarget;
|
|
204
|
-
s && i.currentTarget.contains(s) || f(
|
|
205
|
-
}, m = (
|
|
206
|
-
l(
|
|
207
|
+
s && i.currentTarget.contains(s) || f(n);
|
|
208
|
+
}, m = (n) => {
|
|
209
|
+
l(n), R(n, u.current), p.delete(n), a((s) => nt(s, n));
|
|
207
210
|
const i = setTimeout(() => {
|
|
208
|
-
a((s) =>
|
|
209
|
-
},
|
|
210
|
-
u.current.set(
|
|
211
|
-
},
|
|
211
|
+
a((s) => rt(s, n)), u.current.delete(n);
|
|
212
|
+
}, X);
|
|
213
|
+
u.current.set(n, i);
|
|
214
|
+
}, U = () => {
|
|
212
215
|
c.current && clearTimeout(c.current), c.current = setTimeout(() => {
|
|
213
|
-
a((
|
|
214
|
-
},
|
|
216
|
+
a((n) => st(n));
|
|
217
|
+
}, H);
|
|
215
218
|
};
|
|
216
219
|
v.current || (v.current = {
|
|
217
|
-
show(
|
|
218
|
-
const s = N(i),
|
|
219
|
-
return
|
|
220
|
-
(
|
|
221
|
-
) === -1 ? (
|
|
220
|
+
show(n, i = {}) {
|
|
221
|
+
const s = N(i), w = et(n, i, s);
|
|
222
|
+
return R(s, u.current), a((S) => S.findIndex(
|
|
223
|
+
(k) => k.id === s
|
|
224
|
+
) === -1 ? (U(), it(S, w)) : ot(S, w)), w.busy ? l(s) : w.duration !== !1 ? d(s, w.duration) : l(s), {
|
|
222
225
|
id: s,
|
|
223
226
|
close: () => m(s)
|
|
224
227
|
};
|
|
225
228
|
},
|
|
226
229
|
dismiss: m
|
|
227
230
|
});
|
|
228
|
-
const
|
|
229
|
-
|
|
231
|
+
const y = v.current, P = () => {
|
|
232
|
+
Q(e);
|
|
230
233
|
};
|
|
231
|
-
return
|
|
232
|
-
|
|
233
|
-
}), [
|
|
234
|
+
return I(() => (at(e, y), () => {
|
|
235
|
+
ut(e, y), c.current && clearTimeout(c.current), lt(o.current), ct(u.current);
|
|
236
|
+
}), [e, y]), /* @__PURE__ */ O(
|
|
234
237
|
"div",
|
|
235
238
|
{
|
|
236
|
-
"data-smudi-toast-provider-id":
|
|
237
|
-
onFocusCapture:
|
|
238
|
-
onMouseDownCapture:
|
|
239
|
+
"data-smudi-toast-provider-id": e,
|
|
240
|
+
onFocusCapture: P,
|
|
241
|
+
onMouseDownCapture: P,
|
|
239
242
|
style: { display: "contents" },
|
|
240
243
|
children: [
|
|
241
244
|
t,
|
|
@@ -246,33 +249,33 @@ function xt({ children: t }) {
|
|
|
246
249
|
"aria-live": "polite",
|
|
247
250
|
className: "smudi-toast-viewport",
|
|
248
251
|
role: "status",
|
|
249
|
-
children:
|
|
252
|
+
children: r.map((n) => /* @__PURE__ */ T(
|
|
250
253
|
"div",
|
|
251
254
|
{
|
|
252
255
|
className: "smudi-toast-item",
|
|
253
|
-
"data-shifting":
|
|
254
|
-
onBlurCapture: (i) =>
|
|
255
|
-
onFocusCapture: () => A(
|
|
256
|
-
onMouseEnter: () => A(
|
|
257
|
-
onMouseLeave: () => f(
|
|
256
|
+
"data-shifting": n.shifting ? "true" : void 0,
|
|
257
|
+
onBlurCapture: (i) => W(n.id, i),
|
|
258
|
+
onFocusCapture: () => A(n.id),
|
|
259
|
+
onMouseEnter: () => A(n.id),
|
|
260
|
+
onMouseLeave: () => f(n.id),
|
|
258
261
|
children: /* @__PURE__ */ T(
|
|
259
|
-
|
|
262
|
+
$,
|
|
260
263
|
{
|
|
261
|
-
"aria-busy":
|
|
262
|
-
className: `smudi-toast ${
|
|
263
|
-
"data-closing":
|
|
264
|
-
"data-color":
|
|
265
|
-
"data-size":
|
|
264
|
+
"aria-busy": n.busy || void 0,
|
|
265
|
+
className: `smudi-toast ${n.className ?? ""}`.trim(),
|
|
266
|
+
"data-closing": n.closing ? "true" : void 0,
|
|
267
|
+
"data-color": n.color,
|
|
268
|
+
"data-size": n.size,
|
|
266
269
|
style: {
|
|
267
|
-
"--smudi-toast-width":
|
|
268
|
-
"--smudi-toast-min-width":
|
|
269
|
-
"--smudi-toast-max-width":
|
|
270
|
+
"--smudi-toast-width": n.width,
|
|
271
|
+
"--smudi-toast-min-width": n.minWidth,
|
|
272
|
+
"--smudi-toast-max-width": n.maxWidth
|
|
270
273
|
},
|
|
271
|
-
children:
|
|
274
|
+
children: dt(n, m)
|
|
272
275
|
}
|
|
273
276
|
)
|
|
274
277
|
},
|
|
275
|
-
|
|
278
|
+
n.id
|
|
276
279
|
))
|
|
277
280
|
}
|
|
278
281
|
)
|
|
@@ -281,6 +284,6 @@ function xt({ children: t }) {
|
|
|
281
284
|
);
|
|
282
285
|
}
|
|
283
286
|
export {
|
|
284
|
-
|
|
285
|
-
|
|
287
|
+
At as ToastProvider,
|
|
288
|
+
vt as toast
|
|
286
289
|
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { default as r } from "./SmudiBiometryIcon.js";
|
|
3
|
+
import { default as a } from "./SmudiFingerprintIcon.js";
|
|
4
|
+
import { default as u } from "./SmudiFlagIcon.js";
|
|
5
|
+
import { default as f } from "./SmudiScanIcon.js";
|
|
6
|
+
export {
|
|
7
|
+
r as SmudiBiometryIcon,
|
|
8
|
+
a as SmudiFingerprintIcon,
|
|
9
|
+
u as SmudiFlagIcon,
|
|
10
|
+
f as SmudiScanIcon
|
|
11
|
+
};
|