@astral/ui 0.1.0 → 0.2.3
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/index.d.ts +1 -0
- package/esm/index.js +1 -0
- package/esm/src/Badge/Badge.d.ts +4 -0
- package/esm/src/Badge/Badge.js +29 -0
- package/esm/src/Badge/index.d.ts +2 -0
- package/esm/src/Badge/index.js +2 -0
- package/esm/src/Badge/styled.d.ts +50 -0
- package/esm/src/Badge/styled.js +60 -0
- package/esm/src/Badge/types.d.ts +5 -0
- package/esm/src/Badge/types.js +1 -0
- package/esm/src/Button/Button.d.ts +3 -0
- package/esm/src/Button/Button.js +29 -0
- package/esm/src/Button/index.d.ts +2 -0
- package/esm/src/Button/index.js +2 -0
- package/esm/src/Button/styled.d.ts +13 -0
- package/esm/src/Button/styled.js +33 -0
- package/esm/src/Button/types.d.ts +7 -0
- package/esm/src/Button/types.js +1 -0
- package/esm/src/ButtonBase/ButtonBase.d.ts +3 -0
- package/esm/src/ButtonBase/ButtonBase.js +29 -0
- package/esm/src/ButtonBase/constants.d.ts +22 -0
- package/esm/src/ButtonBase/constants.js +26 -0
- package/esm/src/ButtonBase/index.d.ts +3 -0
- package/esm/src/ButtonBase/index.js +3 -0
- package/esm/src/ButtonBase/styled.d.ts +27 -0
- package/esm/src/ButtonBase/styled.js +202 -0
- package/esm/src/ButtonBase/types.d.ts +11 -0
- package/esm/src/ButtonBase/types.js +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 +4 -0
- package/esm/src/CircularProgress/CircularProgress.js +30 -0
- package/esm/src/CircularProgress/constants.d.ts +8 -0
- package/esm/src/CircularProgress/constants.js +10 -0
- package/esm/src/CircularProgress/index.d.ts +2 -0
- package/esm/src/CircularProgress/index.js +2 -0
- package/esm/src/CircularProgress/styled.d.ts +7 -0
- package/esm/src/CircularProgress/styled.js +17 -0
- package/esm/src/CircularProgress/types.d.ts +8 -0
- package/esm/src/CircularProgress/types.js +1 -0
- 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 +3 -0
- package/esm/src/IconButton/IconButton.js +28 -0
- package/esm/src/IconButton/index.d.ts +1 -0
- package/esm/src/IconButton/index.js +1 -0
- package/esm/src/IconButton/styled.d.ts +19 -0
- package/esm/src/IconButton/styled.js +21 -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.d.ts +7 -0
- package/esm/src/ThemeProvider/ThemeProvider.js +19 -0
- package/esm/src/ThemeProvider/index.d.ts +1 -0
- package/esm/src/ThemeProvider/index.js +1 -0
- package/esm/src/Typography/Typography.d.ts +8 -0
- package/esm/src/Typography/Typography.js +29 -0
- package/esm/src/Typography/index.d.ts +1 -0
- package/esm/src/Typography/index.js +1 -0
- package/esm/src/index.d.ts +18 -0
- package/esm/src/index.js +18 -0
- package/esm/src/styles/index.d.ts +1 -0
- package/esm/src/styles/index.js +1 -0
- package/esm/src/styles/styled/index.d.ts +1 -0
- package/esm/src/styles/styled/index.js +1 -0
- package/esm/src/styles/styled/styled.d.ts +2 -0
- package/esm/src/styles/styled/styled.js +2 -0
- package/esm/src/styles/styled/types.d.ts +48 -0
- package/esm/src/styles/styled/types.js +1 -0
- package/esm/src/theme/__tests__/BaseTheme.test.d.ts +1 -0
- package/esm/src/theme/__tests__/BaseTheme.test.js +54 -0
- package/esm/src/theme/baseTheme.d.ts +28 -0
- package/esm/src/theme/baseTheme.js +19 -0
- 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/components.d.ts +21 -0
- 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/constants.d.ts +9 -0
- package/esm/src/theme/constants.js +10 -0
- package/esm/src/theme/elevation.d.ts +8 -0
- package/esm/src/theme/elevation.js +7 -0
- 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 +6 -0
- package/esm/src/theme/index.js +6 -0
- package/esm/src/theme/palette/brandPalette.d.ts +15 -0
- package/esm/src/theme/palette/brandPalette.js +82 -0
- package/esm/src/theme/palette/index.d.ts +2 -0
- package/esm/src/theme/palette/index.js +2 -0
- package/esm/src/theme/palette/palette.d.ts +29 -0
- package/esm/src/theme/palette/palette.js +104 -0
- package/esm/src/theme/shape.d.ts +6 -0
- package/esm/src/theme/shape.js +5 -0
- package/esm/src/theme/typography.d.ts +19 -0
- package/esm/src/theme/typography.js +108 -0
- package/node/index.d.ts +1 -0
- package/node/index.js +13 -0
- package/node/src/Badge/Badge.d.ts +4 -0
- package/node/src/Badge/Badge.js +31 -0
- package/node/src/Badge/index.d.ts +2 -0
- package/node/src/Badge/index.js +14 -0
- package/node/src/Badge/styled.d.ts +50 -0
- package/node/src/Badge/styled.js +63 -0
- package/node/src/Badge/types.d.ts +5 -0
- package/node/src/Badge/types.js +2 -0
- package/node/src/Button/Button.d.ts +3 -0
- package/node/src/Button/Button.js +33 -0
- package/node/src/Button/index.d.ts +2 -0
- package/node/src/Button/index.js +14 -0
- package/node/src/Button/styled.d.ts +13 -0
- package/node/src/Button/styled.js +36 -0
- package/node/src/Button/types.d.ts +7 -0
- package/node/src/Button/types.js +2 -0
- package/node/src/ButtonBase/ButtonBase.d.ts +3 -0
- package/node/src/ButtonBase/ButtonBase.js +33 -0
- package/node/src/ButtonBase/constants.d.ts +22 -0
- package/node/src/ButtonBase/constants.js +29 -0
- package/node/src/ButtonBase/index.d.ts +3 -0
- package/node/src/ButtonBase/index.js +15 -0
- package/node/src/ButtonBase/styled.d.ts +27 -0
- package/node/src/ButtonBase/styled.js +229 -0
- package/node/src/ButtonBase/types.d.ts +11 -0
- package/node/src/ButtonBase/types.js +2 -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/node/src/Checkbox/types.js +2 -0
- package/node/src/CircularProgress/CircularProgress.d.ts +4 -0
- package/node/src/CircularProgress/CircularProgress.js +34 -0
- package/node/src/CircularProgress/constants.d.ts +8 -0
- package/node/src/CircularProgress/constants.js +13 -0
- package/node/src/CircularProgress/index.d.ts +2 -0
- package/node/src/CircularProgress/index.js +14 -0
- package/node/src/CircularProgress/styled.d.ts +7 -0
- package/node/src/CircularProgress/styled.js +20 -0
- package/node/src/CircularProgress/types.d.ts +8 -0
- package/node/src/CircularProgress/types.js +2 -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/node/src/IconButton/IconButton.d.ts +3 -0
- package/node/src/IconButton/IconButton.js +32 -0
- package/node/src/IconButton/index.d.ts +1 -0
- package/node/src/IconButton/index.js +13 -0
- package/node/src/IconButton/styled.d.ts +19 -0
- package/node/src/IconButton/styled.js +25 -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/node/src/ThemeProvider/ThemeProvider.d.ts +7 -0
- package/node/src/ThemeProvider/ThemeProvider.js +23 -0
- package/node/src/ThemeProvider/index.d.ts +1 -0
- package/node/src/ThemeProvider/index.js +13 -0
- package/node/src/Typography/Typography.d.ts +8 -0
- package/node/src/Typography/Typography.js +36 -0
- package/node/src/Typography/index.d.ts +1 -0
- package/node/src/Typography/index.js +13 -0
- package/node/src/index.d.ts +18 -0
- package/node/src/index.js +30 -0
- package/node/src/styles/index.d.ts +1 -0
- package/node/src/styles/index.js +13 -0
- package/node/src/styles/styled/index.d.ts +1 -0
- package/node/src/styles/styled/index.js +13 -0
- package/node/src/styles/styled/styled.d.ts +2 -0
- package/node/src/styles/styled/styled.js +8 -0
- package/node/src/styles/styled/types.d.ts +48 -0
- package/node/src/styles/styled/types.js +2 -0
- package/node/src/theme/__tests__/BaseTheme.test.d.ts +1 -0
- package/node/src/theme/__tests__/BaseTheme.test.js +56 -0
- package/node/src/theme/baseTheme.d.ts +28 -0
- package/node/src/theme/baseTheme.js +23 -0
- 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/node/src/theme/components/components.d.ts +21 -0
- 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/node/src/theme/constants.d.ts +9 -0
- package/node/src/theme/constants.js +13 -0
- package/node/src/theme/elevation.d.ts +8 -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/node/src/theme/index.d.ts +6 -0
- package/node/src/theme/index.js +18 -0
- package/node/src/theme/palette/brandPalette.d.ts +15 -0
- package/node/src/theme/palette/brandPalette.js +85 -0
- package/node/src/theme/palette/index.d.ts +2 -0
- package/node/src/theme/palette/index.js +14 -0
- package/node/src/theme/palette/palette.d.ts +29 -0
- package/node/src/theme/palette/palette.js +108 -0
- package/node/src/theme/shape.d.ts +6 -0
- package/node/src/theme/shape.js +8 -0
- package/node/src/theme/typography.d.ts +19 -0
- package/node/src/theme/typography.js +112 -0
- package/package.json +7 -12
|
@@ -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,82 @@
|
|
|
1
|
+
var _a;
|
|
2
|
+
import { Brand } from '../constants';
|
|
3
|
+
var defaultBrandPalette = {
|
|
4
|
+
secondary: '#55B8F0',
|
|
5
|
+
900: '#0F52B8',
|
|
6
|
+
800: '#2165CC',
|
|
7
|
+
700: '#1874FF',
|
|
8
|
+
600: '#2684FF',
|
|
9
|
+
500: '#4C9AFF',
|
|
10
|
+
400: '#70AEFF',
|
|
11
|
+
300: '#94C2FF',
|
|
12
|
+
200: '#C5DCFF',
|
|
13
|
+
100: '#E1EDFF',
|
|
14
|
+
};
|
|
15
|
+
var edoPalette = {
|
|
16
|
+
secondary: '#5653FF',
|
|
17
|
+
900: '#5D3FD4',
|
|
18
|
+
800: '#6746EB',
|
|
19
|
+
700: '#8566FF',
|
|
20
|
+
600: '#9D85FF',
|
|
21
|
+
500: '#9D85FF',
|
|
22
|
+
400: '#B29EFF',
|
|
23
|
+
300: '#C2B2FF',
|
|
24
|
+
200: '#E0D9FF',
|
|
25
|
+
100: '#EFEBFF',
|
|
26
|
+
};
|
|
27
|
+
var ao5Palette = {
|
|
28
|
+
secondary: '#14A5D3',
|
|
29
|
+
900: '#0068B2',
|
|
30
|
+
800: '#0074C6',
|
|
31
|
+
700: '#0989E3',
|
|
32
|
+
600: '#2195E6',
|
|
33
|
+
500: '#3AA1E9',
|
|
34
|
+
400: '#52ACEB',
|
|
35
|
+
300: '#84C4F1',
|
|
36
|
+
200: '#C1E2F8',
|
|
37
|
+
100: '#DFF0FB',
|
|
38
|
+
};
|
|
39
|
+
var ofdPalette = {
|
|
40
|
+
secondary: '#22BDEE',
|
|
41
|
+
900: '#1F78D6',
|
|
42
|
+
800: '#2285EE',
|
|
43
|
+
700: '#46A0FF',
|
|
44
|
+
600: '#58A9FF',
|
|
45
|
+
500: '#6BB3FF',
|
|
46
|
+
400: '#7DBCFF',
|
|
47
|
+
300: '#A2CFFF',
|
|
48
|
+
200: '#D1E7FF',
|
|
49
|
+
100: '#E7F3FF',
|
|
50
|
+
};
|
|
51
|
+
var signPalette = {
|
|
52
|
+
secondary: '#4099AC',
|
|
53
|
+
900: '#325D89',
|
|
54
|
+
800: '#376798',
|
|
55
|
+
700: '#4D86BF',
|
|
56
|
+
600: '#5E92C5',
|
|
57
|
+
500: '#719ECC',
|
|
58
|
+
400: '#82AAD2',
|
|
59
|
+
300: '#A6C2DF',
|
|
60
|
+
200: '#D3E1EF',
|
|
61
|
+
100: '#E8EFF7',
|
|
62
|
+
};
|
|
63
|
+
var lkpPalette = {
|
|
64
|
+
secondary: '#00BDB2',
|
|
65
|
+
900: '#009E71',
|
|
66
|
+
800: '#00B07E',
|
|
67
|
+
700: '#2CC89B',
|
|
68
|
+
600: '#41CDA5',
|
|
69
|
+
500: '#56D3AF',
|
|
70
|
+
400: '#6BD8B9',
|
|
71
|
+
300: '#95E3CD',
|
|
72
|
+
200: '#CAF1E6',
|
|
73
|
+
100: '#E3F8F2',
|
|
74
|
+
};
|
|
75
|
+
export var brandPalette = (_a = {},
|
|
76
|
+
_a[Brand.DEFAULT] = defaultBrandPalette,
|
|
77
|
+
_a[Brand.AO5] = ao5Palette,
|
|
78
|
+
_a[Brand.EDO] = edoPalette,
|
|
79
|
+
_a[Brand.OFD] = ofdPalette,
|
|
80
|
+
_a[Brand.SIGN] = signPalette,
|
|
81
|
+
_a[Brand.LKP] = lkpPalette,
|
|
82
|
+
_a);
|
|
@@ -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,104 @@
|
|
|
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
|
+
import { Brand } from '../constants';
|
|
13
|
+
import { brandPalette } from './brandPalette';
|
|
14
|
+
export var getPalette = function (brand) {
|
|
15
|
+
if (brand === void 0) { brand = Brand.DEFAULT; }
|
|
16
|
+
var brandColors = brandPalette[brand];
|
|
17
|
+
return {
|
|
18
|
+
red: {
|
|
19
|
+
900: '#E64343',
|
|
20
|
+
800: '#F24646',
|
|
21
|
+
700: '#F35959',
|
|
22
|
+
600: '#F67E7E',
|
|
23
|
+
500: '#F79090',
|
|
24
|
+
400: '#F8A3A3',
|
|
25
|
+
300: '#FAB5B5',
|
|
26
|
+
200: '#FCDADA',
|
|
27
|
+
100: '#FEEDED',
|
|
28
|
+
},
|
|
29
|
+
green: {
|
|
30
|
+
900: '#008055',
|
|
31
|
+
800: '#00875A',
|
|
32
|
+
700: '#19936A',
|
|
33
|
+
600: '#4DAB8C',
|
|
34
|
+
500: '#66B79C',
|
|
35
|
+
400: '#80C3AC',
|
|
36
|
+
300: '#99CFBD',
|
|
37
|
+
200: '#CCE7DE',
|
|
38
|
+
100: '#E6F3EF',
|
|
39
|
+
},
|
|
40
|
+
yellow: {
|
|
41
|
+
900: '#ED8000',
|
|
42
|
+
800: '#F98700',
|
|
43
|
+
700: '#FA961F',
|
|
44
|
+
600: '#FBAB4D',
|
|
45
|
+
500: '#FBB766',
|
|
46
|
+
400: '#FDCF99',
|
|
47
|
+
300: '#FDDBB2',
|
|
48
|
+
200: '#FBE6CC',
|
|
49
|
+
100: '#FEF3E6',
|
|
50
|
+
},
|
|
51
|
+
primary: __assign({ main: brandColors[800], dark: brandColors[900], contrastText: '#FFF' }, brandColors),
|
|
52
|
+
secondary: {
|
|
53
|
+
main: brandColors.secondary,
|
|
54
|
+
dark: brandColors[900],
|
|
55
|
+
contrastText: '#FFF',
|
|
56
|
+
},
|
|
57
|
+
get success() {
|
|
58
|
+
return {
|
|
59
|
+
light: this.green[100],
|
|
60
|
+
main: this.green[600],
|
|
61
|
+
dark: this.green[800],
|
|
62
|
+
contrastText: '#FFF',
|
|
63
|
+
};
|
|
64
|
+
},
|
|
65
|
+
get warning() {
|
|
66
|
+
return {
|
|
67
|
+
light: this.yellow[100],
|
|
68
|
+
main: this.yellow[600],
|
|
69
|
+
dark: this.yellow[800],
|
|
70
|
+
contrastText: '#FFF',
|
|
71
|
+
};
|
|
72
|
+
},
|
|
73
|
+
get error() {
|
|
74
|
+
return {
|
|
75
|
+
light: this.red[100],
|
|
76
|
+
main: this.red[600],
|
|
77
|
+
dark: this.red[800],
|
|
78
|
+
contrastText: '#FFF',
|
|
79
|
+
};
|
|
80
|
+
},
|
|
81
|
+
text: {
|
|
82
|
+
primary: '#072D57',
|
|
83
|
+
secondary: '#072D57',
|
|
84
|
+
disabled: '#99A9BA',
|
|
85
|
+
},
|
|
86
|
+
grey: {
|
|
87
|
+
900: '#072D57',
|
|
88
|
+
800: '#1D3F66',
|
|
89
|
+
700: '#557192',
|
|
90
|
+
600: '#778DA8',
|
|
91
|
+
500: '#99A9BA',
|
|
92
|
+
400: '#B7C2CE',
|
|
93
|
+
300: '#DDE2E8',
|
|
94
|
+
200: '#EBEEF1',
|
|
95
|
+
100: '#F0F4F7',
|
|
96
|
+
},
|
|
97
|
+
background: {
|
|
98
|
+
default: '#FFF',
|
|
99
|
+
paper: '#FFF',
|
|
100
|
+
element: '#FAFBFC',
|
|
101
|
+
elementHover: '#EBECF0',
|
|
102
|
+
},
|
|
103
|
+
};
|
|
104
|
+
};
|
|
@@ -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 {};
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
var HTML_FONT_SIZE = 14;
|
|
2
|
+
// Т.к. нет досутпа к теме, написал функцию для конвертации px в rem
|
|
3
|
+
export var pxToRem = function (fontSize, htmlFontSize) {
|
|
4
|
+
if (htmlFontSize === void 0) { htmlFontSize = HTML_FONT_SIZE; }
|
|
5
|
+
return "".concat(fontSize / htmlFontSize, "rem");
|
|
6
|
+
};
|
|
7
|
+
export var typography = {
|
|
8
|
+
fontSize: 14,
|
|
9
|
+
htmlFontSize: 14,
|
|
10
|
+
fontWeightLight: 300,
|
|
11
|
+
fontWeightRegular: 400,
|
|
12
|
+
fontWeightMedium: 500,
|
|
13
|
+
fontWeightBold: 700,
|
|
14
|
+
fontFamily: ['Ubuntu', 'sans-serif'].join(','),
|
|
15
|
+
get h1() {
|
|
16
|
+
return {
|
|
17
|
+
fontSize: pxToRem(35, this.htmlFontSize),
|
|
18
|
+
fontWeight: this.fontWeightMedium,
|
|
19
|
+
};
|
|
20
|
+
},
|
|
21
|
+
get h2() {
|
|
22
|
+
return {
|
|
23
|
+
fontSize: pxToRem(29, this.htmlFontSize),
|
|
24
|
+
fontWeight: this.fontWeightMedium,
|
|
25
|
+
};
|
|
26
|
+
},
|
|
27
|
+
get h3() {
|
|
28
|
+
return {
|
|
29
|
+
fontSize: pxToRem(24, this.htmlFontSize),
|
|
30
|
+
fontWeight: this.fontWeightMedium,
|
|
31
|
+
};
|
|
32
|
+
},
|
|
33
|
+
get h4() {
|
|
34
|
+
return {
|
|
35
|
+
fontSize: pxToRem(20, this.htmlFontSize),
|
|
36
|
+
fontWeight: this.fontWeightMedium,
|
|
37
|
+
};
|
|
38
|
+
},
|
|
39
|
+
get h5() {
|
|
40
|
+
return {
|
|
41
|
+
fontSize: pxToRem(16, this.htmlFontSize),
|
|
42
|
+
fontWeight: this.fontWeightMedium,
|
|
43
|
+
};
|
|
44
|
+
},
|
|
45
|
+
get h6() {
|
|
46
|
+
return {
|
|
47
|
+
fontSize: pxToRem(14, this.htmlFontSize),
|
|
48
|
+
fontWeight: this.fontWeightMedium,
|
|
49
|
+
};
|
|
50
|
+
},
|
|
51
|
+
get h7() {
|
|
52
|
+
return {
|
|
53
|
+
fontSize: pxToRem(12, this.htmlFontSize),
|
|
54
|
+
fontWeight: this.fontWeightMedium,
|
|
55
|
+
};
|
|
56
|
+
},
|
|
57
|
+
get h8() {
|
|
58
|
+
return {
|
|
59
|
+
fontSize: pxToRem(12, this.htmlFontSize),
|
|
60
|
+
fontWeight: this.fontWeightMedium,
|
|
61
|
+
};
|
|
62
|
+
},
|
|
63
|
+
get h9() {
|
|
64
|
+
return {
|
|
65
|
+
fontSize: pxToRem(11, this.htmlFontSize),
|
|
66
|
+
fontWeight: this.fontWeightBold,
|
|
67
|
+
};
|
|
68
|
+
},
|
|
69
|
+
get button() {
|
|
70
|
+
return {
|
|
71
|
+
fontSize: pxToRem(14, this.htmlFontSize),
|
|
72
|
+
fontWeight: this.fontWeightMedium,
|
|
73
|
+
};
|
|
74
|
+
},
|
|
75
|
+
get ui() {
|
|
76
|
+
return {
|
|
77
|
+
fontSize: pxToRem(14, this.htmlFontSize),
|
|
78
|
+
fontWeight: this.fontWeightRegular,
|
|
79
|
+
};
|
|
80
|
+
},
|
|
81
|
+
get link() {
|
|
82
|
+
return {
|
|
83
|
+
fontSize: pxToRem(14, this.htmlFontSize),
|
|
84
|
+
fontWeight: this.fontWeightRegular,
|
|
85
|
+
};
|
|
86
|
+
},
|
|
87
|
+
get pointer() {
|
|
88
|
+
return {
|
|
89
|
+
fontSize: pxToRem(12, this.htmlFontSize),
|
|
90
|
+
fontWeight: this.fontWeightMedium,
|
|
91
|
+
};
|
|
92
|
+
},
|
|
93
|
+
get small() {
|
|
94
|
+
return {
|
|
95
|
+
fontSize: pxToRem(12, this.htmlFontSize),
|
|
96
|
+
fontWeight: this.fontWeightRegular,
|
|
97
|
+
};
|
|
98
|
+
},
|
|
99
|
+
get code() {
|
|
100
|
+
return {
|
|
101
|
+
fontSize: pxToRem(12, this.htmlFontSize),
|
|
102
|
+
fontWeight: this.fontWeightLight,
|
|
103
|
+
};
|
|
104
|
+
},
|
|
105
|
+
body1: {
|
|
106
|
+
fontSize: '1rem',
|
|
107
|
+
},
|
|
108
|
+
};
|
package/node/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './src';
|
package/node/index.js
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
|
+
};
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
__exportStar(require("./src"), exports);
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
14
|
+
var t = {};
|
|
15
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
16
|
+
t[p] = s[p];
|
|
17
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
18
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
19
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
20
|
+
t[p[i]] = s[p[i]];
|
|
21
|
+
}
|
|
22
|
+
return t;
|
|
23
|
+
};
|
|
24
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
26
|
+
var styled_1 = require("./styled");
|
|
27
|
+
var Badge = function (_a) {
|
|
28
|
+
var children = _a.children, color = _a.color, props = __rest(_a, ["children", "color"]);
|
|
29
|
+
return ((0, jsx_runtime_1.jsx)(styled_1.StyledBadge, __assign({ customColor: color }, props, { max: 99 }, { children: children }), void 0));
|
|
30
|
+
};
|
|
31
|
+
exports.default = Badge;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
|
+
};
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
__exportStar(require("./Badge"), exports);
|
|
14
|
+
__exportStar(require("./types"), exports);
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { Theme } from '../theme';
|
|
3
|
+
import { BadgeColor, BadgeProps } from './types';
|
|
4
|
+
export declare const StyledBadge: import("@emotion/styled").StyledComponent<{
|
|
5
|
+
classes?: (Partial<import("@mui/material").BadgeUnstyledClasses> & {
|
|
6
|
+
colorPrimary?: string | undefined;
|
|
7
|
+
colorSecondary?: string | undefined;
|
|
8
|
+
colorError?: string | undefined;
|
|
9
|
+
colorInfo?: string | undefined;
|
|
10
|
+
colorSuccess?: string | undefined;
|
|
11
|
+
colorWarning?: string | undefined;
|
|
12
|
+
anchorOriginTopRightRectangular?: string | undefined;
|
|
13
|
+
anchorOriginBottomRightRectangular?: string | undefined;
|
|
14
|
+
anchorOriginTopLeftRectangular?: string | undefined;
|
|
15
|
+
anchorOriginBottomLeftRectangular?: string | undefined;
|
|
16
|
+
anchorOriginTopRightCircular?: string | undefined;
|
|
17
|
+
anchorOriginBottomRightCircular?: string | undefined;
|
|
18
|
+
anchorOriginTopLeftCircular?: string | undefined;
|
|
19
|
+
anchorOriginBottomLeftCircular?: string | undefined;
|
|
20
|
+
overlapRectangular?: string | undefined;
|
|
21
|
+
overlapCircular?: string | undefined;
|
|
22
|
+
}) | undefined;
|
|
23
|
+
color?: "primary" | "secondary" | "default" | "error" | "warning" | "info" | "success" | undefined;
|
|
24
|
+
overlap?: "circular" | "rectangular" | undefined;
|
|
25
|
+
sx?: import("@mui/material").SxProps<import("@mui/material").Theme> | undefined;
|
|
26
|
+
variant?: "standard" | "dot" | undefined;
|
|
27
|
+
} & {
|
|
28
|
+
anchorOrigin?: import("@mui/material").BadgeOrigin | undefined;
|
|
29
|
+
components?: {
|
|
30
|
+
Root?: import("react").ElementType<any> | undefined;
|
|
31
|
+
Badge?: import("react").ElementType<any> | undefined;
|
|
32
|
+
} | undefined;
|
|
33
|
+
componentsProps?: {
|
|
34
|
+
root?: (import("react").HTMLAttributes<HTMLSpanElement> & import("@mui/material").BadgeUnstyledComponentsPropsOverrides) | undefined;
|
|
35
|
+
badge?: (import("react").HTMLAttributes<HTMLSpanElement> & import("@mui/material").BadgeUnstyledComponentsPropsOverrides) | undefined;
|
|
36
|
+
} | undefined;
|
|
37
|
+
badgeContent?: import("react").ReactNode;
|
|
38
|
+
children?: import("react").ReactNode;
|
|
39
|
+
classes?: Partial<import("@mui/material").BadgeUnstyledClasses> | undefined;
|
|
40
|
+
invisible?: boolean | undefined;
|
|
41
|
+
max?: number | undefined;
|
|
42
|
+
showZero?: boolean | undefined;
|
|
43
|
+
variant?: string | undefined;
|
|
44
|
+
} & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "key" | keyof import("react").HTMLAttributes<HTMLSpanElement>> & {
|
|
45
|
+
ref?: ((instance: HTMLSpanElement | null) => void) | import("react").RefObject<HTMLSpanElement> | null | undefined;
|
|
46
|
+
}, "components" | "color" | keyof import("@mui/material/OverridableComponent").CommonProps | "children" | "sx" | "variant" | "componentsProps" | "invisible" | "anchorOrigin" | "overlap" | "badgeContent" | "max" | "showZero"> & {
|
|
47
|
+
theme?: Theme | undefined;
|
|
48
|
+
} & Omit<BadgeProps, "color"> & {
|
|
49
|
+
customColor: BadgeColor;
|
|
50
|
+
}, {}, {}>;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
3
|
+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
4
|
+
return cooked;
|
|
5
|
+
};
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.StyledBadge = void 0;
|
|
8
|
+
var material_1 = require("@mui/material");
|
|
9
|
+
var styles_1 = require("../styles");
|
|
10
|
+
var getBgColor = function (_a) {
|
|
11
|
+
var customColor = _a.customColor, theme = _a.theme;
|
|
12
|
+
if (customColor === 'grey')
|
|
13
|
+
return theme.palette.grey[300];
|
|
14
|
+
if (customColor === 'errorLight')
|
|
15
|
+
return theme.palette.error.light;
|
|
16
|
+
if (customColor === 'success')
|
|
17
|
+
return theme.palette.success.light;
|
|
18
|
+
if (customColor === 'primary')
|
|
19
|
+
return theme.palette.primary.main;
|
|
20
|
+
if (customColor === 'white')
|
|
21
|
+
return theme.palette.background.default;
|
|
22
|
+
if (customColor === 'error')
|
|
23
|
+
return theme.palette.error.dark;
|
|
24
|
+
return theme.palette.primary.main;
|
|
25
|
+
};
|
|
26
|
+
var getTextColor = function (_a) {
|
|
27
|
+
var customColor = _a.customColor, theme = _a.theme;
|
|
28
|
+
if (customColor === 'grey')
|
|
29
|
+
return theme.palette.text.primary;
|
|
30
|
+
if (customColor === 'primary')
|
|
31
|
+
return theme.palette.primary.contrastText;
|
|
32
|
+
if (customColor === 'white')
|
|
33
|
+
return theme.palette.primary.main;
|
|
34
|
+
if (customColor === 'error')
|
|
35
|
+
return theme.palette.error.contrastText;
|
|
36
|
+
if (customColor === 'errorLight')
|
|
37
|
+
return theme.palette.error.dark;
|
|
38
|
+
if (customColor === 'success')
|
|
39
|
+
return theme.palette.success.dark;
|
|
40
|
+
return theme.palette.primary.contrastText;
|
|
41
|
+
};
|
|
42
|
+
exports.StyledBadge = (0, styles_1.styled)(material_1.Badge, {
|
|
43
|
+
shouldForwardProp: function (prop) { return prop !== 'customColor'; },
|
|
44
|
+
})(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n .MuiBadge-badge {\n height: 20px;\n border-radius: 12px;\n line-height: 20px;\n background-color: ", ";\n color: ", ";\n padding: ", ";\n font-size: ", ";\n border: 2px solid ", ";\n }\n\n .MuiBadge-dot {\n width: 12px;\n height: 12px;\n border: 2px solid ", ";\n }\n"], ["\n .MuiBadge-badge {\n height: 20px;\n border-radius: 12px;\n line-height: 20px;\n background-color: ", ";\n color: ", ";\n padding: ", ";\n font-size: ", ";\n border: 2px solid ", ";\n }\n\n .MuiBadge-dot {\n width: 12px;\n height: 12px;\n border: 2px solid ", ";\n }\n"])), function (_a) {
|
|
45
|
+
var customColor = _a.customColor, theme = _a.theme;
|
|
46
|
+
return getBgColor({ customColor: customColor, theme: theme });
|
|
47
|
+
}, function (_a) {
|
|
48
|
+
var customColor = _a.customColor, theme = _a.theme;
|
|
49
|
+
return getTextColor({ customColor: customColor, theme: theme });
|
|
50
|
+
}, function (_a) {
|
|
51
|
+
var theme = _a.theme;
|
|
52
|
+
return theme.spacing(0, 1);
|
|
53
|
+
}, function (_a) {
|
|
54
|
+
var theme = _a.theme;
|
|
55
|
+
return theme.typography.small.fontSize;
|
|
56
|
+
}, function (_a) {
|
|
57
|
+
var theme = _a.theme;
|
|
58
|
+
return theme.palette.common.white;
|
|
59
|
+
}, function (_a) {
|
|
60
|
+
var theme = _a.theme;
|
|
61
|
+
return theme.palette.common.white;
|
|
62
|
+
});
|
|
63
|
+
var templateObject_1;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
14
|
+
var t = {};
|
|
15
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
16
|
+
t[p] = s[p];
|
|
17
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
18
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
19
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
20
|
+
t[p[i]] = s[p[i]];
|
|
21
|
+
}
|
|
22
|
+
return t;
|
|
23
|
+
};
|
|
24
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
+
exports.Button = void 0;
|
|
26
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
27
|
+
var CircularProgress_1 = require("../CircularProgress");
|
|
28
|
+
var styled_1 = require("./styled");
|
|
29
|
+
var Button = function (_a) {
|
|
30
|
+
var children = _a.children, startIcon = _a.startIcon, endIcon = _a.endIcon, loading = _a.loading, props = __rest(_a, ["children", "startIcon", "endIcon", "loading"]);
|
|
31
|
+
return ((0, jsx_runtime_1.jsxs)(styled_1.StyledButton, __assign({ loading: loading }, props, { children: [(0, jsx_runtime_1.jsx)("span", { children: startIcon }, void 0), children, loading && (0, jsx_runtime_1.jsx)(CircularProgress_1.CircularProgress, {}, void 0), (0, jsx_runtime_1.jsx)("span", { children: endIcon }, void 0)] }), void 0));
|
|
32
|
+
};
|
|
33
|
+
exports.Button = Button;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
|
+
};
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
__exportStar(require("./Button"), exports);
|
|
14
|
+
__exportStar(require("./types"), exports);
|