@drjoshcsimmons/scl 0.1.11 → 0.1.13

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 (102) hide show
  1. package/dist/index100.js +29 -47
  2. package/dist/index101.js +10 -52
  3. package/dist/index102.js +55 -30
  4. package/dist/index103.js +30 -4
  5. package/dist/index104.js +3 -218
  6. package/dist/index105.js +216 -45
  7. package/dist/index106.js +47 -29
  8. package/dist/index107.js +30 -9
  9. package/dist/index108.js +30 -181
  10. package/dist/index11.js +2 -2
  11. package/dist/index110.js +9 -30
  12. package/dist/index111.js +159 -628
  13. package/dist/index112.js +1 -1
  14. package/dist/index115.js +12 -6
  15. package/dist/index116.js +47 -11
  16. package/dist/index117.js +6 -21
  17. package/dist/index118.js +206 -9
  18. package/dist/index119.js +21 -37
  19. package/dist/index12.js +1 -1
  20. package/dist/index120.js +399 -17
  21. package/dist/index121.js +21 -206
  22. package/dist/index122.js +9 -22
  23. package/dist/index123.js +38 -400
  24. package/dist/index124.js +18 -48
  25. package/dist/index125.js +25 -2
  26. package/dist/index126.js +29 -53
  27. package/dist/index127.js +5 -65
  28. package/dist/index128.js +2 -25
  29. package/dist/index129.js +53 -29
  30. package/dist/index13.js +2 -2
  31. package/dist/index130.js +65 -5
  32. package/dist/index136.js +1 -1
  33. package/dist/index137.js +1 -1
  34. package/dist/index14.js +2 -2
  35. package/dist/index141.js +1 -1
  36. package/dist/index15.js +2 -2
  37. package/dist/index17.js +4 -4
  38. package/dist/index18.js +2 -2
  39. package/dist/index20.js +1 -1
  40. package/dist/index21.js +1 -1
  41. package/dist/index22.js +1 -1
  42. package/dist/index23.js +2 -2
  43. package/dist/index24.js +1 -1
  44. package/dist/index25.js +3 -3
  45. package/dist/index26.js +1 -1
  46. package/dist/index27.js +2 -2
  47. package/dist/index29.js +1 -1
  48. package/dist/index33.js +1 -1
  49. package/dist/index36.js +1 -1
  50. package/dist/index37.js +1 -1
  51. package/dist/index45.js +1 -1
  52. package/dist/index46.js +1 -1
  53. package/dist/index48.js +245 -295
  54. package/dist/index49.js +5 -5
  55. package/dist/index50.js +303 -118
  56. package/dist/index51.js +12 -73
  57. package/dist/index52.js +244 -55
  58. package/dist/index53.js +9 -260
  59. package/dist/index54.js +225 -12
  60. package/dist/index55.js +11 -249
  61. package/dist/index56.js +5 -3
  62. package/dist/index57.js +114 -107
  63. package/dist/index58.js +73 -12
  64. package/dist/index59.js +82 -31
  65. package/dist/index6.js +1 -1
  66. package/dist/index60.js +846 -68
  67. package/dist/index61.js +9 -860
  68. package/dist/index62.js +118 -9
  69. package/dist/index63.js +16 -159
  70. package/dist/index64.js +54 -330
  71. package/dist/index65.js +213 -407
  72. package/dist/index66.js +407 -213
  73. package/dist/index67.js +332 -18
  74. package/dist/index68.js +148 -212
  75. package/dist/index69.js +31 -11
  76. package/dist/index7.js +1 -1
  77. package/dist/index70.js +236 -11
  78. package/dist/index71.js +2 -2
  79. package/dist/index72.js +12 -236
  80. package/dist/index73.js +242 -518
  81. package/dist/index74.js +530 -18
  82. package/dist/index75.js +20 -252
  83. package/dist/index80.js +1 -1
  84. package/dist/index82.js +1 -1
  85. package/dist/index84.js +122 -12
  86. package/dist/index85.js +130 -50
  87. package/dist/index86.js +13 -10
  88. package/dist/index87.js +68 -3
  89. package/dist/index88.js +15 -30
  90. package/dist/index89.js +9 -13
  91. package/dist/index9.js +1 -1
  92. package/dist/index90.js +50 -9
  93. package/dist/index91.js +47 -5
  94. package/dist/index92.js +5 -24
  95. package/dist/index93.js +23 -67
  96. package/dist/index94.js +12 -122
  97. package/dist/index95.js +633 -118
  98. package/dist/index96.js +9 -14
  99. package/dist/index97.js +52 -12
  100. package/dist/index98.js +10 -8
  101. package/dist/index99.js +3 -49
  102. package/package.json +1 -1
