@oceanbase/ui 1.0.0-alpha.0 → 1.0.0-alpha.10
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/static/Inter-Medium.ea234620.woff2 +0 -0
- package/dist/static/Inter-Regular.34ba43c9.woff2 +0 -0
- package/dist/static/Inter-SemiBold.95439fb4.woff2 +0 -0
- package/dist/ui.min.css +1 -1
- package/dist/ui.min.js +1 -1
- package/es/Action/Group.js +121 -15
- package/es/Action/Item.d.ts +6 -15
- package/es/Action/Item.js +85 -128
- package/es/Action/index.d.ts +6 -3
- package/es/Action/style/index.d.ts +2 -2
- package/es/Action/style/index.js +8 -4
- package/es/BasicLayout/locale/ja-JP.d.ts +13 -0
- package/es/BasicLayout/locale/ja-JP.js +12 -0
- package/es/BasicLayout/style/index.js +35 -23
- package/es/BatchOperationBar/index.d.ts +0 -1
- package/es/BatchOperationBar/index.js +17 -13
- package/es/BatchOperationBar/locale/ja-JP.d.ts +7 -0
- package/es/BatchOperationBar/locale/ja-JP.js +6 -0
- package/es/BatchOperationBar/style/index.d.ts +10 -0
- package/es/BatchOperationBar/style/index.js +51 -0
- package/es/Boundary/Components/Code.js +11 -5
- package/es/Boundary/Components/Exception.js +85 -74
- package/es/Boundary/Components/Function.js +11 -5
- package/es/Boundary/index.d.ts +0 -1
- package/es/Boundary/index.js +0 -1
- package/es/Boundary/locale/en-US.js +1 -1
- package/es/Boundary/locale/ja-JP.d.ts +11 -0
- package/es/Boundary/locale/ja-JP.js +10 -0
- package/es/Boundary/locale/zh-CN.js +1 -1
- package/es/Boundary/locale/zh-TW.js +1 -1
- package/es/Boundary/style/index.d.ts +10 -0
- package/es/Boundary/style/index.js +46 -0
- package/es/ContentWithIcon/index.d.ts +0 -1
- package/es/ContentWithIcon/index.js +29 -29
- package/es/ContentWithIcon/style/index.d.ts +10 -0
- package/es/ContentWithIcon/style/index.js +26 -0
- package/es/DateRanger/PickerPanel.js +5 -4
- package/es/DateRanger/Ranger.d.ts +4 -1
- package/es/DateRanger/Ranger.js +168 -19
- package/es/DateRanger/constant/index.js +1 -1
- package/es/DateRanger/locale/ja-JP.d.ts +56 -0
- package/es/DateRanger/locale/ja-JP.js +20 -0
- package/es/DateRanger/style/index.d.ts +10 -0
- package/es/DateRanger/style/index.js +126 -0
- package/es/Dialog/Anchor.d.ts +2 -10
- package/es/Dialog/Anchor.js +67 -96
- package/es/Dialog/index.d.ts +0 -1
- package/es/Dialog/index.js +537 -578
- package/es/Dialog/locale/ja-JP.d.ts +5 -0
- package/es/Dialog/locale/ja-JP.js +4 -0
- package/es/Dialog/locale/zh-CN.js +1 -1
- package/es/Dialog/locale/zh-TW.js +1 -1
- package/es/Dialog/style/index.d.ts +10 -0
- package/es/Dialog/style/index.js +97 -0
- package/es/DocDialog/locale/ja-JP.d.ts +2 -0
- package/es/DocDialog/locale/ja-JP.js +1 -0
- package/es/FooterToolbar/style/index.d.ts +0 -2
- package/es/FooterToolbar/style/index.js +7 -13
- package/es/FullscreenBox/index.d.ts +0 -1
- package/es/FullscreenBox/index.js +46 -37
- package/es/FullscreenBox/locale/ja-JP.d.ts +2 -0
- package/es/FullscreenBox/locale/ja-JP.js +1 -0
- package/es/FullscreenBox/style/index.d.ts +10 -0
- package/es/FullscreenBox/style/index.js +53 -0
- package/es/Highlight/DiffView/index.d.ts +0 -1
- package/es/Highlight/DiffView/index.js +5 -5
- package/es/Highlight/JsonView.d.ts +0 -1
- package/es/Highlight/JsonView.js +5 -5
- package/es/Highlight/index.d.ts +0 -1
- package/es/Highlight/index.js +23 -23
- package/es/Highlight/locale/ja-JP.d.ts +4 -0
- package/es/Highlight/locale/ja-JP.js +3 -0
- package/es/Highlight/style/index.d.ts +10 -0
- package/es/Highlight/style/index.js +213 -0
- package/es/LocaleDropdown/index.js +4 -2
- package/es/Login/ActivateForm.d.ts +0 -1
- package/es/Login/ActivateForm.js +12 -9
- package/es/Login/LoginForm.d.ts +0 -1
- package/es/Login/LoginForm.js +20 -15
- package/es/Login/RegisterForm.d.ts +0 -1
- package/es/Login/RegisterForm.js +14 -11
- package/es/Login/index.d.ts +0 -1
- package/es/Login/index.js +24 -22
- package/es/Login/locale/ja-JP.d.ts +28 -0
- package/es/Login/locale/ja-JP.js +27 -0
- package/es/Login/locale/zh-CN.js +2 -2
- package/es/Login/style/index.d.ts +10 -0
- package/es/Login/style/index.js +182 -0
- package/es/NavMenu/index.d.ts +1 -2
- package/es/NavMenu/index.js +11 -8
- package/es/NavMenu/style/index.d.ts +10 -0
- package/es/NavMenu/style/index.js +47 -0
- package/es/PageContainer/index.d.ts +2 -0
- package/es/PageContainer/index.js +102 -25
- package/es/PageContainer/locale/en-US.d.ts +1 -0
- package/es/PageContainer/locale/en-US.js +2 -1
- package/es/PageContainer/locale/ja-JP.d.ts +5 -0
- package/es/PageContainer/locale/ja-JP.js +4 -0
- package/es/PageContainer/locale/zh-CN.d.ts +1 -0
- package/es/PageContainer/locale/zh-CN.js +2 -1
- package/es/PageContainer/locale/zh-TW.d.ts +1 -0
- package/es/PageContainer/locale/zh-TW.js +2 -1
- package/es/PageContainer/style/index.js +41 -16
- package/es/Password/index.js +1 -1
- package/es/Password/locale/ja-JP.d.ts +13 -0
- package/es/Password/locale/ja-JP.js +12 -0
- package/es/ProCard/index.d.ts +2 -1
- package/es/ProCard/index.js +20 -8
- package/es/ProCard/style/index.d.ts +2 -2
- package/es/ProCard/style/index.js +13 -5
- package/es/ProTable/index.d.ts +1 -1
- package/es/ProTable/index.js +23 -8
- package/es/ProTable/style/index.d.ts +2 -2
- package/es/ProTable/style/index.js +12 -5
- package/es/Ranger/QuickPicker.js +8 -4
- package/es/Ranger/Ranger.d.ts +0 -1
- package/es/Ranger/Ranger.js +12 -9
- package/es/Ranger/locale/ja-JP.d.ts +28 -0
- package/es/Ranger/locale/ja-JP.js +29 -0
- package/es/Ranger/style/index.d.ts +10 -0
- package/es/Ranger/style/index.js +44 -0
- package/es/SideTip/index.d.ts +0 -1
- package/es/SideTip/index.js +24 -22
- package/es/SideTip/locale/ja-JP.d.ts +2 -0
- package/es/SideTip/locale/ja-JP.js +1 -0
- package/es/SideTip/style/index.d.ts +10 -0
- package/es/SideTip/style/index.js +162 -0
- package/es/TagSelect/Group.d.ts +6 -6
- package/es/TagSelect/Group.js +5 -3
- package/es/TagSelect/Item.js +5 -3
- package/es/Welcome/index.d.ts +0 -1
- package/es/Welcome/index.js +30 -26
- package/es/Welcome/locale/ja-JP.d.ts +5 -0
- package/es/Welcome/locale/ja-JP.js +4 -0
- package/es/Welcome/step/style/index.d.ts +10 -0
- package/es/Welcome/step/style/index.js +44 -0
- package/es/Welcome/step.d.ts +0 -1
- package/es/Welcome/step.js +17 -14
- package/es/Welcome/style/index.d.ts +10 -0
- package/es/Welcome/style/index.js +141 -0
- package/es/_util/genComponentStyleHook.d.ts +4 -3
- package/es/_util/genComponentStyleHook.js +1 -1
- package/es/index.d.ts +0 -5
- package/es/index.js +0 -3
- package/es/locale/en-US.js +0 -4
- package/es/locale/ja-JP.d.ts +3 -0
- package/es/locale/ja-JP.js +38 -0
- package/es/locale/zh-CN.js +0 -4
- package/es/locale/zh-TW.js +0 -4
- package/lib/Action/Group.js +122 -46
- package/lib/Action/Item.d.ts +6 -15
- package/lib/Action/Item.js +66 -76
- package/lib/Action/index.d.ts +6 -3
- package/lib/Action/style/index.d.ts +2 -2
- package/lib/Action/style/index.js +16 -1
- package/lib/BackgroundTaskManager/RefreshMan.js +3 -12
- package/lib/BackgroundTaskManager/index.js +3 -12
- package/lib/BasicLayout/Header.js +120 -62
- package/lib/BasicLayout/index.js +166 -143
- package/lib/BasicLayout/locale/ja-JP.d.ts +13 -0
- package/lib/BasicLayout/locale/ja-JP.js +36 -0
- package/lib/BasicLayout/style/index.js +32 -23
- package/lib/BatchOperationBar/index.d.ts +0 -1
- package/lib/BatchOperationBar/index.js +70 -51
- package/lib/BatchOperationBar/locale/ja-JP.d.ts +7 -0
- package/lib/{TaskGraph/locale/en-US.js → BatchOperationBar/locale/ja-JP.js} +10 -16
- package/lib/BatchOperationBar/style/index.d.ts +10 -0
- package/lib/BatchOperationBar/style/index.js +82 -0
- package/lib/Boundary/Components/Code.js +25 -13
- package/lib/Boundary/Components/Exception.js +70 -49
- package/lib/Boundary/Components/Function.js +20 -8
- package/lib/Boundary/index.d.ts +0 -1
- package/lib/Boundary/index.js +0 -1
- package/lib/Boundary/locale/en-US.js +1 -1
- package/lib/Boundary/locale/ja-JP.d.ts +11 -0
- package/lib/Boundary/locale/ja-JP.js +34 -0
- package/lib/Boundary/locale/zh-CN.js +1 -1
- package/lib/Boundary/locale/zh-TW.js +1 -1
- package/lib/Boundary/style/index.d.ts +10 -0
- package/lib/Boundary/style/index.js +74 -0
- package/lib/ContentWithIcon/index.d.ts +0 -1
- package/lib/ContentWithIcon/index.js +44 -33
- package/lib/ContentWithIcon/style/index.d.ts +10 -0
- package/lib/ContentWithIcon/style/index.js +57 -0
- package/lib/ContentWithQuestion/index.js +8 -3
- package/lib/DateRanger/PickerPanel.js +237 -219
- package/lib/DateRanger/Ranger.d.ts +4 -1
- package/lib/DateRanger/Ranger.js +413 -239
- package/lib/DateRanger/constant/index.js +1 -1
- package/lib/DateRanger/locale/ja-JP.d.ts +56 -0
- package/lib/DateRanger/locale/ja-JP.js +49 -0
- package/lib/DateRanger/style/index.d.ts +10 -0
- package/lib/DateRanger/style/index.js +195 -0
- package/lib/Dialog/Anchor.d.ts +2 -10
- package/lib/Dialog/Anchor.js +59 -58
- package/lib/Dialog/EventProxy.js +3 -12
- package/lib/Dialog/index.d.ts +0 -1
- package/lib/Dialog/index.js +514 -466
- package/lib/Dialog/locale/ja-JP.d.ts +5 -0
- package/lib/{GraphToolbar/locale/en-US.js → Dialog/locale/ja-JP.js} +8 -12
- package/lib/Dialog/locale/zh-CN.js +1 -1
- package/lib/Dialog/locale/zh-TW.js +1 -1
- package/lib/Dialog/style/index.d.ts +10 -0
- package/lib/Dialog/style/index.js +135 -0
- package/lib/DocDialog/index.js +3 -2
- package/lib/DocDialog/locale/ja-JP.d.ts +2 -0
- package/lib/DocDialog/locale/ja-JP.js +25 -0
- package/lib/FooterToolbar/index.js +3 -2
- package/lib/FooterToolbar/style/index.d.ts +0 -2
- package/lib/FooterToolbar/style/index.js +7 -18
- package/lib/FullscreenBox/index.d.ts +0 -1
- package/lib/FullscreenBox/index.js +51 -33
- package/lib/FullscreenBox/locale/ja-JP.d.ts +2 -0
- package/lib/FullscreenBox/locale/ja-JP.js +25 -0
- package/lib/FullscreenBox/style/index.d.ts +10 -0
- package/lib/FullscreenBox/style/index.js +86 -0
- package/lib/Highlight/DiffView/DiffCells.js +17 -10
- package/lib/Highlight/DiffView/index.d.ts +0 -1
- package/lib/Highlight/DiffView/index.js +38 -34
- package/lib/Highlight/HighlightCell.js +13 -10
- package/lib/Highlight/JsonView.d.ts +0 -1
- package/lib/Highlight/JsonView.js +18 -17
- package/lib/Highlight/index.d.ts +0 -1
- package/lib/Highlight/index.js +60 -52
- package/lib/Highlight/locale/ja-JP.d.ts +4 -0
- package/lib/{GraphToolbar/locale/zh-CN.js → Highlight/locale/ja-JP.js} +7 -12
- package/lib/Highlight/style/index.d.ts +10 -0
- package/lib/Highlight/style/index.js +293 -0
- package/lib/IconFont/index.js +2 -12
- package/lib/LightFilter/index.js +3 -2
- package/lib/LocaleDropdown/index.js +15 -21
- package/lib/Login/ActivateForm.d.ts +0 -1
- package/lib/Login/ActivateForm.js +65 -64
- package/lib/Login/LoginForm.d.ts +0 -1
- package/lib/Login/LoginForm.js +134 -113
- package/lib/Login/RegisterForm.d.ts +0 -1
- package/lib/Login/RegisterForm.js +90 -89
- package/lib/Login/index.d.ts +0 -1
- package/lib/Login/index.js +102 -72
- package/lib/Login/locale/ja-JP.d.ts +28 -0
- package/lib/Login/locale/ja-JP.js +51 -0
- package/lib/Login/locale/zh-CN.js +2 -2
- package/lib/Login/style/index.d.ts +10 -0
- package/lib/Login/style/index.js +267 -0
- package/lib/NavMenu/index.d.ts +1 -2
- package/lib/NavMenu/index.js +22 -18
- package/lib/NavMenu/style/index.d.ts +10 -0
- package/lib/NavMenu/style/index.js +78 -0
- package/lib/PageContainer/ItemRender.js +5 -5
- package/lib/PageContainer/index.d.ts +2 -0
- package/lib/PageContainer/index.js +86 -10
- package/lib/PageContainer/locale/en-US.d.ts +1 -0
- package/lib/PageContainer/locale/en-US.js +2 -1
- package/lib/PageContainer/locale/ja-JP.d.ts +5 -0
- package/lib/{GraphToolbar/locale/zh-TW.js → PageContainer/locale/ja-JP.js} +8 -12
- package/lib/PageContainer/locale/zh-CN.d.ts +1 -0
- package/lib/PageContainer/locale/zh-CN.js +2 -1
- package/lib/PageContainer/locale/zh-TW.d.ts +1 -0
- package/lib/PageContainer/locale/zh-TW.js +2 -1
- package/lib/PageContainer/style/index.js +44 -13
- package/lib/PageLoading/index.js +6 -16
- package/lib/Password/Content.js +38 -42
- package/lib/Password/index.js +83 -68
- package/lib/Password/locale/ja-JP.d.ts +13 -0
- package/lib/Password/locale/ja-JP.js +36 -0
- package/lib/ProCard/index.d.ts +2 -1
- package/lib/ProCard/index.js +22 -8
- package/lib/ProCard/style/index.d.ts +2 -2
- package/lib/ProCard/style/index.js +18 -3
- package/lib/ProTable/index.d.ts +1 -1
- package/lib/ProTable/index.js +22 -10
- package/lib/ProTable/style/index.d.ts +2 -2
- package/lib/ProTable/style/index.js +18 -2
- package/lib/Ranger/QuickPicker.js +28 -17
- package/lib/Ranger/Ranger.d.ts +0 -1
- package/lib/Ranger/Ranger.js +49 -43
- package/lib/Ranger/locale/ja-JP.d.ts +28 -0
- package/lib/Ranger/locale/ja-JP.js +53 -0
- package/lib/Ranger/style/index.d.ts +10 -0
- package/lib/Ranger/style/index.js +82 -0
- package/lib/SideTip/Dragger.js +5 -4
- package/lib/SideTip/IconLoading.js +25 -25
- package/lib/SideTip/index.d.ts +0 -1
- package/lib/SideTip/index.js +55 -38
- package/lib/SideTip/locale/ja-JP.d.ts +2 -0
- package/lib/SideTip/locale/ja-JP.js +25 -0
- package/lib/SideTip/style/index.d.ts +10 -0
- package/lib/SideTip/style/index.js +211 -0
- package/lib/TagSelect/Group.d.ts +6 -6
- package/lib/TagSelect/Group.js +12 -7
- package/lib/TagSelect/Item.js +25 -20
- package/lib/TreeSearch/index.js +30 -35
- package/lib/Welcome/index.d.ts +0 -1
- package/lib/Welcome/index.js +72 -40
- package/lib/Welcome/locale/ja-JP.d.ts +5 -0
- package/lib/Welcome/locale/ja-JP.js +28 -0
- package/lib/Welcome/step/style/index.d.ts +10 -0
- package/lib/Welcome/step/style/index.js +74 -0
- package/lib/Welcome/step.d.ts +0 -1
- package/lib/Welcome/step.js +18 -7
- package/lib/Welcome/style/index.d.ts +10 -0
- package/lib/Welcome/style/index.js +188 -0
- package/lib/_util/genComponentStyleHook.d.ts +4 -3
- package/lib/_util/genComponentStyleHook.js +1 -1
- package/lib/index.d.ts +0 -5
- package/lib/index.js +0 -7
- package/lib/locale/LocaleWrapper.js +15 -14
- package/lib/locale/en-US.js +16 -20
- package/lib/locale/ja-JP.d.ts +3 -0
- package/lib/locale/ja-JP.js +67 -0
- package/lib/locale/zh-CN.js +17 -21
- package/lib/locale/zh-TW.js +15 -19
- package/package.json +8 -11
- package/dist/static/Inter.f6bcdfb6.woff2 +0 -0
- package/es/BatchOperationBar/index.less +0 -46
- package/es/BatchOperationBar/index.less.d.ts +0 -15
- package/es/Boundary/index.less +0 -36
- package/es/ContentWithIcon/index.less +0 -21
- package/es/DateRanger/index.less +0 -157
- package/es/Dialog/index.less +0 -116
- package/es/FullscreenBox/index.less +0 -49
- package/es/GraphToolbar/index.d.ts +0 -26
- package/es/GraphToolbar/index.js +0 -146
- package/es/GraphToolbar/index.less +0 -65
- package/es/GraphToolbar/locale/en-US.d.ts +0 -9
- package/es/GraphToolbar/locale/en-US.js +0 -8
- package/es/GraphToolbar/locale/zh-CN.d.ts +0 -9
- package/es/GraphToolbar/locale/zh-CN.js +0 -8
- package/es/GraphToolbar/locale/zh-TW.d.ts +0 -9
- package/es/GraphToolbar/locale/zh-TW.js +0 -8
- package/es/Highlight/index.less +0 -381
- package/es/Login/index.less +0 -268
- package/es/NavMenu/index.less +0 -50
- package/es/Ranger/index.less +0 -57
- package/es/SideTip/index.less +0 -180
- package/es/TaskGraph/Graph.d.ts +0 -24
- package/es/TaskGraph/Graph.js +0 -271
- package/es/TaskGraph/graph.less +0 -23
- package/es/TaskGraph/index.d.ts +0 -16
- package/es/TaskGraph/index.js +0 -178
- package/es/TaskGraph/index.less +0 -117
- package/es/TaskGraph/locale/en-US.d.ts +0 -13
- package/es/TaskGraph/locale/en-US.js +0 -12
- package/es/TaskGraph/locale/zh-CN.d.ts +0 -13
- package/es/TaskGraph/locale/zh-CN.js +0 -12
- package/es/TaskGraph/locale/zh-TW.d.ts +0 -13
- package/es/TaskGraph/locale/zh-TW.js +0 -12
- package/es/TaskGraph/register.d.ts +0 -7
- package/es/TaskGraph/register.js +0 -200
- package/es/Welcome/index.less +0 -185
- package/es/index.less +0 -1
- package/es/variable.less +0 -54
- package/lib/BatchOperationBar/index.less +0 -46
- package/lib/BatchOperationBar/index.less.d.ts +0 -15
- package/lib/Boundary/index.less +0 -36
- package/lib/ContentWithIcon/index.less +0 -21
- package/lib/DateRanger/index.less +0 -157
- package/lib/Dialog/index.less +0 -116
- package/lib/FullscreenBox/index.less +0 -49
- package/lib/GraphToolbar/index.d.ts +0 -26
- package/lib/GraphToolbar/index.js +0 -154
- package/lib/GraphToolbar/index.less +0 -65
- package/lib/GraphToolbar/locale/en-US.d.ts +0 -9
- package/lib/GraphToolbar/locale/zh-CN.d.ts +0 -9
- package/lib/GraphToolbar/locale/zh-TW.d.ts +0 -9
- package/lib/Highlight/index.less +0 -381
- package/lib/Login/index.less +0 -268
- package/lib/NavMenu/index.less +0 -50
- package/lib/Ranger/index.less +0 -57
- package/lib/SideTip/index.less +0 -180
- package/lib/TaskGraph/Graph.d.ts +0 -24
- package/lib/TaskGraph/Graph.js +0 -261
- package/lib/TaskGraph/graph.less +0 -23
- package/lib/TaskGraph/index.d.ts +0 -16
- package/lib/TaskGraph/index.js +0 -164
- package/lib/TaskGraph/index.less +0 -117
- package/lib/TaskGraph/locale/en-US.d.ts +0 -13
- package/lib/TaskGraph/locale/zh-CN.d.ts +0 -13
- package/lib/TaskGraph/locale/zh-CN.js +0 -36
- package/lib/TaskGraph/locale/zh-TW.d.ts +0 -13
- package/lib/TaskGraph/locale/zh-TW.js +0 -36
- package/lib/TaskGraph/register.d.ts +0 -7
- package/lib/TaskGraph/register.js +0 -205
- package/lib/Welcome/index.less +0 -185
- package/lib/index.less +0 -1
- package/lib/variable.less +0 -54
package/lib/Login/LoginForm.js
CHANGED
|
@@ -35,11 +35,9 @@ 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 =
|
|
38
|
+
var import_react = require("react");
|
|
39
39
|
var import_design2 = require("@oceanbase/design");
|
|
40
|
-
var
|
|
41
|
-
var import_index = require("./index.less");
|
|
42
|
-
var prefix = (0, import_util.getPrefix)("login");
|
|
40
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
43
41
|
var Login = ({
|
|
44
42
|
loading,
|
|
45
43
|
locale,
|
|
@@ -53,129 +51,152 @@ var Login = ({
|
|
|
53
51
|
passwordOptional = false,
|
|
54
52
|
...restProps
|
|
55
53
|
}) => {
|
|
54
|
+
const { getPrefixCls } = (0, import_react.useContext)(import_design2.ConfigProvider.ConfigContext);
|
|
55
|
+
const prefixCls = getPrefixCls("login");
|
|
56
56
|
const { token } = import_design2.theme.useToken();
|
|
57
57
|
const [focusInput, setFocusInput] = (0, import_react.useState)("");
|
|
58
|
-
return /* @__PURE__ */
|
|
58
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
59
59
|
import_design.Form,
|
|
60
60
|
{
|
|
61
61
|
layout: "vertical",
|
|
62
62
|
hideRequiredMark: true,
|
|
63
|
-
className: `${
|
|
63
|
+
className: `${prefixCls}-form`,
|
|
64
64
|
style: { paddingLeft: showAuthCode ? 96 : 0 },
|
|
65
65
|
...restProps,
|
|
66
|
-
"data-testid": "login.form"
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
import_design.Form.Item,
|
|
71
|
-
{
|
|
72
|
-
name: "username",
|
|
73
|
-
rules: [
|
|
66
|
+
"data-testid": "login.form",
|
|
67
|
+
children: [
|
|
68
|
+
errorMessage && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
69
|
+
import_design.Alert,
|
|
74
70
|
{
|
|
75
|
-
|
|
76
|
-
|
|
71
|
+
type: "error",
|
|
72
|
+
showIcon: true,
|
|
73
|
+
className: `${prefixCls}-alert`,
|
|
74
|
+
message: errorMessage
|
|
77
75
|
}
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
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 ? [] : [
|
|
76
|
+
),
|
|
77
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
78
|
+
import_design.Form.Item,
|
|
103
79
|
{
|
|
104
|
-
|
|
105
|
-
|
|
80
|
+
name: "username",
|
|
81
|
+
rules: [
|
|
82
|
+
{
|
|
83
|
+
required: true,
|
|
84
|
+
message: locale.usernameMessage
|
|
85
|
+
}
|
|
86
|
+
],
|
|
87
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
88
|
+
import_design.Input,
|
|
89
|
+
{
|
|
90
|
+
size: "large",
|
|
91
|
+
prefix: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.UserOutlined, { style: { color: token.colorIcon } }),
|
|
92
|
+
placeholder: locale.usernamePlaceholder,
|
|
93
|
+
onFocus: () => {
|
|
94
|
+
setFocusInput("username");
|
|
95
|
+
},
|
|
96
|
+
onBlur: () => {
|
|
97
|
+
setFocusInput("");
|
|
98
|
+
},
|
|
99
|
+
className: (0, import_classnames.default)({
|
|
100
|
+
[`${prefixCls}-form-focus-input`]: focusInput === "username"
|
|
101
|
+
}),
|
|
102
|
+
...(componentProps == null ? void 0 : componentProps.username) || {}
|
|
103
|
+
}
|
|
104
|
+
)
|
|
106
105
|
}
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
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: [
|
|
106
|
+
),
|
|
107
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
108
|
+
import_design.Form.Item,
|
|
132
109
|
{
|
|
133
|
-
|
|
134
|
-
|
|
110
|
+
name: "password",
|
|
111
|
+
rules: passwordOptional ? [] : [
|
|
112
|
+
{
|
|
113
|
+
required: true,
|
|
114
|
+
message: locale.passwordMessage
|
|
115
|
+
}
|
|
116
|
+
],
|
|
117
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
118
|
+
import_design.Input.Password,
|
|
119
|
+
{
|
|
120
|
+
size: "large",
|
|
121
|
+
visibilityToggle: true,
|
|
122
|
+
autoComplete: "current-password",
|
|
123
|
+
prefix: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.LockOutlined, { style: { color: token.colorIcon } }),
|
|
124
|
+
placeholder: locale.passwordPlaceholder,
|
|
125
|
+
onFocus: () => {
|
|
126
|
+
setFocusInput("password");
|
|
127
|
+
},
|
|
128
|
+
onBlur: () => {
|
|
129
|
+
setFocusInput("");
|
|
130
|
+
},
|
|
131
|
+
className: focusInput === "password" ? `${prefixCls}-form-focus-input` : "",
|
|
132
|
+
...(componentProps == null ? void 0 : componentProps.password) || {}
|
|
133
|
+
}
|
|
134
|
+
)
|
|
135
135
|
}
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
136
|
+
),
|
|
137
|
+
showAuthCode && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_design.Space, { className: `${prefixCls}-auth-code`, children: [
|
|
138
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
139
|
+
import_design.Form.Item,
|
|
140
|
+
{
|
|
141
|
+
name: "authCode",
|
|
142
|
+
rules: [
|
|
143
|
+
{
|
|
144
|
+
required: true,
|
|
145
|
+
message: "验证码不能为空"
|
|
146
|
+
}
|
|
147
|
+
],
|
|
148
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
149
|
+
import_design.Input,
|
|
150
|
+
{
|
|
151
|
+
size: "large",
|
|
152
|
+
prefix: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.SafetyCertificateOutlined, { style: { color: token.colorIcon } }),
|
|
153
|
+
placeholder: "请输入验证码",
|
|
154
|
+
onFocus: () => {
|
|
155
|
+
setFocusInput("authCode");
|
|
156
|
+
},
|
|
157
|
+
onBlur: () => {
|
|
158
|
+
setFocusInput("");
|
|
159
|
+
},
|
|
160
|
+
className: (0, import_classnames.default)({
|
|
161
|
+
[`${prefixCls}-form-focus-input`]: focusInput === "authCode"
|
|
162
|
+
}),
|
|
163
|
+
...(componentProps == null ? void 0 : componentProps.authCode) || {}
|
|
164
|
+
}
|
|
165
|
+
)
|
|
166
|
+
}
|
|
167
|
+
),
|
|
168
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: (0, import_classnames.default)(`${prefixCls}-code-btn`), children: [
|
|
169
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("img", { src: authCodeImg, alt: "", width: "96", height: "38" }),
|
|
170
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: `${prefixCls}-code-mask`, onClick: onAuthCodeImgChange, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.SyncOutlined, {}) })
|
|
171
|
+
] })
|
|
172
|
+
] }),
|
|
173
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_design.Form.Item, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
174
|
+
import_design.Button,
|
|
175
|
+
{
|
|
176
|
+
htmlType: "submit",
|
|
177
|
+
size: "large",
|
|
178
|
+
loading,
|
|
179
|
+
type: "primary",
|
|
180
|
+
block: true,
|
|
181
|
+
className: `${prefixCls}-submit-btn`,
|
|
182
|
+
children: locale.loginText
|
|
183
|
+
}
|
|
184
|
+
) }),
|
|
185
|
+
showOtherLoginButton && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_design.Form.Item, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
186
|
+
import_design.Button,
|
|
187
|
+
{
|
|
188
|
+
htmlType: "button",
|
|
189
|
+
size: "large",
|
|
190
|
+
loading: otherLoginProps.loading,
|
|
191
|
+
type: "primary",
|
|
192
|
+
block: true,
|
|
193
|
+
onClick: otherLoginProps.onFinish,
|
|
194
|
+
className: `${prefixCls}-submit-btn`,
|
|
195
|
+
children: locale.otherLoginText
|
|
196
|
+
}
|
|
197
|
+
) })
|
|
198
|
+
]
|
|
199
|
+
}
|
|
179
200
|
);
|
|
180
201
|
};
|
|
181
202
|
var LoginForm_default = Login;
|
|
@@ -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/RegisterForm.tsx
|
|
@@ -35,11 +25,9 @@ __export(RegisterForm_exports, {
|
|
|
35
25
|
module.exports = __toCommonJS(RegisterForm_exports);
|
|
36
26
|
var import_design = require("@oceanbase/design");
|
|
37
27
|
var import_lodash = require("lodash");
|
|
38
|
-
var import_react =
|
|
39
|
-
var
|
|
40
|
-
var import_index = require("./index.less");
|
|
28
|
+
var import_react = require("react");
|
|
29
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
41
30
|
var PASSWORD_REGEX = /^(?=(.*[a-z]){2,})(?=(.*[A-Z]){2,})(?=(.*\d){2,})(?=(.*[ !"#\$%&'\(\)\*\+,-\./:;<=>\?@\[\\\]\^_`\{\|\}~]){2,})[A-Za-z\d !"#\$%&'\(\)\*\+,-\./:;<=>\?@\[\\\]\^_`\{\|\}~]{8,32}$/;
|
|
42
|
-
var prefix = (0, import_util.getPrefix)("login");
|
|
43
31
|
var Register = ({
|
|
44
32
|
isUserExists,
|
|
45
33
|
locale,
|
|
@@ -48,6 +36,8 @@ var Register = ({
|
|
|
48
36
|
errorMessage,
|
|
49
37
|
...restProps
|
|
50
38
|
}) => {
|
|
39
|
+
const { getPrefixCls } = (0, import_react.useContext)(import_design.ConfigProvider.ConfigContext);
|
|
40
|
+
const prefixCls = getPrefixCls("login");
|
|
51
41
|
const [form] = import_design.Form.useForm();
|
|
52
42
|
const handleValidateAccount = (0, import_react.useCallback)(
|
|
53
43
|
async (rule, value) => {
|
|
@@ -80,94 +70,105 @@ var Register = ({
|
|
|
80
70
|
pattern: PASSWORD_REGEX,
|
|
81
71
|
message: locale.passwordHelp
|
|
82
72
|
};
|
|
83
|
-
return /* @__PURE__ */
|
|
73
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
84
74
|
import_design.Form,
|
|
85
75
|
{
|
|
86
76
|
layout: "vertical",
|
|
87
77
|
requiredMark: false,
|
|
88
|
-
className: `${
|
|
78
|
+
className: `${prefixCls}-form`,
|
|
89
79
|
form,
|
|
90
80
|
...restProps,
|
|
91
|
-
"data-testid": "login.register"
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
import_design.Form.Item,
|
|
96
|
-
{
|
|
97
|
-
name: "username",
|
|
98
|
-
label: locale.usernameLabel,
|
|
99
|
-
extra: locale.usernameHelp,
|
|
100
|
-
validateFirst: true,
|
|
101
|
-
rules: [
|
|
102
|
-
{
|
|
103
|
-
required: true,
|
|
104
|
-
whitespace: true,
|
|
105
|
-
message: locale.usernameMessage
|
|
106
|
-
},
|
|
107
|
-
{
|
|
108
|
-
min: 4,
|
|
109
|
-
max: 48,
|
|
110
|
-
message: locale.usernameLengthMessage
|
|
111
|
-
},
|
|
81
|
+
"data-testid": "login.register",
|
|
82
|
+
children: [
|
|
83
|
+
errorMessage && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
84
|
+
import_design.Alert,
|
|
112
85
|
{
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
86
|
+
type: "error",
|
|
87
|
+
showIcon: true,
|
|
88
|
+
className: `${prefixCls}-alert`,
|
|
89
|
+
message: errorMessage
|
|
90
|
+
}
|
|
91
|
+
),
|
|
92
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
93
|
+
import_design.Form.Item,
|
|
116
94
|
{
|
|
117
|
-
|
|
95
|
+
name: "username",
|
|
96
|
+
label: locale.usernameLabel,
|
|
97
|
+
extra: locale.usernameHelp,
|
|
98
|
+
validateFirst: true,
|
|
99
|
+
rules: [
|
|
100
|
+
{
|
|
101
|
+
required: true,
|
|
102
|
+
whitespace: true,
|
|
103
|
+
message: locale.usernameMessage
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
min: 4,
|
|
107
|
+
max: 48,
|
|
108
|
+
message: locale.usernameLengthMessage
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
pattern: /^[a-zA-Z0-9_.+@#$%]+$/,
|
|
112
|
+
message: locale.usernameFormatMessage
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
validator: handleValidateAccount
|
|
116
|
+
}
|
|
117
|
+
],
|
|
118
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_design.Input, { size: "large", autoComplete: "new-account", autoFocus: true })
|
|
118
119
|
}
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
),
|
|
123
|
-
/* @__PURE__ */ import_react.default.createElement(
|
|
124
|
-
import_design.Form.Item,
|
|
125
|
-
{
|
|
126
|
-
name: "password",
|
|
127
|
-
label: locale.passwordLabel,
|
|
128
|
-
dependencies: ["confirmPassword"],
|
|
129
|
-
help: passwordRegexpRule.message,
|
|
130
|
-
validateFirst: true,
|
|
131
|
-
rules: [
|
|
120
|
+
),
|
|
121
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
122
|
+
import_design.Form.Item,
|
|
132
123
|
{
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
124
|
+
name: "password",
|
|
125
|
+
label: locale.passwordLabel,
|
|
126
|
+
dependencies: ["confirmPassword"],
|
|
127
|
+
help: passwordRegexpRule.message,
|
|
128
|
+
validateFirst: true,
|
|
129
|
+
rules: [
|
|
130
|
+
{
|
|
131
|
+
required: true,
|
|
132
|
+
message: locale.passwordMessage
|
|
133
|
+
},
|
|
134
|
+
passwordRegexpRule
|
|
135
|
+
],
|
|
136
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_design.Input.Password, { size: "large", visibilityToggle: true, autoComplete: "new-password" })
|
|
137
|
+
}
|
|
138
|
+
),
|
|
139
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
140
|
+
import_design.Form.Item,
|
|
149
141
|
{
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
142
|
+
name: "confirmPassword",
|
|
143
|
+
label: locale.confirmPwdLabel,
|
|
144
|
+
dependencies: ["password"],
|
|
145
|
+
validateFirst: true,
|
|
146
|
+
rules: [
|
|
147
|
+
{
|
|
148
|
+
required: true,
|
|
149
|
+
message: locale.confirmPwdMessage
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
validator: handleValidateConfirmPassword
|
|
153
|
+
}
|
|
154
|
+
],
|
|
155
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_design.Input.Password, { size: "large", visibilityToggle: true, autoComplete: "new-password" })
|
|
156
|
+
}
|
|
157
|
+
),
|
|
158
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
159
|
+
import_design.Button,
|
|
153
160
|
{
|
|
154
|
-
|
|
161
|
+
htmlType: "submit",
|
|
162
|
+
size: "large",
|
|
163
|
+
loading,
|
|
164
|
+
type: "primary",
|
|
165
|
+
block: true,
|
|
166
|
+
className: `${prefixCls}-submit-btn`,
|
|
167
|
+
children: locale.registerBtn
|
|
155
168
|
}
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
),
|
|
160
|
-
/* @__PURE__ */ import_react.default.createElement(
|
|
161
|
-
import_design.Button,
|
|
162
|
-
{
|
|
163
|
-
htmlType: "submit",
|
|
164
|
-
loading,
|
|
165
|
-
type: "primary",
|
|
166
|
-
block: true,
|
|
167
|
-
className: `${prefix}-submit-btn`
|
|
168
|
-
},
|
|
169
|
-
locale.registerBtn
|
|
170
|
-
)
|
|
169
|
+
)
|
|
170
|
+
]
|
|
171
|
+
}
|
|
171
172
|
);
|
|
172
173
|
};
|
|
173
174
|
var RegisterForm_default = Register;
|
package/lib/Login/index.d.ts
CHANGED
|
@@ -5,7 +5,6 @@ import type { IActivateFormProps } from './ActivateForm';
|
|
|
5
5
|
import type { ILoginFormProps } from './LoginForm';
|
|
6
6
|
import type { IRegisterFormProps } from './RegisterForm';
|
|
7
7
|
import type { Locale } from '../interface';
|
|
8
|
-
import './index.less';
|
|
9
8
|
export interface Values {
|
|
10
9
|
username: string;
|
|
11
10
|
password: string;
|