@drjoshcsimmons/scl 0.1.0 → 0.1.1
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/alert/alert.d.ts +1 -1
- package/dist/components/ui/alert/alert.d.ts.map +1 -1
- package/dist/components/ui/badge/badge.d.ts +1 -1
- package/dist/components/ui/badge/badge.d.ts.map +1 -1
- package/dist/components/ui/button/button.d.ts +1 -1
- package/dist/components/ui/button/button.d.ts.map +1 -1
- package/dist/components/ui/combobox/combobox.d.ts +31 -0
- package/dist/components/ui/combobox/combobox.d.ts.map +1 -0
- package/dist/components/ui/combobox/index.d.ts +3 -0
- package/dist/components/ui/combobox/index.d.ts.map +1 -0
- package/dist/components/ui/command/command.d.ts +85 -0
- package/dist/components/ui/command/command.d.ts.map +1 -0
- package/dist/components/ui/command/index.d.ts +2 -0
- package/dist/components/ui/command/index.d.ts.map +1 -0
- package/dist/components/ui/dithered-image/dithered-image.d.ts +6 -2
- package/dist/components/ui/dithered-image/dithered-image.d.ts.map +1 -1
- package/dist/components/ui/dithered-image/index.d.ts +1 -1
- package/dist/components/ui/dithered-image/index.d.ts.map +1 -1
- package/dist/components/ui/form/form.d.ts +24 -0
- package/dist/components/ui/form/form.d.ts.map +1 -0
- package/dist/components/ui/form/index.d.ts +2 -0
- package/dist/components/ui/form/index.d.ts.map +1 -0
- package/dist/components/ui/progress/progress.d.ts +0 -6
- package/dist/components/ui/progress/progress.d.ts.map +1 -1
- package/dist/components/ui/scroll-area/scroll-area.d.ts.map +1 -1
- package/dist/components/ui/skeleton/skeleton.d.ts +4 -1
- package/dist/components/ui/skeleton/skeleton.d.ts.map +1 -1
- package/dist/components/ui/statusline/statusline.d.ts.map +1 -1
- package/dist/components/ui/terminal-textarea/terminal-textarea.d.ts +0 -5
- package/dist/components/ui/terminal-textarea/terminal-textarea.d.ts.map +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +166 -143
- package/dist/index10.js +30 -30
- package/dist/index100.js +9 -30
- package/dist/index101.js +50 -15
- package/dist/index102.js +212 -128
- package/dist/index103.js +4 -50
- package/dist/index104.js +30 -9
- package/dist/index105.js +6 -4
- package/dist/index106.js +19 -179
- package/dist/index107.js +9 -650
- package/dist/index108.js +38 -107
- package/dist/index109.js +17 -90
- package/dist/index11.js +13 -13
- package/dist/index110.js +11 -66
- package/dist/index111.js +201 -154
- package/dist/index112.js +20 -395
- package/dist/index113.js +395 -1675
- package/dist/index114.js +2 -278
- package/dist/index115.js +49 -128
- package/dist/index116.js +65 -32
- package/dist/index117.js +2 -1611
- package/dist/index118.js +2 -298
- package/dist/index119.js +22 -632
- package/dist/index12.js +1 -1
- package/dist/index120.js +29 -144
- package/dist/index121.js +5 -21
- package/dist/index122.js +5 -9
- package/dist/index123.js +3 -38
- package/dist/index124.js +24 -18
- package/dist/index125.js +113 -6
- package/dist/index126.js +15 -11
- package/dist/index127.js +513 -194
- package/dist/index128.js +128 -22
- package/dist/index129.js +114 -380
- package/dist/index13.js +132 -93
- package/dist/index130.js +59 -1300
- package/dist/index131.js +63 -612
- package/dist/index132.js +9 -2
- package/dist/index133.js +13 -52
- package/dist/index134.js +64 -63
- package/dist/index135.js +3 -24
- package/dist/index136.js +23 -29
- package/dist/index137.js +23 -5
- package/dist/index138.js +13 -2
- package/dist/index139.js +28 -2
- package/dist/index14.js +106 -220
- package/dist/index140.js +5 -5
- package/dist/index15.js +79 -125
- package/dist/index16.js +280 -17
- package/dist/index17.js +139 -12
- package/dist/index18.js +92 -22
- package/dist/index19.js +18 -55
- package/dist/index2.js +2 -2
- package/dist/index20.js +14 -26
- package/dist/index21.js +19 -33
- package/dist/index22.js +38 -121
- package/dist/index23.js +29 -22
- package/dist/index24.js +31 -64
- package/dist/index25.js +121 -15
- package/dist/index26.js +19 -29
- package/dist/index27.js +68 -77
- package/dist/index28.js +20 -25
- package/dist/index29.js +32 -88
- package/dist/index3.js +11 -9
- package/dist/index30.js +138 -38
- package/dist/index31.js +20 -227
- package/dist/index32.js +88 -18
- package/dist/index33.js +37 -28
- package/dist/index34.js +86 -22
- package/dist/index35.js +17 -102
- package/dist/index36.js +34 -65
- package/dist/index37.js +23 -49
- package/dist/index38.js +38 -99
- package/dist/index39.js +65 -10
- package/dist/index4.js +6 -6
- package/dist/index40.js +49 -15
- package/dist/index41.js +93 -2256
- package/dist/index42.js +10 -32
- package/dist/index43.js +15 -18
- package/dist/index44.js +2251 -225
- package/dist/index45.js +33 -11
- package/dist/index46.js +116 -64
- package/dist/index47.js +207 -219
- package/dist/index48.js +5 -3
- package/dist/index49.js +54 -330
- package/dist/index5.js +23 -23
- package/dist/index50.js +244 -55
- package/dist/index51.js +9 -241
- package/dist/index52.js +60 -847
- package/dist/index53.js +236 -9
- package/dist/index54.js +11 -118
- package/dist/index55.js +300 -215
- package/dist/index56.js +4 -3
- package/dist/index57.js +225 -11
- package/dist/index58.js +11 -236
- package/dist/index59.js +27 -256
- package/dist/index6.js +12 -12
- package/dist/index60.js +260 -12
- package/dist/index61.js +12 -22
- package/dist/index62.js +94 -506
- package/dist/index63.js +12 -6155
- package/dist/index64.js +20 -2631
- package/dist/index65.js +16 -296
- package/dist/index66.js +232 -663
- package/dist/index67.js +125 -825
- package/dist/index68.js +159 -23
- package/dist/index69.js +241 -315
- package/dist/index7.js +22 -22
- package/dist/index70.js +72 -4889
- package/dist/index71.js +503 -802
- package/dist/index72.js +412 -1235
- package/dist/index73.js +323 -521
- package/dist/index74.js +839 -104
- package/dist/index75.js +9 -161
- package/dist/index76.js +67 -30
- package/dist/index77.js +22 -430
- package/dist/index78.js +6 -129
- package/dist/index79.js +48 -75
- package/dist/index8.js +17 -18
- package/dist/index80.js +42 -64
- package/dist/index81.js +50 -44
- package/dist/index82.js +32 -25
- package/dist/index83.js +10 -6
- package/dist/index84.js +7 -51
- package/dist/index85.js +5 -33
- package/dist/index86.js +24 -10
- package/dist/index87.js +68 -7
- package/dist/index88.js +55 -30
- package/dist/index89.js +10 -54
- package/dist/index9.js +23 -31
- package/dist/index90.js +4 -11
- package/dist/index91.js +30 -4
- package/dist/index92.js +1 -1
- package/dist/index93.js +180 -5
- package/dist/index94.js +14 -24
- package/dist/index95.js +643 -62
- package/dist/index96.js +5 -5
- package/dist/index97.js +128 -212
- package/dist/index98.js +2 -2
- package/dist/index99.js +13 -52
- package/dist/tokens/colors.d.ts +26 -86
- package/dist/tokens/colors.d.ts.map +1 -1
- package/dist/tokens/index.d.ts +12 -84
- package/dist/tokens/index.d.ts.map +1 -1
- package/package.json +26 -22
- package/dist/index141.js +0 -5
- package/dist/index142.js +0 -26
- package/dist/index143.js +0 -115
- package/dist/index144.js +0 -18
- package/dist/index145.js +0 -527
- package/dist/index146.js +0 -130
- package/dist/index147.js +0 -136
- package/dist/index148.js +0 -67
- package/dist/index149.js +0 -71
- package/dist/index150.js +0 -11
- package/dist/index151.js +0 -16
- package/dist/index152.js +0 -68
- package/dist/index153.js +0 -6
- package/dist/index154.js +0 -25
- package/dist/index155.js +0 -25
- package/dist/index156.js +0 -15
- package/dist/index157.js +0 -30
- package/dist/index158.js +0 -7
package/dist/index96.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as n from "react";
|
|
2
|
-
import { composeEventHandlers as m } from "./
|
|
3
|
-
import { Primitive as g, dispatchDiscreteCustomEvent as k } from "./
|
|
4
|
-
import { useComposedRefs as R } from "./
|
|
5
|
-
import { useCallbackRef as w } from "./
|
|
6
|
-
import { useEscapeKeydown as U } from "./
|
|
2
|
+
import { composeEventHandlers as m } from "./index78.js";
|
|
3
|
+
import { Primitive as g, dispatchDiscreteCustomEvent as k } from "./index82.js";
|
|
4
|
+
import { useComposedRefs as R } from "./index77.js";
|
|
5
|
+
import { useCallbackRef as w } from "./index89.js";
|
|
6
|
+
import { useEscapeKeydown as U } from "./index110.js";
|
|
7
7
|
import { jsx as T } from "react/jsx-runtime";
|
|
8
8
|
var z = "DismissableLayer", y = "dismissableLayer.update", H = "dismissableLayer.pointerDownOutside", M = "dismissableLayer.focusOutside", L, B = n.createContext({
|
|
9
9
|
layers: /* @__PURE__ */ new Set(),
|
package/dist/index97.js
CHANGED
|
@@ -1,221 +1,137 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
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
|
-
}, { refs: ie, floatingStyles: W, placement: se, isPositioned: S, middlewareData: g } = xe({
|
|
51
|
-
// default to `fixed` strategy so users don't have to pick and we also avoid focus scroll issues
|
|
52
|
-
strategy: "fixed",
|
|
53
|
-
placement: oe,
|
|
54
|
-
whileElementsMounted: (...P) => _e(...P, {
|
|
55
|
-
animationFrame: A === "always"
|
|
56
|
-
}),
|
|
57
|
-
elements: {
|
|
58
|
-
reference: v.anchor
|
|
59
|
-
},
|
|
60
|
-
middleware: [
|
|
61
|
-
Pe({ mainAxis: i + $, alignmentAxis: o }),
|
|
62
|
-
n && ye({
|
|
63
|
-
mainAxis: !0,
|
|
64
|
-
crossAxis: !1,
|
|
65
|
-
limiter: m === "partial" ? Se() : void 0,
|
|
66
|
-
...b
|
|
67
|
-
}),
|
|
68
|
-
n && Ae({ ...b }),
|
|
69
|
-
ve({
|
|
70
|
-
...b,
|
|
71
|
-
apply: ({ elements: P, rects: B, availableWidth: he, availableHeight: ue }) => {
|
|
72
|
-
const { width: ge, height: we } = B.reference, R = P.floating.style;
|
|
73
|
-
R.setProperty("--radix-popper-available-width", `${he}px`), R.setProperty("--radix-popper-available-height", `${ue}px`), R.setProperty("--radix-popper-anchor-width", `${ge}px`), R.setProperty("--radix-popper-anchor-height", `${we}px`);
|
|
74
|
-
}
|
|
75
|
-
}),
|
|
76
|
-
E && Ce({ element: E, padding: w }),
|
|
77
|
-
Me({ arrowWidth: re, arrowHeight: $ }),
|
|
78
|
-
y && be({ strategy: "referenceHidden", ...b })
|
|
79
|
-
]
|
|
80
|
-
}), [I, ce] = V(se), O = Ee(l);
|
|
81
|
-
T(() => {
|
|
82
|
-
S && (O == null || O());
|
|
83
|
-
}, [S, O]);
|
|
84
|
-
const pe = (Y = g.arrow) == null ? void 0 : Y.x, de = (M = g.arrow) == null ? void 0 : M.y, le = ((X = g.arrow) == null ? void 0 : X.centerOffset) !== 0, [fe, me] = p.useState();
|
|
85
|
-
return T(() => {
|
|
86
|
-
h && me(window.getComputedStyle(h).zIndex);
|
|
87
|
-
}, [h]), /* @__PURE__ */ f(
|
|
88
|
-
"div",
|
|
89
|
-
{
|
|
90
|
-
ref: ie.setFloating,
|
|
91
|
-
"data-radix-popper-content-wrapper": "",
|
|
92
|
-
style: {
|
|
93
|
-
...W,
|
|
94
|
-
transform: S ? W.transform : "translate(0, -200%)",
|
|
95
|
-
// keep off the page when measuring
|
|
96
|
-
minWidth: "max-content",
|
|
97
|
-
zIndex: fe,
|
|
98
|
-
"--radix-popper-transform-origin": [
|
|
99
|
-
(D = g.transformOrigin) == null ? void 0 : D.x,
|
|
100
|
-
(F = g.transformOrigin) == null ? void 0 : F.y
|
|
101
|
-
].join(" "),
|
|
102
|
-
// hide the content if using the hide middleware and should be hidden
|
|
103
|
-
// set visibility to hidden and disable pointer events so the UI behaves
|
|
104
|
-
// as if the PopperContent isn't there at all
|
|
105
|
-
...((k = g.hide) == null ? void 0 : k.referenceHidden) && {
|
|
106
|
-
visibility: "hidden",
|
|
107
|
-
pointerEvents: "none"
|
|
108
|
-
}
|
|
109
|
-
},
|
|
110
|
-
dir: e.dir,
|
|
111
|
-
children: /* @__PURE__ */ f(
|
|
112
|
-
He,
|
|
113
|
-
{
|
|
114
|
-
scope: a,
|
|
115
|
-
placedSide: I,
|
|
116
|
-
onArrowChange: te,
|
|
117
|
-
arrowX: pe,
|
|
118
|
-
arrowY: de,
|
|
119
|
-
shouldHideArrow: le,
|
|
120
|
-
children: /* @__PURE__ */ f(
|
|
121
|
-
z.div,
|
|
122
|
-
{
|
|
123
|
-
"data-side": I,
|
|
124
|
-
"data-align": ce,
|
|
125
|
-
...d,
|
|
126
|
-
ref: ee,
|
|
127
|
-
style: {
|
|
128
|
-
...d.style,
|
|
129
|
-
// if the PopperContent hasn't been placed yet (not all measurements done)
|
|
130
|
-
// we prevent animations so that users's animation don't kick in too early referring wrong sides
|
|
131
|
-
animation: S ? void 0 : "none"
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
)
|
|
135
|
-
}
|
|
136
|
-
)
|
|
1
|
+
import * as d from "react";
|
|
2
|
+
import { useComposedRefs as R } from "./index77.js";
|
|
3
|
+
import { Primitive as M } from "./index82.js";
|
|
4
|
+
import { useCallbackRef as y } from "./index89.js";
|
|
5
|
+
import { jsx as _ } from "react/jsx-runtime";
|
|
6
|
+
var F = "focusScope.autoFocusOnMount", T = "focusScope.autoFocusOnUnmount", N = { bubbles: !1, cancelable: !0 }, K = "FocusScope", k = d.forwardRef((e, n) => {
|
|
7
|
+
const {
|
|
8
|
+
loop: t = !1,
|
|
9
|
+
trapped: u = !1,
|
|
10
|
+
onMountAutoFocus: p,
|
|
11
|
+
onUnmountAutoFocus: L,
|
|
12
|
+
...g
|
|
13
|
+
} = e, [o, U] = d.useState(null), E = y(p), v = y(L), b = d.useRef(null), A = R(n, (s) => U(s)), a = d.useRef({
|
|
14
|
+
paused: !1,
|
|
15
|
+
pause() {
|
|
16
|
+
this.paused = !0;
|
|
17
|
+
},
|
|
18
|
+
resume() {
|
|
19
|
+
this.paused = !1;
|
|
20
|
+
}
|
|
21
|
+
}).current;
|
|
22
|
+
d.useEffect(() => {
|
|
23
|
+
if (u) {
|
|
24
|
+
let s = function(i) {
|
|
25
|
+
if (a.paused || !o) return;
|
|
26
|
+
const c = i.target;
|
|
27
|
+
o.contains(c) ? b.current = c : f(b.current, { select: !0 });
|
|
28
|
+
}, l = function(i) {
|
|
29
|
+
if (a.paused || !o) return;
|
|
30
|
+
const c = i.relatedTarget;
|
|
31
|
+
c !== null && (o.contains(c) || f(b.current, { select: !0 }));
|
|
32
|
+
}, r = function(i) {
|
|
33
|
+
if (document.activeElement === document.body)
|
|
34
|
+
for (const h of i)
|
|
35
|
+
h.removedNodes.length > 0 && f(o);
|
|
36
|
+
};
|
|
37
|
+
document.addEventListener("focusin", s), document.addEventListener("focusout", l);
|
|
38
|
+
const m = new MutationObserver(r);
|
|
39
|
+
return o && m.observe(o, { childList: !0, subtree: !0 }), () => {
|
|
40
|
+
document.removeEventListener("focusin", s), document.removeEventListener("focusout", l), m.disconnect();
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
}, [u, o, a.paused]), d.useEffect(() => {
|
|
44
|
+
if (o) {
|
|
45
|
+
S.add(a);
|
|
46
|
+
const s = document.activeElement;
|
|
47
|
+
if (!o.contains(s)) {
|
|
48
|
+
const r = new CustomEvent(F, N);
|
|
49
|
+
o.addEventListener(F, E), o.dispatchEvent(r), r.defaultPrevented || (w(W(I(o)), { select: !0 }), document.activeElement === s && f(o));
|
|
137
50
|
}
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
);
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
/* @__PURE__ */ f(
|
|
154
|
-
"span",
|
|
155
|
-
{
|
|
156
|
-
ref: r.onArrowChange,
|
|
157
|
-
style: {
|
|
158
|
-
position: "absolute",
|
|
159
|
-
left: r.arrowX,
|
|
160
|
-
top: r.arrowY,
|
|
161
|
-
[o]: 0,
|
|
162
|
-
transformOrigin: {
|
|
163
|
-
top: "",
|
|
164
|
-
right: "0 0",
|
|
165
|
-
bottom: "center 0",
|
|
166
|
-
left: "100% 0"
|
|
167
|
-
}[r.placedSide],
|
|
168
|
-
transform: {
|
|
169
|
-
top: "translateY(100%)",
|
|
170
|
-
right: "translateY(50%) rotate(90deg) translateX(-50%)",
|
|
171
|
-
bottom: "rotate(180deg)",
|
|
172
|
-
left: "translateY(50%) rotate(-90deg) translateX(50%)"
|
|
173
|
-
}[r.placedSide],
|
|
174
|
-
visibility: r.shouldHideArrow ? "hidden" : void 0
|
|
175
|
-
},
|
|
176
|
-
children: /* @__PURE__ */ f(
|
|
177
|
-
Oe,
|
|
178
|
-
{
|
|
179
|
-
...i,
|
|
180
|
-
ref: a,
|
|
181
|
-
style: {
|
|
182
|
-
...i.style,
|
|
183
|
-
// ensures the element can be measured correctly (mostly for if SVG)
|
|
184
|
-
display: "block"
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
)
|
|
51
|
+
return () => {
|
|
52
|
+
o.removeEventListener(F, E), setTimeout(() => {
|
|
53
|
+
const r = new CustomEvent(T, N);
|
|
54
|
+
o.addEventListener(T, v), o.dispatchEvent(r), r.defaultPrevented || f(s ?? document.body, { select: !0 }), o.removeEventListener(T, v), S.remove(a);
|
|
55
|
+
}, 0);
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
}, [o, E, v, a]);
|
|
59
|
+
const P = d.useCallback(
|
|
60
|
+
(s) => {
|
|
61
|
+
if (!t && !u || a.paused) return;
|
|
62
|
+
const l = s.key === "Tab" && !s.altKey && !s.ctrlKey && !s.metaKey, r = document.activeElement;
|
|
63
|
+
if (l && r) {
|
|
64
|
+
const m = s.currentTarget, [i, c] = x(m);
|
|
65
|
+
i && c ? !s.shiftKey && r === c ? (s.preventDefault(), t && f(i, { select: !0 })) : s.shiftKey && r === i && (s.preventDefault(), t && f(c, { select: !0 })) : r === m && s.preventDefault();
|
|
188
66
|
}
|
|
189
|
-
|
|
67
|
+
},
|
|
68
|
+
[t, u, a.paused]
|
|
190
69
|
);
|
|
70
|
+
return /* @__PURE__ */ _(M.div, { tabIndex: -1, ...g, ref: A, onKeyDown: P });
|
|
191
71
|
});
|
|
192
|
-
|
|
193
|
-
function
|
|
194
|
-
|
|
72
|
+
k.displayName = K;
|
|
73
|
+
function w(e, { select: n = !1 } = {}) {
|
|
74
|
+
const t = document.activeElement;
|
|
75
|
+
for (const u of e)
|
|
76
|
+
if (f(u, { select: n }), document.activeElement !== t) return;
|
|
77
|
+
}
|
|
78
|
+
function x(e) {
|
|
79
|
+
const n = I(e), t = O(n, e), u = O(n.reverse(), e);
|
|
80
|
+
return [t, u];
|
|
195
81
|
}
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
82
|
+
function I(e) {
|
|
83
|
+
const n = [], t = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, {
|
|
84
|
+
acceptNode: (u) => {
|
|
85
|
+
const p = u.tagName === "INPUT" && u.type === "hidden";
|
|
86
|
+
return u.disabled || u.hidden || p ? NodeFilter.FILTER_SKIP : u.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
|
|
87
|
+
}
|
|
88
|
+
});
|
|
89
|
+
for (; t.nextNode(); ) n.push(t.currentNode);
|
|
90
|
+
return n;
|
|
91
|
+
}
|
|
92
|
+
function O(e, n) {
|
|
93
|
+
for (const t of e)
|
|
94
|
+
if (!D(t, { upTo: n })) return t;
|
|
95
|
+
}
|
|
96
|
+
function D(e, { upTo: n }) {
|
|
97
|
+
if (getComputedStyle(e).visibility === "hidden") return !0;
|
|
98
|
+
for (; e; ) {
|
|
99
|
+
if (n !== void 0 && e === n) return !1;
|
|
100
|
+
if (getComputedStyle(e).display === "none") return !0;
|
|
101
|
+
e = e.parentElement;
|
|
204
102
|
}
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
return
|
|
103
|
+
return !1;
|
|
104
|
+
}
|
|
105
|
+
function H(e) {
|
|
106
|
+
return e instanceof HTMLInputElement && "select" in e;
|
|
107
|
+
}
|
|
108
|
+
function f(e, { select: n = !1 } = {}) {
|
|
109
|
+
if (e && e.focus) {
|
|
110
|
+
const t = document.activeElement;
|
|
111
|
+
e.focus({ preventScroll: !0 }), e !== t && H(e) && n && e.select();
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
var S = V();
|
|
115
|
+
function V() {
|
|
116
|
+
let e = [];
|
|
117
|
+
return {
|
|
118
|
+
add(n) {
|
|
119
|
+
const t = e[0];
|
|
120
|
+
n !== t && (t == null || t.pause()), e = C(e, n), e.unshift(n);
|
|
121
|
+
},
|
|
122
|
+
remove(n) {
|
|
123
|
+
var t;
|
|
124
|
+
e = C(e, n), (t = e[0]) == null || t.resume();
|
|
125
|
+
}
|
|
126
|
+
};
|
|
127
|
+
}
|
|
128
|
+
function C(e, n) {
|
|
129
|
+
const t = [...e], u = t.indexOf(n);
|
|
130
|
+
return u !== -1 && t.splice(u, 1), t;
|
|
131
|
+
}
|
|
132
|
+
function W(e) {
|
|
133
|
+
return e.filter((n) => n.tagName !== "A");
|
|
209
134
|
}
|
|
210
|
-
var qe = U, Ge = G, Je = J, Ke = Q;
|
|
211
135
|
export {
|
|
212
|
-
|
|
213
|
-
Ke as Arrow,
|
|
214
|
-
Je as Content,
|
|
215
|
-
U as Popper,
|
|
216
|
-
G as PopperAnchor,
|
|
217
|
-
Q as PopperArrow,
|
|
218
|
-
J as PopperContent,
|
|
219
|
-
qe as Root,
|
|
220
|
-
Ue as createPopperScope
|
|
136
|
+
k as FocusScope
|
|
221
137
|
};
|
package/dist/index98.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as r from "react";
|
|
2
2
|
import s from "react-dom";
|
|
3
|
-
import { Primitive as c } from "./
|
|
4
|
-
import { useLayoutEffect as u } from "./
|
|
3
|
+
import { Primitive as c } from "./index82.js";
|
|
4
|
+
import { useLayoutEffect as u } from "./index90.js";
|
|
5
5
|
import { jsx as l } from "react/jsx-runtime";
|
|
6
6
|
var p = "Portal", d = r.forwardRef((e, a) => {
|
|
7
7
|
var o;
|
package/dist/index99.js
CHANGED
|
@@ -1,56 +1,17 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
return /* @__PURE__ */ p(r, { ...a, ref: t, children: l.isValidElement(f) ? l.cloneElement(f, void 0, m) : null });
|
|
11
|
-
}
|
|
12
|
-
return /* @__PURE__ */ p(r, { ...a, ref: t, children: i });
|
|
13
|
-
});
|
|
14
|
-
return o.displayName = `${e}.Slot`, o;
|
|
1
|
+
import * as r from "react";
|
|
2
|
+
var t = 0;
|
|
3
|
+
function a() {
|
|
4
|
+
r.useEffect(() => {
|
|
5
|
+
const e = document.querySelectorAll("[data-radix-focus-guard]");
|
|
6
|
+
return document.body.insertAdjacentElement("afterbegin", e[0] ?? n()), document.body.insertAdjacentElement("beforeend", e[1] ?? n()), t++, () => {
|
|
7
|
+
t === 1 && document.querySelectorAll("[data-radix-focus-guard]").forEach((o) => o.remove()), t--;
|
|
8
|
+
};
|
|
9
|
+
}, []);
|
|
15
10
|
}
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
const { children: t, ...i } = o;
|
|
20
|
-
if (l.isValidElement(t)) {
|
|
21
|
-
const a = b(t), s = C(i, t.props);
|
|
22
|
-
return t.type !== l.Fragment && (s.ref = n ? y(n, a) : a), l.cloneElement(t, s);
|
|
23
|
-
}
|
|
24
|
-
return l.Children.count(t) > 1 ? l.Children.only(null) : null;
|
|
25
|
-
});
|
|
26
|
-
return r.displayName = `${e}.SlotClone`, r;
|
|
27
|
-
}
|
|
28
|
-
var d = Symbol("radix.slottable");
|
|
29
|
-
// @__NO_SIDE_EFFECTS__
|
|
30
|
-
function x(e) {
|
|
31
|
-
const r = ({ children: o }) => /* @__PURE__ */ p(S, { children: o });
|
|
32
|
-
return r.displayName = `${e}.Slottable`, r.__radixId = d, r;
|
|
33
|
-
}
|
|
34
|
-
function E(e) {
|
|
35
|
-
return l.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === d;
|
|
36
|
-
}
|
|
37
|
-
function C(e, r) {
|
|
38
|
-
const o = { ...r };
|
|
39
|
-
for (const n in r) {
|
|
40
|
-
const t = e[n], i = r[n];
|
|
41
|
-
/^on[A-Z]/.test(n) ? t && i ? o[n] = (...s) => {
|
|
42
|
-
const c = i(...s);
|
|
43
|
-
return t(...s), c;
|
|
44
|
-
} : t && (o[n] = t) : n === "style" ? o[n] = { ...t, ...i } : n === "className" && (o[n] = [t, i].filter(Boolean).join(" "));
|
|
45
|
-
}
|
|
46
|
-
return { ...e, ...o };
|
|
47
|
-
}
|
|
48
|
-
function b(e) {
|
|
49
|
-
var n, t;
|
|
50
|
-
let r = (n = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : n.get, o = r && "isReactWarning" in r && r.isReactWarning;
|
|
51
|
-
return o ? e.ref : (r = (t = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : t.get, o = r && "isReactWarning" in r && r.isReactWarning, o ? e.props.ref : e.props.ref || e.ref);
|
|
11
|
+
function n() {
|
|
12
|
+
const e = document.createElement("span");
|
|
13
|
+
return e.setAttribute("data-radix-focus-guard", ""), e.tabIndex = 0, e.style.outline = "none", e.style.opacity = "0", e.style.position = "fixed", e.style.pointerEvents = "none", e;
|
|
52
14
|
}
|
|
53
15
|
export {
|
|
54
|
-
|
|
55
|
-
x as createSlottable
|
|
16
|
+
a as useFocusGuards
|
|
56
17
|
};
|
package/dist/tokens/colors.d.ts
CHANGED
|
@@ -1,92 +1,32 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Color tokens
|
|
3
|
-
*
|
|
2
|
+
* Color tokens for the SCL component library.
|
|
3
|
+
* Minimal, monochrome design with swappable primary/secondary colors.
|
|
4
4
|
*/
|
|
5
|
+
export declare const palette: {
|
|
6
|
+
readonly green: "120 100% 50%";
|
|
7
|
+
readonly hotpink: "300 100% 50%";
|
|
8
|
+
readonly yellow: "60 100% 50%";
|
|
9
|
+
readonly blue: "240 100% 50%";
|
|
10
|
+
readonly cyan: "180 100% 50%";
|
|
11
|
+
readonly white: "0 0% 100%";
|
|
12
|
+
readonly amber: "45 100% 50%";
|
|
13
|
+
readonly red: "0 100% 50%";
|
|
14
|
+
readonly black: "0 0% 0%";
|
|
15
|
+
};
|
|
5
16
|
export declare const colors: {
|
|
6
|
-
readonly
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
readonly mutedForeground: "120 100% 35%";
|
|
19
|
-
readonly accent: "60 100% 50%";
|
|
20
|
-
readonly accentForeground: "0 0% 0%";
|
|
21
|
-
readonly destructive: "0 100% 50%";
|
|
22
|
-
readonly destructiveForeground: "0 0% 0%";
|
|
23
|
-
readonly border: "120 100% 25%";
|
|
24
|
-
readonly input: "0 0% 10%";
|
|
25
|
-
readonly ring: "120 100% 50%";
|
|
26
|
-
readonly chart1: "120 100% 50%";
|
|
27
|
-
readonly chart2: "60 100% 50%";
|
|
28
|
-
readonly chart3: "300 100% 50%";
|
|
29
|
-
readonly chart4: "240 100% 50%";
|
|
30
|
-
readonly chart5: "30 100% 50%";
|
|
31
|
-
};
|
|
32
|
-
readonly dark: {
|
|
33
|
-
readonly background: "0 0% 0%";
|
|
34
|
-
readonly foreground: "120 100% 50%";
|
|
35
|
-
readonly card: "0 0% 5%";
|
|
36
|
-
readonly cardForeground: "120 100% 50%";
|
|
37
|
-
readonly popover: "0 0% 5%";
|
|
38
|
-
readonly popoverForeground: "120 100% 50%";
|
|
39
|
-
readonly primary: "60 100% 50%";
|
|
40
|
-
readonly primaryForeground: "0 0% 0%";
|
|
41
|
-
readonly secondary: "120 100% 25%";
|
|
42
|
-
readonly secondaryForeground: "120 100% 50%";
|
|
43
|
-
readonly muted: "0 0% 10%";
|
|
44
|
-
readonly mutedForeground: "120 100% 35%";
|
|
45
|
-
readonly accent: "60 100% 50%";
|
|
46
|
-
readonly accentForeground: "0 0% 0%";
|
|
47
|
-
readonly destructive: "0 100% 50%";
|
|
48
|
-
readonly destructiveForeground: "0 0% 0%";
|
|
49
|
-
readonly border: "120 100% 25%";
|
|
50
|
-
readonly input: "0 0% 10%";
|
|
51
|
-
readonly ring: "120 100% 50%";
|
|
52
|
-
readonly chart1: "120 100% 50%";
|
|
53
|
-
readonly chart2: "60 100% 50%";
|
|
54
|
-
readonly chart3: "300 100% 50%";
|
|
55
|
-
readonly chart4: "240 100% 50%";
|
|
56
|
-
readonly chart5: "30 100% 50%";
|
|
57
|
-
};
|
|
58
|
-
readonly terminal: {
|
|
59
|
-
readonly green: "rgb(0 255 0)";
|
|
60
|
-
readonly blue: "rgb(0 0 255)";
|
|
61
|
-
readonly yellow: "rgb(255 255 0)";
|
|
62
|
-
readonly magenta: "rgb(255 0 255)";
|
|
63
|
-
readonly red: "rgb(255 0 0)";
|
|
64
|
-
readonly orange: "rgb(255 167 0)";
|
|
65
|
-
readonly deepblue: "rgb(0 0 152)";
|
|
66
|
-
readonly black: "rgb(0 0 0)";
|
|
67
|
-
};
|
|
68
|
-
readonly sidebar: {
|
|
69
|
-
readonly light: {
|
|
70
|
-
readonly background: "0 0% 0%";
|
|
71
|
-
readonly foreground: "120 100% 50%";
|
|
72
|
-
readonly primary: "60 100% 50%";
|
|
73
|
-
readonly primaryForeground: "0 0% 0%";
|
|
74
|
-
readonly accent: "120 100% 15%";
|
|
75
|
-
readonly accentForeground: "120 100% 50%";
|
|
76
|
-
readonly border: "120 100% 25%";
|
|
77
|
-
readonly ring: "120 100% 50%";
|
|
78
|
-
};
|
|
79
|
-
readonly dark: {
|
|
80
|
-
readonly background: "0 0% 0%";
|
|
81
|
-
readonly foreground: "120 100% 50%";
|
|
82
|
-
readonly primary: "60 100% 50%";
|
|
83
|
-
readonly primaryForeground: "0 0% 0%";
|
|
84
|
-
readonly accent: "120 100% 15%";
|
|
85
|
-
readonly accentForeground: "120 100% 50%";
|
|
86
|
-
readonly border: "120 100% 25%";
|
|
87
|
-
readonly ring: "120 100% 50%";
|
|
88
|
-
};
|
|
89
|
-
};
|
|
17
|
+
readonly primary: "120 100% 50%";
|
|
18
|
+
readonly primaryForeground: "0 0% 0%";
|
|
19
|
+
readonly secondary: "300 100% 50%";
|
|
20
|
+
readonly secondaryForeground: "0 0% 0%";
|
|
21
|
+
readonly background: "0 0% 0%";
|
|
22
|
+
readonly foreground: "120 100% 50%";
|
|
23
|
+
readonly border: "120 100% 50%";
|
|
24
|
+
readonly ring: "120 100% 50%";
|
|
25
|
+
readonly destructive: "0 100% 50%";
|
|
26
|
+
readonly destructiveForeground: "0 0% 0%";
|
|
27
|
+
readonly muted: "0 0% 8%";
|
|
28
|
+
readonly mutedForeground: "120 100% 50%";
|
|
90
29
|
};
|
|
30
|
+
export type Palette = typeof palette;
|
|
91
31
|
export type ColorTokens = typeof colors;
|
|
92
32
|
//# sourceMappingURL=colors.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"colors.d.ts","sourceRoot":"","sources":["../../src/tokens/colors.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,eAAO,MAAM,MAAM
|
|
1
|
+
{"version":3,"file":"colors.d.ts","sourceRoot":"","sources":["../../src/tokens/colors.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,eAAO,MAAM,OAAO;;;;;;;;;;CAUV,CAAA;AAEV,eAAO,MAAM,MAAM;;;;;;;;;;;;;CAoBT,CAAA;AAEV,MAAM,MAAM,OAAO,GAAG,OAAO,OAAO,CAAA;AACpC,MAAM,MAAM,WAAW,GAAG,OAAO,MAAM,CAAA"}
|