@shopgate/engage 7.32.0-beta.1 → 7.32.0-beta.11
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 +0 -1
- package/account/components/Profile/Profile.provider.d.ts +1 -1
- package/account/components/Profile/ProfileAddressBook.d.ts.map +1 -1
- package/account/components/Profile/ProfileAddressBook.js +13 -22
- package/account/components/Profile/ProfileAddressCard.d.ts.map +1 -1
- package/account/components/Profile/ProfileAddressCard.js +9 -18
- package/account/components/Profile/ProfileForm.d.ts.map +1 -1
- package/account/components/Profile/ProfileForm.js +15 -42
- package/account/components/ProfileContact/ProfileContact.js +13 -21
- package/admin-preview/components/FrontendSettingsPreviewBridge/FrontendSettingsPreviewBridge.d.ts +2 -1
- package/admin-preview/components/FrontendSettingsPreviewBridge/FrontendSettingsPreviewBridge.d.ts.map +1 -1
- package/admin-preview/components/FrontendSettingsPreviewBridge/FrontendSettingsPreviewBridge.js +61 -5
- package/admin-preview/components/FrontendSettingsPreviewBridge/helpers.d.ts +7 -1
- package/admin-preview/components/FrontendSettingsPreviewBridge/helpers.d.ts.map +1 -1
- package/admin-preview/components/FrontendSettingsPreviewBridge/helpers.js +14 -2
- package/admin-preview/components/FrontendSettingsPreviewBridge/types.d.ts +15 -2
- package/admin-preview/components/FrontendSettingsPreviewBridge/types.d.ts.map +1 -1
- package/admin-preview/constants/index.d.ts +0 -12
- package/admin-preview/constants/index.d.ts.map +1 -1
- package/admin-preview/constants/index.js +0 -16
- package/admin-preview/helpers/_internal/detection.d.ts +53 -0
- package/admin-preview/helpers/_internal/detection.d.ts.map +1 -0
- package/admin-preview/helpers/_internal/detection.js +93 -0
- package/admin-preview/helpers/index.d.ts +7 -0
- package/admin-preview/helpers/index.d.ts.map +1 -1
- package/admin-preview/helpers/index.js +12 -4
- package/admin-preview/initialization/_internal/initialFrontendSettings.d.ts +32 -0
- package/admin-preview/initialization/_internal/initialFrontendSettings.d.ts.map +1 -0
- package/admin-preview/initialization/_internal/initialFrontendSettings.js +43 -0
- package/admin-preview/initialization/awaitInitialFrontendSettings.d.ts +22 -0
- package/admin-preview/initialization/awaitInitialFrontendSettings.d.ts.map +1 -0
- package/admin-preview/initialization/awaitInitialFrontendSettings.js +84 -0
- package/back-in-stock/components/BackInStockButton/index.js +5 -5
- package/back-in-stock/components/Subscriptions/components/Subscription/index.js +2 -5
- package/cart/components/CartItem/CartItemProductLayout.js +2 -1
- package/cart/components/CartItem/CartItemProductLayoutWide.js +2 -2
- package/cart/components/CartItem/CartItemProductLayoutWideRemoveItem.js +7 -14
- package/cart/components/CartItem/CartItemProductProvider.connector.js +0 -2
- package/cart/components/CartItem/CartItemProductProvider.js +3 -30
- package/cart/components/CartItem/CartItemProductProvider.types.js +0 -1
- package/cart/components/CartItem/CartItemQuantityPicker.js +1 -0
- package/cart/components/CartItems/CartItemCardReservationLabelChangeStore.js +6 -24
- package/cart/components/CartItems/CartItems.js +8 -10
- package/cart/components/CartItems/CartItemsSubstitution.js +3 -2
- package/cart/components/CartSummaryWide/CartSummaryWide.js +2 -2
- package/cart/components/CartSummaryWide/CartSummaryWideCheckoutButton.js +9 -23
- package/cart/components/PaymentBar/PaymentBarCheckoutButton.js +8 -30
- package/cart/components/PaymentBar/PaymentBarContent.js +1 -1
- package/cart/components/PaymentBar/testUtils/mockFactories.js +4 -11
- package/category/components/CategoryImage/index.js +24 -17
- package/checkout/components/AddressBook/AddressList.js +14 -23
- package/checkout/components/Checkout/CheckoutActions.js +4 -3
- package/checkout/components/Checkout/CheckoutAddress.js +8 -0
- package/checkout/components/Checkout/CheckoutSection.js +6 -2
- package/checkout/components/CheckoutConfirmation/CheckoutConfirmation.js +6 -7
- package/checkout/components/ResponsiveBackButton/ResponsiveBackButton.js +7 -17
- package/components/Badge/Badge.d.ts +30 -0
- package/components/Badge/Badge.d.ts.map +1 -0
- package/components/Badge/Badge.js +48 -0
- package/components/Badge/index.d.ts +3 -0
- package/components/Badge/index.d.ts.map +1 -0
- package/components/Badge/index.js +1 -0
- package/components/Card/Card.d.ts +27 -0
- package/components/Card/Card.d.ts.map +1 -0
- package/components/Card/Card.js +57 -0
- package/components/Card/index.d.ts +4 -0
- package/components/Card/index.d.ts.map +1 -0
- package/components/Card/index.js +2 -0
- package/components/Card/useCardAppearance.d.ts +11 -0
- package/components/Card/useCardAppearance.d.ts.map +1 -0
- package/components/Card/useCardAppearance.js +22 -0
- package/components/ChipLayout/index.js +2 -4
- package/components/Logo/index.d.ts.map +1 -1
- package/components/Logo/index.js +3 -6
- package/components/NavigationHandler/connector.js +1 -1
- package/components/NavigationHandler/index.d.ts +2 -2
- package/components/Paper/Paper.d.ts +48 -0
- package/components/Paper/Paper.d.ts.map +1 -0
- package/components/Paper/Paper.js +64 -0
- package/components/Paper/index.d.ts +3 -0
- package/components/Paper/index.d.ts.map +1 -0
- package/components/Paper/index.js +1 -0
- package/components/PickerUtilize/index.d.ts +2 -1
- package/components/PickerUtilize/index.d.ts.map +1 -1
- package/components/RadioCard/RadioCard.d.ts.map +1 -1
- package/components/RadioCard/RadioCard.js +2 -1
- package/components/SheetList/components/Item/index.js +8 -8
- package/components/Tabs/components/Tab.d.ts.map +1 -1
- package/components/Tabs/components/Tab.js +14 -16
- package/components/Typography/Typography.d.ts +1 -1
- package/components/View/components/Above/index.d.ts.map +1 -1
- package/components/View/components/Above/index.js +3 -1
- package/components/View/components/Below/index.d.ts.map +1 -1
- package/components/View/components/Below/index.js +3 -1
- package/components/View/components/Content/index.d.ts +2 -1
- package/components/View/components/Content/index.d.ts.map +1 -1
- package/components/View/components/Content/index.js +4 -1
- package/components/constants.d.ts +6 -0
- package/components/constants.d.ts.map +1 -0
- package/components/index.d.ts +5 -1
- package/components/index.d.ts.map +1 -1
- package/components/index.js +4 -2
- package/components/v2/Button/Button.d.ts +24 -13
- package/components/v2/Button/Button.d.ts.map +1 -1
- package/components/v2/Button/Button.js +139 -41
- package/components/v2/ButtonBase/ButtonBase.d.ts +50 -10
- package/components/v2/ButtonBase/ButtonBase.d.ts.map +1 -1
- package/components/v2/ButtonBase/ButtonBase.js +192 -17
- package/components/v2/ButtonBase/Ripple.d.ts +2 -1
- package/components/v2/ButtonBase/Ripple.d.ts.map +1 -1
- package/components/v2/ButtonBase/hooks.d.ts +0 -1
- package/components/v2/ButtonBase/hooks.d.ts.map +1 -1
- package/components/v2/ButtonBase/hooks.js +36 -12
- package/components/v2/ButtonGroup/ButtonGroup.d.ts +11 -5
- package/components/v2/ButtonGroup/ButtonGroup.d.ts.map +1 -1
- package/components/v2/ButtonGroup/ButtonGroup.js +49 -26
- package/components/v2/CircularProgress/CircularProgress.d.ts.map +1 -1
- package/components/v2/CircularProgress/CircularProgress.js +10 -5
- package/core/helpers/getFullImageSource.d.ts +5 -1
- package/core/helpers/getFullImageSource.d.ts.map +1 -1
- package/core/helpers/getFullImageSource.js +30 -14
- package/core/helpers/i18n.d.ts +4 -0
- package/core/helpers/i18n.d.ts.map +1 -1
- package/core/helpers/i18n.js +3 -0
- package/core/hooks/events/appEvents.d.ts +31 -46
- package/core/hooks/events/appEvents.d.ts.map +1 -0
- package/core/hooks/events/appEvents.js +26 -29
- package/core/hooks/events/index.d.ts +4 -4
- package/core/hooks/events/index.d.ts.map +1 -1
- package/core/hooks/events/useLongPress.d.ts +55 -58
- package/core/hooks/events/useLongPress.d.ts.map +1 -0
- package/core/hooks/events/useLongPress.js +23 -16
- package/core/hooks/events/usePressHandler.d.ts +32 -21
- package/core/hooks/events/usePressHandler.d.ts.map +1 -1
- package/core/hooks/events/usePressHandler.js +12 -10
- package/core/hooks/events/useScrollDirectionChange.d.ts +72 -61
- package/core/hooks/events/useScrollDirectionChange.d.ts.map +1 -0
- package/core/hooks/events/useScrollDirectionChange.js +36 -43
- package/core/hooks/html/useLoadImage.d.ts +3 -3
- package/core/hooks/html/useLoadImage.d.ts.map +1 -1
- package/core/hooks/html/useLoadImage.js +2 -2
- package/core/hooks/useLocalStorage.d.ts +8 -0
- package/core/hooks/useLocalStorage.d.ts.map +1 -1
- package/core/hooks/useLocalStorage.js +22 -15
- package/core/hooks/useNavigation.d.ts +10 -2
- package/core/hooks/useNavigation.d.ts.map +1 -1
- package/core/hooks/useNavigation.js +1 -2
- package/core/initialization/fetchSettings.d.ts +12 -0
- package/core/initialization/fetchSettings.d.ts.map +1 -0
- package/core/initialization/fetchSettings.js +134 -0
- package/core/initialization/index.d.ts +33 -2
- package/core/initialization/index.d.ts.map +1 -1
- package/core/initialization/index.js +44 -103
- package/core/router/conductor.d.ts +9 -0
- package/core/router/helpers.d.ts +28 -15
- package/core/router/helpers.d.ts.map +1 -1
- package/core/router/helpers.js +8 -8
- package/development/action-creators/index.d.ts +3 -0
- package/development/action-creators/index.d.ts.map +1 -0
- package/development/action-creators/settings.d.ts +45 -0
- package/development/action-creators/settings.d.ts.map +1 -0
- package/development/action-creators/settings.js +21 -10
- package/development/action-creators/storage.d.ts +17 -0
- package/development/action-creators/storage.d.ts.map +1 -0
- package/development/action-creators/storage.js +7 -4
- package/development/components/ClientInformation/ClientInformation.d.ts +6 -0
- package/development/components/ClientInformation/ClientInformation.d.ts.map +1 -0
- package/development/components/ClientInformation/ClientInformation.js +7 -4
- package/development/components/ClientInformation/actions.d.ts +6 -0
- package/development/components/ClientInformation/actions.d.ts.map +1 -0
- package/development/components/ClientInformation/actions.js +1 -1
- package/development/components/ClientInformation/index.d.ts +2 -0
- package/development/components/ClientInformation/index.d.ts.map +1 -0
- package/development/components/DevelopmentSettings/DevelopmentSettings.d.ts +16 -0
- package/development/components/DevelopmentSettings/DevelopmentSettings.d.ts.map +1 -0
- package/development/components/DevelopmentSettings/DevelopmentSettings.js +43 -30
- package/development/components/DevelopmentSettings/index.d.ts +2 -0
- package/development/components/DevelopmentSettings/index.d.ts.map +1 -0
- package/development/components/DevelopmentTools/DevelopmentTools.d.ts +10 -0
- package/development/components/DevelopmentTools/DevelopmentTools.d.ts.map +1 -0
- package/development/components/DevelopmentTools/DevelopmentTools.js +8 -8
- package/development/components/DevelopmentTools/Shortcuts.d.ts +6 -0
- package/development/components/DevelopmentTools/Shortcuts.d.ts.map +1 -0
- package/development/components/DevelopmentTools/Shortcuts.js +0 -1
- package/development/components/DevelopmentTools/hooks.d.ts +8 -0
- package/development/components/DevelopmentTools/hooks.d.ts.map +1 -0
- package/development/components/DevelopmentTools/hooks.js +2 -3
- package/development/components/DevelopmentTools/index.d.ts +2 -0
- package/development/components/DevelopmentTools/index.d.ts.map +1 -0
- package/development/components/SimulatedInsets/SimulatedInsetBottom.d.ts +7 -0
- package/development/components/SimulatedInsets/SimulatedInsetBottom.d.ts.map +1 -0
- package/development/components/SimulatedInsets/SimulatedInsetBottom.js +4 -9
- package/development/components/SimulatedInsets/SimulatedInsetTop.d.ts +7 -0
- package/development/components/SimulatedInsets/SimulatedInsetTop.d.ts.map +1 -0
- package/development/components/SimulatedInsets/SimulatedInsetTop.js +4 -9
- package/development/components/SimulatedInsets/SimulatedInsets.d.ts +13 -0
- package/development/components/SimulatedInsets/SimulatedInsets.d.ts.map +1 -0
- package/development/components/SimulatedInsets/SimulatedInsets.js +2 -7
- package/development/components/SimulatedInsets/index.d.ts +2 -0
- package/development/components/SimulatedInsets/index.d.ts.map +1 -0
- package/development/components/SimulatedInsets/types.d.ts +15 -0
- package/development/components/SimulatedInsets/types.d.ts.map +1 -0
- package/development/components/SimulatedInsets/types.js +1 -0
- package/development/components/index.d.ts +3 -0
- package/development/components/index.d.ts.map +1 -0
- package/development/constants/actionTypes.d.ts +6 -0
- package/development/constants/actionTypes.d.ts.map +1 -0
- package/development/constants/actionTypes.js +2 -1
- package/development/constants/index.d.ts +2 -0
- package/development/constants/index.d.ts.map +1 -0
- package/development/reducers/index.d.ts +24 -0
- package/development/reducers/index.d.ts.map +1 -0
- package/development/reducers/settings.d.ts +17 -0
- package/development/reducers/settings.d.ts.map +1 -0
- package/development/reducers/settings.js +48 -35
- package/development/reducers/storage.d.ts +17 -0
- package/development/reducers/storage.d.ts.map +1 -0
- package/development/reducers/storage.js +24 -24
- package/development/selectors/index.d.ts +3 -0
- package/development/selectors/index.d.ts.map +1 -0
- package/development/selectors/settings.d.ts +52 -0
- package/development/selectors/settings.d.ts.map +1 -0
- package/development/selectors/settings.js +21 -11
- package/development/selectors/storage.d.ts +10 -0
- package/development/selectors/storage.d.ts.map +1 -0
- package/development/selectors/storage.js +6 -18
- package/development/streams/index.d.ts +2 -0
- package/development/streams/index.d.ts.map +1 -0
- package/development/streams/insets.d.ts +8 -0
- package/development/streams/insets.d.ts.map +1 -0
- package/development/streams/insets.js +1 -3
- package/development/subscriptions/index.d.ts +15 -0
- package/development/subscriptions/index.d.ts.map +1 -0
- package/development/subscriptions/index.js +6 -2
- package/development/types/development.d.ts +68 -0
- package/development/types/development.d.ts.map +1 -0
- package/development/types/development.js +1 -0
- package/development/types/index.d.ts +2 -0
- package/development/types/index.d.ts.map +1 -0
- package/development/types/index.js +1 -0
- package/favorites/components/FavoriteButtonWide/FavoriteButtonWide.js +7 -17
- package/favorites/components/Item/Item.d.ts +1 -1
- package/favorites/components/Item/Item.d.ts.map +1 -1
- package/favorites/components/Item/Item.js +7 -7
- package/favorites/components/List/List.d.ts +1 -1
- package/favorites/components/List/List.d.ts.map +1 -1
- package/favorites/components/List/List.js +0 -1
- package/favorites/components/List/ListContent.js +4 -5
- package/favorites/components/Lists/Lists.js +17 -6
- package/filter/components/FilterPageContent/components/ApplyButton/index.js +8 -10
- package/filter/components/FilterPageContent/components/ResetButton/index.js +8 -6
- package/filter/components/PriceSlider/index.js +6 -1
- package/locations/components/ChangeLocationButton/ChangeLocationButton.js +10 -14
- package/locations/components/FulfillmentSheet/FulfillmentSheetContent.js +4 -8
- package/locations/components/FulfillmentSlotSwitcher/FulfillmentSlotDialog.js +4 -8
- package/locations/components/FulfillmentSlotSwitcher/FulfillmentSlotSwitcher.js +1 -1
- package/locations/components/FulfillmentSlotSwitcher/FulfillmentSlotSwitcherBar.js +9 -18
- package/locations/components/FulfillmentSlotSwitcher/FulfillmentSlotSwitcherDefault.js +10 -10
- package/locations/components/GlobalLocationSwitcher/GlobalLocationSwitcherBar.js +9 -19
- package/locations/components/GlobalLocationSwitcher/GlobalLocationSwitcherDefault.js +9 -10
- package/locations/components/ReserveForm/ReserveForm.js +6 -7
- package/locations/components/StoreDetails/components/GetDirectionsButton.js +2 -4
- package/locations/components/StoreDetails/components/StoreDetails.js +5 -10
- package/locations/components/StoreDetails/components/StoresNearbyListItem.js +13 -21
- package/locations/components/StoreFinder/StoreFinderSelectLocationButton.js +5 -11
- package/locations/components/StoreFinder/StoreFinderStoreInfoButton.js +5 -11
- package/locations/components/StoreList/StoreListProduct.js +2 -3
- package/locations/components/StoreList/StoreListSearch.js +1 -0
- package/locations/components/StoreList/StoreSelectLocationButton.js +5 -11
- package/login/components/ForgotPassword/ForgotPassword.js +11 -23
- package/mocks/date.js +31 -0
- package/mocks/index.js +3 -0
- package/mocks/pipelineRequest.js +1 -0
- package/mocks/subscriptions.js +1 -0
- package/orders/components/OrderDetails/OrderDetailsAuthenticate.js +5 -7
- package/orders/components/OrderHistory/OrderHistoryList.d.ts.map +1 -1
- package/orders/components/OrderHistory/OrderHistoryList.js +8 -9
- package/orders/components/OrderHistory/OrderHistoryTable.d.ts.map +1 -1
- package/orders/components/OrderHistory/OrderHistoryTable.js +4 -0
- package/package.json +12 -12
- package/page/components/NotFound.d.ts +7 -0
- package/page/components/NotFound.d.ts.map +1 -0
- package/page/components/NotFound.js +8 -8
- package/page/components/ResponsiveWidgetImage/ResponsiveWidgetImage.d.ts +52 -0
- package/page/components/ResponsiveWidgetImage/ResponsiveWidgetImage.d.ts.map +1 -0
- package/page/components/ResponsiveWidgetImage/ResponsiveWidgetImage.js +4 -4
- package/page/components/ResponsiveWidgetImage/index.d.ts +2 -0
- package/page/components/ResponsiveWidgetImage/index.d.ts.map +1 -0
- package/page/components/WidgetRichText/WidgetRichText.d.ts +25 -0
- package/page/components/WidgetRichText/WidgetRichText.d.ts.map +1 -0
- package/page/components/WidgetRichText/index.d.ts +2 -0
- package/page/components/WidgetRichText/index.d.ts.map +1 -0
- package/page/components/WidgetVideo/WidgetVideo.d.ts +43 -0
- package/page/components/WidgetVideo/WidgetVideo.d.ts.map +1 -0
- package/page/components/WidgetVideo/WidgetVideo.js +33 -39
- package/page/components/WidgetVideo/index.d.ts +2 -0
- package/page/components/WidgetVideo/index.d.ts.map +1 -0
- package/page/components/Widgets/Overlay.d.ts +17 -0
- package/page/components/Widgets/Overlay.d.ts.map +1 -0
- package/page/components/Widgets/Overlay.js +24 -38
- package/page/components/Widgets/Tooltip.d.ts +20 -0
- package/page/components/Widgets/Tooltip.d.ts.map +1 -0
- package/page/components/Widgets/Tooltip.js +6 -10
- package/page/components/Widgets/Widget.d.ts +32 -0
- package/page/components/Widgets/Widget.d.ts.map +1 -0
- package/page/components/Widgets/Widget.js +7 -18
- package/page/components/Widgets/WidgetContext.d.ts +32 -38
- package/page/components/Widgets/WidgetContext.d.ts.map +1 -0
- package/page/components/Widgets/WidgetContext.js +2 -8
- package/page/components/Widgets/WidgetProvider.d.ts +25 -0
- package/page/components/Widgets/WidgetProvider.d.ts.map +1 -0
- package/page/components/Widgets/WidgetProvider.js +5 -12
- package/page/components/Widgets/Widgets.d.ts +16 -0
- package/page/components/Widgets/Widgets.d.ts.map +1 -0
- package/page/components/Widgets/Widgets.js +5 -12
- package/page/components/Widgets/WidgetsPreviewContext.d.ts +21 -0
- package/page/components/Widgets/WidgetsPreviewContext.d.ts.map +1 -0
- package/page/components/Widgets/WidgetsPreviewContext.js +5 -7
- package/page/components/Widgets/WidgetsPreviewProvider.d.ts +18 -0
- package/page/components/Widgets/WidgetsPreviewProvider.d.ts.map +1 -0
- package/page/components/Widgets/WidgetsPreviewProvider.js +5 -6
- package/page/components/Widgets/constants.d.ts +5 -0
- package/page/components/Widgets/constants.d.ts.map +1 -0
- package/page/components/Widgets/constants.js +3 -1
- package/page/components/Widgets/events.d.ts +38 -0
- package/page/components/Widgets/events.d.ts.map +1 -0
- package/page/components/Widgets/events.js +8 -12
- package/page/components/Widgets/helpers.d.ts +50 -0
- package/page/components/Widgets/helpers.d.ts.map +1 -0
- package/page/components/Widgets/helpers.js +8 -13
- package/page/components/Widgets/hooks.d.ts +13 -0
- package/page/components/Widgets/hooks.d.ts.map +1 -0
- package/page/components/Widgets/hooks.js +13 -11
- package/page/components/Widgets/index.d.ts +3 -0
- package/page/components/Widgets/index.d.ts.map +1 -0
- package/page/components/Widgets/types.d.ts +111 -113
- package/page/components/Widgets/types.d.ts.map +1 -0
- package/page/components/Widgets/types.js +1 -0
- package/page/components/index.d.ts +5 -0
- package/page/components/index.d.ts.map +1 -0
- package/page/constants/actionTypes.d.ts +4 -0
- package/page/constants/actionTypes.d.ts.map +1 -0
- package/page/constants/index.d.ts +25 -0
- package/page/constants/index.d.ts.map +1 -0
- package/page/constants/index.js +5 -3
- package/page/helpers/index.d.ts +70 -62
- package/page/helpers/index.d.ts.map +1 -0
- package/page/helpers/index.js +31 -29
- package/page/hooks/index.d.ts +54 -53
- package/page/hooks/index.d.ts.map +1 -0
- package/page/hooks/index.js +20 -15
- package/page/selectors/index.d.ts +32 -0
- package/page/selectors/index.d.ts.map +1 -0
- package/page/widgets/Button/Button.js +2 -3
- package/page/widgets/NestedCategoryFilter/NestedCategoryFilter.js +8 -8
- package/page/widgets/ProductList/ProductList.js +18 -14
- package/page/widgets/ProductSlider/ProductSlider.js +1 -15
- package/page/widgets/Video/Video.d.ts +6 -0
- package/page/widgets/Video/Video.d.ts.map +1 -0
- package/page/widgets/Video/Video.js +0 -2
- package/page/widgets/Video/hooks.d.ts +53 -0
- package/page/widgets/Video/hooks.d.ts.map +1 -0
- package/page/widgets/Video/hooks.js +4 -12
- package/page/widgets/Video/index.d.ts +2 -0
- package/page/widgets/Video/index.d.ts.map +1 -0
- package/product/components/Description/index.js +0 -2
- package/product/components/FilterBar/components/Content/components/FilterButton/index.js +2 -6
- package/product/components/FilterBar/components/Content/components/Sort/index.js +1 -5
- package/product/components/Media/FeaturedMedia.js +7 -1
- package/product/components/Media/MediaImage.js +24 -23
- package/product/components/Media/MediaPlaceholder.js +4 -7
- package/product/components/MediaSlider/components/MediaImage/index.js +6 -2
- package/product/components/MediaSlider/constants.js +1 -12
- package/product/components/OrderQuantityHint/index.js +16 -1
- package/product/components/ProductCard/index.js +36 -23
- package/product/components/ProductGrid/components/Item/components/ItemDetails/index.js +12 -4
- package/product/components/ProductGrid/components/Item/components/ItemImage/index.js +3 -6
- package/product/components/ProductGrid/components/Item/components/ItemName/index.js +6 -1
- package/product/components/ProductGrid/components/Item/index.js +10 -2
- package/product/components/ProductGrid/components/Layout/index.js +19 -4
- package/product/components/ProductGrid/constants.d.ts +2 -0
- package/product/components/ProductGrid/constants.d.ts.map +1 -0
- package/product/components/ProductGrid/constants.js +1 -0
- package/product/components/ProductGrid/hooks.d.ts +11 -0
- package/product/components/ProductGrid/hooks.d.ts.map +1 -0
- package/product/components/ProductGrid/hooks.js +48 -0
- package/product/components/ProductGrid/index.js +3 -6
- package/product/components/ProductGridPrice/index.js +0 -1
- package/product/components/ProductImage/ProductImage.d.ts +42 -0
- package/product/components/ProductImage/ProductImage.d.ts.map +1 -0
- package/product/components/ProductImage/ProductImage.js +158 -0
- package/product/components/ProductImage/ProductImagePlaceholder.d.ts +23 -0
- package/product/components/ProductImage/ProductImagePlaceholder.d.ts.map +1 -0
- package/product/components/ProductImage/ProductImagePlaceholder.js +12 -17
- package/product/components/ProductImage/constants.d.ts +7 -0
- package/product/components/ProductImage/constants.d.ts.map +1 -0
- package/product/components/ProductImage/constants.js +6 -0
- package/product/components/ProductImage/hooks.d.ts +8 -0
- package/product/components/ProductImage/hooks.d.ts.map +1 -0
- package/product/components/ProductImage/hooks.js +32 -0
- package/product/components/ProductImage/index.d.ts +3 -0
- package/product/components/ProductImage/index.d.ts.map +1 -0
- package/product/components/ProductImage/index.js +1 -201
- package/product/components/ProductList/components/Item/index.js +5 -3
- package/product/components/ProductList/components/Layout/index.js +8 -20
- package/product/components/ProductName/ProductName.d.ts +1 -1
- package/product/components/ProductName/ProductName.d.ts.map +1 -1
- package/product/components/ProductName/ProductNameContent.d.ts +2 -1
- package/product/components/ProductName/ProductNameContent.d.ts.map +1 -1
- package/product/components/ProductRatingStars/ProductRatingStars.d.ts +1 -1
- package/product/components/ProductRatingStars/ProductRatingStars.js +2 -4
- package/product/components/ProductSlider/constants.d.ts +3 -0
- package/product/components/ProductSlider/constants.d.ts.map +1 -0
- package/product/components/ProductSlider/constants.js +2 -0
- package/product/components/ProductSlider/hooks.d.ts +7 -0
- package/product/components/ProductSlider/hooks.d.ts.map +1 -0
- package/product/components/ProductSlider/hooks.js +40 -0
- package/product/components/ProductSlider/index.js +8 -8
- package/product/components/Rating/index.js +2 -4
- package/product/components/RelationsSlider/RelationsSheet.js +1 -5
- package/product/components/RelationsSlider/RelationsSliderContent.js +3 -2
- package/product/components/RelationsSlider/constants.d.ts +3 -0
- package/product/components/RelationsSlider/constants.d.ts.map +1 -0
- package/product/components/RelationsSlider/constants.js +2 -1
- package/product/components/RelationsSlider/hooks.d.ts +6 -0
- package/product/components/RelationsSlider/hooks.d.ts.map +1 -0
- package/product/components/RelationsSlider/hooks.js +34 -0
- package/product/components/UnitQuantityPicker/UnitQuantityPicker.d.ts.map +1 -1
- package/product/components/UnitQuantityPicker/UnitQuantityPicker.js +16 -34
- package/product/helpers/index.js +29 -11
- package/product/hooks/index.js +3 -1
- package/product/hooks/useLoadProductImage.js +4 -2
- package/product/hooks/useShowEmptyRatingStars.d.ts +7 -0
- package/product/hooks/useShowEmptyRatingStars.d.ts.map +1 -0
- package/product/hooks/useShowEmptyRatingStars.js +21 -0
- package/product/index.js +0 -1
- package/product/selectors/mocks/productProperties.mock.js +49 -0
- package/push-opt-in/components/PushOptInModal/index.js +4 -4
- package/registration/components/Registration/RegistrationFormActions.js +4 -4
- package/reviews/components/Reviews/components/AllReviewsLink/index.js +6 -6
- package/reviews/components/Reviews/components/Header/components/WriteReviewLink/index.js +4 -3
- package/settings/action-creators/appSettings.d.ts +3 -3
- package/settings/action-creators/appSettings.d.ts.map +1 -1
- package/settings/constants/appSettings.d.ts +3 -0
- package/settings/constants/appSettings.d.ts.map +1 -1
- package/settings/constants/appSettings.js +6 -1
- package/settings/constants/imageSettings.d.ts +52 -0
- package/settings/constants/imageSettings.d.ts.map +1 -0
- package/settings/constants/imageSettings.js +69 -0
- package/settings/helpers/index.d.ts +3 -0
- package/settings/helpers/index.d.ts.map +1 -0
- package/settings/helpers/index.js +1 -0
- package/settings/helpers/resolveImageSettings.d.ts +70 -0
- package/settings/helpers/resolveImageSettings.d.ts.map +1 -0
- package/settings/helpers/resolveImageSettings.js +171 -0
- package/settings/helpers/toImageQuality.d.ts +7 -0
- package/settings/helpers/toImageQuality.d.ts.map +1 -0
- package/settings/helpers/toImageQuality.js +44 -0
- package/settings/helpers/toThumborColor.d.ts +15 -0
- package/settings/helpers/toThumborColor.d.ts.map +1 -0
- package/settings/helpers/toThumborColor.js +51 -0
- package/settings/hooks/index.d.ts +2 -0
- package/settings/hooks/index.d.ts.map +1 -0
- package/settings/hooks/index.js +1 -0
- package/settings/hooks/useImageSettings.d.ts +28 -0
- package/settings/hooks/useImageSettings.d.ts.map +1 -0
- package/settings/hooks/useImageSettings.js +39 -0
- package/settings/reducers/appSettings.d.ts.map +1 -1
- package/settings/reducers/appSettings.js +100 -8
- package/settings/reducers/index.d.ts +3 -3
- package/settings/selectors/appSettings.d.ts +114 -1
- package/settings/selectors/appSettings.d.ts.map +1 -1
- package/settings/selectors/appSettings.js +75 -1
- package/settings/types/appSettings.d.ts +244 -0
- package/settings/types/appSettings.d.ts.map +1 -1
- package/settings/types/appSettings.js +124 -1
- package/styles/helpers/index.d.ts +2 -0
- package/styles/helpers/index.js +2 -0
- package/styles/helpers/loadFontCss.d.ts +22 -0
- package/styles/helpers/loadFontCss.d.ts.map +1 -0
- package/styles/helpers/loadFontCss.js +138 -0
- package/styles/helpers/loadThemeCss.d.ts +14 -0
- package/styles/helpers/loadThemeCss.d.ts.map +1 -0
- package/styles/helpers/loadThemeCss.js +123 -0
- package/styles/index.d.ts +1 -1
- package/styles/index.d.ts.map +1 -1
- package/styles/index.js +1 -1
- package/styles/reset/root.js +23 -4
- package/styles/reset/typographyCustomProps.d.ts +12 -0
- package/styles/reset/typographyCustomProps.d.ts.map +1 -0
- package/styles/reset/typographyCustomProps.js +11 -0
- package/styles/theme/createDefaultThemeOptions/index.d.ts.map +1 -1
- package/styles/theme/createDefaultThemeOptions/index.js +112 -4
- package/styles/theme/createTheme/createComponents.d.ts +2 -2
- package/styles/theme/createTheme/createComponents.d.ts.map +1 -1
- package/styles/theme/createTheme/createComponents.js +0 -1
- package/styles/theme/createTheme/createComponents.types.d.ts +117 -0
- package/styles/theme/createTheme/createComponents.types.d.ts.map +1 -1
- package/styles/theme/createTheme/createComponents.types.js +119 -2
- package/styles/theme/createTheme/createCssVarsForColorSchemeThemes.d.ts.map +1 -1
- package/styles/theme/createTheme/createCssVarsForColorSchemeThemes.js +13 -3
- package/styles/theme/createTheme/createPalette.types.d.ts +5 -0
- package/styles/theme/createTheme/createPalette.types.d.ts.map +1 -1
- package/styles/theme/createTheme/createPalette.types.js +7 -2
- package/styles/theme/createTheme/createShape.d.ts +3 -0
- package/styles/theme/createTheme/createShape.d.ts.map +1 -1
- package/styles/theme/createTheme/createSpacing.js +4 -1
- package/styles/theme/createTheme/createThemeFromColorScheme.d.ts +4 -2
- package/styles/theme/createTheme/createThemeFromColorScheme.d.ts.map +1 -1
- package/styles/theme/createTheme/createThemeFromColorScheme.js +6 -3
- package/styles/theme/createTheme/createTypography.d.ts +2 -1
- package/styles/theme/createTheme/createTypography.js +59 -18
- package/styles/theme/createTheme/helpers/cssVarsParser.d.ts.map +1 -1
- package/styles/theme/createTheme/helpers/cssVarsParser.js +10 -3
- package/styles/theme/createTheme/index.d.ts +2 -1
- package/styles/theme/createTheme/index.d.ts.map +1 -1
- package/styles/theme/createTheme/index.js +5 -2
- package/styles/theme/createTheme/layout.d.ts +23 -0
- package/styles/theme/createTheme/layout.d.ts.map +1 -0
- package/styles/theme/createTheme/layout.js +20 -0
- package/styles/theme/createTheme/shadows.d.ts +11 -1
- package/styles/theme/createTheme/shadows.d.ts.map +1 -1
- package/styles/theme/createTheme/shadows.js +41 -7
- package/styles/theme/createTheme/transitions.d.ts +4 -0
- package/styles/theme/createTheme/transitions.js +3 -1
- package/styles/theme/createTheme/types.d.ts +41 -9
- package/styles/theme/createTheme/types.d.ts.map +1 -1
- package/styles/theme/createTheme/types.js +16 -4
- package/styles/theme/hocs/index.d.ts +2 -0
- package/styles/theme/hocs/index.d.ts.map +1 -0
- package/styles/theme/hocs/index.js +1 -0
- package/styles/theme/hocs/withTheme.d.ts +21 -0
- package/styles/theme/hocs/withTheme.d.ts.map +1 -0
- package/styles/theme/hocs/withTheme.js +33 -0
- package/styles/theme/hooks/useColorScheme.d.ts +4 -3
- package/styles/theme/hooks/useColorScheme.d.ts.map +1 -1
- package/styles/theme/hooks/useColorScheme.js +4 -3
- package/styles/theme/hooks/useMediaQuery.d.ts +7 -0
- package/styles/theme/hooks/useMediaQuery.d.ts.map +1 -1
- package/styles/theme/hooks/useMediaQuery.js +5 -5
- package/styles/theme/hooks/useTheme.js +1 -1
- package/styles/theme/index.d.ts +5 -1
- package/styles/theme/index.d.ts.map +1 -1
- package/styles/theme/index.js +2 -1
- package/styles/theme/providers/ActiveBreakpointProvider.d.ts +1 -1
- package/styles/theme/providers/ColorSchemeContext.d.ts +40 -0
- package/styles/theme/providers/ColorSchemeContext.d.ts.map +1 -0
- package/styles/theme/providers/ColorSchemeContext.js +14 -0
- package/styles/theme/providers/ThemeContext.d.ts +3 -0
- package/styles/theme/providers/ThemeContext.d.ts.map +1 -0
- package/styles/theme/providers/ThemeContext.js +2 -0
- package/styles/theme/providers/ThemeProvider.d.ts +4 -14
- package/styles/theme/providers/ThemeProvider.d.ts.map +1 -1
- package/styles/theme/providers/ThemeProvider.js +95 -26
- package/styles/theme/utils/color.d.ts +12 -12
- package/styles/theme/utils/color.d.ts.map +1 -1
- package/tracking/components/CookieConsentModal/index.js +3 -4
- package/tracking/components/PrivacySettings/index.js +3 -3
- package/cart/components/PaymentBar/PaymentBarReserveButton.connector.js +0 -6
- package/cart/components/PaymentBar/PaymentBarReserveButton.js +0 -71
- package/components/ChipLayout/spec.js +0 -41
- package/components/Logo/spec.js +0 -12
- package/components/NavigationHandler/spec.js +0 -84
- package/components/Picker/spec.js +0 -94
- package/components/PickerUtilize/spec.js +0 -35
- package/components/RangeSlider/spec.js +0 -190
- package/components/SheetList/components/Item/spec.js +0 -101
- package/components/SheetList/spec.js +0 -43
- package/components/TimeBoundary/spec.js +0 -83
- package/filter/components/FilterItem/spec.js +0 -14
- package/filter/components/FilterPageContent/components/ApplyButton/spec.js +0 -46
- package/filter/components/FilterPageContent/components/ResetButton/spec.js +0 -29
- package/filter/components/FilterPageContent/components/Selector/components/Selected/spec.js +0 -26
- package/filter/components/FilterPageContent/components/Selector/components/Toggle/spec.js +0 -34
- package/filter/components/FilterPageContent/components/Selector/components/ValueButton/spec.js +0 -32
- package/filter/components/FilterPageContent/components/Selector/spec.js +0 -33
- package/filter/components/PriceSlider/components/Label/spec.js +0 -26
- package/filter/components/PriceSlider/spec.js +0 -30
- package/locations/components/StoreFinder/StoreFinderGetDirectionsButton.connector.js +0 -16
- package/locations/components/StoreFinder/StoreFinderGetDirectionsButton.js +0 -52
- package/product/collections/index.js +0 -1
- package/product/components/EffectivityDates/constants.d.ts +0 -3
- package/product/components/EffectivityDates/constants.d.ts.map +0 -1
- package/product/components/EffectivityDates/helpers.d.ts +0 -6
- package/product/components/EffectivityDates/helpers.d.ts.map +0 -1
- package/product/components/FilterBar/components/Content/spec.js +0 -136
- package/product/components/Header/Shipping/spec.js +0 -36
- package/product/components/Header/Tiers/components/Tier/spec.js +0 -48
- package/product/components/Header/Tiers/spec.js +0 -64
- package/product/components/Media/helpers.d.ts +0 -2
- package/product/components/Media/helpers.d.ts.map +0 -1
- package/product/components/Options/components/Content/spec.js +0 -73
- package/product/components/Options/components/TextOption/components/OptionInfo/spec.js +0 -72
- package/product/components/ProductDiscountBadge/spec.js +0 -58
- package/product/components/ProductGrid/components/Item/components/ItemDetails/spec.js +0 -73
- package/product/components/ProductGrid/components/Item/components/ItemFavoritesButton/spec.js +0 -33
- package/product/components/ProductGrid/components/Item/components/ItemImage/spec.js +0 -16
- package/product/components/ProductGrid/components/Item/components/ItemName/spec.js +0 -21
- package/product/components/ProductGrid/components/Item/components/ItemPrice/spec.js +0 -37
- package/product/components/ProductGrid/spec.js +0 -52
- package/product/components/ProductImage/connector.js +0 -12
- package/product/components/ProductImage/spec.js +0 -87
- package/product/components/ProductSlider/spec.js +0 -37
- package/product/components/Rating/spec.js +0 -58
- package/product/helpers/index.d.ts +0 -13
- package/product/helpers/index.d.ts.map +0 -1
- package/product/helpers/redirects.d.ts +0 -2
- package/product/helpers/redirects.d.ts.map +0 -1
- package/product/selectors/helpers/filterProperties.d.ts +0 -8
- package/product/selectors/helpers/filterProperties.d.ts.map +0 -1
- package/product/selectors/helpers/index.d.ts +0 -3
- package/product/selectors/helpers/index.d.ts.map +0 -1
- package/product/selectors/helpers/wrapMemoizedSelector.d.ts +0 -2
- package/product/selectors/helpers/wrapMemoizedSelector.d.ts.map +0 -1
- package/product/selectors/product.d.ts +0 -112
- package/product/selectors/product.d.ts.map +0 -1
- package/reviews/components/Reviews/components/Header/components/WriteReviewLink/spec.js +0 -52
- package/reviews/components/Reviews/components/Header/spec.js +0 -78
- package/reviews/components/Reviews/components/List/spec.js +0 -108
- package/reviews/components/Reviews/components/RatingCount/spec.js +0 -38
- package/reviews/components/Reviews/spec.js +0 -101
- package/tsconfig.build.json +0 -26
- package/tsconfig.json +0 -19
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { getCSSCustomProp } from '@shopgate/engage/styles';
|
|
2
2
|
import { themeConfig } from '@shopgate/engage';
|
|
3
3
|
const {
|
|
4
|
-
colors
|
|
4
|
+
colors,
|
|
5
|
+
settings
|
|
5
6
|
} = themeConfig;
|
|
6
7
|
|
|
7
8
|
/**
|
|
@@ -66,6 +67,11 @@ export const createDefaultThemeOptions = () => ({
|
|
|
66
67
|
background: getCSSCustomProp('--color-button-cta') || getCSSCustomProp('--color-primary')
|
|
67
68
|
}
|
|
68
69
|
},
|
|
70
|
+
badge: {
|
|
71
|
+
vars: {
|
|
72
|
+
background: getCSSCustomProp('--color-secondary')
|
|
73
|
+
}
|
|
74
|
+
},
|
|
69
75
|
snackbar: {
|
|
70
76
|
vars: {
|
|
71
77
|
background: '#323232'
|
|
@@ -88,6 +94,16 @@ export const createDefaultThemeOptions = () => ({
|
|
|
88
94
|
badgeLeft: 'var(--tab-bar-item-badge-left, calc(50% + 20px))'
|
|
89
95
|
}
|
|
90
96
|
},
|
|
97
|
+
appBar: {
|
|
98
|
+
vars: {
|
|
99
|
+
background: settings?.['@shopgate/engage/components/AppBar']?.background || '#FFF'
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
discountBadge: {
|
|
103
|
+
vars: {
|
|
104
|
+
background: 'var(--sg-palette-primary-main)'
|
|
105
|
+
}
|
|
106
|
+
},
|
|
91
107
|
ratingStars: {
|
|
92
108
|
vars: {
|
|
93
109
|
filled: `var(--rating-stars-filled, ${getCSSCustomProp('--color-primary')})`,
|
|
@@ -107,12 +123,104 @@ export const createDefaultThemeOptions = () => ({
|
|
|
107
123
|
},
|
|
108
124
|
dark: {
|
|
109
125
|
palette: {
|
|
126
|
+
// No primary or secondary here on purpose. Both inherit from the light scheme, so a
|
|
127
|
+
// merchant's brand colors carry over instead of being replaced by a hard coded pair.
|
|
128
|
+
error: {
|
|
129
|
+
main: '#FF6B6B'
|
|
130
|
+
},
|
|
131
|
+
warning: {
|
|
132
|
+
main: '#FFA726'
|
|
133
|
+
},
|
|
134
|
+
success: {
|
|
135
|
+
main: '#5DD954'
|
|
136
|
+
},
|
|
110
137
|
background: {
|
|
111
|
-
default: '#
|
|
138
|
+
default: '#000000',
|
|
139
|
+
surface: '#1C1C1E',
|
|
140
|
+
emphasized: '#2C2C2E'
|
|
112
141
|
},
|
|
113
142
|
text: {
|
|
114
|
-
primary: '#
|
|
115
|
-
secondary: '#
|
|
143
|
+
primary: '#F2F2F7',
|
|
144
|
+
secondary: '#AEAEB2'
|
|
145
|
+
},
|
|
146
|
+
grey: {
|
|
147
|
+
light: '#2C2C2E',
|
|
148
|
+
medium: '#48484A',
|
|
149
|
+
dark: '#8E8E93'
|
|
150
|
+
},
|
|
151
|
+
action: {
|
|
152
|
+
disabled: '#8E8E93',
|
|
153
|
+
disabledBackground: '#48484A',
|
|
154
|
+
pressed: '#2C2C2E'
|
|
155
|
+
}
|
|
156
|
+
},
|
|
157
|
+
components: {
|
|
158
|
+
border: {
|
|
159
|
+
vars: {
|
|
160
|
+
light: '#38383A',
|
|
161
|
+
medium: '#48484A',
|
|
162
|
+
dark: '#8E8E93'
|
|
163
|
+
}
|
|
164
|
+
},
|
|
165
|
+
input: {
|
|
166
|
+
vars: {
|
|
167
|
+
background: '#2C2C2E',
|
|
168
|
+
border: '#48484A'
|
|
169
|
+
}
|
|
170
|
+
},
|
|
171
|
+
separatorLine: {
|
|
172
|
+
vars: {
|
|
173
|
+
borderColor: '#38383A'
|
|
174
|
+
}
|
|
175
|
+
},
|
|
176
|
+
snackbar: {
|
|
177
|
+
vars: {
|
|
178
|
+
background: '#2C2C2E'
|
|
179
|
+
}
|
|
180
|
+
},
|
|
181
|
+
tabBar: {
|
|
182
|
+
vars: {
|
|
183
|
+
background: '#1C1C1E',
|
|
184
|
+
border: '#374151',
|
|
185
|
+
inactive: '#9CA3AF',
|
|
186
|
+
floatingBoxShadow: '0 0 12px rgba(0, 0, 0, 0.6)'
|
|
187
|
+
}
|
|
188
|
+
},
|
|
189
|
+
appBar: {
|
|
190
|
+
vars: {
|
|
191
|
+
background: '#1C1C1E'
|
|
192
|
+
}
|
|
193
|
+
},
|
|
194
|
+
discountBadge: {
|
|
195
|
+
vars: {
|
|
196
|
+
background: '#FF0000'
|
|
197
|
+
}
|
|
198
|
+
},
|
|
199
|
+
ratingStars: {
|
|
200
|
+
vars: {
|
|
201
|
+
empty: '#48484A'
|
|
202
|
+
}
|
|
203
|
+
},
|
|
204
|
+
cards: {
|
|
205
|
+
vars: {
|
|
206
|
+
backgroundColor: '#1C1C1E',
|
|
207
|
+
borderColor: '#38383A'
|
|
208
|
+
}
|
|
209
|
+
},
|
|
210
|
+
tiles: {
|
|
211
|
+
vars: {
|
|
212
|
+
backgroundColor: '#1C1C1E',
|
|
213
|
+
borderColor: '#38383A'
|
|
214
|
+
}
|
|
215
|
+
},
|
|
216
|
+
swiper: {
|
|
217
|
+
vars: {
|
|
218
|
+
paginationBulletColor: '#AEAEB2',
|
|
219
|
+
paginationBulletActiveColor: '#F2F2F7',
|
|
220
|
+
paginationFractionBackground: '#2C2C2E',
|
|
221
|
+
paginationProgressbarBackground: '#48484A',
|
|
222
|
+
paginationProgressbarActiveColor: '#FFFFFF'
|
|
223
|
+
}
|
|
116
224
|
}
|
|
117
225
|
}
|
|
118
226
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ComponentsOptions,
|
|
1
|
+
import type { ComponentsOptions, Components, ComponentsFromSchema } from './createComponents.types';
|
|
2
2
|
export type { ComponentsOptions, Components, ComponentVars } from './createComponents.types';
|
|
3
3
|
/**
|
|
4
4
|
* Deeply resolves a components object:
|
|
@@ -30,6 +30,6 @@ export declare function flattenComponentVars<T extends AnyObject>(input: T): { [
|
|
|
30
30
|
* @param inputComponents The input components options
|
|
31
31
|
* @returns The components object
|
|
32
32
|
*/
|
|
33
|
-
declare const createComponents: (inputComponents: ComponentsOptions) =>
|
|
33
|
+
declare const createComponents: (inputComponents: ComponentsOptions) => Components;
|
|
34
34
|
export default createComponents;
|
|
35
35
|
//# sourceMappingURL=createComponents.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createComponents.d.ts","sourceRoot":"","sources":["../../../../styles/theme/createTheme/createComponents.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACV,iBAAiB,
|
|
1
|
+
{"version":3,"file":"createComponents.d.ts","sourceRoot":"","sources":["../../../../styles/theme/createTheme/createComponents.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACV,iBAAiB,EACjB,UAAU,EACV,oBAAoB,EACrB,MAAM,0BAA0B,CAAC;AAGlC,YAAY,EAAE,iBAAiB,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAE7F;;;;;;;;GAQG;AACH,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,MAAM,EACpD,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,MAAM,GACZ,oBAAoB,CAAC,MAAM,CAAC,CAmB9B;AAGD,KAAK,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;AAErC;;;;;;;;;;GAUG;AACH,wBAAgB,oBAAoB,CAAC,CAAC,SAAS,SAAS,EAAE,KAAK,EAAE,CAAC,GAa/C,GACd,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS;IAAE,IAAI,EAAE,MAAM,CAAC,CAAA;CAAE,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAC1D,CACF;AAED;;;;GAIG;AACH,QAAA,MAAM,gBAAgB,GAAI,iBAAiB,iBAAiB,KAAG,UAQ9D,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
|
|
@@ -62,7 +62,6 @@ export function flattenComponentVars(input) {
|
|
|
62
62
|
*/
|
|
63
63
|
const createComponents = inputComponents => {
|
|
64
64
|
const mergedComponents = merge({}, componentsSchema, componentsDefaults, inputComponents);
|
|
65
|
-
// @ts-expect-error - We are sure about the type here
|
|
66
65
|
return mergedComponents;
|
|
67
66
|
};
|
|
68
67
|
export default createComponents;
|
|
@@ -131,6 +131,17 @@ export declare const componentsSchema: {
|
|
|
131
131
|
readonly color: "";
|
|
132
132
|
};
|
|
133
133
|
};
|
|
134
|
+
readonly appBar: {
|
|
135
|
+
readonly vars: {
|
|
136
|
+
readonly background: "";
|
|
137
|
+
readonly color: "";
|
|
138
|
+
};
|
|
139
|
+
};
|
|
140
|
+
readonly badge: {
|
|
141
|
+
readonly vars: {
|
|
142
|
+
readonly background: "";
|
|
143
|
+
};
|
|
144
|
+
};
|
|
134
145
|
readonly discountBadge: {
|
|
135
146
|
readonly vars: {
|
|
136
147
|
readonly background: "";
|
|
@@ -182,6 +193,51 @@ export declare const componentsSchema: {
|
|
|
182
193
|
readonly paginationProgressbarActiveColor: "";
|
|
183
194
|
};
|
|
184
195
|
};
|
|
196
|
+
readonly navigator: {
|
|
197
|
+
readonly vars: {
|
|
198
|
+
readonly height: "";
|
|
199
|
+
};
|
|
200
|
+
};
|
|
201
|
+
readonly filterBar: {
|
|
202
|
+
readonly vars: {
|
|
203
|
+
readonly height: "";
|
|
204
|
+
};
|
|
205
|
+
};
|
|
206
|
+
readonly cards: {
|
|
207
|
+
readonly vars: {
|
|
208
|
+
readonly borderRadius: "";
|
|
209
|
+
readonly backgroundColor: "";
|
|
210
|
+
readonly borderWidth: "";
|
|
211
|
+
readonly borderColor: "";
|
|
212
|
+
readonly border: "";
|
|
213
|
+
readonly shadowColor: "";
|
|
214
|
+
};
|
|
215
|
+
};
|
|
216
|
+
readonly productCard: {
|
|
217
|
+
readonly vars: {
|
|
218
|
+
readonly padding: "";
|
|
219
|
+
readonly textPadding: "";
|
|
220
|
+
readonly imagePadding: "";
|
|
221
|
+
};
|
|
222
|
+
};
|
|
223
|
+
readonly tiles: {
|
|
224
|
+
readonly vars: {
|
|
225
|
+
readonly borderRadius: "";
|
|
226
|
+
readonly backgroundColor: "";
|
|
227
|
+
readonly borderWidth: "";
|
|
228
|
+
readonly borderColor: "";
|
|
229
|
+
readonly border: "";
|
|
230
|
+
readonly padding: "";
|
|
231
|
+
readonly textPadding: "";
|
|
232
|
+
readonly textPaddingTop: "";
|
|
233
|
+
readonly imagePadding: "";
|
|
234
|
+
};
|
|
235
|
+
};
|
|
236
|
+
readonly productImage: {
|
|
237
|
+
readonly vars: {
|
|
238
|
+
readonly borderRadius: "";
|
|
239
|
+
};
|
|
240
|
+
};
|
|
185
241
|
};
|
|
186
242
|
/**
|
|
187
243
|
* Default component tokens.
|
|
@@ -192,6 +248,11 @@ export declare const componentsSchema: {
|
|
|
192
248
|
* - functions get proper `Theme` typing
|
|
193
249
|
*/
|
|
194
250
|
export declare const componentsDefaults: {
|
|
251
|
+
button: {
|
|
252
|
+
vars: {
|
|
253
|
+
borderRadius: string;
|
|
254
|
+
};
|
|
255
|
+
};
|
|
195
256
|
border: {
|
|
196
257
|
vars: {
|
|
197
258
|
light: string;
|
|
@@ -221,6 +282,17 @@ export declare const componentsDefaults: {
|
|
|
221
282
|
color: (t: Theme) => string;
|
|
222
283
|
};
|
|
223
284
|
};
|
|
285
|
+
appBar: {
|
|
286
|
+
vars: {
|
|
287
|
+
background: string;
|
|
288
|
+
color: (t: Theme) => string;
|
|
289
|
+
};
|
|
290
|
+
};
|
|
291
|
+
badge: {
|
|
292
|
+
vars: {
|
|
293
|
+
background: (t: Theme) => string;
|
|
294
|
+
};
|
|
295
|
+
};
|
|
224
296
|
discountBadge: {
|
|
225
297
|
vars: {
|
|
226
298
|
background: string;
|
|
@@ -271,6 +343,51 @@ export declare const componentsDefaults: {
|
|
|
271
343
|
paginationProgressbarActiveColor: (t: Theme) => string;
|
|
272
344
|
};
|
|
273
345
|
};
|
|
346
|
+
navigator: {
|
|
347
|
+
vars: {
|
|
348
|
+
height: number;
|
|
349
|
+
};
|
|
350
|
+
};
|
|
351
|
+
filterBar: {
|
|
352
|
+
vars: {
|
|
353
|
+
height: number;
|
|
354
|
+
};
|
|
355
|
+
};
|
|
356
|
+
cards: {
|
|
357
|
+
vars: {
|
|
358
|
+
borderRadius: string;
|
|
359
|
+
backgroundColor: (t: Theme) => string;
|
|
360
|
+
borderWidth: number;
|
|
361
|
+
borderColor: string;
|
|
362
|
+
border: string;
|
|
363
|
+
shadowColor: (t: Theme) => string;
|
|
364
|
+
};
|
|
365
|
+
};
|
|
366
|
+
productCard: {
|
|
367
|
+
vars: {
|
|
368
|
+
padding: number;
|
|
369
|
+
textPadding: number;
|
|
370
|
+
imagePadding: number;
|
|
371
|
+
};
|
|
372
|
+
};
|
|
373
|
+
tiles: {
|
|
374
|
+
vars: {
|
|
375
|
+
borderRadius: string;
|
|
376
|
+
backgroundColor: string;
|
|
377
|
+
borderWidth: number;
|
|
378
|
+
borderColor: string;
|
|
379
|
+
border: string;
|
|
380
|
+
padding: number;
|
|
381
|
+
textPadding: number;
|
|
382
|
+
textPaddingTop: string;
|
|
383
|
+
imagePadding: number;
|
|
384
|
+
};
|
|
385
|
+
};
|
|
386
|
+
productImage: {
|
|
387
|
+
vars: {
|
|
388
|
+
borderRadius: string;
|
|
389
|
+
};
|
|
390
|
+
};
|
|
274
391
|
};
|
|
275
392
|
/** Internal defaults type (must cover full schema). */
|
|
276
393
|
export type ComponentsDefaults = ComponentsOverrideFromSchema<typeof componentsSchema, Theme>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createComponents.types.d.ts","sourceRoot":"","sources":["../../../../styles/theme/createTheme/createComponents.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEzC,KAAK,KAAK,GAAG,IAAI,CAAC,SAAS,EAAE,YAAY,CAAC,CAAC;AAE3C;;;GAGG;AACH,KAAK,IAAI,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,GAAG,SAAS,CAAC;AAEzD;;;;;;;;;;GAUG;AACH,MAAM,MAAM,mBAAmB,CAAC,MAAM,IAClC,MAAM,GACN,MAAM,GACN,CAAC,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,GAAG,MAAM,CAAC,CAAC;AAEzC;;;;;;;;;;GAUG;AACH,MAAM,MAAM,oBAAoB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B,OAAO,CAAC,CAAC,CAAC,SAAS;QAAE,IAAI,EAAE,MAAM,KAAK,CAAA;KAAE,GACtC,oBAAoB,CAAC,KAAK,CAAC,GAC3B,KAAK;CACR,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB
|
|
1
|
+
{"version":3,"file":"createComponents.types.d.ts","sourceRoot":"","sources":["../../../../styles/theme/createTheme/createComponents.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEzC,KAAK,KAAK,GAAG,IAAI,CAAC,SAAS,EAAE,YAAY,CAAC,CAAC;AAE3C;;;GAGG;AACH,KAAK,IAAI,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,GAAG,SAAS,CAAC;AAEzD;;;;;;;;;;GAUG;AACH,MAAM,MAAM,mBAAmB,CAAC,MAAM,IAClC,MAAM,GACN,MAAM,GACN,CAAC,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,GAAG,MAAM,CAAC,CAAC;AAEzC;;;;;;;;;;GAUG;AACH,MAAM,MAAM,oBAAoB,CAAC,OAAO,IACtC,OAAO,SAAS,IAAI,GAAG,MAAM,GAC3B,OAAO,SAAS,SAAS,CAAC,MAAM,CAAC,CAAC,EAAE,GAAG,SAAS,oBAAoB,CAAC,CAAC,CAAC,EAAE,GACzE,OAAO,SAAS,MAAM,GAAG;KAAG,CAAC,IAAI,MAAM,OAAO,GAAG,oBAAoB,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;CAAE,GACnF,MAAM,CAAC;AAEX;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,4BAA4B,CAAC,OAAO,EAAE,MAAM,IACtD,OAAO,SAAS,IAAI,GAAG,mBAAmB,CAAC,MAAM,CAAC,GAChD,OAAO,SAAS,SAAS,CAAC,MAAM,CAAC,CAAC,EAAE,GAAG,SAAS,4BAA4B,CAAC,CAAC,EAAE,MAAM,CAAC,EAAE,GACzF,OAAO,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6ID,CAAC;AAE/B,uDAAuD;AACvD,MAAM,MAAM,kBAAkB,GAC5B,4BAA4B,CAAC,OAAO,gBAAgB,EAAE,KAAK,CAAC,CAAC;AAG/D,MAAM,MAAM,iBAAiB,GAC3B,4BAA4B,CAAC,OAAO,gBAAgB,EAAE,KAAK,CAAC,CAAC;AAG/D,MAAM,MAAM,UAAU,GAAG,oBAAoB,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAEvE,MAAM,MAAM,aAAa,GAAG,uBAAuB,CAAC,OAAO,gBAAgB,CAAC,CAAC"}
|
|
@@ -119,6 +119,17 @@ export const componentsSchema = {
|
|
|
119
119
|
color: ''
|
|
120
120
|
}
|
|
121
121
|
},
|
|
122
|
+
appBar: {
|
|
123
|
+
vars: {
|
|
124
|
+
background: '',
|
|
125
|
+
color: ''
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
badge: {
|
|
129
|
+
vars: {
|
|
130
|
+
background: ''
|
|
131
|
+
}
|
|
132
|
+
},
|
|
122
133
|
discountBadge: {
|
|
123
134
|
vars: {
|
|
124
135
|
background: ''
|
|
@@ -169,6 +180,51 @@ export const componentsSchema = {
|
|
|
169
180
|
paginationProgressbarBackground: '',
|
|
170
181
|
paginationProgressbarActiveColor: ''
|
|
171
182
|
}
|
|
183
|
+
},
|
|
184
|
+
navigator: {
|
|
185
|
+
vars: {
|
|
186
|
+
height: ''
|
|
187
|
+
}
|
|
188
|
+
},
|
|
189
|
+
filterBar: {
|
|
190
|
+
vars: {
|
|
191
|
+
height: ''
|
|
192
|
+
}
|
|
193
|
+
},
|
|
194
|
+
cards: {
|
|
195
|
+
vars: {
|
|
196
|
+
borderRadius: '',
|
|
197
|
+
backgroundColor: '',
|
|
198
|
+
borderWidth: '',
|
|
199
|
+
borderColor: '',
|
|
200
|
+
border: '',
|
|
201
|
+
shadowColor: ''
|
|
202
|
+
}
|
|
203
|
+
},
|
|
204
|
+
productCard: {
|
|
205
|
+
vars: {
|
|
206
|
+
padding: '',
|
|
207
|
+
textPadding: '',
|
|
208
|
+
imagePadding: ''
|
|
209
|
+
}
|
|
210
|
+
},
|
|
211
|
+
tiles: {
|
|
212
|
+
vars: {
|
|
213
|
+
borderRadius: '',
|
|
214
|
+
backgroundColor: '',
|
|
215
|
+
borderWidth: '',
|
|
216
|
+
borderColor: '',
|
|
217
|
+
border: '',
|
|
218
|
+
padding: '',
|
|
219
|
+
textPadding: '',
|
|
220
|
+
textPaddingTop: '',
|
|
221
|
+
imagePadding: ''
|
|
222
|
+
}
|
|
223
|
+
},
|
|
224
|
+
productImage: {
|
|
225
|
+
vars: {
|
|
226
|
+
borderRadius: ''
|
|
227
|
+
}
|
|
172
228
|
}
|
|
173
229
|
};
|
|
174
230
|
|
|
@@ -181,6 +237,11 @@ export const componentsSchema = {
|
|
|
181
237
|
* - functions get proper `Theme` typing
|
|
182
238
|
*/
|
|
183
239
|
export const componentsDefaults = {
|
|
240
|
+
button: {
|
|
241
|
+
vars: {
|
|
242
|
+
borderRadius: 'var(--sg-shape-borderRadius, 4px)'
|
|
243
|
+
}
|
|
244
|
+
},
|
|
184
245
|
border: {
|
|
185
246
|
vars: {
|
|
186
247
|
light: '#F2F2F2',
|
|
@@ -207,12 +268,23 @@ export const componentsDefaults = {
|
|
|
207
268
|
ctaButton: {
|
|
208
269
|
vars: {
|
|
209
270
|
background: t => t.palette.primary.main,
|
|
210
|
-
color: t => t.
|
|
271
|
+
color: t => t.contrastColor('var(--sg-components-ctaButton-background)')
|
|
272
|
+
}
|
|
273
|
+
},
|
|
274
|
+
appBar: {
|
|
275
|
+
vars: {
|
|
276
|
+
background: '#FFFFFF',
|
|
277
|
+
color: t => t.contrastColor('var(--sg-components-appBar-background)')
|
|
278
|
+
}
|
|
279
|
+
},
|
|
280
|
+
badge: {
|
|
281
|
+
vars: {
|
|
282
|
+
background: t => t.palette.secondary.main
|
|
211
283
|
}
|
|
212
284
|
},
|
|
213
285
|
discountBadge: {
|
|
214
286
|
vars: {
|
|
215
|
-
background: '#
|
|
287
|
+
background: '#FF0000'
|
|
216
288
|
}
|
|
217
289
|
},
|
|
218
290
|
icon: {
|
|
@@ -259,6 +331,51 @@ export const componentsDefaults = {
|
|
|
259
331
|
paginationProgressbarBackground: t => t.palette.grey.light,
|
|
260
332
|
paginationProgressbarActiveColor: t => t.palette.common.black
|
|
261
333
|
}
|
|
334
|
+
},
|
|
335
|
+
navigator: {
|
|
336
|
+
vars: {
|
|
337
|
+
height: 44
|
|
338
|
+
}
|
|
339
|
+
},
|
|
340
|
+
filterBar: {
|
|
341
|
+
vars: {
|
|
342
|
+
height: 48
|
|
343
|
+
}
|
|
344
|
+
},
|
|
345
|
+
cards: {
|
|
346
|
+
vars: {
|
|
347
|
+
borderRadius: 'var(--sg-shape-borderRadius)',
|
|
348
|
+
backgroundColor: t => t.palette.background.surface,
|
|
349
|
+
borderWidth: 0,
|
|
350
|
+
borderColor: 'transparent',
|
|
351
|
+
border: 'var(--sg-components-cards-borderWidth) solid var(--sg-components-cards-borderColor)',
|
|
352
|
+
shadowColor: t => t.palette.shadow
|
|
353
|
+
}
|
|
354
|
+
},
|
|
355
|
+
productCard: {
|
|
356
|
+
vars: {
|
|
357
|
+
padding: 0,
|
|
358
|
+
textPadding: 16,
|
|
359
|
+
imagePadding: 0
|
|
360
|
+
}
|
|
361
|
+
},
|
|
362
|
+
tiles: {
|
|
363
|
+
vars: {
|
|
364
|
+
borderRadius: 'var(--sg-shape-borderRadius)',
|
|
365
|
+
backgroundColor: 'transparent',
|
|
366
|
+
borderWidth: 0,
|
|
367
|
+
borderColor: 'transparent',
|
|
368
|
+
border: 'var(--sg-components-tiles-borderWidth) solid var(--sg-components-tiles-borderColor)',
|
|
369
|
+
padding: 0,
|
|
370
|
+
textPadding: 0,
|
|
371
|
+
textPaddingTop: 'max(var(--sg-components-tiles-textPadding), 12px)',
|
|
372
|
+
imagePadding: 0
|
|
373
|
+
}
|
|
374
|
+
},
|
|
375
|
+
productImage: {
|
|
376
|
+
vars: {
|
|
377
|
+
borderRadius: 'var(--sg-shape-borderRadius)'
|
|
378
|
+
}
|
|
262
379
|
}
|
|
263
380
|
};
|
|
264
381
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createCssVarsForColorSchemeThemes.d.ts","sourceRoot":"","sources":["../../../../styles/theme/createTheme/createCssVarsForColorSchemeThemes.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAElD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,WAAW,CAAC;AAExD,OAAO,KAAK,EACV,iBAAiB,EAAE,SAAS,EAAmB,YAAY,EAC5D,MAAM,SAAS,CAAC;AAEjB,KAAK,wCAAwC,GAAG;IAC9C,sBAAsB,EAAE,sBAAsB,CAAC;CAChD,GAAG,IAAI,CAAC,YAAY,EAAE,cAAc,CAAC,CAAC;AAEvC,MAAM,MAAM,4CAA4C,GAAG;IACzD;;;OAGG;IACH,YAAY,EAAE,SAAS,GAAG;QAAE,IAAI,EAAE,SAAS,CAAA;KAAE,CAAC;IAC9C;;;;OAIG;IACH,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;CAC7C,CAAA;AAED;;;;;;GAMG;AACH,MAAM,CAAC,OAAO,UAAU,iCAAiC,CACvD,YAAY,EAAE,iBAAiB,EAC/B,OAAO,EAAE,wCAAwC,GAChD,4CAA4C,
|
|
1
|
+
{"version":3,"file":"createCssVarsForColorSchemeThemes.d.ts","sourceRoot":"","sources":["../../../../styles/theme/createTheme/createCssVarsForColorSchemeThemes.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAElD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,WAAW,CAAC;AAExD,OAAO,KAAK,EACV,iBAAiB,EAAE,SAAS,EAAmB,YAAY,EAC5D,MAAM,SAAS,CAAC;AAEjB,KAAK,wCAAwC,GAAG;IAC9C,sBAAsB,EAAE,sBAAsB,CAAC;CAChD,GAAG,IAAI,CAAC,YAAY,EAAE,cAAc,CAAC,CAAC;AAEvC,MAAM,MAAM,4CAA4C,GAAG;IACzD;;;OAGG;IACH,YAAY,EAAE,SAAS,GAAG;QAAE,IAAI,EAAE,SAAS,CAAA;KAAE,CAAC;IAC9C;;;;OAIG;IACH,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;CAC7C,CAAA;AAED;;;;;;GAMG;AACH,MAAM,CAAC,OAAO,UAAU,iCAAiC,CACvD,YAAY,EAAE,iBAAiB,EAC/B,OAAO,EAAE,wCAAwC,GAChD,4CAA4C,CAmH9C"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import "core-js/modules/es.array.includes.js";
|
|
1
2
|
import "core-js/modules/es.array.reduce.js";
|
|
2
3
|
import merge from 'lodash/merge';
|
|
3
4
|
import omit from 'lodash/omit';
|
|
@@ -35,12 +36,18 @@ export default function createCssVarsForColorSchemeThemes(colorSchemes, options)
|
|
|
35
36
|
varsWithDefaults,
|
|
36
37
|
varNames
|
|
37
38
|
} = cssVarsColorAugmentation(cssVarsParser(rest, {
|
|
38
|
-
prefix: cssVarPrefix
|
|
39
|
+
prefix: cssVarPrefix,
|
|
40
|
+
// Keep as literal strings, not `:root` vars, so their inline `var(--sg-palette-shadow)`
|
|
41
|
+
// resolves on the element using the shadow (recolorable) instead of freezing against `:root`.
|
|
42
|
+
shouldSkipGeneratingVar: keys => ['shadows', 'shadowSizes'].includes(keys[0])
|
|
39
43
|
// @ts-expect-error - We are sure about the type here
|
|
40
44
|
}), rest, cssVarPrefix);
|
|
41
45
|
|
|
42
46
|
// Resolve component token values to actual CSS variable references
|
|
43
|
-
const resolvedComponents = flattenComponentVars(resolveComponentsValues(componentsInput,
|
|
47
|
+
const resolvedComponents = flattenComponentVars(resolveComponentsValues(componentsInput, {
|
|
48
|
+
...rest,
|
|
49
|
+
...vars
|
|
50
|
+
}));
|
|
44
51
|
const {
|
|
45
52
|
css: componentsCss,
|
|
46
53
|
vars: componentsVars,
|
|
@@ -67,9 +74,12 @@ export default function createCssVarsForColorSchemeThemes(colorSchemes, options)
|
|
|
67
74
|
}
|
|
68
75
|
});
|
|
69
76
|
|
|
70
|
-
// Create a style sheet selector for the color scheme with the generated CSS variables
|
|
77
|
+
// Create a style sheet selector for the color scheme with the generated CSS variables.
|
|
78
|
+
// `only` opts the page out of the browser applying a color scheme of its own on top of the
|
|
79
|
+
// active one - forced dark repaints the palette's own colors and inverts light surfaces.
|
|
71
80
|
styleSheets.push({
|
|
72
81
|
[`${schemeName === 'light' ? ':root, ' : ''}${getColorSchemeSelector(schemeName)}`]: {
|
|
82
|
+
colorScheme: `only ${schemeName}`,
|
|
73
83
|
...colorSchemeMap[schemeName].css
|
|
74
84
|
}
|
|
75
85
|
});
|
|
@@ -150,7 +150,12 @@ export declare const paletteSchema: {
|
|
|
150
150
|
readonly action: {
|
|
151
151
|
readonly disabled: "#808080";
|
|
152
152
|
readonly disabledBackground: "#CCCCCC";
|
|
153
|
+
readonly pressed: "#F2F2F2";
|
|
153
154
|
};
|
|
155
|
+
/**
|
|
156
|
+
* Color for the box-shadow.
|
|
157
|
+
*/
|
|
158
|
+
readonly shadow: "#000000";
|
|
154
159
|
};
|
|
155
160
|
/**
|
|
156
161
|
* Additional settings for the palette
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createPalette.types.d.ts","sourceRoot":"","sources":["../../../../styles/theme/createTheme/createPalette.types.ts"],"names":[],"mappings":"AAAA,KAAK,gBAAgB,GACjB,EAAE,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GACxD,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;AAEtC,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC,gBAAgB,EAAE,MAAM,CAAC,CA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,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CAAE,CAAC,GACnD,MAAM,CAAC;AAEX,KAAK,mBAAmB,CAAC,CAAC,IAAI;KAC3B,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS;QAAE,IAAI,EAAE,OAAO,CAAA;KAAE,GAAG,CAAC,GAAG,KAAK;CAC7D,CAAC,MAAM,CAAC,CAAC,CAAC;AAGX,MAAM,MAAM,qBAAqB,GAAG,mBAAmB,CAAC,iBAAiB,CAAC,OAAO,aAAa,CAAC,CAAC,CAAC;AAkBjG;;;;;GAKG;AACH,eAAO,MAAM,aAAa;;;;;IAKxB;;OAEG;;;;IAEH;;OAEG;;;;IAEH;;OAEG;;;;IAEH;;OAEG;;;;IAEH;;OAEG;;;;IAEH;;OAEG;;;;;;IAMH;;OAEG;;;;;IAKH;;;OAGG;;;;;;;;;;;;;;;;IAEH;;OAEG
|
|
1
|
+
{"version":3,"file":"createPalette.types.d.ts","sourceRoot":"","sources":["../../../../styles/theme/createTheme/createPalette.types.ts"],"names":[],"mappings":"AAAA,KAAK,gBAAgB,GACjB,EAAE,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GACxD,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;AAEtC,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC,gBAAgB,EAAE,MAAM,CAAC,CAAC;AAE5D;;;GAGG;AACH,MAAM,MAAM,qBAAqB,GAAG;IAClC;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF;;;GAGG;AACH,KAA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AAM,CAAC,CAAC,CAAC;AAGX,MAAM,MAAM,qBAAqB,GAAG,mBAAmB,CAAC,iBAAiB,CAAC,OAAO,aAAa,CAAC,CAAC,CAAC;AAkBjG;;;;;GAKG;AACH,eAAO,MAAM,aAAa;;;;;IAKxB;;OAEG;;;;IAEH;;OAEG;;;;IAEH;;OAEG;;;;IAEH;;OAEG;;;;IAEH;;OAEG;;;;IAEH;;OAEG;;;;;;IAMH;;OAEG;;;;;IAKH;;;OAGG;;;;;;;;;;;;;;;;IAEH;;OAEG;;;;;;IAMH;;OAEG;;CAEK,CAAC;AAEX;;GAEG;AACH,UAAU,wBAAwB;IAChC;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAGD,MAAM,MAAM,cAAc,GAAG,sBAAsB,CAAC,OAAO,aAAa,CAAC,GACrE,wBAAwB,CAAC;AAG7B,MAAM,MAAM,OAAO,GAAG,iBAAiB,CAAC,OAAO,aAAa,CAAC,CAAA"}
|
|
@@ -118,8 +118,13 @@ export const paletteSchema = {
|
|
|
118
118
|
*/
|
|
119
119
|
action: {
|
|
120
120
|
disabled: '#808080',
|
|
121
|
-
disabledBackground: '#CCCCCC'
|
|
122
|
-
|
|
121
|
+
disabledBackground: '#CCCCCC',
|
|
122
|
+
pressed: '#F2F2F2'
|
|
123
|
+
},
|
|
124
|
+
/**
|
|
125
|
+
* Color for the box-shadow.
|
|
126
|
+
*/
|
|
127
|
+
shadow: '#000000'
|
|
123
128
|
};
|
|
124
129
|
|
|
125
130
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createShape.d.ts","sourceRoot":"","sources":["../../../../styles/theme/createTheme/createShape.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,KAAK;IACpB,YAAY,EAAE,MAAM,GAAG,MAAM,CAAC;CAC/B;AAED,MAAM,MAAM,YAAY,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC;AAM1C;;;;GAIG;AACH,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,OAAO,GAAE,YAAiB,GAAG,KAAK,CAKrE"}
|
|
1
|
+
{"version":3,"file":"createShape.d.ts","sourceRoot":"","sources":["../../../../styles/theme/createTheme/createShape.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,KAAK;IACpB;;OAEG;IACH,YAAY,EAAE,MAAM,GAAG,MAAM,CAAC;CAC/B;AAED,MAAM,MAAM,YAAY,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC;AAM1C;;;;GAIG;AACH,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,OAAO,GAAE,YAAiB,GAAG,KAAK,CAKrE"}
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
// Import `isDev` from the leaf environment module rather than the `@shopgate/engage/core/helpers`
|
|
2
|
+
// barrel: the barrel pulls in providers -> toast -> the theme, creating an import cycle back into
|
|
3
|
+
// createTheme (which uses this module) and breaking theme creation during module init.
|
|
4
|
+
import { isDev } from '@shopgate/pwa-common/helpers/environment';
|
|
2
5
|
const spacingUnit = 8;
|
|
3
6
|
|
|
4
7
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ColorSchemeOptions,
|
|
1
|
+
import type { ColorSchemeOptions, ColorSchemeTheme } from './types';
|
|
2
2
|
/**
|
|
3
3
|
* Helper function to add an alpha value to a color.
|
|
4
4
|
* @param color The color to modify.
|
|
@@ -30,8 +30,10 @@ export declare const contrastColor: (color: string) => string;
|
|
|
30
30
|
/**
|
|
31
31
|
* Creates a theme object for a given color scheme (light or dark).
|
|
32
32
|
* @param colorScheme The color scheme options.
|
|
33
|
+
* @param cssVarPrefix The theme's css variable prefix. Typography references some of the properties
|
|
34
|
+
* that are generated from it later, so it has to compose the same names.
|
|
33
35
|
* @returns A theme object for the given color scheme.
|
|
34
36
|
*/
|
|
35
|
-
declare const createThemeFromColorScheme: (colorScheme: ColorSchemeOptions) =>
|
|
37
|
+
declare const createThemeFromColorScheme: (colorScheme: ColorSchemeOptions, cssVarPrefix?: string) => ColorSchemeTheme;
|
|
36
38
|
export default createThemeFromColorScheme;
|
|
37
39
|
//# sourceMappingURL=createThemeFromColorScheme.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createThemeFromColorScheme.d.ts","sourceRoot":"","sources":["../../../../styles/theme/createTheme/createThemeFromColorScheme.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,kBAAkB,EAAE,
|
|
1
|
+
{"version":3,"file":"createThemeFromColorScheme.d.ts","sourceRoot":"","sources":["../../../../styles/theme/createTheme/createThemeFromColorScheme.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAcpE;;;;;GAKG;AACH,eAAO,MAAM,KAAK,GAChB,OAAO,MAAM,EACb,aAAa,MAAM,GAAG,MAAM,KAC3B,MAAkH,CAAC;AAEtH;;;;;GAKG;AACH,eAAO,MAAM,OAAO,GAClB,OAAO,MAAM,EACb,cAAa,MAAM,GAAG,MAAY,KACjC,MAAuF,CAAC;AAE3F;;;;;GAKG;AACH,eAAO,MAAM,MAAM,GACjB,OAAO,MAAM,EACb,cAAa,MAAM,GAAG,MAAY,KACjC,MAAuF,CAAC;AAE3F;;;;;GAKG;AACH,eAAO,MAAM,aAAa,GACxB,OAAO,MAAM,KACZ,MAA4D,CAAC;AAEhE;;;;;;GAMG;AACH,QAAA,MAAM,0BAA0B,GAC9B,aAAa,kBAAkB,EAC/B,eAAe,MAAM,KACpB,gBA4BF,CAAC;AAEF,eAAe,0BAA0B,CAAC"}
|
|
@@ -2,7 +2,7 @@ import createPalette from "./createPalette";
|
|
|
2
2
|
import createTypography from "./createTypography";
|
|
3
3
|
import createComponents from "./createComponents";
|
|
4
4
|
import createShape from "./createShape";
|
|
5
|
-
import shadows from "./shadows";
|
|
5
|
+
import shadows, { shadowSizes } from "./shadows";
|
|
6
6
|
/**
|
|
7
7
|
* Calculates the percentage value for a given coefficient, which can be a number or a string representing a CSS calculation.
|
|
8
8
|
* @param coefficient The coefficient to convert, either a number or a string.
|
|
@@ -50,9 +50,11 @@ export const contrastColor = color => `oklch(from ${color} var(--__l) 0 h / var(
|
|
|
50
50
|
/**
|
|
51
51
|
* Creates a theme object for a given color scheme (light or dark).
|
|
52
52
|
* @param colorScheme The color scheme options.
|
|
53
|
+
* @param cssVarPrefix The theme's css variable prefix. Typography references some of the properties
|
|
54
|
+
* that are generated from it later, so it has to compose the same names.
|
|
53
55
|
* @returns A theme object for the given color scheme.
|
|
54
56
|
*/
|
|
55
|
-
const createThemeFromColorScheme = colorScheme => {
|
|
57
|
+
const createThemeFromColorScheme = (colorScheme, cssVarPrefix) => {
|
|
56
58
|
const {
|
|
57
59
|
palette: paletteInput = {},
|
|
58
60
|
typography: typographyInput = {},
|
|
@@ -60,7 +62,7 @@ const createThemeFromColorScheme = colorScheme => {
|
|
|
60
62
|
shape: shapeInput = {}
|
|
61
63
|
} = colorScheme;
|
|
62
64
|
const palette = createPalette(paletteInput);
|
|
63
|
-
const typography = createTypography(palette, typographyInput);
|
|
65
|
+
const typography = createTypography(palette, typographyInput, cssVarPrefix);
|
|
64
66
|
const components = createComponents(componentsInput);
|
|
65
67
|
const shape = createShape(shapeInput);
|
|
66
68
|
const theme = {
|
|
@@ -69,6 +71,7 @@ const createThemeFromColorScheme = colorScheme => {
|
|
|
69
71
|
components,
|
|
70
72
|
shape,
|
|
71
73
|
shadows,
|
|
74
|
+
shadowSizes,
|
|
72
75
|
alpha,
|
|
73
76
|
lighten,
|
|
74
77
|
darken,
|