@clasing/ui 2.7.5 → 2.9.0
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/{badge-DnN1HZI0.js → badge-CaH3b0zW.js} +12 -15
- package/dist/{button-C8ApjC1N.js → button-DSpGxL2e.js} +11 -12
- package/dist/components/accordion.js +14 -16
- package/dist/components/alert-dialog.js +1 -1
- package/dist/components/alert.js +1 -1
- package/dist/components/badge.js +1 -1
- package/dist/components/blocks/interactive-card.js +45 -51
- package/dist/components/blocks/selectable-chips.js +33 -32
- package/dist/components/button.js +1 -1
- package/dist/components/calendar.js +1 -1
- package/dist/components/checkbox.js +13 -15
- package/dist/components/context-menu.js +7 -7
- package/dist/components/dropdown-menu.js +38 -38
- package/dist/components/input-otp.js +1 -1
- package/dist/components/input.js +1 -1
- package/dist/components/menubar.js +1 -1
- package/dist/components/multi-select.js +36 -38
- package/dist/components/navigation-menu.js +16 -19
- package/dist/components/phone-input.js +88 -80
- package/dist/components/scroll-area.js +1 -1
- package/dist/components/select.js +18 -20
- package/dist/components/textarea.js +19 -25
- package/dist/components/toggle-group.js +1 -1
- package/dist/components/toggle.js +1 -1
- package/dist/{input-EFdg0T-Q.js → input-D9gqZjs0.js} +34 -42
- package/dist/{scroll-area-DQenuQib.js → scroll-area-BTNDZ-p2.js} +11 -13
- package/dist/{toggle-Bj6sVNqF.js → toggle-Df9QfXij.js} +9 -11
- package/dist/ui.css +57 -35
- package/package.json +1 -1
|
@@ -1,13 +1,10 @@
|
|
|
1
|
-
import { j as
|
|
1
|
+
import { j as s, c as b } from "./index-C_XDkVGm.js";
|
|
2
2
|
import { Slot as c } from "@radix-ui/react-slot";
|
|
3
3
|
import { cva as v } from "class-variance-authority";
|
|
4
4
|
const l = v(
|
|
5
5
|
`
|
|
6
6
|
box-border inline-flex w-fit shrink-0 items-center justify-center gap-2
|
|
7
|
-
overflow-hidden font-semibold whitespace-nowrap
|
|
8
|
-
transition-[color,box-shadow]
|
|
9
|
-
focus-visible:border-ring focus-visible:ring-[3px]
|
|
10
|
-
focus-visible:ring-ring/50
|
|
7
|
+
overflow-hidden font-semibold whitespace-nowrap focusable-item
|
|
11
8
|
aria-invalid:border-destructive aria-invalid:ring-destructive/20
|
|
12
9
|
dark:aria-invalid:ring-destructive/40
|
|
13
10
|
[&>svg]:pointer-events-none
|
|
@@ -28,7 +25,7 @@ const l = v(
|
|
|
28
25
|
focus-visible:ring-destructive/20
|
|
29
26
|
dark:bg-destructive
|
|
30
27
|
dark:focus-visible:ring-destructive
|
|
31
|
-
[a&]:hover:bg-destructive/
|
|
28
|
+
[a&]:hover:bg-destructive/80
|
|
32
29
|
`,
|
|
33
30
|
outline: `
|
|
34
31
|
text-foreground
|
|
@@ -36,7 +33,7 @@ const l = v(
|
|
|
36
33
|
`,
|
|
37
34
|
error: `
|
|
38
35
|
bg-destructive text-destructive-foreground
|
|
39
|
-
[a&]:hover:bg-destructive/
|
|
36
|
+
[a&]:hover:bg-destructive/80
|
|
40
37
|
`,
|
|
41
38
|
warning: `
|
|
42
39
|
bg-warning text-warning-foreground
|
|
@@ -93,17 +90,17 @@ const l = v(
|
|
|
93
90
|
failed: `
|
|
94
91
|
border border-destructive-foreground bg-background
|
|
95
92
|
text-destructive-foreground
|
|
96
|
-
[a&]:hover:bg-background/
|
|
93
|
+
[a&]:hover:bg-background/80
|
|
97
94
|
`,
|
|
98
95
|
expired: `
|
|
99
96
|
border border-destructive-foreground bg-background
|
|
100
97
|
text-destructive-foreground
|
|
101
|
-
[a&]:hover:bg-background/
|
|
98
|
+
[a&]:hover:bg-background/80
|
|
102
99
|
`,
|
|
103
100
|
cancelled: `
|
|
104
101
|
border border-destructive-foreground bg-background
|
|
105
102
|
text-destructive-foreground
|
|
106
|
-
[a&]:hover:bg-background/
|
|
103
|
+
[a&]:hover:bg-background/80
|
|
107
104
|
`
|
|
108
105
|
},
|
|
109
106
|
size: {
|
|
@@ -151,11 +148,11 @@ function h({
|
|
|
151
148
|
iconOnly: a,
|
|
152
149
|
asChild: g = !1,
|
|
153
150
|
children: n,
|
|
154
|
-
...
|
|
151
|
+
...u
|
|
155
152
|
}) {
|
|
156
|
-
const
|
|
157
|
-
return /* @__PURE__ */
|
|
158
|
-
|
|
153
|
+
const i = g ? c : "span";
|
|
154
|
+
return /* @__PURE__ */ s.jsx(
|
|
155
|
+
i,
|
|
159
156
|
{
|
|
160
157
|
"data-slot": "badge",
|
|
161
158
|
className: b(
|
|
@@ -163,7 +160,7 @@ function h({
|
|
|
163
160
|
a && "px-2.5 py-2",
|
|
164
161
|
e
|
|
165
162
|
),
|
|
166
|
-
...
|
|
163
|
+
...u,
|
|
167
164
|
children: n
|
|
168
165
|
}
|
|
169
166
|
);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as
|
|
1
|
+
import { c as a, j as e } from "./index-C_XDkVGm.js";
|
|
2
2
|
import { Slot as _ } from "@radix-ui/react-slot";
|
|
3
3
|
import { cva as k } from "class-variance-authority";
|
|
4
4
|
import w from "react";
|
|
@@ -6,11 +6,9 @@ import { C } from "./clasing-icon-zhfWTLFn.js";
|
|
|
6
6
|
import { b, T as c, c as g, a as f } from "./tooltip-CC_kyHTm.js";
|
|
7
7
|
const T = k(
|
|
8
8
|
`
|
|
9
|
-
relative z-0 flex items-center justify-center rounded-full
|
|
10
|
-
transition-[color,background-color,box-shadow]
|
|
9
|
+
relative z-0 flex items-center justify-center rounded-full focusable-item
|
|
11
10
|
before:absolute before:inset-0 before:z-[-1] before:rounded-full
|
|
12
11
|
before:transition-transform before:duration-150 before:ease-in-out
|
|
13
|
-
focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-1
|
|
14
12
|
not-disabled:active:before:scale-96
|
|
15
13
|
[&_svg]:shrink-0
|
|
16
14
|
`,
|
|
@@ -102,6 +100,7 @@ const T = k(
|
|
|
102
100
|
true: `
|
|
103
101
|
disabled:cursor-not-allowed disabled:text-muted-foreground!
|
|
104
102
|
disabled:before:bg-muted!
|
|
103
|
+
disabled:dark:opacity-60!
|
|
105
104
|
`
|
|
106
105
|
}
|
|
107
106
|
},
|
|
@@ -184,7 +183,7 @@ const T = k(
|
|
|
184
183
|
weight: p,
|
|
185
184
|
children: n,
|
|
186
185
|
isLoading: r,
|
|
187
|
-
disabled:
|
|
186
|
+
disabled: o,
|
|
188
187
|
tooltip: t,
|
|
189
188
|
tooltipPlacement: l = "top",
|
|
190
189
|
asChild: d,
|
|
@@ -197,13 +196,13 @@ const T = k(
|
|
|
197
196
|
md: "w-8 px-0",
|
|
198
197
|
sm: "w-7 px-0",
|
|
199
198
|
xs: "w-6 px-0"
|
|
200
|
-
}[i || "xl"] : "", N =
|
|
199
|
+
}[i || "xl"] : "", N = a(
|
|
201
200
|
T({
|
|
202
201
|
variant: x,
|
|
203
202
|
weight: p,
|
|
204
203
|
size: i,
|
|
205
204
|
isLoading: r,
|
|
206
|
-
disabled:
|
|
205
|
+
disabled: o
|
|
207
206
|
}),
|
|
208
207
|
m,
|
|
209
208
|
j
|
|
@@ -212,7 +211,7 @@ const T = k(
|
|
|
212
211
|
C,
|
|
213
212
|
{
|
|
214
213
|
variant: "default",
|
|
215
|
-
className:
|
|
214
|
+
className: a(
|
|
216
215
|
"pointer-events-none absolute top-1/2 left-1/2 -translate-1/2",
|
|
217
216
|
{
|
|
218
217
|
"visible animate-[spin_2s_linear_infinite] opacity-100": r
|
|
@@ -223,7 +222,7 @@ const T = k(
|
|
|
223
222
|
/* @__PURE__ */ e.jsx(
|
|
224
223
|
"span",
|
|
225
224
|
{
|
|
226
|
-
className:
|
|
225
|
+
className: a(
|
|
227
226
|
"flex items-center justify-center gap-2",
|
|
228
227
|
r ? "invisible opacity-0" : "visible opacity-100"
|
|
229
228
|
),
|
|
@@ -234,13 +233,13 @@ const T = k(
|
|
|
234
233
|
h,
|
|
235
234
|
{
|
|
236
235
|
ref: y,
|
|
237
|
-
className:
|
|
238
|
-
disabled: !!r || !!
|
|
236
|
+
className: a(N),
|
|
237
|
+
disabled: !!r || !!o,
|
|
239
238
|
...v,
|
|
240
239
|
children: z
|
|
241
240
|
}
|
|
242
241
|
);
|
|
243
|
-
return t && (
|
|
242
|
+
return t && (o || r) ? /* @__PURE__ */ e.jsx(b, { children: /* @__PURE__ */ e.jsxs(c, { children: [
|
|
244
243
|
/* @__PURE__ */ e.jsx(g, { asChild: !0, children: u ? /* @__PURE__ */ e.jsx("div", { className: "inline-block", "aria-disabled": "true", children: s }) : s }),
|
|
245
244
|
/* @__PURE__ */ e.jsx(f, { side: l, children: t })
|
|
246
245
|
] }) }) : t ? /* @__PURE__ */ e.jsx(b, { children: /* @__PURE__ */ e.jsxs(c, { children: [
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { j as e, c as a } from "../index-C_XDkVGm.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as n from "@radix-ui/react-accordion";
|
|
3
3
|
import { CaretDownIcon as s } from "@phosphor-icons/react";
|
|
4
4
|
function c({
|
|
5
5
|
...t
|
|
6
6
|
}) {
|
|
7
|
-
return /* @__PURE__ */ e.jsx(
|
|
7
|
+
return /* @__PURE__ */ e.jsx(n.Root, { "data-slot": "accordion", ...t });
|
|
8
8
|
}
|
|
9
9
|
function l({
|
|
10
10
|
className: t,
|
|
11
11
|
...o
|
|
12
12
|
}) {
|
|
13
13
|
return /* @__PURE__ */ e.jsx(
|
|
14
|
-
|
|
14
|
+
n.Item,
|
|
15
15
|
{
|
|
16
16
|
"data-slot": "accordion-item",
|
|
17
17
|
className: a(
|
|
@@ -28,20 +28,18 @@ function l({
|
|
|
28
28
|
function m({
|
|
29
29
|
className: t,
|
|
30
30
|
children: o,
|
|
31
|
-
...
|
|
31
|
+
...r
|
|
32
32
|
}) {
|
|
33
|
-
return /* @__PURE__ */ e.jsx(
|
|
34
|
-
|
|
33
|
+
return /* @__PURE__ */ e.jsx(n.Header, { className: "flex", children: /* @__PURE__ */ e.jsxs(
|
|
34
|
+
n.Trigger,
|
|
35
35
|
{
|
|
36
36
|
"data-slot": "accordion-trigger",
|
|
37
37
|
className: a(
|
|
38
38
|
`
|
|
39
39
|
flex flex-1 items-start justify-between gap-4 rounded-md py-4
|
|
40
|
-
text-left paragraph-sm font-semibold text-foreground
|
|
41
|
-
outline-none
|
|
40
|
+
text-left paragraph-sm font-semibold text-foreground focusable-item
|
|
41
|
+
transition-all outline-none
|
|
42
42
|
hover:underline
|
|
43
|
-
focus-visible:border-ring focus-visible:ring-[3px]
|
|
44
|
-
focus-visible:ring-ring/50
|
|
45
43
|
disabled:pointer-events-none disabled:opacity-50
|
|
46
44
|
[&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:translate-y-0.5
|
|
47
45
|
[&_svg]:text-muted-foreground [&_svg]:transition-transform
|
|
@@ -50,7 +48,7 @@ function m({
|
|
|
50
48
|
`,
|
|
51
49
|
t
|
|
52
50
|
),
|
|
53
|
-
...
|
|
51
|
+
...r,
|
|
54
52
|
children: [
|
|
55
53
|
o,
|
|
56
54
|
/* @__PURE__ */ e.jsx(s, {})
|
|
@@ -58,13 +56,13 @@ function m({
|
|
|
58
56
|
}
|
|
59
57
|
) });
|
|
60
58
|
}
|
|
61
|
-
function
|
|
59
|
+
function u({
|
|
62
60
|
className: t,
|
|
63
61
|
children: o,
|
|
64
|
-
...
|
|
62
|
+
...r
|
|
65
63
|
}) {
|
|
66
64
|
return /* @__PURE__ */ e.jsx(
|
|
67
|
-
|
|
65
|
+
n.Content,
|
|
68
66
|
{
|
|
69
67
|
"data-slot": "accordion-content",
|
|
70
68
|
className: `\r
|
|
@@ -72,14 +70,14 @@ function g({
|
|
|
72
70
|
data-[state=closed]:animate-accordion-up\r
|
|
73
71
|
data-[state=open]:animate-accordion-down\r
|
|
74
72
|
`,
|
|
75
|
-
...
|
|
73
|
+
...r,
|
|
76
74
|
children: /* @__PURE__ */ e.jsx("div", { className: a("pt-0 pb-4", t), children: o })
|
|
77
75
|
}
|
|
78
76
|
);
|
|
79
77
|
}
|
|
80
78
|
export {
|
|
81
79
|
c as Accordion,
|
|
82
|
-
|
|
80
|
+
u as AccordionContent,
|
|
83
81
|
l as AccordionItem,
|
|
84
82
|
m as AccordionTrigger
|
|
85
83
|
};
|
package/dist/components/alert.js
CHANGED
|
@@ -4,7 +4,7 @@ import { cva as p } from "class-variance-authority";
|
|
|
4
4
|
const x = p(
|
|
5
5
|
`
|
|
6
6
|
relative grid w-full grid-cols-[0_1fr] items-start gap-y-2 rounded-2xl
|
|
7
|
-
border
|
|
7
|
+
border p-6 paragraph-sm text-foreground
|
|
8
8
|
has-[>svg]:grid-cols-[calc(var(--spacing)*5)_1fr] has-[>svg]:gap-x-3
|
|
9
9
|
[&>svg]:size-5 [&>svg]:translate-y-0.5 [&>svg]:text-current
|
|
10
10
|
`,
|
package/dist/components/badge.js
CHANGED
|
@@ -1,76 +1,70 @@
|
|
|
1
|
-
import { j as r, c as
|
|
2
|
-
import { B as
|
|
1
|
+
import { j as r, c as a } from "../../index-C_XDkVGm.js";
|
|
2
|
+
import { B as b } from "../../badge-CaH3b0zW.js";
|
|
3
3
|
import { C as I, e as w, b as y, d as k } from "../../card-zTCfwTcL.js";
|
|
4
4
|
import { T as z, c as B, a as R } from "../../tooltip-CC_kyHTm.js";
|
|
5
5
|
import { InfoIcon as E } from "@phosphor-icons/react";
|
|
6
6
|
import { cva as F } from "class-variance-authority";
|
|
7
7
|
import { forwardRef as H } from "react";
|
|
8
|
-
const O = F(
|
|
9
|
-
`
|
|
10
|
-
transition-[color,box-shadow]
|
|
11
|
-
focus-visible:border-ring focus-visible:ring-[3px]
|
|
12
|
-
focus-visible:ring-ring/50
|
|
13
|
-
`
|
|
14
|
-
), f = H(
|
|
8
|
+
const O = F("focusable-item"), f = H(
|
|
15
9
|
({
|
|
16
|
-
className:
|
|
10
|
+
className: i,
|
|
17
11
|
isActive: s,
|
|
18
|
-
title:
|
|
19
|
-
text:
|
|
20
|
-
helperText:
|
|
21
|
-
badgeText:
|
|
12
|
+
title: t,
|
|
13
|
+
text: d,
|
|
14
|
+
helperText: u,
|
|
15
|
+
badgeText: o,
|
|
22
16
|
disabled: e,
|
|
23
|
-
badgeVariant:
|
|
24
|
-
badgeSize:
|
|
25
|
-
icon:
|
|
17
|
+
badgeVariant: x,
|
|
18
|
+
badgeSize: g = "xs",
|
|
19
|
+
icon: m,
|
|
26
20
|
tooltipIcon: p,
|
|
27
|
-
tooltipText:
|
|
28
|
-
tooltipTitle:
|
|
21
|
+
tooltipText: n,
|
|
22
|
+
tooltipTitle: c,
|
|
29
23
|
tooltipSide: h,
|
|
30
24
|
tooltipSideOffset: j,
|
|
31
25
|
tooltipAlign: C,
|
|
32
26
|
children: N,
|
|
33
|
-
...
|
|
34
|
-
},
|
|
27
|
+
...l
|
|
28
|
+
}, v) => /* @__PURE__ */ r.jsxs(
|
|
35
29
|
I,
|
|
36
30
|
{
|
|
37
|
-
ref:
|
|
38
|
-
className:
|
|
39
|
-
"
|
|
31
|
+
ref: v,
|
|
32
|
+
className: a(O({ className: i }), {
|
|
33
|
+
"active-card": s,
|
|
40
34
|
"border-muted-foreground bg-muted": e,
|
|
41
|
-
"cursor-pointer
|
|
42
|
-
"cursor-pointer
|
|
35
|
+
"cursor-pointer": l.onClick && s && !e,
|
|
36
|
+
"cursor-pointer hover:bg-accent/50": l.onClick && !s && !e
|
|
43
37
|
}),
|
|
44
38
|
role: "button",
|
|
45
39
|
tabIndex: 0,
|
|
46
|
-
...
|
|
40
|
+
...l,
|
|
47
41
|
children: [
|
|
48
|
-
|
|
49
|
-
|
|
42
|
+
o || m ? /* @__PURE__ */ r.jsxs(w, { className: "flex items-center justify-between gap-2", children: [
|
|
43
|
+
m ? /* @__PURE__ */ r.jsx(
|
|
50
44
|
"div",
|
|
51
45
|
{
|
|
52
|
-
className:
|
|
46
|
+
className: a("rounded-full p-1", {
|
|
53
47
|
"bg-muted text-muted-foreground": !s,
|
|
54
48
|
"bg-info text-info-foreground": s,
|
|
55
49
|
"bg-background text-muted-foreground": e
|
|
56
50
|
}),
|
|
57
|
-
children:
|
|
51
|
+
children: m
|
|
58
52
|
}
|
|
59
53
|
) : null,
|
|
60
|
-
(
|
|
61
|
-
|
|
62
|
-
|
|
54
|
+
(o || n) && /* @__PURE__ */ r.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
55
|
+
o ? /* @__PURE__ */ r.jsx(
|
|
56
|
+
b,
|
|
63
57
|
{
|
|
64
|
-
variant:
|
|
65
|
-
size:
|
|
58
|
+
variant: x,
|
|
59
|
+
size: g,
|
|
66
60
|
weight: "semibold",
|
|
67
|
-
className:
|
|
61
|
+
className: a({
|
|
68
62
|
"opacity-50": e
|
|
69
63
|
}),
|
|
70
|
-
children:
|
|
64
|
+
children: o
|
|
71
65
|
}
|
|
72
66
|
) : null,
|
|
73
|
-
|
|
67
|
+
n && /* @__PURE__ */ r.jsxs(z, { children: [
|
|
74
68
|
/* @__PURE__ */ r.jsx(B, { children: p ?? /* @__PURE__ */ r.jsx(E, { size: 20, className: "z-10 min-h-5 min-w-5" }) }),
|
|
75
69
|
/* @__PURE__ */ r.jsx(
|
|
76
70
|
R,
|
|
@@ -78,9 +72,9 @@ const O = F(
|
|
|
78
72
|
side: h,
|
|
79
73
|
sideOffset: j,
|
|
80
74
|
align: C,
|
|
81
|
-
children:
|
|
82
|
-
|
|
83
|
-
|
|
75
|
+
children: c || n && /* @__PURE__ */ r.jsxs("div", { className: "flex flex-col gap-1", children: [
|
|
76
|
+
c && /* @__PURE__ */ r.jsx("p", { className: "paragraph-md font-semibold", children: c }),
|
|
77
|
+
n && /* @__PURE__ */ r.jsx("p", { className: "paragraph-md", children: n })
|
|
84
78
|
] })
|
|
85
79
|
}
|
|
86
80
|
)
|
|
@@ -88,33 +82,33 @@ const O = F(
|
|
|
88
82
|
] })
|
|
89
83
|
] }) : null,
|
|
90
84
|
/* @__PURE__ */ r.jsxs(y, { className: "flex flex-col gap-1", children: [
|
|
91
|
-
|
|
85
|
+
t ? /* @__PURE__ */ r.jsx(
|
|
92
86
|
"p",
|
|
93
87
|
{
|
|
94
|
-
className:
|
|
88
|
+
className: a("label-xl font-semibold text-foreground", {
|
|
95
89
|
"text-muted-foreground": e
|
|
96
90
|
}),
|
|
97
|
-
children:
|
|
91
|
+
children: t
|
|
98
92
|
}
|
|
99
93
|
) : null,
|
|
100
|
-
|
|
94
|
+
d ? /* @__PURE__ */ r.jsx(
|
|
101
95
|
"p",
|
|
102
96
|
{
|
|
103
|
-
className:
|
|
97
|
+
className: a("paragraph-md text-muted-foreground", {
|
|
104
98
|
"text-muted-foreground": e
|
|
105
99
|
}),
|
|
106
|
-
children:
|
|
100
|
+
children: d
|
|
107
101
|
}
|
|
108
102
|
) : null,
|
|
109
103
|
N
|
|
110
104
|
] }),
|
|
111
|
-
|
|
105
|
+
u ? /* @__PURE__ */ r.jsx(k, { children: /* @__PURE__ */ r.jsx(
|
|
112
106
|
"p",
|
|
113
107
|
{
|
|
114
|
-
className:
|
|
108
|
+
className: a("paragraph-sm text-muted-foreground", {
|
|
115
109
|
"text-muted-foreground": e
|
|
116
110
|
}),
|
|
117
|
-
children:
|
|
111
|
+
children: u
|
|
118
112
|
}
|
|
119
113
|
) }) : null
|
|
120
114
|
]
|
|
@@ -2,46 +2,47 @@ import { j as s, c as n } from "../../index-C_XDkVGm.js";
|
|
|
2
2
|
import { C as R } from "../../chip-DOCdEBBS.js";
|
|
3
3
|
import { L as k } from "../../label-CnZHCbRc.js";
|
|
4
4
|
import { CheckIcon as I } from "@phosphor-icons/react";
|
|
5
|
-
import * as
|
|
6
|
-
const L =
|
|
5
|
+
import * as f from "react";
|
|
6
|
+
const L = f.forwardRef(
|
|
7
7
|
({
|
|
8
|
-
id:
|
|
8
|
+
id: h,
|
|
9
9
|
label: d,
|
|
10
10
|
options: i,
|
|
11
|
-
multiple:
|
|
12
|
-
value:
|
|
13
|
-
defaultValue:
|
|
14
|
-
onChange:
|
|
15
|
-
onValueChange:
|
|
16
|
-
className:
|
|
17
|
-
disabled:
|
|
18
|
-
helperText:
|
|
19
|
-
...
|
|
20
|
-
},
|
|
21
|
-
const [
|
|
22
|
-
|
|
23
|
-
},
|
|
24
|
-
if (!
|
|
25
|
-
|
|
11
|
+
multiple: t = !1,
|
|
12
|
+
value: o,
|
|
13
|
+
defaultValue: x,
|
|
14
|
+
onChange: p,
|
|
15
|
+
onValueChange: v,
|
|
16
|
+
className: b,
|
|
17
|
+
disabled: r,
|
|
18
|
+
helperText: u,
|
|
19
|
+
...j
|
|
20
|
+
}, C) => {
|
|
21
|
+
const [g, y] = f.useState(x || (t ? [] : "")), l = o !== void 0 ? o : g, m = (e) => {
|
|
22
|
+
y(e), p?.(e), v?.(e);
|
|
23
|
+
}, S = (e) => {
|
|
24
|
+
if (!t) {
|
|
25
|
+
const c = l === e.value ? "" : e.value;
|
|
26
|
+
m(c);
|
|
26
27
|
return;
|
|
27
28
|
}
|
|
28
|
-
const a = Array.isArray(
|
|
29
|
-
m(
|
|
30
|
-
},
|
|
29
|
+
const a = Array.isArray(l) ? l : [], A = a.includes(e.value) ? a.filter((c) => c !== e.value) : [...a, e.value];
|
|
30
|
+
m(A);
|
|
31
|
+
}, N = (e) => t ? Array.isArray(l) && l.includes(e.value) : l === e.value;
|
|
31
32
|
return i.length === 0 ? null : /* @__PURE__ */ s.jsxs(
|
|
32
33
|
"div",
|
|
33
34
|
{
|
|
34
|
-
ref:
|
|
35
|
+
ref: C,
|
|
35
36
|
"data-slot": "selectable-chips",
|
|
36
|
-
className: n("flex flex-col gap-3",
|
|
37
|
-
...
|
|
37
|
+
className: n("flex flex-col gap-3", b),
|
|
38
|
+
...j,
|
|
38
39
|
children: [
|
|
39
40
|
d && /* @__PURE__ */ s.jsx(
|
|
40
41
|
k,
|
|
41
42
|
{
|
|
42
43
|
"data-slot": "selectable-chips-label",
|
|
43
|
-
htmlFor:
|
|
44
|
-
className: n({ "text-muted-foreground":
|
|
44
|
+
htmlFor: h,
|
|
45
|
+
className: n({ "text-muted-foreground": r }),
|
|
45
46
|
children: d
|
|
46
47
|
}
|
|
47
48
|
),
|
|
@@ -51,15 +52,15 @@ const L = u.forwardRef(
|
|
|
51
52
|
"data-slot": "selectable-chips-container",
|
|
52
53
|
className: "flex flex-wrap gap-2",
|
|
53
54
|
children: i.map((e) => {
|
|
54
|
-
const a =
|
|
55
|
+
const a = N(e);
|
|
55
56
|
return /* @__PURE__ */ s.jsxs(
|
|
56
57
|
R,
|
|
57
58
|
{
|
|
58
59
|
"data-selected": a,
|
|
59
60
|
variant: a ? "selected" : "unselected",
|
|
60
|
-
onClick: () =>
|
|
61
|
+
onClick: () => S(e),
|
|
61
62
|
className: "py-1",
|
|
62
|
-
disabled:
|
|
63
|
+
disabled: r,
|
|
63
64
|
children: [
|
|
64
65
|
a && /* @__PURE__ */ s.jsx(I, {}),
|
|
65
66
|
e.label
|
|
@@ -70,15 +71,15 @@ const L = u.forwardRef(
|
|
|
70
71
|
})
|
|
71
72
|
}
|
|
72
73
|
),
|
|
73
|
-
|
|
74
|
+
u && /* @__PURE__ */ s.jsx(
|
|
74
75
|
"p",
|
|
75
76
|
{
|
|
76
77
|
"data-slot": "selectable-chips-description",
|
|
77
78
|
className: n(
|
|
78
79
|
"-mt-1 label-md text-muted-foreground",
|
|
79
|
-
|
|
80
|
+
r && "text-muted-foreground"
|
|
80
81
|
),
|
|
81
|
-
children:
|
|
82
|
+
children: u
|
|
82
83
|
}
|
|
83
84
|
)
|
|
84
85
|
]
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { j as n, c as e } from "../index-C_XDkVGm.js";
|
|
2
2
|
import * as i from "react";
|
|
3
3
|
import { getDefaultClassNames as p, DayPicker as x } from "react-day-picker";
|
|
4
|
-
import { b as m, B as h } from "../button-
|
|
4
|
+
import { b as m, B as h } from "../button-DSpGxL2e.js";
|
|
5
5
|
import { CaretLeftIcon as w, CaretRightIcon as _, CaretDownIcon as y } from "@phosphor-icons/react";
|
|
6
6
|
function C({
|
|
7
7
|
className: c,
|
|
@@ -1,20 +1,18 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import * as
|
|
1
|
+
import { j as e, c as i } from "../index-C_XDkVGm.js";
|
|
2
|
+
import * as r from "@radix-ui/react-checkbox";
|
|
3
3
|
import { CheckIcon as o } from "@phosphor-icons/react";
|
|
4
4
|
function n({
|
|
5
|
-
className:
|
|
6
|
-
...
|
|
5
|
+
className: a,
|
|
6
|
+
...t
|
|
7
7
|
}) {
|
|
8
|
-
return /* @__PURE__ */
|
|
9
|
-
|
|
8
|
+
return /* @__PURE__ */ e.jsx(
|
|
9
|
+
r.Root,
|
|
10
10
|
{
|
|
11
11
|
"data-slot": "checkbox",
|
|
12
|
-
className:
|
|
12
|
+
className: i(
|
|
13
13
|
`
|
|
14
|
-
peer size-4 shrink-0 rounded-[4px] border
|
|
14
|
+
peer size-4 shrink-0 rounded-[4px] border focusable-item
|
|
15
15
|
transition-[color,background-color,box-shadow] outline-none
|
|
16
|
-
focus-visible:border-ring focus-visible:ring-[3px]
|
|
17
|
-
focus-visible:ring-ring/50
|
|
18
16
|
disabled:cursor-not-allowed disabled:opacity-50
|
|
19
17
|
aria-invalid:border-destructive aria-invalid:ring-destructive/20
|
|
20
18
|
data-[state=checked]:border-primary data-[state=checked]:bg-primary
|
|
@@ -23,17 +21,17 @@ function n({
|
|
|
23
21
|
dark:aria-invalid:ring-destructive/40
|
|
24
22
|
dark:data-[state=checked]:bg-primary
|
|
25
23
|
`,
|
|
26
|
-
|
|
24
|
+
a
|
|
27
25
|
),
|
|
28
|
-
...
|
|
29
|
-
children: /* @__PURE__ */
|
|
30
|
-
|
|
26
|
+
...t,
|
|
27
|
+
children: /* @__PURE__ */ e.jsx(
|
|
28
|
+
r.Indicator,
|
|
31
29
|
{
|
|
32
30
|
"data-slot": "checkbox-indicator",
|
|
33
31
|
className: `\r
|
|
34
32
|
flex items-center justify-center text-current transition-none\r
|
|
35
33
|
`,
|
|
36
|
-
children: /* @__PURE__ */
|
|
34
|
+
children: /* @__PURE__ */ e.jsx(o, { className: "size-3.5" })
|
|
37
35
|
}
|
|
38
36
|
)
|
|
39
37
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { j as e, c as s } from "../index-C_XDkVGm.js";
|
|
2
2
|
import * as a from "@radix-ui/react-context-menu";
|
|
3
|
-
import { CheckIcon as i, CircleIcon as d, CaretRightIcon as
|
|
3
|
+
import { CheckIcon as i, CircleIcon as d, CaretRightIcon as u } from "@phosphor-icons/react";
|
|
4
4
|
function m({
|
|
5
5
|
...t
|
|
6
6
|
}) {
|
|
@@ -63,7 +63,7 @@ function b({
|
|
|
63
63
|
...r,
|
|
64
64
|
children: [
|
|
65
65
|
o,
|
|
66
|
-
/* @__PURE__ */ e.jsx(
|
|
66
|
+
/* @__PURE__ */ e.jsx(u, { className: "ml-auto" })
|
|
67
67
|
]
|
|
68
68
|
}
|
|
69
69
|
);
|
|
@@ -146,13 +146,13 @@ function C({
|
|
|
146
146
|
focus:bg-accent focus:text-accent-foreground
|
|
147
147
|
data-disabled:pointer-events-none data-disabled:opacity-50
|
|
148
148
|
data-inset:pl-8
|
|
149
|
-
data-[variant=destructive]:text-destructive
|
|
150
|
-
data-[variant=destructive]:focus:bg-destructive
|
|
151
|
-
data-[variant=destructive]:focus:text-destructive
|
|
152
|
-
dark:data-[variant=destructive]:focus:bg-destructive/
|
|
149
|
+
data-[variant=destructive]:text-destructive-foreground
|
|
150
|
+
data-[variant=destructive]:focus:bg-destructive
|
|
151
|
+
data-[variant=destructive]:focus:text-destructive-foreground
|
|
152
|
+
dark:data-[variant=destructive]:focus:bg-destructive/80
|
|
153
153
|
[&_svg]:pointer-events-none [&_svg]:shrink-0
|
|
154
154
|
[&_svg:not([class*='size-'])]:size-4
|
|
155
|
-
data-[variant=destructive]:*:[svg]:text-destructive!
|
|
155
|
+
data-[variant=destructive]:*:[svg]:text-destructive-foreground!
|
|
156
156
|
`,
|
|
157
157
|
t
|
|
158
158
|
),
|