@oceanbase/ui 0.2.33 → 0.2.34
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.d.ts +1 -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.d.ts +1 -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 +5 -5
package/es/Highlight/index.d.ts
CHANGED
|
@@ -29,7 +29,7 @@ export declare const THEME_DARK = "dark";
|
|
|
29
29
|
export declare const THEME_LIGHT = "light";
|
|
30
30
|
declare const ThemeTypes: ["dark", "light"];
|
|
31
31
|
export type ThemeType = (typeof ThemeTypes)[number];
|
|
32
|
-
declare const supportedLanguages: ("ruby" | "css" | "
|
|
32
|
+
declare const supportedLanguages: ("ruby" | "css" | "json" | "sql" | "tsx" | "javascript" | "typescript" | "groovy" | "java" | "python" | "bash" | "cpp" | "http" | "markdown" | "nginx" | "xml" | "dockerfile" | "go" | "yaml" | "solidity" | "jsx")[];
|
|
33
33
|
export type LanguageType = (typeof supportedLanguages)[number] | 'html';
|
|
34
34
|
export interface HighlightProps extends LocaleWrapperProps {
|
|
35
35
|
/**
|
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.d.ts
CHANGED
|
@@ -29,7 +29,7 @@ export declare const THEME_DARK = "dark";
|
|
|
29
29
|
export declare const THEME_LIGHT = "light";
|
|
30
30
|
declare const ThemeTypes: ["dark", "light"];
|
|
31
31
|
export type ThemeType = (typeof ThemeTypes)[number];
|
|
32
|
-
declare const supportedLanguages: ("ruby" | "css" | "
|
|
32
|
+
declare const supportedLanguages: ("ruby" | "css" | "json" | "sql" | "tsx" | "javascript" | "typescript" | "groovy" | "java" | "python" | "bash" | "cpp" | "http" | "markdown" | "nginx" | "xml" | "dockerfile" | "go" | "yaml" | "solidity" | "jsx")[];
|
|
33
33
|
export type LanguageType = (typeof supportedLanguages)[number] | 'html';
|
|
34
34
|
export interface HighlightProps extends LocaleWrapperProps {
|
|
35
35
|
/**
|
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.34",
|
|
4
4
|
"description": "The UI library based on OceanBase Design",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"oceanbase",
|
|
@@ -35,9 +35,9 @@
|
|
|
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.
|
|
38
|
+
"@ant-design/pro-components": "^2.6.43",
|
|
39
|
+
"@ant-design/pro-layout": "^7.17.16",
|
|
40
|
+
"@oceanbase/design": "^0.2.33",
|
|
41
41
|
"@oceanbase/icons": "^0.2.9",
|
|
42
42
|
"@oceanbase/util": "^0.2.12",
|
|
43
43
|
"ahooks": "^2.10.14",
|
|
@@ -65,5 +65,5 @@
|
|
|
65
65
|
"react": ">=16.9.0",
|
|
66
66
|
"react-dom": ">=16.9.0"
|
|
67
67
|
},
|
|
68
|
-
"gitHead": "
|
|
68
|
+
"gitHead": "c03648d49a5b31ea30f114fb47c44d6184931bde"
|
|
69
69
|
}
|