@shopgate/engage 7.32.0-beta.1 → 7.32.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -1
- package/admin-preview/constants/index.d.ts +10 -1
- package/admin-preview/constants/index.d.ts.map +1 -1
- package/admin-preview/constants/index.js +14 -5
- package/admin-preview/detection.d.ts +49 -0
- package/admin-preview/detection.d.ts.map +1 -0
- package/admin-preview/detection.js +166 -0
- package/admin-preview/helpers/index.d.ts.map +1 -1
- package/admin-preview/helpers/index.js +4 -4
- package/cart/components/CartItem/CartItemProductProvider.connector.js +0 -2
- package/cart/components/CartItem/CartItemProductProvider.js +3 -30
- package/cart/components/CartItem/CartItemProductProvider.types.js +0 -1
- package/cart/components/PaymentBar/PaymentBarContent.js +1 -1
- package/components/Logo/index.d.ts.map +1 -1
- package/components/Logo/index.js +3 -6
- package/components/PickerUtilize/index.d.ts +2 -1
- package/components/PickerUtilize/index.d.ts.map +1 -1
- package/components/View/components/Above/index.d.ts.map +1 -1
- package/components/View/components/Above/index.js +3 -1
- package/components/View/components/Below/index.d.ts.map +1 -1
- package/components/View/components/Below/index.js +3 -1
- package/components/View/components/Content/index.d.ts +2 -1
- package/components/View/components/Content/index.d.ts.map +1 -1
- package/components/v2/ButtonBase/Ripple.d.ts +2 -1
- package/components/v2/ButtonBase/Ripple.d.ts.map +1 -1
- package/development/components/SimulatedInsets/SimulatedInsetBottom.js +3 -3
- package/development/components/SimulatedInsets/SimulatedInsetTop.js +2 -2
- package/favorites/components/Item/Item.js +5 -2
- package/favorites/components/Lists/Lists.js +13 -1
- package/locations/components/FulfillmentSheet/FulfillmentSheetContent.js +4 -8
- package/locations/components/FulfillmentSlotSwitcher/FulfillmentSlotSwitcherBar.js +1 -5
- package/locations/components/GlobalLocationSwitcher/GlobalLocationSwitcherBar.js +1 -5
- package/package.json +11 -11
- package/product/components/FilterBar/components/Content/components/FilterButton/index.js +2 -6
- package/product/components/FilterBar/components/Content/components/Sort/index.js +1 -5
- package/product/components/ProductName/ProductName.d.ts +1 -1
- package/product/components/ProductName/ProductName.d.ts.map +1 -1
- package/product/components/ProductName/ProductNameContent.d.ts +2 -1
- package/product/components/ProductName/ProductNameContent.d.ts.map +1 -1
- package/product/components/ProductRatingStars/ProductRatingStars.d.ts +1 -1
- package/product/components/RelationsSlider/RelationsSheet.js +1 -5
- package/product/components/UnitQuantityPicker/UnitQuantityPicker.js +1 -1
- package/styles/index.d.ts +1 -1
- package/styles/index.d.ts.map +1 -1
- package/styles/index.js +1 -1
- package/styles/theme/createTheme/createComponents.d.ts +2 -2
- package/styles/theme/createTheme/createComponents.d.ts.map +1 -1
- package/styles/theme/createTheme/createComponents.js +0 -1
- package/styles/theme/createTheme/createComponents.types.d.ts +20 -0
- package/styles/theme/createTheme/createComponents.types.d.ts.map +1 -1
- package/styles/theme/createTheme/createComponents.types.js +20 -0
- package/styles/theme/createTheme/createSpacing.js +4 -1
- package/styles/theme/createTheme/createThemeFromColorScheme.d.ts +2 -2
- package/styles/theme/createTheme/createThemeFromColorScheme.d.ts.map +1 -1
- package/styles/theme/createTheme/index.d.ts.map +1 -1
- package/styles/theme/createTheme/index.js +2 -1
- package/styles/theme/createTheme/layout.d.ts +23 -0
- package/styles/theme/createTheme/layout.d.ts.map +1 -0
- package/styles/theme/createTheme/layout.js +20 -0
- package/styles/theme/createTheme/transitions.d.ts +4 -0
- package/styles/theme/createTheme/transitions.js +3 -1
- package/styles/theme/createTheme/types.d.ts +25 -4
- package/styles/theme/createTheme/types.d.ts.map +1 -1
- package/styles/theme/createTheme/types.js +8 -1
- package/styles/theme/hocs/index.d.ts +2 -0
- package/styles/theme/hocs/index.d.ts.map +1 -0
- package/styles/theme/hocs/index.js +1 -0
- package/styles/theme/hocs/withTheme.d.ts +21 -0
- package/styles/theme/hocs/withTheme.d.ts.map +1 -0
- package/styles/theme/hocs/withTheme.js +33 -0
- package/styles/theme/index.d.ts +1 -0
- package/styles/theme/index.d.ts.map +1 -1
- package/styles/theme/index.js +2 -1
- package/styles/theme/providers/ActiveBreakpointProvider.d.ts +1 -1
- package/styles/theme/providers/ThemeProvider.d.ts +3 -3
- package/styles/theme/providers/ThemeProvider.d.ts.map +1 -1
- package/styles/theme/providers/ThemeProvider.js +10 -14
|
@@ -7,8 +7,15 @@ const selectorTypes = ['data', 'class'];
|
|
|
7
7
|
* dynamically based on user preference or system settings.
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
+
/**
|
|
11
|
+
* A single fully-resolved color-scheme theme. Identical to {@link BaseTheme} except that its
|
|
12
|
+
* `components` keep the nested `vars` level (the raw per-scheme token defaults produced by
|
|
13
|
+
* `createComponents`), whereas the flattened `BaseTheme['components']` shape is only produced for
|
|
14
|
+
* the final merged theme.
|
|
15
|
+
*/
|
|
16
|
+
|
|
10
17
|
/**
|
|
11
18
|
* A record of themes for each color scheme. Each key is a color scheme name (e.g., 'light', 'dark'),
|
|
12
|
-
* and the value is a
|
|
19
|
+
* and the value is a fully-resolved color-scheme theme ({@link ColorSchemeTheme}).
|
|
13
20
|
*/
|
|
14
21
|
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../styles/theme/hocs/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,cAAc,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { withTheme } from "./withTheme";
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { ComponentType } from 'react';
|
|
2
|
+
import type { Theme } from '../createTheme';
|
|
3
|
+
/**
|
|
4
|
+
* Props injected by the `withTheme` HOC.
|
|
5
|
+
*/
|
|
6
|
+
export interface WithThemeProps {
|
|
7
|
+
/** The active styling theme (same object returned by `useTheme()`). */
|
|
8
|
+
theme: Theme;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Injects the styling theme as a `theme` prop into the wrapped component.
|
|
12
|
+
*
|
|
13
|
+
* Intended for legacy class components that cannot use the `useTheme` hook.
|
|
14
|
+
* For function components, prefer the `useTheme` hook instead.
|
|
15
|
+
*
|
|
16
|
+
* @param WrappedComponent The component to inject the theme into.
|
|
17
|
+
* @returns The wrapped component with `theme` supplied automatically.
|
|
18
|
+
*/
|
|
19
|
+
export declare function withTheme<P extends WithThemeProps>(WrappedComponent: ComponentType<P>): ComponentType<Omit<P, keyof WithThemeProps>>;
|
|
20
|
+
export default withTheme;
|
|
21
|
+
//# sourceMappingURL=withTheme.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"withTheme.d.ts","sourceRoot":"","sources":["../../../../styles/theme/hocs/withTheme.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAG5C;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,uEAAuE;IACvE,KAAK,EAAE,KAAK,CAAC;CACd;AAED;;;;;;;;GAQG;AACH,wBAAgB,SAAS,CAAC,CAAC,SAAS,cAAc,EAChD,gBAAgB,EAAE,aAAa,CAAC,CAAC,CAAC,GACjC,aAAa,CAAC,IAAI,CAAC,CAAC,EAAE,MAAM,cAAc,CAAC,CAAC,CAe9C;AAED,eAAe,SAAS,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import useTheme from "../hooks/useTheme";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Props injected by the `withTheme` HOC.
|
|
5
|
+
*/
|
|
6
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
|
+
/**
|
|
8
|
+
* Injects the styling theme as a `theme` prop into the wrapped component.
|
|
9
|
+
*
|
|
10
|
+
* Intended for legacy class components that cannot use the `useTheme` hook.
|
|
11
|
+
* For function components, prefer the `useTheme` hook instead.
|
|
12
|
+
*
|
|
13
|
+
* @param WrappedComponent The component to inject the theme into.
|
|
14
|
+
* @returns The wrapped component with `theme` supplied automatically.
|
|
15
|
+
*/
|
|
16
|
+
export function withTheme(WrappedComponent) {
|
|
17
|
+
/**
|
|
18
|
+
* The actual HOC.
|
|
19
|
+
* @param props The component props.
|
|
20
|
+
* @returns The wrapped component with the theme injected.
|
|
21
|
+
*/
|
|
22
|
+
const WithTheme = props => {
|
|
23
|
+
const theme = useTheme();
|
|
24
|
+
return /*#__PURE__*/_jsx(WrappedComponent, {
|
|
25
|
+
...props,
|
|
26
|
+
theme: theme
|
|
27
|
+
});
|
|
28
|
+
};
|
|
29
|
+
const displayName = WrappedComponent.displayName || WrappedComponent.name || 'Component';
|
|
30
|
+
WithTheme.displayName = `WithTheme(${displayName})`;
|
|
31
|
+
return WithTheme;
|
|
32
|
+
}
|
|
33
|
+
export default withTheme;
|
package/styles/theme/index.d.ts
CHANGED
|
@@ -2,4 +2,5 @@ export { default as ThemeProvider } from './providers/ThemeProvider';
|
|
|
2
2
|
export { createTheme } from './createTheme';
|
|
3
3
|
export type { Theme, Breakpoint, PaletteColorsWithMain } from './createTheme';
|
|
4
4
|
export { useActiveBreakpoint, useMediaQuery, useResponsiveValue, useTheme, useColorScheme, } from './hooks';
|
|
5
|
+
export { withTheme, type WithThemeProps } from './hocs';
|
|
5
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -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,EAAE,KAAK,EAAE,UAAU,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AAC9E,OAAO,EACL,mBAAmB,EACnB,aAAa,EACb,kBAAkB,EAClB,QAAQ,EACR,cAAc,GACf,MAAM,SAAS,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,YAAY,EAAE,KAAK,EAAE,UAAU,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AAC9E,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"}
|
package/styles/theme/index.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
export { default as ThemeProvider } from "./providers/ThemeProvider";
|
|
2
2
|
export { createTheme } from "./createTheme";
|
|
3
|
-
export { useActiveBreakpoint, useMediaQuery, useResponsiveValue, useTheme, useColorScheme } from "./hooks";
|
|
3
|
+
export { useActiveBreakpoint, useMediaQuery, useResponsiveValue, useTheme, useColorScheme } from "./hooks";
|
|
4
|
+
export { withTheme } from "./hocs";
|
|
@@ -4,6 +4,6 @@ export declare const ActiveBreakpointContext: React.Context<Breakpoint | undefin
|
|
|
4
4
|
type ActiveBreakpointProviderProps = {
|
|
5
5
|
children: React.ReactNode;
|
|
6
6
|
};
|
|
7
|
-
declare const _default: React.MemoExoticComponent<({ children }: ActiveBreakpointProviderProps) =>
|
|
7
|
+
declare const _default: React.MemoExoticComponent<({ children }: ActiveBreakpointProviderProps) => React.JSX.Element>;
|
|
8
8
|
export default _default;
|
|
9
9
|
//# sourceMappingURL=ActiveBreakpointProvider.d.ts.map
|
|
@@ -3,11 +3,11 @@ export interface ColorSchemeContextValue {
|
|
|
3
3
|
/**
|
|
4
4
|
* The current color scheme (e.g., 'light' or 'dark')
|
|
5
5
|
*/
|
|
6
|
-
mode: ColorSchemeName;
|
|
6
|
+
mode: ColorSchemeName | null;
|
|
7
7
|
/**
|
|
8
8
|
* Function to update the color scheme
|
|
9
9
|
*/
|
|
10
|
-
setMode: React.Dispatch<React.SetStateAction<ColorSchemeName>>;
|
|
10
|
+
setMode: React.Dispatch<React.SetStateAction<ColorSchemeName | null>>;
|
|
11
11
|
}
|
|
12
12
|
export declare const ThemeContext: import("react").Context<Theme>;
|
|
13
13
|
export declare const ColorSchemeContext: import("react").Context<ColorSchemeContextValue>;
|
|
@@ -18,6 +18,6 @@ type ThemeProviderProps = {
|
|
|
18
18
|
theme: ThemeInternal;
|
|
19
19
|
children: React.ReactNode;
|
|
20
20
|
};
|
|
21
|
-
declare const _default: import("react").MemoExoticComponent<({ children, theme, }: ThemeProviderProps) => import("react
|
|
21
|
+
declare const _default: import("react").MemoExoticComponent<({ children, theme, }: ThemeProviderProps) => import("react").JSX.Element>;
|
|
22
22
|
export default _default;
|
|
23
23
|
//# sourceMappingURL=ThemeProvider.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ThemeProvider.d.ts","sourceRoot":"","sources":["../../../../styles/theme/providers/ThemeProvider.tsx"],"names":[],"mappings":"AAQA,OAAO,EAAE,KAAK,KAAK,EAAE,KAAK,aAAa,EAAE,KAAK,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEtF,MAAM,WAAW,uBAAuB;IACtC;;OAEG;IACH,IAAI,EAAE,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"ThemeProvider.d.ts","sourceRoot":"","sources":["../../../../styles/theme/providers/ThemeProvider.tsx"],"names":[],"mappings":"AAQA,OAAO,EAAE,KAAK,KAAK,EAAE,KAAK,aAAa,EAAE,KAAK,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEtF,MAAM,WAAW,uBAAuB;IACtC;;OAEG;IACH,IAAI,EAAE,eAAe,GAAG,IAAI,CAAC;IAC7B;;OAEG;IACH,OAAO,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,eAAe,GAAG,IAAI,CAAC,CAAC,CAAC;CACvE;AAED,eAAO,MAAM,YAAY,gCAAqC,CAAC;AAE/D,eAAO,MAAM,kBAAkB,kDAG7B,CAAC;AAwCH,KAAK,kBAAkB,GAAG;IACxB;;OAEG;IACH,KAAK,EAAE,aAAa,CAAC;IACrB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,CAAA;mFAtCE,kBAAkB;AAwCrB,wBAAmC"}
|
|
@@ -30,20 +30,16 @@ const ThemeProvider = ({
|
|
|
30
30
|
theme.setActiveColorScheme(activeColorScheme);
|
|
31
31
|
}, [activeColorScheme, theme]);
|
|
32
32
|
const styleSheets = useMemo(() => theme.generateStyleSheets(), [theme]);
|
|
33
|
-
return (
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
children: children
|
|
42
|
-
}), /*#__PURE__*/_jsx(GlobalStyles, {
|
|
43
|
-
styles: styleSheets
|
|
44
|
-
})]
|
|
33
|
+
return /*#__PURE__*/_jsxs(ColorSchemeContext.Provider, {
|
|
34
|
+
value: colorSchemeContextValue,
|
|
35
|
+
children: [IS_FRONTEND_SETTINGS_ADMIN_PREVIEW_ACTIVE && /*#__PURE__*/_jsx(FrontendSettingsPreviewBridge, {}), /*#__PURE__*/_jsxs(ThemeContext.Provider, {
|
|
36
|
+
value: theme,
|
|
37
|
+
children: [/*#__PURE__*/_jsx(ActiveBreakpointProvider, {
|
|
38
|
+
children: children
|
|
39
|
+
}), /*#__PURE__*/_jsx(GlobalStyles, {
|
|
40
|
+
styles: styleSheets
|
|
45
41
|
})]
|
|
46
|
-
})
|
|
47
|
-
);
|
|
42
|
+
})]
|
|
43
|
+
});
|
|
48
44
|
};
|
|
49
45
|
export default /*#__PURE__*/memo(ThemeProvider);
|