@konstructio/ui 0.1.2-alpha.74 → 0.1.2-alpha.76

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 (193) hide show
  1. package/dist/{Modal-CXRo8f-h.js → Modal-BTOXCb0Y.js} +1 -1
  2. package/dist/assets/icons/components/Home2.d.ts +3 -0
  3. package/dist/assets/icons/components/Home2.js +28 -0
  4. package/dist/assets/icons/components/Upload.d.ts +3 -0
  5. package/dist/assets/icons/components/Upload.js +28 -0
  6. package/dist/assets/icons/components/index.d.ts +2 -0
  7. package/dist/assets/icons/components/index.js +70 -66
  8. package/dist/assets/icons/index.js +70 -66
  9. package/dist/components/Alert/Alert.d.ts +2 -2
  10. package/dist/components/Alert/Alert.types.d.ts +3 -1
  11. package/dist/components/AlertDialog/AlertDialog.d.ts +2 -2
  12. package/dist/components/AlertDialog/AlertDialog.js +1 -1
  13. package/dist/components/AlertDialog/AlertDialog.types.d.ts +5 -3
  14. package/dist/components/AlertDialog/components/AlertDialogTrigger.d.ts +2 -2
  15. package/dist/components/AlertDialog/components/AlertDialogTrigger.js +1 -1
  16. package/dist/components/AlertDialog/components/AlertDialogTrigger.types.d.ts +4 -2
  17. package/dist/components/AlertDialog/components/index.js +1 -1
  18. package/dist/components/Autocomplete/Autocomplete.d.ts +2 -2
  19. package/dist/components/Autocomplete/Autocomplete.types.d.ts +3 -1
  20. package/dist/components/Badge/Badge.d.ts +2 -2
  21. package/dist/components/Badge/Badge.types.d.ts +3 -1
  22. package/dist/components/Breadcrumb/Breadcrumb.d.ts +2 -2
  23. package/dist/components/Breadcrumb/Breadcrumb.types.d.ts +3 -1
  24. package/dist/components/Breadcrumb/components/Item/Item.d.ts +2 -2
  25. package/dist/components/Breadcrumb/components/Item/Item.types.d.ts +3 -1
  26. package/dist/components/Button/Button.d.ts +2 -2
  27. package/dist/components/Button/Button.types.d.ts +3 -1
  28. package/dist/components/Button/Button.variants.js +4 -5
  29. package/dist/components/ButtonGroup/ButtonGroup.js +1 -1
  30. package/dist/components/ButtonGroup/components/ButtonGroupItem/ButtonGroupItem.js +1 -1
  31. package/dist/components/Card/Card.d.ts +2 -2
  32. package/dist/components/Card/Card.types.d.ts +3 -1
  33. package/dist/components/Checkbox/Checkbox.d.ts +2 -2
  34. package/dist/components/Checkbox/Checkbox.types.d.ts +3 -1
  35. package/dist/components/Command/Command.d.ts +2 -2
  36. package/dist/components/Command/Command.js +2 -2
  37. package/dist/components/Command/Command.types.d.ts +3 -1
  38. package/dist/components/Command/components/Command.js +1 -1
  39. package/dist/components/Command/components/CommandEmpty.js +1 -1
  40. package/dist/components/Command/components/CommandGroup.js +1 -1
  41. package/dist/components/Command/components/CommandInput.js +1 -1
  42. package/dist/components/Command/components/CommandItem.js +1 -1
  43. package/dist/components/Command/components/CommandList.js +1 -1
  44. package/dist/components/Command/components/CommandSeparator.js +1 -1
  45. package/dist/components/Command/components/DialogContent.js +1 -1
  46. package/dist/components/Command/components/DialogOverlay.js +1 -1
  47. package/dist/components/Counter/Counter.d.ts +2 -2
  48. package/dist/components/Counter/Counter.types.d.ts +3 -1
  49. package/dist/components/DateRangePicker/DateRangePicker.d.ts +2 -2
  50. package/dist/components/DateRangePicker/DateRangePicker.types.d.ts +3 -1
  51. package/dist/components/DateRangePicker/components/CalendarPanel/components/IndependentModeCalendar/IndependentModeCalendar.js +1 -1
  52. package/dist/components/DateRangePicker/components/CalendarPanel/components/TogetherModeCalendar/TogetherModeCalendar.js +1 -1
  53. package/dist/components/Datepicker/DatePicker.d.ts +2 -2
  54. package/dist/components/Datepicker/DatePicker.types.d.ts +3 -1
  55. package/dist/components/Filter/Filter.js +24 -22
  56. package/dist/components/Filter/Filter.types.d.ts +13 -3
  57. package/dist/components/Filter/components/BadgeDropdown/BadgeMultiSelect.hook.d.ts +3 -1
  58. package/dist/components/Filter/components/BadgeDropdown/BadgeMultiSelect.hook.js +57 -41
  59. package/dist/components/Filter/components/BadgeDropdown/BadgeMultiSelect.js +75 -49
  60. package/dist/components/Filter/components/BadgeDropdown/BadgeMultiSelect.types.d.ts +2 -0
  61. package/dist/components/Filter/components/DateFilterDropdown/DateFilterDropdown.hook.js +38 -37
  62. package/dist/components/Filter/components/DateRangeFilterDropdown/DateRangeFilterDropdown.hook.js +31 -30
  63. package/dist/components/Filter/components/ResetButton/ResetButton.types.d.ts +1 -1
  64. package/dist/components/Filter/components/TextMultiSelect/TextMultiSelect.js +64 -47
  65. package/dist/components/Filter/components/TextMultiSelect/TextMultiSelect.types.d.ts +2 -0
  66. package/dist/components/Filter/components/TimeFilterDropdown/TimeFilterDropdown.hook.js +35 -34
  67. package/dist/components/Filter/contexts/filter.context.d.ts +4 -0
  68. package/dist/components/Filter/contexts/filter.context.js +7 -0
  69. package/dist/components/Filter/contexts/filter.hook.d.ts +2 -0
  70. package/dist/components/Filter/contexts/filter.hook.js +11 -0
  71. package/dist/components/Filter/contexts/filter.provider.d.ts +5 -0
  72. package/dist/components/Filter/contexts/filter.provider.js +6 -0
  73. package/dist/components/Filter/contexts/index.d.ts +3 -0
  74. package/dist/components/Filter/contexts/index.js +8 -0
  75. package/dist/components/ImageUpload/ImageUpload.d.ts +2 -2
  76. package/dist/components/ImageUpload/ImageUpload.types.d.ts +3 -1
  77. package/dist/components/Input/Input.d.ts +2 -2
  78. package/dist/components/Input/Input.types.d.ts +3 -1
  79. package/dist/components/LineChart/LineChart.d.ts +2 -2
  80. package/dist/components/LineChart/LineChart.js +55 -52
  81. package/dist/components/LineChart/LineChart.types.d.ts +6 -2
  82. package/dist/components/Loading/Loading.d.ts +2 -2
  83. package/dist/components/Loading/Loading.types.d.ts +3 -1
  84. package/dist/components/Modal/Modal.js +1 -1
  85. package/dist/components/Modal/components/Wrapper/Wrapper.js +2 -2
  86. package/dist/components/Modal/components/index.js +1 -1
  87. package/dist/components/MultiSelectDropdown/MultiSelectDropdown.d.ts +2 -2
  88. package/dist/components/MultiSelectDropdown/MultiSelectDropdown.types.d.ts +3 -1
  89. package/dist/components/MultiSelectDropdown/components/Wrapper/Wrapper.types.d.ts +1 -1
  90. package/dist/components/PhoneNumberInput/components/FlagSelectorList/FlagSelectorList.js +394 -353
  91. package/dist/components/PhoneNumberInput/components/TruncateText/TruncateText.js +1 -1
  92. package/dist/components/ProgressBar/ProgressBar.d.ts +2 -2
  93. package/dist/components/ProgressBar/ProgressBar.types.d.ts +3 -1
  94. package/dist/components/Radio/Radio.d.ts +2 -2
  95. package/dist/components/Radio/Radio.types.d.ts +3 -1
  96. package/dist/components/RadioCard/RadioCard.d.ts +2 -2
  97. package/dist/components/RadioCard/RadioCard.types.d.ts +5 -3
  98. package/dist/components/RadioCardGroup/RadioCardGroup.d.ts +2 -2
  99. package/dist/components/RadioCardGroup/RadioCardGroup.types.d.ts +4 -2
  100. package/dist/components/RadioGroup/RadioGroup.d.ts +2 -2
  101. package/dist/components/RadioGroup/RadioGroup.types.d.ts +4 -2
  102. package/dist/components/Range/Range.d.ts +2 -2
  103. package/dist/components/Range/Range.types.d.ts +3 -1
  104. package/dist/components/Select/Select.d.ts +2 -2
  105. package/dist/components/Select/Select.types.d.ts +4 -1
  106. package/dist/components/Select/Select.variants.js +1 -1
  107. package/dist/components/Select/components/AdditionalOptions/AdditionalOptions.types.d.ts +1 -1
  108. package/dist/components/Select/components/List/List.js +64 -61
  109. package/dist/components/Select/components/List/List.types.d.ts +2 -1
  110. package/dist/components/Select/components/Wrapper.js +46 -44
  111. package/dist/components/Select/constants/index.d.ts +1 -0
  112. package/dist/components/Select/constants/index.js +3 -1
  113. package/dist/components/Select/constants/list.d.ts +1 -0
  114. package/dist/components/Select/constants/list.js +4 -0
  115. package/dist/components/Sidebar/Sidebar.d.ts +1 -1
  116. package/dist/components/Sidebar/Sidebar.types.d.ts +3 -1
  117. package/dist/components/Sidebar/components/Footer/Footer.d.ts +2 -2
  118. package/dist/components/Sidebar/components/Footer/Footer.types.d.ts +3 -1
  119. package/dist/components/Sidebar/components/Logo/Logo.d.ts +2 -2
  120. package/dist/components/Sidebar/components/Logo/Logo.types.d.ts +3 -1
  121. package/dist/components/Sidebar/components/Navigation/Navigation.d.ts +2 -2
  122. package/dist/components/Sidebar/components/Navigation/Navigation.types.d.ts +7 -5
  123. package/dist/components/Sidebar/components/NavigationGroup/NavigationGroup.d.ts +2 -2
  124. package/dist/components/Sidebar/components/NavigationGroup/NavigationGroup.types.d.ts +3 -1
  125. package/dist/components/Sidebar/components/NavigationOption/NavigationOption.d.ts +2 -2
  126. package/dist/components/Sidebar/components/NavigationOption/NavigationOption.types.d.ts +3 -1
  127. package/dist/components/Sidebar/components/NavigationSeparator/NavigationSeparator.d.ts +2 -2
  128. package/dist/components/Sidebar/components/NavigationSeparator/NavigationSeparator.types.d.ts +3 -1
  129. package/dist/components/Sidebar/components/NavigationTitle/NavigationTitle.d.ts +2 -2
  130. package/dist/components/Sidebar/components/NavigationTitle/NavigationTitle.js +1 -5
  131. package/dist/components/Sidebar/components/NavigationTitle/NavigationTitle.types.d.ts +3 -1
  132. package/dist/components/Sidebar/components/index.d.ts +7 -7
  133. package/dist/components/Slider/Slider.d.ts +2 -2
  134. package/dist/components/Slider/Slider.types.d.ts +3 -1
  135. package/dist/components/Spinner/Spinner.d.ts +2 -2
  136. package/dist/components/Spinner/Spinner.types.d.ts +4 -2
  137. package/dist/components/Stepper/Stepper.d.ts +2 -2
  138. package/dist/components/Stepper/Stepper.types.d.ts +3 -1
  139. package/dist/components/Switch/Switch.d.ts +2 -2
  140. package/dist/components/Switch/Switch.types.d.ts +3 -1
  141. package/dist/components/Table/Table.types.d.ts +3 -1
  142. package/dist/components/Tabs/Tabs.d.ts +1 -1
  143. package/dist/components/Tabs/Tabs.types.d.ts +3 -1
  144. package/dist/components/Tag/Tag.d.ts +2 -2
  145. package/dist/components/Tag/Tag.types.d.ts +3 -1
  146. package/dist/components/TagSelect/TagSelect.d.ts +2 -2
  147. package/dist/components/TagSelect/TagSelect.js +3 -1
  148. package/dist/components/TagSelect/TagSelect.types.d.ts +4 -2
  149. package/dist/components/TagSelect/components/Item/Item.types.d.ts +1 -1
  150. package/dist/components/TagSelect/components/Wrapper/Wrapper.types.d.ts +1 -1
  151. package/dist/components/TagSelect/contexts/TagSelect.types.d.ts +1 -1
  152. package/dist/components/TextArea/TextArea.d.ts +2 -2
  153. package/dist/components/TextArea/TextArea.types.d.ts +3 -1
  154. package/dist/components/TimePicker/TimePicker.d.ts +2 -2
  155. package/dist/components/TimePicker/TimePicker.types.d.ts +3 -1
  156. package/dist/components/TimePicker/components/HoursList/HoursList.types.d.ts +1 -1
  157. package/dist/components/TimePicker/components/MeridianList/MeridianList.types.d.ts +1 -1
  158. package/dist/components/TimePicker/components/MinutesList/MinutesList.types.d.ts +1 -1
  159. package/dist/components/TimePicker/components/Wrapper/Wrapper.types.d.ts +1 -1
  160. package/dist/components/TimePicker/components/WrapperList/WrapperList.types.d.ts +1 -1
  161. package/dist/components/Toast/Toast.d.ts +2 -2
  162. package/dist/components/Toast/Toast.js +191 -184
  163. package/dist/components/Toast/Toast.types.d.ts +3 -1
  164. package/dist/components/Toast/Toast.variants.js +6 -12
  165. package/dist/components/Tooltip/Tooltip.d.ts +2 -2
  166. package/dist/components/Tooltip/Tooltip.js +20 -20
  167. package/dist/components/Tooltip/Tooltip.types.d.ts +3 -1
  168. package/dist/components/Typography/Typography.d.ts +2 -2
  169. package/dist/components/Typography/Typography.types.d.ts +3 -1
  170. package/dist/components/VirtualizedTable/VirtualizedTable.js +57 -55
  171. package/dist/components/VirtualizedTable/VirtualizedTable.types.d.ts +3 -1
  172. package/dist/components/VirtualizedTable/components/Filter/Filter.js +55 -54
  173. package/dist/components/VirtualizedTable/components/Filter/Filter.types.d.ts +1 -0
  174. package/dist/components/VirtualizedTable/components/TruncateText/TruncateText.d.ts +1 -1
  175. package/dist/components/VirtualizedTable/components/TruncateText/TruncateText.js +55 -26
  176. package/dist/components/VirtualizedTable/components/TruncateText/TruncateText.types.d.ts +4 -1
  177. package/dist/components/index.d.ts +2 -0
  178. package/dist/components/index.js +1 -1
  179. package/dist/icons.d.ts +1 -1
  180. package/dist/icons.js +70 -66
  181. package/dist/index-BvEpLnOv.js +144 -0
  182. package/dist/{index-Dd_ZmIqU.js → index-C7zAY3xv.js} +1 -1
  183. package/dist/{index-Dfq4O3b4.js → index-CrCTywU1.js} +1 -1
  184. package/dist/{index-9a-FL_6D.js → index-DWyM654o.js} +41 -42
  185. package/dist/{index-B7-5g1Sm.js → index-mPinF0Ho.js} +407 -401
  186. package/dist/index.js +1 -1
  187. package/dist/package.json +10 -10
  188. package/dist/proxy-BvdTb_6B.js +4974 -0
  189. package/dist/styles.css +1 -1
  190. package/package.json +10 -10
  191. package/dist/index-CESXsoMn.js +0 -14
  192. package/dist/index-URQGEGX7.js +0 -136
  193. package/dist/proxy-0sbyKj-k.js +0 -4946
