@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.
- package/LICENSE +21 -0
- package/README.md +32 -33
- package/dist/builtins/Playground/index.d.ts +24 -0
- package/{es/builtins/Example.js → dist/builtins/Playground/index.js} +40 -33
- package/dist/builtins/Playground/index.module.less +15 -0
- package/dist/context.d.ts +5 -0
- package/dist/context.js +2 -0
- package/dist/layouts/DocLayout.d.ts +7 -0
- package/dist/layouts/DocLayout.js +38 -0
- package/dist/layouts/entry/API.d.ts +10 -0
- package/dist/layouts/entry/API.js +12 -0
- package/dist/layouts/entry/Index.d.ts +7 -0
- package/dist/layouts/entry/Index.js +71 -0
- package/dist/layouts/entry/Manual.d.ts +8 -0
- package/dist/layouts/entry/Manual.js +14 -0
- package/dist/locales/en.json +98 -0
- package/dist/locales/zh.json +98 -0
- package/dist/pages/404.d.ts +6 -0
- package/dist/pages/404.js +15 -0
- package/dist/pages/Example/index.d.ts +6 -0
- package/dist/pages/Example/index.js +139 -0
- package/dist/pages/Example/index.module.less +40 -0
- package/dist/pages/Examples/components/Accouncement/index.d.ts +6 -0
- package/dist/pages/Examples/components/Accouncement/index.js +60 -0
- package/dist/pages/Examples/components/Accouncement/index.module.less +9 -0
- package/dist/pages/Examples/components/Article/index.d.ts +2 -0
- package/dist/pages/Examples/components/Article/index.js +8 -0
- package/dist/pages/Examples/components/Article/index.module.less +2 -0
- package/dist/pages/Examples/components/ExampleTopicMenu/components/LeftMenu/index.d.ts +10 -0
- package/dist/pages/Examples/components/ExampleTopicMenu/components/LeftMenu/index.js +74 -0
- package/dist/pages/Examples/components/ExampleTopicMenu/index.d.ts +9 -0
- package/{es/builtins/Table.js → dist/pages/Examples/components/ExampleTopicMenu/index.js} +47 -41
- package/dist/pages/Examples/components/GalleryPageContent/DemoCard/index.d.ts +10 -0
- package/dist/pages/Examples/components/GalleryPageContent/DemoCard/index.js +33 -0
- package/dist/pages/Examples/components/GalleryPageContent/index.d.ts +10 -0
- package/dist/pages/Examples/components/GalleryPageContent/index.js +81 -0
- package/dist/pages/Examples/index.d.ts +8 -0
- package/dist/pages/Examples/index.js +75 -0
- package/dist/pages/Examples/index.module.less +605 -0
- package/dist/pages/Examples/types.d.ts +33 -0
- package/dist/pages/Examples/types.js +1 -0
- package/dist/plugin/examples.d.ts +12 -0
- package/dist/plugin/examples.js +91 -0
- package/dist/plugin/index.d.ts +3 -0
- package/dist/plugin/index.js +100 -0
- package/dist/plugin/utils.d.ts +5 -0
- package/dist/plugin/utils.js +45 -0
- package/dist/slots/404.d.ts +2 -0
- package/{es/antv/404/index.js → dist/slots/404.js} +4 -9
- package/{es/antv/Cases/Cases.d.ts → dist/slots/Cases/index.d.ts} +4 -4
- package/{es/antv/Cases/Cases.js → dist/slots/Cases/index.js} +25 -25
- package/{src/antv/Cases/Cases.module.less → dist/slots/Cases/index.module.less} +36 -5
- package/dist/slots/CodeEditor/Toolbar.d.ts +67 -0
- package/dist/slots/CodeEditor/Toolbar.js +152 -0
- package/dist/slots/CodeEditor/Toolbar.module.less +81 -0
- package/dist/slots/CodeEditor/index.d.ts +58 -0
- package/dist/slots/CodeEditor/index.js +200 -0
- package/dist/slots/CodeEditor/index.module.less +11 -0
- package/dist/slots/CodeEditor/utils.d.ts +42 -0
- package/dist/slots/CodeEditor/utils.js +157 -0
- package/dist/slots/CodePreview/CodeHeader.d.ts +19 -0
- package/dist/slots/CodePreview/CodeHeader.js +32 -0
- package/dist/slots/CodePreview/CodeHeader.module.less +0 -0
- package/dist/slots/CodePreview/index.d.ts +17 -0
- package/dist/slots/CodePreview/index.js +29 -0
- package/dist/slots/CodePreview/index.module.less +42 -0
- package/dist/slots/CodeRunner/index.d.ts +14 -0
- package/dist/slots/CodeRunner/index.js +76 -0
- package/dist/slots/CodeRunner/index.module.less +0 -0
- package/dist/slots/CodeRunner/utils.d.ts +10 -0
- package/dist/slots/CodeRunner/utils.js +36 -0
- package/dist/slots/Companies/index.d.ts +13 -0
- package/dist/slots/Companies/index.js +49 -0
- package/dist/slots/Companies/index.module.less +82 -0
- package/dist/slots/Detail/News.d.ts +9 -0
- package/{es/antv/Banner/Notification.js → dist/slots/Detail/News.js} +8 -11
- package/{src/antv/Banner/Notification.module.less → dist/slots/Detail/News.module.less} +15 -3
- package/dist/slots/Detail/index.d.ts +26 -0
- package/dist/slots/Detail/index.js +124 -0
- package/{src/antv/Banner/Banner.module.less → dist/slots/Detail/index.module.less} +42 -74
- package/dist/slots/ExampleSider/index.d.ts +55 -0
- package/dist/slots/ExampleSider/index.js +218 -0
- package/dist/slots/ExampleSider/index.module.less +141 -0
- package/{es/antv → dist/slots}/Features/FeatureCard.d.ts +1 -1
- package/{es/antv → dist/slots}/Features/FeatureCard.js +6 -6
- package/{src/antv → dist/slots}/Features/FeatureCard.module.less +8 -1
- package/{es/antv → dist/slots}/Features/index.d.ts +2 -2
- package/{es/antv → dist/slots}/Features/index.js +17 -25
- package/{src/antv/Features/Features.module.less → dist/slots/Features/index.module.less} +34 -3
- package/dist/slots/Footer/index.d.ts +18 -0
- package/dist/slots/Footer/index.js +187 -0
- package/dist/slots/Footer/index.module.less +85 -0
- package/dist/slots/Header/Logo.d.ts +7 -0
- package/{es/antv → dist/slots}/Header/Logo.js +6 -2
- package/dist/slots/Header/LogoWhite.d.ts +7 -0
- package/dist/slots/Header/LogoWhite.js +19 -0
- package/dist/slots/Header/Navs.d.ts +17 -0
- package/dist/slots/Header/Navs.js +46 -0
- package/dist/slots/Header/Products/NavigatorBanner.d.ts +10 -0
- package/dist/slots/Header/Products/NavigatorBanner.js +34 -0
- package/dist/slots/Header/Products/NavigatorBanner.module.less +39 -0
- package/{es/antv → dist/slots/Header}/Products/Product.d.ts +3 -3
- package/{es/antv → dist/slots/Header}/Products/Product.js +11 -16
- package/{src/antv → dist/slots/Header}/Products/Product.module.less +10 -8
- package/{es/antv → dist/slots/Header}/Products/getProducts.d.ts +2 -7
- package/dist/slots/Header/Products/getProducts.js +67 -0
- package/dist/slots/Header/Products/index.d.ts +9 -0
- package/{es/antv → dist/slots/Header}/Products/index.js +15 -22
- package/dist/slots/Header/Search.d.ts +12 -0
- package/dist/slots/Header/Search.js +90 -0
- package/dist/slots/Header/Search.module.less +39 -0
- package/dist/slots/Header/index.d.ts +66 -0
- package/dist/slots/Header/index.js +379 -0
- package/dist/slots/Header/index.module.less +382 -0
- package/dist/slots/Header/utils.d.ts +1 -0
- package/dist/slots/Header/utils.js +26 -0
- package/dist/slots/Loading/index.d.ts +2 -0
- package/dist/slots/Loading/index.js +65 -0
- package/dist/slots/Loading/index.module.less +12 -0
- package/dist/slots/Loading.d.ts +5 -0
- package/dist/slots/Loading.js +8 -0
- package/dist/slots/ManualContent/NavigatorBanner.d.ts +9 -0
- package/dist/slots/ManualContent/NavigatorBanner.js +36 -0
- package/dist/slots/ManualContent/NavigatorBanner.module.less +39 -0
- package/dist/slots/ManualContent/ReadingTime.d.ts +3 -0
- package/dist/slots/ManualContent/ReadingTime.js +10 -0
- package/dist/slots/ManualContent/index.d.ts +9 -0
- package/dist/slots/ManualContent/index.js +321 -0
- package/dist/slots/ManualContent/index.module.less +656 -0
- package/dist/slots/TOC.d.ts +5 -0
- package/dist/slots/TOC.js +6 -0
- package/dist/slots/_.less +83 -0
- package/dist/slots/global.d.ts +1 -0
- package/dist/slots/global.js +7 -0
- package/dist/slots/hooks.d.ts +16 -0
- package/{es/antv → dist/slots}/hooks.js +60 -37
- package/dist/slots/utils.d.ts +20 -0
- package/dist/slots/utils.js +154 -0
- package/dist/types.d.ts +3 -0
- package/dist/types.js +1 -0
- package/dist/typings.d.ts +140 -0
- package/package.json +108 -47
- package/es/antv/404/index.d.ts +0 -2
- package/es/antv/Banner/Banner.module.less +0 -412
- package/es/antv/Banner/Notification.d.ts +0 -10
- package/es/antv/Banner/Notification.module.less +0 -108
- package/es/antv/Banner/index.d.ts +0 -25
- package/es/antv/Banner/index.js +0 -104
- package/es/antv/Cases/Cases.module.less +0 -203
- package/es/antv/Features/FeatureCard.module.less +0 -51
- package/es/antv/Features/Features.module.less +0 -169
- package/es/antv/Footer/Footer.module.less +0 -36
- package/es/antv/Footer/index.d.ts +0 -12
- package/es/antv/Footer/index.js +0 -237
- package/es/antv/Header/Logo.d.ts +0 -4
- package/es/antv/Products/Product.module.less +0 -146
- package/es/antv/Products/getNewProducts.d.ts +0 -24
- package/es/antv/Products/getNewProducts.js +0 -35
- package/es/antv/Products/getProducts.js +0 -460
- package/es/antv/Products/index.d.ts +0 -9
- package/es/antv/hooks.d.ts +0 -14
- package/es/antv/mixins.less +0 -21
- package/es/antv/utils.d.ts +0 -5
- package/es/antv/utils.js +0 -49
- package/es/builtins/API.d.ts +0 -3
- package/es/builtins/API.js +0 -37
- package/es/builtins/Alert.d.ts +0 -3
- package/es/builtins/Alert.js +0 -7
- package/es/builtins/Alert.less +0 -62
- package/es/builtins/Badge.d.ts +0 -3
- package/es/builtins/Badge.js +0 -7
- package/es/builtins/Badge.less +0 -31
- package/es/builtins/Example.d.ts +0 -5
- package/es/builtins/Example.less +0 -47
- package/es/builtins/Previewer.d.ts +0 -39
- package/es/builtins/Previewer.js +0 -225
- package/es/builtins/Previewer.less +0 -406
- package/es/builtins/SourceCode.d.ts +0 -10
- package/es/builtins/SourceCode.js +0 -70
- package/es/builtins/SourceCode.less +0 -103
- package/es/builtins/Table.d.ts +0 -4
- package/es/builtins/Table.less +0 -43
- package/es/builtins/Tree.d.ts +0 -4
- package/es/builtins/Tree.js +0 -213
- package/es/builtins/Tree.less +0 -159
- package/es/components/Dark.d.ts +0 -9
- package/es/components/Dark.js +0 -125
- package/es/components/Dark.less +0 -121
- package/es/components/LocaleSelect.d.ts +0 -6
- package/es/components/LocaleSelect.js +0 -53
- package/es/components/LocaleSelect.less +0 -59
- package/es/components/Navbar.d.ts +0 -10
- package/es/components/Navbar.js +0 -155
- package/es/components/Navbar.less +0 -180
- package/es/components/SearchBar.d.ts +0 -4
- package/es/components/SearchBar.js +0 -81
- package/es/components/SearchBar.less +0 -165
- package/es/components/SideMenu.d.ts +0 -10
- package/es/components/SideMenu.js +0 -99
- package/es/components/SideMenu.less +0 -379
- package/es/components/SlugList.d.ts +0 -7
- package/es/components/SlugList.js +0 -38
- package/es/components/SlugList.less +0 -18
- package/es/declaration.d.ts +0 -1
- package/es/layout.d.ts +0 -5
- package/es/layout.js +0 -276
- package/es/style/layout.less +0 -402
- package/es/style/markdown.less +0 -240
- package/es/style/variables.less +0 -37
- package/src/antv/404/index.tsx +0 -25
- package/src/antv/Banner/Notification.tsx +0 -45
- package/src/antv/Banner/index.tsx +0 -139
- package/src/antv/Cases/Cases.tsx +0 -116
- package/src/antv/Features/FeatureCard.tsx +0 -24
- package/src/antv/Features/index.tsx +0 -86
- package/src/antv/Footer/Footer.module.less +0 -36
- package/src/antv/Footer/index.tsx +0 -272
- package/src/antv/Header/Logo.tsx +0 -85
- package/src/antv/Products/Product.tsx +0 -80
- package/src/antv/Products/getNewProducts.tsx +0 -53
- package/src/antv/Products/getProducts.tsx +0 -626
- package/src/antv/Products/index.tsx +0 -70
- package/src/antv/hooks.ts +0 -87
- package/src/antv/mixins.less +0 -21
- package/src/antv/utils.ts +0 -44
- package/src/builtins/API.tsx +0 -57
- package/src/builtins/Alert.less +0 -62
- package/src/builtins/Alert.tsx +0 -4
- package/src/builtins/Badge.less +0 -31
- package/src/builtins/Badge.tsx +0 -4
- package/src/builtins/Example.less +0 -47
- package/src/builtins/Example.tsx +0 -34
- package/src/builtins/Previewer.less +0 -406
- package/src/builtins/Previewer.tsx +0 -264
- package/src/builtins/SourceCode.less +0 -103
- package/src/builtins/SourceCode.tsx +0 -55
- package/src/builtins/Table.less +0 -43
- package/src/builtins/Table.tsx +0 -42
- package/src/builtins/Tree.less +0 -159
- package/src/builtins/Tree.tsx +0 -130
- package/src/components/Dark.less +0 -121
- package/src/components/Dark.tsx +0 -78
- package/src/components/LocaleSelect.less +0 -59
- package/src/components/LocaleSelect.tsx +0 -53
- package/src/components/Navbar.less +0 -180
- package/src/components/Navbar.tsx +0 -152
- package/src/components/SearchBar.less +0 -165
- package/src/components/SearchBar.tsx +0 -68
- package/src/components/SideMenu.less +0 -379
- package/src/components/SideMenu.tsx +0 -148
- package/src/components/SlugList.less +0 -18
- package/src/components/SlugList.tsx +0 -20
- package/src/declaration.d.ts +0 -1
- package/src/layout.tsx +0 -225
- package/src/style/layout.less +0 -402
- package/src/style/markdown.less +0 -240
- package/src/style/variables.less +0 -37
- package/src/test/SearchBar.test.ts +0 -32
- package/src/test/Table.test.tsx +0 -41
- package/src/test/index.test.tsx +0 -377
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
@import (reference) '../style/variables.less';
|
|
2
|
-
|
|
3
|
-
.@{prefix}-locale-select {
|
|
4
|
-
position: relative;
|
|
5
|
-
display: inline-block;
|
|
6
|
-
border: 1px solid @c-btn-border;
|
|
7
|
-
border-radius: 14px;
|
|
8
|
-
transition: background 0.2s;
|
|
9
|
-
|
|
10
|
-
[data-prefers-color=dark] & {
|
|
11
|
-
border: 1px solid @c-btn-border-dark;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
@media @mobile {
|
|
15
|
-
margin-top: 6px;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
&:hover {
|
|
19
|
-
background-color: #fafafa;
|
|
20
|
-
[data-prefers-color=dark] & {
|
|
21
|
-
background-color: rgba(255, 255, 255, 0.1);
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
&:not([data-locale-count='1']):not([data-locale-count='2'])::after {
|
|
26
|
-
content: '';
|
|
27
|
-
position: absolute;
|
|
28
|
-
top: 50%;
|
|
29
|
-
right: 10px;
|
|
30
|
-
margin-top: -3px;
|
|
31
|
-
width: 0;
|
|
32
|
-
height: 0;
|
|
33
|
-
border: 4px solid transparent;
|
|
34
|
-
border-top: 6px solid #7b7f8d;
|
|
35
|
-
pointer-events: none;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
a,
|
|
39
|
-
span,
|
|
40
|
-
select {
|
|
41
|
-
padding: 0 24px 0 16px;
|
|
42
|
-
height: 28px;
|
|
43
|
-
text-align: center;
|
|
44
|
-
text-decoration: none;
|
|
45
|
-
line-height: 28px;
|
|
46
|
-
appearance: none;
|
|
47
|
-
border: 0;
|
|
48
|
-
font-size: 16px;
|
|
49
|
-
color: #7b7f8d;
|
|
50
|
-
background: transparent;
|
|
51
|
-
outline: none;
|
|
52
|
-
cursor: pointer;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
a,
|
|
56
|
-
span {
|
|
57
|
-
padding-right: 16px;
|
|
58
|
-
}
|
|
59
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { FC, MouseEvent } from 'react';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import './Navbar.less';
|
|
4
|
-
interface INavbarProps {
|
|
5
|
-
location: any;
|
|
6
|
-
navPrefix?: React.ReactNode;
|
|
7
|
-
onMobileMenuClick: (ev: MouseEvent<HTMLButtonElement>) => void;
|
|
8
|
-
}
|
|
9
|
-
declare const Navbar: FC<INavbarProps>;
|
|
10
|
-
export default Navbar;
|
package/es/components/Navbar.js
DELETED
|
@@ -1,155 +0,0 @@
|
|
|
1
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
2
|
-
|
|
3
|
-
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."); }
|
|
4
|
-
|
|
5
|
-
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); }
|
|
6
|
-
|
|
7
|
-
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; }
|
|
8
|
-
|
|
9
|
-
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; }
|
|
10
|
-
|
|
11
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
12
|
-
|
|
13
|
-
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
14
|
-
|
|
15
|
-
/* eslint-disable jsx-a11y/control-has-associated-label */
|
|
16
|
-
import { context, Link, NavLink } from 'dumi/theme';
|
|
17
|
-
import React, { useContext } from 'react';
|
|
18
|
-
import { useMedia } from 'react-use';
|
|
19
|
-
import Logo from '../antv/Header/Logo';
|
|
20
|
-
import Products from '../antv/Products';
|
|
21
|
-
import LocaleSelect from './LocaleSelect';
|
|
22
|
-
import './Navbar.less';
|
|
23
|
-
|
|
24
|
-
var Navbar = function Navbar(_ref) {
|
|
25
|
-
var onMobileMenuClick = _ref.onMobileMenuClick,
|
|
26
|
-
navPrefix = _ref.navPrefix,
|
|
27
|
-
location = _ref.location;
|
|
28
|
-
|
|
29
|
-
var _useContext = useContext(context),
|
|
30
|
-
base = _useContext.base,
|
|
31
|
-
_useContext$config = _useContext.config,
|
|
32
|
-
mode = _useContext$config.mode,
|
|
33
|
-
title = _useContext$config.title,
|
|
34
|
-
logo = _useContext$config.logo,
|
|
35
|
-
navItems = _useContext.nav;
|
|
36
|
-
|
|
37
|
-
var isWide = useMedia('(min-width: 767.99px)', true);
|
|
38
|
-
|
|
39
|
-
var _React$useState = React.useState(false),
|
|
40
|
-
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
41
|
-
productMenuVisible = _React$useState2[0],
|
|
42
|
-
setProductMenuVisible = _React$useState2[1];
|
|
43
|
-
|
|
44
|
-
var productMenuHovering = false;
|
|
45
|
-
|
|
46
|
-
var onProductMouseEnter = function onProductMouseEnter(e) {
|
|
47
|
-
productMenuHovering = true;
|
|
48
|
-
e.persist();
|
|
49
|
-
setTimeout(function () {
|
|
50
|
-
// eslint-disable-next-line no-undef
|
|
51
|
-
if (e.target instanceof Element && e.target.matches(':hover')) {
|
|
52
|
-
setProductMenuVisible(true);
|
|
53
|
-
}
|
|
54
|
-
}, 200);
|
|
55
|
-
};
|
|
56
|
-
|
|
57
|
-
var onProductMouseLeave = function onProductMouseLeave(e) {
|
|
58
|
-
e.persist();
|
|
59
|
-
productMenuHovering = false;
|
|
60
|
-
setTimeout(function () {
|
|
61
|
-
if (productMenuHovering) {
|
|
62
|
-
return;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
setProductMenuVisible(false);
|
|
66
|
-
}, 200);
|
|
67
|
-
};
|
|
68
|
-
|
|
69
|
-
var onToggleProductMenuVisible = function onToggleProductMenuVisible() {
|
|
70
|
-
setProductMenuVisible(!productMenuVisible);
|
|
71
|
-
};
|
|
72
|
-
|
|
73
|
-
var productItemProps = isWide ? {
|
|
74
|
-
onMouseEnter: onProductMouseEnter,
|
|
75
|
-
onMouseLeave: onProductMouseLeave
|
|
76
|
-
} : {
|
|
77
|
-
onClick: onToggleProductMenuVisible
|
|
78
|
-
};
|
|
79
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
80
|
-
className: "__dumi-default-navbar",
|
|
81
|
-
"data-mode": mode
|
|
82
|
-
}, /*#__PURE__*/React.createElement("button", {
|
|
83
|
-
className: "__dumi-default-navbar-toggle",
|
|
84
|
-
onClick: onMobileMenuClick
|
|
85
|
-
}), /*#__PURE__*/React.createElement("div", {
|
|
86
|
-
className: "__dumi-default-navbar-logo",
|
|
87
|
-
style: {
|
|
88
|
-
background: 'none',
|
|
89
|
-
height: '28px',
|
|
90
|
-
lineHeight: '28px',
|
|
91
|
-
paddingLeft: '0px'
|
|
92
|
-
}
|
|
93
|
-
}, /*#__PURE__*/React.createElement("a", {
|
|
94
|
-
href: 'https://antv.vision/'
|
|
95
|
-
}, /*#__PURE__*/React.createElement(Logo, {
|
|
96
|
-
style: {
|
|
97
|
-
height: '28px',
|
|
98
|
-
lineHeight: '28px'
|
|
99
|
-
}
|
|
100
|
-
})), /*#__PURE__*/React.createElement("span", {
|
|
101
|
-
style: {
|
|
102
|
-
fontSize: '16px',
|
|
103
|
-
width: '1px',
|
|
104
|
-
height: '24px',
|
|
105
|
-
backgroundColor: '#ccc',
|
|
106
|
-
display: ' inline-block',
|
|
107
|
-
margin: '0 20px'
|
|
108
|
-
}
|
|
109
|
-
}), /*#__PURE__*/React.createElement(Link, {
|
|
110
|
-
to: base
|
|
111
|
-
}, /*#__PURE__*/React.createElement("span", {
|
|
112
|
-
style: {
|
|
113
|
-
fontSize: '16px',
|
|
114
|
-
color: '#0d1a26',
|
|
115
|
-
display: 'inline-block',
|
|
116
|
-
verticalAlign: 'top'
|
|
117
|
-
}
|
|
118
|
-
}, title))), /*#__PURE__*/React.createElement("nav", null, navPrefix, navItems.map(function (nav) {
|
|
119
|
-
var _a;
|
|
120
|
-
|
|
121
|
-
var child = Boolean((_a = nav.children) === null || _a === void 0 ? void 0 : _a.length) && /*#__PURE__*/React.createElement("ul", null, nav.children.map(function (item) {
|
|
122
|
-
return /*#__PURE__*/React.createElement("li", {
|
|
123
|
-
key: item.path
|
|
124
|
-
}, /*#__PURE__*/React.createElement(NavLink, {
|
|
125
|
-
to: item.path
|
|
126
|
-
}, item.title));
|
|
127
|
-
}));
|
|
128
|
-
return /*#__PURE__*/React.createElement("span", {
|
|
129
|
-
key: nav.title || nav.path
|
|
130
|
-
}, nav.path ? /*#__PURE__*/React.createElement(NavLink, {
|
|
131
|
-
to: nav.path,
|
|
132
|
-
key: nav.path
|
|
133
|
-
}, nav.title) : nav.title, child);
|
|
134
|
-
}), /*#__PURE__*/React.createElement("span", Object.assign({}, productItemProps), "\u6240\u6709\u4EA7\u54C1", /*#__PURE__*/React.createElement("img", {
|
|
135
|
-
src: "https://gw.alipayobjects.com/zos/antfincdn/FLrTNDvlna/antv.png",
|
|
136
|
-
alt: "antv logo arrow",
|
|
137
|
-
className: "arrow ".concat(productMenuVisible && 'open')
|
|
138
|
-
}), /*#__PURE__*/React.createElement("div", {
|
|
139
|
-
style: {
|
|
140
|
-
position: 'fixed',
|
|
141
|
-
top: ' 0px',
|
|
142
|
-
left: '0px',
|
|
143
|
-
width: ' 100%',
|
|
144
|
-
right: '0px'
|
|
145
|
-
}
|
|
146
|
-
}, /*#__PURE__*/React.createElement(Products, {
|
|
147
|
-
show: productMenuVisible,
|
|
148
|
-
rootDomain: "ant.vison",
|
|
149
|
-
language: "zh"
|
|
150
|
-
}))), /*#__PURE__*/React.createElement(LocaleSelect, {
|
|
151
|
-
location: location
|
|
152
|
-
})));
|
|
153
|
-
};
|
|
154
|
-
|
|
155
|
-
export default Navbar;
|
|
@@ -1,180 +0,0 @@
|
|
|
1
|
-
@import (reference) "../style/variables.less";
|
|
2
|
-
|
|
3
|
-
.@{prefix}-navbar {
|
|
4
|
-
position: fixed;
|
|
5
|
-
z-index: 101;
|
|
6
|
-
top: 0;
|
|
7
|
-
left: 0;
|
|
8
|
-
right: 0;
|
|
9
|
-
display: none;
|
|
10
|
-
align-items: center;
|
|
11
|
-
justify-content: space-between;
|
|
12
|
-
padding: 0 58px;
|
|
13
|
-
height: @s-nav-height;
|
|
14
|
-
white-space: nowrap;
|
|
15
|
-
background: #fff;
|
|
16
|
-
box-shadow: 0 8px 24px -2px rgba(0, 0, 0, 0.05);
|
|
17
|
-
|
|
18
|
-
@media @mobile {
|
|
19
|
-
display: flex;
|
|
20
|
-
justify-content: center;
|
|
21
|
-
height: @s-mobile-nav-height;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
&-toggle {
|
|
25
|
-
position: absolute;
|
|
26
|
-
top: 14px;
|
|
27
|
-
left: 16px;
|
|
28
|
-
display: none;
|
|
29
|
-
width: 22px;
|
|
30
|
-
height: 22px;
|
|
31
|
-
border: 0;
|
|
32
|
-
outline: none;
|
|
33
|
-
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFgAAAA4CAYAAAB5YT9uAAAAAXNSR0IArs4c6QAAASVJREFUeAHt3DuOwjAUBVAHscWZjaSkAIqU2QjskV80QwpsF3ArdGiw3hW3OGnQM2Iof6/dfr7+n71/LjAdx+HRsvm8SkNPAHBPJ5ABDiD2KgD3dAIZ4ABirwJwTyeQAQ4g9ioA93QC2fbZsSm/z7MDAQIECBAgQIAAAQIECBAgQIAAAQKvAsvV8mO8O8yn19jkXYHpMC7byXVdeS0/75b5XFvAwr1tE0kARxjbJYDbNpEEcISxXQK4bRNJAEcY2yWA2zaRZP0ePJRzpFEJAQIECBAgQIAAAQIECBAgQIAAgW8VWK/tj7Nb5eBTnvbjsp1c15WX4ncRQeB7lb8zyHrW29xo1F1iU8AxynoR4LpLbAo4RlkvAlx3iU0BxyjrRYDrLrHpDVSAEEPXScHTAAAAAElFTkSuQmCC")
|
|
34
|
-
no-repeat center / contain;
|
|
35
|
-
|
|
36
|
-
@media @mobile {
|
|
37
|
-
display: block;
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
&-logo {
|
|
42
|
-
display: inline-block;
|
|
43
|
-
height: 40px;
|
|
44
|
-
color: #080e29;
|
|
45
|
-
font-weight: 500;
|
|
46
|
-
text-decoration: none;
|
|
47
|
-
font-size: 24px;
|
|
48
|
-
line-height: 40px;
|
|
49
|
-
|
|
50
|
-
&:not([data-plaintext]) {
|
|
51
|
-
padding-left: 56px;
|
|
52
|
-
background: url(@img-logo) no-repeat 0 / contain;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
&:active,
|
|
56
|
-
&:hover {
|
|
57
|
-
color: #080e29;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
@media @mobile {
|
|
61
|
-
height: 28px;
|
|
62
|
-
line-height: 28px;
|
|
63
|
-
|
|
64
|
-
&:not([data-plaintext]) {
|
|
65
|
-
padding-left: 36px;
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
nav {
|
|
71
|
-
> span {
|
|
72
|
-
position: relative;
|
|
73
|
-
margin-left: 40px;
|
|
74
|
-
display: inline-block;
|
|
75
|
-
height: @s-nav-height;
|
|
76
|
-
cursor: pointer;
|
|
77
|
-
font-size: 14px;
|
|
78
|
-
line-height: @s-nav-height;
|
|
79
|
-
text-decoration: none;
|
|
80
|
-
letter-spacing: 0;
|
|
81
|
-
|
|
82
|
-
> a {
|
|
83
|
-
color: #4d5164;
|
|
84
|
-
text-decoration: none;
|
|
85
|
-
|
|
86
|
-
&:hover,
|
|
87
|
-
&.active {
|
|
88
|
-
color: @c-primary;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
&::before {
|
|
92
|
-
content: "";
|
|
93
|
-
position: absolute;
|
|
94
|
-
top: 0;
|
|
95
|
-
bottom: 0;
|
|
96
|
-
right: -18px;
|
|
97
|
-
left: -18px;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
&.active::after {
|
|
101
|
-
content: "";
|
|
102
|
-
position: absolute;
|
|
103
|
-
bottom: 0;
|
|
104
|
-
left: -2px;
|
|
105
|
-
right: -2px;
|
|
106
|
-
height: 2px;
|
|
107
|
-
background-color: @c-primary;
|
|
108
|
-
border-radius: 1px;
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
+ *:not(a) {
|
|
113
|
-
margin-left: 40px;
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
// second nav
|
|
117
|
-
> ul {
|
|
118
|
-
list-style: none;
|
|
119
|
-
position: absolute;
|
|
120
|
-
top: 100%;
|
|
121
|
-
left: 50%;
|
|
122
|
-
margin: 0;
|
|
123
|
-
min-width: 100px;
|
|
124
|
-
padding: 8px 18px;
|
|
125
|
-
line-height: 2;
|
|
126
|
-
background-color: #fff;
|
|
127
|
-
box-shadow: 0 8px 24px -2px rgba(0, 0, 0, 0.08);
|
|
128
|
-
transform: translate(-50%);
|
|
129
|
-
transform-origin: top;
|
|
130
|
-
border-radius: 1px;
|
|
131
|
-
transition: all 0.2s;
|
|
132
|
-
|
|
133
|
-
a {
|
|
134
|
-
position: relative;
|
|
135
|
-
display: block;
|
|
136
|
-
color: @c-text;
|
|
137
|
-
|
|
138
|
-
&:hover,
|
|
139
|
-
&.active {
|
|
140
|
-
color: @c-primary;
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
&:not(:hover) > ul {
|
|
146
|
-
visibility: hidden;
|
|
147
|
-
pointer-events: none;
|
|
148
|
-
transform: translate(-50%) scaleY(0.9);
|
|
149
|
-
opacity: 0;
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
.@{prefix}-search + .@{prefix}-locale-select {
|
|
154
|
-
margin-left: 40px;
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
@media @mobile {
|
|
158
|
-
> a,
|
|
159
|
-
> span,
|
|
160
|
-
> div {
|
|
161
|
-
display: none;
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
&[data-mode="site"] {
|
|
167
|
-
display: flex;
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
.arrow {
|
|
171
|
-
width: 14px;
|
|
172
|
-
margin-left: 2px;
|
|
173
|
-
position: relative;
|
|
174
|
-
top: -2px;
|
|
175
|
-
transition: all 0.3s;
|
|
176
|
-
&.open {
|
|
177
|
-
transform: rotate(180deg);
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
}
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
2
|
-
|
|
3
|
-
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."); }
|
|
4
|
-
|
|
5
|
-
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); }
|
|
6
|
-
|
|
7
|
-
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; }
|
|
8
|
-
|
|
9
|
-
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; }
|
|
10
|
-
|
|
11
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
12
|
-
|
|
13
|
-
import React, { useState, useEffect, useRef } from 'react';
|
|
14
|
-
import { useSearch, AnchorLink } from 'dumi/theme';
|
|
15
|
-
import './SearchBar.less';
|
|
16
|
-
export var highlight = function highlight(key, title) {
|
|
17
|
-
var index = title.toLowerCase().indexOf(key.toLowerCase());
|
|
18
|
-
var l = key.length;
|
|
19
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, title.substring(0, index), /*#__PURE__*/React.createElement("span", {
|
|
20
|
-
className: "__dumi-default-search-highlight"
|
|
21
|
-
}, title.substring(index, index + l)), title.substring(index + l, title.length));
|
|
22
|
-
};
|
|
23
|
-
export default (function () {
|
|
24
|
-
var _useState = useState(''),
|
|
25
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
26
|
-
keywords = _useState2[0],
|
|
27
|
-
setKeywords = _useState2[1];
|
|
28
|
-
|
|
29
|
-
var _useState3 = useState([]),
|
|
30
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
31
|
-
items = _useState4[0],
|
|
32
|
-
setItems = _useState4[1];
|
|
33
|
-
|
|
34
|
-
var input = useRef();
|
|
35
|
-
var result = useSearch(keywords);
|
|
36
|
-
var emptySvg = /*#__PURE__*/React.createElement("svg", {
|
|
37
|
-
className: "__dumi-default-search-empty",
|
|
38
|
-
viewBox: "0 0 1024 1024",
|
|
39
|
-
version: "1.1",
|
|
40
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
41
|
-
"p-id": "2347",
|
|
42
|
-
width: "32",
|
|
43
|
-
height: "32"
|
|
44
|
-
}, /*#__PURE__*/React.createElement("path", {
|
|
45
|
-
d: "M855.6 427.2H168.5c-12.7 0-24.4 6.9-30.6 18L4.4 684.7C1.5 689.9 0 695.8 0 701.8v287.1c0 19.4 15.7 35.1 35.1 35.1H989c19.4 0 35.1-15.7 35.1-35.1V701.8c0-6-1.5-11.8-4.4-17.1L886.2 445.2c-6.2-11.1-17.9-18-30.6-18zM673.4 695.6c-16.5 0-30.8 11.5-34.3 27.7-12.7 58.5-64.8 102.3-127.2 102.3s-114.5-43.8-127.2-102.3c-3.5-16.1-17.8-27.7-34.3-27.7H119c-26.4 0-43.3-28-31.1-51.4l81.7-155.8c6.1-11.6 18-18.8 31.1-18.8h622.4c13 0 25 7.2 31.1 18.8l81.7 155.8c12.2 23.4-4.7 51.4-31.1 51.4H673.4zM819.9 209.5c-1-1.8-2.1-3.7-3.2-5.5-9.8-16.6-31.1-22.2-47.8-12.6L648.5 261c-17 9.8-22.7 31.6-12.6 48.4 0.9 1.4 1.7 2.9 2.5 4.4 9.5 17 31.2 22.8 48 13L807 257.3c16.7-9.7 22.4-31 12.9-47.8zM375.4 261.1L255 191.6c-16.7-9.6-38-4-47.8 12.6-1.1 1.8-2.1 3.6-3.2 5.5-9.5 16.8-3.8 38.1 12.9 47.8L337.3 327c16.9 9.7 38.6 4 48-13.1 0.8-1.5 1.7-2.9 2.5-4.4 10.2-16.8 4.5-38.6-12.4-48.4zM512 239.3h2.5c19.5 0.3 35.5-15.5 35.5-35.1v-139c0-19.3-15.6-34.9-34.8-35.1h-6.4C489.6 30.3 474 46 474 65.2v139c0 19.5 15.9 35.4 35.5 35.1h2.5z"
|
|
46
|
-
}));
|
|
47
|
-
useEffect(function () {
|
|
48
|
-
if (Array.isArray(result)) {
|
|
49
|
-
setItems(result);
|
|
50
|
-
} else if (typeof result === 'function') {
|
|
51
|
-
result(".".concat(input.current.className));
|
|
52
|
-
}
|
|
53
|
-
}, [result]);
|
|
54
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
55
|
-
className: "__dumi-default-search"
|
|
56
|
-
}, /*#__PURE__*/React.createElement("input", Object.assign({
|
|
57
|
-
className: "__dumi-default-search-input",
|
|
58
|
-
type: "search",
|
|
59
|
-
ref: input
|
|
60
|
-
}, Array.isArray(result) ? {
|
|
61
|
-
value: keywords,
|
|
62
|
-
onChange: function onChange(ev) {
|
|
63
|
-
return setKeywords(ev.target.value);
|
|
64
|
-
}
|
|
65
|
-
} : {})), /*#__PURE__*/React.createElement("ul", null, items.length > 0 && items.map(function (meta) {
|
|
66
|
-
var _a;
|
|
67
|
-
|
|
68
|
-
return /*#__PURE__*/React.createElement("li", {
|
|
69
|
-
key: meta.path,
|
|
70
|
-
onClick: function onClick() {
|
|
71
|
-
return setKeywords('');
|
|
72
|
-
}
|
|
73
|
-
}, /*#__PURE__*/React.createElement(AnchorLink, {
|
|
74
|
-
to: meta.path
|
|
75
|
-
}, ((_a = meta.parent) === null || _a === void 0 ? void 0 : _a.title) && /*#__PURE__*/React.createElement("span", null, meta.parent.title), highlight(keywords, meta.title)));
|
|
76
|
-
}), items.length === 0 && keywords && /*#__PURE__*/React.createElement("li", {
|
|
77
|
-
style: {
|
|
78
|
-
textAlign: 'center'
|
|
79
|
-
}
|
|
80
|
-
}, emptySvg)));
|
|
81
|
-
});
|
|
@@ -1,165 +0,0 @@
|
|
|
1
|
-
@import (reference) '../style/variables.less';
|
|
2
|
-
|
|
3
|
-
.@{prefix}-search {
|
|
4
|
-
margin-left: 20px;
|
|
5
|
-
position: relative;
|
|
6
|
-
display: inline-block;
|
|
7
|
-
|
|
8
|
-
&-input {
|
|
9
|
-
width: 200px;
|
|
10
|
-
height: 32px;
|
|
11
|
-
padding: 0 38px 0 14px;
|
|
12
|
-
color: @c-heading;
|
|
13
|
-
font-size: 14px;
|
|
14
|
-
border: 0;
|
|
15
|
-
outline: none;
|
|
16
|
-
transition: all 0.2s;
|
|
17
|
-
border-radius: 16px;
|
|
18
|
-
background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAAXNSR0IArs4c6QAABpRJREFUaAXNWWts01UUv+f+264DVEABqY8IjhhCCCGKRoMaE0HACKJxsI3WDwqd67qHEoiPT2qCEpJ1bB1vElpJZYnyMMEgfCCQEUFIDOGDihLiY7yUGAHb9XGP59+t3b3/de2/XYvtl/855557zvndc+6zwAr4tW0KPQQithQRZjEUVcCgChkbw4CFGcMwIPxJZk8zzk5qFkuP1137QwFuTHUBU1qk1N3dXdl7LVKPyGoZ4mNm+w3oneKMb7bbxu5xu1/6N8++WdVzAkBE7usKukCwj5Dh/Vmt5WgEgL8oS2ubG5w7iaakjfyXFUD7lsCDGMMvadQfHbmrQQsA7BjjfFVLg/PH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cfX0kAVmYP0bFW2kzQggmxkUYm2Z6PwXx0YyLmozlXke4DcGHyJPvONG+CSAZIl+mbRKw26M/3dQbXGWRFY8n2e7RcviIb1ICvpdtYVJblouXaY20dgaN0uHtW7kTltarF49omy0ZK+/y7ljGEkKH2e1q9r8/N17ZSIjYOb5KB67IRFLjV1xFYV6xyokF6P0PwSZeBQGC07NsMrWRA76A/bImEOKzUJslJ8Wtuq/A2uZerO7cZL6STfGeNsjZj2cjd6TJ1bPydsMjlct2S5dnoIQB05TZ/sIY2lyCNunJSJQcxeu/cwu3ap2afFjs6Qo4ExN7WVxvjoGQKLF8QGQHohqlsXqD58Dk5HWt0pN9hSX6GAx5AAae4FS5bES9xbhHhBHMgE/eBwNmIYgnpzjHUutHcED4fEMMC0K22b949TcTj9HbDZgzxMjJBDzn+lQahZjgzZkEok9horLm+7vwo64zZ9ILcSNv9VWN73jyt8xrXXtNXm+ZGVx0d2oZd3SjFz1z/Bw/mmthZMyAHuGPH/jtuhP+uJ9kyMq6cHmW9DLSgMjrBAEOOCZXb5XVeL632zuAWmtgrM/RLinJlwjQA2UHHtsAUEYHFCGI6gZlC2ZlKZfYgGYvQvLlCpXGVRreXAj+CFdr+lpW1V+T+Mm0GBK2Bx+++iy3MtDoVBEAOoBj0SECUBQB9EMyCsHH7Iv3okxq4sgFQKIiyAlAIiLIDkC+IsgRgFgQtsQfKFkAuEBT8ZQ21+WUNYFgQtKNXcG2e/jdA2QMwgqAN8lylDea73U7pCqxrlfkvuU/4A2voyWecHOp/C76d7/ws9hcAAAAASUVORK5CYII=')
|
|
19
|
-
#f5f6f7 no-repeat right 14px center / 16px;
|
|
20
|
-
appearance: none;
|
|
21
|
-
|
|
22
|
-
[data-prefers-color=dark] & {
|
|
23
|
-
color: @c-secondary-dark;
|
|
24
|
-
background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAAXNSR0IArs4c6QAABpRJREFUaAXNWWts01UUv+f+264DVEABq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WUNYFgQtKNXcG2e/jdA2QMwgqAN8lylDea73U7pCqxrlfkvuU/4A2voyWecHOp/C76d7/ws9hcAAAAASUVORK5CYII=')
|
|
25
|
-
#ffffff1f no-repeat right 14px center / 16px;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
&:focus {
|
|
29
|
-
box-shadow: 0 0 0 1px fade(@c-primary, 20%) inset;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
&:not(:focus) + ul:not(:hover) {
|
|
33
|
-
visibility: hidden;
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
> ul {
|
|
38
|
-
list-style: none;
|
|
39
|
-
position: absolute;
|
|
40
|
-
top: 100%;
|
|
41
|
-
left: 0;
|
|
42
|
-
z-index: 10;
|
|
43
|
-
margin: 8px 0 0;
|
|
44
|
-
min-width: 280px;
|
|
45
|
-
max-width: 400px;
|
|
46
|
-
max-height: 230px;
|
|
47
|
-
padding: 6px 0;
|
|
48
|
-
background-color: #fff;
|
|
49
|
-
border: 1px solid @c-border;
|
|
50
|
-
border-radius: 1px;
|
|
51
|
-
box-shadow: 0 2px 20px 0 rgba(0, 0, 0, 0.05);
|
|
52
|
-
box-sizing: border-box;
|
|
53
|
-
overflow-y: auto;
|
|
54
|
-
|
|
55
|
-
[data-prefers-color=dark] & {
|
|
56
|
-
border: none;
|
|
57
|
-
background-color: @c-bg-dark;
|
|
58
|
-
box-shadow: 0 3px 6px -4px rgba(0, 0, 0, 0.48), 0 6px 16px 0 rgba(0, 0, 0, 0.32), 0 9px 28px 8px rgba(0, 0, 0, 0.2);
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
&:empty {
|
|
62
|
-
display: none;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
li {
|
|
66
|
-
font-size: 15px;
|
|
67
|
-
|
|
68
|
-
a {
|
|
69
|
-
display: block;
|
|
70
|
-
padding: 6px 20px;
|
|
71
|
-
color: @c-secondary;
|
|
72
|
-
text-decoration: none;
|
|
73
|
-
line-height: 1.5715;
|
|
74
|
-
transition: background-color 0.3s;
|
|
75
|
-
white-space: nowrap;
|
|
76
|
-
overflow: hidden;
|
|
77
|
-
text-overflow: ellipsis;
|
|
78
|
-
|
|
79
|
-
[data-prefers-color=dark] & {
|
|
80
|
-
color: @c-secondary-dark;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
&:hover {
|
|
84
|
-
color: @c-primary;
|
|
85
|
-
background-color: @c-light-bg;
|
|
86
|
-
|
|
87
|
-
[data-prefers-color=dark] & {
|
|
88
|
-
color: @c-primary-dark;
|
|
89
|
-
background-color: @c-light-bg-dark;
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
span:first-child:not(.@{prefix}-search-highlight) {
|
|
95
|
-
position: relative;
|
|
96
|
-
display: inline-block;
|
|
97
|
-
max-width: 50%;
|
|
98
|
-
padding-right: 26px;
|
|
99
|
-
vertical-align: bottom;
|
|
100
|
-
overflow: hidden;
|
|
101
|
-
text-overflow: ellipsis;
|
|
102
|
-
opacity: 0.8;
|
|
103
|
-
|
|
104
|
-
&::after {
|
|
105
|
-
content: '>';
|
|
106
|
-
position: absolute;
|
|
107
|
-
top: 50%;
|
|
108
|
-
right: 6px;
|
|
109
|
-
opacity: 0.6;
|
|
110
|
-
transform: translateY(-54%);
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
&-empty {
|
|
117
|
-
margin: 6px 0;
|
|
118
|
-
opacity: 0.6;
|
|
119
|
-
fill: @c-text;
|
|
120
|
-
[data-prefers-color=dark] & {
|
|
121
|
-
fill: @c-text-dark;
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
&-highlight {
|
|
126
|
-
padding: 2px 0;
|
|
127
|
-
color: #736b2d;
|
|
128
|
-
vertical-align: bottom;
|
|
129
|
-
background: #fff9cb;
|
|
130
|
-
|
|
131
|
-
[data-prefers-color=dark] & {
|
|
132
|
-
color: @c-text;
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
@media only screen and (max-width: 1024px) {
|
|
137
|
-
margin-right: -14px;
|
|
138
|
-
|
|
139
|
-
> input:not(:focus) {
|
|
140
|
-
color: transparent;
|
|
141
|
-
width: 32px;
|
|
142
|
-
padding-right: 0;
|
|
143
|
-
box-shadow: none;
|
|
144
|
-
cursor: pointer;
|
|
145
|
-
background-position: right 8px center;
|
|
146
|
-
|
|
147
|
-
+ ul {
|
|
148
|
-
transition: 0.1s visibility;
|
|
149
|
-
visibility: hidden;
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
@media @mobile {
|
|
155
|
-
position: absolute;
|
|
156
|
-
top: 9px;
|
|
157
|
-
right: 24px;
|
|
158
|
-
display: block !important;
|
|
159
|
-
|
|
160
|
-
> ul {
|
|
161
|
-
right: 0;
|
|
162
|
-
left: auto;
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { FC } from 'react';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import './SideMenu.less';
|
|
4
|
-
interface INavbarProps {
|
|
5
|
-
mobileMenuCollapsed: boolean;
|
|
6
|
-
location: any;
|
|
7
|
-
darkPrefix?: React.ReactNode;
|
|
8
|
-
}
|
|
9
|
-
declare const SideMenu: FC<INavbarProps>;
|
|
10
|
-
export default SideMenu;
|