sag_components 2.0.0-beta233 → 2.0.0-beta235

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.esm.js CHANGED
@@ -8929,26 +8929,27 @@ const IconContainer$5 = styled.div`
8929
8929
  cursor: pointer;
8930
8930
  `;
8931
8931
 
8932
- const DropdownSingleNew = ({
8933
- label,
8934
- labelEmptyValue,
8935
- options,
8936
- selectedValue,
8937
- onChange,
8938
- required,
8939
- disabled,
8940
- width,
8941
- height,
8942
- withMarginBottom = true,
8943
- error,
8944
- errorMessage,
8945
- xIconShow,
8946
- labelColor,
8947
- showLabelOnTop,
8948
- orderBy,
8949
- placeHolder = "",
8950
- elementType
8951
- }) => {
8932
+ const DropdownSingleNew = _ref => {
8933
+ let {
8934
+ label,
8935
+ labelEmptyValue,
8936
+ options,
8937
+ selectedValue,
8938
+ onChange,
8939
+ required,
8940
+ disabled,
8941
+ width,
8942
+ height,
8943
+ withMarginBottom = true,
8944
+ error,
8945
+ errorMessage,
8946
+ xIconShow,
8947
+ labelColor,
8948
+ showLabelOnTop,
8949
+ orderBy,
8950
+ placeHolder = "",
8951
+ elementType
8952
+ } = _ref;
8952
8953
  const [isFocused, setIsFocused] = useState(false);
8953
8954
  const [showOptions, setShowOptions] = useState(false);
8954
8955
  const [showAbove, setShowAbove] = useState(false);
@@ -9453,26 +9454,27 @@ const IconContainer$4 = styled.div`
9453
9454
  cursor: pointer;
9454
9455
  `;
9455
9456
 
9456
- const DropdownMultiNew = ({
9457
- label,
9458
- labelEmptyValue,
9459
- options,
9460
- selectedValue,
9461
- onChange,
9462
- required,
9463
- disabled,
9464
- width,
9465
- height,
9466
- withMarginBottom = true,
9467
- error,
9468
- errorMessage,
9469
- labelColor,
9470
- xIconShow,
9471
- checkBoxColor,
9472
- showLabelOnTop,
9473
- orderBy,
9474
- elementType
9475
- }) => {
9457
+ const DropdownMultiNew = _ref => {
9458
+ let {
9459
+ label,
9460
+ labelEmptyValue,
9461
+ options,
9462
+ selectedValue,
9463
+ onChange,
9464
+ required,
9465
+ disabled,
9466
+ width,
9467
+ height,
9468
+ withMarginBottom = true,
9469
+ error,
9470
+ errorMessage,
9471
+ labelColor,
9472
+ xIconShow,
9473
+ checkBoxColor,
9474
+ showLabelOnTop,
9475
+ orderBy,
9476
+ elementType
9477
+ } = _ref;
9476
9478
  const [isFocused, setIsFocused] = useState(false);
9477
9479
  const [showOptions, setShowOptions] = useState(false);
9478
9480
  const [showAbove, setShowAbove] = useState(false);
@@ -10581,23 +10583,24 @@ const QuarterPopupPicker = ({
10581
10583
  };
10582
10584
 
10583
10585
  /* eslint-disable import/no-extraneous-dependencies */
10584
- const QuarterPicker = ({
10585
- availableQuarters,
10586
- // ["Q1-2024"]
10587
- label,
10588
- onChange,
10589
- borderRadius,
10590
- required,
10591
- width,
10592
- height,
10593
- placeholder,
10594
- disabled,
10595
- borderColor,
10596
- borderColorFocus,
10597
- textColor,
10598
- selectedValue,
10599
- startYear
10600
- }) => {
10586
+ const QuarterPicker = _ref => {
10587
+ let {
10588
+ availableQuarters,
10589
+ // ["Q1-2024"]
10590
+ label,
10591
+ onChange,
10592
+ borderRadius,
10593
+ required,
10594
+ width,
10595
+ height,
10596
+ placeholder,
10597
+ disabled,
10598
+ borderColor,
10599
+ borderColorFocus,
10600
+ textColor,
10601
+ selectedValue,
10602
+ startYear
10603
+ } = _ref;
10601
10604
  const [isFocused, setIsFocused] = useState(false);
10602
10605
  const [isOpen, setIsOpen] = useState(false);
10603
10606
  const [value, setValue] = useState('');
@@ -11039,22 +11042,23 @@ const MonthPopupPicker = ({
11039
11042
  };
11040
11043
 
11041
11044
  /* eslint-disable import/no-extraneous-dependencies */
11042
- const MonthPicker = ({
11043
- availableMonths,
11044
- label,
11045
- onChange,
11046
- borderRadius,
11047
- required,
11048
- width,
11049
- height,
11050
- placeholder,
11051
- disabled,
11052
- borderColor,
11053
- borderColorFocus,
11054
- textColor,
11055
- selectedValue,
11056
- startYear
11057
- }) => {
11045
+ const MonthPicker = _ref => {
11046
+ let {
11047
+ availableMonths,
11048
+ label,
11049
+ onChange,
11050
+ borderRadius,
11051
+ required,
11052
+ width,
11053
+ height,
11054
+ placeholder,
11055
+ disabled,
11056
+ borderColor,
11057
+ borderColorFocus,
11058
+ textColor,
11059
+ selectedValue,
11060
+ startYear
11061
+ } = _ref;
11058
11062
  const [isFocused, setIsFocused] = useState(false);
11059
11063
  const [isOpen, setIsOpen] = useState(false);
11060
11064
  const [value, setValue] = useState('');
@@ -24165,21 +24169,22 @@ const DeleteIcon = styled.div`
24165
24169
  position: absolute;
24166
24170
  `;
24167
24171
 
24168
- const QuickFilterDropdownSingle = ({
24169
- label,
24170
- hoverColor,
24171
- options,
24172
- selectedValue,
24173
- placeHolder,
24174
- onChange,
24175
- disabled,
24176
- width,
24177
- error,
24178
- errorMessage,
24179
- xIconShow,
24180
- labelColor,
24181
- showLabelOnTop
24182
- }) => {
24172
+ const QuickFilterDropdownSingle = _ref => {
24173
+ let {
24174
+ label,
24175
+ hoverColor,
24176
+ options,
24177
+ selectedValue,
24178
+ placeHolder,
24179
+ onChange,
24180
+ disabled,
24181
+ width,
24182
+ error,
24183
+ errorMessage,
24184
+ xIconShow,
24185
+ labelColor,
24186
+ showLabelOnTop
24187
+ } = _ref;
24183
24188
  const [isFocused, setIsFocused] = useState(false);
24184
24189
  const [showOptions, setShowOptions] = useState(false);
24185
24190
  const [inputValue, setInputValue] = useState("");
@@ -24636,25 +24641,26 @@ const IconContainer$2 = styled.div`
24636
24641
  cursor: pointer;
24637
24642
  `;
24638
24643
 
24639
- const QuickFilterDropdownMultiSelection = ({
24640
- label,
24641
- labelEmptyValue,
24642
- options,
24643
- selectedValue,
24644
- placeHolder,
24645
- onChange,
24646
- required,
24647
- disabled,
24648
- width,
24649
- height,
24650
- error,
24651
- errorMessage,
24652
- labelColor,
24653
- xIconShow,
24654
- checkBoxColor,
24655
- showLabelOnTop,
24656
- dropdownHeight
24657
- }) => {
24644
+ const QuickFilterDropdownMultiSelection = _ref => {
24645
+ let {
24646
+ label,
24647
+ labelEmptyValue,
24648
+ options,
24649
+ selectedValue,
24650
+ placeHolder,
24651
+ onChange,
24652
+ required,
24653
+ disabled,
24654
+ width,
24655
+ height,
24656
+ error,
24657
+ errorMessage,
24658
+ labelColor,
24659
+ xIconShow,
24660
+ checkBoxColor,
24661
+ showLabelOnTop,
24662
+ dropdownHeight
24663
+ } = _ref;
24658
24664
  const [isFocused, setIsFocused] = useState(false);
24659
24665
  const [showOptions, setShowOptions] = useState(false);
24660
24666
  const [inputValue, setInputValue] = useState('');
@@ -34967,17 +34973,18 @@ css`
34967
34973
  * • onApply(start,end) — callback, both numbers (inclusive)
34968
34974
  * • onCancel() — callback
34969
34975
  */
34970
- const WeeksCalendar = ({
34971
- year,
34972
- defaultStartWeek = null,
34973
- defaultEndWeek = null,
34974
- backgroundColor = "#066768",
34975
- hoverBackgroundColor = "#E6F0F0",
34976
- allowedWeekRange = null,
34977
- // New prop for range restriction
34978
- onApply,
34979
- onCancel
34980
- }) => {
34976
+ const WeeksCalendar = _ref => {
34977
+ let {
34978
+ year,
34979
+ defaultStartWeek = null,
34980
+ defaultEndWeek = null,
34981
+ backgroundColor = "#066768",
34982
+ hoverBackgroundColor = "#E6F0F0",
34983
+ allowedWeekRange = null,
34984
+ // New prop for range restriction
34985
+ onApply,
34986
+ onCancel
34987
+ } = _ref;
34981
34988
  // state -------------------------------------------------
34982
34989
  const [startWeek, setStartWeek] = useState(defaultStartWeek);
34983
34990
  const [endWeek, setEndWeek] = useState(defaultEndWeek);
@@ -36085,9 +36092,12 @@ const ToggleSwitchLabel = styled.label`
36085
36092
  position: relative;
36086
36093
  cursor: pointer;
36087
36094
  user-select: none;
36088
- opacity: ${({
36089
- disabled
36090
- }) => disabled ? 0.5 : 1};
36095
+ opacity: ${_ref => {
36096
+ let {
36097
+ disabled
36098
+ } = _ref;
36099
+ return disabled ? 0.5 : 1;
36100
+ }};
36091
36101
  `;
36092
36102
  const ToggleInput = styled.input`
36093
36103
  display: none;
@@ -36095,15 +36105,19 @@ const ToggleInput = styled.input`
36095
36105
  const ToggleSlider = styled.span`
36096
36106
  display: block;
36097
36107
  position: relative;
36098
- background: ${({
36099
- checked,
36100
- disabled
36101
- }) => checked ? disabled ? "#7bb1b0" : "#006d6a" : "#cfd8dc"};
36108
+ background: ${_ref2 => {
36109
+ let {
36110
+ checked,
36111
+ disabled
36112
+ } = _ref2;
36113
+ return checked ? disabled ? "#7bb1b0" : "#006d6a" : "#cfd8dc";
36114
+ }};
36102
36115
  border-radius: 999px;
36103
36116
  transition: background 0.2s;
36104
- ${({
36105
- size
36106
- }) => {
36117
+ ${_ref3 => {
36118
+ let {
36119
+ size
36120
+ } = _ref3;
36107
36121
  switch (size) {
36108
36122
  case "s":
36109
36123
  return css`width: 40px; height: 20px;`;
@@ -36122,9 +36136,10 @@ const ToggleSlider = styled.span`
36122
36136
  background: #fff;
36123
36137
  border-radius: 50%;
36124
36138
  transition: left 0.2s, width 0.2s, height 0.2s;
36125
- ${({
36126
- size
36127
- }) => {
36139
+ ${_ref4 => {
36140
+ let {
36141
+ size
36142
+ } = _ref4;
36128
36143
  switch (size) {
36129
36144
  case "s":
36130
36145
  return css`width: 14px; height: 14px;`;
@@ -36134,10 +36149,11 @@ const ToggleSlider = styled.span`
36134
36149
  return css`width: 20px; height: 20px;`;
36135
36150
  }
36136
36151
  }}
36137
- left: ${({
36138
- checked,
36139
- size
36140
- }) => {
36152
+ left: ${_ref5 => {
36153
+ let {
36154
+ checked,
36155
+ size
36156
+ } = _ref5;
36141
36157
  if (!checked) return "3px";
36142
36158
  switch (size) {
36143
36159
  case "s":
@@ -36151,9 +36167,9 @@ const ToggleSlider = styled.span`
36151
36167
  }
36152
36168
  `;
36153
36169
 
36154
- /**
36155
- * ToggleSwitch component for on/off states.
36156
- * Supports small/large sizes and disabled state.
36170
+ /**
36171
+ * ToggleSwitch component for on/off states.
36172
+ * Supports small/large sizes and disabled state.
36157
36173
  */
36158
36174
  function ToggleSwitch(_ref) {
36159
36175
  let {
@@ -54891,10 +54907,11 @@ const DropdownList = styled.ul`
54891
54907
  `}
54892
54908
  `;
54893
54909
  const SectionDiv = styled.div`
54894
- ${({
54895
- $showBorder,
54896
- margin
54897
- }) => {
54910
+ ${_ref => {
54911
+ let {
54912
+ $showBorder,
54913
+ margin
54914
+ } = _ref;
54898
54915
  switch ($showBorder) {
54899
54916
  case 'Template Offer':
54900
54917
  return css`border-top: 1px solid #e6e2e2ff;
@@ -54935,18 +54952,22 @@ const DropdownItem = styled.li`
54935
54952
  background: ${props => props.disabled ? 'transparent' : props.selected ? props.selectedColor || '#066768' : props.hoverColor || '#E6F0F0'};
54936
54953
  }
54937
54954
  `;
54955
+ const Wrapper = styled.div`
54956
+ display: flex;
54957
+ align-items: center;
54958
+ width: 100%;
54959
+ `;
54938
54960
  const TruncatedText = styled.span`
54939
- display: inline-block;
54940
- font-family: "Poppins", sans-serif;
54961
+ flex: 1;
54962
+ min-width: 0;
54963
+ overflow: hidden;
54964
+ text-overflow: ellipsis;
54965
+ white-space: nowrap;
54941
54966
  line-height: 21px;
54967
+ font-family: "Poppins", sans-serif;
54942
54968
  font-size: 14px;
54943
54969
  font-weight: 400;
54944
- color: ${props => props.color};
54945
- max-width: 340px;
54946
- white-space: nowrap;
54947
- overflow: hidden;
54948
- text-overflow: ellipsis;
54949
- vertical-align: middle;
54970
+ color: ${props => props.color};
54950
54971
  `;
54951
54972
  styled.div`
54952
54973
  position: absolute;
@@ -55362,13 +55383,6 @@ const OverlayDropdown = _ref => {
55362
55383
  };
55363
55384
  const selected = findSelectedItem();
55364
55385
  const hasValue = !!selected;
55365
-
55366
- // Tooltip logic for long string
55367
- const getDisplayText = text => {
55368
- if (!text) return "";
55369
- if (text.length > 66) return text.slice(0, 66) + "...";
55370
- return text;
55371
- };
55372
55386
  const getTemplateParams = label => {
55373
55387
  if (!label) return [];
55374
55388
 
@@ -55517,11 +55531,11 @@ const OverlayDropdown = _ref => {
55517
55531
  isDarkerBackground: isDarkerBackground,
55518
55532
  height: height,
55519
55533
  type: "button"
55520
- }, /*#__PURE__*/React$1.createElement(TruncatedText, {
55534
+ }, /*#__PURE__*/React$1.createElement(Wrapper, null, /*#__PURE__*/React$1.createElement(TruncatedText, {
55521
55535
  onMouseEnter: () => setHoveredText(selected?.label),
55522
55536
  onMouseLeave: () => setHoveredText(null),
55523
55537
  color: !selected && open ? placeHolderColor : "inherit"
55524
- }, selected ? getDisplayText(selected.label) : open ? placeHolder : ""), open ? /*#__PURE__*/React$1.createElement(MenuItemUpIcon, {
55538
+ }, selected ? selected.label : open ? placeHolder : ''), open ? /*#__PURE__*/React$1.createElement(MenuItemUpIcon, {
55525
55539
  width: "12px",
55526
55540
  height: "12px",
55527
55541
  color: "#B1B1B1"
@@ -55529,7 +55543,7 @@ const OverlayDropdown = _ref => {
55529
55543
  width: "12px",
55530
55544
  height: "12px",
55531
55545
  color: "#B1B1B1"
55532
- })), open && /*#__PURE__*/React$1.createElement(DropdownList, {
55546
+ }))), open && /*#__PURE__*/React$1.createElement(DropdownList, {
55533
55547
  ref: dropdownRef,
55534
55548
  role: "listbox",
55535
55549
  dropdownMaxHeight: dropdownMaxHeight,
@@ -55571,7 +55585,7 @@ const OverlayDropdown = _ref => {
55571
55585
  }, /*#__PURE__*/React$1.createElement(TruncatedText, {
55572
55586
  onMouseEnter: () => setHoveredText(item.label),
55573
55587
  onMouseLeave: () => setHoveredText(null)
55574
- }, getDisplayText(item.label)), group.templateType === 2 ? /*#__PURE__*/React$1.createElement(ChervronRightIcon, {
55588
+ }, item.label), group.templateType === 2 ? /*#__PURE__*/React$1.createElement(ChervronRightIcon, {
55575
55589
  fill: item.value === value ? "#fff" : "#212121"
55576
55590
  }) : group.templateType === 3 && editableDigitalCoupon ? /*#__PURE__*/React$1.createElement(PenIcon, {
55577
55591
  fill: item.value === value ? "#fff" : "#212121"