edsadapter 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +75 -0
- package/eslint.config.js +23 -0
- package/index.html +13 -0
- package/package.json +61 -0
- package/public/favicon.svg +1 -0
- package/public/icons.svg +24 -0
- package/src/App.css +184 -0
- package/src/App.tsx +35 -0
- package/src/assets/hero.png +0 -0
- package/src/assets/loading.png +0 -0
- package/src/assets/react.svg +1 -0
- package/src/assets/svg/close.svg +3 -0
- package/src/assets/svg/tick.svg +4 -0
- package/src/assets/vite.svg +1 -0
- package/src/assets/wallet/bitget.png +0 -0
- package/src/assets/wallet/coinbase.png +0 -0
- package/src/assets/wallet/endless.png +0 -0
- package/src/assets/wallet/luffa.png +0 -0
- package/src/assets/wallet/metamask.png +0 -0
- package/src/assets/wallet/okx.png +0 -0
- package/src/assets/wallet/phantom.png +0 -0
- package/src/assets/wallet/tron.png +0 -0
- package/src/assets/wallet/walletConnect.png +0 -0
- package/src/components/Button/index.tsx +9 -0
- package/src/components/ConnectModal/index.css +32 -0
- package/src/components/ConnectModal/index.tsx +77 -0
- package/src/components/ConnectModal/modal.tsx +261 -0
- package/src/components/ConnectModal/showConnectModal.tsx +20 -0
- package/src/components/ConnectModal/styles.ts +46 -0
- package/src/components/Modal.tsx +122 -0
- package/src/config/wallets.ts +98 -0
- package/src/contexts/Modal.tsx +33 -0
- package/src/contexts/Tables.tsx +32 -0
- package/src/hooks/store.ts +30 -0
- package/src/hooks/useIsMobile.ts +10 -0
- package/src/hooks/useSyncProvider.ts +4 -0
- package/src/hooks/useToast.tsx +163 -0
- package/src/hooks/useWallet.ts +66 -0
- package/src/index.css +111 -0
- package/src/index.ts +5 -0
- package/src/main.tsx +5 -0
- package/src/store/connectStore.ts +87 -0
- package/src/theme/components/Button.ts +100 -0
- package/src/theme/components/Checkbox.tsx +24 -0
- package/src/theme/components/Drawer.ts +60 -0
- package/src/theme/components/Input.ts +98 -0
- package/src/theme/components/Menu.ts +52 -0
- package/src/theme/components/Modal.ts +44 -0
- package/src/theme/components/NumberInput.ts +54 -0
- package/src/theme/components/Popover.ts +72 -0
- package/src/theme/components/Progress.ts +41 -0
- package/src/theme/components/Radio.tsx +66 -0
- package/src/theme/components/Switch.ts +30 -0
- package/src/theme/components/Table.ts +149 -0
- package/src/theme/components/Tabs.ts +90 -0
- package/src/theme/components/Tag.ts +21 -0
- package/src/theme/components/Textarea.ts +21 -0
- package/src/theme/components/Tooltip.ts +35 -0
- package/src/theme/index.ts +269 -0
- package/src/types/adapter.d.ts +43 -0
- package/src/types/global.d.ts +102 -0
- package/src/types/type.ts +100 -0
- package/src/web3/ethereum/index.ts +36 -0
- package/src/web3/index.ts +15 -0
- package/src/web3/solana/index.ts +104 -0
- package/src/web3/tron/index.ts +57 -0
- package/tsconfig.app.json +31 -0
- package/tsconfig.json +7 -0
- package/tsconfig.node.json +29 -0
- package/vite.config.ts +31 -0
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { inputAnatomy } from "@chakra-ui/anatomy";
|
|
2
|
+
import { createMultiStyleConfigHelpers } from "@chakra-ui/react";
|
|
3
|
+
|
|
4
|
+
const { definePartsStyle, defineMultiStyleConfig } =
|
|
5
|
+
createMultiStyleConfigHelpers(inputAnatomy.keys);
|
|
6
|
+
|
|
7
|
+
const base = definePartsStyle({
|
|
8
|
+
field: {
|
|
9
|
+
h: { xl: "48px", sm: ".4rem" },
|
|
10
|
+
fontSize: { xl: "14px", sm: '.12rem' },
|
|
11
|
+
fontWeight: "500",
|
|
12
|
+
lineHeight: { xl: "48px", sm: '.4rem' },
|
|
13
|
+
color: "#C3C6D5",
|
|
14
|
+
borderRadius: "10px",
|
|
15
|
+
bg: "#0A0C15",
|
|
16
|
+
p: { xl: "16px", sm: '.12rem' },
|
|
17
|
+
pl: { xl: '36px', sm: '.32rem' },
|
|
18
|
+
border: "1px solid rgba(223, 229, 243, 0.50)",
|
|
19
|
+
textAlign: "left",
|
|
20
|
+
_placeholder: {
|
|
21
|
+
color: "b4",
|
|
22
|
+
},
|
|
23
|
+
_disabled: {
|
|
24
|
+
bg: 'a3',
|
|
25
|
+
opacity: '1'
|
|
26
|
+
},
|
|
27
|
+
|
|
28
|
+
},
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
const InputBase = definePartsStyle({
|
|
32
|
+
field: {
|
|
33
|
+
h: "40px",
|
|
34
|
+
fontSize: "12px",
|
|
35
|
+
fontWeight: "500",
|
|
36
|
+
lineHeight: "1em",
|
|
37
|
+
color: "b1",
|
|
38
|
+
borderRadius: "4px",
|
|
39
|
+
border: "1px solid #EAEFF4",
|
|
40
|
+
bg: "a4",
|
|
41
|
+
p: "16px",
|
|
42
|
+
textAlign: "center",
|
|
43
|
+
_placeholder: {
|
|
44
|
+
color: "b4",
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
const baseStyle = definePartsStyle({
|
|
50
|
+
field: {
|
|
51
|
+
_invalid: {
|
|
52
|
+
border: "1px solid #9A131B",
|
|
53
|
+
bg: "linear-gradient(88deg, rgba(107, 34, 42, 0.20) 0%, rgba(156, 52, 63, 0.20) 100%)",
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
});
|
|
57
|
+
const modalInput = definePartsStyle({
|
|
58
|
+
field: {
|
|
59
|
+
h: "40px",
|
|
60
|
+
fontSize: "12px",
|
|
61
|
+
fontWeight: "500",
|
|
62
|
+
color: "a4",
|
|
63
|
+
border: '1px solid rgba(255, 255, 255, 0.12)',
|
|
64
|
+
borderRadius: "8px",
|
|
65
|
+
bg: "#101010",
|
|
66
|
+
p: "12px",
|
|
67
|
+
textAlign: "left",
|
|
68
|
+
_placeholder: {
|
|
69
|
+
color: "b4",
|
|
70
|
+
},
|
|
71
|
+
'&:not(:placeholder-shown)': {
|
|
72
|
+
bg: 'none',
|
|
73
|
+
},
|
|
74
|
+
},
|
|
75
|
+
});
|
|
76
|
+
const loginInput = definePartsStyle({
|
|
77
|
+
field: {
|
|
78
|
+
h: "48px",
|
|
79
|
+
fontSize: "14px",
|
|
80
|
+
fontWeight: "500",
|
|
81
|
+
color: "#17191B",
|
|
82
|
+
bg: "#F8F9FE",
|
|
83
|
+
borderRadius: "12px",
|
|
84
|
+
border: "1px solid #E8EAF5",
|
|
85
|
+
p: "14px 16px",
|
|
86
|
+
textAlign: "left",
|
|
87
|
+
_placeholder: {
|
|
88
|
+
color: "#A1A3B4",
|
|
89
|
+
},
|
|
90
|
+
},
|
|
91
|
+
});
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
export const inputTheme = defineMultiStyleConfig({
|
|
96
|
+
variants: { base, InputBase, modalInput, loginInput },
|
|
97
|
+
baseStyle,
|
|
98
|
+
});
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { menuAnatomy } from '@chakra-ui/anatomy'
|
|
2
|
+
import { createMultiStyleConfigHelpers } from '@chakra-ui/react'
|
|
3
|
+
|
|
4
|
+
const { definePartsStyle, defineMultiStyleConfig } = createMultiStyleConfigHelpers(menuAnatomy.keys)
|
|
5
|
+
|
|
6
|
+
const coinDexTheme = definePartsStyle({
|
|
7
|
+
list: {
|
|
8
|
+
bg: '#161616',
|
|
9
|
+
border: 'none',
|
|
10
|
+
borderRadius: '12px',
|
|
11
|
+
p: '10px 12px',
|
|
12
|
+
minW: '170px',
|
|
13
|
+
},
|
|
14
|
+
item: {
|
|
15
|
+
bg: '#161616',
|
|
16
|
+
fontSize: '12px',
|
|
17
|
+
fontWeight: 500,
|
|
18
|
+
p: '8px 12px',
|
|
19
|
+
borderRadius: '4px',
|
|
20
|
+
_hover: {
|
|
21
|
+
bg: '#1B1B1B',
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
})
|
|
25
|
+
|
|
26
|
+
const select = definePartsStyle({
|
|
27
|
+
list: {
|
|
28
|
+
bg: '#373737',
|
|
29
|
+
border: 'none',
|
|
30
|
+
borderRadius: '10px',
|
|
31
|
+
p: '10px 10px',
|
|
32
|
+
minW: '170px',
|
|
33
|
+
},
|
|
34
|
+
item: {
|
|
35
|
+
bg: '#373737',
|
|
36
|
+
color: '#B3B3B3',
|
|
37
|
+
fontSize: '12px',
|
|
38
|
+
fontWeight: 500,
|
|
39
|
+
p: '6px 6px',
|
|
40
|
+
borderRadius: '4px',
|
|
41
|
+
_hover: {
|
|
42
|
+
color: 'a4',
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
})
|
|
46
|
+
|
|
47
|
+
export const menuTheme = defineMultiStyleConfig({
|
|
48
|
+
variants: {
|
|
49
|
+
coinDex: coinDexTheme,
|
|
50
|
+
select,
|
|
51
|
+
},
|
|
52
|
+
})
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { modalAnatomy } from '@chakra-ui/anatomy'
|
|
2
|
+
import { createMultiStyleConfigHelpers } from '@chakra-ui/react'
|
|
3
|
+
|
|
4
|
+
const { definePartsStyle, defineMultiStyleConfig } = createMultiStyleConfigHelpers(modalAnatomy.keys)
|
|
5
|
+
|
|
6
|
+
const base = definePartsStyle({
|
|
7
|
+
overlay: {
|
|
8
|
+
opacity: '0.7 !important',
|
|
9
|
+
bg: '#000',
|
|
10
|
+
},
|
|
11
|
+
dialog: {
|
|
12
|
+
bg: '#191919',
|
|
13
|
+
borderRadius: '6px',
|
|
14
|
+
maxW: '600px',
|
|
15
|
+
minW: { sm: '300px', xl: '375px' },
|
|
16
|
+
p: '16px',
|
|
17
|
+
},
|
|
18
|
+
header: {
|
|
19
|
+
p: '0',
|
|
20
|
+
textAlign: 'center',
|
|
21
|
+
fontSize: '18px',
|
|
22
|
+
lineHeight: 1,
|
|
23
|
+
fontWeight: 600,
|
|
24
|
+
},
|
|
25
|
+
closeButton: {
|
|
26
|
+
top: '24px',
|
|
27
|
+
right: '24px',
|
|
28
|
+
'& svg': {
|
|
29
|
+
boxSize: '14px',
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
body: {
|
|
33
|
+
p: '16px 0px',
|
|
34
|
+
},
|
|
35
|
+
footer: {
|
|
36
|
+
p: '0',
|
|
37
|
+
},
|
|
38
|
+
})
|
|
39
|
+
|
|
40
|
+
export const modalTheme = defineMultiStyleConfig({
|
|
41
|
+
variants: {
|
|
42
|
+
base,
|
|
43
|
+
},
|
|
44
|
+
})
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { numberInputAnatomy } from "@chakra-ui/anatomy";
|
|
2
|
+
import { createMultiStyleConfigHelpers } from "@chakra-ui/react";
|
|
3
|
+
|
|
4
|
+
const { definePartsStyle, defineMultiStyleConfig } =
|
|
5
|
+
createMultiStyleConfigHelpers(numberInputAnatomy.keys);
|
|
6
|
+
|
|
7
|
+
const base = definePartsStyle({
|
|
8
|
+
field: {
|
|
9
|
+
h: { xl: "40px", sm: ".4rem" },
|
|
10
|
+
fontSize: { xl: "14px", sm: '.14rem' },
|
|
11
|
+
fontWeight: "500",
|
|
12
|
+
lineHeight: "40px",
|
|
13
|
+
color: "b4",
|
|
14
|
+
borderRadius: ".1rem",
|
|
15
|
+
bg: "a4",
|
|
16
|
+
p: { xl: "16px", sm: '.12rem' },
|
|
17
|
+
border: "1px solid #E5E5E5",
|
|
18
|
+
textAlign: "right",
|
|
19
|
+
_placeholder: {
|
|
20
|
+
color: "b4",
|
|
21
|
+
},
|
|
22
|
+
_disabled: {
|
|
23
|
+
bg: 'a3',
|
|
24
|
+
opacity: '1'
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
const baseStyle = definePartsStyle({
|
|
30
|
+
field: {
|
|
31
|
+
borderRadius: "4px",
|
|
32
|
+
textAlign: "center",
|
|
33
|
+
bg: "a4",
|
|
34
|
+
p: "14px",
|
|
35
|
+
fontSize: { sm: ".14rem", xl: "14px" },
|
|
36
|
+
lineHeight: 1,
|
|
37
|
+
fontWeight: "500",
|
|
38
|
+
color: "a8",
|
|
39
|
+
h: "40px",
|
|
40
|
+
border: "1px solid #EAEFF4",
|
|
41
|
+
_placeholder: {
|
|
42
|
+
color: "a8",
|
|
43
|
+
},
|
|
44
|
+
_invalid: {
|
|
45
|
+
border: "1px solid b2",
|
|
46
|
+
bg: "linear-gradient(88deg, rgba(107, 34, 42, 0.20) 0%, rgba(156, 52, 63, 0.20) 100%)",
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
export const numberInputTheme = defineMultiStyleConfig({
|
|
52
|
+
variants: { base },
|
|
53
|
+
baseStyle,
|
|
54
|
+
});
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { popoverAnatomy } from "@chakra-ui/anatomy";
|
|
2
|
+
import { createMultiStyleConfigHelpers } from "@chakra-ui/react";
|
|
3
|
+
|
|
4
|
+
const { definePartsStyle, defineMultiStyleConfig } =
|
|
5
|
+
createMultiStyleConfigHelpers(popoverAnatomy.keys);
|
|
6
|
+
const thead = definePartsStyle({
|
|
7
|
+
content: {
|
|
8
|
+
w: "90px !important",
|
|
9
|
+
p: "0",
|
|
10
|
+
bg: "#14161E",
|
|
11
|
+
fontSize: "12px",
|
|
12
|
+
lineHeight: "18px",
|
|
13
|
+
fontWeight: 500,
|
|
14
|
+
color: "font",
|
|
15
|
+
border: "none",
|
|
16
|
+
},
|
|
17
|
+
arrow: {
|
|
18
|
+
boxShadow: "none !important",
|
|
19
|
+
bg: "#1B1B1B !important",
|
|
20
|
+
},
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
const connect = definePartsStyle({
|
|
24
|
+
content: {
|
|
25
|
+
w: 'fit-content',
|
|
26
|
+
maxW: { sm: '300px', xl: '400px' },
|
|
27
|
+
p: '12px 16px',
|
|
28
|
+
bg: '#FFF',
|
|
29
|
+
fontSize: '12px',
|
|
30
|
+
lineHeight: '1.6em',
|
|
31
|
+
fontWeight: 500,
|
|
32
|
+
color: '#222',
|
|
33
|
+
border: '1px solid #E5E5E5',
|
|
34
|
+
borderRadius: '4px',
|
|
35
|
+
zIndex: '9999',
|
|
36
|
+
},
|
|
37
|
+
body: {
|
|
38
|
+
p: 0,
|
|
39
|
+
zIndex: '9999',
|
|
40
|
+
},
|
|
41
|
+
footer: {
|
|
42
|
+
borderTop: 'none',
|
|
43
|
+
},
|
|
44
|
+
})
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
const base = definePartsStyle({
|
|
48
|
+
content: {
|
|
49
|
+
p: "11px 18px",
|
|
50
|
+
border: "1px solid #41444E !important",
|
|
51
|
+
bg: "#11131C",
|
|
52
|
+
color: "#FFF",
|
|
53
|
+
borderRadius: "8px",
|
|
54
|
+
maxW: '400px'
|
|
55
|
+
},
|
|
56
|
+
body: {
|
|
57
|
+
p: 0,
|
|
58
|
+
|
|
59
|
+
},
|
|
60
|
+
footer: {
|
|
61
|
+
borderTop: "none",
|
|
62
|
+
},
|
|
63
|
+
});
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
export const popoverTheme = defineMultiStyleConfig({
|
|
67
|
+
variants: {
|
|
68
|
+
thead,
|
|
69
|
+
base,
|
|
70
|
+
connect
|
|
71
|
+
},
|
|
72
|
+
});
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { progressAnatomy } from '@chakra-ui/anatomy'
|
|
2
|
+
import { createMultiStyleConfigHelpers } from '@chakra-ui/react'
|
|
3
|
+
const { definePartsStyle, defineMultiStyleConfig } = createMultiStyleConfigHelpers(progressAnatomy.keys)
|
|
4
|
+
|
|
5
|
+
const base = definePartsStyle({
|
|
6
|
+
label: {
|
|
7
|
+
borderRadius: '35px',
|
|
8
|
+
h: '8px',
|
|
9
|
+
},
|
|
10
|
+
filledTrack: {
|
|
11
|
+
bg: '#67E1FF',
|
|
12
|
+
borderRadius: '35px',
|
|
13
|
+
h: '8px',
|
|
14
|
+
},
|
|
15
|
+
track: {
|
|
16
|
+
bg: '#2F323B',
|
|
17
|
+
borderRadius: '35px',
|
|
18
|
+
h: '8px',
|
|
19
|
+
},
|
|
20
|
+
})
|
|
21
|
+
|
|
22
|
+
const upload = definePartsStyle({
|
|
23
|
+
label: {
|
|
24
|
+
borderRadius: '25px',
|
|
25
|
+
h: '6px',
|
|
26
|
+
},
|
|
27
|
+
filledTrack: {
|
|
28
|
+
bg: '#4BB957',
|
|
29
|
+
borderRadius: '25px',
|
|
30
|
+
h: '6px',
|
|
31
|
+
},
|
|
32
|
+
track: {
|
|
33
|
+
bg: '#E5E5E5',
|
|
34
|
+
borderRadius: '25px',
|
|
35
|
+
h: '6px',
|
|
36
|
+
},
|
|
37
|
+
})
|
|
38
|
+
|
|
39
|
+
export const progressTheme = defineMultiStyleConfig({
|
|
40
|
+
variants: { base, upload },
|
|
41
|
+
})
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { radioAnatomy } from '@chakra-ui/anatomy'
|
|
2
|
+
import { createMultiStyleConfigHelpers } from '@chakra-ui/react'
|
|
3
|
+
|
|
4
|
+
const { definePartsStyle, defineMultiStyleConfig } = createMultiStyleConfigHelpers(radioAnatomy.keys)
|
|
5
|
+
|
|
6
|
+
const coinDexBaseTheme = definePartsStyle({
|
|
7
|
+
control: {
|
|
8
|
+
boxSize: '14px',
|
|
9
|
+
bg: 'a4',
|
|
10
|
+
_checked: {
|
|
11
|
+
border: 'none',
|
|
12
|
+
bg: 'linear-gradient(90deg, rgba(255, 80, 132, 1) 0%, rgba(157, 98, 221, 1) 50%, rgba(26, 97, 253, 1) 100%)',
|
|
13
|
+
_before: {
|
|
14
|
+
boxSize: '8px',
|
|
15
|
+
bg: 'a4',
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
_focus: {
|
|
19
|
+
boxShadow: 'initial',
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
label: {
|
|
23
|
+
flexGrow: 1,
|
|
24
|
+
color: 'font',
|
|
25
|
+
fontSize: '12px',
|
|
26
|
+
fontWeight: 500,
|
|
27
|
+
ml: '8px',
|
|
28
|
+
},
|
|
29
|
+
})
|
|
30
|
+
|
|
31
|
+
const coinDexTickTheme = definePartsStyle({
|
|
32
|
+
control: {
|
|
33
|
+
boxSize: '16px',
|
|
34
|
+
border: '1.5px solid #73778A',
|
|
35
|
+
borderRadius: '50%',
|
|
36
|
+
_checked: {
|
|
37
|
+
border: 'none',
|
|
38
|
+
bgImage: 'url(/imgs/tick.png)',
|
|
39
|
+
bgSize: '100% 100%',
|
|
40
|
+
_before: {
|
|
41
|
+
content: 'initial',
|
|
42
|
+
},
|
|
43
|
+
_hover: {
|
|
44
|
+
bgImage: 'url(/imgs/tick.png)!important',
|
|
45
|
+
bgSize: '100% 100% !important',
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
_focus: {
|
|
49
|
+
boxShadow: 'initial',
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
label: {
|
|
53
|
+
flexGrow: 1,
|
|
54
|
+
color: 'font',
|
|
55
|
+
fontSize: '14px',
|
|
56
|
+
fontWeight: { sm: 400, xl: 500 },
|
|
57
|
+
ml: '14px',
|
|
58
|
+
},
|
|
59
|
+
})
|
|
60
|
+
|
|
61
|
+
export const radioTheme = defineMultiStyleConfig({
|
|
62
|
+
variants: {
|
|
63
|
+
'coinDex-base': coinDexBaseTheme,
|
|
64
|
+
'coinDex-tick': coinDexTickTheme,
|
|
65
|
+
},
|
|
66
|
+
})
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { defineStyle, defineStyleConfig } from '@chakra-ui/react'
|
|
2
|
+
|
|
3
|
+
const base = defineStyle({
|
|
4
|
+
container: {
|
|
5
|
+
'--switch-track-width': { sm: '44px', xl: '48px' } as any,
|
|
6
|
+
'--switch-track-diff': { sm: 'calc(44px - 22px)', xl: 'calc(48px - 24px)' } as any,
|
|
7
|
+
},
|
|
8
|
+
track: {
|
|
9
|
+
bg: 'c8',
|
|
10
|
+
p: '0px',
|
|
11
|
+
h: { sm: '20px', xl: '24px' },
|
|
12
|
+
w: { sm: '44px', xl: '48px' },
|
|
13
|
+
_checked: {
|
|
14
|
+
bg: '#33D26A',
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
thumb: {
|
|
18
|
+
h: { sm: '16px', xl: '18px' },
|
|
19
|
+
w: { sm: '16px', xl: '18px' },
|
|
20
|
+
bg: 'a4',
|
|
21
|
+
mt: '3px',
|
|
22
|
+
ml: '3px',
|
|
23
|
+
},
|
|
24
|
+
})
|
|
25
|
+
|
|
26
|
+
export const switchTheme = defineStyleConfig({
|
|
27
|
+
variants: {
|
|
28
|
+
base,
|
|
29
|
+
},
|
|
30
|
+
})
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
import { tableAnatomy } from "@chakra-ui/anatomy";
|
|
2
|
+
import { createMultiStyleConfigHelpers } from "@chakra-ui/react";
|
|
3
|
+
|
|
4
|
+
const { definePartsStyle, defineMultiStyleConfig } =
|
|
5
|
+
createMultiStyleConfigHelpers(tableAnatomy.keys);
|
|
6
|
+
|
|
7
|
+
const base = definePartsStyle(() => {
|
|
8
|
+
return {
|
|
9
|
+
table: {
|
|
10
|
+
bg: "#232630",
|
|
11
|
+
px: '0',
|
|
12
|
+
// border: '1px solid #1C1C1C',
|
|
13
|
+
borderRadius: "0",
|
|
14
|
+
},
|
|
15
|
+
thead: {
|
|
16
|
+
bg: '#14161E',
|
|
17
|
+
th:{
|
|
18
|
+
h: { xl: "36px", sm: '.32rem' },
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
th: {
|
|
22
|
+
// py: "25px",
|
|
23
|
+
p: { xl: "12px 24px", sm: '.1rem .16rem' },
|
|
24
|
+
fontSize: "14px",
|
|
25
|
+
h: { xl: "44px", sm: '.4rem' },
|
|
26
|
+
lineHeight: "1em",
|
|
27
|
+
fontWeight: "500",
|
|
28
|
+
color: "#D1D4E2",
|
|
29
|
+
textTransform: "initial",
|
|
30
|
+
borderBottom: "1px solid #2B2E35",
|
|
31
|
+
fontFamily: "Manrope Variable; sans-serif !important",
|
|
32
|
+
letterSpacing: '0'
|
|
33
|
+
|
|
34
|
+
},
|
|
35
|
+
tbody: {
|
|
36
|
+
fontSize: "14px",
|
|
37
|
+
fontWeight: "500",
|
|
38
|
+
color: "a4",
|
|
39
|
+
tr: {
|
|
40
|
+
borderBottom: "1px dashed #2B2E35",
|
|
41
|
+
h: { xl: "44px", sm: '.4rem' },
|
|
42
|
+
_even:{
|
|
43
|
+
bg:'#14161E'
|
|
44
|
+
},
|
|
45
|
+
_hover: {
|
|
46
|
+
pos: "relative",
|
|
47
|
+
zIndex: 0,
|
|
48
|
+
bg: "#2F323D",
|
|
49
|
+
_after: {
|
|
50
|
+
content: '""',
|
|
51
|
+
pos: "absolute",
|
|
52
|
+
left: 0,
|
|
53
|
+
top: 0,
|
|
54
|
+
boxSize: "100%",
|
|
55
|
+
bg: "#2F323D",
|
|
56
|
+
borderRadius: "4px",
|
|
57
|
+
zIndex: -1,
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
_last: {
|
|
61
|
+
textAlign: "right",
|
|
62
|
+
borderBottom: 'none'
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
},
|
|
66
|
+
td: {
|
|
67
|
+
p: { xl: "12px 24px", sm: '.1rem .16rem' },
|
|
68
|
+
lineHeight: "1.5em",
|
|
69
|
+
minH: { xl: "48px", sm: '.4rem' },
|
|
70
|
+
},
|
|
71
|
+
};
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
const holder = definePartsStyle(() => {
|
|
75
|
+
return {
|
|
76
|
+
table: {
|
|
77
|
+
bg: "#232630",
|
|
78
|
+
px: '0',
|
|
79
|
+
// border: '1px solid #1C1C1C',
|
|
80
|
+
borderRadius: "0",
|
|
81
|
+
},
|
|
82
|
+
thead: {
|
|
83
|
+
bg: '#14161E',
|
|
84
|
+
th:{
|
|
85
|
+
h: { xl: "36px", sm: '.32rem' },
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
th: {
|
|
89
|
+
// py: "25px",
|
|
90
|
+
p: { xl: "12px 15px", sm: '.1rem .14rem' },
|
|
91
|
+
fontSize: "14px",
|
|
92
|
+
h: { xl: "44px", sm: '.4rem' },
|
|
93
|
+
lineHeight: "1em",
|
|
94
|
+
fontWeight: "500",
|
|
95
|
+
color: "#D1D4E2",
|
|
96
|
+
textTransform: "initial",
|
|
97
|
+
borderBottom: "1px solid #2B2E35",
|
|
98
|
+
fontFamily: "Manrope Variable; sans-serif !important",
|
|
99
|
+
letterSpacing: '0'
|
|
100
|
+
|
|
101
|
+
},
|
|
102
|
+
tbody: {
|
|
103
|
+
fontSize: "14px",
|
|
104
|
+
fontWeight: "500",
|
|
105
|
+
color: "a4",
|
|
106
|
+
tr: {
|
|
107
|
+
borderBottom: "1px dashed #2B2E35",
|
|
108
|
+
h: { xl: "44px", sm: '.4rem' },
|
|
109
|
+
_even:{
|
|
110
|
+
bg:'#14161E'
|
|
111
|
+
},
|
|
112
|
+
_hover: {
|
|
113
|
+
pos: "relative",
|
|
114
|
+
zIndex: 0,
|
|
115
|
+
bg: "#2F323D",
|
|
116
|
+
_after: {
|
|
117
|
+
content: '""',
|
|
118
|
+
pos: "absolute",
|
|
119
|
+
left: 0,
|
|
120
|
+
top: 0,
|
|
121
|
+
boxSize: "100%",
|
|
122
|
+
bg: "#2F323D",
|
|
123
|
+
borderRadius: "4px",
|
|
124
|
+
zIndex: -1,
|
|
125
|
+
},
|
|
126
|
+
},
|
|
127
|
+
_last: {
|
|
128
|
+
textAlign: "right",
|
|
129
|
+
borderBottom: 'none'
|
|
130
|
+
},
|
|
131
|
+
},
|
|
132
|
+
},
|
|
133
|
+
td: {
|
|
134
|
+
p: { xl: "12px 15px", sm: '.1rem .16rem' },
|
|
135
|
+
lineHeight: "1.5em",
|
|
136
|
+
minH: { xl: "48px", sm: '.4rem' },
|
|
137
|
+
},
|
|
138
|
+
};
|
|
139
|
+
});
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
const variants = {
|
|
144
|
+
base,
|
|
145
|
+
holder
|
|
146
|
+
};
|
|
147
|
+
|
|
148
|
+
// export the component theme
|
|
149
|
+
export const tableTheme = defineMultiStyleConfig({ variants });
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { tabsAnatomy } from '@chakra-ui/anatomy'
|
|
2
|
+
import { createMultiStyleConfigHelpers } from '@chakra-ui/react'
|
|
3
|
+
|
|
4
|
+
const { definePartsStyle, defineMultiStyleConfig } = createMultiStyleConfigHelpers(tabsAnatomy.keys)
|
|
5
|
+
|
|
6
|
+
const base = definePartsStyle({
|
|
7
|
+
root: {},
|
|
8
|
+
tablist: {
|
|
9
|
+
pb: '24px',
|
|
10
|
+
borderBottom: '1px solid #3D3D3D',
|
|
11
|
+
},
|
|
12
|
+
tab: {
|
|
13
|
+
h: '40px',
|
|
14
|
+
p: '0 16px',
|
|
15
|
+
color: 'a4',
|
|
16
|
+
fontSize: { sm: '12px', xl: '16px' },
|
|
17
|
+
fontWeight: 500,
|
|
18
|
+
lineHeight: '1em',
|
|
19
|
+
borderRadius: '10px',
|
|
20
|
+
_selected: {
|
|
21
|
+
bg: '#282828',
|
|
22
|
+
color: 'a4',
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
tabpanel: {
|
|
26
|
+
p: '20px 0 0 0',
|
|
27
|
+
},
|
|
28
|
+
})
|
|
29
|
+
|
|
30
|
+
const buttonGroup = definePartsStyle({
|
|
31
|
+
root: {},
|
|
32
|
+
tablist: {
|
|
33
|
+
color: 'a4',
|
|
34
|
+
bg: '#1B1B1B',
|
|
35
|
+
borderRadius: '12px',
|
|
36
|
+
p: '4px',
|
|
37
|
+
},
|
|
38
|
+
tab: {
|
|
39
|
+
h: '42px',
|
|
40
|
+
p: '0 30px',
|
|
41
|
+
color: 'a4',
|
|
42
|
+
fontSize: { sm: '12px', xl: '16px' },
|
|
43
|
+
fontWeight: 600,
|
|
44
|
+
lineHeight: '1em',
|
|
45
|
+
borderRadius: '8px',
|
|
46
|
+
_selected: {
|
|
47
|
+
bg: '#373737',
|
|
48
|
+
color: 'a4',
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
tabpanel: {
|
|
52
|
+
p: 0,
|
|
53
|
+
},
|
|
54
|
+
})
|
|
55
|
+
|
|
56
|
+
const tableGroup = definePartsStyle({
|
|
57
|
+
root: {},
|
|
58
|
+
tablist: {
|
|
59
|
+
bg: 'none',
|
|
60
|
+
borderTopRadius: '10px',
|
|
61
|
+
pt: '16px',
|
|
62
|
+
fontFamily: "PingFang SC"
|
|
63
|
+
},
|
|
64
|
+
tab: {
|
|
65
|
+
h: '56px',
|
|
66
|
+
p: '0 30px',
|
|
67
|
+
color: '#878EA3',
|
|
68
|
+
bg: '#14161E',
|
|
69
|
+
fontSize: { sm: '12px', xl: '14px' },
|
|
70
|
+
fontWeight: 400,
|
|
71
|
+
borderTopRadius: '10px',
|
|
72
|
+
_selected: {
|
|
73
|
+
bg: '#232630',
|
|
74
|
+
color: '#FFF',
|
|
75
|
+
},
|
|
76
|
+
},
|
|
77
|
+
tabpanel: {
|
|
78
|
+
p: 0,
|
|
79
|
+
},
|
|
80
|
+
})
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
const variants = {
|
|
84
|
+
base,
|
|
85
|
+
buttonGroup,
|
|
86
|
+
tableGroup
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
// export the component theme
|
|
90
|
+
export const tabsTheme = defineMultiStyleConfig({ variants })
|