@huma-finance/widgets 0.0.35 → 0.0.36
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 +332 -332
- 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/dist/cjs/index.cjs +1646 -1226
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/index.d.ts +227 -195
- package/dist/index.js +1648 -1229
- package/dist/index.js.map +1 -1
- package/jsdoc2md.json +20 -20
- package/package.json +5 -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/Activity.tsx +128 -132
- package/src/components/ApolloWrapper.tsx +15 -15
- package/src/components/ApproveAllowanceModal.tsx +138 -124
- package/src/components/BottomButton.tsx +33 -33
- package/src/components/ChainNotSupportedModal.tsx +33 -33
- package/src/components/ChooseAmountModal.tsx +322 -322
- package/src/components/ConfirmTransferModal.tsx +153 -153
- package/src/components/CreditLine/approve/1-ApproveAllowance.tsx +34 -0
- package/src/components/CreditLine/approve/2-Success.tsx +43 -0
- package/src/components/CreditLine/approve/index.tsx +85 -0
- package/src/components/CreditLine/borrow/1-Evaluation.tsx +157 -157
- package/src/components/CreditLine/borrow/2-ChooseAmount.tsx +74 -68
- package/src/components/CreditLine/borrow/{4-ApproveAllowance.tsx → 3-ApproveAllowance.tsx} +29 -29
- package/src/components/CreditLine/borrow/{3-Transfer.tsx → 4-Transfer.tsx} +34 -44
- package/src/components/CreditLine/borrow/5-Success.tsx +38 -38
- package/src/components/CreditLine/borrow/6-Notifications.tsx +10 -10
- package/src/components/CreditLine/borrow/index.tsx +136 -136
- package/src/components/CreditLine/payment/1-ChooseAmount.tsx +67 -67
- package/src/components/CreditLine/payment/2-ApproveAllowance.tsx +23 -23
- package/src/components/CreditLine/payment/3-Transfer.tsx +34 -34
- package/src/components/CreditLine/payment/4-Success.tsx +39 -39
- package/src/components/CreditLine/payment/index.tsx +94 -94
- package/src/components/ErrorModal.tsx +136 -136
- package/src/components/Factoring/FactoredList.tsx +143 -143
- package/src/components/Factoring/UpcomingList.tsx +90 -90
- package/src/components/Factoring/index.ts +2 -2
- package/src/components/HumaLoading.tsx +68 -68
- package/src/components/HumaSnackBar.tsx +60 -60
- package/src/components/HumaTable.tsx +203 -158
- package/src/components/InvoiceFactoring/borrow/1-Evaluation.tsx +49 -49
- package/src/components/InvoiceFactoring/borrow/2-ChooseAmount.tsx +88 -88
- package/src/components/InvoiceFactoring/borrow/3-ConfirmTransfer.tsx +37 -37
- package/src/components/InvoiceFactoring/borrow/4-ApproveNFT.tsx +55 -55
- package/src/components/InvoiceFactoring/borrow/5-Transfer.tsx +34 -34
- package/src/components/InvoiceFactoring/borrow/6-Success.tsx +20 -20
- package/src/components/InvoiceFactoring/borrow/index.tsx +94 -94
- package/src/components/InvoiceFactoring/payment/1-ChooseAmount.tsx +67 -67
- package/src/components/InvoiceFactoring/payment/2-ApproveAllowance.tsx +23 -23
- package/src/components/InvoiceFactoring/payment/3-Transfer.tsx +34 -34
- package/src/components/InvoiceFactoring/payment/4-Success.tsx +23 -23
- package/src/components/InvoiceFactoring/payment/index.tsx +86 -86
- package/src/components/Lend/supply/1-Evaluation/EvaluationEA.tsx +90 -90
- package/src/components/Lend/supply/1-Evaluation/EvaluationKYC.tsx +319 -286
- package/src/components/Lend/supply/1-Evaluation/index.tsx +31 -31
- package/src/components/Lend/supply/2-ChooseAmount.tsx +69 -69
- package/src/components/Lend/supply/3-ApproveAllowance.tsx +25 -25
- package/src/components/Lend/supply/4-Transfer.tsx +32 -32
- package/src/components/Lend/supply/5-Success.tsx +60 -60
- package/src/components/Lend/supply/6-Notifications.tsx +10 -10
- package/src/components/Lend/supply/index.tsx +167 -167
- package/src/components/Lend/withdraw/1-CheckWithdrawble.tsx +73 -73
- package/src/components/Lend/withdraw/2-ChooseAmount.tsx +50 -50
- package/src/components/Lend/withdraw/3-Transfer.tsx +32 -32
- package/src/components/Lend/withdraw/4-Success.tsx +49 -49
- package/src/components/Lend/withdraw/index.tsx +101 -101
- package/src/components/LoadingModal.tsx +49 -49
- package/src/components/Notifi/NotifiSubscriptionModal.tsx +268 -264
- package/src/components/StreamFactoring/borrow/1-Evaluation.tsx +55 -55
- package/src/components/StreamFactoring/borrow/2-ChooseAmount.tsx +127 -127
- package/src/components/StreamFactoring/borrow/3-ConfirmTransfer.tsx +42 -42
- package/src/components/StreamFactoring/borrow/4-ApproveAllowance.tsx +33 -33
- package/src/components/StreamFactoring/borrow/5-Permit.tsx +144 -144
- package/src/components/StreamFactoring/borrow/6-Transfer.tsx +37 -37
- package/src/components/StreamFactoring/borrow/7-Success.tsx +20 -20
- package/src/components/StreamFactoring/borrow/index.tsx +94 -94
- package/src/components/StreamFactoring/payment/ChooseAmount.tsx +54 -54
- package/src/components/StreamFactoring/payment/Success.tsx +23 -23
- package/src/components/StreamFactoring/payment/Transfer.tsx +34 -34
- package/src/components/StreamFactoring/payment/index.tsx +66 -66
- package/src/components/SuperfluidFactoring/SuperfluidFactoredList.tsx +69 -70
- package/src/components/SuperfluidFactoring/SuperfluidUpcomingList.tsx +166 -167
- package/src/components/SuperfluidFactoring/index.tsx +85 -85
- package/src/components/TxDoneModal.tsx +85 -85
- package/src/components/TxSendModal.tsx +59 -59
- package/src/components/ViewOnExplorer.tsx +23 -26
- package/src/components/WidgetWrapper.tsx +74 -74
- 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/HumaModal.tsx +68 -68
- package/src/components/humaModal/HumaModalHeader.tsx +70 -70
- package/src/components/humaModal/index.tsx +2 -2
- package/src/components/icons/approve-lender.svg +58 -58
- package/src/components/icons/auto-payback.svg +139 -139
- 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 +17 -17
- package/src/components/icons/usdc.svg +5 -5
- package/src/components/icons/wallet-connect.svg +11 -11
- package/src/components/images/index.ts +3 -3
- package/src/cosmos/CreditLineBorrow.fixture.tsx +86 -86
- package/src/cosmos/CreditLinePayment.fixture.tsx +50 -50
- 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 +616 -616
- package/src/cosmos/SuperfluidFactoringBorrow.fixture.tsx +15 -15
- 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/env.ts +6 -6
- 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 +53 -53
- package/src/hooks/useElementDimensions.ts +30 -0
- package/src/hooks/useNotifi.ts +71 -71
- package/src/hooks/useRedux.ts +6 -6
- package/src/index.css +61 -61
- package/src/index.tsx +283 -301
- 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 +120 -120
- package/src/store/widgets.selectors.ts +3 -3
- package/src/store/widgets.store.ts +55 -55
- 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 -31
- 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 +30 -31
- package/src/utils/env.ts +10 -10
- package/tsconfig.build.json +7 -7
- package/tsconfig.json +32 -32
- package/webpack.cosmos.js +54 -54
package/src/theme/cssMixins.ts
CHANGED
|
@@ -1,92 +1,92 @@
|
|
|
1
|
-
import { css, SerializedStyles } from '@emotion/react'
|
|
2
|
-
import { createTheme } from '@mui/material'
|
|
3
|
-
|
|
4
|
-
import { coreThemeConstants } from './coreThemeConstants'
|
|
5
|
-
|
|
6
|
-
const theme = createTheme({
|
|
7
|
-
spacing: coreThemeConstants.spacingBase,
|
|
8
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
9
|
-
} as any)
|
|
10
|
-
|
|
11
|
-
export const cssMixins = {
|
|
12
|
-
appHeaderHeight: '80px',
|
|
13
|
-
appFooterHeight: '80px',
|
|
14
|
-
colCentered: css`
|
|
15
|
-
flex-direction: column;
|
|
16
|
-
align-items: center;
|
|
17
|
-
display: flex;
|
|
18
|
-
justify-content: center;
|
|
19
|
-
`,
|
|
20
|
-
colHCentered: css`
|
|
21
|
-
flex-direction: column;
|
|
22
|
-
display: flex;
|
|
23
|
-
justify-content: center;
|
|
24
|
-
`,
|
|
25
|
-
colStretch: css`
|
|
26
|
-
display: flex;
|
|
27
|
-
flex-direction: column;
|
|
28
|
-
`,
|
|
29
|
-
colVCentered: css`
|
|
30
|
-
flex-direction: column;
|
|
31
|
-
align-items: center;
|
|
32
|
-
display: flex;
|
|
33
|
-
`,
|
|
34
|
-
rowCentered: css`
|
|
35
|
-
align-items: center;
|
|
36
|
-
display: flex;
|
|
37
|
-
justify-content: center;
|
|
38
|
-
`,
|
|
39
|
-
rowHCentered: css`
|
|
40
|
-
display: flex;
|
|
41
|
-
justify-content: center;
|
|
42
|
-
`,
|
|
43
|
-
rowStretch: css`
|
|
44
|
-
display: flex;
|
|
45
|
-
`,
|
|
46
|
-
rowSpaceBetweened: css`
|
|
47
|
-
display: flex;
|
|
48
|
-
justify-content: space-between;
|
|
49
|
-
`,
|
|
50
|
-
rowFlexEnd: css`
|
|
51
|
-
justify-content: flex-end;
|
|
52
|
-
display: flex;
|
|
53
|
-
`,
|
|
54
|
-
rowVCentered: css`
|
|
55
|
-
align-items: center;
|
|
56
|
-
display: flex;
|
|
57
|
-
`,
|
|
58
|
-
spaceSimpleH: (spacing: number): SerializedStyles => css`
|
|
59
|
-
margin-right: ${theme.spacing(spacing)};
|
|
60
|
-
|
|
61
|
-
&:last-child {
|
|
62
|
-
margin-right: 0;
|
|
63
|
-
}
|
|
64
|
-
`,
|
|
65
|
-
spaceSimpleV: (spacing: number): SerializedStyles => css`
|
|
66
|
-
margin-bottom: ${theme.spacing(spacing)};
|
|
67
|
-
|
|
68
|
-
&:last-child {
|
|
69
|
-
margin-bottom: 0;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
+ & {
|
|
73
|
-
margin-top: ${theme.spacing(spacing)};
|
|
74
|
-
}
|
|
75
|
-
`,
|
|
76
|
-
stretchAll: css`
|
|
77
|
-
top: 0;
|
|
78
|
-
right: 0;
|
|
79
|
-
bottom: 0;
|
|
80
|
-
left: 0;
|
|
81
|
-
`,
|
|
82
|
-
stretchBottom: css`
|
|
83
|
-
right: 0;
|
|
84
|
-
bottom: 0;
|
|
85
|
-
left: 0;
|
|
86
|
-
`,
|
|
87
|
-
stretchTop: css`
|
|
88
|
-
top: 0;
|
|
89
|
-
right: 0;
|
|
90
|
-
left: 0;
|
|
91
|
-
`,
|
|
92
|
-
}
|
|
1
|
+
import { css, SerializedStyles } from '@emotion/react'
|
|
2
|
+
import { createTheme } from '@mui/material'
|
|
3
|
+
|
|
4
|
+
import { coreThemeConstants } from './coreThemeConstants'
|
|
5
|
+
|
|
6
|
+
const theme = createTheme({
|
|
7
|
+
spacing: coreThemeConstants.spacingBase,
|
|
8
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
9
|
+
} as any)
|
|
10
|
+
|
|
11
|
+
export const cssMixins = {
|
|
12
|
+
appHeaderHeight: '80px',
|
|
13
|
+
appFooterHeight: '80px',
|
|
14
|
+
colCentered: css`
|
|
15
|
+
flex-direction: column;
|
|
16
|
+
align-items: center;
|
|
17
|
+
display: flex;
|
|
18
|
+
justify-content: center;
|
|
19
|
+
`,
|
|
20
|
+
colHCentered: css`
|
|
21
|
+
flex-direction: column;
|
|
22
|
+
display: flex;
|
|
23
|
+
justify-content: center;
|
|
24
|
+
`,
|
|
25
|
+
colStretch: css`
|
|
26
|
+
display: flex;
|
|
27
|
+
flex-direction: column;
|
|
28
|
+
`,
|
|
29
|
+
colVCentered: css`
|
|
30
|
+
flex-direction: column;
|
|
31
|
+
align-items: center;
|
|
32
|
+
display: flex;
|
|
33
|
+
`,
|
|
34
|
+
rowCentered: css`
|
|
35
|
+
align-items: center;
|
|
36
|
+
display: flex;
|
|
37
|
+
justify-content: center;
|
|
38
|
+
`,
|
|
39
|
+
rowHCentered: css`
|
|
40
|
+
display: flex;
|
|
41
|
+
justify-content: center;
|
|
42
|
+
`,
|
|
43
|
+
rowStretch: css`
|
|
44
|
+
display: flex;
|
|
45
|
+
`,
|
|
46
|
+
rowSpaceBetweened: css`
|
|
47
|
+
display: flex;
|
|
48
|
+
justify-content: space-between;
|
|
49
|
+
`,
|
|
50
|
+
rowFlexEnd: css`
|
|
51
|
+
justify-content: flex-end;
|
|
52
|
+
display: flex;
|
|
53
|
+
`,
|
|
54
|
+
rowVCentered: css`
|
|
55
|
+
align-items: center;
|
|
56
|
+
display: flex;
|
|
57
|
+
`,
|
|
58
|
+
spaceSimpleH: (spacing: number): SerializedStyles => css`
|
|
59
|
+
margin-right: ${theme.spacing(spacing)};
|
|
60
|
+
|
|
61
|
+
&:last-child {
|
|
62
|
+
margin-right: 0;
|
|
63
|
+
}
|
|
64
|
+
`,
|
|
65
|
+
spaceSimpleV: (spacing: number): SerializedStyles => css`
|
|
66
|
+
margin-bottom: ${theme.spacing(spacing)};
|
|
67
|
+
|
|
68
|
+
&:last-child {
|
|
69
|
+
margin-bottom: 0;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
+ & {
|
|
73
|
+
margin-top: ${theme.spacing(spacing)};
|
|
74
|
+
}
|
|
75
|
+
`,
|
|
76
|
+
stretchAll: css`
|
|
77
|
+
top: 0;
|
|
78
|
+
right: 0;
|
|
79
|
+
bottom: 0;
|
|
80
|
+
left: 0;
|
|
81
|
+
`,
|
|
82
|
+
stretchBottom: css`
|
|
83
|
+
right: 0;
|
|
84
|
+
bottom: 0;
|
|
85
|
+
left: 0;
|
|
86
|
+
`,
|
|
87
|
+
stretchTop: css`
|
|
88
|
+
top: 0;
|
|
89
|
+
right: 0;
|
|
90
|
+
left: 0;
|
|
91
|
+
`,
|
|
92
|
+
}
|
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import { Theme, useMediaQuery } from '@mui/material'
|
|
2
|
-
|
|
3
|
-
type UseGetSizesType = {
|
|
4
|
-
isAboveSm: boolean
|
|
5
|
-
isBelowLgSize: boolean
|
|
6
|
-
isBelowMdSize: boolean
|
|
7
|
-
isLgSize: boolean
|
|
8
|
-
isMediumSize: boolean
|
|
9
|
-
isMobileDisplay: boolean
|
|
10
|
-
isXsSize: boolean
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export function useGetSizes(theme: Theme): UseGetSizesType {
|
|
14
|
-
const isMobileDisplay = useMediaQuery(theme.breakpoints.down('md'))
|
|
15
|
-
const isLgSize = useMediaQuery(theme.breakpoints.up('lg'))
|
|
16
|
-
const isBelowLgSize = useMediaQuery(theme.breakpoints.down('lg'))
|
|
17
|
-
const isXsSize = useMediaQuery(theme.breakpoints.down('sm'))
|
|
18
|
-
const isAboveSm = useMediaQuery(theme.breakpoints.up('sm'))
|
|
19
|
-
const isBelowMdSize = useMediaQuery(theme.breakpoints.down('md'))
|
|
20
|
-
const isMediumSize = isMobileDisplay && isAboveSm
|
|
21
|
-
|
|
22
|
-
return {
|
|
23
|
-
isAboveSm,
|
|
24
|
-
isBelowLgSize,
|
|
25
|
-
isBelowMdSize,
|
|
26
|
-
isLgSize,
|
|
27
|
-
isMediumSize,
|
|
28
|
-
isMobileDisplay,
|
|
29
|
-
isXsSize,
|
|
30
|
-
}
|
|
31
|
-
}
|
|
1
|
+
import { Theme, useMediaQuery } from '@mui/material'
|
|
2
|
+
|
|
3
|
+
type UseGetSizesType = {
|
|
4
|
+
isAboveSm: boolean
|
|
5
|
+
isBelowLgSize: boolean
|
|
6
|
+
isBelowMdSize: boolean
|
|
7
|
+
isLgSize: boolean
|
|
8
|
+
isMediumSize: boolean
|
|
9
|
+
isMobileDisplay: boolean
|
|
10
|
+
isXsSize: boolean
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export function useGetSizes(theme: Theme): UseGetSizesType {
|
|
14
|
+
const isMobileDisplay = useMediaQuery(theme.breakpoints.down('md'))
|
|
15
|
+
const isLgSize = useMediaQuery(theme.breakpoints.up('lg'))
|
|
16
|
+
const isBelowLgSize = useMediaQuery(theme.breakpoints.down('lg'))
|
|
17
|
+
const isXsSize = useMediaQuery(theme.breakpoints.down('sm'))
|
|
18
|
+
const isAboveSm = useMediaQuery(theme.breakpoints.up('sm'))
|
|
19
|
+
const isBelowMdSize = useMediaQuery(theme.breakpoints.down('md'))
|
|
20
|
+
const isMediumSize = isMobileDisplay && isAboveSm
|
|
21
|
+
|
|
22
|
+
return {
|
|
23
|
+
isAboveSm,
|
|
24
|
+
isBelowLgSize,
|
|
25
|
+
isBelowMdSize,
|
|
26
|
+
isLgSize,
|
|
27
|
+
isMediumSize,
|
|
28
|
+
isMobileDisplay,
|
|
29
|
+
isXsSize,
|
|
30
|
+
}
|
|
31
|
+
}
|
package/src/theme/index.ts
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import { createTheme } from '@mui/material'
|
|
2
|
-
|
|
3
|
-
import { breakpoints } from './breakpoints'
|
|
4
|
-
import { components } from './components'
|
|
5
|
-
import { coreThemeConstants } from './coreThemeConstants'
|
|
6
|
-
import { cssMixins } from './cssMixins'
|
|
7
|
-
import { paletteCore } from './palette'
|
|
8
|
-
import { shape } from './shape'
|
|
9
|
-
import { typography } from './typography'
|
|
10
|
-
|
|
11
|
-
export * from './components'
|
|
12
|
-
|
|
13
|
-
const themeBase = createTheme({
|
|
14
|
-
breakpoints,
|
|
15
|
-
cssMixins,
|
|
16
|
-
palette: paletteCore,
|
|
17
|
-
shape,
|
|
18
|
-
spacing: coreThemeConstants.spacingBase,
|
|
19
|
-
typography,
|
|
20
|
-
})
|
|
21
|
-
|
|
22
|
-
export const themeHuma = createTheme(themeBase, {
|
|
23
|
-
components: components(themeBase),
|
|
24
|
-
})
|
|
1
|
+
import { createTheme } from '@mui/material'
|
|
2
|
+
|
|
3
|
+
import { breakpoints } from './breakpoints'
|
|
4
|
+
import { components } from './components'
|
|
5
|
+
import { coreThemeConstants } from './coreThemeConstants'
|
|
6
|
+
import { cssMixins } from './cssMixins'
|
|
7
|
+
import { paletteCore } from './palette'
|
|
8
|
+
import { shape } from './shape'
|
|
9
|
+
import { typography } from './typography'
|
|
10
|
+
|
|
11
|
+
export * from './components'
|
|
12
|
+
|
|
13
|
+
const themeBase = createTheme({
|
|
14
|
+
breakpoints,
|
|
15
|
+
cssMixins,
|
|
16
|
+
palette: paletteCore,
|
|
17
|
+
shape,
|
|
18
|
+
spacing: coreThemeConstants.spacingBase,
|
|
19
|
+
typography,
|
|
20
|
+
})
|
|
21
|
+
|
|
22
|
+
export const themeHuma = createTheme(themeBase, {
|
|
23
|
+
components: components(themeBase),
|
|
24
|
+
})
|
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
|
+
}
|