@movable/ui 2.9.0 → 2.11.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.
- package/lib/components/Chip/InkChip.d.ts +9 -0
- package/lib/components/Chip/index.d.ts +1 -0
- package/lib/components/ChipGroup/InkChipGroup.d.ts +9 -0
- package/lib/components/ChipGroup/index.d.ts +1 -0
- package/lib/components/DemoComponent.d.ts +5 -0
- package/lib/components/Dialog/ActionButtonHelper.d.ts +4 -0
- package/lib/components/Dialog/DialogIcons.d.ts +5 -0
- package/lib/components/Dialog/InkDialog.d.ts +23 -0
- package/lib/components/Dialog/index.d.ts +1 -0
- package/lib/components/Header/HeaderMetadata.d.ts +10 -0
- package/lib/components/Header/HeaderSubtitle.d.ts +5 -0
- package/lib/components/Header/InkPageHeader.d.ts +12 -0
- package/lib/components/Header/InkWorkflowHeader.d.ts +19 -0
- package/lib/components/Header/InternalUseOnlyLabel.d.ts +6 -0
- package/lib/components/Header/LinkBreadcrumbs.d.ts +14 -0
- package/lib/components/Header/PageHeaderActionButtons.d.ts +23 -0
- package/lib/components/Header/StickyHeader.d.ts +9 -0
- package/lib/components/Header/index.d.ts +6 -0
- package/lib/components/InkAttributeList/InkAttribute.d.ts +10 -0
- package/lib/components/InkAttributeList/InkAttributeList.d.ts +8 -0
- package/lib/components/InkAttributeList/index.d.ts +3 -0
- package/lib/components/InkCheckboxGroup/InkCheckboxGroup.d.ts +22 -0
- package/lib/components/InkCheckboxGroup/InkFormCheckboxGroup.d.ts +5 -0
- package/lib/components/InkCheckboxGroup/index.d.ts +3 -0
- package/lib/components/InkDrawer/HeaderIcon.d.ts +7 -0
- package/lib/components/InkDrawer/InkDrawer.d.ts +28 -0
- package/lib/components/InkDrawer/index.d.ts +1 -0
- package/lib/components/InkEmptyState/EmptyStateIcon.d.ts +8 -0
- package/lib/components/InkEmptyState/InkEmptyState.d.ts +17 -0
- package/lib/components/InkEmptyState/VariantStyles.d.ts +10 -0
- package/lib/components/InkEmptyState/index.d.ts +1 -0
- package/lib/components/InkEmptyTableMessage/InkEmptyTableMessage.d.ts +7 -0
- package/lib/components/InkEmptyTableMessage/index.d.ts +1 -0
- package/lib/components/InkFormSelect/InkFormSelect.d.ts +5 -0
- package/lib/components/InkFormSelect/MockFormSelect.d.ts +9 -0
- package/lib/components/InkFormSelect/index.d.ts +1 -0
- package/lib/components/InkImage/InkImage.d.ts +8 -0
- package/lib/components/InkImage/index.d.ts +2 -0
- package/lib/components/InkRadioTiles/InkRadioTiles.d.ts +24 -0
- package/lib/components/InkRadioTiles/index.d.ts +1 -0
- package/lib/components/InkSelect/InkSelect.d.ts +2 -0
- package/lib/components/InkSelect/InkSelectTest.d.ts +9 -0
- package/lib/components/InkSelect/MenuOptionsTest.d.ts +4 -0
- package/lib/components/InkSelect/index.d.ts +2 -0
- package/lib/components/InkSelect/types.d.ts +20 -0
- package/lib/components/InkSelect/useMenuHelper.d.ts +3 -0
- package/lib/components/InkSnackbar/InkSnackbarAlert.d.ts +12 -0
- package/lib/components/InkSnackbar/InkSnackbarContent.d.ts +3 -0
- package/lib/components/InkSnackbar/InkSnackbarContentProps.d.ts +8 -0
- package/lib/components/InkSnackbar/InkSnackbarProvider.d.ts +3 -0
- package/lib/components/InkSnackbar/SnackbarActionButton.d.ts +7 -0
- package/lib/components/InkSnackbar/index.d.ts +6 -0
- package/lib/components/InkTextField/InkFormTextField.d.ts +7 -0
- package/lib/components/InkTextField/InkTextField.d.ts +5 -0
- package/lib/components/InkTextField/index.d.ts +3 -0
- package/lib/components/InkToggleIcon/InkToggleIcon.d.ts +9 -0
- package/lib/components/InkToggleIcon/index.d.ts +1 -0
- package/lib/components/InkToggleIconGroup/InkToggleIconGroup.d.ts +14 -0
- package/lib/components/InkToggleIconGroup/index.d.ts +1 -0
- package/lib/components/InkToggleText/InkToggleText.d.ts +9 -0
- package/lib/components/InkToggleText/index.d.ts +1 -0
- package/lib/components/InkToggleTextGroup/InkToggleTextGroup.d.ts +15 -0
- package/lib/components/InkToggleTextGroup/index.d.ts +1 -0
- package/lib/components/PersistentFilterDrawer/InkPersistentFilterDrawer.d.ts +18 -0
- package/lib/components/PersistentFilterDrawer/index.d.ts +1 -0
- package/lib/components/Switch/InkSwitch.d.ts +8 -0
- package/lib/components/Switch/index.d.ts +1 -0
- package/lib/components/index.d.ts +21 -0
- package/lib/components/surfaces/InkPaper.d.ts +9 -0
- package/lib/components/surfaces/index.d.ts +1 -0
- package/lib/hooks/index.d.ts +1 -0
- package/lib/hooks/useCopyToClipboard.d.ts +4 -0
- package/lib/index.d.ts +17 -4
- package/lib/index.mjs +11799 -6510
- package/lib/index.mjs.map +1 -1
- package/lib/layouts/DetailsLayout.d.ts +7 -0
- package/lib/layouts/IndexLayout.d.ts +7 -0
- package/lib/layouts/WorkflowLayout.d.ts +7 -0
- package/lib/layouts/index.d.ts +3 -0
- package/lib/layouts/mocks/MockDetailsBody.d.ts +1 -0
- package/lib/layouts/mocks/MockIndexBody.d.ts +1 -0
- package/lib/layouts/mocks/MockInkPageHeader.d.ts +4 -0
- package/lib/layouts/mocks/MockWorkflowBody.d.ts +1 -0
- package/lib/layouts/mocks/MockWorkflowHeader.d.ts +1 -0
- package/lib/layouts/mocks/index.d.ts +5 -0
- package/lib/page-objects/index.d.ts +5 -0
- package/lib/page-objects/ink-checkbox-group.d.ts +19 -0
- package/lib/page-objects/ink-dialog.d.ts +21 -0
- package/lib/page-objects/ink-image.d.ts +12 -0
- package/lib/page-objects/ink-select.d.ts +22 -0
- package/lib/page-objects/ink-snackbar-alert.d.ts +12 -0
- package/lib/page-objects/ink-text-field.d.ts +24 -0
- package/lib/theme/components/Alert.d.ts +60 -0
- package/lib/theme/components/DataGrid.d.ts +45 -0
- package/lib/theme/components/autocomplete.d.ts +62 -0
- package/lib/theme/components/chip.d.ts +296 -0
- package/lib/theme/components/dialog.d.ts +32 -0
- package/lib/theme/components/drawer.d.ts +10 -0
- package/lib/theme/components/form.d.ts +255 -0
- package/lib/theme/components/snackbar.d.ts +13 -0
- package/lib/theme/components/stepper.d.ts +894 -0
- package/lib/theme/components/surfaces/card.d.ts +61 -0
- package/lib/theme/components/surfaces/index.d.ts +3 -0
- package/lib/theme/components/surfaces/paper.d.ts +26 -0
- package/lib/theme/components/typography.d.ts +18 -0
- package/lib/theme/palette.d.ts +237 -0
- package/lib/theme.d.ts +258 -0
- package/lib/utils/PageWrapper.d.ts +8 -0
- package/lib/utils/index.d.ts +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ChipProps } from '@mui/material';
|
|
2
|
+
type InkChipPropType = {
|
|
3
|
+
maxWidth?: number | null;
|
|
4
|
+
chipProps: ChipProps;
|
|
5
|
+
size?: 'small' | 'medium';
|
|
6
|
+
expandOnHover?: boolean;
|
|
7
|
+
};
|
|
8
|
+
export declare function InkChip({ maxWidth, chipProps, size, expandOnHover, }: InkChipPropType): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { InkChip } from './InkChip';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ChipProps } from '@mui/material';
|
|
2
|
+
type InkChipGroupProps = {
|
|
3
|
+
chipList: ChipProps[];
|
|
4
|
+
numTagsToDisplay?: number;
|
|
5
|
+
size?: 'small' | 'medium';
|
|
6
|
+
maxChipWidth?: number;
|
|
7
|
+
};
|
|
8
|
+
export declare function InkChipGroup({ chipList, numTagsToDisplay, size, maxChipWidth, }: InkChipGroupProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { InkChipGroup } from './InkChipGroup';
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { ButtonProps } from '@mui/material';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
export declare const getButtonElements: (element: ReactNode) => ReactNode[];
|
|
4
|
+
export declare const addContainedVariantToPrimaryButton: <T extends React.ReactNode>(element: T, primaryButton: React.ReactElement<ButtonProps> | null) => React.ReactNode;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ButtonProps } from '@mui/material';
|
|
2
|
+
import type { DialogProps } from '@mui/material/Dialog';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
export type ActionPropType = Omit<ButtonProps, 'variant'> & {
|
|
5
|
+
label: string;
|
|
6
|
+
variant?: 'primary' | 'warning' | 'destructive';
|
|
7
|
+
loading?: boolean;
|
|
8
|
+
};
|
|
9
|
+
type ActionsPropType = {
|
|
10
|
+
primary?: ActionPropType;
|
|
11
|
+
secondary?: ActionPropType;
|
|
12
|
+
cancel?: ActionPropType;
|
|
13
|
+
};
|
|
14
|
+
export type InkDialogProps = DialogProps & {
|
|
15
|
+
Title?: string | JSX.Element;
|
|
16
|
+
Content?: JSX.Element;
|
|
17
|
+
Actions?: JSX.Element;
|
|
18
|
+
hideCloseButton?: boolean;
|
|
19
|
+
onClose: (e?: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
|
|
20
|
+
ActionsProp?: ActionsPropType;
|
|
21
|
+
};
|
|
22
|
+
export declare function InkDialog({ Title, Content, Actions, onClose, hideCloseButton, ActionsProp, ...props }: InkDialogProps): import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './InkDialog';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
type HeaderMetadataType = {
|
|
2
|
+
icon?: string | JSX.Element;
|
|
3
|
+
label: string;
|
|
4
|
+
value: string | JSX.Element;
|
|
5
|
+
};
|
|
6
|
+
type MetaDataProps = {
|
|
7
|
+
metadata: HeaderMetadataType[];
|
|
8
|
+
};
|
|
9
|
+
export declare function HeaderMetadata({ metadata }: MetaDataProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { SxProps, Theme } from '@mui/material';
|
|
2
|
+
type InkPageHeaderProps = {
|
|
3
|
+
Breadcrumbs?: JSX.Element;
|
|
4
|
+
Subtitle?: JSX.Element;
|
|
5
|
+
Metadata?: JSX.Element;
|
|
6
|
+
ButtonGroup?: JSX.Element;
|
|
7
|
+
Chips?: JSX.Element;
|
|
8
|
+
Tabs?: JSX.Element;
|
|
9
|
+
sx?: SxProps<Theme>;
|
|
10
|
+
};
|
|
11
|
+
export declare function InkPageHeader({ Breadcrumbs, Subtitle, Metadata, Chips, ButtonGroup, Tabs, sx, }: InkPageHeaderProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ButtonProps } from '@mui/material';
|
|
2
|
+
type PrimaryButtonType = ButtonProps & {
|
|
3
|
+
label: string;
|
|
4
|
+
loading?: boolean;
|
|
5
|
+
};
|
|
6
|
+
type closeButtonType = {
|
|
7
|
+
onClick: (e?: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
|
|
8
|
+
};
|
|
9
|
+
type ActionButtonPropType = {
|
|
10
|
+
primary?: PrimaryButtonType;
|
|
11
|
+
close?: closeButtonType;
|
|
12
|
+
};
|
|
13
|
+
type InkWorkflowHeaderProps = {
|
|
14
|
+
label: string;
|
|
15
|
+
Stepper?: JSX.Element;
|
|
16
|
+
ButtonGroup?: JSX.Element | ActionButtonPropType;
|
|
17
|
+
};
|
|
18
|
+
export declare function InkWorkflowHeader({ label, Stepper, ButtonGroup, }: InkWorkflowHeaderProps): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { LinkProps } from '@mui/material';
|
|
2
|
+
type HeaderLink = {
|
|
3
|
+
label: string;
|
|
4
|
+
path?: string;
|
|
5
|
+
onClick?: () => void;
|
|
6
|
+
LinkProps?: {
|
|
7
|
+
to: string;
|
|
8
|
+
} & LinkProps;
|
|
9
|
+
};
|
|
10
|
+
type BreadcrumbProps = {
|
|
11
|
+
breadcrumbs: HeaderLink[];
|
|
12
|
+
};
|
|
13
|
+
export declare function LinkBreadcrumbs({ breadcrumbs }: BreadcrumbProps): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ButtonProps, MenuProps, MenuItemProps } from '@mui/material';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
type ButtonPropsType = ButtonProps & {
|
|
4
|
+
label: ReactNode;
|
|
5
|
+
};
|
|
6
|
+
type MenuOptionType = {
|
|
7
|
+
label: ReactNode;
|
|
8
|
+
onClick: () => void;
|
|
9
|
+
menuItemProps?: Partial<MenuItemProps>;
|
|
10
|
+
};
|
|
11
|
+
type DropdownActionType = {
|
|
12
|
+
label: ReactNode;
|
|
13
|
+
menuOptions: MenuOptionType[];
|
|
14
|
+
menuProps?: Partial<MenuProps>;
|
|
15
|
+
internalUseOnlyItems?: ReactNode[];
|
|
16
|
+
};
|
|
17
|
+
type PageHeaderActionButtonsProps = {
|
|
18
|
+
primaryAction?: ButtonPropsType;
|
|
19
|
+
secondaryAction?: ButtonPropsType;
|
|
20
|
+
dropdownAction?: DropdownActionType;
|
|
21
|
+
};
|
|
22
|
+
export declare function PageHeaderActionButtons({ primaryAction, secondaryAction, dropdownAction, }: PageHeaderActionButtonsProps): import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { AppBarProps } from '@mui/material';
|
|
2
|
+
export type Position = 'sticky' | 'static';
|
|
3
|
+
type StickyHeaderProps = Omit<AppBarProps, 'children'> & {
|
|
4
|
+
children: (props: {
|
|
5
|
+
position: Position;
|
|
6
|
+
}) => React.ReactNode;
|
|
7
|
+
};
|
|
8
|
+
declare const StickyHeader: React.FC<StickyHeaderProps>;
|
|
9
|
+
export default StickyHeader;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { HeaderMetadata } from './HeaderMetadata';
|
|
2
|
+
export { InkPageHeader } from './InkPageHeader';
|
|
3
|
+
export { LinkBreadcrumbs } from './LinkBreadcrumbs';
|
|
4
|
+
export { PageHeaderActionButtons } from './PageHeaderActionButtons';
|
|
5
|
+
export { HeaderSubtitle } from './HeaderSubtitle';
|
|
6
|
+
export { InkWorkflowHeader } from './InkWorkflowHeader';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ListItemProps } from '@mui/material/ListItem';
|
|
2
|
+
import { ListItemTextProps } from '@mui/material/ListItemText';
|
|
3
|
+
import { ListItemIconProps } from '@mui/material/ListItemIcon';
|
|
4
|
+
export type InkAttributeProps = ListItemTextProps & {
|
|
5
|
+
listItemProps?: ListItemProps;
|
|
6
|
+
listItemIconProps?: ListItemIconProps & {
|
|
7
|
+
adornment: 'start' | 'end';
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
export default function InkAttribute({ listItemProps, listItemIconProps, ...inkAttributeProps }: InkAttributeProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ListProps } from '@mui/material/List';
|
|
2
|
+
import { InkAttributeProps } from './InkAttribute';
|
|
3
|
+
type InkAttributeListProps = ListProps & {
|
|
4
|
+
label: string;
|
|
5
|
+
attributes: InkAttributeProps[];
|
|
6
|
+
};
|
|
7
|
+
export default function InkAttributeList({ label, attributes, ...listProps }: InkAttributeListProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { CheckboxProps } from '@mui/material/Checkbox';
|
|
2
|
+
import { FormGroupProps } from '@mui/material/FormGroup';
|
|
3
|
+
import { FormLabelProps } from '@mui/material/FormLabel';
|
|
4
|
+
import { StackProps } from '@mui/material/Stack';
|
|
5
|
+
export type InkCheckboxGroupProps = {
|
|
6
|
+
options: {
|
|
7
|
+
value: string;
|
|
8
|
+
label: string;
|
|
9
|
+
checkboxProps?: CheckboxProps;
|
|
10
|
+
}[];
|
|
11
|
+
formGroupProps?: FormGroupProps;
|
|
12
|
+
formLabel: string;
|
|
13
|
+
formLabelProps?: FormLabelProps;
|
|
14
|
+
stackProps?: StackProps;
|
|
15
|
+
currentValue: string[];
|
|
16
|
+
onChange: (values: string[]) => void;
|
|
17
|
+
required?: boolean;
|
|
18
|
+
error?: boolean;
|
|
19
|
+
helperText?: string;
|
|
20
|
+
};
|
|
21
|
+
declare const InkCheckboxGroup: import("react").ForwardRefExoticComponent<InkCheckboxGroupProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
22
|
+
export default InkCheckboxGroup;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { UseControllerProps, FieldPath, FieldValues } from 'react-hook-form';
|
|
2
|
+
import { InkCheckboxGroupProps } from './index';
|
|
3
|
+
type InkFormCheckboxGroupProps<TFieldValues extends FieldValues, TName extends FieldPath<TFieldValues>> = InkCheckboxGroupProps & UseControllerProps<TFieldValues, TName>;
|
|
4
|
+
export default function InkFormCheckboxGroup<TFieldValues extends FieldValues, TName extends FieldPath<TFieldValues>>({ control, name, rules, onChange, ...rest }: InkFormCheckboxGroupProps<TFieldValues, TName>): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { OverridableComponent } from '@mui/material/OverridableComponent';
|
|
2
|
+
import { SvgIconTypeMap } from '@mui/material';
|
|
3
|
+
type HeaderIconType = {
|
|
4
|
+
Icon: JSX.Element | OverridableComponent<SvgIconTypeMap<object, 'svg'>>;
|
|
5
|
+
};
|
|
6
|
+
export declare function HeaderIcon({ Icon }: HeaderIconType): import("react/jsx-runtime").JSX.Element | null;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
|
2
|
+
import { BoxProps, DrawerProps } from '@mui/material';
|
|
3
|
+
import { SvgIconTypeMap } from '@mui/material';
|
|
4
|
+
import { OverridableComponent } from '@mui/material/OverridableComponent';
|
|
5
|
+
type DrawerType = 'basic' | 'panel' | 'filter';
|
|
6
|
+
interface CommonDrawerProps extends DrawerProps {
|
|
7
|
+
drawerType: DrawerType;
|
|
8
|
+
drawerContent: JSX.Element;
|
|
9
|
+
drawerWidth?: number;
|
|
10
|
+
leftOffset?: string;
|
|
11
|
+
bottomContent?: JSX.Element;
|
|
12
|
+
headerLabel?: string;
|
|
13
|
+
isComponentLevelDrawer?: boolean;
|
|
14
|
+
mainProps?: BoxProps;
|
|
15
|
+
icon?: JSX.Element | OverridableComponent<SvgIconTypeMap<object, 'svg'>>;
|
|
16
|
+
}
|
|
17
|
+
interface CollapsibleDrawerProps extends CommonDrawerProps {
|
|
18
|
+
drawerType: 'basic' | 'filter';
|
|
19
|
+
isOpen: boolean;
|
|
20
|
+
handleDrawerClose: () => void;
|
|
21
|
+
}
|
|
22
|
+
interface PanelDrawerProps extends CommonDrawerProps {
|
|
23
|
+
drawerType: 'panel';
|
|
24
|
+
}
|
|
25
|
+
type InkDrawerProps = CollapsibleDrawerProps | PanelDrawerProps;
|
|
26
|
+
export declare const defaultFilterDrawerWidth = 280;
|
|
27
|
+
export declare function InkDrawer(props: PropsWithChildren<InkDrawerProps>): import("react/jsx-runtime").JSX.Element;
|
|
28
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { InkDrawer } from './InkDrawer';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { OverridableComponent } from '@mui/material/OverridableComponent';
|
|
2
|
+
import { SvgIconTypeMap } from '@mui/material';
|
|
3
|
+
type EmptyStateIconType = {
|
|
4
|
+
variant: 'page' | 'paper' | 'search' | 'data';
|
|
5
|
+
icon?: JSX.Element | OverridableComponent<SvgIconTypeMap<object, 'svg'>>;
|
|
6
|
+
};
|
|
7
|
+
export declare function EmptyStateIcon({ icon }: EmptyStateIconType): import("react/jsx-runtime").JSX.Element | null;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { SxProps, Theme, SvgIconTypeMap } from '@mui/material';
|
|
2
|
+
import { OverridableComponent } from '@mui/material/OverridableComponent';
|
|
3
|
+
import { VariantType } from './VariantStyles';
|
|
4
|
+
type ActionType = {
|
|
5
|
+
title: string;
|
|
6
|
+
onClick: () => void;
|
|
7
|
+
};
|
|
8
|
+
type InkEmptyStateProps = {
|
|
9
|
+
title?: string;
|
|
10
|
+
description?: string;
|
|
11
|
+
action?: ActionType;
|
|
12
|
+
variant: VariantType;
|
|
13
|
+
icon?: JSX.Element | OverridableComponent<SvgIconTypeMap<object, 'svg'>>;
|
|
14
|
+
sx?: SxProps<Theme>;
|
|
15
|
+
};
|
|
16
|
+
export declare function InkEmptyState({ title, description, action, variant, icon, sx, }: InkEmptyStateProps): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { TypographyVariant } from '@mui/material';
|
|
2
|
+
type StyleObjType = {
|
|
3
|
+
fontSize: number;
|
|
4
|
+
fontSizeDescription: number;
|
|
5
|
+
titleVariant: TypographyVariant;
|
|
6
|
+
descriptionVariant: TypographyVariant;
|
|
7
|
+
};
|
|
8
|
+
export type VariantType = 'page' | 'paper' | 'search' | 'data';
|
|
9
|
+
export declare const styleMap: Readonly<Record<VariantType, StyleObjType>>;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { InkEmptyState } from './InkEmptyState';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { InkEmptyTableMessage } from './InkEmptyTableMessage';
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { UseControllerProps, FieldPath, FieldValues } from 'react-hook-form';
|
|
2
|
+
import { InkSelectProps } from '../InkSelect';
|
|
3
|
+
type InkFormSelectProps<TFieldValues extends FieldValues, TName extends FieldPath<TFieldValues>> = InkSelectProps & UseControllerProps<TFieldValues, TName>;
|
|
4
|
+
export declare function InkFormSelect<TFieldValues extends FieldValues, TName extends FieldPath<TFieldValues>>({ control, name, rules, helperText, onChange, onBlur, ...rest }: InkFormSelectProps<TFieldValues, TName>): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { RegisterOptions } from 'react-hook-form';
|
|
2
|
+
import { SelectProps } from '@mui/material';
|
|
3
|
+
type MockFormSelectType = {
|
|
4
|
+
helperText?: string;
|
|
5
|
+
rules?: RegisterOptions;
|
|
6
|
+
onSubmit?: (data: unknown) => void;
|
|
7
|
+
} & SelectProps<string>;
|
|
8
|
+
export declare const MockFormSelect: ({ label, placeholder, helperText, rules, onSubmit, ...rest }: MockFormSelectType) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { InkFormSelect } from './InkFormSelect';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { BoxProps } from '@mui/material/Box';
|
|
2
|
+
export type InkImageProps = BoxProps & {
|
|
3
|
+
src: string;
|
|
4
|
+
alt?: string;
|
|
5
|
+
imageSx?: BoxProps['sx'];
|
|
6
|
+
fallbackText?: string;
|
|
7
|
+
};
|
|
8
|
+
export default function InkImage({ src, alt, sx, imageSx, fallbackText, ...rest }: InkImageProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React, { Ref } from 'react';
|
|
2
|
+
import { SxProps, Theme } from '@mui/material';
|
|
3
|
+
interface Option {
|
|
4
|
+
value: string;
|
|
5
|
+
icon?: JSX.Element;
|
|
6
|
+
title: string;
|
|
7
|
+
description?: string;
|
|
8
|
+
subDescription?: string;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
}
|
|
11
|
+
export type InkRadioTilesProps = {
|
|
12
|
+
name: string;
|
|
13
|
+
options: Option[];
|
|
14
|
+
onChange: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
15
|
+
onBlur?: () => void;
|
|
16
|
+
value: string | number;
|
|
17
|
+
ref?: Ref<HTMLDivElement>;
|
|
18
|
+
direction?: 'row' | 'column';
|
|
19
|
+
cardSx?: SxProps<Theme>;
|
|
20
|
+
fullWidth?: boolean;
|
|
21
|
+
disabled?: boolean;
|
|
22
|
+
};
|
|
23
|
+
export declare const InkRadioTiles: ({ name, options, value, ref, direction, cardSx, fullWidth, disabled, onChange, onBlur, }: InkRadioTilesProps) => import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './InkRadioTiles';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { SelectProps } from '@mui/material';
|
|
2
|
+
type MockSelectType = {
|
|
3
|
+
label?: string;
|
|
4
|
+
variant?: 'filled' | 'outlined';
|
|
5
|
+
placeholder?: string;
|
|
6
|
+
helperText?: string;
|
|
7
|
+
} & SelectProps<string>;
|
|
8
|
+
export declare const MockSelect: ({ label, placeholder, helperText, ...rest }: MockSelectType) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { SelectProps, MenuItemProps } from '@mui/material';
|
|
2
|
+
export type MuiSelectProps = SelectProps<string>;
|
|
3
|
+
export type MenuOption = MenuItemProps & {
|
|
4
|
+
label: string;
|
|
5
|
+
group?: string;
|
|
6
|
+
};
|
|
7
|
+
export type InkSelectProps = {
|
|
8
|
+
menuOptions?: MenuOption[];
|
|
9
|
+
helperText?: string;
|
|
10
|
+
} & MuiSelectProps;
|
|
11
|
+
export type MenuPositionType = {
|
|
12
|
+
maxHeight: number;
|
|
13
|
+
placement: 'top' | 'bottom';
|
|
14
|
+
};
|
|
15
|
+
export type UseMenuHelperParams = {
|
|
16
|
+
menuMaxHeight: number;
|
|
17
|
+
menuPlacement: MenuPositionType['placement'];
|
|
18
|
+
handleMenuOpen: (anchorRef: React.MutableRefObject<HTMLElement | null>) => void;
|
|
19
|
+
renderMenuItems: (children: React.ReactNode, menuOptions?: MenuOption[]) => JSX.Element[] | React.ReactNode;
|
|
20
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { InkSnackbarContentProps } from './index';
|
|
2
|
+
import { VariantType } from 'notistack';
|
|
3
|
+
export type InkSnackbarAlertProps = {
|
|
4
|
+
message: InkSnackbarContentProps['message'];
|
|
5
|
+
severity: VariantType;
|
|
6
|
+
alertProps?: InkSnackbarContentProps['alertProps'];
|
|
7
|
+
title?: InkSnackbarContentProps['title'];
|
|
8
|
+
action?: InkSnackbarContentProps['action'];
|
|
9
|
+
onClose?: InkSnackbarContentProps['onClose'];
|
|
10
|
+
};
|
|
11
|
+
declare const InkSnackbarAlert: ({ action, severity, alertProps, message, onClose, title, }: InkSnackbarAlertProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export default InkSnackbarAlert;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { AlertProps } from '@mui/material/Alert';
|
|
2
|
+
import { CustomContentProps } from 'notistack';
|
|
3
|
+
export interface InkSnackbarContentProps extends CustomContentProps {
|
|
4
|
+
alertProps?: AlertProps;
|
|
5
|
+
title?: string;
|
|
6
|
+
action?: AlertProps['action'];
|
|
7
|
+
onClose?: AlertProps['onClose'];
|
|
8
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ButtonProps } from '@mui/material/Button';
|
|
2
|
+
type InkSnackbarActionButtonProps = ButtonProps & {
|
|
3
|
+
label: string;
|
|
4
|
+
closeSnackbar: () => void;
|
|
5
|
+
};
|
|
6
|
+
export default function SnackbarActionButton({ closeSnackbar, label, ...buttonProps }: InkSnackbarActionButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { default as InkSnackbarProvider } from './InkSnackbarProvider';
|
|
2
|
+
export { default as InkSnackbarAlert } from './InkSnackbarAlert';
|
|
3
|
+
export { default as InkSnackbarContent } from './InkSnackbarContent';
|
|
4
|
+
export { default as SnackbarActionButton } from './SnackbarActionButton';
|
|
5
|
+
export type { InkSnackbarContentProps } from './InkSnackbarContentProps';
|
|
6
|
+
export type { InkSnackbarAlertProps } from './InkSnackbarAlert';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { TextFieldProps } from '@mui/material/TextField';
|
|
2
|
+
import { UseControllerProps, FieldPath, FieldValues } from 'react-hook-form';
|
|
3
|
+
type InkFormTextFieldProps<TFieldValues extends FieldValues, TName extends FieldPath<TFieldValues>> = {
|
|
4
|
+
label: string;
|
|
5
|
+
} & UseControllerProps<TFieldValues, TName> & TextFieldProps;
|
|
6
|
+
declare const InkFormTextField: <TFieldValues extends FieldValues, TName extends FieldPath<TFieldValues>>({ control, name, label, rules, helperText, onBlur, ...rest }: InkFormTextFieldProps<TFieldValues, TName>) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export default InkFormTextField;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ToggleButtonProps } from '@mui/material';
|
|
2
|
+
type InkToggleIconProps = ToggleButtonProps & {
|
|
3
|
+
ariaLabel?: string;
|
|
4
|
+
size?: 'x-small' | 'small' | 'medium' | 'large';
|
|
5
|
+
icon: JSX.Element;
|
|
6
|
+
value: string | number;
|
|
7
|
+
};
|
|
8
|
+
export declare function InkToggleIcon({ value, size, ariaLabel, icon, ...rest }: InkToggleIconProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { InkToggleIcon } from './InkToggleIcon';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ToggleButtonGroupProps } from '@mui/material';
|
|
2
|
+
export type InkToggleIconGroupProps = ToggleButtonGroupProps & {
|
|
3
|
+
id: string;
|
|
4
|
+
toggleButtons: {
|
|
5
|
+
value: string | number;
|
|
6
|
+
icon: JSX.Element;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
}[];
|
|
9
|
+
ariaLabel?: string;
|
|
10
|
+
size?: 'x-small' | 'small' | 'medium' | 'large';
|
|
11
|
+
single?: boolean;
|
|
12
|
+
enforceValueSet?: boolean;
|
|
13
|
+
};
|
|
14
|
+
export declare function InkToggleIconGroup({ id, toggleButtons, ariaLabel, size, single, value, enforceValueSet, onChange, sx, ...rest }: InkToggleIconGroupProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './InkToggleIconGroup';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ToggleButtonProps } from '@mui/material';
|
|
2
|
+
type InkToggleTextProps = ToggleButtonProps & {
|
|
3
|
+
ariaLabel?: string;
|
|
4
|
+
size?: 'x-small' | 'small' | 'medium' | 'large';
|
|
5
|
+
label?: string;
|
|
6
|
+
value: string | number;
|
|
7
|
+
};
|
|
8
|
+
export declare function InkToggleText({ value, label, size, ariaLabel, ...rest }: InkToggleTextProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { InkToggleText } from './InkToggleText';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ToggleButtonGroupProps } from '@mui/material';
|
|
2
|
+
type InkToggleTextGroupProps = ToggleButtonGroupProps & {
|
|
3
|
+
id: string;
|
|
4
|
+
toggleButtons: {
|
|
5
|
+
value: string | number;
|
|
6
|
+
label?: string;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
}[];
|
|
9
|
+
ariaLabel?: string;
|
|
10
|
+
size?: 'x-small' | 'small' | 'medium' | 'large';
|
|
11
|
+
single?: boolean;
|
|
12
|
+
enforceValueSet?: boolean;
|
|
13
|
+
};
|
|
14
|
+
export declare function InkToggleTextGroup({ id, toggleButtons, ariaLabel, value, size, single, enforceValueSet, sx, onChange, ...rest }: InkToggleTextGroupProps): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { InkToggleTextGroup } from './InkToggleTextGroup';
|