@konstructio/ui 0.1.2-alpha.5 → 0.1.2-alpha.51

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 (203) hide show
  1. package/dist/{Combination-VYaRRJBZ.js → Combination-BtmnusWq.js} +141 -138
  2. package/dist/DatePicker.css +1 -1
  3. package/dist/Modal-CjC-CIJ8.js +99 -0
  4. package/dist/assets/icons/index.js +7 -0
  5. package/dist/chevron-down-DgT-uSF9.js +5 -0
  6. package/dist/chevron-right-DYvXLeql.js +7 -0
  7. package/dist/chevron-up-DEfvgPCw.js +54 -0
  8. package/dist/chevron-up-DrQr2Fwd.js +5 -0
  9. package/dist/components/Alert/Alert.js +2 -2
  10. package/dist/components/AlertDialog/AlertDialog.js +81 -53
  11. package/dist/components/AlertDialog/components/AlertDialogTrigger.js +3 -2
  12. package/dist/components/AlertDialog/components/index.js +1 -1
  13. package/dist/components/Badge/Badge.js +41 -44
  14. package/dist/components/Badge/Badge.variants.js +52 -13
  15. package/dist/components/Breadcrumb/Breadcrumb.js +1 -1
  16. package/dist/components/Breadcrumb/Breadcrumb.variants.js +3 -3
  17. package/dist/components/Breadcrumb/components/Item/Item.js +22 -22
  18. package/dist/components/Breadcrumb/components/Item/Item.variants.js +25 -14
  19. package/dist/components/Breadcrumb/hooks/useBreadcrumb.js +1 -1
  20. package/dist/components/Button/Button.js +1 -1
  21. package/dist/components/Button/Button.variants.js +108 -98
  22. package/dist/components/Card/Card.variants.js +7 -12
  23. package/dist/components/Checkbox/Checkbox.js +108 -105
  24. package/dist/components/Checkbox/Checkbox.variants.js +34 -7
  25. package/dist/components/Command/Command.js +2 -2
  26. package/dist/components/Command/components/Command.js +1 -1
  27. package/dist/components/Command/components/CommandEmpty.js +1 -1
  28. package/dist/components/Command/components/CommandGroup.js +1 -1
  29. package/dist/components/Command/components/CommandInput.js +2 -2
  30. package/dist/components/Command/components/CommandItem.js +1 -1
  31. package/dist/components/Command/components/CommandList.js +1 -1
  32. package/dist/components/Command/components/CommandSeparator.js +1 -1
  33. package/dist/components/Command/components/DialogContent.js +2 -2
  34. package/dist/components/Command/components/DialogOverlay.js +1 -1
  35. package/dist/components/Counter/Counter.js +210 -0
  36. package/dist/components/Counter/Counter.variants.js +70 -0
  37. package/dist/components/Datepicker/DatePicker.js +1587 -1353
  38. package/dist/components/Divider/Divider.variants.js +1 -1
  39. package/dist/components/DropdownButton/DropdownButton.js +1 -1
  40. package/dist/components/Filter/Filter.js +1 -1
  41. package/dist/components/Filter/Filter.variants.js +8 -7
  42. package/dist/components/Filter/components/BadgeDropdown/BadgeMultiSelect.js +71 -45
  43. package/dist/components/Filter/components/DateFilterDropdown/DateFilterDropdown.hook.js +2 -2
  44. package/dist/components/Filter/components/DateFilterDropdown/DateFilterDropdown.js +76 -43
  45. package/dist/components/Filter/components/ResetButton/ResetButton.js +15 -12
  46. package/dist/components/Filter/events/index.js +3 -3
  47. package/dist/components/ImageUpload/ImageUpload.js +221 -0
  48. package/dist/components/ImageUpload/ImageUpload.variants.js +109 -0
  49. package/dist/components/Input/Input.js +185 -118
  50. package/dist/components/Input/Input.variants.js +24 -19
  51. package/dist/components/Loading/Loading.js +1 -7
  52. package/dist/components/Modal/Modal.js +2 -2
  53. package/dist/components/Modal/components/Body/Body.js +1 -1
  54. package/dist/components/Modal/components/Footer/Footer.js +1 -1
  55. package/dist/components/Modal/components/Header/Header.js +1 -1
  56. package/dist/components/Modal/components/Wrapper/Wrapper.js +4 -4
  57. package/dist/components/Modal/components/index.js +1 -1
  58. package/dist/components/MultiSelectDropdown/MultiSelectDropdown.js +34 -0
  59. package/dist/components/MultiSelectDropdown/MultiSelectDropdown.variants.js +30 -0
  60. package/dist/components/MultiSelectDropdown/components/Item/Item.js +30 -0
  61. package/dist/components/MultiSelectDropdown/components/Item/Item.variants.js +38 -0
  62. package/dist/components/MultiSelectDropdown/components/List/List.js +30 -0
  63. package/dist/components/MultiSelectDropdown/components/List/List.variants.js +25 -0
  64. package/dist/components/MultiSelectDropdown/components/Wrapper/Wrapper.js +119 -0
  65. package/dist/components/MultiSelectDropdown/components/index.js +8 -0
  66. package/dist/components/MultiSelectDropdown/contexts/MultiSelectDropdown.context.js +21 -0
  67. package/dist/components/MultiSelectDropdown/contexts/MultiSelectDropdown.hook.js +13 -0
  68. package/dist/components/MultiSelectDropdown/contexts/MultiSelectDropdown.provider.js +138 -0
  69. package/dist/components/MultiSelectDropdown/contexts/index.js +6 -0
  70. package/dist/components/MultiSelectDropdown/hooks/useMultiSelectDropdown.js +32 -0
  71. package/dist/components/PhoneNumberInput/PhoneNumberInput.js +8 -0
  72. package/dist/components/PhoneNumberInput/PhoneNumberInput.variants.js +46 -0
  73. package/dist/components/PhoneNumberInput/components/FlagContent/FlagContent.js +36 -0
  74. package/dist/components/PhoneNumberInput/components/FlagSelectorList/FlagSelectorList.js +690 -0
  75. package/dist/components/PhoneNumberInput/components/FlagSelectorWrapper/FlagSelectorWrapper.js +60 -0
  76. package/dist/components/PhoneNumberInput/components/TruncateText/TruncateText.js +45 -0
  77. package/dist/components/PhoneNumberInput/components/Wrapper.js +651 -0
  78. package/dist/components/PhoneNumberInput/components/index.js +6 -0
  79. package/dist/components/PhoneNumberInput/contexts/index.js +8 -0
  80. package/dist/components/PhoneNumberInput/contexts/phone-number.context.js +28 -0
  81. package/dist/components/PhoneNumberInput/contexts/phone-number.hook.js +13 -0
  82. package/dist/components/PhoneNumberInput/contexts/phone-number.provider.js +6144 -0
  83. package/dist/components/PhoneNumberInput/utils/index.js +11 -0
  84. package/dist/components/PieChart/PieChart.js +463 -482
  85. package/dist/components/Radio/Radio.js +47 -44
  86. package/dist/components/Radio/Radio.variants.js +12 -8
  87. package/dist/components/RadioCard/RadioCard.variants.js +1 -6
  88. package/dist/components/RadioGroup/RadioGroup.js +10 -10
  89. package/dist/components/Range/Range.js +1 -1
  90. package/dist/components/Select/Select.js +48 -0
  91. package/dist/components/{Dropdown/Dropdown.variants.js → Select/Select.variants.js} +17 -11
  92. package/dist/components/Select/components/List/List.js +172 -0
  93. package/dist/components/{Dropdown → Select}/components/List/List.variants.js +11 -8
  94. package/dist/components/Select/components/ListItem/ListItem.js +117 -0
  95. package/dist/components/{Dropdown → Select}/components/ListItem/ListItem.variants.js +5 -4
  96. package/dist/components/Select/components/Wrapper.js +226 -0
  97. package/dist/components/Select/constants/index.js +4 -0
  98. package/dist/components/Select/constants/pagination.js +4 -0
  99. package/dist/components/Select/contexts/index.js +6 -0
  100. package/dist/components/Select/contexts/select.context.js +36 -0
  101. package/dist/components/Select/contexts/select.hook.js +11 -0
  102. package/dist/components/Select/contexts/select.provider.js +58 -0
  103. package/dist/components/Select/hooks/useNavigationList.js +50 -0
  104. package/dist/components/Select/hooks/useSelect.js +103 -0
  105. package/dist/components/Sidebar/Sidebar.variants.js +2 -2
  106. package/dist/components/Slider/Slider.js +1 -1
  107. package/dist/components/Switch/Switch.js +156 -129
  108. package/dist/components/Switch/Switch.variants.js +19 -10
  109. package/dist/components/Tabs/Tabs.js +1 -1
  110. package/dist/components/Tabs/Tabs.variants.js +4 -3
  111. package/dist/components/Tabs/components/Content.js +1 -1
  112. package/dist/components/Tabs/components/List.js +1 -1
  113. package/dist/components/Tabs/components/Trigger.js +1 -1
  114. package/dist/components/Tag/Tag.js +1 -1
  115. package/dist/components/Tag/Tag.variants.js +1 -0
  116. package/dist/components/TagSelect/components/Wrapper/Wrapper.js +49 -98
  117. package/dist/components/TimePicker/TimePicker.js +1 -1
  118. package/dist/components/TimePicker/TimePicker.variants.js +26 -14
  119. package/dist/components/TimePicker/components/MeridianList/MeridianList.js +30 -20
  120. package/dist/components/TimePicker/components/Wrapper/Wrapper.js +57 -35
  121. package/dist/components/TimePicker/components/WrapperList/WrapperList.js +53 -45
  122. package/dist/components/Toast/Toast.js +283 -256
  123. package/dist/components/Toast/Toast.variants.js +37 -24
  124. package/dist/components/Tooltip/Tooltip.js +15 -14
  125. package/dist/components/Tooltip/Tooltip.variants.js +5 -4
  126. package/dist/components/Typography/Typography.js +23 -25
  127. package/dist/components/Typography/Typography.variants.js +55 -52
  128. package/dist/components/VirtualizedTable/VirtualizedTable.js +97 -71
  129. package/dist/components/VirtualizedTable/components/Actions/Actions.js +95 -33
  130. package/dist/components/VirtualizedTable/components/Body/Body.js +73 -21
  131. package/dist/components/VirtualizedTable/components/DotPaginate/DotPaginate.js +94 -91
  132. package/dist/components/VirtualizedTable/components/DropdownPaginate/DropdownPaginate.js +20 -20
  133. package/dist/components/VirtualizedTable/components/Filter/Filter.js +61 -44
  134. package/dist/components/VirtualizedTable/components/FormPaginate/FormPaginate.js +33 -21
  135. package/dist/components/VirtualizedTable/components/Header/Header.js +61 -41
  136. package/dist/components/VirtualizedTable/components/Pagination/Pagination.js +43 -22
  137. package/dist/components/VirtualizedTable/components/Skeleton/Skeleton.js +106 -0
  138. package/dist/components/VirtualizedTable/components/TruncateText/TruncateText.js +22 -1858
  139. package/dist/components/VirtualizedTable/components/WrapperBody/WrapperBody.js +27 -0
  140. package/dist/components/VirtualizedTable/components/index.js +8 -6
  141. package/dist/components/VirtualizedTable/contexts/table.context.js +1 -0
  142. package/dist/components/VirtualizedTable/contexts/table.provider.js +68 -761
  143. package/dist/components/index.js +94 -86
  144. package/dist/contexts/theme.provider.js +0 -1
  145. package/dist/{createLucideIcon-D2CN7Ma9.js → createLucideIcon-D4r5Phnh.js} +0 -24
  146. package/dist/ellipsis-vertical-BVPtjl5f.js +9 -0
  147. package/dist/{index-C1g_chDT.js → index-AV6ZtGhy.js} +2 -2
  148. package/dist/index-BG8O18ZY.js +93 -0
  149. package/dist/index-BKjcReYh.js +55 -0
  150. package/dist/{index-N2OStZoU.js → index-BOE_3f_Z.js} +4 -25
  151. package/dist/{index-Cd2vhaop.js → index-BlSRBdPy.js} +5 -6
  152. package/dist/index-BmVmDQGH.js +662 -0
  153. package/dist/index-BvoZGpli.js +60 -0
  154. package/dist/index-Byr10W8m.js +1873 -0
  155. package/dist/{index-Dx2grAuN.js → index-CSWGJT-v.js} +0 -20
  156. package/dist/index-CeZcoQDw.js +479 -0
  157. package/dist/index-D6KzX_ef.js +135 -0
  158. package/dist/{index-B7t8D14s.js → index-D9SSJ6om.js} +4 -4
  159. package/dist/index-DKfEnhKr.js +200 -0
  160. package/dist/index-DLcqcWxM.js +29 -0
  161. package/dist/{index-ti1b9kqV.js → index-DMb4KD0b.js} +4 -4
  162. package/dist/{index-BAEWsOG1.js → index-DtEcCIrM.js} +1 -1
  163. package/dist/{index-bwWKd82e.js → index-Dy59FQl5.js} +1 -1
  164. package/dist/{index-C84F4YyO.js → index-gSPwC-1I.js} +10 -11
  165. package/dist/{index-Bnb0ezr3.js → index-vcSp8YRZ.js} +11 -12
  166. package/dist/index.d.ts +2142 -99
  167. package/dist/index.js +116 -106
  168. package/dist/libphonenumber-FTwQ9nyV.js +11549 -0
  169. package/dist/loader-juvMSJ9L.js +5 -0
  170. package/dist/package.json +43 -33
  171. package/dist/styles.css +1 -1
  172. package/dist/ui/civo-theme.css +194 -168
  173. package/dist/ui/theme.css +27 -0
  174. package/dist/{useBreadcrumb-B8DnuqkR.js → useBreadcrumb-BAHbGQ_O.js} +0 -10
  175. package/dist/utils/index.js +534 -501
  176. package/dist/x-BXShoIAM.js +8 -0
  177. package/dist/{x-4F_5p77m.js → x-Eoa9FJjA.js} +1 -1
  178. package/package.json +43 -33
  179. package/dist/Modal-D-NOEWMX.js +0 -98
  180. package/dist/chevron-down-MZvQoT2F.js +0 -11
  181. package/dist/chevron-right-VYBOBhRt.js +0 -19
  182. package/dist/components/Dropdown/Dropdown.js +0 -42
  183. package/dist/components/Dropdown/components/List/List.js +0 -79
  184. package/dist/components/Dropdown/components/ListItem/ListItem.js +0 -67
  185. package/dist/components/Dropdown/components/Wrapper.js +0 -205
  186. package/dist/components/Dropdown/contexts/dropdown.context.js +0 -19
  187. package/dist/components/Dropdown/contexts/dropdown.hook.js +0 -13
  188. package/dist/components/Dropdown/contexts/dropdown.provider.js +0 -30
  189. package/dist/components/Dropdown/contexts/index.js +0 -6
  190. package/dist/components/Dropdown/hooks/useDropdown.js +0 -58
  191. package/dist/components/Dropdown/hooks/useNavigationList.js +0 -62
  192. package/dist/components/NumberInput/NumberInput.js +0 -179
  193. package/dist/components/NumberInput/NumberInput.variants.js +0 -50
  194. package/dist/components/TimePicker/components/WrapperList/WrapperList.variants.js +0 -16
  195. package/dist/index-BITvcJAz.js +0 -423
  196. package/dist/index-BfXxHr_2.js +0 -125
  197. package/dist/index-Cvx4lqTq.js +0 -47
  198. package/dist/index-DBbEcSUG.js +0 -31
  199. package/dist/index-DQH6odE9.js +0 -82
  200. package/dist/index-DzIBBMjs.js +0 -436
  201. package/dist/index-os7vysFS.js +0 -131
  202. /package/dist/components/{Dropdown → Select}/components/EmptyList.js +0 -0
  203. /package/dist/components/{Dropdown → Select}/components/index.js +0 -0
