@arolariu/components 0.1.2 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/DEBUGGING.md +396 -396
- package/LICENSE.md +21 -21
- package/changelog.md +109 -118
- package/dist/components/ui/accordion.d.ts +2 -2
- package/dist/components/ui/accordion.d.ts.map +1 -1
- package/dist/components/ui/accordion.js +4 -4
- package/dist/components/ui/accordion.js.map +1 -1
- package/dist/components/ui/alert-dialog.d.ts +13 -13
- package/dist/components/ui/alert-dialog.d.ts.map +1 -1
- package/dist/components/ui/alert-dialog.js +4 -4
- package/dist/components/ui/alert-dialog.js.map +1 -1
- package/dist/components/ui/alert.d.ts +5 -5
- package/dist/components/ui/alert.d.ts.map +1 -1
- package/dist/components/ui/alert.js +3 -3
- package/dist/components/ui/alert.js.map +1 -1
- package/dist/components/ui/aspect-ratio.d.ts +1 -1
- package/dist/components/ui/aspect-ratio.d.ts.map +1 -1
- package/dist/components/ui/aspect-ratio.js +1 -1
- package/dist/components/ui/aspect-ratio.js.map +1 -1
- package/dist/components/ui/avatar.d.ts +2 -2
- package/dist/components/ui/avatar.d.ts.map +1 -1
- package/dist/components/ui/avatar.js +3 -3
- 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 +4 -4
- package/dist/components/ui/badge.d.ts.map +1 -1
- package/dist/components/ui/badge.js +2 -2
- package/dist/components/ui/badge.js.map +1 -1
- package/dist/components/ui/breadcrumb.d.ts +6 -6
- package/dist/components/ui/breadcrumb.d.ts.map +1 -1
- package/dist/components/ui/breadcrumb.js +5 -5
- 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.d.ts +5 -5
- package/dist/components/ui/button.d.ts.map +1 -1
- package/dist/components/ui/button.js +2 -2
- 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 +4 -4
- package/dist/components/ui/calendar.js.map +1 -1
- package/dist/components/ui/card.d.ts +1 -1
- package/dist/components/ui/card.d.ts.map +1 -1
- package/dist/components/ui/card.js +3 -3
- package/dist/components/ui/card.js.map +1 -1
- package/dist/components/ui/carousel.d.ts +2 -2
- package/dist/components/ui/carousel.d.ts.map +1 -1
- package/dist/components/ui/carousel.js +3 -3
- package/dist/components/ui/carousel.js.map +1 -1
- package/dist/components/ui/chart.d.ts +4 -4
- package/dist/components/ui/chart.d.ts.map +1 -1
- package/dist/components/ui/chart.js +1 -1
- 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 +3 -3
- package/dist/components/ui/checkbox.js.map +1 -1
- package/dist/components/ui/collapsible.d.ts +2 -2
- package/dist/components/ui/collapsible.d.ts.map +1 -1
- package/dist/components/ui/collapsible.js +1 -1
- package/dist/components/ui/collapsible.js.map +1 -1
- package/dist/components/ui/command.d.ts +2 -2
- package/dist/components/ui/command.d.ts.map +1 -1
- package/dist/components/ui/command.js +9 -9
- package/dist/components/ui/command.js.map +1 -1
- package/dist/components/ui/context-menu.d.ts +2 -2
- package/dist/components/ui/context-menu.d.ts.map +1 -1
- package/dist/components/ui/context-menu.js +11 -11
- 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 +1 -1
- package/dist/components/ui/dialog.d.ts.map +1 -1
- package/dist/components/ui/dialog.js +6 -6
- 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 +1 -1
- package/dist/components/ui/drawer.d.ts.map +1 -1
- package/dist/components/ui/drawer.js +5 -5
- package/dist/components/ui/drawer.js.map +1 -1
- package/dist/components/ui/dropdown-menu.d.ts +2 -2
- package/dist/components/ui/dropdown-menu.d.ts.map +1 -1
- package/dist/components/ui/dropdown-menu.js +10 -10
- package/dist/components/ui/dropdown-menu.js.map +1 -1
- package/dist/components/ui/dropdrawer.d.ts +2 -2
- package/dist/components/ui/dropdrawer.d.ts.map +1 -1
- package/dist/components/ui/dropdrawer.js +12 -12
- package/dist/components/ui/dropdrawer.js.map +1 -1
- 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 +3 -3
- package/dist/components/ui/form.d.ts.map +1 -1
- package/dist/components/ui/form.js +4 -4
- 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 +2 -2
- package/dist/components/ui/hover-card.d.ts.map +1 -1
- package/dist/components/ui/hover-card.js +3 -3
- package/dist/components/ui/hover-card.js.map +1 -1
- package/dist/components/ui/input-otp.d.ts +2 -2
- package/dist/components/ui/input-otp.d.ts.map +1 -1
- package/dist/components/ui/input-otp.js +5 -5
- package/dist/components/ui/input-otp.js.map +1 -1
- package/dist/components/ui/input.d.ts.map +1 -1
- package/dist/components/ui/input.js +2 -2
- package/dist/components/ui/input.js.map +1 -1
- package/dist/components/ui/label.d.ts +1 -1
- package/dist/components/ui/label.d.ts.map +1 -1
- package/dist/components/ui/label.js +2 -2
- package/dist/components/ui/label.js.map +1 -1
- package/dist/components/ui/menubar.d.ts +2 -2
- package/dist/components/ui/menubar.d.ts.map +1 -1
- package/dist/components/ui/menubar.js +12 -12
- package/dist/components/ui/menubar.js.map +1 -1
- package/dist/components/ui/navigation-menu.d.ts +3 -3
- package/dist/components/ui/navigation-menu.d.ts.map +1 -1
- package/dist/components/ui/navigation-menu.js +6 -7
- package/dist/components/ui/navigation-menu.js.map +1 -1
- package/dist/components/ui/pagination.d.ts +2 -2
- package/dist/components/ui/pagination.d.ts.map +1 -1
- package/dist/components/ui/pagination.js +8 -4
- package/dist/components/ui/pagination.js.map +1 -1
- package/dist/components/ui/popover.d.ts +2 -2
- package/dist/components/ui/popover.d.ts.map +1 -1
- package/dist/components/ui/popover.js +3 -3
- 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 +4 -4
- package/dist/components/ui/progress.js.map +1 -1
- package/dist/components/ui/radio-group.d.ts +1 -1
- package/dist/components/ui/radio-group.d.ts.map +1 -1
- package/dist/components/ui/radio-group.js +3 -3
- package/dist/components/ui/radio-group.js.map +1 -1
- package/dist/components/ui/resizable.d.ts +1 -1
- package/dist/components/ui/resizable.d.ts.map +1 -1
- package/dist/components/ui/resizable.js +5 -5
- 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 +1 -1
- package/dist/components/ui/scroll-area.d.ts.map +1 -1
- package/dist/components/ui/scroll-area.js +4 -4
- package/dist/components/ui/scroll-area.js.map +1 -1
- package/dist/components/ui/select.d.ts +1 -1
- package/dist/components/ui/select.d.ts.map +1 -1
- package/dist/components/ui/select.js +7 -7
- 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 +3 -3
- package/dist/components/ui/separator.js.map +1 -1
- package/dist/components/ui/sheet.d.ts +2 -2
- package/dist/components/ui/sheet.d.ts.map +1 -1
- package/dist/components/ui/sheet.js +6 -6
- package/dist/components/ui/sheet.js.map +1 -1
- package/dist/components/ui/sidebar.d.ts +5 -5
- package/dist/components/ui/sidebar.d.ts.map +1 -1
- package/dist/components/ui/sidebar.js +5 -5
- package/dist/components/ui/sidebar.js.map +1 -1
- package/dist/components/ui/skeleton.d.ts.map +1 -1
- package/dist/components/ui/skeleton.js +2 -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 +5 -5
- package/dist/components/ui/slider.js.map +1 -1
- package/dist/components/ui/sonner.d.ts +1 -1
- package/dist/components/ui/sonner.d.ts.map +1 -1
- package/dist/components/ui/sonner.js +1 -1
- package/dist/components/ui/sonner.js.map +1 -1
- package/dist/components/ui/switch.d.ts +1 -1
- package/dist/components/ui/switch.d.ts.map +1 -1
- package/dist/components/ui/switch.js +4 -4
- package/dist/components/ui/switch.js.map +1 -1
- package/dist/components/ui/table.d.ts +1 -1
- package/dist/components/ui/table.d.ts.map +1 -1
- package/dist/components/ui/table.js +5 -5
- package/dist/components/ui/table.js.map +1 -1
- package/dist/components/ui/tabs.d.ts +2 -2
- package/dist/components/ui/tabs.d.ts.map +1 -1
- package/dist/components/ui/tabs.js +4 -4
- 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 +2 -2
- package/dist/components/ui/textarea.js.map +1 -1
- package/dist/components/ui/toggle-group.d.ts +3 -3
- package/dist/components/ui/toggle-group.d.ts.map +1 -1
- package/dist/components/ui/toggle-group.js +2 -2
- package/dist/components/ui/toggle-group.js.map +1 -1
- package/dist/components/ui/toggle.d.ts +6 -6
- package/dist/components/ui/toggle.d.ts.map +1 -1
- package/dist/components/ui/toggle.js +2 -2
- 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 +4 -4
- 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 +15 -11
- 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 +2 -2
- package/dist/index.css.map +1 -1
- package/dist/index.d.ts +37 -37
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- 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 +85 -89
- package/{README.md → readme.md} +627 -627
- package/src/components/ui/accordion.tsx +56 -66
- package/src/components/ui/alert-dialog.tsx +135 -160
- package/src/components/ui/alert.tsx +58 -69
- package/src/components/ui/aspect-ratio.tsx +15 -12
- package/src/components/ui/avatar.tsx +38 -53
- package/src/components/ui/background-beams.tsx +145 -142
- package/src/components/ui/badge.tsx +47 -48
- package/src/components/ui/breadcrumb.tsx +97 -117
- package/src/components/ui/bubble-background.tsx +170 -189
- package/src/components/ui/button.tsx +61 -61
- package/src/components/ui/calendar.tsx +177 -216
- package/src/components/ui/card.tsx +83 -97
- package/src/components/ui/carousel.tsx +204 -241
- package/src/components/ui/chart.tsx +303 -385
- package/src/components/ui/checkbox.tsx +27 -32
- package/src/components/ui/collapsible.tsx +33 -34
- package/src/components/ui/command.tsx +137 -184
- package/src/components/ui/context-menu.tsx +229 -255
- package/src/components/ui/counting-number.tsx +92 -108
- package/src/components/ui/dialog.tsx +141 -146
- package/src/components/ui/dot-background.tsx +153 -158
- package/src/components/ui/drawer.tsx +133 -141
- package/src/components/ui/dropdown-menu.tsx +235 -260
- package/src/components/ui/dropdrawer.tsx +870 -973
- package/src/components/ui/fireworks-background.tsx +325 -378
- package/src/components/ui/flip-button.tsx +89 -110
- package/src/components/ui/form.tsx +145 -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 +48 -44
- package/src/components/ui/input-otp.tsx +76 -77
- package/src/components/ui/input.tsx +22 -22
- package/src/components/ui/label.tsx +21 -24
- package/src/components/ui/menubar.tsx +256 -279
- package/src/components/ui/navigation-menu.tsx +135 -171
- package/src/components/ui/pagination.tsx +103 -129
- package/src/components/ui/popover.tsx +52 -48
- package/src/components/ui/progress.tsx +23 -31
- package/src/components/ui/radio-group.tsx +37 -45
- package/src/components/ui/resizable.tsx +52 -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 +45 -58
- package/src/components/ui/select.tsx +160 -191
- package/src/components/ui/separator.tsx +28 -28
- package/src/components/ui/sheet.tsx +133 -145
- package/src/components/ui/sidebar.tsx +673 -729
- package/src/components/ui/skeleton.tsx +16 -19
- package/src/components/ui/slider.tsx +49 -63
- package/src/components/ui/sonner.tsx +30 -26
- package/src/components/ui/switch.tsx +27 -31
- package/src/components/ui/table.tsx +98 -119
- package/src/components/ui/tabs.tsx +54 -66
- package/src/components/ui/textarea.tsx +20 -20
- package/src/components/ui/toggle-group.tsx +66 -73
- package/src/components/ui/toggle.tsx +46 -47
- package/src/components/ui/tooltip.tsx +56 -61
- package/src/components/ui/typewriter.tsx +174 -188
- package/src/hooks/useIsMobile.tsx +42 -45
- package/src/hooks/useWindowSize.tsx +66 -72
- package/src/index.css +73 -73
- package/src/index.ts +303 -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,171 +1,135 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import * as
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
function NavigationMenu({
|
|
11
|
-
className,
|
|
12
|
-
children,
|
|
13
|
-
viewport = true,
|
|
14
|
-
...props
|
|
15
|
-
}: React.ComponentProps<typeof NavigationMenuPrimitive.Root> & {
|
|
16
|
-
viewport?: boolean;
|
|
17
|
-
}) {
|
|
18
|
-
return (
|
|
19
|
-
<NavigationMenuPrimitive.Root
|
|
20
|
-
data-slot=
|
|
21
|
-
data-viewport={viewport}
|
|
22
|
-
className={cn(
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
)}
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
)}
|
|
45
|
-
{...props}
|
|
46
|
-
/>
|
|
47
|
-
);
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
{
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
{
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
data-
|
|
117
|
-
className
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
className,
|
|
137
|
-
)}
|
|
138
|
-
{...props}
|
|
139
|
-
/>
|
|
140
|
-
);
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
function NavigationMenuIndicator({
|
|
144
|
-
className,
|
|
145
|
-
...props
|
|
146
|
-
}: React.ComponentProps<typeof NavigationMenuPrimitive.Indicator>) {
|
|
147
|
-
return (
|
|
148
|
-
<NavigationMenuPrimitive.Indicator
|
|
149
|
-
data-slot="navigation-menu-indicator"
|
|
150
|
-
className={cn(
|
|
151
|
-
"data-[state=visible]:animate-in data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:fade-in top-full z-[1] flex h-1.5 items-end justify-center overflow-hidden",
|
|
152
|
-
className,
|
|
153
|
-
)}
|
|
154
|
-
{...props}
|
|
155
|
-
>
|
|
156
|
-
<div className="bg-neutral-200 relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm shadow-md dark:bg-neutral-800" />
|
|
157
|
-
</NavigationMenuPrimitive.Indicator>
|
|
158
|
-
);
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
export {
|
|
162
|
-
NavigationMenu,
|
|
163
|
-
NavigationMenuList,
|
|
164
|
-
NavigationMenuItem,
|
|
165
|
-
NavigationMenuContent,
|
|
166
|
-
NavigationMenuTrigger,
|
|
167
|
-
NavigationMenuLink,
|
|
168
|
-
NavigationMenuIndicator,
|
|
169
|
-
NavigationMenuViewport,
|
|
170
|
-
navigationMenuTriggerStyle,
|
|
171
|
-
};
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import * as NavigationMenuPrimitive from "@radix-ui/react-navigation-menu";
|
|
4
|
+
import {cva} from "class-variance-authority";
|
|
5
|
+
import {ChevronDownIcon} from "lucide-react";
|
|
6
|
+
import * as React from "react";
|
|
7
|
+
|
|
8
|
+
import {cn} from "@/lib/utilities";
|
|
9
|
+
|
|
10
|
+
function NavigationMenu({
|
|
11
|
+
className,
|
|
12
|
+
children,
|
|
13
|
+
viewport = true,
|
|
14
|
+
...props
|
|
15
|
+
}: React.ComponentProps<typeof NavigationMenuPrimitive.Root> & {
|
|
16
|
+
viewport?: boolean;
|
|
17
|
+
}) {
|
|
18
|
+
return (
|
|
19
|
+
<NavigationMenuPrimitive.Root
|
|
20
|
+
data-slot='navigation-menu'
|
|
21
|
+
data-viewport={viewport}
|
|
22
|
+
className={cn("group/navigation-menu relative flex max-w-max flex-1 items-center justify-center", className)}
|
|
23
|
+
{...props}>
|
|
24
|
+
{children}
|
|
25
|
+
{Boolean(viewport) && <NavigationMenuViewport />}
|
|
26
|
+
</NavigationMenuPrimitive.Root>
|
|
27
|
+
);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
function NavigationMenuList({className, ...props}: React.ComponentProps<typeof NavigationMenuPrimitive.List>) {
|
|
31
|
+
return (
|
|
32
|
+
<NavigationMenuPrimitive.List
|
|
33
|
+
data-slot='navigation-menu-list'
|
|
34
|
+
className={cn("group flex flex-1 list-none items-center justify-center gap-1", className)}
|
|
35
|
+
{...props}
|
|
36
|
+
/>
|
|
37
|
+
);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
function NavigationMenuItem({className, ...props}: React.ComponentProps<typeof NavigationMenuPrimitive.Item>) {
|
|
41
|
+
return (
|
|
42
|
+
<NavigationMenuPrimitive.Item
|
|
43
|
+
data-slot='navigation-menu-item'
|
|
44
|
+
className={cn("relative", className)}
|
|
45
|
+
{...props}
|
|
46
|
+
/>
|
|
47
|
+
);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
const navigationMenuTriggerStyle = cva(
|
|
51
|
+
"group inline-flex h-9 w-max items-center justify-center rounded-md bg-white px-4 py-2 text-sm font-medium hover:bg-neutral-100 hover:text-neutral-900 focus:bg-neutral-100 focus:text-neutral-900 disabled:pointer-events-none disabled:opacity-50 data-[state=open]:hover:bg-neutral-100 data-[state=open]:text-neutral-900 data-[state=open]:focus:bg-neutral-100 data-[state=open]:bg-neutral-100/50 focus-visible:ring-neutral-950/50 outline-none transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 dark:bg-neutral-950 dark:hover:bg-neutral-800 dark:hover:text-neutral-50 dark:focus:bg-neutral-800 dark:focus:text-neutral-50 dark:data-[state=open]:hover:bg-neutral-800 dark:data-[state=open]:text-neutral-50 dark:data-[state=open]:focus:bg-neutral-800 dark:data-[state=open]:bg-neutral-800/50 dark:focus-visible:ring-neutral-300/50",
|
|
52
|
+
);
|
|
53
|
+
|
|
54
|
+
function NavigationMenuTrigger({className, children, ...props}: React.ComponentProps<typeof NavigationMenuPrimitive.Trigger>) {
|
|
55
|
+
return (
|
|
56
|
+
<NavigationMenuPrimitive.Trigger
|
|
57
|
+
data-slot='navigation-menu-trigger'
|
|
58
|
+
className={cn(navigationMenuTriggerStyle(), "group", className)}
|
|
59
|
+
{...props}>
|
|
60
|
+
{children}
|
|
61
|
+
<ChevronDownIcon
|
|
62
|
+
className='relative top-[1px] ml-1 size-3 transition duration-300 group-data-[state=open]:rotate-180'
|
|
63
|
+
aria-hidden='true'
|
|
64
|
+
/>
|
|
65
|
+
</NavigationMenuPrimitive.Trigger>
|
|
66
|
+
);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
function NavigationMenuContent({className, ...props}: React.ComponentProps<typeof NavigationMenuPrimitive.Content>) {
|
|
70
|
+
return (
|
|
71
|
+
<NavigationMenuPrimitive.Content
|
|
72
|
+
data-slot='navigation-menu-content'
|
|
73
|
+
className={cn(
|
|
74
|
+
"data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 top-0 left-0 w-full p-2 pr-2.5 md:absolute md:w-auto",
|
|
75
|
+
"group-data-[viewport=false]/navigation-menu:bg-popover group-data-[viewport=false]/navigation-menu:text-popover-foreground group-data-[viewport=false]/navigation-menu:data-[state=open]:animate-in group-data-[viewport=false]/navigation-menu:data-[state=closed]:animate-out group-data-[viewport=false]/navigation-menu:data-[state=closed]:zoom-out-95 group-data-[viewport=false]/navigation-menu:data-[state=open]:zoom-in-95 group-data-[viewport=false]/navigation-menu:data-[state=open]:fade-in-0 group-data-[viewport=false]/navigation-menu:data-[state=closed]:fade-out-0 group-data-[viewport=false]/navigation-menu:top-full group-data-[viewport=false]/navigation-menu:mt-1.5 group-data-[viewport=false]/navigation-menu:overflow-hidden group-data-[viewport=false]/navigation-menu:rounded-md group-data-[viewport=false]/navigation-menu:border group-data-[viewport=false]/navigation-menu:shadow group-data-[viewport=false]/navigation-menu:duration-200 **:data-[slot=navigation-menu-link]:focus:ring-0 **:data-[slot=navigation-menu-link]:focus:outline-none",
|
|
76
|
+
className,
|
|
77
|
+
)}
|
|
78
|
+
{...props}
|
|
79
|
+
/>
|
|
80
|
+
);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
function NavigationMenuViewport({className, ...props}: React.ComponentProps<typeof NavigationMenuPrimitive.Viewport>) {
|
|
84
|
+
return (
|
|
85
|
+
<div className={cn("absolute top-full left-0 isolate z-50 flex justify-center")}>
|
|
86
|
+
<NavigationMenuPrimitive.Viewport
|
|
87
|
+
data-slot='navigation-menu-viewport'
|
|
88
|
+
className={cn(
|
|
89
|
+
"origin-top-center data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden rounded-md border border-neutral-200 bg-white text-neutral-950 shadow md:w-[var(--radix-navigation-menu-viewport-width)] dark:border-neutral-800 dark:bg-neutral-950 dark:text-neutral-50",
|
|
90
|
+
className,
|
|
91
|
+
)}
|
|
92
|
+
{...props}
|
|
93
|
+
/>
|
|
94
|
+
</div>
|
|
95
|
+
);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
function NavigationMenuLink({className, ...props}: React.ComponentProps<typeof NavigationMenuPrimitive.Link>) {
|
|
99
|
+
return (
|
|
100
|
+
<NavigationMenuPrimitive.Link
|
|
101
|
+
data-slot='navigation-menu-link'
|
|
102
|
+
className={cn(
|
|
103
|
+
"flex flex-col gap-1 rounded-sm p-2 text-sm transition-all outline-none hover:bg-neutral-100 hover:text-neutral-900 focus:bg-neutral-100 focus:text-neutral-900 focus-visible:ring-[3px] focus-visible:ring-neutral-950/50 focus-visible:outline-1 data-[active=true]:bg-neutral-100/50 data-[active=true]:text-neutral-900 data-[active=true]:hover:bg-neutral-100 data-[active=true]:focus:bg-neutral-100 dark:hover:bg-neutral-800 dark:hover:text-neutral-50 dark:focus:bg-neutral-800 dark:focus:text-neutral-50 dark:focus-visible:ring-neutral-300/50 dark:data-[active=true]:bg-neutral-800/50 dark:data-[active=true]:text-neutral-50 dark:data-[active=true]:hover:bg-neutral-800 dark:data-[active=true]:focus:bg-neutral-800 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-neutral-500 dark:[&_svg:not([class*='text-'])]:text-neutral-400",
|
|
104
|
+
className,
|
|
105
|
+
)}
|
|
106
|
+
{...props}
|
|
107
|
+
/>
|
|
108
|
+
);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
function NavigationMenuIndicator({className, ...props}: React.ComponentProps<typeof NavigationMenuPrimitive.Indicator>) {
|
|
112
|
+
return (
|
|
113
|
+
<NavigationMenuPrimitive.Indicator
|
|
114
|
+
data-slot='navigation-menu-indicator'
|
|
115
|
+
className={cn(
|
|
116
|
+
"data-[state=visible]:animate-in data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:fade-in top-full z-[1] flex h-1.5 items-end justify-center overflow-hidden",
|
|
117
|
+
className,
|
|
118
|
+
)}
|
|
119
|
+
{...props}>
|
|
120
|
+
<div className='relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-neutral-200 shadow-md dark:bg-neutral-800' />
|
|
121
|
+
</NavigationMenuPrimitive.Indicator>
|
|
122
|
+
);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
export {
|
|
126
|
+
NavigationMenu,
|
|
127
|
+
NavigationMenuContent,
|
|
128
|
+
NavigationMenuIndicator,
|
|
129
|
+
NavigationMenuItem,
|
|
130
|
+
NavigationMenuLink,
|
|
131
|
+
NavigationMenuList,
|
|
132
|
+
NavigationMenuTrigger,
|
|
133
|
+
navigationMenuTriggerStyle,
|
|
134
|
+
NavigationMenuViewport,
|
|
135
|
+
};
|
|
@@ -1,129 +1,103 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
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
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
}: React.ComponentProps<
|
|
91
|
-
return (
|
|
92
|
-
<
|
|
93
|
-
aria-
|
|
94
|
-
|
|
95
|
-
className={cn("
|
|
96
|
-
{...props}
|
|
97
|
-
|
|
98
|
-
<span className=
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
function PaginationEllipsis({
|
|
105
|
-
className,
|
|
106
|
-
...props
|
|
107
|
-
}: React.ComponentProps<"span">) {
|
|
108
|
-
return (
|
|
109
|
-
<span
|
|
110
|
-
aria-hidden
|
|
111
|
-
data-slot="pagination-ellipsis"
|
|
112
|
-
className={cn("flex size-9 items-center justify-center", className)}
|
|
113
|
-
{...props}
|
|
114
|
-
>
|
|
115
|
-
<MoreHorizontalIcon className="size-4" />
|
|
116
|
-
<span className="sr-only">More pages</span>
|
|
117
|
-
</span>
|
|
118
|
-
);
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
export {
|
|
122
|
-
Pagination,
|
|
123
|
-
PaginationContent,
|
|
124
|
-
PaginationLink,
|
|
125
|
-
PaginationItem,
|
|
126
|
-
PaginationPrevious,
|
|
127
|
-
PaginationNext,
|
|
128
|
-
PaginationEllipsis,
|
|
129
|
-
};
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import {ChevronLeftIcon, ChevronRightIcon, MoreHorizontalIcon} from "lucide-react";
|
|
4
|
+
import * as React from "react";
|
|
5
|
+
|
|
6
|
+
import {Button, buttonVariants} from "@/components/ui/button";
|
|
7
|
+
import {cn} from "@/lib/utilities";
|
|
8
|
+
|
|
9
|
+
function Pagination({className, ...props}: React.ComponentProps<"nav">) {
|
|
10
|
+
return (
|
|
11
|
+
<nav
|
|
12
|
+
role='navigation'
|
|
13
|
+
aria-label='pagination'
|
|
14
|
+
data-slot='pagination'
|
|
15
|
+
className={cn("mx-auto flex w-full justify-center", className)}
|
|
16
|
+
{...props}
|
|
17
|
+
/>
|
|
18
|
+
);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
function PaginationContent({className, ...props}: React.ComponentProps<"ul">) {
|
|
22
|
+
return (
|
|
23
|
+
<ul
|
|
24
|
+
data-slot='pagination-content'
|
|
25
|
+
className={cn("flex flex-row items-center gap-1", className)}
|
|
26
|
+
{...props}
|
|
27
|
+
/>
|
|
28
|
+
);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
function PaginationItem({...props}: React.ComponentProps<"li">) {
|
|
32
|
+
return (
|
|
33
|
+
<li
|
|
34
|
+
data-slot='pagination-item'
|
|
35
|
+
{...props}
|
|
36
|
+
/>
|
|
37
|
+
);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
type PaginationLinkProps = {
|
|
41
|
+
isActive?: boolean;
|
|
42
|
+
} & Pick<React.ComponentProps<typeof Button>, "size">
|
|
43
|
+
& React.ComponentProps<"a">;
|
|
44
|
+
|
|
45
|
+
function PaginationLink({className, isActive, size = "icon", children, ...props}: PaginationLinkProps) {
|
|
46
|
+
return (
|
|
47
|
+
<a
|
|
48
|
+
aria-current={isActive ? "page" : undefined}
|
|
49
|
+
data-slot='pagination-link'
|
|
50
|
+
data-active={isActive}
|
|
51
|
+
className={cn(
|
|
52
|
+
buttonVariants({
|
|
53
|
+
variant: isActive ? "outline" : "ghost",
|
|
54
|
+
size,
|
|
55
|
+
}),
|
|
56
|
+
className,
|
|
57
|
+
)}
|
|
58
|
+
{...props}>
|
|
59
|
+
{children ?? <span className='sr-only'>Pagination link</span>}
|
|
60
|
+
</a>
|
|
61
|
+
);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
function PaginationPrevious({className, ...props}: React.ComponentProps<typeof PaginationLink>) {
|
|
65
|
+
return (
|
|
66
|
+
<PaginationLink
|
|
67
|
+
aria-label='Go to previous page'
|
|
68
|
+
size='default'
|
|
69
|
+
className={cn("gap-1 px-2.5 sm:pl-2.5", className)}
|
|
70
|
+
{...props}>
|
|
71
|
+
<ChevronLeftIcon />
|
|
72
|
+
<span className='hidden sm:block'>Previous</span>
|
|
73
|
+
</PaginationLink>
|
|
74
|
+
);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
function PaginationNext({className, ...props}: React.ComponentProps<typeof PaginationLink>) {
|
|
78
|
+
return (
|
|
79
|
+
<PaginationLink
|
|
80
|
+
aria-label='Go to next page'
|
|
81
|
+
size='default'
|
|
82
|
+
className={cn("gap-1 px-2.5 sm:pr-2.5", className)}
|
|
83
|
+
{...props}>
|
|
84
|
+
<span className='hidden sm:block'>Next</span>
|
|
85
|
+
<ChevronRightIcon />
|
|
86
|
+
</PaginationLink>
|
|
87
|
+
);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
function PaginationEllipsis({className, ...props}: React.ComponentProps<"span">) {
|
|
91
|
+
return (
|
|
92
|
+
<span
|
|
93
|
+
aria-hidden
|
|
94
|
+
data-slot='pagination-ellipsis'
|
|
95
|
+
className={cn("flex size-9 items-center justify-center", className)}
|
|
96
|
+
{...props}>
|
|
97
|
+
<MoreHorizontalIcon className='size-4' />
|
|
98
|
+
<span className='sr-only'>More pages</span>
|
|
99
|
+
</span>
|
|
100
|
+
);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
export {Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious};
|
|
@@ -1,48 +1,52 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import * as
|
|
4
|
-
import * as
|
|
5
|
-
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
function Popover({
|
|
9
|
-
|
|
10
|
-
|
|
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
|
-
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import * as PopoverPrimitive from "@radix-ui/react-popover";
|
|
4
|
+
import * as React from "react";
|
|
5
|
+
|
|
6
|
+
import {cn} from "@/lib/utilities";
|
|
7
|
+
|
|
8
|
+
function Popover({...props}: React.ComponentProps<typeof PopoverPrimitive.Root>) {
|
|
9
|
+
return (
|
|
10
|
+
<PopoverPrimitive.Root
|
|
11
|
+
data-slot='popover'
|
|
12
|
+
{...props}
|
|
13
|
+
/>
|
|
14
|
+
);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
function PopoverTrigger({...props}: React.ComponentProps<typeof PopoverPrimitive.Trigger>) {
|
|
18
|
+
return (
|
|
19
|
+
<PopoverPrimitive.Trigger
|
|
20
|
+
data-slot='popover-trigger'
|
|
21
|
+
{...props}
|
|
22
|
+
/>
|
|
23
|
+
);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
function PopoverContent({className, align = "center", sideOffset = 4, ...props}: React.ComponentProps<typeof PopoverPrimitive.Content>) {
|
|
27
|
+
return (
|
|
28
|
+
<PopoverPrimitive.Portal>
|
|
29
|
+
<PopoverPrimitive.Content
|
|
30
|
+
data-slot='popover-content'
|
|
31
|
+
align={align}
|
|
32
|
+
sideOffset={sideOffset}
|
|
33
|
+
className={cn(
|
|
34
|
+
"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-72 origin-(--radix-popover-content-transform-origin) rounded-md border border-neutral-200 bg-white p-4 text-neutral-950 shadow-md outline-hidden dark:border-neutral-800 dark:bg-neutral-950 dark:text-neutral-50",
|
|
35
|
+
className,
|
|
36
|
+
)}
|
|
37
|
+
{...props}
|
|
38
|
+
/>
|
|
39
|
+
</PopoverPrimitive.Portal>
|
|
40
|
+
);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
function PopoverAnchor({...props}: React.ComponentProps<typeof PopoverPrimitive.Anchor>) {
|
|
44
|
+
return (
|
|
45
|
+
<PopoverPrimitive.Anchor
|
|
46
|
+
data-slot='popover-anchor'
|
|
47
|
+
{...props}
|
|
48
|
+
/>
|
|
49
|
+
);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export {Popover, PopoverAnchor, PopoverContent, PopoverTrigger};
|