@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
@@ -1,7 +1,7 @@
1
- function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
2
- var _excluded = ["children", "location", "banner", "iconUrl", "logoUrl", "simpleLogoUrl", "topHeader", "menus", "defaultCollapsed", "defaultSelectedKeys", "defaultOpenKeys", "sideHeader", "subSideMenuProps", "subSideMenus", "prefixCls", "className"];
3
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
4
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
1
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
+ var _excluded = ["children", "location", "banner", "iconUrl", "logoUrl", "simpleLogoUrl", "topHeader", "menus", "defaultCollapsed", "defaultSelectedKeys", "defaultOpenKeys", "sideHeader", "subSideMenuProps", "subSideMenus", "className", "prefixCls"];
3
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
4
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
5
5
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
6
6
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
7
7
  function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
@@ -9,26 +9,25 @@ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArra
9
9
  function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
10
10
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
11
11
  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
12
- function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
12
+ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
13
13
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
14
14
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
15
15
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
16
16
  import { CaretRightFilled, LeftOutlined, RightOutlined } from '@oceanbase/icons';
17
17
  import { setAlpha } from '@ant-design/pro-components';
18
- import { token } from '@oceanbase/design';
18
+ import { Typography, theme } from '@oceanbase/design';
19
19
  import { isNullValue } from '@oceanbase/util';
20
20
  import { ConfigProvider, Divider, Layout, Menu, Tooltip } from '@oceanbase/design';
21
21
  import classNames from 'classnames';
22
22
  import { some } from 'lodash';
23
23
  import { pathToRegexp } from 'path-to-regexp';
24
- import React, { useContext, useEffect, useState } from 'react';
24
+ import React, { useEffect, useState, useContext } from 'react';
25
25
  import LocaleWrapper from "../locale/LocaleWrapper";
26
- import { getPrefix, isEnglish, urlToList } from "../_util";
26
+ import { urlToList } from "../_util";
27
27
  import useNavigate from "../_util/useNavigate";
28
28
  import Header from "./Header";
29
29
  import zhCN from "./locale/zh-CN";
30
30
  import useStyle from "./style";
31
- import "./index.less";
32
31
  import { jsx as _jsx } from "react/jsx-runtime";
33
32
  import { jsxs as _jsxs } from "react/jsx-runtime";
34
33
  import { Fragment as _Fragment } from "react/jsx-runtime";
@@ -36,7 +35,6 @@ var Content = Layout.Content,
36
35
  Sider = Layout.Sider;
37
36
  var SubMenu = Menu.SubMenu,
38
37
  Item = Menu.Item;
