@drjoshcsimmons/scl 0.1.1 → 0.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 (83) hide show
  1. package/README.md +202 -13
  2. package/dist/index100.js +50 -9
  3. package/dist/index101.js +9 -50
  4. package/dist/index102.js +627 -196
  5. package/dist/index103.js +180 -3
  6. package/dist/index104.js +15 -30
  7. package/dist/index11.js +2 -2
  8. package/dist/index110.js +1 -1
  9. package/dist/index12.js +1 -1
  10. package/dist/index13.js +2 -2
  11. package/dist/index14.js +2 -2
  12. package/dist/index15.js +2 -2
  13. package/dist/index17.js +3 -3
  14. package/dist/index18.js +2 -2
  15. package/dist/index20.js +2 -2
  16. package/dist/index21.js +1 -1
  17. package/dist/index22.js +1 -1
  18. package/dist/index23.js +2 -2
  19. package/dist/index24.js +1 -1
  20. package/dist/index25.js +4 -4
  21. package/dist/index26.js +1 -1
  22. package/dist/index27.js +3 -3
  23. package/dist/index29.js +1 -1
  24. package/dist/index31.js +1 -1
  25. package/dist/index33.js +1 -1
  26. package/dist/index36.js +2 -2
  27. package/dist/index37.js +1 -1
  28. package/dist/index4.js +2 -2
  29. package/dist/index45.js +124 -32
  30. package/dist/index46.js +32 -124
  31. package/dist/index47.js +100 -219
  32. package/dist/index48.js +73 -11
  33. package/dist/index49.js +244 -55
  34. package/dist/index5.js +1 -1
  35. package/dist/index50.js +9 -249
  36. package/dist/index51.js +237 -9
  37. package/dist/index52.js +11 -73
  38. package/dist/index53.js +16 -234
  39. package/dist/index54.js +860 -11
  40. package/dist/index55.js +9 -310
  41. package/dist/index56.js +225 -12
  42. package/dist/index57.js +11 -225
  43. package/dist/index59.js +58 -29
  44. package/dist/index6.js +1 -1
  45. package/dist/index60.js +248 -254
  46. package/dist/index61.js +530 -12
  47. package/dist/index62.js +224 -101
  48. package/dist/index63.js +260 -12
  49. package/dist/index64.js +12 -22
  50. package/dist/index65.js +12 -18
  51. package/dist/index66.js +407 -213
  52. package/dist/index67.js +143 -112
  53. package/dist/index68.js +317 -142
  54. package/dist/index69.js +76 -248
  55. package/dist/index7.js +1 -1
  56. package/dist/index70.js +299 -71
  57. package/dist/index71.js +12 -530
  58. package/dist/index72.js +20 -433
  59. package/dist/index73.js +216 -316
  60. package/dist/index74.js +105 -835
  61. package/dist/index75.js +31 -9
  62. package/dist/index8.js +1 -1
  63. package/dist/index80.js +50 -44
  64. package/dist/index81.js +4 -52
  65. package/dist/index83.js +68 -10
  66. package/dist/index84.js +10 -7
  67. package/dist/index85.js +54 -5
  68. package/dist/index86.js +10 -24
  69. package/dist/index87.js +29 -68
  70. package/dist/index88.js +10 -52
  71. package/dist/index89.js +5 -10
  72. package/dist/index9.js +2 -2
  73. package/dist/index90.js +25 -4
  74. package/dist/index91.js +46 -30
  75. package/dist/index92.js +7 -12
  76. package/dist/index93.js +3 -180
  77. package/dist/index94.js +122 -12
  78. package/dist/index95.js +11 -646
  79. package/dist/index96.js +125 -115
  80. package/dist/index97.js +212 -128
  81. package/dist/index98.js +1 -1
  82. package/dist/index99.js +30 -15
  83. package/package.json +3 -2
