@shopgate/engage 7.32.0-beta.5 → 7.32.0-beta.7

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 (196) hide show
  1. package/account/components/Profile/ProfileAddressCard.d.ts.map +1 -1
  2. package/account/components/Profile/ProfileAddressCard.js +1 -0
  3. package/admin-preview/components/FrontendSettingsPreviewBridge/types.d.ts +2 -2
  4. package/admin-preview/components/FrontendSettingsPreviewBridge/types.d.ts.map +1 -1
  5. package/back-in-stock/components/Subscriptions/components/Subscription/index.js +2 -5
  6. package/cart/components/CartItem/CartItemProductLayout.js +1 -1
  7. package/cart/components/CartItem/CartItemProductLayoutWide.js +2 -2
  8. package/cart/components/CartItems/CartItems.js +8 -10
  9. package/cart/components/CartItems/CartItemsSubstitution.js +3 -2
  10. package/category/components/CategoryImage/index.js +11 -15
  11. package/components/Card/Card.d.ts +27 -0
  12. package/components/Card/Card.d.ts.map +1 -0
  13. package/components/Card/Card.js +57 -0
  14. package/components/Card/index.d.ts +4 -0
  15. package/components/Card/index.d.ts.map +1 -0
  16. package/components/Card/index.js +2 -0
  17. package/components/Card/spec.d.ts +2 -0
  18. package/components/Card/spec.d.ts.map +1 -0
  19. package/components/Card/spec.js +128 -0
  20. package/components/Card/useCardAppearance.d.ts +11 -0
  21. package/components/Card/useCardAppearance.d.ts.map +1 -0
  22. package/components/Card/useCardAppearance.js +22 -0
  23. package/components/Paper/Paper.d.ts +49 -0
  24. package/components/Paper/Paper.d.ts.map +1 -0
  25. package/components/Paper/Paper.js +64 -0
  26. package/components/Paper/index.d.ts +3 -0
  27. package/components/Paper/index.d.ts.map +1 -0
  28. package/components/Paper/index.js +1 -0
  29. package/components/Paper/spec.d.ts +2 -0
  30. package/components/Paper/spec.d.ts.map +1 -0
  31. package/components/Paper/spec.js +131 -0
  32. package/components/RadioCard/RadioCard.d.ts.map +1 -1
  33. package/components/RadioCard/RadioCard.js +2 -1
  34. package/components/constants.d.ts +6 -0
  35. package/components/constants.d.ts.map +1 -0
  36. package/components/index.d.ts +4 -1
  37. package/components/index.d.ts.map +1 -1
  38. package/components/index.js +3 -2
  39. package/core/helpers/getFullImageSource.d.ts +5 -1
  40. package/core/helpers/getFullImageSource.d.ts.map +1 -1
  41. package/core/helpers/getFullImageSource.js +30 -14
  42. package/core/helpers/i18n.d.ts +4 -0
  43. package/core/helpers/i18n.d.ts.map +1 -1
  44. package/core/helpers/i18n.js +3 -0
  45. package/core/hooks/html/useLoadImage.d.ts +3 -3
  46. package/core/hooks/html/useLoadImage.d.ts.map +1 -1
  47. package/core/hooks/html/useLoadImage.js +2 -2
  48. package/favorites/components/Item/Item.d.ts +1 -1
  49. package/favorites/components/Item/Item.d.ts.map +1 -1
  50. package/favorites/components/Item/Item.js +2 -5
  51. package/favorites/components/List/List.d.ts +1 -1
  52. package/locations/components/StoreList/StoreListProduct.js +2 -3
  53. package/orders/components/OrderHistory/OrderHistoryList.d.ts.map +1 -1
  54. package/orders/components/OrderHistory/OrderHistoryList.js +8 -9
  55. package/orders/components/OrderHistory/OrderHistoryTable.d.ts.map +1 -1
  56. package/orders/components/OrderHistory/OrderHistoryTable.js +4 -0
  57. package/package.json +8 -8
  58. package/page/widgets/ProductSlider/ProductSlider.js +1 -15
  59. package/product/components/Media/FeaturedMedia.js +7 -1
  60. package/product/components/Media/MediaImage.js +24 -23
  61. package/product/components/Media/MediaPlaceholder.js +4 -7
  62. package/product/components/MediaSlider/components/MediaImage/index.js +6 -2
  63. package/product/components/MediaSlider/constants.js +1 -12
  64. package/product/components/ProductCard/index.js +29 -23
  65. package/product/components/ProductGrid/components/Item/components/ItemDetails/index.js +6 -3
  66. package/product/components/ProductGrid/components/Item/components/ItemImage/index.js +2 -5
  67. package/product/components/ProductGrid/components/Item/components/ItemName/index.js +5 -1
  68. package/product/components/ProductGrid/components/Item/components/ItemName/spec.js +19 -1
  69. package/product/components/ProductGrid/components/Item/index.js +9 -1
  70. package/product/components/ProductGrid/hooks.d.ts +0 -7
  71. package/product/components/ProductGrid/hooks.d.ts.map +1 -1
  72. package/product/components/ProductGrid/hooks.js +9 -10
  73. package/product/components/ProductImage/ProductImage.d.ts +42 -0
  74. package/product/components/ProductImage/ProductImage.d.ts.map +1 -0
  75. package/product/components/ProductImage/ProductImage.js +153 -0
  76. package/product/components/ProductImage/ProductImagePlaceholder.d.ts +23 -0
  77. package/product/components/ProductImage/ProductImagePlaceholder.d.ts.map +1 -0
  78. package/product/components/ProductImage/ProductImagePlaceholder.js +9 -14
  79. package/product/components/ProductImage/constants.d.ts +7 -0
  80. package/product/components/ProductImage/constants.d.ts.map +1 -0
  81. package/product/components/ProductImage/constants.js +6 -0
  82. package/product/components/ProductImage/hooks.d.ts +8 -0
  83. package/product/components/ProductImage/hooks.d.ts.map +1 -0
  84. package/product/components/ProductImage/hooks.js +32 -0
  85. package/product/components/ProductImage/index.d.ts +3 -0
  86. package/product/components/ProductImage/index.d.ts.map +1 -0
  87. package/product/components/ProductImage/index.js +1 -201
  88. package/product/components/ProductImage/spec.js +115 -60
  89. package/product/components/ProductList/components/Item/index.js +5 -3
  90. package/product/components/ProductRatingStars/ProductRatingStars.js +2 -4
  91. package/product/components/ProductSlider/constants.d.ts +3 -0
  92. package/product/components/ProductSlider/constants.d.ts.map +1 -0
  93. package/product/components/ProductSlider/constants.js +2 -0
  94. package/product/components/ProductSlider/hooks.d.ts +7 -0
  95. package/product/components/ProductSlider/hooks.d.ts.map +1 -0
  96. package/product/components/ProductSlider/hooks.js +40 -0
  97. package/product/components/ProductSlider/index.js +8 -8
  98. package/product/components/ProductSlider/spec.js +2 -2
  99. package/product/components/Rating/index.js +2 -4
  100. package/product/components/RelationsSlider/RelationsSliderContent.js +3 -2
  101. package/product/components/RelationsSlider/constants.d.ts +3 -0
  102. package/product/components/RelationsSlider/constants.d.ts.map +1 -0
  103. package/product/components/RelationsSlider/constants.js +2 -1
  104. package/product/components/RelationsSlider/hooks.d.ts +6 -0
  105. package/product/components/RelationsSlider/hooks.d.ts.map +1 -0
  106. package/product/components/RelationsSlider/hooks.js +34 -0
  107. package/product/helpers/index.js +29 -11
  108. package/product/hooks/index.js +3 -1
  109. package/product/hooks/useLoadProductImage.js +4 -2
  110. package/product/hooks/useShowEmptyRatingStars.d.ts +7 -0
  111. package/product/hooks/useShowEmptyRatingStars.d.ts.map +1 -0
  112. package/product/hooks/useShowEmptyRatingStars.js +21 -0
  113. package/product/index.js +0 -1
  114. package/settings/action-creators/appSettings.d.ts +3 -3
  115. package/settings/action-creators/appSettings.d.ts.map +1 -1
  116. package/settings/constants/appSettings.d.ts +3 -0
  117. package/settings/constants/appSettings.d.ts.map +1 -1
  118. package/settings/constants/appSettings.js +6 -1
  119. package/settings/constants/imageSettings.d.ts +52 -0
  120. package/settings/constants/imageSettings.d.ts.map +1 -0
  121. package/settings/constants/imageSettings.js +69 -0
  122. package/settings/helpers/index.d.ts +3 -0
  123. package/settings/helpers/index.d.ts.map +1 -0
  124. package/settings/helpers/index.js +1 -0
  125. package/settings/helpers/resolveImageSettings.d.ts +70 -0
  126. package/settings/helpers/resolveImageSettings.d.ts.map +1 -0
  127. package/settings/helpers/resolveImageSettings.js +171 -0
  128. package/settings/helpers/toImageQuality.d.ts +7 -0
  129. package/settings/helpers/toImageQuality.d.ts.map +1 -0
  130. package/settings/helpers/toImageQuality.js +44 -0
  131. package/settings/helpers/toThumborColor.d.ts +15 -0
  132. package/settings/helpers/toThumborColor.d.ts.map +1 -0
  133. package/settings/helpers/toThumborColor.js +51 -0
  134. package/settings/hooks/index.d.ts +2 -0
  135. package/settings/hooks/index.d.ts.map +1 -0
  136. package/settings/hooks/index.js +1 -0
  137. package/settings/hooks/useImageSettings.d.ts +28 -0
  138. package/settings/hooks/useImageSettings.d.ts.map +1 -0
  139. package/settings/hooks/useImageSettings.js +39 -0
  140. package/settings/reducers/appSettings.d.ts.map +1 -1
  141. package/settings/reducers/appSettings.js +79 -11
  142. package/settings/reducers/index.d.ts +3 -3
  143. package/settings/selectors/appSettings.d.ts +71 -1
  144. package/settings/selectors/appSettings.d.ts.map +1 -1
  145. package/settings/selectors/appSettings.js +41 -1
  146. package/settings/types/appSettings.d.ts +192 -9
  147. package/settings/types/appSettings.d.ts.map +1 -1
  148. package/styles/index.d.ts +1 -1
  149. package/styles/index.d.ts.map +1 -1
  150. package/styles/reset/root.js +23 -4
  151. package/styles/reset/typographyCustomProps.d.ts +12 -0
  152. package/styles/reset/typographyCustomProps.d.ts.map +1 -0
  153. package/styles/reset/typographyCustomProps.js +11 -0
  154. package/styles/theme/createTheme/createComponents.types.d.ts +50 -0
  155. package/styles/theme/createTheme/createComponents.types.d.ts.map +1 -1
  156. package/styles/theme/createTheme/createComponents.types.js +50 -0
  157. package/styles/theme/createTheme/createCssVarsForColorSchemeThemes.d.ts.map +1 -1
  158. package/styles/theme/createTheme/createCssVarsForColorSchemeThemes.js +5 -1
  159. package/styles/theme/createTheme/createPalette.types.d.ts +4 -0
  160. package/styles/theme/createTheme/createPalette.types.d.ts.map +1 -1
  161. package/styles/theme/createTheme/createPalette.types.js +5 -1
  162. package/styles/theme/createTheme/createShape.d.ts +4 -0
  163. package/styles/theme/createTheme/createShape.d.ts.map +1 -1
  164. package/styles/theme/createTheme/createShape.js +2 -1
  165. package/styles/theme/createTheme/createThemeFromColorScheme.d.ts.map +1 -1
  166. package/styles/theme/createTheme/createThemeFromColorScheme.js +2 -1
  167. package/styles/theme/createTheme/createTypography.js +1 -0
  168. package/styles/theme/createTheme/helpers/cssVarsParser.d.ts.map +1 -1
  169. package/styles/theme/createTheme/helpers/cssVarsParser.js +10 -3
  170. package/styles/theme/createTheme/shadows.d.ts +11 -1
  171. package/styles/theme/createTheme/shadows.d.ts.map +1 -1
  172. package/styles/theme/createTheme/shadows.js +41 -7
  173. package/styles/theme/createTheme/types.d.ts +5 -1
  174. package/styles/theme/createTheme/types.d.ts.map +1 -1
  175. package/styles/theme/index.d.ts +1 -0
  176. package/styles/theme/index.d.ts.map +1 -1
  177. package/product/collections/index.js +0 -1
  178. package/product/components/EffectivityDates/constants.d.ts +0 -3
  179. package/product/components/EffectivityDates/constants.d.ts.map +0 -1
  180. package/product/components/EffectivityDates/helpers.d.ts +0 -6
  181. package/product/components/EffectivityDates/helpers.d.ts.map +0 -1
  182. package/product/components/Media/helpers.d.ts +0 -2
  183. package/product/components/Media/helpers.d.ts.map +0 -1
  184. package/product/components/ProductImage/connector.js +0 -12
  185. package/product/helpers/index.d.ts +0 -13
  186. package/product/helpers/index.d.ts.map +0 -1
  187. package/product/helpers/redirects.d.ts +0 -2
  188. package/product/helpers/redirects.d.ts.map +0 -1
  189. package/product/selectors/helpers/filterProperties.d.ts +0 -8
  190. package/product/selectors/helpers/filterProperties.d.ts.map +0 -1
  191. package/product/selectors/helpers/index.d.ts +0 -3
  192. package/product/selectors/helpers/index.d.ts.map +0 -1
  193. package/product/selectors/helpers/wrapMemoizedSelector.d.ts +0 -2
  194. package/product/selectors/helpers/wrapMemoizedSelector.d.ts.map +0 -1
  195. package/product/selectors/product.d.ts +0 -112
  196. package/product/selectors/product.d.ts.map +0 -1
