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

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 (260) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +32 -33
  3. package/dist/builtins/Playground/index.d.ts +24 -0
  4. package/{es/builtins/Example.js → dist/builtins/Playground/index.js} +40 -33
  5. package/dist/builtins/Playground/index.module.less +15 -0
  6. package/dist/context.d.ts +5 -0
  7. package/dist/context.js +2 -0
  8. package/dist/layouts/DocLayout.d.ts +7 -0
  9. package/dist/layouts/DocLayout.js +38 -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 +71 -0
  14. package/dist/layouts/entry/Manual.d.ts +8 -0
  15. package/dist/layouts/entry/Manual.js +14 -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 +15 -0
  20. package/dist/pages/Example/index.d.ts +6 -0
  21. package/dist/pages/Example/index.js +139 -0
  22. package/dist/pages/Example/index.module.less +40 -0
  23. package/dist/pages/Examples/components/Accouncement/index.d.ts +6 -0
  24. package/dist/pages/Examples/components/Accouncement/index.js +60 -0
  25. package/dist/pages/Examples/components/Accouncement/index.module.less +9 -0
  26. package/dist/pages/Examples/components/Article/index.d.ts +2 -0
  27. package/dist/pages/Examples/components/Article/index.js +8 -0
  28. package/dist/pages/Examples/components/Article/index.module.less +2 -0
  29. package/dist/pages/Examples/components/ExampleTopicMenu/components/LeftMenu/index.d.ts +10 -0
  30. package/dist/pages/Examples/components/ExampleTopicMenu/components/LeftMenu/index.js +74 -0
  31. package/dist/pages/Examples/components/ExampleTopicMenu/index.d.ts +9 -0
  32. package/{es/builtins/Table.js → dist/pages/Examples/components/ExampleTopicMenu/index.js} +47 -41
  33. package/dist/pages/Examples/components/GalleryPageContent/DemoCard/index.d.ts +10 -0
  34. package/dist/pages/Examples/components/GalleryPageContent/DemoCard/index.js +33 -0
  35. package/dist/pages/Examples/components/GalleryPageContent/index.d.ts +10 -0
  36. package/dist/pages/Examples/components/GalleryPageContent/index.js +81 -0
  37. package/dist/pages/Examples/index.d.ts +8 -0
  38. package/dist/pages/Examples/index.js +75 -0
  39. package/dist/pages/Examples/index.module.less +605 -0
  40. package/dist/pages/Examples/types.d.ts +33 -0
  41. package/dist/pages/Examples/types.js +1 -0
  42. package/dist/plugin/examples.d.ts +12 -0
  43. package/dist/plugin/examples.js +91 -0
  44. package/dist/plugin/index.d.ts +3 -0
  45. package/dist/plugin/index.js +100 -0
  46. package/dist/plugin/utils.d.ts +5 -0
  47. package/dist/plugin/utils.js +45 -0
  48. package/dist/slots/404.d.ts +2 -0
  49. package/{es/antv/404/index.js → dist/slots/404.js} +4 -9
  50. package/{es/antv/Cases/Cases.d.ts → dist/slots/Cases/index.d.ts} +4 -4
  51. package/{es/antv/Cases/Cases.js → dist/slots/Cases/index.js} +25 -25
  52. package/{src/antv/Cases/Cases.module.less → dist/slots/Cases/index.module.less} +36 -5
  53. package/dist/slots/CodeEditor/Toolbar.d.ts +67 -0
  54. package/dist/slots/CodeEditor/Toolbar.js +152 -0
  55. package/dist/slots/CodeEditor/Toolbar.module.less +81 -0
  56. package/dist/slots/CodeEditor/index.d.ts +58 -0
  57. package/dist/slots/CodeEditor/index.js +200 -0
  58. package/dist/slots/CodeEditor/index.module.less +11 -0
  59. package/dist/slots/CodeEditor/utils.d.ts +42 -0
  60. package/dist/slots/CodeEditor/utils.js +157 -0
  61. package/dist/slots/CodePreview/CodeHeader.d.ts +19 -0
  62. package/dist/slots/CodePreview/CodeHeader.js +32 -0
  63. package/dist/slots/CodePreview/CodeHeader.module.less +0 -0
  64. package/dist/slots/CodePreview/index.d.ts +17 -0
  65. package/dist/slots/CodePreview/index.js +29 -0
  66. package/dist/slots/CodePreview/index.module.less +42 -0
  67. package/dist/slots/CodeRunner/index.d.ts +14 -0
  68. package/dist/slots/CodeRunner/index.js +76 -0
  69. package/dist/slots/CodeRunner/index.module.less +0 -0
  70. package/dist/slots/CodeRunner/utils.d.ts +10 -0
  71. package/dist/slots/CodeRunner/utils.js +36 -0
  72. package/dist/slots/Companies/index.d.ts +13 -0
  73. package/dist/slots/Companies/index.js +49 -0
  74. package/dist/slots/Companies/index.module.less +82 -0
  75. package/dist/slots/Detail/News.d.ts +9 -0
  76. package/{es/antv/Banner/Notification.js → dist/slots/Detail/News.js} +8 -11
  77. package/{src/antv/Banner/Notification.module.less → dist/slots/Detail/News.module.less} +15 -3
  78. package/dist/slots/Detail/index.d.ts +26 -0
  79. package/dist/slots/Detail/index.js +124 -0
  80. package/{src/antv/Banner/Banner.module.less → dist/slots/Detail/index.module.less} +42 -74
  81. package/dist/slots/ExampleSider/index.d.ts +55 -0
  82. package/dist/slots/ExampleSider/index.js +218 -0
  83. package/dist/slots/ExampleSider/index.module.less +141 -0
  84. package/{es/antv → dist/slots}/Features/FeatureCard.d.ts +1 -1
  85. package/{es/antv → dist/slots}/Features/FeatureCard.js +6 -6
  86. package/{src/antv → dist/slots}/Features/FeatureCard.module.less +8 -1
  87. package/{es/antv → dist/slots}/Features/index.d.ts +2 -2
  88. package/{es/antv → dist/slots}/Features/index.js +17 -25
  89. package/{src/antv/Features/Features.module.less → dist/slots/Features/index.module.less} +34 -3
  90. package/dist/slots/Footer/index.d.ts +18 -0
  91. package/dist/slots/Footer/index.js +187 -0
  92. package/dist/slots/Footer/index.module.less +85 -0
  93. package/dist/slots/Header/Logo.d.ts +7 -0
  94. package/{es/antv → dist/slots}/Header/Logo.js +6 -2
  95. package/dist/slots/Header/LogoWhite.d.ts +7 -0
  96. package/dist/slots/Header/LogoWhite.js +19 -0
  97. package/dist/slots/Header/Navs.d.ts +17 -0
  98. package/dist/slots/Header/Navs.js +46 -0
  99. package/dist/slots/Header/Products/NavigatorBanner.d.ts +10 -0
  100. package/dist/slots/Header/Products/NavigatorBanner.js +34 -0
  101. package/dist/slots/Header/Products/NavigatorBanner.module.less +39 -0
  102. package/{es/antv → dist/slots/Header}/Products/Product.d.ts +3 -3
  103. package/{es/antv → dist/slots/Header}/Products/Product.js +11 -16
  104. package/{src/antv → dist/slots/Header}/Products/Product.module.less +10 -8
  105. package/{es/antv → dist/slots/Header}/Products/getProducts.d.ts +2 -7
  106. package/dist/slots/Header/Products/getProducts.js +67 -0
  107. package/dist/slots/Header/Products/index.d.ts +9 -0
  108. package/{es/antv → dist/slots/Header}/Products/index.js +15 -22
  109. package/dist/slots/Header/Search.d.ts +12 -0
  110. package/dist/slots/Header/Search.js +90 -0
  111. package/dist/slots/Header/Search.module.less +39 -0
  112. package/dist/slots/Header/index.d.ts +66 -0
  113. package/dist/slots/Header/index.js +379 -0
  114. package/dist/slots/Header/index.module.less +382 -0
  115. package/dist/slots/Header/utils.d.ts +1 -0
  116. package/dist/slots/Header/utils.js +26 -0
  117. package/dist/slots/Loading/index.d.ts +2 -0
  118. package/dist/slots/Loading/index.js +65 -0
  119. package/dist/slots/Loading/index.module.less +12 -0
  120. package/dist/slots/Loading.d.ts +5 -0
  121. package/dist/slots/Loading.js +8 -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 +321 -0
  129. package/dist/slots/ManualContent/index.module.less +656 -0
  130. package/dist/slots/TOC.d.ts +5 -0
  131. package/dist/slots/TOC.js +6 -0
  132. package/dist/slots/_.less +83 -0
  133. package/dist/slots/global.d.ts +1 -0
  134. package/dist/slots/global.js +7 -0
  135. package/dist/slots/hooks.d.ts +16 -0
  136. package/{es/antv → dist/slots}/hooks.js +60 -37
  137. package/dist/slots/utils.d.ts +20 -0
  138. package/dist/slots/utils.js +154 -0
  139. package/dist/types.d.ts +3 -0
  140. package/dist/types.js +1 -0
  141. package/dist/typings.d.ts +140 -0
  142. package/package.json +108 -47
  143. package/es/antv/404/index.d.ts +0 -2
  144. package/es/antv/Banner/Banner.module.less +0 -412
  145. package/es/antv/Banner/Notification.d.ts +0 -10
  146. package/es/antv/Banner/Notification.module.less +0 -108
  147. package/es/antv/Banner/index.d.ts +0 -25
  148. package/es/antv/Banner/index.js +0 -104
  149. package/es/antv/Cases/Cases.module.less +0 -203
  150. package/es/antv/Features/FeatureCard.module.less +0 -51
  151. package/es/antv/Features/Features.module.less +0 -169
  152. package/es/antv/Footer/Footer.module.less +0 -36
  153. package/es/antv/Footer/index.d.ts +0 -12
  154. package/es/antv/Footer/index.js +0 -237
  155. package/es/antv/Header/Logo.d.ts +0 -4
  156. package/es/antv/Products/Product.module.less +0 -146
  157. package/es/antv/Products/getNewProducts.d.ts +0 -24
  158. package/es/antv/Products/getNewProducts.js +0 -35
  159. package/es/antv/Products/getProducts.js +0 -460
  160. package/es/antv/Products/index.d.ts +0 -9
  161. package/es/antv/hooks.d.ts +0 -14
  162. package/es/antv/mixins.less +0 -21
  163. package/es/antv/utils.d.ts +0 -5
  164. package/es/antv/utils.js +0 -49
  165. package/es/builtins/API.d.ts +0 -3
  166. package/es/builtins/API.js +0 -37
  167. package/es/builtins/Alert.d.ts +0 -3
  168. package/es/builtins/Alert.js +0 -7
  169. package/es/builtins/Alert.less +0 -62
  170. package/es/builtins/Badge.d.ts +0 -3
  171. package/es/builtins/Badge.js +0 -7
  172. package/es/builtins/Badge.less +0 -31
  173. package/es/builtins/Example.d.ts +0 -5
  174. package/es/builtins/Example.less +0 -47
  175. package/es/builtins/Previewer.d.ts +0 -39
  176. package/es/builtins/Previewer.js +0 -225
  177. package/es/builtins/Previewer.less +0 -406
  178. package/es/builtins/SourceCode.d.ts +0 -10
  179. package/es/builtins/SourceCode.js +0 -70
  180. package/es/builtins/SourceCode.less +0 -103
  181. package/es/builtins/Table.d.ts +0 -4
  182. package/es/builtins/Table.less +0 -43
  183. package/es/builtins/Tree.d.ts +0 -4
  184. package/es/builtins/Tree.js +0 -213
  185. package/es/builtins/Tree.less +0 -159
  186. package/es/components/Dark.d.ts +0 -9
  187. package/es/components/Dark.js +0 -125
  188. package/es/components/Dark.less +0 -121
  189. package/es/components/LocaleSelect.d.ts +0 -6
  190. package/es/components/LocaleSelect.js +0 -53
  191. package/es/components/LocaleSelect.less +0 -59
  192. package/es/components/Navbar.d.ts +0 -10
  193. package/es/components/Navbar.js +0 -155
  194. package/es/components/Navbar.less +0 -180
  195. package/es/components/SearchBar.d.ts +0 -4
  196. package/es/components/SearchBar.js +0 -81
  197. package/es/components/SearchBar.less +0 -165
  198. package/es/components/SideMenu.d.ts +0 -10
  199. package/es/components/SideMenu.js +0 -99
  200. package/es/components/SideMenu.less +0 -379
  201. package/es/components/SlugList.d.ts +0 -7
  202. package/es/components/SlugList.js +0 -38
  203. package/es/components/SlugList.less +0 -18
  204. package/es/declaration.d.ts +0 -1
  205. package/es/layout.d.ts +0 -5
  206. package/es/layout.js +0 -276
  207. package/es/style/layout.less +0 -402
  208. package/es/style/markdown.less +0 -240
  209. package/es/style/variables.less +0 -37
  210. package/src/antv/404/index.tsx +0 -25
  211. package/src/antv/Banner/Notification.tsx +0 -45
  212. package/src/antv/Banner/index.tsx +0 -139
  213. package/src/antv/Cases/Cases.tsx +0 -116
  214. package/src/antv/Features/FeatureCard.tsx +0 -24
  215. package/src/antv/Features/index.tsx +0 -86
  216. package/src/antv/Footer/Footer.module.less +0 -36
  217. package/src/antv/Footer/index.tsx +0 -272
  218. package/src/antv/Header/Logo.tsx +0 -85
  219. package/src/antv/Products/Product.tsx +0 -80
  220. package/src/antv/Products/getNewProducts.tsx +0 -53
  221. package/src/antv/Products/getProducts.tsx +0 -626
  222. package/src/antv/Products/index.tsx +0 -70
  223. package/src/antv/hooks.ts +0 -87
  224. package/src/antv/mixins.less +0 -21
  225. package/src/antv/utils.ts +0 -44
  226. package/src/builtins/API.tsx +0 -57
  227. package/src/builtins/Alert.less +0 -62
  228. package/src/builtins/Alert.tsx +0 -4
  229. package/src/builtins/Badge.less +0 -31
  230. package/src/builtins/Badge.tsx +0 -4
  231. package/src/builtins/Example.less +0 -47
  232. package/src/builtins/Example.tsx +0 -34
  233. package/src/builtins/Previewer.less +0 -406
  234. package/src/builtins/Previewer.tsx +0 -264
  235. package/src/builtins/SourceCode.less +0 -103
  236. package/src/builtins/SourceCode.tsx +0 -55
  237. package/src/builtins/Table.less +0 -43
  238. package/src/builtins/Table.tsx +0 -42
  239. package/src/builtins/Tree.less +0 -159
  240. package/src/builtins/Tree.tsx +0 -130
  241. package/src/components/Dark.less +0 -121
  242. package/src/components/Dark.tsx +0 -78
  243. package/src/components/LocaleSelect.less +0 -59
  244. package/src/components/LocaleSelect.tsx +0 -53
  245. package/src/components/Navbar.less +0 -180
  246. package/src/components/Navbar.tsx +0 -152
  247. package/src/components/SearchBar.less +0 -165
  248. package/src/components/SearchBar.tsx +0 -68
  249. package/src/components/SideMenu.less +0 -379
  250. package/src/components/SideMenu.tsx +0 -148
  251. package/src/components/SlugList.less +0 -18
  252. package/src/components/SlugList.tsx +0 -20
  253. package/src/declaration.d.ts +0 -1
  254. package/src/layout.tsx +0 -225
  255. package/src/style/layout.less +0 -402
  256. package/src/style/markdown.less +0 -240
  257. package/src/style/variables.less +0 -37
  258. package/src/test/SearchBar.test.ts +0 -32
  259. package/src/test/Table.test.tsx +0 -41
  260. package/src/test/index.test.tsx +0 -377
