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

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 (149) hide show
  1. package/account/components/Profile/ProfileAddressBook.d.ts.map +1 -1
  2. package/account/components/Profile/ProfileAddressBook.js +13 -22
  3. package/account/components/Profile/ProfileAddressCard.d.ts.map +1 -1
  4. package/account/components/Profile/ProfileAddressCard.js +8 -18
  5. package/account/components/Profile/ProfileForm.d.ts.map +1 -1
  6. package/account/components/Profile/ProfileForm.js +15 -42
  7. package/account/components/ProfileContact/ProfileContact.js +13 -21
  8. package/admin-preview/components/FrontendSettingsPreviewBridge/FrontendSettingsPreviewBridge.d.ts.map +1 -1
  9. package/admin-preview/components/FrontendSettingsPreviewBridge/FrontendSettingsPreviewBridge.js +40 -6
  10. package/admin-preview/components/FrontendSettingsPreviewBridge/types.d.ts +7 -0
  11. package/admin-preview/components/FrontendSettingsPreviewBridge/types.d.ts.map +1 -1
  12. package/admin-preview/initialization/_internal/initialFrontendSettings.d.ts +32 -0
  13. package/admin-preview/initialization/_internal/initialFrontendSettings.d.ts.map +1 -0
  14. package/admin-preview/initialization/_internal/initialFrontendSettings.js +43 -0
  15. package/admin-preview/initialization/awaitInitialFrontendSettings.d.ts +22 -0
  16. package/admin-preview/initialization/awaitInitialFrontendSettings.d.ts.map +1 -0
  17. package/admin-preview/initialization/awaitInitialFrontendSettings.js +84 -0
  18. package/back-in-stock/components/BackInStockButton/index.js +5 -5
  19. package/cart/components/CartItem/CartItemProductLayout.js +1 -0
  20. package/cart/components/CartItem/CartItemProductLayoutWideRemoveItem.js +7 -14
  21. package/cart/components/CartItems/CartItemCardReservationLabelChangeStore.js +6 -24
  22. package/cart/components/CartSummaryWide/CartSummaryWide.js +2 -2
  23. package/cart/components/CartSummaryWide/CartSummaryWideCheckoutButton.js +9 -23
  24. package/cart/components/PaymentBar/PaymentBarCheckoutButton.js +8 -30
  25. package/cart/components/PaymentBar/testUtils/mockFactories.js +4 -11
  26. package/category/components/CategoryImage/index.js +13 -2
  27. package/checkout/components/AddressBook/AddressList.js +14 -23
  28. package/checkout/components/Checkout/CheckoutActions.js +4 -3
  29. package/checkout/components/Checkout/CheckoutAddress.js +8 -0
  30. package/checkout/components/Checkout/CheckoutSection.js +6 -2
  31. package/checkout/components/CheckoutConfirmation/CheckoutConfirmation.js +6 -7
  32. package/checkout/components/ResponsiveBackButton/ResponsiveBackButton.js +7 -17
  33. package/components/Card/Card.js +1 -1
  34. package/components/ChipLayout/index.js +2 -4
  35. package/components/NavigationHandler/connector.js +1 -1
  36. package/components/NavigationHandler/spec.js +10 -1
  37. package/components/Paper/Paper.d.ts +1 -2
  38. package/components/Paper/Paper.d.ts.map +1 -1
  39. package/components/Tabs/components/Tab.d.ts.map +1 -1
  40. package/components/Tabs/components/Tab.js +14 -16
  41. package/components/Typography/Typography.d.ts +1 -1
  42. package/components/v2/Button/Button.d.ts +24 -13
  43. package/components/v2/Button/Button.d.ts.map +1 -1
  44. package/components/v2/Button/Button.js +89 -37
  45. package/components/v2/ButtonBase/ButtonBase.d.ts +50 -10
  46. package/components/v2/ButtonBase/ButtonBase.d.ts.map +1 -1
  47. package/components/v2/ButtonBase/ButtonBase.js +153 -16
  48. package/components/v2/ButtonBase/hooks.d.ts +0 -1
  49. package/components/v2/ButtonBase/hooks.d.ts.map +1 -1
  50. package/components/v2/ButtonBase/hooks.js +36 -12
  51. package/components/v2/ButtonGroup/ButtonGroup.d.ts +11 -5
  52. package/components/v2/ButtonGroup/ButtonGroup.d.ts.map +1 -1
  53. package/components/v2/ButtonGroup/ButtonGroup.js +30 -18
  54. package/components/v2/CircularProgress/CircularProgress.d.ts.map +1 -1
  55. package/components/v2/CircularProgress/CircularProgress.js +10 -5
  56. package/core/hooks/useNavigation.d.ts +10 -2
  57. package/core/hooks/useNavigation.d.ts.map +1 -1
  58. package/core/hooks/useNavigation.js +1 -2
  59. package/core/initialization/index.d.ts.map +1 -1
  60. package/core/initialization/index.js +24 -5
  61. package/core/router/conductor.d.ts +9 -0
  62. package/core/router/helpers.d.ts +28 -15
  63. package/core/router/helpers.d.ts.map +1 -1
  64. package/core/router/helpers.js +8 -8
  65. package/development/components/DevelopmentSettings/DevelopmentSettings.js +3 -3
  66. package/favorites/components/FavoriteButtonWide/FavoriteButtonWide.js +7 -17
  67. package/favorites/components/List/List.d.ts.map +1 -1
  68. package/favorites/components/List/List.js +0 -1
  69. package/favorites/components/List/ListContent.js +4 -5
  70. package/favorites/components/Lists/Lists.js +4 -5
  71. package/filter/components/FilterPageContent/components/ApplyButton/index.js +8 -10
  72. package/filter/components/FilterPageContent/components/ResetButton/index.js +8 -6
  73. package/locations/components/ChangeLocationButton/ChangeLocationButton.js +10 -14
  74. package/locations/components/FulfillmentSlotSwitcher/FulfillmentSlotDialog.js +4 -8
  75. package/locations/components/FulfillmentSlotSwitcher/FulfillmentSlotSwitcher.js +1 -1
  76. package/locations/components/FulfillmentSlotSwitcher/FulfillmentSlotSwitcherBar.js +8 -13
  77. package/locations/components/FulfillmentSlotSwitcher/FulfillmentSlotSwitcherDefault.js +10 -10
  78. package/locations/components/GlobalLocationSwitcher/GlobalLocationSwitcherBar.js +8 -14
  79. package/locations/components/GlobalLocationSwitcher/GlobalLocationSwitcherDefault.js +9 -10
  80. package/locations/components/ReserveForm/ReserveForm.js +6 -7
  81. package/locations/components/StoreDetails/components/GetDirectionsButton.js +2 -4
  82. package/locations/components/StoreDetails/components/StoreDetails.js +5 -10
  83. package/locations/components/StoreDetails/components/StoresNearbyListItem.js +13 -21
  84. package/locations/components/StoreFinder/StoreFinderSelectLocationButton.js +5 -11
  85. package/locations/components/StoreFinder/StoreFinderStoreInfoButton.js +5 -11
  86. package/locations/components/StoreList/StoreSelectLocationButton.js +5 -11
  87. package/login/components/ForgotPassword/ForgotPassword.js +11 -23
  88. package/orders/components/OrderDetails/OrderDetailsAuthenticate.js +5 -7
  89. package/package.json +7 -7
  90. package/page/components/NotFound.d.ts.map +1 -1
  91. package/page/components/NotFound.js +7 -6
  92. package/page/components/ResponsiveWidgetImage/ResponsiveWidgetImage.d.ts +1 -1
  93. package/page/components/ResponsiveWidgetImage/ResponsiveWidgetImage.js +2 -2
  94. package/page/components/WidgetVideo/WidgetVideo.d.ts +1 -1
  95. package/page/components/WidgetVideo/WidgetVideo.d.ts.map +1 -1
  96. package/page/helpers/index.d.ts +5 -2
  97. package/page/helpers/index.d.ts.map +1 -1
  98. package/page/helpers/index.js +8 -5
  99. package/page/widgets/Button/Button.js +2 -3
  100. package/page/widgets/NestedCategoryFilter/NestedCategoryFilter.js +8 -8
  101. package/page/widgets/ProductList/ProductList.js +18 -14
  102. package/page/widgets/Video/hooks.d.ts +2 -2
  103. package/product/components/ProductGrid/components/Item/components/ItemImage/index.js +1 -11
  104. package/product/components/ProductGrid/components/Item/index.js +3 -2
  105. package/product/components/ProductImage/ProductImage.d.ts.map +1 -1
  106. package/product/components/ProductImage/ProductImage.js +7 -2
  107. package/product/components/ProductImage/ProductImagePlaceholder.js +3 -3
  108. package/product/components/UnitQuantityPicker/UnitQuantityPicker.d.ts.map +1 -1
  109. package/product/components/UnitQuantityPicker/UnitQuantityPicker.js +14 -33
  110. package/push-opt-in/components/PushOptInModal/index.js +4 -4
  111. package/registration/components/Registration/RegistrationFormActions.js +4 -4
  112. package/reviews/components/Reviews/components/AllReviewsLink/index.js +6 -6
  113. package/reviews/components/Reviews/components/Header/components/WriteReviewLink/index.js +4 -3
  114. package/reviews/components/Reviews/components/Header/components/WriteReviewLink/spec.js +28 -22
  115. package/reviews/components/Reviews/spec.js +5 -6
  116. package/settings/reducers/appSettings.d.ts.map +1 -1
  117. package/settings/reducers/appSettings.js +9 -1
  118. package/settings/selectors/appSettings.d.ts +16 -0
  119. package/settings/selectors/appSettings.d.ts.map +1 -1
  120. package/settings/selectors/appSettings.js +11 -1
  121. package/settings/types/appSettings.d.ts +23 -2
  122. package/settings/types/appSettings.d.ts.map +1 -1
  123. package/styles/helpers/index.d.ts +1 -0
  124. package/styles/helpers/index.js +1 -0
  125. package/styles/helpers/loadFontCss.d.ts +22 -0
  126. package/styles/helpers/loadFontCss.d.ts.map +1 -0
  127. package/styles/helpers/loadFontCss.js +138 -0
  128. package/styles/helpers/loadThemeCss.d.ts.map +1 -1
  129. package/styles/helpers/loadThemeCss.js +11 -0
  130. package/styles/theme/createTheme/createComponents.types.d.ts +25 -0
  131. package/styles/theme/createTheme/createComponents.types.d.ts.map +1 -1
  132. package/styles/theme/createTheme/createComponents.types.js +25 -0
  133. package/styles/theme/createTheme/createShape.d.ts +2 -3
  134. package/styles/theme/createTheme/createShape.d.ts.map +1 -1
  135. package/styles/theme/createTheme/createShape.js +1 -2
  136. package/styles/theme/createTheme/createThemeFromColorScheme.d.ts +3 -1
  137. package/styles/theme/createTheme/createThemeFromColorScheme.d.ts.map +1 -1
  138. package/styles/theme/createTheme/createThemeFromColorScheme.js +4 -2
  139. package/styles/theme/createTheme/createTypography.d.ts +2 -1
  140. package/styles/theme/createTheme/createTypography.js +58 -18
  141. package/styles/theme/createTheme/index.js +1 -1
  142. package/styles/theme/index.d.ts +1 -0
  143. package/styles/theme/index.d.ts.map +1 -1
  144. package/tracking/components/CookieConsentModal/index.js +3 -4
  145. package/tracking/components/PrivacySettings/index.js +3 -3
  146. package/cart/components/PaymentBar/PaymentBarReserveButton.connector.js +0 -6
  147. package/cart/components/PaymentBar/PaymentBarReserveButton.js +0 -71
  148. package/locations/components/StoreFinder/StoreFinderGetDirectionsButton.connector.js +0 -16
  149. package/locations/components/StoreFinder/StoreFinderGetDirectionsButton.js +0 -52
