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.esm.js
CHANGED
|
@@ -8929,26 +8929,27 @@ const IconContainer$5 = styled.div`
|
|
|
8929
8929
|
cursor: pointer;
|
|
8930
8930
|
`;
|
|
8931
8931
|
|
|
8932
|
-
const DropdownSingleNew =
|
|
8933
|
-
|
|
8934
|
-
|
|
8935
|
-
|
|
8936
|
-
|
|
8937
|
-
|
|
8938
|
-
|
|
8939
|
-
|
|
8940
|
-
|
|
8941
|
-
|
|
8942
|
-
|
|
8943
|
-
|
|
8944
|
-
|
|
8945
|
-
|
|
8946
|
-
|
|
8947
|
-
|
|
8948
|
-
|
|
8949
|
-
|
|
8950
|
-
|
|
8951
|
-
|
|
8932
|
+
const DropdownSingleNew = _ref => {
|
|
8933
|
+
let {
|
|
8934
|
+
label,
|
|
8935
|
+
labelEmptyValue,
|
|
8936
|
+
options,
|
|
8937
|
+
selectedValue,
|
|
8938
|
+
onChange,
|
|
8939
|
+
required,
|
|
8940
|
+
disabled,
|
|
8941
|
+
width,
|
|
8942
|
+
height,
|
|
8943
|
+
withMarginBottom = true,
|
|
8944
|
+
error,
|
|
8945
|
+
errorMessage,
|
|
8946
|
+
xIconShow,
|
|
8947
|
+
labelColor,
|
|
8948
|
+
showLabelOnTop,
|
|
8949
|
+
orderBy,
|
|
8950
|
+
placeHolder = "",
|
|
8951
|
+
elementType
|
|
8952
|
+
} = _ref;
|
|
8952
8953
|
const [isFocused, setIsFocused] = useState(false);
|
|
8953
8954
|
const [showOptions, setShowOptions] = useState(false);
|
|
8954
8955
|
const [showAbove, setShowAbove] = useState(false);
|
|
@@ -9453,26 +9454,27 @@ const IconContainer$4 = styled.div`
|
|
|
9453
9454
|
cursor: pointer;
|
|
9454
9455
|
`;
|
|
9455
9456
|
|
|
9456
|
-
const DropdownMultiNew =
|
|
9457
|
-
|
|
9458
|
-
|
|
9459
|
-
|
|
9460
|
-
|
|
9461
|
-
|
|
9462
|
-
|
|
9463
|
-
|
|
9464
|
-
|
|
9465
|
-
|
|
9466
|
-
|
|
9467
|
-
|
|
9468
|
-
|
|
9469
|
-
|
|
9470
|
-
|
|
9471
|
-
|
|
9472
|
-
|
|
9473
|
-
|
|
9474
|
-
|
|
9475
|
-
|
|
9457
|
+
const DropdownMultiNew = _ref => {
|
|
9458
|
+
let {
|
|
9459
|
+
label,
|
|
9460
|
+
labelEmptyValue,
|
|
9461
|
+
options,
|
|
9462
|
+
selectedValue,
|
|
9463
|
+
onChange,
|
|
9464
|
+
required,
|
|
9465
|
+
disabled,
|
|
9466
|
+
width,
|
|
9467
|
+
height,
|
|
9468
|
+
withMarginBottom = true,
|
|
9469
|
+
error,
|
|
9470
|
+
errorMessage,
|
|
9471
|
+
labelColor,
|
|
9472
|
+
xIconShow,
|
|
9473
|
+
checkBoxColor,
|
|
9474
|
+
showLabelOnTop,
|
|
9475
|
+
orderBy,
|
|
9476
|
+
elementType
|
|
9477
|
+
} = _ref;
|
|
9476
9478
|
const [isFocused, setIsFocused] = useState(false);
|
|
9477
9479
|
const [showOptions, setShowOptions] = useState(false);
|
|
9478
9480
|
const [showAbove, setShowAbove] = useState(false);
|
|
@@ -10581,23 +10583,24 @@ const QuarterPopupPicker = ({
|
|
|
10581
10583
|
};
|
|
10582
10584
|
|
|
10583
10585
|
/* eslint-disable import/no-extraneous-dependencies */
|
|
10584
|
-
const QuarterPicker =
|
|
10585
|
-
|
|
10586
|
-
|
|
10587
|
-
|
|
10588
|
-
|
|
10589
|
-
|
|
10590
|
-
|
|
10591
|
-
|
|
10592
|
-
|
|
10593
|
-
|
|
10594
|
-
|
|
10595
|
-
|
|
10596
|
-
|
|
10597
|
-
|
|
10598
|
-
|
|
10599
|
-
|
|
10600
|
-
|
|
10586
|
+
const QuarterPicker = _ref => {
|
|
10587
|
+
let {
|
|
10588
|
+
availableQuarters,
|
|
10589
|
+
// ["Q1-2024"]
|
|
10590
|
+
label,
|
|
10591
|
+
onChange,
|
|
10592
|
+
borderRadius,
|
|
10593
|
+
required,
|
|
10594
|
+
width,
|
|
10595
|
+
height,
|
|
10596
|
+
placeholder,
|
|
10597
|
+
disabled,
|
|
10598
|
+
borderColor,
|
|
10599
|
+
borderColorFocus,
|
|
10600
|
+
textColor,
|
|
10601
|
+
selectedValue,
|
|
10602
|
+
startYear
|
|
10603
|
+
} = _ref;
|
|
10601
10604
|
const [isFocused, setIsFocused] = useState(false);
|
|
10602
10605
|
const [isOpen, setIsOpen] = useState(false);
|
|
10603
10606
|
const [value, setValue] = useState('');
|
|
@@ -11039,22 +11042,23 @@ const MonthPopupPicker = ({
|
|
|
11039
11042
|
};
|
|
11040
11043
|
|
|
11041
11044
|
/* eslint-disable import/no-extraneous-dependencies */
|
|
11042
|
-
const MonthPicker =
|
|
11043
|
-
|
|
11044
|
-
|
|
11045
|
-
|
|
11046
|
-
|
|
11047
|
-
|
|
11048
|
-
|
|
11049
|
-
|
|
11050
|
-
|
|
11051
|
-
|
|
11052
|
-
|
|
11053
|
-
|
|
11054
|
-
|
|
11055
|
-
|
|
11056
|
-
|
|
11057
|
-
|
|
11045
|
+
const MonthPicker = _ref => {
|
|
11046
|
+
let {
|
|
11047
|
+
availableMonths,
|
|
11048
|
+
label,
|
|
11049
|
+
onChange,
|
|
11050
|
+
borderRadius,
|
|
11051
|
+
required,
|
|
11052
|
+
width,
|
|
11053
|
+
height,
|
|
11054
|
+
placeholder,
|
|
11055
|
+
disabled,
|
|
11056
|
+
borderColor,
|
|
11057
|
+
borderColorFocus,
|
|
11058
|
+
textColor,
|
|
11059
|
+
selectedValue,
|
|
11060
|
+
startYear
|
|
11061
|
+
} = _ref;
|
|
11058
11062
|
const [isFocused, setIsFocused] = useState(false);
|
|
11059
11063
|
const [isOpen, setIsOpen] = useState(false);
|
|
11060
11064
|
const [value, setValue] = useState('');
|
|
@@ -24165,21 +24169,22 @@ const DeleteIcon = styled.div`
|
|
|
24165
24169
|
position: absolute;
|
|
24166
24170
|
`;
|
|
24167
24171
|
|
|
24168
|
-
const QuickFilterDropdownSingle =
|
|
24169
|
-
|
|
24170
|
-
|
|
24171
|
-
|
|
24172
|
-
|
|
24173
|
-
|
|
24174
|
-
|
|
24175
|
-
|
|
24176
|
-
|
|
24177
|
-
|
|
24178
|
-
|
|
24179
|
-
|
|
24180
|
-
|
|
24181
|
-
|
|
24182
|
-
|
|
24172
|
+
const QuickFilterDropdownSingle = _ref => {
|
|
24173
|
+
let {
|
|
24174
|
+
label,
|
|
24175
|
+
hoverColor,
|
|
24176
|
+
options,
|
|
24177
|
+
selectedValue,
|
|
24178
|
+
placeHolder,
|
|
24179
|
+
onChange,
|
|
24180
|
+
disabled,
|
|
24181
|
+
width,
|
|
24182
|
+
error,
|
|
24183
|
+
errorMessage,
|
|
24184
|
+
xIconShow,
|
|
24185
|
+
labelColor,
|
|
24186
|
+
showLabelOnTop
|
|
24187
|
+
} = _ref;
|
|
24183
24188
|
const [isFocused, setIsFocused] = useState(false);
|
|
24184
24189
|
const [showOptions, setShowOptions] = useState(false);
|
|
24185
24190
|
const [inputValue, setInputValue] = useState("");
|
|
@@ -24636,25 +24641,26 @@ const IconContainer$2 = styled.div`
|
|
|
24636
24641
|
cursor: pointer;
|
|
24637
24642
|
`;
|
|
24638
24643
|
|
|
24639
|
-
const QuickFilterDropdownMultiSelection =
|
|
24640
|
-
|
|
24641
|
-
|
|
24642
|
-
|
|
24643
|
-
|
|
24644
|
-
|
|
24645
|
-
|
|
24646
|
-
|
|
24647
|
-
|
|
24648
|
-
|
|
24649
|
-
|
|
24650
|
-
|
|
24651
|
-
|
|
24652
|
-
|
|
24653
|
-
|
|
24654
|
-
|
|
24655
|
-
|
|
24656
|
-
|
|
24657
|
-
|
|
24644
|
+
const QuickFilterDropdownMultiSelection = _ref => {
|
|
24645
|
+
let {
|
|
24646
|
+
label,
|
|
24647
|
+
labelEmptyValue,
|
|
24648
|
+
options,
|
|
24649
|
+
selectedValue,
|
|
24650
|
+
placeHolder,
|
|
24651
|
+
onChange,
|
|
24652
|
+
required,
|
|
24653
|
+
disabled,
|
|
24654
|
+
width,
|
|
24655
|
+
height,
|
|
24656
|
+
error,
|
|
24657
|
+
errorMessage,
|
|
24658
|
+
labelColor,
|
|
24659
|
+
xIconShow,
|
|
24660
|
+
checkBoxColor,
|
|
24661
|
+
showLabelOnTop,
|
|
24662
|
+
dropdownHeight
|
|
24663
|
+
} = _ref;
|
|
24658
24664
|
const [isFocused, setIsFocused] = useState(false);
|
|
24659
24665
|
const [showOptions, setShowOptions] = useState(false);
|
|
24660
24666
|
const [inputValue, setInputValue] = useState('');
|
|
@@ -34967,17 +34973,18 @@ css`
|
|
|
34967
34973
|
* • onApply(start,end) — callback, both numbers (inclusive)
|
|
34968
34974
|
* • onCancel() — callback
|
|
34969
34975
|
*/
|
|
34970
|
-
const WeeksCalendar =
|
|
34971
|
-
|
|
34972
|
-
|
|
34973
|
-
|
|
34974
|
-
|
|
34975
|
-
|
|
34976
|
-
|
|
34977
|
-
|
|
34978
|
-
|
|
34979
|
-
|
|
34980
|
-
|
|
34976
|
+
const WeeksCalendar = _ref => {
|
|
34977
|
+
let {
|
|
34978
|
+
year,
|
|
34979
|
+
defaultStartWeek = null,
|
|
34980
|
+
defaultEndWeek = null,
|
|
34981
|
+
backgroundColor = "#066768",
|
|
34982
|
+
hoverBackgroundColor = "#E6F0F0",
|
|
34983
|
+
allowedWeekRange = null,
|
|
34984
|
+
// New prop for range restriction
|
|
34985
|
+
onApply,
|
|
34986
|
+
onCancel
|
|
34987
|
+
} = _ref;
|
|
34981
34988
|
// state -------------------------------------------------
|
|
34982
34989
|
const [startWeek, setStartWeek] = useState(defaultStartWeek);
|
|
34983
34990
|
const [endWeek, setEndWeek] = useState(defaultEndWeek);
|
|
@@ -36085,9 +36092,12 @@ const ToggleSwitchLabel = styled.label`
|
|
|
36085
36092
|
position: relative;
|
|
36086
36093
|
cursor: pointer;
|
|
36087
36094
|
user-select: none;
|
|
36088
|
-
opacity: ${
|
|
36089
|
-
|
|
36090
|
-
|
|
36095
|
+
opacity: ${_ref => {
|
|
36096
|
+
let {
|
|
36097
|
+
disabled
|
|
36098
|
+
} = _ref;
|
|
36099
|
+
return disabled ? 0.5 : 1;
|
|
36100
|
+
}};
|
|
36091
36101
|
`;
|
|
36092
36102
|
const ToggleInput = styled.input`
|
|
36093
36103
|
display: none;
|
|
@@ -36095,15 +36105,19 @@ const ToggleInput = styled.input`
|
|
|
36095
36105
|
const ToggleSlider = styled.span`
|
|
36096
36106
|
display: block;
|
|
36097
36107
|
position: relative;
|
|
36098
|
-
background: ${
|
|
36099
|
-
|
|
36100
|
-
|
|
36101
|
-
|
|
36108
|
+
background: ${_ref2 => {
|
|
36109
|
+
let {
|
|
36110
|
+
checked,
|
|
36111
|
+
disabled
|
|
36112
|
+
} = _ref2;
|
|
36113
|
+
return checked ? disabled ? "#7bb1b0" : "#006d6a" : "#cfd8dc";
|
|
36114
|
+
}};
|
|
36102
36115
|
border-radius: 999px;
|
|
36103
36116
|
transition: background 0.2s;
|
|
36104
|
-
${
|
|
36105
|
-
|
|
36106
|
-
|
|
36117
|
+
${_ref3 => {
|
|
36118
|
+
let {
|
|
36119
|
+
size
|
|
36120
|
+
} = _ref3;
|
|
36107
36121
|
switch (size) {
|
|
36108
36122
|
case "s":
|
|
36109
36123
|
return css`width: 40px; height: 20px;`;
|
|
@@ -36122,9 +36136,10 @@ const ToggleSlider = styled.span`
|
|
|
36122
36136
|
background: #fff;
|
|
36123
36137
|
border-radius: 50%;
|
|
36124
36138
|
transition: left 0.2s, width 0.2s, height 0.2s;
|
|
36125
|
-
${
|
|
36126
|
-
|
|
36127
|
-
|
|
36139
|
+
${_ref4 => {
|
|
36140
|
+
let {
|
|
36141
|
+
size
|
|
36142
|
+
} = _ref4;
|
|
36128
36143
|
switch (size) {
|
|
36129
36144
|
case "s":
|
|
36130
36145
|
return css`width: 14px; height: 14px;`;
|
|
@@ -36134,10 +36149,11 @@ const ToggleSlider = styled.span`
|
|
|
36134
36149
|
return css`width: 20px; height: 20px;`;
|
|
36135
36150
|
}
|
|
36136
36151
|
}}
|
|
36137
|
-
left: ${
|
|
36138
|
-
|
|
36139
|
-
|
|
36140
|
-
|
|
36152
|
+
left: ${_ref5 => {
|
|
36153
|
+
let {
|
|
36154
|
+
checked,
|
|
36155
|
+
size
|
|
36156
|
+
} = _ref5;
|
|
36141
36157
|
if (!checked) return "3px";
|
|
36142
36158
|
switch (size) {
|
|
36143
36159
|
case "s":
|
|
@@ -36151,9 +36167,9 @@ const ToggleSlider = styled.span`
|
|
|
36151
36167
|
}
|
|
36152
36168
|
`;
|
|
36153
36169
|
|
|
36154
|
-
/**
|
|
36155
|
-
* ToggleSwitch component for on/off states.
|
|
36156
|
-
* Supports small/large sizes and disabled state.
|
|
36170
|
+
/**
|
|
36171
|
+
* ToggleSwitch component for on/off states.
|
|
36172
|
+
* Supports small/large sizes and disabled state.
|
|
36157
36173
|
*/
|
|
36158
36174
|
function ToggleSwitch(_ref) {
|
|
36159
36175
|
let {
|
|
@@ -54891,10 +54907,11 @@ const DropdownList = styled.ul`
|
|
|
54891
54907
|
`}
|
|
54892
54908
|
`;
|
|
54893
54909
|
const SectionDiv = styled.div`
|
|
54894
|
-
${
|
|
54895
|
-
|
|
54896
|
-
|
|
54897
|
-
|
|
54910
|
+
${_ref => {
|
|
54911
|
+
let {
|
|
54912
|
+
$showBorder,
|
|
54913
|
+
margin
|
|
54914
|
+
} = _ref;
|
|
54898
54915
|
switch ($showBorder) {
|
|
54899
54916
|
case 'Template Offer':
|
|
54900
54917
|
return css`border-top: 1px solid #e6e2e2ff;
|
|
@@ -54935,18 +54952,22 @@ const DropdownItem = styled.li`
|
|
|
54935
54952
|
background: ${props => props.disabled ? 'transparent' : props.selected ? props.selectedColor || '#066768' : props.hoverColor || '#E6F0F0'};
|
|
54936
54953
|
}
|
|
54937
54954
|
`;
|
|
54955
|
+
const Wrapper = styled.div`
|
|
54956
|
+
display: flex;
|
|
54957
|
+
align-items: center;
|
|
54958
|
+
width: 100%;
|
|
54959
|
+
`;
|
|
54938
54960
|
const TruncatedText = styled.span`
|
|
54939
|
-
|
|
54940
|
-
|
|
54961
|
+
flex: 1;
|
|
54962
|
+
min-width: 0;
|
|
54963
|
+
overflow: hidden;
|
|
54964
|
+
text-overflow: ellipsis;
|
|
54965
|
+
white-space: nowrap;
|
|
54941
54966
|
line-height: 21px;
|
|
54967
|
+
font-family: "Poppins", sans-serif;
|
|
54942
54968
|
font-size: 14px;
|
|
54943
54969
|
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;
|
|
54970
|
+
color: ${props => props.color};
|
|
54950
54971
|
`;
|
|
54951
54972
|
styled.div`
|
|
54952
54973
|
position: absolute;
|
|
@@ -55362,13 +55383,6 @@ const OverlayDropdown = _ref => {
|
|
|
55362
55383
|
};
|
|
55363
55384
|
const selected = findSelectedItem();
|
|
55364
55385
|
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
55386
|
const getTemplateParams = label => {
|
|
55373
55387
|
if (!label) return [];
|
|
55374
55388
|
|
|
@@ -55517,11 +55531,11 @@ const OverlayDropdown = _ref => {
|
|
|
55517
55531
|
isDarkerBackground: isDarkerBackground,
|
|
55518
55532
|
height: height,
|
|
55519
55533
|
type: "button"
|
|
55520
|
-
}, /*#__PURE__*/React$1.createElement(TruncatedText, {
|
|
55534
|
+
}, /*#__PURE__*/React$1.createElement(Wrapper, null, /*#__PURE__*/React$1.createElement(TruncatedText, {
|
|
55521
55535
|
onMouseEnter: () => setHoveredText(selected?.label),
|
|
55522
55536
|
onMouseLeave: () => setHoveredText(null),
|
|
55523
55537
|
color: !selected && open ? placeHolderColor : "inherit"
|
|
55524
|
-
}, selected ?
|
|
55538
|
+
}, selected ? selected.label : open ? placeHolder : ''), open ? /*#__PURE__*/React$1.createElement(MenuItemUpIcon, {
|
|
55525
55539
|
width: "12px",
|
|
55526
55540
|
height: "12px",
|
|
55527
55541
|
color: "#B1B1B1"
|
|
@@ -55529,7 +55543,7 @@ const OverlayDropdown = _ref => {
|
|
|
55529
55543
|
width: "12px",
|
|
55530
55544
|
height: "12px",
|
|
55531
55545
|
color: "#B1B1B1"
|
|
55532
|
-
})), open && /*#__PURE__*/React$1.createElement(DropdownList, {
|
|
55546
|
+
}))), open && /*#__PURE__*/React$1.createElement(DropdownList, {
|
|
55533
55547
|
ref: dropdownRef,
|
|
55534
55548
|
role: "listbox",
|
|
55535
55549
|
dropdownMaxHeight: dropdownMaxHeight,
|
|
@@ -55571,7 +55585,7 @@ const OverlayDropdown = _ref => {
|
|
|
55571
55585
|
}, /*#__PURE__*/React$1.createElement(TruncatedText, {
|
|
55572
55586
|
onMouseEnter: () => setHoveredText(item.label),
|
|
55573
55587
|
onMouseLeave: () => setHoveredText(null)
|
|
55574
|
-
},
|
|
55588
|
+
}, item.label), group.templateType === 2 ? /*#__PURE__*/React$1.createElement(ChervronRightIcon, {
|
|
55575
55589
|
fill: item.value === value ? "#fff" : "#212121"
|
|
55576
55590
|
}) : group.templateType === 3 && editableDigitalCoupon ? /*#__PURE__*/React$1.createElement(PenIcon, {
|
|
55577
55591
|
fill: item.value === value ? "#fff" : "#212121"
|