@axzydev/axzy_ui_system 1.4.2 → 1.4.3

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/src/index.ts CHANGED
@@ -103,7 +103,7 @@ import type { ITSearchSelectProps } from "./components/molecules/search-select/s
103
103
  import type { ITSelectProps } from "./components/molecules/select/select.props";
104
104
  import type { ITSearchTableProps } from "./components/organisms/searchTable/searchTable.props";
105
105
  import type { ITSegmentedControlProps } from "./components/atoms/segmented-control/segmented-control.props";
106
- import type { ITSidebarProps, ITSidebarNotification, ITNavigationItem, ITNavigationSubItem, ITNavigationSubItemEntry, ITNavigationSubItemGroup } from "./components/organisms/sidebar/sidebar.props";
106
+ import type { ITSidebarProps, ITSidebarNotification, ITSidebarBrand, ITNavigationItem, ITNavigationSubItem, ITNavigationSubItemEntry, ITNavigationSubItemGroup } from "./components/organisms/sidebar/sidebar.props";
107
107
  import type { ITSkeletonProps } from "./components/atoms/skeleton/skeleton.props";
108
108
  import type { ITSlideToggleProps } from "./components/atoms/slide/slide.props";
109
109
  import type { ITSliderProps } from "./components/atoms/slider/slider.props";
@@ -127,8 +127,8 @@ import ITLoader from "./components/atoms/loader/loader";
127
127
  import type { LoaderProps as ITLoaderProps } from "./components/atoms/loader/loader.props";
128
128
  import ITStepper from "./components/molecules/stepper/stepper";
129
129
  import type { ITStepperProps } from "./components/molecules/stepper/stepper.props";
130
- import ITThemeProvider, { useITTheme, useITThemeSafe } from "./components/theme-provider/themeProvider";
131
- import type { ITThemeProviderProps, ITThemePalette } from "./components/theme-provider/themeProvider.props";
130
+ import ITThemeProvider, { useITTheme, useITThemeSafe, useITFlatAppearance } from "./components/theme-provider/themeProvider";
131
+ import type { ITThemeProviderProps, ITThemePalette, ITThemeAppearance } from "./components/theme-provider/themeProvider.props";
132
132
  import ITTimePicker from "./components/molecules/time-picker/timePicker";
133
133
  import type { ITTimePickerProps } from "./components/molecules/time-picker/timePicker.props";
134
134
  import type { ITThemeConfig } from "./theme/theme.types";
@@ -153,7 +153,7 @@ export {
153
153
  ITSearchTable,
154
154
  ITSegmentedControl, ITSidebar, ITSkeleton, ITSlideToggle, ITSlider, ITStack, ITStatCard, ITStepper,
155
155
  ITTable, ITTabs, ITText, ITTextarea, ITTripleFilter, ITThemeProvider,
156
- useITTheme, useITThemeSafe, ITTimePicker, ITToast, ITWysiwyg,
156
+ useITTheme, useITThemeSafe, useITFlatAppearance, ITTimePicker, ITToast, ITWysiwyg,
157
157
  UploadStatus, FileTypeEnum,
158
158
  getContrastTextColor, isLightColor, resolveCssColor
159
159
  };
@@ -176,7 +176,7 @@ export {
176
176
  ITPageProps, ITPageHeaderProps,
177
177
  ITNavigationItem, ITNavigationSubItem,
178
178
  ITNavigationSubItemEntry, ITNavigationSubItemGroup,
179
- ITSidebarNotification,
179
+ ITSidebarNotification, ITSidebarBrand,
180
180
  ITPaginationProps, ITPopoverProps, ITProgressProps,
181
181
  ITRadioGroupProps, ITRadioOption, ITSelectProps, ITSearchSelectProps,
182
182
  ITSearchTableProps,
@@ -184,7 +184,7 @@ export {
184
184
  ITStackProps, ITStatCardProps, ITStepperProps,
185
185
  ITTableProps, ITTabsProps, ITTabItem, ITTextProps, ITTextareaProps,
186
186
  TableDensity,
187
- ITTripleFilterProps, ITTripleFilterOption, ITThemeConfig, ITThemeProviderProps, ITThemePalette,
187
+ ITTripleFilterProps, ITTripleFilterOption, ITThemeConfig, ITThemeProviderProps, ITThemePalette, ITThemeAppearance,
188
188
  ITTimePickerProps, ITToastProps,
189
189
  ITWysiwygProps,
190
190
  UseTableStateOptions, UseTableStateResult
@@ -1,5 +1,5 @@
1
1
  import { createContext, useContext } from "react";
2
- import type { ITThemePalette } from "./theme.types";
2
+ import type { ITThemeAppearance, ITThemePalette } from "./theme.types";
3
3
 
4
4
  /**
5
5
  * Contexto de theming compartido por ITThemeProvider y componentes que lo
@@ -16,6 +16,8 @@ export interface ITThemeContextType {
16
16
  resolvedTheme: "light" | "dark";
17
17
  darkModeMode: "light" | "dark" | "system";
18
18
  setDarkModeMode: (mode: "light" | "dark" | "system") => void;
19
+ /** Visual language chosen on the provider (`"soft"` unless `appearance` says otherwise). */
20
+ appearance: ITThemeAppearance;
19
21
  }
20
22
 
21
23
  export const ITThemeContext = createContext<ITThemeContextType | undefined>(undefined);
@@ -34,4 +36,12 @@ export const useITTheme = () => {
34
36
  */
35
37
  export const useITThemeSafe = (): ITThemeContextType | undefined => {
36
38
  return useContext(ITThemeContext);
39
+ };
40
+
41
+ /**
42
+ * `true` cuando el provider pide el lenguaje visual plano (`appearance="flat"`).
43
+ * Fuera de un ITThemeProvider devuelve `false` (aspecto por defecto).
44
+ */
45
+ export const useITFlatAppearance = (): boolean => {
46
+ return useContext(ITThemeContext)?.appearance === "flat";
37
47
  };
@@ -12,6 +12,13 @@ export type ColorScale = {
12
12
  950?: string;
13
13
  };
14
14
 
15
+ /**
16
+ * Visual language of the whole system.
17
+ * - `"soft"`: soft depth — floating cards, tinted shadows, glass sidebar and top bar (default).
18
+ * - `"flat"`: flat surfaces — hairline borders instead of shadows, plain sidebar and top bar, compact page headers.
19
+ */
20
+ export type ITThemeAppearance = "soft" | "flat";
21
+
15
22
  export interface ITThemePalette {
16
23
  /** Main brand accent color (hex). Drives primary buttons, active nav items, focus rings, links, and the `--color-primary` CSS variable. @default "#06b6d4" */
17
24
  primary: string;