create-bunspace 0.4.0 → 0.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin.js +100 -0
- package/dist/templates/fumadocs/MUST-FOLLOW-GUIDELINES.md +283 -170
- package/dist/templates/monorepo/MUST-FOLLOW-GUIDELINES.md +283 -170
- package/dist/templates/react-starter/MUST-FOLLOW-GUIDELINES.md +1845 -0
- package/dist/templates/react-starter/README.md +100 -0
- package/dist/templates/react-starter/bun.lock +1298 -0
- package/dist/templates/react-starter/components.json +27 -0
- package/dist/templates/react-starter/eslint.config.js +23 -0
- package/dist/templates/react-starter/index.html +36 -0
- package/dist/templates/react-starter/package.json +57 -0
- package/dist/templates/react-starter/public/registry.json +115 -0
- package/dist/templates/react-starter/public/themes/darkmatteviolet-dark.css +34 -0
- package/dist/templates/react-starter/public/themes/darkmatteviolet-light.css +34 -0
- package/dist/templates/react-starter/public/themes/default-dark.css +33 -0
- package/dist/templates/react-starter/public/themes/default-light.css +34 -0
- package/dist/templates/react-starter/public/themes/graphite-dark.css +34 -0
- package/dist/templates/react-starter/public/themes/graphite-light.css +34 -0
- package/dist/templates/react-starter/public/themes/synthwave84-dark.css +34 -0
- package/dist/templates/react-starter/public/themes/synthwave84-light.css +34 -0
- package/dist/templates/react-starter/public/vite.svg +1 -0
- package/dist/templates/react-starter/src/App.tsx +245 -0
- package/dist/templates/react-starter/src/assets/react.svg +1 -0
- package/dist/templates/react-starter/src/components/ThemeSelector.tsx +106 -0
- package/dist/templates/react-starter/src/components/animate-ui/components/buttons/icon.tsx +86 -0
- package/dist/templates/react-starter/src/components/animate-ui/components/buttons/theme-toggler.tsx +92 -0
- package/dist/templates/react-starter/src/components/animate-ui/primitives/animate/slot.tsx +96 -0
- package/dist/templates/react-starter/src/components/animate-ui/primitives/buttons/button.tsx +31 -0
- package/dist/templates/react-starter/src/components/animate-ui/primitives/effects/particles.tsx +155 -0
- package/dist/templates/react-starter/src/components/animate-ui/primitives/effects/theme-toggler.tsx +148 -0
- package/dist/templates/react-starter/src/components/component-example.tsx +444 -0
- package/dist/templates/react-starter/src/components/example.tsx +56 -0
- package/dist/templates/react-starter/src/index.css +131 -0
- package/dist/templates/react-starter/src/main.tsx +13 -0
- package/dist/templates/react-starter/src/providers/ThemeProvider.tsx +27 -0
- package/dist/templates/react-starter/tsconfig.app.json +36 -0
- package/dist/templates/react-starter/tsconfig.json +13 -0
- package/dist/templates/react-starter/tsconfig.node.json +26 -0
- package/dist/templates/react-starter/vite.config.ts +17 -0
- package/dist/templates/telegram-bot/MUST-FOLLOW-GUIDELINES.md +283 -170
- package/package.json +1 -1
- package/templates/fumadocs/MUST-FOLLOW-GUIDELINES.md +283 -170
- package/templates/monorepo/MUST-FOLLOW-GUIDELINES.md +283 -170
- package/templates/react-starter/MUST-FOLLOW-GUIDELINES.md +1845 -0
- package/templates/react-starter/README.md +100 -0
- package/templates/react-starter/bun.lock +1298 -0
- package/templates/react-starter/components.json +27 -0
- package/templates/react-starter/eslint.config.js +23 -0
- package/templates/react-starter/index.html +36 -0
- package/templates/react-starter/package.json +57 -0
- package/templates/react-starter/public/registry.json +115 -0
- package/templates/react-starter/public/themes/darkmatteviolet-dark.css +34 -0
- package/templates/react-starter/public/themes/darkmatteviolet-light.css +34 -0
- package/templates/react-starter/public/themes/default-dark.css +33 -0
- package/templates/react-starter/public/themes/default-light.css +34 -0
- package/templates/react-starter/public/themes/graphite-dark.css +34 -0
- package/templates/react-starter/public/themes/graphite-light.css +34 -0
- package/templates/react-starter/public/themes/synthwave84-dark.css +34 -0
- package/templates/react-starter/public/themes/synthwave84-light.css +34 -0
- package/templates/react-starter/public/vite.svg +1 -0
- package/templates/react-starter/src/App.tsx +245 -0
- package/templates/react-starter/src/assets/react.svg +1 -0
- package/templates/react-starter/src/components/ThemeSelector.tsx +106 -0
- package/templates/react-starter/src/components/animate-ui/components/buttons/icon.tsx +86 -0
- package/templates/react-starter/src/components/animate-ui/components/buttons/theme-toggler.tsx +92 -0
- package/templates/react-starter/src/components/animate-ui/primitives/animate/slot.tsx +96 -0
- package/templates/react-starter/src/components/animate-ui/primitives/buttons/button.tsx +31 -0
- package/templates/react-starter/src/components/animate-ui/primitives/effects/particles.tsx +155 -0
- package/templates/react-starter/src/components/animate-ui/primitives/effects/theme-toggler.tsx +148 -0
- package/templates/react-starter/src/components/component-example.tsx +444 -0
- package/templates/react-starter/src/components/example.tsx +56 -0
- package/templates/react-starter/src/index.css +131 -0
- package/templates/react-starter/src/main.tsx +13 -0
- package/templates/react-starter/src/providers/ThemeProvider.tsx +27 -0
- package/templates/react-starter/tsconfig.app.json +36 -0
- package/templates/react-starter/tsconfig.json +13 -0
- package/templates/react-starter/tsconfig.node.json +26 -0
- package/templates/react-starter/vite.config.ts +17 -0
- package/templates/telegram-bot/MUST-FOLLOW-GUIDELINES.md +283 -170
|
@@ -0,0 +1,444 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
|
|
3
|
+
import * as React from "react"
|
|
4
|
+
|
|
5
|
+
import {
|
|
6
|
+
Example,
|
|
7
|
+
ExampleWrapper,
|
|
8
|
+
} from "@/components/example"
|
|
9
|
+
import {
|
|
10
|
+
AlertDialog,
|
|
11
|
+
AlertDialogBackdrop,
|
|
12
|
+
AlertDialogClose,
|
|
13
|
+
AlertDialogDescription,
|
|
14
|
+
AlertDialogFooter,
|
|
15
|
+
AlertDialogHeader,
|
|
16
|
+
AlertDialogPopup,
|
|
17
|
+
AlertDialogPortal,
|
|
18
|
+
AlertDialogTitle,
|
|
19
|
+
AlertDialogTrigger,
|
|
20
|
+
Badge,
|
|
21
|
+
Button,
|
|
22
|
+
Card,
|
|
23
|
+
CardAction,
|
|
24
|
+
CardContent,
|
|
25
|
+
CardDescription,
|
|
26
|
+
CardFooter,
|
|
27
|
+
CardHeader,
|
|
28
|
+
CardTitle,
|
|
29
|
+
DropdownMenu,
|
|
30
|
+
DropdownMenuCheckboxItem,
|
|
31
|
+
DropdownMenuContent,
|
|
32
|
+
DropdownMenuGroup,
|
|
33
|
+
DropdownMenuItem,
|
|
34
|
+
DropdownMenuLabel,
|
|
35
|
+
DropdownMenuPortal,
|
|
36
|
+
DropdownMenuRadioGroup,
|
|
37
|
+
DropdownMenuRadioItem,
|
|
38
|
+
DropdownMenuSeparator,
|
|
39
|
+
DropdownMenuShortcut,
|
|
40
|
+
DropdownMenuSub,
|
|
41
|
+
DropdownMenuSubContent,
|
|
42
|
+
DropdownMenuSubTrigger,
|
|
43
|
+
DropdownMenuTrigger,
|
|
44
|
+
Field,
|
|
45
|
+
FieldGroup,
|
|
46
|
+
FieldLabel,
|
|
47
|
+
Input,
|
|
48
|
+
Select,
|
|
49
|
+
SelectContent,
|
|
50
|
+
SelectGroup,
|
|
51
|
+
SelectItem,
|
|
52
|
+
SelectTrigger,
|
|
53
|
+
SelectValue,
|
|
54
|
+
Textarea,
|
|
55
|
+
} from "@mks2508/mks-ui/react"
|
|
56
|
+
import { HugeiconsIcon } from "@hugeicons/react"
|
|
57
|
+
import { PlusSignIcon, BluetoothIcon, MoreVerticalCircle01Icon, FileIcon, FolderIcon, FolderOpenIcon, CodeIcon, MoreHorizontalCircle01Icon, SearchIcon, FloppyDiskIcon, DownloadIcon, EyeIcon, LayoutIcon, PaintBoardIcon, SunIcon, MoonIcon, ComputerIcon, UserIcon, CreditCardIcon, SettingsIcon, KeyboardIcon, LanguageCircleIcon, NotificationIcon, MailIcon, ShieldIcon, HelpCircleIcon, File01Icon, LogoutIcon } from "@hugeicons/core-free-icons"
|
|
58
|
+
|
|
59
|
+
export function ComponentExample() {
|
|
60
|
+
return (
|
|
61
|
+
<ExampleWrapper>
|
|
62
|
+
<CardExample />
|
|
63
|
+
<FormExample />
|
|
64
|
+
</ExampleWrapper>
|
|
65
|
+
)
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
function CardExample() {
|
|
69
|
+
return (
|
|
70
|
+
<Example title="Card" className="items-center justify-center">
|
|
71
|
+
<Card className="relative w-full max-w-sm overflow-hidden pt-0">
|
|
72
|
+
<div className="bg-primary absolute inset-0 z-30 aspect-video opacity-50 mix-blend-color" />
|
|
73
|
+
<img
|
|
74
|
+
src="https://images.unsplash.com/photo-1604076850742-4c7221f3101b?q=80&w=1887&auto=format&fit=crop&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D"
|
|
75
|
+
alt="Photo by mymind on Unsplash"
|
|
76
|
+
title="Photo by mymind on Unsplash"
|
|
77
|
+
className="relative z-20 aspect-video w-full object-cover brightness-60 grayscale"
|
|
78
|
+
/>
|
|
79
|
+
<CardHeader>
|
|
80
|
+
<CardTitle>Observability Plus is replacing Monitoring</CardTitle>
|
|
81
|
+
<CardDescription>
|
|
82
|
+
Switch to the improved way to explore your data, with natural
|
|
83
|
+
language. Monitoring will no longer be available on the Pro plan in
|
|
84
|
+
November, 2025
|
|
85
|
+
</CardDescription>
|
|
86
|
+
</CardHeader>
|
|
87
|
+
<CardFooter>
|
|
88
|
+
<AlertDialog>
|
|
89
|
+
<AlertDialogTrigger render={<Button />}>
|
|
90
|
+
<HugeiconsIcon icon={PlusSignIcon} strokeWidth={2} data-icon="inline-start" />
|
|
91
|
+
Show Dialog
|
|
92
|
+
</AlertDialogTrigger>
|
|
93
|
+
<AlertDialogPortal>
|
|
94
|
+
<AlertDialogBackdrop />
|
|
95
|
+
<AlertDialogPopup from="bottom" className="max-w-sm">
|
|
96
|
+
<AlertDialogHeader>
|
|
97
|
+
<div className="bg-muted mb-2 inline-flex size-10 items-center justify-center rounded-md">
|
|
98
|
+
<HugeiconsIcon icon={BluetoothIcon} strokeWidth={2} className="size-6" />
|
|
99
|
+
</div>
|
|
100
|
+
<AlertDialogTitle>Allow accessory to connect?</AlertDialogTitle>
|
|
101
|
+
<AlertDialogDescription>
|
|
102
|
+
Do you want to allow the USB accessory to connect to this
|
|
103
|
+
device?
|
|
104
|
+
</AlertDialogDescription>
|
|
105
|
+
</AlertDialogHeader>
|
|
106
|
+
<AlertDialogFooter>
|
|
107
|
+
<AlertDialogClose render={<Button variant="outline" />}>
|
|
108
|
+
Don't allow
|
|
109
|
+
</AlertDialogClose>
|
|
110
|
+
<Button>Allow</Button>
|
|
111
|
+
</AlertDialogFooter>
|
|
112
|
+
</AlertDialogPopup>
|
|
113
|
+
</AlertDialogPortal>
|
|
114
|
+
</AlertDialog>
|
|
115
|
+
<Badge variant="secondary" className="ml-auto">
|
|
116
|
+
Warning
|
|
117
|
+
</Badge>
|
|
118
|
+
</CardFooter>
|
|
119
|
+
</Card>
|
|
120
|
+
</Example>
|
|
121
|
+
)
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
const roleItems = [
|
|
125
|
+
{ label: "Developer", value: "developer" },
|
|
126
|
+
{ label: "Designer", value: "designer" },
|
|
127
|
+
{ label: "Manager", value: "manager" },
|
|
128
|
+
{ label: "Other", value: "other" },
|
|
129
|
+
]
|
|
130
|
+
|
|
131
|
+
function FormExample() {
|
|
132
|
+
const [notifications, setNotifications] = React.useState({
|
|
133
|
+
email: true,
|
|
134
|
+
sms: false,
|
|
135
|
+
push: true,
|
|
136
|
+
})
|
|
137
|
+
const [theme, setTheme] = React.useState("light")
|
|
138
|
+
|
|
139
|
+
return (
|
|
140
|
+
<Example title="Form">
|
|
141
|
+
<Card className="w-full max-w-md">
|
|
142
|
+
<CardHeader>
|
|
143
|
+
<CardTitle>User Information</CardTitle>
|
|
144
|
+
<CardDescription>Please fill in your details below</CardDescription>
|
|
145
|
+
<CardAction>
|
|
146
|
+
<DropdownMenu>
|
|
147
|
+
<DropdownMenuTrigger
|
|
148
|
+
render={<Button variant="ghost" size="icon" />}
|
|
149
|
+
>
|
|
150
|
+
<HugeiconsIcon icon={MoreVerticalCircle01Icon} strokeWidth={2} />
|
|
151
|
+
<span className="sr-only">More options</span>
|
|
152
|
+
</DropdownMenuTrigger>
|
|
153
|
+
<DropdownMenuContent align="end" className="w-56">
|
|
154
|
+
<DropdownMenuGroup>
|
|
155
|
+
<DropdownMenuLabel>File</DropdownMenuLabel>
|
|
156
|
+
<DropdownMenuItem>
|
|
157
|
+
<HugeiconsIcon icon={FileIcon} strokeWidth={2} />
|
|
158
|
+
New File
|
|
159
|
+
<DropdownMenuShortcut>⌘N</DropdownMenuShortcut>
|
|
160
|
+
</DropdownMenuItem>
|
|
161
|
+
<DropdownMenuItem>
|
|
162
|
+
<HugeiconsIcon icon={FolderIcon} strokeWidth={2} />
|
|
163
|
+
New Folder
|
|
164
|
+
<DropdownMenuShortcut>⇧⌘N</DropdownMenuShortcut>
|
|
165
|
+
</DropdownMenuItem>
|
|
166
|
+
<DropdownMenuSub>
|
|
167
|
+
<DropdownMenuSubTrigger>
|
|
168
|
+
<HugeiconsIcon icon={FolderOpenIcon} strokeWidth={2} />
|
|
169
|
+
Open Recent
|
|
170
|
+
</DropdownMenuSubTrigger>
|
|
171
|
+
<DropdownMenuPortal>
|
|
172
|
+
<DropdownMenuSubContent>
|
|
173
|
+
<DropdownMenuGroup>
|
|
174
|
+
<DropdownMenuLabel>Recent Projects</DropdownMenuLabel>
|
|
175
|
+
<DropdownMenuItem>
|
|
176
|
+
<HugeiconsIcon icon={CodeIcon} strokeWidth={2} />
|
|
177
|
+
Project Alpha
|
|
178
|
+
</DropdownMenuItem>
|
|
179
|
+
<DropdownMenuItem>
|
|
180
|
+
<HugeiconsIcon icon={CodeIcon} strokeWidth={2} />
|
|
181
|
+
Project Beta
|
|
182
|
+
</DropdownMenuItem>
|
|
183
|
+
<DropdownMenuSub>
|
|
184
|
+
<DropdownMenuSubTrigger>
|
|
185
|
+
<HugeiconsIcon icon={MoreHorizontalCircle01Icon} strokeWidth={2} />
|
|
186
|
+
More Projects
|
|
187
|
+
</DropdownMenuSubTrigger>
|
|
188
|
+
<DropdownMenuPortal>
|
|
189
|
+
<DropdownMenuSubContent>
|
|
190
|
+
<DropdownMenuItem>
|
|
191
|
+
<HugeiconsIcon icon={CodeIcon} strokeWidth={2} />
|
|
192
|
+
Project Gamma
|
|
193
|
+
</DropdownMenuItem>
|
|
194
|
+
<DropdownMenuItem>
|
|
195
|
+
<HugeiconsIcon icon={CodeIcon} strokeWidth={2} />
|
|
196
|
+
Project Delta
|
|
197
|
+
</DropdownMenuItem>
|
|
198
|
+
</DropdownMenuSubContent>
|
|
199
|
+
</DropdownMenuPortal>
|
|
200
|
+
</DropdownMenuSub>
|
|
201
|
+
</DropdownMenuGroup>
|
|
202
|
+
<DropdownMenuSeparator />
|
|
203
|
+
<DropdownMenuGroup>
|
|
204
|
+
<DropdownMenuItem>
|
|
205
|
+
<HugeiconsIcon icon={SearchIcon} strokeWidth={2} />
|
|
206
|
+
Browse...
|
|
207
|
+
</DropdownMenuItem>
|
|
208
|
+
</DropdownMenuGroup>
|
|
209
|
+
</DropdownMenuSubContent>
|
|
210
|
+
</DropdownMenuPortal>
|
|
211
|
+
</DropdownMenuSub>
|
|
212
|
+
<DropdownMenuSeparator />
|
|
213
|
+
<DropdownMenuItem>
|
|
214
|
+
<HugeiconsIcon icon={FloppyDiskIcon} strokeWidth={2} />
|
|
215
|
+
Save
|
|
216
|
+
<DropdownMenuShortcut>⌘S</DropdownMenuShortcut>
|
|
217
|
+
</DropdownMenuItem>
|
|
218
|
+
<DropdownMenuItem>
|
|
219
|
+
<HugeiconsIcon icon={DownloadIcon} strokeWidth={2} />
|
|
220
|
+
Export
|
|
221
|
+
<DropdownMenuShortcut>⇧⌘E</DropdownMenuShortcut>
|
|
222
|
+
</DropdownMenuItem>
|
|
223
|
+
</DropdownMenuGroup>
|
|
224
|
+
<DropdownMenuSeparator />
|
|
225
|
+
<DropdownMenuGroup>
|
|
226
|
+
<DropdownMenuLabel>View</DropdownMenuLabel>
|
|
227
|
+
<DropdownMenuCheckboxItem
|
|
228
|
+
checked={notifications.email}
|
|
229
|
+
onCheckedChange={(checked) =>
|
|
230
|
+
setNotifications({
|
|
231
|
+
...notifications,
|
|
232
|
+
email: checked === true,
|
|
233
|
+
})
|
|
234
|
+
}
|
|
235
|
+
>
|
|
236
|
+
<HugeiconsIcon icon={EyeIcon} strokeWidth={2} />
|
|
237
|
+
Show Sidebar
|
|
238
|
+
</DropdownMenuCheckboxItem>
|
|
239
|
+
<DropdownMenuCheckboxItem
|
|
240
|
+
checked={notifications.sms}
|
|
241
|
+
onCheckedChange={(checked) =>
|
|
242
|
+
setNotifications({
|
|
243
|
+
...notifications,
|
|
244
|
+
sms: checked === true,
|
|
245
|
+
})
|
|
246
|
+
}
|
|
247
|
+
>
|
|
248
|
+
<HugeiconsIcon icon={LayoutIcon} strokeWidth={2} />
|
|
249
|
+
Show Status Bar
|
|
250
|
+
</DropdownMenuCheckboxItem>
|
|
251
|
+
<DropdownMenuSub>
|
|
252
|
+
<DropdownMenuSubTrigger>
|
|
253
|
+
<HugeiconsIcon icon={PaintBoardIcon} strokeWidth={2} />
|
|
254
|
+
Theme
|
|
255
|
+
</DropdownMenuSubTrigger>
|
|
256
|
+
<DropdownMenuPortal>
|
|
257
|
+
<DropdownMenuSubContent>
|
|
258
|
+
<DropdownMenuGroup>
|
|
259
|
+
<DropdownMenuLabel>Appearance</DropdownMenuLabel>
|
|
260
|
+
<DropdownMenuRadioGroup
|
|
261
|
+
value={theme}
|
|
262
|
+
onValueChange={setTheme}
|
|
263
|
+
>
|
|
264
|
+
<DropdownMenuRadioItem value="light">
|
|
265
|
+
<HugeiconsIcon icon={SunIcon} strokeWidth={2} />
|
|
266
|
+
Light
|
|
267
|
+
</DropdownMenuRadioItem>
|
|
268
|
+
<DropdownMenuRadioItem value="dark">
|
|
269
|
+
<HugeiconsIcon icon={MoonIcon} strokeWidth={2} />
|
|
270
|
+
Dark
|
|
271
|
+
</DropdownMenuRadioItem>
|
|
272
|
+
<DropdownMenuRadioItem value="system">
|
|
273
|
+
<HugeiconsIcon icon={ComputerIcon} strokeWidth={2} />
|
|
274
|
+
System
|
|
275
|
+
</DropdownMenuRadioItem>
|
|
276
|
+
</DropdownMenuRadioGroup>
|
|
277
|
+
</DropdownMenuGroup>
|
|
278
|
+
</DropdownMenuSubContent>
|
|
279
|
+
</DropdownMenuPortal>
|
|
280
|
+
</DropdownMenuSub>
|
|
281
|
+
</DropdownMenuGroup>
|
|
282
|
+
<DropdownMenuSeparator />
|
|
283
|
+
<DropdownMenuGroup>
|
|
284
|
+
<DropdownMenuLabel>Account</DropdownMenuLabel>
|
|
285
|
+
<DropdownMenuItem>
|
|
286
|
+
<HugeiconsIcon icon={UserIcon} strokeWidth={2} />
|
|
287
|
+
Profile
|
|
288
|
+
<DropdownMenuShortcut>⇧⌘P</DropdownMenuShortcut>
|
|
289
|
+
</DropdownMenuItem>
|
|
290
|
+
<DropdownMenuItem>
|
|
291
|
+
<HugeiconsIcon icon={CreditCardIcon} strokeWidth={2} />
|
|
292
|
+
Billing
|
|
293
|
+
</DropdownMenuItem>
|
|
294
|
+
<DropdownMenuSub>
|
|
295
|
+
<DropdownMenuSubTrigger>
|
|
296
|
+
<HugeiconsIcon icon={SettingsIcon} strokeWidth={2} />
|
|
297
|
+
Settings
|
|
298
|
+
</DropdownMenuSubTrigger>
|
|
299
|
+
<DropdownMenuPortal>
|
|
300
|
+
<DropdownMenuSubContent>
|
|
301
|
+
<DropdownMenuGroup>
|
|
302
|
+
<DropdownMenuLabel>Preferences</DropdownMenuLabel>
|
|
303
|
+
<DropdownMenuItem>
|
|
304
|
+
<HugeiconsIcon icon={KeyboardIcon} strokeWidth={2} />
|
|
305
|
+
Keyboard Shortcuts
|
|
306
|
+
</DropdownMenuItem>
|
|
307
|
+
<DropdownMenuItem>
|
|
308
|
+
<HugeiconsIcon icon={LanguageCircleIcon} strokeWidth={2} />
|
|
309
|
+
Language
|
|
310
|
+
</DropdownMenuItem>
|
|
311
|
+
<DropdownMenuSub>
|
|
312
|
+
<DropdownMenuSubTrigger>
|
|
313
|
+
<HugeiconsIcon icon={NotificationIcon} strokeWidth={2} />
|
|
314
|
+
Notifications
|
|
315
|
+
</DropdownMenuSubTrigger>
|
|
316
|
+
<DropdownMenuPortal>
|
|
317
|
+
<DropdownMenuSubContent>
|
|
318
|
+
<DropdownMenuGroup>
|
|
319
|
+
<DropdownMenuLabel>
|
|
320
|
+
Notification Types
|
|
321
|
+
</DropdownMenuLabel>
|
|
322
|
+
<DropdownMenuCheckboxItem
|
|
323
|
+
checked={notifications.push}
|
|
324
|
+
onCheckedChange={(checked) =>
|
|
325
|
+
setNotifications({
|
|
326
|
+
...notifications,
|
|
327
|
+
push: checked === true,
|
|
328
|
+
})
|
|
329
|
+
}
|
|
330
|
+
>
|
|
331
|
+
<HugeiconsIcon icon={NotificationIcon} strokeWidth={2} />
|
|
332
|
+
Push Notifications
|
|
333
|
+
</DropdownMenuCheckboxItem>
|
|
334
|
+
<DropdownMenuCheckboxItem
|
|
335
|
+
checked={notifications.email}
|
|
336
|
+
onCheckedChange={(checked) =>
|
|
337
|
+
setNotifications({
|
|
338
|
+
...notifications,
|
|
339
|
+
email: checked === true,
|
|
340
|
+
})
|
|
341
|
+
}
|
|
342
|
+
>
|
|
343
|
+
<HugeiconsIcon icon={MailIcon} strokeWidth={2} />
|
|
344
|
+
Email Notifications
|
|
345
|
+
</DropdownMenuCheckboxItem>
|
|
346
|
+
</DropdownMenuGroup>
|
|
347
|
+
</DropdownMenuSubContent>
|
|
348
|
+
</DropdownMenuPortal>
|
|
349
|
+
</DropdownMenuSub>
|
|
350
|
+
</DropdownMenuGroup>
|
|
351
|
+
<DropdownMenuSeparator />
|
|
352
|
+
<DropdownMenuGroup>
|
|
353
|
+
<DropdownMenuItem>
|
|
354
|
+
<HugeiconsIcon icon={ShieldIcon} strokeWidth={2} />
|
|
355
|
+
Privacy & Security
|
|
356
|
+
</DropdownMenuItem>
|
|
357
|
+
</DropdownMenuGroup>
|
|
358
|
+
</DropdownMenuSubContent>
|
|
359
|
+
</DropdownMenuPortal>
|
|
360
|
+
</DropdownMenuSub>
|
|
361
|
+
</DropdownMenuGroup>
|
|
362
|
+
<DropdownMenuSeparator />
|
|
363
|
+
<DropdownMenuGroup>
|
|
364
|
+
<DropdownMenuItem>
|
|
365
|
+
<HugeiconsIcon icon={HelpCircleIcon} strokeWidth={2} />
|
|
366
|
+
Help & Support
|
|
367
|
+
</DropdownMenuItem>
|
|
368
|
+
<DropdownMenuItem>
|
|
369
|
+
<HugeiconsIcon icon={File01Icon} strokeWidth={2} />
|
|
370
|
+
Documentation
|
|
371
|
+
</DropdownMenuItem>
|
|
372
|
+
</DropdownMenuGroup>
|
|
373
|
+
<DropdownMenuSeparator />
|
|
374
|
+
<DropdownMenuGroup>
|
|
375
|
+
<DropdownMenuItem variant="destructive">
|
|
376
|
+
<HugeiconsIcon icon={LogoutIcon} strokeWidth={2} />
|
|
377
|
+
Sign Out
|
|
378
|
+
<DropdownMenuShortcut>⇧⌘Q</DropdownMenuShortcut>
|
|
379
|
+
</DropdownMenuItem>
|
|
380
|
+
</DropdownMenuGroup>
|
|
381
|
+
</DropdownMenuContent>
|
|
382
|
+
</DropdownMenu>
|
|
383
|
+
</CardAction>
|
|
384
|
+
</CardHeader>
|
|
385
|
+
<CardContent>
|
|
386
|
+
<form>
|
|
387
|
+
<FieldGroup>
|
|
388
|
+
<div className="grid grid-cols-2 gap-4">
|
|
389
|
+
<Field>
|
|
390
|
+
<FieldLabel htmlFor="small-form-name">Name</FieldLabel>
|
|
391
|
+
<Input
|
|
392
|
+
id="small-form-name"
|
|
393
|
+
placeholder="Enter your name"
|
|
394
|
+
required
|
|
395
|
+
/>
|
|
396
|
+
</Field>
|
|
397
|
+
<Field>
|
|
398
|
+
<FieldLabel htmlFor="small-form-role">Role</FieldLabel>
|
|
399
|
+
<Select items={roleItems} defaultValue={null}>
|
|
400
|
+
<SelectTrigger id="small-form-role">
|
|
401
|
+
<SelectValue />
|
|
402
|
+
</SelectTrigger>
|
|
403
|
+
<SelectContent>
|
|
404
|
+
<SelectGroup>
|
|
405
|
+
{roleItems.map((item) => (
|
|
406
|
+
<SelectItem key={item.value} value={item.value}>
|
|
407
|
+
{item.label}
|
|
408
|
+
</SelectItem>
|
|
409
|
+
))}
|
|
410
|
+
</SelectGroup>
|
|
411
|
+
</SelectContent>
|
|
412
|
+
</Select>
|
|
413
|
+
</Field>
|
|
414
|
+
</div>
|
|
415
|
+
<Field>
|
|
416
|
+
<FieldLabel htmlFor="small-form-framework">
|
|
417
|
+
Framework
|
|
418
|
+
</FieldLabel>
|
|
419
|
+
<Input
|
|
420
|
+
id="small-form-framework"
|
|
421
|
+
placeholder="Select a framework"
|
|
422
|
+
required
|
|
423
|
+
/>
|
|
424
|
+
</Field>
|
|
425
|
+
<Field>
|
|
426
|
+
<FieldLabel htmlFor="small-form-comments">Comments</FieldLabel>
|
|
427
|
+
<Textarea
|
|
428
|
+
id="small-form-comments"
|
|
429
|
+
placeholder="Add any additional comments"
|
|
430
|
+
/>
|
|
431
|
+
</Field>
|
|
432
|
+
<Field orientation="horizontal">
|
|
433
|
+
<Button type="submit">Submit</Button>
|
|
434
|
+
<Button variant="outline" type="button">
|
|
435
|
+
Cancel
|
|
436
|
+
</Button>
|
|
437
|
+
</Field>
|
|
438
|
+
</FieldGroup>
|
|
439
|
+
</form>
|
|
440
|
+
</CardContent>
|
|
441
|
+
</Card>
|
|
442
|
+
</Example>
|
|
443
|
+
)
|
|
444
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { cn } from "@mks2508/mks-ui/react"
|
|
2
|
+
|
|
3
|
+
function ExampleWrapper({ className, ...props }: React.ComponentProps<"div">) {
|
|
4
|
+
return (
|
|
5
|
+
<div className="bg-background w-full">
|
|
6
|
+
<div
|
|
7
|
+
data-slot="example-wrapper"
|
|
8
|
+
className={cn(
|
|
9
|
+
"mx-auto grid min-h-screen w-full max-w-5xl min-w-0 content-center items-start gap-8 p-4 pt-2 sm:gap-12 sm:p-6 md:grid-cols-2 md:gap-8 lg:p-12 2xl:max-w-6xl",
|
|
10
|
+
|
|
11
|
+
className
|
|
12
|
+
)}
|
|
13
|
+
{...props}
|
|
14
|
+
/>
|
|
15
|
+
</div>
|
|
16
|
+
)
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
function Example({
|
|
20
|
+
title,
|
|
21
|
+
children,
|
|
22
|
+
className,
|
|
23
|
+
containerClassName,
|
|
24
|
+
...props
|
|
25
|
+
}: React.ComponentProps<"div"> & {
|
|
26
|
+
title?: string
|
|
27
|
+
containerClassName?: string
|
|
28
|
+
}) {
|
|
29
|
+
return (
|
|
30
|
+
<div
|
|
31
|
+
data-slot="example"
|
|
32
|
+
className={cn(
|
|
33
|
+
"mx-auto flex w-full max-w-lg min-w-0 flex-col gap-1 self-stretch lg:max-w-none",
|
|
34
|
+
containerClassName
|
|
35
|
+
)}
|
|
36
|
+
{...props}
|
|
37
|
+
>
|
|
38
|
+
{title && (
|
|
39
|
+
<div className="text-muted-foreground px-1.5 py-2 text-xs font-medium">
|
|
40
|
+
{title}
|
|
41
|
+
</div>
|
|
42
|
+
)}
|
|
43
|
+
<div
|
|
44
|
+
data-slot="example-content"
|
|
45
|
+
className={cn(
|
|
46
|
+
"bg-background text-foreground flex min-w-0 flex-1 flex-col items-start gap-6 border border-dashed p-4 sm:p-6 *:[div:not([class*='w-'])]:w-full",
|
|
47
|
+
className
|
|
48
|
+
)}
|
|
49
|
+
>
|
|
50
|
+
{children}
|
|
51
|
+
</div>
|
|
52
|
+
</div>
|
|
53
|
+
)
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export { ExampleWrapper, Example }
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
@import "tailwindcss";
|
|
2
|
+
@import "tw-animate-css";
|
|
3
|
+
@import "shadcn/tailwind.css";
|
|
4
|
+
@import "@fontsource-variable/geist-mono";
|
|
5
|
+
|
|
6
|
+
@source "../node_modules/@mks2508/mks-ui/dist";
|
|
7
|
+
|
|
8
|
+
@custom-variant dark (&:is(.dark *));
|
|
9
|
+
|
|
10
|
+
:root {
|
|
11
|
+
--background: oklch(1 0 0);
|
|
12
|
+
--foreground: oklch(0.145 0 0);
|
|
13
|
+
--card: oklch(1 0 0);
|
|
14
|
+
--card-foreground: oklch(0.145 0 0);
|
|
15
|
+
--popover: oklch(1 0 0);
|
|
16
|
+
--popover-foreground: oklch(0.145 0 0);
|
|
17
|
+
--primary: oklch(0.577 0.245 27.325);
|
|
18
|
+
--primary-foreground: oklch(0.971 0.013 17.38);
|
|
19
|
+
--secondary: oklch(0.967 0.001 286.375);
|
|
20
|
+
--secondary-foreground: oklch(0.21 0.006 285.885);
|
|
21
|
+
--muted: oklch(0.97 0 0);
|
|
22
|
+
--muted-foreground: oklch(0.556 0 0);
|
|
23
|
+
--accent: oklch(0.97 0 0);
|
|
24
|
+
--accent-foreground: oklch(0.205 0 0);
|
|
25
|
+
--destructive: oklch(0.58 0.22 27);
|
|
26
|
+
--border: oklch(0.922 0 0);
|
|
27
|
+
--input: oklch(0.922 0 0);
|
|
28
|
+
--ring: oklch(0.708 0 0);
|
|
29
|
+
--chart-1: oklch(0.808 0.114 19.571);
|
|
30
|
+
--chart-2: oklch(0.637 0.237 25.331);
|
|
31
|
+
--chart-3: oklch(0.577 0.245 27.325);
|
|
32
|
+
--chart-4: oklch(0.505 0.213 27.518);
|
|
33
|
+
--chart-5: oklch(0.444 0.177 26.899);
|
|
34
|
+
--radius: 0.625rem;
|
|
35
|
+
--sidebar: oklch(0.985 0 0);
|
|
36
|
+
--sidebar-foreground: oklch(0.145 0 0);
|
|
37
|
+
--sidebar-primary: oklch(0.577 0.245 27.325);
|
|
38
|
+
--sidebar-primary-foreground: oklch(0.971 0.013 17.38);
|
|
39
|
+
--sidebar-accent: oklch(0.97 0 0);
|
|
40
|
+
--sidebar-accent-foreground: oklch(0.205 0 0);
|
|
41
|
+
--sidebar-border: oklch(0.922 0 0);
|
|
42
|
+
--sidebar-ring: oklch(0.708 0 0);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.dark {
|
|
46
|
+
--background: oklch(0.145 0 0);
|
|
47
|
+
--foreground: oklch(0.985 0 0);
|
|
48
|
+
--card: oklch(0.205 0 0);
|
|
49
|
+
--card-foreground: oklch(0.985 0 0);
|
|
50
|
+
--popover: oklch(0.205 0 0);
|
|
51
|
+
--popover-foreground: oklch(0.985 0 0);
|
|
52
|
+
--primary: oklch(0.637 0.237 25.331);
|
|
53
|
+
--primary-foreground: oklch(0.971 0.013 17.38);
|
|
54
|
+
--secondary: oklch(0.274 0.006 286.033);
|
|
55
|
+
--secondary-foreground: oklch(0.985 0 0);
|
|
56
|
+
--muted: oklch(0.269 0 0);
|
|
57
|
+
--muted-foreground: oklch(0.708 0 0);
|
|
58
|
+
--accent: oklch(0.371 0 0);
|
|
59
|
+
--accent-foreground: oklch(0.985 0 0);
|
|
60
|
+
--destructive: oklch(0.704 0.191 22.216);
|
|
61
|
+
--border: oklch(1 0 0 / 10%);
|
|
62
|
+
--input: oklch(1 0 0 / 15%);
|
|
63
|
+
--ring: oklch(0.556 0 0);
|
|
64
|
+
--chart-1: oklch(0.808 0.114 19.571);
|
|
65
|
+
--chart-2: oklch(0.637 0.237 25.331);
|
|
66
|
+
--chart-3: oklch(0.577 0.245 27.325);
|
|
67
|
+
--chart-4: oklch(0.505 0.213 27.518);
|
|
68
|
+
--chart-5: oklch(0.444 0.177 26.899);
|
|
69
|
+
--sidebar: oklch(0.205 0 0);
|
|
70
|
+
--sidebar-foreground: oklch(0.985 0 0);
|
|
71
|
+
--sidebar-primary: oklch(0.637 0.237 25.331);
|
|
72
|
+
--sidebar-primary-foreground: oklch(0.971 0.013 17.38);
|
|
73
|
+
--sidebar-accent: oklch(0.269 0 0);
|
|
74
|
+
--sidebar-accent-foreground: oklch(0.985 0 0);
|
|
75
|
+
--sidebar-border: oklch(1 0 0 / 10%);
|
|
76
|
+
--sidebar-ring: oklch(0.556 0 0);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
@theme inline {
|
|
80
|
+
--font-mono: 'Geist Mono Variable', monospace;
|
|
81
|
+
--color-sidebar-ring: var(--sidebar-ring);
|
|
82
|
+
--color-sidebar-border: var(--sidebar-border);
|
|
83
|
+
--color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
|
|
84
|
+
--color-sidebar-accent: var(--sidebar-accent);
|
|
85
|
+
--color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
|
|
86
|
+
--color-sidebar-primary: var(--sidebar-primary);
|
|
87
|
+
--color-sidebar-foreground: var(--sidebar-foreground);
|
|
88
|
+
--color-sidebar: var(--sidebar);
|
|
89
|
+
--color-chart-5: var(--chart-5);
|
|
90
|
+
--color-chart-4: var(--chart-4);
|
|
91
|
+
--color-chart-3: var(--chart-3);
|
|
92
|
+
--color-chart-2: var(--chart-2);
|
|
93
|
+
--color-chart-1: var(--chart-1);
|
|
94
|
+
--color-ring: var(--ring);
|
|
95
|
+
--color-input: var(--input);
|
|
96
|
+
--color-border: var(--border);
|
|
97
|
+
--color-destructive: var(--destructive);
|
|
98
|
+
--color-accent-foreground: var(--accent-foreground);
|
|
99
|
+
--color-accent: var(--accent);
|
|
100
|
+
--color-muted-foreground: var(--muted-foreground);
|
|
101
|
+
--color-muted: var(--muted);
|
|
102
|
+
--color-secondary-foreground: var(--secondary-foreground);
|
|
103
|
+
--color-secondary: var(--secondary);
|
|
104
|
+
--color-primary-foreground: var(--primary-foreground);
|
|
105
|
+
--color-primary: var(--primary);
|
|
106
|
+
--color-popover-foreground: var(--popover-foreground);
|
|
107
|
+
--color-popover: var(--popover);
|
|
108
|
+
--color-card-foreground: var(--card-foreground);
|
|
109
|
+
--color-card: var(--card);
|
|
110
|
+
--color-foreground: var(--foreground);
|
|
111
|
+
--color-background: var(--background);
|
|
112
|
+
--radius-sm: calc(var(--radius) - 4px);
|
|
113
|
+
--radius-md: calc(var(--radius) - 2px);
|
|
114
|
+
--radius-lg: var(--radius);
|
|
115
|
+
--radius-xl: calc(var(--radius) + 4px);
|
|
116
|
+
--radius-2xl: calc(var(--radius) + 8px);
|
|
117
|
+
--radius-3xl: calc(var(--radius) + 12px);
|
|
118
|
+
--radius-4xl: calc(var(--radius) + 16px);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
@layer base {
|
|
122
|
+
* {
|
|
123
|
+
@apply border-border outline-ring/50;
|
|
124
|
+
}
|
|
125
|
+
body {
|
|
126
|
+
@apply font-sans bg-background text-foreground;
|
|
127
|
+
}
|
|
128
|
+
html {
|
|
129
|
+
@apply font-sans;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { StrictMode } from 'react'
|
|
2
|
+
import { createRoot } from 'react-dom/client'
|
|
3
|
+
import './index.css'
|
|
4
|
+
import { AppThemeProvider } from './providers/ThemeProvider'
|
|
5
|
+
import App from './App.tsx'
|
|
6
|
+
|
|
7
|
+
createRoot(document.getElementById('root')!).render(
|
|
8
|
+
<StrictMode>
|
|
9
|
+
<AppThemeProvider>
|
|
10
|
+
<App />
|
|
11
|
+
</AppThemeProvider>
|
|
12
|
+
</StrictMode>,
|
|
13
|
+
)
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { ThemeProvider } from '@mks2508/theme-manager-react';
|
|
2
|
+
import type { ReactNode } from 'react';
|
|
3
|
+
|
|
4
|
+
interface ThemeProviderProps {
|
|
5
|
+
children?: ReactNode;
|
|
6
|
+
defaultTheme?: string;
|
|
7
|
+
defaultMode?: 'light' | 'dark' | 'auto';
|
|
8
|
+
enableTransitions?: boolean;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export function AppThemeProvider({
|
|
12
|
+
children,
|
|
13
|
+
defaultTheme = 'synthwave84',
|
|
14
|
+
defaultMode = 'auto',
|
|
15
|
+
enableTransitions = true
|
|
16
|
+
}: ThemeProviderProps) {
|
|
17
|
+
return (
|
|
18
|
+
<ThemeProvider
|
|
19
|
+
registryUrl="/registry.json"
|
|
20
|
+
defaultTheme={defaultTheme}
|
|
21
|
+
defaultMode={defaultMode}
|
|
22
|
+
enableTransitions={enableTransitions}
|
|
23
|
+
>
|
|
24
|
+
{children}
|
|
25
|
+
</ThemeProvider>
|
|
26
|
+
);
|
|
27
|
+
}
|