@@ -203,6 +203,31 @@ export declare const componentsSchema: {
203
203
  readonly height: "";
204
204
  };
205
205
  };
206
+ readonly cards: {
207
+ readonly vars: {
208
+ readonly backgroundColor: "";
209
+ readonly borderWidth: "";
210
+ readonly borderColor: "";
211
+ readonly border: "";
212
+ readonly shadowColor: "";
213
+ };
214
+ };
215
+ readonly productCard: {
216
+ readonly vars: {
217
+ readonly padding: "";
218
+ readonly textPadding: "";
219
+ readonly imagePadding: "";
220
+ };
221
+ };
222
+ readonly tiles: {
223
+ readonly vars: {
224
+ readonly backgroundColor: "";
225
+ readonly padding: "";
226
+ readonly textPadding: "";
227
+ readonly textPaddingTop: "";
228
+ readonly imagePadding: "";
229
+ };
230
+ };
206
231
  };
207
232
  /**
208
233
  * Default component tokens.
@@ -313,6 +338,31 @@ export declare const componentsDefaults: {
313
338
  height: number;
314
339
  };
315
340
  };
341
+ cards: {
342
+ vars: {
343
+ backgroundColor: (t: Theme) => string;
344
+ borderWidth: number;
345
+ borderColor: string;
346
+ border: string;
347
+ shadowColor: (t: Theme) => string;
348
+ };
349
+ };
350
+ productCard: {
351
+ vars: {
352
+ padding: number;
353
+ textPadding: number;
354
+ imagePadding: number;
355
+ };
356
+ };
357
+ tiles: {
358
+ vars: {
359
+ backgroundColor: string;
360
+ padding: number;
361
+ textPadding: number;
362
+ textPaddingTop: string;
363
+ imagePadding: number;
364
+ };
365
+ };
316
366
  };
317
367
  /** Internal defaults type (must cover full schema). */
