laif-ds 0.2.48 → 0.2.50
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/kanban.js +90 -85
- package/dist/components/ui/app-kanban.js +128 -114
- package/dist/components/ui/app-radio-group.js +62 -48
- package/dist/components/ui/app-select.js +93 -90
- package/dist/components/ui/async-select.js +134 -126
- package/dist/components/ui/badge.js +38 -31
- package/dist/components/ui/button.js +49 -40
- package/dist/components/ui/card.js +36 -28
- package/dist/components/ui/checkbox.js +23 -20
- package/dist/components/ui/date-picker.js +64 -59
- package/dist/components/ui/dialog.js +54 -42
- package/dist/components/ui/input.js +116 -111
- package/dist/components/ui/popover.js +15 -13
- package/dist/components/ui/radio-group.js +29 -27
- package/dist/components/ui/select.js +74 -67
- package/dist/components/ui/sheet.js +39 -28
- package/dist/components/ui/slider.js +34 -28
- package/dist/components/ui/switch.js +16 -13
- package/dist/components/ui/tabs.js +35 -26
- package/dist/components/ui/textarea.js +26 -17
- package/dist/index.d.ts +4 -1
- package/dist/lib/design-tokens.js +43 -0
- package/dist/styles.v3.css +1 -1
- package/package.json +1 -1
|
@@ -1,34 +1,35 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as a, jsxs as s } from "react/jsx-runtime";
|
|
3
|
-
import { Root as
|
|
3
|
+
import { Root as u, Content as m, Close as r, Description as f, Title as p, Trigger as x, Portal as v, Overlay as D } from "../../node_modules/@radix-ui/react-dialog/dist/index.js";
|
|
4
|
+
import { designTokens as l } from "../../lib/design-tokens.js";
|
|
4
5
|
import { cn as o } from "../../lib/utils.js";
|
|
5
|
-
import
|
|
6
|
-
function
|
|
6
|
+
import b from "../../node_modules/lucide-react/dist/esm/icons/x.js";
|
|
7
|
+
function j({
|
|
7
8
|
...t
|
|
8
9
|
}) {
|
|
9
|
-
return /* @__PURE__ */ a(
|
|
10
|
+
return /* @__PURE__ */ a(u, { "data-slot": "dialog", ...t });
|
|
10
11
|
}
|
|
11
|
-
function
|
|
12
|
+
function O({
|
|
12
13
|
...t
|
|
13
14
|
}) {
|
|
14
|
-
return /* @__PURE__ */ a(
|
|
15
|
+
return /* @__PURE__ */ a(x, { "data-slot": "dialog-trigger", ...t });
|
|
15
16
|
}
|
|
16
|
-
function
|
|
17
|
+
function h({
|
|
17
18
|
...t
|
|
18
19
|
}) {
|
|
19
|
-
return /* @__PURE__ */ a(
|
|
20
|
+
return /* @__PURE__ */ a(v, { "data-slot": "dialog-portal", ...t });
|
|
20
21
|
}
|
|
21
|
-
function
|
|
22
|
+
function P({
|
|
22
23
|
...t
|
|
23
24
|
}) {
|
|
24
|
-
return /* @__PURE__ */ a(
|
|
25
|
+
return /* @__PURE__ */ a(r, { "data-slot": "dialog-close", ...t });
|
|
25
26
|
}
|
|
26
|
-
function
|
|
27
|
+
function w({
|
|
27
28
|
className: t,
|
|
28
29
|
...e
|
|
29
30
|
}) {
|
|
30
31
|
return /* @__PURE__ */ a(
|
|
31
|
-
|
|
32
|
+
D,
|
|
32
33
|
{
|
|
33
34
|
"data-slot": "dialog-overlay",
|
|
34
35
|
className: o(
|
|
@@ -39,46 +40,57 @@ function h({
|
|
|
39
40
|
}
|
|
40
41
|
);
|
|
41
42
|
}
|
|
42
|
-
function
|
|
43
|
+
function _({
|
|
43
44
|
className: t,
|
|
44
45
|
children: e,
|
|
45
|
-
size:
|
|
46
|
+
size: i = "default",
|
|
46
47
|
closeOnOverlay: d = !0,
|
|
47
|
-
...
|
|
48
|
+
...g
|
|
48
49
|
}) {
|
|
49
|
-
const
|
|
50
|
+
const c = {
|
|
50
51
|
sm: "sm:max-w-sm",
|
|
51
52
|
default: "sm:max-w-lg",
|
|
52
53
|
lg: "sm:max-w-2xl",
|
|
53
54
|
xl: "sm:max-w-3xl"
|
|
54
|
-
}[
|
|
55
|
-
return /* @__PURE__ */ s(
|
|
56
|
-
/* @__PURE__ */ a(
|
|
55
|
+
}[i];
|
|
56
|
+
return /* @__PURE__ */ s(h, { "data-slot": "dialog-portal", children: [
|
|
57
|
+
/* @__PURE__ */ a(w, {}),
|
|
57
58
|
/* @__PURE__ */ s(
|
|
58
|
-
|
|
59
|
+
m,
|
|
59
60
|
{
|
|
60
61
|
"data-slot": "dialog-content",
|
|
61
62
|
onPointerDownOutside: (n) => {
|
|
62
63
|
n.target?.closest("[data-command-portal]") && n.preventDefault(), d || n.preventDefault();
|
|
63
64
|
},
|
|
64
65
|
className: o(
|
|
65
|
-
"bg-d-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 border-d-border fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4
|
|
66
|
-
|
|
66
|
+
"bg-d-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 border-d-border fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 border p-6 shadow-lg duration-200",
|
|
67
|
+
l.radius.lg,
|
|
68
|
+
c,
|
|
67
69
|
t
|
|
68
70
|
),
|
|
69
|
-
...
|
|
71
|
+
...g,
|
|
70
72
|
children: [
|
|
71
73
|
e,
|
|
72
|
-
/* @__PURE__ */ s(
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
74
|
+
/* @__PURE__ */ s(
|
|
75
|
+
r,
|
|
76
|
+
{
|
|
77
|
+
className: o(
|
|
78
|
+
"ring-offset-d-background data-[state=open]:bg-d-accent data-[state=open]:text-d-secondary-foreground bg-d-muted/30 hover:bg-d-muted/60 absolute top-4 right-4 cursor-pointer p-1.5 transition-all hover:opacity-100 disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
79
|
+
l.focusRing,
|
|
80
|
+
l.radius.default
|
|
81
|
+
),
|
|
82
|
+
children: [
|
|
83
|
+
/* @__PURE__ */ a(b, {}),
|
|
84
|
+
/* @__PURE__ */ a("span", { className: "sr-only", children: "Close" })
|
|
85
|
+
]
|
|
86
|
+
}
|
|
87
|
+
)
|
|
76
88
|
]
|
|
77
89
|
}
|
|
78
90
|
)
|
|
79
91
|
] });
|
|
80
92
|
}
|
|
81
|
-
function
|
|
93
|
+
function R({ className: t, ...e }) {
|
|
82
94
|
return /* @__PURE__ */ a(
|
|
83
95
|
"div",
|
|
84
96
|
{
|
|
@@ -88,7 +100,7 @@ function P({ className: t, ...e }) {
|
|
|
88
100
|
}
|
|
89
101
|
);
|
|
90
102
|
}
|
|
91
|
-
function
|
|
103
|
+
function F({ className: t, ...e }) {
|
|
92
104
|
return /* @__PURE__ */ a(
|
|
93
105
|
"div",
|
|
94
106
|
{
|
|
@@ -101,12 +113,12 @@ function _({ className: t, ...e }) {
|
|
|
101
113
|
}
|
|
102
114
|
);
|
|
103
115
|
}
|
|
104
|
-
function
|
|
116
|
+
function H({
|
|
105
117
|
className: t,
|
|
106
118
|
...e
|
|
107
119
|
}) {
|
|
108
120
|
return /* @__PURE__ */ a(
|
|
109
|
-
|
|
121
|
+
p,
|
|
110
122
|
{
|
|
111
123
|
"data-slot": "dialog-title",
|
|
112
124
|
className: o("text-lg leading-none font-semibold", t),
|
|
@@ -114,7 +126,7 @@ function F({
|
|
|
114
126
|
}
|
|
115
127
|
);
|
|
116
128
|
}
|
|
117
|
-
function
|
|
129
|
+
function X({
|
|
118
130
|
className: t,
|
|
119
131
|
...e
|
|
120
132
|
}) {
|
|
@@ -128,14 +140,14 @@ function H({
|
|
|
128
140
|
);
|
|
129
141
|
}
|
|
130
142
|
export {
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
143
|
+
j as Dialog,
|
|
144
|
+
P as DialogClose,
|
|
145
|
+
_ as DialogContent,
|
|
146
|
+
X as DialogDescription,
|
|
147
|
+
F as DialogFooter,
|
|
148
|
+
R as DialogHeader,
|
|
149
|
+
w as DialogOverlay,
|
|
150
|
+
h as DialogPortal,
|
|
151
|
+
H as DialogTitle,
|
|
152
|
+
O as DialogTrigger
|
|
141
153
|
};
|
|
@@ -1,42 +1,47 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as
|
|
3
|
-
import { Label as
|
|
2
|
+
import { jsxs as f, jsx as n } from "react/jsx-runtime";
|
|
3
|
+
import { Label as se } from "./label.js";
|
|
4
|
+
import { designTokens as o } from "../../lib/design-tokens.js";
|
|
4
5
|
import { cn as l } from "../../lib/utils.js";
|
|
5
|
-
import { cva as
|
|
6
|
-
import * as
|
|
7
|
-
import { Icon as
|
|
6
|
+
import { cva as R } from "../../node_modules/class-variance-authority/dist/index.js";
|
|
7
|
+
import * as a from "react";
|
|
8
|
+
import { Icon as N } from "./icon.js";
|
|
8
9
|
import { Typo as te } from "./typo.js";
|
|
9
|
-
const
|
|
10
|
+
const ae = R(
|
|
10
11
|
l(
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
"
|
|
12
|
+
o.input.base,
|
|
13
|
+
o.radius.default,
|
|
14
|
+
"items-center gap-2 px-3",
|
|
15
|
+
// Focus states using the standard ring token but adapted for focus-within
|
|
16
|
+
"focus-within:ring-d-ring/50 focus-within:ring-[3px] focus-within:border-d-ring outline-none",
|
|
17
|
+
o.input.invalid
|
|
14
18
|
),
|
|
15
19
|
{
|
|
16
20
|
variants: {
|
|
17
21
|
size: {
|
|
18
|
-
default:
|
|
19
|
-
sm:
|
|
20
|
-
lg:
|
|
22
|
+
default: o.sizes.default,
|
|
23
|
+
sm: o.sizes.sm,
|
|
24
|
+
lg: o.sizes.lg
|
|
21
25
|
}
|
|
22
26
|
},
|
|
23
27
|
defaultVariants: {
|
|
24
28
|
size: "default"
|
|
25
29
|
}
|
|
26
30
|
}
|
|
27
|
-
), re =
|
|
31
|
+
), re = R(
|
|
28
32
|
l(
|
|
29
|
-
|
|
33
|
+
o.text.base,
|
|
34
|
+
"shadow-none flex-1 min-w-0 bg-transparent outline-none border-0 p-0 overflow-hidden text-ellipsis",
|
|
30
35
|
"file:text-d-foreground file:inline-flex file:border-0 file:bg-transparent file:text-sm file:font-medium",
|
|
31
|
-
|
|
36
|
+
o.text.placeholder,
|
|
32
37
|
"selection:bg-d-primary selection:text-d-primary-foreground",
|
|
33
|
-
|
|
38
|
+
o.interaction.disabled,
|
|
34
39
|
"[-webkit-autofill]:shadow-[0_0_0_1000px_transparent_inset] [-webkit-autofill]:[-webkit-text-fill-color:inherit]"
|
|
35
40
|
),
|
|
36
41
|
{
|
|
37
42
|
variants: {
|
|
38
43
|
size: {
|
|
39
|
-
default: "
|
|
44
|
+
default: "file:h-7",
|
|
40
45
|
sm: "text-xs file:h-6",
|
|
41
46
|
lg: "text-lg file:h-8"
|
|
42
47
|
}
|
|
@@ -45,158 +50,158 @@ const se = A(
|
|
|
45
50
|
size: "default"
|
|
46
51
|
}
|
|
47
52
|
}
|
|
48
|
-
),
|
|
53
|
+
), m = {
|
|
49
54
|
show: "Mostra password",
|
|
50
55
|
hide: "Nascondi password"
|
|
51
|
-
},
|
|
56
|
+
}, fe = a.forwardRef(
|
|
52
57
|
({
|
|
53
|
-
className:
|
|
54
|
-
type:
|
|
55
|
-
label:
|
|
56
|
-
labelClassName:
|
|
57
|
-
id:
|
|
58
|
-
iconLeft:
|
|
59
|
-
iconRight:
|
|
58
|
+
className: W,
|
|
59
|
+
type: p,
|
|
60
|
+
label: T,
|
|
61
|
+
labelClassName: D,
|
|
62
|
+
id: G,
|
|
63
|
+
iconLeft: v,
|
|
64
|
+
iconRight: M,
|
|
60
65
|
startContent: S,
|
|
61
|
-
endContent:
|
|
62
|
-
size:
|
|
66
|
+
endContent: E,
|
|
67
|
+
size: g,
|
|
63
68
|
disabled: d,
|
|
64
|
-
required:
|
|
65
|
-
onBlur:
|
|
66
|
-
onChange:
|
|
67
|
-
onInvalid:
|
|
68
|
-
"aria-invalid":
|
|
69
|
-
"aria-describedby":
|
|
69
|
+
required: C,
|
|
70
|
+
onBlur: O,
|
|
71
|
+
onChange: _,
|
|
72
|
+
onInvalid: z,
|
|
73
|
+
"aria-invalid": F,
|
|
74
|
+
"aria-describedby": H,
|
|
70
75
|
showValidMessage: P = !1,
|
|
71
76
|
showValidityMessage: B = !1,
|
|
72
77
|
validityI18n: e,
|
|
73
|
-
|
|
74
|
-
},
|
|
75
|
-
const [
|
|
76
|
-
|
|
77
|
-
const
|
|
78
|
-
(
|
|
78
|
+
...$
|
|
79
|
+
}, J) => {
|
|
80
|
+
const [u, K] = a.useState(!1), [h, k] = a.useState(!0), [Q, L] = a.useState(!1), [U, V] = a.useState(""), X = a.useId(), w = G ?? X, j = `${w}-validity`, x = a.useRef(null), b = p === "password", Y = b ? u ? "text" : "password" : p, A = F ?? (!h && Q ? !0 : void 0), Z = [H, B && j].filter(Boolean).join(" ").trim() || void 0;
|
|
81
|
+
a.useImperativeHandle(J, () => x.current);
|
|
82
|
+
const q = a.useCallback(
|
|
83
|
+
(t) => {
|
|
79
84
|
if (d) return;
|
|
80
|
-
const
|
|
81
|
-
if (
|
|
82
|
-
const
|
|
83
|
-
|
|
85
|
+
const s = t.target;
|
|
86
|
+
if (s.tagName === "INPUT" || s.tagName === "BUTTON") return;
|
|
87
|
+
const r = x.current;
|
|
88
|
+
r && (r.focus(), !b && p !== "file" && r.select());
|
|
84
89
|
},
|
|
85
|
-
[d,
|
|
86
|
-
),
|
|
87
|
-
(
|
|
88
|
-
const
|
|
89
|
-
if (
|
|
90
|
+
[d, b, p]
|
|
91
|
+
), c = a.useCallback(
|
|
92
|
+
(t) => {
|
|
93
|
+
const s = t.validity, r = t.validationMessage !== "" ? t.validationMessage : "✓";
|
|
94
|
+
if (s.valid)
|
|
90
95
|
return {
|
|
91
96
|
isValid: !0,
|
|
92
|
-
message: P ? e?.valid ??
|
|
97
|
+
message: P ? e?.valid ?? r : ""
|
|
93
98
|
};
|
|
94
99
|
if (!e)
|
|
95
|
-
return { isValid: !1, message:
|
|
96
|
-
let
|
|
97
|
-
return
|
|
100
|
+
return { isValid: !1, message: r };
|
|
101
|
+
let i = r;
|
|
102
|
+
return s.valueMissing && e.valueMissing ? i = e.valueMissing : s.typeMismatch && e.typeMismatch ? i = e.typeMismatch : s.patternMismatch && e.patternMismatch ? i = e.patternMismatch : s.tooLong && e.tooLong ? i = e.tooLong : s.tooShort && e.tooShort ? i = e.tooShort : s.rangeUnderflow && e.rangeUnderflow ? i = e.rangeUnderflow : s.rangeOverflow && e.rangeOverflow ? i = e.rangeOverflow : s.badInput && e.badInput ? i = e.badInput : s.stepMismatch && e.stepMismatch ? i = e.stepMismatch : s.customError && e.customError && (i = e.customError), { isValid: !1, message: i };
|
|
98
103
|
},
|
|
99
104
|
[P, e]
|
|
100
105
|
);
|
|
101
|
-
|
|
102
|
-
if (
|
|
103
|
-
const { isValid:
|
|
104
|
-
|
|
106
|
+
a.useEffect(() => {
|
|
107
|
+
if (x.current) {
|
|
108
|
+
const { isValid: t, message: s } = c(x.current);
|
|
109
|
+
k(t), V(s);
|
|
105
110
|
}
|
|
106
|
-
}, [
|
|
107
|
-
const
|
|
108
|
-
(
|
|
111
|
+
}, [c]);
|
|
112
|
+
const y = a.useCallback(
|
|
113
|
+
(t) => {
|
|
109
114
|
L(!0);
|
|
110
|
-
const { isValid:
|
|
111
|
-
|
|
115
|
+
const { isValid: s, message: r } = c(t.currentTarget);
|
|
116
|
+
k(s), V(r), _?.(t);
|
|
112
117
|
},
|
|
113
|
-
[
|
|
114
|
-
),
|
|
115
|
-
(
|
|
116
|
-
L(!0),
|
|
118
|
+
[_, c]
|
|
119
|
+
), I = a.useCallback(
|
|
120
|
+
(t) => {
|
|
121
|
+
L(!0), O?.(t);
|
|
117
122
|
},
|
|
118
|
-
[
|
|
119
|
-
),
|
|
120
|
-
(
|
|
121
|
-
const { isValid:
|
|
122
|
-
|
|
123
|
+
[O, c]
|
|
124
|
+
), ee = a.useCallback(
|
|
125
|
+
(t) => {
|
|
126
|
+
const { isValid: s, message: r } = c(t.currentTarget);
|
|
127
|
+
k(s), V(r), z?.(t);
|
|
123
128
|
},
|
|
124
|
-
[
|
|
129
|
+
[z, c]
|
|
125
130
|
);
|
|
126
|
-
return /* @__PURE__ */
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
!h && /* @__PURE__ */
|
|
131
|
+
return /* @__PURE__ */ f("div", { className: l("flex flex-col gap-1.5", W), children: [
|
|
132
|
+
T && /* @__PURE__ */ f(se, { htmlFor: w, className: l("gap-0.5", D), children: [
|
|
133
|
+
T,
|
|
134
|
+
C && h && /* @__PURE__ */ n("div", { children: "*" }),
|
|
135
|
+
!h && /* @__PURE__ */ n("div", { className: "text-d-destructive", children: "*" })
|
|
131
136
|
] }),
|
|
132
|
-
/* @__PURE__ */
|
|
137
|
+
/* @__PURE__ */ f(
|
|
133
138
|
"div",
|
|
134
139
|
{
|
|
135
140
|
className: l(
|
|
136
|
-
|
|
141
|
+
ae({ size: g }),
|
|
137
142
|
d ? "cursor-not-allowed opacity-50" : "cursor-text"
|
|
138
143
|
),
|
|
139
|
-
"aria-invalid":
|
|
140
|
-
onClick:
|
|
144
|
+
"aria-invalid": A,
|
|
145
|
+
onClick: q,
|
|
141
146
|
children: [
|
|
142
|
-
(
|
|
143
|
-
|
|
147
|
+
(v || S) && /* @__PURE__ */ f("div", { className: "text-d-muted-foreground flex shrink-0 items-center gap-2", children: [
|
|
148
|
+
v && /* @__PURE__ */ n(N, { name: v, size: g === "lg" ? "sm" : "xs" }),
|
|
144
149
|
S
|
|
145
150
|
] }),
|
|
146
|
-
/* @__PURE__ */
|
|
151
|
+
/* @__PURE__ */ n(
|
|
147
152
|
"input",
|
|
148
153
|
{
|
|
149
154
|
id: w,
|
|
150
|
-
type:
|
|
155
|
+
type: Y,
|
|
151
156
|
"data-slot": "input",
|
|
152
|
-
className: l(re({ size:
|
|
153
|
-
ref:
|
|
157
|
+
className: l(re({ size: g })),
|
|
158
|
+
ref: x,
|
|
154
159
|
disabled: d,
|
|
155
|
-
onChange:
|
|
156
|
-
onBlur:
|
|
157
|
-
onInvalid:
|
|
158
|
-
"aria-invalid":
|
|
159
|
-
"aria-describedby":
|
|
160
|
-
required:
|
|
161
|
-
step:
|
|
162
|
-
|
|
160
|
+
onChange: y,
|
|
161
|
+
onBlur: I,
|
|
162
|
+
onInvalid: ee,
|
|
163
|
+
"aria-invalid": A,
|
|
164
|
+
"aria-describedby": Z,
|
|
165
|
+
required: C,
|
|
166
|
+
step: p === "number" ? "any" : void 0,
|
|
167
|
+
...$
|
|
163
168
|
}
|
|
164
169
|
),
|
|
165
|
-
|
|
170
|
+
b ? /* @__PURE__ */ f(
|
|
166
171
|
"button",
|
|
167
172
|
{
|
|
168
173
|
type: "button",
|
|
169
|
-
onClick: (
|
|
170
|
-
|
|
174
|
+
onClick: (t) => {
|
|
175
|
+
t.stopPropagation(), t.preventDefault(), K((s) => !s);
|
|
171
176
|
},
|
|
172
177
|
className: l(
|
|
173
178
|
"text-d-muted-foreground flex shrink-0 cursor-pointer items-center",
|
|
174
179
|
d && "cursor-not-allowed"
|
|
175
180
|
),
|
|
176
|
-
"aria-label":
|
|
177
|
-
"aria-pressed":
|
|
181
|
+
"aria-label": u ? m.hide : m.show,
|
|
182
|
+
"aria-pressed": u,
|
|
178
183
|
"aria-controls": w,
|
|
179
|
-
title:
|
|
184
|
+
title: u ? m.hide : m.show,
|
|
180
185
|
disabled: d,
|
|
181
186
|
children: [
|
|
182
|
-
/* @__PURE__ */
|
|
183
|
-
|
|
187
|
+
/* @__PURE__ */ n(
|
|
188
|
+
N,
|
|
184
189
|
{
|
|
185
|
-
name:
|
|
186
|
-
size:
|
|
190
|
+
name: u ? "EyeOff" : "Eye",
|
|
191
|
+
size: g === "lg" ? "sm" : "xs"
|
|
187
192
|
}
|
|
188
193
|
),
|
|
189
|
-
/* @__PURE__ */
|
|
194
|
+
/* @__PURE__ */ n("span", { className: "sr-only", children: u ? m.hide : m.show })
|
|
190
195
|
]
|
|
191
196
|
}
|
|
192
|
-
) : (
|
|
193
|
-
|
|
194
|
-
|
|
197
|
+
) : (M || E) && /* @__PURE__ */ f("div", { className: "text-d-muted-foreground flex shrink-0 items-center gap-2", children: [
|
|
198
|
+
E,
|
|
199
|
+
M && /* @__PURE__ */ n(N, { name: M, size: g === "lg" ? "sm" : "xs" })
|
|
195
200
|
] })
|
|
196
201
|
]
|
|
197
202
|
}
|
|
198
203
|
),
|
|
199
|
-
B && U.length > 0 && /* @__PURE__ */
|
|
204
|
+
B && U.length > 0 && /* @__PURE__ */ n(
|
|
200
205
|
te,
|
|
201
206
|
{
|
|
202
207
|
variant: "caption",
|
|
@@ -214,6 +219,6 @@ const se = A(
|
|
|
214
219
|
}
|
|
215
220
|
);
|
|
216
221
|
export {
|
|
217
|
-
|
|
222
|
+
fe as Input,
|
|
218
223
|
re as inputVariants
|
|
219
224
|
};
|
|
@@ -1,23 +1,24 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as t } from "react/jsx-runtime";
|
|
3
|
-
import { Root as
|
|
4
|
-
import {
|
|
5
|
-
|
|
3
|
+
import { Root as d, Portal as i, Content as s, Trigger as p } from "../../node_modules/@radix-ui/react-popover/dist/index.js";
|
|
4
|
+
import { designTokens as m } from "../../lib/design-tokens.js";
|
|
5
|
+
import { cn as f } from "../../lib/utils.js";
|
|
6
|
+
function v({
|
|
6
7
|
...o
|
|
7
8
|
}) {
|
|
8
|
-
return /* @__PURE__ */ t(
|
|
9
|
+
return /* @__PURE__ */ t(d, { "data-slot": "popover", ...o });
|
|
9
10
|
}
|
|
10
|
-
function
|
|
11
|
+
function b({
|
|
11
12
|
...o
|
|
12
13
|
}) {
|
|
13
14
|
return /* @__PURE__ */ t(p, { "data-slot": "popover-trigger", ...o });
|
|
14
15
|
}
|
|
15
|
-
function
|
|
16
|
+
function h({
|
|
16
17
|
className: o,
|
|
17
18
|
align: e = "center",
|
|
18
19
|
sideOffset: r = 4,
|
|
19
20
|
container: a,
|
|
20
|
-
...
|
|
21
|
+
...n
|
|
21
22
|
}) {
|
|
22
23
|
return /* @__PURE__ */ t(i, { container: a, children: /* @__PURE__ */ t(
|
|
23
24
|
s,
|
|
@@ -25,16 +26,17 @@ function v({
|
|
|
25
26
|
"data-slot": "popover-content",
|
|
26
27
|
align: e,
|
|
27
28
|
sideOffset: r,
|
|
28
|
-
className:
|
|
29
|
-
"bg-d-popover text-d-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 border-d-border z-[60] w-72 origin-(--radix-popover-content-transform-origin)
|
|
29
|
+
className: f(
|
|
30
|
+
"bg-d-popover text-d-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 border-d-border z-[60] w-72 origin-(--radix-popover-content-transform-origin) border p-4 shadow-md outline-hidden",
|
|
31
|
+
m.radius.default,
|
|
30
32
|
o
|
|
31
33
|
),
|
|
32
|
-
...
|
|
34
|
+
...n
|
|
33
35
|
}
|
|
34
36
|
) });
|
|
35
37
|
}
|
|
36
38
|
export {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
39
|
+
v as Popover,
|
|
40
|
+
h as PopoverContent,
|
|
41
|
+
b as PopoverTrigger
|
|
40
42
|
};
|
|
@@ -1,50 +1,52 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as
|
|
3
|
-
import { Root as
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
3
|
+
import { Root as d, Item as s, Indicator as n } from "../../node_modules/@radix-ui/react-radio-group/dist/index.js";
|
|
4
|
+
import { designTokens as o } from "../../lib/design-tokens.js";
|
|
5
|
+
import { cn as a } from "../../lib/utils.js";
|
|
6
|
+
import l from "../../node_modules/lucide-react/dist/esm/icons/circle.js";
|
|
7
|
+
function g({
|
|
8
|
+
className: e,
|
|
8
9
|
...r
|
|
9
10
|
}) {
|
|
10
|
-
return /* @__PURE__ */
|
|
11
|
-
|
|
11
|
+
return /* @__PURE__ */ t(
|
|
12
|
+
d,
|
|
12
13
|
{
|
|
13
14
|
"data-slot": "radio-group",
|
|
14
|
-
className:
|
|
15
|
+
className: a("grid gap-3", e),
|
|
15
16
|
...r
|
|
16
17
|
}
|
|
17
18
|
);
|
|
18
19
|
}
|
|
19
|
-
function
|
|
20
|
-
className:
|
|
20
|
+
function h({
|
|
21
|
+
className: e,
|
|
21
22
|
disabled: r,
|
|
22
23
|
...i
|
|
23
24
|
}) {
|
|
24
|
-
return /* @__PURE__ */
|
|
25
|
-
|
|
25
|
+
return /* @__PURE__ */ t(
|
|
26
|
+
s,
|
|
26
27
|
{
|
|
27
28
|
"data-slot": "radio-group-item",
|
|
28
29
|
disabled: r,
|
|
29
|
-
className:
|
|
30
|
-
"text-d-primary aspect-square size-4 shrink-0 cursor-pointer
|
|
31
|
-
|
|
32
|
-
|
|
30
|
+
className: a(
|
|
31
|
+
"text-d-primary aspect-square size-4 shrink-0 cursor-pointer border shadow-xs transition-[color,box-shadow] outline-none",
|
|
32
|
+
o.radius.full,
|
|
33
|
+
o.focusRing,
|
|
33
34
|
// Red border when not selected, default border when selected
|
|
34
|
-
"data-[state=unchecked]:border-d-foreground data-[state=checked]:border-d-primary
|
|
35
|
-
|
|
36
|
-
o
|
|
35
|
+
"data-[state=unchecked]:border-d-foreground data-[state=checked]:border-d-primary",
|
|
36
|
+
"aria-invalid:ring-d-destructive/20 aria-invalid:border-d-destructive",
|
|
37
|
+
o.interaction.disabled,
|
|
38
|
+
e
|
|
37
39
|
),
|
|
38
40
|
...i,
|
|
39
|
-
children: /* @__PURE__ */
|
|
40
|
-
|
|
41
|
+
children: /* @__PURE__ */ t(
|
|
42
|
+
n,
|
|
41
43
|
{
|
|
42
44
|
"data-slot": "radio-group-indicator",
|
|
43
45
|
className: "relative flex items-center justify-center",
|
|
44
|
-
children: /* @__PURE__ */
|
|
45
|
-
|
|
46
|
+
children: /* @__PURE__ */ t(
|
|
47
|
+
l,
|
|
46
48
|
{
|
|
47
|
-
className:
|
|
49
|
+
className: a(
|
|
48
50
|
"fill-d-primary absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2",
|
|
49
51
|
r && "fill-d-muted-foreground"
|
|
50
52
|
)
|
|
@@ -56,6 +58,6 @@ function f({
|
|
|
56
58
|
);
|
|
57
59
|
}
|
|
58
60
|
export {
|
|
59
|
-
|
|
60
|
-
|
|
61
|
+
g as RadioGroup,
|
|
62
|
+
h as RadioGroupItem
|
|
61
63
|
};
|