@oceanbase/ui 0.2.24 → 0.2.26

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 (92) hide show
  1. package/dist/ui.min.css +1 -1
  2. package/dist/ui.min.js +1 -1
  3. package/es/Action/Group.js +3 -3
  4. package/es/Action/Item.js +1 -1
  5. package/es/BackgroundTaskManager/RefreshMan.js +1 -1
  6. package/es/BackgroundTaskManager/index.d.ts +1 -0
  7. package/es/BackgroundTaskManager/index.js +11 -7
  8. package/es/BasicLayout/Header.d.ts +1 -1
  9. package/es/BasicLayout/Header.js +62 -71
  10. package/es/BasicLayout/index.d.ts +0 -1
  11. package/es/BasicLayout/index.js +58 -66
  12. package/es/BasicLayout/style/Header.d.ts +9 -0
  13. package/es/BasicLayout/style/Header.js +94 -0
  14. package/es/BasicLayout/style/index.js +307 -6
  15. package/es/BatchOperationBar/index.js +5 -5
  16. package/es/Boundary/Components/Exception.js +1 -1
  17. package/es/ContentWithIcon/index.js +3 -3
  18. package/es/ContentWithQuestion/index.js +3 -3
  19. package/es/ContentWithQuestion/index.less +1 -2
  20. package/es/Dialog/Anchor.js +4 -4
  21. package/es/Dialog/EventProxy.js +1 -1
  22. package/es/Dialog/index.js +5 -5
  23. package/es/DocDialog/index.js +4 -4
  24. package/es/FullscreenBox/index.js +2 -2
  25. package/es/GraphToolbar/index.js +7 -7
  26. package/es/Highlight/DiffView/DiffCells.js +1 -1
  27. package/es/Highlight/DiffView/index.js +9 -9
  28. package/es/Highlight/JsonView.js +1 -1
  29. package/es/Highlight/index.d.ts +1 -1
  30. package/es/Highlight/index.js +7 -5
  31. package/es/Highlight/useKeyDownCopyEvent.js +1 -1
  32. package/es/IconFont/index.js +3 -3
  33. package/es/LocaleDropdown/index.js +7 -7
  34. package/es/Login/ActivateForm.js +4 -4
  35. package/es/Login/LoginForm.js +7 -5
  36. package/es/Login/RegisterForm.js +6 -6
  37. package/es/Login/index.js +7 -9
  38. package/es/Lottie/index.js +4 -4
  39. package/es/NavMenu/index.js +2 -2
  40. package/es/PageContainer/ItemRender.js +1 -1
  41. package/es/PageContainer/index.js +3 -3
  42. package/es/PageContainer/style/index.js +12 -9
  43. package/es/Password/Content.js +3 -1
  44. package/es/Password/index.js +10 -8
  45. package/es/Ranger/QuickPicker.js +5 -5
  46. package/es/Ranger/Ranger.js +5 -5
  47. package/es/Ranger/constant/index.js +1 -1
  48. package/es/SideTip/Dragger.js +3 -3
  49. package/es/SideTip/IconLoading.js +3 -3
  50. package/es/SideTip/index.js +4 -4
  51. package/es/TagSelect/Group.js +2 -2
  52. package/es/TagSelect/Item.js +4 -4
  53. package/es/TagSelect/style/index.js +3 -3
  54. package/es/TaskGraph/Graph.js +1 -1
  55. package/es/TaskGraph/index.js +6 -6
  56. package/es/TaskGraph/register.js +3 -3
  57. package/es/TreeSearch/index.js +2 -2
  58. package/es/TreeSearch/util.js +5 -5
  59. package/es/Welcome/index.js +4 -3
  60. package/es/Welcome/index.less +4 -5
  61. package/es/_util/genComponentStyleHook.js +3 -3
  62. package/es/locale/LocaleWrapper.js +3 -3
  63. package/es/locale/en-US.js +3 -3
  64. package/es/locale/zh-CN.js +3 -3
  65. package/es/locale/zh-TW.js +3 -3
  66. package/lib/BackgroundTaskManager/index.d.ts +1 -0
  67. package/lib/BackgroundTaskManager/index.js +5 -1
  68. package/lib/BasicLayout/Header.d.ts +1 -1
  69. package/lib/BasicLayout/Header.js +58 -69
  70. package/lib/BasicLayout/index.d.ts +0 -1
  71. package/lib/BasicLayout/index.js +50 -45
  72. package/lib/BasicLayout/style/Header.d.ts +9 -0
  73. package/lib/BasicLayout/style/Header.js +139 -0
  74. package/lib/BasicLayout/style/index.js +399 -2
  75. package/lib/ContentWithQuestion/index.less +1 -2
  76. package/lib/Highlight/index.d.ts +1 -1
  77. package/lib/Highlight/index.js +3 -2
  78. package/lib/LocaleDropdown/index.js +7 -3
  79. package/lib/Login/LoginForm.js +4 -3
  80. package/lib/Login/index.js +1 -1
  81. package/lib/PageContainer/style/index.js +11 -7
  82. package/lib/Password/Content.js +8 -7
  83. package/lib/Password/index.js +2 -1
  84. package/lib/Welcome/index.js +11 -1
  85. package/lib/Welcome/index.less +4 -5
  86. package/package.json +7 -7
  87. package/es/BasicLayout/Header.less +0 -134
  88. package/es/BasicLayout/index.less +0 -396
  89. package/es/assets/user.svg +0 -16
  90. package/lib/BasicLayout/Header.less +0 -134
  91. package/lib/BasicLayout/index.less +0 -396
  92. package/lib/assets/user.svg +0 -16
