@konstructio/ui 0.1.2-alpha.4 → 0.1.2-alpha.41

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 (179) hide show
  1. package/dist/{Combination-VYaRRJBZ.js → Combination-BtmnusWq.js} +141 -138
  2. package/dist/DatePicker.css +1 -1
  3. package/dist/Modal-CtAG97Ts.js +99 -0
  4. package/dist/_commonjsHelpers-DaMA6jEr.js +8 -0
  5. package/dist/chevron-down-DgT-uSF9.js +5 -0
  6. package/dist/chevron-left-C4LEg1fH.js +7 -0
  7. package/dist/chevron-up-CRyLc5Ml.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 +1 -1
  11. package/dist/components/AlertDialog/components/AlertDialogTrigger.js +1 -1
  12. package/dist/components/AlertDialog/components/index.js +1 -1
  13. package/dist/components/Badge/Badge.js +42 -44
  14. package/dist/components/Badge/Badge.variants.js +8 -6
  15. package/dist/components/Breadcrumb/Breadcrumb.js +1 -1
  16. package/dist/components/Breadcrumb/components/Item/Item.js +24 -23
  17. package/dist/components/Breadcrumb/hooks/useBreadcrumb.js +1 -1
  18. package/dist/components/Button/Button.js +1 -1
  19. package/dist/components/Button/Button.variants.js +1 -1
  20. package/dist/components/Card/Card.variants.js +5 -9
  21. package/dist/components/Checkbox/Checkbox.js +6 -6
  22. package/dist/components/Command/Command.js +2 -2
  23. package/dist/components/Command/components/Command.js +1 -1
  24. package/dist/components/Command/components/CommandEmpty.js +1 -1
  25. package/dist/components/Command/components/CommandGroup.js +1 -1
  26. package/dist/components/Command/components/CommandInput.js +2 -2
  27. package/dist/components/Command/components/CommandItem.js +1 -1
  28. package/dist/components/Command/components/CommandList.js +1 -1
  29. package/dist/components/Command/components/CommandSeparator.js +1 -1
  30. package/dist/components/Command/components/DialogContent.js +2 -2
  31. package/dist/components/Command/components/DialogOverlay.js +1 -1
  32. package/dist/components/Datepicker/DatePicker.js +1243 -1191
  33. package/dist/components/Divider/Divider.variants.js +1 -1
  34. package/dist/components/Dropdown/Dropdown.js +37 -31
  35. package/dist/components/Dropdown/Dropdown.variants.js +9 -4
  36. package/dist/components/Dropdown/components/List/List.js +128 -59
  37. package/dist/components/Dropdown/components/ListItem/ListItem.js +90 -39
  38. package/dist/components/Dropdown/components/Wrapper.js +141 -134
  39. package/dist/components/Dropdown/constants/index.js +4 -0
  40. package/dist/components/Dropdown/constants/pagination.js +4 -0
  41. package/dist/components/Dropdown/contexts/dropdown.context.js +17 -0
  42. package/dist/components/Dropdown/contexts/dropdown.provider.js +48 -20
  43. package/dist/components/Dropdown/hooks/useDropdown.js +74 -29
  44. package/dist/components/Dropdown/hooks/useNavigationList.js +27 -39
  45. package/dist/components/DropdownButton/DropdownButton.js +1 -1
  46. package/dist/components/Filter/Filter.variants.js +2 -2
  47. package/dist/components/Filter/components/BadgeDropdown/BadgeMultiSelect.js +1 -1
  48. package/dist/components/Filter/components/DateFilterDropdown/DateFilterDropdown.js +1 -1
  49. package/dist/components/Input/Input.js +1 -1
  50. package/dist/components/Input/Input.variants.js +2 -1
  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 +34 -0
  60. package/dist/components/MultiSelectDropdown/components/Item/Item.js +38 -0
  61. package/dist/components/MultiSelectDropdown/components/Item/Item.variants.js +38 -0
  62. package/dist/components/MultiSelectDropdown/components/List/List.js +37 -0
  63. package/dist/components/MultiSelectDropdown/components/List/List.variants.js +23 -0
  64. package/dist/components/MultiSelectDropdown/components/Wrapper/Wrapper.js +105 -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/NumberInput/NumberInput.js +2 -2
  72. package/dist/components/PhoneNumberInput/PhoneNumberInput.js +8 -0
  73. package/dist/components/PhoneNumberInput/PhoneNumberInput.variants.js +46 -0
  74. package/dist/components/PhoneNumberInput/components/FlagContent/FlagContent.js +27 -0
  75. package/dist/components/PhoneNumberInput/components/FlagSelectorList/FlagSelectorList.js +629 -0
  76. package/dist/components/PhoneNumberInput/components/FlagSelectorWrapper/FlagSelectorWrapper.js +36 -0
  77. package/dist/components/PhoneNumberInput/components/TruncateText/TruncateText.js +45 -0
  78. package/dist/components/PhoneNumberInput/components/Wrapper.js +625 -0
  79. package/dist/components/PhoneNumberInput/components/index.js +6 -0
  80. package/dist/components/PhoneNumberInput/contexts/index.js +8 -0
  81. package/dist/components/PhoneNumberInput/contexts/phone-number.context.js +28 -0
  82. package/dist/components/PhoneNumberInput/contexts/phone-number.hook.js +13 -0
  83. package/dist/components/PhoneNumberInput/contexts/phone-number.provider.js +6144 -0
  84. package/dist/components/PhoneNumberInput/utils/index.js +11 -0
  85. package/dist/components/PieChart/PieChart.js +647 -664
  86. package/dist/components/RadioCard/RadioCard.variants.js +1 -6
  87. package/dist/components/RadioGroup/RadioGroup.js +1 -1
  88. package/dist/components/Range/Range.js +1 -1
  89. package/dist/components/Sidebar/Sidebar.variants.js +2 -2
  90. package/dist/components/Sidebar/components/Wrapper/Wrapper.js +29 -28
  91. package/dist/components/Slider/Slider.js +1 -1
  92. package/dist/components/Switch/Switch.js +8 -8
  93. package/dist/components/Switch/Switch.variants.js +4 -4
  94. package/dist/components/Tabs/Tabs.js +1 -1
  95. package/dist/components/Tabs/Tabs.variants.js +1 -1
  96. package/dist/components/Tabs/components/Content.js +1 -1
  97. package/dist/components/Tabs/components/List.js +1 -1
  98. package/dist/components/Tabs/components/Trigger.js +1 -1
  99. package/dist/components/Tag/Tag.js +1 -1
  100. package/dist/components/Tag/Tag.variants.js +1 -0
  101. package/dist/components/TagSelect/components/Wrapper/Wrapper.js +49 -98
  102. package/dist/components/TimePicker/TimePicker.variants.js +2 -2
  103. package/dist/components/TimePicker/components/Wrapper/Wrapper.js +2 -2
  104. package/dist/components/Toast/Toast.js +283 -255
  105. package/dist/components/Toast/Toast.variants.js +37 -24
  106. package/dist/components/Tooltip/Tooltip.js +15 -14
  107. package/dist/components/Tooltip/Tooltip.variants.js +5 -4
  108. package/dist/components/Typography/Typography.variants.js +18 -23
  109. package/dist/components/VirtualizedTable/VirtualizedTable.js +121 -0
  110. package/dist/components/VirtualizedTable/VirtualizedTable.variants.js +5 -0
  111. package/dist/components/VirtualizedTable/assets/chevron-down.js +25 -0
  112. package/dist/components/VirtualizedTable/assets/chevron-up.js +25 -0
  113. package/dist/components/VirtualizedTable/assets/index.js +6 -0
  114. package/dist/components/VirtualizedTable/components/Actions/Actions.js +72 -0
  115. package/dist/components/VirtualizedTable/components/Body/Body.js +51 -0
  116. package/dist/components/VirtualizedTable/components/DotPaginate/DotPaginate.js +165 -0
  117. package/dist/components/VirtualizedTable/components/DropdownPaginate/DropdownPaginate.js +34 -0
  118. package/dist/components/VirtualizedTable/components/Filter/Filter.js +93 -0
  119. package/dist/components/VirtualizedTable/components/FormPaginate/FormPaginate.js +48 -0
  120. package/dist/components/VirtualizedTable/components/Header/Header.js +84 -0
  121. package/dist/components/VirtualizedTable/components/Pagination/Pagination.js +53 -0
  122. package/dist/components/VirtualizedTable/components/Skeleton/Skeleton.js +67 -0
  123. package/dist/components/VirtualizedTable/components/TruncateText/TruncateText.js +34 -0
  124. package/dist/components/VirtualizedTable/components/WrapperBody/WrapperBody.js +27 -0
  125. package/dist/components/VirtualizedTable/components/index.js +16 -0
  126. package/dist/components/VirtualizedTable/constants/index.js +5 -0
  127. package/dist/components/VirtualizedTable/constants/pagination.js +5 -0
  128. package/dist/components/VirtualizedTable/contexts/index.js +8 -0
  129. package/dist/components/VirtualizedTable/contexts/table.context.js +32 -0
  130. package/dist/components/VirtualizedTable/contexts/table.hook.js +11 -0
  131. package/dist/components/VirtualizedTable/contexts/table.provider.js +85 -0
  132. package/dist/components/index.js +88 -80
  133. package/dist/contexts/theme.provider.js +0 -1
  134. package/dist/{createLucideIcon-DbC6TvM5.js → createLucideIcon-D4r5Phnh.js} +0 -24
  135. package/dist/debounce-BFejQm9P.js +200 -0
  136. package/dist/ellipsis-vertical-BVPtjl5f.js +9 -0
  137. package/dist/{index-h-Ul0anl.js → index--V_ZsiQe.js} +1 -22
  138. package/dist/index-2hB40Iuc.js +1873 -0
  139. package/dist/index-BZPx6jYI.js +8 -0
  140. package/dist/{index-bwWKd82e.js → index-BbQkJE5L.js} +1 -1
  141. package/dist/index-BtQfgaSF.js +60 -0
  142. package/dist/index-C3tHPg8y.js +662 -0
  143. package/dist/index-C65LtGuU.js +137 -0
  144. package/dist/index-CIAmiWcw.js +200 -0
  145. package/dist/index-CSFe9uC5.js +14 -0
  146. package/dist/index-CSWGJT-v.js +1722 -0
  147. package/dist/{index-D3xzCzcO.js → index-CdwPV0FE.js} +4 -4
  148. package/dist/index-CigKKiZS.js +91 -0
  149. package/dist/{index-BAraV3ai.js → index-DH2Fnov1.js} +11 -12
  150. package/dist/index-DLcqcWxM.js +29 -0
  151. package/dist/index-Dbt2vBmS.js +136 -0
  152. package/dist/{index-DB2XhXHn.js → index-DpW9ExsS.js} +7 -7
  153. package/dist/index-DrWQH0QF.js +55 -0
  154. package/dist/index-Ds6U2x4Z.js +479 -0
  155. package/dist/{index-C1g_chDT.js → index-mPY_8Y5v.js} +2 -2
  156. package/dist/index-ohdbKsws.js +27 -0
  157. package/dist/index.d.ts +232 -23
  158. package/dist/index.js +112 -102
  159. package/dist/libphonenumber-_7ZyKWA7.js +11549 -0
  160. package/dist/loader-juvMSJ9L.js +5 -0
  161. package/dist/package.json +48 -34
  162. package/dist/styles.css +1 -1
  163. package/dist/ui/civo-theme.css +191 -167
  164. package/dist/{useBreadcrumb-B8DnuqkR.js → useBreadcrumb-BAHbGQ_O.js} +0 -10
  165. package/dist/utils/index.js +534 -501
  166. package/dist/{x-BPcqkRZd.js → x-DPU9OdYH.js} +1 -1
  167. package/package.json +48 -34
  168. package/dist/Modal-V67Uz78z.js +0 -98
  169. package/dist/_commonjsHelpers-C6fGbg64.js +0 -6
  170. package/dist/chevron-down-BLZPftpV.js +0 -11
  171. package/dist/index-BXuxPoz7.js +0 -435
  172. package/dist/index-BfXxHr_2.js +0 -125
  173. package/dist/index-C9T9HQaa.js +0 -423
  174. package/dist/index-CZnD2QxM.js +0 -32
  175. package/dist/index-CrBonFvu.js +0 -144
  176. package/dist/index-Cvx4lqTq.js +0 -47
  177. package/dist/index-DQH6odE9.js +0 -82
  178. package/dist/index-Oq5GlCHP.js +0 -131
  179. package/dist/index-iXyXtdgP.js +0 -31
