@studiolxd/brand 44.0.0 → 45.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/CHANGELOG.md +52 -0
- package/dist/_types/messages/BrandMessages.d.ts +13 -1
- package/dist/_types/messages/index.d.ts +1 -1
- package/dist/_types/molecules/Alert/Alert.d.ts +13 -2
- package/dist/_types/molecules/AvatarUpload/AvatarUpload.d.ts +3 -3
- package/dist/_types/molecules/Banner/Banner.d.ts +12 -2
- package/dist/_types/molecules/ConfirmDialog/ConfirmDialog.d.ts +36 -9
- package/dist/_types/molecules/Consent/Consent.d.ts +7 -1
- package/dist/_types/molecules/ImageCropDialog/ImageCropDialog.d.ts +3 -3
- package/dist/_types/molecules/Modal/Modal.d.ts +21 -4
- package/dist/_types/molecules/Sheet/Sheet.d.ts +15 -0
- package/dist/_types/molecules/Toast/Toaster.d.ts +18 -4
- package/dist/alert.js +50 -49
- package/dist/banner.js +24 -23
- package/dist/brand.css +2 -2
- package/dist/confirm-dialog.js +56 -55
- package/dist/consent.js +3 -3
- package/dist/modal.js +32 -31
- package/dist/sheet.js +31 -29
- package/dist/toaster.js +44 -43
- package/dist/tokens.css +2 -2
- package/package.json +1 -1
- package/src/tokens/components/star-rating.css +1 -1
package/dist/confirm-dialog.js
CHANGED
|
@@ -1,87 +1,88 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import './confirm-dialog.css';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
3
|
+
import { n as e } from "./_shared/brandmessagescontext.js";
|
|
4
|
+
import { Button as t } from "./button.js";
|
|
5
|
+
import { Modal as n } from "./modal.js";
|
|
6
|
+
import { InputField as r } from "./input-field.js";
|
|
7
|
+
import { useEffect as i, useId as a, useRef as o, useState as s } from "react";
|
|
8
|
+
import { Fragment as c, jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
8
9
|
//#region src/stories/molecules/ConfirmDialog/ConfirmDialog.tsx
|
|
9
|
-
function
|
|
10
|
-
let
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}, [
|
|
14
|
-
let
|
|
15
|
-
|
|
16
|
-
},
|
|
17
|
-
if (
|
|
18
|
-
let e =
|
|
10
|
+
function d({ open: d, title: f, description: p, children: m, onConfirm: h, onCancel: g, onConfirmError: _, secondaryActionLabel: v, onSecondaryAction: y, destructive: b = !1, confirmLabel: x, cancelLabel: S, pendingLabel: C, closeLabel: w, confirmPhrase: T, confirmPhraseLabel: E, confirmPhraseMismatch: D, container: O, className: k }) {
|
|
11
|
+
let A = e("confirmDialog"), j = o(null), M = o(null), N = a(), [P, F] = s(!1), [I, L] = s(""), [R, z] = s(!1), B = T === void 0 || I.trim() === T, V = R && !B;
|
|
12
|
+
i(() => {
|
|
13
|
+
d || (F(!1), L(""), z(!1));
|
|
14
|
+
}, [d]);
|
|
15
|
+
let H = () => {
|
|
16
|
+
P || g();
|
|
17
|
+
}, U = async () => {
|
|
18
|
+
if (P || !B) return;
|
|
19
|
+
let e = h();
|
|
19
20
|
if (e instanceof Promise) {
|
|
20
|
-
|
|
21
|
+
F(!0);
|
|
21
22
|
try {
|
|
22
23
|
await e;
|
|
23
24
|
} catch (e) {
|
|
24
|
-
|
|
25
|
+
_?.(e);
|
|
25
26
|
} finally {
|
|
26
|
-
|
|
27
|
+
F(!1);
|
|
27
28
|
}
|
|
28
29
|
}
|
|
29
30
|
};
|
|
30
|
-
return /* @__PURE__ */
|
|
31
|
-
open:
|
|
32
|
-
onClose:
|
|
33
|
-
title:
|
|
34
|
-
closeLabel:
|
|
35
|
-
container:
|
|
36
|
-
initialFocus:
|
|
37
|
-
...
|
|
38
|
-
footerClassName: ["confirm-dialog__actions",
|
|
39
|
-
footer: /* @__PURE__ */
|
|
40
|
-
/* @__PURE__ */
|
|
41
|
-
ref:
|
|
31
|
+
return /* @__PURE__ */ u(n, {
|
|
32
|
+
open: d,
|
|
33
|
+
onClose: H,
|
|
34
|
+
title: f,
|
|
35
|
+
...w === void 0 ? {} : { closeLabel: w },
|
|
36
|
+
container: O,
|
|
37
|
+
initialFocus: T === void 0 ? j : M,
|
|
38
|
+
...p == null ? {} : { description: p },
|
|
39
|
+
footerClassName: ["confirm-dialog__actions", k].filter(Boolean).join(" "),
|
|
40
|
+
footer: /* @__PURE__ */ u(c, { children: [
|
|
41
|
+
/* @__PURE__ */ l(t, {
|
|
42
|
+
ref: j,
|
|
42
43
|
variant: "outline",
|
|
43
|
-
onClick:
|
|
44
|
-
disabled:
|
|
45
|
-
children:
|
|
44
|
+
onClick: H,
|
|
45
|
+
disabled: P,
|
|
46
|
+
children: A("cancel", S)
|
|
46
47
|
}),
|
|
47
|
-
|
|
48
|
+
v && y && /* @__PURE__ */ l(t, {
|
|
48
49
|
variant: "outline",
|
|
49
|
-
onClick:
|
|
50
|
-
disabled:
|
|
51
|
-
children:
|
|
50
|
+
onClick: y,
|
|
51
|
+
disabled: P,
|
|
52
|
+
children: v
|
|
52
53
|
}),
|
|
53
|
-
/* @__PURE__ */
|
|
54
|
-
variant:
|
|
55
|
-
destructive:
|
|
56
|
-
onClick:
|
|
57
|
-
disabled:
|
|
58
|
-
children:
|
|
54
|
+
/* @__PURE__ */ l(t, {
|
|
55
|
+
variant: b ? "outline" : "primary",
|
|
56
|
+
destructive: b,
|
|
57
|
+
onClick: U,
|
|
58
|
+
disabled: P || !B,
|
|
59
|
+
children: P ? A("pending", C) : x
|
|
59
60
|
})
|
|
60
61
|
] }),
|
|
61
|
-
children: [
|
|
62
|
-
ref:
|
|
63
|
-
id: `${
|
|
62
|
+
children: [m, T !== void 0 && /* @__PURE__ */ l(r, {
|
|
63
|
+
ref: M,
|
|
64
|
+
id: `${N}-confirm-phrase`,
|
|
64
65
|
className: "confirm-dialog__phrase",
|
|
65
|
-
label:
|
|
66
|
-
value:
|
|
67
|
-
disabled:
|
|
66
|
+
label: E ?? "",
|
|
67
|
+
value: I,
|
|
68
|
+
disabled: P,
|
|
68
69
|
autoComplete: "off",
|
|
69
70
|
autoCorrect: "off",
|
|
70
71
|
autoCapitalize: "none",
|
|
71
72
|
spellCheck: !1,
|
|
72
|
-
error:
|
|
73
|
-
...
|
|
73
|
+
error: V,
|
|
74
|
+
...V ? { errorMessage: D } : {},
|
|
74
75
|
onChange: (e) => {
|
|
75
|
-
|
|
76
|
+
L(e.target.value), z(!1);
|
|
76
77
|
},
|
|
77
78
|
onBlur: () => {
|
|
78
|
-
|
|
79
|
+
I !== "" && z(!0);
|
|
79
80
|
},
|
|
80
81
|
onKeyDown: (e) => {
|
|
81
|
-
e.key === "Enter" && (e.preventDefault(),
|
|
82
|
+
e.key === "Enter" && (e.preventDefault(), B ? U() : I !== "" && z(!0));
|
|
82
83
|
}
|
|
83
84
|
})]
|
|
84
85
|
});
|
|
85
86
|
}
|
|
86
87
|
//#endregion
|
|
87
|
-
export {
|
|
88
|
+
export { d as ConfirmDialog };
|
package/dist/consent.js
CHANGED
|
@@ -60,7 +60,7 @@ function m(e, t) {
|
|
|
60
60
|
for (let e of t) e.required && (n[e.id] = !0);
|
|
61
61
|
return n;
|
|
62
62
|
}
|
|
63
|
-
function h({ open: t, onOpenChange: n, categories: r, value: i, onChange: p, onSave: h, surface: g = "modal", side: _ = "right", title: v = "Preferencias de cookies", closeLabel: y
|
|
63
|
+
function h({ open: t, onOpenChange: n, categories: r, value: i, onChange: p, onSave: h, surface: g = "modal", side: _ = "right", title: v = "Preferencias de cookies", closeLabel: y, alwaysOnLabel: b = "Siempre activa", container: x, className: S }) {
|
|
64
64
|
let C = p !== void 0, [w, T] = l(() => m(i, r));
|
|
65
65
|
c(() => {
|
|
66
66
|
t && !C && T(m(i, r));
|
|
@@ -92,7 +92,7 @@ function h({ open: t, onOpenChange: n, categories: r, value: i, onChange: p, onS
|
|
|
92
92
|
open: t,
|
|
93
93
|
onClose: () => n(!1),
|
|
94
94
|
title: typeof v == "string" ? v : void 0,
|
|
95
|
-
closeLabel: y,
|
|
95
|
+
...y === void 0 ? {} : { closeLabel: y },
|
|
96
96
|
container: x,
|
|
97
97
|
children: k
|
|
98
98
|
}) : /* @__PURE__ */ d(o, {
|
|
@@ -100,7 +100,7 @@ function h({ open: t, onOpenChange: n, categories: r, value: i, onChange: p, onS
|
|
|
100
100
|
onOpenChange: n,
|
|
101
101
|
side: _,
|
|
102
102
|
title: v,
|
|
103
|
-
closeLabel: y,
|
|
103
|
+
...y === void 0 ? {} : { closeLabel: y },
|
|
104
104
|
container: x,
|
|
105
105
|
children: k
|
|
106
106
|
});
|
package/dist/modal.js
CHANGED
|
@@ -1,56 +1,57 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import './modal.css';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
3
|
+
import { n as e } from "./_shared/brandmessagescontext.js";
|
|
4
|
+
import { VisuallyHidden as t } from "./visually-hidden.js";
|
|
5
|
+
import { CloseButton as n } from "./close-button.js";
|
|
6
|
+
import { n as r, r as i, t as a } from "./_shared/dialogsurface.js";
|
|
7
|
+
import { Fragment as o, jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
8
|
+
import { Dialog as l } from "@base-ui/react/dialog";
|
|
8
9
|
//#region src/stories/molecules/Modal/Modal.tsx
|
|
9
|
-
function
|
|
10
|
-
let
|
|
11
|
-
return /* @__PURE__ */
|
|
12
|
-
open:
|
|
10
|
+
function u({ open: u, onClose: d, title: f, children: p, closeLabel: m, fallbackTitle: h, container: g, description: _, "aria-describedby": v, initialFocus: y, footer: b, footerClassName: x, ...S }) {
|
|
11
|
+
let C = e("modal"), w = v === void 0 ? {} : { "aria-describedby": v }, T = y === void 0 ? {} : { initialFocus: y };
|
|
12
|
+
return /* @__PURE__ */ s(l.Root, {
|
|
13
|
+
open: u,
|
|
13
14
|
onOpenChange: (e) => {
|
|
14
|
-
e ||
|
|
15
|
+
e || d();
|
|
15
16
|
},
|
|
16
|
-
children: /* @__PURE__ */
|
|
17
|
-
container:
|
|
18
|
-
children: [/* @__PURE__ */
|
|
17
|
+
children: /* @__PURE__ */ c(l.Portal, {
|
|
18
|
+
container: g,
|
|
19
|
+
children: [/* @__PURE__ */ s(i, { className: "modal__overlay" }), /* @__PURE__ */ c(l.Popup, {
|
|
19
20
|
className: "modal__content",
|
|
21
|
+
...w,
|
|
22
|
+
...T,
|
|
20
23
|
...S,
|
|
21
|
-
...C,
|
|
22
|
-
...x,
|
|
23
24
|
children: [
|
|
24
|
-
|
|
25
|
+
f ? /* @__PURE__ */ c(r, {
|
|
25
26
|
layout: "inline",
|
|
26
27
|
className: "modal__header",
|
|
27
|
-
children: [/* @__PURE__ */
|
|
28
|
+
children: [/* @__PURE__ */ s(l.Title, {
|
|
28
29
|
className: "modal__title",
|
|
29
|
-
children:
|
|
30
|
-
}), /* @__PURE__ */
|
|
30
|
+
children: f
|
|
31
|
+
}), /* @__PURE__ */ s(l.Close, {
|
|
31
32
|
className: "modal__close",
|
|
32
|
-
render: /* @__PURE__ */
|
|
33
|
+
render: /* @__PURE__ */ s(n, { label: C("close", m) })
|
|
33
34
|
})]
|
|
34
|
-
}) : /* @__PURE__ */
|
|
35
|
+
}) : /* @__PURE__ */ c(o, { children: [/* @__PURE__ */ s(l.Title, { render: /* @__PURE__ */ s(t, { children: C("fallbackTitle", h) }) }), /* @__PURE__ */ s(r, {
|
|
35
36
|
layout: "inline",
|
|
36
37
|
noTitle: !0,
|
|
37
38
|
className: "modal__header modal__header--no-title",
|
|
38
|
-
children: /* @__PURE__ */
|
|
39
|
+
children: /* @__PURE__ */ s(l.Close, {
|
|
39
40
|
className: "modal__close",
|
|
40
|
-
render: /* @__PURE__ */
|
|
41
|
+
render: /* @__PURE__ */ s(n, { label: C("close", m) })
|
|
41
42
|
})
|
|
42
43
|
})] }),
|
|
43
|
-
|
|
44
|
+
_ != null && /* @__PURE__ */ s(l.Description, {
|
|
44
45
|
className: "modal__description",
|
|
45
|
-
children:
|
|
46
|
+
children: _
|
|
46
47
|
}),
|
|
47
|
-
/* @__PURE__ */
|
|
48
|
+
/* @__PURE__ */ s("div", {
|
|
48
49
|
className: "modal__body",
|
|
49
|
-
children:
|
|
50
|
+
children: p
|
|
50
51
|
}),
|
|
51
|
-
|
|
52
|
-
className: ["modal__footer",
|
|
53
|
-
children:
|
|
52
|
+
b != null && /* @__PURE__ */ s(a, {
|
|
53
|
+
className: ["modal__footer", x].filter(Boolean).join(" "),
|
|
54
|
+
children: b
|
|
54
55
|
})
|
|
55
56
|
]
|
|
56
57
|
})]
|
|
@@ -58,4 +59,4 @@ function l({ open: l, onClose: u, title: d, children: f, closeLabel: p = "Cerrar
|
|
|
58
59
|
});
|
|
59
60
|
}
|
|
60
61
|
//#endregion
|
|
61
|
-
export {
|
|
62
|
+
export { u as Modal };
|
package/dist/sheet.js
CHANGED
|
@@ -1,53 +1,55 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import './sheet.css';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
3
|
+
import { n as e } from "./_shared/brandmessagescontext.js";
|
|
4
|
+
import { VisuallyHidden as t } from "./visually-hidden.js";
|
|
5
|
+
import { CloseButton as n } from "./close-button.js";
|
|
6
|
+
import { n as r, r as i, t as a } from "./_shared/dialogsurface.js";
|
|
7
|
+
import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
8
|
+
import { Dialog as c } from "@base-ui/react/dialog";
|
|
8
9
|
//#region src/stories/molecules/Sheet/Sheet.tsx
|
|
9
|
-
function
|
|
10
|
-
return /* @__PURE__ */ a
|
|
10
|
+
function l({ className: e, ...t }) {
|
|
11
|
+
return /* @__PURE__ */ o(a, {
|
|
11
12
|
className: ["sheet__footer", e].filter(Boolean).join(" "),
|
|
12
13
|
...t
|
|
13
14
|
});
|
|
14
15
|
}
|
|
15
|
-
function
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
"
|
|
24
|
-
|
|
25
|
-
|
|
16
|
+
function u({ open: a, onOpenChange: u, side: d = "right", title: f, titleHidden: p = !1, description: m, footer: h, children: g, closeLabel: _, hideClose: v = !1, trigger: y, container: b, onAnimationEndCapture: x, className: S, ...C }) {
|
|
17
|
+
let w = e("sheet");
|
|
18
|
+
return /* @__PURE__ */ s(c.Root, {
|
|
19
|
+
open: a,
|
|
20
|
+
onOpenChange: (e) => u(e),
|
|
21
|
+
children: [y && /* @__PURE__ */ o(c.Trigger, { render: y }), /* @__PURE__ */ s(c.Portal, {
|
|
22
|
+
container: b,
|
|
23
|
+
children: [/* @__PURE__ */ o(i, { className: "sheet__overlay" }), /* @__PURE__ */ s(c.Popup, {
|
|
24
|
+
className: ["sheet", S].filter(Boolean).join(" "),
|
|
25
|
+
"data-side": d,
|
|
26
|
+
onAnimationEndCapture: x,
|
|
27
|
+
...C,
|
|
26
28
|
children: [
|
|
27
|
-
/* @__PURE__ */
|
|
29
|
+
/* @__PURE__ */ s(r, {
|
|
28
30
|
layout: "stacked",
|
|
29
31
|
className: "sheet__header",
|
|
30
|
-
children: [
|
|
32
|
+
children: [p ? /* @__PURE__ */ o(c.Title, { render: /* @__PURE__ */ o(t, { children: f }) }) : /* @__PURE__ */ o(c.Title, {
|
|
31
33
|
className: "sheet__title",
|
|
32
|
-
children:
|
|
33
|
-
}),
|
|
34
|
+
children: f
|
|
35
|
+
}), m != null && /* @__PURE__ */ o(c.Description, {
|
|
34
36
|
className: "sheet__description",
|
|
35
|
-
children:
|
|
37
|
+
children: m
|
|
36
38
|
})]
|
|
37
39
|
}),
|
|
38
|
-
!
|
|
40
|
+
!v && /* @__PURE__ */ o(c.Close, {
|
|
39
41
|
className: "sheet__close",
|
|
40
|
-
render: /* @__PURE__ */
|
|
42
|
+
render: /* @__PURE__ */ o(n, { label: w("close", _) })
|
|
41
43
|
}),
|
|
42
|
-
/* @__PURE__ */
|
|
44
|
+
/* @__PURE__ */ o("div", {
|
|
43
45
|
className: "sheet__body",
|
|
44
|
-
children:
|
|
46
|
+
children: g
|
|
45
47
|
}),
|
|
46
|
-
|
|
48
|
+
h && /* @__PURE__ */ o(l, { children: h })
|
|
47
49
|
]
|
|
48
50
|
})]
|
|
49
51
|
})]
|
|
50
52
|
});
|
|
51
53
|
}
|
|
52
54
|
//#endregion
|
|
53
|
-
export {
|
|
55
|
+
export { u as Sheet, l as SheetFooter };
|
package/dist/toaster.js
CHANGED
|
@@ -1,80 +1,81 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import './toaster.css';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
3
|
+
import { n as e } from "./_shared/brandmessagescontext.js";
|
|
4
|
+
import { Button as t } from "./button.js";
|
|
5
|
+
import { CloseButton as n } from "./close-button.js";
|
|
6
|
+
import { t as r } from "./_shared/css-properties.js";
|
|
7
|
+
import { TOAST_DURATION as i, setToastDefaultDuration as a, syncLiveToasts as o, toastManager as s } from "./toast.js";
|
|
8
|
+
import { useEffect as c } from "react";
|
|
9
|
+
import { jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
10
|
+
import { Toast as d } from "@base-ui/react/toast";
|
|
10
11
|
//#region src/stories/molecules/Toast/Toaster.tsx
|
|
11
|
-
var
|
|
12
|
+
var f = 8, p = {
|
|
12
13
|
success: "alert--success",
|
|
13
14
|
error: "alert--error",
|
|
14
15
|
warning: "alert--warning"
|
|
15
16
|
};
|
|
16
|
-
function
|
|
17
|
+
function m(e, t) {
|
|
17
18
|
return [
|
|
18
19
|
"alert",
|
|
19
|
-
|
|
20
|
+
p[e ?? ""] ?? "",
|
|
20
21
|
e === "warning" ? "" : "surface-dark",
|
|
21
22
|
t ? "alert--dismissible" : "",
|
|
22
23
|
"toast"
|
|
23
24
|
].filter(Boolean).join(" ");
|
|
24
25
|
}
|
|
25
|
-
function
|
|
26
|
-
let { toasts:
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
}, [
|
|
30
|
-
let
|
|
26
|
+
function h({ position: i, containerAriaLabel: a, closeLabel: s, closeButton: f, gap: p, expand: h }) {
|
|
27
|
+
let g = e("toaster"), { toasts: _ } = d.useToastManager(), [v, y] = i.split("-"), b = _.map((e) => e.id).join(",");
|
|
28
|
+
c(() => {
|
|
29
|
+
o(b ? b.split(",") : []);
|
|
30
|
+
}, [b]);
|
|
31
|
+
let x = r({ "--toast-gap": `${p}px` }), S = [
|
|
31
32
|
"toaster",
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
33
|
+
v === "top" ? "toaster--top" : "",
|
|
34
|
+
y === "right" ? "" : `toaster--${y}`,
|
|
35
|
+
h ? "toaster--expanded" : ""
|
|
35
36
|
].filter(Boolean).join(" ");
|
|
36
|
-
return /* @__PURE__ */
|
|
37
|
-
ref:
|
|
38
|
-
className:
|
|
39
|
-
"aria-label":
|
|
40
|
-
children:
|
|
41
|
-
toast:
|
|
42
|
-
className:
|
|
43
|
-
children: [/* @__PURE__ */
|
|
37
|
+
return /* @__PURE__ */ l(d.Portal, { children: /* @__PURE__ */ l(d.Viewport, {
|
|
38
|
+
ref: x,
|
|
39
|
+
className: S,
|
|
40
|
+
"aria-label": g("container", a),
|
|
41
|
+
children: _.map((e) => /* @__PURE__ */ u(d.Root, {
|
|
42
|
+
toast: e,
|
|
43
|
+
className: m(e.type, f),
|
|
44
|
+
children: [/* @__PURE__ */ u("div", {
|
|
44
45
|
className: "alert__content",
|
|
45
46
|
children: [
|
|
46
|
-
/* @__PURE__ */
|
|
47
|
-
/* @__PURE__ */
|
|
48
|
-
/* @__PURE__ */
|
|
47
|
+
/* @__PURE__ */ l(d.Title, { className: "alert__title" }),
|
|
48
|
+
/* @__PURE__ */ l(d.Description, { className: "alert__description" }),
|
|
49
|
+
/* @__PURE__ */ l(d.Action, {
|
|
49
50
|
className: "toast__action",
|
|
50
|
-
render: /* @__PURE__ */
|
|
51
|
+
render: /* @__PURE__ */ l(t, {
|
|
51
52
|
variant: "ghost",
|
|
52
53
|
size: "sm"
|
|
53
54
|
})
|
|
54
55
|
})
|
|
55
56
|
]
|
|
56
|
-
}),
|
|
57
|
+
}), f && /* @__PURE__ */ l(d.Close, {
|
|
57
58
|
className: "alert__close",
|
|
58
|
-
render: /* @__PURE__ */
|
|
59
|
+
render: /* @__PURE__ */ l(n, { label: g("close", s) })
|
|
59
60
|
})]
|
|
60
|
-
},
|
|
61
|
+
}, e.id))
|
|
61
62
|
}) });
|
|
62
63
|
}
|
|
63
|
-
function
|
|
64
|
-
let g = Number.isFinite(
|
|
65
|
-
return
|
|
66
|
-
toastManager:
|
|
64
|
+
function g({ position: e = "bottom-right", containerAriaLabel: t, closeLabel: n, closeButton: r = !0, duration: o = i, gap: u = f, visibleToasts: p = 3, expand: m = !1 }) {
|
|
65
|
+
let g = Number.isFinite(o) ? o : 0;
|
|
66
|
+
return c(() => a(g), [g]), /* @__PURE__ */ l(d.Provider, {
|
|
67
|
+
toastManager: s,
|
|
67
68
|
timeout: g,
|
|
68
69
|
limit: p,
|
|
69
|
-
children: /* @__PURE__ */
|
|
70
|
+
children: /* @__PURE__ */ l(h, {
|
|
70
71
|
position: e,
|
|
71
72
|
containerAriaLabel: t,
|
|
72
73
|
closeLabel: n,
|
|
73
|
-
closeButton:
|
|
74
|
-
gap:
|
|
75
|
-
expand:
|
|
74
|
+
closeButton: r,
|
|
75
|
+
gap: u,
|
|
76
|
+
expand: m
|
|
76
77
|
})
|
|
77
78
|
});
|
|
78
79
|
}
|
|
79
80
|
//#endregion
|
|
80
|
-
export {
|
|
81
|
+
export { g as Toaster };
|