@shohojdhara/atomix 0.2.8 → 0.3.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.
Files changed (50) hide show
  1. package/CHANGELOG.md +60 -0
  2. package/README.md +40 -1
  3. package/dist/atomix.css +96 -39
  4. package/dist/atomix.min.css +2 -2
  5. package/dist/index.d.ts +632 -2
  6. package/dist/index.esm.js +1306 -95
  7. package/dist/index.esm.js.map +1 -1
  8. package/dist/index.js +1330 -94
  9. package/dist/index.js.map +1 -1
  10. package/dist/index.min.js +1 -1
  11. package/dist/index.min.js.map +1 -1
  12. package/dist/themes/applemix.css +96 -39
  13. package/dist/themes/applemix.min.css +2 -2
  14. package/dist/themes/boomdevs.css +96 -39
  15. package/dist/themes/boomdevs.min.css +2 -2
  16. package/dist/themes/esrar.css +96 -39
  17. package/dist/themes/esrar.min.css +2 -2
  18. package/dist/themes/flashtrade.css +97 -40
  19. package/dist/themes/flashtrade.min.css +2 -2
  20. package/dist/themes/mashroom.css +96 -39
  21. package/dist/themes/mashroom.min.css +3 -3
  22. package/dist/themes/shaj-default.css +96 -39
  23. package/dist/themes/shaj-default.min.css +2 -2
  24. package/package.json +13 -2
  25. package/src/components/Breadcrumb/Breadcrumb.tsx +8 -3
  26. package/src/components/Card/Card.tsx +9 -4
  27. package/src/components/Footer/Footer.stories.tsx +1 -2
  28. package/src/components/Footer/Footer.tsx +0 -5
  29. package/src/components/Footer/FooterLink.tsx +3 -2
  30. package/src/components/Footer/FooterSection.tsx +0 -7
  31. package/src/components/Navigation/Nav/NavItem.tsx +8 -3
  32. package/src/components/Navigation/SideMenu/SideMenu.stories.tsx +301 -13
  33. package/src/components/Navigation/SideMenu/SideMenu.tsx +236 -9
  34. package/src/components/Navigation/SideMenu/SideMenuItem.tsx +9 -4
  35. package/src/lib/composables/useSideMenu.ts +89 -30
  36. package/src/lib/index.ts +5 -0
  37. package/src/lib/theme/ThemeContext.tsx +17 -0
  38. package/src/lib/theme/ThemeManager.stories.tsx +472 -0
  39. package/src/lib/theme/ThemeManager.test.ts +186 -0
  40. package/src/lib/theme/ThemeManager.ts +501 -0
  41. package/src/lib/theme/ThemeProvider.tsx +227 -0
  42. package/src/lib/theme/index.ts +56 -0
  43. package/src/lib/theme/types.ts +247 -0
  44. package/src/lib/theme/useTheme.test.tsx +66 -0
  45. package/src/lib/theme/useTheme.ts +80 -0
  46. package/src/lib/theme/utils.test.ts +140 -0
  47. package/src/lib/theme/utils.ts +398 -0
  48. package/src/lib/types/components.ts +32 -0
  49. package/src/styles/06-components/_components.card.scss +39 -24
  50. package/src/styles/06-components/_components.side-menu.scss +79 -18
