@arolariu/components 0.1.2 → 0.3.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/DEBUGGING.md +396 -396
- package/LICENSE.md +21 -21
- package/changelog.md +120 -118
- package/dist/components/ui/accordion.d.ts +6 -6
- package/dist/components/ui/accordion.d.ts.map +1 -1
- package/dist/components/ui/accordion.js +20 -28
- package/dist/components/ui/accordion.js.map +1 -1
- package/dist/components/ui/alert-dialog.d.ts +19 -13
- package/dist/components/ui/alert-dialog.d.ts.map +1 -1
- package/dist/components/ui/alert-dialog.js +40 -63
- package/dist/components/ui/alert-dialog.js.map +1 -1
- package/dist/components/ui/alert.d.ts +7 -8
- package/dist/components/ui/alert.d.ts.map +1 -1
- package/dist/components/ui/alert.js +18 -21
- 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 +5 -5
- package/dist/components/ui/avatar.d.ts.map +1 -1
- package/dist/components/ui/avatar.js +17 -20
- package/dist/components/ui/avatar.js.map +1 -1
- package/dist/components/ui/background-beams.d.ts.map +1 -1
- package/dist/components/ui/background-beams.js +6 -6
- package/dist/components/ui/background-beams.js.map +1 -1
- package/dist/components/ui/badge.d.ts +7 -7
- package/dist/components/ui/badge.d.ts.map +1 -1
- package/dist/components/ui/badge.js +9 -12
- package/dist/components/ui/badge.js.map +1 -1
- package/dist/components/ui/breadcrumb.d.ts +17 -9
- package/dist/components/ui/breadcrumb.d.ts.map +1 -1
- package/dist/components/ui/breadcrumb.js +32 -39
- package/dist/components/ui/breadcrumb.js.map +1 -1
- package/dist/components/ui/bubble-background.d.ts +1 -1
- package/dist/components/ui/bubble-background.d.ts.map +1 -1
- package/dist/components/ui/bubble-background.js +13 -13
- package/dist/components/ui/bubble-background.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 +8 -7
- package/dist/components/ui/button.d.ts.map +1 -1
- package/dist/components/ui/button.js +16 -15
- package/dist/components/ui/button.js.map +1 -1
- package/dist/components/ui/calendar.d.ts.map +1 -1
- package/dist/components/ui/calendar.js +22 -22
- 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 +33 -46
- package/dist/components/ui/card.js.map +1 -1
- package/dist/components/ui/carousel.d.ts +7 -8
- package/dist/components/ui/carousel.d.ts.map +1 -1
- package/dist/components/ui/carousel.js +30 -21
- package/dist/components/ui/carousel.js.map +1 -1
- package/dist/components/ui/chart.d.ts +37 -29
- package/dist/components/ui/chart.d.ts.map +1 -1
- package/dist/components/ui/chart.js +29 -27
- package/dist/components/ui/chart.js.map +1 -1
- package/dist/components/ui/checkbox.d.ts +2 -2
- package/dist/components/ui/checkbox.d.ts.map +1 -1
- package/dist/components/ui/checkbox.js +11 -13
- package/dist/components/ui/checkbox.js.map +1 -1
- package/dist/components/ui/collapsible.d.ts +4 -5
- package/dist/components/ui/collapsible.d.ts.map +1 -1
- package/dist/components/ui/collapsible.js +3 -20
- package/dist/components/ui/collapsible.js.map +1 -1
- package/dist/components/ui/command.d.ts +79 -17
- package/dist/components/ui/command.d.ts.map +1 -1
- package/dist/components/ui/command.js +52 -77
- package/dist/components/ui/command.js.map +1 -1
- package/dist/components/ui/context-menu.d.ts +23 -21
- package/dist/components/ui/context-menu.d.ts.map +1 -1
- package/dist/components/ui/context-menu.js +60 -104
- package/dist/components/ui/context-menu.js.map +1 -1
- package/dist/components/ui/counting-number.d.ts +1 -1
- package/dist/components/ui/counting-number.d.ts.map +1 -1
- package/dist/components/ui/counting-number.js +4 -3
- package/dist/components/ui/counting-number.js.map +1 -1
- package/dist/components/ui/dialog.d.ts +17 -13
- package/dist/components/ui/dialog.d.ts.map +1 -1
- package/dist/components/ui/dialog.js +38 -66
- package/dist/components/ui/dialog.js.map +1 -1
- package/dist/components/ui/dot-background.d.ts +10 -17
- package/dist/components/ui/dot-background.d.ts.map +1 -1
- package/dist/components/ui/dot-background.js +2 -2
- package/dist/components/ui/dot-background.js.map +1 -1
- package/dist/components/ui/drawer.d.ts +20 -11
- package/dist/components/ui/drawer.d.ts.map +1 -1
- package/dist/components/ui/drawer.js +37 -62
- package/dist/components/ui/drawer.js.map +1 -1
- package/dist/components/ui/dropdown-menu.d.ts +23 -21
- package/dist/components/ui/dropdown-menu.d.ts.map +1 -1
- package/dist/components/ui/dropdown-menu.js +65 -109
- package/dist/components/ui/dropdown-menu.js.map +1 -1
- package/dist/components/ui/dropdrawer.d.ts +3 -3
- package/dist/components/ui/dropdrawer.d.ts.map +1 -1
- package/dist/components/ui/dropdrawer.js +13 -16
- 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 +25 -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/fireworks-background.d.ts.map +1 -1
- package/dist/components/ui/fireworks-background.js +1 -1
- package/dist/components/ui/fireworks-background.js.map +1 -1
- package/dist/components/ui/flip-button.d.ts +1 -1
- package/dist/components/ui/flip-button.d.ts.map +1 -1
- package/dist/components/ui/flip-button.js +3 -3
- package/dist/components/ui/flip-button.js.map +1 -1
- package/dist/components/ui/form.d.ts +7 -8
- 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/gradient-background.d.ts +1 -1
- package/dist/components/ui/gradient-background.d.ts.map +1 -1
- package/dist/components/ui/gradient-background.js +2 -2
- package/dist/components/ui/gradient-background.js.map +1 -1
- package/dist/components/ui/gradient-text.d.ts +1 -1
- package/dist/components/ui/gradient-text.d.ts.map +1 -1
- package/dist/components/ui/gradient-text.js +5 -5
- package/dist/components/ui/gradient-text.js.map +1 -1
- package/dist/components/ui/highlight-text.d.ts +1 -1
- package/dist/components/ui/highlight-text.d.ts.map +1 -1
- package/dist/components/ui/highlight-text.js +3 -3
- package/dist/components/ui/highlight-text.js.map +1 -1
- package/dist/components/ui/hole-background.d.ts.map +1 -1
- package/dist/components/ui/hole-background.js +11 -10
- package/dist/components/ui/hole-background.js.map +1 -1
- package/dist/components/ui/hover-card.d.ts +5 -5
- package/dist/components/ui/hover-card.d.ts.map +1 -1
- package/dist/components/ui/hover-card.js +12 -26
- 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 +31 -8
- package/dist/components/ui/input-otp.d.ts.map +1 -1
- package/dist/components/ui/input-otp.js +24 -27
- 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 +7 -8
- 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 +3 -2
- package/dist/components/ui/label.d.ts.map +1 -1
- package/dist/components/ui/label.js +9 -8
- package/dist/components/ui/label.js.map +1 -1
- package/dist/components/ui/menubar.d.ts +20 -18
- package/dist/components/ui/menubar.d.ts.map +1 -1
- package/dist/components/ui/menubar.js +75 -95
- package/dist/components/ui/menubar.js.map +1 -1
- package/dist/components/ui/navigation-menu.d.ts +11 -13
- package/dist/components/ui/navigation-menu.d.ts.map +1 -1
- package/dist/components/ui/navigation-menu.js +39 -58
- package/dist/components/ui/navigation-menu.js.map +1 -1
- package/dist/components/ui/pagination.d.ts +25 -10
- package/dist/components/ui/pagination.d.ts.map +1 -1
- package/dist/components/ui/pagination.js +33 -41
- package/dist/components/ui/pagination.js.map +1 -1
- package/dist/components/ui/popover.d.ts +6 -6
- package/dist/components/ui/popover.d.ts.map +1 -1
- package/dist/components/ui/popover.js +10 -26
- package/dist/components/ui/popover.js.map +1 -1
- package/dist/components/ui/progress.d.ts +2 -2
- package/dist/components/ui/progress.d.ts.map +1 -1
- package/dist/components/ui/progress.js +8 -10
- package/dist/components/ui/progress.js.map +1 -1
- package/dist/components/ui/radio-group.d.ts +3 -3
- package/dist/components/ui/radio-group.d.ts.map +1 -1
- package/dist/components/ui/radio-group.js +17 -20
- package/dist/components/ui/radio-group.js.map +1 -1
- package/dist/components/ui/resizable.d.ts +21 -6
- package/dist/components/ui/resizable.d.ts.map +1 -1
- package/dist/components/ui/resizable.js +9 -21
- package/dist/components/ui/resizable.js.map +1 -1
- package/dist/components/ui/ripple-button.d.ts +1 -1
- package/dist/components/ui/ripple-button.d.ts.map +1 -1
- package/dist/components/ui/ripple-button.js +4 -4
- package/dist/components/ui/ripple-button.js.map +1 -1
- package/dist/components/ui/scratcher.d.ts.map +1 -1
- package/dist/components/ui/scratcher.js +7 -5
- package/dist/components/ui/scratcher.js.map +1 -1
- package/dist/components/ui/scroll-area.d.ts +3 -3
- package/dist/components/ui/scroll-area.d.ts.map +1 -1
- package/dist/components/ui/scroll-area.js +14 -18
- package/dist/components/ui/scroll-area.js.map +1 -1
- package/dist/components/ui/select.d.ts +11 -13
- package/dist/components/ui/select.d.ts.map +1 -1
- package/dist/components/ui/select.js +55 -78
- package/dist/components/ui/select.js.map +1 -1
- package/dist/components/ui/separator.d.ts +2 -2
- package/dist/components/ui/separator.d.ts.map +1 -1
- package/dist/components/ui/separator.js +7 -8
- package/dist/components/ui/separator.js.map +1 -1
- package/dist/components/ui/sheet.d.ts +24 -12
- package/dist/components/ui/sheet.d.ts.map +1 -1
- package/dist/components/ui/sheet.js +56 -68
- package/dist/components/ui/sheet.js.map +1 -1
- package/dist/components/ui/sidebar.d.ts +35 -39
- package/dist/components/ui/sidebar.d.ts.map +1 -1
- package/dist/components/ui/sidebar.js +115 -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 +2 -3
- package/dist/components/ui/skeleton.js.map +1 -1
- package/dist/components/ui/slider.d.ts +2 -2
- package/dist/components/ui/slider.d.ts.map +1 -1
- package/dist/components/ui/slider.js +12 -31
- 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 +8 -5
- 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 +8 -10
- package/dist/components/ui/switch.js.map +1 -1
- package/dist/components/ui/table.d.ts +9 -9
- package/dist/components/ui/table.d.ts.map +1 -1
- package/dist/components/ui/table.js +40 -49
- package/dist/components/ui/table.js.map +1 -1
- package/dist/components/ui/tabs.d.ts +6 -6
- package/dist/components/ui/tabs.d.ts.map +1 -1
- package/dist/components/ui/tabs.js +18 -27
- 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 +7 -8
- package/dist/components/ui/textarea.js.map +1 -1
- package/dist/components/ui/toggle-group.d.ts +9 -4
- package/dist/components/ui/toggle-group.d.ts.map +1 -1
- package/dist/components/ui/toggle-group.js +12 -16
- package/dist/components/ui/toggle-group.js.map +1 -1
- package/dist/components/ui/toggle.d.ts +9 -6
- package/dist/components/ui/toggle.d.ts.map +1 -1
- package/dist/components/ui/toggle.js +8 -9
- package/dist/components/ui/toggle.js.map +1 -1
- package/dist/components/ui/tooltip.d.ts +6 -6
- package/dist/components/ui/tooltip.d.ts.map +1 -1
- package/dist/components/ui/tooltip.js +14 -39
- 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 +9 -9
- package/dist/components/ui/typewriter.js.map +1 -1
- package/dist/hooks/useIsMobile.d.ts +2 -5
- package/dist/hooks/useIsMobile.d.ts.map +1 -1
- package/dist/hooks/useIsMobile.js +1 -1
- package/dist/hooks/useIsMobile.js.map +1 -1
- package/dist/hooks/useWindowSize.d.ts +0 -1
- package/dist/hooks/useWindowSize.d.ts.map +1 -1
- package/dist/hooks/useWindowSize.js +1 -1
- package/dist/hooks/useWindowSize.js.map +1 -1
- package/dist/index.css +841 -1128
- package/dist/index.css.map +1 -1
- package/dist/index.d.ts +43 -37
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +11 -5
- package/dist/lib/utilities.d.ts +9 -0
- package/dist/lib/utilities.d.ts.map +1 -0
- package/dist/lib/{utils.js → utilities.js} +1 -1
- package/dist/lib/utilities.js.map +1 -0
- package/package.json +121 -90
- package/{README.md → readme.md} +627 -627
- package/src/components/ui/accordion.tsx +55 -66
- package/src/components/ui/alert-dialog.tsx +124 -160
- package/src/components/ui/alert.tsx +56 -69
- package/src/components/ui/aspect-ratio.tsx +7 -12
- package/src/components/ui/avatar.tsx +43 -53
- package/src/components/ui/background-beams.tsx +145 -142
- package/src/components/ui/badge.tsx +39 -48
- package/src/components/ui/breadcrumb.tsx +94 -117
- package/src/components/ui/bubble-background.tsx +170 -189
- package/src/components/ui/button-group.tsx +69 -0
- package/src/components/ui/button.tsx +55 -61
- package/src/components/ui/calendar.tsx +175 -216
- package/src/components/ui/card.tsx +64 -97
- package/src/components/ui/carousel.tsx +216 -241
- package/src/components/ui/chart.tsx +293 -385
- package/src/components/ui/checkbox.tsx +27 -32
- package/src/components/ui/collapsible.tsx +11 -34
- package/src/components/ui/command.tsx +138 -184
- package/src/components/ui/context-menu.tsx +186 -255
- package/src/components/ui/counting-number.tsx +92 -108
- package/src/components/ui/dialog.tsx +106 -146
- package/src/components/ui/dot-background.tsx +153 -158
- package/src/components/ui/drawer.tsx +105 -141
- package/src/components/ui/dropdown-menu.tsx +188 -260
- package/src/components/ui/dropdrawer.tsx +865 -973
- package/src/components/ui/empty.tsx +86 -0
- package/src/components/ui/field.tsx +198 -0
- package/src/components/ui/fireworks-background.tsx +325 -378
- package/src/components/ui/flip-button.tsx +89 -110
- package/src/components/ui/form.tsx +144 -174
- package/src/components/ui/gradient-background.tsx +30 -43
- package/src/components/ui/gradient-text.tsx +62 -65
- package/src/components/ui/highlight-text.tsx +54 -71
- package/src/components/ui/hole-background.tsx +326 -361
- package/src/components/ui/hover-card.tsx +29 -44
- package/src/components/ui/input-group.tsx +145 -0
- package/src/components/ui/input-otp.tsx +66 -77
- package/src/components/ui/input.tsx +21 -22
- package/src/components/ui/item.tsx +163 -0
- package/src/components/ui/kbd.tsx +31 -0
- package/src/components/ui/label.tsx +23 -24
- package/src/components/ui/menubar.tsx +233 -279
- package/src/components/ui/navigation-menu.tsx +120 -171
- package/src/components/ui/pagination.tsx +92 -129
- package/src/components/ui/popover.tsx +33 -48
- package/src/components/ui/progress.tsx +24 -31
- package/src/components/ui/radio-group.tsx +43 -45
- package/src/components/ui/resizable.tsx +38 -56
- package/src/components/ui/ripple-button.tsx +90 -111
- package/src/components/ui/scratcher.tsx +167 -171
- package/src/components/ui/scroll-area.tsx +42 -58
- package/src/components/ui/select.tsx +145 -191
- package/src/components/ui/separator.tsx +26 -28
- package/src/components/ui/sheet.tsx +112 -145
- package/src/components/ui/sidebar.tsx +664 -729
- package/src/components/ui/skeleton.tsx +15 -19
- package/src/components/ui/slider.tsx +23 -63
- package/src/components/ui/sonner.tsx +36 -26
- package/src/components/ui/spinner.tsx +18 -0
- package/src/components/ui/switch.tsx +28 -31
- package/src/components/ui/table.tsx +93 -119
- package/src/components/ui/tabs.tsx +54 -66
- package/src/components/ui/textarea.tsx +21 -20
- package/src/components/ui/toggle-group.tsx +53 -73
- package/src/components/ui/toggle.tsx +44 -47
- package/src/components/ui/tooltip.tsx +32 -61
- package/src/components/ui/typewriter.tsx +173 -188
- package/src/hooks/useIsMobile.tsx +42 -45
- package/src/hooks/useWindowSize.tsx +66 -72
- package/src/index.css +67 -67
- package/src/index.ts +342 -408
- package/src/lib/utilities.ts +12 -0
- package/dist/lib/utils.d.ts +0 -7
- package/dist/lib/utils.d.ts.map +0 -1
- package/dist/lib/utils.js.map +0 -1
- package/src/lib/utils.ts +0 -10
|
@@ -1,44 +1,29 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import * as
|
|
4
|
-
import * as
|
|
5
|
-
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
<HoverCardPrimitive.Content
|
|
31
|
-
data-slot="hover-card-content"
|
|
32
|
-
align={align}
|
|
33
|
-
sideOffset={sideOffset}
|
|
34
|
-
className={cn(
|
|
35
|
-
"bg-white text-neutral-950 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-64 origin-(--radix-hover-card-content-transform-origin) rounded-md border border-neutral-200 p-4 shadow-md outline-hidden dark:bg-neutral-950 dark:text-neutral-50 dark:border-neutral-800",
|
|
36
|
-
className,
|
|
37
|
-
)}
|
|
38
|
-
{...props}
|
|
39
|
-
/>
|
|
40
|
-
</HoverCardPrimitive.Portal>
|
|
41
|
-
);
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
export { HoverCard, HoverCardTrigger, HoverCardContent };
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import * as HoverCardPrimitive from "@radix-ui/react-hover-card";
|
|
4
|
+
import * as React from "react";
|
|
5
|
+
|
|
6
|
+
import {cn} from "@/lib/utilities";
|
|
7
|
+
|
|
8
|
+
const HoverCard = HoverCardPrimitive.Root;
|
|
9
|
+
|
|
10
|
+
const HoverCardTrigger = HoverCardPrimitive.Trigger;
|
|
11
|
+
|
|
12
|
+
const HoverCardContent = React.forwardRef<
|
|
13
|
+
React.ElementRef<typeof HoverCardPrimitive.Content>,
|
|
14
|
+
React.ComponentPropsWithoutRef<typeof HoverCardPrimitive.Content>
|
|
15
|
+
>(({className, align = "center", sideOffset = 4, ...props}, ref) => (
|
|
16
|
+
<HoverCardPrimitive.Content
|
|
17
|
+
ref={ref}
|
|
18
|
+
align={align}
|
|
19
|
+
sideOffset={sideOffset}
|
|
20
|
+
className={cn(
|
|
21
|
+
"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-64 origin-[--radix-hover-card-content-transform-origin] rounded-md border border-neutral-200 bg-white p-4 text-neutral-950 shadow-md outline-none dark:border-neutral-800 dark:bg-neutral-950 dark:text-neutral-50",
|
|
22
|
+
className,
|
|
23
|
+
)}
|
|
24
|
+
{...props}
|
|
25
|
+
/>
|
|
26
|
+
));
|
|
27
|
+
HoverCardContent.displayName = HoverCardPrimitive.Content.displayName;
|
|
28
|
+
|
|
29
|
+
export {HoverCard, HoverCardContent, HoverCardTrigger};
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import {cva, type VariantProps} from "class-variance-authority";
|
|
4
|
+
import * as React from "react";
|
|
5
|
+
|
|
6
|
+
import {Button} from "@/components/ui/button";
|
|
7
|
+
import {Input} from "@/components/ui/input";
|
|
8
|
+
import {Textarea} from "@/components/ui/textarea";
|
|
9
|
+
import {cn} from "@/lib/utilities";
|
|
10
|
+
|
|
11
|
+
function InputGroup({className, ...props}: React.ComponentProps<"div">) {
|
|
12
|
+
return (
|
|
13
|
+
<div
|
|
14
|
+
data-slot='input-group'
|
|
15
|
+
role='group'
|
|
16
|
+
className={cn(
|
|
17
|
+
"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",
|
|
18
|
+
"h-9 has-[>textarea]:h-auto",
|
|
19
|
+
|
|
20
|
+
// Variants based on alignment.
|
|
21
|
+
"has-[>[data-align=inline-start]]:[&>input]:pl-2",
|
|
22
|
+
"has-[>[data-align=inline-end]]:[&>input]:pr-2",
|
|
23
|
+
"has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>[data-align=block-start]]:[&>input]:pb-3",
|
|
24
|
+
"has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-end]]:[&>input]:pt-3",
|
|
25
|
+
|
|
26
|
+
// Focus state.
|
|
27
|
+
"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",
|
|
28
|
+
|
|
29
|
+
// Error state.
|
|
30
|
+
"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",
|
|
31
|
+
|
|
32
|
+
className,
|
|
33
|
+
)}
|
|
34
|
+
{...props}
|
|
35
|
+
/>
|
|
36
|
+
);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
const inputGroupAddonVariants = cva(
|
|
40
|
+
"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",
|
|
41
|
+
{
|
|
42
|
+
variants: {
|
|
43
|
+
align: {
|
|
44
|
+
"inline-start": "order-first pl-3 has-[>button]:ml-[-0.45rem] has-[>kbd]:ml-[-0.35rem]",
|
|
45
|
+
"inline-end": "order-last pr-3 has-[>button]:mr-[-0.4rem] has-[>kbd]:mr-[-0.35rem]",
|
|
46
|
+
"block-start": "[.border-b]:pb-3 order-first w-full justify-start px-3 pt-3 group-has-[>input]/input-group:pt-2.5",
|
|
47
|
+
"block-end": "[.border-t]:pt-3 order-last w-full justify-start px-3 pb-3 group-has-[>input]/input-group:pb-2.5",
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
defaultVariants: {
|
|
51
|
+
align: "inline-start",
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
);
|
|
55
|
+
|
|
56
|
+
function InputGroupAddon({
|
|
57
|
+
className,
|
|
58
|
+
align = "inline-start",
|
|
59
|
+
...props
|
|
60
|
+
}: React.ComponentProps<"div"> & VariantProps<typeof inputGroupAddonVariants>) {
|
|
61
|
+
return (
|
|
62
|
+
<div
|
|
63
|
+
role='group'
|
|
64
|
+
data-slot='input-group-addon'
|
|
65
|
+
data-align={align}
|
|
66
|
+
className={cn(inputGroupAddonVariants({align}), className)}
|
|
67
|
+
onClick={(e) => {
|
|
68
|
+
if ((e.target as HTMLElement).closest("button")) {
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
e.currentTarget.parentElement?.querySelector("input")?.focus();
|
|
72
|
+
}}
|
|
73
|
+
{...props}
|
|
74
|
+
/>
|
|
75
|
+
);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
const inputGroupButtonVariants = cva("flex items-center gap-2 text-sm shadow-none", {
|
|
79
|
+
variants: {
|
|
80
|
+
size: {
|
|
81
|
+
xs: "h-6 gap-1 rounded-[calc(var(--radius)-5px)] px-2 has-[>svg]:px-2 [&>svg:not([class*='size-'])]:size-3.5",
|
|
82
|
+
sm: "h-8 gap-1.5 rounded-md px-2.5 has-[>svg]:px-2.5",
|
|
83
|
+
"icon-xs": "size-6 rounded-[calc(var(--radius)-5px)] p-0 has-[>svg]:p-0",
|
|
84
|
+
"icon-sm": "size-8 p-0 has-[>svg]:p-0",
|
|
85
|
+
},
|
|
86
|
+
},
|
|
87
|
+
defaultVariants: {
|
|
88
|
+
size: "xs",
|
|
89
|
+
},
|
|
90
|
+
});
|
|
91
|
+
|
|
92
|
+
function InputGroupButton({
|
|
93
|
+
className,
|
|
94
|
+
type = "button",
|
|
95
|
+
variant = "ghost",
|
|
96
|
+
size = "xs",
|
|
97
|
+
...props
|
|
98
|
+
}: Omit<React.ComponentProps<typeof Button>, "size"> & VariantProps<typeof inputGroupButtonVariants>) {
|
|
99
|
+
return (
|
|
100
|
+
<Button
|
|
101
|
+
type={type}
|
|
102
|
+
data-size={size}
|
|
103
|
+
variant={variant}
|
|
104
|
+
className={cn(inputGroupButtonVariants({size}), className)}
|
|
105
|
+
{...props}
|
|
106
|
+
/>
|
|
107
|
+
);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
function InputGroupText({className, ...props}: React.ComponentProps<"span">) {
|
|
111
|
+
return (
|
|
112
|
+
<span
|
|
113
|
+
className={cn(
|
|
114
|
+
"flex items-center gap-2 text-sm text-neutral-500 dark:text-neutral-400 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4",
|
|
115
|
+
className,
|
|
116
|
+
)}
|
|
117
|
+
{...props}
|
|
118
|
+
/>
|
|
119
|
+
);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
function InputGroupInput({className, ...props}: React.ComponentProps<"input">) {
|
|
123
|
+
return (
|
|
124
|
+
<Input
|
|
125
|
+
data-slot='input-group-control'
|
|
126
|
+
className={cn("flex-1 rounded-none border-0 bg-transparent shadow-none focus-visible:ring-0 dark:bg-transparent", className)}
|
|
127
|
+
{...props}
|
|
128
|
+
/>
|
|
129
|
+
);
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
function InputGroupTextarea({className, ...props}: React.ComponentProps<"textarea">) {
|
|
133
|
+
return (
|
|
134
|
+
<Textarea
|
|
135
|
+
data-slot='input-group-control'
|
|
136
|
+
className={cn(
|
|
137
|
+
"flex-1 resize-none rounded-none border-0 bg-transparent py-3 shadow-none focus-visible:ring-0 dark:bg-transparent",
|
|
138
|
+
className,
|
|
139
|
+
)}
|
|
140
|
+
{...props}
|
|
141
|
+
/>
|
|
142
|
+
);
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
export {InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea};
|
|
@@ -1,77 +1,66 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
className,
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
function InputOTPSeparator({ ...props }: React.ComponentProps<"div">) {
|
|
70
|
-
return (
|
|
71
|
-
<div data-slot="input-otp-separator" role="separator" {...props}>
|
|
72
|
-
<MinusIcon />
|
|
73
|
-
</div>
|
|
74
|
-
);
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
export { InputOTP, InputOTPGroup, InputOTPSlot, InputOTPSeparator };
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import {OTPInput, OTPInputContext} from "input-otp";
|
|
4
|
+
import {Minus} from "lucide-react";
|
|
5
|
+
import * as React from "react";
|
|
6
|
+
|
|
7
|
+
import {cn} from "@/lib/utilities";
|
|
8
|
+
|
|
9
|
+
const InputOTP = React.forwardRef<React.ElementRef<typeof OTPInput>, React.ComponentPropsWithoutRef<typeof OTPInput>>(
|
|
10
|
+
({className, containerClassName, ...props}, ref) => (
|
|
11
|
+
<OTPInput
|
|
12
|
+
ref={ref}
|
|
13
|
+
containerClassName={cn("flex items-center gap-2 has-[:disabled]:opacity-50", containerClassName)}
|
|
14
|
+
className={cn("disabled:cursor-not-allowed", className)}
|
|
15
|
+
{...props}
|
|
16
|
+
/>
|
|
17
|
+
),
|
|
18
|
+
);
|
|
19
|
+
InputOTP.displayName = "InputOTP";
|
|
20
|
+
|
|
21
|
+
const InputOTPGroup = React.forwardRef<React.ElementRef<"div">, React.ComponentPropsWithoutRef<"div">>(({className, ...props}, ref) => (
|
|
22
|
+
<div
|
|
23
|
+
ref={ref}
|
|
24
|
+
className={cn("flex items-center", className)}
|
|
25
|
+
{...props}
|
|
26
|
+
/>
|
|
27
|
+
));
|
|
28
|
+
InputOTPGroup.displayName = "InputOTPGroup";
|
|
29
|
+
|
|
30
|
+
const InputOTPSlot = React.forwardRef<React.ElementRef<"div">, React.ComponentPropsWithoutRef<"div"> & {index: number}>(
|
|
31
|
+
({index, className, ...props}, ref) => {
|
|
32
|
+
const inputOTPContext = React.useContext(OTPInputContext);
|
|
33
|
+
const {char, hasFakeCaret, isActive} = inputOTPContext.slots[index];
|
|
34
|
+
|
|
35
|
+
return (
|
|
36
|
+
<div
|
|
37
|
+
ref={ref}
|
|
38
|
+
className={cn(
|
|
39
|
+
"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",
|
|
40
|
+
isActive && "z-10 ring-1 ring-neutral-950 dark:ring-neutral-300",
|
|
41
|
+
className,
|
|
42
|
+
)}
|
|
43
|
+
{...props}>
|
|
44
|
+
{char}
|
|
45
|
+
{hasFakeCaret && (
|
|
46
|
+
<div className='pointer-events-none absolute inset-0 flex items-center justify-center'>
|
|
47
|
+
<div className='animate-caret-blink h-4 w-px bg-neutral-950 duration-1000 dark:bg-neutral-50' />
|
|
48
|
+
</div>
|
|
49
|
+
)}
|
|
50
|
+
</div>
|
|
51
|
+
);
|
|
52
|
+
},
|
|
53
|
+
);
|
|
54
|
+
InputOTPSlot.displayName = "InputOTPSlot";
|
|
55
|
+
|
|
56
|
+
const InputOTPSeparator = React.forwardRef<React.ElementRef<"div">, React.ComponentPropsWithoutRef<"div">>(({...props}, ref) => (
|
|
57
|
+
<div
|
|
58
|
+
ref={ref}
|
|
59
|
+
role='separator'
|
|
60
|
+
{...props}>
|
|
61
|
+
<Minus />
|
|
62
|
+
</div>
|
|
63
|
+
));
|
|
64
|
+
InputOTPSeparator.displayName = "InputOTPSeparator";
|
|
65
|
+
|
|
66
|
+
export {InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot};
|
|
@@ -1,22 +1,21 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
return (
|
|
8
|
-
<input
|
|
9
|
-
type={type}
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
export { Input };
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import {cn} from "@/lib/utilities";
|
|
4
|
+
import * as React from "react";
|
|
5
|
+
|
|
6
|
+
const Input = React.forwardRef<HTMLInputElement, React.ComponentProps<"input">>(({className, type, ...props}, ref) => {
|
|
7
|
+
return (
|
|
8
|
+
<input
|
|
9
|
+
type={type}
|
|
10
|
+
className={cn(
|
|
11
|
+
"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",
|
|
12
|
+
className,
|
|
13
|
+
)}
|
|
14
|
+
ref={ref}
|
|
15
|
+
{...props}
|
|
16
|
+
/>
|
|
17
|
+
);
|
|
18
|
+
});
|
|
19
|
+
Input.displayName = "Input";
|
|
20
|
+
|
|
21
|
+
export {Input};
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import {Slot} from "@radix-ui/react-slot";
|
|
4
|
+
import {cva, type VariantProps} from "class-variance-authority";
|
|
5
|
+
import * as React from "react";
|
|
6
|
+
|
|
7
|
+
import {Separator} from "@/components/ui/separator";
|
|
8
|
+
import {cn} from "@/lib/utilities";
|
|
9
|
+
|
|
10
|
+
function ItemGroup({className, ...props}: React.ComponentProps<"div">) {
|
|
11
|
+
return (
|
|
12
|
+
<div
|
|
13
|
+
role='list'
|
|
14
|
+
data-slot='item-group'
|
|
15
|
+
className={cn("group/item-group flex flex-col", className)}
|
|
16
|
+
{...props}
|
|
17
|
+
/>
|
|
18
|
+
);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
function ItemSeparator({className, ...props}: React.ComponentProps<typeof Separator>) {
|
|
22
|
+
return (
|
|
23
|
+
<Separator
|
|
24
|
+
data-slot='item-separator'
|
|
25
|
+
orientation='horizontal'
|
|
26
|
+
className={cn("my-0", className)}
|
|
27
|
+
{...props}
|
|
28
|
+
/>
|
|
29
|
+
);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
const itemVariants = cva(
|
|
33
|
+
"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",
|
|
34
|
+
{
|
|
35
|
+
variants: {
|
|
36
|
+
variant: {
|
|
37
|
+
default: "bg-transparent",
|
|
38
|
+
outline: "border-neutral-200 dark:border-neutral-800",
|
|
39
|
+
muted: "bg-neutral-100/50 dark:bg-neutral-800/50",
|
|
40
|
+
},
|
|
41
|
+
size: {
|
|
42
|
+
default: "gap-4 p-4",
|
|
43
|
+
sm: "gap-2.5 px-4 py-3",
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
defaultVariants: {
|
|
47
|
+
variant: "default",
|
|
48
|
+
size: "default",
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
);
|
|
52
|
+
|
|
53
|
+
function Item({
|
|
54
|
+
className,
|
|
55
|
+
variant = "default",
|
|
56
|
+
size = "default",
|
|
57
|
+
asChild = false,
|
|
58
|
+
...props
|
|
59
|
+
}: React.ComponentProps<"div"> & VariantProps<typeof itemVariants> & {asChild?: boolean}) {
|
|
60
|
+
const Comp = asChild ? Slot : "div";
|
|
61
|
+
return (
|
|
62
|
+
<Comp
|
|
63
|
+
data-slot='item'
|
|
64
|
+
data-variant={variant}
|
|
65
|
+
data-size={size}
|
|
66
|
+
className={cn(itemVariants({variant, size, className}))}
|
|
67
|
+
{...props}
|
|
68
|
+
/>
|
|
69
|
+
);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
const itemMediaVariants = cva(
|
|
73
|
+
"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",
|
|
74
|
+
{
|
|
75
|
+
variants: {
|
|
76
|
+
variant: {
|
|
77
|
+
default: "bg-transparent",
|
|
78
|
+
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",
|
|
79
|
+
image: "size-10 overflow-hidden rounded-sm [&_img]:size-full [&_img]:object-cover",
|
|
80
|
+
},
|
|
81
|
+
},
|
|
82
|
+
defaultVariants: {
|
|
83
|
+
variant: "default",
|
|
84
|
+
},
|
|
85
|
+
},
|
|
86
|
+
);
|
|
87
|
+
|
|
88
|
+
function ItemMedia({className, variant = "default", ...props}: React.ComponentProps<"div"> & VariantProps<typeof itemMediaVariants>) {
|
|
89
|
+
return (
|
|
90
|
+
<div
|
|
91
|
+
data-slot='item-media'
|
|
92
|
+
data-variant={variant}
|
|
93
|
+
className={cn(itemMediaVariants({variant, className}))}
|
|
94
|
+
{...props}
|
|
95
|
+
/>
|
|
96
|
+
);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
function ItemContent({className, ...props}: React.ComponentProps<"div">) {
|
|
100
|
+
return (
|
|
101
|
+
<div
|
|
102
|
+
data-slot='item-content'
|
|
103
|
+
className={cn("flex flex-1 flex-col gap-1 [&+[data-slot=item-content]]:flex-none", className)}
|
|
104
|
+
{...props}
|
|
105
|
+
/>
|
|
106
|
+
);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
function ItemTitle({className, ...props}: React.ComponentProps<"div">) {
|
|
110
|
+
return (
|
|
111
|
+
<div
|
|
112
|
+
data-slot='item-title'
|
|
113
|
+
className={cn("flex w-fit items-center gap-2 text-sm leading-snug font-medium", className)}
|
|
114
|
+
{...props}
|
|
115
|
+
/>
|
|
116
|
+
);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
function ItemDescription({className, ...props}: React.ComponentProps<"p">) {
|
|
120
|
+
return (
|
|
121
|
+
<p
|
|
122
|
+
data-slot='item-description'
|
|
123
|
+
className={cn(
|
|
124
|
+
"line-clamp-2 text-sm leading-normal font-normal text-balance text-neutral-500 dark:text-neutral-400",
|
|
125
|
+
"[&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-neutral-900 dark:[&>a:hover]:text-neutral-50",
|
|
126
|
+
className,
|
|
127
|
+
)}
|
|
128
|
+
{...props}
|
|
129
|
+
/>
|
|
130
|
+
);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
function ItemActions({className, ...props}: React.ComponentProps<"div">) {
|
|
134
|
+
return (
|
|
135
|
+
<div
|
|
136
|
+
data-slot='item-actions'
|
|
137
|
+
className={cn("flex items-center gap-2", className)}
|
|
138
|
+
{...props}
|
|
139
|
+
/>
|
|
140
|
+
);
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
function ItemHeader({className, ...props}: React.ComponentProps<"div">) {
|
|
144
|
+
return (
|
|
145
|
+
<div
|
|
146
|
+
data-slot='item-header'
|
|
147
|
+
className={cn("flex basis-full items-center justify-between gap-2", className)}
|
|
148
|
+
{...props}
|
|
149
|
+
/>
|
|
150
|
+
);
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
function ItemFooter({className, ...props}: React.ComponentProps<"div">) {
|
|
154
|
+
return (
|
|
155
|
+
<div
|
|
156
|
+
data-slot='item-footer'
|
|
157
|
+
className={cn("flex basis-full items-center justify-between gap-2", className)}
|
|
158
|
+
{...props}
|
|
159
|
+
/>
|
|
160
|
+
);
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
export {Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemSeparator, ItemTitle};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import {cn} from "@/lib/utilities";
|
|
4
|
+
import * as React from "react";
|
|
5
|
+
|
|
6
|
+
function Kbd({className, ...props}: React.ComponentProps<"kbd">) {
|
|
7
|
+
return (
|
|
8
|
+
<kbd
|
|
9
|
+
data-slot='kbd'
|
|
10
|
+
className={cn(
|
|
11
|
+
"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",
|
|
12
|
+
"[&_svg:not([class*='size-'])]:size-3",
|
|
13
|
+
"[[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",
|
|
14
|
+
className,
|
|
15
|
+
)}
|
|
16
|
+
{...props}
|
|
17
|
+
/>
|
|
18
|
+
);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
function KbdGroup({className, ...props}: React.ComponentProps<"div">) {
|
|
22
|
+
return (
|
|
23
|
+
<kbd
|
|
24
|
+
data-slot='kbd-group'
|
|
25
|
+
className={cn("inline-flex items-center gap-1", className)}
|
|
26
|
+
{...props}
|
|
27
|
+
/>
|
|
28
|
+
);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export {Kbd, KbdGroup};
|
|
@@ -1,24 +1,23 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import * as
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
export { Label };
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import * as LabelPrimitive from "@radix-ui/react-label";
|
|
4
|
+
import {cva, type VariantProps} from "class-variance-authority";
|
|
5
|
+
import * as React from "react";
|
|
6
|
+
|
|
7
|
+
import {cn} from "@/lib/utilities";
|
|
8
|
+
|
|
9
|
+
const labelVariants = cva("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70");
|
|
10
|
+
|
|
11
|
+
const Label = React.forwardRef<
|
|
12
|
+
React.ElementRef<typeof LabelPrimitive.Root>,
|
|
13
|
+
React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root> & VariantProps<typeof labelVariants>
|
|
14
|
+
>(({className, ...props}, ref) => (
|
|
15
|
+
<LabelPrimitive.Root
|
|
16
|
+
ref={ref}
|
|
17
|
+
className={cn(labelVariants(), className)}
|
|
18
|
+
{...props}
|
|
19
|
+
/>
|
|
20
|
+
));
|
|
21
|
+
Label.displayName = LabelPrimitive.Root.displayName;
|
|
22
|
+
|
|
23
|
+
export {Label};
|