@antv/dumi-theme-antv 0.3.20 → 0.4.0

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 (40) hide show
  1. package/dist/builtins/Playground/index.js +1 -1
  2. package/dist/font/Alibaba-PuHuiTi-Heavy.otf +0 -0
  3. package/dist/layouts/DocLayout.d.ts +2 -1
  4. package/dist/layouts/entry/Index.js +4 -4
  5. package/dist/pages/Example/index.js +1 -1
  6. package/dist/pages/Examples/components/Accouncement/index.js +1 -1
  7. package/dist/pages/Examples/components/ExampleTopicMenu/components/LeftMenu/index.js +1 -1
  8. package/dist/pages/Examples/components/ExampleTopicMenu/index.js +1 -1
  9. package/dist/pages/Examples/components/GalleryPageContent/index.js +3 -3
  10. package/dist/pages/Examples/index.js +1 -1
  11. package/dist/plugin/index.js +6 -7
  12. package/dist/slots/Banner/index.js +4 -4
  13. package/dist/slots/Cases/index.js +2 -2
  14. package/dist/slots/CodeEditor/Toolbar.js +4 -4
  15. package/dist/slots/CodeEditor/index.js +4 -4
  16. package/dist/slots/CodeEditor/utils.js +3 -3
  17. package/dist/slots/CodeRunner/index.d.ts +1 -1
  18. package/dist/slots/CodeRunner/index.js +25 -21
  19. package/dist/slots/CodeRunner/utils.js +3 -3
  20. package/dist/slots/Detail/index.d.ts +1 -0
  21. package/dist/slots/Detail/index.js +18 -8
  22. package/dist/slots/Detail/index.module.less +93 -103
  23. package/dist/slots/ExampleSider/index.js +4 -4
  24. package/dist/slots/Footer/index.js +15 -9
  25. package/dist/slots/Footer/index.module.less +30 -1
  26. package/dist/slots/Header/Navs.js +1 -1
  27. package/dist/slots/Header/Products/getProducts.js +3 -3
  28. package/dist/slots/Header/Products/index.js +4 -4
  29. package/dist/slots/Header/Search/index.js +1 -1
  30. package/dist/slots/Header/index.js +16 -29
  31. package/dist/slots/Header/index.module.less +64 -8
  32. package/dist/slots/ManualContent/Preview.js +6 -6
  33. package/dist/slots/ManualContent/index.js +9 -9
  34. package/dist/slots/hooks.js +2 -2
  35. package/dist/slots/utils.js +2 -2
  36. package/package.json +2 -2
  37. package/dist/slots/Header/Logo.d.ts +0 -7
  38. package/dist/slots/Header/Logo.js +0 -134
  39. package/dist/slots/Header/LogoWhite.d.ts +0 -7
  40. package/dist/slots/Header/LogoWhite.js +0 -18
@@ -1,5 +1,10 @@
1
1
  @import '../_.less';
2
2
 