@@ -0,0 +1,139 @@
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/BasicLayout/style/Header.ts
20
+ var Header_exports = {};
21
+ __export(Header_exports, {
22
+ default: () => Header_default,
23
+ genHeaderStyle: () => genHeaderStyle
24
+ });
25
+ module.exports = __toCommonJS(Header_exports);
26
+ var import_genComponentStyleHook = require("../../_util/genComponentStyleHook");
27
+ var genHeaderStyle = (token) => {
28
+ const { componentCls } = token;
29
+ return {
30
+ [`${componentCls}`]: {
31
+ position: "fixed",
32
+ zIndex: 10,
33
+ width: "100%",
34
+ height: 48,
35
+ padding: "10px 24px",
36
+ lineHeight: "48px",
37
+ backgroundColor: token.colorBgLayout,
38
+ boxShadow: `inset 0 -1px 0 0 ${token.colorBorderSecondary}`,
39
+ [`${componentCls}-content`]: {
40
+ display: "flex",
41
+ alignItems: "center",
42
+ justifyContent: "space-between",
43
+ maxWidth: token.maxWidth,
44
+ height: "100%",
45
+ margin: "0 auto"
46
+ },
47
+ [`${componentCls}-logo`]: {
48
+ height: 24,
49
+ cursor: "pointer"
50
+ },
51
+ [`${componentCls}-icon`]: {
52
+ width: 52,
53
+ height: 48,
54
+ lineHeight: "48px",
55
+ textAlign: "center",
56
+ borderRight: `1px solid ${token.colorBorderSecondary}`,
57
+ borderBottom: `1px solid ${token.colorBorderSecondary}`,
58
+ cursor: "pointer",
59
+ img: {
60
+ height: 32,
61
+ marginTop: 8
62
+ }
63
+ },
64
+ [`${componentCls}-title`]: {
65
+ /* 占据剩余的全部空间 */
66
+ flex: 1,
67
+ margin: "0 16px"
68
+ },
69
+ [`${componentCls}-extra`]: {
70
+ display: "flex",
71
+ alignItems: "center",
72
+ justifyContent: "space-between",
73
+ [`${componentCls}-extra-item`]: {
74
+ display: "inline-flex",
75
+ fontSize: 12,
76
+ cursor: "pointer",
77
+ "&:not(:last-child)": {
78
+ marginRight: 24
79
+ },
80
+ [`${componentCls}-extra-icon-wrapper`]: {
81
+ width: 28,
82
+ height: 28,
83
+ lineHeight: "28px",
84
+ textAlign: "center",
85
+ border: "0.88px solid #ced4e1",
86
+ borderRadius: 14
87
+ },
88
+ [`${componentCls}-extra-user-wrapper`]: {
89
+ height: 28,
90
+ padding: "0 10px",
91
+ lineHeight: "28px",
92
+ border: "0.88px solid #ced4e1",
93
+ borderRadius: 14,
94
+ [`${componentCls}-extra-user-icon`]: {
95
+ marginRight: 6
96
+ }
97
+ }
98
+ }
99
+ },
100
+ [`${componentCls}-extra-with-label`]: {
101
+ [`${componentCls}-extra-item`]: {
102
+ "&:not(:last-child)": {
103
+ marginRight: "24px !important"
104
+ }
105
+ }
106
+ }
107
+ },
108
+ [`${componentCls}-about-wrapper`]: {
109
+ [`${componentCls}-about`]: {
110
+ marginTop: 12
111
+ },
112
+ [`${componentCls}-logo`]: {
113
+ height: 72
114
+ },
115
+ [`${componentCls}-release-info`]: {
116
+ marginTop: 20,
117
+ marginBottom: 50,
118
+ [`${componentCls}-date`]: {
119
+ fontSize: 12,
120
+ color: token.colorTextTertiary
121
+ }
122
+ },
123
+ [`${componentCls}-copyright`]: {
124
+ fontSize: 12,
125
+ color: token.colorTextTertiary
126
+ }
127
+ }
128
+ };
129
+ };
130
+ var Header_default = (prefixCls) => {
131
+ const useStyle = (0, import_genComponentStyleHook.genComponentStyleHook)("Header", (token) => {
132
+ return [genHeaderStyle(token)];
133
+ });
134
+ return useStyle(prefixCls);
135
+ };
136
+ // Annotate the CommonJS export names for ESM import in node:
137
+ 0 && (module.exports = {
138
+ genHeaderStyle
139
+ });
@@ -25,7 +25,18 @@ __export(style_exports, {
25
25
  module.exports = __toCommonJS(style_exports);
26
26
  var import_genComponentStyleHook = require("../../_util/genComponentStyleHook");
27
27
  var genBasicLayoutStyle = (token) => {
28
- const { componentCls, proComponentsCls, motionDurationSlow } = token;
28
+ const {
29
+ antCls,
30
+ componentCls,
31
+ proComponentsCls,
32
+ colorBgLayout,
33
+ colorText,
34
+ colorBorder,
35
+ colorPrimaryBorder,
36
+ colorPrimary,
37
+ motionDurationSlow
38
+ } = token;
39
+ const maxWidth = "8192px";
29
40
  const siderWidthList = [0, 52, 52 * 2, 192, 208];
30
41
  const footerBarStyle = {};
31
42
  siderWidthList.forEach((width) => {
@@ -38,14 +49,400 @@ var genBasicLayoutStyle = (token) => {
38
49
  };
39
50
  });
40
51
  return {
52
+ [`${componentCls}-banner-wrapper`]: {
53
+ position: "fixed",
54
+ top: 0,
55
+ zIndex: 20,
56
+ width: "100%"
57
+ },
58
+ // 对于 Alert 类型的 banner,自动增加上间距
59
+ // 对于其他类型的 banner,需要业务侧自行设置上间距
60
+ [`${componentCls}-with-banner`]: {
61
+ marginTop: "38px"
62
+ },
63
+ ...footerBarStyle,
41
64
  [`${componentCls}`]: {
65
+ height: "100%",
66
+ backgroundColor: colorBgLayout,
67
+ transition: "all 0.1s",
42
68
  // Set style of PageContainer in BasicLayout
43
69
  [`${proComponentsCls}-page-container`]: {
44
70
  // 48px is the height of BasicLayout header
45
71
  minHeight: "calc(100vh - 48px)"
72
+ },
73
+ [`${componentCls}-content-layout`]: {
74
+ maxWidth,
75
+ // 居中对齐
76
+ margin: "0 auto",
77
+ [`${componentCls}-sider`]: {
78
+ position: "fixed",
79
+ zIndex: 10,
80
+ padding: "16px 0 16px 16px",
81
+ backgroundColor: colorBgLayout,
82
+ transition: "all 0.3s",
83
+ [`${componentCls}-sider-border`]: {
84
+ position: "relative",
85
+ top: "-16px",
86
+ width: 1,
87
+ height: "100%",
88
+ backgroundColor: "#e2e8f3",
89
+ cursor: "pointer",
90
+ opacity: 0,
91
+ // 左右两侧扩大热区
92
+ ["&::after"]: {
93
+ position: "absolute",
94
+ top: 0,
95
+ right: "-10px",
96
+ bottom: 0,
97
+ left: "-10px",
98
+ content: '""'
99
+ },
100
+ "&:hover": {
101
+ opacity: 1,
102
+ // 仅在 hover 时增加过渡动画,避免展开/收起时 border 和 collapse 没有及时消失、影响整体效果
103
+ transition: "opacity 0.3s",
104
+ [`${componentCls}-sider-collapse`]: {
105
+ opacity: 1,
106
+ transition: "opacity 0.3s"
107
+ }
108
+ },
109
+ [`${componentCls}-sider-collapse`]: {
110
+ position: "relative",
111
+ top: "245px",
112
+ right: 10,
113
+ // 需要设置 z-index 以便叠加在分隔线上,否则点击的是分隔线的热区,无法触发 collapse 的点击事件
114
+ zIndex: 1,
115
+ width: "20px",
116
+ height: "42px",
117
+ lineHeight: "42px",
118
+ textAlign: "center",
119
+ backgroundColor: "#fff",
120
+ border: `1px solid ${colorBorder}`,
121
+ borderRadius: "10px",
122
+ cursor: "pointer",
123
+ opacity: 0,
124
+ // 设置展开/收起按钮中的图标大小
125
+ [".anticon"]: {
126
+ fontSize: "px",
127
+ display: "block",
128
+ lineHeight: "42px"
129
+ }
130
+ }
131
+ },
132
+ [`${componentCls}-sider-wrapper`]: {
133
+ display: "flex",
134
+ height: "calc(100vh - 48px)",
135
+ // 菜单通用样式
136
+ [`${antCls}-menu`]: {
137
+ backgroundColor: "transparent",
138
+ borderRight: "none",
139
+ [`${antCls}-menu-item`]: {
140
+ width: "100%",
141
+ marginTop: 0,
142
+ marginRight: "auto",
143
+ marginLeft: "auto",
144
+ color: colorText,
145
+ backgroundColor: "transparent",
146
+ [`.anticon`]: {
147
+ // 图标尺寸设为 18px,因为设计侧给到的图标内侧有间距,需要适当加大尺寸
148
+ width: "18px",
149
+ height: "18px",
150
+ fontSize: "18px"
151
+ }
152
+ },
153
+ [`${antCls}-menu-submenu`]: {
154
+ width: "100%",
155
+ marginTop: 0,
156
+ marginRight: "auto",
157
+ marginLeft: "auto",
158
+ color: colorText,
159
+ backgroundColor: "transparent",
160
+ [`.anticon`]: {
161
+ // 图标尺寸设为 18px,因为设计侧给到的图标内侧有间距,需要适当加大尺寸
162
+ width: "18px",
163
+ height: "18px",
164
+ fontSize: "18px"
165
+ }
166
+ },
167
+ [`${antCls}-menu-submenu > ${antCls}-menu-submenu-title`]: {
168
+ width: "100%",
169
+ marginBottom: "4px !important",
170
+ marginInline: 0,
171
+ marginBlock: 0
172
+ }
173
+ },
174
+ // 内嵌菜单样式
175
+ [`${antCls}-menu-inline`]: {
176
+ // 菜单项间距
177
+ [`${antCls}-menu-item, ${antCls}-menu-submenu`]: {
178
+ "&:not(:last-child)": {
179
+ marginBottom: "16px",
180
+ // 子菜单展开时 marginBottom 会变小,为了避免效果突兀,增加过渡效果
181
+ transition: "marginBottom 0.2s"
182
+ }
183
+ },
184
+ [`${antCls}-menu-submenu-open`]: {
185
+ "&:not(:last-childantCls)": {
186
+ // 子菜单展开时,减小 marginBottom
187
+ marginBottom: 4
188
+ }
189
+ },
190
+ // 子菜单项间距
191
+ [`${antCls}-menu-submenu`]: {
192
+ [`${antCls}-menu-item:not(:last-child)`]: {
193
+ marginBottom: 4
194
+ }
195
+ },
196
+ // 菜单项缩进
197
+ [`${antCls}-menu-item, ${antCls}-menu-submenu > ${antCls}-menu-submenu-title`]: {
198
+ paddingLeft: "16px !important",
199
+ [`${antCls}-menu-title-content`]: {
200
+ width: "108px"
201
+ }
202
+ },
203
+ // 子菜单项缩进
204
+ [`${antCls}-menu-sub`]: {
205
+ [`${antCls}-menu-item`]: {
206
+ marginLeft: "16px",
207
+ paddingLeft: "28px !important"
208
+ }
209
+ },
210
+ // 菜单项激活样式
211
+ [`${antCls}-menu-item-active, ${antCls}-menu-submenu-active > ${antCls}-menu-submenu-title`]: {
212
+ color: `${colorText} !important`,
213
+ fontWeight: 600,
214
+ animation: "activeGradientAnimation 0.1s",
215
+ // .border-gradient(linear-gradient(to right, #E9EDF6, @colorBgLayout), linear-gradient(90deg, #C6CDD9, @colorBgLayout), 0.5px, solid, 8px 0 0 8px),
216
+ backgroundImage: `linear-gradient(to right,#E9EDF6, ${colorBgLayout}),linear-gradient(90deg,#C6CDD9,${colorBgLayout})`,
217
+ backgroundClip: "padding-box,border-box",
218
+ backgroundOrigin: "padding-box,border-box",
219
+ border: ".5px solid transparent",
220
+ borderRadius: "8px 0 0 8px",
221
+ transition: "border-width .3s"
222
+ },
223
+ // 菜单项选中样式
224
+ [`${antCls}-menu-item-selected`]: {
225
+ color: `${colorPrimary} !important`,
226
+ fontWeight: 600,
227
+ animation: "selectedGradientAnimation 0.5s",
228
+ // .border-gradient(linear-gradient(to right, #E5EEFF, #F4F8FF), linear-gradient(90deg, @colorPrimaryBorder, @colorBgLayout), 0.5px, solid, 8px 0 0 8px),
229
+ backgroundImage: `linear-gradient(to right,#E5EEFF,#F4F8FF),linear-gradient(90deg,${colorPrimaryBorder},${colorBgLayout})`,
230
+ backgroundClip: "padding-box,border-box",
231
+ backgroundOrigin: "padding-box,border-box",
232
+ border: ".5px solid transparent",
233
+ borderRadius: "8px 0 0 8px",
234
+ transition: "border-width .3s",
235
+ "&::after": {
236
+ // content: '""',
237
+ // 去掉菜单项的选中标记
238
+ display: "none"
239
+ }
240
+ },
241
+ [`${antCls}-menu-submenu-selected > ${antCls}-menu-submenu-title`]: {
242
+ color: `${colorPrimary} !important`
243
+ },
244
+ [`${antCls}-divider`]: {
245
+ margin: "0 0 16px 0"
246
+ }
247
+ },
248
+ // 垂直菜单样式
249
+ [`${antCls}-menu-vertical`]: {
250
+ overflowX: "hidden",
251
+ overflowY: "auto",
252
+ borderRight: "none",
253
+ [`${antCls}-menu-item, ${antCls}-menu-submenu`]: {
254
+ "&:not(:last-child)": {
255
+ marginBottom: 4
256
+ }
257
+ },
258
+ [`${antCls}-menu-item, ${antCls}-menu-submenu > ${antCls}-menu-submenu-title`]: {
259
+ width: "52px",
260
+ height: "52px",
261
+ padding: 0,
262
+ lineHeight: "52px",
263
+ textAlign: "center",
264
+ [`${antCls}-menu-title-content`]: {
265
+ display: "inline-block",
266
+ width: "40px",
267
+ height: "40px",
268
+ lineHeight: "40px",
269
+ borderRadius: "8px"
270
+ },
271
+ [`${antCls}-menu-submenu-arrow`]: {
272
+ display: "none"
273
+ }
274
+ },
275
+ [`${antCls}-menu-item-active, ${antCls}-menu-submenu-active > ${antCls}-menu-submenu-title`]: {
276
+ [`${antCls}-menu-title-content`]: {
277
+ backgroundColor: "#e9edf6",
278
+ border: "0.5px solid #c6cdd9"
279
+ }
280
+ },
281
+ [`${antCls}-menu-item-selected, ${antCls}-menu-submenu-selected > ${antCls}-menu-submenu-title`]: {
282
+ [`${antCls}-menu-title-content`]: {
283
+ backgroundColor: "#e5eeff",
284
+ border: `0.5px solid ${colorPrimaryBorder}`
285
+ }
286
+ }
287
+ },
288
+ [`${componentCls}-sub-sider`]: {
289
+ borderRight: "1px solid #e2e8f3",
290
+ [`${antCls}-divider`]: {
291
+ margin: "0 0 4px 0"
292
+ }
293
+ },
294
+ [`${componentCls}-sub-sider, ${componentCls}-menu-collapsed`]: {
295
+ width: "52px",
296
+ [`${antCls}-divider`]: {
297
+ margin: "0 0 4px 0"
298
+ }
299
+ },
300
+ [`${componentCls}-sider-content`]: {
301
+ display: "flex",
302
+ flex: 1,
303
+ // 纵向排列
304
+ flexDirection: "column",
305
+ // 纵向两端对齐
306
+ justifyContent: "space-between",
307
+ height: "100%",
308
+ [`${componentCls}-sider-header`]: {
309
+ paddingTop: "16px"
310
+ },
311
+ [`${componentCls}-menu-wrapper`]: {
312
+ display: "flex",
313
+ flexDirection: "column",
314
+ // 保证垂直方向超出高度出现滚动
315
+ flexGrow: 1,
316
+ justifyContent: "space-between",
317
+ overflowX: "hidden",
318
+ overflowY: "auto",
319
+ [`${componentCls}-menu`]: {
320
+ backgroundColor: "transparent",
321
+ borderRight: "none",
322
+ marginBottom: "32px"
323
+ }
324
+ }
325
+ }
326
+ }
327
+ },
328
+ [`${componentCls}-sider-collapsed`]: {
329
+ paddingLeft: 0
330
+ },
331
+ [`${componentCls}-sider-has-sub-sider`]: {
332
+ padding: 0,
333
+ // 包含子侧边栏的菜单不支持收起,直接隐藏侧边栏 border 和 collapse
334
+ [`${componentCls}-sider-border`]: {
335
+ display: "none",
336
+ [`${componentCls}-sider-collapse`]: {
337
+ display: "none"
338
+ }
339
+ },
340
+ [`${antCls}-menu-inline`]: {
341
+ paddingTop: "16px",
342
+ [`${antCls}-menu-item, ${antCls}-menu-submenu`]: {
343
+ "&:not(:last-child)": {
344
+ marginBottom: "16px !important"
345
+ }
346
+ },
347
+ [`${antCls}-divider`]: {
348
+ width: "60%",
349
+ minWidth: "60%",
350
+ margin: "-8px 0 8px 16px !important"
351
+ }
352
+ },
353
+ [`${antCls}-menu-vertical`]: {
354
+ paddingTop: "10px"
355
+ },
356
+ [`${componentCls}-sider-content`]: {
357
+ paddingLeft: "6px"
358
+ }
359
+ },
360
+ [`${componentCls}-content`]: {
361
+ backgroundColor: colorBgLayout,
362
+ transition: "all 0.3s"
363
+ }
364
+ }
365
+ },
366
+ [`@media (min-width: ${maxWidth})`]: {
367
+ [`${componentCls}`]: {
368
+ [`${componentCls}-content-layout`]: {
369
+ [`${componentCls}-sider`]: {
370
+ paddingLeft: 0
371
+ }
372
+ }
373
+ },
374
+ [`${proComponentsCls}-footer-bar`]: {
375
+ right: `calc((100% - ${maxWidth}) / 2 + 24px)`,
376
+ width: `calc(${maxWidth} - 192px - 24px - 24px)`,
377
+ maxWidth: `calc(${maxWidth} - 192px - 24px - 24px)`
46
378
  }
47
379
  },
48
- ...footerBarStyle
380
+ // 弹出菜单样式
381
+ [`${antCls}-menu-submenu-popup`]: {
382
+ [`${antCls}-menu`]: {
383
+ paddingLeft: "6px !important",
384
+ backgroundColor: `${colorBgLayout} !important`,
385
+ [`${antCls}-menu-item`]: {
386
+ width: "100%",
387
+ backgroundColor: "transparent",
388
+ border: "none",
389
+ marginInline: 0,
390
+ "&:not(:last-child):": {
391
+ marginBottom: "8px !important"
392
+ }
393
+ },
394
+ [`${antCls}-menu-submenu`]: {
395
+ width: "100%",
396
+ backgroundColor: "transparent",
397
+ border: "none",
398
+ marginInline: 0,
399
+ "&:not(:last-child):": {
400
+ marginBottom: "8px !important"
401
+ }
402
+ },
403
+ [`${antCls}-menu-item-active`]: {
404
+ color: "colorText !important",
405
+ fontWeight: 600,
406
+ animation: "activeGradientAnimation 0.1s",
407
+ // .border-gradient(linear-gradient(to right, #E9EDF6, colorBgLayout), linear-gradient(90deg, #C6CDD9, colorBgLayout), 0.5px, solid, 8px 0 0 8px),
408
+ backgroundImage: `linear-gradient(to right, #E9EDF6, ${colorBgLayout}), linear-gradient(90deg, #C6CDD9, ${colorBgLayout})`,
409
+ backgroundClip: "padding-box,border-box",
410
+ backgroundOrigin: "padding-box,border-box",
411
+ border: ".5px solid transparent",
412
+ borderRadius: "8px 0 0 8px",
413
+ transition: "border-width .3s"
414
+ },
415
+ [`${antCls}-menu-submenu-active > & ${antCls}-menu-submenu-title`]: {
416
+ color: "colorText !important",
417
+ fontWeight: 600,
418
+ animation: "activeGradientAnimation 0.1s",
419
+ // .border-gradient(linear-gradient(to right, #E9EDF6, colorBgLayout), linear-gradient(90deg, #C6CDD9, colorBgLayout), 0.5px, solid, 8px 0 0 8px),
420
+ backgroundImage: `linear-gradient(to right, #E9EDF6, ${colorBgLayout}), linear-gradient(90deg, #C6CDD9, ${colorBgLayout})`,
421
+ backgroundClip: "padding-box,border-box",
422
+ backgroundOrigin: "padding-box,border-box",
423
+ border: ".5px solid transparent",
424
+ borderRadius: "8px 0 0 8px",
425
+ transition: "border-width .3s"
426
+ },
427
+ [`${antCls}-menu-item-selected`]: {
428
+ color: `${colorPrimary} !important`,
429
+ fontWeight: 600,
430
+ animation: "selectedGradientAnimation 0.1s",
431
+ // .border-gradient(linear-gradient(to right, #E5EEFF, #F4F8FF), linear-gradient(90deg, @colorPrimaryBorder, colorBgLayout), 0.5px, solid, 8px 0 0 8px),
432
+ backgroundImage: `linear-gradient(to right,#E5EEFF,#F4F8FF),linear-gradient(90deg,${colorPrimaryBorder},${colorBgLayout})`,
433
+ backgroundClip: "padding-box,border-box",
434
+ backgroundOrigin: "padding-box,border-box",
435
+ border: ".5px solid transparent",
436
+ borderRadius: "8px 0 0 8px",
437
+ transition: "border-width .3s"
438
+ },
439
+ [`${antCls}-divider`]: {
440
+ width: "'60%'",
441
+ minWidth: "60%",
442
+ margin: "0 0 8px 16px !important"
443
+ }
444
+ }
445
+ }
49
446
  };
50
447
  };
51
448
  var style_default = (prefixCls) => {
@@ -14,6 +14,5 @@
14
14
  }
15
15
  .@{prefix}-color {
16
16
  color: red;
17
-
18
17
  }
19
- }
18
+ }
@@ -29,7 +29,7 @@ export declare const THEME_DARK = "dark";
29
29
  export declare const THEME_LIGHT = "light";
