@simoncomputing/mui-bueno-v3 0.1.12 → 0.1.14
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 +1 -1
- package/dist/components/Form/Inputs/Autocomplete/Autocomplete.d.ts +6 -6
- package/dist/components/Form/Inputs/Checkbox/Checkbox.d.ts +2 -2
- package/dist/components/Form/Inputs/CheckboxGroup/CheckboxGroup.d.ts +1 -1
- package/dist/components/Form/Inputs/FileUpload/FileUpload.d.ts +1 -1
- package/dist/components/Form/Inputs/RadioGroup/RadioGroup.d.ts +1 -1
- package/dist/components/Form/Inputs/RangeSlider/RangeSlider.d.ts +1 -1
- package/dist/components/Form/Inputs/Select/Select.d.ts +1 -1
- package/dist/components/Form/Inputs/TextField/TextField.d.ts +1 -1
- package/dist/components/Form/RepeatableFormGroup/RepeatableFormGroup.d.ts +3 -3
- package/dist/index.cjs.js +129 -131
- package/dist/index.css +1 -1
- package/dist/index.d.ts +0 -6
- package/dist/index.es.js +24831 -25643
- package/dist/index.umd.js +130 -132
- package/package.json +136 -137
- package/dist/components/Form/Inputs/CitationField/CitationBubbleMenuHandler.d.ts +0 -43
- package/dist/components/Form/Inputs/CitationField/CitationField.d.ts +0 -78
- package/dist/components/Form/Inputs/CitationField/CitationMenu/AttachmentForm.d.ts +0 -13
- package/dist/components/Form/Inputs/CitationField/CitationMenu/CitationBubbleMenu.d.ts +0 -25
- package/dist/components/Form/Inputs/CitationField/CitationMenu/CitationForm.d.ts +0 -12
- package/dist/components/Form/Inputs/CitationField/CitationMenu/CitationMenu.d.ts +0 -62
- package/dist/components/Form/Inputs/CitationField/CitationMenu/CitationTable.d.ts +0 -16
- package/dist/components/Form/Inputs/CitationField/CitationNode.d.ts +0 -2
- package/dist/components/Form/Inputs/CitationField/CitationNodeComponent.d.ts +0 -7
- package/dist/components/Form/Inputs/CitationField/CitationRefreshContext/CitationRefreshContext.d.ts +0 -29
- package/dist/components/Form/Inputs/CitationField/MenuButtonEditCitation.d.ts +0 -3
- package/dist/components/Form/Inputs/Location/Location.d.ts +0 -69
- package/dist/components/Form/Inputs/Location/Location.types.d.ts +0 -85
- package/dist/components/Form/Inputs/Location/LocationOption.d.ts +0 -38
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# MUI Bueno v3
|
|
2
2
|
|
|
3
|
-
A React component library based on [Material UI](https://mui.com/material-ui) components with built-in support for [
|
|
3
|
+
A React component library based on [Material UI](https://mui.com/material-ui) components with built-in support for [React Hook Form](https://react-hook-form.com/). Rebuilt & redesigned based on the original [mui-bueno](https://www.npmjs.com/package/@simoncomputing/mui-bueno-v3) library, and expanded to provide additional components beyond form components.
|
|
4
4
|
|
|
5
5
|

|
|
6
6
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AutocompleteProps as MuiAutocompleteProps, TypographyProps } from '@mui/material';
|
|
2
2
|
export type BaseAutocompleteProps<T> = {
|
|
3
3
|
/**
|
|
4
|
-
* Name of the component. Must match a key from initialValues in
|
|
4
|
+
* Name of the component. Must match a key from initialValues in react-hook-form.
|
|
5
5
|
* @required
|
|
6
6
|
*/
|
|
7
7
|
name: string;
|
|
@@ -38,7 +38,7 @@ export type BaseAutocompleteProps<T> = {
|
|
|
38
38
|
/**
|
|
39
39
|
* If true, an asterisk will be displayed next to the label
|
|
40
40
|
* Most browsers will automatically validate this, but it's recommended to also
|
|
41
|
-
* have
|
|
41
|
+
* have react-hook-form also validate as well so that `Error` displays for consistency.
|
|
42
42
|
* @default false
|
|
43
43
|
*/
|
|
44
44
|
required?: boolean;
|
|
@@ -48,13 +48,13 @@ export type BaseAutocompleteProps<T> = {
|
|
|
48
48
|
*/
|
|
49
49
|
clearOnSelect?: boolean;
|
|
50
50
|
/**
|
|
51
|
-
* When using Autocomplete with objects, this prop can be used to store only a property of that object in
|
|
51
|
+
* When using Autocomplete with objects, this prop can be used to store only a property of that object in react-hook-form.
|
|
52
52
|
*
|
|
53
53
|
* For example, if you have `type User = { id: number; firstName: string; lastName: string; ... }`, you can
|
|
54
|
-
* set useFieldAsValue="id" if you want
|
|
54
|
+
* set useFieldAsValue="id" if you want react-hook-form to only store the user's id rather than the whole user object.
|
|
55
55
|
*
|
|
56
|
-
* NOTE: This will require extra processing on the client-side compared to just using the object for the
|
|
57
|
-
* because the Autocomplete will have to search `options` for the object with the property matching
|
|
56
|
+
* NOTE: This will require extra processing on the client-side compared to just using the object for the react-hook-form value
|
|
57
|
+
* because the Autocomplete will have to search `options` for the object with the property matching react-hook-form's initial value.
|
|
58
58
|
*
|
|
59
59
|
*/
|
|
60
60
|
useFieldAsValue?: string;
|
|
@@ -2,7 +2,7 @@ import { CheckboxProps as MuiCheckboxProps, TypographyProps } from '@mui/materia
|
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
type BaseCheckboxProps = {
|
|
4
4
|
/**
|
|
5
|
-
* Must match a key from initialValues in
|
|
5
|
+
* Must match a key from initialValues in react-hook-form.
|
|
6
6
|
* @required
|
|
7
7
|
*/
|
|
8
8
|
name: string;
|
|
@@ -36,7 +36,7 @@ type BaseCheckboxProps = {
|
|
|
36
36
|
/**
|
|
37
37
|
* If true, an asterisk will be displayed next to the label
|
|
38
38
|
* Most browsers will automatically validate this, but it's recommended to also
|
|
39
|
-
* have
|
|
39
|
+
* have react-hook-form also validate as well so that `Error` displays for consistency.
|
|
40
40
|
* @default false
|
|
41
41
|
*/
|
|
42
42
|
required?: boolean;
|
|
@@ -59,7 +59,7 @@ export type CheckboxGroupProps = {
|
|
|
59
59
|
/**
|
|
60
60
|
* If true, an asterisk will be displayed next to the label
|
|
61
61
|
* Most browsers will automatically validate this, but it's recommended to also
|
|
62
|
-
* have
|
|
62
|
+
* have react-hook-form also validate as well so that `Error` displays for consistency.
|
|
63
63
|
* @default false
|
|
64
64
|
*/
|
|
65
65
|
required?: boolean;
|
|
@@ -2,7 +2,7 @@ import { TypographyProps } from '@mui/material';
|
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
export type FileUploadProps = {
|
|
4
4
|
/**
|
|
5
|
-
* Must match a key from initialValues in
|
|
5
|
+
* Must match a key from initialValues in react-hook-form.
|
|
6
6
|
* @required
|
|
7
7
|
*/
|
|
8
8
|
name: string;
|
|
@@ -86,7 +86,7 @@ type BaseRadioGroupProps<T> = {
|
|
|
86
86
|
/**
|
|
87
87
|
* If true, an asterisk will be displayed next to the label
|
|
88
88
|
* Most browsers will automatically validate this, but it's recommended to also
|
|
89
|
-
* have ( NOT
|
|
89
|
+
* have ( NOT react-hook-form) also validate as well so that `Error` displays for consistency.
|
|
90
90
|
* @default false
|
|
91
91
|
*/
|
|
92
92
|
required?: boolean;
|
|
@@ -2,7 +2,7 @@ import { SliderProps, TypographyProps } from '@mui/material';
|
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
type BaseRangeSliderProps = {
|
|
4
4
|
/**
|
|
5
|
-
* Must match a key from initialValues in
|
|
5
|
+
* Must match a key from initialValues in react-hook-form.
|
|
6
6
|
* @required
|
|
7
7
|
*/
|
|
8
8
|
name: string;
|
|
@@ -35,7 +35,7 @@ export interface SelectOption<T> {
|
|
|
35
35
|
/**
|
|
36
36
|
* If true, an asterisk will be displayed next to the label
|
|
37
37
|
* Most browsers will automatically validate this, but it's recommended to also
|
|
38
|
-
* have
|
|
38
|
+
* have react-hook-form also validate as well so that `Error` displays for consistency.
|
|
39
39
|
* @default false
|
|
40
40
|
*/
|
|
41
41
|
required?: boolean;
|
|
@@ -2,7 +2,7 @@ import { TypographyProps, TextFieldProps as MuiTextFieldProps } from '@mui/mater
|
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
type BaseTextFieldProps = {
|
|
4
4
|
/**
|
|
5
|
-
* Name and ID of the component. Must match a key from initialValues in
|
|
5
|
+
* Name and ID of the component. Must match a key from initialValues in react-hook-form.
|
|
6
6
|
* @required
|
|
7
7
|
*/
|
|
8
8
|
name: string;
|
|
@@ -4,12 +4,12 @@ type RepeatableGroupWrapperType = 'card' | 'elevatedCard' | 'none';
|
|
|
4
4
|
type RepeatableRemovePosition = 'bottom' | 'right';
|
|
5
5
|
export type RepeatableFormGroupProps<T> = {
|
|
6
6
|
/**
|
|
7
|
-
* Name of field. Must match the name of the array in
|
|
7
|
+
* Name of field. Must match the name of the array in react-hook-form.
|
|
8
8
|
*/
|
|
9
9
|
name: string;
|
|
10
10
|
/**
|
|
11
11
|
* An "empty" object of type T.
|
|
12
|
-
* This is what you would normally pass to initialState for
|
|
12
|
+
* This is what you would normally pass to initialState for react-hook-form for a single object of type T
|
|
13
13
|
*/
|
|
14
14
|
initialState: T;
|
|
15
15
|
/**
|
|
@@ -83,7 +83,7 @@ export type RepeatableFormGroupProps<T> = {
|
|
|
83
83
|
};
|
|
84
84
|
/**
|
|
85
85
|
* Repeatable Form Group is used for handling arrays in forms. It automatically handles adding & removing
|
|
86
|
-
* field groups (components containing one or multiple fields) using
|
|
86
|
+
* field groups (components containing one or multiple fields) using react-hook-form.
|
|
87
87
|
*/
|
|
88
88
|
export declare const RepeatableFormGroup: <T>(props: RepeatableFormGroupProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
89
89
|
export default RepeatableFormGroup;
|