@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/index32.js
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import * as l from "react";
|
|
3
3
|
import { cn as r } from "./index2.js";
|
|
4
|
-
const d = l.forwardRef(({ className: e, ...a },
|
|
4
|
+
const d = l.forwardRef(({ className: e, ...a }, t) => /* @__PURE__ */ o("div", { className: "relative w-full overflow-auto", children: /* @__PURE__ */ o(
|
|
5
5
|
"table",
|
|
6
6
|
{
|
|
7
|
-
ref:
|
|
7
|
+
ref: t,
|
|
8
8
|
className: r("w-full caption-bottom text-sm", e),
|
|
9
9
|
...a
|
|
10
10
|
}
|
|
11
11
|
) }));
|
|
12
12
|
d.displayName = "Table";
|
|
13
|
-
const s = l.forwardRef(({ className: e, ...a },
|
|
13
|
+
const s = l.forwardRef(({ className: e, ...a }, t) => /* @__PURE__ */ o("thead", { ref: t, className: r("[&_tr]:border-b", e), ...a }));
|
|
14
14
|
s.displayName = "TableHeader";
|
|
15
|
-
const m = l.forwardRef(({ className: e, ...a },
|
|
15
|
+
const m = l.forwardRef(({ className: e, ...a }, t) => /* @__PURE__ */ o(
|
|
16
16
|
"tbody",
|
|
17
17
|
{
|
|
18
|
-
ref:
|
|
18
|
+
ref: t,
|
|
19
19
|
className: r("[&_tr:last-child]:border-0", e),
|
|
20
20
|
...a
|
|
21
21
|
}
|
|
22
22
|
));
|
|
23
23
|
m.displayName = "TableBody";
|
|
24
|
-
const b = l.forwardRef(({ className: e, ...a },
|
|
24
|
+
const b = l.forwardRef(({ className: e, ...a }, t) => /* @__PURE__ */ o(
|
|
25
25
|
"tfoot",
|
|
26
26
|
{
|
|
27
|
-
ref:
|
|
27
|
+
ref: t,
|
|
28
28
|
className: r(
|
|
29
29
|
"border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",
|
|
30
30
|
e
|
|
@@ -33,22 +33,22 @@ const b = l.forwardRef(({ className: e, ...a }, o) => /* @__PURE__ */ t(
|
|
|
33
33
|
}
|
|
34
34
|
));
|
|
35
35
|
b.displayName = "TableFooter";
|
|
36
|
-
const c = l.forwardRef(({ className: e, ...a },
|
|
36
|
+
const c = l.forwardRef(({ className: e, ...a }, t) => /* @__PURE__ */ o(
|
|
37
37
|
"tr",
|
|
38
38
|
{
|
|
39
|
-
ref:
|
|
39
|
+
ref: t,
|
|
40
40
|
className: r(
|
|
41
|
-
"border-b
|
|
41
|
+
"border-b hover:bg-muted/50 data-[state=selected]:bg-muted",
|
|
42
42
|
e
|
|
43
43
|
),
|
|
44
44
|
...a
|
|
45
45
|
}
|
|
46
46
|
));
|
|
47
47
|
c.displayName = "TableRow";
|
|
48
|
-
const f = l.forwardRef(({ className: e, ...a },
|
|
48
|
+
const f = l.forwardRef(({ className: e, ...a }, t) => /* @__PURE__ */ o(
|
|
49
49
|
"th",
|
|
50
50
|
{
|
|
51
|
-
ref:
|
|
51
|
+
ref: t,
|
|
52
52
|
className: r(
|
|
53
53
|
"h-10 px-2 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",
|
|
54
54
|
e
|
|
@@ -57,10 +57,10 @@ const f = l.forwardRef(({ className: e, ...a }, o) => /* @__PURE__ */ t(
|
|
|
57
57
|
}
|
|
58
58
|
));
|
|
59
59
|
f.displayName = "TableHead";
|
|
60
|
-
const i = l.forwardRef(({ className: e, ...a },
|
|
60
|
+
const i = l.forwardRef(({ className: e, ...a }, t) => /* @__PURE__ */ o(
|
|
61
61
|
"td",
|
|
62
62
|
{
|
|
63
|
-
ref:
|
|
63
|
+
ref: t,
|
|
64
64
|
className: r(
|
|
65
65
|
"p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",
|
|
66
66
|
e
|
|
@@ -69,10 +69,10 @@ const i = l.forwardRef(({ className: e, ...a }, o) => /* @__PURE__ */ t(
|
|
|
69
69
|
}
|
|
70
70
|
));
|
|
71
71
|
i.displayName = "TableCell";
|
|
72
|
-
const n = l.forwardRef(({ className: e, ...a },
|
|
72
|
+
const n = l.forwardRef(({ className: e, ...a }, t) => /* @__PURE__ */ o(
|
|
73
73
|
"caption",
|
|
74
74
|
{
|
|
75
|
-
ref:
|
|
75
|
+
ref: t,
|
|
76
76
|
className: r("mt-4 text-sm text-muted-foreground", e),
|
|
77
77
|
...a
|
|
78
78
|
}
|
package/dist/index33.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
2
2
|
import * as s from "react";
|
|
3
|
-
import { Root as d, List as o, Trigger as n, Content as c } from "./
|
|
3
|
+
import { Root as d, List as o, Trigger as n, Content as c } from "./index64.js";
|
|
4
4
|
import { cn as r } from "./index2.js";
|
|
5
|
-
const
|
|
5
|
+
const g = d, f = s.forwardRef(({ className: e, ...t }, i) => /* @__PURE__ */ a(
|
|
6
6
|
o,
|
|
7
7
|
{
|
|
8
|
-
ref:
|
|
8
|
+
ref: i,
|
|
9
9
|
className: r(
|
|
10
10
|
"inline-flex h-9 items-center justify-center bg-muted p-1 text-muted-foreground",
|
|
11
11
|
e
|
|
@@ -14,22 +14,22 @@ const u = d, f = s.forwardRef(({ className: e, ...t }, a) => /* @__PURE__ */ i(
|
|
|
14
14
|
}
|
|
15
15
|
));
|
|
16
16
|
f.displayName = o.displayName;
|
|
17
|
-
const m = s.forwardRef(({ className: e, ...t },
|
|
17
|
+
const m = s.forwardRef(({ className: e, ...t }, i) => /* @__PURE__ */ a(
|
|
18
18
|
n,
|
|
19
19
|
{
|
|
20
|
-
ref:
|
|
20
|
+
ref: i,
|
|
21
21
|
className: r(
|
|
22
|
-
"inline-flex items-center justify-center whitespace-nowrap px-3 py-1 text-sm font-medium ring-offset-background
|
|
22
|
+
"inline-flex items-center justify-center whitespace-nowrap px-3 py-1 text-sm font-medium ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-primary data-[state=active]:border-2 data-[state=active]:border-primary data-[state=inactive]:border-2 data-[state=inactive]:border-transparent data-[state=inactive]:text-muted-foreground cursor-pointer",
|
|
23
23
|
e
|
|
24
24
|
),
|
|
25
25
|
...t
|
|
26
26
|
}
|
|
27
27
|
));
|
|
28
28
|
m.displayName = n.displayName;
|
|
29
|
-
const l = s.forwardRef(({ className: e, ...t },
|
|
29
|
+
const l = s.forwardRef(({ className: e, ...t }, i) => /* @__PURE__ */ a(
|
|
30
30
|
c,
|
|
31
31
|
{
|
|
32
|
-
ref:
|
|
32
|
+
ref: i,
|
|
33
33
|
className: r(
|
|
34
34
|
"mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
|
|
35
35
|
e
|
|
@@ -39,7 +39,7 @@ const l = s.forwardRef(({ className: e, ...t }, a) => /* @__PURE__ */ i(
|
|
|
39
39
|
));
|
|
40
40
|
l.displayName = c.displayName;
|
|
41
41
|
export {
|
|
42
|
-
|
|
42
|
+
g as Tabs,
|
|
43
43
|
l as TabsContent,
|
|
44
44
|
f as TabsList,
|
|
45
45
|
m as TabsTrigger
|
package/dist/index36.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx as n } from "react/jsx-runtime";
|
|
2
2
|
import * as s from "react";
|
|
3
|
-
import { Root as
|
|
4
|
-
import { cva as m } from "./
|
|
3
|
+
import { Root as e } from "./index74.js";
|
|
4
|
+
import { cva as m } from "./index47.js";
|
|
5
5
|
import { cn as p } from "./index2.js";
|
|
6
6
|
const f = m(
|
|
7
|
-
"inline-flex items-center justify-center text-sm font-medium
|
|
7
|
+
"inline-flex items-center justify-center text-sm font-medium hover:bg-primary hover:text-primary-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary disabled:pointer-events-none disabled:opacity-50 border-2 border-primary data-[state=on]:bg-primary data-[state=on]:text-primary-foreground data-[state=off]:bg-transparent data-[state=off]:text-primary [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 gap-2 cursor-pointer",
|
|
8
8
|
{
|
|
9
9
|
variants: {
|
|
10
10
|
variant: {
|
|
@@ -22,15 +22,15 @@ const f = m(
|
|
|
22
22
|
size: "default"
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
|
-
), d = s.forwardRef(({ className:
|
|
26
|
-
|
|
25
|
+
), d = s.forwardRef(({ className: r, variant: t, size: a, ...o }, i) => /* @__PURE__ */ n(
|
|
26
|
+
e,
|
|
27
27
|
{
|
|
28
|
-
ref:
|
|
29
|
-
className: p(f({ variant:
|
|
30
|
-
...
|
|
28
|
+
ref: i,
|
|
29
|
+
className: p(f({ variant: t, size: a, className: r })),
|
|
30
|
+
...o
|
|
31
31
|
}
|
|
32
32
|
));
|
|
33
|
-
d.displayName =
|
|
33
|
+
d.displayName = e.displayName;
|
|
34
34
|
export {
|
|
35
35
|
d as Toggle,
|
|
36
36
|
f as toggleVariants
|
package/dist/index37.js
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import * as
|
|
3
|
-
import { Root as
|
|
4
|
-
import { cn as
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
const
|
|
8
|
-
|
|
1
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import * as p from "react";
|
|
3
|
+
import { Root as n, Trigger as s, Portal as l, Content as i, Provider as m } from "./index71.js";
|
|
4
|
+
import { cn as d } from "./index2.js";
|
|
5
|
+
const c = ({ children: o, ...r }) => /* @__PURE__ */ t(m, { delayDuration: 100, skipDelayDuration: 300, ...r, children: o });
|
|
6
|
+
c.displayName = "TooltipProvider";
|
|
7
|
+
const x = n, v = s, f = p.forwardRef(({ className: o, sideOffset: r = 4, ...e }, a) => /* @__PURE__ */ t(l, { children: /* @__PURE__ */ t(
|
|
8
|
+
i,
|
|
9
9
|
{
|
|
10
|
-
ref:
|
|
11
|
-
sideOffset:
|
|
12
|
-
className:
|
|
13
|
-
"z-50 overflow-hidden bg-primary px-3 py-1.5 text-xs text-primary-foreground
|
|
10
|
+
ref: a,
|
|
11
|
+
sideOffset: r,
|
|
12
|
+
className: d(
|
|
13
|
+
"z-50 overflow-hidden bg-primary px-3 py-1.5 text-xs text-primary-foreground",
|
|
14
14
|
o
|
|
15
15
|
),
|
|
16
|
-
...
|
|
16
|
+
...e
|
|
17
17
|
}
|
|
18
18
|
) }));
|
|
19
|
-
|
|
19
|
+
f.displayName = i.displayName;
|
|
20
20
|
export {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
21
|
+
x as Tooltip,
|
|
22
|
+
f as TooltipContent,
|
|
23
|
+
c as TooltipProvider,
|
|
24
|
+
v as TooltipTrigger
|
|
25
25
|
};
|
package/dist/index4.js
CHANGED
|
@@ -1,46 +1,46 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import * as
|
|
3
|
-
import { Root as c, Item as l, Header as f, Trigger as
|
|
4
|
-
import { cn as
|
|
5
|
-
import p from "./
|
|
6
|
-
const
|
|
1
|
+
import { jsx as r, jsxs as m } from "react/jsx-runtime";
|
|
2
|
+
import * as s from "react";
|
|
3
|
+
import { Root as c, Item as l, Header as f, Trigger as n, Content as d } from "./index45.js";
|
|
4
|
+
import { cn as i } from "./index2.js";
|
|
5
|
+
import p from "./index46.js";
|
|
6
|
+
const v = c, N = s.forwardRef(({ className: e, ...t }, o) => /* @__PURE__ */ r(
|
|
7
7
|
l,
|
|
8
8
|
{
|
|
9
|
-
ref:
|
|
10
|
-
className:
|
|
11
|
-
...
|
|
9
|
+
ref: o,
|
|
10
|
+
className: i("border-b-2 w-full", e),
|
|
11
|
+
...t
|
|
12
12
|
}
|
|
13
13
|
));
|
|
14
14
|
N.displayName = "AccordionItem";
|
|
15
|
-
const x =
|
|
16
|
-
|
|
15
|
+
const x = s.forwardRef(({ className: e, children: t, ...o }, a) => /* @__PURE__ */ r(f, { className: "flex", children: /* @__PURE__ */ m(
|
|
16
|
+
n,
|
|
17
17
|
{
|
|
18
|
-
ref:
|
|
19
|
-
className:
|
|
20
|
-
"flex flex-1 items-center justify-between py-4 text-sm font-medium
|
|
18
|
+
ref: a,
|
|
19
|
+
className: i(
|
|
20
|
+
"flex flex-1 items-center justify-between py-4 text-sm font-medium hover:underline text-left [&[data-state=open]>svg]:rotate-180",
|
|
21
21
|
e
|
|
22
22
|
),
|
|
23
|
-
...
|
|
23
|
+
...o,
|
|
24
24
|
children: [
|
|
25
|
-
|
|
26
|
-
/* @__PURE__ */
|
|
25
|
+
t,
|
|
26
|
+
/* @__PURE__ */ r(p, { className: "h-4 w-4 shrink-0 text-muted-foreground" })
|
|
27
27
|
]
|
|
28
28
|
}
|
|
29
29
|
) }));
|
|
30
|
-
x.displayName =
|
|
31
|
-
const
|
|
30
|
+
x.displayName = n.displayName;
|
|
31
|
+
const h = s.forwardRef(({ className: e, children: t, ...o }, a) => /* @__PURE__ */ r(
|
|
32
32
|
d,
|
|
33
33
|
{
|
|
34
|
-
ref:
|
|
35
|
-
className: "overflow-hidden text-sm data-[state=closed]:
|
|
36
|
-
...
|
|
37
|
-
children: /* @__PURE__ */
|
|
34
|
+
ref: a,
|
|
35
|
+
className: "overflow-hidden text-sm data-[state=closed]:h-0 data-[state=closed]:invisible",
|
|
36
|
+
...o,
|
|
37
|
+
children: /* @__PURE__ */ r("div", { className: i("pb-4 pt-0", e), children: t })
|
|
38
38
|
}
|
|
39
39
|
));
|
|
40
|
-
|
|
40
|
+
h.displayName = d.displayName;
|
|
41
41
|
export {
|
|
42
|
-
|
|
43
|
-
|
|
42
|
+
v as Accordion,
|
|
43
|
+
h as AccordionContent,
|
|
44
44
|
N as AccordionItem,
|
|
45
45
|
x as AccordionTrigger
|
|
46
46
|
};
|
package/dist/index45.js
CHANGED
|
@@ -1,35 +1,239 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
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
|
-
}
|
|
1
|
+
import s from "react";
|
|
2
|
+
import { createContextScope as X } from "./index76.js";
|
|
3
|
+
import { createCollection as Z } from "./index77.js";
|
|
4
|
+
import { useComposedRefs as $ } from "./index78.js";
|
|
5
|
+
import { composeEventHandlers as ee } from "./index79.js";
|
|
6
|
+
import { useControllableState as M } from "./index80.js";
|
|
7
|
+
import { Primitive as V } from "./index81.js";
|
|
8
|
+
import { createCollapsibleScope as H, Root as oe, Trigger as re, Content as te } from "./index54.js";
|
|
9
|
+
import { useId as ne } from "./index82.js";
|
|
10
|
+
import { useDirection as ce } from "./index83.js";
|
|
11
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
12
|
+
var d = "Accordion", ie = ["Home", "End", "ArrowDown", "ArrowUp", "ArrowLeft", "ArrowRight"], [E, ae, le] = Z(d), [b] = X(d, [
|
|
13
|
+
le,
|
|
14
|
+
H
|
|
15
|
+
]), S = H(), K = s.forwardRef(
|
|
16
|
+
(o, c) => {
|
|
17
|
+
const { type: e, ...t } = o, i = t, r = t;
|
|
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) => {
|
|
52
|
+
const {
|
|
53
|
+
value: e,
|
|
54
|
+
defaultValue: t,
|
|
55
|
+
onValueChange: i = () => {
|
|
56
|
+
},
|
|
57
|
+
...r
|
|
58
|
+
} = o, [l, a] = M({
|
|
59
|
+
prop: e,
|
|
60
|
+
defaultProp: t ?? [],
|
|
61
|
+
onChange: i,
|
|
62
|
+
caller: d
|
|
63
|
+
}), p = s.useCallback(
|
|
64
|
+
(v) => a((u = []) => [...u, v]),
|
|
65
|
+
[a]
|
|
66
|
+
), m = s.useCallback(
|
|
67
|
+
(v) => a((u = []) => u.filter((h) => h !== v)),
|
|
68
|
+
[a]
|
|
69
|
+
);
|
|
70
|
+
return /* @__PURE__ */ n(
|
|
71
|
+
L,
|
|
72
|
+
{
|
|
73
|
+
scope: o.__scopeAccordion,
|
|
74
|
+
value: l,
|
|
75
|
+
onItemOpen: p,
|
|
76
|
+
onItemClose: m,
|
|
77
|
+
children: /* @__PURE__ */ n(z, { scope: o.__scopeAccordion, collapsible: !0, children: /* @__PURE__ */ n(G, { ...r, ref: c }) })
|
|
78
|
+
}
|
|
79
|
+
);
|
|
80
|
+
}), [ue, I] = b(d), G = s.forwardRef(
|
|
81
|
+
(o, c) => {
|
|
82
|
+
const { __scopeAccordion: e, disabled: t, dir: i, orientation: r = "vertical", ...l } = o, a = s.useRef(null), p = $(a, c), m = ae(e), u = ce(i) === "ltr", h = ee(o.onKeyDown, (C) => {
|
|
83
|
+
var O;
|
|
84
|
+
if (!ie.includes(C.key)) return;
|
|
85
|
+
const Q = C.target, x = m().filter((N) => {
|
|
86
|
+
var T;
|
|
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,
|
|
122
|
+
{
|
|
123
|
+
scope: e,
|
|
124
|
+
disabled: t,
|
|
125
|
+
direction: i,
|
|
126
|
+
orientation: r,
|
|
127
|
+
children: /* @__PURE__ */ n(E.Slot, { scope: e, children: /* @__PURE__ */ n(
|
|
128
|
+
V.div,
|
|
129
|
+
{
|
|
130
|
+
...l,
|
|
131
|
+
"data-orientation": r,
|
|
132
|
+
ref: p,
|
|
133
|
+
onKeyDown: t ? void 0 : h
|
|
134
|
+
}
|
|
135
|
+
) })
|
|
136
|
+
}
|
|
137
|
+
);
|
|
138
|
+
}
|
|
139
|
+
), g = "AccordionItem", [me, k] = b(g), U = s.forwardRef(
|
|
140
|
+
(o, c) => {
|
|
141
|
+
const { __scopeAccordion: e, value: t, ...i } = o, r = I(g, e), l = se(g, e), a = S(e), p = ne(), m = t && l.value.includes(t) || !1, v = r.disabled || o.disabled;
|
|
142
|
+
return /* @__PURE__ */ n(
|
|
143
|
+
me,
|
|
144
|
+
{
|
|
145
|
+
scope: e,
|
|
146
|
+
open: m,
|
|
147
|
+
disabled: v,
|
|
148
|
+
triggerId: p,
|
|
149
|
+
children: /* @__PURE__ */ n(
|
|
150
|
+
oe,
|
|
151
|
+
{
|
|
152
|
+
"data-orientation": r.orientation,
|
|
153
|
+
"data-state": J(m),
|
|
154
|
+
...a,
|
|
155
|
+
...i,
|
|
156
|
+
ref: c,
|
|
157
|
+
disabled: v,
|
|
158
|
+
open: m,
|
|
159
|
+
onOpenChange: (u) => {
|
|
160
|
+
u ? l.onItemOpen(t) : l.onItemClose(t);
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
)
|
|
164
|
+
}
|
|
165
|
+
);
|
|
166
|
+
}
|
|
167
|
+
);
|
|
168
|
+
U.displayName = g;
|
|
169
|
+
var j = "AccordionHeader", Y = s.forwardRef(
|
|
170
|
+
(o, c) => {
|
|
171
|
+
const { __scopeAccordion: e, ...t } = o, i = I(d, e), r = k(j, e);
|
|
172
|
+
return /* @__PURE__ */ n(
|
|
173
|
+
V.h3,
|
|
174
|
+
{
|
|
175
|
+
"data-orientation": i.orientation,
|
|
176
|
+
"data-state": J(r.open),
|
|
177
|
+
"data-disabled": r.disabled ? "" : void 0,
|
|
178
|
+
...t,
|
|
179
|
+
ref: c
|
|
180
|
+
}
|
|
181
|
+
);
|
|
182
|
+
}
|
|
183
|
+
);
|
|
184
|
+
Y.displayName = j;
|
|
185
|
+
var y = "AccordionTrigger", q = s.forwardRef(
|
|
186
|
+
(o, c) => {
|
|
187
|
+
const { __scopeAccordion: e, ...t } = o, i = I(d, e), r = k(y, e), l = de(y, e), a = S(e);
|
|
188
|
+
return /* @__PURE__ */ n(E.ItemSlot, { scope: e, children: /* @__PURE__ */ n(
|
|
189
|
+
re,
|
|
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
|
+
) });
|
|
199
|
+
}
|
|
200
|
+
);
|
|
201
|
+
q.displayName = y;
|
|
202
|
+
var B = "AccordionContent", F = s.forwardRef(
|
|
203
|
+
(o, c) => {
|
|
204
|
+
const { __scopeAccordion: e, ...t } = o, i = I(d, e), r = k(B, e), l = S(e);
|
|
205
|
+
return /* @__PURE__ */ n(
|
|
206
|
+
te,
|
|
207
|
+
{
|
|
208
|
+
role: "region",
|
|
209
|
+
"aria-labelledby": r.triggerId,
|
|
210
|
+
"data-orientation": i.orientation,
|
|
211
|
+
...l,
|
|
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
|
+
}
|
|
219
|
+
}
|
|
220
|
+
);
|
|
221
|
+
}
|
|
222
|
+
);
|
|
223
|
+
F.displayName = B;
|
|
224
|
+
function J(o) {
|
|
225
|
+
return o ? "open" : "closed";
|
|
226
|
+
}
|
|
227
|
+
var Pe = K, Ne = U, ye = Y, Ee = q, Se = F;
|
|
32
228
|
export {
|
|
33
|
-
|
|
34
|
-
|
|
229
|
+
K as Accordion,
|
|
230
|
+
F as AccordionContent,
|
|
231
|
+
Y as AccordionHeader,
|
|
232
|
+
U as AccordionItem,
|
|
233
|
+
q as AccordionTrigger,
|
|
234
|
+
Se as Content,
|
|
235
|
+
ye as Header,
|
|
236
|
+
Ne as Item,
|
|
237
|
+
Pe as Root,
|
|
238
|
+
Ee as Trigger
|
|
35
239
|
};
|