react-crud-mui 0.2.93 → 0.2.95

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.
@@ -1,6 +1,7 @@
1
1
  import { default as React, ReactNode } from 'react';
2
2
  import { ControllerFieldState, ControllerRenderProps, FieldValues, Mode, Path, UseControllerProps } from 'react-hook-form';
3
3
  import { default as FieldGroupProvider } from './components/FieldGroupProvider';
4
+ import { default as FieldSet } from './components/FieldSet';
4
5
  import { default as FieldWatch } from './components/FieldWatch';
5
6
  import { default as FieldWithProvider } from './components/FieldWithProvider';
6
7
  import { default as FormButton } from './components/FormButton';
@@ -51,6 +52,7 @@ declare namespace Field {
51
52
  var RadioGroup: typeof FormRadioGroup;
52
53
  var DatePicker: typeof FormDatePicker;
53
54
  var PanelSelect: typeof FormPanelSelect;
55
+ var Set: typeof FieldSet;
54
56
  var Button: typeof FormButton;
55
57
  var Watch: typeof FieldWatch;
56
58
  var Group: typeof FieldGroupProvider;
@@ -0,0 +1,13 @@
1
+ import { ReactNode } from 'react';
2
+ import { FieldValues, useFormContext } from 'react-hook-form';
3
+ /**
4
+ * A wrapper component for react-hook-form's useFormContext, which provides the form context to its children.
5
+ * It accepts a render prop as its child, which receives the form context as an argument.
6
+ *
7
+ * @param props - The props for the FieldSet component.
8
+ * @returns A React element that renders the children with the form context.
9
+ */
10
+ declare function FieldSet<TFieldValues extends FieldValues = FieldValues>(props: {
11
+ children: (context: ReturnType<typeof useFormContext<TFieldValues>>) => ReactNode;
12
+ }): import("react/jsx-runtime").JSX.Element;
13
+ export default FieldSet;
@@ -5,6 +5,7 @@ export type SidePanelItem = {
5
5
  name: React.ReactNode;
6
6
  icon?: React.ReactNode;
7
7
  endIcon?: React.ReactNode;
8
+ danger?: boolean;
8
9
  };
9
10
  export interface SidePanelProps extends BoxProps {
10
11
  items: SidePanelItem[];
@@ -2,4 +2,5 @@ export declare const StyledButton: import('@emotion/styled').StyledComponent<imp
2
2
  ref?: ((instance: HTMLButtonElement | 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<HTMLButtonElement> | null | undefined;
3
3
  }, "className" | "style" | "classes" | "color" | "children" | "sx" | "tabIndex" | "href" | "disabled" | "action" | "size" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "disableFocusRipple" | "variant" | "fullWidth" | "disableElevation" | "endIcon" | "startIcon"> & import('@mui/system').MUIStyledCommonProps<import('@mui/material').Theme> & {
4
4
  active: boolean;
5
+ danger?: boolean;
5
6
  }, {}, {}>;