@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.
Files changed (75) hide show
  1. package/dist/{BottomSheet-CQ9Pkvn_.js → BottomSheet-Bf5YauUF.js} +2 -2
  2. package/dist/{Breadcrumbs-D0mblHwu.js → Breadcrumbs-D8ngBc93.js} +2 -2
  3. package/dist/{Calendar-DQxeTov4.js → Calendar-D2IPtih0.js} +4 -4
  4. package/dist/{DatePicker-BT46HC74.js → DatePicker-C5inJMib.js} +4 -4
  5. package/dist/{DatePickerInput-BK6P_VAB.js → DatePickerInput-CtkeReVQ.js} +1 -1
  6. package/dist/{DateRangePicker-C2NPjsPu.js → DateRangePicker-BcYoPnDA.js} +16 -3
  7. package/dist/{DateTimePicker-BZcH7uNO.js → DateTimePicker-CocJ2QGc.js} +4 -4
  8. package/dist/{Dialog-Bl7F9FUP.js → Dialog-CYPAuk4r.js} +1 -1
  9. package/dist/{InputItem-DnaVpl5x.js → InputItem-msRZqamc.js} +5 -5
  10. package/dist/{Inputs-DKdKSMqz.js → Inputs-COn_OHA2.js} +1 -1
  11. package/dist/{ListBox-Ck1UjeGo.js → ListBox-CJbpH_Kh.js} +1 -1
  12. package/dist/{Menu-fXWnROTU.js → Menu-CXlFN-mb.js} +2 -2
  13. package/dist/{MenuDesktop-C3_I4fdd.js → MenuDesktop-CuQBZODp.js} +1 -1
  14. package/dist/{Modal-UhtruHmf.js → Modal-BbiLj4ai.js} +1 -1
  15. package/dist/{Modal-CSr-DYqC.js → Modal-Cerq7LEf.js} +2 -2
  16. package/dist/{Select-BEgNpIuG.js → Select-CO2ppqqL.js} +1 -1
  17. package/dist/{TextEditor-CKGUWpY_.js → TextEditor-CDv7Tf57.js} +3 -3
  18. package/dist/{TimePicker-eWZ7lIDW.js → TimePicker-BmTVdF1E.js} +2 -2
  19. package/dist/{ToastRenderer-Dpax9sKV.js → ToastContainer-2NP_Qj1a.js} +18 -3
  20. package/dist/components/action-modal.js +1 -1
  21. package/dist/components/autocomplete.js +1 -1
  22. package/dist/components/bottom-sheet.js +2 -2
  23. package/dist/components/breadcrumbs.js +1 -1
  24. package/dist/components/date-picker.js +1 -1
  25. package/dist/components/date-range-picker.js +1 -1
  26. package/dist/components/date-time-picker.js +1 -1
  27. package/dist/components/drawer.d.ts +2 -7
  28. package/dist/components/drawer.js +88 -86
  29. package/dist/components/menu.js +2 -2
  30. package/dist/components/modal.js +1 -1
  31. package/dist/components/query-select.js +1 -1
  32. package/dist/components/responsive-popover.js +1 -1
  33. package/dist/components/select.js +1 -1
  34. package/dist/components/split-button.js +1 -1
  35. package/dist/components/time-picker.js +1 -1
  36. package/dist/components/toast.js +2 -2
  37. package/dist/components/use-toast.js +2 -2
  38. package/dist/config/confirmation.js +1 -1
  39. package/dist/{confirmation.context-CD-UjjK8.js → confirmation.context-Cj2aHpa_.js} +22 -25
  40. package/dist/{datePickerValue.utils-CA2te8RG.js → datePickerValue.utils-u6REHox2.js} +1 -1
  41. package/dist/{dist-B4xyoAhc.js → dist-CTjtrOgH.js} +256 -1
  42. package/dist/index.js +14 -15
  43. package/dist/{logger-WPC6ostp.js → logger-BPhG2izn.js} +1 -1
  44. package/dist/rhf/date-picker.js +1 -1
  45. package/dist/rhf/date-range-picker.js +1 -1
  46. package/dist/rhf/date-time-picker.js +1 -1
  47. package/dist/rhf/select.js +1 -1
  48. package/dist/rhf/text-editor.js +1 -1
  49. package/dist/rhf/time-picker.js +1 -1
  50. package/dist/rhf.js +14 -15
  51. package/dist/{rolldown-runtime-B-lAHAz2.js → rolldown-runtime-DUp30N8C.js} +1 -10
  52. package/dist/{staticDateTimeSegments-BJpz4raS.js → staticDateTimeSegments-qJUUAL8d.js} +2 -2
  53. package/dist/{staticSelect.utils-D16Yq0j-.js → staticSelect.utils-CRyAMXOL.js} +3 -3
  54. package/dist/tanstack/date-picker.js +1 -1
  55. package/dist/tanstack/date-range-picker.js +1 -1
  56. package/dist/tanstack/date-time-picker.js +1 -1
  57. package/dist/tanstack/form.js +1 -1
  58. package/dist/tanstack/inputs.js +1 -1
  59. package/dist/tanstack/select.js +1 -1
  60. package/dist/tanstack/table.js +1 -1
  61. package/dist/tanstack/text-editor.js +1 -1
  62. package/dist/tanstack/time-picker.js +1 -1
  63. package/dist/tanstack.js +21 -22
  64. package/dist/text-editor.js +1 -1
  65. package/dist/{toast.runtime-CzHEhKmm.js → toast.runtime-Cl4rxGXF.js} +1 -2
  66. package/dist/{useFilter-CI4X6urj.js → useFilter-Cz_G94ya.js} +1 -1
  67. package/dist/{useFormAutosave-DrPFxGPN.js → useFormAutosave-Cj75UzUP.js} +1 -1
  68. package/dist/{useTableColumnConfig-C647gNJs.js → useTableColumnConfig-CXjUy_VP.js} +2 -2
  69. package/dist/utils/logger.js +1 -1
  70. package/package.json +1 -1
  71. package/dist/Drawer-BkPPB5DQ.js +0 -98
  72. package/dist/Toast-ZFTj3GGo.js +0 -49
  73. package/dist/ToastContainer-TRM91co1.js +0 -23
  74. package/dist/confirmation.dialog-Cveu3s5D.js +0 -16
  75. package/dist/toast.cva-BGJCi2qq.js +0 -211
