@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.
Files changed (623) hide show
  1. package/README.md +0 -1
  2. package/account/components/Profile/Profile.provider.d.ts +1 -1
  3. package/account/components/Profile/ProfileAddressBook.d.ts.map +1 -1
  4. package/account/components/Profile/ProfileAddressBook.js +13 -22
  5. package/account/components/Profile/ProfileAddressCard.d.ts.map +1 -1
  6. package/account/components/Profile/ProfileAddressCard.js +9 -18
  7. package/account/components/Profile/ProfileForm.d.ts.map +1 -1
  8. package/account/components/Profile/ProfileForm.js +15 -42
  9. package/account/components/ProfileContact/ProfileContact.js +13 -21
  10. package/admin-preview/components/FrontendSettingsPreviewBridge/FrontendSettingsPreviewBridge.d.ts +2 -1
  11. package/admin-preview/components/FrontendSettingsPreviewBridge/FrontendSettingsPreviewBridge.d.ts.map +1 -1
  12. package/admin-preview/components/FrontendSettingsPreviewBridge/FrontendSettingsPreviewBridge.js +61 -5
  13. package/admin-preview/components/FrontendSettingsPreviewBridge/helpers.d.ts +7 -1
  14. package/admin-preview/components/FrontendSettingsPreviewBridge/helpers.d.ts.map +1 -1
  15. package/admin-preview/components/FrontendSettingsPreviewBridge/helpers.js +14 -2
  16. package/admin-preview/components/FrontendSettingsPreviewBridge/types.d.ts +15 -2
  17. package/admin-preview/components/FrontendSettingsPreviewBridge/types.d.ts.map +1 -1
  18. package/admin-preview/constants/index.d.ts +0 -12
  19. package/admin-preview/constants/index.d.ts.map +1 -1
  20. package/admin-preview/constants/index.js +0 -16
  21. package/admin-preview/helpers/_internal/detection.d.ts +53 -0
  22. package/admin-preview/helpers/_internal/detection.d.ts.map +1 -0
  23. package/admin-preview/helpers/_internal/detection.js +93 -0
  24. package/admin-preview/helpers/index.d.ts +7 -0
  25. package/admin-preview/helpers/index.d.ts.map +1 -1
  26. package/admin-preview/helpers/index.js +12 -4
  27. package/admin-preview/initialization/_internal/initialFrontendSettings.d.ts +32 -0
  28. package/admin-preview/initialization/_internal/initialFrontendSettings.d.ts.map +1 -0
  29. package/admin-preview/initialization/_internal/initialFrontendSettings.js +43 -0
  30. package/admin-preview/initialization/awaitInitialFrontendSettings.d.ts +22 -0
  31. package/admin-preview/initialization/awaitInitialFrontendSettings.d.ts.map +1 -0
  32. package/admin-preview/initialization/awaitInitialFrontendSettings.js +84 -0
  33. package/back-in-stock/components/BackInStockButton/index.js +5 -5
  34. package/back-in-stock/components/Subscriptions/components/Subscription/index.js +2 -5
  35. package/cart/components/CartItem/CartItemProductLayout.js +2 -1
  36. package/cart/components/CartItem/CartItemProductLayoutWide.js +2 -2
  37. package/cart/components/CartItem/CartItemProductLayoutWideRemoveItem.js +7 -14
  38. package/cart/components/CartItem/CartItemProductProvider.connector.js +0 -2
  39. package/cart/components/CartItem/CartItemProductProvider.js +3 -30
  40. package/cart/components/CartItem/CartItemProductProvider.types.js +0 -1
  41. package/cart/components/CartItem/CartItemQuantityPicker.js +1 -0
  42. package/cart/components/CartItems/CartItemCardReservationLabelChangeStore.js +6 -24
  43. package/cart/components/CartItems/CartItems.js +8 -10
  44. package/cart/components/CartItems/CartItemsSubstitution.js +3 -2
  45. package/cart/components/CartSummaryWide/CartSummaryWide.js +2 -2
  46. package/cart/components/CartSummaryWide/CartSummaryWideCheckoutButton.js +9 -23
  47. package/cart/components/PaymentBar/PaymentBarCheckoutButton.js +8 -30
  48. package/cart/components/PaymentBar/PaymentBarContent.js +1 -1
  49. package/cart/components/PaymentBar/testUtils/mockFactories.js +4 -11
  50. package/category/components/CategoryImage/index.js +24 -17
  51. package/checkout/components/AddressBook/AddressList.js +14 -23
  52. package/checkout/components/Checkout/CheckoutActions.js +4 -3
  53. package/checkout/components/Checkout/CheckoutAddress.js +8 -0
  54. package/checkout/components/Checkout/CheckoutSection.js +6 -2
  55. package/checkout/components/CheckoutConfirmation/CheckoutConfirmation.js +6 -7
  56. package/checkout/components/ResponsiveBackButton/ResponsiveBackButton.js +7 -17
  57. package/components/Badge/Badge.d.ts +30 -0
  58. package/components/Badge/Badge.d.ts.map +1 -0
  59. package/components/Badge/Badge.js +48 -0
  60. package/components/Badge/index.d.ts +3 -0
  61. package/components/Badge/index.d.ts.map +1 -0
  62. package/components/Badge/index.js +1 -0
  63. package/components/Card/Card.d.ts +27 -0
  64. package/components/Card/Card.d.ts.map +1 -0
  65. package/components/Card/Card.js +57 -0
  66. package/components/Card/index.d.ts +4 -0
  67. package/components/Card/index.d.ts.map +1 -0
  68. package/components/Card/index.js +2 -0
  69. package/components/Card/useCardAppearance.d.ts +11 -0
  70. package/components/Card/useCardAppearance.d.ts.map +1 -0
  71. package/components/Card/useCardAppearance.js +22 -0
  72. package/components/ChipLayout/index.js +2 -4
  73. package/components/Logo/index.d.ts.map +1 -1
  74. package/components/Logo/index.js +3 -6
  75. package/components/NavigationHandler/connector.js +1 -1
  76. package/components/NavigationHandler/index.d.ts +2 -2
  77. package/components/Paper/Paper.d.ts +48 -0
  78. package/components/Paper/Paper.d.ts.map +1 -0
  79. package/components/Paper/Paper.js +64 -0
  80. package/components/Paper/index.d.ts +3 -0
  81. package/components/Paper/index.d.ts.map +1 -0
  82. package/components/Paper/index.js +1 -0
  83. package/components/PickerUtilize/index.d.ts +2 -1
  84. package/components/PickerUtilize/index.d.ts.map +1 -1
  85. package/components/RadioCard/RadioCard.d.ts.map +1 -1
  86. package/components/RadioCard/RadioCard.js +2 -1
  87. package/components/SheetList/components/Item/index.js +8 -8
  88. package/components/Tabs/components/Tab.d.ts.map +1 -1
  89. package/components/Tabs/components/Tab.js +14 -16
  90. package/components/Typography/Typography.d.ts +1 -1
  91. package/components/View/components/Above/index.d.ts.map +1 -1
  92. package/components/View/components/Above/index.js +3 -1
  93. package/components/View/components/Below/index.d.ts.map +1 -1
  94. package/components/View/components/Below/index.js +3 -1
  95. package/components/View/components/Content/index.d.ts +2 -1
  96. package/components/View/components/Content/index.d.ts.map +1 -1
  97. package/components/View/components/Content/index.js +4 -1
  98. package/components/constants.d.ts +6 -0
  99. package/components/constants.d.ts.map +1 -0
  100. package/components/index.d.ts +5 -1
  101. package/components/index.d.ts.map +1 -1
  102. package/components/index.js +4 -2
  103. package/components/v2/Button/Button.d.ts +24 -13
  104. package/components/v2/Button/Button.d.ts.map +1 -1
  105. package/components/v2/Button/Button.js +139 -41
  106. package/components/v2/ButtonBase/ButtonBase.d.ts +50 -10
  107. package/components/v2/ButtonBase/ButtonBase.d.ts.map +1 -1
  108. package/components/v2/ButtonBase/ButtonBase.js +192 -17
  109. package/components/v2/ButtonBase/Ripple.d.ts +2 -1
  110. package/components/v2/ButtonBase/Ripple.d.ts.map +1 -1
  111. package/components/v2/ButtonBase/hooks.d.ts +0 -1
  112. package/components/v2/ButtonBase/hooks.d.ts.map +1 -1
  113. package/components/v2/ButtonBase/hooks.js +36 -12
  114. package/components/v2/ButtonGroup/ButtonGroup.d.ts +11 -5
  115. package/components/v2/ButtonGroup/ButtonGroup.d.ts.map +1 -1
  116. package/components/v2/ButtonGroup/ButtonGroup.js +49 -26
  117. package/components/v2/CircularProgress/CircularProgress.d.ts.map +1 -1
  118. package/components/v2/CircularProgress/CircularProgress.js +10 -5
  119. package/core/helpers/getFullImageSource.d.ts +5 -1
  120. package/core/helpers/getFullImageSource.d.ts.map +1 -1
  121. package/core/helpers/getFullImageSource.js +30 -14
  122. package/core/helpers/i18n.d.ts +4 -0
  123. package/core/helpers/i18n.d.ts.map +1 -1
  124. package/core/helpers/i18n.js +3 -0
  125. package/core/hooks/events/appEvents.d.ts +31 -46
  126. package/core/hooks/events/appEvents.d.ts.map +1 -0
  127. package/core/hooks/events/appEvents.js +26 -29
  128. package/core/hooks/events/index.d.ts +4 -4
  129. package/core/hooks/events/index.d.ts.map +1 -1
  130. package/core/hooks/events/useLongPress.d.ts +55 -58
  131. package/core/hooks/events/useLongPress.d.ts.map +1 -0
  132. package/core/hooks/events/useLongPress.js +23 -16
  133. package/core/hooks/events/usePressHandler.d.ts +32 -21
  134. package/core/hooks/events/usePressHandler.d.ts.map +1 -1
  135. package/core/hooks/events/usePressHandler.js +12 -10
  136. package/core/hooks/events/useScrollDirectionChange.d.ts +72 -61
  137. package/core/hooks/events/useScrollDirectionChange.d.ts.map +1 -0
  138. package/core/hooks/events/useScrollDirectionChange.js +36 -43
  139. package/core/hooks/html/useLoadImage.d.ts +3 -3
  140. package/core/hooks/html/useLoadImage.d.ts.map +1 -1
  141. package/core/hooks/html/useLoadImage.js +2 -2
  142. package/core/hooks/useLocalStorage.d.ts +8 -0
  143. package/core/hooks/useLocalStorage.d.ts.map +1 -1
  144. package/core/hooks/useLocalStorage.js +22 -15
  145. package/core/hooks/useNavigation.d.ts +10 -2
  146. package/core/hooks/useNavigation.d.ts.map +1 -1
  147. package/core/hooks/useNavigation.js +1 -2
  148. package/core/initialization/fetchSettings.d.ts +12 -0
  149. package/core/initialization/fetchSettings.d.ts.map +1 -0
  150. package/core/initialization/fetchSettings.js +134 -0
  151. package/core/initialization/index.d.ts +33 -2
  152. package/core/initialization/index.d.ts.map +1 -1
  153. package/core/initialization/index.js +44 -103
  154. package/core/router/conductor.d.ts +9 -0
  155. package/core/router/helpers.d.ts +28 -15
  156. package/core/router/helpers.d.ts.map +1 -1
  157. package/core/router/helpers.js +8 -8
  158. package/development/action-creators/index.d.ts +3 -0
  159. package/development/action-creators/index.d.ts.map +1 -0
  160. package/development/action-creators/settings.d.ts +45 -0
  161. package/development/action-creators/settings.d.ts.map +1 -0
  162. package/development/action-creators/settings.js +21 -10
  163. package/development/action-creators/storage.d.ts +17 -0
  164. package/development/action-creators/storage.d.ts.map +1 -0
  165. package/development/action-creators/storage.js +7 -4
  166. package/development/components/ClientInformation/ClientInformation.d.ts +6 -0
  167. package/development/components/ClientInformation/ClientInformation.d.ts.map +1 -0
  168. package/development/components/ClientInformation/ClientInformation.js +7 -4
  169. package/development/components/ClientInformation/actions.d.ts +6 -0
  170. package/development/components/ClientInformation/actions.d.ts.map +1 -0
  171. package/development/components/ClientInformation/actions.js +1 -1
  172. package/development/components/ClientInformation/index.d.ts +2 -0
  173. package/development/components/ClientInformation/index.d.ts.map +1 -0
  174. package/development/components/DevelopmentSettings/DevelopmentSettings.d.ts +16 -0
  175. package/development/components/DevelopmentSettings/DevelopmentSettings.d.ts.map +1 -0
  176. package/development/components/DevelopmentSettings/DevelopmentSettings.js +43 -30
  177. package/development/components/DevelopmentSettings/index.d.ts +2 -0
  178. package/development/components/DevelopmentSettings/index.d.ts.map +1 -0
  179. package/development/components/DevelopmentTools/DevelopmentTools.d.ts +10 -0
  180. package/development/components/DevelopmentTools/DevelopmentTools.d.ts.map +1 -0
  181. package/development/components/DevelopmentTools/DevelopmentTools.js +8 -8
  182. package/development/components/DevelopmentTools/Shortcuts.d.ts +6 -0
  183. package/development/components/DevelopmentTools/Shortcuts.d.ts.map +1 -0
  184. package/development/components/DevelopmentTools/Shortcuts.js +0 -1
  185. package/development/components/DevelopmentTools/hooks.d.ts +8 -0
  186. package/development/components/DevelopmentTools/hooks.d.ts.map +1 -0
  187. package/development/components/DevelopmentTools/hooks.js +2 -3
  188. package/development/components/DevelopmentTools/index.d.ts +2 -0
  189. package/development/components/DevelopmentTools/index.d.ts.map +1 -0
  190. package/development/components/SimulatedInsets/SimulatedInsetBottom.d.ts +7 -0
  191. package/development/components/SimulatedInsets/SimulatedInsetBottom.d.ts.map +1 -0
  192. package/development/components/SimulatedInsets/SimulatedInsetBottom.js +4 -9
  193. package/development/components/SimulatedInsets/SimulatedInsetTop.d.ts +7 -0
  194. package/development/components/SimulatedInsets/SimulatedInsetTop.d.ts.map +1 -0
  195. package/development/components/SimulatedInsets/SimulatedInsetTop.js +4 -9
  196. package/development/components/SimulatedInsets/SimulatedInsets.d.ts +13 -0
  197. package/development/components/SimulatedInsets/SimulatedInsets.d.ts.map +1 -0
  198. package/development/components/SimulatedInsets/SimulatedInsets.js +2 -7
  199. package/development/components/SimulatedInsets/index.d.ts +2 -0
  200. package/development/components/SimulatedInsets/index.d.ts.map +1 -0
  201. package/development/components/SimulatedInsets/types.d.ts +15 -0
  202. package/development/components/SimulatedInsets/types.d.ts.map +1 -0
  203. package/development/components/SimulatedInsets/types.js +1 -0
  204. package/development/components/index.d.ts +3 -0
  205. package/development/components/index.d.ts.map +1 -0
  206. package/development/constants/actionTypes.d.ts +6 -0
  207. package/development/constants/actionTypes.d.ts.map +1 -0
  208. package/development/constants/actionTypes.js +2 -1
  209. package/development/constants/index.d.ts +2 -0
  210. package/development/constants/index.d.ts.map +1 -0
  211. package/development/reducers/index.d.ts +24 -0
  212. package/development/reducers/index.d.ts.map +1 -0
  213. package/development/reducers/settings.d.ts +17 -0
  214. package/development/reducers/settings.d.ts.map +1 -0
  215. package/development/reducers/settings.js +48 -35
  216. package/development/reducers/storage.d.ts +17 -0
  217. package/development/reducers/storage.d.ts.map +1 -0
  218. package/development/reducers/storage.js +24 -24
  219. package/development/selectors/index.d.ts +3 -0
  220. package/development/selectors/index.d.ts.map +1 -0
  221. package/development/selectors/settings.d.ts +52 -0
  222. package/development/selectors/settings.d.ts.map +1 -0
  223. package/development/selectors/settings.js +21 -11
  224. package/development/selectors/storage.d.ts +10 -0
  225. package/development/selectors/storage.d.ts.map +1 -0
  226. package/development/selectors/storage.js +6 -18
  227. package/development/streams/index.d.ts +2 -0
  228. package/development/streams/index.d.ts.map +1 -0
  229. package/development/streams/insets.d.ts +8 -0
  230. package/development/streams/insets.d.ts.map +1 -0
  231. package/development/streams/insets.js +1 -3
  232. package/development/subscriptions/index.d.ts +15 -0
  233. package/development/subscriptions/index.d.ts.map +1 -0
  234. package/development/subscriptions/index.js +6 -2
  235. package/development/types/development.d.ts +68 -0
  236. package/development/types/development.d.ts.map +1 -0
  237. package/development/types/development.js +1 -0
  238. package/development/types/index.d.ts +2 -0
  239. package/development/types/index.d.ts.map +1 -0
  240. package/development/types/index.js +1 -0
  241. package/favorites/components/FavoriteButtonWide/FavoriteButtonWide.js +7 -17
  242. package/favorites/components/Item/Item.d.ts +1 -1
  243. package/favorites/components/Item/Item.d.ts.map +1 -1
  244. package/favorites/components/Item/Item.js +7 -7
  245. package/favorites/components/List/List.d.ts +1 -1
  246. package/favorites/components/List/List.d.ts.map +1 -1
  247. package/favorites/components/List/List.js +0 -1
  248. package/favorites/components/List/ListContent.js +4 -5
  249. package/favorites/components/Lists/Lists.js +17 -6
  250. package/filter/components/FilterPageContent/components/ApplyButton/index.js +8 -10
  251. package/filter/components/FilterPageContent/components/ResetButton/index.js +8 -6
  252. package/filter/components/PriceSlider/index.js +6 -1
  253. package/locations/components/ChangeLocationButton/ChangeLocationButton.js +10 -14
  254. package/locations/components/FulfillmentSheet/FulfillmentSheetContent.js +4 -8
  255. package/locations/components/FulfillmentSlotSwitcher/FulfillmentSlotDialog.js +4 -8
  256. package/locations/components/FulfillmentSlotSwitcher/FulfillmentSlotSwitcher.js +1 -1
  257. package/locations/components/FulfillmentSlotSwitcher/FulfillmentSlotSwitcherBar.js +9 -18
  258. package/locations/components/FulfillmentSlotSwitcher/FulfillmentSlotSwitcherDefault.js +10 -10
  259. package/locations/components/GlobalLocationSwitcher/GlobalLocationSwitcherBar.js +9 -19
  260. package/locations/components/GlobalLocationSwitcher/GlobalLocationSwitcherDefault.js +9 -10
  261. package/locations/components/ReserveForm/ReserveForm.js +6 -7
  262. package/locations/components/StoreDetails/components/GetDirectionsButton.js +2 -4
  263. package/locations/components/StoreDetails/components/StoreDetails.js +5 -10
  264. package/locations/components/StoreDetails/components/StoresNearbyListItem.js +13 -21
  265. package/locations/components/StoreFinder/StoreFinderSelectLocationButton.js +5 -11
  266. package/locations/components/StoreFinder/StoreFinderStoreInfoButton.js +5 -11
  267. package/locations/components/StoreList/StoreListProduct.js +2 -3
  268. package/locations/components/StoreList/StoreListSearch.js +1 -0
  269. package/locations/components/StoreList/StoreSelectLocationButton.js +5 -11
  270. package/login/components/ForgotPassword/ForgotPassword.js +11 -23
  271. package/mocks/date.js +31 -0
  272. package/mocks/index.js +3 -0
  273. package/mocks/pipelineRequest.js +1 -0
  274. package/mocks/subscriptions.js +1 -0
  275. package/orders/components/OrderDetails/OrderDetailsAuthenticate.js +5 -7
  276. package/orders/components/OrderHistory/OrderHistoryList.d.ts.map +1 -1
  277. package/orders/components/OrderHistory/OrderHistoryList.js +8 -9
  278. package/orders/components/OrderHistory/OrderHistoryTable.d.ts.map +1 -1
  279. package/orders/components/OrderHistory/OrderHistoryTable.js +4 -0
  280. package/package.json +12 -12
  281. package/page/components/NotFound.d.ts +7 -0
  282. package/page/components/NotFound.d.ts.map +1 -0
  283. package/page/components/NotFound.js +8 -8
  284. package/page/components/ResponsiveWidgetImage/ResponsiveWidgetImage.d.ts +52 -0
  285. package/page/components/ResponsiveWidgetImage/ResponsiveWidgetImage.d.ts.map +1 -0
  286. package/page/components/ResponsiveWidgetImage/ResponsiveWidgetImage.js +4 -4
  287. package/page/components/ResponsiveWidgetImage/index.d.ts +2 -0
  288. package/page/components/ResponsiveWidgetImage/index.d.ts.map +1 -0
  289. package/page/components/WidgetRichText/WidgetRichText.d.ts +25 -0
  290. package/page/components/WidgetRichText/WidgetRichText.d.ts.map +1 -0
  291. package/page/components/WidgetRichText/index.d.ts +2 -0
  292. package/page/components/WidgetRichText/index.d.ts.map +1 -0
  293. package/page/components/WidgetVideo/WidgetVideo.d.ts +43 -0
  294. package/page/components/WidgetVideo/WidgetVideo.d.ts.map +1 -0
  295. package/page/components/WidgetVideo/WidgetVideo.js +33 -39
  296. package/page/components/WidgetVideo/index.d.ts +2 -0
  297. package/page/components/WidgetVideo/index.d.ts.map +1 -0
  298. package/page/components/Widgets/Overlay.d.ts +17 -0
  299. package/page/components/Widgets/Overlay.d.ts.map +1 -0
  300. package/page/components/Widgets/Overlay.js +24 -38
  301. package/page/components/Widgets/Tooltip.d.ts +20 -0
  302. package/page/components/Widgets/Tooltip.d.ts.map +1 -0
  303. package/page/components/Widgets/Tooltip.js +6 -10
  304. package/page/components/Widgets/Widget.d.ts +32 -0
  305. package/page/components/Widgets/Widget.d.ts.map +1 -0
  306. package/page/components/Widgets/Widget.js +7 -18
  307. package/page/components/Widgets/WidgetContext.d.ts +32 -38
  308. package/page/components/Widgets/WidgetContext.d.ts.map +1 -0
  309. package/page/components/Widgets/WidgetContext.js +2 -8
  310. package/page/components/Widgets/WidgetProvider.d.ts +25 -0
  311. package/page/components/Widgets/WidgetProvider.d.ts.map +1 -0
  312. package/page/components/Widgets/WidgetProvider.js +5 -12
  313. package/page/components/Widgets/Widgets.d.ts +16 -0
  314. package/page/components/Widgets/Widgets.d.ts.map +1 -0
  315. package/page/components/Widgets/Widgets.js +5 -12
  316. package/page/components/Widgets/WidgetsPreviewContext.d.ts +21 -0
  317. package/page/components/Widgets/WidgetsPreviewContext.d.ts.map +1 -0
  318. package/page/components/Widgets/WidgetsPreviewContext.js +5 -7
  319. package/page/components/Widgets/WidgetsPreviewProvider.d.ts +18 -0
  320. package/page/components/Widgets/WidgetsPreviewProvider.d.ts.map +1 -0
  321. package/page/components/Widgets/WidgetsPreviewProvider.js +5 -6
  322. package/page/components/Widgets/constants.d.ts +5 -0
  323. package/page/components/Widgets/constants.d.ts.map +1 -0
  324. package/page/components/Widgets/constants.js +3 -1
  325. package/page/components/Widgets/events.d.ts +38 -0
  326. package/page/components/Widgets/events.d.ts.map +1 -0
  327. package/page/components/Widgets/events.js +8 -12
  328. package/page/components/Widgets/helpers.d.ts +50 -0
  329. package/page/components/Widgets/helpers.d.ts.map +1 -0
  330. package/page/components/Widgets/helpers.js +8 -13
  331. package/page/components/Widgets/hooks.d.ts +13 -0
  332. package/page/components/Widgets/hooks.d.ts.map +1 -0
  333. package/page/components/Widgets/hooks.js +13 -11
  334. package/page/components/Widgets/index.d.ts +3 -0
  335. package/page/components/Widgets/index.d.ts.map +1 -0
  336. package/page/components/Widgets/types.d.ts +111 -113
  337. package/page/components/Widgets/types.d.ts.map +1 -0
  338. package/page/components/Widgets/types.js +1 -0
  339. package/page/components/index.d.ts +5 -0
  340. package/page/components/index.d.ts.map +1 -0
  341. package/page/constants/actionTypes.d.ts +4 -0
  342. package/page/constants/actionTypes.d.ts.map +1 -0
  343. package/page/constants/index.d.ts +25 -0
  344. package/page/constants/index.d.ts.map +1 -0
  345. package/page/constants/index.js +5 -3
  346. package/page/helpers/index.d.ts +70 -62
  347. package/page/helpers/index.d.ts.map +1 -0
  348. package/page/helpers/index.js +31 -29
  349. package/page/hooks/index.d.ts +54 -53
  350. package/page/hooks/index.d.ts.map +1 -0
  351. package/page/hooks/index.js +20 -15
  352. package/page/selectors/index.d.ts +32 -0
  353. package/page/selectors/index.d.ts.map +1 -0
  354. package/page/widgets/Button/Button.js +2 -3
  355. package/page/widgets/NestedCategoryFilter/NestedCategoryFilter.js +8 -8
  356. package/page/widgets/ProductList/ProductList.js +18 -14
  357. package/page/widgets/ProductSlider/ProductSlider.js +1 -15
  358. package/page/widgets/Video/Video.d.ts +6 -0
  359. package/page/widgets/Video/Video.d.ts.map +1 -0
  360. package/page/widgets/Video/Video.js +0 -2
  361. package/page/widgets/Video/hooks.d.ts +53 -0
  362. package/page/widgets/Video/hooks.d.ts.map +1 -0
  363. package/page/widgets/Video/hooks.js +4 -12
  364. package/page/widgets/Video/index.d.ts +2 -0
  365. package/page/widgets/Video/index.d.ts.map +1 -0
  366. package/product/components/Description/index.js +0 -2
  367. package/product/components/FilterBar/components/Content/components/FilterButton/index.js +2 -6
  368. package/product/components/FilterBar/components/Content/components/Sort/index.js +1 -5
  369. package/product/components/Media/FeaturedMedia.js +7 -1
  370. package/product/components/Media/MediaImage.js +24 -23
  371. package/product/components/Media/MediaPlaceholder.js +4 -7
  372. package/product/components/MediaSlider/components/MediaImage/index.js +6 -2
  373. package/product/components/MediaSlider/constants.js +1 -12
  374. package/product/components/OrderQuantityHint/index.js +16 -1
  375. package/product/components/ProductCard/index.js +36 -23
  376. package/product/components/ProductGrid/components/Item/components/ItemDetails/index.js +12 -4
  377. package/product/components/ProductGrid/components/Item/components/ItemImage/index.js +3 -6
  378. package/product/components/ProductGrid/components/Item/components/ItemName/index.js +6 -1
  379. package/product/components/ProductGrid/components/Item/index.js +10 -2
  380. package/product/components/ProductGrid/components/Layout/index.js +19 -4
  381. package/product/components/ProductGrid/constants.d.ts +2 -0
  382. package/product/components/ProductGrid/constants.d.ts.map +1 -0
  383. package/product/components/ProductGrid/constants.js +1 -0
  384. package/product/components/ProductGrid/hooks.d.ts +11 -0
  385. package/product/components/ProductGrid/hooks.d.ts.map +1 -0
  386. package/product/components/ProductGrid/hooks.js +48 -0
  387. package/product/components/ProductGrid/index.js +3 -6
  388. package/product/components/ProductGridPrice/index.js +0 -1
  389. package/product/components/ProductImage/ProductImage.d.ts +42 -0
  390. package/product/components/ProductImage/ProductImage.d.ts.map +1 -0
  391. package/product/components/ProductImage/ProductImage.js +158 -0
  392. package/product/components/ProductImage/ProductImagePlaceholder.d.ts +23 -0
  393. package/product/components/ProductImage/ProductImagePlaceholder.d.ts.map +1 -0
  394. package/product/components/ProductImage/ProductImagePlaceholder.js +12 -17
  395. package/product/components/ProductImage/constants.d.ts +7 -0
  396. package/product/components/ProductImage/constants.d.ts.map +1 -0
  397. package/product/components/ProductImage/constants.js +6 -0
  398. package/product/components/ProductImage/hooks.d.ts +8 -0
  399. package/product/components/ProductImage/hooks.d.ts.map +1 -0
  400. package/product/components/ProductImage/hooks.js +32 -0
  401. package/product/components/ProductImage/index.d.ts +3 -0
  402. package/product/components/ProductImage/index.d.ts.map +1 -0
  403. package/product/components/ProductImage/index.js +1 -201
  404. package/product/components/ProductList/components/Item/index.js +5 -3
  405. package/product/components/ProductList/components/Layout/index.js +8 -20
  406. package/product/components/ProductName/ProductName.d.ts +1 -1
  407. package/product/components/ProductName/ProductName.d.ts.map +1 -1
  408. package/product/components/ProductName/ProductNameContent.d.ts +2 -1
  409. package/product/components/ProductName/ProductNameContent.d.ts.map +1 -1
  410. package/product/components/ProductRatingStars/ProductRatingStars.d.ts +1 -1
  411. package/product/components/ProductRatingStars/ProductRatingStars.js +2 -4
  412. package/product/components/ProductSlider/constants.d.ts +3 -0
  413. package/product/components/ProductSlider/constants.d.ts.map +1 -0
  414. package/product/components/ProductSlider/constants.js +2 -0
  415. package/product/components/ProductSlider/hooks.d.ts +7 -0
  416. package/product/components/ProductSlider/hooks.d.ts.map +1 -0
  417. package/product/components/ProductSlider/hooks.js +40 -0
  418. package/product/components/ProductSlider/index.js +8 -8
  419. package/product/components/Rating/index.js +2 -4
  420. package/product/components/RelationsSlider/RelationsSheet.js +1 -5
  421. package/product/components/RelationsSlider/RelationsSliderContent.js +3 -2
  422. package/product/components/RelationsSlider/constants.d.ts +3 -0
  423. package/product/components/RelationsSlider/constants.d.ts.map +1 -0
  424. package/product/components/RelationsSlider/constants.js +2 -1
  425. package/product/components/RelationsSlider/hooks.d.ts +6 -0
  426. package/product/components/RelationsSlider/hooks.d.ts.map +1 -0
  427. package/product/components/RelationsSlider/hooks.js +34 -0
  428. package/product/components/UnitQuantityPicker/UnitQuantityPicker.d.ts.map +1 -1
  429. package/product/components/UnitQuantityPicker/UnitQuantityPicker.js +16 -34
  430. package/product/helpers/index.js +29 -11
  431. package/product/hooks/index.js +3 -1
  432. package/product/hooks/useLoadProductImage.js +4 -2
  433. package/product/hooks/useShowEmptyRatingStars.d.ts +7 -0
  434. package/product/hooks/useShowEmptyRatingStars.d.ts.map +1 -0
  435. package/product/hooks/useShowEmptyRatingStars.js +21 -0
  436. package/product/index.js +0 -1
  437. package/product/selectors/mocks/productProperties.mock.js +49 -0
  438. package/push-opt-in/components/PushOptInModal/index.js +4 -4
  439. package/registration/components/Registration/RegistrationFormActions.js +4 -4
  440. package/reviews/components/Reviews/components/AllReviewsLink/index.js +6 -6
  441. package/reviews/components/Reviews/components/Header/components/WriteReviewLink/index.js +4 -3
  442. package/settings/action-creators/appSettings.d.ts +3 -3
  443. package/settings/action-creators/appSettings.d.ts.map +1 -1
  444. package/settings/constants/appSettings.d.ts +3 -0
  445. package/settings/constants/appSettings.d.ts.map +1 -1
  446. package/settings/constants/appSettings.js +6 -1
  447. package/settings/constants/imageSettings.d.ts +52 -0
  448. package/settings/constants/imageSettings.d.ts.map +1 -0
  449. package/settings/constants/imageSettings.js +69 -0
  450. package/settings/helpers/index.d.ts +3 -0
  451. package/settings/helpers/index.d.ts.map +1 -0
  452. package/settings/helpers/index.js +1 -0
  453. package/settings/helpers/resolveImageSettings.d.ts +70 -0
  454. package/settings/helpers/resolveImageSettings.d.ts.map +1 -0
  455. package/settings/helpers/resolveImageSettings.js +171 -0
  456. package/settings/helpers/toImageQuality.d.ts +7 -0
  457. package/settings/helpers/toImageQuality.d.ts.map +1 -0
  458. package/settings/helpers/toImageQuality.js +44 -0
  459. package/settings/helpers/toThumborColor.d.ts +15 -0
  460. package/settings/helpers/toThumborColor.d.ts.map +1 -0
  461. package/settings/helpers/toThumborColor.js +51 -0
  462. package/settings/hooks/index.d.ts +2 -0
  463. package/settings/hooks/index.d.ts.map +1 -0
  464. package/settings/hooks/index.js +1 -0
  465. package/settings/hooks/useImageSettings.d.ts +28 -0
  466. package/settings/hooks/useImageSettings.d.ts.map +1 -0
  467. package/settings/hooks/useImageSettings.js +39 -0
  468. package/settings/reducers/appSettings.d.ts.map +1 -1
  469. package/settings/reducers/appSettings.js +100 -8
  470. package/settings/reducers/index.d.ts +3 -3
  471. package/settings/selectors/appSettings.d.ts +114 -1
  472. package/settings/selectors/appSettings.d.ts.map +1 -1
  473. package/settings/selectors/appSettings.js +75 -1
  474. package/settings/types/appSettings.d.ts +244 -0
  475. package/settings/types/appSettings.d.ts.map +1 -1
  476. package/settings/types/appSettings.js +124 -1
  477. package/styles/helpers/index.d.ts +2 -0
  478. package/styles/helpers/index.js +2 -0
  479. package/styles/helpers/loadFontCss.d.ts +22 -0
  480. package/styles/helpers/loadFontCss.d.ts.map +1 -0
  481. package/styles/helpers/loadFontCss.js +138 -0
  482. package/styles/helpers/loadThemeCss.d.ts +14 -0
  483. package/styles/helpers/loadThemeCss.d.ts.map +1 -0
  484. package/styles/helpers/loadThemeCss.js +123 -0
  485. package/styles/index.d.ts +1 -1
  486. package/styles/index.d.ts.map +1 -1
  487. package/styles/index.js +1 -1
  488. package/styles/reset/root.js +23 -4
  489. package/styles/reset/typographyCustomProps.d.ts +12 -0
  490. package/styles/reset/typographyCustomProps.d.ts.map +1 -0
  491. package/styles/reset/typographyCustomProps.js +11 -0
  492. package/styles/theme/createDefaultThemeOptions/index.d.ts.map +1 -1
  493. package/styles/theme/createDefaultThemeOptions/index.js +112 -4
  494. package/styles/theme/createTheme/createComponents.d.ts +2 -2
  495. package/styles/theme/createTheme/createComponents.d.ts.map +1 -1
  496. package/styles/theme/createTheme/createComponents.js +0 -1
  497. package/styles/theme/createTheme/createComponents.types.d.ts +117 -0
  498. package/styles/theme/createTheme/createComponents.types.d.ts.map +1 -1
  499. package/styles/theme/createTheme/createComponents.types.js +119 -2
  500. package/styles/theme/createTheme/createCssVarsForColorSchemeThemes.d.ts.map +1 -1
  501. package/styles/theme/createTheme/createCssVarsForColorSchemeThemes.js +13 -3
  502. package/styles/theme/createTheme/createPalette.types.d.ts +5 -0
  503. package/styles/theme/createTheme/createPalette.types.d.ts.map +1 -1
  504. package/styles/theme/createTheme/createPalette.types.js +7 -2
  505. package/styles/theme/createTheme/createShape.d.ts +3 -0
  506. package/styles/theme/createTheme/createShape.d.ts.map +1 -1
  507. package/styles/theme/createTheme/createSpacing.js +4 -1
  508. package/styles/theme/createTheme/createThemeFromColorScheme.d.ts +4 -2
  509. package/styles/theme/createTheme/createThemeFromColorScheme.d.ts.map +1 -1
  510. package/styles/theme/createTheme/createThemeFromColorScheme.js +6 -3
  511. package/styles/theme/createTheme/createTypography.d.ts +2 -1
  512. package/styles/theme/createTheme/createTypography.js +59 -18
  513. package/styles/theme/createTheme/helpers/cssVarsParser.d.ts.map +1 -1
  514. package/styles/theme/createTheme/helpers/cssVarsParser.js +10 -3
  515. package/styles/theme/createTheme/index.d.ts +2 -1
  516. package/styles/theme/createTheme/index.d.ts.map +1 -1
  517. package/styles/theme/createTheme/index.js +5 -2
  518. package/styles/theme/createTheme/layout.d.ts +23 -0
  519. package/styles/theme/createTheme/layout.d.ts.map +1 -0
  520. package/styles/theme/createTheme/layout.js +20 -0
  521. package/styles/theme/createTheme/shadows.d.ts +11 -1
  522. package/styles/theme/createTheme/shadows.d.ts.map +1 -1
  523. package/styles/theme/createTheme/shadows.js +41 -7
  524. package/styles/theme/createTheme/transitions.d.ts +4 -0
  525. package/styles/theme/createTheme/transitions.js +3 -1
  526. package/styles/theme/createTheme/types.d.ts +41 -9
  527. package/styles/theme/createTheme/types.d.ts.map +1 -1
  528. package/styles/theme/createTheme/types.js +16 -4
  529. package/styles/theme/hocs/index.d.ts +2 -0
  530. package/styles/theme/hocs/index.d.ts.map +1 -0
  531. package/styles/theme/hocs/index.js +1 -0
  532. package/styles/theme/hocs/withTheme.d.ts +21 -0
  533. package/styles/theme/hocs/withTheme.d.ts.map +1 -0
  534. package/styles/theme/hocs/withTheme.js +33 -0
  535. package/styles/theme/hooks/useColorScheme.d.ts +4 -3
  536. package/styles/theme/hooks/useColorScheme.d.ts.map +1 -1
  537. package/styles/theme/hooks/useColorScheme.js +4 -3
  538. package/styles/theme/hooks/useMediaQuery.d.ts +7 -0
  539. package/styles/theme/hooks/useMediaQuery.d.ts.map +1 -1
  540. package/styles/theme/hooks/useMediaQuery.js +5 -5
  541. package/styles/theme/hooks/useTheme.js +1 -1
  542. package/styles/theme/index.d.ts +5 -1
  543. package/styles/theme/index.d.ts.map +1 -1
  544. package/styles/theme/index.js +2 -1
  545. package/styles/theme/providers/ActiveBreakpointProvider.d.ts +1 -1
  546. package/styles/theme/providers/ColorSchemeContext.d.ts +40 -0
  547. package/styles/theme/providers/ColorSchemeContext.d.ts.map +1 -0
  548. package/styles/theme/providers/ColorSchemeContext.js +14 -0
  549. package/styles/theme/providers/ThemeContext.d.ts +3 -0
  550. package/styles/theme/providers/ThemeContext.d.ts.map +1 -0
  551. package/styles/theme/providers/ThemeContext.js +2 -0
  552. package/styles/theme/providers/ThemeProvider.d.ts +4 -14
  553. package/styles/theme/providers/ThemeProvider.d.ts.map +1 -1
  554. package/styles/theme/providers/ThemeProvider.js +95 -26
  555. package/styles/theme/utils/color.d.ts +12 -12
  556. package/styles/theme/utils/color.d.ts.map +1 -1
  557. package/tracking/components/CookieConsentModal/index.js +3 -4
  558. package/tracking/components/PrivacySettings/index.js +3 -3
  559. package/cart/components/PaymentBar/PaymentBarReserveButton.connector.js +0 -6
  560. package/cart/components/PaymentBar/PaymentBarReserveButton.js +0 -71
  561. package/components/ChipLayout/spec.js +0 -41
  562. package/components/Logo/spec.js +0 -12
  563. package/components/NavigationHandler/spec.js +0 -84
  564. package/components/Picker/spec.js +0 -94
  565. package/components/PickerUtilize/spec.js +0 -35
  566. package/components/RangeSlider/spec.js +0 -190
  567. package/components/SheetList/components/Item/spec.js +0 -101
  568. package/components/SheetList/spec.js +0 -43
  569. package/components/TimeBoundary/spec.js +0 -83
  570. package/filter/components/FilterItem/spec.js +0 -14
  571. package/filter/components/FilterPageContent/components/ApplyButton/spec.js +0 -46
  572. package/filter/components/FilterPageContent/components/ResetButton/spec.js +0 -29
  573. package/filter/components/FilterPageContent/components/Selector/components/Selected/spec.js +0 -26
  574. package/filter/components/FilterPageContent/components/Selector/components/Toggle/spec.js +0 -34
  575. package/filter/components/FilterPageContent/components/Selector/components/ValueButton/spec.js +0 -32
  576. package/filter/components/FilterPageContent/components/Selector/spec.js +0 -33
  577. package/filter/components/PriceSlider/components/Label/spec.js +0 -26
  578. package/filter/components/PriceSlider/spec.js +0 -30
  579. package/locations/components/StoreFinder/StoreFinderGetDirectionsButton.connector.js +0 -16
  580. package/locations/components/StoreFinder/StoreFinderGetDirectionsButton.js +0 -52
  581. package/product/collections/index.js +0 -1
  582. package/product/components/EffectivityDates/constants.d.ts +0 -3
  583. package/product/components/EffectivityDates/constants.d.ts.map +0 -1
  584. package/product/components/EffectivityDates/helpers.d.ts +0 -6
  585. package/product/components/EffectivityDates/helpers.d.ts.map +0 -1
  586. package/product/components/FilterBar/components/Content/spec.js +0 -136
  587. package/product/components/Header/Shipping/spec.js +0 -36
  588. package/product/components/Header/Tiers/components/Tier/spec.js +0 -48
  589. package/product/components/Header/Tiers/spec.js +0 -64
  590. package/product/components/Media/helpers.d.ts +0 -2
  591. package/product/components/Media/helpers.d.ts.map +0 -1
  592. package/product/components/Options/components/Content/spec.js +0 -73
  593. package/product/components/Options/components/TextOption/components/OptionInfo/spec.js +0 -72
  594. package/product/components/ProductDiscountBadge/spec.js +0 -58
  595. package/product/components/ProductGrid/components/Item/components/ItemDetails/spec.js +0 -73
  596. package/product/components/ProductGrid/components/Item/components/ItemFavoritesButton/spec.js +0 -33
  597. package/product/components/ProductGrid/components/Item/components/ItemImage/spec.js +0 -16
  598. package/product/components/ProductGrid/components/Item/components/ItemName/spec.js +0 -21
  599. package/product/components/ProductGrid/components/Item/components/ItemPrice/spec.js +0 -37
  600. package/product/components/ProductGrid/spec.js +0 -52
  601. package/product/components/ProductImage/connector.js +0 -12
  602. package/product/components/ProductImage/spec.js +0 -87
  603. package/product/components/ProductSlider/spec.js +0 -37
  604. package/product/components/Rating/spec.js +0 -58
  605. package/product/helpers/index.d.ts +0 -13
  606. package/product/helpers/index.d.ts.map +0 -1
  607. package/product/helpers/redirects.d.ts +0 -2
  608. package/product/helpers/redirects.d.ts.map +0 -1
  609. package/product/selectors/helpers/filterProperties.d.ts +0 -8
  610. package/product/selectors/helpers/filterProperties.d.ts.map +0 -1
  611. package/product/selectors/helpers/index.d.ts +0 -3
  612. package/product/selectors/helpers/index.d.ts.map +0 -1
  613. package/product/selectors/helpers/wrapMemoizedSelector.d.ts +0 -2
  614. package/product/selectors/helpers/wrapMemoizedSelector.d.ts.map +0 -1
  615. package/product/selectors/product.d.ts +0 -112
  616. package/product/selectors/product.d.ts.map +0 -1
  617. package/reviews/components/Reviews/components/Header/components/WriteReviewLink/spec.js +0 -52
  618. package/reviews/components/Reviews/components/Header/spec.js +0 -78
  619. package/reviews/components/Reviews/components/List/spec.js +0 -108
  620. package/reviews/components/Reviews/components/RatingCount/spec.js +0 -38
  621. package/reviews/components/Reviews/spec.js +0 -101
  622. package/tsconfig.build.json +0 -26
  623. 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: '#000'
