@oceanbase/design 1.0.0-alpha.2 → 1.0.0-alpha.4
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/dist/design.min.js +1 -1
- package/es/_util/genComponentStyleHook.d.ts +2 -2
- package/es/_util/genComponentStyleHook.js +15 -2
- package/es/alert/index.d.ts +2 -2
- package/es/alert/index.js +13 -4
- package/es/alert/style/index.d.ts +1 -1
- package/es/alert/style/index.js +152 -58
- package/es/app/index.d.ts +8 -0
- package/es/app/index.js +36 -1
- package/es/app/style/index.d.ts +9 -0
- package/es/{_util/genStyle.js → app/style/index.js} +10 -11
- package/es/badge/index.js +2 -3
- package/es/badge/style/index.d.ts +1 -1
- package/es/badge/style/index.js +1 -3
- package/es/button/style/index.d.ts +1 -1
- package/es/card/index.d.ts +4 -0
- package/es/card/index.js +64 -7
- package/es/card/style/index.d.ts +1 -1
- package/es/card/style/index.js +32 -8
- package/es/checkbox/style/index.d.ts +1 -1
- package/es/config-provider/context.d.ts +11 -0
- package/es/config-provider/context.js +2 -1
- package/es/config-provider/index.d.ts +2 -2
- package/es/config-provider/index.js +57 -34
- package/es/descriptions/style/index.d.ts +1 -1
- package/es/drawer/index.js +7 -5
- package/es/drawer/style/index.d.ts +1 -1
- package/es/drawer/style/index.js +31 -9
- package/es/empty/index.js +1 -1
- package/es/empty/style/index.d.ts +1 -1
- package/es/form/FormItem.d.ts +2 -1
- package/es/form/FormItem.js +14 -4
- package/es/form/style/index.d.ts +1 -1
- package/es/form/style/index.js +13 -2
- package/es/index.d.ts +4 -2
- package/es/index.js +1 -0
- package/es/input-number/index.d.ts +2 -1
- package/es/locale/ja-JP.d.ts +3 -0
- package/es/locale/ja-JP.js +28 -0
- package/es/modal/Modal.js +20 -6
- package/es/modal/style/index.d.ts +1 -1
- package/es/modal/style/index.js +62 -19
- package/es/radio/style/index.d.ts +1 -1
- package/es/result/index.d.ts +2 -2
- package/es/result/index.js +5 -4
- package/es/result/style/index.d.ts +1 -1
- package/es/select/style/index.d.ts +1 -1
- package/es/slider/style/index.d.ts +1 -1
- package/es/space/style/index.d.ts +1 -1
- package/es/spin/style/index.d.ts +1 -1
- package/es/static-function/index.js +13 -4
- package/es/switch/style/index.d.ts +1 -1
- package/es/table/style/index.d.ts +1 -1
- package/es/table/style/index.js +3 -4
- package/es/tabs/style/index.d.ts +1 -1
- package/es/tabs/style/index.js +4 -2
- package/es/tag/index.d.ts +1 -0
- package/es/tag/index.js +3 -2
- package/es/tag/style/index.d.ts +2 -4
- package/es/tag/style/index.js +20 -31
- package/es/theme/dark.d.ts +1 -48
- package/es/theme/default.d.ts +4 -2
- package/es/theme/default.js +59 -28
- package/es/theme/index.d.ts +20 -57
- package/es/theme/interface.d.ts +66 -0
- package/es/theme/interface.js +4 -1
- package/es/theme/style/aliyun.less +40 -40
- package/es/theme/style/compact.less +79 -72
- package/es/theme/style/dark.less +53 -53
- package/es/theme/style/default.less +79 -72
- package/es/tooltip/style/index.d.ts +1 -1
- package/es/tree-select/style/index.d.ts +1 -1
- package/lib/_util/genComponentStyleHook.d.ts +2 -2
- package/lib/_util/genComponentStyleHook.js +20 -4
- package/lib/alert/index.d.ts +2 -2
- package/lib/alert/index.js +18 -9
- package/lib/alert/style/index.d.ts +1 -1
- package/lib/alert/style/index.js +170 -71
- package/lib/app/index.d.ts +8 -0
- package/lib/app/index.js +36 -1
- package/lib/app/style/index.d.ts +9 -0
- package/lib/{_util/getWeakenBorderColor.js → app/style/index.js} +20 -10
- package/lib/badge/index.js +23 -20
- package/lib/badge/style/index.d.ts +1 -1
- package/lib/badge/style/index.js +1 -3
- package/lib/button/index.js +2 -1
- package/lib/button/style/index.d.ts +1 -1
- package/lib/card/index.d.ts +4 -0
- package/lib/card/index.js +70 -9
- package/lib/card/style/index.d.ts +1 -1
- package/lib/card/style/index.js +56 -10
- package/lib/checkbox/index.js +2 -1
- package/lib/checkbox/style/index.d.ts +1 -1
- package/lib/config-provider/DefaultRenderEmpty.js +4 -3
- package/lib/config-provider/context.d.ts +11 -0
- package/lib/config-provider/index.d.ts +2 -2
- package/lib/config-provider/index.js +70 -26
- package/lib/descriptions/hooks/useItems.js +5 -4
- package/lib/descriptions/index.js +3 -2
- package/lib/descriptions/style/index.d.ts +1 -1
- package/lib/drawer/index.js +44 -33
- package/lib/drawer/style/index.d.ts +1 -1
- package/lib/drawer/style/index.js +33 -6
- package/lib/dropdown/dropdown-button.js +3 -13
- package/lib/dropdown/index.js +2 -2
- package/lib/empty/colored.js +413 -327
- package/lib/empty/database.js +267 -222
- package/lib/empty/default.js +16 -21
- package/lib/empty/guide.js +201 -184
- package/lib/empty/index.js +23 -18
- package/lib/empty/style/index.d.ts +1 -1
- package/lib/form/FormItem.d.ts +2 -1
- package/lib/form/FormItem.js +18 -6
- package/lib/form/index.js +6 -3
- package/lib/form/style/index.d.ts +1 -1
- package/lib/form/style/index.js +19 -0
- package/lib/grid/col.js +2 -1
- package/lib/grid/row.js +2 -1
- package/lib/index.d.ts +4 -2
- package/lib/index.js +3 -0
- package/lib/input/Input.js +3 -2
- package/lib/input/Password.js +3 -2
- package/lib/input/Search.js +3 -2
- package/lib/input/TextArea.js +3 -2
- package/lib/input-number/index.d.ts +2 -1
- package/lib/input-number/index.js +2 -1
- package/lib/list/index.js +3 -2
- package/lib/locale/ja-JP.d.ts +3 -0
- package/lib/locale/ja-JP.js +60 -0
- package/lib/lottie/index.js +2 -1
- package/lib/modal/Modal.js +33 -9
- package/lib/modal/Progress.js +9 -5
- package/lib/modal/style/index.d.ts +1 -1
- package/lib/modal/style/index.js +76 -17
- package/lib/radio/index.js +2 -1
- package/lib/radio/style/index.d.ts +1 -1
- package/lib/result/403.js +156 -121
- package/lib/result/404.js +328 -267
- package/lib/result/500.js +295 -257
- package/lib/result/Error.js +127 -99
- package/lib/result/Processing.js +246 -213
- package/lib/result/Success.js +233 -169
- package/lib/result/Warning.js +611 -515
- package/lib/result/index.d.ts +2 -2
- package/lib/result/index.js +12 -11
- package/lib/result/style/index.d.ts +1 -1
- package/lib/segmented/index.js +8 -4
- package/lib/select/index.js +2 -1
- package/lib/select/style/index.d.ts +1 -1
- package/lib/slider/index.js +2 -1
- package/lib/slider/style/index.d.ts +1 -1
- package/lib/space/index.js +2 -1
- package/lib/space/style/index.d.ts +1 -1
- package/lib/spin/index.js +5 -4
- package/lib/spin/style/index.d.ts +1 -1
- package/lib/static-function/index.js +7 -1
- package/lib/switch/index.js +2 -1
- package/lib/switch/style/index.d.ts +1 -1
- package/lib/table/index.js +44 -31
- package/lib/table/style/index.d.ts +1 -1
- package/lib/table/style/index.js +3 -4
- package/lib/tabs/index.js +10 -5
- package/lib/tabs/style/index.d.ts +1 -1
- package/lib/tabs/style/index.js +5 -0
- package/lib/tag/index.d.ts +1 -0
- package/lib/tag/index.js +12 -6
- package/lib/tag/style/index.d.ts +2 -4
- package/lib/tag/style/index.js +20 -27
- package/lib/theme/dark.d.ts +1 -48
- package/lib/theme/default.d.ts +4 -2
- package/lib/theme/default.js +67 -27
- package/lib/theme/index.d.ts +20 -57
- package/lib/theme/interface.d.ts +66 -0
- package/lib/theme/style/aliyun.less +40 -40
- package/lib/theme/style/compact.less +79 -72
- package/lib/theme/style/dark.less +53 -53
- package/lib/theme/style/default.less +79 -72
- package/lib/tooltip/MouseTooltip.js +43 -39
- package/lib/tooltip/ReactStickyMouseTooltip.js +5 -4
- package/lib/tooltip/index.js +14 -10
- package/lib/tooltip/style/index.d.ts +1 -1
- package/lib/tree-select/index.js +2 -1
- package/lib/tree-select/style/index.d.ts +1 -1
- package/lib/typography/Link.js +5 -4
- package/lib/typography/Paragraph.js +5 -4
- package/lib/typography/Text.js +5 -4
- package/lib/typography/Title.js +5 -4
- package/package.json +7 -6
- package/es/_util/genStyle.d.ts +0 -2
- package/es/_util/getWeakenBorderColor.d.ts +0 -1
- package/es/_util/getWeakenBorderColor.js +0 -4
- package/lib/_util/genStyle.d.ts +0 -2
- package/lib/_util/genStyle.js +0 -43
- package/lib/_util/getWeakenBorderColor.d.ts +0 -1
package/lib/tag/style/index.js
CHANGED
|
@@ -25,42 +25,34 @@ __export(style_exports, {
|
|
|
25
25
|
module.exports = __toCommonJS(style_exports);
|
|
26
26
|
var import_internal = require("antd/es/theme/internal");
|
|
27
27
|
var import_genComponentStyleHook = require("../../_util/genComponentStyleHook");
|
|
28
|
-
var import_internal2 = require("antd/lib/theme/internal");
|
|
29
|
-
var import_getWeakenBorderColor = require("../../_util/getWeakenBorderColor");
|
|
30
|
-
var getTagBorderColor = (color) => {
|
|
31
|
-
return (0, import_getWeakenBorderColor.getWeakenBorderColor)(color);
|
|
32
|
-
};
|
|
33
28
|
var genTagPresetStatusStyle = (token, status) => {
|
|
34
|
-
const
|
|
35
|
-
success: token.
|
|
36
|
-
processing: token.
|
|
37
|
-
error: token.
|
|
38
|
-
warning: token.
|
|
29
|
+
const colorMap = {
|
|
30
|
+
success: token.colorSuccessText,
|
|
31
|
+
processing: token.colorInfoText,
|
|
32
|
+
error: token.colorErrorText,
|
|
33
|
+
warning: token.colorWarningText
|
|
39
34
|
};
|
|
40
35
|
return {
|
|
41
36
|
[`${token.componentCls}${token.componentCls}-${status}`]: {
|
|
42
|
-
|
|
37
|
+
color: colorMap[status]
|
|
43
38
|
}
|
|
44
39
|
};
|
|
45
40
|
};
|
|
46
|
-
var genPresetStyle = (token) => (0, import_internal2.genPresetColor)(token, (colorKey, { lightBorderColor }) => {
|
|
47
|
-
return {
|
|
48
|
-
[`${token.componentCls}${token.componentCls}-${colorKey}`]: {
|
|
49
|
-
borderColor: getTagBorderColor(lightBorderColor)
|
|
50
|
-
}
|
|
51
|
-
};
|
|
52
|
-
});
|
|
53
41
|
var genTagStyle = (token) => {
|
|
54
|
-
const { antCls, componentCls,
|
|
55
|
-
const paddingInline = calc(tagPaddingHorizontal).sub(lineWidth).equal();
|
|
42
|
+
const { antCls, componentCls, iconCls } = token;
|
|
56
43
|
return {
|
|
57
44
|
[`${componentCls}`]: {
|
|
58
45
|
paddingInline: token.paddingXS,
|
|
59
|
-
borderColor: getTagBorderColor(token.colorBorder),
|
|
60
46
|
fontSize: token.fontSizeSM,
|
|
47
|
+
[`&:not(${componentCls}-pill)`]: {
|
|
48
|
+
fontWeight: token.fontWeightStrong
|
|
49
|
+
},
|
|
50
|
+
[`${componentCls}-close-icon${iconCls}`]: {
|
|
51
|
+
marginInlineStart: token.marginXXS
|
|
52
|
+
},
|
|
61
53
|
[`${antCls}-typography`]: {
|
|
62
54
|
[`${componentCls}-icon`]: {
|
|
63
|
-
marginInlineEnd:
|
|
55
|
+
marginInlineEnd: token.marginXXS
|
|
64
56
|
}
|
|
65
57
|
},
|
|
66
58
|
["&-ellipsis"]: {
|
|
@@ -77,19 +69,20 @@ var genTagStyle = (token) => {
|
|
|
77
69
|
},
|
|
78
70
|
["&-borderless"]: {
|
|
79
71
|
borderColor: "transparent"
|
|
72
|
+
},
|
|
73
|
+
["&-pill"]: {
|
|
74
|
+
borderRadius: 100,
|
|
75
|
+
lineHeight: token.lineHeight,
|
|
76
|
+
marginInlineEnd: token.marginXXS
|
|
80
77
|
}
|
|
81
78
|
}
|
|
82
79
|
};
|
|
83
80
|
};
|
|
84
81
|
var style_default = (prefixCls) => {
|
|
85
82
|
const useStyle = (0, import_genComponentStyleHook.genComponentStyleHook)("Tag", (token) => {
|
|
86
|
-
const tagToken = (0, import_internal.mergeToken)(token, {
|
|
87
|
-
tagPaddingHorizontal: 8
|
|
88
|
-
// Fixed padding.
|
|
89
|
-
});
|
|
83
|
+
const tagToken = (0, import_internal.mergeToken)(token, {});
|
|
90
84
|
return [
|
|
91
85
|
genTagStyle(tagToken),
|
|
92
|
-
genPresetStyle(tagToken),
|
|
93
86
|
genTagPresetStatusStyle(tagToken, "success"),
|
|
94
87
|
genTagPresetStatusStyle(tagToken, "error"),
|
|
95
88
|
genTagPresetStatusStyle(tagToken, "processing"),
|
package/lib/theme/dark.d.ts
CHANGED
|
@@ -1,52 +1,5 @@
|
|
|
1
1
|
declare const darkTheme: {
|
|
2
|
-
token:
|
|
3
|
-
colorPrimary: string;
|
|
4
|
-
colorSuccess: string;
|
|
5
|
-
colorWarning: string;
|
|
6
|
-
colorError: string;
|
|
7
|
-
colorInfo: string;
|
|
8
|
-
colorTextBase: string;
|
|
9
|
-
colorBgBase: string;
|
|
10
|
-
colorLink: string;
|
|
11
|
-
fontFamily: string;
|
|
12
|
-
fontFamilyCode: string;
|
|
13
|
-
fontSize: number;
|
|
14
|
-
lineWidth: number;
|
|
15
|
-
lineType: string;
|
|
16
|
-
borderRadius: number;
|
|
17
|
-
sizeUnit: number;
|
|
18
|
-
sizeStep: number;
|
|
19
|
-
sizePopupArrow: number;
|
|
20
|
-
controlHeight: number;
|
|
21
|
-
zIndexBase: number;
|
|
22
|
-
zIndexPopupBase: number;
|
|
23
|
-
opacityImage: number;
|
|
24
|
-
motionUnit: number;
|
|
25
|
-
motionBase: number;
|
|
26
|
-
motionEaseOutCirc: string;
|
|
27
|
-
motionEaseInOutCirc: string;
|
|
28
|
-
motionEaseInOut: string;
|
|
29
|
-
motionEaseOutBack: string;
|
|
30
|
-
motionEaseInBack: string;
|
|
31
|
-
motionEaseInQuint: string;
|
|
32
|
-
motionEaseOutQuint: string;
|
|
33
|
-
motionEaseOut: string;
|
|
34
|
-
wireframe: boolean;
|
|
35
|
-
motion: boolean;
|
|
36
|
-
blue: string;
|
|
37
|
-
purple: string;
|
|
38
|
-
cyan: string;
|
|
39
|
-
green: string;
|
|
40
|
-
magenta: string;
|
|
41
|
-
pink: string;
|
|
42
|
-
red: string;
|
|
43
|
-
orange: string;
|
|
44
|
-
yellow: string;
|
|
45
|
-
volcano: string;
|
|
46
|
-
geekblue: string;
|
|
47
|
-
lime: string;
|
|
48
|
-
gold: string;
|
|
49
|
-
};
|
|
2
|
+
token: import("antd/es/theme/internal").SeedToken;
|
|
50
3
|
components: {
|
|
51
4
|
InputNumber: {
|
|
52
5
|
handleVisible: boolean;
|
package/lib/theme/default.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import type { ThemeConfig } from 'antd';
|
|
2
1
|
export declare const fontFamilyEn = "Inter, 'Noto sans', sans-serif, Roboto, 'Open Sans', 'Segoe UI', 'Helvetica Neue', 'Helvetica, Arial', 'Apple Color Emoji'";
|
|
3
|
-
declare const
|
|
2
|
+
export declare const fontWeightWeakEn = 400;
|
|
3
|
+
export declare const fontWeightEn = 500;
|
|
4
|
+
export declare const fontWeightStrongEn = 600;
|
|
5
|
+
declare const _default: import("antd").ThemeConfig;
|
|
4
6
|
export default _default;
|
package/lib/theme/default.js
CHANGED
|
@@ -20,7 +20,10 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
20
20
|
var default_exports = {};
|
|
21
21
|
__export(default_exports, {
|
|
22
22
|
default: () => default_default,
|
|
23
|
-
fontFamilyEn: () => fontFamilyEn
|
|
23
|
+
fontFamilyEn: () => fontFamilyEn,
|
|
24
|
+
fontWeightEn: () => fontWeightEn,
|
|
25
|
+
fontWeightStrongEn: () => fontWeightStrongEn,
|
|
26
|
+
fontWeightWeakEn: () => fontWeightWeakEn
|
|
24
27
|
});
|
|
25
28
|
module.exports = __toCommonJS(default_exports);
|
|
26
29
|
var import_format = require("./util/format");
|
|
@@ -29,48 +32,64 @@ var colorPrimarySecondary = "#598CF3";
|
|
|
29
32
|
var colorText = "#132039";
|
|
30
33
|
var colorTextSecondary = "#5C6B8A";
|
|
31
34
|
var colorTextTertiary = "#8592AD";
|
|
32
|
-
var colorTextQuaternary = "#
|
|
35
|
+
var colorTextQuaternary = "#B6C0D4";
|
|
33
36
|
var colorFill = "#CDD5E4";
|
|
34
37
|
var colorFillSecondary = "#E2E8F3";
|
|
35
|
-
var colorFillTertiary = "#
|
|
36
|
-
var colorFillQuaternary = "#
|
|
38
|
+
var colorFillTertiary = "#EBEFF7";
|
|
39
|
+
var colorFillQuaternary = "#F5F7FC";
|
|
37
40
|
var colorBorderSecondary = colorFillSecondary;
|
|
38
41
|
var fontSizeSM = 12;
|
|
39
|
-
var tagColorBorder =
|
|
42
|
+
var tagColorBorder = colorTextQuaternary;
|
|
40
43
|
var fontFamilyEn = `Inter, 'Noto sans', sans-serif, Roboto, 'Open Sans', 'Segoe UI', 'Helvetica Neue', 'Helvetica, Arial', 'Apple Color Emoji'`;
|
|
44
|
+
var fontWeightWeakEn = 400;
|
|
45
|
+
var fontWeightEn = 500;
|
|
46
|
+
var fontWeightStrongEn = 600;
|
|
41
47
|
var defaultTheme = {
|
|
42
48
|
token: {
|
|
43
49
|
fontFamily: `-apple-system, 'Noto Sans', BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji'`,
|
|
44
50
|
fontFamilyCode: `Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace`,
|
|
51
|
+
fontWeightWeak: 400,
|
|
52
|
+
fontWeight: 400,
|
|
53
|
+
fontWeightStrong: 500,
|
|
54
|
+
borderRadiusSM: 2,
|
|
45
55
|
borderRadius: 4,
|
|
56
|
+
borderRadiusMD: 6,
|
|
46
57
|
borderRadiusLG: 8,
|
|
47
|
-
borderRadiusSM: 2,
|
|
48
|
-
fontSize: 13,
|
|
49
58
|
fontSizeSM,
|
|
59
|
+
fontSize: 13,
|
|
60
|
+
lineHeight: 20 / 13,
|
|
61
|
+
fontHeight: 20,
|
|
50
62
|
fontSizeLG: 16,
|
|
51
63
|
fontSizeHeading1: 24,
|
|
52
64
|
fontSizeHeading2: 20,
|
|
53
65
|
fontSizeHeading3: 18,
|
|
54
66
|
fontSizeHeading4: 16,
|
|
55
67
|
fontSizeHeading5: 13,
|
|
68
|
+
controlHeightSM: 24,
|
|
56
69
|
controlHeight: 28,
|
|
57
70
|
colorPrimary,
|
|
58
71
|
colorInfo: colorPrimary,
|
|
59
|
-
colorInfoBorder:
|
|
60
|
-
colorInfoBg: "#
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
72
|
+
colorInfoBorder: "#619EF3",
|
|
73
|
+
colorInfoBg: "#F3F8FE",
|
|
74
|
+
colorInfoHover: "#0852BB",
|
|
75
|
+
colorInfoActive: "#0852BB",
|
|
76
|
+
colorInfoText: "#0D3C80",
|
|
77
|
+
colorSuccess: "#16B882",
|
|
78
|
+
colorSuccessBorder: "#79D1B4",
|
|
79
|
+
colorSuccessBg: "#F5FAF8",
|
|
80
|
+
colorSuccessText: "#09593F",
|
|
66
81
|
colorWarning: "#F49F25",
|
|
67
|
-
colorWarningBorder: "#
|
|
68
|
-
colorWarningBg: "#
|
|
69
|
-
colorWarningText: "#
|
|
70
|
-
colorError: "#
|
|
82
|
+
colorWarningBorder: "#FAC373",
|
|
83
|
+
colorWarningBg: "#FFF9EE",
|
|
84
|
+
colorWarningText: "#6C4408",
|
|
85
|
+
colorError: "#EB4242",
|
|
71
86
|
colorErrorBorder: "#F69898",
|
|
72
|
-
colorErrorBg: "#
|
|
87
|
+
colorErrorBg: "#FFF2F2",
|
|
73
88
|
colorErrorText: "#8A1B1B",
|
|
89
|
+
colorFuchsia: "#B04EC4",
|
|
90
|
+
colorFuchsiaBorder: "#D88EE7",
|
|
91
|
+
colorFuchsiaBg: "#FAF0FC",
|
|
92
|
+
colorFuchsiaText: "#580E67",
|
|
74
93
|
colorTextBase: "#000000",
|
|
75
94
|
colorText,
|
|
76
95
|
colorTextSecondary,
|
|
@@ -79,14 +98,15 @@ var defaultTheme = {
|
|
|
79
98
|
colorIcon: colorTextSecondary,
|
|
80
99
|
colorBgBase: "#ffffff",
|
|
81
100
|
colorBgContainer: "#ffffff",
|
|
82
|
-
colorBgLayout:
|
|
101
|
+
colorBgLayout: "#FBFCFE",
|
|
83
102
|
colorBorder: colorFill,
|
|
84
103
|
colorBorderSecondary,
|
|
85
104
|
colorFill,
|
|
86
105
|
colorFillSecondary,
|
|
87
106
|
colorFillTertiary,
|
|
88
107
|
colorFillQuaternary,
|
|
89
|
-
|
|
108
|
+
colorBgContainerDisabled: colorFillTertiary,
|
|
109
|
+
colorBgMask: "rgba(19, 32, 57, 0.6)",
|
|
90
110
|
colorBgElevated: "#ffffff",
|
|
91
111
|
colorBgSpotlight: "#ffffff",
|
|
92
112
|
boxShadow: "0 6px 16px 0 rgba(54, 69, 99, 0.08), 0 3px 6px -4px rgba(54, 69, 99, 0.12), 0 9px 28px 8px rgba(54, 69, 99, 0.05)",
|
|
@@ -97,13 +117,26 @@ var defaultTheme = {
|
|
|
97
117
|
lineWidthFocus: 0
|
|
98
118
|
},
|
|
99
119
|
components: {
|
|
120
|
+
Alert: {
|
|
121
|
+
borderRadiusLG: 6
|
|
122
|
+
},
|
|
123
|
+
Badge: {
|
|
124
|
+
statusSize: 8
|
|
125
|
+
},
|
|
100
126
|
Breadcrumb: {
|
|
101
127
|
fontSize: fontSizeSM,
|
|
102
|
-
// @ts-ignore
|
|
103
|
-
// fontHeight is internal token
|
|
104
128
|
fontHeight: 20,
|
|
105
129
|
lastItemColor: colorTextSecondary
|
|
106
130
|
},
|
|
131
|
+
Button: {
|
|
132
|
+
contentFontSizeSM: 12,
|
|
133
|
+
borderRadiusSM: 4,
|
|
134
|
+
borderRadius: 4,
|
|
135
|
+
borderRadiusLG: 4,
|
|
136
|
+
paddingInlineSM: 8,
|
|
137
|
+
paddingInline: 12,
|
|
138
|
+
paddingInlineLG: 12
|
|
139
|
+
},
|
|
107
140
|
Card: {
|
|
108
141
|
headerFontSize: 16,
|
|
109
142
|
borderRadiusLG: 8
|
|
@@ -124,6 +157,9 @@ var defaultTheme = {
|
|
|
124
157
|
// temporarily fix style for checked disabled Radio.Button
|
|
125
158
|
controlItemBgActiveDisabled: colorFillSecondary
|
|
126
159
|
},
|
|
160
|
+
Segmented: {
|
|
161
|
+
trackBg: colorFillTertiary
|
|
162
|
+
},
|
|
127
163
|
Select: {
|
|
128
164
|
// work for all multiple select component, including Select, TreeSelect and Cascader and so on
|
|
129
165
|
multipleItemBg: colorFillQuaternary,
|
|
@@ -148,8 +184,8 @@ var defaultTheme = {
|
|
|
148
184
|
itemHoverColor: colorText
|
|
149
185
|
},
|
|
150
186
|
Tag: {
|
|
151
|
-
|
|
152
|
-
|
|
187
|
+
colorBorder: tagColorBorder,
|
|
188
|
+
borderRadiusSM: 4
|
|
153
189
|
},
|
|
154
190
|
Table: {
|
|
155
191
|
cellFontSize: fontSizeSM,
|
|
@@ -177,7 +213,8 @@ var defaultTheme = {
|
|
|
177
213
|
itemColor: "#36496F",
|
|
178
214
|
itemSelectedColor: colorText,
|
|
179
215
|
itemMarginBlock: 6,
|
|
180
|
-
groupTitleFontSize: 11
|
|
216
|
+
groupTitleFontSize: 11,
|
|
217
|
+
groupTitleColor: colorTextSecondary
|
|
181
218
|
}
|
|
182
219
|
}
|
|
183
220
|
};
|
|
@@ -193,5 +230,8 @@ defaultTheme.token = {
|
|
|
193
230
|
var default_default = (0, import_format.formatTheme)(defaultTheme);
|
|
194
231
|
// Annotate the CommonJS export names for ESM import in node:
|
|
195
232
|
0 && (module.exports = {
|
|
196
|
-
fontFamilyEn
|
|
233
|
+
fontFamilyEn,
|
|
234
|
+
fontWeightEn,
|
|
235
|
+
fontWeightStrongEn,
|
|
236
|
+
fontWeightWeakEn
|
|
197
237
|
});
|
package/lib/theme/index.d.ts
CHANGED
|
@@ -1,71 +1,34 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
import { theme } from 'antd';
|
|
3
|
+
import type { Theme } from '@ant-design/cssinjs';
|
|
4
|
+
import type { SeedToken } from 'antd/lib/theme/interface';
|
|
5
|
+
import type { GlobalToken, AliasToken } from './interface';
|
|
2
6
|
export * from 'antd/lib/theme/internal';
|
|
3
7
|
export * from 'antd/lib/theme';
|
|
4
|
-
declare const _default: {
|
|
5
|
-
defaultSeed:
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
colorInfo: string;
|
|
11
|
-
colorTextBase: string;
|
|
12
|
-
colorBgBase: string;
|
|
13
|
-
colorLink: string;
|
|
14
|
-
fontFamily: string;
|
|
15
|
-
fontFamilyCode: string;
|
|
16
|
-
fontSize: number;
|
|
17
|
-
lineWidth: number;
|
|
18
|
-
lineType: string;
|
|
19
|
-
borderRadius: number;
|
|
20
|
-
sizeUnit: number;
|
|
21
|
-
sizeStep: number;
|
|
22
|
-
sizePopupArrow: number;
|
|
23
|
-
controlHeight: number;
|
|
24
|
-
zIndexBase: number;
|
|
25
|
-
zIndexPopupBase: number;
|
|
26
|
-
opacityImage: number;
|
|
27
|
-
motionUnit: number;
|
|
28
|
-
motionBase: number;
|
|
29
|
-
motionEaseOutCirc: string;
|
|
30
|
-
motionEaseInOutCirc: string;
|
|
31
|
-
motionEaseInOut: string;
|
|
32
|
-
motionEaseOutBack: string;
|
|
33
|
-
motionEaseInBack: string;
|
|
34
|
-
motionEaseInQuint: string;
|
|
35
|
-
motionEaseOutQuint: string;
|
|
36
|
-
motionEaseOut: string;
|
|
37
|
-
wireframe: boolean;
|
|
38
|
-
motion: boolean;
|
|
39
|
-
blue: string;
|
|
40
|
-
purple: string;
|
|
41
|
-
cyan: string;
|
|
42
|
-
green: string;
|
|
43
|
-
magenta: string;
|
|
44
|
-
pink: string;
|
|
45
|
-
red: string;
|
|
46
|
-
orange: string;
|
|
47
|
-
yellow: string;
|
|
48
|
-
volcano: string;
|
|
49
|
-
geekblue: string;
|
|
50
|
-
lime: string;
|
|
51
|
-
gold: string;
|
|
8
|
+
declare const _default: Omit<{
|
|
9
|
+
defaultSeed: import("antd/es/theme/interface/seeds").SeedToken;
|
|
10
|
+
useToken: () => {
|
|
11
|
+
theme: Theme<import("antd/es/theme/interface/seeds").SeedToken, import("antd/es/theme/internal").AliasToken>;
|
|
12
|
+
token: import("antd").GlobalToken;
|
|
13
|
+
hashId: string;
|
|
52
14
|
};
|
|
15
|
+
defaultAlgorithm: typeof import("antd/es/theme/themes/default").default;
|
|
16
|
+
darkAlgorithm: import("@ant-design/cssinjs").DerivativeFunc<import("antd/es/theme/interface/seeds").SeedToken, import("antd/es/theme/interface/maps").MapToken>;
|
|
17
|
+
compactAlgorithm: import("@ant-design/cssinjs").DerivativeFunc<import("antd/es/theme/interface/seeds").SeedToken, import("antd/es/theme/interface/maps").MapToken>;
|
|
18
|
+
getDesignToken: (config?: import("antd").ThemeConfig) => import("antd/es/theme/internal").AliasToken;
|
|
53
19
|
defaultConfig: {
|
|
54
|
-
token: import("antd/es/theme/
|
|
20
|
+
token: import("antd/es/theme/interface/seeds").SeedToken;
|
|
55
21
|
override: {
|
|
56
|
-
override: import("antd/es/theme/
|
|
22
|
+
override: import("antd/es/theme/interface/seeds").SeedToken;
|
|
57
23
|
};
|
|
58
24
|
hashed: boolean;
|
|
59
25
|
};
|
|
26
|
+
_internalContext: import("react").Context<import("antd/es/theme/context").DesignTokenProviderProps>;
|
|
27
|
+
}, "useToken"> & {
|
|
60
28
|
useToken: () => {
|
|
61
|
-
theme:
|
|
62
|
-
token:
|
|
29
|
+
theme: Theme<SeedToken, AliasToken>;
|
|
30
|
+
token: GlobalToken;
|
|
63
31
|
hashId: string;
|
|
64
32
|
};
|
|
65
|
-
defaultAlgorithm: typeof import("antd/es/theme/themes/default").default;
|
|
66
|
-
darkAlgorithm: import("@ant-design/cssinjs").DerivativeFunc<import("antd/es/theme/internal").SeedToken, import("antd/es/theme/interface").MapToken>;
|
|
67
|
-
compactAlgorithm: import("@ant-design/cssinjs").DerivativeFunc<import("antd/es/theme/internal").SeedToken, import("antd/es/theme/interface").MapToken>;
|
|
68
|
-
getDesignToken: (config?: import("antd").ThemeConfig) => import("antd/es/theme/internal").AliasToken;
|
|
69
|
-
_internalContext: import("react").Context<import("antd/es/theme/context").DesignTokenProviderProps>;
|
|
70
33
|
};
|
|
71
34
|
export default _default;
|
package/lib/theme/interface.d.ts
CHANGED
|
@@ -1 +1,67 @@
|
|
|
1
|
+
import type { GlobalToken as GlobalTokenTypeUtil, OverrideTokenMap as OverrideTokenTypeUtil, FullToken as FullTokenTypeUtil, TokenMapKey } from '@ant-design/cssinjs-utils';
|
|
2
|
+
import type { AliasToken as AntAliasToken, ComponentTokenMap } from 'antd/es/theme/interface';
|
|
1
3
|
export * from 'antd/es/theme/interface';
|
|
4
|
+
export interface AliasToken extends AntAliasToken {
|
|
5
|
+
/**
|
|
6
|
+
* @nameZH 正文的字体粗细
|
|
7
|
+
* @nameEN Font weight for body text
|
|
8
|
+
* @desc 控制正文的字体粗细。
|
|
9
|
+
* @descEN Control the font weight of body text.
|
|
10
|
+
*/
|
|
11
|
+
fontWeight: number;
|
|
12
|
+
/**
|
|
13
|
+
* @nameZH 辅助描述的字体粗细,一般弱于正文
|
|
14
|
+
* @nameEN Font weight for auxiliary description, usually weaker than body text
|
|
15
|
+
* @desc 控制辅助描述的字体粗细,一般弱于正文。
|
|
16
|
+
* @descEN Control the font weight of auxiliary description, usually weaker than body text.
|
|
17
|
+
*/
|
|
18
|
+
fontWeightWeak: number;
|
|
19
|
+
/**
|
|
20
|
+
* @nameZH 等于 fontSize * lineHeight 的值
|
|
21
|
+
* @nameEN Round of fontSize * lineHeight
|
|
22
|
+
* @desc 等于 fontSize * lineHeight 的值。
|
|
23
|
+
* @descEN Round of fontSize * lineHeight.
|
|
24
|
+
*/
|
|
25
|
+
fontHeight: number;
|
|
26
|
+
/**
|
|
27
|
+
* @nameZH MD号圆角
|
|
28
|
+
* @nameEN MD Border Radius
|
|
29
|
+
* @desc MD号圆角,用于组件中的一些中圆角,如嵌套 Card、Alert、Tooltip、Dropdown 等一些组件样式。
|
|
30
|
+
* @descEN MD size border radius, used in some medium border radius components, such as nested Card, Alert, Tooltip, Dropdown etc.
|
|
31
|
+
* @default 6
|
|
32
|
+
*/
|
|
33
|
+
borderRadiusMD: number;
|
|
34
|
+
/**
|
|
35
|
+
* @nameZH 严重错误色
|
|
36
|
+
* @nameEN Critical Error Color
|
|
37
|
+
* @desc 用于表示操作严重失败的 Token 序列,如严重错误告警等。
|
|
38
|
+
* @descEN Used to represent the visual elements of the operation serious failure, such as critical error alert etc.
|
|
39
|
+
*/
|
|
40
|
+
colorFuchsia: string;
|
|
41
|
+
/**
|
|
42
|
+
* @nameZH 严重错误色的描边色
|
|
43
|
+
* @nameEN Critical error border color
|
|
44
|
+
* @desc 严重错误色的描边色
|
|
45
|
+
* @descEN The border color of the critical error state.
|
|
46
|
+
*/
|
|
47
|
+
colorFuchsiaBorder: string;
|
|
48
|
+
/**
|
|
49
|
+
* @nameZH 严重错误色背景
|
|
50
|
+
* @nameEN Critical error background color
|
|
51
|
+
* @desc 严重错误色背景
|
|
52
|
+
* @descEN The background color of the critical error state.
|
|
53
|
+
*/
|
|
54
|
+
colorFuchsiaBg: string;
|
|
55
|
+
/**
|
|
56
|
+
* @nameZH 严重错误色文本
|
|
57
|
+
* @nameEN Critical error text color
|
|
58
|
+
* @desc 严重错误色文本
|
|
59
|
+
* @descEN The text color of the critical error state.
|
|
60
|
+
*/
|
|
61
|
+
colorFuchsiaText: string;
|
|
62
|
+
}
|
|
63
|
+
/** Final token which contains the components level override */
|
|
64
|
+
export type GlobalToken = GlobalTokenTypeUtil<ComponentTokenMap, AliasToken>;
|
|
65
|
+
export type OverrideToken = OverrideTokenTypeUtil<ComponentTokenMap, AliasToken>;
|
|
66
|
+
export type OverrideComponent = TokenMapKey<ComponentTokenMap>;
|
|
67
|
+
export type FullToken<C extends TokenMapKey<ComponentTokenMap>> = FullTokenTypeUtil<ComponentTokenMap, AliasToken, C>;
|
|
@@ -104,22 +104,22 @@
|
|
|
104
104
|
@cyan9: #00474f;
|
|
105
105
|
@cyan-10: #002329;
|
|
106
106
|
@cyan10: #002329;
|
|
107
|
-
@green-1: #
|
|
108
|
-
@green1: #
|
|
109
|
-
@green-2: #
|
|
110
|
-
@green2: #
|
|
111
|
-
@green-3: #
|
|
112
|
-
@green3: #
|
|
113
|
-
@green-4: #
|
|
114
|
-
@green4: #
|
|
115
|
-
@green-5: #
|
|
116
|
-
@green5: #
|
|
117
|
-
@green-6: #
|
|
118
|
-
@green6: #
|
|
119
|
-
@green-7: #
|
|
120
|
-
@green7: #
|
|
121
|
-
@green-8: #
|
|
122
|
-
@green8: #
|
|
107
|
+
@green-1: #e4f7ed;
|
|
108
|
+
@green1: #e4f7ed;
|
|
109
|
+
@green-2: #b2ebd0;
|
|
110
|
+
@green2: #b2ebd0;
|
|
111
|
+
@green-3: #85deb7;
|
|
112
|
+
@green3: #85deb7;
|
|
113
|
+
@green-4: #5cd1a2;
|
|
114
|
+
@green4: #5cd1a2;
|
|
115
|
+
@green-5: #37c491;
|
|
116
|
+
@green5: #37c491;
|
|
117
|
+
@green-6: #16b882;
|
|
118
|
+
@green6: #16b882;
|
|
119
|
+
@green-7: #0a9169;
|
|
120
|
+
@green7: #0a9169;
|
|
121
|
+
@green-8: #026b4f;
|
|
122
|
+
@green8: #026b4f;
|
|
123
123
|
@green-9: #004535;
|
|
124
124
|
@green9: #004535;
|
|
125
125
|
@green-10: #001f18;
|
|
@@ -172,18 +172,18 @@
|
|
|
172
172
|
@red3: #ffc8c2;
|
|
173
173
|
@red-4: #ffa099;
|
|
174
174
|
@red4: #ffa099;
|
|
175
|
-
@red-5: #
|
|
176
|
-
@red5: #
|
|
177
|
-
@red-6: #
|
|
178
|
-
@red6: #
|
|
179
|
-
@red-7: #
|
|
180
|
-
@red7: #
|
|
181
|
-
@red-8: #
|
|
182
|
-
@red8: #
|
|
183
|
-
@red-9: #
|
|
184
|
-
@red9: #
|
|
185
|
-
@red-10: #
|
|
186
|
-
@red10: #
|
|
175
|
+
@red-5: #f7716d;
|
|
176
|
+
@red5: #f7716d;
|
|
177
|
+
@red-6: #eb4242;
|
|
178
|
+
@red6: #eb4242;
|
|
179
|
+
@red-7: #c42d32;
|
|
180
|
+
@red7: #c42d32;
|
|
181
|
+
@red-8: #9e1c25;
|
|
182
|
+
@red8: #9e1c25;
|
|
183
|
+
@red-9: #78101a;
|
|
184
|
+
@red9: #78101a;
|
|
185
|
+
@red-10: #520a13;
|
|
186
|
+
@red10: #520a13;
|
|
187
187
|
@orange-1: #fff7e6;
|
|
188
188
|
@orange1: #fff7e6;
|
|
189
189
|
@orange-2: #ffe7ba;
|
|
@@ -332,25 +332,25 @@
|
|
|
332
332
|
@colorPrimaryText: #0d6cf2;
|
|
333
333
|
@colorPrimaryTextActive: #004ecc;
|
|
334
334
|
@colorSuccessBg: #dff4e5;
|
|
335
|
-
@colorSuccessBgHover: #
|
|
335
|
+
@colorSuccessBgHover: #b2ebd0;
|
|
336
336
|
@colorSuccessBorder: #dff4e5;
|
|
337
|
-
@colorSuccessBorderHover: #
|
|
338
|
-
@colorSuccessHover: #
|
|
339
|
-
@colorSuccessActive: #
|
|
340
|
-
@colorSuccessTextHover: #
|
|
341
|
-
@colorSuccessText: #
|
|
342
|
-
@colorSuccessTextActive: #
|
|
337
|
+
@colorSuccessBorderHover: #5cd1a2;
|
|
338
|
+
@colorSuccessHover: #5cd1a2;
|
|
339
|
+
@colorSuccessActive: #0a9169;
|
|
340
|
+
@colorSuccessTextHover: #37c491;
|
|
341
|
+
@colorSuccessText: #16b882;
|
|
342
|
+
@colorSuccessTextActive: #0a9169;
|
|
343
343
|
@colorErrorBg: #fff2f0;
|
|
344
344
|
@colorErrorBgHover: #ffedeb;
|
|
345
345
|
@colorErrorBgFilledHover: #ffddd9;
|
|
346
346
|
@colorErrorBgActive: #ffc8c2;
|
|
347
347
|
@colorErrorBorder: #ffc8c2;
|
|
348
348
|
@colorErrorBorderHover: #ffa099;
|
|
349
|
-
@colorErrorHover: #
|
|
350
|
-
@colorErrorActive: #
|
|
351
|
-
@colorErrorTextHover: #
|
|
352
|
-
@colorErrorText: #
|
|
353
|
-
@colorErrorTextActive: #
|
|
349
|
+
@colorErrorHover: #f7716d;
|
|
350
|
+
@colorErrorActive: #c42d32;
|
|
351
|
+
@colorErrorTextHover: #f7716d;
|
|
352
|
+
@colorErrorText: #eb4242;
|
|
353
|
+
@colorErrorTextActive: #c42d32;
|
|
354
354
|
@colorWarningBg: #fffbf0;
|
|
355
355
|
@colorWarningBgHover: #fff0c9;
|
|
356
356
|
@colorWarningBorder: #ffe1a1;
|