package/dist/index103.js CHANGED
@@ -1,6 +1,183 @@
1
- function m(t, [a, n]) {
2
- return Math.min(n, Math.max(a, t));
1
+ import * as c from "react";
2
+ import { composeEventHandlers as p } from "./index78.js";
3
+ import { createCollection as V } from "./index91.js";
4
+ import { useComposedRefs as j } from "./index77.js";
5
+ import { createContextScope as z } from "./index76.js";
6
+ import { useId as q } from "./index84.js";
7
+ import { Primitive as G } from "./index82.js";
8
+ import { useCallbackRef as J } from "./index86.js";
9
+ import { useControllableState as Q } from "./index80.js";
10
+ import { useDirection as W } from "./index92.js";
11
+ import { jsx as d } from "react/jsx-runtime";
12
+ var y = "rovingFocusGroup.onEntryFocus", X = { bubbles: !1, cancelable: !0 }, I = "RovingFocusGroup", [D, N, Z] = V(I), [$, Fe] = z(
13
+ I,
14
+ [Z]
15
+ ), [ee, oe] = $(I), O = c.forwardRef(
16
+ (e, r) => /* @__PURE__ */ d(D.Provider, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ d(D.Slot, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ d(te, { ...e, ref: r }) }) })
17
+ );
18
+ O.displayName = I;
19
+ var te = c.forwardRef((e, r) => {
20
+ const {
21
+ __scopeRovingFocusGroup: s,
22
+ orientation: o,
23
+ loop: T = !1,
24
+ dir: w,
25
+ currentTabStopId: v,
26
+ defaultCurrentTabStopId: C,
27
+ onCurrentTabStopIdChange: S,
28
+ onEntryFocus: m,
29
+ preventScrollOnEntryFocus: u = !1,
30
+ ...b
31
+ } = e, F = c.useRef(null), g = j(r, F), R = W(w), [E, t] = Q({
32
+ prop: v,
33
+ defaultProp: C ?? null,
34
+ onChange: S,
35
+ caller: I
36
+ }), [i, h] = c.useState(!1), a = J(m), l = N(s), A = c.useRef(!1), [L, P] = c.useState(0);
37
+ return c.useEffect(() => {
38
+ const n = F.current;
39
+ if (n)
40
+ return n.addEventListener(y, a), () => n.removeEventListener(y, a);
41
+ }, [a]), /* @__PURE__ */ d(
42
+ ee,
43
+ {
44
+ scope: s,
45
+ orientation: o,
46
+ dir: R,
47
+ loop: T,
48
+ currentTabStopId: E,
49
+ onItemFocus: c.useCallback(
50
+ (n) => t(n),
51
+ [t]
52
+ ),
53
+ onItemShiftTab: c.useCallback(() => h(!0), []),
54
+ onFocusableItemAdd: c.useCallback(
55
+ () => P((n) => n + 1),
56
+ []
57
+ ),
58
+ onFocusableItemRemove: c.useCallback(
59
+ () => P((n) => n - 1),
60
+ []
61
+ ),
62
+ children: /* @__PURE__ */ d(
63
+ G.div,
64
+ {
65
+ tabIndex: i || L === 0 ? -1 : 0,
66
+ "data-orientation": o,
67
+ ...b,
68
+ ref: g,
69
+ style: { outline: "none", ...e.style },
70
+ onMouseDown: p(e.onMouseDown, () => {
71
+ A.current = !0;
72
+ }),
73
+ onFocus: p(e.onFocus, (n) => {
74
+ const U = !A.current;
75
+ if (n.target === n.currentTarget && U && !i) {
76
+ const x = new CustomEvent(y, X);
77
+ if (n.currentTarget.dispatchEvent(x), !x.defaultPrevented) {
78
+ const _ = l().filter((f) => f.focusable), B = _.find((f) => f.active), Y = _.find((f) => f.id === E), H = [B, Y, ..._].filter(
79
+ Boolean
80
+ ).map((f) => f.ref.current);
81
+ k(H, u);
82
+ }
83
+ }
84
+ A.current = !1;
85
+ }),
86
+ onBlur: p(e.onBlur, () => h(!1))
87
+ }
88
+ )
89
+ }
90
+ );
91
+ }), K = "RovingFocusGroupItem", M = c.forwardRef(
92
+ (e, r) => {
93
+ const {
94
+ __scopeRovingFocusGroup: s,
95
+ focusable: o = !0,
96
+ active: T = !1,
97
+ tabStopId: w,
98
+ children: v,
99
+ ...C
100
+ } = e, S = q(), m = w || S, u = oe(K, s), b = u.currentTabStopId === m, F = N(s), { onFocusableItemAdd: g, onFocusableItemRemove: R, currentTabStopId: E } = u;
101
+ return c.useEffect(() => {
102
+ if (o)
103
+ return g(), () => R();
104
+ }, [o, g, R]), /* @__PURE__ */ d(
105
+ D.ItemSlot,
106
+ {
107
+ scope: s,
108
+ id: m,
109
+ focusable: o,
110
+ active: T,
111
+ children: /* @__PURE__ */ d(
112
+ G.span,
113
+ {
114
+ tabIndex: b ? 0 : -1,
115
+ "data-orientation": u.orientation,
116
+ ...C,
117
+ ref: r,
118
+ onMouseDown: p(e.onMouseDown, (t) => {
119
+ o ? u.onItemFocus(m) : t.preventDefault();
120
+ }),
121
+ onFocus: p(e.onFocus, () => u.onItemFocus(m)),
122
+ onKeyDown: p(e.onKeyDown, (t) => {
123
+ if (t.key === "Tab" && t.shiftKey) {
124
+ u.onItemShiftTab();
125
+ return;
126
+ }
127
+ if (t.target !== t.currentTarget) return;
128
+ const i = ce(t, u.orientation, u.dir);
129
+ if (i !== void 0) {
130
+ if (t.metaKey || t.ctrlKey || t.altKey || t.shiftKey) return;
131
+ t.preventDefault();
132
+ let a = F().filter((l) => l.focusable).map((l) => l.ref.current);
133
+ if (i === "last") a.reverse();
134
+ else if (i === "prev" || i === "next") {
135
+ i === "prev" && a.reverse();
136
+ const l = a.indexOf(t.currentTarget);
137
+ a = u.loop ? se(a, l + 1) : a.slice(l + 1);
138
+ }
139
+ setTimeout(() => k(a));
140
+ }
141
+ }),
142
+ children: typeof v == "function" ? v({ isCurrentTabStop: b, hasTabStop: E != null }) : v
143
+ }
144
+ )
145
+ }
146
+ );
147
+ }
148
+ );
149
+ M.displayName = K;
150
+ var re = {
151
+ ArrowLeft: "prev",
152
+ ArrowUp: "prev",
153
+ ArrowRight: "next",
154
+ ArrowDown: "next",
155
+ PageUp: "first",
156
+ Home: "first",
157
+ PageDown: "last",
158
+ End: "last"
159
+ };
160
+ function ne(e, r) {
161
+ return r !== "rtl" ? e : e === "ArrowLeft" ? "ArrowRight" : e === "ArrowRight" ? "ArrowLeft" : e;
162
+ }
163
+ function ce(e, r, s) {
164
+ const o = ne(e.key, s);
165
+ if (!(r === "vertical" && ["ArrowLeft", "ArrowRight"].includes(o)) && !(r === "horizontal" && ["ArrowUp", "ArrowDown"].includes(o)))
166
+ return re[o];
167
+ }
168
+ function k(e, r = !1) {
169
+ const s = document.activeElement;
170
+ for (const o of e)
171
+ if (o === s || (o.focus({ preventScroll: r }), document.activeElement !== s)) return;
172
+ }
173
+ function se(e, r) {
174
+ return e.map((s, o) => e[(r + o) % e.length]);
3
175
  }