3
+ @font-face {
4
+ font-family: AlibabaPuHuiTiRHeavy;
5
+ src: url(../../font/Alibaba-PuHuiTi-Heavy.otf);
6
+ }
7
+
3
8
  .container1440() {
4
9
  width: 1440px;
5
10
  max-width: calc(100% - 80px);
@@ -41,159 +46,143 @@
41
46
 
42
47
  .title {
43
48
  font-size: 3.4em; //2.875em;
44
- font-weight: 800;
45
49
  color: rgba(0, 0, 0, 1);
46
50
  position: relative;
51
+ font-family: AlibabaPuHuiTiRHeavy;
52
+
53
+ .engine {
54
+ color: #691EFF;
55
+ }
47
56
  }
48
57
 
49
58
  .description {
50
59
  margin-top: 0.83%; //12px;
51
60
  margin-bottom: 0px;
52
61
  color: rgba(106, 123, 140, 1);
53
- font-size: 1.14em;
54
62
  font-weight: 200;
55
63
  position: relative;
56
64
  width: 40%;
57
65
  max-width: 700px;
66
+ font-family: AlibabaPuHuiTiR;
67
+ font-size: 18px;
68
+ color: #424E66;
58
69
  }
59
70
 
60
71
  .buttons {
61
72
  display: flex;
62
73
  margin-top: 5.56%;
63
74
 
64
- .buttonLink+.buttonLink {
65
- margin-left: 16px;
66
- }
67
-
68
75
  .buttonLink {
76
+ display: flex;
77
+ align-items: center;
78
+ justify-content: center;
69
79
  cursor: pointer;
70
- border-radius: 50px;
71
- min-width: 134px;
72
- padding-left: 15px;
73
- padding-right: 15px;
74
- height: 40px;
80
+ border-radius: 12px;
75
81
  z-index: 10;
76
82
  position: relative;
77
83
  transition: all 0.3s;
78
- border: 1px solid @primary-color;
79
- color: @primary-color;
80
- background: transparent;
81
84
  text-align: center;
82
- font-size: 1.14em;
83
- line-height: 40px;
85
+ height: 54px;
86
+ width: 166px;
87
+ box-shadow: 0 8px 28px 0 rgba(0, 0, 0, 0.10);
88
+ background-color: #691EFF;
89
+ font-size: 18px;
90
+ cursor: pointer;
91
+ box-shadow: 0 8px 28px 0 #f2f2f2;
92
+ margin-right: 20px;
93
+ color: #FFFFFF;
94
+ overflow: hidden;
95
+
96
+ .icon {
97
+ width: 20px;
98
+ height: 20px;
99
+ background-image: url(https://mdn.alipayobjects.com/huamei_qa8qxu/afts/img/A*lo_5RYdqKLsAAAAAAAAAAAAADmJ7AQ/original);
100
+ margin-right: 6px;
101
+ }
84
102
 
85
103
  &:hover {
86
- color: tint(@primary-color, 25%);
87
- border: 1px solid tint(@primary-color, 25%);
88
- background-color: fade(@primary-color, 3%);
104
+ opacity: 0.8;
89
105
  }
90
106
 
91
107
  &.primary {
92
- border: none;
93
- outline: none;
94
108
  color: #fff;
95
- background: linear-gradient(60deg, fade(@primary-color, 70%), shade(@primary-color, 20%));
96
- opacity: 0.8;
97
- box-shadow: 0 8px 10px fade(@primary-color, 20%);
109
+ background-color: #FFFFFF;
110
+ color: #000;
111
+ border: 1px solid #E8E8E8;
112
+
113
+ .icon {
114
+ position: relative;
115
+ background-image: url(https://mdn.alipayobjects.com/huamei_qa8qxu/afts/img/A*_xFsQbWE_AYAAAAAAAAAAAAADmJ7AQ/original);
116
+ }
98
117
 
99
118
  &:hover {
100
- opacity: 1;
119
+ color: #691EFF;
120
+
121
+ .icon {
122
+ left: -80px;
123
+ filter: drop-shadow(#691EFF 80px 0);
124
+ }
101
125
  }
102
126
  }
103
127
  }
104
128
 
105
129
  .githubWrapper {
106
- margin-left: 16px;
107
130
  display: flex;
108
131
 
109
132
  :global {
110
- .gh-btn {
111
- width: 40px;
112
- height: 40px;
113
- border-radius: 20px;
114
- padding: 9px;
115
- border: 1px solid #ced4d9;
116
- background: transparent;
117
- text-decoration: none;
118
- white-space: nowrap;
133
+ .github-btn {
119
134
  display: flex;
135
+ height: 54px;
136
+ padding: 0 16px;
120
137
  cursor: pointer;
121
- float: left;
138
+ box-shadow: 0 8px 28px 0 rgba(0, 0, 0, 0.05);
139
+ background-color: #FFFFFF;
140
+ border: 1px solid #E8E8E8;
141
+ justify-content: center;
142
+ align-items: center;
143
+ border-radius: 12px;
144
+ overflow: hidden;
122
145
  transition: all 0.15s;
123
146
 
124
147
  &:hover {
125
- background: #f2f4f5;
148
+ .gh-btn {
149
+ >.gh-ico {
150
+ filter: drop-shadow(#691EFF 80px 0);
151
+ }
152
+ }
153
+
154
+ .gh-count {
155
+ color: #691EFF;
156
+ }
126
157
  }
127
158
 
128
- .gh-ico {
129
- width: 16px;
130
- height: 16px;
131
- margin-left: 2px;
132
- margin-top: 2px;
133
- background-image: url(https://gw.alipayobjects.com/mdn/rms_f8c6a0/afts/img/A*Nk9mQ48ZoZMAAAAAAAAAAABkARQnAQ);
134
- background-size: 100% 100%;
135
- background-repeat: no-repeat;
136
- box-sizing: border-box;
137
- cursor: pointer;
138
- color: #333;
159
+ .gh-btn {
160
+ .gh-ico {
161
+ display: block;
162
+ width: 20px;
163
+ height: 20px;
164
+ background-image: url(https://gw.alipayobjects.com/mdn/rms_f8c6a0/afts/img/A*Nk9mQ48ZoZMAAAAAAAAAAABkARQnAQ);
165
+ background-size: 100% 100%;
166
+ background-repeat: no-repeat;
167
+ position: relative;
168
+ left: -80px;
169
+ filter: drop-shadow(#1D2129 80px 0);
170
+ }
171
+
172
+ .gh-text {
173
+ display: none;
174
+ }
139
175
  }
140
176
 
141
- .gh-text {
142
- display: none;
177
+ .gh-count {
178
+ position: relative;
179
+ font-size: 18px;
180
+ margin-left: 8px;
181
+ color: #1D2129;
182
+ letter-spacing: 0;
183
+ font-family: AlibabaSans102-Medium;
143
184
  }
144
185
  }
145
-
146
- .gh-count {
147
- position: relative;
148
- display: none;
149
- /* hidden to start */
150
- margin-left: 52px;
151
- margin-top: 7px;
152
- border: 1px solid #d4d4d4;
153
- padding: 2px 10px;
154
- font-weight: 700;
155
- height: 65%;
156
- border-radius: 5px;
157
- color: rgb(49, 70, 89);
158
-
159
- &:hover {
160
- background: #f2f4f5;
161
- transition: all 0.15s;
162
- }
163
- }
164
-
165
- .gh-count:hover,
166
- .gh-count:focus {
167
- color: #4183c4;
168
- }
169
-
170
- .gh-count:before,
171
- .gh-count:after {
172
- content: '';
173
- position: absolute;
174
- display: inline-block;
175
- width: 0;
176
- height: 0;
177
- border-color: transparent;
178
- border-style: solid;
179
- }
180
-
181
- .gh-count:before {
182
- top: 50%;
183
- left: -3px;
184
- margin-top: -5px;
185
- border-width: 4px 4px 4px 0;
186
- border-right-color: #fafafa;
187
- }
188
-
189
- .gh-count:after {
190
- top: 50%;
191
- border-width: 5px 5px 5px 0;
192
- border-right-color: #d4d4d4;
193
- left: -5px;
194
- z-index: -1;
195
- margin-top: -6px;
196
- }
197
186
  }
198
187
  }
199
188
  }
@@ -227,6 +216,7 @@
227
216
  position: relative;
228
217
  }
229
218
  }
219
+
230
220
  .backLeftBottom {
231
221
  position: absolute;
232
222
  left: -8%;
@@ -377,4 +367,4 @@
377
367
  top: 14%;
378
368
  }
379
369
  }
380
- }
370
+ }
@@ -1,6 +1,6 @@
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
- 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; }
3
- 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
+ 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; }
3
+ 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; }
4
4
  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; }
5
5
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
6
6
  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); }
