@gradeui/ui 0.1.1 → 0.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 +1 -1
- package/dist/index.d.mts +30 -20
- package/dist/index.d.ts +30 -20
- package/dist/index.js +30 -30
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +30 -30
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/tailwind-preset.d.mts +1 -1
- package/dist/tailwind-preset.d.ts +1 -1
- package/dist/tailwind-preset.js +1 -1
- package/dist/tailwind-preset.js.map +1 -1
- package/dist/tailwind-preset.mjs +1 -1
- package/dist/tailwind-preset.mjs.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -46,7 +46,7 @@ export default {
|
|
|
46
46
|
|
|
47
47
|
## Theme engine
|
|
48
48
|
|
|
49
|
-
`@gradeui/ui` ships an OKLCH-based theme generator. Wrap your app in `GradeThemeProvider` (currently still named `
|
|
49
|
+
`@gradeui/ui` ships an OKLCH-based theme generator. Wrap your app in `GradeThemeProvider` (currently still named `GradeThemeProvider` pending rename — see upstream TODO) to get runtime theme switching.
|
|
50
50
|
|
|
51
51
|
## License
|
|
52
52
|
|
package/dist/index.d.mts
CHANGED
|
@@ -23,13 +23,13 @@ declare const AccordionTrigger: React$1.ForwardRefExoticComponent<Omit<Accordion
|
|
|
23
23
|
declare const AccordionContent: React$1.ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionContentProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
24
24
|
|
|
25
25
|
declare const Alert: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLDivElement> & VariantProps<(props?: ({
|
|
26
|
-
variant?: "
|
|
26
|
+
variant?: "default" | "destructive" | "success" | "warning" | "info" | "highlight" | null | undefined;
|
|
27
27
|
} & class_variance_authority_types.ClassProp) | undefined) => string> & React$1.RefAttributes<HTMLDivElement>>;
|
|
28
28
|
declare const AlertTitle: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLHeadingElement> & React$1.RefAttributes<HTMLParagraphElement>>;
|
|
29
29
|
declare const AlertDescription: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLParagraphElement> & React$1.RefAttributes<HTMLParagraphElement>>;
|
|
30
30
|
|
|
31
31
|
declare const badgeVariants: (props?: ({
|
|
32
|
-
variant?: "
|
|
32
|
+
variant?: "default" | "destructive" | "success" | "warning" | "info" | "highlight" | "secondary" | "outline" | "success-soft" | "warning-soft" | "destructive-soft" | "info-soft" | "highlight-soft" | "success-outline" | "warning-outline" | "destructive-outline" | "info-outline" | null | undefined;
|
|
33
33
|
rounded?: "default" | "full" | null | undefined;
|
|
34
34
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
35
35
|
interface BadgeProps extends React$1.HTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeVariants> {
|
|
@@ -37,8 +37,8 @@ interface BadgeProps extends React$1.HTMLAttributes<HTMLDivElement>, VariantProp
|
|
|
37
37
|
declare function Badge({ className, variant, rounded, ...props }: BadgeProps): React$1.JSX.Element;
|
|
38
38
|
|
|
39
39
|
declare const buttonVariants: (props?: ({
|
|
40
|
-
variant?: "link" | "
|
|
41
|
-
size?: "
|
|
40
|
+
variant?: "link" | "default" | "destructive" | "secondary" | "outline" | "ghost" | null | undefined;
|
|
41
|
+
size?: "default" | "sm" | "lg" | "icon" | null | undefined;
|
|
42
42
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
43
43
|
interface ButtonProps extends React$1.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
44
44
|
asChild?: boolean;
|
|
@@ -540,6 +540,16 @@ interface GeneratedColorsMode {
|
|
|
540
540
|
warning: OKLCHTriplet;
|
|
541
541
|
info: OKLCHTriplet;
|
|
542
542
|
highlight: OKLCHTriplet;
|
|
543
|
+
destructiveSoft: OKLCHTriplet;
|
|
544
|
+
destructiveDeep: OKLCHTriplet;
|
|
545
|
+
successSoft: OKLCHTriplet;
|
|
546
|
+
successDeep: OKLCHTriplet;
|
|
547
|
+
warningSoft: OKLCHTriplet;
|
|
548
|
+
warningDeep: OKLCHTriplet;
|
|
549
|
+
infoSoft: OKLCHTriplet;
|
|
550
|
+
infoDeep: OKLCHTriplet;
|
|
551
|
+
highlightSoft: OKLCHTriplet;
|
|
552
|
+
highlightDeep: OKLCHTriplet;
|
|
543
553
|
}
|
|
544
554
|
/** Concrete resolved CSS values for the typography dimension. */
|
|
545
555
|
interface GeneratedTypography {
|
|
@@ -678,7 +688,7 @@ declare function applyThemeToRoot(theme: GeneratedTheme, mode: ModeName): void;
|
|
|
678
688
|
* Built-in ThemeInputs. Every theme — built-in or user-built — is a
|
|
679
689
|
* ThemeInput. Built-ins are just curated ones we ship as starting points.
|
|
680
690
|
*
|
|
681
|
-
* "Calm" is the canonical
|
|
691
|
+
* "Calm" is the canonical Grade DS look: warm neutrals, terracotta primary,
|
|
682
692
|
* serif display + body, roomier spacing, rounded corners, pill buttons,
|
|
683
693
|
* subtle shadows. "Energy" is a bolder alternate — teal primary, Geist
|
|
684
694
|
* sans, tighter feel.
|
|
@@ -687,7 +697,7 @@ declare function applyThemeToRoot(theme: GeneratedTheme, mode: ModeName): void;
|
|
|
687
697
|
* and add it to the registry.
|
|
688
698
|
*/
|
|
689
699
|
/**
|
|
690
|
-
* Calm — the canonical
|
|
700
|
+
* Calm — the canonical Grade DS theme.
|
|
691
701
|
*
|
|
692
702
|
* Warm neutral tint (~40° amber), terracotta primary (~20°), amber accent.
|
|
693
703
|
* Serif display and body (Fraunces with its full variable weight range),
|
|
@@ -755,8 +765,8 @@ declare const ALL_MODES: ModeName[];
|
|
|
755
765
|
* NOTE: this string is embedded directly into the <head> via
|
|
756
766
|
* dangerouslySetInnerHTML. Keep it self-contained and dependency-free.
|
|
757
767
|
*/
|
|
758
|
-
declare const
|
|
759
|
-
type
|
|
768
|
+
declare const GRADE_PRE_HYDRATION_SCRIPT = "\n(function() {\n try {\n var mode = localStorage.getItem('ramp-mode');\n var valid = ['superLight','light','dark','superDark'];\n if (!mode || valid.indexOf(mode) === -1) {\n mode = window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';\n }\n if (mode === 'dark' || mode === 'superDark') {\n document.documentElement.classList.add('dark');\n }\n document.documentElement.setAttribute('data-mode', mode);\n var themeId = localStorage.getItem('ramp-theme');\n if (themeId) document.documentElement.setAttribute('data-ramp-theme', themeId);\n } catch(e) {}\n})();\n";
|
|
769
|
+
type GradeThemeContextValue = {
|
|
760
770
|
/** The currently active theme object. */
|
|
761
771
|
theme: GeneratedTheme;
|
|
762
772
|
/** The active theme's id. */
|
|
@@ -779,46 +789,46 @@ type RampThemeContextValue = {
|
|
|
779
789
|
/** Refresh the themes list (call after external user-theme mutations). */
|
|
780
790
|
refresh: () => void;
|
|
781
791
|
};
|
|
782
|
-
interface
|
|
792
|
+
interface GradeThemeProviderProps {
|
|
783
793
|
children: React$1.ReactNode;
|
|
784
794
|
defaultTheme?: string;
|
|
785
795
|
defaultMode?: ModeName;
|
|
786
796
|
}
|
|
787
|
-
declare function
|
|
788
|
-
/** Read the active theme + mode. Must be used inside <
|
|
789
|
-
declare function
|
|
797
|
+
declare function GradeThemeProvider({ children, defaultTheme, defaultMode, }: GradeThemeProviderProps): React$1.JSX.Element;
|
|
798
|
+
/** Read the active theme + mode. Must be used inside <GradeThemeProvider>. */
|
|
799
|
+
declare function useGradeTheme(): GradeThemeContextValue;
|
|
790
800
|
/** Safe variant — returns null outside a provider instead of throwing. */
|
|
791
|
-
declare function
|
|
801
|
+
declare function useMaybeGradeTheme(): GradeThemeContextValue | null;
|
|
792
802
|
|
|
793
803
|
/**
|
|
794
804
|
* Theme switcher — iterates every registered theme (built-in + user) and
|
|
795
805
|
* lets you pick one. User themes get a delete button on hover.
|
|
796
806
|
*
|
|
797
|
-
* Renders nothing when no <
|
|
807
|
+
* Renders nothing when no <GradeThemeProvider> is mounted, so it's safe to
|
|
798
808
|
* drop into any layout.
|
|
799
809
|
*/
|
|
800
|
-
declare function
|
|
810
|
+
declare function GradeThemeSwitcher({ className }: {
|
|
801
811
|
className?: string;
|
|
802
812
|
}): React$1.JSX.Element | null;
|
|
803
813
|
|
|
804
814
|
/**
|
|
805
815
|
* 4-way mode switcher. Segmented control: super-light / light / dark / super-dark.
|
|
806
816
|
*
|
|
807
|
-
* Renders nothing without a
|
|
817
|
+
* Renders nothing without a GradeThemeProvider. Default layout is a compact
|
|
808
818
|
* 4-icon row suitable for a header; the `variant="labeled"` form adds
|
|
809
819
|
* text labels for settings pages.
|
|
810
820
|
*/
|
|
811
|
-
interface
|
|
821
|
+
interface GradeModeSwitcherProps {
|
|
812
822
|
className?: string;
|
|
813
823
|
variant?: "icons" | "labeled";
|
|
814
824
|
}
|
|
815
|
-
declare function
|
|
825
|
+
declare function GradeModeSwitcher({ className, variant }: GradeModeSwitcherProps): React$1.JSX.Element | null;
|
|
816
826
|
|
|
817
827
|
/**
|
|
818
828
|
* Binary light/dark toggle — flips between `light` and `dark` modes.
|
|
819
829
|
* For the full 4-way picker (including super-light / super-dark), use
|
|
820
|
-
* <
|
|
830
|
+
* <GradeModeSwitcher /> instead.
|
|
821
831
|
*/
|
|
822
832
|
declare function ThemeToggle(): React$1.JSX.Element;
|
|
823
833
|
|
|
824
|
-
export { ALL_MODES, Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertTitle, BUILT_IN_INPUTS, Badge, type BreadcrumbItem, Button, type ButtonShape, Card, CardContent, CardDescription, CardFooter, CardHeader, type CardStyle, CardTitle, type ChartPalette, Checkbox, type ColorIntensity, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, type FontKey, type GeneratedTheme, Input, type InputStyle, Label, LenisProvider, type ModeName, type OKLCHTriplet, Progress,
|
|
834
|
+
export { ALL_MODES, Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertTitle, BUILT_IN_INPUTS, Badge, type BreadcrumbItem, Button, type ButtonShape, Card, CardContent, CardDescription, CardFooter, CardHeader, type CardStyle, CardTitle, type ChartPalette, Checkbox, type ColorIntensity, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, type FontKey, GRADE_PRE_HYDRATION_SCRIPT, type GeneratedTheme, GradeModeSwitcher, GradeThemeProvider, type GradeThemeProviderProps, GradeThemeSwitcher, Input, type InputStyle, Label, LenisProvider, type ModeName, type OKLCHTriplet, Progress, RadioGroup, RadioGroupItem, type RadiusStyle, type Ramp, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, type ShadowIntensity, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, SideMenu, type SideMenuItem, type SideMenuProps, type SideMenuSection, type SimpleTab, SimpleTabs, SimpleTabsContent, SimpleTabsList, type SimpleTabsListProps, SimpleTabsPanel, type SimpleTabsPanelProps, type SimpleTabsProps, SimpleTabsRoot, type SimpleTabsRootProps, SimpleTabsTrigger, type SimpleTabsTriggerProps, Skeleton, Slider, type SpacingDensity, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, type ThemeInput, ThemeToggle, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TopMenu, type TopMenuProps, TopMenuUser, TopMenuUserItem, type TopMenuUserItemProps, type TopMenuUserProps, TopMenuUserSection, type TypeScalePreset, applyThemeToRoot, badgeVariants, builtInThemes, buttonVariants, calmInput, cn, defaultThemeId, deleteUserTheme, duplicateTheme, energyInput, generateTheme, getTheme, listThemes, listUserThemes, loadUserThemeInput, saveUserTheme, themeToCSSVars, useGradeTheme, useMaybeGradeTheme };
|
package/dist/index.d.ts
CHANGED
|
@@ -23,13 +23,13 @@ declare const AccordionTrigger: React$1.ForwardRefExoticComponent<Omit<Accordion
|
|
|
23
23
|
declare const AccordionContent: React$1.ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionContentProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
24
24
|
|
|
25
25
|
declare const Alert: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLDivElement> & VariantProps<(props?: ({
|
|
26
|
-
variant?: "
|
|
26
|
+
variant?: "default" | "destructive" | "success" | "warning" | "info" | "highlight" | null | undefined;
|
|
27
27
|
} & class_variance_authority_types.ClassProp) | undefined) => string> & React$1.RefAttributes<HTMLDivElement>>;
|
|
28
28
|
declare const AlertTitle: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLHeadingElement> & React$1.RefAttributes<HTMLParagraphElement>>;
|
|
29
29
|
declare const AlertDescription: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLParagraphElement> & React$1.RefAttributes<HTMLParagraphElement>>;
|
|
30
30
|
|
|
31
31
|
declare const badgeVariants: (props?: ({
|
|
32
|
-
variant?: "
|
|
32
|
+
variant?: "default" | "destructive" | "success" | "warning" | "info" | "highlight" | "secondary" | "outline" | "success-soft" | "warning-soft" | "destructive-soft" | "info-soft" | "highlight-soft" | "success-outline" | "warning-outline" | "destructive-outline" | "info-outline" | null | undefined;
|
|
33
33
|
rounded?: "default" | "full" | null | undefined;
|
|
34
34
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
35
35
|
interface BadgeProps extends React$1.HTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeVariants> {
|
|
@@ -37,8 +37,8 @@ interface BadgeProps extends React$1.HTMLAttributes<HTMLDivElement>, VariantProp
|
|
|
37
37
|
declare function Badge({ className, variant, rounded, ...props }: BadgeProps): React$1.JSX.Element;
|
|
38
38
|
|
|
39
39
|
declare const buttonVariants: (props?: ({
|
|
40
|
-
variant?: "link" | "
|
|
41
|
-
size?: "
|
|
40
|
+
variant?: "link" | "default" | "destructive" | "secondary" | "outline" | "ghost" | null | undefined;
|
|
41
|
+
size?: "default" | "sm" | "lg" | "icon" | null | undefined;
|
|
42
42
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
43
43
|
interface ButtonProps extends React$1.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
44
44
|
asChild?: boolean;
|
|
@@ -540,6 +540,16 @@ interface GeneratedColorsMode {
|
|
|
540
540
|
warning: OKLCHTriplet;
|
|
541
541
|
info: OKLCHTriplet;
|
|
542
542
|
highlight: OKLCHTriplet;
|
|
543
|
+
destructiveSoft: OKLCHTriplet;
|
|
544
|
+
destructiveDeep: OKLCHTriplet;
|
|
545
|
+
successSoft: OKLCHTriplet;
|
|
546
|
+
successDeep: OKLCHTriplet;
|
|
547
|
+
warningSoft: OKLCHTriplet;
|
|
548
|
+
warningDeep: OKLCHTriplet;
|
|
549
|
+
infoSoft: OKLCHTriplet;
|
|
550
|
+
infoDeep: OKLCHTriplet;
|
|
551
|
+
highlightSoft: OKLCHTriplet;
|
|
552
|
+
highlightDeep: OKLCHTriplet;
|
|
543
553
|
}
|
|
544
554
|
/** Concrete resolved CSS values for the typography dimension. */
|
|
545
555
|
interface GeneratedTypography {
|
|
@@ -678,7 +688,7 @@ declare function applyThemeToRoot(theme: GeneratedTheme, mode: ModeName): void;
|
|
|
678
688
|
* Built-in ThemeInputs. Every theme — built-in or user-built — is a
|
|
679
689
|
* ThemeInput. Built-ins are just curated ones we ship as starting points.
|
|
680
690
|
*
|
|
681
|
-
* "Calm" is the canonical
|
|
691
|
+
* "Calm" is the canonical Grade DS look: warm neutrals, terracotta primary,
|
|
682
692
|
* serif display + body, roomier spacing, rounded corners, pill buttons,
|
|
683
693
|
* subtle shadows. "Energy" is a bolder alternate — teal primary, Geist
|
|
684
694
|
* sans, tighter feel.
|
|
@@ -687,7 +697,7 @@ declare function applyThemeToRoot(theme: GeneratedTheme, mode: ModeName): void;
|
|
|
687
697
|
* and add it to the registry.
|
|
688
698
|
*/
|
|
689
699
|
/**
|
|
690
|
-
* Calm — the canonical
|
|
700
|
+
* Calm — the canonical Grade DS theme.
|
|
691
701
|
*
|
|
692
702
|
* Warm neutral tint (~40° amber), terracotta primary (~20°), amber accent.
|
|
693
703
|
* Serif display and body (Fraunces with its full variable weight range),
|
|
@@ -755,8 +765,8 @@ declare const ALL_MODES: ModeName[];
|
|
|
755
765
|
* NOTE: this string is embedded directly into the <head> via
|
|
756
766
|
* dangerouslySetInnerHTML. Keep it self-contained and dependency-free.
|
|
757
767
|
*/
|
|
758
|
-
declare const
|
|
759
|
-
type
|
|
768
|
+
declare const GRADE_PRE_HYDRATION_SCRIPT = "\n(function() {\n try {\n var mode = localStorage.getItem('ramp-mode');\n var valid = ['superLight','light','dark','superDark'];\n if (!mode || valid.indexOf(mode) === -1) {\n mode = window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';\n }\n if (mode === 'dark' || mode === 'superDark') {\n document.documentElement.classList.add('dark');\n }\n document.documentElement.setAttribute('data-mode', mode);\n var themeId = localStorage.getItem('ramp-theme');\n if (themeId) document.documentElement.setAttribute('data-ramp-theme', themeId);\n } catch(e) {}\n})();\n";
|
|
769
|
+
type GradeThemeContextValue = {
|
|
760
770
|
/** The currently active theme object. */
|
|
761
771
|
theme: GeneratedTheme;
|
|
762
772
|
/** The active theme's id. */
|
|
@@ -779,46 +789,46 @@ type RampThemeContextValue = {
|
|
|
779
789
|
/** Refresh the themes list (call after external user-theme mutations). */
|
|
780
790
|
refresh: () => void;
|
|
781
791
|
};
|
|
782
|
-
interface
|
|
792
|
+
interface GradeThemeProviderProps {
|
|
783
793
|
children: React$1.ReactNode;
|
|
784
794
|
defaultTheme?: string;
|
|
785
795
|
defaultMode?: ModeName;
|
|
786
796
|
}
|
|
787
|
-
declare function
|
|
788
|
-
/** Read the active theme + mode. Must be used inside <
|
|
789
|
-
declare function
|
|
797
|
+
declare function GradeThemeProvider({ children, defaultTheme, defaultMode, }: GradeThemeProviderProps): React$1.JSX.Element;
|
|
798
|
+
/** Read the active theme + mode. Must be used inside <GradeThemeProvider>. */
|
|
799
|
+
declare function useGradeTheme(): GradeThemeContextValue;
|
|
790
800
|
/** Safe variant — returns null outside a provider instead of throwing. */
|
|
791
|
-
declare function
|
|
801
|
+
declare function useMaybeGradeTheme(): GradeThemeContextValue | null;
|
|
792
802
|
|
|
793
803
|
/**
|
|
794
804
|
* Theme switcher — iterates every registered theme (built-in + user) and
|
|
795
805
|
* lets you pick one. User themes get a delete button on hover.
|
|
796
806
|
*
|
|
797
|
-
* Renders nothing when no <
|
|
807
|
+
* Renders nothing when no <GradeThemeProvider> is mounted, so it's safe to
|
|
798
808
|
* drop into any layout.
|
|
799
809
|
*/
|
|
800
|
-
declare function
|
|
810
|
+
declare function GradeThemeSwitcher({ className }: {
|
|
801
811
|
className?: string;
|
|
802
812
|
}): React$1.JSX.Element | null;
|
|
803
813
|
|
|
804
814
|
/**
|
|
805
815
|
* 4-way mode switcher. Segmented control: super-light / light / dark / super-dark.
|
|
806
816
|
*
|
|
807
|
-
* Renders nothing without a
|
|
817
|
+
* Renders nothing without a GradeThemeProvider. Default layout is a compact
|
|
808
818
|
* 4-icon row suitable for a header; the `variant="labeled"` form adds
|
|
809
819
|
* text labels for settings pages.
|
|
810
820
|
*/
|
|
811
|
-
interface
|
|
821
|
+
interface GradeModeSwitcherProps {
|
|
812
822
|
className?: string;
|
|
813
823
|
variant?: "icons" | "labeled";
|
|
814
824
|
}
|
|
815
|
-
declare function
|
|
825
|
+
declare function GradeModeSwitcher({ className, variant }: GradeModeSwitcherProps): React$1.JSX.Element | null;
|
|
816
826
|
|
|
817
827
|
/**
|
|
818
828
|
* Binary light/dark toggle — flips between `light` and `dark` modes.
|
|
819
829
|
* For the full 4-way picker (including super-light / super-dark), use
|
|
820
|
-
* <
|
|
830
|
+
* <GradeModeSwitcher /> instead.
|
|
821
831
|
*/
|
|
822
832
|
declare function ThemeToggle(): React$1.JSX.Element;
|
|
823
833
|
|
|
824
|
-
export { ALL_MODES, Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertTitle, BUILT_IN_INPUTS, Badge, type BreadcrumbItem, Button, type ButtonShape, Card, CardContent, CardDescription, CardFooter, CardHeader, type CardStyle, CardTitle, type ChartPalette, Checkbox, type ColorIntensity, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, type FontKey, type GeneratedTheme, Input, type InputStyle, Label, LenisProvider, type ModeName, type OKLCHTriplet, Progress,
|
|
834
|
+
export { ALL_MODES, Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertTitle, BUILT_IN_INPUTS, Badge, type BreadcrumbItem, Button, type ButtonShape, Card, CardContent, CardDescription, CardFooter, CardHeader, type CardStyle, CardTitle, type ChartPalette, Checkbox, type ColorIntensity, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, type FontKey, GRADE_PRE_HYDRATION_SCRIPT, type GeneratedTheme, GradeModeSwitcher, GradeThemeProvider, type GradeThemeProviderProps, GradeThemeSwitcher, Input, type InputStyle, Label, LenisProvider, type ModeName, type OKLCHTriplet, Progress, RadioGroup, RadioGroupItem, type RadiusStyle, type Ramp, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, type ShadowIntensity, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, SideMenu, type SideMenuItem, type SideMenuProps, type SideMenuSection, type SimpleTab, SimpleTabs, SimpleTabsContent, SimpleTabsList, type SimpleTabsListProps, SimpleTabsPanel, type SimpleTabsPanelProps, type SimpleTabsProps, SimpleTabsRoot, type SimpleTabsRootProps, SimpleTabsTrigger, type SimpleTabsTriggerProps, Skeleton, Slider, type SpacingDensity, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, type ThemeInput, ThemeToggle, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TopMenu, type TopMenuProps, TopMenuUser, TopMenuUserItem, type TopMenuUserItemProps, type TopMenuUserProps, TopMenuUserSection, type TypeScalePreset, applyThemeToRoot, badgeVariants, builtInThemes, buttonVariants, calmInput, cn, defaultThemeId, deleteUserTheme, duplicateTheme, energyInput, generateTheme, getTheme, listThemes, listUserThemes, loadUserThemeInput, saveUserTheme, themeToCSSVars, useGradeTheme, useMaybeGradeTheme };
|