318
368
  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,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;AAC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,CAAC;AAEX;;;;;;;GAOG;AACH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqGD,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,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,IAA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsInB,CAAC;AAEX;;;;;;;GAOG;AACH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8HD,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"}
@@ -190,6 +190,31 @@ export const componentsSchema = {
190
190
  vars: {
191
191
  height: ''
192
192
  }
193
+ },
194
+ cards: {
195
+ vars: {
196
+ backgroundColor: '',
197
+ borderWidth: '',
198
+ borderColor: '',
199
+ border: '',
200
+ shadowColor: ''
201
+ }
202
+ },
203
+ productCard: {
204
+ vars: {
205
+ padding: '',
206
+ textPadding: '',
207
+ imagePadding: ''
208
+ }
209
+ },
210
+ tiles: {
211
+ vars: {
212
+ backgroundColor: '',
213
+ padding: '',
214
+ textPadding: '',
215
+ textPaddingTop: '',
216
+ imagePadding: ''
217
+ }
193
218
  }
194
219
  };
195
220
 
@@ -301,6 +326,31 @@ export const componentsDefaults = {
301
326
  vars: {
302
327
  height: 48
303
328
  }
329
+ },
330
+ cards: {
331
+ vars: {
332
+ backgroundColor: t => t.palette.background.surface,
333
+ borderWidth: 0,
334
+ borderColor: 'transparent',
335
+ border: 'var(--sg-components-cards-borderWidth) solid var(--sg-components-cards-borderColor)',
336
+ shadowColor: t => t.palette.shadow
337
+ }
338
+ },
339
+ productCard: {
340
+ vars: {
341
+ padding: 0,
342
+ textPadding: 16,
343
+ imagePadding: 0
344
+ }
345
+ },
346
+ tiles: {
347
+ vars: {
348
+ backgroundColor: 'transparent',
349
+ padding: 0,
350
+ textPadding: 8,
351
+ textPaddingTop: 'max(var(--sg-components-tiles-textPadding), 16px)',
352
+ imagePadding: 0
353
+ }
304
354
  }
