@awsmbiz/inbis-ui 0.1.0 → 0.2.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/README.md +58 -5
- package/dist/index.d.ts +44 -5
- package/dist/index.js +308 -65
- package/dist/index.js.map +1 -1
- package/package.json +4 -3
- package/styles/globals.css +176 -111
package/dist/index.js
CHANGED
|
@@ -1,17 +1,60 @@
|
|
|
1
|
+
import * as React from "react";
|
|
1
2
|
import { useId, useMemo } from "react";
|
|
2
|
-
import { cva } from "class-variance-authority";
|
|
3
3
|
import { cn, cn as cn$1 } from "cn";
|
|
4
|
-
import {
|
|
5
|
-
import { AlertDialog as AlertDialog$1, Checkbox as Checkbox$1, Dialog as Dialog$1, DropdownMenu as DropdownMenu$1, Label as Label$1, Separator as Separator$1, Slot, Switch as Switch$1, Tabs as Tabs$1, Tooltip as Tooltip$1 } from "radix-ui";
|
|
4
|
+
import { Accordion as Accordion$1, AlertDialog as AlertDialog$1, Avatar as Avatar$1, Checkbox as Checkbox$1, Dialog as Dialog$1, DropdownMenu as DropdownMenu$1, Label as Label$1, Progress as Progress$1, RadioGroup as RadioGroup$1, Separator as Separator$1, Slot, Switch as Switch$1, Tabs as Tabs$1, Tooltip as Tooltip$1 } from "radix-ui";
|
|
6
5
|
import { CheckIcon, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, CircleCheckIcon, InfoIcon, Loader2Icon, MoreHorizontalIcon, OctagonXIcon, TriangleAlertIcon, XIcon } from "lucide-react";
|
|
6
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
+
import { cva } from "class-variance-authority";
|
|
7
8
|
import { Toaster as Toaster$1, toast } from "sonner";
|
|
8
9
|
import { zodResolver } from "@hookform/resolvers/zod";
|
|
9
10
|
import { FormProvider, useController, useForm, useFormState } from "react-hook-form";
|
|
11
|
+
// src/components/accordion.tsx
|
|
12
|
+
function Accordion({ ...props }) {
|
|
13
|
+
return /* @__PURE__ */ jsx(Accordion$1.Root, {
|
|
14
|
+
"data-slot": "accordion",
|
|
15
|
+
...props
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
function AccordionItem({ className, ...props }) {
|
|
19
|
+
return /* @__PURE__ */ jsx(Accordion$1.Item, {
|
|
20
|
+
"data-slot": "accordion-item",
|
|
21
|
+
className: cn$1("border-b border-border last:border-b-0", className),
|
|
22
|
+
...props
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
function AccordionTrigger({ className, children, ...props }) {
|
|
26
|
+
return /* @__PURE__ */ jsx(Accordion$1.Header, {
|
|
27
|
+
className: "flex",
|
|
28
|
+
children: /* @__PURE__ */ jsxs(Accordion$1.Trigger, {
|
|
29
|
+
"data-slot": "accordion-trigger",
|
|
30
|
+
className: cn$1("flex flex-1 items-center justify-between gap-3 rounded-sm py-4 text-left text-[15px] leading-5 font-semibold text-foreground outline-none focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-solid focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>svg]:rotate-180", className),
|
|
31
|
+
...props,
|
|
32
|
+
children: [children, /* @__PURE__ */ jsx(ChevronDownIcon, {
|
|
33
|
+
"aria-hidden": "true",
|
|
34
|
+
className: "pointer-events-none size-4 shrink-0 text-muted-foreground transition-transform duration-150"
|
|
35
|
+
})]
|
|
36
|
+
})
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
function AccordionContent({ className, children, ...props }) {
|
|
40
|
+
return /* @__PURE__ */ jsx(Accordion$1.Content, {
|
|
41
|
+
"data-slot": "accordion-content",
|
|
42
|
+
className: "overflow-hidden text-sm leading-[22px] text-muted-foreground data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",
|
|
43
|
+
...props,
|
|
44
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
45
|
+
className: cn$1("pb-4", className),
|
|
46
|
+
children
|
|
47
|
+
})
|
|
48
|
+
});
|
|
49
|
+
}
|
|
10
50
|
// src/components/alert.tsx
|
|
11
|
-
const alertVariants = cva("group/alert relative grid w-full gap-0.5 rounded-
|
|
51
|
+
const alertVariants = cva("group/alert relative grid w-full gap-0.5 rounded-md border px-4 py-3 text-left text-sm has-data-[slot=alert-action]:relative has-data-[slot=alert-action]:pr-18 has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-2.5 *:[svg]:row-span-2 *:[svg]:translate-y-0.5 *:[svg]:text-current *:[svg:not([class*='size-'])]:size-4", {
|
|
12
52
|
variants: { variant: {
|
|
13
53
|
default: "bg-card text-card-foreground",
|
|
14
|
-
|
|
54
|
+
success: "border-transparent bg-success-soft text-success-soft-foreground *:data-[slot=alert-description]:text-success-soft-foreground",
|
|
55
|
+
warning: "border-transparent bg-warning-soft text-warning-soft-foreground *:data-[slot=alert-description]:text-warning-soft-foreground",
|
|
56
|
+
info: "border-transparent bg-info-soft text-info-soft-foreground *:data-[slot=alert-description]:text-info-soft-foreground",
|
|
57
|
+
destructive: "border-transparent bg-destructive-soft text-destructive-soft-foreground *:data-[slot=alert-description]:text-destructive-soft-foreground"
|
|
15
58
|
} },
|
|
16
59
|
defaultVariants: { variant: "default" }
|
|
17
60
|
});
|
|
@@ -45,25 +88,25 @@ function AlertAction({ className, ...props }) {
|
|
|
45
88
|
});
|
|
46
89
|
}
|
|
47
90
|
// src/components/button.tsx
|
|
48
|
-
const buttonVariants = cva("group/button inline-flex shrink-0 items-center justify-center rounded-
|
|
91
|
+
const buttonVariants = cva("group/button inline-flex shrink-0 items-center justify-center rounded-full border border-transparent bg-clip-padding text-sm font-semibold whitespace-nowrap transition-colors duration-150 outline-none select-none focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-solid focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", {
|
|
49
92
|
variants: {
|
|
50
93
|
variant: {
|
|
51
|
-
default: "bg-primary text-primary-foreground hover:
|
|
52
|
-
outline: "border-
|
|
94
|
+
default: "bg-primary text-primary-foreground hover:opacity-90",
|
|
95
|
+
outline: "border-input bg-transparent hover:bg-accent hover:text-accent-foreground aria-expanded:bg-accent aria-expanded:text-accent-foreground",
|
|
53
96
|
secondary: "bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)] aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",
|
|
54
|
-
ghost: "hover:bg-
|
|
55
|
-
destructive: "bg-destructive
|
|
97
|
+
ghost: "hover:bg-accent hover:text-accent-foreground aria-expanded:bg-accent aria-expanded:text-accent-foreground",
|
|
98
|
+
destructive: "bg-destructive text-destructive-foreground hover:opacity-90",
|
|
56
99
|
link: "text-primary underline-offset-4 hover:underline"
|
|
57
100
|
},
|
|
58
101
|
size: {
|
|
59
|
-
default: "h-
|
|
60
|
-
xs: "h-6 gap-1
|
|
61
|
-
sm: "h-
|
|
62
|
-
lg: "h-
|
|
63
|
-
icon: "size-
|
|
64
|
-
"icon-xs": "size-6
|
|
65
|
-
"icon-sm": "size-
|
|
66
|
-
"icon-lg": "size-
|
|
102
|
+
default: "h-10 gap-1.5 px-[18px] has-data-[icon=inline-end]:pr-4 has-data-[icon=inline-start]:pl-4",
|
|
103
|
+
xs: "h-6 gap-1 px-2.5 text-xs has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2 [&_svg:not([class*='size-'])]:size-3",
|
|
104
|
+
sm: "h-[34px] gap-1 px-3.5 text-[13px] has-data-[icon=inline-end]:pr-3 has-data-[icon=inline-start]:pl-3 [&_svg:not([class*='size-'])]:size-3.5",
|
|
105
|
+
lg: "h-[46px] gap-2 px-[22px] text-[15px] has-data-[icon=inline-end]:pr-5 has-data-[icon=inline-start]:pl-5",
|
|
106
|
+
icon: "size-10",
|
|
107
|
+
"icon-xs": "size-6 [&_svg:not([class*='size-'])]:size-3",
|
|
108
|
+
"icon-sm": "size-[34px]",
|
|
109
|
+
"icon-lg": "size-[46px]"
|
|
67
110
|
}
|
|
68
111
|
},
|
|
69
112
|
defaultVariants: {
|
|
@@ -115,7 +158,7 @@ function AlertDialogContent({ className, size = "default", ...props }) {
|
|
|
115
158
|
return /* @__PURE__ */ jsxs(AlertDialogPortal, { children: [/* @__PURE__ */ jsx(AlertDialogOverlay, {}), /* @__PURE__ */ jsx(AlertDialog$1.Content, {
|
|
116
159
|
"data-slot": "alert-dialog-content",
|
|
117
160
|
"data-size": size,
|
|
118
|
-
className: cn$1("group/alert-dialog-content fixed top-1/2 left-1/2 z-50 grid max-h-[calc(100%-2rem)] w-full overflow-y-auto -translate-x-1/2 -translate-y-1/2 gap-
|
|
161
|
+
className: cn$1("group/alert-dialog-content fixed top-1/2 left-1/2 z-50 grid max-h-[calc(100%-2rem)] w-full overflow-y-auto -translate-x-1/2 -translate-y-1/2 gap-5 rounded-xl border border-border bg-popover p-6 text-popover-foreground shadow-(--shadow-float) duration-100 outline-none data-[size=default]:max-w-xs data-[size=sm]:max-w-xs data-[size=default]:sm:max-w-[480px] data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", className),
|
|
119
162
|
...props
|
|
120
163
|
})] });
|
|
121
164
|
}
|
|
@@ -129,7 +172,7 @@ function AlertDialogHeader({ className, ...props }) {
|
|
|
129
172
|
function AlertDialogFooter({ className, ...props }) {
|
|
130
173
|
return /* @__PURE__ */ jsx("div", {
|
|
131
174
|
"data-slot": "alert-dialog-footer",
|
|
132
|
-
className: cn$1("
|
|
175
|
+
className: cn$1("flex flex-col-reverse gap-2 group-data-[size=sm]/alert-dialog-content:grid group-data-[size=sm]/alert-dialog-content:grid-cols-2 sm:flex-row sm:justify-end", className),
|
|
133
176
|
...props
|
|
134
177
|
});
|
|
135
178
|
}
|
|
@@ -143,7 +186,7 @@ function AlertDialogMedia({ className, ...props }) {
|
|
|
143
186
|
function AlertDialogTitle({ className, ...props }) {
|
|
144
187
|
return /* @__PURE__ */ jsx(AlertDialog$1.Title, {
|
|
145
188
|
"data-slot": "alert-dialog-title",
|
|
146
|
-
className: cn$1("font-heading text-
|
|
189
|
+
className: cn$1("font-heading text-xl leading-7 font-semibold tracking-[-0.015em] sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2", className),
|
|
147
190
|
...props
|
|
148
191
|
});
|
|
149
192
|
}
|
|
@@ -178,14 +221,62 @@ function AlertDialogCancel({ className, variant = "outline", size = "default", .
|
|
|
178
221
|
})
|
|
179
222
|
});
|
|
180
223
|
}
|
|
224
|
+
// src/components/avatar.tsx
|
|
225
|
+
const SIZES = {
|
|
226
|
+
xs: "size-6 text-[10px]",
|
|
227
|
+
sm: "size-8 text-xs",
|
|
228
|
+
default: "size-10 text-sm",
|
|
229
|
+
lg: "size-12 text-base"
|
|
230
|
+
};
|
|
231
|
+
function Avatar({ className, size = "default", ...props }) {
|
|
232
|
+
return /* @__PURE__ */ jsx(Avatar$1.Root, {
|
|
233
|
+
"data-slot": "avatar",
|
|
234
|
+
"data-size": size,
|
|
235
|
+
className: cn$1("relative flex shrink-0 overflow-hidden rounded-full font-semibold select-none", SIZES[size], className),
|
|
236
|
+
...props
|
|
237
|
+
});
|
|
238
|
+
}
|
|
239
|
+
function AvatarImage({ className, ...props }) {
|
|
240
|
+
return /* @__PURE__ */ jsx(Avatar$1.Image, {
|
|
241
|
+
"data-slot": "avatar-image",
|
|
242
|
+
className: cn$1("aspect-square size-full object-cover", className),
|
|
243
|
+
...props
|
|
244
|
+
});
|
|
245
|
+
}
|
|
246
|
+
function AvatarFallback({ className, ...props }) {
|
|
247
|
+
return /* @__PURE__ */ jsx(Avatar$1.Fallback, {
|
|
248
|
+
"data-slot": "avatar-fallback",
|
|
249
|
+
className: cn$1("flex size-full items-center justify-center rounded-full bg-secondary text-foreground", className),
|
|
250
|
+
...props
|
|
251
|
+
});
|
|
252
|
+
}
|
|
253
|
+
function AvatarGroup({ className, children, max, size = "default", ...props }) {
|
|
254
|
+
const avatars = React.Children.toArray(children);
|
|
255
|
+
const shown = max === void 0 ? avatars : avatars.slice(0, max);
|
|
256
|
+
const overflow = avatars.length - shown.length;
|
|
257
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
258
|
+
role: "group",
|
|
259
|
+
"data-slot": "avatar-group",
|
|
260
|
+
className: cn$1("flex items-center -space-x-2.5 *:data-[slot=avatar]:ring-2 *:data-[slot=avatar]:ring-card", className),
|
|
261
|
+
...props,
|
|
262
|
+
children: [shown, overflow > 0 && /* @__PURE__ */ jsxs("span", {
|
|
263
|
+
"data-slot": "avatar",
|
|
264
|
+
className: cn$1("relative flex shrink-0 items-center justify-center rounded-full bg-primary font-semibold text-primary-foreground", SIZES[size]),
|
|
265
|
+
children: ["+", overflow]
|
|
266
|
+
})]
|
|
267
|
+
});
|
|
268
|
+
}
|
|
181
269
|
// src/components/badge.tsx
|
|
182
|
-
const badgeVariants = cva("group/badge inline-flex h-
|
|
270
|
+
const badgeVariants = cva("group/badge inline-flex h-6 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-full border border-transparent px-2.5 text-xs font-semibold whitespace-nowrap transition-colors duration-150 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-solid focus-visible:outline-ring has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2 aria-invalid:border-destructive [&>svg]:pointer-events-none [&>svg]:size-3!", {
|
|
183
271
|
variants: { variant: {
|
|
184
|
-
default: "bg-primary text-primary-foreground [a]:hover:
|
|
185
|
-
secondary: "bg-secondary text-secondary-foreground [a]:hover:bg-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
272
|
+
default: "bg-primary text-primary-foreground [a]:hover:opacity-90",
|
|
273
|
+
secondary: "bg-secondary text-secondary-foreground [a]:hover:bg-accent",
|
|
274
|
+
success: "bg-success-soft text-success-soft-foreground",
|
|
275
|
+
warning: "bg-warning-soft text-warning-soft-foreground",
|
|
276
|
+
info: "bg-info-soft text-info-soft-foreground",
|
|
277
|
+
destructive: "bg-destructive-soft text-destructive-soft-foreground",
|
|
278
|
+
outline: "border-input text-foreground [a]:hover:bg-accent",
|
|
279
|
+
ghost: "hover:bg-accent hover:text-accent-foreground",
|
|
189
280
|
link: "text-primary underline-offset-4 hover:underline"
|
|
190
281
|
} },
|
|
191
282
|
defaultVariants: { variant: "default" }
|
|
@@ -199,33 +290,95 @@ function Badge({ className, variant = "default", asChild = false, ...props }) {
|
|
|
199
290
|
...props
|
|
200
291
|
});
|
|
201
292
|
}
|
|
293
|
+
// src/components/breadcrumb.tsx
|
|
294
|
+
function Breadcrumb({ "aria-label": label = "Breadcrumb", ...props }) {
|
|
295
|
+
return /* @__PURE__ */ jsx("nav", {
|
|
296
|
+
"aria-label": label,
|
|
297
|
+
"data-slot": "breadcrumb",
|
|
298
|
+
...props
|
|
299
|
+
});
|
|
300
|
+
}
|
|
301
|
+
function BreadcrumbList({ className, ...props }) {
|
|
302
|
+
return /* @__PURE__ */ jsx("ol", {
|
|
303
|
+
"data-slot": "breadcrumb-list",
|
|
304
|
+
className: cn$1("flex flex-wrap items-center gap-2 text-[13px] leading-[19px] break-words text-muted-foreground", className),
|
|
305
|
+
...props
|
|
306
|
+
});
|
|
307
|
+
}
|
|
308
|
+
function BreadcrumbItem({ className, ...props }) {
|
|
309
|
+
return /* @__PURE__ */ jsx("li", {
|
|
310
|
+
"data-slot": "breadcrumb-item",
|
|
311
|
+
className: cn$1("inline-flex items-center gap-2", className),
|
|
312
|
+
...props
|
|
313
|
+
});
|
|
314
|
+
}
|
|
315
|
+
function BreadcrumbLink({ asChild, className, ...props }) {
|
|
316
|
+
const Comp = asChild ? Slot.Root : "a";
|
|
317
|
+
return /* @__PURE__ */ jsx(Comp, {
|
|
318
|
+
"data-slot": "breadcrumb-link",
|
|
319
|
+
className: cn$1("rounded-sm underline-offset-4 transition-colors hover:text-foreground hover:underline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-solid focus-visible:outline-ring", className),
|
|
320
|
+
...props
|
|
321
|
+
});
|
|
322
|
+
}
|
|
323
|
+
function BreadcrumbPage({ className, ...props }) {
|
|
324
|
+
return /* @__PURE__ */ jsx("span", {
|
|
325
|
+
"data-slot": "breadcrumb-page",
|
|
326
|
+
"aria-current": "page",
|
|
327
|
+
className: cn$1("font-medium text-foreground", className),
|
|
328
|
+
...props
|
|
329
|
+
});
|
|
330
|
+
}
|
|
331
|
+
function BreadcrumbSeparator({ children, className, ...props }) {
|
|
332
|
+
return /* @__PURE__ */ jsx("li", {
|
|
333
|
+
"data-slot": "breadcrumb-separator",
|
|
334
|
+
role: "presentation",
|
|
335
|
+
"aria-hidden": "true",
|
|
336
|
+
className: cn$1("select-none", className),
|
|
337
|
+
...props,
|
|
338
|
+
children: children ?? "/"
|
|
339
|
+
});
|
|
340
|
+
}
|
|
341
|
+
function BreadcrumbEllipsis({ className, label = "More", ...props }) {
|
|
342
|
+
return /* @__PURE__ */ jsxs("span", {
|
|
343
|
+
"data-slot": "breadcrumb-ellipsis",
|
|
344
|
+
className: cn$1("flex size-5 items-center justify-center", className),
|
|
345
|
+
...props,
|
|
346
|
+
children: [/* @__PURE__ */ jsx(MoreHorizontalIcon, {
|
|
347
|
+
"aria-hidden": "true",
|
|
348
|
+
className: "size-4"
|
|
349
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
350
|
+
className: "sr-only",
|
|
351
|
+
children: label
|
|
352
|
+
})]
|
|
353
|
+
});
|
|
354
|
+
}
|
|
202
355
|
// src/components/card.tsx
|
|
203
356
|
function Card({ className, size = "default", ...props }) {
|
|
204
357
|
return /* @__PURE__ */ jsx("div", {
|
|
205
358
|
"data-slot": "card",
|
|
206
359
|
"data-size": size,
|
|
207
|
-
className: cn$1("group/card flex flex-col gap-
|
|
360
|
+
className: cn$1("group/card flex flex-col gap-5 overflow-hidden rounded-2xl border border-border bg-card py-(--card-spacing) text-sm text-card-foreground shadow-(--shadow-card) [--card-spacing:--spacing(6)] data-[size=sm]:gap-3 has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:[--card-spacing:--spacing(4)] data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-2xl *:[img:last-child]:rounded-b-2xl", className),
|
|
208
361
|
...props
|
|
209
362
|
});
|
|
210
363
|
}
|
|
211
364
|
function CardHeader({ className, ...props }) {
|
|
212
365
|
return /* @__PURE__ */ jsx("div", {
|
|
213
366
|
"data-slot": "card-header",
|
|
214
|
-
className: cn$1("group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-
|
|
367
|
+
className: cn$1("group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-2xl px-(--card-spacing) has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-(--card-spacing)", className),
|
|
215
368
|
...props
|
|
216
369
|
});
|
|
217
370
|
}
|
|
218
371
|
function CardTitle({ className, ...props }) {
|
|
219
372
|
return /* @__PURE__ */ jsx("div", {
|
|
220
373
|
"data-slot": "card-title",
|
|
221
|
-
className: cn$1("font-heading text-
|
|
374
|
+
className: cn$1("font-heading text-[17px] leading-snug font-semibold tracking-[-0.01em] group-data-[size=sm]/card:text-[15px]", className),
|
|
222
375
|
...props
|
|
223
376
|
});
|
|
224
377
|
}
|
|
225
378
|
function CardDescription({ className, ...props }) {
|
|
226
379
|
return /* @__PURE__ */ jsx("div", {
|
|
227
380
|
"data-slot": "card-description",
|
|
228
|
-
className: cn$1("text-
|
|
381
|
+
className: cn$1("text-[13px] text-muted-foreground", className),
|
|
229
382
|
...props
|
|
230
383
|
});
|
|
231
384
|
}
|
|
@@ -246,7 +399,7 @@ function CardContent({ className, ...props }) {
|
|
|
246
399
|
function CardFooter({ className, ...props }) {
|
|
247
400
|
return /* @__PURE__ */ jsx("div", {
|
|
248
401
|
"data-slot": "card-footer",
|
|
249
|
-
className: cn$1("flex items-center rounded-b-
|
|
402
|
+
className: cn$1("flex items-center rounded-b-2xl border-t bg-muted/50 p-(--card-spacing)", className),
|
|
250
403
|
...props
|
|
251
404
|
});
|
|
252
405
|
}
|
|
@@ -254,7 +407,7 @@ function CardFooter({ className, ...props }) {
|
|
|
254
407
|
function Checkbox({ className, ...props }) {
|
|
255
408
|
return /* @__PURE__ */ jsx(Checkbox$1.Root, {
|
|
256
409
|
"data-slot": "checkbox",
|
|
257
|
-
className: cn$1("peer relative flex size-
|
|
410
|
+
className: cn$1("peer relative flex size-[18px] shrink-0 items-center justify-center rounded-[5px] border border-input bg-surface-raised transition-colors duration-150 outline-none group-has-disabled/field:opacity-50 group-has-[:focus-visible]/field-label:ring-0 group-has-[:focus-visible]/field-label:not-data-checked:border-input after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-solid focus-visible:outline-ring disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:aria-checked:border-primary data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground group-has-[:focus-visible]/field-label:data-checked:border-primary", className),
|
|
258
411
|
...props,
|
|
259
412
|
children: /* @__PURE__ */ jsx(Checkbox$1.Indicator, {
|
|
260
413
|
"data-slot": "checkbox-indicator",
|
|
@@ -298,14 +451,14 @@ function DialogOverlay({ className, ...props }) {
|
|
|
298
451
|
function DialogContent({ className, children, showCloseButton = true, ...props }) {
|
|
299
452
|
return /* @__PURE__ */ jsxs(DialogPortal, { children: [/* @__PURE__ */ jsx(DialogOverlay, {}), /* @__PURE__ */ jsxs(Dialog$1.Content, {
|
|
300
453
|
"data-slot": "dialog-content",
|
|
301
|
-
className: cn$1("fixed top-1/2 left-1/2 z-50 grid max-h-[calc(100%-2rem)] w-full max-w-[calc(100%-2rem)] overflow-y-auto -translate-x-1/2 -translate-y-1/2 gap-
|
|
454
|
+
className: cn$1("fixed top-1/2 left-1/2 z-50 grid max-h-[calc(100%-2rem)] w-full max-w-[calc(100%-2rem)] overflow-y-auto -translate-x-1/2 -translate-y-1/2 gap-5 rounded-xl border border-border bg-popover p-6 text-sm text-popover-foreground shadow-(--shadow-float) duration-100 outline-none sm:max-w-[480px] data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", className),
|
|
302
455
|
...props,
|
|
303
456
|
children: [children, showCloseButton && /* @__PURE__ */ jsx(Dialog$1.Close, {
|
|
304
457
|
"data-slot": "dialog-close",
|
|
305
458
|
asChild: true,
|
|
306
459
|
children: /* @__PURE__ */ jsxs(Button, {
|
|
307
460
|
variant: "ghost",
|
|
308
|
-
className: "absolute top-
|
|
461
|
+
className: "absolute top-4 right-4",
|
|
309
462
|
size: "icon-sm",
|
|
310
463
|
children: [/* @__PURE__ */ jsx(XIcon, {}), /* @__PURE__ */ jsx("span", {
|
|
311
464
|
className: "sr-only",
|
|
@@ -325,7 +478,7 @@ function DialogHeader({ className, ...props }) {
|
|
|
325
478
|
function DialogFooter({ className, showCloseButton = false, children, ...props }) {
|
|
326
479
|
return /* @__PURE__ */ jsxs("div", {
|
|
327
480
|
"data-slot": "dialog-footer",
|
|
328
|
-
className: cn$1("
|
|
481
|
+
className: cn$1("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", className),
|
|
329
482
|
...props,
|
|
330
483
|
children: [children, showCloseButton && /* @__PURE__ */ jsx(Dialog$1.Close, {
|
|
331
484
|
asChild: true,
|
|
@@ -339,7 +492,7 @@ function DialogFooter({ className, showCloseButton = false, children, ...props }
|
|
|
339
492
|
function DialogTitle({ className, ...props }) {
|
|
340
493
|
return /* @__PURE__ */ jsx(Dialog$1.Title, {
|
|
341
494
|
"data-slot": "dialog-title",
|
|
342
|
-
className: cn$1("font-heading text-
|
|
495
|
+
className: cn$1("font-heading text-xl leading-7 font-semibold tracking-[-0.015em]", className),
|
|
343
496
|
...props
|
|
344
497
|
});
|
|
345
498
|
}
|
|
@@ -375,7 +528,7 @@ function DropdownMenuContent({ className, align = "start", sideOffset = 4, ...pr
|
|
|
375
528
|
"data-slot": "dropdown-menu-content",
|
|
376
529
|
sideOffset,
|
|
377
530
|
align,
|
|
378
|
-
className: cn$1("z-50 max-h-(--radix-dropdown-menu-content-available-height) w-(--radix-dropdown-menu-trigger-width) min-w-32 origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-
|
|
531
|
+
className: cn$1("z-50 max-h-(--radix-dropdown-menu-content-available-height) w-(--radix-dropdown-menu-trigger-width) min-w-32 origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border border-border bg-popover p-1 text-popover-foreground shadow-(--shadow-popover) duration-100 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 data-[state=closed]:overflow-hidden data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", className),
|
|
379
532
|
...props
|
|
380
533
|
});
|
|
381
534
|
}
|
|
@@ -390,7 +543,7 @@ function DropdownMenuItem({ className, inset, variant = "default", ...props }) {
|
|
|
390
543
|
"data-slot": "dropdown-menu-item",
|
|
391
544
|
"data-inset": inset,
|
|
392
545
|
"data-variant": variant,
|
|
393
|
-
className: cn$1("group/dropdown-menu-item relative flex cursor-default items-center gap-1.5 rounded-
|
|
546
|
+
className: cn$1("group/dropdown-menu-item relative flex cursor-default items-center gap-1.5 rounded-sm px-2.5 py-2 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive-soft data-[variant=destructive]:focus:text-destructive-soft-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive", className),
|
|
394
547
|
...props
|
|
395
548
|
});
|
|
396
549
|
}
|
|
@@ -398,7 +551,7 @@ function DropdownMenuCheckboxItem({ className, children, checked, inset, ...prop
|
|
|
398
551
|
return /* @__PURE__ */ jsxs(DropdownMenu$1.CheckboxItem, {
|
|
399
552
|
"data-slot": "dropdown-menu-checkbox-item",
|
|
400
553
|
"data-inset": inset,
|
|
401
|
-
className: cn$1("relative flex cursor-default items-center gap-1.5 rounded-
|
|
554
|
+
className: cn$1("relative flex cursor-default items-center gap-1.5 rounded-sm py-2 pr-8 pl-2.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
|
|
402
555
|
checked,
|
|
403
556
|
...props,
|
|
404
557
|
children: [/* @__PURE__ */ jsx("span", {
|
|
@@ -418,7 +571,7 @@ function DropdownMenuRadioItem({ className, children, inset, ...props }) {
|
|
|
418
571
|
return /* @__PURE__ */ jsxs(DropdownMenu$1.RadioItem, {
|
|
419
572
|
"data-slot": "dropdown-menu-radio-item",
|
|
420
573
|
"data-inset": inset,
|
|
421
|
-
className: cn$1("relative flex cursor-default items-center gap-1.5 rounded-
|
|
574
|
+
className: cn$1("relative flex cursor-default items-center gap-1.5 rounded-sm py-2 pr-8 pl-2.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
|
|
422
575
|
...props,
|
|
423
576
|
children: [/* @__PURE__ */ jsx("span", {
|
|
424
577
|
className: "pointer-events-none absolute right-2 flex items-center justify-center",
|
|
@@ -431,7 +584,7 @@ function DropdownMenuLabel({ className, inset, ...props }) {
|
|
|
431
584
|
return /* @__PURE__ */ jsx(DropdownMenu$1.Label, {
|
|
432
585
|
"data-slot": "dropdown-menu-label",
|
|
433
586
|
"data-inset": inset,
|
|
434
|
-
className: cn$1("px-
|
|
587
|
+
className: cn$1("px-2.5 py-1.5 text-xs font-medium text-muted-foreground data-inset:pl-7", className),
|
|
435
588
|
...props
|
|
436
589
|
});
|
|
437
590
|
}
|
|
@@ -459,7 +612,7 @@ function DropdownMenuSubTrigger({ className, inset, children, ...props }) {
|
|
|
459
612
|
return /* @__PURE__ */ jsxs(DropdownMenu$1.SubTrigger, {
|
|
460
613
|
"data-slot": "dropdown-menu-sub-trigger",
|
|
461
614
|
"data-inset": inset,
|
|
462
|
-
className: cn$1("flex cursor-default items-center gap-1.5 rounded-
|
|
615
|
+
className: cn$1("flex cursor-default items-center gap-1.5 rounded-sm px-2.5 py-2 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7 data-open:bg-accent data-open:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
|
|
463
616
|
...props,
|
|
464
617
|
children: [children, /* @__PURE__ */ jsx(ChevronRightIcon, { className: "ml-auto" })]
|
|
465
618
|
});
|
|
@@ -467,7 +620,7 @@ function DropdownMenuSubTrigger({ className, inset, children, ...props }) {
|
|
|
467
620
|
function DropdownMenuSubContent({ className, ...props }) {
|
|
468
621
|
return /* @__PURE__ */ jsx(DropdownMenu$1.SubContent, {
|
|
469
622
|
"data-slot": "dropdown-menu-sub-content",
|
|
470
|
-
className: cn$1("z-50 min-w-[96px] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-
|
|
623
|
+
className: cn$1("z-50 min-w-[96px] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border border-border bg-popover p-1 text-popover-foreground shadow-(--shadow-popover) duration-100 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 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", className),
|
|
471
624
|
...props
|
|
472
625
|
});
|
|
473
626
|
}
|
|
@@ -539,7 +692,7 @@ function FieldContent({ className, ...props }) {
|
|
|
539
692
|
function FieldLabel({ className, ...props }) {
|
|
540
693
|
return /* @__PURE__ */ jsx(Label, {
|
|
541
694
|
"data-slot": "field-label",
|
|
542
|
-
className: cn$1("group/field-label peer/field-label flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:opacity-50 has-data-checked:border-primary/30 has-data-checked:bg-primary/5 has-[>[data-slot=field]]:rounded-lg has-[>[data-slot=field]]:border has-[>[data-slot=field]]:not-has-[:disabled,[data-disabled]]:hover:bg-muted/50 has-[>[data-slot=field]]:has-[:focus-visible]:
|
|
695
|
+
className: cn$1("group/field-label peer/field-label flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:opacity-50 has-data-checked:border-primary/30 has-data-checked:bg-primary/5 has-[>[data-slot=field]]:rounded-lg has-[>[data-slot=field]]:border has-[>[data-slot=field]]:not-has-[:disabled,[data-disabled]]:hover:bg-muted/50 has-[>[data-slot=field]]:has-[:focus-visible]:outline-2 has-[>[data-slot=field]]:has-[:focus-visible]:outline-offset-2 has-[>[data-slot=field]]:has-[:focus-visible]:outline-solid has-[>[data-slot=field]]:has-[:focus-visible]:outline-ring *:data-[slot=field]:p-2.5 dark:has-data-checked:border-primary/20 dark:has-data-checked:bg-primary/10", "has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col", className),
|
|
543
696
|
...props
|
|
544
697
|
});
|
|
545
698
|
}
|
|
@@ -595,7 +748,7 @@ function Input({ className, type, ...props }) {
|
|
|
595
748
|
return /* @__PURE__ */ jsx("input", {
|
|
596
749
|
type,
|
|
597
750
|
"data-slot": "input",
|
|
598
|
-
className: cn$1("h-
|
|
751
|
+
className: cn$1("h-10 w-full min-w-0 rounded-md border border-input bg-surface-raised px-3.5 py-2 text-base transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-solid focus-visible:outline-ring disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-muted disabled:opacity-50 aria-invalid:border-destructive md:text-sm", className),
|
|
599
752
|
...props
|
|
600
753
|
});
|
|
601
754
|
}
|
|
@@ -681,10 +834,10 @@ function NativeSelect({ className, size = "default", ...props }) {
|
|
|
681
834
|
children: [/* @__PURE__ */ jsx("select", {
|
|
682
835
|
"data-slot": "native-select",
|
|
683
836
|
"data-size": size,
|
|
684
|
-
className: "h-
|
|
837
|
+
className: "h-10 w-full min-w-0 appearance-none rounded-md border border-input bg-surface-raised py-2 pr-9 pl-3.5 text-sm transition-colors outline-none select-none selection:bg-primary selection:text-primary-foreground placeholder:text-muted-foreground focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-solid focus-visible:outline-ring disabled:pointer-events-none disabled:cursor-not-allowed aria-invalid:border-destructive data-[size=sm]:h-[34px] data-[size=sm]:py-1",
|
|
685
838
|
...props
|
|
686
839
|
}), /* @__PURE__ */ jsx(ChevronDownIcon, {
|
|
687
|
-
className: "pointer-events-none absolute top-1/2 right-
|
|
840
|
+
className: "pointer-events-none absolute top-1/2 right-3 size-4 -translate-y-1/2 text-muted-foreground select-none",
|
|
688
841
|
"aria-hidden": "true",
|
|
689
842
|
"data-slot": "native-select-icon"
|
|
690
843
|
})]
|
|
@@ -704,6 +857,40 @@ function NativeSelectOptGroup({ className, ...props }) {
|
|
|
704
857
|
...props
|
|
705
858
|
});
|
|
706
859
|
}
|
|
860
|
+
// src/components/progress.tsx
|
|
861
|
+
function Progress({ className, value, ...props }) {
|
|
862
|
+
return /* @__PURE__ */ jsx(Progress$1.Root, {
|
|
863
|
+
"data-slot": "progress",
|
|
864
|
+
value,
|
|
865
|
+
className: cn$1("relative h-2 w-full overflow-hidden rounded-full bg-muted", className),
|
|
866
|
+
...props,
|
|
867
|
+
children: /* @__PURE__ */ jsx(Progress$1.Indicator, {
|
|
868
|
+
"data-slot": "progress-indicator",
|
|
869
|
+
className: "h-full w-full flex-1 rounded-full bg-primary transition-transform duration-200",
|
|
870
|
+
style: { transform: `translateX(-${String(100 - (value ?? 0))}%)` }
|
|
871
|
+
})
|
|
872
|
+
});
|
|
873
|
+
}
|
|
874
|
+
// src/components/radio-group.tsx
|
|
875
|
+
function RadioGroup({ className, ...props }) {
|
|
876
|
+
return /* @__PURE__ */ jsx(RadioGroup$1.Root, {
|
|
877
|
+
"data-slot": "radio-group",
|
|
878
|
+
className: cn$1("grid w-full gap-3.5", className),
|
|
879
|
+
...props
|
|
880
|
+
});
|
|
881
|
+
}
|
|
882
|
+
function RadioGroupItem({ className, ...props }) {
|
|
883
|
+
return /* @__PURE__ */ jsx(RadioGroup$1.Item, {
|
|
884
|
+
"data-slot": "radio-group-item",
|
|
885
|
+
className: cn$1("peer relative flex aspect-square size-[18px] shrink-0 items-center justify-center rounded-full border border-input bg-surface-raised transition-colors duration-150 outline-none after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-solid focus-visible:outline-ring disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive data-[state=checked]:border-primary", className),
|
|
886
|
+
...props,
|
|
887
|
+
children: /* @__PURE__ */ jsx(RadioGroup$1.Indicator, {
|
|
888
|
+
"data-slot": "radio-group-indicator",
|
|
889
|
+
className: "flex items-center justify-center",
|
|
890
|
+
children: /* @__PURE__ */ jsx("span", { className: "size-2 rounded-full bg-primary" })
|
|
891
|
+
})
|
|
892
|
+
});
|
|
893
|
+
}
|
|
707
894
|
// src/components/sheet.tsx
|
|
708
895
|
function Sheet({ ...props }) {
|
|
709
896
|
return /* @__PURE__ */ jsx(Dialog$1.Root, {
|
|
@@ -740,7 +927,7 @@ function SheetContent({ className, children, side = "right", showCloseButton = t
|
|
|
740
927
|
return /* @__PURE__ */ jsxs(SheetPortal, { children: [/* @__PURE__ */ jsx(SheetOverlay, {}), /* @__PURE__ */ jsxs(Dialog$1.Content, {
|
|
741
928
|
"data-slot": "sheet-content",
|
|
742
929
|
"data-side": side,
|
|
743
|
-
className: cn$1("fixed z-50 flex flex-col gap-4 overflow-y-auto bg-popover bg-clip-padding text-sm text-popover-foreground shadow-
|
|
930
|
+
className: cn$1("fixed z-50 flex flex-col gap-4 overflow-y-auto bg-popover bg-clip-padding text-sm text-popover-foreground shadow-(--shadow-float) transition duration-200 ease-in-out data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-r data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-l data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-[side=bottom]:data-open:slide-in-from-bottom-10 data-[side=left]:data-open:slide-in-from-left-10 data-[side=right]:data-open:slide-in-from-right-10 data-[side=top]:data-open:slide-in-from-top-10 data-closed:animate-out data-closed:fade-out-0 data-[side=bottom]:data-closed:slide-out-to-bottom-10 data-[side=left]:data-closed:slide-out-to-left-10 data-[side=right]:data-closed:slide-out-to-right-10 data-[side=top]:data-closed:slide-out-to-top-10", className),
|
|
744
931
|
...props,
|
|
745
932
|
children: [children, showCloseButton && /* @__PURE__ */ jsx(Dialog$1.Close, {
|
|
746
933
|
"data-slot": "sheet-close",
|
|
@@ -774,7 +961,7 @@ function SheetFooter({ className, ...props }) {
|
|
|
774
961
|
function SheetTitle({ className, ...props }) {
|
|
775
962
|
return /* @__PURE__ */ jsx(Dialog$1.Title, {
|
|
776
963
|
"data-slot": "sheet-title",
|
|
777
|
-
className: cn$1("font-heading text-
|
|
964
|
+
className: cn$1("font-heading text-xl leading-7 font-semibold tracking-[-0.015em] text-foreground", className),
|
|
778
965
|
...props
|
|
779
966
|
});
|
|
780
967
|
}
|
|
@@ -798,6 +985,7 @@ const Toaster = ({ ...props }) => {
|
|
|
798
985
|
return /* @__PURE__ */ jsx(Toaster$1, {
|
|
799
986
|
theme: "system",
|
|
800
987
|
className: "toaster group",
|
|
988
|
+
position: "bottom-right",
|
|
801
989
|
icons: {
|
|
802
990
|
success: /* @__PURE__ */ jsx(CircleCheckIcon, { className: "size-4" }),
|
|
803
991
|
info: /* @__PURE__ */ jsx(InfoIcon, { className: "size-4" }),
|
|
@@ -809,22 +997,69 @@ const Toaster = ({ ...props }) => {
|
|
|
809
997
|
"--normal-bg": "var(--popover)",
|
|
810
998
|
"--normal-text": "var(--popover-foreground)",
|
|
811
999
|
"--normal-border": "var(--border)",
|
|
812
|
-
"--border-radius": "var(--radius)"
|
|
1000
|
+
"--border-radius": "calc(var(--radius) + 4px)"
|
|
813
1001
|
},
|
|
814
|
-
toastOptions: { classNames: { toast: "cn-toast" } },
|
|
1002
|
+
toastOptions: { classNames: { toast: "cn-toast rounded-2xl border-border bg-popover shadow-(--shadow-popover)" } },
|
|
815
1003
|
...props
|
|
816
1004
|
});
|
|
817
1005
|
};
|
|
1006
|
+
// src/components/steps.tsx
|
|
1007
|
+
function Steps({ className, children, "aria-label": label = "Steps", ...props }) {
|
|
1008
|
+
return /* @__PURE__ */ jsx("nav", {
|
|
1009
|
+
"aria-label": label,
|
|
1010
|
+
"data-slot": "steps",
|
|
1011
|
+
...props,
|
|
1012
|
+
children: /* @__PURE__ */ jsx("ol", {
|
|
1013
|
+
className: cn$1("flex flex-wrap items-center gap-x-5 gap-y-3", className),
|
|
1014
|
+
children
|
|
1015
|
+
})
|
|
1016
|
+
});
|
|
1017
|
+
}
|
|
1018
|
+
function StepsItem({ className, children, step, status, completedLabel = "Completed", onClick, ...props }) {
|
|
1019
|
+
const content = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1020
|
+
/* @__PURE__ */ jsx("span", {
|
|
1021
|
+
"aria-hidden": "true",
|
|
1022
|
+
className: cn$1("inline-flex size-7 shrink-0 items-center justify-center rounded-full border border-input text-[13px] font-semibold", status === "current" && "border-primary bg-primary text-primary-foreground", status === "complete" && "border-transparent bg-success-soft text-success-soft-foreground"),
|
|
1023
|
+
children: status === "complete" ? /* @__PURE__ */ jsx(CheckIcon, {
|
|
1024
|
+
className: "size-3.5",
|
|
1025
|
+
strokeWidth: 2.5
|
|
1026
|
+
}) : step
|
|
1027
|
+
}),
|
|
1028
|
+
status === "complete" && /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsxs("span", {
|
|
1029
|
+
className: "sr-only",
|
|
1030
|
+
children: [completedLabel, ":"]
|
|
1031
|
+
}), " "] }),
|
|
1032
|
+
children
|
|
1033
|
+
] });
|
|
1034
|
+
const classes = cn$1("flex items-center gap-2.5 rounded-sm text-sm font-medium", status === "upcoming" ? "text-muted-foreground" : "text-foreground", className);
|
|
1035
|
+
const current = status === "current" ? "step" : void 0;
|
|
1036
|
+
return /* @__PURE__ */ jsx("li", {
|
|
1037
|
+
"data-slot": "steps-item",
|
|
1038
|
+
"data-status": status,
|
|
1039
|
+
children: onClick === void 0 ? /* @__PURE__ */ jsx("span", {
|
|
1040
|
+
"aria-current": current,
|
|
1041
|
+
className: classes,
|
|
1042
|
+
children: content
|
|
1043
|
+
}) : /* @__PURE__ */ jsx("button", {
|
|
1044
|
+
type: "button",
|
|
1045
|
+
"aria-current": current,
|
|
1046
|
+
onClick,
|
|
1047
|
+
className: cn$1(classes, "cursor-pointer outline-none focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-solid focus-visible:outline-ring disabled:cursor-default"),
|
|
1048
|
+
...props,
|
|
1049
|
+
children: content
|
|
1050
|
+
})
|
|
1051
|
+
});
|
|
1052
|
+
}
|
|
818
1053
|
// src/components/switch.tsx
|
|
819
1054
|
function Switch({ className, size = "default", ...props }) {
|
|
820
1055
|
return /* @__PURE__ */ jsx(Switch$1.Root, {
|
|
821
1056
|
"data-slot": "switch",
|
|
822
1057
|
"data-size": size,
|
|
823
|
-
className: cn$1("peer group/switch relative inline-flex shrink-0 items-center rounded-full border border-
|
|
1058
|
+
className: cn$1("peer group/switch relative inline-flex shrink-0 items-center rounded-full border border-input bg-secondary px-[3px] transition-colors duration-150 outline-none after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-solid focus-visible:outline-ring aria-invalid:border-destructive data-[size=default]:h-6 data-[size=default]:w-10 data-[size=sm]:h-[18px] data-[size=sm]:w-[30px] data-checked:border-primary data-checked:bg-primary data-disabled:cursor-not-allowed data-disabled:opacity-50", className),
|
|
824
1059
|
...props,
|
|
825
1060
|
children: /* @__PURE__ */ jsx(Switch$1.Thumb, {
|
|
826
1061
|
"data-slot": "switch-thumb",
|
|
827
|
-
className: "pointer-events-none block rounded-full bg-
|
|
1062
|
+
className: "pointer-events-none block rounded-full bg-muted-foreground ring-0 transition-transform duration-150 group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 data-checked:bg-primary-foreground group-data-[size=default]/switch:data-checked:translate-x-4 group-data-[size=sm]/switch:data-checked:translate-x-[10px] data-unchecked:translate-x-0"
|
|
828
1063
|
})
|
|
829
1064
|
});
|
|
830
1065
|
}
|
|
@@ -832,7 +1067,7 @@ function Switch({ className, size = "default", ...props }) {
|
|
|
832
1067
|
function Table({ className, ...props }) {
|
|
833
1068
|
return /* @__PURE__ */ jsx("div", {
|
|
834
1069
|
"data-slot": "table-container",
|
|
835
|
-
className: "relative w-full overflow-x-auto",
|
|
1070
|
+
className: "relative w-full overflow-x-auto rounded-2xl border border-border bg-card",
|
|
836
1071
|
children: /* @__PURE__ */ jsx("table", {
|
|
837
1072
|
"data-slot": "table",
|
|
838
1073
|
className: cn$1("w-full caption-bottom text-sm", className),
|
|
@@ -843,7 +1078,7 @@ function Table({ className, ...props }) {
|
|
|
843
1078
|
function TableHeader({ className, ...props }) {
|
|
844
1079
|
return /* @__PURE__ */ jsx("thead", {
|
|
845
1080
|
"data-slot": "table-header",
|
|
846
|
-
className: cn$1("[&_tr]:border-b", className),
|
|
1081
|
+
className: cn$1("bg-muted [&_tr]:border-b [&_tr]:hover:bg-muted", className),
|
|
847
1082
|
...props
|
|
848
1083
|
});
|
|
849
1084
|
}
|
|
@@ -871,14 +1106,14 @@ function TableRow({ className, ...props }) {
|
|
|
871
1106
|
function TableHead({ className, ...props }) {
|
|
872
1107
|
return /* @__PURE__ */ jsx("th", {
|
|
873
1108
|
"data-slot": "table-head",
|
|
874
|
-
className: cn$1("h-
|
|
1109
|
+
className: cn$1("h-11 px-4 text-left align-middle font-medium whitespace-nowrap text-muted-foreground [&:has([role=checkbox])]:pr-0", className),
|
|
875
1110
|
...props
|
|
876
1111
|
});
|
|
877
1112
|
}
|
|
878
1113
|
function TableCell({ className, ...props }) {
|
|
879
1114
|
return /* @__PURE__ */ jsx("td", {
|
|
880
1115
|
"data-slot": "table-cell",
|
|
881
|
-
className: cn$1("
|
|
1116
|
+
className: cn$1("px-4 py-3 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0", className),
|
|
882
1117
|
...props
|
|
883
1118
|
});
|
|
884
1119
|
}
|
|
@@ -898,9 +1133,9 @@ function Tabs({ className, orientation = "horizontal", ...props }) {
|
|
|
898
1133
|
...props
|
|
899
1134
|
});
|
|
900
1135
|
}
|
|
901
|
-
const tabsListVariants = cva("group/tabs-list inline-flex w-fit items-center justify-center rounded-
|
|
1136
|
+
const tabsListVariants = cva("group/tabs-list inline-flex w-fit items-center justify-center rounded-full p-1 text-muted-foreground group-data-horizontal/tabs:h-auto group-data-vertical/tabs:rounded-2xl group-data-vertical/tabs:h-fit group-data-vertical/tabs:flex-col data-[variant=line]:rounded-none", {
|
|
902
1137
|
variants: { variant: {
|
|
903
|
-
default: "bg-
|
|
1138
|
+
default: "bg-secondary",
|
|
904
1139
|
line: "gap-1 bg-transparent"
|
|
905
1140
|
} },
|
|
906
1141
|
defaultVariants: { variant: "default" }
|
|
@@ -916,14 +1151,22 @@ function TabsList({ className, variant = "default", ...props }) {
|
|
|
916
1151
|
function TabsTrigger({ className, ...props }) {
|
|
917
1152
|
return /* @__PURE__ */ jsx(Tabs$1.Trigger, {
|
|
918
1153
|
"data-slot": "tabs-trigger",
|
|
919
|
-
className: cn$1("relative inline-flex h-
|
|
1154
|
+
className: cn$1("relative inline-flex h-8 flex-1 items-center justify-center gap-1.5 rounded-full border border-transparent px-3.5 text-sm font-medium whitespace-nowrap text-muted-foreground transition-colors duration-150 group-data-vertical/tabs:w-full group-data-vertical/tabs:justify-start hover:text-foreground focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-solid focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 has-data-[icon=inline-end]:pr-1 has-data-[icon=inline-start]:pl-1 group-data-[variant=default]/tabs-list:data-active:shadow-(--shadow-card) group-data-[variant=line]/tabs-list:data-active:shadow-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", "group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-active:bg-transparent dark:group-data-[variant=line]/tabs-list:data-active:border-transparent dark:group-data-[variant=line]/tabs-list:data-active:bg-transparent", "data-active:bg-surface-raised data-active:text-foreground", "after:absolute after:bg-foreground after:opacity-0 after:transition-opacity group-data-horizontal/tabs:after:inset-x-0 group-data-horizontal/tabs:after:bottom-[-5px] group-data-horizontal/tabs:after:h-0.5 group-data-vertical/tabs:after:inset-y-0 group-data-vertical/tabs:after:-right-1 group-data-vertical/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-active:after:opacity-100", className),
|
|
920
1155
|
...props
|
|
921
1156
|
});
|
|
922
1157
|
}
|
|
923
1158
|
function TabsContent({ className, ...props }) {
|
|
924
1159
|
return /* @__PURE__ */ jsx(Tabs$1.Content, {
|
|
925
1160
|
"data-slot": "tabs-content",
|
|
926
|
-
className: cn$1("flex-1 rounded-md text-sm outline-none focus-visible:
|
|
1161
|
+
className: cn$1("flex-1 rounded-md text-sm outline-none focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-solid focus-visible:outline-ring", className),
|
|
1162
|
+
...props
|
|
1163
|
+
});
|
|
1164
|
+
}
|
|
1165
|
+
// src/components/textarea.tsx
|
|
1166
|
+
function Textarea({ className, ...props }) {
|
|
1167
|
+
return /* @__PURE__ */ jsx("textarea", {
|
|
1168
|
+
"data-slot": "textarea",
|
|
1169
|
+
className: cn$1("flex field-sizing-content min-h-[88px] w-full min-w-0 resize-y rounded-md border border-input bg-surface-raised px-3.5 py-2.5 text-base transition-colors outline-none placeholder:text-muted-foreground focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-solid focus-visible:outline-ring disabled:cursor-not-allowed disabled:bg-muted disabled:opacity-50 aria-invalid:border-destructive md:text-sm", className),
|
|
927
1170
|
...props
|
|
928
1171
|
});
|
|
929
1172
|
}
|
|
@@ -951,9 +1194,9 @@ function TooltipContent({ className, sideOffset = 0, children, ...props }) {
|
|
|
951
1194
|
return /* @__PURE__ */ jsxs(Tooltip$1.Content, {
|
|
952
1195
|
"data-slot": "tooltip-content",
|
|
953
1196
|
sideOffset,
|
|
954
|
-
className: cn$1("z-50 inline-flex w-fit max-w-xs origin-(--radix-tooltip-content-transform-origin) items-center gap-1.5 rounded-
|
|
1197
|
+
className: cn$1("z-50 inline-flex w-fit max-w-xs origin-(--radix-tooltip-content-transform-origin) items-center gap-1.5 rounded-sm bg-primary px-2.5 py-1.5 text-xs font-medium text-primary-foreground has-data-[slot=kbd]:pr-1.5 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 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-sm data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", className),
|
|
955
1198
|
...props,
|
|
956
|
-
children: [children, /* @__PURE__ */ jsx(Tooltip$1.Arrow, { className: "z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] bg-
|
|
1199
|
+
children: [children, /* @__PURE__ */ jsx(Tooltip$1.Arrow, { className: "z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] bg-primary fill-primary" })]
|
|
957
1200
|
});
|
|
958
1201
|
}
|
|
959
1202
|
// src/form.tsx
|
|
@@ -1031,6 +1274,6 @@ function FormRootError({ className }) {
|
|
|
1031
1274
|
children: /* @__PURE__ */ jsx(AlertDescription, { children: message })
|
|
1032
1275
|
});
|
|
1033
1276
|
}
|
|
1034
|
-
export { Alert, AlertAction, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogMedia, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, Badge, Button, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle, Form, FormField, FormRootError, Input, Label, NativeSelect, NativeSelectOptGroup, NativeSelectOption, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Skeleton, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Toaster, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, badgeVariants, buttonVariants, cn, tabsListVariants, toast, useZodForm };
|
|
1277
|
+
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertAction, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogMedia, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, Avatar, AvatarFallback, AvatarGroup, AvatarImage, Badge, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle, Form, FormField, FormRootError, Input, Label, NativeSelect, NativeSelectOptGroup, NativeSelectOption, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, Progress, RadioGroup, RadioGroupItem, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Skeleton, Steps, StepsItem, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, Toaster, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, badgeVariants, buttonVariants, cn, tabsListVariants, toast, useZodForm };
|
|
1035
1278
|
|
|
1036
1279
|
//# sourceMappingURL=index.js.map
|