@drjoshcsimmons/scl 0.2.7 → 0.3.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/accordion/accordion.d.ts.map +1 -1
- package/dist/components/ui/alert/alert.d.ts +5 -4
- package/dist/components/ui/alert/alert.d.ts.map +1 -1
- package/dist/components/ui/alert/index.d.ts +1 -1
- package/dist/components/ui/alert/index.d.ts.map +1 -1
- package/dist/components/ui/avatar/avatar.d.ts.map +1 -1
- package/dist/components/ui/badge/badge.d.ts +4 -6
- package/dist/components/ui/badge/badge.d.ts.map +1 -1
- package/dist/components/ui/badge/index.d.ts +1 -1
- package/dist/components/ui/badge/index.d.ts.map +1 -1
- package/dist/components/ui/button/button.d.ts +6 -7
- package/dist/components/ui/button/button.d.ts.map +1 -1
- package/dist/components/ui/button/index.d.ts +1 -1
- package/dist/components/ui/button/index.d.ts.map +1 -1
- package/dist/components/ui/card/card.d.ts.map +1 -1
- package/dist/components/ui/checkbox/checkbox.d.ts.map +1 -1
- package/dist/components/ui/collapsible/collapsible.d.ts.map +1 -1
- package/dist/components/ui/dialog/dialog.d.ts.map +1 -1
- package/dist/components/ui/input/input.d.ts.map +1 -1
- package/dist/components/ui/label/label.d.ts +1 -2
- package/dist/components/ui/label/label.d.ts.map +1 -1
- package/dist/components/ui/popover/popover.d.ts.map +1 -1
- package/dist/components/ui/progress/progress.d.ts +0 -3
- package/dist/components/ui/progress/progress.d.ts.map +1 -1
- package/dist/components/ui/radio-group/radio-group.d.ts.map +1 -1
- package/dist/components/ui/scroll-area/scroll-area.d.ts.map +1 -1
- package/dist/components/ui/select/select.d.ts.map +1 -1
- package/dist/components/ui/separator/separator.d.ts.map +1 -1
- package/dist/components/ui/skeleton/skeleton.d.ts +1 -0
- package/dist/components/ui/skeleton/skeleton.d.ts.map +1 -1
- package/dist/components/ui/slider/slider.d.ts.map +1 -1
- package/dist/components/ui/switch/switch.d.ts.map +1 -1
- package/dist/components/ui/table/table.d.ts.map +1 -1
- package/dist/components/ui/tabs/tabs.d.ts.map +1 -1
- package/dist/components/ui/textarea/textarea.d.ts.map +1 -1
- package/dist/components/ui/toggle/index.d.ts +1 -1
- package/dist/components/ui/toggle/index.d.ts.map +1 -1
- package/dist/components/ui/toggle/toggle.d.ts +6 -10
- package/dist/components/ui/toggle/toggle.d.ts.map +1 -1
- package/dist/components/ui/tooltip/tooltip.d.ts.map +1 -1
- package/dist/globals.css +222 -287
- package/dist/index.d.ts +1 -10
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +115 -184
- package/dist/index10.js +29 -57
- package/dist/index100.js +5 -14
- package/dist/index101.js +45 -5
- package/dist/index102.js +54 -24
- package/dist/index103.js +30 -55
- package/dist/index104.js +1 -1
- package/dist/index105.js +3 -218
- package/dist/index106.js +218 -8
- package/dist/index107.js +47 -29
- package/dist/index108.js +27 -178
- package/dist/index109.js +44 -646
- package/dist/index11.js +6 -19
- package/dist/index110.js +9 -30
- package/dist/index111.js +6 -48
- package/dist/index112.js +1 -1
- package/dist/index113.js +12 -6
- package/dist/index114.js +1 -1
- package/dist/index115.js +200 -42
- package/dist/index116.js +22 -12
- package/dist/index117.js +399 -20
- package/dist/index118.js +2 -9
- package/dist/index119.js +50 -35
- package/dist/index12.js +80 -5
- package/dist/index120.js +62 -15
- package/dist/index121.js +22 -203
- package/dist/index122.js +27 -20
- package/dist/index123.js +5 -400
- package/dist/index124.js +2 -48
- package/dist/index125.js +2 -2
- package/dist/index126.js +5 -53
- package/dist/index127.js +3 -65
- package/dist/index128.js +22 -23
- package/dist/index129.js +111 -27
- package/dist/index13.js +16 -136
- package/dist/index130.js +16 -5
- package/dist/index131.js +525 -2
- package/dist/index132.js +128 -2
- package/dist/index133.js +134 -5
- package/dist/index134.js +65 -3
- package/dist/index135.js +69 -24
- package/dist/index136.js +9 -113
- package/dist/index137.js +14 -16
- package/dist/index138.js +64 -523
- package/dist/index139.js +3 -127
- package/dist/index14.js +11 -97
- package/dist/index140.js +22 -133
- package/dist/index141.js +12 -68
- package/dist/index142.js +26 -7
- package/dist/index143.js +5 -14
- package/dist/index144.js +22 -65
- package/dist/index15.js +18 -72
- package/dist/index16.js +30 -252
- package/dist/index17.js +20 -133
- package/dist/index18.js +37 -89
- package/dist/index19.js +138 -18
- package/dist/index2.js +5 -5
- package/dist/index20.js +21 -10
- package/dist/index21.js +13 -22
- package/dist/index22.js +24 -35
- package/dist/index23.js +13 -19
- package/dist/index24.js +32 -37
- package/dist/index25.js +23 -102
- package/dist/index26.js +16 -20
- package/dist/index27.js +11 -72
- package/dist/index28.js +24 -12
- package/dist/index29.js +99 -28
- package/dist/index3.js +6 -6
- package/dist/index30.js +39 -111
- package/dist/index31.js +11 -25
- package/dist/index32.js +49 -65
- package/dist/index33.js +65 -43
- package/dist/index34.js +230 -79
- package/dist/index36.js +58 -33
- package/dist/index4.js +42 -26
- package/dist/index41.js +73 -49
- package/dist/index43.js +159 -13
- package/dist/index45.js +232 -210
- package/dist/index47.js +18 -33
- package/dist/index5.js +21 -32
- package/dist/index50.js +211 -505
- package/dist/index52.js +31 -12
- package/dist/index55.js +860 -12
- package/dist/index57.js +71 -299
- package/dist/index59.js +21 -81
- package/dist/index6.js +26 -70
- package/dist/index61.js +487 -392
- package/dist/index63.js +210 -194
- package/dist/index65.js +435 -11
- package/dist/index67.js +98 -141
- package/dist/index69.js +213 -824
- package/dist/index7.js +7 -40
- package/dist/index71.js +333 -28
- package/dist/index73.js +91 -197
- package/dist/index77.js +25 -44
- package/dist/index78.js +52 -24
- package/dist/index79.js +10 -6
- package/dist/index8.js +20 -26
- package/dist/index80.js +4 -52
- package/dist/index81.js +8 -12
- package/dist/index82.js +12 -10
- package/dist/index83.js +30 -8
- package/dist/index84.js +5 -53
- package/dist/index85.js +67 -10
- package/dist/index86.js +180 -3
- package/dist/index87.js +68 -29
- package/dist/index88.js +33 -12
- package/dist/index89.js +7 -8
- package/dist/index9.js +33 -36
- package/dist/index90.js +48 -65
- package/dist/index91.js +10 -3
- package/dist/index92.js +5 -5
- package/dist/index93.js +3 -3
- package/dist/index94.js +2 -2
- package/dist/index96.js +3 -3
- package/dist/index98.js +1 -1
- package/dist/index99.js +25 -30
- package/dist/lib/utils.d.ts +8 -8
- package/dist/lib/utils.d.ts.map +1 -1
- package/package.json +5 -46
- package/dist/components/ui/alert-dialog/alert-dialog.d.ts +0 -21
- package/dist/components/ui/alert-dialog/alert-dialog.d.ts.map +0 -1
- package/dist/components/ui/alert-dialog/index.d.ts +0 -2
- package/dist/components/ui/alert-dialog/index.d.ts.map +0 -1
- package/dist/components/ui/combobox/combobox.d.ts +0 -31
- package/dist/components/ui/combobox/combobox.d.ts.map +0 -1
- package/dist/components/ui/combobox/index.d.ts +0 -3
- package/dist/components/ui/combobox/index.d.ts.map +0 -1
- package/dist/components/ui/command/command.d.ts +0 -85
- package/dist/components/ui/command/command.d.ts.map +0 -1
- package/dist/components/ui/command/index.d.ts +0 -2
- package/dist/components/ui/command/index.d.ts.map +0 -1
- package/dist/components/ui/dithered-image/dithered-image.d.ts +0 -21
- package/dist/components/ui/dithered-image/dithered-image.d.ts.map +0 -1
- package/dist/components/ui/dithered-image/index.d.ts +0 -3
- package/dist/components/ui/dithered-image/index.d.ts.map +0 -1
- package/dist/components/ui/dropdown-menu/dropdown-menu.d.ts +0 -28
- package/dist/components/ui/dropdown-menu/dropdown-menu.d.ts.map +0 -1
- package/dist/components/ui/dropdown-menu/index.d.ts +0 -2
- package/dist/components/ui/dropdown-menu/index.d.ts.map +0 -1
- package/dist/components/ui/form/form.d.ts +0 -24
- package/dist/components/ui/form/form.d.ts.map +0 -1
- package/dist/components/ui/form/index.d.ts +0 -2
- package/dist/components/ui/form/index.d.ts.map +0 -1
- package/dist/components/ui/sheet/index.d.ts +0 -2
- package/dist/components/ui/sheet/index.d.ts.map +0 -1
- package/dist/components/ui/sheet/sheet.d.ts +0 -26
- package/dist/components/ui/sheet/sheet.d.ts.map +0 -1
- package/dist/components/ui/statusline/index.d.ts +0 -2
- package/dist/components/ui/statusline/index.d.ts.map +0 -1
- package/dist/components/ui/statusline/statusline.d.ts +0 -40
- package/dist/components/ui/statusline/statusline.d.ts.map +0 -1
- package/dist/components/ui/terminal-textarea/index.d.ts +0 -2
- package/dist/components/ui/terminal-textarea/index.d.ts.map +0 -1
- package/dist/components/ui/terminal-textarea/terminal-textarea.d.ts +0 -16
- package/dist/components/ui/terminal-textarea/terminal-textarea.d.ts.map +0 -1
- package/dist/index145.js +0 -67
- package/dist/index146.js +0 -6
- package/dist/index147.js +0 -25
- package/dist/index148.js +0 -15
- package/dist/index149.js +0 -30
- package/dist/index150.js +0 -7
- package/dist/index151.js +0 -25
- package/dist/index35.js +0 -20
- package/dist/index37.js +0 -28
- package/dist/index38.js +0 -102
- package/dist/index39.js +0 -41
- package/dist/index40.js +0 -13
- package/dist/index42.js +0 -68
- package/dist/index44.js +0 -2265
- package/dist/index46.js +0 -13
- package/dist/index48.js +0 -75
- package/dist/index49.js +0 -127
- package/dist/index51.js +0 -262
- package/dist/index53.js +0 -62
- package/dist/index54.js +0 -20
- package/dist/index56.js +0 -11
- package/dist/index58.js +0 -14
- package/dist/index60.js +0 -132
- package/dist/index62.js +0 -251
- package/dist/index64.js +0 -13
- package/dist/index66.js +0 -338
- package/dist/index68.js +0 -24
- package/dist/index70.js +0 -11
- package/dist/index72.js +0 -256
- package/dist/index74.js +0 -120
- package/dist/index75.js +0 -243
- package/dist/index76.js +0 -70
package/dist/index45.js
CHANGED
|
@@ -1,239 +1,261 @@
|
|
|
1
|
-
import s from "react";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { useControllableState as
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
return /* @__PURE__ */ n(E.Provider, { scope: o.__scopeAccordion, children: e === "multiple" ? /* @__PURE__ */ n(fe, { ...r, ref: c }) : /* @__PURE__ */ n(pe, { ...i, ref: c }) });
|
|
19
|
-
}
|
|
20
|
-
);
|
|
21
|
-
K.displayName = d;
|
|
22
|
-
var [L, se] = b(d), [z, de] = b(
|
|
23
|
-
d,
|
|
24
|
-
{ collapsible: !1 }
|
|
25
|
-
), pe = s.forwardRef(
|
|
26
|
-
(o, c) => {
|
|
27
|
-
const {
|
|
28
|
-
value: e,
|
|
29
|
-
defaultValue: t,
|
|
30
|
-
onValueChange: i = () => {
|
|
31
|
-
},
|
|
32
|
-
collapsible: r = !1,
|
|
33
|
-
...l
|
|
34
|
-
} = o, [a, p] = M({
|
|
35
|
-
prop: e,
|
|
36
|
-
defaultProp: t ?? "",
|
|
37
|
-
onChange: i,
|
|
38
|
-
caller: d
|
|
39
|
-
});
|
|
40
|
-
return /* @__PURE__ */ n(
|
|
41
|
-
L,
|
|
42
|
-
{
|
|
43
|
-
scope: o.__scopeAccordion,
|
|
44
|
-
value: s.useMemo(() => a ? [a] : [], [a]),
|
|
45
|
-
onItemOpen: p,
|
|
46
|
-
onItemClose: s.useCallback(() => r && p(""), [r, p]),
|
|
47
|
-
children: /* @__PURE__ */ n(z, { scope: o.__scopeAccordion, collapsible: r, children: /* @__PURE__ */ n(G, { ...l, ref: c }) })
|
|
48
|
-
}
|
|
49
|
-
);
|
|
50
|
-
}
|
|
51
|
-
), fe = s.forwardRef((o, c) => {
|
|
1
|
+
import * as s from "react";
|
|
2
|
+
import { composeEventHandlers as p } from "./index84.js";
|
|
3
|
+
import { useComposedRefs as _ } from "./index77.js";
|
|
4
|
+
import { createContextScope as V, createContext as q } from "./index85.js";
|
|
5
|
+
import { useId as R } from "./index91.js";
|
|
6
|
+
import { useControllableState as K } from "./index90.js";
|
|
7
|
+
import { DismissableLayer as U } from "./index92.js";
|
|
8
|
+
import { FocusScope as Y } from "./index93.js";
|
|
9
|
+
import { Portal as Z } from "./index94.js";
|
|
10
|
+
import { Presence as h } from "./index87.js";
|
|
11
|
+
import { Primitive as m } from "./index88.js";
|
|
12
|
+
import { useFocusGuards as z } from "./index95.js";
|
|
13
|
+
import J from "./index96.js";
|
|
14
|
+
import { hideOthers as Q } from "./index97.js";
|
|
15
|
+
import { createSlot as X } from "./index98.js";
|
|
16
|
+
import { jsx as i, jsxs as P, Fragment as O } from "react/jsx-runtime";
|
|
17
|
+
var v = "Dialog", [I] = V(v), [ee, u] = I(v), x = (e) => {
|
|
52
18
|
const {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
(v) => a((u = []) => u.filter((h) => h !== v)),
|
|
68
|
-
[a]
|
|
69
|
-
);
|
|
70
|
-
return /* @__PURE__ */ n(
|
|
71
|
-
L,
|
|
19
|
+
__scopeDialog: o,
|
|
20
|
+
children: n,
|
|
21
|
+
open: a,
|
|
22
|
+
defaultOpen: r,
|
|
23
|
+
onOpenChange: t,
|
|
24
|
+
modal: c = !0
|
|
25
|
+
} = e, l = s.useRef(null), d = s.useRef(null), [g, C] = K({
|
|
26
|
+
prop: a,
|
|
27
|
+
defaultProp: r ?? !1,
|
|
28
|
+
onChange: t,
|
|
29
|
+
caller: v
|
|
30
|
+
});
|
|
31
|
+
return /* @__PURE__ */ i(
|
|
32
|
+
ee,
|
|
72
33
|
{
|
|
73
|
-
scope: o
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
34
|
+
scope: o,
|
|
35
|
+
triggerRef: l,
|
|
36
|
+
contentRef: d,
|
|
37
|
+
contentId: R(),
|
|
38
|
+
titleId: R(),
|
|
39
|
+
descriptionId: R(),
|
|
40
|
+
open: g,
|
|
41
|
+
onOpenChange: C,
|
|
42
|
+
onOpenToggle: s.useCallback(() => C((H) => !H), [C]),
|
|
43
|
+
modal: c,
|
|
44
|
+
children: n
|
|
78
45
|
}
|
|
79
46
|
);
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
return !((T = N.ref.current) != null && T.disabled);
|
|
88
|
-
}), A = x.findIndex((N) => N.ref.current === Q), D = x.length;
|
|
89
|
-
if (A === -1) return;
|
|
90
|
-
C.preventDefault();
|
|
91
|
-
let f = A;
|
|
92
|
-
const _ = 0, w = D - 1, R = () => {
|
|
93
|
-
f = A + 1, f > w && (f = _);
|
|
94
|
-
}, P = () => {
|
|
95
|
-
f = A - 1, f < _ && (f = w);
|
|
96
|
-
};
|
|
97
|
-
switch (C.key) {
|
|
98
|
-
case "Home":
|
|
99
|
-
f = _;
|
|
100
|
-
break;
|
|
101
|
-
case "End":
|
|
102
|
-
f = w;
|
|
103
|
-
break;
|
|
104
|
-
case "ArrowRight":
|
|
105
|
-
r === "horizontal" && (u ? R() : P());
|
|
106
|
-
break;
|
|
107
|
-
case "ArrowDown":
|
|
108
|
-
r === "vertical" && R();
|
|
109
|
-
break;
|
|
110
|
-
case "ArrowLeft":
|
|
111
|
-
r === "horizontal" && (u ? P() : R());
|
|
112
|
-
break;
|
|
113
|
-
case "ArrowUp":
|
|
114
|
-
r === "vertical" && P();
|
|
115
|
-
break;
|
|
116
|
-
}
|
|
117
|
-
const W = f % D;
|
|
118
|
-
(O = x[W].ref.current) == null || O.focus();
|
|
119
|
-
});
|
|
120
|
-
return /* @__PURE__ */ n(
|
|
121
|
-
ue,
|
|
47
|
+
};
|
|
48
|
+
x.displayName = v;
|
|
49
|
+
var A = "DialogTrigger", T = s.forwardRef(
|
|
50
|
+
(e, o) => {
|
|
51
|
+
const { __scopeDialog: n, ...a } = e, r = u(A, n), t = _(o, r.triggerRef);
|
|
52
|
+
return /* @__PURE__ */ i(
|
|
53
|
+
m.button,
|
|
122
54
|
{
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
"data-orientation": r,
|
|
132
|
-
ref: p,
|
|
133
|
-
onKeyDown: t ? void 0 : h
|
|
134
|
-
}
|
|
135
|
-
) })
|
|
55
|
+
type: "button",
|
|
56
|
+
"aria-haspopup": "dialog",
|
|
57
|
+
"aria-expanded": r.open,
|
|
58
|
+
"aria-controls": r.contentId,
|
|
59
|
+
"data-state": N(r.open),
|
|
60
|
+
...a,
|
|
61
|
+
ref: t,
|
|
62
|
+
onClick: p(e.onClick, r.onOpenToggle)
|
|
136
63
|
}
|
|
137
64
|
);
|
|
138
65
|
}
|
|
139
|
-
)
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
66
|
+
);
|
|
67
|
+
T.displayName = A;
|
|
68
|
+
var E = "DialogPortal", [te, b] = I(E, {
|
|
69
|
+
forceMount: void 0
|
|
70
|
+
}), M = (e) => {
|
|
71
|
+
const { __scopeDialog: o, forceMount: n, children: a, container: r } = e, t = u(E, o);
|
|
72
|
+
return /* @__PURE__ */ i(te, { scope: o, forceMount: n, children: s.Children.map(a, (c) => /* @__PURE__ */ i(h, { present: n || t.open, children: /* @__PURE__ */ i(Z, { asChild: !0, container: r, children: c }) })) });
|
|
73
|
+
};
|
|
74
|
+
M.displayName = E;
|
|
75
|
+
var D = "DialogOverlay", w = s.forwardRef(
|
|
76
|
+
(e, o) => {
|
|
77
|
+
const n = b(D, e.__scopeDialog), { forceMount: a = n.forceMount, ...r } = e, t = u(D, e.__scopeDialog);
|
|
78
|
+
return t.modal ? /* @__PURE__ */ i(h, { present: a || t.open, children: /* @__PURE__ */ i(re, { ...r, ref: o }) }) : null;
|
|
79
|
+
}
|
|
80
|
+
);
|
|
81
|
+
w.displayName = D;
|
|
82
|
+
var oe = X("DialogOverlay.RemoveScroll"), re = s.forwardRef(
|
|
83
|
+
(e, o) => {
|
|
84
|
+
const { __scopeDialog: n, ...a } = e, r = u(D, n);
|
|
85
|
+
return (
|
|
86
|
+
// Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
|
|
87
|
+
// ie. when `Overlay` and `Content` are siblings
|
|
88
|
+
/* @__PURE__ */ i(J, { as: oe, allowPinchZoom: !0, shards: [r.contentRef], children: /* @__PURE__ */ i(
|
|
89
|
+
m.div,
|
|
90
|
+
{
|
|
91
|
+
"data-state": N(r.open),
|
|
92
|
+
...a,
|
|
93
|
+
ref: o,
|
|
94
|
+
style: { pointerEvents: "auto", ...a.style }
|
|
95
|
+
}
|
|
96
|
+
) })
|
|
97
|
+
);
|
|
98
|
+
}
|
|
99
|
+
), f = "DialogContent", F = s.forwardRef(
|
|
100
|
+
(e, o) => {
|
|
101
|
+
const n = b(f, e.__scopeDialog), { forceMount: a = n.forceMount, ...r } = e, t = u(f, e.__scopeDialog);
|
|
102
|
+
return /* @__PURE__ */ i(h, { present: a || t.open, children: t.modal ? /* @__PURE__ */ i(ne, { ...r, ref: o }) : /* @__PURE__ */ i(ae, { ...r, ref: o }) });
|
|
103
|
+
}
|
|
104
|
+
);
|
|
105
|
+
F.displayName = f;
|
|
106
|
+
var ne = s.forwardRef(
|
|
107
|
+
(e, o) => {
|
|
108
|
+
const n = u(f, e.__scopeDialog), a = s.useRef(null), r = _(o, n.contentRef, a);
|
|
109
|
+
return s.useEffect(() => {
|
|
110
|
+
const t = a.current;
|
|
111
|
+
if (t) return Q(t);
|
|
112
|
+
}, []), /* @__PURE__ */ i(
|
|
113
|
+
S,
|
|
144
114
|
{
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
u ? l.onItemOpen(t) : l.onItemClose(t);
|
|
161
|
-
}
|
|
162
|
-
}
|
|
115
|
+
...e,
|
|
116
|
+
ref: r,
|
|
117
|
+
trapFocus: n.open,
|
|
118
|
+
disableOutsidePointerEvents: !0,
|
|
119
|
+
onCloseAutoFocus: p(e.onCloseAutoFocus, (t) => {
|
|
120
|
+
var c;
|
|
121
|
+
t.preventDefault(), (c = n.triggerRef.current) == null || c.focus();
|
|
122
|
+
}),
|
|
123
|
+
onPointerDownOutside: p(e.onPointerDownOutside, (t) => {
|
|
124
|
+
const c = t.detail.originalEvent, l = c.button === 0 && c.ctrlKey === !0;
|
|
125
|
+
(c.button === 2 || l) && t.preventDefault();
|
|
126
|
+
}),
|
|
127
|
+
onFocusOutside: p(
|
|
128
|
+
e.onFocusOutside,
|
|
129
|
+
(t) => t.preventDefault()
|
|
163
130
|
)
|
|
164
131
|
}
|
|
165
132
|
);
|
|
166
133
|
}
|
|
167
|
-
)
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
return /* @__PURE__ */ n(
|
|
173
|
-
V.h3,
|
|
134
|
+
), ae = s.forwardRef(
|
|
135
|
+
(e, o) => {
|
|
136
|
+
const n = u(f, e.__scopeDialog), a = s.useRef(!1), r = s.useRef(!1);
|
|
137
|
+
return /* @__PURE__ */ i(
|
|
138
|
+
S,
|
|
174
139
|
{
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
140
|
+
...e,
|
|
141
|
+
ref: o,
|
|
142
|
+
trapFocus: !1,
|
|
143
|
+
disableOutsidePointerEvents: !1,
|
|
144
|
+
onCloseAutoFocus: (t) => {
|
|
145
|
+
var c, l;
|
|
146
|
+
(c = e.onCloseAutoFocus) == null || c.call(e, t), t.defaultPrevented || (a.current || (l = n.triggerRef.current) == null || l.focus(), t.preventDefault()), a.current = !1, r.current = !1;
|
|
147
|
+
},
|
|
148
|
+
onInteractOutside: (t) => {
|
|
149
|
+
var d, g;
|
|
150
|
+
(d = e.onInteractOutside) == null || d.call(e, t), t.defaultPrevented || (a.current = !0, t.detail.originalEvent.type === "pointerdown" && (r.current = !0));
|
|
151
|
+
const c = t.target;
|
|
152
|
+
((g = n.triggerRef.current) == null ? void 0 : g.contains(c)) && t.preventDefault(), t.detail.originalEvent.type === "focusin" && r.current && t.preventDefault();
|
|
153
|
+
}
|
|
180
154
|
}
|
|
181
155
|
);
|
|
182
156
|
}
|
|
157
|
+
), S = s.forwardRef(
|
|
158
|
+
(e, o) => {
|
|
159
|
+
const { __scopeDialog: n, trapFocus: a, onOpenAutoFocus: r, onCloseAutoFocus: t, ...c } = e, l = u(f, n), d = s.useRef(null), g = _(o, d);
|
|
160
|
+
return z(), /* @__PURE__ */ P(O, { children: [
|
|
161
|
+
/* @__PURE__ */ i(
|
|
162
|
+
Y,
|
|
163
|
+
{
|
|
164
|
+
asChild: !0,
|
|
165
|
+
loop: !0,
|
|
166
|
+
trapped: a,
|
|
167
|
+
onMountAutoFocus: r,
|
|
168
|
+
onUnmountAutoFocus: t,
|
|
169
|
+
children: /* @__PURE__ */ i(
|
|
170
|
+
U,
|
|
171
|
+
{
|
|
172
|
+
role: "dialog",
|
|
173
|
+
id: l.contentId,
|
|
174
|
+
"aria-describedby": l.descriptionId,
|
|
175
|
+
"aria-labelledby": l.titleId,
|
|
176
|
+
"data-state": N(l.open),
|
|
177
|
+
...c,
|
|
178
|
+
ref: g,
|
|
179
|
+
onDismiss: () => l.onOpenChange(!1)
|
|
180
|
+
}
|
|
181
|
+
)
|
|
182
|
+
}
|
|
183
|
+
),
|
|
184
|
+
/* @__PURE__ */ P(O, { children: [
|
|
185
|
+
/* @__PURE__ */ i(ie, { titleId: l.titleId }),
|
|
186
|
+
/* @__PURE__ */ i(ce, { contentRef: d, descriptionId: l.descriptionId })
|
|
187
|
+
] })
|
|
188
|
+
] });
|
|
189
|
+
}
|
|
190
|
+
), y = "DialogTitle", W = s.forwardRef(
|
|
191
|
+
(e, o) => {
|
|
192
|
+
const { __scopeDialog: n, ...a } = e, r = u(y, n);
|
|
193
|
+
return /* @__PURE__ */ i(m.h2, { id: r.titleId, ...a, ref: o });
|
|
194
|
+
}
|
|
183
195
|
);
|
|
184
|
-
|
|
185
|
-
var
|
|
186
|
-
(
|
|
187
|
-
const {
|
|
188
|
-
return /* @__PURE__ */
|
|
189
|
-
te,
|
|
190
|
-
{
|
|
191
|
-
"aria-disabled": r.open && !l.collapsible || void 0,
|
|
192
|
-
"data-orientation": i.orientation,
|
|
193
|
-
id: r.triggerId,
|
|
194
|
-
...a,
|
|
195
|
-
...t,
|
|
196
|
-
ref: c
|
|
197
|
-
}
|
|
198
|
-
) });
|
|
196
|
+
W.displayName = y;
|
|
197
|
+
var k = "DialogDescription", G = s.forwardRef(
|
|
198
|
+
(e, o) => {
|
|
199
|
+
const { __scopeDialog: n, ...a } = e, r = u(k, n);
|
|
200
|
+
return /* @__PURE__ */ i(m.p, { id: r.descriptionId, ...a, ref: o });
|
|
199
201
|
}
|
|
200
202
|
);
|
|
201
|
-
|
|
202
|
-
var
|
|
203
|
-
(
|
|
204
|
-
const {
|
|
205
|
-
return /* @__PURE__ */
|
|
206
|
-
|
|
203
|
+
G.displayName = k;
|
|
204
|
+
var L = "DialogClose", $ = s.forwardRef(
|
|
205
|
+
(e, o) => {
|
|
206
|
+
const { __scopeDialog: n, ...a } = e, r = u(L, n);
|
|
207
|
+
return /* @__PURE__ */ i(
|
|
208
|
+
m.button,
|
|
207
209
|
{
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
...t,
|
|
213
|
-
ref: c,
|
|
214
|
-
style: {
|
|
215
|
-
"--radix-accordion-content-height": "var(--radix-collapsible-content-height)",
|
|
216
|
-
"--radix-accordion-content-width": "var(--radix-collapsible-content-width)",
|
|
217
|
-
...o.style
|
|
218
|
-
}
|
|
210
|
+
type: "button",
|
|
211
|
+
...a,
|
|
212
|
+
ref: o,
|
|
213
|
+
onClick: p(e.onClick, () => r.onOpenChange(!1))
|
|
219
214
|
}
|
|
220
215
|
);
|
|
221
216
|
}
|
|
222
217
|
);
|
|
223
|
-
|
|
224
|
-
function
|
|
225
|
-
return
|
|
218
|
+
$.displayName = L;
|
|
219
|
+
function N(e) {
|
|
220
|
+
return e ? "open" : "closed";
|
|
226
221
|
}
|
|
227
|
-
var
|
|
222
|
+
var B = "DialogTitleWarning", [Ne, j] = q(B, {
|
|
223
|
+
contentName: f,
|
|
224
|
+
titleName: y,
|
|
225
|
+
docsSlug: "dialog"
|
|
226
|
+
}), ie = ({ titleId: e }) => {
|
|
227
|
+
const o = j(B), n = `\`${o.contentName}\` requires a \`${o.titleName}\` for the component to be accessible for screen reader users.
|
|
228
|
+
|
|
229
|
+
If you want to hide the \`${o.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
230
|
+
|
|
231
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${o.docsSlug}`;
|
|
232
|
+
return s.useEffect(() => {
|
|
233
|
+
e && (document.getElementById(e) || console.error(n));
|
|
234
|
+
}, [n, e]), null;
|
|
235
|
+
}, se = "DialogDescriptionWarning", ce = ({ contentRef: e, descriptionId: o }) => {
|
|
236
|
+
const a = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${j(se).contentName}}.`;
|
|
237
|
+
return s.useEffect(() => {
|
|
238
|
+
var t;
|
|
239
|
+
const r = (t = e.current) == null ? void 0 : t.getAttribute("aria-describedby");
|
|
240
|
+
o && r && (document.getElementById(o) || console.warn(a));
|
|
241
|
+
}, [a, e, o]), null;
|
|
242
|
+
}, Pe = x, Oe = T, Ie = M, xe = w, Ae = F, Te = W, be = G, Me = $;
|
|
228
243
|
export {
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
244
|
+
Me as Close,
|
|
245
|
+
Ae as Content,
|
|
246
|
+
be as Description,
|
|
247
|
+
x as Dialog,
|
|
248
|
+
$ as DialogClose,
|
|
249
|
+
F as DialogContent,
|
|
250
|
+
G as DialogDescription,
|
|
251
|
+
w as DialogOverlay,
|
|
252
|
+
M as DialogPortal,
|
|
253
|
+
W as DialogTitle,
|
|
254
|
+
T as DialogTrigger,
|
|
255
|
+
xe as Overlay,
|
|
256
|
+
Ie as Portal,
|
|
237
257
|
Pe as Root,
|
|
238
|
-
|
|
258
|
+
Te as Title,
|
|
259
|
+
Oe as Trigger,
|
|
260
|
+
Ne as WarningProvider
|
|
239
261
|
};
|
package/dist/index47.js
CHANGED
|
@@ -1,35 +1,20 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
return Array.isArray(o) ? o.includes({
|
|
18
|
-
...d,
|
|
19
|
-
...v
|
|
20
|
-
}[c]) : {
|
|
21
|
-
...d,
|
|
22
|
-
...v
|
|
23
|
-
}[c] === o;
|
|
24
|
-
}) ? [
|
|
25
|
-
...t,
|
|
26
|
-
u,
|
|
27
|
-
i
|
|
28
|
-
] : t;
|
|
29
|
-
}, []);
|
|
30
|
-
return y(e, V, N, n == null ? void 0 : n.class, n == null ? void 0 : n.className);
|
|
31
|
-
};
|
|
1
|
+
import * as i from "react";
|
|
2
|
+
import { Primitive as f } from "./index83.js";
|
|
3
|
+
import { jsx as l } from "react/jsx-runtime";
|
|
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
|
+
}
|
|
13
|
+
}
|
|
14
|
+
));
|
|
15
|
+
r.displayName = m;
|
|
16
|
+
var b = r;
|
|
32
17
|
export {
|
|
33
|
-
|
|
34
|
-
|
|
18
|
+
r as Label,
|
|
19
|
+
b as Root
|
|
35
20
|
};
|
package/dist/index5.js
CHANGED
|
@@ -1,38 +1,27 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
variants: {
|
|
9
|
-
variant: {
|
|
10
|
-
default: "bg-primary text-primary-foreground border-2 border-primary [&>svg]:text-primary-foreground",
|
|
11
|
-
secondary: "bg-secondary text-secondary-foreground border-2 border-secondary [&>svg]:text-secondary-foreground",
|
|
12
|
-
destructive: "bg-destructive text-destructive-foreground border-2 border-destructive [&>svg]:text-destructive-foreground"
|
|
13
|
-
}
|
|
14
|
-
},
|
|
15
|
-
defaultVariants: {
|
|
16
|
-
variant: "default"
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
), l = o.forwardRef(({ className: r, variant: e, ...t }, d) => /* @__PURE__ */ a("div", { ref: d, role: "alert", className: s(n({ variant: e }), r), ...t }));
|
|
20
|
-
l.displayName = "Alert";
|
|
21
|
-
const m = o.forwardRef(
|
|
22
|
-
({ className: r, ...e }, t) => /* @__PURE__ */ a(
|
|
23
|
-
"h5",
|
|
1
|
+
import { jsx as l } from "react/jsx-runtime";
|
|
2
|
+
import * as a from "react";
|
|
3
|
+
import { cx as s } from "./index2.js";
|
|
4
|
+
/* empty css */
|
|
5
|
+
const o = a.forwardRef(
|
|
6
|
+
({ className: e, variant: r = "default", ...t }, i) => /* @__PURE__ */ l(
|
|
7
|
+
"div",
|
|
24
8
|
{
|
|
25
|
-
ref:
|
|
26
|
-
|
|
27
|
-
|
|
9
|
+
ref: i,
|
|
10
|
+
role: "alert",
|
|
11
|
+
className: s("scl-alert", `scl-alert--${r}`, e),
|
|
12
|
+
...t
|
|
28
13
|
}
|
|
29
14
|
)
|
|
30
15
|
);
|
|
31
|
-
|
|
32
|
-
const c =
|
|
33
|
-
|
|
16
|
+
o.displayName = "Alert";
|
|
17
|
+
const c = a.forwardRef(
|
|
18
|
+
({ className: e, ...r }, t) => /* @__PURE__ */ l("h5", { ref: t, className: s("scl-alert__title", e), ...r })
|
|
19
|
+
);
|
|
20
|
+
c.displayName = "AlertTitle";
|
|
21
|
+
const m = a.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ l("div", { ref: t, className: s("scl-alert__description", e), ...r }));
|
|
22
|
+
m.displayName = "AlertDescription";
|
|
34
23
|
export {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
24
|
+
o as Alert,
|
|
25
|
+
m as AlertDescription,
|
|
26
|
+
c as AlertTitle
|
|
38
27
|
};
|