@citygross/components 0.15.6 → 0.15.8
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/CartItemSummary/CartItemSummary.styles.d.ts +1 -1
- package/build/cjs/components/src/components/CartItemSummary/CartItemSummary.styles.js +1 -1
- package/build/cjs/components/src/components/ListItem/ListItem.styles.js +2 -2
- package/build/cjs/components/src/components/MinimalHeader/MinimalHeader.styles.js +1 -1
- package/build/cjs/components/src/components/RadioListItem/RadioListItem.styles.js +3 -2
- package/build/cjs/components/src/components/RadioListItem/RadioListItem.styles.js.map +1 -1
- package/build/cjs/components/src/components/ToolTipDialog/ToolTipDialog.styles.js +5 -1
- package/build/cjs/components/src/components/ToolTipDialog/ToolTipDialog.styles.js.map +1 -1
- package/build/cjs/utils/build/index.js +38 -3
- package/build/cjs/utils/build/index.js.map +1 -1
- package/build/es/components/src/components/CartItemSummary/CartItemSummary.styles.js +2 -2
- package/build/es/components/src/components/ListItem/ListItem.styles.js +2 -2
- package/build/es/components/src/components/MinimalHeader/MinimalHeader.styles.js +1 -1
- package/build/es/components/src/components/RadioListItem/RadioListItem.styles.js +3 -2
- package/build/es/components/src/components/RadioListItem/RadioListItem.styles.js.map +1 -1
- package/build/es/components/src/components/ToolTipDialog/ToolTipDialog.styles.js +5 -1
- package/build/es/components/src/components/ToolTipDialog/ToolTipDialog.styles.js.map +1 -1
- package/build/es/utils/build/index.js +38 -3
- package/build/es/utils/build/index.js.map +1 -1
- package/package.json +4 -4
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { __makeTemplateObject } from '../../../../_virtual/_tslib.js';
|
|
2
|
-
import {
|
|
2
|
+
import { BodyText } from '@citygross/typography';
|
|
3
3
|
import styled from 'styled-components';
|
|
4
4
|
|
|
5
5
|
var CartItemSummaryWrapper = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n gap: 20px;\n @media (min-width: ", "px) {\n flex-direction: row;\n }\n"], ["\n display: flex;\n flex-direction: column;\n gap: 20px;\n @media (min-width: ", "px) {\n flex-direction: row;\n }\n"])), function (props) { var _a; return (_a = props.theme.breakpoints) === null || _a === void 0 ? void 0 : _a.xs; });
|
|
6
6
|
var CancelledWrapper = styled.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n align-items: flex-end;\n"], ["\n display: flex;\n flex-direction: column;\n align-items: flex-end;\n"])));
|
|
7
7
|
var ItemInformationContainer = styled.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n align-items: flex-end;\n"], ["\n display: flex;\n flex-direction: column;\n align-items: flex-end;\n"])));
|
|
8
|
-
var AmountText = styled(
|
|
8
|
+
var AmountText = styled(BodyText)(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n white-space: nowrap;\n"], ["\n white-space: nowrap;\n"])));
|
|
9
9
|
var templateObject_1, templateObject_2, templateObject_3, templateObject_4;
|
|
10
10
|
|
|
11
11
|
export { AmountText, CancelledWrapper, CartItemSummaryWrapper, ItemInformationContainer };
|
|
@@ -10,7 +10,7 @@ var ListLeft = styled.div(templateObject_3 || (templateObject_3 = __makeTemplate
|
|
|
10
10
|
var ListRight = styled.div(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n display: flex;\n flex-direction: row;\n align-items: ", ";\n justify-content: space-between;\n text-align: right;\n"], ["\n display: flex;\n flex-direction: row;\n align-items: ", ";\n justify-content: space-between;\n text-align: right;\n"])), function (props) {
|
|
11
11
|
return props.alignment === EListItemAlignment.TOP ? 'flex-start' : 'center';
|
|
12
12
|
});
|
|
13
|
-
var ListImageContainer = styled.div(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n justify-content: center;\n flex-direction: row;\n width: ", "px;\n height: ", "px;\n\n @media (max-width: ", "px) {\n width: ", "px;\n height: ", "px;\n }\n"], ["\n display: flex;\n align-items: center;\n justify-content: center;\n flex-direction: row;\n width: ", "px;\n height: ", "px;\n\n @media (max-width: ", "px) {\n width: ", "px;\n height: ", "px;\n }\n"])), function (props) {
|
|
13
|
+
var ListImageContainer = styled.div(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n justify-content: center;\n flex-direction: row;\n flex-shrink: 0;\n width: ", "px;\n height: ", "px;\n\n @media (max-width: ", "px) {\n width: ", "px;\n height: ", "px;\n }\n"], ["\n display: flex;\n align-items: center;\n justify-content: center;\n flex-direction: row;\n flex-shrink: 0;\n width: ", "px;\n height: ", "px;\n\n @media (max-width: ", "px) {\n width: ", "px;\n height: ", "px;\n }\n"])), function (props) {
|
|
14
14
|
var _a, _b;
|
|
15
15
|
return (props === null || props === void 0 ? void 0 : props.isSmall)
|
|
16
16
|
? (_a = props.theme.constants) === null || _a === void 0 ? void 0 : _a.listImageMaxWidthSmall
|
|
@@ -29,7 +29,7 @@ var ListImage = styled.img(templateObject_6 || (templateObject_6 = __makeTemplat
|
|
|
29
29
|
? (_a = props.theme.constants) === null || _a === void 0 ? void 0 : _a.listImageMaxHeightSmall
|
|
30
30
|
: (_b = props.theme.constants) === null || _b === void 0 ? void 0 : _b.listImageMaxHeight, "px");
|
|
31
31
|
});
|
|
32
|
-
var CheckboxContainer = styled.div(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n display: flex;\n
|
|
32
|
+
var CheckboxContainer = styled.div(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n display: flex;\n row-gap: ", "px;\n margin-top: ", "px;\n flex-wrap: wrap;\n column-gap: ", "px;\n"], ["\n display: flex;\n row-gap: ", "px;\n margin-top: ", "px;\n flex-wrap: wrap;\n column-gap: ", "px;\n"])), function (props) { var _a; return (_a = props.theme.spacings) === null || _a === void 0 ? void 0 : _a.xs; }, function (props) { var _a; return (_a = props.theme.spacings) === null || _a === void 0 ? void 0 : _a.sm; }, function (props) { var _a; return (_a = props.theme.spacings) === null || _a === void 0 ? void 0 : _a.md; });
|
|
33
33
|
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7;
|
|
34
34
|
|
|
35
35
|
export { CheckboxContainer, ItemInformationContainer, ListImage, ListImageContainer, ListItemContainer, ListLeft, ListRight };
|
|
@@ -29,7 +29,7 @@ var HeaderContainer = styled.div(templateObject_3 || (templateObject_3 = __makeT
|
|
|
29
29
|
return (_b = theme.constants) === null || _b === void 0 ? void 0 : _b.minimalHeaderMaxWidth;
|
|
30
30
|
});
|
|
31
31
|
var LogoContainer = styled.a(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n justify-content: flex-start;\n"], ["\n display: flex;\n align-items: center;\n justify-content: flex-start;\n"])));
|
|
32
|
-
var HeaderLink = styled.a(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n color: ", ";\n font-family: ", ";\n font-size: ", "px;\n text-decoration: underline;\n\n &:focus-visible {\n outline: 2px solid ", ";\n outline-offset: 1px;\n }\n"], ["\n color: ", ";\n font-family: ", ";\n font-size: ", "px;\n text-decoration: underline;\n\n &:focus-visible {\n outline: 2px solid ", ";\n outline-offset: 1px;\n }\n"])), function (_a) {
|
|
32
|
+
var HeaderLink = styled.a(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n color: ", ";\n font-family: ", ";\n font-size: ", "px;\n text-decoration: underline;\n text-align: right;\n\n &:focus-visible {\n outline: 2px solid ", ";\n outline-offset: 1px;\n }\n"], ["\n color: ", ";\n font-family: ", ";\n font-size: ", "px;\n text-decoration: underline;\n text-align: right;\n\n &:focus-visible {\n outline: 2px solid ", ";\n outline-offset: 1px;\n }\n"])), function (_a) {
|
|
33
33
|
var _b;
|
|
34
34
|
var theme = _a.theme;
|
|
35
35
|
return (_b = theme.palette) === null || _b === void 0 ? void 0 : _b.brandBlue;
|
|
@@ -29,12 +29,13 @@ var BaseRadioListItemContainer = styled.div(templateObject_1 || (templateObject_
|
|
|
29
29
|
var BaseRadioItemLeftWrapper = styled.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n display: flex;\n flex: 5;\n align-items: flex-start;\n ", ";\n"], ["\n display: flex;\n flex: 5;\n align-items: flex-start;\n ", ";\n"])), function (props) { return props.flexGrow && "flex-grow: ".concat(props.flexGrow); });
|
|
30
30
|
var StyledH3 = styled(H3).attrs({ as: 'span' })(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n cursor: ", ";\n white-space: nowrap;\n display: block;\n line-height: ", "px;\n ", ";\n"], ["\n cursor: ", ";\n white-space: nowrap;\n display: block;\n line-height: ", "px;\n ", ";\n"])), function (props) { return (props.isDisabled ? 'not-allowed' : 'pointer'); }, function (props) { var _a; return (_a = props.theme.typography) === null || _a === void 0 ? void 0 : _a.lineHeight.m1; }, function (props) {
|
|
31
31
|
var _a;
|
|
32
|
-
return props.isDisabled &&
|
|
32
|
+
return props.isDisabled &&
|
|
33
|
+
"\n color: ".concat((_a = props.theme.palette) === null || _a === void 0 ? void 0 : _a.disabledDarkGray, ";\n text-decoration: line-through;\n ");
|
|
33
34
|
});
|
|
34
35
|
var RadioRightWrapper = styled.div(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n display: flex;\n gap: ", "px;\n justify-content: flex-end;\n text-align: right;\n font-size: ", "px;\n"], ["\n display: flex;\n gap: ", "px;\n justify-content: flex-end;\n text-align: right;\n font-size: ", "px;\n"])), function (props) { var _a; return (_a = props.theme.spacings) === null || _a === void 0 ? void 0 : _a.xs; }, function (props) { var _a; return (_a = props.theme.typography) === null || _a === void 0 ? void 0 : _a.size.s2; });
|
|
35
36
|
styled(BodyText)(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n font-size: ", "px;\n color: ", ";\n ", "\n @media (min-width: ", "px) {\n font-size: ", "px;\n text-align: inherit;\n }\n"], ["\n font-size: ", "px;\n color: ", ";\n ", "\n @media (min-width: ", "px) {\n font-size: ", "px;\n text-align: inherit;\n }\n"])), function (props) { var _a; return (_a = props.theme.typography) === null || _a === void 0 ? void 0 : _a.size.s2; }, function (props) { var _a; return (_a = props.theme.palette) === null || _a === void 0 ? void 0 : _a.darkest; }, function (props) {
|
|
36
37
|
return (props === null || props === void 0 ? void 0 : props.wrapMobile) &&
|
|
37
|
-
"\n
|
|
38
|
+
"\n text-align: left;\n ";
|
|
38
39
|
}, function (props) { var _a; return (_a = props.theme.breakpoints) === null || _a === void 0 ? void 0 : _a.xs; }, function (props) { var _a; return (_a = props.theme.typography) === null || _a === void 0 ? void 0 : _a.size.s3; });
|
|
39
40
|
var RadioFlex = styled.div(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n display: flex;\n gap: ", "px;\n ", "\n"], ["\n display: flex;\n gap: ", "px;\n ", "\n"])), function (props) { var _a; return (_a = props.theme.spacings) === null || _a === void 0 ? void 0 : _a.xs; }, function (props) {
|
|
40
41
|
var _a;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RadioListItem.styles.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RadioListItem.styles.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __makeTemplateObject } from '../../../../_virtual/_tslib.js';
|
|
2
2
|
import styled from 'styled-components';
|
|
3
3
|
|
|
4
|
-
var DialogContainer = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n background: ", ";\n border-radius: ", "px;\n color: ", ";\n display: flex;\n align-items: flex-start;\n gap: ", "px;\n font-size: ", "px;\n padding: ", "px;\n position: absolute;\n\n ", "\n"], ["\n background: ", ";\n border-radius: ", "px;\n color: ", ";\n display: flex;\n align-items: flex-start;\n gap: ", "px;\n font-size: ", "px;\n padding: ", "px;\n position: absolute;\n\n ", "\n"])), function (_a) {
|
|
4
|
+
var DialogContainer = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n background: ", ";\n border-radius: ", "px;\n color: ", ";\n display: flex;\n align-items: flex-start;\n gap: ", "px;\n font-size: ", "px;\n padding: ", "px;\n position: absolute;\n z-index: ", ";\n\n ", "\n"], ["\n background: ", ";\n border-radius: ", "px;\n color: ", ";\n display: flex;\n align-items: flex-start;\n gap: ", "px;\n font-size: ", "px;\n padding: ", "px;\n position: absolute;\n z-index: ", ";\n\n ", "\n"])), function (_a) {
|
|
5
5
|
var _b;
|
|
6
6
|
var theme = _a.theme;
|
|
7
7
|
return (_b = theme.palette) === null || _b === void 0 ? void 0 : _b.black;
|
|
@@ -25,6 +25,10 @@ var DialogContainer = styled.div(templateObject_1 || (templateObject_1 = __makeT
|
|
|
25
25
|
var _b;
|
|
26
26
|
var theme = _a.theme;
|
|
27
27
|
return (_b = theme.spacings) === null || _b === void 0 ? void 0 : _b.xs2;
|
|
28
|
+
}, function (_a) {
|
|
29
|
+
var _b;
|
|
30
|
+
var theme = _a.theme;
|
|
31
|
+
return (_b = theme.attributes) === null || _b === void 0 ? void 0 : _b.zIndex.low;
|
|
28
32
|
}, function (_a) {
|
|
29
33
|
var _b, _c;
|
|
30
34
|
var onBottom = _a.onBottom, theme = _a.theme;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ToolTipDialog.styles.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ToolTipDialog.styles.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -471,11 +471,11 @@ var makeCateringPortionsString = function (variant, cartItem, unit) {
|
|
|
471
471
|
return qString;
|
|
472
472
|
};
|
|
473
473
|
|
|
474
|
+
var focusableSelectors = 'button:not([disabled]), [href]:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])';
|
|
474
475
|
var focusTrap = function (_a) {
|
|
475
476
|
var _b;
|
|
476
477
|
var exitFunction = _a.exitFunction, ref = _a.ref;
|
|
477
|
-
var
|
|
478
|
-
var focusableElements = (_b = ref.current) === null || _b === void 0 ? void 0 : _b.querySelectorAll(elements);
|
|
478
|
+
var focusableElements = (_b = ref.current) === null || _b === void 0 ? void 0 : _b.querySelectorAll(focusableSelectors);
|
|
479
479
|
if (focusableElements &&
|
|
480
480
|
focusableElements.length > 0 &&
|
|
481
481
|
focusableElements[0] instanceof HTMLElement) {
|
|
@@ -484,7 +484,7 @@ var focusTrap = function (_a) {
|
|
|
484
484
|
var handleKeyDown = function (e) {
|
|
485
485
|
if (!ref.current)
|
|
486
486
|
return;
|
|
487
|
-
var focusable = Array.from(ref.current.querySelectorAll(
|
|
487
|
+
var focusable = Array.from(ref.current.querySelectorAll(focusableSelectors));
|
|
488
488
|
if (focusable.length === 0)
|
|
489
489
|
return;
|
|
490
490
|
var firstElement = focusable[0];
|
|
@@ -510,6 +510,39 @@ var focusTrap = function (_a) {
|
|
|
510
510
|
};
|
|
511
511
|
};
|
|
512
512
|
|
|
513
|
+
var toggleInert = function (_a) {
|
|
514
|
+
var elements = _a.elements, isInert = _a.isInert;
|
|
515
|
+
var snapshots = elements
|
|
516
|
+
.filter(function (element) { return Boolean(element); })
|
|
517
|
+
.map(function (element) { return ({
|
|
518
|
+
element: element,
|
|
519
|
+
hadInert: element.hasAttribute('inert')
|
|
520
|
+
}); });
|
|
521
|
+
snapshots.forEach(function (_a) {
|
|
522
|
+
var element = _a.element, hadInert = _a.hadInert;
|
|
523
|
+
if (isInert) {
|
|
524
|
+
if (!hadInert) {
|
|
525
|
+
element.setAttribute('inert', '');
|
|
526
|
+
}
|
|
527
|
+
return;
|
|
528
|
+
}
|
|
529
|
+
if (!hadInert) {
|
|
530
|
+
element.removeAttribute('inert');
|
|
531
|
+
}
|
|
532
|
+
});
|
|
533
|
+
return function () {
|
|
534
|
+
snapshots.forEach(function (_a) {
|
|
535
|
+
var element = _a.element, hadInert = _a.hadInert;
|
|
536
|
+
if (hadInert) {
|
|
537
|
+
element.setAttribute('inert', '');
|
|
538
|
+
}
|
|
539
|
+
else {
|
|
540
|
+
element.removeAttribute('inert');
|
|
541
|
+
}
|
|
542
|
+
});
|
|
543
|
+
};
|
|
544
|
+
};
|
|
545
|
+
|
|
513
546
|
var formatLeadingZero = function (day) { return day.replace(/^0+/, ''); };
|
|
514
547
|
|
|
515
548
|
var formatPostalCode = function (postalCode, spaceIndex) {
|
|
@@ -18912,6 +18945,7 @@ build.capitalizedAllWords = capitalizedAllWords;
|
|
|
18912
18945
|
build.comparisonTypes = comparisonTypes;
|
|
18913
18946
|
build.emailRegex = emailRegex;
|
|
18914
18947
|
build.focusTrap = focusTrap;
|
|
18948
|
+
build.focusableSelectors = focusableSelectors;
|
|
18915
18949
|
build.formatDateToLocale = formatDateToLocale;
|
|
18916
18950
|
build.formatLeadingZero = formatLeadingZero;
|
|
18917
18951
|
build.formatPostalCode = formatPostalCode;
|
|
@@ -18925,6 +18959,7 @@ build.makeCateringPortionsString = makeCateringPortionsString;
|
|
|
18925
18959
|
build.moment = moment;
|
|
18926
18960
|
build.nameRegex = nameRegex;
|
|
18927
18961
|
build.phoneRegex = phoneRegex;
|
|
18962
|
+
build.toggleInert = toggleInert;
|
|
18928
18963
|
build.useDetectDevice = useDetectDevice;
|
|
18929
18964
|
build.useFixedModalScroll = useFixedModalScroll;
|
|
18930
18965
|
build.useOutsideClick = useOutsideClick;
|