@simoncomputing/mui-bueno-v2 0.18.19 → 0.19.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 +22 -0
- package/dist/@types/index.d.ts +2 -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/components/Table/Table.d.ts +5 -0
- package/dist/index.cjs.js +93 -93
- package/dist/index.d.ts +10 -10
- package/dist/index.es.js +7211 -7189
- package/dist/index.umd.js +79 -79
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -11,6 +11,28 @@ 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.1] - 2025-10-21
|
|
15
|
+
|
|
16
|
+
### Added
|
|
17
|
+
|
|
18
|
+
- `Table`/`PaginatedTable` (`TableColumn`) - Added support for tooltips in the table header row. For mobile cards, the tooltip icon is located next to each column label.
|
|
19
|
+
|
|
20
|
+
### Changed
|
|
21
|
+
|
|
22
|
+
- Default font size for MUI tooltips increased
|
|
23
|
+
|
|
24
|
+
## [0.19.0] - 2025-10-16
|
|
25
|
+
|
|
26
|
+
### Changed
|
|
27
|
+
|
|
28
|
+
- `Error`
|
|
29
|
+
|
|
30
|
+
- Renamed component to `ValidationError` to avoid confusion with JS's built-in Error class. **Migration:** Rename references to `Error` component to `ValidationError`.
|
|
31
|
+
- 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"`.
|
|
32
|
+
|
|
33
|
+
- All Form Input components (`Autocomplete`, `MultiAutocomplete`, `Checkbox`, `CheckboxGroup`, `CitationField`, `DateField`, `DateRangeField`, `FileUpload`, `Location`, `RadioGroup`, `Select`, `Switch`, `TextField`)
|
|
34
|
+
- Replaced `collapseErrorWhenEmpty` with `errorMode`, which supports an additional mode `none` to always hide errors
|
|
35
|
+
|
|
14
36
|
## [0.18.19] - 2025-10-09
|
|
15
37
|
|
|
16
38
|
### Fixed
|
package/dist/@types/index.d.ts
CHANGED
|
@@ -115,6 +115,7 @@ export type EnvironmentInfo = {
|
|
|
115
115
|
* @property {string} sortName - (Optional) Passed instead of `fieldName` to onSortChange(fieldName, ...). Useful if you're rendering the same object in 2+ columns and need a way to differentiate when sorting.
|
|
116
116
|
* @property {SxProps<Theme>} tableCellSx - (Optional) styles applies to TableCell (non-mobile)
|
|
117
117
|
* @property {boolean} hideCol - (Optional) if true, this column will not be displayed
|
|
118
|
+
* @property {string} tooltip - (Optional) if provided, shows a help icon with the specified tooltip when hovered
|
|
118
119
|
*/
|
|
119
120
|
export type TableColumn<T, K extends keyof T> = {
|
|
120
121
|
key?: string;
|
|
@@ -124,6 +125,7 @@ export type TableColumn<T, K extends keyof T> = {
|
|
|
124
125
|
sortName?: string;
|
|
125
126
|
tableCellSx?: SxProps<Theme>;
|
|
126
127
|
hideCol?: boolean;
|
|
128
|
+
tooltip?: string;
|
|
127
129
|
};
|
|
128
130
|
|
|
129
131
|
// Sort order for Tables
|
|
@@ -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;
|
|
@@ -119,6 +119,11 @@ export type BaseTableProps<T> = {
|
|
|
119
119
|
*/
|
|
120
120
|
stickyHeader?: string;
|
|
121
121
|
reRenderExpand?: boolean;
|
|
122
|
+
/**
|
|
123
|
+
* Overrides the default color (gray) for tooltips (TableColumn.tooltip).
|
|
124
|
+
* NOTE: make sure to handle dark mode, if your app supports it.
|
|
125
|
+
*/
|
|
126
|
+
tooltipColor?: string;
|
|
122
127
|
};
|
|
123
128
|
export type TableProps<T> = BaseTableProps<T> & Omit<MuiTableProps, 'stickyHeader'>;
|
|
124
129
|
/**
|