create-huenei-template 0.2.16 → 0.2.17
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/dist/templates/frontend/pre-sales/.cursor/agents/pre-sales-builder.agent.md +92 -77
- package/dist/templates/frontend/pre-sales/.cursor/agents/pre-sales-demo-runner.agent.md +36 -0
- package/dist/templates/frontend/pre-sales/.cursor/agents/pre-sales-deploy.agent.md +87 -80
- package/dist/templates/frontend/pre-sales/.cursor/agents/qa-test-expert.agent.md +48 -49
- package/dist/templates/frontend/pre-sales/.cursor/commands/deploy-demo.md +73 -0
- package/dist/templates/frontend/pre-sales/.cursor/commands/new-component.md +192 -232
- package/dist/templates/frontend/pre-sales/.cursor/commands/prepare-deploy.md +135 -134
- package/dist/templates/frontend/pre-sales/.cursor/commands/ver-demo.md +58 -0
- package/dist/templates/frontend/pre-sales/.cursor/context/pre-sales.md +2 -0
- package/dist/templates/frontend/pre-sales/.cursor/hooks/injectPreSalesContext.ts +24 -1
- package/dist/templates/frontend/pre-sales/.cursor/hooks.json +23 -26
- package/dist/templates/frontend/pre-sales/.cursor/mcp.json +1 -5
- package/dist/templates/frontend/pre-sales/.cursor/rules/architech.mdc +199 -206
- package/dist/templates/frontend/pre-sales/.cursor/rules/component-patterns.mdc +4 -0
- package/dist/templates/frontend/pre-sales/.cursor/rules/deployment-ready.mdc +52 -52
- package/dist/templates/frontend/pre-sales/.cursor/rules/domain-business-bootstrap.mdc +74 -0
- package/dist/templates/frontend/pre-sales/.cursor/rules/pre-sales-mode.mdc +104 -60
- package/dist/templates/frontend/pre-sales/.cursor/rules/separation-of-concerns.mdc +41 -42
- package/dist/templates/frontend/pre-sales/.cursor/skills/deploy-to-vercel/SKILL.md +296 -0
- package/dist/templates/frontend/pre-sales/.cursor/skills/deploy-to-vercel/resources/deploy-codex.sh +301 -0
- package/dist/templates/frontend/pre-sales/.cursor/skills/deploy-to-vercel/resources/deploy.sh +301 -0
- package/dist/templates/frontend/pre-sales/.impeccable.md +26 -0
- package/dist/templates/frontend/pre-sales/index.html +11 -2
- package/dist/templates/frontend/pre-sales/src/__tests__/components/layout/navbar.test.tsx +0 -1
- package/dist/templates/frontend/pre-sales/src/__tests__/components/layout/sidebar.test.tsx +58 -68
- package/dist/templates/frontend/pre-sales/src/__tests__/hooks/useAuth.test.tsx +2 -1
- package/dist/templates/frontend/pre-sales/src/__tests__/lib/auth.test.ts +102 -102
- package/dist/templates/frontend/pre-sales/src/__tests__/routes/__root.test.tsx +72 -72
- package/dist/templates/frontend/pre-sales/src/__tests__/routes/_authenticated.test.tsx +57 -58
- package/dist/templates/frontend/pre-sales/src/__tests__/routes/index.test.tsx +8 -43
- package/dist/templates/frontend/pre-sales/src/components/layout/navbar.tsx +121 -75
- package/dist/templates/frontend/pre-sales/src/components/layout/sidebar.tsx +42 -30
- package/dist/templates/frontend/pre-sales/src/components/providers/auth-provider.tsx +60 -0
- package/dist/templates/frontend/pre-sales/src/components/ui/button.tsx +1 -1
- package/dist/templates/frontend/pre-sales/src/components/ui/card.tsx +1 -1
- package/dist/templates/frontend/pre-sales/src/components/ui/combobox.tsx +308 -308
- package/dist/templates/frontend/pre-sales/src/components/ui/command.tsx +179 -182
- package/dist/templates/frontend/pre-sales/src/components/ui/input.tsx +2 -0
- package/dist/templates/frontend/pre-sales/src/components/ui/textarea.tsx +2 -0
- package/dist/templates/frontend/pre-sales/src/components/ui/theme-toggle.tsx +35 -0
- package/dist/templates/frontend/pre-sales/src/data/dashboard.ts +249 -255
- package/dist/templates/frontend/pre-sales/src/hooks/useAuth.ts +13 -0
- package/dist/templates/frontend/pre-sales/src/hooks/useTheme.ts +73 -0
- package/dist/templates/frontend/pre-sales/src/index.css +282 -134
- package/dist/templates/frontend/pre-sales/src/main.tsx +3 -2
- package/dist/templates/frontend/pre-sales/src/routes/__root.tsx +62 -54
- package/dist/templates/frontend/pre-sales/src/routes/_authenticated/app.tsx +20 -0
- package/dist/templates/frontend/pre-sales/src/routes/_authenticated.tsx +5 -4
- package/dist/templates/frontend/pre-sales/src/routes/auth/iniciar-sesion.tsx +173 -163
- package/dist/templates/frontend/pre-sales/src/routes/index.tsx +53 -198
- package/dist/templates/frontend/pre-sales/src/test/utils.tsx +2 -1
- package/dist/templates/frontend/pre-sales/src/vite-env.d.ts +11 -0
- package/package.json +1 -1
- package/templates/frontend/pre-sales/.cursor/agents/pre-sales-builder.agent.md +92 -77
- package/templates/frontend/pre-sales/.cursor/agents/pre-sales-demo-runner.agent.md +36 -0
- package/templates/frontend/pre-sales/.cursor/agents/pre-sales-deploy.agent.md +87 -80
- package/templates/frontend/pre-sales/.cursor/agents/qa-test-expert.agent.md +48 -49
- package/templates/frontend/pre-sales/.cursor/commands/deploy-demo.md +73 -0
- package/templates/frontend/pre-sales/.cursor/commands/new-component.md +192 -232
- package/templates/frontend/pre-sales/.cursor/commands/prepare-deploy.md +135 -134
- package/templates/frontend/pre-sales/.cursor/commands/ver-demo.md +58 -0
- package/templates/frontend/pre-sales/.cursor/context/pre-sales.md +2 -0
- package/templates/frontend/pre-sales/.cursor/hooks/injectPreSalesContext.ts +24 -1
- package/templates/frontend/pre-sales/.cursor/hooks.json +23 -26
- package/templates/frontend/pre-sales/.cursor/mcp.json +1 -5
- package/templates/frontend/pre-sales/.cursor/rules/architech.mdc +199 -206
- package/templates/frontend/pre-sales/.cursor/rules/component-patterns.mdc +4 -0
- package/templates/frontend/pre-sales/.cursor/rules/deployment-ready.mdc +52 -52
- package/templates/frontend/pre-sales/.cursor/rules/domain-business-bootstrap.mdc +74 -0
- package/templates/frontend/pre-sales/.cursor/rules/pre-sales-mode.mdc +104 -60
- package/templates/frontend/pre-sales/.cursor/rules/separation-of-concerns.mdc +41 -42
- package/templates/frontend/pre-sales/.cursor/skills/deploy-to-vercel/SKILL.md +296 -0
- package/templates/frontend/pre-sales/.cursor/skills/deploy-to-vercel/resources/deploy-codex.sh +301 -0
- package/templates/frontend/pre-sales/.cursor/skills/deploy-to-vercel/resources/deploy.sh +301 -0
- package/templates/frontend/pre-sales/.impeccable.md +26 -0
- package/templates/frontend/pre-sales/index.html +11 -2
- package/templates/frontend/pre-sales/pnpm-lock.yaml +6448 -0
- package/templates/frontend/pre-sales/skills-lock.json +10 -0
- package/templates/frontend/pre-sales/src/__tests__/components/layout/navbar.test.tsx +0 -1
- package/templates/frontend/pre-sales/src/__tests__/components/layout/sidebar.test.tsx +58 -68
- package/templates/frontend/pre-sales/src/__tests__/hooks/useAuth.test.tsx +2 -1
- package/templates/frontend/pre-sales/src/__tests__/lib/auth.test.ts +102 -102
- package/templates/frontend/pre-sales/src/__tests__/routes/__root.test.tsx +72 -72
- package/templates/frontend/pre-sales/src/__tests__/routes/_authenticated.test.tsx +57 -58
- package/templates/frontend/pre-sales/src/__tests__/routes/index.test.tsx +8 -43
- package/templates/frontend/pre-sales/src/components/layout/navbar.tsx +121 -75
- package/templates/frontend/pre-sales/src/components/layout/sidebar.tsx +42 -30
- package/templates/frontend/pre-sales/src/components/providers/auth-provider.tsx +60 -0
- package/templates/frontend/pre-sales/src/components/ui/button.tsx +1 -1
- package/templates/frontend/pre-sales/src/components/ui/card.tsx +1 -1
- package/templates/frontend/pre-sales/src/components/ui/combobox.tsx +308 -308
- package/templates/frontend/pre-sales/src/components/ui/command.tsx +179 -182
- package/templates/frontend/pre-sales/src/components/ui/input.tsx +2 -0
- package/templates/frontend/pre-sales/src/components/ui/textarea.tsx +2 -0
- package/templates/frontend/pre-sales/src/components/ui/theme-toggle.tsx +35 -0
- package/templates/frontend/pre-sales/src/data/dashboard.ts +249 -255
- package/templates/frontend/pre-sales/src/hooks/useAuth.ts +13 -0
- package/templates/frontend/pre-sales/src/hooks/useTheme.ts +73 -0
- package/templates/frontend/pre-sales/src/index.css +282 -134
- package/templates/frontend/pre-sales/src/main.tsx +3 -2
- package/templates/frontend/pre-sales/src/routes/__root.tsx +62 -54
- package/templates/frontend/pre-sales/src/routes/_authenticated/app.tsx +20 -0
- package/templates/frontend/pre-sales/src/routes/_authenticated.tsx +5 -4
- package/templates/frontend/pre-sales/src/routes/auth/iniciar-sesion.tsx +173 -163
- package/templates/frontend/pre-sales/src/routes/index.tsx +53 -198
- package/templates/frontend/pre-sales/src/test/utils.tsx +2 -1
- package/templates/frontend/pre-sales/src/vite-env.d.ts +11 -0
|
@@ -1,182 +1,179 @@
|
|
|
1
|
-
import * as React from "react"
|
|
2
|
-
import { Command as CommandPrimitive } from "cmdk"
|
|
3
|
-
import { SearchIcon } from "lucide-react"
|
|
4
|
-
|
|
5
|
-
import { cn } from "@/lib/utils"
|
|
6
|
-
import {
|
|
7
|
-
Dialog,
|
|
8
|
-
DialogContent,
|
|
9
|
-
DialogDescription,
|
|
10
|
-
DialogHeader,
|
|
11
|
-
DialogTitle,
|
|
12
|
-
} from "@/components/ui/dialog"
|
|
13
|
-
|
|
14
|
-
function Command({
|
|
15
|
-
className,
|
|
16
|
-
...props
|
|
17
|
-
}: React.ComponentProps<typeof CommandPrimitive>) {
|
|
18
|
-
return (
|
|
19
|
-
<CommandPrimitive
|
|
20
|
-
data-slot="command"
|
|
21
|
-
className={cn(
|
|
22
|
-
"flex h-full w-full flex-col overflow-hidden rounded-md bg-base-100 text-base-content",
|
|
23
|
-
className
|
|
24
|
-
)}
|
|
25
|
-
{...props}
|
|
26
|
-
/>
|
|
27
|
-
)
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
function CommandDialog({
|
|
31
|
-
title = "Command Palette",
|
|
32
|
-
description = "Search for a command to run...",
|
|
33
|
-
children,
|
|
34
|
-
className,
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
className=
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
CommandShortcut,
|
|
181
|
-
CommandSeparator,
|
|
182
|
-
}
|
|
1
|
+
import * as React from "react"
|
|
2
|
+
import { Command as CommandPrimitive } from "cmdk"
|
|
3
|
+
import { SearchIcon } from "lucide-react"
|
|
4
|
+
|
|
5
|
+
import { cn } from "@/lib/utils"
|
|
6
|
+
import {
|
|
7
|
+
Dialog,
|
|
8
|
+
DialogContent,
|
|
9
|
+
DialogDescription,
|
|
10
|
+
DialogHeader,
|
|
11
|
+
DialogTitle,
|
|
12
|
+
} from "@/components/ui/dialog"
|
|
13
|
+
|
|
14
|
+
function Command({
|
|
15
|
+
className,
|
|
16
|
+
...props
|
|
17
|
+
}: React.ComponentProps<typeof CommandPrimitive>) {
|
|
18
|
+
return (
|
|
19
|
+
<CommandPrimitive
|
|
20
|
+
data-slot="command"
|
|
21
|
+
className={cn(
|
|
22
|
+
"flex h-full w-full flex-col overflow-hidden rounded-md bg-base-100 text-base-content",
|
|
23
|
+
className
|
|
24
|
+
)}
|
|
25
|
+
{...props}
|
|
26
|
+
/>
|
|
27
|
+
)
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
function CommandDialog({
|
|
31
|
+
title = "Command Palette",
|
|
32
|
+
description = "Search for a command to run...",
|
|
33
|
+
children,
|
|
34
|
+
className,
|
|
35
|
+
...props
|
|
36
|
+
}: React.ComponentProps<typeof Dialog> & {
|
|
37
|
+
title?: string
|
|
38
|
+
description?: string
|
|
39
|
+
className?: string
|
|
40
|
+
}) {
|
|
41
|
+
return (
|
|
42
|
+
<Dialog {...props}>
|
|
43
|
+
<DialogHeader className="sr-only">
|
|
44
|
+
<DialogTitle>{title}</DialogTitle>
|
|
45
|
+
<DialogDescription>{description}</DialogDescription>
|
|
46
|
+
</DialogHeader>
|
|
47
|
+
<DialogContent
|
|
48
|
+
className={cn("overflow-hidden p-0", className)}
|
|
49
|
+
>
|
|
50
|
+
<Command className="**:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-base-content/60 [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5">
|
|
51
|
+
{children}
|
|
52
|
+
</Command>
|
|
53
|
+
</DialogContent>
|
|
54
|
+
</Dialog>
|
|
55
|
+
)
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
function CommandInput({
|
|
59
|
+
className,
|
|
60
|
+
...props
|
|
61
|
+
}: React.ComponentProps<typeof CommandPrimitive.Input>) {
|
|
62
|
+
return (
|
|
63
|
+
<div
|
|
64
|
+
data-slot="command-input-wrapper"
|
|
65
|
+
className="flex h-9 items-center gap-2 border-b px-3"
|
|
66
|
+
>
|
|
67
|
+
<SearchIcon className="size-4 shrink-0 opacity-50" />
|
|
68
|
+
<CommandPrimitive.Input
|
|
69
|
+
data-slot="command-input"
|
|
70
|
+
className={cn(
|
|
71
|
+
"flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden placeholder:text-base-content/60 disabled:cursor-not-allowed disabled:opacity-50",
|
|
72
|
+
className
|
|
73
|
+
)}
|
|
74
|
+
{...props}
|
|
75
|
+
/>
|
|
76
|
+
</div>
|
|
77
|
+
)
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
function CommandList({
|
|
81
|
+
className,
|
|
82
|
+
...props
|
|
83
|
+
}: React.ComponentProps<typeof CommandPrimitive.List>) {
|
|
84
|
+
return (
|
|
85
|
+
<CommandPrimitive.List
|
|
86
|
+
data-slot="command-list"
|
|
87
|
+
className={cn(
|
|
88
|
+
"max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",
|
|
89
|
+
className
|
|
90
|
+
)}
|
|
91
|
+
{...props}
|
|
92
|
+
/>
|
|
93
|
+
)
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
function CommandEmpty({
|
|
97
|
+
...props
|
|
98
|
+
}: React.ComponentProps<typeof CommandPrimitive.Empty>) {
|
|
99
|
+
return (
|
|
100
|
+
<CommandPrimitive.Empty
|
|
101
|
+
data-slot="command-empty"
|
|
102
|
+
className="py-6 text-center text-sm"
|
|
103
|
+
{...props}
|
|
104
|
+
/>
|
|
105
|
+
)
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
function CommandGroup({
|
|
109
|
+
className,
|
|
110
|
+
...props
|
|
111
|
+
}: React.ComponentProps<typeof CommandPrimitive.Group>) {
|
|
112
|
+
return (
|
|
113
|
+
<CommandPrimitive.Group
|
|
114
|
+
data-slot="command-group"
|
|
115
|
+
className={cn(
|
|
116
|
+
"overflow-hidden p-1 text-base-content [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-base-content/60",
|
|
117
|
+
className
|
|
118
|
+
)}
|
|
119
|
+
{...props}
|
|
120
|
+
/>
|
|
121
|
+
)
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
function CommandSeparator({
|
|
125
|
+
className,
|
|
126
|
+
...props
|
|
127
|
+
}: React.ComponentProps<typeof CommandPrimitive.Separator>) {
|
|
128
|
+
return (
|
|
129
|
+
<CommandPrimitive.Separator
|
|
130
|
+
data-slot="command-separator"
|
|
131
|
+
className={cn("-mx-1 h-px bg-base-300", className)}
|
|
132
|
+
{...props}
|
|
133
|
+
/>
|
|
134
|
+
)
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
function CommandItem({
|
|
138
|
+
className,
|
|
139
|
+
...props
|
|
140
|
+
}: React.ComponentProps<typeof CommandPrimitive.Item>) {
|
|
141
|
+
return (
|
|
142
|
+
<CommandPrimitive.Item
|
|
143
|
+
data-slot="command-item"
|
|
144
|
+
className={cn(
|
|
145
|
+
"relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 data-[selected=true]:bg-base-200 data-[selected=true]:text-base-content [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-base-content/60",
|
|
146
|
+
className
|
|
147
|
+
)}
|
|
148
|
+
{...props}
|
|
149
|
+
/>
|
|
150
|
+
)
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
function CommandShortcut({
|
|
154
|
+
className,
|
|
155
|
+
...props
|
|
156
|
+
}: React.ComponentProps<"span">) {
|
|
157
|
+
return (
|
|
158
|
+
<span
|
|
159
|
+
data-slot="command-shortcut"
|
|
160
|
+
className={cn(
|
|
161
|
+
"ml-auto text-xs tracking-widest text-base-content/60",
|
|
162
|
+
className
|
|
163
|
+
)}
|
|
164
|
+
{...props}
|
|
165
|
+
/>
|
|
166
|
+
)
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
export {
|
|
170
|
+
Command,
|
|
171
|
+
CommandDialog,
|
|
172
|
+
CommandInput,
|
|
173
|
+
CommandList,
|
|
174
|
+
CommandEmpty,
|
|
175
|
+
CommandGroup,
|
|
176
|
+
CommandItem,
|
|
177
|
+
CommandShortcut,
|
|
178
|
+
CommandSeparator,
|
|
179
|
+
}
|
|
@@ -12,6 +12,8 @@ function Input({ className, type, ...props }: React.ComponentProps<"input">) {
|
|
|
12
12
|
"file:text-base-content placeholder:text-base-content/50",
|
|
13
13
|
"disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50",
|
|
14
14
|
"aria-invalid:input-error",
|
|
15
|
+
"transition-[border-color,box-shadow] duration-(--duration-fast) ease-(--ease-out-quart)",
|
|
16
|
+
"focus:shadow-[0_0_0_3px_oklch(72%_0.17_55/12%)]",
|
|
15
17
|
className
|
|
16
18
|
)}
|
|
17
19
|
{...props}
|
|
@@ -11,6 +11,8 @@ function Textarea({ className, ...props }: React.ComponentProps<"textarea">) {
|
|
|
11
11
|
"placeholder:text-base-content/50",
|
|
12
12
|
"disabled:cursor-not-allowed disabled:opacity-50",
|
|
13
13
|
"aria-invalid:textarea-error",
|
|
14
|
+
"transition-[border-color,box-shadow] duration-(--duration-fast) ease-(--ease-out-quart)",
|
|
15
|
+
"focus:shadow-[0_0_0_3px_oklch(72%_0.17_55/12%)]",
|
|
14
16
|
className
|
|
15
17
|
)}
|
|
16
18
|
{...props}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { Moon, Sun } from "lucide-react";
|
|
2
|
+
import { useTheme } from "@/hooks/useTheme";
|
|
3
|
+
import { cn } from "@/lib/utils";
|
|
4
|
+
|
|
5
|
+
export function ThemeToggle({ className }: { className?: string }) {
|
|
6
|
+
const { isDark, toggleThemeWithTransition } = useTheme();
|
|
7
|
+
|
|
8
|
+
return (
|
|
9
|
+
<button
|
|
10
|
+
onClick={toggleThemeWithTransition}
|
|
11
|
+
className={cn(
|
|
12
|
+
"relative inline-flex size-9 items-center justify-center rounded-lg",
|
|
13
|
+
"text-base-content/60 hover:text-base-content hover:bg-base-200",
|
|
14
|
+
"transition-colors duration-(--duration-normal) ease-(--ease-out-quart)",
|
|
15
|
+
className,
|
|
16
|
+
)}
|
|
17
|
+
aria-label={isDark ? "Cambiar a modo claro" : "Cambiar a modo oscuro"}
|
|
18
|
+
>
|
|
19
|
+
<Sun
|
|
20
|
+
className={cn(
|
|
21
|
+
"size-4.5 transition-all duration-300",
|
|
22
|
+
isDark ? "rotate-90 scale-0 opacity-0" : "rotate-0 scale-100 opacity-100",
|
|
23
|
+
)}
|
|
24
|
+
style={{ position: isDark ? "absolute" : "relative" }}
|
|
25
|
+
/>
|
|
26
|
+
<Moon
|
|
27
|
+
className={cn(
|
|
28
|
+
"size-4.5 transition-all duration-300",
|
|
29
|
+
isDark ? "rotate-0 scale-100 opacity-100" : "-rotate-90 scale-0 opacity-0",
|
|
30
|
+
)}
|
|
31
|
+
style={{ position: !isDark ? "absolute" : "relative" }}
|
|
32
|
+
/>
|
|
33
|
+
</button>
|
|
34
|
+
);
|
|
35
|
+
}
|