@admin-layout/tailwind-design-pro 11.0.4-alpha.4 → 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 +471 -1
- package/lib/cdm-locales/en/menu.json +2 -1
- package/lib/cdm-locales/en/settings.json +40 -1
- package/lib/cdm-locales/es/menu.json +2 -1
- package/lib/cdm-locales/es/settings.json +42 -3
- 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 -12
- package/lib/components/Layout/BasicLayout/index.d.ts.map +1 -1
- package/lib/components/Layout/BasicLayout/index.js +274 -108
- 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 +1 -8
- 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 +1 -15
- package/lib/components/Layout/GlobalHeader/Header.d.ts.map +1 -1
- package/lib/components/Layout/GlobalHeader/Header.js +107 -65
- package/lib/components/Layout/GlobalHeader/Header.js.map +1 -1
- package/lib/components/Layout/GlobalHeader/MainHeader.d.ts +4 -0
- package/lib/components/Layout/GlobalHeader/MainHeader.d.ts.map +1 -0
- package/lib/components/Layout/GlobalHeader/MainHeader.js +187 -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 +26 -30
- package/lib/components/Layout/GlobalHeader/OrganizationDropdown.js.map +1 -1
- package/lib/components/Layout/GlobalHeader/RightContent.d.ts +3 -16
- package/lib/components/Layout/GlobalHeader/RightContent.d.ts.map +1 -1
- package/lib/components/Layout/GlobalHeader/RightContent.js +86 -0
- package/lib/components/Layout/GlobalHeader/RightContent.js.map +1 -0
- 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 +248 -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 +109 -0
- package/lib/components/Layout/GlobalHeader/SearchBar.js.map +1 -0
- package/lib/components/Layout/GlobalHeader/index.d.ts +3 -0
- package/lib/components/Layout/GlobalHeader/index.d.ts.map +1 -0
- package/lib/components/Layout/ProTailwindLayout.d.ts +3 -1
- package/lib/components/Layout/ProTailwindLayout.d.ts.map +1 -1
- package/lib/components/Layout/ProTailwindLayout.js +77 -12
- 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 -31
- 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 +5 -0
- package/lib/components/Layout/Sidebar/DynamicIcon.d.ts.map +1 -0
- package/lib/components/Layout/Sidebar/DynamicIcon.js +50 -0
- package/lib/components/Layout/Sidebar/DynamicIcon.js.map +1 -0
- 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 +46 -13
- 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 +5 -0
- package/lib/components/Layout/slot-fill/AdditionalSettings.d.ts.map +1 -0
- package/lib/components/Layout/slot-fill/AdditionalSettings.js +7 -0
- package/lib/components/Layout/slot-fill/AdditionalSettings.js.map +1 -0
- package/lib/components/Layout/slot-fill/Footer.d.ts +4 -3
- 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 +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 +4 -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 +4 -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/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 +4 -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/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 +6 -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/SettingDrawer.d.ts +2 -25
- package/lib/components/SettingDrawer/SettingDrawer.d.ts.map +1 -1
- package/lib/components/SettingDrawer/SettingDrawer.js +203 -382
- 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/utils/types.d.ts +105 -0
- package/lib/components/SettingDrawer/utils/types.d.ts.map +1 -0
- package/lib/components/UpdateSettingsResource/UpdateSettingsResource.server.d.ts +16 -1
- 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 +2 -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 +154 -50
- package/lib/components/typings.d.ts.map +1 -1
- package/lib/compute.d.ts.map +1 -1
- package/lib/compute.js +16 -6
- 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.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 +21 -0
- package/lib/config/env-config.d.ts.map +1 -1
- package/lib/config/env-config.js +86 -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 +8 -5
- package/lib/helpers/DynamicIcon.d.ts.map +1 -1
- package/lib/helpers/DynamicIcon.js +50 -0
- package/lib/helpers/DynamicIcon.js.map +1 -0
- package/lib/hooks/index.d.ts +3 -0
- package/lib/hooks/index.d.ts.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/icons.d.ts +18 -0
- package/lib/icons.d.ts.map +1 -0
- package/lib/icons.js +14 -0
- package/lib/icons.js.map +1 -0
- package/lib/index.d.ts +3 -3
- 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 +29 -0
- package/lib/machines/settingsMachine.d.ts.map +1 -0
- package/lib/machines/settingsMachine.js +171 -0
- package/lib/machines/settingsMachine.js.map +1 -0
- package/lib/machines/types.d.ts +272 -0
- package/lib/machines/types.d.ts.map +1 -0
- package/lib/machines/types.js +5 -0
- package/lib/machines/types.js.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/routes.json +10 -1
- package/lib/styles/index.css +667 -45
- package/lib/tailwindConfig.d.ts +100 -0
- package/lib/tailwindConfig.d.ts.map +1 -0
- package/lib/tailwindConfig.js +101 -0
- package/lib/tailwindConfig.js.map +1 -0
- 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/formateCarData.d.ts +2 -0
- package/lib/utils/formateCarData.d.ts.map +1 -0
- package/lib/utils/isBrowser/index.js.map +1 -1
- package/lib/utils/menu.d.ts.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/test-utils.d.ts.map +1 -1
- package/lib/utils/utils/index.d.ts.map +1 -1
- package/lib/utils/utils/index.js.map +1 -1
- package/package.json +7 -15
- 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/Layout/Sidebar/Sidebar.d.ts +0 -15
- package/lib/components/Layout/Sidebar/Sidebar.d.ts.map +0 -1
- package/lib/components/Layout/Sidebar/Sidebar.js +0 -141
- package/lib/components/Layout/Sidebar/Sidebar.js.map +0 -1
- package/lib/components/Layout/Sidebar/SidebarMenu.d.ts +0 -6
- package/lib/components/Layout/Sidebar/SidebarMenu.d.ts.map +0 -1
- package/lib/components/Layout/Sidebar/SidebarMenu.js +0 -89
- package/lib/components/Layout/Sidebar/SidebarMenu.js.map +0 -1
- package/lib/components/SettingDrawer/CheckBoxTheme.d.ts +0 -8
- package/lib/components/SettingDrawer/CheckBoxTheme.d.ts.map +0 -1
- package/lib/components/SettingDrawer/CheckBoxTheme.js +0 -48
- package/lib/components/SettingDrawer/CheckBoxTheme.js.map +0 -1
- package/lib/components/SettingDrawer/LayoutChange.d.ts +0 -7
- package/lib/components/SettingDrawer/LayoutChange.d.ts.map +0 -1
- package/lib/components/SettingDrawer/LayoutChange.js +0 -69
- package/lib/components/SettingDrawer/LayoutChange.js.map +0 -1
- package/lib/components/SettingDrawer/RegionalSettings.d.ts +0 -8
- package/lib/components/SettingDrawer/RegionalSettings.d.ts.map +0 -1
- package/lib/components/SettingDrawer/RegionalSettings.js +0 -95
- package/lib/components/SettingDrawer/RegionalSettings.js.map +0 -1
- package/lib/components/SettingDrawer/Switch/index.d.ts +0 -9
- package/lib/components/SettingDrawer/Switch/index.d.ts.map +0 -1
- package/lib/components/SettingDrawer/Switch/index.js +0 -39
- package/lib/components/SettingDrawer/Switch/index.js.map +0 -1
- package/lib/components/SettingDrawer/ThemeColor.d.ts +0 -8
- package/lib/components/SettingDrawer/ThemeColor.d.ts.map +0 -1
- package/lib/components/SettingDrawer/ThemeColor.js +0 -32
- package/lib/components/SettingDrawer/ThemeColor.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/lib/utils/index.d.ts +0 -2
- package/lib/utils/index.d.ts.map +0 -1
- package/lib/utils/index.js +0 -13
- package/lib/utils/index.js.map +0 -1
|
@@ -0,0 +1,294 @@
|
|
|
1
|
+
import React__default,{useState,useRef,useEffect}from'react';import {Link}from'@remix-run/react';import {useAppSelector}from'@admin-layout/client';import {generateMenuPath}from'../util.js';import {renderDynamicIcon}from'../../../helpers/DynamicIcon.js';import switchDialogs from'@app/dialog/WrappedDialogsSwitch';const DialogComponent = ({
|
|
2
|
+
path,
|
|
3
|
+
onClose
|
|
4
|
+
}) => {
|
|
5
|
+
const [dialog, setDialog] = useState(null);
|
|
6
|
+
useEffect(() => {
|
|
7
|
+
if (!dialog) {
|
|
8
|
+
switchDialogs(path).then(component => {
|
|
9
|
+
setDialog(component);
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
}, []);
|
|
13
|
+
return dialog ? React__default.createElement(dialog.default, {
|
|
14
|
+
onClose: onClose
|
|
15
|
+
}) : React__default.createElement("div", null, "Loading...");
|
|
16
|
+
};
|
|
17
|
+
const BottomMenu = ({
|
|
18
|
+
menuData,
|
|
19
|
+
routeParams,
|
|
20
|
+
getMenuSeparation,
|
|
21
|
+
scrolled,
|
|
22
|
+
settings,
|
|
23
|
+
authorities,
|
|
24
|
+
isMobile,
|
|
25
|
+
picture
|
|
26
|
+
}) => {
|
|
27
|
+
const [MenusList, setMenusList] = useState();
|
|
28
|
+
const [isOpen, setIsOpen] = useState(false);
|
|
29
|
+
const [openedModalKey, setOpenedModalKey] = React__default.useState(null);
|
|
30
|
+
const menuRef = useRef(null);
|
|
31
|
+
const {
|
|
32
|
+
t
|
|
33
|
+
} = {
|
|
34
|
+
t: key => key
|
|
35
|
+
}; // Mock translation function
|
|
36
|
+
// const cancelRef = React.useRef();
|
|
37
|
+
const {
|
|
38
|
+
profile = {}
|
|
39
|
+
} = useAppSelector(state => state?.user || {});
|
|
40
|
+
const {
|
|
41
|
+
nickname,
|
|
42
|
+
picture: profilePicture
|
|
43
|
+
} = profile || {};
|
|
44
|
+
const onOpen = () => setIsOpen(true);
|
|
45
|
+
const onClose = () => setIsOpen(false);
|
|
46
|
+
const toggleMenu = () => setIsOpen(!isOpen);
|
|
47
|
+
const accountMenuItems = menuData?.find(menu => menu.key === 'account');
|
|
48
|
+
const logoutMenuItems = menuData?.filter(menu => menu.key === 'logout.modal');
|
|
49
|
+
// Handle outside clicks to close the menu
|
|
50
|
+
useEffect(() => {
|
|
51
|
+
const handleClickOutside = event => {
|
|
52
|
+
if (menuRef.current && !menuRef.current.contains(event.target)) {
|
|
53
|
+
setIsOpen(false);
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
// Handle escape key to close the menu
|
|
57
|
+
const handleEscKey = event => {
|
|
58
|
+
if (event.key === 'Escape') {
|
|
59
|
+
setIsOpen(false);
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
if (isOpen) {
|
|
63
|
+
document.addEventListener('mousedown', handleClickOutside);
|
|
64
|
+
document.addEventListener('keydown', handleEscKey);
|
|
65
|
+
}
|
|
66
|
+
return () => {
|
|
67
|
+
document.removeEventListener('mousedown', handleClickOutside);
|
|
68
|
+
document.removeEventListener('keydown', handleEscKey);
|
|
69
|
+
};
|
|
70
|
+
}, [isOpen]);
|
|
71
|
+
const newMenuData = menuData?.filter(m => !m.hideInMenu)?.map(m => {
|
|
72
|
+
if (!m.hideInMenu) {
|
|
73
|
+
const path = generateMenuPath(m.path, routeParams);
|
|
74
|
+
return {
|
|
75
|
+
...m,
|
|
76
|
+
path
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
useEffect(() => {
|
|
81
|
+
setMenusList(getMenuSeparation(newMenuData));
|
|
82
|
+
}, [authorities]);
|
|
83
|
+
const conversionPath = path => {
|
|
84
|
+
if (path && path.indexOf('http') === 0) {
|
|
85
|
+
return path;
|
|
86
|
+
}
|
|
87
|
+
if (path && path.indexOf('/http') === 0) {
|
|
88
|
+
return path.replace(/^\//g, '');
|
|
89
|
+
}
|
|
90
|
+
return `/${path || ''}`.replace(/\/+/g, '/');
|
|
91
|
+
};
|
|
92
|
+
const getMenuItemModal = item => {
|
|
93
|
+
// const icon = this.getIcon(item.icon);
|
|
94
|
+
const {
|
|
95
|
+
key,
|
|
96
|
+
name,
|
|
97
|
+
icon
|
|
98
|
+
} = item;
|
|
99
|
+
return React__default.createElement("button", {
|
|
100
|
+
onClick: () => {
|
|
101
|
+
setOpenedModalKey(key);
|
|
102
|
+
setIsOpen(false); // Close the dropdown when opening a modal
|
|
103
|
+
},
|
|
104
|
+
className: "flex items-center w-full px-3 py-2 text-left text-foreground hover:bg-muted",
|
|
105
|
+
role: "menuitem"
|
|
106
|
+
}, React__default.createElement("div", {
|
|
107
|
+
className: "mr-3"
|
|
108
|
+
}, renderDynamicIcon(icon)), t(name));
|
|
109
|
+
};
|
|
110
|
+
/**
|
|
111
|
+
* Judge whether it is http link.return or a Link
|
|
112
|
+
* @memberOf SiderMenu
|
|
113
|
+
*/
|
|
114
|
+
const getMenuItemPath = item => {
|
|
115
|
+
// const { styles = {} } = props;
|
|
116
|
+
const itemPath = conversionPath(item.path);
|
|
117
|
+
// const icon = this.getIcon(item.icon);
|
|
118
|
+
const {
|
|
119
|
+
target,
|
|
120
|
+
name,
|
|
121
|
+
icon
|
|
122
|
+
} = item;
|
|
123
|
+
// Is it a http link
|
|
124
|
+
if (/^https?:\/\//.test(itemPath)) {
|
|
125
|
+
return React__default.createElement("a", {
|
|
126
|
+
href: itemPath,
|
|
127
|
+
target: target,
|
|
128
|
+
onClick: onClose,
|
|
129
|
+
className: "flex items-center w-full p-3 text-foreground hover:bg-muted",
|
|
130
|
+
role: "menuitem"
|
|
131
|
+
}, React__default.createElement("div", {
|
|
132
|
+
className: "mr-3"
|
|
133
|
+
}, renderDynamicIcon(icon), " "), React__default.createElement("span", {
|
|
134
|
+
className: "ml-1"
|
|
135
|
+
}, name));
|
|
136
|
+
}
|
|
137
|
+
return React__default.createElement(Link, {
|
|
138
|
+
to: itemPath,
|
|
139
|
+
onClick: onClose,
|
|
140
|
+
className: "flex items-center w-full px-3 py-2 text-left text-foreground hover:bg-muted",
|
|
141
|
+
role: "menuitem"
|
|
142
|
+
}, React__default.createElement("div", {
|
|
143
|
+
className: "mr-3"
|
|
144
|
+
}, renderDynamicIcon(icon)), name);
|
|
145
|
+
};
|
|
146
|
+
const getMenuModals = () => {
|
|
147
|
+
let dialogMenus = [];
|
|
148
|
+
const upperMenus = MenusList?.upperMenus?.filter(x => x.modal === true);
|
|
149
|
+
const middleMenus = MenusList?.middleMenus?.filter(x => x.modal === true);
|
|
150
|
+
const lowerMenus = MenusList?.lowerMenus?.filter(x => x.modal === true);
|
|
151
|
+
const bottomMenus = MenusList?.bottomMenus?.filter(x => x.modal === true);
|
|
152
|
+
if (upperMenus?.length > 0) dialogMenus = dialogMenus.concat(...upperMenus);
|
|
153
|
+
if (middleMenus?.length > 0) dialogMenus = dialogMenus.concat(...middleMenus);
|
|
154
|
+
if (lowerMenus?.length > 0) dialogMenus = dialogMenus.concat(...lowerMenus);
|
|
155
|
+
if (bottomMenus?.length > 0) dialogMenus = dialogMenus.concat(...bottomMenus);
|
|
156
|
+
return dialogMenus.map((item, k) => {
|
|
157
|
+
const {
|
|
158
|
+
dialogPath,
|
|
159
|
+
key,
|
|
160
|
+
name
|
|
161
|
+
} = item;
|
|
162
|
+
return key === openedModalKey && React__default.createElement("div", {
|
|
163
|
+
key: k,
|
|
164
|
+
className: "fixed inset-0 z-50 overflow-y-auto"
|
|
165
|
+
}, React__default.createElement("div", {
|
|
166
|
+
className: "flex items-center justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0"
|
|
167
|
+
}, React__default.createElement("div", {
|
|
168
|
+
className: "fixed inset-0 transition-opacity",
|
|
169
|
+
"aria-hidden": "true"
|
|
170
|
+
}, React__default.createElement("div", {
|
|
171
|
+
className: "absolute inset-0 bg-black bg-opacity-50",
|
|
172
|
+
onClick: () => {
|
|
173
|
+
onClose();
|
|
174
|
+
setOpenedModalKey(null);
|
|
175
|
+
}
|
|
176
|
+
})), React__default.createElement("span", {
|
|
177
|
+
className: "hidden sm:inline-block sm:align-middle sm:h-screen",
|
|
178
|
+
"aria-hidden": "true"
|
|
179
|
+
}, "\u200B"), React__default.createElement("div", {
|
|
180
|
+
className: "inline-block align-bottom rounded-themed-lg text-left overflow-hidden shadow-themed-xl transform transition-all sm:my-8 sm:align-middle sm:max-w-lg sm:w-full themed-modal",
|
|
181
|
+
role: "dialog",
|
|
182
|
+
"aria-modal": "true",
|
|
183
|
+
"aria-labelledby": "modal-headline"
|
|
184
|
+
}, React__default.createElement("div", {
|
|
185
|
+
className: "px-4 pt-5 pb-4 sm:p-6 sm:pb-4"
|
|
186
|
+
}, React__default.createElement("div", {
|
|
187
|
+
className: "flex justify-end"
|
|
188
|
+
}, React__default.createElement("button", {
|
|
189
|
+
type: "button",
|
|
190
|
+
className: "rounded-themed text-muted-foreground hover:text-foreground focus-themed",
|
|
191
|
+
onClick: () => {
|
|
192
|
+
onClose();
|
|
193
|
+
setOpenedModalKey(null);
|
|
194
|
+
}
|
|
195
|
+
}, React__default.createElement("span", {
|
|
196
|
+
className: "sr-only"
|
|
197
|
+
}, "Close"), React__default.createElement("svg", {
|
|
198
|
+
className: "h-6 w-6",
|
|
199
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
200
|
+
fill: "none",
|
|
201
|
+
viewBox: "0 0 24 24",
|
|
202
|
+
stroke: "currentColor",
|
|
203
|
+
"aria-hidden": "true"
|
|
204
|
+
}, React__default.createElement("path", {
|
|
205
|
+
strokeLinecap: "round",
|
|
206
|
+
strokeLinejoin: "round",
|
|
207
|
+
strokeWidth: "2",
|
|
208
|
+
d: "M6 18L18 6M6 6l12 12"
|
|
209
|
+
})))), React__default.createElement("div", {
|
|
210
|
+
className: "mt-2"
|
|
211
|
+
}, React__default.createElement(DialogComponent, {
|
|
212
|
+
path: dialogPath,
|
|
213
|
+
onClose: () => {
|
|
214
|
+
onClose();
|
|
215
|
+
setOpenedModalKey(null);
|
|
216
|
+
}
|
|
217
|
+
}))))));
|
|
218
|
+
});
|
|
219
|
+
};
|
|
220
|
+
return React__default.createElement(React__default.Fragment, null, React__default.createElement("div", {
|
|
221
|
+
className: "relative",
|
|
222
|
+
ref: menuRef,
|
|
223
|
+
onMouseEnter: onOpen
|
|
224
|
+
}, React__default.createElement("div", {
|
|
225
|
+
className: "flex items-center gap-2",
|
|
226
|
+
onClick: toggleMenu
|
|
227
|
+
}, React__default.createElement("button", {
|
|
228
|
+
className: `
|
|
229
|
+
inline-flex items-center justify-center bg-muted hover:bg-muted-foreground text-foreground rounded-full h-12 w-12 min-w-[48px] outline-none transform transition-colors duration-200
|
|
230
|
+
`,
|
|
231
|
+
"aria-expanded": "false"
|
|
232
|
+
}, picture ? React__default.createElement("img", {
|
|
233
|
+
src: picture,
|
|
234
|
+
className: "rounded-full",
|
|
235
|
+
alt: "User"
|
|
236
|
+
}) : React__default.createElement("svg", {
|
|
237
|
+
className: "h-6 w-6 text-foreground",
|
|
238
|
+
fill: "none",
|
|
239
|
+
stroke: "currentColor",
|
|
240
|
+
viewBox: "0 0 24 24",
|
|
241
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
242
|
+
}, React__default.createElement("path", {
|
|
243
|
+
strokeLinecap: "round",
|
|
244
|
+
strokeLinejoin: "round",
|
|
245
|
+
strokeWidth: "2",
|
|
246
|
+
d: "M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z"
|
|
247
|
+
}))), isMobile && React__default.createElement("span", {
|
|
248
|
+
className: "text-lg font-medium"
|
|
249
|
+
}, t(nickname))), isOpen && React__default.createElement("div", {
|
|
250
|
+
className: "bg-background absolute bottom-full mb-2 w-72 rounded-themed shadow-themed-lg py-1 themed-dropdown ring-1 ring-border focus:outline-none z-40",
|
|
251
|
+
role: "menu",
|
|
252
|
+
"aria-orientation": "vertical",
|
|
253
|
+
"aria-labelledby": "user-menu"
|
|
254
|
+
}, MenusList?.upperMenus?.map((item, k) => React__default.createElement("div", {
|
|
255
|
+
key: k,
|
|
256
|
+
className: "px-1 py-1"
|
|
257
|
+
}, item.modal ? getMenuItemModal(item) : getMenuItemPath(item))), MenusList?.upperMenus?.length > 0 && MenusList?.middleMenus?.length > 0 && React__default.createElement("hr", {
|
|
258
|
+
className: "border-border my-1"
|
|
259
|
+
}), MenusList?.middleMenus?.map((item, k) => React__default.createElement("div", {
|
|
260
|
+
key: k,
|
|
261
|
+
className: "px-1 py-1"
|
|
262
|
+
}, item.modal ? getMenuItemModal(item) : getMenuItemPath(item))), profile && accountMenuItems?.children && React__default.createElement("div", {
|
|
263
|
+
className: "py-2"
|
|
264
|
+
}, accountMenuItems.children.map(item => React__default.createElement(Link, {
|
|
265
|
+
key: item.key,
|
|
266
|
+
className: "flex items-center justify-between px-4 py-2 text-sm text-gray-700 hover:bg-gray-50 cursor-pointer transition-colors",
|
|
267
|
+
to: generateMenuPath(item.path, routeParams)
|
|
268
|
+
}, React__default.createElement("div", {
|
|
269
|
+
className: "flex items-center"
|
|
270
|
+
}, React__default.createElement("span", {
|
|
271
|
+
className: "mr-3 text-base"
|
|
272
|
+
}, item.icon), React__default.createElement("span", null, item.name)), item.hasNotification && React__default.createElement("div", {
|
|
273
|
+
className: "w-2 h-2 bg-blue-500 rounded-full"
|
|
274
|
+
})))), profile && React__default.createElement("hr", {
|
|
275
|
+
className: "border-border my-1"
|
|
276
|
+
}), profile && React__default.createElement("div", {
|
|
277
|
+
className: "flex items-center px-4 py-2"
|
|
278
|
+
}, React__default.createElement("div", {
|
|
279
|
+
className: "w-8 h-8 rounded-full bg-red-500 flex items-center justify-center overflow-hidden mr-3"
|
|
280
|
+
}, picture ? React__default.createElement("img", {
|
|
281
|
+
src: picture,
|
|
282
|
+
alt: nickname || 'Guest',
|
|
283
|
+
className: "w-full h-full object-cover"
|
|
284
|
+
}) : React__default.createElement("span", {
|
|
285
|
+
className: "text-white text-sm font-medium"
|
|
286
|
+
}, (nickname || 'Guest').charAt(0).toUpperCase())), React__default.createElement("span", {
|
|
287
|
+
className: "text-sm font-medium"
|
|
288
|
+
}, nickname || 'Guest')), logoutMenuItems?.length > 0 && React__default.createElement("hr", {
|
|
289
|
+
className: "border-border my-1"
|
|
290
|
+
}), logoutMenuItems?.map((item, k) => React__default.createElement("div", {
|
|
291
|
+
key: k,
|
|
292
|
+
className: "px-1 py-1"
|
|
293
|
+
}, item.modal ? getMenuItemModal(item) : getMenuItemPath(item))))), getMenuModals());
|
|
294
|
+
};export{BottomMenu};//# sourceMappingURL=BottomMenu.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BottomMenu.js","sources":["../../../../src/components/Layout/Sidebar/BottomMenu.tsx"],"sourcesContent":[null],"names":["React"],"mappings":"yTASA,MAAM,eAAe,GAAkB,CAAC;MACpC;;;eAIQ,EAAA,SAAc,IAAI,QAAQ,CAAA,IAAA,CAAA;kBACtB;AACJ,IAAA,IAAA,CAAA,MAAG,EAAA;mBACN,CAAA,IAAA,CAAA,CAAA,IAAA,CAAA,SAAA,IAAA;QACF,SAAI,CAAA,SAAA,CAAA;AAEP,MAAA,CAAA,CAAA;AACJ,IAAE;AAEF,EAAA,CAAA,EAAA,EAAO;SAUH,uBAAkB,CAAA,aAAa,CAAG,MAAA,CAAA,OAA+B,EAAA;IACjE,OAAO,EAAA;AACP,GAAA,CAAA,GAAAA,cAAO,CAAA,aAAc,CAAE,KAAA,EAAA,IAAA,EAAA,YAAqB,CAAK;AACjD,CAAA;AACQ,MAAC,UAAU,GAAC,CAAG;UACvB;AAEA,EAAA,WAAQ;mBACA;UAEF;UACA;aACA;AACN,EAAA,QAAM;AACN,EAAA;MAEA;QACA,CAAA,SAAa,EAAE,YAAA,CAAA,GAAA,QAAA,EAAA;AACX,EAAA,MAAA,CAAA,MAAM,EAAA,SAAA,CAAA,GAAA,QAAsB,CAAA,KAAmB,CAAE;AAC7C,EAAA,MAAA,CAAA,cAAW,EAAC,kBAAmB,GAACA,cAAO,CAAC,QAAQ,CAAC,IAAA,CAAK;kBAClD,MAAA,CAAS,IAAC,CAAA;;AAElB,IAAA;;AAGA,IAAA,CAAA,EAAA,GAAA,IAAM;AACF,GAAA,C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AA,CAAA,IAAA,EAAA,CAAA,KAAe;AAQpC,MAAA,MAAA;AAEA,QAAA,UAAA;;;;AAsBA,MAAA,OAAA,GAAA,KAAA,cAAiB,IAAKA,cAAM,CAAC,aAC1B,CAAA,KAAA,EAAA;QAOf,GAAA,EAAA,CAAA;AAGb,QAAE,SAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,33 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
* Text to display in the middle of the divider
|
|
5
|
-
*/
|
|
6
|
-
children?: React.ReactNode;
|
|
7
|
-
/**
|
|
8
|
-
* Direction of the divider
|
|
9
|
-
* @default "horizontal"
|
|
10
|
-
*/
|
|
11
|
-
orientation?: 'horizontal' | 'vertical';
|
|
12
|
-
/**
|
|
13
|
-
* Whether the divider text is less emphasized
|
|
14
|
-
* @default false
|
|
15
|
-
*/
|
|
16
|
-
plain?: boolean;
|
|
17
|
-
/**
|
|
18
|
-
* Custom className for the divider
|
|
19
|
-
*/
|
|
20
|
-
className?: string;
|
|
21
|
-
/**
|
|
22
|
-
* Custom style for the divider
|
|
23
|
-
*/
|
|
24
|
-
style?: React.CSSProperties;
|
|
25
|
-
/**
|
|
26
|
-
* Text alignment
|
|
27
|
-
* @default "center"
|
|
28
|
-
*/
|
|
29
|
-
align?: 'left' | 'right' | 'center';
|
|
30
|
-
}
|
|
31
|
-
export declare function Divider({ children, orientation, plain, className, style, align, ...props }: DividerProps): import("react/jsx-runtime").JSX.Element;
|
|
32
|
-
export {};
|
|
2
|
+
import { DividerProps } from '../../typings';
|
|
3
|
+
export declare function Divider({ children, orientation, plain, className, style, align, ...props }: DividerProps): React.JSX.Element;
|
|
33
4
|
//# sourceMappingURL=Divider.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Divider.d.ts","sourceRoot":"","sources":["../../../../src/components/Layout/Sidebar/Divider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Divider.d.ts","sourceRoot":"","sources":["../../../../src/components/Layout/Sidebar/Divider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAE7C,wBAAgB,OAAO,CAAC,EACpB,QAAQ,EACR,WAA0B,EAC1B,KAAa,EACb,SAAS,EACT,KAAK,EACL,KAAgB,EAChB,GAAG,KAAK,EACX,EAAE,YAAY,qBAgEd"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React__default from'react';import {cn}from'../../../utils/utils/index.js';function Divider({
|
|
2
2
|
children,
|
|
3
3
|
orientation = 'horizontal',
|
|
4
4
|
plain = false,
|
|
@@ -9,39 +9,37 @@ import {jsx,jsxs}from'react/jsx-runtime';import {cn}from'../../../utils/utils/in
|
|
|
9
9
|
}) {
|
|
10
10
|
// If there's no children, render a simple divider
|
|
11
11
|
if (!children) {
|
|
12
|
-
return
|
|
12
|
+
return React__default.createElement("div", {
|
|
13
13
|
className: cn(orientation === 'horizontal' ? 'w-full border-t' : 'h-full border-l', 'border-gray-200 dark:border-gray-700', className),
|
|
14
14
|
style: style,
|
|
15
15
|
...props
|
|
16
16
|
});
|
|
17
17
|
}
|
|
18
18
|
// With children, render a divider with text
|
|
19
|
-
return
|
|
19
|
+
return React__default.createElement("div", {
|
|
20
20
|
className: cn('flex items-center w-full', orientation === 'vertical' && 'flex-col h-full', className),
|
|
21
21
|
style: style,
|
|
22
|
-
...props
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
})]
|
|
46
|
-
});
|
|
22
|
+
...props
|
|
23
|
+
}, React__default.createElement("div", {
|
|
24
|
+
className: cn('border-gray-200 dark:border-gray-700', orientation === 'horizontal' ? 'border-t flex-grow' : 'border-l h-full', {
|
|
25
|
+
'flex-[30%]': align === 'left' && orientation === 'horizontal',
|
|
26
|
+
'flex-[70%]': align === 'right' && orientation === 'horizontal'
|
|
27
|
+
}),
|
|
28
|
+
style: {
|
|
29
|
+
borderColor: style?.borderColor
|
|
30
|
+
}
|
|
31
|
+
}), React__default.createElement("div", {
|
|
32
|
+
className: cn('px-4', orientation === 'vertical' && 'py-4', plain ? 'text-gray-500 font-normal' : 'text-gray-900 font-medium', 'dark:text-gray-300'),
|
|
33
|
+
style: {
|
|
34
|
+
color: style?.color
|
|
35
|
+
}
|
|
36
|
+
}, children), React__default.createElement("div", {
|
|
37
|
+
className: cn('border-gray-200 dark:border-gray-700', orientation === 'horizontal' ? 'border-t flex-grow' : 'border-l h-full', {
|
|
38
|
+
'flex-[70%]': align === 'left' && orientation === 'horizontal',
|
|
39
|
+
'flex-[30%]': align === 'right' && orientation === 'horizontal'
|
|
40
|
+
}),
|
|
41
|
+
style: {
|
|
42
|
+
borderColor: style?.borderColor
|
|
43
|
+
}
|
|
44
|
+
}));
|
|
47
45
|
}export{Divider};//# sourceMappingURL=Divider.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Divider.js","sources":["../../../../src/components/Layout/Sidebar/Divider.tsx"],"sourcesContent":[null],"names":["
|
|
1
|
+
{"version":3,"file":"Divider.js","sources":["../../../../src/components/Layout/Sidebar/Divider.tsx"],"sourcesContent":[null],"names":["React"],"mappings":"iFAIM,SAAU,OAAO,CAAC;UASpB;aACK,GAAA,YAAW;AACZ,EAAA,KAAA,GAAA,KAAO;WAWV;OAED;OACA,GAAA;AAMQ,EAAA,GAAA;AAKY,CAAA,EAAA;AACA;eAEP;yBAEG,CAAA,aAAa,CAAA,KAAO,EAAA;eACvB,EACH,EAAA,CAAA,WAAA,KAAA,YAAA,GAAA,iBAAA,GAAA,iBAAA,EAAA,sCAAA,EAAA,SAAA,CAAA;WACF,EAAA,KAAA;;AASK,KAAA,CAAA;AAIL,EAAA;AAKY;AACA,EAAA,OAAAA,cAAA,CAAA,aAAY,MAAE,EAAK;aACtB,EACJ,6BACM,EAAA,WAAA,KAAA,UAAA,IAAA,iBAAA,EAAA,SAAA,CAAA;gBACH;;AAKpB,GAAC,EAAAA,cAAA,CAAA,aAAA,CAAA,KAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { DynamicTypeIconsProps } from '../../typings';
|
|
3
|
+
export declare const renderDynamicIcon: (icon: any) => React.JSX.Element;
|
|
4
|
+
export declare const DynamicIcon: React.FC<DynamicTypeIconsProps>;
|
|
5
|
+
//# sourceMappingURL=DynamicIcon.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DynamicIcon.d.ts","sourceRoot":"","sources":["../../../../src/components/Layout/Sidebar/DynamicIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAGnD,OAAO,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AAEtD,eAAO,MAAM,iBAAiB,GAAI,SAAI,sBAQrC,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,qBAAqB,CAuCvD,CAAC"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import React__default,{useState,useEffect}from'react';import selectiveIcons from'@app/selectiveIcons';const renderDynamicIcon = icon => {
|
|
2
|
+
if (typeof icon === 'object') {
|
|
3
|
+
return React__default.createElement(DynamicIcon, {
|
|
4
|
+
icon: icon.name,
|
|
5
|
+
iconStyle: icon.style
|
|
6
|
+
});
|
|
7
|
+
} else if (typeof icon === 'string') {
|
|
8
|
+
return React__default.createElement(DynamicIcon, {
|
|
9
|
+
icon: icon
|
|
10
|
+
});
|
|
11
|
+
} else {
|
|
12
|
+
return null;
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
const DynamicIcon = React__default.memo(({
|
|
16
|
+
icon,
|
|
17
|
+
iconStyle,
|
|
18
|
+
...props
|
|
19
|
+
}) => {
|
|
20
|
+
const [IconComponent, setIconComponent] = useState(null);
|
|
21
|
+
useEffect(() => {
|
|
22
|
+
const loadIcon = () => {
|
|
23
|
+
if (!IconComponent) {
|
|
24
|
+
const selectedIcon = selectiveIcons(icon);
|
|
25
|
+
selectedIcon.then(module => {
|
|
26
|
+
if (typeof module.default === 'object') {
|
|
27
|
+
setIconComponent(() => module.default[icon]);
|
|
28
|
+
} else {
|
|
29
|
+
setIconComponent(() => module.default);
|
|
30
|
+
}
|
|
31
|
+
}).catch(err => {
|
|
32
|
+
setIconComponent(null);
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
loadIcon();
|
|
37
|
+
}, []);
|
|
38
|
+
if (!IconComponent) return null;
|
|
39
|
+
return React__default.createElement("div", {
|
|
40
|
+
style: {
|
|
41
|
+
margin: '0px',
|
|
42
|
+
display: 'flex'
|
|
43
|
+
}
|
|
44
|
+
}, IconComponent && React__default.createElement(IconComponent, {
|
|
45
|
+
style: {
|
|
46
|
+
...iconStyle
|
|
47
|
+
},
|
|
48
|
+
...props
|
|
49
|
+
}));
|
|
50
|
+
}, (prevProps, nextProps) => prevProps.icon === nextProps.icon);export{DynamicIcon,renderDynamicIcon};//# sourceMappingURL=DynamicIcon.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DynamicIcon.js","sources":["../../../../src/components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