sag_components 1.0.975 → 1.0.976
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/Button.test.js +10 -10
- package/dist/LinkButton.test.js +10 -10
- package/dist/SingleBar.test.js +2 -2
- package/dist/index.js +1 -1
- package/dist/stories/components/AttachedFile/AttachedFile.js +1 -1
- package/dist/stories/components/AttachedFile/AttachedFile.style.js +40 -6
- package/dist/stories/components/BannerEventBox/BannerEventBox.js +33 -23
- package/dist/stories/components/BannerEventBox/BannerEventBox.style.js +71 -15
- package/dist/stories/components/BannerEventBoxList/BannerEventBoxList.js +10 -5
- package/dist/stories/components/BannerEventBoxList/BannerEventBoxList.style.js +182 -16
- package/dist/stories/components/BannersDropdown/BannersDropdown.style.js +91 -10
- package/dist/stories/components/BarChart/BarChart.js +5 -3
- package/dist/stories/components/BarChart/BarChart.stories.js +29 -20
- package/dist/stories/components/BarChart/BarChart.style.js +52 -10
- package/dist/stories/components/BarChartTwoRows/BarChartTwoRows.js +53 -44
- package/dist/stories/components/BarChartTwoRows/BarChartTwoRows.stories.js +166 -40
- package/dist/stories/components/BarChartTwoRows/BarChartTwoRows.style.js +72 -11
- package/dist/stories/components/BarChartsByWeeks/BarChartsByWeeks.js +7 -3
- package/dist/stories/components/BarChartsByWeeks/BarChartsByWeeks.style.js +88 -13
- package/dist/stories/components/Benchmark/Benchmark.style.js +53 -7
- package/dist/stories/components/Button/Button.js +1 -1
- package/dist/stories/components/Button/Button.style.js +82 -7
- package/dist/stories/components/CampaignDemoReport/CampaignDemoReport.style.js +40 -7
- package/dist/stories/components/Card/Card.style.js +57 -10
- package/dist/stories/components/CheckBox/CheckBox.style.js +28 -6
- package/dist/stories/components/CheckBoxButton/CheckBoxButton.style.js +31 -6
- package/dist/stories/components/CodeEditor/CodeEditor.style.js +4 -3
- package/dist/stories/components/CollapseData/CollapseData.js +5 -5
- package/dist/stories/components/CollapseData/CollapseData.style.js +119 -13
- package/dist/stories/components/CollapseHeader/CollapseHeader.js +2 -1
- package/dist/stories/components/CollapseHeader/CollapseHeader.style.js +192 -27
- package/dist/stories/components/CollapseMenuItem/CollapseMenuItem.style.js +53 -9
- package/dist/stories/components/Datepicker/Datepicker.style.js +9 -3
- package/dist/stories/components/DownloadProgress/DownloadProgress.style.js +43 -6
- package/dist/stories/components/Dropdown/Dropdown.style.js +9 -3
- package/dist/stories/components/DropdownMulti/DropdownMulti.js +290 -0
- package/dist/stories/components/DropdownMulti/DropdownMulti.stories.js +220 -0
- package/dist/stories/components/DropdownMulti/DropdownMulti.style.js +11 -0
- package/dist/stories/components/DropdownMultiNew/DropdownMultiNew.js +49 -36
- package/dist/stories/components/DropdownMultiNew/DropdownMultiNew.style.js +204 -16
- package/dist/stories/components/DropdownNew/DropdownNew.js +21 -11
- package/dist/stories/components/DropdownNew/DropdownNew.stories.js +18 -9
- package/dist/stories/components/DropdownNew/DropdownNew.style.js +13 -3
- package/dist/stories/components/DropdownSingleNew/DropdownSingleNew.js +30 -10
- package/dist/stories/components/DropdownSingleNew/DropdownSingleNew.style.js +175 -14
- package/dist/stories/components/EventDetailsCard/EventDetailsCard.style.js +86 -10
- package/dist/stories/components/EventList/EventList.style.js +30 -6
- package/dist/stories/components/EventListItem/EventListItem.style.js +39 -6
- package/dist/stories/components/FilterContainer/FilterContainer.style.js +22 -5
- package/dist/stories/components/FilterPanel/FilterPanel.js +22 -17
- package/dist/stories/components/FilterPanel/FilterPanel.style.js +81 -13
- package/dist/stories/components/FilterPanel.js +4 -0
- package/dist/stories/components/FormattedValue/FormattedValue.style.js +83 -10
- package/dist/stories/components/IconButton/IconButton.style.js +56 -7
- package/dist/stories/components/Input/Input.style.js +122 -9
- package/dist/stories/components/InputOld/InputOld.style.js +61 -8
- package/dist/stories/components/KpiFilter/KpiFilter.js +18 -1
- package/dist/stories/components/KpiFilter/KpiFilter.style.js +124 -18
- package/dist/stories/components/LinkButton/LinkButton.style.js +45 -6
- package/dist/stories/components/LinnerDataBox/LinnerDataBox.js +4 -2
- package/dist/stories/components/LinnerDataBox/LinnerDataBox.stories.js +32 -10
- package/dist/stories/components/LinnerDataBox/LinnerDataBox.style.js +60 -14
- package/dist/stories/components/ListBox/ListBox.style.js +40 -6
- package/dist/stories/components/MarketShareDescription/MarketShareDescription.stories.js +17 -3
- package/dist/stories/components/MarketShareDescription/MarketShareDescription.style.js +207 -19
- package/dist/stories/components/Modal/Modal.style.js +56 -8
- package/dist/stories/components/Modal/ModalTotalBenchmark.js +6 -6
- package/dist/stories/components/MonthPicker/MonthPicker.js +2 -2
- package/dist/stories/components/MonthPicker/MonthPicker.style.js +95 -10
- package/dist/stories/components/MonthPicker/MonthPopupPicker.js +91 -13
- package/dist/stories/components/MultipleCard/MultipleCard.style.js +5 -3
- package/dist/stories/components/NoDataFoundMessage/NoDataFoundMessage.style.js +31 -5
- package/dist/stories/components/OneColumnContainer/OneColumnContainer.style.js +99 -12
- package/dist/stories/components/PageFilterBar/PageFilterBar.style.js +14 -4
- package/dist/stories/components/PerformanceAnalytics/PerformanceAnalytics.js +16 -9
- package/dist/stories/components/PerformanceAnalytics/PerformanceAnalytics.style.js +136 -17
- package/dist/stories/components/PerformanceAnalyticsLegend/PerformanceAnalyticsLegend.js +14 -13
- package/dist/stories/components/PerformanceAnalyticsLegend/PerformanceAnalyticsLegend.style.js +55 -8
- package/dist/stories/components/PerformanceAnalyticsOneColumn/PerformanceAnalyticsOneColumn.js +12 -5
- package/dist/stories/components/PerformanceAnalyticsOneColumn/PerformanceAnalyticsOneColumn.style.js +108 -15
- package/dist/stories/components/PerformanceAnalyticsTotals/PerformanceAnalyticsTotals.js +1 -1
- package/dist/stories/components/PerformanceAnalyticsTotals/PerformanceAnalyticsTotals.style.js +81 -12
- package/dist/stories/components/Popup/Popup.style.js +114 -16
- package/dist/stories/components/PopupCharts/PopupCharts.style.js +100 -15
- package/dist/stories/components/PopupContent/PopupContent.style.js +64 -11
- package/dist/stories/components/ProductsVariety/ProductsVariety.style.js +78 -12
- package/dist/stories/components/ProgressBar/ProgressBar.style.js +15 -4
- package/dist/stories/components/QuarterPicker/QuarterPicker.js +2 -2
- package/dist/stories/components/QuarterPicker/QuarterPicker.style.js +94 -10
- package/dist/stories/components/QuarterPicker/QuarterPopupPicker.js +85 -12
- package/dist/stories/components/QuickFilter/QuickFilter.style.js +13 -3
- package/dist/stories/components/QuickFilter/QuickFilterDropdownMultiSelection.js +2 -2
- package/dist/stories/components/QuickFilter/QuickFilterDropdownMultiSelection.style.js +182 -16
- package/dist/stories/components/QuickFilter/QuickFilterDropdownSingle.js +1 -1
- package/dist/stories/components/QuickFilter/QuickFilterDropdownSingle.style.js +127 -15
- package/dist/stories/components/QuickFilterDropdownMultiSelection.js +1 -1
- package/dist/stories/components/QuickFilterDropdownSingle.js +1 -1
- package/dist/stories/components/RangePicker/RangeDatePicker.js +95 -12
- package/dist/stories/components/RangePicker/RangePicker.js +2 -2
- package/dist/stories/components/RangePicker/RangePicker.style.js +99 -10
- package/dist/stories/components/ReportTable/ReportTable.style.js +123 -14
- package/dist/stories/components/SagButton/SagButton.style.js +39 -5
- package/dist/stories/components/SagIconButton/SagIconButton.style.js +22 -4
- package/dist/stories/components/SagInput/SagInput.style.js +33 -5
- package/dist/stories/components/SalesAndROI/SalesAndROI.style.js +103 -11
- package/dist/stories/components/SearchInput/SearchInput.style.js +29 -4
- package/dist/stories/components/SegmentedButton/SegmentedButton.js +5 -5
- package/dist/stories/components/SegmentedButton/SegmentedButton.style.js +90 -9
- package/dist/stories/components/Select/Select.style.js +92 -9
- package/dist/stories/components/TabMenu/TabMenu.js +19 -7
- package/dist/stories/components/TabMenu/TabMenu.style.js +105 -14
- package/dist/stories/components/Table/Table.js +2 -2
- package/dist/stories/components/Table/Table.style.js +78 -9
- package/dist/stories/components/TextField/TextField.style.js +10 -3
- package/dist/stories/components/TitleDescription/TitleDescription.style.js +214 -28
- package/dist/stories/components/Tooltip/Tooltip.js +1 -1
- package/dist/stories/components/Tooltip/Tooltip.style.js +90 -5
- package/dist/stories/components/TopToggleList/TopToggleList.style.js +43 -8
- package/dist/stories/components/TotalBenchmark/TotalBenchmark.style.js +71 -11
- package/dist/stories/components/TotalBenchmarkAreachart/TotalBenchmarkAreachart.js +3 -3
- package/dist/stories/components/TotalBenchmarkAreachart/TotalBenchmarkAreachart.style.js +163 -22
- package/dist/stories/components/TotalBenchmarkArrows/TotalBenchmarkArrows.style.js +100 -16
- package/dist/stories/components/TotalBenchmarkBarchart/TotalBenchmarkBarchart.style.js +69 -12
- package/dist/stories/components/TotalDoughnutChart/TotalDoughnutChart.js +3 -3
- package/dist/stories/components/TotalDoughnutChart/TotalDoughnutChart.style.js +170 -22
- package/dist/stories/components/TotalHorizontalCharts/TotalHorizontalCharts.js +47 -32
- package/dist/stories/components/TotalHorizontalCharts/TotalHorizontalCharts.stories.js +52 -14
- package/dist/stories/components/TotalHorizontalCharts/TotalHorizontalCharts.style.js +51 -13
- package/dist/stories/components/TspanTooltip/TspanTooltip.js +3 -3
- package/dist/stories/components/TspanTooltip/TspanTooltip.style.js +97 -5
- package/dist/stories/components/TwoBarCharts/TwoBarCharts.js +6 -4
- package/dist/stories/components/TwoBarCharts/TwoBarCharts.stories.js +88 -23
- package/dist/stories/components/TwoBarCharts/TwoBarCharts.style.js +52 -10
- package/dist/stories/utils/CommonFunctions.js +13 -8
- package/package.json +1 -1
- package/dist/stories/components/HaiTooltip.js +0 -71
- package/dist/stories/components/HaiTooltip.style.js +0 -12
- package/dist/stories/components/Rbackup.js +0 -453
- package/dist/stories/components/TableTooltip.js +0 -71
- package/dist/stories/components/TableTooltip.style.js +0 -12
|
@@ -5,8 +5,26 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.SpanText = exports.SagIconButtonWrapper = void 0;
|
|
8
|
-
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/taggedTemplateLiteral"));
|
|
9
8
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
const SagIconButtonWrapper = exports.SagIconButtonWrapper = _styledComponents.default.button`
|
|
10
|
+
height: ${props => props.height};
|
|
11
|
+
font-size: 14px;
|
|
12
|
+
font-weight: 400;
|
|
13
|
+
display: flex;
|
|
14
|
+
gap: 8px;
|
|
15
|
+
align-items: center;
|
|
16
|
+
justify-content: center;
|
|
17
|
+
padding: 8px 18px;
|
|
18
|
+
white-space: nowrap;
|
|
19
|
+
color: ${props => props.color};
|
|
20
|
+
border-radius: 8px;
|
|
21
|
+
border: 1px solid ${props => props.color};
|
|
22
|
+
background: ${props => props.backgroundColor ? props.backgroundColor : 'transparent'};
|
|
23
|
+
transition: box-shadow 0.3s ease;
|
|
24
|
+
&:hover, &:focus {
|
|
25
|
+
cursor: pointer;
|
|
26
|
+
box-shadow: 5px 5px 10px 0px rgba(0, 0, 0, 0.1);
|
|
27
|
+
}
|
|
28
|
+
`;
|
|
29
|
+
const SpanText = exports.SpanText = _styledComponents.default.span`
|
|
30
|
+
`;
|
|
@@ -5,9 +5,37 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.TextFieldInput = exports.TextFieldContainer = exports.Label = void 0;
|
|
8
|
-
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/taggedTemplateLiteral"));
|
|
9
8
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
const
|
|
9
|
+
const TextFieldContainer = exports.TextFieldContainer = _styledComponents.default.div`
|
|
10
|
+
position: relative;
|
|
11
|
+
`;
|
|
12
|
+
const TextFieldInput = exports.TextFieldInput = _styledComponents.default.input`
|
|
13
|
+
padding: 14px 10px;
|
|
14
|
+
font-size: 14px;
|
|
15
|
+
width: ${props => props.width};
|
|
16
|
+
border: 1px solid #ccc;
|
|
17
|
+
border-radius: ${props => props.borderRadius};
|
|
18
|
+
box-sizing: border-box;
|
|
19
|
+
&::placeholder {
|
|
20
|
+
color: #B1B1B1;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/* &:focus + label,
|
|
24
|
+
&:not(:placeholder-shown) + label {
|
|
25
|
+
top: -8px;
|
|
26
|
+
font-size: 12px;
|
|
27
|
+
color: #007bff;
|
|
28
|
+
background-color: white;
|
|
29
|
+
} */
|
|
30
|
+
`;
|
|
31
|
+
const Label = exports.Label = _styledComponents.default.label`
|
|
32
|
+
position: absolute;
|
|
33
|
+
top: -8px;
|
|
34
|
+
left: 12px;
|
|
35
|
+
color: ${props => props.color};
|
|
36
|
+
pointer-events: none;
|
|
37
|
+
font-size: 14px;
|
|
38
|
+
padding: 0 3px;
|
|
39
|
+
background: white;
|
|
40
|
+
/* transition: all 0.3s ease; */
|
|
41
|
+
`;
|
|
@@ -5,15 +5,107 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.TitleAndValueContainer = exports.Title = exports.TextBeforeAndAfterValue = exports.OutBanner = exports.ItemsContainer = exports.ItemTitle = exports.ItemContainer = exports.FormattedValue = exports.ControlsContainer = void 0;
|
|
8
|
-
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/taggedTemplateLiteral"));
|
|
9
8
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
9
|
+
const ControlsContainer = exports.ControlsContainer = _styledComponents.default.div`
|
|
10
|
+
// position: relative;
|
|
11
|
+
display: flex;
|
|
12
|
+
flex-direction: column;
|
|
13
|
+
font-family: "Poppins", sans-serif;
|
|
14
|
+
color: ${props => props.textColor};
|
|
15
|
+
width: ${props => props.width};
|
|
16
|
+
height: ${props => props.height};
|
|
17
|
+
background-color: white;
|
|
18
|
+
box-shadow: ${props => props.showBorderShadow ? '0px 0px 20px 0px rgba(0, 0, 0, 0.2)' : null};
|
|
19
|
+
border-radius: 12px;
|
|
20
|
+
`;
|
|
21
|
+
const TitleAndValueContainer = exports.TitleAndValueContainer = _styledComponents.default.div`
|
|
22
|
+
display: flex;
|
|
23
|
+
justify-content: space-between;
|
|
24
|
+
padding: 0;
|
|
25
|
+
`;
|
|
26
|
+
const ItemsContainer = exports.ItemsContainer = _styledComponents.default.div`
|
|
27
|
+
display: grid;
|
|
28
|
+
grid-template-columns: repeat(2, 1fr); /* Two columns */
|
|
29
|
+
padding: 20px;
|
|
30
|
+
gap: 10px;
|
|
31
|
+
width: 90%;
|
|
32
|
+
height: 100%;
|
|
33
|
+
`;
|
|
34
|
+
const ItemContainer = exports.ItemContainer = _styledComponents.default.div`
|
|
35
|
+
display: flex;
|
|
36
|
+
justify-content: flex-start;
|
|
37
|
+
flex-direction: column;
|
|
38
|
+
flex-wrap: wrap;
|
|
39
|
+
`;
|
|
40
|
+
const Title = exports.Title = _styledComponents.default.h4`
|
|
41
|
+
font-size: 18px;
|
|
42
|
+
font-weight: 500;
|
|
43
|
+
margin: 0;
|
|
44
|
+
@media (max-width: 1536px) {
|
|
45
|
+
font-size: 16px;
|
|
46
|
+
}
|
|
47
|
+
@media (max-width: 1366px) {
|
|
48
|
+
font-size: 14px;
|
|
49
|
+
}
|
|
50
|
+
`;
|
|
51
|
+
const ItemTitle = exports.ItemTitle = _styledComponents.default.h4`
|
|
52
|
+
font-size: 18px;
|
|
53
|
+
font-weight: 500;
|
|
54
|
+
margin: 0;
|
|
55
|
+
@media (max-width: 1536px) {
|
|
56
|
+
font-size: 14px;
|
|
57
|
+
}
|
|
58
|
+
@media (max-width: 1366px) {
|
|
59
|
+
font-size: 12px;
|
|
60
|
+
}
|
|
61
|
+
`;
|
|
62
|
+
const FormattedValue = exports.FormattedValue = _styledComponents.default.div`
|
|
63
|
+
font-weight: 500;
|
|
64
|
+
font-size: 40px;
|
|
65
|
+
display: flex;
|
|
66
|
+
align-items: baseline;
|
|
67
|
+
gap: 2px;
|
|
68
|
+
@media (max-width: 1536px) {
|
|
69
|
+
font-size: 24px;
|
|
70
|
+
}
|
|
71
|
+
@media (max-width: 1366px) {
|
|
72
|
+
font-size: 20px;
|
|
73
|
+
}
|
|
74
|
+
`;
|
|
75
|
+
const OutBanner = exports.OutBanner = _styledComponents.default.div`
|
|
76
|
+
display: flex;
|
|
77
|
+
gap: 8px;
|
|
78
|
+
align-items: center;
|
|
79
|
+
font-size: 14px;
|
|
80
|
+
font-weight: 400;
|
|
81
|
+
color: ${props => props.textColor};
|
|
82
|
+
cursor: pointer;
|
|
83
|
+
@media (max-width: 1536px) {
|
|
84
|
+
font-size: 13px;
|
|
85
|
+
}
|
|
86
|
+
@media (max-width: 1366px) {
|
|
87
|
+
font-size: 12px;
|
|
88
|
+
}
|
|
89
|
+
> svg {
|
|
90
|
+
width: 14px;
|
|
91
|
+
height: 14px;
|
|
92
|
+
@media (max-width: 1536px) {
|
|
93
|
+
width: 13px;
|
|
94
|
+
height: 13px;
|
|
95
|
+
}
|
|
96
|
+
@media (max-width: 1366px) {
|
|
97
|
+
width: 12px;
|
|
98
|
+
height: 12px;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
`;
|
|
102
|
+
const TextBeforeAndAfterValue = exports.TextBeforeAndAfterValue = _styledComponents.default.span`
|
|
103
|
+
font-weight: 500;
|
|
104
|
+
font-size: 16px;
|
|
105
|
+
@media (max-width: 1536px) {
|
|
106
|
+
font-size: 14px;
|
|
107
|
+
}
|
|
108
|
+
@media (max-width: 1366px) {
|
|
109
|
+
font-size: 11px;
|
|
110
|
+
}
|
|
111
|
+
`;
|
|
@@ -5,8 +5,33 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.TextFieldInput = exports.TextFieldContainer = void 0;
|
|
8
|
-
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/taggedTemplateLiteral"));
|
|
9
8
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
const TextFieldContainer = exports.TextFieldContainer = _styledComponents.default.div`
|
|
10
|
+
position: relative;
|
|
11
|
+
width: ${props => props.width};
|
|
12
|
+
> svg {
|
|
13
|
+
position: absolute;
|
|
14
|
+
top: 50%;
|
|
15
|
+
transform: translateY(-50%);
|
|
16
|
+
left: 10px;
|
|
17
|
+
|
|
18
|
+
}
|
|
19
|
+
`;
|
|
20
|
+
const TextFieldInput = exports.TextFieldInput = _styledComponents.default.input`
|
|
21
|
+
width: 100%;
|
|
22
|
+
height: ${props => props.height};
|
|
23
|
+
font-size: 14px;
|
|
24
|
+
font-weight: 400;
|
|
25
|
+
padding: 6px 16px;
|
|
26
|
+
border-radius: 8px;
|
|
27
|
+
border: 1px solid #B1B1B1;
|
|
28
|
+
background: transparent;
|
|
29
|
+
text-indent: 14px;
|
|
30
|
+
&:hover,
|
|
31
|
+
&:focus {
|
|
32
|
+
border: 1px solid #212121;
|
|
33
|
+
}
|
|
34
|
+
&::placeholder {
|
|
35
|
+
color: #B1B1B1;
|
|
36
|
+
}
|
|
37
|
+
`;
|
|
@@ -50,8 +50,8 @@ const SegmentedButton = props => {
|
|
|
50
50
|
const {
|
|
51
51
|
style
|
|
52
52
|
} = controlRef.current;
|
|
53
|
-
style.setProperty('--highlight-width',
|
|
54
|
-
style.setProperty('--highlight-x-pos',
|
|
53
|
+
style.setProperty('--highlight-width', `${offsetWidth}px`);
|
|
54
|
+
style.setProperty('--highlight-x-pos', `${offsetLeft}px`);
|
|
55
55
|
}, [activeIndex, controlRef, optionsRef]);
|
|
56
56
|
const onInputChangeHandler = (value, index) => {
|
|
57
57
|
setActiveIndex(index);
|
|
@@ -73,14 +73,14 @@ const SegmentedButton = props => {
|
|
|
73
73
|
segmentradius: segmentradius,
|
|
74
74
|
controlradius: controlradius,
|
|
75
75
|
segmentwidth: segmentwidth,
|
|
76
|
-
className:
|
|
76
|
+
className: `controls ${componentReady.current ? 'ready' : 'idle'}`
|
|
77
77
|
}, optionsRef === null || optionsRef === void 0 ? void 0 : optionsRef.map((item, i) => /*#__PURE__*/_react.default.createElement(_SegmentedButton.Segment, {
|
|
78
78
|
id: "Segment",
|
|
79
79
|
key: item.id,
|
|
80
80
|
selectedsegmentcolor: selectedsegmentcolor,
|
|
81
81
|
controlradius: controlradius,
|
|
82
82
|
segmentwidth: segmentwidth,
|
|
83
|
-
className:
|
|
83
|
+
className: `${activeIndex === i ? 'active' : 'inactive'}`,
|
|
84
84
|
ref: item.ref
|
|
85
85
|
}, /*#__PURE__*/_react.default.createElement(_SegmentedButton.ControlsInput, {
|
|
86
86
|
type: "radio",
|
|
@@ -94,7 +94,7 @@ const SegmentedButton = props => {
|
|
|
94
94
|
selectedtextcolor: selectedtextcolor,
|
|
95
95
|
unselectedtextcolor: unselectedtextcolor,
|
|
96
96
|
segmentheight: height / 5,
|
|
97
|
-
className:
|
|
97
|
+
className: `${activeIndex === i ? 'active' : 'inactive'} `,
|
|
98
98
|
htmlFor: item.value
|
|
99
99
|
}, item.value)))));
|
|
100
100
|
};
|
|
@@ -5,15 +5,96 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.SegmentedButtonGroup = exports.SegmentLabel = exports.Segment = exports.ControlsInput = exports.Controls = exports.ButtonsControlsContainer = void 0;
|
|
8
|
-
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/taggedTemplateLiteral"));
|
|
9
8
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
const SegmentedButtonGroup = exports.SegmentedButtonGroup = _styledComponents.default.div`
|
|
10
|
+
display: flex;
|
|
11
|
+
gap: 28px;
|
|
12
|
+
@media (max-width: 1536px) {
|
|
13
|
+
gap: 20px;
|
|
14
|
+
}
|
|
15
|
+
@media (max-width: 1366px) {
|
|
16
|
+
gap: 17px;
|
|
17
|
+
}
|
|
18
|
+
`;
|
|
19
|
+
const ButtonsControlsContainer = exports.ButtonsControlsContainer = _styledComponents.default.div`
|
|
20
|
+
display: flex;
|
|
21
|
+
font: ${props => {
|
|
13
22
|
var _props$fontSize;
|
|
14
23
|
return (_props$fontSize = props.fontSize) === null || _props$fontSize === void 0 ? void 0 : _props$fontSize.toString().concat('', 'px Poppins, sans-serif');
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
24
|
+
}};
|
|
25
|
+
margin: 0;
|
|
26
|
+
--highlight-width: auto;
|
|
27
|
+
--highlight-x-pos: 0;
|
|
28
|
+
-webkit-font-smoothing: antialiased;
|
|
29
|
+
-moz-osx-font-smoothing: grayscale;
|
|
30
|
+
float: left;
|
|
31
|
+
|
|
32
|
+
&:not(:first-of-type) {
|
|
33
|
+
padding-left: 40px;
|
|
34
|
+
@media (max-width: 1536px) {
|
|
35
|
+
padding-left: 35px;
|
|
36
|
+
}
|
|
37
|
+
@media (max-width: 1366px) {
|
|
38
|
+
padding-left: 24px;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
`;
|
|
42
|
+
const Controls = exports.Controls = _styledComponents.default.div`
|
|
43
|
+
display: inline-flex;
|
|
44
|
+
justify-content: space-between;
|
|
45
|
+
background: #f2f2f2;
|
|
46
|
+
border-radius: ${props => props.controlradius.toString().concat('', 'px')}; //12px
|
|
47
|
+
// max-width: 500px; //use this to limit max lenght of the control
|
|
48
|
+
padding: 6px;
|
|
49
|
+
overflow: hidden;
|
|
50
|
+
position: relative;
|
|
51
|
+
&.controls::before {
|
|
52
|
+
content: "";
|
|
53
|
+
color: #212121;
|
|
54
|
+
background: #FFFFFF;
|
|
55
|
+
box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
|
|
56
|
+
border-radius: ${props => props.segmentradius.toString().concat('', 'px')}; //12px
|
|
57
|
+
width: var(--highlight-width);
|
|
58
|
+
transform: translateX(var(--highlight-x-pos));
|
|
59
|
+
position: absolute;
|
|
60
|
+
top: 3px;
|
|
61
|
+
bottom: 3px;
|
|
62
|
+
left: 0;
|
|
63
|
+
z-index: 0;
|
|
64
|
+
}
|
|
65
|
+
&.controls.ready::before {
|
|
66
|
+
transition: transform 0.3s ease, width 0.3s ease;
|
|
67
|
+
}
|
|
68
|
+
`;
|
|
69
|
+
const ControlsInput = exports.ControlsInput = _styledComponents.default.input`
|
|
70
|
+
opacity: 0;
|
|
71
|
+
margin: 0;
|
|
72
|
+
top: 0;
|
|
73
|
+
right: 0;
|
|
74
|
+
bottom: 0;
|
|
75
|
+
left: 0;
|
|
76
|
+
position: absolute;
|
|
77
|
+
width: 100%;
|
|
78
|
+
cursor: pointer;
|
|
79
|
+
height: 100%;
|
|
80
|
+
`;
|
|
81
|
+
const Segment = exports.Segment = _styledComponents.default.div`
|
|
82
|
+
/* width: 100%; uncomment for each segment to have matching width */
|
|
83
|
+
width: 50%;
|
|
84
|
+
min-width: ${props => props.segmentwidth.toString().concat('', 'px')}; //120px;
|
|
85
|
+
position: relative;
|
|
86
|
+
text-align: center;
|
|
87
|
+
z-index: 1;
|
|
88
|
+
`;
|
|
89
|
+
const SegmentLabel = exports.SegmentLabel = _styledComponents.default.label`
|
|
90
|
+
cursor: pointer;
|
|
91
|
+
display: block;
|
|
92
|
+
padding: 0 6px;
|
|
93
|
+
transition: color 0.5s ease;
|
|
94
|
+
&.active {
|
|
95
|
+
color: ${props => props.selectedtextcolor};
|
|
96
|
+
}
|
|
97
|
+
&.inactive {
|
|
98
|
+
color: ${props => props.unselectedtextcolor};
|
|
99
|
+
}
|
|
100
|
+
`;
|
|
@@ -5,15 +5,98 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.StyledInput = exports.SelectWrapper = exports.OptionsContainer = exports.OptionItem = exports.Label = exports.ErrorMessage = void 0;
|
|
8
|
-
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/taggedTemplateLiteral"));
|
|
9
8
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
9
|
+
const SelectWrapper = exports.SelectWrapper = _styledComponents.default.div`
|
|
10
|
+
position: relative;
|
|
11
|
+
width: ${props => props.width || '200px'};
|
|
12
|
+
margin: ${props => props.margin || '0 0 0 0'};
|
|
13
|
+
`;
|
|
14
|
+
const Label = exports.Label = _styledComponents.default.label`
|
|
15
|
+
|
|
16
|
+
font-size: ${props => props.isFocused || props.hasValue ? '14px' : '14px'};
|
|
17
|
+
font-weight: 400;
|
|
18
|
+
padding-inline-end: 5px;
|
|
19
|
+
padding-inline-start: 5px;
|
|
20
|
+
margin-right: 10px;
|
|
21
|
+
|
|
22
|
+
color: ${props => props.error ? 'red' : props.disabled ? '#888' : props.labelFontColor};
|
|
23
|
+
background-color: white;
|
|
24
|
+
position: absolute;
|
|
25
|
+
top: ${props => props.isFocused || props.hasValue ? '0px' : '50%'};
|
|
26
|
+
left: 10px;
|
|
27
|
+
font-family: Poppins;
|
|
28
|
+
|
|
29
|
+
transform: translateY(-50%);
|
|
30
|
+
transition: top 0.3s ease, font-size 0.3s ease, color 0.3s ease;
|
|
31
|
+
display: flex;
|
|
32
|
+
align-items: center;
|
|
33
|
+
box-sizing: border-box;
|
|
34
|
+
&:focus {
|
|
35
|
+
border-radius: 12px 12px 0 0 ;
|
|
36
|
+
}
|
|
37
|
+
`;
|
|
38
|
+
const StyledInput = exports.StyledInput = _styledComponents.default.input`
|
|
39
|
+
width: 200px;
|
|
40
|
+
padding: 10px 10px 10px 15px;
|
|
41
|
+
font-family: "Poppins", sans-serif;
|
|
42
|
+
font-weight: 400;
|
|
43
|
+
font-size: ${props => props.fontSize};
|
|
44
|
+
border: 1px solid ${props => props.disabled ? '#bdbdbd' : props.error ? 'red' : props.borderColor};
|
|
45
|
+
border-radius: ${props => props.radius};
|
|
46
|
+
font-family: Poppins;
|
|
47
|
+
outline: none;
|
|
48
|
+
box-sizing: border-box;
|
|
49
|
+
color: ${props => props.disabled ? '#888' : '#333'};
|
|
50
|
+
|
|
51
|
+
&:hover {
|
|
52
|
+
border: 1px solid ${props => props.disabled ? '#bdbdbd' : props.error ? 'red' : props.borderColor || '#bdbdbd'};
|
|
53
|
+
border-color: ${props => props.disabled ? '#bdbdbd' : props.borderColor || '#1976d2'};
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
&:focus {
|
|
57
|
+
border-radius: 12px 12px 0 0 ;
|
|
58
|
+
border-bottom: none;
|
|
59
|
+
border-color: ${props => props.disabled ? '#bdbdbd' : props.borderColorFoucs};
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
`;
|
|
63
|
+
const OptionsContainer = exports.OptionsContainer = _styledComponents.default.ul`
|
|
64
|
+
list-style: none;
|
|
65
|
+
font-weight: 400;
|
|
66
|
+
margin: 0;
|
|
67
|
+
padding: 0;
|
|
68
|
+
position: absolute;
|
|
69
|
+
top: calc(100% + 2px);
|
|
70
|
+
left: 0;
|
|
71
|
+
z-index: 2;
|
|
72
|
+
width: 200px;
|
|
73
|
+
font-family: Poppins;
|
|
74
|
+
border-top: none;
|
|
75
|
+
border-radius: 0 0 12px 12px;
|
|
76
|
+
border: 1px solid ${props => props.borderColorFoucs};
|
|
77
|
+
background-color: #fff;
|
|
78
|
+
border-color: ${props => props.borderColorFoucs};
|
|
79
|
+
display: ${props => {
|
|
15
80
|
var _props$filteredoption;
|
|
16
81
|
return props.showoptions && ((_props$filteredoption = props.filteredoptions) === null || _props$filteredoption === void 0 ? void 0 : _props$filteredoption.length) > 0 ? 'block' : 'none';
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
const
|
|
82
|
+
}};
|
|
83
|
+
`;
|
|
84
|
+
const OptionItem = exports.OptionItem = _styledComponents.default.li`
|
|
85
|
+
padding: 10px 10px 10px 15px;
|
|
86
|
+
cursor: pointer;
|
|
87
|
+
color: rgba(33, 33, 33, 0.80);
|
|
88
|
+
font-family: Poppins;
|
|
89
|
+
font-size: 12px;
|
|
90
|
+
font-style: normal;
|
|
91
|
+
font-weight: 400;
|
|
92
|
+
transition: background-color 0.3s;
|
|
93
|
+
|
|
94
|
+
&:hover {
|
|
95
|
+
background-color: #f0f0f0;
|
|
96
|
+
}
|
|
97
|
+
`;
|
|
98
|
+
const ErrorMessage = exports.ErrorMessage = _styledComponents.default.div`
|
|
99
|
+
font-size: 12px;
|
|
100
|
+
color: red;
|
|
101
|
+
margin-top: 5px;
|
|
102
|
+
`;
|
|
@@ -55,19 +55,19 @@ const TabMenu = props => {
|
|
|
55
55
|
}, tabs.length > 1 ? tabs.map((tab, index) => /*#__PURE__*/_react.default.createElement(_TabMenu.Tab, {
|
|
56
56
|
key: tab.title.replace(/\s/g, ''),
|
|
57
57
|
isActive: index === activeTab,
|
|
58
|
-
className:
|
|
58
|
+
className: `tab ${index === activeTab ? 'active' : ''}`,
|
|
59
59
|
color: color,
|
|
60
60
|
onClick: () => handleTabChange(index)
|
|
61
61
|
}, tab.title)) : /*#__PURE__*/_react.default.createElement(_TabMenu.Tab, {
|
|
62
62
|
isActive: activeTab === 0,
|
|
63
|
-
className:
|
|
63
|
+
className: `tab ${activeTab === 0 ? 'active' : ''}`,
|
|
64
64
|
color: color,
|
|
65
65
|
onClick: () => handleTabChange(0)
|
|
66
66
|
}, tabs[0].title), /*#__PURE__*/_react.default.createElement(_TabMenu.PresentationSlider, {
|
|
67
67
|
className: "PresentationSlider",
|
|
68
68
|
activeTab: activeTab,
|
|
69
69
|
color: color,
|
|
70
|
-
width:
|
|
70
|
+
width: `${100 / tabs.length}%`,
|
|
71
71
|
role: "presentation"
|
|
72
72
|
})))), showActions && /*#__PURE__*/_react.default.createElement(_TabMenu.ActionsWrapper, {
|
|
73
73
|
className: "ActionsWrapper"
|
|
@@ -118,7 +118,10 @@ TabMenu.defaultProps = {
|
|
|
118
118
|
textBefore: '',
|
|
119
119
|
textAfter: '%'
|
|
120
120
|
}],
|
|
121
|
-
rowFooter:
|
|
121
|
+
rowFooter: `<strong>Pringles Harvest Blend </strong>
|
|
122
|
+
<p1>market share </p1>
|
|
123
|
+
<strong>increased by 98% </strong>
|
|
124
|
+
<p1>following the event</p1>`,
|
|
122
125
|
showBanner: false
|
|
123
126
|
}, {
|
|
124
127
|
name: 'pringles',
|
|
@@ -139,7 +142,10 @@ TabMenu.defaultProps = {
|
|
|
139
142
|
textBefore: '',
|
|
140
143
|
textAfter: '%'
|
|
141
144
|
}],
|
|
142
|
-
rowFooter:
|
|
145
|
+
rowFooter: `<strong>Pringles Harvest Blend </strong>
|
|
146
|
+
<p1>market share </p1>
|
|
147
|
+
<strong>increased by 98% </strong>
|
|
148
|
+
<p1>following the event</p1>`,
|
|
143
149
|
showBanner: false
|
|
144
150
|
}, {
|
|
145
151
|
name: 'pringlesHarvestBlend',
|
|
@@ -160,7 +166,10 @@ TabMenu.defaultProps = {
|
|
|
160
166
|
textBefore: '',
|
|
161
167
|
textAfter: '%'
|
|
162
168
|
}],
|
|
163
|
-
rowFooter:
|
|
169
|
+
rowFooter: `<strong>Pringles Harvest Blend </strong>
|
|
170
|
+
<p1>market share </p1>
|
|
171
|
+
<strong>increased by 98% </strong>
|
|
172
|
+
<p1>following the event</p1>`,
|
|
164
173
|
showBanner: false
|
|
165
174
|
}, {
|
|
166
175
|
name: 'pringles',
|
|
@@ -181,7 +190,10 @@ TabMenu.defaultProps = {
|
|
|
181
190
|
textBefore: '',
|
|
182
191
|
textAfter: '%'
|
|
183
192
|
}],
|
|
184
|
-
rowFooter:
|
|
193
|
+
rowFooter: `<strong>Pringles Harvest Blend </strong>
|
|
194
|
+
<p1>market share </p1>
|
|
195
|
+
<strong>increased by 98% </strong>
|
|
196
|
+
<p1>following the event</p1>`,
|
|
185
197
|
showBanner: false
|
|
186
198
|
}]
|
|
187
199
|
})
|