@citygross/components 0.14.7 → 0.14.9
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/Accordion/Accordion.d.ts +3 -2
- package/build/@types/components/Accordion/Accordion.styles.d.ts +3 -1
- package/build/@types/components/AddressBlock/AddressBlock.d.ts +1 -1
- package/build/@types/components/AlertBox/AlertBox.d.ts +1 -1
- package/build/@types/components/BackButton/BackButton.d.ts +2 -2
- package/build/@types/components/BackgroundImage/BackgroundImage.d.ts +2 -2
- package/build/@types/components/Badge/Badge.d.ts +1 -1
- package/build/@types/components/Box/Box.d.ts +1 -1
- package/build/@types/components/BoxArrow/BoxArrow.d.ts +2 -2
- package/build/@types/components/Button/Button.d.ts +1 -1
- package/build/@types/components/Button/Button.styles.d.ts +1 -1
- package/build/@types/components/Button/IconButton.d.ts +2 -2
- package/build/@types/components/Button/PaginationButton.d.ts +1 -1
- package/build/@types/components/Button/SaveButton.d.ts +1 -1
- package/build/@types/components/CartCard/CartCard.d.ts +1 -1
- package/build/@types/components/CartCardLabel/CartCardLabel.d.ts +2 -2
- package/build/@types/components/CartItemSummary/CartItemSummary.d.ts +2 -2
- package/build/@types/components/CartItemSummary/CartItemSummary.styles.d.ts +1 -1
- package/build/@types/components/CartSubTotal/CartSubTotal.d.ts +1 -1
- package/build/@types/components/CartSummary/CartSummary.d.ts +1 -1
- package/build/@types/components/CgButton/ButtonAsLink/ButtonAsLink.d.ts +1 -1
- package/build/@types/components/CgButton/DivAsButton/DivAsButton.d.ts +2 -2
- package/build/@types/components/Chips/Chip.d.ts +2 -2
- package/build/@types/components/Chips/Chip.styles.d.ts +1 -1
- package/build/@types/components/CouponCode/CouponCode.d.ts +2 -2
- package/build/@types/components/CustomerInfoBlock/CustomerInfoBlock.d.ts +1 -1
- package/build/@types/components/DateBox/DateBox.d.ts +1 -1
- package/build/@types/components/DeliverySlotItem/DeliverySlotItem.d.ts +1 -1
- package/build/@types/components/DeliveryTimeBlock/DeliveryTimeBlock.d.ts +1 -1
- package/build/@types/components/DotIndicator/DotIndicator.d.ts +2 -2
- package/build/@types/components/Fieldset/Fieldset.d.ts +1 -1
- package/build/@types/components/Flex/Flex.d.ts +1 -1
- package/build/@types/components/Form/Form.d.ts +1 -1
- package/build/@types/components/FormControl/FormControl.d.ts +1 -1
- package/build/@types/components/FormElements/Checkbox/Checkbox.d.ts +2 -2
- package/build/@types/components/FormElements/InputOld/InputOld.d.ts +1 -1
- package/build/@types/components/FormElements/Radio/Radio.d.ts +2 -2
- package/build/@types/components/FormElements/Select/Select.d.ts +1 -1
- package/build/@types/components/FormElements/Switch/Switch.d.ts +1 -1
- package/build/@types/components/FormElements/Switch/Switch.styles.d.ts +1 -1
- package/build/@types/components/FormElements/TextArea/TextArea.d.ts +2 -2
- package/build/@types/components/FormGroup/FormGroup.d.ts +1 -1
- package/build/@types/components/GridContainer/GridContainer.d.ts +1 -1
- package/build/@types/components/Header/Header.d.ts +2 -2
- package/build/@types/components/HeaderLink/HeaderLink.d.ts +2 -2
- package/build/@types/components/HighlightBox/HighlightBox.d.ts +2 -2
- package/build/@types/components/IconText/IconText.d.ts +1 -1
- package/build/@types/components/IconToolTip/IconToolTip.d.ts +2 -2
- package/build/@types/components/InfoTextBlock/InfoTextBlock.d.ts +1 -1
- package/build/@types/components/Links/Link.d.ts +1 -1
- package/build/@types/components/ListItemWithRadio/ListItemWithRadio.d.ts +1 -1
- package/build/@types/components/Logo/Logo.d.ts +2 -2
- package/build/@types/components/MaxHeightText/MaxHeightText.d.ts +1 -1
- package/build/@types/components/Menu/Menu.d.ts +1 -1
- package/build/@types/components/Menu/MenuItem.d.ts +1 -1
- package/build/@types/components/MenuListDropdown/MenuListDropdown.d.ts +1 -1
- package/build/@types/components/MenuListDropdown/MenuListDropdown.styles.d.ts +3 -3
- package/build/@types/components/NavMainLink/NavMainLink.d.ts +1 -1
- package/build/@types/components/Pagination/Pagination.d.ts +2 -2
- package/build/@types/components/ProgressBar/ProgressBar.d.ts +2 -2
- package/build/@types/components/QuantitySelector/QuantitySelector.d.ts +2 -2
- package/build/@types/components/RadioBox/RadioBoxItem.d.ts +1 -1
- package/build/@types/components/RadioBox/RadioBoxList.d.ts +1 -1
- package/build/@types/components/RadioBox/RadioBoxList.styles.d.ts +1 -1
- package/build/@types/components/RadioGroup/RadioGroup.d.ts +1 -1
- package/build/@types/components/RadioListItem/RadioListItem.d.ts +2 -2
- package/build/@types/components/RadioListItem/RadioListItem.styles.d.ts +2 -2
- package/build/@types/components/RippleContainer/RippleContainer.d.ts +1 -1
- package/build/@types/components/RippleContainer/RippleContainer.styles.d.ts +1 -1
- package/build/@types/components/ScreenReader/ScreenReader.d.ts +1 -1
- package/build/@types/components/SearchListItem/SearchListItem.d.ts +1 -1
- package/build/@types/components/SelectButton/SelectButton.d.ts +2 -2
- package/build/@types/components/SideModal/SideModal.styles.d.ts +2 -2
- package/build/@types/components/SkipTo/SkipTo.d.ts +1 -1
- package/build/@types/components/SlideInOutContainer/SlideInOutContainer.d.ts +1 -1
- package/build/@types/components/SlideInOutContainer/SlideInOutContainer.styles.d.ts +1 -1
- package/build/@types/components/Spinner/Spinner.d.ts +2 -2
- package/build/@types/components/Stepper/StepperList.d.ts +1 -1
- package/build/@types/components/Stepper/StepperListItem.d.ts +1 -1
- package/build/@types/components/StepperMobile/StepperMobile.d.ts +2 -2
- package/build/@types/components/Tag/Tag.d.ts +2 -2
- package/build/@types/components/Timeline/Timeline.d.ts +2 -2
- package/build/@types/components/Timeline/Timeline.styles.d.ts +1 -1
- package/build/@types/components/ToolTip/ToolTip.d.ts +1 -1
- package/build/@types/components/ToolTipDialog/ToolTipDialog.d.ts +1 -1
- package/build/@types/components/WarningLabel/WarningLabel.d.ts +1 -1
- package/build/@types/components/WarningLabel/WarningLabel.styles.d.ts +1 -1
- package/build/@types/containers/TwoColumnsContainer/TwoColumnsPageContainer.d.ts +2 -2
- package/build/cjs/components/src/components/Accordion/Accordion.js +5 -5
- package/build/cjs/components/src/components/Accordion/Accordion.styles.js +14 -10
- package/build/cjs/components/src/components/Accordion/Accordion.styles.js.map +1 -1
- package/build/cjs/components/src/components/Button/SaveButton.js +9 -4
- package/build/cjs/components/src/components/Button/SaveButton.js.map +1 -1
- package/build/cjs/components/src/components/FormElements/Switch/Switch.styles.js +2 -2
- package/build/cjs/components/src/components/MenuListDropdown/MenuListDropdown.js +3 -2
- package/build/cjs/components/src/components/MenuListDropdown/MenuListDropdown.js.map +1 -1
- package/build/cjs/components/src/components/MenuListDropdown/MenuListDropdown.styles.js +4 -4
- package/build/cjs/components/src/components/RippleContainer/RippleContainer.styles.js +2 -2
- package/build/cjs/components/src/components/SideModal/SideModal.js +4 -4
- package/build/cjs/components/src/components/SideModal/SideModal.styles.js +3 -3
- package/build/cjs/components/src/components/SlideInOutContainer/SlideInOutContainer.styles.js +2 -2
- package/build/cjs/design-tokens/build/index.js +1 -0
- package/build/cjs/design-tokens/build/index.js.map +1 -1
- package/build/cjs/utils/build/index.js +31 -1
- package/build/cjs/utils/build/index.js.map +1 -1
- package/build/es/components/src/components/Accordion/Accordion.js +5 -5
- package/build/es/components/src/components/Accordion/Accordion.styles.js +14 -10
- package/build/es/components/src/components/Accordion/Accordion.styles.js.map +1 -1
- package/build/es/components/src/components/Button/SaveButton.js +9 -4
- package/build/es/components/src/components/Button/SaveButton.js.map +1 -1
- package/build/es/components/src/components/FormElements/Switch/Switch.styles.js +1 -1
- package/build/es/components/src/components/MenuListDropdown/MenuListDropdown.js +3 -2
- package/build/es/components/src/components/MenuListDropdown/MenuListDropdown.js.map +1 -1
- package/build/es/components/src/components/MenuListDropdown/MenuListDropdown.styles.js +1 -1
- package/build/es/components/src/components/RippleContainer/RippleContainer.styles.js +1 -1
- package/build/es/components/src/components/SideModal/SideModal.js +3 -3
- package/build/es/components/src/components/SideModal/SideModal.styles.js +1 -1
- package/build/es/components/src/components/SlideInOutContainer/SlideInOutContainer.styles.js +1 -1
- package/build/es/design-tokens/build/index.js +1 -0
- package/build/es/design-tokens/build/index.js.map +1 -1
- package/build/es/utils/build/index.js +31 -1
- package/build/es/utils/build/index.js.map +1 -1
- package/package.json +29 -29
|
@@ -5,11 +5,11 @@ import { Container, Header, Chevron, Content } from './Accordion.styles.js';
|
|
|
5
5
|
|
|
6
6
|
var Accordion = function (_a) {
|
|
7
7
|
var _b, _c;
|
|
8
|
-
var children = _a.children, _d = _a.defaultOpen, defaultOpen = _d === void 0 ? false : _d, id = _a.id, onToggle = _a.onToggle, title = _a.title;
|
|
8
|
+
var children = _a.children, _d = _a.defaultOpen, defaultOpen = _d === void 0 ? false : _d, _e = _a.hideBottomBorder, hideBottomBorder = _e === void 0 ? false : _e, id = _a.id, onToggle = _a.onToggle, title = _a.title;
|
|
9
9
|
// isOpen drives animation/state; isCollapsed toggles hidden after close ends.
|
|
10
|
-
var
|
|
11
|
-
var
|
|
12
|
-
var
|
|
10
|
+
var _f = useState(defaultOpen), isOpen = _f[0], setIsOpen = _f[1];
|
|
11
|
+
var _g = useState(!defaultOpen), isCollapsed = _g[0], setIsCollapsed = _g[1];
|
|
12
|
+
var _h = useState(0), contentHeight = _h[0], setContentHeight = _h[1];
|
|
13
13
|
var contentRef = useRef(null);
|
|
14
14
|
var headerId = "".concat(id, "-header");
|
|
15
15
|
var contentId = "".concat(id, "-content");
|
|
@@ -41,7 +41,7 @@ var Accordion = function (_a) {
|
|
|
41
41
|
else if (isOpen)
|
|
42
42
|
setIsOpen(false);
|
|
43
43
|
}, [defaultOpen]);
|
|
44
|
-
return (React.createElement(Container,
|
|
44
|
+
return (React.createElement(Container, { hideBottomBorder: hideBottomBorder },
|
|
45
45
|
React.createElement(Header, { "aria-controls": contentId, "aria-expanded": isOpen, id: headerId, onClick: function () {
|
|
46
46
|
if (isOpen) {
|
|
47
47
|
setIsOpen(false);
|
|
@@ -1,12 +1,20 @@
|
|
|
1
1
|
import { __makeTemplateObject } from '../../../../_virtual/_tslib.js';
|
|
2
2
|
import styled from 'styled-components';
|
|
3
3
|
|
|
4
|
-
var Container = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n border-
|
|
4
|
+
var Container = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n border-top: 1px solid ", ";\n border-bottom: ", ";\n"], ["\n border-top: 1px solid ", ";\n border-bottom: ", ";\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.light;
|
|
8
|
+
}, function (_a) {
|
|
9
|
+
var _b;
|
|
10
|
+
var hideBottomBorder = _a.hideBottomBorder, theme = _a.theme;
|
|
11
|
+
return hideBottomBorder ? 'none' : "1px solid ".concat((_b = theme.palette) === null || _b === void 0 ? void 0 : _b.light);
|
|
8
12
|
});
|
|
9
|
-
var Header = styled.button(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n background: none;\n border: 0;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: space-between;\n font-size: ", "px;\n font-weight: ", ";\n padding: ", ";\n text-align: left;\n width: 100%;\n"], ["\n background: none;\n border: 0;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: space-between;\n font-size: ", "px;\n font-weight: ", ";\n padding: ", ";\n text-align: left;\n width: 100%;\n"])), function (_a) {
|
|
13
|
+
var Header = styled.button(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n background: none;\n border: 0;\n color: ", ";\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: space-between;\n font-size: ", "px;\n font-weight: ", ";\n padding: ", "px 0;\n text-align: left;\n width: 100%;\n\n &:hover {\n text-decoration: underline;\n }\n"], ["\n background: none;\n border: 0;\n color: ", ";\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: space-between;\n font-size: ", "px;\n font-weight: ", ";\n padding: ", "px 0;\n text-align: left;\n width: 100%;\n\n &:hover {\n text-decoration: underline;\n }\n"])), function (_a) {
|
|
14
|
+
var _b;
|
|
15
|
+
var theme = _a.theme;
|
|
16
|
+
return (_b = theme.palette) === null || _b === void 0 ? void 0 : _b.darkest;
|
|
17
|
+
}, function (_a) {
|
|
10
18
|
var _b, _c;
|
|
11
19
|
var theme = _a.theme;
|
|
12
20
|
return (_c = (_b = theme.typography) === null || _b === void 0 ? void 0 : _b.size) === null || _c === void 0 ? void 0 : _c.s3;
|
|
@@ -15,22 +23,18 @@ var Header = styled.button(templateObject_2 || (templateObject_2 = __makeTemplat
|
|
|
15
23
|
var theme = _a.theme;
|
|
16
24
|
return (_c = (_b = theme.typography) === null || _b === void 0 ? void 0 : _b.weight) === null || _c === void 0 ? void 0 : _c.medium;
|
|
17
25
|
}, function (_a) {
|
|
18
|
-
var _b
|
|
26
|
+
var _b;
|
|
19
27
|
var theme = _a.theme;
|
|
20
|
-
return
|
|
28
|
+
return (_b = theme.spacings) === null || _b === void 0 ? void 0 : _b.sm;
|
|
21
29
|
});
|
|
22
30
|
var Chevron = styled.span(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n display: inline-flex;\n transition: transform 200ms ease;\n\n &[data-state='open'] {\n transform: rotate(180deg);\n }\n"], ["\n display: inline-flex;\n transition: transform 200ms ease;\n\n &[data-state='open'] {\n transform: rotate(180deg);\n }\n"])));
|
|
23
|
-
var Content = styled.div(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n max-height: ", "px;\n opacity: 0;\n overflow: hidden;\n
|
|
31
|
+
var Content = styled.div(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n max-height: ", "px;\n opacity: 0;\n overflow: hidden;\n transition:\n max-height 220ms ease,\n opacity 200ms ease;\n\n &[data-state='open'] {\n opacity: 1;\n padding: ", ";\n }\n"], ["\n max-height: ", "px;\n opacity: 0;\n overflow: hidden;\n transition:\n max-height 220ms ease,\n opacity 200ms ease;\n\n &[data-state='open'] {\n opacity: 1;\n padding: ", ";\n }\n"])), function (_a) {
|
|
24
32
|
var maxHeight = _a.maxHeight;
|
|
25
33
|
return maxHeight;
|
|
26
|
-
}, function (_a) {
|
|
27
|
-
var _b;
|
|
28
|
-
var theme = _a.theme;
|
|
29
|
-
return (_b = theme.spacings) === null || _b === void 0 ? void 0 : _b.md;
|
|
30
34
|
}, function (_a) {
|
|
31
35
|
var _b, _c, _d;
|
|
32
36
|
var theme = _a.theme;
|
|
33
|
-
return "".concat((_b = theme.spacings) === null || _b === void 0 ? void 0 : _b.xxxs, "px ").concat((_c = theme.spacings) === null || _c === void 0 ? void 0 : _c.
|
|
37
|
+
return "".concat((_b = theme.spacings) === null || _b === void 0 ? void 0 : _b.xxxs, "px ").concat((_c = theme.spacings) === null || _c === void 0 ? void 0 : _c.xxxs, "px ").concat((_d = theme.spacings) === null || _d === void 0 ? void 0 : _d.md, "px");
|
|
34
38
|
});
|
|
35
39
|
var templateObject_1, templateObject_2, templateObject_3, templateObject_4;
|
|
36
40
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Accordion.styles.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Accordion.styles.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -4,16 +4,21 @@ import { BasePrimaryButton, Loading, LoadingContainer, LoadingSpinner, ButtonChi
|
|
|
4
4
|
import { BodyText } from '@citygross/typography';
|
|
5
5
|
|
|
6
6
|
var SaveButton = function (_a) {
|
|
7
|
-
var _b, _c;
|
|
8
|
-
var afterSaveText = _a.afterSaveText, ariaLabel = _a.ariaLabel, beforeSaveText = _a.beforeSaveText,
|
|
7
|
+
var _b, _c, _d;
|
|
8
|
+
var afterSaveText = _a.afterSaveText, ariaLabel = _a.ariaLabel, beforeSaveText = _a.beforeSaveText, _e = _a.childGap, childGap = _e === void 0 ? 4 : _e, _f = _a.color, color = _f === void 0 ? (_c = (_b = theme.palette) === null || _b === void 0 ? void 0 : _b.secondary) !== null && _c !== void 0 ? _c : '' : _f, fullWidth = _a.fullWidth, icon = _a.icon, isDisabled = _a.isDisabled, loading = _a.loading, noWrap = _a.noWrap, onAnimationComplete = _a.onAnimationComplete, onClick = _a.onClick, _g = _a.onSavedColor, onSavedColor = _g === void 0 ? 'alertGreen' : _g, saved = _a.saved, _h = _a.size, size = _h === void 0 ? 'large' : _h, xsSize = _a.xsSize;
|
|
9
9
|
useEffect(function () {
|
|
10
10
|
var _a;
|
|
11
|
+
var timeoutId;
|
|
11
12
|
if (!loading && saved) {
|
|
12
|
-
setTimeout(function () {
|
|
13
|
+
timeoutId = setTimeout(function () {
|
|
13
14
|
onAnimationComplete();
|
|
14
15
|
}, (_a = theme === null || theme === void 0 ? void 0 : theme.animations) === null || _a === void 0 ? void 0 : _a.saveButtonAnimationComplete);
|
|
15
16
|
}
|
|
16
|
-
|
|
17
|
+
return function () {
|
|
18
|
+
if (timeoutId)
|
|
19
|
+
clearTimeout(timeoutId);
|
|
20
|
+
};
|
|
21
|
+
}, [saved, loading, (_d = theme === null || theme === void 0 ? void 0 : theme.animations) === null || _d === void 0 ? void 0 : _d.saveButtonAnimationComplete]);
|
|
17
22
|
return (React.createElement(BasePrimaryButton, { "aria-label": ariaLabel, color: saved ? onSavedColor : color, disabled: loading || isDisabled, fullWidth: fullWidth, icon: icon, isDisabled: loading || isDisabled, loading: loading || null, noWrap: noWrap, onClick: saved ? function () { } : function (e) { return onClick(e); }, size: size },
|
|
18
23
|
loading && (React.createElement(Loading, null,
|
|
19
24
|
React.createElement(LoadingContainer, { xsSize: xsSize, size: size },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SaveButton.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SaveButton.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { __makeTemplateObject } from '../../../../../_virtual/_tslib.js';
|
|
2
|
-
import { motion } from '
|
|
2
|
+
import { motion } from 'motion/react';
|
|
3
3
|
import styled from 'styled-components';
|
|
4
4
|
|
|
5
5
|
var SwitchWrapper = styled(motion.div)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n width: 42px;\n height: 22px;\n min-width: 42px;\n position: relative;\n"], ["\n width: 42px;\n height: 22px;\n min-width: 42px;\n position: relative;\n"])));
|
|
@@ -3,14 +3,15 @@ import { DropdownContainer, DropdownHeader, DropdownChildContainer } from './Men
|
|
|
3
3
|
|
|
4
4
|
var MenuListDropdown = function (_a) {
|
|
5
5
|
var children = _a.children, dropdownHeader = _a.dropdownHeader, isOpen = _a.isOpen, onClick = _a.onClick;
|
|
6
|
+
var easing = [0.04, 0.62, 0.23, 0.98];
|
|
6
7
|
var variants = {
|
|
7
8
|
closed: {
|
|
8
9
|
height: 0,
|
|
9
|
-
transition: { duration: 0.3, ease:
|
|
10
|
+
transition: { duration: 0.3, ease: easing }
|
|
10
11
|
},
|
|
11
12
|
open: {
|
|
12
13
|
height: 'auto',
|
|
13
|
-
transition: { duration: 0.3, ease:
|
|
14
|
+
transition: { duration: 0.3, ease: easing }
|
|
14
15
|
}
|
|
15
16
|
};
|
|
16
17
|
return (React.createElement(DropdownContainer, null,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MenuListDropdown.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"MenuListDropdown.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __makeTemplateObject } from '../../../../_virtual/_tslib.js';
|
|
2
2
|
import styled from 'styled-components';
|
|
3
|
-
import { motion } from '
|
|
3
|
+
import { motion } from 'motion/react';
|
|
4
4
|
|
|
5
5
|
var DropdownContainer = styled(motion.div)(templateObject_1 || (templateObject_1 = __makeTemplateObject([""], [""])));
|
|
6
6
|
var DropdownHeader = styled(motion.div)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n cursor: pointer;\n"], ["\n cursor: pointer;\n"])));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __makeTemplateObject } from '../../../../_virtual/_tslib.js';
|
|
2
2
|
import styled, { keyframes } from 'styled-components';
|
|
3
|
-
import { motion } from '
|
|
3
|
+
import { motion } from 'motion/react';
|
|
4
4
|
|
|
5
5
|
var slide = keyframes(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n 0% { left: -100% }\n 100% { left: 120% }\n"], ["\n 0% { left: -100% }\n 100% { left: 120% }\n"])));
|
|
6
6
|
var RippleContainer = styled(motion.div)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n position: relative;\n overflow: hidden;\n cursor: pointer;\n\n &:after {\n background: ", ";\n content: '';\n height: 200%;\n left: -100%;\n opacity: 0.2;\n position: absolute;\n top: -30%;\n transform: rotate(35deg);\n width: 50px;\n }\n\n &:hover {\n &:after {\n animation: ", "\n ", " forwards;\n }\n }\n"], ["\n position: relative;\n overflow: hidden;\n cursor: pointer;\n\n &:after {\n background: ", ";\n content: '';\n height: 200%;\n left: -100%;\n opacity: 0.2;\n position: absolute;\n top: -30%;\n transform: rotate(35deg);\n width: 50px;\n }\n\n &:hover {\n &:after {\n animation: ", "\n ", " forwards;\n }\n }\n"])), function (props) { var _a; return props.color ? props.color : (_a = props.theme.palette) === null || _a === void 0 ? void 0 : _a.white; }, slide, function (props) { var _a, _b; return (_b = (_a = props.theme) === null || _a === void 0 ? void 0 : _a.animations) === null || _b === void 0 ? void 0 : _b.rippleTransition; });
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __rest, __assign } from '../../../../_virtual/_tslib.js';
|
|
2
2
|
import React, { forwardRef } from 'react';
|
|
3
|
-
import { AnimatePresence } from '
|
|
3
|
+
import { AnimatePresence } from 'motion/react';
|
|
4
4
|
import { createPortal } from 'react-dom';
|
|
5
5
|
import { SideModalOverlay, SideModalContainer } from './SideModal.styles.js';
|
|
6
6
|
import { theme } from '@citygross/design-tokens';
|
|
@@ -15,9 +15,9 @@ var SideModal = forwardRef(function (_a, ref) {
|
|
|
15
15
|
onBackdropClick();
|
|
16
16
|
}
|
|
17
17
|
}, overlayBackground: overlayBackground, ref: ref, transition: {
|
|
18
|
-
|
|
18
|
+
duration: 0
|
|
19
19
|
} },
|
|
20
|
-
React.createElement(SideModalContainer, __assign({ animate: { x: 0 }, "aria-modal": "true", background: background, exit: { x: slideFrom === 'left' ? '-100%' : '100%' }, initial: { x: slideFrom === 'left' ? '-100%' : '100%' }, maxHeight: maxHeight, maxWidth: maxWidth, onClick: function (e) { return e.stopPropagation(); }, role: "dialog", slideFrom: slideFrom, transition: {
|
|
20
|
+
React.createElement(SideModalContainer, __assign({ animate: { x: 0 }, "aria-modal": "true", background: background, exit: { x: slideFrom === 'left' ? '-100%' : '100%' }, initial: { x: slideFrom === 'left' ? '-100%' : '100%' }, maxHeight: maxHeight, maxWidth: maxWidth, onClick: function (e) { return e.stopPropagation(); }, role: "dialog", slideFrom: slideFrom, transition: { duration: 0 }, width: width }, props), children)))), document.querySelector(querySelector) || document.body)
|
|
21
21
|
: null;
|
|
22
22
|
});
|
|
23
23
|
SideModal.displayName = 'SideModal';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __makeTemplateObject } from '../../../../_virtual/_tslib.js';
|
|
2
2
|
import styled from 'styled-components';
|
|
3
|
-
import { motion } from '
|
|
3
|
+
import { motion } from 'motion/react';
|
|
4
4
|
|
|
5
5
|
var SideModalOverlay = styled(motion.div)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: flex;\n z-index: ", ";\n background: ", ";\n position: fixed;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n height: 100%;\n ", ";\n justify-content: center;\n align-items: center;\n overscroll-behavior: none;\n @media (min-width: ", "px) {\n padding: ", "px;\n max-height: unset;\n }\n"], ["\n display: flex;\n z-index: ", ";\n background: ", ";\n position: fixed;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n height: 100%;\n ", ";\n justify-content: center;\n align-items: center;\n overscroll-behavior: none;\n @media (min-width: ", "px) {\n padding: ", "px;\n max-height: unset;\n }\n"])), function (props) { var _a; return (_a = props.theme.attributes) === null || _a === void 0 ? void 0 : _a.zIndex.modal; }, function (props) { return props.overlayBackground; }, function (props) {
|
|
6
6
|
return props.maxHeight &&
|
package/build/es/components/src/components/SlideInOutContainer/SlideInOutContainer.styles.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { __makeTemplateObject } from '../../../../_virtual/_tslib.js';
|
|
2
|
-
import { motion } from '
|
|
2
|
+
import { motion } from 'motion/react';
|
|
3
3
|
import styled from 'styled-components';
|
|
4
4
|
|
|
5
5
|
var SideModalContainer = styled(motion.div)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n width: 100%;\n ", ";\n position: absolute;\n ", ";\n top: 0;\n ", "\n overflow: auto;\n -ms-overflow-style: none;\n scrollbar-width: none;\n &::-webkit-scrollbar {\n display: none;\n }\n"], ["\n width: 100%;\n ", ";\n position: absolute;\n ", ";\n top: 0;\n ", "\n overflow: auto;\n -ms-overflow-style: none;\n scrollbar-width: none;\n &::-webkit-scrollbar {\n display: none;\n }\n"])), function (_a) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../../design-tokens/build/index.js"],"sourcesContent":["'use strict';\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\nvar attributes = {\n borderRadius: {\n extraSmall: 2,\n small: 5,\n default: 10,\n big: 20,\n rounded: 100,\n circle: '50%'\n },\n boxShadow: {\n small: '0 0 46px 0 rgba(0, 0, 0, 0.13)',\n hover: '0 0 15px 0 rgba(0, 0, 0, 0.13)',\n buttonHover: '0 1px 5px rgba(0, 0, 0, 0.35)',\n buttonActive: 'inset 0 0px 5px rgba(0, 0, 0, 0.15)',\n iconButtonHover: '0 1px 8px rgba(0, 0, 0, 0.35)',\n layoutShadow: '0 1px 0 rgba(0, 0, 0, 0.15)',\n layoutShadowInset: 'inset 0 -1px 0 rgba(0, 0, 0, 0.15)',\n layoutShadowInsetMedium: 'inset 0 -2px 0 rgba(0, 0, 0, 0.15)',\n stepperShadow: '0px -5px 20px rgba(0, 0, 0, 0.04), 0px -2px 6px rgba(0, 0, 0, 0.04), 0px 0px 1px rgba(0, 0, 0, 0.04)',\n highlightBoxShadow: '0 2px 5px 0 rgba(7,52,99,0.15)',\n focusVisible: '0 0 0 2px #000'\n },\n zIndex: {\n modal: 5,\n footer: 4,\n high: 3,\n middle: 2,\n low: 1\n },\n transition: {\n t1: '550ms cubic-bezier(0.19, 1, 0.22, 1)',\n inputTransition: 'box-shadow 250ms ease'\n }\n};\n\nvar breakpoints = {\n xxs: 360,\n xs: 480,\n sm: 576,\n md: 768,\n lg: 960,\n xl: 1060,\n xxl: 1280,\n xxxl: 1400\n};\n\nvar constants = {\n BackgroundOverlayOpacity: 0.3,\n buttonBadgeFontSize: 11,\n buttonBadgePadding: 6,\n buttonBadgePaddingSmall: 2,\n buttonBadgeRightPosition: -4,\n buttonBadgeTopPosition: -3,\n buttonChildExtraSmallGap: 4,\n buttonChildGap: 12,\n buttonChildSmallGap: 8,\n buttonWrapperMinWidth: 120,\n cartCardImageSize: 48,\n cartListItemDescriptionSize: 11,\n chipCheckBox: 12,\n couponButtonContainer: 102,\n dateBoxHorizontalPadding: 12,\n deliverySlotArrowOffset: 42,\n deliverySlotItemHeight: 91,\n deliverySlotItemWidth: 130,\n deliverySlotItemWidthDesktop: 146,\n headerBreakpoint: 991,\n headerScrollFadeRange: 50,\n headerWrapperVerticalPadding: 20,\n iconToolTipArrowLeft: 2.5,\n iconToolTipArrowTop: 32,\n iconToolTipBoxWidth: 300,\n iconToolTipTop: 36,\n infoBlockBorderWidth: 4,\n infoBlockImageMaxWidthDesktop: 100,\n InputWithIconPaddingRight: 45,\n itemGap: 2,\n listImageMaxHeight: 50,\n listImageMaxHeightSmall: 32,\n listImageMaxWidth: 64,\n listImageMaxWidthSmall: 32,\n listItemFlexGap: 20,\n MarkingWrapperGridGap: 2,\n maxHeightFaderHeight: 50,\n menuHorizontalMargin: 12,\n menuListItemIconSize: 16,\n mobileLabelPaddingRight: 35,\n mobileLabelPaddingRightMobile: 20,\n mobileLabelVerticalPadding: 10,\n mobileLabelVerticalPaddingMobile: 8,\n mobileTablePadding: 12,\n mobileTablePaddingBottom: 6,\n modalConfirmMaxWidth: 480,\n modalContainerMaxWidth: 615,\n navHeaderHeight: 81,\n navHeaderHeightSmall: 64,\n navMainLinkWidth: 105,\n pageContainerMaxWidth: 776,\n pageContentMaxWidth: 1232,\n paginationButtonWidth: 44,\n priceBaseLetterSpacing: -0.03,\n priceIndicatorRotate: 1,\n priceRotate: 2.5,\n priceSplashHorizontalPadding: 10,\n priceVariantBadgeSize: 48,\n quantitySelectorWidthLarge: 140,\n quantitySelectorWidthSmall: 123,\n searchListItemGridTemplateColumns: 25,\n searchModalZIndex: 900,\n selectButtonWidth: 169,\n selectMobileWidth: 175,\n selectPadding: 2,\n selectWidth: 225,\n tableHeaderVerticalPadding: 12,\n tableRowHorizontalPadding: 14,\n tableRowVerticalPadding: 16,\n toolTipArrowBorderWidth: 5,\n toolTipArrowMarginTop: -5,\n toolTipBackground: 'rgba(0,0,0,.7)',\n toolTipCloseSize: 20,\n tooltipMinWidth: 80,\n toolTipTop: 35,\n twoColumnsContainerMaxWidth: 1024,\n zipCodeInputSize: 48,\n zipCodeInputSizeSmall: 40\n};\n\nvar palette = {\n // pallette same as brand colors\n primary: '#FFDF43',\n secondary: '#0071B9',\n // brand colors\n brandYellow: '#FFDF43',\n brandBlue: '#0071B9',\n brandPurple: '#A71680',\n brandPrio: '#a80073',\n // shades\n yellowLighter: '#FFFBE7',\n yellowLight: '#FFF7D1',\n blueLight: '#ECF7FE',\n blueLighter: '#D3EDFD',\n blueMedium: '#92B9D3',\n greenLight: '#F2FDF2',\n greenMedium: '#BEE5BE',\n redLight: '#FCE9E9',\n priceTagRed: '#C80700',\n // recipeTags\n recipeVego: '#65DB69',\n recipeLactose: '#8CCDF0',\n recipeGluten: '#D5642A',\n // link same as alert blue\n link: '#0072BB',\n // black / white\n white: '#FFFFFF',\n black: '#000000',\n // grayscale\n lightest: '#F7F7F7',\n lighter: '#F1F1F1',\n light: '#E8E8E8',\n medium: '#DBDBDB',\n mediumDark: '#6C6C6C',\n dark: '#979797',\n darker: '#4A4A4A',\n darkest: '#333333',\n buttonGray: '#E5E4E5',\n disabledGray: '#B8B8B8',\n disabledDarkGray: '#5c5c5c',\n placeholder: '#8f8f8f',\n border: '#0069AE',\n grayMuted: '#797575',\n grayNeutral: '#D6D6D6',\n boxShadow: '#E1E1E1',\n boxShadowActive: 'rgba(7, 52, 99, 0.15)',\n // Alerts\n alertRed: '#E02721',\n alertBlue: '#0072BB',\n alertGreen: '#3F9A3C',\n // overlay\n darkOverlay: 'rgba(0, 0, 0, 0.6)',\n // transparent\n transparent: '#ffffff00',\n // hover\n brandBlueHover: '#005C99',\n brandYellowHover: '#F5D800',\n brandPrioHover: '#90136F',\n brandBlueActive: '#004D80',\n brandYellowActive: '#DBC100',\n brandPrioActive: '#7A105E',\n none: 'none'\n};\n\nvar spacings = {\n xxxs: 2,\n xxs: 4,\n xxs2: 6,\n xs: 8,\n xs1: 10,\n xs2: 12,\n xs3: 14,\n sm: 16,\n sm1: 18,\n sm2: 20,\n md: 24,\n lg: 32,\n xl: 40,\n xl2: 48,\n xxl: 56\n // More in figma, but talk with Johan to generalize it more.\n // xxx: 72, 88, 120, 152 ?\n};\n\nvar typography = {\n type: {\n primary: '\"Poppins\", \"Helvetica Neue\", Helvetica, Arial, sans-serif',\n display: '\"Dom Casual\"',\n code: '\"SFMono-Regular\", Consolas, \"Liberation Mono\", Menlo, Courier, monospace'\n },\n weight: {\n regular: '400',\n medium: '500',\n semiBold: '600',\n bold: '700',\n extraBold: '800'\n },\n size: {\n // xs all from 0-10\n xs: 10,\n // s all from 11-20\n s0: 11,\n s1: 12,\n s2: 13,\n s3: 15,\n s4: 18,\n // m all from 21-40\n m1: 24,\n m2: 30,\n // l all from 41 >\n l1: 41,\n code: 90\n },\n lineHeight: {\n // xs all from 0-15\n xs: 15,\n // s all from 16-20\n s1: 18,\n s2: 19,\n // m all from 21-40\n m1: 22,\n m2: 27,\n m3: 36,\n // l all from 41 >\n l1: 45\n }\n};\n\nvar animations = {\n tapScale: 0.9,\n hoverScale: 1.1,\n buttonTransition: 'all 250ms cubic-bezier(0.165, 0.84, 0.44, 1)',\n rippleTransition: '750ms cubic-bezier(0.19, 1, 0.22, 1)',\n saveButtonAnimationComplete: 600\n};\n\nvar createTheme = function (_a) {\n var palette = _a.palette, typography = _a.typography, attributes = _a.attributes, breakpoints = _a.breakpoints, spacings = _a.spacings, constants = _a.constants, animations = _a.animations;\n return ({\n palette: palette,\n typography: typography,\n attributes: attributes,\n breakpoints: breakpoints,\n spacings: spacings,\n constants: constants,\n animations: animations\n });\n};\nvar theme = createTheme({\n palette: palette,\n typography: typography,\n attributes: attributes,\n breakpoints: breakpoints,\n spacings: spacings,\n constants: constants,\n animations: animations\n});\n\nexports.animations = animations;\nexports.attributes = attributes;\nexports.breakpoints = breakpoints;\nexports.constants = constants;\nexports.palette = palette;\nexports.spacings = spacings;\nexports.theme = theme;\nexports.typography = typography;\n//# sourceMappingURL=index.js.map\n"],"names":[],"mappings":";;;AAEA,MAAM,CAAC,cAAc,CAAC,KAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D;AACA,IAAI,UAAU,GAAG;AACjB,IAAI,YAAY,EAAE;AAClB,QAAQ,UAAU,EAAE,CAAC;AACrB,QAAQ,KAAK,EAAE,CAAC;AAChB,QAAQ,OAAO,EAAE,EAAE;AACnB,QAAQ,GAAG,EAAE,EAAE;AACf,QAAQ,OAAO,EAAE,GAAG;AACpB,QAAQ,MAAM,EAAE,KAAK;AACrB,KAAK;AACL,IAAI,SAAS,EAA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WAAW,EAAE,WAAW;AAChC,QAAQ,QAAQ,EAAE,QAAQ;AAC1B,QAAQ,SAAS,EAAE,SAAS;AAC5B,QAAQ,UAAU,EAAE,UAAU;AAC9B,KAAK,EAAE;AACP,CAAC,CAAC;AACF,IAAI,KAAK,GAAG,WAAW,CAAC;AACxB,IAAI,OAAO,EAAE,OAAO;AACpB,IAAI,UAAU,EAAE,UAAU;AAC1B,IAAI,UAAU,EAAE,UAAU;AAC1B,IAAI,WAAW,EAAE,WAAW;AAC5B,IAAI,QAAQ,EAAE,QAAQ;AACtB,IAAI,SAAS,EAAE,SAAS;AACxB,IAAI,UAAU,EAAE,UAAU;AAC1B,CAAC,CAAC,CAAC;AACH;AACkB,KAAA,CAAA,UAAA,GAAG,WAAW;AACd,KAAA,CAAA,UAAA,GAAG,WAAW;AACb,KAAA,CAAA,WAAA,GAAG,YAAY;AACjB,KAAA,CAAA,SAAA,GAAG,UAAU;AACf,KAAA,CAAA,OAAA,GAAG,QAAQ;AACV,KAAA,CAAA,QAAA,GAAG,SAAS;AACf,IAAA,OAAA,GAAA,KAAA,CAAA,KAAA,GAAG,MAAM;AACJ,KAAA,CAAA,UAAA,GAAG;;;;"}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../design-tokens/build/index.js"],"sourcesContent":["'use strict';\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\nvar attributes = {\n borderRadius: {\n extraSmall: 2,\n small: 5,\n default: 10,\n big: 20,\n rounded: 100,\n circle: '50%'\n },\n boxShadow: {\n small: '0 0 46px 0 rgba(0, 0, 0, 0.13)',\n hover: '0 0 15px 0 rgba(0, 0, 0, 0.13)',\n buttonHover: '0 1px 5px rgba(0, 0, 0, 0.35)',\n buttonActive: 'inset 0 0px 5px rgba(0, 0, 0, 0.15)',\n iconButtonHover: '0 1px 8px rgba(0, 0, 0, 0.35)',\n layoutShadow: '0 1px 0 rgba(0, 0, 0, 0.15)',\n layoutShadowInset: 'inset 0 -1px 0 rgba(0, 0, 0, 0.15)',\n layoutShadowInsetMedium: 'inset 0 -2px 0 rgba(0, 0, 0, 0.15)',\n stepperShadow: '0px -5px 20px rgba(0, 0, 0, 0.04), 0px -2px 6px rgba(0, 0, 0, 0.04), 0px 0px 1px rgba(0, 0, 0, 0.04)',\n highlightBoxShadow: '0 2px 5px 0 rgba(7,52,99,0.15)',\n focusVisible: '0 0 0 2px #000'\n },\n zIndex: {\n modal: 5,\n footer: 4,\n high: 3,\n middle: 2,\n low: 1\n },\n transition: {\n t1: '550ms cubic-bezier(0.19, 1, 0.22, 1)',\n inputTransition: 'box-shadow 250ms ease'\n }\n};\n\nvar breakpoints = {\n xxs: 360,\n xs: 480,\n sm: 576,\n md: 768,\n lg: 960,\n xl: 1060,\n xxl: 1280,\n xxxl: 1400\n};\n\nvar constants = {\n BackgroundOverlayOpacity: 0.3,\n buttonBadgeFontSize: 11,\n buttonBadgePadding: 6,\n buttonBadgePaddingSmall: 2,\n buttonBadgeRightPosition: -4,\n buttonBadgeTopPosition: -3,\n buttonChildExtraSmallGap: 4,\n buttonChildGap: 12,\n buttonChildSmallGap: 8,\n buttonWrapperMinWidth: 120,\n cartCardImageSize: 48,\n cartListItemDescriptionSize: 11,\n chipCheckBox: 12,\n couponButtonContainer: 102,\n dateBoxHorizontalPadding: 12,\n deliverySlotArrowOffset: 42,\n deliverySlotItemHeight: 91,\n deliverySlotItemWidth: 130,\n deliverySlotItemWidthDesktop: 146,\n headerBreakpoint: 991,\n headerScrollFadeRange: 50,\n headerWrapperVerticalPadding: 20,\n iconToolTipArrowLeft: 2.5,\n iconToolTipArrowTop: 32,\n iconToolTipBoxWidth: 300,\n iconToolTipTop: 36,\n infoBlockBorderWidth: 4,\n infoBlockImageMaxWidthDesktop: 100,\n InputWithIconPaddingRight: 45,\n itemGap: 2,\n listImageMaxHeight: 50,\n listImageMaxHeightSmall: 32,\n listImageMaxWidth: 64,\n listImageMaxWidthSmall: 32,\n listItemFlexGap: 20,\n MarkingWrapperGridGap: 2,\n maxHeightFaderHeight: 50,\n menuHorizontalMargin: 12,\n menuListItemIconSize: 16,\n mobileLabelPaddingRight: 35,\n mobileLabelPaddingRightMobile: 20,\n mobileLabelVerticalPadding: 10,\n mobileLabelVerticalPaddingMobile: 8,\n mobileTablePadding: 12,\n mobileTablePaddingBottom: 6,\n modalConfirmMaxWidth: 480,\n modalContainerMaxWidth: 615,\n navHeaderHeight: 81,\n navHeaderHeightSmall: 64,\n navMainLinkWidth: 105,\n pageContainerMaxWidth: 776,\n pageContentMaxWidth: 1232,\n paginationButtonWidth: 44,\n priceBaseLetterSpacing: -0.03,\n priceIndicatorRotate: 1,\n priceRotate: 2.5,\n priceSplashHorizontalPadding: 10,\n priceVariantBadgeSize: 48,\n quantitySelectorWidthLarge: 140,\n quantitySelectorWidthSmall: 123,\n searchListItemGridTemplateColumns: 25,\n searchModalZIndex: 900,\n selectButtonWidth: 169,\n selectMobileWidth: 175,\n selectPadding: 2,\n selectWidth: 225,\n tableHeaderVerticalPadding: 12,\n tableRowHorizontalPadding: 14,\n tableRowVerticalPadding: 16,\n toolTipArrowBorderWidth: 5,\n toolTipArrowMarginTop: -5,\n toolTipBackground: 'rgba(0,0,0,.7)',\n toolTipCloseSize: 20,\n tooltipMinWidth: 80,\n toolTipTop: 35,\n twoColumnsContainerMaxWidth: 1024,\n zipCodeInputSize: 48,\n zipCodeInputSizeSmall: 40\n};\n\nvar palette = {\n // pallette same as brand colors\n primary: '#FFDF43',\n secondary: '#0071B9',\n // brand colors\n brandYellow: '#FFDF43',\n brandBlue: '#0071B9',\n brandPurple: '#A71680',\n brandPrio: '#a80073',\n // shades\n yellowLighter: '#FFFBE7',\n yellowLight: '#FFF7D1',\n blueLight: '#ECF7FE',\n blueLighter: '#D3EDFD',\n blueMedium: '#92B9D3',\n greenLight: '#F2FDF2',\n greenMedium: '#BEE5BE',\n redLight: '#FCE9E9',\n redLighter: '#FDF2F2',\n priceTagRed: '#C80700',\n // recipeTags\n recipeVego: '#65DB69',\n recipeLactose: '#8CCDF0',\n recipeGluten: '#D5642A',\n // link same as alert blue\n link: '#0072BB',\n // black / white\n white: '#FFFFFF',\n black: '#000000',\n // grayscale\n lightest: '#F7F7F7',\n lighter: '#F1F1F1',\n light: '#E8E8E8',\n medium: '#DBDBDB',\n mediumDark: '#6C6C6C',\n dark: '#979797',\n darker: '#4A4A4A',\n darkest: '#333333',\n buttonGray: '#E5E4E5',\n disabledGray: '#B8B8B8',\n disabledDarkGray: '#5c5c5c',\n placeholder: '#8f8f8f',\n border: '#0069AE',\n grayMuted: '#797575',\n grayNeutral: '#D6D6D6',\n boxShadow: '#E1E1E1',\n boxShadowActive: 'rgba(7, 52, 99, 0.15)',\n // Alerts\n alertRed: '#E02721',\n alertBlue: '#0072BB',\n alertGreen: '#3F9A3C',\n // overlay\n darkOverlay: 'rgba(0, 0, 0, 0.6)',\n // transparent\n transparent: '#ffffff00',\n // hover\n brandBlueHover: '#005C99',\n brandYellowHover: '#F5D800',\n brandPrioHover: '#90136F',\n brandBlueActive: '#004D80',\n brandYellowActive: '#DBC100',\n brandPrioActive: '#7A105E',\n none: 'none'\n};\n\nvar spacings = {\n xxxs: 2,\n xxs: 4,\n xxs2: 6,\n xs: 8,\n xs1: 10,\n xs2: 12,\n xs3: 14,\n sm: 16,\n sm1: 18,\n sm2: 20,\n md: 24,\n lg: 32,\n xl: 40,\n xl2: 48,\n xxl: 56\n // More in figma, but talk with Johan to generalize it more.\n // xxx: 72, 88, 120, 152 ?\n};\n\nvar typography = {\n type: {\n primary: '\"Poppins\", \"Helvetica Neue\", Helvetica, Arial, sans-serif',\n display: '\"Dom Casual\"',\n code: '\"SFMono-Regular\", Consolas, \"Liberation Mono\", Menlo, Courier, monospace'\n },\n weight: {\n regular: '400',\n medium: '500',\n semiBold: '600',\n bold: '700',\n extraBold: '800'\n },\n size: {\n // xs all from 0-10\n xs: 10,\n // s all from 11-20\n s0: 11,\n s1: 12,\n s2: 13,\n s3: 15,\n s4: 18,\n // m all from 21-40\n m1: 24,\n m2: 30,\n // l all from 41 >\n l1: 41,\n code: 90\n },\n lineHeight: {\n // xs all from 0-15\n xs: 15,\n // s all from 16-20\n s1: 18,\n s2: 19,\n // m all from 21-40\n m1: 22,\n m2: 27,\n m3: 36,\n // l all from 41 >\n l1: 45\n }\n};\n\nvar animations = {\n tapScale: 0.9,\n hoverScale: 1.1,\n buttonTransition: 'all 250ms cubic-bezier(0.165, 0.84, 0.44, 1)',\n rippleTransition: '750ms cubic-bezier(0.19, 1, 0.22, 1)',\n saveButtonAnimationComplete: 600\n};\n\nvar createTheme = function (_a) {\n var palette = _a.palette, typography = _a.typography, attributes = _a.attributes, breakpoints = _a.breakpoints, spacings = _a.spacings, constants = _a.constants, animations = _a.animations;\n return ({\n palette: palette,\n typography: typography,\n attributes: attributes,\n breakpoints: breakpoints,\n spacings: spacings,\n constants: constants,\n animations: animations\n });\n};\nvar theme = createTheme({\n palette: palette,\n typography: typography,\n attributes: attributes,\n breakpoints: breakpoints,\n spacings: spacings,\n constants: constants,\n animations: animations\n});\n\nexports.animations = animations;\nexports.attributes = attributes;\nexports.breakpoints = breakpoints;\nexports.constants = constants;\nexports.palette = palette;\nexports.spacings = spacings;\nexports.theme = theme;\nexports.typography = typography;\n//# sourceMappingURL=index.js.map\n"],"names":[],"mappings":";;;AAEA,MAAM,CAAC,cAAc,CAAC,KAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D;AACA,IAAI,UAAU,GAAG;AACjB,IAAI,YAAY,EAAE;AAClB,QAAQ,UAAU,EAAE,CAAC;AACrB,QAAQ,KAAK,EAAE,CAAC;AAChB,QAAQ,OAAO,EAAE,EAAE;AACnB,QAAQ,GAAG,EAAE,EAAE;AACf,QAAQ,OAAO,EAAE,GAAG;AACpB,QAAQ,MAAM,EAAE,KAAK;AACrB,KAAK;AACL,IAAI,SAAS,EAAE;AACf,QAAQ,KAAK,EAAE,gCAAgC;AAC/C,QAAQ,KAAK,EAA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,QAAQ,EAAE,QAAQ;AAC1B,QAAQ,SAAS,EAAE,SAAS;AAC5B,QAAQ,UAAU,EAAE,UAAU;AAC9B,KAAK,EAAE;AACP,CAAC,CAAC;AACF,IAAI,KAAK,GAAG,WAAW,CAAC;AACxB,IAAI,OAAO,EAAE,OAAO;AACpB,IAAI,UAAU,EAAE,UAAU;AAC1B,IAAI,UAAU,EAAE,UAAU;AAC1B,IAAI,WAAW,EAAE,WAAW;AAC5B,IAAI,QAAQ,EAAE,QAAQ;AACtB,IAAI,SAAS,EAAE,SAAS;AACxB,IAAI,UAAU,EAAE,UAAU;AAC1B,CAAC,CAAC,CAAC;AACH;AACkB,KAAA,CAAA,UAAA,GAAG,WAAW;AACd,KAAA,CAAA,UAAA,GAAG,WAAW;AACb,KAAA,CAAA,WAAA,GAAG,YAAY;AACjB,KAAA,CAAA,SAAA,GAAG,UAAU;AACf,KAAA,CAAA,OAAA,GAAG,QAAQ;AACV,KAAA,CAAA,QAAA,GAAG,SAAS;AACf,IAAA,OAAA,GAAA,KAAA,CAAA,KAAA,GAAG,MAAM;AACJ,KAAA,CAAA,UAAA,GAAG;;;;"}
|
|
@@ -370,7 +370,15 @@ var useFixedModalScroll = function (active, querySelector) {
|
|
|
370
370
|
React.useEffect(function () {
|
|
371
371
|
var pos = window === null || window === void 0 ? void 0 : window.scrollY;
|
|
372
372
|
var selector = querySelector || (document === null || document === void 0 ? void 0 : document.body);
|
|
373
|
-
if (
|
|
373
|
+
if (!selector)
|
|
374
|
+
return;
|
|
375
|
+
var savedStyles = {
|
|
376
|
+
top: selector.style.top,
|
|
377
|
+
overflowY: selector.style.overflowY,
|
|
378
|
+
position: selector.style.position,
|
|
379
|
+
scrollY: pos
|
|
380
|
+
};
|
|
381
|
+
if (active) {
|
|
374
382
|
setPrevPosition(pos);
|
|
375
383
|
selector.style.overflowY = 'scroll';
|
|
376
384
|
selector.style.position = 'fixed';
|
|
@@ -384,6 +392,28 @@ var useFixedModalScroll = function (active, querySelector) {
|
|
|
384
392
|
window.scrollTo(0, prevPosition);
|
|
385
393
|
}
|
|
386
394
|
}
|
|
395
|
+
return function () {
|
|
396
|
+
if (selector) {
|
|
397
|
+
if (savedStyles.top) {
|
|
398
|
+
selector.style.top = savedStyles.top;
|
|
399
|
+
}
|
|
400
|
+
else {
|
|
401
|
+
selector.style.removeProperty('top');
|
|
402
|
+
}
|
|
403
|
+
if (savedStyles.overflowY) {
|
|
404
|
+
selector.style.overflowY = savedStyles.overflowY;
|
|
405
|
+
}
|
|
406
|
+
else {
|
|
407
|
+
selector.style.overflowY = 'auto';
|
|
408
|
+
}
|
|
409
|
+
if (savedStyles.position) {
|
|
410
|
+
selector.style.position = savedStyles.position;
|
|
411
|
+
}
|
|
412
|
+
else {
|
|
413
|
+
selector.style.position = 'relative';
|
|
414
|
+
}
|
|
415
|
+
}
|
|
416
|
+
};
|
|
387
417
|
}, [active, querySelector]);
|
|
388
418
|
};
|
|
389
419
|
|