@clasing/ui 2.8.0 → 2.9.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/{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/calendar.js +42 -38
- 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,23 +1,23 @@
|
|
|
1
1
|
import { j as n, c as e } from "../index-C_XDkVGm.js";
|
|
2
2
|
import * as i from "react";
|
|
3
|
-
import { getDefaultClassNames as
|
|
4
|
-
import { b as
|
|
3
|
+
import { getDefaultClassNames as m, DayPicker as x } from "react-day-picker";
|
|
4
|
+
import { b as f, 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,
|
|
8
8
|
classNames: g,
|
|
9
|
-
showOutsideDays:
|
|
9
|
+
showOutsideDays: r = !0,
|
|
10
10
|
captionLayout: s = "label",
|
|
11
11
|
buttonVariant: l = "ghost",
|
|
12
12
|
formatters: u,
|
|
13
|
-
components:
|
|
14
|
-
...
|
|
13
|
+
components: b,
|
|
14
|
+
...p
|
|
15
15
|
}) {
|
|
16
|
-
const t =
|
|
16
|
+
const t = m();
|
|
17
17
|
return /* @__PURE__ */ n.jsx(
|
|
18
18
|
x,
|
|
19
19
|
{
|
|
20
|
-
showOutsideDays:
|
|
20
|
+
showOutsideDays: r,
|
|
21
21
|
className: e(
|
|
22
22
|
`
|
|
23
23
|
group/calendar bg-background p-3 [--cell-size:--spacing(8)]
|
|
@@ -30,7 +30,7 @@ function C({
|
|
|
30
30
|
),
|
|
31
31
|
captionLayout: s,
|
|
32
32
|
formatters: {
|
|
33
|
-
formatMonthDropdown: (
|
|
33
|
+
formatMonthDropdown: (a) => a.toLocaleString("default", { month: "short" }),
|
|
34
34
|
...u
|
|
35
35
|
},
|
|
36
36
|
classNames: {
|
|
@@ -51,7 +51,7 @@ function C({
|
|
|
51
51
|
t.nav
|
|
52
52
|
),
|
|
53
53
|
button_previous: e(
|
|
54
|
-
|
|
54
|
+
f({ size: "sm", variant: l }),
|
|
55
55
|
`
|
|
56
56
|
size-(--cell-size) p-0 select-none
|
|
57
57
|
aria-disabled:opacity-50
|
|
@@ -59,7 +59,7 @@ function C({
|
|
|
59
59
|
t.button_previous
|
|
60
60
|
),
|
|
61
61
|
button_next: e(
|
|
62
|
-
|
|
62
|
+
f({ size: "sm", variant: l }),
|
|
63
63
|
`
|
|
64
64
|
size-(--cell-size) p-0 select-none
|
|
65
65
|
aria-disabled:opacity-50
|
|
@@ -155,7 +155,7 @@ function C({
|
|
|
155
155
|
},
|
|
156
156
|
components: {
|
|
157
157
|
Root: ({
|
|
158
|
-
className:
|
|
158
|
+
className: a,
|
|
159
159
|
rootRef: d,
|
|
160
160
|
...o
|
|
161
161
|
}) => /* @__PURE__ */ n.jsx(
|
|
@@ -163,73 +163,77 @@ function C({
|
|
|
163
163
|
{
|
|
164
164
|
"data-slot": "calendar",
|
|
165
165
|
ref: d,
|
|
166
|
-
className: e(
|
|
166
|
+
className: e(a),
|
|
167
167
|
...o
|
|
168
168
|
}
|
|
169
169
|
),
|
|
170
|
-
Chevron: ({ className:
|
|
170
|
+
Chevron: ({ className: a, orientation: d, ...o }) => d === "left" ? /* @__PURE__ */ n.jsx(w, { className: e(a), ...o }) : d === "right" ? /* @__PURE__ */ n.jsx(_, { className: e(a), ...o }) : /* @__PURE__ */ n.jsx(y, { ...o }),
|
|
171
171
|
DayButton: v,
|
|
172
|
-
WeekNumber: ({ children:
|
|
172
|
+
WeekNumber: ({ children: a, ...d }) => /* @__PURE__ */ n.jsx("td", { ...d, children: /* @__PURE__ */ n.jsx(
|
|
173
173
|
"div",
|
|
174
174
|
{
|
|
175
175
|
className: `\r
|
|
176
176
|
flex size-(--cell-size) items-center justify-center\r
|
|
177
177
|
text-center\r
|
|
178
178
|
`,
|
|
179
|
-
children:
|
|
179
|
+
children: a
|
|
180
180
|
}
|
|
181
181
|
) }),
|
|
182
|
-
...
|
|
182
|
+
...b
|
|
183
183
|
},
|
|
184
|
-
...
|
|
184
|
+
...p
|
|
185
185
|
}
|
|
186
186
|
);
|
|
187
187
|
}
|
|
188
188
|
function v({
|
|
189
189
|
className: c,
|
|
190
190
|
day: g,
|
|
191
|
-
modifiers:
|
|
191
|
+
modifiers: r,
|
|
192
192
|
...s
|
|
193
193
|
}) {
|
|
194
|
-
const l =
|
|
194
|
+
const l = m(), u = i.useRef(null);
|
|
195
195
|
return i.useEffect(() => {
|
|
196
|
-
|
|
197
|
-
}, [
|
|
196
|
+
r.focused && u.current?.focus();
|
|
197
|
+
}, [r.focused]), /* @__PURE__ */ n.jsx(
|
|
198
198
|
h,
|
|
199
199
|
{
|
|
200
200
|
ref: u,
|
|
201
201
|
variant: "ghost",
|
|
202
202
|
size: "xs",
|
|
203
203
|
"data-day": g.date.toLocaleDateString(),
|
|
204
|
-
"data-selected-single":
|
|
205
|
-
"data-range-start":
|
|
206
|
-
"data-range-end":
|
|
207
|
-
"data-range-middle":
|
|
204
|
+
"data-selected-single": r.selected && !r.range_start && !r.range_end && !r.range_middle,
|
|
205
|
+
"data-range-start": r.range_start,
|
|
206
|
+
"data-range-end": r.range_end,
|
|
207
|
+
"data-range-middle": r.range_middle,
|
|
208
208
|
className: e(
|
|
209
209
|
`
|
|
210
210
|
flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1
|
|
211
|
-
|
|
211
|
+
p-1 leading-none font-regular
|
|
212
212
|
group-data-[focused=true]/day:relative
|
|
213
213
|
group-data-[focused=true]/day:z-10
|
|
214
214
|
group-data-[focused=true]/day:border-ring
|
|
215
215
|
group-data-[focused=true]/day:ring-[3px]
|
|
216
216
|
group-data-[focused=true]/day:ring-ring/50
|
|
217
|
-
|
|
218
|
-
data-[range-end=true]:rounded-r-md data-[range-end=true]:bg-blue-500
|
|
217
|
+
before:rounded-md before:bg-transparent
|
|
219
218
|
data-[range-end=true]:text-white
|
|
220
|
-
data-[range-end=true]:
|
|
221
|
-
data-[range-
|
|
222
|
-
data-[range-
|
|
219
|
+
data-[range-end=true]:before:rounded-md
|
|
220
|
+
data-[range-end=true]:before:rounded-l-none
|
|
221
|
+
data-[range-end=true]:before:rounded-r-md
|
|
222
|
+
data-[range-end=true]:before:bg-blue-500
|
|
223
|
+
data-[range-end=true]:hover:before:bg-blue-500/80
|
|
223
224
|
data-[range-middle=true]:text-blue-800
|
|
224
|
-
data-[range-
|
|
225
|
-
data-[range-
|
|
226
|
-
data-[range-start=true]:
|
|
227
|
-
data-[range-start=true]:
|
|
228
|
-
data-[range-start=true]:
|
|
229
|
-
data-[
|
|
225
|
+
data-[range-middle=true]:before:rounded-none
|
|
226
|
+
data-[range-middle=true]:before:bg-blue-500/10
|
|
227
|
+
data-[range-start=true]:text-white
|
|
228
|
+
data-[range-start=true]:before:rounded-md
|
|
229
|
+
data-[range-start=true]:before:rounded-l-md
|
|
230
|
+
data-[range-start=true]:before:rounded-r-none
|
|
231
|
+
data-[range-start=true]:before:bg-blue-500
|
|
232
|
+
data-[range-start=true]:hover:before:bg-blue-500/80
|
|
230
233
|
data-[selected-single=true]:text-white
|
|
231
|
-
data-[selected-single=true]:
|
|
234
|
+
data-[selected-single=true]:before:bg-blue-500
|
|
232
235
|
data-[selected-single=true]:hover:text-white
|
|
236
|
+
data-[selected-single=true]:hover:before:bg-blue-500/80
|
|
233
237
|
dark:hover:text-accent-foreground
|
|
234
238
|
dark:data-[range-middle=true]:text-blue-050
|
|
235
239
|
[&>span]:paragraph-xs [&>span]:opacity-70
|
|
@@ -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