sag_components 2.0.0-beta325 → 2.0.0-beta327

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
@@ -9307,6 +9307,34 @@ const CheckBoxNotCheckedIcon = _ref => {
9307
9307
  }));
9308
9308
  };
9309
9309
 
9310
+ const CheckBoxIndeterminateIcon = ({
9311
+ width = "16",
9312
+ height = "16",
9313
+ color = "#1B30AA"
9314
+ }) => {
9315
+ return /*#__PURE__*/React__default["default"].createElement("svg", {
9316
+ width: width,
9317
+ height: height,
9318
+ viewBox: "0 0 13 13",
9319
+ fill: "none",
9320
+ xmlns: "http://www.w3.org/2000/svg"
9321
+ }, /*#__PURE__*/React__default["default"].createElement("rect", {
9322
+ x: "0.5",
9323
+ y: "0.642578",
9324
+ width: "12.25",
9325
+ height: "12.25",
9326
+ rx: "1.75",
9327
+ fill: color
9328
+ }), /*#__PURE__*/React__default["default"].createElement("rect", {
9329
+ x: "3",
9330
+ y: "5.892578",
9331
+ width: "7.25",
9332
+ height: "2",
9333
+ rx: "1",
9334
+ fill: "white"
9335
+ }));
9336
+ };
9337
+
9310
9338
  /* eslint-disable no-nested-ternary */
