pds-dev-kit-web 2.2.33 → 2.2.34
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/dist/src/desktop/components/DynamicDesktopNavBar/DynamicDesktopNavBar.js +3 -3
- package/dist/src/desktop/components/DynamicDesktopNavBar/blocks/BrandLogo.d.ts +2 -1
- package/dist/src/desktop/components/DynamicDesktopNavBar/blocks/BrandLogo.js +2 -2
- package/dist/src/desktop/components/DynamicDesktopNavBar/components/LogoNav.d.ts +2 -1
- package/dist/src/desktop/components/DynamicDesktopNavBar/components/LogoNav.js +12 -3
- package/dist/src/desktop/components/DynamicDesktopNavBar/templates/constants.js +1 -1
- package/package.json +1 -1
- package/release-note.md +2 -2
- package/webhook/node_modules/esrecurse/.babelrc +0 -3
|
@@ -75,8 +75,8 @@ function DynamicDesktopNavBar(_a) {
|
|
|
75
75
|
template === 'W1_0007' ||
|
|
76
76
|
template === 'W1_0008' ||
|
|
77
77
|
template === 'W1_0009' ||
|
|
78
|
-
template === 'W1_0010'
|
|
79
|
-
|
|
78
|
+
template === 'W1_0010';
|
|
79
|
+
var isCenteredLogo = template === 'W1_0011';
|
|
80
80
|
var navBarHeight = '63px';
|
|
81
81
|
(0, react_1.useEffect)(function () {
|
|
82
82
|
var currentSearch = (0, utils_1.getSearchExceptGivenName)(location.search, 'from');
|
|
@@ -93,7 +93,7 @@ function DynamicDesktopNavBar(_a) {
|
|
|
93
93
|
function handleClickInternalMenuItemNav(url) {
|
|
94
94
|
dispatch({ type: 'INTERNAL_CLICKED', payload: { clickedURL: url } });
|
|
95
95
|
}
|
|
96
|
-
return ((0, jsx_runtime_1.jsx)(exports.BasePathContext.Provider, __assign({ value: { basePath: basePath, activeMode: state.mode, handleClickInternalMenuItemNav: handleClickInternalMenuItemNav } }, { children: colorTheme === 'transparent' ? ((0, jsx_runtime_1.jsx)(styled_components_1.ThemeProvider, __assign({ theme: __assign(__assign(__assign({}, theme), (0, theme_1.themeByGivenTone)('DARK')), { ui_menu_background: theme.ui_menu_background_transparent, ui_menu_button_base: theme.ui_menu_button_base_transparent }) }, { children: (0, jsx_runtime_1.jsx)(S_DynamicDesktopNavBar, __assign({ "x-pds-name": "DynamicDesktopNavBar", "x-pds-element-type": "component", "x-pds-device-type": "desktop", isFixedWidth: isFixedWidth, isPreview: isPreview, navBarHeight: navBarHeight }, { children: (0, jsx_runtime_1.jsxs)(S_Grid, __assign({ className: "DynamicDesktopNavBarGrid", gridTemplate: gridTemplate, style: style }, { children: [(0, jsx_runtime_1.jsx)(blocks_1.BrandLogo, { to: brandLogo.href, logoSrc: brandLogo.src, fallbackText: brandLogo.text }), (0, jsx_runtime_1.jsx)(blocks_1.PrimaryMenu, { menus: slicedPrimaryMenus, showMenuAsIcon: primaryMenuOptions.showMenuAsIcon, style: primaryMenuOptions.style }), showSecondaryMenu && ((0, jsx_runtime_1.jsx)(blocks_1.SecondaryMenu, { menus: slicedSecondaryMenus, showMenuAsIcon: secondaryMenuOptions.showMenuAsIcon, style: secondaryMenuOptions.style })), (0, jsx_runtime_1.jsx)(blocks_1.UserProfile, { ref: profileArea, src: userProfile.src, to: userProfile.href, leftIconButton: userProfile.leftIconButton, overrideUserProfile: userProfile.overrideUserProfile, style: userProfileOptions.style })] })) })) }))) : ((0, jsx_runtime_1.jsx)(S_DynamicDesktopNavBar, __assign({ "x-pds-name": "DynamicDesktopNavBar", "x-pds-element-type": "component", "x-pds-device-type": "desktop", isPreview: isPreview, isFixedWidth: isFixedWidth, navBarHeight: navBarHeight }, { children: (0, jsx_runtime_1.jsxs)(S_Grid, __assign({ className: "DynamicDesktopNavBarGrid", gridTemplate: gridTemplate, style: style }, { children: [(0, jsx_runtime_1.jsx)(blocks_1.BrandLogo, { to: brandLogo.href, logoSrc: brandLogo.src, fallbackText: brandLogo.text }), (0, jsx_runtime_1.jsx)(blocks_1.PrimaryMenu, { menus: slicedPrimaryMenus, showMenuAsIcon: primaryMenuOptions.showMenuAsIcon, style: primaryMenuOptions.style }), showSecondaryMenu && ((0, jsx_runtime_1.jsx)(blocks_1.SecondaryMenu, { menus: slicedSecondaryMenus, showMenuAsIcon: secondaryMenuOptions.showMenuAsIcon, style: secondaryMenuOptions.style })), (0, jsx_runtime_1.jsx)(blocks_1.UserProfile, { ref: profileArea, src: userProfile.src, to: userProfile.href, leftIconButton: userProfile.leftIconButton, overrideUserProfile: userProfile.overrideUserProfile, style: userProfileOptions.style })] })) }))) })));
|
|
96
|
+
return ((0, jsx_runtime_1.jsx)(exports.BasePathContext.Provider, __assign({ value: { basePath: basePath, activeMode: state.mode, handleClickInternalMenuItemNav: handleClickInternalMenuItemNav } }, { children: colorTheme === 'transparent' ? ((0, jsx_runtime_1.jsx)(styled_components_1.ThemeProvider, __assign({ theme: __assign(__assign(__assign({}, theme), (0, theme_1.themeByGivenTone)('DARK')), { ui_menu_background: theme.ui_menu_background_transparent, ui_menu_button_base: theme.ui_menu_button_base_transparent }) }, { children: (0, jsx_runtime_1.jsx)(S_DynamicDesktopNavBar, __assign({ "x-pds-name": "DynamicDesktopNavBar", "x-pds-element-type": "component", "x-pds-device-type": "desktop", isFixedWidth: isFixedWidth, isPreview: isPreview, navBarHeight: navBarHeight }, { children: (0, jsx_runtime_1.jsxs)(S_Grid, __assign({ className: "DynamicDesktopNavBarGrid", gridTemplate: gridTemplate, style: style }, { children: [(0, jsx_runtime_1.jsx)(blocks_1.BrandLogo, { to: brandLogo.href, logoSrc: brandLogo.src, fallbackText: brandLogo.text, isCenteredLogo: isCenteredLogo }), (0, jsx_runtime_1.jsx)(blocks_1.PrimaryMenu, { menus: slicedPrimaryMenus, showMenuAsIcon: primaryMenuOptions.showMenuAsIcon, style: primaryMenuOptions.style }), showSecondaryMenu && ((0, jsx_runtime_1.jsx)(blocks_1.SecondaryMenu, { menus: slicedSecondaryMenus, showMenuAsIcon: secondaryMenuOptions.showMenuAsIcon, style: secondaryMenuOptions.style })), (0, jsx_runtime_1.jsx)(blocks_1.UserProfile, { ref: profileArea, src: userProfile.src, to: userProfile.href, leftIconButton: userProfile.leftIconButton, overrideUserProfile: userProfile.overrideUserProfile, style: userProfileOptions.style })] })) })) }))) : ((0, jsx_runtime_1.jsx)(S_DynamicDesktopNavBar, __assign({ "x-pds-name": "DynamicDesktopNavBar", "x-pds-element-type": "component", "x-pds-device-type": "desktop", isPreview: isPreview, isFixedWidth: isFixedWidth, navBarHeight: navBarHeight }, { children: (0, jsx_runtime_1.jsxs)(S_Grid, __assign({ className: "DynamicDesktopNavBarGrid", gridTemplate: gridTemplate, style: style }, { children: [(0, jsx_runtime_1.jsx)(blocks_1.BrandLogo, { to: brandLogo.href, logoSrc: brandLogo.src, fallbackText: brandLogo.text, isCenteredLogo: isCenteredLogo }), (0, jsx_runtime_1.jsx)(blocks_1.PrimaryMenu, { menus: slicedPrimaryMenus, showMenuAsIcon: primaryMenuOptions.showMenuAsIcon, style: primaryMenuOptions.style }), showSecondaryMenu && ((0, jsx_runtime_1.jsx)(blocks_1.SecondaryMenu, { menus: slicedSecondaryMenus, showMenuAsIcon: secondaryMenuOptions.showMenuAsIcon, style: secondaryMenuOptions.style })), (0, jsx_runtime_1.jsx)(blocks_1.UserProfile, { ref: profileArea, src: userProfile.src, to: userProfile.href, leftIconButton: userProfile.leftIconButton, overrideUserProfile: userProfile.overrideUserProfile, style: userProfileOptions.style })] })) }))) })));
|
|
97
97
|
}
|
|
98
98
|
var S_Grid = (0, styled_components_1.default)(BoxLayout_1.Grid)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n align-items: center;\n grid-column-gap: 24px;\n justify-items: center;\n padding-left: ", ";\n padding-right: ", ";\n"], ["\n align-items: center;\n grid-column-gap: 24px;\n justify-items: center;\n padding-left: ", ";\n padding-right: ", ";\n"])), function (_a) {
|
|
99
99
|
var theme = _a.theme;
|
|
@@ -4,7 +4,8 @@ type Props = {
|
|
|
4
4
|
to: string;
|
|
5
5
|
logoSrc: string;
|
|
6
6
|
fallbackText: string;
|
|
7
|
+
isCenteredLogo: boolean;
|
|
7
8
|
style?: CSSProperties;
|
|
8
9
|
};
|
|
9
|
-
declare function BrandLogo({ to, logoSrc, fallbackText, style }: Props): JSX.Element;
|
|
10
|
+
declare function BrandLogo({ to, logoSrc, fallbackText, isCenteredLogo, style }: Props): JSX.Element;
|
|
10
11
|
export default BrandLogo;
|
|
@@ -22,8 +22,8 @@ var jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
22
22
|
var styled_components_1 = __importDefault(require("styled-components"));
|
|
23
23
|
var LogoNav_1 = __importDefault(require("../components/LogoNav"));
|
|
24
24
|
function BrandLogo(_a) {
|
|
25
|
-
var to = _a.to, logoSrc = _a.logoSrc, fallbackText = _a.fallbackText, style = _a.style;
|
|
26
|
-
return ((0, jsx_runtime_1.jsx)(S_BrandLogo, __assign({ style: style }, { children: (0, jsx_runtime_1.jsx)(LogoNav_1.default, { to: to, logoSrc: logoSrc, fallbackText: fallbackText }) })));
|
|
25
|
+
var to = _a.to, logoSrc = _a.logoSrc, fallbackText = _a.fallbackText, isCenteredLogo = _a.isCenteredLogo, style = _a.style;
|
|
26
|
+
return ((0, jsx_runtime_1.jsx)(S_BrandLogo, __assign({ style: style }, { children: (0, jsx_runtime_1.jsx)(LogoNav_1.default, { to: to, logoSrc: logoSrc, fallbackText: fallbackText, isCenteredLogo: isCenteredLogo }) })));
|
|
27
27
|
}
|
|
28
28
|
var S_BrandLogo = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: flex;\n grid-area: BRAND_LOGO;\n"], ["\n display: flex;\n grid-area: BRAND_LOGO;\n"])));
|
|
29
29
|
exports.default = BrandLogo;
|
|
@@ -3,6 +3,7 @@ type Props = {
|
|
|
3
3
|
to: string;
|
|
4
4
|
logoSrc: string;
|
|
5
5
|
fallbackText: string;
|
|
6
|
+
isCenteredLogo: boolean;
|
|
6
7
|
};
|
|
7
|
-
declare function LogoNav({ to, logoSrc, fallbackText }: Props): JSX.Element;
|
|
8
|
+
declare function LogoNav({ to, logoSrc, fallbackText, isCenteredLogo }: Props): JSX.Element;
|
|
8
9
|
export default LogoNav;
|
|
@@ -23,10 +23,19 @@ var styled_components_1 = __importDefault(require("styled-components"));
|
|
|
23
23
|
var __1 = require("../../..");
|
|
24
24
|
var NavLink_1 = __importDefault(require("../../../../common/components/Navigations/NavLink"));
|
|
25
25
|
function LogoNav(_a) {
|
|
26
|
-
var to = _a.to, logoSrc = _a.logoSrc, fallbackText = _a.fallbackText;
|
|
27
|
-
return ((0, jsx_runtime_1.jsx)(NavLink_1.default, __assign({ to: to }, { children: (0, jsx_runtime_1.jsx)(S_Box, { children: logoSrc ? ((0, jsx_runtime_1.jsx)(S_Logo, { src: logoSrc })) : ((0, jsx_runtime_1.jsx)(__1.D_TextLabel, { text: fallbackText, styleTheme: "headingBold", ellipsisMode: "use", lineLimit: 1 })) }) })));
|
|
26
|
+
var to = _a.to, logoSrc = _a.logoSrc, fallbackText = _a.fallbackText, isCenteredLogo = _a.isCenteredLogo;
|
|
27
|
+
return ((0, jsx_runtime_1.jsx)(NavLink_1.default, __assign({ to: to }, { children: (0, jsx_runtime_1.jsx)(S_Box, __assign({ isCenteredLogo: isCenteredLogo }, { children: logoSrc ? ((0, jsx_runtime_1.jsx)(S_Logo, { src: logoSrc })) : ((0, jsx_runtime_1.jsx)(__1.D_TextLabel, { text: fallbackText, styleTheme: "headingBold", ellipsisMode: "use", lineLimit: 1 })) })) })));
|
|
28
28
|
}
|
|
29
|
-
var S_Box = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n align-items: center;\n display: flex;\n height: 48px;\n width:
|
|
29
|
+
var S_Box = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n align-items: center;\n display: flex;\n height: 48px;\n justify-content: ", ";\n max-width: ", ";\n width: ", ";\n"], ["\n align-items: center;\n display: flex;\n height: 48px;\n justify-content: ", ";\n max-width: ", ";\n width: ", ";\n"])), function (_a) {
|
|
30
|
+
var isCenteredLogo = _a.isCenteredLogo;
|
|
31
|
+
return isCenteredLogo && 'center';
|
|
32
|
+
}, function (_a) {
|
|
33
|
+
var isCenteredLogo = _a.isCenteredLogo;
|
|
34
|
+
return isCenteredLogo && '180px';
|
|
35
|
+
}, function (_a) {
|
|
36
|
+
var isCenteredLogo = _a.isCenteredLogo;
|
|
37
|
+
return (isCenteredLogo ? 'max-content' : '180px');
|
|
38
|
+
});
|
|
30
39
|
var S_Logo = styled_components_1.default.img(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n max-height: 100%;\n max-width: 100%;\n object-fit: contain;\n object-position: left;\n"], ["\n max-height: 100%;\n max-width: 100%;\n object-fit: contain;\n object-position: left;\n"])));
|
|
31
40
|
exports.default = LogoNav;
|
|
32
41
|
var templateObject_1, templateObject_2;
|
|
@@ -230,7 +230,7 @@ exports.TEMPLATES_DATA = {
|
|
|
230
230
|
W1_0011: {
|
|
231
231
|
gridTemplate: 'PRIMARY_MENU BRAND_LOGO SECONDARY_MENU USER_PROFILE',
|
|
232
232
|
gridStyle: {
|
|
233
|
-
gridTemplateColumns: '1fr
|
|
233
|
+
gridTemplateColumns: '1fr min-content 1fr min-content'
|
|
234
234
|
},
|
|
235
235
|
showSecondaryMenu: true,
|
|
236
236
|
primaryMenuOptions: {
|
package/package.json
CHANGED
package/release-note.md
CHANGED