@@ -1,94 +1,96 @@
1
- import { t as $de32f1b87079253c$export$2e1e1122cf0cba88 } from "../Dialog-Bl7F9FUP.js";
2
- import { Suspense, lazy, useEffect, useState } from "react";
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.lazy.tsx
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(22);
14
- let isOpen;
15
- let onOpenChange;
16
- let props;
17
- let trigger;
18
- if ($[0] !== t0) {
19
- ({isOpen, onOpenChange, trigger, ...props} = t0);
20
- $[0] = t0;
21
- $[1] = isOpen;
22
- $[2] = onOpenChange;
23
- $[3] = props;
24
- $[4] = trigger;
25
- } else {
26
- isOpen = $[1];
27
- onOpenChange = $[2];
28
- props = $[3];
29
- trigger = $[4];
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
- let t2;
35
- if ($[5] !== hasTrigger || $[6] !== isOpen) {
36
- t1 = () => {
37
- if (hasTrigger) setIsDrawerOpen(Boolean(isOpen));
38
- };
39
- t2 = [hasTrigger, isOpen];
40
- $[5] = hasTrigger;
41
- $[6] = isOpen;
42
- $[7] = t1;
43
- $[8] = t2;
44
- } else {
45
- t1 = $[7];
46
- t2 = $[8];
47
- }
48
- useEffect(t1, t2);
49
- let t3;
50
- if ($[9] !== onOpenChange) {
51
- t3 = (open) => {
52
- setIsDrawerOpen(open);
53
- onOpenChange?.(open);
54
- };
55
- $[9] = onOpenChange;
56
- $[10] = t3;
57
- } else t3 = $[10];
58
- const handleOpenChange = t3;
59
- const open_0 = trigger ? isDrawerOpen : Boolean(isOpen);
60
- let t4;
61
- if ($[11] !== handleOpenChange || $[12] !== onOpenChange || $[13] !== open_0 || $[14] !== props || $[15] !== trigger) {
62
- t4 = open_0 ? /* @__PURE__ */ jsx(Suspense, {
63
- fallback: null,
64
- children: /* @__PURE__ */ jsx(DrawerRenderer, {
65
- ...props,
66
- isOpen: true,
67
- onOpenChange: trigger ? handleOpenChange : onOpenChange
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
- }) : null;
70
- $[11] = handleOpenChange;
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, preloadDrawer };
96
+ export { Drawer };
@@ -1,3 +1,3 @@
1
- import { t as Menu } from "../Menu-fXWnROTU.js";
2
- import { r as MenuItem } from "../MenuDesktop-C3_I4fdd.js";
1
+ import { t as Menu } from "../Menu-CXlFN-mb.js";
2
+ import { r as MenuItem } from "../MenuDesktop-CuQBZODp.js";
3
3
  export { Menu, MenuItem };
@@ -1,2 +1,2 @@
1
- import { t as Modal } from "../Modal-CSr-DYqC.js";
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-BEgNpIuG.js";
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-Bl7F9FUP.js";
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-BEgNpIuG.js";
1
+ import { t as Select } from "../Select-CO2ppqqL.js";
2
2
  export { Select };
@@ -1,4 +1,4 @@
1
- import { t as Menu } from "../Menu-fXWnROTU.js";
1
+ import { t as Menu } from "../Menu-CXlFN-mb.js";
2
2
  import { t as ChevronDown } from "../chevron-down-Ciz9yP9R.js";
3
3
  import { t as clsx } from "../clsx-CnD0nOiA.js";
4
4
  import { t as Button } from "../Button-D9J5wkMv.js";
@@ -1,2 +1,2 @@
1
- import { t as TimePicker } from "../TimePicker-eWZ7lIDW.js";
1
+ import { t as TimePicker } from "../TimePicker-BmTVdF1E.js";
2
2
  export { TimePicker };
@@ -1,3 +1,3 @@
1
- import { t as Toast } from "../Toast-ZFTj3GGo.js";
2
- import { n as ToastProvider, t as ToastContainer } from "../ToastContainer-TRM91co1.js";
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-CzHEhKmm.js").then(({ showToast }) => showToast(id, color, params, options));
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-CzHEhKmm.js").then(({ dismissToast }) => dismissToast(id));
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-CD-UjjK8.js";
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 { Suspense, createContext, lazy, use, useRef, useState } from "react";
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(Suspense, {
64
- fallback: null,
65
- children: /* @__PURE__ */ jsx(ConfirmationDialog, {
66
- heading: activeRequest.input.heading,
67
- description: activeRequest.input.description,
68
- buttonSize: activeRequest.input.buttonSize,
69
- textAlign: activeRequest.input.textAlign,
70
- modalClassName: activeRequest.input.modalClassName,
71
- isOpen: true,
72
- onClose: () => settle(false),
73
- primaryAction: {
74
- label: activeRequest.input.confirmLabel ?? "",
75
- variant: activeRequest.input.confirmVariant,
76
- color: activeRequest.input.confirmColor,
77
- onPress: () => settle(true)
78
- },
79
- secondaryAction: {
80
- label: activeRequest.input.cancelLabel ?? "",
81
- variant: activeRequest.input.cancelVariant,
82
- color: activeRequest.input.cancelColor,
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-BJpz4raS.js";
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 };