@citygross/components 0.7.213 → 0.7.215
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/Slider/Slider.d.ts +2 -2
- package/build/@types/components/Slider/Slider.stories.d.ts +1 -1
- package/build/cjs/components/src/components/DeliverySlotItem/DeliverySlotItem.js +1 -51
- package/build/cjs/components/src/components/DeliverySlotItem/DeliverySlotItem.js.map +1 -1
- package/build/cjs/components/src/components/DeliverySlotItem/DeliverySlotItem.styles.js +4 -4
- package/build/cjs/components/src/components/RadioListItem/RadioListItem.styles.js +7 -2
- package/build/cjs/components/src/components/RadioListItem/RadioListItem.styles.js.map +1 -1
- package/build/cjs/components/src/components/Slider/Slider.js +5 -6
- package/build/cjs/components/src/components/Slider/Slider.js.map +1 -1
- package/build/cjs/components/src/components/Slider/Slider.styles.js +4 -4
- package/build/es/components/src/components/DeliverySlotItem/DeliverySlotItem.js +1 -51
- package/build/es/components/src/components/DeliverySlotItem/DeliverySlotItem.js.map +1 -1
- package/build/es/components/src/components/DeliverySlotItem/DeliverySlotItem.styles.js +4 -4
- package/build/es/components/src/components/RadioListItem/RadioListItem.styles.js +7 -2
- package/build/es/components/src/components/RadioListItem/RadioListItem.styles.js.map +1 -1
- package/build/es/components/src/components/Slider/Slider.js +5 -6
- package/build/es/components/src/components/Slider/Slider.js.map +1 -1
- package/build/es/components/src/components/Slider/Slider.styles.js +4 -4
- package/package.json +2 -2
|
@@ -17,6 +17,6 @@ export declare type TSlider = {
|
|
|
17
17
|
iconColor?: TButtonColor;
|
|
18
18
|
responsiveSettings: TSliderResponsive[];
|
|
19
19
|
slotsLength: number;
|
|
20
|
-
|
|
20
|
+
selected?: number;
|
|
21
21
|
};
|
|
22
|
-
export declare const Slider: ({ children, slotsLength, iconHeight, iconWidth, iconColor,
|
|
22
|
+
export declare const Slider: ({ children, slotsLength, iconHeight, iconWidth, iconColor, responsiveSettings, selected }: TSlider) => JSX.Element;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { Story } from '@storybook/react';
|
|
3
3
|
import { TSlider } from './Slider';
|
|
4
4
|
declare const _default: {
|
|
5
|
-
component: ({ children, slotsLength, iconHeight, iconWidth, iconColor,
|
|
5
|
+
component: ({ children, slotsLength, iconHeight, iconWidth, iconColor, responsiveSettings, selected }: TSlider) => JSX.Element;
|
|
6
6
|
title: string;
|
|
7
7
|
};
|
|
8
8
|
export default _default;
|
|
@@ -22,57 +22,7 @@ function DeliverySlotItem(_a) {
|
|
|
22
22
|
setWeekDay(momentDate.format('dddd').toLocaleLowerCase());
|
|
23
23
|
}, [width]);
|
|
24
24
|
var slotRef = React.useRef(null);
|
|
25
|
-
|
|
26
|
-
var callbackFn = function (entries) {
|
|
27
|
-
var entry = entries[0];
|
|
28
|
-
// gets zoom level
|
|
29
|
-
var zoomLevel = window.devicePixelRatio ||
|
|
30
|
-
window.screen.availWidth / document.documentElement.clientWidth;
|
|
31
|
-
// if zoom is over 200% or less than 50%
|
|
32
|
-
// observer gets buggy when zoom level is too high
|
|
33
|
-
if (zoomLevel > 2 || zoomLevel < 0.5) {
|
|
34
|
-
setIsVisible(true);
|
|
35
|
-
return;
|
|
36
|
-
}
|
|
37
|
-
if (!entry) {
|
|
38
|
-
return setIsVisible(true);
|
|
39
|
-
}
|
|
40
|
-
// check if the slot is within 3px of in view(Height)
|
|
41
|
-
var isInHeight = Math.floor(entry.boundingClientRect.height) -
|
|
42
|
-
Math.floor(entry.intersectionRect.height) <
|
|
43
|
-
3;
|
|
44
|
-
// if no observer cant find height of element
|
|
45
|
-
if (entry.intersectionRect.height === 0) {
|
|
46
|
-
setIsVisible(entry === null || entry === void 0 ? void 0 : entry.isIntersecting);
|
|
47
|
-
return;
|
|
48
|
-
}
|
|
49
|
-
// check if intersecting when slot is in 3px of viewHeight
|
|
50
|
-
if (isInHeight)
|
|
51
|
-
setIsVisible(entry.isIntersecting);
|
|
52
|
-
};
|
|
53
|
-
var options = {
|
|
54
|
-
root: null,
|
|
55
|
-
rootMargin: '0px',
|
|
56
|
-
threshold: 0.9
|
|
57
|
-
};
|
|
58
|
-
React.useEffect(function () {
|
|
59
|
-
if (!('IntersectionObserver' in window) ||
|
|
60
|
-
!('IntersectionObserverEntry' in window) ||
|
|
61
|
-
!('intersectionRatio' in window.IntersectionObserverEntry.prototype)) {
|
|
62
|
-
return;
|
|
63
|
-
}
|
|
64
|
-
var observer = new IntersectionObserver(callbackFn, options);
|
|
65
|
-
if (!observer)
|
|
66
|
-
return;
|
|
67
|
-
if (slotRef.current)
|
|
68
|
-
observer.observe(slotRef === null || slotRef === void 0 ? void 0 : slotRef.current);
|
|
69
|
-
return function () {
|
|
70
|
-
if (observer) {
|
|
71
|
-
observer.disconnect();
|
|
72
|
-
}
|
|
73
|
-
};
|
|
74
|
-
}, [slotRef, options]);
|
|
75
|
-
return (React__default["default"].createElement(DeliverySlotItem_styles.DeliverySlotItemContainer, { onClick: onSelect, isVisible: isVisible, ref: slotRef, selected: selected },
|
|
25
|
+
return (React__default["default"].createElement(DeliverySlotItem_styles.DeliverySlotItemContainer, { onClick: onSelect, ref: slotRef, selected: selected },
|
|
76
26
|
React__default["default"].createElement(DeliverySlotItem_styles.DeliverySlotContainer, { selected: selected },
|
|
77
27
|
React__default["default"].createElement(DeliverySlotItem_styles.DeliverySlotHeaderText, null,
|
|
78
28
|
React__default["default"].createElement(typography.BodyText, { fontWeight: 'medium' }, utils.capitalizeFirstLetter(weekDay)),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DeliverySlotItem.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DeliverySlotItem.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -9,7 +9,7 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
9
9
|
|
|
10
10
|
var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
|
|
11
11
|
|
|
12
|
-
var DeliverySlotItemContainer = styled__default["default"].div(templateObject_1 || (templateObject_1 = _tslib.__makeTemplateObject(["\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-self: center;\n
|
|
12
|
+
var DeliverySlotItemContainer = styled__default["default"].div(templateObject_1 || (templateObject_1 = _tslib.__makeTemplateObject(["\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-self: center;\n transition: opacity ", ";\n min-width: ", "px;\n height: 100%;\n border: solid 1px\n ", ";\n border-radius: ", "px;\n overflow: hidden;\n min-height: ", "px;\n\n @media (min-width: ", "px) {\n min-width: ", "px;\n }\n\n &:hover {\n cursor: pointer;\n }\n"], ["\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-self: center;\n transition: opacity ", ";\n min-width: ", "px;\n height: 100%;\n border: solid 1px\n ", ";\n border-radius: ", "px;\n overflow: hidden;\n min-height: ", "px;\n\n @media (min-width: ", "px) {\n min-width: ", "px;\n }\n\n &:hover {\n cursor: pointer;\n }\n"])), function (props) { var _a, _b; return (_b = (_a = props.theme.attributes) === null || _a === void 0 ? void 0 : _a.transition) === null || _b === void 0 ? void 0 : _b.t1; }, function (props) { var _a; return (_a = props.theme.constants) === null || _a === void 0 ? void 0 : _a.deliverySlotItemWidth; }, function (props) {
|
|
13
13
|
var _a, _b;
|
|
14
14
|
return props.selected
|
|
15
15
|
? (_a = props.theme.palette) === null || _a === void 0 ? void 0 : _a.brandBlue
|
|
@@ -17,7 +17,7 @@ var DeliverySlotItemContainer = styled__default["default"].div(templateObject_1
|
|
|
17
17
|
}, function (props) { var _a; return (_a = props.theme.attributes) === null || _a === void 0 ? void 0 : _a.borderRadius.small; }, function (props) { var _a; return (_a = props.theme.constants) === null || _a === void 0 ? void 0 : _a.deliverySlotItemHeight; }, function (props) { var _a; return (_a = props.theme.breakpoints) === null || _a === void 0 ? void 0 : _a.md; }, function (props) { var _a; return (_a = props.theme.constants) === null || _a === void 0 ? void 0 : _a.deliverySlotItemWidthDesktop; });
|
|
18
18
|
styled__default["default"].div(templateObject_2 || (templateObject_2 = _tslib.__makeTemplateObject(["\n display: flex;\n width: 100%;\n"], ["\n display: flex;\n width: 100%;\n"])));
|
|
19
19
|
var DeliverySlotHeaderText = styled__default["default"].div(templateObject_3 || (templateObject_3 = _tslib.__makeTemplateObject(["\n display: flex;\n justify-content: space-between;\n"], ["\n display: flex;\n justify-content: space-between;\n"])));
|
|
20
|
-
var DeliverySlotContainer = styled__default["default"].div(templateObject_4 || (templateObject_4 = _tslib.__makeTemplateObject(["\n padding: ", "px;\n flex: 1;\n width: stretch;\n background: ", ";\n &:hover {\n cursor: pointer;\n ", ";\n }\n"], ["\n padding: ", "px;\n flex: 1;\n width: stretch;\n background: ", ";\n &:hover {\n cursor: pointer;\n ", ";\n }\n"])), function (props) { var _a; return (_a = props.theme.spacings) === null || _a === void 0 ? void 0 : _a.xs2; }, function (props) {
|
|
20
|
+
var DeliverySlotContainer = styled__default["default"].div(templateObject_4 || (templateObject_4 = _tslib.__makeTemplateObject(["\n padding: ", "px;\n flex: 1;\n width: stretch;\n background: ", ";\n &:hover {\n cursor: pointer;\n ", ";\n }\n &:active {\n background: ", "};\n }\n\n user-select: none;\n"], ["\n padding: ", "px;\n flex: 1;\n width: stretch;\n background: ", ";\n &:hover {\n cursor: pointer;\n ", ";\n }\n &:active {\n background: ", "};\n }\n\n user-select: none;\n"])), function (props) { var _a; return (_a = props.theme.spacings) === null || _a === void 0 ? void 0 : _a.xs2; }, function (props) {
|
|
21
21
|
var _a, _b;
|
|
22
22
|
return props.selected
|
|
23
23
|
? (_a = props.theme.palette) === null || _a === void 0 ? void 0 : _a.blueLight
|
|
@@ -25,8 +25,8 @@ var DeliverySlotContainer = styled__default["default"].div(templateObject_4 || (
|
|
|
25
25
|
}, function (props) {
|
|
26
26
|
var _a;
|
|
27
27
|
return !props.selected &&
|
|
28
|
-
"\n background:".concat((_a = props.theme.palette) === null || _a === void 0 ? void 0 : _a.
|
|
29
|
-
});
|
|
28
|
+
"\n background:".concat((_a = props.theme.palette) === null || _a === void 0 ? void 0 : _a.lightest);
|
|
29
|
+
}, function (props) { var _a; return (_a = props.theme.palette) === null || _a === void 0 ? void 0 : _a.lighter; });
|
|
30
30
|
var DeliverySlotBody = styled__default["default"].div(templateObject_5 || (templateObject_5 = _tslib.__makeTemplateObject(["\n margin-top: ", "px;\n margin-bottom: ", "px;\n"], ["\n margin-top: ", "px;\n margin-bottom: ", "px;\n"])), function (props) { var _a; return (_a = props.theme.spacings) === null || _a === void 0 ? void 0 : _a.xxxs; }, function (props) { var _a; return (_a = props.theme.spacings) === null || _a === void 0 ? void 0 : _a.xxs; });
|
|
31
31
|
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5;
|
|
32
32
|
|
|
@@ -10,7 +10,7 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
10
10
|
|
|
11
11
|
var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
|
|
12
12
|
|
|
13
|
-
var BaseRadioListItemContainer = styled__default["default"].div(templateObject_1 || (templateObject_1 = _tslib.__makeTemplateObject(["\n padding: ", "px;\n align-items: center;\n cursor: ", ";\n flex-wrap: wrap;\n border-radius: ", "px;\n background: ", ";\n transition: background-color 250ms ease;\n border: 1px solid
|
|
13
|
+
var BaseRadioListItemContainer = styled__default["default"].div(templateObject_1 || (templateObject_1 = _tslib.__makeTemplateObject(["\n padding: ", "px;\n align-items: center;\n cursor: ", ";\n flex-wrap: wrap;\n border-radius: ", "px;\n background: ", ";\n transition: background-color 250ms ease;\n border: 1px solid\n ", ";\n > p:first-of-type {\n margin-left: ", "px;\n }\n"], ["\n padding: ", "px;\n align-items: center;\n cursor: ", ";\n flex-wrap: wrap;\n border-radius: ", "px;\n background: ", ";\n transition: background-color 250ms ease;\n border: 1px solid\n ", ";\n > p:first-of-type {\n margin-left: ", "px;\n }\n"])), function (props) { var _a; return (props.noPadding ? 0 : (_a = props.theme.spacings) === null || _a === void 0 ? void 0 : _a.xs2); }, function (props) { return (props.isDisabled ? 'cursor' : 'pointer'); }, function (props) { var _a; return (_a = props.theme.attributes) === null || _a === void 0 ? void 0 : _a.borderRadius.small; }, function (props) {
|
|
14
14
|
var _a, _b, _c, _d;
|
|
15
15
|
return props.isDisabled
|
|
16
16
|
? (_a = props.theme.palette) === null || _a === void 0 ? void 0 : _a.lightest
|
|
@@ -19,7 +19,12 @@ var BaseRadioListItemContainer = styled__default["default"].div(templateObject_1
|
|
|
19
19
|
: props.selected
|
|
20
20
|
? (_c = props.theme.palette) === null || _c === void 0 ? void 0 : _c.blueLight
|
|
21
21
|
: (_d = props.theme.palette) === null || _d === void 0 ? void 0 : _d.white;
|
|
22
|
-
}, function (props) {
|
|
22
|
+
}, function (props) {
|
|
23
|
+
var _a, _b;
|
|
24
|
+
return props.selected
|
|
25
|
+
? (_a = props.theme.palette) === null || _a === void 0 ? void 0 : _a.brandBlue
|
|
26
|
+
: (_b = props.theme.palette) === null || _b === void 0 ? void 0 : _b.medium;
|
|
27
|
+
}, function (props) { var _a; return (_a = props.theme.spacings) === null || _a === void 0 ? void 0 : _a.xs; });
|
|
23
28
|
var BaseRadioItemLeftWrapper = styled__default["default"].div(templateObject_2 || (templateObject_2 = _tslib.__makeTemplateObject(["\n display: flex;\n flex: 5;\n align-items: flex-start;\n ", ";\n"], ["\n display: flex;\n flex: 5;\n align-items: flex-start;\n ", ";\n"])), function (props) { return props.flexGrow && "flex-grow: ".concat(props.flexGrow); });
|
|
24
29
|
var StyledH3 = styled__default["default"](typography.H3).attrs({ as: 'label' })(templateObject_3 || (templateObject_3 = _tslib.__makeTemplateObject(["\n cursor: pointer;\n white-space: nowrap;\n display: block;\n line-height: ", "px;\n ", ";\n"], ["\n cursor: pointer;\n white-space: nowrap;\n display: block;\n line-height: ", "px;\n ", ";\n"])), function (props) { var _a; return (_a = props.theme.typography) === null || _a === void 0 ? void 0 : _a.lineHeight.m1; }, function (props) { var _a; return props.isDisabled && "color:".concat((_a = props.theme.palette) === null || _a === void 0 ? void 0 : _a.dark); });
|
|
25
30
|
var RadioRightWrapper = styled__default["default"].div(templateObject_4 || (templateObject_4 = _tslib.__makeTemplateObject(["\n display: flex;\n gap: ", "px;\n justify-content: flex-end;\n text-align: right;\n font-size: ", "px;\n"], ["\n display: flex;\n gap: ", "px;\n justify-content: flex-end;\n text-align: right;\n font-size: ", "px;\n"])), function (props) { var _a; return (_a = props.theme.spacings) === null || _a === void 0 ? void 0 : _a.xs; }, function (props) { var _a; return (_a = props.theme.typography) === null || _a === void 0 ? void 0 : _a.size.s2; });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RadioListItem.styles.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RadioListItem.styles.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -17,8 +17,8 @@ var SlickSlider__default = /*#__PURE__*/_interopDefaultLegacy(SlickSlider);
|
|
|
17
17
|
|
|
18
18
|
var defaultSlides = 5;
|
|
19
19
|
var Slider = function (_a) {
|
|
20
|
-
var children = _a.children, slotsLength = _a.slotsLength, _b = _a.iconHeight, iconHeight = _b === void 0 ? 32 : _b, _c = _a.iconWidth, iconWidth = _c === void 0 ? 32 : _c, _d = _a.iconColor, iconColor = _d === void 0 ? 'darkest' : _d, _e = _a.
|
|
21
|
-
var _f = React.useState(
|
|
20
|
+
var children = _a.children, slotsLength = _a.slotsLength, _b = _a.iconHeight, iconHeight = _b === void 0 ? 32 : _b, _c = _a.iconWidth, iconWidth = _c === void 0 ? 32 : _c, _d = _a.iconColor, iconColor = _d === void 0 ? 'darkest' : _d, responsiveSettings = _a.responsiveSettings, _e = _a.selected, selected = _e === void 0 ? 0 : _e;
|
|
21
|
+
var _f = React.useState(selected), currentPage = _f[0], setCurrentPage = _f[1];
|
|
22
22
|
var width = utils.useWindowSize().width;
|
|
23
23
|
var ref = React.useRef(null);
|
|
24
24
|
var resizeSlides = React.useMemo(function () {
|
|
@@ -40,16 +40,15 @@ var Slider = function (_a) {
|
|
|
40
40
|
}, [slotsLength, resizeSlides]);
|
|
41
41
|
React.useEffect(function () {
|
|
42
42
|
var _a;
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
}, [initialSlot, ref === null || ref === void 0 ? void 0 : ref.current]);
|
|
43
|
+
(_a = ref === null || ref === void 0 ? void 0 : ref.current) === null || _a === void 0 ? void 0 : _a.slickGoTo(selected || 0);
|
|
44
|
+
}, [selected]);
|
|
46
45
|
var settings = {
|
|
47
46
|
speed: 500,
|
|
48
47
|
slidesToShow: defaultSlides,
|
|
49
48
|
slidesToScroll: defaultSlides,
|
|
50
49
|
infinite: false,
|
|
51
50
|
touchTreshold: 100,
|
|
52
|
-
initialSlide:
|
|
51
|
+
initialSlide: 0,
|
|
53
52
|
touchMove: true,
|
|
54
53
|
arrows: false,
|
|
55
54
|
beforeChange: function (_, next) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Slider.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Slider.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -9,10 +9,10 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
9
9
|
|
|
10
10
|
var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
|
|
11
11
|
|
|
12
|
-
var Container = styled__default["default"].div(templateObject_1 || (templateObject_1 = _tslib.__makeTemplateObject(["\n position: relative;\n\n .slick-track {\n display: flex;\n overflow: hidden;\n flex-wrap: nowrap;\n align-items: stretch;\n gap: ", "px;\n }\n .slick-list {\n @media (min-width: ", "px) {\n overflow: hidden;\n }\n }\n .slick-slide {\n height: unset;\n min-height: unset;\n > div {\n height: 100%;\n }\n }\n"], ["\n position: relative;\n\n .slick-track {\n display: flex;\n overflow: hidden;\n flex-wrap: nowrap;\n align-items: stretch;\n gap: ", "px;\n }\n .slick-list {\n @media (min-width: ", "px) {\n overflow: hidden;\n }\n }\n .slick-slide {\n height: unset;\n min-height: unset;\n > div {\n height: 100%;\n }\n }\n"])), function (props) { var _a; return (_a = props.theme.spacings) === null || _a === void 0 ? void 0 : _a.xs; }, function (props) { var _a; return (_a = props.theme.breakpoints) === null || _a === void 0 ? void 0 : _a.
|
|
13
|
-
var LeftIconButtonContainer = styled__default["default"].div(templateObject_2 || (templateObject_2 = _tslib.__makeTemplateObject(["\n display: flex;\n position: absolute;\n left: -", "px;\n top: 50%;\n transform: translateY(-50%);\n z-index: 1;\n @media (max-width: ", "px) {\n display: none !important;\n }\n @media (min-width: ", "px) {\n display: block;\n }\n"], ["\n display: flex;\n position: absolute;\n left: -", "px;\n top: 50%;\n transform: translateY(-50%);\n z-index: 1;\n @media (max-width: ", "px) {\n display: none !important;\n }\n @media (min-width: ", "px) {\n display: block;\n }\n"])), function (props) { var _a; return (_a = props.theme.
|
|
14
|
-
var RightIconButtonContainer = styled__default["default"](LeftIconButtonContainer)(templateObject_3 || (templateObject_3 = _tslib.__makeTemplateObject(["\n left: unset;\n right: -", "px;\n"], ["\n left: unset;\n right: -", "px;\n"])), function (props) { var _a; return (_a = props.theme.
|
|
15
|
-
styled__default["default"].div(templateObject_4 || (templateObject_4 = _tslib.__makeTemplateObject(["\n display: flex;\n flex-direction: row;\n gap: ", "px;\n padding: 0 ", "px;\n @media (min-width: ", "px) {\n padding: 0 ", "px;\n gap: ", "px;\n }\n"], ["\n display: flex;\n flex-direction: row;\n gap: ", "px;\n padding: 0 ", "px;\n @media (min-width: ", "px) {\n padding: 0 ", "px;\n gap: ", "px;\n }\n"])), function (props) { var _a, _b; return (_a = props.itemGap) !== null && _a !== void 0 ? _a : (_b = props.theme.spacings) === null || _b === void 0 ? void 0 : _b.xxs; }, function (props) { var _a; return (_a = props.theme.spacings) === null || _a === void 0 ? void 0 : _a.sm; }, function (props) { var _a; return (_a = props.theme.breakpoints) === null || _a === void 0 ? void 0 : _a.
|
|
12
|
+
var Container = styled__default["default"].div(templateObject_1 || (templateObject_1 = _tslib.__makeTemplateObject(["\n position: relative;\n\n .slick-track {\n display: flex;\n overflow: hidden;\n flex-wrap: nowrap;\n align-items: stretch;\n gap: ", "px;\n }\n .slick-list {\n @media (min-width: ", "px) {\n overflow: hidden;\n }\n }\n .slick-slide {\n height: unset;\n min-height: unset;\n > div {\n height: 100%;\n }\n }\n"], ["\n position: relative;\n\n .slick-track {\n display: flex;\n overflow: hidden;\n flex-wrap: nowrap;\n align-items: stretch;\n gap: ", "px;\n }\n .slick-list {\n @media (min-width: ", "px) {\n overflow: hidden;\n }\n }\n .slick-slide {\n height: unset;\n min-height: unset;\n > div {\n height: 100%;\n }\n }\n"])), function (props) { var _a; return (_a = props.theme.spacings) === null || _a === void 0 ? void 0 : _a.xs; }, function (props) { var _a; return (_a = props.theme.breakpoints) === null || _a === void 0 ? void 0 : _a.lg; });
|
|
13
|
+
var LeftIconButtonContainer = styled__default["default"].div(templateObject_2 || (templateObject_2 = _tslib.__makeTemplateObject(["\n display: flex;\n position: absolute;\n left: -", "px;\n top: 50%;\n transform: translateY(-50%);\n z-index: 1;\n @media (max-width: ", "px) {\n display: none !important;\n }\n @media (min-width: ", "px) {\n display: block;\n }\n"], ["\n display: flex;\n position: absolute;\n left: -", "px;\n top: 50%;\n transform: translateY(-50%);\n z-index: 1;\n @media (max-width: ", "px) {\n display: none !important;\n }\n @media (min-width: ", "px) {\n display: block;\n }\n"])), function (props) { var _a; return (_a = props.theme.spacings) === null || _a === void 0 ? void 0 : _a.xl; }, function (props) { var _a; return (_a = props.theme.breakpoints) === null || _a === void 0 ? void 0 : _a.lg; }, function (props) { var _a; return (_a = props.theme.breakpoints) === null || _a === void 0 ? void 0 : _a.lg; });
|
|
14
|
+
var RightIconButtonContainer = styled__default["default"](LeftIconButtonContainer)(templateObject_3 || (templateObject_3 = _tslib.__makeTemplateObject(["\n left: unset;\n right: -", "px;\n"], ["\n left: unset;\n right: -", "px;\n"])), function (props) { var _a; return (_a = props.theme.spacings) === null || _a === void 0 ? void 0 : _a.xl; });
|
|
15
|
+
styled__default["default"].div(templateObject_4 || (templateObject_4 = _tslib.__makeTemplateObject(["\n display: flex;\n flex-direction: row;\n gap: ", "px;\n padding: 0 ", "px;\n @media (min-width: ", "px) {\n padding: 0 ", "px;\n gap: ", "px;\n }\n"], ["\n display: flex;\n flex-direction: row;\n gap: ", "px;\n padding: 0 ", "px;\n @media (min-width: ", "px) {\n padding: 0 ", "px;\n gap: ", "px;\n }\n"])), function (props) { var _a, _b; return (_a = props.itemGap) !== null && _a !== void 0 ? _a : (_b = props.theme.spacings) === null || _b === void 0 ? void 0 : _b.xxs; }, function (props) { var _a; return (_a = props.theme.spacings) === null || _a === void 0 ? void 0 : _a.sm; }, function (props) { var _a; return (_a = props.theme.breakpoints) === null || _a === void 0 ? void 0 : _a.lg; }, function (props) { var _a; return (_a = props.theme.spacings) === null || _a === void 0 ? void 0 : _a.lg; }, function (props) { var _a, _b; return (_a = props.itemGap) !== null && _a !== void 0 ? _a : (_b = props.theme.spacings) === null || _b === void 0 ? void 0 : _b.xs; });
|
|
16
16
|
var templateObject_1, templateObject_2, templateObject_3, templateObject_4;
|
|
17
17
|
|
|
18
18
|
exports.Container = Container;
|
|
@@ -14,57 +14,7 @@ function DeliverySlotItem(_a) {
|
|
|
14
14
|
setWeekDay(momentDate.format('dddd').toLocaleLowerCase());
|
|
15
15
|
}, [width]);
|
|
16
16
|
var slotRef = useRef(null);
|
|
17
|
-
|
|
18
|
-
var callbackFn = function (entries) {
|
|
19
|
-
var entry = entries[0];
|
|
20
|
-
// gets zoom level
|
|
21
|
-
var zoomLevel = window.devicePixelRatio ||
|
|
22
|
-
window.screen.availWidth / document.documentElement.clientWidth;
|
|
23
|
-
// if zoom is over 200% or less than 50%
|
|
24
|
-
// observer gets buggy when zoom level is too high
|
|
25
|
-
if (zoomLevel > 2 || zoomLevel < 0.5) {
|
|
26
|
-
setIsVisible(true);
|
|
27
|
-
return;
|
|
28
|
-
}
|
|
29
|
-
if (!entry) {
|
|
30
|
-
return setIsVisible(true);
|
|
31
|
-
}
|
|
32
|
-
// check if the slot is within 3px of in view(Height)
|
|
33
|
-
var isInHeight = Math.floor(entry.boundingClientRect.height) -
|
|
34
|
-
Math.floor(entry.intersectionRect.height) <
|
|
35
|
-
3;
|
|
36
|
-
// if no observer cant find height of element
|
|
37
|
-
if (entry.intersectionRect.height === 0) {
|
|
38
|
-
setIsVisible(entry === null || entry === void 0 ? void 0 : entry.isIntersecting);
|
|
39
|
-
return;
|
|
40
|
-
}
|
|
41
|
-
// check if intersecting when slot is in 3px of viewHeight
|
|
42
|
-
if (isInHeight)
|
|
43
|
-
setIsVisible(entry.isIntersecting);
|
|
44
|
-
};
|
|
45
|
-
var options = {
|
|
46
|
-
root: null,
|
|
47
|
-
rootMargin: '0px',
|
|
48
|
-
threshold: 0.9
|
|
49
|
-
};
|
|
50
|
-
useEffect(function () {
|
|
51
|
-
if (!('IntersectionObserver' in window) ||
|
|
52
|
-
!('IntersectionObserverEntry' in window) ||
|
|
53
|
-
!('intersectionRatio' in window.IntersectionObserverEntry.prototype)) {
|
|
54
|
-
return;
|
|
55
|
-
}
|
|
56
|
-
var observer = new IntersectionObserver(callbackFn, options);
|
|
57
|
-
if (!observer)
|
|
58
|
-
return;
|
|
59
|
-
if (slotRef.current)
|
|
60
|
-
observer.observe(slotRef === null || slotRef === void 0 ? void 0 : slotRef.current);
|
|
61
|
-
return function () {
|
|
62
|
-
if (observer) {
|
|
63
|
-
observer.disconnect();
|
|
64
|
-
}
|
|
65
|
-
};
|
|
66
|
-
}, [slotRef, options]);
|
|
67
|
-
return (React.createElement(DeliverySlotItemContainer, { onClick: onSelect, isVisible: isVisible, ref: slotRef, selected: selected },
|
|
17
|
+
return (React.createElement(DeliverySlotItemContainer, { onClick: onSelect, ref: slotRef, selected: selected },
|
|
68
18
|
React.createElement(DeliverySlotContainer, { selected: selected },
|
|
69
19
|
React.createElement(DeliverySlotHeaderText, null,
|
|
70
20
|
React.createElement(BodyText, { fontWeight: 'medium' }, capitalizeFirstLetter(weekDay)),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DeliverySlotItem.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DeliverySlotItem.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __makeTemplateObject } from '../../../../_virtual/_tslib.js';
|
|
2
2
|
import styled from 'styled-components';
|
|
3
3
|
|
|
4
|
-
var DeliverySlotItemContainer = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-self: center;\n
|
|
4
|
+
var DeliverySlotItemContainer = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-self: center;\n transition: opacity ", ";\n min-width: ", "px;\n height: 100%;\n border: solid 1px\n ", ";\n border-radius: ", "px;\n overflow: hidden;\n min-height: ", "px;\n\n @media (min-width: ", "px) {\n min-width: ", "px;\n }\n\n &:hover {\n cursor: pointer;\n }\n"], ["\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-self: center;\n transition: opacity ", ";\n min-width: ", "px;\n height: 100%;\n border: solid 1px\n ", ";\n border-radius: ", "px;\n overflow: hidden;\n min-height: ", "px;\n\n @media (min-width: ", "px) {\n min-width: ", "px;\n }\n\n &:hover {\n cursor: pointer;\n }\n"])), function (props) { var _a, _b; return (_b = (_a = props.theme.attributes) === null || _a === void 0 ? void 0 : _a.transition) === null || _b === void 0 ? void 0 : _b.t1; }, function (props) { var _a; return (_a = props.theme.constants) === null || _a === void 0 ? void 0 : _a.deliverySlotItemWidth; }, function (props) {
|
|
5
5
|
var _a, _b;
|
|
6
6
|
return props.selected
|
|
7
7
|
? (_a = props.theme.palette) === null || _a === void 0 ? void 0 : _a.brandBlue
|
|
@@ -9,7 +9,7 @@ var DeliverySlotItemContainer = styled.div(templateObject_1 || (templateObject_1
|
|
|
9
9
|
}, function (props) { var _a; return (_a = props.theme.attributes) === null || _a === void 0 ? void 0 : _a.borderRadius.small; }, function (props) { var _a; return (_a = props.theme.constants) === null || _a === void 0 ? void 0 : _a.deliverySlotItemHeight; }, function (props) { var _a; return (_a = props.theme.breakpoints) === null || _a === void 0 ? void 0 : _a.md; }, function (props) { var _a; return (_a = props.theme.constants) === null || _a === void 0 ? void 0 : _a.deliverySlotItemWidthDesktop; });
|
|
10
10
|
styled.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n display: flex;\n width: 100%;\n"], ["\n display: flex;\n width: 100%;\n"])));
|
|
11
11
|
var DeliverySlotHeaderText = styled.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n display: flex;\n justify-content: space-between;\n"], ["\n display: flex;\n justify-content: space-between;\n"])));
|
|
12
|
-
var DeliverySlotContainer = styled.div(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n padding: ", "px;\n flex: 1;\n width: stretch;\n background: ", ";\n &:hover {\n cursor: pointer;\n ", ";\n }\n"], ["\n padding: ", "px;\n flex: 1;\n width: stretch;\n background: ", ";\n &:hover {\n cursor: pointer;\n ", ";\n }\n"])), function (props) { var _a; return (_a = props.theme.spacings) === null || _a === void 0 ? void 0 : _a.xs2; }, function (props) {
|
|
12
|
+
var DeliverySlotContainer = styled.div(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n padding: ", "px;\n flex: 1;\n width: stretch;\n background: ", ";\n &:hover {\n cursor: pointer;\n ", ";\n }\n &:active {\n background: ", "};\n }\n\n user-select: none;\n"], ["\n padding: ", "px;\n flex: 1;\n width: stretch;\n background: ", ";\n &:hover {\n cursor: pointer;\n ", ";\n }\n &:active {\n background: ", "};\n }\n\n user-select: none;\n"])), function (props) { var _a; return (_a = props.theme.spacings) === null || _a === void 0 ? void 0 : _a.xs2; }, function (props) {
|
|
13
13
|
var _a, _b;
|
|
14
14
|
return props.selected
|
|
15
15
|
? (_a = props.theme.palette) === null || _a === void 0 ? void 0 : _a.blueLight
|
|
@@ -17,8 +17,8 @@ var DeliverySlotContainer = styled.div(templateObject_4 || (templateObject_4 = _
|
|
|
17
17
|
}, function (props) {
|
|
18
18
|
var _a;
|
|
19
19
|
return !props.selected &&
|
|
20
|
-
"\n background:".concat((_a = props.theme.palette) === null || _a === void 0 ? void 0 : _a.
|
|
21
|
-
});
|
|
20
|
+
"\n background:".concat((_a = props.theme.palette) === null || _a === void 0 ? void 0 : _a.lightest);
|
|
21
|
+
}, function (props) { var _a; return (_a = props.theme.palette) === null || _a === void 0 ? void 0 : _a.lighter; });
|
|
22
22
|
var DeliverySlotBody = styled.div(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n margin-top: ", "px;\n margin-bottom: ", "px;\n"], ["\n margin-top: ", "px;\n margin-bottom: ", "px;\n"])), function (props) { var _a; return (_a = props.theme.spacings) === null || _a === void 0 ? void 0 : _a.xxxs; }, function (props) { var _a; return (_a = props.theme.spacings) === null || _a === void 0 ? void 0 : _a.xxs; });
|
|
23
23
|
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5;
|
|
24
24
|
|
|
@@ -2,7 +2,7 @@ import { __makeTemplateObject } from '../../../../_virtual/_tslib.js';
|
|
|
2
2
|
import { H3, BodyText } from '@citygross/typography';
|
|
3
3
|
import styled from 'styled-components';
|
|
4
4
|
|
|
5
|
-
var BaseRadioListItemContainer = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n padding: ", "px;\n align-items: center;\n cursor: ", ";\n flex-wrap: wrap;\n border-radius: ", "px;\n background: ", ";\n transition: background-color 250ms ease;\n border: 1px solid
|
|
5
|
+
var BaseRadioListItemContainer = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n padding: ", "px;\n align-items: center;\n cursor: ", ";\n flex-wrap: wrap;\n border-radius: ", "px;\n background: ", ";\n transition: background-color 250ms ease;\n border: 1px solid\n ", ";\n > p:first-of-type {\n margin-left: ", "px;\n }\n"], ["\n padding: ", "px;\n align-items: center;\n cursor: ", ";\n flex-wrap: wrap;\n border-radius: ", "px;\n background: ", ";\n transition: background-color 250ms ease;\n border: 1px solid\n ", ";\n > p:first-of-type {\n margin-left: ", "px;\n }\n"])), function (props) { var _a; return (props.noPadding ? 0 : (_a = props.theme.spacings) === null || _a === void 0 ? void 0 : _a.xs2); }, function (props) { return (props.isDisabled ? 'cursor' : 'pointer'); }, function (props) { var _a; return (_a = props.theme.attributes) === null || _a === void 0 ? void 0 : _a.borderRadius.small; }, function (props) {
|
|
6
6
|
var _a, _b, _c, _d;
|
|
7
7
|
return props.isDisabled
|
|
8
8
|
? (_a = props.theme.palette) === null || _a === void 0 ? void 0 : _a.lightest
|
|
@@ -11,7 +11,12 @@ var BaseRadioListItemContainer = styled.div(templateObject_1 || (templateObject_
|
|
|
11
11
|
: props.selected
|
|
12
12
|
? (_c = props.theme.palette) === null || _c === void 0 ? void 0 : _c.blueLight
|
|
13
13
|
: (_d = props.theme.palette) === null || _d === void 0 ? void 0 : _d.white;
|
|
14
|
-
}, function (props) {
|
|
14
|
+
}, function (props) {
|
|
15
|
+
var _a, _b;
|
|
16
|
+
return props.selected
|
|
17
|
+
? (_a = props.theme.palette) === null || _a === void 0 ? void 0 : _a.brandBlue
|
|
18
|
+
: (_b = props.theme.palette) === null || _b === void 0 ? void 0 : _b.medium;
|
|
19
|
+
}, function (props) { var _a; return (_a = props.theme.spacings) === null || _a === void 0 ? void 0 : _a.xs; });
|
|
15
20
|
var BaseRadioItemLeftWrapper = styled.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n display: flex;\n flex: 5;\n align-items: flex-start;\n ", ";\n"], ["\n display: flex;\n flex: 5;\n align-items: flex-start;\n ", ";\n"])), function (props) { return props.flexGrow && "flex-grow: ".concat(props.flexGrow); });
|
|
16
21
|
var StyledH3 = styled(H3).attrs({ as: 'label' })(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n cursor: pointer;\n white-space: nowrap;\n display: block;\n line-height: ", "px;\n ", ";\n"], ["\n cursor: pointer;\n white-space: nowrap;\n display: block;\n line-height: ", "px;\n ", ";\n"])), function (props) { var _a; return (_a = props.theme.typography) === null || _a === void 0 ? void 0 : _a.lineHeight.m1; }, function (props) { var _a; return props.isDisabled && "color:".concat((_a = props.theme.palette) === null || _a === void 0 ? void 0 : _a.dark); });
|
|
17
22
|
var RadioRightWrapper = styled.div(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n display: flex;\n gap: ", "px;\n justify-content: flex-end;\n text-align: right;\n font-size: ", "px;\n"], ["\n display: flex;\n gap: ", "px;\n justify-content: flex-end;\n text-align: right;\n font-size: ", "px;\n"])), function (props) { var _a; return (_a = props.theme.spacings) === null || _a === void 0 ? void 0 : _a.xs; }, function (props) { var _a; return (_a = props.theme.typography) === null || _a === void 0 ? void 0 : _a.size.s2; });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RadioListItem.styles.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RadioListItem.styles.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -8,8 +8,8 @@ import { useWindowSize } from '@citygross/utils';
|
|
|
8
8
|
|
|
9
9
|
var defaultSlides = 5;
|
|
10
10
|
var Slider = function (_a) {
|
|
11
|
-
var children = _a.children, slotsLength = _a.slotsLength, _b = _a.iconHeight, iconHeight = _b === void 0 ? 32 : _b, _c = _a.iconWidth, iconWidth = _c === void 0 ? 32 : _c, _d = _a.iconColor, iconColor = _d === void 0 ? 'darkest' : _d, _e = _a.
|
|
12
|
-
var _f = useState(
|
|
11
|
+
var children = _a.children, slotsLength = _a.slotsLength, _b = _a.iconHeight, iconHeight = _b === void 0 ? 32 : _b, _c = _a.iconWidth, iconWidth = _c === void 0 ? 32 : _c, _d = _a.iconColor, iconColor = _d === void 0 ? 'darkest' : _d, responsiveSettings = _a.responsiveSettings, _e = _a.selected, selected = _e === void 0 ? 0 : _e;
|
|
12
|
+
var _f = useState(selected), currentPage = _f[0], setCurrentPage = _f[1];
|
|
13
13
|
var width = useWindowSize().width;
|
|
14
14
|
var ref = useRef(null);
|
|
15
15
|
var resizeSlides = useMemo(function () {
|
|
@@ -31,16 +31,15 @@ var Slider = function (_a) {
|
|
|
31
31
|
}, [slotsLength, resizeSlides]);
|
|
32
32
|
useEffect(function () {
|
|
33
33
|
var _a;
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
}, [initialSlot, ref === null || ref === void 0 ? void 0 : ref.current]);
|
|
34
|
+
(_a = ref === null || ref === void 0 ? void 0 : ref.current) === null || _a === void 0 ? void 0 : _a.slickGoTo(selected || 0);
|
|
35
|
+
}, [selected]);
|
|
37
36
|
var settings = {
|
|
38
37
|
speed: 500,
|
|
39
38
|
slidesToShow: defaultSlides,
|
|
40
39
|
slidesToScroll: defaultSlides,
|
|
41
40
|
infinite: false,
|
|
42
41
|
touchTreshold: 100,
|
|
43
|
-
initialSlide:
|
|
42
|
+
initialSlide: 0,
|
|
44
43
|
touchMove: true,
|
|
45
44
|
arrows: false,
|
|
46
45
|
beforeChange: function (_, next) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Slider.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Slider.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,10 +1,10 @@
|
|
|
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 position: relative;\n\n .slick-track {\n display: flex;\n overflow: hidden;\n flex-wrap: nowrap;\n align-items: stretch;\n gap: ", "px;\n }\n .slick-list {\n @media (min-width: ", "px) {\n overflow: hidden;\n }\n }\n .slick-slide {\n height: unset;\n min-height: unset;\n > div {\n height: 100%;\n }\n }\n"], ["\n position: relative;\n\n .slick-track {\n display: flex;\n overflow: hidden;\n flex-wrap: nowrap;\n align-items: stretch;\n gap: ", "px;\n }\n .slick-list {\n @media (min-width: ", "px) {\n overflow: hidden;\n }\n }\n .slick-slide {\n height: unset;\n min-height: unset;\n > div {\n height: 100%;\n }\n }\n"])), function (props) { var _a; return (_a = props.theme.spacings) === null || _a === void 0 ? void 0 : _a.xs; }, function (props) { var _a; return (_a = props.theme.breakpoints) === null || _a === void 0 ? void 0 : _a.
|
|
5
|
-
var LeftIconButtonContainer = styled.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n display: flex;\n position: absolute;\n left: -", "px;\n top: 50%;\n transform: translateY(-50%);\n z-index: 1;\n @media (max-width: ", "px) {\n display: none !important;\n }\n @media (min-width: ", "px) {\n display: block;\n }\n"], ["\n display: flex;\n position: absolute;\n left: -", "px;\n top: 50%;\n transform: translateY(-50%);\n z-index: 1;\n @media (max-width: ", "px) {\n display: none !important;\n }\n @media (min-width: ", "px) {\n display: block;\n }\n"])), function (props) { var _a; return (_a = props.theme.
|
|
6
|
-
var RightIconButtonContainer = styled(LeftIconButtonContainer)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n left: unset;\n right: -", "px;\n"], ["\n left: unset;\n right: -", "px;\n"])), function (props) { var _a; return (_a = props.theme.
|
|
7
|
-
styled.div(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n display: flex;\n flex-direction: row;\n gap: ", "px;\n padding: 0 ", "px;\n @media (min-width: ", "px) {\n padding: 0 ", "px;\n gap: ", "px;\n }\n"], ["\n display: flex;\n flex-direction: row;\n gap: ", "px;\n padding: 0 ", "px;\n @media (min-width: ", "px) {\n padding: 0 ", "px;\n gap: ", "px;\n }\n"])), function (props) { var _a, _b; return (_a = props.itemGap) !== null && _a !== void 0 ? _a : (_b = props.theme.spacings) === null || _b === void 0 ? void 0 : _b.xxs; }, function (props) { var _a; return (_a = props.theme.spacings) === null || _a === void 0 ? void 0 : _a.sm; }, function (props) { var _a; return (_a = props.theme.breakpoints) === null || _a === void 0 ? void 0 : _a.
|
|
4
|
+
var Container = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n position: relative;\n\n .slick-track {\n display: flex;\n overflow: hidden;\n flex-wrap: nowrap;\n align-items: stretch;\n gap: ", "px;\n }\n .slick-list {\n @media (min-width: ", "px) {\n overflow: hidden;\n }\n }\n .slick-slide {\n height: unset;\n min-height: unset;\n > div {\n height: 100%;\n }\n }\n"], ["\n position: relative;\n\n .slick-track {\n display: flex;\n overflow: hidden;\n flex-wrap: nowrap;\n align-items: stretch;\n gap: ", "px;\n }\n .slick-list {\n @media (min-width: ", "px) {\n overflow: hidden;\n }\n }\n .slick-slide {\n height: unset;\n min-height: unset;\n > div {\n height: 100%;\n }\n }\n"])), function (props) { var _a; return (_a = props.theme.spacings) === null || _a === void 0 ? void 0 : _a.xs; }, function (props) { var _a; return (_a = props.theme.breakpoints) === null || _a === void 0 ? void 0 : _a.lg; });
|
|
5
|
+
var LeftIconButtonContainer = styled.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n display: flex;\n position: absolute;\n left: -", "px;\n top: 50%;\n transform: translateY(-50%);\n z-index: 1;\n @media (max-width: ", "px) {\n display: none !important;\n }\n @media (min-width: ", "px) {\n display: block;\n }\n"], ["\n display: flex;\n position: absolute;\n left: -", "px;\n top: 50%;\n transform: translateY(-50%);\n z-index: 1;\n @media (max-width: ", "px) {\n display: none !important;\n }\n @media (min-width: ", "px) {\n display: block;\n }\n"])), function (props) { var _a; return (_a = props.theme.spacings) === null || _a === void 0 ? void 0 : _a.xl; }, function (props) { var _a; return (_a = props.theme.breakpoints) === null || _a === void 0 ? void 0 : _a.lg; }, function (props) { var _a; return (_a = props.theme.breakpoints) === null || _a === void 0 ? void 0 : _a.lg; });
|
|
6
|
+
var RightIconButtonContainer = styled(LeftIconButtonContainer)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n left: unset;\n right: -", "px;\n"], ["\n left: unset;\n right: -", "px;\n"])), function (props) { var _a; return (_a = props.theme.spacings) === null || _a === void 0 ? void 0 : _a.xl; });
|
|
7
|
+
styled.div(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n display: flex;\n flex-direction: row;\n gap: ", "px;\n padding: 0 ", "px;\n @media (min-width: ", "px) {\n padding: 0 ", "px;\n gap: ", "px;\n }\n"], ["\n display: flex;\n flex-direction: row;\n gap: ", "px;\n padding: 0 ", "px;\n @media (min-width: ", "px) {\n padding: 0 ", "px;\n gap: ", "px;\n }\n"])), function (props) { var _a, _b; return (_a = props.itemGap) !== null && _a !== void 0 ? _a : (_b = props.theme.spacings) === null || _b === void 0 ? void 0 : _b.xxs; }, function (props) { var _a; return (_a = props.theme.spacings) === null || _a === void 0 ? void 0 : _a.sm; }, function (props) { var _a; return (_a = props.theme.breakpoints) === null || _a === void 0 ? void 0 : _a.lg; }, function (props) { var _a; return (_a = props.theme.spacings) === null || _a === void 0 ? void 0 : _a.lg; }, function (props) { var _a, _b; return (_a = props.itemGap) !== null && _a !== void 0 ? _a : (_b = props.theme.spacings) === null || _b === void 0 ? void 0 : _b.xs; });
|
|
8
8
|
var templateObject_1, templateObject_2, templateObject_3, templateObject_4;
|
|
9
9
|
|
|
10
10
|
export { Container, LeftIconButtonContainer, RightIconButtonContainer };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@citygross/components",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.215",
|
|
4
4
|
"license": "ISC",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "./build/cjs/components/src/index.js",
|
|
@@ -74,5 +74,5 @@
|
|
|
74
74
|
"react-slick": "^0.30.1",
|
|
75
75
|
"slick-carousel": "^1.8.1"
|
|
76
76
|
},
|
|
77
|
-
"gitHead": "
|
|
77
|
+
"gitHead": "8e1b03c5118e2fdf53ac504cd2763c8a685f379a"
|
|
78
78
|
}
|