@oceanbase/design 1.0.0-alpha.17 → 1.0.0-alpha.19
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/card/style/index.js +20 -11
- package/es/config-provider/index.d.ts +5 -0
- package/es/config-provider/index.js +80 -38
- package/es/descriptions/hooks/useItems.d.ts +6 -6
- package/es/filter/FilterContext.d.ts +1 -1
- package/es/filter/components/FilterButton.js +30 -7
- package/es/filter/components/FilterCascader/components/FlatCascaderContent/index.d.ts +4 -3
- package/es/filter/components/FilterCascader/components/FlatCascaderContent/index.js +20 -6
- package/es/filter/components/FilterCascader/components/NormalCascaderContent.js +2 -7
- package/es/filter/components/FilterInput.d.ts +2 -0
- package/es/filter/components/FilterInput.js +18 -4
- package/es/filter/components/FilterSlot.d.ts +28 -0
- package/es/filter/components/FilterSlot.js +189 -0
- package/es/filter/components/FilterWrap.js +9 -0
- package/es/filter/components/ResponsiveFilterGroup.js +38 -2
- package/es/filter/index.d.ts +2 -0
- package/es/filter/index.js +3 -1
- package/es/filter/style/index.js +1 -1
- package/es/filter/type.d.ts +2 -0
- package/es/form/FormItem.d.ts +1 -1
- package/es/index.d.ts +13 -0
- package/es/static-function/index.d.ts +13 -0
- package/es/table/index.d.ts +2 -2
- package/es/table/index.js +176 -43
- package/es/table/style/index.js +86 -32
- package/es/theme/default.d.ts +17 -0
- package/es/theme/default.js +39 -5
- package/es/theme/interface.d.ts +10 -0
- package/es/theme/obToken.d.ts +16 -0
- package/es/theme/obToken.js +18 -3
- package/es/theme/obTokenMeta.d.ts +1 -1
- package/es/theme/obTokenMeta.js +79 -147
- package/lib/card/style/index.js +18 -11
- package/lib/config-provider/index.d.ts +5 -0
- package/lib/config-provider/index.js +50 -2
- package/lib/descriptions/hooks/useItems.d.ts +6 -6
- package/lib/filter/FilterContext.d.ts +1 -1
- package/lib/filter/components/FilterButton.js +22 -4
- package/lib/filter/components/FilterCascader/components/FlatCascaderContent/index.d.ts +4 -3
- package/lib/filter/components/FilterCascader/components/FlatCascaderContent/index.js +12 -5
- package/lib/filter/components/FilterCascader/components/NormalCascaderContent.js +2 -7
- package/lib/filter/components/FilterInput.d.ts +2 -0
- package/lib/filter/components/FilterInput.js +18 -3
- package/lib/filter/components/FilterSlot.d.ts +28 -0
- package/lib/filter/components/FilterSlot.js +174 -0
- package/lib/filter/components/FilterWrap.js +8 -0
- package/lib/filter/components/ResponsiveFilterGroup.js +32 -2
- package/lib/filter/index.d.ts +2 -0
- package/lib/filter/index.js +3 -1
- package/lib/filter/style/index.js +1 -1
- package/lib/filter/type.d.ts +2 -0
- package/lib/form/FormItem.d.ts +1 -1
- package/lib/index.d.ts +13 -0
- package/lib/static-function/index.d.ts +13 -0
- package/lib/table/index.d.ts +2 -2
- package/lib/table/index.js +165 -38
- package/lib/table/style/index.js +88 -40
- package/lib/theme/default.d.ts +17 -0
- package/lib/theme/default.js +42 -6
- package/lib/theme/interface.d.ts +10 -0
- package/lib/theme/obToken.d.ts +16 -0
- package/lib/theme/obToken.js +33 -4
- package/lib/theme/obTokenMeta.d.ts +1 -1
- package/lib/theme/obTokenMeta.js +79 -147
- package/package.json +2 -2
package/es/theme/obToken.d.ts
CHANGED
|
@@ -60,12 +60,18 @@ declare const genObToken: (token: GlobalToken, prefix?: string) => {
|
|
|
60
60
|
colorBgFocus: string;
|
|
61
61
|
colorBgSelected: string;
|
|
62
62
|
colorBgDisabled: string;
|
|
63
|
+
colorBgInfo: string;
|
|
64
|
+
colorBgSuccess: string;
|
|
65
|
+
colorBgWarning: string;
|
|
66
|
+
colorBgError: string;
|
|
63
67
|
colorDivider: string;
|
|
64
68
|
colorBorderDefault: string;
|
|
65
69
|
colorBorderContainer: string;
|
|
66
70
|
colorBorderInverse: string;
|
|
67
71
|
colorBorderHover: string;
|
|
72
|
+
colorBorderSelected: string;
|
|
68
73
|
colorBorderFocus: string;
|
|
74
|
+
colorBorderSuccess: string;
|
|
69
75
|
colorBorderError: string;
|
|
70
76
|
colorBorderWarning: string;
|
|
71
77
|
colorTextDefault: string;
|
|
@@ -77,6 +83,10 @@ declare const genObToken: (token: GlobalToken, prefix?: string) => {
|
|
|
77
83
|
colorTextSelected: string;
|
|
78
84
|
colorTextLink: string;
|
|
79
85
|
colorTextInverse: string;
|
|
86
|
+
colorTextDisabledSelected: string;
|
|
87
|
+
colorTextSuccess: string;
|
|
88
|
+
colorTextError: string;
|
|
89
|
+
colorTextWarning: string;
|
|
80
90
|
colorIconDefault: string;
|
|
81
91
|
colorIconHover: string;
|
|
82
92
|
colorIconDisabled: string;
|
|
@@ -86,6 +96,10 @@ declare const genObToken: (token: GlobalToken, prefix?: string) => {
|
|
|
86
96
|
colorIconWarning: string;
|
|
87
97
|
colorIconSuccess: string;
|
|
88
98
|
colorIconError: string;
|
|
99
|
+
colorIconCritical: string;
|
|
100
|
+
/**
|
|
101
|
+
* 兼容旧版「状态色」字段(与 DTCG 语义色并存;勿在新代码中使用,亦不在文档中列出)
|
|
102
|
+
*/
|
|
89
103
|
colorDefaultText: string;
|
|
90
104
|
colorDefaultIcon: string;
|
|
91
105
|
colorDefaultFill: string;
|
|
@@ -111,6 +125,7 @@ declare const genObToken: (token: GlobalToken, prefix?: string) => {
|
|
|
111
125
|
colorCriticalFill: string;
|
|
112
126
|
colorCriticalBorder: string;
|
|
113
127
|
fontFamilyDefault: string;
|
|
128
|
+
fontFamilyCode: string;
|
|
114
129
|
fontWeightSm: number;
|
|
115
130
|
fontWeightMd: number;
|
|
116
131
|
fontWeightLg: number;
|
|
@@ -130,6 +145,7 @@ declare const genObToken: (token: GlobalToken, prefix?: string) => {
|
|
|
130
145
|
fontBody1: string;
|
|
131
146
|
fontBody2: string;
|
|
132
147
|
fontCaption: string;
|
|
148
|
+
fontBodyCode: string;
|
|
133
149
|
shadow1Top: string;
|
|
134
150
|
shadow1Bottom: string;
|
|
135
151
|
shadow1Left: string;
|
package/es/theme/obToken.js
CHANGED
|
@@ -78,14 +78,20 @@ var genObToken = function genObToken(token) {
|
|
|
78
78
|
colorBgHoverSecondary: token.gray3,
|
|
79
79
|
colorBgFocus: token.gray3,
|
|
80
80
|
colorBgSelected: token.blue4,
|
|
81
|
-
colorBgDisabled: token.
|
|
81
|
+
colorBgDisabled: token.gray2,
|
|
82
|
+
colorBgInfo: token.blue1,
|
|
83
|
+
colorBgSuccess: token.green1,
|
|
84
|
+
colorBgWarning: token.orange1,
|
|
85
|
+
colorBgError: token.red1,
|
|
82
86
|
// 边框色 Border
|
|
83
87
|
colorDivider: token.gray4,
|
|
84
88
|
colorBorderDefault: token.gray5,
|
|
85
89
|
colorBorderContainer: token.gray4,
|
|
86
90
|
colorBorderInverse: token.white,
|
|
87
91
|
colorBorderHover: token.gray7,
|
|
92
|
+
colorBorderSelected: token.blue4,
|
|
88
93
|
colorBorderFocus: token.blue4,
|
|
94
|
+
colorBorderSuccess: token.green4,
|
|
89
95
|
colorBorderError: token.red4,
|
|
90
96
|
colorBorderWarning: token.orange4,
|
|
91
97
|
// 文本色 Text
|
|
@@ -98,6 +104,10 @@ var genObToken = function genObToken(token) {
|
|
|
98
104
|
colorTextSelected: token.blue4,
|
|
99
105
|
colorTextLink: token.blue4,
|
|
100
106
|
colorTextInverse: token.white,
|
|
107
|
+
colorTextDisabledSelected: token.gray7,
|
|
108
|
+
colorTextSuccess: token.green4,
|
|
109
|
+
colorTextError: token.red4,
|
|
110
|
+
colorTextWarning: token.orange4,
|
|
101
111
|
// 图标色 Icon
|
|
102
112
|
colorIconDefault: token.gray8,
|
|
103
113
|
colorIconHover: token.blue4,
|
|
@@ -108,7 +118,10 @@ var genObToken = function genObToken(token) {
|
|
|
108
118
|
colorIconWarning: token.orange4,
|
|
109
119
|
colorIconSuccess: token.green4,
|
|
110
120
|
colorIconError: token.red4,
|
|
111
|
-
|
|
121
|
+
colorIconCritical: token.fuchsia4,
|
|
122
|
+
/**
|
|
123
|
+
* 兼容旧版「状态色」字段(与 DTCG 语义色并存;勿在新代码中使用,亦不在文档中列出)
|
|
124
|
+
*/
|
|
112
125
|
colorDefaultText: token.colorText,
|
|
113
126
|
colorDefaultIcon: token.gray8,
|
|
114
127
|
colorDefaultFill: token.gray2,
|
|
@@ -135,6 +148,7 @@ var genObToken = function genObToken(token) {
|
|
|
135
148
|
colorCriticalBorder: token.fuchsia3,
|
|
136
149
|
// ==================== 字体 Token ====================
|
|
137
150
|
fontFamilyDefault: token.fontFamily,
|
|
151
|
+
fontFamilyCode: token.fontFamilyCode,
|
|
138
152
|
fontWeightSm: token.fontWeightWeak,
|
|
139
153
|
fontWeightMd: token.fontWeight,
|
|
140
154
|
fontWeightLg: token.fontWeightStrong,
|
|
@@ -154,6 +168,7 @@ var genObToken = function genObToken(token) {
|
|
|
154
168
|
fontBody1: "".concat(token.fontWeight, " ").concat(token.fontSize, "px/var(--").concat(prefix, "-font-line-height-500) ").concat(token.fontFamily),
|
|
155
169
|
fontBody2: "".concat(token.fontWeightWeak, " ").concat(token.fontSizeSM, "px/var(--").concat(prefix, "-font-line-height-500) ").concat(token.fontFamily),
|
|
156
170
|
fontCaption: "".concat(token.fontWeightWeak, " ").concat(token.fontSizeSM, "px/var(--").concat(prefix, "-font-line-height-500) ").concat(token.fontFamily),
|
|
171
|
+
fontBodyCode: "".concat(token.fontWeight, " ").concat(token.fontSize, "px/var(--").concat(prefix, "-font-line-height-500) var(--").concat(prefix, "-font-family-code)"),
|
|
157
172
|
// ==================== 阴影 Token ====================
|
|
158
173
|
shadow1Top: '0px -1px 2px 0px hsla(219, 50%, 15%, 0.1)',
|
|
159
174
|
shadow1Bottom: '0px 1px 2px 0px hsla(219, 50%, 15%, 0.1)',
|
|
@@ -212,7 +227,7 @@ var genCssVariablesStyle = function genCssVariablesStyle(token) {
|
|
|
212
227
|
var _root;
|
|
213
228
|
var prefix = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'ob';
|
|
214
229
|
return [{
|
|
215
|
-
':root': (_root = {}, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_root, "--".concat(prefix, "-white"), token.white), "--".concat(prefix, "-gray-1"), token.gray1), "--".concat(prefix, "-gray-2"), token.gray2), "--".concat(prefix, "-gray-3"), token.gray3), "--".concat(prefix, "-gray-4"), token.gray4), "--".concat(prefix, "-gray-5"), token.gray5), "--".concat(prefix, "-gray-6"), token.gray6), "--".concat(prefix, "-gray-7"), token.gray7), "--".concat(prefix, "-gray-8"), token.gray8), "--".concat(prefix, "-gray-9"), token.gray9), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_root, "--".concat(prefix, "-gray-10"), token.colorText), "--".concat(prefix, "-black"), token.black), "--".concat(prefix, "-blue-1"), token.blue1), "--".concat(prefix, "-blue-2"), token.blue2), "--".concat(prefix, "-blue-3"), token.blue3), "--".concat(prefix, "-blue-4"), token.blue4), "--".concat(prefix, "-blue-5"), token.blue5), "--".concat(prefix, "-blue-6"), token.blue6), "--".concat(prefix, "-green-1"), token.green1), "--".concat(prefix, "-green-2"), token.green2), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_root, "--".concat(prefix, "-green-3"), token.green3), "--".concat(prefix, "-green-4"), token.green4), "--".concat(prefix, "-green-5"), token.green5), "--".concat(prefix, "-green-6"), token.green6), "--".concat(prefix, "-orange-1"), token.orange1), "--".concat(prefix, "-orange-2"), token.orange2), "--".concat(prefix, "-orange-3"), token.orange3), "--".concat(prefix, "-orange-4"), token.orange4), "--".concat(prefix, "-orange-5"), token.orange5), "--".concat(prefix, "-orange-6"), token.orange6), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_root, "--".concat(prefix, "-red-1"), token.red1), "--".concat(prefix, "-red-2"), token.red2), "--".concat(prefix, "-red-3"), token.red3), "--".concat(prefix, "-red-4"), token.red4), "--".concat(prefix, "-red-5"), token.red5), "--".concat(prefix, "-red-6"), token.red6), "--".concat(prefix, "-fuchsia-1"), token.fuchsia1), "--".concat(prefix, "-fuchsia-2"), token.fuchsia2), "--".concat(prefix, "-fuchsia-3"), token.fuchsia3), "--".concat(prefix, "-fuchsia-4"), token.fuchsia4), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_root, "--".concat(prefix, "-fuchsia-5"), token.fuchsia5), "--".concat(prefix, "-fuchsia-6"), token.fuchsia6), "--".concat(prefix, "-color-bg-default"), token.colorBgContainer), "--".concat(prefix, "-color-bg-primary"), token.gray1), "--".concat(prefix, "-color-bg-secondary"), token.gray2), "--".concat(prefix, "-color-bg-hover"), token.gray2), "--".concat(prefix, "-color-bg-hover-secondary"), token.gray3), "--".concat(prefix, "-color-bg-focus"), token.gray3), "--".concat(prefix, "-color-bg-selected"), token.blue4), "--".concat(prefix, "-color-bg-disabled"), token.gray3), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_root, "--".concat(prefix, "-color-divider"), token.gray4), "--".concat(prefix, "-color-border-default"), token.gray5), "--".concat(prefix, "-color-border-container"), token.gray4), "--".concat(prefix, "-color-border-inverse"), token.white), "--".concat(prefix, "-color-border-hover"), token.gray7), "--".concat(prefix, "-color-border-focus"), token.blue4), "--".concat(prefix, "-color-border-error"), token.red4), "--".concat(prefix, "-color-border-warning"), token.orange4), "--".concat(prefix, "-color-text-default"), token.colorText), "--".concat(prefix, "-color-text-navigation"), token.gray9), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_root, "--".concat(prefix, "-color-text-label"), token.gray8), "--".concat(prefix, "-color-text-description"), token.gray7), "--".concat(prefix, "-color-text-disabled"), token.gray6), "--".concat(prefix, "-color-text-focus"), token.colorText), "--".concat(prefix, "-color-text-selected"), token.blue4), "--".concat(prefix, "-color-text-link"), token.blue4), "--".concat(prefix, "-color-text-inverse"), token.white), "--".concat(prefix, "-color-icon-default"), token.gray8), "--".concat(prefix, "-color-icon-hover"), token.blue4), "--".concat(prefix, "-color-icon-disabled"), token.gray6), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_root, "--".concat(prefix, "-color-icon-focus"), token.blue4), "--".concat(prefix, "-color-icon-inverse"), token.white), "--".concat(prefix, "-color-icon-info"), token.blue4), "--".concat(prefix, "-color-icon-warning"), token.orange4), "--".concat(prefix, "-color-icon-success"), token.green4), "--".concat(prefix, "-color-icon-error"), token.red4), "--".concat(prefix, "-color-default-text"), token.colorText), "--".concat(prefix, "-color-default-icon"), token.gray8), "--".concat(prefix, "-color-default-fill"), token.gray2), "--".concat(prefix, "-color-default-border"), token.gray2), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_root, "--".concat(prefix, "-color-info-text"), token.blue6), "--".concat(prefix, "-color-info-icon"), token.blue6), "--".concat(prefix, "-color-info-fill"), token.blue1), "--".concat(prefix, "-color-info-border"), token.blue3), "--".concat(prefix, "-color-success-text"), token.green6), "--".concat(prefix, "-color-success-icon"), token.green6), "--".concat(prefix, "-color-success-fill"), token.green1), "--".concat(prefix, "-color-success-border"), token.green3), "--".concat(prefix, "-color-warning-text"), token.orange6), "--".concat(prefix, "-color-warning-icon"), token.orange6), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_root, "--".concat(prefix, "-color-warning-fill"), token.orange1), "--".concat(prefix, "-color-warning-border"), token.orange3), "--".concat(prefix, "-color-error-text"), token.red6), "--".concat(prefix, "-color-error-icon"), token.red6), "--".concat(prefix, "-color-error-fill"), token.red1), "--".concat(prefix, "-color-error-border"), token.red3), "--".concat(prefix, "-color-critical-text"), token.fuchsia6), "--".concat(prefix, "-color-critical-icon"), token.fuchsia6), "--".concat(prefix, "-color-critical-fill"), token.fuchsia1), "--".concat(prefix, "-color-critical-border"), token.fuchsia3), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_root, "--".concat(prefix, "-font-family-default"), token.fontFamily), "--".concat(prefix, "-font-weight-sm"), "".concat(token.fontWeightWeak)), "--".concat(prefix, "-font-weight-md"), "".concat(token.fontWeight)), "--".concat(prefix, "-font-weight-lg"), "".concat(token.fontWeightStrong)), "--".concat(prefix, "-font-size-300"), "".concat(token.fontSizeSM, "px")), "--".concat(prefix, "-font-size-325"), "".concat(token.fontSize, "px")), "--".concat(prefix, "-font-size-400"), "".concat(token.fontSizeLG, "px")), "--".concat(prefix, "-font-size-450"), "".concat(token.fontSizeHeading3, "px")), "--".concat(prefix, "-font-size-500"), "".concat(token.fontSizeHeading2, "px")), "--".concat(prefix, "-font-line-height-500"), '20px'), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_root, "--".concat(prefix, "-font-line-height-600"), '24px'), "--".concat(prefix, "-font-line-height-650"), '26px'), "--".concat(prefix, "-font-line-height-700"), '28px'), "--".concat(prefix, "-font-h1"), "".concat(token.fontWeightStrong, " ").concat(token.fontSizeHeading2, "px/var(--").concat(prefix, "-font-line-height-700) ").concat(token.fontFamily)), "--".concat(prefix, "-font-h2"), "".concat(token.fontWeightStrong, " ").concat(token.fontSizeHeading3, "px/var(--").concat(prefix, "-font-line-height-650) ").concat(token.fontFamily)), "--".concat(prefix, "-font-h3"), "".concat(token.fontWeightStrong, " ").concat(token.fontSizeLG, "px/var(--").concat(prefix, "-font-line-height-600) ").concat(token.fontFamily)), "--".concat(prefix, "-font-h4"), "".concat(token.fontWeightStrong, " ").concat(token.fontSize, "px/var(--").concat(prefix, "-font-line-height-500) ").concat(token.fontFamily)), "--".concat(prefix, "-font-body1"), "".concat(token.fontWeight, " ").concat(token.fontSize, "px/var(--").concat(prefix, "-font-line-height-500) ").concat(token.fontFamily)), "--".concat(prefix, "-font-body2"), "".concat(token.fontWeightWeak, " ").concat(token.fontSizeSM, "px/var(--").concat(prefix, "-font-line-height-500) ").concat(token.fontFamily)), "--".concat(prefix, "-font-caption"), "".concat(token.fontWeightWeak, " ").concat(token.fontSizeSM, "px/var(--").concat(prefix, "-font-line-height-500) ").concat(token.fontFamily)), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_root, "--".concat(prefix, "-shadow-1-top"), '0px -1px 2px 0px hsla(219, 50%, 15%, 0.1)'), "--".concat(prefix, "-shadow-1-bottom"), '0px 1px 2px 0px hsla(219, 50%, 15%, 0.1)'), "--".concat(prefix, "-shadow-1-left"), '-1px 0px 2px 0px hsla(219, 50%, 15%, 0.1)'), "--".concat(prefix, "-shadow-1-right"), '1px 0px 2px 0px hsla(219, 50%, 15%, 0.1)'), "--".concat(prefix, "-shadow-2"), token.boxShadowSecondary), "--".concat(prefix, "-radius-sm"), "".concat(token.borderRadius, "px")), "--".concat(prefix, "-radius-md"), "".concat(token.borderRadiusMD, "px")), "--".concat(prefix, "-radius-lg"), "".concat(token.borderRadiusLG, "px")), "--".concat(prefix, "-space-0"), '0px'), "--".concat(prefix, "-space-50"), '2px'), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_root, "--".concat(prefix, "-space-100"), "".concat(token.paddingXXS, "px")), "--".concat(prefix, "-space-150"), '6px'), "--".concat(prefix, "-space-200"), "".concat(token.paddingXS, "px")), "--".concat(prefix, "-space-300"), "".concat(token.paddingSM, "px")), "--".concat(prefix, "-space-400"), "".concat(token.padding, "px")), "--".concat(prefix, "-space-500"), "".concat(token.paddingMD, "px")), "--".concat(prefix, "-space-600"), "".concat(token.paddingLG, "px")), "--".concat(prefix, "-space-800"), "".concat(token.paddingXL, "px")), "--".concat(prefix, "-space-negative-25"), '-1px'), "--".concat(prefix, "-navi-color-bg"), token.colorNaviBg), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_root, "--".concat(prefix, "-navi-color-bg-hover"), token.colorNaviBgHover), "--".concat(prefix, "-navi-color-bg-focus"), token.colorNaviBgHover), "--".concat(prefix, "-btn-color-primary-bg"), token.blue4), "--".concat(prefix, "-btn-color-primary-bg-hover"), token.blue5), "--".concat(prefix, "-btn-color-primary-bg-disabled"), token.blue3), "--".concat(prefix, "-btn-color-primary-text"), token.white), "--".concat(prefix, "-btn-color-primary-icon"), token.white), "--".concat(prefix, "-btn-color-secondary-border"), token.blue4), "--".concat(prefix, "-btn-color-secondary-text"), token.blue4), "--".concat(prefix, "-btn-color-secondary-icon"), token.blue4), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_root, "--".concat(prefix, "-btn-color-danger-border"), token.red4), "--".concat(prefix, "-btn-color-danger-text"), token.red4), "--".concat(prefix, "-progress-color-bg-default"), token.gray4), "--".concat(prefix, "-progress-color-bg-loading"), token.blue4), "--".concat(prefix, "-progress-color-bg-success"), token.green4), "--".concat(prefix, "-progress-color-bg-error"), token.red4), "--".concat(prefix, "-switch-color-bg-default"), token.gray7), "--".concat(prefix, "-switch-color-bg-disabled"), token.gray4), "--".concat(prefix, "-switch-color-bg-active"), token.blue4), "--".concat(prefix, "-switch-color-bg-disabled-selected"), token.gray5))
|
|
230
|
+
':root': (_root = {}, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_root, "--".concat(prefix, "-white"), token.white), "--".concat(prefix, "-gray-1"), token.gray1), "--".concat(prefix, "-gray-2"), token.gray2), "--".concat(prefix, "-gray-3"), token.gray3), "--".concat(prefix, "-gray-4"), token.gray4), "--".concat(prefix, "-gray-5"), token.gray5), "--".concat(prefix, "-gray-6"), token.gray6), "--".concat(prefix, "-gray-7"), token.gray7), "--".concat(prefix, "-gray-8"), token.gray8), "--".concat(prefix, "-gray-9"), token.gray9), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_root, "--".concat(prefix, "-gray-10"), token.colorText), "--".concat(prefix, "-black"), token.black), "--".concat(prefix, "-blue-1"), token.blue1), "--".concat(prefix, "-blue-2"), token.blue2), "--".concat(prefix, "-blue-3"), token.blue3), "--".concat(prefix, "-blue-4"), token.blue4), "--".concat(prefix, "-blue-5"), token.blue5), "--".concat(prefix, "-blue-6"), token.blue6), "--".concat(prefix, "-green-1"), token.green1), "--".concat(prefix, "-green-2"), token.green2), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_root, "--".concat(prefix, "-green-3"), token.green3), "--".concat(prefix, "-green-4"), token.green4), "--".concat(prefix, "-green-5"), token.green5), "--".concat(prefix, "-green-6"), token.green6), "--".concat(prefix, "-orange-1"), token.orange1), "--".concat(prefix, "-orange-2"), token.orange2), "--".concat(prefix, "-orange-3"), token.orange3), "--".concat(prefix, "-orange-4"), token.orange4), "--".concat(prefix, "-orange-5"), token.orange5), "--".concat(prefix, "-orange-6"), token.orange6), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_root, "--".concat(prefix, "-red-1"), token.red1), "--".concat(prefix, "-red-2"), token.red2), "--".concat(prefix, "-red-3"), token.red3), "--".concat(prefix, "-red-4"), token.red4), "--".concat(prefix, "-red-5"), token.red5), "--".concat(prefix, "-red-6"), token.red6), "--".concat(prefix, "-fuchsia-1"), token.fuchsia1), "--".concat(prefix, "-fuchsia-2"), token.fuchsia2), "--".concat(prefix, "-fuchsia-3"), token.fuchsia3), "--".concat(prefix, "-fuchsia-4"), token.fuchsia4), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_root, "--".concat(prefix, "-fuchsia-5"), token.fuchsia5), "--".concat(prefix, "-fuchsia-6"), token.fuchsia6), "--".concat(prefix, "-color-bg-default"), token.colorBgContainer), "--".concat(prefix, "-color-bg-primary"), token.gray1), "--".concat(prefix, "-color-bg-secondary"), token.gray2), "--".concat(prefix, "-color-bg-hover"), token.gray2), "--".concat(prefix, "-color-bg-hover-secondary"), token.gray3), "--".concat(prefix, "-color-bg-focus"), token.gray3), "--".concat(prefix, "-color-bg-selected"), token.blue4), "--".concat(prefix, "-color-bg-disabled"), token.gray2), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_root, "--".concat(prefix, "-color-bg-info"), token.blue1), "--".concat(prefix, "-color-bg-success"), token.green1), "--".concat(prefix, "-color-bg-warning"), token.orange1), "--".concat(prefix, "-color-bg-error"), token.red1), "--".concat(prefix, "-color-divider"), token.gray4), "--".concat(prefix, "-color-border-default"), token.gray5), "--".concat(prefix, "-color-border-container"), token.gray4), "--".concat(prefix, "-color-border-inverse"), token.white), "--".concat(prefix, "-color-border-hover"), token.gray7), "--".concat(prefix, "-color-border-selected"), token.blue4), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_root, "--".concat(prefix, "-color-border-focus"), token.blue4), "--".concat(prefix, "-color-border-success"), token.green4), "--".concat(prefix, "-color-border-error"), token.red4), "--".concat(prefix, "-color-border-warning"), token.orange4), "--".concat(prefix, "-color-text-default"), token.colorText), "--".concat(prefix, "-color-text-navigation"), token.gray9), "--".concat(prefix, "-color-text-label"), token.gray8), "--".concat(prefix, "-color-text-description"), token.gray7), "--".concat(prefix, "-color-text-disabled"), token.gray6), "--".concat(prefix, "-color-text-focus"), token.colorText), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_root, "--".concat(prefix, "-color-text-selected"), token.blue4), "--".concat(prefix, "-color-text-link"), token.blue4), "--".concat(prefix, "-color-text-inverse"), token.white), "--".concat(prefix, "-color-text-disabled-selected"), token.gray7), "--".concat(prefix, "-color-text-success"), token.green4), "--".concat(prefix, "-color-text-error"), token.red4), "--".concat(prefix, "-color-text-warning"), token.orange4), "--".concat(prefix, "-color-icon-default"), token.gray8), "--".concat(prefix, "-color-icon-hover"), token.blue4), "--".concat(prefix, "-color-icon-disabled"), token.gray6), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_root, "--".concat(prefix, "-color-icon-focus"), token.blue4), "--".concat(prefix, "-color-icon-inverse"), token.white), "--".concat(prefix, "-color-icon-info"), token.blue4), "--".concat(prefix, "-color-icon-warning"), token.orange4), "--".concat(prefix, "-color-icon-success"), token.green4), "--".concat(prefix, "-color-icon-error"), token.red4), "--".concat(prefix, "-color-icon-critical"), token.fuchsia4), "--".concat(prefix, "-color-default-text"), token.colorText), "--".concat(prefix, "-color-default-icon"), token.gray8), "--".concat(prefix, "-color-default-fill"), token.gray2), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_root, "--".concat(prefix, "-color-default-border"), token.gray2), "--".concat(prefix, "-color-info-text"), token.blue6), "--".concat(prefix, "-color-info-icon"), token.blue6), "--".concat(prefix, "-color-info-fill"), token.blue1), "--".concat(prefix, "-color-info-border"), token.blue3), "--".concat(prefix, "-color-success-text"), token.green6), "--".concat(prefix, "-color-success-icon"), token.green6), "--".concat(prefix, "-color-success-fill"), token.green1), "--".concat(prefix, "-color-success-border"), token.green3), "--".concat(prefix, "-color-warning-text"), token.orange6), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_root, "--".concat(prefix, "-color-warning-icon"), token.orange6), "--".concat(prefix, "-color-warning-fill"), token.orange1), "--".concat(prefix, "-color-warning-border"), token.orange3), "--".concat(prefix, "-color-error-text"), token.red6), "--".concat(prefix, "-color-error-icon"), token.red6), "--".concat(prefix, "-color-error-fill"), token.red1), "--".concat(prefix, "-color-error-border"), token.red3), "--".concat(prefix, "-color-critical-text"), token.fuchsia6), "--".concat(prefix, "-color-critical-icon"), token.fuchsia6), "--".concat(prefix, "-color-critical-fill"), token.fuchsia1), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_root, "--".concat(prefix, "-color-critical-border"), token.fuchsia3), "--".concat(prefix, "-font-family-default"), token.fontFamily), "--".concat(prefix, "-font-family-code"), token.fontFamilyCode), "--".concat(prefix, "-font-weight-sm"), "".concat(token.fontWeightWeak)), "--".concat(prefix, "-font-weight-md"), "".concat(token.fontWeight)), "--".concat(prefix, "-font-weight-lg"), "".concat(token.fontWeightStrong)), "--".concat(prefix, "-font-size-300"), "".concat(token.fontSizeSM, "px")), "--".concat(prefix, "-font-size-325"), "".concat(token.fontSize, "px")), "--".concat(prefix, "-font-size-400"), "".concat(token.fontSizeLG, "px")), "--".concat(prefix, "-font-size-450"), "".concat(token.fontSizeHeading3, "px")), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_root, "--".concat(prefix, "-font-size-500"), "".concat(token.fontSizeHeading2, "px")), "--".concat(prefix, "-font-line-height-500"), '20px'), "--".concat(prefix, "-font-line-height-600"), '24px'), "--".concat(prefix, "-font-line-height-650"), '26px'), "--".concat(prefix, "-font-line-height-700"), '28px'), "--".concat(prefix, "-font-h1"), "".concat(token.fontWeightStrong, " ").concat(token.fontSizeHeading2, "px/var(--").concat(prefix, "-font-line-height-700) ").concat(token.fontFamily)), "--".concat(prefix, "-font-h2"), "".concat(token.fontWeightStrong, " ").concat(token.fontSizeHeading3, "px/var(--").concat(prefix, "-font-line-height-650) ").concat(token.fontFamily)), "--".concat(prefix, "-font-h3"), "".concat(token.fontWeightStrong, " ").concat(token.fontSizeLG, "px/var(--").concat(prefix, "-font-line-height-600) ").concat(token.fontFamily)), "--".concat(prefix, "-font-h4"), "".concat(token.fontWeightStrong, " ").concat(token.fontSize, "px/var(--").concat(prefix, "-font-line-height-500) ").concat(token.fontFamily)), "--".concat(prefix, "-font-body1"), "".concat(token.fontWeight, " ").concat(token.fontSize, "px/var(--").concat(prefix, "-font-line-height-500) ").concat(token.fontFamily)), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_root, "--".concat(prefix, "-font-body2"), "".concat(token.fontWeightWeak, " ").concat(token.fontSizeSM, "px/var(--").concat(prefix, "-font-line-height-500) ").concat(token.fontFamily)), "--".concat(prefix, "-font-caption"), "".concat(token.fontWeightWeak, " ").concat(token.fontSizeSM, "px/var(--").concat(prefix, "-font-line-height-500) ").concat(token.fontFamily)), "--".concat(prefix, "-font-body-code"), "".concat(token.fontWeight, " ").concat(token.fontSize, "px/var(--").concat(prefix, "-font-line-height-500) var(--").concat(prefix, "-font-family-code)")), "--".concat(prefix, "-shadow-1-top"), '0px -1px 2px 0px hsla(219, 50%, 15%, 0.1)'), "--".concat(prefix, "-shadow-1-bottom"), '0px 1px 2px 0px hsla(219, 50%, 15%, 0.1)'), "--".concat(prefix, "-shadow-1-left"), '-1px 0px 2px 0px hsla(219, 50%, 15%, 0.1)'), "--".concat(prefix, "-shadow-1-right"), '1px 0px 2px 0px hsla(219, 50%, 15%, 0.1)'), "--".concat(prefix, "-shadow-2"), token.boxShadowSecondary), "--".concat(prefix, "-radius-sm"), "".concat(token.borderRadius, "px")), "--".concat(prefix, "-radius-md"), "".concat(token.borderRadiusMD, "px")), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_root, "--".concat(prefix, "-radius-lg"), "".concat(token.borderRadiusLG, "px")), "--".concat(prefix, "-space-0"), '0px'), "--".concat(prefix, "-space-50"), '2px'), "--".concat(prefix, "-space-100"), "".concat(token.paddingXXS, "px")), "--".concat(prefix, "-space-150"), '6px'), "--".concat(prefix, "-space-200"), "".concat(token.paddingXS, "px")), "--".concat(prefix, "-space-300"), "".concat(token.paddingSM, "px")), "--".concat(prefix, "-space-400"), "".concat(token.padding, "px")), "--".concat(prefix, "-space-500"), "".concat(token.paddingMD, "px")), "--".concat(prefix, "-space-600"), "".concat(token.paddingLG, "px")), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_root, "--".concat(prefix, "-space-800"), "".concat(token.paddingXL, "px")), "--".concat(prefix, "-space-negative-25"), '-1px'), "--".concat(prefix, "-navi-color-bg"), token.colorNaviBg), "--".concat(prefix, "-navi-color-bg-hover"), token.colorNaviBgHover), "--".concat(prefix, "-navi-color-bg-focus"), token.colorNaviBgHover), "--".concat(prefix, "-btn-color-primary-bg"), token.blue4), "--".concat(prefix, "-btn-color-primary-bg-hover"), token.blue5), "--".concat(prefix, "-btn-color-primary-bg-disabled"), token.blue3), "--".concat(prefix, "-btn-color-primary-text"), token.white), "--".concat(prefix, "-btn-color-primary-icon"), token.white), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_root, "--".concat(prefix, "-btn-color-secondary-border"), token.blue4), "--".concat(prefix, "-btn-color-secondary-text"), token.blue4), "--".concat(prefix, "-btn-color-secondary-icon"), token.blue4), "--".concat(prefix, "-btn-color-danger-border"), token.red4), "--".concat(prefix, "-btn-color-danger-text"), token.red4), "--".concat(prefix, "-progress-color-bg-default"), token.gray4), "--".concat(prefix, "-progress-color-bg-loading"), token.blue4), "--".concat(prefix, "-progress-color-bg-success"), token.green4), "--".concat(prefix, "-progress-color-bg-error"), token.red4), "--".concat(prefix, "-switch-color-bg-default"), token.gray7), _defineProperty(_defineProperty(_defineProperty(_root, "--".concat(prefix, "-switch-color-bg-disabled"), token.gray4), "--".concat(prefix, "-switch-color-bg-active"), token.blue4), "--".concat(prefix, "-switch-color-bg-disabled-selected"), token.gray5))
|
|
216
231
|
}];
|
|
217
232
|
};
|
|
218
233
|
/**
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* CSS Variables Metadata
|
|
3
3
|
* CSS 变量元数据定义,用于文档展示
|
|
4
4
|
*/
|
|
5
|
-
export type ObTokenCategory = 'color' | 'color-bg' | 'color-border' | 'color-text' | 'color-icon' | '
|
|
5
|
+
export type ObTokenCategory = 'color' | 'color-bg' | 'color-border' | 'color-text' | 'color-icon' | 'font' | 'shadow' | 'radius' | 'space' | 'component';
|
|
6
6
|
export interface ObTokenMeta {
|
|
7
7
|
/** 变量名 (不含前缀) */
|
|
8
8
|
name: string;
|
package/es/theme/obTokenMeta.js
CHANGED
|
@@ -279,7 +279,7 @@ export var obTokenMeta = [
|
|
|
279
279
|
desc: '默认背景色',
|
|
280
280
|
descEn: 'Default background',
|
|
281
281
|
category: 'color-bg',
|
|
282
|
-
token: '
|
|
282
|
+
token: 'white'
|
|
283
283
|
}, {
|
|
284
284
|
name: 'color-bg-primary',
|
|
285
285
|
desc: '一级背景色',
|
|
@@ -321,7 +321,31 @@ export var obTokenMeta = [
|
|
|
321
321
|
desc: '禁用背景色',
|
|
322
322
|
descEn: 'Disabled background',
|
|
323
323
|
category: 'color-bg',
|
|
324
|
-
token: '
|
|
324
|
+
token: 'gray2'
|
|
325
|
+
}, {
|
|
326
|
+
name: 'color-bg-info',
|
|
327
|
+
desc: '信息背景色',
|
|
328
|
+
descEn: 'Info background',
|
|
329
|
+
category: 'color-bg',
|
|
330
|
+
token: 'blue1'
|
|
331
|
+
}, {
|
|
332
|
+
name: 'color-bg-success',
|
|
333
|
+
desc: '成功背景色',
|
|
334
|
+
descEn: 'Success background',
|
|
335
|
+
category: 'color-bg',
|
|
336
|
+
token: 'green1'
|
|
337
|
+
}, {
|
|
338
|
+
name: 'color-bg-warning',
|
|
339
|
+
desc: '警告背景色',
|
|
340
|
+
descEn: 'Warning background',
|
|
341
|
+
category: 'color-bg',
|
|
342
|
+
token: 'orange1'
|
|
343
|
+
}, {
|
|
344
|
+
name: 'color-bg-error',
|
|
345
|
+
desc: '错误背景色',
|
|
346
|
+
descEn: 'Error background',
|
|
347
|
+
category: 'color-bg',
|
|
348
|
+
token: 'red1'
|
|
325
349
|
},
|
|
326
350
|
// 边框色 Border
|
|
327
351
|
{
|
|
@@ -354,12 +378,24 @@ export var obTokenMeta = [
|
|
|
354
378
|
descEn: 'Hover border',
|
|
355
379
|
category: 'color-border',
|
|
356
380
|
token: 'gray7'
|
|
381
|
+
}, {
|
|
382
|
+
name: 'color-border-selected',
|
|
383
|
+
desc: '选中边框色',
|
|
384
|
+
descEn: 'Selected border',
|
|
385
|
+
category: 'color-border',
|
|
386
|
+
token: 'blue4'
|
|
357
387
|
}, {
|
|
358
388
|
name: 'color-border-focus',
|
|
359
389
|
desc: '聚焦边框色',
|
|
360
390
|
descEn: 'Focus border',
|
|
361
391
|
category: 'color-border',
|
|
362
392
|
token: 'blue4'
|
|
393
|
+
}, {
|
|
394
|
+
name: 'color-border-success',
|
|
395
|
+
desc: '成功边框色',
|
|
396
|
+
descEn: 'Success border',
|
|
397
|
+
category: 'color-border',
|
|
398
|
+
token: 'green4'
|
|
363
399
|
}, {
|
|
364
400
|
name: 'color-border-error',
|
|
365
401
|
desc: '错误边框色',
|
|
@@ -428,6 +464,30 @@ export var obTokenMeta = [
|
|
|
428
464
|
descEn: 'Inverse text',
|
|
429
465
|
category: 'color-text',
|
|
430
466
|
token: 'white'
|
|
467
|
+
}, {
|
|
468
|
+
name: 'color-text-disabled-selected',
|
|
469
|
+
desc: '禁用且选中时的文本色',
|
|
470
|
+
descEn: 'Disabled selected text',
|
|
471
|
+
category: 'color-text',
|
|
472
|
+
token: 'gray7'
|
|
473
|
+
}, {
|
|
474
|
+
name: 'color-text-success',
|
|
475
|
+
desc: '成功文本色',
|
|
476
|
+
descEn: 'Success text',
|
|
477
|
+
category: 'color-text',
|
|
478
|
+
token: 'green4'
|
|
479
|
+
}, {
|
|
480
|
+
name: 'color-text-error',
|
|
481
|
+
desc: '错误文本色',
|
|
482
|
+
descEn: 'Error text',
|
|
483
|
+
category: 'color-text',
|
|
484
|
+
token: 'red4'
|
|
485
|
+
}, {
|
|
486
|
+
name: 'color-text-warning',
|
|
487
|
+
desc: '警告文本色',
|
|
488
|
+
descEn: 'Warning text',
|
|
489
|
+
category: 'color-text',
|
|
490
|
+
token: 'orange4'
|
|
431
491
|
},
|
|
432
492
|
// 图标色 Icon
|
|
433
493
|
{
|
|
@@ -484,152 +544,12 @@ export var obTokenMeta = [
|
|
|
484
544
|
descEn: 'Error icon',
|
|
485
545
|
category: 'color-icon',
|
|
486
546
|
token: 'red4'
|
|
487
|
-
},
|
|
488
|
-
// 状态色
|
|
489
|
-
{
|
|
490
|
-
name: 'color-default-text',
|
|
491
|
-
desc: '默认状态-文本',
|
|
492
|
-
descEn: 'Default status text',
|
|
493
|
-
category: 'color-status',
|
|
494
|
-
token: 'colorText'
|
|
495
|
-
}, {
|
|
496
|
-
name: 'color-default-icon',
|
|
497
|
-
desc: '默认状态-图标',
|
|
498
|
-
descEn: 'Default status icon',
|
|
499
|
-
category: 'color-status',
|
|
500
|
-
token: 'gray8'
|
|
501
|
-
}, {
|
|
502
|
-
name: 'color-default-fill',
|
|
503
|
-
desc: '默认状态-填充',
|
|
504
|
-
descEn: 'Default status fill',
|
|
505
|
-
category: 'color-status',
|
|
506
|
-
token: 'gray2'
|
|
507
|
-
}, {
|
|
508
|
-
name: 'color-default-border',
|
|
509
|
-
desc: '默认状态-边框',
|
|
510
|
-
descEn: 'Default status border',
|
|
511
|
-
category: 'color-status',
|
|
512
|
-
token: 'gray2'
|
|
513
|
-
}, {
|
|
514
|
-
name: 'color-info-text',
|
|
515
|
-
desc: '信息状态-文本',
|
|
516
|
-
descEn: 'Info status text',
|
|
517
|
-
category: 'color-status',
|
|
518
|
-
token: 'blue6'
|
|
519
547
|
}, {
|
|
520
|
-
name: 'color-
|
|
521
|
-
desc: '
|
|
522
|
-
descEn: '
|
|
523
|
-
category: 'color-
|
|
524
|
-
token: '
|
|
525
|
-
}, {
|
|
526
|
-
name: 'color-info-fill',
|
|
527
|
-
desc: '信息状态-填充',
|
|
528
|
-
descEn: 'Info status fill',
|
|
529
|
-
category: 'color-status',
|
|
530
|
-
token: 'blue1'
|
|
531
|
-
}, {
|
|
532
|
-
name: 'color-info-border',
|
|
533
|
-
desc: '信息状态-边框',
|
|
534
|
-
descEn: 'Info status border',
|
|
535
|
-
category: 'color-status',
|
|
536
|
-
token: 'blue3'
|
|
537
|
-
}, {
|
|
538
|
-
name: 'color-success-text',
|
|
539
|
-
desc: '成功状态-文本',
|
|
540
|
-
descEn: 'Success status text',
|
|
541
|
-
category: 'color-status',
|
|
542
|
-
token: 'green6'
|
|
543
|
-
}, {
|
|
544
|
-
name: 'color-success-icon',
|
|
545
|
-
desc: '成功状态-图标',
|
|
546
|
-
descEn: 'Success status icon',
|
|
547
|
-
category: 'color-status',
|
|
548
|
-
token: 'green6'
|
|
549
|
-
}, {
|
|
550
|
-
name: 'color-success-fill',
|
|
551
|
-
desc: '成功状态-填充',
|
|
552
|
-
descEn: 'Success status fill',
|
|
553
|
-
category: 'color-status',
|
|
554
|
-
token: 'green1'
|
|
555
|
-
}, {
|
|
556
|
-
name: 'color-success-border',
|
|
557
|
-
desc: '成功状态-边框',
|
|
558
|
-
descEn: 'Success status border',
|
|
559
|
-
category: 'color-status',
|
|
560
|
-
token: 'green3'
|
|
561
|
-
}, {
|
|
562
|
-
name: 'color-warning-text',
|
|
563
|
-
desc: '警告状态-文本',
|
|
564
|
-
descEn: 'Warning status text',
|
|
565
|
-
category: 'color-status',
|
|
566
|
-
token: 'orange6'
|
|
567
|
-
}, {
|
|
568
|
-
name: 'color-warning-icon',
|
|
569
|
-
desc: '警告状态-图标',
|
|
570
|
-
descEn: 'Warning status icon',
|
|
571
|
-
category: 'color-status',
|
|
572
|
-
token: 'orange6'
|
|
573
|
-
}, {
|
|
574
|
-
name: 'color-warning-fill',
|
|
575
|
-
desc: '警告状态-填充',
|
|
576
|
-
descEn: 'Warning status fill',
|
|
577
|
-
category: 'color-status',
|
|
578
|
-
token: 'orange1'
|
|
579
|
-
}, {
|
|
580
|
-
name: 'color-warning-border',
|
|
581
|
-
desc: '警告状态-边框',
|
|
582
|
-
descEn: 'Warning status border',
|
|
583
|
-
category: 'color-status',
|
|
584
|
-
token: 'orange3'
|
|
585
|
-
}, {
|
|
586
|
-
name: 'color-error-text',
|
|
587
|
-
desc: '错误状态-文本',
|
|
588
|
-
descEn: 'Error status text',
|
|
589
|
-
category: 'color-status',
|
|
590
|
-
token: 'red6'
|
|
591
|
-
}, {
|
|
592
|
-
name: 'color-error-icon',
|
|
593
|
-
desc: '错误状态-图标',
|
|
594
|
-
descEn: 'Error status icon',
|
|
595
|
-
category: 'color-status',
|
|
596
|
-
token: 'red6'
|
|
597
|
-
}, {
|
|
598
|
-
name: 'color-error-fill',
|
|
599
|
-
desc: '错误状态-填充',
|
|
600
|
-
descEn: 'Error status fill',
|
|
601
|
-
category: 'color-status',
|
|
602
|
-
token: 'red1'
|
|
603
|
-
}, {
|
|
604
|
-
name: 'color-error-border',
|
|
605
|
-
desc: '错误状态-边框',
|
|
606
|
-
descEn: 'Error status border',
|
|
607
|
-
category: 'color-status',
|
|
608
|
-
token: 'red3'
|
|
609
|
-
}, {
|
|
610
|
-
name: 'color-critical-text',
|
|
611
|
-
desc: '严重错误状态-文本',
|
|
612
|
-
descEn: 'Critical status text',
|
|
613
|
-
category: 'color-status',
|
|
614
|
-
token: 'fuchsia6'
|
|
615
|
-
}, {
|
|
616
|
-
name: 'color-critical-icon',
|
|
617
|
-
desc: '严重错误状态-图标',
|
|
618
|
-
descEn: 'Critical status icon',
|
|
619
|
-
category: 'color-status',
|
|
620
|
-
token: 'fuchsia6'
|
|
621
|
-
}, {
|
|
622
|
-
name: 'color-critical-fill',
|
|
623
|
-
desc: '严重错误状态-填充',
|
|
624
|
-
descEn: 'Critical status fill',
|
|
625
|
-
category: 'color-status',
|
|
626
|
-
token: 'fuchsia1'
|
|
627
|
-
}, {
|
|
628
|
-
name: 'color-critical-border',
|
|
629
|
-
desc: '严重错误状态-边框',
|
|
630
|
-
descEn: 'Critical status border',
|
|
631
|
-
category: 'color-status',
|
|
632
|
-
token: 'fuchsia3'
|
|
548
|
+
name: 'color-icon-critical',
|
|
549
|
+
desc: '严重/警示图标色',
|
|
550
|
+
descEn: 'Critical icon',
|
|
551
|
+
category: 'color-icon',
|
|
552
|
+
token: 'fuchsia4'
|
|
633
553
|
},
|
|
634
554
|
// ==================== 字体 Token ====================
|
|
635
555
|
{
|
|
@@ -638,6 +558,12 @@ export var obTokenMeta = [
|
|
|
638
558
|
descEn: 'Default font family',
|
|
639
559
|
category: 'font',
|
|
640
560
|
token: 'fontFamily'
|
|
561
|
+
}, {
|
|
562
|
+
name: 'font-family-code',
|
|
563
|
+
desc: '代码字体',
|
|
564
|
+
descEn: 'Code font family',
|
|
565
|
+
category: 'font',
|
|
566
|
+
token: 'fontFamilyCode'
|
|
641
567
|
}, {
|
|
642
568
|
name: 'font-weight-sm',
|
|
643
569
|
desc: '弱字重',
|
|
@@ -752,6 +678,12 @@ export var obTokenMeta = [
|
|
|
752
678
|
descEn: 'Caption',
|
|
753
679
|
category: 'font',
|
|
754
680
|
value: '400 12px/20px fontFamily'
|
|
681
|
+
}, {
|
|
682
|
+
name: 'font-body-code',
|
|
683
|
+
desc: '代码样式',
|
|
684
|
+
descEn: 'Code typography',
|
|
685
|
+
category: 'font',
|
|
686
|
+
value: '400 13px/20px fontFamilyCode'
|
|
755
687
|
},
|
|
756
688
|
// ==================== 阴影 Token ====================
|
|
757
689
|
{
|
package/lib/card/style/index.js
CHANGED
|
@@ -8,21 +8,31 @@ var _style = require("../../tabs/style");
|
|
|
8
8
|
var _genComponentStyleHook = require("../../_util/genComponentStyleHook");
|
|
9
9
|
const genTableStyle = (padding, token) => {
|
|
10
10
|
const {
|
|
11
|
-
antCls
|
|
12
|
-
componentCls
|
|
11
|
+
antCls
|
|
13
12
|
} = token;
|
|
14
13
|
const tableComponentCls = `${antCls}-table`;
|
|
14
|
+
const cellInline = token.Table?.cellPaddingInline ?? token.padding ?? token.paddingSM ?? 16;
|
|
15
15
|
return {
|
|
16
16
|
[`${tableComponentCls}-wrapper`]: {
|
|
17
17
|
[`${tableComponentCls}`]: {
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
[`${tableComponentCls}-thead > tr > th:first-child`]: {
|
|
19
|
+
paddingLeft: padding
|
|
20
|
+
},
|
|
21
|
+
[`${tableComponentCls}-tbody > tr > td:first-child`]: {
|
|
20
22
|
paddingLeft: padding
|
|
21
23
|
},
|
|
22
|
-
|
|
23
|
-
|
|
24
|
+
[`${tableComponentCls}-tbody > tr > td:first-child[data-ob-user-col]:not([data-ob-user-col="0"])`]: {
|
|
25
|
+
paddingLeft: cellInline
|
|
26
|
+
},
|
|
27
|
+
[`${tableComponentCls}-thead > tr > th:last-child`]: {
|
|
24
28
|
paddingRight: padding
|
|
25
29
|
},
|
|
30
|
+
[`${tableComponentCls}-tbody > tr > td:last-child`]: {
|
|
31
|
+
paddingRight: padding
|
|
32
|
+
},
|
|
33
|
+
[`${tableComponentCls}-tbody > tr > td:last-child[data-ob-user-col]:not([data-ob-user-col-tail])`]: {
|
|
34
|
+
paddingRight: cellInline
|
|
35
|
+
},
|
|
26
36
|
[`${tableComponentCls}-container`]: {
|
|
27
37
|
// ::after 伪元素用于固定列时的阴影效果,表格带边框时去掉左上角和右上角的圆角
|
|
28
38
|
['&::before, &::after']: {
|
|
@@ -35,14 +45,11 @@ const genTableStyle = (padding, token) => {
|
|
|
35
45
|
}
|
|
36
46
|
}
|
|
37
47
|
},
|
|
48
|
+
// 分页与 .ant-table 同级(在 Spin 容器内),须挂在 wrapper 下
|
|
38
49
|
[`${tableComponentCls}-pagination${antCls}-pagination`]: {
|
|
39
|
-
|
|
50
|
+
marginInlineEnd: padding,
|
|
40
51
|
[`${tableComponentCls}-batch-operation-bar`]: {
|
|
41
52
|
marginLeft: padding
|
|
42
|
-
},
|
|
43
|
-
// add marginRight for table pagination
|
|
44
|
-
[`& > li:last-child`]: {
|
|
45
|
-
marginRight: padding
|
|
46
53
|
}
|
|
47
54
|
}
|
|
48
55
|
}
|
|
@@ -63,5 +63,10 @@ export type ConfigProviderType = React.FC<ConfigProviderProps> & {
|
|
|
63
63
|
config: typeof AntConfigProvider.config;
|
|
64
64
|
useConfig: typeof AntConfigProvider.useConfig;
|
|
65
65
|
};
|
|
66
|
+
/**
|
|
67
|
+
* 按 locale 合并主题补丁:Cn 正文/表内字号、英文 Table 内嵌控件与分页对齐(`localeEnEmbeddedControls`)。
|
|
68
|
+
* 供单测与 ConfigProvider 共用。
|
|
69
|
+
*/
|
|
70
|
+
export declare function getLocaleFontSizeThemePatch(mergedLocale: Locale, mergedTheme: ThemeConfig, resolvedFontSize: number | undefined): ThemeConfig;
|
|
66
71
|
declare const ConfigProvider: ConfigProviderType;
|
|
67
72
|
export default ConfigProvider;
|
|
@@ -3,8 +3,11 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
var _exportNames = {
|
|
6
|
+
var _exportNames = {
|
|
7
|
+
getLocaleFontSizeThemePatch: true
|
|
8
|
+
};
|
|
7
9
|
exports.default = void 0;
|
|
10
|
+
exports.getLocaleFontSizeThemePatch = getLocaleFontSizeThemePatch;
|
|
8
11
|
var _react = _interopRequireDefault(require("react"));
|
|
9
12
|
var _antd = require("antd");
|
|
10
13
|
var _cssinjs = require("@ant-design/cssinjs");
|
|
@@ -90,6 +93,7 @@ const ExtendedConfigContext = /*#__PURE__*/_react.default.createContext({
|
|
|
90
93
|
hideOnSinglePage: false,
|
|
91
94
|
injectStaticFunction: true
|
|
92
95
|
});
|
|
96
|
+
/** `en` / `en-gb` → `tokenValueEn`(与 `fontFamilyEn` 等一致)。 */
|
|
93
97
|
const getLocaleTokenValue = (mergedThemeToken, locale, tokenKey, tokenValue, tokenValueEn) => {
|
|
94
98
|
return tokenValue !== mergedThemeToken[tokenKey] ? {
|
|
95
99
|
[tokenKey]: tokenValue
|
|
@@ -97,6 +101,49 @@ const getLocaleTokenValue = (mergedThemeToken, locale, tokenKey, tokenValue, tok
|
|
|
97
101
|
[tokenKey]: tokenValueEn
|
|
98
102
|
} : {};
|
|
99
103
|
};
|
|
104
|
+
|
|
105
|
+
/** Cn(zh/ja/ko)且仍为拉丁基线 `tokenValueEn` 时 → `tokenValueCn`,结构上与 {@link getLocaleTokenValue} 对称。 */
|
|
106
|
+
const getLocaleTokenValueCn = (mergedThemeToken, locale, tokenKey, tokenValue, tokenValueEn, tokenValueCn) => {
|
|
107
|
+
return tokenValue !== mergedThemeToken[tokenKey] ? {
|
|
108
|
+
[tokenKey]: tokenValue
|
|
109
|
+
} : (0, _default2.isCnLikeLocale)(locale.locale) && (tokenValue === undefined || tokenValue === tokenValueEn) ? {
|
|
110
|
+
[tokenKey]: tokenValueCn
|
|
111
|
+
} : {};
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* 按 locale 合并主题补丁:Cn 正文/表内字号、英文 Table 内嵌控件与分页对齐(`localeEnEmbeddedControls`)。
|
|
116
|
+
* 供单测与 ConfigProvider 共用。
|
|
117
|
+
*/
|
|
118
|
+
function getLocaleFontSizeThemePatch(mergedLocale, mergedTheme, resolvedFontSize) {
|
|
119
|
+
const tokenPatch = getLocaleTokenValueCn(mergedTheme.token ?? {}, mergedLocale, 'fontSize', resolvedFontSize, _default2.fontSizeEn, _default2.fontSizeCn);
|
|
120
|
+
const patch = {};
|
|
121
|
+
if ('fontSize' in tokenPatch && tokenPatch.fontSize !== undefined) {
|
|
122
|
+
patch.token = {
|
|
123
|
+
fontSize: tokenPatch.fontSize,
|
|
124
|
+
lineHeight: _default2.lineHeightCn,
|
|
125
|
+
fontHeight: _default2.fontHeightCn
|
|
126
|
+
};
|
|
127
|
+
}
|
|
128
|
+
const tablePatch = {};
|
|
129
|
+
const cellFs = mergedTheme.components?.Table?.cellFontSize;
|
|
130
|
+
if ((cellFs === undefined || cellFs === _default2.tableCellFontSizeEn) && (0, _default2.isCnLikeLocale)(mergedLocale.locale)) {
|
|
131
|
+
Object.assign(tablePatch, {
|
|
132
|
+
cellFontSize: _default2.fontSizeCn
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
if ((0, _default2.isEnLikeLocale)(mergedLocale.locale)) {
|
|
136
|
+
Object.assign(tablePatch, {
|
|
137
|
+
localeEnEmbeddedControls: true
|
|
138
|
+
});
|
|
139
|
+
}
|
|
140
|
+
if (Object.keys(tablePatch).length > 0) {
|
|
141
|
+
patch.components = {
|
|
142
|
+
Table: tablePatch
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
return patch;
|
|
146
|
+
}
|
|
100
147
|
const ConfigProvider = ({
|
|
101
148
|
children,
|
|
102
149
|
theme,
|
|
@@ -142,6 +189,7 @@ const ConfigProvider = ({
|
|
|
142
189
|
token
|
|
143
190
|
} = _theme.default.useToken();
|
|
144
191
|
const fontFamily = mergedTheme.token?.fontFamily || token.fontFamily;
|
|
192
|
+
const fontSize = mergedTheme.token?.fontSize ?? token.fontSize;
|
|
145
193
|
const fontWeightWeak = mergedTheme.token?.fontWeightWeak || token.fontWeightWeak;
|
|
146
194
|
const fontWeight = mergedTheme.token?.fontWeight || token.fontWeight;
|
|
147
195
|
const fontWeightStrong = mergedTheme.token?.fontWeightStrong || token.fontWeightStrong;
|
|
@@ -186,7 +234,7 @@ const ConfigProvider = ({
|
|
|
186
234
|
}
|
|
187
235
|
}, parentContext.table, table),
|
|
188
236
|
tabs: (0, _lodash.merge)({}, parentContext.tabs, tabs),
|
|
189
|
-
theme: (0, _lodash.merge)({}, mergedTheme, {
|
|
237
|
+
theme: (0, _lodash.merge)({}, mergedTheme, getLocaleFontSizeThemePatch(mergedLocale, mergedTheme, fontSize), {
|
|
190
238
|
token: {
|
|
191
239
|
...getLocaleTokenValue(mergedTheme.token || {}, mergedLocale, 'fontFamily', fontFamily, _default2.fontFamilyEn),
|
|
192
240
|
...getLocaleTokenValue(mergedTheme.token || {}, mergedLocale, 'fontWeightWeak', fontWeightWeak, _default2.fontWeightWeakEn),
|
|
@@ -3,19 +3,19 @@ import type { DescriptionsItemType } from '..';
|
|
|
3
3
|
export default function useItems(items?: DescriptionsItemType[], children?: React.ReactNode, bordered?: boolean): {
|
|
4
4
|
children: string | number | boolean | Iterable<React.ReactNode> | import("@emotion/react/jsx-runtime").JSX.Element;
|
|
5
5
|
key?: React.Key;
|
|
6
|
+
className?: string;
|
|
6
7
|
label?: React.ReactNode;
|
|
7
8
|
span?: number | "filled" | {
|
|
8
|
-
xs?: number;
|
|
9
|
-
sm?: number;
|
|
10
|
-
md?: number;
|
|
11
|
-
lg?: number;
|
|
12
|
-
xl?: number;
|
|
13
9
|
xxl?: number;
|
|
10
|
+
xl?: number;
|
|
11
|
+
lg?: number;
|
|
12
|
+
md?: number;
|
|
13
|
+
sm?: number;
|
|
14
|
+
xs?: number;
|
|
14
15
|
};
|
|
15
16
|
style?: React.CSSProperties;
|
|
16
17
|
classNames?: Partial<Record<"label" | "content", string>>;
|
|
17
18
|
styles?: Partial<Record<"label" | "content", React.CSSProperties>>;
|
|
18
|
-
className?: string;
|
|
19
19
|
labelStyle?: React.CSSProperties;
|
|
20
20
|
contentStyle?: React.CSSProperties;
|
|
21
21
|
}[];
|