sag_components 1.0.668 → 1.0.669
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/dist/stories/components/BannerEventBox.js +18 -26
- package/dist/stories/components/BannerEventBox.style.js +2 -2
- package/dist/stories/components/BannerEventBoxTest.js +42 -0
- package/dist/stories/components/BannerEventBoxTest.style.js +11 -0
- package/dist/stories/components/CollapseMenuItem.js +3 -3
- package/dist/stories/components/CollapseMenuItem.style.js +4 -4
- package/dist/stories/components/DropdownMultiNew.js +4 -6
- package/dist/stories/components/DropdownMultiNew.style.js +2 -2
- package/dist/stories/components/DropdownSingleNew.js +2 -4
- package/dist/stories/components/DropdownSingleNew.style.js +2 -2
- package/dist/stories/components/FilterButton.js +10 -4
- package/dist/stories/components/FilterButton.style.js +1 -1
- package/dist/stories/components/FilterPanel.js +161 -138
- package/dist/stories/components/Input.js +6 -26
- package/dist/stories/components/Input.style.js +6 -6
- package/dist/stories/utils/IconsHandler.js +10 -30
- package/dist/stories/utils/IconsHandler.style.js +1 -1
- package/package.json +3 -3
- package/dist/stories/components/EventInfo.js +0 -92
- package/dist/stories/components/EventInfo.style.js +0 -20
|
@@ -23,32 +23,31 @@ const BannerEventBox = props => {
|
|
|
23
23
|
description,
|
|
24
24
|
dates,
|
|
25
25
|
data,
|
|
26
|
-
|
|
26
|
+
onInfoClick
|
|
27
27
|
} = props;
|
|
28
|
-
const [showTooltip, setShowTooltip] = (0, _react.useState)(false);
|
|
29
28
|
const [tooltipPos, setTooltipPos] = (0, _react.useState)({
|
|
30
29
|
x: 0,
|
|
31
30
|
y: 0
|
|
32
31
|
});
|
|
33
|
-
const
|
|
32
|
+
const [showItemTooltip, setShowItemTooltip] = (0, _react.useState)(Array(data.length).fill(false));
|
|
34
33
|
const formatedBanners = () => {
|
|
35
34
|
switch (banner) {
|
|
36
|
-
case '
|
|
35
|
+
case 'Stop&Shop':
|
|
37
36
|
return {
|
|
38
37
|
icon: /*#__PURE__*/_react.default.createElement(_StopAndShopNewIcon.StopAndShopNewIcon, null),
|
|
39
38
|
name: 'Stop&Shop'
|
|
40
39
|
};
|
|
41
|
-
case '
|
|
40
|
+
case 'Food Lion':
|
|
42
41
|
return {
|
|
43
42
|
icon: /*#__PURE__*/_react.default.createElement(_FoodLionNewIcon.FoodLionNewIcon, null),
|
|
44
43
|
name: 'Food Lion'
|
|
45
44
|
};
|
|
46
|
-
case '
|
|
45
|
+
case 'Giant Food':
|
|
47
46
|
return {
|
|
48
47
|
icon: /*#__PURE__*/_react.default.createElement(_GiantFoodIcon_new.GiantFoodNewIcon, null),
|
|
49
48
|
name: 'Giant Food'
|
|
50
49
|
};
|
|
51
|
-
case '
|
|
50
|
+
case 'The Giant Company':
|
|
52
51
|
return {
|
|
53
52
|
icon: /*#__PURE__*/_react.default.createElement(_TheGiantCompanyNewIcon.TheGiantCompanyIcon, null),
|
|
54
53
|
name: 'The Giant Company'
|
|
@@ -62,16 +61,19 @@ const BannerEventBox = props => {
|
|
|
62
61
|
return null;
|
|
63
62
|
}
|
|
64
63
|
};
|
|
65
|
-
const
|
|
64
|
+
const onInfoClickHandler = () => {
|
|
65
|
+
onInfoClick();
|
|
66
|
+
};
|
|
66
67
|
const handleItemMouseEnter = (index, e) => {
|
|
68
|
+
const iconBounds = e.target.getBoundingClientRect();
|
|
67
69
|
setShowItemTooltip(prevState => {
|
|
68
70
|
const newState = [...prevState];
|
|
69
71
|
newState[index] = true;
|
|
70
72
|
return newState;
|
|
71
73
|
});
|
|
72
74
|
setTooltipPos({
|
|
73
|
-
x:
|
|
74
|
-
y:
|
|
75
|
+
x: iconBounds.left + iconBounds.width / 2,
|
|
76
|
+
y: iconBounds.top / 1.25
|
|
75
77
|
});
|
|
76
78
|
};
|
|
77
79
|
const handleItemMouseLeave = () => {
|
|
@@ -81,18 +83,8 @@ const BannerEventBox = props => {
|
|
|
81
83
|
height: height,
|
|
82
84
|
width: width
|
|
83
85
|
}, /*#__PURE__*/_react.default.createElement(_BannerEventBox.TitleWrapper, null, formatedBanners(banner).icon, "|", /*#__PURE__*/_react.default.createElement(_BannerEventBox.CardTitle, null, formatedBanners(banner).name)), /*#__PURE__*/_react.default.createElement(_BannerEventBox.Block, null, /*#__PURE__*/_react.default.createElement(_BannerEventBox.Headline, null, "Event Description"), /*#__PURE__*/_react.default.createElement(_BannerEventBox.Text, null, description)), /*#__PURE__*/_react.default.createElement(_BannerEventBox.Block, null, /*#__PURE__*/_react.default.createElement(_BannerEventBox.Headline, null, "Event Dates:"), /*#__PURE__*/_react.default.createElement(_BannerEventBox.Text, null, dates.join(' - '))), /*#__PURE__*/_react.default.createElement(_BannerEventBox.MoreInfo, {
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
onMouseLeave: () => setShowTooltip(false)
|
|
87
|
-
}, "Creatives"), showTooltip && /*#__PURE__*/_react.default.createElement(_TspanTooltip.default, {
|
|
88
|
-
direction: "top",
|
|
89
|
-
content: viewBannerTooltip,
|
|
90
|
-
top: moreInfo.current.offsetTop - 20,
|
|
91
|
-
left: moreInfo.current.offsetLeft + 30,
|
|
92
|
-
style: {
|
|
93
|
-
pointerEvents: 'none'
|
|
94
|
-
}
|
|
95
|
-
}), /*#__PURE__*/_react.default.createElement(_BannerEventBox.DetailsWrapper, null, data === null || data === void 0 ? void 0 : data.map((item, index) => {
|
|
86
|
+
onClick: onInfoClickHandler()
|
|
87
|
+
}, "Creatives"), /*#__PURE__*/_react.default.createElement(_BannerEventBox.DetailsWrapper, null, data === null || data === void 0 ? void 0 : data.map((item, index) => {
|
|
96
88
|
var _item$items, _item$items2;
|
|
97
89
|
return item && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, {
|
|
98
90
|
key: item.name
|
|
@@ -107,8 +99,8 @@ const BannerEventBox = props => {
|
|
|
107
99
|
content: /*#__PURE__*/_react.default.createElement("ul", null, (_item$items = item.items) === null || _item$items === void 0 ? void 0 : _item$items.map(i => /*#__PURE__*/_react.default.createElement("li", {
|
|
108
100
|
key: i
|
|
109
101
|
}, i))),
|
|
110
|
-
top: tooltipPos.y
|
|
111
|
-
left: tooltipPos.x
|
|
102
|
+
top: tooltipPos.y,
|
|
103
|
+
left: tooltipPos.x,
|
|
112
104
|
style: {
|
|
113
105
|
pointerEvents: 'none'
|
|
114
106
|
}
|
|
@@ -120,7 +112,7 @@ var _default = exports.default = BannerEventBox;
|
|
|
120
112
|
BannerEventBox.defaultProps = {
|
|
121
113
|
width: 'auto',
|
|
122
114
|
height: 'auto',
|
|
123
|
-
banner: '
|
|
115
|
+
banner: 'Food Lion',
|
|
124
116
|
description: 'Dreft Portable Pretreater Pen',
|
|
125
117
|
dates: ['2021-06-01', '2021-06-30'],
|
|
126
118
|
data: [{
|
|
@@ -133,5 +125,5 @@ BannerEventBox.defaultProps = {
|
|
|
133
125
|
name: 'Product Lines',
|
|
134
126
|
items: ['coca', 'cola', 'spring']
|
|
135
127
|
}],
|
|
136
|
-
|
|
128
|
+
onInfoClick: () => {}
|
|
137
129
|
};
|
|
@@ -14,9 +14,9 @@ const CardTitle = exports.CardTitle = _styledComponents.default.h5(_templateObje
|
|
|
14
14
|
const Headline = exports.Headline = _styledComponents.default.h6(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n font-size: 12px;\n font-weight: 500;\n margin: 0;\n"])));
|
|
15
15
|
const Block = exports.Block = _styledComponents.default.div(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n margin-bottom: 12px;\n"])));
|
|
16
16
|
const Text = exports.Text = _styledComponents.default.p(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n color: #8B8989;\n font-size: 12px;\n font-weight: 400;\n margin: 0;\n"])));
|
|
17
|
-
const MoreInfo = exports.MoreInfo = _styledComponents.default.span(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2.default)(["\n color: #229E38;\n font-size: 12px;\n font-weight: 400;\n text-decoration
|
|
17
|
+
const MoreInfo = exports.MoreInfo = _styledComponents.default.span(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2.default)(["\n color: #229E38;\n font-size: 12px;\n font-weight: 400;\n text-decoration: underline;\n cursor: pointer;\n"])));
|
|
18
18
|
const DetailsWrapper = exports.DetailsWrapper = _styledComponents.default.div(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n justify-content: space-between;\n align-items: stretch;\n margin-top: 12px;\n"])));
|
|
19
|
-
const KeyBlock = exports.KeyBlock = _styledComponents.default.div(_templateObject9 || (_templateObject9 = (0, _taggedTemplateLiteral2.default)([""])));
|
|
19
|
+
const KeyBlock = exports.KeyBlock = _styledComponents.default.div(_templateObject9 || (_templateObject9 = (0, _taggedTemplateLiteral2.default)(["\n /* position: relative; */\n"])));
|
|
20
20
|
const Key = exports.Key = _styledComponents.default.span(_templateObject10 || (_templateObject10 = (0, _taggedTemplateLiteral2.default)(["\n display: inline-flex;\n align-items: center;\n gap: 4px;\n font-size: 12px;\n font-weight: 500;\n"])));
|
|
21
21
|
const Count = exports.Count = _styledComponents.default.span(_templateObject11 || (_templateObject11 = (0, _taggedTemplateLiteral2.default)(["\n color: #8B8989;\n font-size: 12px;\n font-weight: 400;\n"])));
|
|
22
22
|
const Seperator = exports.Seperator = _styledComponents.default.div(_templateObject12 || (_templateObject12 = (0, _taggedTemplateLiteral2.default)(["\n border-right: 1px solid #F2F2F2;\n"])));
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.default = void 0;
|
|
9
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
10
|
+
var _BannerEventBoxTest = require("./BannerEventBoxTest.style");
|
|
11
|
+
var _BannerEventBox = _interopRequireDefault(require("./BannerEventBox"));
|
|
12
|
+
const BannerEventBoxTest = props => {
|
|
13
|
+
const {
|
|
14
|
+
width,
|
|
15
|
+
height
|
|
16
|
+
} = props;
|
|
17
|
+
return /*#__PURE__*/_react.default.createElement(_BannerEventBoxTest.MainContainer, {
|
|
18
|
+
width: width,
|
|
19
|
+
height: height
|
|
20
|
+
}, /*#__PURE__*/_react.default.createElement(_BannerEventBox.default, {
|
|
21
|
+
banner: "Stop&Shop"
|
|
22
|
+
}), /*#__PURE__*/_react.default.createElement(_BannerEventBox.default, {
|
|
23
|
+
banner: "Hannaford",
|
|
24
|
+
data: [{
|
|
25
|
+
name: 'asdf',
|
|
26
|
+
items: ['coca', 'haim']
|
|
27
|
+
}, {
|
|
28
|
+
name: 'Brazxcvnds',
|
|
29
|
+
items: ['coca', 'bola', 'spring', 'cola']
|
|
30
|
+
}, {
|
|
31
|
+
name: 'xcvb Lines',
|
|
32
|
+
items: ['spring']
|
|
33
|
+
}]
|
|
34
|
+
}), /*#__PURE__*/_react.default.createElement(_BannerEventBox.default, {
|
|
35
|
+
banner: "Giant Food"
|
|
36
|
+
}));
|
|
37
|
+
};
|
|
38
|
+
BannerEventBoxTest.defaultProps = {
|
|
39
|
+
width: 'auto',
|
|
40
|
+
height: 'auto'
|
|
41
|
+
};
|
|
42
|
+
var _default = exports.default = BannerEventBoxTest;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.MainContainer = void 0;
|
|
8
|
+
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/taggedTemplateLiteral"));
|
|
9
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
10
|
+
var _templateObject;
|
|
11
|
+
const MainContainer = exports.MainContainer = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n width: ", ";\n height: ", ";\n display: flex;\n gap: 20px;\n"])), props => props.width, props => props.height);
|
|
@@ -16,17 +16,17 @@ const CollapseMenuItem = props => {
|
|
|
16
16
|
subTitle,
|
|
17
17
|
children,
|
|
18
18
|
showBorder,
|
|
19
|
-
buttonAlignment
|
|
19
|
+
buttonAlignment,
|
|
20
|
+
className
|
|
20
21
|
} = props;
|
|
21
22
|
const [IsItemOpen, setIsItemOpen] = (0, _react.useState)(false);
|
|
22
23
|
const handleToggle = () => {
|
|
23
24
|
setIsItemOpen(!IsItemOpen);
|
|
24
25
|
};
|
|
25
26
|
return /*#__PURE__*/_react.default.createElement(_CollapseMenuItem.CollapseMenuItemMainContainer, {
|
|
26
|
-
|
|
27
|
+
className: className,
|
|
27
28
|
showBorder: showBorder
|
|
28
29
|
}, /*#__PURE__*/_react.default.createElement(_CollapseMenuItem.CollapseMenuItemContainer, {
|
|
29
|
-
id: "CollapseMenuItemContainer",
|
|
30
30
|
onClick: handleToggle,
|
|
31
31
|
style: {
|
|
32
32
|
cursor: 'pointer'
|
|
@@ -8,10 +8,10 @@ exports.RightIconContainer = exports.LeftIconContainer = exports.CollapseMenuIte
|
|
|
8
8
|
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/taggedTemplateLiteral"));
|
|
9
9
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
10
10
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7;
|
|
11
|
-
const CollapseMenuItemMainContainer = exports.CollapseMenuItemMainContainer = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n
|
|
12
|
-
const CollapseMenuItemContainer = exports.CollapseMenuItemContainer = _styledComponents.default.div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n font-family: \"Poppins\", sans-serif;\n font-
|
|
13
|
-
const CollapseMenuItemTitle = exports.CollapseMenuItemTitle = _styledComponents.default.h3(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n font-weight: 500;\n font-size: 18px;\n @media (max-width: 1536px) {\n font-size: 16px;\n }\n @media (max-width: 1366px) {\n font-size: 14px;\n }\n
|
|
11
|
+
const CollapseMenuItemMainContainer = exports.CollapseMenuItemMainContainer = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n margin: 0;\n background: #ffffff;\n box-shadow: ", ";\n border-radius: 12px; \n"])), props => props.showBorder ? '0px 0px 20px 0px rgba(0, 0, 0, 0.2)' : null);
|
|
12
|
+
const CollapseMenuItemContainer = exports.CollapseMenuItemContainer = _styledComponents.default.div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n font-family: \"Poppins\", sans-serif;\n font-size: 18px;\n display: flex;\n justify-content: flex-start;\n align-items: center;\n padding: 15px;\n"])));
|
|
13
|
+
const CollapseMenuItemTitle = exports.CollapseMenuItemTitle = _styledComponents.default.h3(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n font-weight: 500;\n font-size: 18px;\n line-height: 25px;\n margin: 0 5px 0 10px;\n @media (max-width: 1536px) {\n font-size: 16px;\n }\n @media (max-width: 1366px) {\n font-size: 14px;\n }\n"])));
|
|
14
14
|
const CollapseMenuItemSubTitle = exports.CollapseMenuItemSubTitle = _styledComponents.default.h3(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n color: #757171;\n font-weight: 500;\n font-size: 18px;\n @media (max-width: 1536px) {\n font-size: 16px;\n }\n @media (max-width: 1366px) {\n font-size: 14px;\n }\n line-height: 25px;\n margin: 0 5px;\n\n"])));
|
|
15
15
|
const LeftIconContainer = exports.LeftIconContainer = _styledComponents.default.h3(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n margin: 0 0 0 10px;\n"])));
|
|
16
16
|
const CollapseMenuItemContentContainer = exports.CollapseMenuItemContentContainer = _styledComponents.default.div(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n font-weight: 500;\n font-size: 14px;\n margin: 0;\n"])));
|
|
17
|
-
const RightIconContainer = exports.RightIconContainer = _styledComponents.default.div(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2.default)(["\n width: 20px;\n height: 20px;\n
|
|
17
|
+
const RightIconContainer = exports.RightIconContainer = _styledComponents.default.div(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2.default)(["\n width: 20px;\n height: 20px;\n margin-left: auto;\n"])));
|
|
@@ -111,14 +111,11 @@ const DropdownMultiNew = _ref => {
|
|
|
111
111
|
var _inputRef$current2;
|
|
112
112
|
inputRef === null || inputRef === void 0 ? void 0 : (_inputRef$current2 = inputRef.current) === null || _inputRef$current2 === void 0 ? void 0 : _inputRef$current2.focus();
|
|
113
113
|
}
|
|
114
|
-
onChange({
|
|
115
|
-
newValue: []
|
|
116
|
-
});
|
|
117
114
|
};
|
|
118
115
|
const displaySelectedOptions = () => {
|
|
119
116
|
const content = /*#__PURE__*/_react.default.createElement(_DropdownMultiNew.SelectedOptionsContainer, {
|
|
120
117
|
className: "SelectedOptionsContainer"
|
|
121
|
-
}, selectedOptions
|
|
118
|
+
}, selectedOptions.map((option, index) => {
|
|
122
119
|
var _option$label, _option$label2;
|
|
123
120
|
return index < 2 ? /*#__PURE__*/_react.default.createElement(_DropdownMultiNew.SelectedOptionItem, {
|
|
124
121
|
className: "SelectedOptionItem",
|
|
@@ -131,7 +128,7 @@ const DropdownMultiNew = _ref => {
|
|
|
131
128
|
inputRef === null || inputRef === void 0 ? void 0 : (_inputRef$current3 = inputRef.current) === null || _inputRef$current3 === void 0 ? void 0 : _inputRef$current3.focus();
|
|
132
129
|
}
|
|
133
130
|
}
|
|
134
|
-
}, option.label && ((_option$label = option.label) === null || _option$label === void 0 ? void 0 : _option$label.length) > 10 ? "".concat((_option$label2 = option.label) === null || _option$label2 === void 0 ? void 0 : _option$label2.substring(0, 10), "... ") :
|
|
131
|
+
}, option.label && ((_option$label = option.label) === null || _option$label === void 0 ? void 0 : _option$label.length) > 10 ? "".concat((_option$label2 = option.label) === null || _option$label2 === void 0 ? void 0 : _option$label2.substring(0, 10), "... ") : option.label, /*#__PURE__*/_react.default.createElement(_CloseXIcon.CloseXIcon, {
|
|
135
132
|
width: "8px",
|
|
136
133
|
height: "8px",
|
|
137
134
|
fill: "#212121"
|
|
@@ -181,7 +178,8 @@ const DropdownMultiNew = _ref => {
|
|
|
181
178
|
onClick: handleLabelClick,
|
|
182
179
|
type: "search",
|
|
183
180
|
disabled: disabled,
|
|
184
|
-
placeholder: isFocused ? placeHolder || 'Type to search...' : ''
|
|
181
|
+
placeholder: placeHolder || 'Type to search...' // {isFocused ? placeHolder || 'Type to search...' : ''}
|
|
182
|
+
,
|
|
185
183
|
error: error,
|
|
186
184
|
isFocused: isFocused
|
|
187
185
|
}) : ' '), selectedOptions.length > 0 && /*#__PURE__*/_react.default.createElement(_DropdownMultiNew.IconContainer, {
|
|
@@ -10,8 +10,8 @@ var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
|
10
10
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12;
|
|
11
11
|
/* eslint-disable no-nested-ternary */
|
|
12
12
|
const DropdownWrapper = exports.DropdownWrapper = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n position: relative;\n display: flex;\n flex-direction: column;\n align-content: center;\n justify-content: center;\n align-items: flex-start;\n width: ", "; \n font-family: \"Poppins\", sans-serif;\n font-weight: 400;\n font-size: 14px;\n border-radius: 10px;\n"])), props => props.width || '300px');
|
|
13
|
-
const Label = exports.Label = _styledComponents.default.label(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n\n font-size: ", ";\n font-weight: 400;\n padding-inline-end: 5px;\n padding-inline-start: 5px;\n margin-right: 10px;\n z-index: 2;\n color: ", ";\n background-color: white;\n position: absolute;\n top: ", ";\n left: ", ";\n font-family: Poppins; \n transform: translateY(-50%);\n transition: top 0.3s ease, font-size 0.3s ease, color 0.3s ease;\n display: flex;\n align-items: center;\n box-sizing: border-box;\n gap: 4px;\n &:
|
|
14
|
-
const InputContainer = exports.InputContainer = _styledComponents.default.div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n\n display: flex; \n flex-direction: row;\n flex-wrap: nowrap; \n justify-content: flex-start;\n align-content: center; \n white-space: pre-wrap;\n align-items: center;\n overflow: hidden;\n padding: 0 5px 0 0;\n gap: 4px;\n width: 100%;\n height: 100%; \n box-sizing: border-box;\n background-color: #fff;\n // border: ", " solid ", ";\n border: 1px solid ", ";\n font-family: \"Poppins\", sans-serif;\n font-weight: 400;\n font-size: 14px;\n border-radius: 12px;\n outline: none;\n color: ", ";\n \n &:hover {\n border: 1px solid ", ";\n
|
|
13
|
+
const Label = exports.Label = _styledComponents.default.label(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n\n font-size: ", ";\n font-weight: 400;\n padding-inline-end: 5px;\n padding-inline-start: 5px;\n margin-right: 10px;\n z-index: 2;\n color: ", ";\n background-color: white;\n position: absolute;\n top: ", ";\n left: ", ";\n font-family: Poppins; \n transform: translateY(-50%);\n transition: top 0.3s ease, font-size 0.3s ease, color 0.3s ease;\n display: flex;\n align-items: center;\n box-sizing: border-box;\n gap: 4px;\n &:focus {\n border-radius: 12px 12px 0 0 ;\n }\n"])), props => props.isFocused || props.hasValue ? '14px' : '14px', props => props.error ? 'red' : props.disabled ? '#888' : props.labelColor, props => props.isFocused || props.hasValue ? '0px' : '27px', props => props.isFocused || props.hasValue ? '23px' : '10px');
|
|
14
|
+
const InputContainer = exports.InputContainer = _styledComponents.default.div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n\n display: flex; \n flex-direction: row;\n flex-wrap: nowrap; \n justify-content: flex-start;\n align-content: center; \n white-space: pre-wrap;\n align-items: center;\n overflow: hidden;\n padding: 0 5px 0 0;\n gap: 4px;\n width: 100%;\n height: 100%; \n box-sizing: border-box;\n background-color: #fff;\n // border: ", " solid ", ";\n border: 1px solid ", ";\n font-family: \"Poppins\", sans-serif;\n font-weight: 400;\n font-size: 14px;\n border-radius: 12px;\n outline: none;\n color: ", ";\n \n &:hover {\n border: 1px solid ", ";\n }\n\n &:focus { \n border: 1px solid ", "; \n }\n \n"])), props => props.isFocused ? '2px' : '1px', props => props.disabled ? '#bdbdbd' : props.error ? 'red' : props.labelColor, props => props.disabled ? '#bdbdbd' : props.error ? 'red' : '#B1B1B1', props => props.disabled ? '#888' : '#212121', props => props.disabled ? '#bdbdbd' : props.error ? 'red' : props.labelColor || '#212121', props => props.disabled ? '#bdbdbd' : props.error ? 'red' : props.labelColor || '#212121');
|
|
15
15
|
const InputSubContainer = exports.InputSubContainer = _styledComponents.default.div(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n\n display: flex; \n flex-direction: column;\n flex-wrap: nowrap; \n align-content: center; \n align-items: flex-start;\n justify-content: center;\n white-space: pre-wrap;\n overflow: hidden;\n padding: 10px 4px 10px 10px;\n width: 100%;\n height: 100%;\n min-height: 53px;\n box-sizing: border-box;\n background-color: #fff; \n border-radius: 12px;\n outline: none;\n color: ", "; \n"])), props => props.disabled ? '#888' : '#212121');
|
|
16
16
|
const StyledInput = exports.StyledInput = _styledComponents.default.input(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n width: calc(100% - 20px);\n height: 25px;\n font-family: Poppins;\n font-weight: 400;\n font-size: 14px;\n outline: none; \n color: ", "; \n border: none; \n"])), props => props.disabled ? '#888' : '#212121');
|
|
17
17
|
const OptionsContainer = exports.OptionsContainer = _styledComponents.default.div(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)([" \n margin: 0; \n top: 100%; \n left: 0;\n z-index: 10;\n width: 100%;\n height: 8px;\n background-color: #fff; \n display: ", "; \n"])), props => {
|
|
@@ -105,9 +105,6 @@ const DropdownSingleNew = _ref => {
|
|
|
105
105
|
var _inputRef$current5;
|
|
106
106
|
inputRef === null || inputRef === void 0 ? void 0 : (_inputRef$current5 = inputRef.current) === null || _inputRef$current5 === void 0 ? void 0 : _inputRef$current5.focus();
|
|
107
107
|
}
|
|
108
|
-
onChange({
|
|
109
|
-
newValue: []
|
|
110
|
-
});
|
|
111
108
|
};
|
|
112
109
|
return /*#__PURE__*/_react.default.createElement(_DropdownSingleNew.DropdownWrapper, {
|
|
113
110
|
className: "DropdownWrapper",
|
|
@@ -151,7 +148,8 @@ const DropdownSingleNew = _ref => {
|
|
|
151
148
|
// type="search"
|
|
152
149
|
,
|
|
153
150
|
disabled: disabled,
|
|
154
|
-
placeholder: isFocused ? placeHolder || 'Type to search...' : ''
|
|
151
|
+
placeholder: placeHolder || 'Type to search...' // {isFocused ? placeHolder || 'Type to search...' : ''}
|
|
152
|
+
,
|
|
155
153
|
error: error,
|
|
156
154
|
isFocused: isFocused
|
|
157
155
|
})), selectedOptions.length > 0 && /*#__PURE__*/_react.default.createElement(_DropdownSingleNew.IconContainer, {
|
|
@@ -10,8 +10,8 @@ var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
|
10
10
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10;
|
|
11
11
|
/* eslint-disable no-nested-ternary */
|
|
12
12
|
const DropdownWrapper = exports.DropdownWrapper = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n position: relative;\n display: flex;\n flex-direction: column;\n align-content: center;\n justify-content: center;\n align-items: flex-start;\n width: ", "; \n font-family: \"Poppins\", sans-serif;\n font-weight: 400;\n font-size: 14px;\n border-radius: 10px;\n"])), props => props.width || '300px');
|
|
13
|
-
const Label = exports.Label = _styledComponents.default.label(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n\n font-size: ", ";\n font-weight: 400;\n padding-inline-end: 5px;\n padding-inline-start: 5px;\n margin-right: 10px; \n z-index: 2;\n color: ", ";\n background-color: white;\n position: absolute;\n top: ", ";\n left: ", ";\n font-family: Poppins; \n transform: translateY(-50%);\n transition: top 0.3s ease, font-size 0.3s ease, color 0.3s ease;\n display: flex;\n align-items: center;\n box-sizing: border-box;\n gap: 4px;\n &:
|
|
14
|
-
const InputContainer = exports.InputContainer = _styledComponents.default.div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n\n display: flex; \n flex-direction: row;\n flex-wrap: nowrap; \n justify-content: flex-start;\n align-content: center; \n white-space: pre-wrap;\n align-items: center;\n overflow: hidden;\n padding: 0 5px 0 0;\n gap: 4px;\n width: 100%;\n height: 100%; \n box-sizing: border-box;\n background-color: #fff;\n border: 1px solid ", ";\n font-family: \"Poppins\", sans-serif;\n font-weight: 400;\n font-size: 14px;\n border-radius: 12px;\n outline: none;\n color: ", ";\n \n &:hover {\n border: 1px solid ", ";\n
|
|
13
|
+
const Label = exports.Label = _styledComponents.default.label(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n\n font-size: ", ";\n font-weight: 400;\n padding-inline-end: 5px;\n padding-inline-start: 5px;\n margin-right: 10px; \n z-index: 2;\n color: ", ";\n background-color: white;\n position: absolute;\n top: ", ";\n left: ", ";\n font-family: Poppins; \n transform: translateY(-50%);\n transition: top 0.3s ease, font-size 0.3s ease, color 0.3s ease;\n display: flex;\n align-items: center;\n box-sizing: border-box;\n gap: 4px;\n &:focus {\n border-radius: 12px 12px 0 0 ;\n }\n"])), props => props.isFocused || props.hasValue ? '14px' : '14px', props => props.error ? 'red' : props.disabled ? '#888' : props.labelColor, props => props.isFocused || props.hasValue ? '0px' : '28px', props => props.isFocused || props.hasValue ? '23px' : '10px');
|
|
14
|
+
const InputContainer = exports.InputContainer = _styledComponents.default.div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n\n display: flex; \n flex-direction: row;\n flex-wrap: nowrap; \n justify-content: flex-start;\n align-content: center; \n white-space: pre-wrap;\n align-items: center;\n overflow: hidden;\n padding: 0 5px 0 0;\n gap: 4px;\n width: 100%;\n height: 100%; \n box-sizing: border-box;\n background-color: #fff;\n border: 1px solid ", ";\n font-family: \"Poppins\", sans-serif;\n font-weight: 400;\n font-size: 14px;\n border-radius: 12px;\n outline: none;\n color: ", ";\n \n &:hover {\n border: 1px solid ", ";\n }\n\n &:focus { \n border: 1px solid ", "; \n }\n \n"])), props => props.disabled ? '#bdbdbd' : props.error ? 'red' : '#B1B1B1', props => props.disabled ? '#888' : '#212121', props => props.disabled ? '#bdbdbd' : props.error ? 'red' : props.labelColor || '#212121', props => props.disabled ? '#bdbdbd' : props.error ? 'red' : props.labelColor || '#212121');
|
|
15
15
|
const InputSubContainer = exports.InputSubContainer = _styledComponents.default.div(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n\n display: flex; \n flex-direction: column;\n flex-wrap: nowrap; \n align-content: center; \n align-items: flex-start;\n justify-content: center;\n white-space: pre-wrap;\n overflow: hidden;\n padding: 10px 4px 10px 10px;\n width: 100%;\n height: 100%;\n min-height: 53px;\n box-sizing: border-box;\n background-color: #fff; \n border-radius: 12px;\n outline: none;\n color: ", "; \n"])), props => props.disabled ? '#888' : '#212121');
|
|
16
16
|
const StyledInput = exports.StyledInput = _styledComponents.default.input(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n width: calc(100% - 10px);\n height: 20px;\n font-family: Poppins;\n font-weight: 400;\n font-size: 14px;\n outline: none; \n color: ", "; \n border: none;\n"])), props => props.disabled ? '#888' : '#212121');
|
|
17
17
|
const OptionsContainer = exports.OptionsContainer = _styledComponents.default.div(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)([" \n margin: 0; \n top: 100%; \n left: 0;\n z-index: 10;\n width: 100%;\n height: 8px;\n background-color: #fff; \n display: ", "; \n"])), props => {
|
|
@@ -1,29 +1,33 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.default = exports.FilterButton = void 0;
|
|
8
|
-
var _react =
|
|
8
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
9
9
|
var _FilterButton = require("./FilterButton.style");
|
|
10
10
|
var _FilterIcon = require("./icons/FilterIcon");
|
|
11
11
|
const FilterButton = props => {
|
|
12
12
|
const {
|
|
13
13
|
color,
|
|
14
|
+
activeColor,
|
|
14
15
|
height,
|
|
15
16
|
buttonText,
|
|
16
17
|
iconWidth,
|
|
17
18
|
iconHeight,
|
|
18
19
|
disabled,
|
|
20
|
+
openState,
|
|
19
21
|
onButtonClick
|
|
20
22
|
} = props;
|
|
23
|
+
const [activeState, setActiveState] = (0, _react.useState)(openState);
|
|
21
24
|
const onClickHandler = event => {
|
|
22
25
|
onButtonClick(event);
|
|
26
|
+
setActiveState(!activeState);
|
|
23
27
|
};
|
|
24
28
|
return /*#__PURE__*/_react.default.createElement(_FilterButton.FilterButtonWrapper, {
|
|
25
29
|
height: height,
|
|
26
|
-
color: color,
|
|
30
|
+
color: activeState ? activeColor : color,
|
|
27
31
|
disabled: disabled,
|
|
28
32
|
onClick: event => {
|
|
29
33
|
onClickHandler(event);
|
|
@@ -31,7 +35,7 @@ const FilterButton = props => {
|
|
|
31
35
|
}, /*#__PURE__*/_react.default.createElement(_FilterIcon.FilterIcon, {
|
|
32
36
|
width: iconWidth,
|
|
33
37
|
height: iconHeight,
|
|
34
|
-
color: color
|
|
38
|
+
color: activeState ? activeColor : color
|
|
35
39
|
}), /*#__PURE__*/_react.default.createElement(_FilterButton.SpanText, null, buttonText));
|
|
36
40
|
};
|
|
37
41
|
exports.FilterButton = FilterButton;
|
|
@@ -40,8 +44,10 @@ FilterButton.defaultProps = {
|
|
|
40
44
|
buttonText: 'Filter',
|
|
41
45
|
height: '40px',
|
|
42
46
|
color: '#212121',
|
|
47
|
+
activeColor: '#229E38',
|
|
43
48
|
iconHeight: 12,
|
|
44
49
|
iconWidth: 12,
|
|
50
|
+
openState: false,
|
|
45
51
|
disabled: false,
|
|
46
52
|
onButtonClick: () => {}
|
|
47
53
|
};
|
|
@@ -8,5 +8,5 @@ exports.SpanText = exports.FilterButtonWrapper = void 0;
|
|
|
8
8
|
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/taggedTemplateLiteral"));
|
|
9
9
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
10
10
|
var _templateObject, _templateObject2;
|
|
11
|
-
const FilterButtonWrapper = exports.FilterButtonWrapper = _styledComponents.default.button(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n height: ", ";\n font-size: 14px;\n font-weight: 400;\n display: flex;\n gap: 8px;\n align-items: center;\n justify-content: center;\n padding: 8px 18px;\n color: ", ";\n border-radius: 8px;\n border: 1px solid
|
|
11
|
+
const FilterButtonWrapper = exports.FilterButtonWrapper = _styledComponents.default.button(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n height: ", ";\n font-size: 14px;\n font-weight: 400;\n display: flex;\n gap: 8px;\n align-items: center;\n justify-content: center;\n padding: 8px 18px;\n color: ", ";\n border-radius: 8px;\n border: 1px solid ", ";\n background: transparent;\n transition: box-shadow 0.3s ease;\n &:hover, &:focus {\n cursor: pointer;\n box-shadow: 5px 5px 10px 0px rgba(0, 0, 0, 0.1);\n }\n"])), props => props.height, props => props.color, props => props.color);
|
|
12
12
|
const SpanText = exports.SpanText = _styledComponents.default.span(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n"])));
|
|
@@ -8,7 +8,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
8
8
|
exports.default = void 0;
|
|
9
9
|
var _react = _interopRequireWildcard(require("react"));
|
|
10
10
|
var _moment = _interopRequireDefault(require("moment"));
|
|
11
|
-
var
|
|
11
|
+
var _DropdownMulti = require("./DropdownMulti");
|
|
12
|
+
var _Dropdown = require("./Dropdown");
|
|
12
13
|
var _Button = _interopRequireDefault(require("./Button"));
|
|
13
14
|
var _RangePicker = _interopRequireDefault(require("./RangePicker"));
|
|
14
15
|
var _QuarterPicker = _interopRequireDefault(require("./QuarterPicker"));
|
|
@@ -58,73 +59,12 @@ const FilterPanel = props => {
|
|
|
58
59
|
});
|
|
59
60
|
setFieldsDataState(newFieldsDataState);
|
|
60
61
|
}, [fieldsData]);
|
|
61
|
-
const onChangeDropdownMultiHandler = (eventDropdownMulti, item) => {
|
|
62
|
-
var _eventDropdownMulti$n;
|
|
63
|
-
const newSelectedValue = (eventDropdownMulti === null || eventDropdownMulti === void 0 ? void 0 : (_eventDropdownMulti$n = eventDropdownMulti.newValue) === null || _eventDropdownMulti$n === void 0 ? void 0 : _eventDropdownMulti$n.length) > 0 ? eventDropdownMulti === null || eventDropdownMulti === void 0 ? void 0 : eventDropdownMulti.newValue : [];
|
|
64
|
-
const newFieldsDataState = FieldsDataState === null || FieldsDataState === void 0 ? void 0 : FieldsDataState.map(itemField => itemField.name === item.name ? {
|
|
65
|
-
...itemField,
|
|
66
|
-
selectedValue: newSelectedValue
|
|
67
|
-
} : itemField);
|
|
68
|
-
setFieldsDataState(newFieldsDataState);
|
|
69
|
-
onItemValueChanged({
|
|
70
|
-
fieldsData: newFieldsDataState,
|
|
71
|
-
changedItem: {
|
|
72
|
-
name: item.name,
|
|
73
|
-
inputType: item.inputType,
|
|
74
|
-
selectedValue: newSelectedValue
|
|
75
|
-
}
|
|
76
|
-
});
|
|
77
|
-
};
|
|
78
|
-
const onChangeDropdownSingleHandler = (eventDropdownSingle, item) => {
|
|
79
|
-
var _eventDropdownSingle$;
|
|
80
|
-
const newSelectedValue = (eventDropdownSingle === null || eventDropdownSingle === void 0 ? void 0 : (_eventDropdownSingle$ = eventDropdownSingle.newValue) === null || _eventDropdownSingle$ === void 0 ? void 0 : _eventDropdownSingle$.length) > 0 ? eventDropdownSingle === null || eventDropdownSingle === void 0 ? void 0 : eventDropdownSingle.newValue : [];
|
|
81
|
-
const newFieldsDataState = FieldsDataState === null || FieldsDataState === void 0 ? void 0 : FieldsDataState.map(itemField => itemField.name === item.name ? {
|
|
82
|
-
...itemField,
|
|
83
|
-
selectedValue: newSelectedValue
|
|
84
|
-
} : itemField);
|
|
85
|
-
setFieldsDataState(newFieldsDataState);
|
|
86
|
-
onItemValueChanged({
|
|
87
|
-
fieldsData: newFieldsDataState,
|
|
88
|
-
changedItem: {
|
|
89
|
-
name: item.name,
|
|
90
|
-
inputType: item.inputType,
|
|
91
|
-
selectedValue: newSelectedValue
|
|
92
|
-
}
|
|
93
|
-
});
|
|
94
|
-
};
|
|
95
|
-
const onChangeDropdownPeriodPickerHandler = (eventDropdownPeriodPicker, item) => {
|
|
96
|
-
var _newPeriodPickerSelec3, _item$defaultValueYea3, _newPeriodPickerSelec4, _item$defaultValueYea4, _item$defaultValueYea5;
|
|
97
|
-
const newPeriodPickerSelectedValue = (eventDropdownPeriodPicker === null || eventDropdownPeriodPicker === void 0 ? void 0 : eventDropdownPeriodPicker.newValue) || [];
|
|
98
|
-
const newFieldsDataState = FieldsDataState === null || FieldsDataState === void 0 ? void 0 : FieldsDataState.map(itemField => {
|
|
99
|
-
var _newPeriodPickerSelec, _item$defaultValueYea, _newPeriodPickerSelec2, _item$defaultValueYea2;
|
|
100
|
-
return itemField.name === item.name ? {
|
|
101
|
-
...itemField,
|
|
102
|
-
periodPickerSelectedValue: newPeriodPickerSelectedValue,
|
|
103
|
-
...(((_newPeriodPickerSelec = newPeriodPickerSelectedValue[0]) === null || _newPeriodPickerSelec === void 0 ? void 0 : _newPeriodPickerSelec.value) === 'year' && item !== null && item !== void 0 && (_item$defaultValueYea = item.defaultValueYears) !== null && _item$defaultValueYea !== void 0 && _item$defaultValueYea.value ? {
|
|
104
|
-
inputSubType: 'year'
|
|
105
|
-
} : ''),
|
|
106
|
-
selectedValue: ((_newPeriodPickerSelec2 = newPeriodPickerSelectedValue[0]) === null || _newPeriodPickerSelec2 === void 0 ? void 0 : _newPeriodPickerSelec2.value) === 'year' && item !== null && item !== void 0 && (_item$defaultValueYea2 = item.defaultValueYears) !== null && _item$defaultValueYea2 !== void 0 && _item$defaultValueYea2.value ? [item === null || item === void 0 ? void 0 : item.defaultValueYears] : []
|
|
107
|
-
} : itemField;
|
|
108
|
-
});
|
|
109
|
-
setFieldsDataState(newFieldsDataState);
|
|
110
|
-
onItemValueChanged({
|
|
111
|
-
fieldsData: newFieldsDataState,
|
|
112
|
-
changedItem: {
|
|
113
|
-
name: item.name,
|
|
114
|
-
inputType: item.inputType,
|
|
115
|
-
...(((_newPeriodPickerSelec3 = newPeriodPickerSelectedValue[0]) === null || _newPeriodPickerSelec3 === void 0 ? void 0 : _newPeriodPickerSelec3.value) === 'year' && item !== null && item !== void 0 && (_item$defaultValueYea3 = item.defaultValueYears) !== null && _item$defaultValueYea3 !== void 0 && _item$defaultValueYea3.value ? {
|
|
116
|
-
inputSubType: 'year'
|
|
117
|
-
} : ''),
|
|
118
|
-
selectedValue: ((_newPeriodPickerSelec4 = newPeriodPickerSelectedValue[0]) === null || _newPeriodPickerSelec4 === void 0 ? void 0 : _newPeriodPickerSelec4.value) === 'year' && item !== null && item !== void 0 && (_item$defaultValueYea4 = item.defaultValueYears) !== null && _item$defaultValueYea4 !== void 0 && _item$defaultValueYea4.value ? item === null || item === void 0 ? void 0 : (_item$defaultValueYea5 = item.defaultValueYears) === null || _item$defaultValueYea5 === void 0 ? void 0 : _item$defaultValueYea5.value : undefined
|
|
119
|
-
}
|
|
120
|
-
});
|
|
121
|
-
};
|
|
122
62
|
const onClickResetHandler = () => {
|
|
123
63
|
const newFieldsDataState = FieldsDataState === null || FieldsDataState === void 0 ? void 0 : FieldsDataState.map(itemField => ({
|
|
124
64
|
...itemField,
|
|
125
|
-
selectedValue:
|
|
65
|
+
selectedValue: undefined,
|
|
126
66
|
...(itemField.periodPickerSelectedValue ? {
|
|
127
|
-
periodPickerSelectedValue:
|
|
67
|
+
periodPickerSelectedValue: undefined
|
|
128
68
|
} : '')
|
|
129
69
|
}));
|
|
130
70
|
setFieldsDataState(newFieldsDataState);
|
|
@@ -139,37 +79,17 @@ const FilterPanel = props => {
|
|
|
139
79
|
const currentYear = (0, _moment.default)().year();
|
|
140
80
|
const previousYear = (0, _moment.default)().subtract(1, 'years').year();
|
|
141
81
|
const yearsArray = [{
|
|
142
|
-
value:
|
|
143
|
-
label:
|
|
82
|
+
value: previousYear,
|
|
83
|
+
label: previousYear
|
|
144
84
|
}, {
|
|
145
|
-
value:
|
|
146
|
-
label:
|
|
85
|
+
value: currentYear,
|
|
86
|
+
label: currentYear
|
|
147
87
|
}];
|
|
148
88
|
return yearsArray;
|
|
149
89
|
};
|
|
150
|
-
const onChangeDropdownYearHandler = (eventDropdownYear, item) => {
|
|
151
|
-
const newSelectedValue = (eventDropdownYear === null || eventDropdownYear === void 0 ? void 0 : eventDropdownYear.newValue) || [];
|
|
152
|
-
const newFieldsDataState = FieldsDataState === null || FieldsDataState === void 0 ? void 0 : FieldsDataState.map(itemField => itemField.name === item.name ? {
|
|
153
|
-
...itemField,
|
|
154
|
-
inputSubType: (newSelectedValue === null || newSelectedValue === void 0 ? void 0 : newSelectedValue.length) > 0 ? 'year' : undefined,
|
|
155
|
-
selectedValue: newSelectedValue
|
|
156
|
-
} : itemField);
|
|
157
|
-
setFieldsDataState(newFieldsDataState);
|
|
158
|
-
onItemValueChanged({
|
|
159
|
-
fieldsData: newFieldsDataState,
|
|
160
|
-
changedItem: {
|
|
161
|
-
name: item.name,
|
|
162
|
-
inputType: item.inputType,
|
|
163
|
-
inputSubType: (newSelectedValue === null || newSelectedValue === void 0 ? void 0 : newSelectedValue.length) > 0 ? 'year' : undefined,
|
|
164
|
-
selectedValue: (newSelectedValue === null || newSelectedValue === void 0 ? void 0 : newSelectedValue.length) > 0 ? newSelectedValue[0].value : undefined
|
|
165
|
-
}
|
|
166
|
-
});
|
|
167
|
-
};
|
|
168
90
|
const displayPeriodPickerContent = item => {
|
|
169
|
-
var _item$periodPickerSel, _item$periodPickerSel2;
|
|
170
91
|
let content;
|
|
171
|
-
|
|
172
|
-
switch (currentValue) {
|
|
92
|
+
switch (item.periodPickerSelectedValue) {
|
|
173
93
|
case 'date':
|
|
174
94
|
content = /*#__PURE__*/_react.default.createElement(_FilterPanel.DatePickerContainer, {
|
|
175
95
|
className: "DatePickerContainer"
|
|
@@ -273,23 +193,46 @@ const FilterPanel = props => {
|
|
|
273
193
|
});
|
|
274
194
|
break;
|
|
275
195
|
case 'year':
|
|
276
|
-
content = /*#__PURE__*/_react.default.createElement(
|
|
277
|
-
className: "
|
|
196
|
+
content = /*#__PURE__*/_react.default.createElement(_Dropdown.Dropdown, {
|
|
197
|
+
className: "Dropdown",
|
|
278
198
|
name: ''.concat(item.name, '_Year'),
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
199
|
+
reset: Reset,
|
|
200
|
+
showPopupIcon: true,
|
|
201
|
+
allowedInput: "all",
|
|
202
|
+
dropdownListfontSize: "14px",
|
|
283
203
|
labelColor: borderColor,
|
|
284
|
-
|
|
204
|
+
limitTagsOnMultiSelect: 2,
|
|
205
|
+
onInputChange: () => {},
|
|
206
|
+
shape: "round",
|
|
207
|
+
size: "large",
|
|
208
|
+
text: "Year",
|
|
209
|
+
value: item.selectedValue || undefined,
|
|
285
210
|
required: item.required,
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
211
|
+
placeHolder: "Select Year ...",
|
|
212
|
+
placeHolderFontSize: "14px",
|
|
213
|
+
onChange: eventDropdown => {
|
|
214
|
+
var _eventDropdown$newVal, _eventDropdown$newVal2;
|
|
215
|
+
const selectedValue = eventDropdown !== null && eventDropdown !== void 0 && (_eventDropdown$newVal = eventDropdown.newValue) !== null && _eventDropdown$newVal !== void 0 && _eventDropdown$newVal.value ? "".concat(eventDropdown === null || eventDropdown === void 0 ? void 0 : (_eventDropdown$newVal2 = eventDropdown.newValue) === null || _eventDropdown$newVal2 === void 0 ? void 0 : _eventDropdown$newVal2.value) : undefined;
|
|
216
|
+
const newFieldsDataState = FieldsDataState === null || FieldsDataState === void 0 ? void 0 : FieldsDataState.map(itemField => itemField.name === item.name ? {
|
|
217
|
+
...itemField,
|
|
218
|
+
inputSubType: selectedValue ? 'year' : undefined,
|
|
219
|
+
selectedValue: selectedValue ? "".concat(selectedValue) : undefined
|
|
220
|
+
} : itemField);
|
|
221
|
+
setFieldsDataState(newFieldsDataState);
|
|
222
|
+
onItemValueChanged({
|
|
223
|
+
fieldsData: newFieldsDataState,
|
|
224
|
+
changedItem: {
|
|
225
|
+
name: item.name,
|
|
226
|
+
inputType: item.inputType,
|
|
227
|
+
inputSubType: 'year',
|
|
228
|
+
selectedValue: selectedValue ? "".concat(selectedValue) : undefined
|
|
229
|
+
}
|
|
230
|
+
});
|
|
231
|
+
},
|
|
291
232
|
options: getYearsArray(),
|
|
292
|
-
|
|
233
|
+
defaultValue: item.defaultValueYears || undefined,
|
|
234
|
+
width: "100%",
|
|
235
|
+
height: "55px"
|
|
293
236
|
});
|
|
294
237
|
break;
|
|
295
238
|
default:
|
|
@@ -311,42 +254,92 @@ const FilterPanel = props => {
|
|
|
311
254
|
let content;
|
|
312
255
|
switch (item.inputType) {
|
|
313
256
|
case 'dropdown':
|
|
314
|
-
content = /*#__PURE__*/_react.default.createElement(
|
|
315
|
-
className: "
|
|
257
|
+
content = /*#__PURE__*/_react.default.createElement(_Dropdown.Dropdown, {
|
|
258
|
+
className: "Dropdown",
|
|
316
259
|
name: item.name,
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
260
|
+
defaultValue: () => {
|
|
261
|
+
var _item$defaultValue, _item$defaultValue2;
|
|
262
|
+
if (!(item !== null && item !== void 0 && item.defaultValue)) return '';
|
|
263
|
+
const newValue = {
|
|
264
|
+
id: "".concat(item === null || item === void 0 ? void 0 : (_item$defaultValue = item.defaultValue) === null || _item$defaultValue === void 0 ? void 0 : _item$defaultValue.value),
|
|
265
|
+
label: "".concat(item === null || item === void 0 ? void 0 : (_item$defaultValue2 = item.defaultValue) === null || _item$defaultValue2 === void 0 ? void 0 : _item$defaultValue2.label)
|
|
266
|
+
};
|
|
267
|
+
return newValue;
|
|
268
|
+
},
|
|
269
|
+
reset: Reset,
|
|
270
|
+
showPopupIcon: true,
|
|
271
|
+
allowedInput: "all",
|
|
272
|
+
dropdownListfontSize: "14px",
|
|
321
273
|
labelColor: borderColor,
|
|
322
|
-
|
|
274
|
+
limitTagsOnMultiSelect: 2,
|
|
275
|
+
onInputChange: () => {},
|
|
276
|
+
shape: "round",
|
|
277
|
+
size: "large",
|
|
278
|
+
text: !item.selectedValue ? item.labelEmptyValue || item.label : item.label,
|
|
279
|
+
value: item.selectedValue || undefined,
|
|
323
280
|
required: item.required,
|
|
324
281
|
disabled: item.disabled,
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
282
|
+
placeHolder: item.placeHolder,
|
|
283
|
+
placeHolderFontSize: "14px",
|
|
284
|
+
onChange: eventDropdown => {
|
|
285
|
+
var _eventDropdown$newVal3, _eventDropdown$newVal4;
|
|
286
|
+
const selectedValue = eventDropdown !== null && eventDropdown !== void 0 && (_eventDropdown$newVal3 = eventDropdown.newValue) !== null && _eventDropdown$newVal3 !== void 0 && _eventDropdown$newVal3.value ? "".concat(eventDropdown === null || eventDropdown === void 0 ? void 0 : (_eventDropdown$newVal4 = eventDropdown.newValue) === null || _eventDropdown$newVal4 === void 0 ? void 0 : _eventDropdown$newVal4.value) : undefined;
|
|
287
|
+
const newFieldsDataState = FieldsDataState === null || FieldsDataState === void 0 ? void 0 : FieldsDataState.map(itemField => itemField.name === item.name ? {
|
|
288
|
+
...itemField,
|
|
289
|
+
selectedValue: selectedValue ? "".concat(selectedValue) : undefined
|
|
290
|
+
} : itemField);
|
|
291
|
+
setFieldsDataState(newFieldsDataState);
|
|
292
|
+
onItemValueChanged({
|
|
293
|
+
fieldsData: newFieldsDataState,
|
|
294
|
+
changedItem: {
|
|
295
|
+
name: item.name,
|
|
296
|
+
inputType: item.inputType,
|
|
297
|
+
selectedValue: selectedValue ? "".concat(selectedValue) : undefined
|
|
298
|
+
}
|
|
299
|
+
});
|
|
300
|
+
},
|
|
301
|
+
options: item.dropdownOptions && item.dropdownOptions.length > 0 ? item.dropdownOptions : [],
|
|
330
302
|
width: "100%"
|
|
331
303
|
});
|
|
332
304
|
break;
|
|
333
305
|
case 'dropdownMulti':
|
|
334
|
-
content = /*#__PURE__*/_react.default.createElement(
|
|
335
|
-
className: "
|
|
306
|
+
content = /*#__PURE__*/_react.default.createElement(_DropdownMulti.DropdownMulti, {
|
|
307
|
+
className: "DropdownMulti",
|
|
336
308
|
name: item.name,
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
309
|
+
reset: Reset,
|
|
310
|
+
dropdownMultiMaxWidth: FieldsContainerWidth ? "".concat(FieldsContainerWidth === null || FieldsContainerWidth === void 0 ? void 0 : FieldsContainerWidth.toString(), "px") : undefined,
|
|
311
|
+
showPopupIcon: false,
|
|
312
|
+
allowedInput: "all",
|
|
313
|
+
dropdownListfontSize: "14px",
|
|
341
314
|
labelColor: borderColor,
|
|
342
|
-
|
|
315
|
+
limitTagsOnMultiSelect: 2,
|
|
316
|
+
onInputChange: () => {},
|
|
317
|
+
shape: "round",
|
|
318
|
+
size: "large",
|
|
319
|
+
text: !item.selectedValue ? item.labelEmptyValue || item.label : item.label,
|
|
320
|
+
value: item.selectedValue || undefined,
|
|
343
321
|
required: item.required,
|
|
344
322
|
disabled: item.disabled,
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
323
|
+
placeHolder: item.placeHolder,
|
|
324
|
+
placeHolderFontSize: "14px",
|
|
325
|
+
onChange: eventDropdownMulti => {
|
|
326
|
+
var _eventDropdownMulti$n;
|
|
327
|
+
const selectedValue = "".concat(eventDropdownMulti === null || eventDropdownMulti === void 0 ? void 0 : (_eventDropdownMulti$n = eventDropdownMulti.newValue) === null || _eventDropdownMulti$n === void 0 ? void 0 : _eventDropdownMulti$n.map(selectedItem => "".concat(selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.value)));
|
|
328
|
+
const newFieldsDataState = FieldsDataState === null || FieldsDataState === void 0 ? void 0 : FieldsDataState.map(itemField => itemField.name === item.name ? {
|
|
329
|
+
...itemField,
|
|
330
|
+
selectedValue: "".concat(selectedValue)
|
|
331
|
+
} : itemField);
|
|
332
|
+
setFieldsDataState(newFieldsDataState);
|
|
333
|
+
onItemValueChanged({
|
|
334
|
+
fieldsData: newFieldsDataState,
|
|
335
|
+
changedItem: {
|
|
336
|
+
name: item.name,
|
|
337
|
+
inputType: item.inputType,
|
|
338
|
+
selectedValue: "".concat(selectedValue)
|
|
339
|
+
}
|
|
340
|
+
});
|
|
341
|
+
},
|
|
342
|
+
options: item.dropdownOptions && item.dropdownOptions.length > 0 ? item.dropdownOptions : [],
|
|
350
343
|
width: "100%"
|
|
351
344
|
});
|
|
352
345
|
break;
|
|
@@ -383,22 +376,52 @@ const FilterPanel = props => {
|
|
|
383
376
|
case 'periodpicker':
|
|
384
377
|
content = /*#__PURE__*/_react.default.createElement(_FilterPanel.PeriodPickerContainer, {
|
|
385
378
|
className: "PeriodPickerContainer"
|
|
386
|
-
}, /*#__PURE__*/_react.default.createElement(
|
|
387
|
-
className: "
|
|
379
|
+
}, /*#__PURE__*/_react.default.createElement(_Dropdown.Dropdown, {
|
|
380
|
+
className: "Dropdown",
|
|
388
381
|
name: item.name,
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
382
|
+
reset: Reset,
|
|
383
|
+
showPopupIcon: false,
|
|
384
|
+
allowedInput: "all",
|
|
385
|
+
dropdownListfontSize: "14px",
|
|
393
386
|
labelColor: borderColor,
|
|
394
|
-
|
|
387
|
+
limitTagsOnMultiSelect: 2,
|
|
388
|
+
onInputChange: () => {},
|
|
389
|
+
shape: "round",
|
|
390
|
+
size: "large",
|
|
391
|
+
text: !item.periodPickerSelectedValue ? item.labelEmptyValue || item.label : item.label,
|
|
392
|
+
value: item.selectedValue || undefined,
|
|
395
393
|
required: item.required,
|
|
396
394
|
disabled: item.disabled,
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
395
|
+
placeHolder: item.placeHolder,
|
|
396
|
+
placeHolderFontSize: "14px",
|
|
397
|
+
onChange: eventDropdownPeriodPicker => {
|
|
398
|
+
var _eventDropdownPeriodP, _eventDropdownPeriodP2, _item$defaultValueYea4, _item$defaultValueYea5, _item$defaultValueYea6;
|
|
399
|
+
const newPeriodPickerSelectedValue = eventDropdownPeriodPicker !== null && eventDropdownPeriodPicker !== void 0 && (_eventDropdownPeriodP = eventDropdownPeriodPicker.newValue) !== null && _eventDropdownPeriodP !== void 0 && _eventDropdownPeriodP.value ? "".concat(eventDropdownPeriodPicker === null || eventDropdownPeriodPicker === void 0 ? void 0 : (_eventDropdownPeriodP2 = eventDropdownPeriodPicker.newValue) === null || _eventDropdownPeriodP2 === void 0 ? void 0 : _eventDropdownPeriodP2.value) : undefined;
|
|
400
|
+
const newFieldsDataState = FieldsDataState === null || FieldsDataState === void 0 ? void 0 : FieldsDataState.map(itemField => {
|
|
401
|
+
var _item$defaultValueYea, _item$defaultValueYea2, _item$defaultValueYea3;
|
|
402
|
+
return itemField.name === item.name ? {
|
|
403
|
+
...itemField,
|
|
404
|
+
periodPickerSelectedValue: newPeriodPickerSelectedValue ? "".concat(newPeriodPickerSelectedValue) : undefined,
|
|
405
|
+
...(newPeriodPickerSelectedValue === 'year' && item !== null && item !== void 0 && (_item$defaultValueYea = item.defaultValueYears) !== null && _item$defaultValueYea !== void 0 && _item$defaultValueYea.value ? {
|
|
406
|
+
inputSubType: 'year'
|
|
407
|
+
} : ''),
|
|
408
|
+
selectedValue: newPeriodPickerSelectedValue === 'year' && item !== null && item !== void 0 && (_item$defaultValueYea2 = item.defaultValueYears) !== null && _item$defaultValueYea2 !== void 0 && _item$defaultValueYea2.value ? item === null || item === void 0 ? void 0 : (_item$defaultValueYea3 = item.defaultValueYears) === null || _item$defaultValueYea3 === void 0 ? void 0 : _item$defaultValueYea3.value : undefined
|
|
409
|
+
} : itemField;
|
|
410
|
+
});
|
|
411
|
+
setFieldsDataState(newFieldsDataState);
|
|
412
|
+
onItemValueChanged({
|
|
413
|
+
fieldsData: newFieldsDataState,
|
|
414
|
+
changedItem: {
|
|
415
|
+
name: item.name,
|
|
416
|
+
inputType: item.inputType,
|
|
417
|
+
...(newPeriodPickerSelectedValue === 'year' && item !== null && item !== void 0 && (_item$defaultValueYea4 = item.defaultValueYears) !== null && _item$defaultValueYea4 !== void 0 && _item$defaultValueYea4.value ? {
|
|
418
|
+
inputSubType: 'year'
|
|
419
|
+
} : ''),
|
|
420
|
+
selectedValue: newPeriodPickerSelectedValue === 'year' && item !== null && item !== void 0 && (_item$defaultValueYea5 = item.defaultValueYears) !== null && _item$defaultValueYea5 !== void 0 && _item$defaultValueYea5.value ? item === null || item === void 0 ? void 0 : (_item$defaultValueYea6 = item.defaultValueYears) === null || _item$defaultValueYea6 === void 0 ? void 0 : _item$defaultValueYea6.value : undefined
|
|
421
|
+
}
|
|
422
|
+
});
|
|
423
|
+
},
|
|
424
|
+
options: item.dropdownOptions && item.dropdownOptions.length > 0 ? item.dropdownOptions : [],
|
|
402
425
|
width: "100%"
|
|
403
426
|
}), displayPeriodPickerContent(item));
|
|
404
427
|
break;
|
|
@@ -31,9 +31,7 @@ const Input = _ref => {
|
|
|
31
31
|
labelColor,
|
|
32
32
|
leftIcon,
|
|
33
33
|
rightIcon,
|
|
34
|
-
password
|
|
35
|
-
leftIconOnClick,
|
|
36
|
-
rightIconOnClick
|
|
34
|
+
password
|
|
37
35
|
} = _ref;
|
|
38
36
|
const [isFocused, setIsFocused] = (0, _react.useState)(false);
|
|
39
37
|
const [inputValue, setInputValue] = (0, _react.useState)('');
|
|
@@ -73,25 +71,13 @@ const Input = _ref => {
|
|
|
73
71
|
onBlur();
|
|
74
72
|
setIsFocused(false);
|
|
75
73
|
};
|
|
76
|
-
const leftIconOnClickHandler = () => {
|
|
77
|
-
if (disabled) return;
|
|
78
|
-
leftIconOnClick({
|
|
79
|
-
leftIconOnClick: leftIcon
|
|
80
|
-
});
|
|
81
|
-
};
|
|
82
|
-
const rightIconOnClickHandler = () => {
|
|
83
|
-
if (disabled) return;
|
|
84
|
-
rightIconOnClick({
|
|
85
|
-
rightIconOnClick: rightIcon
|
|
86
|
-
});
|
|
87
|
-
};
|
|
88
74
|
const getLeftIcon = () => {
|
|
89
75
|
if (!leftIcon || leftIcon === 'none') return '';
|
|
90
|
-
return (0, _IconsHandler.getIcon)(leftIcon, '14px', '14px', error ? 'red' : labelColor, disabled, 'pointer'
|
|
76
|
+
return (0, _IconsHandler.getIcon)(leftIcon, '14px', '14px', error ? 'red' : labelColor, disabled, 'pointer');
|
|
91
77
|
};
|
|
92
78
|
const getRightIcon = () => {
|
|
93
79
|
if (!rightIcon || rightIcon === 'none') return '';
|
|
94
|
-
return (0, _IconsHandler.getIcon)(rightIcon, '14px', '14px', error ? 'red' : labelColor, disabled, 'pointer'
|
|
80
|
+
return (0, _IconsHandler.getIcon)(rightIcon, '14px', '14px', error ? 'red' : labelColor, disabled, 'pointer');
|
|
95
81
|
};
|
|
96
82
|
const toggleShowPassword = () => {
|
|
97
83
|
setShowPassword(!showPassword);
|
|
@@ -101,7 +87,7 @@ const Input = _ref => {
|
|
|
101
87
|
if (showPassword) {
|
|
102
88
|
return /*#__PURE__*/_react.default.createElement(_Input.IconWrapper, {
|
|
103
89
|
className: "passwordEyeSlash",
|
|
104
|
-
|
|
90
|
+
pointer: "cursor",
|
|
105
91
|
onClick: toggleShowPassword
|
|
106
92
|
}, /*#__PURE__*/_react.default.createElement(_fa.FaEyeSlash, {
|
|
107
93
|
onClick: toggleShowPassword,
|
|
@@ -112,16 +98,13 @@ const Input = _ref => {
|
|
|
112
98
|
};
|
|
113
99
|
return /*#__PURE__*/_react.default.createElement(_Input.MainContainer, {
|
|
114
100
|
className: "MainContainer",
|
|
115
|
-
width: width
|
|
116
|
-
size: size,
|
|
117
|
-
disabled: disabled
|
|
101
|
+
width: width
|
|
118
102
|
}, /*#__PURE__*/_react.default.createElement(_Input.InputContainer, {
|
|
119
103
|
className: "InputContainer",
|
|
120
104
|
labelColor: labelColor,
|
|
121
105
|
disabled: disabled,
|
|
122
106
|
error: error,
|
|
123
|
-
isFocused: isFocused
|
|
124
|
-
size: size
|
|
107
|
+
isFocused: isFocused
|
|
125
108
|
}, getLeftIcon(), /*#__PURE__*/_react.default.createElement(_Input.InputSubContainer, {
|
|
126
109
|
className: "InputSubContainer",
|
|
127
110
|
ref: containerRef,
|
|
@@ -178,9 +161,6 @@ Input.defaultProps = {
|
|
|
178
161
|
selectedValue: '',
|
|
179
162
|
leftIcon: 'none',
|
|
180
163
|
rightIcon: 'none',
|
|
181
|
-
leftIconOnClick: () => {},
|
|
182
|
-
rightIconOnClick: () => {},
|
|
183
|
-
onBlur: () => {},
|
|
184
164
|
password: false
|
|
185
165
|
};
|
|
186
166
|
var _default = exports.default = Input;
|
|
@@ -9,10 +9,10 @@ var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/hel
|
|
|
9
9
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
10
10
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7;
|
|
11
11
|
/* eslint-disable no-nested-ternary */
|
|
12
|
-
const MainContainer = exports.MainContainer = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n position: relative;\n display: flex;\n flex-direction: column;\n align-content: center;\n justify-content: center;\n align-items: flex-start;\n width: ", "; \n font-family: \"Poppins\", sans-serif;\n font-weight: 400;\n font-size: 14px;\n border-radius:
|
|
13
|
-
const Label = exports.Label = _styledComponents.default.label(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n\n font-size: ", ";\n font-weight: 400;\n padding-inline-end: 5px;\n padding-inline-start: 5px;\n margin-right: 10px; \n z-index: 2;\n color: ", ";\n background-color: white;\n position: absolute;\n top: ", ";\n left: ", ";\n font-family: Poppins; \n transform: translateY(-50%);\n transition: top 0.3s ease, font-size 0.3s ease, color 0.3s ease;\n display: flex;\n align-items: center;\n box-sizing: border-box;\n max-height: 16px;\n gap: 4px;\n &:
|
|
14
|
-
const InputContainer = exports.InputContainer = _styledComponents.default.div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n\n display: flex; \n flex-direction: row;\n flex-wrap: nowrap; \n justify-content: flex-start;\n align-content: center; \n white-space: pre-wrap;\n align-items: center;\n overflow: hidden;\n padding: 0 16px;\n gap: 14px;\n width: 100%;\n height: 100%; \n box-sizing: border-box;\n background-color: #fff;\n border: 1px solid ", ";\n font-family: \"Poppins\", sans-serif;\n font-weight: 400;\n font-size: 14px;\n border-radius:
|
|
15
|
-
const InputSubContainer = exports.InputSubContainer = _styledComponents.default.div(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n\n display: flex; \n flex-direction: column;\n flex-wrap: nowrap; \n align-content: center; \n align-items: flex-start;\n justify-content: center;\n white-space: pre-wrap;\n overflow: hidden;\n padding: 5px 0;\n width: 100%;\n height: 100%;\n min-height: ", ";\n box-sizing: border-box;\n background-color: #fff; \n border-radius:
|
|
16
|
-
const StyledInput = exports.StyledInput = _styledComponents.default.input(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n width: calc(100% - 10px);\n height: 20px;\n font-family: Poppins;\n font-weight: 400;\n font-size: 14px;\n outline: none; \n color: ", "; \n background-color: #fff; \n border: none;\n
|
|
12
|
+
const MainContainer = exports.MainContainer = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n position: relative;\n display: flex;\n flex-direction: column;\n align-content: center;\n justify-content: center;\n align-items: flex-start;\n width: ", "; \n font-family: \"Poppins\", sans-serif;\n font-weight: 400;\n font-size: 14px;\n border-radius: 10px;\n padding: 0;\n"])), props => props.width || '300px');
|
|
13
|
+
const Label = exports.Label = _styledComponents.default.label(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n\n font-size: ", ";\n font-weight: 400;\n padding-inline-end: 5px;\n padding-inline-start: 5px;\n margin-right: 10px; \n z-index: 2;\n color: ", ";\n background-color: white;\n position: absolute;\n top: ", ";\n left: ", ";\n font-family: Poppins; \n transform: translateY(-50%);\n transition: top 0.3s ease, font-size 0.3s ease, color 0.3s ease;\n display: flex;\n align-items: center;\n box-sizing: border-box;\n max-height: 16px;\n gap: 4px;\n &:focus {\n border-radius: 12px 12px 0 0 ;\n }\n"])), props => props.isFocused || props.hasValue ? '14px' : '14px', props => props.error ? 'red' : props.disabled ? '#D0D0D0' : props.labelColor, props => props.isFocused || props.hasValue ? '0px' : props.size === 'medium' ? '27px' : '17px', props => props.isFocused || props.hasValue ? '23px' : props.leftIcon && props.leftIcon !== 'none' ? '42px' : '16px');
|
|
14
|
+
const InputContainer = exports.InputContainer = _styledComponents.default.div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n\n display: flex; \n flex-direction: row;\n flex-wrap: nowrap; \n justify-content: flex-start;\n align-content: center; \n white-space: pre-wrap;\n align-items: center;\n overflow: hidden;\n padding: 0 16px;\n gap: 14px;\n width: 100%;\n height: 100%; \n box-sizing: border-box;\n background-color: #fff;\n border: 1px solid ", ";\n font-family: \"Poppins\", sans-serif;\n font-weight: 400;\n font-size: 14px;\n border-radius: 12px;\n outline: none;\n color: ", ";\n \n &:hover {\n border: 1px solid ", ";\n }\n\n &:focus { \n border: 1px solid ", "; \n }\n \n"])), props => props.disabled ? '#D0D0D0' : props.error ? 'red' : '#B1B1B1', props => props.disabled ? '#D0D0D0' : '#212121', props => props.disabled ? '#D0D0D0' : props.error ? 'red' : props.labelColor || '#212121', props => props.disabled ? '#D0D0D0' : props.error ? 'red' : props.labelColor || '#212121');
|
|
15
|
+
const InputSubContainer = exports.InputSubContainer = _styledComponents.default.div(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n\n display: flex; \n flex-direction: column;\n flex-wrap: nowrap; \n align-content: center; \n align-items: flex-start;\n justify-content: center;\n white-space: pre-wrap;\n overflow: hidden;\n padding: 5px 0;\n width: 100%;\n height: 100%;\n min-height: ", ";\n box-sizing: border-box;\n background-color: #fff; \n border-radius: 12px;\n outline: none;\n color: ", "; \n"])), props => props.size === 'medium' ? '52px' : '32px', props => props.disabled ? '#D0D0D0' : '#212121');
|
|
16
|
+
const StyledInput = exports.StyledInput = _styledComponents.default.input(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n width: calc(100% - 10px);\n height: 20px;\n font-family: Poppins;\n font-weight: 400;\n font-size: 14px;\n outline: none; \n color: ", "; \n background-color: #fff; \n border: none;\n"])), props => props.disabled ? '#D0D0D0' : '#212121');
|
|
17
17
|
const ErrorMessage = exports.ErrorMessage = _styledComponents.default.div(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n font-size: 12px;\n color: red;\n margin-top: 5px;\n max-width: ", ";\n"])), props => props.width || '300px');
|
|
18
|
-
const IconWrapper = exports.IconWrapper = _styledComponents.default.div(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n align-items: center;\n justify-content: center;\n align-content: center; \n padding: 2px; \n &:hover{
|
|
18
|
+
const IconWrapper = exports.IconWrapper = _styledComponents.default.div(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n align-items: center;\n justify-content: center;\n align-content: center; \n padding: 2px; \n &:hover{\n cursor: pointer;\n }\n"])));
|
|
@@ -27,121 +27,101 @@ const getIcon = (icon, iconHeight, iconWidth, color, disabled, pointer, callBack
|
|
|
27
27
|
return /*#__PURE__*/_react.default.createElement(_IconsHandler.IconWrapper, {
|
|
28
28
|
className: "FilterIcon",
|
|
29
29
|
pointer: pointer,
|
|
30
|
-
disabled: disabled,
|
|
31
30
|
onClick: callBackOnClick
|
|
32
31
|
}, /*#__PURE__*/_react.default.createElement(_FilterIcon.FilterIcon, {
|
|
33
32
|
height: newIconHeight,
|
|
34
33
|
width: newIconWidth,
|
|
35
|
-
color: newColor
|
|
36
|
-
onClick: callBackOnClick
|
|
34
|
+
color: newColor
|
|
37
35
|
}));
|
|
38
36
|
case 'options':
|
|
39
37
|
return /*#__PURE__*/_react.default.createElement(_IconsHandler.IconWrapper, {
|
|
40
38
|
className: "OptionsIcon",
|
|
41
39
|
pointer: pointer,
|
|
42
|
-
disabled: disabled,
|
|
43
40
|
onClick: callBackOnClick
|
|
44
41
|
}, /*#__PURE__*/_react.default.createElement(_OptionsIcon.OptionsIcon, {
|
|
45
42
|
height: newIconHeight,
|
|
46
43
|
width: newIconWidth,
|
|
47
|
-
color: newColor
|
|
48
|
-
onClick: callBackOnClick
|
|
44
|
+
color: newColor
|
|
49
45
|
}));
|
|
50
46
|
case 'download':
|
|
51
47
|
return /*#__PURE__*/_react.default.createElement(_IconsHandler.IconWrapper, {
|
|
52
48
|
className: "DownloadIcon",
|
|
53
49
|
pointer: pointer,
|
|
54
|
-
disabled: disabled,
|
|
55
50
|
onClick: callBackOnClick
|
|
56
51
|
}, /*#__PURE__*/_react.default.createElement(_DownloadIcon.DownloadIcon, {
|
|
57
52
|
height: newIconHeight,
|
|
58
53
|
width: newIconWidth,
|
|
59
|
-
color: newColor
|
|
60
|
-
onClick: callBackOnClick
|
|
54
|
+
color: newColor
|
|
61
55
|
}));
|
|
62
56
|
case 'document':
|
|
63
57
|
return /*#__PURE__*/_react.default.createElement(_IconsHandler.IconWrapper, {
|
|
64
58
|
className: "DocumentIcon",
|
|
65
59
|
pointer: pointer,
|
|
66
|
-
disabled: disabled,
|
|
67
60
|
onClick: callBackOnClick
|
|
68
61
|
}, /*#__PURE__*/_react.default.createElement(_DocumentIcon.DocumentIcon, {
|
|
69
62
|
height: newIconHeight,
|
|
70
63
|
width: newIconWidth,
|
|
71
|
-
color: newColor
|
|
72
|
-
onClick: callBackOnClick
|
|
64
|
+
color: newColor
|
|
73
65
|
}));
|
|
74
66
|
case 'fly':
|
|
75
67
|
return /*#__PURE__*/_react.default.createElement(_IconsHandler.IconWrapper, {
|
|
76
68
|
className: "FlyIcon",
|
|
77
69
|
pointer: pointer,
|
|
78
|
-
disabled: disabled,
|
|
79
70
|
onClick: callBackOnClick
|
|
80
71
|
}, /*#__PURE__*/_react.default.createElement(_FlyIcon.FlyIcon, {
|
|
81
72
|
height: newIconHeight,
|
|
82
73
|
width: newIconWidth,
|
|
83
|
-
color: newColor
|
|
84
|
-
onClick: callBackOnClick
|
|
74
|
+
color: newColor
|
|
85
75
|
}));
|
|
86
76
|
case 'bell':
|
|
87
77
|
return /*#__PURE__*/_react.default.createElement(_IconsHandler.IconWrapper, {
|
|
88
78
|
className: "BellIcon",
|
|
89
79
|
pointer: pointer,
|
|
90
|
-
disabled: disabled,
|
|
91
80
|
onClick: callBackOnClick
|
|
92
81
|
}, /*#__PURE__*/_react.default.createElement(_BellIcon.BellIcon, {
|
|
93
82
|
height: newIconHeight,
|
|
94
83
|
width: newIconWidth,
|
|
95
|
-
color: newColor
|
|
96
|
-
onClick: callBackOnClick
|
|
84
|
+
color: newColor
|
|
97
85
|
}));
|
|
98
86
|
case 'maintenance':
|
|
99
87
|
return /*#__PURE__*/_react.default.createElement(_IconsHandler.IconWrapper, {
|
|
100
88
|
className: "MaintenanceIcon",
|
|
101
89
|
pointer: pointer,
|
|
102
|
-
disabled: disabled,
|
|
103
90
|
onClick: callBackOnClick
|
|
104
91
|
}, /*#__PURE__*/_react.default.createElement(_MaintenanceIcon.MaintenanceIcon, {
|
|
105
92
|
height: newIconHeight,
|
|
106
93
|
width: newIconWidth,
|
|
107
|
-
color: newColor
|
|
108
|
-
onClick: callBackOnClick
|
|
94
|
+
color: newColor
|
|
109
95
|
}));
|
|
110
96
|
case 'exit':
|
|
111
97
|
return /*#__PURE__*/_react.default.createElement(_IconsHandler.IconWrapper, {
|
|
112
98
|
className: "ExitIcon",
|
|
113
99
|
pointer: pointer,
|
|
114
|
-
disabled: disabled,
|
|
115
100
|
onClick: callBackOnClick
|
|
116
101
|
}, /*#__PURE__*/_react.default.createElement(_ExitIcon.ExitIcon, {
|
|
117
102
|
height: newIconHeight,
|
|
118
103
|
width: newIconWidth,
|
|
119
|
-
color: newColor
|
|
120
|
-
onClick: callBackOnClick
|
|
104
|
+
color: newColor
|
|
121
105
|
}));
|
|
122
106
|
case 'eye':
|
|
123
107
|
return /*#__PURE__*/_react.default.createElement(_IconsHandler.IconWrapper, {
|
|
124
108
|
className: "EyeIcon",
|
|
125
109
|
pointer: pointer,
|
|
126
|
-
disabled: disabled,
|
|
127
110
|
onClick: callBackOnClick
|
|
128
111
|
}, /*#__PURE__*/_react.default.createElement(_EyeIcon.EyeIcon, {
|
|
129
112
|
height: newIconHeight,
|
|
130
113
|
width: newIconWidth,
|
|
131
|
-
color: newColor
|
|
132
|
-
onClick: callBackOnClick
|
|
114
|
+
color: newColor
|
|
133
115
|
}));
|
|
134
116
|
case 'search':
|
|
135
117
|
return /*#__PURE__*/_react.default.createElement(_IconsHandler.IconWrapper, {
|
|
136
118
|
className: "SearchIcon",
|
|
137
119
|
pointer: pointer,
|
|
138
|
-
disabled: disabled,
|
|
139
120
|
onClick: callBackOnClick
|
|
140
121
|
}, /*#__PURE__*/_react.default.createElement(_SearchIcon.SearchIcon, {
|
|
141
122
|
height: newIconHeight,
|
|
142
123
|
width: newIconWidth,
|
|
143
|
-
color: newColor
|
|
144
|
-
onClick: callBackOnClick
|
|
124
|
+
color: newColor
|
|
145
125
|
}));
|
|
146
126
|
default:
|
|
147
127
|
return '';
|
|
@@ -9,4 +9,4 @@ var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/hel
|
|
|
9
9
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
10
10
|
var _templateObject;
|
|
11
11
|
// eslint-disable-next-line import/prefer-default-export
|
|
12
|
-
const IconWrapper = exports.IconWrapper = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n align-items: center;\n justify-content: center;\n align-content: center; \n padding: 2px;\n cursor: ", ";\n"])), props => props.
|
|
12
|
+
const IconWrapper = exports.IconWrapper = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n align-items: center;\n justify-content: center;\n align-content: center; \n padding: 2px;\n cursor: ", ";\n"])), props => props.pointer || 'default');
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sag_components",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.669",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
"react-loading-skeleton": "^3.3.1",
|
|
72
72
|
"recharts": "^2.9.2",
|
|
73
73
|
"storybook": "^7.4.6",
|
|
74
|
-
"styled-components": "^6.1.
|
|
74
|
+
"styled-components": "^6.1.11"
|
|
75
75
|
},
|
|
76
76
|
"browserslist": {
|
|
77
77
|
"production": [
|
|
@@ -85,4 +85,4 @@
|
|
|
85
85
|
"last 1 safari version"
|
|
86
86
|
]
|
|
87
87
|
}
|
|
88
|
-
}
|
|
88
|
+
}
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.default = void 0;
|
|
8
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
-
var _MenuItemOpenIcon = require("./icons/MenuItemOpenIcon");
|
|
10
|
-
var _MenuItemUpIcon = require("./icons/MenuItemUpIcon");
|
|
11
|
-
var _SpotlightProductIcon = require("./icons/SpotlightProductIcon");
|
|
12
|
-
var _BannersDropdown = require("./BannersDropdown");
|
|
13
|
-
var _EventInfo = require("./EventInfo.style");
|
|
14
|
-
const EventInfo = props => {
|
|
15
|
-
const {
|
|
16
|
-
title,
|
|
17
|
-
subTitle,
|
|
18
|
-
productsData,
|
|
19
|
-
onSpotlightProductClick,
|
|
20
|
-
onClickBannersDropdown
|
|
21
|
-
} = props;
|
|
22
|
-
const [IsProductsListOpen, setIsProductsListOpen] = (0, _react.useState)(false);
|
|
23
|
-
const displayBannersDropdown = () => /*#__PURE__*/_react.default.createElement(_BannersDropdown.BannersDropdown, {
|
|
24
|
-
banners: [{
|
|
25
|
-
checked: true,
|
|
26
|
-
name: 'StopAndShop'
|
|
27
|
-
}, {
|
|
28
|
-
checked: true,
|
|
29
|
-
name: 'FoodLion'
|
|
30
|
-
}, {
|
|
31
|
-
checked: true,
|
|
32
|
-
name: 'GiantFood'
|
|
33
|
-
}, {
|
|
34
|
-
checked: true,
|
|
35
|
-
name: 'TheGiantCompany'
|
|
36
|
-
}, {
|
|
37
|
-
checked: true,
|
|
38
|
-
name: 'Hannaford'
|
|
39
|
-
}],
|
|
40
|
-
onClick: banners => {
|
|
41
|
-
onClickBannersDropdown({
|
|
42
|
-
banners
|
|
43
|
-
});
|
|
44
|
-
}
|
|
45
|
-
});
|
|
46
|
-
return /*#__PURE__*/_react.default.createElement(_EventInfo.EventInfoMainContainer, {
|
|
47
|
-
id: "EventInfoMainContainer"
|
|
48
|
-
}, /*#__PURE__*/_react.default.createElement(_EventInfo.EventInfoContainer, {
|
|
49
|
-
id: "EventInfoContainer"
|
|
50
|
-
}, /*#__PURE__*/_react.default.createElement(_EventInfo.EventInfoTitleContainer, {
|
|
51
|
-
id: "EventInfoTitleContainer"
|
|
52
|
-
}, /*#__PURE__*/_react.default.createElement(_EventInfo.EventInfoTitle, {
|
|
53
|
-
id: "EventInfoTitle"
|
|
54
|
-
}, title), /*#__PURE__*/_react.default.createElement(_EventInfo.EventInfoSubTitle, {
|
|
55
|
-
id: "EventInfoSubTitle"
|
|
56
|
-
}, "|"), /*#__PURE__*/_react.default.createElement(_EventInfo.EventInfoSubTitle, {
|
|
57
|
-
id: "EventInfoSubTitle"
|
|
58
|
-
}, productsData ? productsData === null || productsData === void 0 ? void 0 : productsData.length : ''), displayBannersDropdown()), /*#__PURE__*/_react.default.createElement(_EventInfo.ProductButtonContainer, {
|
|
59
|
-
id: "ProductButtonContainer",
|
|
60
|
-
onClick: () => {
|
|
61
|
-
setIsProductsListOpen(!IsProductsListOpen);
|
|
62
|
-
}
|
|
63
|
-
}, IsProductsListOpen ? /*#__PURE__*/_react.default.createElement(_MenuItemUpIcon.MenuItemUpIcon, {
|
|
64
|
-
color: "#212121"
|
|
65
|
-
}) : /*#__PURE__*/_react.default.createElement(_MenuItemOpenIcon.MenuItemOpenIcon, {
|
|
66
|
-
color: "#212121"
|
|
67
|
-
}))), IsProductsListOpen && /*#__PURE__*/_react.default.createElement(_EventInfo.EventInfoContentContainer, {
|
|
68
|
-
id: "EventInfoContentContainer"
|
|
69
|
-
}, /*#__PURE__*/_react.default.createElement(_EventInfo.ProductsTitle, {
|
|
70
|
-
id: "ProductsTitle"
|
|
71
|
-
}, subTitle), productsData === null || productsData === void 0 ? void 0 : productsData.map(item => /*#__PURE__*/_react.default.createElement(_EventInfo.ProductContainer, {
|
|
72
|
-
id: "ProductContainer"
|
|
73
|
-
}, /*#__PURE__*/_react.default.createElement(_EventInfo.Product, {
|
|
74
|
-
id: "Product"
|
|
75
|
-
}, item.label), item.ShowSpotlightProductButton ? /*#__PURE__*/_react.default.createElement(_EventInfo.ProductButtonContainer, {
|
|
76
|
-
id: "ProductButtonContainer",
|
|
77
|
-
background: "#F8CD00",
|
|
78
|
-
onClick: () => {
|
|
79
|
-
onSpotlightProductClick({
|
|
80
|
-
value: item.value,
|
|
81
|
-
label: item.label
|
|
82
|
-
});
|
|
83
|
-
}
|
|
84
|
-
}, /*#__PURE__*/_react.default.createElement(_SpotlightProductIcon.SpotlightProductIcon, null)) : ''))));
|
|
85
|
-
};
|
|
86
|
-
var _default = exports.default = EventInfo;
|
|
87
|
-
EventInfo.defaultProps = {
|
|
88
|
-
title: 'Products Variety',
|
|
89
|
-
subTitle: 'Product Name',
|
|
90
|
-
onSpotlightProductClick: () => {},
|
|
91
|
-
onClickBannersDropdown: () => {}
|
|
92
|
-
};
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.ProductsTitle = exports.ProductContainer = exports.ProductButtonContainer = exports.Product = exports.EventInfoTitleContainer = exports.EventInfoTitle = exports.EventInfoSubTitle = exports.EventInfoMainContainer = exports.EventInfoContentContainer = exports.EventInfoContainer = void 0;
|
|
8
|
-
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/taggedTemplateLiteral"));
|
|
9
|
-
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
10
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10;
|
|
11
|
-
const EventInfoMainContainer = exports.EventInfoMainContainer = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n position: relative;\n margin: 0;\n padding: 10px;\n border-radius: 12px;\n box-shadow: 0px 0px 20px 0px rgba(0, 0, 0, 0.2);\n"])));
|
|
12
|
-
const EventInfoContainer = exports.EventInfoContainer = _styledComponents.default.div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin: 0 10px;\n"])));
|
|
13
|
-
const EventInfoTitleContainer = exports.EventInfoTitleContainer = _styledComponents.default.div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n font-family: \"Poppins\", sans-serif;\n font-style: normal;\n font-size: 20px;\n line-height: 25px;\n display: flex;\n justify-content: flex-start;\n align-items: center;\n margin: 10px;\n gap: 15px;\n"])));
|
|
14
|
-
const EventInfoTitle = exports.EventInfoTitle = _styledComponents.default.h3(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n font-weight: 500;\n font-size: 20px;\n\n margin: 0;\n"])));
|
|
15
|
-
const EventInfoSubTitle = exports.EventInfoSubTitle = _styledComponents.default.h3(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n color: #757171;\n font-weight: 500;\n font-size: 20px;\n margin: 0;\n"])));
|
|
16
|
-
const EventInfoContentContainer = exports.EventInfoContentContainer = _styledComponents.default.div(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n font-family: \"Poppins\", sans-serif;\n font-style: normal;\n font-size: 20px;\n line-height: 25px;\n display: flex;\n justify-content: flex-start;\n flex-direction: column;\n align-items: flex-start;\n margin: 10px;\n padding: 10px 20px 20px 50px;\n"])));
|
|
17
|
-
const ProductsTitle = exports.ProductsTitle = _styledComponents.default.h3(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2.default)(["\n font-weight: 600;\n font-size: 14px;\n margin: 10px 0;\n"])));
|
|
18
|
-
const ProductContainer = exports.ProductContainer = _styledComponents.default.div(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n justify-content: flex-start;\n align-items: center;\n border-bottom: 1px solid #00000010;\n width: 100%;\n gap: 20px;\n"])));
|
|
19
|
-
const Product = exports.Product = _styledComponents.default.h3(_templateObject9 || (_templateObject9 = (0, _taggedTemplateLiteral2.default)(["\n font-weight: 400;\n font-size: 14px;\n border-radius: 12px;\n"])));
|
|
20
|
-
const ProductButtonContainer = exports.ProductButtonContainer = _styledComponents.default.div(_templateObject10 || (_templateObject10 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n justify-content: space-between;\n align-items: center;\n background: ", ";\n border-radius: 12px;\n height: 25px;\n padding: 0 15px;\n user-select: none;\n &:hover {\n background-color: #f0f0f0;\n cursor: pointer;\n }\n gap: 10px;\n"])), props => props.background || '#ffffff');
|