@drjoshcsimmons/scl 0.1.3 → 0.1.4
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.
- package/README.md +35 -35
- package/dist/index100.js +15 -50
- package/dist/index102.js +48 -648
- package/dist/index103.js +205 -167
- package/dist/index104.js +30 -15
- package/dist/index11.js +2 -2
- package/dist/index110.js +1 -1
- package/dist/index112.js +1 -1
- package/dist/index12.js +1 -1
- package/dist/index13.js +2 -2
- package/dist/index14.js +2 -2
- package/dist/index15.js +2 -2
- package/dist/index17.js +4 -4
- package/dist/index18.js +2 -2
- package/dist/index20.js +2 -2
- package/dist/index21.js +1 -1
- package/dist/index22.js +1 -1
- package/dist/index23.js +2 -2
- package/dist/index24.js +1 -1
- package/dist/index25.js +4 -4
- package/dist/index26.js +1 -1
- package/dist/index27.js +3 -3
- package/dist/index29.js +1 -1
- package/dist/index31.js +1 -1
- package/dist/index33.js +1 -1
- package/dist/index36.js +2 -2
- package/dist/index37.js +1 -1
- package/dist/index4.js +2 -2
- package/dist/index45.js +220 -108
- package/dist/index46.js +11 -33
- package/dist/index47.js +418 -101
- package/dist/index48.js +147 -59
- package/dist/index49.js +298 -237
- package/dist/index5.js +1 -1
- package/dist/index50.js +5 -2
- package/dist/index51.js +33 -237
- package/dist/index52.js +118 -11
- package/dist/index53.js +70 -15
- package/dist/index54.js +12 -860
- package/dist/index55.js +2 -2
- package/dist/index56.js +229 -205
- package/dist/index57.js +60 -11
- package/dist/index58.js +225 -11
- package/dist/index59.js +11 -60
- package/dist/index6.js +1 -1
- package/dist/index60.js +11 -254
- package/dist/index61.js +112 -517
- package/dist/index62.js +216 -197
- package/dist/index63.js +12 -260
- package/dist/index64.js +82 -12
- package/dist/index65.js +236 -12
- package/dist/index66.js +487 -392
- package/dist/index67.js +21 -160
- package/dist/index68.js +823 -299
- package/dist/index69.js +9 -82
- package/dist/index7.js +1 -1
- package/dist/index70.js +242 -298
- package/dist/index71.js +31 -12
- package/dist/index72.js +332 -18
- package/dist/index73.js +206 -201
- package/dist/index74.js +17 -129
- package/dist/index75.js +130 -31
- package/dist/index77.js +44 -25
- package/dist/index78.js +25 -5
- package/dist/index79.js +6 -53
- package/dist/index8.js +1 -1
- package/dist/index80.js +1 -1
- package/dist/index81.js +34 -4
- package/dist/index82.js +10 -33
- package/dist/index83.js +7 -68
- package/dist/index84.js +3 -10
- package/dist/index85.js +5 -54
- package/dist/index86.js +24 -10
- package/dist/index87.js +181 -30
- package/dist/index88.js +67 -11
- package/dist/index89.js +14 -5
- package/dist/index9.js +2 -2
- package/dist/index90.js +30 -25
- package/dist/index91.js +52 -43
- package/dist/index92.js +10 -7
- package/dist/index93.js +4 -4
- package/dist/index94.js +11 -123
- package/dist/index95.js +52 -13
- package/dist/index96.js +633 -118
- package/dist/index97.js +113 -207
- package/dist/index98.js +134 -13
- package/dist/index99.js +14 -30
- package/package.json +1 -1
package/dist/index48.js
CHANGED
|
@@ -1,75 +1,163 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
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 "./index87.js";
|
|
5
|
+
import { Presence as w } from "./index88.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";
|
|
7
10
|
import { jsx as l } from "react/jsx-runtime";
|
|
8
|
-
var
|
|
9
|
-
|
|
10
|
-
|
|
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
|
+
});
|
|
11
30
|
return /* @__PURE__ */ l(
|
|
12
|
-
|
|
31
|
+
$,
|
|
13
32
|
{
|
|
14
|
-
scope:
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
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
|
+
)
|
|
18
49
|
}
|
|
19
50
|
);
|
|
20
51
|
}
|
|
21
52
|
);
|
|
22
|
-
|
|
23
|
-
var
|
|
24
|
-
(
|
|
25
|
-
const {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
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
|
+
);
|
|
32
76
|
}
|
|
33
77
|
);
|
|
34
|
-
|
|
35
|
-
var
|
|
36
|
-
(
|
|
37
|
-
const {
|
|
38
|
-
return
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
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
|
|
42
142
|
}
|
|
43
|
-
|
|
143
|
+
) });
|
|
44
144
|
}
|
|
45
145
|
);
|
|
46
|
-
|
|
47
|
-
function
|
|
48
|
-
return
|
|
146
|
+
N.displayName = M;
|
|
147
|
+
function P(e, r) {
|
|
148
|
+
return `${e}-trigger-${r}`;
|
|
49
149
|
}
|
|
50
|
-
function
|
|
51
|
-
|
|
52
|
-
() => p(a, t)
|
|
53
|
-
);
|
|
54
|
-
return f(() => {
|
|
55
|
-
s(p(a, t));
|
|
56
|
-
}, [a, t]), f(() => {
|
|
57
|
-
const d = (w) => () => {
|
|
58
|
-
s(w);
|
|
59
|
-
};
|
|
60
|
-
if (!a) return;
|
|
61
|
-
const c = d("loaded"), g = d("error");
|
|
62
|
-
return a.addEventListener("load", c), a.addEventListener("error", g), e && (a.referrerPolicy = e), typeof o == "string" && (a.crossOrigin = o), () => {
|
|
63
|
-
a.removeEventListener("load", c), a.removeEventListener("error", g);
|
|
64
|
-
};
|
|
65
|
-
}, [a, o, e]), u;
|
|
150
|
+
function S(e, r) {
|
|
151
|
+
return `${e}-content-${r}`;
|
|
66
152
|
}
|
|
67
|
-
var
|
|
153
|
+
var Q = I, U = _, W = A, X = N;
|
|
68
154
|
export {
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
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
|
|
75
163
|
};
|