@digitalc/dxp-ui 0.0.5-alpha.15 → 0.0.5-alpha.17
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 +81 -47
- package/es/assets/token.json +128 -102
- package/es/components/Accordion/designTokens.d.ts +3 -3
- package/es/components/Accordion/designTokens.js +22 -14
- package/es/components/Accordion/index.js +8 -4
- package/es/components/Amount/designTokens.d.ts +2 -2
- package/es/components/Amount/designTokens.js +12 -8
- package/es/components/Amount/index.d.ts +3 -10
- package/es/components/Amount/index.js +122 -136
- package/es/components/Button/designTokens.d.ts +18 -3
- package/es/components/Button/designTokens.js +136 -122
- package/es/components/Button/index.d.ts +16 -5
- package/es/components/Button/index.js +89 -94
- package/es/components/Button/style/index.less +1 -1
- package/es/components/Card/designTokens.d.ts +9 -0
- package/es/components/Card/designTokens.js +14 -0
- package/es/components/Card/index.d.ts +15 -0
- package/es/components/Card/index.js +66 -0
- package/es/components/Card/style/index.less +45 -0
- package/es/components/Card/style/variables.less +4 -0
- package/es/components/Chip/designTokens.d.ts +2 -2
- package/es/components/Chip/designTokens.js +25 -21
- package/es/components/Chip/index.js +9 -8
- package/es/components/Divider/designTokens.d.ts +4 -0
- package/es/components/Divider/designTokens.js +9 -0
- package/es/components/Divider/index.d.ts +3 -8
- package/es/components/Divider/index.js +31 -49
- package/es/components/Drawer/designTokens.d.ts +2 -2
- package/es/components/Drawer/designTokens.js +30 -26
- package/es/components/Drawer/index.d.ts +6 -2
- package/es/components/Drawer/index.js +71 -68
- package/es/components/Drawer/style/index.less +13 -7
- package/es/components/GlobalTokenProvider/index.d.ts +11 -0
- package/es/components/GlobalTokenProvider/index.js +16 -0
- package/es/components/Icon/designTokens.d.ts +3 -3
- package/es/components/Icon/designTokens.js +11 -6
- package/es/components/Icon/index.js +6 -2
- package/es/components/IconButton/designTokens.d.ts +3 -4
- package/es/components/IconButton/designTokens.js +38 -32
- package/es/components/IconButton/index.d.ts +1 -1
- package/es/components/IconButton/index.js +7 -7
- package/es/components/Image/index.d.ts +1 -1
- package/es/components/Image/index.js +4 -3
- package/es/components/ListItem/designTokens.d.ts +4 -2
- package/es/components/ListItem/designTokens.js +36 -30
- package/es/components/ListItem/index.d.ts +12 -2
- package/es/components/ListItem/index.js +95 -30
- package/es/components/ListItem/style/index.less +42 -9
- package/es/components/Modal/designTokens.d.ts +11 -20
- package/es/components/Modal/designTokens.js +39 -30
- package/es/components/Modal/index.js +24 -11
- package/es/components/Navigation/designTokens.d.ts +9 -8
- package/es/components/Navigation/designTokens.js +24 -18
- package/es/components/Navigation/index.d.ts +1 -0
- package/es/components/Navigation/index.js +14 -10
- package/es/components/Notification/designTokens.d.ts +9 -0
- package/es/components/Notification/designTokens.js +14 -0
- package/es/components/Notification/index.d.ts +12 -0
- package/es/components/Notification/index.js +54 -0
- package/es/components/Notification/style/index.less +45 -0
- package/es/components/Notification/style/variables.less +4 -0
- package/es/components/Search/designTokens.d.ts +4 -4
- package/es/components/Search/designTokens.js +57 -46
- package/es/components/Search/index.js +15 -9
- package/es/components/Stepper/designTokens.d.ts +4 -5
- package/es/components/Stepper/designTokens.js +48 -40
- package/es/components/Stepper/index.d.ts +9 -10
- package/es/components/Stepper/index.js +139 -135
- package/es/components/Stepper/style/index.less +27 -12
- package/es/components/StickyFooter/designTokens.d.ts +2 -2
- package/es/components/StickyFooter/designTokens.js +20 -16
- package/es/components/StickyFooter/index.d.ts +2 -2
- package/es/components/StickyFooter/index.js +68 -39
- package/es/components/StickyFooter/style/index.less +5 -3
- package/es/components/Tabs/designTokens.d.ts +6 -6
- package/es/components/Tabs/designTokens.js +77 -60
- package/es/components/Tabs/index.js +11 -6
- package/es/components/Tag/designTokens.d.ts +42 -42
- package/es/components/Tag/designTokens.js +139 -95
- package/es/components/Tag/index.d.ts +1 -1
- package/es/components/Tag/index.js +16 -3
- package/es/components/Text/designTokens.d.ts +19 -10
- package/es/components/Text/designTokens.js +65 -51
- package/es/components/Text/index.d.ts +2 -1
- package/es/components/Text/index.js +42 -12
- package/es/components/TextInputInside/designTokens.d.ts +3 -12
- package/es/components/TextInputInside/designTokens.js +59 -57
- package/es/components/TextInputInside/index.js +10 -7
- package/es/components/TextInputOutside/designTokens.d.ts +5 -5
- package/es/components/TextInputOutside/designTokens.js +77 -61
- package/es/components/TextInputOutside/index.js +12 -7
- package/es/components/TextLink/designTokens.d.ts +2 -2
- package/es/components/TextLink/designTokens.js +14 -10
- package/es/components/TextLink/index.js +2 -1
- package/es/components/Toast/designTokens.d.ts +2 -2
- package/es/components/Toast/designTokens.js +20 -19
- package/es/components/Toast/index.js +2 -1
- package/es/components/Toggle/designTokens.d.ts +2 -2
- package/es/components/Toggle/designTokens.js +16 -12
- package/es/components/Toggle/index.js +2 -1
- package/es/components/index.d.ts +7 -1
- package/es/components/index.js +6 -2
- package/es/constants/index.d.ts +4 -1
- package/es/constants/index.js +5 -1
- package/es/index.d.ts +2 -0
- package/es/index.js +4 -0
- package/es/tokens/DXPGlobal.d.ts +27 -19
- package/es/tokens/DXPGlobal.js +3 -2
- package/es/utils/TokenContext.d.ts +14 -0
- package/es/utils/TokenContext.js +91 -0
- package/es/utils/deviceType.d.ts +14 -0
- package/es/utils/deviceType.js +65 -0
- package/es/utils/index.d.ts +9 -0
- package/es/utils/index.js +9 -0
- package/es/utils/tokenHelper.js +2 -5
- package/es/utils/tokenManager.d.ts +82 -20
- package/es/utils/tokenManager.js +857 -779
- package/lib/assets/token.json +128 -102
- package/lib/components/Accordion/designTokens.d.ts +3 -3
- package/lib/components/Accordion/designTokens.js +25 -17
- package/lib/components/Accordion/index.js +8 -4
- package/lib/components/Amount/designTokens.d.ts +2 -2
- package/lib/components/Amount/designTokens.js +13 -9
- package/lib/components/Amount/index.d.ts +3 -10
- package/lib/components/Amount/index.js +84 -90
- package/lib/components/Button/designTokens.d.ts +18 -3
- package/lib/components/Button/designTokens.js +120 -114
- package/lib/components/Button/index.d.ts +16 -5
- package/lib/components/Button/index.js +59 -51
- package/lib/components/Button/style/index.less +1 -1
- package/lib/components/Card/designTokens.d.ts +9 -0
- package/lib/components/Card/designTokens.js +37 -0
- package/lib/components/Card/index.d.ts +15 -0
- package/lib/components/Card/index.js +156 -0
- package/lib/components/Card/style/index.less +45 -0
- package/lib/components/Card/style/variables.less +4 -0
- package/lib/components/Chip/designTokens.d.ts +2 -2
- package/lib/components/Chip/designTokens.js +25 -21
- package/lib/components/Chip/index.js +8 -5
- package/lib/components/Divider/designTokens.d.ts +4 -0
- package/lib/components/Divider/designTokens.js +32 -0
- package/lib/components/Divider/index.d.ts +3 -8
- package/lib/components/Divider/index.js +41 -43
- package/lib/components/Drawer/designTokens.d.ts +2 -2
- package/lib/components/Drawer/designTokens.js +31 -38
- package/lib/components/Drawer/index.d.ts +6 -2
- package/lib/components/Drawer/index.js +80 -53
- package/lib/components/Drawer/style/index.less +13 -7
- package/lib/components/GlobalTokenProvider/index.d.ts +11 -0
- package/lib/components/GlobalTokenProvider/index.js +40 -0
- package/lib/components/Icon/designTokens.d.ts +3 -3
- package/lib/components/Icon/designTokens.js +11 -17
- package/lib/components/Icon/index.js +5 -4
- package/lib/components/IconButton/designTokens.d.ts +3 -4
- package/lib/components/IconButton/designTokens.js +41 -34
- package/lib/components/IconButton/index.d.ts +1 -1
- package/lib/components/IconButton/index.js +25 -23
- package/lib/components/Image/index.d.ts +1 -1
- package/lib/components/Image/index.js +4 -4
- package/lib/components/ListItem/designTokens.d.ts +4 -2
- package/lib/components/ListItem/designTokens.js +36 -41
- package/lib/components/ListItem/index.d.ts +12 -2
- package/lib/components/ListItem/index.js +115 -46
- package/lib/components/ListItem/style/index.less +42 -9
- package/lib/components/Modal/designTokens.d.ts +11 -20
- package/lib/components/Modal/designTokens.js +44 -60
- package/lib/components/Modal/index.js +63 -16
- package/lib/components/Navigation/designTokens.d.ts +9 -8
- package/lib/components/Navigation/designTokens.js +24 -29
- package/lib/components/Navigation/index.d.ts +1 -0
- package/lib/components/Navigation/index.js +13 -12
- package/lib/components/Notification/designTokens.d.ts +9 -0
- package/lib/components/Notification/designTokens.js +37 -0
- package/lib/components/Notification/index.d.ts +12 -0
- package/lib/components/Notification/index.js +110 -0
- package/lib/components/Notification/style/index.less +45 -0
- package/lib/components/Notification/style/variables.less +4 -0
- package/lib/components/Search/designTokens.d.ts +4 -4
- package/lib/components/Search/designTokens.js +61 -49
- package/lib/components/Search/index.js +31 -9
- package/lib/components/Stepper/designTokens.d.ts +4 -5
- package/lib/components/Stepper/designTokens.js +70 -62
- package/lib/components/Stepper/index.d.ts +9 -10
- package/lib/components/Stepper/index.js +104 -53
- package/lib/components/Stepper/style/index.less +27 -12
- package/lib/components/StickyFooter/designTokens.d.ts +2 -2
- package/lib/components/StickyFooter/designTokens.js +21 -17
- package/lib/components/StickyFooter/index.d.ts +2 -2
- package/lib/components/StickyFooter/index.js +50 -18
- package/lib/components/StickyFooter/style/index.less +5 -3
- package/lib/components/Tabs/designTokens.d.ts +6 -6
- package/lib/components/Tabs/designTokens.js +80 -63
- package/lib/components/Tabs/index.js +19 -12
- package/lib/components/Tag/designTokens.d.ts +42 -42
- package/lib/components/Tag/designTokens.js +159 -115
- package/lib/components/Tag/index.d.ts +1 -1
- package/lib/components/Tag/index.js +27 -14
- package/lib/components/Text/designTokens.d.ts +19 -10
- package/lib/components/Text/designTokens.js +65 -51
- package/lib/components/Text/index.d.ts +2 -1
- package/lib/components/Text/index.js +407 -297
- package/lib/components/TextInputInside/designTokens.d.ts +3 -12
- package/lib/components/TextInputInside/designTokens.js +62 -75
- package/lib/components/TextInputInside/index.js +10 -7
- package/lib/components/TextInputOutside/designTokens.d.ts +5 -5
- package/lib/components/TextInputOutside/designTokens.js +82 -66
- package/lib/components/TextInputOutside/index.js +12 -8
- package/lib/components/TextLink/designTokens.d.ts +2 -2
- package/lib/components/TextLink/designTokens.js +14 -21
- package/lib/components/TextLink/index.js +3 -2
- package/lib/components/Toast/designTokens.d.ts +2 -2
- package/lib/components/Toast/designTokens.js +20 -16
- package/lib/components/Toast/index.js +7 -6
- package/lib/components/Toggle/designTokens.d.ts +2 -2
- package/lib/components/Toggle/designTokens.js +16 -23
- package/lib/components/Toggle/index.js +3 -2
- package/lib/components/index.d.ts +7 -1
- package/lib/components/index.js +10 -2
- package/lib/constants/index.d.ts +4 -1
- package/lib/constants/index.js +5 -1
- package/lib/index.d.ts +2 -0
- package/lib/index.js +22 -0
- package/lib/tokens/DXPGlobal.d.ts +27 -19
- package/lib/tokens/DXPGlobal.js +1 -1
- package/lib/utils/TokenContext.d.ts +14 -0
- package/lib/utils/TokenContext.js +85 -0
- package/lib/utils/deviceType.d.ts +14 -0
- package/lib/utils/deviceType.js +56 -0
- package/lib/utils/index.d.ts +9 -0
- package/lib/utils/index.js +44 -0
- package/lib/utils/tokenHelper.js +2 -12
- package/lib/utils/tokenManager.d.ts +82 -20
- package/lib/utils/tokenManager.js +840 -777
- package/package.json +14 -11
- package/umd/dxp-ui.min.css +1 -1
- package/umd/dxp-ui.min.js +1 -1
- package/lib/components/Button/demo/index.d.ts +0 -3
- package/lib/components/Button/demo/index.js +0 -138
|
@@ -1,25 +1,23 @@
|
|
|
1
|
-
declare const
|
|
1
|
+
declare const useOtherDesignTokens: () => {
|
|
2
2
|
fontSizeDesktopTitleT23: string;
|
|
3
3
|
fontSizeDesktopContentC15: string;
|
|
4
4
|
fontSizeDesktopContentC21: string;
|
|
5
|
+
fontSizeDesktopContentC23: string;
|
|
5
6
|
fontSizeDesktopTitleT21: string;
|
|
7
|
+
fontSizeDesktopTitleT16: string;
|
|
6
8
|
fontSizeDesktopTitleT15: string;
|
|
9
|
+
fontSizeDesktopTitleT14: string;
|
|
10
|
+
fontSizeDesktopTitleT13: string;
|
|
11
|
+
fontSizeDesktopTitleT12: string;
|
|
7
12
|
fontSizeDesktopContentC13: string;
|
|
8
13
|
fontSizeDesktopContentC11: string;
|
|
9
14
|
fontSizeDesktopContentC12: string;
|
|
10
15
|
fontSizeDesktopContentC14: string;
|
|
11
|
-
|
|
16
|
+
fontSizeDesktopTitleT34: string;
|
|
12
17
|
fontSizeDesktopTitleT32: string;
|
|
13
18
|
fontSizeDesktopTitleT41: string;
|
|
14
19
|
fontSizeDesktopContentC05: string;
|
|
15
20
|
fontSizeDesktopContentC04: string;
|
|
16
|
-
fontSizeDesktopTitleT7: string;
|
|
17
|
-
fontSizeDesktopTitleT8: string;
|
|
18
|
-
fontSizeDesktopTitleT2: string;
|
|
19
|
-
fontSizeDesktopTitleT5: string;
|
|
20
|
-
fontSizeDesktopTitleT3: string;
|
|
21
|
-
fontSizeDesktopTitleT4: string;
|
|
22
|
-
fontSizeDesktopTitleT10: string;
|
|
23
21
|
fontSizeMobileContentC04: string;
|
|
24
22
|
fontSizeMobileContentC05: string;
|
|
25
23
|
fontSizeMobileContentC11: string;
|
|
@@ -28,10 +26,12 @@ declare const otherDesignTokens: {
|
|
|
28
26
|
fontSizeMobileContentC14: string;
|
|
29
27
|
fontSizeMobileContentC15: string;
|
|
30
28
|
fontSizeMobileContentC21: string;
|
|
29
|
+
fontSizeMobileContentC23: string;
|
|
31
30
|
fontSizeMobileTitleT12: string;
|
|
32
31
|
fontSizeMobileTitleT13: string;
|
|
33
32
|
fontSizeMobileTitleT14: string;
|
|
34
33
|
fontSizeMobileTitleT15: string;
|
|
34
|
+
fontSizeMobileTitleT16: string;
|
|
35
35
|
fontSizeMobileTitleT21: string;
|
|
36
36
|
fontSizeMobileTitleT23: string;
|
|
37
37
|
fontSizeMobileTitleT24: string;
|
|
@@ -47,5 +47,14 @@ declare const otherDesignTokens: {
|
|
|
47
47
|
fontFamilySecondaryRegular: any;
|
|
48
48
|
fontFamilySecondarySemiBold: any;
|
|
49
49
|
fontFamilySecondaryBold: any;
|
|
50
|
+
lineHeightT15M: number;
|
|
51
|
+
lineHeightT16M: number;
|
|
52
|
+
lineHeightC21M: number;
|
|
53
|
+
lineHeightC14: number;
|
|
54
|
+
lineHeightC21: number;
|
|
55
|
+
lineHeightT15: number;
|
|
56
|
+
lineHeightT16: number;
|
|
57
|
+
lineHeightC15M: number;
|
|
58
|
+
lineHeightC15: number;
|
|
50
59
|
};
|
|
51
|
-
export {
|
|
60
|
+
export { useOtherDesignTokens };
|
|
@@ -1,52 +1,66 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
1
|
+
import { useDynamicTokens } from "../../utils";
|
|
2
|
+
import { wSacle } from "../../utils/scaleTool";
|
|
3
|
+
var useOtherDesignTokens = function useOtherDesignTokens() {
|
|
4
|
+
var getToken = useDynamicTokens();
|
|
5
|
+
var otherDesignTokens = {
|
|
6
|
+
fontSizeDesktopTitleT23: "".concat(wSacle(getToken('fontSizeDesktopTitleT23')), "px"),
|
|
7
|
+
fontSizeDesktopContentC15: "".concat(wSacle(getToken('fontSizeDesktopContentC15')), "px"),
|
|
8
|
+
fontSizeDesktopContentC21: "".concat(wSacle(getToken('fontSizeDesktopContentC21')), "px"),
|
|
9
|
+
fontSizeDesktopContentC23: "".concat(wSacle(getToken('fontSizeDesktopContentC23')), "px"),
|
|
10
|
+
fontSizeDesktopTitleT21: "".concat(wSacle(getToken('fontSizeDesktopTitleT21')), "px"),
|
|
11
|
+
fontSizeDesktopTitleT16: "".concat(wSacle(getToken('fontSizeDesktopTitleT16')), "px"),
|
|
12
|
+
fontSizeDesktopTitleT15: "".concat(wSacle(getToken('fontSizeDesktopTitleT15')), "px"),
|
|
13
|
+
fontSizeDesktopTitleT14: "".concat(wSacle(getToken('fontSizeDesktopTitleT14')), "px"),
|
|
14
|
+
fontSizeDesktopTitleT13: "".concat(wSacle(getToken('fontSizeDesktopTitleT13')), "px"),
|
|
15
|
+
fontSizeDesktopTitleT12: "".concat(wSacle(getToken('fontSizeDesktopTitleT12')), "px"),
|
|
16
|
+
fontSizeDesktopContentC13: "".concat(wSacle(getToken('fontSizeDesktopContentC13')), "px"),
|
|
17
|
+
fontSizeDesktopContentC11: "".concat(wSacle(getToken('fontSizeDesktopContentC11')), "px"),
|
|
18
|
+
fontSizeDesktopContentC12: "".concat(wSacle(getToken('fontSizeDesktopContentC12')), "px"),
|
|
19
|
+
fontSizeDesktopContentC14: "".concat(wSacle(getToken('fontSizeDesktopContentC14')), "px"),
|
|
20
|
+
fontSizeDesktopTitleT34: "".concat(wSacle(getToken('fontSizeDesktopTitleT34')), "px"),
|
|
21
|
+
fontSizeDesktopTitleT32: "".concat(wSacle(getToken('fontSizeDesktopTitleT32')), "px"),
|
|
22
|
+
fontSizeDesktopTitleT41: "".concat(wSacle(getToken('fontSizeDesktopTitleT41')), "px"),
|
|
23
|
+
fontSizeDesktopContentC05: "".concat(wSacle(getToken('fontSizeDesktopContentC05')), "px"),
|
|
24
|
+
fontSizeDesktopContentC04: "".concat(wSacle(getToken('fontSizeDesktopContentC04')), "px"),
|
|
25
|
+
fontSizeMobileContentC04: "".concat(wSacle(getToken('fontSizeMobileContentC04')), "px"),
|
|
26
|
+
fontSizeMobileContentC05: "".concat(wSacle(getToken('fontSizeMobileContentC05')), "px"),
|
|
27
|
+
fontSizeMobileContentC11: "".concat(wSacle(getToken('fontSizeMobileContentC11')), "px"),
|
|
28
|
+
fontSizeMobileContentC12: "".concat(wSacle(getToken('fontSizeMobileContentC12')), "px"),
|
|
29
|
+
fontSizeMobileContentC13: "".concat(wSacle(getToken('fontSizeMobileContentC13')), "px"),
|
|
30
|
+
fontSizeMobileContentC14: "".concat(wSacle(getToken('fontSizeMobileContentC14')), "px"),
|
|
31
|
+
fontSizeMobileContentC15: "".concat(wSacle(getToken('fontSizeMobileContentC15')), "px"),
|
|
32
|
+
fontSizeMobileContentC21: "".concat(wSacle(getToken('fontSizeMobileContentC21')), "px"),
|
|
33
|
+
fontSizeMobileContentC23: "".concat(wSacle(getToken('fontSizeMobileContentC23')), "px"),
|
|
34
|
+
fontSizeMobileTitleT12: "".concat(wSacle(getToken('fontSizeMobileTitleT12')), "px"),
|
|
35
|
+
fontSizeMobileTitleT13: "".concat(wSacle(getToken('fontSizeMobileTitleT13')), "px"),
|
|
36
|
+
fontSizeMobileTitleT14: "".concat(wSacle(getToken('fontSizeMobileTitleT14')), "px"),
|
|
37
|
+
fontSizeMobileTitleT15: "".concat(wSacle(getToken('fontSizeMobileTitleT15')), "px"),
|
|
38
|
+
fontSizeMobileTitleT16: "".concat(wSacle(getToken('fontSizeMobileTitleT16')), "px"),
|
|
39
|
+
fontSizeMobileTitleT21: "".concat(wSacle(getToken('fontSizeMobileTitleT21')), "px"),
|
|
40
|
+
fontSizeMobileTitleT23: "".concat(wSacle(getToken('fontSizeMobileTitleT23')), "px"),
|
|
41
|
+
fontSizeMobileTitleT24: "".concat(wSacle(getToken('fontSizeMobileTitleT24')), "px"),
|
|
42
|
+
fontSizeMobileTitleT25: "".concat(wSacle(getToken('fontSizeMobileTitleT25')), "px"),
|
|
43
|
+
fontSizeMobileTitleT32: "".concat(wSacle(getToken('fontSizeMobileTitleT32')), "px"),
|
|
44
|
+
fontSizeMobileTitleT34: "".concat(wSacle(getToken('fontSizeMobileTitleT34')), "px"),
|
|
45
|
+
fontSizeMobileTitleT41: "".concat(wSacle(getToken('fontSizeMobileTitleT41')), "px"),
|
|
46
|
+
fontSizeMobileTitleT45: "".concat(wSacle(getToken('fontSizeMobileTitleT45')), "px"),
|
|
47
|
+
fontSizeMobileNavigation: "".concat(wSacle(getToken('fontSizeMobileNavigation')), "px"),
|
|
48
|
+
fontFamilyPromaryRegular: getToken('fontFamilyPromaryRegular'),
|
|
49
|
+
fontFamilyPromarySemiBold: getToken('fontFamilyPromarySemiBold'),
|
|
50
|
+
fontFamilyPromaryBold: getToken('fontFamilyPromaryBold'),
|
|
51
|
+
fontFamilySecondaryRegular: getToken('fontFamilySecondaryRegular'),
|
|
52
|
+
fontFamilySecondarySemiBold: getToken('fontFamilySecondarySemiBold'),
|
|
53
|
+
fontFamilySecondaryBold: getToken('fontFamilySecondaryBold'),
|
|
54
|
+
lineHeightT15M: getToken('fontSizeMobileTitleT15') >= 20 ? 1.25 : 1.5,
|
|
55
|
+
lineHeightT16M: getToken('fontSizeMobileTitleT16') >= 20 ? 1.25 : 1.5,
|
|
56
|
+
lineHeightC21M: getToken('fontSizeMobileContentC21') >= 20 ? 1.25 : 1.5,
|
|
57
|
+
lineHeightC14: getToken('fontSizeDesktopContentC14') >= 20 ? 1.25 : 1.5,
|
|
58
|
+
lineHeightC21: getToken('fontSizeDesktopContentC21') >= 20 ? 1.25 : 1.5,
|
|
59
|
+
lineHeightT15: getToken('fontSizeDesktopTitleT15') >= 20 ? 1.25 : 1.5,
|
|
60
|
+
lineHeightT16: getToken('fontSizeDesktopTitleT16') >= 20 ? 1.25 : 1.5,
|
|
61
|
+
lineHeightC15M: getToken('fontSizeMobileContentC15') >= 20 ? 1.25 : 1.5,
|
|
62
|
+
lineHeightC15: getToken('fontSizeDesktopContentC15') >= 20 ? 1.25 : 1.5
|
|
63
|
+
};
|
|
64
|
+
return otherDesignTokens;
|
|
51
65
|
};
|
|
52
|
-
export {
|
|
66
|
+
export { useOtherDesignTokens };
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import './style/index.less';
|
|
3
|
-
export type Size = 'TitleT41Bold' | 'TitleT32Bold' | 'TitleT23Bold' | 'TitleT21Bold' | 'TitleT15Bold' | 'ContentC14Bold' | 'ContentC14Regular' | 'ContentC14Strikethrough' | 'ContentC14TextLink' | 'ContentC13Bold' | 'ContentC13Regular' | 'ContentC13Strikethrough' | 'ContentC13TextLink' | 'ContentC12Regular' | 'ContentC12Strikethrough' | 'ContentC12SemiBold' | 'ContentC12Bold' | 'ContentC12TextLink' | '
|
|
3
|
+
export type Size = 'TitleT41Bold' | 'TitleT34Bold' | 'TitleT32Bold' | 'TitleT23Bold' | 'TitleT21Bold' | 'TitleT16Bold' | 'TitleT15Bold' | 'TitleT14Bold' | 'TitleT13Bold' | 'TitleT12Bold' | 'ContentC23Bold' | 'ContentC21Bold' | 'ContentC15Bold' | 'ContentC14Bold' | 'ContentC14Regular' | 'ContentC14Strikethrough' | 'ContentC14TextLink' | 'ContentC13Bold' | 'ContentC13Regular' | 'ContentC13Strikethrough' | 'ContentC13TextLink' | 'ContentC12Regular' | 'ContentC12Strikethrough' | 'ContentC12SemiBold' | 'ContentC12Bold' | 'ContentC12TextLink' | 'NavigationBold';
|
|
4
4
|
export interface TextProps {
|
|
5
|
+
color?: string;
|
|
5
6
|
children?: React.ReactNode;
|
|
6
7
|
className?: string;
|
|
7
8
|
size?: Size;
|
|
@@ -1,18 +1,20 @@
|
|
|
1
1
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
2
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
3
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
4
|
-
var _excluded = ["children", "className", "size", "prefixCls", "style", "breakpoint"];
|
|
4
|
+
var _excluded = ["color", "children", "className", "size", "prefixCls", "style", "breakpoint"];
|
|
5
5
|
import React from 'react';
|
|
6
6
|
import { default as classNames } from 'classnames';
|
|
7
7
|
import { useStyleRegister } from '@ant-design/cssinjs';
|
|
8
8
|
import { theme } from "../../utils/theme";
|
|
9
|
-
import {
|
|
9
|
+
import { useOtherDesignTokens } from "./designTokens";
|
|
10
10
|
import { cssClasses } from "../../constants";
|
|
11
11
|
import "./style/index.less";
|
|
12
12
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
13
|
var Text = function Text(props) {
|
|
14
|
-
var
|
|
15
|
-
|
|
14
|
+
var color = props.color,
|
|
15
|
+
children = props.children,
|
|
16
|
+
_props$className = props.className,
|
|
17
|
+
className = _props$className === void 0 ? '' : _props$className,
|
|
16
18
|
_props$size = props.size,
|
|
17
19
|
size = _props$size === void 0 ? 'ContentC14Bold' : _props$size,
|
|
18
20
|
_props$prefixCls = props.prefixCls,
|
|
@@ -21,9 +23,18 @@ var Text = function Text(props) {
|
|
|
21
23
|
_props$breakpoint = props.breakpoint,
|
|
22
24
|
breakpoint = _props$breakpoint === void 0 ? 'Mobile' : _props$breakpoint,
|
|
23
25
|
attr = _objectWithoutProperties(props, _excluded);
|
|
26
|
+
var otherDesignTokens = useOtherDesignTokens();
|
|
24
27
|
var fontSizeDesktopTitleT23 = otherDesignTokens.fontSizeDesktopTitleT23,
|
|
28
|
+
fontSizeDesktopContentC15 = otherDesignTokens.fontSizeDesktopContentC15,
|
|
29
|
+
fontSizeDesktopContentC21 = otherDesignTokens.fontSizeDesktopContentC21,
|
|
30
|
+
fontSizeDesktopContentC23 = otherDesignTokens.fontSizeDesktopContentC23,
|
|
25
31
|
fontSizeDesktopTitleT21 = otherDesignTokens.fontSizeDesktopTitleT21,
|
|
32
|
+
fontSizeDesktopTitleT34 = otherDesignTokens.fontSizeDesktopTitleT34,
|
|
33
|
+
fontSizeDesktopTitleT16 = otherDesignTokens.fontSizeDesktopTitleT16,
|
|
26
34
|
fontSizeDesktopTitleT15 = otherDesignTokens.fontSizeDesktopTitleT15,
|
|
35
|
+
fontSizeDesktopTitleT14 = otherDesignTokens.fontSizeDesktopTitleT14,
|
|
36
|
+
fontSizeDesktopTitleT13 = otherDesignTokens.fontSizeDesktopTitleT13,
|
|
37
|
+
fontSizeDesktopTitleT12 = otherDesignTokens.fontSizeDesktopTitleT12,
|
|
27
38
|
fontSizeDesktopContentC13 = otherDesignTokens.fontSizeDesktopContentC13,
|
|
28
39
|
fontSizeDesktopContentC12 = otherDesignTokens.fontSizeDesktopContentC12,
|
|
29
40
|
fontSizeDesktopContentC14 = otherDesignTokens.fontSizeDesktopContentC14,
|
|
@@ -32,15 +43,33 @@ var Text = function Text(props) {
|
|
|
32
43
|
fontSizeMobileContentC12 = otherDesignTokens.fontSizeMobileContentC12,
|
|
33
44
|
fontSizeMobileContentC13 = otherDesignTokens.fontSizeMobileContentC13,
|
|
34
45
|
fontSizeMobileContentC14 = otherDesignTokens.fontSizeMobileContentC14,
|
|
46
|
+
fontSizeMobileContentC15 = otherDesignTokens.fontSizeMobileContentC15,
|
|
47
|
+
fontSizeMobileContentC21 = otherDesignTokens.fontSizeMobileContentC21,
|
|
48
|
+
fontSizeMobileContentC23 = otherDesignTokens.fontSizeMobileContentC23,
|
|
49
|
+
fontSizeMobileTitleT12 = otherDesignTokens.fontSizeMobileTitleT12,
|
|
50
|
+
fontSizeMobileTitleT13 = otherDesignTokens.fontSizeMobileTitleT13,
|
|
51
|
+
fontSizeMobileTitleT14 = otherDesignTokens.fontSizeMobileTitleT14,
|
|
35
52
|
fontSizeMobileTitleT15 = otherDesignTokens.fontSizeMobileTitleT15,
|
|
53
|
+
fontSizeMobileTitleT16 = otherDesignTokens.fontSizeMobileTitleT16,
|
|
36
54
|
fontSizeMobileTitleT21 = otherDesignTokens.fontSizeMobileTitleT21,
|
|
37
55
|
fontSizeMobileTitleT23 = otherDesignTokens.fontSizeMobileTitleT23,
|
|
38
56
|
fontSizeMobileTitleT32 = otherDesignTokens.fontSizeMobileTitleT32,
|
|
57
|
+
fontSizeMobileTitleT34 = otherDesignTokens.fontSizeMobileTitleT34,
|
|
39
58
|
fontSizeMobileTitleT41 = otherDesignTokens.fontSizeMobileTitleT41,
|
|
59
|
+
fontSizeMobileNavigation = otherDesignTokens.fontSizeMobileNavigation,
|
|
40
60
|
fontFamilyPromaryBold = otherDesignTokens.fontFamilyPromaryBold,
|
|
41
61
|
fontFamilySecondaryRegular = otherDesignTokens.fontFamilySecondaryRegular,
|
|
42
62
|
fontFamilySecondarySemiBold = otherDesignTokens.fontFamilySecondarySemiBold,
|
|
43
|
-
fontFamilySecondaryBold = otherDesignTokens.fontFamilySecondaryBold
|
|
63
|
+
fontFamilySecondaryBold = otherDesignTokens.fontFamilySecondaryBold,
|
|
64
|
+
lineHeightT15M = otherDesignTokens.lineHeightT15M,
|
|
65
|
+
lineHeightT16M = otherDesignTokens.lineHeightT16M,
|
|
66
|
+
lineHeightC21M = otherDesignTokens.lineHeightC21M,
|
|
67
|
+
lineHeightC14 = otherDesignTokens.lineHeightC14,
|
|
68
|
+
lineHeightC15M = otherDesignTokens.lineHeightC15M,
|
|
69
|
+
lineHeightC15 = otherDesignTokens.lineHeightC15,
|
|
70
|
+
lineHeightC21 = otherDesignTokens.lineHeightC21,
|
|
71
|
+
lineHeightT15 = otherDesignTokens.lineHeightT15,
|
|
72
|
+
lineHeightT16 = otherDesignTokens.lineHeightT16;
|
|
44
73
|
var fontFamilyMap = {
|
|
45
74
|
fontFamilyPromaryRegular: "Regular",
|
|
46
75
|
fontFamilyPromarySemiBold: "SemiBold",
|
|
@@ -52,21 +81,22 @@ var Text = function Text(props) {
|
|
|
52
81
|
var useCustomButtonStyle = function useCustomButtonStyle() {
|
|
53
82
|
var hashId = useStyleRegister({
|
|
54
83
|
theme: theme,
|
|
55
|
-
token: {
|
|
56
|
-
baseColor: 'blue'
|
|
57
|
-
},
|
|
84
|
+
token: {},
|
|
58
85
|
path: ["".concat(prefixCls, "-size")]
|
|
59
86
|
}, function () {
|
|
60
|
-
return "\n .".concat(prefixCls, "-mobile.").concat(prefixCls, "-size-TitleT41Bold {\n font-size: ").concat(fontSizeMobileTitleT41, ";\n line-height: 1.2;\n font-family: ").concat(fontFamilyPromaryBold, "-").concat(fontFamilyMap.fontFamilyPromaryBold, ";\n // font-family: ").concat(fontFamilyPromaryBold, "-").concat(fontFamilyMap.fontFamilyPromaryBold, ";\n font-weight: bold;\n }\n .").concat(prefixCls, "-mobile.").concat(prefixCls, "-size-TitleT32Bold {\n font-size: ").concat(fontSizeMobileTitleT32, ";\n line-height: 1.2;\n font-family: ").concat(fontFamilyPromaryBold, "-").concat(fontFamilyMap.fontFamilyPromaryBold, ";\n font-weight: bold;\n }\n .").concat(prefixCls, "-mobile.").concat(prefixCls, "-size-TitleT23Bold {\n font-size: ").concat(fontSizeMobileTitleT23, ";\n line-height: 1.2;\n font-family: ").concat(fontFamilyPromaryBold, "-").concat(fontFamilyMap.fontFamilyPromaryBold, ";\n font-weight: bold;\n }\n .").concat(prefixCls, "-mobile.").concat(prefixCls, "-size-TitleT21Bold {\n font-size: ").concat(fontSizeMobileTitleT21, ";\n line-height: 1.25;\n font-family: ").concat(fontFamilyPromaryBold, "-").concat(fontFamilyMap.fontFamilyPromaryBold, ";\n font-weight: bold;\n }\n .").concat(prefixCls, "-mobile.").concat(prefixCls, "-size-TitleT15Bold {\n font-size: ").concat(fontSizeMobileTitleT15, ";\n line-height: 1.25;\n font-family: ").concat(fontFamilyPromaryBold, "-").concat(fontFamilyMap.fontFamilyPromaryBold, ";\n font-weight: bold;\n }\n .").concat(prefixCls, "-mobile.").concat(prefixCls, "-size-ContentC14Bold {\n font-size: ").concat(fontSizeMobileContentC14, ";\n line-height: 1.5;\n font-family: ").concat(fontFamilySecondaryBold, "-").concat(fontFamilyMap.fontFamilySecondaryBold, ";\n font-weight: bold;\n }\n .").concat(prefixCls, "-mobile.").concat(prefixCls, "-size-ContentC14Regular {\n font-size: ").concat(fontSizeMobileContentC14, ";\n line-height: 1.5;\n font-family: ").concat(fontFamilySecondaryRegular, "-").concat(fontFamilyMap.fontFamilySecondaryRegular, ";\n font-weight: normal;\n letter-spacing: 0.1px;\n }\n .").concat(prefixCls, "-mobile.").concat(prefixCls, "-size-ContentC14Strikethrough {\n color: #757575;\n font-size: ").concat(fontSizeMobileContentC14, ";\n line-height: 1.5;\n font-family: ").concat(fontFamilySecondaryRegular, "-").concat(fontFamilyMap.fontFamilySecondaryRegular, ";\n font-weight: normal;\n text-decoration: line-through;\n letter-spacing: 0.1px;\n }\n .").concat(prefixCls, "-mobile.").concat(prefixCls, "-size-ContentC14TextLink {\n color: #4E28E8;\n font-family: ").concat(fontFamilySecondaryBold, "-").concat(fontFamilyMap.fontFamilySecondaryBold, ";\n font-weight: bold;\n font-size: ").concat(fontSizeMobileContentC14, ";\n line-height: 1.5;\n text-decoration: underline;\n letter-spacing: 0.1px;\n }\n .").concat(prefixCls, "-mobile.").concat(prefixCls, "-size-ContentC13Bold {\n font-size: ").concat(fontSizeMobileContentC13, ";\n line-height: 1.5;\n font-family: ").concat(fontFamilySecondaryBold, "-").concat(fontFamilyMap.fontFamilySecondaryBold, ";\n font-weight: bold;\n }\n .").concat(prefixCls, "-mobile.").concat(prefixCls, "-size-ContentC13Regular {\n font-size: ").concat(fontSizeMobileContentC13, ";\n line-height: 1.5;\n font-family: ").concat(fontFamilySecondaryRegular, "-").concat(fontFamilyMap.fontFamilySecondaryRegular, ";\n font-weight: normal;\n letter-spacing: 0.1px;\n }\n .").concat(prefixCls, "-mobile.").concat(prefixCls, "-size-ContentC13Strikethrough {\n color: #757575;\n font-size: ").concat(fontSizeMobileContentC13, ";\n line-height: 1.5;\n font-family: ").concat(fontFamilySecondaryRegular, "-").concat(fontFamilyMap.fontFamilySecondaryRegular, ";\n font-weight: normal;\n text-decoration: line-through;\n letter-spacing: 0.1px;\n }\n .").concat(prefixCls, "-mobile.").concat(prefixCls, "-size-ContentC13TextLink {\n color: #4E28E8;\n font-family: ").concat(fontFamilySecondaryBold, "-").concat(fontFamilyMap.fontFamilySecondaryBold, ";\n font-weight: bold;\n font-size: ").concat(fontSizeMobileContentC13, ";\n line-height: 1.5;\n text-decoration: underline;\n letter-spacing: 0.1px;\n }\n .").concat(prefixCls, "-mobile.").concat(prefixCls, "-size-ContentC12Regular {\n font-family: ").concat(fontFamilySecondaryRegular, "-").concat(fontFamilyMap.fontFamilySecondaryRegular, ";\n font-weight: normal;\n font-size: ").concat(fontSizeMobileContentC12, ";\n line-height: 1.5;\n letter-spacing: 0.1px;\n }\n .").concat(prefixCls, "-mobile.").concat(prefixCls, "-size-ContentC12Strikethrough {\n color: #757575;\n font-family: ").concat(fontFamilySecondaryRegular, "-").concat(fontFamilyMap.fontFamilySecondaryRegular, ";\n font-weight: normal;\n font-size: ").concat(fontSizeMobileContentC12, ";\n line-height: 1.5;\n text-decoration: line-through;\n letter-spacing: 0.2px;\n }\n .").concat(prefixCls, "-mobile.").concat(prefixCls, "-size-ContentC12SemiBold {\n font-family: ").concat(fontFamilySecondarySemiBold, "-").concat(fontFamilyMap.fontFamilySecondarySemiBold, ";\n font-weight: bold;\n font-size: ").concat(fontSizeMobileContentC12, ";\n line-height: 1.5;\n letter-spacing: 0.2px;\n }\n .").concat(prefixCls, "-mobile.").concat(prefixCls, "-size-ContentC12Bold {\n font-family: ").concat(fontFamilySecondaryBold, "-").concat(fontFamilyMap.fontFamilySecondaryBold, ";\n font-weight: bold;\n font-size: ").concat(fontSizeMobileContentC12, ";\n line-height: 1.5;\n letter-spacing: 0.2px;\n }\n .").concat(prefixCls, "-mobile.").concat(prefixCls, "-size-ContentC12TextLink {\n color: #4E28E8;\n font-family: ").concat(fontFamilySecondaryBold, "-").concat(fontFamilyMap.fontFamilySecondaryBold, ";\n font-weight: bold;\n font-size: ").concat(fontSizeMobileContentC12, ";\n line-height: 1.5;\n text-decoration: underline;\n letter-spacing: 0.2px;\n }\n .").concat(prefixCls, "-desktop.").concat(prefixCls, "-size-TitleT41Bold {\n font-size: ").concat(fontSizeDesktopTitleT41, ";\n line-height: 1.2;\n font-family: ").concat(fontFamilyPromaryBold, "-").concat(fontFamilyMap.fontFamilyPromaryBold, ";\n font-weight: bold;\n }\n .").concat(prefixCls, "-desktop.").concat(prefixCls, "-size-TitleT32Bold {\n font-size: ").concat(fontSizeDesktopTitleT32, ";\n line-height: 1.2;\n font-family: ").concat(fontFamilyPromaryBold, "-").concat(fontFamilyMap.fontFamilyPromaryBold, ";\n font-weight: bold;\n }\n .").concat(prefixCls, "-desktop.").concat(prefixCls, "-size-TitleT23Bold {\n font-size: ").concat(fontSizeDesktopTitleT23, ";\n line-height: 1.2;\n font-family: ").concat(fontFamilyPromaryBold, "-").concat(fontFamilyMap.fontFamilyPromaryBold, ";\n font-weight: bold;\n }\n .").concat(prefixCls, "-desktop.").concat(prefixCls, "-size-TitleT21Bold {\n font-size: ").concat(fontSizeDesktopTitleT21, ";\n line-height: 1.25;\n font-family: ").concat(fontFamilyPromaryBold, "-").concat(fontFamilyMap.fontFamilyPromaryBold, ";\n font-weight: bold;\n }\n .").concat(prefixCls, "-desktop.").concat(prefixCls, "-size-TitleT15Bold {\n font-size: ").concat(fontSizeDesktopTitleT15, ";\n line-height: 1.25;\n font-family: ").concat(fontFamilyPromaryBold, "-").concat(fontFamilyMap.fontFamilyPromaryBold, ";\n font-weight: bold;\n }\n .").concat(prefixCls, "-desktop.").concat(prefixCls, "-size-ContentC14Bold {\n font-size: ").concat(fontSizeDesktopContentC14, ";\n line-height: 1.5;\n font-family: ").concat(fontFamilySecondaryBold, "-").concat(fontFamilyMap.fontFamilySecondaryBold, ";\n font-weight: bold;\n }\n .").concat(prefixCls, "-desktop.").concat(prefixCls, "-size-ContentC14Regular {\n font-size: ").concat(fontSizeDesktopContentC14, ";\n line-height: 1.5;\n font-family: ").concat(fontFamilySecondaryRegular, "-").concat(fontFamilyMap.fontFamilySecondaryRegular, ";\n font-weight: normal;\n letter-spacing: 0.1px;\n }\n .").concat(prefixCls, "-desktop.").concat(prefixCls, "-size-ContentC14Strikethrough {\n color: #757575;\n font-size: ").concat(fontSizeDesktopContentC14, ";\n line-height: 1.5;\n font-family: ").concat(fontFamilySecondaryRegular, "-").concat(fontFamilyMap.fontFamilySecondaryRegular, ";\n font-weight: normal;\n text-decoration: line-through;\n letter-spacing: 0.1px;\n }\n .").concat(prefixCls, "-desktop.").concat(prefixCls, "-size-ContentC14TextLink {\n color: #4E28E8;\n font-family: ").concat(fontFamilySecondaryBold, "-").concat(fontFamilyMap.fontFamilySecondaryBold, ";\n font-weight: bold;\n font-size: ").concat(fontSizeDesktopContentC14, ";\n line-height: 1.5;\n text-decoration: underline;\n letter-spacing: 0.1px;\n }\n .").concat(prefixCls, "-desktop.").concat(prefixCls, "-size-ContentC13Bold {\n font-size: ").concat(fontSizeDesktopContentC13, ";\n line-height: 1.5;\n font-family: ").concat(fontFamilySecondaryBold, "-").concat(fontFamilyMap.fontFamilySecondaryBold, ";\n font-weight: bold;\n }\n .").concat(prefixCls, "-desktop.").concat(prefixCls, "-size-ContentC13Regular {\n font-size: ").concat(fontSizeDesktopContentC13, ";\n line-height: 1.5;\n font-family: ").concat(fontFamilySecondaryRegular, "-").concat(fontFamilyMap.fontFamilySecondaryRegular, ";\n font-weight: normal;\n letter-spacing: 0.1px;\n }\n .").concat(prefixCls, "-desktop.").concat(prefixCls, "-size-ContentC13Strikethrough {\n color: #757575;\n font-size: ").concat(fontSizeDesktopContentC13, ";\n line-height: 1.5;\n font-family: ").concat(fontFamilySecondaryRegular, "-").concat(fontFamilyMap.fontFamilySecondaryRegular, ";\n font-weight: normal;\n text-decoration: line-through;\n letter-spacing: 0.1px;\n }\n .").concat(prefixCls, "-desktop.").concat(prefixCls, "-size-ContentC13TextLink {\n color: #4E28E8;\n font-family: ").concat(fontFamilySecondaryBold, "-").concat(fontFamilyMap.fontFamilySecondaryBold, ";\n font-weight: bold;\n font-size: ").concat(fontSizeDesktopContentC13, ";\n line-height: 1.5;\n text-decoration: underline;\n letter-spacing: 0.1px;\n }\n .").concat(prefixCls, "-desktop.").concat(prefixCls, "-size-ContentC12Regular {\n font-family: ").concat(fontFamilySecondaryRegular, "-").concat(fontFamilyMap.fontFamilySecondaryRegular, ";\n font-weight: normal;\n font-size: ").concat(fontSizeDesktopContentC12, ";\n line-height: 1.5;\n letter-spacing: 0.1px;\n }\n .").concat(prefixCls, "-desktop.").concat(prefixCls, "-size-ContentC12Strikethrough {\n color: #757575;\n font-family: ").concat(fontFamilySecondaryRegular, "-").concat(fontFamilyMap.fontFamilySecondaryRegular, ";\n font-weight: normal;\n font-size: ").concat(fontSizeDesktopContentC12, ";\n line-height: 1.5;\n text-decoration: line-through;\n letter-spacing: 0.2px;\n }\n .").concat(prefixCls, "-desktop.").concat(prefixCls, "-size-ContentC12SemiBold {\n font-family: ").concat(fontFamilySecondarySemiBold, "-").concat(fontFamilyMap.fontFamilySecondarySemiBold, ";\n font-weight: bold;\n font-size: ").concat(fontSizeDesktopContentC12, ";\n line-height: 1.5;\n letter-spacing: 0.2px;\n }\n .").concat(prefixCls, "-desktop.").concat(prefixCls, "-size-ContentC12Bold {\n font-family: ").concat(fontFamilySecondaryBold, "-").concat(fontFamilyMap.fontFamilySecondaryBold, ";\n font-weight: bold;\n font-size: ").concat(fontSizeDesktopContentC12, ";\n line-height: 1.5;\n letter-spacing: 0.2px;\n }\n .").concat(prefixCls, "-desktop.").concat(prefixCls, "-size-ContentC12TextLink {\n color: #4E28E8;\n font-family: ").concat(fontFamilySecondaryBold, "-").concat(fontFamilyMap.fontFamilySecondaryBold, ";\n font-weight: bold;\n font-size: ").concat(fontSizeDesktopContentC12, ";\n line-height: 1.5;\n text-decoration: underline;\n letter-spacing: 0.2px;\n }\n ");
|
|
87
|
+
return "\n .".concat(prefixCls, "-mobile {\n &.").concat(prefixCls, "-size-NavigationBold {\n font-size: ").concat(fontSizeMobileNavigation, ";\n line-height: 1.25;\n font-family: ").concat(fontFamilyPromaryBold, "-").concat(fontFamilyMap.fontFamilyPromaryBold, ";\n font-weight: bold;\n }\n &.").concat(prefixCls, "-size-TitleT41Bold {\n font-size: ").concat(fontSizeMobileTitleT41, ";\n line-height: 1.25;\n font-family: ").concat(fontFamilyPromaryBold, "-").concat(fontFamilyMap.fontFamilyPromaryBold, ";\n font-weight: bold;\n }\n &.").concat(prefixCls, "-size-TitleT34Bold {\n font-size: ").concat(fontSizeMobileTitleT34, ";\n line-height: 1.25;\n font-family: ").concat(fontFamilyPromaryBold, "-").concat(fontFamilyMap.fontFamilyPromaryBold, ";\n font-weight: bold;\n }\n &.").concat(prefixCls, "-size-TitleT32Bold {\n font-size: ").concat(fontSizeMobileTitleT32, ";\n line-height: 1.25;\n font-family: ").concat(fontFamilyPromaryBold, "-").concat(fontFamilyMap.fontFamilyPromaryBold, ";\n font-weight: bold;\n }\n &.").concat(prefixCls, "-size-TitleT23Bold {\n font-size: ").concat(fontSizeMobileTitleT23, ";\n line-height: 1.25;\n font-family: ").concat(fontFamilyPromaryBold, "-").concat(fontFamilyMap.fontFamilyPromaryBold, ";\n font-weight: bold;\n }\n &.").concat(prefixCls, "-size-TitleT21Bold {\n font-size: ").concat(fontSizeMobileTitleT21, ";\n line-height: 1.25;\n font-family: ").concat(fontFamilyPromaryBold, "-").concat(fontFamilyMap.fontFamilyPromaryBold, ";\n font-weight: bold;\n }\n &.").concat(prefixCls, "-size-TitleT16Bold {\n font-size: ").concat(fontSizeMobileTitleT16, ";\n line-height: ").concat(lineHeightT16M, ";\n font-family: ").concat(fontFamilyPromaryBold, "-").concat(fontFamilyMap.fontFamilyPromaryBold, ";\n font-weight: bold;\n }\n &.").concat(prefixCls, "-size-TitleT15Bold {\n font-size: ").concat(fontSizeMobileTitleT15, ";\n line-height: ").concat(lineHeightT15M, ";\n font-family: ").concat(fontFamilyPromaryBold, "-").concat(fontFamilyMap.fontFamilyPromaryBold, ";\n font-weight: bold;\n }\n &.").concat(prefixCls, "-size-TitleT14Bold {\n font-size: ").concat(fontSizeMobileTitleT14, ";\n line-height: 1.5;\n font-family: ").concat(fontFamilyPromaryBold, "-").concat(fontFamilyMap.fontFamilyPromaryBold, ";\n font-weight: bold;\n }\n &.").concat(prefixCls, "-size-TitleT13Bold {\n font-size: ").concat(fontSizeMobileTitleT13, ";\n line-height: 1.5;\n font-family: ").concat(fontFamilyPromaryBold, "-").concat(fontFamilyMap.fontFamilyPromaryBold, ";\n font-weight: bold;\n }\n &.").concat(prefixCls, "-size-TitleT12Bold {\n font-size: ").concat(fontSizeMobileTitleT12, ";\n line-height: 1.5;\n font-family: ").concat(fontFamilyPromaryBold, "-").concat(fontFamilyMap.fontFamilyPromaryBold, ";\n font-weight: bold;\n }\n &.").concat(prefixCls, "-size-ContentC23Bold {\n font-size: ").concat(fontSizeMobileContentC23, ";\n line-height: 1.25;\n font-family: ").concat(fontFamilySecondaryBold, "-").concat(fontFamilyMap.fontFamilySecondaryBold, ";\n font-weight: bold;\n }\n &.").concat(prefixCls, "-size-ContentC21Bold {\n font-size: ").concat(fontSizeMobileContentC21, ";\n line-height: ").concat(lineHeightC21M, ";\n font-family: ").concat(fontFamilySecondaryBold, "-").concat(fontFamilyMap.fontFamilySecondaryBold, ";\n font-weight: bold;\n }\n &.").concat(prefixCls, "-size-ContentC15Bold {\n font-size: ").concat(fontSizeMobileContentC15, ";\n line-height: ").concat(lineHeightC15M, ";\n font-family: ").concat(fontFamilySecondaryBold, "-").concat(fontFamilyMap.fontFamilySecondaryBold, ";\n font-weight: bold;\n }\n &.").concat(prefixCls, "-size-ContentC14Bold {\n font-size: ").concat(fontSizeMobileContentC14, ";\n line-height: 1.5;\n font-family: ").concat(fontFamilySecondaryBold, "-").concat(fontFamilyMap.fontFamilySecondaryBold, ";\n font-weight: bold;\n }\n &.").concat(prefixCls, "-size-ContentC14Regular {\n font-size: ").concat(fontSizeMobileContentC14, ";\n line-height: 1.5;\n font-family: ").concat(fontFamilySecondaryRegular, "-").concat(fontFamilyMap.fontFamilySecondaryRegular, ";\n font-weight: normal;\n letter-spacing: 0.1px;\n }\n &.").concat(prefixCls, "-size-ContentC14Strikethrough {\n color: #757575;\n font-size: ").concat(fontSizeMobileContentC14, ";\n line-height: 1.5;\n font-family: ").concat(fontFamilySecondaryRegular, "-").concat(fontFamilyMap.fontFamilySecondaryRegular, ";\n font-weight: normal;\n text-decoration: line-through;\n letter-spacing: 0.1px;\n }\n &.").concat(prefixCls, "-size-ContentC14TextLink {\n color: #4E28E8;\n font-family: ").concat(fontFamilySecondaryBold, "-").concat(fontFamilyMap.fontFamilySecondaryBold, ";\n font-weight: bold;\n font-size: ").concat(fontSizeMobileContentC14, ";\n line-height: 1.5;\n text-decoration: underline;\n letter-spacing: 0.1px;\n }\n &.").concat(prefixCls, "-size-ContentC13Bold {\n font-size: ").concat(fontSizeMobileContentC13, ";\n line-height: 1.5;\n font-family: ").concat(fontFamilySecondaryBold, "-").concat(fontFamilyMap.fontFamilySecondaryBold, ";\n font-weight: bold;\n }\n &.").concat(prefixCls, "-size-ContentC13Regular {\n font-size: ").concat(fontSizeMobileContentC13, ";\n line-height: 1.5;\n font-family: ").concat(fontFamilySecondaryRegular, "-").concat(fontFamilyMap.fontFamilySecondaryRegular, ";\n font-weight: normal;\n letter-spacing: 0.1px;\n }\n &.").concat(prefixCls, "-size-ContentC13Strikethrough {\n color: #757575;\n font-size: ").concat(fontSizeMobileContentC13, ";\n line-height: 1.5;\n font-family: ").concat(fontFamilySecondaryRegular, "-").concat(fontFamilyMap.fontFamilySecondaryRegular, ";\n font-weight: normal;\n text-decoration: line-through;\n letter-spacing: 0.1px;\n }\n &.").concat(prefixCls, "-size-ContentC13TextLink {\n color: #4E28E8;\n font-family: ").concat(fontFamilySecondaryBold, "-").concat(fontFamilyMap.fontFamilySecondaryBold, ";\n font-weight: bold;\n font-size: ").concat(fontSizeMobileContentC13, ";\n line-height: 1.5;\n text-decoration: underline;\n letter-spacing: 0.1px;\n }\n &.").concat(prefixCls, "-size-ContentC12Regular {\n font-family: ").concat(fontFamilySecondaryRegular, "-").concat(fontFamilyMap.fontFamilySecondaryRegular, ";\n font-weight: normal;\n font-size: ").concat(fontSizeMobileContentC12, ";\n line-height: 1.5;\n letter-spacing: 0.1px;\n }\n &.").concat(prefixCls, "-size-ContentC12Strikethrough {\n color: #757575;\n font-family: ").concat(fontFamilySecondaryRegular, "-").concat(fontFamilyMap.fontFamilySecondaryRegular, ";\n font-weight: normal;\n font-size: ").concat(fontSizeMobileContentC12, ";\n line-height: 1.5;\n text-decoration: line-through;\n letter-spacing: 0.2px;\n }\n &.").concat(prefixCls, "-size-ContentC12SemiBold {\n font-family: ").concat(fontFamilySecondarySemiBold, "-").concat(fontFamilyMap.fontFamilySecondarySemiBold, ";\n font-weight: bold;\n font-size: ").concat(fontSizeMobileContentC12, ";\n line-height: 1.5;\n letter-spacing: 0.2px;\n }\n &.").concat(prefixCls, "-size-ContentC12Bold {\n font-family: ").concat(fontFamilySecondaryBold, "-").concat(fontFamilyMap.fontFamilySecondaryBold, ";\n font-weight: bold;\n font-size: ").concat(fontSizeMobileContentC12, ";\n line-height: 1.5;\n letter-spacing: 0.2px;\n }\n &.").concat(prefixCls, "-size-ContentC12TextLink {\n color: #4E28E8;\n font-family: ").concat(fontFamilySecondaryBold, "-").concat(fontFamilyMap.fontFamilySecondaryBold, ";\n font-weight: bold;\n font-size: ").concat(fontSizeMobileContentC12, ";\n line-height: 1.5;\n text-decoration: underline;\n letter-spacing: 0.2px;\n }\n }\n .").concat(prefixCls, "-desktop {\n &.").concat(prefixCls, "-size-TitleT41Bold {\n font-size: ").concat(fontSizeDesktopTitleT41, ";\n line-height: 1.25;\n font-family: ").concat(fontFamilyPromaryBold, "-").concat(fontFamilyMap.fontFamilyPromaryBold, ";\n font-weight: bold;\n }\n &.").concat(prefixCls, "-size-TitleT34Bold {\n font-size: ").concat(fontSizeDesktopTitleT34, ";\n line-height: 1.25;\n font-family: ").concat(fontFamilyPromaryBold, "-").concat(fontFamilyMap.fontFamilyPromaryBold, ";\n font-weight: bold;\n }\n &.").concat(prefixCls, "-size-TitleT32Bold {\n font-size: ").concat(fontSizeDesktopTitleT32, ";\n line-height: 1.25;\n font-family: ").concat(fontFamilyPromaryBold, "-").concat(fontFamilyMap.fontFamilyPromaryBold, ";\n font-weight: bold;\n }\n &.").concat(prefixCls, "-size-TitleT23Bold {\n font-size: ").concat(fontSizeDesktopTitleT23, ";\n line-height: 1.25;\n font-family: ").concat(fontFamilyPromaryBold, "-").concat(fontFamilyMap.fontFamilyPromaryBold, ";\n font-weight: bold;\n }\n &.").concat(prefixCls, "-size-TitleT21Bold {\n font-size: ").concat(fontSizeDesktopTitleT21, ";\n line-height: 1.25;\n font-family: ").concat(fontFamilyPromaryBold, "-").concat(fontFamilyMap.fontFamilyPromaryBold, ";\n font-weight: bold;\n }\n &.").concat(prefixCls, "-size-TitleT16Bold {\n font-size: ").concat(fontSizeDesktopTitleT16, ";\n line-height: ").concat(lineHeightT16, ";\n font-family: ").concat(fontFamilyPromaryBold, "-").concat(fontFamilyMap.fontFamilyPromaryBold, ";\n font-weight: bold;\n }\n &.").concat(prefixCls, "-size-TitleT15Bold {\n font-size: ").concat(fontSizeDesktopTitleT15, ";\n line-height: ").concat(lineHeightT15, ";\n font-family: ").concat(fontFamilyPromaryBold, "-").concat(fontFamilyMap.fontFamilyPromaryBold, ";\n font-weight: bold;\n }\n &.").concat(prefixCls, "-size-TitleT14Bold {\n font-size: ").concat(fontSizeDesktopTitleT14, ";\n line-height: 1.5;\n font-family: ").concat(fontFamilyPromaryBold, "-").concat(fontFamilyMap.fontFamilyPromaryBold, ";\n font-weight: bold;\n }\n &.").concat(prefixCls, "-size-TitleT13Bold {\n font-size: ").concat(fontSizeDesktopTitleT13, ";\n line-height: 1.5;\n font-family: ").concat(fontFamilyPromaryBold, "-").concat(fontFamilyMap.fontFamilyPromaryBold, ";\n font-weight: bold;\n }\n &.").concat(prefixCls, "-size-TitleT12Bold {\n font-size: ").concat(fontSizeDesktopTitleT12, ";\n line-height: 1.5;\n font-family: ").concat(fontFamilyPromaryBold, "-").concat(fontFamilyMap.fontFamilyPromaryBold, ";\n font-weight: bold;\n }\n &.").concat(prefixCls, "-size-ContentC23Bold {\n font-size: ").concat(fontSizeDesktopContentC23, ";\n line-height: 1.25;\n font-family: ").concat(fontFamilySecondaryBold, "-").concat(fontFamilyMap.fontFamilySecondaryBold, ";\n font-weight: bold;\n }\n &.").concat(prefixCls, "-size-ContentC21Bold {\n font-size: ").concat(fontSizeDesktopContentC21, ";\n line-height: ").concat(lineHeightC21, ";\n font-family: ").concat(fontFamilySecondaryBold, "-").concat(fontFamilyMap.fontFamilySecondaryBold, ";\n font-weight: bold;\n }\n &.").concat(prefixCls, "-size-ContentC15Bold {\n font-size: ").concat(fontSizeDesktopContentC15, ";\n line-height: ").concat(lineHeightC15, ";\n font-family: ").concat(fontFamilySecondaryBold, "-").concat(fontFamilyMap.fontFamilySecondaryBold, ";\n font-weight: bold;\n }\n &.").concat(prefixCls, "-size-ContentC14Bold {\n font-size: ").concat(fontSizeDesktopContentC14, ";\n line-height: ").concat(lineHeightC14, ";\n font-family: ").concat(fontFamilySecondaryBold, "-").concat(fontFamilyMap.fontFamilySecondaryBold, ";\n font-weight: bold;\n }\n &.").concat(prefixCls, "-size-ContentC14Regular {\n font-size: ").concat(fontSizeDesktopContentC14, ";\n line-height: ").concat(lineHeightC14, ";\n font-family: ").concat(fontFamilySecondaryRegular, "-").concat(fontFamilyMap.fontFamilySecondaryRegular, ";\n font-weight: normal;\n letter-spacing: 0.1px;\n }\n &.").concat(prefixCls, "-size-ContentC14Strikethrough {\n color: #757575;\n font-size: ").concat(fontSizeDesktopContentC14, ";\n line-height: ").concat(lineHeightC14, ";\n font-family: ").concat(fontFamilySecondaryRegular, "-").concat(fontFamilyMap.fontFamilySecondaryRegular, ";\n font-weight: normal;\n text-decoration: line-through;\n letter-spacing: 0.1px;\n }\n &.").concat(prefixCls, "-size-ContentC14TextLink {\n color: #4E28E8;\n font-family: ").concat(fontFamilySecondaryBold, "-").concat(fontFamilyMap.fontFamilySecondaryBold, ";\n font-weight: bold;\n font-size: ").concat(fontSizeDesktopContentC14, ";\n line-height: ").concat(lineHeightC14, ";\n text-decoration: underline;\n letter-spacing: 0.1px;\n }\n &.").concat(prefixCls, "-size-ContentC13Bold {\n font-size: ").concat(fontSizeDesktopContentC13, ";\n line-height: 1.5;\n font-family: ").concat(fontFamilySecondaryBold, "-").concat(fontFamilyMap.fontFamilySecondaryBold, ";\n font-weight: bold;\n }\n &.").concat(prefixCls, "-size-ContentC13Regular {\n font-size: ").concat(fontSizeDesktopContentC13, ";\n line-height: 1.5;\n font-family: ").concat(fontFamilySecondaryRegular, "-").concat(fontFamilyMap.fontFamilySecondaryRegular, ";\n font-weight: normal;\n letter-spacing: 0.1px;\n }\n &.").concat(prefixCls, "-size-ContentC13Strikethrough {\n color: #757575;\n font-size: ").concat(fontSizeDesktopContentC13, ";\n line-height: 1.5;\n font-family: ").concat(fontFamilySecondaryRegular, "-").concat(fontFamilyMap.fontFamilySecondaryRegular, ";\n font-weight: normal;\n text-decoration: line-through;\n letter-spacing: 0.1px;\n }\n &.").concat(prefixCls, "-size-ContentC13TextLink {\n color: #4E28E8;\n font-family: ").concat(fontFamilySecondaryBold, "-").concat(fontFamilyMap.fontFamilySecondaryBold, ";\n font-weight: bold;\n font-size: ").concat(fontSizeDesktopContentC13, ";\n line-height: 1.5;\n text-decoration: underline;\n letter-spacing: 0.1px;\n }\n &.").concat(prefixCls, "-size-ContentC12Regular {\n font-family: ").concat(fontFamilySecondaryRegular, "-").concat(fontFamilyMap.fontFamilySecondaryRegular, ";\n font-weight: normal;\n font-size: ").concat(fontSizeDesktopContentC12, ";\n line-height: 1.5;\n letter-spacing: 0.1px;\n }\n &.").concat(prefixCls, "-size-ContentC12Strikethrough {\n color: #757575;\n font-family: ").concat(fontFamilySecondaryRegular, "-").concat(fontFamilyMap.fontFamilySecondaryRegular, ";\n font-weight: normal;\n font-size: ").concat(fontSizeDesktopContentC12, ";\n line-height: 1.5;\n text-decoration: line-through;\n letter-spacing: 0.2px;\n }\n &.").concat(prefixCls, "-size-ContentC12SemiBold {\n font-family: ").concat(fontFamilySecondarySemiBold, "-").concat(fontFamilyMap.fontFamilySecondarySemiBold, ";\n font-weight: bold;\n font-size: ").concat(fontSizeDesktopContentC12, ";\n line-height: 1.5;\n letter-spacing: 0.2px;\n }\n &.").concat(prefixCls, "-size-ContentC12Bold {\n font-family: ").concat(fontFamilySecondaryBold, "-").concat(fontFamilyMap.fontFamilySecondaryBold, ";\n font-weight: bold;\n font-size: ").concat(fontSizeDesktopContentC12, ";\n line-height: 1.5;\n letter-spacing: 0.2px;\n }\n &.").concat(prefixCls, "-size-ContentC12TextLink {\n color: #4E28E8;\n font-family: ").concat(fontFamilySecondaryBold, "-").concat(fontFamilyMap.fontFamilySecondaryBold, ";\n font-weight: bold;\n font-size: ").concat(fontSizeDesktopContentC12, ";\n line-height: 1.5;\n text-decoration: underline;\n letter-spacing: 0.2px;\n }\n }\n ");
|
|
61
88
|
});
|
|
62
89
|
return hashId;
|
|
63
90
|
};
|
|
64
91
|
useCustomButtonStyle();
|
|
65
92
|
var baseProps = {
|
|
66
|
-
className: classNames(prefixCls, _defineProperty({}, "".concat(prefixCls, "-size-").concat(size), size), breakpoint === 'Desktop' ? "".concat(prefixCls, "-desktop") : "".concat(prefixCls, "-mobile"), className)
|
|
67
|
-
style: style
|
|
93
|
+
className: classNames(prefixCls, _defineProperty({}, "".concat(prefixCls, "-size-").concat(size), size), breakpoint === 'Desktop' ? "".concat(prefixCls, "-desktop") : "".concat(prefixCls, "-mobile"), className)
|
|
68
94
|
};
|
|
69
|
-
return /*#__PURE__*/_jsx("span", _objectSpread(_objectSpread(_objectSpread({}, baseProps),
|
|
95
|
+
return /*#__PURE__*/_jsx("span", _objectSpread(_objectSpread(_objectSpread({}, baseProps), {}, {
|
|
96
|
+
style: _objectSpread({
|
|
97
|
+
color: color
|
|
98
|
+
}, style)
|
|
99
|
+
}, attr), {}, {
|
|
70
100
|
children: children
|
|
71
101
|
}));
|
|
72
102
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare const
|
|
1
|
+
declare const useDesignTokens: () => {
|
|
2
2
|
borderRadius: any;
|
|
3
3
|
paddingInline: any;
|
|
4
4
|
colorText: any;
|
|
@@ -10,7 +10,7 @@ declare const designTokens: {
|
|
|
10
10
|
colorBgContainer: any;
|
|
11
11
|
colorBgContainerDisabled: any;
|
|
12
12
|
};
|
|
13
|
-
declare const
|
|
13
|
+
declare const useOtherDesignTokens: () => {
|
|
14
14
|
hoverBorderColor: any;
|
|
15
15
|
activeBorderColor: any;
|
|
16
16
|
paddingBlock: any;
|
|
@@ -26,13 +26,4 @@ declare const otherDesignTokens: {
|
|
|
26
26
|
colorErrorBorder: any;
|
|
27
27
|
colorInputBackgroundHaze: any;
|
|
28
28
|
};
|
|
29
|
-
|
|
30
|
-
[x: string]: string | number;
|
|
31
|
-
};
|
|
32
|
-
declare const styleToken: {
|
|
33
|
-
[x: string]: string;
|
|
34
|
-
};
|
|
35
|
-
declare const stickyStyleToken: {
|
|
36
|
-
[x: string]: string;
|
|
37
|
-
};
|
|
38
|
-
export { designTokens, otherDesignTokens, styleToken, stickyStyleToken, commonToken };
|
|
29
|
+
export { useDesignTokens, useOtherDesignTokens };
|
|
@@ -1,59 +1,61 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
var
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
1
|
+
import { useDynamicTokens } from "../../utils";
|
|
2
|
+
var useDesignTokens = function useDesignTokens() {
|
|
3
|
+
var getToken = useDynamicTokens();
|
|
4
|
+
var designTokens = {
|
|
5
|
+
borderRadius: getToken('borderRadiusInput'),
|
|
6
|
+
// 圆角
|
|
7
|
+
// paddingBlock: getToken('spacingInputPaddingVertical'), // 纵向内边距
|
|
8
|
+
paddingInline: getToken('spacingInputPaddingHorizontal'),
|
|
9
|
+
// 横向内边距
|
|
10
|
+
colorText: getToken('colorInputTextActive'),
|
|
11
|
+
// 内容文本颜色
|
|
12
|
+
colorBorder: 'transparent',
|
|
13
|
+
// 边框颜色
|
|
14
|
+
hoverBorderColor: 'transparent',
|
|
15
|
+
// 边框颜色
|
|
16
|
+
activeBorderColor: 'transparent',
|
|
17
|
+
// 边框颜色
|
|
18
|
+
activeShadow: '',
|
|
19
|
+
// 边框shadow颜色
|
|
20
|
+
colorError: 'transparent',
|
|
21
|
+
// 错误边框颜色
|
|
22
|
+
colorBgContainer: getToken('colorInputBackground'),
|
|
23
|
+
// 背景颜色
|
|
24
|
+
colorBgContainerDisabled: getToken('colorInputBackgroundHaze') // 背景颜色
|
|
25
|
+
};
|
|
26
|
+
return designTokens;
|
|
26
27
|
};
|
|
27
|
-
var
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
28
|
+
var useOtherDesignTokens = function useOtherDesignTokens() {
|
|
29
|
+
var getToken = useDynamicTokens();
|
|
30
|
+
var otherDesignTokens = {
|
|
31
|
+
hoverBorderColor: getToken('colorInputBorderActive'),
|
|
32
|
+
// hover边框颜色
|
|
33
|
+
activeBorderColor: getToken('colorInputBorderActive'),
|
|
34
|
+
// active边框颜色
|
|
35
|
+
paddingBlock: getToken('spacingInputPaddingVerticalLg'),
|
|
36
|
+
// 纵向内边距
|
|
37
|
+
colorLabelActive: getToken('colorInputTextLabelActive'),
|
|
38
|
+
// label激活状态的颜色
|
|
39
|
+
colorLabel: getToken('colorInputTextLabel'),
|
|
40
|
+
// label文本颜色
|
|
41
|
+
width: "calc(100vw - ".concat(getToken('spacingModalPaddingHorizontal'), "px - ").concat(getToken('spacingModalPaddingHorizontal'), "px)"),
|
|
42
|
+
// 宽度
|
|
43
|
+
colorError: getToken('colorInputTextError'),
|
|
44
|
+
// 错误信息文本颜色
|
|
45
|
+
iconPaddingLeft: getToken('spacingInputIconPaddingLeft'),
|
|
46
|
+
// 错误信息文本颜色
|
|
47
|
+
colorInputIconStandard: getToken('colorInputIconStandard'),
|
|
48
|
+
// 标准icon颜色
|
|
49
|
+
spacingInputTextHintMessagePaddingTop: getToken('spacingInputTextHintMessagePaddingTop'),
|
|
50
|
+
// 错误信息文本颜色
|
|
51
|
+
colorInputTextHintMessage: getToken('colorInputTextHintMessage'),
|
|
52
|
+
// 信息文本颜色
|
|
53
|
+
colorInputTextCounter: getToken('colorInputTextCounter'),
|
|
54
|
+
// 字数统计文本颜色
|
|
55
|
+
colorErrorBorder: getToken('colorInputBorderError'),
|
|
56
|
+
// error颜色
|
|
57
|
+
colorInputBackgroundHaze: getToken('colorInputBackgroundHaze') // 背景颜色
|
|
58
|
+
};
|
|
59
|
+
return otherDesignTokens;
|
|
55
60
|
};
|
|
56
|
-
|
|
57
|
-
var styleToken = _defineProperty(_defineProperty(_defineProperty({}, "--".concat(prefixCls, "-content-padding"), "".concat(getToken('spacingModalCardPaddingTop'), "px ").concat(getToken('spacingModalCardPaddingHorizontal'), "px ").concat(getToken('spacingModalCardPaddingBottom'), "px ").concat(getToken('spacingModalCardPaddingHorizontal'), "px")), "--".concat(prefixCls, "-footer-border-top"), 'none'), "--".concat(prefixCls, "-footer-padding"), '0px');
|
|
58
|
-
var stickyStyleToken = _defineProperty(_defineProperty(_defineProperty({}, "--".concat(prefixCls, "-content-padding"), "".concat(getToken('spacingModalCardPaddingTop'), "px ").concat(getToken('spacingModalCardPaddingHorizontal'), "px ").concat(40 + getToken('spacingModalButtonStickyPaddingVertical') + getToken('spacingModalButtonStickyPaddingHorizontal'), "px ").concat(getToken('spacingModalCardPaddingHorizontal'), "px")), "--".concat(prefixCls, "-footer-padding"), "".concat(getToken('spacingModalButtonStickyPaddingVertical'), "px ").concat(getToken('spacingModalButtonStickyPaddingHorizontal'), "px")), "--".concat(prefixCls, "-footer-border-top"), '1px solid #E1E1E1');
|
|
59
|
-
export { designTokens, otherDesignTokens, styleToken, stickyStyleToken, commonToken };
|
|
61
|
+
export { useDesignTokens, useOtherDesignTokens };
|
|
@@ -5,12 +5,12 @@ import _Input from "antd/es/input";
|
|
|
5
5
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
6
6
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
7
7
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
8
|
-
var _excluded = ["label", "message", "status", "type", "image", "count", "value", "disabled"];
|
|
8
|
+
var _excluded = ["label", "message", "status", "type", "image", "count", "value", "disabled", "className"];
|
|
9
9
|
import React, { useState, useRef } from 'react';
|
|
10
10
|
import { useStyleRegister } from '@ant-design/cssinjs';
|
|
11
11
|
import { theme } from "../../utils/theme";
|
|
12
12
|
import { cssClasses } from "../../constants";
|
|
13
|
-
import {
|
|
13
|
+
import { useDesignTokens, useOtherDesignTokens } from "./designTokens";
|
|
14
14
|
import Text from "../Text";
|
|
15
15
|
import Icon from "../Icon";
|
|
16
16
|
import "./style/index.less";
|
|
@@ -25,7 +25,11 @@ var TextInputInside = function TextInputInside(props) {
|
|
|
25
25
|
count = props.count,
|
|
26
26
|
value = props.value,
|
|
27
27
|
disabled = props.disabled,
|
|
28
|
+
_props$className = props.className,
|
|
29
|
+
className = _props$className === void 0 ? '' : _props$className,
|
|
28
30
|
attr = _objectWithoutProperties(props, _excluded);
|
|
31
|
+
var designTokens = useDesignTokens();
|
|
32
|
+
var otherDesignTokens = useOtherDesignTokens();
|
|
29
33
|
var paddingInline = designTokens.paddingInline,
|
|
30
34
|
colorBgContainer = designTokens.colorBgContainer,
|
|
31
35
|
borderRadius = designTokens.borderRadius;
|
|
@@ -55,9 +59,7 @@ var TextInputInside = function TextInputInside(props) {
|
|
|
55
59
|
var useCustomButtonStyle = function useCustomButtonStyle() {
|
|
56
60
|
var hashId = useStyleRegister({
|
|
57
61
|
theme: theme,
|
|
58
|
-
token: {
|
|
59
|
-
baseColor: 'blue'
|
|
60
|
-
},
|
|
62
|
+
token: {},
|
|
61
63
|
path: ["".concat(prefix)]
|
|
62
64
|
}, function () {
|
|
63
65
|
return "\n .".concat(prefix, " {\n height: ").concat(paddingBlock * 2 + 24, "px;\n background: ").concat(colorBgContainer, ";\n padding: ").concat(paddingBlock, "px ").concat(paddingInline, "px;\n border-radius: ").concat(borderRadius, "px;\n border: 1px solid #fff;\n }\n .").concat(prefix, ":hover {\n border-color: ").concat(hoverBorderColor, ";\n }\n .").concat(prefix, ":active {\n border-color: ").concat(activeBorderColor, ";\n }\n .").concat(prefix, "-label {\n color: ").concat(colorLabel, ";\n }\n .").concat(prefix, "-focus .").concat(prefix, "-label {\n top: 7px;\n color: ").concat(colorLabelActive, ";\n }\n .").concat(prefix, "-has-search {\n padding-right: ").concat(paddingInline + iconPaddingLeft + 24, "px;\n }\n .").concat(prefix, "-focus {\n padding-top: 30px;\n padding-bottom: 10px;\n }\n .").concat(prefix, "-error {\n border: 1px solid ").concat(colorErrorBorder, ";\n }\n .").concat(prefix, "-error:hover {\n border-color: ").concat(colorErrorBorder, ";\n }\n .").concat(prefix, "-error:active {\n border-color: ").concat(colorErrorBorder, ";\n }\n .").concat(prefix, "-tips {\n bottom: -").concat(spacingInputTextHintMessagePaddingTop + 18, "px;\n color: ").concat(colorInputTextHintMessage, ";\n }\n .").concat(prefix, "-error-tips {\n color: ").concat(colorError, ";\n }\n .").concat(prefix, "-right {\n right: ").concat(paddingInline, "px;\n color: ").concat(colorInputIconStandard, ";\n top: ").concat(paddingBlock, "px;\n line-height: 1;\n }\n .").concat(prefix, "-count {\n color: ").concat(colorInputTextCounter, ";\n }\n .").concat(prefix, "-disabled {\n background: ").concat(colorInputBackgroundHaze, ";\n border-color: ").concat(colorInputBackgroundHaze, ";\n }\n .").concat(prefix, "-disabled:hover {\n border-color: ").concat(colorInputBackgroundHaze, ";\n }\n .").concat(prefix, "-disabled:active {\n border-color: ").concat(colorInputBackgroundHaze, ";\n }\n ");
|
|
@@ -68,6 +70,7 @@ var TextInputInside = function TextInputInside(props) {
|
|
|
68
70
|
var error = status === 'error' ? "".concat(prefix, "-error") : '';
|
|
69
71
|
var disabledStyle = disabled ? "".concat(prefix, "-disabled") : '';
|
|
70
72
|
var focusStyle = focus || value ? "".concat(prefix, "-focus") : '';
|
|
73
|
+
var searchClass = isEmpty(type) ? '' : "".concat(prefix, "-has-search");
|
|
71
74
|
return /*#__PURE__*/_jsx(_Fragment, {
|
|
72
75
|
children: /*#__PURE__*/_jsx(_ConfigProvider, {
|
|
73
76
|
wave: {
|
|
@@ -82,7 +85,7 @@ var TextInputInside = function TextInputInside(props) {
|
|
|
82
85
|
hashed: false
|
|
83
86
|
},
|
|
84
87
|
children: /*#__PURE__*/_jsxs("div", {
|
|
85
|
-
className: "".concat(prefix, " ").concat(focusStyle, " ").concat(error, " ").concat(disabledStyle),
|
|
88
|
+
className: "".concat(prefix, " ").concat(focusStyle, " ").concat(error, " ").concat(disabledStyle, " ").concat(className),
|
|
86
89
|
children: [/*#__PURE__*/_jsx("span", {
|
|
87
90
|
className: "".concat(prefix, "-label"),
|
|
88
91
|
onClick: function onClick() {
|
|
@@ -96,7 +99,7 @@ var TextInputInside = function TextInputInside(props) {
|
|
|
96
99
|
children: label
|
|
97
100
|
})
|
|
98
101
|
}), /*#__PURE__*/_jsx(_Input, _objectSpread({
|
|
99
|
-
className:
|
|
102
|
+
className: searchClass,
|
|
100
103
|
onFocus: function onFocus() {
|
|
101
104
|
setFocus(true);
|
|
102
105
|
},
|