@drjoshcsimmons/scl 0.2.3 → 0.2.5
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/dist/index100.js +205 -167
- package/dist/index101.js +14 -9
- package/dist/index102.js +47 -29
- package/dist/index103.js +49 -47
- package/dist/index104.js +9 -4
- package/dist/index105.js +1 -1
- package/dist/index106.js +649 -5
- package/dist/index107.js +12 -647
- package/dist/index108.js +4 -30
- package/dist/index109.js +9 -30
- package/dist/index11.js +2 -2
- package/dist/index110.js +30 -15
- package/dist/index111.js +47 -24
- package/dist/index112.js +30 -9
- package/dist/index113.js +48 -6
- package/dist/index114.js +6 -48
- package/dist/index115.js +1 -1
- package/dist/index116.js +1 -1
- package/dist/index118.js +1 -1
- package/dist/index12.js +1 -1
- package/dist/index124.js +1 -1
- package/dist/index13.js +2 -2
- package/dist/index142.js +1 -1
- package/dist/index143.js +1 -1
- package/dist/index148.js +11 -21
- package/dist/index149.js +26 -11
- package/dist/index15.js +2 -2
- package/dist/index150.js +4 -27
- package/dist/index151.js +22 -4
- 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 +124 -32
- package/dist/index46.js +33 -73
- package/dist/index47.js +244 -55
- package/dist/index48.js +9 -237
- package/dist/index49.js +73 -11
- package/dist/index5.js +1 -1
- package/dist/index50.js +210 -214
- package/dist/index51.js +11 -82
- package/dist/index52.js +52 -246
- package/dist/index53.js +12 -118
- package/dist/index54.js +16 -159
- package/dist/index55.js +103 -321
- package/dist/index56.js +71 -249
- package/dist/index57.js +241 -12
- package/dist/index58.js +204 -828
- package/dist/index59.js +5 -3
- package/dist/index6.js +1 -1
- package/dist/index60.js +130 -9
- package/dist/index61.js +248 -219
- package/dist/index62.js +260 -11
- package/dist/index63.js +5 -4
- package/dist/index64.js +225 -12
- package/dist/index65.js +11 -530
- package/dist/index66.js +27 -18
- package/dist/index67.js +5 -5
- package/dist/index69.js +530 -18
- package/dist/index7.js +1 -1
- package/dist/index70.js +855 -26
- package/dist/index71.js +9 -236
- package/dist/index72.js +308 -407
- package/dist/index73.js +402 -216
- package/dist/index74.js +147 -111
- package/dist/index75.js +21 -129
- package/dist/index76.js +24 -52
- package/dist/index77.js +67 -10
- package/dist/index78.js +7 -4
- package/dist/index79.js +52 -30
- package/dist/index8.js +1 -1
- package/dist/index80.js +5 -12
- package/dist/index81.js +24 -67
- package/dist/index82.js +66 -43
- package/dist/index83.js +32 -25
- package/dist/index84.js +8 -6
- package/dist/index85.js +52 -49
- package/dist/index86.js +10 -33
- package/dist/index87.js +4 -11
- package/dist/index88.js +30 -8
- package/dist/index89.js +11 -123
- package/dist/index9.js +2 -2
- package/dist/index90.js +45 -14
- package/dist/index91.js +10 -134
- package/dist/index92.js +7 -218
- package/dist/index93.js +30 -14
- package/dist/index94.js +51 -65
- package/dist/index95.js +29 -47
- package/dist/index96.js +179 -48
- package/dist/index97.js +124 -8
- package/dist/index98.js +12 -52
- package/dist/index99.js +134 -29
- package/package.json +1 -1
package/dist/index74.js
CHANGED
|
@@ -1,127 +1,163 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
1
|
+
import * as v from "react";
|
|
2
|
+
import { composeEventHandlers as g } from "./index78.js";
|
|
3
|
+
import { createContextScope as x } from "./index77.js";
|
|
4
|
+
import { createRovingFocusGroupScope as C, Root as E, Item as F } from "./index96.js";
|
|
5
|
+
import { Presence as w } from "./index82.js";
|
|
6
|
+
import { Primitive as b } from "./index83.js";
|
|
7
|
+
import { useDirection as D } from "./index92.js";
|
|
8
|
+
import { useControllableState as V } from "./index79.js";
|
|
9
|
+
import { useId as G } from "./index91.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
|
+
);
|
|
19
51
|
}
|
|
20
52
|
);
|
|
21
|
-
|
|
22
|
-
var
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
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
|
+
);
|
|
31
76
|
}
|
|
32
77
|
);
|
|
33
|
-
|
|
34
|
-
var
|
|
35
|
-
(e,
|
|
36
|
-
const {
|
|
37
|
-
return /* @__PURE__ */
|
|
38
|
-
|
|
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,
|
|
39
84
|
{
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
85
|
+
asChild: !0,
|
|
86
|
+
...d,
|
|
87
|
+
focusable: !n,
|
|
88
|
+
active: i,
|
|
89
|
+
children: /* @__PURE__ */ l(
|
|
90
|
+
b.button,
|
|
45
91
|
{
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
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);
|
|
53
107
|
}),
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
/* @__PURE__ */ i(U, { contentRef: p })
|
|
59
|
-
]
|
|
108
|
+
onFocus: g(e.onFocus, () => {
|
|
109
|
+
const a = o.activationMode !== "manual";
|
|
110
|
+
!i && !n && a && o.onValueChange(t);
|
|
111
|
+
})
|
|
60
112
|
}
|
|
61
|
-
)
|
|
113
|
+
)
|
|
62
114
|
}
|
|
63
115
|
);
|
|
64
116
|
}
|
|
65
117
|
);
|
|
66
|
-
|
|
67
|
-
var
|
|
68
|
-
(e,
|
|
69
|
-
const {
|
|
70
|
-
return
|
|
71
|
-
|
|
72
|
-
);
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
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
|
+
) });
|
|
90
144
|
}
|
|
91
145
|
);
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
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;
|
|
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;
|
|
108
154
|
export {
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
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
|
|
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
|
|
127
163
|
};
|
package/dist/index75.js
CHANGED
|
@@ -1,132 +1,24 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
value: p = "on",
|
|
20
|
-
onCheckedChange: w,
|
|
21
|
-
form: s,
|
|
22
|
-
...S
|
|
23
|
-
} = t, [d, u] = r.useState(null), b = P(a, (f) => u(f)), C = r.useRef(!1), k = d ? s || !!d.closest("form") : !0, [l, B] = M({
|
|
24
|
-
prop: o,
|
|
25
|
-
defaultProp: v ?? !1,
|
|
26
|
-
onChange: w,
|
|
27
|
-
caller: h
|
|
28
|
-
});
|
|
29
|
-
return /* @__PURE__ */ A(q, { scope: e, checked: l, disabled: n, children: [
|
|
30
|
-
/* @__PURE__ */ m(
|
|
31
|
-
y.button,
|
|
32
|
-
{
|
|
33
|
-
type: "button",
|
|
34
|
-
role: "switch",
|
|
35
|
-
"aria-checked": l,
|
|
36
|
-
"aria-required": i,
|
|
37
|
-
"data-state": g(l),
|
|
38
|
-
"data-disabled": n ? "" : void 0,
|
|
39
|
-
disabled: n,
|
|
40
|
-
value: p,
|
|
41
|
-
...S,
|
|
42
|
-
ref: b,
|
|
43
|
-
onClick: T(t.onClick, (f) => {
|
|
44
|
-
B((N) => !N), k && (C.current = f.isPropagationStopped(), C.current || f.stopPropagation());
|
|
45
|
-
})
|
|
46
|
-
}
|
|
47
|
-
),
|
|
48
|
-
k && /* @__PURE__ */ m(
|
|
49
|
-
x,
|
|
50
|
-
{
|
|
51
|
-
control: d,
|
|
52
|
-
bubbles: !C.current,
|
|
53
|
-
name: c,
|
|
54
|
-
value: p,
|
|
55
|
-
checked: l,
|
|
56
|
-
required: i,
|
|
57
|
-
disabled: n,
|
|
58
|
-
form: s,
|
|
59
|
-
style: { transform: "translateX(-100%)" }
|
|
60
|
-
}
|
|
61
|
-
)
|
|
62
|
-
] });
|
|
63
|
-
}
|
|
64
|
-
);
|
|
65
|
-
R.displayName = h;
|
|
66
|
-
var E = "SwitchThumb", _ = r.forwardRef(
|
|
67
|
-
(t, a) => {
|
|
68
|
-
const { __scopeSwitch: e, ...c } = t, o = z(E, e);
|
|
69
|
-
return /* @__PURE__ */ m(
|
|
70
|
-
y.span,
|
|
71
|
-
{
|
|
72
|
-
"data-state": g(o.checked),
|
|
73
|
-
"data-disabled": o.disabled ? "" : void 0,
|
|
74
|
-
...c,
|
|
75
|
-
ref: a
|
|
76
|
-
}
|
|
77
|
-
);
|
|
78
|
-
}
|
|
79
|
-
);
|
|
80
|
-
_.displayName = E;
|
|
81
|
-
var L = "SwitchBubbleInput", x = r.forwardRef(
|
|
82
|
-
({
|
|
83
|
-
__scopeSwitch: t,
|
|
84
|
-
control: a,
|
|
85
|
-
checked: e,
|
|
86
|
-
bubbles: c = !0,
|
|
87
|
-
...o
|
|
88
|
-
}, v) => {
|
|
89
|
-
const i = r.useRef(null), n = P(i, v), p = H(e), w = j(a);
|
|
90
|
-
return r.useEffect(() => {
|
|
91
|
-
const s = i.current;
|
|
92
|
-
if (!s) return;
|
|
93
|
-
const S = window.HTMLInputElement.prototype, u = Object.getOwnPropertyDescriptor(
|
|
94
|
-
S,
|
|
95
|
-
"checked"
|
|
96
|
-
).set;
|
|
97
|
-
if (p !== e && u) {
|
|
98
|
-
const b = new Event("click", { bubbles: c });
|
|
99
|
-
u.call(s, e), s.dispatchEvent(b);
|
|
100
|
-
}
|
|
101
|
-
}, [p, e, c]), /* @__PURE__ */ m(
|
|
102
|
-
"input",
|
|
103
|
-
{
|
|
104
|
-
type: "checkbox",
|
|
105
|
-
"aria-hidden": !0,
|
|
106
|
-
defaultChecked: e,
|
|
107
|
-
...o,
|
|
108
|
-
tabIndex: -1,
|
|
109
|
-
ref: n,
|
|
110
|
-
style: {
|
|
111
|
-
...o.style,
|
|
112
|
-
...w,
|
|
113
|
-
position: "absolute",
|
|
114
|
-
pointerEvents: "none",
|
|
115
|
-
opacity: 0,
|
|
116
|
-
margin: 0
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
);
|
|
120
|
-
}
|
|
121
|
-
);
|
|
122
|
-
x.displayName = L;
|
|
123
|
-
function g(t) {
|
|
124
|
-
return t ? "checked" : "unchecked";
|
|
1
|
+
import * as p from "react";
|
|
2
|
+
import { Primitive as v } from "./index112.js";
|
|
3
|
+
import { jsx as m } from "react/jsx-runtime";
|
|
4
|
+
var d = "Separator", a = "horizontal", l = ["horizontal", "vertical"], i = p.forwardRef((r, n) => {
|
|
5
|
+
const { decorative: e, orientation: t = a, ...s } = r, o = f(t) ? t : a, c = e ? { role: "none" } : { "aria-orientation": o === "vertical" ? o : void 0, role: "separator" };
|
|
6
|
+
return /* @__PURE__ */ m(
|
|
7
|
+
v.div,
|
|
8
|
+
{
|
|
9
|
+
"data-orientation": o,
|
|
10
|
+
...c,
|
|
11
|
+
...s,
|
|
12
|
+
ref: n
|
|
13
|
+
}
|
|
14
|
+
);
|
|
15
|
+
});
|
|
16
|
+
i.displayName = d;
|
|
17
|
+
function f(r) {
|
|
18
|
+
return l.includes(r);
|
|
125
19
|
}
|
|
126
|
-
var
|
|
20
|
+
var T = i;
|
|
127
21
|
export {
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
_ as SwitchThumb,
|
|
131
|
-
V as Thumb
|
|
22
|
+
T as Root,
|
|
23
|
+
i as Separator
|
|
132
24
|
};
|
package/dist/index76.js
CHANGED
|
@@ -1,57 +1,29 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
const t = i.createContext(n);
|
|
7
|
-
t.displayName = r + "Context";
|
|
8
|
-
const c = o.length;
|
|
9
|
-
o = [...o, n];
|
|
10
|
-
const m = (a) => {
|
|
11
|
-
var l;
|
|
12
|
-
const { scope: s, children: C, ...p } = a, d = ((l = s == null ? void 0 : s[e]) == null ? void 0 : l[c]) || t, v = i.useMemo(() => p, Object.values(p));
|
|
13
|
-
return /* @__PURE__ */ _(d.Provider, { value: v, children: C });
|
|
14
|
-
};
|
|
15
|
-
m.displayName = r + "Provider";
|
|
16
|
-
function S(a, s) {
|
|
17
|
-
var d;
|
|
18
|
-
const C = ((d = s == null ? void 0 : s[e]) == null ? void 0 : d[c]) || t, p = i.useContext(C);
|
|
19
|
-
if (p) return p;
|
|
20
|
-
if (n !== void 0) return n;
|
|
21
|
-
throw new Error(`\`${a}\` must be used within \`${r}\``);
|
|
22
|
-
}
|
|
23
|
-
return [m, S];
|
|
24
|
-
}
|
|
25
|
-
const u = () => {
|
|
26
|
-
const r = o.map((n) => i.createContext(n));
|
|
27
|
-
return function(t) {
|
|
28
|
-
const c = (t == null ? void 0 : t[e]) || r;
|
|
29
|
-
return i.useMemo(
|
|
30
|
-
() => ({ [`__scope${e}`]: { ...t, [e]: c } }),
|
|
31
|
-
[t, c]
|
|
32
|
-
);
|
|
33
|
-
};
|
|
34
|
-
};
|
|
35
|
-
return u.scopeName = e, [f, h(u, ...x)];
|
|
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);
|
|
36
6
|
}
|
|
37
|
-
function
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
};
|
|
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
|
+
};
|
|
52
21
|
};
|
|
53
|
-
|
|
22
|
+
}
|
|
23
|
+
function s(...n) {
|
|
24
|
+
return f.useCallback(i(...n), n);
|
|
54
25
|
}
|
|
55
26
|
export {
|
|
56
|
-
|
|
27
|
+
i as composeRefs,
|
|
28
|
+
s as useComposedRefs
|
|
57
29
|
};
|
package/dist/index77.js
CHANGED
|
@@ -1,13 +1,70 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
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;
|
|
10
66
|
}
|
|
11
67
|
export {
|
|
12
|
-
|
|
68
|
+
w as createContext,
|
|
69
|
+
_ as createContextScope
|
|
13
70
|
};
|
package/dist/index78.js
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
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
|
+
}
|
|
4
7
|
export {
|
|
5
|
-
|
|
8
|
+
h as composeEventHandlers
|
|
6
9
|
};
|