@movable/ui 2.11.0 → 2.12.1

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.
@@ -0,0 +1,5 @@
1
+ import { UseControllerProps, FieldPath, FieldValues } from 'react-hook-form';
2
+ import { InkRadioGroupProps } from './index';
3
+ type InkFormRadioGroupProps<TFieldValues extends FieldValues, TName extends FieldPath<TFieldValues>> = InkRadioGroupProps & UseControllerProps<TFieldValues, TName>;
4
+ export default function InkFormRadioGroup<TFieldValues extends FieldValues, TName extends FieldPath<TFieldValues>>({ control, name, rules, onChange, ...rest }: InkFormRadioGroupProps<TFieldValues, TName>): import("react/jsx-runtime").JSX.Element;
5
+ export {};
@@ -0,0 +1,23 @@
1
+ import { RadioProps } from '@mui/material/Radio';
2
+ import { RadioGroupProps } from '@mui/material/RadioGroup';
3
+ import { FormLabelProps } from '@mui/material/FormLabel';
4
+ import { StackProps } from '@mui/material/Stack';
5
+ export type InkRadioGroupProps = {
6
+ formLabel: string;
7
+ currentValue: string;
8
+ options: {
9
+ value: string;
10
+ label: string;
11
+ radioProps?: RadioProps;
12
+ }[];
13
+ onChange: (value: string) => void;
14
+ radioGroupProps?: RadioGroupProps;
15
+ formLabelProps?: FormLabelProps;
16
+ stackProps?: StackProps;
17
+ required?: boolean;
18
+ error?: boolean;
19
+ helperText?: string;
20
+ defaultValue?: string;
21
+ };
22
+ declare const InkRadioGroup: import("react").ForwardRefExoticComponent<InkRadioGroupProps & import("react").RefAttributes<HTMLDivElement>>;
23
+ export default InkRadioGroup;
@@ -0,0 +1,3 @@
1
+ export { default as InkRadioGroup } from './InkRadioGroup';
2
+ export { default as InkFormRadioGroup } from './InkFormRadioGroup';
3
+ export type { InkRadioGroupProps } from './InkRadioGroup';
@@ -18,4 +18,6 @@ export * from './InkSnackbar';
18
18
  export { InkAttributeList } from './InkAttributeList';
19
19
  export { InkImage } from './InkImage';
20
20
  export { InkDrawer } from './InkDrawer';
21
+ export * from './InkCheckboxGroup';
22
+ export * from './InkRadioGroup';
21
23
  export * from './InkTextField';
package/lib/index.d.ts CHANGED
@@ -3,6 +3,7 @@ import { BoxProps } from '@mui/material';
3
3
  import { BoxProps as BoxProps_2 } from '@mui/material/Box';
4
4
  import { ButtonProps } from '@mui/material';
5
5
  import { ButtonProps as ButtonProps_2 } from '@mui/material/Button';
6
+ import { CheckboxProps } from '@mui/material/Checkbox';
6
7
  import { ChipProps } from '@mui/material';
7
8
  import { CustomContentProps } from 'notistack';
8
9
  import type { DialogProps } from '@mui/material/Dialog';
@@ -10,6 +11,8 @@ import { DrawerProps } from '@mui/material/Drawer';
10
11
  import { DrawerProps as DrawerProps_2 } from '@mui/material';
11
12
  import { FieldPath } from 'react-hook-form';
12
13
  import { FieldValues } from 'react-hook-form';
14
+ import { FormGroupProps } from '@mui/material/FormGroup';
15
+ import { FormLabelProps } from '@mui/material/FormLabel';
13
16
  import { ForwardRefExoticComponent } from 'react';
14
17
  import { GridProps } from '@mui/material/Grid';
15
18
  import { JSX as JSX_2 } from 'react/jsx-runtime';
@@ -23,12 +26,15 @@ import { MenuProps } from '@mui/material';
23
26
  import { OverridableComponent } from '@mui/material/OverridableComponent';
24
27
  import { PaperProps } from '@mui/material/Paper';
25
28
  import { PropsWithChildren } from 'react';
29
+ import { RadioGroupProps } from '@mui/material/RadioGroup';
30
+ import { RadioProps } from '@mui/material/Radio';
26
31
  import { default as React_2 } from 'react';
27
32
  import { ReactNode } from 'react';
28
33
  import { Ref } from 'react';
29
34
  import { RefAttributes } from 'react';
30
35
  import { SelectProps } from '@mui/material';
31
36
  import { SnackbarProviderProps } from 'notistack';
