@admin-layout/tailwind-design-pro 10.0.9-alpha.52 → 10.0.9-alpha.55

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 (42) hide show
  1. package/README.md +277 -20
  2. package/lib/cdm-locales/en/settings.json +5 -1
  3. package/lib/cdm-locales/es/settings.json +5 -1
  4. package/lib/components/Layout/BasicLayout/index.d.ts.map +1 -1
  5. package/lib/components/Layout/BasicLayout/index.js +34 -12
  6. package/lib/components/Layout/BasicLayout/index.js.map +1 -1
  7. package/lib/components/Layout/GlobalHeader/Header.d.ts.map +1 -1
  8. package/lib/components/Layout/GlobalHeader/Header.js +14 -6
  9. package/lib/components/Layout/GlobalHeader/Header.js.map +1 -1
  10. package/lib/components/Layout/GlobalHeader/MainHeader.d.ts.map +1 -1
  11. package/lib/components/Layout/GlobalHeader/MainHeader.js +19 -12
  12. package/lib/components/Layout/GlobalHeader/MainHeader.js.map +1 -1
  13. package/lib/components/Layout/Sidebar/Sidebar.d.ts.map +1 -1
  14. package/lib/components/Layout/Sidebar/Sidebar.js +9 -6
  15. package/lib/components/Layout/Sidebar/Sidebar.js.map +1 -1
  16. package/lib/components/Layout/TailwindLayout.d.ts.map +1 -1
  17. package/lib/components/Layout/TailwindLayout.js +15 -23
  18. package/lib/components/Layout/TailwindLayout.js.map +1 -1
  19. package/lib/components/SettingDrawer/LayoutChange.d.ts.map +1 -1
  20. package/lib/components/SettingDrawer/LayoutChange.js +10 -6
  21. package/lib/components/SettingDrawer/LayoutChange.js.map +1 -1
  22. package/lib/components/SettingDrawer/NavigationsModes.d.ts +1 -1
  23. package/lib/components/SettingDrawer/NavigationsModes.d.ts.map +1 -1
  24. package/lib/components/SettingDrawer/NavigationsModes.js +10 -7
  25. package/lib/components/SettingDrawer/NavigationsModes.js.map +1 -1
  26. package/lib/components/SettingDrawer/RegionalSettings.d.ts.map +1 -1
  27. package/lib/components/SettingDrawer/RegionalSettings.js +111 -14
  28. package/lib/components/SettingDrawer/RegionalSettings.js.map +1 -1
  29. package/lib/components/SettingDrawer/SettingDrawer.d.ts.map +1 -1
  30. package/lib/components/SettingDrawer/SettingDrawer.js +15 -21
  31. package/lib/components/SettingDrawer/SettingDrawer.js.map +1 -1
  32. package/lib/components/SettingDrawer/types.d.ts +4 -0
  33. package/lib/components/SettingDrawer/types.d.ts.map +1 -1
  34. package/lib/components/typings.d.ts +2 -0
  35. package/lib/components/typings.d.ts.map +1 -1
  36. package/lib/machines/settingsMachine.d.ts +4 -1
  37. package/lib/machines/settingsMachine.d.ts.map +1 -1
  38. package/lib/machines/settingsMachine.js +122 -45
  39. package/lib/machines/settingsMachine.js.map +1 -1
  40. package/lib/machines/types.d.ts +37 -2
  41. package/lib/machines/types.d.ts.map +1 -1
  42. package/package.json +3 -3
package/README.md CHANGED
@@ -51,38 +51,295 @@ export default {
51
51
  };
