@simoncomputing/mui-bueno-v2 0.18.18 → 0.19.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/CHANGELOG.md +19 -0
- package/dist/components/Form/Inputs/BaseInputProps.d.ts +12 -6
- package/dist/components/Form/{Error/Error.d.ts → ValidationError/ValidationError.d.ts} +5 -10
- package/dist/index.cjs.js +69 -69
- package/dist/index.d.ts +10 -10
- package/dist/index.es.js +3077 -3077
- package/dist/index.umd.js +4 -4
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -11,6 +11,25 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
11
11
|
- Minor increment --> singlular/minor changes. Minimal breaking changes.
|
|
12
12
|
- Patch increment --> singlular/minor changes. Zero breaking changes.
|
|
13
13
|
|
|
14
|
+
## [0.19.0] - 2025-10-16
|
|
15
|
+
|
|
16
|
+
### Changed
|
|
17
|
+
|
|
18
|
+
- `Error`
|
|
19
|
+
|
|
20
|
+
- Renamed component to `ValidationError` to avoid confusion with JS's built-in Error class. **Migration:** Rename references to `Error` component to `ValidationError`.
|
|
21
|
+
- Replaced `collapseWhenEmpty` with `errorMode`, which supports an additional mode `none` to always hide errors. **Migration:** When `collapseWithEmpty` is true, use `errorMode="hidden"` or `errorMode="collapse"`.
|
|
22
|
+
|
|
23
|
+
- All Form Input components (`Autocomplete`, `MultiAutocomplete`, `Checkbox`, `CheckboxGroup`, `CitationField`, `DateField`, `DateRangeField`, `FileUpload`, `Location`, `RadioGroup`, `Select`, `Switch`, `TextField`)
|
|
24
|
+
- Replaced `collapseErrorWhenEmpty` with `errorMode`, which supports an additional mode `none` to always hide errors
|
|
25
|
+
|
|
26
|
+
## [0.18.19] - 2025-10-09
|
|
27
|
+
|
|
28
|
+
### Fixed
|
|
29
|
+
|
|
30
|
+
- `CitationField`
|
|
31
|
+
- Field not clearing when formik clears its value
|
|
32
|
+
|
|
14
33
|
## [0.18.18] - 2025-10-08
|
|
15
34
|
|
|
16
35
|
### Added
|
|
@@ -10,13 +10,19 @@ export type BaseInputProps = {
|
|
|
10
10
|
*/
|
|
11
11
|
name: string;
|
|
12
12
|
/**
|
|
13
|
-
*
|
|
14
|
-
* validation is not needed.
|
|
13
|
+
* Error mode for showing validation error messages.
|
|
15
14
|
*
|
|
16
|
-
*
|
|
17
|
-
* the
|
|
15
|
+
* 'normal' -- displays an error message under the field, when FormikErrors has an error that matches the field's `name`.
|
|
16
|
+
* Space is preserved for the error, even when not visible, to prevent the form from jittering up/down as errors show/hide.
|
|
18
17
|
*
|
|
19
|
-
*
|
|
18
|
+
* 'collapse' -- displays an error message under the field, when FormikErrors has an error that matches the field's `name`.
|
|
19
|
+
* Space is NOT preserved for the error. Use sparringly. If validation is not needed, consider using 'hidden' instead.
|
|
20
|
+
*
|
|
21
|
+
* 'hidden' -- does not display an error message, even when present. FormikErrors that match the field's `name` are ignored.
|
|
22
|
+
* Recommended when the field does not need validation, or you plan to handle errors manually for the field.
|
|
23
|
+
*
|
|
24
|
+
* @default 'normal'
|
|
20
25
|
*/
|
|
21
|
-
|
|
26
|
+
errorMode?: ErrorMode;
|
|
22
27
|
};
|
|
28
|
+
export type ErrorMode = 'normal' | 'collapse' | 'hidden';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { ErrorMode } from '../Inputs/BaseInputProps';
|
|
1
2
|
import * as React from 'react';
|
|
2
|
-
export type
|
|
3
|
+
export type ValidationErrorProps = {
|
|
3
4
|
/**
|
|
4
5
|
* Name of the component.
|
|
5
6
|
* @required
|
|
@@ -15,17 +16,11 @@ export type ErrorProps = {
|
|
|
15
16
|
* Specifies the styling on the typography.
|
|
16
17
|
*/
|
|
17
18
|
className?: string;
|
|
18
|
-
|
|
19
|
-
* When true, compoent will not take up space when no error(s) exist.
|
|
20
|
-
* When false, component will take up space when no error(s) exist.
|
|
21
|
-
*
|
|
22
|
-
* @default false
|
|
23
|
-
*/
|
|
24
|
-
collapseWhenEmpty?: boolean;
|
|
19
|
+
errorMode?: ErrorMode;
|
|
25
20
|
};
|
|
26
21
|
/**
|
|
27
22
|
* This component provides a simple error block containing
|
|
28
23
|
* an error and status
|
|
29
24
|
*/
|
|
30
|
-
export declare const
|
|
31
|
-
export default
|
|
25
|
+
export declare const ValidationError: React.FC<ValidationErrorProps>;
|
|
26
|
+
export default ValidationError;
|