uitheme-web 1.0.1 → 1.2.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/README.md +167 -36
- package/dist/chunk-DFJEYTIW.js +12 -0
- package/dist/chunk-V3LMT5IJ.cjs +12 -0
- package/dist/chunk-W4YFUPGE.cjs +18 -0
- package/dist/chunk-WFG34KG5.js +18 -0
- package/dist/cli/index.js +39 -0
- package/dist/constants-DmZ7yAIL.d.cts +145 -0
- package/dist/constants-DmZ7yAIL.d.ts +145 -0
- package/dist/core/index.cjs +1 -270
- package/dist/core/index.d.cts +7 -3
- package/dist/core/index.d.ts +7 -3
- package/dist/core/index.js +1 -246
- package/dist/logo-DtwtRv4y.d.cts +4 -0
- package/dist/logo-DtwtRv4y.d.ts +4 -0
- package/dist/react/index.cjs +33 -1701
- package/dist/react/index.d.cts +78 -182
- package/dist/react/index.d.ts +78 -182
- package/dist/react/index.js +33 -1640
- package/dist/tanstack/index.cjs +1 -30
- package/dist/tanstack/index.d.cts +2 -2
- package/dist/tanstack/index.d.ts +2 -2
- package/dist/tanstack/index.js +1 -25
- package/package.json +22 -14
- package/dist/constants-n21pnuRC.d.cts +0 -106
- package/dist/constants-n21pnuRC.d.ts +0 -106
package/dist/react/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
export { p as preloadThemeLogo } from '../logo-DtwtRv4y.js';
|
|
2
|
+
import { T as Theme, C as ColorTheme, i as ThemeAnimationOptions, j as ThemeAnimationType, g as SlideDirection } from '../constants-DmZ7yAIL.js';
|
|
3
|
+
export { A as AnimationConfig, a as AnimationPosition, b as COLOR_STORAGE_KEY, c as COLOR_THEME_PREFIX, D as DEFAULT_BLUR_AMOUNT, d as DEFAULT_DURATION, e as DEFAULT_EASING, f as DEFAULT_STYLE_ID, G as GLOBAL_CLASS_NAME, S as STORAGE_KEY, h as TRANSITION_DIRECTIONS, k as ThemeConfig, l as ThemeLogoOptions, m as ThemeState, n as TransitionDirection, y as getSystemTheme, z as injectBaseStyles, B as prefersReducedMotion, E as resolveTheme, H as resolveThemeForServer, F as supportsViewTransitions } from '../constants-DmZ7yAIL.js';
|
|
3
4
|
import * as React$1 from 'react';
|
|
4
|
-
import React__default, { RefObject, ReactNode } from 'react';
|
|
5
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
5
|
+
import React__default, { RefObject, ReactNode, JSX } from 'react';
|
|
6
6
|
import * as SelectPrimitive from '@radix-ui/react-select';
|
|
7
7
|
|
|
8
8
|
/** System theme resolution mode */
|
|
@@ -10,16 +10,16 @@ type SystemThemeMode = 'css' | 'js';
|
|
|
10
10
|
/**
|
|
11
11
|
* Props for the useTheme hook
|
|
12
12
|
*/
|
|
13
|
-
|
|
13
|
+
type UseThemeProps = ThemeAnimationOptions & {
|
|
14
14
|
/** Animation duration in milliseconds */
|
|
15
15
|
duration?: number;
|
|
16
16
|
/** CSS easing function */
|
|
17
17
|
easing?: string;
|
|
18
18
|
/** Type of animation to use */
|
|
19
19
|
animationType?: ThemeAnimationType;
|
|
20
|
-
/**
|
|
20
|
+
/** Reveal edge feather in CSS pixels, capped at 20 (0 uses a sharp circle). */
|
|
21
21
|
blurAmount?: number;
|
|
22
|
-
/** ID for
|
|
22
|
+
/** Legacy style ID, retained for compatibility with the native animation path. */
|
|
23
23
|
styleId?: string;
|
|
24
24
|
/** Available themes */
|
|
25
25
|
themes?: Theme[];
|
|
@@ -72,10 +72,22 @@ interface UseThemeProps {
|
|
|
72
72
|
* @default 'js'
|
|
73
73
|
*/
|
|
74
74
|
systemThemeMode?: SystemThemeMode;
|
|
75
|
+
};
|
|
76
|
+
/** Per-call animation controls shared by all providers. */
|
|
77
|
+
interface ThemeTransitionOptions {
|
|
78
|
+
/** Skip the view transition (also automatically skipped for reduced motion). */
|
|
79
|
+
animationOff?: boolean;
|
|
80
|
+
/** Trigger element; its viewport rectangle is read synchronously. */
|
|
81
|
+
element?: Element | null;
|
|
82
|
+
/** Viewport-relative CSS pixels. Never multiply these coordinates by DPR. */
|
|
83
|
+
origin?: {
|
|
84
|
+
x: number;
|
|
85
|
+
y: number;
|
|
86
|
+
};
|
|
75
87
|
}
|
|
76
|
-
/**
|
|
77
|
-
|
|
78
|
-
|
|
88
|
+
/** Boolean arguments remain supported for backward compatibility. */
|
|
89
|
+
type ThemeTransitionInput = boolean | ThemeTransitionOptions;
|
|
90
|
+
type ColorThemeToggle = (options?: ThemeTransitionInput | Pick<React.MouseEvent<HTMLElement>, 'currentTarget' | 'detail'>) => Promise<void>;
|
|
79
91
|
interface UseThemeReturn {
|
|
80
92
|
/** Ref to attach to the trigger button */
|
|
81
93
|
ref: RefObject<HTMLButtonElement | null>;
|
|
@@ -87,29 +99,29 @@ interface UseThemeReturn {
|
|
|
87
99
|
resolvedTheme: 'light' | 'dark';
|
|
88
100
|
/** Set theme without animation */
|
|
89
101
|
setTheme: (theme: Theme) => void;
|
|
90
|
-
/** Set color theme */
|
|
102
|
+
/** Set color theme without animation */
|
|
91
103
|
setColorTheme: (colorTheme: ColorTheme) => void;
|
|
92
104
|
/** Switch theme with animation */
|
|
93
|
-
switchTheme: (theme: Theme,
|
|
94
|
-
/** Switch color theme */
|
|
95
|
-
switchColorTheme: (colorTheme: string) => void
|
|
105
|
+
switchTheme: (theme: Theme, options?: ThemeTransitionInput) => Promise<void>;
|
|
106
|
+
/** Switch color theme with animation */
|
|
107
|
+
switchColorTheme: (colorTheme: string, options?: ThemeTransitionInput) => Promise<void>;
|
|
96
108
|
/** Toggle between light and dark */
|
|
97
|
-
toggleTheme: (
|
|
109
|
+
toggleTheme: (options?: ThemeTransitionInput) => Promise<void>;
|
|
98
110
|
/** Switch to light theme with animation */
|
|
99
|
-
toggleLightTheme: (
|
|
111
|
+
toggleLightTheme: (options?: ThemeTransitionInput) => Promise<void>;
|
|
100
112
|
/** Switch to dark theme with animation */
|
|
101
|
-
toggleDarkTheme: (
|
|
113
|
+
toggleDarkTheme: (options?: ThemeTransitionInput) => Promise<void>;
|
|
102
114
|
/** Cycle through color themes */
|
|
103
|
-
toggleColorTheme:
|
|
115
|
+
toggleColorTheme: ColorThemeToggle;
|
|
104
116
|
/** Create a toggle function for a specific color theme */
|
|
105
|
-
createColorThemeToggle: (targetColorTheme: string) =>
|
|
117
|
+
createColorThemeToggle: (targetColorTheme: string) => ColorThemeToggle;
|
|
106
118
|
/** Check if a color theme is active */
|
|
107
119
|
isColorThemeActive: (targetColorTheme: string) => boolean;
|
|
108
120
|
}
|
|
109
121
|
/**
|
|
110
122
|
* Props for UIThemeSwitcher component
|
|
111
123
|
*/
|
|
112
|
-
|
|
124
|
+
type UIThemeSwitcherProps = ThemeAnimationOptions & {
|
|
113
125
|
/** Available themes */
|
|
114
126
|
themes?: Theme[];
|
|
115
127
|
/** Current theme (controlled) */
|
|
@@ -132,11 +144,11 @@ interface UIThemeSwitcherProps {
|
|
|
132
144
|
dark?: React.ReactNode;
|
|
133
145
|
system?: React.ReactNode;
|
|
134
146
|
};
|
|
135
|
-
}
|
|
147
|
+
};
|
|
136
148
|
/**
|
|
137
149
|
* Props for UIThemeSelector component
|
|
138
150
|
*/
|
|
139
|
-
|
|
151
|
+
type UIThemeSelectorProps = ThemeAnimationOptions & {
|
|
140
152
|
/** Available themes */
|
|
141
153
|
themes?: Theme[];
|
|
142
154
|
/** Available color themes */
|
|
@@ -161,7 +173,7 @@ interface UIThemeSelectorProps {
|
|
|
161
173
|
themeLabel?: string;
|
|
162
174
|
/** Label for color theme selector */
|
|
163
175
|
colorThemeLabel?: string;
|
|
164
|
-
}
|
|
176
|
+
};
|
|
165
177
|
|
|
166
178
|
/**
|
|
167
179
|
* React hook for theme switching with View Transitions API animations
|
|
@@ -173,44 +185,16 @@ declare const useTheme: (props?: UseThemeProps) => UseThemeReturn;
|
|
|
173
185
|
/**
|
|
174
186
|
* Context type for the Next.js UI Theme Provider
|
|
175
187
|
*/
|
|
176
|
-
interface NextUIThemeContextType {
|
|
177
|
-
/** Ref to attach to the trigger button */
|
|
178
|
-
ref: React__default.RefObject<HTMLButtonElement | null>;
|
|
179
|
-
/** Current theme value */
|
|
180
|
-
theme: Theme;
|
|
181
|
-
/** Current color theme value */
|
|
182
|
-
colorTheme: ColorTheme;
|
|
183
|
-
/** Resolved theme (light or dark) */
|
|
184
|
-
resolvedTheme: 'light' | 'dark';
|
|
188
|
+
interface NextUIThemeContextType extends UseThemeReturn {
|
|
185
189
|
/** System theme preference */
|
|
186
190
|
systemTheme: 'light' | 'dark';
|
|
187
|
-
/**
|
|
188
|
-
|
|
189
|
-
/** Set color theme */
|
|
190
|
-
setColorTheme: (colorTheme: ColorTheme) => void;
|
|
191
|
-
/** Switch theme with animation */
|
|
192
|
-
switchTheme: (theme: Theme, animationOff?: boolean) => Promise<void>;
|
|
193
|
-
/** Switch color theme */
|
|
194
|
-
switchColorTheme: (colorTheme: string) => void;
|
|
195
|
-
/** Toggle between light and dark */
|
|
196
|
-
toggleTheme: (animationOff?: boolean) => Promise<void>;
|
|
197
|
-
/** Switch to light theme with animation */
|
|
198
|
-
toggleLightTheme: (animationOff?: boolean) => Promise<void>;
|
|
199
|
-
/** Switch to dark theme with animation */
|
|
200
|
-
toggleDarkTheme: (animationOff?: boolean) => Promise<void>;
|
|
201
|
-
/** Cycle through color themes */
|
|
202
|
-
toggleColorTheme: () => void;
|
|
203
|
-
/** Create a toggle function for a specific color theme */
|
|
204
|
-
createColorThemeToggle: (targetColorTheme: string) => () => void;
|
|
205
|
-
/** Check if a color theme is active */
|
|
206
|
-
isColorThemeActive: (targetColorTheme: string) => boolean;
|
|
207
|
-
/** Switch theme from a specific element (for animation origin) */
|
|
208
|
-
switchThemeFromElement: (theme: Theme, element: HTMLButtonElement) => Promise<void>;
|
|
191
|
+
/** Legacy convenience wrapper; does not mutate the shared ref. */
|
|
192
|
+
switchThemeFromElement: (theme: Theme, element: Element) => Promise<void>;
|
|
209
193
|
}
|
|
210
194
|
/**
|
|
211
195
|
* Props for the Next.js UI Theme Provider
|
|
212
196
|
*/
|
|
213
|
-
|
|
197
|
+
type NextUIThemeProviderProps = ThemeAnimationOptions & {
|
|
214
198
|
/** React children to wrap with theme context */
|
|
215
199
|
children: ReactNode;
|
|
216
200
|
/** Available theme options */
|
|
@@ -241,7 +225,7 @@ interface NextUIThemeProviderProps {
|
|
|
241
225
|
disableAnimationOnInit?: boolean;
|
|
242
226
|
/** Disable flash prevention script (for SPAs without SSR) */
|
|
243
227
|
disablePreHydrationScript?: boolean;
|
|
244
|
-
}
|
|
228
|
+
};
|
|
245
229
|
/**
|
|
246
230
|
* Next.js UI Theme Provider - Universal React theme management with animations
|
|
247
231
|
*
|
|
@@ -269,46 +253,18 @@ declare const useNextUITheme: () => NextUIThemeContextType;
|
|
|
269
253
|
/**
|
|
270
254
|
* Context type for the TanStack Start UI Theme Provider
|
|
271
255
|
*/
|
|
272
|
-
interface TanStackUIThemeContextType {
|
|
273
|
-
/** Ref to attach to the trigger button */
|
|
274
|
-
ref: React__default.RefObject<HTMLButtonElement | null>;
|
|
275
|
-
/** Current theme value */
|
|
276
|
-
theme: Theme;
|
|
277
|
-
/** Current color theme value */
|
|
278
|
-
colorTheme: ColorTheme;
|
|
279
|
-
/** Resolved theme (light or dark) */
|
|
280
|
-
resolvedTheme: 'light' | 'dark';
|
|
256
|
+
interface TanStackUIThemeContextType extends UseThemeReturn {
|
|
281
257
|
/** System theme preference */
|
|
282
258
|
systemTheme: 'light' | 'dark';
|
|
283
259
|
/** Whether the component is hydrated */
|
|
284
260
|
isHydrated: boolean;
|
|
285
|
-
/**
|
|
286
|
-
|
|
287
|
-
/** Set color theme */
|
|
288
|
-
setColorTheme: (colorTheme: ColorTheme) => void;
|
|
289
|
-
/** Switch theme with animation */
|
|
290
|
-
switchTheme: (theme: Theme, animationOff?: boolean) => Promise<void>;
|
|
291
|
-
/** Switch color theme */
|
|
292
|
-
switchColorTheme: (colorTheme: string) => void;
|
|
293
|
-
/** Toggle between light and dark */
|
|
294
|
-
toggleTheme: (animationOff?: boolean) => Promise<void>;
|
|
295
|
-
/** Switch to light theme with animation */
|
|
296
|
-
toggleLightTheme: (animationOff?: boolean) => Promise<void>;
|
|
297
|
-
/** Switch to dark theme with animation */
|
|
298
|
-
toggleDarkTheme: (animationOff?: boolean) => Promise<void>;
|
|
299
|
-
/** Cycle through color themes */
|
|
300
|
-
toggleColorTheme: () => void;
|
|
301
|
-
/** Create a toggle function for a specific color theme */
|
|
302
|
-
createColorThemeToggle: (targetColorTheme: string) => () => void;
|
|
303
|
-
/** Check if a color theme is active */
|
|
304
|
-
isColorThemeActive: (targetColorTheme: string) => boolean;
|
|
305
|
-
/** Switch theme from a specific element (for animation origin) */
|
|
306
|
-
switchThemeFromElement: (theme: Theme, element: HTMLButtonElement) => Promise<void>;
|
|
261
|
+
/** Legacy convenience wrapper; does not mutate the shared ref. */
|
|
262
|
+
switchThemeFromElement: (theme: Theme, element: Element) => Promise<void>;
|
|
307
263
|
}
|
|
308
264
|
/**
|
|
309
265
|
* Props for the TanStack Start UI Theme Provider
|
|
310
266
|
*/
|
|
311
|
-
|
|
267
|
+
type TanStackUIThemeProviderProps = ThemeAnimationOptions & {
|
|
312
268
|
/** React children to wrap with theme context */
|
|
313
269
|
children: ReactNode;
|
|
314
270
|
/** Available theme options */
|
|
@@ -361,7 +317,9 @@ interface TanStackUIThemeProviderProps {
|
|
|
361
317
|
* Typically `setColorThemeServerFn` from `createThemeServerFns()`.
|
|
362
318
|
*/
|
|
363
319
|
onServerColorThemeChange?: (colorTheme: string) => Promise<void> | void;
|
|
364
|
-
|
|
320
|
+
/** Observe failed cookie/server notifications; defaults to console.error. */
|
|
321
|
+
onServerError?: (error: Error) => void;
|
|
322
|
+
};
|
|
365
323
|
/**
|
|
366
324
|
* Props for the TanStackStartThemeScript component
|
|
367
325
|
*/
|
|
@@ -413,6 +371,10 @@ interface TanStackStartThemeScriptProps {
|
|
|
413
371
|
* ```
|
|
414
372
|
*/
|
|
415
373
|
declare const TanStackStartThemeScript: React__default.FC<TanStackStartThemeScriptProps>;
|
|
374
|
+
/**
|
|
375
|
+
* Custom hook to detect hydration state
|
|
376
|
+
* Compatible with TanStack Start's isomorphic model
|
|
377
|
+
*/
|
|
416
378
|
/**
|
|
417
379
|
* TanStack Start UI Theme Provider - Flash-free dark mode for TanStack Start
|
|
418
380
|
*
|
|
@@ -445,44 +407,16 @@ declare const useTanStackUITheme: () => TanStackUIThemeContextType;
|
|
|
445
407
|
/**
|
|
446
408
|
* Context type for the Vite UI Theme Provider
|
|
447
409
|
*/
|
|
448
|
-
interface ViteUIThemeContextType {
|
|
449
|
-
/** Ref to attach to the trigger button */
|
|
450
|
-
ref: React__default.RefObject<HTMLButtonElement | null>;
|
|
451
|
-
/** Current theme value */
|
|
452
|
-
theme: Theme;
|
|
453
|
-
/** Current color theme value */
|
|
454
|
-
colorTheme: ColorTheme;
|
|
455
|
-
/** Resolved theme (light or dark) */
|
|
456
|
-
resolvedTheme: 'light' | 'dark';
|
|
410
|
+
interface ViteUIThemeContextType extends UseThemeReturn {
|
|
457
411
|
/** System theme preference */
|
|
458
412
|
systemTheme: 'light' | 'dark';
|
|
459
|
-
/**
|
|
460
|
-
|
|
461
|
-
/** Set color theme */
|
|
462
|
-
setColorTheme: (colorTheme: ColorTheme) => void;
|
|
463
|
-
/** Switch theme with animation */
|
|
464
|
-
switchTheme: (theme: Theme, animationOff?: boolean) => Promise<void>;
|
|
465
|
-
/** Switch color theme */
|
|
466
|
-
switchColorTheme: (colorTheme: string) => void;
|
|
467
|
-
/** Toggle between light and dark */
|
|
468
|
-
toggleTheme: (animationOff?: boolean) => Promise<void>;
|
|
469
|
-
/** Switch to light theme with animation */
|
|
470
|
-
toggleLightTheme: (animationOff?: boolean) => Promise<void>;
|
|
471
|
-
/** Switch to dark theme with animation */
|
|
472
|
-
toggleDarkTheme: (animationOff?: boolean) => Promise<void>;
|
|
473
|
-
/** Cycle through color themes */
|
|
474
|
-
toggleColorTheme: () => void;
|
|
475
|
-
/** Create a toggle function for a specific color theme */
|
|
476
|
-
createColorThemeToggle: (targetColorTheme: string) => () => void;
|
|
477
|
-
/** Check if a color theme is active */
|
|
478
|
-
isColorThemeActive: (targetColorTheme: string) => boolean;
|
|
479
|
-
/** Switch theme from a specific element (for animation origin) */
|
|
480
|
-
switchThemeFromElement: (theme: Theme, element: HTMLButtonElement) => Promise<void>;
|
|
413
|
+
/** Legacy convenience wrapper; does not mutate the shared ref. */
|
|
414
|
+
switchThemeFromElement: (theme: Theme, element: Element) => Promise<void>;
|
|
481
415
|
}
|
|
482
416
|
/**
|
|
483
417
|
* Props for the Vite UI Theme Provider
|
|
484
418
|
*/
|
|
485
|
-
|
|
419
|
+
type ViteUIThemeProviderProps = ThemeAnimationOptions & {
|
|
486
420
|
/** React children to wrap with theme context */
|
|
487
421
|
children: ReactNode;
|
|
488
422
|
/** Available theme options */
|
|
@@ -509,7 +443,7 @@ interface ViteUIThemeProviderProps {
|
|
|
509
443
|
globalClassName?: string;
|
|
510
444
|
/** Prefix for color theme classes */
|
|
511
445
|
colorThemePrefix?: string;
|
|
512
|
-
}
|
|
446
|
+
};
|
|
513
447
|
/**
|
|
514
448
|
* Vite UI Theme Provider - Theme provider optimized for Vite/SPA applications
|
|
515
449
|
*
|
|
@@ -533,42 +467,14 @@ declare const useViteUITheme: () => ViteUIThemeContextType;
|
|
|
533
467
|
/**
|
|
534
468
|
* Context type for the UI Theme Provider
|
|
535
469
|
*/
|
|
536
|
-
interface UIThemeContextType {
|
|
537
|
-
/**
|
|
538
|
-
|
|
539
|
-
/** Current theme value */
|
|
540
|
-
theme: Theme;
|
|
541
|
-
/** Current color theme value */
|
|
542
|
-
colorTheme: ColorTheme;
|
|
543
|
-
/** Resolved theme (light or dark) */
|
|
544
|
-
resolvedTheme: 'light' | 'dark';
|
|
545
|
-
/** Set theme without animation */
|
|
546
|
-
setTheme: (theme: Theme) => void;
|
|
547
|
-
/** Set color theme */
|
|
548
|
-
setColorTheme: (colorTheme: ColorTheme) => void;
|
|
549
|
-
/** Switch theme with animation */
|
|
550
|
-
switchTheme: (theme: Theme, animationOff?: boolean) => Promise<void>;
|
|
551
|
-
/** Switch color theme */
|
|
552
|
-
switchColorTheme: (colorTheme: string) => void;
|
|
553
|
-
/** Toggle between light and dark */
|
|
554
|
-
toggleTheme: (animationOff?: boolean) => Promise<void>;
|
|
555
|
-
/** Switch to light theme with animation */
|
|
556
|
-
toggleLightTheme: (animationOff?: boolean) => Promise<void>;
|
|
557
|
-
/** Switch to dark theme with animation */
|
|
558
|
-
toggleDarkTheme: (animationOff?: boolean) => Promise<void>;
|
|
559
|
-
/** Cycle through color themes */
|
|
560
|
-
toggleColorTheme: () => void;
|
|
561
|
-
/** Create a toggle function for a specific color theme */
|
|
562
|
-
createColorThemeToggle: (targetColorTheme: string) => () => void;
|
|
563
|
-
/** Check if a color theme is active */
|
|
564
|
-
isColorThemeActive: (targetColorTheme: string) => boolean;
|
|
565
|
-
/** Switch theme from a specific element (for animation origin) */
|
|
566
|
-
switchThemeFromElement: (theme: Theme, element: HTMLButtonElement) => Promise<void>;
|
|
470
|
+
interface UIThemeContextType extends UseThemeReturn {
|
|
471
|
+
/** Legacy convenience wrapper; does not mutate the shared ref. */
|
|
472
|
+
switchThemeFromElement: (theme: Theme, element: Element) => Promise<void>;
|
|
567
473
|
}
|
|
568
474
|
/**
|
|
569
475
|
* Props for the UI Theme Provider
|
|
570
476
|
*/
|
|
571
|
-
|
|
477
|
+
type UIThemeProviderProps = ThemeAnimationOptions & {
|
|
572
478
|
/** React children to wrap with theme context */
|
|
573
479
|
children: ReactNode;
|
|
574
480
|
/** Available theme options */
|
|
@@ -587,7 +493,7 @@ interface UIThemeProviderProps {
|
|
|
587
493
|
storageKey?: string;
|
|
588
494
|
/** Storage key for color theme */
|
|
589
495
|
colorStorageKey?: string;
|
|
590
|
-
}
|
|
496
|
+
};
|
|
591
497
|
/**
|
|
592
498
|
* UI Theme Provider - Provides centralized theme state management
|
|
593
499
|
*
|
|
@@ -605,33 +511,23 @@ declare const UIThemeProvider: React__default.FC<UIThemeProviderProps>;
|
|
|
605
511
|
*/
|
|
606
512
|
declare const useUITheme: () => UIThemeContextType;
|
|
607
513
|
|
|
608
|
-
|
|
609
|
-
* UI Theme Switcher - A button group for switching between themes
|
|
610
|
-
*
|
|
611
|
-
* Can work both with UIThemeProvider context or standalone.
|
|
612
|
-
* When used with UIThemeProvider, it automatically syncs theme state.
|
|
613
|
-
*/
|
|
614
|
-
declare const UIThemeSwitcher: React__default.FC<UIThemeSwitcherProps>;
|
|
514
|
+
declare const UIThemeSwitcher: (props: UIThemeSwitcherProps) => JSX.Element;
|
|
615
515
|
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
516
|
+
declare const UIThemeSelector: (props: UIThemeSelectorProps) => React$1.JSX.Element;
|
|
517
|
+
|
|
518
|
+
declare function UISelect({ ...props }: React$1.ComponentProps<typeof SelectPrimitive.Root>): React$1.JSX.Element;
|
|
519
|
+
declare function UISelectGroup({ ...props }: React$1.ComponentProps<typeof SelectPrimitive.Group>): React$1.JSX.Element;
|
|
520
|
+
declare function UISelectValue({ ...props }: React$1.ComponentProps<typeof SelectPrimitive.Value>): React$1.JSX.Element;
|
|
521
|
+
declare const UISelectTrigger: React$1.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectTriggerProps & React$1.RefAttributes<HTMLButtonElement>, "ref"> & {
|
|
522
|
+
size?: "sm" | "default";
|
|
523
|
+
} & React$1.RefAttributes<HTMLButtonElement>>;
|
|
524
|
+
declare function UISelectContent({ className, children, position, ...props }: React$1.ComponentProps<typeof SelectPrimitive.Content>): React$1.JSX.Element;
|
|
525
|
+
declare function UISelectLabel({ className, ...props }: React$1.ComponentProps<typeof SelectPrimitive.Label>): React$1.JSX.Element;
|
|
526
|
+
declare function UISelectItem({ className, children, ...props }: React$1.ComponentProps<typeof SelectPrimitive.Item>): React$1.JSX.Element;
|
|
527
|
+
declare function UISelectSeparator({ className, ...props }: React$1.ComponentProps<typeof SelectPrimitive.Separator>): React$1.JSX.Element;
|
|
528
|
+
declare function UISelectScrollUpButton({ className, ...props }: React$1.ComponentProps<typeof SelectPrimitive.ScrollUpButton>): React$1.JSX.Element;
|
|
529
|
+
declare function UISelectScrollDownButton({ className, ...props }: React$1.ComponentProps<typeof SelectPrimitive.ScrollDownButton>): React$1.JSX.Element;
|
|
623
530
|
|
|
624
|
-
declare
|
|
625
|
-
declare function UISelectGroup({ ...props }: React$1.ComponentProps<typeof SelectPrimitive.Group>): react_jsx_runtime.JSX.Element;
|
|
626
|
-
declare function UISelectValue({ ...props }: React$1.ComponentProps<typeof SelectPrimitive.Value>): react_jsx_runtime.JSX.Element;
|
|
627
|
-
declare function UISelectTrigger({ className, size, children, ...props }: React$1.ComponentProps<typeof SelectPrimitive.Trigger> & {
|
|
628
|
-
size?: 'sm' | 'default';
|
|
629
|
-
}): react_jsx_runtime.JSX.Element;
|
|
630
|
-
declare function UISelectContent({ className, children, position, ...props }: React$1.ComponentProps<typeof SelectPrimitive.Content>): react_jsx_runtime.JSX.Element;
|
|
631
|
-
declare function UISelectLabel({ className, ...props }: React$1.ComponentProps<typeof SelectPrimitive.Label>): react_jsx_runtime.JSX.Element;
|
|
632
|
-
declare function UISelectItem({ className, children, ...props }: React$1.ComponentProps<typeof SelectPrimitive.Item>): react_jsx_runtime.JSX.Element;
|
|
633
|
-
declare function UISelectSeparator({ className, ...props }: React$1.ComponentProps<typeof SelectPrimitive.Separator>): react_jsx_runtime.JSX.Element;
|
|
634
|
-
declare function UISelectScrollUpButton({ className, ...props }: React$1.ComponentProps<typeof SelectPrimitive.ScrollUpButton>): react_jsx_runtime.JSX.Element;
|
|
635
|
-
declare function UISelectScrollDownButton({ className, ...props }: React$1.ComponentProps<typeof SelectPrimitive.ScrollDownButton>): react_jsx_runtime.JSX.Element;
|
|
531
|
+
declare const useHydrated: () => boolean;
|
|
636
532
|
|
|
637
|
-
export { ColorTheme, type NextUIThemeContextType, NextUIThemeProvider, type NextUIThemeProviderProps, SlideDirection, type SystemThemeMode, TanStackStartThemeScript, type TanStackStartThemeScriptProps, type TanStackUIThemeContextType, TanStackUIThemeProvider, type TanStackUIThemeProviderProps, Theme, ThemeAnimationType, UISelect, UISelectContent, UISelectGroup, UISelectItem, UISelectLabel, UISelectScrollDownButton, UISelectScrollUpButton, UISelectSeparator, UISelectTrigger, UISelectValue, type UIThemeContextType, UIThemeProvider, type UIThemeProviderProps, UIThemeSelector, type UIThemeSelectorProps, UIThemeSwitcher, type UIThemeSwitcherProps, type UseThemeProps, type UseThemeReturn, type ViteUIThemeContextType, ViteUIThemeProvider, type ViteUIThemeProviderProps, useNextUITheme, useTanStackUITheme, useTheme, useUITheme, useViteUITheme };
|
|
533
|
+
export { ColorTheme, type ColorThemeToggle, type NextUIThemeContextType, NextUIThemeProvider, type NextUIThemeProviderProps, SlideDirection, type SystemThemeMode, TanStackStartThemeScript, type TanStackStartThemeScriptProps, type TanStackUIThemeContextType, TanStackUIThemeProvider, type TanStackUIThemeProviderProps, Theme, ThemeAnimationOptions, ThemeAnimationType, type ThemeTransitionInput, type ThemeTransitionOptions, UISelect, UISelectContent, UISelectGroup, UISelectItem, UISelectLabel, UISelectScrollDownButton, UISelectScrollUpButton, UISelectSeparator, UISelectTrigger, UISelectValue, type UIThemeContextType, UIThemeProvider, type UIThemeProviderProps, UIThemeSelector, type UIThemeSelectorProps, UIThemeSwitcher, type UIThemeSwitcherProps, type UseThemeProps, type UseThemeReturn, type ViteUIThemeContextType, ViteUIThemeProvider, type ViteUIThemeProviderProps, useHydrated, useNextUITheme, useTanStackUITheme, useTheme, useUITheme, useViteUITheme };
|