@epilot/volt-ui 1.1.2 → 1.1.3

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 (214) hide show
  1. package/dist/components/spinner/spinner.d.ts +12 -0
  2. package/dist/index.cjs.js +51 -1
  3. package/dist/index.d.ts +1 -0
  4. package/dist/index.es.js +11793 -133
  5. package/dist/style.css +1 -1
  6. package/package.json +1 -1
  7. package/dist/index.cjs10.js +0 -1
  8. package/dist/index.cjs100.js +0 -1
  9. package/dist/index.cjs101.js +0 -1
  10. package/dist/index.cjs102.js +0 -1
  11. package/dist/index.cjs103.js +0 -1
  12. package/dist/index.cjs104.js +0 -1
  13. package/dist/index.cjs105.js +0 -1
  14. package/dist/index.cjs106.js +0 -1
  15. package/dist/index.cjs107.js +0 -1
  16. package/dist/index.cjs11.js +0 -1
  17. package/dist/index.cjs12.js +0 -1
  18. package/dist/index.cjs13.js +0 -1
  19. package/dist/index.cjs14.js +0 -1
  20. package/dist/index.cjs15.js +0 -1
  21. package/dist/index.cjs16.js +0 -1
  22. package/dist/index.cjs17.js +0 -1
  23. package/dist/index.cjs18.js +0 -1
  24. package/dist/index.cjs19.js +0 -1
  25. package/dist/index.cjs20.js +0 -1
  26. package/dist/index.cjs21.js +0 -1
  27. package/dist/index.cjs22.js +0 -1
  28. package/dist/index.cjs23.js +0 -1
  29. package/dist/index.cjs24.js +0 -1
  30. package/dist/index.cjs25.js +0 -1
  31. package/dist/index.cjs26.js +0 -1
  32. package/dist/index.cjs27.js +0 -1
  33. package/dist/index.cjs28.js +0 -1
  34. package/dist/index.cjs29.js +0 -1
  35. package/dist/index.cjs30.js +0 -1
  36. package/dist/index.cjs31.js +0 -1
  37. package/dist/index.cjs32.js +0 -1
  38. package/dist/index.cjs33.js +0 -1
  39. package/dist/index.cjs34.js +0 -1
  40. package/dist/index.cjs35.js +0 -1
  41. package/dist/index.cjs36.js +0 -1
  42. package/dist/index.cjs37.js +0 -1
  43. package/dist/index.cjs38.js +0 -1
  44. package/dist/index.cjs39.js +0 -1
  45. package/dist/index.cjs4.js +0 -1
  46. package/dist/index.cjs40.js +0 -1
  47. package/dist/index.cjs41.js +0 -5
  48. package/dist/index.cjs42.js +0 -1
  49. package/dist/index.cjs43.js +0 -1
  50. package/dist/index.cjs44.js +0 -1
  51. package/dist/index.cjs45.js +0 -7
  52. package/dist/index.cjs46.js +0 -1
  53. package/dist/index.cjs47.js +0 -1
  54. package/dist/index.cjs48.js +0 -1
  55. package/dist/index.cjs49.js +0 -1
  56. package/dist/index.cjs5.js +0 -1
  57. package/dist/index.cjs50.js +0 -1
  58. package/dist/index.cjs51.js +0 -1
  59. package/dist/index.cjs52.js +0 -1
  60. package/dist/index.cjs53.js +0 -1
  61. package/dist/index.cjs54.js +0 -1
  62. package/dist/index.cjs55.js +0 -1
  63. package/dist/index.cjs56.js +0 -1
  64. package/dist/index.cjs57.js +0 -1
  65. package/dist/index.cjs58.js +0 -1
  66. package/dist/index.cjs59.js +0 -1
  67. package/dist/index.cjs6.js +0 -1
  68. package/dist/index.cjs60.js +0 -1
  69. package/dist/index.cjs61.js +0 -1
  70. package/dist/index.cjs62.js +0 -1
  71. package/dist/index.cjs63.js +0 -1
  72. package/dist/index.cjs64.js +0 -1
  73. package/dist/index.cjs65.js +0 -1
  74. package/dist/index.cjs66.js +0 -1
  75. package/dist/index.cjs67.js +0 -1
  76. package/dist/index.cjs68.js +0 -1
  77. package/dist/index.cjs69.js +0 -1
  78. package/dist/index.cjs7.js +0 -1
  79. package/dist/index.cjs70.js +0 -1
  80. package/dist/index.cjs71.js +0 -1
  81. package/dist/index.cjs72.js +0 -1
  82. package/dist/index.cjs73.js +0 -1
  83. package/dist/index.cjs74.js +0 -1
  84. package/dist/index.cjs75.js +0 -1
  85. package/dist/index.cjs76.js +0 -1
  86. package/dist/index.cjs77.js +0 -1
  87. package/dist/index.cjs78.js +0 -1
  88. package/dist/index.cjs79.js +0 -1
  89. package/dist/index.cjs8.js +0 -1
  90. package/dist/index.cjs80.js +0 -1
  91. package/dist/index.cjs81.js +0 -1
  92. package/dist/index.cjs82.js +0 -1
  93. package/dist/index.cjs83.js +0 -1
  94. package/dist/index.cjs84.js +0 -1
  95. package/dist/index.cjs85.js +0 -1
  96. package/dist/index.cjs86.js +0 -1
  97. package/dist/index.cjs87.js +0 -1
  98. package/dist/index.cjs88.js +0 -1
  99. package/dist/index.cjs89.js +0 -1
  100. package/dist/index.cjs9.js +0 -1
  101. package/dist/index.cjs90.js +0 -1
  102. package/dist/index.cjs91.js +0 -1
  103. package/dist/index.cjs92.js +0 -4
  104. package/dist/index.cjs93.js +0 -1
  105. package/dist/index.cjs94.js +0 -1
  106. package/dist/index.cjs95.js +0 -1
  107. package/dist/index.cjs96.js +0 -1
  108. package/dist/index.cjs97.js +0 -1
  109. package/dist/index.cjs98.js +0 -38
  110. package/dist/index.cjs99.js +0 -1
  111. package/dist/index.es10.js +0 -29
  112. package/dist/index.es100.js +0 -16
  113. package/dist/index.es101.js +0 -68
  114. package/dist/index.es102.js +0 -6
  115. package/dist/index.es103.js +0 -25
  116. package/dist/index.es104.js +0 -25
  117. package/dist/index.es105.js +0 -15
  118. package/dist/index.es106.js +0 -30
  119. package/dist/index.es107.js +0 -7
  120. package/dist/index.es11.js +0 -250
  121. package/dist/index.es12.js +0 -230
  122. package/dist/index.es13.js +0 -34
  123. package/dist/index.es14.js +0 -43
  124. package/dist/index.es15.js +0 -43
  125. package/dist/index.es16.js +0 -115
  126. package/dist/index.es17.js +0 -24
  127. package/dist/index.es18.js +0 -36
  128. package/dist/index.es19.js +0 -137
  129. package/dist/index.es20.js +0 -50
  130. package/dist/index.es21.js +0 -54
  131. package/dist/index.es22.js +0 -74
  132. package/dist/index.es23.js +0 -172
  133. package/dist/index.es24.js +0 -89
  134. package/dist/index.es25.js +0 -113
  135. package/dist/index.es26.js +0 -85
  136. package/dist/index.es27.js +0 -61
  137. package/dist/index.es28.js +0 -73
  138. package/dist/index.es29.js +0 -746
  139. package/dist/index.es30.js +0 -17
  140. package/dist/index.es31.js +0 -2763
  141. package/dist/index.es32.js +0 -62
  142. package/dist/index.es33.js +0 -35
  143. package/dist/index.es34.js +0 -126
  144. package/dist/index.es35.js +0 -862
  145. package/dist/index.es36.js +0 -20
  146. package/dist/index.es37.js +0 -331
  147. package/dist/index.es38.js +0 -132
  148. package/dist/index.es39.js +0 -24
  149. package/dist/index.es4.js +0 -6
  150. package/dist/index.es40.js +0 -243
  151. package/dist/index.es41.js +0 -262
  152. package/dist/index.es42.js +0 -251
  153. package/dist/index.es43.js +0 -238
  154. package/dist/index.es44.js +0 -239
  155. package/dist/index.es45.js +0 -127
  156. package/dist/index.es46.js +0 -163
  157. package/dist/index.es47.js +0 -29
  158. package/dist/index.es48.js +0 -9
  159. package/dist/index.es49.js +0 -70
  160. package/dist/index.es5.js +0 -52
  161. package/dist/index.es50.js +0 -127
  162. package/dist/index.es51.js +0 -17
  163. package/dist/index.es52.js +0 -137
  164. package/dist/index.es53.js +0 -13
  165. package/dist/index.es54.js +0 -221
  166. package/dist/index.es55.js +0 -16
  167. package/dist/index.es56.js +0 -71
  168. package/dist/index.es57.js +0 -36
  169. package/dist/index.es58.js +0 -50
  170. package/dist/index.es59.js +0 -54
  171. package/dist/index.es6.js +0 -66
  172. package/dist/index.es60.js +0 -52
  173. package/dist/index.es61.js +0 -11
  174. package/dist/index.es62.js +0 -11
  175. package/dist/index.es63.js +0 -32
  176. package/dist/index.es64.js +0 -32
  177. package/dist/index.es65.js +0 -48
  178. package/dist/index.es66.js +0 -120
  179. package/dist/index.es67.js +0 -10
  180. package/dist/index.es68.js +0 -183
  181. package/dist/index.es69.js +0 -8
  182. package/dist/index.es7.js +0 -167
  183. package/dist/index.es70.js +0 -27
  184. package/dist/index.es71.js +0 -312
  185. package/dist/index.es72.js +0 -6
  186. package/dist/index.es73.js +0 -50
  187. package/dist/index.es74.js +0 -13
  188. package/dist/index.es75.js +0 -6
  189. package/dist/index.es76.js +0 -50
  190. package/dist/index.es77.js +0 -32
  191. package/dist/index.es78.js +0 -11
  192. package/dist/index.es79.js +0 -50
  193. package/dist/index.es8.js +0 -39
  194. package/dist/index.es80.js +0 -14
  195. package/dist/index.es81.js +0 -208
  196. package/dist/index.es82.js +0 -24
  197. package/dist/index.es83.js +0 -402
  198. package/dist/index.es84.js +0 -17
  199. package/dist/index.es85.js +0 -32
  200. package/dist/index.es86.js +0 -27
  201. package/dist/index.es87.js +0 -31
  202. package/dist/index.es88.js +0 -7
  203. package/dist/index.es89.js +0 -7
  204. package/dist/index.es9.js +0 -33
  205. package/dist/index.es90.js +0 -5
  206. package/dist/index.es91.js +0 -26
  207. package/dist/index.es92.js +0 -112
  208. package/dist/index.es93.js +0 -18
  209. package/dist/index.es94.js +0 -527
  210. package/dist/index.es95.js +0 -130
  211. package/dist/index.es96.js +0 -136
  212. package/dist/index.es97.js +0 -67
  213. package/dist/index.es98.js +0 -71
  214. package/dist/index.es99.js +0 -11
