sag_components 1.0.950 → 1.0.951
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/AttachedFile/AttachedFile.js +62 -0
- package/dist/stories/components/AttachedFile/AttachedFile.stories.js +36 -0
- package/dist/stories/components/AttachedFile/AttachedFile.style.js +14 -0
- package/dist/stories/components/AttachedFile.js +1 -1
- package/dist/stories/components/AttachedFile.style.js +6 -40
- package/dist/stories/components/AutocompleteField.style.js +7 -47
- package/dist/stories/components/BannerEventBox/BannerEventBox.js +87 -0
- package/dist/stories/components/BannerEventBox/BannerEventBox.stories.js +58 -0
- package/dist/stories/components/BannerEventBox/BannerEventBox.style.js +22 -0
- package/dist/stories/components/BannerEventBox.js +33 -23
- package/dist/stories/components/BannerEventBox.style.js +14 -66
- package/dist/stories/components/BannerEventBoxList/BannerEventBoxList.js +148 -0
- package/dist/stories/components/BannerEventBoxList/BannerEventBoxList.stories.js +59 -0
- package/dist/stories/components/BannerEventBoxList/BannerEventBoxList.style.js +23 -0
- package/dist/stories/components/BannerEventBoxList.js +1 -2
- package/dist/stories/components/BannerEventBoxList.style.js +15 -174
- package/dist/stories/components/BannersDropdown/BannersDropdown.js +115 -0
- package/dist/stories/components/BannersDropdown/BannersDropdown.stories.js +64 -0
- package/dist/stories/components/BannersDropdown/BannersDropdown.style.js +18 -0
- package/dist/stories/components/BannersDropdown.style.js +10 -91
- package/dist/stories/components/BarChart/BarChart.js +189 -0
- package/dist/stories/components/BarChart/BarChart.stories.js +144 -0
- package/dist/stories/components/BarChart/BarChart.style.js +18 -0
- package/dist/stories/components/BarChart.js +2 -2
- package/dist/stories/components/BarChart.style.js +10 -52
- package/dist/stories/components/BarChartTwoRows/BarChartTwoRows.js +204 -0
- package/dist/stories/components/BarChartTwoRows/BarChartTwoRows.stories.js +133 -0
- package/dist/stories/components/BarChartTwoRows/BarChartTwoRows.style.js +18 -0
- package/dist/stories/components/BarChartTwoRows.js +2 -2
- package/dist/stories/components/BarChartTwoRows.style.js +11 -70
- package/dist/stories/components/BarChartWithAreaChart.js +7 -7
- package/dist/stories/components/BarChartWithAreaChart.style.js +11 -56
- package/dist/stories/components/BarChartsByWeeks/BarChartsByWeeks.js +295 -0
- package/dist/stories/components/BarChartsByWeeks/BarChartsByWeeks.stories.js +442 -0
- package/dist/stories/components/BarChartsByWeeks/BarChartsByWeeks.style.js +21 -0
- package/dist/stories/components/BarChartsByWeeks.js +3 -7
- package/dist/stories/components/BarChartsByWeeks.style.js +13 -88
- package/dist/stories/components/Benchmark/Benchmark.js +130 -0
- package/dist/stories/components/Benchmark/Benchmark.stories.js +148 -0
- package/dist/stories/components/Benchmark/Benchmark.style.js +15 -0
- package/dist/stories/components/Benchmark.style.js +7 -53
- package/dist/stories/components/Button/Button.js +217 -0
- package/dist/stories/components/Button/Button.stories.js +269 -0
- package/dist/stories/components/Button/Button.style.js +15 -0
- package/dist/stories/components/Button.js +1 -1
- package/dist/stories/components/Button.style.js +7 -82
- package/dist/stories/components/CampaignDemoReport/CampaignDemoReport.js +48 -0
- package/dist/stories/components/CampaignDemoReport/CampaignDemoReport.stories.js +65 -0
- package/dist/stories/components/CampaignDemoReport/CampaignDemoReport.style.js +15 -0
- package/dist/stories/components/CampaignTool/CampaignDemoReport.style.js +7 -40
- package/dist/stories/components/CampaignTool/Card.style.js +10 -58
- package/dist/stories/components/CampaignTool/MultipleCard.style.js +3 -6
- package/dist/stories/components/CampaignTool/PageFilterBar.style.js +4 -14
- package/dist/stories/components/CampaignTool/Popup.style.js +16 -114
- package/dist/stories/components/CampaignTool/PopupContent.style.js +11 -64
- package/dist/stories/components/CampaignTool/Table.js +2 -2
- package/dist/stories/components/CampaignTool/Table.style.js +9 -79
- package/dist/stories/components/Card/Card.js +72 -0
- package/dist/stories/components/Card/Card.stories.js +92 -0
- package/dist/stories/components/Card/Card.style.js +18 -0
- package/dist/stories/components/CheckBox/CheckBox.js +76 -0
- package/dist/stories/components/CheckBox/CheckBox.stories.js +107 -0
- package/dist/stories/components/CheckBox/CheckBox.style.js +14 -0
- package/dist/stories/components/CheckBox.style.js +6 -28
- package/dist/stories/components/CheckBoxButton/CheckBoxButton.js +69 -0
- package/dist/stories/components/CheckBoxButton/CheckBoxButton.stories.js +150 -0
- package/dist/stories/components/CheckBoxButton/CheckBoxButton.style.js +14 -0
- package/dist/stories/components/CheckBoxButton.style.js +6 -31
- package/dist/stories/components/CodeEditor/CodeEditor.js +43 -0
- package/dist/stories/components/CodeEditor/CodeEditor.style.js +12 -0
- package/dist/stories/components/CodeEditor.style.js +3 -4
- package/dist/stories/components/CollapseData/CollapseData.js +66 -0
- package/dist/stories/components/CollapseData/CollapseData.stories.js +125 -0
- package/dist/stories/components/CollapseData/CollapseData.style.js +21 -0
- package/dist/stories/components/CollapseData.js +5 -5
- package/dist/stories/components/CollapseData.style.js +13 -119
- package/dist/stories/components/CollapseHeader/CollapseHeader.js +248 -0
- package/dist/stories/components/CollapseHeader/CollapseHeader.stories.js +116 -0
- package/dist/stories/components/CollapseHeader/CollapseHeader.style.js +35 -0
- package/dist/stories/components/CollapseHeader.style.js +27 -192
- package/dist/stories/components/CollapseMenuItem/CollapseMenuItem.js +61 -0
- package/dist/stories/components/CollapseMenuItem/CollapseMenuItem.stories.js +161 -0
- package/dist/stories/components/CollapseMenuItem/CollapseMenuItem.style.js +17 -0
- package/dist/stories/components/CollapseMenuItem.style.js +9 -53
- package/dist/stories/components/Datepicker/Datepicker.js +148 -0
- package/dist/stories/components/Datepicker/Datepicker.stories.js +86 -0
- package/dist/stories/components/Datepicker/Datepicker.style.js +13 -0
- package/dist/stories/components/Datepicker.style.js +3 -9
- package/dist/stories/components/DownloadProgress/DownloadProgress.js +97 -0
- package/dist/stories/components/DownloadProgress/DownloadProgress.stories.js +111 -0
- package/dist/stories/components/DownloadProgress/DownloadProgress.style.js +14 -0
- package/dist/stories/components/DownloadProgress.style.js +6 -43
- package/dist/stories/components/Dropdown/Dropdown.js +231 -0
- package/dist/stories/components/Dropdown/Dropdown.stories.js +323 -0
- package/dist/stories/components/Dropdown/Dropdown.style.js +11 -0
- package/dist/stories/components/Dropdown.style.js +3 -9
- package/dist/stories/components/DropdownMulti.js +1 -1
- package/dist/stories/components/DropdownMulti.style.js +3 -9
- package/dist/stories/components/DropdownMultiNew/DropdownMultiNew.js +279 -0
- package/dist/stories/components/DropdownMultiNew/DropdownMultiNew.style.js +28 -0
- package/dist/stories/components/DropdownMultiNew.js +1 -1
- package/dist/stories/components/DropdownMultiNew.style.js +16 -193
- package/dist/stories/components/DropdownNew/DropdownNew.js +88 -0
- package/dist/stories/components/DropdownNew/DropdownNew.stories.js +407 -0
- package/dist/stories/components/DropdownNew/DropdownNew.style.js +11 -0
- package/dist/stories/components/DropdownNew.style.js +3 -14
- package/dist/stories/components/DropdownSingleNew/DropdownSingleNew.js +234 -0
- package/dist/stories/components/DropdownSingleNew/DropdownSingleNew.style.js +26 -0
- package/dist/stories/components/DropdownSingleNew.style.js +14 -162
- package/dist/stories/components/EventDetailsCard/EventDetailsCard.js +144 -0
- package/dist/stories/components/EventDetailsCard/EventDetailsCard.stories.js +57 -0
- package/dist/stories/components/EventDetailsCard/EventDetailsCard.style.js +18 -0
- package/dist/stories/components/EventDetailsCard.style.js +10 -86
- package/dist/stories/components/EventList/EventList.js +61 -0
- package/dist/stories/components/EventList/EventList.stories.js +84 -0
- package/dist/stories/components/EventList/EventList.style.js +14 -0
- package/dist/stories/components/EventList.style.js +6 -30
- package/dist/stories/components/EventListItem/EventListItem.js +50 -0
- package/dist/stories/components/EventListItem/EventListItem.stories.js +65 -0
- package/dist/stories/components/EventListItem/EventListItem.style.js +14 -0
- package/dist/stories/components/EventListItem.style.js +6 -39
- package/dist/stories/components/FilterContainer/FilterContainer.js +29 -0
- package/dist/stories/components/FilterContainer/FilterContainer.stories.js +23 -0
- package/dist/stories/components/FilterContainer/FilterContainer.style.js +13 -0
- package/dist/stories/components/FilterContainer.style.js +5 -22
- package/dist/stories/components/FilterPanel/FilterPanel.js +566 -0
- package/dist/stories/components/FilterPanel/FilterPanel.stories.js +967 -0
- package/dist/stories/components/FilterPanel/FilterPanel.style.js +21 -0
- package/dist/stories/components/FilterPanel.js +17 -17
- package/dist/stories/components/FilterPanel.style.js +13 -81
- package/dist/stories/components/FormInput/FormInput.js +41 -0
- package/dist/stories/components/FormSelect/FormSelect.js +42 -0
- package/dist/stories/components/FormattedValue/FormattedValue.js +68 -0
- package/dist/stories/components/FormattedValue/FormattedValue.stories.js +189 -0
- package/dist/stories/components/FormattedValue/FormattedValue.style.js +18 -0
- package/dist/stories/components/FormattedValue.style.js +10 -83
- package/dist/stories/components/HaiTooltip.js +71 -0
- package/dist/stories/components/HaiTooltip.style.js +12 -0
- package/dist/stories/components/IconButton/IconButton.js +147 -0
- package/dist/stories/components/IconButton/IconButton.stories.js +131 -0
- package/dist/stories/components/IconButton/IconButton.style.js +15 -0
- package/dist/stories/components/IconButton.style.js +7 -56
- package/dist/stories/components/Input/Input.js +183 -0
- package/dist/stories/components/Input/Input.stories.js +434 -0
- package/dist/stories/components/Input/Input.style.js +17 -0
- package/dist/stories/components/Input.style.js +9 -123
- package/dist/stories/components/InputOld/InputOld.js +90 -0
- package/dist/stories/components/InputOld/InputOld.stories.js +100 -0
- package/dist/stories/components/InputOld/InputOld.style.js +16 -0
- package/dist/stories/components/InputOld.style.js +8 -62
- package/dist/stories/components/KpiFilter/KpiFilter.js +313 -0
- package/dist/stories/components/KpiFilter/KpiFilter.stories.js +380 -0
- package/dist/stories/components/KpiFilter/KpiFilter.style.js +26 -0
- package/dist/stories/components/KpiFilter.style.js +18 -124
- package/dist/stories/components/LinkButton/LinkButton.js +207 -0
- package/dist/stories/components/LinkButton/LinkButton.stories.js +180 -0
- package/dist/stories/components/LinkButton/LinkButton.style.js +14 -0
- package/dist/stories/components/LinkButton.style.js +6 -45
- package/dist/stories/components/LinnerDataBox/LinnerDataBox.js +44 -0
- package/dist/stories/components/LinnerDataBox/LinnerDataBox.stories.js +56 -0
- package/dist/stories/components/LinnerDataBox/LinnerDataBox.style.js +22 -0
- package/dist/stories/components/LinnerDataBox.js +1 -1
- package/dist/stories/components/LinnerDataBox.style.js +14 -60
- package/dist/stories/components/ListBox/ListBox.js +82 -0
- package/dist/stories/components/ListBox/ListBox.stories.js +132 -0
- package/dist/stories/components/ListBox/ListBox.style.js +14 -0
- package/dist/stories/components/ListBox.style.js +6 -40
- package/dist/stories/components/MarketShareDescription/MarketShareDescription.js +109 -0
- package/dist/stories/components/MarketShareDescription/MarketShareDescription.stories.js +184 -0
- package/dist/stories/components/MarketShareDescription/MarketShareDescription.style.js +27 -0
- package/dist/stories/components/MarketShareDescription.style.js +19 -207
- package/dist/stories/components/Modal/Modal.js +21 -0
- package/dist/stories/components/Modal/Modal.style.js +17 -0
- package/dist/stories/components/Modal/ModalTotalBenchmark.js +224 -0
- package/dist/stories/components/Modal/ModalTotalCost.js +139 -0
- package/dist/stories/components/Modal.style.js +8 -56
- package/dist/stories/components/ModalTotalBenchmark.js +6 -6
- package/dist/stories/components/MonthPicker/MonthPicker.js +166 -0
- package/dist/stories/components/MonthPicker/MonthPicker.stories.js +140 -0
- package/dist/stories/components/MonthPicker/MonthPicker.style.js +18 -0
- package/dist/stories/components/MonthPicker/MonthPopupPicker.js +122 -0
- package/dist/stories/components/MonthPicker.js +2 -2
- package/dist/stories/components/MonthPicker.style.js +10 -96
- package/dist/stories/components/MonthPopupPicker.js +13 -92
- package/dist/stories/components/MultipleCard/MultipleCard.js +26 -0
- package/dist/stories/components/MultipleCard/MultipleCard.stories.js +33 -0
- package/dist/stories/components/{BannerEventBoxTest.style.js → MultipleCard/MultipleCard.style.js} +2 -2
- package/dist/stories/components/NoDataFoundMessage/NoDataFoundMessage.js +30 -0
- package/dist/stories/components/NoDataFoundMessage/NoDataFoundMessage.stories.js +66 -0
- package/dist/stories/components/NoDataFoundMessage/NoDataFoundMessage.style.js +13 -0
- package/dist/stories/components/NoDataFoundMessage.style.js +5 -31
- package/dist/stories/components/OneColumnContainer/OneColumnContainer.js +121 -0
- package/dist/stories/components/OneColumnContainer/OneColumnContainer.stories.js +119 -0
- package/dist/stories/components/OneColumnContainer/OneColumnContainer.style.js +20 -0
- package/dist/stories/components/OneColumnContainer.style.js +12 -99
- package/dist/stories/components/PageFilterBar/PageFilterBar.js +23 -0
- package/dist/stories/components/PageFilterBar/PageFilterBar.stories.js +28 -0
- package/dist/stories/components/PageFilterBar/PageFilterBar.style.js +12 -0
- package/dist/stories/components/PerformanceAnalytics/PerformanceAnalytics.js +440 -0
- package/dist/stories/components/PerformanceAnalytics/PerformanceAnalytics.stories.js +258 -0
- package/dist/stories/components/PerformanceAnalytics/PerformanceAnalytics.style.js +25 -0
- package/dist/stories/components/PerformanceAnalytics.js +9 -16
- package/dist/stories/components/PerformanceAnalytics.style.js +17 -136
- package/dist/stories/components/PerformanceAnalyticsLegend/PerformanceAnalyticsLegend.js +58 -0
- package/dist/stories/components/PerformanceAnalyticsLegend/PerformanceAnalyticsLegend.stories.js +86 -0
- package/dist/stories/components/PerformanceAnalyticsLegend/PerformanceAnalyticsLegend.style.js +16 -0
- package/dist/stories/components/PerformanceAnalyticsLegend.js +1 -1
- package/dist/stories/components/PerformanceAnalyticsLegend.style.js +8 -55
- package/dist/stories/components/PerformanceAnalyticsOneColumn/PerformanceAnalyticsOneColumn.js +320 -0
- package/dist/stories/components/PerformanceAnalyticsOneColumn/PerformanceAnalyticsOneColumn.stories.js +231 -0
- package/dist/stories/components/PerformanceAnalyticsOneColumn/PerformanceAnalyticsOneColumn.style.js +23 -0
- package/dist/stories/components/PerformanceAnalyticsOneColumn.js +5 -12
- package/dist/stories/components/PerformanceAnalyticsOneColumn.style.js +15 -108
- package/dist/stories/components/PerformanceAnalyticsTotals/PerformanceAnalyticsTotals.js +70 -0
- package/dist/stories/components/PerformanceAnalyticsTotals/PerformanceAnalyticsTotals.stories.js +100 -0
- package/dist/stories/components/PerformanceAnalyticsTotals/PerformanceAnalyticsTotals.style.js +20 -0
- package/dist/stories/components/PerformanceAnalyticsTotals.js +1 -1
- package/dist/stories/components/PerformanceAnalyticsTotals.style.js +12 -81
- package/dist/stories/components/Popup/Popup.js +172 -0
- package/dist/stories/components/Popup/Popup.stories.js +704 -0
- package/dist/stories/components/Popup/Popup.style.js +24 -0
- package/dist/stories/components/PopupCharts/PopupCharts.js +244 -0
- package/dist/stories/components/PopupCharts/PopupCharts.stories.js +1203 -0
- package/dist/stories/components/PopupCharts/PopupCharts.style.js +23 -0
- package/dist/stories/components/PopupCharts.style.js +15 -100
- package/dist/stories/components/PopupContent/PopupContent.js +111 -0
- package/dist/stories/components/PopupContent/PopupContent.style.js +21 -0
- package/dist/stories/components/PopupContent/PopupFieldsRules.js +168 -0
- package/dist/stories/components/ProductsVariety/ProductsVariety.js +94 -0
- package/dist/stories/components/ProductsVariety/ProductsVariety.stories.js +91 -0
- package/dist/stories/components/ProductsVariety/ProductsVariety.style.js +20 -0
- package/dist/stories/components/ProductsVariety.style.js +12 -78
- package/dist/stories/components/ProgressBar/ProgressBar.js +52 -0
- package/dist/stories/components/ProgressBar/ProgressBar.stories.js +72 -0
- package/dist/stories/components/ProgressBar/ProgressBar.style.js +13 -0
- package/dist/stories/components/ProgressBar.style.js +4 -15
- package/dist/stories/components/QuarterPicker/QuarterPicker.js +165 -0
- package/dist/stories/components/QuarterPicker/QuarterPicker.stories.js +140 -0
- package/dist/stories/components/QuarterPicker/QuarterPicker.style.js +18 -0
- package/dist/stories/components/QuarterPicker/QuarterPopupPicker.js +109 -0
- package/dist/stories/components/QuarterPicker.js +2 -2
- package/dist/stories/components/QuarterPicker.style.js +10 -95
- package/dist/stories/components/QuarterPopupPicker.js +12 -86
- package/dist/stories/components/QuickFilter/QuickFilter.js +78 -0
- package/dist/stories/components/QuickFilter/QuickFilter.stories.js +281 -0
- package/dist/stories/components/QuickFilter/QuickFilter.style.js +11 -0
- package/dist/stories/components/QuickFilter/QuickFilterDropdownMultiSelection.js +299 -0
- package/dist/stories/components/QuickFilter/QuickFilterDropdownMultiSelection.style.js +28 -0
- package/dist/stories/components/QuickFilter/QuickFilterDropdownSingle.js +229 -0
- package/dist/stories/components/QuickFilter/QuickFilterDropdownSingle.style.js +27 -0
- package/dist/stories/components/QuickFilter.style.js +3 -13
- package/dist/stories/components/QuickFilterDropdownMultiSelection.js +1 -1
- package/dist/stories/components/QuickFilterDropdownMultiSelection.style.js +16 -182
- package/dist/stories/components/QuickFilterDropdownSingle.style.js +15 -127
- package/dist/stories/components/RangeDatePicker.js +12 -96
- package/dist/stories/components/RangePicker/RangeDatePicker.js +146 -0
- package/dist/stories/components/RangePicker/RangePicker.js +176 -0
- package/dist/stories/components/RangePicker/RangePicker.stories.js +138 -0
- package/dist/stories/components/RangePicker/RangePicker.style.js +18 -0
- package/dist/stories/components/RangePicker.js +2 -2
- package/dist/stories/components/RangePicker.style.js +10 -100
- package/dist/stories/components/Rbackup.js +453 -0
- package/dist/stories/components/ReportTable/ReportTable.js +262 -0
- package/dist/stories/components/ReportTable/ReportTable.stories.js +151 -0
- package/dist/stories/components/ReportTable/ReportTable.style.js +22 -0
- package/dist/stories/components/ReportTable.style.js +14 -123
- package/dist/stories/components/SagButton/SagButton.js +68 -0
- package/dist/stories/components/SagButton/SagButton.stories.js +118 -0
- package/dist/stories/components/SagButton/SagButton.style.js +13 -0
- package/dist/stories/components/SagButton.style.js +5 -39
- package/dist/stories/components/SagIconButton/SagIconButton.js +130 -0
- package/dist/stories/components/SagIconButton/SagIconButton.stories.js +123 -0
- package/dist/stories/components/SagIconButton/SagIconButton.style.js +12 -0
- package/dist/stories/components/SagIconButton.style.js +4 -22
- package/dist/stories/components/SagInput/SagInput.js +53 -0
- package/dist/stories/components/SagInput/SagInput.stories.js +69 -0
- package/dist/stories/components/{NewInput.style.js → SagInput/SagInput.style.js} +2 -2
- package/dist/stories/components/SagInput.style.js +5 -33
- package/dist/stories/components/SalesAndROI/SalesAndROI.js +89 -0
- package/dist/stories/components/SalesAndROI/SalesAndROI.stories.js +168 -0
- package/dist/stories/components/SalesAndROI/SalesAndROI.style.js +19 -0
- package/dist/stories/components/SalesAndROI.style.js +11 -103
- package/dist/stories/components/SearchInput/SearchInput.js +39 -0
- package/dist/stories/components/SearchInput/SearchInput.stories.js +44 -0
- package/dist/stories/components/SearchInput/SearchInput.style.js +12 -0
- package/dist/stories/components/SearchInput.style.js +4 -29
- package/dist/stories/components/SegmentedButton/SegmentedButton.js +122 -0
- package/dist/stories/components/SegmentedButton/SegmentedButton.stories.js +183 -0
- package/dist/stories/components/SegmentedButton/SegmentedButton.style.js +19 -0
- package/dist/stories/components/SegmentedButton.js +5 -5
- package/dist/stories/components/SegmentedButton.style.js +9 -90
- package/dist/stories/components/Select/Select.js +135 -0
- package/dist/stories/components/Select/Select.stories.js +200 -0
- package/dist/stories/components/Select/Select.style.js +19 -0
- package/dist/stories/components/Select.style.js +9 -93
- package/dist/stories/components/SingleBarLineCharts.js +5 -5
- package/dist/stories/components/SingleBarLineCharts.style.js +14 -88
- package/dist/stories/components/TabMenu/TabMenu.js +202 -0
- package/dist/stories/components/TabMenu/TabMenu.stories.js +76 -0
- package/dist/stories/components/TabMenu/TabMenu.style.js +24 -0
- package/dist/stories/components/TabMenu.js +7 -19
- package/dist/stories/components/TabMenu.style.js +14 -105
- package/dist/stories/components/Table/Table.js +195 -0
- package/dist/stories/components/Table/Table.stories.js +104 -0
- package/dist/stories/components/Table/Table.style.js +17 -0
- package/dist/stories/components/TableTooltip.js +71 -0
- package/dist/stories/components/TableTooltip.style.js +12 -0
- package/dist/stories/components/TextField/TextField.js +209 -0
- package/dist/stories/components/TextField/TextField.stories.js +162 -0
- package/dist/stories/components/TextField/TextField.style.js +11 -0
- package/dist/stories/components/TextField.style.js +3 -10
- package/dist/stories/components/TitleDescription/TitleDescription.js +272 -0
- package/dist/stories/components/TitleDescription/TitleDescription.stories.js +117 -0
- package/dist/stories/components/TitleDescription/TitleDescription.style.js +36 -0
- package/dist/stories/components/TitleDescription.style.js +28 -214
- package/dist/stories/components/Tooltip/Tooltip.js +31 -0
- package/dist/stories/components/Tooltip/Tooltip.style.js +18 -0
- package/dist/stories/components/Tooltip.js +1 -1
- package/dist/stories/components/Tooltip.style.js +5 -90
- package/dist/stories/components/TopToggleList/TopToggleList.js +46 -0
- package/dist/stories/components/TopToggleList/TopToggleList.stories.js +52 -0
- package/dist/stories/components/TopToggleList/TopToggleList.style.js +16 -0
- package/dist/stories/components/TopToggleList.style.js +8 -43
- package/dist/stories/components/TotalBenchmark/TotalBenchmark.js +97 -0
- package/dist/stories/components/TotalBenchmark/TotalBenchmark.stories.js +138 -0
- package/dist/stories/components/TotalBenchmark/TotalBenchmark.style.js +21 -0
- package/dist/stories/components/TotalBenchmark.style.js +11 -71
- package/dist/stories/components/TotalBenchmarkAreachart/TotalBenchmarkAreachart.js +342 -0
- package/dist/stories/components/TotalBenchmarkAreachart/TotalBenchmarkAreachart.stories.js +343 -0
- package/dist/stories/components/TotalBenchmarkAreachart/TotalBenchmarkAreachart.style.js +30 -0
- package/dist/stories/components/TotalBenchmarkAreachart.js +3 -3
- package/dist/stories/components/TotalBenchmarkAreachart.style.js +22 -163
- package/dist/stories/components/TotalBenchmarkArrows/TotalBenchmarkArrows.js +149 -0
- package/dist/stories/components/TotalBenchmarkArrows/TotalBenchmarkArrows.stories.js +172 -0
- package/dist/stories/components/TotalBenchmarkArrows/TotalBenchmarkArrows.style.js +24 -0
- package/dist/stories/components/TotalBenchmarkArrows.style.js +16 -100
- package/dist/stories/components/TotalBenchmarkBarchart/TotalBenchmarkBarchart.js +165 -0
- package/dist/stories/components/TotalBenchmarkBarchart/TotalBenchmarkBarchart.stories.js +185 -0
- package/dist/stories/components/TotalBenchmarkBarchart/TotalBenchmarkBarchart.style.js +20 -0
- package/dist/stories/components/TotalBenchmarkBarchart.style.js +12 -69
- package/dist/stories/components/TotalDoughnutChart/TotalDoughnutChart.js +186 -0
- package/dist/stories/components/TotalDoughnutChart/TotalDoughnutChart.stories.js +291 -0
- package/dist/stories/components/TotalDoughnutChart/TotalDoughnutChart.style.js +30 -0
- package/dist/stories/components/TotalDoughnutChart.js +3 -3
- package/dist/stories/components/TotalDoughnutChart.style.js +22 -170
- package/dist/stories/components/TotalHorizontalCharts/TotalHorizontalCharts.js +214 -0
- package/dist/stories/components/TotalHorizontalCharts/TotalHorizontalCharts.stories.js +190 -0
- package/dist/stories/components/TotalHorizontalCharts/TotalHorizontalCharts.style.js +20 -0
- package/dist/stories/components/TotalHorizontalCharts.js +3 -3
- package/dist/stories/components/TotalHorizontalCharts.style.js +12 -113
- package/dist/stories/components/TspanTooltip/TspanTooltip.js +33 -0
- package/dist/stories/components/TspanTooltip/TspanTooltip.style.js +13 -0
- package/dist/stories/components/TspanTooltip.js +3 -3
- package/dist/stories/components/TspanTooltip.style.js +5 -97
- package/dist/stories/components/TwoBarCharts/TwoBarCharts.js +202 -0
- package/dist/stories/components/TwoBarCharts/TwoBarCharts.stories.js +120 -0
- package/dist/stories/components/TwoBarCharts/TwoBarCharts.style.js +18 -0
- package/dist/stories/components/TwoBarCharts.js +2 -2
- package/dist/stories/components/TwoBarCharts.style.js +10 -52
- package/dist/stories/icons/ArrowDownIcon.js +27 -0
- package/dist/stories/icons/ArrowDropDownIcon.js +27 -0
- package/dist/stories/icons/ArrowSelectIcon.js +27 -0
- package/dist/stories/icons/ArrowUpIcon.js +27 -0
- package/dist/stories/icons/AttachedIcon.js +27 -0
- package/dist/stories/icons/BellIcon.js +27 -0
- package/dist/stories/icons/Calendar.js +20 -0
- package/dist/stories/icons/CalendarIcon.js +27 -0
- package/dist/stories/icons/CalendarInOpen.js +26 -0
- package/dist/stories/icons/CheckBoxButtonCheckedIcon.js +28 -0
- package/dist/stories/icons/CheckBoxCheckedIcon.js +28 -0
- package/dist/stories/icons/CheckBoxNotCheckedIcon.js +28 -0
- package/dist/stories/icons/ChervronLeftIcon.js +20 -0
- package/dist/stories/icons/ChervronRightIcon.js +20 -0
- package/dist/stories/icons/ClockIcon.js +27 -0
- package/dist/stories/icons/CloseIcon.js +27 -0
- package/dist/stories/icons/CloseXIcon.js +27 -0
- package/dist/stories/icons/ComboBoxArrowDownIcon.js +28 -0
- package/dist/stories/icons/ComboBoxArrowUpIcon.js +28 -0
- package/dist/stories/icons/DocumentIcon.js +48 -0
- package/dist/stories/icons/DownloadIcon.js +27 -0
- package/dist/stories/icons/Duplicate.js +28 -0
- package/dist/stories/icons/ErrorIcon.js +27 -0
- package/dist/stories/icons/ExitIcon.js +28 -0
- package/dist/stories/icons/ExportIcon.js +28 -0
- package/dist/stories/icons/EyeIcon.js +28 -0
- package/dist/stories/icons/FileIcon.js +27 -0
- package/dist/stories/icons/FilterIcon.js +36 -0
- package/dist/stories/icons/FlyIcon.js +28 -0
- package/dist/stories/icons/FoodLionChartIcon.js +42 -0
- package/dist/stories/icons/FoodLionIcon.js +3076 -0
- package/dist/stories/icons/FoodLionNewIcon.js +39 -0
- package/dist/stories/icons/GiantFoodChartIcon.js +40 -0
- package/dist/stories/icons/GiantFoodIcon.js +1976 -0
- package/dist/stories/icons/GiantFoodIcon_new.js +42 -0
- package/dist/stories/icons/HannafordChartIcon.js +40 -0
- package/dist/stories/icons/HannafordIcon.js +5017 -0
- package/dist/stories/icons/HannafordIcon_new.js +41 -0
- package/dist/stories/icons/HannafordNewIcon.js +213 -0
- package/dist/stories/icons/InfoIcon.js +28 -0
- package/dist/stories/icons/LampIcon.js +27 -0
- package/dist/stories/icons/LegendLineIcon.js +29 -0
- package/dist/stories/icons/LegendUnionIcon.js +29 -0
- package/dist/stories/icons/MaintenanceIcon.js +28 -0
- package/dist/stories/icons/MenuItemClosedIcon.js +28 -0
- package/dist/stories/icons/MenuItemOpenIcon.js +28 -0
- package/dist/stories/icons/MenuItemRightIcon.js +28 -0
- package/dist/stories/icons/MenuItemUpIcon.js +28 -0
- package/dist/stories/icons/NoDataFoundIcon.js +86 -0
- package/dist/stories/icons/OptionsIcon.js +27 -0
- package/dist/stories/icons/SearchIcon.js +27 -0
- package/dist/stories/icons/ShoppingCartIcon.js +45 -0
- package/dist/stories/icons/ShoutIcon.js +27 -0
- package/dist/stories/icons/SpotlightProductIcon.js +28 -0
- package/dist/stories/icons/StopAndShopChartIcon.js +42 -0
- package/dist/stories/icons/StopAndShopIcon.js +134 -0
- package/dist/stories/icons/StopAndShopNewIcon.js +41 -0
- package/dist/stories/icons/SucceededIcon.js +27 -0
- package/dist/stories/icons/TheGiantCompanyChartIcon.js +40 -0
- package/dist/stories/icons/TheGiantCompanyIcon.js +40 -0
- package/dist/stories/icons/TheGiantCompanyNewIcon.js +39 -0
- package/dist/stories/utils/CommonFunctions.js +78 -0
- package/dist/stories/utils/IconsHandler.style.js +3 -8
- package/package.json +1 -1
- package/dist/stories/CampaignTool/PopupContent.stories.js +0 -284
- package/dist/stories/components/BannerEventBoxTest.js +0 -42
- package/dist/stories/components/FilterButton.js +0 -53
- package/dist/stories/components/FilterButton.style.js +0 -12
- package/dist/stories/components/NewInput.js +0 -33
- package/dist/stories/components/icons/TheGiantCompanyIcon_old.js +0 -1831
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = exports.Benchmark = void 0;
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
var _Benchmark = require("./Benchmark.style");
|
|
10
|
+
var _CommonFunctions = require("../../utils/CommonFunctions");
|
|
11
|
+
var _Tooltip = _interopRequireDefault(require("../Tooltip/Tooltip"));
|
|
12
|
+
/* Benchmark */
|
|
13
|
+
const Benchmark = props => {
|
|
14
|
+
const {
|
|
15
|
+
totalValue,
|
|
16
|
+
currentValue,
|
|
17
|
+
benchmarkValue,
|
|
18
|
+
width,
|
|
19
|
+
height,
|
|
20
|
+
color,
|
|
21
|
+
linearGradientColor,
|
|
22
|
+
underAvarageColor,
|
|
23
|
+
linearGradientUnderAvarageColor,
|
|
24
|
+
backgroundColor,
|
|
25
|
+
tooltipLabel,
|
|
26
|
+
tooltipDirection
|
|
27
|
+
} = props;
|
|
28
|
+
const getCurrentValueRectangleWidth = () => {
|
|
29
|
+
if (!totalValue) return 0;
|
|
30
|
+
if (currentValue > totalValue) return width;
|
|
31
|
+
return currentValue / totalValue * width;
|
|
32
|
+
};
|
|
33
|
+
const getUnderAvarageColor = () => {
|
|
34
|
+
if (!totalValue) return backgroundColor;
|
|
35
|
+
if (currentValue > totalValue) return color;
|
|
36
|
+
let benchmarkCurrentValue;
|
|
37
|
+
if (!benchmarkValue) {
|
|
38
|
+
benchmarkCurrentValue = 0.5;
|
|
39
|
+
} else if (benchmarkValue > totalValue) {
|
|
40
|
+
benchmarkCurrentValue = 1;
|
|
41
|
+
} else {
|
|
42
|
+
benchmarkCurrentValue = benchmarkValue / totalValue;
|
|
43
|
+
}
|
|
44
|
+
if (currentValue === benchmarkValue) {
|
|
45
|
+
return color;
|
|
46
|
+
}
|
|
47
|
+
if (currentValue / totalValue <= benchmarkCurrentValue) {
|
|
48
|
+
return underAvarageColor;
|
|
49
|
+
}
|
|
50
|
+
return color;
|
|
51
|
+
};
|
|
52
|
+
const getUnderAvaragelinearGradientColor = () => {
|
|
53
|
+
if (!totalValue) return backgroundColor;
|
|
54
|
+
if (currentValue > totalValue) return linearGradientColor;
|
|
55
|
+
let benchmarkCurrentValue;
|
|
56
|
+
if (!benchmarkValue) {
|
|
57
|
+
benchmarkCurrentValue = 0.5;
|
|
58
|
+
} else if (benchmarkValue > totalValue) {
|
|
59
|
+
benchmarkCurrentValue = 1;
|
|
60
|
+
} else {
|
|
61
|
+
benchmarkCurrentValue = benchmarkValue / totalValue;
|
|
62
|
+
}
|
|
63
|
+
if (currentValue === benchmarkValue) {
|
|
64
|
+
return linearGradientColor;
|
|
65
|
+
}
|
|
66
|
+
if (currentValue / totalValue <= benchmarkCurrentValue) {
|
|
67
|
+
return linearGradientUnderAvarageColor;
|
|
68
|
+
}
|
|
69
|
+
return linearGradientColor;
|
|
70
|
+
};
|
|
71
|
+
const getBenchmarkLeft = () => {
|
|
72
|
+
if (!benchmarkValue) {
|
|
73
|
+
return width / 2;
|
|
74
|
+
}
|
|
75
|
+
if (benchmarkValue > totalValue) {
|
|
76
|
+
return width;
|
|
77
|
+
}
|
|
78
|
+
return width * (benchmarkValue / totalValue);
|
|
79
|
+
};
|
|
80
|
+
const getTooltipText = () => {
|
|
81
|
+
var _getFormattedValue, _getFormattedUnits;
|
|
82
|
+
return /*#__PURE__*/_react.default.createElement("h4", null, tooltipLabel, tooltipLabel ? ': ' : '', (_getFormattedValue = (0, _CommonFunctions.getFormattedValue)(benchmarkValue)) === null || _getFormattedValue === void 0 ? void 0 : _getFormattedValue.toString(), (_getFormattedUnits = (0, _CommonFunctions.getFormattedUnits)(benchmarkValue)) === null || _getFormattedUnits === void 0 ? void 0 : _getFormattedUnits.toString());
|
|
83
|
+
};
|
|
84
|
+
return /*#__PURE__*/_react.default.createElement(_Benchmark.ControlsContainer, {
|
|
85
|
+
id: "ControlsContainer",
|
|
86
|
+
height: height,
|
|
87
|
+
width: width
|
|
88
|
+
}, /*#__PURE__*/_react.default.createElement(_Tooltip.default, {
|
|
89
|
+
id: "Tooltip",
|
|
90
|
+
content: getTooltipText(),
|
|
91
|
+
direction: tooltipDirection
|
|
92
|
+
}, /*#__PURE__*/_react.default.createElement(_Benchmark.Controls, {
|
|
93
|
+
id: "ControlsBenchmark",
|
|
94
|
+
height: height,
|
|
95
|
+
width: width
|
|
96
|
+
}, /*#__PURE__*/_react.default.createElement(_Benchmark.BackgroundValueRectangle, {
|
|
97
|
+
id: "BackgroundValueRectangle",
|
|
98
|
+
height: height,
|
|
99
|
+
width: width,
|
|
100
|
+
color: backgroundColor
|
|
101
|
+
}), /*#__PURE__*/_react.default.createElement(_Benchmark.CurrentValueRectangle, {
|
|
102
|
+
id: "CurrentValueRectangle",
|
|
103
|
+
height: height,
|
|
104
|
+
width: getCurrentValueRectangleWidth(),
|
|
105
|
+
color: getUnderAvarageColor(),
|
|
106
|
+
lineargradientcolor: getUnderAvaragelinearGradientColor()
|
|
107
|
+
}), /*#__PURE__*/_react.default.createElement(_Benchmark.AvarageDelimiter, {
|
|
108
|
+
id: "AvarageDelimiter",
|
|
109
|
+
height: height + 4,
|
|
110
|
+
width: 0,
|
|
111
|
+
top: -2,
|
|
112
|
+
left: getBenchmarkLeft()
|
|
113
|
+
}))));
|
|
114
|
+
};
|
|
115
|
+
exports.Benchmark = Benchmark;
|
|
116
|
+
var _default = exports.default = Benchmark;
|
|
117
|
+
Benchmark.defaultProps = {
|
|
118
|
+
totalValue: 100,
|
|
119
|
+
currentValue: 60,
|
|
120
|
+
benchmarkValue: 500,
|
|
121
|
+
width: 100,
|
|
122
|
+
height: 12,
|
|
123
|
+
color: '#79DB95',
|
|
124
|
+
linearGradientColor: '#C3EFD0',
|
|
125
|
+
underAvarageColor: '#FD5959',
|
|
126
|
+
linearGradientUnderAvarageColor: '#FDB1B1',
|
|
127
|
+
backgroundColor: '#F2F2F2',
|
|
128
|
+
tooltipLabel: 'Benchmark',
|
|
129
|
+
tooltipDirection: 'bottom'
|
|
130
|
+
};
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = exports.LessAvarage = exports.GreaterAvarage = void 0;
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
var _Benchmark = require("./Benchmark");
|
|
10
|
+
var _default = exports.default = {
|
|
11
|
+
title: 'SAG BI/Benchmark',
|
|
12
|
+
component: _Benchmark.Benchmark,
|
|
13
|
+
tags: ['autodocs'],
|
|
14
|
+
argTypes: {
|
|
15
|
+
currentValue: {
|
|
16
|
+
name: 'currentValue',
|
|
17
|
+
control: {
|
|
18
|
+
type: 'number',
|
|
19
|
+
min: 0,
|
|
20
|
+
max: 100000000000000
|
|
21
|
+
},
|
|
22
|
+
description: 'curent value (<=100%) '
|
|
23
|
+
},
|
|
24
|
+
totalValue: {
|
|
25
|
+
name: 'totalValue',
|
|
26
|
+
control: {
|
|
27
|
+
type: 'number',
|
|
28
|
+
min: 0,
|
|
29
|
+
max: 100000000000000
|
|
30
|
+
},
|
|
31
|
+
description: 'total value (100%) '
|
|
32
|
+
},
|
|
33
|
+
benchmarkValue: {
|
|
34
|
+
name: 'benchmarkValue',
|
|
35
|
+
control: {
|
|
36
|
+
type: 'number',
|
|
37
|
+
min: 0,
|
|
38
|
+
max: 100000000000000
|
|
39
|
+
},
|
|
40
|
+
description: 'benchmark value - defines benchmark line relative position '
|
|
41
|
+
},
|
|
42
|
+
width: {
|
|
43
|
+
name: 'width',
|
|
44
|
+
control: {
|
|
45
|
+
type: 'number',
|
|
46
|
+
min: 0,
|
|
47
|
+
max: 600
|
|
48
|
+
},
|
|
49
|
+
description: 'width of the control (in px)'
|
|
50
|
+
},
|
|
51
|
+
height: {
|
|
52
|
+
name: 'height',
|
|
53
|
+
control: {
|
|
54
|
+
type: 'number',
|
|
55
|
+
min: 0,
|
|
56
|
+
max: 600
|
|
57
|
+
},
|
|
58
|
+
description: 'height of the control (in px)'
|
|
59
|
+
},
|
|
60
|
+
color: {
|
|
61
|
+
name: 'color',
|
|
62
|
+
description: 'Sets the color of current value when it is greater then 50% of total value',
|
|
63
|
+
control: {
|
|
64
|
+
type: 'color',
|
|
65
|
+
presetColors: ['#ffffff', '#ff0000', '#00ff00', '#0000ff']
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
linearGradientColor: {
|
|
69
|
+
name: 'linearGradientColor',
|
|
70
|
+
description: 'Sets the linear-Gradient color of current value when it is greater then 50% of total value',
|
|
71
|
+
control: {
|
|
72
|
+
type: 'color',
|
|
73
|
+
presetColors: ['#ffffff', '#ff0000', '#00ff00', '#0000ff']
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
underAvarageColor: {
|
|
77
|
+
name: 'underAvarageColor',
|
|
78
|
+
description: 'Sets the color of current value when it is under 50% of total value',
|
|
79
|
+
control: {
|
|
80
|
+
type: 'color',
|
|
81
|
+
presetColors: ['#ffffff', '#ff0000', '#00ff00', '#0000ff']
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
linearGradientUnderAvarageColor: {
|
|
85
|
+
name: 'linearGradientUnderAvarageColor',
|
|
86
|
+
description: 'Sets the linear-Gradient color of current value when it is under 50% of total value',
|
|
87
|
+
control: {
|
|
88
|
+
type: 'color',
|
|
89
|
+
presetColors: ['#ffffff', '#ff0000', '#00ff00', '#0000ff']
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
backgroundColor: {
|
|
93
|
+
name: 'backgroundColor',
|
|
94
|
+
description: 'Sets the background color of the control',
|
|
95
|
+
control: {
|
|
96
|
+
type: 'color',
|
|
97
|
+
presetColors: ['#ffffff', '#ff0000', '#00ff00', '#0000ff']
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
tooltipLabel: {
|
|
101
|
+
name: 'tooltipLabel',
|
|
102
|
+
control: {
|
|
103
|
+
type: 'text'
|
|
104
|
+
},
|
|
105
|
+
description: 'label of tooltip'
|
|
106
|
+
},
|
|
107
|
+
tooltipDirection: {
|
|
108
|
+
name: 'tooltipDirection',
|
|
109
|
+
control: {
|
|
110
|
+
type: 'radio'
|
|
111
|
+
},
|
|
112
|
+
options: ['top', 'left', 'right', 'bottom'],
|
|
113
|
+
description: 'tooltip direction'
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
};
|
|
117
|
+
const GreaterAvarage = exports.GreaterAvarage = {
|
|
118
|
+
args: {
|
|
119
|
+
totalValue: 100000,
|
|
120
|
+
currentValue: 60000,
|
|
121
|
+
benchmarkValue: 30000,
|
|
122
|
+
width: 100,
|
|
123
|
+
height: 12,
|
|
124
|
+
color: '#79DB95',
|
|
125
|
+
linearGradientColor: '#C3EFD0',
|
|
126
|
+
underAvarageColor: '#FD5959',
|
|
127
|
+
linearGradientUnderAvarageColor: '#FDB1B1',
|
|
128
|
+
backgroundColor: '#F2F2F2',
|
|
129
|
+
tooltipLabel: 'Benchmark',
|
|
130
|
+
tooltipDirection: 'bottom'
|
|
131
|
+
}
|
|
132
|
+
};
|
|
133
|
+
const LessAvarage = exports.LessAvarage = {
|
|
134
|
+
args: {
|
|
135
|
+
totalValue: 1000,
|
|
136
|
+
currentValue: 400,
|
|
137
|
+
benchmarkValue: 500,
|
|
138
|
+
width: 100,
|
|
139
|
+
height: 12,
|
|
140
|
+
color: '#79DB95',
|
|
141
|
+
linearGradientColor: '#C3EFD0',
|
|
142
|
+
underAvarageColor: '#FD5959',
|
|
143
|
+
linearGradientUnderAvarageColor: '#FDB1B1',
|
|
144
|
+
backgroundColor: '#F2F2F2',
|
|
145
|
+
tooltipLabel: 'Value',
|
|
146
|
+
tooltipDirection: 'right'
|
|
147
|
+
}
|
|
148
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.CurrentValueRectangle = exports.ControlsContainer = exports.Controls = exports.BackgroundValueRectangle = exports.AvarageDelimiter = 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;
|
|
11
|
+
const ControlsContainer = exports.ControlsContainer = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n position: relative;\n margin: 0px 0 0px;\n font-family: \"Poppins\", sans-serif;\n font-style: normal;\n width: ", ";\n height: ", ";\n //box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);\n border-radius: 100px;\n //border: 1px solid red;\n align-items: center;\n"])), props => props.width.toString().concat('', 'px'), props => props.height.toString().concat('', 'px'));
|
|
12
|
+
const Controls = exports.Controls = _styledComponents.default.div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n position: relative;\n border-radius: 100px;\n width: ", ";\n height: ", ";\n //background: #ffffff;\n //border: 1px solid blue;\n"])), props => props.width.toString().concat('', 'px'), props => props.height.toString().concat('', 'px'));
|
|
13
|
+
const BackgroundValueRectangle = exports.BackgroundValueRectangle = _styledComponents.default.div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n position: absolute;\n width: ", ";\n height: ", ";\n top: 0px;\n left: 0px;\n border-radius: 100px;\n background: ", ";\n //border: 1px solid orange;\n"])), props => props.width.toString().concat('', 'px'), props => props.height.toString().concat('', 'px'), props => props.color);
|
|
14
|
+
const CurrentValueRectangle = exports.CurrentValueRectangle = _styledComponents.default.div(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n position: absolute;\n width: ", ";\n height: ", ";\n top: 0px;\n left: 0px;\n border-radius: 100px;\n background: linear-gradient(\n 90deg,\n ", " 0%,\n ", " 100%\n );\n //border: 1px solid green;\n"])), props => props.width.toString().concat('', 'px'), props => props.height.toString().concat('', 'px'), props => props.lineargradientcolor, props => props.color);
|
|
15
|
+
const AvarageDelimiter = exports.AvarageDelimiter = _styledComponents.default.div(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n position: absolute;\n height: ", ";\n width: ", ";\n top: ", ";\n left: ", ";\n border: 1px solid #212121;\n"])), props => props.height.toString().concat('', 'px'), props => props.width.toString().concat('', 'px'), props => props.top.toString().concat('', 'px'), props => props.left.toString().concat('', 'px'));
|
|
@@ -5,57 +5,11 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.CurrentValueRectangle = exports.ControlsContainer = exports.Controls = exports.BackgroundValueRectangle = exports.AvarageDelimiter = void 0;
|
|
8
|
+
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/taggedTemplateLiteral"));
|
|
8
9
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
9
|
-
|
|
10
|
-
display: flex;
|
|
11
|
-
position: relative;
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
width: ${props => props.width.toString().concat('', 'px')};
|
|
16
|
-
height: ${props => props.height.toString().concat('', 'px')};
|
|
17
|
-
//box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
|
|
18
|
-
border-radius: 100px;
|
|
19
|
-
//border: 1px solid red;
|
|
20
|
-
align-items: center;
|
|
21
|
-
`;
|
|
22
|
-
const Controls = exports.Controls = _styledComponents.default.div`
|
|
23
|
-
position: relative;
|
|
24
|
-
border-radius: 100px;
|
|
25
|
-
width: ${props => props.width.toString().concat('', 'px')};
|
|
26
|
-
height: ${props => props.height.toString().concat('', 'px')};
|
|
27
|
-
//background: #ffffff;
|
|
28
|
-
//border: 1px solid blue;
|
|
29
|
-
`;
|
|
30
|
-
const BackgroundValueRectangle = exports.BackgroundValueRectangle = _styledComponents.default.div`
|
|
31
|
-
position: absolute;
|
|
32
|
-
width: ${props => props.width.toString().concat('', 'px')};
|
|
33
|
-
height: ${props => props.height.toString().concat('', 'px')};
|
|
34
|
-
top: 0px;
|
|
35
|
-
left: 0px;
|
|
36
|
-
border-radius: 100px;
|
|
37
|
-
background: ${props => props.color};
|
|
38
|
-
//border: 1px solid orange;
|
|
39
|
-
`;
|
|
40
|
-
const CurrentValueRectangle = exports.CurrentValueRectangle = _styledComponents.default.div`
|
|
41
|
-
position: absolute;
|
|
42
|
-
width: ${props => props.width.toString().concat('', 'px')};
|
|
43
|
-
height: ${props => props.height.toString().concat('', 'px')};
|
|
44
|
-
top: 0px;
|
|
45
|
-
left: 0px;
|
|
46
|
-
border-radius: 100px;
|
|
47
|
-
background: linear-gradient(
|
|
48
|
-
90deg,
|
|
49
|
-
${props => props.lineargradientcolor} 0%,
|
|
50
|
-
${props => props.color} 100%
|
|
51
|
-
);
|
|
52
|
-
//border: 1px solid green;
|
|
53
|
-
`;
|
|
54
|
-
const AvarageDelimiter = exports.AvarageDelimiter = _styledComponents.default.div`
|
|
55
|
-
position: absolute;
|
|
56
|
-
height: ${props => props.height.toString().concat('', 'px')};
|
|
57
|
-
width: ${props => props.width.toString().concat('', 'px')};
|
|
58
|
-
top: ${props => props.top.toString().concat('', 'px')};
|
|
59
|
-
left: ${props => props.left.toString().concat('', 'px')};
|
|
60
|
-
border: 1px solid #212121;
|
|
61
|
-
`;
|
|
10
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
|
|
11
|
+
const ControlsContainer = exports.ControlsContainer = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n position: relative;\n margin: 0px 0 0px;\n font-family: \"Poppins\", sans-serif;\n font-style: normal;\n width: ", ";\n height: ", ";\n //box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);\n border-radius: 100px;\n //border: 1px solid red;\n align-items: center;\n"])), props => props.width.toString().concat('', 'px'), props => props.height.toString().concat('', 'px'));
|
|
12
|
+
const Controls = exports.Controls = _styledComponents.default.div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n position: relative;\n border-radius: 100px;\n width: ", ";\n height: ", ";\n //background: #ffffff;\n //border: 1px solid blue;\n"])), props => props.width.toString().concat('', 'px'), props => props.height.toString().concat('', 'px'));
|
|
13
|
+
const BackgroundValueRectangle = exports.BackgroundValueRectangle = _styledComponents.default.div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n position: absolute;\n width: ", ";\n height: ", ";\n top: 0px;\n left: 0px;\n border-radius: 100px;\n background: ", ";\n //border: 1px solid orange;\n"])), props => props.width.toString().concat('', 'px'), props => props.height.toString().concat('', 'px'), props => props.color);
|
|
14
|
+
const CurrentValueRectangle = exports.CurrentValueRectangle = _styledComponents.default.div(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n position: absolute;\n width: ", ";\n height: ", ";\n top: 0px;\n left: 0px;\n border-radius: 100px;\n background: linear-gradient(\n 90deg,\n ", " 0%,\n ", " 100%\n );\n //border: 1px solid green;\n"])), props => props.width.toString().concat('', 'px'), props => props.height.toString().concat('', 'px'), props => props.lineargradientcolor, props => props.color);
|
|
15
|
+
const AvarageDelimiter = exports.AvarageDelimiter = _styledComponents.default.div(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n position: absolute;\n height: ", ";\n width: ", ";\n top: ", ";\n left: ", ";\n border: 1px solid #212121;\n"])), props => props.height.toString().concat('', 'px'), props => props.width.toString().concat('', 'px'), props => props.top.toString().concat('', 'px'), props => props.left.toString().concat('', 'px'));
|
|
@@ -0,0 +1,217 @@
|
|
|
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 = exports.Button = void 0;
|
|
8
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
+
var _Button = require("./Button.style");
|
|
10
|
+
var _FilterIcon = require("../../icons/FilterIcon");
|
|
11
|
+
var _OptionsIcon = require("../../icons/OptionsIcon");
|
|
12
|
+
var _DownloadIcon = require("../../icons/DownloadIcon");
|
|
13
|
+
var _DocumentIcon = require("../../icons/DocumentIcon");
|
|
14
|
+
var _FlyIcon = require("../../icons/FlyIcon");
|
|
15
|
+
var _BellIcon = require("../../icons/BellIcon");
|
|
16
|
+
var _MaintenanceIcon = require("../../icons/MaintenanceIcon");
|
|
17
|
+
var _ExitIcon = require("../../icons/ExitIcon");
|
|
18
|
+
var _EyeIcon = require("../../icons/EyeIcon");
|
|
19
|
+
const Button = props => {
|
|
20
|
+
const {
|
|
21
|
+
text,
|
|
22
|
+
type,
|
|
23
|
+
size,
|
|
24
|
+
height,
|
|
25
|
+
width,
|
|
26
|
+
disabled,
|
|
27
|
+
textColor,
|
|
28
|
+
backgroundColor,
|
|
29
|
+
borderColor,
|
|
30
|
+
hoverTextColor,
|
|
31
|
+
hoverBackgroundColor,
|
|
32
|
+
hoverBorderColor,
|
|
33
|
+
disabledTextColor,
|
|
34
|
+
disabledBackgroundColor,
|
|
35
|
+
disabledBorderColor,
|
|
36
|
+
leftIcon,
|
|
37
|
+
rightIcon,
|
|
38
|
+
onClick,
|
|
39
|
+
isSubmitButton
|
|
40
|
+
} = props;
|
|
41
|
+
const [clicked, setClicked] = (0, _react.useState)(false);
|
|
42
|
+
const [hover, setHover] = (0, _react.useState)(false);
|
|
43
|
+
const handleSubmitButtonOnClick = () => {
|
|
44
|
+
setClicked(true);
|
|
45
|
+
onClick("SubmitButtonOnClick: ".concat(text));
|
|
46
|
+
setTimeout(() => {
|
|
47
|
+
setClicked(false);
|
|
48
|
+
}, 300);
|
|
49
|
+
};
|
|
50
|
+
const handleButtonClick = event => {
|
|
51
|
+
setClicked(true);
|
|
52
|
+
onClick(event);
|
|
53
|
+
setTimeout(() => {
|
|
54
|
+
setClicked(false);
|
|
55
|
+
}, 300);
|
|
56
|
+
};
|
|
57
|
+
const getIcon = icon => {
|
|
58
|
+
const iconHeight = '12px';
|
|
59
|
+
const iconWidth = '12px';
|
|
60
|
+
const newTextColor = textColor || (type === 'secondary' ? '#212121' : '#ffffff');
|
|
61
|
+
const newHoverTextColor = hoverTextColor || (type === 'secondary' ? '#229E38' : '#ffffff');
|
|
62
|
+
const newDisabledTextColor = disabledTextColor || '#B1B1B1';
|
|
63
|
+
const newEnabledTextColor = hover ? newHoverTextColor : newTextColor;
|
|
64
|
+
const color = disabled ? newDisabledTextColor : newEnabledTextColor;
|
|
65
|
+
switch (icon.toLowerCase()) {
|
|
66
|
+
case 'filter':
|
|
67
|
+
return /*#__PURE__*/_react.default.createElement(_Button.IconWrapper, {
|
|
68
|
+
className: "FilterIcon"
|
|
69
|
+
}, /*#__PURE__*/_react.default.createElement(_FilterIcon.FilterIcon, {
|
|
70
|
+
height: iconHeight,
|
|
71
|
+
width: iconWidth,
|
|
72
|
+
color: color
|
|
73
|
+
}));
|
|
74
|
+
case 'options':
|
|
75
|
+
return /*#__PURE__*/_react.default.createElement(_Button.IconWrapper, {
|
|
76
|
+
className: "OptionsIcon"
|
|
77
|
+
}, /*#__PURE__*/_react.default.createElement(_OptionsIcon.OptionsIcon, {
|
|
78
|
+
height: iconHeight,
|
|
79
|
+
width: iconWidth,
|
|
80
|
+
color: color
|
|
81
|
+
}));
|
|
82
|
+
case 'download':
|
|
83
|
+
return /*#__PURE__*/_react.default.createElement(_Button.IconWrapper, {
|
|
84
|
+
className: "DownloadIcon"
|
|
85
|
+
}, /*#__PURE__*/_react.default.createElement(_DownloadIcon.DownloadIcon, {
|
|
86
|
+
height: iconHeight,
|
|
87
|
+
width: iconWidth,
|
|
88
|
+
color: color
|
|
89
|
+
}));
|
|
90
|
+
case 'document':
|
|
91
|
+
return /*#__PURE__*/_react.default.createElement(_Button.IconWrapper, {
|
|
92
|
+
className: "DocumentIcon"
|
|
93
|
+
}, /*#__PURE__*/_react.default.createElement(_DocumentIcon.DocumentIcon, {
|
|
94
|
+
height: iconHeight,
|
|
95
|
+
width: iconWidth,
|
|
96
|
+
color: color
|
|
97
|
+
}));
|
|
98
|
+
case 'fly':
|
|
99
|
+
return /*#__PURE__*/_react.default.createElement(_Button.IconWrapper, {
|
|
100
|
+
className: "FlyIcon"
|
|
101
|
+
}, /*#__PURE__*/_react.default.createElement(_FlyIcon.FlyIcon, {
|
|
102
|
+
height: iconHeight,
|
|
103
|
+
width: iconWidth,
|
|
104
|
+
color: color
|
|
105
|
+
}));
|
|
106
|
+
case 'bell':
|
|
107
|
+
return /*#__PURE__*/_react.default.createElement(_Button.IconWrapper, {
|
|
108
|
+
className: "BellIcon"
|
|
109
|
+
}, /*#__PURE__*/_react.default.createElement(_BellIcon.BellIcon, {
|
|
110
|
+
height: iconHeight,
|
|
111
|
+
width: iconWidth,
|
|
112
|
+
color: color
|
|
113
|
+
}));
|
|
114
|
+
case 'maintenance':
|
|
115
|
+
return /*#__PURE__*/_react.default.createElement(_Button.IconWrapper, {
|
|
116
|
+
className: "MaintenanceIcon"
|
|
117
|
+
}, /*#__PURE__*/_react.default.createElement(_MaintenanceIcon.MaintenanceIcon, {
|
|
118
|
+
height: iconHeight,
|
|
119
|
+
width: iconWidth,
|
|
120
|
+
color: color
|
|
121
|
+
}));
|
|
122
|
+
case 'exit':
|
|
123
|
+
return /*#__PURE__*/_react.default.createElement(_Button.IconWrapper, {
|
|
124
|
+
className: "ExitIcon"
|
|
125
|
+
}, /*#__PURE__*/_react.default.createElement(_ExitIcon.ExitIcon, {
|
|
126
|
+
height: iconHeight,
|
|
127
|
+
width: iconWidth,
|
|
128
|
+
color: color
|
|
129
|
+
}));
|
|
130
|
+
case 'eye':
|
|
131
|
+
return /*#__PURE__*/_react.default.createElement(_Button.IconWrapper, {
|
|
132
|
+
className: "EyeIcon"
|
|
133
|
+
}, /*#__PURE__*/_react.default.createElement(_EyeIcon.EyeIcon, {
|
|
134
|
+
height: iconHeight,
|
|
135
|
+
width: iconWidth,
|
|
136
|
+
color: color
|
|
137
|
+
}));
|
|
138
|
+
default:
|
|
139
|
+
return '';
|
|
140
|
+
}
|
|
141
|
+
};
|
|
142
|
+
const getLeftIcon = () => {
|
|
143
|
+
if (!leftIcon || leftIcon === 'none') return '';
|
|
144
|
+
return getIcon(leftIcon);
|
|
145
|
+
};
|
|
146
|
+
const getRightIcon = () => {
|
|
147
|
+
if (!rightIcon || rightIcon === 'none') return '';
|
|
148
|
+
return getIcon(rightIcon);
|
|
149
|
+
};
|
|
150
|
+
return /*#__PURE__*/_react.default.createElement(_Button.ButtonContainer, {
|
|
151
|
+
className: "ButtonContainer",
|
|
152
|
+
width: width || null,
|
|
153
|
+
height: height || (size === 'small' ? '33px' : '45px')
|
|
154
|
+
}, isSubmitButton ? /*#__PURE__*/_react.default.createElement(_Button.InputCommit, {
|
|
155
|
+
className: clicked ? 'InputCommit-clicked' : 'InputCommit',
|
|
156
|
+
value: text,
|
|
157
|
+
type: "submit",
|
|
158
|
+
width: width || null,
|
|
159
|
+
height: height || (size === 'small' ? '33px' : '45px'),
|
|
160
|
+
disabled: disabled,
|
|
161
|
+
text_color: textColor || (type === 'secondary' ? '#212121' : '#ffffff'),
|
|
162
|
+
background_color: backgroundColor || (type === 'secondary' ? '#ffffff' : '#229E38'),
|
|
163
|
+
border_color: borderColor || (type === 'secondary' ? '#B1B1B1' : '#229E38'),
|
|
164
|
+
hover_text_color: hoverTextColor || (type === 'secondary' ? '#229E38' : '#ffffff'),
|
|
165
|
+
hover_background_color: hoverBackgroundColor || (type === 'secondary' ? '#E8F5EB' : '#92CF17'),
|
|
166
|
+
hover_border_color: hoverBorderColor || (type === 'secondary' ? '#229E38' : '#92CF17'),
|
|
167
|
+
disabled_text_color: disabledTextColor || '#B1B1B1',
|
|
168
|
+
disabled_background_color: disabledBackgroundColor || (type === 'secondary' ? '#ffffff' : '#E3E4E5'),
|
|
169
|
+
disabled_border_color: disabledBorderColor || '#E3E4E5',
|
|
170
|
+
padding: size === 'small' ? '0 16px' : '0 20px',
|
|
171
|
+
onClick: !disabled ? handleSubmitButtonOnClick : null
|
|
172
|
+
}) : /*#__PURE__*/_react.default.createElement(_Button.ButtonItem, {
|
|
173
|
+
className: clicked ? 'ButtonItem-clicked' : 'ButtonItem',
|
|
174
|
+
onMouseEnter: () => setHover(true),
|
|
175
|
+
onMouseLeave: () => setHover(false),
|
|
176
|
+
onClick: event => !disabled ? handleButtonClick(event) : null,
|
|
177
|
+
width: width || null,
|
|
178
|
+
height: height || (size === 'small' ? '33px' : '45px'),
|
|
179
|
+
disabled: disabled,
|
|
180
|
+
text_color: textColor || (type === 'secondary' ? '#212121' : '#ffffff'),
|
|
181
|
+
background_color: backgroundColor || (type === 'secondary' ? '#ffffff' : '#229E38'),
|
|
182
|
+
border_color: borderColor || (type === 'secondary' ? '#B1B1B1' : '#229E38'),
|
|
183
|
+
hover_text_color: hoverTextColor || (type === 'secondary' ? '#229E38' : '#ffffff'),
|
|
184
|
+
hover_background_color: hoverBackgroundColor || (type === 'secondary' ? '#E8F5EB' : '#92CF17'),
|
|
185
|
+
hover_border_color: hoverBorderColor || (type === 'secondary' ? '#229E38' : '#92CF17'),
|
|
186
|
+
disabled_text_color: disabledTextColor || '#B1B1B1',
|
|
187
|
+
disabled_background_color: disabledBackgroundColor || (type === 'secondary' ? '#ffffff' : '#E3E4E5'),
|
|
188
|
+
disabled_border_color: disabledBorderColor || '#E3E4E5',
|
|
189
|
+
padding: size === 'small' ? '0 16px' : '0 20px'
|
|
190
|
+
}, getLeftIcon(), /*#__PURE__*/_react.default.createElement(_Button.Label, {
|
|
191
|
+
className: "Label",
|
|
192
|
+
disabled: disabled
|
|
193
|
+
}, text), getRightIcon()));
|
|
194
|
+
};
|
|
195
|
+
exports.Button = Button;
|
|
196
|
+
var _default = exports.default = Button;
|
|
197
|
+
Button.defaultProps = {
|
|
198
|
+
text: '',
|
|
199
|
+
type: 'primary',
|
|
200
|
+
size: 'small',
|
|
201
|
+
height: '',
|
|
202
|
+
width: '',
|
|
203
|
+
disabled: false,
|
|
204
|
+
textColor: '',
|
|
205
|
+
backgroundColor: '',
|
|
206
|
+
borderColor: '',
|
|
207
|
+
hoverTextColor: '',
|
|
208
|
+
hoverBackgroundColor: '',
|
|
209
|
+
hoverBorderColor: '',
|
|
210
|
+
disabledTextColor: '',
|
|
211
|
+
disabledBackgroundColor: '',
|
|
212
|
+
disabledBorderColor: '',
|
|
213
|
+
onClick: () => {},
|
|
214
|
+
leftIcon: 'none',
|
|
215
|
+
rightIcon: 'none',
|
|
216
|
+
isSubmitButton: false
|
|
217
|
+
};
|