@admin-layout/tailwind-design-pro 11.0.4-alpha.4 → 12.0.16-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 +401 -1
- package/lib/cdm-locales/en/settings.json +40 -1
- package/lib/cdm-locales/es/settings.json +42 -3
- package/lib/components/LanguageMenu/LanguageMenu.d.ts.map +1 -1
- package/lib/components/LanguageMenu/LanguageMenu.js +8 -18
- package/lib/components/LanguageMenu/LanguageMenu.js.map +1 -1
- package/lib/components/Layout/BasicLayout/index.d.ts +1 -8
- package/lib/components/Layout/BasicLayout/index.d.ts.map +1 -1
- package/lib/components/Layout/BasicLayout/index.js +141 -64
- package/lib/components/Layout/BasicLayout/index.js.map +1 -1
- package/lib/components/Layout/BasicLayout/utils.d.ts.map +1 -1
- package/lib/components/Layout/BasicLayout/utils.js +1 -14
- 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.map +1 -1
- package/lib/components/Layout/GlobalFooter/Copyright.d.ts.map +1 -1
- package/lib/components/Layout/GlobalFooter/Footer.d.ts.map +1 -1
- package/lib/components/Layout/GlobalHeader/Header.d.ts +1 -14
- package/lib/components/Layout/GlobalHeader/Header.d.ts.map +1 -1
- package/lib/components/Layout/GlobalHeader/Header.js +78 -53
- package/lib/components/Layout/GlobalHeader/Header.js.map +1 -1
- package/lib/components/Layout/GlobalHeader/Logo.d.ts +4 -0
- package/lib/components/Layout/GlobalHeader/Logo.d.ts.map +1 -0
- package/lib/components/Layout/GlobalHeader/Logo.js +141 -0
- package/lib/components/Layout/GlobalHeader/Logo.js.map +1 -0
- package/lib/components/Layout/GlobalHeader/MainHeader.d.ts +6 -0
- package/lib/components/Layout/GlobalHeader/MainHeader.d.ts.map +1 -0
- package/lib/components/Layout/GlobalHeader/MainHeader.js +228 -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 +4 -4
- package/lib/components/Layout/GlobalHeader/OrganizationDropdown.js.map +1 -1
- package/lib/components/Layout/GlobalHeader/RightContent.d.ts +2 -16
- package/lib/components/Layout/GlobalHeader/RightContent.d.ts.map +1 -1
- package/lib/components/Layout/GlobalHeader/RightContent.js +23 -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 +274 -0
- package/lib/components/Layout/GlobalHeader/RightMenu.js.map +1 -0
- package/lib/components/Layout/GlobalHeader/SearchBar.d.ts +9 -0
- package/lib/components/Layout/GlobalHeader/SearchBar.d.ts.map +1 -0
- package/lib/components/Layout/GlobalHeader/SearchBar.js +118 -0
- package/lib/components/Layout/GlobalHeader/SearchBar.js.map +1 -0
- package/lib/components/Layout/GlobalHeader/index.d.ts +4 -0
- package/lib/components/Layout/GlobalHeader/index.d.ts.map +1 -0
- package/lib/components/Layout/ProTailwindLayout.d.ts +2 -0
- package/lib/components/Layout/ProTailwindLayout.d.ts.map +1 -1
- package/lib/components/Layout/ProTailwindLayout.js +7 -3
- package/lib/components/Layout/ProTailwindLayout.js.map +1 -1
- package/lib/components/Layout/Sidebar/Divider.d.ts +1 -31
- package/lib/components/Layout/Sidebar/Divider.d.ts.map +1 -1
- package/lib/components/Layout/Sidebar/Divider.js.map +1 -1
- package/lib/components/Layout/Sidebar/DynamicIcon.d.ts +5 -0
- package/lib/components/Layout/Sidebar/DynamicIcon.d.ts.map +1 -0
- package/lib/components/Layout/Sidebar/DynamicIcon.js +51 -0
- package/lib/components/Layout/Sidebar/DynamicIcon.js.map +1 -0
- package/lib/components/Layout/Sidebar/Sidebar.d.ts +1 -11
- package/lib/components/Layout/Sidebar/Sidebar.d.ts.map +1 -1
- package/lib/components/Layout/Sidebar/Sidebar.js +117 -78
- package/lib/components/Layout/Sidebar/Sidebar.js.map +1 -1
- package/lib/components/Layout/Sidebar/SidebarMenu.d.ts +3 -5
- package/lib/components/Layout/Sidebar/SidebarMenu.d.ts.map +1 -1
- package/lib/components/Layout/Sidebar/SidebarMenu.js +132 -45
- package/lib/components/Layout/Sidebar/SidebarMenu.js.map +1 -1
- package/lib/components/Layout/TailwindLayout.d.ts.map +1 -1
- package/lib/components/Layout/TailwindLayout.js +34 -14
- 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 +4 -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 +1 -1
- package/lib/components/Layout/slot-fill/Footer.d.ts.map +1 -1
- package/lib/components/Layout/slot-fill/Footer.js +6 -6
- package/lib/components/Layout/slot-fill/Footer.js.map +1 -1
- package/lib/components/Layout/slot-fill/HeaderNotice.d.ts.map +1 -1
- package/lib/components/Layout/slot-fill/HeaderSearchBar.d.ts +3 -0
- package/lib/components/Layout/slot-fill/HeaderSearchBar.d.ts.map +1 -0
- package/lib/components/Layout/slot-fill/HeaderSearchBar.js +6 -0
- package/lib/components/Layout/slot-fill/HeaderSearchBar.js.map +1 -0
- package/lib/components/Layout/slot-fill/HeaderSearchButton.d.ts +3 -0
- package/lib/components/Layout/slot-fill/HeaderSearchButton.d.ts.map +1 -0
- package/lib/components/Layout/slot-fill/HeaderSearchButton.js +6 -0
- package/lib/components/Layout/slot-fill/HeaderSearchButton.js.map +1 -0
- package/lib/components/Layout/slot-fill/RightContent.d.ts +3 -0
- package/lib/components/Layout/slot-fill/RightContent.d.ts.map +1 -0
- package/lib/components/Layout/slot-fill/RightContent.js +6 -0
- package/lib/components/Layout/slot-fill/RightContent.js.map +1 -0
- package/lib/components/Layout/slot-fill/index.d.ts +4 -0
- package/lib/components/Layout/slot-fill/index.d.ts.map +1 -1
- package/lib/components/Layout/util.d.ts.map +1 -1
- package/lib/components/Layout/util.js +12 -0
- package/lib/components/Layout/util.js.map +1 -0
- package/lib/components/SettingDrawer/CheckBoxTheme.d.ts +1 -6
- package/lib/components/SettingDrawer/CheckBoxTheme.d.ts.map +1 -1
- package/lib/components/SettingDrawer/CheckBoxTheme.js +106 -31
- package/lib/components/SettingDrawer/CheckBoxTheme.js.map +1 -1
- package/lib/components/SettingDrawer/InvitationSettings.d.ts +3 -0
- package/lib/components/SettingDrawer/InvitationSettings.d.ts.map +1 -0
- package/lib/components/SettingDrawer/InvitationSettings.js +79 -0
- package/lib/components/SettingDrawer/InvitationSettings.js.map +1 -0
- package/lib/components/SettingDrawer/LayoutChange.d.ts +2 -6
- package/lib/components/SettingDrawer/LayoutChange.d.ts.map +1 -1
- package/lib/components/SettingDrawer/LayoutChange.js +84 -30
- package/lib/components/SettingDrawer/LayoutChange.js.map +1 -1
- package/lib/components/SettingDrawer/NavigationsModes.d.ts +3 -0
- package/lib/components/SettingDrawer/NavigationsModes.d.ts.map +1 -0
- package/lib/components/SettingDrawer/NavigationsModes.js +289 -0
- package/lib/components/SettingDrawer/NavigationsModes.js.map +1 -0
- package/lib/components/SettingDrawer/RegionalSettings.d.ts +1 -6
- package/lib/components/SettingDrawer/RegionalSettings.d.ts.map +1 -1
- package/lib/components/SettingDrawer/RegionalSettings.js +696 -51
- package/lib/components/SettingDrawer/RegionalSettings.js.map +1 -1
- 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 +249 -113
- package/lib/components/SettingDrawer/SettingDrawer.js.map +1 -1
- package/lib/components/SettingDrawer/Switch/index.d.ts +2 -8
- package/lib/components/SettingDrawer/Switch/index.d.ts.map +1 -1
- package/lib/components/SettingDrawer/Switch/index.js +17 -34
- package/lib/components/SettingDrawer/Switch/index.js.map +1 -1
- package/lib/components/SettingDrawer/ThemeColor.d.ts +1 -6
- package/lib/components/SettingDrawer/ThemeColor.d.ts.map +1 -1
- package/lib/components/SettingDrawer/ThemeColor.js +3 -0
- package/lib/components/SettingDrawer/ThemeColor.js.map +1 -1
- package/lib/components/SettingDrawer/ThemeSelector.d.ts +3 -0
- package/lib/components/SettingDrawer/ThemeSelector.d.ts.map +1 -0
- package/lib/components/SettingDrawer/ThemeSelector.js +18 -0
- package/lib/components/SettingDrawer/ThemeSelector.js.map +1 -0
- package/lib/components/SettingDrawer/WebFontsSelector.d.ts +3 -0
- package/lib/components/SettingDrawer/WebFontsSelector.d.ts.map +1 -0
- package/lib/components/SettingDrawer/WebFontsSelector.js +24 -0
- package/lib/components/SettingDrawer/WebFontsSelector.js.map +1 -0
- package/lib/components/SettingDrawer/types.d.ts +91 -0
- package/lib/components/SettingDrawer/types.d.ts.map +1 -0
- package/lib/components/UI/CardList.d.ts +61 -0
- package/lib/components/UI/CardList.d.ts.map +1 -0
- package/lib/components/UI/CardList.js +43 -0
- package/lib/components/UI/CardList.js.map +1 -0
- package/lib/components/UI/CategoriesTypeList.d.ts +29 -0
- package/lib/components/UI/CategoriesTypeList.d.ts.map +1 -0
- package/lib/components/UI/CategoriesTypeList.js +139 -0
- package/lib/components/UI/CategoriesTypeList.js.map +1 -0
- package/lib/components/UI/LazyLoadingGoogleMarker.d.ts +83 -0
- package/lib/components/UI/LazyLoadingGoogleMarker.d.ts.map +1 -0
- package/lib/components/UI/LazyLoadingGoogleMarker.js +107 -0
- package/lib/components/UI/LazyLoadingGoogleMarker.js.map +1 -0
- package/lib/components/UI/Pagination.d.ts +6 -0
- package/lib/components/UI/Pagination.d.ts.map +1 -0
- package/lib/components/UI/Pagination.js +56 -0
- package/lib/components/UI/Pagination.js.map +1 -0
- package/lib/components/UI/ParamSearchResultContainer.d.ts +99 -0
- package/lib/components/UI/ParamSearchResultContainer.d.ts.map +1 -0
- package/lib/components/UI/ParamSearchResultContainer.js +120 -0
- package/lib/components/UI/ParamSearchResultContainer.js.map +1 -0
- package/lib/components/UI/PropertyCard.d.ts +24 -0
- package/lib/components/UI/PropertyCard.d.ts.map +1 -0
- package/lib/components/UI/PropertyCard.js +420 -0
- package/lib/components/UI/PropertyCard.js.map +1 -0
- package/lib/components/UI/PropertyCardOnMap.d.ts +10 -0
- package/lib/components/UI/PropertyCardOnMap.d.ts.map +1 -0
- package/lib/components/UI/PropertyCardOnMap.js +108 -0
- package/lib/components/UI/PropertyCardOnMap.js.map +1 -0
- package/lib/components/UI/VehicleCard/PricePopover.d.ts +8 -0
- package/lib/components/UI/VehicleCard/PricePopover.d.ts.map +1 -0
- package/lib/components/UI/VehicleCard/PricePopover.js +98 -0
- package/lib/components/UI/VehicleCard/PricePopover.js.map +1 -0
- package/lib/components/UI/VehicleCard/VehicleBadge.d.ts +7 -0
- package/lib/components/UI/VehicleCard/VehicleBadge.d.ts.map +1 -0
- package/lib/components/UI/VehicleCard/VehicleFeature.d.ts +9 -0
- package/lib/components/UI/VehicleCard/VehicleFeature.d.ts.map +1 -0
- package/lib/components/UI/VehicleCard/VehicleFeature.js +22 -0
- package/lib/components/UI/VehicleCard/VehicleFeature.js.map +1 -0
- package/lib/components/UI/VehicleCard/types.d.ts +59 -0
- package/lib/components/UI/VehicleCard/types.d.ts.map +1 -0
- package/lib/components/UI/VehicleCard.d.ts +15 -0
- package/lib/components/UI/VehicleCard.d.ts.map +1 -0
- package/lib/components/UI/VehicleCard.js +166 -0
- package/lib/components/UI/VehicleCard.js.map +1 -0
- package/lib/components/UI/VehicleCardList.d.ts +14 -0
- package/lib/components/UI/VehicleCardList.d.ts.map +1 -0
- package/lib/components/UI/VehicleCardList.js +38 -0
- package/lib/components/UI/VehicleCardList.js.map +1 -0
- package/lib/components/UI/VehicleParamSearchResultContainer.d.ts +90 -0
- package/lib/components/UI/VehicleParamSearchResultContainer.d.ts.map +1 -0
- package/lib/components/UI/icons/LocationIcon.d.ts +7 -0
- package/lib/components/UI/icons/LocationIcon.d.ts.map +1 -0
- package/lib/components/UI/icons/LocationIcon.js +18 -0
- package/lib/components/UI/icons/LocationIcon.js.map +1 -0
- package/lib/components/UI/icons/index.d.ts +2 -0
- package/lib/components/UI/icons/index.d.ts.map +1 -0
- package/lib/components/UI/index.d.ts +10 -0
- package/lib/components/UI/index.d.ts.map +1 -0
- package/lib/components/UpdateSettingsResource/UpdateSettingsResource.server.d.ts +11 -1
- package/lib/components/UpdateSettingsResource/UpdateSettingsResource.server.d.ts.map +1 -1
- package/lib/components/index.d.ts +3 -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 +139 -49
- package/lib/components/typings.d.ts.map +1 -1
- package/lib/components/typings.js +6 -0
- package/lib/components/typings.js.map +1 -0
- package/lib/compute.d.ts.map +1 -1
- package/lib/compute.js +6 -4
- 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 +18 -0
- package/lib/config/env-config.d.ts.map +1 -1
- package/lib/config/env-config.js +76 -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 +7 -4
- package/lib/helpers/DynamicIcon.d.ts.map +1 -1
- package/lib/helpers/DynamicIcon.js +51 -0
- package/lib/helpers/DynamicIcon.js.map +1 -0
- package/lib/hooks/index.d.ts +6 -0
- package/lib/hooks/index.d.ts.map +1 -0
- package/lib/hooks/use-get-current-lat-long.d.ts +18 -0
- package/lib/hooks/use-get-current-lat-long.d.ts.map +1 -0
- package/lib/hooks/use-get-current-lat-long.js +29 -0
- package/lib/hooks/use-get-current-lat-long.js.map +1 -0
- package/lib/hooks/useMediaQuery.d.ts +14 -0
- package/lib/hooks/useMediaQuery.d.ts.map +1 -0
- package/lib/hooks/useMediaQuery.js +48 -0
- package/lib/hooks/useMediaQuery.js.map +1 -0
- package/lib/hooks/useScrollThreshold.d.ts +12 -0
- package/lib/hooks/useScrollThreshold.d.ts.map +1 -0
- package/lib/hooks/useScrollThreshold.js +60 -0
- package/lib/hooks/useScrollThreshold.js.map +1 -0
- package/lib/hooks/useTailwindTheme.d.ts +34 -0
- package/lib/hooks/useTailwindTheme.d.ts.map +1 -0
- package/lib/hooks/useTailwindTheme.js +82 -0
- package/lib/hooks/useTailwindTheme.js.map +1 -0
- package/lib/hooks/useWindowSize.d.ts +6 -0
- package/lib/hooks/useWindowSize.d.ts.map +1 -0
- package/lib/hooks/useWindowSize.js +20 -0
- package/lib/hooks/useWindowSize.js.map +1 -0
- package/lib/icons.d.ts +16 -0
- package/lib/icons.d.ts.map +1 -0
- package/lib/icons.js +12 -0
- package/lib/icons.js.map +1 -0
- package/lib/index.d.ts +2 -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/settingsMachine.d.ts +6 -0
- package/lib/machines/settingsMachine.d.ts.map +1 -0
- package/lib/machines/settingsMachine.js +206 -0
- package/lib/machines/settingsMachine.js.map +1 -0
- package/lib/machines/types.d.ts +174 -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/middlewares/airbnbDatasourcesMiddleware.d.ts +6 -0
- package/lib/middlewares/airbnbDatasourcesMiddleware.d.ts.map +1 -0
- package/lib/middlewares/bookingCarRentalMiddleware.d.ts +6 -0
- package/lib/middlewares/bookingCarRentalMiddleware.d.ts.map +1 -0
- package/lib/middlewares/bookingDatasourcesMiddleware.d.ts +7 -0
- package/lib/middlewares/bookingDatasourcesMiddleware.d.ts.map +1 -0
- package/lib/middlewares/datasourcesMiddleware.d.ts +6 -0
- package/lib/middlewares/datasourcesMiddleware.d.ts.map +1 -0
- package/lib/middlewares/pricelineDatasourcesMiddleware.d.ts +7 -0
- package/lib/middlewares/pricelineDatasourcesMiddleware.d.ts.map +1 -0
- package/lib/module.d.ts +0 -1
- package/lib/module.d.ts.map +1 -1
- package/lib/module.js +14 -15
- package/lib/module.js.map +1 -1
- package/lib/redux/index.d.ts +2 -0
- package/lib/redux/index.d.ts.map +1 -0
- package/lib/redux/searchReducer.d.ts +42 -0
- package/lib/redux/searchReducer.d.ts.map +1 -0
- package/lib/redux/searchReducer.js +64 -0
- package/lib/redux/searchReducer.js.map +1 -0
- package/lib/routes.json +1 -0
- 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/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/formateCarData.d.ts +2 -0
- package/lib/utils/formateCarData.d.ts.map +1 -0
- package/lib/utils/menu.d.ts.map +1 -1
- package/lib/utils/test-utils.d.ts.map +1 -1
- package/lib/utils/utils/index.d.ts.map +1 -1
- package/package.json +7 -5
- 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/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,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* Gets the current Ip address details of user by calling the geolocation
|
|
4
|
+
*
|
|
5
|
+
*/
|
|
6
|
+
interface CurrentLocationLongLatInterface {
|
|
7
|
+
loading: boolean;
|
|
8
|
+
error: Error;
|
|
9
|
+
fetchCurrentLatLong: () => void;
|
|
10
|
+
permissionDenied: boolean;
|
|
11
|
+
location: {
|
|
12
|
+
latitude: number;
|
|
13
|
+
longitude: number;
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
export declare function useGetCurrentLongLat(): CurrentLocationLongLatInterface;
|
|
17
|
+
export {};
|
|
18
|
+
//# sourceMappingURL=use-get-current-lat-long.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-get-current-lat-long.d.ts","sourceRoot":"","sources":["../../src/hooks/use-get-current-lat-long.ts"],"names":[],"mappings":"AAKA;;;;GAIG;AACH,UAAU,+BAA+B;IACrC,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,KAAK,CAAC;IACb,mBAAmB,EAAE,MAAM,IAAI,CAAC;IAChC,gBAAgB,EAAE,OAAO,CAAC;IAC1B,QAAQ,EAAE;QACN,QAAQ,EAAE,MAAM,CAAC;QACjB,SAAS,EAAE,MAAM,CAAC;KACrB,CAAC;CACL;AAED,wBAAgB,oBAAoB,IAAI,+BAA+B,CA6BtE"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import {reject}from'lodash-es';import originalAsyncFunc from'react-use/lib/useAsyncFn.js';import {useState}from'react';const useAsyncFn = originalAsyncFunc?.default || originalAsyncFunc;
|
|
2
|
+
function useGetCurrentLongLat() {
|
|
3
|
+
const [permissionDenied, setPermissionDenied] = useState(false);
|
|
4
|
+
// const { toastError } = Toast();
|
|
5
|
+
const [state, fetchCurrentLatLong] = useAsyncFn(() => new Promise(resolve => {
|
|
6
|
+
navigator.geolocation.getCurrentPosition(position => {
|
|
7
|
+
setPermissionDenied(false);
|
|
8
|
+
resolve({
|
|
9
|
+
latitude: position.coords.latitude,
|
|
10
|
+
longitude: position.coords.longitude
|
|
11
|
+
});
|
|
12
|
+
}, err => {
|
|
13
|
+
setPermissionDenied(true);
|
|
14
|
+
// toastError(err.message);
|
|
15
|
+
reject(err);
|
|
16
|
+
}, {
|
|
17
|
+
maximumAge: 60000,
|
|
18
|
+
timeout: 5000,
|
|
19
|
+
enableHighAccuracy: true
|
|
20
|
+
});
|
|
21
|
+
}));
|
|
22
|
+
return {
|
|
23
|
+
loading: state.loading,
|
|
24
|
+
location: state.value,
|
|
25
|
+
error: state.error,
|
|
26
|
+
permissionDenied,
|
|
27
|
+
fetchCurrentLatLong
|
|
28
|
+
};
|
|
29
|
+
}export{useGetCurrentLongLat};//# sourceMappingURL=use-get-current-lat-long.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-get-current-lat-long.js","sources":["../../src/hooks/use-get-current-lat-long.ts"],"sourcesContent":[null],"names":[],"mappings":"uHAIA,MAAM,UAAU,GAAI,iBAAyB,EAAE,OAAO,IAAI,iBAAiB;SAiB3D,oBAAoB,GAAA;QAC1B,CAAA,gBAAiB,EAAA,mBAAqB,CAAA,WAAY,CAAA,KAAM,CAAA;;AAG9D,EAAA,MAAA,CAAA,KAAY,EAAA,mBAAqB,CAAA,aAAc,CAAA,MACxC,IACK,OAAA,CAAA,OAAS;aACA,CAAA,8BAAa,CAAA,QACjB,IAAA;yBACsB,CAAA,KAAA,CAAC;AACpB,MAAA,OAAA,CAAA;AACJ,QAAA,QACI,EAAI,QAAA,CAAA,MAAA,CAAA,QAAA;iBACe,EAAA,QAAA,CAAA,MAAK,CAAA;;cAElB;AACV,MAAA,mBACc,KAAK,CAAE;;MAK9B,MAAA,CAAA,GAAA,CAAA;;gBAEK,EAAE,KAAK;aACV,EAAE,IAAK;wBACI,EAAA;;KAEnB;AACL,EAAC,OAAA;;;;;;;"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
interface MediaQueryResult {
|
|
2
|
+
width: number;
|
|
3
|
+
height: number;
|
|
4
|
+
isMobile: boolean;
|
|
5
|
+
xs: boolean;
|
|
6
|
+
sm: boolean;
|
|
7
|
+
md: boolean;
|
|
8
|
+
lg: boolean;
|
|
9
|
+
xl: boolean;
|
|
10
|
+
'2xl': boolean;
|
|
11
|
+
}
|
|
12
|
+
export declare const useMediaQuery: () => MediaQueryResult;
|
|
13
|
+
export {};
|
|
14
|
+
//# sourceMappingURL=useMediaQuery.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useMediaQuery.d.ts","sourceRoot":"","sources":["../../src/hooks/useMediaQuery.ts"],"names":[],"mappings":"AAEA,UAAU,gBAAgB;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,OAAO,CAAC;IAClB,EAAE,EAAE,OAAO,CAAC;IACZ,EAAE,EAAE,OAAO,CAAC;IACZ,EAAE,EAAE,OAAO,CAAC;IACZ,EAAE,EAAE,OAAO,CAAC;IACZ,EAAE,EAAE,OAAO,CAAC;IACZ,KAAK,EAAE,OAAO,CAAC;CAClB;AAoBD,eAAO,MAAM,aAAa,QAAO,gBAyChC,CAAC"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import {useState,useEffect}from'react';const breakpoints = {
|
|
2
|
+
sm: 640,
|
|
3
|
+
md: 768,
|
|
4
|
+
lg: 1024,
|
|
5
|
+
xl: 1280,
|
|
6
|
+
'2xl': 1536
|
|
7
|
+
};
|
|
8
|
+
const getFlags = width => ({
|
|
9
|
+
xs: width < breakpoints.sm,
|
|
10
|
+
sm: width >= breakpoints.sm && width < breakpoints.md,
|
|
11
|
+
md: width >= breakpoints.md && width < breakpoints.lg,
|
|
12
|
+
lg: width >= breakpoints.lg && width < breakpoints.xl,
|
|
13
|
+
xl: width >= breakpoints.xl && width < breakpoints['2xl'],
|
|
14
|
+
'2xl': width >= breakpoints['2xl']
|
|
15
|
+
});
|
|
16
|
+
const useMediaQuery = () => {
|
|
17
|
+
const getDimensions = () => {
|
|
18
|
+
const width = window.innerWidth;
|
|
19
|
+
const height = window.innerHeight;
|
|
20
|
+
const isMobile = width < breakpoints.md;
|
|
21
|
+
const flags = getFlags(width);
|
|
22
|
+
return {
|
|
23
|
+
width,
|
|
24
|
+
height,
|
|
25
|
+
isMobile,
|
|
26
|
+
...flags
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
const [state, setState] = useState(() => typeof window !== 'undefined' ? getDimensions() : {
|
|
30
|
+
width: 0,
|
|
31
|
+
height: 0,
|
|
32
|
+
isMobile: false,
|
|
33
|
+
xs: false,
|
|
34
|
+
sm: false,
|
|
35
|
+
md: false,
|
|
36
|
+
lg: false,
|
|
37
|
+
xl: false,
|
|
38
|
+
'2xl': false
|
|
39
|
+
});
|
|
40
|
+
useEffect(() => {
|
|
41
|
+
const handleResize = () => {
|
|
42
|
+
setState(getDimensions());
|
|
43
|
+
};
|
|
44
|
+
window.addEventListener('resize', handleResize);
|
|
45
|
+
return () => window.removeEventListener('resize', handleResize);
|
|
46
|
+
}, []);
|
|
47
|
+
return state;
|
|
48
|
+
};export{useMediaQuery};//# sourceMappingURL=useMediaQuery.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useMediaQuery.js","sources":["../../src/hooks/useMediaQuery.ts"],"sourcesContent":[null],"names":[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AA,EAAA,KAAA;AACA,IAAA,EAAA,EAAA,KAAA;AACA,IAAA,KAAA,EAAA;AACA,GAAA,CAAA;AACA,EAAA,SAAA,CAAA;AACH,IAAA,MACV,YAAC,GAAA,MAAA;MAEO,QAAC,cAAK,EAAA,CAAA;;AAEP,IAAA,MAAA,CAAA,gBAAS,CAAA,QAAe,EAAE,YAAA,CAAA;AAC9B,IAAA,OAAE,MAAA,MAAA,CAAA,mBAAA,CAAA,QAAA,EAAA,YAAA,CAAA;AAEF,GAAA,EAAA,EAAA,CAAA;SACO,KAAA;"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { MutableRefObject } from 'react';
|
|
2
|
+
interface ScrollThresholdConfig {
|
|
3
|
+
threshold: number;
|
|
4
|
+
id: string;
|
|
5
|
+
useWindowScroll?: boolean;
|
|
6
|
+
}
|
|
7
|
+
export declare const useScrollThreshold: (configs: ScrollThresholdConfig[]) => {
|
|
8
|
+
containerRef: MutableRefObject<HTMLDivElement>;
|
|
9
|
+
componentVisibility: Record<string, boolean>;
|
|
10
|
+
};
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=useScrollThreshold.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useScrollThreshold.d.ts","sourceRoot":"","sources":["../../src/hooks/useScrollThreshold.ts"],"names":[],"mappings":"AAAA,OAAO,EAA+B,gBAAgB,EAAe,MAAM,OAAO,CAAC;AAEnF,UAAU,qBAAqB;IAC3B,SAAS,EAAE,MAAM,CAAC;IAClB,EAAE,EAAE,MAAM,CAAC;IACX,eAAe,CAAC,EAAE,OAAO,CAAC;CAC7B;AAYD,eAAO,MAAM,kBAAkB,GAAI,SAAS,qBAAqB,EAAE;;;CA4DlE,CAAC"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import {useState,useRef,useCallback,useEffect}from'react';const throttle = (fn, wait = 100) => {
|
|
2
|
+
let time = Date.now();
|
|
3
|
+
return function (...args) {
|
|
4
|
+
if (time + wait - Date.now() < 0) {
|
|
5
|
+
fn(...args);
|
|
6
|
+
time = Date.now();
|
|
7
|
+
}
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
const useScrollThreshold = configs => {
|
|
11
|
+
const [componentVisibility, setComponentVisibility] = useState({});
|
|
12
|
+
const containerRef = useRef(null);
|
|
13
|
+
const visibilityRef = useRef({});
|
|
14
|
+
const updateVisibility = useCallback(scrollPosition => {
|
|
15
|
+
const newVisibility = {};
|
|
16
|
+
let hasChanges = false;
|
|
17
|
+
configs.forEach(({
|
|
18
|
+
threshold,
|
|
19
|
+
id
|
|
20
|
+
}) => {
|
|
21
|
+
const isVisible = scrollPosition >= threshold;
|
|
22
|
+
if (visibilityRef.current[id] !== isVisible) {
|
|
23
|
+
hasChanges = true;
|
|
24
|
+
}
|
|
25
|
+
newVisibility[id] = isVisible;
|
|
26
|
+
});
|
|
27
|
+
if (hasChanges) {
|
|
28
|
+
visibilityRef.current = newVisibility;
|
|
29
|
+
setComponentVisibility(newVisibility);
|
|
30
|
+
}
|
|
31
|
+
}, [configs]);
|
|
32
|
+
useEffect(() => {
|
|
33
|
+
const config = configs[0]; // Assuming we're only using one config for now
|
|
34
|
+
const useWindowScroll = config?.useWindowScroll ?? false;
|
|
35
|
+
const throttledUpdate = throttle(() => {
|
|
36
|
+
const scrollPosition = useWindowScroll ? window.scrollY : containerRef.current?.scrollTop ?? 0;
|
|
37
|
+
updateVisibility(scrollPosition);
|
|
38
|
+
}, 50);
|
|
39
|
+
const handleScroll = () => {
|
|
40
|
+
throttledUpdate();
|
|
41
|
+
};
|
|
42
|
+
if (useWindowScroll) {
|
|
43
|
+
window.addEventListener('scroll', handleScroll);
|
|
44
|
+
} else if (containerRef.current) {
|
|
45
|
+
containerRef.current.addEventListener('scroll', handleScroll);
|
|
46
|
+
}
|
|
47
|
+
updateVisibility(useWindowScroll ? window.scrollY : containerRef.current?.scrollTop ?? 0);
|
|
48
|
+
return () => {
|
|
49
|
+
if (useWindowScroll) {
|
|
50
|
+
window.removeEventListener('scroll', handleScroll);
|
|
51
|
+
} else if (containerRef.current) {
|
|
52
|
+
containerRef.current.removeEventListener('scroll', handleScroll);
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
}, [configs, updateVisibility]);
|
|
56
|
+
return {
|
|
57
|
+
containerRef,
|
|
58
|
+
componentVisibility
|
|
59
|
+
};
|
|
60
|
+
};export{useScrollThreshold};//# sourceMappingURL=useScrollThreshold.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useScrollThreshold.js","sources":["../../src/hooks/useScrollThreshold.ts"],"sourcesContent":[null],"names":[],"mappings":"0DAQA,MAAM,QAAQ,GAAG,CAAC,EAAY,EAAE,IAAe,GAAA,GAAG,KAAI;AAClD,EAAA,IAAA,OAAW,IAAA,CAAA,GAAK,EAAG;SACZ,UAAA,OAAwB,EAAA;QAC3B,IAAI,GAAA,IAAO,GAAA,IAAO,CAAA,GAAI,EAAC,GAAK,CAAA,EAAA;AACxB,MAAA,EAAA,CAAA,GAAA,IAAG,CAAA;AACH,MAAA,IAAA,GAAA,IAAO,CAAA,GAAA,EAAI;;AAEnB,GAAA;AACJ,CAAC;AAEY,MAAA,kBAAkB,GAAG,OAAC,IAAoC;QAC7D,CAAA,mBAAoB,EAAA,sBAAwB,CAAA,WAAY,CAAA,EAA0B,CAAE;AAC1F,EAAA,MAAA,eAAqB,MAAA,CAAA,IAAuB,CAAA;AAC5C,EAAA,MAAA,gBAAsB,MAAA,CAAA,EAAgC,CAAA;AAEtD,EAAA,MAAA,mBAAyB,WAAA,CAAA,cACpB;UACS,aAAA,GAAA,EAAyC;QAC/C,UAAI,GAAA,KAAa;WAEV,CAAA,OAAQ,CAAA,CAAA;AACX,MAAA,SAAA;;;YAGA,SAAC,GAAA,cAAA,IAAA,SAAA;AACD,MAAA,IAAA,aAAA,CAAA,OAAiB,CAAG,iBAAU,EAAA;AAClC,QAAA,UAAG,GAAA,IAAA;;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
5
|
+
color: string;
|
|
6
|
+
bgColor: string;
|
|
7
|
+
blackColor: string;
|
|
8
|
+
borderColor: string;
|
|
9
|
+
checkBgColor: string;
|
|
10
|
+
radioActiveBgColor: string;
|
|
11
|
+
checkInactiveColor: string;
|
|
12
|
+
grayColor: string;
|
|
13
|
+
greenColor: string;
|
|
14
|
+
passiveColor: string;
|
|
15
|
+
blueColor: string;
|
|
16
|
+
yellowColor: string;
|
|
17
|
+
becomeHostColor: string;
|
|
18
|
+
activeMenuBgColor: string;
|
|
19
|
+
shadowColor: string;
|
|
20
|
+
calendarAvailableColor: string;
|
|
21
|
+
calendarPartialColor: string;
|
|
22
|
+
calendarBlockColor: string;
|
|
23
|
+
discountColor: string;
|
|
24
|
+
cancelColor: string;
|
|
25
|
+
errorColor: string;
|
|
26
|
+
isDark: boolean;
|
|
27
|
+
textColor: string;
|
|
28
|
+
borderColorClass: string;
|
|
29
|
+
bgColorClass: string;
|
|
30
|
+
textColorClass: string;
|
|
31
|
+
shadowClass: string;
|
|
32
|
+
};
|
|
33
|
+
export declare const useTailwindTheme: () => UseTailwindThemeReturnValue;
|
|
34
|
+
//# sourceMappingURL=useTailwindTheme.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useTailwindTheme.d.ts","sourceRoot":"","sources":["../../src/hooks/useTailwindTheme.tsx"],"names":[],"mappings":"AAIA,MAAM,MAAM,2BAA2B,GAAG;IACtC,eAAe,EAAE,MAAM,IAAI,CAAC;IAC5B,cAAc,EAAE,MAAM,CAAC;IACvB,aAAa,EAAE,GAAG,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,kBAAkB,EAAE,MAAM,CAAC;IAC3B,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,eAAe,EAAE,MAAM,CAAC;IACxB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,WAAW,EAAE,MAAM,CAAC;IACpB,sBAAsB,EAAE,MAAM,CAAC;IAC/B,oBAAoB,EAAE,MAAM,CAAC;IAC7B,kBAAkB,EAAE,MAAM,CAAC;IAC3B,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,OAAO,CAAC;IAEhB,SAAS,EAAE,MAAM,CAAC;IAClB,gBAAgB,EAAE,MAAM,CAAC;IACzB,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,MAAM,CAAC;IACvB,WAAW,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF,eAAO,MAAM,gBAAgB,QAAO,2BAyFnC,CAAC"}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import {useState,useEffect}from'react';import {FaMoon}from'@react-icons/all-files/fa/FaMoon.js';import {FaSun}from'@react-icons/all-files/fa/FaSun.js';const useTailwindTheme = () => {
|
|
2
|
+
// Check if dark mode is preferred by user or system
|
|
3
|
+
const [isDark, setIsDark] = useState(() => {
|
|
4
|
+
if (typeof window !== 'undefined') {
|
|
5
|
+
// Check local storage first, then system preference
|
|
6
|
+
const storedTheme = localStorage.getItem('color-theme');
|
|
7
|
+
if (storedTheme === 'dark') return true;
|
|
8
|
+
if (storedTheme === 'light') return false;
|
|
9
|
+
return window.matchMedia('(prefers-color-scheme: dark)').matches;
|
|
10
|
+
}
|
|
11
|
+
return false;
|
|
12
|
+
});
|
|
13
|
+
// Set dark mode class on body when theme changes
|
|
14
|
+
useEffect(() => {
|
|
15
|
+
document.documentElement.classList.toggle('dark', isDark);
|
|
16
|
+
localStorage.setItem('color-theme', isDark ? 'dark' : 'light');
|
|
17
|
+
}, [isDark]);
|
|
18
|
+
const toggleColorMode = () => setIsDark(!isDark);
|
|
19
|
+
const colorModeLabel = isDark ? 'light' : 'dark';
|
|
20
|
+
const ColorModeIcon = isDark ? FaSun : FaMoon;
|
|
21
|
+
// Define colors for both light and dark modes
|
|
22
|
+
const bgColor = isDark ? '#1A202C' : 'white'; // gray-800 or white
|
|
23
|
+
const color = isDark ? 'white' : '#2d3748'; // white or gray-800
|
|
24
|
+
const grayColor = isDark ? '#A0AEC0' : '#4A5568'; // gray-400 or gray-600
|
|
25
|
+
const greenColor = '#38A169'; // green-500 in both modes
|
|
26
|
+
const passiveColor = isDark ? '#4A5568' : '#E2E8F0'; // gray-600 or gray-200
|
|
27
|
+
const borderColor = isDark ? '#4A5568' : '#E2E8F0'; // gray-600 or gray-200
|
|
28
|
+
const checkBgColor = isDark ? '#1A202C' : '#CBD5E0'; // gray-800 or gray-300
|
|
29
|
+
const radioActiveBgColor = isDark ? 'rgb(0 31 71)' : '#EBF8FF'; // custom dark blue or blue-50
|
|
30
|
+
const checkInactiveColor = isDark ? 'rgba(255, 255, 255, 0.4)' : '#CBD5E0'; // whiteAlpha-400 or gray-300
|
|
31
|
+
const blueColor = '#2869E0'; // same in both modes
|
|
32
|
+
const yellowColor = '#F5BC00'; // same in both modes
|
|
33
|
+
const blackColor = '#000'; // same in both modes
|
|
34
|
+
const becomeHostColor = isDark ? '#4299E1' : '#9DECF9'; // blue-400 or cyan-200
|
|
35
|
+
const activeMenuBgColor = isDark ? '#2D3748' : '#EDF2F7'; // gray-700 or gray-100
|
|
36
|
+
const shadowColor = isDark ? 'rgba(205, 205, 162, 0.25) 0px 6px 12px -2px, rgba(255,255,255, 0.3) 0px 3px 7px -3px' : 'rgba(50, 50, 93, 0.25) 0px 6px 12px -2px, rgba(0, 0, 0, 0.3) 0px 3px 7px -3px';
|
|
37
|
+
const calendarAvailableColor = '#3e9f31'; // same in both modes
|
|
38
|
+
const calendarPartialColor = '#31679f'; // same in both modes
|
|
39
|
+
const calendarBlockColor = isDark ? '#2d3748' : '#e2e8f0'; // gray-800 or gray-300
|
|
40
|
+
const discountColor = '#3182CE'; // blue-500 in both modes
|
|
41
|
+
const cancelColor = '#E53E3E'; // red-500 in both modes
|
|
42
|
+
const errorColor = '#C53030'; // red-600 in both modes
|
|
43
|
+
// Tailwind-specific class helpers
|
|
44
|
+
const textColorClass = isDark ? 'text-white' : 'text-gray-800';
|
|
45
|
+
const borderColorClass = isDark ? 'border-gray-600' : 'border-gray-200';
|
|
46
|
+
const bgColorClass = isDark ? 'bg-gray-800' : 'bg-white';
|
|
47
|
+
const textColor = isDark ? 'white' : 'gray-800';
|
|
48
|
+
const shadowClass = isDark ? 'shadow-dark' : 'shadow-light';
|
|
49
|
+
return {
|
|
50
|
+
toggleColorMode,
|
|
51
|
+
colorModeLabel,
|
|
52
|
+
ColorModeIcon,
|
|
53
|
+
color,
|
|
54
|
+
bgColor,
|
|
55
|
+
blackColor,
|
|
56
|
+
borderColor,
|
|
57
|
+
checkBgColor,
|
|
58
|
+
radioActiveBgColor,
|
|
59
|
+
checkInactiveColor,
|
|
60
|
+
grayColor,
|
|
61
|
+
greenColor,
|
|
62
|
+
passiveColor,
|
|
63
|
+
blueColor,
|
|
64
|
+
yellowColor,
|
|
65
|
+
becomeHostColor,
|
|
66
|
+
activeMenuBgColor,
|
|
67
|
+
shadowColor,
|
|
68
|
+
calendarAvailableColor,
|
|
69
|
+
calendarPartialColor,
|
|
70
|
+
calendarBlockColor,
|
|
71
|
+
discountColor,
|
|
72
|
+
cancelColor,
|
|
73
|
+
errorColor,
|
|
74
|
+
isDark,
|
|
75
|
+
// Tailwind specific
|
|
76
|
+
textColor,
|
|
77
|
+
borderColorClass,
|
|
78
|
+
bgColorClass,
|
|
79
|
+
textColorClass,
|
|
80
|
+
shadowClass
|
|
81
|
+
};
|
|
82
|
+
};export{useTailwindTheme};//# sourceMappingURL=useTailwindTheme.js.map
|
|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0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useWindowSize.d.ts","sourceRoot":"","sources":["../../src/hooks/useWindowSize.ts"],"names":[],"mappings":"AAEA,iBAAS,aAAa;;;EAsBrB;AAED,eAAe,aAAa,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import {useState,useEffect}from'react';function useWindowSize() {
|
|
2
|
+
const [windowSize, setWindowSize] = useState({
|
|
3
|
+
width: typeof window !== 'undefined' ? window.innerWidth : 0,
|
|
4
|
+
// Check if window is defined
|
|
5
|
+
height: typeof window !== 'undefined' ? window.innerHeight : 0 // Check if window is defined
|
|
6
|
+
});
|
|
7
|
+
useEffect(() => {
|
|
8
|
+
function handleResize() {
|
|
9
|
+
setWindowSize({
|
|
10
|
+
width: window.innerWidth,
|
|
11
|
+
height: window.innerHeight
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
// Add event listener for window resize
|
|
15
|
+
window.addEventListener('resize', handleResize);
|
|
16
|
+
// Cleanup the event listener on component unmount
|
|
17
|
+
return () => window.removeEventListener('resize', handleResize);
|
|
18
|
+
}, []);
|
|
19
|
+
return windowSize;
|
|
20
|
+
}export{useWindowSize as default};//# sourceMappingURL=useWindowSize.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useWindowSize.js","sources":["../../src/hooks/useWindowSize.ts"],"sourcesContent":[null],"names":[],"mappings":"uCAEA,SAAS,aAAa,GAAA;AAClB,EAAA,MAAA,CAAA,UAAiB,EAAA,iBAAgB;AAC7B,IAAA,KAAA,EAAA,OAAc,MAAA,KAAW,WAAA,GAAA,MAAoB,CAAA,cAAW;AACxD;AACH,IAAA,MAAE,EAAA,OAAA,MAAA,KAAA,WAAA,GAAA,MAAA,CAAA,WAAA,GAAA,CAAA;IAEH;AACI,EAAA,SAAA,CAAA,MAAqB;AACjB,IAAA,SAAA,YAAa,GAAC;mBACL,CAAA;qBACC,CAAA,UAAoB;AAC7B,QAAA,MAAC,EAAC,MAAA,CAAA;QACP;;AAGA;UAEkD,CAAA,gBAAA,CAAA,QAAA,EAAA,YAAA,CAAA;;IAEtD,OAAO,MAAA,MAAA,CAAA,mBAAA,CAAA,QAAA,EAAA,YAAA,CAAA;AAEP,GAAA,EAAA,EAAA,CAAA;AACJ,EAAC,OAAA,UAAA;AAED"}
|
package/lib/icons.d.ts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export declare const icons: {
|
|
2
|
+
SearchIcon: import("@react-icons/all-files/lib").IconType;
|
|
3
|
+
ChevronDownIcon: import("@react-icons/all-files/lib").IconType;
|
|
4
|
+
ChevronRightIcon: import("@react-icons/all-files/lib").IconType;
|
|
5
|
+
MenuIcon: import("@react-icons/all-files/lib").IconType;
|
|
6
|
+
OutlineDashIcon: import("@react-icons/all-files/lib").IconType;
|
|
7
|
+
CloseIcon: import("@react-icons/all-files/lib").IconType;
|
|
8
|
+
Settings5FillIcon: import("@react-icons/all-files/lib").IconType;
|
|
9
|
+
CopyIcon: import("@react-icons/all-files/lib").IconType;
|
|
10
|
+
CheckIcon: import("@react-icons/all-files/lib").IconType;
|
|
11
|
+
ChevronBackCircleIcon: import("@react-icons/all-files/lib").IconType;
|
|
12
|
+
ChevronForwardCircleIcon: import("@react-icons/all-files/lib").IconType;
|
|
13
|
+
ChevronUpIcon: import("@react-icons/all-files/lib").IconType;
|
|
14
|
+
ChevronLeftIcon: import("@react-icons/all-files/lib").IconType;
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=icons.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"icons.d.ts","sourceRoot":"","sources":["../src/icons.ts"],"names":[],"mappings":"AAcA,eAAO,MAAM,KAAK;;;;;;;;;;;;;;CAcjB,CAAC"}
|
package/lib/icons.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import {FaSearch}from'@react-icons/all-files/fa/FaSearch.js';import {IoMenu}from'@react-icons/all-files/io5/IoMenu.js';import'@react-icons/all-files/ai/AiOutlineDash.js';import {FaChevronDown}from'@react-icons/all-files/fa/FaChevronDown.js';import {FaChevronUp}from'@react-icons/all-files/fa/FaChevronUp.js';import {FaChevronRight}from'@react-icons/all-files/fa/FaChevronRight.js';import {FaChevronLeft}from'@react-icons/all-files/fa/FaChevronLeft.js';import {MdClose}from'@react-icons/all-files/md/MdClose.js';import {RiSettings5Fill}from'@react-icons/all-files/ri/RiSettings5Fill.js';import {IoMdCopy}from'@react-icons/all-files/io/IoMdCopy.js';import {FaCheck}from'@react-icons/all-files/fa/FaCheck.js';import'@react-icons/all-files/io5/IoChevronBackCircleOutline.js';import'@react-icons/all-files/io5/IoChevronForwardCircleOutline.js';const icons = {
|
|
2
|
+
SearchIcon: FaSearch,
|
|
3
|
+
ChevronDownIcon: FaChevronDown,
|
|
4
|
+
ChevronRightIcon: FaChevronRight,
|
|
5
|
+
MenuIcon: IoMenu,
|
|
6
|
+
CloseIcon: MdClose,
|
|
7
|
+
Settings5FillIcon: RiSettings5Fill,
|
|
8
|
+
CopyIcon: IoMdCopy,
|
|
9
|
+
CheckIcon: FaCheck,
|
|
10
|
+
ChevronUpIcon: FaChevronUp,
|
|
11
|
+
ChevronLeftIcon: FaChevronLeft
|
|
12
|
+
};export{icons};//# sourceMappingURL=icons.js.map
|
package/lib/icons.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"icons.js","sources":["../src/icons.ts"],"sourcesContent":[null],"names":[],"mappings":"u0BAca,MAAA,KAAK,GAAG;sBACP;gCACK;kCACC;kBACR;oBAEC;oCACQ;oBACT;oBACC;4BAGI;;"}
|
package/lib/index.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { Feature } from '@common-stack/client-react';
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export { changeProLayoutClassName } from './utils';
|
|
2
|
+
export * from './tailwindConfig';
|
|
3
|
+
export * from './redux';
|
|
5
4
|
declare const _default: Feature;
|
|
6
5
|
export default _default;
|
|
7
6
|
//# sourceMappingURL=index.d.ts.map
|
package/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AAErD,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AAErD,cAAc,kBAAkB,CAAC;AACjC,cAAc,SAAS,CAAC;;AAExB,wBAAqC"}
|
package/lib/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {Feature}from'@common-stack/client-react';import settings from'./module.js';export{
|
|
1
|
+
import {Feature}from'@common-stack/client-react';import settings from'./module.js';export{themeConfig}from'./tailwindConfig.js';export{SEARCH_ACTIONS,clearSearch,searchReducer,setSearchError,setSearchQuery,setSearchResult}from'./redux/searchReducer.js';// eslint-disable-next-line import/no-extraneous-dependencies
|
|
2
2
|
var index = new Feature(settings);export{index as default};//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../src/index.ts"],"sourcesContent":[null],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../src/index.ts"],"sourcesContent":[null],"names":[],"mappings":"6PAAA;AAMA,YAAe,IAAI,OAAO,CAAC,QAAQ,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { MachineEvent, SettingsContext } from './types';
|
|
2
|
+
export declare const settingsMachine: import("xstate").StateMachine<SettingsContext, MachineEvent, Record<string, import("xstate").AnyActorRef>, import("xstate").ProvidedActor, import("xstate").ParameterizedObject, import("xstate").ParameterizedObject, string, import("xstate").StateValue, string, {
|
|
3
|
+
settings: SettingsContext;
|
|
4
|
+
routeSettings?: Record<string, Partial<SettingsContext>>;
|
|
5
|
+
}, {}, import("xstate").EventObject, import("xstate").MetaObject, any>;
|
|
6
|
+
//# sourceMappingURL=settingsMachine.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"settingsMachine.d.ts","sourceRoot":"","sources":["../../src/machines/settingsMachine.ts"],"names":[],"mappings":"AAEA,OAAO,EAEH,YAAY,EACZ,eAAe,EAMlB,MAAM,SAAS,CAAC;AAyFjB,eAAO,MAAM,eAAe;cAMN,eAAe;oBACT,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,eAAe,CAAC,CAAC;sEAsIlE,CAAC"}
|