@@ -1,20 +1,22 @@
1
- import { jsx as i, jsxs as A, Fragment as ae } from "react/jsx-runtime";
1
+ import { jsx as s, jsxs as I, Fragment as ie } from "react/jsx-runtime";
2
2
  import { S as B } from "../../index-BvoZGpli.js";
3
3
  import * as n from "react";
4
- import { useRef as xe, useEffect as be, useMemo as re, isValidElement as ne, useCallback as ge } from "react";
5
- import * as Se from "react-dom";
6
- import { P as D, a as Ne, c as x, b as Ie, d as Ae, u as De } from "../../index--l0zux8V.js";
7
- import { u as ie } from "../../index-DLcqcWxM.js";
8
- import { c as _e } from "../../index-CJnS4BVW.js";
9
- import { B as Fe, R as Le } from "../../index-URQGEGX7.js";
10
- import { P as Me } from "../../index-CESXsoMn.js";
4
+ import { useRef as be, useEffect as ge, useMemo as ne, isValidElement as j, useCallback as Se } from "react";
5
+ import * as Ne from "react-dom";
6
+ import { P as D, a as Ie, c as b, b as Ae, d as De, u as _e } from "../../index--l0zux8V.js";
7
+ import { u as ce } from "../../index-DLcqcWxM.js";
8
+ import { c as Fe } from "../../index-CJnS4BVW.js";
9
+ import { B as Le, R as Me, P as ke } from "../../index-BvEpLnOv.js";
11
10
  import { P as Oe } from "../../index-3fEdeexs.js";