305
355
  };
306
356
 
@@ -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,CA6G9C"}
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,CAgH9C"}
@@ -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,7 +36,10 @@ 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
 
@@ -151,6 +151,10 @@ export declare const paletteSchema: {
151
151
  readonly disabled: "#808080";
152
152
  readonly disabledBackground: "#CCCCCC";
153
153
  };
154
+ /**
155
+ * Color for the box-shadow.
156
+ */
157
+ readonly shadow: "#000000";
154
158
  };
155
159
  /**
156
160
  * 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,C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,MAAM,cAAc,GAAG,sBAAsB,CAAC,OAAO,aAAa,CAAC,GACrE,wBAAwB,CAAC;AAG7B,MAAM,MAAM,OAAO,GAAG,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,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,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"}
@@ -119,7 +119,11 @@ export const paletteSchema = {
119
119
  action: {
120
120
  disabled: '#808080',
121
121
  disabledBackground: '#CCCCCC'
122
- }
122
+ },
123
+ /**
124
+ * Color for the box-shadow.
125
+ */
126
+ shadow: '#000000'
123
127
  };
124
128
 
125
129
  /**
@@ -1,5 +1,9 @@
1
1
  export interface Shape {
2
2
  borderRadius: number | string;
3
+ /**
4
+ * Corner radius of cards (product cards, content cards).
5
+ */
6
+ cardsBorderRadius: number | string;
3
7
  }
4
8
  export type ShapeOptions = Partial<Shape>;
5
9
  /**
@@ -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,YAAY,EAAE,MAAM,GAAG,MAAM,CAAC;IAC9B;;OAEG;IACH,iBAAiB,EAAE,MAAM,GAAG,MAAM,CAAC;CACpC;AAED,MAAM,MAAM,YAAY,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC;AAO1C;;;;GAIG;AACH,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,OAAO,GAAE,YAAiB,GAAG,KAAK,CAKrE"}
@@ -1,5 +1,6 @@
1
1
  const shape = {
2
- borderRadius: 4
2
+ borderRadius: 4,
3
+ cardsBorderRadius: 10
3
4
  };
4
5
 
5
6
  /**
@@ -1 +1 @@
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;;;;GAIG;AACH,QAAA,MAAM,0BAA0B,GAAI,aAAa,kBAAkB,KAAG,gBA2BrE,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;;;;GAIG;AACH,QAAA,MAAM,0BAA0B,GAAI,aAAa,kBAAkB,KAAG,gBA4BrE,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.
@@ -69,6 +69,7 @@ const createThemeFromColorScheme = colorScheme => {
69
69
  components,
70
70
  shape,
71
71
  shadows,
72
+ shadowSizes,
72
73
  alpha,
73
74
  lighten,
74
75
  darken,
@@ -32,6 +32,7 @@ export default function createTypography(palette, typography) {
32
32
  } = typeof typography === 'function' ? typography(palette) : typography;
33
33
  if (isDev) {
34
34
  if (typeof fontSize !== 'number') {
35
+ // eslint-disable-next-line no-console
35
36
  console.error('Shopgate Theme: `fontSize` is required to be a number.');
36
37
  }
37
38
  }
@@ -1 +1 @@
1
- {"version":3,"file":"cssVarsParser.d.ts","sourceRoot":"","sources":["../../../../../styles/theme/createTheme/helpers/cssVarsParser.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAsIH,KAAK,oBAAoB,GAAG;IAC1B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,uBAAuB,CAAC,EAAE,CAAC,cAAc,EAAE,KAAK,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,KAAK,OAAO,CAAC;CAC9F,CAAC;AAEF,MAAM,MAAM,wBAAwB,CAAC,CAAC,IAAI;IACxC;;;OAGG;IACH,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,CAAC;IACrC;;;OAGG;IACH,IAAI,EAAE,CAAC,CAAC;IACR;;;OAGG;IACH,gBAAgB,EAAE,CAAC,CAAC;IACpB;;;OAGG;IACH,QAAQ,EAAE,CAAC,CAAC;CACb,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,CAAC,SAAS,MAAM,EACpD,KAAK,EAAE,MAAM,EACb,OAAO,CAAC,EAAE,oBAAoB,GAC7B,wBAAwB,CAAC,CAAC,CAAC,CA+D7B"}
1
+ {"version":3,"file":"cssVarsParser.d.ts","sourceRoot":"","sources":["../../../../../styles/theme/createTheme/helpers/cssVarsParser.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AA6IH,KAAK,oBAAoB,GAAG;IAC1B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,uBAAuB,CAAC,EAAE,CAAC,cAAc,EAAE,KAAK,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,KAAK,OAAO,CAAC;CAC9F,CAAC;AAEF,MAAM,MAAM,wBAAwB,CAAC,CAAC,IAAI;IACxC;;;OAGG;IACH,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,CAAC;IACrC;;;OAGG;IACH,IAAI,EAAE,CAAC,CAAC;IACR;;;OAGG;IACH,gBAAgB,EAAE,CAAC,CAAC;IACpB;;;OAGG;IACH,QAAQ,EAAE,CAAC,CAAC;CACb,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,CAAC,SAAS,MAAM,EACpD,KAAK,EAAE,MAAM,EACb,OAAO,CAAC,EAAE,oBAAoB,GAC7B,wBAAwB,CAAC,CAAC,CAAC,CA+D7B"}
@@ -85,11 +85,18 @@ const walkObjectDeep = (obj, callback, shouldSkipPaths) => {
85
85
  */
