@antv/dumi-theme-antv 0.2.2 → 0.3.0-beta.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (265) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +32 -33
  3. package/dist/builtins/Playground/index.d.ts +21 -0
  4. package/dist/builtins/Playground/index.js +69 -0
  5. package/dist/builtins/Playground/index.module.less +15 -0
  6. package/dist/context.d.ts +6 -0
  7. package/dist/context.js +2 -0
  8. package/dist/layouts/DocLayout.d.ts +7 -0
  9. package/dist/layouts/DocLayout.js +48 -0
  10. package/dist/layouts/entry/API.d.ts +10 -0
  11. package/dist/layouts/entry/API.js +12 -0
  12. package/dist/layouts/entry/Index.d.ts +7 -0
  13. package/dist/layouts/entry/Index.js +79 -0
  14. package/dist/layouts/entry/Manual.d.ts +8 -0
  15. package/dist/layouts/entry/Manual.js +13 -0
  16. package/dist/locales/en.json +98 -0
  17. package/dist/locales/zh.json +98 -0
  18. package/dist/pages/404.d.ts +6 -0
  19. package/dist/pages/404.js +18 -0
  20. package/dist/pages/Example/index.d.ts +6 -0
  21. package/dist/pages/Example/index.js +115 -0
  22. package/dist/pages/Example/index.module.less +82 -0
  23. package/dist/pages/Example/utils.d.ts +1 -0
  24. package/dist/pages/Example/utils.js +9 -0
  25. package/dist/pages/Examples/components/Accouncement/index.d.ts +6 -0
  26. package/dist/pages/Examples/components/Accouncement/index.js +60 -0
  27. package/dist/pages/Examples/components/Accouncement/index.module.less +9 -0
  28. package/dist/pages/Examples/components/Article/index.d.ts +2 -0
  29. package/dist/pages/Examples/components/Article/index.js +8 -0
  30. package/dist/pages/Examples/components/Article/index.module.less +2 -0
  31. package/dist/pages/Examples/components/ExampleTopicMenu/components/LeftMenu/index.d.ts +10 -0
  32. package/dist/pages/Examples/components/ExampleTopicMenu/components/LeftMenu/index.js +74 -0
  33. package/dist/pages/Examples/components/ExampleTopicMenu/index.d.ts +9 -0
  34. package/{es/builtins/Example.js → dist/pages/Examples/components/ExampleTopicMenu/index.js} +47 -33
  35. package/dist/pages/Examples/components/GalleryPageContent/DemoCard/index.d.ts +10 -0
  36. package/dist/pages/Examples/components/GalleryPageContent/DemoCard/index.js +33 -0
  37. package/dist/pages/Examples/components/GalleryPageContent/index.d.ts +10 -0
  38. package/dist/pages/Examples/components/GalleryPageContent/index.js +81 -0
  39. package/dist/pages/Examples/index.d.ts +8 -0
  40. package/dist/pages/Examples/index.js +95 -0
  41. package/dist/pages/Examples/index.module.less +607 -0
  42. package/dist/pages/Examples/types.d.ts +34 -0
  43. package/dist/pages/Examples/types.js +1 -0
  44. package/dist/plugin/examples.d.ts +21 -0
  45. package/dist/plugin/examples.js +105 -0
  46. package/dist/plugin/index.d.ts +3 -0
  47. package/dist/plugin/index.js +113 -0
  48. package/dist/plugin/utils.d.ts +5 -0
  49. package/dist/plugin/utils.js +46 -0
  50. package/dist/slots/404.d.ts +2 -0
  51. package/{es/antv/404/index.js → dist/slots/404.js} +4 -9
  52. package/{es/antv/Cases/Cases.d.ts → dist/slots/Cases/index.d.ts} +5 -4
  53. package/{es/antv/Cases/Cases.js → dist/slots/Cases/index.js} +25 -25
  54. package/{src/antv/Cases/Cases.module.less → dist/slots/Cases/index.module.less} +36 -5
  55. package/dist/slots/CodeEditor/Toolbar.d.ts +67 -0
  56. package/dist/slots/CodeEditor/Toolbar.js +140 -0
  57. package/dist/slots/CodeEditor/Toolbar.module.less +81 -0
  58. package/dist/slots/CodeEditor/index.d.ts +58 -0
  59. package/dist/slots/CodeEditor/index.js +226 -0
  60. package/dist/slots/CodeEditor/index.module.less +11 -0
  61. package/dist/slots/CodeEditor/utils.d.ts +42 -0
  62. package/dist/slots/CodeEditor/utils.js +157 -0
  63. package/dist/slots/CodePreview/CodeHeader.d.ts +19 -0
  64. package/dist/slots/CodePreview/CodeHeader.js +32 -0
  65. package/dist/slots/CodePreview/CodeHeader.module.less +0 -0
  66. package/dist/slots/CodePreview/index.d.ts +17 -0
  67. package/dist/slots/CodePreview/index.js +29 -0
  68. package/dist/slots/CodePreview/index.module.less +43 -0
  69. package/dist/slots/CodeRunner/index.d.ts +15 -0
  70. package/dist/slots/CodeRunner/index.js +79 -0
  71. package/dist/slots/CodeRunner/index.module.less +0 -0
  72. package/dist/slots/CodeRunner/utils.d.ts +11 -0
  73. package/dist/slots/CodeRunner/utils.js +36 -0
  74. package/dist/slots/Companies/index.d.ts +13 -0
  75. package/dist/slots/Companies/index.js +49 -0
  76. package/dist/slots/Companies/index.module.less +82 -0
  77. package/dist/slots/Detail/News.d.ts +10 -0
  78. package/{es/antv/Banner/Notification.js → dist/slots/Detail/News.js} +8 -11
  79. package/{src/antv/Banner/Notification.module.less → dist/slots/Detail/News.module.less} +15 -3
  80. package/dist/slots/Detail/index.d.ts +27 -0
  81. package/dist/slots/Detail/index.js +124 -0
  82. package/{src/antv/Banner/Banner.module.less → dist/slots/Detail/index.module.less} +42 -74
  83. package/dist/slots/ExampleSider/index.d.ts +21 -0
  84. package/dist/slots/ExampleSider/index.js +196 -0
  85. package/dist/slots/ExampleSider/index.module.less +141 -0
  86. package/{es/antv → dist/slots}/Features/FeatureCard.d.ts +2 -1
  87. package/{es/antv → dist/slots}/Features/FeatureCard.js +6 -6
  88. package/{src/antv → dist/slots}/Features/FeatureCard.module.less +8 -1
  89. package/{es/antv → dist/slots}/Features/index.d.ts +2 -2
  90. package/{es/antv → dist/slots}/Features/index.js +19 -26
  91. package/{src/antv/Features/Features.module.less → dist/slots/Features/index.module.less} +34 -3
  92. package/dist/slots/Footer/index.d.ts +18 -0
  93. package/dist/slots/Footer/index.js +188 -0
  94. package/dist/slots/Footer/index.module.less +86 -0
  95. package/dist/slots/Header/Logo.d.ts +7 -0
  96. package/{es/antv → dist/slots}/Header/Logo.js +6 -2
  97. package/dist/slots/Header/LogoWhite.d.ts +7 -0
  98. package/dist/slots/Header/LogoWhite.js +19 -0
  99. package/dist/slots/Header/Navs.d.ts +26 -0
  100. package/dist/slots/Header/Navs.js +63 -0
  101. package/dist/slots/Header/Products/NavigatorBanner.d.ts +10 -0
  102. package/dist/slots/Header/Products/NavigatorBanner.js +34 -0
  103. package/dist/slots/Header/Products/NavigatorBanner.module.less +39 -0
  104. package/{es/antv → dist/slots/Header}/Products/Product.d.ts +3 -3
  105. package/{es/antv → dist/slots/Header}/Products/Product.js +11 -16
  106. package/{src/antv → dist/slots/Header}/Products/Product.module.less +10 -8
  107. package/{es/antv → dist/slots/Header}/Products/getProducts.d.ts +2 -7
  108. package/dist/slots/Header/Products/getProducts.js +67 -0
  109. package/dist/slots/Header/Products/index.d.ts +9 -0
  110. package/{es/antv → dist/slots/Header}/Products/index.js +15 -22
  111. package/dist/slots/Header/Search.d.ts +12 -0
  112. package/dist/slots/Header/Search.js +90 -0
  113. package/dist/slots/Header/Search.module.less +39 -0
  114. package/dist/slots/Header/index.d.ts +66 -0
  115. package/dist/slots/Header/index.js +380 -0
  116. package/dist/slots/Header/index.module.less +382 -0
  117. package/dist/slots/Header/utils.d.ts +1 -0
  118. package/dist/slots/Header/utils.js +26 -0
  119. package/dist/slots/Loading/index.d.ts +7 -0
  120. package/dist/slots/Loading/index.js +79 -0
  121. package/dist/slots/Loading/index.module.less +279 -0
  122. package/dist/slots/ManualContent/NavigatorBanner.d.ts +9 -0
  123. package/dist/slots/ManualContent/NavigatorBanner.js +36 -0
  124. package/dist/slots/ManualContent/NavigatorBanner.module.less +39 -0
  125. package/dist/slots/ManualContent/ReadingTime.d.ts +3 -0
  126. package/dist/slots/ManualContent/ReadingTime.js +10 -0
  127. package/dist/slots/ManualContent/index.d.ts +9 -0
  128. package/dist/slots/ManualContent/index.js +344 -0
  129. package/dist/slots/ManualContent/index.module.less +668 -0
  130. package/dist/slots/ManualContent/utils.d.ts +3 -0
  131. package/dist/slots/ManualContent/utils.js +35 -0
  132. package/dist/slots/SEO.d.ts +10 -0
  133. package/dist/slots/SEO.js +59 -0
  134. package/dist/slots/TOC.d.ts +5 -0
  135. package/dist/slots/TOC.js +6 -0
  136. package/dist/slots/_.less +83 -0
  137. package/dist/slots/global.d.ts +1 -0
  138. package/dist/slots/global.js +7 -0
  139. package/dist/slots/hooks.d.ts +16 -0
  140. package/{es/antv → dist/slots}/hooks.js +60 -37
  141. package/dist/slots/utils.d.ts +5 -0
  142. package/dist/slots/utils.js +112 -0
  143. package/dist/types.d.ts +86 -0
  144. package/dist/types.js +1 -0
  145. package/dist/typings.d.ts +24 -0
  146. package/package.json +110 -47
  147. package/es/antv/404/index.d.ts +0 -2
  148. package/es/antv/Banner/Banner.module.less +0 -412
  149. package/es/antv/Banner/Notification.d.ts +0 -10
  150. package/es/antv/Banner/Notification.module.less +0 -108
  151. package/es/antv/Banner/index.d.ts +0 -25
  152. package/es/antv/Banner/index.js +0 -104
  153. package/es/antv/Cases/Cases.module.less +0 -203
  154. package/es/antv/Features/FeatureCard.module.less +0 -51
  155. package/es/antv/Features/Features.module.less +0 -169
  156. package/es/antv/Footer/Footer.module.less +0 -36
  157. package/es/antv/Footer/index.d.ts +0 -12
  158. package/es/antv/Footer/index.js +0 -237
  159. package/es/antv/Header/Logo.d.ts +0 -4
  160. package/es/antv/Products/Product.module.less +0 -146
  161. package/es/antv/Products/getNewProducts.d.ts +0 -24
  162. package/es/antv/Products/getNewProducts.js +0 -35
  163. package/es/antv/Products/getProducts.js +0 -460
  164. package/es/antv/Products/index.d.ts +0 -9
  165. package/es/antv/hooks.d.ts +0 -14
  166. package/es/antv/mixins.less +0 -21
  167. package/es/antv/utils.d.ts +0 -5
  168. package/es/antv/utils.js +0 -49
  169. package/es/builtins/API.d.ts +0 -3
  170. package/es/builtins/API.js +0 -37
  171. package/es/builtins/Alert.d.ts +0 -3
  172. package/es/builtins/Alert.js +0 -7
  173. package/es/builtins/Alert.less +0 -62
  174. package/es/builtins/Badge.d.ts +0 -3
  175. package/es/builtins/Badge.js +0 -7
  176. package/es/builtins/Badge.less +0 -31
  177. package/es/builtins/Example.d.ts +0 -5
  178. package/es/builtins/Example.less +0 -47
  179. package/es/builtins/Previewer.d.ts +0 -39
  180. package/es/builtins/Previewer.js +0 -225
  181. package/es/builtins/Previewer.less +0 -406
  182. package/es/builtins/SourceCode.d.ts +0 -10
  183. package/es/builtins/SourceCode.js +0 -70
  184. package/es/builtins/SourceCode.less +0 -103
  185. package/es/builtins/Table.d.ts +0 -4
  186. package/es/builtins/Table.js +0 -56
  187. package/es/builtins/Table.less +0 -43
  188. package/es/builtins/Tree.d.ts +0 -4
  189. package/es/builtins/Tree.js +0 -213
  190. package/es/builtins/Tree.less +0 -159
  191. package/es/components/Dark.d.ts +0 -9
  192. package/es/components/Dark.js +0 -125
  193. package/es/components/Dark.less +0 -121
  194. package/es/components/LocaleSelect.d.ts +0 -6
  195. package/es/components/LocaleSelect.js +0 -53
  196. package/es/components/LocaleSelect.less +0 -59
  197. package/es/components/Navbar.d.ts +0 -10
  198. package/es/components/Navbar.js +0 -155
  199. package/es/components/Navbar.less +0 -180
  200. package/es/components/SearchBar.d.ts +0 -4
  201. package/es/components/SearchBar.js +0 -81
  202. package/es/components/SearchBar.less +0 -165
  203. package/es/components/SideMenu.d.ts +0 -10
  204. package/es/components/SideMenu.js +0 -99
  205. package/es/components/SideMenu.less +0 -379
  206. package/es/components/SlugList.d.ts +0 -7
  207. package/es/components/SlugList.js +0 -38
  208. package/es/components/SlugList.less +0 -18
  209. package/es/declaration.d.ts +0 -1
  210. package/es/layout.d.ts +0 -5
  211. package/es/layout.js +0 -276
  212. package/es/style/layout.less +0 -402
  213. package/es/style/markdown.less +0 -240
  214. package/es/style/variables.less +0 -37
  215. package/src/antv/404/index.tsx +0 -25
  216. package/src/antv/Banner/Notification.tsx +0 -45
  217. package/src/antv/Banner/index.tsx +0 -139
  218. package/src/antv/Cases/Cases.tsx +0 -116
  219. package/src/antv/Features/FeatureCard.tsx +0 -24
  220. package/src/antv/Features/index.tsx +0 -86
  221. package/src/antv/Footer/Footer.module.less +0 -36
  222. package/src/antv/Footer/index.tsx +0 -272
  223. package/src/antv/Header/Logo.tsx +0 -85
  224. package/src/antv/Products/Product.tsx +0 -80
  225. package/src/antv/Products/getNewProducts.tsx +0 -53
  226. package/src/antv/Products/getProducts.tsx +0 -626
  227. package/src/antv/Products/index.tsx +0 -70
  228. package/src/antv/hooks.ts +0 -87
  229. package/src/antv/mixins.less +0 -21
  230. package/src/antv/utils.ts +0 -44
  231. package/src/builtins/API.tsx +0 -57
  232. package/src/builtins/Alert.less +0 -62
  233. package/src/builtins/Alert.tsx +0 -4
  234. package/src/builtins/Badge.less +0 -31
  235. package/src/builtins/Badge.tsx +0 -4
  236. package/src/builtins/Example.less +0 -47
  237. package/src/builtins/Example.tsx +0 -34
  238. package/src/builtins/Previewer.less +0 -406
  239. package/src/builtins/Previewer.tsx +0 -264
  240. package/src/builtins/SourceCode.less +0 -103
  241. package/src/builtins/SourceCode.tsx +0 -55
  242. package/src/builtins/Table.less +0 -43
  243. package/src/builtins/Table.tsx +0 -42
  244. package/src/builtins/Tree.less +0 -159
  245. package/src/builtins/Tree.tsx +0 -130
  246. package/src/components/Dark.less +0 -121
  247. package/src/components/Dark.tsx +0 -78
  248. package/src/components/LocaleSelect.less +0 -59
  249. package/src/components/LocaleSelect.tsx +0 -53
  250. package/src/components/Navbar.less +0 -180
  251. package/src/components/Navbar.tsx +0 -152
  252. package/src/components/SearchBar.less +0 -165
  253. package/src/components/SearchBar.tsx +0 -68
  254. package/src/components/SideMenu.less +0 -379
  255. package/src/components/SideMenu.tsx +0 -148
  256. package/src/components/SlugList.less +0 -18
  257. package/src/components/SlugList.tsx +0 -20
  258. package/src/declaration.d.ts +0 -1
  259. package/src/layout.tsx +0 -225
  260. package/src/style/layout.less +0 -402
  261. package/src/style/markdown.less +0 -240
  262. package/src/style/variables.less +0 -37
  263. package/src/test/SearchBar.test.ts +0 -32
  264. package/src/test/Table.test.tsx +0 -41
  265. package/src/test/index.test.tsx +0 -377