@@ -1,144 +0,0 @@
1
- import * as r from "react";
2
- import { b as p, u as U } from "./index-BfXxHr_2.js";
3
- import { P as m, d as z, R as H } from "./index-C9T9HQaa.js";
4
- import { u as T } from "./index-DQH6odE9.js";
5
- import { u as b } from "./index-0ioNhtNM.js";
6
- import { jsx as P } from "react/jsx-runtime";
7
- function K(n, e = globalThis?.document) {
8
- const t = b(n);
9
- r.useEffect(() => {
10
- const o = (s) => {
11
- s.key === "Escape" && t(s);
12
- };
13
- return e.addEventListener("keydown", o, { capture: !0 }), () => e.removeEventListener("keydown", o, { capture: !0 });
14
- }, [t, e]);
15
- }
16
- var j = "DismissableLayer", h = "dismissableLayer.update", X = "dismissableLayer.pointerDownOutside", Y = "dismissableLayer.focusOutside", w, B = r.createContext({
17
- layers: /* @__PURE__ */ new Set(),
18
- layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
19
- branches: /* @__PURE__ */ new Set()
20
- }), x = r.forwardRef(
21
- (n, e) => {
22
- const {
23
- disableOutsidePointerEvents: t = !1,
24
- onEscapeKeyDown: o,
25
- onPointerDownOutside: s,
26
- onFocusOutside: a,
27
- onInteractOutside: d,
28
- onDismiss: l,
29
- ...E
30
- } = n, c = r.useContext(B), [u, S] = r.useState(null), f = u?.ownerDocument ?? globalThis?.document, [, A] = r.useState({}), N = T(e, (i) => S(i)), D = Array.from(c.layers), [W] = [...c.layersWithOutsidePointerEventsDisabled].slice(-1), k = D.indexOf(W), O = u ? D.indexOf(u) : -1, _ = c.layersWithOutsidePointerEventsDisabled.size > 0, L = O >= k, M = G((i) => {
31
- const v = i.target, R = [...c.branches].some((y) => y.contains(v));
32
- !L || R || (s?.(i), d?.(i), i.defaultPrevented || l?.());
33
- }, f), C = J((i) => {
34
- const v = i.target;
35
- [...c.branches].some((y) => y.contains(v)) || (a?.(i), d?.(i), i.defaultPrevented || l?.());
36
- }, f);
37
- return K((i) => {
38
- O === c.layers.size - 1 && (o?.(i), !i.defaultPrevented && l && (i.preventDefault(), l()));
39
- }, f), r.useEffect(() => {
40
- if (u)
41
- return t && (c.layersWithOutsidePointerEventsDisabled.size === 0 && (w = f.body.style.pointerEvents, f.body.style.pointerEvents = "none"), c.layersWithOutsidePointerEventsDisabled.add(u)), c.layers.add(u), g(), () => {
42
- t && c.layersWithOutsidePointerEventsDisabled.size === 1 && (f.body.style.pointerEvents = w);
43
- };
44
- }, [u, f, t, c]), r.useEffect(() => () => {
45
- u && (c.layers.delete(u), c.layersWithOutsidePointerEventsDisabled.delete(u), g());
46
- }, [u, c]), r.useEffect(() => {
47
- const i = () => A({});
48
- return document.addEventListener(h, i), () => document.removeEventListener(h, i);
49
- }, []), /* @__PURE__ */ P(
50
- m.div,
51
- {
52
- ...E,
53
- ref: N,
54
- style: {
55
- pointerEvents: _ ? L ? "auto" : "none" : void 0,
56
- ...n.style
57
- },
58
- onFocusCapture: p(n.onFocusCapture, C.onFocusCapture),
59
- onBlurCapture: p(n.onBlurCapture, C.onBlurCapture),
60
- onPointerDownCapture: p(
61
- n.onPointerDownCapture,
62
- M.onPointerDownCapture
63
- )
64
- }
65
- );
66
- }
67
- );
68
- x.displayName = j;
69
- var q = "DismissableLayerBranch", F = r.forwardRef((n, e) => {
70
- const t = r.useContext(B), o = r.useRef(null), s = T(e, o);
71
- return r.useEffect(() => {
72
- const a = o.current;
73
- if (a)
74
- return t.branches.add(a), () => {
75
- t.branches.delete(a);
76
- };
77
- }, [t.branches]), /* @__PURE__ */ P(m.div, { ...n, ref: s });
78
- });
79
- F.displayName = q;
80
- function G(n, e = globalThis?.document) {
81
- const t = b(n), o = r.useRef(!1), s = r.useRef(() => {
82
- });
83
- return r.useEffect(() => {
84
- const a = (l) => {
85
- if (l.target && !o.current) {
86
- let E = function() {
87
- I(
88
- X,
89
- t,
90
- c,
91
- { discrete: !0 }
92
- );
93
- };
94
- const c = { originalEvent: l };
95
- l.pointerType === "touch" ? (e.removeEventListener("click", s.current), s.current = E, e.addEventListener("click", s.current, { once: !0 })) : E();
96
- } else
97
- e.removeEventListener("click", s.current);
98
- o.current = !1;
99
- }, d = window.setTimeout(() => {
100
- e.addEventListener("pointerdown", a);
101
- }, 0);
102
- return () => {
103
- window.clearTimeout(d), e.removeEventListener("pointerdown", a), e.removeEventListener("click", s.current);
104
- };
105
- }, [e, t]), {
106
- // ensures we check React component tree (not just DOM tree)
107
- onPointerDownCapture: () => o.current = !0
108
- };
109
- }
110
- function J(n, e = globalThis?.document) {
111
- const t = b(n), o = r.useRef(!1);
112
- return r.useEffect(() => {
113
- const s = (a) => {
114
- a.target && !o.current && I(Y, t, { originalEvent: a }, {
115
- discrete: !1
116
- });
117
- };
118
- return e.addEventListener("focusin", s), () => e.removeEventListener("focusin", s);
119
- }, [e, t]), {
120
- onFocusCapture: () => o.current = !0,
121
- onBlurCapture: () => o.current = !1
122
- };
123
- }
124
- function g() {
125
- const n = new CustomEvent(h);
126
- document.dispatchEvent(n);
127
- }
128
- function I(n, e, t, { discrete: o }) {
129
- const s = t.originalEvent.target, a = new CustomEvent(n, { bubbles: !1, cancelable: !0, detail: t });
130
- e && s.addEventListener(n, e, { once: !0 }), o ? z(s, a) : s.dispatchEvent(a);
131
- }
132
- var ne = x, re = F, Q = "Portal", V = r.forwardRef((n, e) => {
133
- const { container: t, ...o } = n, [s, a] = r.useState(!1);
134
- U(() => a(!0), []);
135
- const d = t || s && globalThis?.document?.body;
136
- return d ? H.createPortal(/* @__PURE__ */ P(m.div, { ...o, ref: e }), d) : null;
137
- });
138
- V.displayName = Q;
139
- export {
140
- re as B,
141
- x as D,
142
- V as P,
143
- ne as R
144
- };
@@ -1,47 +0,0 @@
1
- import r from "react";
2
- import { c as y } from "./index-BfXxHr_2.js";
3
- import { u as M, c as x } from "./index-DQH6odE9.js";
4
- import { jsx as d } from "react/jsx-runtime";
5
- function D(s) {
6
- const f = s + "CollectionProvider", [A, N] = y(f), [_, m] = A(
7
- f,
8
- { collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }
9
- ), p = (c) => {
10
- const { scope: e, children: l } = c, o = r.useRef(null), t = r.useRef(/* @__PURE__ */ new Map()).current;
11
- return /* @__PURE__ */ d(_, { scope: e, itemMap: t, collectionRef: o, children: l });
12
- };
13
- p.displayName = f;
14
- const a = s + "CollectionSlot", E = x(a), C = r.forwardRef(
15
- (c, e) => {
16
- const { scope: l, children: o } = c, t = m(a, l), n = M(e, t.collectionRef);
17
- return /* @__PURE__ */ d(E, { ref: n, children: o });
18
- }
19
- );
20
- C.displayName = a;
21
- const u = s + "CollectionItemSlot", R = "data-radix-collection-item", T = x(u), I = r.forwardRef(
22
- (c, e) => {
23
- const { scope: l, children: o, ...t } = c, n = r.useRef(null), S = M(e, n), i = m(u, l);
24
- return r.useEffect(() => (i.itemMap.set(n, { ref: n, ...t }), () => void i.itemMap.delete(n))), /* @__PURE__ */ d(T, { [R]: "", ref: S, children: o });
25
- }
26
- );
27
- I.displayName = u;
28
- function O(c) {
29
- const e = m(s + "CollectionConsumer", c);
30
- return r.useCallback(() => {
31
- const o = e.collectionRef.current;
32
- if (!o) return [];
33
- const t = Array.from(o.querySelectorAll(`[${R}]`));
34
- return Array.from(e.itemMap.values()).sort(
35
- (i, v) => t.indexOf(i.ref.current) - t.indexOf(v.ref.current)
36
- );
37
- }, [e.collectionRef, e.itemMap]);
38
- }
39
- return [
40
- { Provider: p, Slot: C, ItemSlot: I },
41
- O,
42
- N
43
- ];
44
- }
45
- export {
46
- D as c
47
- };
@@ -1,82 +0,0 @@
1
- import * as i from "react";
2
- import { jsx as f, Fragment as g } from "react/jsx-runtime";
3
- function d(e, n) {
4
- if (typeof e == "function")
5
- return e(n);
6
- e != null && (e.current = n);
7
- }
8
- function m(...e) {
9
- return (n) => {
10
- let r = !1;
11
- const o = e.map((t) => {
12
- const l = d(t, n);
13
- return !r && typeof l == "function" && (r = !0), l;
14
- });
15
- if (r)
16
- return () => {
17
- for (let t = 0; t < o.length; t++) {
18
- const l = o[t];
19
- typeof l == "function" ? l() : d(e[t], null);
20
- }
21
- };
22
- };
23
- }
24
- function x(...e) {
25
- return i.useCallback(m(...e), e);
26
- }
27
- // @__NO_SIDE_EFFECTS__
28
- function C(e) {
29
- const n = /* @__PURE__ */ b(e), r = i.forwardRef((o, t) => {
30
- const { children: l, ...a } = o, s = i.Children.toArray(l), c = s.find(E);
31
- if (c) {
32
- const u = c.props.children, S = s.map((p) => p === c ? i.Children.count(u) > 1 ? i.Children.only(null) : i.isValidElement(u) ? u.props.children : null : p);
33
- return /* @__PURE__ */ f(n, { ...a, ref: t, children: i.isValidElement(u) ? i.cloneElement(u, void 0, S) : null });
34
- }
35
- return /* @__PURE__ */ f(n, { ...a, ref: t, children: l });
36
- });
37
- return r.displayName = `${e}.Slot`, r;
38
- }
39
- var I = /* @__PURE__ */ C("Slot");
40
- // @__NO_SIDE_EFFECTS__
41
- function b(e) {
42
- const n = i.forwardRef((r, o) => {
43
- const { children: t, ...l } = r;
44
- if (i.isValidElement(t)) {
45
- const a = h(t), s = R(l, t.props);
46
- return t.type !== i.Fragment && (s.ref = o ? m(o, a) : a), i.cloneElement(t, s);
47
- }
48
- return i.Children.count(t) > 1 ? i.Children.only(null) : null;
49
- });
50
- return n.displayName = `${e}.SlotClone`, n;
51
- }
52
- var y = Symbol("radix.slottable");
53
- // @__NO_SIDE_EFFECTS__
54
- function V(e) {
55
- const n = ({ children: r }) => /* @__PURE__ */ f(g, { children: r });
56
- return n.displayName = `${e}.Slottable`, n.__radixId = y, n;
57
- }
58
- function E(e) {
59
- return i.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === y;
60
- }
61
- function R(e, n) {
62
- const r = { ...n };
63
- for (const o in n) {
64
- const t = e[o], l = n[o];
65
- /^on[A-Z]/.test(o) ? t && l ? r[o] = (...s) => {
66
- const c = l(...s);
67
- return t(...s), c;
68
- } : t && (r[o] = t) : o === "style" ? r[o] = { ...t, ...l } : o === "className" && (r[o] = [t, l].filter(Boolean).join(" "));
69
- }
70
- return { ...e, ...r };
71
- }
72
- function h(e) {
73
- let n = Object.getOwnPropertyDescriptor(e.props, "ref")?.get, r = n && "isReactWarning" in n && n.isReactWarning;
74
- return r ? e.ref : (n = Object.getOwnPropertyDescriptor(e, "ref")?.get, r = n && "isReactWarning" in n && n.isReactWarning, r ? e.props.ref : e.props.ref || e.ref);
75
- }
76
- export {
77
- I as S,
78
- m as a,
79
- V as b,
80
- C as c,
81
- x as u
82
- };
@@ -1,131 +0,0 @@
1
- import { jsx as i, jsxs as O } from "react/jsx-runtime";
2
- import * as l from "react";
3
- import { c as w, b as M } from "./index-BfXxHr_2.js";
4
- import { u, b as x } from "./index-DQH6odE9.js";
5
- import { c as A, R as I, P as $, O as L, W as F, C as G, T as W, d as j, b as v, e as B } from "./index-BXuxPoz7.js";
6
- import { Button as Y } from "./components/Button/Button.js";
7
- import { cn as k } from "./utils/index.js";
8
- var D = "AlertDialog", [q, le] = w(D, [
9
- A
10
- ]), s = A(), f = (e) => {
11
- const { __scopeAlertDialog: o, ...r } = e, a = s(o);
12
- return /* @__PURE__ */ i(I, { ...a, ...r, modal: !0 });
13
- };
14
- f.displayName = D;
15
- var H = "AlertDialogTrigger", m = l.forwardRef(
16
- (e, o) => {
17
- const { __scopeAlertDialog: r, ...a } = e, t = s(r);
18
- return /* @__PURE__ */ i(B, { ...t, ...a, ref: o });
19
- }
20
- );
21
- m.displayName = H;
22
- var V = "AlertDialogPortal", y = (e) => {
23
- const { __scopeAlertDialog: o, ...r } = e, a = s(o);
24
- return /* @__PURE__ */ i($, { ...a, ...r });
25
- };
26
- y.displayName = V;
27
- var z = "AlertDialogOverlay", _ = l.forwardRef(
28
- (e, o) => {
29
- const { __scopeAlertDialog: r, ...a } = e, t = s(r);
30
- return /* @__PURE__ */ i(L, { ...t, ...a, ref: o });
31
- }
32
- );
33
- _.displayName = z;
34
- var n = "AlertDialogContent", [J, K] = q(n), Q = x("AlertDialogContent"), N = l.forwardRef(
35
- (e, o) => {
36
- const { __scopeAlertDialog: r, children: a, ...t } = e, d = s(r), p = l.useRef(null), b = u(o, p), g = l.useRef(null);
37
- return /* @__PURE__ */ i(
38
- F,
39
- {
40
- contentName: n,
41
- titleName: h,
42
- docsSlug: "alert-dialog",
43
- children: /* @__PURE__ */ i(J, { scope: r, cancelRef: g, children: /* @__PURE__ */ O(
44
- G,
45
- {
46
- role: "alertdialog",
47
- ...d,
48
- ...t,
49
- ref: b,
50
- onOpenAutoFocus: M(t.onOpenAutoFocus, (c) => {
51
- c.preventDefault(), g.current?.focus({ preventScroll: !0 });
52
- }),
53
- onPointerDownOutside: (c) => c.preventDefault(),
54
- onInteractOutside: (c) => c.preventDefault(),
55
- children: [
56
- /* @__PURE__ */ i(Q, { children: a }),
57
- /* @__PURE__ */ i(X, { contentRef: p })
58
- ]
59
- }
60
- ) })
61
- }
62
- );
63
- }
64
- );
65
- N.displayName = n;
66
- var h = "AlertDialogTitle", C = l.forwardRef(
67
- (e, o) => {
68
- const { __scopeAlertDialog: r, ...a } = e, t = s(r);
69
- return /* @__PURE__ */ i(W, { ...t, ...a, ref: o });
70
- }
71
- );
72
- C.displayName = h;
73
- var R = "AlertDialogDescription", E = l.forwardRef((e, o) => {
74
- const { __scopeAlertDialog: r, ...a } = e, t = s(r);
75
- return /* @__PURE__ */ i(j, { ...t, ...a, ref: o });
76
- });
77
- E.displayName = R;
78
- var U = "AlertDialogAction", P = l.forwardRef(
79
- (e, o) => {
80
- const { __scopeAlertDialog: r, ...a } = e, t = s(r);
81
- return /* @__PURE__ */ i(v, { ...t, ...a, ref: o });
82
- }
83
- );
84
- P.displayName = U;
85
- var S = "AlertDialogCancel", T = l.forwardRef(
86
- (e, o) => {
87
- const { __scopeAlertDialog: r, ...a } = e, { cancelRef: t } = K(S, r), d = s(r), p = u(o, t);
88
- return /* @__PURE__ */ i(v, { ...d, ...a, ref: p });
89
- }
90
- );
91
- T.displayName = S;
92
- var X = ({ contentRef: e }) => {
93
- const o = `\`${n}\` requires a description for the component to be accessible for screen reader users.
94
-
95
- You can add a description to the \`${n}\` by passing a \`${R}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
96
-
97
- 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.
98
-
99
- For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;
100
- return l.useEffect(() => {
101
- document.getElementById(
102
- e.current?.getAttribute("aria-describedby")
103
- ) || console.warn(o);
104
- }, [o, e]), null;
105
- }, se = f, Z = m, ne = y, ce = _, pe = N, de = P, ge = T, ue = C, Ae = E;
106
- const ve = ({
107
- "data-theme": e,
108
- className: o,
109
- text: r,
110
- onOpen: a
111
- }) => /* @__PURE__ */ i(Z, { asChild: !0, children: /* @__PURE__ */ i(
112
- Y,
113
- {
114
- type: "button",
115
- "data-theme": e,
116
- className: k(o),
117
- onClick: a,
118
- children: r
119
- }
120
- ) });
121
- export {
122
- ve as A,
123
- pe as C,
124
- Ae as D,
125
- ce as O,
126
- ne as P,
127
- se as R,
128
- ue as T,
129
- ge as a,
130
- de as b
131
- };
@@ -1,31 +0,0 @@
1
- import * as i from "react";
2
- import { P as o } from "./index-C9T9HQaa.js";
3
- import { jsx as t } from "react/jsx-runtime";
4
- var d = Object.freeze({
5
- // See: https://github.com/twbs/bootstrap/blob/main/scss/mixins/_visually-hidden.scss
6
- position: "absolute",
7
- border: 0,
8
- width: 1,
9
- height: 1,
10
- padding: 0,
11
- margin: -1,
12
- overflow: "hidden",
13
- clip: "rect(0, 0, 0, 0)",
14
- whiteSpace: "nowrap",
15
- wordWrap: "normal"
16
- }), s = "VisuallyHidden", e = i.forwardRef(
17
- (r, a) => /* @__PURE__ */ t(
18
- o.span,
19
- {
20
- ...r,
21
- ref: a,
22
- style: { ...d, ...r.style }
23
- }
24
- )
25
- );
26
- e.displayName = s;
27
- var n = e;
28
- export {
29
- n as R,
30
- e as V
31
- };