@astral/ui 0.1.1 → 0.1.2-beta.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.
- package/cjs/src/Badge/Badge.d.ts +1 -0
- package/cjs/src/Badge/styled.d.ts +2 -2
- package/cjs/src/Button/Button.d.ts +1 -0
- package/cjs/src/ButtonBase/ButtonBase.d.ts +1 -0
- package/cjs/src/Checkbox/Checkbox.d.ts +3 -0
- package/cjs/src/Checkbox/Checkbox.js +33 -0
- package/cjs/src/Checkbox/icons.d.ts +5 -0
- package/cjs/src/Checkbox/icons.js +42 -0
- package/cjs/src/Checkbox/index.d.ts +2 -0
- package/cjs/src/Checkbox/index.js +14 -0
- package/cjs/src/Checkbox/styled.d.ts +4 -0
- package/cjs/src/Checkbox/styled.js +35 -0
- package/cjs/src/Checkbox/types.d.ts +2 -0
- package/cjs/src/Checkbox/types.js +2 -0
- package/cjs/src/CircularProgress/CircularProgress.d.ts +1 -0
- package/cjs/src/CircularProgress/CircularProgress.js +2 -1
- package/cjs/src/CircularProgress/constants.d.ts +1 -2
- package/cjs/src/CircularProgress/constants.js +0 -1
- package/cjs/src/CircularProgress/styled.d.ts +0 -1
- package/cjs/src/CircularProgress/styled.js +2 -8
- package/cjs/src/FormControlLabel/FormControlLabel.d.ts +3 -0
- package/cjs/src/FormControlLabel/FormControlLabel.js +32 -0
- package/cjs/src/FormControlLabel/index.d.ts +2 -0
- package/cjs/src/FormControlLabel/index.js +14 -0
- package/cjs/src/FormControlLabel/styled.d.ts +3 -0
- package/cjs/src/FormControlLabel/styled.js +14 -0
- package/cjs/src/FormControlLabel/types.d.ts +2 -0
- package/cjs/src/FormControlLabel/types.js +2 -0
- package/cjs/src/FormHelperText/FormHelperText.d.ts +4 -0
- package/cjs/src/FormHelperText/FormHelperText.js +24 -0
- package/cjs/src/FormHelperText/index.d.ts +1 -0
- package/cjs/src/FormHelperText/index.js +13 -0
- package/cjs/src/FormHelperText/styled.d.ts +41 -0
- package/cjs/src/FormHelperText/styled.js +14 -0
- package/cjs/src/FormHelperText/types.d.ts +6 -0
- package/cjs/src/FormHelperText/types.js +2 -0
- package/cjs/src/Grid/Grid.d.ts +3 -0
- package/cjs/src/Grid/Grid.js +32 -0
- package/cjs/src/Grid/index.d.ts +2 -0
- package/cjs/src/Grid/index.js +14 -0
- package/cjs/src/Grid/styled.d.ts +13 -0
- package/cjs/src/Grid/styled.js +14 -0
- package/cjs/src/Grid/types.d.ts +30 -0
- package/cjs/src/Grid/types.js +2 -0
- package/cjs/src/IconButton/IconButton.d.ts +1 -0
- package/cjs/src/Menu/Menu.d.ts +3 -0
- package/cjs/src/Menu/Menu.js +32 -0
- package/cjs/src/Menu/index.d.ts +1 -0
- package/cjs/src/Menu/index.js +13 -0
- package/cjs/src/MenuItem/MenuItem.d.ts +3 -0
- package/cjs/src/MenuItem/MenuItem.js +32 -0
- package/cjs/src/MenuItem/index.d.ts +1 -0
- package/cjs/src/MenuItem/index.js +13 -0
- package/cjs/src/MenuList/MenuList.d.ts +3 -0
- package/cjs/src/MenuList/MenuList.js +32 -0
- package/cjs/src/MenuList/index.d.ts +2 -0
- package/cjs/src/MenuList/index.js +14 -0
- package/cjs/src/MenuList/styled.d.ts +20 -0
- package/cjs/src/MenuList/styled.js +20 -0
- package/cjs/src/MenuList/types.d.ts +2 -0
- package/cjs/src/MenuList/types.js +2 -0
- package/cjs/src/Tag/Tag.d.ts +3 -0
- package/cjs/src/Tag/Tag.js +32 -0
- package/cjs/src/Tag/constants.d.ts +21 -0
- package/cjs/src/Tag/constants.js +28 -0
- package/cjs/src/Tag/index.d.ts +2 -0
- package/cjs/src/Tag/index.js +14 -0
- package/cjs/src/Tag/styled.d.ts +26 -0
- package/cjs/src/Tag/styled.js +120 -0
- package/cjs/src/Tag/types.d.ts +12 -0
- package/cjs/src/Tag/types.js +2 -0
- package/cjs/src/TextField/TextField.d.ts +4 -0
- package/cjs/src/TextField/TextField.js +53 -0
- package/cjs/src/TextField/index.d.ts +2 -0
- package/cjs/src/TextField/index.js +14 -0
- package/cjs/src/TextField/types.d.ts +6 -0
- package/cjs/src/TextField/types.js +2 -0
- package/cjs/src/Typography/Typography.d.ts +1 -0
- package/cjs/src/index.d.ts +5 -0
- package/cjs/src/index.js +5 -0
- package/cjs/src/theme/__tests__/BaseTheme.test.js +1 -1
- package/cjs/src/theme/baseTheme.d.ts +4 -3
- package/cjs/src/theme/baseTheme.js +2 -2
- package/cjs/src/theme/components/MuiFormHelperText.d.ts +4 -0
- package/cjs/src/theme/components/MuiFormHelperText.js +18 -0
- package/cjs/src/theme/components/MuiFormLabel.d.ts +4 -0
- package/cjs/src/theme/components/MuiFormLabel.js +14 -0
- package/cjs/src/theme/components/MuiInputBase.d.ts +4 -0
- package/cjs/src/theme/components/MuiInputBase.js +16 -0
- package/cjs/src/theme/components/MuiInputLabel.d.ts +4 -0
- package/cjs/src/theme/components/MuiInputLabel.js +32 -0
- package/cjs/src/theme/components/MuiOutlinedInput.d.ts +4 -0
- package/cjs/src/theme/components/MuiOutlinedInput.js +64 -0
- package/cjs/src/theme/components/MuiTypography.d.ts +21 -0
- package/cjs/src/theme/components/MuiTypography.js +21 -0
- package/cjs/src/theme/{components.d.ts → components/components.d.ts} +2 -1
- package/cjs/src/theme/components/components.js +65 -0
- package/cjs/src/theme/components/index.d.ts +1 -0
- package/cjs/src/theme/components/index.js +13 -0
- package/cjs/src/theme/elevation.js +5 -5
- package/cjs/src/theme/palette/palette.d.ts +1 -1
- package/cjs/src/theme/typography.js +1 -1
- package/esm/src/Badge/Badge.d.ts +1 -0
- package/esm/src/Badge/styled.d.ts +2 -2
- package/esm/src/Button/Button.d.ts +1 -0
- package/esm/src/ButtonBase/ButtonBase.d.ts +1 -0
- package/esm/src/Checkbox/Checkbox.d.ts +3 -0
- package/esm/src/Checkbox/Checkbox.js +29 -0
- package/esm/src/Checkbox/icons.d.ts +5 -0
- package/esm/src/Checkbox/icons.js +36 -0
- package/esm/src/Checkbox/index.d.ts +2 -0
- package/esm/src/Checkbox/index.js +2 -0
- package/esm/src/Checkbox/styled.d.ts +4 -0
- package/esm/src/Checkbox/styled.js +32 -0
- package/esm/src/Checkbox/types.d.ts +2 -0
- package/esm/src/Checkbox/types.js +1 -0
- package/esm/src/CircularProgress/CircularProgress.d.ts +1 -0
- package/esm/src/CircularProgress/CircularProgress.js +2 -1
- package/esm/src/CircularProgress/constants.d.ts +1 -2
- package/esm/src/CircularProgress/constants.js +0 -1
- package/esm/src/CircularProgress/styled.d.ts +0 -1
- package/esm/src/CircularProgress/styled.js +3 -9
- package/esm/src/FormControlLabel/FormControlLabel.d.ts +3 -0
- package/esm/src/FormControlLabel/FormControlLabel.js +28 -0
- package/esm/src/FormControlLabel/index.d.ts +2 -0
- package/esm/src/FormControlLabel/index.js +2 -0
- package/esm/src/FormControlLabel/styled.d.ts +3 -0
- package/esm/src/FormControlLabel/styled.js +11 -0
- package/esm/src/FormControlLabel/types.d.ts +2 -0
- package/esm/src/FormControlLabel/types.js +1 -0
- package/esm/src/FormHelperText/FormHelperText.d.ts +4 -0
- package/esm/src/FormHelperText/FormHelperText.js +20 -0
- package/esm/src/FormHelperText/index.d.ts +1 -0
- package/esm/src/FormHelperText/index.js +1 -0
- package/esm/src/FormHelperText/styled.d.ts +41 -0
- package/esm/src/FormHelperText/styled.js +11 -0
- package/esm/src/FormHelperText/types.d.ts +6 -0
- package/esm/src/FormHelperText/types.js +1 -0
- package/esm/src/Grid/Grid.d.ts +3 -0
- package/esm/src/Grid/Grid.js +28 -0
- package/esm/src/Grid/index.d.ts +2 -0
- package/esm/src/Grid/index.js +2 -0
- package/esm/src/Grid/styled.d.ts +13 -0
- package/esm/src/Grid/styled.js +11 -0
- package/esm/src/Grid/types.d.ts +30 -0
- package/esm/src/Grid/types.js +1 -0
- package/esm/src/IconButton/IconButton.d.ts +1 -0
- package/esm/src/Menu/Menu.d.ts +3 -0
- package/esm/src/Menu/Menu.js +28 -0
- package/esm/src/Menu/index.d.ts +1 -0
- package/esm/src/Menu/index.js +1 -0
- package/esm/src/MenuItem/MenuItem.d.ts +3 -0
- package/esm/src/MenuItem/MenuItem.js +28 -0
- package/esm/src/MenuItem/index.d.ts +1 -0
- package/esm/src/MenuItem/index.js +1 -0
- package/esm/src/MenuList/MenuList.d.ts +3 -0
- package/esm/src/MenuList/MenuList.js +28 -0
- package/esm/src/MenuList/index.d.ts +2 -0
- package/esm/src/MenuList/index.js +2 -0
- package/esm/src/MenuList/styled.d.ts +20 -0
- package/esm/src/MenuList/styled.js +17 -0
- package/esm/src/MenuList/types.d.ts +2 -0
- package/esm/src/MenuList/types.js +1 -0
- package/esm/src/Tag/Tag.d.ts +3 -0
- package/esm/src/Tag/Tag.js +28 -0
- package/esm/src/Tag/constants.d.ts +21 -0
- package/esm/src/Tag/constants.js +25 -0
- package/esm/src/Tag/index.d.ts +2 -0
- package/esm/src/Tag/index.js +2 -0
- package/esm/src/Tag/styled.d.ts +26 -0
- package/esm/src/Tag/styled.js +117 -0
- package/esm/src/Tag/types.d.ts +12 -0
- package/esm/src/Tag/types.js +1 -0
- package/esm/src/TextField/TextField.d.ts +4 -0
- package/esm/src/TextField/TextField.js +46 -0
- package/esm/src/TextField/index.d.ts +2 -0
- package/esm/src/TextField/index.js +2 -0
- package/esm/src/TextField/types.d.ts +6 -0
- package/esm/src/TextField/types.js +1 -0
- package/esm/src/Typography/Typography.d.ts +1 -0
- package/esm/src/index.d.ts +5 -0
- package/esm/src/index.js +5 -0
- package/esm/src/theme/__tests__/BaseTheme.test.js +1 -1
- package/esm/src/theme/baseTheme.d.ts +4 -3
- package/esm/src/theme/baseTheme.js +2 -2
- package/esm/src/theme/components/MuiFormHelperText.d.ts +4 -0
- package/esm/src/theme/components/MuiFormHelperText.js +15 -0
- package/esm/src/theme/components/MuiFormLabel.d.ts +4 -0
- package/esm/src/theme/components/MuiFormLabel.js +11 -0
- package/esm/src/theme/components/MuiInputBase.d.ts +4 -0
- package/esm/src/theme/components/MuiInputBase.js +13 -0
- package/esm/src/theme/components/MuiInputLabel.d.ts +4 -0
- package/esm/src/theme/components/MuiInputLabel.js +29 -0
- package/esm/src/theme/components/MuiOutlinedInput.d.ts +4 -0
- package/esm/src/theme/components/MuiOutlinedInput.js +61 -0
- package/esm/src/theme/components/MuiTypography.d.ts +21 -0
- package/esm/src/theme/components/MuiTypography.js +18 -0
- package/esm/src/theme/{components.d.ts → components/components.d.ts} +2 -1
- package/esm/src/theme/components/components.js +61 -0
- package/esm/src/theme/components/index.d.ts +1 -0
- package/esm/src/theme/components/index.js +1 -0
- package/esm/src/theme/elevation.js +5 -5
- package/esm/src/theme/palette/palette.d.ts +1 -1
- package/esm/src/theme/typography.js +1 -1
- package/package.json +11 -3
- package/types/index.d.ts +1 -0
- package/types/src/Badge/Badge.d.ts +4 -0
- package/types/src/Badge/index.d.ts +2 -0
- package/types/src/Badge/styled.d.ts +50 -0
- package/types/src/Badge/types.d.ts +5 -0
- package/types/src/Button/Button.d.ts +3 -0
- package/types/src/Button/index.d.ts +2 -0
- package/types/src/Button/styled.d.ts +13 -0
- package/types/src/Button/types.d.ts +7 -0
- package/types/src/ButtonBase/ButtonBase.d.ts +3 -0
- package/types/src/ButtonBase/constants.d.ts +22 -0
- package/types/src/ButtonBase/index.d.ts +3 -0
- package/types/src/ButtonBase/styled.d.ts +32 -0
- package/types/src/ButtonBase/types.d.ts +11 -0
- package/types/src/Checkbox/Checkbox.d.ts +3 -0
- package/types/src/Checkbox/icons.d.ts +5 -0
- package/types/src/Checkbox/index.d.ts +2 -0
- package/types/src/Checkbox/styled.d.ts +4 -0
- package/types/src/Checkbox/types.d.ts +2 -0
- package/types/src/CircularProgress/CircularProgress.d.ts +4 -0
- package/types/src/CircularProgress/constants.d.ts +8 -0
- package/types/src/CircularProgress/index.d.ts +2 -0
- package/types/src/CircularProgress/styled.d.ts +7 -0
- package/types/src/CircularProgress/types.d.ts +8 -0
- package/types/src/FormControlLabel/FormControlLabel.d.ts +3 -0
- package/types/src/FormControlLabel/index.d.ts +2 -0
- package/types/src/FormControlLabel/styled.d.ts +3 -0
- package/types/src/FormControlLabel/types.d.ts +2 -0
- package/types/src/FormHelperText/FormHelperText.d.ts +4 -0
- package/types/src/FormHelperText/index.d.ts +1 -0
- package/types/src/FormHelperText/styled.d.ts +41 -0
- package/types/src/FormHelperText/types.d.ts +6 -0
- package/types/src/Grid/Grid.d.ts +3 -0
- package/types/src/Grid/index.d.ts +2 -0
- package/types/src/Grid/styled.d.ts +13 -0
- package/types/src/Grid/types.d.ts +30 -0
- package/types/src/IconButton/IconButton.d.ts +3 -0
- package/types/src/IconButton/index.d.ts +1 -0
- package/types/src/IconButton/styled.d.ts +19 -0
- package/types/src/Menu/Menu.d.ts +3 -0
- package/types/src/Menu/index.d.ts +1 -0
- package/types/src/MenuItem/MenuItem.d.ts +3 -0
- package/types/src/MenuItem/index.d.ts +1 -0
- package/types/src/MenuList/MenuList.d.ts +3 -0
- package/types/src/MenuList/index.d.ts +2 -0
- package/types/src/MenuList/styled.d.ts +20 -0
- package/types/src/MenuList/types.d.ts +2 -0
- package/types/src/Tag/Tag.d.ts +3 -0
- package/types/src/Tag/constants.d.ts +21 -0
- package/types/src/Tag/index.d.ts +2 -0
- package/types/src/Tag/styled.d.ts +26 -0
- package/types/src/Tag/types.d.ts +12 -0
- package/types/src/TextField/TextField.d.ts +4 -0
- package/types/src/TextField/index.d.ts +2 -0
- package/types/src/TextField/types.d.ts +6 -0
- package/types/src/ThemeProvider/ThemeProvider.d.ts +7 -0
- package/types/src/ThemeProvider/index.d.ts +1 -0
- package/types/src/Typography/Typography.d.ts +8 -0
- package/types/src/Typography/index.d.ts +1 -0
- package/types/src/index.d.ts +13 -0
- package/types/src/styles/index.d.ts +1 -0
- package/types/src/styles/styled/index.d.ts +1 -0
- package/types/src/styles/styled/styled.d.ts +2 -0
- package/types/src/styles/styled/types.d.ts +48 -0
- package/types/src/theme/__tests__/BaseTheme.test.d.ts +1 -0
- package/types/src/theme/baseTheme.d.ts +28 -0
- package/types/src/theme/components/MuiFormHelperText.d.ts +4 -0
- package/types/src/theme/components/MuiFormLabel.d.ts +4 -0
- package/types/src/theme/components/MuiInputBase.d.ts +4 -0
- package/types/src/theme/components/MuiInputLabel.d.ts +4 -0
- package/types/src/theme/components/MuiOutlinedInput.d.ts +4 -0
- package/types/src/theme/components/MuiTypography.d.ts +21 -0
- package/types/src/theme/components/components.d.ts +21 -0
- package/types/src/theme/components/index.d.ts +1 -0
- package/types/src/theme/constants.d.ts +9 -0
- package/types/src/theme/elevation.d.ts +8 -0
- package/types/src/theme/index.d.ts +5 -0
- package/types/src/theme/palette/brandPalette.d.ts +15 -0
- package/types/src/theme/palette/index.d.ts +2 -0
- package/types/src/theme/palette/palette.d.ts +29 -0
- package/types/src/theme/shape.d.ts +6 -0
- package/types/src/theme/typography.d.ts +19 -0
- package/cjs/src/theme/components.js +0 -28
- package/esm/src/theme/components.js +0 -24
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Menu';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './MenuItem';
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const StyledMenuList: import("@emotion/styled").StyledComponent<{
|
|
3
|
+
autoFocus?: boolean | undefined;
|
|
4
|
+
autoFocusItem?: boolean | undefined;
|
|
5
|
+
children?: import("react").ReactNode;
|
|
6
|
+
disabledItemsFocusable?: boolean | undefined;
|
|
7
|
+
disableListWrap?: boolean | undefined;
|
|
8
|
+
variant?: "menu" | "selectedMenu" | undefined;
|
|
9
|
+
} & {
|
|
10
|
+
children?: import("react").ReactNode;
|
|
11
|
+
classes?: Partial<import("@mui/material").ListClasses> | undefined;
|
|
12
|
+
dense?: boolean | undefined;
|
|
13
|
+
disablePadding?: boolean | undefined;
|
|
14
|
+
subheader?: import("react").ReactNode;
|
|
15
|
+
sx?: import("@mui/material").SxProps<import("@mui/material").Theme> | undefined;
|
|
16
|
+
} & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLUListElement>, HTMLUListElement>, "key" | keyof import("react").HTMLAttributes<HTMLUListElement>> & {
|
|
17
|
+
ref?: ((instance: HTMLUListElement | null) => void) | import("react").RefObject<HTMLUListElement> | null | undefined;
|
|
18
|
+
}, keyof import("@mui/material/OverridableComponent").CommonProps | "children" | "sx" | "variant" | "autoFocus" | "dense" | "subheader" | "disablePadding" | "autoFocusItem" | "disabledItemsFocusable" | "disableListWrap"> & {
|
|
19
|
+
theme?: import("..").Theme | undefined;
|
|
20
|
+
}, {}, {}>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export declare enum TagColors {
|
|
2
|
+
DEFAULT = "default",
|
|
3
|
+
PRIMARY = "primary",
|
|
4
|
+
ERROR = "error",
|
|
5
|
+
GREY = "grey",
|
|
6
|
+
SUCCESS = "success",
|
|
7
|
+
WARNING = "warning"
|
|
8
|
+
}
|
|
9
|
+
export declare enum TagVariants {
|
|
10
|
+
CONTAINED = "contained",
|
|
11
|
+
LIGHT = "light"
|
|
12
|
+
}
|
|
13
|
+
export declare enum TagSizes {
|
|
14
|
+
MEDIUM = "medium",
|
|
15
|
+
SMALL = "small"
|
|
16
|
+
}
|
|
17
|
+
export declare enum TagStates {
|
|
18
|
+
DEFAULT = "default",
|
|
19
|
+
HOVER = "hover",
|
|
20
|
+
ACTIVE = "active"
|
|
21
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { Theme } from '../theme';
|
|
3
|
+
import { TagProps } from './types';
|
|
4
|
+
export declare const StyledTag: import("@emotion/styled").StyledComponent<{
|
|
5
|
+
avatar?: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | undefined;
|
|
6
|
+
children?: null | undefined;
|
|
7
|
+
classes?: Partial<import("@mui/material").ChipClasses> | undefined;
|
|
8
|
+
clickable?: boolean | undefined;
|
|
9
|
+
color?: "primary" | "secondary" | "default" | "error" | "warning" | "info" | "success" | undefined;
|
|
10
|
+
deleteIcon?: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | undefined;
|
|
11
|
+
disabled?: boolean | undefined;
|
|
12
|
+
icon?: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | undefined;
|
|
13
|
+
label?: import("react").ReactNode;
|
|
14
|
+
onDelete?: ((event: any) => void) | undefined;
|
|
15
|
+
size?: "medium" | "small" | undefined;
|
|
16
|
+
sx?: import("@mui/material").SxProps<import("@mui/material").Theme> | undefined;
|
|
17
|
+
variant?: "filled" | "outlined" | undefined;
|
|
18
|
+
} & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof import("react").HTMLAttributes<HTMLDivElement>> & {
|
|
19
|
+
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
20
|
+
}, "disabled" | "color" | keyof import("@mui/material/OverridableComponent").CommonProps | "children" | "sx" | "label" | "variant" | "size" | "icon" | "avatar" | "clickable" | "deleteIcon" | "onDelete"> & {
|
|
21
|
+
theme?: Theme | undefined;
|
|
22
|
+
} & Omit<TagProps, "color"> & {
|
|
23
|
+
customColor?: "primary" | "default" | "error" | "grey" | "warning" | "success" | undefined;
|
|
24
|
+
customVariant?: "light" | "contained" | undefined;
|
|
25
|
+
rounded?: boolean | undefined;
|
|
26
|
+
}, {}, {}>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ChipProps as MuiTagProps } from '@mui/material/Chip/Chip';
|
|
2
|
+
import { TagColors, TagSizes, TagStates, TagVariants } from './constants';
|
|
3
|
+
export declare type TagColor = `${TagColors}`;
|
|
4
|
+
export declare type TagVariant = `${TagVariants}`;
|
|
5
|
+
export declare type TagSize = `${TagSizes}`;
|
|
6
|
+
export declare type TagState = `${TagStates}`;
|
|
7
|
+
export declare type TagProps = Omit<MuiTagProps, 'color' | 'variant'> & {
|
|
8
|
+
color?: TagColor;
|
|
9
|
+
variant?: TagVariant;
|
|
10
|
+
size?: TagSize;
|
|
11
|
+
rounded?: boolean;
|
|
12
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './ThemeProvider';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { TypographyProps as MuiTypographyProps } from '@mui/material/Typography';
|
|
3
|
+
import { Variant } from '@mui/material/styles/createTypography';
|
|
4
|
+
export declare type TypographyProps = Omit<MuiTypographyProps, 'variant'> & {
|
|
5
|
+
variant?: Variant | 'h7' | 'h8' | 'h9' | 'ui' | 'link' | 'pointer' | 'small' | 'code';
|
|
6
|
+
};
|
|
7
|
+
export declare const Typography: ({ variant, children, ...props }: TypographyProps) => JSX.Element;
|
|
8
|
+
export default Typography;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Typography';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export * from './Button';
|
|
2
|
+
export * from './ButtonBase';
|
|
3
|
+
export * from './IconButton';
|
|
4
|
+
export * from './Badge';
|
|
5
|
+
export * from './Checkbox';
|
|
6
|
+
export * from './FormControlLabel';
|
|
7
|
+
export * from './Typography';
|
|
8
|
+
export * from './Menu';
|
|
9
|
+
export * from './MenuItem';
|
|
10
|
+
export * from './MenuList';
|
|
11
|
+
export * from './theme';
|
|
12
|
+
export * from './styles';
|
|
13
|
+
export * from './ThemeProvider';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './styled';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './styled';
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { PropsOf } from '@emotion/react';
|
|
3
|
+
import { CreateStyledComponent, FilteringStyledOptions, StyledOptions } from '@emotion/styled/base';
|
|
4
|
+
import { Theme } from '../../theme';
|
|
5
|
+
/**
|
|
6
|
+
* @desc
|
|
7
|
+
* This function accepts a React component or tag ('div', 'a' etc).
|
|
8
|
+
*
|
|
9
|
+
* @example styled(MyComponent)({ width: 100 })
|
|
10
|
+
* @example styled(MyComponent)(myComponentProps => ({ width: myComponentProps.width })
|
|
11
|
+
* @example styled('div')({ width: 100 })
|
|
12
|
+
* @example styled('div')<Props>(props => ({ width: props.width })
|
|
13
|
+
*/
|
|
14
|
+
interface BaseCreateStyled {
|
|
15
|
+
<C extends React.ComponentClass<React.ComponentProps<C>>, ForwardedProps extends keyof React.ComponentProps<C> = keyof React.ComponentProps<C>>(component: C, options: FilteringStyledOptions<React.ComponentProps<C>, ForwardedProps>): CreateStyledComponent<Pick<PropsOf<C>, ForwardedProps> & {
|
|
16
|
+
theme?: Theme;
|
|
17
|
+
}, {}, {
|
|
18
|
+
ref?: React.Ref<InstanceType<C>>;
|
|
19
|
+
}>;
|
|
20
|
+
<C extends React.ComponentClass<React.ComponentProps<C>>>(component: C, options?: StyledOptions<React.ComponentProps<C>>): CreateStyledComponent<PropsOf<C> & {
|
|
21
|
+
theme?: Theme;
|
|
22
|
+
}, {}, {
|
|
23
|
+
ref?: React.Ref<InstanceType<C>>;
|
|
24
|
+
}>;
|
|
25
|
+
<C extends React.ComponentType<React.ComponentProps<C>>, ForwardedProps extends keyof React.ComponentProps<C> = keyof React.ComponentProps<C>>(component: C, options: FilteringStyledOptions<React.ComponentProps<C>, ForwardedProps>): CreateStyledComponent<Pick<PropsOf<C>, ForwardedProps> & {
|
|
26
|
+
theme?: Theme;
|
|
27
|
+
}>;
|
|
28
|
+
<C extends React.ComponentType<React.ComponentProps<C>>>(component: C, options?: StyledOptions<React.ComponentProps<C>>): CreateStyledComponent<PropsOf<C> & {
|
|
29
|
+
theme?: Theme;
|
|
30
|
+
}>;
|
|
31
|
+
<Tag extends keyof JSX.IntrinsicElements, ForwardedProps extends keyof JSX.IntrinsicElements[Tag] = keyof JSX.IntrinsicElements[Tag]>(tag: Tag, options: FilteringStyledOptions<JSX.IntrinsicElements[Tag], ForwardedProps>): CreateStyledComponent<{
|
|
32
|
+
theme?: Theme;
|
|
33
|
+
as?: React.ElementType;
|
|
34
|
+
}, Pick<JSX.IntrinsicElements[Tag], ForwardedProps>>;
|
|
35
|
+
<Tag extends keyof JSX.IntrinsicElements>(tag: Tag, options?: StyledOptions<JSX.IntrinsicElements[Tag]>): CreateStyledComponent<{
|
|
36
|
+
theme?: Theme;
|
|
37
|
+
as?: React.ElementType;
|
|
38
|
+
}, JSX.IntrinsicElements[Tag]>;
|
|
39
|
+
}
|
|
40
|
+
declare type StyledTags = {
|
|
41
|
+
[Tag in keyof JSX.IntrinsicElements]: CreateStyledComponent<{
|
|
42
|
+
theme?: Theme;
|
|
43
|
+
as?: React.ElementType;
|
|
44
|
+
}, JSX.IntrinsicElements[Tag]>;
|
|
45
|
+
};
|
|
46
|
+
export interface CreateStyled extends BaseCreateStyled, StyledTags {
|
|
47
|
+
}
|
|
48
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Palette as MuiPalette, Theme as MuiTheme, PaletteColor, ThemeOptions } from '@mui/material/styles';
|
|
2
|
+
import { TypographyThemeOptions } from './typography';
|
|
3
|
+
import { Background, Color } from './palette';
|
|
4
|
+
import { FontsUrls } from './components';
|
|
5
|
+
import { Brand } from './constants';
|
|
6
|
+
import { Elevation } from './elevation';
|
|
7
|
+
import { Shape } from './shape';
|
|
8
|
+
export declare type Palette = Omit<MuiPalette, 'grey' | 'background'> & {
|
|
9
|
+
red: Color;
|
|
10
|
+
green: Color;
|
|
11
|
+
yellow: Color;
|
|
12
|
+
grey: Color;
|
|
13
|
+
primary: PaletteColor & Color;
|
|
14
|
+
background: Background;
|
|
15
|
+
};
|
|
16
|
+
export declare type Theme = Omit<MuiTheme, 'shadows' | 'palette' | 'shape' | 'typography'> & {
|
|
17
|
+
elevation: Elevation;
|
|
18
|
+
palette: Palette;
|
|
19
|
+
shape: Shape;
|
|
20
|
+
typography: TypographyThemeOptions;
|
|
21
|
+
};
|
|
22
|
+
declare type CreateThemeParams = {
|
|
23
|
+
brand: Brand;
|
|
24
|
+
options?: ThemeOptions;
|
|
25
|
+
fontsUrls: FontsUrls;
|
|
26
|
+
};
|
|
27
|
+
export declare const createTheme: (params: CreateThemeParams) => Theme;
|
|
28
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Components } from '@mui/material';
|
|
2
|
+
export declare type FontsUrls = {
|
|
3
|
+
bold: {
|
|
4
|
+
woff: string;
|
|
5
|
+
woff2: string;
|
|
6
|
+
};
|
|
7
|
+
light: {
|
|
8
|
+
woff: string;
|
|
9
|
+
woff2: string;
|
|
10
|
+
};
|
|
11
|
+
medium: {
|
|
12
|
+
woff: string;
|
|
13
|
+
woff2: string;
|
|
14
|
+
};
|
|
15
|
+
regular: {
|
|
16
|
+
woff: string;
|
|
17
|
+
woff2: string;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
export declare const MuiTypography: Components['MuiTypography'];
|
|
21
|
+
export default MuiTypography;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Components } from '@mui/material';
|
|
2
|
+
import type { Theme } from '../baseTheme';
|
|
3
|
+
export declare type FontsUrls = {
|
|
4
|
+
bold: {
|
|
5
|
+
woff: string;
|
|
6
|
+
woff2: string;
|
|
7
|
+
};
|
|
8
|
+
light: {
|
|
9
|
+
woff: string;
|
|
10
|
+
woff2: string;
|
|
11
|
+
};
|
|
12
|
+
medium: {
|
|
13
|
+
woff: string;
|
|
14
|
+
woff2: string;
|
|
15
|
+
};
|
|
16
|
+
regular: {
|
|
17
|
+
woff: string;
|
|
18
|
+
woff2: string;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
export declare const getComponents: (fontUrls: FontsUrls) => Components<Theme>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './components';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Brand } from '../constants';
|
|
2
|
+
declare type BrandColors = {
|
|
3
|
+
secondary: string;
|
|
4
|
+
900: string;
|
|
5
|
+
800: string;
|
|
6
|
+
700: string;
|
|
7
|
+
600: string;
|
|
8
|
+
500: string;
|
|
9
|
+
400: string;
|
|
10
|
+
300: string;
|
|
11
|
+
200: string;
|
|
12
|
+
100: string;
|
|
13
|
+
};
|
|
14
|
+
export declare const brandPalette: Record<Brand, BrandColors>;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { PaletteOptions as MuiPaletteOptions, PaletteColorOptions } from '@mui/material';
|
|
2
|
+
import { TypeBackground } from '@mui/material/styles/createPalette';
|
|
3
|
+
import { Brand } from '../constants';
|
|
4
|
+
export declare type Color = {
|
|
5
|
+
900: string;
|
|
6
|
+
800: string;
|
|
7
|
+
700: string;
|
|
8
|
+
600: string;
|
|
9
|
+
500: string;
|
|
10
|
+
400: string;
|
|
11
|
+
300: string;
|
|
12
|
+
200: string;
|
|
13
|
+
100: string;
|
|
14
|
+
};
|
|
15
|
+
export declare type PrimaryColorOptions = PaletteColorOptions & Color;
|
|
16
|
+
export declare type Background = TypeBackground & {
|
|
17
|
+
element: string;
|
|
18
|
+
elementHover: string;
|
|
19
|
+
};
|
|
20
|
+
declare type PaletteOptions = MuiPaletteOptions & {
|
|
21
|
+
red: Color;
|
|
22
|
+
green: Color;
|
|
23
|
+
yellow: Color;
|
|
24
|
+
grey: Color;
|
|
25
|
+
primary: PrimaryColorOptions;
|
|
26
|
+
background: Background;
|
|
27
|
+
};
|
|
28
|
+
export declare const getPalette: (brand?: Brand) => PaletteOptions;
|
|
29
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Typography } from '@mui/material/styles/createTypography';
|
|
2
|
+
import { CSSProperties } from 'react';
|
|
3
|
+
declare type CustomTypographyVariantStyle = {
|
|
4
|
+
fontSize: CSSProperties['fontSize'];
|
|
5
|
+
fontWeight: CSSProperties['fontWeight'];
|
|
6
|
+
};
|
|
7
|
+
export declare type TypographyThemeOptions = Typography & {
|
|
8
|
+
h7: CustomTypographyVariantStyle;
|
|
9
|
+
h8: CustomTypographyVariantStyle;
|
|
10
|
+
h9: CustomTypographyVariantStyle;
|
|
11
|
+
ui: CustomTypographyVariantStyle;
|
|
12
|
+
link: CustomTypographyVariantStyle;
|
|
13
|
+
pointer: CustomTypographyVariantStyle;
|
|
14
|
+
small: CustomTypographyVariantStyle;
|
|
15
|
+
code: CustomTypographyVariantStyle;
|
|
16
|
+
};
|
|
17
|
+
export declare const pxToRem: (fontSize: number, htmlFontSize?: number) => string;
|
|
18
|
+
export declare const typography: Partial<TypographyThemeOptions>;
|
|
19
|
+
export {};
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getComponents = void 0;
|
|
4
|
-
var getMuiCssBaseline = function (fontUrls) { return ({
|
|
5
|
-
styleOverrides: "\n @font-face {\n font-family: 'Ubuntu';\n font-style: 'normal';\n font-weight: 300;\n font-display: swap;\n src: url(" + fontUrls.light.woff2 + ") format('woff2'), url(" + fontUrls.light.woff + ") format('woff');\n }\n @font-face {\n font-family: 'Ubuntu';\n font-style: 'normal';\n font-weight: 400;\n font-display: swap;\n src: url(" + fontUrls.regular.woff2 + ") format('woff2'), url(" + fontUrls.regular.woff + ") format('woff');\n }\n @font-face {\n font-family: 'Ubuntu';\n font-style: 'normal';\n font-weight: 500;\n font-display: swap;\n src: url(" + fontUrls.medium.woff2 + ") format('woff2'), url(" + fontUrls.medium.woff + ") format('woff');\n }\n @font-face {\n font-family: 'Ubuntu';\n font-style: 'normal';\n font-weight: 700;\n font-display: swap;\n src: url(" + fontUrls.bold.woff2 + ") format('woff2'), url(" + fontUrls.bold.woff + ") format('woff');\n }\n ",
|
|
6
|
-
}); };
|
|
7
|
-
var getMuiTypography = function () { return ({
|
|
8
|
-
variants: [
|
|
9
|
-
{
|
|
10
|
-
props: { variant: 'button' },
|
|
11
|
-
style: {
|
|
12
|
-
textTransform: 'capitalize',
|
|
13
|
-
},
|
|
14
|
-
},
|
|
15
|
-
],
|
|
16
|
-
defaultProps: {
|
|
17
|
-
// TODO: необходимо кастомизировать типы Components['MuiTypography']
|
|
18
|
-
variantMapping: {
|
|
19
|
-
link: 'a',
|
|
20
|
-
code: 'code',
|
|
21
|
-
},
|
|
22
|
-
},
|
|
23
|
-
}); };
|
|
24
|
-
var getComponents = function (fontUrls) { return ({
|
|
25
|
-
MuiCssBaseline: getMuiCssBaseline(fontUrls),
|
|
26
|
-
MuiTypography: getMuiTypography(),
|
|
27
|
-
}); };
|
|
28
|
-
exports.getComponents = getComponents;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
var getMuiCssBaseline = function (fontUrls) { return ({
|
|
2
|
-
styleOverrides: "\n @font-face {\n font-family: 'Ubuntu';\n font-style: 'normal';\n font-weight: 300;\n font-display: swap;\n src: url(" + fontUrls.light.woff2 + ") format('woff2'), url(" + fontUrls.light.woff + ") format('woff');\n }\n @font-face {\n font-family: 'Ubuntu';\n font-style: 'normal';\n font-weight: 400;\n font-display: swap;\n src: url(" + fontUrls.regular.woff2 + ") format('woff2'), url(" + fontUrls.regular.woff + ") format('woff');\n }\n @font-face {\n font-family: 'Ubuntu';\n font-style: 'normal';\n font-weight: 500;\n font-display: swap;\n src: url(" + fontUrls.medium.woff2 + ") format('woff2'), url(" + fontUrls.medium.woff + ") format('woff');\n }\n @font-face {\n font-family: 'Ubuntu';\n font-style: 'normal';\n font-weight: 700;\n font-display: swap;\n src: url(" + fontUrls.bold.woff2 + ") format('woff2'), url(" + fontUrls.bold.woff + ") format('woff');\n }\n ",
|
|
3
|
-
}); };
|
|
4
|
-
var getMuiTypography = function () { return ({
|
|
5
|
-
variants: [
|
|
6
|
-
{
|
|
7
|
-
props: { variant: 'button' },
|
|
8
|
-
style: {
|
|
9
|
-
textTransform: 'capitalize',
|
|
10
|
-
},
|
|
11
|
-
},
|
|
12
|
-
],
|
|
13
|
-
defaultProps: {
|
|
14
|
-
// TODO: необходимо кастомизировать типы Components['MuiTypography']
|
|
15
|
-
variantMapping: {
|
|
16
|
-
link: 'a',
|
|
17
|
-
code: 'code',
|
|
18
|
-
},
|
|
19
|
-
},
|
|
20
|
-
}); };
|
|
21
|
-
export var getComponents = function (fontUrls) { return ({
|
|
22
|
-
MuiCssBaseline: getMuiCssBaseline(fontUrls),
|
|
23
|
-
MuiTypography: getMuiTypography(),
|
|
24
|
-
}); };
|