sag_components 2.0.0-beta233 → 2.0.0-beta234

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
@@ -10591,23 +10591,24 @@ const QuarterPopupPicker = ({
10591
10591
  };
10592
10592
 
10593
10593
  /* 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
- }) => {
10594
+ const QuarterPicker = _ref => {
10595
+ let {
10596
+ availableQuarters,
10597
+ // ["Q1-2024"]
10598
+ label,
10599
+ onChange,
10600
+ borderRadius,
10601
+ required,
10602
+ width,
10603
+ height,
10604
+ placeholder,
10605
+ disabled,
10606
+ borderColor,
10607
+ borderColorFocus,
10608
+ textColor,
10609
+ selectedValue,
10610
+ startYear
10611
+ } = _ref;
10611
10612
  const [isFocused, setIsFocused] = React$1.useState(false);
10612
10613
  const [isOpen, setIsOpen] = React$1.useState(false);
10613
10614
  const [value, setValue] = React$1.useState('');
@@ -11049,22 +11050,23 @@ const MonthPopupPicker = ({
11049
11050
  };
11050
11051
 
11051
11052
  /* 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
- }) => {
11053
+ const MonthPicker = _ref => {
11054
+ let {
11055
+ availableMonths,
11056
+ label,
11057
+ onChange,
11058
+ borderRadius,
11059
+ required,
11060
+ width,
11061
+ height,
11062
+ placeholder,
11063
+ disabled,
11064
+ borderColor,
11065
+ borderColorFocus,
11066
+ textColor,
11067
+ selectedValue,
11068
+ startYear
11069
+ } = _ref;
11068
11070
  const [isFocused, setIsFocused] = React$1.useState(false);
11069
11071
  const [isOpen, setIsOpen] = React$1.useState(false);
11070
11072
  const [value, setValue] = React$1.useState('');
@@ -24175,21 +24177,22 @@ const DeleteIcon = styled__default["default"].div`
24175
24177
  position: absolute;
24176
24178
  `;
24177
24179
 
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
- }) => {
24180
+ const QuickFilterDropdownSingle = _ref => {
24181
+ let {
24182
+ label,
24183
+ hoverColor,
24184
+ options,
24185
+ selectedValue,
24186
+ placeHolder,
24187
+ onChange,
24188
+ disabled,
24189
+ width,
24190
+ error,
24191
+ errorMessage,
24192
+ xIconShow,
24193
+ labelColor,
24194
+ showLabelOnTop
24195
+ } = _ref;
24193
24196
  const [isFocused, setIsFocused] = React$1.useState(false);
24194
24197
  const [showOptions, setShowOptions] = React$1.useState(false);
24195
24198
  const [inputValue, setInputValue] = React$1.useState("");
@@ -24646,25 +24649,26 @@ const IconContainer$2 = styled__default["default"].div`
24646
24649
  cursor: pointer;
24647
24650
  `;
24648
24651
 
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
- }) => {
24652
+ const QuickFilterDropdownMultiSelection = _ref => {
24653
+ let {
24654
+ label,
24655
+ labelEmptyValue,
24656
+ options,
24657
+ selectedValue,
24658
+ placeHolder,
24659
+ onChange,
24660
+ required,
24661
+ disabled,
24662
+ width,
24663
+ height,
24664
+ error,
24665
+ errorMessage,
24666
+ labelColor,
24667
+ xIconShow,
24668
+ checkBoxColor,
24669
+ showLabelOnTop,
24670
+ dropdownHeight
24671
+ } = _ref;
24668
24672
  const [isFocused, setIsFocused] = React$1.useState(false);
24669
24673
  const [showOptions, setShowOptions] = React$1.useState(false);
24670
24674
  const [inputValue, setInputValue] = React$1.useState('');
@@ -36095,9 +36099,12 @@ const ToggleSwitchLabel = styled__default["default"].label`
36095
36099
  position: relative;
36096
36100
  cursor: pointer;
36097
36101
  user-select: none;
36098
- opacity: ${({
36099
- disabled
36100
- }) => disabled ? 0.5 : 1};
36102
+ // opacity: ${_ref => {
36103
+ let {
36104
+ disabled
36105
+ } = _ref;
36106
+ return disabled ? 0.5 : 1;
36107
+ }};
36101
36108
  `;
36102
36109
  const ToggleInput = styled__default["default"].input`
36103
36110
  display: none;
@@ -36105,15 +36112,19 @@ const ToggleInput = styled__default["default"].input`
36105
36112
  const ToggleSlider = styled__default["default"].span`
36106
36113
  display: block;
36107
36114
  position: relative;
36108
- background: ${({
36109
- checked,
36110
- disabled
36111
- }) => checked ? disabled ? "#7bb1b0" : "#006d6a" : "#cfd8dc"};
36115
+ background: ${_ref2 => {
36116
+ let {
36117
+ checked,
36118
+ disabled
36119
+ } = _ref2;
36120
+ return checked ? disabled ? "#7bb1b0" : "#006d6a" : disabled ? "#B1B1B1" : "#cfd8dc";
36121
+ }};
36112
36122
  border-radius: 999px;
36113
36123
  transition: background 0.2s;
36114
- ${({
36115
- size
36116
- }) => {
36124
+ ${_ref3 => {
36125
+ let {
36126
+ size
36127
+ } = _ref3;
36117
36128
  switch (size) {
36118
36129
  case "s":
36119
36130
  return styled.css`width: 40px; height: 20px;`;
@@ -36132,9 +36143,10 @@ const ToggleSlider = styled__default["default"].span`
36132
36143
  background: #fff;
36133
36144
  border-radius: 50%;
36134
36145
  transition: left 0.2s, width 0.2s, height 0.2s;
36135
- ${({
36136
- size
36137
- }) => {
36146
+ ${_ref4 => {
36147
+ let {
36148
+ size
36149
+ } = _ref4;
36138
36150
  switch (size) {
36139
36151
  case "s":
36140
36152
  return styled.css`width: 14px; height: 14px;`;
@@ -36144,10 +36156,11 @@ const ToggleSlider = styled__default["default"].span`
36144
36156
  return styled.css`width: 20px; height: 20px;`;
36145
36157
  }
36146
36158
  }}
36147
- left: ${({
36148
- checked,
36149
- size
36150
- }) => {
36159
+ left: ${_ref5 => {
36160
+ let {
36161
+ checked,
36162
+ size
36163
+ } = _ref5;
36151
36164
  if (!checked) return "3px";
36152
36165
  switch (size) {
36153
36166
  case "s":
@@ -36161,9 +36174,9 @@ const ToggleSlider = styled__default["default"].span`
36161
36174
  }
36162
36175
  `;
36163
36176
 
36164
- /**
36165
- * ToggleSwitch component for on/off states.
36166
- * Supports small/large sizes and disabled state.
36177
+ /**
36178
+ * ToggleSwitch component for on/off states.
36179
+ * Supports small/large sizes and disabled state.
36167
36180
  */
36168
36181
  function ToggleSwitch(_ref) {
36169
36182
  let {
@@ -36171,11 +36184,13 @@ function ToggleSwitch(_ref) {
36171
36184
  onChange,
36172
36185
  size = "m",
36173
36186
  disabled = false,
36187
+ aa,
36174
36188
  ...props
36175
36189
  } = _ref;
36176
36190
  return /*#__PURE__*/React__default["default"].createElement(ToggleSwitchLabel, {
36177
36191
  size: size,
36178
- disabled: disabled
36192
+ disabled: disabled,
36193
+ aa: true
36179
36194
  }, /*#__PURE__*/React__default["default"].createElement(ToggleInput, _extends$1({
36180
36195
  type: "checkbox",
36181
36196
  checked: checked,
@@ -54945,18 +54960,22 @@ const DropdownItem = styled__default["default"].li`
54945
54960
  background: ${props => props.disabled ? 'transparent' : props.selected ? props.selectedColor || '#066768' : props.hoverColor || '#E6F0F0'};
54946
54961
  }
54947
54962
  `;
54963
+ const Wrapper = styled__default["default"].div`
54964
+ display: flex;
54965
+ align-items: center;
54966
+ width: 100%;
54967
+ `;
54948
54968
  const TruncatedText = styled__default["default"].span`
54949
- display: inline-block;
54950
- font-family: "Poppins", sans-serif;
54969
+ flex: 1;
54970
+ min-width: 0;
54971
+ overflow: hidden;
54972
+ text-overflow: ellipsis;
54973
+ white-space: nowrap;
54951
54974
  line-height: 21px;
54975
+ font-family: "Poppins", sans-serif;
54952
54976
  font-size: 14px;
54953
54977
  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;
54978
+ color: ${props => props.color};
54960
54979
  `;
54961
54980
  styled__default["default"].div`
54962
54981
  position: absolute;
@@ -55372,13 +55391,6 @@ const OverlayDropdown = _ref => {
55372
55391
  };
55373
55392
  const selected = findSelectedItem();
55374
55393
  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
55394
  const getTemplateParams = label => {
55383
55395
  if (!label) return [];
55384
55396
 
@@ -55527,11 +55539,11 @@ const OverlayDropdown = _ref => {
55527
55539
  isDarkerBackground: isDarkerBackground,
55528
55540
  height: height,
55529
55541
  type: "button"
55530
- }, /*#__PURE__*/React__default["default"].createElement(TruncatedText, {
55542
+ }, /*#__PURE__*/React__default["default"].createElement(Wrapper, null, /*#__PURE__*/React__default["default"].createElement(TruncatedText, {
55531
55543
  onMouseEnter: () => setHoveredText(selected?.label),
55532
55544
  onMouseLeave: () => setHoveredText(null),
55533
55545
  color: !selected && open ? placeHolderColor : "inherit"
55534
- }, selected ? getDisplayText(selected.label) : open ? placeHolder : ""), open ? /*#__PURE__*/React__default["default"].createElement(MenuItemUpIcon, {
55546
+ }, selected ? selected.label : open ? placeHolder : ''), open ? /*#__PURE__*/React__default["default"].createElement(MenuItemUpIcon, {
55535
55547
  width: "12px",
55536
55548
  height: "12px",
55537
55549
  color: "#B1B1B1"
@@ -55539,7 +55551,7 @@ const OverlayDropdown = _ref => {
55539
55551
  width: "12px",
55540
55552
  height: "12px",
55541
55553
  color: "#B1B1B1"
55542
- })), open && /*#__PURE__*/React__default["default"].createElement(DropdownList, {
55554
+ }))), open && /*#__PURE__*/React__default["default"].createElement(DropdownList, {
55543
55555
  ref: dropdownRef,
55544
55556
  role: "listbox",
55545
55557
  dropdownMaxHeight: dropdownMaxHeight,
@@ -55581,7 +55593,7 @@ const OverlayDropdown = _ref => {
55581
55593
  }, /*#__PURE__*/React__default["default"].createElement(TruncatedText, {
55582
55594
  onMouseEnter: () => setHoveredText(item.label),
55583
55595
  onMouseLeave: () => setHoveredText(null)
55584
- }, getDisplayText(item.label)), group.templateType === 2 ? /*#__PURE__*/React__default["default"].createElement(ChervronRightIcon, {
55596
+ }, item.label), group.templateType === 2 ? /*#__PURE__*/React__default["default"].createElement(ChervronRightIcon, {
55585
55597
  fill: item.value === value ? "#fff" : "#212121"
55586
55598
  }) : group.templateType === 3 && editableDigitalCoupon ? /*#__PURE__*/React__default["default"].createElement(PenIcon, {
55587
55599
  fill: item.value === value ? "#fff" : "#212121"