@astral/ui 0.1.1 → 0.2.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/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/Button/styled.js +4 -1
- package/esm/src/ButtonBase/ButtonBase.d.ts +1 -0
- package/esm/src/ButtonBase/styled.d.ts +1 -6
- package/esm/src/ButtonBase/styled.js +124 -118
- 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/{cjs/src/theme/__tests__/BaseTheme.test.d.ts → esm/src/Checkbox/types.js} +0 -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/GlobalStyles/GlobalStyles.d.ts +3 -0
- package/esm/src/GlobalStyles/GlobalStyles.js +35 -0
- package/esm/src/GlobalStyles/index.d.ts +1 -0
- package/esm/src/GlobalStyles/index.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/ThemeProvider/ThemeProvider.js +3 -2
- package/esm/src/Typography/Typography.d.ts +1 -0
- package/esm/src/index.d.ts +6 -0
- package/esm/src/index.js +6 -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/hooks/index.d.ts +1 -0
- package/esm/src/theme/hooks/index.js +1 -0
- package/esm/src/theme/hooks/useTheme/index.d.ts +2 -0
- package/esm/src/theme/hooks/useTheme/index.js +2 -0
- package/esm/src/theme/index.d.ts +1 -0
- package/esm/src/theme/index.js +1 -0
- package/esm/src/theme/palette/palette.d.ts +1 -1
- package/esm/src/theme/typography.js +1 -1
- package/{cjs → node}/index.d.ts +0 -0
- package/{cjs → node}/index.js +0 -0
- package/{cjs → node}/src/Badge/Badge.d.ts +1 -0
- package/{cjs → node}/src/Badge/Badge.js +0 -0
- package/{cjs → node}/src/Badge/index.d.ts +0 -0
- package/{cjs → node}/src/Badge/index.js +0 -0
- package/{cjs → node}/src/Badge/styled.d.ts +2 -2
- package/{cjs → node}/src/Badge/styled.js +0 -0
- package/{cjs → node}/src/Badge/types.d.ts +0 -0
- package/{cjs → node}/src/Badge/types.js +0 -0
- package/{cjs → node}/src/Button/Button.d.ts +1 -0
- package/{cjs → node}/src/Button/Button.js +0 -0
- package/{cjs → node}/src/Button/index.d.ts +0 -0
- package/{cjs → node}/src/Button/index.js +0 -0
- package/{cjs → node}/src/Button/styled.d.ts +0 -0
- package/{cjs → node}/src/Button/styled.js +4 -1
- package/{cjs → node}/src/Button/types.d.ts +0 -0
- package/{cjs → node}/src/Button/types.js +0 -0
- package/{cjs → node}/src/ButtonBase/ButtonBase.d.ts +1 -0
- package/{cjs → node}/src/ButtonBase/ButtonBase.js +0 -0
- package/{cjs → node}/src/ButtonBase/constants.d.ts +0 -0
- package/{cjs → node}/src/ButtonBase/constants.js +0 -0
- package/{cjs → node}/src/ButtonBase/index.d.ts +0 -0
- package/{cjs → node}/src/ButtonBase/index.js +0 -0
- package/{cjs → node}/src/ButtonBase/styled.d.ts +1 -6
- package/node/src/ButtonBase/styled.js +229 -0
- package/{cjs → node}/src/ButtonBase/types.d.ts +0 -0
- package/{cjs → node}/src/ButtonBase/types.js +0 -0
- package/node/src/Checkbox/Checkbox.d.ts +3 -0
- package/node/src/Checkbox/Checkbox.js +33 -0
- package/node/src/Checkbox/icons.d.ts +5 -0
- package/node/src/Checkbox/icons.js +42 -0
- package/node/src/Checkbox/index.d.ts +2 -0
- package/node/src/Checkbox/index.js +14 -0
- package/node/src/Checkbox/styled.d.ts +4 -0
- package/node/src/Checkbox/styled.js +35 -0
- package/node/src/Checkbox/types.d.ts +2 -0
- package/{cjs/src/CircularProgress → node/src/Checkbox}/types.js +0 -0
- package/{cjs → node}/src/CircularProgress/CircularProgress.d.ts +1 -0
- package/{cjs → node}/src/CircularProgress/CircularProgress.js +2 -1
- package/{cjs → node}/src/CircularProgress/constants.d.ts +1 -2
- package/{cjs → node}/src/CircularProgress/constants.js +0 -1
- package/{cjs → node}/src/CircularProgress/index.d.ts +0 -0
- package/{cjs → node}/src/CircularProgress/index.js +0 -0
- package/{cjs → node}/src/CircularProgress/styled.d.ts +0 -1
- package/{cjs → node}/src/CircularProgress/styled.js +2 -8
- package/{cjs → node}/src/CircularProgress/types.d.ts +0 -0
- package/{cjs/src/styles/styled → node/src/CircularProgress}/types.js +0 -0
- package/node/src/FormControlLabel/FormControlLabel.d.ts +3 -0
- package/node/src/FormControlLabel/FormControlLabel.js +32 -0
- package/node/src/FormControlLabel/index.d.ts +2 -0
- package/node/src/FormControlLabel/index.js +14 -0
- package/node/src/FormControlLabel/styled.d.ts +3 -0
- package/node/src/FormControlLabel/styled.js +14 -0
- package/node/src/FormControlLabel/types.d.ts +2 -0
- package/node/src/FormControlLabel/types.js +2 -0
- package/node/src/FormHelperText/FormHelperText.d.ts +4 -0
- package/node/src/FormHelperText/FormHelperText.js +24 -0
- package/node/src/FormHelperText/index.d.ts +1 -0
- package/node/src/FormHelperText/index.js +13 -0
- package/node/src/FormHelperText/styled.d.ts +41 -0
- package/node/src/FormHelperText/styled.js +14 -0
- package/node/src/FormHelperText/types.d.ts +6 -0
- package/node/src/FormHelperText/types.js +2 -0
- package/node/src/GlobalStyles/GlobalStyles.d.ts +3 -0
- package/node/src/GlobalStyles/GlobalStyles.js +39 -0
- package/node/src/GlobalStyles/index.d.ts +1 -0
- package/node/src/GlobalStyles/index.js +13 -0
- package/node/src/Grid/Grid.d.ts +3 -0
- package/node/src/Grid/Grid.js +32 -0
- package/node/src/Grid/index.d.ts +2 -0
- package/node/src/Grid/index.js +14 -0
- package/node/src/Grid/styled.d.ts +13 -0
- package/node/src/Grid/styled.js +14 -0
- package/node/src/Grid/types.d.ts +30 -0
- package/node/src/Grid/types.js +2 -0
- package/{cjs → node}/src/IconButton/IconButton.d.ts +1 -0
- package/{cjs → node}/src/IconButton/IconButton.js +0 -0
- package/{cjs → node}/src/IconButton/index.d.ts +0 -0
- package/{cjs → node}/src/IconButton/index.js +0 -0
- package/{cjs → node}/src/IconButton/styled.d.ts +0 -0
- package/{cjs → node}/src/IconButton/styled.js +0 -0
- package/node/src/Menu/Menu.d.ts +3 -0
- package/node/src/Menu/Menu.js +32 -0
- package/node/src/Menu/index.d.ts +1 -0
- package/node/src/Menu/index.js +13 -0
- package/node/src/MenuItem/MenuItem.d.ts +3 -0
- package/node/src/MenuItem/MenuItem.js +32 -0
- package/node/src/MenuItem/index.d.ts +1 -0
- package/node/src/MenuItem/index.js +13 -0
- package/node/src/MenuList/MenuList.d.ts +3 -0
- package/node/src/MenuList/MenuList.js +32 -0
- package/node/src/MenuList/index.d.ts +2 -0
- package/node/src/MenuList/index.js +14 -0
- package/node/src/MenuList/styled.d.ts +20 -0
- package/node/src/MenuList/styled.js +20 -0
- package/node/src/MenuList/types.d.ts +2 -0
- package/node/src/MenuList/types.js +2 -0
- package/node/src/Tag/Tag.d.ts +3 -0
- package/node/src/Tag/Tag.js +32 -0
- package/node/src/Tag/constants.d.ts +21 -0
- package/node/src/Tag/constants.js +28 -0
- package/node/src/Tag/index.d.ts +2 -0
- package/node/src/Tag/index.js +14 -0
- package/node/src/Tag/styled.d.ts +26 -0
- package/node/src/Tag/styled.js +120 -0
- package/node/src/Tag/types.d.ts +12 -0
- package/node/src/Tag/types.js +2 -0
- package/node/src/TextField/TextField.d.ts +4 -0
- package/node/src/TextField/TextField.js +53 -0
- package/node/src/TextField/index.d.ts +2 -0
- package/node/src/TextField/index.js +14 -0
- package/node/src/TextField/types.d.ts +6 -0
- package/node/src/TextField/types.js +2 -0
- package/{cjs → node}/src/ThemeProvider/ThemeProvider.d.ts +0 -0
- package/{cjs → node}/src/ThemeProvider/ThemeProvider.js +2 -1
- package/{cjs → node}/src/ThemeProvider/index.d.ts +0 -0
- package/{cjs → node}/src/ThemeProvider/index.js +0 -0
- package/{cjs → node}/src/Typography/Typography.d.ts +1 -0
- package/{cjs → node}/src/Typography/Typography.js +0 -0
- package/{cjs → node}/src/Typography/index.d.ts +0 -0
- package/{cjs → node}/src/Typography/index.js +0 -0
- package/{cjs → node}/src/index.d.ts +6 -0
- package/{cjs → node}/src/index.js +6 -0
- package/{cjs → node}/src/styles/index.d.ts +0 -0
- package/{cjs → node}/src/styles/index.js +0 -0
- package/{cjs → node}/src/styles/styled/index.d.ts +0 -0
- package/{cjs → node}/src/styles/styled/index.js +0 -0
- package/{cjs → node}/src/styles/styled/styled.d.ts +0 -0
- package/{cjs → node}/src/styles/styled/styled.js +0 -0
- package/{cjs → node}/src/styles/styled/types.d.ts +0 -0
- package/node/src/styles/styled/types.js +2 -0
- package/node/src/theme/__tests__/BaseTheme.test.d.ts +1 -0
- package/{cjs → node}/src/theme/__tests__/BaseTheme.test.js +1 -1
- package/{cjs → node}/src/theme/baseTheme.d.ts +4 -3
- package/{cjs → node}/src/theme/baseTheme.js +2 -2
- package/node/src/theme/components/MuiFormHelperText.d.ts +4 -0
- package/node/src/theme/components/MuiFormHelperText.js +18 -0
- package/node/src/theme/components/MuiFormLabel.d.ts +4 -0
- package/node/src/theme/components/MuiFormLabel.js +14 -0
- package/node/src/theme/components/MuiInputBase.d.ts +4 -0
- package/node/src/theme/components/MuiInputBase.js +16 -0
- package/node/src/theme/components/MuiInputLabel.d.ts +4 -0
- package/node/src/theme/components/MuiInputLabel.js +32 -0
- package/node/src/theme/components/MuiOutlinedInput.d.ts +4 -0
- package/node/src/theme/components/MuiOutlinedInput.js +64 -0
- package/node/src/theme/components/MuiTypography.d.ts +21 -0
- package/node/src/theme/components/MuiTypography.js +21 -0
- package/{cjs/src/theme → node/src/theme/components}/components.d.ts +2 -1
- package/node/src/theme/components/components.js +65 -0
- package/node/src/theme/components/index.d.ts +1 -0
- package/node/src/theme/components/index.js +13 -0
- package/{cjs → node}/src/theme/constants.d.ts +0 -0
- package/{cjs → node}/src/theme/constants.js +0 -0
- package/{cjs → node}/src/theme/elevation.d.ts +0 -0
- package/node/src/theme/elevation.js +10 -0
- package/node/src/theme/hooks/index.d.ts +1 -0
- package/node/src/theme/hooks/index.js +13 -0
- package/node/src/theme/hooks/useTheme/index.d.ts +2 -0
- package/node/src/theme/hooks/useTheme/index.js +6 -0
- package/{cjs → node}/src/theme/index.d.ts +1 -0
- package/{cjs → node}/src/theme/index.js +1 -0
- package/{cjs → node}/src/theme/palette/brandPalette.d.ts +0 -0
- package/{cjs → node}/src/theme/palette/brandPalette.js +0 -0
- package/{cjs → node}/src/theme/palette/index.d.ts +0 -0
- package/{cjs → node}/src/theme/palette/index.js +0 -0
- package/{cjs → node}/src/theme/palette/palette.d.ts +1 -1
- package/{cjs → node}/src/theme/palette/palette.js +0 -0
- package/{cjs → node}/src/theme/shape.d.ts +0 -0
- package/{cjs → node}/src/theme/shape.js +0 -0
- package/{cjs → node}/src/theme/typography.d.ts +0 -0
- package/{cjs → node}/src/theme/typography.js +1 -1
- package/package.json +3 -2
- package/cjs/src/ButtonBase/styled.js +0 -224
- package/cjs/src/theme/components.js +0 -28
- package/cjs/src/theme/elevation.js +0 -10
- package/esm/src/theme/components.js +0 -24
package/esm/src/Badge/Badge.d.ts
CHANGED
|
@@ -23,7 +23,7 @@ export declare const StyledBadge: import("@emotion/styled").StyledComponent<{
|
|
|
23
23
|
color?: "primary" | "secondary" | "default" | "error" | "warning" | "info" | "success" | undefined;
|
|
24
24
|
overlap?: "circular" | "rectangular" | undefined;
|
|
25
25
|
sx?: import("@mui/material").SxProps<import("@mui/material").Theme> | undefined;
|
|
26
|
-
variant?: "
|
|
26
|
+
variant?: "standard" | "dot" | undefined;
|
|
27
27
|
} & {
|
|
28
28
|
anchorOrigin?: import("@mui/material").BadgeOrigin | undefined;
|
|
29
29
|
components?: {
|
|
@@ -43,7 +43,7 @@ export declare const StyledBadge: import("@emotion/styled").StyledComponent<{
|
|
|
43
43
|
variant?: string | undefined;
|
|
44
44
|
} & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "key" | keyof import("react").HTMLAttributes<HTMLSpanElement>> & {
|
|
45
45
|
ref?: ((instance: HTMLSpanElement | null) => void) | import("react").RefObject<HTMLSpanElement> | null | undefined;
|
|
46
|
-
}, keyof import("@mui/material/OverridableComponent").CommonProps | "
|
|
46
|
+
}, "components" | "color" | keyof import("@mui/material/OverridableComponent").CommonProps | "children" | "sx" | "variant" | "componentsProps" | "invisible" | "anchorOrigin" | "overlap" | "badgeContent" | "max" | "showZero"> & {
|
|
47
47
|
theme?: Theme | undefined;
|
|
48
48
|
} & Omit<BadgeProps, "color"> & {
|
|
49
49
|
customColor: BadgeColor;
|
package/esm/src/Button/styled.js
CHANGED
|
@@ -14,12 +14,15 @@ export var StyledButton = styled(ButtonBase, {
|
|
|
14
14
|
shouldForwardProp: function (prop) {
|
|
15
15
|
return prop !== 'startIcon' && prop !== 'endIcon' && prop !== 'loading';
|
|
16
16
|
},
|
|
17
|
-
})(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n pointer-events: ", ";\n color: ", ";\n\n > span:first-of-type {\n display: inherit;\n margin-right: ", ";\n }\n\n > span:last-of-type {\n display: inherit;\n margin-left: ", ";\n }\n\n .MuiCircularProgress-root {\n width: 16px !important;\n height: 16px !important;\n transform: translate(-50%, -50%);\n position: absolute;\n\n color: ", ";\n }\n"], ["\n pointer-events: ", ";\n color: ", ";\n\n > span:first-of-type {\n display: inherit;\n margin-right: ", ";\n }\n\n > span:last-of-type {\n display: inherit;\n margin-left: ", ";\n }\n\n .MuiCircularProgress-root {\n width: 16px !important;\n height: 16px !important;\n transform: translate(-50%, -50%);\n position: absolute;\n\n color: ", ";\n }\n"])), function (_a) {
|
|
17
|
+
})(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n pointer-events: ", ";\n color: ", ";\n\n &:focus {\n color: ", ";\n }\n\n > span:first-of-type {\n display: inherit;\n margin-right: ", ";\n }\n\n > span:last-of-type {\n display: inherit;\n margin-left: ", ";\n }\n\n .MuiCircularProgress-root {\n width: 16px !important;\n height: 16px !important;\n transform: translate(-50%, -50%);\n position: absolute;\n\n color: ", ";\n }\n"], ["\n pointer-events: ", ";\n color: ", ";\n\n &:focus {\n color: ", ";\n }\n\n > span:first-of-type {\n display: inherit;\n margin-right: ", ";\n }\n\n > span:last-of-type {\n display: inherit;\n margin-left: ", ";\n }\n\n .MuiCircularProgress-root {\n width: 16px !important;\n height: 16px !important;\n transform: translate(-50%, -50%);\n position: absolute;\n\n color: ", ";\n }\n"])), function (_a) {
|
|
18
18
|
var loading = _a.loading;
|
|
19
19
|
return (loading ? 'none' : 'inherit');
|
|
20
20
|
}, function (_a) {
|
|
21
21
|
var loading = _a.loading;
|
|
22
22
|
return loading && 'transparent';
|
|
23
|
+
}, function (_a) {
|
|
24
|
+
var loading = _a.loading;
|
|
25
|
+
return loading && 'transparent';
|
|
23
26
|
}, function (_a) {
|
|
24
27
|
var theme = _a.theme;
|
|
25
28
|
return theme.spacing(2);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import {
|
|
2
|
+
import { Theme } from '../theme';
|
|
3
3
|
import { BaseButtonProps, ButtonColor, ButtonSize, ButtonState, ButtonVariant } from './types';
|
|
4
4
|
declare type StyledButtonBaseThemeProps = {
|
|
5
5
|
customColor?: ButtonColor;
|
|
@@ -10,11 +10,6 @@ declare type StyledButtonBaseThemeProps = {
|
|
|
10
10
|
export declare const getColor: ({ theme, customVariant, customColor, buttonState, }: StyledButtonBaseThemeProps & {
|
|
11
11
|
buttonState: ButtonState;
|
|
12
12
|
}) => string;
|
|
13
|
-
export declare const getBgText: ({ palette, buttonState, colorVariant, }: {
|
|
14
|
-
palette: Palette;
|
|
15
|
-
buttonState: ButtonState;
|
|
16
|
-
colorVariant: string;
|
|
17
|
-
}) => string;
|
|
18
13
|
export declare const getBgColor: ({ customColor, customVariant, buttonState, theme, }: StyledButtonBaseThemeProps & {
|
|
19
14
|
buttonState: ButtonState;
|
|
20
15
|
}) => string;
|
|
@@ -15,131 +15,134 @@ var __assign = (this && this.__assign) || function () {
|
|
|
15
15
|
};
|
|
16
16
|
import ButtonUnstyled, { buttonUnstyledClasses, } from '@mui/base/ButtonUnstyled';
|
|
17
17
|
import { styled } from '../styles';
|
|
18
|
-
import {
|
|
19
|
-
var BACKGROUND_COLOR_VARIANTS = {
|
|
20
|
-
default: {
|
|
21
|
-
contained: '800',
|
|
22
|
-
light: '100',
|
|
23
|
-
text: '100',
|
|
24
|
-
},
|
|
25
|
-
hover: {
|
|
26
|
-
contained: '700',
|
|
27
|
-
light: '200',
|
|
28
|
-
text: '200',
|
|
29
|
-
},
|
|
30
|
-
focus: {
|
|
31
|
-
contained: '900',
|
|
32
|
-
light: '100',
|
|
33
|
-
text: '100',
|
|
34
|
-
},
|
|
35
|
-
};
|
|
18
|
+
import { ButtonSizes, ButtonStates, ButtonVariants } from './constants';
|
|
36
19
|
export var getColor = function (_a) {
|
|
37
20
|
var theme = _a.theme, customVariant = _a.customVariant, customColor = _a.customColor, buttonState = _a.buttonState;
|
|
38
|
-
var
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
21
|
+
var textColorVariants = {
|
|
22
|
+
light: {
|
|
23
|
+
error: {
|
|
24
|
+
default: theme.palette.red['900'],
|
|
25
|
+
hover: theme.palette.red['900'],
|
|
26
|
+
active: theme.palette.red['900'],
|
|
27
|
+
focus: theme.palette.red['900'],
|
|
28
|
+
},
|
|
29
|
+
success: {
|
|
30
|
+
default: theme.palette.green['900'],
|
|
31
|
+
hover: theme.palette.green['900'],
|
|
32
|
+
active: theme.palette.green['900'],
|
|
33
|
+
focus: theme.palette.green['900'],
|
|
34
|
+
},
|
|
35
|
+
primary: {
|
|
36
|
+
default: theme.palette.grey['900'],
|
|
37
|
+
hover: theme.palette.grey['900'],
|
|
38
|
+
active: theme.palette.primary['800'],
|
|
39
|
+
focus: theme.palette.grey['900'],
|
|
40
|
+
},
|
|
41
|
+
warning: {
|
|
42
|
+
default: theme.palette.yellow['900'],
|
|
43
|
+
hover: theme.palette.yellow['900'],
|
|
44
|
+
active: theme.palette.yellow['900'],
|
|
45
|
+
focus: theme.palette.yellow['900'],
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
contained: theme.palette.primary.contrastText,
|
|
49
|
+
text: {
|
|
50
|
+
default: theme.palette.grey['900'],
|
|
51
|
+
hover: theme.palette.grey['900'],
|
|
52
|
+
active: theme.palette.primary['800'],
|
|
53
|
+
focus: theme.palette.grey['900'],
|
|
54
|
+
},
|
|
55
|
+
link: {
|
|
56
|
+
default: theme.palette.primary['800'],
|
|
57
|
+
hover: theme.palette.primary['700'],
|
|
58
|
+
active: theme.palette.primary['900'],
|
|
59
|
+
focus: theme.palette.primary['800'],
|
|
60
|
+
},
|
|
61
|
+
};
|
|
62
|
+
if (customVariant === ButtonVariants.CONTAINED) {
|
|
63
|
+
return textColorVariants.contained;
|
|
67
64
|
}
|
|
68
|
-
if (customVariant === ButtonVariants.
|
|
69
|
-
|
|
70
|
-
return palette.primary['800'];
|
|
71
|
-
if (buttonState === ButtonStates.HOVER)
|
|
72
|
-
return palette.primary['700'];
|
|
73
|
-
if (buttonState === ButtonStates.FOCUS)
|
|
74
|
-
return palette.primary.dark;
|
|
75
|
-
return palette.primary.main;
|
|
65
|
+
if (customVariant === ButtonVariants.LIGHT && customColor) {
|
|
66
|
+
return textColorVariants.light[customColor][buttonState];
|
|
76
67
|
}
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
export var getBgText = function (_a) {
|
|
80
|
-
var palette = _a.palette, buttonState = _a.buttonState, colorVariant = _a.colorVariant;
|
|
81
|
-
if (buttonState === ButtonStates.HOVER)
|
|
82
|
-
return palette.grey[colorVariant];
|
|
83
|
-
if (buttonState === ButtonStates.FOCUS)
|
|
84
|
-
return palette.primary[colorVariant];
|
|
85
|
-
return 'transparent';
|
|
86
|
-
};
|
|
87
|
-
var getBgContained = function (_a) {
|
|
88
|
-
var palette = _a.palette, colorVariant = _a.colorVariant, customColor = _a.customColor;
|
|
89
|
-
if (customColor === ButtonColors.ERROR)
|
|
90
|
-
return palette.red[colorVariant];
|
|
91
|
-
if (customColor === ButtonColors.SUCCESS)
|
|
92
|
-
return palette.green[colorVariant];
|
|
93
|
-
if (customColor === ButtonColors.WARNING)
|
|
94
|
-
return palette.yellow[colorVariant];
|
|
95
|
-
if (customColor === ButtonColors.PRIMARY)
|
|
96
|
-
return palette.primary[colorVariant];
|
|
97
|
-
return 'transparent';
|
|
98
|
-
};
|
|
99
|
-
var getBgLight = function (_a) {
|
|
100
|
-
var palette = _a.palette, colorVariant = _a.colorVariant, buttonState = _a.buttonState, customColor = _a.customColor;
|
|
101
|
-
if (customColor === ButtonColors.PRIMARY) {
|
|
102
|
-
if (buttonState === ButtonStates.DEFAULT)
|
|
103
|
-
return palette.grey[colorVariant];
|
|
104
|
-
if (buttonState === ButtonStates.HOVER)
|
|
105
|
-
return palette.grey[colorVariant];
|
|
106
|
-
if (buttonState === ButtonStates.FOCUS)
|
|
107
|
-
return palette.primary[colorVariant];
|
|
68
|
+
if (customVariant === ButtonVariants.TEXT) {
|
|
69
|
+
return textColorVariants.text[buttonState];
|
|
108
70
|
}
|
|
109
|
-
|
|
110
|
-
return palette.red[colorVariant];
|
|
111
|
-
if (customColor === ButtonColors.SUCCESS)
|
|
112
|
-
return palette.green[colorVariant];
|
|
113
|
-
if (customColor === ButtonColors.WARNING)
|
|
114
|
-
return palette.yellow[colorVariant];
|
|
115
|
-
return 'transparent';
|
|
71
|
+
return textColorVariants.link[buttonState];
|
|
116
72
|
};
|
|
117
73
|
export var getBgColor = function (_a) {
|
|
118
74
|
var customColor = _a.customColor, customVariant = _a.customVariant, buttonState = _a.buttonState, theme = _a.theme;
|
|
119
|
-
var
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
75
|
+
var bgColorVariants = {
|
|
76
|
+
light: {
|
|
77
|
+
error: {
|
|
78
|
+
default: theme.palette.red['100'],
|
|
79
|
+
hover: theme.palette.red['200'],
|
|
80
|
+
active: theme.palette.red['100'],
|
|
81
|
+
focus: theme.palette.red['100'],
|
|
82
|
+
},
|
|
83
|
+
success: {
|
|
84
|
+
default: theme.palette.green['100'],
|
|
85
|
+
hover: theme.palette.green['200'],
|
|
86
|
+
active: theme.palette.green['100'],
|
|
87
|
+
focus: theme.palette.green['100'],
|
|
88
|
+
},
|
|
89
|
+
primary: {
|
|
90
|
+
default: theme.palette.grey['100'],
|
|
91
|
+
hover: theme.palette.grey['200'],
|
|
92
|
+
active: theme.palette.primary['100'],
|
|
93
|
+
focus: theme.palette.grey['100'],
|
|
94
|
+
},
|
|
95
|
+
warning: {
|
|
96
|
+
default: theme.palette.yellow['100'],
|
|
97
|
+
hover: theme.palette.yellow['200'],
|
|
98
|
+
active: theme.palette.yellow['100'],
|
|
99
|
+
focus: theme.palette.yellow['100'],
|
|
100
|
+
},
|
|
101
|
+
},
|
|
102
|
+
contained: {
|
|
103
|
+
error: {
|
|
104
|
+
default: theme.palette.red['800'],
|
|
105
|
+
hover: theme.palette.red['700'],
|
|
106
|
+
active: theme.palette.red['900'],
|
|
107
|
+
focus: theme.palette.red['800'],
|
|
108
|
+
},
|
|
109
|
+
success: {
|
|
110
|
+
default: theme.palette.green['800'],
|
|
111
|
+
hover: theme.palette.green['700'],
|
|
112
|
+
active: theme.palette.green['900'],
|
|
113
|
+
focus: theme.palette.green['800'],
|
|
114
|
+
},
|
|
115
|
+
primary: {
|
|
116
|
+
default: theme.palette.primary['800'],
|
|
117
|
+
hover: theme.palette.primary['700'],
|
|
118
|
+
active: theme.palette.primary['900'],
|
|
119
|
+
focus: theme.palette.primary['800'],
|
|
120
|
+
},
|
|
121
|
+
warning: {
|
|
122
|
+
default: theme.palette.yellow['800'],
|
|
123
|
+
hover: theme.palette.yellow['700'],
|
|
124
|
+
active: theme.palette.yellow['900'],
|
|
125
|
+
focus: theme.palette.yellow['800'],
|
|
126
|
+
},
|
|
127
|
+
},
|
|
128
|
+
text: {
|
|
129
|
+
default: 'transparent',
|
|
130
|
+
hover: theme.palette.grey['200'],
|
|
131
|
+
active: theme.palette.primary['100'],
|
|
132
|
+
focus: 'transparent',
|
|
133
|
+
},
|
|
134
|
+
link: 'transparent',
|
|
135
|
+
};
|
|
136
|
+
if (customVariant === ButtonVariants.LIGHT && customColor) {
|
|
137
|
+
return bgColorVariants.light[customColor][buttonState];
|
|
138
|
+
}
|
|
139
|
+
if (customVariant === ButtonVariants.CONTAINED && customColor) {
|
|
140
|
+
return bgColorVariants.contained[customColor][buttonState];
|
|
141
|
+
}
|
|
142
|
+
if (customVariant === ButtonVariants.TEXT) {
|
|
143
|
+
return bgColorVariants.text[buttonState];
|
|
144
|
+
}
|
|
145
|
+
return bgColorVariants.link;
|
|
143
146
|
};
|
|
144
147
|
export var getButtonHeight = function (_a) {
|
|
145
148
|
var size = _a.size;
|
|
@@ -164,7 +167,7 @@ export var StyledButtonBase = styled(ButtonUnstyled, {
|
|
|
164
167
|
shouldForwardProp: function (prop) {
|
|
165
168
|
return prop !== 'customColor' && prop !== 'customVariant';
|
|
166
169
|
},
|
|
167
|
-
})(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n border: none;\n font-family: Ubuntu, serif;\n padding: ", ";\n height: ", ";\n border-radius: ", ";\n cursor: pointer;\n font-size: ", ";\n font-weight: ", ";\n display: inline-flex;\n align-items: center;\n justify-content: center;\n position: relative;\n\n background-color: ", ";\n color: ", ";\n\n &:hover {\n background-color: ", ";\n color: ", ";\n }\n\n &:focus {\n background-color: ", ";\n color: ", ";\n }\n\n &:active {\n background-color: ", ";\n color: ", ";\n }\n\n &.", " {\n cursor: unset;\n background-color: ", ";\n color: ", ";\n }\n"], ["\n border: none;\n font-family: Ubuntu, serif;\n padding: ", ";\n height: ", ";\n border-radius: ", ";\n cursor: pointer;\n font-size: ", ";\n font-weight: ", ";\n display: inline-flex;\n align-items: center;\n justify-content: center;\n position: relative;\n\n background-color: ", ";\n color: ", ";\n\n &:hover {\n background-color: ", ";\n color: ", ";\n }\n\n &:focus {\n background-color: ", ";\n color: ", ";\n }\n\n &:active {\n background-color: ", ";\n color: ", ";\n }\n\n &.", " {\n cursor: unset;\n background-color: ", ";\n color: ", ";\n }\n"])), getButtonPadding, getButtonHeight, function (_a) {
|
|
170
|
+
})(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n border: none;\n font-family: Ubuntu, serif;\n padding: ", ";\n height: ", ";\n border-radius: ", ";\n cursor: pointer;\n font-size: ", ";\n font-weight: ", ";\n display: inline-flex;\n align-items: center;\n justify-content: center;\n position: relative;\n\n background-color: ", ";\n color: ", ";\n\n &:hover {\n background-color: ", ";\n color: ", ";\n }\n\n &:focus {\n background-color: ", ";\n color: ", ";\n outline: 2px solid ", ";\n }\n\n &:active {\n background-color: ", ";\n color: ", ";\n outline: none;\n }\n\n &.", " {\n cursor: unset;\n background-color: ", ";\n color: ", ";\n }\n"], ["\n border: none;\n font-family: Ubuntu, serif;\n padding: ", ";\n height: ", ";\n border-radius: ", ";\n cursor: pointer;\n font-size: ", ";\n font-weight: ", ";\n display: inline-flex;\n align-items: center;\n justify-content: center;\n position: relative;\n\n background-color: ", ";\n color: ", ";\n\n &:hover {\n background-color: ", ";\n color: ", ";\n }\n\n &:focus {\n background-color: ", ";\n color: ", ";\n outline: 2px solid ", ";\n }\n\n &:active {\n background-color: ", ";\n color: ", ";\n outline: none;\n }\n\n &.", " {\n cursor: unset;\n background-color: ", ";\n color: ", ";\n }\n"])), getButtonPadding, getButtonHeight, function (_a) {
|
|
168
171
|
var theme = _a.theme;
|
|
169
172
|
return theme.shape.small;
|
|
170
173
|
}, function (_a) {
|
|
@@ -185,6 +188,9 @@ export var StyledButtonBase = styled(ButtonUnstyled, {
|
|
|
185
188
|
return getBgColor(__assign(__assign({}, props), { buttonState: ButtonStates.FOCUS }));
|
|
186
189
|
}, function (props) {
|
|
187
190
|
return getColor(__assign(__assign({}, props), { buttonState: ButtonStates.FOCUS }));
|
|
191
|
+
}, function (_a) {
|
|
192
|
+
var theme = _a.theme;
|
|
193
|
+
return theme.palette.primary['400'];
|
|
188
194
|
}, function (props) {
|
|
189
195
|
return getBgColor(__assign(__assign({}, props), { buttonState: ButtonStates.ACTIVE }));
|
|
190
196
|
}, function (props) {
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
|
+
var t = {};
|
|
14
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
|
+
t[p] = s[p];
|
|
16
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
+
t[p[i]] = s[p[i]];
|
|
20
|
+
}
|
|
21
|
+
return t;
|
|
22
|
+
};
|
|
23
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
24
|
+
import { StyledCheckbox } from './styled';
|
|
25
|
+
import { CheckedIcon, DefaultIcon, IndeterminateIcon } from './icons';
|
|
26
|
+
export var Checkbox = function (_a) {
|
|
27
|
+
var _b = _a.icon, icon = _b === void 0 ? _jsx(DefaultIcon, {}, void 0) : _b, _c = _a.checkedIcon, checkedIcon = _c === void 0 ? _jsx(CheckedIcon, {}, void 0) : _c, _d = _a.indeterminateIcon, indeterminateIcon = _d === void 0 ? _jsx(IndeterminateIcon, {}, void 0) : _d, props = __rest(_a, ["icon", "checkedIcon", "indeterminateIcon"]);
|
|
28
|
+
return (_jsx(StyledCheckbox, __assign({ icon: icon, checkedIcon: checkedIcon, indeterminateIcon: indeterminateIcon }, props), void 0));
|
|
29
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { SvgIconProps } from '@mui/material';
|
|
3
|
+
export declare const DefaultIcon: React.FunctionComponent<SvgIconProps>;
|
|
4
|
+
export declare const CheckedIcon: React.FunctionComponent<SvgIconProps>;
|
|
5
|
+
export declare const IndeterminateIcon: React.FunctionComponent<SvgIconProps>;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
|
+
var t = {};
|
|
14
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
|
+
t[p] = s[p];
|
|
16
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
+
t[p[i]] = s[p[i]];
|
|
20
|
+
}
|
|
21
|
+
return t;
|
|
22
|
+
};
|
|
23
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
24
|
+
import { SvgIcon } from '@mui/material';
|
|
25
|
+
export var DefaultIcon = function (_a) {
|
|
26
|
+
var props = __rest(_a, []);
|
|
27
|
+
return (_jsxs(SvgIcon, __assign({ viewBox: "0 0 14 14" }, props, { children: [_jsx("path", { d: "M0 3C0 1.34315 1.34315 0 3 0H11C12.6569 0 14 1.34315 14 3V11C14 12.6569 12.6569 14 11 14H3C1.34315 14 0 12.6569 0 11V3Z" }, void 0), _jsx("path", { className: "MuiSvgIcon-border", fillRule: "evenodd", clipRule: "evenodd", d: "M11 2H3C2.44772 2 2 2.44772 2 3V11C2 11.5523 2.44772 12 3 12H11C11.5523 12 12 11.5523 12 11V3C12 2.44772 11.5523 2 11 2ZM3 0C1.34315 0 0 1.34315 0 3V11C0 12.6569 1.34315 14 3 14H11C12.6569 14 14 12.6569 14 11V3C14 1.34315 12.6569 0 11 0H3Z" }, void 0)] }), void 0));
|
|
28
|
+
};
|
|
29
|
+
export var CheckedIcon = function (_a) {
|
|
30
|
+
var props = __rest(_a, []);
|
|
31
|
+
return (_jsxs(SvgIcon, __assign({ viewBox: "0 0 14 14" }, props, { children: [_jsx("rect", { width: "14", height: "14", rx: "3" }, void 0), _jsx("path", { className: "MuiSvgIcon-mark", fillRule: "evenodd", clipRule: "evenodd", d: "M4.71402 6.30066C4.62206 6.20534 4.51205 6.12931 4.39042 6.07701C4.26879 6.0247 4.13797 5.99717 4.0056 5.99602C3.87323 5.99487 3.74195 6.02012 3.61943 6.0703C3.49691 6.12048 3.3856 6.19458 3.292 6.28829C3.19839 6.38199 3.12437 6.49342 3.07424 6.61607C3.02411 6.73872 2.99889 6.87013 3.00004 7.00265C3.00119 7.13516 3.02869 7.26612 3.08094 7.38787C3.13319 7.50963 3.20914 7.61976 3.30435 7.71182L5.29823 9.7078C5.48518 9.8949 5.73871 10 6.00306 10C6.26741 10 6.52094 9.8949 6.7079 9.7078L10.6956 5.71584C10.7909 5.62377 10.8668 5.51365 10.9191 5.39189C10.9713 5.27013 10.9988 5.13918 11 5.00666C11.0011 4.87415 10.9759 4.74274 10.9258 4.62009C10.8756 4.49744 10.8016 4.38601 10.708 4.29231C10.6144 4.1986 10.5031 4.1245 10.3806 4.07432C10.258 4.02414 10.1268 3.99889 9.9944 4.00004C9.86203 4.00119 9.73121 4.02872 9.60958 4.08102C9.48795 4.13333 9.37794 4.20936 9.28598 4.30468L6.00306 7.59106L4.71402 6.30066V6.30066Z" }, void 0)] }), void 0));
|
|
32
|
+
};
|
|
33
|
+
export var IndeterminateIcon = function (_a) {
|
|
34
|
+
var props = __rest(_a, []);
|
|
35
|
+
return (_jsxs(SvgIcon, __assign({ viewBox: "0 0 14 14" }, props, { children: [_jsx("rect", { width: "14", height: "14", rx: "3" }, void 0), _jsx("path", { className: "MuiSvgIcon-mark", d: "M10 6H4C3.44772 6 3 6.44772 3 7C3 7.55228 3.44772 8 4 8H10C10.5523 8 11 7.55228 11 7C11 6.44772 10.5523 6 10 6Z" }, void 0)] }), void 0));
|
|
36
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
2
|
+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
3
|
+
return cooked;
|
|
4
|
+
};
|
|
5
|
+
import { Checkbox } from '@mui/material';
|
|
6
|
+
import { styled } from '../styles';
|
|
7
|
+
export var StyledCheckbox = styled(Checkbox)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n padding: 5px;\n border-radius: unset;\n color: ", ";\n\n &:hover {\n color: ", ";\n }\n\n & .MuiSvgIcon-border {\n color: ", ";\n }\n\n & > svg {\n width: 1rem;\n height: 1rem;\n }\n\n &.Mui-disabled {\n color: ", ";\n & .MuiSvgIcon-border {\n color: currentColor;\n }\n }\n\n &.Mui-checked,\n &.MuiCheckbox-indeterminate {\n color: ", ";\n\n &:hover {\n color: ", ";\n }\n\n &.Mui-disabled {\n color: ", ";\n }\n\n & .MuiSvgIcon-mark {\n color: ", ";\n }\n }\n"], ["\n padding: 5px;\n border-radius: unset;\n color: ", ";\n\n &:hover {\n color: ", ";\n }\n\n & .MuiSvgIcon-border {\n color: ", ";\n }\n\n & > svg {\n width: 1rem;\n height: 1rem;\n }\n\n &.Mui-disabled {\n color: ", ";\n & .MuiSvgIcon-border {\n color: currentColor;\n }\n }\n\n &.Mui-checked,\n &.MuiCheckbox-indeterminate {\n color: ", ";\n\n &:hover {\n color: ", ";\n }\n\n &.Mui-disabled {\n color: ", ";\n }\n\n & .MuiSvgIcon-mark {\n color: ", ";\n }\n }\n"])), function (_a) {
|
|
8
|
+
var theme = _a.theme;
|
|
9
|
+
return theme.palette.background.element;
|
|
10
|
+
}, function (_a) {
|
|
11
|
+
var theme = _a.theme;
|
|
12
|
+
return theme.palette.grey[100];
|
|
13
|
+
}, function (_a) {
|
|
14
|
+
var theme = _a.theme;
|
|
15
|
+
return theme.palette.grey[300];
|
|
16
|
+
}, function (_a) {
|
|
17
|
+
var theme = _a.theme;
|
|
18
|
+
return theme.palette.grey[200];
|
|
19
|
+
}, function (_a) {
|
|
20
|
+
var theme = _a.theme;
|
|
21
|
+
return theme.palette.primary.main;
|
|
22
|
+
}, function (_a) {
|
|
23
|
+
var theme = _a.theme;
|
|
24
|
+
return theme.palette.primary[700];
|
|
25
|
+
}, function (_a) {
|
|
26
|
+
var theme = _a.theme;
|
|
27
|
+
return theme.palette.grey[500];
|
|
28
|
+
}, function (_a) {
|
|
29
|
+
var theme = _a.theme;
|
|
30
|
+
return theme.palette.common.white;
|
|
31
|
+
});
|
|
32
|
+
var templateObject_1;
|
|
File without changes
|
|
@@ -21,9 +21,10 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
21
21
|
return t;
|
|
22
22
|
};
|
|
23
23
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
24
|
+
import { CircularProgressSizes } from './constants';
|
|
24
25
|
import { StyledCircularProgress } from './styled';
|
|
25
26
|
export var CircularProgress = function (_a) {
|
|
26
27
|
var color = _a.color, size = _a.size, props = __rest(_a, ["color", "size"]);
|
|
27
|
-
return (_jsx(StyledCircularProgress, __assign({}, props, {
|
|
28
|
+
return (_jsx(StyledCircularProgress, __assign({}, props, { size: size === CircularProgressSizes.SMALL ? 16 : 24, customColor: color }), void 0));
|
|
28
29
|
};
|
|
29
30
|
export default CircularProgress;
|
|
@@ -4,5 +4,4 @@ export declare const StyledCircularProgress: import("@emotion/styled").StyledCom
|
|
|
4
4
|
theme?: Theme | undefined;
|
|
5
5
|
} & Omit<CircularProgressProps, "color" | "size"> & {
|
|
6
6
|
customColor?: "primary" | "inverted" | undefined;
|
|
7
|
-
customSize?: "number" | "medium" | "small" | undefined;
|
|
8
7
|
}, {}, {}>;
|
|
@@ -4,20 +4,14 @@ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cook
|
|
|
4
4
|
};
|
|
5
5
|
import { CircularProgress } from '@mui/material';
|
|
6
6
|
import { styled } from '../styles';
|
|
7
|
-
import { CircularProgressColors
|
|
7
|
+
import { CircularProgressColors } from './constants';
|
|
8
8
|
var getColor = function (_a) {
|
|
9
9
|
var theme = _a.theme, customColor = _a.customColor;
|
|
10
10
|
if (customColor === CircularProgressColors.PRIMARY)
|
|
11
11
|
return theme.palette.primary.dark;
|
|
12
12
|
return theme.palette.primary.contrastText;
|
|
13
13
|
};
|
|
14
|
-
var getCircularProgressSize = function (_a) {
|
|
15
|
-
var customSize = _a.customSize;
|
|
16
|
-
if (customSize === CircularProgressSizes.SMALL)
|
|
17
|
-
return '16px';
|
|
18
|
-
return '24px';
|
|
19
|
-
};
|
|
20
14
|
export var StyledCircularProgress = styled(CircularProgress, {
|
|
21
|
-
shouldForwardProp: function (prop) { return prop !== 'customColor'
|
|
22
|
-
})(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n
|
|
15
|
+
shouldForwardProp: function (prop) { return prop !== 'customColor'; },
|
|
16
|
+
})(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n color: ", ";\n"], ["\n color: ", ";\n"])), function (props) { return getColor(props); });
|
|
23
17
|
var templateObject_1;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
|
+
var t = {};
|
|
14
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
|
+
t[p] = s[p];
|
|
16
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
+
t[p[i]] = s[p[i]];
|
|
20
|
+
}
|
|
21
|
+
return t;
|
|
22
|
+
};
|
|
23
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
24
|
+
import { StyledFormControlLabel } from './styled';
|
|
25
|
+
export var FormControlLabel = function (_a) {
|
|
26
|
+
var props = __rest(_a, []);
|
|
27
|
+
return _jsx(StyledFormControlLabel, __assign({}, props), void 0);
|
|
28
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
2
|
+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
3
|
+
return cooked;
|
|
4
|
+
};
|
|
5
|
+
import { FormControlLabel } from '@mui/material';
|
|
6
|
+
import { styled } from '../styles';
|
|
7
|
+
export var StyledFormControlLabel = styled(FormControlLabel)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n margin-left: -5px;\n margin-right: 0;\n & .MuiFormControlLabel-label {\n margin-left: ", ";\n }\n"], ["\n margin-left: -5px;\n margin-right: 0;\n & .MuiFormControlLabel-label {\n margin-left: ", ";\n }\n"])), function (_a) {
|
|
8
|
+
var theme = _a.theme;
|
|
9
|
+
return theme.spacing(1);
|
|
10
|
+
});
|
|
11
|
+
var templateObject_1;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|