9311
9339
  const scrollableStyles$d = `
9312
9340
  overflow-y: auto;
@@ -9545,7 +9573,8 @@ const DropdownMultiNew = ({
9545
9573
  checkBoxColor,
9546
9574
  showLabelOnTop,
9547
9575
  orderBy,
9548
- elementType
9576
+ elementType,
9577
+ showSelectAll = false
9549
9578
  }) => {
9550
9579
  const [isFocused, setIsFocused] = React$1.useState(false);
9551
9580
  const [showOptions, setShowOptions] = React$1.useState(false);
@@ -9651,6 +9680,22 @@ const DropdownMultiNew = ({
9651
9680
  setIsFocused(true);
9652
9681
  }
9653
9682
  };
9683
+ const allSelected = options?.length > 0 && selectedOptions.length === options.length;
9684
+ const someSelected = selectedOptions.length > 0 && selectedOptions.length < options.length;
9685
+ const handleSelectAllClick = () => {
9686
+ if (disabled) return;
9687
+ if (allSelected || someSelected) {
9688
+ setSelectedOptions([]);
9689
+ onChange({
9690
+ newValue: []
9691
+ });
9692
+ } else {
9693
+ setSelectedOptions(options);
9694
+ onChange({
9695
+ newValue: options
9696
+ });
9697
+ }
9698
+ };
9654
9699
  const handleClearClick = () => {
9655
9700
  if (disabled) return;
9656
9701
  setSelectedOptions([]);
@@ -9786,7 +9831,25 @@ const DropdownMultiNew = ({
9786
9831
  showabove: showAbove,
9787
9832
  disabled: disabled,
9788
9833
  filteredoptions: filteredOptions
9789
- }, filteredOptions.map(option => /*#__PURE__*/React__default["default"].createElement(OptionItem$2, {
9834
+ }, showSelectAll && /*#__PURE__*/React__default["default"].createElement(OptionItem$2, {
9835
+ className: "OptionItem",
9836
+ onClick: handleSelectAllClick,
9837
+ selected: allSelected
9838
+ }, /*#__PURE__*/React__default["default"].createElement(IconContainer$4, {
9839
+ className: "IconContainer"
9840
+ }, allSelected ? /*#__PURE__*/React__default["default"].createElement(CheckBoxCheckedIcon, {
9841
+ width: "14px",
9842
+ height: "14px",
9843
+ color: disabled ? "#888" : checkBoxColor
9844
+ }) : someSelected ? /*#__PURE__*/React__default["default"].createElement(CheckBoxIndeterminateIcon, {
9845
+ width: "14px",
9846
+ height: "14px",
9847
+ color: disabled ? "#888" : checkBoxColor
9848
+ }) : /*#__PURE__*/React__default["default"].createElement(CheckBoxNotCheckedIcon, {
9849
+ width: "14px",
9850
+ height: "14px",
9851
+ color: disabled ? "#888" : "#212121"
9852
+ })), "Select All"), filteredOptions.map(option => /*#__PURE__*/React__default["default"].createElement(OptionItem$2, {
9790
9853
  className: "OptionItem",
9791
9854
  key: option.value,
9792
9855
  onClick: () => toggleOption(option),
@@ -9844,7 +9907,8 @@ const DropdownNew = props => {
9844
9907
  errorMessage = "",
9845
9908
  labelColor = "#066768",
9846
9909
  checkBoxColor = "#229E38",
9847
- xIconShow = true
9910
+ xIconShow = true,
9911
+ showSelectAll = false
9848
9912
  } = props;
9849
9913
  const handleOnChange = event => {
9850
9914
  if (event && event.newValue && event.newValue[0]) {
@@ -9880,7 +9944,8 @@ const DropdownNew = props => {
9880
9944
  onChange: handleOnChange,
9881
9945
  showLabelOnTop: showLabelOnTop,
9882
9946
  orderBy: orderBy,
9883
- elementType: elementType
9947
+ elementType: elementType,
9948
+ showSelectAll: showSelectAll
9884
9949
  }) : /*#__PURE__*/React__default["default"].createElement(DropdownSingleNew, {
9885
9950
  className: "DropdownSingleNew",
9886
9951
  placeHolder: placeHolder,
@@ -10659,24 +10724,23 @@ const QuarterPopupPicker = ({
10659
10724
  };
10660
10725
 
10661
10726
  /* eslint-disable import/no-extraneous-dependencies */
10662
- const QuarterPicker = _ref => {
10663
- let {
10664
- availableQuarters,
10665
- // ["Q1-2024"]
10666
- label,
10667
- onChange,
10668
- borderRadius,
10669
- required,
10670
- width,
10671
- height,
10672
- placeholder,
10673
- disabled,
10674
- borderColor,
10675
- borderColorFocus,
10676
- textColor,
10677
- selectedValue,
10678
- startYear
10679
- } = _ref;
10727
+ const QuarterPicker = ({
10728
+ availableQuarters,
10729
+ // ["Q1-2024"]
10730
+ label,
10731
+ onChange,
10732
+ borderRadius,
10733
+ required,
10734
+ width,
10735
+ height,
10736
+ placeholder,
10737
+ disabled,
10738
+ borderColor,
10739
+ borderColorFocus,
10740
+ textColor,
10741
+ selectedValue,
10742
+ startYear
10743
+ }) => {
10680
10744
  const [isFocused, setIsFocused] = React$1.useState(false);
10681
10745
  const [isOpen, setIsOpen] = React$1.useState(false);
10682
10746
  const [value, setValue] = React$1.useState('');
@@ -11118,23 +11182,22 @@ const MonthPopupPicker = ({
11118
11182
  };
11119
11183
 
11120
11184
  /* eslint-disable import/no-extraneous-dependencies */
11121
- const MonthPicker = _ref => {
11122
- let {
11123
- availableMonths,
11124
- label,
11125
- onChange,
11126
- borderRadius,
11127
- required,
11128
- width,
11129
- height,
11130
- placeholder,
11131
- disabled,
11132
- borderColor,
11133
- borderColorFocus,
11134
- textColor,
11135
- selectedValue,
11136
- startYear
11137
- } = _ref;
11185
+ const MonthPicker = ({
11186
+ availableMonths,
11187
+ label,
11188
+ onChange,
11189
+ borderRadius,
11190
+ required,
11191
+ width,
11192
+ height,
11193
+ placeholder,
11194
+ disabled,
11195
+ borderColor,
11196
+ borderColorFocus,
11197
+ textColor,
11198
+ selectedValue,
11199
+ startYear
11200
+ }) => {
11138
11201
  const [isFocused, setIsFocused] = React$1.useState(false);
11139
11202
  const [isOpen, setIsOpen] = React$1.useState(false);
11140
11203
  const [value, setValue] = React$1.useState('');
@@ -11800,7 +11863,8 @@ const FilterPanel = props => {
11800
11863
  onChange: eventDropdownMulti => onChangeDropdownMultiHandler(eventDropdownMulti, item),
11801
11864
  options: item.dropdownOptions || [],
11802
11865
  width: "100%",
11803
- height: dropdownHeight
11866
+ height: dropdownHeight,
11867
+ showSelectAll: item.showSelectAll
11804
11868
  });
11805
11869
  break;
11806
11870
  case 'datepicker':
@@ -12340,16 +12404,13 @@ const Td$1 = styled__default["default"].td`
12340
12404
  `;
12341
12405
  const Tr = styled__default["default"].tr`