@@ -8,7 +8,7 @@ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArra
8
8
  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."); }
9
9
  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); }
10
10
  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; }
11
- 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; } }
11
+ 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; } }
12
12
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
13
13
  import React, { useEffect, useRef, useState } from 'react';
14
14
  import { Input, Menu, Tooltip } from 'antd';
@@ -1,5 +1,5 @@
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 = ["columns", "bottom", "theme", "language", "isDynamicFooter", "rootDomain", "className"];
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 = ["columns", "bottom", "language", "isDynamicFooter", "rootDomain", "className"];
3
3
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
4
4
  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; }
5
5
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
@@ -9,9 +9,10 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
9
9
  import React from 'react';
10
10
  import { default as RCFooter } from 'rc-footer';
11
11
  import { GithubOutlined, WeiboOutlined, ZhihuOutlined, QuestionCircleOutlined } from '@ant-design/icons';
12
+ import cx from 'classnames';
12
13
  import { omit } from 'lodash-es';
13
14
  import classnames from 'classnames';
14
- import { useLocale, FormattedMessage } from 'dumi';
15
+ import { useLocale, FormattedMessage, useSiteData } from 'dumi';
15
16
  import 'rc-footer/assets/index.less';
16
17
  import styles from "./index.module.less";
17
18
  /**
@@ -19,18 +20,23 @@ import styles from "./index.module.less";
19
20
  * @returns
20
21
  */
