@zydon/common 2.0.24 → 2.0.25
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/dist/components/Autocomplete/index.d.ts +3 -11
- package/dist/components/SearchInput/index.d.ts +2 -7
- package/dist/components/form/Address/index.d.ts +3 -9
- package/dist/components/form/Field/index.d.ts +3 -4
- package/dist/components/form/Incrementer/index.d.ts +3 -12
- package/dist/components/form/MultiCheckbox/index.d.ts +3 -15
- package/dist/components/form/RadioGroup/index.d.ts +4 -17
- package/dist/components/form/Switch/index.d.ts +3 -8
- package/dist/types/addressProps.d.ts +12 -0
- package/dist/types/addressProps.js +1 -0
- package/dist/types/autoCompleteProps.d.ts +16 -0
- package/dist/types/autoCompleteProps.js +1 -0
- package/dist/types/fieldProps.d.ts +7 -0
- package/dist/types/fieldProps.js +1 -0
- package/dist/types/incrementerProps.d.ts +15 -0
- package/dist/types/incrementerProps.js +1 -0
- package/dist/types/multiCheckboxProps.d.ts +18 -0
- package/dist/types/multiCheckboxProps.js +1 -0
- package/dist/types/radioGroupProps.d.ts +20 -0
- package/dist/types/radioGroupProps.js +1 -0
- package/dist/types/searchInputProps.d.ts +9 -0
- package/dist/types/searchInputProps.js +1 -0
- package/dist/types/switchProps.d.ts +11 -0
- package/dist/types/switchProps.js +1 -0
- package/package.json +1 -1
|
@@ -1,18 +1,10 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
2
|
+
import { AutocompleteProps } from '../../types/autoCompleteProps.js';
|
|
3
|
+
import '../../types/autoComplete.js';
|
|
4
4
|
import '@mui/material/Autocomplete';
|
|
5
|
+
import '../../types/option.js';
|
|
5
6
|
import '../../types/icon.js';
|
|
6
7
|
|
|
7
|
-
type AutocompleteProps = BaseAutoComplete & {
|
|
8
|
-
name: string;
|
|
9
|
-
label?: string;
|
|
10
|
-
onChange(value: NonNullable<string | Option> | (string | Option)[] | null | undefined): void;
|
|
11
|
-
error?: boolean;
|
|
12
|
-
helperText?: string;
|
|
13
|
-
showValueInLabel?: boolean;
|
|
14
|
-
};
|
|
15
|
-
|
|
16
8
|
declare const Autocomplete: react.ForwardRefExoticComponent<Omit<AutocompleteProps, "ref"> & react.RefAttributes<unknown>>;
|
|
17
9
|
|
|
18
10
|
export { Autocomplete as default };
|
|
@@ -1,11 +1,6 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
type SearchInputProps = TextFieldProps & {
|
|
5
|
-
onSearch(value: string | undefined): void;
|
|
6
|
-
trigger?: 'change' | 'click';
|
|
7
|
-
iconPosition?: 'start' | 'end';
|
|
8
|
-
};
|
|
2
|
+
import { SearchInputProps } from '../../types/searchInputProps.js';
|
|
3
|
+
import '@mui/material/TextField';
|
|
9
4
|
|
|
10
5
|
declare const SearchInput: ({ onSearch, onChange, trigger, iconPosition, tabIndex, ...other }: SearchInputProps) => react_jsx_runtime.JSX.Element;
|
|
11
6
|
|
|
@@ -1,15 +1,9 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
2
|
+
import { AddressProps } from '../../../types/addressProps.js';
|
|
3
|
+
import '@mui/material/Stack';
|
|
4
|
+
import '../../../types/baseField.js';
|
|
4
5
|
import 'react-hook-form';
|
|
5
6
|
|
|
6
|
-
interface Props {
|
|
7
|
-
containerProps?: StackProps;
|
|
8
|
-
required?: boolean;
|
|
9
|
-
tabIndex?: number;
|
|
10
|
-
}
|
|
11
|
-
type AddressProps = BaseField<Props>;
|
|
12
|
-
|
|
13
7
|
declare const Address: ({ name, containerProps, required, rules, tabIndex, }: AddressProps) => react_jsx_runtime.JSX.Element;
|
|
14
8
|
|
|
15
9
|
export { Address as default };
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
2
|
+
import { FieldProps } from '../../../types/fieldProps.js';
|
|
3
|
+
import '@mui/material/TextField';
|
|
4
|
+
import '../../../types/baseField.js';
|
|
4
5
|
import 'react-hook-form';
|
|
5
6
|
|
|
6
|
-
type FieldProps = BaseField<TextFieldProps>;
|
|
7
|
-
|
|
8
7
|
declare const Field: ({ name, helperText, rules, onChange, tabIndex, ...other }: FieldProps) => react_jsx_runtime.JSX.Element;
|
|
9
8
|
|
|
10
9
|
export { Field as default };
|
|
@@ -1,18 +1,9 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
2
|
+
import { IncrementerProps } from '../../../types/incrementerProps.js';
|
|
3
|
+
import '@mui/material/TextField';
|
|
4
|
+
import '../../../types/baseField.js';
|
|
4
5
|
import 'react-hook-form';
|
|
5
6
|
|
|
6
|
-
type IncrementerProps = BaseField<TextFieldProps> & {
|
|
7
|
-
increment?: number;
|
|
8
|
-
updadteForMultiple?: boolean;
|
|
9
|
-
allowNegative?: boolean;
|
|
10
|
-
decimalScale?: number;
|
|
11
|
-
minValue?: number;
|
|
12
|
-
maxValue?: number;
|
|
13
|
-
loading?: boolean;
|
|
14
|
-
};
|
|
15
|
-
|
|
16
7
|
declare const Incrementer: ({ name, helperText, rules, ...other }: IncrementerProps) => react_jsx_runtime.JSX.Element;
|
|
17
8
|
|
|
18
9
|
export { Incrementer as default };
|
|
@@ -1,21 +1,9 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
2
|
+
import { MultiCheckboxProps } from '../../../types/multiCheckboxProps.js';
|
|
3
|
+
import '@mui/material/FormControlLabel';
|
|
4
|
+
import '../../../types/baseField.js';
|
|
4
5
|
import 'react-hook-form';
|
|
5
6
|
|
|
6
|
-
interface MultiCheckbox$1 extends Omit<FormControlLabelProps, 'control' | 'label'> {
|
|
7
|
-
name: string;
|
|
8
|
-
options: {
|
|
9
|
-
label: string;
|
|
10
|
-
value: string;
|
|
11
|
-
}[];
|
|
12
|
-
row?: boolean;
|
|
13
|
-
label?: string;
|
|
14
|
-
spacing?: number;
|
|
15
|
-
helperText?: React.ReactNode;
|
|
16
|
-
}
|
|
17
|
-
type MultiCheckboxProps = BaseField<MultiCheckbox$1>;
|
|
18
|
-
|
|
19
7
|
declare const MultiCheckbox: ({ row, name, rules, label, options, spacing, helperText, required, ...other }: MultiCheckboxProps) => react_jsx_runtime.JSX.Element;
|
|
20
8
|
|
|
21
9
|
export { MultiCheckbox as default };
|
|
@@ -1,23 +1,10 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import
|
|
2
|
+
import { RadioGroupProps } from '../../../types/radioGroupProps.js';
|
|
3
|
+
import 'react';
|
|
4
|
+
import '@mui/material/RadioGroup';
|
|
5
|
+
import '../../../types/baseField.js';
|
|
5
6
|
import 'react-hook-form';
|
|
6
7
|
|
|
7
|
-
type Props = RadioGroupProps$1 & {
|
|
8
|
-
options: {
|
|
9
|
-
label: string;
|
|
10
|
-
value: string;
|
|
11
|
-
icon?: ReactNode;
|
|
12
|
-
}[];
|
|
13
|
-
spacing?: number;
|
|
14
|
-
helperText?: React.ReactNode;
|
|
15
|
-
decorated?: boolean;
|
|
16
|
-
required?: boolean;
|
|
17
|
-
disabled?: boolean;
|
|
18
|
-
};
|
|
19
|
-
type RadioGroupProps = BaseField<Props>;
|
|
20
|
-
|
|
21
8
|
declare const RadioGroup: ({ name, rules, row, label, options, spacing, helperText, decorated, onChange, tabIndex, required, disabled, ...other }: RadioGroupProps) => react_jsx_runtime.JSX.Element;
|
|
22
9
|
|
|
23
10
|
export { RadioGroup as default };
|
|
@@ -1,14 +1,9 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
2
|
+
import { SwitchProps } from '../../../types/switchProps.js';
|
|
3
|
+
import '@mui/material/FormControlLabel';
|
|
4
|
+
import '../../../types/baseField.js';
|
|
4
5
|
import 'react-hook-form';
|
|
5
6
|
|
|
6
|
-
interface Props extends Omit<FormControlLabelProps, 'control'> {
|
|
7
|
-
helperText?: React.ReactNode;
|
|
8
|
-
size?: 'small' | 'medium';
|
|
9
|
-
}
|
|
10
|
-
type SwitchProps = BaseField<Props>;
|
|
11
|
-
|
|
12
7
|
declare const Switch: ({ name, helperText, onChange, tabIndex, size, label, ...other }: SwitchProps) => react_jsx_runtime.JSX.Element;
|
|
13
8
|
|
|
14
9
|
export { Switch as default };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { StackProps } from '@mui/material/Stack';
|
|
2
|
+
import { BaseField } from './baseField.js';
|
|
3
|
+
import 'react-hook-form';
|
|
4
|
+
|
|
5
|
+
interface Props {
|
|
6
|
+
containerProps?: StackProps;
|
|
7
|
+
required?: boolean;
|
|
8
|
+
tabIndex?: number;
|
|
9
|
+
}
|
|
10
|
+
type AddressProps = BaseField<Props>;
|
|
11
|
+
|
|
12
|
+
export { AddressProps, Props };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { BaseAutoComplete } from './autoComplete.js';
|
|
2
|
+
import { Option } from './option.js';
|
|
3
|
+
import 'react';
|
|
4
|
+
import '@mui/material/Autocomplete';
|
|
5
|
+
import './icon.js';
|
|
6
|
+
|
|
7
|
+
type AutocompleteProps = BaseAutoComplete & {
|
|
8
|
+
name: string;
|
|
9
|
+
label?: string;
|
|
10
|
+
onChange(value: NonNullable<string | Option> | (string | Option)[] | null | undefined): void;
|
|
11
|
+
error?: boolean;
|
|
12
|
+
helperText?: string;
|
|
13
|
+
showValueInLabel?: boolean;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export { AutocompleteProps };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { TextFieldProps } from '@mui/material/TextField';
|
|
2
|
+
import { BaseField } from './baseField.js';
|
|
3
|
+
import 'react-hook-form';
|
|
4
|
+
|
|
5
|
+
type IncrementerProps = BaseField<TextFieldProps> & {
|
|
6
|
+
increment?: number;
|
|
7
|
+
updadteForMultiple?: boolean;
|
|
8
|
+
allowNegative?: boolean;
|
|
9
|
+
decimalScale?: number;
|
|
10
|
+
minValue?: number;
|
|
11
|
+
maxValue?: number;
|
|
12
|
+
loading?: boolean;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export { IncrementerProps };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { FormControlLabelProps } from '@mui/material/FormControlLabel';
|
|
2
|
+
import { BaseField } from './baseField.js';
|
|
3
|
+
import 'react-hook-form';
|
|
4
|
+
|
|
5
|
+
interface MultiCheckbox extends Omit<FormControlLabelProps, 'control' | 'label'> {
|
|
6
|
+
name: string;
|
|
7
|
+
options: {
|
|
8
|
+
label: string;
|
|
9
|
+
value: string;
|
|
10
|
+
}[];
|
|
11
|
+
row?: boolean;
|
|
12
|
+
label?: string;
|
|
13
|
+
spacing?: number;
|
|
14
|
+
helperText?: React.ReactNode;
|
|
15
|
+
}
|
|
16
|
+
type MultiCheckboxProps = BaseField<MultiCheckbox>;
|
|
17
|
+
|
|
18
|
+
export { MultiCheckbox, MultiCheckboxProps };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { RadioGroupProps as RadioGroupProps$1 } from '@mui/material/RadioGroup';
|
|
3
|
+
import { BaseField } from './baseField.js';
|
|
4
|
+
import 'react-hook-form';
|
|
5
|
+
|
|
6
|
+
type Props = RadioGroupProps$1 & {
|
|
7
|
+
options: {
|
|
8
|
+
label: string;
|
|
9
|
+
value: string;
|
|
10
|
+
icon?: ReactNode;
|
|
11
|
+
}[];
|
|
12
|
+
spacing?: number;
|
|
13
|
+
helperText?: React.ReactNode;
|
|
14
|
+
decorated?: boolean;
|
|
15
|
+
required?: boolean;
|
|
16
|
+
disabled?: boolean;
|
|
17
|
+
};
|
|
18
|
+
type RadioGroupProps = BaseField<Props>;
|
|
19
|
+
|
|
20
|
+
export { Props, RadioGroupProps };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { FormControlLabelProps } from '@mui/material/FormControlLabel';
|
|
2
|
+
import { BaseField } from './baseField.js';
|
|
3
|
+
import 'react-hook-form';
|
|
4
|
+
|
|
5
|
+
interface Props extends Omit<FormControlLabelProps, 'control'> {
|
|
6
|
+
helperText?: React.ReactNode;
|
|
7
|
+
size?: 'small' | 'medium';
|
|
8
|
+
}
|
|
9
|
+
type SwitchProps = BaseField<Props>;
|
|
10
|
+
|
|
11
|
+
export { Props, SwitchProps };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|