@oceanbase/ui 0.2.33 → 0.2.35
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/ui.min.js +1 -1
- package/es/Highlight/index.js +3 -2
- package/es/Highlight/locale/en-US.d.ts +3 -1
- package/es/Highlight/locale/en-US.js +3 -1
- package/es/Highlight/locale/zh-CN.d.ts +3 -1
- package/es/Highlight/locale/zh-CN.js +3 -1
- package/es/Highlight/locale/zh-TW.d.ts +3 -1
- package/es/Highlight/locale/zh-TW.js +3 -1
- package/es/IconFont/index.d.ts +3 -0
- package/es/IconFont/index.js +4 -11
- package/es/TagSelect/style/index.js +9 -5
- package/lib/Highlight/index.js +3 -2
- package/lib/Highlight/locale/en-US.d.ts +3 -1
- package/lib/Highlight/locale/en-US.js +3 -1
- package/lib/Highlight/locale/zh-CN.d.ts +3 -1
- package/lib/Highlight/locale/zh-CN.js +3 -1
- package/lib/Highlight/locale/zh-TW.d.ts +3 -1
- package/lib/Highlight/locale/zh-TW.js +3 -1
- package/lib/IconFont/index.d.ts +3 -0
- package/lib/IconFont/index.js +1 -41
- package/lib/TagSelect/style/index.js +11 -6
- package/package.json +9 -9
package/es/Highlight/index.js
CHANGED
|
@@ -111,7 +111,8 @@ var Highlight = function Highlight(props) {
|
|
|
111
111
|
theme = _props$theme === void 0 ? THEME_LIGHT : _props$theme,
|
|
112
112
|
_props$onCopyChange = props.onCopyChange,
|
|
113
113
|
onCopyChange = _props$onCopyChange === void 0 ? function () {} : _props$onCopyChange,
|
|
114
|
-
language = props.language
|
|
114
|
+
language = props.language,
|
|
115
|
+
locale = props.locale;
|
|
115
116
|
var prefixCls = getPrefix('highlight');
|
|
116
117
|
var themeClass = theme === THEME_DARK ? "".concat(prefixCls, "-dark") : "".concat(prefixCls, "-light");
|
|
117
118
|
var codeRef = /*#__PURE__*/React.createRef();
|
|
@@ -203,7 +204,7 @@ var Highlight = function Highlight(props) {
|
|
|
203
204
|
onCopy: function onCopy(value) {
|
|
204
205
|
onCopyChange(value);
|
|
205
206
|
setCopied(true);
|
|
206
|
-
message.success(
|
|
207
|
+
message.success(locale.copied);
|
|
207
208
|
var tempCopyId = window.setTimeout(function () {
|
|
208
209
|
setCopied(false);
|
|
209
210
|
}, 2000);
|
package/es/IconFont/index.d.ts
CHANGED
|
@@ -5,5 +5,8 @@ export interface IconFontProps {
|
|
|
5
5
|
className?: string;
|
|
6
6
|
style?: React.CSSProperties;
|
|
7
7
|
}
|
|
8
|
+
/**
|
|
9
|
+
* @deprecated Please use `@oceanbase/icons` instead.
|
|
10
|
+
*/
|
|
8
11
|
declare const IconFont: (props: IconFontProps) => import("@emotion/react/types/jsx-namespace").EmotionJSX.Element;
|
|
9
12
|
export default IconFont;
|
package/es/IconFont/index.js
CHANGED
|
@@ -7,24 +7,17 @@ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _ty
|
|
|
7
7
|
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); }
|
|
8
8
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
9
9
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
10
|
-
import { createFromIconfontCN } from '@oceanbase/icons';
|
|
11
10
|
import React from 'react';
|
|
12
11
|
import "./font/iconfont.css";
|
|
13
12
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
});
|
|
18
|
-
var iconfontList = ['backup', 'backup-colored', 'cluster', 'cluster-colored', 'data-source', 'data-source-colored', 'docs', 'diagnosis', 'diagnosis-colored', 'host', 'host-colored', 'log', 'log-colored', 'migration', 'migration-colored', 'monitor', 'monitor-colored', 'notification', 'obproxy', 'obproxy-colored', 'package', 'package-colored', 'overview', 'overview-colored', 'property', 'property-colored', 'tenant', 'tenant-colored', 'sync', 'sync-colored', 'system', 'system-colored', 'user'];
|
|
13
|
+
/**
|
|
14
|
+
* @deprecated Please use `@oceanbase/icons` instead.
|
|
15
|
+
*/
|
|
19
16
|
var IconFont = function IconFont(props) {
|
|
20
17
|
var type = props.type,
|
|
21
18
|
className = props.className,
|
|
22
19
|
restProps = _objectWithoutProperties(props, _excluded);
|
|
23
|
-
|
|
24
|
-
return iconfontList.includes(type) ? /*#__PURE__*/_jsx(CustomIcon, _objectSpread({
|
|
25
|
-
type: type,
|
|
26
|
-
className: className
|
|
27
|
-
}, restProps)) : /*#__PURE__*/_jsx("i", _objectSpread({
|
|
20
|
+
return /*#__PURE__*/_jsx("i", _objectSpread({
|
|
28
21
|
className: "iconfont ".concat(type, " ").concat(className)
|
|
29
22
|
}, restProps));
|
|
30
23
|
};
|
|
@@ -46,7 +46,7 @@ export var genTagSelectStyle = function genTagSelectStyle(token) {
|
|
|
46
46
|
position: 'relative',
|
|
47
47
|
display: 'inline-block',
|
|
48
48
|
fontSize: token.fontSize,
|
|
49
|
-
color: token.
|
|
49
|
+
color: token.colorText,
|
|
50
50
|
background: token.colorWhite,
|
|
51
51
|
border: "".concat(token.lineWidth, "px ").concat(token.lineType, " ").concat(token.colorBorder),
|
|
52
52
|
borderRadius: token.borderRadius,
|
|
@@ -76,8 +76,12 @@ export var genTagSelectStyle = function genTagSelectStyle(token) {
|
|
|
76
76
|
}
|
|
77
77
|
}), _defineProperty(_ref, "".concat(componentCls, "-large").concat(componentCls, "-img"), _objectSpread(_objectSpread({}, genImgCoverStyle('228px', '120px')), {}, {
|
|
78
78
|
marginRight: '16px'
|
|
79
|
-
})), _defineProperty(_ref, "".concat(componentCls, "-small").concat(componentCls, "-img"), genImgCoverStyle('76px', '32px')), _defineProperty(_ref, "".concat(componentCls, "-large"), genSizeStyle(token.paddingContentVerticalSM, token.fontSize)), _defineProperty(_ref, "".concat(componentCls, "-small"), genSizeStyle(0, token.fontSize)),
|
|
80
|
-
|
|
79
|
+
})), _defineProperty(_ref, "".concat(componentCls, "-small").concat(componentCls, "-img"), genImgCoverStyle('76px', '32px')), _defineProperty(_ref, "".concat(componentCls, "-large"), genSizeStyle(token.paddingContentVerticalSM, token.fontSize)), _defineProperty(_ref, "".concat(componentCls, "-small"), _objectSpread(_objectSpread({}, genSizeStyle(0, token.fontSize)), {}, {
|
|
80
|
+
paddingLeft: "".concat(token.paddingSM, "px"),
|
|
81
|
+
paddingRight: "".concat(token.paddingSM, "px")
|
|
82
|
+
})), _defineProperty(_ref, "".concat(componentCls, "-wrapper:not(").concat(componentCls, "-disabled):hover"), {
|
|
83
|
+
borderColor: token.colorPrimaryText,
|
|
84
|
+
color: token.colorPrimaryText
|
|
81
85
|
}), _defineProperty(_ref, "".concat(componentCls, "-checked"), genColoredStyle(token.blue, token.colorPrimaryBg, token.colorPrimaryText)), _defineProperty(_ref, "".concat(componentCls, "-wrapper:not(").concat(componentCls, "-disabled):active"), {
|
|
82
86
|
boxShadow: "0px 0px 3px ".concat(token.colorPrimary),
|
|
83
87
|
borderColor: "".concat(token.colorPrimary)
|
|
@@ -85,11 +89,11 @@ export var genTagSelectStyle = function genTagSelectStyle(token) {
|
|
|
85
89
|
'&:hover': _objectSpread(_objectSpread({}, genColoredStyle(token.colorInfoBorder, '#EBF1FF', token.colorInfoTextHover)), {}, _defineProperty({}, "".concat(componentCls, "-inner"), {
|
|
86
90
|
borderTopColor: "".concat(token.colorPrimaryTextHover, " !important")
|
|
87
91
|
}))
|
|
88
|
-
}), _defineProperty(_ref, "".concat(componentCls, "-disabled:not(").concat(componentCls, "-checked)"), _objectSpread(_objectSpread({}, genColoredStyle(token.colorBorder,
|
|
92
|
+
}), _defineProperty(_ref, "".concat(componentCls, "-disabled:not(").concat(componentCls, "-checked)"), _objectSpread(_objectSpread({}, genColoredStyle(token.colorBorder, token.colorFillContent, token.colorTextDisabled)), {}, {
|
|
89
93
|
cursor: 'not-allowed'
|
|
90
94
|
})), _defineProperty(_ref, "".concat(componentCls, "-disabled").concat(componentCls, "-checked"), _objectSpread({
|
|
91
95
|
cursor: 'not-allowed'
|
|
92
|
-
}, genColoredStyle(token.colorBorder,
|
|
96
|
+
}, genColoredStyle(token.colorBorder, token.colorFill, token.colorTextDisabled))), _defineProperty(_ref, "".concat(componentCls, "-checked").concat(componentCls, "-disabled.multiple"), _defineProperty({}, "".concat(componentCls, "-inner"), genMultipleStyle(token.colorTextDisabled, token))), _defineProperty(_ref, "".concat(componentCls, "-checked:not(").concat(componentCls, "-disabled).multiple"), _defineProperty({}, "".concat(componentCls, "-inner"), genMultipleStyle(token.colorPrimary, token))), _ref;
|
|
93
97
|
};
|
|
94
98
|
export default (function (prefixCls) {
|
|
95
99
|
var useStyle = genComponentStyleHook('TagSelect', function (token) {
|
package/lib/Highlight/index.js
CHANGED
|
@@ -114,7 +114,8 @@ var Highlight = (props) => {
|
|
|
114
114
|
theme = THEME_LIGHT,
|
|
115
115
|
onCopyChange = () => {
|
|
116
116
|
},
|
|
117
|
-
language
|
|
117
|
+
language,
|
|
118
|
+
locale
|
|
118
119
|
} = props;
|
|
119
120
|
const prefixCls = (0, import_util.getPrefix)("highlight");
|
|
120
121
|
const themeClass = theme === THEME_DARK ? `${prefixCls}-dark` : `${prefixCls}-light`;
|
|
@@ -184,7 +185,7 @@ var Highlight = (props) => {
|
|
|
184
185
|
onCopy: (value) => {
|
|
185
186
|
onCopyChange(value);
|
|
186
187
|
setCopied(true);
|
|
187
|
-
import_design2.message.success(
|
|
188
|
+
import_design2.message.success(locale.copied);
|
|
188
189
|
const tempCopyId = window.setTimeout(() => {
|
|
189
190
|
setCopied(false);
|
|
190
191
|
}, 2e3);
|
package/lib/IconFont/index.d.ts
CHANGED
|
@@ -5,5 +5,8 @@ export interface IconFontProps {
|
|
|
5
5
|
className?: string;
|
|
6
6
|
style?: React.CSSProperties;
|
|
7
7
|
}
|
|
8
|
+
/**
|
|
9
|
+
* @deprecated Please use `@oceanbase/icons` instead.
|
|
10
|
+
*/
|
|
8
11
|
declare const IconFont: (props: IconFontProps) => import("@emotion/react/types/jsx-namespace").EmotionJSX.Element;
|
|
9
12
|
export default IconFont;
|
package/lib/IconFont/index.js
CHANGED
|
@@ -32,50 +32,10 @@ __export(IconFont_exports, {
|
|
|
32
32
|
default: () => IconFont_default
|
|
33
33
|
});
|
|
34
34
|
module.exports = __toCommonJS(IconFont_exports);
|
|
35
|
-
var import_icons = require("@oceanbase/icons");
|
|
36
35
|
var import_react = __toESM(require("react"));
|
|
37
36
|
var import_iconfont = require("./font/iconfont.css");
|
|
38
|
-
var CustomIcon = (0, import_icons.createFromIconfontCN)({
|
|
39
|
-
// 在 iconfont.cn 上生成
|
|
40
|
-
scriptUrl: "//at.alicdn.com/t/a/font_3786261_ifhixq9j5c.js"
|
|
41
|
-
});
|
|
42
|
-
var iconfontList = [
|
|
43
|
-
"backup",
|
|
44
|
-
"backup-colored",
|
|
45
|
-
"cluster",
|
|
46
|
-
"cluster-colored",
|
|
47
|
-
"data-source",
|
|
48
|
-
"data-source-colored",
|
|
49
|
-
"docs",
|
|
50
|
-
"diagnosis",
|
|
51
|
-
"diagnosis-colored",
|
|
52
|
-
"host",
|
|
53
|
-
"host-colored",
|
|
54
|
-
"log",
|
|
55
|
-
"log-colored",
|
|
56
|
-
"migration",
|
|
57
|
-
"migration-colored",
|
|
58
|
-
"monitor",
|
|
59
|
-
"monitor-colored",
|
|
60
|
-
"notification",
|
|
61
|
-
"obproxy",
|
|
62
|
-
"obproxy-colored",
|
|
63
|
-
"package",
|
|
64
|
-
"package-colored",
|
|
65
|
-
"overview",
|
|
66
|
-
"overview-colored",
|
|
67
|
-
"property",
|
|
68
|
-
"property-colored",
|
|
69
|
-
"tenant",
|
|
70
|
-
"tenant-colored",
|
|
71
|
-
"sync",
|
|
72
|
-
"sync-colored",
|
|
73
|
-
"system",
|
|
74
|
-
"system-colored",
|
|
75
|
-
"user"
|
|
76
|
-
];
|
|
77
37
|
var IconFont = (props) => {
|
|
78
38
|
const { type, className, ...restProps } = props;
|
|
79
|
-
return
|
|
39
|
+
return /* @__PURE__ */ import_react.default.createElement("i", { className: `iconfont ${type} ${className}`, ...restProps });
|
|
80
40
|
};
|
|
81
41
|
var IconFont_default = IconFont;
|
|
@@ -66,7 +66,7 @@ var genTagSelectStyle = (token) => {
|
|
|
66
66
|
position: "relative",
|
|
67
67
|
display: "inline-block",
|
|
68
68
|
fontSize: token.fontSize,
|
|
69
|
-
color: token.
|
|
69
|
+
color: token.colorText,
|
|
70
70
|
background: token.colorWhite,
|
|
71
71
|
border: `${token.lineWidth}px ${token.lineType} ${token.colorBorder}`,
|
|
72
72
|
borderRadius: token.borderRadius,
|
|
@@ -106,9 +106,14 @@ var genTagSelectStyle = (token) => {
|
|
|
106
106
|
},
|
|
107
107
|
[`${componentCls}-small${componentCls}-img`]: genImgCoverStyle("76px", "32px"),
|
|
108
108
|
[`${componentCls}-large`]: genSizeStyle(token.paddingContentVerticalSM, token.fontSize),
|
|
109
|
-
[`${componentCls}-small`]:
|
|
109
|
+
[`${componentCls}-small`]: {
|
|
110
|
+
...genSizeStyle(0, token.fontSize),
|
|
111
|
+
paddingLeft: `${token.paddingSM}px`,
|
|
112
|
+
paddingRight: `${token.paddingSM}px`
|
|
113
|
+
},
|
|
110
114
|
[`${componentCls}-wrapper:not(${componentCls}-disabled):hover`]: {
|
|
111
|
-
borderColor: token.colorPrimaryText
|
|
115
|
+
borderColor: token.colorPrimaryText,
|
|
116
|
+
color: token.colorPrimaryText
|
|
112
117
|
},
|
|
113
118
|
[`${componentCls}-checked`]: genColoredStyle(
|
|
114
119
|
token.blue,
|
|
@@ -128,15 +133,15 @@ var genTagSelectStyle = (token) => {
|
|
|
128
133
|
}
|
|
129
134
|
},
|
|
130
135
|
[`${componentCls}-disabled:not(${componentCls}-checked)`]: {
|
|
131
|
-
...genColoredStyle(token.colorBorder,
|
|
136
|
+
...genColoredStyle(token.colorBorder, token.colorFillContent, token.colorTextDisabled),
|
|
132
137
|
cursor: "not-allowed"
|
|
133
138
|
},
|
|
134
139
|
[`${componentCls}-disabled${componentCls}-checked`]: {
|
|
135
140
|
cursor: "not-allowed",
|
|
136
|
-
...genColoredStyle(token.colorBorder,
|
|
141
|
+
...genColoredStyle(token.colorBorder, token.colorFill, token.colorTextDisabled)
|
|
137
142
|
},
|
|
138
143
|
[`${componentCls}-checked${componentCls}-disabled.multiple`]: {
|
|
139
|
-
[`${componentCls}-inner`]: genMultipleStyle(
|
|
144
|
+
[`${componentCls}-inner`]: genMultipleStyle(token.colorTextDisabled, token)
|
|
140
145
|
},
|
|
141
146
|
[`${componentCls}-checked:not(${componentCls}-disabled).multiple`]: {
|
|
142
147
|
[`${componentCls}-inner`]: genMultipleStyle(token.colorPrimary, token)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oceanbase/ui",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.35",
|
|
4
4
|
"description": "The UI library based on OceanBase Design",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"oceanbase",
|
|
@@ -35,20 +35,20 @@
|
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@ant-design/cssinjs": "^1.17.2",
|
|
38
|
-
"@ant-design/pro-components": "^2.6.
|
|
39
|
-
"@ant-design/pro-layout": "^7.17.
|
|
40
|
-
"@oceanbase/design": "^0.2.
|
|
41
|
-
"@oceanbase/icons": "^0.2.
|
|
42
|
-
"@oceanbase/util": "^0.2.
|
|
38
|
+
"@ant-design/pro-components": "^2.6.43",
|
|
39
|
+
"@ant-design/pro-layout": "^7.17.16",
|
|
40
|
+
"@oceanbase/design": "^0.2.34",
|
|
41
|
+
"@oceanbase/icons": "^0.2.10",
|
|
42
|
+
"@oceanbase/util": "^0.2.13",
|
|
43
43
|
"ahooks": "^2.10.14",
|
|
44
|
-
"classnames": "^2.
|
|
44
|
+
"classnames": "^2.5.1",
|
|
45
45
|
"dayjs": "^1.11.10",
|
|
46
46
|
"diff": "^5.1.0",
|
|
47
47
|
"highlight.js": "^11.9.0",
|
|
48
48
|
"highlightjs-solidity": "^2.0.6",
|
|
49
49
|
"hoist-non-react-statics": "^3.3.2",
|
|
50
50
|
"lodash": "^4.17.21",
|
|
51
|
-
"moment": "^2.
|
|
51
|
+
"moment": "^2.30.1",
|
|
52
52
|
"path-to-regexp": "^6.2.1",
|
|
53
53
|
"randexp": "^0.5.3",
|
|
54
54
|
"rc-util": "^5.38.1",
|
|
@@ -65,5 +65,5 @@
|
|
|
65
65
|
"react": ">=16.9.0",
|
|
66
66
|
"react-dom": ">=16.9.0"
|
|
67
67
|
},
|
|
68
|
-
"gitHead": "
|
|
68
|
+
"gitHead": "d99fa5230d5efc3645791b731734fc78eb126c2c"
|
|
69
69
|
}
|