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.js CHANGED
@@ -8939,26 +8939,27 @@ const IconContainer$5 = styled__default["default"].div`
8939
8939
  cursor: pointer;
8940
8940
  `;
8941
8941
 
8942
- const DropdownSingleNew = ({
8943
- label,
8944
- labelEmptyValue,
8945
- options,
8946
- selectedValue,
8947
- onChange,
8948
- required,
8949
- disabled,
8950
- width,
8951
- height,
8952
- withMarginBottom = true,
8953
- error,
8954
- errorMessage,
8955
- xIconShow,
8956
- labelColor,
8957
- showLabelOnTop,
8958
- orderBy,
8959
- placeHolder = "",
8960
- elementType
8961
- }) => {
8942
+ const DropdownSingleNew = _ref => {
8943
+ let {
8944
+ label,
8945
+ labelEmptyValue,
8946
+ options,
8947
+ selectedValue,
8948
+ onChange,
8949
+ required,
8950
+ disabled,
8951
+ width,
8952
+ height,
8953
+ withMarginBottom = true,
8954
+ error,
8955
+ errorMessage,
8956
+ xIconShow,
8957
+ labelColor,
8958
+ showLabelOnTop,
8959
+ orderBy,
8960
+ placeHolder = "",
8961
+ elementType
8962
+ } = _ref;
8962
8963
  const [isFocused, setIsFocused] = React$1.useState(false);
8963
8964
  const [showOptions, setShowOptions] = React$1.useState(false);
8964
8965
  const [showAbove, setShowAbove] = React$1.useState(false);
@@ -9463,26 +9464,27 @@ const IconContainer$4 = styled__default["default"].div`
9463
9464
  cursor: pointer;
9464
9465
  `;
9465
9466
 
9466
- const DropdownMultiNew = ({
9467
- label,
9468
- labelEmptyValue,
9469
- options,
9470
- selectedValue,
9471
- onChange,
9472
- required,
9473
- disabled,
9474
- width,
9475
- height,
9476
- withMarginBottom = true,
9477
- error,
9478
- errorMessage,
9479
- labelColor,
9480
- xIconShow,
9481
- checkBoxColor,
9482
- showLabelOnTop,
9483
- orderBy,
9484
- elementType
9485
- }) => {
9467
+ const DropdownMultiNew = _ref => {
9468
+ let {
9469
+ label,
9470
+ labelEmptyValue,
9471
+ options,
9472
+ selectedValue,
9473
+ onChange,
9474
+ required,
9475
+ disabled,
9476
+ width,
9477
+ height,
9478
+ withMarginBottom = true,
9479
+ error,
9480
+ errorMessage,
9481
+ labelColor,
9482
+ xIconShow,
9483
+ checkBoxColor,
9484
+ showLabelOnTop,
9485
+ orderBy,
9486
+ elementType
9487
+ } = _ref;
9486
9488
  const [isFocused, setIsFocused] = React$1.useState(false);
9487
9489
  const [showOptions, setShowOptions] = React$1.useState(false);
9488
9490
  const [showAbove, setShowAbove] = React$1.useState(false);
@@ -10591,23 +10593,24 @@ const QuarterPopupPicker = ({
10591
10593
  };
10592
10594
 
10593
10595
  /* eslint-disable import/no-extraneous-dependencies */
10594
- const QuarterPicker = ({
10595
- availableQuarters,
10596
- // ["Q1-2024"]
10597
- label,
10598
- onChange,
10599
- borderRadius,
10600
- required,
10601
- width,
10602
- height,
10603
- placeholder,
10604
- disabled,
10605
- borderColor,
10606
- borderColorFocus,
10607
- textColor,
10608
- selectedValue,
10609
- startYear
10610
- }) => {
10596
+ const QuarterPicker = _ref => {
10597
+ let {
10598
+ availableQuarters,
10599
+ // ["Q1-2024"]
10600
+ label,
10601
+ onChange,
10602
+ borderRadius,
10603
+ required,
10604
+ width,
10605
+ height,
10606
+ placeholder,
10607
+ disabled,
10608
+ borderColor,
10609
+ borderColorFocus,
10610
+ textColor,
10611
+ selectedValue,
10612
+ startYear
10613
+ } = _ref;
10611
10614
  const [isFocused, setIsFocused] = React$1.useState(false);
10612
10615
  const [isOpen, setIsOpen] = React$1.useState(false);
10613
10616
  const [value, setValue] = React$1.useState('');
@@ -11049,22 +11052,23 @@ const MonthPopupPicker = ({
11049
11052
  };
11050
11053
 
11051
11054
  /* eslint-disable import/no-extraneous-dependencies */
11052
- const MonthPicker = ({
11053
- availableMonths,
11054
- label,
11055
- onChange,
11056
- borderRadius,
11057
- required,
11058
- width,
11059
- height,
11060
- placeholder,
11061
- disabled,
11062
- borderColor,
11063
- borderColorFocus,
11064
- textColor,
11065
- selectedValue,
11066
- startYear
11067
- }) => {
11055
+ const MonthPicker = _ref => {
11056
+ let {
11057
+ availableMonths,
11058
+ label,
11059
+ onChange,
11060
+ borderRadius,
11061
+ required,
11062
+ width,
11063
+ height,
11064
+ placeholder,
11065
+ disabled,
11066
+ borderColor,
11067
+ borderColorFocus,
11068
+ textColor,
11069
+ selectedValue,
11070
+ startYear
11071
+ } = _ref;
11068
11072
  const [isFocused, setIsFocused] = React$1.useState(false);
11069
11073
  const [isOpen, setIsOpen] = React$1.useState(false);
11070
11074
  const [value, setValue] = React$1.useState('');
@@ -24175,21 +24179,22 @@ const DeleteIcon = styled__default["default"].div`
24175
24179
  position: absolute;
24176
24180
  `;
24177
24181
 
24178
- const QuickFilterDropdownSingle = ({
24179
- label,
24180
- hoverColor,
24181
- options,
24182
- selectedValue,
24183
- placeHolder,
24184
- onChange,
24185
- disabled,
24186
- width,
24187
- error,
24188
- errorMessage,
24189
- xIconShow,
24190
- labelColor,
24191
- showLabelOnTop
24192
- }) => {
24182
+ const QuickFilterDropdownSingle = _ref => {
24183
+ let {
24184
+ label,
24185
+ hoverColor,
24186
+ options,
24187
+ selectedValue,
24188
+ placeHolder,
24189
+ onChange,
24190
+ disabled,
24191
+ width,
24192
+ error,
24193
+ errorMessage,
24194
+ xIconShow,
24195
+ labelColor,
24196
+ showLabelOnTop
24197
+ } = _ref;
24193
24198
  const [isFocused, setIsFocused] = React$1.useState(false);
24194
24199
  const [showOptions, setShowOptions] = React$1.useState(false);
24195
24200
  const [inputValue, setInputValue] = React$1.useState("");
@@ -24646,25 +24651,26 @@ const IconContainer$2 = styled__default["default"].div`
24646
24651
  cursor: pointer;
24647
24652
  `;
24648
24653
 
24649
- const QuickFilterDropdownMultiSelection = ({
24650
- label,
24651
- labelEmptyValue,
24652
- options,
24653
- selectedValue,
24654
- placeHolder,
24655
- onChange,
24656
- required,
24657
- disabled,
24658
- width,
24659
- height,
24660
- error,
24661
- errorMessage,
24662
- labelColor,
24663
- xIconShow,
24664
- checkBoxColor,
24665
- showLabelOnTop,
24666
- dropdownHeight
24667
- }) => {
24654
+ const QuickFilterDropdownMultiSelection = _ref => {
24655
+ let {
24656
+ label,
24657
+ labelEmptyValue,
24658
+ options,
24659
+ selectedValue,
24660
+ placeHolder,
24661
+ onChange,
24662
+ required,
24663
+ disabled,
24664
+ width,
24665
+ height,
24666
+ error,
24667
+ errorMessage,
24668
+ labelColor,
24669
+ xIconShow,
24670
+ checkBoxColor,
24671
+ showLabelOnTop,
24672
+ dropdownHeight
24673
+ } = _ref;
24668
24674
  const [isFocused, setIsFocused] = React$1.useState(false);
24669
24675
  const [showOptions, setShowOptions] = React$1.useState(false);
24670
24676
  const [inputValue, setInputValue] = React$1.useState('');
@@ -34977,17 +34983,18 @@ styled.css`
34977
34983
  * • onApply(start,end) — callback, both numbers (inclusive)
34978
34984
  * • onCancel() — callback
34979
34985
  */
34980
- const WeeksCalendar = ({
34981
- year,
34982
- defaultStartWeek = null,
34983
- defaultEndWeek = null,
34984
- backgroundColor = "#066768",
34985
- hoverBackgroundColor = "#E6F0F0",
34986
- allowedWeekRange = null,
34987
- // New prop for range restriction
34988
- onApply,
34989
- onCancel
34990
- }) => {
34986
+ const WeeksCalendar = _ref => {
34987
+ let {
34988
+ year,
34989
+ defaultStartWeek = null,
34990
+ defaultEndWeek = null,
34991
+ backgroundColor = "#066768",
34992
+ hoverBackgroundColor = "#E6F0F0",
34993
+ allowedWeekRange = null,
34994
+ // New prop for range restriction
34995
+ onApply,
34996
+ onCancel
34997
+ } = _ref;
34991
34998
  // state -------------------------------------------------
34992
34999
  const [startWeek, setStartWeek] = React$1.useState(defaultStartWeek);
34993
35000
  const [endWeek, setEndWeek] = React$1.useState(defaultEndWeek);
@@ -36095,9 +36102,12 @@ const ToggleSwitchLabel = styled__default["default"].label`
36095
36102
  position: relative;
36096
36103
  cursor: pointer;
36097
36104
  user-select: none;
36098
- opacity: ${({
36099
- disabled
36100
- }) => disabled ? 0.5 : 1};
36105
+ opacity: ${_ref => {
36106
+ let {
36107
+ disabled
36108
+ } = _ref;
36109
+ return disabled ? 0.5 : 1;
36110
+ }};
36101
36111
  `;
36102
36112
  const ToggleInput = styled__default["default"].input`
36103
36113
  display: none;
@@ -36105,15 +36115,19 @@ const ToggleInput = styled__default["default"].input`
36105
36115
  const ToggleSlider = styled__default["default"].span`
36106
36116
  display: block;
36107
36117
  position: relative;
36108
- background: ${({
36109
- checked,
36110
- disabled
36111
- }) => checked ? disabled ? "#7bb1b0" : "#006d6a" : "#cfd8dc"};
36118
+ background: ${_ref2 => {
36119
+ let {
36120
+ checked,
36121
+ disabled
36122
+ } = _ref2;
36123
+ return checked ? disabled ? "#7bb1b0" : "#006d6a" : "#cfd8dc";
36124
+ }};
36112
36125
  border-radius: 999px;
36113
36126
  transition: background 0.2s;
36114
- ${({
36115
- size
36116
- }) => {
36127
+ ${_ref3 => {
36128
+ let {
36129
+ size
36130
+ } = _ref3;
36117
36131
  switch (size) {
36118
36132
  case "s":
36119
36133
  return styled.css`width: 40px; height: 20px;`;
@@ -36132,9 +36146,10 @@ const ToggleSlider = styled__default["default"].span`
36132
36146
  background: #fff;
36133
36147
  border-radius: 50%;
36134
36148
  transition: left 0.2s, width 0.2s, height 0.2s;
36135
- ${({
36136
- size
36137
- }) => {
36149
+ ${_ref4 => {
36150
+ let {
36151
+ size
36152
+ } = _ref4;
36138
36153
  switch (size) {
36139
36154
  case "s":
36140
36155
  return styled.css`width: 14px; height: 14px;`;
@@ -36144,10 +36159,11 @@ const ToggleSlider = styled__default["default"].span`
36144
36159
  return styled.css`width: 20px; height: 20px;`;
36145
36160
  }
36146
36161
  }}
36147
- left: ${({
36148
- checked,
36149
- size
36150
- }) => {
36162
+ left: ${_ref5 => {
36163
+ let {
36164
+ checked,
36165
+ size
36166
+ } = _ref5;
36151
36167
  if (!checked) return "3px";
36152
36168
  switch (size) {
36153
36169
  case "s":
@@ -36161,9 +36177,9 @@ const ToggleSlider = styled__default["default"].span`
36161
36177
  }
36162
36178
  `;
36163
36179
 
36164
- /**
36165
- * ToggleSwitch component for on/off states.
36166
- * Supports small/large sizes and disabled state.
36180
+ /**
36181
+ * ToggleSwitch component for on/off states.
36182
+ * Supports small/large sizes and disabled state.
36167
36183
  */
36168
36184
  function ToggleSwitch(_ref) {
36169
36185
  let {
@@ -54901,10 +54917,11 @@ const DropdownList = styled__default["default"].ul`
54901
54917
  `}
54902
54918
  `;
54903
54919
  const SectionDiv = styled__default["default"].div`
54904
- ${({
54905
- $showBorder,
54906
- margin
54907
- }) => {
54920
+ ${_ref => {
54921
+ let {
54922
+ $showBorder,
54923
+ margin
54924
+ } = _ref;
54908
54925
  switch ($showBorder) {
54909
54926
  case 'Template Offer':
54910
54927
  return styled.css`border-top: 1px solid #e6e2e2ff;
@@ -54945,18 +54962,22 @@ const DropdownItem = styled__default["default"].li`
54945
54962
  background: ${props => props.disabled ? 'transparent' : props.selected ? props.selectedColor || '#066768' : props.hoverColor || '#E6F0F0'};
54946
54963
  }
54947
54964
  `;
54965
+ const Wrapper = styled__default["default"].div`
54966
+ display: flex;
54967
+ align-items: center;
54968
+ width: 100%;
54969
+ `;
54948
54970
  const TruncatedText = styled__default["default"].span`
54949
- display: inline-block;
54950
- font-family: "Poppins", sans-serif;
54971
+ flex: 1;
54972
+ min-width: 0;
54973
+ overflow: hidden;
54974
+ text-overflow: ellipsis;
54975
+ white-space: nowrap;
54951
54976
  line-height: 21px;
54977
+ font-family: "Poppins", sans-serif;
54952
54978
  font-size: 14px;
54953
54979
  font-weight: 400;
54954
- color: ${props => props.color};
54955
- max-width: 340px;
54956
- white-space: nowrap;
54957
- overflow: hidden;
54958
- text-overflow: ellipsis;
54959
- vertical-align: middle;
54980
+ color: ${props => props.color};
54960
54981
  `;
54961
54982
  styled__default["default"].div`
54962
54983
  position: absolute;
@@ -55372,13 +55393,6 @@ const OverlayDropdown = _ref => {
55372
55393
  };
55373
55394
  const selected = findSelectedItem();
55374
55395
  const hasValue = !!selected;
55375
-
55376
- // Tooltip logic for long string
55377
- const getDisplayText = text => {
55378
- if (!text) return "";
55379
- if (text.length > 66) return text.slice(0, 66) + "...";
55380
- return text;
55381
- };
55382
55396
  const getTemplateParams = label => {
55383
55397
  if (!label) return [];
55384
55398
 
@@ -55527,11 +55541,11 @@ const OverlayDropdown = _ref => {
55527
55541
  isDarkerBackground: isDarkerBackground,
55528
55542
  height: height,
55529
55543
  type: "button"
55530
- }, /*#__PURE__*/React__default["default"].createElement(TruncatedText, {
55544
+ }, /*#__PURE__*/React__default["default"].createElement(Wrapper, null, /*#__PURE__*/React__default["default"].createElement(TruncatedText, {
55531
55545
  onMouseEnter: () => setHoveredText(selected?.label),
55532
55546
  onMouseLeave: () => setHoveredText(null),
55533
55547
  color: !selected && open ? placeHolderColor : "inherit"
55534
- }, selected ? getDisplayText(selected.label) : open ? placeHolder : ""), open ? /*#__PURE__*/React__default["default"].createElement(MenuItemUpIcon, {
55548
+ }, selected ? selected.label : open ? placeHolder : ''), open ? /*#__PURE__*/React__default["default"].createElement(MenuItemUpIcon, {
55535
55549
  width: "12px",
55536
55550
  height: "12px",
55537
55551
  color: "#B1B1B1"
@@ -55539,7 +55553,7 @@ const OverlayDropdown = _ref => {
55539
55553
  width: "12px",
55540
55554
  height: "12px",
55541
55555
  color: "#B1B1B1"
55542
- })), open && /*#__PURE__*/React__default["default"].createElement(DropdownList, {
55556
+ }))), open && /*#__PURE__*/React__default["default"].createElement(DropdownList, {
55543
55557
  ref: dropdownRef,
55544
55558
  role: "listbox",
55545
55559
  dropdownMaxHeight: dropdownMaxHeight,
@@ -55581,7 +55595,7 @@ const OverlayDropdown = _ref => {
55581
55595
  }, /*#__PURE__*/React__default["default"].createElement(TruncatedText, {
55582
55596
  onMouseEnter: () => setHoveredText(item.label),
55583
55597
  onMouseLeave: () => setHoveredText(null)
55584
- }, getDisplayText(item.label)), group.templateType === 2 ? /*#__PURE__*/React__default["default"].createElement(ChervronRightIcon, {
55598
+ }, item.label), group.templateType === 2 ? /*#__PURE__*/React__default["default"].createElement(ChervronRightIcon, {
55585
55599
  fill: item.value === value ? "#fff" : "#212121"
55586
55600
  }) : group.templateType === 3 && editableDigitalCoupon ? /*#__PURE__*/React__default["default"].createElement(PenIcon, {
55587
55601
  fill: item.value === value ? "#fff" : "#212121"