@tioelvis/next-template 2.4.8 → 3.0.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.
Files changed (132) hide show
  1. package/README.md +42 -42
  2. package/package.json +44 -92
  3. package/src/actions/configure-package-json.js +32 -0
  4. package/src/actions/init-project.js +40 -0
  5. package/src/actions/init-shadcn-ui.js +48 -0
  6. package/src/actions/init-theme.js +28 -0
  7. package/src/actions/init-tioelvis-components.js +42 -0
  8. package/src/actions/install-main-packages.js +51 -0
  9. package/src/constants.js +234 -97
  10. package/src/lib/exception.js +9 -0
  11. package/src/lib/utils.js +55 -0
  12. package/src/main.js +158 -229
  13. package/src/template/eslint.config.mjs +15 -13
  14. package/src/template/postcss.config.mjs +3 -1
  15. package/src/template/src/app/globals.css +0 -122
  16. package/src/template/src/app/layout.tsx +7 -15
  17. package/src/template/src/app/page.tsx +6 -2
  18. package/src/template/tsconfig.json +9 -2
  19. package/src/themes/blue.css +141 -0
  20. package/src/themes/default.css +141 -0
  21. package/src/themes/green.css +141 -0
  22. package/src/themes/orange.css +141 -0
  23. package/src/themes/red.css +141 -0
  24. package/src/themes/rose.css +141 -0
  25. package/src/themes/violet.css +141 -0
  26. package/src/themes/yellow.css +141 -0
  27. package/src/tioelvis-components/max-width-wrapper.tsx +21 -0
  28. package/src/app/components/ui/accordion.json +0 -6
  29. package/src/app/components/ui/accordion.tsx +0 -64
  30. package/src/app/components/ui/alert-dialog.json +0 -6
  31. package/src/app/components/ui/alert-dialog.tsx +0 -157
  32. package/src/app/components/ui/alert.json +0 -6
  33. package/src/app/components/ui/alert.tsx +0 -66
  34. package/src/app/components/ui/aspect-ratio.json +0 -6
  35. package/src/app/components/ui/aspect-ratio.tsx +0 -11
  36. package/src/app/components/ui/avatar.json +0 -6
  37. package/src/app/components/ui/avatar.tsx +0 -53
  38. package/src/app/components/ui/badge.json +0 -6
  39. package/src/app/components/ui/badge.tsx +0 -46
  40. package/src/app/components/ui/breadcrumb.json +0 -6
  41. package/src/app/components/ui/breadcrumb.tsx +0 -107
  42. package/src/app/components/ui/button.json +0 -6
  43. package/src/app/components/ui/button.tsx +0 -58
  44. package/src/app/components/ui/calendar.json +0 -6
  45. package/src/app/components/ui/calendar.tsx +0 -213
  46. package/src/app/components/ui/card.json +0 -6
  47. package/src/app/components/ui/card.tsx +0 -92
  48. package/src/app/components/ui/carousel.json +0 -6
  49. package/src/app/components/ui/carousel.tsx +0 -236
  50. package/src/app/components/ui/chart.json +0 -6
  51. package/src/app/components/ui/chart.tsx +0 -347
  52. package/src/app/components/ui/checkbox.json +0 -6
  53. package/src/app/components/ui/checkbox.tsx +0 -30
  54. package/src/app/components/ui/collapsible.json +0 -6
  55. package/src/app/components/ui/collapsible.tsx +0 -33
  56. package/src/app/components/ui/command.json +0 -6
  57. package/src/app/components/ui/command.tsx +0 -182
  58. package/src/app/components/ui/context-menu.json +0 -6
  59. package/src/app/components/ui/context-menu.tsx +0 -249
  60. package/src/app/components/ui/dialog.json +0 -6
  61. package/src/app/components/ui/dialog.tsx +0 -141
  62. package/src/app/components/ui/drawer.json +0 -6
  63. package/src/app/components/ui/drawer.tsx +0 -134
  64. package/src/app/components/ui/dropdown-menu.json +0 -6
  65. package/src/app/components/ui/dropdown-menu.tsx +0 -256
  66. package/src/app/components/ui/form.json +0 -12
  67. package/src/app/components/ui/form.tsx +0 -167
  68. package/src/app/components/ui/hover-card.json +0 -6
  69. package/src/app/components/ui/hover-card.tsx +0 -49
  70. package/src/app/components/ui/input-otp.json +0 -6
  71. package/src/app/components/ui/input-otp.tsx +0 -76
  72. package/src/app/components/ui/input.json +0 -6
  73. package/src/app/components/ui/input.tsx +0 -21
  74. package/src/app/components/ui/label.json +0 -6
  75. package/src/app/components/ui/label.tsx +0 -24
  76. package/src/app/components/ui/menubar.json +0 -6
  77. package/src/app/components/ui/menubar.tsx +0 -273
  78. package/src/app/components/ui/navigation-menu.json +0 -6
  79. package/src/app/components/ui/navigation-menu.tsx +0 -164
  80. package/src/app/components/ui/pagination.json +0 -6
  81. package/src/app/components/ui/pagination.tsx +0 -124
  82. package/src/app/components/ui/popover.json +0 -6
  83. package/src/app/components/ui/popover.tsx +0 -55
  84. package/src/app/components/ui/progress.json +0 -6
  85. package/src/app/components/ui/progress.tsx +0 -30
  86. package/src/app/components/ui/radio-group.json +0 -6
  87. package/src/app/components/ui/radio-group.tsx +0 -43
  88. package/src/app/components/ui/resizable.json +0 -6
  89. package/src/app/components/ui/resizable.tsx +0 -55
  90. package/src/app/components/ui/scroll-area.json +0 -6
  91. package/src/app/components/ui/scroll-area.tsx +0 -55
  92. package/src/app/components/ui/select.json +0 -6
  93. package/src/app/components/ui/select.tsx +0 -179
  94. package/src/app/components/ui/separator.json +0 -6
  95. package/src/app/components/ui/separator.tsx +0 -28
  96. package/src/app/components/ui/sheet.json +0 -6
  97. package/src/app/components/ui/sheet.tsx +0 -145
  98. package/src/app/components/ui/sidebar.json +0 -6
  99. package/src/app/components/ui/sidebar.tsx +0 -718
  100. package/src/app/components/ui/skeleton.json +0 -6
  101. package/src/app/components/ui/skeleton.tsx +0 -13
  102. package/src/app/components/ui/slider.json +0 -6
  103. package/src/app/components/ui/slider.tsx +0 -61
  104. package/src/app/components/ui/sonner.json +0 -6
  105. package/src/app/components/ui/sonner.tsx +0 -25
  106. package/src/app/components/ui/switch.json +0 -6
  107. package/src/app/components/ui/switch.tsx +0 -30
  108. package/src/app/components/ui/table.json +0 -6
  109. package/src/app/components/ui/table.tsx +0 -115
  110. package/src/app/components/ui/tabs.json +0 -6
  111. package/src/app/components/ui/tabs.tsx +0 -66
  112. package/src/app/components/ui/textarea.json +0 -6
  113. package/src/app/components/ui/textarea.tsx +0 -18
  114. package/src/app/components/ui/toggle-group.json +0 -6
  115. package/src/app/components/ui/toggle-group.tsx +0 -71
  116. package/src/app/components/ui/toggle.json +0 -6
  117. package/src/app/components/ui/toggle.tsx +0 -47
  118. package/src/app/components/ui/tooltip.json +0 -6
  119. package/src/app/components/ui/tooltip.tsx +0 -60
  120. package/src/app/hooks/use-mobile.ts +0 -21
  121. package/src/app/lib/utils.ts +0 -6
  122. package/src/app/tsconfig.json +0 -27
  123. package/src/template/components.json +0 -21
  124. package/src/template/next-env.d.ts +0 -5
  125. package/src/template/public/.gitkeep +0 -0
  126. package/src/template/src/lib/axios.ts +0 -39
  127. package/src/template/src/lib/constants.ts +0 -1
  128. package/src/template/src/lib/utils.ts +0 -6
  129. package/src/template/src/providers/query.provider.tsx +0 -12
  130. package/src/template/src/providers/theme.provider.tsx +0 -8
  131. package/src/utils.js +0 -113
  132. /package/src/template/{src/app → public}/favicon.ico +0 -0