52
52
  ```
53
53
 
54
- ### 3. Using the ThemeProvider
54
+ # Theme System Documentation
55
55
 
56
- To enable theme switching functionality in your application, wrap your app with the ThemeProvider:
56
+ ## Overview
57
+
58
+ The theme system provides a flexible and powerful way to manage the visual appearance of your application. It supports multiple pre-built themes (default, Airbnb, Slack, GitHub, and Spotify) and includes dark mode functionality.
59
+
60
+ ## Available Themes
61
+
62
+ The system comes with several pre-built themes:
63
+
64
+ - `default`: A neutral theme with standard components
65
+ - `airbnb`: Inspired by Airbnb's design system
66
+ - `slack`: Based on Slack's color scheme and components
67
+ - `github`: Following GitHub's design patterns
68
+ - `spotify`: Matching Spotify's visual identity
69
+
70
+ ## Theme Structure
71
+
72
+ Each theme follows a consistent structure defined by the `DefaultTheme` interface:
73
+
74
+ ```typescript
75
+ interface DefaultTheme {
76
+ name: string;
77
+ colors: {
78
+ primary: ColorRamp;
79
+ secondary: ColorRamp;
80
+ accent: ColorRamp;
81
+ success: ColorRamp;
82
+ warning: ColorRamp;
83
+ error: ColorRamp;
84
+ neutral: ColorRamp;
85
+ background: {
86
+ light: string;
87
+ dark: string;
88
+ };
89
+ text: {
90
+ light: {
91
+ primary: string;
92
+ secondary: string;
93
+ tertiary: string;
94
+ };
95
+ dark: {
96
+ primary: string;
97
+ secondary: string;
98
+ tertiary: string;
99
+ };
100
+ };
101
+ };
102
+ borderRadius: {
103
+ sm: string;
104
+ DEFAULT: string;
105
+ md: string;
106
+ lg: string;
107
+ xl: string;
108
+ '2xl': string;
109
+ full: string;
110
+ };
111
+ fontFamily: {
112
+ sans: string[];
113
+ serif: string[];
114
+ mono: string[];
115
+ };
116
+ boxShadow: {
117
+ sm: string;
118
+ DEFAULT: string;
119
+ md: string;
120
+ lg: string;
121
+ xl: string;
122
+ };
123
+ components: {
124
+ buttons: {
125
+ primary: ButtonStyle;
126
+ secondary: ButtonStyle;
127
+ };
128
+ cards: {
129
+ borderRadius: string;
130
+ padding: string;
131
+ shadow: string;
132
+ border: string;
133
+ };
134
+ inputs: {
135
+ borderRadius: string;
136
+ borderColor: string;
137
+ focusBorderColor: string;
138
+ padding: string;
139
+ fontSize: string;
140
+ lineHeight: string;
141
+ };
142
+ };
143
+ }
144
+ ```
145
+
146
+ ## Setting Up the Theme Provider
147
+
148
+ To use the theme system, wrap your application with the `ThemeProviderTailwind` component:
57
149
 
58
150
  ```tsx
59
- import { ThemeProvider } from '@admin-layout/tailwind-design-pro';
151
+ import { ThemeProviderTailwind } from 'packages/tailwind-design-pro/src/components/ThemeProvider';
60
152
 
