@evoke-platform/ui-components 1.0.0-dev.133 → 1.0.0-dev.135
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/published/components/core/Autocomplete/Autocomplete.js +4 -5
- package/dist/published/components/core/Button/Button.js +1 -1
- package/dist/published/components/core/FieldError/FieldError.d.ts +1 -1
- package/dist/published/components/core/FieldError/FieldError.js +2 -2
- package/dist/published/components/core/TextField/TextField.js +2 -4
- package/dist/published/components/custom/FormField/Select/Select.js +1 -1
- package/dist/published/icons/custom/TrashCan.d.ts +3 -0
- package/dist/published/icons/custom/TrashCan.js +11 -0
- package/dist/published/icons/custom/index.d.ts +1 -0
- package/dist/published/icons/custom/index.js +1 -0
- package/dist/published/icons/index.d.ts +1 -0
- package/dist/published/icons/index.js +1 -0
- package/package.json +1 -1
@@ -26,20 +26,19 @@ const Autocomplete = (props) => {
|
|
26
26
|
sortedOptions === null || sortedOptions === void 0 ? void 0 : sortedOptions.sort((a, b) => a.label.localeCompare(b.label));
|
27
27
|
break;
|
28
28
|
}
|
29
|
-
const isError = props.error && (props.required || props.errorMessage);
|
30
29
|
if (!!props.label && props.labelPlacement === 'outside-top') {
|
31
30
|
return (React.createElement(UIThemeProvider, null,
|
32
31
|
React.createElement(InputLabel, { "data-testid": "label-outside", htmlFor: (_b = (_a = props.label) === null || _a === void 0 ? void 0 : _a.toString()) !== null && _b !== void 0 ? _b : '', sx: { paddingBottom: '0px', fontSize: '14px' } }, (_c = props.label) !== null && _c !== void 0 ? _c : '',
|
33
32
|
" ",
|
34
33
|
props.required ? React.createElement("span", { style: { color: 'red' } }, "*") : null),
|
35
34
|
props.instructionText && React.createElement(Typography, { fontSize: '10px', lineHeight: '14px' }, props.instructionText),
|
36
|
-
React.createElement(MUIAutocomplete, Object.assign({}, props, { sx: Object.assign({ '& fieldset': { borderRadius: '8px', borderColor:
|
37
|
-
|
35
|
+
React.createElement(MUIAutocomplete, Object.assign({}, props, { sx: Object.assign({ '& fieldset': { borderRadius: '8px', borderColor: props.error ? 'red' : undefined } }, props.sx), options: sortedOptions, popupIcon: (_d = props.popupIcon) !== null && _d !== void 0 ? _d : React.createElement(ExpandMore, null) })),
|
36
|
+
props.error && React.createElement(FieldError, { required: props.required, label: props.errorMessage })));
|
38
37
|
}
|
39
38
|
else {
|
40
39
|
return (React.createElement(UIThemeProvider, null,
|
41
|
-
React.createElement(MUIAutocomplete, Object.assign({}, props, { sx: Object.assign({ '& fieldset': { borderRadius: '8px', borderColor:
|
42
|
-
|
40
|
+
React.createElement(MUIAutocomplete, Object.assign({}, props, { sx: Object.assign({ '& fieldset': { borderRadius: '8px', borderColor: props.error ? 'red' : undefined } }, props.sx), options: sortedOptions, popupIcon: (_e = props.popupIcon) !== null && _e !== void 0 ? _e : React.createElement(ExpandMore, null) })),
|
41
|
+
props.error && React.createElement(FieldError, { required: props.required, label: props.errorMessage })));
|
43
42
|
}
|
44
43
|
};
|
45
44
|
export default Autocomplete;
|
@@ -3,6 +3,6 @@ import { Button as MUIButton } from '@mui/material';
|
|
3
3
|
import UIThemeProvider from '../../../theme';
|
4
4
|
const Button = (props) => {
|
5
5
|
return (React.createElement(UIThemeProvider, null,
|
6
|
-
React.createElement(MUIButton, Object.assign({}, props, { sx: Object.assign({ borderRadius: '8px' }, props.sx) }), props === null || props === void 0 ? void 0 : props.children)));
|
6
|
+
React.createElement(MUIButton, Object.assign({}, props, { sx: Object.assign({ borderRadius: '8px', boxShadow: 'none' }, props.sx) }), props === null || props === void 0 ? void 0 : props.children)));
|
7
7
|
};
|
8
8
|
export default Button;
|
@@ -4,8 +4,8 @@ import { InfoRounded } from '@mui/icons-material';
|
|
4
4
|
const FieldError = (props) => {
|
5
5
|
var _a;
|
6
6
|
const label = (_a = props.label) !== null && _a !== void 0 ? _a : (props.required ? 'Required Field' : '');
|
7
|
-
return (React.createElement(Box, { display: 'flex' },
|
7
|
+
return label ? (React.createElement(Box, { display: 'flex' },
|
8
8
|
React.createElement(InfoRounded, { color: 'error', sx: { fontSize: '12px', paddingRight: '3px', paddingTop: '5px' } }),
|
9
|
-
React.createElement(Typography, { fontSize: '12px', color: 'error' }, label)));
|
9
|
+
React.createElement(Typography, { fontSize: '12px', color: 'error' }, label))) : null;
|
10
10
|
};
|
11
11
|
export default FieldError;
|
@@ -27,10 +27,8 @@ const TextField = (props) => {
|
|
27
27
|
React.createElement(MUITextField, Object.assign({}, props, { label: null, inputProps: { readOnly: readOnly, 'aria-readonly': !!readOnly }, sx: readOnly
|
28
28
|
? readOnlyStyles
|
29
29
|
: Object.assign({ '& fieldset': { borderRadius: '8px' } }, props.sx) })),
|
30
|
-
error && (required
|
31
|
-
React.createElement(FieldError, { required: required, label: errorMessage }))) : (React.createElement(React.Fragment, null,
|
30
|
+
error && React.createElement(FieldError, { required: required, label: errorMessage }))) : (React.createElement(React.Fragment, null,
|
32
31
|
React.createElement(MUITextField, Object.assign({ "data-testid": "label-inside", inputProps: { readOnly: readOnly, 'aria-readonly': !!readOnly } }, props, { sx: readOnly ? readOnlyStyles : Object.assign({ '& fieldset': { borderRadius: '8px' } }, props.sx) })),
|
33
|
-
error && (required
|
34
|
-
React.createElement(FieldError, { required: required, label: errorMessage })))));
|
32
|
+
error && React.createElement(FieldError, { required: required, label: errorMessage })))));
|
35
33
|
};
|
36
34
|
export default TextField;
|
@@ -27,6 +27,6 @@ const Select = (props) => {
|
|
27
27
|
setInputValue(selectValue);
|
28
28
|
}
|
29
29
|
};
|
30
|
-
return readOnly ? (React.createElement(InputFieldComponent, Object.assign({}, props))) : (React.createElement(Autocomplete, { multiple: (property === null || property === void 0 ? void 0 : property.type) === 'array' ? true : false, id: id, renderInput: (params) => React.createElement(TextField, Object.assign({}, params, { value: value, fullWidth: true, onBlur: onBlur })), value: value, onChange: handleChange, options: (property === null || property === void 0 ? void 0 : property.type) === 'array' ? property === null || property === void 0 ? void 0 : property.enum : selectOptions, disableClearable: true, inputValue: inputValue !== null && inputValue !== void 0 ? inputValue : '', error: error, errorMessage: errorMessage, required: required, onInputChange: handleInputValueChange, filterOptions: (option) => { var _a; return (property === null || property === void 0 ? void 0 : property.type) === 'array' ? (_a = property === null || property === void 0 ? void 0 : property.enum) === null || _a === void 0 ? void 0 : _a.filter((item) => item !== option.value) : option; }, size: size }));
|
30
|
+
return readOnly ? (React.createElement(InputFieldComponent, Object.assign({}, props))) : (React.createElement(Autocomplete, { multiple: (property === null || property === void 0 ? void 0 : property.type) === 'array' ? true : false, id: id, renderInput: (params) => React.createElement(TextField, Object.assign({}, params, { value: value, fullWidth: true, onBlur: onBlur })), value: value !== null && value !== void 0 ? value : ((property === null || property === void 0 ? void 0 : property.type) === 'array' ? [] : undefined), onChange: handleChange, options: (property === null || property === void 0 ? void 0 : property.type) === 'array' ? property === null || property === void 0 ? void 0 : property.enum : selectOptions, disableClearable: true, inputValue: inputValue !== null && inputValue !== void 0 ? inputValue : '', error: error, errorMessage: errorMessage, required: required, onInputChange: handleInputValueChange, filterOptions: (option) => { var _a; return (property === null || property === void 0 ? void 0 : property.type) === 'array' ? (_a = property === null || property === void 0 ? void 0 : property.enum) === null || _a === void 0 ? void 0 : _a.filter((item) => item !== option.value) : option; }, size: size }));
|
31
31
|
};
|
32
32
|
export default Select;
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import { Icon } from '@mui/material';
|
3
|
+
export const TrashCan = (props) => {
|
4
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
5
|
+
return (React.createElement(Icon, Object.assign({}, props),
|
6
|
+
React.createElement("svg", { style: { verticalAlign: 'top' }, width: (_b = (_a = props === null || props === void 0 ? void 0 : props.sx) === null || _a === void 0 ? void 0 : _a['width']) !== null && _b !== void 0 ? _b : '24', height: (_d = (_c = props === null || props === void 0 ? void 0 : props.sx) === null || _c === void 0 ? void 0 : _c['height']) !== null && _d !== void 0 ? _d : '24', viewBox: "0 0 20 20", xmlns: "http://www.w3.org/2000/svg" },
|
7
|
+
React.createElement("g", { id: "icon/ic_trash" },
|
8
|
+
React.createElement("path", { id: "Vector", d: "M17.5003 5.00001L13.3337 5.00001V3.60834C13.3141 3.07486 13.0838 2.57089 12.6933 2.20692C12.3028 1.84295 11.7839 1.64867 11.2503 1.66668H8.75033C8.21679 1.64867 7.69788 1.84295 7.30735 2.20692C6.91682 2.57089 6.68654 3.07486 6.66699 3.60834V5.00001H2.50033C2.27931 5.00001 2.06735 5.08781 1.91107 5.24409C1.75479 5.40037 1.66699 5.61233 1.66699 5.83334C1.66699 6.05436 1.75479 6.26632 1.91107 6.4226C2.06735 6.57888 2.27931 6.66668 2.50033 6.66668H3.33366L3.33366 15.8333C3.33366 16.4964 3.59705 17.1323 4.06589 17.6011C4.53473 18.07 5.17062 18.3333 5.83366 18.3333H14.167C14.83 18.3333 15.4659 18.07 15.9348 17.6011C16.4036 17.1323 16.667 16.4964 16.667 15.8333V6.66668H17.5003C17.7213 6.66668 17.9333 6.57888 18.0896 6.4226C18.2459 6.26632 18.3337 6.05436 18.3337 5.83334C18.3337 5.61233 18.2459 5.40037 18.0896 5.24409C17.9333 5.08781 17.7213 5.00001 17.5003 5.00001ZM8.33366 3.60834C8.33366 3.47501 8.50866 3.33334 8.75033 3.33334H11.2503C11.492 3.33334 11.667 3.47501 11.667 3.60834V5.00001H8.33366V3.60834ZM15.0003 15.8333C15.0003 16.0544 14.9125 16.2663 14.7562 16.4226C14.6 16.5789 14.388 16.6667 14.167 16.6667H5.83366C5.61265 16.6667 5.40068 16.5789 5.2444 16.4226C5.08812 16.2663 5.00033 16.0544 5.00033 15.8333L5.00033 6.66668L15.0003 6.66668V15.8333Z", fill: (_f = (_e = props === null || props === void 0 ? void 0 : props.sx) === null || _e === void 0 ? void 0 : _e['color']) !== null && _f !== void 0 ? _f : "#637381" }),
|
9
|
+
React.createElement("path", { id: "Vector_2", d: "M7.50033 14.1667C7.72134 14.1667 7.9333 14.0789 8.08958 13.9226C8.24586 13.7663 8.33366 13.5543 8.33366 13.3333V9.99999C8.33366 9.77898 8.24586 9.56701 8.08958 9.41073C7.9333 9.25445 7.72134 9.16666 7.50033 9.16666C7.27931 9.16666 7.06735 9.25445 6.91107 9.41073C6.75479 9.56701 6.66699 9.77898 6.66699 9.99999V13.3333C6.66699 13.5543 6.75479 13.7663 6.91107 13.9226C7.06735 14.0789 7.27931 14.1667 7.50033 14.1667Z", fill: (_h = (_g = props === null || props === void 0 ? void 0 : props.sx) === null || _g === void 0 ? void 0 : _g['color']) !== null && _h !== void 0 ? _h : "#637381" }),
|
10
|
+
React.createElement("path", { id: "Vector_3", d: "M12.5003 14.1667C12.7213 14.1667 12.9333 14.0789 13.0896 13.9226C13.2459 13.7663 13.3337 13.5543 13.3337 13.3333V9.99999C13.3337 9.77898 13.2459 9.56701 13.0896 9.41073C12.9333 9.25445 12.7213 9.16666 12.5003 9.16666C12.2793 9.16666 12.0674 9.25445 11.9111 9.41073C11.7548 9.56701 11.667 9.77898 11.667 9.99999V13.3333C11.667 13.5543 11.7548 13.7663 11.9111 13.9226C12.0674 14.0789 12.2793 14.1667 12.5003 14.1667Z", fill: (_k = (_j = props === null || props === void 0 ? void 0 : props.sx) === null || _j === void 0 ? void 0 : _j['color']) !== null && _k !== void 0 ? _k : "#637381" })))));
|
11
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from './TrashCan';
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from './TrashCan';
|