@clasing/ui 2.8.0 → 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-DBOcqSZb.js → badge-CaH3b0zW.js} +7 -10
- package/dist/components/accordion.js +14 -16
- 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/checkbox.js +13 -15
- package/dist/components/input-otp.js +1 -1
- package/dist/components/input.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-C0PAOim8.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 +46 -32
- 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
|
|
@@ -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,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/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,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
|
}
|
|
@@ -54,7 +54,7 @@ function b({
|
|
|
54
54
|
data-[active=true]:z-10 data-[active=true]:border-ring
|
|
55
55
|
data-[active=true]:ring-[3px] data-[active=true]:ring-ring
|
|
56
56
|
data-[active=true]:aria-invalid:border-destructive-foreground
|
|
57
|
-
data-[active=true]:aria-invalid:ring-
|
|
57
|
+
data-[active=true]:aria-invalid:ring-
|
|
58
58
|
dark:bg-input/30
|
|
59
59
|
dark:data-[active=true]:aria-invalid:ring-destructive-foreground/40
|
|
60
60
|
`,
|
package/dist/components/input.js
CHANGED