61
- function App() {
62
- // Example settings for the theme
153
+ const App = () => {
63
154
  const settings = {
64
- theme: 'airbnb', // Use our unified theme
65
- themeType: 'light', // 'light' or 'dark'
66
- primaryColor: '#1890ff', // Optional custom primary color
67
- fontFamily: 'Inter, sans-serif', // Optional custom font
155
+ theme: 'default', // or 'airbnb', 'slack', 'github', 'spotify'
156
+ themeType: 'light',
157
+ primaryColor: '#your-color',
158
+ fontFamily: 'your-font-family',
159
+ navTheme: 'light', // or 'dark'
68
160
  };
69
161
 
162
+ return <ThemeProviderTailwind settings={settings}>{/* Your app components */}</ThemeProviderTailwind>;
163
+ };
164
+ ```
165
+
166
+ ## Using the useTheme Hook
167
+
168
+ The `useTheme` hook provides access to the current theme and theme-related functionality. Here's how to use it:
169
+
170
+ ```tsx
171
+ import { useTheme } from 'packages/tailwind-design-pro/src/components/ThemeProvider';
172
+
173
+ const YourComponent = () => {
174
+ const { themeName, theme, isDarkMode, toggleDarkMode } = useTheme();
175
+
70
176
  return (
71
- <ThemeProvider settings={settings}>
72
- <YourApp />
73
- </ThemeProvider>
177
+ <div>
178
+ {/* Access theme colors */}
179
+ <div style={{ color: theme.colors.primary[500] }}>Primary Color</div>
180
+
181
+ {/* Use theme-specific styles */}
182
+ <button
183
+ style={{
184
+ borderRadius: theme.borderRadius.DEFAULT,
185
+ fontFamily: theme.fontFamily.sans.join(', '),
186
+ }}
187
+ >
188
+ Themed Button
189
+ </button>
190
+
191
+ {/* Toggle dark mode */}
192
+ <button onClick={toggleDarkMode}>Toggle {isDarkMode ? 'Light' : 'Dark'} Mode</button>
193
+ </div>
74
194
  );
75
- }
195
+ };
76
196
  ```
77
197
 
198
+ ### Available Properties from useTheme
199
+
200
+ 1. `themeName`: The current theme name ('default', 'airbnb', 'slack', 'github', or 'spotify')
201
+ 2. `theme`: The complete theme object containing all styling properties
202
+ 3. `isDarkMode`: Boolean indicating if dark mode is active
203
+ 4. `toggleDarkMode`: Function to toggle between light and dark modes
204
+
205
+ ## Theme Features
206
+
207
+ ### 1. Dark Mode Support
208
+
209
+ - Automatically handles dark mode through the `isDarkMode` state
210
+ - Persists dark mode preference in localStorage
211
+ - Applies appropriate dark mode classes to the document
212
+
213
+ ### 2. Dynamic Theme Switching
214
+
215
+ - Themes can be changed dynamically through the settings prop
216
+ - All theme properties are immediately applied when changed
217
+
218
+ ### 3. Component-Specific Styling
219
+
220
+ Each theme includes specific styling for common components:
221
+
222
+ - Buttons (primary and secondary variants)
223
+ - Cards
224
+ - Input fields
225
+
226
+ ### 4. Color System
227
+
228
+ - Each theme includes a comprehensive color system with:
229
+ - Primary colors
230
+ - Secondary colors
231
+ - Accent colors
232
+ - Semantic colors (success, warning, error)
233
+ - Neutral colors
234
+ - Background colors
235
+ - Text colors
236
+
237
+ ### 5. Typography
238
+
239
+ - Customizable font families for different text styles
240
+ - Consistent typography settings across themes
241
+
242
+ ## Best Practices
243
+
244
+ 1. **Theme Access**
245
+
246
+ ```tsx
247
+ const { theme } = useTheme();
248
+ // Use theme properties directly
249
+ const primaryColor = theme.colors.primary[500];
250
+ ```
251
+
252
+ 2. **Dark Mode Handling**
253
+
254
+ ```tsx
255
+ const { isDarkMode, toggleDarkMode } = useTheme();
256
+ // Use isDarkMode to conditionally render styles
257
+ const backgroundColor = isDarkMode ? theme.colors.background.dark : theme.colors.background.light;
258
+ ```
259
+
260
+ 3. **Component Styling**
261
+
262
+ ```tsx
263
+ const { theme } = useTheme();
264
+ // Use theme component styles
265
+ const buttonStyle = {
266
+ ...theme.components.buttons.primary,
267
+ // Add custom styles as needed
268
+ };
269
+ ```
270
+
271
+ 4. **Responsive Design**
272
+ ```tsx
273
+ const { theme } = useTheme();
274
+ // Use theme's responsive values
275
+ const cardStyle = {
276
+ borderRadius: theme.borderRadius.md,
277
+ boxShadow: theme.boxShadow.DEFAULT,
278
+ };
279
+ ```
280
+
78
281
  ## Theme Customization
79
282
 
80
- The theme system is built on Tailwind's theme extension mechanism. You can customize the theme by modifying the `themeRegistry.ts` file.
283
+ ### Creating a Custom Theme
81
284
 
82
- ## Available Themes
285
+ You can create your own theme by following the `DefaultTheme` interface structure:
286
+
287
+ ```typescript
288
+ const customTheme: DefaultTheme = {
289
+ name: 'custom',
290
+ colors: {
291
+ // Define your color palette
292
+ },
293
+ // Define other theme properties
294
+ };
295
+ ```
296
+
297
+ ### Extending Existing Themes
298
+
299
+ You can extend existing themes by importing them and modifying specific properties:
300
+
301
+ ```typescript
302
+ import { defaultTheme } from './themes/default';
303
+
304
+ const extendedTheme: DefaultTheme = {
305
+ ...defaultTheme,
306
+ name: 'extended',
307
+ colors: {
308
+ ...defaultTheme.colors,
309
+ primary: {
310
+ // Override primary colors
311
+ },
312
+ },
313
+ };
314
+ ```
315
+
316
+ ## Troubleshooting
317
+
318
+ ### Common Issues
319
+
320
+ 1. **Theme Not Applying**
321
+
322
+ - Ensure the `ThemeProviderTailwind` is properly wrapped around your application
323
+ - Check if the theme name matches one of the available themes
324
+ - Verify that the settings prop is correctly configured
325
+
326
+ 2. **Dark Mode Not Working**
327
+
328
+ - Check if `navTheme` is properly set in the settings
329
+ - Verify that the dark mode classes are being applied to the document
330
+ - Ensure localStorage is accessible in your environment
331
+
332
+ 3. **Custom Styles Not Taking Effect**
333
+ - Verify that your custom theme follows the `DefaultTheme` interface
334
+ - Check if the theme is properly registered in the themes object
335
+ - Ensure the theme name is correctly referenced in the settings
336
+
337
+ ## Contributing
338
+
339
+ When contributing to the theme system:
83
340
 
84
- - `default` - The default theme
85
- - `github` - GitHub-inspired theme
86
- - `slack` - Slack-inspired theme
87
- - `airbnb` - Airbnb-inspired theme
88
- - `spotify` - Spotify-inspired theme
341
+ 1. Follow the existing theme structure
342
+ 2. Maintain consistency with other themes
343
+ 3. Include both light and dark mode variants
344
+ 4. Document any new theme properties or features
345
+ 5. Test the theme across different components and scenarios
@@ -24,5 +24,9 @@
24
24
  "menu_divider_names": "Menu Divider Names",
25
25
  "upper_menu_divider": "Upper Menu Divider",
26
26
  "middle_menu_divider": "Middle Menu Divider",
27
- "lower_menu_divider": "Lower Menu Divider"
27
+ "lower_menu_divider": "Lower Menu Divider",
28
+ "header_elements": "Header Elements",
29
+ "show_logo": "Show Logo",
30
+ "show_search_slot": "Show Search Slot",
31
+ "show_right_content": "Show Right Content"
28
32
  }
@@ -22,5 +22,9 @@
22
22
  "menu_divider_names": "Nombres de los Separadores de Menú",
23
23
  "upper_menu_divider": "Separador del Menú Superior",
24
24
  "middle_menu_divider": "Separador del Menú Central",
25
- "lower_menu_divider": "Separador del Menú Inferior"
25
+ "lower_menu_divider": "Separador del Menú Inferior",
26
+ "header_elements": "Elementos del Encabezado",
27
+ "show_logo": "Mostrar Logo",
28
+ "show_search_slot": "Mostrar Espacio de Búsqueda",
29
+ "show_right_content": "Mostrar Contenido Derecho"
26
30
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Layout/BasicLayout/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAiE,MAAM,OAAO,CAAC;AAOtF,OAAO,EACH,gBAAgB,EAGhB,iBAAiB,EAIpB,MAAM,sBAAsB,CAAC;AAS9B,eAAO,MAAM,mBAAmB;;;;uCA4B/B,CAAC;AAgCF,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAC9B,gBAAgB,GAAG,iBAAiB,GAAG;IAAE,WAAW,CAAC,EAAE,GAAG,CAAC;IAAC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,CAmM3F,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Layout/BasicLayout/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAiE,MAAM,OAAO,CAAC;AAOtF,OAAO,EACH,gBAAgB,EAGhB,iBAAiB,EAIpB,MAAM,sBAAsB,CAAC;AAS9B,eAAO,MAAM,mBAAmB;;;;uCA4B/B,CAAC;AAgCF,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAC9B,gBAAgB,GAAG,iBAAiB,GAAG;IAAE,WAAW,CAAC,EAAE,GAAG,CAAC;IAAC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,CAkO3F,CAAC"}
@@ -83,7 +83,6 @@ const BasicLayout = props => {
83
83
  actor
84
84
  } = propsWithSettings;
85
85
  const [isSideMenuOpen, setIsSideMenuOpen] = useState(false);
86
- // const location = useLocation();
87
86
  const [scrollEnd, setScrollEnd] = useState(false);
88
87
  const [searchOptionsShown, setSearchOptionsShown] = useState(false);
89
88
  const {
@@ -99,6 +98,9 @@ const BasicLayout = props => {
99
98
  const {
100
99
  isMobile
101
100
  } = useMediaQuery();
101
+ // Get current route settings
102
+ const currentRoute = location?.pathname || '/';
103
+ const routeSettings = settings?.routeSettings?.[currentRoute] || settings?.routeSettings?.['/'] || settings;
102
104
  const onScrollReachEnd = () => {
103
105
  setScrollEnd(prevScrollEnd => !prevScrollEnd);
104
106
  };
@@ -115,7 +117,7 @@ const BasicLayout = props => {
115
117
  ...defaultProps
116
118
  }, propsWithSettings);
117
119
  const settingRef = useRef(settings);
118
- const scrollThreshold = settings?.regions?.scrollThreshold || 50;
120
+ const scrollThreshold = routeSettings?.regions?.scrollThreshold || 50;
119
121
  const {
120
122
  componentVisibility
121
123
  } = useScrollThreshold([{
@@ -133,6 +135,15 @@ const BasicLayout = props => {
133
135
  onSettingChange(newState);
134
136
  }
135
137
  }, [primaryColor, isBrowser, settingRef]);
138
+ // // Update settings when route changes
139
+ // useEffect(() => {
140
+ // if (actor && location.pathname) {
141
+ // actor.send({
142
+ // type: 'ROUTE_CHANGE',
143
+ // pathname: location.pathname
144
+ // });
145
+ // }
146
+ // }, [location.pathname, actor]);
136
147
  const {
137
148
  ref: refHeader,
138
149
  height: heightHeader
@@ -165,13 +176,14 @@ const BasicLayout = props => {
165
176
  style: {
166
177
  backgroundColor: backgroundColor
167
178
  },
168
- children: [settings?.regions.showHeader && LAYOUT_ROOT != '/' && jsx(GlobalHeader, {
179
+ children: [routeSettings?.regions.showHeader && LAYOUT_ROOT != '/' && jsx(GlobalHeader, {
169
180
  toggleSideMenu: toggleSideMenu,
170
181
  settings: settings,
171
182
  upperMenus: getMenuSeparation(menuData).upperMenus,
172
183
  routeParams: routeParams,
173
- collapsed: collapsed
174
- }), LAYOUT_ROOT === '/' && settings?.regions.showHeader && jsx(MainHeader, {
184
+ collapsed: collapsed,
185
+ ...props
186
+ }), LAYOUT_ROOT === '/' && routeSettings?.regions.showHeader && jsx(MainHeader, {
175
187
  scrolled: scrolled,
176
188
  location: location,
177
189
  menuData: menuData,
@@ -184,8 +196,8 @@ const BasicLayout = props => {
184
196
  picture: picture,
185
197
  componentVisibility: componentVisibility
186
198
  }), jsxs("div", {
187
- className: "flex flex-1 relative",
188
- children: [settings?.layout.navigationMode !== 'topbar' && settings?.regions.showMenu && LAYOUT_ROOT != '/' && jsx(Sidebar, {
199
+ className: "flex flex-1 relative",
200
+ children: [routeSettings?.layout.navigationMode !== 'topbar' && routeSettings?.regions.showMenu && LAYOUT_ROOT != '/' && jsx(Sidebar, {
189
201
  isSideMenuOpen: isSideMenuOpen,
190
202
  closeSideMenu: closeSideMenu,
191
203
  menuData: menuData,
@@ -196,17 +208,27 @@ const BasicLayout = props => {
196
208
  }), jsxs("div", {
197
209
  className: "flex flex-col flex-1 overflow-auto",
198
210
  style: {
199
- marginLeft: settings?.layout.navigationMode !== 'topbar' && settings?.regions.showMenu && settings?.layout.fixedSidebar && !isMobile && LAYOUT_ROOT != '/' ? collapsed ? '64px' : '256px' : '0px'
211
+ marginLeft: routeSettings?.layout.navigationMode !== 'topbar' && routeSettings?.regions.showMenu && routeSettings?.layout.fixedSidebar && !isMobile && LAYOUT_ROOT != '/' ? collapsed ? '64px' : '256px' : '0px'
200
212
  },
201
213
  children: [jsx(SettingDrawer, {
202
214
  primaryColor: primaryColor,
203
215
  settings: settings,
204
- onSettingChange: onSettingChange,
216
+ onSettingChange: newSettings => {
217
+ // Update settings for current route
218
+ if (actor) {
219
+ actor.send({
220
+ type: 'UPDATE',
221
+ value: newSettings
222
+ });
223
+ }
224
+ onSettingChange?.(newSettings);
225
+ },
205
226
  actor: actor,
206
- colorList: getThemeColors(settings?.theme)
227
+ colorList: getThemeColors(settings?.theme),
228
+ ...props
207
229
  }), jsxs("main", {
208
230
  className: "relative",
209
- children: [searchOptionsShown && settings?.regions?.searchBarOverlay && jsx("div", {
231
+ children: [searchOptionsShown && routeSettings?.regions?.searchBarOverlay && jsx("div", {
210
232
  className: "fixed inset-0 bg-black bg-opacity-50 z-30 cursor-pointer",
211
233
  onClick: e => {
212
234
  e.stopPropagation();
@@ -218,7 +240,7 @@ const BasicLayout = props => {
218
240
  className: footerFixed ? 'fixed bottom-0 w-full' : '',
219
241
  children: jsx(FooterSlot, {
220
242
  settings: settings,
221
- active: settings?.regions?.showFooter === undefined ? true : settings?.regions?.showFooter
243
+ active: routeSettings?.regions?.showFooter === undefined ? true : routeSettings?.regions?.showFooter
222
244
  })
223
245
  })]
224
246
  })]
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../src/components/Layout/BasicLayout/index.tsx"],"sourcesContent":[null],"names":[],"mappings":"owCAwBO,MAAM,mBAAmB,GAAG,CAAC;AAChC,EAAA,WAAW;uBAEI;AACX,EAAA;;AAEI,EAAA,MAAA,KAAA,GAAA,MAAa,EAAA;AACT,EAAA,SAAA,CAAA,MAAA;oBAAmB,CAAO,OAAA,IAAA,IAAA;;mBAEL,GAAA,CAAA,IAAA;AACrB,QAAA,IAAA,CAAA,CAAA,MAAI,OAAO;wBACI,EAAA;6BACd,CAAA,KAAA,CAAA;AACD,QAAA,IAAA,MAAA,CAAA,OAAU,GAAC,EAAA,EAAA;qBACI,CAAA,IAAA,CAAA;;AAEf,QAAA,IAAA,MAAA,CAAA,OAAU,GAAY,EAAA,EAAA;AAClB,UAAA,WAAA,CAAA,KAAA,CAAA;;AAER,QAAA,IAAA,MAAE,CAAA,WAAA,GAAA,MAAA,CAAA,OAAA,IAAA,QAAA,CAAA,IAAA,CAAA,YAAA,EAAA;AAEF,UAAA,gBAAuB,EAAA;AACvB;AACI,OAAA;AACJ,MAAA,MAAA,CAAC,gBAAC,CAAA,QAAA,EAAA,OAAA,CAAA;aACL,MAAA;QACA,MAAE,CAAA,mBAAA,CAAA,QAAA,EAAA,OAAA,CAAA;AACP,OAAA;AACJ;AAEA,GAAA,EAAA;AAQI,EAAA,OAAA,KAAQ;AACR;AACA,MAAA,sBAAwB,GAAK,CAAA,SAAG,EAAA,KAAA,KAAA;QAC5B;AACI,IAAA;AACA,G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AAA,EAAA;kBACQ,GAAA,eAAoB;uBAAyD,GAAA,aAAO,EAAA,OAAA,EAAA,eAAA,IAAA,EAAA;;;wBAE3F,CAAA,CAAA;IACL,SAAgB,EAAA;IAEhB,EAAM,EAAA,YAAA;AACF,IAAA,eAAA,EAAA;AACJ,GAAA,CAAA,CAAC;WAEK,CAAA,MAAA;;AAEN,IAAA,IAAE,UAAA,CAAA,OAAA,EAAA,YAAA,KAAA,UAAA,IAAA,YAAA,KAAA,UAAA,EAAA;MAEwC,MAAA,QAAA,GAAA;QACpC,GAAA,UAAA,CAAA,OAA4B;AAElC,QAAA;;AAsCgB,MAAA,eAAA,CAAA,QAAA,CAAA;AAgBI;yCAEiB,CAAA,CAAA;;AAEb;AACA;AACI;AACI;AACA;AACJ;AACX;;;;AASe,IAAA,MAAA,EAAA;AACA,GAAA,GAAA,gBAAA,EAAA;AACH,EAAA,MAAA;;AAEL,IAAA,MAAA,EAAA;AACJ,GAAA,GAAA,gBAAA,EAAA;;;AAYQ,IAAA,MAAA,EAAA;AAUI,GAAA,GAAA,gBAAA,EAAA;AACA,EAAA,MAAA,CAAA,WAAA,EAAA,cAAA,CAAA,GAAA,QAAE,CAAA,KAAA,CAAa;AAQnD,EAAE,SAAA,CAAA,MAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"Header.d.ts","sourceRoot":"","sources":["../../../../src/components/Layout/GlobalHeader/Header.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AAGvD,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,sBAAsB,GAAG,GAAG,CAyE/D,CAAC;AAEF,eAAe,YAAY,CAAC"}
1
+ {"version":3,"file":"Header.d.ts","sourceRoot":"","sources":["../../../../src/components/Layout/GlobalHeader/Header.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AAGvD,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,sBAAsB,GAAG,GAAG,CAsF/D,CAAC;AAEF,eAAe,YAAY,CAAC"}
@@ -6,7 +6,8 @@ import {jsx,jsxs}from'react/jsx-runtime';import React__default from'react';impor
6
6
  routeParams,
7
7
  collapsed,
8
8
  settings,
9
- toggleSideMenu
9
+ toggleSideMenu,
10
+ location
10
11
  } = props;
11
12
  const {
12
13
  MenuIcon,
@@ -15,14 +16,21 @@ import {jsx,jsxs}from'react/jsx-runtime';import React__default from'react';impor
15
16
  const {
16
17
  isMobile
17
18
  } = useMediaQuery();
19
+ const currentRoute = location?.pathname || '/';
20
+ const routeSettings = settings?.routeSettings?.[currentRoute] || {};
21
+ const headerElements = routeSettings?.regions?.headerElements || {
22
+ showLogo: true,
23
+ showSearchSlot: true,
24
+ showRightContent: true
25
+ };
18
26
  // Calculate header styles
19
27
  const headerStyles = React__default.useMemo(() => ({
20
28
  backgroundColor: settings?.navTheme === 'realDark' ? '#222' : 'white',
21
29
  color: settings?.navTheme === 'realDark' ? '#fff' : ''
22
30
  }), [settings]);
23
- if (!settings?.regions?.showHeader) return null;
31
+ if (!routeSettings?.regions?.showHeader) return null;
24
32
  return jsx("header", {
25
- className: `z-10 py-4 dark:bg-gray-800 top-0 border-b border-gray-200 ${settings?.layout?.fixedHeader ? 'sticky' : 'relative'}`,
33
+ className: `z-10 py-4 dark:bg-gray-800 top-0 border-b border-gray-200 ${routeSettings?.layout?.fixedHeader ? 'sticky' : 'relative'}`,
26
34
  style: headerStyles,
27
35
  children: jsxs("div", {
28
36
  className: "flex items-center justify-between h-full px-4 sm:px-6 mx-auto text-gray-700 dark:text-gray-200",
@@ -33,7 +41,7 @@ import {jsx,jsxs}from'react/jsx-runtime';import React__default from'react';impor
33
41
  children: jsx(MenuIcon, {
34
42
  className: "w-6 h-6"
35
43
  })
36
- }), jsx("div", {
44
+ }), headerElements.showLogo && jsx("div", {
37
45
  children: jsxs(Link, {
38
46
  to: "/",
39
47
  className: "ml-6 flex items-center gap-2.5 text-lg font-bold text-gray-800 dark:text-gray-200",
@@ -45,7 +53,7 @@ import {jsx,jsxs}from'react/jsx-runtime';import React__default from'react';impor
45
53
  children: settings?.title
46
54
  })]
47
55
  })
48
- }), settings?.regions?.searchBarRender && jsx("div", {
56
+ }), headerElements.showSearchSlot && routeSettings?.regions?.searchBarRender && jsx("div", {
49
57
  className: "flex-1 max-w-xl mx-4 hidden md:block",
50
58
  style: headerStyles,
51
59
  children: jsxs("div", {
@@ -64,7 +72,7 @@ import {jsx,jsxs}from'react/jsx-runtime';import React__default from'react';impor
64
72
  style: headerStyles
65
73
  })]
66
74
  })
67
- }), settings?.layout?.navigationMode != 'sidebar' && jsx(RightContent, {
75
+ }), headerElements.showRightContent && routeSettings?.layout?.navigationMode !== 'sidebar' && jsx(RightContent, {
68
76
  upperMenus: upperMenus,
69
77
  collapsed: collapsed,
70
78
  routeParams: routeParams,
@@ -1 +1 @@
1
- {"version":3,"file":"Header.js","sources":["../../../../src/components/Layout/GlobalHeader/Header.tsx"],"sourcesContent":[null],"names":[],"mappings":"wYAOa,MAAA,YAAY,GAA2C,KAAC,IAAS;AAC1E,EAAA,MAAA;AACA,IAAA,KAAA;AAEA,IAAA,MAAM;IAEN,UAA0B;IAC1B,WAAM;AAGM,IAAA,SAAA;AACA,IAAA,QAAA;AACqB,IAAA;AAIjC,GAAA,GAAA,KAAK;AAA+B,EAAA,MAAA;AACpC,IAAA,QACI;AAuDR,IAAE;AAEF,GAAA,GAAA,KAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"Header.js","sources":["../../../../src/components/Layout/GlobalHeader/Header.tsx"],"sourcesContent":[null],"names":[],"mappings":"wYAOa,MAAA,YAAY,GAA2C,KAAC,IAAS;AAC1E,EAAA,MAAA;AACA,IAAA,KAAA;AACA,IAAA,MAAM;AAEN,IAAA;IACA,WAAM;AACN,IAAA;AACI,IAAA,QAAA;AACA,IAAA,cAAA;AACA,IAAA;MACF,KAAA;QAEwB;IAC1B,QAAM;AAGM,IAAA;AACA,GAAA,GAAA,KAAA;AACqB,EAAA,MAC7B;AAGJ,IAAA;AAAyC,GAAA,GAAA,aAAW,EAAC;QAE9C,uBAEU,EAAA;AA2DrB,EAAE,MAAA,aAAA,GAAA,QAAA,EAAA,aAAA,GAAA,YAAA,CAAA,IAAA,EAAA;AAEF,EAAA,MAAA,8BAA4B,EAAA,OAAA,EAAA,cAAA,IAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"MainHeader.d.ts","sourceRoot":"","sources":["../../../../src/components/Layout/GlobalHeader/MainHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAa/B,OAAO,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAUpE,eAAO,MAAM,iBAAiB,SACpB,MAAM,KAAK,CAAC,YAAY,aACnB,GAAG,2BAEJ,GAAG,YACH,GAAG,KACd,KAAK,CAAC,SAQR,CAAC;AAEF,eAAO,MAAM,yBAAyB,UAC3B,GAAG,8BAEC,MAAM,KAClB,KAAK,CAAC,SAyCR,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,GAAG,kBAAkB,CA0LrE,CAAC"}
1
+ {"version":3,"file":"MainHeader.d.ts","sourceRoot":"","sources":["../../../../src/components/Layout/GlobalHeader/MainHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAa/B,OAAO,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAUpE,eAAO,MAAM,iBAAiB,SACpB,MAAM,KAAK,CAAC,YAAY,aACnB,GAAG,2BAEJ,GAAG,YACH,GAAG,KACd,KAAK,CAAC,SAQR,CAAC;AAEF,eAAO,MAAM,yBAAyB,UAC3B,GAAG,8BAEC,MAAM,KAClB,KAAK,CAAC,SAoCR,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,GAAG,kBAAkB,CAmMrE,CAAC"}
@@ -88,6 +88,13 @@ const MainHeader = props => {
88
88
  picture,
89
89
  componentVisibility
90
90
  } = props;
91
+ const currentRoute = location?.pathname || '/';
92
+ const routeSettings = settings?.routeSettings?.[currentRoute] || {};
93
+ const headerElements = routeSettings?.regions?.headerElements || {
94
+ showLogo: true,
95
+ showSearchSlot: true,
96
+ showRightContent: true
97
+ };
91
98
  // State to track reduced motion preference
92
99
  const [prefersReducedMotion, setPrefersReducedMotion] = useState(false);
93
100
  const [showSearchBar, setShowSearchBar] = useState(false);
@@ -107,18 +114,18 @@ const MainHeader = props => {
107
114
  }
108
115
  }, []);
109
116
  useEffect(() => {
110
- if (!settings?.regions?.searchBarRender) {
117
+ if (!routeSettings?.regions?.searchBarRender || !headerElements.showSearchSlot) {
111
118
  setShowSearchBar(false);
112
119
  return;
113
120
  }
114
- if (settings?.regions?.searchBarBehavior === SearchBarBehavior.ON_SCROLL) {
121
+ if (routeSettings?.regions?.searchBarBehavior === SearchBarBehavior.ON_SCROLL) {
115
122
  // Show search bar only when scrolling
116
123
  setShowSearchBar(componentVisibility['search-bar']);
117
124
  } else {
118
125
  // Show search bar by default when PERMANENT
119
126
  setShowSearchBar(true);
120
127
  }
121
- }, [componentVisibility['search-bar'], scrolled, settings?.regions?.searchBarRender, settings?.regions?.searchBarBehavior]);
128
+ }, [componentVisibility['search-bar'], scrolled, routeSettings?.regions?.searchBarRender, routeSettings?.regions?.searchBarBehavior, headerElements.showSearchSlot]);
122
129
  useLocation();
123
130
  // Use the state variable for animation
124
131
  const animation = prefersReducedMotion ? undefined : `${spin} infinite 20s linear`;
@@ -127,14 +134,14 @@ const MainHeader = props => {
127
134
  ...props
128
135
  }, animation, layout === 'mix' ? 'headerTitleRender' : undefined);
129
136
  return jsx(Fragment, {
130
- children: settings?.showHeader || settings?.showHeader === undefined ? jsx("div", {
137
+ children: routeSettings?.regions?.showHeader || routeSettings?.regions?.showHeader === undefined ? jsx("div", {
131
138
  className: `
