@admin-layout/tailwind-design-pro 10.0.9-alpha.9 → 10.1.1-alpha.2
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/README.md +345 -1
- package/lib/cdm-locales/en/settings.json +35 -1
- package/lib/cdm-locales/es/settings.json +37 -3
- package/lib/components/Layout/BasicLayout/index.d.ts +1 -2
- package/lib/components/Layout/BasicLayout/index.d.ts.map +1 -1
- package/lib/components/Layout/BasicLayout/index.js +146 -42
- package/lib/components/Layout/BasicLayout/index.js.map +1 -1
- package/lib/components/Layout/BasicLayout/utils.d.ts.map +1 -1
- package/lib/components/Layout/BasicLayout/utils.js +1 -1
- package/lib/components/Layout/GlobalFooter/BottomMenuDropdown.d.ts +1 -8
- package/lib/components/Layout/GlobalFooter/BottomMenuDropdown.d.ts.map +1 -1
- package/lib/components/Layout/GlobalFooter/BottomMenuDropdown.js.map +1 -1
- package/lib/components/Layout/GlobalFooter/Copyright.d.ts.map +1 -1
- package/lib/components/Layout/GlobalFooter/Footer.d.ts.map +1 -1
- package/lib/components/Layout/GlobalHeader/Header.d.ts +2 -15
- package/lib/components/Layout/GlobalHeader/Header.d.ts.map +1 -1
- package/lib/components/Layout/GlobalHeader/Header.js +70 -38
- package/lib/components/Layout/GlobalHeader/Header.js.map +1 -1
- package/lib/components/Layout/GlobalHeader/Logo.d.ts +4 -0
- package/lib/components/Layout/GlobalHeader/Logo.d.ts.map +1 -0
- package/lib/components/Layout/GlobalHeader/Logo.js +141 -0
- package/lib/components/Layout/GlobalHeader/Logo.js.map +1 -0
- package/lib/components/Layout/GlobalHeader/MainHeader.d.ts +6 -0
- package/lib/components/Layout/GlobalHeader/MainHeader.d.ts.map +1 -0
- package/lib/components/Layout/GlobalHeader/MainHeader.js +230 -0
- package/lib/components/Layout/GlobalHeader/MainHeader.js.map +1 -0
- package/lib/components/Layout/GlobalHeader/OrganizationDropdown.d.ts +1 -12
- package/lib/components/Layout/GlobalHeader/OrganizationDropdown.d.ts.map +1 -1
- package/lib/components/Layout/GlobalHeader/OrganizationDropdown.js.map +1 -1
- package/lib/components/Layout/GlobalHeader/RightContent.d.ts +1 -13
- package/lib/components/Layout/GlobalHeader/RightContent.d.ts.map +1 -1
- package/lib/components/Layout/GlobalHeader/RightContent.js.map +1 -1
- package/lib/components/Layout/GlobalHeader/RightMenu.d.ts +4 -0
- package/lib/components/Layout/GlobalHeader/RightMenu.d.ts.map +1 -0
- package/lib/components/Layout/GlobalHeader/RightMenu.js +290 -0
- package/lib/components/Layout/GlobalHeader/RightMenu.js.map +1 -0
- package/lib/components/Layout/GlobalHeader/SearchBar.d.ts +9 -0
- package/lib/components/Layout/GlobalHeader/SearchBar.d.ts.map +1 -0
- package/lib/components/Layout/GlobalHeader/SearchBar.js +118 -0
- package/lib/components/Layout/GlobalHeader/SearchBar.js.map +1 -0
- package/lib/components/Layout/GlobalHeader/index.d.ts +4 -0
- package/lib/components/Layout/GlobalHeader/index.d.ts.map +1 -0
- package/lib/components/Layout/ProTailwindLayout.d.ts.map +1 -1
- package/lib/components/Layout/ProTailwindLayout.js +1 -2
- package/lib/components/Layout/ProTailwindLayout.js.map +1 -1
- package/lib/components/Layout/Sidebar/Divider.d.ts +1 -31
- package/lib/components/Layout/Sidebar/Divider.d.ts.map +1 -1
- package/lib/components/Layout/Sidebar/Divider.js.map +1 -1
- package/lib/components/Layout/Sidebar/DynamicIcon.d.ts +5 -0
- package/lib/components/Layout/Sidebar/DynamicIcon.d.ts.map +1 -0
- package/lib/components/Layout/Sidebar/DynamicIcon.js +51 -0
- package/lib/components/Layout/Sidebar/DynamicIcon.js.map +1 -0
- package/lib/components/Layout/Sidebar/Sidebar.d.ts +1 -12
- package/lib/components/Layout/Sidebar/Sidebar.d.ts.map +1 -1
- package/lib/components/Layout/Sidebar/Sidebar.js +108 -92
- package/lib/components/Layout/Sidebar/Sidebar.js.map +1 -1
- package/lib/components/Layout/Sidebar/SidebarMenu.d.ts.map +1 -1
- package/lib/components/Layout/Sidebar/SidebarMenu.js +110 -20
- package/lib/components/Layout/Sidebar/SidebarMenu.js.map +1 -1
- package/lib/components/Layout/TailwindLayout.d.ts.map +1 -1
- package/lib/components/Layout/TailwindLayout.js +29 -19
- package/lib/components/Layout/TailwindLayout.js.map +1 -1
- package/lib/components/Layout/getPageTitle.d.ts +1 -16
- package/lib/components/Layout/getPageTitle.d.ts.map +1 -1
- package/lib/components/Layout/getPageTitle.js +1 -1
- package/lib/components/Layout/getPageTitle.js.map +1 -1
- package/lib/components/Layout/slot-fill/AdditionalSettings.d.ts.map +1 -1
- package/lib/components/Layout/slot-fill/Footer.d.ts +1 -1
- package/lib/components/Layout/slot-fill/Footer.d.ts.map +1 -1
- package/lib/components/Layout/slot-fill/Footer.js +6 -6
- package/lib/components/Layout/slot-fill/Footer.js.map +1 -1
- package/lib/components/Layout/slot-fill/HeaderNotice.d.ts.map +1 -1
- package/lib/components/Layout/slot-fill/HeaderSearchBar.d.ts +3 -0
- package/lib/components/Layout/slot-fill/HeaderSearchBar.d.ts.map +1 -0
- package/lib/components/Layout/slot-fill/HeaderSearchBar.js +6 -0
- package/lib/components/Layout/slot-fill/HeaderSearchBar.js.map +1 -0
- package/lib/components/Layout/slot-fill/HeaderSearchButton.d.ts +3 -0
- package/lib/components/Layout/slot-fill/HeaderSearchButton.d.ts.map +1 -0
- package/lib/components/Layout/slot-fill/HeaderSearchButton.js +6 -0
- package/lib/components/Layout/slot-fill/HeaderSearchButton.js.map +1 -0
- package/lib/components/Layout/slot-fill/RightContent.d.ts +3 -0
- package/lib/components/Layout/slot-fill/RightContent.d.ts.map +1 -0
- package/lib/components/Layout/slot-fill/RightContent.js +6 -0
- package/lib/components/Layout/slot-fill/RightContent.js.map +1 -0
- package/lib/components/Layout/slot-fill/index.d.ts +3 -0
- package/lib/components/Layout/slot-fill/index.d.ts.map +1 -1
- package/lib/components/Layout/util.d.ts.map +1 -1
- package/lib/components/Layout/util.js +12 -0
- package/lib/components/Layout/util.js.map +1 -0
- package/lib/components/SettingDrawer/CheckBoxTheme.js +1 -1
- package/lib/components/SettingDrawer/LayoutChange.d.ts +1 -1
- package/lib/components/SettingDrawer/LayoutChange.d.ts.map +1 -1
- package/lib/components/SettingDrawer/LayoutChange.js +75 -17
- package/lib/components/SettingDrawer/LayoutChange.js.map +1 -1
- package/lib/components/SettingDrawer/NavigationsModes.d.ts +1 -1
- package/lib/components/SettingDrawer/NavigationsModes.d.ts.map +1 -1
- package/lib/components/SettingDrawer/NavigationsModes.js +18 -10
- package/lib/components/SettingDrawer/NavigationsModes.js.map +1 -1
- package/lib/components/SettingDrawer/RegionalSettings.d.ts.map +1 -1
- package/lib/components/SettingDrawer/RegionalSettings.js +685 -33
- package/lib/components/SettingDrawer/RegionalSettings.js.map +1 -1
- package/lib/components/SettingDrawer/SettingDrawer.d.ts +1 -1
- package/lib/components/SettingDrawer/SettingDrawer.d.ts.map +1 -1
- package/lib/components/SettingDrawer/SettingDrawer.js +164 -39
- package/lib/components/SettingDrawer/SettingDrawer.js.map +1 -1
- package/lib/components/SettingDrawer/WebFontsSelector.d.ts +3 -0
- package/lib/components/SettingDrawer/WebFontsSelector.d.ts.map +1 -0
- package/lib/components/SettingDrawer/WebFontsSelector.js +24 -0
- package/lib/components/SettingDrawer/WebFontsSelector.js.map +1 -0
- package/lib/components/SettingDrawer/types.d.ts +23 -2
- package/lib/components/SettingDrawer/types.d.ts.map +1 -1
- package/lib/components/ThemeProvider/ThemeProvider.d.ts +6 -16
- package/lib/components/ThemeProvider/ThemeProvider.d.ts.map +1 -1
- package/lib/components/ThemeProvider/ThemeProvider.js +26 -28
- package/lib/components/ThemeProvider/ThemeProvider.js.map +1 -1
- package/lib/components/ThemeProvider/ThemeToggle.js +50 -0
- package/lib/components/ThemeProvider/ThemeToggle.js.map +1 -0
- package/lib/components/ThemeProvider/index.d.ts +2 -5
- package/lib/components/ThemeProvider/index.d.ts.map +1 -1
- package/lib/components/ThemeProvider/themes/airbnb.d.ts +3 -0
- package/lib/components/ThemeProvider/themes/airbnb.d.ts.map +1 -0
- package/lib/components/ThemeProvider/themes/airbnb.js +186 -0
- package/lib/components/ThemeProvider/themes/airbnb.js.map +1 -0
- package/lib/components/ThemeProvider/themes/default.d.ts +3 -0
- package/lib/components/ThemeProvider/themes/default.d.ts.map +1 -0
- package/lib/components/ThemeProvider/themes/default.js +183 -0
- package/lib/components/ThemeProvider/themes/default.js.map +1 -0
- package/lib/components/ThemeProvider/themes/github.d.ts +3 -0
- package/lib/components/ThemeProvider/themes/github.d.ts.map +1 -0
- package/lib/components/ThemeProvider/themes/github.js +190 -0
- package/lib/components/ThemeProvider/themes/github.js.map +1 -0
- package/lib/components/ThemeProvider/themes/index.d.ts +15 -0
- package/lib/components/ThemeProvider/themes/index.d.ts.map +1 -0
- package/lib/components/ThemeProvider/themes/index.js +7 -0
- package/lib/components/ThemeProvider/themes/index.js.map +1 -0
- package/lib/components/ThemeProvider/themes/slack.d.ts +3 -0
- package/lib/components/ThemeProvider/themes/slack.d.ts.map +1 -0
- package/lib/components/ThemeProvider/themes/slack.js +188 -0
- package/lib/components/ThemeProvider/themes/slack.js.map +1 -0
- package/lib/components/ThemeProvider/themes/spotify.d.ts +3 -0
- package/lib/components/ThemeProvider/themes/spotify.d.ts.map +1 -0
- package/lib/components/ThemeProvider/themes/spotify.js +189 -0
- package/lib/components/ThemeProvider/themes/spotify.js.map +1 -0
- package/lib/components/ThemeProvider/types.d.ts +106 -106
- package/lib/components/ThemeProvider/types.d.ts.map +1 -1
- package/lib/components/UI/CardList.d.ts +61 -0
- package/lib/components/UI/CardList.d.ts.map +1 -0
- package/lib/components/UI/CardList.js +43 -0
- package/lib/components/UI/CardList.js.map +1 -0
- package/lib/components/UI/CategoriesTypeList.d.ts +29 -0
- package/lib/components/UI/CategoriesTypeList.d.ts.map +1 -0
- package/lib/components/UI/CategoriesTypeList.js +140 -0
- package/lib/components/UI/CategoriesTypeList.js.map +1 -0
- package/lib/components/UI/LazyLoadingGoogleMarker.d.ts +83 -0
- package/lib/components/UI/LazyLoadingGoogleMarker.d.ts.map +1 -0
- package/lib/components/UI/LazyLoadingGoogleMarker.js +107 -0
- package/lib/components/UI/LazyLoadingGoogleMarker.js.map +1 -0
- package/lib/components/UI/Pagination.d.ts +6 -0
- package/lib/components/UI/Pagination.d.ts.map +1 -0
- package/lib/components/UI/Pagination.js +59 -0
- package/lib/components/UI/Pagination.js.map +1 -0
- package/lib/components/UI/ParamSearchResultContainer.d.ts +101 -0
- package/lib/components/UI/ParamSearchResultContainer.d.ts.map +1 -0
- package/lib/components/UI/ParamSearchResultContainer.js +120 -0
- package/lib/components/UI/ParamSearchResultContainer.js.map +1 -0
- package/lib/components/UI/PropertyCard.d.ts +24 -0
- package/lib/components/UI/PropertyCard.d.ts.map +1 -0
- package/lib/components/UI/PropertyCard.js +375 -0
- package/lib/components/UI/PropertyCard.js.map +1 -0
- package/lib/components/UI/PropertyCardOnMap.d.ts +10 -0
- package/lib/components/UI/PropertyCardOnMap.d.ts.map +1 -0
- package/lib/components/UI/PropertyCardOnMap.js +108 -0
- package/lib/components/UI/PropertyCardOnMap.js.map +1 -0
- package/lib/components/UI/VehicleCard.d.ts +15 -0
- package/lib/components/UI/VehicleCard.d.ts.map +1 -0
- package/lib/components/UI/VehicleCardList.d.ts +14 -0
- package/lib/components/UI/VehicleCardList.d.ts.map +1 -0
- package/lib/components/UI/VehicleComponents/CarCardFooter.d.ts +7 -0
- package/lib/components/UI/VehicleComponents/CarCardFooter.d.ts.map +1 -0
- package/lib/components/UI/VehicleComponents/CarCardFooter.js +61 -0
- package/lib/components/UI/VehicleComponents/CarCardFooter.js.map +1 -0
- package/lib/components/UI/VehicleComponents/CarCardImage.d.ts +9 -0
- package/lib/components/UI/VehicleComponents/CarCardImage.d.ts.map +1 -0
- package/lib/components/UI/VehicleComponents/CarCardImage.js +32 -0
- package/lib/components/UI/VehicleComponents/CarCardImage.js.map +1 -0
- package/lib/components/UI/VehicleComponents/CarCardInfo.d.ts +13 -0
- package/lib/components/UI/VehicleComponents/CarCardInfo.d.ts.map +1 -0
- package/lib/components/UI/VehicleComponents/CarCardInfo.js +49 -0
- package/lib/components/UI/VehicleComponents/CarCardInfo.js.map +1 -0
- package/lib/components/UI/VehicleComponents/index.d.ts +4 -0
- package/lib/components/UI/VehicleComponents/index.d.ts.map +1 -0
- package/lib/components/UI/VehicleParamSearchResultContainer.d.ts +90 -0
- package/lib/components/UI/VehicleParamSearchResultContainer.d.ts.map +1 -0
- package/lib/components/UI/icons/LocationIcon.d.ts +7 -0
- package/lib/components/UI/icons/LocationIcon.d.ts.map +1 -0
- package/lib/components/UI/icons/LocationIcon.js +18 -0
- package/lib/components/UI/icons/LocationIcon.js.map +1 -0
- package/lib/components/UI/icons/index.d.ts +2 -0
- package/lib/components/UI/icons/index.d.ts.map +1 -0
- package/lib/components/UI/index.d.ts +9 -0
- package/lib/components/UI/index.d.ts.map +1 -0
- package/lib/components/UpdateSettingsResource/UpdateSettingsResource.server.d.ts +1 -1
- package/lib/components/UpdateSettingsResource/UpdateSettingsResource.server.d.ts.map +1 -1
- package/lib/components/index.d.ts +4 -0
- package/lib/components/index.d.ts.map +1 -0
- package/lib/components/index.js +1 -0
- package/lib/components/index.js.map +1 -0
- package/lib/components/typings.d.ts +133 -51
- package/lib/components/typings.d.ts.map +1 -1
- package/lib/components/typings.js +6 -0
- package/lib/components/typings.js.map +1 -0
- package/lib/config/constants.d.ts +8 -0
- package/lib/config/constants.d.ts.map +1 -0
- package/lib/config/constants.js +32 -0
- package/lib/config/constants.js.map +1 -0
- package/lib/config/env-config.d.ts +15 -0
- package/lib/config/env-config.d.ts.map +1 -1
- package/lib/config/env-config.js +66 -1
- package/lib/config/env-config.js.map +1 -1
- package/lib/helpers/DynamicIcon.d.ts +7 -4
- package/lib/helpers/DynamicIcon.d.ts.map +1 -1
- package/lib/helpers/DynamicIcon.js +51 -0
- package/lib/helpers/DynamicIcon.js.map +1 -0
- package/lib/hooks/index.d.ts +6 -0
- package/lib/hooks/index.d.ts.map +1 -0
- package/lib/hooks/use-get-current-lat-long.d.ts +18 -0
- package/lib/hooks/use-get-current-lat-long.d.ts.map +1 -0
- package/lib/hooks/use-get-current-lat-long.js +29 -0
- package/lib/hooks/use-get-current-lat-long.js.map +1 -0
- package/lib/hooks/useMediaQuery.d.ts +14 -0
- package/lib/hooks/useMediaQuery.d.ts.map +1 -0
- package/lib/hooks/useMediaQuery.js +48 -0
- package/lib/hooks/useMediaQuery.js.map +1 -0
- package/lib/hooks/useScrollThreshold.d.ts +12 -0
- package/lib/hooks/useScrollThreshold.d.ts.map +1 -0
- package/lib/hooks/useScrollThreshold.js +60 -0
- package/lib/hooks/useScrollThreshold.js.map +1 -0
- package/lib/hooks/useTailwindTheme.d.ts +34 -0
- package/lib/hooks/useTailwindTheme.d.ts.map +1 -0
- package/lib/hooks/useTailwindTheme.js +82 -0
- package/lib/hooks/useTailwindTheme.js.map +1 -0
- package/lib/hooks/useWindowSize.d.ts +6 -0
- package/lib/hooks/useWindowSize.d.ts.map +1 -0
- package/lib/hooks/useWindowSize.js +20 -0
- package/lib/hooks/useWindowSize.js.map +1 -0
- package/lib/icons.d.ts +2 -0
- package/lib/icons.d.ts.map +1 -1
- package/lib/icons.js +3 -4
- package/lib/icons.js.map +1 -1
- package/lib/index.d.ts +3 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +1 -1
- package/lib/index.js.map +1 -1
- package/lib/machines/settingsMachine.d.ts +4 -1
- package/lib/machines/settingsMachine.d.ts.map +1 -1
- package/lib/machines/settingsMachine.js +170 -120
- package/lib/machines/settingsMachine.js.map +1 -1
- package/lib/machines/types.d.ts +124 -17
- package/lib/machines/types.d.ts.map +1 -1
- package/lib/machines/types.js +5 -0
- package/lib/machines/types.js.map +1 -0
- package/lib/middlewares/airbnbDatasourcesMiddleware.d.ts +6 -0
- package/lib/middlewares/airbnbDatasourcesMiddleware.d.ts.map +1 -0
- package/lib/middlewares/bookingCarRentalMiddleware.d.ts +6 -0
- package/lib/middlewares/bookingCarRentalMiddleware.d.ts.map +1 -0
- package/lib/middlewares/bookingDatasourcesMiddleware.d.ts +7 -0
- package/lib/middlewares/bookingDatasourcesMiddleware.d.ts.map +1 -0
- package/lib/middlewares/datasourcesMiddleware.d.ts +6 -0
- package/lib/middlewares/datasourcesMiddleware.d.ts.map +1 -0
- package/lib/middlewares/pricelineDatasourcesMiddleware.d.ts +7 -0
- package/lib/middlewares/pricelineDatasourcesMiddleware.d.ts.map +1 -0
- package/lib/module.d.ts +0 -1
- package/lib/module.d.ts.map +1 -1
- package/lib/module.js +14 -15
- package/lib/module.js.map +1 -1
- package/lib/redux/index.d.ts +2 -0
- package/lib/redux/index.d.ts.map +1 -0
- package/lib/redux/searchReducer.d.ts +42 -0
- package/lib/redux/searchReducer.d.ts.map +1 -0
- package/lib/redux/searchReducer.js +64 -0
- package/lib/redux/searchReducer.js.map +1 -0
- package/lib/tailwindConfig.d.ts +42 -0
- package/lib/tailwindConfig.d.ts.map +1 -0
- package/lib/tailwindConfig.js +23 -0
- package/lib/tailwindConfig.js.map +1 -0
- package/lib/utils/formateCarData.d.ts +2 -0
- package/lib/utils/formateCarData.d.ts.map +1 -0
- package/lib/utils/menu.d.ts.map +1 -1
- package/lib/utils/test-utils.d.ts.map +1 -1
- package/lib/utils/utils/index.d.ts.map +1 -1
- package/package.json +6 -6
- package/lib/components/Layout/GlobalFooter/Copyright.js +0 -8
- package/lib/components/Layout/GlobalFooter/Copyright.js.map +0 -1
- package/lib/components/Layout/GlobalFooter/Footer.js +0 -22
- package/lib/components/Layout/GlobalFooter/Footer.js.map +0 -1
- package/lib/components/ThemeProvider/themeRegistry.d.ts +0 -3
- package/lib/components/ThemeProvider/themeRegistry.d.ts.map +0 -1
- package/lib/components/ThemeProvider/themeRegistry.js +0 -388
- package/lib/components/ThemeProvider/themeRegistry.js.map +0 -1
- package/lib/components/ThemeProvider/themeUtils.d.ts +0 -26
- package/lib/components/ThemeProvider/themeUtils.d.ts.map +0 -1
- package/lib/components/ThemeProvider/themeUtils.js +0 -135
- package/lib/components/ThemeProvider/themeUtils.js.map +0 -1
- package/lib/components/defaultSettings.d.ts +0 -4
- package/lib/components/defaultSettings.d.ts.map +0 -1
- package/lib/components/defaultSettings.js +0 -14
- package/lib/components/defaultSettings.js.map +0 -1
package/README.md
CHANGED
|
@@ -1 +1,345 @@
|
|
|
1
|
-
# Tailwind
|
|
1
|
+
# Tailwind Design Pro
|
|
2
|
+
|
|
3
|
+
A universal tailwind design system for use across all projects.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
- Unified theme system with light and dark mode support
|
|
8
|
+
- Consistent styling across all projects
|
|
9
|
+
- Easy to customize and extend
|
|
10
|
+
- Built-in typography, forms, and aspect ratio support
|
|
11
|
+
|
|
12
|
+
## Usage in Servers
|
|
13
|
+
|
|
14
|
+
To use this package in your server project, follow these steps:
|
|
15
|
+
|
|
16
|
+
### 1. Install the package
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
npm install @admin-layout/tailwind-design-pro
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
### 2. Use the Universal Tailwind Config
|
|
23
|
+
|
|
24
|
+
Create a `tailwind.config.js` or `tailwind.config.ts` file in your server project and import the universal config:
|
|
25
|
+
|
|
26
|
+
```typescript
|
|
27
|
+
// tailwind.config.ts or tailwind.config.js
|
|
28
|
+
import { themeConfig } from '@admin-layout/tailwind-design-pro';
|
|
29
|
+
|
|
30
|
+
export default {
|
|
31
|
+
// Override content paths to include server-specific paths
|
|
32
|
+
content: [
|
|
33
|
+
'./src/**/{**,.client,.server}/**/*.{js,jsx,ts,tsx}',
|
|
34
|
+
'./app/**/{**,.client,.server}/**/*.{js,jsx,ts,tsx}',
|
|
35
|
+
'../../packages/**/*.{js,jsx,ts,tsx}',
|
|
36
|
+
'../../packages-modules/**/*.{js,jsx,ts,tsx}',
|
|
37
|
+
],
|
|
38
|
+
|
|
39
|
+
// You can add server-specific overrides here if needed
|
|
40
|
+
theme: {
|
|
41
|
+
extend: {
|
|
42
|
+
// Any server-specific extensions would go here
|
|
43
|
+
...themeConfig,
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
darkMode: 'class',
|
|
47
|
+
variants: {
|
|
48
|
+
typography: ['dark'],
|
|
49
|
+
},
|
|
50
|
+
plugins: [typography, forms, aspectRatio],
|
|
51
|
+
};
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
# Theme System Documentation
|
|
55
|
+
|
|
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:
|
|
149
|
+
|
|
150
|
+
```tsx
|
|
151
|
+
import { ThemeProviderTailwind } from 'packages/tailwind-design-pro/src/components/ThemeProvider';
|
|
152
|
+
|
|
153
|
+
const App = () => {
|
|
154
|
+
const settings = {
|
|
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'
|
|
160
|
+
};
|
|
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
|
+
|
|
176
|
+
return (
|
|
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>
|
|
194
|
+
);
|
|
195
|
+
};
|
|
196
|
+
```
|
|
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
|
+
|
|
281
|
+
## Theme Customization
|
|
282
|
+
|
|
283
|
+
### Creating a Custom Theme
|
|
284
|
+
|
|
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:
|
|
340
|
+
|
|
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
|
|
@@ -5,6 +5,8 @@
|
|
|
5
5
|
"header": "Header",
|
|
6
6
|
"footer": "Footer",
|
|
7
7
|
"search_bar": "Search Bar",
|
|
8
|
+
"search_bar_on_scroll": "Show Search Bar on Scroll",
|
|
9
|
+
"search_bar_overlay": "Show Overlay on Search",
|
|
8
10
|
"menu": "Menu",
|
|
9
11
|
"menu_header": "Menu Header",
|
|
10
12
|
"setting": "Setting",
|
|
@@ -15,5 +17,37 @@
|
|
|
15
17
|
"other_setting": "Other Setting",
|
|
16
18
|
"weak_mode": "Weak Mode",
|
|
17
19
|
"light": "Light",
|
|
18
|
-
"dark": "Dark"
|
|
20
|
+
"dark": "Dark",
|
|
21
|
+
"font_family": "Font Family",
|
|
22
|
+
"select_theme": "Select Theme",
|
|
23
|
+
"scroll_threshold": "Searchbar Scroll Threshold",
|
|
24
|
+
"menu_divider_names": "Menu Divider Names",
|
|
25
|
+
"upper_menu_divider": "Upper Menu Divider",
|
|
26
|
+
"middle_menu_divider": "Middle 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",
|
|
32
|
+
"desktop_settings": "Desktop Settings",
|
|
33
|
+
"mobile_settings": "Mobile Settings",
|
|
34
|
+
"show_menu_toggle": "Show Menu Toggle",
|
|
35
|
+
"show_back_button": "Show Back Button",
|
|
36
|
+
"show_page_title": "Show Page Title",
|
|
37
|
+
"show_action_buttons": "Show Action Buttons",
|
|
38
|
+
"show_header": "Show Header",
|
|
39
|
+
"background_color": "Background Color",
|
|
40
|
+
"background_type": "Background Type",
|
|
41
|
+
"background": "Background",
|
|
42
|
+
"color": "Color",
|
|
43
|
+
"image": "Image",
|
|
44
|
+
"video": "Video",
|
|
45
|
+
"image_url": "Image URL",
|
|
46
|
+
"video_url": "Video URL",
|
|
47
|
+
"video_thumbnail": "Video Thumbnail URL",
|
|
48
|
+
"desktop_background": "Desktop Background",
|
|
49
|
+
"mobile_background": "Mobile Background",
|
|
50
|
+
"device_settings": "Device Settings",
|
|
51
|
+
"desktop_tab": "Desktop",
|
|
52
|
+
"mobile_tab": "Mobile"
|
|
19
53
|
}
|
|
@@ -5,15 +5,49 @@
|
|
|
5
5
|
"header": "Encabezado",
|
|
6
6
|
"footer": "Pie de Página",
|
|
7
7
|
"search_bar": "Barra de Búsqueda",
|
|
8
|
+
"search_bar_on_scroll": "Mostrar Barra de Búsqueda al Desplazar",
|
|
9
|
+
"search_bar_overlay": "Mostrar Superposición en Búsqueda",
|
|
8
10
|
"menu": "Menú",
|
|
9
11
|
"menu_header": "Encabezado del Menú",
|
|
10
12
|
"setting": "Configuración",
|
|
11
|
-
"page_style_settings": "
|
|
13
|
+
"page_style_settings": "Configuración de Estilo de Página",
|
|
12
14
|
"theme_color": "Color del Tema",
|
|
13
15
|
"navigation_mode": "Modo de Navegación",
|
|
14
|
-
"regional_rettings": "
|
|
16
|
+
"regional_rettings": "Configuración Regional",
|
|
15
17
|
"other_setting": "Otra Configuración",
|
|
16
18
|
"weak_mode": "Modo Débil",
|
|
17
19
|
"light": "Claro",
|
|
18
|
-
"dark": "Oscuro"
|
|
20
|
+
"dark": "Oscuro",
|
|
21
|
+
"font_family": "Familia de Fuente",
|
|
22
|
+
"select_theme": "Seleccionar Tema",
|
|
23
|
+
"scroll_threshold": "Umbral de Desplazamiento de la Barra de Búsqueda",
|
|
24
|
+
"menu_divider_names": "Nombres de Divisores de Menú",
|
|
25
|
+
"upper_menu_divider": "Divisor Superior del Menú",
|
|
26
|
+
"middle_menu_divider": "Divisor Medio del Menú",
|
|
27
|
+
"lower_menu_divider": "Divisor Inferior del Menú",
|
|
28
|
+
"header_elements": "Elementos del Encabezado",
|
|
29
|
+
"show_logo": "Mostrar Logo",
|
|
30
|
+
"show_search_slot": "Mostrar Espacio de Búsqueda",
|
|
31
|
+
"show_right_content": "Mostrar Contenido Derecho",
|
|
32
|
+
"desktop_settings": "Configuración de Escritorio",
|
|
33
|
+
"mobile_settings": "Configuración Móvil",
|
|
34
|
+
"show_menu_toggle": "Mostrar Alternador de Menú",
|
|
35
|
+
"show_back_button": "Mostrar Botón Atrás",
|
|
36
|
+
"show_page_title": "Mostrar Título de Página",
|
|
37
|
+
"show_action_buttons": "Mostrar Botones de Acción",
|
|
38
|
+
"show_header": "Mostrar Encabezado",
|
|
39
|
+
"background_color": "Color de Fondo",
|
|
40
|
+
"background_type": "Tipo de Fondo",
|
|
41
|
+
"background": "Fondo",
|
|
42
|
+
"color": "Color",
|
|
43
|
+
"image": "Imagen",
|
|
44
|
+
"video": "Video",
|
|
45
|
+
"image_url": "URL de Imagen",
|
|
46
|
+
"video_url": "URL de Video",
|
|
47
|
+
"video_thumbnail": "URL de Miniatura de Video",
|
|
48
|
+
"desktop_background": "Fondo de Escritorio",
|
|
49
|
+
"mobile_background": "Fondo Móvil",
|
|
50
|
+
"device_settings": "Configuración de Dispositivo",
|
|
51
|
+
"desktop_tab": "Escritorio",
|
|
52
|
+
"mobile_tab": "Móvil"
|
|
19
53
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { BasicLayoutProps, GlobalHeaderProps } from '@admin-layout/client';
|
|
3
|
-
export declare const useHorizontalScroll: ({
|
|
4
|
-
scrolled: any;
|
|
3
|
+
export declare const useHorizontalScroll: ({ setScrolled, setSearchOptionsShown, onScrollReachEnd }: {
|
|
5
4
|
setScrolled: any;
|
|
6
5
|
setSearchOptionsShown: any;
|
|
7
6
|
onScrollReachEnd: any;
|
|
@@ -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,
|
|
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;AAU9B,eAAO,MAAM,mBAAmB,GAAI;;;;CAAwD,sCAkC3F,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,CA8Q3F,CAAC"}
|