39
- var prefix = getPrefix('layout');
40
38
  var BasicLayout = function BasicLayout(_ref) {
41
39
  var _classNames, _classNames2;
42
40
  var children = _ref.children,
@@ -59,15 +57,16 @@ var BasicLayout = function BasicLayout(_ref) {
59
57
  sideHeader = _ref.sideHeader,
60
58
  subSideMenuProps = _ref.subSideMenuProps,
61
59
  subSideMenus = _ref.subSideMenus,
62
- customizePrefixCls = _ref.prefixCls,
63
60
  className = _ref.className,
61
+ customizePrefixCls = _ref.prefixCls,
64
62
  restProps = _objectWithoutProperties(_ref, _excluded);
63
+ var _theme$useToken = theme.useToken(),
64
+ token = _theme$useToken.token;
65
65
  var _useContext = useContext(ConfigProvider.ConfigContext),
66
66
  getPrefixCls = _useContext.getPrefixCls;
67
67
  var prefixCls = getPrefixCls('pro-basic-layout', customizePrefixCls);
68
68
  var _useStyle = useStyle(prefixCls),
69
69
  wrapSSR = _useStyle.wrapSSR;
70
- var basicLayoutCls = classNames(prefixCls, className);
71
70
  var navigate = useNavigate();
72
71
  // 侧边栏导航是否收起
73
72
  var _useState = useState(defaultCollapsed),
@@ -148,24 +147,20 @@ var BasicLayout = function BasicLayout(_ref) {
148
147
  }) : item.accessible)) {
149
148
  pre.push( /*#__PURE__*/_jsx(SubMenu, {
150
149
  "data-testid": "menu.sub",
151
- title: /*#__PURE__*/_jsx(Tooltip, _objectSpread(_objectSpread({
152
- placement: "right",
153
- title: item.title
154
- // SubMenu 通常都会带 icon,因此这里判断英文环境下如果标题字符长度 > 15 就支持 tooltip 展示
155
- }, isEnglish() && item.title && item.title.length > 15 ? {} : {
156
- visible: false,
157
- // Support for antd 5.0
158
- open: false
159
- }), {}, {
160
- getPopupContainer: function getPopupContainer() {
161
- return document.body;
162
- },
163
- children: /*#__PURE__*/_jsxs("span", {
164
- children: [renderIcon(item), /*#__PURE__*/_jsx("span", {
165
- children: item.title
166
- })]
167
- })
168
- })),
150
+ title: /*#__PURE__*/_jsxs("div", {
151
+ children: [renderIcon(item), /*#__PURE__*/_jsx(Typography.Text, {
152
+ ellipsis: {
153
+ tooltip: {
154
+ placement: 'right'
155
+ }
156
+ },
157
+ style: {
158
+ lineHeight: '40px',
159
+ maxWidth: 80
160
+ },
161
+ children: item.title
162
+ })]
163
+ }),
169
164
  children: renderMenu(item.children)
170
165
  }, item.link));
171
166
  } else if (!item.children && accessible) {
@@ -173,27 +168,23 @@ var BasicLayout = function BasicLayout(_ref) {
173
168
  "data-testid": "menu.item",
174
169
  onClick: function onClick() {
175
170
  if (pathname !== item.link) {
176
- navigate === null || navigate === void 0 ? void 0 : navigate(item.link);
171
+ navigate === null || navigate === void 0 || navigate(item.link);
177
172
  }
178
173
  },
179
- children: /*#__PURE__*/_jsx(Tooltip, _objectSpread(_objectSpread({
180
- placement: "right",
181
- title: item.title
182
- // 对于 Menu.Item,英文环境下如果标题字符长度 > 20 就支持 tooltip 展示
183
- }, isEnglish() && item.title && item.title.length > 20 ? {} : {
184
- visible: false,
185
- // Support for antd 5.0
186
- open: false
187
- }), {}, {
188
- getPopupContainer: function getPopupContainer() {
189
- return document.body;
190
- },
191
- children: /*#__PURE__*/_jsxs("span", {
192
- children: [renderIcon(item), /*#__PURE__*/_jsx("span", {
193
- children: item.title
194
- })]
195
- })
196
- }))
174
+ children: /*#__PURE__*/_jsxs("div", {
175
+ children: [renderIcon(item), /*#__PURE__*/_jsx(Typography.Text, {
176
+ ellipsis: {
177
+ tooltip: {
178
+ placement: 'right'
179
+ }
180
+ },
181
+ style: {
182
+ lineHeight: '40px',
183
+ maxWidth: 116
184
+ },
185
+ children: item.title
186
+ })]
187
+ })
197
188
  }, item.link));
198
189
  }
