@arolariu/components 0.0.11 → 0.0.13
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/cjs/components/ui/alert-dialog.js +1 -1
- package/dist/cjs/components/ui/carousel.js +1 -1
- package/dist/cjs/components/ui/menubar.js +1 -1
- package/dist/cjs/components/ui/pagination.js +1 -1
- package/dist/cjs/components/ui/popover.js +1 -1
- package/dist/cjs/components/ui/scroll-area.js +1 -1
- package/dist/cjs/components/ui/sidebar.js +1 -1
- package/dist/cjs/index.js +1 -1
- package/dist/es/components/ui/accordion.js +50 -8
- package/dist/es/components/ui/alert-dialog.js +118 -22
- package/dist/es/components/ui/alert.js +52 -14
- package/dist/es/components/ui/aspect-ratio.js +4 -2
- package/dist/es/components/ui/avatar.js +42 -6
- package/dist/es/components/ui/badge.js +28 -13
- package/dist/es/components/ui/breadcrumb.js +78 -10
- package/dist/es/components/ui/button.js +37 -21
- package/dist/es/components/ui/calendar.js +52 -29
- package/dist/es/components/ui/card.js +51 -6
- package/dist/es/components/ui/carousel.js +142 -32
- package/dist/es/components/ui/chart.js +169 -42
- package/dist/es/components/ui/checkbox.js +23 -2
- package/dist/es/components/ui/collapsible.js +24 -6
- package/dist/es/components/ui/command.js +136 -18
- package/dist/es/components/ui/context-menu.js +187 -30
- package/dist/es/components/ui/dialog.js +100 -18
- package/dist/es/components/ui/drawer.js +98 -18
- package/dist/es/components/ui/dropdown-menu.js +195 -30
- package/dist/es/components/ui/form.js +59 -8
- package/dist/es/components/ui/hover-card.js +30 -9
- package/dist/es/components/ui/input-otp.js +47 -6
- package/dist/es/components/ui/input.js +14 -1
- package/dist/es/components/ui/label.js +15 -2
- package/dist/es/components/ui/menubar.js +228 -47
- package/dist/es/components/ui/navigation-menu.js +146 -17
- package/dist/es/components/ui/pagination.js +96 -15
- package/dist/es/components/ui/popover.js +33 -10
- package/dist/es/components/ui/progress.js +24 -2
- package/dist/es/components/ui/radio-group.js +35 -4
- package/dist/es/components/ui/resizable.js +36 -6
- package/dist/es/components/ui/scroll-area.js +51 -4
- package/dist/es/components/ui/select.js +143 -22
- package/dist/es/components/ui/separator.js +19 -2
- package/dist/es/components/ui/sheet.js +99 -17
- package/dist/es/components/ui/sidebar.js +512 -112
- package/dist/es/components/ui/skeleton.js +8 -1
- package/dist/es/components/ui/slider.js +56 -4
- package/dist/es/components/ui/sonner.js +15 -7
- package/dist/es/components/ui/switch.js +24 -2
- package/dist/es/components/ui/table.js +87 -9
- package/dist/es/components/ui/tabs.js +54 -8
- package/dist/es/components/ui/textarea.js +11 -1
- package/dist/es/components/ui/toggle-group.js +48 -9
- package/dist/es/components/ui/toggle.js +31 -16
- package/dist/es/components/ui/tooltip.js +45 -11
- package/dist/types/index.d.ts +46 -46
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +12 -2
- package/dist/umd/arolariu-components.umd.js +0 -7
|
@@ -2,50 +2,215 @@ import { jsx as e, jsxs as s } from "react/jsx-runtime";
|
|
|
2
2
|
import * as n from "@radix-ui/react-dropdown-menu";
|
|
3
3
|
import { CheckIcon as u, CircleIcon as i, ChevronRightIcon as l } from "lucide-react";
|
|
4
4
|
import { cn as o } from "../../lib/utils.js";
|
|
5
|
-
function f({
|
|
6
|
-
|
|
5
|
+
function f({
|
|
6
|
+
...t
|
|
7
|
+
}) {
|
|
8
|
+
return /* @__PURE__ */ e(n.Root, { "data-slot": "dropdown-menu", ...t });
|
|
7
9
|
}
|
|
8
|
-
function g({
|
|
9
|
-
|
|
10
|
+
function g({
|
|
11
|
+
...t
|
|
12
|
+
}) {
|
|
13
|
+
return /* @__PURE__ */ e(n.Portal, { "data-slot": "dropdown-menu-portal", ...t });
|
|
10
14
|
}
|
|
11
|
-
function b({
|
|
12
|
-
|
|
15
|
+
function b({
|
|
16
|
+
...t
|
|
17
|
+
}) {
|
|
18
|
+
return /* @__PURE__ */ e(
|
|
19
|
+
n.Trigger,
|
|
20
|
+
{
|
|
21
|
+
"data-slot": "dropdown-menu-trigger",
|
|
22
|
+
...t
|
|
23
|
+
}
|
|
24
|
+
);
|
|
13
25
|
}
|
|
14
|
-
function x({
|
|
15
|
-
|
|
26
|
+
function x({
|
|
27
|
+
className: t,
|
|
28
|
+
sideOffset: a = 4,
|
|
29
|
+
...r
|
|
30
|
+
}) {
|
|
31
|
+
return /* @__PURE__ */ e(n.Portal, { children: /* @__PURE__ */ e(
|
|
32
|
+
n.Content,
|
|
33
|
+
{
|
|
34
|
+
"data-slot": "dropdown-menu-content",
|
|
35
|
+
sideOffset: a,
|
|
36
|
+
className: o(
|
|
37
|
+
"bg-white text-neutral-950 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 z-50 min-w-[8rem] overflow-hidden rounded-md border border-neutral-200 p-1 shadow-md dark:bg-neutral-950 dark:text-neutral-50 dark:border-neutral-800",
|
|
38
|
+
t
|
|
39
|
+
),
|
|
40
|
+
...r
|
|
41
|
+
}
|
|
42
|
+
) });
|
|
16
43
|
}
|
|
17
|
-
function v({
|
|
18
|
-
|
|
44
|
+
function v({
|
|
45
|
+
...t
|
|
46
|
+
}) {
|
|
47
|
+
return /* @__PURE__ */ e(n.Group, { "data-slot": "dropdown-menu-group", ...t });
|
|
19
48
|
}
|
|
20
|
-
function w({
|
|
21
|
-
|
|
49
|
+
function w({
|
|
50
|
+
className: t,
|
|
51
|
+
inset: a,
|
|
52
|
+
variant: r = "default",
|
|
53
|
+
...d
|
|
54
|
+
}) {
|
|
55
|
+
return /* @__PURE__ */ e(
|
|
56
|
+
n.Item,
|
|
57
|
+
{
|
|
58
|
+
"data-slot": "dropdown-menu-item",
|
|
59
|
+
"data-inset": a,
|
|
60
|
+
"data-variant": r,
|
|
61
|
+
className: o(
|
|
62
|
+
"focus:bg-neutral-100 focus:text-neutral-900 data-[variant=destructive]:text-neutral-50 data-[variant=destructive]:focus:bg-red-500/10 dark:data-[variant=destructive]:focus:bg-red-500/40 data-[variant=destructive]:focus:text-neutral-50 data-[variant=destructive]:*:[svg]:!text-destructive-foreground [&_svg:not([class*='text-'])]:text-neutral-500 relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 dark:focus:bg-neutral-800 dark:focus:text-neutral-50 dark:data-[variant=destructive]:text-neutral-50 dark:data-[variant=destructive]:focus:bg-red-900/10 dark:dark:data-[variant=destructive]:focus:bg-red-900/40 dark:data-[variant=destructive]:focus:text-neutral-50 dark:[&_svg:not([class*='text-'])]:text-neutral-400",
|
|
63
|
+
t
|
|
64
|
+
),
|
|
65
|
+
...d
|
|
66
|
+
}
|
|
67
|
+
);
|
|
22
68
|
}
|
|
23
|
-
function h({
|
|
24
|
-
|
|
69
|
+
function h({
|
|
70
|
+
className: t,
|
|
71
|
+
children: a,
|
|
72
|
+
checked: r,
|
|
73
|
+
...d
|
|
74
|
+
}) {
|
|
75
|
+
return /* @__PURE__ */ s(
|
|
76
|
+
n.CheckboxItem,
|
|
77
|
+
{
|
|
78
|
+
"data-slot": "dropdown-menu-checkbox-item",
|
|
79
|
+
className: o(
|
|
80
|
+
"focus:bg-neutral-100 focus:text-neutral-900 relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 dark:focus:bg-neutral-800 dark:focus:text-neutral-50",
|
|
81
|
+
t
|
|
82
|
+
),
|
|
83
|
+
checked: r,
|
|
84
|
+
...d,
|
|
85
|
+
children: [
|
|
86
|
+
/* @__PURE__ */ e("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ e(n.ItemIndicator, { children: /* @__PURE__ */ e(u, { className: "size-4" }) }) }),
|
|
87
|
+
a
|
|
88
|
+
]
|
|
89
|
+
}
|
|
90
|
+
);
|
|
25
91
|
}
|
|
26
|
-
function k({
|
|
27
|
-
|
|
92
|
+
function k({
|
|
93
|
+
...t
|
|
94
|
+
}) {
|
|
95
|
+
return /* @__PURE__ */ e(
|
|
96
|
+
n.RadioGroup,
|
|
97
|
+
{
|
|
98
|
+
"data-slot": "dropdown-menu-radio-group",
|
|
99
|
+
...t
|
|
100
|
+
}
|
|
101
|
+
);
|
|
28
102
|
}
|
|
29
|
-
function z({
|
|
30
|
-
|
|
103
|
+
function z({
|
|
104
|
+
className: t,
|
|
105
|
+
children: a,
|
|
106
|
+
...r
|
|
107
|
+
}) {
|
|
108
|
+
return /* @__PURE__ */ s(
|
|
109
|
+
n.RadioItem,
|
|
110
|
+
{
|
|
111
|
+
"data-slot": "dropdown-menu-radio-item",
|
|
112
|
+
className: o(
|
|
113
|
+
"focus:bg-neutral-100 focus:text-neutral-900 relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 dark:focus:bg-neutral-800 dark:focus:text-neutral-50",
|
|
114
|
+
t
|
|
115
|
+
),
|
|
116
|
+
...r,
|
|
117
|
+
children: [
|
|
118
|
+
/* @__PURE__ */ e("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ e(n.ItemIndicator, { children: /* @__PURE__ */ e(i, { className: "size-2 fill-current" }) }) }),
|
|
119
|
+
a
|
|
120
|
+
]
|
|
121
|
+
}
|
|
122
|
+
);
|
|
31
123
|
}
|
|
32
|
-
function D({
|
|
33
|
-
|
|
124
|
+
function D({
|
|
125
|
+
className: t,
|
|
126
|
+
inset: a,
|
|
127
|
+
...r
|
|
128
|
+
}) {
|
|
129
|
+
return /* @__PURE__ */ e(
|
|
130
|
+
n.Label,
|
|
131
|
+
{
|
|
132
|
+
"data-slot": "dropdown-menu-label",
|
|
133
|
+
"data-inset": a,
|
|
134
|
+
className: o(
|
|
135
|
+
"px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",
|
|
136
|
+
t
|
|
137
|
+
),
|
|
138
|
+
...r
|
|
139
|
+
}
|
|
140
|
+
);
|
|
34
141
|
}
|
|
35
|
-
function M({
|
|
36
|
-
|
|
142
|
+
function M({
|
|
143
|
+
className: t,
|
|
144
|
+
...a
|
|
145
|
+
}) {
|
|
146
|
+
return /* @__PURE__ */ e(
|
|
147
|
+
n.Separator,
|
|
148
|
+
{
|
|
149
|
+
"data-slot": "dropdown-menu-separator",
|
|
150
|
+
className: o("bg-neutral-200 -mx-1 my-1 h-px dark:bg-neutral-800", t),
|
|
151
|
+
...a
|
|
152
|
+
}
|
|
153
|
+
);
|
|
37
154
|
}
|
|
38
|
-
function N({
|
|
39
|
-
|
|
155
|
+
function N({
|
|
156
|
+
className: t,
|
|
157
|
+
...a
|
|
158
|
+
}) {
|
|
159
|
+
return /* @__PURE__ */ e(
|
|
160
|
+
"span",
|
|
161
|
+
{
|
|
162
|
+
"data-slot": "dropdown-menu-shortcut",
|
|
163
|
+
className: o(
|
|
164
|
+
"text-neutral-500 ml-auto text-xs tracking-widest dark:text-neutral-400",
|
|
165
|
+
t
|
|
166
|
+
),
|
|
167
|
+
...a
|
|
168
|
+
}
|
|
169
|
+
);
|
|
40
170
|
}
|
|
41
|
-
function I({
|
|
42
|
-
|
|
171
|
+
function I({
|
|
172
|
+
...t
|
|
173
|
+
}) {
|
|
174
|
+
return /* @__PURE__ */ e(n.Sub, { "data-slot": "dropdown-menu-sub", ...t });
|
|
43
175
|
}
|
|
44
|
-
function y({
|
|
45
|
-
|
|
176
|
+
function y({
|
|
177
|
+
className: t,
|
|
178
|
+
inset: a,
|
|
179
|
+
children: r,
|
|
180
|
+
...d
|
|
181
|
+
}) {
|
|
182
|
+
return /* @__PURE__ */ s(
|
|
183
|
+
n.SubTrigger,
|
|
184
|
+
{
|
|
185
|
+
"data-slot": "dropdown-menu-sub-trigger",
|
|
186
|
+
"data-inset": a,
|
|
187
|
+
className: o(
|
|
188
|
+
"focus:bg-neutral-100 focus:text-neutral-900 data-[state=open]:bg-neutral-100 data-[state=open]:text-neutral-900 flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8 dark:focus:bg-neutral-800 dark:focus:text-neutral-50 dark:data-[state=open]:bg-neutral-800 dark:data-[state=open]:text-neutral-50",
|
|
189
|
+
t
|
|
190
|
+
),
|
|
191
|
+
...d,
|
|
192
|
+
children: [
|
|
193
|
+
r,
|
|
194
|
+
/* @__PURE__ */ e(l, { className: "ml-auto size-4" })
|
|
195
|
+
]
|
|
196
|
+
}
|
|
197
|
+
);
|
|
46
198
|
}
|
|
47
|
-
function _({
|
|
48
|
-
|
|
199
|
+
function _({
|
|
200
|
+
className: t,
|
|
201
|
+
...a
|
|
202
|
+
}) {
|
|
203
|
+
return /* @__PURE__ */ e(
|
|
204
|
+
n.SubContent,
|
|
205
|
+
{
|
|
206
|
+
"data-slot": "dropdown-menu-sub-content",
|
|
207
|
+
className: o(
|
|
208
|
+
"bg-white text-neutral-950 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 z-50 min-w-[8rem] overflow-hidden rounded-md border border-neutral-200 p-1 shadow-lg dark:bg-neutral-950 dark:text-neutral-50 dark:border-neutral-800",
|
|
209
|
+
t
|
|
210
|
+
),
|
|
211
|
+
...a
|
|
212
|
+
}
|
|
213
|
+
);
|
|
49
214
|
}
|
|
50
215
|
export {
|
|
51
216
|
f as DropdownMenu,
|
|
@@ -4,7 +4,11 @@ import { Slot as f } from "@radix-ui/react-slot";
|
|
|
4
4
|
import { FormProvider as u, useFormContext as F, useFormState as x, Controller as I } from "react-hook-form";
|
|
5
5
|
import { cn as i } from "../../lib/utils.js";
|
|
6
6
|
import { Label as p } from "./label.js";
|
|
7
|
-
const S = u, l = s.createContext(
|
|
7
|
+
const S = u, l = s.createContext(
|
|
8
|
+
{}
|
|
9
|
+
), $ = ({
|
|
10
|
+
...t
|
|
11
|
+
}) => /* @__PURE__ */ n(l.Provider, { value: { name: t.name }, children: /* @__PURE__ */ n(I, { ...t }) }), d = () => {
|
|
8
12
|
const t = s.useContext(l), r = s.useContext(c), { getFieldState: e } = F(), o = x({ name: t.name }), a = e(t.name, o);
|
|
9
13
|
if (!t)
|
|
10
14
|
throw new Error("useFormField should be used within <FormField>");
|
|
@@ -17,27 +21,74 @@ const S = u, l = s.createContext({}), $ = ({ ...t }) => n(l.Provider, { value: {
|
|
|
17
21
|
formMessageId: `${m}-form-item-message`,
|
|
18
22
|
...a
|
|
19
23
|
};
|
|
20
|
-
}, c = s.createContext(
|
|
24
|
+
}, c = s.createContext(
|
|
25
|
+
{}
|
|
26
|
+
);
|
|
21
27
|
function D({ className: t, ...r }) {
|
|
22
28
|
const e = s.useId();
|
|
23
|
-
return n(c.Provider, { value: { id: e }, children:
|
|
29
|
+
return /* @__PURE__ */ n(c.Provider, { value: { id: e }, children: /* @__PURE__ */ n(
|
|
30
|
+
"div",
|
|
31
|
+
{
|
|
32
|
+
"data-slot": "form-item",
|
|
33
|
+
className: i("grid gap-2", t),
|
|
34
|
+
...r
|
|
35
|
+
}
|
|
36
|
+
) });
|
|
24
37
|
}
|
|
25
|
-
function M({
|
|
38
|
+
function M({
|
|
39
|
+
className: t,
|
|
40
|
+
...r
|
|
41
|
+
}) {
|
|
26
42
|
const { error: e, formItemId: o } = d();
|
|
27
|
-
return
|
|
43
|
+
return /* @__PURE__ */ n(
|
|
44
|
+
p,
|
|
45
|
+
{
|
|
46
|
+
"data-slot": "form-label",
|
|
47
|
+
"data-error": !!e,
|
|
48
|
+
className: i("data-[error=true]:text-neutral-50 dark:data-[error=true]:text-neutral-50", t),
|
|
49
|
+
htmlFor: o,
|
|
50
|
+
...r
|
|
51
|
+
}
|
|
52
|
+
);
|
|
28
53
|
}
|
|
29
54
|
function N({ ...t }) {
|
|
30
55
|
const { error: r, formItemId: e, formDescriptionId: o, formMessageId: a } = d();
|
|
31
|
-
return
|
|
56
|
+
return /* @__PURE__ */ n(
|
|
57
|
+
f,
|
|
58
|
+
{
|
|
59
|
+
"data-slot": "form-control",
|
|
60
|
+
id: e,
|
|
61
|
+
"aria-describedby": r ? `${o} ${a}` : `${o}`,
|
|
62
|
+
"aria-invalid": !!r,
|
|
63
|
+
...t
|
|
64
|
+
}
|
|
65
|
+
);
|
|
32
66
|
}
|
|
33
67
|
function k({ className: t, ...r }) {
|
|
34
68
|
const { formDescriptionId: e } = d();
|
|
35
|
-
return
|
|
69
|
+
return /* @__PURE__ */ n(
|
|
70
|
+
"p",
|
|
71
|
+
{
|
|
72
|
+
"data-slot": "form-description",
|
|
73
|
+
id: e,
|
|
74
|
+
className: i("text-neutral-500 text-sm dark:text-neutral-400", t),
|
|
75
|
+
...r
|
|
76
|
+
}
|
|
77
|
+
);
|
|
36
78
|
}
|
|
37
79
|
function w({ className: t, ...r }) {
|
|
38
80
|
var m;
|
|
39
81
|
const { error: e, formMessageId: o } = d(), a = e ? String((m = e == null ? void 0 : e.message) != null ? m : "") : r.children;
|
|
40
|
-
return a ?
|
|
82
|
+
return a ? /* @__PURE__ */ n(
|
|
83
|
+
"p",
|
|
84
|
+
{
|
|
85
|
+
"data-slot": "form-message",
|
|
86
|
+
id: o,
|
|
87
|
+
className: i("text-neutral-50 text-sm dark:text-neutral-50", t),
|
|
88
|
+
...r,
|
|
89
|
+
children: a
|
|
90
|
+
}
|
|
91
|
+
) : null;
|
|
41
92
|
}
|
|
42
93
|
export {
|
|
43
94
|
S as Form,
|
|
@@ -1,17 +1,38 @@
|
|
|
1
1
|
import { jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import * as a from "@radix-ui/react-hover-card";
|
|
3
3
|
import { cn as n } from "../../lib/utils.js";
|
|
4
|
-
function
|
|
5
|
-
|
|
4
|
+
function m({
|
|
5
|
+
...t
|
|
6
|
+
}) {
|
|
7
|
+
return /* @__PURE__ */ e(a.Root, { "data-slot": "hover-card", ...t });
|
|
6
8
|
}
|
|
7
|
-
function
|
|
8
|
-
|
|
9
|
+
function l({
|
|
10
|
+
...t
|
|
11
|
+
}) {
|
|
12
|
+
return /* @__PURE__ */ e(a.Trigger, { "data-slot": "hover-card-trigger", ...t });
|
|
9
13
|
}
|
|
10
|
-
function
|
|
11
|
-
|
|
14
|
+
function u({
|
|
15
|
+
className: t,
|
|
16
|
+
align: r = "center",
|
|
17
|
+
sideOffset: o = 4,
|
|
18
|
+
...d
|
|
19
|
+
}) {
|
|
20
|
+
return /* @__PURE__ */ e(
|
|
21
|
+
a.Content,
|
|
22
|
+
{
|
|
23
|
+
"data-slot": "hover-card-content",
|
|
24
|
+
align: r,
|
|
25
|
+
sideOffset: o,
|
|
26
|
+
className: n(
|
|
27
|
+
"bg-white text-neutral-950 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 z-50 w-64 rounded-md border border-neutral-200 p-4 shadow-md outline-hidden dark:bg-neutral-950 dark:text-neutral-50 dark:border-neutral-800",
|
|
28
|
+
t
|
|
29
|
+
),
|
|
30
|
+
...d
|
|
31
|
+
}
|
|
32
|
+
);
|
|
12
33
|
}
|
|
13
34
|
export {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
35
|
+
m as HoverCard,
|
|
36
|
+
u as HoverCardContent,
|
|
37
|
+
l as HoverCardTrigger
|
|
17
38
|
};
|
|
@@ -3,18 +3,59 @@ import * as l from "react";
|
|
|
3
3
|
import { OTPInput as c, OTPInputContext as p } from "input-otp";
|
|
4
4
|
import { MinusIcon as v } from "lucide-react";
|
|
5
5
|
import { cn as e } from "../../lib/utils.js";
|
|
6
|
-
function g({
|
|
7
|
-
|
|
6
|
+
function g({
|
|
7
|
+
className: t,
|
|
8
|
+
containerClassName: r,
|
|
9
|
+
...i
|
|
10
|
+
}) {
|
|
11
|
+
return /* @__PURE__ */ a(
|
|
12
|
+
c,
|
|
13
|
+
{
|
|
14
|
+
"data-slot": "input-otp",
|
|
15
|
+
containerClassName: e(
|
|
16
|
+
"flex items-center gap-2 has-disabled:opacity-50",
|
|
17
|
+
r
|
|
18
|
+
),
|
|
19
|
+
className: e("disabled:cursor-not-allowed", t),
|
|
20
|
+
...i
|
|
21
|
+
}
|
|
22
|
+
);
|
|
8
23
|
}
|
|
9
24
|
function h({ className: t, ...r }) {
|
|
10
|
-
return
|
|
25
|
+
return /* @__PURE__ */ a(
|
|
26
|
+
"div",
|
|
27
|
+
{
|
|
28
|
+
"data-slot": "input-otp-group",
|
|
29
|
+
className: e("flex items-center", t),
|
|
30
|
+
...r
|
|
31
|
+
}
|
|
32
|
+
);
|
|
11
33
|
}
|
|
12
|
-
function O({
|
|
34
|
+
function O({
|
|
35
|
+
index: t,
|
|
36
|
+
className: r,
|
|
37
|
+
...i
|
|
38
|
+
}) {
|
|
13
39
|
const n = l.useContext(p).slots[t], { char: d, hasFakeCaret: o, isActive: s } = n || {};
|
|
14
|
-
return
|
|
40
|
+
return /* @__PURE__ */ u(
|
|
41
|
+
"div",
|
|
42
|
+
{
|
|
43
|
+
"data-slot": "input-otp-slot",
|
|
44
|
+
"data-active": s,
|
|
45
|
+
className: e(
|
|
46
|
+
"border-neutral-200 data-[active=true]:border-neutral-950 data-[active=true]:ring-neutral-950/50 data-[active=true]:aria-invalid:ring-red-500/20 dark:data-[active=true]:aria-invalid:ring-red-500/40 aria-invalid:border-red-500 data-[active=true]:aria-invalid:border-red-500 relative flex h-9 w-9 items-center justify-center border-y border-r text-sm shadow-xs transition-all outline-none first:rounded-l-md first:border-l last:rounded-r-md data-[active=true]:z-10 data-[active=true]:ring-[3px] dark:border-neutral-800 dark:data-[active=true]:border-neutral-300 dark:data-[active=true]:ring-neutral-300/50 dark:data-[active=true]:aria-invalid:ring-red-900/20 dark:dark:data-[active=true]:aria-invalid:ring-red-900/40 dark:aria-invalid:border-red-900 dark:data-[active=true]:aria-invalid:border-red-900",
|
|
47
|
+
r
|
|
48
|
+
),
|
|
49
|
+
...i,
|
|
50
|
+
children: [
|
|
51
|
+
d,
|
|
52
|
+
o && /* @__PURE__ */ a("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ a("div", { className: "animate-caret-blink bg-neutral-950 h-4 w-px duration-1000 dark:bg-neutral-50" }) })
|
|
53
|
+
]
|
|
54
|
+
}
|
|
55
|
+
);
|
|
15
56
|
}
|
|
16
57
|
function P({ ...t }) {
|
|
17
|
-
return a("div", { "data-slot": "input-otp-separator", role: "separator", ...t, children: a(v, {}) });
|
|
58
|
+
return /* @__PURE__ */ a("div", { "data-slot": "input-otp-separator", role: "separator", ...t, children: /* @__PURE__ */ a(v, {}) });
|
|
18
59
|
}
|
|
19
60
|
export {
|
|
20
61
|
g as InputOTP,
|
|
@@ -1,7 +1,20 @@
|
|
|
1
1
|
import { jsx as a } from "react/jsx-runtime";
|
|
2
2
|
import { cn as t } from "../../lib/utils.js";
|
|
3
3
|
function d({ className: e, type: r, ...i }) {
|
|
4
|
-
return
|
|
4
|
+
return /* @__PURE__ */ a(
|
|
5
|
+
"input",
|
|
6
|
+
{
|
|
7
|
+
type: r,
|
|
8
|
+
"data-slot": "input",
|
|
9
|
+
className: t(
|
|
10
|
+
"border-neutral-200 file:text-neutral-950 placeholder:text-neutral-500 selection:bg-neutral-900 selection:text-neutral-50 flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm dark:border-neutral-800 dark:file:text-neutral-50 dark:placeholder:text-neutral-400 dark:selection:bg-neutral-50 dark:selection:text-neutral-900",
|
|
11
|
+
"focus-visible:border-neutral-950 focus-visible:ring-neutral-950/50 focus-visible:ring-[3px] dark:focus-visible:border-neutral-300 dark:focus-visible:ring-neutral-300/50",
|
|
12
|
+
"aria-invalid:ring-red-500/20 dark:aria-invalid:ring-red-500/40 aria-invalid:border-red-500 dark:aria-invalid:ring-red-900/20 dark:dark:aria-invalid:ring-red-900/40 dark:aria-invalid:border-red-900",
|
|
13
|
+
e
|
|
14
|
+
),
|
|
15
|
+
...i
|
|
16
|
+
}
|
|
17
|
+
);
|
|
5
18
|
}
|
|
6
19
|
export {
|
|
7
20
|
d as Input
|
|
@@ -1,8 +1,21 @@
|
|
|
1
1
|
import { jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import * as a from "@radix-ui/react-label";
|
|
3
3
|
import { cn as r } from "../../lib/utils.js";
|
|
4
|
-
function l({
|
|
5
|
-
|
|
4
|
+
function l({
|
|
5
|
+
className: e,
|
|
6
|
+
...t
|
|
7
|
+
}) {
|
|
8
|
+
return /* @__PURE__ */ o(
|
|
9
|
+
a.Root,
|
|
10
|
+
{
|
|
11
|
+
"data-slot": "label",
|
|
12
|
+
className: r(
|
|
13
|
+
"flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",
|
|
14
|
+
e
|
|
15
|
+
),
|
|
16
|
+
...t
|
|
17
|
+
}
|
|
18
|
+
);
|
|
6
19
|
}
|
|
7
20
|
export {
|
|
8
21
|
l as Label
|