@@ -6,7 +6,11 @@ import fetchClientInformation from '@shopgate/pwa-common/actions/client/fetchCli
6
6
  import { appConfig } from '@shopgate/engage';
7
7
  import { appInitialization, configuration } from '@shopgate/engage/core/collections';
8
8
  import { CONFIGURATION_COLLECTION_KEY_BASE_URL } from '@shopgate/engage/core/constants';
9
- import { loadCustomStyles, loadThemeCss } from '@shopgate/engage/styles';
9
+ import { loadCustomStyles, loadThemeCss, loadFontCss } from '@shopgate/engage/styles';
10
+ import { getTypographyFontCssUrls } from '@shopgate/engage/settings/selectors/appSettings';
11
+ // Imported via its module path rather than the admin-preview helpers barrel, which ThemeProvider
12
+ // and loadThemeCss already import - this module reaches into the settings action creators.
13
+ import { awaitInitialFrontendSettings } from '@shopgate/engage/admin-preview/initialization/awaitInitialFrontendSettings';
10
14
  import { fetchSettings } from "./fetchSettings";
11
15
 
12
16
  /**
@@ -61,15 +65,30 @@ export const initialize = async (locales, reducers, subscribers) => {
61
65
  configuration.set(CONFIGURATION_COLLECTION_KEY_BASE_URL, getAppBaseUrl());
62
66
  store.dispatch(appWillInit(`${window.location.pathname}${window.location.search}`));
63
67
  try {
64
- // The order of the style loaders does not affect the cascade: loadThemeCss pins its link to
65
- // the theme css insertion point in the html template, while loadCustomStyles appends its link
66
- // to the end of the head.
67
- const promises = [fetchSettings(store), loadCustomStyles(), loadThemeCss()];
68
+ // The order of the style loaders does not affect the cascade: loadThemeCss and loadFontCss pin
69
+ // their links to their insertion points in the html template, while loadCustomStyles appends
70
+ // its link to the end of the head.
71
+ //
72
+ // The font css urls come from the app settings, so that loader is chained onto fetchSettings
73
+ // rather than started alongside it. Chaining keeps the other two running in parallel with the
74
+ // settings request instead of serializing everything behind it.
75
+ const promises = [fetchSettings(store).then(() => loadFontCss(getTypographyFontCssUrls(store.getState()))), loadCustomStyles(), loadThemeCss()];
68
76
  await Promise.all(promises);
69
77
  } catch (e) {
70
78
  // Nothing to see here.
71
79
  }
72
80
 
81
+ // Resolves at once outside the admin preview. Inside it, this holds app start until the admin
82
+ // sent its first settings payload, so the preview renders styled instead of painting the theme
83
+ // defaults first. Runs after fetchSettings, since the reducer merges and the preview has to be
84
+ // the later write.
85
+ await awaitInitialFrontendSettings(store);
86
+
87
+ // That payload can replace the configured font files, which were loaded above from whatever the
88
+ // jsonp settings carried, so they are synced again before anything renders. Outside the preview
89
+ // the urls are unchanged, and loadFontCss leaves the existing tags alone and resolves at once.
90
+ await loadFontCss(getTypographyFontCssUrls(store.getState()));
91
+
73
92
  // Execute all registered handlers from the AppInitialization collection
74
93
  await appInitialization.initialize({
75
94
  dispatch: store.dispatch,
@@ -0,0 +1,9 @@
1
+ import { Router } from '@virtuous/conductor';
2
+
3
+ /**
4
+ * `@virtuous/conductor` ships types for the `Router` class but not for the singleton instance it
5
+ * exports at runtime. Declared here so that TypeScript consumers can use it.
6
+ */
7
+ declare module '@virtuous/conductor' {
8
+ export const router: Router;
9
+ }
@@ -1,30 +1,43 @@
1
+ export interface NavigationState {
2
+ target?: string;
3
+ [key: string]: unknown;
4
+ }
5
+ export interface NavigationParams {
6
+ pathname: string;
7
+ state?: NavigationState;
8
+ silent?: boolean;
9
+ }
10
+ export interface PopParams {
11
+ steps?: number;
12
+ state?: NavigationState;
13
+ }
14
+ export declare const NAVIGATION_PUSH = "navigation.push";
15
+ export declare const NAVIGATION_POP = "navigation.pop";
16
+ export declare const NAVIGATION_REPLACE = "navigation.replace";
17
+ export declare const NAVIGATION_RESET = "navigation.reset";
1
18
  /**
2
19
  * Performs the PUSH navigation action.
3
- * @param {Object} params The history params.
20
+ * @param params The history params.
4
21
  */
