sag_components 2.0.0-beta127 → 2.0.0-beta128
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 +7 -1
- package/dist/index.esm.js +135 -81
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +135 -81
- package/dist/index.js.map +1 -1
- package/dist/types/components/OverlayDropdown/OverlayDropdown.d.ts +7 -1
- package/dist/types/components/OverlayDropdown/OverlayDropdown.stories.d.ts +126 -0
- package/dist/types/components/OverlayDropdown/OverlayDropdown.style.d.ts +1 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1464,7 +1464,7 @@ declare function ModalDrawer({ open, onClose, children, widthPercent }: {
|
|
|
1464
1464
|
widthPercent?: number;
|
|
1465
1465
|
}): react_jsx_runtime.JSX.Element;
|
|
1466
1466
|
|
|
1467
|
-
declare function OverlayDropdown({ data, value, onSelectClick, disabled, isDarkerBackground, required, selectedColor, hoverColor, dropdownMaxHeight, width, ...props }: {
|
|
1467
|
+
declare function OverlayDropdown({ data, value, onSelectClick, disabled, isDarkerBackground, required, selectedColor, hoverColor, dropdownMaxHeight, width, label, labelEmptyValue, showLabelOnTop, placeHolder, labelColor, placeHolderColor, ...props }: {
|
|
1468
1468
|
[x: string]: any;
|
|
1469
1469
|
data?: any[];
|
|
1470
1470
|
value: any;
|
|
@@ -1476,6 +1476,12 @@ declare function OverlayDropdown({ data, value, onSelectClick, disabled, isDarke
|
|
|
1476
1476
|
hoverColor?: string;
|
|
1477
1477
|
dropdownMaxHeight?: string;
|
|
1478
1478
|
width?: string;
|
|
1479
|
+
label: any;
|
|
1480
|
+
labelEmptyValue: any;
|
|
1481
|
+
showLabelOnTop: any;
|
|
1482
|
+
placeHolder: any;
|
|
1483
|
+
labelColor: any;
|
|
1484
|
+
placeHolderColor: any;
|
|
1479
1485
|
}): react_jsx_runtime.JSX.Element;
|
|
1480
1486
|
|
|
1481
1487
|
declare function MessageBox({ isOpen, onClose, onConfirm, title, messageTitle, messageText, cancelText, confirmText, width, height }: {
|
package/dist/index.esm.js
CHANGED
|
@@ -54,7 +54,7 @@ const ButtonItem = styled.div`
|
|
|
54
54
|
transition: background-color 0.3s, color 0.3s;
|
|
55
55
|
}
|
|
56
56
|
`;
|
|
57
|
-
const Label$
|
|
57
|
+
const Label$b = styled.label`
|
|
58
58
|
font-family: "Poppins";
|
|
59
59
|
font-size: 14px;
|
|
60
60
|
font-weight: 400;
|
|
@@ -526,7 +526,7 @@ const Button$1 = props => {
|
|
|
526
526
|
onMouseEnter: () => setHover(true),
|
|
527
527
|
onMouseLeave: () => setHover(false),
|
|
528
528
|
borderRadius: borderRadius
|
|
529
|
-
}, commonProps), getIcon(leftIcon), /*#__PURE__*/React$1.createElement(Label$
|
|
529
|
+
}, commonProps), getIcon(leftIcon), /*#__PURE__*/React$1.createElement(Label$b, {
|
|
530
530
|
className: "Label",
|
|
531
531
|
disabled: disabled
|
|
532
532
|
}, text), getIcon(rightIcon)));
|
|
@@ -2968,7 +2968,7 @@ const LinkButtonItem = styled.div`
|
|
|
2968
2968
|
transition: background-color 0.3s, color 0.3s;
|
|
2969
2969
|
}
|
|
2970
2970
|
`;
|
|
2971
|
-
const Label$
|
|
2971
|
+
const Label$a = styled.label`
|
|
2972
2972
|
user-select: none;
|
|
2973
2973
|
pointer-events: none;
|
|
2974
2974
|
`;
|
|
@@ -3231,7 +3231,7 @@ const LinkButton = _ref => {
|
|
|
3231
3231
|
disabled: disabled,
|
|
3232
3232
|
text_color: textColor || (type === 'secondary' ? '#212121' : '#229E38'),
|
|
3233
3233
|
font_size: size === 'small' ? '14px' : '16px'
|
|
3234
|
-
}, getLeftIcon(), /*#__PURE__*/React$1.createElement(Label$
|
|
3234
|
+
}, getLeftIcon(), /*#__PURE__*/React$1.createElement(Label$a, {
|
|
3235
3235
|
className: "Label",
|
|
3236
3236
|
disabled: disabled,
|
|
3237
3237
|
font_size: size === 'small' ? '14px' : '16px'
|
|
@@ -3640,7 +3640,7 @@ const Body = styled.div`
|
|
|
3640
3640
|
border-radius: ${props => props.setBackground ? '12px' : '0'};
|
|
3641
3641
|
box-shadow: ${props => props.setBackground ? '0px 0px 20px 0px rgba(0, 0, 0, 0.10)' : 'unset'};
|
|
3642
3642
|
`;
|
|
3643
|
-
const Label$
|
|
3643
|
+
const Label$9 = styled.div`
|
|
3644
3644
|
font-size: 12px;
|
|
3645
3645
|
font-weight: 400;
|
|
3646
3646
|
padding: 8px;
|
|
@@ -3891,7 +3891,7 @@ const TabMenu = props => {
|
|
|
3891
3891
|
hoverBorderColor: buttonHoverColor
|
|
3892
3892
|
})), showActions && /*#__PURE__*/React$1.createElement(ActionsWrapper, {
|
|
3893
3893
|
className: "ActionsWrapper"
|
|
3894
|
-
}, showLabel && /*#__PURE__*/React$1.createElement(React$1.Fragment, null, /*#__PURE__*/React$1.createElement(Label$
|
|
3894
|
+
}, showLabel && /*#__PURE__*/React$1.createElement(React$1.Fragment, null, /*#__PURE__*/React$1.createElement(Label$9, {
|
|
3895
3895
|
className: "Label"
|
|
3896
3896
|
}, /*#__PURE__*/React$1.createElement("span", null, "Platform: "), "Total"), /*#__PURE__*/React$1.createElement("span", {
|
|
3897
3897
|
className: "separator"
|
|
@@ -8525,7 +8525,7 @@ const DropdownWrapper$2 = styled.div`
|
|
|
8525
8525
|
pointer-events: none;
|
|
8526
8526
|
}
|
|
8527
8527
|
`;
|
|
8528
|
-
const Label$
|
|
8528
|
+
const Label$8 = styled.label`
|
|
8529
8529
|
font-size: ${props => props.isFocused || props.hasValue ? '14px' : '14px'};
|
|
8530
8530
|
font-weight: 400;
|
|
8531
8531
|
padding-inline-end: 5px;
|
|
@@ -8847,7 +8847,7 @@ const DropdownSingleNew = ({
|
|
|
8847
8847
|
disabled: disabled,
|
|
8848
8848
|
error: error,
|
|
8849
8849
|
onClick: handleLabelClick
|
|
8850
|
-
}, /*#__PURE__*/React$1.createElement(Label$
|
|
8850
|
+
}, /*#__PURE__*/React$1.createElement(Label$8, {
|
|
8851
8851
|
className: "Label",
|
|
8852
8852
|
isFocused: isFocused,
|
|
8853
8853
|
labelColor: labelColor,
|
|
@@ -8984,7 +8984,7 @@ const DropdownWrapper$1 = styled.div`
|
|
|
8984
8984
|
pointer-events: none;
|
|
8985
8985
|
}
|
|
8986
8986
|
`;
|
|
8987
|
-
const Label$
|
|
8987
|
+
const Label$7 = styled.label`
|
|
8988
8988
|
font-size: ${props => props.isFocused || props.hasValue ? '14px' : '14px'};
|
|
8989
8989
|
font-weight: 400;
|
|
8990
8990
|
padding-inline-end: 5px;
|
|
@@ -9355,7 +9355,7 @@ const DropdownMultiNew = ({
|
|
|
9355
9355
|
disabled: disabled,
|
|
9356
9356
|
error: error,
|
|
9357
9357
|
onClick: handleLabelClick
|
|
9358
|
-
}, /*#__PURE__*/React$1.createElement(Label$
|
|
9358
|
+
}, /*#__PURE__*/React$1.createElement(Label$7, {
|
|
9359
9359
|
className: "Label",
|
|
9360
9360
|
isFocused: isFocused,
|
|
9361
9361
|
labelColor: labelColor,
|
|
@@ -9873,21 +9873,20 @@ const DatePicker = ({
|
|
|
9873
9873
|
};
|
|
9874
9874
|
|
|
9875
9875
|
/* eslint-disable import/no-extraneous-dependencies */
|
|
9876
|
-
const RangePicker =
|
|
9877
|
-
|
|
9878
|
-
|
|
9879
|
-
|
|
9880
|
-
|
|
9881
|
-
|
|
9882
|
-
|
|
9883
|
-
|
|
9884
|
-
|
|
9885
|
-
|
|
9886
|
-
|
|
9887
|
-
|
|
9888
|
-
|
|
9889
|
-
|
|
9890
|
-
} = _ref;
|
|
9876
|
+
const RangePicker = ({
|
|
9877
|
+
label,
|
|
9878
|
+
onChange,
|
|
9879
|
+
borderRadius,
|
|
9880
|
+
required,
|
|
9881
|
+
width,
|
|
9882
|
+
height,
|
|
9883
|
+
placeholder,
|
|
9884
|
+
disabled,
|
|
9885
|
+
borderColor,
|
|
9886
|
+
borderColorFocus,
|
|
9887
|
+
textColor,
|
|
9888
|
+
selectedValue
|
|
9889
|
+
}) => {
|
|
9891
9890
|
const [isFocused, setIsFocused] = useState(false);
|
|
9892
9891
|
const [isOpen, setIsOpen] = useState(false);
|
|
9893
9892
|
const [value, setValue] = useState(''); // Added value state
|
|
@@ -10311,24 +10310,23 @@ const QuarterPopupPicker = ({
|
|
|
10311
10310
|
};
|
|
10312
10311
|
|
|
10313
10312
|
/* eslint-disable import/no-extraneous-dependencies */
|
|
10314
|
-
const QuarterPicker =
|
|
10315
|
-
|
|
10316
|
-
|
|
10317
|
-
|
|
10318
|
-
|
|
10319
|
-
|
|
10320
|
-
|
|
10321
|
-
|
|
10322
|
-
|
|
10323
|
-
|
|
10324
|
-
|
|
10325
|
-
|
|
10326
|
-
|
|
10327
|
-
|
|
10328
|
-
|
|
10329
|
-
|
|
10330
|
-
|
|
10331
|
-
} = _ref;
|
|
10313
|
+
const QuarterPicker = ({
|
|
10314
|
+
availableQuarters,
|
|
10315
|
+
// ["Q1-2024"]
|
|
10316
|
+
label,
|
|
10317
|
+
onChange,
|
|
10318
|
+
borderRadius,
|
|
10319
|
+
required,
|
|
10320
|
+
width,
|
|
10321
|
+
height,
|
|
10322
|
+
placeholder,
|
|
10323
|
+
disabled,
|
|
10324
|
+
borderColor,
|
|
10325
|
+
borderColorFocus,
|
|
10326
|
+
textColor,
|
|
10327
|
+
selectedValue,
|
|
10328
|
+
startYear
|
|
10329
|
+
}) => {
|
|
10332
10330
|
const [isFocused, setIsFocused] = useState(false);
|
|
10333
10331
|
const [isOpen, setIsOpen] = useState(false);
|
|
10334
10332
|
const [value, setValue] = useState('');
|
|
@@ -10770,23 +10768,22 @@ const MonthPopupPicker = ({
|
|
|
10770
10768
|
};
|
|
10771
10769
|
|
|
10772
10770
|
/* eslint-disable import/no-extraneous-dependencies */
|
|
10773
|
-
const MonthPicker =
|
|
10774
|
-
|
|
10775
|
-
|
|
10776
|
-
|
|
10777
|
-
|
|
10778
|
-
|
|
10779
|
-
|
|
10780
|
-
|
|
10781
|
-
|
|
10782
|
-
|
|
10783
|
-
|
|
10784
|
-
|
|
10785
|
-
|
|
10786
|
-
|
|
10787
|
-
|
|
10788
|
-
|
|
10789
|
-
} = _ref;
|
|
10771
|
+
const MonthPicker = ({
|
|
10772
|
+
availableMonths,
|
|
10773
|
+
label,
|
|
10774
|
+
onChange,
|
|
10775
|
+
borderRadius,
|
|
10776
|
+
required,
|
|
10777
|
+
width,
|
|
10778
|
+
height,
|
|
10779
|
+
placeholder,
|
|
10780
|
+
disabled,
|
|
10781
|
+
borderColor,
|
|
10782
|
+
borderColorFocus,
|
|
10783
|
+
textColor,
|
|
10784
|
+
selectedValue,
|
|
10785
|
+
startYear
|
|
10786
|
+
}) => {
|
|
10790
10787
|
const [isFocused, setIsFocused] = useState(false);
|
|
10791
10788
|
const [isOpen, setIsOpen] = useState(false);
|
|
10792
10789
|
const [value, setValue] = useState('');
|
|
@@ -23787,7 +23784,7 @@ const QuickFilterInput = styled.div`
|
|
|
23787
23784
|
font-size: 14px;
|
|
23788
23785
|
border-radius: 8px;
|
|
23789
23786
|
`;
|
|
23790
|
-
const Label$
|
|
23787
|
+
const Label$6 = styled.label`
|
|
23791
23788
|
font-size: 14px;
|
|
23792
23789
|
font-weight: 500;
|
|
23793
23790
|
color: ${props => props.disabled ? '#D0D0D0' : '212121'};
|
|
@@ -24035,7 +24032,7 @@ const QuickFilterDropdownSingle = _ref => {
|
|
|
24035
24032
|
disabled: disabled,
|
|
24036
24033
|
error: error,
|
|
24037
24034
|
onClick: handleLabelClick
|
|
24038
|
-
}, /*#__PURE__*/React$1.createElement(Label$
|
|
24035
|
+
}, /*#__PURE__*/React$1.createElement(Label$6, {
|
|
24039
24036
|
className: "Label",
|
|
24040
24037
|
isFocused: isFocused,
|
|
24041
24038
|
labelColor: labelColor,
|
|
@@ -24142,7 +24139,7 @@ const DropdownWrapper = styled.div`
|
|
|
24142
24139
|
font-size: 14px;
|
|
24143
24140
|
border-radius: 10px;
|
|
24144
24141
|
`;
|
|
24145
|
-
const Label$
|
|
24142
|
+
const Label$5 = styled.label`
|
|
24146
24143
|
font-size: ${props => props.isFocused || props.hasValue ? '14px' : '14px'};
|
|
24147
24144
|
font-weight: 400;
|
|
24148
24145
|
padding-inline-end: 5px;
|
|
@@ -24499,7 +24496,7 @@ const QuickFilterDropdownMultiSelection = _ref => {
|
|
|
24499
24496
|
disabled: disabled,
|
|
24500
24497
|
error: error,
|
|
24501
24498
|
onClick: handleLabelClick
|
|
24502
|
-
}, /*#__PURE__*/React$1.createElement(Label$
|
|
24499
|
+
}, /*#__PURE__*/React$1.createElement(Label$5, {
|
|
24503
24500
|
className: "Label",
|
|
24504
24501
|
isFocused: isFocused,
|
|
24505
24502
|
labelColor: labelColor,
|
|
@@ -29095,7 +29092,7 @@ const Controls$5 = styled.div`
|
|
|
29095
29092
|
display: flex;
|
|
29096
29093
|
align-items: center;
|
|
29097
29094
|
`;
|
|
29098
|
-
const Label$
|
|
29095
|
+
const Label$4 = styled.div`
|
|
29099
29096
|
display: flex;
|
|
29100
29097
|
padding: 0 10px 0 10px;
|
|
29101
29098
|
white-space: nowrap;
|
|
@@ -29175,7 +29172,7 @@ const CheckBox = props => {
|
|
|
29175
29172
|
width: iconSize,
|
|
29176
29173
|
height: iconSize,
|
|
29177
29174
|
color: disabled ? colorDisabled : colorUnchecked
|
|
29178
|
-
})), /*#__PURE__*/React$1.createElement(Label$
|
|
29175
|
+
})), /*#__PURE__*/React$1.createElement(Label$4, {
|
|
29179
29176
|
className: "Label",
|
|
29180
29177
|
"data-testid": "label"
|
|
29181
29178
|
}, label)));
|
|
@@ -35189,7 +35186,7 @@ const MainContainer = styled.div`
|
|
|
35189
35186
|
padding: 0;
|
|
35190
35187
|
cursor: ${props => props.disabled ? 'not-allowed' : 'default'};
|
|
35191
35188
|
`;
|
|
35192
|
-
const Label$
|
|
35189
|
+
const Label$3 = styled.label`
|
|
35193
35190
|
|
|
35194
35191
|
font-size: ${props => props.isFocused || props.hasValue ? '14px' : '14px'};
|
|
35195
35192
|
font-weight: 400;
|
|
@@ -35411,7 +35408,7 @@ const Input$2 = _ref => {
|
|
|
35411
35408
|
error: error,
|
|
35412
35409
|
onClick: handleLabelClick,
|
|
35413
35410
|
size: size
|
|
35414
|
-
}, /*#__PURE__*/React$1.createElement(Label$
|
|
35411
|
+
}, /*#__PURE__*/React$1.createElement(Label$3, {
|
|
35415
35412
|
className: "Label",
|
|
35416
35413
|
isFocused: isFocused,
|
|
35417
35414
|
labelColor: labelColor,
|
|
@@ -36665,7 +36662,7 @@ const FieldRow$1 = styled.div`
|
|
|
36665
36662
|
justify-content: center;
|
|
36666
36663
|
padding: 16px;
|
|
36667
36664
|
`;
|
|
36668
|
-
const Label$
|
|
36665
|
+
const Label$2 = styled.label`
|
|
36669
36666
|
color: #222;
|
|
36670
36667
|
display: flex;
|
|
36671
36668
|
align-items: center;
|
|
@@ -36755,7 +36752,7 @@ const RangePop = props => {
|
|
|
36755
36752
|
e.preventDefault();
|
|
36756
36753
|
if (isValid) onApply(fields);
|
|
36757
36754
|
}
|
|
36758
|
-
}, /*#__PURE__*/React$1.createElement(RadioWrapper, null, radioOptions.map((option, idx) => /*#__PURE__*/React$1.createElement(Label$
|
|
36755
|
+
}, /*#__PURE__*/React$1.createElement(RadioWrapper, null, radioOptions.map((option, idx) => /*#__PURE__*/React$1.createElement(Label$2, {
|
|
36759
36756
|
key: option
|
|
36760
36757
|
}, /*#__PURE__*/React$1.createElement(Radio, {
|
|
36761
36758
|
type: "radio",
|
|
@@ -36768,7 +36765,7 @@ const RangePop = props => {
|
|
|
36768
36765
|
}
|
|
36769
36766
|
}), option))), /*#__PURE__*/React$1.createElement(FieldRow$1, null, params.map((param, idx) => /*#__PURE__*/React$1.createElement(React$1.Fragment, {
|
|
36770
36767
|
key: param.label
|
|
36771
|
-
}, /*#__PURE__*/React$1.createElement(Label$
|
|
36768
|
+
}, /*#__PURE__*/React$1.createElement(Label$2, {
|
|
36772
36769
|
htmlFor: `param-${idx}`
|
|
36773
36770
|
}, param.label), /*#__PURE__*/React$1.createElement(Input$1, {
|
|
36774
36771
|
id: `param-${idx}`,
|
|
@@ -36779,7 +36776,7 @@ const RangePop = props => {
|
|
|
36779
36776
|
onBlur: () => handleBlur(idx),
|
|
36780
36777
|
min: 0,
|
|
36781
36778
|
max: param.type === 'percent' ? 100 : undefined
|
|
36782
|
-
}))), /*#__PURE__*/React$1.createElement(Label$
|
|
36779
|
+
}))), /*#__PURE__*/React$1.createElement(Label$2, null, paramType)), /*#__PURE__*/React$1.createElement(Actions$1, null, /*#__PURE__*/React$1.createElement(ClearButton, {
|
|
36783
36780
|
type: "button",
|
|
36784
36781
|
onClick: () => {
|
|
36785
36782
|
setFields(params.map(() => ''));
|
|
@@ -51351,7 +51348,7 @@ const TruncatedText = styled.span`
|
|
|
51351
51348
|
line-height: 21px;
|
|
51352
51349
|
font-size: 14px;
|
|
51353
51350
|
font-weight: 400;
|
|
51354
|
-
color:
|
|
51351
|
+
color: ${props => props.color};
|
|
51355
51352
|
max-width: 340px;
|
|
51356
51353
|
white-space: nowrap;
|
|
51357
51354
|
overflow: hidden;
|
|
@@ -51373,6 +51370,28 @@ styled.div`
|
|
|
51373
51370
|
/* max-width: 320px; */
|
|
51374
51371
|
white-space: pre-line;
|
|
51375
51372
|
`;
|
|
51373
|
+
const Label$1 = styled.label`
|
|
51374
|
+
font-size: ${props => props.isFocused || props.hasValue ? '14px' : '14px'};
|
|
51375
|
+
font-weight: 400;
|
|
51376
|
+
padding-inline-end: 5px;
|
|
51377
|
+
padding-inline-start: 5px;
|
|
51378
|
+
margin-right: 10px;
|
|
51379
|
+
z-index: 2;
|
|
51380
|
+
color: ${props => props.error ? 'red' : props.disabled ? '#888' : props.labelColor};
|
|
51381
|
+
background-color: ${props => props.showLabelOnTop ? 'white' : 'transparent'} ;
|
|
51382
|
+
position: absolute;
|
|
51383
|
+
top: ${props => props.isFocused || props.hasValue ? '0px' : '24px'};
|
|
51384
|
+
left: ${props => props.isFocused || props.hasValue ? '23px' : '14px'};
|
|
51385
|
+
transform: translateY(-50%);
|
|
51386
|
+
transition: ${props => props.showLabelOnTop ? 'top 0.3s ease, font-size 0.3s ease, color 0.3s ease' : ''} ;
|
|
51387
|
+
display: flex;
|
|
51388
|
+
align-items: center;
|
|
51389
|
+
box-sizing: border-box;
|
|
51390
|
+
gap: 4px;
|
|
51391
|
+
&:hover {
|
|
51392
|
+
cursor: ${props => props.disabled ? 'not-allowed' : 'pointer'};
|
|
51393
|
+
}
|
|
51394
|
+
`;
|
|
51376
51395
|
|
|
51377
51396
|
const DialogOverlay = styled.div`
|
|
51378
51397
|
position: fixed;
|
|
@@ -51597,6 +51616,12 @@ const OverlayDropdown = _ref => {
|
|
|
51597
51616
|
hoverColor = '#E6F0F0',
|
|
51598
51617
|
dropdownMaxHeight = '600px',
|
|
51599
51618
|
width = '100%',
|
|
51619
|
+
label,
|
|
51620
|
+
labelEmptyValue,
|
|
51621
|
+
showLabelOnTop,
|
|
51622
|
+
placeHolder,
|
|
51623
|
+
labelColor,
|
|
51624
|
+
placeHolderColor,
|
|
51600
51625
|
...props
|
|
51601
51626
|
} = _ref;
|
|
51602
51627
|
const [open, setOpen] = useState(false);
|
|
@@ -51667,6 +51692,7 @@ const OverlayDropdown = _ref => {
|
|
|
51667
51692
|
return null;
|
|
51668
51693
|
};
|
|
51669
51694
|
const selected = findSelectedItem();
|
|
51695
|
+
const hasValue = !!selected;
|
|
51670
51696
|
|
|
51671
51697
|
// Tooltip logic for long string
|
|
51672
51698
|
const getDisplayText = text => {
|
|
@@ -51780,10 +51806,42 @@ const OverlayDropdown = _ref => {
|
|
|
51780
51806
|
setOpen(prev => !prev);
|
|
51781
51807
|
};
|
|
51782
51808
|
const dataToRender = getDataWithLastDefined();
|
|
51809
|
+
const getLabel = () => {
|
|
51810
|
+
if (!showLabelOnTop && open) {
|
|
51811
|
+
return "";
|
|
51812
|
+
}
|
|
51813
|
+
if (hasValue) {
|
|
51814
|
+
return label;
|
|
51815
|
+
}
|
|
51816
|
+
return labelEmptyValue;
|
|
51817
|
+
};
|
|
51818
|
+
const getRequired = () => {
|
|
51819
|
+
if (!showLabelOnTop && open) {
|
|
51820
|
+
return "";
|
|
51821
|
+
}
|
|
51822
|
+
if (!showLabelOnTop && !label && hasValue) {
|
|
51823
|
+
return "";
|
|
51824
|
+
}
|
|
51825
|
+
if (required) {
|
|
51826
|
+
return /*#__PURE__*/React$1.createElement("span", {
|
|
51827
|
+
style: {
|
|
51828
|
+
color: "red"
|
|
51829
|
+
}
|
|
51830
|
+
}, "*");
|
|
51831
|
+
}
|
|
51832
|
+
return "";
|
|
51833
|
+
};
|
|
51783
51834
|
return /*#__PURE__*/React$1.createElement(DropdownContainer, {
|
|
51784
51835
|
width: width,
|
|
51785
51836
|
ref: containerRef
|
|
51786
|
-
}, /*#__PURE__*/React$1.createElement(
|
|
51837
|
+
}, /*#__PURE__*/React$1.createElement(Label$1, {
|
|
51838
|
+
className: "Label",
|
|
51839
|
+
isFocused: open,
|
|
51840
|
+
labelColor: labelColor,
|
|
51841
|
+
hasValue: hasValue,
|
|
51842
|
+
disabled: disabled,
|
|
51843
|
+
showLabelOnTop: showLabelOnTop
|
|
51844
|
+
}, getLabel(), getRequired()), /*#__PURE__*/React$1.createElement(DropdownButton, {
|
|
51787
51845
|
ref: buttonRef,
|
|
51788
51846
|
onClick: toggleDropdown,
|
|
51789
51847
|
disabled: disabled,
|
|
@@ -51791,13 +51849,9 @@ const OverlayDropdown = _ref => {
|
|
|
51791
51849
|
type: "button"
|
|
51792
51850
|
}, /*#__PURE__*/React$1.createElement(TruncatedText, {
|
|
51793
51851
|
onMouseEnter: () => setHoveredText(selected?.label),
|
|
51794
|
-
onMouseLeave: () => setHoveredText(null)
|
|
51795
|
-
|
|
51796
|
-
|
|
51797
|
-
color: 'red',
|
|
51798
|
-
marginLeft: '2px'
|
|
51799
|
-
}
|
|
51800
|
-
}, "*")), open ? /*#__PURE__*/React$1.createElement(MenuItemUpIcon, {
|
|
51852
|
+
onMouseLeave: () => setHoveredText(null),
|
|
51853
|
+
color: !selected && open ? placeHolderColor : "inherit"
|
|
51854
|
+
}, selected ? getDisplayText(selected.label) : open ? placeHolder : ''), open ? /*#__PURE__*/React$1.createElement(MenuItemUpIcon, {
|
|
51801
51855
|
width: "12px",
|
|
51802
51856
|
height: "12px",
|
|
51803
51857
|
color: "#B1B1B1"
|