@raxrai/stylelab-ui 0.1.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -1,37 +1,8 @@
1
1
  "use strict";
2
2
  var __defProp = Object.defineProperty;
3
- var __defProps = Object.defineProperties;
4
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
- var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
6
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
7
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
8
5
  var __hasOwnProp = Object.prototype.hasOwnProperty;
9
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
10
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
11
- var __spreadValues = (a, b) => {
12
- for (var prop in b || (b = {}))
13
- if (__hasOwnProp.call(b, prop))
14
- __defNormalProp(a, prop, b[prop]);
15
- if (__getOwnPropSymbols)
16
- for (var prop of __getOwnPropSymbols(b)) {
17
- if (__propIsEnum.call(b, prop))
18
- __defNormalProp(a, prop, b[prop]);
19
- }
20
- return a;
21
- };
22
- var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
23
- var __objRest = (source, exclude) => {
24
- var target = {};
25
- for (var prop in source)
26
- if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
27
- target[prop] = source[prop];
28
- if (source != null && __getOwnPropSymbols)
29
- for (var prop of __getOwnPropSymbols(source)) {
30
- if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
31
- target[prop] = source[prop];
32
- }
33
- return target;
34
- };
35
6
  var __export = (target, all) => {
36
7
  for (var name in all)
37
8
  __defProp(target, name, { get: all[name], enumerable: true });
@@ -77,6 +48,9 @@ __export(index_exports, {
77
48
  Slider: () => Slider,
78
49
  StatsCard: () => StatsCard,
79
50
  THEMES: () => THEMES,
51
+ THEME_BACKGROUNDS: () => THEME_BACKGROUNDS,
52
+ THEME_NAVBAR: () => THEME_NAVBAR,
53
+ THEME_RECOMMENDATIONS: () => THEME_RECOMMENDATIONS,
80
54
  Tabs: () => Tabs,
81
55
  Terminal: () => Terminal,
82
56
  ThemeProvider: () => ThemeProvider,
@@ -96,51 +70,6 @@ module.exports = __toCommonJS(index_exports);
96
70
 
97
71
  // context/ThemeContext.tsx
98
72
  var import_react = require("react");
99
- var import_jsx_runtime = require("react/jsx-runtime");
100
- var ThemeContext = (0, import_react.createContext)(null);
101
- var STORAGE_KEY = "stylelab-theme";
102
- function ThemeProvider({
103
- children,
104
- defaultTheme = "minimal"
105
- }) {
106
- const [theme, setThemeState] = (0, import_react.useState)(defaultTheme);
107
- (0, import_react.useEffect)(() => {
108
- setThemeState(defaultTheme);
109
- if (typeof document !== "undefined") {
110
- try {
111
- document.documentElement.dataset.stylelabTheme = defaultTheme;
112
- } catch (_) {
113
- }
114
- }
115
- }, [defaultTheme]);
116
- const setTheme = (0, import_react.useCallback)((next) => {
117
- setThemeState(next);
118
- if (typeof document !== "undefined") {
119
- try {
120
- document.documentElement.dataset.stylelabTheme = next;
121
- localStorage.setItem(STORAGE_KEY, next);
122
- } catch (_) {
123
- }
124
- }
125
- }, []);
126
- const value = (0, import_react.useMemo)(
127
- () => ({ theme, setTheme }),
128
- [theme, setTheme]
129
- );
130
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ThemeContext.Provider, { value, children });
131
- }
132
- var DEFAULT_THEME = "minimal";
133
- function useTheme() {
134
- const ctx = (0, import_react.useContext)(ThemeContext);
135
- if (!ctx) {
136
- return {
137
- theme: DEFAULT_THEME,
138
- setTheme: () => {
139
- }
140
- };
141
- }
142
- return ctx;
143
- }
144
73
 
145
74
  // lib/theme-resolver.ts
146
75
  var themeMap = {
@@ -198,7 +127,7 @@ var themeMap = {
198
127
  skeleton: { default: "bg-zinc-800", shimmer: "animate-skeleton-shimmer" },
199
128
  avatar: { default: "bg-zinc-700 text-zinc-200 border border-white/10" },
200
129
  breadcrumbs: { default: "text-zinc-400 [&_[data-sep]]:text-zinc-500" },
201
- alert: { default: "bg-zinc-900/50 text-zinc-100 border border-white/10", info: "bg-sky-900/30 border-sky-500/30", success: "bg-emerald-900/30 border-emerald-500/30", warning: "bg-amber-900/30 border-amber-500/30", danger: "bg-red-900/30 border-red-500/30" },
130
+ alert: { default: "bg-zinc-900/50 text-zinc-100 border border-white/10", info: "bg-sky-900/30 text-sky-200 border-sky-500/30", success: "bg-emerald-900/30 text-emerald-200 border-emerald-500/30", warning: "bg-amber-900/30 text-amber-200 border-amber-500/30", danger: "bg-red-900/30 text-red-200 border-red-500/30" },
202
131
  calendar: { default: "bg-zinc-950 text-zinc-100 border border-white/10" },
203
132
  timeline: { default: "border-l-2 border-white/20 text-zinc-100" }
204
133
  },
@@ -227,7 +156,7 @@ var themeMap = {
227
156
  skeleton: { default: "rounded-xl bg-white/50", shimmer: "animate-skeleton-shimmer" },
228
157
  avatar: { default: "rounded-full bg-white/60 text-slate-700 border border-white/60 shadow-glass-soft" },
229
158
  breadcrumbs: { default: "text-slate-500 [&_[data-sep]]:text-slate-400" },
230
- alert: { default: "rounded-xl bg-white/60 backdrop-blur-[8px] border border-white/60 text-slate-800 saturate-150", info: "bg-sky-400/30 backdrop-blur-[8px] border-sky-300/60 saturate-150", success: "bg-emerald-400/30 backdrop-blur-[8px] border-emerald-300/60 saturate-150", warning: "bg-amber-400/30 backdrop-blur-[8px] border-amber-300/60 saturate-150", danger: "bg-red-400/30 backdrop-blur-[8px] border-red-300/60 saturate-150" },
159
+ alert: { default: "rounded-xl bg-white/60 backdrop-blur-[8px] border border-white/60 text-slate-800 saturate-150", info: "bg-sky-400/30 text-sky-900 backdrop-blur-[8px] border-sky-300/60 saturate-150", success: "bg-emerald-400/30 text-emerald-900 backdrop-blur-[8px] border-emerald-300/60 saturate-150", warning: "bg-amber-400/30 text-amber-900 backdrop-blur-[8px] border-amber-300/60 saturate-150", danger: "bg-red-400/30 text-red-900 backdrop-blur-[8px] border-red-300/60 saturate-150" },
231
160
  calendar: { default: "rounded-2xl bg-white/60 backdrop-blur-2xl border border-white/60 text-slate-800 shadow-glass-lift" },
232
161
  timeline: { default: "border-l-2 border-slate-200/60 text-slate-800" }
233
162
  },
@@ -256,7 +185,7 @@ var themeMap = {
256
185
  skeleton: { default: "rounded-none bg-zinc-200 border-2 border-black", shimmer: "animate-skeleton-shimmer" },
257
186
  avatar: { default: "rounded-full bg-[#FFD600] text-black border-2 border-black" },
258
187
  breadcrumbs: { default: "text-black [&_[data-sep]]:text-zinc-600" },
259
- alert: { default: "rounded-none bg-white text-black border-4 border-black", info: "border-[#22d3ee] bg-sky-100", success: "border-emerald-600 bg-emerald-50", warning: "border-[#FFD600] bg-amber-50", danger: "border-[#FF5733] bg-red-50" },
188
+ alert: { default: "rounded-none bg-white text-black border-4 border-black", info: "border-[#22d3ee] bg-sky-100 text-sky-900", success: "border-emerald-600 bg-emerald-50 text-emerald-900", warning: "border-[#FFD600] bg-amber-50 text-amber-900", danger: "border-[#FF5733] bg-red-50 text-red-900" },
260
189
  calendar: { default: "rounded-none bg-white text-black border-4 border-black shadow-neubrutal" },
261
190
  timeline: { default: "border-l-4 border-black text-black" }
262
191
  },
@@ -285,7 +214,7 @@ var themeMap = {
285
214
  skeleton: { default: "rounded-2xl bg-sky-100", shimmer: "animate-skeleton-shimmer" },
286
215
  avatar: { default: "rounded-full bg-rose-200 text-rose-900 shadow-clay-outer border border-rose-200" },
287
216
  breadcrumbs: { default: "text-zinc-600 [&_[data-sep]]:text-zinc-400" },
288
- alert: { default: "rounded-2xl bg-rose-50 text-zinc-900 shadow-clay-outer border border-rose-100", info: "bg-sky-100 border-sky-200", success: "bg-emerald-100 border-emerald-200", warning: "bg-amber-100 border-amber-200", danger: "bg-red-100 border-red-200" },
217
+ alert: { default: "rounded-2xl bg-rose-50 text-zinc-900 shadow-clay-outer border border-rose-100", info: "bg-sky-100 text-sky-900 border-sky-200", success: "bg-emerald-100 text-emerald-900 border-emerald-200", warning: "bg-amber-100 text-amber-900 border-amber-200", danger: "bg-red-100 text-red-900 border-red-200" },
289
218
  calendar: { default: "rounded-3xl bg-white text-zinc-900 shadow-clay-outer" },
290
219
  timeline: { default: "border-l-2 border-rose-200 text-zinc-900" }
291
220
  },
@@ -296,19 +225,19 @@ var themeMap = {
296
225
  badge: { default: "bg-black border-2 border-[#ec4899] text-[#ec4899] font-mono" },
297
226
  slider: { default: "bg-zinc-900 [&_.slider-thumb]:border-2 [&_.slider-thumb]:border-[#22d3ee] [&_.slider-thumb]:bg-[#22d3ee] [&_.slider-thumb]:shadow-neon-glow" },
298
227
  tabs: { default: "border-b-2 border-[#22d3ee]", triggerActive: "text-[#22d3ee] border-[#22d3ee] font-bold shadow-neon-glow", triggerInactive: "opacity-50 text-[#22d3ee]/70" },
299
- card: { default: "bg-black text-[#22d3ee] border-2 border-[#22d3ee] clip-path-glitch shadow-neon-glow font-mono" },
228
+ card: { default: "bg-black text-[#22d3ee] border-2 border-[#22d3ee] shadow-neon-glow font-mono" },
300
229
  bento: { default: "gap-4" },
301
230
  navbar: { default: "bg-black text-[#22d3ee] border-b-2 border-[#22d3ee] font-mono" },
302
231
  sidebar: { default: "bg-black text-[#22d3ee] border-r-2 border-[#22d3ee] font-mono" },
303
232
  sectionHeader: { default: "border-b-2 border-[#22d3ee] text-[#22d3ee]" },
304
- modal: { default: "bg-black text-[#22d3ee] border-2 border-[#22d3ee] clip-path-glitch shadow-neon-glow font-mono" },
233
+ modal: { default: "bg-black text-[#22d3ee] border-2 border-[#22d3ee] shadow-neon-glow font-mono" },
305
234
  toast: { default: "bg-black border-2 border-[#ec4899] text-[#ec4899] font-mono shadow-neon-glow" },
306
235
  progress: { default: "bg-zinc-900 [&_.fill]:bg-[#22d3ee] [&_.fill]:shadow-neon-glow" },
307
236
  tooltip: { default: "bg-black border-2 border-[#22d3ee] text-[#22d3ee] font-mono" },
308
237
  dataTable: { default: "bg-black text-[#22d3ee] border-2 border-[#22d3ee] divide-y divide-[#22d3ee]/50 font-mono" },
309
- pricingCard: { default: "bg-black text-[#22d3ee] border-2 border-[#22d3ee] clip-path-glitch font-mono" },
238
+ pricingCard: { default: "bg-black text-[#22d3ee] border-2 border-[#22d3ee] font-mono shadow-neon-glow" },
310
239
  terminal: { default: "bg-black border-2 border-[#22d3ee] font-mono text-[#22d3ee] shadow-neon-glow" },
311
- statsCard: { default: "bg-black text-[#22d3ee] border-2 border-[#22d3ee] font-mono clip-path-glitch" },
240
+ statsCard: { default: "bg-black text-[#22d3ee] border-2 border-[#22d3ee] font-mono shadow-neon-glow" },
312
241
  commandPalette: { default: "bg-black text-[#22d3ee] border-2 border-[#22d3ee] font-mono shadow-neon-glow" },
313
242
  accordion: { default: "border-b-2 border-[#22d3ee] text-[#22d3ee]" },
314
243
  skeleton: { default: "bg-zinc-900 border border-[#22d3ee]/50", flicker: "animate-skeleton-flicker" },
@@ -324,7 +253,7 @@ var themeMap = {
324
253
  toggle: { default: "rounded-none border-2 border-black bg-zinc-200 data-[state=on]:bg-lime-500 shadow-[3px_3px_0_0_rgba(0,0,0,1)]" },
325
254
  badge: { default: "rounded-none bg-lime-500 text-black border-2 border-black font-mono" },
326
255
  slider: { default: "rounded-none border-2 border-black bg-zinc-200 [&_.slider-thumb]:rounded-none [&_.slider-thumb]:border-2 [&_.slider-thumb]:border-black [&_.slider-thumb]:bg-lime-500 [&_.slider-thumb]:shadow-[2px_2px_0_0_rgba(0,0,0,1)]" },
327
- tabs: { default: "border-b-2 border-black font-mono", triggerActive: "border-b-2 border-black font-bold bg-lime-500/20 -mb-[2px] pb-[6px]", triggerInactive: "opacity-70" },
256
+ tabs: { default: "border-b-2 border-black font-mono", triggerActive: "border-b-2 border-black font-bold bg-lime-500/20 text-black -mb-[2px] pb-[6px]", triggerInactive: "opacity-70 text-black" },
328
257
  card: { default: "rounded-none bg-white text-black border-2 border-black shadow-[6px_6px_0_0_rgba(0,0,0,1)] font-mono" },
329
258
  bento: { default: "gap-4" },
330
259
  navbar: { default: "rounded-none bg-zinc-100 text-black border-b-2 border-black font-mono shadow-[0_4px_0_0_rgba(0,0,0,1)]" },
@@ -343,7 +272,7 @@ var themeMap = {
343
272
  skeleton: { default: "rounded-none bg-zinc-200 border-2 border-black", shimmer: "animate-skeleton-shimmer" },
344
273
  avatar: { default: "rounded-none bg-lime-500 text-black border-2 border-black font-mono" },
345
274
  breadcrumbs: { default: "text-black font-mono [&_[data-sep]]:text-zinc-500" },
346
- alert: { default: "rounded-none bg-white text-black border-2 border-black font-mono", info: "border-zinc-400 bg-zinc-100", success: "border-lime-600 bg-lime-50", warning: "border-amber-600 bg-amber-50", danger: "border-red-600 bg-red-50" },
275
+ alert: { default: "rounded-none bg-white text-black border-2 border-black font-mono", info: "border-zinc-400 bg-zinc-100 text-zinc-900", success: "border-lime-600 bg-lime-50 text-lime-900", warning: "border-amber-600 bg-amber-50 text-amber-900", danger: "border-red-600 bg-red-50 text-red-900" },
347
276
  calendar: { default: "rounded-none bg-white text-black border-2 border-black font-mono shadow-[4px_4px_0_0_rgba(0,0,0,1)]" },
348
277
  timeline: { default: "border-l-2 border-black text-black font-mono" }
349
278
  },
@@ -378,10 +307,12 @@ var themeMap = {
378
307
  }
379
308
  };
380
309
  function getThemeClass(theme, component, variant = "default") {
381
- var _a, _b, _c;
382
- const comp = (_a = themeMap[theme]) == null ? void 0 : _a[component];
310
+ const comp = themeMap[theme]?.[component];
383
311
  if (!comp) return "";
384
- return (_c = (_b = comp[variant]) != null ? _b : comp["default"]) != null ? _c : "";
312
+ const value = comp[variant];
313
+ if (value != null && value !== "") return value;
314
+ if (variant === "default") return comp["default"] ?? "";
315
+ return "";
385
316
  }
386
317
  var THEMES = [
387
318
  "minimal",
@@ -394,6 +325,68 @@ var THEMES = [
394
325
  "motion"
395
326
  ];
396
327
 
328
+ // context/ThemeContext.tsx
329
+ var import_jsx_runtime = require("react/jsx-runtime");
330
+ var ThemeContext = (0, import_react.createContext)(null);
331
+ function getStoredTheme(storageKey, defaultTheme) {
332
+ if (typeof window === "undefined") return defaultTheme;
333
+ try {
334
+ const stored = localStorage.getItem(storageKey);
335
+ if (stored && THEMES.includes(stored))
336
+ return stored;
337
+ } catch (_) {
338
+ }
339
+ return defaultTheme;
340
+ }
341
+ function ThemeProvider({
342
+ children,
343
+ defaultTheme = "minimal",
344
+ storageKey = "stylelab-theme"
345
+ }) {
346
+ const [theme, setThemeState] = (0, import_react.useState)(defaultTheme);
347
+ (0, import_react.useEffect)(() => {
348
+ setThemeState((prev) => getStoredTheme(storageKey, prev));
349
+ }, [storageKey]);
350
+ (0, import_react.useEffect)(() => {
351
+ if (typeof document !== "undefined") {
352
+ try {
353
+ document.documentElement.dataset.stylelabTheme = theme;
354
+ } catch (_) {
355
+ }
356
+ }
357
+ }, [theme]);
358
+ const setTheme = (0, import_react.useCallback)(
359
+ (next) => {
360
+ setThemeState(next);
361
+ if (typeof document !== "undefined") {
362
+ try {
363
+ document.documentElement.dataset.stylelabTheme = next;
364
+ localStorage.setItem(storageKey, next);
365
+ } catch (_) {
366
+ }
367
+ }
368
+ },
369
+ [storageKey]
370
+ );
371
+ const value = (0, import_react.useMemo)(
372
+ () => ({ theme, setTheme }),
373
+ [theme, setTheme]
374
+ );
375
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ThemeContext.Provider, { value, children });
376
+ }
377
+ var DEFAULT_THEME = "minimal";
378
+ function useTheme() {
379
+ const ctx = (0, import_react.useContext)(ThemeContext);
380
+ if (!ctx) {
381
+ return {
382
+ theme: DEFAULT_THEME,
383
+ setTheme: () => {
384
+ }
385
+ };
386
+ }
387
+ return ctx;
388
+ }
389
+
397
390
  // node_modules/clsx/dist/clsx.mjs
398
391
  function r(e) {
399
392
  var t, f, n = "";
@@ -710,11 +703,12 @@ var createSortModifiers = (config) => {
710
703
  return result;
711
704
  };
712
705
  };
713
- var createConfigUtils = (config) => __spreadValues({
706
+ var createConfigUtils = (config) => ({
714
707
  cache: createLruCache(config.cacheSize),
715
708
  parseClassName: createParseClassName(config),
716
- sortModifiers: createSortModifiers(config)
717
- }, createClassGroupUtils(config));
709
+ sortModifiers: createSortModifiers(config),
710
+ ...createClassGroupUtils(config)
711
+ });
718
712
  var SPLIT_CLASSES_REGEX = /\s+/;
719
713
  var mergeClassList = (classList, configUtils) => {
720
714
  const {
@@ -3638,58 +3632,48 @@ var hasA11yProp = (props) => {
3638
3632
 
3639
3633
  // node_modules/lucide-react/dist/esm/Icon.js
3640
3634
  var Icon = (0, import_react2.forwardRef)(
3641
- (_a, ref) => {
3642
- var _b = _a, {
3643
- color: color2 = "currentColor",
3644
- size = 24,
3645
- strokeWidth = 2,
3646
- absoluteStrokeWidth,
3647
- className = "",
3648
- children,
3649
- iconNode
3650
- } = _b, rest = __objRest(_b, [
3651
- "color",
3652
- "size",
3653
- "strokeWidth",
3654
- "absoluteStrokeWidth",
3655
- "className",
3656
- "children",
3657
- "iconNode"
3658
- ]);
3659
- return (0, import_react2.createElement)(
3660
- "svg",
3661
- __spreadValues(__spreadValues(__spreadProps(__spreadValues({
3662
- ref
3663
- }, defaultAttributes), {
3664
- width: size,
3665
- height: size,
3666
- stroke: color2,
3667
- strokeWidth: absoluteStrokeWidth ? Number(strokeWidth) * 24 / Number(size) : strokeWidth,
3668
- className: mergeClasses("lucide", className)
3669
- }), !children && !hasA11yProp(rest) && { "aria-hidden": "true" }), rest),
3670
- [
3671
- ...iconNode.map(([tag, attrs]) => (0, import_react2.createElement)(tag, attrs)),
3672
- ...Array.isArray(children) ? children : [children]
3673
- ]
3674
- );
3675
- }
3635
+ ({
3636
+ color: color2 = "currentColor",
3637
+ size = 24,
3638
+ strokeWidth = 2,
3639
+ absoluteStrokeWidth,
3640
+ className = "",
3641
+ children,
3642
+ iconNode,
3643
+ ...rest
3644
+ }, ref) => (0, import_react2.createElement)(
3645
+ "svg",
3646
+ {
3647
+ ref,
3648
+ ...defaultAttributes,
3649
+ width: size,
3650
+ height: size,
3651
+ stroke: color2,
3652
+ strokeWidth: absoluteStrokeWidth ? Number(strokeWidth) * 24 / Number(size) : strokeWidth,
3653
+ className: mergeClasses("lucide", className),
3654
+ ...!children && !hasA11yProp(rest) && { "aria-hidden": "true" },
3655
+ ...rest
3656
+ },
3657
+ [
3658
+ ...iconNode.map(([tag, attrs]) => (0, import_react2.createElement)(tag, attrs)),
3659
+ ...Array.isArray(children) ? children : [children]
3660
+ ]
3661
+ )
3676
3662
  );
3677
3663
 
3678
3664
  // node_modules/lucide-react/dist/esm/createLucideIcon.js
3679
3665
  var createLucideIcon = (iconName, iconNode) => {
3680
3666
  const Component2 = (0, import_react3.forwardRef)(
3681
- (_a, ref) => {
3682
- var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
3683
- return (0, import_react3.createElement)(Icon, __spreadValues({
3684
- ref,
3685
- iconNode,
3686
- className: mergeClasses(
3687
- `lucide-${toKebabCase(toPascalCase(iconName))}`,
3688
- `lucide-${iconName}`,
3689
- className
3690
- )
3691
- }, props));
3692
- }
3667
+ ({ className, ...props }, ref) => (0, import_react3.createElement)(Icon, {
3668
+ ref,
3669
+ iconNode,
3670
+ className: mergeClasses(
3671
+ `lucide-${toKebabCase(toPascalCase(iconName))}`,
3672
+ `lucide-${iconName}`,
3673
+ className
3674
+ ),
3675
+ ...props
3676
+ })
3693
3677
  );
3694
3678
  Component2.displayName = toPascalCase(iconName);
3695
3679
  return Component2;
@@ -3814,10 +3798,10 @@ function Accordion({
3814
3798
  theme: themeProp
3815
3799
  }) {
3816
3800
  const [open, setOpen] = (0, import_react4.useState)(
3817
- () => new Set(defaultOpenIds != null ? defaultOpenIds : [])
3801
+ () => new Set(defaultOpenIds ?? [])
3818
3802
  );
3819
3803
  const { theme: contextTheme } = useTheme();
3820
- const theme = themeProp != null ? themeProp : contextTheme;
3804
+ const theme = themeProp ?? contextTheme;
3821
3805
  const themeClass = getThemeClass(theme, "accordion", "default");
3822
3806
  const toggle = (0, import_react4.useCallback)(
3823
3807
  (id3) => {
@@ -3848,37 +3832,30 @@ function Accordion({
3848
3832
  // components/Alert.tsx
3849
3833
  var import_react5 = require("react");
3850
3834
  var import_jsx_runtime3 = require("react/jsx-runtime");
3851
- var Alert = (0, import_react5.forwardRef)(function Alert2(_a, ref) {
3852
- var _b = _a, {
3853
- intent = "default",
3854
- title,
3855
- children,
3856
- className,
3857
- theme: themeProp,
3858
- role = "alert"
3859
- } = _b, props = __objRest(_b, [
3860
- "intent",
3861
- "title",
3862
- "children",
3863
- "className",
3864
- "theme",
3865
- "role"
3866
- ]);
3835
+ var Alert = (0, import_react5.forwardRef)(function Alert2({
3836
+ intent = "default",
3837
+ title,
3838
+ children,
3839
+ className,
3840
+ theme: themeProp,
3841
+ role = "alert",
3842
+ ...props
3843
+ }, ref) {
3867
3844
  const { theme: contextTheme } = useTheme();
3868
- const theme = themeProp != null ? themeProp : contextTheme;
3845
+ const theme = themeProp ?? contextTheme;
3869
3846
  const themeClass = getThemeClass(theme, "alert", intent);
3870
3847
  return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
3871
3848
  "div",
3872
- __spreadProps(__spreadValues({
3849
+ {
3873
3850
  ref,
3874
3851
  role,
3875
- className: cn("rounded-lg border px-4 py-3", themeClass, className)
3876
- }, props), {
3852
+ className: cn("rounded-lg border px-4 py-3", themeClass, className),
3853
+ ...props,
3877
3854
  children: [
3878
3855
  title != null && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "font-semibold mb-1", children: title }),
3879
3856
  children
3880
3857
  ]
3881
- })
3858
+ }
3882
3859
  );
3883
3860
  });
3884
3861
 
@@ -3888,33 +3865,25 @@ var import_jsx_runtime4 = require("react/jsx-runtime");
3888
3865
  function getInitials(name) {
3889
3866
  return name.trim().split(/\s+/).map((s) => s[0]).join("").toUpperCase().slice(0, 2);
3890
3867
  }
3891
- var Avatar = (0, import_react6.forwardRef)(function Avatar2(_a, ref) {
3892
- var _b = _a, {
3893
- src,
3894
- alt = "",
3895
- fallback,
3896
- className,
3897
- theme: themeProp,
3898
- style,
3899
- children
3900
- } = _b, props = __objRest(_b, [
3901
- "src",
3902
- "alt",
3903
- "fallback",
3904
- "className",
3905
- "theme",
3906
- "style",
3907
- "children"
3908
- ]);
3868
+ var Avatar = (0, import_react6.forwardRef)(function Avatar2({
3869
+ src,
3870
+ alt = "",
3871
+ fallback,
3872
+ className,
3873
+ theme: themeProp,
3874
+ style,
3875
+ children,
3876
+ ...props
3877
+ }, ref) {
3909
3878
  const { theme: contextTheme } = useTheme();
3910
- const theme = themeProp != null ? themeProp : contextTheme;
3879
+ const theme = themeProp ?? contextTheme;
3911
3880
  const themeClass = getThemeClass(theme, "avatar", "default");
3912
3881
  const isNeubrutal = theme === "neubrutal";
3913
3882
  const borderClass = isNeubrutal ? "border-2 border-black" : "";
3914
- const displayFallback = fallback != null ? fallback : alt ? getInitials(alt) : "?";
3883
+ const displayFallback = fallback ?? (alt ? getInitials(alt) : "?");
3915
3884
  return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
3916
3885
  "div",
3917
- __spreadProps(__spreadValues({
3886
+ {
3918
3887
  ref,
3919
3888
  role: "img",
3920
3889
  "aria-label": alt || void 0,
@@ -3924,8 +3893,8 @@ var Avatar = (0, import_react6.forwardRef)(function Avatar2(_a, ref) {
3924
3893
  borderClass,
3925
3894
  className
3926
3895
  ),
3927
- style
3928
- }, props), {
3896
+ style,
3897
+ ...props,
3929
3898
  children: [
3930
3899
  src ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
3931
3900
  "img",
@@ -3938,36 +3907,31 @@ var Avatar = (0, import_react6.forwardRef)(function Avatar2(_a, ref) {
3938
3907
  ) : /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { "aria-hidden": true, children: displayFallback }),
3939
3908
  children
3940
3909
  ]
3941
- })
3910
+ }
3942
3911
  );
3943
3912
  });
3944
- function AvatarGroup(_a) {
3945
- var _b = _a, {
3946
- children,
3947
- max = 4,
3948
- className,
3949
- theme: themeProp
3950
- } = _b, props = __objRest(_b, [
3951
- "children",
3952
- "max",
3953
- "className",
3954
- "theme"
3955
- ]);
3913
+ function AvatarGroup({
3914
+ children,
3915
+ max = 4,
3916
+ className,
3917
+ theme: themeProp,
3918
+ ...props
3919
+ }) {
3956
3920
  const { theme: contextTheme } = useTheme();
3957
- const theme = themeProp != null ? themeProp : contextTheme;
3921
+ const theme = themeProp ?? contextTheme;
3958
3922
  const themeClass = getThemeClass(theme, "avatar", "default");
3959
3923
  const isNeubrutal = theme === "neubrutal";
3960
- const borderClass = isNeubrutal ? "border-2 border-black" : "border-2 border-white dark:border-zinc-900";
3924
+ const borderClass = isNeubrutal ? "border-2 border-black" : "border-2 border-white";
3961
3925
  const childArray = Array.isArray(children) ? children : [children];
3962
3926
  const visible = childArray.slice(0, max);
3963
3927
  const remaining = childArray.length - max;
3964
3928
  return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
3965
3929
  "div",
3966
- __spreadProps(__spreadValues({
3930
+ {
3967
3931
  className: cn("flex -space-x-2", className),
3968
3932
  role: "group",
3969
- "aria-label": "Avatar group"
3970
- }, props), {
3933
+ "aria-label": "Avatar group",
3934
+ ...props,
3971
3935
  children: [
3972
3936
  visible.map((child, i) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
3973
3937
  "div",
@@ -3998,7 +3962,7 @@ function AvatarGroup(_a) {
3998
3962
  }
3999
3963
  )
4000
3964
  ]
4001
- })
3965
+ }
4002
3966
  );
4003
3967
  }
4004
3968
 
@@ -4025,10 +3989,16 @@ var cva = (base, config) => (props) => {
4025
3989
  return acc;
4026
3990
  }, {});
4027
3991
  const getCompoundVariantClassNames = config === null || config === void 0 ? void 0 : (_config_compoundVariants = config.compoundVariants) === null || _config_compoundVariants === void 0 ? void 0 : _config_compoundVariants.reduce((acc, param) => {
4028
- let _a = param, { class: cvClass, className: cvClassName } = _a, compoundVariantOptions = __objRest(_a, ["class", "className"]);
3992
+ let { class: cvClass, className: cvClassName, ...compoundVariantOptions } = param;
4029
3993
  return Object.entries(compoundVariantOptions).every((param2) => {
4030
3994
  let [key, value] = param2;
4031
- return Array.isArray(value) ? value.includes(__spreadValues(__spreadValues({}, defaultVariants), propsWithoutUndefined)[key]) : __spreadValues(__spreadValues({}, defaultVariants), propsWithoutUndefined)[key] === value;
3995
+ return Array.isArray(value) ? value.includes({
3996
+ ...defaultVariants,
3997
+ ...propsWithoutUndefined
3998
+ }[key]) : {
3999
+ ...defaultVariants,
4000
+ ...propsWithoutUndefined
4001
+ }[key] === value;
4032
4002
  }) ? [
4033
4003
  ...acc,
4034
4004
  cvClass,
@@ -4047,9 +4017,9 @@ var badgeVariants = cva(
4047
4017
  variants: {
4048
4018
  variant: {
4049
4019
  default: "",
4050
- success: "bg-emerald-100 text-emerald-800 dark:bg-emerald-900/30 dark:text-emerald-400",
4051
- warning: "bg-amber-100 text-amber-800 dark:bg-amber-900/30 dark:text-amber-400",
4052
- error: "bg-red-100 text-red-800 dark:bg-red-900/30 dark:text-red-400"
4020
+ success: "bg-emerald-100 text-emerald-800",
4021
+ warning: "bg-amber-100 text-amber-800",
4022
+ error: "bg-red-100 text-red-800"
4053
4023
  }
4054
4024
  },
4055
4025
  defaultVariants: {
@@ -4057,33 +4027,36 @@ var badgeVariants = cva(
4057
4027
  }
4058
4028
  }
4059
4029
  );
4060
- var Badge = (0, import_react7.forwardRef)(function Badge2(_a, ref) {
4061
- var _b = _a, {
4062
- children,
4063
- variant = "default",
4064
- dot = false,
4065
- className,
4066
- theme: themeProp
4067
- } = _b, props = __objRest(_b, [
4068
- "children",
4069
- "variant",
4070
- "dot",
4071
- "className",
4072
- "theme"
4073
- ]);
4030
+ var Badge = (0, import_react7.forwardRef)(function Badge2({
4031
+ children,
4032
+ variant = "default",
4033
+ dot = false,
4034
+ className,
4035
+ theme: themeProp,
4036
+ bgOverride,
4037
+ textOverride,
4038
+ style,
4039
+ ...props
4040
+ }, ref) {
4074
4041
  const { theme: contextTheme } = useTheme();
4075
- const theme = themeProp != null ? themeProp : contextTheme;
4042
+ const theme = themeProp ?? contextTheme;
4076
4043
  const themeClass = variant === "default" ? getThemeClass(theme, "badge", "default") : "";
4044
+ const overrideStyle = {
4045
+ ...style,
4046
+ ...bgOverride != null && { backgroundColor: bgOverride },
4047
+ ...textOverride != null && { color: textOverride }
4048
+ };
4077
4049
  return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
4078
4050
  "span",
4079
- __spreadProps(__spreadValues({
4051
+ {
4080
4052
  ref,
4081
4053
  className: cn(
4082
4054
  badgeVariants({ variant }),
4083
4055
  variant === "default" && themeClass,
4084
4056
  className
4085
- )
4086
- }, props), {
4057
+ ),
4058
+ style: overrideStyle,
4059
+ ...props,
4087
4060
  children: [
4088
4061
  dot && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
4089
4062
  "span",
@@ -4094,7 +4067,7 @@ var Badge = (0, import_react7.forwardRef)(function Badge2(_a, ref) {
4094
4067
  ),
4095
4068
  children
4096
4069
  ]
4097
- })
4070
+ }
4098
4071
  );
4099
4072
  });
4100
4073
 
@@ -4139,11 +4112,10 @@ function Breadcrumbs({
4139
4112
  className,
4140
4113
  theme: themeProp
4141
4114
  }) {
4142
- var _a;
4143
4115
  const { theme: contextTheme } = useTheme();
4144
- const theme = themeProp != null ? themeProp : contextTheme;
4116
+ const theme = themeProp ?? contextTheme;
4145
4117
  const themeClass = getThemeClass(theme, "breadcrumbs", "default");
4146
- const sep = (_a = separator != null ? separator : defaultSeparators[theme]) != null ? _a : "/";
4118
+ const sep = separator ?? defaultSeparators[theme] ?? "/";
4147
4119
  return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("nav", { "aria-label": "Breadcrumb", className: cn("flex flex-wrap items-center gap-1.5 text-sm", themeClass, className), children: items.map((item, i) => /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("span", { className: "inline-flex items-center gap-1.5", children: [
4148
4120
  i > 0 && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { "data-sep": true, className: "shrink-0 opacity-70", "aria-hidden": true, children: sep }),
4149
4121
  item.href != null ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("a", { href: item.href, className: "hover:underline", children: item.label }) : /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "font-medium", "aria-current": i === items.length - 1 ? "page" : void 0, children: item.label })
@@ -4169,7 +4141,7 @@ var buttonVariants = cva(
4169
4141
  }
4170
4142
  );
4171
4143
  function ButtonInner(props, ref) {
4172
- const _a = props, {
4144
+ const {
4173
4145
  as,
4174
4146
  variant = "primary",
4175
4147
  size = "md",
@@ -4180,25 +4152,14 @@ function ButtonInner(props, ref) {
4180
4152
  className,
4181
4153
  children,
4182
4154
  disabled,
4183
- type
4184
- } = _a, rest = __objRest(_a, [
4185
- "as",
4186
- "variant",
4187
- "size",
4188
- "loading",
4189
- "isLoading",
4190
- "leftIcon",
4191
- "rightIcon",
4192
- "className",
4193
- "children",
4194
- "disabled",
4195
- "type"
4196
- ]);
4155
+ type,
4156
+ ...rest
4157
+ } = props;
4197
4158
  const { theme } = useTheme();
4198
4159
  const themeClass = getThemeClass(theme, "button", variant);
4199
- const loadingState = isLoading != null ? isLoading : loading;
4200
- const isDisabled = disabled != null ? disabled : loadingState;
4201
- const Comp = as != null ? as : "button";
4160
+ const loadingState = isLoading ?? loading;
4161
+ const isDisabled = disabled ?? loadingState;
4162
+ const Comp = as ?? "button";
4202
4163
  const isAnchor = Comp === "a";
4203
4164
  const combinedClassName = cn(
4204
4165
  buttonVariants({ size }),
@@ -4211,34 +4172,36 @@ function ButtonInner(props, ref) {
4211
4172
  "aria-busy": loadingState ? true : void 0
4212
4173
  };
4213
4174
  if (isAnchor) {
4214
- const _b = rest, { href } = _b, anchorRest = __objRest(_b, ["href"]);
4175
+ const { href, ...anchorRest } = rest;
4215
4176
  return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
4216
4177
  "a",
4217
- __spreadProps(__spreadValues(__spreadProps(__spreadValues({}, common), {
4178
+ {
4179
+ ...common,
4218
4180
  href,
4219
- "aria-disabled": isDisabled ? true : void 0
4220
- }), anchorRest), {
4181
+ "aria-disabled": isDisabled ? true : void 0,
4182
+ ...anchorRest,
4221
4183
  children: [
4222
4184
  loadingState ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(LoaderCircle, { className: "size-4 shrink-0 animate-spin", "aria-hidden": true }) : leftIcon,
4223
4185
  children,
4224
4186
  !loadingState && rightIcon
4225
4187
  ]
4226
- })
4188
+ }
4227
4189
  );
4228
4190
  }
4229
4191
  const buttonRest = rest;
4230
4192
  return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
4231
4193
  "button",
4232
- __spreadProps(__spreadValues(__spreadProps(__spreadValues({}, common), {
4233
- type: type != null ? type : "button",
4234
- disabled: isDisabled
4235
- }), buttonRest), {
4194
+ {
4195
+ ...common,
4196
+ type: type ?? "button",
4197
+ disabled: isDisabled,
4198
+ ...buttonRest,
4236
4199
  children: [
4237
4200
  loadingState ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(LoaderCircle, { className: "size-4 shrink-0 animate-spin", "aria-hidden": true }) : leftIcon,
4238
4201
  children,
4239
4202
  !loadingState && rightIcon
4240
4203
  ]
4241
- })
4204
+ }
4242
4205
  );
4243
4206
  }
4244
4207
  var Button = (0, import_react8.forwardRef)(ButtonInner);
@@ -4285,15 +4248,15 @@ function Calendar({
4285
4248
  theme: themeProp
4286
4249
  }) {
4287
4250
  const [uncontrolled, setUncontrolled] = (0, import_react9.useState)(
4288
- () => defaultValue != null ? defaultValue : null
4251
+ () => defaultValue ?? null
4289
4252
  );
4290
4253
  const isControlled = controlledValue !== void 0;
4291
- const value = isControlled ? controlledValue != null ? controlledValue : null : uncontrolled;
4254
+ const value = isControlled ? controlledValue ?? null : uncontrolled;
4292
4255
  const { theme: contextTheme } = useTheme();
4293
- const theme = themeProp != null ? themeProp : contextTheme;
4256
+ const theme = themeProp ?? contextTheme;
4294
4257
  const themeClass = getThemeClass(theme, "calendar", "default");
4295
4258
  const [view2, setView] = (0, import_react9.useState)(() => {
4296
- const d = value != null ? value : /* @__PURE__ */ new Date();
4259
+ const d = value ?? /* @__PURE__ */ new Date();
4297
4260
  return { year: d.getFullYear(), month: d.getMonth() };
4298
4261
  });
4299
4262
  const grid = (0, import_react9.useMemo)(
@@ -4326,7 +4289,7 @@ function Calendar({
4326
4289
  if (isDisabled(day)) return;
4327
4290
  const d = new Date(view2.year, view2.month, day);
4328
4291
  if (!isControlled) setUncontrolled(d);
4329
- onSelect == null ? void 0 : onSelect(d);
4292
+ onSelect?.(d);
4330
4293
  };
4331
4294
  return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
4332
4295
  "div",
@@ -4372,7 +4335,7 @@ function Calendar({
4372
4335
  className: cn(
4373
4336
  "py-2 rounded-md transition-colors",
4374
4337
  isSelected(day) && "bg-current/20 font-semibold",
4375
- !isSelected(day) && "hover:bg-black/5 dark:hover:bg-white/10",
4338
+ !isSelected(day) && (theme === "night" || theme === "cyberpunk" ? "hover:bg-white/10" : "hover:bg-black/5"),
4376
4339
  isDisabled(day) && "opacity-40 cursor-not-allowed"
4377
4340
  ),
4378
4341
  children: day
@@ -4406,37 +4369,31 @@ var cardVariants = cva("rounded-xl", {
4406
4369
  isHoverable: false
4407
4370
  }
4408
4371
  });
4409
- var Card = (0, import_react10.forwardRef)(function Card2(_a, ref) {
4410
- var _b = _a, {
4411
- header,
4412
- footer,
4413
- padding = "md",
4414
- isHoverable = false,
4415
- className,
4416
- theme: themeProp,
4417
- children
4418
- } = _b, props = __objRest(_b, [
4419
- "header",
4420
- "footer",
4421
- "padding",
4422
- "isHoverable",
4423
- "className",
4424
- "theme",
4425
- "children"
4426
- ]);
4372
+ var Card = (0, import_react10.forwardRef)(function Card2({
4373
+ header,
4374
+ footer,
4375
+ padding = "md",
4376
+ isHoverable = false,
4377
+ className,
4378
+ theme: themeProp,
4379
+ classNames = {},
4380
+ children,
4381
+ ...props
4382
+ }, ref) {
4427
4383
  const { theme: contextTheme } = useTheme();
4428
- const theme = themeProp != null ? themeProp : contextTheme;
4384
+ const theme = themeProp ?? contextTheme;
4429
4385
  const themeClass = getThemeClass(theme, "card", "default");
4430
4386
  return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
4431
4387
  "div",
4432
- __spreadProps(__spreadValues({
4388
+ {
4433
4389
  ref,
4434
4390
  className: cn(
4435
4391
  cardVariants({ padding, isHoverable }),
4436
4392
  themeClass,
4437
- className
4438
- )
4439
- }, props), {
4393
+ className,
4394
+ classNames.root
4395
+ ),
4396
+ ...props,
4440
4397
  children: [
4441
4398
  header != null && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
4442
4399
  "div",
@@ -4445,12 +4402,13 @@ var Card = (0, import_react10.forwardRef)(function Card2(_a, ref) {
4445
4402
  "border-b border-inherit first:rounded-t-xl [.rounded-xl_&]:rounded-t-xl",
4446
4403
  padding === "none" && "p-0",
4447
4404
  padding === "sm" && "p-4",
4448
- padding === "md" && "px-6 py-4"
4405
+ padding === "md" && "px-6 py-4",
4406
+ classNames.header
4449
4407
  ),
4450
4408
  children: header
4451
4409
  }
4452
4410
  ),
4453
- children,
4411
+ classNames.body ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: classNames.body, children }) : children,
4454
4412
  footer != null && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
4455
4413
  "div",
4456
4414
  {
@@ -4458,13 +4416,14 @@ var Card = (0, import_react10.forwardRef)(function Card2(_a, ref) {
4458
4416
  "border-t border-inherit last:rounded-b-xl [.rounded-xl_&]:rounded-b-xl",
4459
4417
  padding === "none" && "p-0",
4460
4418
  padding === "sm" && "p-4",
4461
- padding === "md" && "px-6 py-4"
4419
+ padding === "md" && "px-6 py-4",
4420
+ classNames.footer
4462
4421
  ),
4463
4422
  children: footer
4464
4423
  }
4465
4424
  )
4466
4425
  ]
4467
- })
4426
+ }
4468
4427
  );
4469
4428
  });
4470
4429
 
@@ -4481,6 +4440,27 @@ var SHELL_BG_BY_THEME = {
4481
4440
  retro: "bg-zinc-100 text-black font-mono",
4482
4441
  motion: "bg-gradient-to-br from-indigo-50 via-white to-purple-50 text-zinc-900"
4483
4442
  };
4443
+ var darkHeaderThemes = ["night", "cyberpunk", "glass"];
4444
+ function headerClasses(theme) {
4445
+ return darkHeaderThemes.includes(theme) ? "border-b border-white/20 bg-zinc-950/90 text-zinc-100 backdrop-blur-xl" : "border-b border-zinc-200 bg-white/70 text-zinc-900 shadow-sm shadow-black/5 backdrop-blur-xl";
4446
+ }
4447
+ function navLinkClasses(theme, active) {
4448
+ const base = "inline-flex items-center rounded-full px-4 py-1.5 font-medium transition-colors";
4449
+ if (darkHeaderThemes.includes(theme)) {
4450
+ return active ? cn(base, "bg-white/10 text-zinc-50") : cn(base, "text-zinc-300 hover:bg-white/10 hover:text-zinc-50");
4451
+ }
4452
+ return active ? cn(base, "bg-black/5 text-zinc-900") : cn(base, "text-zinc-600 hover:bg-black/5 hover:text-zinc-900");
4453
+ }
4454
+ function mobilePanelClasses(theme) {
4455
+ const base = "border-t px-4 pb-4 pt-3 text-sm shadow-sm sm:hidden";
4456
+ return darkHeaderThemes.includes(theme) ? cn(base, "border-zinc-800 bg-zinc-950") : cn(base, "border-zinc-200/60 bg-white/90");
4457
+ }
4458
+ function mobileNavLinkStateClasses(theme, active) {
4459
+ if (darkHeaderThemes.includes(theme)) {
4460
+ return active ? "bg-white/10 text-zinc-50" : "text-zinc-300 hover:bg-white/10 hover:text-zinc-50";
4461
+ }
4462
+ return active ? "bg-black/5 text-zinc-900" : "text-zinc-600 hover:bg-black/5 hover:text-zinc-900";
4463
+ }
4484
4464
  function DashboardShell({
4485
4465
  children,
4486
4466
  navItems,
@@ -4496,9 +4476,10 @@ function DashboardShell({
4496
4476
  const isAdmin = userRole === "ADMIN";
4497
4477
  const { theme } = useTheme();
4498
4478
  const shellBg = SHELL_BG_BY_THEME[theme];
4479
+ const isDarkHeader = darkHeaderThemes.includes(theme);
4499
4480
  const isActive = (href) => currentPath ? currentPath === href || currentPath.startsWith(href) : false;
4500
4481
  return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: cn("min-h-screen", shellBg, className), children: [
4501
- /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("header", { className: "sticky top-0 z-40 border-b border-white/20 bg-white/70 text-zinc-900 shadow-sm shadow-black/5 backdrop-blur-xl dark:border-zinc-800 dark:bg-zinc-950/90 dark:text-zinc-100", children: [
4482
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("header", { className: cn("sticky top-0 z-40", headerClasses(theme)), children: [
4502
4483
  /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "mx-auto flex h-14 max-w-7xl items-center justify-between px-4 sm:px-6 lg:px-8", children: [
4503
4484
  /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "flex items-center gap-2", children: [
4504
4485
  /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
@@ -4506,35 +4487,52 @@ function DashboardShell({
4506
4487
  {
4507
4488
  type: "button",
4508
4489
  onClick: () => setMobileOpen((v) => !v),
4509
- className: "inline-flex h-9 w-9 items-center justify-center rounded-lg text-zinc-600 hover:bg-black/5 hover:text-zinc-900 dark:text-zinc-300 dark:hover:bg-zinc-800 sm:hidden",
4490
+ className: cn(
4491
+ "inline-flex h-9 w-9 items-center justify-center rounded-lg sm:hidden",
4492
+ isDarkHeader ? "text-zinc-300 hover:bg-white/10" : "text-zinc-600 hover:bg-black/5 hover:text-zinc-900"
4493
+ ),
4510
4494
  "aria-label": "Toggle navigation",
4511
4495
  "aria-expanded": mobileOpen,
4512
4496
  children: mobileOpen ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "text-lg leading-none", children: "\xD7" }) : /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "text-xl leading-none", children: "\u2630" })
4513
4497
  }
4514
4498
  ),
4515
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "flex items-center gap-2", children: logo != null ? logo : /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "rounded-md bg-black px-2 py-1 text-xs font-semibold uppercase tracking-wide text-white dark:bg-white dark:text-black", children: "Dashboard" }) }),
4499
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "flex items-center gap-2", children: logo ?? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
4500
+ "span",
4501
+ {
4502
+ className: cn(
4503
+ "rounded-md px-2 py-1 text-xs font-semibold uppercase tracking-wide",
4504
+ isDarkHeader ? "bg-white text-black" : "bg-black text-white"
4505
+ ),
4506
+ children: "Dashboard"
4507
+ }
4508
+ ) }),
4516
4509
  /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("nav", { className: "ml-6 hidden items-center gap-1 text-sm sm:flex", children: [
4517
4510
  navItems.map((item) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
4518
4511
  "a",
4519
4512
  {
4520
4513
  href: item.href,
4521
- className: cn(
4522
- "inline-flex items-center rounded-full px-4 py-1.5 font-medium transition-colors",
4523
- isActive(item.href) ? "bg-black/5 text-zinc-900 dark:bg-zinc-800 dark:text-zinc-50" : "text-zinc-600 hover:bg-black/5 hover:text-zinc-900 dark:text-zinc-300 dark:hover:bg-zinc-800 dark:hover:text-zinc-50"
4524
- ),
4514
+ className: navLinkClasses(theme, isActive(item.href)),
4525
4515
  children: item.label
4526
4516
  },
4527
4517
  item.href
4528
4518
  )),
4529
4519
  isAdmin && adminNavItems && adminNavItems.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_jsx_runtime11.Fragment, { children: [
4530
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "mx-2 h-4 w-px bg-zinc-300/70 dark:bg-zinc-600" }),
4520
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
4521
+ "span",
4522
+ {
4523
+ className: cn(
4524
+ "mx-2 h-4 w-px",
4525
+ isDarkHeader ? "bg-zinc-600" : "bg-zinc-300/70"
4526
+ )
4527
+ }
4528
+ ),
4531
4529
  adminNavItems.map((item) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
4532
4530
  "a",
4533
4531
  {
4534
4532
  href: item.href,
4535
4533
  className: cn(
4536
4534
  "inline-flex items-center rounded-full px-4 py-1.5 text-sm font-medium transition-colors",
4537
- isActive(item.href) ? "bg-black/5 text-zinc-900 dark:bg-zinc-800 dark:text-zinc-50" : "text-zinc-600 hover:bg-black/5 hover:text-zinc-900 dark:text-zinc-300 dark:hover:bg-zinc-800 dark:hover:text-zinc-50"
4535
+ navLinkClasses(theme, isActive(item.href))
4538
4536
  ),
4539
4537
  children: item.label
4540
4538
  },
@@ -4544,53 +4542,85 @@ function DashboardShell({
4544
4542
  ] })
4545
4543
  ] }),
4546
4544
  /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "flex items-center gap-2 text-sm", children: [
4547
- userEmail && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "hidden max-w-[160px] truncate text-zinc-500 dark:text-zinc-300 sm:inline", children: userEmail }),
4545
+ userEmail && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
4546
+ "span",
4547
+ {
4548
+ className: cn(
4549
+ "hidden max-w-[160px] truncate sm:inline",
4550
+ isDarkHeader ? "text-zinc-300" : "text-zinc-500"
4551
+ ),
4552
+ children: userEmail
4553
+ }
4554
+ ),
4548
4555
  onLogout && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
4549
4556
  "button",
4550
4557
  {
4551
4558
  type: "button",
4552
4559
  onClick: onLogout,
4553
- className: "rounded-full px-3 py-1.5 font-medium text-zinc-600 transition-colors hover:bg-black/5 hover:text-zinc-900 dark:text-zinc-300 dark:hover:bg-zinc-800 dark:hover:text-zinc-50 sm:px-4",
4560
+ className: cn(
4561
+ "rounded-full px-3 py-1.5 font-medium transition-colors sm:px-4",
4562
+ mobileNavLinkStateClasses(theme, false)
4563
+ ),
4554
4564
  children: "Logout"
4555
4565
  }
4556
4566
  )
4557
4567
  ] })
4558
4568
  ] }),
4559
- mobileOpen && /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "border-t border-zinc-200/60 bg-white/90 px-4 pb-4 pt-3 text-sm shadow-sm dark:border-zinc-800 dark:bg-zinc-950 sm:hidden", children: [
4569
+ mobileOpen && /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: mobilePanelClasses(theme), children: [
4560
4570
  /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "space-y-1", children: navItems.map((item) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
4561
4571
  "a",
4562
4572
  {
4563
4573
  href: item.href,
4564
4574
  className: cn(
4565
4575
  "block rounded-lg px-4 py-2.5 font-medium transition-colors",
4566
- isActive(item.href) ? "bg-black/5 text-zinc-900 dark:bg-zinc-800 dark:text-zinc-50" : "text-zinc-600 hover:bg-black/5 hover:text-zinc-900 dark:text-zinc-300 dark:hover:bg-zinc-800 dark:hover:text-zinc-50"
4576
+ mobileNavLinkStateClasses(theme, isActive(item.href))
4567
4577
  ),
4568
4578
  children: item.label
4569
4579
  },
4570
4580
  item.href
4571
4581
  )) }),
4572
4582
  isAdmin && adminNavItems && adminNavItems.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_jsx_runtime11.Fragment, { children: [
4573
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "my-2 h-px bg-zinc-200 dark:bg-zinc-700" }),
4583
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
4584
+ "div",
4585
+ {
4586
+ className: cn(
4587
+ "my-2 h-px",
4588
+ isDarkHeader ? "bg-zinc-700" : "bg-zinc-200"
4589
+ )
4590
+ }
4591
+ ),
4574
4592
  /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "space-y-1", children: adminNavItems.map((item) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
4575
4593
  "a",
4576
4594
  {
4577
4595
  href: item.href,
4578
4596
  className: cn(
4579
4597
  "block rounded-lg px-4 py-2.5 font-medium transition-colors",
4580
- isActive(item.href) ? "bg-black/5 text-zinc-900 dark:bg-zinc-800 dark:text-zinc-50" : "text-zinc-600 hover:bg-black/5 hover:text-zinc-900 dark:text-zinc-300 dark:hover:bg-zinc-800 dark:hover:text-zinc-50"
4598
+ mobileNavLinkStateClasses(theme, isActive(item.href))
4581
4599
  ),
4582
4600
  children: item.label
4583
4601
  },
4584
4602
  item.href
4585
4603
  )) })
4586
4604
  ] }),
4587
- userEmail && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "mt-3 border-t border-zinc-200 pt-3 text-xs text-zinc-500 dark:border-zinc-700 dark:text-zinc-400", children: userEmail }),
4605
+ userEmail && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
4606
+ "div",
4607
+ {
4608
+ className: cn(
4609
+ "mt-3 border-t pt-3 text-xs",
4610
+ isDarkHeader ? "border-zinc-700 text-zinc-400" : "border-zinc-200 text-zinc-500"
4611
+ ),
4612
+ children: userEmail
4613
+ }
4614
+ ),
4588
4615
  onLogout && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
4589
4616
  "button",
4590
4617
  {
4591
4618
  type: "button",
4592
4619
  onClick: onLogout,
4593
- className: "mt-2 w-full rounded-lg px-4 py-2.5 text-left text-sm font-medium text-zinc-600 transition-colors hover:bg-black/5 hover:text-zinc-900 dark:text-zinc-300 dark:hover:bg-zinc-800 dark:hover:text-zinc-50",
4620
+ className: cn(
4621
+ "mt-2 w-full rounded-lg px-4 py-2.5 text-left text-sm font-medium transition-colors",
4622
+ mobileNavLinkStateClasses(theme, false)
4623
+ ),
4594
4624
  children: "Logout"
4595
4625
  }
4596
4626
  )
@@ -4614,7 +4644,7 @@ function CommandPalette({
4614
4644
  const [selected, setSelected] = (0, import_react12.useState)(0);
4615
4645
  const listRef = (0, import_react12.useRef)(null);
4616
4646
  const { theme: contextTheme } = useTheme();
4617
- const theme = themeProp != null ? themeProp : contextTheme;
4647
+ const theme = themeProp ?? contextTheme;
4618
4648
  const themeClass = getThemeClass(theme, "commandPalette", "default");
4619
4649
  const filtered = (0, import_react12.useMemo)(() => {
4620
4650
  if (!query.trim()) return commands;
@@ -4670,7 +4700,7 @@ function CommandPalette({
4670
4700
  const el = listRef.current;
4671
4701
  if (!el) return;
4672
4702
  const item = el.querySelector(`[data-index="${safeSelected}"]`);
4673
- item == null ? void 0 : item.scrollIntoView({ block: "nearest", behavior: "smooth" });
4703
+ item?.scrollIntoView({ block: "nearest", behavior: "smooth" });
4674
4704
  }, [safeSelected]);
4675
4705
  if (!open) return null;
4676
4706
  return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
@@ -4756,36 +4786,66 @@ function DocumentAccordion({
4756
4786
  theme: themeProp
4757
4787
  }) {
4758
4788
  const { theme: contextTheme } = useTheme();
4759
- const theme = themeProp != null ? themeProp : contextTheme;
4789
+ const theme = themeProp ?? contextTheme;
4760
4790
  const items = [
4761
4791
  {
4762
4792
  id: "document",
4763
4793
  title,
4764
- content: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "rounded-xl border border-black/5 bg-white/60 p-0 shadow-sm backdrop-blur-md dark:border-white/10 dark:bg-zinc-950/80", children: pdfUrl ? /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "flex flex-col gap-3", children: [
4765
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "flex justify-end px-4 pt-4", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
4766
- "a",
4767
- {
4768
- href: pdfUrl,
4769
- target: "_blank",
4770
- rel: "noreferrer",
4771
- className: "inline-flex items-center gap-1 rounded-full border border-black/5 bg-white/70 px-3 py-1 text-xs font-medium text-blue-700 shadow-sm transition hover:bg-white dark:border-white/20 dark:bg-zinc-900/80 dark:text-sky-300",
4772
- children: [
4773
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { children: "Open PDF" }),
4774
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { "aria-hidden": true, children: "\u2197" })
4775
- ]
4776
- }
4777
- ) }),
4778
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "h-[60vh] w-full border-t border-black/5 dark:border-white/10", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
4779
- "iframe",
4780
- {
4781
- src: `https://docs.google.com/viewer?url=${encodeURIComponent(
4782
- pdfUrl
4783
- )}&embedded=true`,
4784
- title: "Document preview",
4785
- className: "h-full w-full border-0"
4786
- }
4787
- ) })
4788
- ] }) : content ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "whitespace-pre-wrap p-4 text-sm leading-relaxed text-zinc-800 dark:text-zinc-100", children: content }) : null })
4794
+ content: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
4795
+ "div",
4796
+ {
4797
+ className: cn(
4798
+ "rounded-xl border p-0 shadow-sm backdrop-blur-md",
4799
+ theme === "night" || theme === "cyberpunk" ? "border-white/10 bg-zinc-950/80" : "border-black/5 bg-white/60"
4800
+ ),
4801
+ children: pdfUrl ? /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "flex flex-col gap-3", children: [
4802
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "flex justify-end px-4 pt-4", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
4803
+ "a",
4804
+ {
4805
+ href: pdfUrl,
4806
+ target: "_blank",
4807
+ rel: "noreferrer",
4808
+ className: cn(
4809
+ "inline-flex items-center gap-1 rounded-full border px-3 py-1 text-xs font-medium shadow-sm transition",
4810
+ theme === "night" || theme === "cyberpunk" ? "border-white/20 bg-zinc-900/80 text-sky-300 hover:bg-zinc-800/80" : "border-black/5 bg-white/70 text-blue-700 hover:bg-white"
4811
+ ),
4812
+ children: [
4813
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { children: "Open PDF" }),
4814
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { "aria-hidden": true, children: "\u2197" })
4815
+ ]
4816
+ }
4817
+ ) }),
4818
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
4819
+ "div",
4820
+ {
4821
+ className: cn(
4822
+ "h-[60vh] w-full border-t",
4823
+ theme === "night" || theme === "cyberpunk" ? "border-white/10" : "border-black/5"
4824
+ ),
4825
+ children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
4826
+ "iframe",
4827
+ {
4828
+ src: `https://docs.google.com/viewer?url=${encodeURIComponent(
4829
+ pdfUrl
4830
+ )}&embedded=true`,
4831
+ title: "Document preview",
4832
+ className: "h-full w-full border-0"
4833
+ }
4834
+ )
4835
+ }
4836
+ )
4837
+ ] }) : content ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
4838
+ "div",
4839
+ {
4840
+ className: cn(
4841
+ "whitespace-pre-wrap p-4 text-sm leading-relaxed",
4842
+ theme === "night" || theme === "cyberpunk" ? "text-zinc-100" : "text-zinc-800"
4843
+ ),
4844
+ children: content
4845
+ }
4846
+ ) : null
4847
+ }
4848
+ )
4789
4849
  }
