@hexure/ui 1.13.59 → 1.13.61
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/cjs/index.js +119 -28
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/components/Checkbox/Checkbox.d.ts +1 -0
- package/dist/cjs/types/components/Input/Input.d.ts +1 -0
- package/dist/cjs/types/components/Radio/Radio.d.ts +1 -0
- package/dist/cjs/types/components/Select/Select.d.ts +1 -0
- package/dist/esm/index.js +119 -28
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/components/Checkbox/Checkbox.d.ts +1 -0
- package/dist/esm/types/components/Input/Input.d.ts +1 -0
- package/dist/esm/types/components/Radio/Radio.d.ts +1 -0
- package/dist/esm/types/components/Select/Select.d.ts +1 -0
- package/dist/index.d.ts +86 -82
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
|
@@ -376,7 +376,7 @@ const Wrapper$g = styled.div `
|
|
|
376
376
|
justify-content: center;
|
|
377
377
|
box-sizing: border-box;
|
|
378
378
|
`;
|
|
379
|
-
const Container$
|
|
379
|
+
const Container$5 = styled.dialog(props => (Object.assign({ maxWidth: '600px', width: 'auto', borderRadius: '8px', overflow: 'hidden', boxShadow: '0px 10px 30px -15px rgba(0, 0, 0, 0.2)', outline: 'none', border: 'none', position: 'relative', padding: '40px', textAlign: 'center', boxSizing: 'border-box', wordWrap: 'break-word' }, props.$customStyle)));
|
|
380
380
|
const Buttons$1 = styled.div `
|
|
381
381
|
display: flex;
|
|
382
382
|
gap: 10px;
|
|
@@ -389,7 +389,7 @@ const ActionDialog = (_a) => {
|
|
|
389
389
|
var { description, title, primaryButton, secondaryButton, tertiaryButton, style = {}, dataItemid } = _a, accessibleProps = __rest(_a, ["description", "title", "primaryButton", "secondaryButton", "tertiaryButton", "style", "dataItemid"]);
|
|
390
390
|
const baseId = dataItemid || 'action-dialog';
|
|
391
391
|
return (React.createElement(Wrapper$g, Object.assign({}, accessibleProps, { "data-itemid": `${baseId}-wrapper` }),
|
|
392
|
-
React.createElement(Container$
|
|
392
|
+
React.createElement(Container$5, { "$customStyle": style, "data-itemid": `${baseId}-container`, open: true },
|
|
393
393
|
title ? (React.createElement(Heading, { "data-itemid": `${baseId}-title`, margin: '0px 0px 20px 0px', type: 'secondary' }, title)) : null,
|
|
394
394
|
description ? (React.createElement(Copy, { align: 'center', "data-itemid": `${baseId}-description` }, description)) : null,
|
|
395
395
|
primaryButton || secondaryButton || tertiaryButton ? (React.createElement(Buttons$1, { "data-itemid": `${baseId}-buttons` },
|
|
@@ -494,7 +494,7 @@ const Logo = (_a) => {
|
|
|
494
494
|
}
|
|
495
495
|
};
|
|
496
496
|
|
|
497
|
-
const Container$
|
|
497
|
+
const Container$4 = styled.header `
|
|
498
498
|
width: 100%;
|
|
499
499
|
display: flex;
|
|
500
500
|
padding: 20px;
|
|
@@ -519,7 +519,7 @@ const Buttons = styled.div `
|
|
|
519
519
|
`;
|
|
520
520
|
const AppHeader = ({ logoUrl, buttons = [], dataItemid }) => {
|
|
521
521
|
const baseId = dataItemid || 'app-header';
|
|
522
|
-
return (React.createElement(Container$
|
|
522
|
+
return (React.createElement(Container$4, { "data-itemid": `${baseId}-container` },
|
|
523
523
|
React.createElement(LogoWrapper, { "data-itemid": `${baseId}-logo-wrapper` }, logoUrl ? (React.createElement(Image, { "data-itemid": `${baseId}-logo`, src: logoUrl })) : (React.createElement(Logo, { "data-itemid": `${baseId}-default-logo`, height: '30px' }))),
|
|
524
524
|
React.createElement(Buttons, { "data-itemid": `${baseId}-buttons` }, buttons.map((b, i) => (React.createElement(Button, Object.assign({ key: i }, b, { "data-itemid": `${baseId}-button-${i}` })))))));
|
|
525
525
|
};
|
|
@@ -945,6 +945,28 @@ const Input$2 = styled.input `
|
|
|
945
945
|
display: block;
|
|
946
946
|
}
|
|
947
947
|
`;
|
|
948
|
+
const getBackgroundColor$3 = (props) => {
|
|
949
|
+
if (props.$isWarningError) {
|
|
950
|
+
return '#fcf1c9';
|
|
951
|
+
}
|
|
952
|
+
else if (props.$invalid && props.$isInvalidRedBackground) {
|
|
953
|
+
return '#ffe5e5';
|
|
954
|
+
}
|
|
955
|
+
else {
|
|
956
|
+
return '#ffffff';
|
|
957
|
+
}
|
|
958
|
+
};
|
|
959
|
+
const getBorderColor$3 = (props) => {
|
|
960
|
+
if (props.$isWarningError) {
|
|
961
|
+
return 'Orange';
|
|
962
|
+
}
|
|
963
|
+
else if (props.$invalid) {
|
|
964
|
+
return Colors.RED.Hex;
|
|
965
|
+
}
|
|
966
|
+
else {
|
|
967
|
+
return Colors.GRAY.Hex;
|
|
968
|
+
}
|
|
969
|
+
};
|
|
948
970
|
const Check$1 = styled.span `
|
|
949
971
|
height: 17px;
|
|
950
972
|
width: 17px;
|
|
@@ -952,8 +974,8 @@ const Check$1 = styled.span `
|
|
|
952
974
|
background-color: #fff;
|
|
953
975
|
border-width: 2px;
|
|
954
976
|
border-style: solid;
|
|
955
|
-
border-color: ${props => (props
|
|
956
|
-
background-color: ${props => props
|
|
977
|
+
border-color: ${props => getBorderColor$3(props)};
|
|
978
|
+
background-color: ${props => getBackgroundColor$3(props)};
|
|
957
979
|
box-sizing: border-box;
|
|
958
980
|
position: relative;
|
|
959
981
|
&:after {
|
|
@@ -982,11 +1004,11 @@ const Label$3 = styled.span `
|
|
|
982
1004
|
box-sizing: border-box;
|
|
983
1005
|
`;
|
|
984
1006
|
const Checkbox = (_a) => {
|
|
985
|
-
var { children, color, disabled, checked, onChange, invalid, tooltip, tabIndex, dataItemid, isInvalidRedBackground = false } = _a, accessibleProps = __rest(_a, ["children", "color", "disabled", "checked", "onChange", "invalid", "tooltip", "tabIndex", "dataItemid", "isInvalidRedBackground"]);
|
|
1007
|
+
var { children, color, disabled, checked, onChange, invalid, tooltip, tabIndex, dataItemid, isInvalidRedBackground = false, isWarningError = false } = _a, accessibleProps = __rest(_a, ["children", "color", "disabled", "checked", "onChange", "invalid", "tooltip", "tabIndex", "dataItemid", "isInvalidRedBackground", "isWarningError"]);
|
|
986
1008
|
const baseId = dataItemid || 'checkbox';
|
|
987
1009
|
return (React.createElement(Wrapper$b, Object.assign({ "$disabled": disabled }, accessibleProps, { "data-itemid": `${baseId}-wrapper` }),
|
|
988
1010
|
React.createElement(Input$2, { checked: checked, "data-itemid": `${baseId}-input`, disabled: disabled, name: accessibleProps.name, onChange: disabled ? undefined : onChange, tabIndex: disabled ? -1 : tabIndex, type: 'checkbox' }),
|
|
989
|
-
React.createElement(Check$1, { "$invalid": invalid, "$isInvalidRedBackground": isInvalidRedBackground, "data-itemid": `${baseId}-check` }),
|
|
1011
|
+
React.createElement(Check$1, { "$invalid": invalid, "$isInvalidRedBackground": isInvalidRedBackground, "$isWarningError": isWarningError, "data-itemid": `${baseId}-check` }),
|
|
990
1012
|
children ? (React.createElement(Label$3, { color: color, "data-itemid": `${baseId}-label` },
|
|
991
1013
|
children,
|
|
992
1014
|
tooltip ? React.createElement(Tooltip, Object.assign({}, tooltip)) : null)) : null));
|
|
@@ -1040,6 +1062,28 @@ const Checklist = (_a) => {
|
|
|
1040
1062
|
}))));
|
|
1041
1063
|
};
|
|
1042
1064
|
|
|
1065
|
+
const getBackgroundColor$2 = (props) => {
|
|
1066
|
+
if (props.$isWarningError) {
|
|
1067
|
+
return '#fcf1c9';
|
|
1068
|
+
}
|
|
1069
|
+
else if (props.$invalid && props.$isInvalidRedBackground) {
|
|
1070
|
+
return '#ffe5e5';
|
|
1071
|
+
}
|
|
1072
|
+
else {
|
|
1073
|
+
return props.$readOnly ? '#f5f5f5' : '#ffffff';
|
|
1074
|
+
}
|
|
1075
|
+
};
|
|
1076
|
+
const getBorderColor$2 = (props) => {
|
|
1077
|
+
if (props.$isWarningError) {
|
|
1078
|
+
return 'Orange';
|
|
1079
|
+
}
|
|
1080
|
+
else if (props.$invalid) {
|
|
1081
|
+
return Colors.RED.Hex;
|
|
1082
|
+
}
|
|
1083
|
+
else {
|
|
1084
|
+
return '#cccccc';
|
|
1085
|
+
}
|
|
1086
|
+
};
|
|
1043
1087
|
const Wrapper$a = styled.div `
|
|
1044
1088
|
border-radius: 4px;
|
|
1045
1089
|
height: 40px;
|
|
@@ -1048,8 +1092,8 @@ const Wrapper$a = styled.div `
|
|
|
1048
1092
|
cursor: ${props => (props.$readOnly ? 'default' : 'pointer')};
|
|
1049
1093
|
border-width: 1px;
|
|
1050
1094
|
border-style: solid;
|
|
1051
|
-
border-color: ${props => (props
|
|
1052
|
-
background-color: ${props => props
|
|
1095
|
+
border-color: ${props => getBorderColor$2(props)};
|
|
1096
|
+
background-color: ${props => getBackgroundColor$2(props)};
|
|
1053
1097
|
border-radius: ${({ $style }) => ($style === null || $style === void 0 ? void 0 : $style.borderRadius) || '4px'};
|
|
1054
1098
|
flex-grow: ${({ $style }) => ($style === null || $style === void 0 ? void 0 : $style.flexGrow) || 0};
|
|
1055
1099
|
box-sizing: border-box;
|
|
@@ -1105,7 +1149,7 @@ const SearchInput$1 = styled.input `
|
|
|
1105
1149
|
white-space: nowrap;
|
|
1106
1150
|
`;
|
|
1107
1151
|
const Select = (_a) => {
|
|
1108
|
-
var { options, optionGroups, placeholder = '--Select-One--', readOnly, invalid, searchable = false, value: propValue, onChange, style, tabIndex, dataItemid, isInvalidRedBackground = false } = _a, accessibleProps = __rest(_a, ["options", "optionGroups", "placeholder", "readOnly", "invalid", "searchable", "value", "onChange", "style", "tabIndex", "dataItemid", "isInvalidRedBackground"]);
|
|
1152
|
+
var { options, optionGroups, placeholder = '--Select-One--', readOnly, invalid, searchable = false, value: propValue, onChange, style, tabIndex, dataItemid, isInvalidRedBackground = false, isWarningError = false } = _a, accessibleProps = __rest(_a, ["options", "optionGroups", "placeholder", "readOnly", "invalid", "searchable", "value", "onChange", "style", "tabIndex", "dataItemid", "isInvalidRedBackground", "isWarningError"]);
|
|
1109
1153
|
const [searchTerm, setSearchTerm] = React.useState('');
|
|
1110
1154
|
const [value, setValue] = React.useState(propValue || '');
|
|
1111
1155
|
const baseId = dataItemid || 'select';
|
|
@@ -1128,7 +1172,7 @@ const Select = (_a) => {
|
|
|
1128
1172
|
const filteredOptionGroups = searchable
|
|
1129
1173
|
? optionGroups === null || optionGroups === void 0 ? void 0 : optionGroups.map(group => (Object.assign(Object.assign({}, group), { options: group.options.filter(option => { var _a; return (_a = option.label) === null || _a === void 0 ? void 0 : _a.toLowerCase().includes(searchTerm.toLowerCase()); }) })))
|
|
1130
1174
|
: optionGroups;
|
|
1131
|
-
return (React.createElement(Wrapper$a, { "$invalid": invalid, "$isInvalidRedBackground": isInvalidRedBackground, "$readOnly": readOnly, "$style": style, "data-itemid": `${baseId}-wrapper` },
|
|
1175
|
+
return (React.createElement(Wrapper$a, { "$invalid": invalid, "$isInvalidRedBackground": isInvalidRedBackground, "$isWarningError": isWarningError, "$readOnly": readOnly, "$style": style, "data-itemid": `${baseId}-wrapper` },
|
|
1132
1176
|
searchable && (React.createElement(SearchInput$1, Object.assign({ "data-itemid": `${baseId}-search-input`, onChange: handleSearch, placeholder: placeholder, tabIndex: readOnly ? -1 : tabIndex, type: 'text', value: searchTerm }, accessibleProps))),
|
|
1133
1177
|
React.createElement(Trigger$1, Object.assign({ "data-itemid": `${baseId}-trigger`, disabled: readOnly, onChange: handleChange, placeholder: placeholder, tabIndex: readOnly ? -1 : tabIndex, value: value }, accessibleProps),
|
|
1134
1178
|
placeholder && !value && (React.createElement("option", { "data-itemid": `${baseId}-placeholder`, disabled: true, value: '' }, placeholder)),
|
|
@@ -1244,7 +1288,7 @@ const Scrim$1 = styled.div `
|
|
|
1244
1288
|
z-index: ${({ $position }) => ($position === 'fixed' ? 9998 : 10)};
|
|
1245
1289
|
background: ${({ $scrim }) => ($scrim === 'dark' ? 'rgba(0,0,0,0.8)' : 'transparent')};
|
|
1246
1290
|
`;
|
|
1247
|
-
const Container$
|
|
1291
|
+
const Container$3 = styled.div `
|
|
1248
1292
|
z-index: ${({ $position }) => ($position === 'fixed' ? 9999 : 11)};
|
|
1249
1293
|
min-width: 400px;
|
|
1250
1294
|
width: ${({ $width }) => $width || '400px'};
|
|
@@ -1313,7 +1357,7 @@ const Drawer = (_a) => {
|
|
|
1313
1357
|
}, [onClose]);
|
|
1314
1358
|
const baseId = dataItemid || 'drawer';
|
|
1315
1359
|
return (React.createElement(React.Fragment, null,
|
|
1316
|
-
React.createElement(Container$
|
|
1360
|
+
React.createElement(Container$3, Object.assign({}, accessibleProps, { "$position": position, "$width": width, "data-itemid": `${baseId}-container` }),
|
|
1317
1361
|
React.createElement(Header$2, { "data-itemid": `${baseId}-header` },
|
|
1318
1362
|
React.createElement("div", { "data-itemid": `${baseId}-header-content` },
|
|
1319
1363
|
title ? (React.createElement(Heading, { "data-itemid": `${baseId}-title`, type: 'secondary' }, title)) : null,
|
|
@@ -1818,6 +1862,28 @@ const StyledSuffix = styled.div `
|
|
|
1818
1862
|
font-size: ${FontSizes.DEFAULT};
|
|
1819
1863
|
color: ${Colors.BLACK.Hex};
|
|
1820
1864
|
`;
|
|
1865
|
+
const getBackgroundColor$1 = (props) => {
|
|
1866
|
+
if (props.$isWarningError) {
|
|
1867
|
+
return '#fcf1c9';
|
|
1868
|
+
}
|
|
1869
|
+
else if (props.$invalid && props.$isInvalidRedBackground) {
|
|
1870
|
+
return '#ffe5e5';
|
|
1871
|
+
}
|
|
1872
|
+
else {
|
|
1873
|
+
return props.$readOnly ? '#f5f5f5' : '#ffffff';
|
|
1874
|
+
}
|
|
1875
|
+
};
|
|
1876
|
+
const getBorderColor$1 = (props) => {
|
|
1877
|
+
if (props.$isWarningError) {
|
|
1878
|
+
return 'Orange';
|
|
1879
|
+
}
|
|
1880
|
+
else if (props.$invalid) {
|
|
1881
|
+
return Colors.RED.Hex;
|
|
1882
|
+
}
|
|
1883
|
+
else {
|
|
1884
|
+
return '#cccccc';
|
|
1885
|
+
}
|
|
1886
|
+
};
|
|
1821
1887
|
const StyledWrapper = styled.div `
|
|
1822
1888
|
display: flex;
|
|
1823
1889
|
width: ${({ $style }) => ($style === null || $style === void 0 ? void 0 : $style.width) || 'auto'};
|
|
@@ -1825,8 +1891,8 @@ const StyledWrapper = styled.div `
|
|
|
1825
1891
|
position: relative;
|
|
1826
1892
|
border-width: 1px;
|
|
1827
1893
|
border-style: solid;
|
|
1828
|
-
border-color: ${props => (props
|
|
1829
|
-
background-color: ${props => props
|
|
1894
|
+
border-color: ${props => getBorderColor$1(props)};
|
|
1895
|
+
background-color: ${props => getBackgroundColor$1(props)};
|
|
1830
1896
|
border-radius: ${props => (props.$suggestions ? '4px 4px 0px 0px' : '4px')};
|
|
1831
1897
|
|
|
1832
1898
|
&:focus-within {
|
|
@@ -1892,7 +1958,7 @@ const Loader$1 = styled.div `
|
|
|
1892
1958
|
const Input$1 = (_a) => {
|
|
1893
1959
|
var { format, suffix, height, invalid, loading, max, maxLength, min, onBlur, onChange, onFocus, onKeyDown,
|
|
1894
1960
|
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
1895
|
-
onSuggestedSelect = () => { }, placeholder, readOnly, showCharCount, step, style, suggestedValues, showErrorTextColor = false, type = 'text', value = '', innerRef = null, tabIndex, isAutoComplete = false, dataItemid, mask, onPaste, autoComplete, isInvalidRedBackground = false } = _a, accessibleProps = __rest(_a, ["format", "suffix", "height", "invalid", "loading", "max", "maxLength", "min", "onBlur", "onChange", "onFocus", "onKeyDown", "onSuggestedSelect", "placeholder", "readOnly", "showCharCount", "step", "style", "suggestedValues", "showErrorTextColor", "type", "value", "innerRef", "tabIndex", "isAutoComplete", "dataItemid", "mask", "onPaste", "autoComplete", "isInvalidRedBackground"]);
|
|
1961
|
+
onSuggestedSelect = () => { }, placeholder, readOnly, showCharCount, step, style, suggestedValues, showErrorTextColor = false, type = 'text', value = '', innerRef = null, tabIndex, isAutoComplete = false, dataItemid, mask, onPaste, autoComplete, isInvalidRedBackground = false, isWarningError = false } = _a, accessibleProps = __rest(_a, ["format", "suffix", "height", "invalid", "loading", "max", "maxLength", "min", "onBlur", "onChange", "onFocus", "onKeyDown", "onSuggestedSelect", "placeholder", "readOnly", "showCharCount", "step", "style", "suggestedValues", "showErrorTextColor", "type", "value", "innerRef", "tabIndex", "isAutoComplete", "dataItemid", "mask", "onPaste", "autoComplete", "isInvalidRedBackground", "isWarningError"]);
|
|
1896
1962
|
const [show_options, setShowOptions] = React.useState(false);
|
|
1897
1963
|
const [internalValue, setInternalValue] = React.useState(value);
|
|
1898
1964
|
const [internalSuggestedValues, setInternalSuggestedValues] = React.useState(suggestedValues || []);
|
|
@@ -1968,7 +2034,7 @@ const Input$1 = (_a) => {
|
|
|
1968
2034
|
formatted_value = formatAsMask(internalValue, mask);
|
|
1969
2035
|
}
|
|
1970
2036
|
const baseId = dataItemid || 'input';
|
|
1971
|
-
return type === 'textarea' ? (React.createElement(StyledWrapper, { "$invalid": invalid, "$isInvalidRedBackground": isInvalidRedBackground, "$readOnly": readOnly, "$style": style, "$suggestions": show_options && !!internalSuggestedValues.length, "data-itemid": `${baseId}-wrapper`, style: style },
|
|
2037
|
+
return type === 'textarea' ? (React.createElement(StyledWrapper, { "$invalid": invalid, "$isInvalidRedBackground": isInvalidRedBackground, "$isWarningError": isWarningError, "$readOnly": readOnly, "$style": style, "$suggestions": show_options && !!internalSuggestedValues.length, "data-itemid": `${baseId}-wrapper`, style: style },
|
|
1972
2038
|
React.createElement(StyledTextArea, Object.assign({ "$height": height, "$invalid": invalid, "$readOnly": readOnly, "$showErrorTextColor": showErrorTextColor, autoComplete: autoComplete, maxLength: maxLength, onBlur: readOnly
|
|
1973
2039
|
? e => e.preventDefault()
|
|
1974
2040
|
: e => {
|
|
@@ -1991,7 +2057,7 @@ const Input$1 = (_a) => {
|
|
|
1991
2057
|
React.createElement(Icon, { color: Colors.MEDIUM_GRAY.Hex, path: js.mdiLoading, size: '20px', spin: true }))) : null,
|
|
1992
2058
|
showCharCount ? (React.createElement(CharacterCount, { "data-itemid": `${baseId}-char-count` },
|
|
1993
2059
|
internalValue.length,
|
|
1994
|
-
maxLength ? ` / ${maxLength}` : null)) : null)) : (React.createElement(StyledWrapper, { "$invalid": invalid, "$isInvalidRedBackground": isInvalidRedBackground, "$readOnly": readOnly, "$style": style, "$suggestions": show_options && !!internalSuggestedValues.length, "data-itemid": `${baseId}-wrapper`, style: style },
|
|
2060
|
+
maxLength ? ` / ${maxLength}` : null)) : null)) : (React.createElement(StyledWrapper, { "$invalid": invalid, "$isInvalidRedBackground": isInvalidRedBackground, "$isWarningError": isWarningError, "$readOnly": readOnly, "$style": style, "$suggestions": show_options && !!internalSuggestedValues.length, "data-itemid": `${baseId}-wrapper`, style: style },
|
|
1995
2061
|
React.createElement(StyledInput, Object.assign({ "$height": height, "$invalid": invalid, "$readOnly": readOnly, "$showErrorTextColor": showErrorTextColor, autoComplete: autoComplete, max: max, maxLength: maxLength, min: min, onBlur: readOnly
|
|
1996
2062
|
? e => e.preventDefault()
|
|
1997
2063
|
: e => {
|
|
@@ -2137,6 +2203,7 @@ const StepLine = styled.div `
|
|
|
2137
2203
|
background-color: ${props => (props.$active ? Colors.PRIMARY.Hex : Colors.MEDIUM_GRAY.Hex)};
|
|
2138
2204
|
transition: background-color 0.5s ease-in-out;
|
|
2139
2205
|
`;
|
|
2206
|
+
const Container$2 = styled.div ``;
|
|
2140
2207
|
const ProgressBarFill = styled.div `
|
|
2141
2208
|
width: 110px;
|
|
2142
2209
|
height: 8px;
|
|
@@ -2146,8 +2213,7 @@ const ProgressBarFill = styled.div `
|
|
|
2146
2213
|
position: relative;
|
|
2147
2214
|
overflow: hidden;
|
|
2148
2215
|
|
|
2149
|
-
|
|
2150
|
-
content: '${props => (props.$percent === 0 ? '0' : props.$percent)}%';
|
|
2216
|
+
.progress-percentage {
|
|
2151
2217
|
position: absolute;
|
|
2152
2218
|
top: 55%;
|
|
2153
2219
|
left: ${props => props.$percent >= 83 ? 'calc(100% - 25px)' : `calc(${props.$percent}% + 10px)`};
|
|
@@ -2159,8 +2225,7 @@ const ProgressBarFill = styled.div `
|
|
|
2159
2225
|
transition: left 0.5s ease-in-out;
|
|
2160
2226
|
}
|
|
2161
2227
|
|
|
2162
|
-
|
|
2163
|
-
content: '';
|
|
2228
|
+
.progress-bar-fill {
|
|
2164
2229
|
position: absolute;
|
|
2165
2230
|
top: 0;
|
|
2166
2231
|
left: 0;
|
|
@@ -2181,7 +2246,11 @@ const ProgressBar = ({ steps, showStepLine = false, dataItemid }) => {
|
|
|
2181
2246
|
React.createElement(StyledIcon$2, { "data-itemid": `${stepId}-icon`, path: js.mdiCheckboxMarkedCircleOutline, size: '32px' }))) : (React.createElement(StepIndicator, { "$active": step.active, "data-itemid": `${stepId}-indicator` }, i + 1)),
|
|
2182
2247
|
React.createElement(StepLabel, { "data-itemid": `${stepId}-label` },
|
|
2183
2248
|
step.label,
|
|
2184
|
-
step.percentComplete !== undefined && (React.createElement(ProgressBarFill, { "$percent": step.percentComplete, "data-itemid": `${stepId}-fill` }
|
|
2249
|
+
step.percentComplete !== undefined && (React.createElement(ProgressBarFill, { "$percent": step.percentComplete, "data-itemid": `${stepId}-fill` },
|
|
2250
|
+
React.createElement(Container$2, { className: 'progress-bar-fill' }),
|
|
2251
|
+
React.createElement(Container$2, { className: 'progress-percentage', "data-itemid": `${stepId}-percentage` },
|
|
2252
|
+
step.percentComplete,
|
|
2253
|
+
"%")))))));
|
|
2185
2254
|
})));
|
|
2186
2255
|
};
|
|
2187
2256
|
|
|
@@ -2538,6 +2607,28 @@ const Input = styled.input `
|
|
|
2538
2607
|
background-color: ${Colors.MEDIUM_GRAY.Hex};
|
|
2539
2608
|
}
|
|
2540
2609
|
`;
|
|
2610
|
+
const getBackgroundColor = (props) => {
|
|
2611
|
+
if (props.$isWarningError) {
|
|
2612
|
+
return '#fcf1c9';
|
|
2613
|
+
}
|
|
2614
|
+
else if (props.$invalid && props.$isInvalidRedBackground) {
|
|
2615
|
+
return '#ffe5e5';
|
|
2616
|
+
}
|
|
2617
|
+
else {
|
|
2618
|
+
return '#ffffff';
|
|
2619
|
+
}
|
|
2620
|
+
};
|
|
2621
|
+
const getBorderColor = (props) => {
|
|
2622
|
+
if (props.$isWarningError) {
|
|
2623
|
+
return 'Orange';
|
|
2624
|
+
}
|
|
2625
|
+
else if (props.$invalid) {
|
|
2626
|
+
return Colors.RED.Hex;
|
|
2627
|
+
}
|
|
2628
|
+
else {
|
|
2629
|
+
return Colors.GRAY.Hex;
|
|
2630
|
+
}
|
|
2631
|
+
};
|
|
2541
2632
|
const Check = styled.span `
|
|
2542
2633
|
height: 17px;
|
|
2543
2634
|
width: 17px;
|
|
@@ -2545,8 +2636,8 @@ const Check = styled.span `
|
|
|
2545
2636
|
background-color: #fff;
|
|
2546
2637
|
border-width: 2px;
|
|
2547
2638
|
border-style: solid;
|
|
2548
|
-
border-color: ${props => (props
|
|
2549
|
-
background-color: ${props => props
|
|
2639
|
+
border-color: ${props => getBorderColor(props)};
|
|
2640
|
+
background-color: ${props => getBackgroundColor(props)};
|
|
2550
2641
|
box-sizing: border-box;
|
|
2551
2642
|
position: relative;
|
|
2552
2643
|
&:after {
|
|
@@ -2570,11 +2661,11 @@ const Label = styled.span `
|
|
|
2570
2661
|
margin-left: 6px;
|
|
2571
2662
|
`;
|
|
2572
2663
|
const Radio = (_a) => {
|
|
2573
|
-
var { children, disabled, checked, onChange, value, invalid, tooltip, tabIndex, dataItemid, isInvalidRedBackground = false } = _a, accessibleProps = __rest(_a, ["children", "disabled", "checked", "onChange", "value", "invalid", "tooltip", "tabIndex", "dataItemid", "isInvalidRedBackground"]);
|
|
2664
|
+
var { children, disabled, checked, onChange, value, invalid, tooltip, tabIndex, dataItemid, isInvalidRedBackground = false, isWarningError = false } = _a, accessibleProps = __rest(_a, ["children", "disabled", "checked", "onChange", "value", "invalid", "tooltip", "tabIndex", "dataItemid", "isInvalidRedBackground", "isWarningError"]);
|
|
2574
2665
|
const baseId = dataItemid || 'radio';
|
|
2575
2666
|
return (React.createElement(Wrapper$2, Object.assign({}, accessibleProps, { "data-itemid": `${baseId}-wrapper` }),
|
|
2576
2667
|
React.createElement(Input, { checked: checked, "data-itemid": `${baseId}-input`, disabled: disabled, name: accessibleProps.name, onChange: disabled ? undefined : onChange, tabIndex: disabled ? -1 : tabIndex, type: 'radio', value: value }),
|
|
2577
|
-
React.createElement(Check, { "$invalid": invalid, "$isInvalidRedBackground": isInvalidRedBackground, "data-itemid": `${baseId}-check` }),
|
|
2668
|
+
React.createElement(Check, { "$invalid": invalid, "$isInvalidRedBackground": isInvalidRedBackground, "$isWarningError": isWarningError, "data-itemid": `${baseId}-check` }),
|
|
2578
2669
|
React.createElement(Label, { "data-itemid": `${baseId}-label` },
|
|
2579
2670
|
children,
|
|
2580
2671
|
tooltip ? React.createElement(Tooltip, Object.assign({}, tooltip)) : null)));
|