react-crud-mui 0.2.7 → 0.2.9
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/form/Field.d.ts +2 -0
- package/dist/components/form/controls/FormPanelSelect.d.ts +8 -0
- package/dist/components/form/controls/FormRadioGroup.d.ts +2 -1
- package/dist/components/panel-select/PanelSelect.d.ts +14 -0
- package/dist/components/panel-select/PanelSelectItem.d.ts +17 -0
- package/dist/components/panel-select/styles.d.ts +6 -0
- package/dist/components/side-panel/SidePanel.d.ts +1 -2
- package/dist/coreui.js +3869 -3772
- package/dist/index.d.ts +1 -1
- package/package.json +1 -1
|
@@ -11,6 +11,7 @@ import { default as FormInput } from './controls/FormInput';
|
|
|
11
11
|
import { default as FormMaskedInput } from './controls/FormMaskedInput';
|
|
12
12
|
import { default as FormMoneyInput } from './controls/FormMoneyInput';
|
|
13
13
|
import { default as FormNumberInput } from './controls/FormNumberInput';
|
|
14
|
+
import { default as FormPanelSelect } from './controls/FormPanelSelect';
|
|
14
15
|
import { default as FormPhoneInput } from './controls/FormPhoneInput';
|
|
15
16
|
import { default as FormRadioGroup } from './controls/FormRadioGroup';
|
|
16
17
|
import { default as FormSearchInput } from './controls/FormSearchInput';
|
|
@@ -47,6 +48,7 @@ declare namespace Field {
|
|
|
47
48
|
var Select: typeof FormSelect;
|
|
48
49
|
var RadioGroup: typeof FormRadioGroup;
|
|
49
50
|
var DatePicker: typeof FormDatePicker;
|
|
51
|
+
var PanelSelect: typeof FormPanelSelect;
|
|
50
52
|
var Button: typeof FormButton;
|
|
51
53
|
var Watch: typeof FieldWatch;
|
|
52
54
|
var Group: typeof FieldGroupProvider;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { FieldValues } from 'react-hook-form';
|
|
2
|
+
import { PanelSelectProps } from '../../panel-select/PanelSelect';
|
|
3
|
+
import { FormControlProps } from '../components/FormControl';
|
|
4
|
+
import { ControlCommonProps } from '../Field';
|
|
5
|
+
export interface FormPanelSelectProps<TFieldValues extends FieldValues = FieldValues> extends Omit<PanelSelectProps, 'name'>, ControlCommonProps<TFieldValues>, FormControlProps {
|
|
6
|
+
}
|
|
7
|
+
declare function FormPanelSelect<TFieldValues extends FieldValues = FieldValues>({ name, label, helperText, placement, fieldProps, formControlProps, ...panelSelectProps }: FormPanelSelectProps<TFieldValues>): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export default FormPanelSelect;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
1
2
|
import { FieldValues } from 'react-hook-form';
|
|
2
3
|
import { RadioGroupProps } from '@mui/material/RadioGroup';
|
|
3
4
|
import { FormControlProps } from '../components/FormControl';
|
|
4
5
|
import { ControlCommonProps } from '../Field';
|
|
5
6
|
export type RadioGroupData = {
|
|
6
7
|
value: string | number;
|
|
7
|
-
label:
|
|
8
|
+
label: React.ReactNode;
|
|
8
9
|
};
|
|
9
10
|
export interface FormRadioGroupProps<TFieldValues extends FieldValues = FieldValues> extends Omit<RadioGroupProps, 'name'>, ControlCommonProps<TFieldValues>, FormControlProps {
|
|
10
11
|
data?: RadioGroupData[];
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { StackProps } from '@mui/material';
|
|
2
|
+
import { PanelSelectItemProps } from './PanelSelectItem';
|
|
3
|
+
export type PanelSelectData = {
|
|
4
|
+
value: string | number;
|
|
5
|
+
} & Pick<PanelSelectItemProps, 'deleteable' | 'helperText' | 'icon' | 'rightContent' | 'selectedIcon' | 'label' | 'sx'>;
|
|
6
|
+
export interface PanelSelectProps extends Omit<StackProps, 'onChange'> {
|
|
7
|
+
data: PanelSelectData[];
|
|
8
|
+
value: string | number;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
onChange: (value: string | number) => void;
|
|
11
|
+
onDelete: (value: string | number) => void;
|
|
12
|
+
}
|
|
13
|
+
declare function PanelSelect({ onDelete, data, onChange, value, disabled, ...stackProps }: PanelSelectProps): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export default PanelSelect;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { SxProps } from '@mui/material';
|
|
3
|
+
export interface PanelSelectItemProps {
|
|
4
|
+
disabled?: boolean;
|
|
5
|
+
icon?: React.ReactNode;
|
|
6
|
+
selectedIcon?: React.ReactNode;
|
|
7
|
+
label: React.ReactNode;
|
|
8
|
+
helperText?: React.ReactNode;
|
|
9
|
+
selected?: boolean;
|
|
10
|
+
deleteable?: boolean;
|
|
11
|
+
rightContent?: React.ReactNode;
|
|
12
|
+
onChange?: () => void;
|
|
13
|
+
onDelete?: () => void;
|
|
14
|
+
sx?: SxProps;
|
|
15
|
+
}
|
|
16
|
+
declare function PanelSelectItem({ deleteable, disabled, helperText, icon, label, onChange, onDelete, rightContent, selected, selectedIcon, sx, }: PanelSelectItemProps): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export default PanelSelectItem;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const StyledCard: import('@emotion/styled').StyledComponent<import('@mui/material').CardOwnProps & import('@mui/material/OverridableComponent').CommonProps & Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
2
|
+
ref?: ((instance: HTMLDivElement | null) => void | import('react').DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import('react').DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import('react').RefObject<HTMLDivElement> | null | undefined;
|
|
3
|
+
}, "className" | "style" | "classes" | "children" | "sx" | "elevation" | "square" | "variant" | "raised"> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & {
|
|
4
|
+
selected?: boolean;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
}, {}, {}>;
|
|
@@ -2,9 +2,8 @@ import { default as React } from 'react';
|
|
|
2
2
|
import { BoxProps } from '@mui/material';
|
|
3
3
|
export type SidePanelItem = {
|
|
4
4
|
key: string;
|
|
5
|
-
name:
|
|
5
|
+
name: React.ReactNode;
|
|
6
6
|
icon?: React.ReactNode;
|
|
7
|
-
link?: string;
|
|
8
7
|
};
|
|
9
8
|
export interface SidePanelProps extends BoxProps {
|
|
10
9
|
items: SidePanelItem[];
|