@arolariu/components 0.0.35 → 0.0.37
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 +13 -0
- package/dist/cjs/components/ui/accordion.cjs +1 -1
- package/dist/cjs/components/ui/accordion.cjs.map +1 -1
- package/dist/cjs/components/ui/alert-dialog.cjs +1 -1
- package/dist/cjs/components/ui/alert-dialog.cjs.map +1 -1
- package/dist/cjs/components/ui/alert.cjs +1 -1
- package/dist/cjs/components/ui/alert.cjs.map +1 -1
- package/dist/cjs/components/ui/aspect-ratio.cjs.map +1 -1
- package/dist/cjs/components/ui/avatar.cjs.map +1 -1
- package/dist/cjs/components/ui/background-beams.cjs +210 -0
- package/dist/cjs/components/ui/background-beams.cjs.map +1 -0
- package/dist/cjs/components/ui/badge.cjs +1 -1
- package/dist/cjs/components/ui/badge.cjs.map +1 -1
- package/dist/cjs/components/ui/breadcrumb.cjs.map +1 -1
- package/dist/cjs/components/ui/bubble-background.cjs +214 -0
- package/dist/cjs/components/ui/bubble-background.cjs.map +1 -0
- package/dist/cjs/components/ui/button.cjs +6 -6
- package/dist/cjs/components/ui/button.cjs.map +1 -1
- package/dist/cjs/components/ui/card.cjs +13 -3
- package/dist/cjs/components/ui/card.cjs.map +1 -1
- package/dist/cjs/components/ui/carousel.cjs.map +1 -1
- package/dist/cjs/components/ui/chart.cjs.map +1 -1
- package/dist/cjs/components/ui/checkbox.cjs +1 -1
- package/dist/cjs/components/ui/checkbox.cjs.map +1 -1
- package/dist/cjs/components/ui/collapsible.cjs +1 -1
- package/dist/cjs/components/ui/collapsible.cjs.map +1 -1
- package/dist/cjs/components/ui/command.cjs +2 -2
- package/dist/cjs/components/ui/command.cjs.map +1 -1
- package/dist/cjs/components/ui/context-menu.cjs +7 -7
- package/dist/cjs/components/ui/context-menu.cjs.map +1 -1
- package/dist/cjs/components/ui/counting-number.cjs +95 -0
- package/dist/cjs/components/ui/counting-number.cjs.map +1 -0
- package/dist/cjs/components/ui/dialog.cjs +1 -1
- package/dist/cjs/components/ui/dialog.cjs.map +1 -1
- package/dist/cjs/components/ui/dot-background.cjs +131 -0
- package/dist/cjs/components/ui/dot-background.cjs.map +1 -0
- package/dist/cjs/components/ui/drawer.cjs +3 -3
- package/dist/cjs/components/ui/drawer.cjs.map +1 -1
- package/dist/cjs/components/ui/dropdown-menu.cjs +7 -7
- package/dist/cjs/components/ui/dropdown-menu.cjs.map +1 -1
- package/dist/cjs/components/ui/fireworks-background.cjs +259 -0
- package/dist/cjs/components/ui/fireworks-background.cjs.map +1 -0
- package/dist/cjs/components/ui/flip-button.cjs +100 -0
- package/dist/cjs/components/ui/flip-button.cjs.map +1 -0
- package/dist/cjs/components/ui/form.cjs +2 -2
- package/dist/cjs/components/ui/form.cjs.map +1 -1
- package/dist/cjs/components/ui/gradient-background.cjs +60 -0
- package/dist/cjs/components/ui/gradient-background.cjs.map +1 -0
- package/dist/cjs/components/ui/gradient-text.cjs +83 -0
- package/dist/cjs/components/ui/gradient-text.cjs.map +1 -0
- package/dist/cjs/components/ui/highlight-text.cjs +74 -0
- package/dist/cjs/components/ui/highlight-text.cjs.map +1 -0
- package/dist/cjs/components/ui/hole-background.cjs +361 -0
- package/dist/cjs/components/ui/hole-background.cjs.map +1 -0
- package/dist/cjs/components/ui/hover-card.cjs +9 -6
- package/dist/cjs/components/ui/hover-card.cjs.map +1 -1
- package/dist/cjs/components/ui/input-otp.cjs +2 -3
- package/dist/cjs/components/ui/input-otp.cjs.map +1 -1
- package/dist/cjs/components/ui/input.cjs +1 -1
- package/dist/cjs/components/ui/input.cjs.map +1 -1
- package/dist/cjs/components/ui/label.cjs.map +1 -1
- package/dist/cjs/components/ui/menubar.cjs +9 -9
- package/dist/cjs/components/ui/menubar.cjs.map +1 -1
- package/dist/cjs/components/ui/navigation-menu.cjs +5 -5
- package/dist/cjs/components/ui/navigation-menu.cjs.map +1 -1
- package/dist/cjs/components/ui/pagination.cjs.map +1 -1
- package/dist/cjs/components/ui/popover.cjs +1 -1
- package/dist/cjs/components/ui/popover.cjs.map +1 -1
- package/dist/cjs/components/ui/progress.cjs.map +1 -1
- package/dist/cjs/components/ui/radio-group.cjs +1 -1
- package/dist/cjs/components/ui/radio-group.cjs.map +1 -1
- package/dist/cjs/components/ui/resizable.cjs.map +1 -1
- package/dist/cjs/components/ui/ripple-button.cjs +108 -0
- package/dist/cjs/components/ui/ripple-button.cjs.map +1 -0
- package/dist/cjs/components/ui/scratcher.cjs +179 -0
- package/dist/cjs/components/ui/scratcher.cjs.map +1 -0
- package/dist/cjs/components/ui/scroll-area.cjs +1 -1
- package/dist/cjs/components/ui/scroll-area.cjs.map +1 -1
- package/dist/cjs/components/ui/select.cjs +6 -5
- package/dist/cjs/components/ui/select.cjs.map +1 -1
- package/dist/cjs/components/ui/separator.cjs.map +1 -1
- package/dist/cjs/components/ui/sheet.cjs +1 -1
- package/dist/cjs/components/ui/sheet.cjs.map +1 -1
- package/dist/cjs/components/ui/sidebar.cjs +14 -11
- package/dist/cjs/components/ui/sidebar.cjs.map +1 -1
- package/dist/cjs/components/ui/skeleton.cjs +2 -1
- package/dist/cjs/components/ui/skeleton.cjs.map +1 -1
- package/dist/cjs/components/ui/slider.cjs +2 -2
- package/dist/cjs/components/ui/slider.cjs.map +1 -1
- package/dist/cjs/components/ui/sonner.cjs +5 -7
- package/dist/cjs/components/ui/sonner.cjs.map +1 -1
- package/dist/cjs/components/ui/switch.cjs +2 -2
- package/dist/cjs/components/ui/switch.cjs.map +1 -1
- package/dist/cjs/components/ui/table.cjs +2 -2
- package/dist/cjs/components/ui/table.cjs.map +1 -1
- package/dist/cjs/components/ui/tabs.cjs +3 -3
- package/dist/cjs/components/ui/tabs.cjs.map +1 -1
- package/dist/cjs/components/ui/textarea.cjs +1 -1
- package/dist/cjs/components/ui/textarea.cjs.map +1 -1
- package/dist/cjs/components/ui/toggle-group.cjs +2 -2
- package/dist/cjs/components/ui/toggle-group.cjs.map +1 -1
- package/dist/cjs/components/ui/toggle.cjs +2 -2
- package/dist/cjs/components/ui/toggle.cjs.map +1 -1
- package/dist/cjs/components/ui/tooltip.cjs +1 -1
- package/dist/cjs/components/ui/tooltip.cjs.map +1 -1
- package/dist/cjs/index.cjs +55 -4
- package/dist/cjs/index.css +1013 -258
- package/dist/esm/components/ui/accordion.js +1 -1
- package/dist/esm/components/ui/accordion.js.map +1 -1
- package/dist/esm/components/ui/alert-dialog.js +1 -1
- package/dist/esm/components/ui/alert-dialog.js.map +1 -1
- package/dist/esm/components/ui/alert.js +1 -1
- package/dist/esm/components/ui/alert.js.map +1 -1
- package/dist/esm/components/ui/aspect-ratio.js.map +1 -1
- package/dist/esm/components/ui/avatar.js.map +1 -1
- package/dist/esm/components/ui/background-beams.js +166 -0
- package/dist/esm/components/ui/background-beams.js.map +1 -0
- package/dist/esm/components/ui/badge.js +1 -1
- package/dist/esm/components/ui/badge.js.map +1 -1
- package/dist/esm/components/ui/breadcrumb.js.map +1 -1
- package/dist/esm/components/ui/bubble-background.js +180 -0
- package/dist/esm/components/ui/bubble-background.js.map +1 -0
- package/dist/esm/components/ui/button.js +6 -6
- package/dist/esm/components/ui/button.js.map +1 -1
- package/dist/esm/components/ui/card.js +11 -4
- package/dist/esm/components/ui/card.js.map +1 -1
- package/dist/esm/components/ui/carousel.js.map +1 -1
- package/dist/esm/components/ui/chart.js.map +1 -1
- package/dist/esm/components/ui/checkbox.js +1 -1
- package/dist/esm/components/ui/checkbox.js.map +1 -1
- package/dist/esm/components/ui/collapsible.js +1 -1
- package/dist/esm/components/ui/collapsible.js.map +1 -1
- package/dist/esm/components/ui/command.js +2 -2
- package/dist/esm/components/ui/command.js.map +1 -1
- package/dist/esm/components/ui/context-menu.js +7 -7
- package/dist/esm/components/ui/context-menu.js.map +1 -1
- package/dist/esm/components/ui/counting-number.js +61 -0
- package/dist/esm/components/ui/counting-number.js.map +1 -0
- package/dist/esm/components/ui/dialog.js +1 -1
- package/dist/esm/components/ui/dialog.js.map +1 -1
- package/dist/esm/components/ui/dot-background.js +97 -0
- package/dist/esm/components/ui/dot-background.js.map +1 -0
- package/dist/esm/components/ui/drawer.js +3 -3
- package/dist/esm/components/ui/drawer.js.map +1 -1
- package/dist/esm/components/ui/dropdown-menu.js +7 -7
- package/dist/esm/components/ui/dropdown-menu.js.map +1 -1
- package/dist/esm/components/ui/fireworks-background.js +225 -0
- package/dist/esm/components/ui/fireworks-background.js.map +1 -0
- package/dist/esm/components/ui/flip-button.js +66 -0
- package/dist/esm/components/ui/flip-button.js.map +1 -0
- package/dist/esm/components/ui/form.js +2 -2
- package/dist/esm/components/ui/form.js.map +1 -1
- package/dist/esm/components/ui/gradient-background.js +26 -0
- package/dist/esm/components/ui/gradient-background.js.map +1 -0
- package/dist/esm/components/ui/gradient-text.js +49 -0
- package/dist/esm/components/ui/gradient-text.js.map +1 -0
- package/dist/esm/components/ui/highlight-text.js +40 -0
- package/dist/esm/components/ui/highlight-text.js.map +1 -0
- package/dist/esm/components/ui/hole-background.js +327 -0
- package/dist/esm/components/ui/hole-background.js.map +1 -0
- package/dist/esm/components/ui/hover-card.js +9 -6
- package/dist/esm/components/ui/hover-card.js.map +1 -1
- package/dist/esm/components/ui/input-otp.js +2 -3
- package/dist/esm/components/ui/input-otp.js.map +1 -1
- package/dist/esm/components/ui/input.js +1 -1
- package/dist/esm/components/ui/input.js.map +1 -1
- package/dist/esm/components/ui/label.js.map +1 -1
- package/dist/esm/components/ui/menubar.js +9 -9
- package/dist/esm/components/ui/menubar.js.map +1 -1
- package/dist/esm/components/ui/navigation-menu.js +5 -5
- package/dist/esm/components/ui/navigation-menu.js.map +1 -1
- package/dist/esm/components/ui/pagination.js.map +1 -1
- package/dist/esm/components/ui/popover.js +1 -1
- package/dist/esm/components/ui/popover.js.map +1 -1
- package/dist/esm/components/ui/progress.js.map +1 -1
- package/dist/esm/components/ui/radio-group.js +1 -1
- package/dist/esm/components/ui/radio-group.js.map +1 -1
- package/dist/esm/components/ui/resizable.js.map +1 -1
- package/dist/esm/components/ui/ripple-button.js +74 -0
- package/dist/esm/components/ui/ripple-button.js.map +1 -0
- package/dist/esm/components/ui/scratcher.js +145 -0
- package/dist/esm/components/ui/scratcher.js.map +1 -0
- package/dist/esm/components/ui/scroll-area.js +1 -1
- package/dist/esm/components/ui/scroll-area.js.map +1 -1
- package/dist/esm/components/ui/select.js +6 -5
- package/dist/esm/components/ui/select.js.map +1 -1
- package/dist/esm/components/ui/separator.js.map +1 -1
- package/dist/esm/components/ui/sheet.js +1 -1
- package/dist/esm/components/ui/sheet.js.map +1 -1
- package/dist/esm/components/ui/sidebar.js +14 -11
- package/dist/esm/components/ui/sidebar.js.map +1 -1
- package/dist/esm/components/ui/skeleton.js +2 -1
- package/dist/esm/components/ui/skeleton.js.map +1 -1
- package/dist/esm/components/ui/slider.js +2 -2
- package/dist/esm/components/ui/slider.js.map +1 -1
- package/dist/esm/components/ui/sonner.js +5 -7
- package/dist/esm/components/ui/sonner.js.map +1 -1
- package/dist/esm/components/ui/switch.js +2 -2
- package/dist/esm/components/ui/switch.js.map +1 -1
- package/dist/esm/components/ui/table.js +2 -2
- package/dist/esm/components/ui/table.js.map +1 -1
- package/dist/esm/components/ui/tabs.js +3 -3
- package/dist/esm/components/ui/tabs.js.map +1 -1
- package/dist/esm/components/ui/textarea.js +1 -1
- package/dist/esm/components/ui/textarea.js.map +1 -1
- package/dist/esm/components/ui/toggle-group.js +2 -2
- package/dist/esm/components/ui/toggle-group.js.map +1 -1
- package/dist/esm/components/ui/toggle.js +2 -2
- package/dist/esm/components/ui/toggle.js.map +1 -1
- package/dist/esm/components/ui/tooltip.js +1 -1
- package/dist/esm/components/ui/tooltip.js.map +1 -1
- package/dist/esm/index.css +1013 -258
- package/dist/esm/index.js +26 -1
- package/dist/index.css +1013 -258
- package/dist/index.js +26 -1
- package/dist/types/components/ui/background-beams.d.ts +4 -0
- package/dist/types/components/ui/bubble-background.d.ts +16 -0
- package/dist/types/components/ui/card.d.ts +2 -1
- package/dist/types/components/ui/counting-number.d.ts +15 -0
- package/dist/types/components/ui/dot-background.d.ts +57 -0
- package/dist/types/components/ui/fireworks-background.d.ts +24 -0
- package/dist/types/components/ui/flip-button.d.ts +13 -0
- package/dist/types/components/ui/form.d.ts +1 -1
- package/dist/types/components/ui/gradient-background.d.ts +7 -0
- package/dist/types/components/ui/gradient-text.d.ts +10 -0
- package/dist/types/components/ui/highlight-text.d.ts +11 -0
- package/dist/types/components/ui/hole-background.d.ts +9 -0
- package/dist/types/components/ui/ripple-button.d.ts +10 -0
- package/dist/types/components/ui/scratcher.d.ts +12 -0
- package/dist/types/components/ui/select.d.ts +3 -1
- package/dist/types/components/ui/sidebar.d.ts +5 -6
- package/dist/types/index.d.ts +13 -1
- package/package.json +536 -461
- package/readme.md +10 -6
- package/src/components/ui/accordion.tsx +3 -2
- package/src/components/ui/alert-dialog.tsx +160 -160
- package/src/components/ui/alert.tsx +3 -2
- package/src/components/ui/aspect-ratio.tsx +12 -12
- package/src/components/ui/avatar.tsx +53 -52
- package/src/components/ui/background-beams.tsx +142 -0
- package/src/components/ui/badge.tsx +48 -47
- package/src/components/ui/breadcrumb.tsx +117 -116
- package/src/components/ui/bubble-background.tsx +187 -0
- package/src/components/ui/button.tsx +61 -60
- package/src/components/ui/card.tsx +97 -79
- package/src/components/ui/carousel.tsx +241 -240
- package/src/components/ui/chart.tsx +353 -352
- package/src/components/ui/checkbox.tsx +32 -31
- package/src/components/ui/collapsible.tsx +34 -34
- package/src/components/ui/command.tsx +177 -176
- package/src/components/ui/context-menu.tsx +255 -254
- package/src/components/ui/counting-number.tsx +108 -0
- package/src/components/ui/dialog.tsx +3 -2
- package/src/components/ui/dot-background.tsx +158 -0
- package/src/components/ui/drawer.tsx +138 -137
- package/src/components/ui/dropdown-menu.tsx +260 -259
- package/src/components/ui/fireworks-background.tsx +378 -0
- package/src/components/ui/flip-button.tsx +110 -0
- package/src/components/ui/form.tsx +174 -173
- package/src/components/ui/gradient-background.tsx +43 -0
- package/src/components/ui/gradient-text.tsx +65 -0
- package/src/components/ui/highlight-text.tsx +71 -0
- package/src/components/ui/hole-background.tsx +361 -0
- package/src/components/ui/hover-card.tsx +44 -41
- package/src/components/ui/input-otp.tsx +77 -77
- package/src/components/ui/input.tsx +23 -22
- package/src/components/ui/label.tsx +24 -23
- package/src/components/ui/menubar.tsx +279 -278
- package/src/components/ui/navigation-menu.tsx +171 -170
- package/src/components/ui/pagination.tsx +129 -128
- package/src/components/ui/popover.tsx +48 -47
- package/src/components/ui/progress.tsx +31 -30
- package/src/components/ui/radio-group.tsx +45 -44
- package/src/components/ui/resizable.tsx +56 -55
- package/src/components/ui/ripple-button.tsx +111 -0
- package/src/components/ui/scratcher.tsx +171 -0
- package/src/components/ui/scroll-area.tsx +58 -57
- package/src/components/ui/select.tsx +191 -183
- package/src/components/ui/separator.tsx +28 -27
- package/src/components/ui/sheet.tsx +145 -144
- package/src/components/ui/sidebar.tsx +729 -725
- package/src/components/ui/skeleton.tsx +19 -17
- package/src/components/ui/slider.tsx +63 -62
- package/src/components/ui/sonner.tsx +8 -12
- package/src/components/ui/switch.tsx +31 -30
- package/src/components/ui/table.tsx +119 -118
- package/src/components/ui/tabs.tsx +66 -65
- package/src/components/ui/textarea.tsx +20 -19
- package/src/components/ui/toggle-group.tsx +73 -72
- package/src/components/ui/toggle.tsx +47 -46
- package/src/components/ui/tooltip.tsx +61 -60
- package/src/index.css +75 -42
- package/src/index.ts +385 -330
|
@@ -1,254 +1,255 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import * as React from "react";
|
|
4
|
-
import * as ContextMenuPrimitive from "@radix-ui/react-context-menu";
|
|
5
|
-
import { CheckIcon, ChevronRightIcon, CircleIcon } from "lucide-react";
|
|
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
|
-
data-
|
|
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
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
data-
|
|
126
|
-
data-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
{
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
data-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import * as ContextMenuPrimitive from "@radix-ui/react-context-menu";
|
|
5
|
+
import { CheckIcon, ChevronRightIcon, CircleIcon } from "lucide-react";
|
|
6
|
+
|
|
7
|
+
import { cn } from "@/lib/utils";
|
|
8
|
+
|
|
9
|
+
function ContextMenu({
|
|
10
|
+
...props
|
|
11
|
+
}: React.ComponentProps<typeof ContextMenuPrimitive.Root>) {
|
|
12
|
+
return <ContextMenuPrimitive.Root data-slot="context-menu" {...props} />;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
function ContextMenuTrigger({
|
|
16
|
+
...props
|
|
17
|
+
}: React.ComponentProps<typeof ContextMenuPrimitive.Trigger>) {
|
|
18
|
+
return (
|
|
19
|
+
<ContextMenuPrimitive.Trigger data-slot="context-menu-trigger" {...props} />
|
|
20
|
+
);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
function ContextMenuGroup({
|
|
24
|
+
...props
|
|
25
|
+
}: React.ComponentProps<typeof ContextMenuPrimitive.Group>) {
|
|
26
|
+
return (
|
|
27
|
+
<ContextMenuPrimitive.Group data-slot="context-menu-group" {...props} />
|
|
28
|
+
);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
function ContextMenuPortal({
|
|
32
|
+
...props
|
|
33
|
+
}: React.ComponentProps<typeof ContextMenuPrimitive.Portal>) {
|
|
34
|
+
return (
|
|
35
|
+
<ContextMenuPrimitive.Portal data-slot="context-menu-portal" {...props} />
|
|
36
|
+
);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
function ContextMenuSub({
|
|
40
|
+
...props
|
|
41
|
+
}: React.ComponentProps<typeof ContextMenuPrimitive.Sub>) {
|
|
42
|
+
return <ContextMenuPrimitive.Sub data-slot="context-menu-sub" {...props} />;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
function ContextMenuRadioGroup({
|
|
46
|
+
...props
|
|
47
|
+
}: React.ComponentProps<typeof ContextMenuPrimitive.RadioGroup>) {
|
|
48
|
+
return (
|
|
49
|
+
<ContextMenuPrimitive.RadioGroup
|
|
50
|
+
data-slot="context-menu-radio-group"
|
|
51
|
+
{...props}
|
|
52
|
+
/>
|
|
53
|
+
);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
function ContextMenuSubTrigger({
|
|
57
|
+
className,
|
|
58
|
+
inset,
|
|
59
|
+
children,
|
|
60
|
+
...props
|
|
61
|
+
}: React.ComponentProps<typeof ContextMenuPrimitive.SubTrigger> & {
|
|
62
|
+
inset?: boolean;
|
|
63
|
+
}) {
|
|
64
|
+
return (
|
|
65
|
+
<ContextMenuPrimitive.SubTrigger
|
|
66
|
+
data-slot="context-menu-sub-trigger"
|
|
67
|
+
data-inset={inset}
|
|
68
|
+
className={cn(
|
|
69
|
+
"focus:bg-neutral-100 focus:text-neutral-900 data-[state=open]:bg-neutral-100 data-[state=open]:text-neutral-900 flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 dark:focus:bg-neutral-800 dark:focus:text-neutral-50 dark:data-[state=open]:bg-neutral-800 dark:data-[state=open]:text-neutral-50",
|
|
70
|
+
className
|
|
71
|
+
)}
|
|
72
|
+
{...props}
|
|
73
|
+
>
|
|
74
|
+
{children}
|
|
75
|
+
<ChevronRightIcon className="ml-auto" />
|
|
76
|
+
</ContextMenuPrimitive.SubTrigger>
|
|
77
|
+
);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
function ContextMenuSubContent({
|
|
81
|
+
className,
|
|
82
|
+
...props
|
|
83
|
+
}: React.ComponentProps<typeof ContextMenuPrimitive.SubContent>) {
|
|
84
|
+
return (
|
|
85
|
+
<ContextMenuPrimitive.SubContent
|
|
86
|
+
data-slot="context-menu-sub-content"
|
|
87
|
+
className={cn(
|
|
88
|
+
"bg-white text-neutral-950 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] origin-(--radix-context-menu-content-transform-origin) overflow-hidden rounded-md border border-neutral-200 p-1 shadow-lg dark:bg-neutral-950 dark:text-neutral-50 dark:border-neutral-800",
|
|
89
|
+
className
|
|
90
|
+
)}
|
|
91
|
+
{...props}
|
|
92
|
+
/>
|
|
93
|
+
);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
function ContextMenuContent({
|
|
97
|
+
className,
|
|
98
|
+
...props
|
|
99
|
+
}: React.ComponentProps<typeof ContextMenuPrimitive.Content>) {
|
|
100
|
+
return (
|
|
101
|
+
<ContextMenuPrimitive.Portal>
|
|
102
|
+
<ContextMenuPrimitive.Content
|
|
103
|
+
data-slot="context-menu-content"
|
|
104
|
+
className={cn(
|
|
105
|
+
"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 max-h-(--radix-context-menu-content-available-height) min-w-[8rem] origin-(--radix-context-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border border-neutral-200 p-1 shadow-md dark:bg-neutral-950 dark:text-neutral-50 dark:border-neutral-800",
|
|
106
|
+
className
|
|
107
|
+
)}
|
|
108
|
+
{...props}
|
|
109
|
+
/>
|
|
110
|
+
</ContextMenuPrimitive.Portal>
|
|
111
|
+
);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
function ContextMenuItem({
|
|
115
|
+
className,
|
|
116
|
+
inset,
|
|
117
|
+
variant = "default",
|
|
118
|
+
...props
|
|
119
|
+
}: React.ComponentProps<typeof ContextMenuPrimitive.Item> & {
|
|
120
|
+
inset?: boolean;
|
|
121
|
+
variant?: "default" | "destructive";
|
|
122
|
+
}) {
|
|
123
|
+
return (
|
|
124
|
+
<ContextMenuPrimitive.Item
|
|
125
|
+
data-slot="context-menu-item"
|
|
126
|
+
data-inset={inset}
|
|
127
|
+
data-variant={variant}
|
|
128
|
+
className={cn(
|
|
129
|
+
"focus:bg-neutral-100 focus:text-neutral-900 data-[variant=destructive]:text-red-500 data-[variant=destructive]:focus:bg-red-500/10 dark:data-[variant=destructive]:focus:bg-red-500/20 data-[variant=destructive]:focus:text-red-500 data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-neutral-500 relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 dark:focus:bg-neutral-800 dark:focus:text-neutral-50 dark:data-[variant=destructive]:text-red-900 dark:data-[variant=destructive]:focus:bg-red-900/10 dark:dark:data-[variant=destructive]:focus:bg-red-900/20 dark:data-[variant=destructive]:focus:text-red-900 dark:[&_svg:not([class*='text-'])]:text-neutral-400",
|
|
130
|
+
className
|
|
131
|
+
)}
|
|
132
|
+
{...props}
|
|
133
|
+
/>
|
|
134
|
+
);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
function ContextMenuCheckboxItem({
|
|
138
|
+
className,
|
|
139
|
+
children,
|
|
140
|
+
checked,
|
|
141
|
+
...props
|
|
142
|
+
}: React.ComponentProps<typeof ContextMenuPrimitive.CheckboxItem>) {
|
|
143
|
+
return (
|
|
144
|
+
<ContextMenuPrimitive.CheckboxItem
|
|
145
|
+
data-slot="context-menu-checkbox-item"
|
|
146
|
+
className={cn(
|
|
147
|
+
"focus:bg-neutral-100 focus:text-neutral-900 relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 dark:focus:bg-neutral-800 dark:focus:text-neutral-50",
|
|
148
|
+
className
|
|
149
|
+
)}
|
|
150
|
+
checked={checked}
|
|
151
|
+
{...props}
|
|
152
|
+
>
|
|
153
|
+
<span className="pointer-events-none absolute left-2 flex size-3.5 items-center justify-center">
|
|
154
|
+
<ContextMenuPrimitive.ItemIndicator>
|
|
155
|
+
<CheckIcon className="size-4" />
|
|
156
|
+
</ContextMenuPrimitive.ItemIndicator>
|
|
157
|
+
</span>
|
|
158
|
+
{children}
|
|
159
|
+
</ContextMenuPrimitive.CheckboxItem>
|
|
160
|
+
);
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
function ContextMenuRadioItem({
|
|
164
|
+
className,
|
|
165
|
+
children,
|
|
166
|
+
...props
|
|
167
|
+
}: React.ComponentProps<typeof ContextMenuPrimitive.RadioItem>) {
|
|
168
|
+
return (
|
|
169
|
+
<ContextMenuPrimitive.RadioItem
|
|
170
|
+
data-slot="context-menu-radio-item"
|
|
171
|
+
className={cn(
|
|
172
|
+
"focus:bg-neutral-100 focus:text-neutral-900 relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 dark:focus:bg-neutral-800 dark:focus:text-neutral-50",
|
|
173
|
+
className
|
|
174
|
+
)}
|
|
175
|
+
{...props}
|
|
176
|
+
>
|
|
177
|
+
<span className="pointer-events-none absolute left-2 flex size-3.5 items-center justify-center">
|
|
178
|
+
<ContextMenuPrimitive.ItemIndicator>
|
|
179
|
+
<CircleIcon className="size-2 fill-current" />
|
|
180
|
+
</ContextMenuPrimitive.ItemIndicator>
|
|
181
|
+
</span>
|
|
182
|
+
{children}
|
|
183
|
+
</ContextMenuPrimitive.RadioItem>
|
|
184
|
+
);
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
function ContextMenuLabel({
|
|
188
|
+
className,
|
|
189
|
+
inset,
|
|
190
|
+
...props
|
|
191
|
+
}: React.ComponentProps<typeof ContextMenuPrimitive.Label> & {
|
|
192
|
+
inset?: boolean;
|
|
193
|
+
}) {
|
|
194
|
+
return (
|
|
195
|
+
<ContextMenuPrimitive.Label
|
|
196
|
+
data-slot="context-menu-label"
|
|
197
|
+
data-inset={inset}
|
|
198
|
+
className={cn(
|
|
199
|
+
"text-neutral-950 px-2 py-1.5 text-sm font-medium data-[inset]:pl-8 dark:text-neutral-50",
|
|
200
|
+
className
|
|
201
|
+
)}
|
|
202
|
+
{...props}
|
|
203
|
+
/>
|
|
204
|
+
);
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
function ContextMenuSeparator({
|
|
208
|
+
className,
|
|
209
|
+
...props
|
|
210
|
+
}: React.ComponentProps<typeof ContextMenuPrimitive.Separator>) {
|
|
211
|
+
return (
|
|
212
|
+
<ContextMenuPrimitive.Separator
|
|
213
|
+
data-slot="context-menu-separator"
|
|
214
|
+
className={cn(
|
|
215
|
+
"bg-neutral-200 -mx-1 my-1 h-px dark:bg-neutral-800",
|
|
216
|
+
className
|
|
217
|
+
)}
|
|
218
|
+
{...props}
|
|
219
|
+
/>
|
|
220
|
+
);
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
function ContextMenuShortcut({
|
|
224
|
+
className,
|
|
225
|
+
...props
|
|
226
|
+
}: React.ComponentProps<"span">) {
|
|
227
|
+
return (
|
|
228
|
+
<span
|
|
229
|
+
data-slot="context-menu-shortcut"
|
|
230
|
+
className={cn(
|
|
231
|
+
"text-neutral-500 ml-auto text-xs tracking-widest dark:text-neutral-400",
|
|
232
|
+
className
|
|
233
|
+
)}
|
|
234
|
+
{...props}
|
|
235
|
+
/>
|
|
236
|
+
);
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
export {
|
|
240
|
+
ContextMenu,
|
|
241
|
+
ContextMenuTrigger,
|
|
242
|
+
ContextMenuContent,
|
|
243
|
+
ContextMenuItem,
|
|
244
|
+
ContextMenuCheckboxItem,
|
|
245
|
+
ContextMenuRadioItem,
|
|
246
|
+
ContextMenuLabel,
|
|
247
|
+
ContextMenuSeparator,
|
|
248
|
+
ContextMenuShortcut,
|
|
249
|
+
ContextMenuGroup,
|
|
250
|
+
ContextMenuPortal,
|
|
251
|
+
ContextMenuSub,
|
|
252
|
+
ContextMenuSubContent,
|
|
253
|
+
ContextMenuSubTrigger,
|
|
254
|
+
ContextMenuRadioGroup,
|
|
255
|
+
};
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import {
|
|
5
|
+
type SpringOptions,
|
|
6
|
+
type UseInViewOptions,
|
|
7
|
+
useInView,
|
|
8
|
+
useMotionValue,
|
|
9
|
+
useSpring,
|
|
10
|
+
} from "motion/react";
|
|
11
|
+
|
|
12
|
+
interface CountingNumberProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
13
|
+
number: number;
|
|
14
|
+
fromNumber?: number;
|
|
15
|
+
padStart?: boolean;
|
|
16
|
+
inView?: boolean;
|
|
17
|
+
inViewMargin?: UseInViewOptions["margin"];
|
|
18
|
+
inViewOnce?: boolean;
|
|
19
|
+
decimalSeparator?: string;
|
|
20
|
+
transition?: SpringOptions;
|
|
21
|
+
decimalPlaces?: number;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
const CountingNumber = React.forwardRef<HTMLSpanElement, CountingNumberProps>(
|
|
25
|
+
(
|
|
26
|
+
{
|
|
27
|
+
number,
|
|
28
|
+
fromNumber = 0,
|
|
29
|
+
padStart = false,
|
|
30
|
+
inView = false,
|
|
31
|
+
inViewMargin = "0px",
|
|
32
|
+
inViewOnce = true,
|
|
33
|
+
decimalSeparator = ".",
|
|
34
|
+
transition = { stiffness: 90, damping: 50 },
|
|
35
|
+
decimalPlaces = 0,
|
|
36
|
+
className,
|
|
37
|
+
...props
|
|
38
|
+
},
|
|
39
|
+
ref
|
|
40
|
+
) => {
|
|
41
|
+
const localRef = React.useRef<HTMLSpanElement>(null);
|
|
42
|
+
React.useImperativeHandle(ref, () => localRef.current as HTMLSpanElement);
|
|
43
|
+
|
|
44
|
+
const numberStr = number.toString();
|
|
45
|
+
const decimals =
|
|
46
|
+
typeof decimalPlaces === "number"
|
|
47
|
+
? decimalPlaces
|
|
48
|
+
: numberStr.includes(".")
|
|
49
|
+
? numberStr.split(".")[1].length
|
|
50
|
+
: 0;
|
|
51
|
+
|
|
52
|
+
const motionVal = useMotionValue(fromNumber);
|
|
53
|
+
const springVal = useSpring(motionVal, transition);
|
|
54
|
+
const inViewResult = useInView(localRef, {
|
|
55
|
+
once: inViewOnce,
|
|
56
|
+
margin: inViewMargin,
|
|
57
|
+
});
|
|
58
|
+
const isInView = !inView || inViewResult;
|
|
59
|
+
|
|
60
|
+
React.useEffect(() => {
|
|
61
|
+
if (isInView) motionVal.set(number);
|
|
62
|
+
}, [isInView, number, motionVal]);
|
|
63
|
+
|
|
64
|
+
React.useEffect(() => {
|
|
65
|
+
const unsubscribe = springVal.on("change", (latest) => {
|
|
66
|
+
if (localRef.current) {
|
|
67
|
+
let formatted =
|
|
68
|
+
decimals > 0
|
|
69
|
+
? latest.toFixed(decimals)
|
|
70
|
+
: Math.round(latest).toString();
|
|
71
|
+
|
|
72
|
+
if (decimals > 0) {
|
|
73
|
+
formatted = formatted.replace(".", decimalSeparator);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
if (padStart) {
|
|
77
|
+
const finalIntLength = Math.floor(Math.abs(number)).toString()
|
|
78
|
+
.length;
|
|
79
|
+
const [intPart, fracPart] = formatted.split(decimalSeparator);
|
|
80
|
+
const paddedInt = intPart.padStart(finalIntLength, "0");
|
|
81
|
+
formatted = fracPart
|
|
82
|
+
? `${paddedInt}${decimalSeparator}${fracPart}`
|
|
83
|
+
: paddedInt;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
localRef.current.textContent = formatted;
|
|
87
|
+
}
|
|
88
|
+
});
|
|
89
|
+
return () => unsubscribe();
|
|
90
|
+
}, [springVal, decimals, padStart, number, decimalSeparator]);
|
|
91
|
+
|
|
92
|
+
const finalIntLength = Math.floor(Math.abs(number)).toString().length;
|
|
93
|
+
const initialText = padStart
|
|
94
|
+
? "0".padStart(finalIntLength, "0") +
|
|
95
|
+
(decimals > 0 ? decimalSeparator + "0".repeat(decimals) : "")
|
|
96
|
+
: "0" + (decimals > 0 ? decimalSeparator + "0".repeat(decimals) : "");
|
|
97
|
+
|
|
98
|
+
return (
|
|
99
|
+
<span ref={localRef} className={className} {...props}>
|
|
100
|
+
{initialText}
|
|
101
|
+
</span>
|
|
102
|
+
);
|
|
103
|
+
}
|
|
104
|
+
);
|
|
105
|
+
|
|
106
|
+
CountingNumber.displayName = "CountingNumber";
|
|
107
|
+
|
|
108
|
+
export { CountingNumber, type CountingNumberProps };
|
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
|
5
5
|
import { XIcon } from "lucide-react";
|
|
6
|
-
|
|
6
|
+
|
|
7
|
+
import { cn } from "@/lib/utils";
|
|
7
8
|
|
|
8
9
|
function Dialog({
|
|
9
10
|
...props
|
|
@@ -37,7 +38,7 @@ function DialogOverlay({
|
|
|
37
38
|
<DialogPrimitive.Overlay
|
|
38
39
|
data-slot="dialog-overlay"
|
|
39
40
|
className={cn(
|
|
40
|
-
"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/
|
|
41
|
+
"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",
|
|
41
42
|
className
|
|
42
43
|
)}
|
|
43
44
|
{...props}
|