@availity/mui-controlled-form 2.3.1 → 3.0.1
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/CHANGELOG.md +40 -0
- package/dist/index.d.ts +13 -13
- package/dist/index.js +468 -706
- package/package.json +30 -30
- package/project.json +5 -6
- package/src/index.ts +1 -1
- package/src/lib/AsyncAutocomplete.test.tsx +2 -2
- package/src/lib/Autocomplete.test.tsx +2 -2
- package/src/lib/Checkbox.test.tsx +1 -1
- package/src/lib/Checkbox.tsx +1 -3
- package/src/lib/CodesAutocomplete.test.tsx +2 -2
- package/src/lib/Datepicker.test.tsx +1 -1
- package/src/lib/Datepicker.tsx +3 -5
- package/src/lib/Input.test.tsx +1 -1
- package/src/lib/Input.tsx +1 -3
- package/src/lib/OrganizationAutocomplete.test.tsx +2 -2
- package/src/lib/ProviderAutocomplete.test.tsx +2 -2
- package/src/lib/ProviderAutocomplete.tsx +1 -1
- package/src/lib/RadioGroup.test.tsx +1 -1
- package/src/lib/RadioGroup.tsx +2 -5
- package/src/lib/Select.test.tsx +2 -6
- package/src/lib/Select.tsx +1 -3
- package/src/lib/TextField.test.tsx +1 -1
- package/src/lib/TextField.tsx +1 -3
- package/src/lib/Timepicker.test.tsx +1 -1
- package/src/lib/Timepicker.tsx +3 -5
- package/src/lib/Types.tsx +1 -1
- package/dist/index.d.mts +0 -103
- package/dist/index.mjs +0 -777
- package/jest.config.js +0 -7
- package/tsconfig.spec.json +0 -10
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,46 @@
|
|
|
2
2
|
|
|
3
3
|
This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
|
|
4
4
|
|
|
5
|
+
## [3.0.1](https://github.com/Availity/element/compare/@availity/mui-controlled-form@3.0.0...@availity/mui-controlled-form@3.0.1) (2026-06-24)
|
|
6
|
+
|
|
7
|
+
## [3.0.0](https://github.com/Availity/element/compare/@availity/mui-controlled-form@2.3.1...@availity/mui-controlled-form@3.0.0) (2026-06-16)
|
|
8
|
+
|
|
9
|
+
### Dependency Updates
|
|
10
|
+
|
|
11
|
+
* `mui-button` updated to version `2.3.1`
|
|
12
|
+
* `mui-layout` updated to version `2.3.1`
|
|
13
|
+
* `mui-menu` updated to version `2.3.1`
|
|
14
|
+
* `mui-paper` updated to version `2.3.1`
|
|
15
|
+
* `mui-typography` updated to version `2.3.1`
|
|
16
|
+
* `mui-autocomplete` updated to version `2.3.1`
|
|
17
|
+
* `mui-checkbox` updated to version `2.3.1`
|
|
18
|
+
* `mui-datepicker` updated to version `2.3.1`
|
|
19
|
+
* `mui-form-utils` updated to version `2.3.1`
|
|
20
|
+
* `mui-textfield` updated to version `2.3.1`
|
|
21
|
+
* `@availity/mock` updated to version `2.3.1`
|
|
22
|
+
* `theme-provider` updated to version `2.3.1`
|
|
23
|
+
|
|
24
|
+
### ⚠ BREAKING CHANGES
|
|
25
|
+
|
|
26
|
+
* CJS builds removed, packages are ESM-only.
|
|
27
|
+
|
|
28
|
+
- Convert all packages to ESM (type: module)
|
|
29
|
+
- Replace Jest with Vitest for all test targets
|
|
30
|
+
- Migrate ESLint to v9 flat config (eslint.config.js)
|
|
31
|
+
- Build output ESM-only (removed CJS dist/index.js require path)
|
|
32
|
+
- Upgrade @tanstack/react-query from v4 to v5
|
|
33
|
+
- Upgrade @availity/api-axios to v13
|
|
34
|
+
- Drop Node 20 support (engines: ^22.0.0 || ^24.0.0)
|
|
35
|
+
- Bump React to 19.2.7, MUI to 7.3.11, TypeScript to 5.9.3
|
|
36
|
+
- Simplify CI caching with built-in yarn cache action + Nx cache
|
|
37
|
+
- Modernize nx.json configuration
|
|
38
|
+
- Update husky hooks to use yarn directly
|
|
39
|
+
- Replace lint-staged nx affected with direct eslint
|
|
40
|
+
|
|
41
|
+
### Features
|
|
42
|
+
|
|
43
|
+
* migrate to ESM, Vitest, and ESLint 9 flat config ([cc22bb4](https://github.com/Availity/element/commit/cc22bb4a230bc1f3b190f187c4e61249d015b25b))
|
|
44
|
+
|
|
5
45
|
## [2.3.1](https://github.com/Availity/element/compare/@availity/mui-controlled-form@2.3.0...@availity/mui-controlled-form@2.3.1) (2026-05-27)
|
|
6
46
|
|
|
7
47
|
### Dependency Updates
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react from 'react';
|
|
2
2
|
import { AutocompleteProps, AsyncAutocompleteProps, Code, Organization, Provider } from '@availity/mui-autocomplete';
|
|
3
3
|
import { RegisterOptions, FieldValues, ControllerProps as ControllerProps$1 } from 'react-hook-form';
|
|
4
4
|
export { FormProvider, SubmitHandler, UseFormProps, UseFormReturn, useForm, useFormContext } from 'react-hook-form';
|
|
@@ -11,7 +11,7 @@ import { InputProps, RadioGroupProps, FormControlProps, SelectProps } from '@ava
|
|
|
11
11
|
import { TextFieldProps } from '@availity/mui-textfield';
|
|
12
12
|
|
|
13
13
|
type ControlledAutocompleteProps<T, Multiple extends boolean | undefined, DisableClearable extends boolean | undefined, FreeSolo extends boolean | undefined, ChipComponent extends React.ElementType = ChipTypeMap['defaultComponent'], Output = AutocompleteProps<T, Multiple, DisableClearable, FreeSolo, ChipComponent>['value'] | null> = Omit<AutocompleteProps<T, Multiple, DisableClearable, FreeSolo, ChipComponent>, 'onBlur' | 'onChange' | 'value' | 'name'> & Pick<RegisterOptions<FieldValues, string>, 'onBlur' | 'onChange' | 'value'> & ControllerProps & TransformProp<AutocompleteProps<T, Multiple, DisableClearable, FreeSolo, ChipComponent>['value'] | null, Output>;
|
|
14
|
-
declare const ControlledAutocomplete: <T, Multiple extends boolean | undefined = false, DisableClearable extends boolean | undefined = false, FreeSolo extends boolean | undefined = false, ChipComponent extends React.ElementType = ChipTypeMap["defaultComponent"], Output = AutocompleteProps<T, Multiple, DisableClearable, FreeSolo, ChipComponent>["value"] | null>({ name, FieldProps, defaultValue, rules, onBlur, onChange, shouldUnregister, value, transform, ...rest }: ControlledAutocompleteProps<T, Multiple, DisableClearable, FreeSolo, ChipComponent, Output>) =>
|
|
14
|
+
declare const ControlledAutocomplete: <T, Multiple extends boolean | undefined = false, DisableClearable extends boolean | undefined = false, FreeSolo extends boolean | undefined = false, ChipComponent extends React.ElementType = ChipTypeMap["defaultComponent"], Output = AutocompleteProps<T, Multiple, DisableClearable, FreeSolo, ChipComponent>["value"] | null>({ name, FieldProps, defaultValue, rules, onBlur, onChange, shouldUnregister, value, transform, ...rest }: ControlledAutocompleteProps<T, Multiple, DisableClearable, FreeSolo, ChipComponent, Output>) => react.JSX.Element;
|
|
15
15
|
|
|
16
16
|
type ControllerProps = {
|
|
17
17
|
/** Unique name of your input */
|
|
@@ -49,10 +49,10 @@ type ControlledAsyncAutocompleteProps<Option, Multiple extends boolean | undefin
|
|
|
49
49
|
defaultToFirstOption?: boolean;
|
|
50
50
|
defaultToOnlyOption?: boolean;
|
|
51
51
|
} & Omit<AsyncAutocompleteProps<Option, Multiple, DisableClearable, FreeSolo, ChipComponent>, 'onBlur' | 'onChange' | 'value' | 'name'> & Pick<RegisterOptions<FieldValues, string>, 'onBlur' | 'onChange' | 'value'> & ControllerProps & TransformProp<AsyncAutocompleteProps<Option, Multiple, DisableClearable, FreeSolo, ChipComponent>['value'] | null, Output>;
|
|
52
|
-
declare const ControlledAsyncAutocomplete: <Option, Multiple extends boolean | undefined = false, DisableClearable extends boolean | undefined = false, FreeSolo extends boolean | undefined = false, ChipComponent extends React.ElementType = ChipTypeMap["defaultComponent"], Output = AsyncAutocompleteProps<Option, Multiple, DisableClearable, FreeSolo, ChipComponent>["value"] | null>({ name, onBlur, onChange, rules, shouldUnregister, value, FieldProps, defaultToFirstOption, defaultToOnlyOption, transform, ...rest }: ControlledAsyncAutocompleteProps<Option, Multiple, DisableClearable, FreeSolo, ChipComponent, Output>) =>
|
|
52
|
+
declare const ControlledAsyncAutocomplete: <Option, Multiple extends boolean | undefined = false, DisableClearable extends boolean | undefined = false, FreeSolo extends boolean | undefined = false, ChipComponent extends React.ElementType = ChipTypeMap["defaultComponent"], Output = AsyncAutocompleteProps<Option, Multiple, DisableClearable, FreeSolo, ChipComponent>["value"] | null>({ name, onBlur, onChange, rules, shouldUnregister, value, FieldProps, defaultToFirstOption, defaultToOnlyOption, transform, ...rest }: ControlledAsyncAutocompleteProps<Option, Multiple, DisableClearable, FreeSolo, ChipComponent, Output>) => react.JSX.Element;
|
|
53
53
|
|
|
54
54
|
type ControlledCheckboxProps<Output = boolean> = Omit<CheckboxProps, 'disabled' | 'onBlur' | 'onChange' | 'value' | 'name'> & Pick<RegisterOptions<FieldValues, string>, 'disabled' | 'onBlur' | 'onChange' | 'value'> & ControllerProps & TransformProp<boolean, Output>;
|
|
55
|
-
declare const ControlledCheckbox: <Output = boolean>({ name, disabled, onChange, onBlur, value, defaultValue, rules, shouldUnregister, transform, ...rest }: ControlledCheckboxProps<Output>) =>
|
|
55
|
+
declare const ControlledCheckbox: <Output = boolean>({ name, disabled, onChange, onBlur, value, defaultValue, rules, shouldUnregister, transform, ...rest }: ControlledCheckboxProps<Output>) => react.JSX.Element;
|
|
56
56
|
|
|
57
57
|
type Optional<T, K extends keyof T> = Pick<Partial<T>, K> & Omit<T, K>;
|
|
58
58
|
|
|
@@ -62,19 +62,19 @@ interface ControlledCodesAutocompleteProps<Option = Code, Multiple extends boole
|
|
|
62
62
|
/** Config passed to the AvCodesApi.query function */
|
|
63
63
|
apiConfig?: ApiConfig;
|
|
64
64
|
}
|
|
65
|
-
declare const ControlledCodesAutocomplete: <Option = Code, Multiple extends boolean | undefined = false, DisableClearable extends boolean | undefined = false, FreeSolo extends boolean | undefined = false, ChipComponent extends React.ElementType = ChipTypeMap["defaultComponent"], Output = AsyncAutocompleteProps<Option, Multiple, DisableClearable, FreeSolo, ChipComponent>["value"] | null>({ apiConfig, queryOptions, queryKey, list, watchParams, ...rest }: ControlledCodesAutocompleteProps<Option, Multiple, DisableClearable, FreeSolo, ChipComponent, Output>) =>
|
|
65
|
+
declare const ControlledCodesAutocomplete: <Option = Code, Multiple extends boolean | undefined = false, DisableClearable extends boolean | undefined = false, FreeSolo extends boolean | undefined = false, ChipComponent extends React.ElementType = ChipTypeMap["defaultComponent"], Output = AsyncAutocompleteProps<Option, Multiple, DisableClearable, FreeSolo, ChipComponent>["value"] | null>({ apiConfig, queryOptions, queryKey, list, watchParams, ...rest }: ControlledCodesAutocompleteProps<Option, Multiple, DisableClearable, FreeSolo, ChipComponent, Output>) => react.JSX.Element;
|
|
66
66
|
|
|
67
67
|
type ControlledDatepickerProps<Output = Dayjs | null> = Omit<DatepickerProps, 'onBlur' | 'onChange' | 'value' | 'name'> & Pick<RegisterOptions<FieldValues, string>, 'onBlur' | 'onChange' | 'value'> & ControllerProps & TransformProp<Dayjs | null, Output>;
|
|
68
|
-
declare const ControlledDatepicker: <Output = Dayjs | null>({ name, defaultValue, onBlur, onChange, rules, shouldUnregister, value, FieldProps, transform, ...rest }: ControlledDatepickerProps<Output>) =>
|
|
68
|
+
declare const ControlledDatepicker: <Output = Dayjs | null>({ name, defaultValue, onBlur, onChange, rules, shouldUnregister, value, FieldProps, transform, ...rest }: ControlledDatepickerProps<Output>) => react.JSX.Element;
|
|
69
69
|
|
|
70
70
|
type ControlledInputProps<Output = string> = Omit<InputProps, 'onBlur' | 'onChange' | 'value' | 'name'> & Pick<RegisterOptions<FieldValues, string>, 'onBlur' | 'onChange' | 'value'> & ControllerProps & TransformProp<string, Output>;
|
|
71
|
-
declare const ControlledInput: <Output = string>({ name, defaultValue, disabled, onBlur, onChange, rules, shouldUnregister, value, transform, ...rest }: ControlledInputProps<Output>) =>
|
|
71
|
+
declare const ControlledInput: <Output = string>({ name, defaultValue, disabled, onBlur, onChange, rules, shouldUnregister, value, transform, ...rest }: ControlledInputProps<Output>) => react.JSX.Element;
|
|
72
72
|
|
|
73
73
|
interface ControlledOrgAutocompleteProps<Option = Organization, Multiple extends boolean | undefined = false, DisableClearable extends boolean | undefined = false, FreeSolo extends boolean | undefined = false, ChipComponent extends React.ElementType = ChipTypeMap['defaultComponent'], Output = AsyncAutocompleteProps<Option, Multiple, DisableClearable, FreeSolo, ChipComponent>['value'] | null> extends Omit<Optional<ControlledAsyncAutocompleteProps<Option, Multiple, DisableClearable, FreeSolo, ChipComponent, Output>, 'queryKey'>, 'loadOptions'> {
|
|
74
74
|
/** Axios ApiConfig */
|
|
75
75
|
apiConfig?: ApiConfig;
|
|
76
76
|
}
|
|
77
|
-
declare const ControlledOrganizationAutocomplete: <Option = Organization, Multiple extends boolean | undefined = false, DisableClearable extends boolean | undefined = false, FreeSolo extends boolean | undefined = false, ChipComponent extends React.ElementType = ChipTypeMap["defaultComponent"], Output = AsyncAutocompleteProps<Option, Multiple, DisableClearable, FreeSolo, ChipComponent>["value"] | null>({ queryKey, apiConfig, ...rest }: ControlledOrgAutocompleteProps<Option, Multiple, DisableClearable, FreeSolo, ChipComponent, Output>) =>
|
|
77
|
+
declare const ControlledOrganizationAutocomplete: <Option = Organization, Multiple extends boolean | undefined = false, DisableClearable extends boolean | undefined = false, FreeSolo extends boolean | undefined = false, ChipComponent extends React.ElementType = ChipTypeMap["defaultComponent"], Output = AsyncAutocompleteProps<Option, Multiple, DisableClearable, FreeSolo, ChipComponent>["value"] | null>({ queryKey, apiConfig, ...rest }: ControlledOrgAutocompleteProps<Option, Multiple, DisableClearable, FreeSolo, ChipComponent, Output>) => react.JSX.Element;
|
|
78
78
|
|
|
79
79
|
interface ControlledProviderAutocompleteProps<Option = Provider, Multiple extends boolean | undefined = false, DisableClearable extends boolean | undefined = false, FreeSolo extends boolean | undefined = false, ChipComponent extends React.ElementType = ChipTypeMap['defaultComponent'], Output = AsyncAutocompleteProps<Option, Multiple, DisableClearable, FreeSolo, ChipComponent>['value'] | null> extends Omit<Optional<ControlledAsyncAutocompleteProps<Option, Multiple, DisableClearable, FreeSolo, ChipComponent, Output>, 'queryKey'>, 'loadOptions'> {
|
|
80
80
|
/** Customer ID of the Organization you are requesting the providers for */
|
|
@@ -82,22 +82,22 @@ interface ControlledProviderAutocompleteProps<Option = Provider, Multiple extend
|
|
|
82
82
|
/** Config passed to the AvProvidersApi.getProviders function */
|
|
83
83
|
apiConfig?: ApiConfig;
|
|
84
84
|
}
|
|
85
|
-
declare const ControlledProviderAutocomplete: <Option = Provider, Multiple extends boolean | undefined = false, DisableClearable extends boolean | undefined = false, FreeSolo extends boolean | undefined = false, ChipComponent extends React.ElementType = ChipTypeMap["defaultComponent"], Output = AsyncAutocompleteProps<Option, Multiple, DisableClearable, FreeSolo, ChipComponent>["value"] | null>({ apiConfig, customerId, queryKey, ...rest }: ControlledProviderAutocompleteProps<Option, Multiple, DisableClearable, FreeSolo, ChipComponent, Output>) =>
|
|
85
|
+
declare const ControlledProviderAutocomplete: <Option = Provider, Multiple extends boolean | undefined = false, DisableClearable extends boolean | undefined = false, FreeSolo extends boolean | undefined = false, ChipComponent extends React.ElementType = ChipTypeMap["defaultComponent"], Output = AsyncAutocompleteProps<Option, Multiple, DisableClearable, FreeSolo, ChipComponent>["value"] | null>({ apiConfig, customerId, queryKey, ...rest }: ControlledProviderAutocompleteProps<Option, Multiple, DisableClearable, FreeSolo, ChipComponent, Output>) => react.JSX.Element;
|
|
86
86
|
|
|
87
87
|
type ControlledRadioGroupProps<Output = string> = {
|
|
88
88
|
name: string;
|
|
89
89
|
label: string;
|
|
90
90
|
helperText?: string;
|
|
91
91
|
} & Omit<RadioGroupProps, 'onBlur' | 'onChange' | 'value' | 'name'> & Pick<RegisterOptions<FieldValues, string>, 'onBlur' | 'onChange' | 'value'> & ControllerProps & TransformProp<string, Output> & Pick<FormControlProps, 'required'>;
|
|
92
|
-
declare const ControlledRadioGroup: <Output = string>({ name, helperText, label, defaultValue, onBlur, onChange, required, rules, shouldUnregister, value, transform, ...rest }: ControlledRadioGroupProps<Output>) =>
|
|
92
|
+
declare const ControlledRadioGroup: <Output = string>({ name, helperText, label, defaultValue, onBlur, onChange, required, rules, shouldUnregister, value, transform, ...rest }: ControlledRadioGroupProps<Output>) => react.JSX.Element;
|
|
93
93
|
|
|
94
94
|
type ControlledSelectProps<Output = string, Input = unknown> = Omit<SelectProps<Input>, 'onBlur' | 'onChange' | 'value' | 'name'> & Pick<RegisterOptions<FieldValues, string>, 'onBlur' | 'onChange' | 'value'> & ControllerProps & TransformProp<Input, Output>;
|
|
95
|
-
declare const ControlledSelect: <Output = string, Input = unknown>({ name, defaultValue, disabled, onBlur, onChange, rules, shouldUnregister, value, transform, ...rest }: ControlledSelectProps<Output, Input>) =>
|
|
95
|
+
declare const ControlledSelect: <Output = string, Input = unknown>({ name, defaultValue, disabled, onBlur, onChange, rules, shouldUnregister, value, transform, ...rest }: ControlledSelectProps<Output, Input>) => react.JSX.Element;
|
|
96
96
|
|
|
97
97
|
type ControlledTextFieldProps<Output = string> = Omit<TextFieldProps, 'onBlur' | 'onChange' | 'value' | 'name'> & Pick<RegisterOptions<FieldValues, string>, 'onBlur' | 'onChange' | 'value'> & ControllerProps & TransformProp<string, Output>;
|
|
98
|
-
declare const ControlledTextField: <Output = string>({ name, defaultValue, disabled, helperText, onBlur, onChange, rules, shouldUnregister, value, transform, ...rest }: ControlledTextFieldProps<Output>) =>
|
|
98
|
+
declare const ControlledTextField: <Output = string>({ name, defaultValue, disabled, helperText, onBlur, onChange, rules, shouldUnregister, value, transform, ...rest }: ControlledTextFieldProps<Output>) => react.JSX.Element;
|
|
99
99
|
|
|
100
100
|
type ControlledTimepickerProps<Output = Dayjs | null> = Omit<TimepickerProps, 'onBlur' | 'onChange' | 'value' | 'name'> & Pick<RegisterOptions<FieldValues, string>, 'onBlur' | 'onChange' | 'value'> & ControllerProps & TransformProp<Dayjs | null, Output>;
|
|
101
|
-
declare const ControlledTimepicker: <Output = Dayjs | null>({ name, defaultValue, onBlur, onChange, rules, shouldUnregister, value, FieldProps, transform, ...rest }: ControlledTimepickerProps<Output>) =>
|
|
101
|
+
declare const ControlledTimepicker: <Output = Dayjs | null>({ name, defaultValue, onBlur, onChange, rules, shouldUnregister, value, FieldProps, transform, ...rest }: ControlledTimepickerProps<Output>) => react.JSX.Element;
|
|
102
102
|
|
|
103
103
|
export { ControlledAsyncAutocomplete, type ControlledAsyncAutocompleteProps, ControlledAutocomplete, type ControlledAutocompleteProps, ControlledCheckbox, type ControlledCheckboxProps, ControlledCodesAutocomplete, type ControlledCodesAutocompleteProps, ControlledDatepicker, type ControlledDatepickerProps, ControlledInput, type ControlledInputProps, type ControlledOrgAutocompleteProps, ControlledOrganizationAutocomplete, ControlledProviderAutocomplete, type ControlledProviderAutocompleteProps, ControlledRadioGroup, type ControlledRadioGroupProps, ControlledSelect, type ControlledSelectProps, ControlledTextField, type ControlledTextFieldProps, ControlledTimepicker, type ControlledTimepickerProps };
|