@drjoshcsimmons/scl 0.1.14 → 0.1.15
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/components/ui/dropdown-menu/dropdown-menu.d.ts.map +1 -1
- package/dist/index100.js +24 -12
- package/dist/index102.js +178 -27
- package/dist/index103.js +47 -3
- package/dist/index104.js +30 -25
- package/dist/index105.js +54 -5
- package/dist/index106.js +30 -55
- package/dist/index107.js +1 -1
- package/dist/index108.js +650 -30
- package/dist/index109.js +1 -1
- package/dist/index11.js +2 -2
- package/dist/index110.js +27 -647
- package/dist/index113.js +6 -12
- package/dist/index114.js +42 -200
- package/dist/index115.js +47 -21
- package/dist/index116.js +10 -398
- package/dist/index117.js +200 -42
- package/dist/index118.js +21 -47
- package/dist/index119.js +399 -20
- package/dist/index12.js +1 -1
- package/dist/index120.js +15 -3
- package/dist/index121.js +3 -32
- package/dist/index122.js +32 -12
- package/dist/index123.js +18 -6
- package/dist/index124.js +1 -1
- package/dist/index125.js +2 -25
- package/dist/index126.js +53 -29
- package/dist/index127.js +65 -5
- package/dist/index128.js +25 -2
- package/dist/index129.js +29 -53
- package/dist/index13.js +2 -2
- package/dist/index130.js +5 -65
- package/dist/index131.js +2 -5
- package/dist/index132.js +2 -3
- package/dist/index133.js +5 -24
- package/dist/index134.js +3 -113
- package/dist/index135.js +23 -15
- package/dist/index136.js +107 -519
- package/dist/index137.js +14 -126
- package/dist/index138.js +516 -125
- package/dist/index139.js +128 -2
- package/dist/index14.js +2 -2
- package/dist/index140.js +134 -2
- package/dist/index141.js +65 -69
- package/dist/index142.js +68 -8
- package/dist/index143.js +9 -14
- package/dist/index144.js +14 -66
- package/dist/index145.js +65 -64
- package/dist/index148.js +11 -21
- package/dist/index149.js +26 -11
- package/dist/index15.js +54 -54
- package/dist/index150.js +4 -27
- package/dist/index151.js +22 -4
- package/dist/index17.js +70 -71
- package/dist/index18.js +2 -2
- package/dist/index19.js +4 -4
- package/dist/index20.js +2 -2
- package/dist/index21.js +15 -15
- package/dist/index22.js +20 -20
- package/dist/index24.js +12 -12
- package/dist/index25.js +59 -59
- package/dist/index26.js +1 -1
- package/dist/index27.js +32 -32
- package/dist/index29.js +7 -7
- package/dist/index31.js +14 -14
- package/dist/index32.js +17 -17
- package/dist/index33.js +10 -10
- package/dist/index36.js +9 -9
- package/dist/index37.js +18 -18
- package/dist/index4.js +26 -26
- package/dist/index45.js +237 -33
- package/dist/index46.js +11 -241
- package/dist/index47.js +33 -237
- package/dist/index48.js +73 -11
- package/dist/index49.js +198 -217
- package/dist/index5.js +1 -1
- package/dist/index50.js +435 -12
- package/dist/index51.js +112 -517
- package/dist/index52.js +245 -18
- package/dist/index53.js +9 -161
- package/dist/index54.js +107 -62
- package/dist/index55.js +119 -325
- package/dist/index56.js +10 -10
- package/dist/index57.js +1 -1
- package/dist/index58.js +53 -75
- package/dist/index59.js +247 -242
- package/dist/index6.js +36 -36
- package/dist/index60.js +260 -9
- package/dist/index61.js +12 -130
- package/dist/index62.js +530 -18
- package/dist/index63.js +18 -860
- package/dist/index64.js +161 -9
- package/dist/index65.js +82 -31
- package/dist/index66.js +20 -433
- package/dist/index67.js +856 -56
- package/dist/index68.js +9 -118
- package/dist/index69.js +6 -6
- package/dist/index7.js +1 -1
- package/dist/index70.js +1 -1
- package/dist/index71.js +336 -12
- package/dist/index72.js +303 -118
- package/dist/index73.js +12 -310
- package/dist/index74.js +31 -12
- package/dist/index75.js +12 -254
- package/dist/index76.js +66 -5
- package/dist/index77.js +44 -25
- package/dist/index78.js +23 -64
- package/dist/index79.js +5 -123
- package/dist/index8.js +5 -5
- package/dist/index80.js +50 -13
- package/dist/index81.js +32 -133
- package/dist/index82.js +1 -1
- package/dist/index83.js +7 -218
- package/dist/index84.js +55 -14
- package/dist/index85.js +10 -68
- package/dist/index86.js +4 -34
- package/dist/index87.js +29 -47
- package/dist/index88.js +10 -49
- package/dist/index89.js +122 -47
- package/dist/index9.js +21 -21
- package/dist/index90.js +14 -8
- package/dist/index91.js +130 -41
- package/dist/index92.js +218 -7
- package/dist/index93.js +14 -48
- package/dist/index94.js +68 -29
- package/dist/index95.js +43 -176
- package/dist/index96.js +48 -53
- package/dist/index97.js +8 -10
- package/dist/index98.js +4 -4
- package/dist/index99.js +6 -30
- package/package.json +1 -1
package/dist/index55.js
CHANGED
|
@@ -1,338 +1,132 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import { composeEventHandlers as
|
|
3
|
-
import { useComposedRefs as
|
|
4
|
-
import { createContextScope as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
}, [C]), E = s.useCallback(() => {
|
|
72
|
-
window.clearTimeout(u.current), u.current = 0, C(!1);
|
|
73
|
-
}, [C]), I = s.useCallback(() => {
|
|
74
|
-
window.clearTimeout(u.current), u.current = window.setTimeout(() => {
|
|
75
|
-
T.current = !0, C(!0), u.current = 0;
|
|
76
|
-
}, y);
|
|
77
|
-
}, [y, C]);
|
|
78
|
-
return s.useEffect(() => () => {
|
|
79
|
-
u.current && (window.clearTimeout(u.current), u.current = 0);
|
|
80
|
-
}, []), /* @__PURE__ */ f(z, { ...p, children: /* @__PURE__ */ f(
|
|
81
|
-
le,
|
|
82
|
-
{
|
|
83
|
-
scope: o,
|
|
84
|
-
contentId: h,
|
|
85
|
-
open: x,
|
|
86
|
-
stateAttribute: w,
|
|
87
|
-
trigger: c,
|
|
88
|
-
onTriggerChange: d,
|
|
89
|
-
onTriggerEnter: s.useCallback(() => {
|
|
90
|
-
i.isOpenDelayedRef.current ? I() : P();
|
|
91
|
-
}, [i.isOpenDelayedRef, I, P]),
|
|
92
|
-
onTriggerLeave: s.useCallback(() => {
|
|
93
|
-
m ? E() : (window.clearTimeout(u.current), u.current = 0);
|
|
94
|
-
}, [E, m]),
|
|
95
|
-
onOpen: P,
|
|
96
|
-
onClose: E,
|
|
97
|
-
disableHoverableContent: m,
|
|
98
|
-
children: e
|
|
99
|
-
}
|
|
100
|
-
) });
|
|
101
|
-
};
|
|
102
|
-
B.displayName = R;
|
|
103
|
-
var A = "TooltipTrigger", U = s.forwardRef(
|
|
104
|
-
(t, o) => {
|
|
105
|
-
const { __scopeTooltip: e, ...r } = t, n = _(A, e), a = k(A, e), l = O(e), v = s.useRef(null), i = N(o, v, n.onTriggerChange), p = s.useRef(!1), c = s.useRef(!1), d = s.useCallback(() => p.current = !1, []);
|
|
106
|
-
return s.useEffect(() => () => document.removeEventListener("pointerup", d), [d]), /* @__PURE__ */ f(J, { asChild: !0, ...l, children: /* @__PURE__ */ f(
|
|
107
|
-
te.button,
|
|
1
|
+
import * as r from "react";
|
|
2
|
+
import { composeEventHandlers as T } from "./index79.js";
|
|
3
|
+
import { useComposedRefs as P } from "./index78.js";
|
|
4
|
+
import { createContextScope as I } from "./index76.js";
|
|
5
|
+
import { useControllableState as M } from "./index80.js";
|
|
6
|
+
import { usePrevious as H } from "./index99.js";
|
|
7
|
+
import { useSize as j } from "./index100.js";
|
|
8
|
+
import { Primitive as y } from "./index81.js";
|
|
9
|
+
import { jsxs as A, jsx as m } from "react/jsx-runtime";
|
|
10
|
+
var h = "Switch", [U] = I(h), [q, z] = U(h), R = r.forwardRef(
|
|
11
|
+
(t, a) => {
|
|
12
|
+
const {
|
|
13
|
+
__scopeSwitch: e,
|
|
14
|
+
name: c,
|
|
15
|
+
checked: o,
|
|
16
|
+
defaultChecked: v,
|
|
17
|
+
required: i,
|
|
18
|
+
disabled: n,
|
|
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,
|
|
108
71
|
{
|
|
109
|
-
"
|
|
110
|
-
"data-
|
|
111
|
-
...
|
|
112
|
-
ref:
|
|
113
|
-
onPointerMove: g(t.onPointerMove, (h) => {
|
|
114
|
-
h.pointerType !== "touch" && !c.current && !a.isPointerInTransitRef.current && (n.onTriggerEnter(), c.current = !0);
|
|
115
|
-
}),
|
|
116
|
-
onPointerLeave: g(t.onPointerLeave, () => {
|
|
117
|
-
n.onTriggerLeave(), c.current = !1;
|
|
118
|
-
}),
|
|
119
|
-
onPointerDown: g(t.onPointerDown, () => {
|
|
120
|
-
n.open && n.onClose(), p.current = !0, document.addEventListener("pointerup", d, { once: !0 });
|
|
121
|
-
}),
|
|
122
|
-
onFocus: g(t.onFocus, () => {
|
|
123
|
-
p.current || n.onOpen();
|
|
124
|
-
}),
|
|
125
|
-
onBlur: g(t.onBlur, n.onClose),
|
|
126
|
-
onClick: g(t.onClick, n.onClose)
|
|
72
|
+
"data-state": g(o.checked),
|
|
73
|
+
"data-disabled": o.disabled ? "" : void 0,
|
|
74
|
+
...c,
|
|
75
|
+
ref: a
|
|
127
76
|
}
|
|
128
|
-
)
|
|
77
|
+
);
|
|
129
78
|
}
|
|
130
79
|
);
|
|
131
|
-
|
|
132
|
-
var
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
},
|
|
152
|
-
[d]
|
|
153
|
-
);
|
|
154
|
-
return s.useEffect(() => () => h(), [h]), s.useEffect(() => {
|
|
155
|
-
if (i && c) {
|
|
156
|
-
const m = (T) => u(T, c), y = (T) => u(T, i);
|
|
157
|
-
return i.addEventListener("pointerleave", m), c.addEventListener("pointerleave", y), () => {
|
|
158
|
-
i.removeEventListener("pointerleave", m), c.removeEventListener("pointerleave", y);
|
|
159
|
-
};
|
|
160
|
-
}
|
|
161
|
-
}, [i, c, u, h]), s.useEffect(() => {
|
|
162
|
-
if (l) {
|
|
163
|
-
const m = (y) => {
|
|
164
|
-
const T = y.target, x = { x: y.clientX, y: y.clientY }, C = (i == null ? void 0 : i.contains(T)) || (c == null ? void 0 : c.contains(T)), w = !Ce(x, l);
|
|
165
|
-
C ? h() : w && (h(), p());
|
|
166
|
-
};
|
|
167
|
-
return document.addEventListener("pointermove", m), () => document.removeEventListener("pointermove", m);
|
|
168
|
-
}
|
|
169
|
-
}, [i, c, l, p, h]), /* @__PURE__ */ f(q, { ...t, ref: a });
|
|
170
|
-
}), [de, fe] = D(R, { isInside: !1 }), ve = oe("TooltipContent"), q = s.forwardRef(
|
|
171
|
-
(t, o) => {
|
|
172
|
-
const {
|
|
173
|
-
__scopeTooltip: e,
|
|
174
|
-
children: r,
|
|
175
|
-
"aria-label": n,
|
|
176
|
-
onEscapeKeyDown: a,
|
|
177
|
-
onPointerDownOutside: l,
|
|
178
|
-
...v
|
|
179
|
-
} = t, i = _(b, e), p = O(e), { onClose: c } = i;
|
|
180
|
-
return s.useEffect(() => (document.addEventListener(L, c), () => document.removeEventListener(L, c)), [c]), s.useEffect(() => {
|
|
181
|
-
if (i.trigger) {
|
|
182
|
-
const d = (h) => {
|
|
183
|
-
const u = h.target;
|
|
184
|
-
u != null && u.contains(i.trigger) && c();
|
|
185
|
-
};
|
|
186
|
-
return window.addEventListener("scroll", d, { capture: !0 }), () => window.removeEventListener("scroll", d, { capture: !0 });
|
|
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);
|
|
187
100
|
}
|
|
188
|
-
}, [
|
|
189
|
-
|
|
101
|
+
}, [p, e, c]), /* @__PURE__ */ m(
|
|
102
|
+
"input",
|
|
190
103
|
{
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
...v.style,
|
|
206
|
-
"--radix-tooltip-content-transform-origin": "var(--radix-popper-transform-origin)",
|
|
207
|
-
"--radix-tooltip-content-available-width": "var(--radix-popper-available-width)",
|
|
208
|
-
"--radix-tooltip-content-available-height": "var(--radix-popper-available-height)",
|
|
209
|
-
"--radix-tooltip-trigger-width": "var(--radix-popper-anchor-width)",
|
|
210
|
-
"--radix-tooltip-trigger-height": "var(--radix-popper-anchor-height)"
|
|
211
|
-
},
|
|
212
|
-
children: [
|
|
213
|
-
/* @__PURE__ */ f(ve, { children: r }),
|
|
214
|
-
/* @__PURE__ */ f(de, { scope: e, isInside: !0, children: /* @__PURE__ */ f(ne, { id: i.contentId, role: "tooltip", children: n || r }) })
|
|
215
|
-
]
|
|
216
|
-
}
|
|
217
|
-
)
|
|
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
|
+
}
|
|
218
118
|
}
|
|
219
119
|
);
|
|
220
120
|
}
|
|
221
121
|
);
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
const { __scopeTooltip: e, ...r } = t, n = O(e);
|
|
226
|
-
return fe(
|
|
227
|
-
X,
|
|
228
|
-
e
|
|
229
|
-
).isInside ? null : /* @__PURE__ */ f(Z, { ...n, ...r, ref: o });
|
|
230
|
-
}
|
|
231
|
-
);
|
|
232
|
-
he.displayName = X;
|
|
233
|
-
function me(t, o) {
|
|
234
|
-
const e = Math.abs(o.top - t.y), r = Math.abs(o.bottom - t.y), n = Math.abs(o.right - t.x), a = Math.abs(o.left - t.x);
|
|
235
|
-
switch (Math.min(e, r, n, a)) {
|
|
236
|
-
case a:
|
|
237
|
-
return "left";
|
|
238
|
-
case n:
|
|
239
|
-
return "right";
|
|
240
|
-
case e:
|
|
241
|
-
return "top";
|
|
242
|
-
case r:
|
|
243
|
-
return "bottom";
|
|
244
|
-
default:
|
|
245
|
-
throw new Error("unreachable");
|
|
246
|
-
}
|
|
247
|
-
}
|
|
248
|
-
function Te(t, o, e = 5) {
|
|
249
|
-
const r = [];
|
|
250
|
-
switch (o) {
|
|
251
|
-
case "top":
|
|
252
|
-
r.push(
|
|
253
|
-
{ x: t.x - e, y: t.y + e },
|
|
254
|
-
{ x: t.x + e, y: t.y + e }
|
|
255
|
-
);
|
|
256
|
-
break;
|
|
257
|
-
case "bottom":
|
|
258
|
-
r.push(
|
|
259
|
-
{ x: t.x - e, y: t.y - e },
|
|
260
|
-
{ x: t.x + e, y: t.y - e }
|
|
261
|
-
);
|
|
262
|
-
break;
|
|
263
|
-
case "left":
|
|
264
|
-
r.push(
|
|
265
|
-
{ x: t.x + e, y: t.y - e },
|
|
266
|
-
{ x: t.x + e, y: t.y + e }
|
|
267
|
-
);
|
|
268
|
-
break;
|
|
269
|
-
case "right":
|
|
270
|
-
r.push(
|
|
271
|
-
{ x: t.x - e, y: t.y - e },
|
|
272
|
-
{ x: t.x - e, y: t.y + e }
|
|
273
|
-
);
|
|
274
|
-
break;
|
|
275
|
-
}
|
|
276
|
-
return r;
|
|
277
|
-
}
|
|
278
|
-
function ye(t) {
|
|
279
|
-
const { top: o, right: e, bottom: r, left: n } = t;
|
|
280
|
-
return [
|
|
281
|
-
{ x: n, y: o },
|
|
282
|
-
{ x: e, y: o },
|
|
283
|
-
{ x: e, y: r },
|
|
284
|
-
{ x: n, y: r }
|
|
285
|
-
];
|
|
286
|
-
}
|
|
287
|
-
function Ce(t, o) {
|
|
288
|
-
const { x: e, y: r } = t;
|
|
289
|
-
let n = !1;
|
|
290
|
-
for (let a = 0, l = o.length - 1; a < o.length; l = a++) {
|
|
291
|
-
const v = o[a], i = o[l], p = v.x, c = v.y, d = i.x, h = i.y;
|
|
292
|
-
c > r != h > r && e < (d - p) * (r - c) / (h - c) + p && (n = !n);
|
|
293
|
-
}
|
|
294
|
-
return n;
|
|
295
|
-
}
|
|
296
|
-
function xe(t) {
|
|
297
|
-
const o = t.slice();
|
|
298
|
-
return o.sort((e, r) => e.x < r.x ? -1 : e.x > r.x ? 1 : e.y < r.y ? -1 : e.y > r.y ? 1 : 0), ge(o);
|
|
299
|
-
}
|
|
300
|
-
function ge(t) {
|
|
301
|
-
if (t.length <= 1) return t.slice();
|
|
302
|
-
const o = [];
|
|
303
|
-
for (let r = 0; r < t.length; r++) {
|
|
304
|
-
const n = t[r];
|
|
305
|
-
for (; o.length >= 2; ) {
|
|
306
|
-
const a = o[o.length - 1], l = o[o.length - 2];
|
|
307
|
-
if ((a.x - l.x) * (n.y - l.y) >= (a.y - l.y) * (n.x - l.x)) o.pop();
|
|
308
|
-
else break;
|
|
309
|
-
}
|
|
310
|
-
o.push(n);
|
|
311
|
-
}
|
|
312
|
-
o.pop();
|
|
313
|
-
const e = [];
|
|
314
|
-
for (let r = t.length - 1; r >= 0; r--) {
|
|
315
|
-
const n = t[r];
|
|
316
|
-
for (; e.length >= 2; ) {
|
|
317
|
-
const a = e[e.length - 1], l = e[e.length - 2];
|
|
318
|
-
if ((a.x - l.x) * (n.y - l.y) >= (a.y - l.y) * (n.x - l.x)) e.pop();
|
|
319
|
-
else break;
|
|
320
|
-
}
|
|
321
|
-
e.push(n);
|
|
322
|
-
}
|
|
323
|
-
return e.pop(), o.length === 1 && e.length === 1 && o[0].x === e[0].x && o[0].y === e[0].y ? o : o.concat(e);
|
|
122
|
+
x.displayName = L;
|
|
123
|
+
function g(t) {
|
|
124
|
+
return t ? "checked" : "unchecked";
|
|
324
125
|
}
|
|
325
|
-
var
|
|
126
|
+
var Q = R, V = _;
|
|
326
127
|
export {
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
B as Tooltip,
|
|
332
|
-
he as TooltipArrow,
|
|
333
|
-
Y as TooltipContent,
|
|
334
|
-
V as TooltipPortal,
|
|
335
|
-
F as TooltipProvider,
|
|
336
|
-
U as TooltipTrigger,
|
|
337
|
-
Se as Trigger
|
|
128
|
+
Q as Root,
|
|
129
|
+
R as Switch,
|
|
130
|
+
_ as SwitchThumb,
|
|
131
|
+
V as Thumb
|
|
338
132
|
};
|
package/dist/index56.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import * as i from "react";
|
|
2
|
-
import { composeEventHandlers as I } from "./
|
|
3
|
-
import { useComposedRefs as E } from "./
|
|
4
|
-
import { createContextScope as w } from "./
|
|
5
|
-
import { Primitive as b } from "./
|
|
6
|
-
import { createRovingFocusGroupScope as P, Root as B, Item as q } from "./
|
|
7
|
-
import { useControllableState as K } from "./
|
|
8
|
-
import { useDirection as T } from "./
|
|
9
|
-
import { useSize as U } from "./
|
|
10
|
-
import { usePrevious as V } from "./
|
|
11
|
-
import { Presence as j } from "./
|
|
2
|
+
import { composeEventHandlers as I } from "./index79.js";
|
|
3
|
+
import { useComposedRefs as E } from "./index78.js";
|
|
4
|
+
import { createContextScope as w } from "./index76.js";
|
|
5
|
+
import { Primitive as b } from "./index81.js";
|
|
6
|
+
import { createRovingFocusGroupScope as P, Root as B, Item as q } from "./index102.js";
|
|
7
|
+
import { useControllableState as K } from "./index80.js";
|
|
8
|
+
import { useDirection as T } from "./index83.js";
|
|
9
|
+
import { useSize as U } from "./index100.js";
|
|
10
|
+
import { usePrevious as V } from "./index99.js";
|
|
11
|
+
import { Presence as j } from "./index94.js";
|
|
12
12
|
import { jsx as p, jsxs as z } from "react/jsx-runtime";
|
|
13
13
|
var _ = "Radio", [H, g] = w(_), [W, X] = H(_), k = i.forwardRef(
|
|
14
14
|
(a, d) => {
|
package/dist/index57.js
CHANGED
package/dist/index58.js
CHANGED
|
@@ -1,84 +1,62 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
const {
|
|
8
|
-
__scopeProgress: i,
|
|
9
|
-
value: o = null,
|
|
10
|
-
max: a,
|
|
11
|
-
getValueLabel: N = E,
|
|
12
|
-
...b
|
|
13
|
-
} = r;
|
|
14
|
-
(a || a === 0) && !v(a) && console.error(M(`${a}`, "Progress"));
|
|
15
|
-
const t = v(a) ? a : d;
|
|
16
|
-
o !== null && !p(o, t) && console.error(V(`${o}`, "Progress"));
|
|
17
|
-
const n = p(o, t) ? o : null, I = s(n) ? N(n, t) : void 0;
|
|
18
|
-
return /* @__PURE__ */ l(R, { scope: i, value: n, max: t, children: /* @__PURE__ */ l(
|
|
19
|
-
c.div,
|
|
20
|
-
{
|
|
21
|
-
"aria-valuemax": t,
|
|
22
|
-
"aria-valuemin": 0,
|
|
23
|
-
"aria-valuenow": s(n) ? n : void 0,
|
|
24
|
-
"aria-valuetext": I,
|
|
25
|
-
role: "progressbar",
|
|
26
|
-
"data-state": P(n, t),
|
|
27
|
-
"data-value": n ?? void 0,
|
|
28
|
-
"data-max": t,
|
|
29
|
-
...b,
|
|
30
|
-
ref: e
|
|
31
|
-
}
|
|
32
|
-
) });
|
|
33
|
-
}
|
|
34
|
-
);
|
|
35
|
-
f.displayName = u;
|
|
36
|
-
var g = "ProgressIndicator", x = m.forwardRef(
|
|
37
|
-
(r, e) => {
|
|
38
|
-
const { __scopeProgress: i, ...o } = r, a = _(g, i);
|
|
39
|
-
return /* @__PURE__ */ l(
|
|
40
|
-
c.div,
|
|
41
|
-
{
|
|
42
|
-
"data-state": P(a.value, a.max),
|
|
43
|
-
"data-value": a.value ?? void 0,
|
|
44
|
-
"data-max": a.max,
|
|
45
|
-
...o,
|
|
46
|
-
ref: e
|
|
47
|
-
}
|
|
48
|
-
);
|
|
49
|
-
}
|
|
50
|
-
);
|
|
51
|
-
x.displayName = g;
|
|
52
|
-
function E(r, e) {
|
|
53
|
-
return `${Math.round(r / e * 100)}%`;
|
|
1
|
+
import * as o from "react";
|
|
2
|
+
import { composeRefs as S } from "./index78.js";
|
|
3
|
+
import { jsx as y } from "react/jsx-runtime";
|
|
4
|
+
var E = Symbol.for("react.lazy"), p = o[" use ".trim().toString()];
|
|
5
|
+
function g(t) {
|
|
6
|
+
return typeof t == "object" && t !== null && "then" in t;
|
|
54
7
|
}
|
|
55
|
-
function
|
|
56
|
-
return
|
|
8
|
+
function d(t) {
|
|
9
|
+
return t != null && typeof t == "object" && "$$typeof" in t && t.$$typeof === E && "_payload" in t && g(t._payload);
|
|
57
10
|
}
|
|
58
|
-
|
|
59
|
-
|
|
11
|
+
// @__NO_SIDE_EFFECTS__
|
|
12
|
+
function C(t) {
|
|
13
|
+
const n = /* @__PURE__ */ R(t), i = o.forwardRef((e, r) => {
|
|
14
|
+
let { children: l, ...a } = e;
|
|
15
|
+
d(l) && typeof p == "function" && (l = p(l._payload));
|
|
16
|
+
const s = o.Children.toArray(l), f = s.find(b);
|
|
17
|
+
if (f) {
|
|
18
|
+
const c = f.props.children, m = s.map((u) => u === f ? o.Children.count(c) > 1 ? o.Children.only(null) : o.isValidElement(c) ? c.props.children : null : u);
|
|
19
|
+
return /* @__PURE__ */ y(n, { ...a, ref: r, children: o.isValidElement(c) ? o.cloneElement(c, void 0, m) : null });
|
|
20
|
+
}
|
|
21
|
+
return /* @__PURE__ */ y(n, { ...a, ref: r, children: l });
|
|
22
|
+
});
|
|
23
|
+
return i.displayName = `${t}.Slot`, i;
|
|
60
24
|
}
|
|
61
|
-
|
|
62
|
-
|
|
25
|
+
var V = /* @__PURE__ */ C("Slot");
|
|
26
|
+
// @__NO_SIDE_EFFECTS__
|
|
27
|
+
function R(t) {
|
|
28
|
+
const n = o.forwardRef((i, e) => {
|
|
29
|
+
let { children: r, ...l } = i;
|
|
30
|
+
if (d(r) && typeof p == "function" && (r = p(r._payload)), o.isValidElement(r)) {
|
|
31
|
+
const a = P(r), s = h(l, r.props);
|
|
32
|
+
return r.type !== o.Fragment && (s.ref = e ? S(e, a) : a), o.cloneElement(r, s);
|
|
33
|
+
}
|
|
34
|
+
return o.Children.count(r) > 1 ? o.Children.only(null) : null;
|
|
35
|
+
});
|
|
36
|
+
return n.displayName = `${t}.SlotClone`, n;
|
|
63
37
|
}
|
|
64
|
-
|
|
65
|
-
|
|
38
|
+
var _ = Symbol("radix.slottable");
|
|
39
|
+
function b(t) {
|
|
40
|
+
return o.isValidElement(t) && typeof t.type == "function" && "__radixId" in t.type && t.type.__radixId === _;
|
|
66
41
|
}
|
|
67
|
-
function
|
|
68
|
-
|
|
42
|
+
function h(t, n) {
|
|
43
|
+
const i = { ...n };
|
|
44
|
+
for (const e in n) {
|
|
45
|
+
const r = t[e], l = n[e];
|
|
46
|
+
/^on[A-Z]/.test(e) ? r && l ? i[e] = (...s) => {
|
|
47
|
+
const f = l(...s);
|
|
48
|
+
return r(...s), f;
|
|
49
|
+
} : r && (i[e] = r) : e === "style" ? i[e] = { ...r, ...l } : e === "className" && (i[e] = [r, l].filter(Boolean).join(" "));
|
|
50
|
+
}
|
|
51
|
+
return { ...t, ...i };
|
|
69
52
|
}
|
|
70
|
-
function
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
- \`null\` or \`undefined\` if the progress is indeterminate.
|
|
75
|
-
|
|
76
|
-
Defaulting to \`null\`.`;
|
|
53
|
+
function P(t) {
|
|
54
|
+
var e, r;
|
|
55
|
+
let n = (e = Object.getOwnPropertyDescriptor(t.props, "ref")) == null ? void 0 : e.get, i = n && "isReactWarning" in n && n.isReactWarning;
|
|
56
|
+
return i ? t.ref : (n = (r = Object.getOwnPropertyDescriptor(t, "ref")) == null ? void 0 : r.get, i = n && "isReactWarning" in n && n.isReactWarning, i ? t.props.ref : t.props.ref || t.ref);
|
|
77
57
|
}
|
|
78
|
-
var D = f, L = x;
|
|
79
58
|
export {
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
D as Root
|
|
59
|
+
V as Root,
|
|
60
|
+
V as Slot,
|
|
61
|
+
C as createSlot
|
|
84
62
|
};
|