@huma-finance/widgets 0.0.7 → 0.0.10
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/.env.example +2 -2
- package/.eslintignore +2 -2
- package/.eslintrc.js +64 -64
- package/.prettierignore +4 -4
- package/.prettierrc.js +16 -16
- package/API.md +331 -331
- package/LICENSE +660 -660
- package/README.md +48 -48
- package/babel.config.js +15 -15
- package/config-overrides.js +9 -9
- package/cosmos.config.json +7 -7
- package/cypress/e2e/01-invoice-factoring-borrow.test.ts +62 -62
- package/cypress/support/e2e.ts +76 -76
- package/cypress/support/ethereum.ts +142 -142
- package/cypress/tsconfig.json +9 -9
- package/cypress/utils/index.ts +54 -54
- package/cypress.config.ts +20 -20
- package/jsdoc2md.json +20 -20
- package/package.json +4 -4
- package/public/index.html +40 -40
- package/public/manifest.json +25 -25
- package/public/robots.txt +3 -3
- package/rollup.config.js +81 -81
- package/src/components/ApolloWrapper.tsx +15 -15
- package/src/components/BottomButton.tsx +31 -31
- package/src/components/Factoring/index.ts +2 -2
- package/src/components/HumaLoading.tsx +68 -68
- package/src/components/HumaTable.tsx +158 -158
- package/src/components/InvoiceFactoring/borrow/3-ChooseAmount.tsx +13 -19
- package/src/components/InvoiceFactoring/borrow/4-ConfirmTransfer.tsx +3 -3
- package/src/components/InvoiceFactoring/borrow/7-Success.tsx +20 -20
- package/src/components/Lend/supply/4-ConfirmTransfer.tsx +3 -3
- package/src/components/LoadingModal.tsx +49 -49
- package/src/components/StreamFactoring/borrow/2-ChooseAmount.tsx +11 -11
- package/src/components/StreamFactoring/borrow/3-ConfirmTransfer.tsx +3 -3
- package/src/components/StreamFactoring/borrow/4-ApproveAllowance.tsx +2 -2
- package/src/components/StreamFactoring/borrow/7-Success.tsx +20 -20
- package/src/components/SuperfluidFactoring/SuperfluidUpcomingList.tsx +1 -1
- package/src/components/SuperfluidFactoring/index.tsx +1 -1
- package/src/components/WrapperModal.tsx +54 -54
- package/src/components/buttons/TableActionButton.tsx +36 -36
- package/src/components/buttons/index.ts +1 -1
- package/src/components/humaModal/HumaModalHeader.tsx +70 -70
- package/src/components/humaModal/index.tsx +2 -2
- package/src/components/icons/approve-lender.svg +30 -30
- package/src/components/icons/auto-payback.svg +40 -40
- package/src/components/icons/check-circle.svg +3 -3
- package/src/components/icons/check-green.svg +3 -3
- package/src/components/icons/check.svg +10 -10
- package/src/components/icons/donut.svg +904 -904
- package/src/components/icons/ellipse.svg +3 -3
- package/src/components/icons/huma-full.svg +22 -22
- package/src/components/icons/huma.svg +15 -15
- package/src/components/icons/index.tsx +93 -93
- package/src/components/icons/loader.svg +229 -229
- package/src/components/icons/metamask.svg +31 -31
- package/src/components/icons/polygon.svg +16 -16
- package/src/components/icons/receipt.svg +3 -3
- package/src/components/icons/separator.svg +3 -3
- package/src/components/icons/sorry.svg +31 -31
- package/src/components/icons/usdc.svg +5 -5
- package/src/components/icons/wallet-connect.svg +11 -11
- package/src/cosmos/CreditLineBorrow.fixture.tsx +85 -85
- package/src/cosmos/CreditLinePayment.fixture.tsx +49 -49
- package/src/cosmos/InvoiceFactoringBorrow.fixture.tsx +111 -111
- package/src/cosmos/InvoiceFactoringPayment.fixture.tsx +67 -67
- package/src/cosmos/LendSupply.fixture.tsx +75 -75
- package/src/cosmos/LendWithdraw.fixture.tsx +43 -43
- package/src/cosmos/SDKTesting.fixture.tsx +32 -23
- package/src/cosmos/SuperfluidFactoringBorrow.fixture.tsx +12 -12
- package/src/cosmos/WalletWrapper.tsx +52 -52
- package/src/cosmos/abis/InvoiceNFT.json +644 -644
- package/src/cosmos/abis/ReceivableFactoringPool.json +1529 -1529
- package/src/cosmos/utils/index.ts +169 -169
- package/src/fonts/Recoleta/Recoleta-Black.otf +0 -0
- package/src/fonts/Recoleta/Recoleta-Bold.otf +0 -0
- package/src/fonts/Recoleta/Recoleta-Light.otf +0 -0
- package/src/fonts/Recoleta/Recoleta-Medium.otf +0 -0
- package/src/fonts/Recoleta/Recoleta-Regular.otf +0 -0
- package/src/fonts/Recoleta/Recoleta-RegularDEMO.otf +0 -0
- package/src/fonts/Recoleta/Recoleta-SemiBold.otf +0 -0
- package/src/fonts/Recoleta/Recoleta-Thin.otf +0 -0
- package/src/hooks/useEA.ts +11 -9
- package/src/hooks/useRedux.ts +6 -6
- package/src/index.css +61 -61
- package/src/index.tsx +1 -7
- package/src/react-app-env.d.ts +1 -1
- package/src/reportWebVitals.ts +15 -15
- package/src/setupTests.ts +6 -6
- package/src/store/index.ts +27 -27
- package/src/store/widgets.reducers.ts +7 -7
- package/src/store/widgets.selectors.ts +3 -3
- package/src/store/widgets.store.ts +2 -2
- package/src/theme/breakpoints.ts +10 -10
- package/src/theme/components.ts +70 -70
- package/src/theme/coreThemeConstants.ts +29 -29
- package/src/theme/cssMixins.ts +92 -92
- package/src/theme/hooks/useGetSizes.ts +31 -34
- package/src/theme/index.ts +24 -24
- package/src/theme/palette.ts +150 -150
- package/src/theme/shape.ts +7 -7
- package/src/theme/theme.types.ts +80 -80
- package/src/theme/typography.ts +117 -117
- package/src/utilTypes.d.ts +29 -29
- package/src/utils/env.ts +9 -9
- package/tsconfig.build.json +7 -7
- package/tsconfig.json +32 -32
- package/webpack.cosmos.js +54 -54
- package/dist/assets/output-15e10f9f.css +0 -44
- package/dist/cjs/assets/output-15e10f9f.css +0 -44
- package/dist/cjs/index.cjs +0 -17576
- package/dist/cjs/index.cjs.map +0 -1
- package/dist/index.d.ts +0 -211
- package/dist/index.js +0 -17529
- package/dist/index.js.map +0 -1
package/src/theme/palette.ts
CHANGED
|
@@ -1,150 +1,150 @@
|
|
|
1
|
-
import { ThemeOptions } from '@mui/material'
|
|
2
|
-
|
|
3
|
-
// primary
|
|
4
|
-
export const primaryPurple = '#c265d0'
|
|
5
|
-
export const primaryBlueLight = '#4473EB'
|
|
6
|
-
export const primaryGradient =
|
|
7
|
-
'linear-gradient(232.71deg, #A363F4 4.17%, #FF6A8A 178.69%);'
|
|
8
|
-
|
|
9
|
-
// Secondary
|
|
10
|
-
export const pendingBlueDark = '#1148B2'
|
|
11
|
-
export const pendingBlue = '#226BF9'
|
|
12
|
-
export const pendingBlueMid = '#4584FF'
|
|
13
|
-
export const pendingBlueLight = '#79A5FB'
|
|
14
|
-
export const warningRed = '#D01638'
|
|
15
|
-
export const warningRedMid = '#E71E44'
|
|
16
|
-
export const warningRedLight = '#FF4366'
|
|
17
|
-
export const warningRedPastel = '#FF708B'
|
|
18
|
-
export const backgroundBlue = '#081824'
|
|
19
|
-
export const darkBackground = '#0C2436'
|
|
20
|
-
|
|
21
|
-
export const white = '#FFFFFF'
|
|
22
|
-
|
|
23
|
-
export const black = {
|
|
24
|
-
1: '#000000',
|
|
25
|
-
2: '#2A252F',
|
|
26
|
-
3: '#423B46',
|
|
27
|
-
4: '#534E59',
|
|
28
|
-
5: '#6B6572',
|
|
29
|
-
6: '#76707E',
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
export const orange = {
|
|
33
|
-
100: '#FFA979',
|
|
34
|
-
300: '#FF8F51',
|
|
35
|
-
500: '#FD792F',
|
|
36
|
-
700: '#E96216',
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
const yellow = {
|
|
40
|
-
100: '#FFECB0',
|
|
41
|
-
300: '#FFE07E',
|
|
42
|
-
500: '#FFD54F',
|
|
43
|
-
700: '#F8BE28',
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
const grey = {
|
|
47
|
-
100: '#CBD6DE',
|
|
48
|
-
200: '#6B6B6B',
|
|
49
|
-
300: '#606060',
|
|
50
|
-
400: '#5E7485',
|
|
51
|
-
600: '#395062',
|
|
52
|
-
700: '#6B6572',
|
|
53
|
-
800: '#4A4A4A',
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
const green = {
|
|
57
|
-
100: '#66F8D3',
|
|
58
|
-
200: '#1DE9B6',
|
|
59
|
-
500: '#00CA97',
|
|
60
|
-
700: '#0DBC90',
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
export const blue = {
|
|
64
|
-
50: '#8AD5FF',
|
|
65
|
-
100: '#3DB9FF',
|
|
66
|
-
200: '#0BA7FE',
|
|
67
|
-
300: '#0095E9',
|
|
68
|
-
500: '#0070AF',
|
|
69
|
-
800: '#013859',
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
export const red = {
|
|
73
|
-
50: '#FEAEA8',
|
|
74
|
-
100: '#FA8B84',
|
|
75
|
-
200: '#EA726A',
|
|
76
|
-
300: '#E75E55',
|
|
77
|
-
500: '#BC4E46',
|
|
78
|
-
800: '#472D33',
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
export const purple = {
|
|
82
|
-
100: '#DEB8FC',
|
|
83
|
-
200: '#C476FF',
|
|
84
|
-
300: '#B452FF',
|
|
85
|
-
500: '#9D3BE8',
|
|
86
|
-
800: '#651C9C',
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
export const paletteCore: ThemeOptions['palette'] = {
|
|
90
|
-
alert: {
|
|
91
|
-
contrastText: black[1],
|
|
92
|
-
dark: yellow[700],
|
|
93
|
-
light: yellow[300],
|
|
94
|
-
main: yellow[500],
|
|
95
|
-
},
|
|
96
|
-
background: {
|
|
97
|
-
default: white,
|
|
98
|
-
paper: white,
|
|
99
|
-
},
|
|
100
|
-
common: {
|
|
101
|
-
black: black[1],
|
|
102
|
-
white,
|
|
103
|
-
},
|
|
104
|
-
default: {
|
|
105
|
-
contrastText: black[1],
|
|
106
|
-
dark: white,
|
|
107
|
-
light: white,
|
|
108
|
-
main: white,
|
|
109
|
-
},
|
|
110
|
-
divider: grey[600],
|
|
111
|
-
error: {
|
|
112
|
-
dark: warningRed,
|
|
113
|
-
light: warningRedPastel,
|
|
114
|
-
main: warningRedLight,
|
|
115
|
-
},
|
|
116
|
-
grey,
|
|
117
|
-
info: {
|
|
118
|
-
contrastText: black[1],
|
|
119
|
-
dark: pendingBlue,
|
|
120
|
-
light: pendingBlueLight,
|
|
121
|
-
main: pendingBlueMid,
|
|
122
|
-
superDark: darkBackground,
|
|
123
|
-
superLight: blue[50],
|
|
124
|
-
},
|
|
125
|
-
mode: 'light',
|
|
126
|
-
primary: {
|
|
127
|
-
main: primaryPurple,
|
|
128
|
-
light: primaryBlueLight,
|
|
129
|
-
},
|
|
130
|
-
secondary: {
|
|
131
|
-
contrastText: black[1],
|
|
132
|
-
main: white,
|
|
133
|
-
},
|
|
134
|
-
success: {
|
|
135
|
-
light: green[100],
|
|
136
|
-
main: green[200],
|
|
137
|
-
},
|
|
138
|
-
text: {
|
|
139
|
-
primary: black[5],
|
|
140
|
-
secondary: black[6],
|
|
141
|
-
tertiary: black[3],
|
|
142
|
-
quaternary: grey[400],
|
|
143
|
-
},
|
|
144
|
-
warning: {
|
|
145
|
-
contrastText: black[1],
|
|
146
|
-
light: orange[100],
|
|
147
|
-
main: orange[500],
|
|
148
|
-
superLight: yellow[100],
|
|
149
|
-
},
|
|
150
|
-
}
|
|
1
|
+
import { ThemeOptions } from '@mui/material'
|
|
2
|
+
|
|
3
|
+
// primary
|
|
4
|
+
export const primaryPurple = '#c265d0'
|
|
5
|
+
export const primaryBlueLight = '#4473EB'
|
|
6
|
+
export const primaryGradient =
|
|
7
|
+
'linear-gradient(232.71deg, #A363F4 4.17%, #FF6A8A 178.69%);'
|
|
8
|
+
|
|
9
|
+
// Secondary
|
|
10
|
+
export const pendingBlueDark = '#1148B2'
|
|
11
|
+
export const pendingBlue = '#226BF9'
|
|
12
|
+
export const pendingBlueMid = '#4584FF'
|
|
13
|
+
export const pendingBlueLight = '#79A5FB'
|
|
14
|
+
export const warningRed = '#D01638'
|
|
15
|
+
export const warningRedMid = '#E71E44'
|
|
16
|
+
export const warningRedLight = '#FF4366'
|
|
17
|
+
export const warningRedPastel = '#FF708B'
|
|
18
|
+
export const backgroundBlue = '#081824'
|
|
19
|
+
export const darkBackground = '#0C2436'
|
|
20
|
+
|
|
21
|
+
export const white = '#FFFFFF'
|
|
22
|
+
|
|
23
|
+
export const black = {
|
|
24
|
+
1: '#000000',
|
|
25
|
+
2: '#2A252F',
|
|
26
|
+
3: '#423B46',
|
|
27
|
+
4: '#534E59',
|
|
28
|
+
5: '#6B6572',
|
|
29
|
+
6: '#76707E',
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export const orange = {
|
|
33
|
+
100: '#FFA979',
|
|
34
|
+
300: '#FF8F51',
|
|
35
|
+
500: '#FD792F',
|
|
36
|
+
700: '#E96216',
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
const yellow = {
|
|
40
|
+
100: '#FFECB0',
|
|
41
|
+
300: '#FFE07E',
|
|
42
|
+
500: '#FFD54F',
|
|
43
|
+
700: '#F8BE28',
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
const grey = {
|
|
47
|
+
100: '#CBD6DE',
|
|
48
|
+
200: '#6B6B6B',
|
|
49
|
+
300: '#606060',
|
|
50
|
+
400: '#5E7485',
|
|
51
|
+
600: '#395062',
|
|
52
|
+
700: '#6B6572',
|
|
53
|
+
800: '#4A4A4A',
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
const green = {
|
|
57
|
+
100: '#66F8D3',
|
|
58
|
+
200: '#1DE9B6',
|
|
59
|
+
500: '#00CA97',
|
|
60
|
+
700: '#0DBC90',
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export const blue = {
|
|
64
|
+
50: '#8AD5FF',
|
|
65
|
+
100: '#3DB9FF',
|
|
66
|
+
200: '#0BA7FE',
|
|
67
|
+
300: '#0095E9',
|
|
68
|
+
500: '#0070AF',
|
|
69
|
+
800: '#013859',
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export const red = {
|
|
73
|
+
50: '#FEAEA8',
|
|
74
|
+
100: '#FA8B84',
|
|
75
|
+
200: '#EA726A',
|
|
76
|
+
300: '#E75E55',
|
|
77
|
+
500: '#BC4E46',
|
|
78
|
+
800: '#472D33',
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export const purple = {
|
|
82
|
+
100: '#DEB8FC',
|
|
83
|
+
200: '#C476FF',
|
|
84
|
+
300: '#B452FF',
|
|
85
|
+
500: '#9D3BE8',
|
|
86
|
+
800: '#651C9C',
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
export const paletteCore: ThemeOptions['palette'] = {
|
|
90
|
+
alert: {
|
|
91
|
+
contrastText: black[1],
|
|
92
|
+
dark: yellow[700],
|
|
93
|
+
light: yellow[300],
|
|
94
|
+
main: yellow[500],
|
|
95
|
+
},
|
|
96
|
+
background: {
|
|
97
|
+
default: white,
|
|
98
|
+
paper: white,
|
|
99
|
+
},
|
|
100
|
+
common: {
|
|
101
|
+
black: black[1],
|
|
102
|
+
white,
|
|
103
|
+
},
|
|
104
|
+
default: {
|
|
105
|
+
contrastText: black[1],
|
|
106
|
+
dark: white,
|
|
107
|
+
light: white,
|
|
108
|
+
main: white,
|
|
109
|
+
},
|
|
110
|
+
divider: grey[600],
|
|
111
|
+
error: {
|
|
112
|
+
dark: warningRed,
|
|
113
|
+
light: warningRedPastel,
|
|
114
|
+
main: warningRedLight,
|
|
115
|
+
},
|
|
116
|
+
grey,
|
|
117
|
+
info: {
|
|
118
|
+
contrastText: black[1],
|
|
119
|
+
dark: pendingBlue,
|
|
120
|
+
light: pendingBlueLight,
|
|
121
|
+
main: pendingBlueMid,
|
|
122
|
+
superDark: darkBackground,
|
|
123
|
+
superLight: blue[50],
|
|
124
|
+
},
|
|
125
|
+
mode: 'light',
|
|
126
|
+
primary: {
|
|
127
|
+
main: primaryPurple,
|
|
128
|
+
light: primaryBlueLight,
|
|
129
|
+
},
|
|
130
|
+
secondary: {
|
|
131
|
+
contrastText: black[1],
|
|
132
|
+
main: white,
|
|
133
|
+
},
|
|
134
|
+
success: {
|
|
135
|
+
light: green[100],
|
|
136
|
+
main: green[200],
|
|
137
|
+
},
|
|
138
|
+
text: {
|
|
139
|
+
primary: black[5],
|
|
140
|
+
secondary: black[6],
|
|
141
|
+
tertiary: black[3],
|
|
142
|
+
quaternary: grey[400],
|
|
143
|
+
},
|
|
144
|
+
warning: {
|
|
145
|
+
contrastText: black[1],
|
|
146
|
+
light: orange[100],
|
|
147
|
+
main: orange[500],
|
|
148
|
+
superLight: yellow[100],
|
|
149
|
+
},
|
|
150
|
+
}
|
package/src/theme/shape.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ThemeOptions } from '@mui/material'
|
|
2
|
-
|
|
3
|
-
import { coreThemeConstants } from './coreThemeConstants'
|
|
4
|
-
|
|
5
|
-
export const shape: ThemeOptions['shape'] = {
|
|
6
|
-
borderRadius: coreThemeConstants.borderRadius.md,
|
|
7
|
-
}
|
|
1
|
+
import { ThemeOptions } from '@mui/material'
|
|
2
|
+
|
|
3
|
+
import { coreThemeConstants } from './coreThemeConstants'
|
|
4
|
+
|
|
5
|
+
export const shape: ThemeOptions['shape'] = {
|
|
6
|
+
borderRadius: coreThemeConstants.borderRadius.md,
|
|
7
|
+
}
|
package/src/theme/theme.types.ts
CHANGED
|
@@ -1,80 +1,80 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
Theme as MUITheme,
|
|
3
|
-
PaletteColorOptions,
|
|
4
|
-
} from '@mui/material/styles'
|
|
5
|
-
import { cssMixins } from './cssMixins'
|
|
6
|
-
|
|
7
|
-
declare module '@mui/material/styles/createPalette' {
|
|
8
|
-
interface TypeText {
|
|
9
|
-
quaternary: string
|
|
10
|
-
tertiary: string
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
declare module '@mui/material/styles' {
|
|
15
|
-
interface Theme {
|
|
16
|
-
cssMixins: typeof cssMixins
|
|
17
|
-
}
|
|
18
|
-
interface ThemeOptions {
|
|
19
|
-
cssMixins: typeof cssMixins
|
|
20
|
-
}
|
|
21
|
-
interface PaletteColor {
|
|
22
|
-
superDark?: string
|
|
23
|
-
superLight?: string
|
|
24
|
-
}
|
|
25
|
-
interface SimplePaletteColorOptions {
|
|
26
|
-
contrastText?: string
|
|
27
|
-
dark?: string
|
|
28
|
-
faded?: string
|
|
29
|
-
light?: string
|
|
30
|
-
main: string
|
|
31
|
-
superDark?: string
|
|
32
|
-
superLight?: string
|
|
33
|
-
}
|
|
34
|
-
interface Palette {
|
|
35
|
-
alert: SimplePaletteColorOptions
|
|
36
|
-
default: SimplePaletteColorOptions
|
|
37
|
-
}
|
|
38
|
-
interface PaletteOptions {
|
|
39
|
-
alert?: PaletteColorOptions
|
|
40
|
-
default?: PaletteColorOptions
|
|
41
|
-
}
|
|
42
|
-
interface TypographyVariants {
|
|
43
|
-
body2Small: React.CSSProperties
|
|
44
|
-
h3Large: React.CSSProperties
|
|
45
|
-
labsSmall: React.CSSProperties
|
|
46
|
-
nav: React.CSSProperties
|
|
47
|
-
navSub: React.CSSProperties
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
interface TypographyVariantsOptions {
|
|
51
|
-
body2Small: React.CSSProperties
|
|
52
|
-
h3Large: React.CSSProperties
|
|
53
|
-
labsSmall: React.CSSProperties
|
|
54
|
-
nav: React.CSSProperties
|
|
55
|
-
navSub: React.CSSProperties
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
// Update the Typography's variant prop options
|
|
60
|
-
declare module '@mui/material/Typography' {
|
|
61
|
-
interface TypographyPropsVariantOverrides {
|
|
62
|
-
body2Small: true
|
|
63
|
-
h3Large: true
|
|
64
|
-
labsSmall: true
|
|
65
|
-
nav: true
|
|
66
|
-
navSub: true
|
|
67
|
-
sceneHeader: true
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
declare module '@mui/material/Button' {
|
|
72
|
-
interface ButtonPropsColorOverrides {
|
|
73
|
-
alert: PaletteColorOptions | true
|
|
74
|
-
default: PaletteColorOptions | true
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
declare module '@emotion/react' {
|
|
79
|
-
export interface Theme extends MUITheme {}
|
|
80
|
-
}
|
|
1
|
+
import type {
|
|
2
|
+
Theme as MUITheme,
|
|
3
|
+
PaletteColorOptions,
|
|
4
|
+
} from '@mui/material/styles'
|
|
5
|
+
import { cssMixins } from './cssMixins'
|
|
6
|
+
|
|
7
|
+
declare module '@mui/material/styles/createPalette' {
|
|
8
|
+
interface TypeText {
|
|
9
|
+
quaternary: string
|
|
10
|
+
tertiary: string
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
declare module '@mui/material/styles' {
|
|
15
|
+
interface Theme {
|
|
16
|
+
cssMixins: typeof cssMixins
|
|
17
|
+
}
|
|
18
|
+
interface ThemeOptions {
|
|
19
|
+
cssMixins: typeof cssMixins
|
|
20
|
+
}
|
|
21
|
+
interface PaletteColor {
|
|
22
|
+
superDark?: string
|
|
23
|
+
superLight?: string
|
|
24
|
+
}
|
|
25
|
+
interface SimplePaletteColorOptions {
|
|
26
|
+
contrastText?: string
|
|
27
|
+
dark?: string
|
|
28
|
+
faded?: string
|
|
29
|
+
light?: string
|
|
30
|
+
main: string
|
|
31
|
+
superDark?: string
|
|
32
|
+
superLight?: string
|
|
33
|
+
}
|
|
34
|
+
interface Palette {
|
|
35
|
+
alert: SimplePaletteColorOptions
|
|
36
|
+
default: SimplePaletteColorOptions
|
|
37
|
+
}
|
|
38
|
+
interface PaletteOptions {
|
|
39
|
+
alert?: PaletteColorOptions
|
|
40
|
+
default?: PaletteColorOptions
|
|
41
|
+
}
|
|
42
|
+
interface TypographyVariants {
|
|
43
|
+
body2Small: React.CSSProperties
|
|
44
|
+
h3Large: React.CSSProperties
|
|
45
|
+
labsSmall: React.CSSProperties
|
|
46
|
+
nav: React.CSSProperties
|
|
47
|
+
navSub: React.CSSProperties
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
interface TypographyVariantsOptions {
|
|
51
|
+
body2Small: React.CSSProperties
|
|
52
|
+
h3Large: React.CSSProperties
|
|
53
|
+
labsSmall: React.CSSProperties
|
|
54
|
+
nav: React.CSSProperties
|
|
55
|
+
navSub: React.CSSProperties
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
// Update the Typography's variant prop options
|
|
60
|
+
declare module '@mui/material/Typography' {
|
|
61
|
+
interface TypographyPropsVariantOverrides {
|
|
62
|
+
body2Small: true
|
|
63
|
+
h3Large: true
|
|
64
|
+
labsSmall: true
|
|
65
|
+
nav: true
|
|
66
|
+
navSub: true
|
|
67
|
+
sceneHeader: true
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
declare module '@mui/material/Button' {
|
|
72
|
+
interface ButtonPropsColorOverrides {
|
|
73
|
+
alert: PaletteColorOptions | true
|
|
74
|
+
default: PaletteColorOptions | true
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
declare module '@emotion/react' {
|
|
79
|
+
export interface Theme extends MUITheme {}
|
|
80
|
+
}
|