@oceanbase/ui 1.0.0-alpha.1 → 1.0.0-alpha.3

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.
Files changed (85) hide show
  1. package/dist/ui.min.css +1 -1
  2. package/dist/ui.min.js +1 -1
  3. package/es/Action/style/index.d.ts +2 -2
  4. package/es/DateRanger/Ranger.d.ts +4 -0
  5. package/es/DateRanger/Ranger.js +158 -14
  6. package/es/DateRanger/constant/index.js +1 -1
  7. package/es/DateRanger/index.less +23 -0
  8. package/es/FooterToolbar/style/index.d.ts +0 -2
  9. package/es/FooterToolbar/style/index.js +0 -12
  10. package/es/PageContainer/index.js +14 -4
  11. package/es/PageContainer/style/index.js +5 -7
  12. package/es/ProCard/index.js +11 -3
  13. package/es/ProCard/style/index.d.ts +2 -2
  14. package/es/ProCard/style/index.js +6 -3
  15. package/es/ProTable/index.d.ts +1 -1
  16. package/es/ProTable/index.js +11 -5
  17. package/es/ProTable/style/index.d.ts +2 -2
  18. package/es/ProTable/style/index.js +6 -3
  19. package/lib/Action/Group.js +57 -46
  20. package/lib/Action/Item.js +14 -9
  21. package/lib/Action/style/index.d.ts +2 -2
  22. package/lib/BackgroundTaskManager/RefreshMan.js +3 -12
  23. package/lib/BackgroundTaskManager/index.js +3 -12
  24. package/lib/BasicLayout/Header.js +120 -62
  25. package/lib/BasicLayout/index.js +166 -143
  26. package/lib/BatchOperationBar/index.js +59 -44
  27. package/lib/Boundary/Components/Code.js +11 -5
  28. package/lib/Boundary/Components/Exception.js +33 -23
  29. package/lib/Boundary/Components/Function.js +11 -5
  30. package/lib/ContentWithIcon/index.js +30 -22
  31. package/lib/ContentWithQuestion/index.js +8 -3
  32. package/lib/DateRanger/PickerPanel.js +235 -217
  33. package/lib/DateRanger/Ranger.d.ts +4 -0
  34. package/lib/DateRanger/Ranger.js +396 -227
  35. package/lib/DateRanger/constant/index.js +1 -1
  36. package/lib/DateRanger/index.less +23 -0
  37. package/lib/Dialog/Anchor.js +8 -5
  38. package/lib/Dialog/EventProxy.js +3 -12
  39. package/lib/Dialog/index.js +132 -108
  40. package/lib/DocDialog/index.js +3 -2
  41. package/lib/FooterToolbar/index.js +3 -2
  42. package/lib/FooterToolbar/style/index.d.ts +0 -2
  43. package/lib/FooterToolbar/style/index.js +0 -17
  44. package/lib/FullscreenBox/index.js +16 -7
  45. package/lib/GraphToolbar/index.js +70 -58
  46. package/lib/Highlight/DiffView/DiffCells.js +17 -10
  47. package/lib/Highlight/DiffView/index.js +35 -31
  48. package/lib/Highlight/HighlightCell.js +13 -10
  49. package/lib/Highlight/JsonView.js +15 -14
  50. package/lib/Highlight/index.js +50 -45
  51. package/lib/IconFont/index.js +2 -12
  52. package/lib/LightFilter/index.js +3 -2
  53. package/lib/LocaleDropdown/index.js +13 -20
  54. package/lib/Login/ActivateForm.js +53 -60
  55. package/lib/Login/LoginForm.js +118 -109
  56. package/lib/Login/RegisterForm.js +79 -86
  57. package/lib/Login/index.js +92 -64
  58. package/lib/NavMenu/index.js +9 -8
  59. package/lib/PageContainer/ItemRender.js +5 -5
  60. package/lib/PageContainer/index.js +17 -6
  61. package/lib/PageContainer/style/index.js +5 -6
  62. package/lib/PageLoading/index.js +6 -16
  63. package/lib/Password/Content.js +38 -42
  64. package/lib/Password/index.js +83 -68
  65. package/lib/ProCard/index.js +6 -3
  66. package/lib/ProCard/style/index.d.ts +2 -2
  67. package/lib/ProCard/style/index.js +6 -2
  68. package/lib/ProTable/index.d.ts +1 -1
  69. package/lib/ProTable/index.js +19 -8
  70. package/lib/ProTable/style/index.d.ts +2 -2
  71. package/lib/ProTable/style/index.js +7 -1
  72. package/lib/Ranger/QuickPicker.js +24 -15
  73. package/lib/Ranger/Ranger.js +37 -34
  74. package/lib/SideTip/Dragger.js +5 -4
  75. package/lib/SideTip/IconLoading.js +25 -25
  76. package/lib/SideTip/index.js +19 -10
  77. package/lib/TagSelect/Group.js +9 -5
  78. package/lib/TagSelect/Item.js +22 -18
  79. package/lib/TaskGraph/Graph.js +29 -24
  80. package/lib/TaskGraph/index.js +56 -50
  81. package/lib/TreeSearch/index.js +30 -35
  82. package/lib/Welcome/index.js +64 -37
  83. package/lib/Welcome/step.js +11 -4
  84. package/lib/locale/LocaleWrapper.js +15 -14
  85. package/package.json +4 -4