21
22
  export var Footer = function Footer(props) {
23
+ var _classnames;
22
24
  var columns = props.columns,
23
25
  bottom = props.bottom,
24
- _props$theme = props.theme,
25
- theme = _props$theme === void 0 ? 'dark' : _props$theme,
26
26
  language = props.language,
27
27
  isDynamicFooter = props.isDynamicFooter,
28
28
  _props$rootDomain = props.rootDomain,
29
29
  rootDomain = _props$rootDomain === void 0 ? '' : _props$rootDomain,
30
30
  className = props.className,
31
31
  restProps = _objectWithoutProperties(props, _excluded);
32
+ var _useSiteData = useSiteData(),
33
+ themeConfig = _useSiteData.themeConfig;
32
34
  var locale = useLocale();
33
35
  var lang = locale.id;
36
+ var _themeConfig$footerTh = themeConfig.footerTheme,
37
+ footerTheme = _themeConfig$footerTh === void 0 ? 'dark' : _themeConfig$footerTh;
38
+ var _restProps$theme = restProps.theme,
39
+ theme = _restProps$theme === void 0 ? footerTheme : _restProps$theme;
34
40
  var getColumns = function getColumns() {
35
41
  // 如果外部没有传入 columns,则默认展示 antv footer
36
42
  var col1 = {
@@ -175,10 +181,10 @@ export var Footer = function Footer(props) {
175
181
  maxColumnsPerRow: 5,
176
182
  theme: theme,
177
183
  columns: columns || getColumns(),
178
- className: classnames(styles.footer, className, _defineProperty({}, styles.withMenu, isDynamicFooter)),
184
+ className: classnames(styles.footer, className, (_classnames = {}, _defineProperty(_classnames, styles.light, theme === 'light'), _defineProperty(_classnames, styles.withMenu, isDynamicFooter), _classnames)),
179
185
  bottom: bottom || /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
180
- className: styles.bottom
181
- }, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("a", {
186
+ className: cx(styles.bottom, _defineProperty({}, styles.light, theme === 'light'))
187
+ }, theme === 'light' ? '© Copyright 2022 Ant Group Co., Ltd..备案号:京ICP备15032932号-38' : /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("a", {
182
188
  href: "https://weibo.com/antv2017",
183
189
  target: "_blank",
184
190
  rel: "noopener noreferrer"
@@ -196,6 +202,6 @@ export var Footer = function Footer(props) {
196
202
  id: "\u5173\u4E8E\u6211\u4EEC"
197
203
  }))), /*#__PURE__*/React.createElement("div", null, "\xA9 ", new Date().getFullYear(), " Made with \u2764 by", ' ', /*#__PURE__*/React.createElement("a", {
198
204
  href: "https://xtech.antfin.com/"
199
- }, "AntV"))))
205
+ }, "AntV")))))
200
206
  }, omit(restProps, ['githubUrl'])));
201
207
  };
@@ -9,6 +9,24 @@
9
9
  .container1440;
10
10
  }
11
11
 
12
+ :global(.rc-footer-bottom-container) {
13
+ border-top: 4px solid #F0F2FF;
14
+ }
15
+
16
+ &.light {
17
+ :global(.rc-footer-item) {
18
+ > a {
19
+ > span {
20
+ font-size: 16px;
21
+ }
22
+ }
23
+
24
+ >a:hover {
25
+ color: #691EFF;
26
+ }
27
+ }
28
+ }
29
+
12
30
  .description {
13
31
  opacity: 0.6;
14
32
  font-weight: normal;
@@ -49,7 +67,7 @@
49
67
 
50
68
  .bottom {
51
69
  display: flex;
52
- justify-content: space-between;
70
+ justify-content: center;
53
71
  font-size: 14px;
54
72
 
55
73
  :global(.anticon),
@@ -57,6 +75,17 @@
57
75
  margin-right: 8px;
58
76
  color: rgba(255, 255, 255, 0.6);
59
77
  }
78
+
79
+ &.light {
80
+ :global(.anticon),
81
+ a {
82
+ color: #424E66;
83
+
84
+ &:hover {
85
+ color: #691EFF;
86
+ }
87
+ }
88
+ }
60
89
  }
61
90
  }
62
91
 
@@ -1,4 +1,4 @@
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); }
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
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
3
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
4
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); }
@@ -1,6 +1,6 @@
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
- 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; }
3
- 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
+ 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; }
3
+ 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; }
4
4
  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; }
5
5
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
6
6
  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); }
