@ekkolyth/ui 0.1.17 → 0.1.18

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 (67) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +153 -97
  3. package/dist/base.css +263 -0
  4. package/dist/blocks.d.ts +4 -0
  5. package/dist/blocks.js +4 -0
  6. package/dist/container-BBg21poC.js +10 -0
  7. package/dist/convex.d.ts +2 -0
  8. package/dist/convex.js +2 -0
  9. package/dist/hooks.d.ts +2 -0
  10. package/dist/hooks.js +2 -0
  11. package/dist/icon-picker-ByfHyJ7i.js +4078 -0
  12. package/dist/index-Bwp0YMmG.d.ts +5 -0
  13. package/dist/index-BxcqwZNT.d.ts +30 -0
  14. package/dist/index-DHF8OR1R.d.ts +60 -0
  15. package/dist/index-DsLGf2HX.d.ts +9 -0
  16. package/dist/index-qji4ohJZ.d.ts +24 -0
  17. package/dist/index.d.ts +793 -533
  18. package/dist/index.js +3236 -5578
  19. package/dist/layout.d.ts +2 -0
  20. package/dist/layout.js +2 -0
  21. package/dist/loading-screen-DB3youyT.js +63 -0
  22. package/dist/shiki-code-Bg__Vnt1.js +29 -0
  23. package/dist/text.d.ts +17 -0
  24. package/dist/text.js +177 -0
  25. package/dist/themes/catpuccin/frappe.css +33 -33
  26. package/dist/themes/catpuccin/latte.css +33 -33
  27. package/dist/themes/catpuccin/macchiato.css +33 -33
  28. package/dist/themes/catpuccin/mocha.css +33 -33
  29. package/dist/themes/ekko-os.css +92 -37
  30. package/dist/themes/ekkolyth.css +2 -2
  31. package/dist/themes/index.css +7 -66
  32. package/dist/themes/provider.d.ts +62 -0
  33. package/dist/themes/provider.js +271 -0
  34. package/dist/themes/tokyo-night.css +33 -33
  35. package/dist/themes.css +7 -66
  36. package/dist/toggle-B2PFPImC.js +182 -0
  37. package/dist/use-mobile-BVGje-2e.d.ts +4 -0
  38. package/dist/use-mobile-CqHXB_Nc.js +18 -0
  39. package/dist/utils-C_uf36nf.js +8 -0
  40. package/dist/widget-C2vjxQms.js +94 -0
  41. package/dist/widget.d.ts +6 -0
  42. package/dist/widget.js +19 -0
  43. package/package.json +125 -170
  44. package/dist/catpuccin/frappe.css +0 -35
  45. package/dist/catpuccin/latte.css +0 -35
  46. package/dist/catpuccin/macchiato.css +0 -35
  47. package/dist/catpuccin/mocha.css +0 -35
  48. package/dist/ekko-os.css +0 -71
  49. package/dist/ekko-playlist.css +0 -71
  50. package/dist/ekkolyth.css +0 -70
  51. package/dist/index-C3ceanPz.d.ts +0 -18
  52. package/dist/index-C7t_lwpi.d.ts +0 -13
  53. package/dist/next.d.ts +0 -13
  54. package/dist/next.js +0 -271
  55. package/dist/providers/next.d.ts +0 -25
  56. package/dist/providers/next.js +0 -216
  57. package/dist/providers/tanstack.d.ts +0 -24
  58. package/dist/providers/tanstack.js +0 -120
  59. package/dist/tanstack.d.ts +0 -12
  60. package/dist/tanstack.js +0 -203
  61. package/dist/themes/ekko-playlist.css +0 -71
  62. package/dist/themes/theme-select.d.ts +0 -12
  63. package/dist/themes/theme-select.js +0 -357
  64. package/dist/themes/theme-toggle.d.ts +0 -15
  65. package/dist/themes/theme-toggle.js +0 -179
  66. package/dist/tokyo-night.css +0 -35
  67. package/dist/types-fUfvw1Mz.d.ts +0 -8
