@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,14 +1,47 @@
|
|
|
1
1
|
@import './variables.less';
|
|
2
|
+
@component: list-item;
|
|
2
3
|
|
|
3
|
-
.@{prefix}
|
|
4
|
+
.@{prefix}-@{component} {
|
|
4
5
|
display: flex;
|
|
5
6
|
flex-direction: row;
|
|
6
7
|
align-items: center;
|
|
7
8
|
overflow: hidden;
|
|
8
9
|
|
|
9
|
-
|
|
10
|
+
&.default {
|
|
11
|
+
justify-content: space-between;
|
|
12
|
+
|
|
13
|
+
.@{prefix}-@{component}-title {
|
|
14
|
+
display: block;
|
|
15
|
+
overflow: hidden;
|
|
16
|
+
text-overflow: ellipsis;
|
|
17
|
+
-webkit-box-orient: vertical;
|
|
18
|
+
|
|
19
|
+
&.line1 {
|
|
20
|
+
display: -webkit-box;
|
|
21
|
+
-webkit-line-clamp: 1;
|
|
22
|
+
-webkit-box-orient: vertical;
|
|
23
|
+
overflow: hidden;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
&.line2 {
|
|
27
|
+
display: -webkit-box;
|
|
28
|
+
-webkit-line-clamp: 2;
|
|
29
|
+
-webkit-box-orient: vertical;
|
|
30
|
+
overflow: hidden;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.@{prefix}-@{component}-subTitle {
|
|
35
|
+
display: block;
|
|
36
|
+
white-space: nowrap;
|
|
37
|
+
overflow: hidden;
|
|
38
|
+
text-overflow: ellipsis;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.@{prefix}-@{component}-left {
|
|
10
43
|
|
|
11
|
-
.@{prefix}-icon-container {
|
|
44
|
+
.@{prefix}-@{component}-icon-container {
|
|
12
45
|
width: 80px;
|
|
13
46
|
height: 80px;
|
|
14
47
|
display: flex;
|
|
@@ -17,7 +50,7 @@
|
|
|
17
50
|
flex-shrink: 0;
|
|
18
51
|
}
|
|
19
52
|
|
|
20
|
-
.@{prefix}-image-container {
|
|
53
|
+
.@{prefix}-@{component}-image-container {
|
|
21
54
|
display: flex;
|
|
22
55
|
align-items: center;
|
|
23
56
|
justify-content: center;
|
|
@@ -27,7 +60,7 @@
|
|
|
27
60
|
|
|
28
61
|
}
|
|
29
62
|
|
|
30
|
-
.@{prefix}-
|
|
63
|
+
.@{prefix}-@{component}-right {
|
|
31
64
|
display: flex;
|
|
32
65
|
flex: 1;
|
|
33
66
|
min-width: 0;
|
|
@@ -35,11 +68,11 @@
|
|
|
35
68
|
align-items: center;
|
|
36
69
|
justify-content: space-between;
|
|
37
70
|
|
|
38
|
-
.@{prefix}-title-sub-warp {
|
|
71
|
+
.@{prefix}-@{component}-title-sub-warp {
|
|
39
72
|
flex: 1;
|
|
40
73
|
overflow: hidden;
|
|
41
74
|
|
|
42
|
-
.@{prefix}-
|
|
75
|
+
.@{prefix}-@{component}-title {
|
|
43
76
|
display: block;
|
|
44
77
|
overflow: hidden;
|
|
45
78
|
text-overflow: ellipsis;
|
|
@@ -60,7 +93,7 @@
|
|
|
60
93
|
}
|
|
61
94
|
}
|
|
62
95
|
|
|
63
|
-
.@{prefix}-
|
|
96
|
+
.@{prefix}-@{component}-subTitle {
|
|
64
97
|
display: block;
|
|
65
98
|
white-space: nowrap;
|
|
66
99
|
overflow: hidden;
|
|
@@ -68,7 +101,7 @@
|
|
|
68
101
|
}
|
|
69
102
|
}
|
|
70
103
|
|
|
71
|
-
.@{prefix}-sub-icon {
|
|
104
|
+
.@{prefix}-@{component}-sub-icon {
|
|
72
105
|
display: flex;
|
|
73
106
|
align-items: center;
|
|
74
107
|
}
|
|
@@ -1,31 +1,22 @@
|
|
|
1
|
-
declare const
|
|
1
|
+
declare const useDesignTokens: () => {
|
|
2
2
|
borderRadiusLG: any;
|
|
3
3
|
titleColor: any;
|
|
4
4
|
contentBg: any;
|
|
5
5
|
headerBg: any;
|
|
6
6
|
colorText: any;
|
|
7
7
|
colorBgMask: any;
|
|
8
|
+
colorIcon: any;
|
|
8
9
|
};
|
|
9
|
-
declare const
|
|
10
|
+
declare const useOtherDesignTokens: () => {
|
|
10
11
|
width: string;
|
|
11
|
-
spacingModalCardPaddingTop:
|
|
12
|
-
spacingModalButtonStickyPaddingVertical:
|
|
13
|
-
spacingModalCardVerticalGap:
|
|
14
|
-
spacingModalCardPaddingHorizontal:
|
|
12
|
+
spacingModalCardPaddingTop: number;
|
|
13
|
+
spacingModalButtonStickyPaddingVertical: number;
|
|
14
|
+
spacingModalCardVerticalGap: number;
|
|
15
|
+
spacingModalCardPaddingHorizontal: number;
|
|
16
|
+
spacingModalButtonStickyPaddingHorizontal: number;
|
|
17
|
+
spacingModalCardPaddingBottom: number;
|
|
15
18
|
};
|
|
16
|
-
declare const
|
|
19
|
+
declare const useCommonToken: () => {
|
|
17
20
|
[x: string]: string | number;
|
|
18
21
|
};
|
|
19
|
-
|
|
20
|
-
[x: string]: string | number;
|
|
21
|
-
};
|
|
22
|
-
declare const stickyFooterStyleToken: {
|
|
23
|
-
[x: string]: string | number;
|
|
24
|
-
};
|
|
25
|
-
declare const stickyHeaderFooterStyleToken: {
|
|
26
|
-
[x: string]: string | number;
|
|
27
|
-
};
|
|
28
|
-
declare const stickyHeaderStyleToken: {
|
|
29
|
-
[x: string]: string | number;
|
|
30
|
-
};
|
|
31
|
-
export { designTokens, otherDesignTokens, styleToken, stickyFooterStyleToken, stickyHeaderStyleToken, stickyHeaderFooterStyleToken, commonToken };
|
|
22
|
+
export { useDesignTokens, useOtherDesignTokens, useCommonToken };
|
|
@@ -19,70 +19,54 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
19
19
|
// src/components/Modal/designTokens.ts
|
|
20
20
|
var designTokens_exports = {};
|
|
21
21
|
__export(designTokens_exports, {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
stickyFooterStyleToken: () => stickyFooterStyleToken,
|
|
26
|
-
stickyHeaderFooterStyleToken: () => stickyHeaderFooterStyleToken,
|
|
27
|
-
stickyHeaderStyleToken: () => stickyHeaderStyleToken,
|
|
28
|
-
styleToken: () => styleToken
|
|
22
|
+
useCommonToken: () => useCommonToken,
|
|
23
|
+
useDesignTokens: () => useDesignTokens,
|
|
24
|
+
useOtherDesignTokens: () => useOtherDesignTokens
|
|
29
25
|
});
|
|
30
26
|
module.exports = __toCommonJS(designTokens_exports);
|
|
31
|
-
var
|
|
27
|
+
var import_utils = require("../../utils");
|
|
28
|
+
var import_scaleTool = require("../../utils/scaleTool");
|
|
32
29
|
var import_constants = require("../../constants");
|
|
33
30
|
var prefixCls = import_constants.cssClasses.PREFIX + "-modal";
|
|
34
|
-
var
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
31
|
+
var useDesignTokens = () => {
|
|
32
|
+
const getToken = (0, import_utils.useDynamicTokens)();
|
|
33
|
+
const designTokens = {
|
|
34
|
+
borderRadiusLG: getToken("borderRadiusModal"),
|
|
35
|
+
// 圆角
|
|
36
|
+
titleColor: getToken("colorModalTextHeader"),
|
|
37
|
+
// header文本颜色
|
|
38
|
+
contentBg: getToken("colorModalBackground"),
|
|
39
|
+
// 背景
|
|
40
|
+
headerBg: getToken("colorModalBackground"),
|
|
41
|
+
// 背景
|
|
42
|
+
colorText: getToken("colorModalTextBody"),
|
|
43
|
+
// 内容文本颜色
|
|
44
|
+
colorBgMask: getToken("colorModalOverlay"),
|
|
45
|
+
// 遮罩颜色
|
|
46
|
+
colorIcon: getToken("colorModalIcon")
|
|
47
|
+
// icon颜色
|
|
48
|
+
};
|
|
49
|
+
return designTokens;
|
|
47
50
|
};
|
|
48
|
-
var
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
51
|
+
var useOtherDesignTokens = () => {
|
|
52
|
+
const getToken = (0, import_utils.useDynamicTokens)();
|
|
53
|
+
const otherDesignTokens = {
|
|
54
|
+
width: `calc(100vw - ${(0, import_scaleTool.wSacle)(getToken("spacingModalPaddingHorizontal"))}px - ${(0, import_scaleTool.wSacle)(getToken("spacingModalPaddingHorizontal"))}px)`,
|
|
55
|
+
// 宽度
|
|
56
|
+
spacingModalCardPaddingTop: (0, import_scaleTool.wSacle)(getToken("spacingModalCardPaddingTop")),
|
|
57
|
+
spacingModalButtonStickyPaddingVertical: (0, import_scaleTool.wSacle)(getToken("spacingModalButtonStickyPaddingVertical")),
|
|
58
|
+
spacingModalCardVerticalGap: (0, import_scaleTool.wSacle)(getToken("spacingModalCardVerticalGap")),
|
|
59
|
+
spacingModalCardPaddingHorizontal: (0, import_scaleTool.wSacle)(getToken("spacingModalCardPaddingHorizontal")),
|
|
60
|
+
spacingModalButtonStickyPaddingHorizontal: (0, import_scaleTool.wSacle)(getToken("spacingModalButtonStickyPaddingHorizontal")),
|
|
61
|
+
spacingModalCardPaddingBottom: (0, import_scaleTool.wSacle)(getToken("spacingModalCardPaddingBottom"))
|
|
62
|
+
};
|
|
63
|
+
return otherDesignTokens;
|
|
55
64
|
};
|
|
56
|
-
var
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
[`--${prefixCls}-footer-padding`]: 0,
|
|
64
|
-
[`--${prefixCls}-body-padding`]: `${otherDesignTokens.spacingModalCardVerticalGap}px 0`,
|
|
65
|
-
[`--${prefixCls}-header-margin-bottom`]: 0
|
|
66
|
-
};
|
|
67
|
-
var stickyFooterStyleToken = {
|
|
68
|
-
[`--${prefixCls}-content-padding`]: `${otherDesignTokens.spacingModalCardPaddingTop}px ${otherDesignTokens.spacingModalCardPaddingHorizontal}px ${40 + (0, import_tokenHelper.getToken)("spacingModalButtonStickyPaddingVertical") + (0, import_tokenHelper.getToken)("spacingModalButtonStickyPaddingHorizontal")}px ${otherDesignTokens.spacingModalCardPaddingHorizontal}px`,
|
|
69
|
-
[`--${prefixCls}-footer-padding`]: `${otherDesignTokens.spacingModalButtonStickyPaddingVertical}px ${(0, import_tokenHelper.getToken)("spacingModalButtonStickyPaddingHorizontal")}px`,
|
|
70
|
-
[`--${prefixCls}-footer-border-top`]: "1px solid #E1E1E1",
|
|
71
|
-
[`--${prefixCls}-body-padding`]: `${otherDesignTokens.spacingModalCardVerticalGap}px 0`,
|
|
72
|
-
[`--${prefixCls}-header-margin-bottom`]: 0
|
|
73
|
-
};
|
|
74
|
-
var stickyHeaderFooterStyleToken = {
|
|
75
|
-
[`--${prefixCls}-content-padding`]: `${otherDesignTokens.spacingModalCardPaddingTop}px ${otherDesignTokens.spacingModalCardPaddingHorizontal}px ${40 + (0, import_tokenHelper.getToken)("spacingModalButtonStickyPaddingVertical") + (0, import_tokenHelper.getToken)("spacingModalButtonStickyPaddingHorizontal")}px ${otherDesignTokens.spacingModalCardPaddingHorizontal}px`,
|
|
76
|
-
[`--${prefixCls}-footer-padding`]: `${otherDesignTokens.spacingModalButtonStickyPaddingVertical}px ${(0, import_tokenHelper.getToken)("spacingModalButtonStickyPaddingHorizontal")}px`,
|
|
77
|
-
[`--${prefixCls}-footer-border-top`]: "1px solid #E1E1E1",
|
|
78
|
-
[`--${prefixCls}-body-padding`]: 0,
|
|
79
|
-
[`--${prefixCls}-header-margin-bottom`]: `${otherDesignTokens.spacingModalCardVerticalGap}px`
|
|
80
|
-
};
|
|
81
|
-
var stickyHeaderStyleToken = {
|
|
82
|
-
[`--${prefixCls}-content-padding`]: `0 ${otherDesignTokens.spacingModalCardPaddingHorizontal}px ${(0, import_tokenHelper.getToken)("spacingModalCardPaddingBottom")}px ${otherDesignTokens.spacingModalCardPaddingHorizontal}px`,
|
|
83
|
-
[`--${prefixCls}-footer-padding`]: `${otherDesignTokens.spacingModalCardVerticalGap}px 0 0`,
|
|
84
|
-
[`--${prefixCls}-footer-border-top`]: "none",
|
|
85
|
-
[`--${prefixCls}-body-padding`]: `${otherDesignTokens.spacingModalCardPaddingTop * 2 + 26}px 0 0 0`,
|
|
86
|
-
[`--${prefixCls}-header-margin-bottom`]: 0,
|
|
87
|
-
[`--${prefixCls}-header-padding`]: `${otherDesignTokens.spacingModalCardPaddingTop}px ${otherDesignTokens.spacingModalCardPaddingHorizontal}px`
|
|
65
|
+
var useCommonToken = () => {
|
|
66
|
+
const getToken = (0, import_utils.useDynamicTokens)();
|
|
67
|
+
const commonToken = {
|
|
68
|
+
[`--${prefixCls}-footer-margin-top`]: 0,
|
|
69
|
+
[`--${prefixCls}-footer-padding`]: `${(0, import_scaleTool.wSacle)(getToken("spacingModalButtonPaddingTop"))}px 0 0`
|
|
70
|
+
};
|
|
71
|
+
return commonToken;
|
|
88
72
|
};
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
var __create = Object.create;
|
|
2
2
|
var __defProp = Object.defineProperty;
|
|
3
|
+
var __defProps = Object.defineProperties;
|
|
3
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
6
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
7
|
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
6
8
|
var __getProtoOf = Object.getPrototypeOf;
|
|
@@ -18,6 +20,7 @@ var __spreadValues = (a, b) => {
|
|
|
18
20
|
}
|
|
19
21
|
return a;
|
|
20
22
|
};
|
|
23
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
21
24
|
var __objRest = (source, exclude) => {
|
|
22
25
|
var target = {};
|
|
23
26
|
for (var prop in source)
|
|
@@ -76,7 +79,8 @@ var Modal = (props) => {
|
|
|
76
79
|
size = "50%",
|
|
77
80
|
prefix = `${import_constants.cssClasses.PREFIX}-modal`,
|
|
78
81
|
footerAlign = "right",
|
|
79
|
-
footer = null
|
|
82
|
+
footer = null,
|
|
83
|
+
className = ""
|
|
80
84
|
} = _a, attr = __objRest(_a, [
|
|
81
85
|
"title",
|
|
82
86
|
"style",
|
|
@@ -86,16 +90,50 @@ var Modal = (props) => {
|
|
|
86
90
|
"size",
|
|
87
91
|
"prefix",
|
|
88
92
|
"footerAlign",
|
|
89
|
-
"footer"
|
|
93
|
+
"footer",
|
|
94
|
+
"className"
|
|
90
95
|
]);
|
|
96
|
+
const designTokens = (0, import_designTokens.useDesignTokens)();
|
|
97
|
+
const otherDesignTokens = (0, import_designTokens.useOtherDesignTokens)();
|
|
98
|
+
const commonToken = (0, import_designTokens.useCommonToken)();
|
|
91
99
|
const {
|
|
92
100
|
spacingModalCardPaddingTop,
|
|
93
|
-
spacingModalButtonStickyPaddingVertical
|
|
94
|
-
|
|
101
|
+
spacingModalButtonStickyPaddingVertical,
|
|
102
|
+
spacingModalCardPaddingHorizontal
|
|
103
|
+
} = otherDesignTokens;
|
|
104
|
+
const styleToken = {
|
|
105
|
+
[`--${prefix}-content-padding`]: `${otherDesignTokens.spacingModalCardPaddingTop}px ${otherDesignTokens.spacingModalCardPaddingHorizontal}px ${otherDesignTokens.spacingModalCardPaddingBottom}px ${otherDesignTokens.spacingModalCardPaddingHorizontal}px`,
|
|
106
|
+
[`--${prefix}-footer-border-top`]: "none",
|
|
107
|
+
[`--${prefix}-footer-padding`]: 0,
|
|
108
|
+
[`--${prefix}-body-padding`]: `${otherDesignTokens.spacingModalCardVerticalGap}px 0`,
|
|
109
|
+
[`--${prefix}-header-margin-bottom`]: 0
|
|
110
|
+
};
|
|
111
|
+
const stickyFooterStyleToken = {
|
|
112
|
+
[`--${prefix}-content-padding`]: `${otherDesignTokens.spacingModalCardPaddingTop}px ${otherDesignTokens.spacingModalCardPaddingHorizontal}px ${40 + otherDesignTokens.spacingModalButtonStickyPaddingVertical + otherDesignTokens.spacingModalButtonStickyPaddingHorizontal}px ${otherDesignTokens.spacingModalCardPaddingHorizontal}px`,
|
|
113
|
+
[`--${prefix}-footer-padding`]: `${otherDesignTokens.spacingModalButtonStickyPaddingVertical}px ${otherDesignTokens.spacingModalButtonStickyPaddingHorizontal}px`,
|
|
114
|
+
[`--${prefix}-footer-border-top`]: "1px solid #E1E1E1",
|
|
115
|
+
[`--${prefix}-body-padding`]: `${otherDesignTokens.spacingModalCardVerticalGap}px 0`,
|
|
116
|
+
[`--${prefix}-header-margin-bottom`]: 0
|
|
117
|
+
};
|
|
118
|
+
const stickyHeaderFooterStyleToken = {
|
|
119
|
+
[`--${prefix}-content-padding`]: `${otherDesignTokens.spacingModalCardPaddingTop}px ${otherDesignTokens.spacingModalCardPaddingHorizontal}px ${40 + otherDesignTokens.spacingModalButtonStickyPaddingVertical + otherDesignTokens.spacingModalButtonStickyPaddingHorizontal}px ${otherDesignTokens.spacingModalCardPaddingHorizontal}px`,
|
|
120
|
+
[`--${prefix}-footer-padding`]: `${otherDesignTokens.spacingModalButtonStickyPaddingVertical}px ${otherDesignTokens.spacingModalButtonStickyPaddingHorizontal}px`,
|
|
121
|
+
[`--${prefix}-footer-border-top`]: "1px solid #E1E1E1",
|
|
122
|
+
[`--${prefix}-body-padding`]: 0,
|
|
123
|
+
[`--${prefix}-header-margin-bottom`]: `${otherDesignTokens.spacingModalCardVerticalGap}px`
|
|
124
|
+
};
|
|
125
|
+
const stickyHeaderStyleToken = {
|
|
126
|
+
[`--${prefix}-content-padding`]: `0 ${otherDesignTokens.spacingModalCardPaddingHorizontal}px ${otherDesignTokens.spacingModalCardPaddingBottom}px ${otherDesignTokens.spacingModalCardPaddingHorizontal}px`,
|
|
127
|
+
[`--${prefix}-footer-padding`]: `${otherDesignTokens.spacingModalCardVerticalGap}px 0 0`,
|
|
128
|
+
[`--${prefix}-footer-border-top`]: "none",
|
|
129
|
+
[`--${prefix}-body-padding`]: `${otherDesignTokens.spacingModalCardPaddingTop * 2 + 26}px 0 0 0`,
|
|
130
|
+
[`--${prefix}-header-margin-bottom`]: 0,
|
|
131
|
+
[`--${prefix}-header-padding`]: `${otherDesignTokens.spacingModalCardPaddingTop}px ${otherDesignTokens.spacingModalCardPaddingHorizontal}px`
|
|
132
|
+
};
|
|
95
133
|
const useCustomButtonStyle = () => {
|
|
96
134
|
const hashId = (0, import_cssinjs.useStyleRegister)({
|
|
97
135
|
theme: import_theme.theme,
|
|
98
|
-
token: {
|
|
136
|
+
token: {},
|
|
99
137
|
path: [`${prefix}`]
|
|
100
138
|
}, () => `
|
|
101
139
|
.${prefix}-sticky-headers .${prefix}-header {
|
|
@@ -118,21 +156,30 @@ var Modal = (props) => {
|
|
|
118
156
|
.${prefix}-center .${prefix}-footer {
|
|
119
157
|
text-align: center;
|
|
120
158
|
}
|
|
159
|
+
.${prefix} .${prefix}-close {
|
|
160
|
+
top: ${spacingModalCardPaddingHorizontal - 4}px
|
|
161
|
+
}
|
|
162
|
+
.${prefix}-mobile .${prefix}-close-x {
|
|
163
|
+
font-size: 24px;
|
|
164
|
+
}
|
|
165
|
+
.${prefix}-desktop .${prefix}-close-x {
|
|
166
|
+
font-size: 16px;
|
|
167
|
+
}
|
|
121
168
|
`);
|
|
122
169
|
return hashId;
|
|
123
170
|
};
|
|
124
171
|
useCustomButtonStyle();
|
|
125
|
-
const commonStyle = __spreadValues({},
|
|
172
|
+
const commonStyle = __spreadValues({}, commonToken);
|
|
126
173
|
const getStyle = () => {
|
|
127
174
|
switch (type) {
|
|
128
175
|
case "stickyHeaderFooter":
|
|
129
|
-
return
|
|
176
|
+
return stickyHeaderFooterStyleToken;
|
|
130
177
|
case "stickyHeader":
|
|
131
|
-
return
|
|
178
|
+
return stickyHeaderStyleToken;
|
|
132
179
|
case "stickyFooter":
|
|
133
|
-
return
|
|
180
|
+
return stickyFooterStyleToken;
|
|
134
181
|
default:
|
|
135
|
-
return
|
|
182
|
+
return styleToken;
|
|
136
183
|
}
|
|
137
184
|
};
|
|
138
185
|
const customStyle = __spreadValues({}, getStyle());
|
|
@@ -146,7 +193,7 @@ var Modal = (props) => {
|
|
|
146
193
|
prefixCls: import_constants.cssClasses.PREFIX,
|
|
147
194
|
theme: {
|
|
148
195
|
components: {
|
|
149
|
-
Modal: __spreadValues({},
|
|
196
|
+
Modal: __spreadValues({}, designTokens)
|
|
150
197
|
},
|
|
151
198
|
cssVar: true,
|
|
152
199
|
hashed: false
|
|
@@ -154,13 +201,13 @@ var Modal = (props) => {
|
|
|
154
201
|
},
|
|
155
202
|
/* @__PURE__ */ import_react.default.createElement(
|
|
156
203
|
import_antd.Modal,
|
|
157
|
-
__spreadValues({
|
|
158
|
-
width: breakpoint === "desktop" ? size :
|
|
204
|
+
__spreadProps(__spreadValues({}, attr), {
|
|
205
|
+
width: breakpoint === "desktop" ? size : otherDesignTokens.width,
|
|
159
206
|
title: /* @__PURE__ */ import_react.default.createElement(import_Text.default, { size: "TitleT21Bold" }, title),
|
|
160
|
-
style: __spreadValues(__spreadValues(__spreadValues({ top: "10%" }, commonStyle), customStyle), style),
|
|
161
207
|
footer,
|
|
162
|
-
className: `${stickyFooterClass} ${prefix}-${breakpoint} ${prefix}-${footerAlign} ${stickyHeaderClass} ${stickyHeaderFooterClass}
|
|
163
|
-
|
|
208
|
+
className: `${stickyFooterClass} ${prefix}-${breakpoint} ${prefix}-${footerAlign} ${stickyHeaderClass} ${stickyHeaderFooterClass} ${className}`,
|
|
209
|
+
style: __spreadValues(__spreadValues(__spreadValues({ top: "10%" }, commonStyle), customStyle), style)
|
|
210
|
+
}),
|
|
164
211
|
/* @__PURE__ */ import_react.default.createElement(import_Text.default, { size: "ContentC14Regular" }, children)
|
|
165
212
|
)
|
|
166
213
|
));
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
declare const
|
|
2
|
-
spacingTopNavigationPaddingHorizontal:
|
|
3
|
-
spacingTopNavigationPaddingBottom:
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
declare const useDesignTokens: () => {
|
|
2
|
+
spacingTopNavigationPaddingHorizontal: number;
|
|
3
|
+
spacingTopNavigationPaddingBottom: number;
|
|
4
|
+
spacingTopNavigationPaddingTop: number;
|
|
5
|
+
spacingTopNavigationHorizontalGap: number;
|
|
6
|
+
spacingTopNavigationIconButtonHorizontalGap: number;
|
|
7
|
+
spacingTopNavigationTextLinkPaddingRight: number;
|
|
8
|
+
spacingTopNavigationTitlePaddingVertical: number;
|
|
8
9
|
colorTopNavigationTitleStandard: any;
|
|
9
10
|
colorTopNavigationTitleInverse: any;
|
|
10
11
|
colorTopNavigationGradient: any;
|
|
@@ -13,4 +14,4 @@ declare const designTokens: {
|
|
|
13
14
|
colorTopNavigationBackgroundHaze: any;
|
|
14
15
|
colorTopNavigationBackgroundInverse: any;
|
|
15
16
|
};
|
|
16
|
-
export
|
|
17
|
+
export { useDesignTokens };
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
var __create = Object.create;
|
|
2
1
|
var __defProp = Object.defineProperty;
|
|
3
2
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
3
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
6
4
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
5
|
var __export = (target, all) => {
|
|
8
6
|
for (var name in all)
|
|
@@ -16,38 +14,35 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
14
|
}
|
|
17
15
|
return to;
|
|
18
16
|
};
|
|
19
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
-
mod
|
|
26
|
-
));
|
|
27
17
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
18
|
|
|
29
19
|
// src/components/Navigation/designTokens.ts
|
|
30
20
|
var designTokens_exports = {};
|
|
31
21
|
__export(designTokens_exports, {
|
|
32
|
-
|
|
22
|
+
useDesignTokens: () => useDesignTokens
|
|
33
23
|
});
|
|
34
24
|
module.exports = __toCommonJS(designTokens_exports);
|
|
35
|
-
var
|
|
36
|
-
var
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
25
|
+
var import_scaleTool = require("../../utils/scaleTool");
|
|
26
|
+
var import_utils = require("../../utils");
|
|
27
|
+
var useDesignTokens = () => {
|
|
28
|
+
const getToken = (0, import_utils.useDynamicTokens)();
|
|
29
|
+
const designTokens = {
|
|
30
|
+
spacingTopNavigationPaddingHorizontal: (0, import_scaleTool.wSacle)(getToken("spacingTopNavigationPaddingHorizontal")),
|
|
31
|
+
// 左右padding
|
|
32
|
+
spacingTopNavigationPaddingBottom: (0, import_scaleTool.wSacle)(getToken("spacingTopNavigationPaddingBottom")),
|
|
33
|
+
//底部padding
|
|
34
|
+
spacingTopNavigationPaddingTop: (0, import_scaleTool.wSacle)(getToken("spacingTopNavigationPaddingTop")),
|
|
35
|
+
spacingTopNavigationHorizontalGap: (0, import_scaleTool.wSacle)(getToken("spacingTopNavigationHorizontalGap")),
|
|
36
|
+
spacingTopNavigationIconButtonHorizontalGap: (0, import_scaleTool.wSacle)(getToken("spacingTopNavigationIconButtonHorizontalGap")),
|
|
37
|
+
spacingTopNavigationTextLinkPaddingRight: (0, import_scaleTool.wSacle)(getToken("spacingTopNavigationTextLinkPaddingRight")),
|
|
38
|
+
spacingTopNavigationTitlePaddingVertical: (0, import_scaleTool.wSacle)(getToken("spacingTopNavigationTitlePaddingVertical")),
|
|
39
|
+
colorTopNavigationTitleStandard: getToken("colorTopNavigationTitleStandard"),
|
|
40
|
+
colorTopNavigationTitleInverse: getToken("colorTopNavigationTitleInverse"),
|
|
41
|
+
colorTopNavigationGradient: getToken("colorTopNavigationGradient"),
|
|
42
|
+
colorTopNavigationBackground: getToken("colorTopNavigationBackground"),
|
|
43
|
+
colorTopNavigationBorderBottom: getToken("colorTopNavigationBorderBottom"),
|
|
44
|
+
colorTopNavigationBackgroundHaze: getToken("colorTopNavigationBackgroundHaze"),
|
|
45
|
+
colorTopNavigationBackgroundInverse: getToken("colorTopNavigationBackgroundInverse")
|
|
46
|
+
};
|
|
47
|
+
return designTokens;
|
|
52
48
|
};
|
|
53
|
-
var designTokens_default = designTokens;
|
|
@@ -59,7 +59,7 @@ __export(Navigation_exports, {
|
|
|
59
59
|
});
|
|
60
60
|
module.exports = __toCommonJS(Navigation_exports);
|
|
61
61
|
var import_react = __toESM(require("react"));
|
|
62
|
-
var import_designTokens =
|
|
62
|
+
var import_designTokens = require("./designTokens");
|
|
63
63
|
var import_cssinjs = require("@ant-design/cssinjs");
|
|
64
64
|
var import_lodash = require("lodash");
|
|
65
65
|
var import_theme = require("../../utils/theme");
|
|
@@ -69,7 +69,7 @@ var import_style = require("./style/index.less");
|
|
|
69
69
|
var Navigation = (_a) => {
|
|
70
70
|
var _b = _a, {
|
|
71
71
|
hideBorder,
|
|
72
|
-
className,
|
|
72
|
+
className = "",
|
|
73
73
|
rightIcons,
|
|
74
74
|
rightLink,
|
|
75
75
|
title,
|
|
@@ -79,7 +79,8 @@ var Navigation = (_a) => {
|
|
|
79
79
|
imgBackground,
|
|
80
80
|
noRight = false,
|
|
81
81
|
leftIconName,
|
|
82
|
-
leftIconSize
|
|
82
|
+
leftIconSize,
|
|
83
|
+
hidegoback = false
|
|
83
84
|
} = _b, restProps = __objRest(_b, [
|
|
84
85
|
"hideBorder",
|
|
85
86
|
"className",
|
|
@@ -92,12 +93,15 @@ var Navigation = (_a) => {
|
|
|
92
93
|
"imgBackground",
|
|
93
94
|
"noRight",
|
|
94
95
|
"leftIconName",
|
|
95
|
-
"leftIconSize"
|
|
96
|
+
"leftIconSize",
|
|
97
|
+
"hidegoback"
|
|
96
98
|
]);
|
|
97
99
|
var _a2;
|
|
100
|
+
const designTokens = (0, import_designTokens.useDesignTokens)();
|
|
98
101
|
const {
|
|
99
102
|
spacingTopNavigationPaddingHorizontal,
|
|
100
103
|
spacingTopNavigationPaddingBottom,
|
|
104
|
+
spacingTopNavigationPaddingTop,
|
|
101
105
|
colorTopNavigationBorderBottom,
|
|
102
106
|
spacingTopNavigationTextLinkPaddingRight,
|
|
103
107
|
colorTopNavigationBackgroundInverse,
|
|
@@ -105,8 +109,7 @@ var Navigation = (_a) => {
|
|
|
105
109
|
colorTopNavigationTitleStandard,
|
|
106
110
|
colorTopNavigationTitleInverse,
|
|
107
111
|
colorTopNavigationGradient
|
|
108
|
-
} =
|
|
109
|
-
console.log("designTokens", import_designTokens.default);
|
|
112
|
+
} = designTokens;
|
|
110
113
|
const useCustomButtonStyle = () => {
|
|
111
114
|
const hashId = (0, import_cssinjs.useStyleRegister)({
|
|
112
115
|
theme: import_theme.theme,
|
|
@@ -117,7 +120,7 @@ var Navigation = (_a) => {
|
|
|
117
120
|
padding-left: ${spacingTopNavigationPaddingHorizontal}px;
|
|
118
121
|
padding-right: ${spacingTopNavigationPaddingHorizontal}px;
|
|
119
122
|
padding-bottom: ${spacingTopNavigationPaddingBottom}px;
|
|
120
|
-
padding-top: ${
|
|
123
|
+
padding-top: ${spacingTopNavigationPaddingTop}px;
|
|
121
124
|
border-bottom: 1px solid ${colorTopNavigationBorderBottom};
|
|
122
125
|
background-color:${colorTopNavigationBackground};
|
|
123
126
|
&.inverse {
|
|
@@ -162,12 +165,10 @@ var Navigation = (_a) => {
|
|
|
162
165
|
return /* @__PURE__ */ import_react.default.createElement(
|
|
163
166
|
"header",
|
|
164
167
|
__spreadValues({
|
|
165
|
-
className: `${import_constants.cssClasses.PREFIX}-header
|
|
168
|
+
className: `${import_constants.cssClasses.PREFIX}-header ${hideBorder ? "hideBorder" : ""} ${isInverse ? "inverse" : ""} ${imgBackground ? "imgBackground" : ""} ${noRight ? "noRight" : ""} ${className || ""}`
|
|
166
169
|
}, restProps),
|
|
167
|
-
/* @__PURE__ */ import_react.default.createElement(import__.IconButton, { className: `${import_constants.cssClasses.PREFIX}-header-back`, customeIconSize: leftIconSize, inverse: isInverse, size: "medium", name: leftIconName || "icon-a-Backarrow-copy", onClick: onGoBack }),
|
|
168
|
-
/* @__PURE__ */ import_react.default.createElement("div", { className: `
|
|
169
|
-
${import_constants.cssClasses.PREFIX}-title-warp
|
|
170
|
-
` }, !(0, import_lodash.isEmpty)(titleIconBadge) ? /* @__PURE__ */ import_react.default.createElement("div", { className: `${import_constants.cssClasses.PREFIX}-title-badge` }, /* @__PURE__ */ import_react.default.createElement(import__.Icon, { inverse: isInverse, size: 24, style: { marginRight: "4px" }, name: titleIconBadge.iconName }), /* @__PURE__ */ import_react.default.createElement(import__.Text, { inverse: isInverse, size: "ContentC14Bold", className: `${import_constants.cssClasses.PREFIX}-title ${isInverse ? "inverse" : ""} ` }, titleIconBadge.title), /* @__PURE__ */ import_react.default.createElement("div", { className: `${import_constants.cssClasses.PREFIX}-badge` }, +titleIconBadge.badge > 99 ? "99+" : titleIconBadge.badge)) : /* @__PURE__ */ import_react.default.createElement(import__.Text, { inverse: isInverse, size: "ContentC14Bold", className: `${import_constants.cssClasses.PREFIX}-title ${isInverse ? "inverse" : ""} ` }, title)),
|
|
170
|
+
!hidegoback && /* @__PURE__ */ import_react.default.createElement(import__.IconButton, { className: `${import_constants.cssClasses.PREFIX}-header-back`, customeIconSize: leftIconSize, inverse: isInverse, size: "medium", name: leftIconName || "icon-a-Backarrow-copy", onClick: onGoBack }),
|
|
171
|
+
/* @__PURE__ */ import_react.default.createElement("div", { className: `${import_constants.cssClasses.PREFIX}-title-warp` }, !(0, import_lodash.isEmpty)(titleIconBadge) ? /* @__PURE__ */ import_react.default.createElement("div", { className: `${import_constants.cssClasses.PREFIX}-title-badge` }, /* @__PURE__ */ import_react.default.createElement(import__.Icon, { inverse: isInverse, size: 24, style: { marginRight: "4px" }, name: titleIconBadge.iconName }), /* @__PURE__ */ import_react.default.createElement(import__.Text, { inverse: isInverse, size: "NavigationBold", className: `${import_constants.cssClasses.PREFIX}-title ${isInverse ? "inverse" : ""} ` }, titleIconBadge.title), /* @__PURE__ */ import_react.default.createElement("div", { className: `${import_constants.cssClasses.PREFIX}-badge` }, +titleIconBadge.badge > 99 ? "99+" : titleIconBadge.badge)) : /* @__PURE__ */ import_react.default.createElement(import__.Text, { inverse: isInverse, size: "NavigationBold", className: `${import_constants.cssClasses.PREFIX}-title ${isInverse ? "inverse" : ""} ` }, title)),
|
|
171
172
|
!noRight && /* @__PURE__ */ import_react.default.createElement(import__.IconButtonGroup, { className: `${import_constants.cssClasses.PREFIX}-rightWarp` }, (_a2 = rightIcons == null ? void 0 : rightIcons.slice(0, 3)) == null ? void 0 : _a2.map((i, index) => /* @__PURE__ */ import_react.default.createElement(import__.IconButton, { inverse: isInverse, key: index, name: i.iconName, size: "medium", onClick: i.onIconClick })), !(0, import_lodash.isEmpty)(rightLink) && /* @__PURE__ */ import_react.default.createElement(import__.TextLink, { inverse: isInverse, className: `${import_constants.cssClasses.PREFIX}-right-link`, type: import__.TextLinkEnum.default, text: rightLink.linkText, onClick: rightLink.onLinkClick }))
|
|
172
173
|
);
|
|
173
174
|
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
declare const useDesignTokens: () => {
|
|
2
|
+
colorNotificationBackgroundInfo: any;
|
|
3
|
+
borderRadiusNotification: any;
|
|
4
|
+
spacingNotificationPaddingHorizontal: any;
|
|
5
|
+
spacingNotificationPaddingVertical: any;
|
|
6
|
+
colorNotificationTextTitle: any;
|
|
7
|
+
colorNotificationTextBody: any;
|
|
8
|
+
};
|
|
9
|
+
export { useDesignTokens };
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// src/components/Notification/designTokens.ts
|
|
20
|
+
var designTokens_exports = {};
|
|
21
|
+
__export(designTokens_exports, {
|
|
22
|
+
useDesignTokens: () => useDesignTokens
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(designTokens_exports);
|
|
25
|
+
var import_utils = require("../../utils");
|
|
26
|
+
var useDesignTokens = () => {
|
|
27
|
+
const getToken = (0, import_utils.useDynamicTokens)();
|
|
28
|
+
const designTokens = {
|
|
29
|
+
colorNotificationBackgroundInfo: getToken("colorNotificationBackgroundInfo"),
|
|
30
|
+
borderRadiusNotification: getToken("borderRadiusNotification"),
|
|
31
|
+
spacingNotificationPaddingHorizontal: getToken("spacingNotificationPaddingHorizontal"),
|
|
32
|
+
spacingNotificationPaddingVertical: getToken("spacingNotificationPaddingVertical"),
|
|
33
|
+
colorNotificationTextTitle: getToken("colorNotificationTextTitle"),
|
|
34
|
+
colorNotificationTextBody: getToken("colorNotificationTextBody")
|
|
35
|
+
};
|
|
36
|
+
return designTokens;
|
|
37
|
+
};
|