@tioelvis/next-template 2.0.7 → 2.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tioelvis/next-template",
3
- "version": "2.0.7",
3
+ "version": "2.1.1",
4
4
  "description": "CLI to scaffold a Next.js + Tailwind project using shadcn/ui components",
5
5
  "type": "module",
6
6
  "bin": {
@@ -34,6 +34,7 @@
34
34
  "@radix-ui/react-alert-dialog": "^1.1.14",
35
35
  "@radix-ui/react-aspect-ratio": "^1.1.7",
36
36
  "@radix-ui/react-avatar": "^1.1.10",
37
+ "@radix-ui/react-checkbox": "^1.3.2",
37
38
  "@radix-ui/react-dropdown-menu": "^2.1.15",
38
39
  "@tailwindcss/postcss": "^4.1.11",
39
40
  "@tanstack/react-query": "^5.83.0",
@@ -45,6 +46,7 @@
45
46
  "clsx": "^2.1.1",
46
47
  "cookies-next": "^6.1.0",
47
48
  "date-fns": "^4.1.0",
49
+ "embla-carousel-react": "^8.6.0",
48
50
  "eslint": "^9.32.0",
49
51
  "eslint-config-next": "^15.4.4",
50
52
  "lucide-react": "^0.532.0",
@@ -54,6 +56,7 @@
54
56
  "react": "^19.1.0",
55
57
  "react-day-picker": "^9.8.1",
56
58
  "react-dom": "^19.1.0",
59
+ "recharts": "^2.15.4",
57
60
  "tailwind-merge": "^3.3.1",
58
61
  "tailwindcss": "^4.1.11",
59
62
  "tw-animate-css": "^1.3.6",
@@ -0,0 +1,6 @@
1
+ {
2
+ "dependencies": [],
3
+ "dev_dependence": [],
4
+ "hooks": [],
5
+ "supports": []
6
+ }
@@ -0,0 +1,92 @@
1
+ import * as React from "react";
2
+
3
+ import { cn } from "@/lib/utils";
4
+
5
+ function Card({ className, ...props }: React.ComponentProps<"div">) {
6
+ return (
7
+ <div
8
+ data-slot="card"
9
+ className={cn(
10
+ "bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm",
11
+ className
12
+ )}
13
+ {...props}
14
+ />
15
+ );
16
+ }
17
+
18
+ function CardHeader({ className, ...props }: React.ComponentProps<"div">) {
19
+ return (
20
+ <div
21
+ data-slot="card-header"
22
+ className={cn(
23
+ "@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",
24
+ className
25
+ )}
26
+ {...props}
27
+ />
28
+ );
29
+ }
30
+
31
+ function CardTitle({ className, ...props }: React.ComponentProps<"div">) {
32
+ return (
33
+ <div
34
+ data-slot="card-title"
35
+ className={cn("leading-none font-semibold", className)}
36
+ {...props}
37
+ />
38
+ );
39
+ }
40
+
41
+ function CardDescription({ className, ...props }: React.ComponentProps<"div">) {
42
+ return (
43
+ <div
44
+ data-slot="card-description"
45
+ className={cn("text-muted-foreground text-sm", className)}
46
+ {...props}
47
+ />
48
+ );
49
+ }
50
+
51
+ function CardAction({ className, ...props }: React.ComponentProps<"div">) {
52
+ return (
53
+ <div
54
+ data-slot="card-action"
55
+ className={cn(
56
+ "col-start-2 row-span-2 row-start-1 self-start justify-self-end",
57
+ className
58
+ )}
59
+ {...props}
60
+ />
61
+ );
62
+ }
63
+
64
+ function CardContent({ className, ...props }: React.ComponentProps<"div">) {
65
+ return (
66
+ <div
67
+ data-slot="card-content"
68
+ className={cn("px-6", className)}
69
+ {...props}
70
+ />
71
+ );
72
+ }
73
+
74
+ function CardFooter({ className, ...props }: React.ComponentProps<"div">) {
75
+ return (
76
+ <div
77
+ data-slot="card-footer"
78
+ className={cn("flex items-center px-6 [.border-t]:pt-6", className)}
79
+ {...props}
80
+ />
81
+ );
82
+ }
83
+
84
+ export {
85
+ Card,
86
+ CardHeader,
87
+ CardFooter,
88
+ CardTitle,
89
+ CardAction,
90
+ CardDescription,
91
+ CardContent,
92
+ };
@@ -0,0 +1,6 @@
1
+ {
2
+ "dependencies": ["embla-carousel-react"],
3
+ "dev_dependence": [],
4
+ "hooks": [],
5
+ "supports": []
6
+ }
@@ -0,0 +1,236 @@
1
+ "use client";
2
+
3
+ import * as React from "react";
4
+ import useEmblaCarousel, {
5
+ type UseEmblaCarouselType,
6
+ } from "embla-carousel-react";
7
+ import { ArrowLeft, ArrowRight } from "lucide-react";
8
+
9
+ import { cn } from "@/lib/utils";
10
+ import { Button } from "@/components/ui/button";
11
+
12
+ type CarouselApi = UseEmblaCarouselType[1];
13
+ type UseCarouselParameters = Parameters<typeof useEmblaCarousel>;
14
+ type CarouselOptions = UseCarouselParameters[0];
15
+ type CarouselPlugin = UseCarouselParameters[1];
16
+
17
+ type CarouselProps = {
18
+ opts?: CarouselOptions;
19
+ plugins?: CarouselPlugin;
20
+ orientation?: "horizontal" | "vertical";
21
+ setApi?: (api: CarouselApi) => void;
22
+ };
23
+
24
+ type CarouselContextProps = {
25
+ carouselRef: ReturnType<typeof useEmblaCarousel>[0];
26
+ api: ReturnType<typeof useEmblaCarousel>[1];
27
+ scrollPrev: () => void;
28
+ scrollNext: () => void;
29
+ canScrollPrev: boolean;
30
+ canScrollNext: boolean;
31
+ } & CarouselProps;
32
+
33
+ const CarouselContext = React.createContext<CarouselContextProps | null>(null);
34
+
35
+ function useCarousel() {
36
+ const context = React.useContext(CarouselContext);
37
+
38
+ if (!context) {
39
+ throw new Error("useCarousel must be used within a <Carousel />");
40
+ }
41
+
42
+ return context;
43
+ }
44
+
45
+ function Carousel({
46
+ orientation = "horizontal",
47
+ opts,
48
+ setApi,
49
+ plugins,
50
+ className,
51
+ children,
52
+ ...props
53
+ }: React.ComponentProps<"div"> & CarouselProps) {
54
+ const [carouselRef, api] = useEmblaCarousel(
55
+ {
56
+ ...opts,
57
+ axis: orientation === "horizontal" ? "x" : "y",
58
+ },
59
+ plugins
60
+ );
61
+ const [canScrollPrev, setCanScrollPrev] = React.useState(false);
62
+ const [canScrollNext, setCanScrollNext] = React.useState(false);
63
+
64
+ const onSelect = React.useCallback((api: CarouselApi) => {
65
+ if (!api) return;
66
+ setCanScrollPrev(api.canScrollPrev());
67
+ setCanScrollNext(api.canScrollNext());
68
+ }, []);
69
+
70
+ const scrollPrev = React.useCallback(() => {
71
+ api?.scrollPrev();
72
+ }, [api]);
73
+
74
+ const scrollNext = React.useCallback(() => {
75
+ api?.scrollNext();
76
+ }, [api]);
77
+
78
+ const handleKeyDown = React.useCallback(
79
+ (event: React.KeyboardEvent<HTMLDivElement>) => {
80
+ if (event.key === "ArrowLeft") {
81
+ event.preventDefault();
82
+ scrollPrev();
83
+ } else if (event.key === "ArrowRight") {
84
+ event.preventDefault();
85
+ scrollNext();
86
+ }
87
+ },
88
+ [scrollPrev, scrollNext]
89
+ );
90
+
91
+ React.useEffect(() => {
92
+ if (!api || !setApi) return;
93
+ setApi(api);
94
+ }, [api, setApi]);
95
+
96
+ React.useEffect(() => {
97
+ if (!api) return;
98
+ onSelect(api);
99
+ api.on("reInit", onSelect);
100
+ api.on("select", onSelect);
101
+
102
+ return () => {
103
+ api?.off("select", onSelect);
104
+ };
105
+ }, [api, onSelect]);
106
+
107
+ return (
108
+ <CarouselContext.Provider
109
+ value={{
110
+ carouselRef,
111
+ api: api,
112
+ opts,
113
+ orientation:
114
+ orientation || (opts?.axis === "y" ? "vertical" : "horizontal"),
115
+ scrollPrev,
116
+ scrollNext,
117
+ canScrollPrev,
118
+ canScrollNext,
119
+ }}>
120
+ <div
121
+ onKeyDownCapture={handleKeyDown}
122
+ className={cn("relative", className)}
123
+ role="region"
124
+ aria-roledescription="carousel"
125
+ data-slot="carousel"
126
+ {...props}>
127
+ {children}
128
+ </div>
129
+ </CarouselContext.Provider>
130
+ );
131
+ }
132
+
133
+ function CarouselContent({ className, ...props }: React.ComponentProps<"div">) {
134
+ const { carouselRef, orientation } = useCarousel();
135
+
136
+ return (
137
+ <div
138
+ ref={carouselRef}
139
+ className="overflow-hidden"
140
+ data-slot="carousel-content">
141
+ <div
142
+ className={cn(
143
+ "flex",
144
+ orientation === "horizontal" ? "-ml-4" : "-mt-4 flex-col",
145
+ className
146
+ )}
147
+ {...props}
148
+ />
149
+ </div>
150
+ );
151
+ }
152
+
153
+ function CarouselItem({ className, ...props }: React.ComponentProps<"div">) {
154
+ const { orientation } = useCarousel();
155
+
156
+ return (
157
+ <div
158
+ role="group"
159
+ aria-roledescription="slide"
160
+ data-slot="carousel-item"
161
+ className={cn(
162
+ "min-w-0 shrink-0 grow-0 basis-full",
163
+ orientation === "horizontal" ? "pl-4" : "pt-4",
164
+ className
165
+ )}
166
+ {...props}
167
+ />
168
+ );
169
+ }
170
+
171
+ function CarouselPrevious({
172
+ className,
173
+ variant = "outline",
174
+ size = "icon",
175
+ ...props
176
+ }: React.ComponentProps<typeof Button>) {
177
+ const { orientation, scrollPrev, canScrollPrev } = useCarousel();
178
+
179
+ return (
180
+ <Button
181
+ data-slot="carousel-previous"
182
+ variant={variant}
183
+ size={size}
184
+ className={cn(
185
+ "absolute size-8 rounded-full",
186
+ orientation === "horizontal"
187
+ ? "top-1/2 -left-12 -translate-y-1/2"
188
+ : "-top-12 left-1/2 -translate-x-1/2 rotate-90",
189
+ className
190
+ )}
191
+ disabled={!canScrollPrev}
192
+ onClick={scrollPrev}
193
+ {...props}>
194
+ <ArrowLeft />
195
+ <span className="sr-only">Previous slide</span>
196
+ </Button>
197
+ );
198
+ }
199
+
200
+ function CarouselNext({
201
+ className,
202
+ variant = "outline",
203
+ size = "icon",
204
+ ...props
205
+ }: React.ComponentProps<typeof Button>) {
206
+ const { orientation, scrollNext, canScrollNext } = useCarousel();
207
+
208
+ return (
209
+ <Button
210
+ data-slot="carousel-next"
211
+ variant={variant}
212
+ size={size}
213
+ className={cn(
214
+ "absolute size-8 rounded-full",
215
+ orientation === "horizontal"
216
+ ? "top-1/2 -right-12 -translate-y-1/2"
217
+ : "-bottom-12 left-1/2 -translate-x-1/2 rotate-90",
218
+ className
219
+ )}
220
+ disabled={!canScrollNext}
221
+ onClick={scrollNext}
222
+ {...props}>
223
+ <ArrowRight />
224
+ <span className="sr-only">Next slide</span>
225
+ </Button>
226
+ );
227
+ }
228
+
229
+ export {
230
+ type CarouselApi,
231
+ Carousel,
232
+ CarouselContent,
233
+ CarouselItem,
234
+ CarouselPrevious,
235
+ CarouselNext,
236
+ };
@@ -0,0 +1,6 @@
1
+ {
2
+ "dependencies": ["recharts@2.15.4"],
3
+ "dev_dependence": [],
4
+ "hooks": [],
5
+ "supports": []
6
+ }
@@ -0,0 +1,347 @@
1
+ "use client";
2
+
3
+ import * as React from "react";
4
+ import * as RechartsPrimitive from "recharts";
5
+
6
+ import { cn } from "@/lib/utils";
7
+
8
+ // Format: { THEME_NAME: CSS_SELECTOR }
9
+ const THEMES = { light: "", dark: ".dark" } as const;
10
+
11
+ export type ChartConfig = {
12
+ [k in string]: {
13
+ label?: React.ReactNode;
14
+ icon?: React.ComponentType;
15
+ } & (
16
+ | { color?: string; theme?: never }
17
+ | { color?: never; theme: Record<keyof typeof THEMES, string> }
18
+ );
19
+ };
20
+
21
+ type ChartContextProps = {
22
+ config: ChartConfig;
23
+ };
24
+
25
+ const ChartContext = React.createContext<ChartContextProps | null>(null);
26
+
27
+ function useChart() {
28
+ const context = React.useContext(ChartContext);
29
+
30
+ if (!context) {
31
+ throw new Error("useChart must be used within a <ChartContainer />");
32
+ }
33
+
34
+ return context;
35
+ }
36
+
37
+ function ChartContainer({
38
+ id,
39
+ className,
40
+ children,
41
+ config,
42
+ ...props
43
+ }: React.ComponentProps<"div"> & {
44
+ config: ChartConfig;
45
+ children: React.ComponentProps<
46
+ typeof RechartsPrimitive.ResponsiveContainer
47
+ >["children"];
48
+ }) {
49
+ const uniqueId = React.useId();
50
+ const chartId = `chart-${id || uniqueId.replace(/:/g, "")}`;
51
+
52
+ return (
53
+ <ChartContext.Provider value={{ config }}>
54
+ <div
55
+ data-slot="chart"
56
+ data-chart={chartId}
57
+ className={cn(
58
+ "[&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border flex aspect-video justify-center text-xs [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-hidden [&_.recharts-sector]:outline-hidden [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-surface]:outline-hidden",
59
+ className
60
+ )}
61
+ {...props}>
62
+ <ChartStyle id={chartId} config={config} />
63
+ <RechartsPrimitive.ResponsiveContainer>
64
+ {children}
65
+ </RechartsPrimitive.ResponsiveContainer>
66
+ </div>
67
+ </ChartContext.Provider>
68
+ );
69
+ }
70
+
71
+ const ChartStyle = ({ id, config }: { id: string; config: ChartConfig }) => {
72
+ const colorConfig = Object.entries(config).filter(
73
+ ([, config]) => config.theme || config.color
74
+ );
75
+
76
+ if (!colorConfig.length) {
77
+ return null;
78
+ }
79
+
80
+ return (
81
+ <style
82
+ dangerouslySetInnerHTML={{
83
+ __html: Object.entries(THEMES)
84
+ .map(
85
+ ([theme, prefix]) => `
86
+ ${prefix} [data-chart=${id}] {
87
+ ${colorConfig
88
+ .map(([key, itemConfig]) => {
89
+ const color =
90
+ itemConfig.theme?.[theme as keyof typeof itemConfig.theme] ||
91
+ itemConfig.color;
92
+ return color ? ` --color-${key}: ${color};` : null;
93
+ })
94
+ .join("\n")}
95
+ }
96
+ `
97
+ )
98
+ .join("\n"),
99
+ }}
100
+ />
101
+ );
102
+ };
103
+
104
+ const ChartTooltip = RechartsPrimitive.Tooltip;
105
+
106
+ function ChartTooltipContent({
107
+ active,
108
+ payload,
109
+ className,
110
+ indicator = "dot",
111
+ hideLabel = false,
112
+ hideIndicator = false,
113
+ label,
114
+ labelFormatter,
115
+ labelClassName,
116
+ formatter,
117
+ color,
118
+ nameKey,
119
+ labelKey,
120
+ }: React.ComponentProps<typeof RechartsPrimitive.Tooltip> &
121
+ React.ComponentProps<"div"> & {
122
+ hideLabel?: boolean;
123
+ hideIndicator?: boolean;
124
+ indicator?: "line" | "dot" | "dashed";
125
+ nameKey?: string;
126
+ labelKey?: string;
127
+ }) {
128
+ const { config } = useChart();
129
+
130
+ const tooltipLabel = React.useMemo(() => {
131
+ if (hideLabel || !payload?.length) {
132
+ return null;
133
+ }
134
+
135
+ const [item] = payload;
136
+ const key = `${labelKey || item?.dataKey || item?.name || "value"}`;
137
+ const itemConfig = getPayloadConfigFromPayload(config, item, key);
138
+ const value =
139
+ !labelKey && typeof label === "string"
140
+ ? config[label as keyof typeof config]?.label || label
141
+ : itemConfig?.label;
142
+
143
+ if (labelFormatter) {
144
+ return (
145
+ <div className={cn("font-medium", labelClassName)}>
146
+ {labelFormatter(value, payload)}
147
+ </div>
148
+ );
149
+ }
150
+
151
+ if (!value) {
152
+ return null;
153
+ }
154
+
155
+ return <div className={cn("font-medium", labelClassName)}>{value}</div>;
156
+ }, [
157
+ label,
158
+ labelFormatter,
159
+ payload,
160
+ hideLabel,
161
+ labelClassName,
162
+ config,
163
+ labelKey,
164
+ ]);
165
+
166
+ if (!active || !payload?.length) {
167
+ return null;
168
+ }
169
+
170
+ const nestLabel = payload.length === 1 && indicator !== "dot";
171
+
172
+ return (
173
+ <div
174
+ className={cn(
175
+ "border-border/50 bg-background grid min-w-[8rem] items-start gap-1.5 rounded-lg border px-2.5 py-1.5 text-xs shadow-xl",
176
+ className
177
+ )}>
178
+ {!nestLabel ? tooltipLabel : null}
179
+ <div className="grid gap-1.5">
180
+ {payload.map((item, index) => {
181
+ const key = `${nameKey || item.name || item.dataKey || "value"}`;
182
+ const itemConfig = getPayloadConfigFromPayload(config, item, key);
183
+ const indicatorColor = color || item.payload.fill || item.color;
184
+
185
+ return (
186
+ <div
187
+ key={item.dataKey}
188
+ className={cn(
189
+ "[&>svg]:text-muted-foreground flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5",
190
+ indicator === "dot" && "items-center"
191
+ )}>
192
+ {formatter && item?.value !== undefined && item.name ? (
193
+ formatter(item.value, item.name, item, index, item.payload)
194
+ ) : (
195
+ <>
196
+ {itemConfig?.icon ? (
197
+ <itemConfig.icon />
198
+ ) : (
199
+ !hideIndicator && (
200
+ <div
201
+ className={cn(
202
+ "shrink-0 rounded-[2px] border-(--color-border) bg-(--color-bg)",
203
+ {
204
+ "h-2.5 w-2.5": indicator === "dot",
205
+ "w-1": indicator === "line",
206
+ "w-0 border-[1.5px] border-dashed bg-transparent":
207
+ indicator === "dashed",
208
+ "my-0.5": nestLabel && indicator === "dashed",
209
+ }
210
+ )}
211
+ style={
212
+ {
213
+ "--color-bg": indicatorColor,
214
+ "--color-border": indicatorColor,
215
+ } as React.CSSProperties
216
+ }
217
+ />
218
+ )
219
+ )}
220
+ <div
221
+ className={cn(
222
+ "flex flex-1 justify-between leading-none",
223
+ nestLabel ? "items-end" : "items-center"
224
+ )}>
225
+ <div className="grid gap-1.5">
226
+ {nestLabel ? tooltipLabel : null}
227
+ <span className="text-muted-foreground">
228
+ {itemConfig?.label || item.name}
229
+ </span>
230
+ </div>
231
+ {item.value && (
232
+ <span className="text-foreground font-mono font-medium tabular-nums">
233
+ {item.value.toLocaleString()}
234
+ </span>
235
+ )}
236
+ </div>
237
+ </>
238
+ )}
239
+ </div>
240
+ );
241
+ })}
242
+ </div>
243
+ </div>
244
+ );
245
+ }
246
+
247
+ const ChartLegend = RechartsPrimitive.Legend;
248
+
249
+ function ChartLegendContent({
250
+ className,
251
+ hideIcon = false,
252
+ payload,
253
+ verticalAlign = "bottom",
254
+ nameKey,
255
+ }: React.ComponentProps<"div"> &
256
+ Pick<RechartsPrimitive.LegendProps, "payload" | "verticalAlign"> & {
257
+ hideIcon?: boolean;
258
+ nameKey?: string;
259
+ }) {
260
+ const { config } = useChart();
261
+
262
+ if (!payload?.length) {
263
+ return null;
264
+ }
265
+
266
+ return (
267
+ <div
268
+ className={cn(
269
+ "flex items-center justify-center gap-4",
270
+ verticalAlign === "top" ? "pb-3" : "pt-3",
271
+ className
272
+ )}>
273
+ {payload.map((item) => {
274
+ const key = `${nameKey || item.dataKey || "value"}`;
275
+ const itemConfig = getPayloadConfigFromPayload(config, item, key);
276
+
277
+ return (
278
+ <div
279
+ key={item.value}
280
+ className={cn(
281
+ "[&>svg]:text-muted-foreground flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3"
282
+ )}>
283
+ {itemConfig?.icon && !hideIcon ? (
284
+ <itemConfig.icon />
285
+ ) : (
286
+ <div
287
+ className="h-2 w-2 shrink-0 rounded-[2px]"
288
+ style={{
289
+ backgroundColor: item.color,
290
+ }}
291
+ />
292
+ )}
293
+ {itemConfig?.label}
294
+ </div>
295
+ );
296
+ })}
297
+ </div>
298
+ );
299
+ }
300
+
301
+ // Helper to extract item config from a payload.
302
+ function getPayloadConfigFromPayload(
303
+ config: ChartConfig,
304
+ payload: unknown,
305
+ key: string
306
+ ) {
307
+ if (typeof payload !== "object" || payload === null) {
308
+ return undefined;
309
+ }
310
+
311
+ const payloadPayload =
312
+ "payload" in payload &&
313
+ typeof payload.payload === "object" &&
314
+ payload.payload !== null
315
+ ? payload.payload
316
+ : undefined;
317
+
318
+ let configLabelKey: string = key;
319
+
320
+ if (
321
+ key in payload &&
322
+ typeof payload[key as keyof typeof payload] === "string"
323
+ ) {
324
+ configLabelKey = payload[key as keyof typeof payload] as string;
325
+ } else if (
326
+ payloadPayload &&
327
+ key in payloadPayload &&
328
+ typeof payloadPayload[key as keyof typeof payloadPayload] === "string"
329
+ ) {
330
+ configLabelKey = payloadPayload[
331
+ key as keyof typeof payloadPayload
332
+ ] as string;
333
+ }
334
+
335
+ return configLabelKey in config
336
+ ? config[configLabelKey]
337
+ : config[key as keyof typeof config];
338
+ }
339
+
340
+ export {
341
+ ChartContainer,
342
+ ChartTooltip,
343
+ ChartTooltipContent,
344
+ ChartLegend,
345
+ ChartLegendContent,
346
+ ChartStyle,
347
+ };
@@ -0,0 +1,6 @@
1
+ {
2
+ "dependencies": ["@radix-ui/react-checkbox"],
3
+ "dev_dependence": [],
4
+ "hooks": [],
5
+ "supports": []
6
+ }
@@ -0,0 +1,30 @@
1
+ "use client";
2
+
3
+ import * as React from "react";
4
+ import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
5
+ import { CheckIcon } from "lucide-react";
6
+
7
+ import { cn } from "@/lib/utils";
8
+
9
+ function Checkbox({
10
+ className,
11
+ ...props
12
+ }: React.ComponentProps<typeof CheckboxPrimitive.Root>) {
13
+ return (
14
+ <CheckboxPrimitive.Root
15
+ data-slot="checkbox"
16
+ className={cn(
17
+ "peer border-input cursor-pointer dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",
18
+ className
19
+ )}
20
+ {...props}>
21
+ <CheckboxPrimitive.Indicator
22
+ data-slot="checkbox-indicator"
23
+ className="flex items-center justify-center text-current transition-none ">
24
+ <CheckIcon className="size-3.5" />
25
+ </CheckboxPrimitive.Indicator>
26
+ </CheckboxPrimitive.Root>
27
+ );
28
+ }
29
+
30
+ export { Checkbox };
package/src/constants.js CHANGED
@@ -47,6 +47,10 @@ const COMPONENTS = [
47
47
  "breadcrumb",
48
48
  "button",
49
49
  "calendar",
50
+ "card",
51
+ "carousel",
52
+ "chart",
53
+ "checkbox",
50
54
  ];
51
55
 
52
56
  export {