138
+ default: '#000000',
139
+ surface: '#1C1C1E',
140
+ emphasized: '#2C2C2E'
112
141
  },
113
142
  text: {
114
- primary: '#fff',
115
- secondary: '#808080'
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, ComponentVars, ComponentsFromSchema } from './createComponents.types';
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) => ComponentVars;
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,EAEjB,aAAa,EACb,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,aAS9D,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
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,o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O,GACnB,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwFnB,CAAC;AAEX;;;;;;;GAOG;AACH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgFD,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"}
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,G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AM,MAAM,uBAAuB,CAAC,OAAO,IAAI;KAC5C,CAAC,IAAI,MAAM,OAAO,GACnB,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgJnB,CAAC;AAEX;;;;;;;GAOG;AACH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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.palette.primary.contrastText
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: '#857500'
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,CA0G9C"}
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, vars));
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,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,KAAK,6BAA6B,GAAG,QAAQ,CAAC,qBAAqB,CAAC,CAAA;AAEpE,KAAK,IAAI,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,GAAG,SAAS,CAAC;AAEzD;;;;;;;;;;;;GAYG;AACH,KAAK,iBAAiB,CAAC,CAAC,IACtB,CAAC,SAAS,IAAI,GAAG,MAAM,GACrB,CAAC,SAAS,SAAS,CAAC,MAAM,CAAC,CAAC,EAAE,GAAG,SAAS,iBAAiB,CAAC,CAAC,CAAC,EAAE,GAChE,CAAC,SAAS,MAAM,GAChB,CAAC,MAAM,SAAS,MAAM,CAAC,GACrB,6BAA6B,GAC7B;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,iBAAiB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CAAE,CAAC,GAC9C,MAAM,CAAC;AAEX;;;;;;;;;;GAUG;AACH,KAAK,sBAAsB,CAAC,CAAC,IAC3B,CAAC,SAAS,I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AAG,iBAAiB,CAAC,OAAO,aAAa,CAAC,CAAA"}
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,KAAK,6BAA6B,GAAG,QAAQ,CAAC,qBAAqB,CAAC,CAAA;AAEpE,KAAK,IAAI,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,GAAG,SAAS,CAAC;AAEzD;;;;;;;;;;;;GAYG;AACH,KAAK,iBAAiB,CAAC,CAAC,IACtB,CAAC,SAAS,IAAI,GAAG,MAAM,GACrB,CAAC,SAAS,SAAS,CAAC,MAAM,CAAC,CAAC,EAAE,GAAG,SAAS,iBAAiB,CAAC,CAAC,CAAC,EAAE,GAChE,CAAC,SAAS,MAAM,GAChB,CAAC,MAAM,SAAS,MAAM,CAAC,GACrB,6BAA6B,GAC7B;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,iBAAiB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CAAE,CAAC,GAC9C,MAAM,CAAC;AAEX;;;;;;;;;;GAUG;AACH,KAAK,sBA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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,4 +1,7 @@
1
1
  export interface Shape {
2
+ /**
3
+ * The app wide corner style. Every rounded surface derives from it.
4
+ */
2
5
  borderRadius: number | string;
3
6
  }
4
7
  export type ShapeOptions = Partial<Shape>;
@@ -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
- import { isDev } from '@shopgate/engage/core/helpers';
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, BaseTheme } from './types';
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) => BaseTheme;
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,SAAS,EAAE,MAAM,SAAS,CAAC;AAc7D;;;;;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;;;;GAIG;AACH,QAAA,MAAM,0BAA0B,GAAI,aAAa,kBAAkB,KAAG,SA2BrE,CAAC;AAEF,eAAe,0BAA0B,CAAC"}
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,