create-reactivite 1.0.4 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (87) hide show
  1. package/README.md +119 -98
  2. package/index.js +33 -1
  3. package/package.json +4 -3
  4. package/template/README.md +73 -73
  5. package/template/_gitignore +24 -0
  6. package/template/components.json +22 -22
  7. package/template/eslint.config.js +30 -23
  8. package/template/index.html +13 -13
  9. package/template/package.json +53 -53
  10. package/template/pnpm-lock.yaml +1281 -1856
  11. package/template/src/App.tsx +27 -27
  12. package/template/src/components/home-page-components/header.tsx +2 -2
  13. package/template/src/components/ui/accordion.tsx +64 -64
  14. package/template/src/components/ui/alert.tsx +66 -66
  15. package/template/src/components/ui/avatar.tsx +51 -51
  16. package/template/src/components/ui/badge.tsx +46 -46
  17. package/template/src/components/ui/button-group.tsx +83 -83
  18. package/template/src/components/ui/button.tsx +60 -60
  19. package/template/src/components/ui/calendar.tsx +210 -211
  20. package/template/src/components/ui/card.tsx +92 -92
  21. package/template/src/components/ui/checkbox.tsx +30 -30
  22. package/template/src/components/ui/collapsible.tsx +31 -31
  23. package/template/src/components/ui/dialog.tsx +141 -141
  24. package/template/src/components/ui/input.tsx +21 -21
  25. package/template/src/components/ui/select.tsx +185 -185
  26. package/template/src/components/ui/separator.tsx +26 -26
  27. package/template/src/components/ui/sonner.tsx +38 -38
  28. package/template/src/components/ui/spinner.tsx +16 -16
  29. package/template/src/components/ui/table.tsx +114 -114
  30. package/template/src/components/ui/toggle.tsx +45 -45
  31. package/template/src/components/ui/tooltip.tsx +59 -59
  32. package/template/src/lib/utils.ts +6 -6
  33. package/template/src/main.tsx +10 -10
  34. package/template/tsconfig.app.json +31 -28
  35. package/template/tsconfig.json +2 -4
  36. package/template/tsconfig.node.json +26 -26
  37. package/template2/.env.example +8 -0
  38. package/template2/.husky/pre-commit +4 -0
  39. package/template2/.prettierrc +5 -0
  40. package/template2/README.md +73 -0
  41. package/template2/__tests__/example.test.ts +20 -0
  42. package/template2/_gitignore +37 -0
  43. package/template2/app/[locale]/(private)/dashboard/page.tsx +52 -0
  44. package/template2/app/[locale]/(public)/login/page.tsx +83 -0
  45. package/template2/app/[locale]/layout.tsx +56 -0
  46. package/template2/app/[locale]/locales.ts +10 -0
  47. package/template2/app/[locale]/page.tsx +38 -0
  48. package/template2/app/api/clear-session/route.ts +10 -0
  49. package/template2/app/globals.css +127 -0
  50. package/template2/app/layout.tsx +7 -0
  51. package/template2/app/page.tsx +6 -0
  52. package/template2/components/AuthEventListener.tsx +22 -0
  53. package/template2/components/theme-provider.tsx +78 -0
  54. package/template2/components/ui/button.tsx +60 -0
  55. package/template2/components/ui/card.tsx +92 -0
  56. package/template2/components/ui/input.tsx +21 -0
  57. package/template2/components/ui/label.tsx +24 -0
  58. package/template2/components/ui/sonner.tsx +40 -0
  59. package/template2/components.json +22 -0
  60. package/template2/config/constants.ts +7 -0
  61. package/template2/config/env.ts +5 -0
  62. package/template2/contexts/translation-context.tsx +70 -0
  63. package/template2/eslint.config.mjs +18 -0
  64. package/template2/hoc/provider.tsx +27 -0
  65. package/template2/lib/paramsSerializer.ts +40 -0
  66. package/template2/lib/utils.ts +6 -0
  67. package/template2/locales/az.json +20 -0
  68. package/template2/locales/en.json +20 -0
  69. package/template2/next-env.d.ts +6 -0
  70. package/template2/next.config.ts +17 -0
  71. package/template2/orval.config.ts +66 -0
  72. package/template2/package.json +62 -0
  73. package/template2/pnpm-lock.yaml +6804 -0
  74. package/template2/postcss.config.mjs +7 -0
  75. package/template2/public/.gitkeep +0 -0
  76. package/template2/scripts/fix-generated-types.mjs +13 -0
  77. package/template2/services/generated/.gitkeep +2 -0
  78. package/template2/services/httpClient/httpClient.ts +70 -0
  79. package/template2/services/httpClient/orvalMutator.ts +10 -0
  80. package/template2/store/example-store.tsx +16 -0
  81. package/template2/store/user-store.tsx +29 -0
  82. package/template2/testing/msw/handlers/index.ts +6 -0
  83. package/template2/testing/msw/server.ts +4 -0
  84. package/template2/tsconfig.json +34 -0
  85. package/template2/tsconfig.tsbuildinfo +1 -0
  86. package/template2/vitest.config.ts +17 -0
  87. package/template2/vitest.setup.ts +7 -0
