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

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 (188) hide show
  1. package/account/components/Profile/Profile.provider.d.ts +1 -1
  2. package/account/components/Profile/ProfileAddressBook.d.ts.map +1 -1
  3. package/account/components/Profile/ProfileAddressBook.js +13 -22
  4. package/account/components/Profile/ProfileAddressCard.d.ts.map +1 -1
  5. package/account/components/Profile/ProfileAddressCard.js +8 -18
  6. package/account/components/Profile/ProfileForm.d.ts.map +1 -1
  7. package/account/components/Profile/ProfileForm.js +15 -42
  8. package/account/components/ProfileContact/ProfileContact.js +13 -21
  9. package/admin-preview/components/FrontendSettingsPreviewBridge/FrontendSettingsPreviewBridge.d.ts.map +1 -1
  10. package/admin-preview/components/FrontendSettingsPreviewBridge/FrontendSettingsPreviewBridge.js +41 -7
  11. package/admin-preview/components/FrontendSettingsPreviewBridge/types.d.ts +7 -0
  12. package/admin-preview/components/FrontendSettingsPreviewBridge/types.d.ts.map +1 -1
  13. package/admin-preview/initialization/_internal/initialFrontendSettings.d.ts +32 -0
  14. package/admin-preview/initialization/_internal/initialFrontendSettings.d.ts.map +1 -0
  15. package/admin-preview/initialization/_internal/initialFrontendSettings.js +43 -0
  16. package/admin-preview/initialization/awaitInitialFrontendSettings.d.ts +22 -0
  17. package/admin-preview/initialization/awaitInitialFrontendSettings.d.ts.map +1 -0
  18. package/admin-preview/initialization/awaitInitialFrontendSettings.js +84 -0
  19. package/back-in-stock/components/BackInStockButton/index.js +5 -5
  20. package/cart/components/CartItem/CartItemProductLayout.js +1 -0
  21. package/cart/components/CartItem/CartItemProductLayoutWideRemoveItem.js +7 -14
  22. package/cart/components/CartItem/CartItemQuantityPicker.js +1 -0
  23. package/cart/components/CartItems/CartItemCardReservationLabelChangeStore.js +6 -24
  24. package/cart/components/CartSummaryWide/CartSummaryWide.js +2 -2
  25. package/cart/components/CartSummaryWide/CartSummaryWideCheckoutButton.js +9 -23
  26. package/cart/components/PaymentBar/PaymentBarCheckoutButton.js +8 -30
  27. package/cart/components/PaymentBar/testUtils/mockFactories.js +4 -11
  28. package/category/components/CategoryImage/index.js +13 -2
  29. package/checkout/components/AddressBook/AddressList.js +14 -23
  30. package/checkout/components/Checkout/CheckoutActions.js +4 -3
  31. package/checkout/components/Checkout/CheckoutAddress.js +8 -0
  32. package/checkout/components/Checkout/CheckoutSection.js +6 -2
  33. package/checkout/components/CheckoutConfirmation/CheckoutConfirmation.js +6 -7
  34. package/checkout/components/ResponsiveBackButton/ResponsiveBackButton.js +7 -17
  35. package/components/Badge/spec.js +6 -29
  36. package/components/Card/Card.js +1 -1
  37. package/components/ChipLayout/index.js +2 -4
  38. package/components/NavigationHandler/connector.js +1 -1
  39. package/components/NavigationHandler/index.d.ts +2 -2
  40. package/components/NavigationHandler/spec.js +10 -1
  41. package/components/Paper/Paper.d.ts +1 -2
  42. package/components/Paper/Paper.d.ts.map +1 -1
  43. package/components/Paper/spec.js +5 -22
  44. package/components/Tabs/components/Tab.d.ts.map +1 -1
  45. package/components/Tabs/components/Tab.js +14 -16
  46. package/components/Typography/Typography.d.ts +1 -1
  47. package/components/v2/Button/Button.d.ts +24 -13
  48. package/components/v2/Button/Button.d.ts.map +1 -1
  49. package/components/v2/Button/Button.js +139 -41
  50. package/components/v2/ButtonBase/ButtonBase.d.ts +50 -10
  51. package/components/v2/ButtonBase/ButtonBase.d.ts.map +1 -1
  52. package/components/v2/ButtonBase/ButtonBase.js +192 -17
  53. package/components/v2/ButtonBase/hooks.d.ts +0 -1
  54. package/components/v2/ButtonBase/hooks.d.ts.map +1 -1
  55. package/components/v2/ButtonBase/hooks.js +36 -12
  56. package/components/v2/ButtonGroup/ButtonGroup.d.ts +11 -5
  57. package/components/v2/ButtonGroup/ButtonGroup.d.ts.map +1 -1
  58. package/components/v2/ButtonGroup/ButtonGroup.js +49 -26
  59. package/components/v2/CircularProgress/CircularProgress.d.ts.map +1 -1
  60. package/components/v2/CircularProgress/CircularProgress.js +10 -5
  61. package/core/hooks/useNavigation.d.ts +10 -2
  62. package/core/hooks/useNavigation.d.ts.map +1 -1
  63. package/core/hooks/useNavigation.js +1 -2
  64. package/core/initialization/index.d.ts.map +1 -1
  65. package/core/initialization/index.js +24 -5
  66. package/core/router/conductor.d.ts +9 -0
  67. package/core/router/helpers.d.ts +28 -15
  68. package/core/router/helpers.d.ts.map +1 -1
  69. package/core/router/helpers.js +8 -8
  70. package/development/components/DevelopmentSettings/DevelopmentSettings.js +3 -3
  71. package/favorites/components/FavoriteButtonWide/FavoriteButtonWide.js +7 -17
  72. package/favorites/components/List/List.d.ts.map +1 -1
  73. package/favorites/components/List/List.js +0 -1
  74. package/favorites/components/List/ListContent.js +4 -5
  75. package/favorites/components/Lists/Lists.js +4 -5
  76. package/filter/components/FilterPageContent/components/ApplyButton/index.js +8 -10
  77. package/filter/components/FilterPageContent/components/ResetButton/index.js +8 -6
  78. package/locations/components/ChangeLocationButton/ChangeLocationButton.js +10 -14
  79. package/locations/components/FulfillmentSlotSwitcher/FulfillmentSlotDialog.js +4 -8
  80. package/locations/components/FulfillmentSlotSwitcher/FulfillmentSlotSwitcher.js +1 -1
  81. package/locations/components/FulfillmentSlotSwitcher/FulfillmentSlotSwitcherBar.js +8 -13
  82. package/locations/components/FulfillmentSlotSwitcher/FulfillmentSlotSwitcherDefault.js +10 -10
  83. package/locations/components/GlobalLocationSwitcher/GlobalLocationSwitcherBar.js +8 -14
  84. package/locations/components/GlobalLocationSwitcher/GlobalLocationSwitcherDefault.js +9 -10
  85. package/locations/components/ReserveForm/ReserveForm.js +6 -7
  86. package/locations/components/StoreDetails/components/GetDirectionsButton.js +2 -4
  87. package/locations/components/StoreDetails/components/StoreDetails.js +5 -10
  88. package/locations/components/StoreDetails/components/StoresNearbyListItem.js +13 -21
  89. package/locations/components/StoreFinder/StoreFinderSelectLocationButton.js +5 -11
  90. package/locations/components/StoreFinder/StoreFinderStoreInfoButton.js +5 -11
  91. package/locations/components/StoreList/StoreListSearch.js +1 -0
  92. package/locations/components/StoreList/StoreSelectLocationButton.js +5 -11
  93. package/login/components/ForgotPassword/ForgotPassword.js +11 -23
  94. package/orders/components/OrderDetails/OrderDetailsAuthenticate.js +5 -7
  95. package/package.json +7 -7
  96. package/page/components/NotFound.d.ts.map +1 -1
  97. package/page/components/NotFound.js +7 -6
  98. package/page/components/ResponsiveWidgetImage/ResponsiveWidgetImage.d.ts +1 -1
  99. package/page/components/ResponsiveWidgetImage/ResponsiveWidgetImage.js +2 -2
  100. package/page/components/WidgetVideo/WidgetVideo.d.ts +1 -1
  101. package/page/components/WidgetVideo/WidgetVideo.d.ts.map +1 -1
  102. package/page/helpers/index.d.ts +5 -2
  103. package/page/helpers/index.d.ts.map +1 -1
  104. package/page/helpers/index.js +8 -5
  105. package/page/widgets/Button/Button.js +2 -3
  106. package/page/widgets/NestedCategoryFilter/NestedCategoryFilter.js +8 -8
  107. package/page/widgets/ProductList/ProductList.js +18 -14
  108. package/page/widgets/Video/hooks.d.ts +2 -2
  109. package/product/components/ProductCard/index.js +7 -1
  110. package/product/components/ProductGrid/components/Item/components/ItemDetails/index.js +6 -1
  111. package/product/components/ProductGrid/components/Item/components/ItemImage/index.js +1 -11
  112. package/product/components/ProductGrid/components/Item/index.js +3 -2
  113. package/product/components/ProductGrid/components/Layout/index.js +2 -1
  114. package/product/components/ProductGridPrice/index.js +0 -1
  115. package/product/components/ProductImage/ProductImage.d.ts.map +1 -1
  116. package/product/components/ProductImage/ProductImage.js +7 -2
  117. package/product/components/ProductImage/ProductImagePlaceholder.js +3 -3
  118. package/product/components/ProductSlider/index.js +1 -1
  119. package/product/components/UnitQuantityPicker/UnitQuantityPicker.d.ts.map +1 -1
  120. package/product/components/UnitQuantityPicker/UnitQuantityPicker.js +15 -33
  121. package/push-opt-in/components/PushOptInModal/index.js +4 -4
  122. package/registration/components/Registration/RegistrationFormActions.js +4 -4
  123. package/reviews/components/Reviews/components/AllReviewsLink/index.js +6 -6
  124. package/reviews/components/Reviews/components/Header/components/WriteReviewLink/index.js +4 -3
  125. package/reviews/components/Reviews/components/Header/components/WriteReviewLink/spec.js +28 -22
  126. package/reviews/components/Reviews/spec.js +5 -6
  127. package/settings/reducers/appSettings.d.ts.map +1 -1
  128. package/settings/reducers/appSettings.js +18 -2
  129. package/settings/selectors/appSettings.d.ts +37 -2
  130. package/settings/selectors/appSettings.d.ts.map +1 -1
  131. package/settings/selectors/appSettings.js +30 -1
  132. package/settings/types/appSettings.d.ts +42 -2
  133. package/settings/types/appSettings.d.ts.map +1 -1
  134. package/settings/types/appSettings.js +124 -1
  135. package/styles/helpers/index.d.ts +1 -0
  136. package/styles/helpers/index.js +1 -0
  137. package/styles/helpers/loadFontCss.d.ts +22 -0
  138. package/styles/helpers/loadFontCss.d.ts.map +1 -0
  139. package/styles/helpers/loadFontCss.js +138 -0
  140. package/styles/helpers/loadThemeCss.d.ts.map +1 -1
  141. package/styles/helpers/loadThemeCss.js +11 -0
  142. package/styles/index.d.ts +1 -1
  143. package/styles/index.d.ts.map +1 -1
  144. package/styles/theme/createDefaultThemeOptions/index.d.ts.map +1 -1
  145. package/styles/theme/createDefaultThemeOptions/index.js +94 -3
  146. package/styles/theme/createTheme/createComponents.types.d.ts +25 -0
  147. package/styles/theme/createTheme/createComponents.types.d.ts.map +1 -1
  148. package/styles/theme/createTheme/createComponents.types.js +28 -3
  149. package/styles/theme/createTheme/createShape.d.ts +2 -3
  150. package/styles/theme/createTheme/createShape.d.ts.map +1 -1
  151. package/styles/theme/createTheme/createShape.js +1 -2
  152. package/styles/theme/createTheme/createThemeFromColorScheme.d.ts +3 -1
  153. package/styles/theme/createTheme/createThemeFromColorScheme.d.ts.map +1 -1
  154. package/styles/theme/createTheme/createThemeFromColorScheme.js +4 -2
  155. package/styles/theme/createTheme/createTypography.d.ts +2 -1
  156. package/styles/theme/createTheme/createTypography.js +58 -18
  157. package/styles/theme/createTheme/index.d.ts +2 -2
  158. package/styles/theme/createTheme/index.d.ts.map +1 -1
  159. package/styles/theme/createTheme/index.js +2 -2
  160. package/styles/theme/createTheme/types.d.ts +9 -2
  161. package/styles/theme/createTheme/types.d.ts.map +1 -1
  162. package/styles/theme/createTheme/types.js +6 -0
  163. package/styles/theme/hooks/useColorScheme.d.ts +2 -2
  164. package/styles/theme/hooks/useColorScheme.d.ts.map +1 -1
  165. package/styles/theme/hooks/useColorScheme.js +1 -1
  166. package/styles/theme/hooks/useMediaQuery.d.ts +7 -0
  167. package/styles/theme/hooks/useMediaQuery.d.ts.map +1 -1
  168. package/styles/theme/hooks/useMediaQuery.js +5 -5
  169. package/styles/theme/hooks/useTheme.js +1 -1
  170. package/styles/theme/index.d.ts +3 -1
  171. package/styles/theme/index.d.ts.map +1 -1
  172. package/styles/theme/providers/ColorSchemeContext.d.ts +30 -9
  173. package/styles/theme/providers/ColorSchemeContext.d.ts.map +1 -1
  174. package/styles/theme/providers/ColorSchemeContext.js +8 -0
  175. package/styles/theme/providers/ThemeContext.d.ts +3 -0
  176. package/styles/theme/providers/ThemeContext.d.ts.map +1 -0
  177. package/styles/theme/providers/ThemeContext.js +2 -0
  178. package/styles/theme/providers/ThemeProvider.d.ts +2 -2
  179. package/styles/theme/providers/ThemeProvider.d.ts.map +1 -1
  180. package/styles/theme/providers/ThemeProvider.js +58 -16
  181. package/styles/theme/utils/color.d.ts +12 -12
  182. package/styles/theme/utils/color.d.ts.map +1 -1
  183. package/tracking/components/CookieConsentModal/index.js +3 -4
  184. package/tracking/components/PrivacySettings/index.js +3 -3
  185. package/cart/components/PaymentBar/PaymentBarReserveButton.connector.js +0 -6
  186. package/cart/components/PaymentBar/PaymentBarReserveButton.js +0 -71
  187. package/locations/components/StoreFinder/StoreFinderGetDirectionsButton.connector.js +0 -16
  188. package/locations/components/StoreFinder/StoreFinderGetDirectionsButton.js +0 -52
