@hexure/ui 1.13.56 → 1.13.58
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 +16 -10
- 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 +16 -10
- 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 +4 -0
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
|
@@ -953,6 +953,7 @@ const Check$1 = styled.span `
|
|
|
953
953
|
border-width: 2px;
|
|
954
954
|
border-style: solid;
|
|
955
955
|
border-color: ${props => (props.$invalid ? `${Colors.RED.Hex}` : `${Colors.GRAY.Hex}`)};
|
|
956
|
+
background-color: ${props => props.$invalid && props.$isInvalidRedBackground ? '#ffe5e5' : '#ffffff'};
|
|
956
957
|
box-sizing: border-box;
|
|
957
958
|
position: relative;
|
|
958
959
|
&:after {
|
|
@@ -981,11 +982,11 @@ const Label$3 = styled.span `
|
|
|
981
982
|
box-sizing: border-box;
|
|
982
983
|
`;
|
|
983
984
|
const Checkbox = (_a) => {
|
|
984
|
-
var { children, color, disabled, checked, onChange, invalid, tooltip, tabIndex, dataItemid } = _a, accessibleProps = __rest(_a, ["children", "color", "disabled", "checked", "onChange", "invalid", "tooltip", "tabIndex", "dataItemid"]);
|
|
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"]);
|
|
985
986
|
const baseId = dataItemid || 'checkbox';
|
|
986
987
|
return (React.createElement(Wrapper$b, Object.assign({ "$disabled": disabled }, accessibleProps, { "data-itemid": `${baseId}-wrapper` }),
|
|
987
988
|
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' }),
|
|
988
|
-
React.createElement(Check$1, { "$invalid": invalid, "data-itemid": `${baseId}-check` }),
|
|
989
|
+
React.createElement(Check$1, { "$invalid": invalid, "$isInvalidRedBackground": isInvalidRedBackground, "data-itemid": `${baseId}-check` }),
|
|
989
990
|
children ? (React.createElement(Label$3, { color: color, "data-itemid": `${baseId}-label` },
|
|
990
991
|
children,
|
|
991
992
|
tooltip ? React.createElement(Tooltip, Object.assign({}, tooltip)) : null)) : null));
|
|
@@ -1048,6 +1049,7 @@ const Wrapper$a = styled.div `
|
|
|
1048
1049
|
border-width: 1px;
|
|
1049
1050
|
border-style: solid;
|
|
1050
1051
|
border-color: ${props => (props.$invalid ? Colors.RED.Hex : '#cccccc')};
|
|
1052
|
+
background-color: ${props => (props.$invalid && props.$isInvalidRedBackground ? '#ffe5e5' : '#ffffff')};
|
|
1051
1053
|
border-radius: ${({ $style }) => ($style === null || $style === void 0 ? void 0 : $style.borderRadius) || '4px'};
|
|
1052
1054
|
flex-grow: ${({ $style }) => ($style === null || $style === void 0 ? void 0 : $style.flexGrow) || 0};
|
|
1053
1055
|
box-sizing: border-box;
|
|
@@ -1103,7 +1105,7 @@ const SearchInput$1 = styled.input `
|
|
|
1103
1105
|
white-space: nowrap;
|
|
1104
1106
|
`;
|
|
1105
1107
|
const Select = (_a) => {
|
|
1106
|
-
var { options, optionGroups, placeholder = '--Select-One--', readOnly, invalid, searchable = false, value: propValue, onChange, style, tabIndex, dataItemid } = _a, accessibleProps = __rest(_a, ["options", "optionGroups", "placeholder", "readOnly", "invalid", "searchable", "value", "onChange", "style", "tabIndex", "dataItemid"]);
|
|
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"]);
|
|
1107
1109
|
const [searchTerm, setSearchTerm] = React.useState('');
|
|
1108
1110
|
const [value, setValue] = React.useState(propValue || '');
|
|
1109
1111
|
const baseId = dataItemid || 'select';
|
|
@@ -1126,7 +1128,7 @@ const Select = (_a) => {
|
|
|
1126
1128
|
const filteredOptionGroups = searchable
|
|
1127
1129
|
? 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()); }) })))
|
|
1128
1130
|
: optionGroups;
|
|
1129
|
-
return (React.createElement(Wrapper$a, { "$invalid": invalid, "$readOnly": readOnly, "$style": style, "data-itemid": `${baseId}-wrapper` },
|
|
1131
|
+
return (React.createElement(Wrapper$a, { "$invalid": invalid, "$isInvalidRedBackground": isInvalidRedBackground, "$readOnly": readOnly, "$style": style, "data-itemid": `${baseId}-wrapper` },
|
|
1130
1132
|
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))),
|
|
1131
1133
|
React.createElement(Trigger$1, Object.assign({ "data-itemid": `${baseId}-trigger`, disabled: readOnly, onChange: handleChange, placeholder: placeholder, tabIndex: readOnly ? -1 : tabIndex, value: value }, accessibleProps),
|
|
1132
1134
|
placeholder && !value && (React.createElement("option", { "data-itemid": `${baseId}-placeholder`, disabled: true, value: '' }, placeholder)),
|
|
@@ -1817,6 +1819,7 @@ const StyledWrapper = styled.div `
|
|
|
1817
1819
|
border-width: 1px;
|
|
1818
1820
|
border-style: solid;
|
|
1819
1821
|
border-color: ${props => (props.$invalid ? Colors.RED.Hex : '#cccccc')};
|
|
1822
|
+
background-color: ${props => props.$invalid && props.$isInvalidRedBackground ? '#ffe5e5' : '#ffffff'};
|
|
1820
1823
|
border-radius: ${props => (props.$suggestions ? '4px 4px 0px 0px' : '4px')};
|
|
1821
1824
|
|
|
1822
1825
|
&:focus-within {
|
|
@@ -1882,7 +1885,7 @@ const Loader$1 = styled.div `
|
|
|
1882
1885
|
const Input$1 = (_a) => {
|
|
1883
1886
|
var { format, suffix, height, invalid, loading, max, maxLength, min, onBlur, onChange, onFocus, onKeyDown,
|
|
1884
1887
|
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
1885
|
-
onSuggestedSelect = () => { }, placeholder, readOnly, showCharCount, step, style, suggestedValues, showErrorTextColor = false, type = 'text', value = '', innerRef = null, tabIndex, isAutoComplete = false, dataItemid, mask, onPaste, autoComplete } = _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"]);
|
|
1888
|
+
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"]);
|
|
1886
1889
|
const [show_options, setShowOptions] = React.useState(false);
|
|
1887
1890
|
const [internalValue, setInternalValue] = React.useState(value);
|
|
1888
1891
|
const [internalSuggestedValues, setInternalSuggestedValues] = React.useState(suggestedValues || []);
|
|
@@ -1958,7 +1961,7 @@ const Input$1 = (_a) => {
|
|
|
1958
1961
|
formatted_value = formatAsMask(internalValue, mask);
|
|
1959
1962
|
}
|
|
1960
1963
|
const baseId = dataItemid || 'input';
|
|
1961
|
-
return type === 'textarea' ? (React.createElement(StyledWrapper, { "$invalid": invalid, "$readOnly": readOnly, "$style": style, "$suggestions": show_options && !!internalSuggestedValues.length, "data-itemid": `${baseId}-wrapper`, style: style },
|
|
1964
|
+
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 },
|
|
1962
1965
|
React.createElement(StyledTextArea, Object.assign({ "$height": height, "$invalid": invalid, "$readOnly": readOnly, "$showErrorTextColor": showErrorTextColor, autoComplete: autoComplete, maxLength: maxLength, onBlur: readOnly
|
|
1963
1966
|
? e => e.preventDefault()
|
|
1964
1967
|
: e => {
|
|
@@ -1981,7 +1984,7 @@ const Input$1 = (_a) => {
|
|
|
1981
1984
|
React.createElement(Icon, { color: Colors.MEDIUM_GRAY.Hex, path: js.mdiLoading, size: '20px', spin: true }))) : null,
|
|
1982
1985
|
showCharCount ? (React.createElement(CharacterCount, { "data-itemid": `${baseId}-char-count` },
|
|
1983
1986
|
internalValue.length,
|
|
1984
|
-
maxLength ? ` / ${maxLength}` : null)) : null)) : (React.createElement(StyledWrapper, { "$invalid": invalid, "$readOnly": readOnly, "$style": style, "$suggestions": show_options && !!internalSuggestedValues.length, "data-itemid": `${baseId}-wrapper`, style: style },
|
|
1987
|
+
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 },
|
|
1985
1988
|
React.createElement(StyledInput, Object.assign({ "$height": height, "$invalid": invalid, "$readOnly": readOnly, "$showErrorTextColor": showErrorTextColor, autoComplete: autoComplete, max: max, maxLength: maxLength, min: min, onBlur: readOnly
|
|
1986
1989
|
? e => e.preventDefault()
|
|
1987
1990
|
: e => {
|
|
@@ -2091,6 +2094,7 @@ const Step = styled.div `
|
|
|
2091
2094
|
align-items: center;
|
|
2092
2095
|
gap: 8px;
|
|
2093
2096
|
`;
|
|
2097
|
+
const StyledIconWWrapper = styled.div ``;
|
|
2094
2098
|
const StyledIcon$2 = styled(Icon) `
|
|
2095
2099
|
> path {
|
|
2096
2100
|
fill: ${props => props.theme.PRIMARY_COLOR.Hex} !important;
|
|
@@ -2166,7 +2170,8 @@ const ProgressBar = ({ steps, showStepLine = false, dataItemid }) => {
|
|
|
2166
2170
|
return (React.createElement(React.Fragment, { key: i },
|
|
2167
2171
|
i !== 0 && showStepLine && (React.createElement(StepLine, { "$active": step.active, "data-itemid": `${stepId}-line` })),
|
|
2168
2172
|
React.createElement(Step, { "data-itemid": `${stepId}-step` },
|
|
2169
|
-
step.complete ? (React.createElement(
|
|
2173
|
+
step.complete ? (React.createElement(StyledIconWWrapper, { "data-itemid": `${stepId}-icon-wrapper` },
|
|
2174
|
+
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)),
|
|
2170
2175
|
React.createElement(StepLabel, { "data-itemid": `${stepId}-label` },
|
|
2171
2176
|
step.label,
|
|
2172
2177
|
step.percentComplete !== undefined && (React.createElement(ProgressBarFill, { "$percent": step.percentComplete, "data-itemid": `${stepId}-fill` }))))));
|
|
@@ -2534,6 +2539,7 @@ const Check = styled.span `
|
|
|
2534
2539
|
border-width: 2px;
|
|
2535
2540
|
border-style: solid;
|
|
2536
2541
|
border-color: ${props => (props.$invalid ? `${Colors.RED.Hex}` : `${Colors.GRAY.Hex}`)};
|
|
2542
|
+
background-color: ${props => props.$invalid && props.$isInvalidRedBackground ? '#ffe5e5' : '#ffffff'};
|
|
2537
2543
|
box-sizing: border-box;
|
|
2538
2544
|
position: relative;
|
|
2539
2545
|
&:after {
|
|
@@ -2557,11 +2563,11 @@ const Label = styled.span `
|
|
|
2557
2563
|
margin-left: 6px;
|
|
2558
2564
|
`;
|
|
2559
2565
|
const Radio = (_a) => {
|
|
2560
|
-
var { children, disabled, checked, onChange, value, invalid, tooltip, tabIndex, dataItemid } = _a, accessibleProps = __rest(_a, ["children", "disabled", "checked", "onChange", "value", "invalid", "tooltip", "tabIndex", "dataItemid"]);
|
|
2566
|
+
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"]);
|
|
2561
2567
|
const baseId = dataItemid || 'radio';
|
|
2562
2568
|
return (React.createElement(Wrapper$2, Object.assign({}, accessibleProps, { "data-itemid": `${baseId}-wrapper` }),
|
|
2563
2569
|
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 }),
|
|
2564
|
-
React.createElement(Check, { "$invalid": invalid, "data-itemid": `${baseId}-check` }),
|
|
2570
|
+
React.createElement(Check, { "$invalid": invalid, "$isInvalidRedBackground": isInvalidRedBackground, "data-itemid": `${baseId}-check` }),
|
|
2565
2571
|
React.createElement(Label, { "data-itemid": `${baseId}-label` },
|
|
2566
2572
|
children,
|
|
2567
2573
|
tooltip ? React.createElement(Tooltip, Object.assign({}, tooltip)) : null)));
|