@arolariu/components 0.2.0 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/changelog.md +15 -0
- package/dist/components/ui/accordion.d.ts +4 -4
- package/dist/components/ui/accordion.d.ts.map +1 -1
- package/dist/components/ui/accordion.js +19 -27
- package/dist/components/ui/accordion.js.map +1 -1
- package/dist/components/ui/alert-dialog.d.ts +17 -11
- package/dist/components/ui/alert-dialog.d.ts.map +1 -1
- package/dist/components/ui/alert-dialog.js +38 -61
- package/dist/components/ui/alert-dialog.js.map +1 -1
- package/dist/components/ui/alert.d.ts +4 -5
- package/dist/components/ui/alert.d.ts.map +1 -1
- package/dist/components/ui/alert.js +17 -20
- package/dist/components/ui/alert.js.map +1 -1
- package/dist/components/ui/aspect-ratio.d.ts +1 -2
- package/dist/components/ui/aspect-ratio.d.ts.map +1 -1
- package/dist/components/ui/aspect-ratio.js +1 -8
- package/dist/components/ui/aspect-ratio.js.map +1 -1
- package/dist/components/ui/avatar.d.ts +3 -3
- package/dist/components/ui/avatar.d.ts.map +1 -1
- package/dist/components/ui/avatar.js +16 -19
- package/dist/components/ui/avatar.js.map +1 -1
- package/dist/components/ui/badge.d.ts +3 -3
- package/dist/components/ui/badge.d.ts.map +1 -1
- package/dist/components/ui/badge.js +7 -10
- package/dist/components/ui/badge.js.map +1 -1
- package/dist/components/ui/breadcrumb.d.ts +16 -8
- package/dist/components/ui/breadcrumb.d.ts.map +1 -1
- package/dist/components/ui/breadcrumb.js +28 -35
- package/dist/components/ui/breadcrumb.js.map +1 -1
- package/dist/components/ui/button-group.d.ts +13 -0
- package/dist/components/ui/button-group.d.ts.map +1 -0
- package/dist/components/ui/button-group.js +47 -0
- package/dist/components/ui/button-group.js.map +1 -0
- package/dist/components/ui/button.d.ts +3 -2
- package/dist/components/ui/button.d.ts.map +1 -1
- package/dist/components/ui/button.js +15 -14
- package/dist/components/ui/button.js.map +1 -1
- package/dist/components/ui/calendar.js +20 -20
- package/dist/components/ui/calendar.js.map +1 -1
- package/dist/components/ui/card.d.ts +7 -8
- package/dist/components/ui/card.d.ts.map +1 -1
- package/dist/components/ui/card.js +31 -44
- package/dist/components/ui/card.js.map +1 -1
- package/dist/components/ui/carousel.d.ts +5 -6
- package/dist/components/ui/carousel.d.ts.map +1 -1
- package/dist/components/ui/carousel.js +29 -20
- package/dist/components/ui/carousel.js.map +1 -1
- package/dist/components/ui/chart.d.ts +35 -27
- package/dist/components/ui/chart.d.ts.map +1 -1
- package/dist/components/ui/chart.js +28 -26
- package/dist/components/ui/chart.js.map +1 -1
- package/dist/components/ui/checkbox.d.ts +1 -1
- package/dist/components/ui/checkbox.d.ts.map +1 -1
- package/dist/components/ui/checkbox.js +10 -12
- package/dist/components/ui/checkbox.js.map +1 -1
- package/dist/components/ui/collapsible.d.ts +2 -4
- package/dist/components/ui/collapsible.d.ts.map +1 -1
- package/dist/components/ui/collapsible.js +31 -20
- package/dist/components/ui/collapsible.js.map +1 -1
- package/dist/components/ui/command.d.ts +78 -16
- package/dist/components/ui/command.d.ts.map +1 -1
- package/dist/components/ui/command.js +47 -72
- package/dist/components/ui/command.js.map +1 -1
- package/dist/components/ui/context-menu.d.ts +21 -19
- package/dist/components/ui/context-menu.d.ts.map +1 -1
- package/dist/components/ui/context-menu.js +57 -101
- package/dist/components/ui/context-menu.js.map +1 -1
- package/dist/components/ui/dialog.d.ts +16 -12
- package/dist/components/ui/dialog.d.ts.map +1 -1
- package/dist/components/ui/dialog.js +36 -64
- package/dist/components/ui/dialog.js.map +1 -1
- package/dist/components/ui/drawer.d.ts +19 -10
- package/dist/components/ui/drawer.d.ts.map +1 -1
- package/dist/components/ui/drawer.js +32 -57
- package/dist/components/ui/drawer.js.map +1 -1
- package/dist/components/ui/dropdown-menu.d.ts +21 -19
- package/dist/components/ui/dropdown-menu.d.ts.map +1 -1
- package/dist/components/ui/dropdown-menu.js +64 -108
- package/dist/components/ui/dropdown-menu.js.map +1 -1
- package/dist/components/ui/dropdrawer.d.ts +1 -1
- package/dist/components/ui/dropdrawer.d.ts.map +1 -1
- package/dist/components/ui/dropdrawer.js +2 -5
- package/dist/components/ui/dropdrawer.js.map +1 -1
- package/dist/components/ui/empty.d.ts +13 -0
- package/dist/components/ui/empty.d.ts.map +1 -0
- package/dist/components/ui/empty.js +65 -0
- package/dist/components/ui/empty.js.map +1 -0
- package/dist/components/ui/field.d.ts +26 -0
- package/dist/components/ui/field.d.ts.map +1 -0
- package/dist/components/ui/field.js +135 -0
- package/dist/components/ui/field.js.map +1 -0
- package/dist/components/ui/form.d.ts +5 -6
- package/dist/components/ui/form.d.ts.map +1 -1
- package/dist/components/ui/form.js +29 -28
- package/dist/components/ui/form.js.map +1 -1
- package/dist/components/ui/hover-card.d.ts +3 -3
- package/dist/components/ui/hover-card.d.ts.map +1 -1
- package/dist/components/ui/hover-card.js +11 -25
- package/dist/components/ui/hover-card.js.map +1 -1
- package/dist/components/ui/input-group.d.ts +17 -0
- package/dist/components/ui/input-group.d.ts.map +1 -0
- package/dist/components/ui/input-group.js +91 -0
- package/dist/components/ui/input-group.js.map +1 -0
- package/dist/components/ui/input-otp.d.ts +30 -7
- package/dist/components/ui/input-otp.d.ts.map +1 -1
- package/dist/components/ui/input-otp.js +22 -25
- package/dist/components/ui/input-otp.js.map +1 -1
- package/dist/components/ui/input.d.ts +1 -1
- package/dist/components/ui/input.d.ts.map +1 -1
- package/dist/components/ui/input.js +6 -7
- package/dist/components/ui/input.js.map +1 -1
- package/dist/components/ui/item.d.ts +24 -0
- package/dist/components/ui/item.d.ts.map +1 -0
- package/dist/components/ui/item.js +122 -0
- package/dist/components/ui/item.js.map +1 -0
- package/dist/components/ui/kbd.d.ts +5 -0
- package/dist/components/ui/kbd.d.ts.map +1 -0
- package/dist/components/ui/kbd.js +21 -0
- package/dist/components/ui/kbd.js.map +1 -0
- package/dist/components/ui/label.d.ts +2 -1
- package/dist/components/ui/label.d.ts.map +1 -1
- package/dist/components/ui/label.js +8 -7
- package/dist/components/ui/label.js.map +1 -1
- package/dist/components/ui/menubar.d.ts +18 -16
- package/dist/components/ui/menubar.d.ts.map +1 -1
- package/dist/components/ui/menubar.js +73 -93
- package/dist/components/ui/menubar.js.map +1 -1
- package/dist/components/ui/navigation-menu.d.ts +8 -10
- package/dist/components/ui/navigation-menu.d.ts.map +1 -1
- package/dist/components/ui/navigation-menu.js +36 -55
- package/dist/components/ui/navigation-menu.js.map +1 -1
- package/dist/components/ui/pagination.d.ts +24 -9
- package/dist/components/ui/pagination.d.ts.map +1 -1
- package/dist/components/ui/pagination.js +33 -45
- package/dist/components/ui/pagination.js.map +1 -1
- package/dist/components/ui/popover.d.ts +4 -4
- package/dist/components/ui/popover.d.ts.map +1 -1
- package/dist/components/ui/popover.js +9 -25
- package/dist/components/ui/popover.js.map +1 -1
- package/dist/components/ui/progress.d.ts +1 -1
- package/dist/components/ui/progress.d.ts.map +1 -1
- package/dist/components/ui/progress.js +5 -7
- package/dist/components/ui/progress.js.map +1 -1
- package/dist/components/ui/radio-group.d.ts +2 -2
- package/dist/components/ui/radio-group.d.ts.map +1 -1
- package/dist/components/ui/radio-group.js +16 -19
- package/dist/components/ui/radio-group.js.map +1 -1
- package/dist/components/ui/resizable.d.ts +20 -4
- package/dist/components/ui/resizable.d.ts.map +1 -1
- package/dist/components/ui/resizable.js +8 -19
- package/dist/components/ui/resizable.js.map +1 -1
- package/dist/components/ui/scroll-area.d.ts +2 -2
- package/dist/components/ui/scroll-area.d.ts.map +1 -1
- package/dist/components/ui/scroll-area.js +12 -16
- package/dist/components/ui/scroll-area.js.map +1 -1
- package/dist/components/ui/select.d.ts +10 -12
- package/dist/components/ui/select.d.ts.map +1 -1
- package/dist/components/ui/select.js +54 -77
- package/dist/components/ui/select.js.map +1 -1
- package/dist/components/ui/separator.d.ts +1 -1
- package/dist/components/ui/separator.d.ts.map +1 -1
- package/dist/components/ui/separator.js +6 -7
- package/dist/components/ui/separator.js.map +1 -1
- package/dist/components/ui/sheet.d.ts +23 -11
- package/dist/components/ui/sheet.d.ts.map +1 -1
- package/dist/components/ui/sheet.js +54 -66
- package/dist/components/ui/sheet.js.map +1 -1
- package/dist/components/ui/sidebar.d.ts +34 -38
- package/dist/components/ui/sidebar.d.ts.map +1 -1
- package/dist/components/ui/sidebar.js +116 -124
- package/dist/components/ui/sidebar.js.map +1 -1
- package/dist/components/ui/skeleton.d.ts +1 -1
- package/dist/components/ui/skeleton.d.ts.map +1 -1
- package/dist/components/ui/skeleton.js +1 -2
- package/dist/components/ui/skeleton.js.map +1 -1
- package/dist/components/ui/slider.d.ts +1 -1
- package/dist/components/ui/slider.d.ts.map +1 -1
- package/dist/components/ui/slider.js +11 -30
- package/dist/components/ui/slider.js.map +1 -1
- package/dist/components/ui/sonner.d.ts +4 -2
- package/dist/components/ui/sonner.d.ts.map +1 -1
- package/dist/components/ui/sonner.js +7 -4
- package/dist/components/ui/sonner.js.map +1 -1
- package/dist/components/ui/spinner.d.ts +4 -0
- package/dist/components/ui/spinner.d.ts.map +1 -0
- package/dist/components/ui/spinner.js +16 -0
- package/dist/components/ui/spinner.js.map +1 -0
- package/dist/components/ui/switch.d.ts +2 -2
- package/dist/components/ui/switch.d.ts.map +1 -1
- package/dist/components/ui/switch.js +7 -9
- package/dist/components/ui/switch.js.map +1 -1
- package/dist/components/ui/table.d.ts +8 -8
- package/dist/components/ui/table.d.ts.map +1 -1
- package/dist/components/ui/table.js +36 -45
- package/dist/components/ui/table.js.map +1 -1
- package/dist/components/ui/tabs.d.ts +4 -4
- package/dist/components/ui/tabs.d.ts.map +1 -1
- package/dist/components/ui/tabs.js +17 -26
- package/dist/components/ui/tabs.js.map +1 -1
- package/dist/components/ui/textarea.d.ts +1 -1
- package/dist/components/ui/textarea.d.ts.map +1 -1
- package/dist/components/ui/textarea.js +6 -7
- package/dist/components/ui/textarea.js.map +1 -1
- package/dist/components/ui/toggle-group.d.ts +8 -3
- package/dist/components/ui/toggle-group.d.ts.map +1 -1
- package/dist/components/ui/toggle-group.js +11 -15
- package/dist/components/ui/toggle-group.js.map +1 -1
- package/dist/components/ui/toggle.d.ts +4 -1
- package/dist/components/ui/toggle.d.ts.map +1 -1
- package/dist/components/ui/toggle.js +7 -8
- package/dist/components/ui/toggle.js.map +1 -1
- package/dist/components/ui/tooltip.d.ts +4 -4
- package/dist/components/ui/tooltip.d.ts.map +1 -1
- package/dist/components/ui/tooltip.js +13 -38
- package/dist/components/ui/tooltip.js.map +1 -1
- package/dist/components/ui/typewriter.d.ts.map +1 -1
- package/dist/components/ui/typewriter.js +2 -6
- package/dist/components/ui/typewriter.js.map +1 -1
- package/dist/index.css +839 -1126
- package/dist/index.css.map +1 -1
- package/dist/index.d.ts +9 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +9 -3
- package/package.json +37 -2
- package/src/components/ui/accordion.tsx +43 -44
- package/src/components/ui/alert-dialog.tsx +88 -99
- package/src/components/ui/alert.tsx +24 -25
- package/src/components/ui/aspect-ratio.tsx +1 -9
- package/src/components/ui/avatar.tsx +33 -27
- package/src/components/ui/badge.tsx +8 -16
- package/src/components/ui/breadcrumb.tsx +70 -73
- package/src/components/ui/button-group.tsx +69 -0
- package/src/components/ui/button.tsx +18 -24
- package/src/components/ui/calendar.tsx +20 -20
- package/src/components/ui/card.tsx +52 -71
- package/src/components/ui/carousel.tsx +145 -133
- package/src/components/ui/chart.tsx +174 -182
- package/src/components/ui/checkbox.tsx +18 -18
- package/src/components/ui/collapsible.tsx +2 -26
- package/src/components/ui/command.tsx +101 -99
- package/src/components/ui/context-menu.tsx +150 -193
- package/src/components/ui/dialog.tsx +75 -110
- package/src/components/ui/drawer.tsx +74 -102
- package/src/components/ui/dropdown-menu.tsx +153 -200
- package/src/components/ui/dropdrawer.tsx +0 -5
- package/src/components/ui/empty.tsx +86 -0
- package/src/components/ui/field.tsx +199 -0
- package/src/components/ui/form.tsx +49 -50
- package/src/components/ui/hover-card.tsx +18 -37
- package/src/components/ui/input-group.tsx +145 -0
- package/src/components/ui/input-otp.tsx +49 -59
- package/src/components/ui/input.tsx +5 -6
- package/src/components/ui/item.tsx +163 -0
- package/src/components/ui/kbd.tsx +31 -0
- package/src/components/ui/label.tsx +14 -12
- package/src/components/ui/menubar.tsx +178 -201
- package/src/components/ui/navigation-menu.tsx +84 -100
- package/src/components/ui/pagination.tsx +75 -85
- package/src/components/ui/popover.tsx +19 -38
- package/src/components/ui/progress.tsx +15 -14
- package/src/components/ui/radio-group.tsx +19 -13
- package/src/components/ui/resizable.tsx +23 -36
- package/src/components/ui/scroll-area.tsx +32 -35
- package/src/components/ui/select.tsx +112 -127
- package/src/components/ui/separator.tsx +17 -19
- package/src/components/ui/sheet.tsx +87 -108
- package/src/components/ui/sidebar.tsx +276 -279
- package/src/components/ui/skeleton.tsx +2 -3
- package/src/components/ui/slider.tsx +15 -40
- package/src/components/ui/sonner.tsx +15 -9
- package/src/components/ui/spinner.tsx +18 -0
- package/src/components/ui/switch.tsx +18 -17
- package/src/components/ui/table.tsx +66 -71
- package/src/components/ui/tabs.tsx +36 -36
- package/src/components/ui/textarea.tsx +5 -4
- package/src/components/ui/toggle-group.tsx +21 -34
- package/src/components/ui/toggle.tsx +14 -16
- package/src/components/ui/tooltip.tsx +19 -43
- package/src/components/ui/typewriter.tsx +3 -4
- package/src/index.css +6 -6
- package/src/index.ts +43 -4
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { cva } from "class-variance-authority";
|
|
4
|
+
import "react";
|
|
5
|
+
import { Button } from "./button.js";
|
|
6
|
+
import { Input } from "./input.js";
|
|
7
|
+
import { Textarea } from "./textarea.js";
|
|
8
|
+
import { cn } from "../../lib/utilities.js";
|
|
9
|
+
function InputGroup({ className, ...props }) {
|
|
10
|
+
return /*#__PURE__*/ jsx("div", {
|
|
11
|
+
"data-slot": "input-group",
|
|
12
|
+
role: "group",
|
|
13
|
+
className: cn("group/input-group relative flex w-full items-center rounded-md border border-neutral-200 shadow-xs transition-[color,box-shadow] outline-none dark:border-neutral-800 dark:bg-neutral-200/30 dark:dark:bg-neutral-800/30", "h-9 has-[>textarea]:h-auto", "has-[>[data-align=inline-start]]:[&>input]:pl-2", "has-[>[data-align=inline-end]]:[&>input]:pr-2", "has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>[data-align=block-start]]:[&>input]:pb-3", "has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-end]]:[&>input]:pt-3", "has-[[data-slot=input-group-control]:focus-visible]:ring-1 has-[[data-slot=input-group-control]:focus-visible]:ring-neutral-950 dark:has-[[data-slot=input-group-control]:focus-visible]:ring-neutral-300", "has-[[data-slot][aria-invalid=true]]:border-red-500 has-[[data-slot][aria-invalid=true]]:ring-red-500/20 dark:has-[[data-slot][aria-invalid=true]]:border-red-900 dark:dark:has-[[data-slot][aria-invalid=true]]:ring-red-900/40 dark:has-[[data-slot][aria-invalid=true]]:ring-red-500/40 dark:has-[[data-slot][aria-invalid=true]]:ring-red-900/20", className),
|
|
14
|
+
...props
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
const inputGroupAddonVariants = cva("text-neutral-500 flex h-auto cursor-text select-none items-center justify-center gap-2 py-1.5 text-sm font-medium group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4 dark:text-neutral-400", {
|
|
18
|
+
variants: {
|
|
19
|
+
align: {
|
|
20
|
+
"inline-start": "order-first pl-3 has-[>button]:ml-[-0.45rem] has-[>kbd]:ml-[-0.35rem]",
|
|
21
|
+
"inline-end": "order-last pr-3 has-[>button]:mr-[-0.4rem] has-[>kbd]:mr-[-0.35rem]",
|
|
22
|
+
"block-start": "[.border-b]:pb-3 order-first w-full justify-start px-3 pt-3 group-has-[>input]/input-group:pt-2.5",
|
|
23
|
+
"block-end": "[.border-t]:pt-3 order-last w-full justify-start px-3 pb-3 group-has-[>input]/input-group:pb-2.5"
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
defaultVariants: {
|
|
27
|
+
align: "inline-start"
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
function InputGroupAddon({ className, align = "inline-start", ...props }) {
|
|
31
|
+
return /*#__PURE__*/ jsx("div", {
|
|
32
|
+
role: "group",
|
|
33
|
+
"data-slot": "input-group-addon",
|
|
34
|
+
"data-align": align,
|
|
35
|
+
className: cn(inputGroupAddonVariants({
|
|
36
|
+
align
|
|
37
|
+
}), className),
|
|
38
|
+
onClick: (e)=>{
|
|
39
|
+
if (e.target.closest("button")) return;
|
|
40
|
+
e.currentTarget.parentElement?.querySelector("input")?.focus();
|
|
41
|
+
},
|
|
42
|
+
...props
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
const inputGroupButtonVariants = cva("flex items-center gap-2 text-sm shadow-none", {
|
|
46
|
+
variants: {
|
|
47
|
+
size: {
|
|
48
|
+
xs: "h-6 gap-1 rounded-[calc(var(--radius)-5px)] px-2 has-[>svg]:px-2 [&>svg:not([class*='size-'])]:size-3.5",
|
|
49
|
+
sm: "h-8 gap-1.5 rounded-md px-2.5 has-[>svg]:px-2.5",
|
|
50
|
+
"icon-xs": "size-6 rounded-[calc(var(--radius)-5px)] p-0 has-[>svg]:p-0",
|
|
51
|
+
"icon-sm": "size-8 p-0 has-[>svg]:p-0"
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
defaultVariants: {
|
|
55
|
+
size: "xs"
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
function InputGroupButton({ className, type = "button", variant = "ghost", size = "xs", ...props }) {
|
|
59
|
+
return /*#__PURE__*/ jsx(Button, {
|
|
60
|
+
type: type,
|
|
61
|
+
"data-size": size,
|
|
62
|
+
variant: variant,
|
|
63
|
+
className: cn(inputGroupButtonVariants({
|
|
64
|
+
size
|
|
65
|
+
}), className),
|
|
66
|
+
...props
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
function InputGroupText({ className, ...props }) {
|
|
70
|
+
return /*#__PURE__*/ jsx("span", {
|
|
71
|
+
className: cn("flex items-center gap-2 text-sm text-neutral-500 dark:text-neutral-400 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4", className),
|
|
72
|
+
...props
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
function InputGroupInput({ className, ...props }) {
|
|
76
|
+
return /*#__PURE__*/ jsx(Input, {
|
|
77
|
+
"data-slot": "input-group-control",
|
|
78
|
+
className: cn("flex-1 rounded-none border-0 bg-transparent shadow-none focus-visible:ring-0 dark:bg-transparent", className),
|
|
79
|
+
...props
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
function InputGroupTextarea({ className, ...props }) {
|
|
83
|
+
return /*#__PURE__*/ jsx(Textarea, {
|
|
84
|
+
"data-slot": "input-group-control",
|
|
85
|
+
className: cn("flex-1 resize-none rounded-none border-0 bg-transparent py-3 shadow-none focus-visible:ring-0 dark:bg-transparent", className),
|
|
86
|
+
...props
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
export { InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea };
|
|
90
|
+
|
|
91
|
+
//# sourceMappingURL=input-group.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"components\\ui\\input-group.js","sources":["webpack://@arolariu/components/./src/components/ui/input-group.tsx"],"sourcesContent":["\r\n\r\nimport {cva, type VariantProps} from \"class-variance-authority\";\r\nimport * as React from \"react\";\r\n\r\nimport {Button} from \"@/components/ui/button\";\r\nimport {Input} from \"@/components/ui/input\";\r\nimport {Textarea} from \"@/components/ui/textarea\";\r\nimport {cn} from \"@/lib/utilities\";\r\n\r\nfunction InputGroup({className, ...props}: React.ComponentProps<\"div\">) {\r\n return (\r\n <div\r\n data-slot='input-group'\r\n role='group'\r\n className={cn(\r\n \"group/input-group relative flex w-full items-center rounded-md border border-neutral-200 shadow-xs transition-[color,box-shadow] outline-none dark:border-neutral-800 dark:bg-neutral-200/30 dark:dark:bg-neutral-800/30\",\r\n \"h-9 has-[>textarea]:h-auto\",\r\n\r\n // Variants based on alignment.\r\n \"has-[>[data-align=inline-start]]:[&>input]:pl-2\",\r\n \"has-[>[data-align=inline-end]]:[&>input]:pr-2\",\r\n \"has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>[data-align=block-start]]:[&>input]:pb-3\",\r\n \"has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-end]]:[&>input]:pt-3\",\r\n\r\n // Focus state.\r\n \"has-[[data-slot=input-group-control]:focus-visible]:ring-1 has-[[data-slot=input-group-control]:focus-visible]:ring-neutral-950 dark:has-[[data-slot=input-group-control]:focus-visible]:ring-neutral-300\",\r\n\r\n // Error state.\r\n \"has-[[data-slot][aria-invalid=true]]:border-red-500 has-[[data-slot][aria-invalid=true]]:ring-red-500/20 dark:has-[[data-slot][aria-invalid=true]]:border-red-900 dark:dark:has-[[data-slot][aria-invalid=true]]:ring-red-900/40 dark:has-[[data-slot][aria-invalid=true]]:ring-red-500/40 dark:has-[[data-slot][aria-invalid=true]]:ring-red-900/20\",\r\n\r\n className,\r\n )}\r\n {...props}\r\n />\r\n );\r\n}\r\n\r\nconst inputGroupAddonVariants = cva(\r\n \"text-neutral-500 flex h-auto cursor-text select-none items-center justify-center gap-2 py-1.5 text-sm font-medium group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4 dark:text-neutral-400\",\r\n {\r\n variants: {\r\n align: {\r\n \"inline-start\": \"order-first pl-3 has-[>button]:ml-[-0.45rem] has-[>kbd]:ml-[-0.35rem]\",\r\n \"inline-end\": \"order-last pr-3 has-[>button]:mr-[-0.4rem] has-[>kbd]:mr-[-0.35rem]\",\r\n \"block-start\": \"[.border-b]:pb-3 order-first w-full justify-start px-3 pt-3 group-has-[>input]/input-group:pt-2.5\",\r\n \"block-end\": \"[.border-t]:pt-3 order-last w-full justify-start px-3 pb-3 group-has-[>input]/input-group:pb-2.5\",\r\n },\r\n },\r\n defaultVariants: {\r\n align: \"inline-start\",\r\n },\r\n },\r\n);\r\n\r\nfunction InputGroupAddon({\r\n className,\r\n align = \"inline-start\",\r\n ...props\r\n}: React.ComponentProps<\"div\"> & VariantProps<typeof inputGroupAddonVariants>) {\r\n return (\r\n <div\r\n role='group'\r\n data-slot='input-group-addon'\r\n data-align={align}\r\n className={cn(inputGroupAddonVariants({align}), className)}\r\n onClick={(e) => {\r\n if ((e.target as HTMLElement).closest(\"button\")) {\r\n return;\r\n }\r\n e.currentTarget.parentElement?.querySelector(\"input\")?.focus();\r\n }}\r\n {...props}\r\n />\r\n );\r\n}\r\n\r\nconst inputGroupButtonVariants = cva(\"flex items-center gap-2 text-sm shadow-none\", {\r\n variants: {\r\n size: {\r\n xs: \"h-6 gap-1 rounded-[calc(var(--radius)-5px)] px-2 has-[>svg]:px-2 [&>svg:not([class*='size-'])]:size-3.5\",\r\n sm: \"h-8 gap-1.5 rounded-md px-2.5 has-[>svg]:px-2.5\",\r\n \"icon-xs\": \"size-6 rounded-[calc(var(--radius)-5px)] p-0 has-[>svg]:p-0\",\r\n \"icon-sm\": \"size-8 p-0 has-[>svg]:p-0\",\r\n },\r\n },\r\n defaultVariants: {\r\n size: \"xs\",\r\n },\r\n});\r\n\r\nfunction InputGroupButton({\r\n className,\r\n type = \"button\",\r\n variant = \"ghost\",\r\n size = \"xs\",\r\n ...props\r\n}: Omit<React.ComponentProps<typeof Button>, \"size\"> & VariantProps<typeof inputGroupButtonVariants>) {\r\n return (\r\n <Button\r\n type={type}\r\n data-size={size}\r\n variant={variant}\r\n className={cn(inputGroupButtonVariants({size}), className)}\r\n {...props}\r\n />\r\n );\r\n}\r\n\r\nfunction InputGroupText({className, ...props}: React.ComponentProps<\"span\">) {\r\n return (\r\n <span\r\n className={cn(\r\n \"flex items-center gap-2 text-sm text-neutral-500 dark:text-neutral-400 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4\",\r\n className,\r\n )}\r\n {...props}\r\n />\r\n );\r\n}\r\n\r\nfunction InputGroupInput({className, ...props}: React.ComponentProps<\"input\">) {\r\n return (\r\n <Input\r\n data-slot='input-group-control'\r\n className={cn(\"flex-1 rounded-none border-0 bg-transparent shadow-none focus-visible:ring-0 dark:bg-transparent\", className)}\r\n {...props}\r\n />\r\n );\r\n}\r\n\r\nfunction InputGroupTextarea({className, ...props}: React.ComponentProps<\"textarea\">) {\r\n return (\r\n <Textarea\r\n data-slot='input-group-control'\r\n className={cn(\r\n \"flex-1 resize-none rounded-none border-0 bg-transparent py-3 shadow-none focus-visible:ring-0 dark:bg-transparent\",\r\n className,\r\n )}\r\n {...props}\r\n />\r\n );\r\n}\r\n\r\nexport {InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea};\r\n"],"names":["InputGroup","className","props","cn","inputGroupAddonVariants","cva","InputGroupAddon","align","e","inputGroupButtonVariants","InputGroupButton","type","variant","size","Button","InputGroupText","InputGroupInput","Input","InputGroupTextarea","Textarea"],"mappings":";;;;;;;;AAUA,SAASA,WAAW,EAACC,SAAS,EAAE,GAAGC,OAAmC;IACpE,OAAO,WAAP,GACE,IAAC;QACC,aAAU;QACV,MAAK;QACL,WAAWC,GACT,4NACA,8BAGA,mDACA,iDACA,kIACA,4HAGA,6MAGA,wVAEAF;QAED,GAAGC,KAAK;;AAGf;AAEA,MAAME,0BAA0BC,IAC9B,4QACA;IACE,UAAU;QACR,OAAO;YACL,gBAAgB;YAChB,cAAc;YACd,eAAe;YACf,aAAa;QACf;IACF;IACA,iBAAiB;QACf,OAAO;IACT;AACF;AAGF,SAASC,gBAAgB,EACvBL,SAAS,EACTM,QAAQ,cAAc,EACtB,GAAGL,OACwE;IAC3E,OAAO,WAAP,GACE,IAAC;QACC,MAAK;QACL,aAAU;QACV,cAAYK;QACZ,WAAWJ,GAAGC,wBAAwB;YAACG;QAAK,IAAIN;QAChD,SAAS,CAACO;YACR,IAAKA,EAAE,MAAM,CAAiB,OAAO,CAAC,WACpC;YAEFA,EAAE,aAAa,CAAC,aAAa,EAAE,cAAc,UAAU;QACzD;QACC,GAAGN,KAAK;;AAGf;AAEA,MAAMO,2BAA2BJ,IAAI,+CAA+C;IAClF,UAAU;QACR,MAAM;YACJ,IAAI;YACJ,IAAI;YACJ,WAAW;YACX,WAAW;QACb;IACF;IACA,iBAAiB;QACf,MAAM;IACR;AACF;AAEA,SAASK,iBAAiB,EACxBT,SAAS,EACTU,OAAO,QAAQ,EACfC,UAAU,OAAO,EACjBC,OAAO,IAAI,EACX,GAAGX,OAC+F;IAClG,OAAO,WAAP,GACE,IAACY,QAAMA;QACL,MAAMH;QACN,aAAWE;QACX,SAASD;QACT,WAAWT,GAAGM,yBAAyB;YAACI;QAAI,IAAIZ;QAC/C,GAAGC,KAAK;;AAGf;AAEA,SAASa,eAAe,EAACd,SAAS,EAAE,GAAGC,OAAoC;IACzE,OAAO,WAAP,GACE,IAAC;QACC,WAAWC,GACT,2IACAF;QAED,GAAGC,KAAK;;AAGf;AAEA,SAASc,gBAAgB,EAACf,SAAS,EAAE,GAAGC,OAAqC;IAC3E,OAAO,WAAP,GACE,IAACe,OAAKA;QACJ,aAAU;QACV,WAAWd,GAAG,oGAAoGF;QACjH,GAAGC,KAAK;;AAGf;AAEA,SAASgB,mBAAmB,EAACjB,SAAS,EAAE,GAAGC,OAAwC;IACjF,OAAO,WAAP,GACE,IAACiB,UAAQA;QACP,aAAU;QACV,WAAWhB,GACT,qHACAF;QAED,GAAGC,KAAK;;AAGf"}
|
|
@@ -1,12 +1,35 @@
|
|
|
1
|
-
import { OTPInput } from "input-otp";
|
|
2
1
|
import * as React from "react";
|
|
3
|
-
declare
|
|
2
|
+
declare const InputOTP: React.ForwardRefExoticComponent<(Omit<Omit<React.InputHTMLAttributes<HTMLInputElement>, "onChange" | "value" | "maxLength" | "textAlign" | "onComplete" | "pushPasswordManagerStrategy" | "pasteTransformer" | "containerClassName" | "noScriptCSSFallback"> & {
|
|
3
|
+
value?: string;
|
|
4
|
+
onChange?: (newValue: string) => unknown;
|
|
5
|
+
maxLength: number;
|
|
6
|
+
textAlign?: "left" | "center" | "right";
|
|
7
|
+
onComplete?: (...args: any[]) => unknown;
|
|
8
|
+
pushPasswordManagerStrategy?: "increase-width" | "none";
|
|
9
|
+
pasteTransformer?: (pasted: string) => string;
|
|
4
10
|
containerClassName?: string;
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
11
|
+
noScriptCSSFallback?: string | null;
|
|
12
|
+
} & {
|
|
13
|
+
render: (props: import("input-otp").RenderProps) => React.ReactNode;
|
|
14
|
+
children?: never;
|
|
15
|
+
} & React.RefAttributes<HTMLInputElement>, "ref"> | Omit<Omit<React.InputHTMLAttributes<HTMLInputElement>, "onChange" | "value" | "maxLength" | "textAlign" | "onComplete" | "pushPasswordManagerStrategy" | "pasteTransformer" | "containerClassName" | "noScriptCSSFallback"> & {
|
|
16
|
+
value?: string;
|
|
17
|
+
onChange?: (newValue: string) => unknown;
|
|
18
|
+
maxLength: number;
|
|
19
|
+
textAlign?: "left" | "center" | "right";
|
|
20
|
+
onComplete?: (...args: any[]) => unknown;
|
|
21
|
+
pushPasswordManagerStrategy?: "increase-width" | "none";
|
|
22
|
+
pasteTransformer?: (pasted: string) => string;
|
|
23
|
+
containerClassName?: string;
|
|
24
|
+
noScriptCSSFallback?: string | null;
|
|
25
|
+
} & {
|
|
26
|
+
render?: never;
|
|
27
|
+
children: React.ReactNode;
|
|
28
|
+
} & React.RefAttributes<HTMLInputElement>, "ref">) & React.RefAttributes<HTMLInputElement>>;
|
|
29
|
+
declare const InputOTPGroup: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
30
|
+
declare const InputOTPSlot: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
8
31
|
index: number;
|
|
9
|
-
}
|
|
10
|
-
declare
|
|
32
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
33
|
+
declare const InputOTPSeparator: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
11
34
|
export { InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot };
|
|
12
35
|
//# sourceMappingURL=input-otp.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input-otp.d.ts","sourceRoot":"","sources":["../../../src/components/ui/input-otp.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"input-otp.d.ts","sourceRoot":"","sources":["../../../src/components/ui/input-otp.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,QAAA,MAAM,QAAQ;;;;;kBAK4C,GAAG;;;;;;;;;;;;;kBAAH,GAAG;;;;;;;;2FAI5D,CAAC;AAGF,QAAA,MAAM,aAAa,mKAMjB,CAAC;AAGH,QAAA,MAAM,YAAY;WAA+F,MAAM;wCAuBtH,CAAC;AAGF,QAAA,MAAM,iBAAiB,mKAOrB,CAAC;AAGH,OAAO,EAAC,QAAQ,EAAE,aAAa,EAAE,iBAAiB,EAAE,YAAY,EAAC,CAAC"}
|
|
@@ -1,31 +1,28 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { OTPInput, OTPInputContext } from "input-otp";
|
|
4
|
-
import {
|
|
5
|
-
import { useContext } from "react";
|
|
4
|
+
import { Minus } from "lucide-react";
|
|
5
|
+
import { forwardRef, useContext } from "react";
|
|
6
6
|
import { cn } from "../../lib/utilities.js";
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
containerClassName: cn("flex items-center gap-2 has-disabled:opacity-50", containerClassName),
|
|
7
|
+
const InputOTP = /*#__PURE__*/ forwardRef(({ className, containerClassName, ...props }, ref)=>/*#__PURE__*/ jsx(OTPInput, {
|
|
8
|
+
ref: ref,
|
|
9
|
+
containerClassName: cn("flex items-center gap-2 has-[:disabled]:opacity-50", containerClassName),
|
|
11
10
|
className: cn("disabled:cursor-not-allowed", className),
|
|
12
11
|
...props
|
|
13
|
-
});
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
"data-slot": "input-otp-group",
|
|
12
|
+
}));
|
|
13
|
+
InputOTP.displayName = "InputOTP";
|
|
14
|
+
const InputOTPGroup = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsx("div", {
|
|
15
|
+
ref: ref,
|
|
18
16
|
className: cn("flex items-center", className),
|
|
19
17
|
...props
|
|
20
|
-
});
|
|
21
|
-
|
|
22
|
-
|
|
18
|
+
}));
|
|
19
|
+
InputOTPGroup.displayName = "InputOTPGroup";
|
|
20
|
+
const InputOTPSlot = /*#__PURE__*/ forwardRef(({ index, className, ...props }, ref)=>{
|
|
23
21
|
const inputOTPContext = useContext(OTPInputContext);
|
|
24
|
-
const { char, hasFakeCaret, isActive } = inputOTPContext
|
|
22
|
+
const { char, hasFakeCaret, isActive } = inputOTPContext.slots[index];
|
|
25
23
|
return /*#__PURE__*/ jsxs("div", {
|
|
26
|
-
|
|
27
|
-
"
|
|
28
|
-
className: cn("relative flex h-9 w-9 items-center justify-center border-y border-r border-neutral-200 text-sm shadow-xs transition-all outline-none first:rounded-l-md first:border-l last:rounded-r-md aria-invalid:border-red-500 data-[active=true]:z-10 data-[active=true]:border-neutral-950 data-[active=true]:ring-[3px] data-[active=true]:ring-neutral-950/50 data-[active=true]:aria-invalid:border-red-500 data-[active=true]:aria-invalid:ring-red-500/20 dark:border-neutral-800 dark:bg-neutral-200/30 dark:dark:bg-neutral-800/30 dark:aria-invalid:border-red-900 dark:data-[active=true]:border-neutral-300 dark:data-[active=true]:ring-neutral-300/50 dark:data-[active=true]:aria-invalid:border-red-900 dark:dark:data-[active=true]:aria-invalid:ring-red-900/40 dark:data-[active=true]:aria-invalid:ring-red-500/40 dark:data-[active=true]:aria-invalid:ring-red-900/20", className),
|
|
24
|
+
ref: ref,
|
|
25
|
+
className: cn("relative flex h-9 w-9 items-center justify-center border-y border-r border-neutral-200 text-sm shadow-sm transition-all first:rounded-l-md first:border-l last:rounded-r-md dark:border-neutral-800", isActive && "z-10 ring-1 ring-neutral-950 dark:ring-neutral-300", className),
|
|
29
26
|
...props,
|
|
30
27
|
children: [
|
|
31
28
|
char,
|
|
@@ -37,15 +34,15 @@ function InputOTPSlot({ index, className, ...props }) {
|
|
|
37
34
|
})
|
|
38
35
|
]
|
|
39
36
|
});
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
37
|
+
});
|
|
38
|
+
InputOTPSlot.displayName = "InputOTPSlot";
|
|
39
|
+
const InputOTPSeparator = /*#__PURE__*/ forwardRef(({ ...props }, ref)=>/*#__PURE__*/ jsx("div", {
|
|
40
|
+
ref: ref,
|
|
44
41
|
role: "separator",
|
|
45
42
|
...props,
|
|
46
|
-
children: /*#__PURE__*/ jsx(
|
|
47
|
-
});
|
|
48
|
-
|
|
43
|
+
children: /*#__PURE__*/ jsx(Minus, {})
|
|
44
|
+
}));
|
|
45
|
+
InputOTPSeparator.displayName = "InputOTPSeparator";
|
|
49
46
|
export { InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot };
|
|
50
47
|
|
|
51
48
|
//# sourceMappingURL=input-otp.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components\\ui\\input-otp.js","sources":["webpack://@arolariu/components/./src/components/ui/input-otp.tsx"],"sourcesContent":["\r\n\r\nimport {OTPInput, OTPInputContext} from \"input-otp\";\r\nimport {
|
|
1
|
+
{"version":3,"file":"components\\ui\\input-otp.js","sources":["webpack://@arolariu/components/./src/components/ui/input-otp.tsx"],"sourcesContent":["\r\n\r\nimport {OTPInput, OTPInputContext} from \"input-otp\";\r\nimport {Minus} from \"lucide-react\";\r\nimport * as React from \"react\";\r\n\r\nimport {cn} from \"@/lib/utilities\";\r\n\r\nconst InputOTP = React.forwardRef<React.ComponentRef<typeof OTPInput>, React.ComponentPropsWithoutRef<typeof OTPInput>>(\r\n ({className, containerClassName, ...props}, ref) => (\r\n <OTPInput\r\n ref={ref}\r\n containerClassName={cn(\"flex items-center gap-2 has-[:disabled]:opacity-50\", containerClassName)}\r\n className={cn(\"disabled:cursor-not-allowed\", className)}\r\n {...props}\r\n />\r\n ),\r\n);\r\nInputOTP.displayName = \"InputOTP\";\r\n\r\nconst InputOTPGroup = React.forwardRef<React.ComponentRef<\"div\">, React.ComponentPropsWithoutRef<\"div\">>(({className, ...props}, ref) => (\r\n <div\r\n ref={ref}\r\n className={cn(\"flex items-center\", className)}\r\n {...props}\r\n />\r\n));\r\nInputOTPGroup.displayName = \"InputOTPGroup\";\r\n\r\nconst InputOTPSlot = React.forwardRef<React.ComponentRef<\"div\">, React.ComponentPropsWithoutRef<\"div\"> & {index: number}>(\r\n ({index, className, ...props}, ref) => {\r\n const inputOTPContext = React.useContext(OTPInputContext);\r\n const {char, hasFakeCaret, isActive} = inputOTPContext.slots[index];\r\n\r\n return (\r\n <div\r\n ref={ref}\r\n className={cn(\r\n \"relative flex h-9 w-9 items-center justify-center border-y border-r border-neutral-200 text-sm shadow-sm transition-all first:rounded-l-md first:border-l last:rounded-r-md dark:border-neutral-800\",\r\n isActive && \"z-10 ring-1 ring-neutral-950 dark:ring-neutral-300\",\r\n className,\r\n )}\r\n {...props}>\r\n {char}\r\n {Boolean(hasFakeCaret) && (\r\n <div className='pointer-events-none absolute inset-0 flex items-center justify-center'>\r\n <div className='animate-caret-blink h-4 w-px bg-neutral-950 duration-1000 dark:bg-neutral-50' />\r\n </div>\r\n )}\r\n </div>\r\n );\r\n },\r\n);\r\nInputOTPSlot.displayName = \"InputOTPSlot\";\r\n\r\nconst InputOTPSeparator = React.forwardRef<React.ComponentRef<\"div\">, React.ComponentPropsWithoutRef<\"div\">>(({...props}, ref) => (\r\n <div\r\n ref={ref}\r\n role='separator'\r\n {...props}>\r\n <Minus />\r\n </div>\r\n));\r\nInputOTPSeparator.displayName = \"InputOTPSeparator\";\r\n\r\nexport {InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot};\r\n"],"names":["InputOTP","React","className","containerClassName","props","ref","OTPInput","cn","InputOTPGroup","InputOTPSlot","index","inputOTPContext","OTPInputContext","char","hasFakeCaret","isActive","Boolean","InputOTPSeparator","Minus"],"mappings":";;;;;;AAQA,MAAMA,WAAW,WAAXA,GAAWC,WACf,CAAC,EAACC,SAAS,EAAEC,kBAAkB,EAAE,GAAGC,OAAM,EAAEC,MAAAA,WAAAA,GAC1C,IAACC,UAAQA;QACP,KAAKD;QACL,oBAAoBE,GAAG,sDAAsDJ;QAC7E,WAAWI,GAAG,+BAA+BL;QAC5C,GAAGE,KAAK;;AAIfJ,SAAS,WAAW,GAAG;AAEvB,MAAMQ,gBAAgB,WAAhBA,GAAgBP,WAAmF,CAAC,EAACC,SAAS,EAAE,GAAGE,OAAM,EAAEC,MAAAA,WAAAA,GAC/H,IAAC;QACC,KAAKA;QACL,WAAWE,GAAG,qBAAqBL;QAClC,GAAGE,KAAK;;AAGbI,cAAc,WAAW,GAAG;AAE5B,MAAMC,eAAe,WAAfA,GAAeR,WACnB,CAAC,EAACS,KAAK,EAAER,SAAS,EAAE,GAAGE,OAAM,EAAEC;IAC7B,MAAMM,kBAAkBV,WAAiBW;IACzC,MAAM,EAACC,IAAI,EAAEC,YAAY,EAAEC,QAAQ,EAAC,GAAGJ,gBAAgB,KAAK,CAACD,MAAM;IAEnE,OAAO,WAAP,GACE,KAAC;QACC,KAAKL;QACL,WAAWE,GACT,uMACAQ,YAAY,sDACZb;QAED,GAAGE,KAAK;;YACRS;YACAG,QAAQF,iBAAiB,WAAjBA,GACP,IAAC;gBAAI,WAAU;0BACb,kBAAC;oBAAI,WAAU;;;;;AAKzB;AAEFL,aAAa,WAAW,GAAG;AAE3B,MAAMQ,oBAAoB,WAApBA,GAAoBhB,WAAmF,CAAC,EAAC,GAAGG,OAAM,EAAEC,MAAAA,WAAAA,GACxH,IAAC;QACC,KAAKA;QACL,MAAK;QACJ,GAAGD,KAAK;kBACT,kBAACc,OAAKA,CAAAA;;AAGVD,kBAAkB,WAAW,GAAG"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
declare
|
|
2
|
+
declare const Input: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
3
3
|
export { Input };
|
|
4
4
|
//# sourceMappingURL=input.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../../src/components/ui/input.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,
|
|
1
|
+
{"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../../src/components/ui/input.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,QAAA,MAAM,KAAK,8KAYT,CAAC;AAGH,OAAO,EAAC,KAAK,EAAC,CAAC"}
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
3
|
import { cn } from "../../lib/utilities.js";
|
|
4
|
-
import "react";
|
|
5
|
-
|
|
6
|
-
return /*#__PURE__*/ jsx("input", {
|
|
4
|
+
import { forwardRef } from "react";
|
|
5
|
+
const Input = /*#__PURE__*/ forwardRef(({ className, type, ...props }, ref)=>/*#__PURE__*/ jsx("input", {
|
|
7
6
|
type: type,
|
|
8
|
-
"
|
|
9
|
-
|
|
7
|
+
className: cn("flex h-9 w-full rounded-md border border-neutral-200 bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-neutral-950 placeholder:text-neutral-500 focus-visible:ring-1 focus-visible:ring-neutral-950 focus-visible:outline-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:focus-visible:ring-neutral-300", className),
|
|
8
|
+
ref: ref,
|
|
10
9
|
...props
|
|
11
|
-
});
|
|
12
|
-
|
|
10
|
+
}));
|
|
11
|
+
Input.displayName = "Input";
|
|
13
12
|
export { Input };
|
|
14
13
|
|
|
15
14
|
//# sourceMappingURL=input.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components\\ui\\input.js","sources":["webpack://@arolariu/components/./src/components/ui/input.tsx"],"sourcesContent":["\r\n\r\nimport {cn} from \"@/lib/utilities\";\r\nimport * as React from \"react\";\r\n\r\
|
|
1
|
+
{"version":3,"file":"components\\ui\\input.js","sources":["webpack://@arolariu/components/./src/components/ui/input.tsx"],"sourcesContent":["\r\n\r\nimport {cn} from \"@/lib/utilities\";\r\nimport * as React from \"react\";\r\n\r\nconst Input = React.forwardRef<HTMLInputElement, React.ComponentProps<\"input\">>(({className, type, ...props}, ref) => {\r\n return (\r\n <input\r\n type={type}\r\n className={cn(\r\n \"flex h-9 w-full rounded-md border border-neutral-200 bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-neutral-950 placeholder:text-neutral-500 focus-visible:ring-1 focus-visible:ring-neutral-950 focus-visible:outline-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:focus-visible:ring-neutral-300\",\r\n className,\r\n )}\r\n ref={ref}\r\n {...props}\r\n />\r\n );\r\n});\r\nInput.displayName = \"Input\";\r\n\r\nexport {Input};\r\n"],"names":["Input","React","className","type","props","ref","cn"],"mappings":";;;;AAKA,MAAMA,QAAQ,WAARA,GAAQC,WAAkE,CAAC,EAACC,SAAS,EAAEC,IAAI,EAAE,GAAGC,OAAM,EAAEC,MACrG,WAAP,GACE,IAAC;QACC,MAAMF;QACN,WAAWG,GACT,4eACAJ;QAEF,KAAKG;QACJ,GAAGD,KAAK;;AAIfJ,MAAM,WAAW,GAAG"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { type VariantProps } from "class-variance-authority";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { Separator } from "./separator";
|
|
4
|
+
declare function ItemGroup({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
declare function ItemSeparator({ className, ...props }: React.ComponentProps<typeof Separator>): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
declare const itemVariants: (props?: {
|
|
7
|
+
variant?: "default" | "outline" | "muted";
|
|
8
|
+
size?: "default" | "sm";
|
|
9
|
+
} & import("class-variance-authority/types").ClassProp) => string;
|
|
10
|
+
declare function Item({ className, variant, size, asChild, ...props }: React.ComponentProps<"div"> & VariantProps<typeof itemVariants> & {
|
|
11
|
+
asChild?: boolean;
|
|
12
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
declare const itemMediaVariants: (props?: {
|
|
14
|
+
variant?: "image" | "default" | "icon";
|
|
15
|
+
} & import("class-variance-authority/types").ClassProp) => string;
|
|
16
|
+
declare function ItemMedia({ className, variant, ...props }: React.ComponentProps<"div"> & VariantProps<typeof itemMediaVariants>): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
declare function ItemContent({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
declare function ItemTitle({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
declare function ItemDescription({ className, ...props }: React.ComponentProps<"p">): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
declare function ItemActions({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
declare function ItemHeader({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
declare function ItemFooter({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
export { Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemSeparator, ItemTitle };
|
|
24
|
+
//# sourceMappingURL=item.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"item.d.ts","sourceRoot":"","sources":["../../../src/components/ui/item.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAM,KAAK,YAAY,EAAC,MAAM,0BAA0B,CAAC;AAChE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAC,SAAS,EAAC,MAAM,2BAA2B,CAAC;AAGpD,iBAAS,SAAS,CAAC,EAAC,SAAS,EAAE,GAAG,KAAK,EAAC,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,2CASpE;AAED,iBAAS,aAAa,CAAC,EAAC,SAAS,EAAE,GAAG,KAAK,EAAC,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,SAAS,CAAC,2CASnF;AAED,QAAA,MAAM,YAAY;;;iEAmBjB,CAAC;AAEF,iBAAS,IAAI,CAAC,EACZ,SAAS,EACT,OAAmB,EACnB,IAAgB,EAChB,OAAe,EACf,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG,YAAY,CAAC,OAAO,YAAY,CAAC,GAAG;IAAC,OAAO,CAAC,EAAE,OAAO,CAAA;CAAC,2CAWvF;AAED,QAAA,MAAM,iBAAiB;;iEActB,CAAC;AAEF,iBAAS,SAAS,CAAC,EAAC,SAAS,EAAE,OAAmB,EAAE,GAAG,KAAK,EAAC,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG,YAAY,CAAC,OAAO,iBAAiB,CAAC,2CASlI;AAED,iBAAS,WAAW,CAAC,EAAC,SAAS,EAAE,GAAG,KAAK,EAAC,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,2CAQtE;AAED,iBAAS,SAAS,CAAC,EAAC,SAAS,EAAE,GAAG,KAAK,EAAC,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,2CAQpE;AAED,iBAAS,eAAe,CAAC,EAAC,SAAS,EAAE,GAAG,KAAK,EAAC,EAAE,KAAK,CAAC,cAAc,CAAC,GAAG,CAAC,2CAYxE;AAED,iBAAS,WAAW,CAAC,EAAC,SAAS,EAAE,GAAG,KAAK,EAAC,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,2CAQtE;AAED,iBAAS,UAAU,CAAC,EAAC,SAAS,EAAE,GAAG,KAAK,EAAC,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,2CAQrE;AAED,iBAAS,UAAU,CAAC,EAAC,SAAS,EAAE,GAAG,KAAK,EAAC,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,2CAQrE;AAED,OAAO,EAAC,IAAI,EAAE,WAAW,EAAE,WAAW,EAAE,eAAe,EAAE,UAAU,EAAE,SAAS,EAAE,UAAU,EAAE,SAAS,EAAE,aAAa,EAAE,SAAS,EAAC,CAAC"}
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { Slot } from "@radix-ui/react-slot";
|
|
4
|
+
import { cva } from "class-variance-authority";
|
|
5
|
+
import "react";
|
|
6
|
+
import { Separator } from "./separator.js";
|
|
7
|
+
import { cn } from "../../lib/utilities.js";
|
|
8
|
+
function ItemGroup({ className, ...props }) {
|
|
9
|
+
return /*#__PURE__*/ jsx("div", {
|
|
10
|
+
role: "list",
|
|
11
|
+
"data-slot": "item-group",
|
|
12
|
+
className: cn("group/item-group flex flex-col", className),
|
|
13
|
+
...props
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
function ItemSeparator({ className, ...props }) {
|
|
17
|
+
return /*#__PURE__*/ jsx(Separator, {
|
|
18
|
+
"data-slot": "item-separator",
|
|
19
|
+
orientation: "horizontal",
|
|
20
|
+
className: cn("my-0", className),
|
|
21
|
+
...props
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
const itemVariants = cva("group/item [a]:hover:bg-neutral-100/50 focus-visible:border-neutral-950 focus-visible:ring-neutral-950/50 [a]:transition-colors flex flex-wrap items-center rounded-md border border-neutral-200 border-transparent text-sm outline-none transition-colors duration-100 focus-visible:ring-[3px] dark:[a]:hover:bg-neutral-800/50 dark:focus-visible:border-neutral-300 dark:focus-visible:ring-neutral-300/50 dark:border-neutral-800", {
|
|
25
|
+
variants: {
|
|
26
|
+
variant: {
|
|
27
|
+
default: "bg-transparent",
|
|
28
|
+
outline: "border-neutral-200 dark:border-neutral-800",
|
|
29
|
+
muted: "bg-neutral-100/50 dark:bg-neutral-800/50"
|
|
30
|
+
},
|
|
31
|
+
size: {
|
|
32
|
+
default: "gap-4 p-4",
|
|
33
|
+
sm: "gap-2.5 px-4 py-3"
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
defaultVariants: {
|
|
37
|
+
variant: "default",
|
|
38
|
+
size: "default"
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
function Item({ className, variant = "default", size = "default", asChild = false, ...props }) {
|
|
42
|
+
const Comp = asChild ? Slot : "div";
|
|
43
|
+
return /*#__PURE__*/ jsx(Comp, {
|
|
44
|
+
"data-slot": "item",
|
|
45
|
+
"data-variant": variant,
|
|
46
|
+
"data-size": size,
|
|
47
|
+
className: cn(itemVariants({
|
|
48
|
+
variant,
|
|
49
|
+
size,
|
|
50
|
+
className
|
|
51
|
+
})),
|
|
52
|
+
...props
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
const itemMediaVariants = cva("flex shrink-0 items-center justify-center gap-2 group-has-[[data-slot=item-description]]/item:translate-y-0.5 group-has-[[data-slot=item-description]]/item:self-start [&_svg]:pointer-events-none", {
|
|
56
|
+
variants: {
|
|
57
|
+
variant: {
|
|
58
|
+
default: "bg-transparent",
|
|
59
|
+
icon: "bg-neutral-100 size-8 rounded-sm border border-neutral-200 [&_svg:not([class*='size-'])]:size-4 dark:bg-neutral-800 dark:border-neutral-800",
|
|
60
|
+
image: "size-10 overflow-hidden rounded-sm [&_img]:size-full [&_img]:object-cover"
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
defaultVariants: {
|
|
64
|
+
variant: "default"
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
function ItemMedia({ className, variant = "default", ...props }) {
|
|
68
|
+
return /*#__PURE__*/ jsx("div", {
|
|
69
|
+
"data-slot": "item-media",
|
|
70
|
+
"data-variant": variant,
|
|
71
|
+
className: cn(itemMediaVariants({
|
|
72
|
+
variant,
|
|
73
|
+
className
|
|
74
|
+
})),
|
|
75
|
+
...props
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
function ItemContent({ className, ...props }) {
|
|
79
|
+
return /*#__PURE__*/ jsx("div", {
|
|
80
|
+
"data-slot": "item-content",
|
|
81
|
+
className: cn("flex flex-1 flex-col gap-1 [&+[data-slot=item-content]]:flex-none", className),
|
|
82
|
+
...props
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
function ItemTitle({ className, ...props }) {
|
|
86
|
+
return /*#__PURE__*/ jsx("div", {
|
|
87
|
+
"data-slot": "item-title",
|
|
88
|
+
className: cn("flex w-fit items-center gap-2 text-sm leading-snug font-medium", className),
|
|
89
|
+
...props
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
function ItemDescription({ className, ...props }) {
|
|
93
|
+
return /*#__PURE__*/ jsx("p", {
|
|
94
|
+
"data-slot": "item-description",
|
|
95
|
+
className: cn("line-clamp-2 text-sm leading-normal font-normal text-balance text-neutral-500 dark:text-neutral-400", "[&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-neutral-900 dark:[&>a:hover]:text-neutral-50", className),
|
|
96
|
+
...props
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
function ItemActions({ className, ...props }) {
|
|
100
|
+
return /*#__PURE__*/ jsx("div", {
|
|
101
|
+
"data-slot": "item-actions",
|
|
102
|
+
className: cn("flex items-center gap-2", className),
|
|
103
|
+
...props
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
function ItemHeader({ className, ...props }) {
|
|
107
|
+
return /*#__PURE__*/ jsx("div", {
|
|
108
|
+
"data-slot": "item-header",
|
|
109
|
+
className: cn("flex basis-full items-center justify-between gap-2", className),
|
|
110
|
+
...props
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
function ItemFooter({ className, ...props }) {
|
|
114
|
+
return /*#__PURE__*/ jsx("div", {
|
|
115
|
+
"data-slot": "item-footer",
|
|
116
|
+
className: cn("flex basis-full items-center justify-between gap-2", className),
|
|
117
|
+
...props
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
export { Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemSeparator, ItemTitle };
|
|
121
|
+
|
|
122
|
+
//# sourceMappingURL=item.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"components\\ui\\item.js","sources":["webpack://@arolariu/components/./src/components/ui/item.tsx"],"sourcesContent":["\r\n\r\nimport {Slot} from \"@radix-ui/react-slot\";\r\nimport {cva, type VariantProps} from \"class-variance-authority\";\r\nimport * as React from \"react\";\r\n\r\nimport {Separator} from \"@/components/ui/separator\";\r\nimport {cn} from \"@/lib/utilities\";\r\n\r\nfunction ItemGroup({className, ...props}: React.ComponentProps<\"div\">) {\r\n return (\r\n <div\r\n role='list'\r\n data-slot='item-group'\r\n className={cn(\"group/item-group flex flex-col\", className)}\r\n {...props}\r\n />\r\n );\r\n}\r\n\r\nfunction ItemSeparator({className, ...props}: React.ComponentProps<typeof Separator>) {\r\n return (\r\n <Separator\r\n data-slot='item-separator'\r\n orientation='horizontal'\r\n className={cn(\"my-0\", className)}\r\n {...props}\r\n />\r\n );\r\n}\r\n\r\nconst itemVariants = cva(\r\n \"group/item [a]:hover:bg-neutral-100/50 focus-visible:border-neutral-950 focus-visible:ring-neutral-950/50 [a]:transition-colors flex flex-wrap items-center rounded-md border border-neutral-200 border-transparent text-sm outline-none transition-colors duration-100 focus-visible:ring-[3px] dark:[a]:hover:bg-neutral-800/50 dark:focus-visible:border-neutral-300 dark:focus-visible:ring-neutral-300/50 dark:border-neutral-800\",\r\n {\r\n variants: {\r\n variant: {\r\n default: \"bg-transparent\",\r\n outline: \"border-neutral-200 dark:border-neutral-800\",\r\n muted: \"bg-neutral-100/50 dark:bg-neutral-800/50\",\r\n },\r\n size: {\r\n default: \"gap-4 p-4\",\r\n sm: \"gap-2.5 px-4 py-3\",\r\n },\r\n },\r\n defaultVariants: {\r\n variant: \"default\",\r\n size: \"default\",\r\n },\r\n },\r\n);\r\n\r\nfunction Item({\r\n className,\r\n variant = \"default\",\r\n size = \"default\",\r\n asChild = false,\r\n ...props\r\n}: React.ComponentProps<\"div\"> & VariantProps<typeof itemVariants> & {asChild?: boolean}) {\r\n const Comp = asChild ? Slot : \"div\";\r\n return (\r\n <Comp\r\n data-slot='item'\r\n data-variant={variant}\r\n data-size={size}\r\n className={cn(itemVariants({variant, size, className}))}\r\n {...props}\r\n />\r\n );\r\n}\r\n\r\nconst itemMediaVariants = cva(\r\n \"flex shrink-0 items-center justify-center gap-2 group-has-[[data-slot=item-description]]/item:translate-y-0.5 group-has-[[data-slot=item-description]]/item:self-start [&_svg]:pointer-events-none\",\r\n {\r\n variants: {\r\n variant: {\r\n default: \"bg-transparent\",\r\n icon: \"bg-neutral-100 size-8 rounded-sm border border-neutral-200 [&_svg:not([class*='size-'])]:size-4 dark:bg-neutral-800 dark:border-neutral-800\",\r\n image: \"size-10 overflow-hidden rounded-sm [&_img]:size-full [&_img]:object-cover\",\r\n },\r\n },\r\n defaultVariants: {\r\n variant: \"default\",\r\n },\r\n },\r\n);\r\n\r\nfunction ItemMedia({className, variant = \"default\", ...props}: React.ComponentProps<\"div\"> & VariantProps<typeof itemMediaVariants>) {\r\n return (\r\n <div\r\n data-slot='item-media'\r\n data-variant={variant}\r\n className={cn(itemMediaVariants({variant, className}))}\r\n {...props}\r\n />\r\n );\r\n}\r\n\r\nfunction ItemContent({className, ...props}: React.ComponentProps<\"div\">) {\r\n return (\r\n <div\r\n data-slot='item-content'\r\n className={cn(\"flex flex-1 flex-col gap-1 [&+[data-slot=item-content]]:flex-none\", className)}\r\n {...props}\r\n />\r\n );\r\n}\r\n\r\nfunction ItemTitle({className, ...props}: React.ComponentProps<\"div\">) {\r\n return (\r\n <div\r\n data-slot='item-title'\r\n className={cn(\"flex w-fit items-center gap-2 text-sm leading-snug font-medium\", className)}\r\n {...props}\r\n />\r\n );\r\n}\r\n\r\nfunction ItemDescription({className, ...props}: React.ComponentProps<\"p\">) {\r\n return (\r\n <p\r\n data-slot='item-description'\r\n className={cn(\r\n \"line-clamp-2 text-sm leading-normal font-normal text-balance text-neutral-500 dark:text-neutral-400\",\r\n \"[&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-neutral-900 dark:[&>a:hover]:text-neutral-50\",\r\n className,\r\n )}\r\n {...props}\r\n />\r\n );\r\n}\r\n\r\nfunction ItemActions({className, ...props}: React.ComponentProps<\"div\">) {\r\n return (\r\n <div\r\n data-slot='item-actions'\r\n className={cn(\"flex items-center gap-2\", className)}\r\n {...props}\r\n />\r\n );\r\n}\r\n\r\nfunction ItemHeader({className, ...props}: React.ComponentProps<\"div\">) {\r\n return (\r\n <div\r\n data-slot='item-header'\r\n className={cn(\"flex basis-full items-center justify-between gap-2\", className)}\r\n {...props}\r\n />\r\n );\r\n}\r\n\r\nfunction ItemFooter({className, ...props}: React.ComponentProps<\"div\">) {\r\n return (\r\n <div\r\n data-slot='item-footer'\r\n className={cn(\"flex basis-full items-center justify-between gap-2\", className)}\r\n {...props}\r\n />\r\n );\r\n}\r\n\r\nexport {Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemSeparator, ItemTitle};\r\n"],"names":["ItemGroup","className","props","cn","ItemSeparator","Separator","itemVariants","cva","Item","variant","size","asChild","Comp","Slot","itemMediaVariants","ItemMedia","ItemContent","ItemTitle","ItemDescription","ItemActions","ItemHeader","ItemFooter"],"mappings":";;;;;;;AASA,SAASA,UAAU,EAACC,SAAS,EAAE,GAAGC,OAAmC;IACnE,OAAO,WAAP,GACE,IAAC;QACC,MAAK;QACL,aAAU;QACV,WAAWC,GAAG,kCAAkCF;QAC/C,GAAGC,KAAK;;AAGf;AAEA,SAASE,cAAc,EAACH,SAAS,EAAE,GAAGC,OAA8C;IAClF,OAAO,WAAP,GACE,IAACG,WAASA;QACR,aAAU;QACV,aAAY;QACZ,WAAWF,GAAG,QAAQF;QACrB,GAAGC,KAAK;;AAGf;AAEA,MAAMI,eAAeC,IACnB,0aACA;IACE,UAAU;QACR,SAAS;YACP,SAAS;YACT,SAAS;YACT,OAAO;QACT;QACA,MAAM;YACJ,SAAS;YACT,IAAI;QACN;IACF;IACA,iBAAiB;QACf,SAAS;QACT,MAAM;IACR;AACF;AAGF,SAASC,KAAK,EACZP,SAAS,EACTQ,UAAU,SAAS,EACnBC,OAAO,SAAS,EAChBC,UAAU,KAAK,EACf,GAAGT,OACmF;IACtF,MAAMU,OAAOD,UAAUE,OAAO;IAC9B,OAAO,WAAP,GACE,IAACD,MAAAA;QACC,aAAU;QACV,gBAAcH;QACd,aAAWC;QACX,WAAWP,GAAGG,aAAa;YAACG;YAASC;YAAMT;QAAS;QACnD,GAAGC,KAAK;;AAGf;AAEA,MAAMY,oBAAoBP,IACxB,sMACA;IACE,UAAU;QACR,SAAS;YACP,SAAS;YACT,MAAM;YACN,OAAO;QACT;IACF;IACA,iBAAiB;QACf,SAAS;IACX;AACF;AAGF,SAASQ,UAAU,EAACd,SAAS,EAAEQ,UAAU,SAAS,EAAE,GAAGP,OAA4E;IACjI,OAAO,WAAP,GACE,IAAC;QACC,aAAU;QACV,gBAAcO;QACd,WAAWN,GAAGW,kBAAkB;YAACL;YAASR;QAAS;QAClD,GAAGC,KAAK;;AAGf;AAEA,SAASc,YAAY,EAACf,SAAS,EAAE,GAAGC,OAAmC;IACrE,OAAO,WAAP,GACE,IAAC;QACC,aAAU;QACV,WAAWC,GAAG,qEAAqEF;QAClF,GAAGC,KAAK;;AAGf;AAEA,SAASe,UAAU,EAAChB,SAAS,EAAE,GAAGC,OAAmC;IACnE,OAAO,WAAP,GACE,IAAC;QACC,aAAU;QACV,WAAWC,GAAG,kEAAkEF;QAC/E,GAAGC,KAAK;;AAGf;AAEA,SAASgB,gBAAgB,EAACjB,SAAS,EAAE,GAAGC,OAAiC;IACvE,OAAO,WAAP,GACE,IAAC;QACC,aAAU;QACV,WAAWC,GACT,uGACA,0GACAF;QAED,GAAGC,KAAK;;AAGf;AAEA,SAASiB,YAAY,EAAClB,SAAS,EAAE,GAAGC,OAAmC;IACrE,OAAO,WAAP,GACE,IAAC;QACC,aAAU;QACV,WAAWC,GAAG,2BAA2BF;QACxC,GAAGC,KAAK;;AAGf;AAEA,SAASkB,WAAW,EAACnB,SAAS,EAAE,GAAGC,OAAmC;IACpE,OAAO,WAAP,GACE,IAAC;QACC,aAAU;QACV,WAAWC,GAAG,sDAAsDF;QACnE,GAAGC,KAAK;;AAGf;AAEA,SAASmB,WAAW,EAACpB,SAAS,EAAE,GAAGC,OAAmC;IACpE,OAAO,WAAP,GACE,IAAC;QACC,aAAU;QACV,WAAWC,GAAG,sDAAsDF;QACnE,GAAGC,KAAK;;AAGf"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
declare function Kbd({ className, ...props }: React.ComponentProps<"kbd">): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
declare function KbdGroup({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
export { Kbd, KbdGroup };
|
|
5
|
+
//# sourceMappingURL=kbd.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kbd.d.ts","sourceRoot":"","sources":["../../../src/components/ui/kbd.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,iBAAS,GAAG,CAAC,EAAC,SAAS,EAAE,GAAG,KAAK,EAAC,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,2CAa9D;AAED,iBAAS,QAAQ,CAAC,EAAC,SAAS,EAAE,GAAG,KAAK,EAAC,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,2CAQnE;AAED,OAAO,EAAC,GAAG,EAAE,QAAQ,EAAC,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { cn } from "../../lib/utilities.js";
|
|
4
|
+
import "react";
|
|
5
|
+
function Kbd({ className, ...props }) {
|
|
6
|
+
return /*#__PURE__*/ jsx("kbd", {
|
|
7
|
+
"data-slot": "kbd",
|
|
8
|
+
className: cn("pointer-events-none inline-flex h-5 w-fit min-w-5 items-center justify-center gap-1 rounded-sm bg-neutral-100 px-1 font-sans text-xs font-medium text-neutral-500 select-none dark:bg-neutral-800 dark:text-neutral-400", "[&_svg:not([class*='size-'])]:size-3", "[[data-slot=tooltip-content]_&]:bg-white/20 [[data-slot=tooltip-content]_&]:text-white dark:[[data-slot=tooltip-content]_&]:bg-neutral-950/20 dark:[[data-slot=tooltip-content]_&]:bg-white/10 dark:dark:[[data-slot=tooltip-content]_&]:bg-neutral-950/10 dark:[[data-slot=tooltip-content]_&]:text-neutral-950", className),
|
|
9
|
+
...props
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
function KbdGroup({ className, ...props }) {
|
|
13
|
+
return /*#__PURE__*/ jsx("kbd", {
|
|
14
|
+
"data-slot": "kbd-group",
|
|
15
|
+
className: cn("inline-flex items-center gap-1", className),
|
|
16
|
+
...props
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
export { Kbd, KbdGroup };
|
|
20
|
+
|
|
21
|
+
//# sourceMappingURL=kbd.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"components\\ui\\kbd.js","sources":["webpack://@arolariu/components/./src/components/ui/kbd.tsx"],"sourcesContent":["\r\n\r\nimport {cn} from \"@/lib/utilities\";\r\nimport * as React from \"react\";\r\n\r\nfunction Kbd({className, ...props}: React.ComponentProps<\"kbd\">) {\r\n return (\r\n <kbd\r\n data-slot='kbd'\r\n className={cn(\r\n \"pointer-events-none inline-flex h-5 w-fit min-w-5 items-center justify-center gap-1 rounded-sm bg-neutral-100 px-1 font-sans text-xs font-medium text-neutral-500 select-none dark:bg-neutral-800 dark:text-neutral-400\",\r\n \"[&_svg:not([class*='size-'])]:size-3\",\r\n \"[[data-slot=tooltip-content]_&]:bg-white/20 [[data-slot=tooltip-content]_&]:text-white dark:[[data-slot=tooltip-content]_&]:bg-neutral-950/20 dark:[[data-slot=tooltip-content]_&]:bg-white/10 dark:dark:[[data-slot=tooltip-content]_&]:bg-neutral-950/10 dark:[[data-slot=tooltip-content]_&]:text-neutral-950\",\r\n className,\r\n )}\r\n {...props}\r\n />\r\n );\r\n}\r\n\r\nfunction KbdGroup({className, ...props}: React.ComponentProps<\"div\">) {\r\n return (\r\n <kbd\r\n data-slot='kbd-group'\r\n className={cn(\"inline-flex items-center gap-1\", className)}\r\n {...props}\r\n />\r\n );\r\n}\r\n\r\nexport {Kbd, KbdGroup};\r\n"],"names":["Kbd","className","props","cn","KbdGroup"],"mappings":";;;;AAKA,SAASA,IAAI,EAACC,SAAS,EAAE,GAAGC,OAAmC;IAC7D,OAAO,WAAP,GACE,IAAC;QACC,aAAU;QACV,WAAWC,GACT,2NACA,wCACA,oTACAF;QAED,GAAGC,KAAK;;AAGf;AAEA,SAASE,SAAS,EAACH,SAAS,EAAE,GAAGC,OAAmC;IAClE,OAAO,WAAP,GACE,IAAC;QACC,aAAU;QACV,WAAWC,GAAG,kCAAkCF;QAC/C,GAAGC,KAAK;;AAGf"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as LabelPrimitive from "@radix-ui/react-label";
|
|
2
|
+
import { type VariantProps } from "class-variance-authority";
|
|
2
3
|
import * as React from "react";
|
|
3
|
-
declare
|
|
4
|
+
declare const Label: React.ForwardRefExoticComponent<Omit<LabelPrimitive.LabelProps & React.RefAttributes<HTMLLabelElement>, "ref"> & VariantProps<(props?: import("class-variance-authority/types").ClassProp) => string> & React.RefAttributes<HTMLLabelElement>>;
|
|
4
5
|
export { Label };
|
|
5
6
|
//# sourceMappingURL=label.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"label.d.ts","sourceRoot":"","sources":["../../../src/components/ui/label.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,cAAc,MAAM,uBAAuB,CAAC;AACxD,OAAO,
|
|
1
|
+
{"version":3,"file":"label.d.ts","sourceRoot":"","sources":["../../../src/components/ui/label.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,cAAc,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAM,KAAK,YAAY,EAAC,MAAM,0BAA0B,CAAC;AAChE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAM/B,QAAA,MAAM,KAAK,gPAST,CAAC;AAGH,OAAO,EAAC,KAAK,EAAC,CAAC"}
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
3
|
import { Root } from "@radix-ui/react-label";
|
|
4
|
-
import "
|
|
4
|
+
import { cva } from "class-variance-authority";
|
|
5
|
+
import { forwardRef } from "react";
|
|
5
6
|
import { cn } from "../../lib/utilities.js";
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
className: cn(
|
|
7
|
+
const labelVariants = cva("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70");
|
|
8
|
+
const Label = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsx(Root, {
|
|
9
|
+
ref: ref,
|
|
10
|
+
className: cn(labelVariants(), className),
|
|
10
11
|
...props
|
|
11
|
-
});
|
|
12
|
-
|
|
12
|
+
}));
|
|
13
|
+
Label.displayName = Root.displayName;
|
|
13
14
|
export { Label };
|
|
14
15
|
|
|
15
16
|
//# sourceMappingURL=label.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components\\ui\\label.js","sources":["webpack://@arolariu/components/./src/components/ui/label.tsx"],"sourcesContent":["\r\n\r\nimport * as LabelPrimitive from \"@radix-ui/react-label\";\r\nimport * as React from \"react\";\r\n\r\nimport {cn} from \"@/lib/utilities\";\r\n\r\
|
|
1
|
+
{"version":3,"file":"components\\ui\\label.js","sources":["webpack://@arolariu/components/./src/components/ui/label.tsx"],"sourcesContent":["\r\n\r\nimport * as LabelPrimitive from \"@radix-ui/react-label\";\r\nimport {cva, type VariantProps} from \"class-variance-authority\";\r\nimport * as React from \"react\";\r\n\r\nimport {cn} from \"@/lib/utilities\";\r\n\r\nconst labelVariants = cva(\"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70\");\r\n\r\nconst Label = React.forwardRef<\r\n React.ComponentRef<typeof LabelPrimitive.Root>,\r\n React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root> & VariantProps<typeof labelVariants>\r\n>(({className, ...props}, ref) => (\r\n <LabelPrimitive.Root\r\n ref={ref}\r\n className={cn(labelVariants(), className)}\r\n {...props}\r\n />\r\n));\r\nLabel.displayName = LabelPrimitive.Root.displayName;\r\n\r\nexport {Label};\r\n"],"names":["labelVariants","cva","Label","React","className","props","ref","LabelPrimitive","cn"],"mappings":";;;;;;AAQA,MAAMA,gBAAgBC,IAAI;AAE1B,MAAMC,QAAQ,WAARA,GAAQC,WAGZ,CAAC,EAACC,SAAS,EAAE,GAAGC,OAAM,EAAEC,MAAAA,WAAAA,GACxB,IAACC,MAAmB;QAClB,KAAKD;QACL,WAAWE,GAAGR,iBAAiBI;QAC9B,GAAGC,KAAK;;AAGbH,MAAM,WAAW,GAAGK,KAAAA,WAA+B"}
|