37
+ import { StackProps } from '@mui/material/Stack';
32
38
  import { SvgIconTypeMap } from '@mui/material';
33
39
  import { SwitchProps } from '@mui/material';
34
40
  import { SxProps } from '@mui/material';
@@ -168,6 +174,25 @@ declare type InkAttributeProps = ListItemTextProps & {
168
174
  };
169
175
  };
170
176
 
177
+ export declare const InkCheckboxGroup: ForwardRefExoticComponent<InkCheckboxGroupProps & RefAttributes<HTMLDivElement>>;
178
+
179
+ export declare type InkCheckboxGroupProps = {
180
+ options: {
181
+ value: string;
182
+ label: string;
183
+ checkboxProps?: CheckboxProps;
184
+ }[];
185
+ formGroupProps?: FormGroupProps;
186
+ formLabel: string;
187
+ formLabelProps?: FormLabelProps;
188
+ stackProps?: StackProps;
189
+ currentValue: string[];
190
+ onChange: (values: string[]) => void;
191
+ required?: boolean;
192
+ error?: boolean;
193
+ helperText?: string;
194
+ };
195
+
171
196
  export declare function InkChip({ maxWidth, chipProps, size, expandOnHover, }: InkChipPropType): JSX_2.Element;
172
197
 
173
198
  export declare function InkChipGroup({ chipList, numTagsToDisplay, size, maxChipWidth, }: InkChipGroupProps): JSX_2.Element;
@@ -234,6 +259,14 @@ declare type InkEmptyStateProps = {
234
259
  sx?: SxProps<Theme>;
235
260
  };
236
261
 
262
+ export declare function InkFormCheckboxGroup<TFieldValues extends FieldValues, TName extends FieldPath<TFieldValues>>({ control, name, rules, onChange, ...rest }: InkFormCheckboxGroupProps<TFieldValues, TName>): JSX_2.Element;
263
+
264
+ declare type InkFormCheckboxGroupProps<TFieldValues extends FieldValues, TName extends FieldPath<TFieldValues>> = InkCheckboxGroupProps & UseControllerProps<TFieldValues, TName>;
265
+
266
+ export declare function InkFormRadioGroup<TFieldValues extends FieldValues, TName extends FieldPath<TFieldValues>>({ control, name, rules, onChange, ...rest }: InkFormRadioGroupProps<TFieldValues, TName>): JSX_2.Element;
267
+
268
+ declare type InkFormRadioGroupProps<TFieldValues extends FieldValues, TName extends FieldPath<TFieldValues>> = InkRadioGroupProps & UseControllerProps<TFieldValues, TName>;
269
+
237
270
  export declare function InkFormSelect<TFieldValues extends FieldValues, TName extends FieldPath<TFieldValues>>({ control, name, rules, helperText, onChange, onBlur, ...rest }: InkFormSelectProps<TFieldValues, TName>): JSX_2.Element;
238
271
 
239
272
  declare type InkFormSelectProps<TFieldValues extends FieldValues, TName extends FieldPath<TFieldValues>> = InkSelectProps & UseControllerProps<TFieldValues, TName>;
@@ -278,6 +311,26 @@ export declare type InkPaperProps = PaperProps & {
278
311
  export declare function InkPersistentFilterDrawer({ isOpen, handleDrawerClose, children, drawerWidth, leftOffset, //primary nav width when closed and when open
279
312
  filterContent, bottomFilter, headerLabel, sx, isComponentLevelDrawer, mainProps, }: PropsWithChildren<IFilterDrawer>): JSX_2.Element;
280
313
 
314
+ export declare const InkRadioGroup: ForwardRefExoticComponent<InkRadioGroupProps & RefAttributes<HTMLDivElement>>;
315
+
316
+ export declare type InkRadioGroupProps = {
317
+ formLabel: string;
318
+ currentValue: string;
319
+ options: {
320
+ value: string;
321
+ label: string;
322
+ radioProps?: RadioProps;
323
+ }[];
324
+ onChange: (value: string) => void;
325
+ radioGroupProps?: RadioGroupProps;
326
+ formLabelProps?: FormLabelProps;
327
+ stackProps?: StackProps;
328
+ required?: boolean;
329
+ error?: boolean;
330
+ helperText?: string;
331
+ defaultValue?: string;
332
+ };
333
+
281
334
  export declare const InkRadioTiles: ({ name, options, value, ref, direction, cardSx, fullWidth, disabled, onChange, onBlur, }: InkRadioTilesProps) => JSX_2.Element;
282
335
 
283
336
  export declare type InkRadioTilesProps = {