@konstructio/ui 0.1.0-alpha.9 → 0.1.1-alpha.1
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/dist/DatePicker.css +1 -1
- package/dist/{Modal-CrG0m703.js → Modal-0oht63vU.js} +32 -32
- package/dist/assets/icons/components/Search.js +26 -0
- package/dist/assets/icons/components/Warning.js +22 -0
- package/dist/assets/icons/components/index.js +6 -0
- package/dist/{chevron-down-UW8ts6wI.js → chevron-down-CVce9Mvh.js} +2 -2
- package/dist/components/Alert/Alert.js +23 -25
- package/dist/components/Alert/Alert.variants.js +1 -1
- package/dist/components/AlertDialog/AlertDialog.js +1 -1
- package/dist/components/AlertDialog/components/AlertDialogTrigger.js +1 -1
- package/dist/components/AlertDialog/components/index.js +1 -1
- package/dist/components/AlertDialog/hooks/useAlertDialog.js +7 -7
- package/dist/components/Autocomplete/Autocomplete.variants.js +3 -4
- package/dist/components/Autocomplete/components/List/List.variants.js +3 -7
- package/dist/components/Autocomplete/hooks/useAutocomplete.js +38 -43
- package/dist/components/Autocomplete/hooks/useNavigationList.js +29 -37
- package/dist/components/Badge/Badge.js +40 -42
- package/dist/components/Badge/Badge.variants.js +1 -1
- package/dist/components/Breadcrumb/Breadcrumb.variants.js +1 -1
- package/dist/components/Breadcrumb/components/Item/Item.js +22 -21
- package/dist/components/Breadcrumb/components/Item/Item.variants.js +1 -1
- package/dist/components/Breadcrumb/hooks/useBreadcrumb.js +1 -1
- package/dist/components/Button/Button.js +15 -15
- package/dist/components/Button/Button.variants.js +10 -77
- package/dist/components/Card/Card.variants.js +3 -5
- package/dist/components/Checkbox/Checkbox.js +48 -47
- package/dist/components/Checkbox/Checkbox.variants.js +3 -4
- package/dist/components/Command/Command.js +2 -2
- package/dist/components/Command/Command.variants.js +1 -1
- package/dist/components/Command/components/Command.js +1 -1
- package/dist/components/Command/components/CommandEmpty.js +1 -1
- package/dist/components/Command/components/CommandGroup.js +1 -1
- package/dist/components/Command/components/CommandInput.js +1 -1
- package/dist/components/Command/components/CommandItem.js +13 -13
- package/dist/components/Command/components/CommandList.js +1 -1
- package/dist/components/Command/components/CommandSeparator.js +1 -1
- package/dist/components/Command/components/DialogContent.js +1 -1
- package/dist/components/Command/components/DialogOverlay.js +1 -1
- package/dist/components/Datepicker/DatePicker.js +1496 -1577
- package/dist/components/Datepicker/DatePicker.variants.js +1 -1
- package/dist/components/Divider/Divider.variants.js +1 -1
- package/dist/components/Dropdown/Dropdown.js +28 -6
- package/dist/components/Dropdown/Dropdown.variants.js +43 -26
- package/dist/components/Dropdown/components/List/List.variants.js +1 -1
- package/dist/components/Dropdown/components/ListItem/ListItem.variants.js +5 -5
- package/dist/components/Dropdown/components/Wrapper.js +96 -86
- package/dist/components/Dropdown/contexts/dropdown.provider.js +12 -12
- package/dist/components/Dropdown/hooks/useDropdown.js +26 -30
- package/dist/components/Dropdown/hooks/useNavigationList.js +25 -31
- package/dist/components/DropdownButton/DropdownButton.js +135 -0
- package/dist/components/Filter/Filter.variants.js +1 -1
- package/dist/components/Filter/components/BadgeDropdown/BadgeMultiSelect.hook.js +47 -49
- package/dist/components/Filter/components/BadgeDropdown/BadgeMultiSelect.js +1 -1
- package/dist/components/Filter/components/DateFilterDropdown/DateFilterDropdown.hook.js +41 -42
- package/dist/components/Filter/components/DateFilterDropdown/DateFilterDropdown.js +30 -30
- package/dist/components/Filter/components/ResetButton/ResetButton.js +22 -16
- package/dist/components/Input/Input.js +116 -109
- package/dist/components/Input/Input.variants.js +18 -5
- package/dist/components/Loading/Loading.js +2 -2
- package/dist/components/Loading/Loading.variants.js +1 -2
- package/dist/components/Modal/Modal.js +2 -2
- package/dist/components/Modal/components/Body/Body.js +1 -1
- package/dist/components/Modal/components/Footer/Footer.js +1 -1
- package/dist/components/Modal/components/Header/Header.js +1 -1
- package/dist/components/Modal/components/Wrapper/Wrapper.js +2 -2
- package/dist/components/Modal/components/Wrapper/Wrapper.variants.js +7 -9
- package/dist/components/Modal/components/index.js +1 -1
- package/dist/components/Modal/hooks/useModal.js +16 -17
- package/dist/components/NumberInput/NumberInput.js +91 -91
- package/dist/components/NumberInput/NumberInput.variants.js +1 -1
- package/dist/components/PieChart/PieChart.js +5138 -0
- package/dist/components/ProgressBar/ProgressBar.js +58 -26
- package/dist/components/ProgressBar/ProgressBar.variants.js +1 -1
- package/dist/components/Radio/Radio.js +64 -48
- package/dist/components/Radio/Radio.variants.js +3 -3
- package/dist/components/RadioCard/RadioCard.js +26 -23
- package/dist/components/RadioCard/RadioCard.variants.js +1 -1
- package/dist/components/RadioCardGroup/RadioCardGroup.js +28 -28
- package/dist/components/RadioCardGroup/RadioCardGroup.variants.js +1 -1
- package/dist/components/RadioGroup/RadioGroup.js +37 -37
- package/dist/components/RadioGroup/RadioGroup.variants.js +1 -1
- package/dist/components/Range/Range.js +1 -1
- package/dist/components/Range/Range.variants.js +2 -3
- package/dist/components/Sidebar/Sidebar.js +4 -3
- package/dist/components/Sidebar/Sidebar.variants.js +1 -1
- package/dist/components/Sidebar/components/Footer/Footer.js +5 -4
- package/dist/components/Sidebar/components/Footer/Footer.variants.js +1 -1
- package/dist/components/Sidebar/components/Logo/Logo.js +6 -5
- package/dist/components/Sidebar/components/Logo/Logo.variants.js +1 -1
- package/dist/components/Sidebar/components/Navigation/Navigation.js +5 -4
- package/dist/components/Sidebar/components/Navigation/Navigation.variants.js +1 -1
- package/dist/components/Sidebar/components/NavigationGroup/NavigationGroup.js +14 -13
- package/dist/components/Sidebar/components/NavigationGroup/NavigationGroup.variants.js +1 -1
- package/dist/components/Sidebar/components/NavigationOption/NavigationOption.js +13 -12
- package/dist/components/Sidebar/components/NavigationOption/NavigationOption.variants.js +1 -1
- package/dist/components/Sidebar/components/NavigationSeparator/NavigationSeparator.js +5 -6
- package/dist/components/Sidebar/components/NavigationSeparator/NavigationSeparator.variants.js +1 -1
- package/dist/components/Sidebar/components/NavigationTitle/NavigationTitle.js +9 -8
- package/dist/components/Sidebar/components/NavigationTitle/NavigationTitle.variants.js +1 -1
- package/dist/components/Sidebar/components/Wrapper/Wrapper.js +15 -14
- package/dist/components/Slider/Slider.js +1 -1
- package/dist/components/Slider/Slider.variants.js +2 -8
- package/dist/components/Switch/Switch.js +54 -54
- package/dist/components/Switch/Switch.variants.js +2 -3
- package/dist/components/Table/Table.variants.js +1 -1
- package/dist/components/Tabs/Tabs.js +20 -16
- package/dist/components/Tabs/Tabs.variants.js +3 -5
- package/dist/components/Tabs/components/Content.js +10 -13
- package/dist/components/Tabs/components/List.js +9 -8
- package/dist/components/Tabs/components/Trigger.js +12 -16
- package/dist/components/Tabs/components/index.js +8 -0
- package/dist/components/Tag/Tag.js +1 -1
- package/dist/components/Tag/Tag.variants.js +1 -1
- package/dist/components/TagSelect/TagSelect.variants.js +1 -1
- package/dist/components/TagSelect/components/Item/Item.variants.js +1 -1
- package/dist/components/TagSelect/components/List/List.variants.js +1 -1
- package/dist/components/TagSelect/hooks/useTagSelect.js +14 -16
- package/dist/components/TextArea/TextArea.variants.js +4 -5
- package/dist/components/TimePicker/TimePicker.variants.js +6 -7
- package/dist/components/TimePicker/components/HoursList/HoursList.js +21 -26
- package/dist/components/TimePicker/components/MeridianList/MeridianList.js +19 -20
- package/dist/components/TimePicker/components/MinutesList/MinutesList.js +24 -25
- package/dist/components/TimePicker/components/Wrapper/Wrapper.js +33 -34
- package/dist/components/TimePicker/components/WrapperList/WrapperList.variants.js +1 -1
- package/dist/components/Toast/Toast.js +223 -232
- package/dist/components/Toast/Toast.variants.js +8 -11
- package/dist/components/Tooltip/Tooltip.js +1 -1
- package/dist/components/Tooltip/Tooltip.variants.js +7 -14
- package/dist/components/Tooltip/hooks/useTooltip.js +8 -9
- package/dist/components/Typography/Typography.js +26 -31
- package/dist/components/Typography/Typography.variants.js +1 -1
- package/dist/components/index.js +78 -66
- package/dist/contexts/theme.provider.js +28 -29
- package/dist/{createLucideIcon-ByJ0JZvK.js → createLucideIcon-BpsAkT97.js} +4 -4
- package/dist/index-0ioNhtNM.js +10 -0
- package/dist/{index-CvfCCTEO.js → index-BAraV3ai.js} +7 -7
- package/dist/index-BXuxPoz7.js +435 -0
- package/dist/index-BfXxHr_2.js +125 -0
- package/dist/index-C1g_chDT.js +70 -0
- package/dist/{index-BCGvACM9.js → index-C9T9HQaa.js} +1 -1
- package/dist/{index-Bc1LNrRD.js → index-CZnD2QxM.js} +1 -1
- package/dist/index-CrBonFvu.js +144 -0
- package/dist/{index-rUBNhTeF.js → index-Cvx4lqTq.js} +2 -2
- package/dist/{index-BNmRGtA6.js → index-D29mdTf5.js} +3 -3
- package/dist/{index-Dkt8F6CZ.js → index-D3xzCzcO.js} +12 -12
- package/dist/index-DB2XhXHn.js +431 -0
- package/dist/{index-B5MIi2tR.js → index-DQH6odE9.js} +2 -3
- package/dist/index-Oq5GlCHP.js +131 -0
- package/dist/{index-Cs8Lv8Wj.js → index-bwWKd82e.js} +1 -1
- package/dist/{index--EmNlyHx.js → index-iXyXtdgP.js} +1 -1
- package/dist/index.d.ts +157 -9
- package/dist/index.js +88 -76
- package/dist/package.json +41 -37
- package/dist/styles.css +1 -1
- package/dist/ui/civo-theme.css +261 -241
- package/dist/ui/kubefirst-theme.css +4 -4
- package/dist/ui/theme.css +0 -2
- package/dist/{useBreadcrumb-DMERrNkJ.js → useBreadcrumb-B8DnuqkR.js} +254 -261
- package/dist/utils/index.js +25 -26
- package/package.json +41 -37
- package/dist/index-BNU3RH-3.js +0 -133
- package/dist/index-BvCZBMfr.js +0 -432
- package/dist/index-Cq1I1cG9.js +0 -129
- package/dist/index-DLYwlPRZ.js +0 -440
- package/dist/index-DNRcvRTB.js +0 -145
- package/dist/index-Dm-ooN_M.js +0 -71
- package/dist/index-DwYXX2sM.js +0 -13
|
@@ -1,144 +1,142 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { u as ae, S as
|
|
3
|
-
import * as
|
|
4
|
-
import { useRef as
|
|
5
|
-
import { P as
|
|
6
|
-
import { c as Ne, a as Ae, b, u as
|
|
7
|
-
import { c as
|
|
8
|
-
import { B as
|
|
9
|
-
import { P as Oe } from "../../index-
|
|
10
|
-
import { u as $ } from "../../index-
|
|
11
|
-
import { V as ie, R as ke } from "../../index
|
|
12
|
-
import { cn as
|
|
1
|
+
import { jsx as i, jsxs as A, Fragment as se } from "react/jsx-runtime";
|
|
2
|
+
import { u as ae, S as B } from "../../index-DQH6odE9.js";
|
|
3
|
+
import * as n from "react";
|
|
4
|
+
import { useRef as xe, useEffect as be, useMemo as oe, isValidElement as re, useCallback as ge } from "react";
|
|
5
|
+
import { P as D, r as Se, d as Ie } from "../../index-C9T9HQaa.js";
|
|
6
|
+
import { c as Ne, a as Ae, b as x, u as De } from "../../index-BfXxHr_2.js";
|
|
7
|
+
import { c as Fe } from "../../index-Cvx4lqTq.js";
|
|
8
|
+
import { B as _e, R as Le, P as Me } from "../../index-CrBonFvu.js";
|
|
9
|
+
import { P as Oe } from "../../index-C1g_chDT.js";
|
|
10
|
+
import { u as $ } from "../../index-0ioNhtNM.js";
|
|
11
|
+
import { V as ie, R as ke } from "../../index-iXyXtdgP.js";
|
|
12
|
+
import { cn as j } from "../../utils/index.js";
|
|
13
13
|
import { closeToastVariants as Ve, toastVariants as Ke, viewportToastVariants as He } from "./Toast.variants.js";
|
|
14
14
|
import { X as We } from "../../x-BPcqkRZd.js";
|
|
15
|
-
var
|
|
15
|
+
var Q = "ToastProvider", [Z, Xe, $e] = Fe("Toast"), [ce, xt] = Ne("Toast", [$e]), [Ue, U] = ce(Q), ue = (e) => {
|
|
16
16
|
const {
|
|
17
17
|
__scopeToast: r,
|
|
18
18
|
label: o = "Notification",
|
|
19
19
|
duration: t = 5e3,
|
|
20
|
-
swipeDirection:
|
|
20
|
+
swipeDirection: c = "right",
|
|
21
21
|
swipeThreshold: d = 50,
|
|
22
|
-
children:
|
|
23
|
-
} = e, [
|
|
22
|
+
children: p
|
|
23
|
+
} = e, [T, v] = n.useState(null), [a, E] = n.useState(0), w = n.useRef(!1), S = n.useRef(!1);
|
|
24
24
|
return o.trim() || console.error(
|
|
25
|
-
`Invalid prop \`label\` supplied to \`${
|
|
26
|
-
), /* @__PURE__ */
|
|
25
|
+
`Invalid prop \`label\` supplied to \`${Q}\`. Expected non-empty \`string\`.`
|
|
26
|
+
), /* @__PURE__ */ i(Z.Provider, { scope: r, children: /* @__PURE__ */ i(
|
|
27
27
|
Ue,
|
|
28
28
|
{
|
|
29
29
|
scope: r,
|
|
30
30
|
label: o,
|
|
31
31
|
duration: t,
|
|
32
|
-
swipeDirection:
|
|
32
|
+
swipeDirection: c,
|
|
33
33
|
swipeThreshold: d,
|
|
34
|
-
toastCount:
|
|
35
|
-
viewport:
|
|
34
|
+
toastCount: a,
|
|
35
|
+
viewport: T,
|
|
36
36
|
onViewportChange: v,
|
|
37
|
-
onToastAdd:
|
|
38
|
-
onToastRemove:
|
|
37
|
+
onToastAdd: n.useCallback(() => E((b) => b + 1), []),
|
|
38
|
+
onToastRemove: n.useCallback(() => E((b) => b - 1), []),
|
|
39
39
|
isFocusedToastEscapeKeyDownRef: w,
|
|
40
40
|
isClosePausedRef: S,
|
|
41
|
-
children:
|
|
41
|
+
children: p
|
|
42
42
|
}
|
|
43
43
|
) });
|
|
44
44
|
};
|
|
45
|
-
ue.displayName =
|
|
46
|
-
var le = "ToastViewport", Ye = ["F8"],
|
|
45
|
+
ue.displayName = Q;
|
|
46
|
+
var le = "ToastViewport", Ye = ["F8"], z = "toast.viewportPause", G = "toast.viewportResume", de = n.forwardRef(
|
|
47
47
|
(e, r) => {
|
|
48
48
|
const {
|
|
49
49
|
__scopeToast: o,
|
|
50
50
|
hotkey: t = Ye,
|
|
51
|
-
label:
|
|
51
|
+
label: c = "Notifications ({hotkey})",
|
|
52
52
|
...d
|
|
53
|
-
} = e,
|
|
54
|
-
|
|
55
|
-
const
|
|
56
|
-
|
|
57
|
-
t.length !== 0 && t.every((E) => C[E] || C.code === E) && ((T = w.current) == null || T.focus());
|
|
53
|
+
} = e, p = U(le, o), T = Xe(o), v = n.useRef(null), a = n.useRef(null), E = n.useRef(null), w = n.useRef(null), S = ae(r, w, p.onViewportChange), b = t.join("+").replace(/Key/g, "").replace(/Digit/g, ""), R = p.toastCount > 0;
|
|
54
|
+
n.useEffect(() => {
|
|
55
|
+
const u = (h) => {
|
|
56
|
+
t.length !== 0 && t.every((m) => h[m] || h.code === m) && w.current?.focus();
|
|
58
57
|
};
|
|
59
|
-
return document.addEventListener("keydown",
|
|
60
|
-
}, [t]),
|
|
61
|
-
const
|
|
62
|
-
if (R &&
|
|
63
|
-
const
|
|
64
|
-
if (!
|
|
65
|
-
const
|
|
66
|
-
|
|
58
|
+
return document.addEventListener("keydown", u), () => document.removeEventListener("keydown", u);
|
|
59
|
+
}, [t]), n.useEffect(() => {
|
|
60
|
+
const u = v.current, h = w.current;
|
|
61
|
+
if (R && u && h) {
|
|
62
|
+
const f = () => {
|
|
63
|
+
if (!p.isClosePausedRef.current) {
|
|
64
|
+
const y = new CustomEvent(z);
|
|
65
|
+
h.dispatchEvent(y), p.isClosePausedRef.current = !0;
|
|
67
66
|
}
|
|
68
|
-
},
|
|
69
|
-
if (
|
|
70
|
-
const
|
|
71
|
-
|
|
67
|
+
}, m = () => {
|
|
68
|
+
if (p.isClosePausedRef.current) {
|
|
69
|
+
const y = new CustomEvent(G);
|
|
70
|
+
h.dispatchEvent(y), p.isClosePausedRef.current = !1;
|
|
72
71
|
}
|
|
73
|
-
},
|
|
74
|
-
!
|
|
75
|
-
},
|
|
76
|
-
|
|
72
|
+
}, P = (y) => {
|
|
73
|
+
!u.contains(y.relatedTarget) && m();
|
|
74
|
+
}, C = () => {
|
|
75
|
+
u.contains(document.activeElement) || m();
|
|
77
76
|
};
|
|
78
|
-
return
|
|
79
|
-
|
|
77
|
+
return u.addEventListener("focusin", f), u.addEventListener("focusout", P), u.addEventListener("pointermove", f), u.addEventListener("pointerleave", C), window.addEventListener("blur", f), window.addEventListener("focus", m), () => {
|
|
78
|
+
u.removeEventListener("focusin", f), u.removeEventListener("focusout", P), u.removeEventListener("pointermove", f), u.removeEventListener("pointerleave", C), window.removeEventListener("blur", f), window.removeEventListener("focus", m);
|
|
80
79
|
};
|
|
81
80
|
}
|
|
82
|
-
}, [R,
|
|
83
|
-
const l =
|
|
84
|
-
({ tabbingDirection:
|
|
85
|
-
const
|
|
86
|
-
const
|
|
87
|
-
return
|
|
81
|
+
}, [R, p.isClosePausedRef]);
|
|
82
|
+
const l = n.useCallback(
|
|
83
|
+
({ tabbingDirection: u }) => {
|
|
84
|
+
const f = T().map((m) => {
|
|
85
|
+
const P = m.ref.current, C = [P, ...nt(P)];
|
|
86
|
+
return u === "forwards" ? C : C.reverse();
|
|
88
87
|
});
|
|
89
|
-
return (
|
|
88
|
+
return (u === "forwards" ? f.reverse() : f).flat();
|
|
90
89
|
},
|
|
91
|
-
[
|
|
90
|
+
[T]
|
|
92
91
|
);
|
|
93
|
-
return
|
|
94
|
-
const
|
|
95
|
-
if (
|
|
96
|
-
const
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
(y = n.current) == null || y.focus();
|
|
92
|
+
return n.useEffect(() => {
|
|
93
|
+
const u = w.current;
|
|
94
|
+
if (u) {
|
|
95
|
+
const h = (f) => {
|
|
96
|
+
const m = f.altKey || f.ctrlKey || f.metaKey;
|
|
97
|
+
if (f.key === "Tab" && !m) {
|
|
98
|
+
const C = document.activeElement, y = f.shiftKey;
|
|
99
|
+
if (f.target === u && y) {
|
|
100
|
+
a.current?.focus();
|
|
103
101
|
return;
|
|
104
102
|
}
|
|
105
|
-
const
|
|
106
|
-
|
|
103
|
+
const _ = l({ tabbingDirection: y ? "backwards" : "forwards" }), V = _.findIndex((N) => N === C);
|
|
104
|
+
q(_.slice(V + 1)) ? f.preventDefault() : y ? a.current?.focus() : E.current?.focus();
|
|
107
105
|
}
|
|
108
106
|
};
|
|
109
|
-
return
|
|
107
|
+
return u.addEventListener("keydown", h), () => u.removeEventListener("keydown", h);
|
|
110
108
|
}
|
|
111
|
-
}, [
|
|
112
|
-
|
|
109
|
+
}, [T, l]), /* @__PURE__ */ A(
|
|
110
|
+
_e,
|
|
113
111
|
{
|
|
114
112
|
ref: v,
|
|
115
113
|
role: "region",
|
|
116
|
-
"aria-label":
|
|
114
|
+
"aria-label": c.replace("{hotkey}", b),
|
|
117
115
|
tabIndex: -1,
|
|
118
116
|
style: { pointerEvents: R ? void 0 : "none" },
|
|
119
117
|
children: [
|
|
120
|
-
R && /* @__PURE__ */
|
|
121
|
-
|
|
118
|
+
R && /* @__PURE__ */ i(
|
|
119
|
+
J,
|
|
122
120
|
{
|
|
123
|
-
ref:
|
|
121
|
+
ref: a,
|
|
124
122
|
onFocusFromOutsideViewport: () => {
|
|
125
|
-
const
|
|
123
|
+
const u = l({
|
|
126
124
|
tabbingDirection: "forwards"
|
|
127
125
|
});
|
|
128
|
-
|
|
126
|
+
q(u);
|
|
129
127
|
}
|
|
130
128
|
}
|
|
131
129
|
),
|
|
132
|
-
/* @__PURE__ */
|
|
133
|
-
R && /* @__PURE__ */
|
|
134
|
-
|
|
130
|
+
/* @__PURE__ */ i(Z.Slot, { scope: o, children: /* @__PURE__ */ i(D.ol, { tabIndex: -1, ...d, ref: S }) }),
|
|
131
|
+
R && /* @__PURE__ */ i(
|
|
132
|
+
J,
|
|
135
133
|
{
|
|
136
|
-
ref:
|
|
134
|
+
ref: E,
|
|
137
135
|
onFocusFromOutsideViewport: () => {
|
|
138
|
-
const
|
|
136
|
+
const u = l({
|
|
139
137
|
tabbingDirection: "backwards"
|
|
140
138
|
});
|
|
141
|
-
|
|
139
|
+
q(u);
|
|
142
140
|
}
|
|
143
141
|
}
|
|
144
142
|
)
|
|
@@ -148,168 +146,161 @@ var le = "ToastViewport", Ye = ["F8"], G = "toast.viewportPause", J = "toast.vie
|
|
|
148
146
|
}
|
|
149
147
|
);
|
|
150
148
|
de.displayName = le;
|
|
151
|
-
var
|
|
149
|
+
var pe = "ToastFocusProxy", J = n.forwardRef(
|
|
152
150
|
(e, r) => {
|
|
153
|
-
const { __scopeToast: o, onFocusFromOutsideViewport: t, ...
|
|
154
|
-
return /* @__PURE__ */
|
|
151
|
+
const { __scopeToast: o, onFocusFromOutsideViewport: t, ...c } = e, d = U(pe, o);
|
|
152
|
+
return /* @__PURE__ */ i(
|
|
155
153
|
ie,
|
|
156
154
|
{
|
|
157
|
-
"aria-hidden": !0,
|
|
158
155
|
tabIndex: 0,
|
|
159
|
-
...
|
|
156
|
+
...c,
|
|
160
157
|
ref: r,
|
|
161
158
|
style: { position: "fixed" },
|
|
162
|
-
onFocus: (
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
!((n = d.viewport) != null && n.contains(m)) && t();
|
|
159
|
+
onFocus: (p) => {
|
|
160
|
+
const T = p.relatedTarget;
|
|
161
|
+
!d.viewport?.contains(T) && t();
|
|
166
162
|
}
|
|
167
163
|
}
|
|
168
164
|
);
|
|
169
165
|
}
|
|
170
166
|
);
|
|
171
|
-
|
|
172
|
-
var
|
|
167
|
+
J.displayName = pe;
|
|
168
|
+
var O = "Toast", Be = "toast.swipeStart", je = "toast.swipeMove", qe = "toast.swipeCancel", ze = "toast.swipeEnd", fe = n.forwardRef(
|
|
173
169
|
(e, r) => {
|
|
174
|
-
const { forceMount: o, open: t, defaultOpen:
|
|
170
|
+
const { forceMount: o, open: t, defaultOpen: c, onOpenChange: d, ...p } = e, [T, v] = Ae({
|
|
175
171
|
prop: t,
|
|
176
|
-
defaultProp:
|
|
172
|
+
defaultProp: c ?? !0,
|
|
177
173
|
onChange: d,
|
|
178
|
-
caller:
|
|
174
|
+
caller: O
|
|
179
175
|
});
|
|
180
|
-
return /* @__PURE__ */
|
|
176
|
+
return /* @__PURE__ */ i(Oe, { present: o || T, children: /* @__PURE__ */ i(
|
|
181
177
|
Qe,
|
|
182
178
|
{
|
|
183
|
-
open:
|
|
184
|
-
...
|
|
179
|
+
open: T,
|
|
180
|
+
...p,
|
|
185
181
|
ref: r,
|
|
186
182
|
onClose: () => v(!1),
|
|
187
183
|
onPause: $(e.onPause),
|
|
188
184
|
onResume: $(e.onResume),
|
|
189
|
-
onSwipeStart:
|
|
190
|
-
|
|
185
|
+
onSwipeStart: x(e.onSwipeStart, (a) => {
|
|
186
|
+
a.currentTarget.setAttribute("data-swipe", "start");
|
|
191
187
|
}),
|
|
192
|
-
onSwipeMove:
|
|
193
|
-
const { x:
|
|
194
|
-
|
|
188
|
+
onSwipeMove: x(e.onSwipeMove, (a) => {
|
|
189
|
+
const { x: E, y: w } = a.detail.delta;
|
|
190
|
+
a.currentTarget.setAttribute("data-swipe", "move"), a.currentTarget.style.setProperty("--radix-toast-swipe-move-x", `${E}px`), a.currentTarget.style.setProperty("--radix-toast-swipe-move-y", `${w}px`);
|
|
195
191
|
}),
|
|
196
|
-
onSwipeCancel:
|
|
197
|
-
|
|
192
|
+
onSwipeCancel: x(e.onSwipeCancel, (a) => {
|
|
193
|
+
a.currentTarget.setAttribute("data-swipe", "cancel"), a.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"), a.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"), a.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"), a.currentTarget.style.removeProperty("--radix-toast-swipe-end-y");
|
|
198
194
|
}),
|
|
199
|
-
onSwipeEnd:
|
|
200
|
-
const { x:
|
|
201
|
-
|
|
195
|
+
onSwipeEnd: x(e.onSwipeEnd, (a) => {
|
|
196
|
+
const { x: E, y: w } = a.detail.delta;
|
|
197
|
+
a.currentTarget.setAttribute("data-swipe", "end"), a.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"), a.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"), a.currentTarget.style.setProperty("--radix-toast-swipe-end-x", `${E}px`), a.currentTarget.style.setProperty("--radix-toast-swipe-end-y", `${w}px`), v(!1);
|
|
202
198
|
})
|
|
203
199
|
}
|
|
204
200
|
) });
|
|
205
201
|
}
|
|
206
202
|
);
|
|
207
|
-
|
|
208
|
-
var [Ge, Je] = ce(
|
|
203
|
+
fe.displayName = O;
|
|
204
|
+
var [Ge, Je] = ce(O, {
|
|
209
205
|
onClose() {
|
|
210
206
|
}
|
|
211
|
-
}), Qe =
|
|
207
|
+
}), Qe = n.forwardRef(
|
|
212
208
|
(e, r) => {
|
|
213
209
|
const {
|
|
214
210
|
__scopeToast: o,
|
|
215
211
|
type: t = "foreground",
|
|
216
|
-
duration:
|
|
212
|
+
duration: c,
|
|
217
213
|
open: d,
|
|
218
|
-
onClose:
|
|
219
|
-
onEscapeKeyDown:
|
|
214
|
+
onClose: p,
|
|
215
|
+
onEscapeKeyDown: T,
|
|
220
216
|
onPause: v,
|
|
221
|
-
onResume:
|
|
222
|
-
onSwipeStart:
|
|
217
|
+
onResume: a,
|
|
218
|
+
onSwipeStart: E,
|
|
223
219
|
onSwipeMove: w,
|
|
224
220
|
onSwipeCancel: S,
|
|
225
|
-
onSwipeEnd:
|
|
221
|
+
onSwipeEnd: b,
|
|
226
222
|
...R
|
|
227
|
-
} = e, l = U(
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
!a || a === 1 / 0 || (window.clearTimeout(M.current), P.current = (/* @__PURE__ */ new Date()).getTime(), M.current = window.setTimeout(_, a));
|
|
223
|
+
} = e, l = U(O, o), [u, h] = n.useState(null), f = ae(r, (s) => h(s)), m = n.useRef(null), P = n.useRef(null), C = c || l.duration, y = n.useRef(0), F = n.useRef(C), k = n.useRef(0), { onToastAdd: _, onToastRemove: V } = l, N = $(() => {
|
|
224
|
+
u?.contains(document.activeElement) && l.viewport?.focus(), p();
|
|
225
|
+
}), K = n.useCallback(
|
|
226
|
+
(s) => {
|
|
227
|
+
!s || s === 1 / 0 || (window.clearTimeout(k.current), y.current = (/* @__PURE__ */ new Date()).getTime(), k.current = window.setTimeout(N, s));
|
|
233
228
|
},
|
|
234
|
-
[
|
|
229
|
+
[N]
|
|
235
230
|
);
|
|
236
|
-
|
|
237
|
-
const
|
|
238
|
-
if (
|
|
239
|
-
const
|
|
240
|
-
|
|
231
|
+
n.useEffect(() => {
|
|
232
|
+
const s = l.viewport;
|
|
233
|
+
if (s) {
|
|
234
|
+
const g = () => {
|
|
235
|
+
K(F.current), a?.();
|
|
241
236
|
}, I = () => {
|
|
242
|
-
const
|
|
243
|
-
|
|
237
|
+
const L = (/* @__PURE__ */ new Date()).getTime() - y.current;
|
|
238
|
+
F.current = F.current - L, window.clearTimeout(k.current), v?.();
|
|
244
239
|
};
|
|
245
|
-
return
|
|
246
|
-
|
|
240
|
+
return s.addEventListener(z, I), s.addEventListener(G, g), () => {
|
|
241
|
+
s.removeEventListener(z, I), s.removeEventListener(G, g);
|
|
247
242
|
};
|
|
248
243
|
}
|
|
249
|
-
}, [l.viewport,
|
|
250
|
-
d && !l.isClosePausedRef.current &&
|
|
251
|
-
}, [d,
|
|
252
|
-
const
|
|
253
|
-
return l.viewport ? /* @__PURE__ */
|
|
254
|
-
|
|
244
|
+
}, [l.viewport, C, v, a, K]), n.useEffect(() => {
|
|
245
|
+
d && !l.isClosePausedRef.current && K(C);
|
|
246
|
+
}, [d, C, l.isClosePausedRef, K]), n.useEffect(() => (_(), () => V()), [_, V]);
|
|
247
|
+
const ee = n.useMemo(() => u ? Pe(u) : null, [u]);
|
|
248
|
+
return l.viewport ? /* @__PURE__ */ A(se, { children: [
|
|
249
|
+
ee && /* @__PURE__ */ i(
|
|
255
250
|
Ze,
|
|
256
251
|
{
|
|
257
252
|
__scopeToast: o,
|
|
258
253
|
role: "status",
|
|
259
254
|
"aria-live": t === "foreground" ? "assertive" : "polite",
|
|
260
|
-
|
|
261
|
-
children: K
|
|
255
|
+
children: ee
|
|
262
256
|
}
|
|
263
257
|
),
|
|
264
|
-
/* @__PURE__ */
|
|
265
|
-
/* @__PURE__ */
|
|
258
|
+
/* @__PURE__ */ i(Ge, { scope: o, onClose: N, children: Se.createPortal(
|
|
259
|
+
/* @__PURE__ */ i(Z.ItemSlot, { scope: o, children: /* @__PURE__ */ i(
|
|
266
260
|
Le,
|
|
267
261
|
{
|
|
268
262
|
asChild: !0,
|
|
269
|
-
onEscapeKeyDown:
|
|
270
|
-
l.isFocusedToastEscapeKeyDownRef.current ||
|
|
263
|
+
onEscapeKeyDown: x(T, () => {
|
|
264
|
+
l.isFocusedToastEscapeKeyDownRef.current || N(), l.isFocusedToastEscapeKeyDownRef.current = !1;
|
|
271
265
|
}),
|
|
272
|
-
children: /* @__PURE__ */
|
|
273
|
-
|
|
266
|
+
children: /* @__PURE__ */ i(
|
|
267
|
+
D.li,
|
|
274
268
|
{
|
|
275
|
-
role: "status",
|
|
276
|
-
"aria-live": "off",
|
|
277
|
-
"aria-atomic": !0,
|
|
278
269
|
tabIndex: 0,
|
|
279
270
|
"data-state": d ? "open" : "closed",
|
|
280
271
|
"data-swipe-direction": l.swipeDirection,
|
|
281
272
|
...R,
|
|
282
|
-
ref:
|
|
273
|
+
ref: f,
|
|
283
274
|
style: { userSelect: "none", touchAction: "none", ...e.style },
|
|
284
|
-
onKeyDown:
|
|
285
|
-
|
|
275
|
+
onKeyDown: x(e.onKeyDown, (s) => {
|
|
276
|
+
s.key === "Escape" && (T?.(s.nativeEvent), s.nativeEvent.defaultPrevented || (l.isFocusedToastEscapeKeyDownRef.current = !0, N()));
|
|
286
277
|
}),
|
|
287
|
-
onPointerDown:
|
|
288
|
-
|
|
278
|
+
onPointerDown: x(e.onPointerDown, (s) => {
|
|
279
|
+
s.button === 0 && (m.current = { x: s.clientX, y: s.clientY });
|
|
289
280
|
}),
|
|
290
|
-
onPointerMove:
|
|
291
|
-
if (!
|
|
292
|
-
const
|
|
293
|
-
|
|
281
|
+
onPointerMove: x(e.onPointerMove, (s) => {
|
|
282
|
+
if (!m.current) return;
|
|
283
|
+
const g = s.clientX - m.current.x, I = s.clientY - m.current.y, L = !!P.current, M = ["left", "right"].includes(l.swipeDirection), H = ["left", "up"].includes(l.swipeDirection) ? Math.min : Math.max, Ce = M ? H(0, g) : 0, Re = M ? 0 : H(0, I), Y = s.pointerType === "touch" ? 10 : 2, W = { x: Ce, y: Re }, te = { originalEvent: s, delta: W };
|
|
284
|
+
L ? (P.current = W, X(je, w, te, {
|
|
294
285
|
discrete: !1
|
|
295
|
-
})) : ne(W, l.swipeDirection,
|
|
286
|
+
})) : ne(W, l.swipeDirection, Y) ? (P.current = W, X(Be, E, te, {
|
|
296
287
|
discrete: !1
|
|
297
|
-
}),
|
|
288
|
+
}), s.target.setPointerCapture(s.pointerId)) : (Math.abs(g) > Y || Math.abs(I) > Y) && (m.current = null);
|
|
298
289
|
}),
|
|
299
|
-
onPointerUp:
|
|
300
|
-
const
|
|
301
|
-
if (I.hasPointerCapture(
|
|
302
|
-
const
|
|
303
|
-
ne(
|
|
290
|
+
onPointerUp: x(e.onPointerUp, (s) => {
|
|
291
|
+
const g = P.current, I = s.target;
|
|
292
|
+
if (I.hasPointerCapture(s.pointerId) && I.releasePointerCapture(s.pointerId), P.current = null, m.current = null, g) {
|
|
293
|
+
const L = s.currentTarget, M = { originalEvent: s, delta: g };
|
|
294
|
+
ne(g, l.swipeDirection, l.swipeThreshold) ? X(ze, b, M, {
|
|
304
295
|
discrete: !0
|
|
305
296
|
}) : X(
|
|
306
297
|
qe,
|
|
307
298
|
S,
|
|
308
|
-
|
|
299
|
+
M,
|
|
309
300
|
{
|
|
310
301
|
discrete: !0
|
|
311
302
|
}
|
|
312
|
-
),
|
|
303
|
+
), L.addEventListener("click", (H) => H.preventDefault(), {
|
|
313
304
|
once: !0
|
|
314
305
|
});
|
|
315
306
|
}
|
|
@@ -323,91 +314,91 @@ var [Ge, Je] = ce(V, {
|
|
|
323
314
|
] }) : null;
|
|
324
315
|
}
|
|
325
316
|
), Ze = (e) => {
|
|
326
|
-
const { __scopeToast: r, children: o, ...t } = e,
|
|
327
|
-
return ot(() =>
|
|
328
|
-
const
|
|
329
|
-
return () => window.clearTimeout(
|
|
330
|
-
}, []),
|
|
331
|
-
|
|
317
|
+
const { __scopeToast: r, children: o, ...t } = e, c = U(O, r), [d, p] = n.useState(!1), [T, v] = n.useState(!1);
|
|
318
|
+
return ot(() => p(!0)), n.useEffect(() => {
|
|
319
|
+
const a = window.setTimeout(() => v(!0), 1e3);
|
|
320
|
+
return () => window.clearTimeout(a);
|
|
321
|
+
}, []), T ? null : /* @__PURE__ */ i(Me, { asChild: !0, children: /* @__PURE__ */ i(ie, { ...t, children: d && /* @__PURE__ */ A(se, { children: [
|
|
322
|
+
c.label,
|
|
332
323
|
" ",
|
|
333
324
|
o
|
|
334
325
|
] }) }) });
|
|
335
|
-
}, et = "ToastTitle", me =
|
|
326
|
+
}, et = "ToastTitle", me = n.forwardRef(
|
|
336
327
|
(e, r) => {
|
|
337
328
|
const { __scopeToast: o, ...t } = e;
|
|
338
|
-
return /* @__PURE__ */
|
|
329
|
+
return /* @__PURE__ */ i(D.div, { ...t, ref: r });
|
|
339
330
|
}
|
|
340
331
|
);
|
|
341
332
|
me.displayName = et;
|
|
342
|
-
var tt = "ToastDescription", Te =
|
|
333
|
+
var tt = "ToastDescription", Te = n.forwardRef(
|
|
343
334
|
(e, r) => {
|
|
344
335
|
const { __scopeToast: o, ...t } = e;
|
|
345
|
-
return /* @__PURE__ */
|
|
336
|
+
return /* @__PURE__ */ i(D.div, { ...t, ref: r });
|
|
346
337
|
}
|
|
347
338
|
);
|
|
348
339
|
Te.displayName = tt;
|
|
349
|
-
var
|
|
340
|
+
var we = "ToastAction", ve = n.forwardRef(
|
|
350
341
|
(e, r) => {
|
|
351
342
|
const { altText: o, ...t } = e;
|
|
352
|
-
return o.trim() ? /* @__PURE__ */
|
|
353
|
-
`Invalid prop \`altText\` supplied to \`${
|
|
343
|
+
return o.trim() ? /* @__PURE__ */ i(he, { altText: o, asChild: !0, children: /* @__PURE__ */ i(ye, { ...t, ref: r }) }) : (console.error(
|
|
344
|
+
`Invalid prop \`altText\` supplied to \`${we}\`. Expected non-empty \`string\`.`
|
|
354
345
|
), null);
|
|
355
346
|
}
|
|
356
347
|
);
|
|
357
|
-
|
|
358
|
-
var Ee = "ToastClose",
|
|
348
|
+
ve.displayName = we;
|
|
349
|
+
var Ee = "ToastClose", ye = n.forwardRef(
|
|
359
350
|
(e, r) => {
|
|
360
|
-
const { __scopeToast: o, ...t } = e,
|
|
361
|
-
return /* @__PURE__ */
|
|
362
|
-
|
|
351
|
+
const { __scopeToast: o, ...t } = e, c = Je(Ee, o);
|
|
352
|
+
return /* @__PURE__ */ i(he, { asChild: !0, children: /* @__PURE__ */ i(
|
|
353
|
+
D.button,
|
|
363
354
|
{
|
|
364
355
|
type: "button",
|
|
365
356
|
...t,
|
|
366
357
|
ref: r,
|
|
367
|
-
onClick:
|
|
358
|
+
onClick: x(e.onClick, c.onClose)
|
|
368
359
|
}
|
|
369
360
|
) });
|
|
370
361
|
}
|
|
371
362
|
);
|
|
372
|
-
|
|
373
|
-
var
|
|
374
|
-
const { __scopeToast: o, altText: t, ...
|
|
375
|
-
return /* @__PURE__ */
|
|
376
|
-
|
|
363
|
+
ye.displayName = Ee;
|
|
364
|
+
var he = n.forwardRef((e, r) => {
|
|
365
|
+
const { __scopeToast: o, altText: t, ...c } = e;
|
|
366
|
+
return /* @__PURE__ */ i(
|
|
367
|
+
D.div,
|
|
377
368
|
{
|
|
378
369
|
"data-radix-toast-announce-exclude": "",
|
|
379
370
|
"data-radix-toast-announce-alt": t || void 0,
|
|
380
|
-
...
|
|
371
|
+
...c,
|
|
381
372
|
ref: r
|
|
382
373
|
}
|
|
383
374
|
);
|
|
384
375
|
});
|
|
385
|
-
function
|
|
376
|
+
function Pe(e) {
|
|
386
377
|
const r = [];
|
|
387
378
|
return Array.from(e.childNodes).forEach((t) => {
|
|
388
379
|
if (t.nodeType === t.TEXT_NODE && t.textContent && r.push(t.textContent), rt(t)) {
|
|
389
|
-
const
|
|
390
|
-
if (!
|
|
380
|
+
const c = t.ariaHidden || t.hidden || t.style.display === "none", d = t.dataset.radixToastAnnounceExclude === "";
|
|
381
|
+
if (!c)
|
|
391
382
|
if (d) {
|
|
392
|
-
const
|
|
393
|
-
|
|
383
|
+
const p = t.dataset.radixToastAnnounceAlt;
|
|
384
|
+
p && r.push(p);
|
|
394
385
|
} else
|
|
395
|
-
r.push(...
|
|
386
|
+
r.push(...Pe(t));
|
|
396
387
|
}
|
|
397
388
|
}), r;
|
|
398
389
|
}
|
|
399
390
|
function X(e, r, o, { discrete: t }) {
|
|
400
|
-
const
|
|
401
|
-
r &&
|
|
391
|
+
const c = o.originalEvent.currentTarget, d = new CustomEvent(e, { bubbles: !0, cancelable: !0, detail: o });
|
|
392
|
+
r && c.addEventListener(e, r, { once: !0 }), t ? Ie(c, d) : c.dispatchEvent(d);
|
|
402
393
|
}
|
|
403
394
|
var ne = (e, r, o = 0) => {
|
|
404
|
-
const t = Math.abs(e.x),
|
|
405
|
-
return r === "left" || r === "right" ? d && t > o : !d &&
|
|
395
|
+
const t = Math.abs(e.x), c = Math.abs(e.y), d = t > c;
|
|
396
|
+
return r === "left" || r === "right" ? d && t > o : !d && c > o;
|
|
406
397
|
};
|
|
407
398
|
function ot(e = () => {
|
|
408
399
|
}) {
|
|
409
400
|
const r = $(e);
|
|
410
|
-
|
|
401
|
+
De(() => {
|
|
411
402
|
let o = 0, t = 0;
|
|
412
403
|
return o = window.requestAnimationFrame(() => t = window.requestAnimationFrame(r)), () => {
|
|
413
404
|
window.cancelAnimationFrame(o), window.cancelAnimationFrame(t);
|
|
@@ -420,66 +411,66 @@ function rt(e) {
|
|
|
420
411
|
function nt(e) {
|
|
421
412
|
const r = [], o = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, {
|
|
422
413
|
acceptNode: (t) => {
|
|
423
|
-
const
|
|
424
|
-
return t.disabled || t.hidden ||
|
|
414
|
+
const c = t.tagName === "INPUT" && t.type === "hidden";
|
|
415
|
+
return t.disabled || t.hidden || c ? NodeFilter.FILTER_SKIP : t.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
|
|
425
416
|
}
|
|
426
417
|
});
|
|
427
418
|
for (; o.nextNode(); ) r.push(o.currentNode);
|
|
428
419
|
return r;
|
|
429
420
|
}
|
|
430
|
-
function
|
|
421
|
+
function q(e) {
|
|
431
422
|
const r = document.activeElement;
|
|
432
423
|
return e.some((o) => o === r ? !0 : (o.focus(), document.activeElement !== r));
|
|
433
424
|
}
|
|
434
|
-
var st = ue, at = de, it =
|
|
425
|
+
var st = ue, at = de, it = fe, ct = me, ut = Te, lt = ve;
|
|
435
426
|
const bt = ({
|
|
436
427
|
title: e,
|
|
437
428
|
duration: r = 5e3,
|
|
438
429
|
titleClassName: o,
|
|
439
430
|
descriptionClassName: t,
|
|
440
|
-
description:
|
|
431
|
+
description: c,
|
|
441
432
|
children: d,
|
|
442
|
-
theme:
|
|
443
|
-
showCloseButton:
|
|
433
|
+
theme: p,
|
|
434
|
+
showCloseButton: T = !0,
|
|
444
435
|
closeButtonClassName: v,
|
|
445
|
-
className:
|
|
446
|
-
open:
|
|
436
|
+
className: a,
|
|
437
|
+
open: E = !1,
|
|
447
438
|
setOpen: w
|
|
448
439
|
}) => {
|
|
449
|
-
const S =
|
|
440
|
+
const S = xe(0);
|
|
450
441
|
be(() => () => clearTimeout(S.current), []);
|
|
451
|
-
const
|
|
442
|
+
const b = oe(() => re(e) ? /* @__PURE__ */ i(B, { className: o, children: e }) : e, [e, o]), R = oe(() => re(c) ? /* @__PURE__ */ i(B, { className: t, children: c }) : c, [c, t]), l = ge(() => {
|
|
452
443
|
w(!1), S.current = window.setTimeout(() => w(!0), 100);
|
|
453
444
|
}, [w]);
|
|
454
|
-
return /* @__PURE__ */
|
|
455
|
-
/* @__PURE__ */
|
|
456
|
-
/* @__PURE__ */
|
|
445
|
+
return /* @__PURE__ */ A(st, { swipeDirection: "right", duration: r, children: [
|
|
446
|
+
/* @__PURE__ */ i(B, { onClick: l, children: d }),
|
|
447
|
+
/* @__PURE__ */ A(
|
|
457
448
|
it,
|
|
458
449
|
{
|
|
459
|
-
className:
|
|
460
|
-
"data-theme":
|
|
461
|
-
open:
|
|
450
|
+
className: j(Ke({ className: a })),
|
|
451
|
+
"data-theme": p,
|
|
452
|
+
open: E,
|
|
462
453
|
onOpenChange: w,
|
|
463
454
|
children: [
|
|
464
|
-
/* @__PURE__ */
|
|
465
|
-
R && /* @__PURE__ */
|
|
466
|
-
|
|
467
|
-
/* @__PURE__ */
|
|
455
|
+
/* @__PURE__ */ i(ct, { asChild: !0, className: o, children: b }),
|
|
456
|
+
R && /* @__PURE__ */ i(ut, { asChild: !0, children: R }),
|
|
457
|
+
T && /* @__PURE__ */ i(lt, { asChild: !0, altText: "Close the toast", children: /* @__PURE__ */ A("button", { type: "button", className: "absolute right-1.5 top-1.5", children: [
|
|
458
|
+
/* @__PURE__ */ i(
|
|
468
459
|
We,
|
|
469
460
|
{
|
|
470
|
-
className:
|
|
461
|
+
className: j(
|
|
471
462
|
Ve({
|
|
472
463
|
className: v
|
|
473
464
|
})
|
|
474
465
|
)
|
|
475
466
|
}
|
|
476
467
|
),
|
|
477
|
-
/* @__PURE__ */
|
|
468
|
+
/* @__PURE__ */ i(ke, { children: "Close toast" })
|
|
478
469
|
] }) })
|
|
479
470
|
]
|
|
480
471
|
}
|
|
481
472
|
),
|
|
482
|
-
/* @__PURE__ */
|
|
473
|
+
/* @__PURE__ */ i(at, { className: j(He()) })
|
|
483
474
|
] });
|
|
484
475
|
};
|
|
485
476
|
export {
|