@mailstep/design-system 0.7.66 → 0.7.67
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/package.json +1 -1
- package/ui/Blocks/Header/index.d.ts +2 -1
- package/ui/Blocks/Header/index.js +2 -2
- package/ui/Blocks/Header/stories/Header.stories.d.ts +1 -0
- package/ui/Elements/Icon/icons/FlagHU.d.ts +3 -0
- package/ui/Elements/Icon/icons/FlagHU.js +13 -0
- package/ui/Elements/Icon/icons/FlagNL.d.ts +3 -0
- package/ui/Elements/Icon/icons/FlagNL.js +13 -0
- package/ui/Elements/Icon/icons/index.d.ts +2 -0
- package/ui/Elements/Icon/icons/index.js +2 -0
- package/ui/index.es.js +1434 -1424
- package/ui/index.umd.js +328 -328
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type FC } from 'react';
|
|
2
2
|
import type { Brand, Variant } from '../../Elements/Logo';
|
|
3
|
-
import { LanguageItem } from '../LanguageSwitch';
|
|
3
|
+
import { type LanguageItem } from '../LanguageSwitch';
|
|
4
4
|
import type { MenuItemType } from '../SideMenu/types';
|
|
5
5
|
import type { User } from './types';
|
|
6
6
|
type Props = {
|
|
@@ -20,6 +20,7 @@ type Props = {
|
|
|
20
20
|
onOpenMobileSideMenu?: () => void;
|
|
21
21
|
onChangeLanguage?: (language: string) => void;
|
|
22
22
|
onLogout?: () => void;
|
|
23
|
+
withLanguageSwitch?: boolean;
|
|
23
24
|
};
|
|
24
25
|
export declare const Header: FC<Props>;
|
|
25
26
|
export {};
|
|
@@ -9,7 +9,7 @@ import { useChangeLanguage } from './hooks/useChangeLanguage';
|
|
|
9
9
|
import { languageItems as defaultLanguageItems } from './utils/languageItems';
|
|
10
10
|
import { Container, LeftSide, RightSide, LanguageWrapper } from './styles';
|
|
11
11
|
export var Header = function (_a) {
|
|
12
|
-
var isMobileMenuOpen = _a.isMobileMenuOpen, homeLink = _a.homeLink, logo = _a.logo, logoVariant = _a.logoVariant, logoSrc = _a.logoSrc, logoSrcWidth = _a.logoSrcWidth, user = _a.user, currentLanguage = _a.currentLanguage, _b = _a.hasUserMenu, hasUserMenu = _b === void 0 ? false : _b, rightMenuItems = _a.rightMenuItems, showLanguageWithTitle = _a.showLanguageWithTitle, languageFlagWrapBackgroundColor = _a.languageFlagWrapBackgroundColor, _c = _a.languageItems, languageItems = _c === void 0 ? defaultLanguageItems : _c, onOpenMobileSideMenu = _a.onOpenMobileSideMenu, onChangeLanguage = _a.onChangeLanguage, onLogout = _a.onLogout;
|
|
12
|
+
var isMobileMenuOpen = _a.isMobileMenuOpen, homeLink = _a.homeLink, logo = _a.logo, logoVariant = _a.logoVariant, logoSrc = _a.logoSrc, logoSrcWidth = _a.logoSrcWidth, user = _a.user, currentLanguage = _a.currentLanguage, _b = _a.hasUserMenu, hasUserMenu = _b === void 0 ? false : _b, rightMenuItems = _a.rightMenuItems, showLanguageWithTitle = _a.showLanguageWithTitle, languageFlagWrapBackgroundColor = _a.languageFlagWrapBackgroundColor, _c = _a.languageItems, languageItems = _c === void 0 ? defaultLanguageItems : _c, _d = _a.withLanguageSwitch, withLanguageSwitch = _d === void 0 ? true : _d, onOpenMobileSideMenu = _a.onOpenMobileSideMenu, onChangeLanguage = _a.onChangeLanguage, onLogout = _a.onLogout;
|
|
13
13
|
var handleChangeLanguage = useChangeLanguage({ onChangeLanguage: onChangeLanguage }).handleChangeLanguage;
|
|
14
|
-
return (_jsxs(Container, { children: [_jsxs(LeftSide, { children: [onOpenMobileSideMenu && _jsx(HamburgerMenuButton, { isLeftMenuOpen: isMobileMenuOpen, onClick: onOpenMobileSideMenu }), _jsx(Link, { to: homeLink, children: logoSrc ? (_jsx("img", { src: logoSrc, alt: "logo", width: logoSrcWidth })) : (_jsx(Logo, { brand: logo, variant: logoVariant, width: "145px" })) })] }), _jsxs(RightSide, { children: [Array.isArray(rightMenuItems) && (rightMenuItems === null || rightMenuItems === void 0 ? void 0 : rightMenuItems.length) > 0 && _jsx(MenuItems, { items: rightMenuItems }), _jsx(LanguageWrapper, { children: _jsx(LanguageSwitch, { languageItems: languageItems, withTitle: showLanguageWithTitle, onLanguageChange: handleChangeLanguage, activeLanguage: currentLanguage, languageFlagWrapBackgroundColor: languageFlagWrapBackgroundColor }) }), hasUserMenu && _jsx(UserMenu, { user: user, onLogout: onLogout })] })] }));
|
|
14
|
+
return (_jsxs(Container, { children: [_jsxs(LeftSide, { children: [onOpenMobileSideMenu && _jsx(HamburgerMenuButton, { isLeftMenuOpen: isMobileMenuOpen, onClick: onOpenMobileSideMenu }), _jsx(Link, { to: homeLink, children: logoSrc ? (_jsx("img", { src: logoSrc, alt: "logo", width: logoSrcWidth })) : (logo && _jsx(Logo, { brand: logo, variant: logoVariant, width: "145px" })) })] }), _jsxs(RightSide, { children: [Array.isArray(rightMenuItems) && (rightMenuItems === null || rightMenuItems === void 0 ? void 0 : rightMenuItems.length) > 0 && _jsx(MenuItems, { items: rightMenuItems }), withLanguageSwitch && (_jsx(LanguageWrapper, { children: _jsx(LanguageSwitch, { languageItems: languageItems, withTitle: showLanguageWithTitle, onLanguageChange: handleChangeLanguage, activeLanguage: currentLanguage, languageFlagWrapBackgroundColor: languageFlagWrapBackgroundColor }) })), hasUserMenu && _jsx(UserMenu, { user: user, onLogout: onLogout })] })] }));
|
|
15
15
|
};
|
|
@@ -18,6 +18,7 @@ declare const meta: {
|
|
|
18
18
|
onOpenMobileSideMenu?: (() => void) | undefined;
|
|
19
19
|
onChangeLanguage?: ((language: string) => void) | undefined;
|
|
20
20
|
onLogout?: (() => void) | undefined;
|
|
21
|
+
withLanguageSwitch?: boolean | undefined;
|
|
21
22
|
}>;
|
|
22
23
|
tags: string[];
|
|
23
24
|
argTypes: {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
+
export var FlagHU = function (props) { return (_jsxs("svg", __assign({ width: "28", height: "20" }, props, { children: [_jsx("path", { d: "M0 0h1200v600H0", fill: "#477050" }), _jsx("path", { d: "M0 0h1200v400H0", fill: "#fff" }), _jsx("path", { d: "M0 0h1200v200H0", fill: "#ce2939" })] }))); };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
+
export var FlagNL = function (props) { return (_jsxs("svg", __assign({ width: "28", height: "20", viewBox: "0 0 9 6" }, props, { children: [_jsx("rect", { fill: "#21468B", width: "9", height: "6" }), _jsx("rect", { fill: "#FFF", width: "9", height: "4" }), _jsx("rect", { fill: "#AE1C28", width: "9", height: "2" })] }))); };
|
|
@@ -6,6 +6,8 @@ export { FlagESP } from './FlagESP';
|
|
|
6
6
|
export { FlagITA } from './FlagITA';
|
|
7
7
|
export { FlagRUS } from './FlagRUS';
|
|
8
8
|
export { FlagSVK } from './FlagSVK';
|
|
9
|
+
export { FlagNL } from './FlagNL';
|
|
10
|
+
export { FlagHU } from './FlagHU';
|
|
9
11
|
export { FlagUK } from './FlagUK';
|
|
10
12
|
export { Complaint } from './Complaint';
|
|
11
13
|
export { Expeditions } from './Expeditions';
|
|
@@ -6,6 +6,8 @@ export { FlagESP } from './FlagESP';
|
|
|
6
6
|
export { FlagITA } from './FlagITA';
|
|
7
7
|
export { FlagRUS } from './FlagRUS';
|
|
8
8
|
export { FlagSVK } from './FlagSVK';
|
|
9
|
+
export { FlagNL } from './FlagNL';
|
|
10
|
+
export { FlagHU } from './FlagHU';
|
|
9
11
|
export { FlagUK } from './FlagUK';
|
|
10
12
|
export { Complaint } from './Complaint';
|
|
11
13
|
export { Expeditions } from './Expeditions';
|