@oceanbase/design 0.2.22 → 0.2.23
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/style/index.js +1 -1
- package/es/table/style/index.js +11 -7
- package/lib/alert/style/index.js +1 -1
- package/lib/table/style/index.js +15 -0
- package/package.json +2 -2
package/es/alert/style/index.js
CHANGED
|
@@ -58,7 +58,7 @@ export var genAlertStyle = function genAlertStyle(token) {
|
|
|
58
58
|
var height = token.fontSize * token.lineHeight;
|
|
59
59
|
return _ref2 = {}, _defineProperty(_ref2, "".concat(componentCls), (_$concat2 = {
|
|
60
60
|
// vertical align to flex-start
|
|
61
|
-
alignItems: 'flex-start'
|
|
61
|
+
alignItems: 'flex-start !important'
|
|
62
62
|
}, _defineProperty(_$concat2, "".concat(componentCls, "-icon"), {
|
|
63
63
|
height: height
|
|
64
64
|
}), _defineProperty(_$concat2, "".concat(componentCls, "-close-icon"), {
|
package/es/table/style/index.js
CHANGED
|
@@ -4,7 +4,7 @@ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _ty
|
|
|
4
4
|
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
5
5
|
import { genComponentStyleHook } from "../../_util/genComponentStyleHook";
|
|
6
6
|
export var genTableStyle = function genTableStyle(token) {
|
|
7
|
-
var _$concat, _trTd$concat$co, _$concat4, _$concat$concat, _$
|
|
7
|
+
var _$concat, _trTd$concat$co, _$concat4, _$concat$concat, _$concat5, _$concat8, _trNthChild2nNot, _$concat$concat4, _$concat15, _ref;
|
|
8
8
|
var antCls = token.antCls,
|
|
9
9
|
componentCls = token.componentCls,
|
|
10
10
|
colorTextBase = token.colorTextBase,
|
|
@@ -65,11 +65,15 @@ export var genTableStyle = function genTableStyle(token) {
|
|
|
65
65
|
backgroundColor: "".concat(colorFillQuaternary, " !important")
|
|
66
66
|
}), _defineProperty(_trTd$concat$co, "".concat(componentCls, "-tbody > tr:last-child"), _defineProperty({}, 'td:first-child, td:last-child', {
|
|
67
67
|
borderRadius: borderRadiusLG
|
|
68
|
-
})), _trTd$concat$co)), _$concat4)), _$concat$concat)), _defineProperty(_ref, "".concat(componentCls, "-wrapper"), (_$
|
|
68
|
+
})), _trTd$concat$co)), _$concat4)), _$concat$concat)), _defineProperty(_ref, "".concat(componentCls, "-wrapper ").concat(componentCls).concat(componentCls, "-scroll-horizontal, ").concat(componentCls, "-wrapper ").concat(componentCls).concat(componentCls, "-fixed-header"), _defineProperty({}, "".concat(componentCls, "-tbody"), (_$concat5 = {}, _defineProperty(_$concat5, "tr:nth-child(2n + 1):not(".concat(componentCls, "-placeholder):not(").concat(componentCls, "-row-selected):not(").concat(antCls, "-descriptions-row) > td"), {
|
|
69
|
+
backgroundColor: colorFillQuaternary
|
|
70
|
+
}), _defineProperty(_$concat5, "tr:nth-child(2n):not(".concat(componentCls, "-placeholder):not(").concat(componentCls, "-row-selected):not(").concat(componentCls, "-expanded-row):not(").concat(antCls, "-descriptions-row) > td"), {
|
|
71
|
+
backgroundColor: colorBgBase
|
|
72
|
+
}), _$concat5))), _defineProperty(_ref, "".concat(componentCls, "-wrapper"), (_$concat8 = {}, _defineProperty(_$concat8, "".concat(componentCls, ":not(").concat(componentCls, "-middle):not(").concat(componentCls, "-small)"), _defineProperty({}, "".concat(componentCls, "-thead > tr"), _defineProperty({}, 'td, th', {
|
|
69
73
|
padding: largeCellPadding
|
|
70
|
-
}))), _defineProperty(_$
|
|
74
|
+
}))), _defineProperty(_$concat8, "".concat(componentCls, "-tbody"), _defineProperty({}, "tr:not(".concat(componentCls, "-measure-row) > td"), {
|
|
71
75
|
padding: largeCellPadding
|
|
72
|
-
})), _$
|
|
76
|
+
})), _$concat8)), _defineProperty(_ref, "".concat(componentCls, "-wrapper:not(").concat(componentCls, "-expandable)"), _defineProperty({}, "".concat(componentCls, ":not(").concat(componentCls, "-bordered)"), _defineProperty({}, "".concat(componentCls, "-tbody"), _defineProperty({}, "tr:not(".concat(componentCls, "-measure-row) > td"), {
|
|
73
77
|
border: 'none'
|
|
74
78
|
})))), _defineProperty(_ref, "".concat(componentCls, "-wrapper").concat(componentCls, "-expandable"), (_$concat$concat4 = {}, _defineProperty(_$concat$concat4, "".concat(componentCls), _defineProperty({}, "".concat(componentCls, "-tbody"), _defineProperty({}, "tr:nth-child(2n):not(".concat(componentCls, "-placeholder):not(").concat(componentCls, "-row-selected):not(").concat(componentCls, "-expanded-row)"), (_trNthChild2nNot = {}, _defineProperty(_trNthChild2nNot, '& > td', {
|
|
75
79
|
backgroundColor: colorBgBase
|
|
@@ -79,11 +83,11 @@ export var genTableStyle = function genTableStyle(token) {
|
|
|
79
83
|
}
|
|
80
84
|
}), _trNthChild2nNot)))), _defineProperty(_$concat$concat4, "".concat(componentCls, "-pagination"), _defineProperty({}, "&".concat(antCls, "-pagination"), {
|
|
81
85
|
borderTop: 'none'
|
|
82
|
-
})), _$concat$concat4)), _defineProperty(_ref, "".concat(componentCls, "-wrapper"), _defineProperty({}, "".concat(componentCls, "-pagination"), (_$
|
|
86
|
+
})), _$concat$concat4)), _defineProperty(_ref, "".concat(componentCls, "-wrapper"), _defineProperty({}, "".concat(componentCls, "-pagination"), (_$concat15 = {}, _defineProperty(_$concat15, "&".concat(antCls, "-pagination"), {
|
|
83
87
|
padding: "".concat(padding, "px 0"),
|
|
84
88
|
margin: '0 !important',
|
|
85
89
|
borderTop: "1px solid ".concat(colorBorderSecondary)
|
|
86
|
-
}), _defineProperty(_$
|
|
90
|
+
}), _defineProperty(_$concat15, "".concat(componentCls, "-batch-operation-bar"), _defineProperty({
|
|
87
91
|
position: 'absolute',
|
|
88
92
|
left: 0,
|
|
89
93
|
display: 'inline-block',
|
|
@@ -94,7 +98,7 @@ export var genTableStyle = function genTableStyle(token) {
|
|
|
94
98
|
}, "".concat(componentCls, "-batch-operation-selection-count"), {
|
|
95
99
|
margin: "0 ".concat(marginXS, "px"),
|
|
96
100
|
color: colorLink
|
|
97
|
-
}))), _$
|
|
101
|
+
}))), _$concat15))), _defineProperty(_ref, "".concat(antCls, "-popover").concat(componentCls, "-batch-operation-selection-popover"), _defineProperty({}, "".concat(antCls, "-popover-inner"), {
|
|
98
102
|
padding: 0
|
|
99
103
|
})), _ref;
|
|
100
104
|
};
|
package/lib/alert/style/index.js
CHANGED
package/lib/table/style/index.js
CHANGED
|
@@ -121,6 +121,21 @@ var genTableStyle = (token) => {
|
|
|
121
121
|
}
|
|
122
122
|
}
|
|
123
123
|
},
|
|
124
|
+
// 滚动表格样式
|
|
125
|
+
// 由于滚动表格会在 tbody 下最前面多一个 tr 元素,因此需要设置相反的斑马条样式
|
|
126
|
+
// .ant-table-scroll-horizontal: 水平滚动
|
|
127
|
+
// .ant-table-fixed-header: 垂直滚动
|
|
128
|
+
[`${componentCls}-wrapper ${componentCls}${componentCls}-scroll-horizontal, ${componentCls}-wrapper ${componentCls}${componentCls}-fixed-header`]: {
|
|
129
|
+
[`${componentCls}-tbody`]: {
|
|
130
|
+
// 斑马纹样式
|
|
131
|
+
[`tr:nth-child(2n + 1):not(${componentCls}-placeholder):not(${componentCls}-row-selected):not(${antCls}-descriptions-row) > td`]: {
|
|
132
|
+
backgroundColor: colorFillQuaternary
|
|
133
|
+
},
|
|
134
|
+
[`tr:nth-child(2n):not(${componentCls}-placeholder):not(${componentCls}-row-selected):not(${componentCls}-expanded-row):not(${antCls}-descriptions-row) > td`]: {
|
|
135
|
+
backgroundColor: colorBgBase
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
},
|
|
124
139
|
// large 表格样式
|
|
125
140
|
[`${componentCls}-wrapper`]: {
|
|
126
141
|
[`${componentCls}:not(${componentCls}-middle):not(${componentCls}-small)`]: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oceanbase/design",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.23",
|
|
4
4
|
"description": "The Design System of OceanBase",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"oceanbase",
|
|
@@ -56,5 +56,5 @@
|
|
|
56
56
|
"react": ">=16.9.0",
|
|
57
57
|
"react-dom": ">=16.9.0"
|
|
58
58
|
},
|
|
59
|
-
"gitHead": "
|
|
59
|
+
"gitHead": "1138341df7a35d3d4939ccea79225ddf220de2cc"
|
|
60
60
|
}
|