4790
4850
  ];
4791
4851
  return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
@@ -4833,10 +4893,7 @@ function DataTable({
4833
4893
  "tr",
4834
4894
  {
4835
4895
  className: "border-b border-inherit last:border-0",
4836
- children: columns.map((col) => {
4837
- var _a;
4838
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("td", { className: "px-4 py-3", children: col.render ? col.render(row) : String((_a = row[col.key]) != null ? _a : "") }, String(col.key));
4839
- })
4896
+ children: columns.map((col) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("td", { className: "px-4 py-3", children: col.render ? col.render(row) : String(row[col.key] ?? "") }, String(col.key)))
4840
4897
  },
4841
4898
  getRowKey ? getRowKey(row, i) : i
4842
4899
  )) })
@@ -4860,23 +4917,23 @@ function useKeyboardNavigation(options) {
4860
4917
  (e) => {
4861
4918
  if (!enabled) return;
4862
4919
  if (e.key === "Escape") {
4863
- onEscape == null ? void 0 : onEscape(e);
4920
+ onEscape?.(e);
4864
4921
  return;
4865
4922
  }
4866
4923
  if (e.key === "ArrowDown") {
4867
- onArrowDown == null ? void 0 : onArrowDown(e);
4924
+ onArrowDown?.(e);
4868
4925
  return;
4869
4926
  }
4870
4927
  if (e.key === "ArrowUp") {
4871
- onArrowUp == null ? void 0 : onArrowUp(e);
4928
+ onArrowUp?.(e);
4872
4929
  return;
4873
4930
  }
4874
4931
  if (e.key === "ArrowLeft") {
4875
- onArrowLeft == null ? void 0 : onArrowLeft(e);
4932
+ onArrowLeft?.(e);
4876
4933
  return;
4877
4934
  }
4878
4935
  if (e.key === "ArrowRight") {
4879
- onArrowRight == null ? void 0 : onArrowRight(e);
4936
+ onArrowRight?.(e);
4880
4937
  }
4881
4938
  },
4882
4939
  [enabled, onEscape, onArrowDown, onArrowUp, onArrowLeft, onArrowRight]
@@ -4898,7 +4955,7 @@ function getNextListIndex(current, direction, length) {
4898
4955
  // src/hooks/useClickOutside.ts
4899
4956
  var import_react14 = require("react");
4900
4957
  function useClickOutside(ref, handler, options) {
4901
- const enabled = (options == null ? void 0 : options.enabled) !== false;
4958
+ const enabled = options?.enabled !== false;
4902
4959
  const handle = (0, import_react14.useCallback)(
4903
4960
  (e) => {
4904
4961
  const target = e.target;
@@ -4923,43 +4980,84 @@ function useClickOutside(ref, handler, options) {
4923
4980
 
4924
4981
  // components/Dropdown.tsx
4925
4982
  var import_react15 = require("react");
4983
+ var import_react_dom = require("react-dom");
4926
4984
  var import_jsx_runtime15 = require("react/jsx-runtime");
4985
+ function dropdownItemHighlightClass(theme) {
4986
+ const darkThemes = ["night", "cyberpunk"];
4987
+ return darkThemes.includes(theme) ? "hover:bg-white/10 focus:bg-white/10" : "hover:bg-black/5 focus:bg-black/5";
4988
+ }
4927
4989
  function Dropdown({
4928
- trigger,
4990
+ trigger: triggerProp,
4991
+ placeholder = "Select\u2026",
4929
4992
  items,
4930
4993
  value: controlledValue,
4931
4994
  defaultValue,
4932
4995
  onValueChange,
4933
4996
  className,
4934
4997
  style,
4935
- theme: themeProp
4998
+ theme: themeProp,
4999
+ classNames = {}
4936
5000
  }) {
4937
5001
  const [open, setOpen] = (0, import_react15.useState)(false);
4938
- const [uncontrolledValue, setUncontrolledValue] = (0, import_react15.useState)(defaultValue != null ? defaultValue : "");
5002
+ const [uncontrolledValue, setUncontrolledValue] = (0, import_react15.useState)(defaultValue ?? "");
4939
5003
  const isControlled = controlledValue !== void 0;
4940
5004
  const displayValue = isControlled ? controlledValue : uncontrolledValue;
4941
5005
  const [highlightedIndex, setHighlightedIndex] = (0, import_react15.useState)(-1);
5006
+ const [popoverStyle, setPopoverStyle] = (0, import_react15.useState)({});
4942
5007
  const listRef = (0, import_react15.useRef)(null);
4943
5008
  const containerRef = (0, import_react15.useRef)(null);
5009
+ const triggerRef = (0, import_react15.useRef)(null);
4944
5010
  const { theme: contextTheme } = useTheme();
4945
- const theme = themeProp != null ? themeProp : contextTheme;
5011
+ const theme = themeProp ?? contextTheme;
4946
5012
  const themeClass = getThemeClass(theme, "card", "default");
5013
+ const itemHighlightClass = dropdownItemHighlightClass(theme);
5014
+ const updatePosition = (0, import_react15.useCallback)(() => {
5015
+ const triggerEl = triggerRef.current;
5016
+ if (!triggerEl) return;
5017
+ const rect = triggerEl.getBoundingClientRect();
5018
+ const viewportH = window.innerHeight;
5019
+ const spaceBelow = viewportH - rect.bottom;
5020
+ const spaceAbove = rect.top;
5021
+ const openDown = spaceBelow >= spaceAbove;
5022
+ setPopoverStyle({
5023
+ position: "fixed",
5024
+ left: rect.left,
5025
+ width: Math.max(rect.width, 128),
5026
+ ...openDown ? { top: rect.bottom + 4 } : { bottom: viewportH - rect.top + 4 },
5027
+ zIndex: 9999
5028
+ });
5029
+ }, []);
5030
+ (0, import_react15.useLayoutEffect)(() => {
5031
+ if (open) {
5032
+ updatePosition();
5033
+ }
5034
+ }, [open, updatePosition, items.length]);
5035
+ (0, import_react15.useEffect)(() => {
5036
+ if (!open) return;
5037
+ const onScrollOrResize = () => updatePosition();
5038
+ window.addEventListener("scroll", onScrollOrResize, true);
5039
+ window.addEventListener("resize", onScrollOrResize);
5040
+ return () => {
5041
+ window.removeEventListener("scroll", onScrollOrResize, true);
5042
+ window.removeEventListener("resize", onScrollOrResize);
5043
+ };
5044
+ }, [open, updatePosition]);
4947
5045
  useClickOutside(
4948
- containerRef,
5046
+ [containerRef, listRef],
4949
5047
  (0, import_react15.useCallback)(() => setOpen(false), []),
4950
5048
  { enabled: open }
4951
5049
  );
4952
5050
  const setValue = (0, import_react15.useCallback)(
4953
5051
  (v) => {
4954
5052
  if (!isControlled) setUncontrolledValue(v);
4955
- onValueChange == null ? void 0 : onValueChange(v);
5053
+ onValueChange?.(v);
4956
5054
  },
4957
5055
  [isControlled, onValueChange]
4958
5056
  );
4959
5057
  const selectIndex = (0, import_react15.useCallback)(
4960
5058
  (index) => {
4961
5059
  const item = items[index];
4962
- if (item == null ? void 0 : item.disabled) return;
5060
+ if (item?.disabled) return;
4963
5061
  setValue(item.value);
4964
5062
  setOpen(false);
4965
5063
  setHighlightedIndex(-1);
@@ -4976,7 +5074,6 @@ function Dropdown({
4976
5074
  }, [open, displayValue, items]);
4977
5075
  const handleKeyDown = (0, import_react15.useCallback)(
4978
5076
  (e) => {
4979
- var _a, _b, _c, _d, _e, _f;
4980
5077
  if (!open) {
4981
5078
  if (e.key === "Enter" || e.key === " " || e.key === "ArrowDown") {
4982
5079
  e.preventDefault();
@@ -4994,14 +5091,14 @@ function Dropdown({
4994
5091
  e.preventDefault();
4995
5092
  const next = getNextListIndex(highlightedIndex, "down", items.length);
4996
5093
  setHighlightedIndex(next);
4997
- (_c = (_b = (_a = listRef.current) == null ? void 0 : _a.querySelectorAll("[role='option']")[next]) == null ? void 0 : _b.scrollIntoView) == null ? void 0 : _c.call(_b, { block: "nearest" });
5094
+ listRef.current?.querySelectorAll("[role='option']")[next]?.scrollIntoView?.({ block: "nearest" });
4998
5095
  return;
4999
5096
  }
5000
5097
  if (e.key === "ArrowUp") {
5001
5098
  e.preventDefault();
5002
5099
  const next = getNextListIndex(highlightedIndex, "up", items.length);
5003
5100
  setHighlightedIndex(next);
5004
- (_f = (_e = (_d = listRef.current) == null ? void 0 : _d.querySelectorAll("[role='option']")[next]) == null ? void 0 : _e.scrollIntoView) == null ? void 0 : _f.call(_e, { block: "nearest" });
5101
+ listRef.current?.querySelectorAll("[role='option']")[next]?.scrollIntoView?.({ block: "nearest" });
5005
5102
  return;
5006
5103
  }
5007
5104
  if (e.key === "Enter" || e.key === " ") {
@@ -5011,6 +5108,55 @@ function Dropdown({
5011
5108
  },
5012
5109
  [open, highlightedIndex, items.length, selectIndex]
5013
5110
  );
5111
+ const selectedLabel = displayValue ? items.find((i) => i.value === displayValue)?.label ?? displayValue : placeholder;
5112
+ const defaultTrigger = /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
5113
+ "span",
5114
+ {
5115
+ className: cn(
5116
+ "inline-flex min-w-[8rem] cursor-pointer items-center justify-between rounded-lg border border-transparent px-3 py-2 text-sm font-medium transition-colors",
5117
+ itemHighlightClass,
5118
+ classNames.trigger
5119
+ ),
5120
+ children: [
5121
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "truncate", children: selectedLabel }),
5122
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "ml-1 shrink-0 opacity-70", "aria-hidden": true, children: "\u25BE" })
5123
+ ]
5124
+ }
5125
+ );
5126
+ const trigger = triggerProp ?? defaultTrigger;
5127
+ const popover = open ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
5128
+ "ul",
5129
+ {
5130
+ ref: listRef,
5131
+ role: "listbox",
5132
+ className: cn(
5133
+ "max-h-60 overflow-auto rounded-lg py-1 shadow-lg",
5134
+ themeClass,
5135
+ classNames.popover
5136
+ ),
5137
+ style: popoverStyle,
5138
+ children: items.map((item, i) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
5139
+ "li",
5140
+ {
5141
+ id: `dropdown-option-${item.value}`,
5142
+ role: "option",
5143
+ "aria-selected": displayValue === item.value,
5144
+ "aria-disabled": item.disabled,
5145
+ className: cn(
5146
+ "cursor-pointer px-3 py-2 text-sm outline-none",
5147
+ itemHighlightClass,
5148
+ highlightedIndex === i && (theme === "night" || theme === "cyberpunk" ? "bg-white/10" : "bg-black/5"),
5149
+ item.disabled && "pointer-events-none opacity-50",
5150
+ classNames.item
5151
+ ),
5152
+ onClick: () => !item.disabled && selectIndex(i),
5153
+ onMouseEnter: () => setHighlightedIndex(i),
5154
+ children: item.label
5155
+ },
5156
+ item.value
5157
+ ))
5158
+ }
5159
+ ) : null;
5014
5160
  return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
5015
5161
  "div",
5016
5162
  {
@@ -5022,6 +5168,7 @@ function Dropdown({
5022
5168
  /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
5023
5169
  "div",
5024
5170
  {
5171
+ ref: triggerRef,
5025
5172
  role: "button",
5026
5173
  tabIndex: 0,
5027
5174
  "aria-haspopup": "listbox",
@@ -5031,35 +5178,7 @@ function Dropdown({
5031
5178
  children: trigger
5032
5179
  }
5033
5180
  ),
5034
- open && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
5035
- "ul",
5036
- {
5037
- ref: listRef,
5038
- role: "listbox",
5039
- className: cn(
5040
- "absolute z-50 mt-1 max-h-60 w-full min-w-[8rem] overflow-auto rounded-lg py-1 shadow-lg",
5041
- themeClass
5042
- ),
5043
- children: items.map((item, i) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
5044
- "li",
5045
- {
5046
- id: `dropdown-option-${item.value}`,
5047
- role: "option",
5048
- "aria-selected": displayValue === item.value,
5049
- "aria-disabled": item.disabled,
5050
- className: cn(
5051
- "cursor-pointer px-3 py-2 text-sm outline-none focus:bg-black/5 focus:dark:bg-white/10",
5052
- highlightedIndex === i && "bg-black/5 dark:bg-white/10",
5053
- item.disabled && "pointer-events-none opacity-50"
5054
- ),
5055
- onClick: () => !item.disabled && selectIndex(i),
5056
- onMouseEnter: () => setHighlightedIndex(i),
5057
- children: item.label
5058
- },
5059
- item.value
5060
- ))
5061
- }
5062
- )
5181
+ typeof document !== "undefined" && (0, import_react_dom.createPortal)(popover, document.body)
5063
5182
  ]
5064
5183
  }
5065
5184
  );
@@ -5337,7 +5456,10 @@ for (const key in featureProps) {
5337
5456
  // node_modules/framer-motion/dist/es/motion/features/load-features.mjs
5338
5457
  function loadFeatures(features) {
5339
5458
  for (const key in features) {
5340
- featureDefinitions[key] = __spreadValues(__spreadValues({}, featureDefinitions[key]), features[key]);
5459
+ featureDefinitions[key] = {
5460
+ ...featureDefinitions[key],
5461
+ ...features[key]
5462
+ };
5341
5463
  }
5342
5464
  }
5343
5465
 
@@ -5655,9 +5777,11 @@ function createRendererMotionComponent({ preloadedFeatures, createVisualElement,
5655
5777
  preloadedFeatures && loadFeatures(preloadedFeatures);
5656
5778
  function MotionComponent(props, externalRef) {
5657
5779
  let MeasureLayout2;
5658
- const configAndProps = __spreadProps(__spreadValues(__spreadValues({}, (0, import_react28.useContext)(MotionConfigContext)), props), {
5780
+ const configAndProps = {
5781
+ ...(0, import_react28.useContext)(MotionConfigContext),
5782
+ ...props,
5659
5783
  layoutId: useLayoutId(props)
5660
- });
5784
+ };
5661
5785
  const { isStatic } = configAndProps;
5662
5786
  const context = useCreateMotionContext(props);
5663
5787
  const visualState = useVisualState(props, isStatic);
@@ -5667,7 +5791,7 @@ function createRendererMotionComponent({ preloadedFeatures, createVisualElement,
5667
5791
  MeasureLayout2 = layoutProjection.MeasureLayout;
5668
5792
  context.visualElement = useVisualElement(Component2, visualState, configAndProps, createVisualElement, layoutProjection.ProjectionNode);
5669
5793
  }
5670
- return (0, import_jsx_runtime16.jsxs)(MotionContext.Provider, { value: context, children: [MeasureLayout2 && context.visualElement ? (0, import_jsx_runtime16.jsx)(MeasureLayout2, __spreadValues({ visualElement: context.visualElement }, configAndProps)) : null, useRender(Component2, props, useMotionRef(visualState, context.visualElement, externalRef), visualState, isStatic, context.visualElement)] });
5794
+ return (0, import_jsx_runtime16.jsxs)(MotionContext.Provider, { value: context, children: [MeasureLayout2 && context.visualElement ? (0, import_jsx_runtime16.jsx)(MeasureLayout2, { visualElement: context.visualElement, ...configAndProps }) : null, useRender(Component2, props, useMotionRef(visualState, context.visualElement, externalRef), visualState, isStatic, context.visualElement)] });
5671
5795
  }
5672
5796
  MotionComponent.displayName = `motion.${typeof Component2 === "string" ? Component2 : `create(${(_b = (_a = Component2.displayName) !== null && _a !== void 0 ? _a : Component2.name) !== null && _b !== void 0 ? _b : ""})`}`;
5673
5797
  const ForwardRefMotionComponent = (0, import_react28.forwardRef)(MotionComponent);
@@ -5689,7 +5813,7 @@ function getProjectionFunctionality(props) {
5689
5813
  const { drag: drag2, layout: layout2 } = featureDefinitions;
5690
5814
  if (!drag2 && !layout2)
5691
5815
  return {};
5692
- const combined = __spreadValues(__spreadValues({}, drag2), layout2);
5816
+ const combined = { ...drag2, ...layout2 };
5693
5817
  return {
5694
5818
  MeasureLayout: (drag2 === null || drag2 === void 0 ? void 0 : drag2.isEnabled(props)) || (layout2 === null || layout2 === void 0 ? void 0 : layout2.isEnabled(props)) ? combined.MeasureLayout : void 0,
5695
5819
  ProjectionNode: combined.ProjectionNode
@@ -5808,7 +5932,7 @@ function makeState({ scrapeMotionValuesFromProps: scrapeMotionValuesFromProps3,
5808
5932
  renderState: createRenderState()
5809
5933
  };
5810
5934
  if (onUpdate) {
5811
- state.onMount = (instance) => onUpdate(__spreadValues({ props, current: instance }, state));
5935
+ state.onMount = (instance) => onUpdate({ props, current: instance, ...state });
5812
5936
  state.onUpdate = (visualElement) => onUpdate(visualElement);
5813
5937
  }
5814
5938
  return state;
@@ -5842,7 +5966,7 @@ function makeLatestValues(props, context, presenceContext, scrapeMotionValues) {
5842
5966
  for (let i = 0; i < list.length; i++) {
5843
5967
  const resolved = resolveVariantFromProps(props, list[i]);
5844
5968
  if (resolved) {
5845
- const _a = resolved, { transitionEnd, transition } = _a, target = __objRest(_a, ["transitionEnd", "transition"]);
5969
+ const { transitionEnd, transition, ...target } = resolved;
5846
5970
  for (const key in target) {
5847
5971
  let valueTarget = target[key];
5848
5972
  if (Array.isArray(valueTarget)) {
@@ -5916,12 +6040,14 @@ var number = {
5916
6040
  parse: parseFloat,
5917
6041
  transform: (v) => v
5918
6042
  };
5919
- var alpha = __spreadProps(__spreadValues({}, number), {
6043
+ var alpha = {
6044
+ ...number,
5920
6045
  transform: (v) => clamp(0, 1, v)
5921
- });
5922
- var scale = __spreadProps(__spreadValues({}, number), {
6046
+ };
6047
+ var scale = {
6048
+ ...number,
5923
6049
  default: 1
5924
- });
6050
+ };
5925
6051
 
5926
6052
  // node_modules/framer-motion/dist/es/value/types/numbers/units.mjs
5927
6053
  var createUnitType = (unit) => ({
@@ -5934,10 +6060,11 @@ var percent = /* @__PURE__ */ createUnitType("%");
5934
6060
  var px = /* @__PURE__ */ createUnitType("px");
5935
6061
  var vh = /* @__PURE__ */ createUnitType("vh");
5936
6062
  var vw = /* @__PURE__ */ createUnitType("vw");
5937
- var progressPercentage = __spreadProps(__spreadValues({}, percent), {
6063
+ var progressPercentage = {
6064
+ ...percent,
5938
6065
  parse: (v) => percent.parse(v) / 100,
5939
6066
  transform: (v) => percent.transform(v * 100)
5940
- });
6067
+ };
5941
6068
 
5942
6069
  // node_modules/framer-motion/dist/es/render/dom/value-types/number-browser.mjs
5943
6070
  var browserNumberValueTypes = {
@@ -6007,19 +6134,22 @@ var transformValueTypes = {
6007
6134
  };
6008
6135
 
6009
6136
  // node_modules/framer-motion/dist/es/render/dom/value-types/type-int.mjs
6010
- var int = __spreadProps(__spreadValues({}, number), {
6137
+ var int = {
6138
+ ...number,
6011
6139
  transform: Math.round
6012
- });
6140
+ };
6013
6141
 
6014
6142
  // node_modules/framer-motion/dist/es/render/dom/value-types/number.mjs
6015
- var numberValueTypes = __spreadProps(__spreadValues(__spreadValues({}, browserNumberValueTypes), transformValueTypes), {
6143
+ var numberValueTypes = {
6144
+ ...browserNumberValueTypes,
6145
+ ...transformValueTypes,
6016
6146
  zIndex: int,
6017
6147
  size: px,
6018
6148
  // SVG
6019
6149
  fillOpacity: alpha,
6020
6150
  strokeOpacity: alpha,
6021
6151
  numOctaves: int
6022
- });
6152
+ };
6023
6153
 
6024
6154
  // node_modules/framer-motion/dist/es/render/html/utils/build-transform.mjs
6025
6155
  var translateAlias = {
@@ -6129,26 +6259,18 @@ function calcSVGTransformOrigin(dimensions, originX, originY) {
6129
6259
  }
6130
6260
 
6131
6261
  // node_modules/framer-motion/dist/es/render/svg/utils/build-attrs.mjs
6132
- function buildSVGAttrs(state, _a, isSVGTag2, transformTemplate) {
6133
- var _b = _a, {
6134
- attrX,
6135
- attrY,
6136
- attrScale,
6137
- originX,
6138
- originY,
6139
- pathLength,
6140
- pathSpacing = 1,
6141
- pathOffset = 0
6142
- } = _b, latest = __objRest(_b, [
6143
- "attrX",
6144
- "attrY",
6145
- "attrScale",
6146
- "originX",
6147
- "originY",
6148
- "pathLength",
6149
- "pathSpacing",
6150
- "pathOffset"
6151
- ]);
6262
+ function buildSVGAttrs(state, {
6263
+ attrX,
6264
+ attrY,
6265
+ attrScale,
6266
+ originX,
6267
+ originY,
6268
+ pathLength,
6269
+ pathSpacing = 1,
6270
+ pathOffset = 0,
6271
+ // This is object creation, which we try to avoid per-frame.
6272
+ ...latest
6273
+ }, isSVGTag2, transformTemplate) {
6152
6274
  buildHTMLStyles(state, latest, transformTemplate);
6153
6275
  if (isSVGTag2) {
6154
6276
  if (state.style.viewBox) {
@@ -6187,7 +6309,8 @@ var createHtmlRenderState = () => ({
6187
6309
  });
6188
6310
 
6189
6311
  // node_modules/framer-motion/dist/es/render/svg/utils/create-render-state.mjs
6190
- var createSvgRenderState = () => __spreadProps(__spreadValues({}, createHtmlRenderState()), {
6312
+ var createSvgRenderState = () => ({
6313
+ ...createHtmlRenderState(),
6191
6314
  attrs: {}
6192
6315
  });
6193
6316
 
@@ -6382,14 +6505,15 @@ function useSVGProps(props, visualState, _isStatic, Component2) {
6382
6505
  const visualProps = (0, import_react31.useMemo)(() => {
6383
6506
  const state = createSvgRenderState();
6384
6507
  buildSVGAttrs(state, visualState, isSVGTag(Component2), props.transformTemplate);
6385
- return __spreadProps(__spreadValues({}, state.attrs), {
6386
- style: __spreadValues({}, state.style)
6387
- });
6508
+ return {
6509
+ ...state.attrs,
6510
+ style: { ...state.style }
6511
+ };
6388
6512
  }, [visualState]);
6389
6513
  if (props.style) {
6390
6514
  const rawStyles = {};
6391
6515
  copyRawValuesOnly(rawStyles, props.style, props);
6392
- visualProps.style = __spreadValues(__spreadValues({}, rawStyles), visualProps.style);
6516
+ visualProps.style = { ...rawStyles, ...visualProps.style };
6393
6517
  }
6394
6518
  return visualProps;
6395
6519
  }
@@ -6400,12 +6524,13 @@ function createUseRender(forwardMotionProps = false) {
6400
6524
  const useVisualProps = isSVGComponent(Component2) ? useSVGProps : useHTMLProps;
6401
6525
  const visualProps = useVisualProps(props, latestValues, isStatic, Component2);
6402
6526
  const filteredProps = filterProps(props, typeof Component2 === "string", forwardMotionProps);
6403
- const elementProps = Component2 !== import_react32.Fragment ? __spreadProps(__spreadValues(__spreadValues({}, filteredProps), visualProps), { ref }) : {};
6527
+ const elementProps = Component2 !== import_react32.Fragment ? { ...filteredProps, ...visualProps, ref } : {};
6404
6528
  const { children } = props;
6405
6529
  const renderedChildren = (0, import_react32.useMemo)(() => isMotionValue(children) ? children.get() : children, [children]);
6406
- return (0, import_react32.createElement)(Component2, __spreadProps(__spreadValues({}, elementProps), {
6530
+ return (0, import_react32.createElement)(Component2, {
6531
+ ...elementProps,
6407
6532
  children: renderedChildren
6408
- }));
6533
+ });
6409
6534
  };
6410
6535
  return useRender;
6411
6536
  }
@@ -6414,12 +6539,13 @@ function createUseRender(forwardMotionProps = false) {
6414
6539
  function createMotionComponentFactory(preloadedFeatures, createVisualElement) {
6415
6540
  return function createMotionComponent2(Component2, { forwardMotionProps } = { forwardMotionProps: false }) {
6416
6541
  const baseConfig = isSVGComponent(Component2) ? svgMotionConfig : htmlMotionConfig;
6417
- const config = __spreadProps(__spreadValues({}, baseConfig), {
6542
+ const config = {
6543
+ ...baseConfig,
6418
6544
  preloadedFeatures,
6419
6545
  useRender: createUseRender(forwardMotionProps),
6420
6546
  createVisualElement,
6421
6547
  Component: Component2
6422
- });
6548
+ };
6423
6549
  return createRendererMotionComponent(config);
6424
6550
  };
6425
6551
  }
@@ -6656,11 +6782,11 @@ function resolveElements(elementOrSelector, scope, selectorCache) {
6656
6782
  function setupGesture(elementOrSelector, options) {
6657
6783
  const elements = resolveElements(elementOrSelector);
6658
6784
  const gestureAbortController = new AbortController();
6659
- const eventOptions = __spreadProps(__spreadValues({
6660
- passive: true
6661
- }, options), {
6785
+ const eventOptions = {
6786
+ passive: true,
6787
+ ...options,
6662
6788
  signal: gestureAbortController.signal
6663
- });
6789
+ };
6664
6790
  const cancel = () => gestureAbortController.abort();
6665
6791
  return [elements, eventOptions, cancel];
6666
6792
  }
@@ -7182,8 +7308,8 @@ function setMotionValue(visualElement, key, value) {
7182
7308
  }
7183
7309
  function setTarget(visualElement, definition) {
7184
7310
  const resolved = resolveVariant(visualElement, definition);
7185
- let _a = resolved || {}, { transitionEnd = {}, transition = {} } = _a, target = __objRest(_a, ["transitionEnd", "transition"]);
7186
- target = __spreadValues(__spreadValues({}, target), transitionEnd);
7311
+ let { transitionEnd = {}, transition = {}, ...target } = resolved || {};
7312
+ target = { ...target, ...transitionEnd };
7187
7313
  for (const key in target) {
7188
7314
  const value = resolveFinalValueInKeyframes(target[key]);
7189
7315
  setMotionValue(visualElement, key, value);
@@ -7304,9 +7430,10 @@ var splitColor = (aName, bName, cName) => (v) => {
7304
7430
 
7305
7431
  // node_modules/framer-motion/dist/es/value/types/color/rgba.mjs
7306
7432
  var clampRgbUnit = (v) => clamp(0, 255, v);
7307
- var rgbUnit = __spreadProps(__spreadValues({}, number), {
7433
+ var rgbUnit = {
7434
+ ...number,
7308
7435
  transform: (v) => Math.round(clampRgbUnit(v))
7309
- });
7436
+ };
7310
7437
  var rgba = {
7311
7438
  test: /* @__PURE__ */ isColorString("rgb", "red"),
7312
7439
  parse: /* @__PURE__ */ splitColor("red", "green", "blue"),
@@ -7470,15 +7597,17 @@ function applyDefaultFilter(v) {
7470
7597
  return name + "(" + defaultValue + unit + ")";
7471
7598
  }
7472
7599
  var functionRegex = /\b([a-z-]*)\(.*?\)/gu;
7473
- var filter = __spreadProps(__spreadValues({}, complex), {
7600
+ var filter = {
7601
+ ...complex,
7474
7602
  getAnimatableNone: (v) => {
7475
7603
  const functions = v.match(functionRegex);
7476
7604
  return functions ? functions.map(applyDefaultFilter).join(" ") : v;
7477
7605
  }
7478
- });
7606
+ };
7479
7607
 
7480
7608
  // node_modules/framer-motion/dist/es/render/dom/value-types/defaults.mjs
7481
- var defaultValueTypes = __spreadProps(__spreadValues({}, numberValueTypes), {
7609
+ var defaultValueTypes = {
7610
+ ...numberValueTypes,
7482
7611
  // Color props
7483
7612
  color,
7484
7613
  backgroundColor: color,
@@ -7493,7 +7622,7 @@ var defaultValueTypes = __spreadProps(__spreadValues({}, numberValueTypes), {
7493
7622
  borderLeftColor: color,
7494
7623
  filter,
7495
7624
  WebkitFilter: filter
7496
- });
7625
+ };
7497
7626
  var getDefaultValueType = (key) => defaultValueTypes[key];
7498
7627
 
7499
7628
  // node_modules/framer-motion/dist/es/render/dom/value-types/animatable-none.mjs
@@ -7885,19 +8014,19 @@ function getFinalKeyframe(keyframes2, { repeat, repeatType = "loop" }, finalKeyf
7885
8014
  // node_modules/framer-motion/dist/es/animation/animators/BaseAnimation.mjs
7886
8015
  var MAX_RESOLVE_DELAY = 40;
7887
8016
  var BaseAnimation = class {
7888
- constructor(_a) {
7889
- var _b = _a, { autoplay = true, delay: delay2 = 0, type = "keyframes", repeat = 0, repeatDelay = 0, repeatType = "loop" } = _b, options = __objRest(_b, ["autoplay", "delay", "type", "repeat", "repeatDelay", "repeatType"]);
8017
+ constructor({ autoplay = true, delay: delay2 = 0, type = "keyframes", repeat = 0, repeatDelay = 0, repeatType = "loop", ...options }) {
7890
8018
  this.isStopped = false;
7891
8019
  this.hasAttemptedResolve = false;
7892
8020
  this.createdAt = time.now();
7893
- this.options = __spreadValues({
8021
+ this.options = {
7894
8022
  autoplay,
7895
8023
  delay: delay2,
7896
8024
  type,
7897
8025
  repeat,
7898
8026
  repeatDelay,
7899
- repeatType
7900
- }, options);
8027
+ repeatType,
8028
+ ...options
8029
+ };
7901
8030
  this.updateFinishedPromise();
7902
8031
  }
7903
8032
  /**
@@ -7948,10 +8077,11 @@ var BaseAnimation = class {
7948
8077
  const resolvedAnimation = this.initPlayback(keyframes2, finalKeyframe);
7949
8078
  if (resolvedAnimation === false)
7950
8079
  return;
7951
- this._resolved = __spreadValues({
8080
+ this._resolved = {
7952
8081
  keyframes: keyframes2,
7953
- finalKeyframe
7954
- }, resolvedAnimation);
8082
+ finalKeyframe,
8083
+ ...resolvedAnimation
8084
+ };
7955
8085
  this.onPostResolved();
7956
8086
  }
7957
8087
  onPostResolved() {
@@ -8048,7 +8178,7 @@ var mixColor = (from, to) => {
8048
8178
  if (!fromRGBA || !toRGBA) {
8049
8179
  return mixImmediate(from, to);
8050
8180
  }
8051
- const blended = __spreadValues({}, fromRGBA);
8181
+ const blended = { ...fromRGBA };
8052
8182
  return (v) => {
8053
8183
  blended.red = mixLinearColor(fromRGBA.red, toRGBA.red, v);
8054
8184
  blended.green = mixLinearColor(fromRGBA.green, toRGBA.green, v);
@@ -8100,7 +8230,7 @@ function mixArray(a, b) {
8100
8230
  };
8101
8231
  }
8102
8232
  function mixObject(a, b) {
8103
- const output = __spreadValues(__spreadValues({}, a), b);
8233
+ const output = { ...a, ...b };
8104
8234
  const blendValue = {};
8105
8235
  for (const key in output) {
8106
8236
  if (a[key] !== void 0 && b[key] !== void 0) {
@@ -8267,29 +8397,33 @@ function isSpringType(options, keys) {
8267
8397
  return keys.some((key) => options[key] !== void 0);
8268
8398
  }
8269
8399
  function getSpringOptions(options) {
8270
- let springOptions = __spreadValues({
8400
+ let springOptions = {
8271
8401
  velocity: springDefaults.velocity,
8272
8402
  stiffness: springDefaults.stiffness,
8273
8403
  damping: springDefaults.damping,
8274
8404
  mass: springDefaults.mass,
8275
- isResolvedFromDuration: false
8276
- }, options);
8405
+ isResolvedFromDuration: false,
8406
+ ...options
8407
+ };
8277
8408
  if (!isSpringType(options, physicsKeys) && isSpringType(options, durationKeys)) {
8278
8409
  if (options.visualDuration) {
8279
8410
  const visualDuration = options.visualDuration;
8280
8411
  const root = 2 * Math.PI / (visualDuration * 1.2);
8281
8412
  const stiffness = root * root;
8282
8413
  const damping = 2 * clamp(0.05, 1, 1 - (options.bounce || 0)) * Math.sqrt(stiffness);
8283
- springOptions = __spreadProps(__spreadValues({}, springOptions), {
8414
+ springOptions = {
8415
+ ...springOptions,
8284
8416
  mass: springDefaults.mass,
8285
8417
  stiffness,
8286
8418
  damping
8287
- });
8419
+ };
8288
8420
  } else {
8289
8421
  const derived = findSpring(options);
8290
- springOptions = __spreadProps(__spreadValues(__spreadValues({}, springOptions), derived), {
8422
+ springOptions = {
8423
+ ...springOptions,
8424
+ ...derived,
8291
8425
  mass: springDefaults.mass
8292
- });
8426
+ };
8293
8427
  springOptions.isResolvedFromDuration = true;
8294
8428
  }
8295
8429
  }
@@ -8305,9 +8439,10 @@ function spring(optionsOrVisualDuration = springDefaults.visualDuration, bounce
8305
8439
  const origin = options.keyframes[0];
8306
8440
  const target = options.keyframes[options.keyframes.length - 1];
8307
8441
  const state = { done: false, value: origin };
8308
- const { stiffness, damping, mass, duration, velocity, isResolvedFromDuration } = getSpringOptions(__spreadProps(__spreadValues({}, options), {
8442
+ const { stiffness, damping, mass, duration, velocity, isResolvedFromDuration } = getSpringOptions({
8443
+ ...options,
8309
8444
  velocity: -millisecondsToSeconds(options.velocity || 0)
8310
- }));
8445
+ });
8311
8446
  const initialVelocity = velocity || 0;
8312
8447
  const dampingRatio = damping / (2 * Math.sqrt(stiffness * mass));
8313
8448
  const initialDelta = target - origin;
@@ -8620,12 +8755,13 @@ var MainThreadAnimation = class extends BaseAnimation {
8620
8755
  mapPercentToKeyframes = pipe(percentToProgress, mix(keyframes$1[0], keyframes$1[1]));
8621
8756
  keyframes$1 = [0, 100];
8622
8757
  }
8623
- const generator = generatorFactory(__spreadProps(__spreadValues({}, this.options), { keyframes: keyframes$1 }));
8758
+ const generator = generatorFactory({ ...this.options, keyframes: keyframes$1 });
8624
8759
  if (repeatType === "mirror") {
8625
- mirroredGenerator = generatorFactory(__spreadProps(__spreadValues({}, this.options), {
8760
+ mirroredGenerator = generatorFactory({
8761
+ ...this.options,
8626
8762
  keyframes: [...keyframes$1].reverse(),
8627
8763
  velocity: -velocity
8628
- }));
8764
+ });
8629
8765
  }
8630
8766
  if (generator.calculatedDuration === null) {
8631
8767
  generator.calculatedDuration = calcGeneratorDuration(generator);
@@ -8868,12 +9004,13 @@ function requiresPregeneratedKeyframes(options) {
8868
9004
  return isGenerator(options.type) || options.type === "spring" || !isWaapiSupportedEasing(options.ease);
8869
9005
  }
8870
9006
  function pregenerateKeyframes(keyframes2, options) {
8871
- const sampleAnimation = new MainThreadAnimation(__spreadProps(__spreadValues({}, options), {
9007
+ const sampleAnimation = new MainThreadAnimation({
9008
+ ...options,
8872
9009
  keyframes: keyframes2,
8873
9010
  repeat: 0,
8874
9011
  delay: 0,
8875
9012
  isGenerator: true
8876
- }));
9013
+ });
8877
9014
  let state = { done: false, value: keyframes2[0] };
8878
9015
  const pregeneratedKeyframes = [];
8879
9016
  let t = 0;
@@ -8913,7 +9050,7 @@ var AcceleratedAnimation = class extends BaseAnimation {
8913
9050
  ease2 = unsupportedEasingFunctions[ease2];
8914
9051
  }
8915
9052
  if (requiresPregeneratedKeyframes(this.options)) {
8916
- const _a = this.options, { onComplete, onUpdate, motionValue: motionValue3, element } = _a, options = __objRest(_a, ["onComplete", "onUpdate", "motionValue", "element"]);
9053
+ const { onComplete, onUpdate, motionValue: motionValue3, element, ...options } = this.options;
8917
9054
  const pregeneratedAnimation = pregenerateKeyframes(keyframes2, options);
8918
9055
  keyframes2 = pregeneratedAnimation.keyframes;
8919
9056
  if (keyframes2.length === 1) {
@@ -8924,7 +9061,7 @@ var AcceleratedAnimation = class extends BaseAnimation {
8924
9061
  ease2 = pregeneratedAnimation.ease;
8925
9062
  type = "keyframes";
8926
9063
  }
8927
- const animation = startWaapiAnimation(motionValue2.owner.current, name, keyframes2, __spreadProps(__spreadValues({}, this.options), { duration, times, ease: ease2 }));
9064
+ const animation = startWaapiAnimation(motionValue2.owner.current, name, keyframes2, { ...this.options, duration, times, ease: ease2 });
8928
9065
  animation.startTime = startTime !== null && startTime !== void 0 ? startTime : this.calcStartTime();
8929
9066
  if (this.pendingTimeline) {
8930
9067
  attachTimeline(animation, this.pendingTimeline);
@@ -9046,15 +9183,16 @@ var AcceleratedAnimation = class extends BaseAnimation {
9046
9183
  return;
9047
9184
  }
9048
9185
  if (this.time) {
9049
- const _a = this.options, { motionValue: motionValue2, onUpdate, onComplete, element } = _a, options = __objRest(_a, ["motionValue", "onUpdate", "onComplete", "element"]);
9050
- const sampleAnimation = new MainThreadAnimation(__spreadProps(__spreadValues({}, options), {
9186
+ const { motionValue: motionValue2, onUpdate, onComplete, element, ...options } = this.options;
9187
+ const sampleAnimation = new MainThreadAnimation({
9188
+ ...options,
9051
9189
  keyframes: keyframes2,
9052
9190
  duration,
9053
9191
  type,
9054
9192
  ease: ease2,
9055
9193
  times,
9056
9194
  isGenerator: true
9057
- }));
9195
+ });
9058
9196
  const sampleTime = secondsToMilliseconds(this.time);
9059
9197
  motionValue2.setWithVelocity(sampleAnimation.sample(sampleTime - sampleDelta).value, sampleAnimation.sample(sampleTime).value, sampleDelta);
9060
9198
  }
@@ -9120,8 +9258,7 @@ var getDefaultTransition = (valueKey, { keyframes: keyframes2 }) => {
9120
9258
  };
9121
9259
 
9122
9260
  // node_modules/framer-motion/dist/es/animation/utils/is-transition-defined.mjs
9123
- function isTransitionDefined(_a) {
9124
- var _b = _a, { when, delay: _delay, delayChildren, staggerChildren, staggerDirection, repeat, repeatType, repeatDelay, from, elapsed } = _b, transition = __objRest(_b, ["when", "delay", "delayChildren", "staggerChildren", "staggerDirection", "repeat", "repeatType", "repeatDelay", "from", "elapsed"]);
9261
+ function isTransitionDefined({ when, delay: _delay, delayChildren, staggerChildren, staggerDirection, repeat, repeatType, repeatDelay, from, elapsed, ...transition }) {
9125
9262
  return !!Object.keys(transition).length;
9126
9263
  }
9127
9264
 
@@ -9131,11 +9268,11 @@ var animateMotionValue = (name, value, target, transition = {}, element, isHando
9131
9268
  const delay2 = valueTransition.delay || transition.delay || 0;
9132
9269
  let { elapsed = 0 } = transition;
9133
9270
  elapsed = elapsed - secondsToMilliseconds(delay2);
9134
- let options = __spreadProps(__spreadValues({
9271
+ let options = {
9135
9272
  keyframes: Array.isArray(target) ? target : [null, target],
9136
9273
  ease: "easeOut",
9137
- velocity: value.getVelocity()
9138
- }, valueTransition), {
9274
+ velocity: value.getVelocity(),
9275
+ ...valueTransition,
9139
9276
  delay: -elapsed,
9140
9277
  onUpdate: (v) => {
9141
9278
  value.set(v);
@@ -9148,9 +9285,12 @@ var animateMotionValue = (name, value, target, transition = {}, element, isHando
9148
9285
  name,
9149
9286
  motionValue: value,
9150
9287
  element: isHandoff ? void 0 : element
9151
- });
9288
+ };
9152
9289
  if (!isTransitionDefined(valueTransition)) {
9153
- options = __spreadValues(__spreadValues({}, options), getDefaultTransition(name, options));
9290
+ options = {
9291
+ ...options,
9292
+ ...getDefaultTransition(name, options)
9293
+ };
9154
9294
  }
9155
9295
  if (options.duration) {
9156
9296
  options.duration = secondsToMilliseconds(options.duration);
@@ -9198,7 +9338,7 @@ function shouldBlockAnimation({ protectedKeys, needsAnimating }, key) {
9198
9338
  }
9199
9339
  function animateTarget(visualElement, targetAndTransition, { delay: delay2 = 0, transitionOverride, type } = {}) {
9200
9340
  var _a;
9201
- let _a2 = targetAndTransition, { transition = visualElement.getDefaultTransition(), transitionEnd } = _a2, target = __objRest(_a2, ["transition", "transitionEnd"]);
9341
+ let { transition = visualElement.getDefaultTransition(), transitionEnd, ...target } = targetAndTransition;
9202
9342
  if (transitionOverride)
9203
9343
  transition = transitionOverride;
9204
9344
  const animations2 = [];
@@ -9209,9 +9349,10 @@ function animateTarget(visualElement, targetAndTransition, { delay: delay2 = 0,
9209
9349
  if (valueTarget === void 0 || animationTypeState && shouldBlockAnimation(animationTypeState, key)) {
9210
9350
  continue;
9211
9351
  }
9212
- const valueTransition = __spreadValues({
9213
- delay: delay2
9214
- }, getValueTransition(transition || {}, key));
9352
+ const valueTransition = {
9353
+ delay: delay2,
9354
+ ...getValueTransition(transition || {}, key)
9355
+ };
9215
9356
  let isHandoff = false;
9216
9357
  if (window.MotionHandoffAnimation) {
9217
9358
  const appearId = getOptimisedAppearId(visualElement);
@@ -9267,9 +9408,10 @@ function animateChildren(visualElement, variant, delayChildren = 0, staggerChild
9267
9408
  const generateStaggerDuration = staggerDirection === 1 ? (i = 0) => i * staggerChildren : (i = 0) => maxStaggerDuration - i * staggerChildren;
9268
9409
  Array.from(visualElement.variantChildren).sort(sortByTreeOrder).forEach((child, i) => {
9269
9410
  child.notify("AnimationStart", variant);
9270
- animations2.push(animateVariant(child, variant, __spreadProps(__spreadValues({}, options), {
9411
+ animations2.push(animateVariant(child, variant, {
9412
+ ...options,
9271
9413
  delay: delayChildren + generateStaggerDuration(i)
9272
- })).then(() => child.notify("AnimationComplete", variant)));
9414
+ }).then(() => child.notify("AnimationComplete", variant)));
9273
9415
  });
9274
9416
  return Promise.all(animations2);
9275
9417
  }
@@ -9332,8 +9474,8 @@ function createAnimationState(visualElement) {
9332
9474
  var _a;
9333
9475
  const resolved = resolveVariant(visualElement, definition, type === "exit" ? (_a = visualElement.presenceContext) === null || _a === void 0 ? void 0 : _a.custom : void 0);
9334
9476
  if (resolved) {
9335
- const _a2 = resolved, { transition, transitionEnd } = _a2, target = __objRest(_a2, ["transition", "transitionEnd"]);
9336
- acc = __spreadValues(__spreadValues(__spreadValues({}, acc), target), transitionEnd);
9477
+ const { transition, transitionEnd, ...target } = resolved;
9478
+ acc = { ...acc, ...target, ...transitionEnd };
9337
9479
  }
9338
9480
  return acc;
9339
9481
  };
@@ -9359,7 +9501,7 @@ function createAnimationState(visualElement) {
9359
9501
  if (isInherited && isInitialRender && visualElement.manuallyAnimateOnMount) {
9360
9502
  isInherited = false;
9361
9503
  }
9362
- typeState.protectedKeys = __spreadValues({}, encounteredKeys);
9504
+ typeState.protectedKeys = { ...encounteredKeys };
9363
9505
  if (
9364
9506
  // If it isn't active and hasn't *just* been set as inactive
9365
9507
  !typeState.isActive && activeDelta === null || // If we didn't and don't have any defined prop for this animation type
@@ -9378,7 +9520,10 @@ function createAnimationState(visualElement) {
9378
9520
  if (activeDelta === false)
9379
9521
  resolvedValues = {};
9380
9522
  const { prevResolvedValues = {} } = typeState;
9381
- const allKeys = __spreadValues(__spreadValues({}, prevResolvedValues), resolvedValues);
9523
+ const allKeys = {
9524
+ ...prevResolvedValues,
9525
+ ...resolvedValues
9526
+ };
9382
9527
  const markToAnimate = (key) => {
9383
9528
  shouldAnimateType = true;
9384
9529
  if (removedKeys.has(key)) {
@@ -9416,7 +9561,7 @@ function createAnimationState(visualElement) {
9416
9561
  typeState.prevProp = prop;
9417
9562
  typeState.prevResolvedValues = resolvedValues;
9418
9563
  if (typeState.isActive) {
9419
- encounteredKeys = __spreadValues(__spreadValues({}, encounteredKeys), resolvedValues);
9564
+ encounteredKeys = { ...encounteredKeys, ...resolvedValues };
9420
9565
  }
9421
9566
  if (isInitialRender && visualElement.blockInitialAnimation) {
9422
9567
  shouldAnimateType = false;
@@ -9639,7 +9784,7 @@ var PanSession = class {
9639
9784
  return;
9640
9785
  const { point: point2 } = info2;
9641
9786
  const { timestamp: timestamp2 } = frameData;
9642
- this.history.push(__spreadProps(__spreadValues({}, point2), { timestamp: timestamp2 }));
9787
+ this.history.push({ ...point2, timestamp: timestamp2 });
9643
9788
  const { onStart, onMove } = this.handlers;
9644
9789
  if (!isPanStarted) {
9645
9790
  onStart && onStart(this.lastMoveEvent, info2);
@@ -9675,7 +9820,7 @@ var PanSession = class {
9675
9820
  const initialInfo = transformPoint(info, this.transformPagePoint);
9676
9821
  const { point } = initialInfo;
9677
9822
  const { timestamp } = frameData;
9678
- this.history = [__spreadProps(__spreadValues({}, point), { timestamp })];
9823
+ this.history = [{ ...point, timestamp }];
9679
9824
  const { onSessionStart } = handlers;
9680
9825
  onSessionStart && onSessionStart(event, getPanInfo(initialInfo, this.history));
9681
9826
  this.removeListeners = pipe(addPointerEvent(this.contextWindow, "pointermove", this.handlePointerMove), addPointerEvent(this.contextWindow, "pointerup", this.handlePointerUp), addPointerEvent(this.contextWindow, "pointercancel", this.handlePointerUp));
@@ -10209,15 +10354,17 @@ var VisualElementDragControls = class {
10209
10354
  transition = { min: 0, max: 0 };
10210
10355
  const bounceStiffness = dragElastic ? 200 : 1e6;
10211
10356
  const bounceDamping = dragElastic ? 40 : 1e7;
10212
- const inertia2 = __spreadValues(__spreadValues({
10357
+ const inertia2 = {
10213
10358
  type: "inertia",
10214
10359
  velocity: dragMomentum ? velocity[axis] : 0,
10215
10360
  bounceStiffness,
10216
10361
  bounceDamping,
10217
10362
  timeConstant: 750,
10218
10363
  restDelta: 1,
10219
- restSpeed: 10
10220
- }, dragTransition), transition);
10364
+ restSpeed: 10,
10365
+ ...dragTransition,
10366
+ ...transition
10367
+ };
10221
10368
  return this.startAxisValueAnimation(axis, inertia2);
10222
10369
  });
10223
10370
  return Promise.all(momentumAnimations).then(onDragTransitionEnd);
@@ -10344,14 +10491,15 @@ var VisualElementDragControls = class {
10344
10491
  getProps() {
10345
10492
  const props = this.visualElement.getProps();
10346
10493
  const { drag: drag2 = false, dragDirectionLock = false, dragPropagation = false, dragConstraints = false, dragElastic = defaultElastic, dragMomentum = true } = props;
10347
- return __spreadProps(__spreadValues({}, props), {
10494
+ return {
10495
+ ...props,
10348
10496
  drag: drag2,
10349
10497
  dragDirectionLock,
10350
10498
  dragPropagation,
10351
10499
  dragConstraints,
10352
10500
  dragElastic,
10353
10501
  dragMomentum
10354
- });
10502
+ };
10355
10503
  }
10356
10504
  };
10357
10505
  function shouldDrag(direction, drag2, currentDirection) {
@@ -10515,9 +10663,10 @@ var MeasureLayoutWithContext = class extends import_react33.Component {
10515
10663
  projection.addEventListener("animationComplete", () => {
10516
10664
  this.safeToRemove();
10517
10665
  });
10518
- projection.setOptions(__spreadProps(__spreadValues({}, projection.options), {
10666
+ projection.setOptions({
10667
+ ...projection.options,
10519
10668
  onExitComplete: () => this.safeToRemove()
10520
- }));
10669
+ });
10521
10670
  }
10522
10671
  globalProjectionState.hasEverUpdated = true;
10523
10672
  }
@@ -10579,17 +10728,18 @@ var MeasureLayoutWithContext = class extends import_react33.Component {
10579
10728
  function MeasureLayout(props) {
10580
10729
  const [isPresent, safeToRemove] = usePresence();
10581
10730
  const layoutGroup = (0, import_react33.useContext)(LayoutGroupContext);
10582
- return (0, import_jsx_runtime17.jsx)(MeasureLayoutWithContext, __spreadProps(__spreadValues({}, props), { layoutGroup, switchLayoutGroup: (0, import_react33.useContext)(SwitchLayoutGroupContext), isPresent, safeToRemove }));
10731
+ return (0, import_jsx_runtime17.jsx)(MeasureLayoutWithContext, { ...props, layoutGroup, switchLayoutGroup: (0, import_react33.useContext)(SwitchLayoutGroupContext), isPresent, safeToRemove });
10583
10732
  }
10584
10733
  var defaultScaleCorrectors = {
10585
- borderRadius: __spreadProps(__spreadValues({}, correctBorderRadius), {
10734
+ borderRadius: {
10735
+ ...correctBorderRadius,
10586
10736
  applyTo: [
10587
10737
  "borderTopLeftRadius",
10588
10738
  "borderTopRightRadius",
10589
10739
  "borderBottomLeftRadius",
10590
10740
  "borderBottomRightRadius"
10591
10741
  ]
10592
- }),
10742
+ },
10593
10743
  borderTopLeftRadius: correctBorderRadius,
10594
10744
  borderTopRightRadius: correctBorderRadius,
10595
10745
  borderBottomLeftRadius: correctBorderRadius,
@@ -11066,10 +11216,11 @@ function createProjectionNode2({ attachResizeListener, defaultParent, measureScr
11066
11216
  this.resumingFrom.resumingFrom = void 0;
11067
11217
  }
11068
11218
  this.setAnimationOrigin(delta, hasOnlyRelativeTargetChanged);
11069
- const animationOptions = __spreadProps(__spreadValues({}, getValueTransition(layoutTransition, "layout")), {
11219
+ const animationOptions = {
11220
+ ...getValueTransition(layoutTransition, "layout"),
11070
11221
  onPlay: onLayoutAnimationStart,
11071
11222
  onComplete: onLayoutAnimationComplete
11072
- });
11223
+ };
11073
11224
  if (visualElement.shouldReduceMotion || this.options.layoutRoot) {
11074
11225
  animationOptions.delay = 0;
11075
11226
  animationOptions.type = false;
@@ -11358,9 +11509,11 @@ function createProjectionNode2({ attachResizeListener, defaultParent, measureScr
11358
11509
  this.isProjectionDirty = true;
11359
11510
  }
11360
11511
  setOptions(options) {
11361
- this.options = __spreadProps(__spreadValues(__spreadValues({}, this.options), options), {
11512
+ this.options = {
11513
+ ...this.options,
11514
+ ...options,
11362
11515
  crossfade: options.crossfade !== void 0 ? options.crossfade : true
11363
- });
11516
+ };
11364
11517
  }
11365
11518
  clearMeasurements() {
11366
11519
  this.scroll = void 0;
@@ -11535,7 +11688,7 @@ function createProjectionNode2({ attachResizeListener, defaultParent, measureScr
11535
11688
  setAnimationOrigin(delta, hasOnlyRelativeTargetChanged = false) {
11536
11689
  const snapshot = this.snapshot;
11537
11690
  const snapshotLatestValues = snapshot ? snapshot.latestValues : {};
11538
- const mixedValues = __spreadValues({}, this.latestValues);
11691
+ const mixedValues = { ...this.latestValues };
11539
11692
  const targetDelta = createDelta();
11540
11693
  if (!this.relativeParent || !this.relativeParent.options.layoutRoot) {
11541
11694
  this.relativeTarget = this.relativeTargetOrigin = void 0;
@@ -11587,7 +11740,8 @@ function createProjectionNode2({ attachResizeListener, defaultParent, measureScr
11587
11740
  }
11588
11741
  this.pendingAnimation = frame.update(() => {
11589
11742
  globalProjectionState.hasAnimatedSinceResize = true;
11590
- this.currentAnimation = animateSingleValue(0, animationTarget, __spreadProps(__spreadValues({}, options), {
11743
+ this.currentAnimation = animateSingleValue(0, animationTarget, {
11744
+ ...options,
11591
11745
  onUpdate: (latest) => {
11592
11746
  this.mixTargetDelta(latest);
11593
11747
  options.onUpdate && options.onUpdate(latest);
@@ -11596,7 +11750,7 @@ function createProjectionNode2({ attachResizeListener, defaultParent, measureScr
11596
11750
  options.onComplete && options.onComplete();
11597
11751
  this.completeAnimation();
11598
11752
  }
11599
- }));
11753
+ });
11600
11754
  if (this.resumingFrom) {
11601
11755
  this.resumingFrom.currentAnimation = this.currentAnimation;
11602
11756
  }
@@ -12091,8 +12245,7 @@ var fireObserverCallback = (entry) => {
12091
12245
  var fireAllObserverCallbacks = (entries) => {
12092
12246
  entries.forEach(fireObserverCallback);
12093
12247
  };
12094
- function initIntersectionObserver(_a) {
12095
- var _b = _a, { root } = _b, options = __objRest(_b, ["root"]);
12248
+ function initIntersectionObserver({ root, ...options }) {
12096
12249
  const lookupRoot = root || document;
12097
12250
  if (!observers.has(lookupRoot)) {
12098
12251
  observers.set(lookupRoot, {});
@@ -12100,7 +12253,7 @@ function initIntersectionObserver(_a) {
12100
12253
  const rootObservers = observers.get(lookupRoot);
12101
12254
  const key = JSON.stringify(options);
12102
12255
  if (!rootObservers[key]) {
12103
- rootObservers[key] = new IntersectionObserver(fireAllObserverCallbacks, __spreadValues({ root }, options));
12256
+ rootObservers[key] = new IntersectionObserver(fireAllObserverCallbacks, { root, ...options });
12104
12257
  }
12105
12258
  return rootObservers[key];
12106
12259
  }
@@ -12310,8 +12463,8 @@ var VisualElement = class {
12310
12463
  const { latestValues, renderState, onUpdate } = visualState;
12311
12464
  this.onUpdate = onUpdate;
12312
12465
  this.latestValues = latestValues;
12313
- this.baseTarget = __spreadValues({}, latestValues);
12314
- this.initialValues = props.initial ? __spreadValues({}, latestValues) : {};
12466
+ this.baseTarget = { ...latestValues };
12467
+ this.initialValues = props.initial ? { ...latestValues } : {};
12315
12468
  this.renderState = renderState;
12316
12469
  this.parent = parent;
12317
12470
  this.props = props;
@@ -12326,7 +12479,7 @@ var VisualElement = class {
12326
12479
  this.variantChildren = /* @__PURE__ */ new Set();
12327
12480
  }
12328
12481
  this.manuallyAnimateOnMount = Boolean(parent && parent.current);
12329
- const _a = this.scrapeMotionValuesFromProps(props, {}, this), { willChange } = _a, initialMotionValues = __objRest(_a, ["willChange"]);
12482
+ const { willChange, ...initialMotionValues } = this.scrapeMotionValuesFromProps(props, {}, this);
12330
12483
  for (const key in initialMotionValues) {
12331
12484
  const value = initialMotionValues[key];
12332
12485
  if (latestValues[key] !== void 0 && isMotionValue(value)) {
@@ -12715,7 +12868,12 @@ var createDomVisualElement = (Component2, options) => {
12715
12868
  };
12716
12869
 
12717
12870
  // node_modules/framer-motion/dist/es/render/components/motion/create.mjs
12718
- var createMotionComponent = /* @__PURE__ */ createMotionComponentFactory(__spreadValues(__spreadValues(__spreadValues(__spreadValues({}, animations), gestureAnimations), drag), layout), createDomVisualElement);
12871
+ var createMotionComponent = /* @__PURE__ */ createMotionComponentFactory({
12872
+ ...animations,
12873
+ ...gestureAnimations,
12874
+ ...drag,
12875
+ ...layout
12876
+ }, createDomVisualElement);
12719
12877
 
12720
12878
  // node_modules/framer-motion/dist/es/render/components/motion/proxy.mjs
12721
12879
  var motion = /* @__PURE__ */ createDOMMotionComponentProxy(createMotionComponent);
@@ -12742,27 +12900,23 @@ var BACK_BY_THEME = {
12742
12900
  retro: "from-zinc-800 to-black text-lime-400 font-mono",
12743
12901
  motion: "from-indigo-600 via-purple-600 to-indigo-700 text-white transition-all duration-500"
12744
12902
  };
12745
- function Flashcard(_a) {
12746
- var _b = _a, {
12747
- question,
12748
- answer,
12749
- className
12750
- } = _b, props = __objRest(_b, [
12751
- "question",
12752
- "answer",
12753
- "className"
12754
- ]);
12903
+ function Flashcard({
12904
+ question,
12905
+ answer,
12906
+ className,
12907
+ ...props
12908
+ }) {
12755
12909
  const [isFlipped, setIsFlipped] = (0, import_react35.useState)(false);
12756
12910
  const { theme } = useTheme();
12757
12911
  return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
12758
12912
  "div",
12759
- __spreadProps(__spreadValues({
12913
+ {
12760
12914
  className: cn(
12761
12915
  "group relative h-64 w-full cursor-pointer [perspective:1000px]",
12762
12916
  className
12763
12917
  ),
12764
- onClick: () => setIsFlipped((v) => !v)
12765
- }, props), {
12918
+ onClick: () => setIsFlipped((v) => !v),
12919
+ ...props,
12766
12920
  children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
12767
12921
  motion.div,
12768
12922
  {
@@ -12810,7 +12964,7 @@ function Flashcard(_a) {
12810
12964
  ]
12811
12965
  }
12812
12966
  )
12813
- })
12967
+ }
12814
12968
  );
12815
12969
  }
12816
12970
 
@@ -12818,39 +12972,39 @@ function Flashcard(_a) {
12818
12972
  var import_jsx_runtime19 = require("react/jsx-runtime");
12819
12973
  var SURFACE_BY_THEME = {
12820
12974
  minimal: "bg-gradient-to-br from-white to-zinc-50 border-black/5 shadow-[0_4px_20px_-4px_rgba(0,0,0,0.08)] hover:shadow-[0_10px_40px_-6px_rgba(0,0,0,0.18)]",
12821
- night: "bg-zinc-950 border-white/10 shadow-[0_10px_40px_rgba(0,0,0,0.7)]",
12975
+ night: "bg-zinc-950 text-zinc-100 border-white/10 shadow-[0_10px_40px_rgba(0,0,0,0.7)]",
12822
12976
  glass: "bg-white/20 border-white/60 backdrop-blur-2xl shadow-glass-lift",
12823
12977
  neubrutal: "bg-[#FFD600] border-4 border-black shadow-neubrutal",
12824
12978
  clay: "bg-rose-50 border border-rose-100 shadow-clay-outer",
12825
- cyberpunk: "bg-black border-2 border-[#22d3ee] font-mono shadow-neon-glow",
12979
+ cyberpunk: "bg-black text-[#22d3ee] border-2 border-[#22d3ee] font-mono shadow-neon-glow",
12826
12980
  retro: "bg-white border-2 border-black font-mono shadow-[4px_4px_0_0_rgba(0,0,0,1)]",
12827
12981
  motion: "bg-white border-2 border-indigo-200 shadow-lg transition-all duration-300 hover:scale-[1.02] hover:shadow-xl hover:border-indigo-300 hover:-translate-y-0.5"
12828
12982
  };
12829
- function GraphicCard(_a) {
12830
- var _b = _a, {
12831
- children,
12832
- className
12833
- } = _b, props = __objRest(_b, [
12834
- "children",
12835
- "className"
12836
- ]);
12983
+ function GraphicCard({
12984
+ children,
12985
+ className,
12986
+ ...props
12987
+ }) {
12837
12988
  const { theme } = useTheme();
12838
12989
  const surface = SURFACE_BY_THEME[theme];
12990
+ const isDark = theme === "night" || theme === "cyberpunk";
12991
+ const blobClass = isDark ? "bg-white/10 transition-transform group-hover:scale-110" : "bg-sky-100 opacity-60 transition-transform group-hover:scale-110";
12992
+ const blobClass2 = isDark ? "bg-white/10 transition-transform group-hover:scale-110" : "bg-indigo-100 opacity-60 transition-transform group-hover:scale-110";
12839
12993
  return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
12840
12994
  "div",
12841
- __spreadProps(__spreadValues({
12995
+ {
12842
12996
  className: cn(
12843
12997
  "group relative w-full overflow-hidden rounded-2xl p-6 transition-all duration-300",
12844
12998
  surface,
12845
12999
  className
12846
- )
12847
- }, props), {
13000
+ ),
13001
+ ...props,
12848
13002
  children: [
12849
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "pointer-events-none absolute -right-10 -top-10 h-32 w-32 rounded-bl-full bg-sky-100 opacity-60 transition-transform group-hover:scale-110" }),
12850
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "pointer-events-none absolute -bottom-8 -left-8 h-24 w-24 rounded-tr-full bg-indigo-100 opacity-60 transition-transform group-hover:scale-110" }),
12851
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "relative z-10 h-full w-full", children })
13003
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: cn("pointer-events-none absolute -right-10 -top-10 h-32 w-32 rounded-bl-full", blobClass) }),
13004
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: cn("pointer-events-none absolute -bottom-8 -left-8 h-24 w-24 rounded-tr-full", blobClass2) }),
13005
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: cn("relative z-10 h-full w-full", isDark && "[&_*]:!text-inherit"), children })
12852
13006
  ]
12853
- })
13007
+ }
12854
13008
  );
12855
13009
  }
12856
13010
 
@@ -12872,38 +13026,32 @@ var inputVariants = cva(
12872
13026
  }
12873
13027
  }
12874
13028
  );
12875
- var Input = (0, import_react36.forwardRef)(function Input2(_a, ref) {
12876
- var _b = _a, {
12877
- label,
12878
- error,
12879
- helperText,
12880
- prefix,
12881
- suffix,
12882
- size = "md",
12883
- className,
12884
- id: idProp,
12885
- disabled,
12886
- theme: themeProp
12887
- } = _b, props = __objRest(_b, [
12888
- "label",
12889
- "error",
12890
- "helperText",
12891
- "prefix",
12892
- "suffix",
12893
- "size",
12894
- "className",
12895
- "id",
12896
- "disabled",
12897
- "theme"
12898
- ]);
13029
+ var Input = (0, import_react36.forwardRef)(function Input2({
13030
+ label,
13031
+ error,
13032
+ helperText,
13033
+ prefix,
13034
+ suffix,
13035
+ size = "md",
13036
+ className,
13037
+ id: idProp,
13038
+ disabled,
13039
+ theme: themeProp,
13040
+ ...props
13041
+ }, ref) {
12899
13042
  const { theme: contextTheme } = useTheme();
12900
- const theme = themeProp != null ? themeProp : contextTheme;
13043
+ const theme = themeProp ?? contextTheme;
12901
13044
  const themeClass = getThemeClass(theme, "input", "default");
12902
- const id3 = idProp != null ? idProp : label ? `input-${label.replace(/\s/g, "-").toLowerCase()}` : void 0;
13045
+ const id3 = idProp ?? (label ? `input-${label.replace(/\s/g, "-").toLowerCase()}` : void 0);
12903
13046
  const hasAddon = Boolean(prefix || suffix);
13047
+ const isDark = theme === "night" || theme === "cyberpunk";
13048
+ const labelClass = isDark ? "text-zinc-300" : "text-zinc-700";
13049
+ const helperClass = isDark ? "text-zinc-400" : "text-zinc-500";
13050
+ const addonClass = isDark ? "bg-zinc-800 text-zinc-400" : "bg-zinc-100 text-zinc-500";
13051
+ const errorClass = isDark ? "text-red-400" : "text-red-600";
12904
13052
  const inputEl = /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
12905
13053
  "input",
12906
- __spreadValues({
13054
+ {
12907
13055
  ref,
12908
13056
  id: id3,
12909
13057
  "aria-invalid": error ? true : void 0,
@@ -12916,29 +13064,39 @@ var Input = (0, import_react36.forwardRef)(function Input2(_a, ref) {
12916
13064
  hasAddon && "rounded-none first:rounded-l-lg last:rounded-r-lg",
12917
13065
  !hasAddon && "rounded-lg",
12918
13066
  className
12919
- )
12920
- }, props)
13067
+ ),
13068
+ ...props
13069
+ }
12921
13070
  );
12922
13071
  return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "w-full", children: [
12923
13072
  label && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
12924
13073
  "label",
12925
13074
  {
12926
13075
  htmlFor: id3,
12927
- className: "mb-1 block text-sm font-medium text-zinc-700 dark:text-zinc-300",
13076
+ className: cn("mb-1 block text-sm font-medium", labelClass),
12928
13077
  children: label
12929
13078
  }
12930
13079
  ),
12931
- hasAddon ? /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "flex overflow-hidden rounded-lg border border-inherit [&>*]:border [&>*]:border-zinc-200 [&>*]:border-l-0 first:[&>*]:border-l [&>*]:border-inherit", children: [
12932
- prefix && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "flex items-center bg-zinc-100 px-3 py-2 text-sm text-zinc-500 dark:bg-zinc-800 dark:text-zinc-400", children: prefix }),
12933
- inputEl,
12934
- suffix && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "flex items-center bg-zinc-100 px-3 py-2 text-sm text-zinc-500 dark:bg-zinc-800 dark:text-zinc-400", children: suffix })
12935
- ] }) : inputEl,
12936
- error && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { id: id3 ? `${id3}-error` : void 0, className: "mt-1 text-sm text-red-600", role: "alert", children: error }),
13080
+ hasAddon ? /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
13081
+ "div",
13082
+ {
13083
+ className: cn(
13084
+ "flex overflow-hidden rounded-lg border border-inherit [&>*]:border [&>*]:border-l-0 first:[&>*]:border-l [&>*]:border-inherit",
13085
+ isDark ? "[&>*]:border-white/10" : "[&>*]:border-zinc-200"
13086
+ ),
13087
+ children: [
13088
+ prefix && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: cn("flex items-center px-3 py-2 text-sm", addonClass), children: prefix }),
13089
+ inputEl,
13090
+ suffix && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: cn("flex items-center px-3 py-2 text-sm", addonClass), children: suffix })
13091
+ ]
13092
+ }
13093
+ ) : inputEl,
13094
+ error && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { id: id3 ? `${id3}-error` : void 0, className: cn("mt-1 text-sm", errorClass), role: "alert", children: error }),
12937
13095
  helperText && !error && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
12938
13096
  "p",
12939
13097
  {
12940
13098
  id: id3 ? `${id3}-helper` : void 0,
12941
- className: "mt-1 text-sm text-zinc-500 dark:text-zinc-400",
13099
+ className: cn("mt-1 text-sm", helperClass),
12942
13100
  children: helperText
12943
13101
  }
12944
13102
  )
@@ -12950,7 +13108,7 @@ var import_react37 = require("react");
12950
13108
  function useFocusTrap(active, options) {
12951
13109
  const containerRef = (0, import_react37.useRef)(null);
12952
13110
  const previousFocusRef = (0, import_react37.useRef)(null);
12953
- const { returnFocus = true } = options != null ? options : {};
13111
+ const { returnFocus = true } = options ?? {};
12954
13112
  const getFocusables = (0, import_react37.useCallback)((el) => {
12955
13113
  const selector = [
12956
13114
  "a[href]",
@@ -12965,34 +13123,32 @@ function useFocusTrap(active, options) {
12965
13123
  );
12966
13124
  }, []);
12967
13125
  (0, import_react37.useEffect)(() => {
12968
- var _a;
12969
13126
  if (!active || !containerRef.current) return;
12970
- previousFocusRef.current = (_a = typeof document !== "undefined" ? document.activeElement : null) != null ? _a : null;
13127
+ previousFocusRef.current = (typeof document !== "undefined" ? document.activeElement : null) ?? null;
12971
13128
  const container = containerRef.current;
12972
13129
  const focusables = getFocusables(container);
12973
13130
  if (focusables.length === 0) return;
12974
13131
  const first = focusables[0];
12975
13132
  const last = focusables[focusables.length - 1];
12976
- first == null ? void 0 : first.focus();
13133
+ first?.focus();
12977
13134
  const handleKeyDown = (e) => {
12978
13135
  if (e.key !== "Tab") return;
12979
13136
  if (e.shiftKey) {
12980
13137
  if (document.activeElement === first) {
12981
13138
  e.preventDefault();
12982
- last == null ? void 0 : last.focus();
13139
+ last?.focus();
12983
13140
  }
12984
13141
  } else {
12985
13142
  if (document.activeElement === last) {
12986
13143
  e.preventDefault();
12987
- first == null ? void 0 : first.focus();
13144
+ first?.focus();
12988
13145
  }
12989
13146
  }
12990
13147
  };
12991
13148
  container.addEventListener("keydown", handleKeyDown);
12992
13149
  return () => {
12993
- var _a2;
12994
13150
  container.removeEventListener("keydown", handleKeyDown);
12995
- if (returnFocus && ((_a2 = previousFocusRef.current) == null ? void 0 : _a2.focus)) {
13151
+ if (returnFocus && previousFocusRef.current?.focus) {
12996
13152
  previousFocusRef.current.focus();
12997
13153
  }
12998
13154
  };
@@ -13029,7 +13185,7 @@ function Modal({
13029
13185
  theme: themeProp
13030
13186
  }) {
13031
13187
  const { theme: contextTheme } = useTheme();
13032
- const theme = themeProp != null ? themeProp : contextTheme;
13188
+ const theme = themeProp ?? contextTheme;
13033
13189
  const themeClass = getThemeClass(theme, "modal", "default");
13034
13190
  const focusTrapRef = useFocusTrap(open, { returnFocus: true });
13035
13191
  const handleEscape = (0, import_react38.useCallback)(
@@ -13104,14 +13260,94 @@ function Modal({
13104
13260
  }
13105
13261
 
13106
13262
  // components/Navbar.tsx
13263
+ var import_react39 = require("react");
13107
13264
  var import_jsx_runtime22 = require("react/jsx-runtime");
13108
13265
  function Navbar({
13109
13266
  children,
13267
+ logo,
13268
+ items,
13269
+ right,
13110
13270
  className,
13111
13271
  style
13112
13272
  }) {
13273
+ const [mobileOpen, setMobileOpen] = (0, import_react39.useState)(false);
13274
+ const navRef = (0, import_react39.useRef)(null);
13113
13275
  const { theme } = useTheme();
13114
13276
  const themeClass = getThemeClass(theme, "navbar", "default");
13277
+ const mobilePanelBgOverride = theme === "glass" ? "bg-white/95 backdrop-blur-xl" : theme === "clay" ? "bg-white/95" : null;
13278
+ useClickOutside(
13279
+ navRef,
13280
+ (0, import_react39.useCallback)(() => setMobileOpen(false), []),
13281
+ { enabled: mobileOpen }
13282
+ );
13283
+ const hasResponsiveNav = items != null && items.length > 0;
13284
+ if (hasResponsiveNav) {
13285
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
13286
+ "nav",
13287
+ {
13288
+ ref: navRef,
13289
+ className: cn(
13290
+ "relative sticky top-0 z-50 flex h-14 w-full flex-col px-3 sm:px-4",
13291
+ themeClass,
13292
+ className
13293
+ ),
13294
+ style,
13295
+ children: [
13296
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "flex h-14 w-full min-w-0 shrink-0 items-center justify-between gap-2", children: [
13297
+ logo != null ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "flex min-w-0 shrink-0 items-center overflow-hidden", children: logo }) : null,
13298
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "hidden flex-1 items-center justify-end gap-4 sm:flex", children: [
13299
+ items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
13300
+ "a",
13301
+ {
13302
+ href: item.href,
13303
+ className: "text-sm font-medium text-inherit opacity-90 transition-opacity hover:opacity-100",
13304
+ children: item.label
13305
+ },
13306
+ item.href
13307
+ )),
13308
+ right != null ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "flex shrink-0 items-center", children: right }) : null
13309
+ ] }),
13310
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "flex min-w-0 flex-1 items-center justify-end gap-2 sm:hidden", children: [
13311
+ right != null ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "min-w-0 overflow-x-auto overflow-y-hidden scrollbar-thin", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "flex items-center gap-2 py-1", children: right }) }) : null,
13312
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
13313
+ "button",
13314
+ {
13315
+ type: "button",
13316
+ onClick: () => setMobileOpen((o) => !o),
13317
+ className: "inline-flex h-9 w-9 shrink-0 items-center justify-center rounded-lg text-inherit opacity-90 transition-opacity hover:opacity-100",
13318
+ "aria-expanded": mobileOpen,
13319
+ "aria-label": mobileOpen ? "Close menu" : "Open menu",
13320
+ children: mobileOpen ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: "text-lg leading-none", "aria-hidden": true, children: "\xD7" }) : /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: "text-xl leading-none", "aria-hidden": true, children: "\u2630" })
13321
+ }
13322
+ )
13323
+ ] })
13324
+ ] }),
13325
+ mobileOpen && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
13326
+ "div",
13327
+ {
13328
+ className: cn(
13329
+ "absolute left-0 right-0 top-14 z-10 flex flex-col gap-1 border-t border-inherit px-3 py-3 shadow-lg sm:hidden",
13330
+ themeClass,
13331
+ mobilePanelBgOverride
13332
+ ),
13333
+ role: "dialog",
13334
+ "aria-label": "Navigation menu",
13335
+ children: items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
13336
+ "a",
13337
+ {
13338
+ href: item.href,
13339
+ className: "block rounded-lg px-3 py-2.5 text-sm font-medium text-inherit opacity-90 transition-opacity hover:opacity-100",
13340
+ onClick: () => setMobileOpen(false),
13341
+ children: item.label
13342
+ },
13343
+ item.href
13344
+ ))
13345
+ }
13346
+ )
13347
+ ]
13348
+ }
13349
+ );
13350
+ }
13115
13351
  return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
