@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/index.js
CHANGED
|
@@ -36,9 +36,8 @@ var import_ahooks = require("ahooks");
|
|
|
36
36
|
var import_design = require("@oceanbase/design");
|
|
37
37
|
var import_design2 = require("@oceanbase/design");
|
|
38
38
|
var import_classnames = __toESM(require("classnames"));
|
|
39
|
-
var import_react =
|
|
39
|
+
var import_react = require("react");
|
|
40
40
|
var import_LocaleWrapper = __toESM(require("../locale/LocaleWrapper"));
|
|
41
|
-
var import_util = require("../_util");
|
|
42
41
|
var import_ActivateForm = __toESM(require("./ActivateForm"));
|
|
43
42
|
var import_zh_CN = __toESM(require("./locale/zh-CN"));
|
|
44
43
|
var import_LoginForm = __toESM(require("./LoginForm"));
|
|
@@ -46,8 +45,8 @@ var import_RegisterForm = __toESM(require("./RegisterForm"));
|
|
|
46
45
|
var import_oceanbase_logo = __toESM(require("../assets/logo/oceanbase_logo.svg"));
|
|
47
46
|
var import_oceanbase_logo_dark = __toESM(require("../assets/logo/oceanbase_logo_dark.svg"));
|
|
48
47
|
var import_LocaleDropdown = __toESM(require("../LocaleDropdown"));
|
|
49
|
-
var
|
|
50
|
-
var
|
|
48
|
+
var import_style = __toESM(require("./style"));
|
|
49
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
51
50
|
var Login = (props) => {
|
|
52
51
|
const {
|
|
53
52
|
logo,
|
|
@@ -71,6 +70,9 @@ var Login = (props) => {
|
|
|
71
70
|
isMobile,
|
|
72
71
|
style = {}
|
|
73
72
|
} = props;
|
|
73
|
+
const { getPrefixCls, theme } = (0, import_react.useContext)(import_design.ConfigProvider.ConfigContext);
|
|
74
|
+
const prefixCls = getPrefixCls("login");
|
|
75
|
+
const { wrapSSR } = (0, import_style.default)(prefixCls);
|
|
74
76
|
const [showRegister, setShowRegister] = (0, import_ahooks.useControllableValue)(props, {
|
|
75
77
|
defaultValue: false,
|
|
76
78
|
valuePropName: "showRegister",
|
|
@@ -82,7 +84,6 @@ var Login = (props) => {
|
|
|
82
84
|
trigger: "onShowActivateChange"
|
|
83
85
|
});
|
|
84
86
|
const isLoading = (loginProps == null ? void 0 : loginProps.loading) || (registerProps == null ? void 0 : registerProps.loading) || (otherLoginProps == null ? void 0 : otherLoginProps.loading);
|
|
85
|
-
const { theme } = (0, import_react.useContext)(import_design.ConfigProvider.ConfigContext);
|
|
86
87
|
const switchForm = (0, import_react.useCallback)(() => {
|
|
87
88
|
if (isLoading) {
|
|
88
89
|
import_design2.message.warning(locale.isLoadingWarn);
|
|
@@ -96,75 +97,104 @@ var Login = (props) => {
|
|
|
96
97
|
setShowActivate(!showActivate);
|
|
97
98
|
}, [showActivate, isLoading]);
|
|
98
99
|
const showWaterMark = !showRegister;
|
|
99
|
-
return
|
|
100
|
-
|
|
101
|
-
{
|
|
102
|
-
className: (0, import_classnames.default)(`${prefix}-container`, {
|
|
103
|
-
[`${prefix}-container-with-board`]: board,
|
|
104
|
-
[`${prefix}-container-mobile`]: isMobile
|
|
105
|
-
}),
|
|
106
|
-
style
|
|
107
|
-
},
|
|
108
|
-
/* @__PURE__ */ import_react.default.createElement("div", { className: `${prefix}-bg`, style: { backgroundImage: `url(${bgImage})` } }, /* @__PURE__ */ import_react.default.createElement("div", { className: `${prefix}-info` }, title && /* @__PURE__ */ import_react.default.createElement("div", { className: `${prefix}-welcome` }, title), description && /* @__PURE__ */ import_react.default.createElement("div", { className: `${prefix}-start` }, description))),
|
|
109
|
-
/* @__PURE__ */ import_react.default.createElement("div", { className: `${prefix}-card` }, showLocale && /* @__PURE__ */ import_react.default.createElement(import_LocaleDropdown.default, { locales, className: `${prefix}-locale` }), board && /* @__PURE__ */ import_react.default.createElement("div", { className: `${prefix}-board` }, board), /* @__PURE__ */ import_react.default.createElement("div", { className: `${prefix}-content` }, showActivate ? /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement("img", { src: logo, alt: "", className: `${prefix}-activate-logo` }), /* @__PURE__ */ import_react.default.createElement(
|
|
110
|
-
import_design.Divider,
|
|
111
|
-
{
|
|
112
|
-
style: {
|
|
113
|
-
marginTop: 14,
|
|
114
|
-
marginBottom: 20
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
), /* @__PURE__ */ import_react.default.createElement(import_design.Typography.Title, { level: 3 }, locale.activeTitle), /* @__PURE__ */ import_react.default.createElement(import_design.Typography.Paragraph, null, locale.activeTitleDescrition), /* @__PURE__ */ import_react.default.createElement(
|
|
118
|
-
import_ActivateForm.default,
|
|
119
|
-
{
|
|
120
|
-
...activateFormProps,
|
|
121
|
-
locale,
|
|
122
|
-
errorMessage: alertProps == null ? void 0 : alertProps.message,
|
|
123
|
-
goBack
|
|
124
|
-
}
|
|
125
|
-
)) : /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, showRegister ? /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement("img", { src: logo, alt: "", className: `${prefix}-reigster-logo` }), /* @__PURE__ */ import_react.default.createElement(
|
|
126
|
-
import_design.Divider,
|
|
127
|
-
{
|
|
128
|
-
style: {
|
|
129
|
-
marginTop: 14,
|
|
130
|
-
marginBottom: 20
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
), /* @__PURE__ */ import_react.default.createElement(import_design.Typography.Title, { level: 3 }, locale.registerTitle), /* @__PURE__ */ import_react.default.createElement(
|
|
134
|
-
import_RegisterForm.default,
|
|
135
|
-
{
|
|
136
|
-
...registerProps,
|
|
137
|
-
locale,
|
|
138
|
-
errorMessage: alertProps == null ? void 0 : alertProps.message
|
|
139
|
-
}
|
|
140
|
-
)) : /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement("img", { src: logo, alt: "", className: `${prefix}-logo` }), /* @__PURE__ */ import_react.default.createElement(
|
|
141
|
-
import_LoginForm.default,
|
|
142
|
-
{
|
|
143
|
-
...loginProps,
|
|
144
|
-
otherLoginProps,
|
|
145
|
-
locale,
|
|
146
|
-
errorMessage: alertProps == null ? void 0 : alertProps.message,
|
|
147
|
-
showAuthCode,
|
|
148
|
-
showOtherLoginButton,
|
|
149
|
-
authCodeImg,
|
|
150
|
-
onAuthCodeImgChange
|
|
151
|
-
}
|
|
152
|
-
))), !!enableRegister && /* @__PURE__ */ import_react.default.createElement("div", { className: `${prefix}-switch-btn` }, /* @__PURE__ */ import_react.default.createElement(import_design.Button, { type: "link", onClick: switchForm, "data-testid": "login.register.btn" }, showRegister ? locale.switchLoginLabel : locale.switchRegisterLabel)), showWaterMark ? /* @__PURE__ */ import_react.default.createElement(
|
|
100
|
+
return wrapSSR(
|
|
101
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_design.App, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
153
102
|
"div",
|
|
154
103
|
{
|
|
155
|
-
className: `${
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
104
|
+
className: (0, import_classnames.default)(`${prefixCls}-container`, {
|
|
105
|
+
[`${prefixCls}-container-with-board`]: board,
|
|
106
|
+
[`${prefixCls}-container-mobile`]: isMobile
|
|
107
|
+
}),
|
|
108
|
+
style,
|
|
109
|
+
children: [
|
|
110
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: `${prefixCls}-bg`, style: { backgroundImage: `url(${bgImage})` }, children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: `${prefixCls}-info`, children: [
|
|
111
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: `${prefixCls}-welcome`, children: title }),
|
|
112
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: `${prefixCls}-start`, children: description })
|
|
113
|
+
] }) }),
|
|
114
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: `${prefixCls}-card`, children: [
|
|
115
|
+
showLocale && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_LocaleDropdown.default, { locales, className: `${prefixCls}-locale` }),
|
|
116
|
+
board && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: `${prefixCls}-board`, children: board }),
|
|
117
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: `${prefixCls}-content`, children: [
|
|
118
|
+
showActivate ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
119
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("img", { src: logo, alt: "", className: `${prefixCls}-activate-logo` }),
|
|
120
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
121
|
+
import_design.Divider,
|
|
122
|
+
{
|
|
123
|
+
style: {
|
|
124
|
+
marginTop: 14,
|
|
125
|
+
marginBottom: 20
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
),
|
|
129
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_design.Typography.Title, { level: 3, children: locale.activeTitle }),
|
|
130
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_design.Typography.Paragraph, { children: locale.activeTitleDescrition }),
|
|
131
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
132
|
+
import_ActivateForm.default,
|
|
133
|
+
{
|
|
134
|
+
...activateFormProps,
|
|
135
|
+
locale,
|
|
136
|
+
errorMessage: alertProps == null ? void 0 : alertProps.message,
|
|
137
|
+
goBack
|
|
138
|
+
}
|
|
139
|
+
)
|
|
140
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, { children: showRegister ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
141
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("img", { src: logo, alt: "", className: `${prefixCls}-reigster-logo` }),
|
|
142
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
143
|
+
import_design.Divider,
|
|
144
|
+
{
|
|
145
|
+
style: {
|
|
146
|
+
marginTop: 14,
|
|
147
|
+
marginBottom: 20
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
),
|
|
151
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_design.Typography.Title, { level: 3, children: locale.registerTitle }),
|
|
152
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
153
|
+
import_RegisterForm.default,
|
|
154
|
+
{
|
|
155
|
+
...registerProps,
|
|
156
|
+
locale,
|
|
157
|
+
errorMessage: alertProps == null ? void 0 : alertProps.message
|
|
158
|
+
}
|
|
159
|
+
)
|
|
160
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
161
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("img", { src: logo, alt: "", className: `${prefixCls}-logo` }),
|
|
162
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
163
|
+
import_LoginForm.default,
|
|
164
|
+
{
|
|
165
|
+
...loginProps,
|
|
166
|
+
otherLoginProps,
|
|
167
|
+
locale,
|
|
168
|
+
errorMessage: alertProps == null ? void 0 : alertProps.message,
|
|
169
|
+
showAuthCode,
|
|
170
|
+
showOtherLoginButton,
|
|
171
|
+
authCodeImg,
|
|
172
|
+
onAuthCodeImgChange
|
|
173
|
+
}
|
|
174
|
+
)
|
|
175
|
+
] }) }),
|
|
176
|
+
!!enableRegister && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: `${prefixCls}-switch-btn`, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_design.Button, { type: "link", onClick: switchForm, "data-testid": "login.register.btn", children: showRegister ? locale.switchLoginLabel : locale.switchRegisterLabel }) }),
|
|
177
|
+
showWaterMark ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
178
|
+
"div",
|
|
179
|
+
{
|
|
180
|
+
className: `${prefixCls}-watermark-wrapper`,
|
|
181
|
+
style: { paddingLeft: showAuthCode ? 96 : 0 },
|
|
182
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
183
|
+
"img",
|
|
184
|
+
{
|
|
185
|
+
src: (theme == null ? void 0 : theme.isDark) ? import_oceanbase_logo_dark.default : import_oceanbase_logo.default,
|
|
186
|
+
alt: "",
|
|
187
|
+
className: `${prefixCls}-watermark`
|
|
188
|
+
}
|
|
189
|
+
)
|
|
190
|
+
}
|
|
191
|
+
) : null
|
|
192
|
+
] })
|
|
193
|
+
] })
|
|
194
|
+
]
|
|
195
|
+
}
|
|
196
|
+
) })
|
|
197
|
+
);
|
|
168
198
|
};
|
|
169
199
|
var Login_default = (0, import_LocaleWrapper.default)({
|
|
170
200
|
componentName: "Login",
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
usernamePlaceholder: string;
|
|
3
|
+
usernameMessage: string;
|
|
4
|
+
passwordPlaceholder: string;
|
|
5
|
+
passwordMessage: string;
|
|
6
|
+
loginText: string;
|
|
7
|
+
otherLoginText: string;
|
|
8
|
+
isLoadingWarn: string;
|
|
9
|
+
usernameLabel: string;
|
|
10
|
+
switchLoginLabel: string;
|
|
11
|
+
switchRegisterLabel: string;
|
|
12
|
+
userExistMessage: string;
|
|
13
|
+
usernameFormatMessage: string;
|
|
14
|
+
samePasswordMessage: string;
|
|
15
|
+
usernameHelp: string;
|
|
16
|
+
usernameLengthMessage: string;
|
|
17
|
+
passwordLabel: string;
|
|
18
|
+
passwordHelp: string;
|
|
19
|
+
confirmPwdLabel: string;
|
|
20
|
+
confirmPwdMessage: string;
|
|
21
|
+
registerBtn: string;
|
|
22
|
+
registerTitle: string;
|
|
23
|
+
activeTitle: string;
|
|
24
|
+
activeTitleDescrition: string;
|
|
25
|
+
activeSubmitBtn: string;
|
|
26
|
+
activeBackBtn: string;
|
|
27
|
+
};
|
|
28
|
+
export default _default;
|
|
@@ -0,0 +1,51 @@
|
|
|
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/Login/locale/ja-JP.ts
|
|
20
|
+
var ja_JP_exports = {};
|
|
21
|
+
__export(ja_JP_exports, {
|
|
22
|
+
default: () => ja_JP_default
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(ja_JP_exports);
|
|
25
|
+
var ja_JP_default = {
|
|
26
|
+
usernamePlaceholder: "ユーザー名を入力してください",
|
|
27
|
+
usernameMessage: "ユーザー名を入力してください",
|
|
28
|
+
passwordPlaceholder: "パスワードを入力してください",
|
|
29
|
+
passwordMessage: "パスワードを入力してください",
|
|
30
|
+
loginText: "ログイン",
|
|
31
|
+
otherLoginText: "外部アカウントでログイン",
|
|
32
|
+
isLoadingWarn: "処理中",
|
|
33
|
+
usernameLabel: "ユーザー名",
|
|
34
|
+
switchLoginLabel: "既存アカウントにログイン",
|
|
35
|
+
switchRegisterLabel: "アカウントを作成",
|
|
36
|
+
userExistMessage: "ユーザー名は既に存在します",
|
|
37
|
+
usernameFormatMessage: "ユーザー名の形式が要件を満たしていません",
|
|
38
|
+
samePasswordMessage: "確認パスワードが一致しません",
|
|
39
|
+
usernameHelp: "半角英数字、アンダースコア、特殊文字 (._+@#$%) が使用可能です(4〜48文字)",
|
|
40
|
+
usernameLengthMessage: "ユーザー名の長さは 4~48 文字",
|
|
41
|
+
passwordLabel: "パスワード",
|
|
42
|
+
passwordHelp: "数字、大文字、小文字、特殊文字 (._+@#$%) をそれぞれ2文字以上含み、8〜32文字で入力してください",
|
|
43
|
+
confirmPwdLabel: "パスワード確認",
|
|
44
|
+
confirmPwdMessage: "パスワードを再度入力してください",
|
|
45
|
+
registerBtn: "今すぐ登録",
|
|
46
|
+
registerTitle: "アカウント登録",
|
|
47
|
+
activeTitle: "パスワードを設定してアカウントを有効化",
|
|
48
|
+
activeTitleDescrition: "セキュリティ保護のため、パスワードを設定してアカウントを有効化してください",
|
|
49
|
+
activeSubmitBtn: "有効化する",
|
|
50
|
+
activeBackBtn: "戻る"
|
|
51
|
+
};
|
|
@@ -23,8 +23,8 @@ __export(zh_CN_exports, {
|
|
|
23
23
|
});
|
|
24
24
|
module.exports = __toCommonJS(zh_CN_exports);
|
|
25
25
|
var zh_CN_default = {
|
|
26
|
-
usernamePlaceholder: "
|
|
27
|
-
usernameMessage: "
|
|
26
|
+
usernamePlaceholder: "请输入用户名",
|
|
27
|
+
usernameMessage: "请输入用户名",
|
|
28
28
|
passwordPlaceholder: "请输入密码",
|
|
29
29
|
passwordMessage: "请输入密码",
|
|
30
30
|
loginText: "登录",
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { GenerateStyle } from '@oceanbase/design/es/theme';
|
|
3
|
+
import type { OBToken } from '../../_util/genComponentStyleHook';
|
|
4
|
+
export type LoginToken = OBToken;
|
|
5
|
+
export declare const genLoginStyle: GenerateStyle<LoginToken>;
|
|
6
|
+
declare const _default: (prefixCls: string) => {
|
|
7
|
+
wrapSSR: (node: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>) => import("react").JSX.Element;
|
|
8
|
+
hashId: string;
|
|
9
|
+
};
|
|
10
|
+
export default _default;
|
|
@@ -0,0 +1,267 @@
|
|
|
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/Login/style/index.ts
|
|
20
|
+
var style_exports = {};
|
|
21
|
+
__export(style_exports, {
|
|
22
|
+
default: () => style_default,
|
|
23
|
+
genLoginStyle: () => genLoginStyle
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(style_exports);
|
|
26
|
+
var import_genComponentStyleHook = require("../../_util/genComponentStyleHook");
|
|
27
|
+
var genLoginStyle = (token) => {
|
|
28
|
+
const {
|
|
29
|
+
componentCls,
|
|
30
|
+
antCls,
|
|
31
|
+
iconCls,
|
|
32
|
+
colorTextTertiary,
|
|
33
|
+
colorPrimary,
|
|
34
|
+
colorBorder,
|
|
35
|
+
borderRadius
|
|
36
|
+
} = token;
|
|
37
|
+
return {
|
|
38
|
+
[`${componentCls}-container`]: {
|
|
39
|
+
display: "flex",
|
|
40
|
+
justifyContent: "space-between",
|
|
41
|
+
minWidth: 960,
|
|
42
|
+
height: "100vh",
|
|
43
|
+
minHeight: 600,
|
|
44
|
+
overflow: "auto",
|
|
45
|
+
[`${componentCls}-bg`]: {
|
|
46
|
+
width: "40%",
|
|
47
|
+
height: "100%",
|
|
48
|
+
backgroundRepeat: "no-repeat",
|
|
49
|
+
backgroundSize: "cover",
|
|
50
|
+
backgroundPosition: "center",
|
|
51
|
+
[`${componentCls}-info`]: {
|
|
52
|
+
margin: "185px 48px 0 48px",
|
|
53
|
+
color: "#fff",
|
|
54
|
+
fontWeight: token.fontWeightStrong,
|
|
55
|
+
fontSize: 56,
|
|
56
|
+
fontFamily: "PingFangSC",
|
|
57
|
+
[`${componentCls}-start`]: {
|
|
58
|
+
marginTop: 22,
|
|
59
|
+
color: "#f4f4f4",
|
|
60
|
+
fontWeight: token.fontWeightStrong,
|
|
61
|
+
fontSize: 32,
|
|
62
|
+
letterSpacing: 0
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
[`${componentCls}-card`]: {
|
|
67
|
+
display: "flex",
|
|
68
|
+
flex: 1,
|
|
69
|
+
alignItems: "center",
|
|
70
|
+
justifyContent: "center",
|
|
71
|
+
height: "100%",
|
|
72
|
+
minHeight: 600,
|
|
73
|
+
backgroundColor: "#fff",
|
|
74
|
+
[`${componentCls}-locale`]: {
|
|
75
|
+
position: "absolute",
|
|
76
|
+
top: 24,
|
|
77
|
+
right: 24,
|
|
78
|
+
color: colorTextTertiary,
|
|
79
|
+
fontFamily: "PingFangSC-Regular",
|
|
80
|
+
cursor: "pointer"
|
|
81
|
+
},
|
|
82
|
+
[`${componentCls}-board`]: {
|
|
83
|
+
position: "absolute",
|
|
84
|
+
top: 48
|
|
85
|
+
},
|
|
86
|
+
[`${componentCls}-content`]: {
|
|
87
|
+
marginTop: -60,
|
|
88
|
+
width: 404,
|
|
89
|
+
[`${componentCls}-logo`]: {
|
|
90
|
+
display: "block",
|
|
91
|
+
height: 68,
|
|
92
|
+
margin: "0 auto",
|
|
93
|
+
marginBottom: 40
|
|
94
|
+
},
|
|
95
|
+
[`${componentCls}-activate-logo, ${componentCls}-reigster-logo`]: {
|
|
96
|
+
display: "block",
|
|
97
|
+
height: 68,
|
|
98
|
+
margin: "0 auto"
|
|
99
|
+
},
|
|
100
|
+
[`${componentCls}-register, ${componentCls}-activate`]: {
|
|
101
|
+
[`${antCls}-form-item-with-help`]: {
|
|
102
|
+
marginBottom: 24
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
[`${componentCls}-form`]: {
|
|
106
|
+
width: "100%",
|
|
107
|
+
"input::placeholder": {
|
|
108
|
+
fontSize: 14
|
|
109
|
+
},
|
|
110
|
+
[`${antCls}-form-item`]: {
|
|
111
|
+
marginBottom: 24,
|
|
112
|
+
paddingBottom: 0
|
|
113
|
+
},
|
|
114
|
+
[`${antCls}-input-affix-wrapper`]: {
|
|
115
|
+
[`${antCls}-input:not(${antCls}-input-disabled)`]: {
|
|
116
|
+
boxShadow: "inset 0 0 0 1000px white !important"
|
|
117
|
+
},
|
|
118
|
+
[`${antCls}-input:-internal-autofill-selected`]: {
|
|
119
|
+
boxShadow: "inset 0 0 0 1000px white !important"
|
|
120
|
+
},
|
|
121
|
+
[`${antCls}-input:focus:-internal-autofill-selected`]: {
|
|
122
|
+
boxShadow: "inset 0 0 0 1000px white !important"
|
|
123
|
+
}
|
|
124
|
+
},
|
|
125
|
+
[`${antCls}-input-affix-wrapper ${antCls}-input:not(:first-child)`]: {
|
|
126
|
+
paddingLeft: 8
|
|
127
|
+
},
|
|
128
|
+
[`${antCls}-input-affix-wrapper-focused`]: {
|
|
129
|
+
borderColor: colorPrimary
|
|
130
|
+
},
|
|
131
|
+
[`${componentCls}-form-focus-input`]: {
|
|
132
|
+
[`${antCls}-input-prefix`]: {
|
|
133
|
+
[`${iconCls}`]: {
|
|
134
|
+
color: colorPrimary
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
},
|
|
139
|
+
[`${componentCls}-auth-code`]: {
|
|
140
|
+
display: "flex",
|
|
141
|
+
alignItems: "start",
|
|
142
|
+
width: "100%",
|
|
143
|
+
marginBottom: 24,
|
|
144
|
+
paddingBottom: 0,
|
|
145
|
+
[`> ${antCls}-space-item:first-child`]: {
|
|
146
|
+
flex: 1
|
|
147
|
+
},
|
|
148
|
+
[`${antCls}-form-item`]: {
|
|
149
|
+
marginBottom: 0
|
|
150
|
+
},
|
|
151
|
+
[`${componentCls}-code-btn`]: {
|
|
152
|
+
position: "relative",
|
|
153
|
+
height: 38,
|
|
154
|
+
border: `1px solid ${colorBorder}`,
|
|
155
|
+
borderRadius,
|
|
156
|
+
cursor: "pointer",
|
|
157
|
+
img: {
|
|
158
|
+
height: 38,
|
|
159
|
+
borderRadius
|
|
160
|
+
},
|
|
161
|
+
[`${componentCls}-code-mask`]: {
|
|
162
|
+
position: "absolute",
|
|
163
|
+
display: "flex",
|
|
164
|
+
alignItems: "center",
|
|
165
|
+
justifyContent: "center",
|
|
166
|
+
height: 38,
|
|
167
|
+
color: "#fff",
|
|
168
|
+
background: "rgba(0, 0, 0, 0.5)",
|
|
169
|
+
borderRadius,
|
|
170
|
+
cursor: "pointer",
|
|
171
|
+
opacity: 0,
|
|
172
|
+
transition: "opacity 0.3s",
|
|
173
|
+
inset: 0
|
|
174
|
+
},
|
|
175
|
+
[`&.${componentCls}-error, &:hover`]: {
|
|
176
|
+
[`${componentCls}-code-mask`]: {
|
|
177
|
+
opacity: 1
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
},
|
|
182
|
+
[`${componentCls}-submit-btn`]: {},
|
|
183
|
+
[`${componentCls}-switch-btn`]: {
|
|
184
|
+
marginTop: 24,
|
|
185
|
+
textAlign: "center",
|
|
186
|
+
cursor: "pointer"
|
|
187
|
+
},
|
|
188
|
+
[`${componentCls}-watermark-wrapper`]: {
|
|
189
|
+
position: "absolute",
|
|
190
|
+
bottom: 40,
|
|
191
|
+
width: 404,
|
|
192
|
+
textAlign: "center",
|
|
193
|
+
[`${componentCls}-watermark`]: {
|
|
194
|
+
height: 16
|
|
195
|
+
}
|
|
196
|
+
},
|
|
197
|
+
[`${componentCls}-alert`]: {
|
|
198
|
+
marginBottom: 24,
|
|
199
|
+
borderRadius
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
},
|
|
203
|
+
"@media (max-height: 650px)": {
|
|
204
|
+
[`${componentCls}-watermark-wrapper`]: {
|
|
205
|
+
position: "absolute",
|
|
206
|
+
top: 600
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
},
|
|
210
|
+
[`${componentCls}-container-with-board`]: {
|
|
211
|
+
[`${componentCls}-card`]: {
|
|
212
|
+
[`${componentCls}-content`]: {
|
|
213
|
+
marginTop: 0
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
},
|
|
217
|
+
[`${componentCls}-container-mobile`]: {
|
|
218
|
+
flexDirection: "column",
|
|
219
|
+
minWidth: "auto",
|
|
220
|
+
[`${componentCls}-banner`]: {
|
|
221
|
+
height: "25%"
|
|
222
|
+
},
|
|
223
|
+
[`${componentCls}-bg`]: {
|
|
224
|
+
width: "100%"
|
|
225
|
+
},
|
|
226
|
+
[`${componentCls}-card`]: {
|
|
227
|
+
alignItems: "start",
|
|
228
|
+
width: "100%",
|
|
229
|
+
height: "75%",
|
|
230
|
+
marginTop: -48,
|
|
231
|
+
padding: "0 32px",
|
|
232
|
+
borderRadius: "16px 16px 0 0",
|
|
233
|
+
position: "relative",
|
|
234
|
+
[`${componentCls}-board`]: {
|
|
235
|
+
top: 8,
|
|
236
|
+
left: 24
|
|
237
|
+
},
|
|
238
|
+
[`${componentCls}-locale`]: {
|
|
239
|
+
top: 8
|
|
240
|
+
},
|
|
241
|
+
[`${componentCls}-content`]: {
|
|
242
|
+
width: "100%",
|
|
243
|
+
marginTop: 40,
|
|
244
|
+
[`${componentCls}-logo`]: {
|
|
245
|
+
height: 48,
|
|
246
|
+
marginBottom: 24
|
|
247
|
+
},
|
|
248
|
+
[`${componentCls}-watermark-wrapper`]: {
|
|
249
|
+
width: "100%",
|
|
250
|
+
position: "static",
|
|
251
|
+
marginTop: 96
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
};
|
|
257
|
+
};
|
|
258
|
+
var style_default = (prefixCls) => {
|
|
259
|
+
const useStyle = (0, import_genComponentStyleHook.genComponentStyleHook)("Login", (token) => {
|
|
260
|
+
return [genLoginStyle(token)];
|
|
261
|
+
});
|
|
262
|
+
return useStyle(prefixCls);
|
|
263
|
+
};
|
|
264
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
265
|
+
0 && (module.exports = {
|
|
266
|
+
genLoginStyle
|
|
267
|
+
});
|
package/lib/NavMenu/index.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import './index.less';
|
|
3
2
|
export interface NavMenuItem {
|
|
4
3
|
key: string;
|
|
5
4
|
title: string;
|
|
@@ -15,5 +14,5 @@ export interface NavMenuProps {
|
|
|
15
14
|
className?: string;
|
|
16
15
|
style?: React.CSSProperties;
|
|
17
16
|
}
|
|
18
|
-
declare const _default: (props: NavMenuProps) =>
|
|
17
|
+
declare const _default: (props: NavMenuProps) => React.JSX.Element;
|
|
19
18
|
export default _default;
|
package/lib/NavMenu/index.js
CHANGED
|
@@ -35,13 +35,15 @@ module.exports = __toCommonJS(NavMenu_exports);
|
|
|
35
35
|
var import_design = require("@oceanbase/design");
|
|
36
36
|
var import_lodash = require("lodash");
|
|
37
37
|
var import_path_to_regexp = require("path-to-regexp");
|
|
38
|
-
var import_react =
|
|
39
|
-
var import_util = require("../_util");
|
|
38
|
+
var import_react = require("react");
|
|
40
39
|
var import_useNavigate = __toESM(require("../_util/useNavigate"));
|
|
41
|
-
var
|
|
42
|
-
var
|
|
40
|
+
var import_style = __toESM(require("./style"));
|
|
41
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
43
42
|
var NavMenu_default = (props) => {
|
|
44
43
|
const { menuList, className, style } = props;
|
|
44
|
+
const { getPrefixCls } = (0, import_react.useContext)(import_design.ConfigProvider.ConfigContext);
|
|
45
|
+
const prefixCls = getPrefixCls("menu");
|
|
46
|
+
const { wrapSSR } = (0, import_style.default)(prefixCls);
|
|
45
47
|
const [selectedKeys, setSelectedKeys] = (0, import_react.useState)(["0"]);
|
|
46
48
|
const [menus, setMenus] = (0, import_react.useState)([]);
|
|
47
49
|
const location = window.location;
|
|
@@ -95,18 +97,20 @@ var NavMenu_default = (props) => {
|
|
|
95
97
|
},
|
|
96
98
|
[navigate]
|
|
97
99
|
);
|
|
98
|
-
return
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
100
|
+
return wrapSSR(
|
|
101
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: `${prefixCls}-container ${className || ""}`, style, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
102
|
+
import_design.Menu,
|
|
103
|
+
{
|
|
104
|
+
style: { height: "100%", borderRight: 0 },
|
|
105
|
+
defaultSelectedKeys: ["0"],
|
|
106
|
+
selectedKeys,
|
|
107
|
+
onSelect: onMenuItemSelect,
|
|
108
|
+
mode: "inline",
|
|
109
|
+
theme: "light",
|
|
110
|
+
children: menus.map((config) => {
|
|
111
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_design.Menu.Item, { disabled: config.disabled ?? false, children: config.openNewTab ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("a", { id: config.id, href: config.link, target: "_blank", rel: "noreferrer", children: config.title }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)("a", { id: config.id, onClick: () => onMenuClick(config.link), children: config.title }) }, config.key);
|
|
112
|
+
})
|
|
113
|
+
}
|
|
114
|
+
) })
|
|
115
|
+
);
|
|
112
116
|
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { GenerateStyle } from '@oceanbase/design/es/theme';
|
|
3
|
+
import type { OBToken } from '../../_util/genComponentStyleHook';
|
|
4
|
+
export type NavMenuToken = OBToken;
|
|
5
|
+
export declare const genNavMenuStyle: GenerateStyle<NavMenuToken>;
|
|
6
|
+
declare const _default: (prefixCls: string) => {
|
|
7
|
+
wrapSSR: (node: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>) => import("react").JSX.Element;
|
|
8
|
+
hashId: string;
|
|
9
|
+
};
|
|
10
|
+
export default _default;
|