@@ -1,8 +1,6 @@
1
- var __create = Object.create;
2
1
  var __defProp = Object.defineProperty;
3
2
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
3
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getProtoOf = Object.getPrototypeOf;
6
4
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
5
  var __export = (target, all) => {
8
6
  for (var name in all)
@@ -16,14 +14,6 @@ var __copyProps = (to, from, except, desc) => {
16
14
  }
17
15
  return to;
18
16
  };
19
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
- // If the importer is in node compatibility mode or this is not an ESM
21
- // file that has been converted to a CommonJS file using a Babel-
22
- // compatible transform (i.e. "__esModule" has not been set), then set
23
- // "default" to the CommonJS "module.exports" for node compatibility.
24
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
- mod
26
- ));
27
17
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
18
 
29
19
  // src/LocaleDropdown/index.tsx
@@ -35,25 +25,25 @@ module.exports = __toCommonJS(LocaleDropdown_exports);
35
25
  var import_icons = require("@oceanbase/icons");
36
26
  var import_util = require("@oceanbase/util");
37
27
  var import_design = require("@oceanbase/design");
38
- var import_react = __toESM(require("react"));
39
28
  var import_constant = require("../constant");
40
29
  var import_util2 = require("../_util");
30
+ var import_jsx_runtime = require("react/jsx-runtime");
41
31
  var LocaleDropdown = ({
42
32
  locales,
43
33
  showLabel,
44
34
  className,
45
35
  ...restProps
46
36
  }) => {
47
- const localeMenu = /* @__PURE__ */ import_react.default.createElement(
37
+ const localeMenu = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
48
38
  import_design.Menu,
49
39
  {
50
40
  onClick: ({ key }) => {
51
41
  (0, import_util2.setLocale)(key);
52
- }
53
- },
54
- 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))
42
+ },
43
+ children: import_constant.LOCALE_LIST.filter((item) => !locales || locales.includes(item.value)).map((item) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_design.Menu.Item, { children: item.label }, item.value))
44
+ }
55
45
  );
56
- return /* @__PURE__ */ import_react.default.createElement(import_design.Dropdown, { overlay: localeMenu, ...restProps }, showLabel ? /* @__PURE__ */ import_react.default.createElement(
46
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_design.Dropdown, { overlay: localeMenu, ...restProps, children: showLabel ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
57
47
  "span",
58
48
  {
59
49
  style: {
@@ -66,9 +56,12 @@ var LocaleDropdown = ({
66
56
  textAlign: "center",
67
57
  border: "0.88px solid #ced4e1",
68
58
  borderRadius: 14
69
- }
70
- },
71
- (0, import_util.findByValue)(import_constant.LOCALE_LIST, (0, import_util2.getLocale)()).minLabel
72
- ) : /* @__PURE__ */ import_react.default.createElement(import_design.Space, { className }, /* @__PURE__ */ import_react.default.createElement(import_icons.GlobalOutlined, null), (0, import_util.findByValue)(import_constant.LOCALE_LIST, (0, import_util2.getLocale)()).shortLabel));
59
+ },
60
+ children: (0, import_util.findByValue)(import_constant.LOCALE_LIST, (0, import_util2.getLocale)()).minLabel
61
+ }
62
+ ) : /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_design.Space, { className, children: [
63
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.GlobalOutlined, {}),
64
+ (0, import_util.findByValue)(import_constant.LOCALE_LIST, (0, import_util2.getLocale)()).shortLabel
65
+ ] }) });
73
66
  };
