@admin-layout/tailwind-design-pro 10.1.1-alpha.9 → 11.2.1-alpha.1
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 +376 -250
- package/lib/cdm-locales/en/menu.json +2 -1
- package/lib/cdm-locales/en/settings.json +6 -1
- package/lib/cdm-locales/es/menu.json +2 -1
- package/lib/cdm-locales/es/settings.json +6 -1
- package/lib/cdm-locales/index.d.ts +2 -0
- package/lib/cdm-locales/index.d.ts.map +1 -0
- package/lib/cdm-locales/index.ts +1 -0
- package/lib/components/LanguageMenu/LanguageMenu.d.ts +2 -1
- package/lib/components/LanguageMenu/LanguageMenu.d.ts.map +1 -1
- package/lib/components/LanguageMenu/LanguageMenu.js +40 -61
- package/lib/components/LanguageMenu/LanguageMenu.js.map +1 -1
- package/lib/components/Layout/BasicLayout/index.d.ts +6 -5
- package/lib/components/Layout/BasicLayout/index.d.ts.map +1 -1
- package/lib/components/Layout/BasicLayout/index.js +255 -175
- package/lib/components/Layout/BasicLayout/index.js.map +1 -1
- package/lib/components/Layout/BasicLayout/utils.d.ts +4 -2
- package/lib/components/Layout/BasicLayout/utils.d.ts.map +1 -1
- package/lib/components/Layout/BasicLayout/utils.js +80 -109
- package/lib/components/Layout/BasicLayout/utils.js.map +1 -1
- package/lib/components/Layout/GlobalFooter/BottomMenuDropdown.d.ts.map +1 -1
- package/lib/components/Layout/GlobalFooter/BottomMenuDropdown.js +28 -38
- package/lib/components/Layout/GlobalFooter/BottomMenuDropdown.js.map +1 -1
- package/lib/components/Layout/GlobalFooter/Copyright.d.ts +2 -1
- package/lib/components/Layout/GlobalFooter/Copyright.d.ts.map +1 -1
- package/lib/components/Layout/GlobalFooter/Footer.d.ts +2 -1
- package/lib/components/Layout/GlobalFooter/Footer.d.ts.map +1 -1
- package/lib/components/Layout/GlobalHeader/Header.d.ts +0 -1
- package/lib/components/Layout/GlobalHeader/Header.d.ts.map +1 -1
- package/lib/components/Layout/GlobalHeader/Header.js +82 -66
- package/lib/components/Layout/GlobalHeader/Header.js.map +1 -1
- package/lib/components/Layout/GlobalHeader/MainHeader.d.ts +0 -2
- package/lib/components/Layout/GlobalHeader/MainHeader.d.ts.map +1 -1
- package/lib/components/Layout/GlobalHeader/MainHeader.js +119 -162
- package/lib/components/Layout/GlobalHeader/MainHeader.js.map +1 -1
- package/lib/components/Layout/GlobalHeader/OrganizationDropdown.d.ts.map +1 -1
- package/lib/components/Layout/GlobalHeader/OrganizationDropdown.js +26 -30
- package/lib/components/Layout/GlobalHeader/OrganizationDropdown.js.map +1 -1
- package/lib/components/Layout/GlobalHeader/RightContent.d.ts +1 -0
- package/lib/components/Layout/GlobalHeader/RightContent.d.ts.map +1 -1
- package/lib/components/Layout/GlobalHeader/RightContent.js +82 -19
- package/lib/components/Layout/GlobalHeader/RightContent.js.map +1 -1
- package/lib/components/Layout/GlobalHeader/RightMenu.d.ts.map +1 -1
- package/lib/components/Layout/GlobalHeader/RightMenu.js +116 -158
- package/lib/components/Layout/GlobalHeader/RightMenu.js.map +1 -1
- package/lib/components/Layout/GlobalHeader/SearchBar.d.ts.map +1 -1
- package/lib/components/Layout/GlobalHeader/SearchBar.js +36 -45
- package/lib/components/Layout/GlobalHeader/SearchBar.js.map +1 -1
- package/lib/components/Layout/GlobalHeader/index.d.ts +0 -1
- package/lib/components/Layout/GlobalHeader/index.d.ts.map +1 -1
- package/lib/components/Layout/ProTailwindLayout.d.ts +2 -2
- package/lib/components/Layout/ProTailwindLayout.d.ts.map +1 -1
- package/lib/components/Layout/ProTailwindLayout.js +70 -9
- package/lib/components/Layout/ProTailwindLayout.js.map +1 -1
- package/lib/components/Layout/Sidebar/BottomMenu.d.ts +4 -0
- package/lib/components/Layout/Sidebar/BottomMenu.d.ts.map +1 -0
- package/lib/components/Layout/Sidebar/BottomMenu.js +294 -0
- package/lib/components/Layout/Sidebar/BottomMenu.js.map +1 -0
- package/lib/components/Layout/Sidebar/Divider.d.ts +2 -1
- package/lib/components/Layout/Sidebar/Divider.d.ts.map +1 -1
- package/lib/components/Layout/Sidebar/Divider.js +26 -28
- package/lib/components/Layout/Sidebar/Divider.js.map +1 -1
- package/lib/components/Layout/Sidebar/DynamicIcon.d.ts +1 -1
- package/lib/components/Layout/Sidebar/DynamicIcon.d.ts.map +1 -1
- package/lib/components/Layout/Sidebar/DynamicIcon.js +10 -11
- package/lib/components/Layout/Sidebar/DynamicIcon.js.map +1 -1
- package/lib/components/Layout/Sidebar/MainSidebar.d.ts +5 -0
- package/lib/components/Layout/Sidebar/MainSidebar.d.ts.map +1 -0
- package/lib/components/Layout/Sidebar/MainSidebar.js +224 -0
- package/lib/components/Layout/Sidebar/MainSidebar.js.map +1 -0
- package/lib/components/Layout/Sidebar/MainSidebarMenu.d.ts +6 -0
- package/lib/components/Layout/Sidebar/MainSidebarMenu.d.ts.map +1 -0
- package/lib/components/Layout/Sidebar/MainSidebarMenu.js +451 -0
- package/lib/components/Layout/Sidebar/MainSidebarMenu.js.map +1 -0
- package/lib/components/Layout/Sidebar/PerplexSidebar.d.ts +4 -0
- package/lib/components/Layout/Sidebar/PerplexSidebar.d.ts.map +1 -0
- package/lib/components/Layout/Sidebar/PerplexSidebar.js +254 -0
- package/lib/components/Layout/Sidebar/PerplexSidebar.js.map +1 -0
- package/lib/components/Layout/Sidebar/PerplexSidebarMenu.d.ts +4 -0
- package/lib/components/Layout/Sidebar/PerplexSidebarMenu.d.ts.map +1 -0
- package/lib/components/Layout/Sidebar/PerplexSidebarMenu.js +318 -0
- package/lib/components/Layout/Sidebar/PerplexSidebarMenu.js.map +1 -0
- package/lib/components/Layout/TailwindLayout.d.ts.map +1 -1
- package/lib/components/Layout/TailwindLayout.js +37 -20
- package/lib/components/Layout/TailwindLayout.js.map +1 -1
- package/lib/components/Layout/getPageTitle.js.map +1 -1
- package/lib/components/Layout/slot-fill/AdditionalSettings.d.ts +3 -2
- package/lib/components/Layout/slot-fill/AdditionalSettings.d.ts.map +1 -1
- package/lib/components/Layout/slot-fill/AdditionalSettings.js +2 -2
- package/lib/components/Layout/slot-fill/AdditionalSettings.js.map +1 -1
- package/lib/components/Layout/slot-fill/Footer.d.ts +3 -2
- package/lib/components/Layout/slot-fill/Footer.d.ts.map +1 -1
- package/lib/components/Layout/slot-fill/Footer.js +2 -2
- package/lib/components/Layout/slot-fill/Footer.js.map +1 -1
- package/lib/components/Layout/slot-fill/HeaderNotice.d.ts +3 -2
- package/lib/components/Layout/slot-fill/HeaderNotice.d.ts.map +1 -1
- package/lib/components/Layout/slot-fill/HeaderNotice.js +7 -0
- package/lib/components/Layout/slot-fill/HeaderNotice.js.map +1 -0
- package/lib/components/Layout/slot-fill/HeaderSearchBar.d.ts +2 -1
- package/lib/components/Layout/slot-fill/HeaderSearchBar.d.ts.map +1 -1
- package/lib/components/Layout/slot-fill/HeaderSearchBar.js +2 -2
- package/lib/components/Layout/slot-fill/HeaderSearchBar.js.map +1 -1
- package/lib/components/Layout/slot-fill/HeaderSearchButton.d.ts +2 -1
- package/lib/components/Layout/slot-fill/HeaderSearchButton.d.ts.map +1 -1
- package/lib/components/Layout/slot-fill/HeaderSearchButton.js +2 -2
- package/lib/components/Layout/slot-fill/HeaderSearchButton.js.map +1 -1
- package/lib/components/Layout/slot-fill/Logo.d.ts +5 -0
- package/lib/components/Layout/slot-fill/Logo.d.ts.map +1 -0
- package/lib/components/Layout/slot-fill/Logo.js +7 -0
- package/lib/components/Layout/slot-fill/Logo.js.map +1 -0
- package/lib/components/Layout/slot-fill/RightContent.d.ts +2 -1
- package/lib/components/Layout/slot-fill/RightContent.d.ts.map +1 -1
- package/lib/components/Layout/slot-fill/RightContent.js +2 -2
- package/lib/components/Layout/slot-fill/RightContent.js.map +1 -1
- package/lib/components/Layout/slot-fill/SideMenuLogo.d.ts +5 -0
- package/lib/components/Layout/slot-fill/SideMenuLogo.d.ts.map +1 -0
- package/lib/components/Layout/slot-fill/SideMenuLogo.js +7 -0
- package/lib/components/Layout/slot-fill/SideMenuLogo.js.map +1 -0
- package/lib/components/Layout/slot-fill/index.d.ts +2 -0
- package/lib/components/Layout/slot-fill/index.d.ts.map +1 -1
- package/lib/components/Layout/util.js +1 -1
- package/lib/components/Layout/util.js.map +1 -1
- package/lib/components/SettingDrawer/SettingDrawer.d.ts +2 -2
- package/lib/components/SettingDrawer/SettingDrawer.d.ts.map +1 -1
- package/lib/components/SettingDrawer/SettingDrawer.js +190 -499
- package/lib/components/SettingDrawer/SettingDrawer.js.map +1 -1
- package/lib/components/SettingDrawer/components/ApplyToAllRoutesToggle.d.ts +8 -0
- package/lib/components/SettingDrawer/components/ApplyToAllRoutesToggle.d.ts.map +1 -0
- package/lib/components/SettingDrawer/components/ApplyToAllRoutesToggle.js +21 -0
- package/lib/components/SettingDrawer/components/ApplyToAllRoutesToggle.js.map +1 -0
- package/lib/components/SettingDrawer/components/CheckBoxTheme.d.ts +4 -0
- package/lib/components/SettingDrawer/components/CheckBoxTheme.d.ts.map +1 -0
- package/lib/components/SettingDrawer/components/CheckBoxTheme.js +119 -0
- package/lib/components/SettingDrawer/components/CheckBoxTheme.js.map +1 -0
- package/lib/components/SettingDrawer/components/DeviceTabs.d.ts +8 -0
- package/lib/components/SettingDrawer/components/DeviceTabs.d.ts.map +1 -0
- package/lib/components/SettingDrawer/components/DeviceTabs.js +74 -0
- package/lib/components/SettingDrawer/components/DeviceTabs.js.map +1 -0
- package/lib/components/SettingDrawer/components/InvitationSettings.d.ts +4 -0
- package/lib/components/SettingDrawer/components/InvitationSettings.d.ts.map +1 -0
- package/lib/components/SettingDrawer/components/InvitationSettings.js +72 -0
- package/lib/components/SettingDrawer/components/InvitationSettings.js.map +1 -0
- package/lib/components/SettingDrawer/components/LayoutChange.d.ts +4 -0
- package/lib/components/SettingDrawer/components/LayoutChange.d.ts.map +1 -0
- package/lib/components/SettingDrawer/components/LayoutChange.js +111 -0
- package/lib/components/SettingDrawer/components/LayoutChange.js.map +1 -0
- package/lib/components/SettingDrawer/components/MenuVisibilitySettings.d.ts +21 -0
- package/lib/components/SettingDrawer/components/MenuVisibilitySettings.d.ts.map +1 -0
- package/lib/components/SettingDrawer/components/MenuVisibilitySettings.js +106 -0
- package/lib/components/SettingDrawer/components/MenuVisibilitySettings.js.map +1 -0
- package/lib/components/SettingDrawer/components/NavigationsModes.d.ts +4 -0
- package/lib/components/SettingDrawer/components/NavigationsModes.d.ts.map +1 -0
- package/lib/components/SettingDrawer/components/NavigationsModes.js +322 -0
- package/lib/components/SettingDrawer/components/NavigationsModes.js.map +1 -0
- package/lib/components/SettingDrawer/components/RegionalSettings.d.ts +4 -0
- package/lib/components/SettingDrawer/components/RegionalSettings.d.ts.map +1 -0
- package/lib/components/SettingDrawer/components/RegionalSettings.js +519 -0
- package/lib/components/SettingDrawer/components/RegionalSettings.js.map +1 -0
- package/lib/components/SettingDrawer/components/SettingsActions.d.ts +13 -0
- package/lib/components/SettingDrawer/components/SettingsActions.d.ts.map +1 -0
- package/lib/components/SettingDrawer/components/SettingsActions.js +42 -0
- package/lib/components/SettingDrawer/components/SettingsActions.js.map +1 -0
- package/lib/components/SettingDrawer/components/SettingsDrawerHeader.d.ts +5 -0
- package/lib/components/SettingDrawer/components/SettingsDrawerHeader.d.ts.map +1 -0
- package/lib/components/SettingDrawer/components/SettingsDrawerHeader.js +22 -0
- package/lib/components/SettingDrawer/components/SettingsDrawerHeader.js.map +1 -0
- package/lib/components/SettingDrawer/components/Switch.d.ts +4 -0
- package/lib/components/SettingDrawer/components/Switch.d.ts.map +1 -0
- package/lib/components/SettingDrawer/components/Switch.js +20 -0
- package/lib/components/SettingDrawer/components/Switch.js.map +1 -0
- package/lib/components/SettingDrawer/components/ThemeColor.d.ts +4 -0
- package/lib/components/SettingDrawer/components/ThemeColor.d.ts.map +1 -0
- package/lib/components/SettingDrawer/components/ThemeColor.js +45 -0
- package/lib/components/SettingDrawer/components/ThemeColor.js.map +1 -0
- package/lib/components/SettingDrawer/components/ThemeSelector.d.ts +4 -0
- package/lib/components/SettingDrawer/components/ThemeSelector.d.ts.map +1 -0
- package/lib/components/SettingDrawer/components/ThemeSelector.js +16 -0
- package/lib/components/SettingDrawer/components/ThemeSelector.js.map +1 -0
- package/lib/components/SettingDrawer/components/WebFontsSelector.d.ts +4 -0
- package/lib/components/SettingDrawer/components/WebFontsSelector.d.ts.map +1 -0
- package/lib/components/SettingDrawer/components/WebFontsSelector.js +22 -0
- package/lib/components/SettingDrawer/components/WebFontsSelector.js.map +1 -0
- package/lib/components/SettingDrawer/hooks/useSettingsOperations.d.ts +18 -0
- package/lib/components/SettingDrawer/hooks/useSettingsOperations.d.ts.map +1 -0
- package/lib/components/SettingDrawer/hooks/useSettingsOperations.js +115 -0
- package/lib/components/SettingDrawer/hooks/useSettingsOperations.js.map +1 -0
- package/lib/components/SettingDrawer/utils/constants.d.ts +11 -0
- package/lib/components/SettingDrawer/utils/constants.d.ts.map +1 -0
- package/lib/components/SettingDrawer/utils/constants.js +77 -0
- package/lib/components/SettingDrawer/utils/constants.js.map +1 -0
- package/lib/components/SettingDrawer/utils/helper.d.ts +37 -0
- package/lib/components/SettingDrawer/utils/helper.d.ts.map +1 -0
- package/lib/components/SettingDrawer/utils/helper.js +154 -0
- package/lib/components/SettingDrawer/utils/helper.js.map +1 -0
- package/lib/components/SettingDrawer/utils/transformers.d.ts +15 -0
- package/lib/components/SettingDrawer/utils/transformers.d.ts.map +1 -0
- package/lib/components/SettingDrawer/utils/transformers.js +73 -0
- package/lib/components/SettingDrawer/utils/transformers.js.map +1 -0
- package/lib/components/SettingDrawer/{types.d.ts → utils/types.d.ts} +14 -0
- package/lib/components/SettingDrawer/utils/types.d.ts.map +1 -0
- package/lib/components/UpdateSettingsResource/UpdateSettingsResource.server.d.ts +13 -4
- package/lib/components/UpdateSettingsResource/UpdateSettingsResource.server.d.ts.map +1 -1
- package/lib/components/UpdateSettingsResource/UpdateSettingsResource.server.js +97 -4
- package/lib/components/UpdateSettingsResource/UpdateSettingsResource.server.js.map +1 -1
- package/lib/components/index.d.ts +0 -2
- package/lib/components/index.d.ts.map +1 -1
- package/lib/components/index.js +1 -1
- package/lib/components/typings.d.ts +20 -6
- package/lib/components/typings.d.ts.map +1 -1
- package/lib/compute.d.ts.map +1 -1
- package/lib/compute.js +10 -2
- package/lib/compute.js.map +1 -1
- package/lib/config/analytics-config.d.ts +59 -0
- package/lib/config/analytics-config.d.ts.map +1 -0
- package/lib/config/constants.js.map +1 -1
- package/lib/config/env-config.d.ts +6 -0
- package/lib/config/env-config.d.ts.map +1 -1
- package/lib/config/env-config.js +21 -1
- package/lib/config/env-config.js.map +1 -1
- package/lib/config/index.d.ts +3 -0
- package/lib/config/index.d.ts.map +1 -0
- package/lib/helpers/DynamicIcon.d.ts +1 -1
- package/lib/helpers/DynamicIcon.d.ts.map +1 -1
- package/lib/helpers/DynamicIcon.js +16 -17
- package/lib/helpers/DynamicIcon.js.map +1 -1
- package/lib/hooks/index.d.ts +0 -3
- package/lib/hooks/index.d.ts.map +1 -1
- package/lib/hooks/useMediaQuery.js.map +1 -1
- package/lib/hooks/useScrollThreshold.js.map +1 -1
- package/lib/hooks/useTailwindTheme.js.map +1 -1
- package/lib/icons.d.ts +2 -0
- package/lib/icons.d.ts.map +1 -1
- package/lib/icons.js +4 -2
- package/lib/icons.js.map +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +1 -1
- package/lib/index.js.map +1 -1
- package/lib/machines/selectors.d.ts +118 -0
- package/lib/machines/selectors.d.ts.map +1 -0
- package/lib/machines/settingsMachine.d.ts +25 -2
- package/lib/machines/settingsMachine.d.ts.map +1 -1
- package/lib/machines/settingsMachine.js +133 -168
- package/lib/machines/settingsMachine.js.map +1 -1
- package/lib/machines/types.d.ts +107 -9
- package/lib/machines/types.d.ts.map +1 -1
- package/lib/machines/types.js.map +1 -1
- package/lib/module.js.map +1 -1
- package/lib/redux/searchReducer.d.ts +1 -1
- package/lib/redux/searchReducer.d.ts.map +1 -1
- package/lib/redux/searchReducer.js.map +1 -1
- package/lib/routes.json +9 -1
- package/lib/styles/index.css +602 -372
- package/lib/tailwindConfig.d.ts +85 -27
- package/lib/tailwindConfig.d.ts.map +1 -1
- package/lib/tailwindConfig.js +96 -18
- package/lib/tailwindConfig.js.map +1 -1
- package/lib/utils/__tests__/analytics-utils.test.d.ts +2 -0
- package/lib/utils/__tests__/analytics-utils.test.d.ts.map +1 -0
- package/lib/utils/__tests__/configOverrides.test.d.ts +2 -0
- package/lib/utils/__tests__/configOverrides.test.d.ts.map +1 -0
- package/lib/utils/__tests__/menu.test.d.ts +2 -0
- package/lib/utils/__tests__/menu.test.d.ts.map +1 -0
- package/lib/utils/__tests__/selectors.test.d.ts +2 -0
- package/lib/utils/__tests__/selectors.test.d.ts.map +1 -0
- package/lib/utils/__tests__/settingsMachine.test.d.ts +2 -0
- package/lib/utils/__tests__/settingsMachine.test.d.ts.map +1 -0
- package/lib/utils/__tests__/settingsUtils.test.d.ts +2 -0
- package/lib/utils/__tests__/settingsUtils.test.d.ts.map +1 -0
- package/lib/utils/analytics-utils.d.ts +43 -0
- package/lib/utils/analytics-utils.d.ts.map +1 -0
- package/lib/utils/analytics.d.ts +48 -0
- package/lib/utils/analytics.d.ts.map +1 -0
- package/lib/utils/configOverrides.d.ts +213 -0
- package/lib/utils/configOverrides.d.ts.map +1 -0
- package/lib/utils/configOverrides.js +91 -0
- package/lib/utils/configOverrides.js.map +1 -0
- package/lib/utils/isBrowser/index.js.map +1 -1
- package/lib/utils/settingsUtils.d.ts +20 -0
- package/lib/utils/settingsUtils.d.ts.map +1 -0
- package/lib/utils/settingsUtils.js +74 -0
- package/lib/utils/settingsUtils.js.map +1 -0
- package/lib/utils/utils/index.js.map +1 -1
- package/package.json +7 -15
- package/lib/components/Layout/GlobalHeader/Logo.d.ts +0 -4
- package/lib/components/Layout/GlobalHeader/Logo.d.ts.map +0 -1
- package/lib/components/Layout/GlobalHeader/Logo.js +0 -141
- package/lib/components/Layout/GlobalHeader/Logo.js.map +0 -1
- package/lib/components/Layout/Sidebar/Sidebar.d.ts +0 -5
- package/lib/components/Layout/Sidebar/Sidebar.d.ts.map +0 -1
- package/lib/components/Layout/Sidebar/Sidebar.js +0 -186
- package/lib/components/Layout/Sidebar/Sidebar.js.map +0 -1
- package/lib/components/Layout/Sidebar/SidebarMenu.d.ts +0 -4
- package/lib/components/Layout/Sidebar/SidebarMenu.d.ts.map +0 -1
- package/lib/components/Layout/Sidebar/SidebarMenu.js +0 -183
- package/lib/components/Layout/Sidebar/SidebarMenu.js.map +0 -1
- package/lib/components/SettingDrawer/CheckBoxTheme.d.ts +0 -3
- package/lib/components/SettingDrawer/CheckBoxTheme.d.ts.map +0 -1
- package/lib/components/SettingDrawer/CheckBoxTheme.js +0 -123
- package/lib/components/SettingDrawer/CheckBoxTheme.js.map +0 -1
- package/lib/components/SettingDrawer/LayoutChange.d.ts +0 -3
- package/lib/components/SettingDrawer/LayoutChange.d.ts.map +0 -1
- package/lib/components/SettingDrawer/LayoutChange.js +0 -123
- package/lib/components/SettingDrawer/LayoutChange.js.map +0 -1
- package/lib/components/SettingDrawer/NavigationsModes.d.ts +0 -3
- package/lib/components/SettingDrawer/NavigationsModes.d.ts.map +0 -1
- package/lib/components/SettingDrawer/NavigationsModes.js +0 -289
- package/lib/components/SettingDrawer/NavigationsModes.js.map +0 -1
- package/lib/components/SettingDrawer/RegionalSettings.d.ts +0 -3
- package/lib/components/SettingDrawer/RegionalSettings.d.ts.map +0 -1
- package/lib/components/SettingDrawer/RegionalSettings.js +0 -740
- package/lib/components/SettingDrawer/RegionalSettings.js.map +0 -1
- package/lib/components/SettingDrawer/Switch/index.d.ts +0 -3
- package/lib/components/SettingDrawer/Switch/index.d.ts.map +0 -1
- package/lib/components/SettingDrawer/Switch/index.js +0 -22
- package/lib/components/SettingDrawer/Switch/index.js.map +0 -1
- package/lib/components/SettingDrawer/ThemeColor.d.ts +0 -3
- package/lib/components/SettingDrawer/ThemeColor.d.ts.map +0 -1
- package/lib/components/SettingDrawer/ThemeColor.js +0 -35
- package/lib/components/SettingDrawer/ThemeColor.js.map +0 -1
- package/lib/components/SettingDrawer/ThemeSelector.d.ts +0 -3
- package/lib/components/SettingDrawer/ThemeSelector.d.ts.map +0 -1
- package/lib/components/SettingDrawer/ThemeSelector.js +0 -18
- package/lib/components/SettingDrawer/ThemeSelector.js.map +0 -1
- package/lib/components/SettingDrawer/WebFontsSelector.d.ts +0 -3
- package/lib/components/SettingDrawer/WebFontsSelector.d.ts.map +0 -1
- package/lib/components/SettingDrawer/WebFontsSelector.js +0 -24
- package/lib/components/SettingDrawer/WebFontsSelector.js.map +0 -1
- package/lib/components/SettingDrawer/types.d.ts.map +0 -1
- package/lib/components/ThemeProvider/ThemeProvider.d.ts +0 -8
- package/lib/components/ThemeProvider/ThemeProvider.d.ts.map +0 -1
- package/lib/components/ThemeProvider/ThemeProvider.js +0 -60
- package/lib/components/ThemeProvider/ThemeProvider.js.map +0 -1
- package/lib/components/ThemeProvider/ThemeToggle.d.ts +0 -7
- package/lib/components/ThemeProvider/ThemeToggle.d.ts.map +0 -1
- package/lib/components/ThemeProvider/ThemeToggle.js +0 -50
- package/lib/components/ThemeProvider/ThemeToggle.js.map +0 -1
- package/lib/components/ThemeProvider/index.d.ts +0 -4
- package/lib/components/ThemeProvider/index.d.ts.map +0 -1
- package/lib/components/ThemeProvider/themes/airbnb.d.ts +0 -3
- package/lib/components/ThemeProvider/themes/airbnb.d.ts.map +0 -1
- package/lib/components/ThemeProvider/themes/airbnb.js +0 -186
- package/lib/components/ThemeProvider/themes/airbnb.js.map +0 -1
- package/lib/components/ThemeProvider/themes/default.d.ts +0 -3
- package/lib/components/ThemeProvider/themes/default.d.ts.map +0 -1
- package/lib/components/ThemeProvider/themes/default.js +0 -183
- package/lib/components/ThemeProvider/themes/default.js.map +0 -1
- package/lib/components/ThemeProvider/themes/github.d.ts +0 -3
- package/lib/components/ThemeProvider/themes/github.d.ts.map +0 -1
- package/lib/components/ThemeProvider/themes/github.js +0 -190
- package/lib/components/ThemeProvider/themes/github.js.map +0 -1
- package/lib/components/ThemeProvider/themes/index.d.ts +0 -15
- package/lib/components/ThemeProvider/themes/index.d.ts.map +0 -1
- package/lib/components/ThemeProvider/themes/index.js +0 -7
- package/lib/components/ThemeProvider/themes/index.js.map +0 -1
- package/lib/components/ThemeProvider/themes/slack.d.ts +0 -3
- package/lib/components/ThemeProvider/themes/slack.d.ts.map +0 -1
- package/lib/components/ThemeProvider/themes/slack.js +0 -188
- package/lib/components/ThemeProvider/themes/slack.js.map +0 -1
- package/lib/components/ThemeProvider/themes/spotify.d.ts +0 -3
- package/lib/components/ThemeProvider/themes/spotify.d.ts.map +0 -1
- package/lib/components/ThemeProvider/themes/spotify.js +0 -189
- package/lib/components/ThemeProvider/themes/spotify.js.map +0 -1
- package/lib/components/ThemeProvider/types.d.ts +0 -112
- package/lib/components/ThemeProvider/types.d.ts.map +0 -1
- package/lib/components/UI/CardList.d.ts +0 -61
- package/lib/components/UI/CardList.d.ts.map +0 -1
- package/lib/components/UI/CardList.js +0 -43
- package/lib/components/UI/CardList.js.map +0 -1
- package/lib/components/UI/CategoriesTypeList.d.ts +0 -29
- package/lib/components/UI/CategoriesTypeList.d.ts.map +0 -1
- package/lib/components/UI/CategoriesTypeList.js +0 -140
- package/lib/components/UI/CategoriesTypeList.js.map +0 -1
- package/lib/components/UI/LazyLoadingGoogleMarker.d.ts +0 -83
- package/lib/components/UI/LazyLoadingGoogleMarker.d.ts.map +0 -1
- package/lib/components/UI/LazyLoadingGoogleMarker.js +0 -107
- package/lib/components/UI/LazyLoadingGoogleMarker.js.map +0 -1
- package/lib/components/UI/Pagination.d.ts +0 -6
- package/lib/components/UI/Pagination.d.ts.map +0 -1
- package/lib/components/UI/Pagination.js +0 -59
- package/lib/components/UI/Pagination.js.map +0 -1
- package/lib/components/UI/ParamSearchResultContainer.d.ts +0 -99
- package/lib/components/UI/ParamSearchResultContainer.d.ts.map +0 -1
- package/lib/components/UI/ParamSearchResultContainer.js +0 -120
- package/lib/components/UI/ParamSearchResultContainer.js.map +0 -1
- package/lib/components/UI/PropertyCard.d.ts +0 -24
- package/lib/components/UI/PropertyCard.d.ts.map +0 -1
- package/lib/components/UI/PropertyCard.js +0 -375
- package/lib/components/UI/PropertyCard.js.map +0 -1
- package/lib/components/UI/PropertyCardOnMap.d.ts +0 -10
- package/lib/components/UI/PropertyCardOnMap.d.ts.map +0 -1
- package/lib/components/UI/PropertyCardOnMap.js +0 -108
- package/lib/components/UI/PropertyCardOnMap.js.map +0 -1
- package/lib/components/UI/VehicleCard/PricePopover.d.ts +0 -8
- package/lib/components/UI/VehicleCard/PricePopover.d.ts.map +0 -1
- package/lib/components/UI/VehicleCard/PricePopover.js +0 -98
- package/lib/components/UI/VehicleCard/PricePopover.js.map +0 -1
- package/lib/components/UI/VehicleCard/VehicleBadge.d.ts +0 -7
- package/lib/components/UI/VehicleCard/VehicleBadge.d.ts.map +0 -1
- package/lib/components/UI/VehicleCard/VehicleFeature.d.ts +0 -9
- package/lib/components/UI/VehicleCard/VehicleFeature.d.ts.map +0 -1
- package/lib/components/UI/VehicleCard/VehicleFeature.js +0 -23
- package/lib/components/UI/VehicleCard/VehicleFeature.js.map +0 -1
- package/lib/components/UI/VehicleCard/types.d.ts +0 -59
- package/lib/components/UI/VehicleCard/types.d.ts.map +0 -1
- package/lib/components/UI/VehicleCard.d.ts +0 -15
- package/lib/components/UI/VehicleCard.d.ts.map +0 -1
- package/lib/components/UI/VehicleCard.js +0 -166
- package/lib/components/UI/VehicleCard.js.map +0 -1
- package/lib/components/UI/VehicleCardList.d.ts +0 -14
- package/lib/components/UI/VehicleCardList.d.ts.map +0 -1
- package/lib/components/UI/VehicleCardList.js +0 -38
- package/lib/components/UI/VehicleCardList.js.map +0 -1
- package/lib/components/UI/VehicleParamSearchResultContainer.d.ts +0 -90
- package/lib/components/UI/VehicleParamSearchResultContainer.d.ts.map +0 -1
- package/lib/components/UI/icons/LocationIcon.d.ts +0 -7
- package/lib/components/UI/icons/LocationIcon.d.ts.map +0 -1
- package/lib/components/UI/icons/LocationIcon.js +0 -18
- package/lib/components/UI/icons/LocationIcon.js.map +0 -1
- package/lib/components/UI/icons/index.d.ts +0 -2
- package/lib/components/UI/icons/index.d.ts.map +0 -1
- package/lib/components/UI/index.d.ts +0 -10
- package/lib/components/UI/index.d.ts.map +0 -1
- package/lib/components/typings.js +0 -6
- package/lib/components/typings.js.map +0 -1
- package/lib/hooks/use-get-current-lat-long.d.ts +0 -18
- package/lib/hooks/use-get-current-lat-long.d.ts.map +0 -1
- package/lib/hooks/use-get-current-lat-long.js +0 -29
- package/lib/hooks/use-get-current-lat-long.js.map +0 -1
- package/lib/hooks/useWindowSize.d.ts +0 -6
- package/lib/hooks/useWindowSize.d.ts.map +0 -1
- package/lib/hooks/useWindowSize.js +0 -20
- package/lib/hooks/useWindowSize.js.map +0 -1
- package/lib/middlewares/airbnbDatasourcesMiddleware.d.ts +0 -6
- package/lib/middlewares/airbnbDatasourcesMiddleware.d.ts.map +0 -1
- package/lib/middlewares/bookingCarRentalMiddleware.d.ts +0 -6
- package/lib/middlewares/bookingCarRentalMiddleware.d.ts.map +0 -1
- package/lib/middlewares/bookingDatasourcesMiddleware.d.ts +0 -7
- package/lib/middlewares/bookingDatasourcesMiddleware.d.ts.map +0 -1
- package/lib/middlewares/datasourcesMiddleware.d.ts +0 -6
- package/lib/middlewares/datasourcesMiddleware.d.ts.map +0 -1
- package/lib/middlewares/pricelineDatasourcesMiddleware.d.ts +0 -7
- package/lib/middlewares/pricelineDatasourcesMiddleware.d.ts.map +0 -1
package/README.md
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
# Tailwind Design Pro
|
|
2
2
|
|
|
3
|
-
A universal tailwind design system for
|
|
3
|
+
A universal tailwind design system with multi-theme support and CSS custom properties for seamless theme switching.
|
|
4
4
|
|
|
5
5
|
## Features
|
|
6
6
|
|
|
7
|
-
-
|
|
8
|
-
-
|
|
9
|
-
-
|
|
10
|
-
-
|
|
7
|
+
- **Multi-Theme System**: 5 pre-built themes (Default, Airbnb, Slack, GitHub, Spotify)
|
|
8
|
+
- **CSS Custom Properties**: Theme-aware styling with CSS variables
|
|
9
|
+
- **Dark/Light Mode**: Automatic theme switching with persistent preferences
|
|
10
|
+
- **Component Library**: Pre-built UI components with theme integration
|
|
11
|
+
- **Responsive Design**: Mobile-first approach with consistent breakpoints
|
|
12
|
+
- **Accessibility**: WCAG compliant color contrasts and focus states
|
|
11
13
|
|
|
12
|
-
##
|
|
13
|
-
|
|
14
|
-
To use this package in your server project, follow these steps:
|
|
14
|
+
## Quick Start
|
|
15
15
|
|
|
16
16
|
### 1. Install the package
|
|
17
17
|
|
|
@@ -19,327 +19,453 @@ To use this package in your server project, follow these steps:
|
|
|
19
19
|
npm install @admin-layout/tailwind-design-pro
|
|
20
20
|
```
|
|
21
21
|
|
|
22
|
-
### 2.
|
|
22
|
+
### 2. Import the CSS
|
|
23
|
+
|
|
24
|
+
```typescript
|
|
25
|
+
// In your main CSS file or entry point
|
|
26
|
+
import '@admin-layout/tailwind-design-pro/src/styles/index.css';
|
|
27
|
+
```
|
|
23
28
|
|
|
24
|
-
|
|
29
|
+
### 3. Configure Tailwind
|
|
25
30
|
|
|
26
31
|
```typescript
|
|
27
|
-
// tailwind.config.ts
|
|
32
|
+
// tailwind.config.ts
|
|
28
33
|
import { themeConfig } from '@admin-layout/tailwind-design-pro';
|
|
29
34
|
|
|
30
35
|
export default {
|
|
31
|
-
|
|
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
|
|
36
|
+
content: ['./src/**/*.{js,jsx,ts,tsx}', '../../packages/**/*.{js,jsx,ts,tsx}'],
|
|
40
37
|
theme: {
|
|
41
|
-
extend:
|
|
42
|
-
// Any server-specific extensions would go here
|
|
43
|
-
...themeConfig,
|
|
44
|
-
},
|
|
38
|
+
extend: themeConfig,
|
|
45
39
|
},
|
|
46
40
|
darkMode: 'class',
|
|
47
|
-
|
|
48
|
-
typography: ['dark'],
|
|
49
|
-
},
|
|
50
|
-
plugins: [typography, forms, aspectRatio],
|
|
41
|
+
plugins: [],
|
|
51
42
|
};
|
|
52
43
|
```
|
|
53
44
|
|
|
54
|
-
|
|
45
|
+
### 4. Set up Theme Provider
|
|
55
46
|
|
|
56
|
-
|
|
47
|
+
```tsx
|
|
48
|
+
import { ThemeProviderTailwind } from '@admin-layout/tailwind-ui';
|
|
57
49
|
|
|
58
|
-
|
|
50
|
+
const App = () => {
|
|
51
|
+
const settings = {
|
|
52
|
+
theme: 'default', // 'default', 'airbnb', 'slack', 'github', 'spotify'
|
|
53
|
+
navTheme: 'light', // 'light' or 'dark'
|
|
54
|
+
primaryColor: '#000000',
|
|
55
|
+
fontFamily: 'Inter, sans-serif',
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
return (
|
|
59
|
+
<ThemeProviderTailwind settings={settings} actor={actor}>
|
|
60
|
+
<YourApp />
|
|
61
|
+
</ThemeProviderTailwind>
|
|
62
|
+
);
|
|
63
|
+
};
|
|
64
|
+
```
|
|
59
65
|
|
|
60
66
|
## Available Themes
|
|
61
67
|
|
|
62
|
-
|
|
68
|
+
### 1. Default Theme
|
|
63
69
|
|
|
64
|
-
-
|
|
65
|
-
-
|
|
66
|
-
-
|
|
67
|
-
- `github`: Following GitHub's design patterns
|
|
68
|
-
- `spotify`: Matching Spotify's visual identity
|
|
70
|
+
- Clean, professional design
|
|
71
|
+
- Neutral color palette
|
|
72
|
+
- Perfect for business applications
|
|
69
73
|
|
|
70
|
-
|
|
74
|
+
### 2. Airbnb Theme
|
|
71
75
|
|
|
72
|
-
|
|
76
|
+
- Warm, welcoming colors
|
|
77
|
+
- Red accent colors
|
|
78
|
+
- Great for hospitality and travel apps
|
|
73
79
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
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
|
-
}
|
|
80
|
+
### 3. Slack Theme
|
|
81
|
+
|
|
82
|
+
- Purple-based design
|
|
83
|
+
- Modern, collaborative feel
|
|
84
|
+
- Ideal for team communication tools
|
|
85
|
+
|
|
86
|
+
### 4. GitHub Theme
|
|
87
|
+
|
|
88
|
+
- Dark, developer-friendly
|
|
89
|
+
- High contrast design
|
|
90
|
+
- Perfect for developer tools
|
|
91
|
+
|
|
92
|
+
### 5. Spotify Theme
|
|
93
|
+
|
|
94
|
+
- Green accent colors
|
|
95
|
+
- Music and entertainment focused
|
|
96
|
+
- Great for media applications
|
|
97
|
+
|
|
98
|
+
## Theme-Aware CSS Classes
|
|
99
|
+
|
|
100
|
+
The design system provides theme-aware CSS classes that automatically adapt to the current theme:
|
|
101
|
+
|
|
102
|
+
### Background Colors
|
|
103
|
+
|
|
104
|
+
```css
|
|
105
|
+
.bg-background /* Main background */
|
|
106
|
+
/* Main background */
|
|
107
|
+
/* Main background */
|
|
108
|
+
/* Main background */
|
|
109
|
+
/* Main background */
|
|
110
|
+
/* Main background */
|
|
111
|
+
/* Main background */
|
|
112
|
+
/* Main background */
|
|
113
|
+
/* Main background */
|
|
114
|
+
/* Main background */
|
|
115
|
+
/* Main background */
|
|
116
|
+
/* Main background */
|
|
117
|
+
/* Main background */
|
|
118
|
+
/* Main background */
|
|
119
|
+
/* Main background */
|
|
120
|
+
/* Main background */
|
|
121
|
+
.bg-card /* Card background */
|
|
122
|
+
.bg-popover /* Popover background */
|
|
123
|
+
.bg-muted /* Muted background */
|
|
124
|
+
.bg-accent; /* Accent background */
|
|
144
125
|
```
|
|
145
126
|
|
|
146
|
-
|
|
127
|
+
### Text Colors
|
|
128
|
+
|
|
129
|
+
```css
|
|
130
|
+
.text-foreground /* Primary text */
|
|
131
|
+
/* Primary text */
|
|
132
|
+
/* Primary text */
|
|
133
|
+
/* Primary text */
|
|
134
|
+
/* Primary text */
|
|
135
|
+
/* Primary text */
|
|
136
|
+
/* Primary text */
|
|
137
|
+
/* Primary text */
|
|
138
|
+
/* Primary text */
|
|
139
|
+
/* Primary text */
|
|
140
|
+
/* Primary text */
|
|
141
|
+
/* Primary text */
|
|
142
|
+
/* Primary text */
|
|
143
|
+
/* Primary text */
|
|
144
|
+
/* Primary text */
|
|
145
|
+
/* Primary text */
|
|
146
|
+
.text-muted-foreground /* Secondary text */
|
|
147
|
+
.text-primary /* Primary brand color */
|
|
148
|
+
.text-secondary /* Secondary brand color */
|
|
149
|
+
.text-accent; /* Accent color */
|
|
150
|
+
```
|
|
147
151
|
|
|
148
|
-
|
|
152
|
+
### Semantic Colors
|
|
153
|
+
|
|
154
|
+
```css
|
|
155
|
+
.text-success /* Success text */
|
|
156
|
+
/* Success text */
|
|
157
|
+
/* Success text */
|
|
158
|
+
/* Success text */
|
|
159
|
+
/* Success text */
|
|
160
|
+
/* Success text */
|
|
161
|
+
/* Success text */
|
|
162
|
+
/* Success text */
|
|
163
|
+
/* Success text */
|
|
164
|
+
/* Success text */
|
|
165
|
+
/* Success text */
|
|
166
|
+
/* Success text */
|
|
167
|
+
/* Success text */
|
|
168
|
+
/* Success text */
|
|
169
|
+
/* Success text */
|
|
170
|
+
/* Success text */
|
|
171
|
+
.text-warning /* Warning text */
|
|
172
|
+
.text-error /* Error text */
|
|
173
|
+
.text-info /* Info text */
|
|
174
|
+
.bg-success /* Success background */
|
|
175
|
+
.bg-warning /* Warning background */
|
|
176
|
+
.bg-error /* Error background */
|
|
177
|
+
.bg-info; /* Info background */
|
|
178
|
+
```
|
|
149
179
|
|
|
150
|
-
|
|
151
|
-
|
|
180
|
+
### Component Classes
|
|
181
|
+
|
|
182
|
+
```css
|
|
183
|
+
.themed-button /* Theme-aware button */
|
|
184
|
+
/* Theme-aware button */
|
|
185
|
+
/* Theme-aware button */
|
|
186
|
+
/* Theme-aware button */
|
|
187
|
+
/* Theme-aware button */
|
|
188
|
+
/* Theme-aware button */
|
|
189
|
+
/* Theme-aware button */
|
|
190
|
+
/* Theme-aware button */
|
|
191
|
+
/* Theme-aware button */
|
|
192
|
+
/* Theme-aware button */
|
|
193
|
+
/* Theme-aware button */
|
|
194
|
+
/* Theme-aware button */
|
|
195
|
+
/* Theme-aware button */
|
|
196
|
+
/* Theme-aware button */
|
|
197
|
+
/* Theme-aware button */
|
|
198
|
+
/* Theme-aware button */
|
|
199
|
+
.themed-card /* Theme-aware card */
|
|
200
|
+
.themed-input /* Theme-aware input */
|
|
201
|
+
.themed-modal /* Theme-aware modal */
|
|
202
|
+
.themed-dropdown /* Theme-aware dropdown */
|
|
203
|
+
.themed-sidebar; /* Theme-aware sidebar */
|
|
204
|
+
```
|
|
152
205
|
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
206
|
+
### Interactive Classes
|
|
207
|
+
|
|
208
|
+
```css
|
|
209
|
+
.interactive-hover /* Hover effects */
|
|
210
|
+
/* Hover effects */
|
|
211
|
+
/* Hover effects */
|
|
212
|
+
/* Hover effects */
|
|
213
|
+
/* Hover effects */
|
|
214
|
+
/* Hover effects */
|
|
215
|
+
/* Hover effects */
|
|
216
|
+
/* Hover effects */
|
|
217
|
+
/* Hover effects */
|
|
218
|
+
/* Hover effects */
|
|
219
|
+
/* Hover effects */
|
|
220
|
+
/* Hover effects */
|
|
221
|
+
/* Hover effects */
|
|
222
|
+
/* Hover effects */
|
|
223
|
+
/* Hover effects */
|
|
224
|
+
/* Hover effects */
|
|
225
|
+
.focus-themed /* Focus states */
|
|
226
|
+
.rounded-themed /* Theme-aware border radius */
|
|
227
|
+
.shadow-themed-sm /* Theme-aware shadows */
|
|
228
|
+
.shadow-themed-md
|
|
229
|
+
.shadow-themed-lg
|
|
230
|
+
.shadow-themed-xl;
|
|
231
|
+
```
|
|
161
232
|
|
|
162
|
-
|
|
233
|
+
## Using Theme-Aware Components
|
|
234
|
+
|
|
235
|
+
### Basic Usage
|
|
236
|
+
|
|
237
|
+
```tsx
|
|
238
|
+
import { Button, Card, CardContent, CardHeader, CardTitle } from '@admin-layout/tailwind-ui';
|
|
239
|
+
|
|
240
|
+
const MyComponent = () => {
|
|
241
|
+
return (
|
|
242
|
+
<div className="bg-background text-foreground p-6">
|
|
243
|
+
<Card className="themed-card">
|
|
244
|
+
<CardHeader>
|
|
245
|
+
<CardTitle className="text-foreground">Card Title</CardTitle>
|
|
246
|
+
</CardHeader>
|
|
247
|
+
<CardContent>
|
|
248
|
+
<p className="text-muted-foreground">Card content</p>
|
|
249
|
+
<Button className="themed-button interactive-hover">Click Me</Button>
|
|
250
|
+
</CardContent>
|
|
251
|
+
</Card>
|
|
252
|
+
</div>
|
|
253
|
+
);
|
|
163
254
|
};
|
|
164
255
|
```
|
|
165
256
|
|
|
166
|
-
|
|
257
|
+
### Form Components
|
|
167
258
|
|
|
168
|
-
|
|
259
|
+
```tsx
|
|
260
|
+
const FormExample = () => {
|
|
261
|
+
return (
|
|
262
|
+
<form className="space-y-4">
|
|
263
|
+
<div>
|
|
264
|
+
<label className="text-foreground font-medium">Email</label>
|
|
265
|
+
<input type="email" className="w-full themed-input focus-themed" placeholder="Enter your email" />
|
|
266
|
+
</div>
|
|
267
|
+
<Button type="submit" className="themed-button">
|
|
268
|
+
Submit
|
|
269
|
+
</Button>
|
|
270
|
+
</form>
|
|
271
|
+
);
|
|
272
|
+
};
|
|
273
|
+
```
|
|
274
|
+
|
|
275
|
+
### Theme Switching
|
|
169
276
|
|
|
170
277
|
```tsx
|
|
171
|
-
import { useTheme } from '
|
|
278
|
+
import { useTheme } from '@admin-layout/tailwind-ui';
|
|
172
279
|
|
|
173
|
-
const
|
|
174
|
-
const {
|
|
280
|
+
const ThemeSwitcher = () => {
|
|
281
|
+
const { theme, mode, toggleMode, setTheme, setMode } = useTheme();
|
|
175
282
|
|
|
176
283
|
return (
|
|
177
|
-
<div>
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
{/* Use theme-specific styles */}
|
|
182
|
-
<button
|
|
183
|
-
style={{
|
|
184
|
-
borderRadius: theme.borderRadius.DEFAULT,
|
|
185
|
-
fontFamily: theme.fontFamily.sans.join(', '),
|
|
186
|
-
}}
|
|
284
|
+
<div className="space-x-2">
|
|
285
|
+
<Button
|
|
286
|
+
onClick={() => setTheme('airbnb')}
|
|
287
|
+
className={theme === 'airbnb' ? 'themed-button' : 'bg-muted text-foreground'}
|
|
187
288
|
>
|
|
188
|
-
|
|
189
|
-
</
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
289
|
+
Airbnb
|
|
290
|
+
</Button>
|
|
291
|
+
<Button
|
|
292
|
+
onClick={() => setTheme('slack')}
|
|
293
|
+
className={theme === 'slack' ? 'themed-button' : 'bg-muted text-foreground'}
|
|
294
|
+
>
|
|
295
|
+
Slack
|
|
296
|
+
</Button>
|
|
297
|
+
<Button onClick={toggleDarkMode}>{mode === 'dark' ? 'Light' : 'Dark'} Mode</Button>
|
|
193
298
|
</div>
|
|
194
299
|
);
|
|
195
300
|
};
|
|
196
301
|
```
|
|
197
302
|
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
303
|
+
## CSS Custom Properties
|
|
304
|
+
|
|
305
|
+
The design system uses CSS custom properties for dynamic theming:
|
|
306
|
+
|
|
307
|
+
### Color Variables
|
|
308
|
+
|
|
309
|
+
```css
|
|
310
|
+
:root {
|
|
311
|
+
--background: 0 0% 100%;
|
|
312
|
+
--foreground: 222.2 84% 4.9%;
|
|
313
|
+
--primary: 222.2 47.4% 11.2%;
|
|
314
|
+
--primary-foreground: 210 40% 98%;
|
|
315
|
+
--secondary: 210 40% 96.1%;
|
|
316
|
+
--secondary-foreground: 222.2 47.4% 11.2%;
|
|
317
|
+
--muted: 210 40% 96.1%;
|
|
318
|
+
--muted-foreground: 215.4 16.3% 46.9%;
|
|
319
|
+
--accent: 210 40% 96.1%;
|
|
320
|
+
--accent-foreground: 222.2 47.4% 11.2%;
|
|
321
|
+
--destructive: 0 84.2% 60.2%;
|
|
322
|
+
--destructive-foreground: 210 40% 98%;
|
|
323
|
+
--border: 214.3 31.8% 91.4%;
|
|
324
|
+
--input: 214.3 31.8% 91.4%;
|
|
325
|
+
--ring: 222.2 84% 4.9%;
|
|
326
|
+
--radius: 0.5rem;
|
|
327
|
+
}
|
|
328
|
+
```
|
|
204
329
|
|
|
205
|
-
|
|
330
|
+
### Theme-Specific Variables
|
|
206
331
|
|
|
207
|
-
|
|
332
|
+
Each theme has its own set of variables:
|
|
208
333
|
|
|
209
|
-
|
|
210
|
-
-
|
|
211
|
-
|
|
334
|
+
```css
|
|
335
|
+
[data-theme='airbnb'] {
|
|
336
|
+
--primary: 0 100% 60%;
|
|
337
|
+
--background: 0 0% 100%;
|
|
338
|
+
/* ... other theme-specific variables */
|
|
339
|
+
}
|
|
340
|
+
```
|
|
212
341
|
|
|
213
|
-
|
|
342
|
+
## Best Practices
|
|
214
343
|
|
|
215
|
-
|
|
216
|
-
- All theme properties are immediately applied when changed
|
|
344
|
+
### 1. Use Theme-Aware Classes
|
|
217
345
|
|
|
218
|
-
|
|
346
|
+
```tsx
|
|
347
|
+
// ✅ Good - Theme-aware
|
|
348
|
+
<div className="bg-background text-foreground">
|
|
349
|
+
<Button className="themed-button">Click</Button>
|
|
350
|
+
</div>
|
|
351
|
+
|
|
352
|
+
// ❌ Avoid - Hardcoded colors
|
|
353
|
+
<div className="bg-white text-black">
|
|
354
|
+
<Button className="bg-blue-500 text-white">Click</Button>
|
|
355
|
+
</div>
|
|
356
|
+
```
|
|
219
357
|
|
|
220
|
-
|
|
358
|
+
### 2. Leverage Semantic Colors
|
|
221
359
|
|
|
222
|
-
|
|
223
|
-
-
|
|
224
|
-
-
|
|
360
|
+
```tsx
|
|
361
|
+
// ✅ Good - Semantic meaning
|
|
362
|
+
<div className="text-success">Success message</div>
|
|
363
|
+
<div className="text-error">Error message</div>
|
|
225
364
|
|
|
226
|
-
|
|
365
|
+
// ❌ Avoid - Hardcoded colors
|
|
366
|
+
<div className="text-green-500">Success message</div>
|
|
367
|
+
<div className="text-red-500">Error message</div>
|
|
368
|
+
```
|
|
227
369
|
|
|
228
|
-
|
|
229
|
-
- Primary colors
|
|
230
|
-
- Secondary colors
|
|
231
|
-
- Accent colors
|
|
232
|
-
- Semantic colors (success, warning, error)
|
|
233
|
-
- Neutral colors
|
|
234
|
-
- Background colors
|
|
235
|
-
- Text colors
|
|
370
|
+
### 3. Use Interactive Classes
|
|
236
371
|
|
|
237
|
-
|
|
372
|
+
```tsx
|
|
373
|
+
// ✅ Good - Built-in interactions
|
|
374
|
+
<Button className="themed-button interactive-hover">
|
|
375
|
+
Hover me
|
|
376
|
+
</Button>
|
|
377
|
+
|
|
378
|
+
// ❌ Avoid - Custom hover states
|
|
379
|
+
<Button className="themed-button hover:scale-105 hover:shadow-lg">
|
|
380
|
+
Hover me
|
|
381
|
+
</Button>
|
|
382
|
+
```
|
|
238
383
|
|
|
239
|
-
|
|
240
|
-
- Consistent typography settings across themes
|
|
384
|
+
### 4. Responsive Design
|
|
241
385
|
|
|
242
|
-
|
|
386
|
+
```tsx
|
|
387
|
+
// ✅ Good - Responsive with theme
|
|
388
|
+
<div className="bg-background p-4 md:p-6 lg:p-8">
|
|
389
|
+
<Card className="themed-card">
|
|
390
|
+
<CardContent className="p-4 md:p-6">Content</CardContent>
|
|
391
|
+
</Card>
|
|
392
|
+
</div>
|
|
393
|
+
```
|
|
243
394
|
|
|
244
|
-
|
|
395
|
+
## Migration Guide
|
|
245
396
|
|
|
246
|
-
|
|
247
|
-
const { theme } = useTheme();
|
|
248
|
-
// Use theme properties directly
|
|
249
|
-
const primaryColor = theme.colors.primary[500];
|
|
250
|
-
```
|
|
397
|
+
### From Inline Styles to CSS Classes
|
|
251
398
|
|
|
252
|
-
|
|
399
|
+
**Before:**
|
|
253
400
|
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
const backgroundColor = isDarkMode ? theme.colors.background.dark : theme.colors.background.light;
|
|
258
|
-
```
|
|
401
|
+
```tsx
|
|
402
|
+
const { theme, isDarkMode } = useTheme();
|
|
403
|
+
const textColor = isDarkMode ? theme.colors.text.dark.primary : theme.colors.text.light.primary;
|
|
259
404
|
|
|
260
|
-
|
|
405
|
+
<div style={{ color: textColor, backgroundColor: theme.colors.background.light }}>Content</div>;
|
|
406
|
+
```
|
|
261
407
|
|
|
262
|
-
|
|
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
|
-
```
|
|
408
|
+
**After:**
|
|
280
409
|
|
|
281
|
-
|
|
410
|
+
```tsx
|
|
411
|
+
<div className="bg-background text-foreground">Content</div>
|
|
412
|
+
```
|
|
282
413
|
|
|
283
|
-
###
|
|
414
|
+
### From Custom Components to Theme-Aware Components
|
|
284
415
|
|
|
285
|
-
|
|
416
|
+
**Before:**
|
|
286
417
|
|
|
287
|
-
```
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
418
|
+
```tsx
|
|
419
|
+
<button
|
|
420
|
+
style={{
|
|
421
|
+
backgroundColor: theme.components.buttons.primary.background,
|
|
422
|
+
color: theme.components.buttons.primary.text,
|
|
423
|
+
borderRadius: theme.components.buttons.primary.borderRadius,
|
|
424
|
+
}}
|
|
425
|
+
>
|
|
426
|
+
Button
|
|
427
|
+
</button>
|
|
295
428
|
```
|
|
296
429
|
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
You can extend existing themes by importing them and modifying specific properties:
|
|
430
|
+
**After:**
|
|
300
431
|
|
|
301
|
-
```
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
const extendedTheme: DefaultTheme = {
|
|
305
|
-
...defaultTheme,
|
|
306
|
-
name: 'extended',
|
|
307
|
-
colors: {
|
|
308
|
-
...defaultTheme.colors,
|
|
309
|
-
primary: {
|
|
310
|
-
// Override primary colors
|
|
311
|
-
},
|
|
312
|
-
},
|
|
313
|
-
};
|
|
432
|
+
```tsx
|
|
433
|
+
<Button className="themed-button">Button</Button>
|
|
314
434
|
```
|
|
315
435
|
|
|
316
436
|
## Troubleshooting
|
|
317
437
|
|
|
318
|
-
###
|
|
438
|
+
### Theme Not Applying
|
|
319
439
|
|
|
320
|
-
1.
|
|
440
|
+
1. Ensure CSS is imported: `import '@admin-layout/tailwind-design-pro/src/styles/index.css'`
|
|
441
|
+
2. Check that `ThemeProviderTailwind` wraps your app
|
|
442
|
+
3. Verify theme name is valid: `'default'`, `'airbnb'`, `'slack'`, `'github'`, `'spotify'`
|
|
321
443
|
|
|
322
|
-
|
|
323
|
-
- Check if the theme name matches one of the available themes
|
|
324
|
-
- Verify that the settings prop is correctly configured
|
|
444
|
+
### Dark Mode Not Working
|
|
325
445
|
|
|
326
|
-
|
|
446
|
+
1. Check `navTheme` setting: `'light'` or `'dark'`
|
|
447
|
+
2. Ensure `darkMode: 'class'` in Tailwind config
|
|
448
|
+
3. Verify CSS custom properties are being applied
|
|
327
449
|
|
|
328
|
-
|
|
329
|
-
- Verify that the dark mode classes are being applied to the document
|
|
330
|
-
- Ensure localStorage is accessible in your environment
|
|
450
|
+
### Components Not Styled
|
|
331
451
|
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
- Ensure the theme name is correctly referenced in the settings
|
|
452
|
+
1. Use theme-aware classes: `themed-button`, `themed-card`, etc.
|
|
453
|
+
2. Import components from `@admin-layout/tailwind-ui`
|
|
454
|
+
3. Check that CSS custom properties are loaded
|
|
336
455
|
|
|
337
456
|
## Contributing
|
|
338
457
|
|
|
339
458
|
When contributing to the theme system:
|
|
340
459
|
|
|
341
|
-
1. Follow the
|
|
342
|
-
2.
|
|
343
|
-
3.
|
|
344
|
-
4.
|
|
345
|
-
5.
|
|
460
|
+
1. **Follow the CSS Custom Properties pattern**
|
|
461
|
+
2. **Use semantic color names**
|
|
462
|
+
3. **Test across all themes**
|
|
463
|
+
4. **Ensure accessibility compliance**
|
|
464
|
+
5. **Update documentation for new features**
|
|
465
|
+
|
|
466
|
+
## Examples
|
|
467
|
+
|
|
468
|
+
See the demo applications for complete examples:
|
|
469
|
+
|
|
470
|
+
- `packages-modules/demo/tailwind-browser` - Tailwind examples
|
|
471
|
+
- `packages-modules/demo/chakra-browser` - Chakra UI examples
|