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.d.ts CHANGED
@@ -1416,12 +1416,13 @@ declare function Tooltip(props: any): react_jsx_runtime.JSX.Element;
1416
1416
  * ToggleSwitch component for on/off states.
1417
1417
  * Supports small/large sizes and disabled state.
1418
1418
  */
1419
- declare function ToggleSwitch({ checked, onChange, size, disabled, ...props }: {
1419
+ declare function ToggleSwitch({ checked, onChange, size, disabled, aa, ...props }: {
1420
1420
  [x: string]: any;
1421
1421
  checked: any;
1422
1422
  onChange: any;
1423
1423
  size?: string;
1424
1424
  disabled?: boolean;
1425
+ aa: any;
1425
1426
  }): react_jsx_runtime.JSX.Element;
1426
1427
  declare namespace ToggleSwitch {
1427
1428
  namespace propTypes {
package/dist/index.esm.js CHANGED
@@ -10581,23 +10581,24 @@ const QuarterPopupPicker = ({
10581
10581
  };
10582
10582
 
10583
10583
  /* 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
- }) => {
10584
+ const QuarterPicker = _ref => {
10585
+ let {
10586
+ availableQuarters,
10587
+ // ["Q1-2024"]
10588
+ label,
10589
+ onChange,
10590
+ borderRadius,
10591
+ required,
10592
+ width,
10593
+ height,
10594
+ placeholder,
10595
+ disabled,
10596
+ borderColor,
10597
+ borderColorFocus,
10598
+ textColor,
10599
+ selectedValue,
10600
+ startYear
10601
+ } = _ref;
10601
10602
  const [isFocused, setIsFocused] = useState(false);
10602
10603
  const [isOpen, setIsOpen] = useState(false);
10603
10604
  const [value, setValue] = useState('');
@@ -11039,22 +11040,23 @@ const MonthPopupPicker = ({
11039
11040
  };
11040
11041
 
11041
11042
  /* 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
- }) => {
11043
+ const MonthPicker = _ref => {
11044
+ let {
11045
+ availableMonths,
11046
+ label,
11047
+ onChange,
11048
+ borderRadius,
11049
+ required,
11050
+ width,
11051
+ height,
11052
+ placeholder,
11053
+ disabled,
11054
+ borderColor,
11055
+ borderColorFocus,
11056
+ textColor,
11057
+ selectedValue,
11058
+ startYear
11059
+ } = _ref;
11058
11060
  const [isFocused, setIsFocused] = useState(false);
11059
11061
  const [isOpen, setIsOpen] = useState(false);
11060
11062
  const [value, setValue] = useState('');
@@ -24165,21 +24167,22 @@ const DeleteIcon = styled.div`
24165
24167
  position: absolute;
24166
24168
  `;
24167
24169
 
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
- }) => {
24170
+ const QuickFilterDropdownSingle = _ref => {
24171
+ let {
24172
+ label,
24173
+ hoverColor,
24174
+ options,
24175
+ selectedValue,
24176
+ placeHolder,
24177
+ onChange,
24178
+ disabled,
24179
+ width,
24180
+ error,
24181
+ errorMessage,
24182
+ xIconShow,
24183
+ labelColor,
24184
+ showLabelOnTop
24185
+ } = _ref;
24183
24186
  const [isFocused, setIsFocused] = useState(false);
24184
24187
  const [showOptions, setShowOptions] = useState(false);
24185
24188
  const [inputValue, setInputValue] = useState("");
@@ -24636,25 +24639,26 @@ const IconContainer$2 = styled.div`
24636
24639
  cursor: pointer;
24637
24640
  `;
24638
24641
 
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
- }) => {
24642
+ const QuickFilterDropdownMultiSelection = _ref => {
24643
+ let {
24644
+ label,
24645
+ labelEmptyValue,
24646
+ options,
24647
+ selectedValue,
24648
+ placeHolder,
24649
+ onChange,
24650
+ required,
24651
+ disabled,
24652
+ width,
24653
+ height,
24654
+ error,
24655
+ errorMessage,
24656
+ labelColor,
24657
+ xIconShow,
24658
+ checkBoxColor,
24659
+ showLabelOnTop,
24660
+ dropdownHeight
24661
+ } = _ref;
24658
24662
  const [isFocused, setIsFocused] = useState(false);
24659
24663
  const [showOptions, setShowOptions] = useState(false);
24660
24664
  const [inputValue, setInputValue] = useState('');
@@ -36085,9 +36089,12 @@ const ToggleSwitchLabel = styled.label`
36085
36089
  position: relative;
36086
36090
  cursor: pointer;
36087
36091
  user-select: none;
36088
- opacity: ${({
36089
- disabled
36090
- }) => disabled ? 0.5 : 1};
36092
+ // opacity: ${_ref => {
36093
+ let {
36094
+ disabled
36095
+ } = _ref;
36096
+ return disabled ? 0.5 : 1;
36097
+ }};
36091
36098
  `;
36092
36099
  const ToggleInput = styled.input`
36093
36100
  display: none;
@@ -36095,15 +36102,19 @@ const ToggleInput = styled.input`
36095
36102
  const ToggleSlider = styled.span`
36096
36103
  display: block;
36097
36104
  position: relative;
36098
- background: ${({
36099
- checked,
36100
- disabled
36101
- }) => checked ? disabled ? "#7bb1b0" : "#006d6a" : "#cfd8dc"};
36105
+ background: ${_ref2 => {
36106
+ let {
36107
+ checked,
36108
+ disabled
36109
+ } = _ref2;
36110
+ return checked ? disabled ? "#7bb1b0" : "#006d6a" : disabled ? "#B1B1B1" : "#cfd8dc";
36111
+ }};
36102
36112
  border-radius: 999px;
36103
36113
  transition: background 0.2s;
36104
- ${({
36105
- size
36106
- }) => {
36114
+ ${_ref3 => {
36115
+ let {
36116
+ size
36117
+ } = _ref3;
36107
36118
  switch (size) {
36108
36119
  case "s":
36109
36120
  return css`width: 40px; height: 20px;`;
@@ -36122,9 +36133,10 @@ const ToggleSlider = styled.span`
36122
36133
  background: #fff;
36123
36134
  border-radius: 50%;
36124
36135
  transition: left 0.2s, width 0.2s, height 0.2s;
36125
- ${({
36126
- size
36127
- }) => {
36136
+ ${_ref4 => {
36137
+ let {
36138
+ size
36139
+ } = _ref4;
36128
36140
  switch (size) {
36129
36141
  case "s":
36130
36142
  return css`width: 14px; height: 14px;`;
@@ -36134,10 +36146,11 @@ const ToggleSlider = styled.span`
36134
36146
  return css`width: 20px; height: 20px;`;
36135
36147
  }
36136
36148
  }}
36137
- left: ${({
36138
- checked,
36139
- size
36140
- }) => {
36149
+ left: ${_ref5 => {
36150
+ let {
36151
+ checked,
36152
+ size
36153
+ } = _ref5;
36141
36154
  if (!checked) return "3px";
36142
36155
  switch (size) {
36143
36156
  case "s":
@@ -36151,9 +36164,9 @@ const ToggleSlider = styled.span`
36151
36164
  }
36152
36165
  `;
36153
36166
 
36154
- /**
36155
- * ToggleSwitch component for on/off states.
36156
- * Supports small/large sizes and disabled state.
36167
+ /**
36168
+ * ToggleSwitch component for on/off states.
36169
+ * Supports small/large sizes and disabled state.
36157
36170
  */
36158
36171
  function ToggleSwitch(_ref) {
36159
36172
  let {
@@ -36161,11 +36174,13 @@ function ToggleSwitch(_ref) {
36161
36174
  onChange,
36162
36175
  size = "m",
36163
36176
  disabled = false,
36177
+ aa,
36164
36178
  ...props
36165
36179
  } = _ref;
36166
36180
  return /*#__PURE__*/React$1.createElement(ToggleSwitchLabel, {
36167
36181
  size: size,
36168
- disabled: disabled
36182
+ disabled: disabled,
36183
+ aa: true
36169
36184
  }, /*#__PURE__*/React$1.createElement(ToggleInput, _extends$1({
36170
36185
  type: "checkbox",
36171
36186
  checked: checked,
@@ -54935,18 +54950,22 @@ const DropdownItem = styled.li`
54935
54950
  background: ${props => props.disabled ? 'transparent' : props.selected ? props.selectedColor || '#066768' : props.hoverColor || '#E6F0F0'};
54936
54951
  }
54937
54952
  `;
54953
+ const Wrapper = styled.div`
54954
+ display: flex;
54955
+ align-items: center;
54956
+ width: 100%;
54957
+ `;
54938
54958
  const TruncatedText = styled.span`
54939
- display: inline-block;
54940
- font-family: "Poppins", sans-serif;
54959
+ flex: 1;
54960
+ min-width: 0;
54961
+ overflow: hidden;
54962
+ text-overflow: ellipsis;
54963
+ white-space: nowrap;
54941
54964
  line-height: 21px;
54965
+ font-family: "Poppins", sans-serif;
54942
54966
  font-size: 14px;
54943
54967
  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;
54968
+ color: ${props => props.color};
54950
54969
  `;
54951
54970
  styled.div`
54952
54971
  position: absolute;
@@ -55362,13 +55381,6 @@ const OverlayDropdown = _ref => {
55362
55381
  };
55363
55382
  const selected = findSelectedItem();
55364
55383
  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
55384
  const getTemplateParams = label => {
55373
55385
  if (!label) return [];
55374
55386
 
@@ -55517,11 +55529,11 @@ const OverlayDropdown = _ref => {
55517
55529
  isDarkerBackground: isDarkerBackground,
55518
55530
  height: height,
55519
55531
  type: "button"
55520
- }, /*#__PURE__*/React$1.createElement(TruncatedText, {
55532
+ }, /*#__PURE__*/React$1.createElement(Wrapper, null, /*#__PURE__*/React$1.createElement(TruncatedText, {
55521
55533
  onMouseEnter: () => setHoveredText(selected?.label),
55522
55534
  onMouseLeave: () => setHoveredText(null),
55523
55535
  color: !selected && open ? placeHolderColor : "inherit"
55524
- }, selected ? getDisplayText(selected.label) : open ? placeHolder : ""), open ? /*#__PURE__*/React$1.createElement(MenuItemUpIcon, {
55536
+ }, selected ? selected.label : open ? placeHolder : ''), open ? /*#__PURE__*/React$1.createElement(MenuItemUpIcon, {
55525
55537
  width: "12px",
55526
55538
  height: "12px",
55527
55539
  color: "#B1B1B1"
@@ -55529,7 +55541,7 @@ const OverlayDropdown = _ref => {
55529
55541
  width: "12px",
55530
55542
  height: "12px",
55531
55543
  color: "#B1B1B1"
55532
- })), open && /*#__PURE__*/React$1.createElement(DropdownList, {
55544
+ }))), open && /*#__PURE__*/React$1.createElement(DropdownList, {
55533
55545
  ref: dropdownRef,
55534
55546
  role: "listbox",
55535
55547
  dropdownMaxHeight: dropdownMaxHeight,
@@ -55571,7 +55583,7 @@ const OverlayDropdown = _ref => {
55571
55583
  }, /*#__PURE__*/React$1.createElement(TruncatedText, {
55572
55584
  onMouseEnter: () => setHoveredText(item.label),
55573
55585
  onMouseLeave: () => setHoveredText(null)
55574
- }, getDisplayText(item.label)), group.templateType === 2 ? /*#__PURE__*/React$1.createElement(ChervronRightIcon, {
55586
+ }, item.label), group.templateType === 2 ? /*#__PURE__*/React$1.createElement(ChervronRightIcon, {
55575
55587
  fill: item.value === value ? "#fff" : "#212121"
55576
55588
  }) : group.templateType === 3 && editableDigitalCoupon ? /*#__PURE__*/React$1.createElement(PenIcon, {
55577
55589
  fill: item.value === value ? "#fff" : "#212121"