shadcn-theme-menu 1.1.2 → 1.1.6

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.
@@ -0,0 +1,149 @@
1
+ "use client";
2
+ import { DropdownMenu as e, DropdownMenuContent as t, DropdownMenuItem as n, DropdownMenuPortal as r, DropdownMenuSeparator as i, DropdownMenuSub as a, DropdownMenuSubContent as o, DropdownMenuSubTrigger as s, DropdownMenuTrigger as c } from "./components/ui/dropdown-menu.js";
3
+ import { formatThemeName as l, themeColors as u, themeNames as d } from "./theme-dropdown.js";
4
+ import f from "./cinematic-theme-switcher.js";
5
+ import { SidebarMenu as p, SidebarMenuButton as m, SidebarMenuItem as h } from "./components/ui/sidebar.js";
6
+ import { Avatar as g, AvatarFallback as _, AvatarImage as v } from "./components/ui/avatar.js";
7
+ import { Fragment as y, jsx as b, jsxs as x } from "react/jsx-runtime";
8
+ import { Bell as S, ChevronUp as C, CreditCard as w, LogOut as T, Palette as E, User2 as D } from "lucide-react";
9
+ import * as O from "react";
10
+ //#region src/sidebar-user-menu.tsx
11
+ function k({ trigger: e }) {
12
+ return /* @__PURE__ */ b(y, { children: e });
13
+ }
14
+ function A({ user: y, onSignOut: A } = {}) {
15
+ let j = y || {
16
+ name: "Guest User",
17
+ email: "guest@example.com",
18
+ image: null
19
+ }, [M, N] = O.useState("minimal"), [P, F] = O.useState(!1), [I, L] = O.useState(null);
20
+ O.useEffect(() => {
21
+ F(!0);
22
+ let e = localStorage.getItem("color-theme");
23
+ e && d.includes(e) && N(e);
24
+ }, []);
25
+ let R = (e) => {
26
+ N(e), localStorage.setItem("color-theme", e), document.cookie = `color-theme=${e}; path=/; max-age=31536000`, d.forEach((e) => document.documentElement.classList.remove(`theme-${e}`)), document.documentElement.classList.add(`theme-${e}`), L(null);
27
+ }, z = (e) => {
28
+ L(e), d.forEach((e) => document.documentElement.classList.remove(`theme-${e}`)), document.documentElement.classList.add(`theme-${e}`);
29
+ }, B = () => {
30
+ I && (d.forEach((e) => document.documentElement.classList.remove(`theme-${e}`)), document.documentElement.classList.add(`theme-${M}`), L(null));
31
+ }, V = j.name?.split(" ").map((e) => e[0]).join("").toUpperCase().substring(0, 2) || "GU";
32
+ return /* @__PURE__ */ b(p, { children: /* @__PURE__ */ b(h, { children: /* @__PURE__ */ x(e, {
33
+ onOpenChange: (e) => !e && B(),
34
+ children: [/* @__PURE__ */ b(c, {
35
+ asChild: !0,
36
+ children: /* @__PURE__ */ x(m, {
37
+ size: "lg",
38
+ className: "data-[state=open]:bg-sidebar-accent data-[state=open]:text-sidebar-accent-foreground",
39
+ children: [
40
+ /* @__PURE__ */ x(g, {
41
+ className: "h-8 w-8 rounded-lg",
42
+ children: [/* @__PURE__ */ b(v, {
43
+ src: j.image || void 0,
44
+ alt: j.name || "User"
45
+ }), /* @__PURE__ */ b(_, {
46
+ className: "rounded-lg",
47
+ children: V
48
+ })]
49
+ }),
50
+ /* @__PURE__ */ x("div", {
51
+ className: "grid flex-1 text-left text-sm leading-tight group-data-[collapsible=icon]:hidden",
52
+ children: [/* @__PURE__ */ b("span", {
53
+ className: "truncate font-semibold",
54
+ children: j.name || "Guest"
55
+ }), /* @__PURE__ */ b("span", {
56
+ className: "truncate text-xs text-muted-foreground",
57
+ children: j.email
58
+ })]
59
+ }),
60
+ /* @__PURE__ */ b(C, { className: "ml-2 size-4 group-data-[collapsible=icon]:hidden" })
61
+ ]
62
+ })
63
+ }), /* @__PURE__ */ x(t, {
64
+ className: "w-[--radix-dropdown-menu-trigger-width] min-w-56 rounded-lg",
65
+ side: "bottom",
66
+ align: "end",
67
+ sideOffset: 4,
68
+ children: [
69
+ /* @__PURE__ */ x("div", {
70
+ className: "flex items-center gap-2 px-1 py-1.5 text-left text-sm",
71
+ children: [/* @__PURE__ */ x(g, {
72
+ className: "h-8 w-8 rounded-lg",
73
+ children: [/* @__PURE__ */ b(v, {
74
+ src: j.image || void 0,
75
+ alt: j.name || "User"
76
+ }), /* @__PURE__ */ b(_, {
77
+ className: "rounded-lg",
78
+ children: V
79
+ })]
80
+ }), /* @__PURE__ */ x("div", {
81
+ className: "grid flex-1 text-left text-sm leading-tight",
82
+ children: [/* @__PURE__ */ b("span", {
83
+ className: "truncate font-semibold",
84
+ children: j.name || "Guest"
85
+ }), /* @__PURE__ */ b("span", {
86
+ className: "truncate text-xs text-muted-foreground",
87
+ children: j.email
88
+ })]
89
+ })]
90
+ }),
91
+ /* @__PURE__ */ b(i, {}),
92
+ /* @__PURE__ */ b(k, { trigger: /* @__PURE__ */ x(n, {
93
+ onSelect: (e) => e.preventDefault(),
94
+ children: [/* @__PURE__ */ b(D, { className: "mr-2 h-4 w-4" }), "Profile"]
95
+ }) }),
96
+ /* @__PURE__ */ x(n, { children: [/* @__PURE__ */ b(w, { className: "mr-2 h-4 w-4" }), "Billing"] }),
97
+ /* @__PURE__ */ x(n, { children: [/* @__PURE__ */ b(S, { className: "mr-2 h-4 w-4" }), "Notifications"] }),
98
+ /* @__PURE__ */ b(i, {}),
99
+ /* @__PURE__ */ x(a, { children: [/* @__PURE__ */ x(s, { children: [/* @__PURE__ */ b(E, { className: "mr-2 h-4 w-4" }), /* @__PURE__ */ b("span", { children: "Color Theme" })] }), /* @__PURE__ */ b(r, { children: /* @__PURE__ */ x(o, {
100
+ className: "max-h-[400px] overflow-y-auto",
101
+ children: [
102
+ /* @__PURE__ */ b("div", {
103
+ className: "px-2 py-1.5 flex items-center justify-center",
104
+ children: /* @__PURE__ */ b(f, {})
105
+ }),
106
+ /* @__PURE__ */ b(i, {}),
107
+ d.map((e) => {
108
+ let t = u[e];
109
+ return /* @__PURE__ */ b(n, {
110
+ onClick: () => R(e),
111
+ onMouseEnter: () => z(e),
112
+ onMouseLeave: B,
113
+ className: M === e ? "bg-accent" : "",
114
+ children: /* @__PURE__ */ x("div", {
115
+ className: "flex items-center justify-between w-full",
116
+ children: [/* @__PURE__ */ x("div", {
117
+ className: "flex items-center gap-2",
118
+ children: [t && /* @__PURE__ */ x("div", {
119
+ className: "flex items-center gap-1",
120
+ children: [/* @__PURE__ */ b("div", {
121
+ className: "w-3 h-3 rounded-full border border-border",
122
+ style: { backgroundColor: t.primary }
123
+ }), /* @__PURE__ */ b("div", {
124
+ className: "w-3 h-3 rounded-full border border-border",
125
+ style: { backgroundColor: t.secondary }
126
+ })]
127
+ }), /* @__PURE__ */ b("span", { children: l(e) })]
128
+ }), M === e && /* @__PURE__ */ b("span", {
129
+ className: "text-xs",
130
+ children: "✓"
131
+ })]
132
+ })
133
+ }, e);
134
+ })
135
+ ]
136
+ }) })] }),
137
+ /* @__PURE__ */ b(i, {}),
138
+ /* @__PURE__ */ x(n, {
139
+ onClick: async () => {
140
+ await A?.();
141
+ },
142
+ children: [/* @__PURE__ */ b(T, { className: "mr-2 h-4 w-4" }), "Sign out"]
143
+ })
144
+ ]
145
+ })]
146
+ }) }) });
147
+ }
148
+ //#endregion
149
+ export { A as SidebarUserMenu };
@@ -0,0 +1,488 @@
1
+ "use client";
2
+ import { Button as e } from "./components/ui/button.js";
3
+ import { DropdownMenu as t, DropdownMenuContent as n, DropdownMenuItem as r, DropdownMenuLabel as i, DropdownMenuSeparator as a, DropdownMenuTrigger as o } from "./components/ui/dropdown-menu.js";
4
+ import { useTheme as s } from "next-themes";
5
+ import { jsx as c, jsxs as l } from "react/jsx-runtime";
6
+ import { Monitor as u, Moon as d, Palette as f, Sun as p } from "lucide-react";
7
+ import { useEffect as m, useState as h } from "react";
8
+ //#region src/theme-dropdown.tsx
9
+ var g = /* @__PURE__ */ "dark.light.midnight.ocean.forest.sunset.rose.amber.violet.slate.emerald.sky.crimson.vscode.slack.x.githubdark.githublight.discord.notion.linear.spotify.dracula.nord.solarized.monokai.jiradark.trellodark.youtubedark.googledark.whatsappdark.minimal.luxury.cyberpunk.twitter.mocha.bubblegum.amethyst.lemonade.notebook.doom64.catppuccin.graphite.perpetuity.kodama.cosmic.tangerine.quantum.nature.boldtech.ambermin.supabase.brutalism.solardusk.claymorphism.pastel.cleanslate.caffeine.breeze.retro.bloom.candyland.aurora.vintage.horizon.starry.claude.vercel.mono".split("."), _ = {
10
+ dark: "Dark",
11
+ light: "Light",
12
+ midnight: "Midnight",
13
+ ocean: "Ocean",
14
+ forest: "Forest",
15
+ sunset: "Sunset",
16
+ rose: "Rose",
17
+ amber: "Amber",
18
+ violet: "Violet",
19
+ slate: "Slate",
20
+ emerald: "Emerald",
21
+ sky: "Sky",
22
+ crimson: "Crimson",
23
+ vscode: "VS Code",
24
+ slack: "Slack",
25
+ x: "X",
26
+ githubdark: "Github Dark",
27
+ githublight: "Github Light",
28
+ discord: "Discord",
29
+ notion: "Notion",
30
+ linear: "Linear",
31
+ spotify: "Spotify",
32
+ dracula: "Dracula",
33
+ nord: "Nord",
34
+ solarized: "Solarized",
35
+ monokai: "Monokai",
36
+ jiradark: "Jira Dark",
37
+ trellodark: "Trello Dark",
38
+ youtubedark: "YouTube Dark",
39
+ googledark: "Google Dark",
40
+ whatsappdark: "WhatsApp Dark",
41
+ minimal: "Minimal",
42
+ luxury: "Luxury",
43
+ cyberpunk: "Cyberpunk",
44
+ twitter: "Twitter",
45
+ mocha: "Mocha",
46
+ bubblegum: "Bubblegum",
47
+ amethyst: "Amethyst",
48
+ lemonade: "Lemonade",
49
+ notebook: "Notebook",
50
+ doom64: "Doom 64",
51
+ catppuccin: "Catppuccin",
52
+ graphite: "Graphite",
53
+ perpetuity: "Perpetuity",
54
+ kodama: "Kodama",
55
+ cosmic: "Cosmic",
56
+ tangerine: "Tangerine",
57
+ quantum: "Quantum",
58
+ nature: "Nature",
59
+ boldtech: "Bold Tech",
60
+ ambermin: "Amber Min",
61
+ supabase: "Supabase",
62
+ brutalism: "Brutalism",
63
+ solardusk: "Solar Dusk",
64
+ claymorphism: "Claymorphism",
65
+ pastel: "Pastel",
66
+ cleanslate: "Clean Slate",
67
+ caffeine: "Caffeine",
68
+ breeze: "Breeze",
69
+ retro: "Retro",
70
+ bloom: "Bloom",
71
+ candyland: "Candyland",
72
+ aurora: "Aurora",
73
+ vintage: "Vintage",
74
+ horizon: "Horizon",
75
+ starry: "Starry",
76
+ claude: "Claude",
77
+ vercel: "Vercel",
78
+ mono: "Mono"
79
+ }, v = {
80
+ dark: {
81
+ primary: "#7c6fe0",
82
+ secondary: "#404040"
83
+ },
84
+ light: {
85
+ primary: "#7c6fe0",
86
+ secondary: "#ebebeb"
87
+ },
88
+ midnight: {
89
+ primary: "#6b5fc5",
90
+ secondary: "#252530"
91
+ },
92
+ ocean: {
93
+ primary: "#3a9dc4",
94
+ secondary: "#253040"
95
+ },
96
+ forest: {
97
+ primary: "#2ea060",
98
+ secondary: "#25342c"
99
+ },
100
+ sunset: {
101
+ primary: "#d06535",
102
+ secondary: "#382e25"
103
+ },
104
+ rose: {
105
+ primary: "#c04868",
106
+ secondary: "#33202c"
107
+ },
108
+ amber: {
109
+ primary: "#d28a30",
110
+ secondary: "#332a1e"
111
+ },
112
+ violet: {
113
+ primary: "#8460dc",
114
+ secondary: "#25203e"
115
+ },
116
+ slate: {
117
+ primary: "#65788a",
118
+ secondary: "#2e3238"
119
+ },
120
+ emerald: {
121
+ primary: "#35b87a",
122
+ secondary: "#283d33"
123
+ },
124
+ sky: {
125
+ primary: "#3d8fca",
126
+ secondary: "#2b3540"
127
+ },
128
+ crimson: {
129
+ primary: "#c23c3c",
130
+ secondary: "#321f1f"
131
+ },
132
+ vscode: {
133
+ primary: "#4b75b0",
134
+ secondary: "#2d3035"
135
+ },
136
+ slack: {
137
+ primary: "#4268a5",
138
+ secondary: "#36263e"
139
+ },
140
+ x: {
141
+ primary: "#3d8dc2",
142
+ secondary: "#2a2a2a"
143
+ },
144
+ githubdark: {
145
+ primary: "#4d8ab8",
146
+ secondary: "#2d3035"
147
+ },
148
+ githublight: {
149
+ primary: "#2e60a0",
150
+ secondary: "#f0f0f0"
151
+ },
152
+ discord: {
153
+ primary: "#6958c8",
154
+ secondary: "#38404c"
155
+ },
156
+ notion: {
157
+ primary: "#4575b0",
158
+ secondary: "#ece8de"
159
+ },
160
+ linear: {
161
+ primary: "#6258b8",
162
+ secondary: "#2d2d38"
163
+ },
164
+ spotify: {
165
+ primary: "#1db954",
166
+ secondary: "#303030"
167
+ },
168
+ dracula: {
169
+ primary: "#9575e0",
170
+ secondary: "#3c3a4e"
171
+ },
172
+ nord: {
173
+ primary: "#7898b8",
174
+ secondary: "#3c4550"
175
+ },
176
+ solarized: {
177
+ primary: "#357ea8",
178
+ secondary: "#e6e2ce"
179
+ },
180
+ monokai: {
181
+ primary: "#a6e22e",
182
+ secondary: "#3b3b32"
183
+ },
184
+ jiradark: {
185
+ primary: "#3868c8",
186
+ secondary: "#252c38"
187
+ },
188
+ trellodark: {
189
+ primary: "#4575a0",
190
+ secondary: "#35404a"
191
+ },
192
+ youtubedark: {
193
+ primary: "#c52818",
194
+ secondary: "#2d3035"
195
+ },
196
+ googledark: {
197
+ primary: "#4568c8",
198
+ secondary: "#2a2a2a"
199
+ },
200
+ whatsappdark: {
201
+ primary: "#25d366",
202
+ secondary: "#2b3a38"
203
+ },
204
+ minimal: {
205
+ primary: "#3b82f6",
206
+ secondary: "#f3f4f6"
207
+ },
208
+ luxury: {
209
+ primary: "#9b2c2c",
210
+ secondary: "#fdf2d6"
211
+ },
212
+ cyberpunk: {
213
+ primary: "#ff00c8",
214
+ secondary: "#f0f0ff"
215
+ },
216
+ twitter: {
217
+ primary: "#1e9df1",
218
+ secondary: "#0f1419"
219
+ },
220
+ mocha: {
221
+ primary: "#A37764",
222
+ secondary: "#BAAB92"
223
+ },
224
+ bubblegum: {
225
+ primary: "#d04f99",
226
+ secondary: "#8acfd1"
227
+ },
228
+ amethyst: {
229
+ primary: "#8a79ab",
230
+ secondary: "#dfd9ec"
231
+ },
232
+ lemonade: {
233
+ primary: "#a84370",
234
+ secondary: "#f1c4e6"
235
+ },
236
+ notebook: {
237
+ primary: "#606060",
238
+ secondary: "#dedede"
239
+ },
240
+ doom64: {
241
+ primary: "#b71c1c",
242
+ secondary: "#556b2f"
243
+ },
244
+ catppuccin: {
245
+ primary: "#8839ef",
246
+ secondary: "#ccd0da"
247
+ },
248
+ graphite: {
249
+ primary: "#606060",
250
+ secondary: "#e0e0e0"
251
+ },
252
+ perpetuity: {
253
+ primary: "#06858e",
254
+ secondary: "#d9eaea"
255
+ },
256
+ kodama: {
257
+ primary: "#8d9d4f",
258
+ secondary: "#decea0"
259
+ },
260
+ cosmic: {
261
+ primary: "#6e56cf",
262
+ secondary: "#e4dfff"
263
+ },
264
+ tangerine: {
265
+ primary: "#e05d38",
266
+ secondary: "#f3f4f6"
267
+ },
268
+ quantum: {
269
+ primary: "#e6067a",
270
+ secondary: "#ffd6ff"
271
+ },
272
+ nature: {
273
+ primary: "#2e7d32",
274
+ secondary: "#e8f5e9"
275
+ },
276
+ boldtech: {
277
+ primary: "#8b5cf6",
278
+ secondary: "#f3f0ff"
279
+ },
280
+ ambermin: {
281
+ primary: "#f59e0b",
282
+ secondary: "#f3f4f6"
283
+ },
284
+ supabase: {
285
+ primary: "#72e3ad",
286
+ secondary: "#fdfdfd"
287
+ },
288
+ brutalism: {
289
+ primary: "#ff3333",
290
+ secondary: "#ffff00"
291
+ },
292
+ solardusk: {
293
+ primary: "#B45309",
294
+ secondary: "#E4C090"
295
+ },
296
+ claymorphism: {
297
+ primary: "#6366f1",
298
+ secondary: "#d6d3d1"
299
+ },
300
+ pastel: {
301
+ primary: "#a78bfa",
302
+ secondary: "#e9d8fd"
303
+ },
304
+ cleanslate: {
305
+ primary: "#6366f1",
306
+ secondary: "#e5e7eb"
307
+ },
308
+ caffeine: {
309
+ primary: "#644a40",
310
+ secondary: "#ffdfb5"
311
+ },
312
+ breeze: {
313
+ primary: "#22c55e",
314
+ secondary: "#e0f2fe"
315
+ },
316
+ retro: {
317
+ primary: "#d33682",
318
+ secondary: "#2aa198"
319
+ },
320
+ bloom: {
321
+ primary: "#6c5ce7",
322
+ secondary: "#a1c9f2"
323
+ },
324
+ candyland: {
325
+ primary: "#ffc0cb",
326
+ secondary: "#87ceeb"
327
+ },
328
+ aurora: {
329
+ primary: "#34a85a",
330
+ secondary: "#6495ed"
331
+ },
332
+ vintage: {
333
+ primary: "#a67c52",
334
+ secondary: "#e2d8c3"
335
+ },
336
+ horizon: {
337
+ primary: "#ff7e5f",
338
+ secondary: "#feb47b"
339
+ },
340
+ starry: {
341
+ primary: "#3a5ba0",
342
+ secondary: "#f7c873"
343
+ },
344
+ claude: {
345
+ primary: "#c96442",
346
+ secondary: "#e9e6dc"
347
+ },
348
+ vercel: {
349
+ primary: "#000000",
350
+ secondary: "#f5f5f5"
351
+ },
352
+ mono: {
353
+ primary: "#737373",
354
+ secondary: "#f5f5f5"
355
+ }
356
+ }, y = (e) => _[e] ?? e.split("-").map((e) => e.charAt(0).toUpperCase() + e.slice(1)).join(" ");
357
+ function b({ Button: _, DropdownMenu: b, iconSrc: x, onColorThemeChange: S, onModeChange: C } = {}) {
358
+ let { theme: w, setTheme: T } = s(), [E, D] = h("minimal"), [O, k] = h(!1), [A, j] = h(null), M = _ || e, N = b || {
359
+ Root: t,
360
+ Trigger: o,
361
+ Content: n,
362
+ Item: r,
363
+ Label: i,
364
+ Separator: a
365
+ };
366
+ m(() => {
367
+ k(!0);
368
+ let e = localStorage.getItem("color-theme");
369
+ e && g.includes(e) && D(e);
370
+ }, []);
371
+ let P = (e) => {
372
+ D(e), localStorage.setItem("color-theme", e), document.cookie = `color-theme=${e}; path=/; max-age=31536000`, g.forEach((e) => document.documentElement.classList.remove(`theme-${e}`)), document.documentElement.classList.add(`theme-${e}`), j(null), S?.(e);
373
+ }, F = (e) => {
374
+ T(e), C?.(e);
375
+ }, I = (e) => {
376
+ j(e), g.forEach((e) => document.documentElement.classList.remove(`theme-${e}`)), document.documentElement.classList.add(`theme-${e}`);
377
+ }, L = () => {
378
+ A && (g.forEach((e) => document.documentElement.classList.remove(`theme-${e}`)), document.documentElement.classList.add(`theme-${E}`), j(null));
379
+ };
380
+ if (!O) return null;
381
+ let R = N.Root || N, z = N.Trigger || o, B = N.Content || n, V = N.Item || r, H = N.Label || i, U = N.Separator || a;
382
+ return /* @__PURE__ */ l(R, {
383
+ onOpenChange: (e) => !e && L(),
384
+ children: [/* @__PURE__ */ c(z, {
385
+ asChild: !0,
386
+ children: /* @__PURE__ */ c(M, {
387
+ variant: "ghost",
388
+ size: "icon",
389
+ className: "relative",
390
+ children: x ? /* @__PURE__ */ c("img", {
391
+ src: x,
392
+ alt: "Themes",
393
+ width: 32,
394
+ height: 32
395
+ }) : /* @__PURE__ */ c(f, { className: "h-5 w-5" })
396
+ })
397
+ }), /* @__PURE__ */ l(B, {
398
+ align: "end",
399
+ className: "w-56 max-h-[400px] overflow-y-auto",
400
+ children: [
401
+ /* @__PURE__ */ c(H, { children: "Appearance" }),
402
+ /* @__PURE__ */ c(U, {}),
403
+ /* @__PURE__ */ l(V, {
404
+ onClick: () => F("light"),
405
+ className: "cursor-pointer py-1 h-7",
406
+ children: [
407
+ /* @__PURE__ */ c(p, { className: "mr-2 h-3.5 w-3.5" }),
408
+ /* @__PURE__ */ c("span", {
409
+ className: "text-sm",
410
+ children: "Light"
411
+ }),
412
+ w === "light" && /* @__PURE__ */ c("span", {
413
+ className: "ml-auto text-xs",
414
+ children: "✓"
415
+ })
416
+ ]
417
+ }),
418
+ /* @__PURE__ */ l(V, {
419
+ onClick: () => F("dark"),
420
+ className: "cursor-pointer py-1 h-7",
421
+ children: [
422
+ /* @__PURE__ */ c(d, { className: "mr-2 h-3.5 w-3.5" }),
423
+ /* @__PURE__ */ c("span", {
424
+ className: "text-sm",
425
+ children: "Dark"
426
+ }),
427
+ w === "dark" && /* @__PURE__ */ c("span", {
428
+ className: "ml-auto text-xs",
429
+ children: "✓"
430
+ })
431
+ ]
432
+ }),
433
+ /* @__PURE__ */ l(V, {
434
+ onClick: () => F("system"),
435
+ className: "cursor-pointer py-1 h-7",
436
+ children: [
437
+ /* @__PURE__ */ c(u, { className: "mr-2 h-3.5 w-3.5" }),
438
+ /* @__PURE__ */ c("span", {
439
+ className: "text-sm",
440
+ children: "System"
441
+ }),
442
+ w === "system" && /* @__PURE__ */ c("span", {
443
+ className: "ml-auto text-xs",
444
+ children: "✓"
445
+ })
446
+ ]
447
+ }),
448
+ /* @__PURE__ */ c(U, {}),
449
+ /* @__PURE__ */ c(H, { children: "Color Theme" }),
450
+ /* @__PURE__ */ l("div", {
451
+ className: "text-xs text-muted-foreground px-2 py-1.5",
452
+ children: ["Current: ", y(E)]
453
+ }),
454
+ /* @__PURE__ */ c(U, {}),
455
+ g.map((e) => {
456
+ let t = v[e];
457
+ return /* @__PURE__ */ c(V, {
458
+ onClick: () => P(e),
459
+ onMouseEnter: () => I(e),
460
+ onMouseLeave: L,
461
+ className: `cursor-pointer ${E === e ? "bg-accent" : ""}`,
462
+ children: /* @__PURE__ */ l("div", {
463
+ className: "flex items-center justify-between w-full",
464
+ children: [/* @__PURE__ */ l("div", {
465
+ className: "flex items-center gap-2",
466
+ children: [t && /* @__PURE__ */ l("div", {
467
+ className: "flex items-center gap-1",
468
+ children: [/* @__PURE__ */ c("div", {
469
+ className: "w-3 h-3 rounded-full border border-border",
470
+ style: { backgroundColor: t.primary }
471
+ }), /* @__PURE__ */ c("div", {
472
+ className: "w-3 h-3 rounded-full border border-border",
473
+ style: { backgroundColor: t.secondary }
474
+ })]
475
+ }), /* @__PURE__ */ c("span", { children: y(e) })]
476
+ }), E === e && /* @__PURE__ */ c("span", {
477
+ className: "text-xs",
478
+ children: "✓"
479
+ })]
480
+ })
481
+ }, e);
482
+ })
483
+ ]
484
+ })]
485
+ });
486
+ }
487
+ //#endregion
488
+ export { b as ThemeDropdown, y as formatThemeName, v as themeColors, g as themeNames };
@@ -0,0 +1,12 @@
1
+ "use client";
2
+ import { ThemeProvider as e } from "next-themes";
3
+ import { jsx as t } from "react/jsx-runtime";
4
+ //#region src/theme-provider.tsx
5
+ function n({ children: n, ...r }) {
6
+ return /* @__PURE__ */ t(e, {
7
+ ...r,
8
+ children: n
9
+ });
10
+ }
11
+ //#endregion
12
+ export { n as ThemeProvider };
@@ -0,0 +1,51 @@
1
+ "use client";
2
+ import { Button as e } from "./components/ui/button.js";
3
+ import { DropdownMenu as t, DropdownMenuContent as n, DropdownMenuItem as r, DropdownMenuTrigger as i } from "./components/ui/dropdown-menu.js";
4
+ import { useTheme as a } from "next-themes";
5
+ import { jsx as o, jsxs as s } from "react/jsx-runtime";
6
+ import { Monitor as c, Moon as l, Sun as u } from "lucide-react";
7
+ //#region src/theme-toggle.tsx
8
+ function d({ mode: d = "light-dark-system", Button: f, DropdownMenu: p, onThemeChange: m }) {
9
+ let { setTheme: h } = a(), g = f || e, _ = p || {
10
+ Root: t,
11
+ Trigger: i,
12
+ Content: n,
13
+ Item: r
14
+ }, v = (e) => {
15
+ h(e), m?.(e);
16
+ }, y = _.Root || _, b = _.Trigger || i, x = _.Content || n, S = _.Item || r;
17
+ return /* @__PURE__ */ s(y, { children: [/* @__PURE__ */ o(b, {
18
+ asChild: !0,
19
+ children: /* @__PURE__ */ s(g, {
20
+ variant: "ghost",
21
+ size: "icon",
22
+ className: "size-8",
23
+ children: [
24
+ /* @__PURE__ */ o(u, { className: "size-4 rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0" }),
25
+ /* @__PURE__ */ o(l, { className: "absolute size-4 rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100" }),
26
+ /* @__PURE__ */ o("span", {
27
+ className: "sr-only",
28
+ children: "Toggle theme"
29
+ })
30
+ ]
31
+ })
32
+ }), /* @__PURE__ */ s(x, {
33
+ align: "end",
34
+ children: [
35
+ /* @__PURE__ */ s(S, {
36
+ onClick: () => v("light"),
37
+ children: [/* @__PURE__ */ o(u, { className: "mr-2 size-4" }), "Light"]
38
+ }),
39
+ /* @__PURE__ */ s(S, {
40
+ onClick: () => v("dark"),
41
+ children: [/* @__PURE__ */ o(l, { className: "mr-2 size-4" }), "Dark"]
42
+ }),
43
+ d === "light-dark-system" && /* @__PURE__ */ s(S, {
44
+ onClick: () => v("system"),
45
+ children: [/* @__PURE__ */ o(c, { className: "mr-2 size-4" }), "System"]
46
+ })
47
+ ]
48
+ })] });
49
+ }
50
+ //#endregion
51
+ export { d as ThemeToggle };