12
- import { u as X } from "../../index-0ioNhtNM.js";
13
- import { R as ke } from "../../index-BKjcReYh.js";
14
- import { cn as j } from "../../utils/index.js";
15
- import { closeToastVariants as Ve, toastVariants as Ke, viewportToastVariants as He } from "./Toast.variants.js";
16
- import { X as We } from "../../x-Eoa9FJjA.js";
17
- var Ue = Object.freeze({
11
+ import { u as Y } from "../../index-0ioNhtNM.js";
12
+ import { R as Ve } from "../../index-BKjcReYh.js";
13
+ import { cn as U } from "../../utils/index.js";
14
+ import { closeToastVariants as Ke, toastVariants as He, viewportToastVariants as We } from "./Toast.variants.js";
15
+ import { CheckCircleFilledIcon as Ue } from "../../assets/icons/components/CheckCircleFilled.js";
16
+ import { ErrorIcon as Xe } from "../../assets/icons/components/Error.js";
17
+ import { WarningTriangleIcon as Ye } from "../../assets/icons/components/WarningTriangle.js";
18
+ import { X as $e } from "../../x-Eoa9FJjA.js";
19
+ var ze = Object.freeze({
18
20
  // See: https://github.com/twbs/bootstrap/blob/main/scss/mixins/_visually-hidden.scss
19
21
  position: "absolute",
20
22
  border: 0,
@@ -26,18 +28,18 @@ var Ue = Object.freeze({
26
28
  clip: "rect(0, 0, 0, 0)",
27
29
  whiteSpace: "nowrap",
28
30
  wordWrap: "normal"
29
- }), Xe = "VisuallyHidden", Q = n.forwardRef(
30
- (e, o) => /* @__PURE__ */ i(
31
+ }), Be = "VisuallyHidden", Z = n.forwardRef(
32
+ (e, o) => /* @__PURE__ */ s(
31
33
  D.span,
32
34
  {
33
35
  ...e,
34
36
  ref: o,
35
- style: { ...Ue, ...e.style }
37
+ style: { ...ze, ...e.style }
36
38
  }
37
39
  )
38
40
  );
39
- Q.displayName = Xe;
40
- var Z = "ToastProvider", [ee, Ye, $e] = _e("Toast"), [ce] = Ie("Toast", [$e]), [Be, Y] = ce(Z), ue = (e) => {
41
+ Z.displayName = Be;
42
+ var ee = "ToastProvider", [te, je, qe] = Fe("Toast"), [ue] = Ae("Toast", [qe]), [Ge, $] = ue(ee), le = (e) => {
41
43
  const {
42
44
  __scopeToast: o,
43
45
  label: r = "Notification",
@@ -45,11 +47,11 @@ var Z = "ToastProvider", [ee, Ye, $e] = _e("Toast"), [ce] = Ie("Toast", [$e]), [
45
47
  swipeDirection: u = "right",
46
48
  swipeThreshold: d = 50,
47
49
  children: f
48
- } = e, [w, v] = n.useState(null), [c, E] = n.useState(0), T = n.useRef(!1), N = n.useRef(!1);
50
+ } = e, [w, v] = n.useState(null), [c, E] = n.useState(0), T = n.useRef(!1), x = n.useRef(!1);
49
51
  return r.trim() || console.error(
50
- `Invalid prop \`label\` supplied to \`${Z}\`. Expected non-empty \`string\`.`
51
- ), /* @__PURE__ */ i(ee.Provider, { scope: o, children: /* @__PURE__ */ i(
52
- Be,
52
+ `Invalid prop \`label\` supplied to \`${ee}\`. Expected non-empty \`string\`.`
53
+ ), /* @__PURE__ */ s(te.Provider, { scope: o, children: /* @__PURE__ */ s(
54
+ Ge,
53
55
  {
54
56
  scope: o,
55
57
  label: r,
@@ -62,106 +64,106 @@ var Z = "ToastProvider", [ee, Ye, $e] = _e("Toast"), [ce] = Ie("Toast", [$e]), [
62
64
  onToastAdd: n.useCallback(() => E((R) => R + 1), []),
63
65
  onToastRemove: n.useCallback(() => E((R) => R - 1), []),
64
66
  isFocusedToastEscapeKeyDownRef: T,
65
- isClosePausedRef: N,
67
+ isClosePausedRef: x,
66
68
  children: f
67
69
  }
68
70
  ) });
69
71
  };
70
- ue.displayName = Z;
71
- var le = "ToastViewport", je = ["F8"], z = "toast.viewportPause", G = "toast.viewportResume", de = n.forwardRef(
72
+ le.displayName = ee;
73
+ var de = "ToastViewport", Je = ["F8"], G = "toast.viewportPause", J = "toast.viewportResume", fe = n.forwardRef(
72
74
  (e, o) => {
73
75
  const {
74
76
  __scopeToast: r,
75
- hotkey: t = je,
77
+ hotkey: t = Je,
76
78
  label: u = "Notifications ({hotkey})",
77
79
  ...d
78
- } = e, f = Y(le, r), w = Ye(r), v = n.useRef(null), c = n.useRef(null), E = n.useRef(null), T = n.useRef(null), N = ie(o, T, f.onViewportChange), R = t.join("+").replace(/Key/g, "").replace(/Digit/g, ""), b = f.toastCount > 0;
80
+ } = e, f = $(de, r), w = je(r), v = n.useRef(null), c = n.useRef(null), E = n.useRef(null), T = n.useRef(null), x = ce(o, T, f.onViewportChange), R = t.join("+").replace(/Key/g, "").replace(/Digit/g, ""), g = f.toastCount > 0;
79
81
  n.useEffect(() => {
80
- const s = (h) => {
81
- t.length !== 0 && t.every((m) => h[m] || h.code === m) && T.current?.focus();
82
+ const a = (y) => {
83
+ t.length !== 0 && t.every((m) => y[m] || y.code === m) && T.current?.focus();
82
84
  };
83
- return document.addEventListener("keydown", s), () => document.removeEventListener("keydown", s);
85
+ return document.addEventListener("keydown", a), () => document.removeEventListener("keydown", a);
84
86
  }, [t]), n.useEffect(() => {
85
- const s = v.current, h = T.current;
86
- if (b && s && h) {
87
+ const a = v.current, y = T.current;
88
+ if (g && a && y) {
87
89
  const p = () => {
88
90
  if (!f.isClosePausedRef.current) {
89
- const y = new CustomEvent(z);
90
- h.dispatchEvent(y), f.isClosePausedRef.current = !0;
91
+ const h = new CustomEvent(G);
92
+ y.dispatchEvent(h), f.isClosePausedRef.current = !0;
91
93
  }
92
94
  }, m = () => {
93
95
  if (f.isClosePausedRef.current) {
94
- const y = new CustomEvent(G);
95
- h.dispatchEvent(y), f.isClosePausedRef.current = !1;
96
+ const h = new CustomEvent(J);
97
+ y.dispatchEvent(h), f.isClosePausedRef.current = !1;
96
98
  }
97
- }, P = (y) => {
98
- !s.contains(y.relatedTarget) && m();
99
+ }, P = (h) => {
100
+ !a.contains(h.relatedTarget) && m();
99
101
  }, C = () => {
100
- s.contains(document.activeElement) || m();
102
+ a.contains(document.activeElement) || m();
101
103
  };
102
- return s.addEventListener("focusin", p), s.addEventListener("focusout", P), s.addEventListener("pointermove", p), s.addEventListener("pointerleave", C), window.addEventListener("blur", p), window.addEventListener("focus", m), () => {
103
- s.removeEventListener("focusin", p), s.removeEventListener("focusout", P), s.removeEventListener("pointermove", p), s.removeEventListener("pointerleave", C), window.removeEventListener("blur", p), window.removeEventListener("focus", m);
104
+ return a.addEventListener("focusin", p), a.addEventListener("focusout", P), a.addEventListener("pointermove", p), a.addEventListener("pointerleave", C), window.addEventListener("blur", p), window.addEventListener("focus", m), () => {
105
+ a.removeEventListener("focusin", p), a.removeEventListener("focusout", P), a.removeEventListener("pointermove", p), a.removeEventListener("pointerleave", C), window.removeEventListener("blur", p), window.removeEventListener("focus", m);
104
106
  };
105
107
  }
106
- }, [b, f.isClosePausedRef]);
108
+ }, [g, f.isClosePausedRef]);
107
109
  const l = n.useCallback(
108
- ({ tabbingDirection: s }) => {
110
+ ({ tabbingDirection: a }) => {
109
111
  const p = w().map((m) => {
110
- const P = m.ref.current, C = [P, ...at(P)];
111
- return s === "forwards" ? C : C.reverse();
112
+ const P = m.ref.current, C = [P, ...lt(P)];
113
+ return a === "forwards" ? C : C.reverse();
112
114
  });
113
- return (s === "forwards" ? p.reverse() : p).flat();
115
+ return (a === "forwards" ? p.reverse() : p).flat();
114
116
  },
115
117
  [w]
116
118
  );
117
119
  return n.useEffect(() => {
118
- const s = T.current;
119
- if (s) {
120
- const h = (p) => {
120
+ const a = T.current;
121
+ if (a) {
122
+ const y = (p) => {
121
123
  const m = p.altKey || p.ctrlKey || p.metaKey;
122
124
  if (p.key === "Tab" && !m) {
123
- const C = document.activeElement, y = p.shiftKey;
124
- if (p.target === s && y) {
125
+ const C = document.activeElement, h = p.shiftKey;
126
+ if (p.target === a && h) {
125
127
  c.current?.focus();
126
128
  return;
127
129
  }
128
- const F = l({ tabbingDirection: y ? "backwards" : "forwards" }), V = F.findIndex((I) => I === C);
129
- q(F.slice(V + 1)) ? p.preventDefault() : y ? c.current?.focus() : E.current?.focus();
130
+ const F = l({ tabbingDirection: h ? "backwards" : "forwards" }), V = F.findIndex((A) => A === C);
131
+ q(F.slice(V + 1)) ? p.preventDefault() : h ? c.current?.focus() : E.current?.focus();
130
132
  }
131
133
  };
132
- return s.addEventListener("keydown", h), () => s.removeEventListener("keydown", h);
134
+ return a.addEventListener("keydown", y), () => a.removeEventListener("keydown", y);
133
135
  }
134
- }, [w, l]), /* @__PURE__ */ A(
135
- Fe,
136
+ }, [w, l]), /* @__PURE__ */ I(
137
+ Le,
136
138
  {
137
139
  ref: v,
138
140
  role: "region",
139
141
  "aria-label": u.replace("{hotkey}", R),
140
142
  tabIndex: -1,
141
- style: { pointerEvents: b ? void 0 : "none" },
143
+ style: { pointerEvents: g ? void 0 : "none" },
142
144
  children: [
143
- b && /* @__PURE__ */ i(
144
- J,
145
+ g && /* @__PURE__ */ s(
146
+ Q,
145
147
  {
146
148
  ref: c,
147
149
  onFocusFromOutsideViewport: () => {
148
- const s = l({
150
+ const a = l({
149
151
  tabbingDirection: "forwards"
150
152
  });
151
- q(s);
153
+ q(a);
152
154
  }
153
155
  }
154
156
  ),
155
- /* @__PURE__ */ i(ee.Slot, { scope: r, children: /* @__PURE__ */ i(D.ol, { tabIndex: -1, ...d, ref: N }) }),
156
- b && /* @__PURE__ */ i(
157
- J,
157
+ /* @__PURE__ */ s(te.Slot, { scope: r, children: /* @__PURE__ */ s(D.ol, { tabIndex: -1, ...d, ref: x }) }),
158
+ g && /* @__PURE__ */ s(
159
+ Q,
158
160
  {
159
161
  ref: E,
160
162
  onFocusFromOutsideViewport: () => {
161
- const s = l({
163
+ const a = l({
162
164
  tabbingDirection: "backwards"
163
165
  });
164
- q(s);
166
+ q(a);
165
167
  }
166
168
  }
167
169
  )
@@ -170,12 +172,12 @@ var le = "ToastViewport", je = ["F8"], z = "toast.viewportPause", G = "toast.vie
170
172
  );
171
173
  }
172
174
  );
173
- de.displayName = le;
174
- var fe = "ToastFocusProxy", J = n.forwardRef(
175
+ fe.displayName = de;
176
+ var pe = "ToastFocusProxy", Q = n.forwardRef(
175
177
  (e, o) => {
176
- const { __scopeToast: r, onFocusFromOutsideViewport: t, ...u } = e, d = Y(fe, r);
177
- return /* @__PURE__ */ i(
178
- Q,
178
+ const { __scopeToast: r, onFocusFromOutsideViewport: t, ...u } = e, d = $(pe, r);
179
+ return /* @__PURE__ */ s(
180
+ Z,
179
181
  {
180
182
  tabIndex: 0,
181
183
  ...u,
@@ -189,35 +191,35 @@ var fe = "ToastFocusProxy", J = n.forwardRef(
189
191
  );
190
192
  }
191
193
  );
192
- J.displayName = fe;
193
- var O = "Toast", qe = "toast.swipeStart", ze = "toast.swipeMove", Ge = "toast.swipeCancel", Je = "toast.swipeEnd", pe = n.forwardRef(
194
+ Q.displayName = pe;
195
+ var k = "Toast", Qe = "toast.swipeStart", Ze = "toast.swipeMove", et = "toast.swipeCancel", tt = "toast.swipeEnd", me = n.forwardRef(
194
196
  (e, o) => {
195
- const { forceMount: r, open: t, defaultOpen: u, onOpenChange: d, ...f } = e, [w, v] = Ne({
197
+ const { forceMount: r, open: t, defaultOpen: u, onOpenChange: d, ...f } = e, [w, v] = Ie({
196
198
  prop: t,
197
199
  defaultProp: u ?? !0,
198
200
  onChange: d,
199
- caller: O
201
+ caller: k
200
202
  });
201
- return /* @__PURE__ */ i(Oe, { present: r || w, children: /* @__PURE__ */ i(
202
- et,
203
+ return /* @__PURE__ */ s(Oe, { present: r || w, children: /* @__PURE__ */ s(
204
+ nt,
203
205
  {
204
206
  open: w,
205
207
  ...f,
206
208
  ref: o,
207
209
  onClose: () => v(!1),
208
- onPause: X(e.onPause),
209
- onResume: X(e.onResume),
210
- onSwipeStart: x(e.onSwipeStart, (c) => {
210
+ onPause: Y(e.onPause),
211
+ onResume: Y(e.onResume),
212
+ onSwipeStart: b(e.onSwipeStart, (c) => {
211
213
  c.currentTarget.setAttribute("data-swipe", "start");
212
214
  }),
213
- onSwipeMove: x(e.onSwipeMove, (c) => {
215
+ onSwipeMove: b(e.onSwipeMove, (c) => {
214
216
  const { x: E, y: T } = c.detail.delta;
215
217
  c.currentTarget.setAttribute("data-swipe", "move"), c.currentTarget.style.setProperty("--radix-toast-swipe-move-x", `${E}px`), c.currentTarget.style.setProperty("--radix-toast-swipe-move-y", `${T}px`);
216
218
  }),
217
- onSwipeCancel: x(e.onSwipeCancel, (c) => {
219
+ onSwipeCancel: b(e.onSwipeCancel, (c) => {
218
220
  c.currentTarget.setAttribute("data-swipe", "cancel"), c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"), c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"), c.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"), c.currentTarget.style.removeProperty("--radix-toast-swipe-end-y");
219
221
  }),
220
- onSwipeEnd: x(e.onSwipeEnd, (c) => {
222
+ onSwipeEnd: b(e.onSwipeEnd, (c) => {
221
223
  const { x: E, y: T } = c.detail.delta;
222
224
  c.currentTarget.setAttribute("data-swipe", "end"), c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"), c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"), c.currentTarget.style.setProperty("--radix-toast-swipe-end-x", `${E}px`), c.currentTarget.style.setProperty("--radix-toast-swipe-end-y", `${T}px`), v(!1);
223
225
  })
@@ -225,11 +227,11 @@ var O = "Toast", qe = "toast.swipeStart", ze = "toast.swipeMove", Ge = "toast.sw
225
227
  ) });
226
228
  }
227
229
  );
228
- pe.displayName = O;
229
- var [Qe, Ze] = ce(O, {
230
+ me.displayName = k;
231
+ var [ot, rt] = ue(k, {
230
232
  onClose() {
231
233
  }
232
- }), et = n.forwardRef(
234
+ }), nt = n.forwardRef(
233
235
  (e, o) => {
234
236
  const {
235
237
  __scopeToast: r,
@@ -242,85 +244,85 @@ var [Qe, Ze] = ce(O, {
242
244
  onResume: c,
243
245
  onSwipeStart: E,
244
246
  onSwipeMove: T,
245
- onSwipeCancel: N,
247
+ onSwipeCancel: x,
246
248
  onSwipeEnd: R,
247
- ...b
248
- } = e, l = Y(O, r), [s, h] = n.useState(null), p = ie(o, (a) => h(a)), m = n.useRef(null), P = n.useRef(null), C = u || l.duration, y = n.useRef(0), _ = n.useRef(C), k = n.useRef(0), { onToastAdd: F, onToastRemove: V } = l, I = X(() => {
249
- s?.contains(document.activeElement) && l.viewport?.focus(), f();
249
+ ...g
250
+ } = e, l = $(k, r), [a, y] = n.useState(null), p = ce(o, (i) => y(i)), m = n.useRef(null), P = n.useRef(null), C = u || l.duration, h = n.useRef(0), _ = n.useRef(C), O = n.useRef(0), { onToastAdd: F, onToastRemove: V } = l, A = Y(() => {
251
+ a?.contains(document.activeElement) && l.viewport?.focus(), f();
250
252
  }), K = n.useCallback(
251
- (a) => {
252
- !a || a === 1 / 0 || (window.clearTimeout(k.current), y.current = (/* @__PURE__ */ new Date()).getTime(), k.current = window.setTimeout(I, a));
253
+ (i) => {
254
+ !i || i === 1 / 0 || (window.clearTimeout(O.current), h.current = (/* @__PURE__ */ new Date()).getTime(), O.current = window.setTimeout(A, i));
253
255
  },
254
- [I]
256
+ [A]
255
257
  );
256
258
  n.useEffect(() => {
257
- const a = l.viewport;
258
- if (a) {
259
- const g = () => {
259
+ const i = l.viewport;
260
+ if (i) {
261
+ const S = () => {
260
262
  K(_.current), c?.();
261
- }, S = () => {
262
- const L = (/* @__PURE__ */ new Date()).getTime() - y.current;
263
- _.current = _.current - L, window.clearTimeout(k.current), v?.();
263
+ }, N = () => {
264
+ const L = (/* @__PURE__ */ new Date()).getTime() - h.current;
265
+ _.current = _.current - L, window.clearTimeout(O.current), v?.();
264
266
  };
265
- return a.addEventListener(z, S), a.addEventListener(G, g), () => {
266
- a.removeEventListener(z, S), a.removeEventListener(G, g);
267
+ return i.addEventListener(G, N), i.addEventListener(J, S), () => {
268
+ i.removeEventListener(G, N), i.removeEventListener(J, S);
267
269
  };
268
270
  }
269
271
  }, [l.viewport, C, v, c, K]), n.useEffect(() => {
270
272
  d && !l.isClosePausedRef.current && K(C);
271
273
  }, [d, C, l.isClosePausedRef, K]), n.useEffect(() => (F(), () => V()), [F, V]);
272
- const te = n.useMemo(() => s ? Pe(s) : null, [s]);
273
- return l.viewport ? /* @__PURE__ */ A(ae, { children: [
274
- te && /* @__PURE__ */ i(
275
- tt,
274
+ const oe = n.useMemo(() => a ? Ce(a) : null, [a]);
275
+ return l.viewport ? /* @__PURE__ */ I(ie, { children: [
276
+ oe && /* @__PURE__ */ s(
277
+ st,
276
278
  {
277
279
  __scopeToast: r,
278
280
  role: "status",
279
281
  "aria-live": t === "foreground" ? "assertive" : "polite",
280
- children: te
282
+ children: oe
281
283
  }
282
284
  ),
283
- /* @__PURE__ */ i(Qe, { scope: r, onClose: I, children: Se.createPortal(
284
- /* @__PURE__ */ i(ee.ItemSlot, { scope: r, children: /* @__PURE__ */ i(
285
- Le,
285
+ /* @__PURE__ */ s(ot, { scope: r, onClose: A, children: Ne.createPortal(
286
+ /* @__PURE__ */ s(te.ItemSlot, { scope: r, children: /* @__PURE__ */ s(
287
+ Me,
286
288
  {
287
289
  asChild: !0,
288
- onEscapeKeyDown: x(w, () => {
289
- l.isFocusedToastEscapeKeyDownRef.current || I(), l.isFocusedToastEscapeKeyDownRef.current = !1;
290
+ onEscapeKeyDown: b(w, () => {
291
+ l.isFocusedToastEscapeKeyDownRef.current || A(), l.isFocusedToastEscapeKeyDownRef.current = !1;
290
292
  }),
291
- children: /* @__PURE__ */ i(
293
+ children: /* @__PURE__ */ s(
292
294
  D.li,
293
295
  {
294
296
  tabIndex: 0,
295
297
  "data-state": d ? "open" : "closed",
296
298
  "data-swipe-direction": l.swipeDirection,
297
- ...b,
299
+ ...g,
298
300
  ref: p,
299
301
  style: { userSelect: "none", touchAction: "none", ...e.style },
300
- onKeyDown: x(e.onKeyDown, (a) => {
301
- a.key === "Escape" && (w?.(a.nativeEvent), a.nativeEvent.defaultPrevented || (l.isFocusedToastEscapeKeyDownRef.current = !0, I()));
302
+ onKeyDown: b(e.onKeyDown, (i) => {
303
+ i.key === "Escape" && (w?.(i.nativeEvent), i.nativeEvent.defaultPrevented || (l.isFocusedToastEscapeKeyDownRef.current = !0, A()));
302
304
  }),
303
- onPointerDown: x(e.onPointerDown, (a) => {
304
- a.button === 0 && (m.current = { x: a.clientX, y: a.clientY });
305
+ onPointerDown: b(e.onPointerDown, (i) => {
306
+ i.button === 0 && (m.current = { x: i.clientX, y: i.clientY });
305
307
  }),
306
- onPointerMove: x(e.onPointerMove, (a) => {
308
+ onPointerMove: b(e.onPointerMove, (i) => {
307
309
  if (!m.current) return;
308
- const g = a.clientX - m.current.x, S = a.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, S), $ = a.pointerType === "touch" ? 10 : 2, W = { x: Ce, y: Re }, oe = { originalEvent: a, delta: W };
309
- L ? (P.current = W, U(ze, T, oe, {
310
+ const S = i.clientX - m.current.x, N = i.clientY - m.current.y, L = !!P.current, M = ["left", "right"].includes(l.swipeDirection), H = ["left", "up"].includes(l.swipeDirection) ? Math.min : Math.max, xe = M ? H(0, S) : 0, Re = M ? 0 : H(0, N), z = i.pointerType === "touch" ? 10 : 2, W = { x: xe, y: Re }, re = { originalEvent: i, delta: W };
311
+ L ? (P.current = W, X(Ze, T, re, {
310
312
  discrete: !1
311
- })) : se(W, l.swipeDirection, $) ? (P.current = W, U(qe, E, oe, {
313
+ })) : se(W, l.swipeDirection, z) ? (P.current = W, X(Qe, E, re, {
312
314
  discrete: !1
313
- }), a.target.setPointerCapture(a.pointerId)) : (Math.abs(g) > $ || Math.abs(S) > $) && (m.current = null);
315
+ }), i.target.setPointerCapture(i.pointerId)) : (Math.abs(S) > z || Math.abs(N) > z) && (m.current = null);
314
316
  }),
315
- onPointerUp: x(e.onPointerUp, (a) => {
316
- const g = P.current, S = a.target;
317
- if (S.hasPointerCapture(a.pointerId) && S.releasePointerCapture(a.pointerId), P.current = null, m.current = null, g) {
318
- const L = a.currentTarget, M = { originalEvent: a, delta: g };
319
- se(g, l.swipeDirection, l.swipeThreshold) ? U(Je, R, M, {
317
+ onPointerUp: b(e.onPointerUp, (i) => {
318
+ const S = P.current, N = i.target;
319
+ if (N.hasPointerCapture(i.pointerId) && N.releasePointerCapture(i.pointerId), P.current = null, m.current = null, S) {
320
+ const L = i.currentTarget, M = { originalEvent: i, delta: S };
321
+ se(S, l.swipeDirection, l.swipeThreshold) ? X(tt, R, M, {
320
322
  discrete: !0
321
- }) : U(
322
- Ge,
323
- N,
323
+ }) : X(
324
+ et,
325
+ x,
324
326
  M,
325
327
  {
326
328
  discrete: !0
@@ -338,57 +340,57 @@ var [Qe, Ze] = ce(O, {
338
340
  ) })
339
341
  ] }) : null;
340
342
  }
341
- ), tt = (e) => {
342
- const { __scopeToast: o, children: r, ...t } = e, u = Y(O, o), [d, f] = n.useState(!1), [w, v] = n.useState(!1);
343
- return nt(() => f(!0)), n.useEffect(() => {
343
+ ), st = (e) => {
344
+ const { __scopeToast: o, children: r, ...t } = e, u = $(k, o), [d, f] = n.useState(!1), [w, v] = n.useState(!1);
345
+ return ct(() => f(!0)), n.useEffect(() => {
344
346
  const c = window.setTimeout(() => v(!0), 1e3);
345
347
  return () => window.clearTimeout(c);
346
- }, []), w ? null : /* @__PURE__ */ i(Me, { asChild: !0, children: /* @__PURE__ */ i(Q, { ...t, children: d && /* @__PURE__ */ A(ae, { children: [
348
+ }, []), w ? null : /* @__PURE__ */ s(ke, { asChild: !0, children: /* @__PURE__ */ s(Z, { ...t, children: d && /* @__PURE__ */ I(ie, { children: [
347
349
  u.label,
348
350
  " ",
349
351
  r
350
352
  ] }) }) });
351
- }, ot = "ToastTitle", me = n.forwardRef(
353
+ }, at = "ToastTitle", we = n.forwardRef(
352
354
  (e, o) => {
353
355
  const { __scopeToast: r, ...t } = e;
354
- return /* @__PURE__ */ i(D.div, { ...t, ref: o });
356
+ return /* @__PURE__ */ s(D.div, { ...t, ref: o });
355
357
  }
356
358
  );
357
- me.displayName = ot;
358
- var rt = "ToastDescription", we = n.forwardRef(
359
+ we.displayName = at;
360
+ var it = "ToastDescription", Te = n.forwardRef(
359
361
  (e, o) => {
360
362
  const { __scopeToast: r, ...t } = e;
361
- return /* @__PURE__ */ i(D.div, { ...t, ref: o });
363
+ return /* @__PURE__ */ s(D.div, { ...t, ref: o });
362
364
  }
363
365
  );
364
- we.displayName = rt;
365
- var Te = "ToastAction", ve = n.forwardRef(
366
+ Te.displayName = it;
367
+ var ve = "ToastAction", Ee = n.forwardRef(
366
368
  (e, o) => {
367
369
  const { altText: r, ...t } = e;
368
- return r.trim() ? /* @__PURE__ */ i(he, { altText: r, asChild: !0, children: /* @__PURE__ */ i(ye, { ...t, ref: o }) }) : (console.error(
369
- `Invalid prop \`altText\` supplied to \`${Te}\`. Expected non-empty \`string\`.`
370
+ return r.trim() ? /* @__PURE__ */ s(Pe, { altText: r, asChild: !0, children: /* @__PURE__ */ s(ye, { ...t, ref: o }) }) : (console.error(
371
+ `Invalid prop \`altText\` supplied to \`${ve}\`. Expected non-empty \`string\`.`
370
372
  ), null);
371
373
  }
372
374
  );
373
- ve.displayName = Te;
374
- var Ee = "ToastClose", ye = n.forwardRef(
375
+ Ee.displayName = ve;
376
+ var he = "ToastClose", ye = n.forwardRef(
375
377
  (e, o) => {
376
- const { __scopeToast: r, ...t } = e, u = Ze(Ee, r);
377
- return /* @__PURE__ */ i(he, { asChild: !0, children: /* @__PURE__ */ i(
378
+ const { __scopeToast: r, ...t } = e, u = rt(he, r);
379
+ return /* @__PURE__ */ s(Pe, { asChild: !0, children: /* @__PURE__ */ s(
378
380
  D.button,
379
381
  {
380
382
  type: "button",
381
383
  ...t,
382
384
  ref: o,
383
- onClick: x(e.onClick, u.onClose)
385
+ onClick: b(e.onClick, u.onClose)
384
386
  }
385
387
  ) });
386
388
  }
387
389
  );
388
- ye.displayName = Ee;
389
- var he = n.forwardRef((e, o) => {
390
+ ye.displayName = he;
391
+ var Pe = n.forwardRef((e, o) => {
390
392
  const { __scopeToast: r, altText: t, ...u } = e;
391
- return /* @__PURE__ */ i(
393
+ return /* @__PURE__ */ s(
392
394
  D.div,
393
395
  {
394
396
  "data-radix-toast-announce-exclude": "",
@@ -398,42 +400,42 @@ var he = n.forwardRef((e, o) => {
398
400
  }
399
401
  );
400
402
  });
401
- function Pe(e) {
403
+ function Ce(e) {
402
404
  const o = [];
403
405
  return Array.from(e.childNodes).forEach((t) => {
404
- if (t.nodeType === t.TEXT_NODE && t.textContent && o.push(t.textContent), st(t)) {
406
+ if (t.nodeType === t.TEXT_NODE && t.textContent && o.push(t.textContent), ut(t)) {
405
407
  const u = t.ariaHidden || t.hidden || t.style.display === "none", d = t.dataset.radixToastAnnounceExclude === "";
406
408
  if (!u)
407
409
  if (d) {
408
410
  const f = t.dataset.radixToastAnnounceAlt;
409
411
  f && o.push(f);
410
412
  } else
411
- o.push(...Pe(t));
413
+ o.push(...Ce(t));
412
414
  }
413
415
  }), o;
414
416
  }
415
- function U(e, o, r, { discrete: t }) {
417
+ function X(e, o, r, { discrete: t }) {
416
418
  const u = r.originalEvent.currentTarget, d = new CustomEvent(e, { bubbles: !0, cancelable: !0, detail: r });
417
- o && u.addEventListener(e, o, { once: !0 }), t ? Ae(u, d) : u.dispatchEvent(d);
419
+ o && u.addEventListener(e, o, { once: !0 }), t ? De(u, d) : u.dispatchEvent(d);
418
420
  }
419
421
  var se = (e, o, r = 0) => {
420
422
  const t = Math.abs(e.x), u = Math.abs(e.y), d = t > u;
421
423
  return o === "left" || o === "right" ? d && t > r : !d && u > r;
422
424
  };
423
- function nt(e = () => {
425
+ function ct(e = () => {
424
426
  }) {
425
- const o = X(e);
426
- De(() => {
427
+ const o = Y(e);
428
+ _e(() => {
427
429
  let r = 0, t = 0;
428
430
  return r = window.requestAnimationFrame(() => t = window.requestAnimationFrame(o)), () => {
429
431
  window.cancelAnimationFrame(r), window.cancelAnimationFrame(t);
430
432
  };
431
433
  }, [o]);
432
434
  }
433
- function st(e) {
435
+ function ut(e) {
434
436
  return e.nodeType === e.ELEMENT_NODE;
435
437
  }
436
- function at(e) {
438
+ function lt(e) {
437
439
  const o = [], r = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, {
438
440
  acceptNode: (t) => {
439
441
  const u = t.tagName === "INPUT" && t.type === "hidden";
@@ -447,8 +449,8 @@ function q(e) {
447
449
  const o = document.activeElement;
448
450
  return e.some((r) => r === o ? !0 : (r.focus(), document.activeElement !== o));
449
451
  }
450
- var it = ue, ct = de, ut = pe, lt = me, dt = we, ft = ve;
451
- const St = ({
452
+ var dt = le, ft = fe, pt = me, mt = we, ae = Te, wt = Ee;
453
+ const _t = ({
452
454
  title: e,
453
455
  duration: o = 5e3,
454
456
  titleClassName: r,
@@ -461,46 +463,51 @@ const St = ({
461
463
  className: c,
462
464
  open: E = !1,
463
465
  setOpen: T,
464
- variant: N
466
+ variant: x
465
467
  }) => {
466
- const R = xe(0);
467
- be(() => () => clearTimeout(R.current), []);
468
- const b = re(() => ne(e) ? /* @__PURE__ */ i(B, { className: r, children: e }) : e, [e, r]), l = re(() => ne(u) ? /* @__PURE__ */ i(B, { className: t, children: u }) : u, [u, t]), s = ge(() => {
468
+ const R = be(0);
469
+ ge(() => () => clearTimeout(R.current), []);
470
+ const g = ne(() => j(e) ? /* @__PURE__ */ s(B, { className: r, children: e }) : e, [e, r]), l = ne(() => j(u) ? /* @__PURE__ */ s(B, { className: t, children: u }) : u, [u, t]), a = Se(() => {
469
471
  T(!1), R.current = window.setTimeout(() => T(!0), 100);
470
472
  }, [T]);
471
- return /* @__PURE__ */ A(it, { swipeDirection: "right", duration: o, children: [
472
- /* @__PURE__ */ i(B, { onClick: s, children: d }),
473
- /* @__PURE__ */ A(
474
- ut,
473
+ return /* @__PURE__ */ I(dt, { swipeDirection: "right", duration: o, children: [
474
+ /* @__PURE__ */ s(B, { onClick: a, children: d }),
475
+ /* @__PURE__ */ I(
476
+ pt,
475
477
  {
476
- className: j(Ke({ variant: N, className: c })),
478
+ className: U(He({ variant: x, className: c })),
477
479
  "data-theme": f,
478
480
  open: E,
479
481
  onOpenChange: T,
480
482
  children: [
481
- /* @__PURE__ */ A("div", { className: "flex gap-2 items-center flex-1", children: [
482
- /* @__PURE__ */ i(lt, { asChild: !0, className: r, children: b }),
483
- l && /* @__PURE__ */ i(dt, { asChild: !0, children: l })
483
+ /* @__PURE__ */ I("div", { className: "flex gap-2 items-center flex-1", children: [
484
+ x === "success" && /* @__PURE__ */ s(Ue, { size: 20, className: "shrink-0" }),
485
+ x === "error" && /* @__PURE__ */ s(Xe, { size: 20, className: "shrink-0" }),
486
+ x === "warning" && /* @__PURE__ */ s(Ye, { size: 20, className: "shrink-0" }),
487
+ /* @__PURE__ */ I("div", { className: "flex flex-col gap-1", children: [
488
+ /* @__PURE__ */ s(mt, { asChild: !0, className: r, children: g }),
489
+ l && (j(l) ? /* @__PURE__ */ s(ae, { asChild: !0, children: l }) : /* @__PURE__ */ s(ae, { className: U("text-sm", t), children: l }))
490
+ ] })
484
491
  ] }),
485
- w && /* @__PURE__ */ i(ft, { asChild: !0, altText: "Close the toast", children: /* @__PURE__ */ A("button", { type: "button", className: "absolute right-1.5 top-1.5", children: [
486
- /* @__PURE__ */ i(
487
- We,
492
+ w && /* @__PURE__ */ s(wt, { asChild: !0, altText: "Close the toast", children: /* @__PURE__ */ I("button", { type: "button", className: "cursor-pointer", children: [
493
+ /* @__PURE__ */ s(
494
+ $e,
488
495
  {
489
- className: j(
490
- Ve({
496
+ className: U(
497
+ Ke({
491
498
  className: v
492
499
  })
493
500
  )
494
501
  }
495
502
  ),
496
- /* @__PURE__ */ i(ke, { children: "Close toast" })
503
+ /* @__PURE__ */ s(Ve, { children: "Close toast" })
497
504
  ] }) })
498
505
  ]
499
506
  }
500
507
  ),
501
- /* @__PURE__ */ i(ct, { className: j(He()) })
508
+ /* @__PURE__ */ s(ft, { className: U(We()) })
502
509
  ] });
503
510
  };
504
511
  export {
505
- St as Toast
512
+ _t as Toast
506
513
  };