5
- export function push(params: Object): void;
22
+ export declare function push(params: NavigationParams): void;
6
23
  /**
7
24
  * Performs the POP navigation action.
25
+ * @param params The history params. Pass `steps` to pop more than one route.
8
26
  */
9
- export function pop(): void;
27
+ export declare function pop(params?: PopParams): void;
10
28
  /**
11
29
  * Performs the REPLACE navigation action.
12
- * @param {Object} params The history params.
30
+ * @param params The history params.
13
31
  */
14
- export function replace(params: Object): void;
32
+ export declare function replace(params: NavigationParams): void;
15
33
  /**
16
34
  * Performs the RESET navigation action.
17
- * @param {Object} params The history params.
18
35
  */
19
- export function reset(): void;
36
+ export declare function reset(): void;
20
37
  /**
21
- * Performs the UPDATE navigation action.
22
- * @param {Object} state The meta state to add to a existing route.
23
- * @param {string} [routeId] The ID of the route to update.
38
+ * Adds meta state to an existing route.
39
+ * @param state The meta state to merge into the route.
40
+ * @param routeId The ID of the route to update. Defaults to the current route.
24
41
  */
25
- export function update(state: Object, routeId?: string): void;
26
- export const NAVIGATION_PUSH: "navigation.push";
27
- export const NAVIGATION_POP: "navigation.pop";
28
- export const NAVIGATION_REPLACE: "navigation.replace";
29
- export const NAVIGATION_RESET: "navigation.reset";
42
+ export declare function update(state: NavigationState, routeId?: string): void;
30
43
  //# sourceMappingURL=helpers.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../core/router/helpers.js"],"names":[],"mappings":"AAQA;;;GAGG;AACH,6BAFW,MAAM,QAIhB;AAED;;GAEG;AACH,4BAEC;AAED;;;GAGG;AACH,gCAFW,MAAM,QAIhB;AAED;;;GAGG;AACH,8BAEC;AAED;;;;GAIG;AACH,8BAHW,MAAM,YACN,MAAM,QAIhB;AA3CD,8BAA+B,iBAAiB,CAAC;AACjD,6BAA8B,gBAAgB,CAAC;AAC/C,iCAAkC,oBAAoB,CAAC;AACvD,+BAAgC,kBAAkB,CAAC"}
