@citygross/components 0.7.114 → 0.7.115
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/cjs/components/src/components/AddressBlock/AddressBlock.js +0 -1
- package/build/cjs/components/src/components/AddressBlock/AddressBlock.js.map +1 -1
- package/build/cjs/components/src/components/SideModal/SideModal.js +19 -9
- package/build/cjs/components/src/components/SideModal/SideModal.js.map +1 -1
- package/build/cjs/components/src/components/SideModal/SideModal.styles.js +2 -2
- package/build/cjs/components/src/components/WarningLabel/WarningLabel.js +0 -1
- package/build/cjs/components/src/components/WarningLabel/WarningLabel.js.map +1 -1
- package/build/es/components/src/components/AddressBlock/AddressBlock.js +0 -1
- package/build/es/components/src/components/AddressBlock/AddressBlock.js.map +1 -1
- package/build/es/components/src/components/SideModal/SideModal.js +19 -9
- package/build/es/components/src/components/SideModal/SideModal.js.map +1 -1
- package/build/es/components/src/components/SideModal/SideModal.styles.js +2 -2
- package/build/es/components/src/components/WarningLabel/WarningLabel.js +0 -1
- package/build/es/components/src/components/WarningLabel/WarningLabel.js.map +1 -1
- package/package.json +2 -2
|
@@ -77,7 +77,6 @@ require('styled-components');
|
|
|
77
77
|
require('../SearchBar/SearchBar.styles.js');
|
|
78
78
|
require('../Nav/Nav.styles.js');
|
|
79
79
|
require('../NavMainLink/NavMainLink.styled.js');
|
|
80
|
-
require('framer-motion');
|
|
81
80
|
require('../SideModal/SideModal.styles.js');
|
|
82
81
|
require('../IconText/IconText.styles.js');
|
|
83
82
|
require('../Dropdown/Dropdown.styles.js');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AddressBlock.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AddressBlock.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var React = require('react');
|
|
6
|
-
var framerMotion = require('framer-motion');
|
|
7
6
|
var reactDom = require('react-dom');
|
|
8
7
|
var SideModal_styles = require('./SideModal.styles.js');
|
|
9
8
|
var designTokens = require('@citygross/design-tokens');
|
|
@@ -16,16 +15,27 @@ var SideModal = function (_a) {
|
|
|
16
15
|
var _b, _c;
|
|
17
16
|
var onBackdropClick = _a.onBackdropClick, _d = _a.background, background = _d === void 0 ? '#fff' : _d, _e = _a.overlayBackground, overlayBackground = _e === void 0 ? (_c = (_b = designTokens.theme.palette) === null || _b === void 0 ? void 0 : _b.darkOverlay) !== null && _c !== void 0 ? _c : '' : _e, _f = _a.width, width = _f === void 0 ? 375 : _f, isVisible = _a.isVisible, slideFrom = _a.slideFrom, _g = _a.querySelector, querySelector = _g === void 0 ? '#root' : _g, maxWidth = _a.maxWidth, children = _a.children;
|
|
18
17
|
var ref = React.useRef(null);
|
|
18
|
+
var variants = {
|
|
19
|
+
hide: {
|
|
20
|
+
x: slideFrom === 'left' ? '-100%' : '100%',
|
|
21
|
+
transition: { duration: 0.3, delay: 0, ease: 'linear' }
|
|
22
|
+
},
|
|
23
|
+
show: {
|
|
24
|
+
x: 0,
|
|
25
|
+
transition: { duration: 0.3, delay: 0, ease: 'linear' }
|
|
26
|
+
}
|
|
27
|
+
};
|
|
19
28
|
var domSafe = typeof document !== 'undefined';
|
|
20
29
|
return domSafe
|
|
21
|
-
? reactDom.createPortal(React__default["default"].createElement(
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
30
|
+
? reactDom.createPortal(React__default["default"].createElement(React__default["default"].Fragment, null,
|
|
31
|
+
isVisible && (React__default["default"].createElement(SideModal_styles.SideModalOverlay, { ref: ref, onMouseDown: function (e) {
|
|
32
|
+
if (ref && e.target === (ref === null || ref === void 0 ? void 0 : ref.current)) {
|
|
33
|
+
onBackdropClick();
|
|
34
|
+
}
|
|
35
|
+
}, overlayBackground: overlayBackground, initial: { opacity: 0 }, animate: { opacity: 1 }, exit: { opacity: 0 }, transition: {
|
|
36
|
+
type: 'just'
|
|
37
|
+
} })),
|
|
38
|
+
React__default["default"].createElement(SideModal_styles.SideModalContainer, { slideFrom: slideFrom, maxWidth: maxWidth, transition: { type: 'just' }, width: width, onClick: function (e) { return e.stopPropagation(); }, background: background, variants: variants, animate: isVisible ? 'show' : 'hide' }, children)), document.querySelector(querySelector) || document.body)
|
|
29
39
|
: null;
|
|
30
40
|
};
|
|
31
41
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SideModal.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SideModal.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -11,10 +11,10 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
11
11
|
var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
|
|
12
12
|
|
|
13
13
|
var SideModalOverlay = styled__default["default"](framerMotion.motion.div)(templateObject_1 || (templateObject_1 = _tslib.__makeTemplateObject(["\n display: flex;\n z-index: ", ";\n background: ", ";\n position: fixed;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n height: 100%;\n justify-content: center;\n align-items: center;\n\n @media (min-width: ", "px) {\n padding: ", "px;\n }\n"], ["\n display: flex;\n z-index: ", ";\n background: ", ";\n position: fixed;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n height: 100%;\n justify-content: center;\n align-items: center;\n\n @media (min-width: ", "px) {\n padding: ", "px;\n }\n"])), function (props) { var _a; return (_a = props.theme.attributes) === null || _a === void 0 ? void 0 : _a.zIndex.modal; }, function (props) { return props.overlayBackground; }, function (props) { var _a; return (_a = props.theme.breakpoints) === null || _a === void 0 ? void 0 : _a.xs; }, function (props) { var _a; return (_a = props.theme.spacings) === null || _a === void 0 ? void 0 : _a.lg; });
|
|
14
|
-
var SideModalContainer = styled__default["default"](framerMotion.motion.div)(templateObject_2 || (templateObject_2 = _tslib.__makeTemplateObject(["\n height: 100vh;\n background: ", ";\n width: 100%;\n ", ";\n position: absolute;\n ", ";\n top: 0;\n\n overflow: auto;\n -ms-overflow-style: none;\n scrollbar-width: none;\n &::-webkit-scrollbar {\n display: none;\n }\n\n @media (min-width: ", "px) {\n width: ", "px;\n }\n"], ["\n height: 100vh;\n background: ", ";\n width: 100%;\n ", ";\n position: absolute;\n ", ";\n top: 0;\n\n overflow: auto;\n -ms-overflow-style: none;\n scrollbar-width: none;\n &::-webkit-scrollbar {\n display: none;\n }\n\n @media (min-width: ", "px) {\n width: ", "px;\n }\n"])), function (props) { return props.background; }, function (_a) {
|
|
14
|
+
var SideModalContainer = styled__default["default"](framerMotion.motion.div)(templateObject_2 || (templateObject_2 = _tslib.__makeTemplateObject(["\n height: 100vh;\n background: ", ";\n width: 100%;\n ", ";\n position: absolute;\n ", ";\n top: 0;\n z-index: ", ";\n\n overflow: auto;\n -ms-overflow-style: none;\n scrollbar-width: none;\n &::-webkit-scrollbar {\n display: none;\n }\n\n @media (min-width: ", "px) {\n width: ", "px;\n }\n"], ["\n height: 100vh;\n background: ", ";\n width: 100%;\n ", ";\n position: absolute;\n ", ";\n top: 0;\n z-index: ", ";\n\n overflow: auto;\n -ms-overflow-style: none;\n scrollbar-width: none;\n &::-webkit-scrollbar {\n display: none;\n }\n\n @media (min-width: ", "px) {\n width: ", "px;\n }\n"])), function (props) { return props.background; }, function (_a) {
|
|
15
15
|
var maxWidth = _a.maxWidth;
|
|
16
16
|
return maxWidth && "max-width:".concat(maxWidth);
|
|
17
|
-
}, function (props) { return ((props === null || props === void 0 ? void 0 : props.slideFrom) === 'left' ? "left: 0px" : 'right: 0px'); }, function (props) { var _a; return (_a = props.theme.breakpoints) === null || _a === void 0 ? void 0 : _a.sm; }, function (props) { return props.width; });
|
|
17
|
+
}, function (props) { return ((props === null || props === void 0 ? void 0 : props.slideFrom) === 'left' ? "left: 0px" : 'right: 0px'); }, function (props) { var _a; return (_a = props.theme.attributes) === null || _a === void 0 ? void 0 : _a.zIndex.modal; }, function (props) { var _a; return (_a = props.theme.breakpoints) === null || _a === void 0 ? void 0 : _a.sm; }, function (props) { return props.width; });
|
|
18
18
|
var templateObject_1, templateObject_2;
|
|
19
19
|
|
|
20
20
|
exports.SideModalContainer = SideModalContainer;
|
|
@@ -77,7 +77,6 @@ require('styled-components');
|
|
|
77
77
|
require('../SearchBar/SearchBar.styles.js');
|
|
78
78
|
require('../Nav/Nav.styles.js');
|
|
79
79
|
require('../NavMainLink/NavMainLink.styled.js');
|
|
80
|
-
require('framer-motion');
|
|
81
80
|
require('../SideModal/SideModal.styles.js');
|
|
82
81
|
require('../IconText/IconText.styles.js');
|
|
83
82
|
require('../Dropdown/Dropdown.styles.js');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WarningLabel.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"WarningLabel.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -73,7 +73,6 @@ import 'styled-components';
|
|
|
73
73
|
import '../SearchBar/SearchBar.styles.js';
|
|
74
74
|
import '../Nav/Nav.styles.js';
|
|
75
75
|
import '../NavMainLink/NavMainLink.styled.js';
|
|
76
|
-
import 'framer-motion';
|
|
77
76
|
import '../SideModal/SideModal.styles.js';
|
|
78
77
|
import '../IconText/IconText.styles.js';
|
|
79
78
|
import '../Dropdown/Dropdown.styles.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AddressBlock.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AddressBlock.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import React, { useRef } from 'react';
|
|
2
|
-
import { AnimatePresence } from 'framer-motion';
|
|
3
2
|
import { createPortal } from 'react-dom';
|
|
4
3
|
import { SideModalOverlay, SideModalContainer } from './SideModal.styles.js';
|
|
5
4
|
import { theme } from '@citygross/design-tokens';
|
|
@@ -8,16 +7,27 @@ var SideModal = function (_a) {
|
|
|
8
7
|
var _b, _c;
|
|
9
8
|
var onBackdropClick = _a.onBackdropClick, _d = _a.background, background = _d === void 0 ? '#fff' : _d, _e = _a.overlayBackground, overlayBackground = _e === void 0 ? (_c = (_b = theme.palette) === null || _b === void 0 ? void 0 : _b.darkOverlay) !== null && _c !== void 0 ? _c : '' : _e, _f = _a.width, width = _f === void 0 ? 375 : _f, isVisible = _a.isVisible, slideFrom = _a.slideFrom, _g = _a.querySelector, querySelector = _g === void 0 ? '#root' : _g, maxWidth = _a.maxWidth, children = _a.children;
|
|
10
9
|
var ref = useRef(null);
|
|
10
|
+
var variants = {
|
|
11
|
+
hide: {
|
|
12
|
+
x: slideFrom === 'left' ? '-100%' : '100%',
|
|
13
|
+
transition: { duration: 0.3, delay: 0, ease: 'linear' }
|
|
14
|
+
},
|
|
15
|
+
show: {
|
|
16
|
+
x: 0,
|
|
17
|
+
transition: { duration: 0.3, delay: 0, ease: 'linear' }
|
|
18
|
+
}
|
|
19
|
+
};
|
|
11
20
|
var domSafe = typeof document !== 'undefined';
|
|
12
21
|
return domSafe
|
|
13
|
-
? createPortal(React.createElement(
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
22
|
+
? createPortal(React.createElement(React.Fragment, null,
|
|
23
|
+
isVisible && (React.createElement(SideModalOverlay, { ref: ref, onMouseDown: function (e) {
|
|
24
|
+
if (ref && e.target === (ref === null || ref === void 0 ? void 0 : ref.current)) {
|
|
25
|
+
onBackdropClick();
|
|
26
|
+
}
|
|
27
|
+
}, overlayBackground: overlayBackground, initial: { opacity: 0 }, animate: { opacity: 1 }, exit: { opacity: 0 }, transition: {
|
|
28
|
+
type: 'just'
|
|
29
|
+
} })),
|
|
30
|
+
React.createElement(SideModalContainer, { slideFrom: slideFrom, maxWidth: maxWidth, transition: { type: 'just' }, width: width, onClick: function (e) { return e.stopPropagation(); }, background: background, variants: variants, animate: isVisible ? 'show' : 'hide' }, children)), document.querySelector(querySelector) || document.body)
|
|
21
31
|
: null;
|
|
22
32
|
};
|
|
23
33
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SideModal.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SideModal.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -3,10 +3,10 @@ import styled from 'styled-components';
|
|
|
3
3
|
import { motion } from 'framer-motion';
|
|
4
4
|
|
|
5
5
|
var SideModalOverlay = styled(motion.div)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: flex;\n z-index: ", ";\n background: ", ";\n position: fixed;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n height: 100%;\n justify-content: center;\n align-items: center;\n\n @media (min-width: ", "px) {\n padding: ", "px;\n }\n"], ["\n display: flex;\n z-index: ", ";\n background: ", ";\n position: fixed;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n height: 100%;\n justify-content: center;\n align-items: center;\n\n @media (min-width: ", "px) {\n padding: ", "px;\n }\n"])), function (props) { var _a; return (_a = props.theme.attributes) === null || _a === void 0 ? void 0 : _a.zIndex.modal; }, function (props) { return props.overlayBackground; }, function (props) { var _a; return (_a = props.theme.breakpoints) === null || _a === void 0 ? void 0 : _a.xs; }, function (props) { var _a; return (_a = props.theme.spacings) === null || _a === void 0 ? void 0 : _a.lg; });
|
|
6
|
-
var SideModalContainer = styled(motion.div)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n height: 100vh;\n background: ", ";\n width: 100%;\n ", ";\n position: absolute;\n ", ";\n top: 0;\n\n overflow: auto;\n -ms-overflow-style: none;\n scrollbar-width: none;\n &::-webkit-scrollbar {\n display: none;\n }\n\n @media (min-width: ", "px) {\n width: ", "px;\n }\n"], ["\n height: 100vh;\n background: ", ";\n width: 100%;\n ", ";\n position: absolute;\n ", ";\n top: 0;\n\n overflow: auto;\n -ms-overflow-style: none;\n scrollbar-width: none;\n &::-webkit-scrollbar {\n display: none;\n }\n\n @media (min-width: ", "px) {\n width: ", "px;\n }\n"])), function (props) { return props.background; }, function (_a) {
|
|
6
|
+
var SideModalContainer = styled(motion.div)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n height: 100vh;\n background: ", ";\n width: 100%;\n ", ";\n position: absolute;\n ", ";\n top: 0;\n z-index: ", ";\n\n overflow: auto;\n -ms-overflow-style: none;\n scrollbar-width: none;\n &::-webkit-scrollbar {\n display: none;\n }\n\n @media (min-width: ", "px) {\n width: ", "px;\n }\n"], ["\n height: 100vh;\n background: ", ";\n width: 100%;\n ", ";\n position: absolute;\n ", ";\n top: 0;\n z-index: ", ";\n\n overflow: auto;\n -ms-overflow-style: none;\n scrollbar-width: none;\n &::-webkit-scrollbar {\n display: none;\n }\n\n @media (min-width: ", "px) {\n width: ", "px;\n }\n"])), function (props) { return props.background; }, function (_a) {
|
|
7
7
|
var maxWidth = _a.maxWidth;
|
|
8
8
|
return maxWidth && "max-width:".concat(maxWidth);
|
|
9
|
-
}, function (props) { return ((props === null || props === void 0 ? void 0 : props.slideFrom) === 'left' ? "left: 0px" : 'right: 0px'); }, function (props) { var _a; return (_a = props.theme.breakpoints) === null || _a === void 0 ? void 0 : _a.sm; }, function (props) { return props.width; });
|
|
9
|
+
}, function (props) { return ((props === null || props === void 0 ? void 0 : props.slideFrom) === 'left' ? "left: 0px" : 'right: 0px'); }, function (props) { var _a; return (_a = props.theme.attributes) === null || _a === void 0 ? void 0 : _a.zIndex.modal; }, function (props) { var _a; return (_a = props.theme.breakpoints) === null || _a === void 0 ? void 0 : _a.sm; }, function (props) { return props.width; });
|
|
10
10
|
var templateObject_1, templateObject_2;
|
|
11
11
|
|
|
12
12
|
export { SideModalContainer, SideModalOverlay };
|
|
@@ -73,7 +73,6 @@ import 'styled-components';
|
|
|
73
73
|
import '../SearchBar/SearchBar.styles.js';
|
|
74
74
|
import '../Nav/Nav.styles.js';
|
|
75
75
|
import '../NavMainLink/NavMainLink.styled.js';
|
|
76
|
-
import 'framer-motion';
|
|
77
76
|
import '../SideModal/SideModal.styles.js';
|
|
78
77
|
import '../IconText/IconText.styles.js';
|
|
79
78
|
import '../Dropdown/Dropdown.styles.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WarningLabel.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"WarningLabel.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@citygross/components",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.115",
|
|
4
4
|
"license": "ISC",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "./build/cjs/components/src/index.js",
|
|
@@ -71,5 +71,5 @@
|
|
|
71
71
|
"moment": "^2.29.1",
|
|
72
72
|
"react-loading-skeleton": "^2.2.0"
|
|
73
73
|
},
|
|
74
|
-
"gitHead": "
|
|
74
|
+
"gitHead": "410b15c9ebb2e7874d723f81e412f43f97d45db6"
|
|
75
75
|
}
|