@oceanbase/design 1.0.0-alpha.3 → 1.0.0-alpha.5
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/alert/index.d.ts +2 -2
- package/es/alert/index.js +16 -4
- package/es/alert/style/index.js +155 -60
- package/es/badge/index.js +2 -3
- package/es/badge/style/index.js +1 -3
- package/es/card/index.d.ts +4 -0
- package/es/card/index.js +64 -7
- package/es/card/style/index.js +36 -10
- package/es/checkbox/style/index.js +4 -2
- package/es/config-provider/index.d.ts +2 -2
- package/es/config-provider/index.js +26 -2
- package/es/descriptions/hooks/useItems.d.ts +6 -6
- package/es/descriptions/style/index.js +3 -2
- package/es/drawer/style/index.js +28 -8
- package/es/empty/style/index.js +6 -4
- package/es/form/FormItem.d.ts +1 -0
- package/es/form/FormItem.js +14 -4
- package/es/form/style/index.js +15 -3
- 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.js +64 -20
- package/es/radio/style/index.js +4 -2
- package/es/slider/style/index.js +7 -5
- package/es/spin/style/index.js +14 -11
- package/es/static-function/index.js +13 -4
- package/es/table/style/index.js +19 -19
- 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.js +8 -2
- package/es/theme/default.js +9 -3
- package/es/theme/style/compact.less +7 -7
- package/es/theme/style/default.less +7 -7
- package/es/typography/style/index.js +25 -20
- package/lib/alert/index.d.ts +2 -2
- package/lib/alert/index.js +13 -3
- package/lib/alert/style/index.js +171 -72
- package/lib/badge/index.js +2 -2
- package/lib/badge/style/index.js +1 -3
- package/lib/card/index.d.ts +4 -0
- package/lib/card/index.js +61 -4
- package/lib/card/style/index.js +58 -11
- package/lib/checkbox/style/index.js +3 -2
- package/lib/config-provider/index.d.ts +2 -2
- package/lib/config-provider/index.js +35 -2
- package/lib/descriptions/hooks/useItems.d.ts +6 -6
- package/lib/descriptions/style/index.js +2 -2
- package/lib/drawer/style/index.js +28 -6
- package/lib/empty/style/index.js +5 -4
- package/lib/form/FormItem.d.ts +1 -0
- package/lib/form/FormItem.js +10 -2
- package/lib/form/style/index.js +20 -1
- package/lib/input-number/index.d.ts +2 -1
- package/lib/locale/ja-JP.d.ts +3 -0
- package/lib/locale/ja-JP.js +60 -0
- package/lib/modal/Modal.js +26 -6
- package/lib/modal/style/index.js +78 -18
- package/lib/radio/style/index.js +3 -2
- package/lib/slider/style/index.js +6 -5
- package/lib/spin/style/index.js +12 -11
- package/lib/static-function/index.js +7 -1
- package/lib/table/style/index.js +19 -19
- package/lib/tabs/style/index.js +5 -0
- package/lib/tag/index.d.ts +1 -0
- package/lib/tag/index.js +3 -1
- package/lib/tag/style/index.js +8 -0
- package/lib/theme/default.js +9 -3
- package/lib/theme/style/compact.less +7 -7
- package/lib/theme/style/default.less +7 -7
- package/lib/typography/style/index.js +24 -20
- package/package.json +5 -6
package/lib/table/style/index.js
CHANGED
|
@@ -23,6 +23,7 @@ __export(style_exports, {
|
|
|
23
23
|
genTableStyle: () => genTableStyle
|
|
24
24
|
});
|
|
25
25
|
module.exports = __toCommonJS(style_exports);
|
|
26
|
+
var import_cssinjs = require("@ant-design/cssinjs");
|
|
26
27
|
var import_genComponentStyleHook = require("../../_util/genComponentStyleHook");
|
|
27
28
|
var genTableStyle = (token) => {
|
|
28
29
|
const {
|
|
@@ -38,7 +39,8 @@ var genTableStyle = (token) => {
|
|
|
38
39
|
colorBorderSecondary,
|
|
39
40
|
padding,
|
|
40
41
|
marginLG,
|
|
41
|
-
marginXS
|
|
42
|
+
marginXS,
|
|
43
|
+
calc
|
|
42
44
|
} = token;
|
|
43
45
|
return {
|
|
44
46
|
// 表格通用样式
|
|
@@ -53,9 +55,8 @@ var genTableStyle = (token) => {
|
|
|
53
55
|
// head 样式
|
|
54
56
|
[`${componentCls}-thead > tr`]: {
|
|
55
57
|
["th"]: {
|
|
56
|
-
// 弱化列标题
|
|
57
58
|
color: colorTextSecondary,
|
|
58
|
-
fontWeight:
|
|
59
|
+
fontWeight: token.fontWeight,
|
|
59
60
|
backgroundColor: colorBgBase
|
|
60
61
|
},
|
|
61
62
|
// 去掉排序列表头的灰色背景
|
|
@@ -93,7 +94,7 @@ var genTableStyle = (token) => {
|
|
|
93
94
|
// empty style
|
|
94
95
|
[`${componentCls}-placeholder td`]: {},
|
|
95
96
|
[`${componentCls}-empty-wrapper`]: {
|
|
96
|
-
minHeight: 360
|
|
97
|
+
minHeight: calc(360).sub(calc(token.paddingSM).mul(2).equal()).equal(),
|
|
97
98
|
display: "flex",
|
|
98
99
|
justifyContent: "center",
|
|
99
100
|
alignItems: "center"
|
|
@@ -123,7 +124,7 @@ var genTableStyle = (token) => {
|
|
|
123
124
|
[`${componentCls}-wrapper ${componentCls}${componentCls}-middle`]: {
|
|
124
125
|
[`${componentCls}-tbody`]: {
|
|
125
126
|
[`${componentCls}-empty-wrapper`]: {
|
|
126
|
-
minHeight: 260
|
|
127
|
+
minHeight: calc(260).sub(calc(token.paddingXS).mul(2).equal()).equal()
|
|
127
128
|
}
|
|
128
129
|
}
|
|
129
130
|
},
|
|
@@ -131,14 +132,14 @@ var genTableStyle = (token) => {
|
|
|
131
132
|
[`${componentCls}-wrapper ${componentCls}${componentCls}-small`]: {
|
|
132
133
|
[`${componentCls}-tbody`]: {
|
|
133
134
|
[`${componentCls}-empty-wrapper`]: {
|
|
134
|
-
minHeight: 160
|
|
135
|
+
minHeight: calc(160).sub(calc(token.paddingXXS).mul(2).equal()).equal()
|
|
135
136
|
}
|
|
136
137
|
}
|
|
137
138
|
},
|
|
138
139
|
// 带边框的表格样式
|
|
139
140
|
[`${componentCls}-wrapper ${componentCls}${componentCls}-bordered`]: {
|
|
140
141
|
[`${componentCls}-footer`]: {
|
|
141
|
-
borderRadius: `0px 0px ${token.borderRadiusLG}
|
|
142
|
+
borderRadius: `0px 0px ${(0, import_cssinjs.unit)(token.borderRadiusLG)} ${(0, import_cssinjs.unit)(token.borderRadiusLG)}`
|
|
142
143
|
}
|
|
143
144
|
},
|
|
144
145
|
// 带内部边框的表格样式
|
|
@@ -159,7 +160,6 @@ var genTableStyle = (token) => {
|
|
|
159
160
|
[`${componentCls}-thead, ${componentCls}-tbody`]: {
|
|
160
161
|
["td, th"]: {
|
|
161
162
|
[`&${componentCls}-row-expand-icon-cell`]: {
|
|
162
|
-
backgroundColor: colorBgBase,
|
|
163
163
|
// 设置 paddingRight 即可
|
|
164
164
|
paddingRight: token.paddingXS
|
|
165
165
|
},
|
|
@@ -202,15 +202,15 @@ var genTableStyle = (token) => {
|
|
|
202
202
|
[`${componentCls}-expanded-row > td`]: {
|
|
203
203
|
// 除内嵌子表格外,设置其他内嵌元素样式
|
|
204
204
|
[`& > *:not(${componentCls}-wrapper):not(${componentCls}-expanded-row-fixed)`]: {
|
|
205
|
-
marginLeft: token.marginXL
|
|
205
|
+
marginLeft: calc(token.marginXL).add(calc(token.lineWidth).mul(2).equal()).equal()
|
|
206
206
|
},
|
|
207
207
|
[`& > *${componentCls}-expanded-row-fixed`]: {
|
|
208
|
-
paddingLeft: token.marginXL
|
|
208
|
+
paddingLeft: calc(token.marginXL).add(calc(token.lineWidth).mul(2).equal()).add(token.padding).equal()
|
|
209
209
|
}
|
|
210
210
|
},
|
|
211
211
|
// 嵌套子表格和父表格第一列对齐
|
|
212
212
|
[`tr > td > ${componentCls}-wrapper:only-child ${componentCls}`]: {
|
|
213
|
-
marginLeft: token.margin
|
|
213
|
+
marginLeft: calc(token.margin).add(calc(token.lineWidth).mul(2).equal()).equal()
|
|
214
214
|
}
|
|
215
215
|
}
|
|
216
216
|
},
|
|
@@ -218,7 +218,7 @@ var genTableStyle = (token) => {
|
|
|
218
218
|
[`${componentCls}-tbody`]: {
|
|
219
219
|
// 嵌套子表格和父表格第一列对齐
|
|
220
220
|
[`tr > td > ${componentCls}-wrapper:only-child ${componentCls}`]: {
|
|
221
|
-
marginLeft: token.margin
|
|
221
|
+
marginLeft: calc(token.margin).add(calc(token.lineWidth).mul(2).equal()).add(token.margin).equal()
|
|
222
222
|
}
|
|
223
223
|
}
|
|
224
224
|
}
|
|
@@ -230,15 +230,15 @@ var genTableStyle = (token) => {
|
|
|
230
230
|
[`${componentCls}-expanded-row > td`]: {
|
|
231
231
|
// 除内嵌子表格外,设置其他内嵌元素样式
|
|
232
232
|
[`& > *:not(${componentCls}-wrapper):not(${componentCls}-expanded-row-fixed)`]: {
|
|
233
|
-
marginLeft: token.marginXL
|
|
233
|
+
marginLeft: calc(token.marginXL).add(token.marginXL).add(calc(token.lineWidth).mul(2).equal()).equal()
|
|
234
234
|
},
|
|
235
235
|
[`& > *${componentCls}-expanded-row-fixed`]: {
|
|
236
|
-
paddingLeft: token.marginXL
|
|
236
|
+
paddingLeft: calc(token.marginXL).add(token.marginXL).add(calc(token.lineWidth).mul(2).equal()).add(token.padding).equal()
|
|
237
237
|
}
|
|
238
238
|
},
|
|
239
239
|
// 嵌套子表格和父表格第一列对齐
|
|
240
240
|
[`tr > td > ${componentCls}-wrapper:only-child ${componentCls}`]: {
|
|
241
|
-
marginLeft: token.margin
|
|
241
|
+
marginLeft: calc(token.margin).add(token.marginXL).add(calc(token.lineWidth).mul(2).equal()).equal()
|
|
242
242
|
}
|
|
243
243
|
}
|
|
244
244
|
},
|
|
@@ -246,7 +246,7 @@ var genTableStyle = (token) => {
|
|
|
246
246
|
[`${componentCls}-tbody`]: {
|
|
247
247
|
// 嵌套子表格和父表格第一列对齐
|
|
248
248
|
[`tr > td > ${componentCls}-wrapper:only-child ${componentCls}`]: {
|
|
249
|
-
marginLeft: token.margin
|
|
249
|
+
marginLeft: calc(token.margin).add(token.marginXL).add(calc(token.lineWidth).mul(2).equal()).add(token.margin).equal()
|
|
250
250
|
}
|
|
251
251
|
}
|
|
252
252
|
}
|
|
@@ -264,7 +264,7 @@ var genTableStyle = (token) => {
|
|
|
264
264
|
[`${componentCls}-wrapper`]: {
|
|
265
265
|
[`${componentCls}-pagination`]: {
|
|
266
266
|
[`&${antCls}-pagination`]: {
|
|
267
|
-
padding: `${padding}
|
|
267
|
+
padding: `${(0, import_cssinjs.unit)(padding)} 0`,
|
|
268
268
|
margin: "0 !important"
|
|
269
269
|
},
|
|
270
270
|
// 批量操作栏样式
|
|
@@ -275,9 +275,9 @@ var genTableStyle = (token) => {
|
|
|
275
275
|
marginRight: marginLG,
|
|
276
276
|
[`${componentCls}-batch-operation-selection`]: {
|
|
277
277
|
color: colorTextSecondary,
|
|
278
|
-
fontWeight:
|
|
278
|
+
fontWeight: token.fontWeightStrong,
|
|
279
279
|
[`${componentCls}-batch-operation-selection-count`]: {
|
|
280
|
-
margin: `0 ${marginXS}
|
|
280
|
+
margin: `0 ${(0, import_cssinjs.unit)(marginXS)}`,
|
|
281
281
|
color: colorLink
|
|
282
282
|
}
|
|
283
283
|
}
|
package/lib/tabs/style/index.js
CHANGED
|
@@ -36,6 +36,11 @@ var genTabsStyle = (token) => {
|
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
38
|
},
|
|
39
|
+
[`&${componentCls}-left, &${componentCls}-right`]: {
|
|
40
|
+
[`${componentCls}-tab[data-node-key^=divider-]`]: {
|
|
41
|
+
paddingBlock: 0
|
|
42
|
+
}
|
|
43
|
+
},
|
|
39
44
|
[`${componentCls}-tab`]: {
|
|
40
45
|
/** @deprecated */
|
|
41
46
|
[`${componentCls}-tab-tag`]: {
|
package/lib/tag/index.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ import type { Ellipsis } from '../_util/getEllipsisConfig';
|
|
|
4
4
|
export * from 'antd/es/tag';
|
|
5
5
|
export interface TagProps extends AntTagProps {
|
|
6
6
|
ellipsis?: Ellipsis;
|
|
7
|
+
pill?: boolean;
|
|
7
8
|
}
|
|
8
9
|
declare const _default: React.ForwardRefExoticComponent<TagProps & React.RefAttributes<HTMLSpanElement>> & {
|
|
9
10
|
CheckableTag: React.ForwardRefExoticComponent<import("antd/es/tag").CheckableTagProps & React.RefAttributes<HTMLSpanElement>>;
|
package/lib/tag/index.js
CHANGED
|
@@ -53,6 +53,7 @@ var Tag = import_react.default.forwardRef(
|
|
|
53
53
|
title: children
|
|
54
54
|
}
|
|
55
55
|
},
|
|
56
|
+
pill,
|
|
56
57
|
...restProps
|
|
57
58
|
}, ref) => {
|
|
58
59
|
const { getPrefixCls } = (0, import_react.useContext)(import_config_provider.default.ConfigContext);
|
|
@@ -61,7 +62,8 @@ var Tag = import_react.default.forwardRef(
|
|
|
61
62
|
const ellipsisConfig = (0, import_getEllipsisConfig.getEllipsisConfig)(ellipsis, children);
|
|
62
63
|
const tagCls = (0, import_classnames.default)(
|
|
63
64
|
{
|
|
64
|
-
[`${prefixCls}-ellipsis`]: !!ellipsisConfig
|
|
65
|
+
[`${prefixCls}-ellipsis`]: !!ellipsisConfig,
|
|
66
|
+
[`${prefixCls}-pill`]: pill
|
|
65
67
|
},
|
|
66
68
|
className
|
|
67
69
|
);
|
package/lib/tag/style/index.js
CHANGED
|
@@ -44,6 +44,9 @@ var genTagStyle = (token) => {
|
|
|
44
44
|
[`${componentCls}`]: {
|
|
45
45
|
paddingInline: token.paddingXS,
|
|
46
46
|
fontSize: token.fontSizeSM,
|
|
47
|
+
[`&:not(${componentCls}-pill)`]: {
|
|
48
|
+
fontWeight: token.fontWeightStrong
|
|
49
|
+
},
|
|
47
50
|
[`${componentCls}-close-icon${iconCls}`]: {
|
|
48
51
|
marginInlineStart: token.marginXXS
|
|
49
52
|
},
|
|
@@ -66,6 +69,11 @@ var genTagStyle = (token) => {
|
|
|
66
69
|
},
|
|
67
70
|
["&-borderless"]: {
|
|
68
71
|
borderColor: "transparent"
|
|
72
|
+
},
|
|
73
|
+
["&-pill"]: {
|
|
74
|
+
borderRadius: 100,
|
|
75
|
+
lineHeight: token.lineHeight,
|
|
76
|
+
marginInlineEnd: token.marginXXS
|
|
69
77
|
}
|
|
70
78
|
}
|
|
71
79
|
};
|
package/lib/theme/default.js
CHANGED
|
@@ -35,8 +35,8 @@ var colorTextTertiary = "#8592AD";
|
|
|
35
35
|
var colorTextQuaternary = "#B6C0D4";
|
|
36
36
|
var colorFill = "#CDD5E4";
|
|
37
37
|
var colorFillSecondary = "#E2E8F3";
|
|
38
|
-
var colorFillTertiary = "#
|
|
39
|
-
var colorFillQuaternary = "#
|
|
38
|
+
var colorFillTertiary = "#EBEFF7";
|
|
39
|
+
var colorFillQuaternary = "#F5F7FC";
|
|
40
40
|
var colorBorderSecondary = colorFillSecondary;
|
|
41
41
|
var fontSizeSM = 12;
|
|
42
42
|
var tagColorBorder = colorTextQuaternary;
|
|
@@ -98,7 +98,7 @@ var defaultTheme = {
|
|
|
98
98
|
colorIcon: colorTextSecondary,
|
|
99
99
|
colorBgBase: "#ffffff",
|
|
100
100
|
colorBgContainer: "#ffffff",
|
|
101
|
-
colorBgLayout:
|
|
101
|
+
colorBgLayout: "#FBFCFE",
|
|
102
102
|
colorBorder: colorFill,
|
|
103
103
|
colorBorderSecondary,
|
|
104
104
|
colorFill,
|
|
@@ -117,6 +117,12 @@ var defaultTheme = {
|
|
|
117
117
|
lineWidthFocus: 0
|
|
118
118
|
},
|
|
119
119
|
components: {
|
|
120
|
+
Alert: {
|
|
121
|
+
borderRadiusLG: 6
|
|
122
|
+
},
|
|
123
|
+
Badge: {
|
|
124
|
+
statusSize: 8
|
|
125
|
+
},
|
|
120
126
|
Breadcrumb: {
|
|
121
127
|
fontSize: fontSizeSM,
|
|
122
128
|
fontHeight: 20,
|
|
@@ -310,12 +310,12 @@
|
|
|
310
310
|
@colorTextQuaternary: #b6c0d4;
|
|
311
311
|
@colorFill: #cdd5e4;
|
|
312
312
|
@colorFillSecondary: #e2e8f3;
|
|
313
|
-
@colorFillTertiary: #
|
|
314
|
-
@colorFillQuaternary: #
|
|
313
|
+
@colorFillTertiary: #ebeff7;
|
|
314
|
+
@colorFillQuaternary: #f5f7fc;
|
|
315
315
|
@colorBgSolid: rgb(0,0,0);
|
|
316
316
|
@colorBgSolidHover: rgba(0,0,0,0.75);
|
|
317
317
|
@colorBgSolidActive: rgba(0,0,0,0.95);
|
|
318
|
-
@colorBgLayout: #
|
|
318
|
+
@colorBgLayout: #fbfcfe;
|
|
319
319
|
@colorBgContainer: #ffffff;
|
|
320
320
|
@colorBgElevated: #ffffff;
|
|
321
321
|
@colorBgSpotlight: #ffffff;
|
|
@@ -421,14 +421,14 @@
|
|
|
421
421
|
@colorFuchsiaBg: #faf0fc;
|
|
422
422
|
@colorFuchsiaText: #580e67;
|
|
423
423
|
@colorIcon: #8592ad;
|
|
424
|
-
@colorBgContainerDisabled: #
|
|
424
|
+
@colorBgContainerDisabled: #ebeff7;
|
|
425
425
|
@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);
|
|
426
426
|
@boxShadowSecondary: 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);
|
|
427
427
|
@boxShadowTertiary: 0 1px 2px 0 rgba(54, 69, 99, 0.03), 0 1px 6px -1px rgba(54, 69, 99, 0.02), 0 2px 4px 0 rgba(54, 69, 99, 0.02);
|
|
428
428
|
@lineWidthFocus: 3px;
|
|
429
429
|
@colorFillContent: #e2e8f3;
|
|
430
430
|
@colorFillContentHover: #cdd5e4;
|
|
431
|
-
@colorFillAlter: #
|
|
431
|
+
@colorFillAlter: #f5f7fc;
|
|
432
432
|
@colorBorderBg: #ffffff;
|
|
433
433
|
@colorSplit: rgba(13,63,155,0.12);
|
|
434
434
|
@colorTextPlaceholder: #b6c0d4;
|
|
@@ -446,11 +446,11 @@
|
|
|
446
446
|
@fontSizeIcon: 12px;
|
|
447
447
|
@controlOutlineWidth: 2px;
|
|
448
448
|
@controlInteractiveSize: 14px;
|
|
449
|
-
@controlItemBgHover: #
|
|
449
|
+
@controlItemBgHover: #ebeff7;
|
|
450
450
|
@controlItemBgActive: #e6f4ff;
|
|
451
451
|
@controlItemBgActiveHover: #b0dbff;
|
|
452
452
|
@controlItemBgActiveDisabled: #cdd5e4;
|
|
453
|
-
@controlTmpOutline: #
|
|
453
|
+
@controlTmpOutline: #f5f7fc;
|
|
454
454
|
@controlOutline: rgba(5,145,255,0.1);
|
|
455
455
|
@opacityLoading: 0.65;
|
|
456
456
|
@linkDecoration: none;
|
|
@@ -310,12 +310,12 @@
|
|
|
310
310
|
@colorTextQuaternary: #b6c0d4;
|
|
311
311
|
@colorFill: #cdd5e4;
|
|
312
312
|
@colorFillSecondary: #e2e8f3;
|
|
313
|
-
@colorFillTertiary: #
|
|
314
|
-
@colorFillQuaternary: #
|
|
313
|
+
@colorFillTertiary: #ebeff7;
|
|
314
|
+
@colorFillQuaternary: #f5f7fc;
|
|
315
315
|
@colorBgSolid: rgb(0,0,0);
|
|
316
316
|
@colorBgSolidHover: rgba(0,0,0,0.75);
|
|
317
317
|
@colorBgSolidActive: rgba(0,0,0,0.95);
|
|
318
|
-
@colorBgLayout: #
|
|
318
|
+
@colorBgLayout: #fbfcfe;
|
|
319
319
|
@colorBgContainer: #ffffff;
|
|
320
320
|
@colorBgElevated: #ffffff;
|
|
321
321
|
@colorBgSpotlight: #ffffff;
|
|
@@ -421,14 +421,14 @@
|
|
|
421
421
|
@colorFuchsiaBg: #faf0fc;
|
|
422
422
|
@colorFuchsiaText: #580e67;
|
|
423
423
|
@colorIcon: #8592ad;
|
|
424
|
-
@colorBgContainerDisabled: #
|
|
424
|
+
@colorBgContainerDisabled: #ebeff7;
|
|
425
425
|
@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);
|
|
426
426
|
@boxShadowSecondary: 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);
|
|
427
427
|
@boxShadowTertiary: 0 1px 2px 0 rgba(54, 69, 99, 0.03), 0 1px 6px -1px rgba(54, 69, 99, 0.02), 0 2px 4px 0 rgba(54, 69, 99, 0.02);
|
|
428
428
|
@lineWidthFocus: 3px;
|
|
429
429
|
@colorFillContent: #e2e8f3;
|
|
430
430
|
@colorFillContentHover: #cdd5e4;
|
|
431
|
-
@colorFillAlter: #
|
|
431
|
+
@colorFillAlter: #f5f7fc;
|
|
432
432
|
@colorBorderBg: #ffffff;
|
|
433
433
|
@colorSplit: rgba(13,63,155,0.12);
|
|
434
434
|
@colorTextPlaceholder: #b6c0d4;
|
|
@@ -446,11 +446,11 @@
|
|
|
446
446
|
@fontSizeIcon: 12px;
|
|
447
447
|
@controlOutlineWidth: 2px;
|
|
448
448
|
@controlInteractiveSize: 14px;
|
|
449
|
-
@controlItemBgHover: #
|
|
449
|
+
@controlItemBgHover: #ebeff7;
|
|
450
450
|
@controlItemBgActive: #e6f4ff;
|
|
451
451
|
@controlItemBgActiveHover: #b0dbff;
|
|
452
452
|
@controlItemBgActiveDisabled: #cdd5e4;
|
|
453
|
-
@controlTmpOutline: #
|
|
453
|
+
@controlTmpOutline: #f5f7fc;
|
|
454
454
|
@controlOutline: rgba(5,145,255,0.1);
|
|
455
455
|
@opacityLoading: 0.65;
|
|
456
456
|
@linkDecoration: none;
|
|
@@ -23,10 +23,14 @@ __export(style_exports, {
|
|
|
23
23
|
genTypographyStyle: () => genTypographyStyle
|
|
24
24
|
});
|
|
25
25
|
module.exports = __toCommonJS(style_exports);
|
|
26
|
+
var import_cssinjs = require("@ant-design/cssinjs");
|
|
26
27
|
var import_genComponentStyleHook = require("../../_util/genComponentStyleHook");
|
|
27
28
|
var genTypographyStyle = (token) => {
|
|
28
|
-
const { componentCls, controlHeight, fontSize, lineHeight } = token;
|
|
29
|
-
const marginOffset = (controlHeight
|
|
29
|
+
const { componentCls, controlHeight, fontSize, lineHeight, calc } = token;
|
|
30
|
+
const marginOffset = calc(controlHeight).sub(calc(fontSize).mul(lineHeight).equal()).div(2).equal();
|
|
31
|
+
const paddingTop = calc(marginOffset).sub(token.lineWidth).equal();
|
|
32
|
+
const paddingInline = calc(token.paddingSM).sub(token.lineWidth).equal();
|
|
33
|
+
const negativeMarginOffset = calc(marginOffset).mul(-1).equal();
|
|
30
34
|
return {
|
|
31
35
|
// inherit color and lineHeight from parent instead of fixed colorText
|
|
32
36
|
[`${componentCls}`]: {
|
|
@@ -40,43 +44,43 @@ var genTypographyStyle = (token) => {
|
|
|
40
44
|
[`${componentCls}${componentCls}-editable-text:not(${componentCls}-edit-content)`]: {
|
|
41
45
|
"&:hover": {
|
|
42
46
|
background: token.colorBgContainer,
|
|
43
|
-
border: `${token.lineWidth}
|
|
47
|
+
border: `${(0, import_cssinjs.unit)(token.lineWidth)} ${token.lineType} ${token.colorBorder}`,
|
|
44
48
|
borderRadius: token.borderRadius,
|
|
45
49
|
position: "relative",
|
|
46
|
-
insetInlineStart:
|
|
47
|
-
padding: `${
|
|
50
|
+
insetInlineStart: calc(token.paddingSM).mul(-1).equal(),
|
|
51
|
+
padding: `${paddingTop} ${paddingInline}`
|
|
48
52
|
},
|
|
49
53
|
"div&:hover": {
|
|
50
54
|
height: token.controlHeight,
|
|
51
|
-
marginTop:
|
|
52
|
-
marginBottom:
|
|
55
|
+
marginTop: negativeMarginOffset,
|
|
56
|
+
marginBottom: calc("1em").sub(marginOffset).equal()
|
|
53
57
|
},
|
|
54
58
|
"span&:hover": {
|
|
55
59
|
display: "inline-block",
|
|
56
60
|
height: token.controlHeight,
|
|
57
|
-
marginTop:
|
|
58
|
-
marginBottom:
|
|
61
|
+
marginTop: negativeMarginOffset,
|
|
62
|
+
marginBottom: negativeMarginOffset
|
|
59
63
|
},
|
|
60
64
|
"h1&:hover, h2&:hover, h3&:hover, h4&:hover, h5&:hover": {
|
|
61
|
-
marginTop: `${
|
|
62
|
-
marginBottom: `${
|
|
65
|
+
marginTop: `${negativeMarginOffset} !important`,
|
|
66
|
+
marginBottom: `${negativeMarginOffset} !important`
|
|
63
67
|
}
|
|
64
68
|
},
|
|
65
69
|
[`${componentCls}${componentCls}-edit-content`]: {
|
|
66
70
|
[`${componentCls}-div&`]: {
|
|
67
|
-
insetInlineStart:
|
|
68
|
-
marginTop:
|
|
69
|
-
marginBottom:
|
|
71
|
+
insetInlineStart: calc(token.paddingSM).mul(-1).equal(),
|
|
72
|
+
marginTop: negativeMarginOffset,
|
|
73
|
+
marginBottom: calc("1em").sub(marginOffset).equal()
|
|
70
74
|
},
|
|
71
75
|
[`${componentCls}-span&`]: {
|
|
72
|
-
insetInlineStart:
|
|
73
|
-
marginTop:
|
|
74
|
-
marginBottom:
|
|
76
|
+
insetInlineStart: calc(token.paddingSM).mul(-1).equal(),
|
|
77
|
+
marginTop: negativeMarginOffset,
|
|
78
|
+
marginBottom: negativeMarginOffset
|
|
75
79
|
},
|
|
76
80
|
[`${componentCls}-h1&, ${componentCls}-h2&, ${componentCls}-h3&, ${componentCls}-h4&, ${componentCls}-h5&`]: {
|
|
77
|
-
insetInlineStart:
|
|
78
|
-
marginTop: `${
|
|
79
|
-
marginBottom: `${
|
|
81
|
+
insetInlineStart: calc(token.paddingSM).mul(-1).equal(),
|
|
82
|
+
marginTop: `${negativeMarginOffset} !important`,
|
|
83
|
+
marginBottom: `${negativeMarginOffset} !important`
|
|
80
84
|
}
|
|
81
85
|
}
|
|
82
86
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oceanbase/design",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.5",
|
|
4
4
|
"description": "The Design System of OceanBase",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"oceanbase",
|
|
@@ -31,7 +31,6 @@
|
|
|
31
31
|
"LICENSE"
|
|
32
32
|
],
|
|
33
33
|
"sideEffects": [
|
|
34
|
-
"**/*.less",
|
|
35
34
|
"**/*.css"
|
|
36
35
|
],
|
|
37
36
|
"scripts": {
|
|
@@ -43,9 +42,9 @@
|
|
|
43
42
|
"@inline-svg-unique-id/react": "^1.2.3",
|
|
44
43
|
"@oceanbase/aliyun-theme": "^0.1.6",
|
|
45
44
|
"@oceanbase/icons": "^1.0.0-alpha.0",
|
|
46
|
-
"@oceanbase/util": "^1.0.0-alpha.
|
|
45
|
+
"@oceanbase/util": "^1.0.0-alpha.2",
|
|
47
46
|
"ahooks": "^2.10.14",
|
|
48
|
-
"antd": "^5.
|
|
47
|
+
"antd": "^5.29.1",
|
|
49
48
|
"classnames": "^2.5.1",
|
|
50
49
|
"lodash": "^4.17.21",
|
|
51
50
|
"lottie-web": "^5.13.0",
|
|
@@ -55,7 +54,7 @@
|
|
|
55
54
|
"devDependencies": {
|
|
56
55
|
"@ant-design/cssinjs-utils": "^1.1.3",
|
|
57
56
|
"@babel/cli": "^7.28.3",
|
|
58
|
-
"@babel/preset-env": "^7.28.
|
|
57
|
+
"@babel/preset-env": "^7.28.5",
|
|
59
58
|
"antd-token-previewer": "^2.0.8",
|
|
60
59
|
"rc-select": "^14.16.8",
|
|
61
60
|
"rc-slider": "^11.1.9",
|
|
@@ -66,5 +65,5 @@
|
|
|
66
65
|
"react": ">=16.9.0",
|
|
67
66
|
"react-dom": ">=16.9.0"
|
|
68
67
|
},
|
|
69
|
-
"gitHead": "
|
|
68
|
+
"gitHead": "c716061dd0da7a44ab09515d43972d2212e59d0f"
|
|
70
69
|
}
|