@tioelvis/next-template 2.4.7 → 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 (133) 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/constants.ts +0 -1
  127. package/src/template/src/lib/custom-axios-error.ts +0 -29
  128. package/src/template/src/lib/request.ts +0 -10
  129. package/src/template/src/lib/utils.ts +0 -6
  130. package/src/template/src/providers/query.provider.tsx +0 -12
  131. package/src/template/src/providers/theme.provider.tsx +0 -8
  132. package/src/utils.js +0 -113
  133. /package/src/template/{src/app → public}/favicon.ico +0 -0
@@ -1,124 +0,0 @@
1
- import * as React from "react";
2
- import {
3
- ChevronLeftIcon,
4
- ChevronRightIcon,
5
- MoreHorizontalIcon,
6
- } from "lucide-react";
7
-
8
- import { cn } from "@/lib/utils";
9
- import { Button, buttonVariants } from "@/components/ui/button";
10
-
11
- function Pagination({ className, ...props }: React.ComponentProps<"nav">) {
12
- return (
13
- <nav
14
- role="navigation"
15
- aria-label="pagination"
16
- data-slot="pagination"
17
- className={cn("mx-auto flex w-full justify-center", className)}
18
- {...props}
19
- />
20
- );
21
- }
22
-
23
- function PaginationContent({
24
- className,
25
- ...props
26
- }: React.ComponentProps<"ul">) {
27
- return (
28
- <ul
29
- data-slot="pagination-content"
30
- className={cn("flex flex-row items-center gap-1", className)}
31
- {...props}
32
- />
33
- );
34
- }
35
-
36
- function PaginationItem({ ...props }: React.ComponentProps<"li">) {
37
- return <li data-slot="pagination-item" {...props} />;
38
- }
39
-
40
- type PaginationLinkProps = {
41
- isActive?: boolean;
42
- } & Pick<React.ComponentProps<typeof Button>, "size"> &
43
- React.ComponentProps<"a">;
44
-
45
- function PaginationLink({
46
- className,
47
- isActive,
48
- size = "icon",
49
- ...props
50
- }: PaginationLinkProps) {
51
- return (
52
- <a
53
- aria-current={isActive ? "page" : undefined}
54
- data-slot="pagination-link"
55
- data-active={isActive}
56
- className={cn(
57
- buttonVariants({
58
- variant: isActive ? "outline" : "ghost",
59
- size,
60
- }),
61
- className
62
- )}
63
- {...props}
64
- />
65
- );
66
- }
67
-
68
- function PaginationPrevious({
69
- className,
70
- ...props
71
- }: React.ComponentProps<typeof PaginationLink>) {
72
- return (
73
- <PaginationLink
74
- aria-label="Go to previous page"
75
- size="default"
76
- className={cn("gap-1 px-2.5 sm:pl-2.5", className)}
77
- {...props}>
78
- <ChevronLeftIcon />
79
- <span className="hidden sm:block">Previous</span>
80
- </PaginationLink>
81
- );
82
- }
83
-
84
- function PaginationNext({
85
- className,
86
- ...props
87
- }: React.ComponentProps<typeof PaginationLink>) {
88
- return (
89
- <PaginationLink
90
- aria-label="Go to next page"
91
- size="default"
92
- className={cn("gap-1 px-2.5 sm:pr-2.5", className)}
93
- {...props}>
94
- <span className="hidden sm:block">Next</span>
95
- <ChevronRightIcon />
96
- </PaginationLink>
97
- );
98
- }
99
-
100
- function PaginationEllipsis({
101
- className,
102
- ...props
103
- }: React.ComponentProps<"span">) {
104
- return (
105
- <span
106
- aria-hidden
107
- data-slot="pagination-ellipsis"
108
- className={cn("flex size-9 items-center justify-center", className)}
109
- {...props}>
110
- <MoreHorizontalIcon className="size-4" />
111
- <span className="sr-only">More pages</span>
112
- </span>
113
- );
114
- }
115
-
116
- export {
117
- Pagination,
118
- PaginationContent,
119
- PaginationLink,
120
- PaginationItem,
121
- PaginationPrevious,
122
- PaginationNext,
123
- PaginationEllipsis,
124
- };
@@ -1,6 +0,0 @@
1
- {
2
- "dependencies": ["@radix-ui/react-popover"],
3
- "dev_dependence": [],
4
- "hooks": [],
5
- "supports": []
6
- }
@@ -1,55 +0,0 @@
1
- "use client";
2
-
3
- import * as React from "react";
4
- import * as PopoverPrimitive from "@radix-ui/react-popover";
5
-
6
- import { cn } from "@/lib/utils";
7
-
8
- function Popover({
9
- ...props
10
- }: React.ComponentProps<typeof PopoverPrimitive.Root>) {
11
- return <PopoverPrimitive.Root data-slot="popover" {...props} />;
12
- }
13
-
14
- function PopoverTrigger({
15
- className,
16
- ...props
17
- }: React.ComponentProps<typeof PopoverPrimitive.Trigger>) {
18
- return (
19
- <PopoverPrimitive.Trigger
20
- data-slot="popover-trigger"
21
- className={cn("cursor-pointer", className)}
22
- {...props}
23
- />
24
- );
25
- }
26
-
27
- function PopoverContent({
28
- className,
29
- align = "center",
30
- sideOffset = 4,
31
- ...props
32
- }: React.ComponentProps<typeof PopoverPrimitive.Content>) {
33
- return (
34
- <PopoverPrimitive.Portal>
35
- <PopoverPrimitive.Content
36
- data-slot="popover-content"
37
- align={align}
38
- sideOffset={sideOffset}
39
- className={cn(
40
- "bg-popover text-popover-foreground 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 p-4 shadow-md outline-hidden",
41
- className
42
- )}
43
- {...props}
44
- />
45
- </PopoverPrimitive.Portal>
46
- );
47
- }
48
-
49
- function PopoverAnchor({
50
- ...props
51
- }: React.ComponentProps<typeof PopoverPrimitive.Anchor>) {
52
- return <PopoverPrimitive.Anchor data-slot="popover-anchor" {...props} />;
53
- }
54
-
55
- export { Popover, PopoverTrigger, PopoverContent, PopoverAnchor };
@@ -1,6 +0,0 @@
1
- {
2
- "dependencies": ["@radix-ui/react-progress"],
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 ProgressPrimitive from "@radix-ui/react-progress";
5
-
6
- import { cn } from "@/lib/utils";
7
-
8
- function Progress({
9
- className,
10
- value,
11
- ...props
12
- }: React.ComponentProps<typeof ProgressPrimitive.Root>) {
13
- return (
14
- <ProgressPrimitive.Root
15
- data-slot="progress"
16
- className={cn(
17
- "bg-primary/20 relative h-2 w-full overflow-hidden rounded-full",
18
- className
19
- )}
20
- {...props}>
21
- <ProgressPrimitive.Indicator
22
- data-slot="progress-indicator"
23
- className="bg-primary h-full w-full flex-1 transition-all"
24
- style={{ transform: `translateX(-${100 - (value || 0)}%)` }}
25
- />
26
- </ProgressPrimitive.Root>
27
- );
28
- }
29
-
30
- export { Progress };
@@ -1,6 +0,0 @@
1
- {
2
- "dependencies": ["@radix-ui/react-radio-group"],
3
- "dev_dependence": [],
4
- "hooks": [],
5
- "supports": []
6
- }
@@ -1,43 +0,0 @@
1
- "use client";
2
-
3
- import * as React from "react";
4
- import * as RadioGroupPrimitive from "@radix-ui/react-radio-group";
5
- import { CircleIcon } from "lucide-react";
6
-
7
- import { cn } from "@/lib/utils";
8
-
9
- function RadioGroup({
10
- className,
11
- ...props
12
- }: React.ComponentProps<typeof RadioGroupPrimitive.Root>) {
13
- return (
14
- <RadioGroupPrimitive.Root
15
- data-slot="radio-group"
16
- className={cn("grid gap-3", className)}
17
- {...props}
18
- />
19
- );
20
- }
21
-
22
- function RadioGroupItem({
23
- className,
24
- ...props
25
- }: React.ComponentProps<typeof RadioGroupPrimitive.Item>) {
26
- return (
27
- <RadioGroupPrimitive.Item
28
- data-slot="radio-group-item"
29
- className={cn(
30
- "border-input text-primary cursor-pointer 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 aspect-square size-4 shrink-0 rounded-full border shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",
31
- className
32
- )}
33
- {...props}>
34
- <RadioGroupPrimitive.Indicator
35
- data-slot="radio-group-indicator"
36
- className="relative flex items-center justify-center">
37
- <CircleIcon className="fill-primary absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2" />
38
- </RadioGroupPrimitive.Indicator>
39
- </RadioGroupPrimitive.Item>
40
- );
41
- }
42
-
43
- export { RadioGroup, RadioGroupItem };
@@ -1,6 +0,0 @@
1
- {
2
- "dependencies": ["react-resizable-panels"],
3
- "dev_dependence": [],
4
- "hooks": [],
5
- "supports": []
6
- }
@@ -1,55 +0,0 @@
1
- "use client";
2
-
3
- import * as React from "react";
4
- import { GripVerticalIcon } from "lucide-react";
5
- import * as ResizablePrimitive from "react-resizable-panels";
6
-
7
- import { cn } from "@/lib/utils";
8
-
9
- function ResizablePanelGroup({
10
- className,
11
- ...props
12
- }: React.ComponentProps<typeof ResizablePrimitive.PanelGroup>) {
13
- return (
14
- <ResizablePrimitive.PanelGroup
15
- data-slot="resizable-panel-group"
16
- className={cn(
17
- "flex h-full w-full data-[panel-group-direction=vertical]:flex-col",
18
- className
19
- )}
20
- {...props}
21
- />
22
- );
23
- }
24
-
25
- function ResizablePanel({
26
- ...props
27
- }: React.ComponentProps<typeof ResizablePrimitive.Panel>) {
28
- return <ResizablePrimitive.Panel data-slot="resizable-panel" {...props} />;
29
- }
30
-
31
- function ResizableHandle({
32
- withHandle,
33
- className,
34
- ...props
35
- }: React.ComponentProps<typeof ResizablePrimitive.PanelResizeHandle> & {
36
- withHandle?: boolean;
37
- }) {
38
- return (
39
- <ResizablePrimitive.PanelResizeHandle
40
- data-slot="resizable-handle"
41
- className={cn(
42
- "bg-border focus-visible:ring-ring relative flex w-px items-center justify-center after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-offset-1 focus-visible:outline-hidden data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:translate-x-0 data-[panel-group-direction=vertical]:after:-translate-y-1/2 [&[data-panel-group-direction=vertical]>div]:rotate-90",
43
- className
44
- )}
45
- {...props}>
46
- {withHandle && (
47
- <div className="bg-border z-10 flex h-4 w-3 items-center justify-center rounded-xs border">
48
- <GripVerticalIcon className="size-2.5" />
49
- </div>
50
- )}
51
- </ResizablePrimitive.PanelResizeHandle>
52
- );
53
- }
54
-
55
- export { ResizablePanelGroup, ResizablePanel, ResizableHandle };
@@ -1,6 +0,0 @@
1
- {
2
- "dependencies": ["@radix-ui/react-scroll-area"],
3
- "dev_dependence": [],
4
- "hooks": [],
5
- "supports": []
6
- }
@@ -1,55 +0,0 @@
1
- "use client";
2
-
3
- import * as React from "react";
4
- import * as ScrollAreaPrimitive from "@radix-ui/react-scroll-area";
5
-
6
- import { cn } from "@/lib/utils";
7
-
8
- function ScrollArea({
9
- className,
10
- children,
11
- ...props
12
- }: React.ComponentProps<typeof ScrollAreaPrimitive.Root>) {
13
- return (
14
- <ScrollAreaPrimitive.Root
15
- data-slot="scroll-area"
16
- className={cn("relative", className)}
17
- {...props}>
18
- <ScrollAreaPrimitive.Viewport
19
- data-slot="scroll-area-viewport"
20
- className="focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1">
21
- {children}
22
- </ScrollAreaPrimitive.Viewport>
23
- <ScrollBar />
24
- <ScrollAreaPrimitive.Corner />
25
- </ScrollAreaPrimitive.Root>
26
- );
27
- }
28
-
29
- function ScrollBar({
30
- className,
31
- orientation = "vertical",
32
- ...props
33
- }: React.ComponentProps<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>) {
34
- return (
35
- <ScrollAreaPrimitive.ScrollAreaScrollbar
36
- data-slot="scroll-area-scrollbar"
37
- orientation={orientation}
38
- className={cn(
39
- "flex touch-none p-px transition-colors select-none",
40
- orientation === "vertical" &&
41
- "h-full w-2.5 border-l border-l-transparent",
42
- orientation === "horizontal" &&
43
- "h-2.5 flex-col border-t border-t-transparent",
44
- className
45
- )}
46
- {...props}>
47
- <ScrollAreaPrimitive.ScrollAreaThumb
48
- data-slot="scroll-area-thumb"
49
- className="bg-border relative flex-1 rounded-full"
50
- />
51
- </ScrollAreaPrimitive.ScrollAreaScrollbar>
52
- );
53
- }
54
-
55
- export { ScrollArea, ScrollBar };
@@ -1,6 +0,0 @@
1
- {
2
- "dependencies": ["@radix-ui/react-select"],
3
- "dev_dependence": [],
4
- "hooks": [],
5
- "supports": []
6
- }
@@ -1,179 +0,0 @@
1
- "use client";
2
-
3
- import * as React from "react";
4
- import * as SelectPrimitive from "@radix-ui/react-select";
5
- import { CheckIcon, ChevronDownIcon, ChevronUpIcon } from "lucide-react";
6
-
7
- import { cn } from "@/lib/utils";
8
-
9
- function Select({
10
- ...props
11
- }: React.ComponentProps<typeof SelectPrimitive.Root>) {
12
- return <SelectPrimitive.Root data-slot="select" {...props} />;
13
- }
14
-
15
- function SelectGroup({
16
- ...props
17
- }: React.ComponentProps<typeof SelectPrimitive.Group>) {
18
- return <SelectPrimitive.Group data-slot="select-group" {...props} />;
19
- }
20
-
21
- function SelectValue({
22
- ...props
23
- }: React.ComponentProps<typeof SelectPrimitive.Value>) {
24
- return <SelectPrimitive.Value data-slot="select-value" {...props} />;
25
- }
26
-
27
- function SelectTrigger({
28
- className,
29
- size = "default",
30
- children,
31
- ...props
32
- }: React.ComponentProps<typeof SelectPrimitive.Trigger> & {
33
- size?: "sm" | "default";
34
- }) {
35
- return (
36
- <SelectPrimitive.Trigger
37
- data-slot="select-trigger"
38
- data-size={size}
39
- className={cn(
40
- "border-input cursor-pointer data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]: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 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
41
- className
42
- )}
43
- {...props}>
44
- {children}
45
- <SelectPrimitive.Icon asChild>
46
- <ChevronDownIcon className="size-4 opacity-50" />
47
- </SelectPrimitive.Icon>
48
- </SelectPrimitive.Trigger>
49
- );
50
- }
51
-
52
- function SelectContent({
53
- className,
54
- children,
55
- position = "popper",
56
- ...props
57
- }: React.ComponentProps<typeof SelectPrimitive.Content>) {
58
- return (
59
- <SelectPrimitive.Portal>
60
- <SelectPrimitive.Content
61
- data-slot="select-content"
62
- className={cn(
63
- "bg-popover text-popover-foreground 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 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md",
64
- position === "popper" &&
65
- "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
66
- className
67
- )}
68
- position={position}
69
- {...props}>
70
- <SelectScrollUpButton />
71
- <SelectPrimitive.Viewport
72
- className={cn(
73
- "p-1",
74
- position === "popper" &&
75
- "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"
76
- )}>
77
- {children}
78
- </SelectPrimitive.Viewport>
79
- <SelectScrollDownButton />
80
- </SelectPrimitive.Content>
81
- </SelectPrimitive.Portal>
82
- );
83
- }
84
-
85
- function SelectLabel({
86
- className,
87
- ...props
88
- }: React.ComponentProps<typeof SelectPrimitive.Label>) {
89
- return (
90
- <SelectPrimitive.Label
91
- data-slot="select-label"
92
- className={cn("text-muted-foreground px-2 py-1.5 text-xs", className)}
93
- {...props}
94
- />
95
- );
96
- }
97
-
98
- function SelectItem({
99
- className,
100
- children,
101
- ...props
102
- }: React.ComponentProps<typeof SelectPrimitive.Item>) {
103
- return (
104
- <SelectPrimitive.Item
105
- data-slot="select-item"
106
- className={cn(
107
- "focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-pointer items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",
108
- className
109
- )}
110
- {...props}>
111
- <span className="absolute right-2 flex size-3.5 items-center justify-center">
112
- <SelectPrimitive.ItemIndicator>
113
- <CheckIcon className="size-4" />
114
- </SelectPrimitive.ItemIndicator>
115
- </span>
116
- <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>
117
- </SelectPrimitive.Item>
118
- );
119
- }
120
-
121
- function SelectSeparator({
122
- className,
123
- ...props
124
- }: React.ComponentProps<typeof SelectPrimitive.Separator>) {
125
- return (
126
- <SelectPrimitive.Separator
127
- data-slot="select-separator"
128
- className={cn("bg-border pointer-events-none -mx-1 my-1 h-px", className)}
129
- {...props}
130
- />
131
- );
132
- }
133
-
134
- function SelectScrollUpButton({
135
- className,
136
- ...props
137
- }: React.ComponentProps<typeof SelectPrimitive.ScrollUpButton>) {
138
- return (
139
- <SelectPrimitive.ScrollUpButton
140
- data-slot="select-scroll-up-button"
141
- className={cn(
142
- "flex cursor-default items-center justify-center py-1",
143
- className
144
- )}
145
- {...props}>
146
- <ChevronUpIcon className="size-4" />
147
- </SelectPrimitive.ScrollUpButton>
148
- );
149
- }
150
-
151
- function SelectScrollDownButton({
152
- className,
153
- ...props
154
- }: React.ComponentProps<typeof SelectPrimitive.ScrollDownButton>) {
155
- return (
156
- <SelectPrimitive.ScrollDownButton
157
- data-slot="select-scroll-down-button"
158
- className={cn(
159
- "flex cursor-default items-center justify-center py-1",
160
- className
161
- )}
162
- {...props}>
163
- <ChevronDownIcon className="size-4" />
164
- </SelectPrimitive.ScrollDownButton>
165
- );
166
- }
167
-
168
- export {
169
- Select,
170
- SelectContent,
171
- SelectGroup,
172
- SelectItem,
173
- SelectLabel,
174
- SelectScrollDownButton,
175
- SelectScrollUpButton,
176
- SelectSeparator,
177
- SelectTrigger,
178
- SelectValue,
179
- };
@@ -1,6 +0,0 @@
1
- {
2
- "dependencies": ["@radix-ui/react-separator"],
3
- "dev_dependence": [],
4
- "hooks": [],
5
- "supports": []
6
- }
@@ -1,28 +0,0 @@
1
- "use client";
2
-
3
- import * as React from "react";
4
- import * as SeparatorPrimitive from "@radix-ui/react-separator";
5
-
6
- import { cn } from "@/lib/utils";
7
-
8
- function Separator({
9
- className,
10
- orientation = "horizontal",
11
- decorative = true,
12
- ...props
13
- }: React.ComponentProps<typeof SeparatorPrimitive.Root>) {
14
- return (
15
- <SeparatorPrimitive.Root
16
- data-slot="separator"
17
- decorative={decorative}
18
- orientation={orientation}
19
- className={cn(
20
- "bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",
21
- className
22
- )}
23
- {...props}
24
- />
25
- );
26
- }
27
-
28
- export { Separator };
@@ -1,6 +0,0 @@
1
- {
2
- "dependencies": ["@radix-ui/react-dialog"],
3
- "dev_dependence": [],
4
- "hooks": [],
5
- "supports": []
6
- }