@povio/ui 3.4.0-rc.30 → 3.4.0-rc.32
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/{BottomSheet-CQ9Pkvn_.js → BottomSheet-Bf5YauUF.js} +2 -2
- package/dist/{Breadcrumbs-D0mblHwu.js → Breadcrumbs-D8ngBc93.js} +2 -2
- package/dist/{Calendar-DQxeTov4.js → Calendar-D2IPtih0.js} +4 -4
- package/dist/{DatePicker-BT46HC74.js → DatePicker-C5inJMib.js} +4 -4
- package/dist/{DatePickerInput-BK6P_VAB.js → DatePickerInput-CtkeReVQ.js} +1 -1
- package/dist/{DateRangePicker-C2NPjsPu.js → DateRangePicker-BcYoPnDA.js} +16 -3
- package/dist/{DateTimePicker-BZcH7uNO.js → DateTimePicker-CocJ2QGc.js} +4 -4
- package/dist/{Dialog-Bl7F9FUP.js → Dialog-CYPAuk4r.js} +1 -1
- package/dist/{InputItem-DnaVpl5x.js → InputItem-msRZqamc.js} +5 -5
- package/dist/{Inputs-DKdKSMqz.js → Inputs-COn_OHA2.js} +1 -1
- package/dist/{ListBox-Ck1UjeGo.js → ListBox-CJbpH_Kh.js} +1 -1
- package/dist/{Menu-fXWnROTU.js → Menu-CXlFN-mb.js} +2 -2
- package/dist/{MenuDesktop-C3_I4fdd.js → MenuDesktop-CuQBZODp.js} +1 -1
- package/dist/{Modal-UhtruHmf.js → Modal-BbiLj4ai.js} +1 -1
- package/dist/{Modal-CSr-DYqC.js → Modal-Cerq7LEf.js} +2 -2
- package/dist/{Select-BEgNpIuG.js → Select-CO2ppqqL.js} +1 -1
- package/dist/{TextEditor-CKGUWpY_.js → TextEditor-CDv7Tf57.js} +3 -3
- package/dist/{TimePicker-eWZ7lIDW.js → TimePicker-BmTVdF1E.js} +2 -2
- package/dist/{ToastRenderer-Dpax9sKV.js → ToastContainer-2NP_Qj1a.js} +18 -3
- package/dist/components/action-modal.js +1 -1
- package/dist/components/autocomplete.js +1 -1
- package/dist/components/bottom-sheet.js +2 -2
- package/dist/components/breadcrumbs.js +1 -1
- package/dist/components/date-picker.js +1 -1
- package/dist/components/date-range-picker.js +1 -1
- package/dist/components/date-time-picker.js +1 -1
- package/dist/components/drawer.d.ts +2 -7
- package/dist/components/drawer.js +88 -86
- package/dist/components/menu.js +2 -2
- package/dist/components/modal.js +1 -1
- package/dist/components/query-select.js +1 -1
- package/dist/components/responsive-popover.js +1 -1
- package/dist/components/select.js +1 -1
- package/dist/components/split-button.js +1 -1
- package/dist/components/time-picker.js +1 -1
- package/dist/components/toast.js +2 -2
- package/dist/components/use-toast.js +2 -2
- package/dist/config/confirmation.js +1 -1
- package/dist/{confirmation.context-CD-UjjK8.js → confirmation.context-Cj2aHpa_.js} +22 -25
- package/dist/{datePickerValue.utils-CA2te8RG.js → datePickerValue.utils-u6REHox2.js} +1 -1
- package/dist/{dist-B4xyoAhc.js → dist-CTjtrOgH.js} +256 -1
- package/dist/index.js +14 -15
- package/dist/{logger-WPC6ostp.js → logger-BPhG2izn.js} +1 -1
- package/dist/rhf/date-picker.js +1 -1
- package/dist/rhf/date-range-picker.js +1 -1
- package/dist/rhf/date-time-picker.js +1 -1
- package/dist/rhf/select.js +1 -1
- package/dist/rhf/text-editor.js +1 -1
- package/dist/rhf/time-picker.js +1 -1
- package/dist/rhf.js +14 -15
- package/dist/{rolldown-runtime-B-lAHAz2.js → rolldown-runtime-DUp30N8C.js} +1 -10
- package/dist/{staticDateTimeSegments-BJpz4raS.js → staticDateTimeSegments-qJUUAL8d.js} +2 -2
- package/dist/{staticSelect.utils-D16Yq0j-.js → staticSelect.utils-CRyAMXOL.js} +3 -3
- package/dist/tanstack/date-picker.js +1 -1
- package/dist/tanstack/date-range-picker.js +1 -1
- package/dist/tanstack/date-time-picker.js +1 -1
- package/dist/tanstack/form.js +1 -1
- package/dist/tanstack/inputs.js +1 -1
- package/dist/tanstack/select.js +1 -1
- package/dist/tanstack/table.js +1 -1
- package/dist/tanstack/text-editor.js +1 -1
- package/dist/tanstack/time-picker.js +1 -1
- package/dist/tanstack.js +21 -22
- package/dist/text-editor.js +1 -1
- package/dist/{toast.runtime-CzHEhKmm.js → toast.runtime-Cl4rxGXF.js} +1 -2
- package/dist/{useFilter-CI4X6urj.js → useFilter-Cz_G94ya.js} +1 -1
- package/dist/{useFormAutosave-DrPFxGPN.js → useFormAutosave-Cj75UzUP.js} +1 -1
- package/dist/{useTableColumnConfig-C647gNJs.js → useTableColumnConfig-CXjUy_VP.js} +2 -2
- package/dist/utils/logger.js +1 -1
- package/package.json +1 -1
- package/dist/Drawer-BkPPB5DQ.js +0 -98
- package/dist/Toast-ZFTj3GGo.js +0 -49
- package/dist/ToastContainer-TRM91co1.js +0 -23
- package/dist/confirmation.dialog-Cveu3s5D.js +0 -16
- package/dist/toast.cva-BGJCi2qq.js +0 -211
|
@@ -1,94 +1,96 @@
|
|
|
1
|
-
import { t as
|
|
2
|
-
import {
|
|
1
|
+
import { t as clsx } from "../clsx-CnD0nOiA.js";
|
|
2
|
+
import { n as $de32f1b87079253c$export$3ddf2d174ce01153, t as $de32f1b87079253c$export$2e1e1122cf0cba88 } from "../Dialog-CYPAuk4r.js";
|
|
3
|
+
import { n as $f3f84453ead64de5$export$8948f78d83984c69, t as $f3f84453ead64de5$export$2b77a92f1a5ad772 } from "../Modal-BbiLj4ai.js";
|
|
4
|
+
import { r as modalOverlay } from "../modal.cva-CbziPHSN.js";
|
|
3
5
|
import { c } from "react/compiler-runtime";
|
|
4
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
-
//#region src/components/overlays/Drawer/Drawer.
|
|
6
|
-
let drawerModulePromise;
|
|
7
|
-
let drawerPreloadPromise;
|
|
8
|
-
const loadDrawer = () => drawerModulePromise ??= import("../Drawer-BkPPB5DQ.js").then((n) => n.n);
|
|
9
|
-
const DrawerRenderer = lazy(() => loadDrawer().then(({ Drawer }) => ({ default: Drawer })));
|
|
10
|
-
/** Starts loading the Drawer renderer before the Drawer is opened. */
|
|
11
|
-
const preloadDrawer = () => drawerPreloadPromise ??= loadDrawer().then(() => void 0);
|
|
7
|
+
//#region src/components/overlays/Drawer/Drawer.tsx
|
|
12
8
|
const Drawer = (t0) => {
|
|
13
|
-
const $ = c(
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
9
|
+
const $ = c(25);
|
|
10
|
+
const { label, isOpen, portalContainerRef, onOpenChange, trigger, children, isDismissable, overlayClassName, dialogClassName, className, shouldCloseOnInteractOutside } = t0;
|
|
11
|
+
if (trigger) {
|
|
12
|
+
let t1;
|
|
13
|
+
if ($[0] !== children || $[1] !== className || $[2] !== dialogClassName || $[3] !== isDismissable || $[4] !== label || $[5] !== overlayClassName || $[6] !== portalContainerRef || $[7] !== shouldCloseOnInteractOutside) {
|
|
14
|
+
t1 = /* @__PURE__ */ jsx(DrawerOverlay, {
|
|
15
|
+
label,
|
|
16
|
+
portalContainerRef,
|
|
17
|
+
isDismissable,
|
|
18
|
+
overlayClassName,
|
|
19
|
+
dialogClassName,
|
|
20
|
+
className,
|
|
21
|
+
shouldCloseOnInteractOutside,
|
|
22
|
+
children
|
|
23
|
+
});
|
|
24
|
+
$[0] = children;
|
|
25
|
+
$[1] = className;
|
|
26
|
+
$[2] = dialogClassName;
|
|
27
|
+
$[3] = isDismissable;
|
|
28
|
+
$[4] = label;
|
|
29
|
+
$[5] = overlayClassName;
|
|
30
|
+
$[6] = portalContainerRef;
|
|
31
|
+
$[7] = shouldCloseOnInteractOutside;
|
|
32
|
+
$[8] = t1;
|
|
33
|
+
} else t1 = $[8];
|
|
34
|
+
let t2;
|
|
35
|
+
if ($[9] !== isOpen || $[10] !== onOpenChange || $[11] !== t1 || $[12] !== trigger) {
|
|
36
|
+
t2 = /* @__PURE__ */ jsxs($de32f1b87079253c$export$2e1e1122cf0cba88, {
|
|
37
|
+
isOpen,
|
|
38
|
+
onOpenChange,
|
|
39
|
+
children: [trigger, t1]
|
|
40
|
+
});
|
|
41
|
+
$[9] = isOpen;
|
|
42
|
+
$[10] = onOpenChange;
|
|
43
|
+
$[11] = t1;
|
|
44
|
+
$[12] = trigger;
|
|
45
|
+
$[13] = t2;
|
|
46
|
+
} else t2 = $[13];
|
|
47
|
+
return t2;
|
|
30
48
|
}
|
|
31
|
-
const [isDrawerOpen, setIsDrawerOpen] = useState(Boolean(isOpen));
|
|
32
|
-
const hasTrigger = Boolean(trigger);
|
|
33
49
|
let t1;
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
$[
|
|
56
|
-
$[
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
50
|
+
if ($[14] !== children || $[15] !== className || $[16] !== dialogClassName || $[17] !== isDismissable || $[18] !== isOpen || $[19] !== label || $[20] !== onOpenChange || $[21] !== overlayClassName || $[22] !== portalContainerRef || $[23] !== shouldCloseOnInteractOutside) {
|
|
51
|
+
t1 = /* @__PURE__ */ jsx(DrawerOverlay, {
|
|
52
|
+
isOpen,
|
|
53
|
+
onOpenChange,
|
|
54
|
+
portalContainerRef,
|
|
55
|
+
isDismissable,
|
|
56
|
+
overlayClassName,
|
|
57
|
+
dialogClassName,
|
|
58
|
+
className,
|
|
59
|
+
label,
|
|
60
|
+
shouldCloseOnInteractOutside,
|
|
61
|
+
children
|
|
62
|
+
});
|
|
63
|
+
$[14] = children;
|
|
64
|
+
$[15] = className;
|
|
65
|
+
$[16] = dialogClassName;
|
|
66
|
+
$[17] = isDismissable;
|
|
67
|
+
$[18] = isOpen;
|
|
68
|
+
$[19] = label;
|
|
69
|
+
$[20] = onOpenChange;
|
|
70
|
+
$[21] = overlayClassName;
|
|
71
|
+
$[22] = portalContainerRef;
|
|
72
|
+
$[23] = shouldCloseOnInteractOutside;
|
|
73
|
+
$[24] = t1;
|
|
74
|
+
} else t1 = $[24];
|
|
75
|
+
return t1;
|
|
76
|
+
};
|
|
77
|
+
const DrawerOverlay = ({ label, isOpen, onOpenChange, portalContainerRef, children, isDismissable, overlayClassName, dialogClassName, className, shouldCloseOnInteractOutside }) => {
|
|
78
|
+
return /* @__PURE__ */ jsx($f3f84453ead64de5$export$8948f78d83984c69, {
|
|
79
|
+
isOpen,
|
|
80
|
+
onOpenChange,
|
|
81
|
+
UNSTABLE_portalContainer: portalContainerRef?.current,
|
|
82
|
+
className: clsx(modalOverlay(), "z-drawer", overlayClassName),
|
|
83
|
+
isDismissable,
|
|
84
|
+
shouldCloseOnInteractOutside,
|
|
85
|
+
children: /* @__PURE__ */ jsx($f3f84453ead64de5$export$2b77a92f1a5ad772, {
|
|
86
|
+
className: clsx("fixed inset-y-0 right-0 z-drawer w-fit entering:animate-drawer-enter-right exiting:animate-drawer-exit-right bg-elevation-fill-default-1", className),
|
|
87
|
+
children: /* @__PURE__ */ jsx($de32f1b87079253c$export$3ddf2d174ce01153, {
|
|
88
|
+
"aria-label": label,
|
|
89
|
+
className: clsx("outline-none", dialogClassName),
|
|
90
|
+
children: ({ close }) => children(close)
|
|
68
91
|
})
|
|
69
|
-
})
|
|
70
|
-
|
|
71
|
-
$[12] = onOpenChange;
|
|
72
|
-
$[13] = open_0;
|
|
73
|
-
$[14] = props;
|
|
74
|
-
$[15] = trigger;
|
|
75
|
-
$[16] = t4;
|
|
76
|
-
} else t4 = $[16];
|
|
77
|
-
const renderer = t4;
|
|
78
|
-
let t5;
|
|
79
|
-
if ($[17] !== handleOpenChange || $[18] !== isDrawerOpen || $[19] !== renderer || $[20] !== trigger) {
|
|
80
|
-
t5 = trigger ? /* @__PURE__ */ jsxs($de32f1b87079253c$export$2e1e1122cf0cba88, {
|
|
81
|
-
isOpen: isDrawerOpen,
|
|
82
|
-
onOpenChange: handleOpenChange,
|
|
83
|
-
children: [trigger, renderer]
|
|
84
|
-
}) : renderer;
|
|
85
|
-
$[17] = handleOpenChange;
|
|
86
|
-
$[18] = isDrawerOpen;
|
|
87
|
-
$[19] = renderer;
|
|
88
|
-
$[20] = trigger;
|
|
89
|
-
$[21] = t5;
|
|
90
|
-
} else t5 = $[21];
|
|
91
|
-
return t5;
|
|
92
|
+
})
|
|
93
|
+
});
|
|
92
94
|
};
|
|
93
95
|
//#endregion
|
|
94
|
-
export { Drawer
|
|
96
|
+
export { Drawer };
|
package/dist/components/menu.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { t as Menu } from "../Menu-
|
|
2
|
-
import { r as MenuItem } from "../MenuDesktop-
|
|
1
|
+
import { t as Menu } from "../Menu-CXlFN-mb.js";
|
|
2
|
+
import { r as MenuItem } from "../MenuDesktop-CuQBZODp.js";
|
|
3
3
|
export { Menu, MenuItem };
|
package/dist/components/modal.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as Modal } from "../Modal-
|
|
1
|
+
import { t as Modal } from "../Modal-Cerq7LEf.js";
|
|
2
2
|
export { Modal };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as UIConfig } from "../uiConfig.context-B_wBkrQZ.js";
|
|
2
2
|
import { f as $5dc95899b306f630$export$c9058316764c140e } from "../utils-D-KKbY-n.js";
|
|
3
3
|
import { t as FieldController } from "../form.binding-DyZ4fH8l.js";
|
|
4
|
-
import { t as Select } from "../Select-
|
|
4
|
+
import { t as Select } from "../Select-CO2ppqqL.js";
|
|
5
5
|
import { n as getQueryItems, r as getSelectionIdsToResolve, t as useQueryAutocomplete } from "../useQueryAutocomplete-CraXvRm_.js";
|
|
6
6
|
import { memo, useCallback, useMemo, useState } from "react";
|
|
7
7
|
import { jsx } from "react/jsx-runtime";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as clsx } from "../clsx-CnD0nOiA.js";
|
|
2
|
-
import { c as $07b14b47974efb58$export$5b6b19405a83ff9d, n as $de32f1b87079253c$export$3ddf2d174ce01153, t as $de32f1b87079253c$export$2e1e1122cf0cba88 } from "../Dialog-
|
|
2
|
+
import { c as $07b14b47974efb58$export$5b6b19405a83ff9d, n as $de32f1b87079253c$export$3ddf2d174ce01153, t as $de32f1b87079253c$export$2e1e1122cf0cba88 } from "../Dialog-CYPAuk4r.js";
|
|
3
3
|
import { t as UIOverrides } from "../uiOverrides.context-Bfm2n-n8.js";
|
|
4
4
|
import { BottomSheet } from "./bottom-sheet.js";
|
|
5
5
|
import { t as useBreakpoint } from "../useBreakpoint-YuMYUdpG.js";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as Select } from "../Select-
|
|
1
|
+
import { t as Select } from "../Select-CO2ppqqL.js";
|
|
2
2
|
export { Select };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as TimePicker } from "../TimePicker-
|
|
1
|
+
import { t as TimePicker } from "../TimePicker-BmTVdF1E.js";
|
|
2
2
|
export { TimePicker };
|
package/dist/components/toast.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { n as ToastProvider, t as ToastContainer } from "../ToastContainer-
|
|
1
|
+
import { r as Toast } from "../dist-CTjtrOgH.js";
|
|
2
|
+
import { n as ToastProvider, t as ToastContainer } from "../ToastContainer-2NP_Qj1a.js";
|
|
3
3
|
export { Toast, ToastContainer, ToastProvider };
|
|
@@ -5,7 +5,7 @@ let nextToastId = 0;
|
|
|
5
5
|
const enqueueToast = (color, params, options) => {
|
|
6
6
|
const id = `povio-toast-${++nextToastId}`;
|
|
7
7
|
activateToastRenderer();
|
|
8
|
-
import("../toast.runtime-
|
|
8
|
+
import("../toast.runtime-Cl4rxGXF.js").then(({ showToast }) => showToast(id, color, params, options));
|
|
9
9
|
return id;
|
|
10
10
|
};
|
|
11
11
|
const useToast = () => {
|
|
@@ -22,7 +22,7 @@ const useToast = () => {
|
|
|
22
22
|
return enqueueToast("neutral", params_2, options_2);
|
|
23
23
|
}, []);
|
|
24
24
|
const closeToast = useCallback((id) => {
|
|
25
|
-
import("../toast.runtime-
|
|
25
|
+
import("../toast.runtime-Cl4rxGXF.js").then(({ dismissToast }) => dismissToast(id));
|
|
26
26
|
}, []);
|
|
27
27
|
return useMemo(() => ({
|
|
28
28
|
successToast,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as Confirmation } from "../confirmation.context-
|
|
1
|
+
import { t as Confirmation } from "../confirmation.context-Cj2aHpa_.js";
|
|
2
2
|
export { Confirmation };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import "./i18n-BDjNuy4Z.js";
|
|
2
|
-
import {
|
|
2
|
+
import { ActionModal } from "./components/action-modal.js";
|
|
3
|
+
import { createContext, use, useRef, useState } from "react";
|
|
3
4
|
import { c } from "react/compiler-runtime";
|
|
4
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
6
|
import { useTranslation } from "react-i18next";
|
|
6
7
|
//#region src/config/confirmation.context.tsx
|
|
7
|
-
const ConfirmationDialog = lazy(() => import("./confirmation.dialog-Cveu3s5D.js"));
|
|
8
8
|
let Confirmation;
|
|
9
9
|
(function(_Confirmation) {
|
|
10
10
|
const Context = createContext(null);
|
|
@@ -60,29 +60,26 @@ let Confirmation;
|
|
|
60
60
|
const value = t4;
|
|
61
61
|
let t5;
|
|
62
62
|
if ($[7] !== activeRequest || $[8] !== settle) {
|
|
63
|
-
t5 = activeRequest ? /* @__PURE__ */ jsx(
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
onPress: () => settle(false)
|
|
84
|
-
}
|
|
85
|
-
})
|
|
63
|
+
t5 = activeRequest ? /* @__PURE__ */ jsx(ActionModal, {
|
|
64
|
+
heading: activeRequest.input.heading,
|
|
65
|
+
description: activeRequest.input.description,
|
|
66
|
+
buttonSize: activeRequest.input.buttonSize,
|
|
67
|
+
textAlign: activeRequest.input.textAlign,
|
|
68
|
+
modalClassName: activeRequest.input.modalClassName,
|
|
69
|
+
isOpen: true,
|
|
70
|
+
onClose: () => settle(false),
|
|
71
|
+
primaryAction: {
|
|
72
|
+
label: activeRequest.input.confirmLabel ?? "",
|
|
73
|
+
variant: activeRequest.input.confirmVariant,
|
|
74
|
+
color: activeRequest.input.confirmColor,
|
|
75
|
+
onPress: () => settle(true)
|
|
76
|
+
},
|
|
77
|
+
secondaryAction: {
|
|
78
|
+
label: activeRequest.input.cancelLabel ?? "",
|
|
79
|
+
variant: activeRequest.input.cancelVariant,
|
|
80
|
+
color: activeRequest.input.cancelColor,
|
|
81
|
+
onPress: () => settle(false)
|
|
82
|
+
}
|
|
86
83
|
}) : null;
|
|
87
84
|
$[7] = activeRequest;
|
|
88
85
|
$[8] = settle;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as ChevronDown } from "./chevron-down-Ciz9yP9R.js";
|
|
2
2
|
import { t as ChevronUp } from "./chevron-up-CHRnDSA3.js";
|
|
3
3
|
import { t as clsx } from "./clsx-CnD0nOiA.js";
|
|
4
|
-
import { _ as $32489daedd52963e$export$1315d136e6f7581, u as getPlaceholder, y as $16f0b7bb276bc17e$export$4c842f6a241dc825 } from "./staticDateTimeSegments-
|
|
4
|
+
import { _ as $32489daedd52963e$export$1315d136e6f7581, u as getPlaceholder, y as $16f0b7bb276bc17e$export$4c842f6a241dc825 } from "./staticDateTimeSegments-qJUUAL8d.js";
|
|
5
5
|
import { t as $18f2051aff69b9bf$export$43bb16f9c6d9e3f7 } from "./context-74MZZLC0.js";
|
|
6
6
|
import { t as Typography } from "./Typography-AcUd9df8.js";
|
|
7
7
|
import { InlineIconButton } from "./components/inline-icon-button.js";
|
|
@@ -1,5 +1,260 @@
|
|
|
1
|
+
import { t as UIConfig } from "./uiConfig.context-B_wBkrQZ.js";
|
|
1
2
|
import { t as clsx } from "./clsx-CnD0nOiA.js";
|
|
3
|
+
import { t as UIOverrides } from "./uiOverrides.context-Bfm2n-n8.js";
|
|
4
|
+
import { t as Typography } from "./Typography-AcUd9df8.js";
|
|
5
|
+
import { t as Loader } from "./Loader-C6YkWZOO.js";
|
|
6
|
+
import { t as compoundMapper } from "./compoundMapper-Di3SKZnS.js";
|
|
7
|
+
import { t as Button } from "./Button-D9J5wkMv.js";
|
|
2
8
|
import $HgANd$react, { cloneElement, isValidElement, useEffect, useLayoutEffect, useRef, useState, useSyncExternalStore } from "react";
|
|
9
|
+
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
10
|
+
//#region src/components/status/Toast/toast.cva.ts
|
|
11
|
+
const toastContainerDefinition = UIOverrides.defineConfig({
|
|
12
|
+
base: ["m-toast-gap-margin-mobile w-auto gap-toast-gap-margin-mobile p-0 md:m-toast-gap-margin-desktop md:gap-toast-gap-margin-desktop"],
|
|
13
|
+
config: { variants: { position: {
|
|
14
|
+
"bottom-right": "right-0 bottom-0",
|
|
15
|
+
"bottom-left": "bottom-0 left-0",
|
|
16
|
+
"top-right": "top-0 right-0",
|
|
17
|
+
"top-left": "top-0 left-0",
|
|
18
|
+
"bottom-center": "bottom-0",
|
|
19
|
+
"top-center": "top-0"
|
|
20
|
+
} } }
|
|
21
|
+
});
|
|
22
|
+
const toastWrapper = clsx("m-0! min-h-0! w-auto! max-w-toast bg-transparent! p-0! shadow-none!");
|
|
23
|
+
const toastDefinition = UIOverrides.defineConfig({
|
|
24
|
+
base: ["m-0 inline-flex w-auto flex-col items-center overflow-hidden rounded-toast-rounding-default shadow-4 md:flex-row"],
|
|
25
|
+
config: {
|
|
26
|
+
variants: {
|
|
27
|
+
variant: {
|
|
28
|
+
outlined: "border bg-elevation-fill-default-1 text-text-default-1",
|
|
29
|
+
contained: "text-text-inverted-1"
|
|
30
|
+
},
|
|
31
|
+
color: {
|
|
32
|
+
neutral: "",
|
|
33
|
+
success: "",
|
|
34
|
+
warning: "",
|
|
35
|
+
error: ""
|
|
36
|
+
},
|
|
37
|
+
position: {
|
|
38
|
+
"bottom-right": "",
|
|
39
|
+
"bottom-left": "",
|
|
40
|
+
"bottom-center": "",
|
|
41
|
+
"top-right": "",
|
|
42
|
+
"top-left": "",
|
|
43
|
+
"top-center": ""
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
compoundVariants: [
|
|
47
|
+
{
|
|
48
|
+
variant: "outlined",
|
|
49
|
+
color: "neutral",
|
|
50
|
+
className: "border-elevation-outline-default-1"
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
variant: "outlined",
|
|
54
|
+
color: "success",
|
|
55
|
+
className: "border-elevation-outline-success-1"
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
variant: "outlined",
|
|
59
|
+
color: "warning",
|
|
60
|
+
className: "border-elevation-outline-warning-1"
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
variant: "outlined",
|
|
64
|
+
color: "error",
|
|
65
|
+
className: "border-elevation-outline-error-1"
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
variant: "contained",
|
|
69
|
+
color: "neutral",
|
|
70
|
+
className: "bg-elevation-fill-inverted-1"
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
variant: "contained",
|
|
74
|
+
color: "success",
|
|
75
|
+
className: "bg-elevation-fill-success-1"
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
variant: "contained",
|
|
79
|
+
color: "warning",
|
|
80
|
+
className: "bg-elevation-fill-warning-1"
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
variant: "contained",
|
|
84
|
+
color: "error",
|
|
85
|
+
className: "bg-elevation-fill-error-1"
|
|
86
|
+
}
|
|
87
|
+
],
|
|
88
|
+
defaultVariants: {
|
|
89
|
+
variant: "outlined",
|
|
90
|
+
color: "neutral"
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
});
|
|
94
|
+
const buttonColorVariant = compoundMapper({
|
|
95
|
+
compoundVariants: [
|
|
96
|
+
{
|
|
97
|
+
variant: "outlined",
|
|
98
|
+
color: "neutral",
|
|
99
|
+
value: { color: "secondary" }
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
variant: "outlined",
|
|
103
|
+
color: "success",
|
|
104
|
+
value: { color: "success" }
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
variant: "outlined",
|
|
108
|
+
color: "warning",
|
|
109
|
+
value: { color: "warning" }
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
variant: "outlined",
|
|
113
|
+
color: "error",
|
|
114
|
+
value: { color: "error" }
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
variant: "contained",
|
|
118
|
+
color: "neutral",
|
|
119
|
+
value: {
|
|
120
|
+
color: "primary",
|
|
121
|
+
inverted: true
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
variant: "contained",
|
|
126
|
+
color: "success",
|
|
127
|
+
value: {
|
|
128
|
+
color: "success",
|
|
129
|
+
inverted: true
|
|
130
|
+
}
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
variant: "contained",
|
|
134
|
+
color: "warning",
|
|
135
|
+
value: {
|
|
136
|
+
color: "warning",
|
|
137
|
+
inverted: true
|
|
138
|
+
}
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
variant: "contained",
|
|
142
|
+
color: "error",
|
|
143
|
+
value: {
|
|
144
|
+
color: "error",
|
|
145
|
+
inverted: true
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
],
|
|
149
|
+
defaultVariants: {
|
|
150
|
+
variant: "outlined",
|
|
151
|
+
color: "neutral"
|
|
152
|
+
},
|
|
153
|
+
default: { color: "secondary" }
|
|
154
|
+
});
|
|
155
|
+
const statusIconDefinition = UIOverrides.defineConfig({
|
|
156
|
+
base: ["size-6 shrink-0"],
|
|
157
|
+
config: {
|
|
158
|
+
variants: {
|
|
159
|
+
variant: {
|
|
160
|
+
outlined: "",
|
|
161
|
+
contained: "text-text-inverted-1"
|
|
162
|
+
},
|
|
163
|
+
color: {
|
|
164
|
+
neutral: "",
|
|
165
|
+
success: "",
|
|
166
|
+
warning: "",
|
|
167
|
+
error: ""
|
|
168
|
+
}
|
|
169
|
+
},
|
|
170
|
+
compoundVariants: [
|
|
171
|
+
{
|
|
172
|
+
variant: "outlined",
|
|
173
|
+
color: "neutral",
|
|
174
|
+
className: "text-text-default-2"
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
variant: "outlined",
|
|
178
|
+
color: "success",
|
|
179
|
+
className: "text-text-success-1"
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
variant: "outlined",
|
|
183
|
+
color: "warning",
|
|
184
|
+
className: "text-text-warning-1"
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
variant: "outlined",
|
|
188
|
+
color: "error",
|
|
189
|
+
className: "text-text-error-1"
|
|
190
|
+
}
|
|
191
|
+
],
|
|
192
|
+
defaultVariants: {
|
|
193
|
+
variant: "outlined",
|
|
194
|
+
color: "neutral"
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
});
|
|
198
|
+
const statusSeparatorDefinition = UIOverrides.defineConfig({
|
|
199
|
+
base: ["h-px shrink-0 self-stretch md:h-auto md:w-px"],
|
|
200
|
+
config: {
|
|
201
|
+
variants: {
|
|
202
|
+
variant: {
|
|
203
|
+
outlined: "",
|
|
204
|
+
contained: "hidden"
|
|
205
|
+
},
|
|
206
|
+
color: {
|
|
207
|
+
neutral: "bg-elevation-outline-default-1",
|
|
208
|
+
success: "bg-elevation-outline-success-1",
|
|
209
|
+
warning: "bg-elevation-outline-warning-1",
|
|
210
|
+
error: "bg-elevation-outline-error-1"
|
|
211
|
+
}
|
|
212
|
+
},
|
|
213
|
+
defaultVariants: { color: "neutral" }
|
|
214
|
+
}
|
|
215
|
+
});
|
|
216
|
+
//#endregion
|
|
217
|
+
//#region src/components/status/Toast/Toast.tsx
|
|
218
|
+
const Toast = ({ text, isLoading = false, actions = [], icon: Icon, ...props }) => {
|
|
219
|
+
const uiConfig = UIConfig.useConfig();
|
|
220
|
+
const { variant = uiConfig.toast.variant, ...restProps } = props;
|
|
221
|
+
const toastCva = UIOverrides.useCva("toast.cva", toastDefinition);
|
|
222
|
+
const buttonColor = UIOverrides.useMapper("toast.buttonColor", buttonColorVariant);
|
|
223
|
+
const iconCva = UIOverrides.useCva("status.iconCva", statusIconDefinition);
|
|
224
|
+
const separatorCva = UIOverrides.useCva("status.separatorCva", statusSeparatorDefinition);
|
|
225
|
+
const variantProps = {
|
|
226
|
+
variant,
|
|
227
|
+
...restProps
|
|
228
|
+
};
|
|
229
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
230
|
+
className: toastCva(variantProps),
|
|
231
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
232
|
+
className: "flex items-start gap-toast-gap-icon-to-text px-toast-side-default py-toast-height-content",
|
|
233
|
+
children: [
|
|
234
|
+
isLoading && /* @__PURE__ */ jsx(Loader, {
|
|
235
|
+
size: "default",
|
|
236
|
+
className: "shrink-0"
|
|
237
|
+
}),
|
|
238
|
+
!isLoading && Icon && /* @__PURE__ */ jsx(Icon, { className: iconCva(variantProps) }),
|
|
239
|
+
/* @__PURE__ */ jsx(Typography, {
|
|
240
|
+
size: "label-2",
|
|
241
|
+
children: text
|
|
242
|
+
})
|
|
243
|
+
]
|
|
244
|
+
}), actions.length > 0 && /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx("div", { className: separatorCva(variantProps) }), /* @__PURE__ */ jsx("div", {
|
|
245
|
+
className: "flex w-full shrink-0 flex-wrap items-center justify-end gap-toast-gap-action px-toast-side-default py-toast-height-actions-mobile md:w-auto md:justify-center md:py-toast-height-actions-desktop",
|
|
246
|
+
children: actions.map(({ text: buttonText, onPress }) => /* @__PURE__ */ jsx(Button, {
|
|
247
|
+
onPress,
|
|
248
|
+
...buttonColor(variantProps),
|
|
249
|
+
variant: "text",
|
|
250
|
+
size: "none",
|
|
251
|
+
width: "hug",
|
|
252
|
+
children: buttonText
|
|
253
|
+
}, buttonText))
|
|
254
|
+
})] })]
|
|
255
|
+
});
|
|
256
|
+
};
|
|
257
|
+
//#endregion
|
|
3
258
|
//#region ../../node_modules/.bun/react-toastify@11.0.5+67f6792bdf102c28/node_modules/react-toastify/dist/index.mjs
|
|
4
259
|
function Mt(t) {
|
|
5
260
|
if (!t || typeof document == "undefined") return;
|
|
@@ -667,4 +922,4 @@ function Lt(t) {
|
|
|
667
922
|
}));
|
|
668
923
|
}
|
|
669
924
|
//#endregion
|
|
670
|
-
export { y as n, Lt as t };
|
|
925
|
+
export { statusSeparatorDefinition as a, toastWrapper as c, statusIconDefinition as i, y as n, toastContainerDefinition as o, Toast as r, toastDefinition as s, Lt as t };
|