sag_components 2.0.0-beta326 → 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.esm.js +149 -90
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +149 -90
- package/dist/index.js.map +1 -1
- package/dist/types/components/DropdownMultiNew/DropdownMultiNew.d.ts +2 -1
- package/dist/types/components/DropdownNew/DropdownNew.stories.d.ts +22 -0
- package/dist/types/icons/CheckBoxIndeterminateIcon.d.ts +6 -0
- package/package.json +1 -1
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
|
-
},
|
|
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 =
|
|
10663
|
-
|
|
10664
|
-
|
|
10665
|
-
|
|
10666
|
-
|
|
10667
|
-
|
|
10668
|
-
|
|
10669
|
-
|
|
10670
|
-
|
|
10671
|
-
|
|
10672
|
-
|
|
10673
|
-
|
|
10674
|
-
|
|
10675
|
-
|
|
10676
|
-
|
|
10677
|
-
|
|
10678
|
-
|
|
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 =
|
|
11122
|
-
|
|
11123
|
-
|
|
11124
|
-
|
|
11125
|
-
|
|
11126
|
-
|
|
11127
|
-
|
|
11128
|
-
|
|
11129
|
-
|
|
11130
|
-
|
|
11131
|
-
|
|
11132
|
-
|
|
11133
|
-
|
|
11134
|
-
|
|
11135
|
-
|
|
11136
|
-
|
|
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
|
-
${
|
|
12344
|
-
|
|
12345
|
-
|
|
12346
|
-
|
|
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 =
|
|
24255
|
-
|
|
24256
|
-
|
|
24257
|
-
|
|
24258
|
-
|
|
24259
|
-
|
|
24260
|
-
|
|
24261
|
-
|
|
24262
|
-
|
|
24263
|
-
|
|
24264
|
-
|
|
24265
|
-
|
|
24266
|
-
|
|
24267
|
-
|
|
24268
|
-
|
|
24269
|
-
|
|
24270
|
-
|
|
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 =
|
|
24730
|
-
|
|
24731
|
-
|
|
24732
|
-
|
|
24733
|
-
|
|
24734
|
-
|
|
24735
|
-
|
|
24736
|
-
|
|
24737
|
-
|
|
24738
|
-
|
|
24739
|
-
|
|
24740
|
-
|
|
24741
|
-
|
|
24742
|
-
|
|
24743
|
-
|
|
24744
|
-
|
|
24745
|
-
|
|
24746
|
-
|
|
24747
|
-
|
|
24748
|
-
|
|
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('');
|
|
@@ -36297,9 +36356,9 @@ const ToggleSlider = styled__default["default"].span`
|
|
|
36297
36356
|
}
|
|
36298
36357
|
`;
|
|
36299
36358
|
|
|
36300
|
-
/**
|
|
36301
|
-
* ToggleSwitch component for on/off states.
|
|
36302
|
-
* Supports small/large sizes and disabled state.
|
|
36359
|
+
/**
|
|
36360
|
+
* ToggleSwitch component for on/off states.
|
|
36361
|
+
* Supports small/large sizes and disabled state.
|
|
36303
36362
|
*/
|
|
36304
36363
|
function ToggleSwitch(_ref) {
|
|
36305
36364
|
let {
|