@@ -1,239 +0,0 @@
1
- import s from "react";
2
- import { createContextScope as X } from "./index.es49.js";
3
- import { createCollection as Z } from "./index.es65.js";
4
- import { useComposedRefs as $ } from "./index.es47.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.es66.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
- };
@@ -1,127 +0,0 @@
1
- import * as l from "react";
2
- import { createContextScope as w } from "./index.es49.js";
3
- import { useComposedRefs as v } from "./index.es47.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.es41.js";
5
- import { composeEventHandlers as W } from "./index.es48.js";
6
- import { createSlottable as Y } from "./index.es78.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
- };
@@ -1,163 +0,0 @@
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.es68.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
- };
@@ -1,29 +0,0 @@
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
- };
@@ -1,9 +0,0 @@
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
- };
@@ -1,70 +0,0 @@
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
- };
package/dist/index.es5.js DELETED
@@ -1,52 +0,0 @@
1
- import { jsx as a } from "react/jsx-runtime";
2
- import { forwardRef as i } from "react";
3
- import { Root as n } from "./index.es32.js";
4
- import { cn as c } from "./index.es4.js";
5
- import { cva as p } from "./index.es33.js";
6
- const u = p(
7
- "volt-inline-flex volt-items-center volt-justify-center volt-font-normal volt-whitespace-nowrap volt-transition-all volt-cursor-pointer volt-focus-visible:outline-2 volt-focus-visible:outline-offset-2 volt-disabled:opacity-50 volt-shrink-0 [&_svg]:shrink-0 [&_svg]:pointer-events-none [&_svg]:text-current",
8
- {
9
- variants: {
10
- variant: {
11
- primary: "volt-bg-accent-solid volt-text-accent-contrast volt-hover:bg-accent-solid-hover volt-active:bg-accent-solid-hover volt-focus-visible:outline-accent-a8",
12
- secondary: "volt-bg-accent-soft volt-text-accent-light volt-hover:bg-accent-soft-hover volt-focus-visible:outline-accent-a8",
13
- tertiary: "volt-bg-transparent volt-text-accent-light volt-hover:bg-accent-soft volt-focus-visible:outline-accent-a8",
14
- destructive: "volt-bg-error-a9 volt-text-error-contrast volt-hover:bg-error-solid-hover volt-active:bg-error-solid-hover volt-focus-visible:outline-error-a8"
15
- },
16
- size: {
17
- xs: "volt-px-2 volt-py-1 volt-min-h-5 volt-text-xs volt-gap-[4px] [&_svg]:size-3 volt-group-data-[slot=button-group]/button-group:has-[>svg]:px-1",
18
- sm: "volt-px-3 volt-py-1 volt-min-h-6 volt-text-sm volt-gap-[6px] [&_svg]:size-3.5 volt-group-data-[slot=button-group]/button-group:has-[>svg]:px-1.25",
19
- base: "volt-px-4 volt-py-1 volt-min-h-9 volt-text-base volt-gap-2 [&_svg]:size-4 volt-group-data-[slot=button-group]/button-group:has-[>svg]:px-2.5",
20
- lg: "volt-px-6 volt-py-2 volt-min-h-10 volt-text-lg volt-gap-2 [&_svg]:size-4 volt-group-data-[slot=button-group]/button-group:has-[>svg]:px-2.5",
21
- "icon-xs": "volt-size-5 [&_svg]:size-3",
22
- "icon-sm": "volt-size-7 [&_svg]:size-4",
23
- icon: "volt-size-9 [&_svg]:size-5",
24
- "icon-lg": "volt-size-10 [&_svg]:size-6"
25
- },
26
- shape: {
27
- normal: "volt-rounded-lg",
28
- rounded: "volt-rounded-full"
29
- }
30
- },
31
- defaultVariants: {
32
- variant: "primary",
33
- size: "base",
34
- shape: "rounded"
35
- }
36
- }
37
- ), g = i(
38
- ({ variant: t, size: o, asChild: e = !1, shape: l, className: v, ...s }, r) => /* @__PURE__ */ a(
39
- e ? n : "button",
40
- {
41
- "data-slot": "button",
42
- className: c(u({ variant: t, size: o, shape: l, className: v })),
43
- ref: r,
44
- ...s
45
- }
46
- )
47
- );
48
- g.displayName = "Button";
49
- export {
50
- g as Button,
51
- u as buttonVariants
52
- };