@@ -1,6 +0,0 @@
1
- {
2
- "dependencies": [],
3
- "dev_dependence": [],
4
- "hooks": [],
5
- "supports": []
6
- }
@@ -1,13 +0,0 @@
1
- import { cn } from "@/lib/utils";
2
-
3
- function Skeleton({ className, ...props }: React.ComponentProps<"div">) {
4
- return (
5
- <div
6
- data-slot="skeleton"
7
- className={cn("bg-accent animate-pulse rounded-md", className)}
8
- {...props}
9
- />
10
- );
11
- }
12
-
13
- export { Skeleton };
@@ -1,6 +0,0 @@
1
- {
2
- "dependencies": ["@radix-ui/react-slider"],
3
- "dev_dependence": [],
4
- "hooks": [],
5
- "supports": []
6
- }
@@ -1,61 +0,0 @@
1
- "use client";
2
-
3
- import * as React from "react";
4
- import * as SliderPrimitive from "@radix-ui/react-slider";
5
-
6
- import { cn } from "@/lib/utils";
7
-
8
- function Slider({
9
- className,
10
- defaultValue,
11
- value,
12
- min = 0,
13
- max = 100,
14
- ...props
15
- }: React.ComponentProps<typeof SliderPrimitive.Root>) {
16
- const _values = React.useMemo(
17
- () =>
18
- Array.isArray(value)
19
- ? value
20
- : Array.isArray(defaultValue)
21
- ? defaultValue
22
- : [min, max],
23
- [value, defaultValue, min, max]
24
- );
25
-
26
- return (
27
- <SliderPrimitive.Root
28
- data-slot="slider"
29
- defaultValue={defaultValue}
30
- value={value}
31
- min={min}
32
- max={max}
33
- className={cn(
34
- "relative flex w-full touch-none items-center cursor-pointer select-none data-[disabled]:opacity-50 data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col",
35
- className
36
- )}
37
- {...props}>
38
- <SliderPrimitive.Track
39
- data-slot="slider-track"
40
- className={cn(
41
- "bg-muted relative grow overflow-hidden rounded-full data-[orientation=horizontal]:h-1.5 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5"
42
- )}>
43
- <SliderPrimitive.Range
44
- data-slot="slider-range"
45
- className={cn(
46
- "bg-primary cursor-pointer absolute data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full"
47
- )}
48
- />
49
- </SliderPrimitive.Track>
50
- {Array.from({ length: _values.length }, (_, index) => (
51
- <SliderPrimitive.Thumb
52
- data-slot="slider-thumb"
53
- key={index}
54
- className="cursor-pointer border-primary bg-background ring-ring/50 block size-4 shrink-0 rounded-full border shadow-sm transition-[color,box-shadow] hover:ring-4 focus-visible:ring-4 focus-visible:outline-hidden disabled:cursor-not-allowed disabled:opacity-50"
55
- />
56
- ))}
57
- </SliderPrimitive.Root>
58
- );
59
- }
60
-
61
- export { Slider };
@@ -1,6 +0,0 @@
1
- {
2
- "dependencies": ["sonner"],
3
- "dev_dependence": [],
4
- "hooks": [],
5
- "supports": []
6
- }
@@ -1,25 +0,0 @@
1
- "use client";
2
-
3
- import { useTheme } from "next-themes";
4
- import { Toaster as Sonner, ToasterProps } from "sonner";
5
-
6
- const Toaster = ({ ...props }: ToasterProps) => {
7
- const { theme = "system" } = useTheme();
8
-
9
- return (
10
- <Sonner
11
- theme={theme as ToasterProps["theme"]}
12
- className="toaster group"
13
- style={
14
- {
15
- "--normal-bg": "var(--popover)",
16
- "--normal-text": "var(--popover-foreground)",
17
- "--normal-border": "var(--border)",
18
- } as React.CSSProperties
19
- }
20
- {...props}
21
- />
22
- );
23
- };
24
-
25
- export { Toaster };
@@ -1,6 +0,0 @@
1
- {
2
- "dependencies": ["@radix-ui/react-switch"],
3
- "dev_dependence": [],
4
- "hooks": [],
5
- "supports": []
6
- }
@@ -1,30 +0,0 @@
1
- "use client";
2
-
3
- import * as React from "react";
4
- import * as SwitchPrimitive from "@radix-ui/react-switch";
5
-
6
- import { cn } from "@/lib/utils";
7
-
8
- function Switch({
9
- className,
10
- ...props
11
- }: React.ComponentProps<typeof SwitchPrimitive.Root>) {
12
- return (
13
- <SwitchPrimitive.Root
14
- data-slot="switch"
15
- className={cn(
16
- "peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",
17
- className
18
- )}
19
- {...props}>
20
- <SwitchPrimitive.Thumb
21
- data-slot="switch-thumb"
22
- className={cn(
23
- "bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground cursor-pointer block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0"
24
- )}
25
- />
26
- </SwitchPrimitive.Root>
27
- );
28
- }
29
-
30
- export { Switch };
@@ -1,6 +0,0 @@
1
- {
2
- "dependencies": [],
3
- "dev_dependence": [],
4
- "hooks": [],
5
- "supports": []
6
- }
@@ -1,115 +0,0 @@
1
- "use client";
2
-
3
- import * as React from "react";
4
-
5
- import { cn } from "@/lib/utils";
6
-
7
- function Table({ className, ...props }: React.ComponentProps<"table">) {
8
- return (
9
- <div
10
- data-slot="table-container"
11
- className="relative w-full overflow-x-auto">
12
- <table
13
- data-slot="table"
14
- className={cn("w-full caption-bottom text-sm", className)}
15
- {...props}
16
- />
17
- </div>
18
- );
19
- }
20
-
21
- function TableHeader({ className, ...props }: React.ComponentProps<"thead">) {
22
- return (
23
- <thead
24
- data-slot="table-header"
25
- className={cn("[&_tr]:border-b", className)}
26
- {...props}
27
- />
28
- );
29
- }
30
-
31
- function TableBody({ className, ...props }: React.ComponentProps<"tbody">) {
32
- return (
33
- <tbody
34
- data-slot="table-body"
35
- className={cn("[&_tr:last-child]:border-0", className)}
36
- {...props}
37
- />
38
- );
39
- }
40
-
41
- function TableFooter({ className, ...props }: React.ComponentProps<"tfoot">) {
42
- return (
43
- <tfoot
44
- data-slot="table-footer"
45
- className={cn(
46
- "bg-muted/50 border-t font-medium [&>tr]:last:border-b-0",
47
- className
48
- )}
49
- {...props}
50
- />
51
- );
52
- }
53
-
54
- function TableRow({ className, ...props }: React.ComponentProps<"tr">) {
55
- return (
56
- <tr
57
- data-slot="table-row"
58
- className={cn(
59
- "hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors",
60
- className
61
- )}
62
- {...props}
63
- />
64
- );
65
- }
66
-
67
- function TableHead({ className, ...props }: React.ComponentProps<"th">) {
68
- return (
69
- <th
70
- data-slot="table-head"
71
- className={cn(
72
- "text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",
73
- className
74
- )}
75
- {...props}
76
- />
77
- );
78
- }
79
-
80
- function TableCell({ className, ...props }: React.ComponentProps<"td">) {
81
- return (
82
- <td
83
- data-slot="table-cell"
84
- className={cn(
85
- "p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",
86
- className
87
- )}
88
- {...props}
89
- />
90
- );
91
- }
92
-
93
- function TableCaption({
94
- className,
95
- ...props
96
- }: React.ComponentProps<"caption">) {
97
- return (
98
- <caption
99
- data-slot="table-caption"
100
- className={cn("text-muted-foreground mt-4 text-sm", className)}
101
- {...props}
102
- />
103
- );
104
- }
105
-
106
- export {
107
- Table,
108
- TableHeader,
109
- TableBody,
110
- TableFooter,
111
- TableHead,
112
- TableRow,
113
- TableCell,
114
- TableCaption,
115
- };
@@ -1,6 +0,0 @@
1
- {
2
- "dependencies": ["@radix-ui/react-tabs"],
3
- "dev_dependence": [],
4
- "hooks": [],
5
- "supports": []
6
- }
@@ -1,66 +0,0 @@
1
- "use client";
2
-
3
- import * as React from "react";
4
- import * as TabsPrimitive from "@radix-ui/react-tabs";
5
-
6
- import { cn } from "@/lib/utils";
7
-
8
- function Tabs({
9
- className,
10
- ...props
11
- }: React.ComponentProps<typeof TabsPrimitive.Root>) {
12
- return (
13
- <TabsPrimitive.Root
14
- data-slot="tabs"
15
- className={cn("flex flex-col gap-2", className)}
16
- {...props}
17
- />
18
- );
19
- }
20
-
21
- function TabsList({
22
- className,
23
- ...props
24
- }: React.ComponentProps<typeof TabsPrimitive.List>) {
25
- return (
26
- <TabsPrimitive.List
27
- data-slot="tabs-list"
28
- className={cn(
29
- "bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-[3px]",
30
- className
31
- )}
32
- {...props}
33
- />
34
- );
35
- }
36
-
37
- function TabsTrigger({
38
- className,
39
- ...props
40
- }: React.ComponentProps<typeof TabsPrimitive.Trigger>) {
41
- return (
42
- <TabsPrimitive.Trigger
43
- data-slot="tabs-trigger"
44
- className={cn(
45
- "data-[state=active]:bg-background cursor-pointer dark:data-[state=active]:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 text-foreground dark:text-muted-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:cursor-not-allowed disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
46
- className
47
- )}
48
- {...props}
49
- />
50
- );
51
- }
52
-
53
- function TabsContent({
54
- className,
55
- ...props
56
- }: React.ComponentProps<typeof TabsPrimitive.Content>) {
57
- return (
58
- <TabsPrimitive.Content
59
- data-slot="tabs-content"
60
- className={cn("flex-1 outline-none", className)}
61
- {...props}
62
- />
63
- );
64
- }
65
-
66
- export { Tabs, TabsList, TabsTrigger, TabsContent };
@@ -1,6 +0,0 @@
1
- {
2
- "dependencies": [],
3
- "dev_dependence": [],
4
- "hooks": [],
5
- "supports": []
6
- }
@@ -1,18 +0,0 @@
1
- import * as React from "react";
2
-
3
- import { cn } from "@/lib/utils";
4
-
5
- function Textarea({ className, ...props }: React.ComponentProps<"textarea">) {
6
- return (
7
- <textarea
8
- data-slot="textarea"
9
- className={cn(
10
- "border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 text-sm",
11
- className
12
- )}
13
- {...props}
14
- />
15
- );
16
- }
17
-
18
- export { Textarea };
@@ -1,6 +0,0 @@
1
- {
2
- "dependencies": ["@radix-ui/react-toggle-group"],
3
- "dev_dependence": [],
4
- "hooks": [],
5
- "supports": ["toggle"]
6
- }
@@ -1,71 +0,0 @@
1
- "use client";
2
-
3
- import * as React from "react";
4
- import * as ToggleGroupPrimitive from "@radix-ui/react-toggle-group";
5
- import { type VariantProps } from "class-variance-authority";
6
-
7
- import { cn } from "@/lib/utils";
8
- import { toggleVariants } from "@/components/ui/toggle";
9
-
10
- const ToggleGroupContext = React.createContext<
11
- VariantProps<typeof toggleVariants>
12
- >({
13
- size: "default",
14
- variant: "default",
15
- });
16
-
17
- function ToggleGroup({
18
- className,
19
- variant,
20
- size,
21
- children,
22
- ...props
23
- }: React.ComponentProps<typeof ToggleGroupPrimitive.Root> &
24
- VariantProps<typeof toggleVariants>) {
25
- return (
26
- <ToggleGroupPrimitive.Root
27
- data-slot="toggle-group"
28
- data-variant={variant}
29
- data-size={size}
30
- className={cn(
31
- "group/toggle-group flex w-fit items-center rounded-md data-[variant=outline]:shadow-xs",
32
- className
33
- )}
34
- {...props}>
35
- <ToggleGroupContext.Provider value={{ variant, size }}>
36
- {children}
37
- </ToggleGroupContext.Provider>
38
- </ToggleGroupPrimitive.Root>
39
- );
40
- }
41
-
42
- function ToggleGroupItem({
43
- className,
44
- children,
45
- variant,
46
- size,
47
- ...props
48
- }: React.ComponentProps<typeof ToggleGroupPrimitive.Item> &
49
- VariantProps<typeof toggleVariants>) {
50
- const context = React.useContext(ToggleGroupContext);
51
-
52
- return (
53
- <ToggleGroupPrimitive.Item
54
- data-slot="toggle-group-item"
55
- data-variant={context.variant || variant}
56
- data-size={context.size || size}
57
- className={cn(
58
- toggleVariants({
59
- variant: context.variant || variant,
60
- size: context.size || size,
61
- }),
62
- "min-w-0 flex-1 shrink-0 rounded-none shadow-none first:rounded-l-md last:rounded-r-md focus:z-10 focus-visible:z-10 data-[variant=outline]:border-l-0 data-[variant=outline]:first:border-l",
63
- className
64
- )}
65
- {...props}>
66
- {children}
67
- </ToggleGroupPrimitive.Item>
68
- );
69
- }
70
-
71
- export { ToggleGroup, ToggleGroupItem };
@@ -1,6 +0,0 @@
1
- {
2
- "dependencies": ["@radix-ui/react-toggle"],
3
- "dev_dependence": [],
4
- "hooks": [],
5
- "supports": []
6
- }
@@ -1,47 +0,0 @@
1
- "use client";
2
-
3
- import * as React from "react";
4
- import * as TogglePrimitive from "@radix-ui/react-toggle";
5
- import { cva, type VariantProps } from "class-variance-authority";
6
-
7
- import { cn } from "@/lib/utils";
8
-
9
- const toggleVariants = cva(
10
- "inline-flex items-center cursor-pointer justify-center gap-2 rounded-md text-sm font-medium hover:bg-muted hover:text-muted-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] outline-none transition-[color,box-shadow] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive whitespace-nowrap",
11
- {
12
- variants: {
13
- variant: {
14
- default: "bg-transparent",
15
- outline:
16
- "border border-input bg-transparent shadow-xs hover:bg-accent hover:text-accent-foreground",
17
- },
18
- size: {
19
- default: "h-9 px-2 min-w-9",
20
- sm: "h-8 px-1.5 min-w-8",
21
- lg: "h-10 px-2.5 min-w-10",
22
- },
23
- },
24
- defaultVariants: {
25
- variant: "default",
26
- size: "default",
27
- },
28
- }
29
- );
30
-
31
- function Toggle({
32
- className,
33
- variant,
34
- size,
35
- ...props
36
- }: React.ComponentProps<typeof TogglePrimitive.Root> &
37
- VariantProps<typeof toggleVariants>) {
38
- return (
39
- <TogglePrimitive.Root
40
- data-slot="toggle"
41
- className={cn(toggleVariants({ variant, size, className }))}
42
- {...props}
43
- />
44
- );
45
- }
46
-
47
- export { Toggle, toggleVariants };
@@ -1,6 +0,0 @@
1
- {
2
- "dependencies": ["@radix-ui/react-tooltip"],
3
- "dev_dependence": [],
4
- "hooks": [],
5
- "supports": []
6
- }
@@ -1,60 +0,0 @@
1
- "use client";
2
-
3
- import * as React from "react";
4
- import * as TooltipPrimitive from "@radix-ui/react-tooltip";
5
-
6
- import { cn } from "@/lib/utils";
7
-
8
- function TooltipProvider({
9
- delayDuration = 0,
10
- ...props
11
- }: React.ComponentProps<typeof TooltipPrimitive.Provider>) {
12
- return (
13
- <TooltipPrimitive.Provider
14
- data-slot="tooltip-provider"
15
- delayDuration={delayDuration}
16
- {...props}
17
- />
18
- );
19
- }
20
-
21
- function Tooltip({
22
- ...props
23
- }: React.ComponentProps<typeof TooltipPrimitive.Root>) {
24
- return (
25
- <TooltipProvider>
26
- <TooltipPrimitive.Root data-slot="tooltip" {...props} />
27
- </TooltipProvider>
28
- );
29
- }
30
-
31
- function TooltipTrigger({
32
- ...props
33
- }: React.ComponentProps<typeof TooltipPrimitive.Trigger>) {
34
- return <TooltipPrimitive.Trigger data-slot="tooltip-trigger" {...props} />;
35
- }
36
-
37
- function TooltipContent({
38
- className,
39
- sideOffset = 0,
40
- children,
41
- ...props
42
- }: React.ComponentProps<typeof TooltipPrimitive.Content>) {
43
- return (
44
- <TooltipPrimitive.Portal>
45
- <TooltipPrimitive.Content
46
- data-slot="tooltip-content"
47
- sideOffset={sideOffset}
48
- className={cn(
49
- "bg-primary text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-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-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",
50
- className
51
- )}
52
- {...props}>
53
- {children}
54
- <TooltipPrimitive.Arrow className="bg-primary fill-primary z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]" />
55
- </TooltipPrimitive.Content>
56
- </TooltipPrimitive.Portal>
57
- );
58
- }
59
-
60
- export { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider };
@@ -1,21 +0,0 @@
1
- import * as React from "react";
2
-
3
- const MOBILE_BREAKPOINT = 768;
4
-
5
- export function useIsMobile() {
6
- const [isMobile, setIsMobile] = React.useState<boolean | undefined>(
7
- undefined
8
- );
9
-
10
- React.useEffect(() => {
11
- const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`);
12
- const onChange = () => {
13
- setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
14
- };
15
- mql.addEventListener("change", onChange);
16
- setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
17
- return () => mql.removeEventListener("change", onChange);
18
- }, []);
19
-
20
- return !!isMobile;
21
- }
@@ -1,6 +0,0 @@
1
- import { twMerge } from "tailwind-merge";
2
- import { clsx, type ClassValue } from "clsx";
3
-
4
- export function cn(...inputs: ClassValue[]) {
5
- return twMerge(clsx(inputs));
6
- }
@@ -1,27 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "target": "ES2017",
4
- "lib": ["dom", "dom.iterable", "esnext"],
5
- "allowJs": true,
6
- "skipLibCheck": true,
7
- "strict": true,
8
- "noEmit": true,
9
- "esModuleInterop": true,
10
- "module": "esnext",
11
- "moduleResolution": "bundler",
12
- "resolveJsonModule": true,
13
- "isolatedModules": true,
14
- "jsx": "preserve",
15
- "incremental": true,
16
- "plugins": [
17
- {
18
- "name": "next"
19
- }
20
- ],
21
- "paths": {
22
- "@/*": ["./*"]
23
- }
24
- },
25
- "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
26
- "exclude": ["node_modules"]
27
- }
@@ -1,21 +0,0 @@
1
- {
2
- "$schema": "https://ui.shadcn.com/schema.json",
3
- "style": "new-york",
4
- "rsc": true,
5
- "tsx": true,
6
- "tailwind": {
7
- "config": "",
8
- "css": "src/app/globals.css",
9
- "baseColor": "neutral",
10
- "cssVariables": true,
11
- "prefix": ""
12
- },
13
- "aliases": {
14
- "components": "@/components",
15
- "utils": "@/lib/utils",
16
- "ui": "@/components/ui",
17
- "lib": "@/lib",
18
- "hooks": "@/hooks"
19
- },
20
- "iconLibrary": "lucide"
21
- }
@@ -1,5 +0,0 @@
1
- /// <reference types="next" />
2
- /// <reference types="next/image-types/global" />
3
-
4
- // NOTE: This file should not be edited
5
- // see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
File without changes