74
67
  var LocaleDropdown_default = LocaleDropdown;
@@ -1,8 +1,6 @@
1
- var __create = Object.create;
2
1
  var __defProp = Object.defineProperty;
3
2
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
3
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getProtoOf = Object.getPrototypeOf;
6
4
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
5
  var __export = (target, all) => {
8
6
  for (var name in all)
@@ -16,14 +14,6 @@ var __copyProps = (to, from, except, desc) => {
16
14
  }
17
15
  return to;
18
16
  };
19
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
- // If the importer is in node compatibility mode or this is not an ESM
21
- // file that has been converted to a CommonJS file using a Babel-
22
- // compatible transform (i.e. "__esModule" has not been set), then set
23
- // "default" to the CommonJS "module.exports" for node compatibility.
24
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
- mod
26
- ));
27
17
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
18
 
29
19
  // src/Login/ActivateForm.tsx
@@ -34,10 +24,11 @@ __export(ActivateForm_exports, {
34
24
  module.exports = __toCommonJS(ActivateForm_exports);
35
25
  var import_design = require("@oceanbase/design");
36
26
  var import_lodash = require("lodash");
37
- var import_react = __toESM(require("react"));
27
+ var import_react = require("react");
38
28
  var import_util = require("../_util");
39
29
  var import_index = require("./index.less");
40
30
  var import_RegisterForm = require("./RegisterForm");
31
+ var import_jsx_runtime = require("react/jsx-runtime");
41
32
  var prefix = (0, import_util.getPrefix)("login");
42
33
  var Activate = ({
43
34
  locale,
@@ -67,7 +58,7 @@ var Activate = ({
67
58
  pattern: import_RegisterForm.PASSWORD_REGEX,
68
59
  message: locale.passwordHelp
69
60
  };
70
- return /* @__PURE__ */ import_react.default.createElement(
61
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
71
62
  import_design.Form,
72
63
  {
73
64
  layout: "vertical",
@@ -75,58 +66,60 @@ var Activate = ({
75
66
  className: `${prefix}-form`,
76
67
  form,
77
68
  ...restProps,
78
- "data-testid": "login.register"
79
- },
80
- errorMessage && /* @__PURE__ */ import_react.default.createElement(import_design.Alert, { type: "error", showIcon: true, className: `${prefix}-alert`, message: errorMessage }),
81
- /* @__PURE__ */ import_react.default.createElement(
82
- import_design.Form.Item,
83
- {
84
- name: "password",
85
- label: locale.passwordLabel,
86
- dependencies: ["confirmPassword"],
87
- help: passwordRegexpRule.message,
88
- validateFirst: true,
89
- rules: [
69
+ "data-testid": "login.register",
70
+ children: [
71
+ errorMessage && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_design.Alert, { type: "error", showIcon: true, className: `${prefix}-alert`, message: errorMessage }),
72
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
73
+ import_design.Form.Item,
90
74
  {
91
- required: true,
92
- message: locale.passwordMessage
93
- },
94
- passwordRegexpRule
95
- ]
96
- },
97
- /* @__PURE__ */ import_react.default.createElement(import_design.Input.Password, { visibilityToggle: true, autoComplete: "new-password" })
98
- ),
99
- /* @__PURE__ */ import_react.default.createElement(
100
- import_design.Form.Item,
101
- {
102
- name: "confirmPassword",
103
- label: locale.confirmPwdLabel,
104
- dependencies: ["password"],
105
- validateFirst: true,
106
- rules: [
75
+ name: "password",
76
+ label: locale.passwordLabel,
77
+ dependencies: ["confirmPassword"],
78
+ help: passwordRegexpRule.message,
79
+ validateFirst: true,
80
+ rules: [
81
+ {
82
+ required: true,
83
+ message: locale.passwordMessage
84
+ },
85
+ passwordRegexpRule
86
+ ],
87
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_design.Input.Password, { visibilityToggle: true, autoComplete: "new-password" })
88
+ }
89
+ ),
90
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
91
+ import_design.Form.Item,
107
92
  {
108
- required: true,
109
- message: locale.confirmPwdMessage
110
- },
93
+ name: "confirmPassword",
94
+ label: locale.confirmPwdLabel,
95
+ dependencies: ["password"],
96
+ validateFirst: true,
97
+ rules: [
98
+ {
99
+ required: true,
100
+ message: locale.confirmPwdMessage
101
+ },
102
+ {
103
+ validator: handleValidateConfirmPassword
104
+ }
105
+ ],
106
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_design.Input.Password, { visibilityToggle: true, autoComplete: "new-password" })
107
+ }
108
+ ),
109
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
110
+ import_design.Button,
111
111
  {
112
- validator: handleValidateConfirmPassword
112
+ htmlType: "submit",
113
+ loading,
114
+ type: "primary",
115
+ block: true,
116
+ className: `${prefix}-submit-btn`,
117
+ children: locale.activeSubmitBtn
113
118
  }
114
- ]
115
- },
116
- /* @__PURE__ */ import_react.default.createElement(import_design.Input.Password, { visibilityToggle: true, autoComplete: "new-password" })
117
- ),
118
- /* @__PURE__ */ import_react.default.createElement(
119
- import_design.Button,
120
- {
121
- htmlType: "submit",
122
- loading,
123
- type: "primary",
124
- block: true,
125
- className: `${prefix}-submit-btn`
126
- },
127
- locale.activeSubmitBtn
128
- ),
129
- /* @__PURE__ */ import_react.default.createElement("div", { className: `${prefix}-switch-btn` }, /* @__PURE__ */ import_react.default.createElement(import_design.Button, { type: "link", onClick: goBack }, locale.activeBackBtn))
119
+ ),
120
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: `${prefix}-switch-btn`, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_design.Button, { type: "link", onClick: goBack, children: locale.activeBackBtn }) })
121
+ ]
122
+ }
130
123
  );
