@nicorp/nui 0.1.8 → 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.d.ts CHANGED
@@ -591,6 +591,33 @@ declare interface MetricCardProps extends React_2.HTMLAttributes<HTMLDivElement>
591
591
  icon?: React_2.ReactNode;
592
592
  }
593
593
 
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
+ }
620
+
594
621
  export declare function Muted({ className, ...props }: MutedProps): JSX_2.Element;
595
622
 
596
623
  export declare interface MutedProps extends React_2.HTMLAttributes<HTMLParagraphElement> {
@@ -849,6 +876,40 @@ export declare const textVariants: (props?: ({
849
876
  leading?: "normal" | "tight" | "relaxed" | null | undefined;
850
877
  } & ClassProp) | undefined) => string;
851
878
 
879
+ export declare type Theme = "dark" | "light" | "system";
880
+
881
+ export declare function ThemeProvider({ children, defaultTheme, storageKey, attribute, enableSystem, disableTransitionOnChange, forcedTheme, nonce, }: ThemeProviderProps): JSX_2.Element;
882
+
883
+ export declare type ThemeProviderProps = {
884
+ /** Wrap your application */
885
+ children: React.ReactNode;
886
+ /** Initial theme when nothing is stored yet. @default "system" */
887
+ defaultTheme?: Theme;
888
+ /** localStorage key. @default "nui-theme" */
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;
900
+ };
901
+
902
+ export declare type ThemeProviderState = {
903
+ /** The stored theme preference ("dark" | "light" | "system"). */
904
+ theme: Theme;
905
+ /** The actual resolved theme that is applied ("dark" | "light"). */
906
+ resolvedTheme: "dark" | "light";
907
+ /** Update the theme. */
908
+ setTheme: (theme: Theme) => void;
909
+ /** All available themes. */
910
+ themes: readonly Theme[];
911
+ };
912
+
852
913
  export declare const Timeline: React_2.ForwardRefExoticComponent<React_2.HTMLAttributes<HTMLDivElement> & React_2.RefAttributes<HTMLDivElement>>;
853
914
 
854
915
  export declare const TimelineConnector: React_2.ForwardRefExoticComponent<React_2.HTMLAttributes<HTMLDivElement> & React_2.RefAttributes<HTMLDivElement>>;
@@ -909,6 +970,8 @@ export declare const TooltipTrigger: React_2.ForwardRefExoticComponent<TooltipPr
909
970
 
910
971
  declare type UseCarouselParameters = Parameters<typeof default_2>;
911
972
 
973
+ export declare function useTheme(): ThemeProviderState;
974
+
912
975
  export declare const VStack: React_2.ForwardRefExoticComponent<StackProps & React_2.RefAttributes<HTMLDivElement>>;
913
976
 
914
977
  export { }