@nicorp/nui 0.1.9 → 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/dist/index.cjs.js +9 -9
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +50 -6
- package/dist/index.es.js +3981 -3790
- package/dist/index.es.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +89 -89
package/dist/index.d.ts
CHANGED
|
@@ -591,7 +591,32 @@ declare interface MetricCardProps extends React_2.HTMLAttributes<HTMLDivElement>
|
|
|
591
591
|
icon?: React_2.ReactNode;
|
|
592
592
|
}
|
|
593
593
|
|
|
594
|
-
export declare function ModeToggle(
|
|
594
|
+
export declare function ModeToggle({ className }: {
|
|
595
|
+
className?: string;
|
|
596
|
+
}): JSX_2.Element;
|
|
597
|
+
|
|
598
|
+
export declare function ModeToggleGroup({ className }: {
|
|
599
|
+
className?: string;
|
|
600
|
+
}): JSX_2.Element;
|
|
601
|
+
|
|
602
|
+
export declare function MultiSelect({ options, value, onChange, placeholder, searchPlaceholder, emptyText, disabled, className, maxDisplay, }: MultiSelectProps): JSX_2.Element;
|
|
603
|
+
|
|
604
|
+
export declare interface MultiSelectOption {
|
|
605
|
+
value: string;
|
|
606
|
+
label: string;
|
|
607
|
+
}
|
|
608
|
+
|
|
609
|
+
export declare interface MultiSelectProps {
|
|
610
|
+
options: MultiSelectOption[];
|
|
611
|
+
value?: string[];
|
|
612
|
+
onChange?: (value: string[]) => void;
|
|
613
|
+
placeholder?: string;
|
|
614
|
+
searchPlaceholder?: string;
|
|
615
|
+
emptyText?: string;
|
|
616
|
+
disabled?: boolean;
|
|
617
|
+
className?: string;
|
|
618
|
+
maxDisplay?: number;
|
|
619
|
+
}
|
|
595
620
|
|
|
596
621
|
export declare function Muted({ className, ...props }: MutedProps): JSX_2.Element;
|
|
597
622
|
|
|
@@ -851,19 +876,38 @@ export declare const textVariants: (props?: ({
|
|
|
851
876
|
leading?: "normal" | "tight" | "relaxed" | null | undefined;
|
|
852
877
|
} & ClassProp) | undefined) => string;
|
|
853
878
|
|
|
854
|
-
declare type Theme = "dark" | "light" | "system";
|
|
879
|
+
export declare type Theme = "dark" | "light" | "system";
|
|
855
880
|
|
|
856
|
-
export declare function ThemeProvider({ children, defaultTheme, storageKey, }: ThemeProviderProps): JSX_2.Element;
|
|
881
|
+
export declare function ThemeProvider({ children, defaultTheme, storageKey, attribute, enableSystem, disableTransitionOnChange, forcedTheme, nonce, }: ThemeProviderProps): JSX_2.Element;
|
|
857
882
|
|
|
858
|
-
declare type ThemeProviderProps = {
|
|
883
|
+
export declare type ThemeProviderProps = {
|
|
884
|
+
/** Wrap your application */
|
|
859
885
|
children: React.ReactNode;
|
|
886
|
+
/** Initial theme when nothing is stored yet. @default "system" */
|
|
860
887
|
defaultTheme?: Theme;
|
|
888
|
+
/** localStorage key. @default "nui-theme" */
|
|
861
889
|
storageKey?: string;
|
|
890
|
+
/** HTML attribute used to apply the theme. @default "class" */
|
|
891
|
+
attribute?: "class" | "data-theme";
|
|
892
|
+
/** Allow choosing "system" mode. @default true */
|
|
893
|
+
enableSystem?: boolean;
|
|
894
|
+
/** Temporarily disable CSS transitions when the theme changes to prevent intermediate flash. @default false */
|
|
895
|
+
disableTransitionOnChange?: boolean;
|
|
896
|
+
/** Force a specific theme (ignores user choice and localStorage). Useful for per-page overrides. */
|
|
897
|
+
forcedTheme?: Theme;
|
|
898
|
+
/** CSP nonce for injected inline styles. */
|
|
899
|
+
nonce?: string;
|
|
862
900
|
};
|
|
863
901
|
|
|
864
|
-
declare type ThemeProviderState = {
|
|
902
|
+
export declare type ThemeProviderState = {
|
|
903
|
+
/** The stored theme preference ("dark" | "light" | "system"). */
|
|
865
904
|
theme: Theme;
|
|
905
|
+
/** The actual resolved theme that is applied ("dark" | "light"). */
|
|
906
|
+
resolvedTheme: "dark" | "light";
|
|
907
|
+
/** Update the theme. */
|
|
866
908
|
setTheme: (theme: Theme) => void;
|
|
909
|
+
/** All available themes. */
|
|
910
|
+
themes: readonly Theme[];
|
|
867
911
|
};
|
|
868
912
|
|
|
869
913
|
export declare const Timeline: React_2.ForwardRefExoticComponent<React_2.HTMLAttributes<HTMLDivElement> & React_2.RefAttributes<HTMLDivElement>>;
|
|
@@ -926,7 +970,7 @@ export declare const TooltipTrigger: React_2.ForwardRefExoticComponent<TooltipPr
|
|
|
926
970
|
|
|
927
971
|
declare type UseCarouselParameters = Parameters<typeof default_2>;
|
|
928
972
|
|
|
929
|
-
export declare
|
|
973
|
+
export declare function useTheme(): ThemeProviderState;
|
|
930
974
|
|
|
931
975
|
export declare const VStack: React_2.ForwardRefExoticComponent<StackProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
932
976
|
|