@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
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
export declare const CartItemSummaryWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
3
3
|
export declare const CancelledWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
4
4
|
export declare const ItemInformationContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
5
|
-
export declare const AmountText: import("styled-components").StyledComponent<({ children,
|
|
5
|
+
export declare const AmountText: import("styled-components").StyledComponent<({ children, color, fontWeight, size, textAlign, ...props }: import("@citygross/typography/build/bodyText/bodyText").TBodyText) => import("react").JSX.Element, import("styled-components").DefaultTheme, {}, never>;
|
|
@@ -13,7 +13,7 @@ var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
|
|
|
13
13
|
var CartItemSummaryWrapper = styled__default["default"].div(templateObject_1 || (templateObject_1 = _tslib.__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; });
|
|
14
14
|
var CancelledWrapper = styled__default["default"].div(templateObject_2 || (templateObject_2 = _tslib.__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"])));
|
|
15
15
|
var ItemInformationContainer = styled__default["default"].div(templateObject_3 || (templateObject_3 = _tslib.__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"])));
|
|
16
|
-
var AmountText = styled__default["default"](typography.
|
|
16
|
+
var AmountText = styled__default["default"](typography.BodyText)(templateObject_4 || (templateObject_4 = _tslib.__makeTemplateObject(["\n white-space: nowrap;\n"], ["\n white-space: nowrap;\n"])));
|
|
17
17
|
var templateObject_1, templateObject_2, templateObject_3, templateObject_4;
|
|
18
18
|
|
|
19
19
|
exports.AmountText = AmountText;
|
|
@@ -18,7 +18,7 @@ var ListLeft = styled__default["default"].div(templateObject_3 || (templateObjec
|
|
|
18
18
|
var ListRight = styled__default["default"].div(templateObject_4 || (templateObject_4 = _tslib.__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) {
|
|
19
19
|
return props.alignment === ListItem.EListItemAlignment.TOP ? 'flex-start' : 'center';
|
|
20
20
|
});
|
|
21
|
-
var ListImageContainer = styled__default["default"].div(templateObject_5 || (templateObject_5 = _tslib.__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) {
|
|
21
|
+
var ListImageContainer = styled__default["default"].div(templateObject_5 || (templateObject_5 = _tslib.__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) {
|
|
22
22
|
var _a, _b;
|
|
23
23
|
return (props === null || props === void 0 ? void 0 : props.isSmall)
|
|
24
24
|
? (_a = props.theme.constants) === null || _a === void 0 ? void 0 : _a.listImageMaxWidthSmall
|
|
@@ -37,7 +37,7 @@ var ListImage = styled__default["default"].img(templateObject_6 || (templateObje
|
|
|
37
37
|
? (_a = props.theme.constants) === null || _a === void 0 ? void 0 : _a.listImageMaxHeightSmall
|
|
38
38
|
: (_b = props.theme.constants) === null || _b === void 0 ? void 0 : _b.listImageMaxHeight, "px");
|
|
39
39
|
});
|
|
40
|
-
var CheckboxContainer = styled__default["default"].div(templateObject_7 || (templateObject_7 = _tslib.__makeTemplateObject(["\n display: flex;\n
|
|
40
|
+
var CheckboxContainer = styled__default["default"].div(templateObject_7 || (templateObject_7 = _tslib.__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; });
|
|
41
41
|
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7;
|
|
42
42
|
|
|
43
43
|
exports.CheckboxContainer = CheckboxContainer;
|
|
@@ -37,7 +37,7 @@ var HeaderContainer = styled__default["default"].div(templateObject_3 || (templa
|
|
|
37
37
|
return (_b = theme.constants) === null || _b === void 0 ? void 0 : _b.minimalHeaderMaxWidth;
|
|
38
38
|
});
|
|
39
39
|
var LogoContainer = styled__default["default"].a(templateObject_4 || (templateObject_4 = _tslib.__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"])));
|
|
40
|
-
var HeaderLink = styled__default["default"].a(templateObject_5 || (templateObject_5 = _tslib.__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) {
|
|
40
|
+
var HeaderLink = styled__default["default"].a(templateObject_5 || (templateObject_5 = _tslib.__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) {
|
|
41
41
|
var _b;
|
|
42
42
|
var theme = _a.theme;
|
|
43
43
|
return (_b = theme.palette) === null || _b === void 0 ? void 0 : _b.brandBlue;
|
|
@@ -37,12 +37,13 @@ var BaseRadioListItemContainer = styled__default["default"].div(templateObject_1
|
|
|
37
37
|
var BaseRadioItemLeftWrapper = styled__default["default"].div(templateObject_2 || (templateObject_2 = _tslib.__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); });
|
|
38
38
|
var StyledH3 = styled__default["default"](typography.H3).attrs({ as: 'span' })(templateObject_3 || (templateObject_3 = _tslib.__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) {
|
|
39
39
|
var _a;
|
|
40
|
-
return props.isDisabled &&
|
|
40
|
+
return props.isDisabled &&
|
|
41
|
+
"\n color: ".concat((_a = props.theme.palette) === null || _a === void 0 ? void 0 : _a.disabledDarkGray, ";\n text-decoration: line-through;\n ");
|
|
41
42
|
});
|
|
42
43
|
var RadioRightWrapper = styled__default["default"].div(templateObject_4 || (templateObject_4 = _tslib.__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; });
|
|
43
44
|
styled__default["default"](typography.BodyText)(templateObject_5 || (templateObject_5 = _tslib.__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) {
|
|
44
45
|
return (props === null || props === void 0 ? void 0 : props.wrapMobile) &&
|
|
45
|
-
"\n
|
|
46
|
+
"\n text-align: left;\n ";
|
|
46
47
|
}, 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; });
|
|
47
48
|
var RadioFlex = styled__default["default"].div(templateObject_6 || (templateObject_6 = _tslib.__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) {
|
|
48
49
|
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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -9,7 +9,7 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
9
9
|
|
|
10
10
|
var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
|
|
11
11
|
|
|
12
|
-
var DialogContainer = styled__default["default"].div(templateObject_1 || (templateObject_1 = _tslib.__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) {
|
|
12
|
+
var DialogContainer = styled__default["default"].div(templateObject_1 || (templateObject_1 = _tslib.__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) {
|
|
13
13
|
var _b;
|
|
14
14
|
var theme = _a.theme;
|
|
15
15
|
return (_b = theme.palette) === null || _b === void 0 ? void 0 : _b.black;
|
|
@@ -33,6 +33,10 @@ var DialogContainer = styled__default["default"].div(templateObject_1 || (templa
|
|
|
33
33
|
var _b;
|
|
34
34
|
var theme = _a.theme;
|
|
35
35
|
return (_b = theme.spacings) === null || _b === void 0 ? void 0 : _b.xs2;
|
|
36
|
+
}, function (_a) {
|
|
37
|
+
var _b;
|
|
38
|
+
var theme = _a.theme;
|
|
39
|
+
return (_b = theme.attributes) === null || _b === void 0 ? void 0 : _b.zIndex.low;
|
|
36
40
|
}, function (_a) {
|
|
37
41
|
var _b, _c;
|
|
38
42
|
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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -478,11 +478,11 @@ var makeCateringPortionsString = function (variant, cartItem, unit) {
|
|
|
478
478
|
return qString;
|
|
479
479
|
};
|
|
480
480
|
|
|
481
|
+
var focusableSelectors = 'button:not([disabled]), [href]:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])';
|
|
481
482
|
var focusTrap = function (_a) {
|
|
482
483
|
var _b;
|
|
483
484
|
var exitFunction = _a.exitFunction, ref = _a.ref;
|
|
484
|
-
var
|
|
485
|
-
var focusableElements = (_b = ref.current) === null || _b === void 0 ? void 0 : _b.querySelectorAll(elements);
|
|
485
|
+
var focusableElements = (_b = ref.current) === null || _b === void 0 ? void 0 : _b.querySelectorAll(focusableSelectors);
|
|
486
486
|
if (focusableElements &&
|
|
487
487
|
focusableElements.length > 0 &&
|
|
488
488
|
focusableElements[0] instanceof HTMLElement) {
|
|
@@ -491,7 +491,7 @@ var focusTrap = function (_a) {
|
|
|
491
491
|
var handleKeyDown = function (e) {
|
|
492
492
|
if (!ref.current)
|
|
493
493
|
return;
|
|
494
|
-
var focusable = Array.from(ref.current.querySelectorAll(
|
|
494
|
+
var focusable = Array.from(ref.current.querySelectorAll(focusableSelectors));
|
|
495
495
|
if (focusable.length === 0)
|
|
496
496
|
return;
|
|
497
497
|
var firstElement = focusable[0];
|
|
@@ -517,6 +517,39 @@ var focusTrap = function (_a) {
|
|
|
517
517
|
};
|
|
518
518
|
};
|
|
519
519
|
|
|
520
|
+
var toggleInert = function (_a) {
|
|
521
|
+
var elements = _a.elements, isInert = _a.isInert;
|
|
522
|
+
var snapshots = elements
|
|
523
|
+
.filter(function (element) { return Boolean(element); })
|
|
524
|
+
.map(function (element) { return ({
|
|
525
|
+
element: element,
|
|
526
|
+
hadInert: element.hasAttribute('inert')
|
|
527
|
+
}); });
|
|
528
|
+
snapshots.forEach(function (_a) {
|
|
529
|
+
var element = _a.element, hadInert = _a.hadInert;
|
|
530
|
+
if (isInert) {
|
|
531
|
+
if (!hadInert) {
|
|
532
|
+
element.setAttribute('inert', '');
|
|
533
|
+
}
|
|
534
|
+
return;
|
|
535
|
+
}
|
|
536
|
+
if (!hadInert) {
|
|
537
|
+
element.removeAttribute('inert');
|
|
538
|
+
}
|
|
539
|
+
});
|
|
540
|
+
return function () {
|
|
541
|
+
snapshots.forEach(function (_a) {
|
|
542
|
+
var element = _a.element, hadInert = _a.hadInert;
|
|
543
|
+
if (hadInert) {
|
|
544
|
+
element.setAttribute('inert', '');
|
|
545
|
+
}
|
|
546
|
+
else {
|
|
547
|
+
element.removeAttribute('inert');
|
|
548
|
+
}
|
|
549
|
+
});
|
|
550
|
+
};
|
|
551
|
+
};
|
|
552
|
+
|
|
520
553
|
var formatLeadingZero = function (day) { return day.replace(/^0+/, ''); };
|
|
521
554
|
|
|
522
555
|
var formatPostalCode = function (postalCode, spaceIndex) {
|
|
@@ -18919,6 +18952,7 @@ index.__exports.capitalizedAllWords = capitalizedAllWords;
|
|
|
18919
18952
|
index.__exports.comparisonTypes = comparisonTypes;
|
|
18920
18953
|
index.__exports.emailRegex = emailRegex;
|
|
18921
18954
|
index.__exports.focusTrap = focusTrap;
|
|
18955
|
+
index.__exports.focusableSelectors = focusableSelectors;
|
|
18922
18956
|
index.__exports.formatDateToLocale = formatDateToLocale;
|
|
18923
18957
|
index.__exports.formatLeadingZero = formatLeadingZero;
|
|
18924
18958
|
index.__exports.formatPostalCode = formatPostalCode;
|
|
@@ -18932,6 +18966,7 @@ index.__exports.makeCateringPortionsString = makeCateringPortionsString;
|
|
|
18932
18966
|
index.__exports.moment = moment;
|
|
18933
18967
|
index.__exports.nameRegex = nameRegex;
|
|
18934
18968
|
index.__exports.phoneRegex = phoneRegex;
|
|
18969
|
+
index.__exports.toggleInert = toggleInert;
|
|
18935
18970
|
index.__exports.useDetectDevice = useDetectDevice;
|
|
18936
18971
|
index.__exports.useFixedModalScroll = useFixedModalScroll;
|
|
18937
18972
|
index.__exports.useOutsideClick = useOutsideClick;
|