sag_components 2.0.0-beta164 → 2.0.0-beta166

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/index.d.ts CHANGED
@@ -1534,7 +1534,7 @@ declare function ItemManagerPanel({ width, height, disableSection, onSendForms,
1534
1534
  * @param {React.ReactNode} props.children - Drawer content
1535
1535
  * @param {number} [props.widthPercent=70] - Width of the drawer as a percentage of the viewport width
1536
1536
  */
1537
- declare function ModalDrawer({ open, onClose, children, widthPercent }: {
1537
+ declare function ModalDrawer({ open, height, onClose, children, widthPercent }: {
1538
1538
  open: boolean;
1539
1539
  onClose: Function;
1540
1540
  children: React.ReactNode;
@@ -1648,4 +1648,6 @@ declare namespace RangePicker {
1648
1648
  }
1649
1649
  }
1650
1650
 
1651
- export { AdvancedThresholds, Analytics, AreaChart, BannerEventBoxList, BarChart, BarChartTwoRows, BarChartWithAreaChart, BarChartsByWeeks, BatteryChart, BreakdownPanel, BrushChart, BubbleChart, Budgets, Build, Button, Campaigns, CollapseData, CollapseHeader, ContainerTable, Coupons, CustomerSegments, Dashboard, DialogOverlay, DoubleBarSingleLine, DoublePanelDataRow, DownloadProgress, DropdownNew, EventDetailsCard, EventList, Execute, FilterPanel, FilterPop, GroupBuilder, Heatmap, IconButton, Input, InsightsCarousel, ItemManagerPanel, ItemsStores, LinkButton, LinnerDataBox, MarketShareDescription, MenuRoute, MessageBox, ModalDrawer, ModalWithOverlay, OneColumnContainer, OverlayDropdown, PerformanceAnalyticsLegend, PieChart, PopupCharts, PreTestWhatIf, QuickFilter, QuickFilterCards, RangePicker, RangePop, ReportTable, RulesEngine, SampleRunEngine, SearchInput, SingleBarLineCharts, SortPop, TabMenu, Table, ToasterMessageBox, ToggleSwitch, Tooltip, TopToggleList, TotalDoughnutChart, TotalHorizontalCharts, Track, TwoBarCharts, WeeksPicker };
1651
+ declare function Tag(props: any): react_jsx_runtime.JSX.Element;
1652
+
1653
+ export { AdvancedThresholds, Analytics, AreaChart, BannerEventBoxList, BarChart, BarChartTwoRows, BarChartWithAreaChart, BarChartsByWeeks, BatteryChart, BreakdownPanel, BrushChart, BubbleChart, Budgets, Build, Button, Campaigns, CollapseData, CollapseHeader, ContainerTable, Coupons, CustomerSegments, Dashboard, DialogOverlay, DoubleBarSingleLine, DoublePanelDataRow, DownloadProgress, DropdownNew, EventDetailsCard, EventList, Execute, FilterPanel, FilterPop, GroupBuilder, Heatmap, IconButton, Input, InsightsCarousel, ItemManagerPanel, ItemsStores, LinkButton, LinnerDataBox, MarketShareDescription, MenuRoute, MessageBox, ModalDrawer, ModalWithOverlay, OneColumnContainer, OverlayDropdown, PerformanceAnalyticsLegend, PieChart, PopupCharts, PreTestWhatIf, QuickFilter, QuickFilterCards, RangePicker, RangePop, ReportTable, RulesEngine, SampleRunEngine, SearchInput, SingleBarLineCharts, SortPop, TabMenu, Table, Tag, ToasterMessageBox, ToggleSwitch, Tooltip, TopToggleList, TotalDoughnutChart, TotalHorizontalCharts, Track, TwoBarCharts, WeeksPicker };
package/dist/index.esm.js CHANGED
@@ -3149,17 +3149,17 @@ const UploadIcon = _ref => {
3149
3149
 
3150
3150
  const UploadIconV2 = _ref => {
3151
3151
  let {
3152
- color = '"#066768"',
3152
+ color = '#066768',
3153
3153
  width = '14',
3154
3154
  height = '14'
3155
3155
  } = _ref;
3156
- return /*#__PURE__*/React.createElement("svg", {
3156
+ return /*#__PURE__*/React$1.createElement("svg", {
3157
3157
  width: width,
3158
3158
  height: height,
3159
3159
  viewBox: "0 0 14 14",
3160
3160
  fill: "none",
3161
3161
  xmlns: "http://www.w3.org/2000/svg"
3162
- }, /*#__PURE__*/React.createElement("path", {
3162
+ }, /*#__PURE__*/React$1.createElement("path", {
3163
3163
  d: "M7.4175 1.75616V9.91557C7.4175 10.1447 7.23005 10.3321 7.00094 10.3321C6.77183 10.3321 6.58437 10.1447 6.58437 9.91557V1.75616L3.96263 4.3779C3.80122 4.53931 3.53566 4.53931 3.37424 4.3779C3.21282 4.21648 3.21282 3.95092 3.37424 3.7895L6.70674 0.457001C6.86816 0.295583 7.13372 0.295583 7.29513 0.457001L10.6276 3.7895C10.7891 3.95092 10.7891 4.21648 10.6276 4.3779C10.4662 4.53931 10.2007 4.53931 10.0392 4.3779L7.4175 1.75616ZM5.75125 9.49901H2.00219C1.54137 9.49901 1.16906 9.87131 1.16906 10.3321V11.9984C1.16906 12.4592 1.54137 12.8315 2.00219 12.8315H11.9997C12.4605 12.8315 12.8328 12.4592 12.8328 11.9984V10.3321C12.8328 9.87131 12.4605 9.49901 11.9997 9.49901H8.25063V8.66589H11.9997C12.9187 8.66589 13.6659 9.4131 13.6659 10.3321V11.9984C13.6659 12.9174 12.9187 13.6646 11.9997 13.6646H2.00219C1.08315 13.6646 0.335938 12.9174 0.335938 11.9984V10.3321C0.335938 9.4131 1.08315 8.66589 2.00219 8.66589H5.75125V9.49901ZM10.3334 11.1653C10.3334 10.9995 10.3993 10.8406 10.5164 10.7234C10.6336 10.6062 10.7926 10.5404 10.9583 10.5404C11.124 10.5404 11.2829 10.6062 11.4001 10.7234C11.5173 10.8406 11.5831 10.9995 11.5831 11.1653C11.5831 11.331 11.5173 11.4899 11.4001 11.6071C11.2829 11.7243 11.124 11.7901 10.9583 11.7901C10.7926 11.7901 10.6336 11.7243 10.5164 11.6071C10.3993 11.4899 10.3334 11.331 10.3334 11.1653Z",
3164
3164
  fill: color
3165
3165
  }));
@@ -34705,15 +34705,16 @@ css`
34705
34705
  * • onApply(start,end) – callback, both numbers (inclusive)
34706
34706
  * • onCancel() – callback
34707
34707
  */
34708
- const WeeksCalendar = ({
34709
- year,
34710
- defaultStartWeek = null,
34711
- defaultEndWeek = null,
34712
- backgroundColor = "#066768",
34713
- hoverBackgroundColor = "#E6F0F0",
34714
- onApply,
34715
- onCancel
34716
- }) => {
34708
+ const WeeksCalendar = _ref => {
34709
+ let {
34710
+ year,
34711
+ defaultStartWeek = null,
34712
+ defaultEndWeek = null,
34713
+ backgroundColor = "#066768",
34714
+ hoverBackgroundColor = "#E6F0F0",
34715
+ onApply,
34716
+ onCancel
34717
+ } = _ref;
34717
34718
  // state -------------------------------------------------
34718
34719
  const [startWeek, setStartWeek] = useState(defaultStartWeek);
34719
34720
  const [endWeek, setEndWeek] = useState(defaultEndWeek);
@@ -35679,9 +35680,9 @@ const ToggleSlider = styled.span`
35679
35680
  }
35680
35681
  `;
35681
35682
 
35682
- /**
35683
- * ToggleSwitch component for on/off states.
35684
- * Supports small/large sizes and disabled state.
35683
+ /**
35684
+ * ToggleSwitch component for on/off states.
35685
+ * Supports small/large sizes and disabled state.
35685
35686
  */
35686
35687
  function ToggleSwitch(_ref) {
35687
35688
  let {
@@ -38503,7 +38504,7 @@ const DisabledTrashIconWrapper$1 = styled.div`
38503
38504
  color: #d9d9d9;
38504
38505
  }
38505
38506
  `;
38506
- const StatusCell = styled.div`
38507
+ const StatusCell$1 = styled.div`
38507
38508
  font-size: 12px;
38508
38509
  font-weight: 500;
38509
38510
  display: flex;
@@ -39213,7 +39214,7 @@ const TableBody = ({
39213
39214
  case 'status':
39214
39215
  const statusObj = statuses.find(status => status.status === value) || {};
39215
39216
  const [palette0, palette1] = statusObj.palette;
39216
- return /*#__PURE__*/React$1.createElement(StatusCell, {
39217
+ return /*#__PURE__*/React$1.createElement(StatusCell$1, {
39217
39218
  color: palette1
39218
39219
  }, /*#__PURE__*/React$1.createElement(StatusCellCircle, {
39219
39220
  backgroundColor: palette0
@@ -52801,7 +52802,8 @@ const Drawer = styled.div`
52801
52802
  top: 0;
52802
52803
  right: ${props => props.open ? '0' : `-${props.widthPercent || 70}%`};
52803
52804
  width: ${props => props.widthPercent ? `${props.widthPercent}%` : '70%'};
52804
- height: 100%;
52805
+ height: ${props => props.height ? props.height : '100%'};
52806
+
52805
52807
  background: #fff;
52806
52808
  z-index: 1001;
52807
52809
  transition: right 0.3s;
@@ -52837,6 +52839,7 @@ const CloseBtn = styled.button`
52837
52839
  function ModalDrawer(_ref) {
52838
52840
  let {
52839
52841
  open,
52842
+ height,
52840
52843
  onClose,
52841
52844
  children,
52842
52845
  widthPercent = 70
@@ -52845,6 +52848,7 @@ function ModalDrawer(_ref) {
52845
52848
  onClick: onClose,
52846
52849
  "data-testid": "overlay"
52847
52850
  }), /*#__PURE__*/React$1.createElement(Drawer, {
52851
+ height: height,
52848
52852
  open: open,
52849
52853
  widthPercent: widthPercent,
52850
52854
  "data-testid": "drawer"
@@ -52916,10 +52920,11 @@ const DropdownList = styled.ul`
52916
52920
  `}
52917
52921
  `;
52918
52922
  const SectionDiv = styled.div`
52919
- ${({
52920
- $showBorder,
52921
- margin
52922
- }) => {
52923
+ ${_ref => {
52924
+ let {
52925
+ $showBorder,
52926
+ margin
52927
+ } = _ref;
52923
52928
  switch ($showBorder) {
52924
52929
  case 'Template Offer':
52925
52930
  return css`border-top: 1px solid #e6e2e2ff;
@@ -53867,5 +53872,72 @@ const QuickFilterCards = _ref => {
53867
53872
  }));
53868
53873
  };
53869
53874
 
53870
- export { AdvancedThresholds, Analytics, AreaChart, BannerEventBoxList, BarChart, BarChartTwoRows, BarChartWithAreaChart, BarChartsByWeeks, BatteryChart, BreakdownPanel, BrushChart, BubbleChart, Budgets, Build, Button$1 as Button, Campaigns, CollapseData, CollapseHeader, ContainerTable, Coupons, CustomerSegments, Dashboard, DialogOverlay$1 as DialogOverlay, DoubleBarSingleLine, DoublePanelDataRow, DownloadProgress, DropdownNew, EventDetailsCard, EventList, Execute, FilterPanel, FilterPop, GroupBuilder, Heatmap, IconButton$1 as IconButton, Input$2 as Input, InsightsCarousel, ItemManagerPanel, ItemsStores, LinkButton, LinnerDataBox, MarketShareDescription, MenuRoute, MessageBox, ModalDrawer, ModalWithOverlay, OneColumnContainer, OverlayDropdown, PerformanceAnalyticsLegend, PieChart, PopupCharts, PreTestWhatIf, QuickFilter, QuickFilterCards, RangePicker, RangePop, ReportTable, RulesEngine, SampleRunEngine, SearchInput, SingleBarLineCharts, SortPop, TabMenu, Table, ToasterMessageBox, ToggleSwitch, Tooltip$2 as Tooltip, TopToggleList, TotalDoughnutChart, TotalHorizontalCharts, Track, TwoBarCharts, WeeksPicker };
53875
+ const StatusCell = styled.div`
53876
+ display: inline-flex;
53877
+ height: ${props => props.height};
53878
+ padding: 8px 12px;
53879
+ justify-content: center;
53880
+ align-items: center;
53881
+ gap: 14px;
53882
+ flex-shrink: 0;
53883
+ border-radius: ${props => props.borderRadius};
53884
+ border: 1px solid ${props => props.borderColor.toString()};
53885
+ background: ${props => props.backgroundColor.toString()};
53886
+ font-size: 14px;
53887
+ font-weight: 500;
53888
+ color: ${props => props.color.toString()};
53889
+ font-family: Poppins;
53890
+ font-style: normal;
53891
+ font-weight: 500;
53892
+ line-height: normal;
53893
+ `;
53894
+
53895
+ const tagTemplates = {
53896
+ pending: {
53897
+ backgroundColor: '#F5C9A74D',
53898
+ borderColor: '#F5C9A7',
53899
+ textColor: '#8B4513',
53900
+ text: 'Pending'
53901
+ },
53902
+ received: {
53903
+ backgroundColor: '#B9D5D54D',
53904
+ borderColor: '#B9D5D5',
53905
+ textColor: '#000000',
53906
+ text: 'Received'
53907
+ },
53908
+ approved: {
53909
+ backgroundColor: '#BFEBC64D',
53910
+ borderColor: '#BFEBC6',
53911
+ textColor: '#074310',
53912
+ text: 'Approved'
53913
+ },
53914
+ canceled: {
53915
+ backgroundColor: '#EBA6AF4D',
53916
+ borderColor: '#EBA6AF',
53917
+ textColor: '#44070F',
53918
+ text: 'Canceled'
53919
+ }
53920
+ };
53921
+ const Tag = props => {
53922
+ const {
53923
+ type = 'pending',
53924
+ size = 'small',
53925
+ backgroundColor,
53926
+ borderColor,
53927
+ textColor,
53928
+ borderRadius = "62px",
53929
+ text
53930
+ } = props;
53931
+ const template = tagTemplates[type];
53932
+ const height = size === 'small' ? '21px' : size === 'medium' ? '32px' : '35px';
53933
+ return /*#__PURE__*/React$1.createElement(StatusCell, {
53934
+ backgroundColor: backgroundColor || template.backgroundColor,
53935
+ borderColor: borderColor || template.borderColor,
53936
+ color: textColor || template.textColor,
53937
+ height: height,
53938
+ borderRadius: borderRadius
53939
+ }, /*#__PURE__*/React$1.createElement("span", null, text || template.text));
53940
+ };
53941
+
53942
+ export { AdvancedThresholds, Analytics, AreaChart, BannerEventBoxList, BarChart, BarChartTwoRows, BarChartWithAreaChart, BarChartsByWeeks, BatteryChart, BreakdownPanel, BrushChart, BubbleChart, Budgets, Build, Button$1 as Button, Campaigns, CollapseData, CollapseHeader, ContainerTable, Coupons, CustomerSegments, Dashboard, DialogOverlay$1 as DialogOverlay, DoubleBarSingleLine, DoublePanelDataRow, DownloadProgress, DropdownNew, EventDetailsCard, EventList, Execute, FilterPanel, FilterPop, GroupBuilder, Heatmap, IconButton$1 as IconButton, Input$2 as Input, InsightsCarousel, ItemManagerPanel, ItemsStores, LinkButton, LinnerDataBox, MarketShareDescription, MenuRoute, MessageBox, ModalDrawer, ModalWithOverlay, OneColumnContainer, OverlayDropdown, PerformanceAnalyticsLegend, PieChart, PopupCharts, PreTestWhatIf, QuickFilter, QuickFilterCards, RangePicker, RangePop, ReportTable, RulesEngine, SampleRunEngine, SearchInput, SingleBarLineCharts, SortPop, TabMenu, Table, Tag, ToasterMessageBox, ToggleSwitch, Tooltip$2 as Tooltip, TopToggleList, TotalDoughnutChart, TotalHorizontalCharts, Track, TwoBarCharts, WeeksPicker };
53871
53943
  //# sourceMappingURL=index.esm.js.map