@epilot/volt-ui 1.1.1 → 1.1.2-alpha.2

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 (212) hide show
  1. package/dist/components/badge/badge.d.ts +1 -1
  2. package/dist/components/button/button.d.ts +2 -0
  3. package/dist/index.cjs.js +1 -51
  4. package/dist/index.cjs10.js +1 -0
  5. package/dist/index.cjs100.js +1 -0
  6. package/dist/index.cjs101.js +1 -0
  7. package/dist/index.cjs102.js +1 -0
  8. package/dist/index.cjs103.js +1 -0
  9. package/dist/index.cjs104.js +1 -0
  10. package/dist/index.cjs105.js +1 -0
  11. package/dist/index.cjs106.js +1 -0
  12. package/dist/index.cjs11.js +1 -0
  13. package/dist/index.cjs12.js +1 -0
  14. package/dist/index.cjs13.js +1 -0
  15. package/dist/index.cjs14.js +1 -0
  16. package/dist/index.cjs15.js +1 -0
  17. package/dist/index.cjs16.js +1 -0
  18. package/dist/index.cjs17.js +1 -0
  19. package/dist/index.cjs18.js +1 -0
  20. package/dist/index.cjs19.js +1 -0
  21. package/dist/index.cjs20.js +1 -0
  22. package/dist/index.cjs21.js +1 -0
  23. package/dist/index.cjs22.js +1 -0
  24. package/dist/index.cjs23.js +1 -0
  25. package/dist/index.cjs24.js +1 -0
  26. package/dist/index.cjs25.js +1 -0
  27. package/dist/index.cjs26.js +1 -0
  28. package/dist/index.cjs27.js +1 -0
  29. package/dist/index.cjs28.js +1 -0
  30. package/dist/index.cjs29.js +1 -0
  31. package/dist/index.cjs30.js +1 -0
  32. package/dist/index.cjs31.js +1 -0
  33. package/dist/index.cjs32.js +1 -0
  34. package/dist/index.cjs33.js +1 -0
  35. package/dist/index.cjs34.js +1 -0
  36. package/dist/index.cjs35.js +1 -0
  37. package/dist/index.cjs36.js +1 -0
  38. package/dist/index.cjs37.js +1 -0
  39. package/dist/index.cjs38.js +1 -0
  40. package/dist/index.cjs39.js +1 -0
  41. package/dist/index.cjs4.js +1 -0
  42. package/dist/index.cjs40.js +5 -0
  43. package/dist/index.cjs41.js +1 -0
  44. package/dist/index.cjs42.js +1 -0
  45. package/dist/index.cjs43.js +1 -0
  46. package/dist/index.cjs44.js +7 -0
  47. package/dist/index.cjs45.js +1 -0
  48. package/dist/index.cjs46.js +1 -0
  49. package/dist/index.cjs47.js +1 -0
  50. package/dist/index.cjs48.js +1 -0
  51. package/dist/index.cjs49.js +1 -0
  52. package/dist/index.cjs5.js +1 -0
  53. package/dist/index.cjs50.js +1 -0
  54. package/dist/index.cjs51.js +1 -0
  55. package/dist/index.cjs52.js +1 -0
  56. package/dist/index.cjs53.js +1 -0
  57. package/dist/index.cjs54.js +1 -0
  58. package/dist/index.cjs55.js +1 -0
  59. package/dist/index.cjs56.js +1 -0
  60. package/dist/index.cjs57.js +1 -0
  61. package/dist/index.cjs58.js +1 -0
  62. package/dist/index.cjs59.js +1 -0
  63. package/dist/index.cjs6.js +1 -0
  64. package/dist/index.cjs60.js +1 -0
  65. package/dist/index.cjs61.js +1 -0
  66. package/dist/index.cjs62.js +1 -0
  67. package/dist/index.cjs63.js +1 -0
  68. package/dist/index.cjs64.js +1 -0
  69. package/dist/index.cjs65.js +1 -0
  70. package/dist/index.cjs66.js +1 -0
  71. package/dist/index.cjs67.js +1 -0
  72. package/dist/index.cjs68.js +1 -0
  73. package/dist/index.cjs69.js +1 -0
  74. package/dist/index.cjs7.js +1 -0
  75. package/dist/index.cjs70.js +1 -0
  76. package/dist/index.cjs71.js +1 -0
  77. package/dist/index.cjs72.js +1 -0
  78. package/dist/index.cjs73.js +1 -0
  79. package/dist/index.cjs74.js +1 -0
  80. package/dist/index.cjs75.js +1 -0
  81. package/dist/index.cjs76.js +1 -0
  82. package/dist/index.cjs77.js +1 -0
  83. package/dist/index.cjs78.js +1 -0
  84. package/dist/index.cjs79.js +1 -0
  85. package/dist/index.cjs8.js +1 -0
  86. package/dist/index.cjs80.js +1 -0
  87. package/dist/index.cjs81.js +1 -0
  88. package/dist/index.cjs82.js +1 -0
  89. package/dist/index.cjs83.js +1 -0
  90. package/dist/index.cjs84.js +1 -0
  91. package/dist/index.cjs85.js +1 -0
  92. package/dist/index.cjs86.js +1 -0
  93. package/dist/index.cjs87.js +1 -0
  94. package/dist/index.cjs88.js +1 -0
  95. package/dist/index.cjs89.js +1 -0
  96. package/dist/index.cjs9.js +1 -0
  97. package/dist/index.cjs90.js +1 -0
  98. package/dist/index.cjs91.js +4 -0
  99. package/dist/index.cjs92.js +1 -0
  100. package/dist/index.cjs93.js +1 -0
  101. package/dist/index.cjs94.js +1 -0
  102. package/dist/index.cjs95.js +1 -0
  103. package/dist/index.cjs96.js +1 -0
  104. package/dist/index.cjs97.js +38 -0
  105. package/dist/index.cjs98.js +1 -0
  106. package/dist/index.cjs99.js +1 -0
  107. package/dist/index.es.js +125 -11648
  108. package/dist/index.es10.js +29 -0
  109. package/dist/index.es100.js +68 -0
  110. package/dist/index.es101.js +6 -0
  111. package/dist/index.es102.js +25 -0
  112. package/dist/index.es103.js +25 -0
  113. package/dist/index.es104.js +15 -0
  114. package/dist/index.es105.js +30 -0
  115. package/dist/index.es106.js +7 -0
  116. package/dist/index.es11.js +250 -0
  117. package/dist/index.es12.js +230 -0
  118. package/dist/index.es13.js +34 -0
  119. package/dist/index.es14.js +40 -0
  120. package/dist/index.es15.js +43 -0
  121. package/dist/index.es16.js +115 -0
  122. package/dist/index.es17.js +24 -0
  123. package/dist/index.es18.js +36 -0
  124. package/dist/index.es19.js +137 -0
  125. package/dist/index.es20.js +50 -0
  126. package/dist/index.es21.js +54 -0
  127. package/dist/index.es22.js +74 -0
  128. package/dist/index.es23.js +172 -0
  129. package/dist/index.es24.js +89 -0
  130. package/dist/index.es25.js +113 -0
  131. package/dist/index.es26.js +85 -0
  132. package/dist/index.es27.js +61 -0
  133. package/dist/index.es28.js +746 -0
  134. package/dist/index.es29.js +17 -0
  135. package/dist/index.es30.js +2763 -0
  136. package/dist/index.es31.js +62 -0
  137. package/dist/index.es32.js +35 -0
  138. package/dist/index.es33.js +126 -0
  139. package/dist/index.es34.js +862 -0
  140. package/dist/index.es35.js +20 -0
  141. package/dist/index.es36.js +331 -0
  142. package/dist/index.es37.js +132 -0
  143. package/dist/index.es38.js +24 -0
  144. package/dist/index.es39.js +243 -0
  145. package/dist/index.es4.js +6 -0
  146. package/dist/index.es40.js +262 -0
  147. package/dist/index.es41.js +251 -0
  148. package/dist/index.es42.js +238 -0
  149. package/dist/index.es43.js +239 -0
  150. package/dist/index.es44.js +127 -0
  151. package/dist/index.es45.js +163 -0
  152. package/dist/index.es46.js +29 -0
  153. package/dist/index.es47.js +32 -0
  154. package/dist/index.es48.js +9 -0
  155. package/dist/index.es49.js +70 -0
  156. package/dist/index.es5.js +50 -0
  157. package/dist/index.es50.js +127 -0
  158. package/dist/index.es51.js +17 -0
  159. package/dist/index.es52.js +137 -0
  160. package/dist/index.es53.js +13 -0
  161. package/dist/index.es54.js +221 -0
  162. package/dist/index.es55.js +16 -0
  163. package/dist/index.es56.js +71 -0
  164. package/dist/index.es57.js +36 -0
  165. package/dist/index.es58.js +50 -0
  166. package/dist/index.es59.js +54 -0
  167. package/dist/index.es6.js +66 -0
  168. package/dist/index.es60.js +52 -0
  169. package/dist/index.es61.js +11 -0
  170. package/dist/index.es62.js +11 -0
  171. package/dist/index.es63.js +32 -0
  172. package/dist/index.es64.js +8 -0
  173. package/dist/index.es65.js +27 -0
  174. package/dist/index.es66.js +183 -0
  175. package/dist/index.es67.js +10 -0
  176. package/dist/index.es68.js +11 -0
  177. package/dist/index.es69.js +32 -0
  178. package/dist/index.es7.js +167 -0
  179. package/dist/index.es70.js +48 -0
  180. package/dist/index.es71.js +120 -0
  181. package/dist/index.es72.js +50 -0
  182. package/dist/index.es73.js +312 -0
  183. package/dist/index.es74.js +6 -0
  184. package/dist/index.es75.js +50 -0
  185. package/dist/index.es76.js +13 -0
  186. package/dist/index.es77.js +6 -0
  187. package/dist/index.es78.js +50 -0
  188. package/dist/index.es79.js +14 -0
  189. package/dist/index.es8.js +39 -0
  190. package/dist/index.es80.js +208 -0
  191. package/dist/index.es81.js +24 -0
  192. package/dist/index.es82.js +402 -0
  193. package/dist/index.es83.js +17 -0
  194. package/dist/index.es84.js +32 -0
  195. package/dist/index.es85.js +27 -0
  196. package/dist/index.es86.js +31 -0
  197. package/dist/index.es87.js +7 -0
  198. package/dist/index.es88.js +7 -0
  199. package/dist/index.es89.js +5 -0
  200. package/dist/index.es9.js +33 -0
  201. package/dist/index.es90.js +26 -0
  202. package/dist/index.es91.js +112 -0
  203. package/dist/index.es92.js +18 -0
  204. package/dist/index.es93.js +527 -0
  205. package/dist/index.es94.js +130 -0
  206. package/dist/index.es95.js +136 -0
  207. package/dist/index.es96.js +67 -0
  208. package/dist/index.es97.js +71 -0
  209. package/dist/index.es98.js +11 -0
  210. package/dist/index.es99.js +16 -0
  211. package/dist/style.css +1 -1
  212. package/package.json +1 -1
