@citygross/components 0.7.77 → 0.7.79
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/Button/Button.d.ts +2 -1
- package/build/@types/components/Button/Button.stories.d.ts +1 -0
- package/build/@types/components/Button/Button.styles.d.ts +10 -0
- package/build/@types/components/IconText/IconText.d.ts +9 -0
- package/build/@types/components/IconText/IconText.stories.d.ts +9 -0
- package/build/@types/components/IconText/IconText.styles.d.ts +5 -0
- package/build/@types/components/Nav/Nav.d.ts +20 -0
- package/build/@types/components/Nav/Nav.stories.d.ts +14 -0
- package/build/@types/components/Nav/Nav.styles.d.ts +19 -0
- package/build/@types/components/NavMainLink/NavMainLink.d.ts +9 -0
- package/build/@types/components/NavMainLink/NavMainLink.stories.d.ts +8 -0
- package/build/@types/components/NavMainLink/NavMainLink.styled.d.ts +6 -0
- package/build/@types/components/Pagination/Pagination.d.ts +2 -1
- package/build/@types/components/SearchBar/SearchBar.d.ts +13 -0
- package/build/@types/components/SearchBar/SearchBar.stories.d.ts +23 -0
- package/build/@types/components/SearchBar/SearchBar.styles.d.ts +19 -0
- package/build/@types/components/Timeline/Timeline.d.ts +2 -3
- package/build/@types/components/Timeline/Timeline.stories.d.ts +4 -12
- package/build/cjs/_virtual/{index.js_commonjs-exports → index.js} +1 -1
- package/build/cjs/_virtual/index.js.map +1 -0
- package/build/cjs/_virtual/{index2.js_commonjs-exports → index2.js} +1 -1
- package/build/cjs/_virtual/index2.js.map +1 -0
- package/build/cjs/components/src/components/AddressBlock/AddressBlock.js +15 -15
- package/build/cjs/components/src/components/AddressBlock/AddressBlock.styles.js +1 -1
- package/build/cjs/components/src/components/AlertBox/AlertBox.js +4 -4
- package/build/cjs/components/src/components/AlertBox/AlertBox.styles.js +2 -2
- package/build/cjs/components/src/components/BackButton/BackButton.js +4 -4
- package/build/cjs/components/src/components/BackButton/BackButton.styles.js +2 -2
- package/build/cjs/components/src/components/BackgroundImage/BackgroundImage.js +5 -5
- package/build/cjs/components/src/components/BackgroundImage/BackgroundImage.styles.js +5 -5
- package/build/cjs/components/src/components/Badge/Badge.js +1 -1
- package/build/cjs/components/src/components/Badge/Badge.styles.js +1 -1
- package/build/cjs/components/src/components/Box/Box.js +3 -3
- package/build/cjs/components/src/components/Box/Box.styles.js +1 -1
- package/build/cjs/components/src/components/BoxArrow/BoxArrow.js +2 -2
- package/build/cjs/components/src/components/BoxArrow/BoxArrow.styles.js +1 -1
- package/build/cjs/components/src/components/Button/Button.js +9 -8
- package/build/cjs/components/src/components/Button/Button.js.map +1 -1
- package/build/cjs/components/src/components/Button/Button.styles.js +21 -10
- package/build/cjs/components/src/components/Button/Button.styles.js.map +1 -1
- package/build/cjs/components/src/components/Button/IconButton.js +5 -5
- package/build/cjs/components/src/components/Button/PaginationButton.js +5 -5
- package/build/cjs/components/src/components/CartItemSummary/CartItemSummary.js +7 -7
- package/build/cjs/components/src/components/CartItemSummary/CartItemSummary.styles.js +4 -4
- package/build/cjs/components/src/components/CartSummary/CartSummary.js +35 -35
- package/build/cjs/components/src/components/CartSummary/CartSummary.styles.js +7 -7
- package/build/cjs/components/src/components/Chips/Chip.js +4 -4
- package/build/cjs/components/src/components/Chips/Chip.styles.js +3 -3
- package/build/cjs/components/src/components/Collapsable/Collapsable.js +7 -7
- package/build/cjs/components/src/components/Collapsable/Collapsable.styles.js +4 -4
- package/build/cjs/components/src/components/CustomerInfoBlock/CustomerInfoBlock.js +2 -2
- package/build/cjs/components/src/components/CustomerInfoBlock/CustomerInfoBlock.styles.js +1 -1
- package/build/cjs/components/src/components/DateBox/DateBox.js +4 -4
- package/build/cjs/components/src/components/DateBox/DateBox.styles.js +4 -4
- package/build/cjs/components/src/components/DeliverySlotItem/DeliverySlotItem.js +8 -8
- package/build/cjs/components/src/components/DeliverySlotItem/DeliverySlotItem.styles.js +5 -5
- package/build/cjs/components/src/components/DeliveryTimeBlock/DeliveryTimeBlock.js +5 -5
- package/build/cjs/components/src/components/DeliveryTimeBlock/DeliveryTimeBlock.styles.js +2 -2
- package/build/cjs/components/src/components/Divider/Divider.js +1 -1
- package/build/cjs/components/src/components/Divider/Divider.styles.js +1 -1
- package/build/cjs/components/src/components/DotIndicator/DotIndicator.js +1 -1
- package/build/cjs/components/src/components/DotIndicator/DotIndicator.styles.js +1 -1
- package/build/cjs/components/src/components/Form/Form.js +2 -2
- package/build/cjs/components/src/components/Form/Form.styles.js +2 -2
- package/build/cjs/components/src/components/FormControl/FormControl.js +4 -4
- package/build/cjs/components/src/components/FormControl/FormControl.styles.js +2 -2
- package/build/cjs/components/src/components/FormElements/Checkbox/Checkbox.js +4 -4
- package/build/cjs/components/src/components/FormElements/Checkbox/Checkbox.styles.js +3 -3
- package/build/cjs/components/src/components/FormElements/Input/Input.js +1 -1
- package/build/cjs/components/src/components/FormElements/Input/Input.styles.js +1 -1
- package/build/cjs/components/src/components/FormElements/Radio/Radio.js +3 -3
- package/build/cjs/components/src/components/FormElements/Radio/Radio.styles.js +3 -3
- package/build/cjs/components/src/components/FormElements/Switch/Switch.js +4 -4
- package/build/cjs/components/src/components/FormElements/Switch/Switch.styles.js +4 -4
- package/build/cjs/components/src/components/FormElements/TextArea/TextArea.js +1 -1
- package/build/cjs/components/src/components/FormElements/TextArea/TextArea.styles.js +1 -1
- package/build/cjs/components/src/components/FormGroup/FormGroup.js +1 -1
- package/build/cjs/components/src/components/FormGroup/FormGroup.styles.js +1 -1
- package/build/cjs/components/src/components/GridContainer/GridContainer.js +1 -1
- package/build/cjs/components/src/components/GridContainer/GridContainer.styles.js +1 -1
- package/build/cjs/components/src/components/Header/Header.js +7 -7
- package/build/cjs/components/src/components/Header/Header.styles.js +4 -4
- package/build/cjs/components/src/components/HeaderLink/HeaderLink.js +3 -3
- package/build/cjs/components/src/components/HeaderLink/HeaderLink.styles.js +3 -3
- package/build/cjs/components/src/components/HighlightBox/HighlightBox.js +1 -1
- package/build/cjs/components/src/components/HighlightBox/HighlightBox.styles.js +1 -1
- package/build/cjs/components/src/components/IconToolTip/IconToolTip.js +10 -10
- package/build/cjs/components/src/components/IconToolTip/IconToolTip.styles.js +5 -5
- package/build/cjs/components/src/components/InfoTextBlock/InfoTextBlock.js +6 -6
- package/build/cjs/components/src/components/InfoTextBlock/InfoTextBlock.styles.js +5 -5
- package/build/cjs/components/src/components/LayoutBox/LayoutBox.js +1 -1
- package/build/cjs/components/src/components/LayoutBox/LayoutBox.styles.js +1 -1
- package/build/cjs/components/src/components/Links/Link.js +3 -3
- package/build/cjs/components/src/components/Links/Link.styles.js +2 -2
- package/build/cjs/components/src/components/ListItem/ListItem.js +10 -10
- package/build/cjs/components/src/components/ListItem/ListItem.styles.js +6 -6
- package/build/cjs/components/src/components/ListItemWithRadio/ListItemWithRadio.js +14 -14
- package/build/cjs/components/src/components/ListItemWithRadio/ListItemWithRadio.styles.js +7 -7
- package/build/cjs/components/src/components/Logo/Logo.js +1 -1
- package/build/cjs/components/src/components/Logo/Logo.styles.js +1 -1
- package/build/cjs/components/src/components/Menu/Menu.js +3 -3
- package/build/cjs/components/src/components/Menu/Menu.styles.js +3 -3
- package/build/cjs/components/src/components/Menu/MenuItem.js +1 -1
- package/build/cjs/components/src/components/MobileTable/MobileTable.styles.js +3 -3
- package/build/cjs/components/src/components/Modal/Modal.js +14 -14
- package/build/cjs/components/src/components/Modal/Modal.styles.js +7 -7
- package/build/cjs/components/src/components/Pagination/Pagination.js +11 -8
- package/build/cjs/components/src/components/Pagination/Pagination.js.map +1 -1
- package/build/cjs/components/src/components/Pagination/Pagination.styles.js +2 -2
- package/build/cjs/components/src/components/ProgressBar/ProgressBar.js +2 -2
- package/build/cjs/components/src/components/ProgressBar/ProgressBar.styled.js +2 -2
- package/build/cjs/components/src/components/QuantitySelector/QuantitySelector.js +9 -11
- package/build/cjs/components/src/components/QuantitySelector/QuantitySelector.js.map +1 -1
- package/build/cjs/components/src/components/QuantitySelector/QuantitySelector.styles.js +3 -3
- package/build/cjs/components/src/components/RadioBox/RadioBoxItem.js +2 -2
- package/build/cjs/components/src/components/RadioBox/RadioBoxItem.styles.js +1 -1
- package/build/cjs/components/src/components/RadioBox/RadioBoxList.js +8 -8
- package/build/cjs/components/src/components/RadioBox/RadioBoxList.styles.js +4 -4
- package/build/cjs/components/src/components/RadioGroup/RadioGroup.js +3 -3
- package/build/cjs/components/src/components/RadioGroup/RadioGroup.styles.js +2 -2
- package/build/cjs/components/src/components/RadioListItem/RadioListItem.js +10 -10
- package/build/cjs/components/src/components/RadioListItem/RadioListItem.styles.js +7 -7
- package/build/cjs/components/src/components/RippleContainer/RippleContainer.js +1 -1
- package/build/cjs/components/src/components/RippleContainer/RippleContainer.styles.js +1 -1
- package/build/cjs/components/src/components/Select/Select.js +2 -2
- package/build/cjs/components/src/components/Select/Select.styles.js +2 -2
- package/build/cjs/components/src/components/Slider/Slider.js +7 -7
- package/build/cjs/components/src/components/Slider/Slider.styles.js +5 -5
- package/build/cjs/components/src/components/Spacer/Spacer.js +1 -1
- package/build/cjs/components/src/components/Spacer/Spacer.styles.js +1 -1
- package/build/cjs/components/src/components/Spinner/Spinner.js +1 -1
- package/build/cjs/components/src/components/Spinner/Spinner.styles.js +1 -1
- package/build/cjs/components/src/components/Stepper/Stepper.styles.js +4 -4
- package/build/cjs/components/src/components/Stepper/StepperList.js +4 -4
- package/build/cjs/components/src/components/Stepper/StepperListItem.js +6 -6
- package/build/cjs/components/src/components/StepperMobile/StepperMobile.js +8 -8
- package/build/cjs/components/src/components/StepperMobile/StepperMobile.styles.js +2 -2
- package/build/cjs/components/src/components/Table/Table.styles.js +5 -5
- package/build/cjs/components/src/components/Timeline/Timeline.js +12 -15
- package/build/cjs/components/src/components/Timeline/Timeline.js.map +1 -1
- package/build/cjs/components/src/components/Timeline/Timeline.styles.js +4 -4
- package/build/cjs/components/src/components/ToolTip/ToolTip.js +3 -3
- package/build/cjs/components/src/components/ToolTip/ToolTip.styles.js +2 -2
- package/build/cjs/components/src/components/UnorderedList/UnorderedList.styles.js +2 -2
- package/build/cjs/components/src/components/WarningLabel/WarningLabel.js +2 -2
- package/build/cjs/components/src/components/WarningLabel/WarningLabel.styles.js +1 -1
- package/build/cjs/components/src/containers/PageContainer/PageContainer.js +2 -2
- package/build/cjs/components/src/containers/PageContainer/PageContainer.styles.js +2 -2
- package/build/cjs/components/src/containers/TwoColumnsContainer/TwoColumnsPageContainer.js +4 -4
- package/build/cjs/components/src/containers/TwoColumnsContainer/TwoColumnsPageContainer.styles.js +4 -4
- package/build/cjs/components/src/index.js +6 -18
- package/build/cjs/components/src/index.js.map +1 -1
- package/build/cjs/design-tokens/build/index.js +11 -2
- package/build/cjs/design-tokens/build/index.js.map +1 -1
- package/build/cjs/utils/build/index.js +5 -5
- package/build/cjs/utils/build/index.js.map +1 -1
- package/build/es/_virtual/index.js +4 -0
- package/build/es/_virtual/index.js.map +1 -0
- package/build/es/_virtual/index2.js +4 -0
- package/build/es/_virtual/index2.js.map +1 -0
- package/build/es/components/src/components/BoxArrow/BoxArrow.js +1 -1
- package/build/es/components/src/components/Button/Button.js +6 -5
- package/build/es/components/src/components/Button/Button.js.map +1 -1
- package/build/es/components/src/components/Button/Button.styles.js +20 -11
- package/build/es/components/src/components/Button/Button.styles.js.map +1 -1
- package/build/es/components/src/components/ListItem/assets/fallback_grocery.svg.js +1 -1
- package/build/es/components/src/components/Pagination/Pagination.js +5 -2
- package/build/es/components/src/components/Pagination/Pagination.js.map +1 -1
- package/build/es/components/src/components/Timeline/Timeline.js +12 -15
- package/build/es/components/src/components/Timeline/Timeline.js.map +1 -1
- package/build/es/design-tokens/build/index.js +11 -2
- package/build/es/design-tokens/build/index.js.map +1 -1
- package/build/es/utils/build/index.js +4 -4
- package/build/es/utils/build/index.js.map +1 -1
- package/package.json +7 -7
- package/build/cjs/_virtual/index.js_commonjs-exports.map +0 -1
- package/build/cjs/_virtual/index2.js_commonjs-exports.map +0 -1
- package/build/es/_virtual/index.js_commonjs-exports +0 -4
- package/build/es/_virtual/index.js_commonjs-exports.map +0 -1
- package/build/es/_virtual/index2.js_commonjs-exports +0 -4
- package/build/es/_virtual/index2.js_commonjs-exports.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index2.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { theme } from '@citygross/design-tokens';
|
|
3
|
-
import { BasePrimaryButton, Loading, LoadingContainer, LoadingSpinner } from './Button.styles.js';
|
|
3
|
+
import { BasePrimaryButton, Loading, LoadingContainer, LoadingSpinner, ButtonChildContainer, ButtonBadge } from './Button.styles.js';
|
|
4
4
|
|
|
5
5
|
var ButtonSize;
|
|
6
6
|
(function (ButtonSize) {
|
|
@@ -18,19 +18,20 @@ var ButtonColor;
|
|
|
18
18
|
})(ButtonColor || (ButtonColor = {}));
|
|
19
19
|
function Button(_a) {
|
|
20
20
|
var _b;
|
|
21
|
-
var _c = _a.center, center = _c === void 0 ? true : _c, _d = _a.color, color = _d === void 0 ? 'primary' : _d, fullWidth = _a.fullWidth, flexReverse = _a.flexReverse, icon = _a.icon, selected = _a.selected, isDisabled = _a.isDisabled, loading = _a.loading, noWrap = _a.noWrap, onClick = _a.onClick, _e = _a.size, size = _e === void 0 ? 'large' : _e, xsSize = _a.xsSize, children = _a.children;
|
|
21
|
+
var _c = _a.center, center = _c === void 0 ? true : _c, _d = _a.color, color = _d === void 0 ? 'primary' : _d, fullWidth = _a.fullWidth, flexReverse = _a.flexReverse, icon = _a.icon, selected = _a.selected, isDisabled = _a.isDisabled, loading = _a.loading, noWrap = _a.noWrap, onClick = _a.onClick, _e = _a.size, size = _e === void 0 ? 'large' : _e, xsSize = _a.xsSize, borderRadius = _a.borderRadius, _f = _a.childGap, childGap = _f === void 0 ? 4 : _f, buttonBadge = _a.buttonBadge, children = _a.children;
|
|
22
22
|
return (React.createElement(BasePrimaryButton, { center: center, color: theme && theme.palette
|
|
23
23
|
? selected
|
|
24
24
|
? (_b = theme === null || theme === void 0 ? void 0 : theme.palette) === null || _b === void 0 ? void 0 : _b.white
|
|
25
25
|
: theme === null || theme === void 0 ? void 0 : theme.palette[color]
|
|
26
|
-
: 'white', fullWidth: fullWidth, flexReverse: flexReverse, icon: icon, selected: selected, isDisabled: loading || isDisabled, loading: loading || null, noWrap: noWrap, size: size, xsSize: xsSize, onClick: function (e) { return onClick && onClick(e); } },
|
|
26
|
+
: 'white', fullWidth: fullWidth, flexReverse: flexReverse, icon: icon, selected: selected, isDisabled: loading || isDisabled, loading: loading || null, noWrap: noWrap, size: size, xsSize: xsSize, onClick: function (e) { return onClick && onClick(e); }, borderRadius: borderRadius, childGap: childGap },
|
|
27
27
|
loading && (React.createElement(Loading, null,
|
|
28
28
|
React.createElement(LoadingContainer, { xsSize: xsSize, size: size },
|
|
29
29
|
React.createElement(LoadingSpinner, null)))),
|
|
30
|
-
icon ? (React.createElement(
|
|
30
|
+
icon ? (React.createElement(ButtonChildContainer, { size: size, flexReverse: flexReverse, noWrap: noWrap, childGap: childGap },
|
|
31
31
|
icon,
|
|
32
32
|
children)) : (children),
|
|
33
|
-
React.createElement("span", { className: "ripple" })
|
|
33
|
+
React.createElement("span", { className: "ripple" }),
|
|
34
|
+
buttonBadge && React.createElement(ButtonBadge, null, buttonBadge)));
|
|
34
35
|
}
|
|
35
36
|
|
|
36
37
|
export { Button, ButtonColor, ButtonSize };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Button.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -54,15 +54,15 @@ var SpinnerSize = function (size) {
|
|
|
54
54
|
return '26px';
|
|
55
55
|
}
|
|
56
56
|
};
|
|
57
|
-
var BaseButton = styled.button(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n /* reset */\n outline: none;\n border: none;\n\n backface-visibility: hidden;\n cursor: pointer;\n border-radius: ", "px;\n /* overflow: hidden; */\n pointer-events: ", ";\n -webkit-font-smoothing: antialiased;\n user-select: ", ";\n\n position: relative;\n\n /* typography */\n\n font-family: ", ";\n font-weight: ", ";\n text-align: ", ";\n white-space: ", ";\n\n /* colors */\n\n background: ", ";\n color: ", ";\n\n /* Width & Height */\n\n width: ", ";\n\n &::after {\n content: '';\n position: absolute;\n width: 100%;\n height: 100%;\n border-radius: ", "px;\n top: 0;\n left: 0;\n box-shadow: ", ";\n opacity: 0;\n -webkit-transition: ", ";\n transition: ", ";\n }\n\n &::before {\n content: '';\n position: absolute;\n width: 100%;\n height: 100%;\n border-radius: ", "px;\n top: 0;\n left: 0;\n box-shadow: ", ";\n opacity: 0;\n -webkit-transition: ", ";\n transition: ", ";\n }\n\n /* Hover Effect */\n\n &:hover {\n ::after {\n opacity: 1;\n }\n }\n &:active {\n ::before {\n opacity: 1;\n }\n ::after {\n opacity: 0;\n }\n }\n /* Media Queries */\n\n @media (max-width: ", "px) {\n align-self: ", ";\n }\n"], ["\n /* reset */\n outline: none;\n border: none;\n\n backface-visibility: hidden;\n cursor: pointer;\n border-radius: ", "px;\n /* overflow: hidden; */\n pointer-events: ", ";\n -webkit-font-smoothing: antialiased;\n user-select: ", ";\n\n position: relative;\n\n /* typography */\n\n font-family: ", ";\n font-weight: ", ";\n text-align: ", ";\n white-space: ", ";\n\n /* colors */\n\n background: ", ";\n color: ", ";\n\n /* Width & Height */\n\n width: ", ";\n\n &::after {\n content: '';\n position: absolute;\n width: 100%;\n height: 100%;\n border-radius: ", "px;\n top: 0;\n left: 0;\n box-shadow: ", ";\n opacity: 0;\n -webkit-transition: ", ";\n transition: ", ";\n }\n\n &::before {\n content: '';\n position: absolute;\n width: 100%;\n height: 100%;\n border-radius: ", "px;\n top: 0;\n left: 0;\n box-shadow: ", ";\n opacity: 0;\n -webkit-transition: ", ";\n transition: ", ";\n }\n\n /* Hover Effect */\n\n &:hover {\n ::after {\n opacity: 1;\n }\n }\n &:active {\n ::before {\n opacity: 1;\n }\n ::after {\n opacity: 0;\n }\n }\n /* Media Queries */\n\n @media (max-width: ", "px) {\n align-self: ", ";\n }\n"])), function (props) { var _a; return (_a = props.theme.attributes) === null ||
|
|
57
|
+
var BaseButton = styled.button(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n /* reset */\n outline: none;\n border: none;\n\n backface-visibility: hidden;\n cursor: pointer;\n border-radius: ", "px;\n /* overflow: hidden; */\n pointer-events: ", ";\n -webkit-font-smoothing: antialiased;\n user-select: ", ";\n\n position: relative;\n\n /* typography */\n\n font-family: ", ";\n font-weight: ", ";\n text-align: ", ";\n white-space: ", ";\n\n /* colors */\n\n background: ", ";\n color: ", ";\n\n /* Width & Height */\n\n width: ", ";\n\n &::after {\n content: '';\n position: absolute;\n width: 100%;\n height: 100%;\n border-radius: ", "px;\n top: 0;\n left: 0;\n box-shadow: ", ";\n opacity: 0;\n -webkit-transition: ", ";\n transition: ", ";\n }\n\n &::before {\n content: '';\n position: absolute;\n width: 100%;\n height: 100%;\n border-radius: ", "px;\n top: 0;\n left: 0;\n box-shadow: ", ";\n opacity: 0;\n -webkit-transition: ", ";\n transition: ", ";\n }\n\n /* Hover Effect */\n\n &:hover {\n ::after {\n opacity: 1;\n }\n }\n &:active {\n ::before {\n opacity: 1;\n }\n ::after {\n opacity: 0;\n }\n }\n /* Media Queries */\n\n @media (max-width: ", "px) {\n align-self: ", ";\n }\n"], ["\n /* reset */\n outline: none;\n border: none;\n\n backface-visibility: hidden;\n cursor: pointer;\n border-radius: ", "px;\n /* overflow: hidden; */\n pointer-events: ", ";\n -webkit-font-smoothing: antialiased;\n user-select: ", ";\n\n position: relative;\n\n /* typography */\n\n font-family: ", ";\n font-weight: ", ";\n text-align: ", ";\n white-space: ", ";\n\n /* colors */\n\n background: ", ";\n color: ", ";\n\n /* Width & Height */\n\n width: ", ";\n\n &::after {\n content: '';\n position: absolute;\n width: 100%;\n height: 100%;\n border-radius: ", "px;\n top: 0;\n left: 0;\n box-shadow: ", ";\n opacity: 0;\n -webkit-transition: ", ";\n transition: ", ";\n }\n\n &::before {\n content: '';\n position: absolute;\n width: 100%;\n height: 100%;\n border-radius: ", "px;\n top: 0;\n left: 0;\n box-shadow: ", ";\n opacity: 0;\n -webkit-transition: ", ";\n transition: ", ";\n }\n\n /* Hover Effect */\n\n &:hover {\n ::after {\n opacity: 1;\n }\n }\n &:active {\n ::before {\n opacity: 1;\n }\n ::after {\n opacity: 0;\n }\n }\n /* Media Queries */\n\n @media (max-width: ", "px) {\n align-self: ", ";\n }\n"])), function (props) { var _a, _b; return (_a = props.borderRadius) !== null && _a !== void 0 ? _a : (_b = props.theme.attributes) === null || _b === void 0 ? void 0 : _b.borderRadius.extraSmall; }, function (props) { return (props.isDisabled ? 'none' : 'all'); }, function (props) { return props.isDisabled && 'none'; }, function (props) { var _a, _b; return (_b = (_a = props === null || props === void 0 ? void 0 : props.theme) === null || _a === void 0 ? void 0 : _a.typography) === null || _b === void 0 ? void 0 : _b.type.primary; }, function (props) { var _a, _b; return (_b = (_a = props === null || props === void 0 ? void 0 : props.theme) === null || _a === void 0 ? void 0 : _a.typography) === null || _b === void 0 ? void 0 : _b.weight.medium; }, function (props) { return (props.center ? 'center' : 'initial'); }, function (props) { return (props.noWrap ? 'nowrap' : 'normal'); }, function (props) { var _a, _b; return props.isDisabled ? (_b = (_a = props === null || props === void 0 ? void 0 : props.theme) === null || _a === void 0 ? void 0 : _a.palette) === null || _b === void 0 ? void 0 : _b.medium : props.color; }, function (props) {
|
|
58
58
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
59
59
|
return props.color === ((_b = (_a = props === null || props === void 0 ? void 0 : props.theme) === null || _a === void 0 ? void 0 : _a.palette) === null || _b === void 0 ? void 0 : _b.secondary) ||
|
|
60
60
|
props.color === ((_d = (_c = props === null || props === void 0 ? void 0 : props.theme) === null || _c === void 0 ? void 0 : _c.palette) === null || _d === void 0 ? void 0 : _d.darkest) ||
|
|
61
61
|
props.isDisabled
|
|
62
62
|
? (_f = (_e = props === null || props === void 0 ? void 0 : props.theme) === null || _e === void 0 ? void 0 : _e.palette) === null || _f === void 0 ? void 0 : _f.white
|
|
63
63
|
: (_h = (_g = props === null || props === void 0 ? void 0 : props.theme) === null || _g === void 0 ? void 0 : _g.palette) === null || _h === void 0 ? void 0 : _h.darkest;
|
|
64
|
-
}, function (props) { return (props.fullWidth ? '100%' : 'auto'); }, function (props) { var _a; return (_a = props.theme.attributes) === null ||
|
|
65
|
-
var BasePrimaryButton = styled(BaseButton)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n /* TypoGraphy */\n\n font-size: ", ";\n line-height: ", ";\n\n /* shadow */\n\n box-shadow: ", ";\n\n /* Padding */\n\n padding: ", ";\n\n @media (min-width: ", "px) {\n font-size: ", ";\n\n padding: ", ";\n\n box-shadow: ", ";\n }\n
|
|
64
|
+
}, function (props) { return (props.fullWidth ? '100%' : 'auto'); }, function (props) { var _a, _b; return (_a = props.borderRadius) !== null && _a !== void 0 ? _a : (_b = props.theme.attributes) === null || _b === void 0 ? void 0 : _b.borderRadius.extraSmall; }, function (props) { var _a; return (_a = props.theme.attributes) === null || _a === void 0 ? void 0 : _a.boxShadow.buttonHover; }, function (props) { var _a; return (_a = props.theme.animations) === null || _a === void 0 ? void 0 : _a.buttonTransition; }, function (props) { var _a; return (_a = props.theme.animations) === null || _a === void 0 ? void 0 : _a.buttonTransition; }, function (props) { var _a, _b; return (_a = props.borderRadius) !== null && _a !== void 0 ? _a : (_b = props.theme.attributes) === null || _b === void 0 ? void 0 : _b.borderRadius.extraSmall; }, function (props) { var _a; return (_a = props.theme.attributes) === null || _a === void 0 ? void 0 : _a.boxShadow.buttonActive; }, function (props) { var _a; return (_a = props.theme.animations) === null || _a === void 0 ? void 0 : _a.buttonTransition; }, function (props) { var _a; return (_a = props.theme.animations) === null || _a === void 0 ? void 0 : _a.buttonTransition; }, function (props) { var _a, _b; return (_b = (_a = props === null || props === void 0 ? void 0 : props.theme) === null || _a === void 0 ? void 0 : _a.breakpoints) === null || _b === void 0 ? void 0 : _b.xs; }, function (props) { return (props.center ? 'center' : 'initial'); });
|
|
65
|
+
var BasePrimaryButton = styled(BaseButton)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n /* TypoGraphy */\n\n font-size: ", ";\n line-height: ", ";\n\n /* shadow */\n\n box-shadow: ", ";\n\n /* Padding */\n\n padding: ", ";\n\n @media (min-width: ", "px) {\n font-size: ", ";\n\n padding: ", ";\n\n box-shadow: ", ";\n }\n"], ["\n /* TypoGraphy */\n\n font-size: ", ";\n line-height: ", ";\n\n /* shadow */\n\n box-shadow: ", ";\n\n /* Padding */\n\n padding: ", ";\n\n @media (min-width: ", "px) {\n font-size: ", ";\n\n padding: ", ";\n\n box-shadow: ", ";\n }\n"])), function (props) { return ButtonFontSize(props.xsSize || props.size); }, function (props) {
|
|
66
66
|
var _a, _b;
|
|
67
67
|
return props.size === 'small'
|
|
68
68
|
? ((_a = props.theme.typography) === null || _a === void 0 ? void 0 : _a.lineHeight.s2) + "px"
|
|
@@ -96,11 +96,19 @@ var BasePrimaryButton = styled(BaseButton)(templateObject_2 || (templateObject_2
|
|
|
96
96
|
props.color === ((_k = (_j = props === null || props === void 0 ? void 0 : props.theme) === null || _j === void 0 ? void 0 : _j.palette) === null || _k === void 0 ? void 0 : _k.lightest)
|
|
97
97
|
? "inset 0px 0px 0px 1px " + ((_l = props.theme.palette) === null || _l === void 0 ? void 0 : _l.medium)
|
|
98
98
|
: 'none';
|
|
99
|
-
}
|
|
100
|
-
var
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
99
|
+
});
|
|
100
|
+
var ButtonChildContainer = styled.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n display: flex;\n flex-direction: ", ";\n width: 100%;\n gap: ", "px;\n align-items: center;\n justify-content: center;\n flex-wrap: ", ";\n"], ["\n display: flex;\n flex-direction: ", ";\n width: 100%;\n gap: ", "px;\n align-items: center;\n justify-content: center;\n flex-wrap: ", ";\n"])), function (props) { return (props.flexReverse ? 'row-reverse' : 'row'); }, function (props) {
|
|
101
|
+
var _a, _b;
|
|
102
|
+
return props.childGap
|
|
103
|
+
? props.childGap
|
|
104
|
+
: props.size === 'small'
|
|
105
|
+
? (_a = props.theme.constants) === null || _a === void 0 ? void 0 : _a.buttonChildSmallGap
|
|
106
|
+
: (_b = props.theme.constants) === null || _b === void 0 ? void 0 : _b.buttonChildGap;
|
|
107
|
+
}, function (props) { return (props.noWrap ? 'nowrap' : 'wrap'); });
|
|
108
|
+
var Loading = styled.div(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n position: absolute;\n z-index: 3;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n display: flex;\n justify-content: center;\n align-items: center;\n"], ["\n position: absolute;\n z-index: 3;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n display: flex;\n justify-content: center;\n align-items: center;\n"])));
|
|
109
|
+
var LoadingContainer = styled.div(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n width: ", ";\n height: ", ";\n\n @media (min-width: ", "px) {\n width: ", ";\n height: ", ";\n }\n"], ["\n width: ", ";\n height: ", ";\n\n @media (min-width: ", "px) {\n width: ", ";\n height: ", ";\n }\n"])), function (props) { return SpinnerSize(props.xsSize || props.size); }, function (props) { return SpinnerSize(props.xsSize || props.size); }, function (props) { var _a; return (_a = props.theme.breakpoints) === null || _a === void 0 ? void 0 : _a.xs; }, function (props) { return SpinnerSize(props.size); }, function (props) { return SpinnerSize(props.size); });
|
|
110
|
+
var LoadingSpinner = styled(Spinner)(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n width: 100%;\n height: 100%;\n"], ["\n width: 100%;\n height: 100%;\n"])));
|
|
111
|
+
var BaseIconButton = styled(BaseButton)(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n padding: ", "px;\n border-radius: 50%;\n display: inline-flex;\n justify-content: center;\n align-items: center;\n margin: 0;\n height: ", "px;\n width: ", "px;\n min-width: ", "px;\n ", ";\n\n &::after {\n border-radius: 50%;\n box-shadow: ", ";\n }\n &::before {\n border-radius: 50%;\n }\n"], ["\n padding: ", "px;\n border-radius: 50%;\n display: inline-flex;\n justify-content: center;\n align-items: center;\n margin: 0;\n height: ", "px;\n width: ", "px;\n min-width: ", "px;\n ", ";\n\n &::after {\n border-radius: 50%;\n box-shadow: ", ";\n }\n &::before {\n border-radius: 50%;\n }\n"])), function (props) { var _a; return (_a = props.theme.spacings) === null || _a === void 0 ? void 0 : _a.xxs; }, function (props) { return props.height || 32; }, function (props) { return props.width || 32; }, function (props) { return props.width || 32; }, function (props) {
|
|
104
112
|
var _a;
|
|
105
113
|
return props.shadow && props.border
|
|
106
114
|
? "box-shadow: 0px 1px 0px rgba(0, 0, 0, 0.15), inset 0px 0px 0px 1px " + ((_a = props.theme.palette) === null || _a === void 0 ? void 0 : _a.medium)
|
|
@@ -110,13 +118,14 @@ var BaseIconButton = styled(BaseButton)(templateObject_6 || (templateObject_6 =
|
|
|
110
118
|
? "box-shadow: inset 0px 0px 0px 1px " + props.border
|
|
111
119
|
: '';
|
|
112
120
|
}, function (props) { var _a, _b; return (_b = (_a = props.theme.attributes) === null || _a === void 0 ? void 0 : _a.boxShadow) === null || _b === void 0 ? void 0 : _b.iconButtonHover; });
|
|
113
|
-
var BasePaginationButton = styled(BaseButton)(
|
|
121
|
+
var BasePaginationButton = styled(BaseButton)(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n height: ", "px;\n width: ", "px;\n min-width: ", "px;\n text-align: center;\n ", ";\n display: inline-flex;\n align-items: center;\n justify-content: center;\n"], ["\n height: ", "px;\n width: ", "px;\n min-width: ", "px;\n text-align: center;\n ", ";\n display: inline-flex;\n align-items: center;\n justify-content: center;\n"])), function (props) { return props.height || 36; }, function (props) { return props.width || 36; }, function (props) { return props.width || 36; }, function (props) {
|
|
114
122
|
var _a, _b, _c;
|
|
115
123
|
return props.color !== ((_b = (_a = props === null || props === void 0 ? void 0 : props.theme) === null || _a === void 0 ? void 0 : _a.palette) === null || _b === void 0 ? void 0 : _b.white)
|
|
116
124
|
? 'box-shadow: inset 0px -1px 0px rgba(0, 0, 0, 0.15)'
|
|
117
125
|
: "box-shadow: inset 0px 0px 0px 1px " + ((_c = props.theme.palette) === null || _c === void 0 ? void 0 : _c.medium);
|
|
118
126
|
});
|
|
119
|
-
var
|
|
127
|
+
var ButtonBadge = styled.div(templateObject_9 || (templateObject_9 = __makeTemplateObject(["\n position: absolute;\n top: ", "px;\n right: ", "px;\n padding: 0 7px;\n background: black;\n color: white;\n width: fit-content;\n border-radius: 100px;\n font-size: ", "px;\n line-height: ", "px;\n"], ["\n position: absolute;\n top: ", "px;\n right: ", "px;\n padding: 0 7px;\n background: black;\n color: white;\n width: fit-content;\n border-radius: 100px;\n font-size: ", "px;\n line-height: ", "px;\n"])), function (props) { var _a; return (_a = props.theme.constants) === null || _a === void 0 ? void 0 : _a.buttonBadgeTopPosition; }, function (props) { var _a; return (_a = props.theme.constants) === null || _a === void 0 ? void 0 : _a.buttonBadgeRightPosition; }, function (props) { var _a, _b; return (_b = (_a = props.theme.typography) === null || _a === void 0 ? void 0 : _a.size) === null || _b === void 0 ? void 0 : _b.xs; }, function (props) { var _a, _b; return (_b = (_a = props.theme.typography) === null || _a === void 0 ? void 0 : _a.lineHeight) === null || _b === void 0 ? void 0 : _b.xs; });
|
|
128
|
+
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7, templateObject_8, templateObject_9;
|
|
120
129
|
|
|
121
|
-
export { BaseButton, BaseIconButton, BasePaginationButton, BasePrimaryButton, Loading, LoadingContainer, LoadingSpinner };
|
|
130
|
+
export { BaseButton, BaseIconButton, BasePaginationButton, BasePrimaryButton, ButtonBadge, ButtonChildContainer, Loading, LoadingContainer, LoadingSpinner };
|
|
122
131
|
//# sourceMappingURL=Button.styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.styles.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Button.styles.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
var FallbackIcon = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<svg width=\"128px\" height=\"124px\" viewBox=\"0 0 128 124\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n <!-- Generator: Sketch 52.4 (67378) - http://www.bohemiancoding.com/sketch -->\n <title>shopping_cart_loaded</title>\n <desc>Created with Sketch.</desc>\n <g id=\"Page-1\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n <g id=\"Artboard\" transform=\"translate(-100.000000, -53.000000)\">\n <g id=\"shopping_cart_loaded\" transform=\"translate(100.000000, 53.000000)\">\n <polygon id=\"Rectangle\" fill=\"#D8D8D8\" transform=\"translate(89.585472, 37.151291) rotate(45.000000) translate(-89.585472, -37.151291) \" points=\"69.9549199 17.5207389 109.199991 17.536771 109.216023 56.7818423 69.970952 56.7658102\"></polygon>\n <polygon id=\"Rectangle\" fill=\"#D1D1D1\" transform=\"translate(61.784256, 30.970598) rotate(45.000000) translate(-61.784256, -30.970598) \" points=\"39.9897062 9.17604823 83.5610058 9.19384764 83.5788052 52.7651473 40.0075056 52.7473478\"></polygon>\n <g id=\"Group\" transform=\"translate(6.000000, 12.000000)\" fill=\"#E8E8E8\">\n <path d=\"M40.2213256,80.6 C36.8179827,80.6 34.0334294,77.81 34.0334294,74.4 L34.0334294,43.4 L21.6576369,43.4 L21.6576369,74.4 C21.6576369,84.63 30.0112968,93 40.2213256,93 L99.0063401,93 L99.0063401,80.6 L40.2213256,80.6 Z\" id=\"Path\"></path>\n <path d=\"M24.1327954,12.4 L22.8952161,8.37 C21.0388473,3.41 16.3979251,0 11.1382133,0 L0,0 L0,12.4 L11.1382133,12.4 L28.154928,63.86 C29.0831124,66.34 31.2488761,68.2 34.0334294,68.2 L92.8184438,68.2 C95.2936023,68.2 97.459366,66.65 98.3875504,64.48 L121.901556,12.4 L24.1327954,12.4 Z\" id=\"Path\"></path>\n </g>\n <ellipse id=\"Oval\" fill=\"#D8D8D8\" cx=\"6\" cy=\"18.5\" rx=\"6\" ry=\"6.5\"></ellipse>\n <g id=\"Group\" transform=\"translate(40.000000, 105.000000)\" fill=\"#D8D8D8\">\n <ellipse id=\"Oval\" cx=\"55.7142857\" cy=\"9.5\" rx=\"9.28571429\" ry=\"9.5\"></ellipse>\n <ellipse id=\"Oval\" cx=\"9.28571429\" cy=\"9.5\" rx=\"9.28571429\" ry=\"9.5\"></ellipse>\n </g>\n <g id=\"Group\" transform=\"translate(46.000000, 112.000000)\" fill=\"#D1D1D1\">\n <ellipse id=\"Oval\" cx=\"49.8823529\" cy=\"3\" rx=\"3.11764706\" ry=\"3\"></ellipse>\n <ellipse id=\"Oval\" cx=\"3.11764706\" cy=\"3\" rx=\"3.11764706\" ry=\"3\"></ellipse>\n </g>\n </g>\n </g>\n </g>\n</svg>";
|
|
2
2
|
|
|
3
|
-
export default
|
|
3
|
+
export { FallbackIcon as default };
|
|
4
4
|
//# sourceMappingURL=fallback_grocery.svg.js.map
|
|
@@ -30,12 +30,15 @@ function createPagination(totalItems, itemsPerPage) {
|
|
|
30
30
|
return pagination;
|
|
31
31
|
}
|
|
32
32
|
function Pagination(_a) {
|
|
33
|
-
var totalItems = _a.totalItems, currentPage = _a.currentPage, fetchItems = _a.fetchItems, itemsPerPage = _a.itemsPerPage;
|
|
33
|
+
var totalItems = _a.totalItems, currentPage = _a.currentPage, fetchItems = _a.fetchItems, itemsPerPage = _a.itemsPerPage, setPage = _a.setPage;
|
|
34
34
|
var _b = useState(Math.floor((currentPage - 1) / 4)), currentIndex = _b[0], setIndex = _b[1];
|
|
35
35
|
var pagination = createPagination(totalItems, itemsPerPage);
|
|
36
36
|
return (React.createElement(Box, null, pagination && pagination.length > 0 && (React.createElement(Flex, null,
|
|
37
37
|
currentIndex > 0 && (React.createElement(PaginationButtonWrapper, null,
|
|
38
|
-
React.createElement(PaginationButton, { color: 'white', onClick: function () {
|
|
38
|
+
React.createElement(PaginationButton, { color: 'white', onClick: function () {
|
|
39
|
+
setPage && setPage(currentPage - 1);
|
|
40
|
+
setIndex(currentIndex - 1);
|
|
41
|
+
}, width: 36, height: 36 }, '...'))),
|
|
39
42
|
pagination[currentIndex].map(function (page) { return (React.createElement(PaginationButtonWrapper, { key: page },
|
|
40
43
|
React.createElement(PaginationButton, { color: currentPage === page + 1 ? 'primary' : 'white', width: 36, height: 36, onClick: function () { return fetchItems(page + 1); } }, page + 1))); }),
|
|
41
44
|
pagination.length > 1 && currentIndex < pagination.length - 1 && (React.createElement(PaginationButtonWrapper, null,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Pagination.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Pagination.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { useDetectDevice } from '@citygross/utils';
|
|
3
|
-
import { Box } from '../Box/Box.js';
|
|
4
3
|
import { H3, BodyText } from '@citygross/typography';
|
|
5
4
|
import { theme } from '@citygross/design-tokens';
|
|
6
5
|
import { Dot } from '../DotIndicator/DotIndicator.js';
|
|
@@ -8,21 +7,19 @@ import { BaseTimeline, TimeLineH3, BaseTimelineList, BaseTimelineItem } from './
|
|
|
8
7
|
|
|
9
8
|
function Timeline(_a) {
|
|
10
9
|
var _b, _c, _d;
|
|
11
|
-
var
|
|
12
|
-
var currentIndex = items === null || items === void 0 ? void 0 : items.indexOf(current);
|
|
10
|
+
var items = _a.items, _e = _a.title, title = _e === void 0 ? 'Vi skickar löpande information när:' : _e, _f = _a.mobileTitle, mobileTitle = _f === void 0 ? 'När din...' : _f, current = _a.current, _g = _a.dotColor, dotColor = _g === void 0 ? (_b = theme === null || theme === void 0 ? void 0 : theme.palette) === null || _b === void 0 ? void 0 : _b.greenLight : _g, _h = _a.dotActiveColor, dotActiveColor = _h === void 0 ? (_c = theme === null || theme === void 0 ? void 0 : theme.palette) === null || _c === void 0 ? void 0 : _c.alertGreen : _h, _j = _a.dotShadow, dotShadow = _j === void 0 ? (_d = theme === null || theme === void 0 ? void 0 : theme.palette) === null || _d === void 0 ? void 0 : _d.greenMedium : _j, _k = _a.borderStyle, borderStyle = _k === void 0 ? 'dashed' : _k, borderColor = _a.borderColor, color = _a.color, completedColor = _a.completedColor;
|
|
13
11
|
var isMobile = useDetectDevice().isMobile;
|
|
14
|
-
return (React.createElement(
|
|
15
|
-
React.createElement(
|
|
16
|
-
|
|
17
|
-
React.createElement(
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
React.createElement(BodyText, { color: current === item || !completedColor ? color : completedColor }, item.tiernaryText))); })))));
|
|
12
|
+
return (React.createElement(BaseTimeline, null,
|
|
13
|
+
React.createElement(TimeLineH3, null, isMobile ? mobileTitle : title),
|
|
14
|
+
React.createElement(BaseTimelineList, { borderStyle: borderStyle, borderColor: borderColor }, items.map(function (item, index) { return (React.createElement(BaseTimelineItem, { key: item.primaryText },
|
|
15
|
+
React.createElement(Dot, { color: index <= current ? dotActiveColor : dotColor, shadow: dotShadow }),
|
|
16
|
+
current === index ? (React.createElement(H3, { color: color }, isMobile
|
|
17
|
+
? item.primaryText + " (" + item.time + ")"
|
|
18
|
+
: item.primaryText + " - " + item.time)) : (React.createElement(BodyText, { color: completedColor !== null && completedColor !== void 0 ? completedColor : color }, isMobile
|
|
19
|
+
? item.primaryText + " (" + item.time + ")"
|
|
20
|
+
: item.primaryText + " - " + item.time)),
|
|
21
|
+
!isMobile && (React.createElement(BodyText, { color: current === index || !completedColor ? color : completedColor }, item.secondaryText)),
|
|
22
|
+
React.createElement(BodyText, { color: current === index || !completedColor ? color : completedColor }, item.tiernaryText))); }))));
|
|
26
23
|
}
|
|
27
24
|
|
|
28
25
|
export { Timeline };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Timeline.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Timeline.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { __exports as build } from '../../_virtual/index.
|
|
2
|
-
export { __exports as default } from '../../_virtual/index.
|
|
1
|
+
import { __exports as build } from '../../_virtual/index.js';
|
|
2
|
+
export { __exports as default } from '../../_virtual/index.js';
|
|
3
3
|
|
|
4
4
|
Object.defineProperty(build, '__esModule', { value: true });
|
|
5
5
|
|
|
@@ -84,6 +84,13 @@ var constants = {
|
|
|
84
84
|
mobileLabelPaddingRight: 35,
|
|
85
85
|
mobileLabelVerticalPaddingMobile: 8,
|
|
86
86
|
mobileLabelPaddingRightMobile: 20,
|
|
87
|
+
buttonChildGap: 12,
|
|
88
|
+
buttonChildSmallGap: 8,
|
|
89
|
+
buttonChildExtraSmallGap: 4,
|
|
90
|
+
buttonBadgeTopPosition: -4,
|
|
91
|
+
buttonBadgeRightPosition: -2,
|
|
92
|
+
navHeaderHeight: 81,
|
|
93
|
+
navHeaderHeightSmall: 64
|
|
87
94
|
};
|
|
88
95
|
|
|
89
96
|
var palette = {
|
|
@@ -116,6 +123,7 @@ var palette = {
|
|
|
116
123
|
lighter: '#F1F1F1',
|
|
117
124
|
light: '#E8E8E8',
|
|
118
125
|
medium: '#DBDBDB',
|
|
126
|
+
mediumDark: '#6C6C6C',
|
|
119
127
|
dark: '#979797',
|
|
120
128
|
darker: '#4A4A4A',
|
|
121
129
|
darkest: '#333333',
|
|
@@ -136,6 +144,7 @@ var palette = {
|
|
|
136
144
|
var spacings = {
|
|
137
145
|
xxs: 4,
|
|
138
146
|
xs: 8,
|
|
147
|
+
xs2: 12,
|
|
139
148
|
sm: 16,
|
|
140
149
|
md: 24,
|
|
141
150
|
lg: 32,
|
|
@@ -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 },\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 layoutShadowInset: 'inset 0 -1px 0 rgba(0, 0, 0, 0.15)',\n layoutShadow: '0 1px 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 },\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 headerScrollFadeRange: 50,\n modalContainerMaxWidth: 615,\n modalConfirmMaxWidth: 480,\n pageContainerMaxWidth: 776,\n twoColumnsContainerMaxWidth: 1024,\n deliverySlotItemWidth: 80,\n deliverySlotItemWidthDesktop: 120,\n itemGap: 2,\n listImageMaxWidth: 64,\n listImageMaxHeight: 50,\n listImageMaxWidthSmall: 32,\n listImageMaxHeightSmall: 32,\n listItemFlexGap: 20,\n infoBlockImageMaxWidthDesktop: 100,\n chipCheckBox: 12,\n pageContentMaxWidth: 1232,\n infoBlockBorderWidth: 4,\n tableRowVerticalPadding: 16,\n tableRowHorizontalPadding: 14,\n tableHeaderVerticalPadding: 12,\n menuHorizontalMargin: 12,\n headerWrapperVerticalPadding: 20,\n iconToolTipArrowLeft: 2.5,\n iconToolTipArrowTop: 32,\n iconToolTipBoxWidth: 300,\n iconToolTipTop: 36,\n dateBoxHorizontalPadding: 12,\n BackgroundOverlayOpacity: 0.3,\n selectWidth: 225,\n selectMobileWidth: 175,\n selectPadding: 2,\n cartListItemDescriptionSize: 11,\n mobileTablePadding: 12,\n mobileTablePaddingBottom: 6,\n mobileLabelVerticalPadding: 10,\n mobileLabelPaddingRight: 35,\n mobileLabelVerticalPaddingMobile: 8,\n mobileLabelPaddingRightMobile: 20,\n};\n\nvar palette = {\n // pallette same as brand colors\n primary: '#FFE522',\n secondary: '#0069AE',\n // brand colors\n brandYellow: '#FFE522',\n brandBlue: '#0069AE',\n brandPurple: '#A71680',\n // shades\n yellowLighter: '#FFFBE7',\n yellowLight: '#FFF7D1',\n blueLight: '#ECF7FE',\n blueMedium: '#92B9D3',\n greenLight: '#F2FDF2',\n greenMedium: '#BEE5BE',\n redLight: '#FCE9E9',\n // recipeTags\n recipeVego: '#237039',\n recipeLactose: '#5bc5f2',\n recipeGluten: '#c74f07',\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 dark: '#979797',\n darker: '#4A4A4A',\n darkest: '#333333',\n border: '#0069AE',\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 none: 'none'\n};\n\nvar spacings = {\n xxs: 4,\n xs: 8,\n sm: 16,\n md: 24,\n lg: 32,\n xl: 40,\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 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 },\n size: {\n // xs all from 0-10\n xs: 10,\n // s all from 11-20\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 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};\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,KAAK;AACL,IAAI,SAAS,EAAE;AACf,QAAQ,KAAK,EAAE,gCAAgC;AAC/C,QAAQ,KAAK,EAAE,gCAAgC;AAC/C,QAAQ,WAAW,EAAE,+BAA+B;AACpD,QAAQ,YAAY,EAAE,qCAAqC;AAC3D,QAAQ,eAAe,EAAE,+BAA+B;AACxD,QAAQ,iBAAiB,EAAE,oCAAoC;AAC/D,QAAQ,YAAY,EAAE,6BAA6B;AACnD,QAAQ,aAAa,EAAE,sGAAsG;AAC7H,QAAQ,kBAAkB,EAAE,gCAAgC;AAC5D,KAAK;AACL,IAAI,MAAM,EAAE;AACZ,QAAQ,KAAK,EAAE,CAAC;AAChB,QAAQ,MAAM,EAAE,CAAC;AACjB,QAAQ,IAAI,EAAE,CAAC;AACf,QAAQ,MAAM,EAAE,CAAC;AACjB,QAAQ,GAAG,EAAE,CAAC;AACd,KAAK;AACL,IAAI,UAAU,EAAE;AAChB,QAAQ,EAAE,EAAE,sCAAsC;AAClD,QAAQ,eAAe,E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;gBACkB,GAAG,WAAW;gBACd,GAAG,WAAW;iBACb,GAAG,YAAY;eACjB,GAAG,UAAU;aACf,GAAG,QAAQ;cACV,GAAG,SAAS;yBACf,GAAG,MAAM;gBACJ,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 },\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 layoutShadowInset: 'inset 0 -1px 0 rgba(0, 0, 0, 0.15)',\n layoutShadow: '0 1px 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 },\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 headerScrollFadeRange: 50,\n modalContainerMaxWidth: 615,\n modalConfirmMaxWidth: 480,\n pageContainerMaxWidth: 776,\n twoColumnsContainerMaxWidth: 1024,\n deliverySlotItemWidth: 80,\n deliverySlotItemWidthDesktop: 120,\n itemGap: 2,\n listImageMaxWidth: 64,\n listImageMaxHeight: 50,\n listImageMaxWidthSmall: 32,\n listImageMaxHeightSmall: 32,\n listItemFlexGap: 20,\n infoBlockImageMaxWidthDesktop: 100,\n chipCheckBox: 12,\n pageContentMaxWidth: 1232,\n infoBlockBorderWidth: 4,\n tableRowVerticalPadding: 16,\n tableRowHorizontalPadding: 14,\n tableHeaderVerticalPadding: 12,\n menuHorizontalMargin: 12,\n headerWrapperVerticalPadding: 20,\n iconToolTipArrowLeft: 2.5,\n iconToolTipArrowTop: 32,\n iconToolTipBoxWidth: 300,\n iconToolTipTop: 36,\n dateBoxHorizontalPadding: 12,\n BackgroundOverlayOpacity: 0.3,\n selectWidth: 225,\n selectMobileWidth: 175,\n selectPadding: 2,\n cartListItemDescriptionSize: 11,\n mobileTablePadding: 12,\n mobileTablePaddingBottom: 6,\n mobileLabelVerticalPadding: 10,\n mobileLabelPaddingRight: 35,\n mobileLabelVerticalPaddingMobile: 8,\n mobileLabelPaddingRightMobile: 20,\n buttonChildGap: 12,\n buttonChildSmallGap: 8,\n buttonChildExtraSmallGap: 4,\n buttonBadgeTopPosition: -4,\n buttonBadgeRightPosition: -2,\n navHeaderHeight: 81,\n navHeaderHeightSmall: 64\n};\n\nvar palette = {\n // pallette same as brand colors\n primary: '#FFE522',\n secondary: '#0069AE',\n // brand colors\n brandYellow: '#FFE522',\n brandBlue: '#0069AE',\n brandPurple: '#A71680',\n // shades\n yellowLighter: '#FFFBE7',\n yellowLight: '#FFF7D1',\n blueLight: '#ECF7FE',\n blueMedium: '#92B9D3',\n greenLight: '#F2FDF2',\n greenMedium: '#BEE5BE',\n redLight: '#FCE9E9',\n // recipeTags\n recipeVego: '#237039',\n recipeLactose: '#5bc5f2',\n recipeGluten: '#c74f07',\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 border: '#0069AE',\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 none: 'none'\n};\n\nvar spacings = {\n xxs: 4,\n xs: 8,\n xs2: 12,\n sm: 16,\n md: 24,\n lg: 32,\n xl: 40,\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 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 },\n size: {\n // xs all from 0-10\n xs: 10,\n // s all from 11-20\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 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};\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,KAAK;AACL,IAAI,SAAS,EAAE;AACf,QAAQ,KAAK,EAAE,gCAAgC;AAC/C,QAAQ,KAAK,EAAE,gCAAgC;AAC/C,QAAQ,WAAW,EAAE,+BAA+B;AACpD,QAAQ,YAAY,EAAE,qCAAqC;AAC3D,QAAQ,eAAe,EAAE,+BAA+B;AACxD,QAAQ,iBAAiB,EAAE,oCAAoC;AAC/D,QAAQ,YAAY,EAAE,6BAA6B;AACnD,QAAQ,aAAa,EAAE,sGAAsG;AAC7H,QAAQ,kBAAkB,EAAE,gCAAgC;AAC5D,KAAK;AACL,IAAI,MAAM,EAAE;AACZ,QAAQ,KAAK,EAAE,CAAC;AAChB,QAAQ,MAAM,EAAE,CAAC;AACjB,QAAQ,IAAI,EAAE,CAAC;AACf,QAAQ,MAAM,EAAE,CAAC;AACjB,QAAQ,GAAG,EAAE,CAAC;AACd,KAAK;AACL,IAAI,UAAU,EAAE;AAChB,QAAQ,EAAE,EAAE,sCAAsC;AAClD,QAAQ,eAAe,EAAE,uBAAuB;AAChD,KAAK;AACL,CAAC,CAAC;AACF;AACA,IAAI,WAAW,GAAG;AAClB,IAAI,GAAG,EAAE,GAAG;AACZ,IAAI,EAAE,EAAE,GAAG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AU,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,6 +1,6 @@
|
|
|
1
1
|
import { commonjsGlobal as commonjsGlobal$1 } from '../../_virtual/_commonjsHelpers.js';
|
|
2
|
-
import { __exports as build } from '../../_virtual/index2.
|
|
3
|
-
export { __exports as default } from '../../_virtual/index2.
|
|
2
|
+
import { __exports as build } from '../../_virtual/index2.js';
|
|
3
|
+
export { __exports as default } from '../../_virtual/index2.js';
|
|
4
4
|
import React$1 from 'react';
|
|
5
5
|
|
|
6
6
|
Object.defineProperty(build, '__esModule', { value: true });
|
|
@@ -31,8 +31,8 @@ var capitalizeFirstLetter = function (string) {
|
|
|
31
31
|
};
|
|
32
32
|
|
|
33
33
|
var useDetectDevice = function () {
|
|
34
|
-
var _a = React__default[
|
|
35
|
-
React__default[
|
|
34
|
+
var _a = React__default["default"].useState(false), isMobile = _a[0], setMobile = _a[1];
|
|
35
|
+
React__default["default"].useEffect(function () {
|
|
36
36
|
var userAgent = typeof window.navigator === 'undefined' ? '' : navigator.userAgent;
|
|
37
37
|
var mobile = Boolean(userAgent.match(/Android|BlackBerry|iPhone|iPod|Opera Mini|IEMobile|WPDesktop/i) || window.screen.width < 1024);
|
|
38
38
|
setMobile(mobile);
|