@zesty-io/material 0.7.0 → 0.10.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/es/FieldTypeOneToMany/index.d.ts +1 -1
- package/es/FieldTypeOneToOne/index.d.ts +1 -1
- package/es/IconButton/IconButton.stories.d.ts +5 -0
- package/es/IconButton/IconButton.stories.js +11 -0
- package/es/IconButton/index.d.ts +32 -0
- package/es/IconButton/index.js +15 -0
- package/es/TextField.stories.d.ts +1 -2
- package/es/icons/Home.d.ts +3 -0
- package/es/icons/Home.js +3 -0
- package/es/icons/ScreenShare.d.ts +3 -0
- package/es/icons/ScreenShare.js +3 -0
- package/es/icons/index.d.ts +2 -0
- package/es/icons/index.js +2 -0
- package/es/index.d.ts +16 -15
- package/es/index.js +16 -15
- package/es/theme/Theme.stories.d.ts +3 -2
- package/es/theme/Theme.stories.js +10 -6
- package/es/theme/index.d.ts +12 -5
- package/es/theme/index.js +496 -358
- package/es/theme/palette.d.ts +42 -5
- package/es/theme/palette.js +85 -68
- package/es/theme/typography.js +5 -0
- package/package.json +3 -3
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { AutocompleteProps } from '@mui/material';
|
|
3
|
-
export interface FieldTypeOneToManyProps extends Omit<AutocompleteProps<any,
|
|
3
|
+
export interface FieldTypeOneToManyProps extends Omit<AutocompleteProps<any, boolean, boolean, boolean>, 'onOpen' | 'renderInput'> {
|
|
4
4
|
label?: string;
|
|
5
5
|
helperText?: string;
|
|
6
6
|
placeholder?: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { AutocompleteProps } from '@mui/material';
|
|
3
|
-
export interface FieldTypeOneToOneProps extends Omit<AutocompleteProps<any,
|
|
3
|
+
export interface FieldTypeOneToOneProps extends Omit<AutocompleteProps<any, boolean, boolean, boolean>, 'onOpen' | 'renderInput'> {
|
|
4
4
|
label?: string;
|
|
5
5
|
helperText?: string;
|
|
6
6
|
placeholder?: string;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { IconButton } from "./";
|
|
3
|
+
export default {
|
|
4
|
+
title: "IconButton",
|
|
5
|
+
component: IconButton,
|
|
6
|
+
argType: {},
|
|
7
|
+
};
|
|
8
|
+
const Template = (args) => {
|
|
9
|
+
return _jsx(IconButton, {});
|
|
10
|
+
};
|
|
11
|
+
export const Default = Template.bind({});
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare type Props = {
|
|
3
|
+
variant?: "standard" | "contained";
|
|
4
|
+
};
|
|
5
|
+
export declare const IconButton: import("@emotion/styled").StyledComponent<{
|
|
6
|
+
children?: import("react").ReactNode;
|
|
7
|
+
classes?: Partial<import("@mui/material").IconButtonClasses> | undefined;
|
|
8
|
+
color?: "error" | "inherit" | "primary" | "secondary" | "info" | "success" | "warning" | "default" | undefined;
|
|
9
|
+
disabled?: boolean | undefined;
|
|
10
|
+
disableFocusRipple?: boolean | undefined;
|
|
11
|
+
edge?: false | "end" | "start" | undefined;
|
|
12
|
+
size?: "small" | "medium" | "large" | "xsmall" | "xxsmall" | undefined;
|
|
13
|
+
sx?: import("@mui/material").SxProps<import("@mui/material").Theme> | undefined;
|
|
14
|
+
} & Omit<{
|
|
15
|
+
action?: import("react").Ref<import("@mui/material").ButtonBaseActions> | undefined;
|
|
16
|
+
centerRipple?: boolean | undefined;
|
|
17
|
+
children?: import("react").ReactNode;
|
|
18
|
+
classes?: Partial<import("@mui/material").ButtonBaseClasses> | undefined;
|
|
19
|
+
disabled?: boolean | undefined;
|
|
20
|
+
disableRipple?: boolean | undefined;
|
|
21
|
+
disableTouchRipple?: boolean | undefined;
|
|
22
|
+
focusRipple?: boolean | undefined;
|
|
23
|
+
focusVisibleClassName?: string | undefined;
|
|
24
|
+
LinkComponent?: import("react").ElementType<any> | undefined;
|
|
25
|
+
onFocusVisible?: import("react").FocusEventHandler<any> | undefined;
|
|
26
|
+
sx?: import("@mui/material").SxProps<import("@mui/material").Theme> | undefined;
|
|
27
|
+
tabIndex?: number | undefined;
|
|
28
|
+
TouchRippleProps?: Partial<import("@mui/material/ButtonBase/TouchRipple").TouchRippleProps> | undefined;
|
|
29
|
+
touchRippleRef?: import("react").Ref<import("@mui/material/ButtonBase/TouchRipple").TouchRippleActions> | undefined;
|
|
30
|
+
}, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "key" | keyof import("react").ButtonHTMLAttributes<HTMLButtonElement>> & {
|
|
31
|
+
ref?: ((instance: HTMLButtonElement | null) => void) | import("react").RefObject<HTMLButtonElement> | null | undefined;
|
|
32
|
+
}, keyof import("@mui/material/OverridableComponent").CommonProps | "children" | "color" | "disabled" | "size" | "sx" | "tabIndex" | "action" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "disableFocusRipple" | "edge"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & Props, {}, {}>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { IconButton as IconButtonBase } from "@mui/material";
|
|
2
|
+
import { styled } from "@mui/material/styles";
|
|
3
|
+
export const IconButton = styled(IconButtonBase)(({ theme, variant = "standard", color = "inherit" }) => {
|
|
4
|
+
if (variant === "standard") {
|
|
5
|
+
return {};
|
|
6
|
+
}
|
|
7
|
+
const colorVariant = color === "default" || color === "inherit" ? "primary" : color;
|
|
8
|
+
return {
|
|
9
|
+
backgroundColor: theme.palette[colorVariant].main,
|
|
10
|
+
color: theme.palette.common.white,
|
|
11
|
+
"&:hover": {
|
|
12
|
+
backgroundColor: theme.palette[colorVariant].dark,
|
|
13
|
+
},
|
|
14
|
+
};
|
|
15
|
+
});
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Story, Meta } from '@storybook/react/types-6-0';
|
|
2
|
-
import { TextFieldProps } from '@mui/material';
|
|
3
2
|
declare const _default: Meta<import("@storybook/react/types-6-0").Args>;
|
|
4
3
|
export default _default;
|
|
5
|
-
export declare const Default: Story<
|
|
4
|
+
export declare const Default: Story<import("@mui/material").FilledTextFieldProps | import("@mui/material").OutlinedTextFieldProps | import("@mui/material").StandardTextFieldProps>;
|
package/es/icons/Home.js
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { SvgIcon } from "@mui/material";
|
|
3
|
+
export const Home = (props) => (_jsx(SvgIcon, { ...props, children: _jsx("path", { d: "M5.5 20.625C5.08333 20.625 4.72917 20.4792 4.4375 20.1875C4.14583 19.8958 4 19.5417 4 19.125V9.375C4 9.14167 4.05417 8.91667 4.1625 8.7C4.27083 8.48333 4.41667 8.30833 4.6 8.175L11.1 3.3C11.2333 3.2 11.375 3.125 11.525 3.075C11.675 3.025 11.8333 3 12 3C12.1667 3 12.325 3.025 12.475 3.075C12.625 3.125 12.7667 3.2 12.9 3.3L19.4 8.175C19.5833 8.30833 19.7292 8.48333 19.8375 8.7C19.9458 8.91667 20 9.14167 20 9.375V19.125C20 19.5417 19.8542 19.8958 19.5625 20.1875C19.2708 20.4792 18.9167 20.625 18.5 20.625H14V13.625H10V20.625H5.5Z", fill: "currentColor" }) }));
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { SvgIcon } from "@mui/material";
|
|
3
|
+
export const ScreenShare = (props) => (_jsx(SvgIcon, { ...props, children: _jsx("path", { d: "M11.225 10.711h1.99v1.282c0 0.1 0.042 0.167 0.127 0.202 0.084 0.036 0.168 0.014 0.252 -0.065l1.891 -1.891a0.45 0.45 0 0 0 0.132 -0.318 0.412 0.412 0 0 0 -0.13 -0.306l-1.894 -1.894c-0.084 -0.079 -0.168 -0.101 -0.252 -0.065 -0.084 0.035 -0.127 0.102 -0.127 0.202v1.282H11.225a2.832 2.832 0 0 0 -2.081 0.856 2.837 2.837 0 0 0 -0.854 2.083v1.498a0.764 0.764 0 0 0 0.791 0.786 0.755 0.755 0 0 0 0.78 -0.786v-1.5c0 -0.384 0.132 -0.708 0.395 -0.971 0.263 -0.263 0.586 -0.394 0.97 -0.394Zm-9.578 10.51a0.772 0.772 0 0 1 -0.785 -0.791 0.762 0.762 0 0 1 0.785 -0.781h20.707a0.768 0.768 0 0 1 0.785 0.788 0.761 0.761 0 0 1 -0.785 0.785H1.646Zm1.908 -3.072c-0.461 0 -0.859 -0.168 -1.198 -0.505a1.637 1.637 0 0 1 -0.506 -1.198v-11.892c0 -0.462 0.168 -0.862 0.506 -1.2 0.338 -0.34 0.737 -0.509 1.198 -0.509h16.891c0.462 0 0.863 0.168 1.201 0.508 0.34 0.34 0.509 0.739 0.509 1.201v11.892c0 0.461 -0.169 0.859 -0.509 1.198a1.644 1.644 0 0 1 -1.2 0.506H3.552Zm0 -1.703h16.891v-11.892H3.554v11.892Z", fill: "currentColor" }) }));
|
package/es/icons/index.d.ts
CHANGED
package/es/icons/index.js
CHANGED
package/es/index.d.ts
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
export { default as legacyTheme } from
|
|
2
|
-
export {
|
|
3
|
-
export { default as FieldTypeText } from
|
|
4
|
-
export { default as FieldTypeSort } from
|
|
5
|
-
export { default as FieldTypeUrl } from
|
|
6
|
-
export { default as FieldTypeDate } from
|
|
7
|
-
export { default as FieldTypeDateTime } from
|
|
8
|
-
export { default as FieldTypeColor } from
|
|
9
|
-
export { default as FieldTypeNumber } from
|
|
10
|
-
export { default as FieldTypeOneToOne } from
|
|
11
|
-
export { default as FieldTypeOneToMany } from
|
|
12
|
-
export { default as CopyButton } from
|
|
13
|
-
export { default as ConfirmDialog } from
|
|
14
|
-
export { default as VirtualizedAutocomplete } from
|
|
15
|
-
export
|
|
1
|
+
export { default as legacyTheme } from "./LegacyTheme";
|
|
2
|
+
export { theme, darkTheme } from "./theme";
|
|
3
|
+
export { default as FieldTypeText } from "./FieldTypeText";
|
|
4
|
+
export { default as FieldTypeSort } from "./FieldTypeSort";
|
|
5
|
+
export { default as FieldTypeUrl } from "./FieldTypeUrl";
|
|
6
|
+
export { default as FieldTypeDate } from "./FieldTypeDate";
|
|
7
|
+
export { default as FieldTypeDateTime } from "./FieldTypeDateTime";
|
|
8
|
+
export { default as FieldTypeColor } from "./FieldTypeColor";
|
|
9
|
+
export { default as FieldTypeNumber } from "./FieldTypeNumber";
|
|
10
|
+
export { default as FieldTypeOneToOne } from "./FieldTypeOneToOne";
|
|
11
|
+
export { default as FieldTypeOneToMany } from "./FieldTypeOneToMany";
|
|
12
|
+
export { default as CopyButton } from "./CopyButton";
|
|
13
|
+
export { default as ConfirmDialog } from "./ConfirmDialog";
|
|
14
|
+
export { default as VirtualizedAutocomplete } from "./VitualizedAutocomplete";
|
|
15
|
+
export { IconButton } from "./IconButton";
|
|
16
|
+
export * from "./icons";
|
package/es/index.js
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
export { default as legacyTheme } from
|
|
2
|
-
export {
|
|
3
|
-
export { default as FieldTypeText } from
|
|
4
|
-
export { default as FieldTypeSort } from
|
|
5
|
-
export { default as FieldTypeUrl } from
|
|
6
|
-
export { default as FieldTypeDate } from
|
|
7
|
-
export { default as FieldTypeDateTime } from
|
|
8
|
-
export { default as FieldTypeColor } from
|
|
9
|
-
export { default as FieldTypeNumber } from
|
|
10
|
-
export { default as FieldTypeOneToOne } from
|
|
11
|
-
export { default as FieldTypeOneToMany } from
|
|
12
|
-
export { default as CopyButton } from
|
|
13
|
-
export { default as ConfirmDialog } from
|
|
14
|
-
export { default as VirtualizedAutocomplete } from
|
|
15
|
-
export
|
|
1
|
+
export { default as legacyTheme } from "./LegacyTheme";
|
|
2
|
+
export { theme, darkTheme } from "./theme";
|
|
3
|
+
export { default as FieldTypeText } from "./FieldTypeText";
|
|
4
|
+
export { default as FieldTypeSort } from "./FieldTypeSort";
|
|
5
|
+
export { default as FieldTypeUrl } from "./FieldTypeUrl";
|
|
6
|
+
export { default as FieldTypeDate } from "./FieldTypeDate";
|
|
7
|
+
export { default as FieldTypeDateTime } from "./FieldTypeDateTime";
|
|
8
|
+
export { default as FieldTypeColor } from "./FieldTypeColor";
|
|
9
|
+
export { default as FieldTypeNumber } from "./FieldTypeNumber";
|
|
10
|
+
export { default as FieldTypeOneToOne } from "./FieldTypeOneToOne";
|
|
11
|
+
export { default as FieldTypeOneToMany } from "./FieldTypeOneToMany";
|
|
12
|
+
export { default as CopyButton } from "./CopyButton";
|
|
13
|
+
export { default as ConfirmDialog } from "./ConfirmDialog";
|
|
14
|
+
export { default as VirtualizedAutocomplete } from "./VitualizedAutocomplete";
|
|
15
|
+
export { IconButton } from "./IconButton";
|
|
16
|
+
export * from "./icons";
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { Story, Meta } from
|
|
1
|
+
import { Story, Meta } from "@storybook/react/types-6-0";
|
|
2
2
|
declare const _default: Meta<import("@storybook/react/types-6-0").Args>;
|
|
3
3
|
export default _default;
|
|
4
|
-
export declare const
|
|
4
|
+
export declare const light: Story<import("@storybook/react/types-6-0").Args>;
|
|
5
|
+
export declare const dark: Story<import("@storybook/react/types-6-0").Args>;
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import ReactJson from
|
|
3
|
-
import theme from
|
|
2
|
+
import ReactJson from "react-json-view";
|
|
3
|
+
import { darkTheme, theme } from ".";
|
|
4
4
|
export default {
|
|
5
|
-
title:
|
|
5
|
+
title: "Theme",
|
|
6
6
|
};
|
|
7
|
-
const
|
|
8
|
-
return
|
|
7
|
+
const LightTheme = (args) => {
|
|
8
|
+
return _jsx(ReactJson, { src: theme });
|
|
9
9
|
};
|
|
10
|
-
|
|
10
|
+
const DarkTheme = (args) => {
|
|
11
|
+
return _jsx(ReactJson, { src: darkTheme });
|
|
12
|
+
};
|
|
13
|
+
export const light = LightTheme.bind({});
|
|
14
|
+
export const dark = DarkTheme.bind({});
|
package/es/theme/index.d.ts
CHANGED
|
@@ -1,11 +1,18 @@
|
|
|
1
|
-
import { Theme } from "@mui/material/styles";
|
|
2
1
|
declare module "@mui/material/styles" {
|
|
3
2
|
interface Palette {
|
|
4
3
|
border: string;
|
|
5
4
|
}
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
}
|
|
6
|
+
declare module "@mui/material/IconButton" {
|
|
7
|
+
interface IconButtonPropsSizeOverrides {
|
|
8
|
+
xsmall: true;
|
|
9
|
+
xxsmall: true;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
declare module "@mui/material/Button" {
|
|
13
|
+
interface ButtonPropsSizeOverrides {
|
|
14
|
+
xsmall: true;
|
|
8
15
|
}
|
|
9
16
|
}
|
|
10
|
-
declare let theme: Theme;
|
|
11
|
-
export
|
|
17
|
+
export declare let theme: import("@mui/material/styles").Theme;
|
|
18
|
+
export declare let darkTheme: import("@mui/material/styles").Theme;
|