@oceanbase/ui 0.2.27 → 0.2.29
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.css +1 -1
- package/dist/ui.min.js +1 -1
- package/es/ContentWithQuestion/index.d.ts +3 -3
- package/es/ContentWithQuestion/index.js +19 -16
- package/es/ContentWithQuestion/style/index.d.ts +8 -0
- package/es/ContentWithQuestion/style/index.js +28 -0
- package/es/Highlight/index.d.ts +1 -1
- package/es/Login/index.d.ts +1 -0
- package/es/Login/index.js +5 -17
- package/es/Login/index.less +44 -102
- package/es/PageContainer/style/index.js +20 -20
- package/es/TagSelect/style/index.js +5 -4
- package/lib/ContentWithQuestion/index.d.ts +3 -3
- package/lib/ContentWithQuestion/index.js +29 -24
- package/lib/ContentWithQuestion/style/index.d.ts +8 -0
- package/lib/ContentWithQuestion/style/index.js +57 -0
- package/lib/Highlight/index.d.ts +1 -1
- package/lib/Login/index.d.ts +1 -0
- package/lib/Login/index.js +3 -11
- package/lib/Login/index.less +44 -102
- package/lib/PageContainer/style/index.js +5 -5
- package/lib/TagSelect/style/index.js +4 -3
- package/package.json +4 -4
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// src/ContentWithQuestion/style/index.ts
|
|
20
|
+
var style_exports = {};
|
|
21
|
+
__export(style_exports, {
|
|
22
|
+
default: () => style_default,
|
|
23
|
+
genContentWithQuestionStyle: () => genContentWithQuestionStyle
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(style_exports);
|
|
26
|
+
var import_genComponentStyleHook = require("../../_util/genComponentStyleHook");
|
|
27
|
+
var genContentWithQuestionStyle = (token) => {
|
|
28
|
+
const { componentCls, paddingSM } = token;
|
|
29
|
+
return {
|
|
30
|
+
[`${componentCls}-item`]: {
|
|
31
|
+
display: "inline-flex",
|
|
32
|
+
alignItems: "center",
|
|
33
|
+
[`${componentCls}-prefix`]: {
|
|
34
|
+
marginRight: 8
|
|
35
|
+
},
|
|
36
|
+
[`${componentCls}-suffix`]: {
|
|
37
|
+
marginLeft: 8
|
|
38
|
+
},
|
|
39
|
+
[`${componentCls}-help`]: {
|
|
40
|
+
cursor: "help"
|
|
41
|
+
},
|
|
42
|
+
[`${componentCls}-color`]: {
|
|
43
|
+
color: "red"
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
var style_default = (prefixCls) => {
|
|
49
|
+
const useStyle = (0, import_genComponentStyleHook.genComponentStyleHook)("ContentWithQuestion", (token) => {
|
|
50
|
+
return [genContentWithQuestionStyle(token)];
|
|
51
|
+
});
|
|
52
|
+
return useStyle(prefixCls);
|
|
53
|
+
};
|
|
54
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
55
|
+
0 && (module.exports = {
|
|
56
|
+
genContentWithQuestionStyle
|
|
57
|
+
});
|
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" | "javascript" | "typescript" | "groovy" | "java" | "python" | "bash" | "json" | "cpp" | "http" | "markdown" | "nginx" | "sql" | "xml" | "dockerfile" | "go" | "yaml" | "solidity" | "tsx" | "jsx")[];
|
|
33
33
|
export type LanguageType = (typeof supportedLanguages)[number] | 'html';
|
|
34
34
|
export interface HighlightProps extends LocaleWrapperProps {
|
|
35
35
|
/**
|
package/lib/Login/index.d.ts
CHANGED
|
@@ -61,6 +61,7 @@ export interface LoginProps extends FormProps {
|
|
|
61
61
|
onShowRegisterChange?: (isShow: boolean) => void;
|
|
62
62
|
onShowActivateChange?: (isShow: boolean) => void;
|
|
63
63
|
onAuthCodeImgChange?: () => void;
|
|
64
|
+
isMobile?: boolean;
|
|
64
65
|
}
|
|
65
66
|
declare const _default: any;
|
|
66
67
|
export default _default;
|
package/lib/Login/index.js
CHANGED
|
@@ -37,7 +37,6 @@ var import_design = require("@oceanbase/design");
|
|
|
37
37
|
var import_design2 = require("@oceanbase/design");
|
|
38
38
|
var import_classnames = __toESM(require("classnames"));
|
|
39
39
|
var import_react = __toESM(require("react"));
|
|
40
|
-
var import_constant = require("../constant");
|
|
41
40
|
var import_LocaleWrapper = __toESM(require("../locale/LocaleWrapper"));
|
|
42
41
|
var import_util = require("../_util");
|
|
43
42
|
var import_ActivateForm = __toESM(require("./ActivateForm"));
|
|
@@ -69,6 +68,7 @@ var Login = (props) => {
|
|
|
69
68
|
showOtherLoginButton,
|
|
70
69
|
authCodeImg,
|
|
71
70
|
onAuthCodeImgChange,
|
|
71
|
+
isMobile,
|
|
72
72
|
style = {}
|
|
73
73
|
} = props;
|
|
74
74
|
const [showRegister, setShowRegister] = (0, import_ahooks.useControllableValue)(props, {
|
|
@@ -95,21 +95,13 @@ var Login = (props) => {
|
|
|
95
95
|
}
|
|
96
96
|
setShowActivate(!showActivate);
|
|
97
97
|
}, [showActivate, isLoading]);
|
|
98
|
-
const localeMenu = /* @__PURE__ */ import_react.default.createElement(
|
|
99
|
-
import_design.Menu,
|
|
100
|
-
{
|
|
101
|
-
onClick: ({ key }) => {
|
|
102
|
-
(0, import_util.setLocale)(key);
|
|
103
|
-
}
|
|
104
|
-
},
|
|
105
|
-
import_constant.LOCALE_LIST.filter((item) => !locales || locales.includes(item.value)).map((item) => /* @__PURE__ */ import_react.default.createElement(import_design.Menu.Item, { key: item.value }, item.label))
|
|
106
|
-
);
|
|
107
98
|
const showWaterMark = !showRegister;
|
|
108
99
|
return /* @__PURE__ */ import_react.default.createElement(import_design.App, null, /* @__PURE__ */ import_react.default.createElement(
|
|
109
100
|
"div",
|
|
110
101
|
{
|
|
111
102
|
className: (0, import_classnames.default)(`${prefix}-container`, {
|
|
112
|
-
[`${prefix}-container-with-board`]: board
|
|
103
|
+
[`${prefix}-container-with-board`]: board,
|
|
104
|
+
[`${prefix}-container-mobile`]: isMobile
|
|
113
105
|
}),
|
|
114
106
|
style
|
|
115
107
|
},
|
package/lib/Login/index.less
CHANGED
|
@@ -5,20 +5,19 @@
|
|
|
5
5
|
.@{prefix}-container {
|
|
6
6
|
display: flex;
|
|
7
7
|
justify-content: space-between;
|
|
8
|
-
min-width:
|
|
8
|
+
min-width: 960px;
|
|
9
9
|
height: 100vh;
|
|
10
10
|
min-height: 600px;
|
|
11
11
|
overflow: auto;
|
|
12
12
|
|
|
13
13
|
.@{prefix}-bg {
|
|
14
|
-
width:
|
|
15
|
-
min-width: 400px;
|
|
14
|
+
width: 40%;
|
|
16
15
|
height: 100%;
|
|
17
16
|
background-repeat: no-repeat;
|
|
18
17
|
background-size: cover;
|
|
19
18
|
|
|
20
19
|
.@{prefix}-info {
|
|
21
|
-
margin: 185px
|
|
20
|
+
margin: 185px 48px 0 48px;
|
|
22
21
|
color: #fff;
|
|
23
22
|
font-weight: 600;
|
|
24
23
|
font-size: 56px;
|
|
@@ -43,7 +42,7 @@
|
|
|
43
42
|
background-color: #fff;
|
|
44
43
|
|
|
45
44
|
.@{prefix}-locale {
|
|
46
|
-
position:
|
|
45
|
+
position: absolute;
|
|
47
46
|
top: 24px;
|
|
48
47
|
right: 24px;
|
|
49
48
|
color: @colorTextTertiary;
|
|
@@ -58,6 +57,7 @@
|
|
|
58
57
|
|
|
59
58
|
.@{prefix}-content {
|
|
60
59
|
margin-top: -60px;
|
|
60
|
+
width: 404px;
|
|
61
61
|
.@{prefix}-logo {
|
|
62
62
|
display: block;
|
|
63
63
|
height: 68px;
|
|
@@ -87,13 +87,11 @@
|
|
|
87
87
|
}
|
|
88
88
|
|
|
89
89
|
.@{prefixCls}-form-item {
|
|
90
|
-
width: 404px;
|
|
91
90
|
margin-bottom: 24px;
|
|
92
91
|
padding-bottom: 0;
|
|
93
92
|
}
|
|
94
93
|
|
|
95
94
|
.@{prefixCls}-input-affix-wrapper {
|
|
96
|
-
width: 404px;
|
|
97
95
|
height: 40px;
|
|
98
96
|
border-radius: 8px;
|
|
99
97
|
|
|
@@ -178,7 +176,6 @@
|
|
|
178
176
|
}
|
|
179
177
|
}
|
|
180
178
|
.@{prefix}-submit-btn {
|
|
181
|
-
width: 404px;
|
|
182
179
|
height: 40px;
|
|
183
180
|
border-radius: 8px;
|
|
184
181
|
}
|
|
@@ -201,7 +198,6 @@
|
|
|
201
198
|
}
|
|
202
199
|
|
|
203
200
|
.@{prefix}-alert {
|
|
204
|
-
width: 404px;
|
|
205
201
|
margin-bottom: 24px;
|
|
206
202
|
border-radius: 8px;
|
|
207
203
|
}
|
|
@@ -209,54 +205,6 @@
|
|
|
209
205
|
}
|
|
210
206
|
}
|
|
211
207
|
|
|
212
|
-
@media (max-width: 2048px) {
|
|
213
|
-
.@{prefix}-container {
|
|
214
|
-
.@{prefix}-bg {
|
|
215
|
-
width: 800px;
|
|
216
|
-
|
|
217
|
-
.@{prefix}-info {
|
|
218
|
-
margin: 185px 48px 0 48px;
|
|
219
|
-
font-size: 72px;
|
|
220
|
-
.@{prefix}-start {
|
|
221
|
-
font-size: 48px;
|
|
222
|
-
}
|
|
223
|
-
}
|
|
224
|
-
}
|
|
225
|
-
}
|
|
226
|
-
}
|
|
227
|
-
|
|
228
|
-
@media (max-width: 1800px) {
|
|
229
|
-
.@{prefix}-container {
|
|
230
|
-
.@{prefix}-bg {
|
|
231
|
-
width: 700px;
|
|
232
|
-
|
|
233
|
-
.@{prefix}-info {
|
|
234
|
-
margin: 185px 48px 0 48px;
|
|
235
|
-
font-size: 64px;
|
|
236
|
-
.@{prefix}-start {
|
|
237
|
-
font-size: 40px;
|
|
238
|
-
}
|
|
239
|
-
}
|
|
240
|
-
}
|
|
241
|
-
}
|
|
242
|
-
}
|
|
243
|
-
|
|
244
|
-
@media (max-width: 1600px) {
|
|
245
|
-
.@{prefix}-container {
|
|
246
|
-
.@{prefix}-bg {
|
|
247
|
-
width: 600px;
|
|
248
|
-
|
|
249
|
-
.@{prefix}-info {
|
|
250
|
-
margin: 185px 48px 0 48px;
|
|
251
|
-
font-size: 56px;
|
|
252
|
-
.@{prefix}-start {
|
|
253
|
-
font-size: 32px;
|
|
254
|
-
}
|
|
255
|
-
}
|
|
256
|
-
}
|
|
257
|
-
}
|
|
258
|
-
}
|
|
259
|
-
|
|
260
208
|
// 设置的登录页最小高度,防止 logo 偏移位置偏移遮住输入框
|
|
261
209
|
@media (max-height: 650px) {
|
|
262
210
|
.@{prefix}-container {
|
|
@@ -267,59 +215,53 @@
|
|
|
267
215
|
}
|
|
268
216
|
}
|
|
269
217
|
|
|
270
|
-
|
|
271
|
-
.@{prefix}-
|
|
272
|
-
.@{prefix}-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
.@{prefix}-info {
|
|
276
|
-
margin: 185px 48px 0 48px;
|
|
277
|
-
font-size: 48px;
|
|
278
|
-
.@{prefix}-start {
|
|
279
|
-
font-size: 28px;
|
|
280
|
-
}
|
|
281
|
-
}
|
|
218
|
+
.@{prefix}-container-with-board {
|
|
219
|
+
.@{prefix}-card {
|
|
220
|
+
.@{prefix}-content {
|
|
221
|
+
margin-top: 0;
|
|
282
222
|
}
|
|
283
223
|
}
|
|
284
224
|
}
|
|
285
225
|
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
margin: 185px 32px 0 32px;
|
|
293
|
-
font-size: 40px;
|
|
294
|
-
.@{prefix}-start {
|
|
295
|
-
font-size: 24px;
|
|
296
|
-
}
|
|
297
|
-
}
|
|
298
|
-
}
|
|
226
|
+
.@{prefix}-container-mobile {
|
|
227
|
+
flex-direction: column;
|
|
228
|
+
min-width: auto;
|
|
229
|
+
.@{prefix}-banner {
|
|
230
|
+
// 移动端设置百分比高度,避免使用 vh,否则安卓端打开软键盘会重新计算高度,导致 banner 图片高度出现跳变
|
|
231
|
+
height: 25%;
|
|
299
232
|
}
|
|
300
|
-
}
|
|
301
|
-
|
|
302
|
-
@media (max-width: 768px) {
|
|
303
|
-
.@{prefix}-container {
|
|
304
|
-
.@{prefix}-bg {
|
|
305
|
-
width: 250px;
|
|
306
|
-
|
|
307
|
-
.@{prefix}-info {
|
|
308
|
-
margin: 185px 24px 0 24px;
|
|
309
|
-
font-size: 32px;
|
|
310
|
-
|
|
311
|
-
.@{prefix}-start {
|
|
312
|
-
font-size: 20px;
|
|
313
|
-
}
|
|
314
|
-
}
|
|
315
|
-
}
|
|
233
|
+
.@{prefix}-bg {
|
|
234
|
+
width: 100%;
|
|
316
235
|
}
|
|
317
|
-
}
|
|
318
|
-
|
|
319
|
-
.@{prefix}-container-with-board {
|
|
320
236
|
.@{prefix}-card {
|
|
237
|
+
align-items: start;
|
|
238
|
+
width: 100%;
|
|
239
|
+
height: 75%;
|
|
240
|
+
margin-top: -48px;
|
|
241
|
+
padding: 0 32px;
|
|
242
|
+
border-radius: 16px 16px 0 0;
|
|
243
|
+
position: relative;
|
|
244
|
+
.@{prefix}-board {
|
|
245
|
+
top: 8px;
|
|
246
|
+
left: 24px;
|
|
247
|
+
}
|
|
248
|
+
.@{prefix}-locale {
|
|
249
|
+
top: 8px;
|
|
250
|
+
}
|
|
321
251
|
.@{prefix}-content {
|
|
322
|
-
|
|
252
|
+
width: 100%;
|
|
253
|
+
margin-top: 40px;
|
|
254
|
+
.@{prefix}-logo {
|
|
255
|
+
height: 48px;
|
|
256
|
+
margin-bottom: 24px;
|
|
257
|
+
}
|
|
258
|
+
.@{prefix}-watermark-wrapper {
|
|
259
|
+
// 移动端改为正常文档流,避免安卓端被软键盘顶起
|
|
260
|
+
width: calc(100% - 64px);
|
|
261
|
+
position: static;
|
|
262
|
+
width: 100%;
|
|
263
|
+
margin-top: 96px;
|
|
264
|
+
}
|
|
323
265
|
}
|
|
324
266
|
}
|
|
325
267
|
}
|
|
@@ -47,12 +47,12 @@ var genPageContainerStyle = (token) => {
|
|
|
47
47
|
[`${proComponentsCls}-grid-content`]: {
|
|
48
48
|
minHeight: "auto"
|
|
49
49
|
},
|
|
50
|
-
[`${
|
|
50
|
+
[`${componentCls}-warp-page-header,${componentCls}-wrap-page-header`]: {
|
|
51
51
|
// 减小内容区左右两侧间距
|
|
52
|
-
paddingInlineStart: paddingLG
|
|
53
|
-
paddingInlineEnd: paddingLG
|
|
54
|
-
paddingBlockStart: padding
|
|
55
|
-
paddingBlockEnd: padding
|
|
52
|
+
paddingInlineStart: `${paddingLG}px !important`,
|
|
53
|
+
paddingInlineEnd: `${paddingLG}px !important`,
|
|
54
|
+
paddingBlockStart: `${padding}px !important`,
|
|
55
|
+
paddingBlockEnd: `${padding}px !important`,
|
|
56
56
|
[`${antCls}-page-header-breadcrumb`]: {
|
|
57
57
|
// overwritten pro-components style
|
|
58
58
|
paddingBlockStart: 0
|
|
@@ -73,6 +73,7 @@ var genTagSelectStyle = (token) => {
|
|
|
73
73
|
marginRight: token.marginXS,
|
|
74
74
|
padding: `${token.paddingXXS}px ${token.paddingContentHorizontal}px`,
|
|
75
75
|
cursor: "pointer",
|
|
76
|
+
transition: `all ${token.motionDurationMid} ${token.motionEaseInOut}`,
|
|
76
77
|
[`${componentCls}-input`]: {
|
|
77
78
|
width: 0,
|
|
78
79
|
height: 0,
|
|
@@ -107,15 +108,15 @@ var genTagSelectStyle = (token) => {
|
|
|
107
108
|
[`${componentCls}-large`]: genSizeStyle(token.paddingContentVerticalSM, token.fontSize),
|
|
108
109
|
[`${componentCls}-small`]: genSizeStyle(0, token.fontSize),
|
|
109
110
|
[`${componentCls}-wrapper:not(${componentCls}-disabled):hover`]: {
|
|
110
|
-
|
|
111
|
+
borderColor: token.colorPrimaryText
|
|
111
112
|
},
|
|
112
113
|
[`${componentCls}-checked`]: genColoredStyle(
|
|
113
114
|
token.blue,
|
|
114
115
|
token.colorPrimaryBg,
|
|
115
116
|
token.colorPrimaryText
|
|
116
117
|
),
|
|
117
|
-
[`${componentCls}-wrapper
|
|
118
|
-
boxShadow: `
|
|
118
|
+
[`${componentCls}-wrapper:not(${componentCls}-disabled):active`]: {
|
|
119
|
+
boxShadow: `0px 0px 3px ${token.colorPrimary}`,
|
|
119
120
|
borderColor: `${token.colorPrimary}`
|
|
120
121
|
},
|
|
121
122
|
[`${componentCls}-checked:not(${componentCls}-disabled)`]: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oceanbase/ui",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.29",
|
|
4
4
|
"description": "The UI library based on OceanBase Design",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"oceanbase",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"@ant-design/cssinjs": "^1.17.2",
|
|
38
38
|
"@ant-design/pro-components": "^2.6.34",
|
|
39
39
|
"@ant-design/pro-layout": "^7.17.8",
|
|
40
|
-
"@oceanbase/design": "^0.2.
|
|
40
|
+
"@oceanbase/design": "^0.2.28",
|
|
41
41
|
"@oceanbase/icons": "^0.2.9",
|
|
42
42
|
"@oceanbase/util": "^0.2.11",
|
|
43
43
|
"ahooks": "^2.10.14",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"moment": "^2.29.4",
|
|
53
53
|
"path-to-regexp": "^6.2.1",
|
|
54
54
|
"randexp": "^0.5.3",
|
|
55
|
-
"rc-util": "^5.38.
|
|
55
|
+
"rc-util": "^5.38.1",
|
|
56
56
|
"react-copy-to-clipboard": "^5.1.0",
|
|
57
57
|
"react-json-view": "^1.21.3",
|
|
58
58
|
"react-split-pane": "^0.1.92",
|
|
@@ -66,5 +66,5 @@
|
|
|
66
66
|
"react": ">=16.9.0",
|
|
67
67
|
"react-dom": ">=16.9.0"
|
|
68
68
|
},
|
|
69
|
-
"gitHead": "
|
|
69
|
+
"gitHead": "4f6e62c8ae28c364828a704f569bf55be42548d5"
|
|
70
70
|
}
|