131
124
  };
132
125
  var ActivateForm_default = Activate;
@@ -35,10 +35,11 @@ module.exports = __toCommonJS(LoginForm_exports);
35
35
  var import_icons = require("@oceanbase/icons");
36
36
  var import_design = require("@oceanbase/design");
37
37
  var import_classnames = __toESM(require("classnames"));
38
- var import_react = __toESM(require("react"));
38
+ var import_react = require("react");
39
39
  var import_design2 = require("@oceanbase/design");
40
40
  var import_util = require("../_util");
41
41
  var import_index = require("./index.less");
42
+ var import_jsx_runtime = require("react/jsx-runtime");
42
43
  var prefix = (0, import_util.getPrefix)("login");
43
44
  var Login = ({
44
45
  loading,
@@ -55,7 +56,7 @@ var Login = ({
55
56
  }) => {
56
57
  const { token } = import_design2.theme.useToken();
57
58
  const [focusInput, setFocusInput] = (0, import_react.useState)("");
58
- return /* @__PURE__ */ import_react.default.createElement(
59
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
59
60
  import_design.Form,
60
61
  {
61
62
  layout: "vertical",
@@ -63,119 +64,127 @@ var Login = ({
63
64
  className: `${prefix}-form`,
64
65
  style: { paddingLeft: showAuthCode ? 96 : 0 },
65
66
  ...restProps,
66
- "data-testid": "login.form"
67
- },
68
- errorMessage && /* @__PURE__ */ import_react.default.createElement(import_design.Alert, { type: "error", showIcon: true, className: `${prefix}-alert`, message: errorMessage }),
69
- /* @__PURE__ */ import_react.default.createElement(
70
- import_design.Form.Item,
71
- {
72
- name: "username",
73
- rules: [
67
+ "data-testid": "login.form",
68
+ children: [
69
+ errorMessage && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_design.Alert, { type: "error", showIcon: true, className: `${prefix}-alert`, message: errorMessage }),
70
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
71
+ import_design.Form.Item,
74
72
  {
75
- required: true,
76
- message: locale.usernameMessage
73
+ name: "username",
74
+ rules: [
75
+ {
76
+ required: true,
77
+ message: locale.usernameMessage
78
+ }
79
+ ],
80
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
81
+ import_design.Input,
82
+ {
83
+ prefix: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.UserOutlined, { style: { color: token.colorIcon } }),
84
+ placeholder: locale.usernamePlaceholder,
85
+ onFocus: () => {
86
+ setFocusInput("username");
87
+ },
88
+ onBlur: () => {
89
+ setFocusInput("");
90
+ },
91
+ className: (0, import_classnames.default)({
92
+ [`${prefix}-focus-input`]: focusInput === "username"
93
+ }),
94
+ ...(componentProps == null ? void 0 : componentProps.username) || {}
95
+ }
96
+ )
77
97
  }
78
- ]
79
- },
80
- /* @__PURE__ */ import_react.default.createElement(
81
- import_design.Input,
82
- {
83
- prefix: /* @__PURE__ */ import_react.default.createElement(import_icons.UserOutlined, { style: { color: token.colorIcon } }),
84
- placeholder: locale.usernamePlaceholder,
85
- onFocus: () => {
86
- setFocusInput("username");
87
- },
88
- onBlur: () => {
89
- setFocusInput("");
90
- },
91
- className: (0, import_classnames.default)({
92
- [`${prefix}-focus-input`]: focusInput === "username"
93
- }),
94
- ...(componentProps == null ? void 0 : componentProps.username) || {}
95
- }
96
- )
97
- ),
98
- /* @__PURE__ */ import_react.default.createElement(
99
- import_design.Form.Item,
100
- {
101
- name: "password",
102
- rules: passwordOptional ? [] : [
98
+ ),
99
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
100
+ import_design.Form.Item,
103
101
  {
104
- required: true,
105
- message: locale.passwordMessage
102
+ name: "password",
103
+ rules: passwordOptional ? [] : [
104
+ {
105
+ required: true,
106
+ message: locale.passwordMessage
107
+ }
108
+ ],
109
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
110
+ import_design.Input.Password,
111
+ {
112
+ visibilityToggle: true,
113
+ autoComplete: "current-password",
114
+ prefix: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.LockOutlined, { style: { color: token.colorIcon } }),
115
+ placeholder: locale.passwordPlaceholder,
116
+ onFocus: () => {
117
+ setFocusInput("password");
118
+ },
119
+ onBlur: () => {
120
+ setFocusInput("");
121
+ },
122
+ className: focusInput === "password" ? `${prefix}-focus-input` : "",
123
+ ...(componentProps == null ? void 0 : componentProps.password) || {}
124
+ }
125
+ )
106
126
  }
107
- ]
108
- },
109
- /* @__PURE__ */ import_react.default.createElement(
110
- import_design.Input.Password,
111
- {
112
- visibilityToggle: true,
113
- autoComplete: "current-password",
114
- prefix: /* @__PURE__ */ import_react.default.createElement(import_icons.LockOutlined, { style: { color: token.colorIcon } }),
115
- placeholder: locale.passwordPlaceholder,
116
- onFocus: () => {
117
- setFocusInput("password");
118
- },
119
- onBlur: () => {
120
- setFocusInput("");
121
- },
122
- className: focusInput === "password" ? `${prefix}-focus-input` : "",
123
- ...(componentProps == null ? void 0 : componentProps.password) || {}
124
- }
125
- )
126
- ),
127
- showAuthCode && /* @__PURE__ */ import_react.default.createElement(import_design.Space, { className: `${prefix}-auth-code` }, /* @__PURE__ */ import_react.default.createElement(
128
- import_design.Form.Item,
129
- {
130
- name: "authCode",
131
- rules: [
127
+ ),
128
+ showAuthCode && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_design.Space, { className: `${prefix}-auth-code`, children: [
129
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
130
+ import_design.Form.Item,
131
+ {
132
+ name: "authCode",
133
+ rules: [
134
+ {
135
+ required: true,
136
+ message: "验证码不能为空"
137
+ }
138
+ ],
139
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
140
+ import_design.Input,
141
+ {
142
+ prefix: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.SafetyCertificateOutlined, { style: { color: token.colorIcon } }),
143
+ placeholder: "请输入验证码",
144
+ onFocus: () => {
145
+ setFocusInput("authCode");
146
+ },
147
+ onBlur: () => {
148
+ setFocusInput("");
149
+ },
150
+ className: (0, import_classnames.default)({
151
+ [`${prefix}-focus-input`]: focusInput === "authCode"
152
+ }),
153
+ ...(componentProps == null ? void 0 : componentProps.authCode) || {}
154
+ }
155
+ )
156
+ }
157
+ ),
158
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: (0, import_classnames.default)(`${prefix}-code-btn`), children: [
159
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("img", { src: authCodeImg, alt: "", width: "96", height: "38" }),
160
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: `${prefix}-code-mask`, onClick: onAuthCodeImgChange, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.SyncOutlined, {}) })
161
+ ] })
162
+ ] }),
163
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_design.Form.Item, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
164
+ import_design.Button,
132
165
  {
133
- required: true,
134
- message: "验证码不能为空"
166
+ htmlType: "submit",
167
+ loading,
168
+ type: "primary",
169
+ block: true,
170
+ className: `${prefix}-submit-btn`,
171
+ children: locale.loginText
135
172
  }