@@ -9,13 +9,15 @@ const ButtonGroup = /*#__PURE__*/forwardRef((props, ref) => {
9
9
  const {
10
10
  variant = 'contained',
11
11
  size = 'medium',
12
+ dense = false,
12
13
  orientation = 'horizontal',
13
- disableElevation = false,
14
+ enableElevation = false,
14
15
  fullWidth = false,
15
16
  disableRipple = false,
16
17
  disabled = false,
17
18
  color = 'inherit',
18
19
  className,
20
+ classes: classesProp,
19
21
  children,
20
22
  ...other
21
23
  } = props;
@@ -27,7 +29,7 @@ const ButtonGroup = /*#__PURE__*/forwardRef((props, ref) => {
27
29
  variant
28
30
  }, {
29
31
  props: {
30
- classes: props.classes
32
+ classes: classesProp
31
33
  }
32
34
  });
33
35
  const buttonClassName = cx(classes.grouped, classes[`grouped${capitalize(orientation)}`], classes[`grouped${capitalize(variant)}`], classes[`grouped${capitalize(variant)}${capitalize(orientation)}`], {
@@ -36,11 +38,18 @@ const ButtonGroup = /*#__PURE__*/forwardRef((props, ref) => {
36
38
  return /*#__PURE__*/_jsx("div", {
37
39
  role: "group",
38
40
  className: cx(classes.root, {
39
- [classes.contained]: variant === 'contained',
40
41
  [classes.vertical]: orientation === 'vertical',
41
42
  [classes.fullWidth]: fullWidth,
42
- [classes.disableElevation]: disableElevation
43
- }, className),
43
+ [classes.enableElevation]: enableElevation && variant === 'contained'
44
+ }, 'engage__button-group', className),
45
+ "data-variant": variant,
46
+ "data-color": color,
47
+ "data-size": size,
48
+ "data-orientation": orientation,
49
+ "data-dense": dense || undefined,
50
+ "data-full-width": fullWidth || undefined,
51
+ "data-enable-elevation": enableElevation || undefined,
52
+ "data-disabled": disabled || undefined,
44
53
  ref: ref,
45
54
  ...other,
46
55
  children: React.Children.map(children, child => {
@@ -51,15 +60,22 @@ const ButtonGroup = /*#__PURE__*/forwardRef((props, ref) => {
51
60
  className: cx(buttonClassName, child.props.className),
52
61
  color: child.props.color || color,
53
62
  disabled: child.props.disabled || disabled,
54
- disableElevation: child.props.disableElevation || disableElevation,
63
+ enableElevation: child.props.enableElevation || enableElevation,
55
64
  disableRipple,
56
65
  fullWidth,
57
66
  size: child.props.size || size,
67
+ dense: child.props.dense || dense,
58
68
  variant: child.props.variant || variant
59
69
  });
60
70
  })
61
71
  });
62
72
  });
73
+
74
+ /**
75
+ * Opacity the separator between grouped text buttons defaults to. Published as a custom property
76
+ * below, so the value is not baked into the border declarations.
77
+ */
78
+ const SEPARATOR_OPACITY = '0.5';
63
79
  const useStyles = makeStyles({
64
80
  name: 'ButtonGroup'
65
81
  })((theme, props) => {
@@ -68,27 +84,35 @@ const useStyles = makeStyles({
68
84
  variant
69
85
  } = props;
70
86
  let cssColor = '';
71
- if (color !== 'inherit') {
87
+ let darkCssColor = '';
88
+ if (color === 'cta') {
89
+ cssColor = theme.components.ctaButton.background;
90
+ } else if (color !== 'inherit') {
72
91
  cssColor = color && theme.palette?.[color]?.main ? theme.palette[color].main : theme.palette.primary.main;
73
92
  } else if (variant === 'contained') {
74
93
  // eslint-disable-next-line prefer-destructuring
75
94
  cssColor = theme.palette.grey[200];
95
+ darkCssColor = theme.palette.background.emphasized;
76
96
  } else {
77
97
  cssColor = 'currentColor';
78
98
  }
79
99
  return {
80
100
  root: {
81
101
  '--button-group-color': `var(${theme.vars.components.button.color}, ${cssColor})`,
102
+ '--button-group-divider': theme.darken('var(--button-group-color)'),
103
+ ...(darkCssColor ? theme.applyStyles('dark', {
104
+ '--button-group-color': `var(${theme.vars.components.button.color}, ${darkCssColor})`,
105
+ '--button-group-divider': theme.lighten('var(--button-group-color)')
106
+ }) : {}),
82
107
  '--disabledColor': theme.palette.action.disabled,
108
+ '--button-group-separator-opacity': SEPARATOR_OPACITY,
109
+ '--button-group-separator': theme.alpha('var(--button-group-color)', 'var(--button-group-separator-opacity)'),
83
110
  display: 'inline-flex',
84
- borderRadius: `var(${theme.vars.components.button.borderRadius}, ${theme.shape.borderRadius})`
85
- },
86
- contained: {
87
- boxShadow: theme.shadows[2]
111
+ borderRadius: theme.components.button.borderRadius
88
112
  },
89
113
  disabled: {},
90
- disableElevation: {
91
- boxShadow: 'none'
114
+ enableElevation: {
115
+ boxShadow: theme.shadows[2]
92
116
  },
93
117
  fullWidth: {
94
118
  width: '100%'
@@ -127,8 +151,8 @@ const useStyles = makeStyles({
127
151
  '&:not(:last-of-type)': {
128
152
  borderRightWidth: 1,
129
153
  borderRightStyle: 'solid',
130
- borderRightColor: theme.darken('var(--button-group-color)'),
131
- '&:disabled': {
154
+ borderRightColor: 'var(--button-group-divider)',
155
+ '&:disabled, &[aria-disabled="true"]': {
132
156
  borderRightColor: 'var(--disabledColor)'
133
157
  }
134
158
  }
@@ -137,18 +161,14 @@ const useStyles = makeStyles({
137
161
  '&:not(:last-of-type)': {
138
162
  borderBottomWidth: 1,
139
163
  borderBottomStyle: 'solid',
140
- borderBottomColor: theme.darken('var(--button-group-color)'),
141
- '&:disabled': {
164
+ borderBottomColor: 'var(--button-group-divider)',
165
+ '&:disabled, &[aria-disabled="true"]': {
142
166
  borderBottomColor: 'var(--disabledColor)'
143
167
  }
144
168
  }
145
169
  },
146
170
  groupedOutlined: {
147
- borderColor: `${theme.lighten('var(--button-group-color)', 0.5)} !important`,
148
- '&:hover': {
149
- borderColor: 'var(--button-group-color)'
150
- },
151
- '&:disabled': {
171
+ '&:disabled, &[aria-disabled="true"]': {
152
172
  borderColor: 'var(--disabledColor) !important'
153
173
  }
154
174
  },
@@ -168,13 +188,15 @@ const useStyles = makeStyles({
168
188
  borderBottomColor: 'transparent !important'
169
189
  }
170
190
  },
191
+ // Text buttons need no shared styles, but the key has to exist because the class is looked up
192
+ // dynamically as `grouped${capitalize(variant)}`.
171
193
  groupedText: {},
172
194
  groupedTextHorizontal: {
173
195
  '&&:not(:last-of-type)': {
174
196
  borderRightWidth: 1,
175
197
  borderRightStyle: 'solid',
176
- borderRightColor: `${theme.lighten('var(--button-group-color)', 0.5)}`,
177
- '&:disabled': {
198
+ borderRightColor: 'var(--button-group-separator)',
199
+ '&:disabled, &[aria-disabled="true"]': {
178
200
  borderRightColor: 'var(--disabledColor)'
179
201
  }
180
202
  }
@@ -183,8 +205,8 @@ const useStyles = makeStyles({
183
205
  '&&:not(:last-of-type)': {
184
206
  borderBottomWidth: 1,
185
207
  borderBottomStyle: 'solid',
186
- borderBottomColor: `${theme.lighten('var(--button-group-color)', 0.5)}`,
187
- '&:disabled': {
208
+ borderBottomColor: 'var(--button-group-separator)',
209
+ '&:disabled, &[aria-disabled="true"]': {
188
210
  borderBottomColor: 'var(--disabledColor)'
189
211
  }
190
212
  }
@@ -192,4 +214,5 @@ const useStyles = makeStyles({
192
214
  /* eslint-enable tss-unused-classes/unused-classes */
193
215
  };
194
216
  });
217
+ ButtonGroup.displayName = 'ButtonGroup';
195
218
  export default ButtonGroup;
@@ -1 +1 @@
1
- {"version":3,"file":"CircularProgress.d.ts","sourceRoot":"","sources":["../../../../components/v2/CircularProgress/CircularProgress.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAE1C,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAIrE;;;GAGG;AACH,QAAA,MAAM,gBAAgB,8FA6DpB,CAAC;AA0BH,QAAA,MAAM,SAAS;;cA4BX,CAAA;;;;;;CAeF,CAAC;AAEH,MAAM,WAAW,qBAAqB;IACpC;;OAEG;IACH,KAAK,CAAC,EAAE,qBAAqB,GAAG,SAAS,CAAC;IAC1C;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,OAAO,CAAC,EAAE,eAAe,GAAG,aAAa,CAAC;IAC1C;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5B;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC,UAAU,CAAC,OAAO,SAAS,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC;CAC5D;AAED,eAAe,gBAAgB,CAAC"}
1
+ {"version":3,"file":"CircularProgress.d.ts","sourceRoot":"","sources":["../../../../components/v2/CircularProgress/CircularProgress.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAE1C,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAIrE;;;GAGG;AACH,QAAA,MAAM,gBAAgB,8FAiEpB,CAAC;AA0BH,QAAA,MAAM,SAAS;;cAuBN,CAAC;;;;;;CAoBR,CAAC;AAEH,MAAM,WAAW,qBAAqB;IACpC;;OAEG;IACH,KAAK,CAAC,EAAE,qBAAqB,GAAG,SAAS,CAAC;IAC1C;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,OAAO,CAAC,EAAE,eAAe,GAAG,aAAa,CAAC;IAC1C;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5B;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC,UAAU,CAAC,OAAO,SAAS,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC;CAC5D;AAID,eAAe,gBAAgB,CAAC"}
@@ -17,6 +17,7 @@ const CircularProgress = /*#__PURE__*/forwardRef((props, ref) => {
17
17
  thickness = 3.6,
18
18
  style,
19
19
  className,
20
+ classes: classesProp,
20
21
  ...other
21
22
  } = props;
22
23
  const {
@@ -26,7 +27,7 @@ const CircularProgress = /*#__PURE__*/forwardRef((props, ref) => {
26
27
  color
27
28
  }, {
28
29
  props: {
29
- classes: props.classes
30
+ classes: classesProp
30
31
  }
31
32
  });
32
33
  const circleStyle = {};
@@ -40,10 +41,10 @@ const CircularProgress = /*#__PURE__*/forwardRef((props, ref) => {
40
41
  rootStyle.transform = 'rotate(-90deg)';
41
42
  }
42
43
  return /*#__PURE__*/_jsx("div", {
43
- className: cx(classes.root, className, {
44
+ className: cx(classes.root, {
44
45
  [classes.indeterminate]: variant === 'indeterminate',
45
46
  [classes.determinate]: variant === 'determinate'
46
- }),
47
+ }, 'engage__circular-progress', className),
47
48
  style: {
48
49
  width: size,
49
50
  height: size,
@@ -52,6 +53,9 @@ const CircularProgress = /*#__PURE__*/forwardRef((props, ref) => {
52
53
  },
53
54
  ref: ref,
54
55
  role: "progressbar",
56
+ "data-variant": variant,
57
+ "data-color": color,
58
+ "data-disable-shrink": disableShrink || undefined,
55
59
  ...rootProps,
56
60
  ...other,
57
61
  children: /*#__PURE__*/_jsx("svg", {
@@ -108,8 +112,8 @@ const useStyles = makeStyles({
108
112
  return {
109
113
  root: {
110
114
  display: 'inline-block',
111
- '--sg-circular-progress-circle-color': cssColor,
112
- color: 'var(--sg-circular-progress-circle-color)'
115
+ '--circular-progress-color': cssColor,
116
+ color: 'var(--circular-progress-color)'
113
117
  },
114
118
  svg: {
115
119
  display: 'block'
@@ -136,4 +140,5 @@ const useStyles = makeStyles({
136
140
  }
137
141
  };
138
142
  });
143
+ CircularProgress.displayName = 'CircularProgress';
139
144
  export default CircularProgress;
@@ -1,6 +1,14 @@
1
+ import { push, pop, replace, reset, update } from '../router/helpers';
2
+ export interface Navigation {
3
+ push: typeof push;
4
+ pop: typeof pop;
5
+ replace: typeof replace;
6
+ reset: typeof reset;
7
+ update: typeof update;
8
+ }
1
9
  /**
2
10
  * Provides functions for navigation.
3
- * @returns {Object}
11
+ * @returns The navigation functions.
4
12
  */
5
- export function useNavigation(): Object;
13
+ export declare function useNavigation(): Navigation;
6
14
  //# sourceMappingURL=useNavigation.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useNavigation.d.ts","sourceRoot":"","sources":["../../../core/hooks/useNavigation.js"],"names":[],"mappings":"AAIA;;;GAGG;AACH,iCAFa,MAAM,CAUlB"}
1
+ {"version":3,"file":"useNavigation.d.ts","sourceRoot":"","sources":["../../../core/hooks/useNavigation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,IAAI,EAAE,GAAG,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAClC,MAAM,mBAAmB,CAAC;AAE3B,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,OAAO,IAAI,CAAC;IAClB,GAAG,EAAE,OAAO,GAAG,CAAC;IAChB,OAAO,EAAE,OAAO,OAAO,CAAC;IACxB,KAAK,EAAE,OAAO,KAAK,CAAC;IACpB,MAAM,EAAE,OAAO,MAAM,CAAC;CACvB;AAED;;;GAGG;AACH,wBAAgB,aAAa,IAAI,UAAU,CAQ1C"}
@@ -1,8 +1,7 @@
1
1
  import { push, pop, replace, reset, update } from "../router/helpers";
2
-
3
2
  /**
4
3
  * Provides functions for navigation.
5
- * @returns {Object}
4
+ * @returns The navigation functions.
6
5
  */
7
6
  export function useNavigation() {
8
7
  return {
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../core/initialization/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,IAAI,UAAU,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAChE,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAgB5D,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd,YAAY,CAAC,EAAE;YACb,YAAY,EAAE,OAAO,CAAC;YACtB,KAAK,EAAE,OAAO,CAAC;SAChB,CAAC;KACH;CACF;AAED;;;;;;;;GAQG;AACH,KAAK,KAAK,GAAG,IAAI,CAAC,UAAU,CAAC,OAAO,EAAE,aAAa,CAAC,EAAE,UAAU,CAAC,GAAG;IAClE,QAAQ,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,OAAO,CAAC;CACxC,CAAC;AAMF;;;;;;;GAOG;AACH,eAAO,MAAM,UAAU,GACrB,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAChC,UAAU,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC,CAAC,CAAC,EAC9C,aAAa,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC,CAAC,CAAC;;EAuDlD,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../core/initialization/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,IAAI,UAAU,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAChE,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAqB5D,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd,YAAY,CAAC,EAAE;YACb,YAAY,EAAE,OAAO,CAAC;YACtB,KAAK,EAAE,OAAO,CAAC;SAChB,CAAC;KACH;CACF;AAED;;;;;;;;GAQG;AACH,KAAK,KAAK,GAAG,IAAI,CAAC,UAAU,CAAC,OAAO,EAAE,aAAa,CAAC,EAAE,UAAU,CAAC,GAAG;IAClE,QAAQ,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,OAAO,CAAC;CACxC,CAAC;AAMF;;;;;;;GAOG;AACH,eAAO,MAAM,UAAU,GACrB,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAChC,UAAU,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC,CAAC,CAAC,EAC9C,aAAa,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC,CAAC,CAAC;;EA4ElD,CAAC"}
@@ -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",