package/dist/index62.js CHANGED
@@ -1,11 +1,120 @@
1
- import e from "./index117.js";
2
- /**
3
- * @license lucide-react v0.460.0 - ISC
4
- *
5
- * This source code is licensed under the ISC license.
6
- * See the LICENSE file in the root directory of this source tree.
7
- */
8
- const r = e("ChevronUp", [["path", { d: "m18 15-6-6-6 6", key: "153udz" }]]);
1
+ import * as o from "react";
2
+ import { composeEventHandlers as T } from "./index79.js";
3
+ import { createContextScope as S } from "./index76.js";
4
+ import { useControllableState as D } from "./index80.js";
5
+ import { useLayoutEffect as L } from "./index99.js";
6
+ import { useComposedRefs as M } from "./index78.js";
7
+ import { Primitive as v } from "./index81.js";
8
+ import { Presence as k } from "./index87.js";
9
+ import { useId as F } from "./index82.js";
10
+ import { jsx as c } from "react/jsx-runtime";
11
+ var u = "Collapsible", [B, W] = S(u), [G, g] = B(u), w = o.forwardRef(
12
+ (e, a) => {
13
+ const {
14
+ __scopeCollapsible: i,
15
+ open: r,
16
+ defaultOpen: t,
17
+ disabled: l,
18
+ onOpenChange: s,
19
+ ...m
20
+ } = e, [d, p] = D({
21
+ prop: r,
22
+ defaultProp: t ?? !1,
23
+ onChange: s,
24
+ caller: u
25
+ });
26
+ return /* @__PURE__ */ c(
27
+ G,
28
+ {
29
+ scope: i,
30
+ disabled: l,
31
+ contentId: F(),
32
+ open: d,
33
+ onOpenToggle: o.useCallback(() => p((C) => !C), [p]),
34
+ children: /* @__PURE__ */ c(
35
+ v.div,
36
+ {
37
+ "data-state": h(d),
38
+ "data-disabled": l ? "" : void 0,
39
+ ...m,
40
+ ref: a
41
+ }
42
+ )
43
+ }
44
+ );
45
+ }
46
+ );
47
+ w.displayName = u;
48
+ var A = "CollapsibleTrigger", I = o.forwardRef(
49
+ (e, a) => {
50
+ const { __scopeCollapsible: i, ...r } = e, t = g(A, i);
51
+ return /* @__PURE__ */ c(
52
+ v.button,
53
+ {
54
+ type: "button",
55
+ "aria-controls": t.contentId,
56
+ "aria-expanded": t.open || !1,
57
+ "data-state": h(t.open),
58
+ "data-disabled": t.disabled ? "" : void 0,
59
+ disabled: t.disabled,
60
+ ...r,
61
+ ref: a,
62
+ onClick: T(e.onClick, t.onOpenToggle)
63
+ }
64
+ );
65
+ }
66
+ );
67
+ I.displayName = A;
68
+ var R = "CollapsibleContent", O = o.forwardRef(
69
+ (e, a) => {
70
+ const { forceMount: i, ...r } = e, t = g(R, e.__scopeCollapsible);
71
+ return /* @__PURE__ */ c(k, { present: i || t.open, children: ({ present: l }) => /* @__PURE__ */ c($, { ...r, ref: a, present: l }) });
72
+ }
73
+ );
74
+ O.displayName = R;
75
+ var $ = o.forwardRef((e, a) => {
76
+ const { __scopeCollapsible: i, present: r, children: t, ...l } = e, s = g(R, i), [m, d] = o.useState(r), p = o.useRef(null), C = M(a, p), y = o.useRef(0), x = y.current, N = o.useRef(0), P = N.current, b = s.open || m, _ = o.useRef(b), f = o.useRef(void 0);
77
+ return o.useEffect(() => {
78
+ const n = requestAnimationFrame(() => _.current = !1);
79
+ return () => cancelAnimationFrame(n);
80
+ }, []), L(() => {
81
+ const n = p.current;
82
+ if (n) {
83
+ f.current = f.current || {
84
+ transitionDuration: n.style.transitionDuration,
85
+ animationName: n.style.animationName
86
+ }, n.style.transitionDuration = "0s", n.style.animationName = "none";
87
+ const E = n.getBoundingClientRect();
88
+ y.current = E.height, N.current = E.width, _.current || (n.style.transitionDuration = f.current.transitionDuration, n.style.animationName = f.current.animationName), d(r);
89
+ }
90
+ }, [s.open, r]), /* @__PURE__ */ c(
91
+ v.div,
92
+ {
93
+ "data-state": h(s.open),
94
+ "data-disabled": s.disabled ? "" : void 0,
95
+ id: s.contentId,
96
+ hidden: !b,
97
+ ...l,
98
+ ref: C,
99
+ style: {
100
+ "--radix-collapsible-content-height": x ? `${x}px` : void 0,
101
+ "--radix-collapsible-content-width": P ? `${P}px` : void 0,
102
+ ...e.style
103
+ },
104
+ children: b && t
105
+ }
106
+ );
107
+ });
108
+ function h(e) {
109
+ return e ? "open" : "closed";
110
+ }
111
+ var X = w, Y = I, Z = O;
9
112
  export {
10
- r as default
113
+ w as Collapsible,
114
+ O as CollapsibleContent,
115
+ I as CollapsibleTrigger,
116
+ Z as Content,
117
+ X as Root,
118
+ Y as Trigger,
119
+ W as createCollapsibleScope
11
120
  };
package/dist/index63.js CHANGED
@@ -1,163 +1,20 @@
1
- import * as v from "react";
2
- import { composeEventHandlers as g } from "./index79.js";
3
- import { createContextScope as x } from "./index76.js";
4
- import { createRovingFocusGroupScope as C, Root as E, Item as F } from "./index108.js";
5
- import { Presence as w } from "./index93.js";
6
- import { Primitive as b } from "./index81.js";
7
- import { useDirection as D } from "./index83.js";
8
- import { useControllableState as V } from "./index80.js";
9
- import { useId as G } from "./index82.js";
1
+ import * as i from "react";
2
+ import { Primitive as f } from "./index108.js";
10
3
  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
- );
4
+ var m = "Label", r = i.forwardRef((e, o) => /* @__PURE__ */ l(
5
+ f.label,
6
+ {
7
+ ...e,
8
+ ref: o,
9
+ onMouseDown: (t) => {
10
+ var a;
11
+ t.target.closest("button, input, select, textarea") || ((a = e.onMouseDown) == null || a.call(e, t), !t.defaultPrevented && t.detail > 1 && t.preventDefault());
12
+ }
51
13
  }
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;
14
+ ));
15
+ r.displayName = m;
16
+ var b = r;
154
17
  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
18
+ r as Label,
19
+ b as Root
163
20
  };