132
139
  ${scrolled ? 'fixed' : 'absolute'}
133
140
  w-full top-0 z-10 px-[8%]
134
141
  ${scrolled ? 'py-2' : 'py-5'}
135
142
  ${searchOptionsShown ? 'pb-8' : ''}
136
- ${settings?.showHeader === undefined || true ? 'block' : 'hidden'}
137
- ${scrolled && settings?.navTheme === 'light' ? 'bg-white text-gray-900' : scrolled && settings?.navTheme === 'dark' ? 'bg-[#1f1f1f] text-white' : settings?.navTheme === 'dark' ? 'bg-[#1f1f1f] text-white' : 'bg-transparent'}
143
+ ${routeSettings?.regions?.showHeader === undefined || true ? 'block' : 'hidden'}
144
+ ${scrolled && routeSettings?.regions?.navTheme === 'light' ? 'bg-white text-gray-900' : scrolled && settings?.navTheme === 'dark' ? 'bg-[#1f1f1f] text-white' : settings?.navTheme === 'dark' ? 'bg-[#1f1f1f] text-white' : 'bg-transparent'}
138
145
  ${!scrolled ? '' : 'shadow-[0_4px_2px_-2px_rgba(0,0,0,.2)]'}
139
146
  transition-all duration-1000 ease-in-out