@@ -0,0 +1,239 @@
1
+ import s from "react";
2
+ import { createContextScope as X } from "./index.es49.js";
3
+ import { createCollection as Z } from "./index.es70.js";
4
+ import { useComposedRefs as $ } from "./index.es46.js";
5
+ import { composeEventHandlers as ee } from "./index.es48.js";
6
+ import { useControllableState as M } from "./index.es59.js";
7
+ import { Primitive as V } from "./index.es57.js";
8
+ import { createCollapsibleScope as H, Root as oe, Trigger as re, Content as te } from "./index.es71.js";
9
+ import { useId as ne } from "./index.es53.js";
10
+ import { useDirection as ce } from "./index.es67.js";
11
+ import { jsx as n } from "react/jsx-runtime";
12
+ var d = "Accordion", ie = ["Home", "End", "ArrowDown", "ArrowUp", "ArrowLeft", "ArrowRight"], [E, ae, le] = Z(d), [b] = X(d, [
13
+ le,
14
+ H
15
+ ]), S = H(), K = s.forwardRef(
16
+ (o, c) => {
17
+ const { type: e, ...t } = o, i = t, r = t;
18
+ return /* @__PURE__ */ n(E.Provider, { scope: o.__scopeAccordion, children: e === "multiple" ? /* @__PURE__ */ n(fe, { ...r, ref: c }) : /* @__PURE__ */ n(pe, { ...i, ref: c }) });
19
+ }
20
+ );
21
+ K.displayName = d;
22
+ var [L, se] = b(d), [z, de] = b(
23
+ d,
24
+ { collapsible: !1 }
25
+ ), pe = s.forwardRef(
26
+ (o, c) => {
27
+ const {
28
+ value: e,
29
+ defaultValue: t,
30
+ onValueChange: i = () => {
31
+ },
32
+ collapsible: r = !1,
33
+ ...l
34
+ } = o, [a, p] = M({
35
+ prop: e,
36
+ defaultProp: t ?? "",
37
+ onChange: i,
38
+ caller: d
39
+ });
40
+ return /* @__PURE__ */ n(
41
+ L,
42
+ {
43
+ scope: o.__scopeAccordion,
44
+ value: s.useMemo(() => a ? [a] : [], [a]),
45
+ onItemOpen: p,
46
+ onItemClose: s.useCallback(() => r && p(""), [r, p]),
47
+ children: /* @__PURE__ */ n(z, { scope: o.__scopeAccordion, collapsible: r, children: /* @__PURE__ */ n(G, { ...l, ref: c }) })
48
+ }
49
+ );
50
+ }
51
+ ), fe = s.forwardRef((o, c) => {
52
+ const {
53
+ value: e,
54
+ defaultValue: t,
55
+ onValueChange: i = () => {
56
+ },
57
+ ...r
58
+ } = o, [l, a] = M({
59
+ prop: e,
60
+ defaultProp: t ?? [],
61
+ onChange: i,
62
+ caller: d
63
+ }), p = s.useCallback(
64
+ (v) => a((u = []) => [...u, v]),
65
+ [a]
66
+ ), m = s.useCallback(
67
+ (v) => a((u = []) => u.filter((h) => h !== v)),
68
+ [a]
69
+ );
70
+ return /* @__PURE__ */ n(
71
+ L,
72
+ {
73
+ scope: o.__scopeAccordion,
74
+ value: l,
75
+ onItemOpen: p,
76
+ onItemClose: m,
77
+ children: /* @__PURE__ */ n(z, { scope: o.__scopeAccordion, collapsible: !0, children: /* @__PURE__ */ n(G, { ...r, ref: c }) })
78
+ }
79
+ );
80
+ }), [ue, I] = b(d), G = s.forwardRef(
81
+ (o, c) => {
82
+ const { __scopeAccordion: e, disabled: t, dir: i, orientation: r = "vertical", ...l } = o, a = s.useRef(null), p = $(a, c), m = ae(e), u = ce(i) === "ltr", h = ee(o.onKeyDown, (C) => {
83
+ var O;
84
+ if (!ie.includes(C.key)) return;
85
+ const Q = C.target, x = m().filter((N) => {
86
+ var T;
87
+ return !((T = N.ref.current) != null && T.disabled);
88
+ }), A = x.findIndex((N) => N.ref.current === Q), D = x.length;
89
+ if (A === -1) return;
90
+ C.preventDefault();
91
+ let f = A;
92
+ const _ = 0, w = D - 1, R = () => {
93
+ f = A + 1, f > w && (f = _);
94
+ }, P = () => {
95
+ f = A - 1, f < _ && (f = w);
96
+ };
97
+ switch (C.key) {
98
+ case "Home":
99
+ f = _;
100
+ break;
101
+ case "End":
102
+ f = w;
103
+ break;
104
+ case "ArrowRight":
105
+ r === "horizontal" && (u ? R() : P());
106
+ break;
107
+ case "ArrowDown":
108
+ r === "vertical" && R();
109
+ break;
110
+ case "ArrowLeft":
111
+ r === "horizontal" && (u ? P() : R());
112
+ break;
113
+ case "ArrowUp":
114
+ r === "vertical" && P();
115
+ break;
116
+ }
117
+ const W = f % D;
118
+ (O = x[W].ref.current) == null || O.focus();
119
+ });
120
+ return /* @__PURE__ */ n(
121
+ ue,
122
+ {
123
+ scope: e,
124
+ disabled: t,
125
+ direction: i,
126
+ orientation: r,
127
+ children: /* @__PURE__ */ n(E.Slot, { scope: e, children: /* @__PURE__ */ n(
128
+ V.div,
129
+ {
130
+ ...l,
131
+ "data-orientation": r,
132
+ ref: p,
133
+ onKeyDown: t ? void 0 : h
134
+ }
135
+ ) })
136
+ }
137
+ );
138
+ }
139
+ ), g = "AccordionItem", [me, k] = b(g), U = s.forwardRef(
140
+ (o, c) => {
141
+ const { __scopeAccordion: e, value: t, ...i } = o, r = I(g, e), l = se(g, e), a = S(e), p = ne(), m = t && l.value.includes(t) || !1, v = r.disabled || o.disabled;
142
+ return /* @__PURE__ */ n(
143
+ me,
144
+ {
145
+ scope: e,
146
+ open: m,
147
+ disabled: v,
148
+ triggerId: p,
149
+ children: /* @__PURE__ */ n(
150
+ oe,
151
+ {
152
+ "data-orientation": r.orientation,
153
+ "data-state": J(m),
154
+ ...a,
155
+ ...i,
156
+ ref: c,
157
+ disabled: v,
158
+ open: m,
159
+ onOpenChange: (u) => {
160
+ u ? l.onItemOpen(t) : l.onItemClose(t);
161
+ }
162
+ }
163
+ )
164
+ }
165
+ );
166
+ }
167
+ );
168
+ U.displayName = g;
169
+ var j = "AccordionHeader", Y = s.forwardRef(
170
+ (o, c) => {
171
+ const { __scopeAccordion: e, ...t } = o, i = I(d, e), r = k(j, e);
172
+ return /* @__PURE__ */ n(
173
+ V.h3,
174
+ {
175
+ "data-orientation": i.orientation,
176
+ "data-state": J(r.open),
177
+ "data-disabled": r.disabled ? "" : void 0,
178
+ ...t,
179
+ ref: c
180
+ }
181
+ );
182
+ }
183
+ );
184
+ Y.displayName = j;
185
+ var y = "AccordionTrigger", q = s.forwardRef(
186
+ (o, c) => {
187
+ const { __scopeAccordion: e, ...t } = o, i = I(d, e), r = k(y, e), l = de(y, e), a = S(e);
188
+ return /* @__PURE__ */ n(E.ItemSlot, { scope: e, children: /* @__PURE__ */ n(
189
+ re,
190
+ {
191
+ "aria-disabled": r.open && !l.collapsible || void 0,
192
+ "data-orientation": i.orientation,
193
+ id: r.triggerId,
194
+ ...a,
195
+ ...t,
196
+ ref: c
197
+ }
198
+ ) });
199
+ }
200
+ );
201
+ q.displayName = y;
202
+ var B = "AccordionContent", F = s.forwardRef(
203
+ (o, c) => {
204
+ const { __scopeAccordion: e, ...t } = o, i = I(d, e), r = k(B, e), l = S(e);
205
+ return /* @__PURE__ */ n(
206
+ te,
207
+ {
208
+ role: "region",
209
+ "aria-labelledby": r.triggerId,
210
+ "data-orientation": i.orientation,
211
+ ...l,
212
+ ...t,
213
+ ref: c,
214
+ style: {
215
+ "--radix-accordion-content-height": "var(--radix-collapsible-content-height)",
216
+ "--radix-accordion-content-width": "var(--radix-collapsible-content-width)",
217
+ ...o.style
218
+ }
219
+ }
220
+ );
221
+ }
222
+ );
223
+ F.displayName = B;
224
+ function J(o) {
225
+ return o ? "open" : "closed";
226
+ }
227
+ var Pe = K, Ne = U, ye = Y, Ee = q, Se = F;
228
+ export {
229
+ K as Accordion,
230
+ F as AccordionContent,
231
+ Y as AccordionHeader,
232
+ U as AccordionItem,
233
+ q as AccordionTrigger,
234
+ Se as Content,
235
+ ye as Header,
236
+ Ne as Item,
237
+ Pe as Root,
238
+ Ee as Trigger
239
+ };
@@ -0,0 +1,127 @@
1
+ import * as l from "react";
2
+ import { createContextScope as w } from "./index.es49.js";
3
+ import { useComposedRefs as v } from "./index.es46.js";
4
+ import { createDialogScope as A, Root as M, Portal as x, Overlay as I, Trigger as L, WarningProvider as $, Content as F, Title as G, Description as j, Close as f } from "./index.es40.js";
5
+ import { composeEventHandlers as W } from "./index.es48.js";
6
+ import { createSlottable as Y } from "./index.es68.js";
7
+ import { jsx as i, jsxs as q } from "react/jsx-runtime";
8
+ var D = "AlertDialog", [B] = w(D, [
9
+ A
10
+ ]), n = A(), m = (e) => {
11
+ const { __scopeAlertDialog: o, ...r } = e, t = n(o);
12
+ return /* @__PURE__ */ i(M, { ...t, ...r, modal: !0 });
13
+ };
14
+ m.displayName = D;
15
+ var H = "AlertDialogTrigger", y = l.forwardRef(
16
+ (e, o) => {
17
+ const { __scopeAlertDialog: r, ...t } = e, a = n(r);
18
+ return /* @__PURE__ */ i(L, { ...a, ...t, ref: o });
19
+ }
20
+ );
21
+ y.displayName = H;
22
+ var V = "AlertDialogPortal", _ = (e) => {
23
+ const { __scopeAlertDialog: o, ...r } = e, t = n(o);
24
+ return /* @__PURE__ */ i(x, { ...t, ...r });
25
+ };
26
+ _.displayName = V;
27
+ var k = "AlertDialogOverlay", N = l.forwardRef(
28
+ (e, o) => {
29
+ const { __scopeAlertDialog: r, ...t } = e, a = n(r);
30
+ return /* @__PURE__ */ i(I, { ...a, ...t, ref: o });
31
+ }
32
+ );
33
+ N.displayName = k;
34
+ var s = "AlertDialogContent", [z, J] = B(s), K = Y("AlertDialogContent"), R = l.forwardRef(
35
+ (e, o) => {
36
+ const { __scopeAlertDialog: r, children: t, ...a } = e, g = n(r), p = l.useRef(null), b = v(o, p), d = l.useRef(null);
37
+ return /* @__PURE__ */ i(
38
+ $,
39
+ {
40
+ contentName: s,
41
+ titleName: C,
42
+ docsSlug: "alert-dialog",
43
+ children: /* @__PURE__ */ i(z, { scope: r, cancelRef: d, children: /* @__PURE__ */ q(
44
+ F,
45
+ {
46
+ role: "alertdialog",
47
+ ...g,
48
+ ...a,
49
+ ref: b,
50
+ onOpenAutoFocus: W(a.onOpenAutoFocus, (c) => {
51
+ var u;
52
+ c.preventDefault(), (u = d.current) == null || u.focus({ preventScroll: !0 });
53
+ }),
54
+ onPointerDownOutside: (c) => c.preventDefault(),
55
+ onInteractOutside: (c) => c.preventDefault(),
56
+ children: [
57
+ /* @__PURE__ */ i(K, { children: t }),
58
+ /* @__PURE__ */ i(U, { contentRef: p })
59
+ ]
60
+ }
61
+ ) })
62
+ }
63
+ );
64
+ }
65
+ );
66
+ R.displayName = s;
67
+ var C = "AlertDialogTitle", h = l.forwardRef(
68
+ (e, o) => {
69
+ const { __scopeAlertDialog: r, ...t } = e, a = n(r);
70
+ return /* @__PURE__ */ i(G, { ...a, ...t, ref: o });
71
+ }
72
+ );
73
+ h.displayName = C;
74
+ var E = "AlertDialogDescription", P = l.forwardRef((e, o) => {
75
+ const { __scopeAlertDialog: r, ...t } = e, a = n(r);
76
+ return /* @__PURE__ */ i(j, { ...a, ...t, ref: o });
77
+ });
78
+ P.displayName = E;
79
+ var Q = "AlertDialogAction", S = l.forwardRef(
80
+ (e, o) => {
81
+ const { __scopeAlertDialog: r, ...t } = e, a = n(r);
82
+ return /* @__PURE__ */ i(f, { ...a, ...t, ref: o });
83
+ }
84
+ );
85
+ S.displayName = Q;
86
+ var T = "AlertDialogCancel", O = l.forwardRef(
87
+ (e, o) => {
88
+ const { __scopeAlertDialog: r, ...t } = e, { cancelRef: a } = J(T, r), g = n(r), p = v(o, a);
89
+ return /* @__PURE__ */ i(f, { ...g, ...t, ref: p });
90
+ }
91
+ );
92
+ O.displayName = T;
93
+ var U = ({ contentRef: e }) => {
94
+ const o = `\`${s}\` requires a description for the component to be accessible for screen reader users.
95
+
96
+ You can add a description to the \`${s}\` by passing a \`${E}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
97
+
98
+ 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 \`${s}\`. 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.
99
+
100
+ For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;
101
+ return l.useEffect(() => {
102
+ var t;
103
+ document.getElementById(
104
+ (t = e.current) == null ? void 0 : t.getAttribute("aria-describedby")
105
+ ) || console.warn(o);
106
+ }, [o, e]), null;
107
+ }, ae = m, ie = y, le = _, ne = N, se = R, ce = S, pe = O, ge = h, de = P;
108
+ export {
109
+ ce as Action,
110
+ m as AlertDialog,
111
+ S as AlertDialogAction,
112
+ O as AlertDialogCancel,
113
+ R as AlertDialogContent,
114
+ P as AlertDialogDescription,
115
+ N as AlertDialogOverlay,
116
+ _ as AlertDialogPortal,
117
+ h as AlertDialogTitle,
118
+ y as AlertDialogTrigger,
119
+ pe as Cancel,
120
+ se as Content,
121
+ de as Description,
122
+ ne as Overlay,
123
+ le as Portal,
124
+ ae as Root,
125
+ ge as Title,
126
+ ie as Trigger
127
+ };
@@ -0,0 +1,163 @@
1
+ import * as v from "react";
2
+ import { composeEventHandlers as g } from "./index.es48.js";
3
+ import { createContextScope as x } from "./index.es49.js";
4
+ import { createRovingFocusGroupScope as C, Root as E, Item as F } from "./index.es66.js";
5
+ import { Presence as w } from "./index.es56.js";
6
+ import { Primitive as b } from "./index.es57.js";
7
+ import { useDirection as D } from "./index.es67.js";
8
+ import { useControllableState as V } from "./index.es59.js";
9
+ import { useId as G } from "./index.es53.js";
10
+ import { jsx as l } from "react/jsx-runtime";
11
+ var p = "Tabs", [L] = x(p, [
12
+ C
13
+ ]), h = C(), [$, T] = L(p), I = v.forwardRef(
14
+ (e, r) => {
15
+ const {
16
+ __scopeTabs: s,
17
+ value: t,
18
+ onValueChange: n,
19
+ defaultValue: c,
20
+ orientation: o = "horizontal",
21
+ dir: d,
22
+ activationMode: f = "automatic",
23
+ ...m
24
+ } = e, i = D(d), [a, u] = V({
25
+ prop: t,
26
+ onChange: n,
27
+ defaultProp: c ?? "",
28
+ caller: p
29
+ });
30
+ return /* @__PURE__ */ l(
31
+ $,
32
+ {
33
+ scope: s,
34
+ baseId: G(),
35
+ value: a,
36
+ onValueChange: u,
37
+ orientation: o,
38
+ dir: i,
39
+ activationMode: f,
40
+ children: /* @__PURE__ */ l(
41
+ b.div,
42
+ {
43
+ dir: i,
44
+ "data-orientation": o,
45
+ ...m,
46
+ ref: r
47
+ }
48
+ )
49
+ }
50
+ );
51
+ }
52
+ );
53
+ I.displayName = p;
54
+ var R = "TabsList", _ = v.forwardRef(
55
+ (e, r) => {
56
+ const { __scopeTabs: s, loop: t = !0, ...n } = e, c = T(R, s), o = h(s);
57
+ return /* @__PURE__ */ l(
58
+ E,
59
+ {
60
+ asChild: !0,
61
+ ...o,
62
+ orientation: c.orientation,
63
+ dir: c.dir,
64
+ loop: t,
65
+ children: /* @__PURE__ */ l(
66
+ b.div,
67
+ {
68
+ role: "tablist",
69
+ "aria-orientation": c.orientation,
70
+ ...n,
71
+ ref: r
72
+ }
73
+ )
74
+ }
75
+ );
76
+ }
77
+ );
78
+ _.displayName = R;
79
+ var y = "TabsTrigger", A = v.forwardRef(
80
+ (e, r) => {
81
+ const { __scopeTabs: s, value: t, disabled: n = !1, ...c } = e, o = T(y, s), d = h(s), f = P(o.baseId, t), m = S(o.baseId, t), i = t === o.value;
82
+ return /* @__PURE__ */ l(
83
+ F,
84
+ {
85
+ asChild: !0,
86
+ ...d,
87
+ focusable: !n,
88
+ active: i,
89
+ children: /* @__PURE__ */ l(
90
+ b.button,
91
+ {
92
+ type: "button",
93
+ role: "tab",
94
+ "aria-selected": i,
95
+ "aria-controls": m,
96
+ "data-state": i ? "active" : "inactive",
97
+ "data-disabled": n ? "" : void 0,
98
+ disabled: n,
99
+ id: f,
100
+ ...c,
101
+ ref: r,
102
+ onMouseDown: g(e.onMouseDown, (a) => {
103
+ !n && a.button === 0 && a.ctrlKey === !1 ? o.onValueChange(t) : a.preventDefault();
104
+ }),
105
+ onKeyDown: g(e.onKeyDown, (a) => {
106
+ [" ", "Enter"].includes(a.key) && o.onValueChange(t);
107
+ }),
108
+ onFocus: g(e.onFocus, () => {
109
+ const a = o.activationMode !== "manual";
110
+ !i && !n && a && o.onValueChange(t);
111
+ })
112
+ }
113
+ )
114
+ }
115
+ );
116
+ }
117
+ );
118
+ A.displayName = y;
119
+ var M = "TabsContent", N = v.forwardRef(
120
+ (e, r) => {
121
+ const { __scopeTabs: s, value: t, forceMount: n, children: c, ...o } = e, d = T(M, s), f = P(d.baseId, t), m = S(d.baseId, t), i = t === d.value, a = v.useRef(i);
122
+ return v.useEffect(() => {
123
+ const u = requestAnimationFrame(() => a.current = !1);
124
+ return () => cancelAnimationFrame(u);
125
+ }, []), /* @__PURE__ */ l(w, { present: n || i, children: ({ present: u }) => /* @__PURE__ */ l(
126
+ b.div,
127
+ {
128
+ "data-state": i ? "active" : "inactive",
129
+ "data-orientation": d.orientation,
130
+ role: "tabpanel",
131
+ "aria-labelledby": f,
132
+ hidden: !u,
133
+ id: m,
134
+ tabIndex: 0,
135
+ ...o,
136
+ ref: r,
137
+ style: {
138
+ ...e.style,
139
+ animationDuration: a.current ? "0s" : void 0
140
+ },
141
+ children: u && c
142
+ }
143
+ ) });
144
+ }
145
+ );
146
+ N.displayName = M;
147
+ function P(e, r) {
148
+ return `${e}-trigger-${r}`;
149
+ }
150
+ function S(e, r) {
151
+ return `${e}-content-${r}`;
152
+ }
153
+ var Q = I, U = _, W = A, X = N;
154
+ export {
155
+ X as Content,
156
+ U as List,
157
+ Q as Root,
158
+ I as Tabs,
159
+ N as TabsContent,
160
+ _ as TabsList,
161
+ A as TabsTrigger,
162
+ W as Trigger
163
+ };
@@ -0,0 +1,29 @@
1
+ import * as f from "react";
2
+ function l(n, o) {
3
+ if (typeof n == "function")
4
+ return n(o);
5
+ n != null && (n.current = o);
6
+ }
7
+ function i(...n) {
8
+ return (o) => {
9
+ let u = !1;
10
+ const c = n.map((t) => {
11
+ const e = l(t, o);
12
+ return !u && typeof e == "function" && (u = !0), e;
13
+ });
14
+ if (u)
15
+ return () => {
16
+ for (let t = 0; t < c.length; t++) {
17
+ const e = c[t];
18
+ typeof e == "function" ? e() : l(n[t], null);
19
+ }
20
+ };
21
+ };
22
+ }
23
+ function s(...n) {
24
+ return f.useCallback(i(...n), n);
25
+ }
26
+ export {
27
+ i as composeRefs,
28
+ s as useComposedRefs
29
+ };
@@ -0,0 +1,32 @@
1
+ import * as f from "react";
2
+ import "react-dom";
3
+ import { createSlot as l } from "./index.es31.js";
4
+ import { jsx as n } from "react/jsx-runtime";
5
+ var u = [
6
+ "a",
7
+ "button",
8
+ "div",
9
+ "form",
10
+ "h2",
11
+ "h3",
12
+ "img",
13
+ "input",
14
+ "label",
15
+ "li",
16
+ "nav",
17
+ "ol",
18
+ "p",
19
+ "select",
20
+ "span",
21
+ "svg",
22
+ "ul"
23
+ ], w = u.reduce((t, i) => {
24
+ const o = l(`Primitive.${i}`), r = f.forwardRef((e, m) => {
25
+ const { asChild: a, ...p } = e, s = a ? o : i;
26
+ return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ n(s, { ...p, ref: m });
27
+ });
28
+ return r.displayName = `Primitive.${i}`, { ...t, [i]: r };
29
+ }, {});
30
+ export {
31
+ w as Primitive
32
+ };
@@ -0,0 +1,9 @@
1
+ function h(f, c, { checkForDefaultPrevented: p = !0 } = {}) {
2
+ return function(s) {
3
+ if (f == null || f(s), p === !1 || !s.defaultPrevented)
4
+ return c == null ? void 0 : c(s);
5
+ };
6
+ }
7
+ export {
8
+ h as composeEventHandlers
9
+ };
@@ -0,0 +1,70 @@
1
+ import * as u from "react";
2
+ import { jsx as h } from "react/jsx-runtime";
3
+ function w(e, c) {
4
+ const o = u.createContext(c), a = (r) => {
5
+ const { children: t, ...n } = r, s = u.useMemo(() => n, Object.values(n));
6
+ return /* @__PURE__ */ h(o.Provider, { value: s, children: t });
7
+ };
8
+ a.displayName = e + "Provider";
9
+ function i(r) {
10
+ const t = u.useContext(o);
11
+ if (t) return t;
12
+ if (c !== void 0) return c;
13
+ throw new Error(`\`${r}\` must be used within \`${e}\``);
14
+ }
15
+ return [a, i];
16
+ }
17
+ function _(e, c = []) {
18
+ let o = [];
19
+ function a(r, t) {
20
+ const n = u.createContext(t), s = o.length;
21
+ o = [...o, t];
22
+ const p = (d) => {
23
+ var S;
24
+ const { scope: x, children: C, ...m } = d, v = ((S = x == null ? void 0 : x[e]) == null ? void 0 : S[s]) || n, P = u.useMemo(() => m, Object.values(m));
25
+ return /* @__PURE__ */ h(v.Provider, { value: P, children: C });
26
+ };
27
+ p.displayName = r + "Provider";
28
+ function f(d, x) {
29
+ var v;
30
+ const C = ((v = x == null ? void 0 : x[e]) == null ? void 0 : v[s]) || n, m = u.useContext(C);
31
+ if (m) return m;
32
+ if (t !== void 0) return t;
33
+ throw new Error(`\`${d}\` must be used within \`${r}\``);
34
+ }
35
+ return [p, f];
36
+ }
37
+ const i = () => {
38
+ const r = o.map((t) => u.createContext(t));
39
+ return function(n) {
40
+ const s = (n == null ? void 0 : n[e]) || r;
41
+ return u.useMemo(
42
+ () => ({ [`__scope${e}`]: { ...n, [e]: s } }),
43
+ [n, s]
44
+ );
45
+ };
46
+ };
47
+ return i.scopeName = e, [a, l(i, ...c)];
48
+ }
49
+ function l(...e) {
50
+ const c = e[0];
51
+ if (e.length === 1) return c;
52
+ const o = () => {
53
+ const a = e.map((i) => ({
54
+ useScope: i(),
55
+ scopeName: i.scopeName
56
+ }));
57
+ return function(r) {
58
+ const t = a.reduce((n, { useScope: s, scopeName: p }) => {
59
+ const d = s(r)[`__scope${p}`];
60
+ return { ...n, ...d };
61
+ }, {});
62
+ return u.useMemo(() => ({ [`__scope${c.scopeName}`]: t }), [t]);
63
+ };
64
+ };
65
+ return o.scopeName = c.scopeName, o;
66
+ }
67
+ export {
68
+ w as createContext,
69
+ _ as createContextScope
70
+ };