@movable/ui 1.7.0 → 1.8.0

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,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { ButtonProps } from '@mui/material';
3
2
  import type { DialogProps } from '@mui/material/Dialog';
4
3
  export type ActionPropType = Omit<ButtonProps, 'variant'> & {
@@ -1,8 +1,7 @@
1
- /// <reference types="react" />
2
1
  type HeaderMetadataType = {
3
2
  icon: string | JSX.Element;
4
3
  label: string;
5
- value: string;
4
+ value: string | JSX.Element;
6
5
  };
7
6
  type MetaDataProps = {
8
7
  metadata: HeaderMetadataType[];
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { SxProps, Theme } from '@mui/material';
3
2
  type InkPageHeaderProps = {
4
3
  Breadcrumbs?: JSX.Element;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  type InkWorkflowHeaderProps = {
3
2
  label: string;
4
3
  Stepper?: JSX.Element;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { AppBarProps } from '@mui/material';
3
2
  export type Position = 'sticky' | 'static';
4
3
  type StickyHeaderProps = Omit<AppBarProps, 'children'> & {
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { OverridableComponent } from '@mui/material/OverridableComponent';
3
2
  import { SvgIconTypeMap } from '@mui/material';
4
3
  type EmptyStateIconType = {
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { SxProps, Theme, SvgIconTypeMap } from '@mui/material';
3
2
  import { OverridableComponent } from '@mui/material/OverridableComponent';
4
3
  import { VariantType } from './VariantStyles';
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  type InkEmptyTableProps = {
3
2
  icon?: JSX.Element;
4
3
  title?: string;
@@ -1,12 +1,10 @@
1
1
  import { SelectProps, SxProps, Theme } from '@mui/material';
2
2
  import { UseControllerProps, FieldPath, FieldValues } from 'react-hook-form';
3
+ import { MenuOption } from './useMenuHelper';
3
4
  type InkSelectProps<TFieldValues extends FieldValues, TName extends FieldPath<TFieldValues>> = {
4
5
  id: string;
5
6
  label?: string;
6
- menuOptions?: {
7
- label: string;
8
- value: string;
9
- }[];
7
+ menuOptions?: MenuOption[];
10
8
  variant?: 'filled' | 'outlined';
11
9
  placeholder?: string;
12
10
  helperText?: string;
@@ -1,3 +1,3 @@
1
1
  export declare const InkSelectTest: ({ helperText }: {
2
- helperText?: string | undefined;
2
+ helperText?: string;
3
3
  }) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,17 @@
1
+ import { MenuItemProps } from '@mui/material';
2
+ export type MenuOption = MenuItemProps & {
3
+ label: string;
4
+ group?: string;
5
+ };
6
+ type MenuPositionType = {
7
+ maxHeight: number;
8
+ placement: 'top' | 'bottom';
9
+ };
10
+ type UseMenuHelperParams = {
11
+ menuMaxHeight: number;
12
+ menuPlacement: MenuPositionType['placement'];
13
+ handleMenuOpen: (anchorRef: React.MutableRefObject<HTMLElement | null>) => void;
14
+ renderMenuItems: (children: React.ReactNode, menuOptions?: MenuOption[]) => JSX.Element[] | React.ReactNode;
15
+ };
16
+ declare const useMenuHelper: () => UseMenuHelperParams;
17
+ export default useMenuHelper;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { ToggleButtonProps } from '@mui/material';
3
2
  type InkToggleIconProps = ToggleButtonProps & {
4
3
  ariaLabel?: string;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { ToggleButtonGroupProps } from '@mui/material';
3
2
  export type InkToggleIconGroupProps = ToggleButtonGroupProps & {
4
3
  id: string;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { ToggleButtonGroupProps } from '@mui/material';
3
2
  type InkToggleTextGroupProps = ToggleButtonGroupProps & {
4
3
  id: string;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { PaperProps } from '@mui/material/Paper';
3
2
  export type InkPaperProps = PaperProps & {
4
3
  Header: string | JSX.Element;