199
190
  if (item.divider && accessible) {
@@ -230,7 +221,7 @@ var BasicLayout = function BasicLayout(_ref) {
230
221
  "data-testid": "menu.item",
231
222
  onClick: function onClick() {
232
223
  if (pathname !== item.link) {
233
- navigate === null || navigate === void 0 ? void 0 : navigate(item.link);
224
+ navigate === null || navigate === void 0 || navigate(item.link);
234
225
  }
235
226
  },
236
227
  children: /*#__PURE__*/_jsx(Tooltip, {
@@ -264,34 +255,35 @@ var BasicLayout = function BasicLayout(_ref) {
264
255
  }
265
256
  return wrapSSR( /*#__PURE__*/_jsxs(_Fragment, {
266
257
  children: [banner && /*#__PURE__*/_jsx("div", {
267
- className: "".concat(prefix, "-banner-wrapper"),
258
+ className: "".concat(prefixCls, "-banner-wrapper"),
268
259
  children: banner
269
260
  }), /*#__PURE__*/_jsx(Layout, _objectSpread(_objectSpread({
270
- className: classNames(prefix, className, basicLayoutCls, (_classNames = {}, _defineProperty(_classNames, "".concat(prefix, "-with-banner"), banner), _defineProperty(_classNames, "".concat(prefixCls, "-sider-").concat(siderWidth), true), _classNames))
261
+ className: classNames(prefixCls, (_classNames = {}, _defineProperty(_classNames, "".concat(prefixCls, "-with-banner"), banner), _defineProperty(_classNames, "".concat(prefixCls, "-sider-").concat(siderWidth), true), _classNames), className)
271
262
  }, restProps), {}, {
272
263
  children: /*#__PURE__*/_jsxs(React.Fragment, {
273
264
  children: [/*#__PURE__*/_jsx(Header, _objectSpread({
265
+ prefixCls: prefixCls,
274
266
  pathname: pathname,
275
267
  iconUrl: iconUrl,
276
268
  logoUrl: logoUrl,
277
269
  simpleLogoUrl: simpleLogoUrl
278
270
  }, topHeader)), /*#__PURE__*/_jsx("div", {
279
271
  children: /*#__PURE__*/_jsxs(Layout, {
280
- className: "".concat(prefix, "-content-layout"),
272
+ className: "".concat(prefixCls, "-content-layout"),
281
273
  style: {
282
274
  marginTop: 48
283
275
  },
284
276
  children: [(subSideMenus || menus) && /*#__PURE__*/_jsx(Sider, {
285
277
  theme: "light",
286
278
  width: siderWidth,
287
- className: classNames("".concat(prefix, "-sider"), (_classNames2 = {}, _defineProperty(_classNames2, "".concat(prefix, "-sider-collapsed"), collapsed), _defineProperty(_classNames2, "".concat(prefix, "-sider-has-sub-sider"), subSideMenus), _classNames2)),
279
+ className: classNames("".concat(prefixCls, "-sider"), (_classNames2 = {}, _defineProperty(_classNames2, "".concat(prefixCls, "-sider-collapsed"), collapsed), _defineProperty(_classNames2, "".concat(prefixCls, "-sider-has-sub-sider"), subSideMenus), _classNames2)),
288
280
  children: /*#__PURE__*/_jsxs("div", {
289
- className: "".concat(prefix, "-sider-wrapper"),
281
+ className: "".concat(prefixCls, "-sider-wrapper"),
290
282
  children: [subSideMenus && /*#__PURE__*/_jsx("div", {
291
- className: "".concat(prefix, "-sub-sider"),
283
+ className: "".concat(prefixCls, "-sub-sider"),
292
284
  children: /*#__PURE__*/_jsx(Menu, _objectSpread(_objectSpread({}, subSideMenuProps), {}, {
293
285
  mode: "vertical",
294
- className: "".concat(prefix, "-menu-vertical"),
286
+ className: "".concat(prefixCls, "-menu-vertical"),
295
287
  children: renderCollapsedMenu(subSideMenus, true)
296
288
  }))
297
289
  }), (sideHeader || menus) && /*#__PURE__*/_jsxs("div", {
@@ -300,17 +292,17 @@ var BasicLayout = function BasicLayout(_ref) {
300
292
  width: '100%'
301
293
  },
302
294
  children: [/*#__PURE__*/_jsxs("div", {
303
- className: "".concat(prefix, "-sider-content"),
295
+ className: "".concat(prefixCls, "-sider-content"),
304
296
  children: [sideHeader && /*#__PURE__*/_jsx("div", {
305
- className: "".concat(prefix, "-sider-header"),
297
+ className: "".concat(prefixCls, "-sider-header"),
306
298
  children: sideHeader
307
299
  }), /*#__PURE__*/_jsx("div", {
308
- className: "".concat(prefix, "-menu-wrapper"),
300
+ className: "".concat(prefixCls, "-menu-wrapper"),
309
301
  children: collapsed ? /*#__PURE__*/_jsx("div", {
310
- className: "".concat(prefix, "-menu-collapsed"),
302
+ className: "".concat(prefixCls, "-menu-collapsed"),
311
303
  children: /*#__PURE__*/_jsx(Menu, _objectSpread(_objectSpread({}, menuProps), {}, {
312
304
  mode: "vertical",
313
- className: "".concat(prefix, "-menu-vertical"),
305
+ className: "".concat(prefixCls, "-menu-vertical"),
314
306
  children: renderCollapsedMenu(menus, false)
315
307
  }))
316
308
  }) : /*#__PURE__*/_jsx(Menu, _objectSpread(_objectSpread({}, menuProps), {}, {
@@ -324,14 +316,14 @@ var BasicLayout = function BasicLayout(_ref) {
324
316
  }
325
317
  });
326
318
  },
327
- className: "".concat(prefix, "-menu"),
319
+ className: "".concat(prefixCls, "-menu"),
328
320
  children: renderMenu(menus)
329
321
  }))
330
322
  })]
331
323
  }), /*#__PURE__*/_jsx("div", {
332
- className: "".concat(prefix, "-sider-border"),
324
+ className: "".concat(prefixCls, "-sider-border"),
333
325
  children: /*#__PURE__*/_jsx("div", {
334
- className: "".concat(prefix, "-sider-collapse"),
326
+ className: "".concat(prefixCls, "-sider-collapse"),
335
327
  onClick: function onClick() {
336
328
  setCollapsed(!collapsed);
337
329
  // 导航展开/收起时,重置 openKeys
@@ -343,7 +335,7 @@ var BasicLayout = function BasicLayout(_ref) {
343
335
  })]
344
336
  })
345
337
  }), /*#__PURE__*/_jsx(Content, {
346
- className: classNames("".concat(prefix, "-content"), "".concat(prefix, "-content-").concat(siderWidth)),
338
+ className: classNames("".concat(prefixCls, "-content"), "".concat(prefixCls, "-content-").concat(siderWidth)),
347
339
  style: {
348
340
  marginLeft: siderWidth
349
341
  },
@@ -0,0 +1,9 @@
1
+ /// <reference types="react" />
2
+ import type { FullToken, GenerateStyle } from 'antd/es/theme/internal';
3
+ export type HeaderToken = FullToken<any>;
4
+ export declare const genHeaderStyle: GenerateStyle<HeaderToken>;
5
+ declare const _default: (prefixCls: string) => {
6
+ wrapSSR: (node: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>) => import("react").JSX.Element;
7
+ hashId: string;
8
+ };
9
+ export default _default;
@@ -0,0 +1,94 @@
1
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
3
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
4
+ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
5
+ import { genComponentStyleHook } from "../../_util/genComponentStyleHook";
6
+ export var genHeaderStyle = function genHeaderStyle(token) {
7
+ var _$concat2, _$concat5, _$concat7, _ref;
8
+ var componentCls = token.componentCls;
9
+ return _ref = {}, _defineProperty(_ref, "".concat(componentCls), (_$concat5 = {
10
+ position: 'fixed',
11
+ zIndex: 10,
12
+ width: '100%',
13
+ height: 48,
14
+ padding: '10px 24px',
15
+ lineHeight: '48px',
16
+ backgroundColor: token.colorBgLayout,
17
+ boxShadow: "inset 0 -1px 0 0 ".concat(token.colorBorderSecondary)
18
+ }, _defineProperty(_$concat5, "".concat(componentCls, "-content"), {
19
+ display: 'flex',
20
+ alignItems: 'center',
21
+ justifyContent: 'space-between',
22
+ maxWidth: token.maxWidth,
23
+ height: '100%',
24
+ margin: '0 auto'
25
+ }), _defineProperty(_$concat5, "".concat(componentCls, "-logo"), {
26
+ height: 24,
27
+ cursor: 'pointer'
28
+ }), _defineProperty(_$concat5, "".concat(componentCls, "-icon"), {
29
+ width: 52,
30
+ height: 48,
31
+ lineHeight: '48px',
32
+ textAlign: 'center',
33
+ borderRight: "1px solid ".concat(token.colorBorderSecondary),
34
+ borderBottom: "1px solid ".concat(token.colorBorderSecondary),
35
+ cursor: 'pointer',
36
+ img: {
37
+ height: 32,
38
+ marginTop: 8
39
+ }
40
+ }), _defineProperty(_$concat5, "".concat(componentCls, "-title"), {
41
+ /* 占据剩余的全部空间 */
42
+ flex: 1,
43
+ margin: '0 16px'
44
+ }), _defineProperty(_$concat5, "".concat(componentCls, "-extra"), _defineProperty({
45
+ display: 'flex',
46
+ alignItems: 'center',
47
+ justifyContent: 'space-between'
48
+ }, "".concat(componentCls, "-extra-item"), (_$concat2 = {
49
+ display: 'inline-flex',
50
+ fontSize: 12,
51
+ cursor: 'pointer',
52
+ '&:not(:last-child)': {
53
+ marginRight: 24
54
+ }
55
+ }, _defineProperty(_$concat2, "".concat(componentCls, "-extra-icon-wrapper"), {
56
+ width: 28,
57
+ height: 28,
58
+ lineHeight: '28px',
59
+ textAlign: 'center',
60
+ border: '0.88px solid #ced4e1',
61
+ borderRadius: 14
62
+ }), _defineProperty(_$concat2, "".concat(componentCls, "-extra-user-wrapper"), _defineProperty({
63
+ height: 28,
64
+ padding: '0 10px',
65
+ lineHeight: '28px',
66
+ border: '0.88px solid #ced4e1',
67
+ borderRadius: 14
68
+ }, "".concat(componentCls, "-extra-user-icon"), {
69
+ marginRight: 6
70
+ })), _$concat2))), _defineProperty(_$concat5, "".concat(componentCls, "-extra-with-label"), _defineProperty({}, "".concat(componentCls, "-extra-item"), {
71
+ '&:not(:last-child)': {
72
+ marginRight: '24px !important'
73
+ }
74
+ })), _$concat5)), _defineProperty(_ref, "".concat(componentCls, "-about-wrapper"), (_$concat7 = {}, _defineProperty(_$concat7, "".concat(componentCls, "-about"), {
75
+ marginTop: 12
76
+ }), _defineProperty(_$concat7, "".concat(componentCls, "-logo"), {
77
+ height: 72
78
+ }), _defineProperty(_$concat7, "".concat(componentCls, "-release-info"), _defineProperty({
79
+ marginTop: 20,
80
+ marginBottom: 50
81
+ }, "".concat(componentCls, "-date"), {
82
+ fontSize: 12,
83
+ color: token.colorTextTertiary
84
+ })), _defineProperty(_$concat7, "".concat(componentCls, "-copyright"), {
85
+ fontSize: 12,
86
+ color: token.colorTextTertiary
87
+ }), _$concat7)), _ref;
88
+ };
89
+ export default (function (prefixCls) {
90
+ var useStyle = genComponentStyleHook('Header', function (token) {
91
+ return [genHeaderStyle(token)];
92
+ });
93
+ return useStyle(prefixCls);
94
+ });