@@ -1,4 +1,4 @@
1
- .notification {
1
+ .news {
2
2
  width: 50%;
3
3
  margin-right: 2%;
4
4
 
@@ -9,20 +9,24 @@
9
9
  .container {
10
10
  height: 44px;
11
11
  display: flex;
12
+
12
13
  .number {
13
14
  height: 100%;
14
15
  width: 44px;
15
16
  }
17
+
16
18
  .content {
17
19
  padding-left: 20px;
18
20
  color: rgba(49, 70, 89, 1);
19
21
  text-align: left;
22
+
20
23
  .description {
21
24
  top: 0;
22
25
  font-size: 1.14em;
23
26
  margin-bottom: 0;
24
27
  transition: all 0.3s;
25
28
  }
29
+
26
30
  .date {
27
31
  color: rgba(216, 203, 249, 1);
28
32
  bottom: 0;
@@ -39,7 +43,7 @@
39
43
  }
40
44
 
41
45
  @media (max-width: 900px) {
42
- .notification {
46
+ .news {
43
47
  position: absolute;
44
48
  width: 100%;
45
49
 
@@ -55,7 +59,7 @@
55
59
  }
56
60
 
57
61
  @media (max-width: 768px) {
58
- .notification {
62
+ .news {
59
63
  width: 100%;
60
64
  }
61
65
  }
@@ -65,18 +69,22 @@
65
69
  opacity: 1;
66
70
  top: 0px;
67
71
  }
72
+
68
73
  33.3% {
69
74
  opacity: 1;
70
75
  top: 0px;
71
76
  }
77
+
72
78
  50% {
73
79
  opacity: 0;
74
80
  top: -30px;
75
81
  }
82
+
76
83
  83.3% {
77
84
  opacity: 0;
78
85
  top: 30px;
79
86
  }
87
+
80
88
  100% {
81
89
  opacity: 1;
82
90
  top: 0px;
@@ -89,18 +97,22 @@
89
97
  opacity: 0;
90
98
  top: 30px;
91
99
  }
100
+
92
101
  33.3% {
93
102
  opacity: 0;
94
103
  top: 30px;
95
104
  }
105
+
96
106
  50% {
97
107
  opacity: 1;
98
108
  top: 0px;
99
109
  }
110
+
100
111
  83.3% {
101
112
  opacity: 1;
102
113
  top: 0px;
103
114
  }
115
+
104
116
  100% {
105
117
  opacity: 0;
106
118
  top: -30px;
@@ -0,0 +1,26 @@
1
+ import React from 'react';
2
+ import { NewsProps } from './News';
3
+ declare type DetailButtonProps = {
4
+ text: IC;
5
+ link: string;
6
+ style?: React.CSSProperties;
7
+ type?: string;
8
+ shape?: 'round' | 'square';
9
+ };
10
+ declare type DetailProps = {
11
+ className?: string;
12
+ style?: React.CSSProperties;
13
+ title: IC;
14
+ description: IC;
15
+ image?: string;
16
+ buttons?: DetailButtonProps[];
17
+ githubUrl: string;
18
+ showGithubStars?: boolean;
19
+ news: NewsProps[];
20
+ };
21
+ /**
22
+ * Index.技术栈的描述区域!
23
+ * 各自配置
24
+ */
25
+ export declare const Detail: React.FC<DetailProps>;
26
+ export {};
@@ -0,0 +1,124 @@
1
+ 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); }
2
+
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
+
5
+ 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; }
6
+
7
+ 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; }
8
+
9
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
10
+
11
+ 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."); }
12
+
13
+ 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); }
14
+
15
+ 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; }
16
+
17
+ 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; }
18
+
19
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
20
+
21
+ import React, { useState, useEffect } from 'react';
22
+ import cx from 'classnames';
23
+ import gh from 'parse-github-url';
24
+ import GitHubButton from 'react-github-button';
25
+ import { ic } from "../hooks";
26
+ import { News } from "./News";
27
+ import styles from "./index.module.less";
28
+ var AssetsNewsURL = 'https://assets.antv.antgroup.com/antv/news.json';
29
+ /**
30
+ * Index.技术栈的描述区域!
31
+ * 各自配置
32
+ */
33
+
34
+ export var Detail = function Detail(_ref) {
35
+ var className = _ref.className,
36
+ style = _ref.style,
37
+ title = _ref.title,
38
+ description = _ref.description,
39
+ image = _ref.image,
40
+ githubUrl = _ref.githubUrl,
41
+ _ref$showGithubStars = _ref.showGithubStars,
42
+ showGithubStars = _ref$showGithubStars === void 0 ? true : _ref$showGithubStars,
43
+ _ref$buttons = _ref.buttons,
44
+ buttons = _ref$buttons === void 0 ? [] : _ref$buttons,
45
+ _ref$news = _ref.news,
46
+ news = _ref$news === void 0 ? [] : _ref$news;
47
+
48
+ var _useState = useState([]),
49
+ _useState2 = _slicedToArray(_useState, 2),
50
+ removeNews = _useState2[0],
51
+ setRemoteNews = _useState2[1];
52
+
53
+ useEffect(function () {
54
+ fetch(AssetsNewsURL).then(function (res) {
55
+ return res.json();
56
+ }).then(function (data) {
57
+ setRemoteNews(data);
58
+ }).catch(function (e) {
59
+ setRemoteNews([]);
60
+ });
61
+ }, []);
62
+ var githubObj = gh(githubUrl);
63
+ var showGitHubStarsButton = showGithubStars && githubObj && githubObj.owner && githubObj.name;
64
+ return /*#__PURE__*/React.createElement("section", {
65
+ className: cx(styles.wrapper, className),
66
+ style: style
67
+ }, /*#__PURE__*/React.createElement("div", {
68
+ className: styles.content
69
+ }, /*#__PURE__*/React.createElement("div", {
70
+ className: styles.text
71
+ }, /*#__PURE__*/React.createElement("div", {
72
+ className: cx(styles.title, 'detail-title')
73
+ }, ic(title)), /*#__PURE__*/React.createElement("div", {
74
+ className: cx(styles.description, 'detail-description')
75
+ }, ic(description)), /*#__PURE__*/React.createElement("div", {
76
+ className: cx(styles.buttons, 'detail-buttons')
77
+ }, buttons.map(function (_ref2) {
78
+ var type = _ref2.type,
79
+ style = _ref2.style,
80
+ text = _ref2.text,
81
+ link = _ref2.link,
82
+ shape = _ref2.shape;
83
+ return /*#__PURE__*/React.createElement("a", {
84
+ key: text,
85
+ className: cx(styles.buttonLink, styles[type || ''], type === 'primary' ? 'primary-button' : 'common-button'),
86
+ style: _objectSpread({
87
+ borderRadius: shape === 'square' ? '4px' : '1000px'
88
+ }, style),
89
+ href: link
90
+ }, /*#__PURE__*/React.createElement("span", {
91
+ className: styles.button
92
+ }, ic(text)));
93
+ }), showGitHubStarsButton && /*#__PURE__*/React.createElement("div", {
94
+ key: "github",
95
+ className: styles.githubWrapper
96
+ }, /*#__PURE__*/React.createElement(GitHubButton, {
97
+ type: "stargazers",
98
+ size: "large",
99
+ namespace: githubObj.owner,
100
+ repo: githubObj.name
101
+ })))), /*#__PURE__*/React.createElement("div", {
102
+ className: cx(styles.news, 'news')
103
+ }, (news || removeNews).slice(0, 2).map(function (n, i) {
104
+ return /*#__PURE__*/React.createElement(News, _extends({
105
+ key: i,
106
+ index: i
107
+ }, n));
108
+ })), /*#__PURE__*/React.createElement("div", {
109
+ className: cx(styles.teaser, 'teaser')
110
+ }, /*#__PURE__*/React.createElement("div", {
111
+ className: cx(styles.teaserimg, 'teaser-img')
112
+ }, /*#__PURE__*/React.createElement("img", {
113
+ width: "100%",
114
+ style: {
115
+ marginLeft: '100px',
116
+ marginTop: '40px'
117
+ },
118
+ src: image
119
+ }))), /*#__PURE__*/React.createElement("img", {
120
+ className: styles.backLeftBottom,
121
+ src: "https://gw.alipayobjects.com/zos/basement_prod/441d5eaf-e623-47cd-b9b9-2a581d9ce1e3.svg",
122
+ alt: "back"
123
+ })));
124
+ };
@@ -1,4 +1,5 @@
1
- @import '../mixins';
1
+ @import '../_.less';
2
+
2
3
  .container1440() {
3
4
  width: 1440px;
4
5
  max-width: calc(100% - 80px);
@@ -25,22 +26,26 @@
25
26
  height: calc(94vh);
26
27
  position: relative;
27
28
  overflow: hidden;
29
+
28
30
  .content {
29
31
  .container1440;
30
32
  height: 100%;
31
33
  position: relative;
32
34
  }
35
+
33
36
  .text {
34
37
  position: relative;
35
38
  top: 26%;
36
39
  z-index: 1;
37
40
  margin-left: 4.5%;
41
+
38
42
  .title {
39
43
  font-size: 3.4em; //2.875em;
40
44
  font-weight: 800;
41
45
  color: rgba(0, 0, 0, 1);
42
46
  position: relative;
43
47
  }
48
+
44
49
  .description {
45
50
  margin-top: 0.83%; //12px;
46
51
  margin-bottom: 0px;
@@ -51,11 +56,12 @@
51
56
  width: 40%;
52
57
  max-width: 700px;
53
58
  }
59
+
54
60
  .buttons {
55
61
  display: flex;
56
62
  margin-top: 5.56%;
57
63
 
58
- .buttonLink + .buttonLink {
64
+ .buttonLink+.buttonLink {
59
65
  margin-left: 16px;
60
66
  }
61
67
 
@@ -95,39 +101,11 @@
95
101
  }
96
102
  }
97
103
  }
98
- .videoButtonWrapper {
99
- margin-left: 16px;
100
- width: fit-content;
101
- height: fit-content;
102
- .videoButton {
103
- width: 40px;
104
- height: 40px;
105
- background-size: contain;
106
- border: 1px solid @primary-color;
107
- border-radius: 20px;
108
- transition: all 0.15s;
109
- display: flex;
110
- cursor: pointer;
111
- overflow: hidden;
112
- .videoButtonIcon {
113
- margin-left: 12px;
114
- font-size: 16px;
115
- color: @primary-color;
116
- line-height: 44px;
117
- }
118
- .videoButtonText {
119
- line-height: 40px;
120
- margin-left: 10px;
121
- color: @primary-color;
122
- }
123
- &:hover {
124
- width: 134px;
125
- }
126
- }
127
- }
104
+
128
105
  .githubWrapper {
129
106
  margin-left: 16px;
130
107
  display: flex;
108
+
131
109
  :global {
132
110
  .gh-btn {
133
111
  width: 40px;
@@ -142,9 +120,11 @@
142
120
  cursor: pointer;
143
121
  float: left;
144
122
  transition: all 0.15s;
123
+
145
124
  &:hover {
146
125
  background: #f2f4f5;
147
126
  }
127
+
148
128
  .gh-ico {
149
129
  width: 16px;
150
130
  height: 16px;
@@ -157,10 +137,12 @@
157
137
  cursor: pointer;
158
138
  color: #333;
159
139
  }
140
+
160
141
  .gh-text {
161
142
  display: none;
162
143
  }
163
144
  }
145
+
164
146
  .gh-count {
165
147
  position: relative;
166
148
  display: none;
@@ -173,15 +155,18 @@
173
155
  height: 65%;
174
156
  border-radius: 5px;
175
157
  color: rgb(49, 70, 89);
158
+
176
159
  &:hover {
177
160
  background: #f2f4f5;
178
161
  transition: all 0.15s;
179
162
  }
180
163
  }
164
+
181
165
  .gh-count:hover,
182
166
  .gh-count:focus {
183
167
  color: #4183c4;
184
168
  }
169
+
185
170
  .gh-count:before,
186
171
  .gh-count:after {
187
172
  content: '';
@@ -192,6 +177,7 @@
192
177
  border-color: transparent;
193
178
  border-style: solid;
194
179
  }
180
+
195
181
  .gh-count:before {
196
182
  top: 50%;
197
183
  left: -3px;
@@ -199,6 +185,7 @@
199
185
  border-width: 4px 4px 4px 0;
200
186
  border-right-color: #fafafa;
201
187
  }
188
+
202
189
  .gh-count:after {
203
190
  top: 50%;
204
191
  border-width: 5px 5px 5px 0;
@@ -211,7 +198,8 @@
211
198
  }
212
199
  }
213
200
  }
214
- .notifications {
201
+
202
+ .news {
215
203
  width: 80%;
216
204
  display: flex;
217
205
  bottom: 40px;
@@ -219,6 +207,7 @@
219
207
  z-index: 3;
220
208
  margin-left: 4.5%;
221
209
  }
210
+
222
211
  .teaser {
223
212
  display: flex;
224
213
  position: absolute;
@@ -231,6 +220,7 @@
231
220
  margin-top: 0;
232
221
  top: 0;
233
222
  bottom: 0;
223
+
234
224
  .teaserimg {
235
225
  width: 100%;
236
226
  height: auto;
@@ -243,45 +233,6 @@
243
233
  bottom: -20px;
244
234
  }
245
235
  }
246
- .videoModal {
247
- :global {
248
- .video-react-big-play-button {
249
- display: none !important;
250
- }
251
- .video-react-control-bar {
252
- border-radius: 0 0 4px 4px;
253
- }
254
- .video-react {
255
- border-radius: 4px;
256
- .video-react-video {
257
- border-radius: 4px;
258
- }
259
- }
260
- .ant-modal-close {
261
- right: -50px;
262
- top: -12px;
263
- color: #fff;
264
- }
265
- .anticon-info-circle {
266
- display: none !important;
267
- }
268
- .ant-modal-confirm-btns {
269
- display: none !important;
270
- }
271
- .ant-modal-confirm-title {
272
- display: none !important;
273
- }
274
- .ant-modal-close {
275
- display: block !important;
276
- }
277
- .ant-modal-body {
278
- padding: 0 !important;
279
- .ant-modal-confirm-content {
280
- margin: 0 !important;
281
- }
282
- }
283
- }
284
- }
285
236
 
286
237
  @media (max-width: 1144px) {
287
238
  .wrapper {
@@ -303,41 +254,50 @@
303
254
  margin-bottom: 5%;
304
255
  position: relative;
305
256
  }
257
+
306
258
  .text {
307
259
  top: 16.7%;
308
260
  text-align: center;
309
261
  margin-left: 0;
262
+
310
263
  .title {
311
264
  font-size: 2.857em;
312
265
  margin-left: 0;
313
266
  }
267
+
314
268
  .description {
315
269
  width: 100%;
316
270
  max-width: 100%;
317
271
  margin-left: 0;
318
272
  font-size: 1em;
319
273
  }
274
+
320
275
  .buttons {
321
276
  display: inline-flex;
277
+
322
278
  .more {
323
279
  font-size: 1em;
324
280
  }
281
+
325
282
  .githubIframe {
326
283
  height: 40px;
327
284
  }
285
+
328
286
  .videoButtonWrapper {
329
287
  width: fit-content;
330
288
  height: fit-content;
331
289
  }
332
290
  }
333
291
  }
334
- .notifications {
292
+
293
+ .news {
335
294
  width: 100%;
336
295
  display: block;
337
296
  bottom: 20px;
338
297
  height: 44px;
339
298
  overflow: hidden;
340
299
  }
300
+
341
301
  .teaser {
342
302
  width: 100%;
343
303
  max-width: 1200px;
@@ -348,6 +308,7 @@
348
308
  top: 30%;
349
309
  display: flex;
350
310
  justify-content: center;
311
+
351
312
  .teaserimg {
352
313
  width: 40%;
353
314
  margin-left: unset;
@@ -374,27 +335,33 @@
374
335
  .text {
375
336
  .buttons {
376
337
  margin-top: 70%;
338
+
377
339
  .githubWrapper {
378
340
  display: none;
379
341
  }
380
342
  }
381
343
  }
344
+
382
345
  .teaser {
383
346
  width: 100%;
384
347
  top: 5%;
348
+
385
349
  .teaserimg {
386
350
  width: 100%;
387
351
  }
388
352
  }
353
+
389
354
  .backLeftBottom {
390
355
  display: none;
391
356
  }
392
357
  }
393
358
  }
359
+
394
360
  @media (max-width: 480px) {
395
361
  .wrapper {
396
362
  .text {
397
363
  height: 70%;
364
+
398
365
  .buttons {
399
366
  bottom: 10px;
400
367
  margin-top: unset;
@@ -405,8 +372,9 @@
405
372
  justify-content: center;
406
373
  }
407
374
  }
375
+
408
376
  .teaser {
409
377
  top: 14%;
410
378
  }
411
379
  }
412
- }
380
+ }
@@ -0,0 +1,55 @@
1
+ import React from 'react';
2
+ export interface PlayGroundItemProps {
3
+ source: string;
4
+ examples: PlayGroundItemProps[];
5
+ babeledSource: string;
6
+ absolutePath?: string;
7
+ relativePath?: string;
8
+ screenshot?: string;
9
+ recommended?: boolean;
10
+ filename: string;
11
+ title?: string;
12
+ location?: Location;
13
+ playground?: {
14
+ container?: string;
15
+ playgroundDidMount?: string;
16
+ playgroundWillUnmount?: string;
17
+ dependencies?: {
18
+ [key: string]: string;
19
+ };
20
+ devDependencies?: {
21
+ [key: string]: string;
22
+ };
23
+ htmlCodeTemplate?: string;
24
+ };
25
+ }
26
+ export interface TreeItem {
27
+ title?: string;
28
+ value?: string;
29
+ key?: string;
30
+ children?: any;
31
+ icon?: string;
32
+ relativePath?: string;
33
+ filename?: string;
34
+ screenshot?: string;
35
+ node?: any;
36
+ }
37
+ export interface ExampleSiderProps {
38
+ /**
39
+ * 当前 Example (受控)
40
+ */
41
+ currentDemo: ExamplesPage.Demo;
42
+ /**
43
+ * 当选中的 Demo 被改变时做些什么
44
+ */
45
+ onDemoClicked: (demo: ExamplesPage.Demo) => void;
46
+ /**
47
+ * 所有的案例主题
48
+ */
49
+ exampleTopics: ExamplesPage.ExampleTopic[];
50
+ showExampleDemoTitle: boolean;
51
+ }
52
+ /**
53
+ * DEMO 预览页面的菜单
54
+ */
55
+ export declare const ExampleSider: React.FC<ExampleSiderProps>;