176
+ var ge = O, Re = M;
4
177
  export {
5
- m as clamp
178
+ Re as Item,
179
+ ge as Root,
180
+ O as RovingFocusGroup,
181
+ M as RovingFocusGroupItem,
182
+ Fe as createRovingFocusGroupScope
6
183
  };
package/dist/index104.js CHANGED
@@ -1,32 +1,17 @@
1
- import * as a from "react";
2
- import { Primitive as o } from "./index82.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
- }), l = "VisuallyHidden", e = a.forwardRef(
17
- (r, i) => /* @__PURE__ */ t(
18
- o.span,
19
- {
20
- ...r,
21
- ref: i,
22
- style: { ...d, ...r.style }
23
- }
24
- )
25
- );
26
- e.displayName = l;
27
- var p = e;
1
+ var m = 1, j = 0.9, k = 0.8, B = 0.17, v = 0.1, w = 0.999, D = 0.9999, G = 0.99, H = /[\\\/_+.#"@\[\(\{&]/, J = /[\\\/_+.#"@\[\(\{&]/g, K = /[\s-]/, A = /[\s-]/g;
2
+ function $(t, o, e, i, n, h, u) {
3
+ if (h === o.length) return n === t.length ? m : G;
4
+ var s = `${n},${h}`;
5
+ if (u[s] !== void 0) return u[s];
6
+ for (var d = i.charAt(h), a = e.indexOf(d, n), l = 0, r, g, c, p; a >= 0; ) r = $(t, o, e, i, a + 1, h + 1, u), r > l && (a === n ? r *= m : H.test(t.charAt(a - 1)) ? (r *= k, c = t.slice(n, a - 1).match(J), c && n > 0 && (r *= Math.pow(w, c.length))) : K.test(t.charAt(a - 1)) ? (r *= j, p = t.slice(n, a - 1).match(A), p && n > 0 && (r *= Math.pow(w, p.length))) : (r *= B, n > 0 && (r *= Math.pow(w, a - n))), t.charAt(a) !== o.charAt(h) && (r *= D)), (r < v && e.charAt(a - 1) === i.charAt(h + 1) || i.charAt(h + 1) === i.charAt(h) && e.charAt(a - 1) !== i.charAt(h)) && (g = $(t, o, e, i, a + 1, h + 2, u), g * v > r && (r = g * v)), r > l && (l = r), a = e.indexOf(d, a + 1);
7
+ return u[s] = l, l;
8
+ }
9
+ function x(t) {
10
+ return t.toLowerCase().replace(A, " ");
11
+ }
12
+ function M(t, o, e) {
13
+ return t = e && e.length > 0 ? `${t + " " + e.join(" ")}` : t, $(t, o, x(t), x(o), 0, 0, {});
14
+ }
28
15
  export {
29
- p as Root,
30
- d as VISUALLY_HIDDEN_STYLES,
31
- e as VisuallyHidden
16
+ M as a
32
17
  };
package/dist/index11.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import { jsx as e } from "react/jsx-runtime";
2
2
  import * as c from "react";
3
- import { Checkbox as o, CheckboxIndicator as s } from "./index50.js";
3
+ import { Checkbox as o, CheckboxIndicator as s } from "./index49.js";
4
4
  import { cn as r } from "./index2.js";
5
- import m from "./index51.js";
5
+ import m from "./index50.js";
6
6
  const n = c.forwardRef(({ className: i, ...t }, a) => /* @__PURE__ */ e(
7
7
  o,
8
8
  {
package/dist/index110.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as r from "react";
2
- import { useCallbackRef as s } from "./index89.js";
2
+ import { useCallbackRef as s } from "./index86.js";
3
3
  function p(n, e = globalThis == null ? void 0 : globalThis.document) {
4
4
  const t = s(n);
5
5
  r.useEffect(() => {
package/dist/index12.js CHANGED
@@ -1,4 +1,4 @@
1
- import { Root as l, CollapsibleTrigger as o, CollapsibleContent as e } from "./index62.js";
1
+ import { Root as l, CollapsibleTrigger as o, CollapsibleContent as e } from "./index47.js";
2
2
  const t = l, i = o, C = e;
3
3
  export {
4
4
  t as Collapsible,
package/dist/index13.js CHANGED
@@ -3,9 +3,9 @@ import * as h from "react";
3
3
  import { cn as f } from "./index2.js";
4
4
  import { Popover as v, PopoverTrigger as C, PopoverContent as S } from "./index21.js";
5
5
  import { Button as O } from "./index9.js";
6
- import j from "./index63.js";
6
+ import j from "./index65.js";
7
7
  import { Command as k, CommandInput as P, CommandList as R, CommandEmpty as B, CommandGroup as I, CommandItem as L } from "./index14.js";
8
- import M from "./index51.js";
8
+ import M from "./index50.js";
9
9
  const D = h.forwardRef(
10
10
  ({
11
11
  options: s,
package/dist/index14.js CHANGED
@@ -1,9 +1,9 @@
1
1
  import { jsx as t, jsxs as i } from "react/jsx-runtime";
2
2
  import * as o from "react";
3
- import { Command as r } from "./index55.js";
3
+ import { Command as r } from "./index70.js";
4
4
  import { cn as d } from "./index2.js";
5
5
  import { Dialog as s, DialogContent as n } from "./index15.js";
6
- import l from "./index56.js";
6
+ import l from "./index71.js";
7
7
  const p = o.forwardRef(({ className: e, ...a }, m) => /* @__PURE__ */ t(
8
8
  r,
9
9
  {
package/dist/index15.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import { jsx as t, jsxs as l } from "react/jsx-runtime";
2
2
  import * as i from "react";
3
- import { Root as g, Portal as u, Trigger as x, Close as n, Overlay as d, Content as r, Title as c, Description as m } from "./index60.js";
3
+ import { Root as g, Portal as u, Trigger as x, Close as n, Overlay as d, Content as r, Title as c, Description as m } from "./index63.js";
4
4
  import { cn as s } from "./index2.js";
5
- import y from "./index61.js";
5
+ import y from "./index64.js";
6
6
  const T = g, j = x, N = u, F = n, f = i.forwardRef(({ className: a, ...e }, o) => /* @__PURE__ */ t(
7
7
  d,
8
8
  {
package/dist/index17.js CHANGED
@@ -1,9 +1,9 @@
1
1
  import { jsx as o, jsxs as d } from "react/jsx-runtime";
2
2
  import * as n from "react";
3
- import { Root as w, Trigger as x, Group as N, Portal as m, Sub as v, RadioGroup as R, Content as l, Item as p, CheckboxItem as c, ItemIndicator as u, RadioItem as f, Label as b, Separator as y, SubContent as g, SubTrigger as h } from "./index57.js";
3
+ import { Root as w, Trigger as x, Group as N, Portal as m, Sub as v, RadioGroup as R, Content as l, Item as p, CheckboxItem as c, ItemIndicator as u, RadioItem as f, Label as b, Separator as y, SubContent as g, SubTrigger as h } from "./index56.js";
4
4
  import { cn as s } from "./index2.js";
5
- import D from "./index51.js";
6
- import M from "./index54.js";
5
+ import D from "./index50.js";
6
+ import M from "./index57.js";
7
7
  import S from "./index58.js";
8
8
  const H = w, J = x, K = N, O = m, Q = v, U = R, I = n.forwardRef(({ className: e, inset: a, children: t, ...r }, i) => /* @__PURE__ */ d(
9
9
  h,
package/dist/index18.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { jsx as i } from "react/jsx-runtime";
2
2
  import * as s from "react";
3
- import { Root as F } from "./index49.js";
4
- import { FormProvider as u, useFormContext as p, Controller as x } from "./index69.js";
3
+ import { Root as F } from "./index59.js";
4
+ import { FormProvider as u, useFormContext as p, Controller as x } from "./index60.js";
5
5
  import { cn as a } from "./index2.js";
6
6
  import { Label as I } from "./index20.js";
7
7
  const D = u, f = s.createContext(
package/dist/index20.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { jsx as m } from "react/jsx-runtime";
2
2
  import * as t from "react";
3
- import { Root as o } from "./index65.js";
4
- import { cva as i } from "./index45.js";
3
+ import { Root as o } from "./index53.js";
4
+ import { cva as i } from "./index46.js";
5
5
  import { cn as s } from "./index2.js";
6
6
  const l = i(
7
7
  "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
package/dist/index21.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { jsx as o } from "react/jsx-runtime";
2
2
  import * as s from "react";
3
- import { Root as d, Trigger as m, Anchor as p, Portal as c, Content as t } from "./index66.js";
3
+ import { Root as d, Trigger as m, Anchor as p, Portal as c, Content as t } from "./index62.js";
4
4
  import { cn as l } from "./index2.js";
5
5
  const P = d, u = m, v = p, f = s.forwardRef(({ className: e, align: a = "center", sideOffset: r = 4, ...i }, n) => /* @__PURE__ */ o(c, { children: /* @__PURE__ */ o(
6
6
  t,
package/dist/index22.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { jsxs as o, jsx as e } from "react/jsx-runtime";
2
2
  import * as m from "react";
3
- import { Root as d, Indicator as l } from "./index70.js";
3
+ import { Root as d, Indicator as l } from "./index69.js";
4
4
  import { cn as c } from "./index2.js";
5
5
  const f = m.forwardRef(
6
6
  ({
package/dist/index23.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import { jsx as r } from "react/jsx-runtime";
2
2
  import * as i from "react";
3
- import { Root as t, Item as s, Indicator as d } from "./index53.js";
3
+ import { Root as t, Item as s, Indicator as d } from "./index73.js";
4
4
  import { cn as m } from "./index2.js";
5
- import l from "./index54.js";
5
+ import l from "./index57.js";
6
6
  const c = i.forwardRef(({ className: e, ...o }, a) => /* @__PURE__ */ r(
7
7
  t,
8
8
  {
package/dist/index24.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { jsxs as m, jsx as r } from "react/jsx-runtime";
2
2
  import * as i from "react";
3
- import { Root as s, Viewport as p, Corner as d, ScrollAreaScrollbar as c, ScrollAreaThumb as f } from "./index71.js";
3
+ import { Root as s, Viewport as p, Corner as d, ScrollAreaScrollbar as c, ScrollAreaThumb as f } from "./index61.js";
4
4
  import { cn as n } from "./index2.js";
5
5
  const h = i.forwardRef(({ className: l, children: e, ...o }, a) => /* @__PURE__ */ m(
6
6
  s,
package/dist/index25.js CHANGED
@@ -1,10 +1,10 @@
1
1
  import { jsxs as i, jsx as e } from "react/jsx-runtime";
2
2
  import * as s from "react";
3
- import { Root as N, Group as b, Value as g, Trigger as d, Icon as S, Portal as v, Content as m, Viewport as R, Label as n, Item as c, ItemIndicator as C, ItemText as j, Separator as p, ScrollUpButton as f, ScrollDownButton as y } from "./index74.js";
3
+ import { Root as N, Group as b, Value as g, Trigger as d, Icon as S, Portal as v, Content as m, Viewport as R, Label as n, Item as c, ItemIndicator as C, ItemText as j, Separator as p, ScrollUpButton as f, ScrollDownButton as y } from "./index54.js";
4
4
  import { cn as o } from "./index2.js";
5
- import u from "./index48.js";
6
- import I from "./index51.js";
7
- import B from "./index75.js";
5
+ import u from "./index52.js";
6
+ import I from "./index50.js";
7
+ import B from "./index55.js";
8
8
  const E = N, F = b, H = g, k = s.forwardRef(({ className: a, children: r, ...t }, l) => /* @__PURE__ */ i(
9
9
  d,
10
10
  {
package/dist/index26.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { jsx as l } from "react/jsx-runtime";
2
2
  import * as f from "react";
3
- import { Root as o } from "./index64.js";
3
+ import { Root as o } from "./index72.js";
4
4
  import { cn as i } from "./index2.js";
5
5
  const s = f.forwardRef(
6
6
  ({ className: a, orientation: r = "horizontal", decorative: m = !0, ...p }, t) => /* @__PURE__ */ l(
package/dist/index27.js CHANGED
@@ -1,9 +1,9 @@
1
1
  import { jsx as a, jsxs as r } from "react/jsx-runtime";
2
2
  import * as i from "react";
3
- import { Root as g, Portal as u, Trigger as x, Close as n, Overlay as d, Content as l, Title as m, Description as c } from "./index60.js";
4
- import { cva as y } from "./index45.js";
3
+ import { Root as g, Portal as u, Trigger as x, Close as n, Overlay as d, Content as l, Title as m, Description as c } from "./index63.js";
4
+ import { cva as y } from "./index46.js";
5
5
  import { cn as s } from "./index2.js";
6
- import N from "./index61.js";
6
+ import N from "./index64.js";
7
7
  const H = g, O = x, P = n, b = u, f = i.forwardRef(({ className: e, ...t }, o) => /* @__PURE__ */ a(
8
8
  d,
9
9
  {
package/dist/index29.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { jsxs as a, jsx as e } from "react/jsx-runtime";
2
2
  import * as b from "react";
3
- import { Root as n, Track as l, Range as p, Thumb as d } from "./index72.js";
3
+ import { Root as n, Track as l, Range as p, Thumb as d } from "./index66.js";
4
4
  import { cn as h } from "./index2.js";
5
5
  const g = b.forwardRef(({ className: i, defaultValue: r, value: o, ...s }, m) => {
6
6
  const t = (o == null ? void 0 : o.length) ?? (r == null ? void 0 : r.length) ?? 1;
package/dist/index31.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { jsx as r } from "react/jsx-runtime";
2
2
  import * as a from "react";
3
- import { Root as o, Thumb as n } from "./index67.js";
3
+ import { Root as o, Thumb as n } from "./index74.js";
4
4
  import { cn as e } from "./index2.js";
5
5
  const c = a.forwardRef(({ className: i, ...s }, t) => /* @__PURE__ */ r(
6
6
  o,
package/dist/index33.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { jsx as i } from "react/jsx-runtime";
2
2
  import * as s from "react";
3
- import { Root as d, List as o, Trigger as n, Content as c } from "./index68.js";
3
+ import { Root as d, List as o, Trigger as n, Content as c } from "./index67.js";
4
4
  import { cn as r } from "./index2.js";
5
5
  const u = d, f = s.forwardRef(({ className: e, ...t }, a) => /* @__PURE__ */ i(
6
6
  o,
package/dist/index36.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { jsx as n } from "react/jsx-runtime";
2
2
  import * as s from "react";
3
- import { Root as t } from "./index59.js";
4
- import { cva as m } from "./index45.js";
3
+ import { Root as t } from "./index75.js";
4
+ import { cva as m } from "./index46.js";
5
5
  import { cn as p } from "./index2.js";
6
6
  const f = m(
7
7
  "inline-flex items-center justify-center text-sm font-medium transition-colors hover:bg-primary/20 hover:text-primary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary disabled:pointer-events-none disabled:opacity-50 border-2 border-primary data-[state=on]:bg-primary data-[state=on]:text-primary-foreground data-[state=off]:bg-transparent data-[state=off]:text-primary [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 gap-2",
package/dist/index37.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { jsx as a } from "react/jsx-runtime";
2
2
  import * as d from "react";
3
- import { Root as s, Trigger as n, Portal as m, Content as e, Provider as l } from "./index73.js";
3
+ import { Root as s, Trigger as n, Portal as m, Content as e, Provider as l } from "./index68.js";
4
4
  import { cn as p } from "./index2.js";
5
5
  const f = ({ children: o, ...t }) => /* @__PURE__ */ a(l, { delayDuration: 100, skipDelayDuration: 300, ...t, children: o });
6
6
  f.displayName = "TooltipProvider";
package/dist/index4.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import { jsx as a, jsxs as m } from "react/jsx-runtime";
2
2
  import * as n from "react";
3
- import { Root as c, Item as l, Header as f, Trigger as i, Content as d } from "./index47.js";
3
+ import { Root as c, Item as l, Header as f, Trigger as i, Content as d } from "./index51.js";
4
4
  import { cn as s } from "./index2.js";
5
- import p from "./index48.js";
5
+ import p from "./index52.js";
6
6
  const R = c, N = n.forwardRef(({ className: e, ...o }, t) => /* @__PURE__ */ a(
7
7
  l,
8
8
  {
package/dist/index45.js CHANGED
@@ -1,35 +1,127 @@
1
- import { clsx as O } from "./index43.js";
2
- const m = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = O, j = (e, l) => (n) => {
3
- var s;
4
- if ((l == null ? void 0 : l.variants) == null) return y(e, n == null ? void 0 : n.class, n == null ? void 0 : n.className);
5
- const { variants: r, defaultVariants: d } = l, V = Object.keys(r).map((t) => {
6
- const a = n == null ? void 0 : n[t], u = d == null ? void 0 : d[t];
7
- if (a === null) return null;
8
- const i = m(a) || m(u);
9
- return r[t][i];
10
- }), v = n && Object.entries(n).reduce((t, a) => {
11
- let [u, i] = a;
12
- return i === void 0 || (t[u] = i), t;
13
- }, {}), N = l == null || (s = l.compoundVariants) === null || s === void 0 ? void 0 : s.reduce((t, a) => {
14
- let { class: u, className: i, ...f } = a;
15
- return Object.entries(f).every((C) => {
16
- let [c, o] = C;
17
- return Array.isArray(o) ? o.includes({
18
- ...d,
19
- ...v
20
- }[c]) : {
21
- ...d,
22
- ...v
23
- }[c] === o;
24
- }) ? [
25
- ...t,
26
- u,
27
- i
28
- ] : t;
29
- }, []);
30
- return y(e, V, N, n == null ? void 0 : n.class, n == null ? void 0 : n.className);
1
+ import * as l from "react";
2
+ import { createContextScope as w } from "./index76.js";
3
+ import { useComposedRefs as v } from "./index77.js";
4
+ import { createDialogScope as A, Root as M, Portal as x, Trigger as I, Overlay as L, WarningProvider as $, Content as F, Title as G, Description as j, Close as f } from "./index63.js";
5
+ import { composeEventHandlers as W } from "./index78.js";
6
+ import { createSlottable as Y } from "./index79.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 });
31
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(I, { ...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(L, { ...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;
32
108
  export {
33
- j as cva,
34
- y as cx
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
35
127
  };