UNPKG

@etsoo/materialui

Version:

TypeScript Material-UI Implementation

103 lines (102 loc) 2.95 kB
import { ListItemButtonProps } from "@mui/material/ListItemButton"; import { Theme } from "@mui/material/styles"; /** * Mouse event handler with data */ export type MouseEventWithDataHandler<T> = (event: React.MouseEvent<HTMLDivElement>, data: T) => void; /** * MUGlobal for global configurations */ export declare class MUGlobal { /** * Search field shrink */ static searchFieldShrink: boolean; /** * Search field size */ static searchFieldSize: "small" | "medium"; /** * Search field variant */ static searchFieldVariant: "standard" | "filled" | "outlined"; /** * Input field shrink */ static inputFieldShrink: boolean; /** * Input field size */ static inputFieldSize: "small" | "medium"; /** * Input field variant */ static inputFieldVariant: "standard" | "filled" | "outlined"; /** * TextField variant */ static textFieldVariant: "standard" | "filled" | "outlined"; /** * Page default paddings */ static pagePaddings: { xs: number; sm: number; }; /** * Get menu item props * @param path Current path * @param href Item's href * @returns Props */ static getMenuItem(path: string, href: string): ListItemButtonProps; /** * Update object number properties with half of it * @param input Input object * @returns Updated object */ static half(input: object): {}; /** * Reverse object number properties, like 5 to -5 * @param input Input object * @returns Updated object */ static reverse(input: object): {}; /** * Update object number properties with adjustment * @param input Input object * @param adjust Adjust value or new size object * @param field Specific field * @returns Updated object */ static increase(input: object, adjust: number | object, field?: string): {}; /** * Adjust size with theme update * @param size Base size * @param adjust Adjustment * @param updateFunc Theme update function * @returns Updated object */ static adjustWithTheme(size: number, adjust: object, updateFunc: (value: number) => string): {}; /** * Break points defined */ static breakpoints: readonly ["xs", "sm", "md", "lg", "xl"]; /** * Get multple medias theme space * Responsive values and Breakpoints as an object * xs = theme.breakpoints.up('xs') * https://mui.com/system/basics/ * @param spaces Spaces * @param theme Theme * @returns Result */ static getSpace(spaces: object, theme: Theme): number; /** * Update object number properties with theme * @param input Input object * @param updateFunc Theme update function * @returns Updated object */ static updateWithTheme(input: {}, updateFunc: (value: number) => string): {}; }