136
- ]
137
- },
138
- /* @__PURE__ */ import_react.default.createElement(
139
- import_design.Input,
140
- {
141
- prefix: /* @__PURE__ */ import_react.default.createElement(import_icons.SafetyCertificateOutlined, { style: { color: token.colorIcon } }),
142
- placeholder: "请输入验证码",
143
- onFocus: () => {
144
- setFocusInput("authCode");
145
- },
146
- onBlur: () => {
147
- setFocusInput("");
148
- },
149
- className: (0, import_classnames.default)({
150
- [`${prefix}-focus-input`]: focusInput === "authCode"
151
- }),
152
- ...(componentProps == null ? void 0 : componentProps.authCode) || {}
153
- }
154
- )
155
- ), /* @__PURE__ */ import_react.default.createElement("div", { className: (0, import_classnames.default)(`${prefix}-code-btn`) }, /* @__PURE__ */ import_react.default.createElement("img", { src: authCodeImg, alt: "", width: "96", height: "38" }), /* @__PURE__ */ import_react.default.createElement("div", { className: `${prefix}-code-mask`, onClick: onAuthCodeImgChange }, /* @__PURE__ */ import_react.default.createElement(import_icons.SyncOutlined, null)))),
156
- /* @__PURE__ */ import_react.default.createElement(import_design.Form.Item, null, /* @__PURE__ */ import_react.default.createElement(
157
- import_design.Button,
158
- {
159
- htmlType: "submit",
160
- loading,
161
- type: "primary",
162
- block: true,
163
- className: `${prefix}-submit-btn`
164
- },
165
- locale.loginText
166
- )),
167
- showOtherLoginButton && /* @__PURE__ */ import_react.default.createElement(import_design.Form.Item, null, /* @__PURE__ */ import_react.default.createElement(
168
- import_design.Button,
169
- {
170
- htmlType: "button",
171
- loading: otherLoginProps.loading,
172
- type: "primary",
173
- block: true,
174
- onClick: otherLoginProps.onFinish,
175
- className: `${prefix}-submit-btn`
176
- },
177
- locale.otherLoginText
178
- ))
173
+ ) }),
174
+ showOtherLoginButton && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_design.Form.Item, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
175
+ import_design.Button,
176
+ {
177
+ htmlType: "button",
178
+ loading: otherLoginProps.loading,
179
+ type: "primary",
180
+ block: true,
181
+ onClick: otherLoginProps.onFinish,
182
+ className: `${prefix}-submit-btn`,
183
+ children: locale.otherLoginText
184
+ }
185
+ ) })
186
+ ]
187
+ }
179
188
  );
180
189
  };
181
190
  var LoginForm_default = Login;