@@ -1,4 +1,4 @@
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); }
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
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
3
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
4
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); }
@@ -6,7 +6,7 @@ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArra
6
6
  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."); }
7
7
  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); }
8
8
  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; }
9
- 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; } }
9
+ 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; } }
10
10
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
11
11
  import React from 'react';
12
12
  import cx from 'classnames';
@@ -50,13 +50,13 @@ export var Products = function Products(_ref) {
50
50
  })), /*#__PURE__*/React.createElement("ul", null, products.filter(function (item) {
51
51
  return item.category === type;
52
52
  }).map(function (product) {
53
- var _product$links, _product$links$home;
53
+ var _product$links;
54
54
  return /*#__PURE__*/React.createElement(Product, {
55
55
  key: product.title,
56
56
  name: product.title,
57
57
  slogan: product.slogan || '',
58
58
  description: product.description,
59
- url: (_product$links = product.links) === null || _product$links === void 0 ? void 0 : (_product$links$home = _product$links.home) === null || _product$links$home === void 0 ? void 0 : _product$links$home.url,
59
+ url: (_product$links = product.links) === null || _product$links === void 0 || (_product$links = _product$links.home) === null || _product$links === void 0 ? void 0 : _product$links.url,
60
60
  icon: product.icon,
61
61
  links: product.links,
62
62
  language: language || locale.id
@@ -2,7 +2,7 @@ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArra
2
2
  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."); }
3
3
  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); }
4
4
  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; }
5
- 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; } }
5
+ 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; } }
6
6
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
7
7
  import React, { useEffect, useState, useMemo } from 'react';
8
8
  import { Popover } from 'antd';
@@ -1,6 +1,6 @@
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
- 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; }
3
- 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
+ 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; }
3
+ 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; }
4
4
  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; }
5
5
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
6
6
  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); }
@@ -8,7 +8,7 @@ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArra
8
8
  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."); }
9
9
  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); }
10
10
  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; }
11
- 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; } }
11
+ 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; } }
12
12
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
13
13
  // import { navigate } from 'gatsby';
14
14
  import React, { useState, useEffect } from 'react';
@@ -17,13 +17,11 @@ import { useNavigate } from "react-router-dom";
17
17
  import cx from 'classnames';
18
18
  import { useSiteData, useLocale, FormattedMessage } from 'dumi';
19
19
  import { GithubOutlined, MenuOutlined, CaretDownFilled, DownOutlined, WechatOutlined, LinkOutlined, CheckOutlined } from '@ant-design/icons';
20
- import { Alert, Modal, Button, Popover, Menu, Dropdown, Select } from 'antd';
20
+ import { Modal, Button, Popover, Menu, Dropdown, Select } from 'antd';
21
21
  import { get, map, size } from 'lodash-es';
22
22
  import { Search } from "./Search";
23
23
  import { Products } from "./Products";
24
24
  import { Navs } from "./Navs";
25
- import { Logo } from "./Logo";
26
- import { LogoWhite } from "./LogoWhite";
27
25
  import { findVersion, getLangUrl } from "./utils";
28
26
  import { ic } from "../hooks";
29
27
  import styles from "./index.module.less";
@@ -168,10 +166,9 @@ var HeaderComponent = function HeaderComponent(_ref) {
168
166
  setPopupMenuVisible(!popupMenuVisible);
169
167
  };
170
168
  var _img$link$logo = _objectSpread({
171
- img: isAntVHome ? /*#__PURE__*/React.createElement(LogoWhite, {
172
- style: {}
173
- }) : /*#__PURE__*/React.createElement(Logo, {
174
- style: {}
169
+ img: /*#__PURE__*/React.createElement("img", {
170
+ src: "https://mdn.alipayobjects.com/huamei_qa8qxu/afts/img/A*A-lcQbVTpjwAAAAAAAAAAAAADmJ7AQ/original",
171
+ alt: "logo"
175
172
  }),
176
173
  link: ''
177
174
  }, logo),
@@ -341,7 +338,9 @@ var HeaderComponent = function HeaderComponent(_ref) {
341
338
  }
342
339
  return null;
343
340
  }))), /** 切换网站语言 */
