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.esm.js +175 -161
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +175 -161
- package/dist/index.js.map +1 -1
- package/dist/types/components/OverlayDropdown/OverlayDropdown.style.d.ts +1 -0
- package/package.json +1 -1
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
|
-
|
|
8944
|
-
|
|
8945
|
-
|
|
8946
|
-
|
|
8947
|
-
|
|
8948
|
-
|
|
8949
|
-
|
|
8950
|
-
|
|
8951
|
-
|
|
8952
|
-
|
|
8953
|
-
|
|
8954
|
-
|
|
8955
|
-
|
|
8956
|
-
|
|
8957
|
-
|
|
8958
|
-
|
|
8959
|
-
|
|
8960
|
-
|
|
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
|
-
|
|
9468
|
-
|
|
9469
|
-
|
|
9470
|
-
|
|
9471
|
-
|
|
9472
|
-
|
|
9473
|
-
|
|
9474
|
-
|
|
9475
|
-
|
|
9476
|
-
|
|
9477
|
-
|
|
9478
|
-
|
|
9479
|
-
|
|
9480
|
-
|
|
9481
|
-
|
|
9482
|
-
|
|
9483
|
-
|
|
9484
|
-
|
|
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
|
-
|
|
10596
|
-
|
|
10597
|
-
|
|
10598
|
-
|
|
10599
|
-
|
|
10600
|
-
|
|
10601
|
-
|
|
10602
|
-
|
|
10603
|
-
|
|
10604
|
-
|
|
10605
|
-
|
|
10606
|
-
|
|
10607
|
-
|
|
10608
|
-
|
|
10609
|
-
|
|
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
|
-
|
|
11054
|
-
|
|
11055
|
-
|
|
11056
|
-
|
|
11057
|
-
|
|
11058
|
-
|
|
11059
|
-
|
|
11060
|
-
|
|
11061
|
-
|
|
11062
|
-
|
|
11063
|
-
|
|
11064
|
-
|
|
11065
|
-
|
|
11066
|
-
|
|
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
|
-
|
|
24180
|
-
|
|
24181
|
-
|
|
24182
|
-
|
|
24183
|
-
|
|
24184
|
-
|
|
24185
|
-
|
|
24186
|
-
|
|
24187
|
-
|
|
24188
|
-
|
|
24189
|
-
|
|
24190
|
-
|
|
24191
|
-
|
|
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
|
-
|
|
24651
|
-
|
|
24652
|
-
|
|
24653
|
-
|
|
24654
|
-
|
|
24655
|
-
|
|
24656
|
-
|
|
24657
|
-
|
|
24658
|
-
|
|
24659
|
-
|
|
24660
|
-
|
|
24661
|
-
|
|
24662
|
-
|
|
24663
|
-
|
|
24664
|
-
|
|
24665
|
-
|
|
24666
|
-
|
|
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
|
-
|
|
34982
|
-
|
|
34983
|
-
|
|
34984
|
-
|
|
34985
|
-
|
|
34986
|
-
|
|
34987
|
-
|
|
34988
|
-
|
|
34989
|
-
|
|
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
|
-
|
|
36100
|
-
|
|
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
|
-
|
|
36110
|
-
|
|
36111
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
36149
|
-
|
|
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
|
-
|
|
54906
|
-
|
|
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
|
-
|
|
54950
|
-
|
|
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 ?
|
|
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
|
-
},
|
|
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"
|