86
86
  const getCssValue = (keys, value) => {
87
87
  if (typeof value === 'number') {
88
- if (['lineHeight', 'fontWeight', 'opacity', 'zIndex', 'fontSize', 'fontWeightLight', 'fontWeightRegular', 'fontWeightMedium', 'fontWeightBold'].some(prop => keys[keys.length - 1] === prop)) {
89
- // CSS property that are unitless
88
+ const lastKey = keys[keys.length - 1];
89
+ if (['lineHeight', 'fontWeight', 'opacity', 'zIndex', 'fontWeightLight', 'fontWeightRegular', 'fontWeightMedium', 'fontWeightBold'].some(prop => lastKey === prop)) {
90
+ // CSS properties that are unitless
91
+ return value;
92
+ }
93
+
94
+ // `typography.fontSize` is MUI's base font-size coefficient and stays unitless, but variant
95
+ // font sizes (e.g. `typography.body2.fontSize`) are lengths and need a `px` unit - otherwise a
96
+ // numeric override would produce an invalid `font-size: 12` custom property.
97
+ if (lastKey === 'fontSize' && keys[keys.length - 2] === 'typography') {
90
98
  return value;
91
99
  }
92
- const lastKey = keys[keys.length - 1];
93
100
  if (lastKey.toLowerCase().includes('opacity')) {
94
101
  // opacity values are unitless
95
102
  return value;
@@ -1,4 +1,14 @@
1
- declare const shadows: readonly ["none", string, string, string, string, string, string, string, string, string, string, string, string, string, string, string, string, string, string, string, string, string, string, string, string];
1
+ /**
2
+ * The elevations the admin offers. Offset, blur and spread are not configurable — a shop picks
3
+ * one of these presets so the surfaces stay visually consistent, and only the color is free.
4
+ */
5
+ export type ShadowSize = 'none' | 'low' | 'medium' | 'strong';
6
+ export declare const SHADOW_COLOR_VAR = "--sg-palette-shadow";
7
+ declare const shadows: readonly ["none", ...string[]];
2
8
  export type Shadows = typeof shadows;
9
+ /**
10
+ * The finished shadow for each size the admin offers, for a single `theme.shadowSizes[size]` lookup.
11
+ */
12
+ export declare const shadowSizes: Record<ShadowSize, string>;
3
13
  export default shadows;
4
14
  //# sourceMappingURL=shadows.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"shadows.d.ts","sourceRoot":"","sources":["../../../../styles/theme/createTheme/shadows.ts"],"names":[],"mappings":"AAaA,QAAA,MAAM,OAAO,mNA0BH,CAAC;AAEX,MAAM,MAAM,OAAO,GAAG,OAAO,OAAO,CAAA;AAEpC,eAAe,OAAO,CAAC"}
1
+ {"version":3,"file":"shadows.d.ts","sourceRoot":"","sources":["../../../../styles/theme/createTheme/shadows.ts"],"names":[],"mappings":"AAKA;;;GAGG;AACH,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,KAAK,GAAG,QAAQ,GAAG,QAAQ,CAAC;AA+D9D,eAAO,MAAM,gBAAgB,wBAAwB,CAAC;AAEtD,QAAA,MAAM,OAAO,gCAMH,CAAC;AAEX,MAAM,MAAM,OAAO,GAAG,OAAO,OAAO,CAAA;AAEpC;;GAEG;AACH,eAAO,MAAM,WAAW,EAEnB,MAAM,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC;AAEhC,eAAe,OAAO,CAAC"}
@@ -1,10 +1,44 @@
1
- const shadowKeyUmbraOpacity = 0.2;
2
- const shadowKeyPenumbraOpacity = 0.14;
3
- const shadowAmbientShadowOpacity = 0.12;
4
- function createShadow(...px) {
5
- return [`${px[0]}px ${px[1]}px ${px[2]}px ${px[3]}px rgba(0,0,0,${shadowKeyUmbraOpacity})`, `${px[4]}px ${px[5]}px ${px[6]}px ${px[7]}px rgba(0,0,0,${shadowKeyPenumbraOpacity})`, `${px[8]}px ${px[9]}px ${px[10]}px ${px[11]}px rgba(0,0,0,${shadowAmbientShadowOpacity})`].join(',');
6
- }
1
+ // Share of the shadow color each of the three layers is drawn with, in percent.
2
+ const shadowKeyUmbraPercent = 20;
3
+ const shadowKeyPenumbraPercent = 14;
4
+ const shadowAmbientShadowPercent = 12;
5
+
6
+ /**
7
+ * The elevations the admin offers. Offset, blur and spread are not configurable — a shop picks
8
+ * one of these presets so the surfaces stay visually consistent, and only the color is free.
9
+ */
10
+
11
+ /**
12
+ * Elevation from the scale below used for each shadow size the admin offers. Keeping the mapping
13
+ * next to the scale means a size never introduces geometry of its own.
14
+ */
15
+ const SHADOW_SIZE_ELEVATIONS = {
16
+ none: 0,
17
+ low: 2,
18
+ medium: 4,
19
+ strong: 8
20
+ };
7
21
 
22
+ // Offset-x, offset-y, blur and spread of the three layers that make up one elevation, starting at
23
+ // elevation 1 (elevation 0 draws no shadow at all).
8
24
  // Values from https://github.com/material-components/material-components-web/blob/be8747f94574669cb5e7add1a7c54fa41a89cec7/packages/mdc-elevation/_variables.scss
9
- const shadows = ['none', createShadow(0, 2, 1, -1, 0, 1, 1, 0, 0, 1, 3, 0), createShadow(0, 3, 1, -2, 0, 2, 2, 0, 0, 1, 5, 0), createShadow(0, 3, 3, -2, 0, 3, 4, 0, 0, 1, 8, 0), createShadow(0, 2, 4, -1, 0, 4, 5, 0, 0, 1, 10, 0), createShadow(0, 3, 5, -1, 0, 5, 8, 0, 0, 1, 14, 0), createShadow(0, 3, 5, -1, 0, 6, 10, 0, 0, 1, 18, 0), createShadow(0, 4, 5, -2, 0, 7, 10, 1, 0, 2, 16, 1), createShadow(0, 5, 5, -3, 0, 8, 10, 1, 0, 3, 14, 2), createShadow(0, 5, 6, -3, 0, 9, 12, 1, 0, 3, 16, 2), createShadow(0, 6, 6, -3, 0, 10, 14, 1, 0, 4, 18, 3), createShadow(0, 6, 7, -4, 0, 11, 15, 1, 0, 4, 20, 3), createShadow(0, 7, 8, -4, 0, 12, 17, 2, 0, 5, 22, 4), createShadow(0, 7, 8, -4, 0, 13, 19, 2, 0, 5, 24, 4), createShadow(0, 7, 9, -4, 0, 14, 21, 2, 0, 5, 26, 4), createShadow(0, 8, 9, -5, 0, 15, 22, 2, 0, 6, 28, 5), createShadow(0, 8, 10, -5, 0, 16, 24, 2, 0, 6, 30, 5), createShadow(0, 8, 11, -5, 0, 17, 26, 2, 0, 6, 32, 5), createShadow(0, 9, 11, -5, 0, 18, 28, 2, 0, 7, 34, 6), createShadow(0, 9, 12, -6, 0, 19, 29, 2, 0, 7, 36, 6), createShadow(0, 10, 13, -6, 0, 20, 31, 3, 0, 8, 38, 7), createShadow(0, 10, 13, -6, 0, 21, 33, 3, 0, 8, 40, 7), createShadow(0, 10, 14, -6, 0, 22, 35, 3, 0, 8, 42, 7), createShadow(0, 11, 14, -7, 0, 23, 36, 3, 0, 9, 44, 8), createShadow(0, 11, 15, -7, 0, 24, 38, 3, 0, 9, 46, 8)];
25
+ const elevationGeometries = [[0, 2, 1, -1, 0, 1, 1, 0, 0, 1, 3, 0], [0, 3, 1, -2, 0, 2, 2, 0, 0, 1, 5, 0], [0, 3, 3, -2, 0, 3, 4, 0, 0, 1, 8, 0], [0, 2, 4, -1, 0, 4, 5, 0, 0, 1, 10, 0], [0, 3, 5, -1, 0, 5, 8, 0, 0, 1, 14, 0], [0, 3, 5, -1, 0, 6, 10, 0, 0, 1, 18, 0], [0, 4, 5, -2, 0, 7, 10, 1, 0, 2, 16, 1], [0, 5, 5, -3, 0, 8, 10, 1, 0, 3, 14, 2], [0, 5, 6, -3, 0, 9, 12, 1, 0, 3, 16, 2], [0, 6, 6, -3, 0, 10, 14, 1, 0, 4, 18, 3], [0, 6, 7, -4, 0, 11, 15, 1, 0, 4, 20, 3], [0, 7, 8, -4, 0, 12, 17, 2, 0, 5, 22, 4], [0, 7, 8, -4, 0, 13, 19, 2, 0, 5, 24, 4], [0, 7, 9, -4, 0, 14, 21, 2, 0, 5, 26, 4], [0, 8, 9, -5, 0, 15, 22, 2, 0, 6, 28, 5], [0, 8, 10, -5, 0, 16, 24, 2, 0, 6, 30, 5], [0, 8, 11, -5, 0, 17, 26, 2, 0, 6, 32, 5], [0, 9, 11, -5, 0, 18, 28, 2, 0, 7, 34, 6], [0, 9, 12, -6, 0, 19, 29, 2, 0, 7, 36, 6], [0, 10, 13, -6, 0, 20, 31, 3, 0, 8, 38, 7], [0, 10, 13, -6, 0, 21, 33, 3, 0, 8, 40, 7], [0, 10, 14, -6, 0, 22, 35, 3, 0, 8, 42, 7], [0, 11, 14, -7, 0, 23, 36, 3, 0, 9, 44, 8], [0, 11, 15, -7, 0, 24, 38, 3, 0, 9, 46, 8]];
26
+
27
+ /**
28
+ * Builds one elevation from its geometry.
29
+ * @param px The twelve lengths of the elevation's three layers.
30
+ * @param renderColor Renders the color of a layer from the share of the shadow color it is drawn
31
+ * with, in percent.
32
+ * @returns A box-shadow value.
33
+ */
34
+ function createShadow(px, renderColor) {
35
+ const layer = (offset, percent) => `${px[offset]}px ${px[offset + 1]}px ${px[offset + 2]}px ${px[offset + 3]}px ` + `${renderColor(percent)}`;
36
+ return [layer(0, shadowKeyUmbraPercent), layer(4, shadowKeyPenumbraPercent), layer(8, shadowAmbientShadowPercent)].join(',');
37
+ }
38
+ export const SHADOW_COLOR_VAR = '--sg-palette-shadow';
39
+ const shadows = ['none'].concat(elevationGeometries.map(geometry => createShadow(geometry, percent => `rgb(from var(${SHADOW_COLOR_VAR}) r g b / ${percent / 100})`)));
40
+ /**
41
+ * The finished shadow for each size the admin offers, for a single `theme.shadowSizes[size]` lookup.
42
+ */
43
+ export const shadowSizes = Object.fromEntries(Object.entries(SHADOW_SIZE_ELEVATIONS).map(([size, elevation]) => [size, shadows[elevation]]));
10
44
  export default shadows;
@@ -10,7 +10,7 @@ import type { ApplyStyles } from './applyStyles';
10
10
  import type { GetColorSchemeSelector, ActiveColorSchemeSwitcher } from './helpers';
11
11
  import type { CreateCssVarsForColorSchemeThemesReturnValue } from './createCssVarsForColorSchemeThemes';
12
12
  import type { Shape, ShapeOptions } from './createShape';
13
- import type { Shadows } from './shadows';
13
+ import type { Shadows, ShadowSize } from './shadows';
14
14
  export type { Breakpoint } from './createBreakpoints';
15
15
  export type { PaletteColorsWithMain } from './createPalette';
16
16
  export declare const COLOR_SCHEME_NAMES: readonly ["light", "dark"];
@@ -94,6 +94,10 @@ export interface BaseTheme {
94
94
  * Pre-defined shadow styles for different elevation levels, following Material Design guidelines.
95
95
  */
96
96
  shadows: Shadows;
97
+ /**
98
+ * The finished box-shadow size (`none` | `low` | `medium` | `strong`)
99
+ */
100
+ shadowSizes: Record<ShadowSize, string>;
97
101
  /**
98
102
  * Adds an alpha value to a color, returning a new color string with the applied alpha.
99
103
  * @param color The color to modify.
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../styles/theme/createTheme/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC/D,OAAO,KAAK,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACxE,OAAO,KAAK,EAAE,iBAAiB,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACvF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,KAAK,EAAE,sBAAsB,EAAE,yBAAyB,EAAE,MAAM,WAAW,CAAC;AACnF,OAAO,KAAK,EAAE,4CAA4C,EAAE,MAAM,qCAAqC,CAAC;AACxG,OAAO,KAAK,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AACzD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,YAAY,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACtD,YAAY,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAE7D,eAAO,MAAM,kBAAkB,4BAA6B,CAAC;AAE7D,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,kBAAkB,CAAC,CAAC,MAAM,CAAC,CAA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AG,IAAI,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG;IAAE,UAAU,EAAE,UAAU,CAAA;CAAE,CAAC;AAE1F;;;GAGG;AACH,MAAM,MAAM,iBAAiB,GAAG,MAAM,CAAC,eAAe,EAAE,gBAAgB,CAAC,CAAA;AAEzE,MAAM,MAAM,aAAa,GAAG,IAAI,CAAC,KAAK,EAAE,cAAc,CAAC,GAAG;IACxD;;OAEG;IACH,YAAY,EAAE,iBAAiB,CAAC;CACjC,GAAG,IAAI,CAAC,4CAA4C,EAAE,qBAAqB,CAAC,GAAG;IAC9E;;OAEG;IACH,sBAAsB,EAAE,sBAAsB,CAAC;IAC/C;;OAEG;IACH,oBAAoB,EAAE,yBAAyB,CAAC;CACjD,CAAC"}
@@ -1,5 +1,6 @@
1
1
  export { default as ThemeProvider } from './providers/ThemeProvider';
2
2
  export { createTheme } from './createTheme';
3
+ export { type ShadowSize } from './createTheme/shadows';
3
4
  export type { Theme, Breakpoint, PaletteColorsWithMain, ColorSchemeName, } from './createTheme';
4
5
  export { useActiveBreakpoint, useMediaQuery, useResponsiveValue, useTheme, useColorScheme, } from './hooks';
5
6
  export { withTheme, type WithThemeProps } from './hocs';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../styles/theme/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,2BAA2B,CAAC;AACrE,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,YAAY,EACV,KAAK,EAAE,UAAU,EAAE,qBAAqB,EAAE,eAAe,GAC1D,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,mBAAmB,EACnB,aAAa,EACb,kBAAkB,EAClB,QAAQ,EACR,cAAc,GACf,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,SAAS,EAAE,KAAK,cAAc,EAAE,MAAM,QAAQ,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../styles/theme/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,2BAA2B,CAAC;AACrE,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACxD,YAAY,EACV,KAAK,EAAE,UAAU,EAAE,qBAAqB,EAAE,eAAe,GAC1D,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,mBAAmB,EACnB,aAAa,EACb,kBAAkB,EAClB,QAAQ,EACR,cAAc,GACf,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,SAAS,EAAE,KAAK,cAAc,EAAE,MAAM,QAAQ,CAAC"}
@@ -1 +0,0 @@
1
- export { default as productImageFormats } from '@shopgate/pwa-common-commerce/product/collections/ProductImageFormats';
@@ -1,3 +0,0 @@
1
- export const ALWAYS: "always";
2
- export const NEVER: "never";
3
- //# sourceMappingURL=constants.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../product/components/EffectivityDates/constants.js"],"names":[],"mappings":"AAAA,qBAAsB,QAAQ,CAAC;AAC/B,oBAAqB,OAAO,CAAC"}
@@ -1,6 +0,0 @@
1
- export function buildShowScheduledParams(): Object | {
2
- showScheduled: string;
3
- };
4
- export function showScheduledLabel(startDate: Date, settings?: Object): boolean;
5
- export function showExpiringLabel(endDate: Date, settings?: Object): boolean;
6
- //# sourceMappingURL=helpers.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../../product/components/EffectivityDates/helpers.js"],"names":[],"mappings":"AAUO,4CAFM,MAAM,GAAC;IAAC,aAAa,EAAE,MAAM,CAAA;CAAC,CAuB1C;AAQM,8CAJI,IAAI,aACJ,MAAM,GACJ,OAAO,CA6BnB;AAQM,2CAJI,IAAI,aACJ,MAAM,GACJ,OAAO,CAyBnB"}
@@ -1,2 +0,0 @@
1
- export function buildMediaImageUrl(url: string, params?: Object): string;
2
- //# sourceMappingURL=helpers.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../../product/components/Media/helpers.js"],"names":[],"mappings":"AAsBO,wCAJI,MAAM,WACN,MAAM,GACJ,MAAM,CAiBlB"}
@@ -1,12 +0,0 @@
1
- import { connect } from 'react-redux';
2
- import { getProductImagePlaceholder } from "../../../core";
3
-
4
- /**
5
- * Maps the current application state to the component props.
6
- * @param {Object} state The current application state.
7
- * @return {Object} The populated component props.
8
- */
9
- const mapStateToProps = state => ({
10
- placeholderSrc: getProductImagePlaceholder(state)
11
- });
12
- export default connect(mapStateToProps);
@@ -1,13 +0,0 @@
1
- export * from "@shopgate/pwa-common-commerce/product/helpers";
2
- export * from "../components/Media/helpers";
3
- export * from "./redirects";
4
- export function buildFetchCategoryProductsParams(): undefined | {
5
- params: Object;
6
- };
7
- export function buildFetchSearchResultsParams(): undefined | {
8
- params: Object;
9
- };
10
- export function setDefaultProductFetchParams(): void;
11
- export function getProductImageSettings(): Object;
12
- export function loadProductImage(src: string, resolution?: Object): Promise<any>;
13
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../product/helpers/index.js"],"names":[],"mappings":";;;AAcO,oDAFM,SAAS,GAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAC,CAkBtC;AAhBM,iDAFM,SAAS,GAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAC,CAkBtC;AAWM,qDAON;AAMM,2CAFK,MAAM,CAoCjB;AAQM,sCAJI,MAAM,eACN,MAAM,gBAWhB"}
@@ -1,2 +0,0 @@
1
- export function enableRedirectHandler(): void;
2
- //# sourceMappingURL=redirects.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"redirects.d.ts","sourceRoot":"","sources":["../../../product/helpers/redirects.js"],"names":[],"mappings":"AAUO,yCAFM,IAAI,CA4BhB"}
@@ -1,8 +0,0 @@
1
- /**
2
- * Reads the setting for product properties whitelisting/blacklisting
3
- * and filters the properties accordingly.
4
- * @param {Array} properties Array of properties with label and value attributes.
5
- * @return {Array} Filtered properties.
6
- */
7
- export function filterProperties(properties: any[]): any[];
8
- //# sourceMappingURL=filterProperties.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"filterProperties.d.ts","sourceRoot":"","sources":["../../../../product/selectors/helpers/filterProperties.js"],"names":[],"mappings":"AAMA;;;;;GAKG;AACH,2DAyBC"}
@@ -1,3 +0,0 @@
1
- export { filterProperties } from "./filterProperties";
2
- export { wrapMemoizedSelector } from "./wrapMemoizedSelector";
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../product/selectors/helpers/index.js"],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- export function wrapMemoizedSelector(selector: Function): Function;
2
- //# sourceMappingURL=wrapMemoizedSelector.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"wrapMemoizedSelector.d.ts","sourceRoot":"","sources":["../../../../product/selectors/helpers/wrapMemoizedSelector.js"],"names":[],"mappings":"AAKO,mEAMN"}