@form-eng/mui 1.0.0 → 1.1.0
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/README.md +10 -1
- package/dist/index.d.mts +39 -1
- package/dist/index.d.ts +39 -1
- package/dist/index.js +520 -64
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +508 -61
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @form-eng/mui
|
|
2
2
|
|
|
3
|
-
Material UI (MUI) field components for [`@form-eng/core`](https://www.npmjs.com/package/@form-eng/core). Provides
|
|
3
|
+
Material UI (MUI) field components for [`@form-eng/core`](https://www.npmjs.com/package/@form-eng/core). Provides 22 editable and 6 read-only field types that plug into the core form engine.
|
|
4
4
|
|
|
5
5
|
## Install
|
|
6
6
|
|
|
@@ -83,6 +83,15 @@ function App() {
|
|
|
83
83
|
| `DocumentLinks` | `HookDocumentLinks` | `List` + `TextField` + `IconButton` | URL link CRUD |
|
|
84
84
|
| `StatusDropdown` | `HookStatusDropdown` | `Select` with color dots | Dropdown with color status indicator |
|
|
85
85
|
| `DynamicFragment` | `HookFragment` | Hidden input | Hidden field (form state only) |
|
|
86
|
+
| `RadioGroup` | `HookRadioGroup` | `RadioGroup` + `FormControlLabel` | Single-select radio button group |
|
|
87
|
+
| `CheckboxGroup` | `HookCheckboxGroup` | `FormGroup` + `Checkbox` | Multi-select checkbox group (value: `string[]`) |
|
|
88
|
+
| `Rating` | `HookRating` | `Rating` | Star rating input (value: `number`; configurable `max`, `allowHalf`) |
|
|
89
|
+
| `ColorPicker` | `HookColorPicker` | `<input type="color">` | Native color picker returning hex string |
|
|
90
|
+
| `Autocomplete` | `HookAutocomplete` | `Autocomplete` | Searchable single-select with type-ahead |
|
|
91
|
+
| `FileUpload` | `HookFileUpload` | `<input type="file">` + drag zone | File picker (single or multiple); validates size via `config.maxSizeMb` |
|
|
92
|
+
| `DateRange` | `HookDateRange` | Two `TextField` (type=date) | Two date inputs (From / To); value: `{ start, end }` ISO strings |
|
|
93
|
+
| `DateTime` | `HookDateTime` | `TextField` (type=datetime-local) | Combined date+time input; value: ISO datetime-local string |
|
|
94
|
+
| `PhoneInput` | `HookPhoneInput` | `TextField` with mask | Phone input with inline masking (`us`, `international`, `raw` formats) |
|
|
86
95
|
|
|
87
96
|
### Read-Only Fields
|
|
88
97
|
|
package/dist/index.d.mts
CHANGED
|
@@ -64,6 +64,44 @@ interface IStatusDropdownProps {
|
|
|
64
64
|
}
|
|
65
65
|
declare const StatusDropdown: (props: IFieldProps<IStatusDropdownProps>) => react_jsx_runtime.JSX.Element;
|
|
66
66
|
|
|
67
|
+
declare const RadioGroup: (props: IFieldProps<{}>) => react_jsx_runtime.JSX.Element;
|
|
68
|
+
|
|
69
|
+
declare const CheckboxGroup: (props: IFieldProps<{}>) => react_jsx_runtime.JSX.Element;
|
|
70
|
+
|
|
71
|
+
interface IRatingConfig {
|
|
72
|
+
max?: number;
|
|
73
|
+
allowHalf?: boolean;
|
|
74
|
+
}
|
|
75
|
+
declare const Rating: (props: IFieldProps<IRatingConfig>) => react_jsx_runtime.JSX.Element;
|
|
76
|
+
|
|
77
|
+
declare const ColorPicker: (props: IFieldProps<{}>) => react_jsx_runtime.JSX.Element;
|
|
78
|
+
|
|
79
|
+
declare const Autocomplete: (props: IFieldProps<{}>) => react_jsx_runtime.JSX.Element;
|
|
80
|
+
|
|
81
|
+
interface IFileUploadConfig {
|
|
82
|
+
multiple?: boolean;
|
|
83
|
+
accept?: string;
|
|
84
|
+
maxSizeMb?: number;
|
|
85
|
+
}
|
|
86
|
+
declare const FileUpload: (props: IFieldProps<IFileUploadConfig>) => react_jsx_runtime.JSX.Element;
|
|
87
|
+
|
|
88
|
+
interface IDateRangeConfig {
|
|
89
|
+
minDate?: string;
|
|
90
|
+
maxDate?: string;
|
|
91
|
+
}
|
|
92
|
+
declare const DateRange: (props: IFieldProps<IDateRangeConfig>) => react_jsx_runtime.JSX.Element;
|
|
93
|
+
|
|
94
|
+
interface IDateTimeConfig {
|
|
95
|
+
minDateTime?: string;
|
|
96
|
+
maxDateTime?: string;
|
|
97
|
+
}
|
|
98
|
+
declare const DateTime: (props: IFieldProps<IDateTimeConfig>) => react_jsx_runtime.JSX.Element;
|
|
99
|
+
|
|
100
|
+
interface IPhoneInputConfig {
|
|
101
|
+
format?: "us" | "international" | "raw";
|
|
102
|
+
}
|
|
103
|
+
declare const PhoneInput: (props: IFieldProps<IPhoneInputConfig>) => react_jsx_runtime.JSX.Element;
|
|
104
|
+
|
|
67
105
|
interface IReadOnlyFieldProps {
|
|
68
106
|
readonly value?: string;
|
|
69
107
|
readonly fieldName?: string;
|
|
@@ -138,4 +176,4 @@ declare const DocumentLinksStrings: {
|
|
|
138
176
|
save: string;
|
|
139
177
|
};
|
|
140
178
|
|
|
141
|
-
export { DateControl, DocumentLinks, DocumentLinksStrings, Dropdown, DynamicFragment, FieldClassName, FormLoading, GetFieldDataTestId, type IDocumentLink, type IReadOnlyFieldProps, MultiSelect, MultiSelectSearch, NumberField as Number, PopOutEditor, ReadOnly, ReadOnlyArray, ReadOnlyCumulativeNumber, ReadOnlyDateTime, ReadOnlyRichText, ReadOnlyText, ReadOnlyWithButton, SimpleDropdown, Slider, StatusDropdown, StatusMessage, Textbox, Toggle, createMuiFieldRegistry, formatDateTime };
|
|
179
|
+
export { Autocomplete, CheckboxGroup, ColorPicker, DateControl, DateRange, DateTime, DocumentLinks, DocumentLinksStrings, Dropdown, DynamicFragment, FieldClassName, FileUpload, FormLoading, GetFieldDataTestId, type IDocumentLink, type IReadOnlyFieldProps, MultiSelect, MultiSelectSearch, NumberField as Number, PhoneInput, PopOutEditor, RadioGroup, Rating, ReadOnly, ReadOnlyArray, ReadOnlyCumulativeNumber, ReadOnlyDateTime, ReadOnlyRichText, ReadOnlyText, ReadOnlyWithButton, SimpleDropdown, Slider, StatusDropdown, StatusMessage, Textbox, Toggle, createMuiFieldRegistry, formatDateTime };
|
package/dist/index.d.ts
CHANGED
|
@@ -64,6 +64,44 @@ interface IStatusDropdownProps {
|
|
|
64
64
|
}
|
|
65
65
|
declare const StatusDropdown: (props: IFieldProps<IStatusDropdownProps>) => react_jsx_runtime.JSX.Element;
|
|
66
66
|
|
|
67
|
+
declare const RadioGroup: (props: IFieldProps<{}>) => react_jsx_runtime.JSX.Element;
|
|
68
|
+
|
|
69
|
+
declare const CheckboxGroup: (props: IFieldProps<{}>) => react_jsx_runtime.JSX.Element;
|
|
70
|
+
|
|
71
|
+
interface IRatingConfig {
|
|
72
|
+
max?: number;
|
|
73
|
+
allowHalf?: boolean;
|
|
74
|
+
}
|
|
75
|
+
declare const Rating: (props: IFieldProps<IRatingConfig>) => react_jsx_runtime.JSX.Element;
|
|
76
|
+
|
|
77
|
+
declare const ColorPicker: (props: IFieldProps<{}>) => react_jsx_runtime.JSX.Element;
|
|
78
|
+
|
|
79
|
+
declare const Autocomplete: (props: IFieldProps<{}>) => react_jsx_runtime.JSX.Element;
|
|
80
|
+
|
|
81
|
+
interface IFileUploadConfig {
|
|
82
|
+
multiple?: boolean;
|
|
83
|
+
accept?: string;
|
|
84
|
+
maxSizeMb?: number;
|
|
85
|
+
}
|
|
86
|
+
declare const FileUpload: (props: IFieldProps<IFileUploadConfig>) => react_jsx_runtime.JSX.Element;
|
|
87
|
+
|
|
88
|
+
interface IDateRangeConfig {
|
|
89
|
+
minDate?: string;
|
|
90
|
+
maxDate?: string;
|
|
91
|
+
}
|
|
92
|
+
declare const DateRange: (props: IFieldProps<IDateRangeConfig>) => react_jsx_runtime.JSX.Element;
|
|
93
|
+
|
|
94
|
+
interface IDateTimeConfig {
|
|
95
|
+
minDateTime?: string;
|
|
96
|
+
maxDateTime?: string;
|
|
97
|
+
}
|
|
98
|
+
declare const DateTime: (props: IFieldProps<IDateTimeConfig>) => react_jsx_runtime.JSX.Element;
|
|
99
|
+
|
|
100
|
+
interface IPhoneInputConfig {
|
|
101
|
+
format?: "us" | "international" | "raw";
|
|
102
|
+
}
|
|
103
|
+
declare const PhoneInput: (props: IFieldProps<IPhoneInputConfig>) => react_jsx_runtime.JSX.Element;
|
|
104
|
+
|
|
67
105
|
interface IReadOnlyFieldProps {
|
|
68
106
|
readonly value?: string;
|
|
69
107
|
readonly fieldName?: string;
|
|
@@ -138,4 +176,4 @@ declare const DocumentLinksStrings: {
|
|
|
138
176
|
save: string;
|
|
139
177
|
};
|
|
140
178
|
|
|
141
|
-
export { DateControl, DocumentLinks, DocumentLinksStrings, Dropdown, DynamicFragment, FieldClassName, FormLoading, GetFieldDataTestId, type IDocumentLink, type IReadOnlyFieldProps, MultiSelect, MultiSelectSearch, NumberField as Number, PopOutEditor, ReadOnly, ReadOnlyArray, ReadOnlyCumulativeNumber, ReadOnlyDateTime, ReadOnlyRichText, ReadOnlyText, ReadOnlyWithButton, SimpleDropdown, Slider, StatusDropdown, StatusMessage, Textbox, Toggle, createMuiFieldRegistry, formatDateTime };
|
|
179
|
+
export { Autocomplete, CheckboxGroup, ColorPicker, DateControl, DateRange, DateTime, DocumentLinks, DocumentLinksStrings, Dropdown, DynamicFragment, FieldClassName, FileUpload, FormLoading, GetFieldDataTestId, type IDocumentLink, type IReadOnlyFieldProps, MultiSelect, MultiSelectSearch, NumberField as Number, PhoneInput, PopOutEditor, RadioGroup, Rating, ReadOnly, ReadOnlyArray, ReadOnlyCumulativeNumber, ReadOnlyDateTime, ReadOnlyRichText, ReadOnlyText, ReadOnlyWithButton, SimpleDropdown, Slider, StatusDropdown, StatusMessage, Textbox, Toggle, createMuiFieldRegistry, formatDateTime };
|