13116
13352
  "nav",
13117
13353
  {
@@ -13175,11 +13411,15 @@ function ProgressBar({
13175
13411
  max = 100,
13176
13412
  segmented = false,
13177
13413
  className,
13178
- style
13414
+ style,
13415
+ trackColor,
13416
+ activeColor
13179
13417
  }) {
13180
13418
  const { theme } = useTheme();
13181
13419
  const themeClass = getThemeClass(theme, "progress", "default");
13182
13420
  const pct = Math.min(100, Math.max(0, value / max * 100));
13421
+ const trackStyle = trackColor ? { backgroundColor: trackColor } : void 0;
13422
+ const fillStyle = activeColor ? { width: `${pct}%`, backgroundColor: activeColor } : { width: `${pct}%` };
13183
13423
  if (segmented) {
13184
13424
  const segments = 10;
13185
13425
  const filled = Math.round(pct / 100 * segments);
@@ -13191,14 +13431,15 @@ function ProgressBar({
13191
13431
  themeClass,
13192
13432
  className
13193
13433
  ),
13194
- style,
13434
+ style: { ...style, ...trackStyle },
13195
13435
  children: Array.from({ length: segments }).map((_, i) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
13196
13436
  "div",
13197
13437
  {
13198
13438
  className: cn(
13199
13439
  "fill h-full flex-1 rounded-full transition-colors",
13200
13440
  i < filled ? "opacity-100" : "opacity-30"
13201
- )
13441
+ ),
13442
+ style: i < filled && activeColor ? { backgroundColor: activeColor } : void 0
13202
13443
  },
13203
13444
  i
13204
13445
  ))
@@ -13213,12 +13454,12 @@ function ProgressBar({
13213
13454
  themeClass,
13214
13455
  className
13215
13456
  ),
13216
- style,
13457
+ style: { ...style, ...trackStyle },
13217
13458
  children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
13218
13459
  "span",
13219
13460
  {
13220
13461
  className: "fill absolute left-0 top-0 h-full rounded-full transition-[width] duration-300",
13221
- style: { width: `${pct}%` }
13462
+ style: fillStyle
13222
13463
  }
13223
13464
  )
13224
13465
  }
@@ -13243,17 +13484,17 @@ function SectionHeader({
13243
13484
  }
13244
13485
 
13245
13486
  // components/Sidebar.tsx
13246
- var import_react39 = require("react");
13487
+ var import_react40 = require("react");
13247
13488
  var import_jsx_runtime26 = require("react/jsx-runtime");
13248
13489
  function Sidebar({
13249
13490
  children,
13250
13491
  className,
13251
13492
  style
13252
13493
  }) {
13253
- const [collapsed, setCollapsed] = (0, import_react39.useState)(false);
13494
+ const [collapsed, setCollapsed] = (0, import_react40.useState)(false);
13254
13495
  const { theme } = useTheme();
13255
13496
  const themeClass = getThemeClass(theme, "sidebar", "default");
13256
- const toggle = (0, import_react39.useCallback)(() => setCollapsed((c) => !c), []);
13497
+ const toggle = (0, import_react40.useCallback)(() => setCollapsed((c) => !c), []);
13257
13498
  return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
13258
13499
  "aside",
13259
13500
  {
@@ -13282,7 +13523,7 @@ function Sidebar({
13282
13523
  }
13283
13524
 
13284
13525
  // components/Skeleton.tsx
13285
- var import_react40 = require("react");
13526
+ var import_react41 = require("react");
13286
13527
  var import_jsx_runtime27 = require("react/jsx-runtime");
13287
13528
  var skeletonVariants = cva("", {
13288
13529
  variants: {
@@ -13296,16 +13537,15 @@ var skeletonVariants = cva("", {
13296
13537
  variant: "rectangle"
13297
13538
  }
13298
13539
  });
13299
- var Skeleton = (0, import_react40.forwardRef)(
13300
- function Skeleton2(_a, ref) {
13301
- var _b = _a, { variant = "rectangle", className, theme: themeProp, style } = _b, props = __objRest(_b, ["variant", "className", "theme", "style"]);
13540
+ var Skeleton = (0, import_react41.forwardRef)(
13541
+ function Skeleton2({ variant = "rectangle", className, theme: themeProp, style, ...props }, ref) {
13302
13542
  const { theme: contextTheme } = useTheme();
13303
- const theme = themeProp != null ? themeProp : contextTheme;
13543
+ const theme = themeProp ?? contextTheme;
13304
13544
  const baseClass = getThemeClass(theme, "skeleton", "default");
13305
13545
  const animationVariant = theme === "cyberpunk" ? getThemeClass(theme, "skeleton", "flicker") : getThemeClass(theme, "skeleton", "shimmer");
13306
13546
  return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
13307
13547
  "div",
13308
- __spreadValues({
13548
+ {
13309
13549
  ref,
13310
13550
  role: "status",
13311
13551
  "aria-label": "Loading",
@@ -13315,14 +13555,15 @@ var Skeleton = (0, import_react40.forwardRef)(
13315
13555
  animationVariant,
13316
13556
  className
13317
13557
  ),
13318
- style
13319
- }, props)
13558
+ style,
13559
+ ...props
13560
+ }
13320
13561
  );
13321
13562
  }
13322
13563
  );
13323
13564
 
13324
13565
  // components/Slider.tsx
13325
- var import_react41 = require("react");
13566
+ var import_react42 = require("react");
13326
13567
  var import_jsx_runtime28 = require("react/jsx-runtime");
13327
13568
  var sliderVariants = cva(
13328
13569
  "relative flex w-full touch-none items-center overflow-visible py-1",
@@ -13343,40 +13584,30 @@ var trackVariants = cva(
13343
13584
  "relative h-3 w-full rounded-full overflow-visible",
13344
13585
  { variants: {}, defaultVariants: {} }
13345
13586
  );
13346
- var Slider = (0, import_react41.forwardRef)(function Slider2(_a, ref) {
13347
- var _b = _a, {
13348
- min = 0,
13349
- max = 100,
13350
- step = 1,
13351
- value: controlledValue,
13352
- defaultValue = 50,
13353
- onValueChange,
13354
- size = "md",
13355
- className,
13356
- theme: themeProp
13357
- } = _b, props = __objRest(_b, [
13358
- "min",
13359
- "max",
13360
- "step",
13361
- "value",
13362
- "defaultValue",
13363
- "onValueChange",
13364
- "size",
13365
- "className",
13366
- "theme"
13367
- ]);
13368
- const [uncontrolled, setUncontrolled] = (0, import_react41.useState)(defaultValue);
13587
+ var Slider = (0, import_react42.forwardRef)(function Slider2({
13588
+ min = 0,
13589
+ max = 100,
13590
+ step = 1,
13591
+ value: controlledValue,
13592
+ defaultValue = 50,
13593
+ onValueChange,
13594
+ size = "md",
13595
+ className,
13596
+ theme: themeProp,
13597
+ ...props
13598
+ }, ref) {
13599
+ const [uncontrolled, setUncontrolled] = (0, import_react42.useState)(defaultValue);
13369
13600
  const isControlled = controlledValue !== void 0;
13370
13601
  const value = isControlled ? controlledValue : uncontrolled;
13371
13602
  const { theme: contextTheme } = useTheme();
13372
- const theme = themeProp != null ? themeProp : contextTheme;
13603
+ const theme = themeProp ?? contextTheme;
13373
13604
  const themeClass = getThemeClass(theme, "slider", "default");
13374
13605
  const pct = (value - min) / (max - min) * 100;
13375
- const handleChange = (0, import_react41.useCallback)(
13606
+ const handleChange = (0, import_react42.useCallback)(
13376
13607
  (e) => {
13377
13608
  const next = Number(e.target.value);
13378
13609
  if (!isControlled) setUncontrolled(next);
13379
- onValueChange == null ? void 0 : onValueChange(next);
13610
+ onValueChange?.(next);
13380
13611
  },
13381
13612
  [isControlled, onValueChange]
13382
13613
  );
@@ -13399,7 +13630,7 @@ var Slider = (0, import_react41.forwardRef)(function Slider2(_a, ref) {
13399
13630
  ] }),
13400
13631
  /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
13401
13632
  "input",
13402
- __spreadValues({
13633
+ {
13403
13634
  ref,
13404
13635
  type: "range",
13405
13636
  min,
@@ -13410,8 +13641,9 @@ var Slider = (0, import_react41.forwardRef)(function Slider2(_a, ref) {
13410
13641
  className: "absolute inset-0 h-full w-full cursor-pointer opacity-0",
13411
13642
  "aria-valuemin": min,
13412
13643
  "aria-valuemax": max,
13413
- "aria-valuenow": value
13414
- }, props)
13644
+ "aria-valuenow": value,
13645
+ ...props
13646
+ }
13415
13647
  )
13416
13648
  ] });
13417
13649
  });
@@ -13427,6 +13659,9 @@ function StatsCard({
13427
13659
  }) {
13428
13660
  const { theme } = useTheme();
13429
13661
  const themeClass = getThemeClass(theme, "statsCard", "default");
13662
+ const isDark = theme === "night" || theme === "cyberpunk";
13663
+ const trendUpClass = trend?.direction === "up" ? isDark ? "text-emerald-400" : "text-emerald-600" : null;
13664
+ const trendDownClass = trend?.direction === "down" ? isDark ? "text-rose-400" : "text-rose-600" : null;
13430
13665
  return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: cn("rounded-xl p-6", themeClass, className), style, children: [
13431
13666
  /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("p", { className: "text-sm font-medium opacity-80", children: label }),
13432
13667
  /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("p", { className: "mt-2 text-2xl font-bold tracking-tight", children: value }),
@@ -13435,7 +13670,7 @@ function StatsCard({
13435
13670
  {
13436
13671
  className: cn(
13437
13672
  "mt-2 flex items-center gap-1 text-sm",
13438
- trend.direction === "up" ? "text-emerald-600" : "text-rose-600"
13673
+ trendUpClass ?? trendDownClass
13439
13674
  ),
13440
13675
  children: [
13441
13676
  trend.direction === "up" ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(TrendingUp, { className: "size-4", "aria-hidden": true }) : /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(TrendingDown, { className: "size-4", "aria-hidden": true }),
@@ -13447,7 +13682,7 @@ function StatsCard({
13447
13682
  }
13448
13683
 
13449
13684
  // components/Tabs.tsx
13450
- var import_react42 = require("react");
13685
+ var import_react43 = require("react");
13451
13686
  var import_jsx_runtime30 = require("react/jsx-runtime");
13452
13687
  var tabsListVariants = cva(
13453
13688
  "flex min-w-0 overflow-x-auto scrollbar-thin -mx-1 px-1 sm:mx-0 sm:overflow-visible",
@@ -13479,52 +13714,47 @@ function Tabs({
13479
13714
  style,
13480
13715
  theme: themeProp
13481
13716
  }) {
13482
- var _a;
13483
- const [uncontrolled, setUncontrolled] = (0, import_react42.useState)(
13484
- () => {
13485
- var _a2, _b;
13486
- return (_b = defaultValue != null ? defaultValue : (_a2 = items[0]) == null ? void 0 : _a2.value) != null ? _b : "";
13487
- }
13717
+ const [uncontrolled, setUncontrolled] = (0, import_react43.useState)(
13718
+ () => defaultValue ?? items[0]?.value ?? ""
13488
13719
  );
13489
13720
  const isControlled = controlledValue !== void 0;
13490
13721
  const value = isControlled ? controlledValue : uncontrolled;
13491
13722
  const activeIndex = items.findIndex((i) => i.value === value);
13492
13723
  const safeIndex = activeIndex >= 0 ? activeIndex : 0;
13493
- const triggerRefs = (0, import_react42.useRef)([]);
13724
+ const triggerRefs = (0, import_react43.useRef)([]);
13494
13725
  const { theme: contextTheme } = useTheme();
13495
- const theme = themeProp != null ? themeProp : contextTheme;
13726
+ const theme = themeProp ?? contextTheme;
13496
13727
  const listThemeClass = getThemeClass(theme, "tabs", "default");
13497
13728
  const triggerActiveClass = getThemeClass(theme, "tabs", "triggerActive");
13498
13729
  const triggerInactiveClass = getThemeClass(theme, "tabs", "triggerInactive");
13499
- const setValue = (0, import_react42.useCallback)(
13730
+ const setValue = (0, import_react43.useCallback)(
13500
13731
  (v) => {
13501
13732
  if (!isControlled) setUncontrolled(v);
13502
- onValueChange == null ? void 0 : onValueChange(v);
13733
+ onValueChange?.(v);
13503
13734
  },
13504
13735
  [isControlled, onValueChange]
13505
13736
  );
13506
- (0, import_react42.useEffect)(() => {
13737
+ (0, import_react43.useEffect)(() => {
13507
13738
  triggerRefs.current = triggerRefs.current.slice(0, items.length);
13508
13739
  }, [items.length]);
13509
- const handleKeyDown = (0, import_react42.useCallback)(
13740
+ const handleKeyDown = (0, import_react43.useCallback)(
13510
13741
  (e) => {
13511
- var _a2, _b;
13512
13742
  if (e.key === "ArrowLeft") {
13513
13743
  e.preventDefault();
13514
13744
  const next = getNextListIndex(safeIndex, "up", items.length);
13515
13745
  setValue(items[next].value);
13516
- (_a2 = triggerRefs.current[next]) == null ? void 0 : _a2.focus();
13746
+ triggerRefs.current[next]?.focus();
13517
13747
  } else if (e.key === "ArrowRight") {
13518
13748
  e.preventDefault();
13519
13749
  const next = getNextListIndex(safeIndex, "down", items.length);
13520
13750
  setValue(items[next].value);
13521
- (_b = triggerRefs.current[next]) == null ? void 0 : _b.focus();
13751
+ triggerRefs.current[next]?.focus();
13522
13752
  }
13523
13753
  },
13524
13754
  [items, safeIndex, setValue]
13525
13755
  );
13526
13756
  const activeItem = items[safeIndex];
13527
- const content = (_a = activeItem == null ? void 0 : activeItem.content) != null ? _a : null;
13757
+ const content = activeItem?.content ?? null;
13528
13758
  return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: cn("w-full min-w-0", className), style, children: [
13529
13759
  /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
13530
13760
  "div",
@@ -13620,7 +13850,7 @@ function Timeline({
13620
13850
  theme: themeProp
13621
13851
  }) {
13622
13852
  const { theme: contextTheme } = useTheme();
13623
- const theme = themeProp != null ? themeProp : contextTheme;
13853
+ const theme = themeProp ?? contextTheme;
13624
13854
  const themeClass = getThemeClass(theme, "timeline", "default");
13625
13855
  return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
13626
13856
  "div",
@@ -13692,7 +13922,7 @@ function Toast({
13692
13922
  }
13693
13923
 
13694
13924
  // components/Toggle.tsx
13695
- var import_react43 = require("react");
13925
+ var import_react44 = require("react");
13696
13926
  var import_jsx_runtime34 = require("react/jsx-runtime");
13697
13927
  var toggleVariants = cva(
13698
13928
  "relative inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full px-0.5 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 data-[state=off]:justify-start data-[state=on]:justify-end [&:has(input:disabled)]:cursor-not-allowed [&:has(input:disabled)]:opacity-50",
@@ -13701,38 +13931,30 @@ var toggleVariants = cva(
13701
13931
  defaultVariants: {}
13702
13932
  }
13703
13933
  );
13704
- var Toggle = (0, import_react43.forwardRef)(function Toggle2(_a, ref) {
13705
- var _b = _a, {
13706
- checked: controlledChecked,
13707
- defaultChecked = false,
13708
- onCheckedChange,
13709
- className,
13710
- "aria-label": ariaLabel = "Toggle",
13711
- theme: themeProp,
13712
- disabled
13713
- } = _b, props = __objRest(_b, [
13714
- "checked",
13715
- "defaultChecked",
13716
- "onCheckedChange",
13717
- "className",
13718
- "aria-label",
13719
- "theme",
13720
- "disabled"
13721
- ]);
13722
- const [uncontrolled, setUncontrolled] = (0, import_react43.useState)(defaultChecked);
13934
+ var Toggle = (0, import_react44.forwardRef)(function Toggle2({
13935
+ checked: controlledChecked,
13936
+ defaultChecked = false,
13937
+ onCheckedChange,
13938
+ className,
13939
+ "aria-label": ariaLabel = "Toggle",
13940
+ theme: themeProp,
13941
+ disabled,
13942
+ ...props
13943
+ }, ref) {
13944
+ const [uncontrolled, setUncontrolled] = (0, import_react44.useState)(defaultChecked);
13723
13945
  const isControlled = controlledChecked !== void 0;
13724
13946
  const checked = isControlled ? controlledChecked : uncontrolled;
13725
13947
  const { theme: contextTheme } = useTheme();
13726
- const theme = themeProp != null ? themeProp : contextTheme;
13948
+ const theme = themeProp ?? contextTheme;
13727
13949
  const themeClass = getThemeClass(theme, "toggle", "default");
13728
13950
  const thumbOnDark = theme === "night" && checked;
13729
13951
  const thumbClass = thumbOnDark ? "bg-zinc-900 shadow-inner" : "bg-white shadow";
13730
- const id3 = (0, import_react43.useId)();
13731
- const handleChange = (0, import_react43.useCallback)(
13952
+ const id3 = (0, import_react44.useId)();
13953
+ const handleChange = (0, import_react44.useCallback)(
13732
13954
  (e) => {
13733
13955
  const next = e.target.checked;
13734
13956
  if (!isControlled) setUncontrolled(next);
13735
- onCheckedChange == null ? void 0 : onCheckedChange(next);
13957
+ onCheckedChange?.(next);
13736
13958
  },
13737
13959
  [isControlled, onCheckedChange]
13738
13960
  );
@@ -13745,7 +13967,7 @@ var Toggle = (0, import_react43.forwardRef)(function Toggle2(_a, ref) {
13745
13967
  children: [
13746
13968
  /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
13747
13969
  "input",
13748
- __spreadValues({
13970
+ {
13749
13971
  ref,
13750
13972
  id: id3,
13751
13973
  type: "checkbox",
@@ -13755,8 +13977,9 @@ var Toggle = (0, import_react43.forwardRef)(function Toggle2(_a, ref) {
13755
13977
  checked,
13756
13978
  disabled,
13757
13979
  onChange: handleChange,
13758
- className: "sr-only"
13759
- }, props)
13980
+ className: "sr-only",
13981
+ ...props
13982
+ }
13760
13983
  ),
13761
13984
  /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
13762
13985
  "span",
@@ -13773,7 +13996,7 @@ var Toggle = (0, import_react43.forwardRef)(function Toggle2(_a, ref) {
13773
13996
  });
13774
13997
 
13775
13998
  // components/Tooltip.tsx
13776
- var import_react44 = require("react");
13999
+ var import_react45 = require("react");
13777
14000
  var import_jsx_runtime35 = require("react/jsx-runtime");
13778
14001
  var placementClasses = {
13779
14002
  top: "bottom-full left-1/2 -translate-x-1/2 mb-2",
@@ -13793,12 +14016,12 @@ function Tooltip({
13793
14016
  style,
13794
14017
  theme: themeProp
13795
14018
  }) {
13796
- const [visible, setVisible] = (0, import_react44.useState)(false);
14019
+ const [visible, setVisible] = (0, import_react45.useState)(false);
13797
14020
  const { theme: contextTheme } = useTheme();
13798
- const theme = themeProp != null ? themeProp : contextTheme;
14021
+ const theme = themeProp ?? contextTheme;
13799
14022
  const themeClass = getThemeClass(theme, "tooltip", "default");
13800
- const show = (0, import_react44.useCallback)(() => setVisible(true), []);
13801
- const hide = (0, import_react44.useCallback)(() => setVisible(false), []);
14023
+ const show = (0, import_react45.useCallback)(() => setVisible(true), []);
14024
+ const hide = (0, import_react45.useCallback)(() => setVisible(false), []);
13802
14025
  return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
13803
14026
  "span",
13804
14027
  {
@@ -13826,6 +14049,94 @@ function Tooltip({
13826
14049
  }
13827
14050
  );
13828
14051
  }
14052
+
14053
+ // lib/theme-recommendations.ts
14054
+ var THEME_BACKGROUNDS = {
14055
+ minimal: "bg-white text-zinc-900",
14056
+ night: "bg-zinc-950 text-zinc-100",
14057
+ glass: "bg-gradient-to-br from-slate-100 via-blue-50/80 to-slate-50 text-slate-800",
14058
+ neubrutal: "bg-amber-100 text-black",
14059
+ clay: "bg-gradient-to-br from-rose-100 via-sky-50 to-amber-50 text-zinc-900",
14060
+ cyberpunk: "bg-black text-zinc-100",
14061
+ retro: "bg-zinc-100 text-black",
14062
+ motion: "bg-gradient-to-br from-indigo-50 via-white to-purple-50 text-zinc-900"
14063
+ };
14064
+ var THEME_NAVBAR = {
14065
+ minimal: "bg-white text-zinc-900 border-b border-zinc-200",
14066
+ night: "bg-zinc-950 text-zinc-100 border-b border-white/10",
14067
+ glass: "rounded-none bg-white/50 backdrop-blur-2xl border-b border-white/60 text-slate-800 shadow-glass-soft",
14068
+ neubrutal: "rounded-none bg-[#FFD600] text-black border-b-4 border-black shadow-neubrutal",
14069
+ clay: "rounded-b-3xl bg-white/80 text-zinc-900 backdrop-blur-md shadow-clay-outer border-b border-zinc-200",
14070
+ cyberpunk: "bg-black text-[#22d3ee] border-b-2 border-[#22d3ee] font-mono",
14071
+ retro: "rounded-none bg-zinc-100 text-black border-b-2 border-black font-mono shadow-[0_4px_0_0_rgba(0,0,0,1)]",
14072
+ motion: "rounded-none bg-white/95 backdrop-blur-md text-zinc-900 border-b-2 border-indigo-100 shadow-sm transition-all duration-300"
14073
+ };
14074
+ var THEME_RECOMMENDATIONS = {
14075
+ minimal: {
14076
+ background: "bg-white",
14077
+ surface: "bg-white",
14078
+ text: "text-zinc-900",
14079
+ accent: "zinc-900",
14080
+ navbar: THEME_NAVBAR.minimal,
14081
+ notes: "Neutral, light. White background; navbar and components use white + zinc borders."
14082
+ },
14083
+ night: {
14084
+ background: "bg-zinc-950",
14085
+ surface: "bg-zinc-950",
14086
+ text: "text-zinc-100",
14087
+ accent: "white",
14088
+ navbar: THEME_NAVBAR.night,
14089
+ notes: "Dark mode. Deep zinc background; navbar and surfaces use zinc-950, white/10 borders."
14090
+ },
14091
+ glass: {
14092
+ background: "bg-gradient-to-br from-slate-100 via-blue-50/80 to-slate-50",
14093
+ surface: "bg-white/60 backdrop-blur-2xl",
14094
+ text: "text-slate-800",
14095
+ accent: "slate-700",
14096
+ navbar: THEME_NAVBAR.glass,
14097
+ notes: "Frosted glass. Soft gradient background; navbar/surfaces semi-transparent white + backdrop-blur."
14098
+ },
14099
+ neubrutal: {
14100
+ background: "bg-amber-100",
14101
+ surface: "bg-white",
14102
+ text: "text-black",
14103
+ accent: "#FFD600, #FF5733",
14104
+ navbar: THEME_NAVBAR.neubrutal,
14105
+ notes: "Bold, high contrast. Page background is light amber (bg-amber-100); bright yellow (#FFD600) is for navbar and accent only."
14106
+ },
14107
+ clay: {
14108
+ background: "bg-gradient-to-br from-rose-100 via-sky-50 to-amber-50",
14109
+ surface: "bg-rose-50 / bg-white",
14110
+ text: "text-zinc-900",
14111
+ accent: "rose-600 / sky",
14112
+ navbar: THEME_NAVBAR.clay,
14113
+ notes: "Soft, tactile. Rose/sky/amber gradient; navbar white/80 + clay shadow."
14114
+ },
14115
+ cyberpunk: {
14116
+ background: "bg-black",
14117
+ surface: "bg-black",
14118
+ text: "text-zinc-100",
14119
+ accent: "#22d3ee, #ec4899",
14120
+ navbar: THEME_NAVBAR.cyberpunk,
14121
+ notes: "Dark, neon. Black background; navbar black + cyan border/text."
14122
+ },
14123
+ retro: {
14124
+ background: "bg-zinc-100",
14125
+ surface: "bg-white",
14126
+ text: "text-black",
14127
+ accent: "lime-500",
14128
+ navbar: THEME_NAVBAR.retro,
14129
+ notes: "8-bit vibe. Zinc-100 page; navbar zinc-100, black border."
14130
+ },
14131
+ motion: {
14132
+ background: "bg-gradient-to-br from-indigo-50 via-white to-purple-50",
14133
+ surface: "bg-white",
14134
+ text: "text-zinc-900",
14135
+ accent: "indigo-500",
14136
+ navbar: THEME_NAVBAR.motion,
14137
+ notes: "Soft gradients. Indigo/purple gradient background; navbar white/95 + indigo border."
14138
+ }
14139
+ };
13829
14140
  // Annotate the CommonJS export names for ESM import in node:
13830
14141
  0 && (module.exports = {
13831
14142
  Accordion,
@@ -13856,6 +14167,9 @@ function Tooltip({
13856
14167
  Slider,
13857
14168
  StatsCard,
13858
14169
  THEMES,
14170
+ THEME_BACKGROUNDS,
14171
+ THEME_NAVBAR,
14172
+ THEME_RECOMMENDATIONS,
13859
14173
  Tabs,
13860
14174
  Terminal,
13861
14175
  ThemeProvider,