30
30
  declare const ThemeTypes: ["dark", "light"];
31
31
  export type ThemeType = (typeof ThemeTypes)[number];
32
- declare const supportedLanguages: ("ruby" | "css" | "java" | "json" | "bash" | "javascript" | "typescript" | "groovy" | "python" | "cpp" | "http" | "markdown" | "nginx" | "sql" | "xml" | "dockerfile" | "go" | "yaml" | "solidity" | "tsx" | "jsx")[];
32
+ declare const supportedLanguages: ("ruby" | "css" | "bash" | "json" | "go" | "javascript" | "typescript" | "groovy" | "java" | "python" | "cpp" | "http" | "markdown" | "nginx" | "sql" | "xml" | "dockerfile" | "yaml" | "solidity" | "tsx" | "jsx")[];
33
33
  export type LanguageType = (typeof supportedLanguages)[number] | 'html';
34
34
  export interface HighlightProps extends LocaleWrapperProps {
35
35
  /**
@@ -120,6 +120,7 @@ var Highlight = (props) => {
120
120
  const themeClass = theme === THEME_DARK ? `${prefixCls}-dark` : `${prefixCls}-light`;
121
121
  const codeRef = import_react.default.createRef();
122
122
  const [codeBlock, setCodeBlock] = import_react.default.useState();
123
+ const { token } = import_design.theme.useToken();
123
124
  (0, import_react.useEffect)(() => {
124
125
  if (language && languageMap[language]) {
125
126
  import_core.default.registerLanguage(language, languageMap[language]);
@@ -196,14 +197,14 @@ var Highlight = (props) => {
196
197
  disabled: copied,
197
198
  className: (0, import_classnames.default)(`${prefixCls}-copy`),
198
199
  style: {
199
- background: `${theme === THEME_DARK ? `#2b303b` : import_design.token.colorBgLayout}`
200
+ background: `${theme === THEME_DARK ? `#2b303b` : token.colorBgLayout}`
200
201
  }
201
202
  },
202
203
  /* @__PURE__ */ import_react.default.createElement(
203
204
  import_icons.CopyOutlined,
204
205
  {
205
206
  className: (0, import_classnames.default)(`${prefixCls}-copy-icon`, { scoll: copied }),
206
- style: { color: `${theme === THEME_DARK ? import_design.token.colorBgLayout : `#2b303b`}` }
207
+ style: { color: `${theme === THEME_DARK ? token.colorBgLayout : `#2b303b`}` }
207
208
  }
208
209
  ),
209
210
  /* @__PURE__ */ import_react.default.createElement(
@@ -38,8 +38,12 @@ var import_design = require("@oceanbase/design");
38
38
  var import_react = __toESM(require("react"));
39
39
  var import_constant = require("../constant");
40
40
  var import_util2 = require("../_util");
41
- var prefix = (0, import_util2.getPrefix)("layout-header");
42
- var LocaleDropdown = ({ locales, showLabel, ...restProps }) => {
41
+ var LocaleDropdown = ({
42
+ locales,
43
+ showLabel,
44
+ className,
45
+ ...restProps
46
+ }) => {
43
47
  const localeMenu = /* @__PURE__ */ import_react.default.createElement(
44
48
  import_design.Menu,
45
49
  {
@@ -65,6 +69,6 @@ var LocaleDropdown = ({ locales, showLabel, ...restProps }) => {
65
69
  }
66
70
  },
67
71
  (0, import_util.findByValue)(import_constant.LOCALE_LIST, (0, import_util2.getLocale)()).minLabel
68
- ) : /* @__PURE__ */ import_react.default.createElement(import_design.Space, { className: `${prefix}-extra-item` }, /* @__PURE__ */ import_react.default.createElement(import_icons.GlobalOutlined, null), (0, import_util.findByValue)(import_constant.LOCALE_LIST, (0, import_util2.getLocale)()).shortLabel));
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));
69
73
  };
70
74
  var LocaleDropdown_default = LocaleDropdown;
@@ -51,6 +51,7 @@ var Login = ({
51
51
  onAuthCodeImgChange,
52
52
  ...restProps
53
53
  }) => {
54
+ const { token } = import_design2.theme.useToken();
54
55
  const [focusInput, setFocusInput] = (0, import_react.useState)("");
55
56
  return /* @__PURE__ */ import_react.default.createElement(
56
57
  import_design.Form,
@@ -77,7 +78,7 @@ var Login = ({
77
78
  /* @__PURE__ */ import_react.default.createElement(
78
79
  import_design.Input,
79
80
  {
80
- prefix: /* @__PURE__ */ import_react.default.createElement(import_icons.UserOutlined, { style: { color: import_design2.token.colorIcon } }),
81
+ prefix: /* @__PURE__ */ import_react.default.createElement(import_icons.UserOutlined, { style: { color: token.colorIcon } }),
81
82
  placeholder: locale.usernamePlaceholder,
82
83
  onFocus: () => {
83
84
  setFocusInput("username");
@@ -107,7 +108,7 @@ var Login = ({
107
108
  {
108
109
  visibilityToggle: true,
109
110
  autoComplete: "current-password",
110
- prefix: /* @__PURE__ */ import_react.default.createElement(import_icons.LockOutlined, { style: { color: import_design2.token.colorIcon } }),
111
+ prefix: /* @__PURE__ */ import_react.default.createElement(import_icons.LockOutlined, { style: { color: token.colorIcon } }),
111
112
  placeholder: locale.passwordPlaceholder,
112
113
  onFocus: () => {
113
114
  setFocusInput("password");
@@ -133,7 +134,7 @@ var Login = ({
133
134
  /* @__PURE__ */ import_react.default.createElement(
134
135
  import_design.Input,
135
136
  {
136
- prefix: /* @__PURE__ */ import_react.default.createElement(import_icons.SafetyCertificateOutlined, { style: { color: import_design2.token.colorIcon } }),
137
+ prefix: /* @__PURE__ */ import_react.default.createElement(import_icons.SafetyCertificateOutlined, { style: { color: token.colorIcon } }),
137
138
  placeholder: "请输入验证码",
138
139
  onFocus: () => {
139
140
  setFocusInput("authCode");
@@ -114,7 +114,7 @@ var Login = (props) => {
114
114
  style
115
115
  },
116
116
  /* @__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))),
117
- /* @__PURE__ */ import_react.default.createElement("div", { className: `${prefix}-card` }, showLocale && /* @__PURE__ */ import_react.default.createElement("span", { className: `${prefix}-locale` }, /* @__PURE__ */ import_react.default.createElement(import_LocaleDropdown.default, { locales })), 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(
117
+ /* @__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(
118
118
  import_design.Divider,
119
119
  {
120
120
  style: {