@smartbooks-ai/layout 0.0.6 → 0.0.8
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/dist/components/PageWithMenuLayout/AppSelect/index.d.ts +0 -1
- package/dist/components/PageWithMenuLayout/AppSelect/index.d.ts.map +1 -1
- package/dist/components/PageWithMenuLayout/AppSelect/index.js +2 -2
- package/dist/components/PageWithMenuLayout/PageWithMenuLayout.d.ts +0 -1
- package/dist/components/PageWithMenuLayout/PageWithMenuLayout.d.ts.map +1 -1
- package/dist/components/PageWithMenuLayout/PageWithMenuLayout.js +2 -2
- package/dist/index.d.ts +0 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +0 -1
- package/dist/theme/colorPrimitives.d.ts +1 -1
- package/dist/theme/colorPrimitives.d.ts.map +1 -1
- package/dist/theme/index.d.ts.map +1 -1
- package/dist/theme/typography.d.ts.map +1 -1
- package/package.json +35 -32
- package/src/components/PageHeader/PageHeader.tsx +0 -15
- package/src/components/PageHeader/index.ts +0 -1
- package/src/components/PageHeader/styles.ts +0 -34
- package/src/components/PageWithMenuLayout/AppSelect/index.tsx +0 -66
- package/src/components/PageWithMenuLayout/AppSelect/styles.ts +0 -33
- package/src/components/PageWithMenuLayout/LogoHeaderImage.tsx +0 -44
- package/src/components/PageWithMenuLayout/LogoHeaderText.tsx +0 -48
- package/src/components/PageWithMenuLayout/MenuItemWithChildren/MenuItemWithChildren.tsx +0 -149
- package/src/components/PageWithMenuLayout/MenuItemWithChildren/styles.ts +0 -179
- package/src/components/PageWithMenuLayout/MenuSelect/index.tsx +0 -78
- package/src/components/PageWithMenuLayout/MenuSelect/styles.ts +0 -97
- package/src/components/PageWithMenuLayout/MultiSubscriptionsMenuItems/ConsolidationIcon.tsx +0 -6
- package/src/components/PageWithMenuLayout/MultiSubscriptionsMenuItems/MultiSubscriptionsMenuItems.tsx +0 -120
- package/src/components/PageWithMenuLayout/MultiSubscriptionsMenuItems/consolidation.svg +0 -8
- package/src/components/PageWithMenuLayout/MultiSubscriptionsMenuItems/index.ts +0 -1
- package/src/components/PageWithMenuLayout/MultiSubscriptionsMenuItems/styles.ts +0 -10
- package/src/components/PageWithMenuLayout/PageWithMenuLayout.tsx +0 -103
- package/src/components/PageWithMenuLayout/UserProfileSelect/index.tsx +0 -64
- package/src/components/PageWithMenuLayout/UserProfileSelect/styles.ts +0 -8
- package/src/components/PageWithMenuLayout/index.ts +0 -8
- package/src/components/PageWithMenuLayout/styles.ts +0 -110
- package/src/components/PageWithMenuLayout/types.ts +0 -7
- package/src/components/PageWithMenuLayout/useMenuToggle.ts +0 -19
- package/src/components/index.ts +0 -3
- package/src/emotion.d.ts +0 -76
- package/src/hooks/index.ts +0 -2
- package/src/hooks/useIsAuthorized.ts +0 -35
- package/src/hooks/useToggle.ts +0 -27
- package/src/index.ts +0 -7
- package/src/package-isolation.test.ts +0 -60
- package/src/security/AuthorizedContent/index.tsx +0 -77
- package/src/security/AuthorizedContent/state.ts +0 -8
- package/src/security/AuthorizedContent/useAuthorizationState.ts +0 -42
- package/src/security/ProfileContext/ProfileContext.tsx +0 -37
- package/src/security/ProfileContext/index.ts +0 -4
- package/src/security/ProfileContext/types.ts +0 -7
- package/src/security/ProfileContext/useProfile.tsx +0 -7
- package/src/security/UserProfile.ts +0 -48
- package/src/security/index.ts +0 -2
- package/src/theme/colorPrimitives.ts +0 -107
- package/src/theme/colors.ts +0 -78
- package/src/theme/font.ts +0 -27
- package/src/theme/globalStyles.tsx +0 -55
- package/src/theme/index.tsx +0 -228
- package/src/theme/radius.ts +0 -12
- package/src/theme/spacing.ts +0 -12
- package/src/theme/typography.ts +0 -40
- package/src/utils/assertNever.ts +0 -14
- package/src/utils/index.ts +0 -2
- package/src/utils/shouldNotForwardPropsWithKeys.ts +0 -7
- package/tsconfig.json +0 -34
- package/tsconfig.layout.tsbuildinfo +0 -1
- package/vitest.config.ts +0 -10
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
import { ColorPrimitives } from '../emotion';
|
|
2
|
-
|
|
3
|
-
export const colorPrimitives: ColorPrimitives = {
|
|
4
|
-
darkNavy: {
|
|
5
|
-
'50': '#E6E8EC',
|
|
6
|
-
'100': '#CBCCD9',
|
|
7
|
-
'200': '#B2B5C6',
|
|
8
|
-
'300': '#989BB2',
|
|
9
|
-
'400': '#7E82A0',
|
|
10
|
-
'500': '#65698B',
|
|
11
|
-
'600': '#4E5376',
|
|
12
|
-
'700': '#373B60',
|
|
13
|
-
'800': '#20244A',
|
|
14
|
-
'900': '#120A32',
|
|
15
|
-
'950': '#0E0828',
|
|
16
|
-
},
|
|
17
|
-
coolMint: {
|
|
18
|
-
'50': '#ECF7F7',
|
|
19
|
-
'100': '#DAEEEF',
|
|
20
|
-
'200': '#C7E6E7',
|
|
21
|
-
'300': '#B5DEDF',
|
|
22
|
-
'400': '#A2D6D7',
|
|
23
|
-
'500': '#8FCDCF',
|
|
24
|
-
'600': '#7DC5C7',
|
|
25
|
-
'700': '#6ABDBF',
|
|
26
|
-
'800': '#58B4B7',
|
|
27
|
-
'900': '#45ACAF',
|
|
28
|
-
'950': '#3E9B9E',
|
|
29
|
-
},
|
|
30
|
-
coral: {
|
|
31
|
-
'50': '#FFF2ED',
|
|
32
|
-
'100': '#FEE5DB',
|
|
33
|
-
'200': '#FED8C9',
|
|
34
|
-
'300': '#FDCBB7',
|
|
35
|
-
'400': '#FDBEA6',
|
|
36
|
-
'500': '#FCB194',
|
|
37
|
-
'600': '#FCA482',
|
|
38
|
-
'700': '#FB9770',
|
|
39
|
-
'800': '#FB8A5E',
|
|
40
|
-
'900': '#FA7D4C',
|
|
41
|
-
'950': '#E17144',
|
|
42
|
-
},
|
|
43
|
-
navy: {
|
|
44
|
-
'50': '#E8EDF9',
|
|
45
|
-
'100': '#D0DCF3',
|
|
46
|
-
'200': '#B9CAEC',
|
|
47
|
-
'300': '#A1B9E6',
|
|
48
|
-
'400': '#8AA7E0',
|
|
49
|
-
'500': '#7395DA',
|
|
50
|
-
'600': '#5B84D4',
|
|
51
|
-
'700': '#4472CD',
|
|
52
|
-
'800': '#2C61C7',
|
|
53
|
-
'900': '#154FC1',
|
|
54
|
-
'950': '#1347AE',
|
|
55
|
-
},
|
|
56
|
-
skyBlue: {
|
|
57
|
-
'50': '#ECF9FB',
|
|
58
|
-
'100': '#D9F2F8',
|
|
59
|
-
'200': '#C6ECF4',
|
|
60
|
-
'300': '#B3E5F1',
|
|
61
|
-
'400': '#A0DFED',
|
|
62
|
-
'500': '#8CD9E9',
|
|
63
|
-
'600': '#79D2E6',
|
|
64
|
-
'700': '#66CCE2',
|
|
65
|
-
'800': '#53C5DF',
|
|
66
|
-
'900': '#40BFDB',
|
|
67
|
-
'950': '#3AACC5',
|
|
68
|
-
},
|
|
69
|
-
grey: {
|
|
70
|
-
'50': '#FAFAFA',
|
|
71
|
-
'100': '#FAF9F9',
|
|
72
|
-
'200': '#F0EFEF',
|
|
73
|
-
'300': '#E1E0E0',
|
|
74
|
-
'400': '#C8C7C7',
|
|
75
|
-
'500': '#AFAEAE',
|
|
76
|
-
'600': '#969595',
|
|
77
|
-
'700': '#7D7D7D',
|
|
78
|
-
'800': '#4E4E4E',
|
|
79
|
-
'900': '#383838',
|
|
80
|
-
'950': '#222222',
|
|
81
|
-
},
|
|
82
|
-
common: {
|
|
83
|
-
black: '#000000',
|
|
84
|
-
white: '#ffffff',
|
|
85
|
-
},
|
|
86
|
-
warning: {
|
|
87
|
-
'100': '#FEF7F0',
|
|
88
|
-
'300': '#FCE6CF',
|
|
89
|
-
'600': '#F7B46E',
|
|
90
|
-
'900': '#DF770C',
|
|
91
|
-
'950': '#B25F0A',
|
|
92
|
-
},
|
|
93
|
-
error: {
|
|
94
|
-
'100': '#FDF2F1',
|
|
95
|
-
'300': '#F9D2D2',
|
|
96
|
-
'600': '#EE7877',
|
|
97
|
-
'900': '#D11C1A',
|
|
98
|
-
'950': '#A71615',
|
|
99
|
-
},
|
|
100
|
-
success: {
|
|
101
|
-
'100': '#F1F8F6',
|
|
102
|
-
'300': '#D9F2E8',
|
|
103
|
-
'600': '#88DDBC',
|
|
104
|
-
'900': '#26A675',
|
|
105
|
-
'950': '#1E855E',
|
|
106
|
-
},
|
|
107
|
-
};
|
package/src/theme/colors.ts
DELETED
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
import { Theme } from '@emotion/react';
|
|
2
|
-
|
|
3
|
-
import { colorPrimitives } from './colorPrimitives';
|
|
4
|
-
|
|
5
|
-
export const colors: Theme['my']['colors'] = {
|
|
6
|
-
primitives: colorPrimitives,
|
|
7
|
-
text: {
|
|
8
|
-
main: colorPrimitives.darkNavy[800],
|
|
9
|
-
light: colorPrimitives.darkNavy[600],
|
|
10
|
-
lighter: colorPrimitives.darkNavy[400],
|
|
11
|
-
disabled: colorPrimitives.grey[600],
|
|
12
|
-
placeholder: colorPrimitives.grey[400],
|
|
13
|
-
white: colorPrimitives.common.white,
|
|
14
|
-
},
|
|
15
|
-
primary: {
|
|
16
|
-
main: colorPrimitives.darkNavy[900],
|
|
17
|
-
light: colorPrimitives.darkNavy[600],
|
|
18
|
-
dark: colorPrimitives.darkNavy[950],
|
|
19
|
-
contrast: colorPrimitives.common.white,
|
|
20
|
-
},
|
|
21
|
-
secondary: {
|
|
22
|
-
main: colorPrimitives.coolMint[900],
|
|
23
|
-
light: colorPrimitives.coolMint[600],
|
|
24
|
-
dark: colorPrimitives.coolMint[950],
|
|
25
|
-
contrast: colorPrimitives.common.white,
|
|
26
|
-
},
|
|
27
|
-
tertiary: {
|
|
28
|
-
main: colorPrimitives.coral[900],
|
|
29
|
-
light: colorPrimitives.coral[600],
|
|
30
|
-
dark: colorPrimitives.coral[950],
|
|
31
|
-
contrast: colorPrimitives.common.white,
|
|
32
|
-
},
|
|
33
|
-
quaternary: {
|
|
34
|
-
main: colorPrimitives.navy[900],
|
|
35
|
-
light: colorPrimitives.navy[600],
|
|
36
|
-
dark: colorPrimitives.navy[950],
|
|
37
|
-
contrast: colorPrimitives.common.white,
|
|
38
|
-
},
|
|
39
|
-
quinary: {
|
|
40
|
-
main: colorPrimitives.skyBlue[900],
|
|
41
|
-
light: colorPrimitives.skyBlue[600],
|
|
42
|
-
dark: colorPrimitives.skyBlue[950],
|
|
43
|
-
contrast: colorPrimitives.common.white,
|
|
44
|
-
},
|
|
45
|
-
neutral: {
|
|
46
|
-
main: colorPrimitives.grey[900],
|
|
47
|
-
light: colorPrimitives.grey[500],
|
|
48
|
-
dark: colorPrimitives.grey[950],
|
|
49
|
-
contrast: colorPrimitives.common.white,
|
|
50
|
-
},
|
|
51
|
-
warning: {
|
|
52
|
-
main: colorPrimitives.warning[900],
|
|
53
|
-
light: colorPrimitives.warning[600],
|
|
54
|
-
dark: colorPrimitives.warning[950],
|
|
55
|
-
contrast: colorPrimitives.common.white,
|
|
56
|
-
},
|
|
57
|
-
error: {
|
|
58
|
-
main: colorPrimitives.error[900],
|
|
59
|
-
light: colorPrimitives.error[600],
|
|
60
|
-
dark: colorPrimitives.error[950],
|
|
61
|
-
contrast: colorPrimitives.common.white,
|
|
62
|
-
},
|
|
63
|
-
success: {
|
|
64
|
-
main: colorPrimitives.success[900],
|
|
65
|
-
light: colorPrimitives.success[600],
|
|
66
|
-
dark: colorPrimitives.success[950],
|
|
67
|
-
contrast: colorPrimitives.common.white,
|
|
68
|
-
},
|
|
69
|
-
background: {
|
|
70
|
-
white: colorPrimitives.common.white,
|
|
71
|
-
lightGrey: colorPrimitives.grey[50],
|
|
72
|
-
transparent: 'transparent',
|
|
73
|
-
light: colorPrimitives.darkNavy[50],
|
|
74
|
-
hover: 'rgb(255 255 255 / 8%)',
|
|
75
|
-
hoverDark: 'rgb(0 0 0 / 8%)',
|
|
76
|
-
hoverDarkNonTransparent: '#ebebeb',
|
|
77
|
-
},
|
|
78
|
-
};
|
package/src/theme/font.ts
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { Theme } from '@emotion/react';
|
|
2
|
-
|
|
3
|
-
export const FONT_FAMILY = 'Arial, sans-serif';
|
|
4
|
-
|
|
5
|
-
export const font: Theme['my']['font'] = {
|
|
6
|
-
h1: ` 600 1.5rem/2 ${FONT_FAMILY}`,
|
|
7
|
-
h2: ` 700 1.25rem/1.75 ${FONT_FAMILY}`,
|
|
8
|
-
h3: ` 700 1.125rem/1.5 ${FONT_FAMILY}`,
|
|
9
|
-
h4: ` 700 1rem/1.25 ${FONT_FAMILY}`,
|
|
10
|
-
h5: ` 700 0.875rem/1.25 ${FONT_FAMILY}`,
|
|
11
|
-
h6: ` 700 0.8125rem/1 ${FONT_FAMILY}`,
|
|
12
|
-
subtitle1: ` 500 1.25rem/1.75 ${FONT_FAMILY}`,
|
|
13
|
-
subtitle2: ` 500 1rem/1.5 ${FONT_FAMILY}`,
|
|
14
|
-
body1: ` 400 1rem/1.5 ${FONT_FAMILY}`,
|
|
15
|
-
body2: ` 400 0.875rem/1.25 ${FONT_FAMILY}`,
|
|
16
|
-
body3: ` 400 0.8125rem/1 ${FONT_FAMILY}`,
|
|
17
|
-
highlight1: `700 1rem/1.5 ${FONT_FAMILY}`,
|
|
18
|
-
highlight2: `700 0.875rem/1.25 ${FONT_FAMILY}`,
|
|
19
|
-
highlight3: `500 0.8125rem/1 ${FONT_FAMILY}`,
|
|
20
|
-
button1: ` 500 0.875rem/1.5 ${FONT_FAMILY}`,
|
|
21
|
-
button2: ` 500 0.875rem/1.25 ${FONT_FAMILY}`,
|
|
22
|
-
caption: ` 400 1rem/1.5 ${FONT_FAMILY}`,
|
|
23
|
-
overline: ` 500 1rem/1.5 ${FONT_FAMILY}`,
|
|
24
|
-
label: ` 500 0.875rem/1.25 ${FONT_FAMILY}`,
|
|
25
|
-
nav1: ` 400 0.8125rem/1.25 ${FONT_FAMILY}`,
|
|
26
|
-
nav2: ` 700 0.8125rem/1.25 ${FONT_FAMILY}`,
|
|
27
|
-
};
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { GlobalStyles as MUIGlobalStyles } from '@mui/material';
|
|
2
|
-
|
|
3
|
-
export default function GlobalStyles() {
|
|
4
|
-
const inputGlobalStyles = (
|
|
5
|
-
<MUIGlobalStyles
|
|
6
|
-
styles={{
|
|
7
|
-
'@keyframes mui-auto-fill': { from: { display: 'block' } },
|
|
8
|
-
'@keyframes mui-auto-fill-cancel': { from: { display: 'block' } },
|
|
9
|
-
'*': {
|
|
10
|
-
boxSizing: 'border-box',
|
|
11
|
-
},
|
|
12
|
-
html: {
|
|
13
|
-
margin: 0,
|
|
14
|
-
padding: 0,
|
|
15
|
-
width: '100%',
|
|
16
|
-
height: '100%',
|
|
17
|
-
WebkitOverflowScrolling: 'touch',
|
|
18
|
-
},
|
|
19
|
-
body: {
|
|
20
|
-
margin: 0,
|
|
21
|
-
padding: 0,
|
|
22
|
-
width: '100%',
|
|
23
|
-
height: '100%',
|
|
24
|
-
},
|
|
25
|
-
'#root': {
|
|
26
|
-
width: '100%',
|
|
27
|
-
height: '100%',
|
|
28
|
-
},
|
|
29
|
-
input: {
|
|
30
|
-
'&[type=number]': {
|
|
31
|
-
MozAppearance: 'textfield',
|
|
32
|
-
'&::-webkit-outer-spin-button': {
|
|
33
|
-
margin: 0,
|
|
34
|
-
WebkitAppearance: 'none',
|
|
35
|
-
},
|
|
36
|
-
'&::-webkit-inner-spin-button': {
|
|
37
|
-
margin: 0,
|
|
38
|
-
WebkitAppearance: 'none',
|
|
39
|
-
},
|
|
40
|
-
},
|
|
41
|
-
},
|
|
42
|
-
img: {
|
|
43
|
-
display: 'block',
|
|
44
|
-
maxWidth: '100%',
|
|
45
|
-
},
|
|
46
|
-
ul: {
|
|
47
|
-
margin: 0,
|
|
48
|
-
padding: 0,
|
|
49
|
-
},
|
|
50
|
-
}}
|
|
51
|
-
/>
|
|
52
|
-
);
|
|
53
|
-
|
|
54
|
-
return inputGlobalStyles;
|
|
55
|
-
}
|
package/src/theme/index.tsx
DELETED
|
@@ -1,228 +0,0 @@
|
|
|
1
|
-
import { forwardRef } from 'react';
|
|
2
|
-
|
|
3
|
-
import { ThemeProvider as EmotionThemeProvider, css } from '@emotion/react';
|
|
4
|
-
import ExpandedMoreRoundedIcon from '@mui/icons-material/ExpandMoreRounded';
|
|
5
|
-
import { listItemTextClasses } from '@mui/material';
|
|
6
|
-
import { buttonClasses } from '@mui/material/Button';
|
|
7
|
-
import CssBaseline from '@mui/material/CssBaseline';
|
|
8
|
-
import { LinkProps } from '@mui/material/Link';
|
|
9
|
-
import {
|
|
10
|
-
ThemeProvider as MUIThemeProvider,
|
|
11
|
-
ThemeOptions as MuiThemeOptions,
|
|
12
|
-
StyledEngineProvider,
|
|
13
|
-
createTheme,
|
|
14
|
-
} from '@mui/material/styles';
|
|
15
|
-
import type {} from '@mui/x-date-pickers/themeAugmentation';
|
|
16
|
-
import { rem } from 'polished';
|
|
17
|
-
import { Link as RouterLink, LinkProps as RouterLinkProps } from 'react-router';
|
|
18
|
-
|
|
19
|
-
import { colorPrimitives } from './colorPrimitives';
|
|
20
|
-
import { colors } from './colors';
|
|
21
|
-
import { font } from './font';
|
|
22
|
-
import GlobalStyles from './globalStyles';
|
|
23
|
-
import { radius } from './radius';
|
|
24
|
-
import { spacing } from './spacing';
|
|
25
|
-
import typography from './typography';
|
|
26
|
-
|
|
27
|
-
import { ThemeOptions } from '../emotion';
|
|
28
|
-
|
|
29
|
-
const LinkBehavior = forwardRef<HTMLAnchorElement, Omit<RouterLinkProps, 'to'> & { href: RouterLinkProps['to'] }>(
|
|
30
|
-
({ href, ...other }, ref) => <RouterLink ref={ref} to={href} {...other} />,
|
|
31
|
-
);
|
|
32
|
-
|
|
33
|
-
const muiTextField = {
|
|
34
|
-
defaultProps: {
|
|
35
|
-
variant: 'outlined',
|
|
36
|
-
margin: 'normal',
|
|
37
|
-
size: 'small',
|
|
38
|
-
InputLabelProps: { shrink: true },
|
|
39
|
-
SelectProps: { displayEmpty: true },
|
|
40
|
-
},
|
|
41
|
-
} as const;
|
|
42
|
-
|
|
43
|
-
const muiOutlinedInput = {
|
|
44
|
-
styleOverrides: {
|
|
45
|
-
notchedOutline: css`
|
|
46
|
-
border-color: ${colorPrimitives.darkNavy[100]};
|
|
47
|
-
`,
|
|
48
|
-
},
|
|
49
|
-
} as const;
|
|
50
|
-
|
|
51
|
-
const muiTheme: MuiThemeOptions = {
|
|
52
|
-
shape: { borderRadius: 6 },
|
|
53
|
-
typography,
|
|
54
|
-
components: {
|
|
55
|
-
MuiCssBaseline: {
|
|
56
|
-
styleOverrides: {
|
|
57
|
-
a: css`
|
|
58
|
-
color: '#000000';
|
|
59
|
-
|
|
60
|
-
text-decoration: none;
|
|
61
|
-
`,
|
|
62
|
-
},
|
|
63
|
-
},
|
|
64
|
-
MuiAccordionDetails: {
|
|
65
|
-
styleOverrides: {
|
|
66
|
-
root: css`
|
|
67
|
-
display: flex;
|
|
68
|
-
|
|
69
|
-
flex-direction: column;
|
|
70
|
-
|
|
71
|
-
row-gap: ${spacing.xxs};
|
|
72
|
-
`,
|
|
73
|
-
},
|
|
74
|
-
},
|
|
75
|
-
MuiDialogContent: {
|
|
76
|
-
styleOverrides: {
|
|
77
|
-
root: css`
|
|
78
|
-
display: flex;
|
|
79
|
-
|
|
80
|
-
flex-direction: column;
|
|
81
|
-
|
|
82
|
-
row-gap: ${spacing.sm};
|
|
83
|
-
|
|
84
|
-
min-width: 30rem;
|
|
85
|
-
`,
|
|
86
|
-
},
|
|
87
|
-
},
|
|
88
|
-
MuiCheckbox: {
|
|
89
|
-
defaultProps: {
|
|
90
|
-
size: 'small',
|
|
91
|
-
},
|
|
92
|
-
},
|
|
93
|
-
MuiFormControlLabel: {
|
|
94
|
-
styleOverrides: {
|
|
95
|
-
label: css`
|
|
96
|
-
overflow: hidden;
|
|
97
|
-
text-overflow: ellipsis;
|
|
98
|
-
|
|
99
|
-
font: ${font.body2};
|
|
100
|
-
|
|
101
|
-
white-space: nowrap;
|
|
102
|
-
`,
|
|
103
|
-
},
|
|
104
|
-
},
|
|
105
|
-
MuiInputBase: {
|
|
106
|
-
defaultProps: {
|
|
107
|
-
disableInjectingGlobalStyles: true,
|
|
108
|
-
},
|
|
109
|
-
},
|
|
110
|
-
MuiTextField: muiTextField,
|
|
111
|
-
MuiPickersTextField: muiTextField,
|
|
112
|
-
MuiAccordion: {
|
|
113
|
-
defaultProps: {
|
|
114
|
-
elevation: 3,
|
|
115
|
-
slotProps: { transition: { unmountOnExit: true } },
|
|
116
|
-
},
|
|
117
|
-
},
|
|
118
|
-
MuiAccordionSummary: {
|
|
119
|
-
defaultProps: {
|
|
120
|
-
expandIcon: <ExpandedMoreRoundedIcon />,
|
|
121
|
-
},
|
|
122
|
-
},
|
|
123
|
-
MuiLink: {
|
|
124
|
-
defaultProps: {
|
|
125
|
-
component: LinkBehavior,
|
|
126
|
-
} as LinkProps,
|
|
127
|
-
styleOverrides: {
|
|
128
|
-
root: ({ theme }) => css`
|
|
129
|
-
color: ${theme.palette.primary.main};
|
|
130
|
-
|
|
131
|
-
text-decoration-color: inherit;
|
|
132
|
-
text-underline-offset: 0.25rem;
|
|
133
|
-
|
|
134
|
-
&:hover {
|
|
135
|
-
color: ${theme.palette.primary.dark};
|
|
136
|
-
}
|
|
137
|
-
`,
|
|
138
|
-
},
|
|
139
|
-
},
|
|
140
|
-
MuiOutlinedInput: muiOutlinedInput,
|
|
141
|
-
MuiPickersOutlinedInput: muiOutlinedInput,
|
|
142
|
-
MuiButtonGroup: {
|
|
143
|
-
defaultProps: {
|
|
144
|
-
disableRipple: true,
|
|
145
|
-
},
|
|
146
|
-
},
|
|
147
|
-
MuiMenuItem: {
|
|
148
|
-
styleOverrides: {
|
|
149
|
-
root: css`
|
|
150
|
-
font: ${font.body3};
|
|
151
|
-
`,
|
|
152
|
-
},
|
|
153
|
-
},
|
|
154
|
-
MuiButtonBase: {
|
|
155
|
-
styleOverrides: {
|
|
156
|
-
root: css`
|
|
157
|
-
&.${buttonClasses.outlined} {
|
|
158
|
-
border: 0.0625rem solid ${colorPrimitives.darkNavy[100]};
|
|
159
|
-
|
|
160
|
-
&:hover {
|
|
161
|
-
/* For button groups - we should bring the border of hovered button in front of the other ones */
|
|
162
|
-
z-index: 1;
|
|
163
|
-
|
|
164
|
-
background: none;
|
|
165
|
-
border: 0.0625rem solid ${colorPrimitives.darkNavy[800]};
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
`,
|
|
169
|
-
},
|
|
170
|
-
defaultProps: {
|
|
171
|
-
disableRipple: true,
|
|
172
|
-
LinkComponent: LinkBehavior,
|
|
173
|
-
type: 'button',
|
|
174
|
-
},
|
|
175
|
-
},
|
|
176
|
-
MuiTooltip: {
|
|
177
|
-
styleOverrides: {
|
|
178
|
-
tooltip: css`
|
|
179
|
-
font: ${font.body3};
|
|
180
|
-
|
|
181
|
-
line-height: 1.5;
|
|
182
|
-
|
|
183
|
-
letter-spacing: 0.05rem;
|
|
184
|
-
|
|
185
|
-
background-color: ${colorPrimitives.darkNavy[900]};
|
|
186
|
-
`,
|
|
187
|
-
},
|
|
188
|
-
},
|
|
189
|
-
MuiSelect: {
|
|
190
|
-
styleOverrides: {
|
|
191
|
-
select: css`
|
|
192
|
-
.${listItemTextClasses.root} {
|
|
193
|
-
margin-top: ${rem(2)};
|
|
194
|
-
margin-bottom: ${rem(2)};
|
|
195
|
-
}
|
|
196
|
-
`,
|
|
197
|
-
},
|
|
198
|
-
},
|
|
199
|
-
},
|
|
200
|
-
};
|
|
201
|
-
|
|
202
|
-
const themeValue: ThemeOptions = {
|
|
203
|
-
...muiTheme,
|
|
204
|
-
my: {
|
|
205
|
-
font,
|
|
206
|
-
radius,
|
|
207
|
-
spacing,
|
|
208
|
-
colors,
|
|
209
|
-
},
|
|
210
|
-
};
|
|
211
|
-
|
|
212
|
-
const theme = createTheme(themeValue);
|
|
213
|
-
|
|
214
|
-
export function ThemeProvider(props: React.PropsWithChildren) {
|
|
215
|
-
return (
|
|
216
|
-
<StyledEngineProvider injectFirst={true}>
|
|
217
|
-
<MUIThemeProvider theme={theme}>
|
|
218
|
-
<EmotionThemeProvider theme={theme}>
|
|
219
|
-
<CssBaseline />
|
|
220
|
-
|
|
221
|
-
<GlobalStyles />
|
|
222
|
-
|
|
223
|
-
{props.children}
|
|
224
|
-
</EmotionThemeProvider>
|
|
225
|
-
</MUIThemeProvider>
|
|
226
|
-
</StyledEngineProvider>
|
|
227
|
-
);
|
|
228
|
-
}
|
package/src/theme/radius.ts
DELETED
package/src/theme/spacing.ts
DELETED
package/src/theme/typography.ts
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { TypographyStyle, TypographyVariantsOptions } from '@mui/material';
|
|
2
|
-
|
|
3
|
-
import { FONT_FAMILY, font } from './font';
|
|
4
|
-
|
|
5
|
-
import { FontStyleName } from '../emotion';
|
|
6
|
-
|
|
7
|
-
const stylesForFont = (fontName: FontStyleName): TypographyStyle => ({
|
|
8
|
-
font: font[fontName],
|
|
9
|
-
|
|
10
|
-
// This is needed to prevent overrides
|
|
11
|
-
fontFamily: undefined,
|
|
12
|
-
fontWeight: undefined,
|
|
13
|
-
fontSize: undefined,
|
|
14
|
-
lineHeight: undefined,
|
|
15
|
-
});
|
|
16
|
-
|
|
17
|
-
const typography: TypographyVariantsOptions = {
|
|
18
|
-
fontFamily: FONT_FAMILY,
|
|
19
|
-
fontWeightRegular: 400,
|
|
20
|
-
fontWeightMedium: 600,
|
|
21
|
-
fontWeightBold: 700,
|
|
22
|
-
h1: stylesForFont('h1'),
|
|
23
|
-
h2: stylesForFont('h2'),
|
|
24
|
-
h3: stylesForFont('h3'),
|
|
25
|
-
h4: stylesForFont('h4'),
|
|
26
|
-
h5: stylesForFont('h5'),
|
|
27
|
-
h6: stylesForFont('h6'),
|
|
28
|
-
subtitle1: stylesForFont('subtitle1'),
|
|
29
|
-
subtitle2: stylesForFont('subtitle2'),
|
|
30
|
-
body1: stylesForFont('body1'),
|
|
31
|
-
body2: stylesForFont('body2'),
|
|
32
|
-
caption: stylesForFont('caption'),
|
|
33
|
-
overline: stylesForFont('overline'),
|
|
34
|
-
button: {
|
|
35
|
-
...stylesForFont('button1'),
|
|
36
|
-
textTransform: 'inherit',
|
|
37
|
-
},
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
export default typography;
|
package/src/utils/assertNever.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @example
|
|
3
|
-
* const a: 'one' | 'two' = 'one';
|
|
4
|
-
*
|
|
5
|
-
* switch(a) {
|
|
6
|
-
* case 'one':
|
|
7
|
-
* return 1;
|
|
8
|
-
* case 'two':
|
|
9
|
-
* return 2;
|
|
10
|
-
* default:
|
|
11
|
-
* return assertNever(a); // Works fine, but if we change the type of `a` to `'one' | 'two' | 'three'` then we get an error here
|
|
12
|
-
* }
|
|
13
|
-
*/
|
|
14
|
-
export const assertNever = (input: never): never => input;
|
package/src/utils/index.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { StyledOptions } from '@emotion/styled';
|
|
2
|
-
|
|
3
|
-
export const shouldNotForwardPropsWithKeys = <TCustomProps extends object>(
|
|
4
|
-
keys: (keyof TCustomProps)[],
|
|
5
|
-
): StyledOptions<TCustomProps> => ({
|
|
6
|
-
shouldForwardProp: (propName: PropertyKey) => !keys.map((key) => key.toString()).includes(propName.toString()),
|
|
7
|
-
});
|
package/tsconfig.json
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"extends": "@tsconfig/vite-react/tsconfig.json",
|
|
3
|
-
"compilerOptions": {
|
|
4
|
-
"target": "ES2023",
|
|
5
|
-
"lib": ["ES2023", "DOM", "DOM.Iterable"],
|
|
6
|
-
"module": "ES2022",
|
|
7
|
-
"moduleResolution": "bundler",
|
|
8
|
-
"skipLibCheck": true,
|
|
9
|
-
"allowImportingTsExtensions": false,
|
|
10
|
-
"verbatimModuleSyntax": false,
|
|
11
|
-
"moduleDetection": "force",
|
|
12
|
-
"noEmit": false,
|
|
13
|
-
"emitDeclarationOnly": false,
|
|
14
|
-
"declaration": true,
|
|
15
|
-
"declarationMap": true,
|
|
16
|
-
"jsx": "react-jsx",
|
|
17
|
-
"jsxImportSource": "@emotion/react",
|
|
18
|
-
"strict": true,
|
|
19
|
-
"noUnusedLocals": false,
|
|
20
|
-
"noUnusedParameters": false,
|
|
21
|
-
"erasableSyntaxOnly": false,
|
|
22
|
-
"noFallthroughCasesInSwitch": true,
|
|
23
|
-
"noUncheckedSideEffectImports": true,
|
|
24
|
-
"outDir": "./dist",
|
|
25
|
-
"rootDir": "./src",
|
|
26
|
-
"incremental": true,
|
|
27
|
-
"composite": true,
|
|
28
|
-
"tsBuildInfoFile": "./tsconfig.layout.tsbuildinfo",
|
|
29
|
-
"baseUrl": ".",
|
|
30
|
-
"paths": {}
|
|
31
|
-
},
|
|
32
|
-
"include": ["src/**/*", "src/emotion.d.ts"],
|
|
33
|
-
"exclude": ["dist", "node_modules"]
|
|
34
|
-
}
|