@axzydev/axzy_ui_system 1.0.167 → 1.0.169

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.cts CHANGED
@@ -185,6 +185,7 @@ interface ITCalendarProps {
185
185
  maxDate?: Date;
186
186
  className?: string;
187
187
  disabled?: boolean;
188
+ variant?: ColorsTypes;
188
189
  }
189
190
 
190
191
  declare const ITCalendar: React__default.FC<ITCalendarProps>;
@@ -333,7 +334,7 @@ interface ITDatePickerProps {
333
334
  label?: string;
334
335
  required?: boolean;
335
336
  touched?: boolean;
336
- error?: string;
337
+ error?: string | boolean;
337
338
  minDate?: Date;
338
339
  maxDate?: Date;
339
340
  }
@@ -470,7 +471,7 @@ interface ITInputProps {
470
471
  placeholder?: string;
471
472
  value?: any;
472
473
  onChange: (event: any) => void;
473
- onBlur: (event: React.FocusEvent<HTMLInputElement> | React.FocusEvent<HTMLTextAreaElement, Element>) => void;
474
+ onBlur?: (event: React.FocusEvent<HTMLInputElement> | React.FocusEvent<HTMLTextAreaElement, Element>) => void;
474
475
  showHintLength?: boolean;
475
476
  maxLength?: number;
476
477
  minLength?: number;
@@ -481,7 +482,7 @@ interface ITInputProps {
481
482
  labelClassName?: string;
482
483
  className?: string;
483
484
  touched?: boolean;
484
- error?: string;
485
+ error?: string | boolean;
485
486
  required?: boolean;
486
487
  formatNumber?: boolean;
487
488
  autoFocus?: boolean;
@@ -599,7 +600,7 @@ interface ITSelectProps {
599
600
  disabled?: boolean;
600
601
  className?: string;
601
602
  touched?: boolean;
602
- error?: string;
603
+ error?: string | boolean;
603
604
  required?: boolean;
604
605
  autoFocus?: boolean;
605
606
  readOnly?: boolean;
@@ -644,7 +645,7 @@ interface ITSearchSelectProps {
644
645
  /** Indica si el campo es requerido */
645
646
  required?: boolean;
646
647
  /** Mensaje de error */
647
- error?: string;
648
+ error?: string | boolean;
648
649
  /** Indica si el campo es de solo lectura */
649
650
  readOnly?: boolean;
650
651
  /** Callback para búsqueda en servidor (Modo 2: Conexión con API) */
@@ -817,7 +818,7 @@ interface ITTopBarProps {
817
818
  interface ITNavigationSubItem {
818
819
  id: string;
819
820
  label: string;
820
- action: () => void;
821
+ action?: () => void;
821
822
  isActive?: boolean;
822
823
  }
823
824
  interface ITNavigationItem {
@@ -836,6 +837,7 @@ interface ITSidebarProps {
836
837
  visibleOnMobile?: boolean;
837
838
  onItemClick?: (item: ITNavigationItem) => void;
838
839
  onSubItemClick?: (subitem: ITNavigationSubItem) => void;
840
+ subitemConnector?: 'lines' | 'dots' | '|' | 'none';
839
841
  className?: string;
840
842
  }
841
843
 
@@ -889,6 +891,71 @@ interface ITStepperProps {
889
891
 
890
892
  declare function ITStepper({ steps, currentStep, onFinish, onStepChange, allowClickToJump, useIcons, disableNext, containerClassName, stepClassName, scrollableContent, maxContentHeight, color, }: ITStepperProps): react_jsx_runtime.JSX.Element;
891
893
 
894
+ interface ITThemePalette {
895
+ primary: string;
896
+ secondary: string;
897
+ ternary: string;
898
+ danger: string;
899
+ success: string;
900
+ info: string;
901
+ alert: string;
902
+ warning: string;
903
+ layout: {
904
+ sidebarBg: string;
905
+ sidebarText: string;
906
+ navbarBg: string;
907
+ navbarText: string;
908
+ };
909
+ table: {
910
+ headerBg: string;
911
+ headerText: string;
912
+ rowBg: string;
913
+ rowText: string;
914
+ };
915
+ }
916
+ interface ITThemeProviderProps {
917
+ theme?: Partial<ITThemePalette>;
918
+ children: React.ReactNode;
919
+ }
920
+
921
+ interface ITThemeContextType {
922
+ palette: ITThemePalette;
923
+ colors: ITThemePalette;
924
+ setPalette: (newPalette: ITThemePalette) => void;
925
+ updateColor: (key: string, value: string) => void;
926
+ resetTheme: () => void;
927
+ applyPreset: (colors: ITThemePalette) => void;
928
+ resolvedTheme: "light" | "dark";
929
+ darkModeMode: "light" | "dark" | "system";
930
+ setDarkModeMode: (mode: "light" | "dark" | "system") => void;
931
+ }
932
+ declare const useITTheme: () => ITThemeContextType;
933
+ /**
934
+ * Versión segura de useITTheme que retorna undefined
935
+ * si se usa fuera de ITThemeProvider (no lanza error).
936
+ */
937
+ declare const useITThemeSafe: () => ITThemeContextType | undefined;
938
+ declare function ITThemeProvider({ children, theme }: ITThemeProviderProps): react_jsx_runtime.JSX.Element;
939
+
940
+ interface ITTimePickerProps {
941
+ name: string;
942
+ value?: string;
943
+ label?: string;
944
+ placeholder?: string;
945
+ onChange: (e: any) => void;
946
+ onBlur?: (e: any) => void;
947
+ required?: boolean;
948
+ touched?: boolean;
949
+ error?: string | boolean;
950
+ disabled?: boolean;
951
+ className?: string;
952
+ size?: "small" | "medium" | "large";
953
+ variant?: "primary" | "secondary" | "danger" | "success" | "warning" | "info" | "purple";
954
+ color?: "primary" | "secondary" | "danger" | "success" | "warning" | "info" | "purple" | string;
955
+ }
956
+
957
+ declare function ITTimePicker({ name, value, label, placeholder, onChange, onBlur, required, touched, error, disabled, className, size, variant, color, }: ITTimePickerProps): react_jsx_runtime.JSX.Element;
958
+
892
959
  type ColorScale = {
893
960
  50: string;
894
961
  100: string;
@@ -984,36 +1051,23 @@ interface ITThemeConfig {
984
1051
  };
985
1052
  }
986
1053
 
987
- interface ITThemeProviderProps {
988
- theme?: Partial<ITThemeConfig>;
989
- children: React.ReactNode;
990
- }
991
-
992
- declare function ITThemeProvider({ theme, children }: ITThemeProviderProps): react_jsx_runtime.JSX.Element;
993
-
994
- interface ITTimePickerProps {
995
- name: string;
996
- value?: string;
997
- label?: string;
998
- placeholder?: string;
999
- onChange: (e: any) => void;
1000
- onBlur: (e: any) => void;
1001
- required?: boolean;
1002
- touched?: boolean;
1003
- error?: string | boolean;
1004
- disabled?: boolean;
1005
- className?: string;
1006
- size?: "small" | "medium" | "large";
1007
- variant?: "primary" | "secondary" | "danger" | "success" | "warning" | "info" | "purple";
1008
- color?: "primary" | "secondary" | "danger" | "success" | "warning" | "info" | "purple" | string;
1009
- }
1010
-
1011
- declare function ITTimePicker({ name, value, label, placeholder, onChange, onBlur, required, touched, error, disabled, className, size, variant, color, }: ITTimePickerProps): react_jsx_runtime.JSX.Element;
1012
-
1013
1054
  declare const createValidationSchema: (fields: FieldConfig[]) => Yup.ObjectSchema<{
1014
1055
  [x: string]: never;
1015
1056
  }, Yup.AnyObject, {
1016
1057
  [x: string]: any;
1017
1058
  }, "">;
1018
1059
 
1019
- export { type Column, type FieldConfig, type FieldConfigV2, ITBadget, type ITBadgetProps, ITButton, type ITButtonProps, ITCalendar, type ITCalendarProps, ITCard, type ITCardProps, ITDataTable, type ITDataTableFetchParams, type ITDataTableProps, type ITDataTableResponse, ITDatePicker, type ITDatePickerProps, ITDialog, type ITDialogProps, ITDropfile, ITFormBuilder, type ITFormBuilderProps, ITImage, ITInput, type ITInputProps, ITLayout, type ITLayoutProps, ITLoader, ITNavbar, type ITNavbarProps, ITPagination, ITSearchSelect, type ITSearchSelectProps, ITSelect, type ITSelectProps, ITSlideToggle, type ITSlideToggleProps, ITStepper, type ITTabItem, ITTable, type ITTableProps, ITTabs, type ITTabsProps, ITText, type ITThemeConfig, ITThemeProvider, type ITThemeProviderProps, ITTimePicker, type ITTimePickerProps, ITToast, type ITToastProps, ITTripleFilter, type ITTripleFilterOption, type ITTripleFilterProps, createValidationSchema };
1060
+ /**
1061
+ * Determina si un color hexadecimal es claro.
1062
+ */
1063
+ declare const isLightColor: (hex: string) => boolean;
1064
+ /**
1065
+ * Traduce un valor de color de CSS (hexadecimal o variable var(--...)) a hexadecimal absoluto.
1066
+ */
1067
+ declare const resolveCssColor: (colorStr: string, palette?: ITThemePalette, isDarkMode?: boolean) => string;
1068
+ /**
1069
+ * Obtiene la clase de color de texto óptima (blanca o gris oscuro) basado en el fondo.
1070
+ */
1071
+ declare const getContrastTextColor: (bgColor: string, palette?: ITThemePalette, isDarkMode?: boolean) => "text-white" | "text-slate-800";
1072
+
1073
+ export { type Column, type FieldConfig, type FieldConfigV2, FileTypeEnum, ITBadget, type ITBadgetProps, ITButton, type ITButtonProps, ITCalendar, type ITCalendarProps, ITCard, type ITCardProps, ITDataTable, type ITDataTableFetchParams, type ITDataTableProps, type ITDataTableResponse, ITDatePicker, type ITDatePickerProps, ITDialog, type ITDialogProps, ITDropfile, ITFormBuilder, type ITFormBuilderProps, ITImage, ITInput, type ITInputProps, ITLayout, type ITLayoutProps, ITLoader, ITNavbar, type ITNavbarProps, ITPagination, ITSearchSelect, type ITSearchSelectProps, ITSelect, type ITSelectProps, ITSlideToggle, type ITSlideToggleProps, ITStepper, type ITTabItem, ITTable, type ITTableProps, ITTabs, type ITTabsProps, ITText, type ITThemeConfig, type ITThemePalette, ITThemeProvider, type ITThemeProviderProps, ITTimePicker, type ITTimePickerProps, ITToast, type ITToastProps, ITTripleFilter, type ITTripleFilterOption, type ITTripleFilterProps, UploadStatus, createValidationSchema, getContrastTextColor, isLightColor, resolveCssColor, useITTheme, useITThemeSafe };
package/dist/index.d.ts CHANGED
@@ -185,6 +185,7 @@ interface ITCalendarProps {
185
185
  maxDate?: Date;
186
186
  className?: string;
187
187
  disabled?: boolean;
188
+ variant?: ColorsTypes;
188
189
  }
189
190
 
190
191
  declare const ITCalendar: React__default.FC<ITCalendarProps>;
@@ -333,7 +334,7 @@ interface ITDatePickerProps {
333
334
  label?: string;
334
335
  required?: boolean;
335
336
  touched?: boolean;
336
- error?: string;
337
+ error?: string | boolean;
337
338
  minDate?: Date;
338
339
  maxDate?: Date;
339
340
  }
@@ -470,7 +471,7 @@ interface ITInputProps {
470
471
  placeholder?: string;
471
472
  value?: any;
472
473
  onChange: (event: any) => void;
473
- onBlur: (event: React.FocusEvent<HTMLInputElement> | React.FocusEvent<HTMLTextAreaElement, Element>) => void;
474
+ onBlur?: (event: React.FocusEvent<HTMLInputElement> | React.FocusEvent<HTMLTextAreaElement, Element>) => void;
474
475
  showHintLength?: boolean;
475
476
  maxLength?: number;
476
477
  minLength?: number;
@@ -481,7 +482,7 @@ interface ITInputProps {
481
482
  labelClassName?: string;
482
483
  className?: string;
483
484
  touched?: boolean;
484
- error?: string;
485
+ error?: string | boolean;
485
486
  required?: boolean;
486
487
  formatNumber?: boolean;
487
488
  autoFocus?: boolean;
@@ -599,7 +600,7 @@ interface ITSelectProps {
599
600
  disabled?: boolean;
600
601
  className?: string;
601
602
  touched?: boolean;
602
- error?: string;
603
+ error?: string | boolean;
603
604
  required?: boolean;
604
605
  autoFocus?: boolean;
605
606
  readOnly?: boolean;
@@ -644,7 +645,7 @@ interface ITSearchSelectProps {
644
645
  /** Indica si el campo es requerido */
645
646
  required?: boolean;
646
647
  /** Mensaje de error */
647
- error?: string;
648
+ error?: string | boolean;
648
649
  /** Indica si el campo es de solo lectura */
649
650
  readOnly?: boolean;
650
651
  /** Callback para búsqueda en servidor (Modo 2: Conexión con API) */
@@ -817,7 +818,7 @@ interface ITTopBarProps {
817
818
  interface ITNavigationSubItem {
818
819
  id: string;
819
820
  label: string;
820
- action: () => void;
821
+ action?: () => void;
821
822
  isActive?: boolean;
822
823
  }
823
824
  interface ITNavigationItem {
@@ -836,6 +837,7 @@ interface ITSidebarProps {
836
837
  visibleOnMobile?: boolean;
837
838
  onItemClick?: (item: ITNavigationItem) => void;
838
839
  onSubItemClick?: (subitem: ITNavigationSubItem) => void;
840
+ subitemConnector?: 'lines' | 'dots' | '|' | 'none';
839
841
  className?: string;
840
842
  }
841
843
 
@@ -889,6 +891,71 @@ interface ITStepperProps {
889
891
 
890
892
  declare function ITStepper({ steps, currentStep, onFinish, onStepChange, allowClickToJump, useIcons, disableNext, containerClassName, stepClassName, scrollableContent, maxContentHeight, color, }: ITStepperProps): react_jsx_runtime.JSX.Element;
891
893
 
894
+ interface ITThemePalette {
895
+ primary: string;
896
+ secondary: string;
897
+ ternary: string;
898
+ danger: string;
899
+ success: string;
900
+ info: string;
901
+ alert: string;
902
+ warning: string;
903
+ layout: {
904
+ sidebarBg: string;
905
+ sidebarText: string;
906
+ navbarBg: string;
907
+ navbarText: string;
908
+ };
909
+ table: {
910
+ headerBg: string;
911
+ headerText: string;
912
+ rowBg: string;
913
+ rowText: string;
914
+ };
915
+ }
916
+ interface ITThemeProviderProps {
917
+ theme?: Partial<ITThemePalette>;
918
+ children: React.ReactNode;
919
+ }
920
+
921
+ interface ITThemeContextType {
922
+ palette: ITThemePalette;
923
+ colors: ITThemePalette;
924
+ setPalette: (newPalette: ITThemePalette) => void;
925
+ updateColor: (key: string, value: string) => void;
926
+ resetTheme: () => void;
927
+ applyPreset: (colors: ITThemePalette) => void;
928
+ resolvedTheme: "light" | "dark";
929
+ darkModeMode: "light" | "dark" | "system";
930
+ setDarkModeMode: (mode: "light" | "dark" | "system") => void;
931
+ }
932
+ declare const useITTheme: () => ITThemeContextType;
933
+ /**
934
+ * Versión segura de useITTheme que retorna undefined
935
+ * si se usa fuera de ITThemeProvider (no lanza error).
936
+ */
937
+ declare const useITThemeSafe: () => ITThemeContextType | undefined;
938
+ declare function ITThemeProvider({ children, theme }: ITThemeProviderProps): react_jsx_runtime.JSX.Element;
939
+
940
+ interface ITTimePickerProps {
941
+ name: string;
942
+ value?: string;
943
+ label?: string;
944
+ placeholder?: string;
945
+ onChange: (e: any) => void;
946
+ onBlur?: (e: any) => void;
947
+ required?: boolean;
948
+ touched?: boolean;
949
+ error?: string | boolean;
950
+ disabled?: boolean;
951
+ className?: string;
952
+ size?: "small" | "medium" | "large";
953
+ variant?: "primary" | "secondary" | "danger" | "success" | "warning" | "info" | "purple";
954
+ color?: "primary" | "secondary" | "danger" | "success" | "warning" | "info" | "purple" | string;
955
+ }
956
+
957
+ declare function ITTimePicker({ name, value, label, placeholder, onChange, onBlur, required, touched, error, disabled, className, size, variant, color, }: ITTimePickerProps): react_jsx_runtime.JSX.Element;
958
+
892
959
  type ColorScale = {
893
960
  50: string;
894
961
  100: string;
@@ -984,36 +1051,23 @@ interface ITThemeConfig {
984
1051
  };
985
1052
  }
986
1053
 
987
- interface ITThemeProviderProps {
988
- theme?: Partial<ITThemeConfig>;
989
- children: React.ReactNode;
990
- }
991
-
992
- declare function ITThemeProvider({ theme, children }: ITThemeProviderProps): react_jsx_runtime.JSX.Element;
993
-
994
- interface ITTimePickerProps {
995
- name: string;
996
- value?: string;
997
- label?: string;
998
- placeholder?: string;
999
- onChange: (e: any) => void;
1000
- onBlur: (e: any) => void;
1001
- required?: boolean;
1002
- touched?: boolean;
1003
- error?: string | boolean;
1004
- disabled?: boolean;
1005
- className?: string;
1006
- size?: "small" | "medium" | "large";
1007
- variant?: "primary" | "secondary" | "danger" | "success" | "warning" | "info" | "purple";
1008
- color?: "primary" | "secondary" | "danger" | "success" | "warning" | "info" | "purple" | string;
1009
- }
1010
-
1011
- declare function ITTimePicker({ name, value, label, placeholder, onChange, onBlur, required, touched, error, disabled, className, size, variant, color, }: ITTimePickerProps): react_jsx_runtime.JSX.Element;
1012
-
1013
1054
  declare const createValidationSchema: (fields: FieldConfig[]) => Yup.ObjectSchema<{
1014
1055
  [x: string]: never;
1015
1056
  }, Yup.AnyObject, {
1016
1057
  [x: string]: any;
1017
1058
  }, "">;
1018
1059
 
1019
- export { type Column, type FieldConfig, type FieldConfigV2, ITBadget, type ITBadgetProps, ITButton, type ITButtonProps, ITCalendar, type ITCalendarProps, ITCard, type ITCardProps, ITDataTable, type ITDataTableFetchParams, type ITDataTableProps, type ITDataTableResponse, ITDatePicker, type ITDatePickerProps, ITDialog, type ITDialogProps, ITDropfile, ITFormBuilder, type ITFormBuilderProps, ITImage, ITInput, type ITInputProps, ITLayout, type ITLayoutProps, ITLoader, ITNavbar, type ITNavbarProps, ITPagination, ITSearchSelect, type ITSearchSelectProps, ITSelect, type ITSelectProps, ITSlideToggle, type ITSlideToggleProps, ITStepper, type ITTabItem, ITTable, type ITTableProps, ITTabs, type ITTabsProps, ITText, type ITThemeConfig, ITThemeProvider, type ITThemeProviderProps, ITTimePicker, type ITTimePickerProps, ITToast, type ITToastProps, ITTripleFilter, type ITTripleFilterOption, type ITTripleFilterProps, createValidationSchema };
1060
+ /**
1061
+ * Determina si un color hexadecimal es claro.
1062
+ */
1063
+ declare const isLightColor: (hex: string) => boolean;
1064
+ /**
1065
+ * Traduce un valor de color de CSS (hexadecimal o variable var(--...)) a hexadecimal absoluto.
1066
+ */
1067
+ declare const resolveCssColor: (colorStr: string, palette?: ITThemePalette, isDarkMode?: boolean) => string;
1068
+ /**
1069
+ * Obtiene la clase de color de texto óptima (blanca o gris oscuro) basado en el fondo.
1070
+ */
1071
+ declare const getContrastTextColor: (bgColor: string, palette?: ITThemePalette, isDarkMode?: boolean) => "text-white" | "text-slate-800";
1072
+
1073
+ export { type Column, type FieldConfig, type FieldConfigV2, FileTypeEnum, ITBadget, type ITBadgetProps, ITButton, type ITButtonProps, ITCalendar, type ITCalendarProps, ITCard, type ITCardProps, ITDataTable, type ITDataTableFetchParams, type ITDataTableProps, type ITDataTableResponse, ITDatePicker, type ITDatePickerProps, ITDialog, type ITDialogProps, ITDropfile, ITFormBuilder, type ITFormBuilderProps, ITImage, ITInput, type ITInputProps, ITLayout, type ITLayoutProps, ITLoader, ITNavbar, type ITNavbarProps, ITPagination, ITSearchSelect, type ITSearchSelectProps, ITSelect, type ITSelectProps, ITSlideToggle, type ITSlideToggleProps, ITStepper, type ITTabItem, ITTable, type ITTableProps, ITTabs, type ITTabsProps, ITText, type ITThemeConfig, type ITThemePalette, ITThemeProvider, type ITThemeProviderProps, ITTimePicker, type ITTimePickerProps, ITToast, type ITToastProps, ITTripleFilter, type ITTripleFilterOption, type ITTripleFilterProps, UploadStatus, createValidationSchema, getContrastTextColor, isLightColor, resolveCssColor, useITTheme, useITThemeSafe };