@@ -1,237 +0,0 @@
1
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
2
-
3
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
4
-
5
- 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."); }
6
-
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
-
9
- 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; }
10
-
11
- function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
12
-
13
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
14
-
15
- var __rest = this && this.__rest || function (s, e) {
16
- var t = {};
17
-
18
- for (var p in s) {
19
- if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
20
- }
21
-
22
- if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
23
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
24
- }
25
- return t;
26
- };
27
-
28
- import { GithubOutlined, QuestionCircleOutlined, WeiboOutlined, ZhihuOutlined } from "@ant-design/icons";
29
- import classnames from "classnames"; // import { withPrefix } from "gatsby";
30
-
31
- import omit from "omit.js";
32
- import { default as RCFooter } from "rc-footer";
33
- import "rc-footer/assets/index.less";
34
- import React, { useEffect, useState } from "react";
35
- import { useTranslation } from "react-i18next"; //@ts-ignore
36
-
37
- import styles from "./Footer.module.less";
38
- export var OLD_SITE_DOMAIN = "https://antv-2018.alipay.com";
39
-
40
- var withPrefix = function withPrefix(str) {
41
- return str;
42
- };
43
-
44
- var Footer = function Footer(_a) {
45
- var columns = _a.columns,
46
- bottom = _a.bottom,
47
- _a$theme = _a.theme,
48
- theme = _a$theme === void 0 ? "dark" : _a$theme,
49
- language = _a.language,
50
- _a$rootDomain = _a.rootDomain,
51
- rootDomain = _a$rootDomain === void 0 ? "" : _a$rootDomain,
52
- location = _a.location,
53
- restProps = __rest(_a, ["columns", "bottom", "theme", "language", "rootDomain", "location"]);
54
-
55
- var _useState = useState(false),
56
- _useState2 = _slicedToArray(_useState, 2),
57
- withMenu = _useState2[0],
58
- setWithMenu = _useState2[1];
59
-
60
- var _useTranslation = useTranslation(),
61
- t = _useTranslation.t,
62
- i18n = _useTranslation.i18n;
63
-
64
- var lang = language || i18n.language;
65
- useEffect(function () {
66
- // 有 menu 的模版 footer 表现不同,通过 location 判断加载的模版
67
- var pathPrefix = withPrefix("/").replace(/\/$/, "");
68
- var path = window.location.pathname.replace(pathPrefix, "");
69
- var isExamplePage = path.startsWith("/zh/examples") || path.startsWith("/en/examples");
70
- var isDocsPage = path.startsWith("/zh/docs") || path.startsWith("/en/docs"); // examples 页面里目前只有 gallery 是有 footer 的,
71
- // 且 gallery 会出现 `location.key = 'initial'` 逻辑,所以先统一处理为需要 menu
72
-
73
- if (isExamplePage) {
74
- setWithMenu(true);
75
- } else if (isDocsPage) {
76
- // 文档页为 404 时 footer 没有 menu
77
- setWithMenu(!(location.key === "initial"));
78
- } else {
79
- setWithMenu(false);
80
- }
81
- }, [location]);
82
-
83
- var getColums = function getColums() {
84
- // 如果外部没有传入 columns,则默认展示 antv footer
85
- var col1 = {
86
- title: t("Resources"),
87
- items: [{
88
- title: "Ant Design",
89
- url: "https://ant.design",
90
- openExternal: true
91
- }, {
92
- title: "Ant Design Mobile",
93
- url: "https://mobile.ant.design",
94
- openExternal: true
95
- }, {
96
- title: "Umi",
97
- description: t("React 应用开发框架"),
98
- url: "https://umijs.org",
99
- openExternal: true
100
- }, {
101
- title: "Dumi",
102
- description: t("组件/文档研发工具"),
103
- url: "https://d.umijs.org",
104
- openExternal: true
105
- }, {
106
- title: "ahooks",
107
- description: t("React Hooks 库"),
108
- url: "https://github.com/alibaba/hooks",
109
- openExternal: true
110
- }, {
111
- title: t("国内镜像"),
112
- url: "https://antv.gitee.io/"
113
- }]
114
- };
115
- var col2 = {
116
- title: t("社区"),
117
- items: [{
118
- icon: /*#__PURE__*/React.createElement(ZhihuOutlined, {
119
- style: {
120
- color: "#0084ff"
121
- }
122
- }),
123
- title: t("体验科技专栏"),
124
- url: "http://zhuanlan.zhihu.com/xtech",
125
- openExternal: true
126
- }, {
127
- icon: /*#__PURE__*/React.createElement("img", {
128
- src: "https://gw.alipayobjects.com/zos/rmsportal/mZBWtboYbnMkTBaRIuWQ.png",
129
- alt: "seeconf"
130
- }),
131
- title: "SEE Conf",
132
- description: t("蚂蚁体验科技大会"),
133
- url: "https://seeconf.antfin.com/",
134
- openExternal: true
135
- }]
136
- };
137
- var col3 = {
138
- title: t("帮助"),
139
- items: [{
140
- icon: /*#__PURE__*/React.createElement(GithubOutlined, null),
141
- title: "GitHub",
142
- url: "https://github.com/antvis",
143
- openExternal: true
144
- }, {
145
- icon: /*#__PURE__*/React.createElement(QuestionCircleOutlined, null),
146
- title: t("StackOverflow"),
147
- url: "http://stackoverflow.com/questions/tagged/antv",
148
- openExternal: true
149
- }]
150
- };
151
- var more = {
152
- icon: /*#__PURE__*/React.createElement("img", {
153
- src: "https://gw.alipayobjects.com/zos/rmsportal/nBVXkrFdWHxbZlmMbsaH.svg",
154
- alt: "more products"
155
- }),
156
- title: t("更多产品"),
157
- items: [{
158
- icon: /*#__PURE__*/React.createElement("img", {
159
- src: "https://gw.alipayobjects.com/zos/rmsportal/KDpgvguMpGfqaHPjicRK.svg",
160
- alt: "Ant Design"
161
- }),
162
- title: "Ant Design",
163
- url: "https://ant.design",
164
- description: t("企业级 UI 设计语言"),
165
- openExternal: true
166
- }, {
167
- icon: /*#__PURE__*/React.createElement("img", {
168
- src: "https://gw.alipayobjects.com/zos/rmsportal/XuVpGqBFxXplzvLjJBZB.svg",
169
- alt: "yuque"
170
- }),
171
- title: t("语雀"),
172
- url: "https://yuque.com",
173
- description: t("知识创作与分享工具"),
174
- openExternal: true
175
- }, {
176
- icon: /*#__PURE__*/React.createElement("img", {
177
- src: "https://gw.alipayobjects.com/zos/antfincdn/v2%24rh7lqpu/82f338dd-b0a6-41bc-9a86-58aaa9df217b.png",
178
- alt: "Egg"
179
- }),
180
- title: "Egg",
181
- url: "https://eggjs.org",
182
- description: t("企业级 Node 开发框架"),
183
- openExternal: true
184
- }, {
185
- icon: /*#__PURE__*/React.createElement("img", {
186
- src: "https://gw.alipayobjects.com/zos/rmsportal/DMDOlAUhmktLyEODCMBR.ico",
187
- alt: "kitchen"
188
- }),
189
- title: "Kitchen",
190
- description: t("Sketch 工具集"),
191
- url: "https://kitchen.alipay.com",
192
- openExternal: true
193
- }, {
194
- icon: /*#__PURE__*/React.createElement("img", {
195
- src: "https://gw.alipayobjects.com/zos/rmsportal/nBVXkrFdWHxbZlmMbsaH.svg",
196
- alt: "xtech"
197
- }),
198
- title: t("蚂蚁体验科技"),
199
- url: "https://xtech.antfin.com/",
200
- openExternal: true
201
- }]
202
- };
203
- return [col1, col2, col3, more];
204
- };
205
-
206
- return /*#__PURE__*/React.createElement(RCFooter, Object.assign({
207
- maxColumnsPerRow: 5,
208
- theme: theme,
209
- columns: columns || getColums(),
210
- className: classnames(styles.footer, _defineProperty({}, styles.withMenu, withMenu)),
211
- bottom: bottom || /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
212
- className: styles.bottom
213
- }, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("a", {
214
- href: "https://weibo.com/antv2017",
215
- target: "_blank",
216
- rel: "noopener noreferrer"
217
- }, /*#__PURE__*/React.createElement(WeiboOutlined, null)), /*#__PURE__*/React.createElement("a", {
218
- href: "https://zhuanlan.zhihu.com/aiux-antv",
219
- target: "_blank",
220
- rel: "noopener noreferrer"
221
- }, /*#__PURE__*/React.createElement(ZhihuOutlined, null)), /*#__PURE__*/React.createElement("a", {
222
- href: "https://github.com/antvis",
223
- target: "_blank",
224
- rel: "noopener noreferrer"
225
- }, /*#__PURE__*/React.createElement(GithubOutlined, null)), /*#__PURE__*/React.createElement("a", {
226
- href: "".concat(rootDomain, "/").concat(lang, "/about")
227
- }, t("关于我们")), /*#__PURE__*/React.createElement("a", {
228
- href: OLD_SITE_DOMAIN,
229
- target: "_blank",
230
- rel: "noopener noreferrer"
231
- }, t("返回旧版"))), /*#__PURE__*/React.createElement("div", null, "\xA9 ", new Date().getFullYear(), " Made with \u2764 by", " ", /*#__PURE__*/React.createElement("a", {
232
- href: "https://xtech.antfin.com/"
233
- }, "XTech"))))
234
- }, omit(restProps, ["githubUrl"])));
235
- };
236
-
237
- export default Footer;
@@ -1,4 +0,0 @@
1
- declare const _default: ({ style }: {
2
- style: any;
3
- }) => JSX.Element;
4
- export default _default;
@@ -1,146 +0,0 @@
1
- @import '../mixins';
2
-
3
- .products {
4
- width: 100%;
5
- position: absolute;
6
- z-index: 100;
7
- left: 0;
8
- top: 64px;
9
- opacity: 0;
10
- transform: translateY(-12px);
11
- transition: all 0.3s ease-in;
12
- background: #fff;
13
- padding: 0;
14
- overflow: hidden;
15
- box-shadow: none;
16
- line-height: 1.5;
17
- font-weight: normal;
18
- white-space: normal;
19
- pointer-events: none;
20
-
21
- .container {
22
- .container1440;
23
- }
24
-
25
- &.show {
26
- opacity: 1;
27
- box-shadow: 0 2px 8px #f0f1f2 inset;
28
- pointer-events: auto;
29
- max-height: unset !important;
30
- transform: translateY(0);
31
- }
32
-
33
- &.show + .mask {
34
- opacity: 1;
35
- }
36
-
37
- h3 {
38
- font-size: 14px;
39
- line-height: 22px;
40
- margin: 32px 0 24px 0;
41
- color: #a3b1bf;
42
- font-weight: normal;
43
- padding-bottom: 8px;
44
- border-bottom: 1px solid #f2f4f5;
45
- }
46
-
47
- ul {
48
- list-style: none;
49
- padding: 0;
50
- margin: 0 0 20px 0;
51
-
52
- &:last-child {
53
- margin-bottom: 32px;
54
- }
55
- }
56
-
57
- .product {
58
- overflow: hidden;
59
- width: 25%;
60
- display: inline-block;
61
- vertical-align: top;
62
- margin-bottom: 32px;
63
- margin-right: 0 !important;
64
- padding-right: 32px;
65
-
66
- img {
67
- width: 32px;
68
- height: 32px;
69
- margin-right: 12px;
70
- float: left;
71
- }
72
-
73
- .productContent {
74
- overflow: hidden;
75
-
76
- h4 {
77
- margin-bottom: 4px;
78
- font-size: 14px;
79
- line-height: 22px;
80
- color: rgba(0, 0, 0, 0.85);
81
- transition: all 0.3s;
82
-
83
- &:hover {
84
- color: #597ef7;
85
- }
86
-
87
- .productSlogan {
88
- margin-left: 8px;
89
- }
90
- }
91
-
92
- .productDescription {
93
- font-size: 12px;
94
- line-height: 20px;
95
- margin-bottom: 8px;
96
- color: #a3b1bf;
97
- }
98
-
99
- .productLinks {
100
- > a {
101
- margin-right: 12px;
102
- font-size: 12px;
103
- line-height: 20px;
104
- transition: all 0.3s;
105
- display: inline-block;
106
- color: tint(#597ef7, 30%);
107
-
108
- &:hover {
109
- color: #597ef7;
110
- }
111
- }
112
- }
113
- }
114
- }
115
- }
116
-
117
- .mask {
118
- background: fade(#0d1a26, 50%);
119
- position: fixed;
120
- top: 64px;
121
- left: 0;
122
- bottom: 0;
123
- right: 0;
124
- z-index: 1;
125
- pointer-events: none;
126
- opacity: 0;
127
- transition: all 0.3s;
128
- }
129
-
130
- @media only screen and (max-width: 931.99px) {
131
- .products {
132
- .product {
133
- width: 50%;
134
- padding-right: 24px;
135
- }
136
- }
137
- }
138
-
139
- @media only screen and (max-width: 767.99px) {
140
- .products {
141
- .product {
142
- width: 100%;
143
- padding-right: 0;
144
- }
145
- }
146
- }
@@ -1,24 +0,0 @@
1
- export declare type ProductType = {
2
- links: {
3
- /** 产品首页 */
4
- readonly home?: {
5
- url: string;
6
- title?: string;
7
- };
8
- /** 图表示例 */
9
- readonly example?: {
10
- url: string;
11
- title?: string;
12
- };
13
- /** 使用文档 */
14
- readonly api?: {
15
- url: string;
16
- title?: string;
17
- };
18
- };
19
- [k: string]: any;
20
- };
21
- export declare function getNewProducts({ language, isChinaMirrorHost, }: {
22
- language: "zh" | "en";
23
- isChinaMirrorHost: boolean;
24
- }): Promise<ProductType[]>;
@@ -1,35 +0,0 @@
1
- import { each } from "lodash";
2
- export function getNewProducts(_ref) {
3
- var language = _ref.language,
4
- isChinaMirrorHost = _ref.isChinaMirrorHost;
5
- // 如需要修改产品信息,请到 https://yuyan.antfin-inc.com/datavprod/antv-site-datas/schemas/site-products-h5data/console 修改区块内容
6
- return fetch("https://render.alipay.com/p/h5data/antv-site-datas_site-products-h5data.json").then(function (res) {
7
- return res.json();
8
- }).then(function (products) {
9
- return products.filter(function (d) {
10
- return d.lang === language;
11
- }).map(function (d) {
12
- var links = typeof d.links === "string" ? JSON.parse(d.links) : Object.assign({}, d.links);
13
- var newLinks = {};
14
- each(links, function (value, k) {
15
- var actualUrl = (value === null || value === void 0 ? void 0 : value.url) || "";
16
-
17
- if (isChinaMirrorHost) {
18
- // g2plot.antv.vision => antv-g2plot.gitee.io
19
- var match = actualUrl.match(/([http|https]):\/\/(.*)\.antv\.vision/);
20
-
21
- if (match && match[2]) {
22
- actualUrl = actualUrl.replace("".concat(match[2], ".antv.vision"), "antv-".concat(match[2], ".gitee.io"));
23
- }
24
- }
25
-
26
- newLinks[k] = Object.assign(Object.assign({}, value), {
27
- url: actualUrl
28
- });
29
- });
30
- return Object.assign(Object.assign({}, d), {
31
- links: newLinks
32
- });
33
- });
34
- });
35
- }