@@ -1,14 +1,4 @@
1
1
  import * as j from "react";
2
- /**
3
- * table-core
4
- *
5
- * Copyright (c) TanStack
6
- *
7
- * This source code is licensed under the MIT license found in the
8
- * LICENSE.md file in the root directory of this source tree.
9
- *
10
- * @license MIT
11
- */
12
2
  function I(e, o) {
13
3
  return typeof e == "function" ? e(o) : e;
14
4
  }
@@ -1683,16 +1673,6 @@ function it() {
1683
1673
  };
1684
1674
  }, C(e.options, "debugTable", "getSortedRowModel", () => e._autoResetPageIndex()));
1685
1675
  }
1686
- /**
1687
- * react-table
1688
- *
1689
- * Copyright (c) TanStack
1690
- *
1691
- * This source code is licensed under the MIT license found in the
1692
- * LICENSE.md file in the root directory of this source tree.
1693
- *
1694
- * @license MIT
1695
- */
1696
1676
  function lt(e, o) {
1697
1677
  return e ? tt(e) ? /* @__PURE__ */ j.createElement(e, o) : e : null;
1698
1678
  }
@@ -0,0 +1,479 @@
1
+ import * as i from "react";
2
+ import { P as O, c as Ee, b as _, a as ye, e as he } from "./index-DKfEnhKr.js";
3
+ import { u as F, c as Ce } from "./index-DLcqcWxM.js";
4
+ import { u as w } from "./index-Dy59FQl5.js";
5
+ import { D as De } from "./index-BlSRBdPy.js";
6
+ import { u as $ } from "./index-0ioNhtNM.js";
7
+ import { jsx as u, jsxs as j, Fragment as B } from "react/jsx-runtime";
8
+ import { P as be } from "./index-DMb4KD0b.js";
9
+ import { P as U } from "./index-AV6ZtGhy.js";
10
+ import { R as Re } from "./Combination-BtmnusWq.js";
11
+ var x = "focusScope.autoFocusOnMount", W = "focusScope.autoFocusOnUnmount", q = { bubbles: !1, cancelable: !0 }, Ae = "FocusScope", Q = i.forwardRef((e, t) => {
12
+ const {
13
+ loop: n = !1,
14
+ trapped: o = !1,
15
+ onMountAutoFocus: r,
16
+ onUnmountAutoFocus: a,
17
+ ...l
18
+ } = e, [s, m] = i.useState(null), p = $(r), E = $(a), c = i.useRef(null), d = F(t, (f) => m(f)), v = i.useRef({
19
+ paused: !1,
20
+ pause() {
21
+ this.paused = !0;
22
+ },
23
+ resume() {
24
+ this.paused = !1;
25
+ }
26
+ }).current;
27
+ i.useEffect(() => {
28
+ if (o) {
29
+ let f = function(C) {
30
+ if (v.paused || !s) return;
31
+ const h = C.target;
32
+ s.contains(h) ? c.current = h : b(c.current, { select: !0 });
33
+ }, D = function(C) {
34
+ if (v.paused || !s) return;
35
+ const h = C.relatedTarget;
36
+ h !== null && (s.contains(h) || b(c.current, { select: !0 }));
37
+ }, g = function(C) {
38
+ if (document.activeElement === document.body)
39
+ for (const H of C)
40
+ H.removedNodes.length > 0 && b(s);
41
+ };
42
+ document.addEventListener("focusin", f), document.addEventListener("focusout", D);
43
+ const N = new MutationObserver(g);
44
+ return s && N.observe(s, { childList: !0, subtree: !0 }), () => {
45
+ document.removeEventListener("focusin", f), document.removeEventListener("focusout", D), N.disconnect();
46
+ };
47
+ }
48
+ }, [o, s, v.paused]), i.useEffect(() => {
49
+ if (s) {
50
+ Y.add(v);
51
+ const f = document.activeElement;
52
+ if (!s.contains(f)) {
53
+ const g = new CustomEvent(x, q);
54
+ s.addEventListener(x, p), s.dispatchEvent(g), g.defaultPrevented || (Oe(Ie(X(s)), { select: !0 }), document.activeElement === f && b(s));
55
+ }
56
+ return () => {
57
+ s.removeEventListener(x, p), setTimeout(() => {
58
+ const g = new CustomEvent(W, q);
59
+ s.addEventListener(W, E), s.dispatchEvent(g), g.defaultPrevented || b(f ?? document.body, { select: !0 }), s.removeEventListener(W, E), Y.remove(v);
60
+ }, 0);
61
+ };
62
+ }
63
+ }, [s, p, E, v]);
64
+ const P = i.useCallback(
65
+ (f) => {
66
+ if (!n && !o || v.paused) return;
67
+ const D = f.key === "Tab" && !f.altKey && !f.ctrlKey && !f.metaKey, g = document.activeElement;
68
+ if (D && g) {
69
+ const N = f.currentTarget, [C, h] = Ne(N);
70
+ C && h ? !f.shiftKey && g === h ? (f.preventDefault(), n && b(C, { select: !0 })) : f.shiftKey && g === C && (f.preventDefault(), n && b(h, { select: !0 })) : g === N && f.preventDefault();
71
+ }
72
+ },
73
+ [n, o, v.paused]
74
+ );
75
+ return /* @__PURE__ */ u(O.div, { tabIndex: -1, ...l, ref: d, onKeyDown: P });
76
+ });
77
+ Q.displayName = Ae;
78
+ function Oe(e, { select: t = !1 } = {}) {
79
+ const n = document.activeElement;
80
+ for (const o of e)
81
+ if (b(o, { select: t }), document.activeElement !== n) return;
82
+ }
83
+ function Ne(e) {
84
+ const t = X(e), n = Z(t, e), o = Z(t.reverse(), e);
85
+ return [n, o];
86
+ }
87
+ function X(e) {
88
+ const t = [], n = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, {
89
+ acceptNode: (o) => {
90
+ const r = o.tagName === "INPUT" && o.type === "hidden";
91
+ return o.disabled || o.hidden || r ? NodeFilter.FILTER_SKIP : o.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
92
+ }
93
+ });
94
+ for (; n.nextNode(); ) t.push(n.currentNode);
95
+ return t;
96
+ }
97
+ function Z(e, t) {
98
+ for (const n of e)
99
+ if (!_e(n, { upTo: t })) return n;
100
+ }
101
+ function _e(e, { upTo: t }) {
102
+ if (getComputedStyle(e).visibility === "hidden") return !0;
103
+ for (; e; ) {
104
+ if (t !== void 0 && e === t) return !1;
105
+ if (getComputedStyle(e).display === "none") return !0;
106
+ e = e.parentElement;
107
+ }
108
+ return !1;
109
+ }
110
+ function Pe(e) {
111
+ return e instanceof HTMLInputElement && "select" in e;
112
+ }
113
+ function b(e, { select: t = !1 } = {}) {
114
+ if (e && e.focus) {
115
+ const n = document.activeElement;
116
+ e.focus({ preventScroll: !0 }), e !== n && Pe(e) && t && e.select();
117
+ }
118
+ }
119
+ var Y = Se();
120
+ function Se() {
121
+ let e = [];
122
+ return {
123
+ add(t) {
124
+ const n = e[0];
125
+ t !== n && n?.pause(), e = z(e, t), e.unshift(t);
126
+ },
127
+ remove(t) {
128
+ e = z(e, t), e[0]?.resume();
129
+ }
130
+ };
131
+ }
132
+ function z(e, t) {
133
+ const n = [...e], o = n.indexOf(t);
134
+ return o !== -1 && n.splice(o, 1), n;
135
+ }
136
+ function Ie(e) {
137
+ return e.filter((t) => t.tagName !== "A");
138
+ }
139
+ var L = 0;
140
+ function Te() {
141
+ i.useEffect(() => {
142
+ const e = document.querySelectorAll("[data-radix-focus-guard]");
143
+ return document.body.insertAdjacentElement("afterbegin", e[0] ?? J()), document.body.insertAdjacentElement("beforeend", e[1] ?? J()), L++, () => {
144
+ L === 1 && document.querySelectorAll("[data-radix-focus-guard]").forEach((t) => t.remove()), L--;
145
+ };
146
+ }, []);
147
+ }
148
+ function J() {
149
+ const e = document.createElement("span");
150
+ return e.setAttribute("data-radix-focus-guard", ""), e.tabIndex = 0, e.style.outline = "none", e.style.opacity = "0", e.style.position = "fixed", e.style.pointerEvents = "none", e;
151
+ }
152
+ var Fe = function(e) {
153
+ if (typeof document > "u")
154
+ return null;
155
+ var t = Array.isArray(e) ? e[0] : e;
156
+ return t.ownerDocument.body;
157
+ }, A = /* @__PURE__ */ new WeakMap(), S = /* @__PURE__ */ new WeakMap(), I = {}, k = 0, ee = function(e) {
158
+ return e && (e.host || ee(e.parentNode));
159
+ }, Me = function(e, t) {
160
+ return t.map(function(n) {
161
+ if (e.contains(n))
162
+ return n;
163
+ var o = ee(n);
164
+ return o && e.contains(o) ? o : (console.error("aria-hidden", n, "in not contained inside", e, ". Doing nothing"), null);
165
+ }).filter(function(n) {
166
+ return !!n;
167
+ });
168
+ }, we = function(e, t, n, o) {
169
+ var r = Me(t, Array.isArray(e) ? e : [e]);
170
+ I[n] || (I[n] = /* @__PURE__ */ new WeakMap());
171
+ var a = I[n], l = [], s = /* @__PURE__ */ new Set(), m = new Set(r), p = function(c) {
172
+ !c || s.has(c) || (s.add(c), p(c.parentNode));
173
+ };
174
+ r.forEach(p);
175
+ var E = function(c) {
176
+ !c || m.has(c) || Array.prototype.forEach.call(c.children, function(d) {
177
+ if (s.has(d))
178
+ E(d);
179
+ else
180
+ try {
181
+ var v = d.getAttribute(o), P = v !== null && v !== "false", f = (A.get(d) || 0) + 1, D = (a.get(d) || 0) + 1;
182
+ A.set(d, f), a.set(d, D), l.push(d), f === 1 && P && S.set(d, !0), D === 1 && d.setAttribute(n, "true"), P || d.setAttribute(o, "true");
183
+ } catch (g) {
184
+ console.error("aria-hidden: cannot operate on ", d, g);
185
+ }
186
+ });
187
+ };
188
+ return E(t), s.clear(), k++, function() {
189
+ l.forEach(function(c) {
190
+ var d = A.get(c) - 1, v = a.get(c) - 1;
191
+ A.set(c, d), a.set(c, v), d || (S.has(c) || c.removeAttribute(o), S.delete(c)), v || c.removeAttribute(n);
192
+ }), k--, k || (A = /* @__PURE__ */ new WeakMap(), A = /* @__PURE__ */ new WeakMap(), S = /* @__PURE__ */ new WeakMap(), I = {});
193
+ };
194
+ }, xe = function(e, t, n) {
195
+ n === void 0 && (n = "data-aria-hidden");
196
+ var o = Array.from(Array.isArray(e) ? e : [e]), r = Fe(e);
197
+ return r ? (o.push.apply(o, Array.from(r.querySelectorAll("[aria-live]"))), we(o, r, n, "aria-hidden")) : function() {
198
+ return null;
199
+ };
200
+ };
201
+ // @__NO_SIDE_EFFECTS__
202
+ function We(e) {
203
+ const t = /* @__PURE__ */ Le(e), n = i.forwardRef((o, r) => {
204
+ const { children: a, ...l } = o, s = i.Children.toArray(a), m = s.find(Ue);
205
+ if (m) {
206
+ const p = m.props.children, E = s.map((c) => c === m ? i.Children.count(p) > 1 ? i.Children.only(null) : i.isValidElement(p) ? p.props.children : null : c);
207
+ return /* @__PURE__ */ u(t, { ...l, ref: r, children: i.isValidElement(p) ? i.cloneElement(p, void 0, E) : null });
208
+ }
209
+ return /* @__PURE__ */ u(t, { ...l, ref: r, children: a });
210
+ });
211
+ return n.displayName = `${e}.Slot`, n;
212
+ }
213
+ // @__NO_SIDE_EFFECTS__
214
+ function Le(e) {
215
+ const t = i.forwardRef((n, o) => {
216
+ const { children: r, ...a } = n;
217
+ if (i.isValidElement(r)) {
218
+ const l = Ge(r), s = Ke(a, r.props);
219
+ return r.type !== i.Fragment && (s.ref = o ? Ce(o, l) : l), i.cloneElement(r, s);
220
+ }
221
+ return i.Children.count(r) > 1 ? i.Children.only(null) : null;
222
+ });
223
+ return t.displayName = `${e}.SlotClone`, t;
224
+ }
225
+ var ke = /* @__PURE__ */ Symbol("radix.slottable");
226
+ function Ue(e) {
227
+ return i.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === ke;
228
+ }
229
+ function Ke(e, t) {
230
+ const n = { ...t };
231
+ for (const o in t) {
232
+ const r = e[o], a = t[o];
233
+ /^on[A-Z]/.test(o) ? r && a ? n[o] = (...s) => {
234
+ const m = a(...s);
235
+ return r(...s), m;
236
+ } : r && (n[o] = r) : o === "style" ? n[o] = { ...r, ...a } : o === "className" && (n[o] = [r, a].filter(Boolean).join(" "));
237
+ }
238
+ return { ...e, ...n };
239
+ }
240
+ function Ge(e) {
241
+ let t = Object.getOwnPropertyDescriptor(e.props, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning;
242
+ return n ? e.ref : (t = Object.getOwnPropertyDescriptor(e, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
243
+ }
244
+ var M = "Dialog", [te, st] = Ee(M), [Ve, y] = te(M), ne = (e) => {
245
+ const {
246
+ __scopeDialog: t,
247
+ children: n,
248
+ open: o,
249
+ defaultOpen: r,
250
+ onOpenChange: a,
251
+ modal: l = !0
252
+ } = e, s = i.useRef(null), m = i.useRef(null), [p, E] = ye({
253
+ prop: o,
254
+ defaultProp: r ?? !1,
255
+ onChange: a,
256
+ caller: M
257
+ });
258
+ return /* @__PURE__ */ u(
259
+ Ve,
260
+ {
261
+ scope: t,
262
+ triggerRef: s,
263
+ contentRef: m,
264
+ contentId: w(),
265
+ titleId: w(),
266
+ descriptionId: w(),
267
+ open: p,
268
+ onOpenChange: E,
269
+ onOpenToggle: i.useCallback(() => E((c) => !c), [E]),
270
+ modal: l,
271
+ children: n
272
+ }
273
+ );
274
+ };
275
+ ne.displayName = M;
276
+ var oe = "DialogTrigger", re = i.forwardRef(
277
+ (e, t) => {
278
+ const { __scopeDialog: n, ...o } = e, r = y(oe, n), a = F(t, r.triggerRef);
279
+ return /* @__PURE__ */ u(
280
+ O.button,
281
+ {
282
+ type: "button",
283
+ "aria-haspopup": "dialog",
284
+ "aria-expanded": r.open,
285
+ "aria-controls": r.contentId,
286
+ "data-state": V(r.open),
287
+ ...o,
288
+ ref: a,
289
+ onClick: _(e.onClick, r.onOpenToggle)
290
+ }
291
+ );
292
+ }
293
+ );
294
+ re.displayName = oe;
295
+ var K = "DialogPortal", [He, ae] = te(K, {
296
+ forceMount: void 0
297
+ }), se = (e) => {
298
+ const { __scopeDialog: t, forceMount: n, children: o, container: r } = e, a = y(K, t);
299
+ return /* @__PURE__ */ u(He, { scope: t, forceMount: n, children: i.Children.map(o, (l) => /* @__PURE__ */ u(U, { present: n || a.open, children: /* @__PURE__ */ u(be, { asChild: !0, container: r, children: l }) })) });
300
+ };
301
+ se.displayName = K;
302
+ var T = "DialogOverlay", ie = i.forwardRef(
303
+ (e, t) => {
304
+ const n = ae(T, e.__scopeDialog), { forceMount: o = n.forceMount, ...r } = e, a = y(T, e.__scopeDialog);
305
+ return a.modal ? /* @__PURE__ */ u(U, { present: o || a.open, children: /* @__PURE__ */ u(je, { ...r, ref: t }) }) : null;
306
+ }
307
+ );
308
+ ie.displayName = T;
309
+ var $e = /* @__PURE__ */ We("DialogOverlay.RemoveScroll"), je = i.forwardRef(
310
+ (e, t) => {
311
+ const { __scopeDialog: n, ...o } = e, r = y(T, n);
312
+ return (
313
+ // Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
314
+ // ie. when `Overlay` and `Content` are siblings
315
+ /* @__PURE__ */ u(Re, { as: $e, allowPinchZoom: !0, shards: [r.contentRef], children: /* @__PURE__ */ u(
316
+ O.div,
317
+ {
318
+ "data-state": V(r.open),
319
+ ...o,
320
+ ref: t,
321
+ style: { pointerEvents: "auto", ...o.style }
322
+ }
323
+ ) })
324
+ );
325
+ }
326
+ ), R = "DialogContent", ce = i.forwardRef(
327
+ (e, t) => {
328
+ const n = ae(R, e.__scopeDialog), { forceMount: o = n.forceMount, ...r } = e, a = y(R, e.__scopeDialog);
329
+ return /* @__PURE__ */ u(U, { present: o || a.open, children: a.modal ? /* @__PURE__ */ u(Be, { ...r, ref: t }) : /* @__PURE__ */ u(qe, { ...r, ref: t }) });
330
+ }
331
+ );
332
+ ce.displayName = R;
333
+ var Be = i.forwardRef(
334
+ (e, t) => {
335
+ const n = y(R, e.__scopeDialog), o = i.useRef(null), r = F(t, n.contentRef, o);
336
+ return i.useEffect(() => {
337
+ const a = o.current;
338
+ if (a) return xe(a);
339
+ }, []), /* @__PURE__ */ u(
340
+ ue,
341
+ {
342
+ ...e,
343
+ ref: r,
344
+ trapFocus: n.open,
345
+ disableOutsidePointerEvents: !0,
346
+ onCloseAutoFocus: _(e.onCloseAutoFocus, (a) => {
347
+ a.preventDefault(), n.triggerRef.current?.focus();
348
+ }),
349
+ onPointerDownOutside: _(e.onPointerDownOutside, (a) => {
350
+ const l = a.detail.originalEvent, s = l.button === 0 && l.ctrlKey === !0;
351
+ (l.button === 2 || s) && a.preventDefault();
352
+ }),
353
+ onFocusOutside: _(
354
+ e.onFocusOutside,
355
+ (a) => a.preventDefault()
356
+ )
357
+ }
358
+ );
359
+ }
360
+ ), qe = i.forwardRef(
361
+ (e, t) => {
362
+ const n = y(R, e.__scopeDialog), o = i.useRef(!1), r = i.useRef(!1);
363
+ return /* @__PURE__ */ u(
364
+ ue,
365
+ {
366
+ ...e,
367
+ ref: t,
368
+ trapFocus: !1,
369
+ disableOutsidePointerEvents: !1,
370
+ onCloseAutoFocus: (a) => {
371
+ e.onCloseAutoFocus?.(a), a.defaultPrevented || (o.current || n.triggerRef.current?.focus(), a.preventDefault()), o.current = !1, r.current = !1;
372
+ },
373
+ onInteractOutside: (a) => {
374
+ e.onInteractOutside?.(a), a.defaultPrevented || (o.current = !0, a.detail.originalEvent.type === "pointerdown" && (r.current = !0));
375
+ const l = a.target;
376
+ n.triggerRef.current?.contains(l) && a.preventDefault(), a.detail.originalEvent.type === "focusin" && r.current && a.preventDefault();
377
+ }
378
+ }
379
+ );
380
+ }
381
+ ), ue = i.forwardRef(
382
+ (e, t) => {
383
+ const { __scopeDialog: n, trapFocus: o, onOpenAutoFocus: r, onCloseAutoFocus: a, ...l } = e, s = y(R, n), m = i.useRef(null), p = F(t, m);
384
+ return Te(), /* @__PURE__ */ j(B, { children: [
385
+ /* @__PURE__ */ u(
386
+ Q,
387
+ {
388
+ asChild: !0,
389
+ loop: !0,
390
+ trapped: o,
391
+ onMountAutoFocus: r,
392
+ onUnmountAutoFocus: a,
393
+ children: /* @__PURE__ */ u(
394
+ De,
395
+ {
396
+ role: "dialog",
397
+ id: s.contentId,
398
+ "aria-describedby": s.descriptionId,
399
+ "aria-labelledby": s.titleId,
400
+ "data-state": V(s.open),
401
+ ...l,
402
+ ref: p,
403
+ onDismiss: () => s.onOpenChange(!1)
404
+ }
405
+ )
406
+ }
407
+ ),
408
+ /* @__PURE__ */ j(B, { children: [
409
+ /* @__PURE__ */ u(Ze, { titleId: s.titleId }),
410
+ /* @__PURE__ */ u(ze, { contentRef: m, descriptionId: s.descriptionId })
411
+ ] })
412
+ ] });
413
+ }
414
+ ), G = "DialogTitle", le = i.forwardRef(
415
+ (e, t) => {
416
+ const { __scopeDialog: n, ...o } = e, r = y(G, n);
417
+ return /* @__PURE__ */ u(O.h2, { id: r.titleId, ...o, ref: t });
418
+ }
419
+ );
420
+ le.displayName = G;
421
+ var fe = "DialogDescription", de = i.forwardRef(
422
+ (e, t) => {
423
+ const { __scopeDialog: n, ...o } = e, r = y(fe, n);
424
+ return /* @__PURE__ */ u(O.p, { id: r.descriptionId, ...o, ref: t });
425
+ }
426
+ );
427
+ de.displayName = fe;
428
+ var pe = "DialogClose", me = i.forwardRef(
429
+ (e, t) => {
430
+ const { __scopeDialog: n, ...o } = e, r = y(pe, n);
431
+ return /* @__PURE__ */ u(
432
+ O.button,
433
+ {
434
+ type: "button",
435
+ ...o,
436
+ ref: t,
437
+ onClick: _(e.onClick, () => r.onOpenChange(!1))
438
+ }
439
+ );
440
+ }
441
+ );
442
+ me.displayName = pe;
443
+ function V(e) {
444
+ return e ? "open" : "closed";
445
+ }
446
+ var ve = "DialogTitleWarning", [it, ge] = he(ve, {
447
+ contentName: R,
448
+ titleName: G,
449
+ docsSlug: "dialog"
450
+ }), Ze = ({ titleId: e }) => {
451
+ const t = ge(ve), n = `\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
452
+
453
+ If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
454
+
455
+ For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;
456
+ return i.useEffect(() => {
457
+ e && (document.getElementById(e) || console.error(n));
458
+ }, [n, e]), null;
459
+ }, Ye = "DialogDescriptionWarning", ze = ({ contentRef: e, descriptionId: t }) => {
460
+ const o = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${ge(Ye).contentName}}.`;
461
+ return i.useEffect(() => {
462
+ const r = e.current?.getAttribute("aria-describedby");
463
+ t && r && (document.getElementById(t) || console.warn(o));
464
+ }, [o, e, t]), null;
465
+ }, ct = ne, ut = re, lt = se, ft = ie, dt = ce, pt = le, mt = de, vt = me;
466
+ export {
467
+ dt as C,
468
+ le as D,
469
+ ft as O,
470
+ lt as P,
471
+ ct as R,
472
+ ut as T,
473
+ it as W,
474
+ se as a,
475
+ vt as b,
476
+ st as c,
477
+ pt as d,
478
+ mt as e
479
+ };
@@ -0,0 +1,135 @@
1
+ import { jsx as i, Fragment as O, jsxs as w } from "react/jsx-runtime";
2
+ import * as l from "react";
3
+ import { forwardRef as I } from "react";
4
+ import { c as x, b as M } from "./index-DKfEnhKr.js";
5
+ import { u } from "./index-DLcqcWxM.js";
6
+ import { c as A, T as L, R as $, P as F, O as B, W as G, C as W, d as j, e as Y, b as f } from "./index-CeZcoQDw.js";
7
+ import { Button as k } from "./components/Button/Button.js";
8
+ import { cn as q } from "./utils/index.js";
9
+ var H = /* @__PURE__ */ Symbol("radix.slottable");
10
+ // @__NO_SIDE_EFFECTS__
11
+ function V(r) {
12
+ const e = ({ children: o }) => /* @__PURE__ */ i(O, { children: o });
13
+ return e.displayName = `${r}.Slottable`, e.__radixId = H, e;
14
+ }
15
+ var v = "AlertDialog", [z, pe] = x(v, [
16
+ A
17
+ ]), s = A(), m = (r) => {
18
+ const { __scopeAlertDialog: e, ...o } = r, t = s(e);
19
+ return /* @__PURE__ */ i($, { ...t, ...o, modal: !0 });
20
+ };
21
+ m.displayName = v;
22
+ var J = "AlertDialogTrigger", D = l.forwardRef(
23
+ (r, e) => {
24
+ const { __scopeAlertDialog: o, ...t } = r, a = s(o);
25
+ return /* @__PURE__ */ i(L, { ...a, ...t, ref: e });
26
+ }
27
+ );
28
+ D.displayName = J;
29
+ var K = "AlertDialogPortal", _ = (r) => {
30
+ const { __scopeAlertDialog: e, ...o } = r, t = s(e);
31
+ return /* @__PURE__ */ i(F, { ...t, ...o });
32
+ };
33
+ _.displayName = K;
34
+ var Q = "AlertDialogOverlay", y = l.forwardRef(
35
+ (r, e) => {
36
+ const { __scopeAlertDialog: o, ...t } = r, a = s(o);
37
+ return /* @__PURE__ */ i(B, { ...a, ...t, ref: e });
38
+ }
39
+ );
40
+ y.displayName = Q;
41
+ var n = "AlertDialogContent", [U, X] = z(n), Z = /* @__PURE__ */ V("AlertDialogContent"), N = l.forwardRef(
42
+ (r, e) => {
43
+ const { __scopeAlertDialog: o, children: t, ...a } = r, c = s(o), d = l.useRef(null), P = u(e, d), g = l.useRef(null);
44
+ return /* @__PURE__ */ i(
45
+ G,
46
+ {
47
+ contentName: n,
48
+ titleName: R,
49
+ docsSlug: "alert-dialog",
50
+ children: /* @__PURE__ */ i(U, { scope: o, cancelRef: g, children: /* @__PURE__ */ w(
51
+ W,
52
+ {
53
+ role: "alertdialog",
54
+ ...c,
55
+ ...a,
56
+ ref: P,
57
+ onOpenAutoFocus: M(a.onOpenAutoFocus, (p) => {
58
+ p.preventDefault(), g.current?.focus({ preventScroll: !0 });
59
+ }),
60
+ onPointerDownOutside: (p) => p.preventDefault(),
61
+ onInteractOutside: (p) => p.preventDefault(),
62
+ children: [
63
+ /* @__PURE__ */ i(Z, { children: t }),
64
+ /* @__PURE__ */ i(re, { contentRef: d })
65
+ ]
66
+ }
67
+ ) })
68
+ }
69
+ );
70
+ }
71
+ );
72
+ N.displayName = n;
73
+ var R = "AlertDialogTitle", h = l.forwardRef(
74
+ (r, e) => {
75
+ const { __scopeAlertDialog: o, ...t } = r, a = s(o);
76
+ return /* @__PURE__ */ i(j, { ...a, ...t, ref: e });
77
+ }
78
+ );
79
+ h.displayName = R;
80
+ var C = "AlertDialogDescription", S = l.forwardRef((r, e) => {
81
+ const { __scopeAlertDialog: o, ...t } = r, a = s(o);
82
+ return /* @__PURE__ */ i(Y, { ...a, ...t, ref: e });
83
+ });
84
+ S.displayName = C;
85
+ var ee = "AlertDialogAction", E = l.forwardRef(
86
+ (r, e) => {
87
+ const { __scopeAlertDialog: o, ...t } = r, a = s(o);
88
+ return /* @__PURE__ */ i(f, { ...a, ...t, ref: e });
89
+ }
90
+ );
91
+ E.displayName = ee;
92
+ var T = "AlertDialogCancel", b = l.forwardRef(
93
+ (r, e) => {
94
+ const { __scopeAlertDialog: o, ...t } = r, { cancelRef: a } = X(T, o), c = s(o), d = u(e, a);
95
+ return /* @__PURE__ */ i(f, { ...c, ...t, ref: d });
96
+ }
97
+ );
98
+ b.displayName = T;
99
+ var re = ({ contentRef: r }) => {
100
+ const e = `\`${n}\` requires a description for the component to be accessible for screen reader users.
101
+
102
+ You can add a description to the \`${n}\` by passing a \`${C}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
103
+
104
+ Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${n}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
105
+
106
+ For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;
107
+ return l.useEffect(() => {
108
+ document.getElementById(
109
+ r.current?.getAttribute("aria-describedby")
110
+ ) || console.warn(e);
111
+ }, [e, r]), null;
112
+ }, de = m, oe = D, ge = _, ue = y, Ae = N, fe = E, ve = b, me = h, De = S;
113
+ const _e = I(({ "data-theme": r, className: e, text: o, variant: t, onOpen: a }, c) => /* @__PURE__ */ i(oe, { asChild: !0, children: /* @__PURE__ */ i(
114
+ k,
115
+ {
116
+ ref: c,
117
+ type: "button",
118
+ variant: t,
119
+ "data-theme": r,
120
+ className: q(e),
121
+ onClick: a,
122
+ children: o
123
+ }
124
+ ) }));
125
+ export {
126
+ _e as A,
127
+ Ae as C,
128
+ De as D,
129
+ ue as O,
130
+ ge as P,
131
+ de as R,
132
+ me as T,
133
+ ve as a,
134
+ fe as b
135
+ };
@@ -1,8 +1,8 @@
1
- import { R as Ee, P as ke, O as Se, C as Ie } from "./index-DzIBBMjs.js";
1
+ import { R as Ee, P as ke, O as Se, C as Ie } from "./index-CeZcoQDw.js";
2
2
  import * as n from "react";
3
- import { P as C } from "./index-BITvcJAz.js";
4
- import { u as P } from "./index-bwWKd82e.js";
5
- import { a as j } from "./index-DQH6odE9.js";
3
+ import { P as C } from "./index-DKfEnhKr.js";
4
+ import { u as P } from "./index-Dy59FQl5.js";
5
+ import { c as j } from "./index-DLcqcWxM.js";
6
6
  var de = 1, xe = 0.9, Re = 0.8, Ce = 0.17, Q = 0.1, Z = 0.999, Ae = 0.9999, Me = 0.99, $e = /[\\\/_+.#"@\[\(\{&]/, De = /[\\\/_+.#"@\[\(\{&]/g, Fe = /[\s-]/, me = /[\s-]/g;
7
7
  function ee(t, l, r, f, u, c, d) {
8
8
  if (c === l.length) return u === t.length ? de : Me;