344
- showLanguageSwitcher && /*#__PURE__*/React.createElement("li", null, /*#__PURE__*/React.createElement(Dropdown, {
341
+ showLanguageSwitcher && /*#__PURE__*/React.createElement("li", {
342
+ className: cx(styles.navIcon, styles.languageSwitcher)
343
+ }, /*#__PURE__*/React.createElement(Dropdown, {
345
344
  placement: "bottomRight",
346
345
  overlay: /*#__PURE__*/React.createElement(Menu, {
347
346
  defaultSelectedKeys: [lang],
@@ -390,7 +389,7 @@ var HeaderComponent = function HeaderComponent(_ref) {
390
389
  d: "M12.87 15.07l-2.54-2.51.03-.03c1.74-1.94 2.98-4.17 3.71-6.53H17V4h-7V2H8v2H1v1.99h11.17C11.5 7.92 10.44 9.75 9 11.35 8.07 10.32 7.3 9.19 6.69 8h-2c.73 1.63 1.73 3.17 2.98 4.56l-5.09 5.02L4 19l5-5 3.11 3.11.76-2.04zM18.5 10h-2L12 22h2l1.12-3h4.75L21 22h2l-4.5-12zm-2.62 7l1.62-4.33L19.12 17h-3.24z"
391
390
  }))))), /** 微信公众号 */
392
391
  showWxQrcode && /*#__PURE__*/React.createElement("li", {
393
- className: styles.wxQrcode
392
+ className: cx(styles.navIcon, styles.wxQrcode)
394
393
  }, /*#__PURE__*/React.createElement(Popover, {
395
394
  content: /*#__PURE__*/React.createElement("img", {
396
395
  width: "100%",
@@ -409,27 +408,15 @@ var HeaderComponent = function HeaderComponent(_ref) {
409
408
  }
410
409
  }, /*#__PURE__*/React.createElement(WechatOutlined, null))), /** GitHub icon */
411
410
  showGithubCorner && /*#__PURE__*/React.createElement("li", {
412
- className: styles.githubCorner
411
+ className: cx(styles.navIcon, styles.githubCorner)
413
412
  }, /*#__PURE__*/React.createElement("a", {
414
413
  href: githubUrl,
415
414
  target: "_blank",
416
415
  rel: "noreferrer"
417
416
  }, /*#__PURE__*/React.createElement(GithubOutlined, null))));
418
417
  return /*#__PURE__*/React.createElement("header", {
419
- className: cx(styles.header, (_cx4 = {}, _defineProperty(_cx4, styles.transparent, !!transparent && !productMenuVisible), _defineProperty(_cx4, styles.isHomePage, !!isHomePage && !isAntVHome), _defineProperty(_cx4, styles.lightTheme, !!isAntVHome && !productMenuVisible && isWide), _defineProperty(_cx4, styles.fixed, popupMenuVisible), _cx4))
420
- }, bannerVisible && /*#__PURE__*/React.createElement(Alert, {
421
- className: styles.banner,
422
- message: /*#__PURE__*/React.createElement("div", {
423
- dangerouslySetInnerHTML: {
424
- __html: banner.html
425
- }
426
- }),
427
- type: "info",
428
- banner: true,
429
- closable: true,
430
- showIcon: false,
431
- onClose: onBannerClose
432
- }), /*#__PURE__*/React.createElement("div", {
418
+ className: cx(styles.header, (_cx4 = {}, _defineProperty(_cx4, styles.transparent, !!transparent && !productMenuVisible), _defineProperty(_cx4, styles.isHomePage, !!isHomePage && !isAntVHome), _defineProperty(_cx4, styles.lightTheme, !!isAntVHome && !productMenuVisible && isWide), _defineProperty(_cx4, styles.isAntVHome, !!isAntVHome), _defineProperty(_cx4, styles.fixed, popupMenuVisible), _cx4))
419
+ }, /*#__PURE__*/React.createElement("div", {
433
420
  className: styles.container
434
421
  }, /*#__PURE__*/React.createElement("div", {
435
422
  className: styles.left
@@ -441,7 +428,7 @@ var HeaderComponent = function HeaderComponent(_ref) {
441
428
  className: styles.subProduceName
442
429
  }, /*#__PURE__*/React.createElement("a", {
443
430
  href: window.location.pathname.startsWith('/en') ? '/en' : '/'
444
- }, subTitle))), showSearch && !isAntVHome && /*#__PURE__*/React.createElement(Search, searchOptions)), /*#__PURE__*/React.createElement("nav", {
431
+ }, subTitle))), showSearch && !isAntVHome && /*#__PURE__*/React.createElement(Search, null)), /*#__PURE__*/React.createElement("nav", {
445
432
  className: styles.nav
446
433
  }, menu, menuIcon)));
447
434
  };