1
+ {"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../core/router/helpers.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,eAAe;IAC9B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,eAAe,CAAC;IACxB,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,MAAM,WAAW,SAAS;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,eAAe,CAAC;CACzB;AAED,eAAO,MAAM,eAAe,oBAAoB,CAAC;AACjD,eAAO,MAAM,cAAc,mBAAmB,CAAC;AAC/C,eAAO,MAAM,kBAAkB,uBAAuB,CAAC;AACvD,eAAO,MAAM,gBAAgB,qBAAqB,CAAC;AAEnD;;;GAGG;AACH,wBAAgB,IAAI,CAAC,MAAM,EAAE,gBAAgB,GAAG,IAAI,CAEnD;AAED;;;GAGG;AACH,wBAAgB,GAAG,CAAC,MAAM,CAAC,EAAE,SAAS,GAAG,IAAI,CAE5C;AAED;;;GAGG;AACH,wBAAgB,OAAO,CAAC,MAAM,EAAE,gBAAgB,GAAG,IAAI,CAEtD;AAED;;GAEG;AACH,wBAAgB,KAAK,IAAI,IAAI,CAE5B;AAED;;;;GAIG;AACH,wBAAgB,MAAM,CACpB,KAAK,EAAE,eAAe,EACtB,OAAO,GAAE,MAAoC,GAC5C,IAAI,CAEN"}
@@ -7,7 +7,7 @@ export const NAVIGATION_RESET = 'navigation.reset';
7
7
 
8
8
  /**
9
9
  * Performs the PUSH navigation action.
10
- * @param {Object} params The history params.
10
+ * @param params The history params.
11
11
  */