package/dist/index.d.ts CHANGED
@@ -991,6 +991,21 @@ interface SideMenuProps extends BaseComponentProps {
991
991
  * Menu content (typically SideMenuList components)
992
992
  */
993
993
  children: ReactNode;
994
+ /**
995
+ * Menu items
996
+ */
997
+ menuItems?: {
998
+ title?: ReactNode;
999
+ toggleIcon?: ReactNode;
1000
+ items?: {
1001
+ title?: ReactNode;
1002
+ icon?: ReactNode;
1003
+ href?: string;
1004
+ onClick?: (event: React.MouseEvent) => void;
1005
+ active?: boolean;
1006
+ disabled?: boolean;
1007
+ }[];
1008
+ }[];
994
1009
  /**
995
1010
  * Whether the menu is open (for controlled component)
996
1011
  */
@@ -1003,6 +1018,15 @@ interface SideMenuProps extends BaseComponentProps {
1003
1018
  * Whether the menu is collapsible on mobile
1004
1019
  */
1005
1020
  collapsible?: boolean;
1021
+ /**
1022
+ * Whether the menu can be collapsed on desktop (vertical collapse)
1023
+ * When true, adds a toggle button and supports collapsed/expanded states on desktop
1024
+ */
1025
+ collapsibleDesktop?: boolean;
1026
+ /**
1027
+ * Whether the menu starts collapsed on desktop (only applies when collapsibleDesktop is true)
1028
+ */
1029
+ defaultCollapsedDesktop?: boolean;
1006
1030
  /**
1007
1031
  * Custom toggle icon
1008
1032
  */
@@ -1016,6 +1040,11 @@ interface SideMenuProps extends BaseComponentProps {
1016
1040
  * Can be a boolean to enable with default settings, or an object with AtomixGlassProps to customize the effect
1017
1041
  */
1018
1042
  glass?: boolean | Omit<AtomixGlassProps, 'children'>;
1043
+ /**
1044
+ * Optional custom link component (e.g., Next.js Link)
1045
+ * Will be passed to all SideMenuItem components
1046
+ */
1047
+ LinkComponent?: React.ElementType;
1019
1048
  }
1020
1049
  /**
1021
1050
  * SideMenuList component properties
@@ -7811,11 +7840,13 @@ declare function useSideMenu(initialProps?: Partial<SideMenuProps>): {
7811
7840
  isOpenState: boolean;
7812
7841
  wrapperRef: react.MutableRefObject<HTMLDivElement>;
7813
7842
  innerRef: react.MutableRefObject<HTMLDivElement>;
7843
+ sideMenuRef: react.MutableRefObject<HTMLDivElement>;
7814
7844
  generateSideMenuClass: (props: Partial<SideMenuProps & {
7815
7845
  isOpen?: boolean;
7816
7846
  }>) => string;
7817
7847
  generateWrapperClass: () => string;
7818
7848
  handleToggle: () => void;
7849
+ handleDesktopCollapse: () => void;
7819
7850
  getCurrentOpenState: () => boolean;
7820
7851
  };
7821
7852
  /**
@@ -10749,10 +10780,609 @@ declare const Upload: react__default.FC<UploadProps>;
10749
10780
  */
10750
10781
  declare const VideoPlayer: react__default.ForwardRefExoticComponent<VideoPlayerProps & react__default.RefAttributes<HTMLVideoElement>>;
10751
10782
 
10783
+ /**
10784
+ * Theme Manager Type Definitions
10785
+ *
10786
+ * TypeScript types and interfaces for the Atomix Design System theme management system.
10787
+ */
10788
+
10789
+ /**
10790
+ * Theme metadata interface matching themes.config.js structure
10791
+ */
10792
+ interface ThemeMetadata {
10793
+ /** Display name of the theme */
10794
+ name: string;
10795
+ /** Unique identifier/class name for the theme */
10796
+ class?: string;
10797
+ /** Theme description */
10798
+ description?: string;
10799
+ /** Theme author */
10800
+ author?: string;
10801
+ /** Theme version (semver) */
10802
+ version?: string;
10803
+ /** Theme tags for categorization */
10804
+ tags?: string[];
10805
+ /** Whether the theme supports dark mode */
10806
+ supportsDarkMode?: boolean;
10807
+ /** Theme status: stable, beta, experimental, deprecated */
10808
+ status?: 'stable' | 'beta' | 'experimental' | 'deprecated';
10809
+ /** Accessibility information */
10810
+ a11y?: {
10811
+ /** Target contrast ratio */
10812
+ contrastTarget?: number;
10813
+ /** Supported color modes */
10814
+ modes?: string[];
10815
+ };
10816
+ /** Primary theme color (for UI display) */
10817
+ color?: string;
10818
+ /** Theme features list */
10819
+ features?: string[];
10820
+ /** Theme dependencies (other themes required) */
10821
+ dependencies?: string[];
10822
+ }
10823
+ /**
10824
+ * Theme manager configuration options
10825
+ */
10826
+ interface ThemeManagerConfig {
10827
+ /** Available themes metadata */
10828
+ themes: Record<string, ThemeMetadata>;
10829
+ /** Default theme to use */
10830
+ defaultTheme?: string;
10831
+ /** Base path for theme CSS files */
10832
+ basePath?: string;
10833
+ /** CDN path for theme CSS files (optional) */
10834
+ cdnPath?: string | null;
10835
+ /** Themes to preload on initialization */
10836
+ preload?: string[];
10837
+ /** Enable lazy loading of themes */
10838
+ lazy?: boolean;
10839
+ /** localStorage key for persistence */
10840
+ storageKey?: string;
10841
+ /** Data attribute name for theme */
10842
+ dataAttribute?: string;
10843
+ /** Enable persistence */
10844
+ enablePersistence?: boolean;
10845
+ /** Custom CSS file extension */
10846
+ cssExtension?: string;
10847
+ /** Use minified CSS files */
10848
+ useMinified?: boolean;
10849
+ /** Callback when theme changes */
10850
+ onThemeChange?: (theme: string) => void;
10851
+ /** Callback when theme load fails */
10852
+ onError?: (error: Error, themeName: string) => void;
10853
+ }
10854
+ /**
10855
+ * Theme change event payload
10856
+ */
10857
+ interface ThemeChangeEvent {
10858
+ /** Previous theme name */
10859
+ previousTheme: string | null;
10860
+ /** New theme name */
10861
+ currentTheme: string;
10862
+ /** Timestamp of the change */
10863
+ timestamp: number;
10864
+ /** Whether the change was from user action or system */
10865
+ source: 'user' | 'system' | 'storage';
10866
+ }
10867
+ /**
10868
+ * Theme load options
10869
+ */
10870
+ interface ThemeLoadOptions {
10871
+ /** Force reload even if already loaded */
10872
+ force?: boolean;
10873
+ /** Preload without applying */
10874
+ preload?: boolean;
10875
+ /** Remove previous theme CSS */
10876
+ removePrevious?: boolean;
10877
+ /** Custom CSS path override */
10878
+ customPath?: string;
10879
+ /** Fallback to default theme on error */
10880
+ fallbackOnError?: boolean;
10881
+ }
10882
+ /**
10883
+ * Theme validation result
10884
+ */
10885
+ interface ThemeValidationResult {
10886
+ /** Whether the theme is valid */
10887
+ valid: boolean;
10888
+ /** Validation errors */
10889
+ errors: string[];
10890
+ /** Validation warnings */
10891
+ warnings: string[];
10892
+ }
10893
+ /**
10894
+ * Theme manager event types
10895
+ */
10896
+ type ThemeManagerEvent = 'themeChange' | 'themeLoad' | 'themeError';
10897
+ /**
10898
+ * Theme change callback function
10899
+ */
10900
+ type ThemeChangeCallback = (event: ThemeChangeEvent) => void;
10901
+ /**
10902
+ * Theme load callback function
10903
+ */
10904
+ type ThemeLoadCallback = (themeName: string) => void;
10905
+ /**
10906
+ * Theme error callback function
10907
+ */
10908
+ type ThemeErrorCallback = (error: Error, themeName: string) => void;
10909
+ /**
10910
+ * Event listener map
10911
+ */
10912
+ interface ThemeEventListeners {
10913
+ themeChange: ThemeChangeCallback[];
10914
+ themeLoad: ThemeLoadCallback[];
10915
+ themeError: ThemeErrorCallback[];
10916
+ }
10917
+ /**
10918
+ * React hook options for useTheme
10919
+ */
10920
+ interface UseThemeOptions {
10921
+ /** Default theme (overrides ThemeProvider default) */
10922
+ defaultTheme?: string;
10923
+ /** Enable persistence for this hook instance */
10924
+ enablePersistence?: boolean;
10925
+ /** Custom storage key */
10926
+ storageKey?: string;
10927
+ /** Callback when theme changes */
10928
+ onChange?: (theme: string) => void;
10929
+ }
10930
+ /**
10931
+ * React hook return type for useTheme
10932
+ */
10933
+ interface UseThemeReturn {
10934
+ /** Current theme name */
10935
+ theme: string;
10936
+ /** Function to change theme */
10937
+ setTheme: (theme: string, options?: ThemeLoadOptions) => Promise<void>;
10938
+ /** Available themes */
10939
+ availableThemes: ThemeMetadata[];
10940
+ /** Whether a theme is currently loading */
10941
+ isLoading: boolean;
10942
+ /** Current error, if any */
10943
+ error: Error | null;
10944
+ /** Whether a specific theme is loaded */
10945
+ isThemeLoaded: (themeName: string) => boolean;
10946
+ /** Preload a theme */
10947
+ preloadTheme: (themeName: string) => Promise<void>;
10948
+ }
10949
+ /**
10950
+ * Theme provider props
10951
+ */
10952
+ interface ThemeProviderProps {
10953
+ /** Child components */
10954
+ children: React.ReactNode;
10955
+ /** Default theme */
10956
+ defaultTheme?: string;
10957
+ /** Available themes */
10958
+ themes?: Record<string, ThemeMetadata>;
10959
+ /** Base path for theme CSS */
10960
+ basePath?: string;
10961
+ /** CDN path for theme CSS */
10962
+ cdnPath?: string | null;
10963
+ /** Themes to preload */
10964
+ preload?: string[];
10965
+ /** Enable lazy loading */
10966
+ lazy?: boolean;
10967
+ /** localStorage key */
10968
+ storageKey?: string;
10969
+ /** Data attribute name */
10970
+ dataAttribute?: string;
10971
+ /** Enable persistence */
10972
+ enablePersistence?: boolean;
10973
+ /** Use minified CSS */
10974
+ useMinified?: boolean;
10975
+ /** Callback when theme changes */
10976
+ onThemeChange?: (theme: string) => void;
10977
+ /** Callback on error */
10978
+ onError?: (error: Error, themeName: string) => void;
10979
+ }
10980
+ /**
10981
+ * Theme context value
10982
+ */
10983
+ interface ThemeContextValue {
10984
+ /** Current theme */
10985
+ theme: string;
10986
+ /** Set theme function */
10987
+ setTheme: (theme: string, options?: ThemeLoadOptions) => Promise<void>;
10988
+ /** Available themes */
10989
+ availableThemes: ThemeMetadata[];
10990
+ /** Loading state */
10991
+ isLoading: boolean;
10992
+ /** Error state */
10993
+ error: Error | null;
10994
+ /** Check if theme is loaded */
10995
+ isThemeLoaded: (themeName: string) => boolean;
10996
+ /** Preload theme */
10997
+ preloadTheme: (themeName: string) => Promise<void>;
10998
+ /** Theme manager instance */
10999
+ themeManager: ThemeManager;
11000
+ }
11001
+ /**
11002
+ * Storage adapter interface for custom storage implementations
11003
+ */
11004
+ interface StorageAdapter {
11005
+ /** Get item from storage */
11006
+ getItem(key: string): string | null;
11007
+ /** Set item in storage */
11008
+ setItem(key: string, value: string): void;
11009
+ /** Remove item from storage */
11010
+ removeItem(key: string): void;
11011
+ /** Check if storage is available */
11012
+ isAvailable(): boolean;
11013
+ }
11014
+
11015
+ /**
11016
+ * Theme Manager
11017
+ *
11018
+ * Core theme management class for the Atomix Design System.
11019
+ * Handles theme loading, switching, persistence, and events.
11020
+ */
11021
+
11022
+ /**
11023
+ * ThemeManager class
11024
+ *
11025
+ * Manages theme loading, switching, and persistence for Atomix Design System.
11026
+ *
11027
+ * @example
11028
+ * ```typescript
11029
+ * const themeManager = new ThemeManager({
11030
+ * themes: themesConfig.metadata,
11031
+ * defaultTheme: 'shaj-default',
11032
+ * });
11033
+ *
11034
+ * await themeManager.setTheme('flashtrade');
11035
+ * ```
11036
+ */
11037
+ declare class ThemeManager {
11038
+ private config;
11039
+ private currentTheme;
11040
+ private loadedThemes;
11041
+ private loadingThemes;
11042
+ private eventListeners;
11043
+ private storageAdapter;
11044
+ private initialized;
11045
+ /**
11046
+ * Create a new ThemeManager instance
11047
+ *
11048
+ * @param config - Theme manager configuration
11049
+ */
11050
+ constructor(config: ThemeManagerConfig);
11051
+ /**
11052
+ * Initialize the theme manager
11053
+ */
11054
+ private initialize;
11055
+ /**
11056
+ * Get the current theme name
11057
+ *
11058
+ * @returns Current theme name
11059
+ */
11060
+ getTheme(): string;
11061
+ /**
11062
+ * Get all available themes
11063
+ *
11064
+ * @returns Array of theme metadata
11065
+ */
11066
+ getAvailableThemes(): ThemeMetadata[];
11067
+ /**
11068
+ * Get metadata for a specific theme
11069
+ *
11070
+ * @param themeName - Name of the theme
11071
+ * @returns Theme metadata or null if not found
11072
+ */
11073
+ getThemeMetadata(themeName: string): ThemeMetadata | null;
11074
+ /**
11075
+ * Check if a theme is currently loaded
11076
+ *
11077
+ * @param themeName - Name of the theme to check
11078
+ * @returns True if theme is loaded
11079
+ */
11080
+ isThemeLoaded(themeName: string): boolean;
11081
+ /**
11082
+ * Validate a theme name
11083
+ *
11084
+ * @param themeName - Theme name to validate
11085
+ * @returns True if theme exists and is valid
11086
+ */
11087
+ validateTheme(themeName: string): boolean;
11088
+ /**
11089
+ * Preload a theme without applying it
11090
+ *
11091
+ * @param themeName - Name of the theme to preload
11092
+ * @returns Promise that resolves when theme is loaded
11093
+ */
11094
+ preloadTheme(themeName: string): Promise<void>;
11095
+ /**
11096
+ * Set the current theme
11097
+ *
11098
+ * @param themeName - Name of the theme to set
11099
+ * @param options - Load options
11100
+ * @returns Promise that resolves when theme is applied
11101
+ */
11102
+ setTheme(themeName: string, options?: ThemeLoadOptions): Promise<void>;
11103
+ /**
11104
+ * Enable theme persistence
11105
+ *
11106
+ * @param storageKey - Optional custom storage key
11107
+ */
11108
+ enablePersistence(storageKey?: string): void;
11109
+ /**
11110
+ * Disable theme persistence
11111
+ */
11112
+ disablePersistence(): void;
11113
+ /**
11114
+ * Clear all loaded themes
11115
+ */
11116
+ clearThemes(): void;
11117
+ /**
11118
+ * Add event listener
11119
+ *
11120
+ * @param event - Event name
11121
+ * @param callback - Callback function
11122
+ */
11123
+ on(event: 'themeChange', callback: ThemeChangeCallback): void;
11124
+ on(event: 'themeLoad', callback: ThemeLoadCallback): void;
11125
+ on(event: 'themeError', callback: ThemeErrorCallback): void;
11126
+ /**
11127
+ * Remove event listener
11128
+ *
11129
+ * @param event - Event name
11130
+ * @param callback - Callback function to remove
11131
+ */
11132
+ off(event: 'themeChange', callback: ThemeChangeCallback): void;
11133
+ off(event: 'themeLoad', callback: ThemeLoadCallback): void;
11134
+ off(event: 'themeError', callback: ThemeErrorCallback): void;
11135
+ /**
11136
+ * Emit theme change event
11137
+ */
11138
+ private emitThemeChange;
11139
+ /**
11140
+ * Emit theme load event
11141
+ */
11142
+ private emitLoad;
11143
+ /**
11144
+ * Emit theme error event
11145
+ */
11146
+ private emitError;
11147
+ /**
11148
+ * Destroy the theme manager and clean up
11149
+ */
11150
+ destroy(): void;
11151
+ }
11152
+
11153
+ /**
11154
+ * Theme Provider
11155
+ *
11156
+ * React context provider for theme management
11157
+ */
11158
+
11159
+ /**
11160
+ * ThemeProvider component
11161
+ *
11162
+ * Provides theme context to child components and manages theme state.
11163
+ *
11164
+ * @example
11165
+ * ```tsx
11166
+ * import { ThemeProvider } from '@shohojdhara/atomix/theme';
11167
+ * import { themesConfig } from '@shohojdhara/atomix/themes/themes.config';
11168
+ *
11169
+ * function App() {
11170
+ * return (
11171
+ * <ThemeProvider
11172
+ * themes={themesConfig.metadata}
11173
+ * defaultTheme="shaj-default"
11174
+ * >
11175
+ * <YourApp />
11176
+ * </ThemeProvider>
11177
+ * );
11178
+ * }
11179
+ * ```
11180
+ */
11181
+ declare const ThemeProvider: react__default.FC<ThemeProviderProps>;
11182
+
11183
+ /**
11184
+ * useTheme Hook
11185
+ *
11186
+ * React hook for accessing and managing theme state
11187
+ */
11188
+
11189
+ /**
11190
+ * useTheme hook
11191
+ *
11192
+ * Access theme context and manage theme state in React components.
11193
+ * Must be used within a ThemeProvider.
11194
+ *
11195
+ * @param options - Hook options
11196
+ * @returns Theme state and methods
11197
+ *
11198
+ * @example
11199
+ * ```tsx
11200
+ * function ThemeSwitcher() {
11201
+ * const { theme, setTheme, availableThemes, isLoading } = useTheme();
11202
+ *
11203
+ * return (
11204
+ * <select value={theme} onChange={(e) => setTheme(e.target.value)}>
11205
+ * {availableThemes.map(t => (
11206
+ * <option key={t.class} value={t.class}>{t.name}</option>
11207
+ * ))}
11208
+ * </select>
11209
+ * );
11210
+ * }
11211
+ * ```
11212
+ */
11213
+ declare const useTheme: (options?: UseThemeOptions) => UseThemeReturn;
11214
+
11215
+ /**
11216
+ * Theme context with default values
11217
+ */
11218
+ declare const ThemeContext: react.Context<ThemeContextValue>;
11219
+
11220
+ /**
11221
+ * Theme Manager Utility Functions
11222
+ *
11223
+ * Helper functions for theme operations including CSS loading, DOM manipulation,
11224
+ * and theme validation.
11225
+ */
11226
+
11227
+ /**
11228
+ * Check if code is running in a browser environment
11229
+ */
11230
+ declare const isBrowser: () => boolean;
11231
+ /**
11232
+ * Check if code is running on the server (SSR)
11233
+ */
11234
+ declare const isServer: () => boolean;
11235
+ /**
11236
+ * Generate a unique ID for theme link elements
11237
+ */
11238
+ declare const getThemeLinkId: (themeName: string) => string;
11239
+ /**
11240
+ * Build the CSS file path for a theme
11241
+ *
11242
+ * @param themeName - Name of the theme
11243
+ * @param basePath - Base path for theme files
11244
+ * @param useMinified - Whether to use minified CSS
11245
+ * @param cdnPath - Optional CDN path
11246
+ * @returns Full path to the theme CSS file
11247
+ */
11248
+ declare const buildThemePath: (themeName: string, basePath?: string, useMinified?: boolean, cdnPath?: string | null) => string;
11249
+ /**
11250
+ * Load theme CSS file dynamically
11251
+ *
11252
+ * @param themeName - Name of the theme to load
11253
+ * @param basePath - Base path for theme files
11254
+ * @param useMinified - Whether to use minified CSS
11255
+ * @param cdnPath - Optional CDN path
11256
+ * @returns Promise that resolves when CSS is loaded
11257
+ */
11258
+ declare const loadThemeCSS: (themeName: string, basePath?: string, useMinified?: boolean, cdnPath?: string | null) => Promise<void>;
11259
+ /**
11260
+ * Remove theme CSS from the DOM
11261
+ *
11262
+ * @param themeName - Name of the theme to remove
11263
+ */
11264
+ declare const removeThemeCSS: (themeName: string) => void;
11265
+ /**
11266
+ * Remove all theme CSS files from the DOM
11267
+ */
11268
+ declare const removeAllThemeCSS: () => void;
11269
+ /**
11270
+ * Apply theme data attributes to the document
11271
+ *
11272
+ * @param themeName - Name of the theme
11273
+ * @param dataAttribute - Data attribute name (default: 'data-theme')
11274
+ */
11275
+ declare const applyThemeAttributes: (themeName: string, dataAttribute?: string) => void;
11276
+ /**
11277
+ * Remove theme data attributes from the document
11278
+ *
11279
+ * @param dataAttribute - Data attribute name (default: 'data-theme')
11280
+ */
11281
+ declare const removeThemeAttributes: (dataAttribute?: string) => void;
11282
+ /**
11283
+ * Get the current theme from data attributes
11284
+ *
11285
+ * @param dataAttribute - Data attribute name (default: 'data-theme')
11286
+ * @returns Current theme name or null
11287
+ */
11288
+ declare const getCurrentThemeFromDOM: (dataAttribute?: string) => string | null;
11289
+ /**
11290
+ * Detect system theme preference
11291
+ *
11292
+ * @returns 'dark' if system prefers dark mode, 'light' otherwise
11293
+ */
11294
+ declare const getSystemTheme: () => "light" | "dark";
11295
+ /**
11296
+ * Check if a theme is currently loaded in the DOM
11297
+ *
11298
+ * @param themeName - Name of the theme to check
11299
+ * @returns True if theme CSS is loaded
11300
+ */
11301
+ declare const isThemeLoaded: (themeName: string) => boolean;
11302
+ /**
11303
+ * Validate theme metadata
11304
+ *
11305
+ * @param metadata - Theme metadata to validate
11306
+ * @returns Validation result with errors and warnings
11307
+ */
11308
+ declare const validateThemeMetadata: (metadata: unknown) => ThemeValidationResult;
11309
+ /**
11310
+ * Validate theme name format
11311
+ *
11312
+ * @param themeName - Theme name to validate
11313
+ * @returns True if valid
11314
+ */
11315
+ declare const isValidThemeName: (themeName: string) => boolean;
11316
+ /**
11317
+ * Create a storage adapter for localStorage
11318
+ */
11319
+ declare const createLocalStorageAdapter: () => {
11320
+ getItem: (key: string) => string | null;
11321
+ setItem: (key: string, value: string) => void;
11322
+ removeItem: (key: string) => void;
11323
+ isAvailable: () => boolean;
11324
+ };
11325
+ /**
11326
+ * Debounce function for performance optimization
11327
+ *
11328
+ * @param func - Function to debounce
11329
+ * @param wait - Wait time in milliseconds
11330
+ * @returns Debounced function
11331
+ */
11332
+ declare const debounce: <T extends (...args: any[]) => any>(func: T, wait: number) => ((...args: Parameters<T>) => void);
11333
+
11334
+ /**
11335
+ * Theme Module Entry Point
11336
+ *
11337
+ * Exports all theme management utilities for the Atomix Design System
11338
+ */
11339
+
11340
+ type themeImport_StorageAdapter = StorageAdapter;
11341
+ type themeImport_ThemeChangeCallback = ThemeChangeCallback;
11342
+ type themeImport_ThemeChangeEvent = ThemeChangeEvent;
11343
+ declare const themeImport_ThemeContext: typeof ThemeContext;
11344
+ type themeImport_ThemeContextValue = ThemeContextValue;
11345
+ type themeImport_ThemeErrorCallback = ThemeErrorCallback;
11346
+ type themeImport_ThemeEventListeners = ThemeEventListeners;
11347
+ type themeImport_ThemeLoadCallback = ThemeLoadCallback;
11348
+ type themeImport_ThemeLoadOptions = ThemeLoadOptions;
11349
+ type themeImport_ThemeManager = ThemeManager;
11350
+ declare const themeImport_ThemeManager: typeof ThemeManager;
11351
+ type themeImport_ThemeManagerConfig = ThemeManagerConfig;
11352
+ type themeImport_ThemeManagerEvent = ThemeManagerEvent;
11353
+ type themeImport_ThemeMetadata = ThemeMetadata;
11354
+ declare const themeImport_ThemeProvider: typeof ThemeProvider;
11355
+ type themeImport_ThemeProviderProps = ThemeProviderProps;
11356
+ type themeImport_ThemeValidationResult = ThemeValidationResult;
11357
+ type themeImport_UseThemeOptions = UseThemeOptions;
11358
+ type themeImport_UseThemeReturn = UseThemeReturn;
11359
+ declare const themeImport_applyThemeAttributes: typeof applyThemeAttributes;
11360
+ declare const themeImport_buildThemePath: typeof buildThemePath;
11361
+ declare const themeImport_createLocalStorageAdapter: typeof createLocalStorageAdapter;
11362
+ declare const themeImport_debounce: typeof debounce;
11363
+ declare const themeImport_getCurrentThemeFromDOM: typeof getCurrentThemeFromDOM;
11364
+ declare const themeImport_getSystemTheme: typeof getSystemTheme;
11365
+ declare const themeImport_getThemeLinkId: typeof getThemeLinkId;
11366
+ declare const themeImport_isBrowser: typeof isBrowser;
11367
+ declare const themeImport_isServer: typeof isServer;
11368
+ declare const themeImport_isThemeLoaded: typeof isThemeLoaded;
11369
+ declare const themeImport_isValidThemeName: typeof isValidThemeName;
11370
+ declare const themeImport_loadThemeCSS: typeof loadThemeCSS;
11371
+ declare const themeImport_removeAllThemeCSS: typeof removeAllThemeCSS;
11372
+ declare const themeImport_removeThemeAttributes: typeof removeThemeAttributes;
11373
+ declare const themeImport_removeThemeCSS: typeof removeThemeCSS;
11374
+ declare const themeImport_useTheme: typeof useTheme;
11375
+ declare const themeImport_validateThemeMetadata: typeof validateThemeMetadata;
11376
+ declare namespace themeImport {
11377
+ export { themeImport_ThemeContext as ThemeContext, ThemeContext as ThemeContextDefault, themeImport_ThemeManager as ThemeManager, ThemeManager as ThemeManagerDefault, themeImport_ThemeProvider as ThemeProvider, ThemeProvider as ThemeProviderDefault, themeImport_applyThemeAttributes as applyThemeAttributes, themeImport_buildThemePath as buildThemePath, themeImport_createLocalStorageAdapter as createLocalStorageAdapter, themeImport_debounce as debounce, themeImport_getCurrentThemeFromDOM as getCurrentThemeFromDOM, themeImport_getSystemTheme as getSystemTheme, themeImport_getThemeLinkId as getThemeLinkId, themeImport_isBrowser as isBrowser, themeImport_isServer as isServer, themeImport_isThemeLoaded as isThemeLoaded, themeImport_isValidThemeName as isValidThemeName, themeImport_loadThemeCSS as loadThemeCSS, themeImport_removeAllThemeCSS as removeAllThemeCSS, themeImport_removeThemeAttributes as removeThemeAttributes, themeImport_removeThemeCSS as removeThemeCSS, themeImport_useTheme as useTheme, useTheme as useThemeDefault, themeImport_validateThemeMetadata as validateThemeMetadata };
11378
+ export type { themeImport_StorageAdapter as StorageAdapter, themeImport_ThemeChangeCallback as ThemeChangeCallback, themeImport_ThemeChangeEvent as ThemeChangeEvent, themeImport_ThemeContextValue as ThemeContextValue, themeImport_ThemeErrorCallback as ThemeErrorCallback, themeImport_ThemeEventListeners as ThemeEventListeners, themeImport_ThemeLoadCallback as ThemeLoadCallback, themeImport_ThemeLoadOptions as ThemeLoadOptions, themeImport_ThemeManagerConfig as ThemeManagerConfig, themeImport_ThemeManagerEvent as ThemeManagerEvent, themeImport_ThemeMetadata as ThemeMetadata, themeImport_ThemeProviderProps as ThemeProviderProps, themeImport_ThemeValidationResult as ThemeValidationResult, themeImport_UseThemeOptions as UseThemeOptions, themeImport_UseThemeReturn as UseThemeReturn };
11379
+ }
11380
+
10752
11381
  declare const composables: typeof __lib_composables;
10753
11382
  declare const utils: typeof __lib_utils;
10754
11383
  declare const types: typeof __lib_types;
10755
11384
  declare const constants: typeof __lib_constants;
11385
+ declare const theme: typeof themeImport;
10756
11386
 
10757
11387
  interface GridProps extends HTMLAttributes<HTMLDivElement> {
10758
11388
  /**
@@ -11134,5 +11764,5 @@ declare const atomix: {
11134
11764
  VideoPlayer: react.ForwardRefExoticComponent<VideoPlayerProps & react.RefAttributes<HTMLVideoElement>>;
11135
11765
  };
11136
11766
 
11137
- export { Accordion, AnimatedChart, AreaChart, AtomixGlass, AtomixLogo, Avatar, AvatarGroup, Badge, BarChart, Block, Breadcrumb, BubbleChart, Button, Callout, CandlestickChart, Card, Chart, ChartRenderer, Checkbox, ColorModeToggle, Container, Countdown, DataTable, DatePicker, DonutChart, Dropdown, EdgePanel, ElevationCard, Footer, FooterLink, FooterSection, FooterSocialLink, Form, FormGroup, FunnelChart, GaugeChart, Grid, GridCol, HeatmapChart, Hero, Icon, Input, LineChart, List, ListGroup, MasonryGrid, MasonryGridItem, MegaMenu, MegaMenuColumn, MegaMenuLink, Menu, MenuDivider, MenuItem, Messages, Modal, MultiAxisChart, Nav, NavDropdown, NavItem, Navbar, Pagination, PhotoViewer, PieChart, Popover, ProductReview, Progress, RadarChart, Radio, Rating, River, Row, ScatterChart, SectionIntro, Select, SideMenu, SideMenuItem, SideMenuList, Slider, Spinner, Steps, Tabs, Testimonial, Textarea, Todo, Toggle, Tooltip, TreemapChart, Upload, VideoPlayer, WaterfallChart, composables, constants, atomix as default, types, utils };
11138
- export type { AccordionProps, AnimatedChartProps, AreaChartProps, AtomixGlassProps, AtomixLogoProps, AvatarGroupProps, AvatarProps, BadgeProps, BarChartProps, BlockProps, BreadcrumbProps, BubbleChartProps, BubbleDataPoint, ButtonProps, CalloutProps, CandlestickChartProps, CandlestickDataPoint, CardProps, ChartProps, CheckboxProps, ColorModeToggleProps, ContainerProps, CountdownProps, DataTableProps, DatePickerProps, DonutChartProps, DropdownProps, EdgePanelProps, ElevationCardProps, FooterLayout, FooterLinkProps, FooterProps, FooterSectionProps, FooterSocialLinkProps, FormGroupProps, FormProps, FunnelChartProps, FunnelDataPoint, GaugeChartProps, GridColProps, GridProps, HeatmapChartProps, HeatmapDataPoint, HeroProps, IconProps, InputProps, LineChartProps, ListGroupProps, ListProps, MasonryGridItemProps, MasonryGridProps, MegaMenuColumnProps, MegaMenuLinkProps, MegaMenuProps, MenuDividerProps, MenuItemProps, MenuProps, MessagesProps, ModalProps, MultiAxisChartProps, NavDropdownProps, NavItemProps, NavProps, NavbarProps, PaginationProps, PhotoViewerProps, PieChartProps, PopoverProps, ProductReviewProps, ProgressProps, RadarChartProps, RadioProps, RatingProps, RiverProps, RowProps, ScatterChartProps, ScatterDataPoint, SectionIntroProps, SelectProps, SideMenuItemProps, SideMenuListProps, SideMenuProps, SliderProps, SocialLink, SocialPlatform, SpinnerProps, StepsProps, TabsProps, TestimonialProps, TextareaProps, TodoProps, ToggleProps, TooltipProps, TreemapChartProps, TreemapDataPoint, TreemapNode, UploadProps, VideoPlayerProps, WaterfallChartProps, WaterfallDataPoint };
11767
+ export { Accordion, AnimatedChart, AreaChart, AtomixGlass, AtomixLogo, Avatar, AvatarGroup, Badge, BarChart, Block, Breadcrumb, BubbleChart, Button, Callout, CandlestickChart, Card, Chart, ChartRenderer, Checkbox, ColorModeToggle, Container, Countdown, DataTable, DatePicker, DonutChart, Dropdown, EdgePanel, ElevationCard, Footer, FooterLink, FooterSection, FooterSocialLink, Form, FormGroup, FunnelChart, GaugeChart, Grid, GridCol, HeatmapChart, Hero, Icon, Input, LineChart, List, ListGroup, MasonryGrid, MasonryGridItem, MegaMenu, MegaMenuColumn, MegaMenuLink, Menu, MenuDivider, MenuItem, Messages, Modal, MultiAxisChart, Nav, NavDropdown, NavItem, Navbar, Pagination, PhotoViewer, PieChart, Popover, ProductReview, Progress, RadarChart, Radio, Rating, River, Row, ScatterChart, SectionIntro, Select, SideMenu, SideMenuItem, SideMenuList, Slider, Spinner, Steps, Tabs, Testimonial, Textarea, ThemeContext, ThemeContext as ThemeContextDefault, ThemeManager, ThemeManager as ThemeManagerDefault, ThemeProvider, ThemeProvider as ThemeProviderDefault, Todo, Toggle, Tooltip, TreemapChart, Upload, VideoPlayer, WaterfallChart, applyThemeAttributes, buildThemePath, composables, constants, createLocalStorageAdapter, debounce, atomix as default, getCurrentThemeFromDOM, getSystemTheme, getThemeLinkId, isBrowser, isServer, isThemeLoaded, isValidThemeName, loadThemeCSS, removeAllThemeCSS, removeThemeAttributes, removeThemeCSS, theme, types, useTheme, useTheme as useThemeDefault, utils, validateThemeMetadata };
11768
+ export type { AccordionProps, AnimatedChartProps, AreaChartProps, AtomixGlassProps, AtomixLogoProps, AvatarGroupProps, AvatarProps, BadgeProps, BarChartProps, BlockProps, BreadcrumbProps, BubbleChartProps, BubbleDataPoint, ButtonProps, CalloutProps, CandlestickChartProps, CandlestickDataPoint, CardProps, ChartProps, CheckboxProps, ColorModeToggleProps, ContainerProps, CountdownProps, DataTableProps, DatePickerProps, DonutChartProps, DropdownProps, EdgePanelProps, ElevationCardProps, FooterLayout, FooterLinkProps, FooterProps, FooterSectionProps, FooterSocialLinkProps, FormGroupProps, FormProps, FunnelChartProps, FunnelDataPoint, GaugeChartProps, GridColProps, GridProps, HeatmapChartProps, HeatmapDataPoint, HeroProps, IconProps, InputProps, LineChartProps, ListGroupProps, ListProps, MasonryGridItemProps, MasonryGridProps, MegaMenuColumnProps, MegaMenuLinkProps, MegaMenuProps, MenuDividerProps, MenuItemProps, MenuProps, MessagesProps, ModalProps, MultiAxisChartProps, NavDropdownProps, NavItemProps, NavProps, NavbarProps, PaginationProps, PhotoViewerProps, PieChartProps, PopoverProps, ProductReviewProps, ProgressProps, RadarChartProps, RadioProps, RatingProps, RiverProps, RowProps, ScatterChartProps, ScatterDataPoint, SectionIntroProps, SelectProps, SideMenuItemProps, SideMenuListProps, SideMenuProps, SliderProps, SocialLink, SocialPlatform, SpinnerProps, StepsProps, StorageAdapter, TabsProps, TestimonialProps, TextareaProps, ThemeChangeCallback, ThemeChangeEvent, ThemeContextValue, ThemeErrorCallback, ThemeEventListeners, ThemeLoadCallback, ThemeLoadOptions, ThemeManagerConfig, ThemeManagerEvent, ThemeMetadata, ThemeProviderProps, ThemeValidationResult, TodoProps, ToggleProps, TooltipProps, TreemapChartProps, TreemapDataPoint, TreemapNode, UploadProps, UseThemeOptions, UseThemeReturn, VideoPlayerProps, WaterfallChartProps, WaterfallDataPoint };