@@ -1,357 +0,0 @@
1
- import { Select as Select$1 } from 'radix-ui';
2
- import { clsx } from 'clsx';
3
- import { twMerge } from 'tailwind-merge';
4
- import { ChevronDownIcon, CheckIcon, ChevronUpIcon } from 'lucide-react';
5
- import { jsxs, jsx } from 'react/jsx-runtime';
6
- import 'next-themes';
7
- import { createContext, use } from 'react';
8
-
9
- var __defProp = Object.defineProperty;
10
- var __defProps = Object.defineProperties;
11
- var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
12
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
13
- var __hasOwnProp = Object.prototype.hasOwnProperty;
14
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
15
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
16
- var __spreadValues = (a, b) => {
17
- for (var prop in b || (b = {}))
18
- if (__hasOwnProp.call(b, prop))
19
- __defNormalProp(a, prop, b[prop]);
20
- if (__getOwnPropSymbols)
21
- for (var prop of __getOwnPropSymbols(b)) {
22
- if (__propIsEnum.call(b, prop))
23
- __defNormalProp(a, prop, b[prop]);
24
- }
25
- return a;
26
- };
27
- var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
28
- var __objRest = (source, exclude) => {
29
- var target = {};
30
- for (var prop in source)
31
- if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
32
- target[prop] = source[prop];
33
- if (source != null && __getOwnPropSymbols)
34
- for (var prop of __getOwnPropSymbols(source)) {
35
- if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
36
- target[prop] = source[prop];
37
- }
38
- return target;
39
- };
40
- function cn(...inputs) {
41
- return twMerge(clsx(inputs));
42
- }
43
- function Select(_a) {
44
- var props = __objRest(_a, []);
45
- return /* @__PURE__ */ jsx(Select$1.Root, __spreadValues({ "data-slot": "select" }, props));
46
- }
47
- function SelectGroup(_a) {
48
- var props = __objRest(_a, []);
49
- return /* @__PURE__ */ jsx(Select$1.Group, __spreadValues({ "data-slot": "select-group" }, props));
50
- }
51
- function SelectValue(_a) {
52
- var props = __objRest(_a, []);
53
- return /* @__PURE__ */ jsx(Select$1.Value, __spreadValues({ "data-slot": "select-value" }, props));
54
- }
55
- function SelectTrigger(_a) {
56
- var _b = _a, {
57
- className,
58
- size = "default",
59
- children
60
- } = _b, props = __objRest(_b, [
61
- "className",
62
- "size",
63
- "children"
64
- ]);
65
- return /* @__PURE__ */ jsxs(
66
- Select$1.Trigger,
67
- __spreadProps(__spreadValues({
68
- "data-slot": "select-trigger",
69
- "data-size": size,
70
- className: cn(
71
- "cursor-pointer 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",
72
- className
73
- )
74
- }, props), {
75
- children: [
76
- children,
77
- /* @__PURE__ */ jsx(Select$1.Icon, { asChild: true, children: /* @__PURE__ */ jsx(ChevronDownIcon, { className: "size-4 opacity-50" }) })
78
- ]
79
- })
80
- );
81
- }
82
- function SelectContent(_a) {
83
- var _b = _a, {
84
- className,
85
- children,
86
- position = "item-aligned",
87
- align = "center"
88
- } = _b, props = __objRest(_b, [
89
- "className",
90
- "children",
91
- "position",
92
- "align"
93
- ]);
94
- return /* @__PURE__ */ jsx(Select$1.Portal, { children: /* @__PURE__ */ jsxs(
95
- Select$1.Content,
96
- __spreadProps(__spreadValues({
97
- "data-slot": "select-content",
98
- className: cn(
99
- "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",
100
- position === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
101
- className
102
- ),
103
- position,
104
- align
105
- }, props), {
106
- children: [
107
- /* @__PURE__ */ jsx(SelectScrollUpButton, {}),
108
- /* @__PURE__ */ jsx(
109
- Select$1.Viewport,
110
- {
111
- className: cn(
112
- "p-1",
113
- position === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"
114
- ),
115
- children
116
- }
117
- ),
118
- /* @__PURE__ */ jsx(SelectScrollDownButton, {})
119
- ]
120
- })
121
- ) });
122
- }
123
- function SelectLabel(_a) {
124
- var _b = _a, {
125
- className
126
- } = _b, props = __objRest(_b, [
127
- "className"
128
- ]);
129
- return /* @__PURE__ */ jsx(
130
- Select$1.Label,
131
- __spreadValues({
132
- "data-slot": "select-label",
133
- className: cn("text-muted-foreground px-2 py-1.5 text-xs", className)
134
- }, props)
135
- );
136
- }
137
- function SelectItem(_a) {
138
- var _b = _a, {
139
- className,
140
- children
141
- } = _b, props = __objRest(_b, [
142
- "className",
143
- "children"
144
- ]);
145
- return /* @__PURE__ */ jsxs(
146
- Select$1.Item,
147
- __spreadProps(__spreadValues({
148
- "data-slot": "select-item",
149
- className: cn(
150
- "cursor-pointer 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",
151
- className
152
- )
153
- }, props), {
154
- children: [
155
- /* @__PURE__ */ jsx(
156
- "span",
157
- {
158
- "data-slot": "select-item-indicator",
159
- className: "absolute right-2 flex size-3.5 items-center justify-center",
160
- children: /* @__PURE__ */ jsx(Select$1.ItemIndicator, { children: /* @__PURE__ */ jsx(CheckIcon, { className: "size-4" }) })
161
- }
162
- ),
163
- /* @__PURE__ */ jsx(Select$1.ItemText, { children })
164
- ]
165
- })
166
- );
167
- }
168
- function SelectScrollUpButton(_a) {
169
- var _b = _a, {
170
- className
171
- } = _b, props = __objRest(_b, [
172
- "className"
173
- ]);
174
- return /* @__PURE__ */ jsx(
175
- Select$1.ScrollUpButton,
176
- __spreadProps(__spreadValues({
177
- "data-slot": "select-scroll-up-button",
178
- className: cn(
179
- "flex cursor-default items-center justify-center py-1",
180
- className
181
- )
182
- }, props), {
183
- children: /* @__PURE__ */ jsx(
184
- ChevronUpIcon,
185
- {}
186
- )
187
- })
188
- );
189
- }
190
- function SelectScrollDownButton(_a) {
191
- var _b = _a, {
192
- className
193
- } = _b, props = __objRest(_b, [
194
- "className"
195
- ]);
196
- return /* @__PURE__ */ jsx(
197
- Select$1.ScrollDownButton,
198
- __spreadProps(__spreadValues({
199
- "data-slot": "select-scroll-down-button",
200
- className: cn(
201
- "flex cursor-default items-center justify-center py-1",
202
- className
203
- )
204
- }, props), {
205
- children: /* @__PURE__ */ jsx(
206
- ChevronDownIcon,
207
- {}
208
- )
209
- })
210
- );
211
- }
212
- var initialState = {
213
- systemTheme: "system",
214
- resolvedTheme: "ekkolyth-light",
215
- availableThemes: {
216
- light: ["ekkolyth-light"],
217
- dark: ["ekkolyth-dark"]
218
- },
219
- setSystemTheme: () => null,
220
- setSpecificTheme: () => null
221
- };
222
- var NextThemeProviderContext = createContext(initialState);
223
- function useNextTheme() {
224
- const context = use(NextThemeProviderContext);
225
- if (context === void 0) {
226
- throw new Error("useNextTheme must be used within a NextThemeProvider");
227
- }
228
- return context;
229
- }
230
- var initialState2 = {
231
- systemTheme: "system",
232
- resolvedTheme: "ekkolyth-light",
233
- availableThemes: {
234
- light: ["ekkolyth-light"],
235
- dark: ["ekkolyth-dark"]
236
- },
237
- setSystemTheme: () => null,
238
- setSpecificTheme: () => null
239
- };
240
- var TanstackThemeProviderContext = createContext(initialState2);
241
- function useTanstackTheme() {
242
- const context = use(TanstackThemeProviderContext);
243
- if (context === void 0) {
244
- throw new Error(
245
- "useTanstackTheme must be used within a TanstackThemeProvider"
246
- );
247
- }
248
- return context;
249
- }
250
-
251
- // src/lib/types.ts
252
- var LIGHT_THEMES = [
253
- "latte",
254
- "ekkoos-light",
255
- "ekkolyth-light",
256
- "ekko-playlist-light"
257
- ];
258
- var DARK_THEMES = [
259
- "mocha",
260
- "frappe",
261
- "macchiato",
262
- "tokyo-night",
263
- "ekkoos-dark",
264
- "ekkolyth-dark",
265
- "ekko-playlist-dark"
266
- ];
267
-
268
- // src/lib/theme.ts
269
- function isLightTheme(theme) {
270
- return LIGHT_THEMES.includes(theme);
271
- }
272
- function isDarkTheme(theme) {
273
- return DARK_THEMES.includes(theme);
274
- }
275
- function useTheme() {
276
- try {
277
- return useNextTheme();
278
- } catch (e) {
279
- try {
280
- return useTanstackTheme();
281
- } catch (e2) {
282
- throw new Error(
283
- "useTheme must be used within a ThemeProvider (NextThemeProvider or TanstackThemeProvider)"
284
- );
285
- }
286
- }
287
- }
288
- function ThemeSelect(_a) {
289
- var _b = _a, {
290
- size = "default",
291
- className
292
- } = _b, props = __objRest(_b, [
293
- "size",
294
- "className"
295
- ]);
296
- const { resolvedTheme, availableThemes, setSpecificTheme, setSystemTheme } = useTheme();
297
- const handleThemeChange = (value) => {
298
- const theme = value;
299
- if (isLightTheme(theme)) {
300
- setSpecificTheme("light", theme);
301
- setSystemTheme("light");
302
- } else if (isDarkTheme(theme)) {
303
- setSpecificTheme("dark", theme);
304
- setSystemTheme("dark");
305
- }
306
- };
307
- const formatThemeName = (theme) => {
308
- if (theme === "ekkoos-light") return "EkkoOS Light";
309
- if (theme === "ekkoos-dark") return "EkkoOS Dark";
310
- if (theme === "tokyo-night") return "Tokyo Night";
311
- return theme.charAt(0).toUpperCase() + theme.slice(1);
312
- };
313
- return /* @__PURE__ */ jsxs(
314
- Select,
315
- __spreadProps(__spreadValues({
316
- value: resolvedTheme,
317
- onValueChange: handleThemeChange
318
- }, props), {
319
- children: [
320
- /* @__PURE__ */ jsx(
321
- SelectTrigger,
322
- {
323
- size,
324
- className: cn(className),
325
- children: /* @__PURE__ */ jsx(SelectValue, { placeholder: "Select theme" })
326
- }
327
- ),
328
- /* @__PURE__ */ jsxs(SelectContent, { children: [
329
- availableThemes.light.length > 0 && /* @__PURE__ */ jsxs(SelectGroup, { children: [
330
- /* @__PURE__ */ jsx(SelectLabel, { children: "Light Themes" }),
331
- availableThemes.light.map((theme) => /* @__PURE__ */ jsx(
332
- SelectItem,
333
- {
334
- value: theme,
335
- children: formatThemeName(theme)
336
- },
337
- theme
338
- ))
339
- ] }),
340
- availableThemes.dark.length > 0 && /* @__PURE__ */ jsxs(SelectGroup, { children: [
341
- /* @__PURE__ */ jsx(SelectLabel, { children: "Dark Themes" }),
342
- availableThemes.dark.map((theme) => /* @__PURE__ */ jsx(
343
- SelectItem,
344
- {
345
- value: theme,
346
- children: formatThemeName(theme)
347
- },
348
- theme
349
- ))
350
- ] })
351
- ] })
352
- ]
353
- })
354
- );
355
- }
356
-
357
- export { ThemeSelect };
@@ -1,15 +0,0 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import * as React from 'react';
3
- import { T as Toggle } from '../index-C7t_lwpi.js';
4
- import 'class-variance-authority/types';
5
- import 'class-variance-authority';
6
- import 'radix-ui';
7
-
8
- interface ThemeToggleProps extends React.ComponentProps<typeof Toggle> {
9
- variant?: 'default' | 'outline';
10
- size?: 'default' | 'sm' | 'lg';
11
- className?: string;
12
- }
13
- declare function ThemeToggle({ variant, size, className, ...props }: ThemeToggleProps): react_jsx_runtime.JSX.Element;
14
-
15
- export { ThemeToggle, type ThemeToggleProps };
@@ -1,179 +0,0 @@
1
- import { Monitor, Moon, Sun } from 'lucide-react';
2
- import { cva } from 'class-variance-authority';
3
- import { Toggle as Toggle$1 } from 'radix-ui';
4
- import { clsx } from 'clsx';
5
- import { twMerge } from 'tailwind-merge';
6
- import { jsx } from 'react/jsx-runtime';
7
- import 'next-themes';
8
- import { createContext, use } from 'react';
9
-
10
- var __defProp = Object.defineProperty;
11
- var __defProps = Object.defineProperties;
12
- var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
13
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
14
- var __hasOwnProp = Object.prototype.hasOwnProperty;
15
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
16
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
17
- var __spreadValues = (a, b) => {
18
- for (var prop in b || (b = {}))
19
- if (__hasOwnProp.call(b, prop))
20
- __defNormalProp(a, prop, b[prop]);
21
- if (__getOwnPropSymbols)
22
- for (var prop of __getOwnPropSymbols(b)) {
23
- if (__propIsEnum.call(b, prop))
24
- __defNormalProp(a, prop, b[prop]);
25
- }
26
- return a;
27
- };
28
- var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
29
- var __objRest = (source, exclude) => {
30
- var target = {};
31
- for (var prop in source)
32
- if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
33
- target[prop] = source[prop];
34
- if (source != null && __getOwnPropSymbols)
35
- for (var prop of __getOwnPropSymbols(source)) {
36
- if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
37
- target[prop] = source[prop];
38
- }
39
- return target;
40
- };
41
- function cn(...inputs) {
42
- return twMerge(clsx(inputs));
43
- }
44
- var toggleVariants = cva(
45
- "inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium hover:bg-muted hover:text-muted-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] outline-none transition-[color,box-shadow] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive whitespace-nowrap",
46
- {
47
- variants: {
48
- variant: {
49
- default: "bg-transparent",
50
- outline: "border border-input bg-transparent shadow-xs hover:bg-accent hover:text-accent-foreground"
51
- },
52
- size: {
53
- default: "h-9 px-2 min-w-9",
54
- sm: "h-8 px-1.5 min-w-8",
55
- lg: "h-10 px-2.5 min-w-10"
56
- }
57
- },
58
- defaultVariants: {
59
- variant: "default",
60
- size: "default"
61
- }
62
- }
63
- );
64
- function Toggle(_a) {
65
- var _b = _a, {
66
- className,
67
- variant = "default",
68
- size = "default"
69
- } = _b, props = __objRest(_b, [
70
- "className",
71
- "variant",
72
- "size"
73
- ]);
74
- return /* @__PURE__ */ jsx(
75
- Toggle$1.Root,
76
- __spreadValues({
77
- "data-slot": "toggle",
78
- className: cn(toggleVariants({ variant, size, className }))
79
- }, props)
80
- );
81
- }
82
- var initialState = {
83
- systemTheme: "system",
84
- resolvedTheme: "ekkolyth-light",
85
- availableThemes: {
86
- light: ["ekkolyth-light"],
87
- dark: ["ekkolyth-dark"]
88
- },
89
- setSystemTheme: () => null,
90
- setSpecificTheme: () => null
91
- };
92
- var NextThemeProviderContext = createContext(initialState);
93
- function useNextTheme() {
94
- const context = use(NextThemeProviderContext);
95
- if (context === void 0) {
96
- throw new Error("useNextTheme must be used within a NextThemeProvider");
97
- }
98
- return context;
99
- }
100
- var initialState2 = {
101
- systemTheme: "system",
102
- resolvedTheme: "ekkolyth-light",
103
- availableThemes: {
104
- light: ["ekkolyth-light"],
105
- dark: ["ekkolyth-dark"]
106
- },
107
- setSystemTheme: () => null,
108
- setSpecificTheme: () => null
109
- };
110
- var TanstackThemeProviderContext = createContext(initialState2);
111
- function useTanstackTheme() {
112
- const context = use(TanstackThemeProviderContext);
113
- if (context === void 0) {
114
- throw new Error(
115
- "useTanstackTheme must be used within a TanstackThemeProvider"
116
- );
117
- }
118
- return context;
119
- }
120
- function useTheme() {
121
- try {
122
- return useNextTheme();
123
- } catch (e) {
124
- try {
125
- return useTanstackTheme();
126
- } catch (e2) {
127
- throw new Error(
128
- "useTheme must be used within a ThemeProvider (NextThemeProvider or TanstackThemeProvider)"
129
- );
130
- }
131
- }
132
- }
133
- function ThemeToggle(_a) {
134
- var _b = _a, {
135
- variant = "default",
136
- size = "default",
137
- className
138
- } = _b, props = __objRest(_b, [
139
- "variant",
140
- "size",
141
- "className"
142
- ]);
143
- const { systemTheme, setSystemTheme } = useTheme();
144
- const cycleTheme = () => {
145
- const cycle = ["light", "dark", "system"];
146
- const currentIndex = cycle.indexOf(
147
- systemTheme === "normal" ? "light" : systemTheme
148
- );
149
- const nextIndex = (currentIndex + 1) % cycle.length;
150
- setSystemTheme(cycle[nextIndex]);
151
- };
152
- const getIcon = () => {
153
- const normalizedTheme = systemTheme === "normal" ? "light" : systemTheme;
154
- switch (normalizedTheme) {
155
- case "light":
156
- return /* @__PURE__ */ jsx(Sun, { className: "size-4" });
157
- case "dark":
158
- return /* @__PURE__ */ jsx(Moon, { className: "size-4" });
159
- case "system":
160
- return /* @__PURE__ */ jsx(Monitor, { className: "size-4" });
161
- default:
162
- return /* @__PURE__ */ jsx(Monitor, { className: "size-4" });
163
- }
164
- };
165
- return /* @__PURE__ */ jsx(
166
- Toggle,
167
- __spreadProps(__spreadValues({
168
- variant,
169
- size,
170
- className: cn(className),
171
- onClick: cycleTheme,
172
- "aria-label": `Switch theme. Current: ${systemTheme}`
173
- }, props), {
174
- children: getIcon()
175
- })
176
- );
177
- }
178
-
179
- export { ThemeToggle };
@@ -1,35 +0,0 @@
1
- /* Tokyo Night Theme - Dark Mode */
2
- html[data-theme="tokyo-night"] {
3
- --radius: 0.625rem;
4
- --background: hsl(233 16.00% 13.33%); /* #1a1b26 - dark blue-gray */
5
- --foreground: hsl(228 23.53% 87.06%); /* #c0caf5 - light blue-gray */
6
- --card: hsl(233 16.00% 13.33%); /* #1a1b26 */
7
- --card-foreground: hsl(228 23.53% 87.06%); /* #c0caf5 */
8
- --popover: hsl(233 16.00% 13.33%); /* #1a1b26 */
9
- --popover-foreground: hsl(228 23.53% 87.06%); /* #c0caf5 */
10
- --primary: hsl(217 91.67% 79.80%); /* #7aa2f7 - Tokyo Night blue */
11
- --primary-foreground: hsl(233 16.00% 13.33%); /* #1a1b26 */
12
- --secondary: hsl(233 18.18% 15.29%); /* #24283b - darker blue-gray */
13
- --secondary-foreground: hsl(228 23.53% 87.06%); /* #c0caf5 */
14
- --muted: hsl(233 18.18% 15.29%); /* #24283b */
15
- --muted-foreground: hsl(230 13.33% 66.67%); /* #565f89 - muted text */
16
- --accent: hsl(233 18.18% 15.29%); /* #24283b */
17
- --accent-foreground: hsl(228 23.53% 87.06%); /* #c0caf5 */
18
- --destructive: hsl(354 65.22% 78.24%); /* #f7768e - Tokyo Night red */
19
- --border: hsl(233 18.18% 20.00%); /* #2f3549 - border color */
20
- --input: hsl(233 18.18% 20.00%); /* #2f3549 */
21
- --ring: hsl(217 91.67% 79.80%); /* #7aa2f7 - primary blue */
22
- --chart-1: hsl(354 65.22% 78.24%); /* #f7768e - red */
23
- --chart-2: hsl(158 64.00% 71.37%); /* #9ece6a - green */
24
- --chart-3: hsl(217 91.67% 79.80%); /* #7aa2f7 - blue */
25
- --chart-4: hsl(38 92.00% 72.16%); /* #e0af68 - yellow */
26
- --chart-5: hsl(266 85.00% 78.24%); /* #bb9af7 - purple */
27
- --sidebar: hsl(233 18.18% 12.94%); /* #16161e - darker background */
28
- --sidebar-foreground: hsl(228 23.53% 87.06%); /* #c0caf5 */
29
- --sidebar-primary: hsl(217 91.67% 79.80%); /* #7aa2f7 */
30
- --sidebar-primary-foreground: hsl(233 16.00% 13.33%); /* #1a1b26 */
31
- --sidebar-accent: hsl(233 18.18% 15.29%); /* #24283b */
32
- --sidebar-accent-foreground: hsl(228 23.53% 87.06%); /* #c0caf5 */
33
- --sidebar-border: hsl(233 18.18% 20.00%); /* #2f3549 */
34
- --sidebar-ring: hsl(233 18.18% 20.00%); /* #2f3549 */
35
- }
@@ -1,8 +0,0 @@
1
- type SystemTheme = 'light' | 'dark' | 'system' | 'normal';
2
- declare const LIGHT_THEMES: readonly ["latte", "ekkoos-light", "ekkolyth-light", "ekko-playlist-light"];
3
- declare const DARK_THEMES: readonly ["mocha", "frappe", "macchiato", "tokyo-night", "ekkoos-dark", "ekkolyth-dark", "ekko-playlist-dark"];
4
- type LightThemes = (typeof LIGHT_THEMES)[number];
5
- type DarkThemes = (typeof DARK_THEMES)[number];
6
- type ThemeName = LightThemes | DarkThemes;
7
-
8
- export type { DarkThemes as D, LightThemes as L, SystemTheme as S, ThemeName as T };