@antv/dumi-theme-antv 0.2.1 → 0.3.0-beta.1
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 +14 -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 +7 -0
- package/dist/plugin/examples.js +83 -0
- package/dist/plugin/index.d.ts +3 -0
- package/dist/plugin/index.js +103 -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 +137 -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 -277
- 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 -226
- 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,406 +0,0 @@
|
|
|
1
|
-
@import (reference) '../style/variables.less';
|
|
2
|
-
|
|
3
|
-
.@{prefix}-previewer {
|
|
4
|
-
background-color: #fff;
|
|
5
|
-
border: 1px solid @c-border;
|
|
6
|
-
border-radius: 1px;
|
|
7
|
-
|
|
8
|
-
[data-prefers-color=dark] & {
|
|
9
|
-
background-color: @c-bg-dark;
|
|
10
|
-
border-color: @c-border-dark;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
&[data-debug] {
|
|
14
|
-
margin-top: 32px;
|
|
15
|
-
border-color: #ffcb00;
|
|
16
|
-
|
|
17
|
-
&::before {
|
|
18
|
-
content: 'DEV ONLY';
|
|
19
|
-
float: left;
|
|
20
|
-
margin-left: -1px;
|
|
21
|
-
margin-top: -18px;
|
|
22
|
-
padding: 3px 6px;
|
|
23
|
-
font-size: 12px;
|
|
24
|
-
line-height: 1;
|
|
25
|
-
background-color: #ffcb00;
|
|
26
|
-
color: #735600;
|
|
27
|
-
text-shadow: 0.5px 0.5px 0 rgba(255, 255, 255, 0.5);
|
|
28
|
-
border-top-left-radius: 1px;
|
|
29
|
-
border-top-right-radius: 1px;
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
&[data-iframe] {
|
|
34
|
-
.@{prefix}-previewer-browser-nav {
|
|
35
|
-
padding: 2px 6px;
|
|
36
|
-
background-color: @c-border;
|
|
37
|
-
|
|
38
|
-
&::before {
|
|
39
|
-
@s-btn: 12px;
|
|
40
|
-
@s-btn-gap: 8px;
|
|
41
|
-
|
|
42
|
-
content: '';
|
|
43
|
-
display: inline-block;
|
|
44
|
-
width: @s-btn;
|
|
45
|
-
height: @s-btn;
|
|
46
|
-
border-radius: 50%;
|
|
47
|
-
background-color: #fd6458;
|
|
48
|
-
box-shadow: (@s-btn + @s-btn-gap) 0 0 #ffbf2b, (@s-btn + @s-btn-gap) * 2 0 0 #24cc3d;
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
.@{prefix}-previewer-demo > iframe {
|
|
53
|
-
border: 0;
|
|
54
|
-
width: 100%;
|
|
55
|
-
height: 300px;
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
+ .@{prefix}-previewer {
|
|
60
|
-
margin-top: 32px;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
&-demo {
|
|
64
|
-
padding: 40px 24px;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
&-target {
|
|
68
|
-
border-color: fade(@c-primary, 50%);
|
|
69
|
-
box-shadow: 0 0 0 5px fade(@c-primary, 5%);
|
|
70
|
-
|
|
71
|
-
[data-prefers-color=dark] & {
|
|
72
|
-
box-shadow: 0 0 0 5px fade(@c-primary, 30%);
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
&-desc {
|
|
77
|
-
> div:last-child {
|
|
78
|
-
padding: 1.2em 1em 1em;
|
|
79
|
-
color: @c-text;
|
|
80
|
-
border-top: 1px solid @c-border;
|
|
81
|
-
|
|
82
|
-
[data-prefers-color=dark] & {
|
|
83
|
-
border-color: @c-border-dark;
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
.markdown > p:first-child {
|
|
88
|
-
margin-top: 0;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
.markdown > p:last-child {
|
|
92
|
-
margin-bottom: 0;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
&[data-title] {
|
|
96
|
-
position: relative;
|
|
97
|
-
|
|
98
|
-
> a:first-child {
|
|
99
|
-
position: absolute;
|
|
100
|
-
top: 0;
|
|
101
|
-
left: 1em;
|
|
102
|
-
margin-left: -4px;
|
|
103
|
-
padding: 0 4px;
|
|
104
|
-
color: @c-heading;
|
|
105
|
-
font-size: inherit;
|
|
106
|
-
font-weight: 500;
|
|
107
|
-
background: linear-gradient(to top, rgba(255, 255, 255, 1), rgba(255, 255, 255, 1) 50%, rgba(255, 255, 255, 0)) 100%;
|
|
108
|
-
transform: translateY(-50%);
|
|
109
|
-
pointer-events: auto;
|
|
110
|
-
cursor: pointer;
|
|
111
|
-
|
|
112
|
-
[data-prefers-color=dark] & {
|
|
113
|
-
color: @c-heading-dark;
|
|
114
|
-
background: linear-gradient(to top, @c-bg-dark, @c-bg-dark 50%, rgba(255, 255, 255, 0)) 100%;
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
&:empty {
|
|
119
|
-
padding-top: 0;
|
|
120
|
-
|
|
121
|
-
// modify action area style when only has title field
|
|
122
|
-
+ .@{prefix}-previewer-actions {
|
|
123
|
-
height: 46px;
|
|
124
|
-
border-top-style: solid;
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
&-actions {
|
|
131
|
-
display: flex;
|
|
132
|
-
height: 40px;
|
|
133
|
-
padding: 0 1em;
|
|
134
|
-
align-items: center;
|
|
135
|
-
border-top: 1px dashed @c-border;
|
|
136
|
-
|
|
137
|
-
[data-prefers-color=dark] & {
|
|
138
|
-
border-color: @c-border-dark;
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
> a:not(:last-child),
|
|
142
|
-
> button:not(:last-child) {
|
|
143
|
-
margin-right: 8px;
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
> a {
|
|
147
|
-
display: flex;
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
button {
|
|
151
|
-
position: relative;
|
|
152
|
-
display: inline-block;
|
|
153
|
-
width: 16px;
|
|
154
|
-
height: 16px;
|
|
155
|
-
padding: 0;
|
|
156
|
-
border: 0;
|
|
157
|
-
box-sizing: border-box;
|
|
158
|
-
cursor: pointer;
|
|
159
|
-
opacity: 0.6;
|
|
160
|
-
outline: none;
|
|
161
|
-
transition: opacity 0.2s, background 0.2s;
|
|
162
|
-
|
|
163
|
-
[data-prefers-color=dark] & {
|
|
164
|
-
opacity: 1;
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
// expand click area
|
|
168
|
-
&::after {
|
|
169
|
-
content: '';
|
|
170
|
-
position: absolute;
|
|
171
|
-
top: -8px;
|
|
172
|
-
left: -8px;
|
|
173
|
-
right: -8px;
|
|
174
|
-
bottom: -8px;
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
&:hover {
|
|
178
|
-
opacity: 0.8;
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
&:active {
|
|
182
|
-
opacity: 0.9;
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
&:disabled {
|
|
186
|
-
opacity: 0.2;
|
|
187
|
-
cursor: not-allowed;
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
&[role='codesandbox'] {
|
|
191
|
-
background-position: -18px 0;
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
&[role='codepen'] {
|
|
195
|
-
background-position: -36px 0;
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
&[role='source'] {
|
|
199
|
-
background-position: -72px 0;
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
&[role='change-jsx'] {
|
|
203
|
-
background-position: -90px 0;
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
&[role='change-tsx'] {
|
|
207
|
-
background-position: -108px 0;
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
&[role='open-demo'] {
|
|
211
|
-
background-position: -126px 0;
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
&[role='motions'] {
|
|
215
|
-
background-position: -162px 0;
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
&[role='sketch-component'] {
|
|
219
|
-
background-position: -182px 0;
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
&[role='sketch-group'] {
|
|
223
|
-
background-position: -200px 0;
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
&[role='copy'][data-status='ready'] {
|
|
227
|
-
background-position: -54px 0;
|
|
228
|
-
}
|
|
229
|
-
|
|
230
|
-
&[role='copy'][data-status='copied'] {
|
|
231
|
-
pointer-events: none;
|
|
232
|
-
background-position: -54px -16px;
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
&[role='refresh'] {
|
|
236
|
-
background-position-x: -144px;
|
|
237
|
-
}
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
// split action buttons by a blank node
|
|
241
|
-
> span {
|
|
242
|
-
flex: 1;
|
|
243
|
-
display: inline-block;
|
|
244
|
-
}
|
|
245
|
-
}
|
|
246
|
-
|
|
247
|
-
&-source {
|
|
248
|
-
border-top: 1px dashed @c-border;
|
|
249
|
-
|
|
250
|
-
[data-prefers-color=dark] & {
|
|
251
|
-
border-color: @c-border-dark;
|
|
252
|
-
}
|
|
253
|
-
|
|
254
|
-
&-tab {
|
|
255
|
-
border-top: 1px dashed @c-border;
|
|
256
|
-
|
|
257
|
-
[data-prefers-color=dark] & {
|
|
258
|
-
border-color: @c-border-dark;
|
|
259
|
-
}
|
|
260
|
-
|
|
261
|
-
.@{prefix}-tabs-tab-btn {
|
|
262
|
-
position: relative;
|
|
263
|
-
padding-left: 32px;
|
|
264
|
-
|
|
265
|
-
&::before,
|
|
266
|
-
&::after {
|
|
267
|
-
content: '';
|
|
268
|
-
position: absolute;
|
|
269
|
-
margin-right: 4px;
|
|
270
|
-
display: inline-block;
|
|
271
|
-
box-sizing: border-box;
|
|
272
|
-
}
|
|
273
|
-
|
|
274
|
-
&::before {
|
|
275
|
-
left: 16px;
|
|
276
|
-
top: 50%;
|
|
277
|
-
margin-top: -6px;
|
|
278
|
-
width: 10px;
|
|
279
|
-
height: 12px;
|
|
280
|
-
border: 1px solid @c-secondary;
|
|
281
|
-
}
|
|
282
|
-
|
|
283
|
-
&::after {
|
|
284
|
-
top: 50%;
|
|
285
|
-
left: 23px;
|
|
286
|
-
margin-top: -7px;
|
|
287
|
-
width: 4px;
|
|
288
|
-
height: 4px;
|
|
289
|
-
background: #fff;
|
|
290
|
-
border-bottom: 1px solid @c-secondary;
|
|
291
|
-
transform: rotate(45deg);
|
|
292
|
-
[data-prefers-color=dark] & {
|
|
293
|
-
background: @c-bg-dark;
|
|
294
|
-
}
|
|
295
|
-
}
|
|
296
|
-
}
|
|
297
|
-
}
|
|
298
|
-
}
|
|
299
|
-
}
|
|
300
|
-
|
|
301
|
-
.@{prefix}-tabs {
|
|
302
|
-
overflow: hidden;
|
|
303
|
-
|
|
304
|
-
&.@{prefix}-tabs-top {
|
|
305
|
-
flex-direction: column;
|
|
306
|
-
|
|
307
|
-
.@{prefix}-tabs-ink-bar {
|
|
308
|
-
bottom: 0;
|
|
309
|
-
}
|
|
310
|
-
}
|
|
311
|
-
|
|
312
|
-
&-nav {
|
|
313
|
-
display: flex;
|
|
314
|
-
|
|
315
|
-
&-wrap {
|
|
316
|
-
display: flex;
|
|
317
|
-
white-space: nowrap;
|
|
318
|
-
overflow: hidden;
|
|
319
|
-
|
|
320
|
-
&&-ping-left {
|
|
321
|
-
box-shadow: 5px 0 5px -5px rgba(0, 0, 0, 0.1) inset;
|
|
322
|
-
}
|
|
323
|
-
|
|
324
|
-
&&-ping-right ~ * > .@{prefix}-tabs-nav-more {
|
|
325
|
-
box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
|
|
326
|
-
}
|
|
327
|
-
}
|
|
328
|
-
|
|
329
|
-
&-list {
|
|
330
|
-
position: relative;
|
|
331
|
-
display: flex;
|
|
332
|
-
transition: transform 0.2s;
|
|
333
|
-
}
|
|
334
|
-
|
|
335
|
-
&-more {
|
|
336
|
-
height: 100%;
|
|
337
|
-
cursor: pointer;
|
|
338
|
-
background: none;
|
|
339
|
-
border: 0;
|
|
340
|
-
transition: box-shadow 0.2s;
|
|
341
|
-
}
|
|
342
|
-
}
|
|
343
|
-
|
|
344
|
-
&-tab {
|
|
345
|
-
display: flex;
|
|
346
|
-
|
|
347
|
-
&-btn {
|
|
348
|
-
padding: 0 16px;
|
|
349
|
-
font-size: 14px;
|
|
350
|
-
line-height: 36px;
|
|
351
|
-
border: 0;
|
|
352
|
-
outline: none;
|
|
353
|
-
background: transparent;
|
|
354
|
-
box-sizing: border-box;
|
|
355
|
-
cursor: pointer;
|
|
356
|
-
|
|
357
|
-
&:hover {
|
|
358
|
-
color: @c-primary;
|
|
359
|
-
}
|
|
360
|
-
}
|
|
361
|
-
}
|
|
362
|
-
|
|
363
|
-
&-ink-bar {
|
|
364
|
-
position: absolute;
|
|
365
|
-
height: 2px;
|
|
366
|
-
background: @c-primary;
|
|
367
|
-
transition: left 0.2s, width 0.2s;
|
|
368
|
-
pointer-events: none;
|
|
369
|
-
|
|
370
|
-
[data-prefers-color=dark] & {
|
|
371
|
-
background: @c-primary-dark;
|
|
372
|
-
}
|
|
373
|
-
}
|
|
374
|
-
|
|
375
|
-
&-dropdown {
|
|
376
|
-
position: absolute;
|
|
377
|
-
background: #fff;
|
|
378
|
-
border: 1px solid @c-border;
|
|
379
|
-
max-height: 200px;
|
|
380
|
-
overflow: auto;
|
|
381
|
-
|
|
382
|
-
> ul {
|
|
383
|
-
list-style: none;
|
|
384
|
-
margin: 0;
|
|
385
|
-
padding: 0;
|
|
386
|
-
|
|
387
|
-
> li {
|
|
388
|
-
padding: 4px 12px;
|
|
389
|
-
font-size: 14px;
|
|
390
|
-
cursor: pointer;
|
|
391
|
-
|
|
392
|
-
&:hover {
|
|
393
|
-
color: @c-primary;
|
|
394
|
-
}
|
|
395
|
-
|
|
396
|
-
&:not(:last-child) {
|
|
397
|
-
border-bottom: 1px dashed @c-border;
|
|
398
|
-
}
|
|
399
|
-
}
|
|
400
|
-
}
|
|
401
|
-
|
|
402
|
-
&-hidden {
|
|
403
|
-
display: none;
|
|
404
|
-
}
|
|
405
|
-
}
|
|
406
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { Language } from 'prism-react-renderer';
|
|
2
|
-
import 'prismjs/themes/prism.css';
|
|
3
|
-
import './SourceCode.less';
|
|
4
|
-
export interface ICodeBlockProps {
|
|
5
|
-
code: string;
|
|
6
|
-
lang: Language;
|
|
7
|
-
showCopy?: boolean;
|
|
8
|
-
}
|
|
9
|
-
declare const _default: ({ code, lang, showCopy }: ICodeBlockProps) => JSX.Element;
|
|
10
|
-
export default _default;
|
|
@@ -1,70 +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 { useCopy } from 'dumi/theme';
|
|
14
|
-
import Highlight, { defaultProps } from 'prism-react-renderer';
|
|
15
|
-
import 'prismjs/themes/prism.css';
|
|
16
|
-
import React from 'react';
|
|
17
|
-
import './SourceCode.less';
|
|
18
|
-
/**
|
|
19
|
-
* define DSL which can be highlighted as similar language
|
|
20
|
-
*/
|
|
21
|
-
|
|
22
|
-
var SIMILAR_DSL = {
|
|
23
|
-
acss: 'css',
|
|
24
|
-
axml: 'xml'
|
|
25
|
-
};
|
|
26
|
-
export default (function (_ref) {
|
|
27
|
-
var code = _ref.code,
|
|
28
|
-
lang = _ref.lang,
|
|
29
|
-
_ref$showCopy = _ref.showCopy,
|
|
30
|
-
showCopy = _ref$showCopy === void 0 ? true : _ref$showCopy;
|
|
31
|
-
|
|
32
|
-
var _useCopy = useCopy(),
|
|
33
|
-
_useCopy2 = _slicedToArray(_useCopy, 2),
|
|
34
|
-
copyCode = _useCopy2[0],
|
|
35
|
-
copyStatus = _useCopy2[1];
|
|
36
|
-
|
|
37
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
38
|
-
className: "__dumi-default-code-block"
|
|
39
|
-
}, /*#__PURE__*/React.createElement(Highlight, Object.assign({}, defaultProps, {
|
|
40
|
-
code: code,
|
|
41
|
-
language: SIMILAR_DSL[lang] || lang,
|
|
42
|
-
theme: undefined
|
|
43
|
-
}), function (_ref2) {
|
|
44
|
-
var className = _ref2.className,
|
|
45
|
-
style = _ref2.style,
|
|
46
|
-
tokens = _ref2.tokens,
|
|
47
|
-
getLineProps = _ref2.getLineProps,
|
|
48
|
-
getTokenProps = _ref2.getTokenProps;
|
|
49
|
-
return /*#__PURE__*/React.createElement("pre", {
|
|
50
|
-
className: className,
|
|
51
|
-
style: style
|
|
52
|
-
}, showCopy && /*#__PURE__*/React.createElement("button", {
|
|
53
|
-
className: "__dumi-default-icon __dumi-default-code-block-copy-btn",
|
|
54
|
-
"data-status": copyStatus,
|
|
55
|
-
onClick: function onClick() {
|
|
56
|
-
return copyCode(code);
|
|
57
|
-
}
|
|
58
|
-
}), tokens.map(function (line, i) {
|
|
59
|
-
return /*#__PURE__*/React.createElement("div", Object.assign({}, getLineProps({
|
|
60
|
-
line: line,
|
|
61
|
-
key: i
|
|
62
|
-
})), line.map(function (token, key) {
|
|
63
|
-
return /*#__PURE__*/React.createElement("span", Object.assign({}, getTokenProps({
|
|
64
|
-
token: token,
|
|
65
|
-
key: key
|
|
66
|
-
})));
|
|
67
|
-
}));
|
|
68
|
-
}));
|
|
69
|
-
}));
|
|
70
|
-
});
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
@import (reference) '../style/variables.less';
|
|
2
|
-
|
|
3
|
-
.@{prefix}-code-block {
|
|
4
|
-
position: relative;
|
|
5
|
-
font-size: 14px;
|
|
6
|
-
background-color: @c-light-bg;
|
|
7
|
-
|
|
8
|
-
[data-prefers-color=dark] & {
|
|
9
|
-
color: @c-text-dark;
|
|
10
|
-
background: #262626;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
& + &,
|
|
14
|
-
& + table {
|
|
15
|
-
margin-top: 16px;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
> pre[class*='language-'] {
|
|
19
|
-
margin: 0;
|
|
20
|
-
background: transparent;
|
|
21
|
-
|
|
22
|
-
.token-line:not(:last-child) .plain:empty {
|
|
23
|
-
display: inline-block;
|
|
24
|
-
min-height: 1em;
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
&-copy-btn {
|
|
29
|
-
position: absolute;
|
|
30
|
-
top: 1.1em;
|
|
31
|
-
right: 1em;
|
|
32
|
-
display: inline-block;
|
|
33
|
-
width: 16px;
|
|
34
|
-
height: 16px;
|
|
35
|
-
padding: 0;
|
|
36
|
-
border: 0;
|
|
37
|
-
outline: none;
|
|
38
|
-
cursor: pointer;
|
|
39
|
-
opacity: 0.6;
|
|
40
|
-
transition: opacity 0.2s, background 0.2s;
|
|
41
|
-
|
|
42
|
-
&:hover {
|
|
43
|
-
opacity: 0.8;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
&:active {
|
|
47
|
-
opacity: 0.9;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
&[data-status='ready'] {
|
|
51
|
-
background-position: -54px 0;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
&[data-status='copied'] {
|
|
55
|
-
opacity: 1;
|
|
56
|
-
pointer-events: none;
|
|
57
|
-
background-position: -54px -16px;
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
&:not(:hover) &-copy-btn {
|
|
62
|
-
visibility: hidden;
|
|
63
|
-
opacity: 0;
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
code[class*="language-"], pre[class*="language-"] {
|
|
68
|
-
&::selection, & ::selection{
|
|
69
|
-
color: inherit;
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
[data-prefers-color=dark] {
|
|
74
|
-
code[class*="language-"], pre[class*="language-"] {
|
|
75
|
-
color: @c-text-dark;
|
|
76
|
-
text-shadow: 0 1px #000;
|
|
77
|
-
|
|
78
|
-
&::selection, & ::selection{
|
|
79
|
-
background-color: #364a63;
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
.token.operator, .token.entity, .token.url, .language-css .token.string, .style .token.string {
|
|
83
|
-
background: transparent;
|
|
84
|
-
}
|
|
85
|
-
.token.property, .token.tag, .token.constant, .token.symbol, .token.deleted {
|
|
86
|
-
color: #f92672;
|
|
87
|
-
}
|
|
88
|
-
.token.selector, .token.attr-name, .token.string, .token.char, .token.builtin, .token.inserted {
|
|
89
|
-
color: #a6e22e;
|
|
90
|
-
}
|
|
91
|
-
.token.atrule, .token.attr-value, .token.keyword {
|
|
92
|
-
color: #e6db74;
|
|
93
|
-
}
|
|
94
|
-
.token.punctuation {
|
|
95
|
-
color: @c-text-dark;
|
|
96
|
-
}
|
|
97
|
-
.token.keyword {
|
|
98
|
-
color: #66d9ef;
|
|
99
|
-
}
|
|
100
|
-
.token.boolean, .token.number {
|
|
101
|
-
color: #ae81ff;
|
|
102
|
-
}
|
|
103
|
-
}
|
package/es/builtins/Table.d.ts
DELETED
package/es/builtins/Table.less
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
.__dumi-default-table {
|
|
2
|
-
margin: 16px 0 32px;
|
|
3
|
-
transform: translate(0, 0);
|
|
4
|
-
|
|
5
|
-
&-content {
|
|
6
|
-
overflow: auto;
|
|
7
|
-
|
|
8
|
-
&::before,
|
|
9
|
-
&::after {
|
|
10
|
-
content: '';
|
|
11
|
-
display: block;
|
|
12
|
-
position: fixed;
|
|
13
|
-
z-index: 1;
|
|
14
|
-
top: 0;
|
|
15
|
-
bottom: 0;
|
|
16
|
-
width: 6px;
|
|
17
|
-
pointer-events: none;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
&[data-left-folded]::before {
|
|
21
|
-
left: 0;
|
|
22
|
-
background-image: linear-gradient(to right, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0));
|
|
23
|
-
|
|
24
|
-
[data-prefers-color=dark] & {
|
|
25
|
-
background-image: linear-gradient(to right, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
&[data-right-folded]::after {
|
|
30
|
-
right: 0;
|
|
31
|
-
background-image: linear-gradient(to left, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0));
|
|
32
|
-
|
|
33
|
-
[data-prefers-color=dark] & {
|
|
34
|
-
background-image: linear-gradient(to left, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
> table > thead > tr > th,
|
|
39
|
-
> table > tr > th {
|
|
40
|
-
white-space: nowrap;
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
}
|
package/es/builtins/Tree.d.ts
DELETED