@@ -1,185 +1,185 @@
1
- import * as React from "react"
2
- import * as SelectPrimitive from "@radix-ui/react-select"
3
- import { CheckIcon, ChevronDownIcon, ChevronUpIcon } from "lucide-react"
4
-
5
- import { cn } from "@/lib/utils"
6
-
7
- function Select({
8
- ...props
9
- }: React.ComponentProps<typeof SelectPrimitive.Root>) {
10
- return <SelectPrimitive.Root data-slot="select" {...props} />
11
- }
12
-
13
- function SelectGroup({
14
- ...props
15
- }: React.ComponentProps<typeof SelectPrimitive.Group>) {
16
- return <SelectPrimitive.Group data-slot="select-group" {...props} />
17
- }
18
-
19
- function SelectValue({
20
- ...props
21
- }: React.ComponentProps<typeof SelectPrimitive.Value>) {
22
- return <SelectPrimitive.Value data-slot="select-value" {...props} />
23
- }
24
-
25
- function SelectTrigger({
26
- className,
27
- size = "default",
28
- children,
29
- ...props
30
- }: React.ComponentProps<typeof SelectPrimitive.Trigger> & {
31
- size?: "sm" | "default"
32
- }) {
33
- return (
34
- <SelectPrimitive.Trigger
35
- data-slot="select-trigger"
36
- data-size={size}
37
- className={cn(
38
- "border-input 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",
39
- className
40
- )}
41
- {...props}
42
- >
43
- {children}
44
- <SelectPrimitive.Icon asChild>
45
- <ChevronDownIcon className="size-4 opacity-50" />
46
- </SelectPrimitive.Icon>
47
- </SelectPrimitive.Trigger>
48
- )
49
- }
50
-
51
- function SelectContent({
52
- className,
53
- children,
54
- position = "popper",
55
- align = "center",
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
- align={align}
70
- {...props}
71
- >
72
- <SelectScrollUpButton />
73
- <SelectPrimitive.Viewport
74
- className={cn(
75
- "p-1",
76
- position === "popper" &&
77
- "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"
78
- )}
79
- >
80
- {children}
81
- </SelectPrimitive.Viewport>
82
- <SelectScrollDownButton />
83
- </SelectPrimitive.Content>
84
- </SelectPrimitive.Portal>
85
- )
86
- }
87
-
88
- function SelectLabel({
89
- className,
90
- ...props
91
- }: React.ComponentProps<typeof SelectPrimitive.Label>) {
92
- return (
93
- <SelectPrimitive.Label
94
- data-slot="select-label"
95
- className={cn("text-muted-foreground px-2 py-1.5 text-xs", className)}
96
- {...props}
97
- />
98
- )
99
- }
100
-
101
- function SelectItem({
102
- className,
103
- children,
104
- ...props
105
- }: React.ComponentProps<typeof SelectPrimitive.Item>) {
106
- return (
107
- <SelectPrimitive.Item
108
- data-slot="select-item"
109
- className={cn(
110
- "focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 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 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",
111
- className
112
- )}
113
- {...props}
114
- >
115
- <span className="absolute right-2 flex size-3.5 items-center justify-center">
116
- <SelectPrimitive.ItemIndicator>
117
- <CheckIcon className="size-4" />
118
- </SelectPrimitive.ItemIndicator>
119
- </span>
120
- <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>
121
- </SelectPrimitive.Item>
122
- )
123
- }
124
-
125
- function SelectSeparator({
126
- className,
127
- ...props
128
- }: React.ComponentProps<typeof SelectPrimitive.Separator>) {
129
- return (
130
- <SelectPrimitive.Separator
131
- data-slot="select-separator"
132
- className={cn("bg-border pointer-events-none -mx-1 my-1 h-px", className)}
133
- {...props}
134
- />
135
- )
136
- }
137
-
138
- function SelectScrollUpButton({
139
- className,
140
- ...props
141
- }: React.ComponentProps<typeof SelectPrimitive.ScrollUpButton>) {
142
- return (
143
- <SelectPrimitive.ScrollUpButton
144
- data-slot="select-scroll-up-button"
145
- className={cn(
146
- "flex cursor-default items-center justify-center py-1",
147
- className
148
- )}
149
- {...props}
150
- >
151
- <ChevronUpIcon className="size-4" />
152
- </SelectPrimitive.ScrollUpButton>
153
- )
154
- }
155
-
156
- function SelectScrollDownButton({
157
- className,
158
- ...props
159
- }: React.ComponentProps<typeof SelectPrimitive.ScrollDownButton>) {
160
- return (
161
- <SelectPrimitive.ScrollDownButton
162
- data-slot="select-scroll-down-button"
163
- className={cn(
164
- "flex cursor-default items-center justify-center py-1",
165
- className
166
- )}
167
- {...props}
168
- >
169
- <ChevronDownIcon className="size-4" />
170
- </SelectPrimitive.ScrollDownButton>
171
- )
172
- }
173
-
174
- export {
175
- Select,
176
- SelectContent,
177
- SelectGroup,
178
- SelectItem,
179
- SelectLabel,
180
- SelectScrollDownButton,
181
- SelectScrollUpButton,
182
- SelectSeparator,
183
- SelectTrigger,
184
- SelectValue,
185
- }
1
+ import * as React from "react"
2
+ import * as SelectPrimitive from "@radix-ui/react-select"
3
+ import { CheckIcon, ChevronDownIcon, ChevronUpIcon } from "lucide-react"
4
+
5
+ import { cn } from "@/lib/utils"
6
+
7
+ function Select({
8
+ ...props
9
+ }: React.ComponentProps<typeof SelectPrimitive.Root>) {
10
+ return <SelectPrimitive.Root data-slot="select" {...props} />
11
+ }
12
+
13
+ function SelectGroup({
14
+ ...props
15
+ }: React.ComponentProps<typeof SelectPrimitive.Group>) {
16
+ return <SelectPrimitive.Group data-slot="select-group" {...props} />
17
+ }
18
+
19
+ function SelectValue({
20
+ ...props
21
+ }: React.ComponentProps<typeof SelectPrimitive.Value>) {
22
+ return <SelectPrimitive.Value data-slot="select-value" {...props} />
23
+ }
24
+
25
+ function SelectTrigger({
26
+ className,
27
+ size = "default",
28
+ children,
29
+ ...props
30
+ }: React.ComponentProps<typeof SelectPrimitive.Trigger> & {
31
+ size?: "sm" | "default"
32
+ }) {
33
+ return (
34
+ <SelectPrimitive.Trigger
35
+ data-slot="select-trigger"
36
+ data-size={size}
37
+ className={cn(
38
+ "border-input 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",
39
+ className
40
+ )}
41
+ {...props}
42
+ >
43
+ {children}
44
+ <SelectPrimitive.Icon asChild>
45
+ <ChevronDownIcon className="size-4 opacity-50" />
46
+ </SelectPrimitive.Icon>
47
+ </SelectPrimitive.Trigger>
48
+ )
49
+ }
50
+
51
+ function SelectContent({
52
+ className,
53
+ children,
54
+ position = "popper",
55
+ align = "center",
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
+ align={align}
70
+ {...props}
71
+ >
72
+ <SelectScrollUpButton />
73
+ <SelectPrimitive.Viewport
74
+ className={cn(
75
+ "p-1",
76
+ position === "popper" &&
77
+ "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"
78
+ )}
79
+ >
80
+ {children}
81
+ </SelectPrimitive.Viewport>
82
+ <SelectScrollDownButton />
83
+ </SelectPrimitive.Content>
84
+ </SelectPrimitive.Portal>
85
+ )
86
+ }
87
+
88
+ function SelectLabel({
89
+ className,
90
+ ...props
91
+ }: React.ComponentProps<typeof SelectPrimitive.Label>) {
92
+ return (
93
+ <SelectPrimitive.Label
94
+ data-slot="select-label"
95
+ className={cn("text-muted-foreground px-2 py-1.5 text-xs", className)}
96
+ {...props}
97
+ />
98
+ )
99
+ }
100
+
101
+ function SelectItem({
102
+ className,
103
+ children,
104
+ ...props
105
+ }: React.ComponentProps<typeof SelectPrimitive.Item>) {
106
+ return (
107
+ <SelectPrimitive.Item
108
+ data-slot="select-item"
109
+ className={cn(
110
+ "focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 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 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",
111
+ className
112
+ )}
113
+ {...props}
114
+ >
115
+ <span className="absolute right-2 flex size-3.5 items-center justify-center">
116
+ <SelectPrimitive.ItemIndicator>
117
+ <CheckIcon className="size-4" />
118
+ </SelectPrimitive.ItemIndicator>
119
+ </span>
120
+ <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>
121
+ </SelectPrimitive.Item>
122
+ )
123
+ }
124
+
125
+ function SelectSeparator({
126
+ className,
127
+ ...props
128
+ }: React.ComponentProps<typeof SelectPrimitive.Separator>) {
129
+ return (
130
+ <SelectPrimitive.Separator
131
+ data-slot="select-separator"
132
+ className={cn("bg-border pointer-events-none -mx-1 my-1 h-px", className)}
133
+ {...props}
134
+ />
135
+ )
136
+ }
137
+
138
+ function SelectScrollUpButton({
139
+ className,
140
+ ...props
141
+ }: React.ComponentProps<typeof SelectPrimitive.ScrollUpButton>) {
142
+ return (
143
+ <SelectPrimitive.ScrollUpButton
144
+ data-slot="select-scroll-up-button"
145
+ className={cn(
146
+ "flex cursor-default items-center justify-center py-1",
147
+ className
148
+ )}
149
+ {...props}
150
+ >
151
+ <ChevronUpIcon className="size-4" />
152
+ </SelectPrimitive.ScrollUpButton>
153
+ )
154
+ }
155
+
156
+ function SelectScrollDownButton({
157
+ className,
158
+ ...props
159
+ }: React.ComponentProps<typeof SelectPrimitive.ScrollDownButton>) {
160
+ return (
161
+ <SelectPrimitive.ScrollDownButton
162
+ data-slot="select-scroll-down-button"
163
+ className={cn(
164
+ "flex cursor-default items-center justify-center py-1",
165
+ className
166
+ )}
167
+ {...props}
168
+ >
169
+ <ChevronDownIcon className="size-4" />
170
+ </SelectPrimitive.ScrollDownButton>
171
+ )
172
+ }
173
+
174
+ export {
175
+ Select,
176
+ SelectContent,
177
+ SelectGroup,
178
+ SelectItem,
179
+ SelectLabel,
180
+ SelectScrollDownButton,
181
+ SelectScrollUpButton,
182
+ SelectSeparator,
183
+ SelectTrigger,
184
+ SelectValue,
185
+ }
@@ -1,26 +1,26 @@
1
- import * as React from "react"
2
- import * as SeparatorPrimitive from "@radix-ui/react-separator"
3
-
4
- import { cn } from "@/lib/utils"
5
-
6
- function Separator({
7
- className,
8
- orientation = "horizontal",
9
- decorative = true,
10
- ...props
11
- }: React.ComponentProps<typeof SeparatorPrimitive.Root>) {
12
- return (
13
- <SeparatorPrimitive.Root
14
- data-slot="separator"
15
- decorative={decorative}
16
- orientation={orientation}
17
- className={cn(
18
- "bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",
19
- className
20
- )}
21
- {...props}
22
- />
23
- )
24
- }
25
-
26
- export { Separator }
1
+ import * as React from "react"
2
+ import * as SeparatorPrimitive from "@radix-ui/react-separator"
3
+
4
+ import { cn } from "@/lib/utils"
5
+
6
+ function Separator({
7
+ className,
8
+ orientation = "horizontal",
9
+ decorative = true,
10
+ ...props
11
+ }: React.ComponentProps<typeof SeparatorPrimitive.Root>) {
12
+ return (
13
+ <SeparatorPrimitive.Root
14
+ data-slot="separator"
15
+ decorative={decorative}
16
+ orientation={orientation}
17
+ className={cn(
18
+ "bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",
19
+ className
20
+ )}
21
+ {...props}
22
+ />
23
+ )
24
+ }
25
+
26
+ export { Separator }
@@ -1,38 +1,38 @@
1
- import {
2
- CircleCheckIcon,
3
- InfoIcon,
4
- Loader2Icon,
5
- OctagonXIcon,
6
- TriangleAlertIcon,
7
- } from "lucide-react"
8
- import { useTheme } from "next-themes"
9
- import { Toaster as Sonner, ToasterProps } from "sonner"
10
-
11
- const Toaster = ({ ...props }: ToasterProps) => {
12
- const { theme = "system" } = useTheme()
13
-
14
- return (
15
- <Sonner
16
- theme={theme as ToasterProps["theme"]}
17
- className="toaster group"
18
- icons={{
19
- success: <CircleCheckIcon className="size-4" />,
20
- info: <InfoIcon className="size-4" />,
21
- warning: <TriangleAlertIcon className="size-4" />,
22
- error: <OctagonXIcon className="size-4" />,
23
- loading: <Loader2Icon className="size-4 animate-spin" />,
24
- }}
25
- style={
26
- {
27
- "--normal-bg": "var(--popover)",
28
- "--normal-text": "var(--popover-foreground)",
29
- "--normal-border": "var(--border)",
30
- "--border-radius": "var(--radius)",
31
- } as React.CSSProperties
32
- }
33
- {...props}
34
- />
35
- )
36
- }
37
-
38
- export { Toaster }
1
+ import {
2
+ CircleCheckIcon,
3
+ InfoIcon,
4
+ Loader2Icon,
5
+ OctagonXIcon,
6
+ TriangleAlertIcon,
7
+ } from "lucide-react"
8
+ import { useTheme } from "next-themes"
9
+ import { Toaster as Sonner, type ToasterProps } from "sonner"
10
+
11
+ const Toaster = ({ ...props }: ToasterProps) => {
12
+ const { theme = "system" } = useTheme()
13
+
14
+ return (
15
+ <Sonner
16
+ theme={theme as ToasterProps["theme"]}
17
+ className="toaster group"
18
+ icons={{
19
+ success: <CircleCheckIcon className="size-4" />,
20
+ info: <InfoIcon className="size-4" />,
21
+ warning: <TriangleAlertIcon className="size-4" />,
22
+ error: <OctagonXIcon className="size-4" />,
23
+ loading: <Loader2Icon className="size-4 animate-spin" />,
24
+ }}
25
+ style={
26
+ {
27
+ "--normal-bg": "var(--popover)",
28
+ "--normal-text": "var(--popover-foreground)",
29
+ "--normal-border": "var(--border)",
30
+ "--border-radius": "var(--radius)",
31
+ } as React.CSSProperties
32
+ }
33
+ {...props}
34
+ />
35
+ )
36
+ }
37
+
38
+ export { Toaster }
@@ -1,16 +1,16 @@
1
- import { Loader2Icon } from "lucide-react"
2
-
3
- import { cn } from "@/lib/utils"
4
-
5
- function Spinner({ className, ...props }: React.ComponentProps<"svg">) {
6
- return (
7
- <Loader2Icon
8
- role="status"
9
- aria-label="Loading"
10
- className={cn("size-4 animate-spin", className)}
11
- {...props}
12
- />
13
- )
14
- }
15
-
16
- export { Spinner }
1
+ import { Loader2Icon } from "lucide-react"
2
+
3
+ import { cn } from "@/lib/utils"
4
+
5
+ function Spinner({ className, ...props }: React.ComponentProps<"svg">) {
6
+ return (
7
+ <Loader2Icon
8
+ role="status"
9
+ aria-label="Loading"
10
+ className={cn("size-4 animate-spin", className)}
11
+ {...props}
12
+ />
13
+ )
14
+ }
15
+
16
+ export { Spinner }