12
12
  export function push(params) {
13
13
  UIEvents.emit(NAVIGATION_PUSH, params);
@@ -15,14 +15,15 @@ export function push(params) {
15
15
 
16
16
  /**
17
17
  * Performs the POP navigation action.
18
+ * @param params The history params. Pass `steps` to pop more than one route.
18
19
  */
19
- export function pop() {
20
- UIEvents.emit(NAVIGATION_POP);
20
+ export function pop(params) {
21
+ UIEvents.emit(NAVIGATION_POP, params);
21
22
  }
22
23
 
23
24
  /**
24
25
  * Performs the REPLACE navigation action.
25
- * @param {Object} params The history params.
26
+ * @param params The history params.
26
27
  */
27
28
  export function replace(params) {
28
29
  UIEvents.emit(NAVIGATION_REPLACE, params);
@@ -30,16 +31,15 @@ export function replace(params) {
30
31
 
31
32
  /**
32
33
  * Performs the RESET navigation action.
33
- * @param {Object} params The history params.
34
34
  */
35
35
  export function reset() {
36
36
  UIEvents.emit(NAVIGATION_RESET);
37
37
  }
38
38
 
39
39
  /**
40
- * Performs the UPDATE navigation action.
41
- * @param {Object} state The meta state to add to a existing route.
42
- * @param {string} [routeId] The ID of the route to update.
40
+ * Adds meta state to an existing route.
41
+ * @param state The meta state to merge into the route.
42
+ * @param routeId The ID of the route to update. Defaults to the current route.
43
43
  */
44
44
  export function update(state, routeId = router.getCurrentRoute().id) {
45
45
  router.update(routeId, state);
@@ -1,7 +1,8 @@
1
1
  import React from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import { useSelector, useDispatch } from 'react-redux';
4
- import { SheetDrawer, RippleButton } from '@shopgate/engage/components';
4
+ import { SheetDrawer } from '@shopgate/engage/components';
5
+ import { Button } from '@shopgate/engage/components/v2';
5
6
  import { makeStyles } from '@shopgate/engage/styles';
6
7
  import { getEnabledCMSVersion } from '@shopgate/engage/settings/selectors/merchantSettings';
7
8
  import { getEnableCms2ForAllShoppers } from '@shopgate/engage/settings/selectors/shopSettings';
@@ -49,9 +50,8 @@ const DevelopmentSettings = ({
49
50
  onClose: onClose,
50
51
  children: /*#__PURE__*/_jsx("div", {
51
52
  className: classes.container,
52
- children: /*#__PURE__*/_jsx(RippleButton, {
53
+ children: /*#__PURE__*/_jsx(Button, {
53
54
  className: classes.button,
54
- type: "simple",
55
55
  onClick: () => {
56
56
  onClose();
57
57
  setTimeout(() => {
@@ -1,7 +1,7 @@
1
1
  import React, { useMemo } from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import { connect } from 'react-redux';
4
- import { RippleButton } from '@shopgate/engage/components';
4
+ import { Button } from '@shopgate/engage/components/v2';
5
5
  import { makeStyles } from '@shopgate/engage/styles';
6
6
  import { i18n } from '@shopgate/engage/core/helpers';
7
7
  import { toggleFavoriteWithListChooser } from '@shopgate/pwa-common-commerce/favorites/actions/toggleFavorites';
@@ -29,20 +29,10 @@ const makeMapStateToProps = () => {
29
29
  const mapDispatchToProps = dispatch => ({
30
30
  toggle: productId => dispatch(toggleFavoriteWithListChooser(productId))
31
31
  });
32
- const useStyles = makeStyles()(theme => ({
32
+ const useStyles = makeStyles()(() => ({
33
33
  root: {
34
- '&&': {
35
- margin: '0 0px 16px 16px',
36
- backgroundColor: theme.palette.background.surface,
37
- border: `1px solid ${theme.palette.primary.main}`,
38
- borderRadius: 5,
39
- fontSize: theme.typography.body2.fontSize,
40
- textTransform: 'none',
41
- padding: 0
42
- }
43
- },
44
- ripple: {
45
- padding: '8px 16px'
34
+ margin: '0 0 16px 16px',
35
+ textTransform: 'none'
46
36
  }
47
37
  }));
48
38
 
@@ -70,10 +60,10 @@ const FavoriteButtonWide = ({
70
60
  if (!appConfig.hasFavorites) {
71
61
  return null;
72
62
  }
73
- return /*#__PURE__*/_jsx(RippleButton, {
63
+ return /*#__PURE__*/_jsx(Button, {
64
+ variant: "outlined",
65
+ color: "primary",
74
66
  className: classes.root,
75
- rippleClassName: classes.ripple,
76
- type: "primary",
77
67
  onClick: () => toggle(productId),
78
68
  children: i18n.text(label)
79
69
  });
@@ -1 +1 @@
1
- {"version":3,"file":"List.d.ts","sourceRoot":"","sources":["../../../../favorites/components/List/List.jsx"],"names":[],"mappings":";;;;;;;;;;;QAwEY,GAAG,CAAC,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBArED,YAAY"}
1
+ {"version":3,"file":"List.d.ts","sourceRoot":"","sources":["../../../../favorites/components/List/List.jsx"],"names":[],"mappings":";;;;;;;;;;;QAuEY,GAAG,CAAC,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBApED,YAAY"}
@@ -15,7 +15,6 @@ const useStyles = makeStyles()(theme => ({
15
15
  margin: '8px 8px 10px'
16
16
  },
17
17
  rootNoFavoritesLists: {
18
- background: theme.palette.background.surface,
19
18
  flexGrow: 1,
20
19
  paddingBottom: theme.spacing(1),
21
20
  paddingLeft: '16px',
@@ -4,7 +4,7 @@ import { connect } from 'react-redux';
4
4
  import { makeStyles } from '@shopgate/engage/styles';
5
5
  import { i18n } from '@shopgate/engage/core/helpers';
6
6
  import { ProductListTypeProvider, ProductProvider } from '@shopgate/engage/product/providers';
7
- import { RippleButton } from '@shopgate/engage/components';
7
+ import { Button } from '@shopgate/engage/components/v2';
8
8
  import { getUseGetFavoriteIdsPipeline } from '@shopgate/engage/favorites';
9
9
  import ListItemWrapper from "./ListItemWrapper";
10
10
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
@@ -19,8 +19,7 @@ const useStyles = makeStyles()({
19
19
  },
20
20
  loadMoreButton: {
21
21
  width: 'calc(100% - 32px)',
22
- margin: '16px 16px 0 16px',
23
- borderRadius: 5
22
+ margin: '16px 16px 0 16px'
24
23
  }
25
24
  });
26
25
 
@@ -86,8 +85,8 @@ const ListContent = ({
86
85
  removeItem: removeItem,
87
86
  index: index
88
87
  }, product.id))]
89
- }), showLoadMoreButton && /*#__PURE__*/_jsx(RippleButton, {
90
- type: "primary",
88
+ }), showLoadMoreButton && /*#__PURE__*/_jsx(Button, {
89
+ color: "secondary",
91
90
  className: classes.loadMoreButton,
92
91
  onClick: onLoadMore,
93
92
  children: i18n.text('favorites.load_more_button')
@@ -1,7 +1,8 @@
1
1
  import React, { useState, useCallback, useRef } from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import { connect } from 'react-redux';
4
- import { RippleButton, SurroundPortals } from '@shopgate/engage/components';
4
+ import { SurroundPortals } from '@shopgate/engage/components';
5
+ import { Button } from '@shopgate/engage/components/v2';
5
6
  import { hasNewServices, i18n } from '@shopgate/engage/core/helpers';
6
7
  import { getFavoritesLists, isInitialLoading, getHasMultipleFavoritesListsSupport } from '@shopgate/pwa-common-commerce/favorites/selectors';
7
8
  import addFavoritesList from '@shopgate/pwa-common-commerce/favorites/actions/addFavoritesList';
@@ -64,7 +65,6 @@ const useStyles = makeStyles()({
64
65
  addButton: {
65
66
  width: 'calc(100% - 32px)',
66
67
  margin: 16,
67
- borderRadius: 5,
68
68
  [responsiveMediaQuery('>=md', {
69
69
  webOnly: true
70
70
  })]: {
@@ -283,11 +283,10 @@ const FavoriteLists = ({
283
283
  onClose: handleMethodClose
284
284
  }), /*#__PURE__*/_jsx(SurroundPortals, {
285
285
  portalName: FAVORITES_LIST_ADD_BUTTON,
286
- children: hasMultipleFavoritesListsSupport ? /*#__PURE__*/_jsx(RippleButton, {
287
- type: "primary",
286
+ children: hasMultipleFavoritesListsSupport ? /*#__PURE__*/_jsx(Button, {
287
+ color: "secondary",
288
288
  className: classes.addButton,
289
289
  onClick: openAddModal,
290
- disabled: false,
291
290
  children: i18n.text('favorites.add_list')
292
291
  }) : null
293
292
  })]
@@ -1,18 +1,17 @@
1
1
  import React, { memo } from 'react';
2
2
  import PropTypes from 'prop-types';
3
- import { I18n, Button, SurroundPortals } from '@shopgate/engage/components';
3
+ import { I18n, SurroundPortals } from '@shopgate/engage/components';
4
+ import { Button } from '@shopgate/engage/components/v2';
4
5
  import { makeStyles } from '@shopgate/engage/styles';
5
6
  import { PORTAL_FILTER_APPLY_BUTTON } from '@shopgate/engage/filter/constants';
6
7
  import { withWidgetSettings } from '@shopgate/engage/core';
7
8
  import { jsx as _jsx } from "react/jsx-runtime";
8
- const useStyles = makeStyles()({
9
+ const useStyles = makeStyles()(theme => ({
9
10
  wrapper: {
10
- display: 'flex'
11
- },
12
- button: {
13
- padding: '0 !important'
11
+ display: 'flex',
12
+ marginRight: theme.spacing(2)
14
13
  }
15
- });
14
+ }));
16
15
 
17
16
  /**
18
17
  * The filter apply button component.
@@ -44,9 +43,8 @@ const FilterApplyButton = ({
44
43
  children: /*#__PURE__*/_jsx("div", {
45
44
  className: classes.wrapper,
46
45
  children: /*#__PURE__*/_jsx(Button, {
47
- className: classes.button,
48
- flat: true,
49
- type: "primary",
46
+ variant: "link",
47
+ color: "secondary",
50
48
  onClick: onClick,
51
49
  disabled: disabled,
52
50
  testId: "applyFilterButton",
@@ -1,16 +1,18 @@
1
1
  import React, { memo } from 'react';
2
2
  import PropTypes from 'prop-types';
3
- import { I18n, Button, SurroundPortals } from '@shopgate/engage/components';
3
+ import { I18n, SurroundPortals } from '@shopgate/engage/components';
4
+ import { Button } from '@shopgate/engage/components/v2';
4
5
  import { makeStyles } from '@shopgate/engage/styles';
5
6
  import { PORTAL_FILTER_RESET_BUTTON } from '@shopgate/engage/filter/constants';
6
7
  import { jsx as _jsx } from "react/jsx-runtime";
7
- const useStyles = makeStyles()({
8
+ const useStyles = makeStyles()(theme => ({
8
9
  buttonContainer: {
9
- marginTop: 4,
10
+ marginTop: theme.spacing(0.5),
11
+ marginRight: theme.spacing(2),
10
12
  marginBottom: 40,
11
13
  textAlign: 'right'
12
14
  }
13
- });
15
+ }));
14
16
 
15
17
  /**
16
18
  * The filter reset button component.
@@ -35,8 +37,8 @@ const FilterResetButton = ({
35
37
  children: /*#__PURE__*/_jsx("div", {
36
38
  className: classes.buttonContainer,
37
39
  children: /*#__PURE__*/_jsx(Button, {
38
- flat: true,
39
- type: "primary",
40
+ variant: "link",
41
+ color: "secondary",
40
42
  onClick: onClick,
41
43
  disabled: disabled,
42
44
  testId: "clearAllButton",
@@ -1,20 +1,15 @@
1
1
  import React from 'react';
2
2
  import PropTypes from 'prop-types';
3
- import { RippleButton, I18n, SurroundPortals } from '@shopgate/engage/components';
3
+ import { I18n, SurroundPortals } from '@shopgate/engage/components';
4
+ import { Button } from '@shopgate/engage/components/v2';
4
5
  import { makeStyles } from '@shopgate/engage/styles';
5
6
  import { PRODUCT_FULFILLMENT_CHANGE_LOCATION } from "../../constants/Portals";
6
7
  import { jsx as _jsx } from "react/jsx-runtime";
7
8
  const useStyles = makeStyles()(theme => ({
8
9
  button: {
9
- fontSize: `${theme.typography.caption.fontSize} !important`,
10
- letterSpacing: '0.05em',
11
- padding: `${theme.spacing(0.375, 0)} !important`,
12
- ' *': {
13
- padding: '0 !important'
14
- }
15
- },
16
- ripple: {
17
- padding: 0
10
+ fontSize: theme.typography.caption.fontSize,
11
+ padding: 0,
12
+ letterSpacing: '0.05em'
18
13
  }
19
14
  }));
20
15
 
@@ -38,13 +33,14 @@ export const ChangeLocationButtonUnwrapped = ({
38
33
  onClick,
39
34
  disabled
40
35
  },
41
- children: /*#__PURE__*/_jsx(RippleButton, {
36
+ children: /*#__PURE__*/_jsx(Button, {
37
+ variant: "link",
38
+ color: "primary",
39
+ size: "small",
40
+ dense: true,
42
41
  onClick: onClick,
43
42
  className: classes.button,
44
43
  disabled: disabled,
45
- rippleClassName: classes.ripple,
46
- type: "secondary",
47
- flat: true,
48
44
  children: /*#__PURE__*/_jsx(I18n.Text, {
49
45
  string: "locations.change_location"
50
46
  })
@@ -5,7 +5,8 @@ import PropTypes from 'prop-types';
5
5
  import { connect } from 'react-redux';
6
6
  import { makeStyles } from '@shopgate/engage/styles';
7
7
  import groupBy from 'lodash/groupBy';
8
- import { SheetDrawer, Button, Typography } from '@shopgate/engage/components';
8
+ import { SheetDrawer, Typography } from '@shopgate/engage/components';
9
+ import { Button } from '@shopgate/engage/components/v2';
9
10
  import { i18n } from '@shopgate/engage/core/helpers';
10
11
  import { getActiveFulfillmentSlot } from '@shopgate/engage/cart/cart.selectors';
11
12
  import { makeGetFulfillmentSlotsForLocation, getPreferredLocation } from "../../selectors";
@@ -105,11 +106,6 @@ const useStyles = makeStyles()(theme => ({
105
106
  background: theme.palette.background.surface,
106
107
  padding: 16,
107
108
  paddingBottom: 24
108
- },
109
- buttonSchedule: {
110
- '&&': {
111
- width: '100%'
112
- }
113
109
  }
114
110
  }));
115
111
 
@@ -301,8 +297,8 @@ const FulfillmentSlotSheet = ({
301
297
  }, group.name)), /*#__PURE__*/_jsx("div", {
302
298
  className: classes.buttonScheduleContainer,
303
299
  children: /*#__PURE__*/_jsx(Button, {
304
- className: classes.buttonSchedule,
305
- type: "secondary",
300
+ color: "primary",
301
+ fullWidth: true,
306
302
  onClick: handleChange,
307
303
  disabled: !selectedDate || !selectedSlot,
308
304
  children: i18n.text('locations.your_current_timeslot.dialog.schedule')
@@ -14,7 +14,7 @@ const useStyles = makeStyles()(theme => ({
14
14
  borderBottom: 0
15
15
  },
16
16
  ' > div': {
17
- borderRadius: 5,
17
+ borderRadius: theme.shape.borderRadius,
18
18
  margin: -1,
19
19
  background: theme.palette.background.surface,
20
20
  border: `1px solid ${theme.components.border.light}`
@@ -1,6 +1,7 @@
1
1
  import React, { useMemo } from 'react';
2
2
  import PropTypes from 'prop-types';
3
- import { RippleButton, I18n, Typography } from '@shopgate/engage/components';
3
+ import { I18n, Typography } from '@shopgate/engage/components';
4
+ import { Button } from '@shopgate/engage/components/v2';
4
5
  import { i18n } from '@shopgate/engage/core/helpers';
5
6
  import { makeStyles } from '@shopgate/engage/styles';
6
7
  import { getTimeSlotDisplayText } from "./time";
@@ -29,15 +30,8 @@ const useStyles = makeStyles()(theme => ({
29
30
  },
30
31
  button: {
31
32
  marginLeft: 'auto',
32
- letterSpacing: '0.05em',
33
- padding: `${theme.spacing(0.375, 0)} !important`,
34
- ' *': {
35
- fontSize: theme.typography.body2.fontSize,
36
- textTransform: 'initial',
37
- padding: '0 !important',
38
- color: theme.palette.text.primary,
39
- fontWeight: theme.typography.fontWeightMedium
40
- }
33
+ textTransform: 'none',
34
+ padding: theme.spacing(0.375, 0)
41
35
  }
42
36
  }));
43
37
 
@@ -71,11 +65,12 @@ const FulfillmentSlotSwitcherBar = ({
71
65
  component: "span",
72
66
  fontWeight: "medium",
73
67
  children: displayTime
74
- }), editable && /*#__PURE__*/_jsx(RippleButton, {
68
+ }), editable && /*#__PURE__*/_jsx(Button, {
69
+ variant: "text",
70
+ color: "inherit",
71
+ size: "small",
75
72
  onClick: handleChange,
76
- type: "secondary",
77
73
  className: classes.button,
78
- flat: true,
79
74
  children: /*#__PURE__*/_jsx(I18n.Text, {
80
75
  string: "locations.your_current_location.change"
81
76
  })
@@ -1,6 +1,7 @@
1
1
  import React, { useMemo } from 'react';
2
2
  import PropTypes from 'prop-types';
3
- import { RippleButton, I18n, Typography } from '@shopgate/engage/components';
3
+ import { I18n, Typography } from '@shopgate/engage/components';
4
+ import { Button } from '@shopgate/engage/components/v2';
4
5
  import { i18n } from '@shopgate/engage/core/helpers';
5
6
  import { makeStyles } from '@shopgate/engage/styles';
6
7
  import { getTimeSlotDisplayText } from "./time";
@@ -13,12 +14,10 @@ const useStyles = makeStyles()(theme => ({
13
14
  flexShrink: 0
14
15
  },
15
16
  button: {
16
- fontSize: `${theme.typography.caption.fontSize} !important`,
17
- letterSpacing: '0.05em',
18
- padding: `${theme.spacing(0.375, 0)} !important`,
19
- ' *': {
20
- padding: '0 !important'
21
- }
17
+ // Inline affordance that follows the location name, so it carries no button chrome and
18
+ // stays sentence case - matching the switcher bars that render the same action.
19
+ padding: theme.spacing(0.375, 0),
20
+ textTransform: 'none'
22
21
  }
23
22
  }));
24
23
 
@@ -48,12 +47,13 @@ const FulfillmentSlotSwitcherDefault = ({
48
47
  color: "textPrimary",
49
48
  fontWeight: "medium",
50
49
  children: displayTime
51
- }), /*#__PURE__*/_jsx(RippleButton, {
50
+ }), /*#__PURE__*/_jsx(Button, {
51
+ variant: "text",
52
+ color: "primary",
53
+ size: "small",
52
54
  onClick: handleChange,
53
- type: "secondary",
54
55
  className: classes.button,
55
56
  disabled: !editable,
56
- flat: true,
57
57
  children: /*#__PURE__*/_jsx(I18n.Text, {
58
58
  string: "locations.your_current_location.change"
59
59
  })
@@ -1,6 +1,7 @@
1
1
  import React from 'react';
2
2
  import PropTypes from 'prop-types';
3
- import { RippleButton, I18n, Typography } from '@shopgate/engage/components';
3
+ import { I18n, Typography } from '@shopgate/engage/components';
4
+ import { Button } from '@shopgate/engage/components/v2';
4
5
  import { i18n } from '@shopgate/engage/core/helpers';
5
6
  import { makeStyles } from '@shopgate/engage/styles';
6
7
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
@@ -24,16 +25,8 @@ const useStyles = makeStyles()(theme => ({
24
25
  paddingRight: theme.spacing(1)
25
26
  },
26
27
  button: {
27
- marginLeft: 'auto',
28
- letterSpacing: '0.05em',
29
- padding: `${theme.spacing(0.375, 0)} !important`,
30
- ' *': {
31
- fontSize: theme.typography.body2.fontSize,
32
- textTransform: 'initial',
33
- padding: '0 !important',
34
- color: theme.palette.text.primary,
35
- fontWeight: theme.typography.fontWeightMedium
36
- }
28
+ marginLeft: theme.spacing(2),
29
+ textTransform: 'none'
37
30
  }
38
31
  }));
39
32
 
@@ -68,12 +61,13 @@ const GlobalLocationSwitcherBar = ({
68
61
  fontWeight: "medium",
69
62
  children: locationName
70
63
  })]
71
- }), /*#__PURE__*/_jsx(RippleButton, {
64
+ }), /*#__PURE__*/_jsx(Button, {
65
+ variant: "link",
66
+ size: "small",
67
+ dense: true,
72
68
  onClick: handleChange,
73
- type: "secondary",
74
69
  className: classes.button,
75
70
  "aria-haspopup": true,
76
- flat: true,
77
71
  children: /*#__PURE__*/_jsx(I18n.Text, {
78
72
  string: "locations.your_current_location.change"
79
73
  })
@@ -1,6 +1,7 @@
1
1
  import React from 'react';
2
2
  import PropTypes from 'prop-types';
3
- import { RippleButton, I18n, Typography } from '@shopgate/engage/components';
3
+ import { I18n, Typography } from '@shopgate/engage/components';
4
+ import { Button } from '@shopgate/engage/components/v2';
4
5
  import { i18n } from '@shopgate/engage/core/helpers';
5
6
  import { makeStyles } from '@shopgate/engage/styles';
6
7
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
@@ -15,12 +16,8 @@ const useStyles = makeStyles()(theme => ({
15
16
  color: theme.palette.text.primary
16
17
  },
17
18
  button: {
18
- fontSize: `${theme.typography.caption.fontSize} !important`,
19
- letterSpacing: '0.05em',
20
- padding: `${theme.spacing(0.375, 0)} !important`,
21
- ' *': {
22
- padding: '0 !important'
23
- }
19
+ textTransform: 'none',
20
+ marginLeft: theme.spacing(1)
24
21
  }
25
22
  }));
26
23
 
@@ -49,12 +46,14 @@ const GlobalLocationSwitcherDefault = ({
49
46
  fontWeight: "medium",
50
47
  className: classes.name,
51
48
  children: locationName
52
- }), /*#__PURE__*/_jsx(RippleButton, {
49
+ }), /*#__PURE__*/_jsx(Button, {
50
+ variant: "link",
51
+ color: "primary",
52
+ size: "small",
53
+ dense: true,
53
54
  onClick: handleChange,
54
- type: "secondary",
55
55
  className: classes.button,
56
56
  disabled: !editable,
57
- flat: true,
58
57
  children: /*#__PURE__*/_jsx(I18n.Text, {
59
58
  string: "locations.your_current_location.change"
60
59
  })