@simoncomputing/mui-bueno-v2 0.36.4 → 0.38.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 +27 -2
- package/dist/common/Utils/index.d.ts +1 -0
- package/dist/components/Form/Inputs/Autocomplete/Autocomplete.d.ts +2 -0
- package/dist/components/Form/Inputs/RadioGroup/RadioGroup.d.ts +2 -0
- package/dist/components/Form/Inputs/Select/Select.d.ts +2 -0
- package/dist/components/Form/Inputs/TextField/TextField.d.ts +2 -0
- package/dist/components/Form/ReadOnly/ReadOnly.d.ts +14 -1
- package/dist/components/Form/ReadOnly/ReadOnlyValue.d.ts +9 -0
- package/dist/components/Modals/ConfirmationModal/ConfirmationModal.d.ts +2 -2
- package/dist/components/Modals/DecisionModal/DecisionModal.d.ts +1 -2
- package/dist/index.cjs.js +60 -60
- package/dist/index.d.ts +1 -2
- package/dist/index.es.js +2997 -3012
- package/dist/index.umd.js +76 -76
- package/package.json +1 -1
- package/dist/components/Buttons/LoadingButton/LoadingButton.d.ts +0 -9
package/CHANGELOG.md
CHANGED
|
@@ -11,6 +11,33 @@ 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.38.0] - 2026-08-28
|
|
15
|
+
|
|
16
|
+
### Added
|
|
17
|
+
|
|
18
|
+
- `ReadOnlyValue`
|
|
19
|
+
- Used by `ReadOnly` to render the `value`. If overriding the rendering of `value` via the `readOnlyValue` prop, it's recommended to pass this component to ensure styling consistency.
|
|
20
|
+
|
|
21
|
+
- `Autocomplete`, `MultiAutocomplete`, `RadioGroup`, `Select`, `TextField`, `TextArea`
|
|
22
|
+
- Added `readOnlyValue` prop for overriding how the value is displayed in read-only mode.
|
|
23
|
+
|
|
24
|
+
### Changed
|
|
25
|
+
|
|
26
|
+
- `ReadOnly`
|
|
27
|
+
- `readOnlyValue` - changed type from `ReactNode` to a function that returns a `ReactNode`. The parameter is the value that gets passed to the `value` prop.
|
|
28
|
+
|
|
29
|
+
## [0.37.0] - 2026-08-26
|
|
30
|
+
|
|
31
|
+
### Removed
|
|
32
|
+
|
|
33
|
+
- `LoadingButton`
|
|
34
|
+
- Migration: Use any button component with MUI's `loading` prop
|
|
35
|
+
|
|
36
|
+
### Changed
|
|
37
|
+
|
|
38
|
+
- `CitationField`, `SelectableCitationManager`, `CitationManager`, `ConfirmationModal`, `DecisionModal`
|
|
39
|
+
- Updated to use a regular `Button` instead of `LoadingButton`. Citation components will automatically set `loading`. For modals, no API change (as before, pass `loading` to `confirmButtonProps`/`primaryActionProps` as needed).
|
|
40
|
+
|
|
14
41
|
## [0.36.4] - 2026-08-26
|
|
15
42
|
|
|
16
43
|
### Changed
|
|
@@ -27,8 +54,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
27
54
|
- `CitationField`, `SelectableCitationManager`, `CitationManager`
|
|
28
55
|
- Updated "Yes" button on Delete popper to show loading spinner AND "Yes" label at the same time
|
|
29
56
|
|
|
30
|
-
-
|
|
31
|
-
|
|
32
57
|
## [0.36.3] - 2026-08-25
|
|
33
58
|
|
|
34
59
|
### Fixed
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { AutocompleteProps as MuiAutocompleteProps, TypographyProps } from '@mui/material';
|
|
2
2
|
import { BaseInputProps } from '../BaseInputProps';
|
|
3
|
+
import { ReactNode } from 'react';
|
|
3
4
|
export type BaseAutocompleteProps<T> = BaseInputProps & {
|
|
4
5
|
/**
|
|
5
6
|
* List of options for the autocomplete in label/value format
|
|
@@ -49,6 +50,7 @@ export type BaseAutocompleteProps<T> = BaseInputProps & {
|
|
|
49
50
|
*
|
|
50
51
|
*/
|
|
51
52
|
useFieldAsValue?: string;
|
|
53
|
+
readOnlyValue?: (value: string) => ReactNode;
|
|
52
54
|
};
|
|
53
55
|
/**
|
|
54
56
|
* Type used to define props passed into Autocomplete component
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { RadioProps, RadioGroupProps as MuiRadioGroupProps, TypographyProps } from '@mui/material';
|
|
2
2
|
import { BaseInputProps } from '../BaseInputProps';
|
|
3
|
+
import { ReactNode } from 'react';
|
|
3
4
|
type BaseRadioProps<T> = {
|
|
4
5
|
/**
|
|
5
6
|
* Value of the radio button
|
|
@@ -103,6 +104,7 @@ type BaseRadioGroupProps<T> = BaseInputProps & {
|
|
|
103
104
|
* NOTE: Radios have their own `helperText` for more fine-grained details about specific options.
|
|
104
105
|
*/
|
|
105
106
|
helperText?: string;
|
|
107
|
+
readOnlyValue?: (value: string) => ReactNode;
|
|
106
108
|
};
|
|
107
109
|
export type RadioGroupProps<T> = BaseRadioGroupProps<T> & Omit<MuiRadioGroupProps, 'onChange' | 'name'>;
|
|
108
110
|
/**
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { SelectProps as MuiSelectProps, TypographyProps } from '@mui/material';
|
|
2
2
|
import { BaseInputProps } from '../BaseInputProps';
|
|
3
|
+
import { ReactNode } from 'react';
|
|
3
4
|
import * as React from 'react';
|
|
4
5
|
/**
|
|
5
6
|
* *Interface used exclusively for creating the select menu within Select*
|
|
@@ -72,6 +73,7 @@ type BaseSelectProps<T> = BaseInputProps & {
|
|
|
72
73
|
* @default false
|
|
73
74
|
*/
|
|
74
75
|
readOnly?: boolean;
|
|
76
|
+
readOnlyValue?: (value: string) => ReactNode;
|
|
75
77
|
};
|
|
76
78
|
export type SelectProps<T> = BaseSelectProps<T> & Omit<MuiSelectProps, 'native' | 'onChange' | 'readOnly' | 'fullWidth'>;
|
|
77
79
|
/**
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { TypographyProps, TextFieldProps as MuiTextFieldProps } from '@mui/material';
|
|
2
2
|
import { BaseInputProps } from '../BaseInputProps';
|
|
3
3
|
import { DiffMode } from '../../Diff/Diff';
|
|
4
|
+
import { ReactNode } from 'react';
|
|
4
5
|
import * as React from 'react';
|
|
5
6
|
type BaseTextFieldProps = BaseInputProps & {
|
|
6
7
|
/**
|
|
@@ -49,6 +50,7 @@ type BaseTextFieldProps = BaseInputProps & {
|
|
|
49
50
|
*/
|
|
50
51
|
noTrimOnBlur?: boolean;
|
|
51
52
|
diffMode?: DiffMode;
|
|
53
|
+
readOnlyValue?: (value: string) => ReactNode;
|
|
52
54
|
};
|
|
53
55
|
export type TextFieldProps = BaseTextFieldProps & Omit<MuiTextFieldProps, 'defaultValue' | 'error' | 'fullWidth' | 'select' | 'SelectProps' | 'value'>;
|
|
54
56
|
/**
|
|
@@ -3,8 +3,21 @@ import { DiffMode, DiffProps } from '../Diff/Diff';
|
|
|
3
3
|
import { ReactNode } from 'react';
|
|
4
4
|
export type ReadOnlyProps = {
|
|
5
5
|
label: string;
|
|
6
|
+
/**
|
|
7
|
+
* Readonly value of the field
|
|
8
|
+
* If more customization is needed, use `readOnlyValue` (note: not used when showDiff=true)
|
|
9
|
+
*/
|
|
6
10
|
value: string;
|
|
7
|
-
|
|
11
|
+
/**
|
|
12
|
+
* Used to customize appearance in read only mode.
|
|
13
|
+
*
|
|
14
|
+
* Readonly mode ONLY. (Not used when showDiff=true -- `value` is used instead)
|
|
15
|
+
*
|
|
16
|
+
* Recommend returning a `ReadOnlyValue` component, if possible, to maintain similar style & highlight functionality.
|
|
17
|
+
*
|
|
18
|
+
* @param value -- read-only value (same as `value` prop)
|
|
19
|
+
*/
|
|
20
|
+
readOnlyValue?: (value: string) => ReactNode;
|
|
8
21
|
staticLabel?: boolean;
|
|
9
22
|
staticLabelProps?: TypographyProps;
|
|
10
23
|
showDiff?: boolean;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { TypographyProps } from '@mui/material/Typography';
|
|
2
|
+
export type ReadOnlyValueProps = TypographyProps;
|
|
3
|
+
/**
|
|
4
|
+
* Used to display read-only value.
|
|
5
|
+
*
|
|
6
|
+
* Used automatically by `ReadOnly` to render `value`, unless overridden by `readOnlyValue`.
|
|
7
|
+
*/
|
|
8
|
+
export declare const ReadOnlyValue: (props: TypographyProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export default ReadOnlyValue;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { ModalProps } from '../Modal';
|
|
3
|
-
import {
|
|
3
|
+
import { ButtonProps } from '../../Buttons/Button/Button';
|
|
4
4
|
export type ConfirmationModalProps = Omit<ModalProps, 'actions'> & {
|
|
5
5
|
/**
|
|
6
6
|
* Label for the confirm/action button.
|
|
@@ -14,7 +14,7 @@ export type ConfirmationModalProps = Omit<ModalProps, 'actions'> & {
|
|
|
14
14
|
* Override the default styling of the confirm button. Defaults are:
|
|
15
15
|
* `{ color: 'primary', variant: 'contained' }`
|
|
16
16
|
*/
|
|
17
|
-
confirmButtonProps?: Omit<
|
|
17
|
+
confirmButtonProps?: Omit<ButtonProps, 'onClick'>;
|
|
18
18
|
};
|
|
19
19
|
/**
|
|
20
20
|
* Modal that requires user to cancel or proceed.
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { ModalProps } from '../Modal';
|
|
3
3
|
import { ButtonProps } from '../../Buttons/Button/Button';
|
|
4
|
-
import { LoadingButtonProps } from '../../Buttons/LoadingButton/LoadingButton';
|
|
5
4
|
export type DecisionModalProps = Omit<ModalProps, 'actions'> & {
|
|
6
5
|
/**
|
|
7
6
|
* Label for primary action (button)
|
|
@@ -14,7 +13,7 @@ export type DecisionModalProps = Omit<ModalProps, 'actions'> & {
|
|
|
14
13
|
/**
|
|
15
14
|
* Override styling for primary action (button)
|
|
16
15
|
*/
|
|
17
|
-
primaryActionProps?: Omit<
|
|
16
|
+
primaryActionProps?: Omit<ButtonProps, 'onClick'>;
|
|
18
17
|
/**
|
|
19
18
|
* Label for secondary action (button)
|
|
20
19
|
*/
|