140
147
  group
@@ -146,16 +153,16 @@ const MainHeader = props => {
146
153
  className: "flex flex-col",
147
154
  children: jsxs("div", {
148
155
  className: `
149
- justify-around items-start ${settings?.regions?.searchBarRender ? 'pt-0' : 'pt-[7px]'}
150
- ${settings?.hidden ? 'hidden' : 'flex'}
156
+ justify-around items-start ${routeSettings?.regions?.searchBarRender ? 'pt-0' : 'pt-[7px]'}
157
+ ${routeSettings?.regions?.hidden ? 'hidden' : 'flex'}
151
158
  `,
152
- children: [jsx(Link, {
159
+ children: [headerElements.showLogo && jsx(Link, {
153
160
  to: "/",
154
161
  className: `${settings?.navTheme === 'dark' ? 'text-white' : 'text-gray-900'}`,
155
162
  children: headerDom
156
163
  }), jsx("div", {
157
164
  className: "flex-grow"
158
- }), jsxs("div", {
165
+ }), headerElements.showSearchSlot && jsxs("div", {
159
166
  className: "relative flex items-start justify-center",
160
167
  children: [jsx("div", {
161
168
  className: `transition-all duration-300 ease-in-out ${searchOptionsShown ? 'opacity-0 absolute' : 'opacity-100'}`,
@@ -174,13 +181,13 @@ const MainHeader = props => {
174
181
  listId: "navbar_searchbox",
175
182
  onClose: () => {
176
183
  setSearchOptionsShown(false);
177
- setShowSearchBar(settings?.regions?.searchBarBehavior !== SearchBarBehavior.ON_SCROLL || scrolled);
184
+ setShowSearchBar(routeSettings?.regions?.searchBarBehavior !== SearchBarBehavior.ON_SCROLL || scrolled);
178
185
  }
179
186
  }) : null
180
187
  })]
181
188
  }), jsx("div", {
182
189
  className: "flex-grow"
183
- }), jsxs("div", {
190
+ }), headerElements.showRightContent && jsxs("div", {
184
191
  className: "flex space-x-1 md:space-x-4",
185
192
  children: [jsx(RightContentSlot, {
186
193
  scrolled: scrolled,