@citygross/components 0.8.49 → 0.8.50
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/build/@types/components/HeaderLinkNew/HeaderLink.styles.d.ts +5 -0
- package/build/@types/components/HeaderLinkNew/HeaderLinkNew.d.ts +6 -0
- package/build/@types/components/HeaderNew/Header.css.d.ts +5 -0
- package/build/@types/components/HeaderNew/HeaderNew.d.ts +9 -0
- package/build/@types/index.d.ts +2 -0
- package/build/cjs/components/src/components/AddressBlock/AddressBlock.js +5 -3
- package/build/cjs/components/src/components/AddressBlock/AddressBlock.js.map +1 -1
- package/build/cjs/components/src/components/HeaderLinkNew/HeaderLink.styles.js +67 -0
- package/build/cjs/components/src/components/HeaderLinkNew/HeaderLink.styles.js.map +1 -0
- package/build/cjs/components/src/components/HeaderLinkNew/HeaderLinkNew.js +25 -0
- package/build/cjs/components/src/components/HeaderLinkNew/HeaderLinkNew.js.map +1 -0
- package/build/cjs/components/src/components/HeaderNew/Header.css.js +44 -0
- package/build/cjs/components/src/components/HeaderNew/Header.css.js.map +1 -0
- package/build/cjs/components/src/components/HeaderNew/HeaderNew.js +37 -0
- package/build/cjs/components/src/components/HeaderNew/HeaderNew.js.map +1 -0
- package/build/cjs/components/src/components/WarningLabel/WarningLabel.js +5 -3
- package/build/cjs/components/src/components/WarningLabel/WarningLabel.js.map +1 -1
- package/build/cjs/components/src/index.js +4 -0
- package/build/cjs/components/src/index.js.map +1 -1
- package/build/es/components/src/components/AddressBlock/AddressBlock.js +5 -3
- package/build/es/components/src/components/AddressBlock/AddressBlock.js.map +1 -1
- package/build/es/components/src/components/HeaderLinkNew/HeaderLink.styles.js +56 -0
- package/build/es/components/src/components/HeaderLinkNew/HeaderLink.styles.js.map +1 -0
- package/build/es/components/src/components/HeaderLinkNew/HeaderLinkNew.js +17 -0
- package/build/es/components/src/components/HeaderLinkNew/HeaderLinkNew.js.map +1 -0
- package/build/es/components/src/components/HeaderNew/Header.css.js +36 -0
- package/build/es/components/src/components/HeaderNew/Header.css.js.map +1 -0
- package/build/es/components/src/components/HeaderNew/HeaderNew.js +29 -0
- package/build/es/components/src/components/HeaderNew/HeaderNew.js.map +1 -0
- package/build/es/components/src/components/WarningLabel/WarningLabel.js +5 -3
- package/build/es/components/src/components/WarningLabel/WarningLabel.js.map +1 -1
- package/build/es/components/src/index.js +2 -0
- package/build/es/components/src/index.js.map +1 -1
- package/package.json +3 -3
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { Link } from '../Links/Link';
|
|
2
|
+
export declare const HeaderLinkContainer: import("styled-components").StyledComponent<typeof Link, import("styled-components").DefaultTheme, {}, never>;
|
|
3
|
+
export declare const Content: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
4
|
+
export declare const IconContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
5
|
+
export declare const TextContainer: import("styled-components").StyledComponent<"span", import("styled-components").DefaultTheme, {}, never>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export declare type THeaderNew = {
|
|
3
|
+
btnLabel?: string;
|
|
4
|
+
btnOnClick?: () => void;
|
|
5
|
+
children?: ReactNode;
|
|
6
|
+
headerLinkHref?: string;
|
|
7
|
+
headerLinkLabel?: string;
|
|
8
|
+
};
|
|
9
|
+
export declare const HeaderNew: ({ btnLabel, btnOnClick, children, headerLinkHref, headerLinkLabel }: THeaderNew) => JSX.Element;
|
package/build/@types/index.d.ts
CHANGED
|
@@ -30,6 +30,8 @@ export * from './components/FormGroup/FormGroup';
|
|
|
30
30
|
export * from './components/GridContainer/GridContainer';
|
|
31
31
|
export * from './components/HighlightBox/HighlightBox';
|
|
32
32
|
export * from './components/Header/Header';
|
|
33
|
+
export * from './components/HeaderNew/HeaderNew';
|
|
34
|
+
export * from './components/HeaderLinkNew/HeaderLinkNew';
|
|
33
35
|
export * from './components/IconToolTip/IconToolTip';
|
|
34
36
|
export * from './components/InfoTextBlock/InfoTextBlock';
|
|
35
37
|
export * from './components/LayoutBox/LayoutBox';
|
|
@@ -46,6 +46,11 @@ require('../FormElements/Switch/Switch.styles.js');
|
|
|
46
46
|
require('../FormGroup/FormGroup.styles.js');
|
|
47
47
|
require('../GridContainer/GridContainer.styles.js');
|
|
48
48
|
require('../HighlightBox/HighlightBox.styles.js');
|
|
49
|
+
require('../HeaderLinkNew/HeaderLink.styles.js');
|
|
50
|
+
require('framer-motion');
|
|
51
|
+
require('react-dom');
|
|
52
|
+
require('../SideModal/SideModal.styles.js');
|
|
53
|
+
require('../HeaderNew/Header.css.js');
|
|
49
54
|
require('../IconToolTip/IconToolTip.styles.js');
|
|
50
55
|
var Spacer = require('../Spacer/Spacer.js');
|
|
51
56
|
require('../InfoTextBlock/InfoTextBlock.styles.js');
|
|
@@ -53,7 +58,6 @@ require('../LayoutBox/LayoutBox.styles.js');
|
|
|
53
58
|
require('../ListItem/ListItem.js');
|
|
54
59
|
require('../ListItemWithRadio/ListItemWithRadio.styles.js');
|
|
55
60
|
require('../Links/Link.js');
|
|
56
|
-
require('react-dom');
|
|
57
61
|
require('../Modal/Modal.styles.js');
|
|
58
62
|
require('../RadioBox/RadioBoxItem.styles.js');
|
|
59
63
|
require('../RadioBox/RadioBoxList.styles.js');
|
|
@@ -80,8 +84,6 @@ require('styled-components');
|
|
|
80
84
|
require('../SearchBar/SearchBar.styles.js');
|
|
81
85
|
require('../Nav/Nav.styles.js');
|
|
82
86
|
require('../NavMainLink/NavMainLink.styled.js');
|
|
83
|
-
require('framer-motion');
|
|
84
|
-
require('../SideModal/SideModal.styles.js');
|
|
85
87
|
require('../IconText/IconText.styles.js');
|
|
86
88
|
require('../Dropdown/Dropdown.styles.js');
|
|
87
89
|
require('../SearchListItem/SearchListItem.styles.js');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AddressBlock.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AddressBlock.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var _tslib = require('../../../../_virtual/_tslib.js');
|
|
6
|
+
var styled = require('styled-components');
|
|
7
|
+
var Link = require('../Links/Link.js');
|
|
8
|
+
|
|
9
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
10
|
+
|
|
11
|
+
var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
|
|
12
|
+
|
|
13
|
+
var HeaderLinkContainer = styled__default["default"](Link.Link)(templateObject_1 || (templateObject_1 = _tslib.__makeTemplateObject(["\n background: ", ";\n color: ", ";\n display: block;\n padding: ", ";\n text-decoration: none;\n\n &:hover {\n color: ", ";\n }\n\n @media screen and (min-width: ", "px) {\n padding: ", ";\n }\n"], ["\n background: ", ";\n color: ", ";\n display: block;\n padding: ", ";\n text-decoration: none;\n\n &:hover {\n color: ", ";\n }\n\n @media screen and (min-width: ", "px) {\n padding: ", ";\n }\n"])), function (_a) {
|
|
14
|
+
var _b;
|
|
15
|
+
var theme = _a.theme;
|
|
16
|
+
return (_b = theme.palette) === null || _b === void 0 ? void 0 : _b.darker;
|
|
17
|
+
}, function (_a) {
|
|
18
|
+
var _b;
|
|
19
|
+
var theme = _a.theme;
|
|
20
|
+
return (_b = theme.palette) === null || _b === void 0 ? void 0 : _b.white;
|
|
21
|
+
}, function (_a) {
|
|
22
|
+
var _b, _c;
|
|
23
|
+
var theme = _a.theme;
|
|
24
|
+
return "".concat((_b = theme.spacings) === null || _b === void 0 ? void 0 : _b.xs, "px ").concat((_c = theme.spacings) === null || _c === void 0 ? void 0 : _c.xs2, "px");
|
|
25
|
+
}, function (_a) {
|
|
26
|
+
var _b;
|
|
27
|
+
var theme = _a.theme;
|
|
28
|
+
return (_b = theme.palette) === null || _b === void 0 ? void 0 : _b.white;
|
|
29
|
+
}, function (_a) {
|
|
30
|
+
var _b;
|
|
31
|
+
var theme = _a.theme;
|
|
32
|
+
return (_b = theme.breakpoints) === null || _b === void 0 ? void 0 : _b.lg;
|
|
33
|
+
}, function (_a) {
|
|
34
|
+
var _b, _c;
|
|
35
|
+
var theme = _a.theme;
|
|
36
|
+
return "".concat((_b = theme.spacings) === null || _b === void 0 ? void 0 : _b.xs, "px ").concat((_c = theme.spacings) === null || _c === void 0 ? void 0 : _c.md, "px");
|
|
37
|
+
});
|
|
38
|
+
var Content = styled__default["default"].div(templateObject_2 || (templateObject_2 = _tslib.__makeTemplateObject(["\n display: flex;\n align-items: center;\n gap: ", "px;\n margin: 0 auto;\n max-width: ", "px;\n"], ["\n display: flex;\n align-items: center;\n gap: ", "px;\n margin: 0 auto;\n max-width: ", "px;\n"])), function (_a) {
|
|
39
|
+
var _b;
|
|
40
|
+
var theme = _a.theme;
|
|
41
|
+
return (_b = theme.spacings) === null || _b === void 0 ? void 0 : _b.xs;
|
|
42
|
+
}, function (_a) {
|
|
43
|
+
var _b;
|
|
44
|
+
var theme = _a.theme;
|
|
45
|
+
return (_b = theme.constants) === null || _b === void 0 ? void 0 : _b.pageContentMaxWidth;
|
|
46
|
+
});
|
|
47
|
+
var IconContainer = styled__default["default"].div(templateObject_3 || (templateObject_3 = _tslib.__makeTemplateObject(["\n display: flex;\n align-self: center;\n"], ["\n display: flex;\n align-self: center;\n"])));
|
|
48
|
+
var TextContainer = styled__default["default"].span(templateObject_4 || (templateObject_4 = _tslib.__makeTemplateObject(["\n font-size: ", "px;\n font-weight: ", ";\n line-height: ", "px;\n"], ["\n font-size: ", "px;\n font-weight: ", ";\n line-height: ", "px;\n"])), function (_a) {
|
|
49
|
+
var _b;
|
|
50
|
+
var theme = _a.theme;
|
|
51
|
+
return (_b = theme.typography) === null || _b === void 0 ? void 0 : _b.size.s2;
|
|
52
|
+
}, function (_a) {
|
|
53
|
+
var _b;
|
|
54
|
+
var theme = _a.theme;
|
|
55
|
+
return (_b = theme.typography) === null || _b === void 0 ? void 0 : _b.weight.medium;
|
|
56
|
+
}, function (_a) {
|
|
57
|
+
var _b;
|
|
58
|
+
var theme = _a.theme;
|
|
59
|
+
return (_b = theme.typography) === null || _b === void 0 ? void 0 : _b.lineHeight.s2;
|
|
60
|
+
});
|
|
61
|
+
var templateObject_1, templateObject_2, templateObject_3, templateObject_4;
|
|
62
|
+
|
|
63
|
+
exports.Content = Content;
|
|
64
|
+
exports.HeaderLinkContainer = HeaderLinkContainer;
|
|
65
|
+
exports.IconContainer = IconContainer;
|
|
66
|
+
exports.TextContainer = TextContainer;
|
|
67
|
+
//# sourceMappingURL=HeaderLink.styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HeaderLink.styles.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var React = require('react');
|
|
6
|
+
var HeaderLink_styles = require('./HeaderLink.styles.js');
|
|
7
|
+
var icons = require('@citygross/icons');
|
|
8
|
+
var designTokens = require('@citygross/design-tokens');
|
|
9
|
+
|
|
10
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
11
|
+
|
|
12
|
+
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
13
|
+
|
|
14
|
+
var HeaderLinkNew = function (_a) {
|
|
15
|
+
var _b;
|
|
16
|
+
var _c = _a.href, href = _c === void 0 ? '/' : _c, _d = _a.label, label = _d === void 0 ? 'Tillbaka till e-handeln' : _d;
|
|
17
|
+
return (React__default["default"].createElement(HeaderLink_styles.HeaderLinkContainer, { hrefPath: href },
|
|
18
|
+
React__default["default"].createElement(HeaderLink_styles.Content, null,
|
|
19
|
+
React__default["default"].createElement(HeaderLink_styles.IconContainer, null,
|
|
20
|
+
React__default["default"].createElement(icons.Icons.ChevronLeft, { color: (_b = designTokens.theme.palette) === null || _b === void 0 ? void 0 : _b.white, width: 20, height: 20 })),
|
|
21
|
+
React__default["default"].createElement(HeaderLink_styles.TextContainer, null, label))));
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
exports.HeaderLinkNew = HeaderLinkNew;
|
|
25
|
+
//# sourceMappingURL=HeaderLinkNew.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HeaderLinkNew.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var designTokens = require('@citygross/design-tokens');
|
|
6
|
+
var css = require('@vanilla-extract/css');
|
|
7
|
+
|
|
8
|
+
var _a;
|
|
9
|
+
var wrapper = css.style({
|
|
10
|
+
position: 'relative',
|
|
11
|
+
boxShadow: '0 1px 1px 0 rgba(0, 0, 0, 0.07)'
|
|
12
|
+
});
|
|
13
|
+
var headerWrapper = css.style({
|
|
14
|
+
backgroundColor: designTokens.palette === null || designTokens.palette === void 0 ? void 0 : designTokens.palette.white,
|
|
15
|
+
margin: '0 auto',
|
|
16
|
+
maxWidth: "".concat(designTokens.constants.pageContentMaxWidth, "px"),
|
|
17
|
+
padding: designTokens.spacings.xs2,
|
|
18
|
+
'@media': (_a = {},
|
|
19
|
+
_a["screen and (min-width: ".concat(designTokens.breakpoints.lg, "px)")] = {
|
|
20
|
+
padding: "".concat(designTokens.spacings.sm2, "px ").concat(designTokens.spacings.md, "px")
|
|
21
|
+
},
|
|
22
|
+
_a)
|
|
23
|
+
});
|
|
24
|
+
var headerContainer = css.style({
|
|
25
|
+
display: 'flex',
|
|
26
|
+
justifyContent: 'space-between',
|
|
27
|
+
alignItems: 'center'
|
|
28
|
+
});
|
|
29
|
+
var menuIconContainer = css.style({
|
|
30
|
+
display: 'flex',
|
|
31
|
+
alignSelf: 'center'
|
|
32
|
+
});
|
|
33
|
+
var sideModalHeader = css.style({
|
|
34
|
+
display: 'flex',
|
|
35
|
+
justifyContent: 'space-between',
|
|
36
|
+
padding: designTokens.spacings.xs2
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
exports.headerContainer = headerContainer;
|
|
40
|
+
exports.headerWrapper = headerWrapper;
|
|
41
|
+
exports.menuIconContainer = menuIconContainer;
|
|
42
|
+
exports.sideModalHeader = sideModalHeader;
|
|
43
|
+
exports.wrapper = wrapper;
|
|
44
|
+
//# sourceMappingURL=Header.css.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Header.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var React = require('react');
|
|
6
|
+
var HeaderLinkNew = require('../HeaderLinkNew/HeaderLinkNew.js');
|
|
7
|
+
var CgButton = require('../CgButton/CgButton.js');
|
|
8
|
+
var icons = require('@citygross/icons');
|
|
9
|
+
var designTokens = require('@citygross/design-tokens');
|
|
10
|
+
var SideModal = require('../SideModal/SideModal.js');
|
|
11
|
+
var Header_css = require('./Header.css.js');
|
|
12
|
+
|
|
13
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
14
|
+
|
|
15
|
+
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
16
|
+
|
|
17
|
+
var HeaderNew = function (_a) {
|
|
18
|
+
var _b, _c;
|
|
19
|
+
var btnLabel = _a.btnLabel, btnOnClick = _a.btnOnClick, children = _a.children, headerLinkHref = _a.headerLinkHref, headerLinkLabel = _a.headerLinkLabel;
|
|
20
|
+
var _d = React.useState(false), showSideModal = _d[0], setShowSideModal = _d[1];
|
|
21
|
+
var isMobile = window.innerWidth < ((_c = (_b = designTokens.theme.breakpoints) === null || _b === void 0 ? void 0 : _b.lg) !== null && _c !== void 0 ? _c : 960);
|
|
22
|
+
return (React__default["default"].createElement("div", { className: Header_css.wrapper },
|
|
23
|
+
React__default["default"].createElement(HeaderLinkNew.HeaderLinkNew, { href: headerLinkHref, label: headerLinkLabel }),
|
|
24
|
+
React__default["default"].createElement("div", { className: Header_css.headerWrapper },
|
|
25
|
+
React__default["default"].createElement("div", { className: Header_css.headerContainer },
|
|
26
|
+
isMobile ? React__default["default"].createElement(icons.Icons.LogoFlat, null) : React__default["default"].createElement(icons.Icons.Logo, null),
|
|
27
|
+
isMobile ? (React__default["default"].createElement("div", { className: Header_css.menuIconContainer, onClick: function () { return setShowSideModal(true); } },
|
|
28
|
+
React__default["default"].createElement(icons.Icons.Menu, null))) : (btnLabel && (React__default["default"].createElement(CgButton.CgButton, { onClick: btnOnClick, variant: CgButton.EButtonVariant.secondary }, btnLabel))))),
|
|
29
|
+
showSideModal && (React__default["default"].createElement(SideModal.SideModal, { isVisible: true, onBackdropClick: function () { return setShowSideModal(false); }, slideFrom: "right" },
|
|
30
|
+
React__default["default"].createElement("div", { className: Header_css.sideModalHeader },
|
|
31
|
+
React__default["default"].createElement(icons.Icons.LogoFlat, null),
|
|
32
|
+
React__default["default"].createElement(CgButton.CgButton, { onClick: function () { return setShowSideModal(false); }, icon: React__default["default"].createElement(icons.Icons.Cross, { height: 16, width: 16 }), round: true, size: CgButton.ECgButtonSize.small, variant: CgButton.EButtonVariant.secondary })),
|
|
33
|
+
children))));
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
exports.HeaderNew = HeaderNew;
|
|
37
|
+
//# sourceMappingURL=HeaderNew.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HeaderNew.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -46,6 +46,11 @@ require('../FormElements/Switch/Switch.styles.js');
|
|
|
46
46
|
require('../FormGroup/FormGroup.styles.js');
|
|
47
47
|
require('../GridContainer/GridContainer.styles.js');
|
|
48
48
|
require('../HighlightBox/HighlightBox.styles.js');
|
|
49
|
+
require('../HeaderLinkNew/HeaderLink.styles.js');
|
|
50
|
+
require('framer-motion');
|
|
51
|
+
require('react-dom');
|
|
52
|
+
require('../SideModal/SideModal.styles.js');
|
|
53
|
+
require('../HeaderNew/Header.css.js');
|
|
49
54
|
require('../IconToolTip/IconToolTip.styles.js');
|
|
50
55
|
require('../Spacer/Spacer.styles.js');
|
|
51
56
|
require('../InfoTextBlock/InfoTextBlock.styles.js');
|
|
@@ -53,7 +58,6 @@ require('../LayoutBox/LayoutBox.styles.js');
|
|
|
53
58
|
require('../ListItem/ListItem.js');
|
|
54
59
|
require('../ListItemWithRadio/ListItemWithRadio.styles.js');
|
|
55
60
|
require('../Links/Link.js');
|
|
56
|
-
require('react-dom');
|
|
57
61
|
require('../Modal/Modal.styles.js');
|
|
58
62
|
require('../RadioBox/RadioBoxItem.styles.js');
|
|
59
63
|
require('../RadioBox/RadioBoxList.styles.js');
|
|
@@ -80,8 +84,6 @@ require('styled-components');
|
|
|
80
84
|
require('../SearchBar/SearchBar.styles.js');
|
|
81
85
|
require('../Nav/Nav.styles.js');
|
|
82
86
|
require('../NavMainLink/NavMainLink.styled.js');
|
|
83
|
-
require('framer-motion');
|
|
84
|
-
require('../SideModal/SideModal.styles.js');
|
|
85
87
|
require('../IconText/IconText.styles.js');
|
|
86
88
|
require('../Dropdown/Dropdown.styles.js');
|
|
87
89
|
require('../SearchListItem/SearchListItem.styles.js');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WarningLabel.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"WarningLabel.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -36,6 +36,8 @@ var Switch = require('./components/FormElements/Switch/Switch.js');
|
|
|
36
36
|
var FormGroup = require('./components/FormGroup/FormGroup.js');
|
|
37
37
|
var GridContainer = require('./components/GridContainer/GridContainer.js');
|
|
38
38
|
var HighlightBox = require('./components/HighlightBox/HighlightBox.js');
|
|
39
|
+
var HeaderNew = require('./components/HeaderNew/HeaderNew.js');
|
|
40
|
+
var HeaderLinkNew = require('./components/HeaderLinkNew/HeaderLinkNew.js');
|
|
39
41
|
var IconToolTip = require('./components/IconToolTip/IconToolTip.js');
|
|
40
42
|
var InfoTextBlock = require('./components/InfoTextBlock/InfoTextBlock.js');
|
|
41
43
|
var LayoutBox = require('./components/LayoutBox/LayoutBox.js');
|
|
@@ -138,6 +140,8 @@ exports.Switch = Switch.Switch;
|
|
|
138
140
|
exports.FormGroup = FormGroup.FormGroup;
|
|
139
141
|
exports.GridContainer = GridContainer.GridContainer;
|
|
140
142
|
exports.HighlightBox = HighlightBox.HighlightBox;
|
|
143
|
+
exports.HeaderNew = HeaderNew.HeaderNew;
|
|
144
|
+
exports.HeaderLinkNew = HeaderLinkNew.HeaderLinkNew;
|
|
141
145
|
exports.IconToolTip = IconToolTip.IconToolTip;
|
|
142
146
|
exports.InfoWithButtonBlock = InfoTextBlock.InfoWithButtonBlock;
|
|
143
147
|
exports.LayoutBox = LayoutBox.LayoutBox;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -42,6 +42,11 @@ import '../FormElements/Switch/Switch.styles.js';
|
|
|
42
42
|
import '../FormGroup/FormGroup.styles.js';
|
|
43
43
|
import '../GridContainer/GridContainer.styles.js';
|
|
44
44
|
import '../HighlightBox/HighlightBox.styles.js';
|
|
45
|
+
import '../HeaderLinkNew/HeaderLink.styles.js';
|
|
46
|
+
import 'framer-motion';
|
|
47
|
+
import 'react-dom';
|
|
48
|
+
import '../SideModal/SideModal.styles.js';
|
|
49
|
+
import '../HeaderNew/Header.css.js';
|
|
45
50
|
import '../IconToolTip/IconToolTip.styles.js';
|
|
46
51
|
import { Spacer } from '../Spacer/Spacer.js';
|
|
47
52
|
import '../InfoTextBlock/InfoTextBlock.styles.js';
|
|
@@ -49,7 +54,6 @@ import '../LayoutBox/LayoutBox.styles.js';
|
|
|
49
54
|
import '../ListItem/ListItem.js';
|
|
50
55
|
import '../ListItemWithRadio/ListItemWithRadio.styles.js';
|
|
51
56
|
import '../Links/Link.js';
|
|
52
|
-
import 'react-dom';
|
|
53
57
|
import '../Modal/Modal.styles.js';
|
|
54
58
|
import '../RadioBox/RadioBoxItem.styles.js';
|
|
55
59
|
import '../RadioBox/RadioBoxList.styles.js';
|
|
@@ -76,8 +80,6 @@ import 'styled-components';
|
|
|
76
80
|
import '../SearchBar/SearchBar.styles.js';
|
|
77
81
|
import '../Nav/Nav.styles.js';
|
|
78
82
|
import '../NavMainLink/NavMainLink.styled.js';
|
|
79
|
-
import 'framer-motion';
|
|
80
|
-
import '../SideModal/SideModal.styles.js';
|
|
81
83
|
import '../IconText/IconText.styles.js';
|
|
82
84
|
import '../Dropdown/Dropdown.styles.js';
|
|
83
85
|
import '../SearchListItem/SearchListItem.styles.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AddressBlock.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AddressBlock.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { __makeTemplateObject } from '../../../../_virtual/_tslib.js';
|
|
2
|
+
import styled from 'styled-components';
|
|
3
|
+
import { Link } from '../Links/Link.js';
|
|
4
|
+
|
|
5
|
+
var HeaderLinkContainer = styled(Link)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n background: ", ";\n color: ", ";\n display: block;\n padding: ", ";\n text-decoration: none;\n\n &:hover {\n color: ", ";\n }\n\n @media screen and (min-width: ", "px) {\n padding: ", ";\n }\n"], ["\n background: ", ";\n color: ", ";\n display: block;\n padding: ", ";\n text-decoration: none;\n\n &:hover {\n color: ", ";\n }\n\n @media screen and (min-width: ", "px) {\n padding: ", ";\n }\n"])), function (_a) {
|
|
6
|
+
var _b;
|
|
7
|
+
var theme = _a.theme;
|
|
8
|
+
return (_b = theme.palette) === null || _b === void 0 ? void 0 : _b.darker;
|
|
9
|
+
}, function (_a) {
|
|
10
|
+
var _b;
|
|
11
|
+
var theme = _a.theme;
|
|
12
|
+
return (_b = theme.palette) === null || _b === void 0 ? void 0 : _b.white;
|
|
13
|
+
}, function (_a) {
|
|
14
|
+
var _b, _c;
|
|
15
|
+
var theme = _a.theme;
|
|
16
|
+
return "".concat((_b = theme.spacings) === null || _b === void 0 ? void 0 : _b.xs, "px ").concat((_c = theme.spacings) === null || _c === void 0 ? void 0 : _c.xs2, "px");
|
|
17
|
+
}, function (_a) {
|
|
18
|
+
var _b;
|
|
19
|
+
var theme = _a.theme;
|
|
20
|
+
return (_b = theme.palette) === null || _b === void 0 ? void 0 : _b.white;
|
|
21
|
+
}, function (_a) {
|
|
22
|
+
var _b;
|
|
23
|
+
var theme = _a.theme;
|
|
24
|
+
return (_b = theme.breakpoints) === null || _b === void 0 ? void 0 : _b.lg;
|
|
25
|
+
}, function (_a) {
|
|
26
|
+
var _b, _c;
|
|
27
|
+
var theme = _a.theme;
|
|
28
|
+
return "".concat((_b = theme.spacings) === null || _b === void 0 ? void 0 : _b.xs, "px ").concat((_c = theme.spacings) === null || _c === void 0 ? void 0 : _c.md, "px");
|
|
29
|
+
});
|
|
30
|
+
var Content = styled.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n gap: ", "px;\n margin: 0 auto;\n max-width: ", "px;\n"], ["\n display: flex;\n align-items: center;\n gap: ", "px;\n margin: 0 auto;\n max-width: ", "px;\n"])), function (_a) {
|
|
31
|
+
var _b;
|
|
32
|
+
var theme = _a.theme;
|
|
33
|
+
return (_b = theme.spacings) === null || _b === void 0 ? void 0 : _b.xs;
|
|
34
|
+
}, function (_a) {
|
|
35
|
+
var _b;
|
|
36
|
+
var theme = _a.theme;
|
|
37
|
+
return (_b = theme.constants) === null || _b === void 0 ? void 0 : _b.pageContentMaxWidth;
|
|
38
|
+
});
|
|
39
|
+
var IconContainer = styled.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n display: flex;\n align-self: center;\n"], ["\n display: flex;\n align-self: center;\n"])));
|
|
40
|
+
var TextContainer = styled.span(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n font-size: ", "px;\n font-weight: ", ";\n line-height: ", "px;\n"], ["\n font-size: ", "px;\n font-weight: ", ";\n line-height: ", "px;\n"])), function (_a) {
|
|
41
|
+
var _b;
|
|
42
|
+
var theme = _a.theme;
|
|
43
|
+
return (_b = theme.typography) === null || _b === void 0 ? void 0 : _b.size.s2;
|
|
44
|
+
}, function (_a) {
|
|
45
|
+
var _b;
|
|
46
|
+
var theme = _a.theme;
|
|
47
|
+
return (_b = theme.typography) === null || _b === void 0 ? void 0 : _b.weight.medium;
|
|
48
|
+
}, function (_a) {
|
|
49
|
+
var _b;
|
|
50
|
+
var theme = _a.theme;
|
|
51
|
+
return (_b = theme.typography) === null || _b === void 0 ? void 0 : _b.lineHeight.s2;
|
|
52
|
+
});
|
|
53
|
+
var templateObject_1, templateObject_2, templateObject_3, templateObject_4;
|
|
54
|
+
|
|
55
|
+
export { Content, HeaderLinkContainer, IconContainer, TextContainer };
|
|
56
|
+
//# sourceMappingURL=HeaderLink.styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HeaderLink.styles.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { HeaderLinkContainer, Content, IconContainer, TextContainer } from './HeaderLink.styles.js';
|
|
3
|
+
import { Icons } from '@citygross/icons';
|
|
4
|
+
import { theme } from '@citygross/design-tokens';
|
|
5
|
+
|
|
6
|
+
var HeaderLinkNew = function (_a) {
|
|
7
|
+
var _b;
|
|
8
|
+
var _c = _a.href, href = _c === void 0 ? '/' : _c, _d = _a.label, label = _d === void 0 ? 'Tillbaka till e-handeln' : _d;
|
|
9
|
+
return (React.createElement(HeaderLinkContainer, { hrefPath: href },
|
|
10
|
+
React.createElement(Content, null,
|
|
11
|
+
React.createElement(IconContainer, null,
|
|
12
|
+
React.createElement(Icons.ChevronLeft, { color: (_b = theme.palette) === null || _b === void 0 ? void 0 : _b.white, width: 20, height: 20 })),
|
|
13
|
+
React.createElement(TextContainer, null, label))));
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export { HeaderLinkNew };
|
|
17
|
+
//# sourceMappingURL=HeaderLinkNew.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HeaderLinkNew.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { palette, constants, spacings, breakpoints } from '@citygross/design-tokens';
|
|
2
|
+
import { style } from '@vanilla-extract/css';
|
|
3
|
+
|
|
4
|
+
var _a;
|
|
5
|
+
var wrapper = style({
|
|
6
|
+
position: 'relative',
|
|
7
|
+
boxShadow: '0 1px 1px 0 rgba(0, 0, 0, 0.07)'
|
|
8
|
+
});
|
|
9
|
+
var headerWrapper = style({
|
|
10
|
+
backgroundColor: palette === null || palette === void 0 ? void 0 : palette.white,
|
|
11
|
+
margin: '0 auto',
|
|
12
|
+
maxWidth: "".concat(constants.pageContentMaxWidth, "px"),
|
|
13
|
+
padding: spacings.xs2,
|
|
14
|
+
'@media': (_a = {},
|
|
15
|
+
_a["screen and (min-width: ".concat(breakpoints.lg, "px)")] = {
|
|
16
|
+
padding: "".concat(spacings.sm2, "px ").concat(spacings.md, "px")
|
|
17
|
+
},
|
|
18
|
+
_a)
|
|
19
|
+
});
|
|
20
|
+
var headerContainer = style({
|
|
21
|
+
display: 'flex',
|
|
22
|
+
justifyContent: 'space-between',
|
|
23
|
+
alignItems: 'center'
|
|
24
|
+
});
|
|
25
|
+
var menuIconContainer = style({
|
|
26
|
+
display: 'flex',
|
|
27
|
+
alignSelf: 'center'
|
|
28
|
+
});
|
|
29
|
+
var sideModalHeader = style({
|
|
30
|
+
display: 'flex',
|
|
31
|
+
justifyContent: 'space-between',
|
|
32
|
+
padding: spacings.xs2
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
export { headerContainer, headerWrapper, menuIconContainer, sideModalHeader, wrapper };
|
|
36
|
+
//# sourceMappingURL=Header.css.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Header.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import React, { useState } from 'react';
|
|
2
|
+
import { HeaderLinkNew } from '../HeaderLinkNew/HeaderLinkNew.js';
|
|
3
|
+
import { CgButton, EButtonVariant, ECgButtonSize } from '../CgButton/CgButton.js';
|
|
4
|
+
import { Icons } from '@citygross/icons';
|
|
5
|
+
import { theme } from '@citygross/design-tokens';
|
|
6
|
+
import { SideModal } from '../SideModal/SideModal.js';
|
|
7
|
+
import { wrapper, headerWrapper, headerContainer, menuIconContainer, sideModalHeader } from './Header.css.js';
|
|
8
|
+
|
|
9
|
+
var HeaderNew = function (_a) {
|
|
10
|
+
var _b, _c;
|
|
11
|
+
var btnLabel = _a.btnLabel, btnOnClick = _a.btnOnClick, children = _a.children, headerLinkHref = _a.headerLinkHref, headerLinkLabel = _a.headerLinkLabel;
|
|
12
|
+
var _d = useState(false), showSideModal = _d[0], setShowSideModal = _d[1];
|
|
13
|
+
var isMobile = window.innerWidth < ((_c = (_b = theme.breakpoints) === null || _b === void 0 ? void 0 : _b.lg) !== null && _c !== void 0 ? _c : 960);
|
|
14
|
+
return (React.createElement("div", { className: wrapper },
|
|
15
|
+
React.createElement(HeaderLinkNew, { href: headerLinkHref, label: headerLinkLabel }),
|
|
16
|
+
React.createElement("div", { className: headerWrapper },
|
|
17
|
+
React.createElement("div", { className: headerContainer },
|
|
18
|
+
isMobile ? React.createElement(Icons.LogoFlat, null) : React.createElement(Icons.Logo, null),
|
|
19
|
+
isMobile ? (React.createElement("div", { className: menuIconContainer, onClick: function () { return setShowSideModal(true); } },
|
|
20
|
+
React.createElement(Icons.Menu, null))) : (btnLabel && (React.createElement(CgButton, { onClick: btnOnClick, variant: EButtonVariant.secondary }, btnLabel))))),
|
|
21
|
+
showSideModal && (React.createElement(SideModal, { isVisible: true, onBackdropClick: function () { return setShowSideModal(false); }, slideFrom: "right" },
|
|
22
|
+
React.createElement("div", { className: sideModalHeader },
|
|
23
|
+
React.createElement(Icons.LogoFlat, null),
|
|
24
|
+
React.createElement(CgButton, { onClick: function () { return setShowSideModal(false); }, icon: React.createElement(Icons.Cross, { height: 16, width: 16 }), round: true, size: ECgButtonSize.small, variant: EButtonVariant.secondary })),
|
|
25
|
+
children))));
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
export { HeaderNew };
|
|
29
|
+
//# sourceMappingURL=HeaderNew.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HeaderNew.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -42,6 +42,11 @@ import '../FormElements/Switch/Switch.styles.js';
|
|
|
42
42
|
import '../FormGroup/FormGroup.styles.js';
|
|
43
43
|
import '../GridContainer/GridContainer.styles.js';
|
|
44
44
|
import '../HighlightBox/HighlightBox.styles.js';
|
|
45
|
+
import '../HeaderLinkNew/HeaderLink.styles.js';
|
|
46
|
+
import 'framer-motion';
|
|
47
|
+
import 'react-dom';
|
|
48
|
+
import '../SideModal/SideModal.styles.js';
|
|
49
|
+
import '../HeaderNew/Header.css.js';
|
|
45
50
|
import '../IconToolTip/IconToolTip.styles.js';
|
|
46
51
|
import '../Spacer/Spacer.styles.js';
|
|
47
52
|
import '../InfoTextBlock/InfoTextBlock.styles.js';
|
|
@@ -49,7 +54,6 @@ import '../LayoutBox/LayoutBox.styles.js';
|
|
|
49
54
|
import '../ListItem/ListItem.js';
|
|
50
55
|
import '../ListItemWithRadio/ListItemWithRadio.styles.js';
|
|
51
56
|
import '../Links/Link.js';
|
|
52
|
-
import 'react-dom';
|
|
53
57
|
import '../Modal/Modal.styles.js';
|
|
54
58
|
import '../RadioBox/RadioBoxItem.styles.js';
|
|
55
59
|
import '../RadioBox/RadioBoxList.styles.js';
|
|
@@ -76,8 +80,6 @@ import 'styled-components';
|
|
|
76
80
|
import '../SearchBar/SearchBar.styles.js';
|
|
77
81
|
import '../Nav/Nav.styles.js';
|
|
78
82
|
import '../NavMainLink/NavMainLink.styled.js';
|
|
79
|
-
import 'framer-motion';
|
|
80
|
-
import '../SideModal/SideModal.styles.js';
|
|
81
83
|
import '../IconText/IconText.styles.js';
|
|
82
84
|
import '../Dropdown/Dropdown.styles.js';
|
|
83
85
|
import '../SearchListItem/SearchListItem.styles.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WarningLabel.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"WarningLabel.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -32,6 +32,8 @@ export { Switch } from './components/FormElements/Switch/Switch.js';
|
|
|
32
32
|
export { FormGroup } from './components/FormGroup/FormGroup.js';
|
|
33
33
|
export { GridContainer } from './components/GridContainer/GridContainer.js';
|
|
34
34
|
export { HighlightBox } from './components/HighlightBox/HighlightBox.js';
|
|
35
|
+
export { HeaderNew } from './components/HeaderNew/HeaderNew.js';
|
|
36
|
+
export { HeaderLinkNew } from './components/HeaderLinkNew/HeaderLinkNew.js';
|
|
35
37
|
export { IconToolTip } from './components/IconToolTip/IconToolTip.js';
|
|
36
38
|
export { InfoWithButtonBlock } from './components/InfoTextBlock/InfoTextBlock.js';
|
|
37
39
|
export { LayoutBox } from './components/LayoutBox/LayoutBox.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@citygross/components",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.50",
|
|
4
4
|
"license": "ISC",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "./build/cjs/components/src/index.js",
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
},
|
|
67
67
|
"dependencies": {
|
|
68
68
|
"@citygross/design-tokens": "^0.2.69",
|
|
69
|
-
"@citygross/icons": "^0.1.
|
|
69
|
+
"@citygross/icons": "^0.1.12",
|
|
70
70
|
"@citygross/react-use-bg-wizard": "^0.0.8",
|
|
71
71
|
"@citygross/typography": "^0.0.89",
|
|
72
72
|
"@citygross/utils": "^0.0.39",
|
|
@@ -76,5 +76,5 @@
|
|
|
76
76
|
"react-slick": "^0.30.1",
|
|
77
77
|
"slick-carousel": "^1.8.1"
|
|
78
78
|
},
|
|
79
|
-
"gitHead": "
|
|
79
|
+
"gitHead": "17f7a6c40f8723764a1828cac168e370a832cfc0"
|
|
80
80
|
}
|