@evoke-platform/ui-components 1.0.0-dev.126 → 1.0.0-dev.127
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 +2 -2
- package/dist/published/components/custom/FormField/InputFieldComponent/InputFieldComponent.js +1 -1
- package/dist/published/stories/FormField.stories.d.ts +1 -0
- package/dist/published/stories/FormField.stories.js +21 -0
- package/package.json +1 -1
@@ -29,10 +29,10 @@ const Autocomplete = (props) => {
|
|
29
29
|
const isError = props.error && (props.required || props.errorMessage);
|
30
30
|
if (!!props.label && props.labelPlacement === 'outside-top') {
|
31
31
|
return (React.createElement(UIThemeProvider, null,
|
32
|
-
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:
|
32
|
+
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
33
|
" ",
|
34
34
|
props.required ? React.createElement("span", { style: { color: 'red' } }, "*") : null),
|
35
|
-
props.instructionText && React.createElement(Typography, {
|
35
|
+
props.instructionText && React.createElement(Typography, { fontSize: '10px', lineHeight: '14px' }, props.instructionText),
|
36
36
|
React.createElement(MUIAutocomplete, Object.assign({}, props, { sx: Object.assign({ '& fieldset': { borderRadius: '8px', borderColor: isError ? 'red' : undefined } }, props.sx), options: sortedOptions, popupIcon: (_d = props.popupIcon) !== null && _d !== void 0 ? _d : React.createElement(ExpandMore, null) })),
|
37
37
|
isError && React.createElement(FieldError, { required: props.required, label: props.errorMessage })));
|
38
38
|
}
|
package/dist/published/components/custom/FormField/InputFieldComponent/InputFieldComponent.js
CHANGED
@@ -47,7 +47,7 @@ const InputFieldComponent = (props) => {
|
|
47
47
|
setInputValue(selectValue);
|
48
48
|
};
|
49
49
|
const InputProps = property.type === 'number'
|
50
|
-
? { inputComponent: NumericFormat, min, max }
|
50
|
+
? { inputComponent: NumericFormat, inputProps: { min, max, readOnly } }
|
51
51
|
: property.type === 'integer'
|
52
52
|
? { inputProps: { min, max } }
|
53
53
|
: null;
|
@@ -2,6 +2,7 @@ import { ComponentMeta, ComponentStory } from '@storybook/react';
|
|
2
2
|
declare const _default: ComponentMeta<(props: import("../components/custom/FormField/FormField").FormFieldProps) => any>;
|
3
3
|
export default _default;
|
4
4
|
export declare const InputField: ComponentStory<(props: import("../components/custom/FormField/FormField").FormFieldProps) => any>;
|
5
|
+
export declare const NumberField: ComponentStory<(props: import("../components/custom/FormField/FormField").FormFieldProps) => any>;
|
5
6
|
export declare const MaskedInput: ComponentStory<(props: import("../components/custom/FormField/FormField").FormFieldProps) => any>;
|
6
7
|
export declare const ChoicesSelectField: ComponentStory<(props: import("../components/custom/FormField/FormField").FormFieldProps) => any>;
|
7
8
|
export declare const DatePickerField: ComponentStory<(props: import("../components/custom/FormField/FormField").FormFieldProps) => any>;
|
@@ -26,6 +26,27 @@ InputField.args = {
|
|
26
26
|
isMultiLineText: true,
|
27
27
|
rows: 5,
|
28
28
|
};
|
29
|
+
export const NumberField = FormFieldTemplate.bind({});
|
30
|
+
NumberField.args = {
|
31
|
+
property: {
|
32
|
+
id: 'price',
|
33
|
+
name: 'Price',
|
34
|
+
type: 'number',
|
35
|
+
// enum?: string[],
|
36
|
+
required: true,
|
37
|
+
},
|
38
|
+
onChange: (id, value) => console.log('id= ', id, 'Value= ', value),
|
39
|
+
defaultValue: '12.99',
|
40
|
+
error: false,
|
41
|
+
required: true,
|
42
|
+
readOnly: true,
|
43
|
+
selectOptions: [],
|
44
|
+
locale: 'string',
|
45
|
+
size: 'small',
|
46
|
+
placeholder: 'string',
|
47
|
+
isMultiLineText: true,
|
48
|
+
rows: 5,
|
49
|
+
};
|
29
50
|
export const MaskedInput = FormFieldTemplate.bind({});
|
30
51
|
MaskedInput.args = {
|
31
52
|
mask: '999-99-9999',
|