12342
12406
  border-bottom: 1px solid #f3f4f6;
12343
- ${_ref => {
12344
- let {
12345
- enableHover,
12346
- selectHoverColor
12347
- } = _ref;
12348
- return enableHover && `&:hover {
12407
+ ${({
12408
+ enableHover,
12409
+ selectHoverColor
12410
+ }) => enableHover && `&:hover {
12349
12411
  background-color: ${selectHoverColor};
12350
12412
  cursor: pointer;
12351
- }`;
12352
- }}
12413
+ }`}
12353
12414
  `;
12354
12415
  const InfoText = styled__default["default"].div`
12355
12416
  font-weight: 400;
@@ -24251,24 +24312,23 @@ const DeleteIcon = styled__default["default"].div`
24251
24312
  position: absolute;
24252
24313
  `;
24253
24314
 
24254
- const QuickFilterDropdownSingle = _ref => {
24255
- let {
24256
- label,
24257
- hoverColor,
24258
- options,
24259
- selectedValue,
24260
- placeHolder,
24261
- optionHoverColor = '#edf6ff',
24262
- selectedOptionColor = "#C7E4FF",
24263
- onChange,
24264
- disabled,
24265
- width,
24266
- error,
24267
- errorMessage,
24268
- xIconShow,
24269
- labelColor,
24270
- showLabelOnTop
24271
- } = _ref;
24315
+ const QuickFilterDropdownSingle = ({
24316
+ label,
24317
+ hoverColor,
24318
+ options,
24319
+ selectedValue,
24320
+ placeHolder,
24321
+ optionHoverColor = '#edf6ff',
24322
+ selectedOptionColor = "#C7E4FF",
24323
+ onChange,
24324
+ disabled,
24325
+ width,
24326
+ error,
24327
+ errorMessage,
24328
+ xIconShow,
24329
+ labelColor,
24330
+ showLabelOnTop
24331
+ }) => {
24272
24332
  const [isFocused, setIsFocused] = React$1.useState(false);
24273
24333
  const [showOptions, setShowOptions] = React$1.useState(false);
24274
24334
  const [inputValue, setInputValue] = React$1.useState("");
@@ -24726,27 +24786,26 @@ const IconContainer$2 = styled__default["default"].div`
24726
24786
  cursor: pointer;
24727
24787
  `;
24728
24788
 
24729
- const QuickFilterDropdownMultiSelection = _ref => {
24730
- let {
24731
- label,
24732
- labelEmptyValue,
24733
- options,
24734
- selectedValue,
24735
- placeHolder,
24736
- onChange,
24737
- required,
24738
- disabled,
24739
- width,
24740
- height,
24741
- error,
24742
- errorMessage,
24743
- labelColor,
24744
- optionHoverColor = '#edf6ff',
24745
- xIconShow,
24746
- checkBoxColor,
24747
- showLabelOnTop,
24748
- dropdownHeight
24749
- } = _ref;
24789
+ const QuickFilterDropdownMultiSelection = ({
24790
+ label,
24791
+ labelEmptyValue,
24792
+ options,
24793
+ selectedValue,
24794
+ placeHolder,
24795
+ onChange,
24796
+ required,
24797
+ disabled,
24798
+ width,
24799
+ height,
24800
+ error,
24801
+ errorMessage,
24802
+ labelColor,
24803
+ optionHoverColor = '#edf6ff',
24804
+ xIconShow,
24805
+ checkBoxColor,
24806
+ showLabelOnTop,
24807
+ dropdownHeight
24808
+ }) => {
24750
24809
  const [isFocused, setIsFocused] = React$1.useState(false);
24751
24810
  const [showOptions, setShowOptions] = React$1.useState(false);
24752
24811
  const [inputValue, setInputValue] = React$1.useState('');
@@ -35226,12 +35285,17 @@ const StyledInput$1 = styled__default["default"].input`
35226
35285
  background-color: ${props => props.isDarkerBackground ? '#F2F2F2' : 'white'} !important;
35227
35286
  width: ${props => props.width || '90%'};
35228
35287
  height: ${props => props.height || 'auto'};
35229
- transition: border-color 0.3s ease;
35230
- font-size: 14px;
35288
+ transition: border-color 0.3s ease;
35231
35289
  font-weight: 400;
35232
35290
  box-sizing: border-box;
35233
35291
  color: ${props => props.disabled ? '#D0D0D0' : (props.isFocused || props.value ? props.textColor : '#757575') || '#333'};
35234
35292
  cursor: ${props => props.disabled ? 'not-allowed' : 'text'};
35293
+ @media (max-width: 1750px) {
35294
+ font-size: 12px;
35295
+ }
35296
+ @media (max-width: 1536px) {
35297
+ font-size: 10px;
35298
+ }
35235
35299
  `;
35236
35300
  const StyledLabel = styled__default["default"].label`
35237
35301
  font-size: 14px;
@@ -36292,9 +36356,9 @@ const ToggleSlider = styled__default["default"].span`
36292
36356
  }
36293
36357
  `;
36294
36358
 
36295
- /**
36296
- * ToggleSwitch component for on/off states.
36297
- * Supports small/large sizes and disabled state.
36359
+ /**
36360
+ * ToggleSwitch component for on/off states.
36361
+ * Supports small/large sizes and disabled state.
36298
36362
  */
36299
36363
  function ToggleSwitch(_ref) {
36300
36364
  let {
@@ -47896,6 +47960,9 @@ const SectionTitle$1 = styled.styled.div`
47896
47960
  color: #212121;
47897
47961
  font-size: 14px;
47898
47962
  font-weight: 700;
47963
+ @media (max-width: 1280px) {
47964
+ font-size: 12px;
47965
+ }
47899
47966
  `;
47900
47967
  const SubtitleContainer = styled.styled.div`
47901
47968
  display: flex;
@@ -47907,6 +47974,9 @@ const Subtitle$1 = styled.styled.span`
47907
47974
  color: ${props => props.color};
47908
47975
  font-size: 14px;
47909
47976
  font-weight: 400;
47977
+ @media (max-width: 1280px) {
47978
+ font-size: 11px;
47979
+ }
47910
47980
  `;
47911
47981
  const AddButtonContainer$1 = styled.styled.div`
47912
47982
  display: flex;
@@ -47923,6 +47993,9 @@ styled.styled(Card)`
47923
47993
  `;
47924
47994
  const VendorHeader$2 = styled.styled.div`
47925
47995
  padding: 16px 24px;
47996
+ @media (max-width: 1280px) {
47997
+ padding: 12px 8px;
47998
+ }
47926
47999
  `;
47927
48000
  styled.styled.button`
47928
48001
  border: none;
@@ -48101,6 +48174,9 @@ const Container$1 = styled.styled.div`
48101
48174
  justify-content: space-between;
48102
48175
  padding: 38px 0 20px;
48103
48176
  box-sizing: border-box;
48177
+ @media (max-width: 1280px) {
48178
+ padding: 20px 0 12px;
48179
+ }
48104
48180
  `;
48105
48181
  const tooltipStyles = styled.css`
48106
48182
  /* CSS-only tooltip */