dumi 2.3.0-beta.8 → 2.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/compiled/crates/swc_plugin_react_demo.wasm +0 -0
- package/dist/assetParsers/block.d.ts +1 -0
- package/dist/assetParsers/block.js +7 -3
- package/dist/client/pages/Demo/index.js +12 -6
- package/dist/client/theme-api/DumiDemo/index.js +6 -3
- package/dist/client/theme-api/types.d.ts +14 -0
- package/dist/client/theme-api/useLiveDemo.js +94 -72
- package/dist/client/theme-api/useRenderer.d.ts +10 -3
- package/dist/client/theme-api/useRenderer.js +72 -39
- package/dist/client/theme-api/utils.d.ts +4 -3
- package/dist/client/theme-api/utils.js +36 -0
- package/dist/features/compile/index.js +3 -0
- package/dist/features/locales.js +4 -0
- package/dist/features/theme/index.js +22 -6
- package/dist/loaders/markdown/index.js +12 -3
- package/dist/loaders/markdown/transformer/index.d.ts +4 -1
- package/dist/loaders/markdown/transformer/rehypeDemo.d.ts +1 -0
- package/dist/loaders/markdown/transformer/rehypeDemo.js +29 -10
- package/dist/loaders/markdown/transformer/rehypeEnhancedTag.js +12 -2
- package/dist/loaders/markdown/transformer/remarkContainer.js +37 -6
- package/dist/techStacks/utils.d.ts +22 -0
- package/dist/techStacks/utils.js +5 -0
- package/dist/types.d.ts +8 -1
- package/package.json +28 -25
- package/tech-stack-utils.d.ts +4 -2
- package/theme-default/builtins/API/index.d.ts +2 -1
- package/theme-default/builtins/API/index.js +173 -43
- package/theme-default/builtins/API/index.less +47 -0
- package/theme-default/builtins/CodeGroup/index.d.ts +3 -0
- package/theme-default/builtins/CodeGroup/index.js +29 -0
- package/theme-default/builtins/Previewer/index.js +1 -1
- package/theme-default/builtins/SourceCode/index.d.ts +3 -2
- package/theme-default/locales/en-US.json +4 -0
- package/theme-default/locales/zh-CN.json +4 -0
- package/theme-default/slots/ContentFooter/index.js +4 -2
- package/theme-default/slots/ContentFooter/index.less +5 -0
- package/theme-default/slots/PreviewerActions/index.d.ts +6 -1
- package/theme-default/slots/PreviewerActions/index.js +30 -13
- package/theme-default/slots/PreviewerActions/index.less +30 -140
- package/theme-default/slots/Tabs/index.d.ts +6 -0
- package/theme-default/slots/Tabs/index.js +11 -0
- package/theme-default/slots/Tabs/index.less +151 -0
|
@@ -64,9 +64,11 @@ var ContentFooter = function ContentFooter() {
|
|
|
64
64
|
}, [showLastUpdated]);
|
|
65
65
|
return /*#__PURE__*/React.createElement("footer", {
|
|
66
66
|
className: "dumi-default-content-footer"
|
|
67
|
-
}, /*#__PURE__*/React.createElement("dl", null, showLastUpdated && /*#__PURE__*/React.createElement("dd", null, /*#__PURE__*/React.createElement(IconClock, null), /*#__PURE__*/React.createElement(
|
|
67
|
+
}, /*#__PURE__*/React.createElement("dl", null, showLastUpdated && /*#__PURE__*/React.createElement("dd", null, /*#__PURE__*/React.createElement(IconClock, null), /*#__PURE__*/React.createElement("span", {
|
|
68
|
+
className: "dumi-default-mobile-hidden"
|
|
69
|
+
}, /*#__PURE__*/React.createElement(FormattedMessage, {
|
|
68
70
|
id: "content.footer.last.updated"
|
|
69
|
-
}), /*#__PURE__*/React.createElement("time", {
|
|
71
|
+
})), /*#__PURE__*/React.createElement("time", {
|
|
70
72
|
dateTime: isoLastUpdated
|
|
71
73
|
}, lastUpdated)), showEditLink && /*#__PURE__*/React.createElement("dd", null, /*#__PURE__*/React.createElement("a", {
|
|
72
74
|
target: "_blank",
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import { type IPreviewerProps } from 'dumi';
|
|
2
|
-
import {
|
|
2
|
+
import type { TooltipProps as RcTooltipProps } from 'rc-tooltip/lib/Tooltip';
|
|
3
|
+
import React, { type FC, type ReactNode } from 'react';
|
|
3
4
|
import './index.less';
|
|
5
|
+
export interface TooltipProps extends Omit<RcTooltipProps, 'overlay'> {
|
|
6
|
+
placement?: 'top' | 'bottom';
|
|
7
|
+
title?: React.ReactNode;
|
|
8
|
+
}
|
|
4
9
|
export interface IPreviewerActionsProps extends IPreviewerProps {
|
|
5
10
|
/**
|
|
6
11
|
* disabled actions
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
+
var _excluded = ["title", "placement"];
|
|
2
3
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
3
4
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
4
5
|
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
@@ -8,6 +9,10 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
|
8
9
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
9
10
|
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
10
11
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
12
|
+
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); }
|
|
13
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
14
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
15
|
+
import Tabs from "../Tabs";
|
|
11
16
|
import { ReactComponent as IconCheck } from '@ant-design/icons-svg/inline-svg/outlined/check.svg';
|
|
12
17
|
import { ReactComponent as IconCodeSandbox } from '@ant-design/icons-svg/inline-svg/outlined/code-sandbox.svg';
|
|
13
18
|
import { ReactComponent as IconEdit } from '@ant-design/icons-svg/inline-svg/outlined/edit.svg';
|
|
@@ -19,9 +24,21 @@ import { getSketchJSON, openCodeSandbox, openStackBlitz, useDemo, useIntl } from
|
|
|
19
24
|
import SourceCode from 'dumi/theme/builtins/SourceCode';
|
|
20
25
|
import PreviewerActionsExtra from 'dumi/theme/slots/PreviewerActionsExtra';
|
|
21
26
|
import SourceCodeEditor from 'dumi/theme/slots/SourceCodeEditor';
|
|
22
|
-
import
|
|
27
|
+
import RcTooltip from 'rc-tooltip';
|
|
23
28
|
import React, { useRef, useState } from 'react';
|
|
24
29
|
import "./index.less";
|
|
30
|
+
var Tooltip = function Tooltip(props) {
|
|
31
|
+
var title = props.title,
|
|
32
|
+
_props$placement = props.placement,
|
|
33
|
+
placement = _props$placement === void 0 ? 'top' : _props$placement,
|
|
34
|
+
rest = _objectWithoutProperties(props, _excluded);
|
|
35
|
+
return /*#__PURE__*/React.createElement(RcTooltip, _extends({
|
|
36
|
+
prefixCls: "dumi-theme-default-tooltip",
|
|
37
|
+
placement: placement
|
|
38
|
+
}, rest, {
|
|
39
|
+
overlay: title
|
|
40
|
+
}));
|
|
41
|
+
};
|
|
25
42
|
var IconCode = function IconCode() {
|
|
26
43
|
return /*#__PURE__*/React.createElement("svg", {
|
|
27
44
|
viewBox: "0 0 200 117"
|
|
@@ -163,8 +180,6 @@ var PreviewerActions = function PreviewerActions(props) {
|
|
|
163
180
|
className: "dumi-default-previewer-sources"
|
|
164
181
|
}, /*#__PURE__*/React.createElement(Tabs, {
|
|
165
182
|
className: classNames('dumi-default-previewer-tabs', isSingleFile && 'dumi-default-previewer-tabs-single'),
|
|
166
|
-
prefixCls: "dumi-default-tabs",
|
|
167
|
-
moreIcon: "\xB7\xB7\xB7",
|
|
168
183
|
defaultActiveKey: String(activeKey),
|
|
169
184
|
onChange: function onChange(key) {
|
|
170
185
|
return setActiveKey(Number(key));
|
|
@@ -188,26 +203,28 @@ var PreviewerActions = function PreviewerActions(props) {
|
|
|
188
203
|
source: _defineProperty({}, files[i][0], code)
|
|
189
204
|
});
|
|
190
205
|
},
|
|
191
|
-
extra: /*#__PURE__*/React.createElement(
|
|
192
|
-
|
|
193
|
-
className: "dumi-default-previewer-editor-tip-btn",
|
|
194
|
-
"data-dumi-tooltip": intl.formatMessage({
|
|
206
|
+
extra: /*#__PURE__*/React.createElement(Tooltip, {
|
|
207
|
+
title: intl.formatMessage({
|
|
195
208
|
id: 'previewer.actions.code.editable'
|
|
196
209
|
})
|
|
197
|
-
}, /*#__PURE__*/React.createElement(
|
|
210
|
+
}, /*#__PURE__*/React.createElement("button", {
|
|
211
|
+
type: "button",
|
|
212
|
+
className: "dumi-default-previewer-editor-tip-btn"
|
|
213
|
+
}, /*#__PURE__*/React.createElement(IconEdit, null)))
|
|
198
214
|
}) : /*#__PURE__*/React.createElement(SourceCode, {
|
|
199
215
|
lang: lang,
|
|
200
216
|
extra:
|
|
201
217
|
// only show readonly tip for non-entry files
|
|
202
218
|
// because readonly entry file means live compile is not available for this demo tech stack
|
|
203
|
-
i !== 0 && /*#__PURE__*/React.createElement(
|
|
219
|
+
i !== 0 && /*#__PURE__*/React.createElement(Tooltip, {
|
|
220
|
+
title: intl.formatMessage({
|
|
221
|
+
id: 'previewer.actions.code.readonly'
|
|
222
|
+
})
|
|
223
|
+
}, /*#__PURE__*/React.createElement("button", {
|
|
204
224
|
type: "button",
|
|
205
225
|
className: "dumi-default-previewer-editor-tip-btn",
|
|
206
|
-
"data-dumi-tooltip": intl.formatMessage({
|
|
207
|
-
id: 'previewer.actions.code.readonly'
|
|
208
|
-
}),
|
|
209
226
|
"data-readonly": true
|
|
210
|
-
}, /*#__PURE__*/React.createElement("span", null), /*#__PURE__*/React.createElement(IconEdit, null))
|
|
227
|
+
}, /*#__PURE__*/React.createElement("span", null), /*#__PURE__*/React.createElement(IconEdit, null)))
|
|
211
228
|
}, files[activeKey][1].value.trim())
|
|
212
229
|
};
|
|
213
230
|
})
|
|
@@ -112,159 +112,49 @@
|
|
|
112
112
|
}
|
|
113
113
|
}
|
|
114
114
|
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
115
|
+
.dumi-theme-default-tooltip {
|
|
116
|
+
position: fixed;
|
|
117
|
+
min-width: 30px;
|
|
118
|
+
margin-bottom: 8px;
|
|
119
|
+
box-sizing: border-box;
|
|
118
120
|
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
}
|
|
121
|
+
&-hidden {
|
|
122
|
+
display: none;
|
|
122
123
|
}
|
|
123
124
|
|
|
124
|
-
&-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
padding: 0 12px;
|
|
128
|
-
|
|
129
|
-
&::after {
|
|
130
|
-
content: '';
|
|
131
|
-
position: absolute;
|
|
132
|
-
left: 0;
|
|
133
|
-
bottom: 0;
|
|
134
|
-
width: 100%;
|
|
135
|
-
height: 0;
|
|
136
|
-
border-bottom: 1px dashed @c-border-light;
|
|
137
|
-
|
|
138
|
-
@{dark-selector} & {
|
|
139
|
-
border-bottom-color: @c-border-less-dark;
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
&-wrap {
|
|
144
|
-
display: flex;
|
|
145
|
-
white-space: nowrap;
|
|
146
|
-
overflow: hidden;
|
|
147
|
-
|
|
148
|
-
&&-ping-left {
|
|
149
|
-
box-shadow: 5px 0 5px -5px rgba(0, 0, 0, 10%) inset;
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
&&-ping-right ~ * > .@{prefix}-tabs-nav-more {
|
|
153
|
-
box-shadow: 0 0 5px rgba(0, 0, 0, 10%);
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
&-list {
|
|
158
|
-
position: relative;
|
|
159
|
-
z-index: 1;
|
|
160
|
-
display: flex;
|
|
161
|
-
transition: transform 0.2s;
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
&-more {
|
|
165
|
-
height: 100%;
|
|
166
|
-
cursor: pointer;
|
|
167
|
-
background: none;
|
|
168
|
-
border: 0;
|
|
169
|
-
transition: box-shadow 0.2s;
|
|
170
|
-
}
|
|
125
|
+
&-arrow {
|
|
126
|
+
border: 4px solid transparent;
|
|
127
|
+
opacity: 0.7;
|
|
171
128
|
}
|
|
172
129
|
|
|
173
|
-
&-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
&-btn {
|
|
178
|
-
padding: 0;
|
|
179
|
-
color: @c-text-secondary;
|
|
180
|
-
font-size: 14px;
|
|
181
|
-
line-height: 36px;
|
|
182
|
-
border: 0;
|
|
183
|
-
outline: none;
|
|
184
|
-
background: transparent;
|
|
185
|
-
box-sizing: border-box;
|
|
186
|
-
cursor: pointer;
|
|
187
|
-
transition: all 0.2s;
|
|
188
|
-
|
|
189
|
-
@{dark-selector} & {
|
|
190
|
-
color: @c-text-secondary-dark;
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
&:hover {
|
|
194
|
-
color: @c-text;
|
|
195
|
-
|
|
196
|
-
@{dark-selector} & {
|
|
197
|
-
color: @c-text-dark;
|
|
198
|
-
}
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
&-active &-btn {
|
|
203
|
-
color: @c-text;
|
|
204
|
-
|
|
205
|
-
@{dark-selector} & {
|
|
206
|
-
color: @c-text-dark;
|
|
207
|
-
}
|
|
130
|
+
&-placement-top {
|
|
131
|
+
.dumi-theme-default-tooltip-arrow {
|
|
132
|
+
border-top-color: #000;
|
|
133
|
+
transform: translate(-50%, 100%);
|
|
208
134
|
}
|
|
209
135
|
}
|
|
210
136
|
|
|
211
|
-
&-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
transition: left 0.2s, width 0.2s;
|
|
216
|
-
pointer-events: none;
|
|
217
|
-
|
|
218
|
-
@{dark-selector} & {
|
|
219
|
-
background: @c-primary-dark;
|
|
137
|
+
&-bottom {
|
|
138
|
+
.dumi-theme-default-tooltip-arrow {
|
|
139
|
+
border-bottom-color: #000;
|
|
140
|
+
transform: translateY(-50%, -100%);
|
|
220
141
|
}
|
|
221
142
|
}
|
|
222
143
|
|
|
223
|
-
&-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
144
|
+
&-content {
|
|
145
|
+
padding: 5px 8px;
|
|
146
|
+
color: #fff;
|
|
147
|
+
font-size: 13px;
|
|
148
|
+
line-height: 1.1;
|
|
149
|
+
white-space: nowrap;
|
|
150
|
+
background-color: #000;
|
|
151
|
+
opacity: 0.7;
|
|
152
|
+
border-radius: 2px;
|
|
153
|
+
box-shadow: 0 4px 10px rgba(0, 0, 0, 10%);
|
|
154
|
+
box-sizing: border-box;
|
|
229
155
|
|
|
230
156
|
@{dark-selector} & {
|
|
231
|
-
|
|
157
|
+
background-color: #222;
|
|
232
158
|
}
|
|
233
|
-
|
|
234
|
-
> ul {
|
|
235
|
-
list-style: none;
|
|
236
|
-
margin: 0;
|
|
237
|
-
padding: 0;
|
|
238
|
-
|
|
239
|
-
> li {
|
|
240
|
-
padding: 4px 12px;
|
|
241
|
-
font-size: 14px;
|
|
242
|
-
cursor: pointer;
|
|
243
|
-
|
|
244
|
-
&:hover {
|
|
245
|
-
color: @c-primary;
|
|
246
|
-
|
|
247
|
-
@{dark-selector} & {
|
|
248
|
-
color: @c-primary-dark;
|
|
249
|
-
}
|
|
250
|
-
}
|
|
251
|
-
|
|
252
|
-
&:not(:last-child) {
|
|
253
|
-
border-bottom: 1px dashed @c-border;
|
|
254
|
-
|
|
255
|
-
@{dark-selector} & {
|
|
256
|
-
border-bottom-color: @c-border-dark;
|
|
257
|
-
}
|
|
258
|
-
}
|
|
259
|
-
}
|
|
260
|
-
}
|
|
261
|
-
|
|
262
|
-
&-hidden {
|
|
263
|
-
display: none;
|
|
264
|
-
}
|
|
265
|
-
}
|
|
266
|
-
|
|
267
|
-
&-tabpane-hidden {
|
|
268
|
-
display: none;
|
|
269
159
|
}
|
|
270
160
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
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
|
+
import InternalTabs from 'rc-tabs';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import "./index.less";
|
|
5
|
+
var Tabs = function Tabs(props) {
|
|
6
|
+
return /*#__PURE__*/React.createElement(InternalTabs, _extends({
|
|
7
|
+
prefixCls: "dumi-default-tabs",
|
|
8
|
+
moreIcon: "\xB7\xB7\xB7"
|
|
9
|
+
}, props));
|
|
10
|
+
};
|
|
11
|
+
export default Tabs;
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
@import (reference) '../../styles/variables.less';
|
|
2
|
+
|
|
3
|
+
.@{prefix}-tabs {
|
|
4
|
+
&-nav {
|
|
5
|
+
position: relative;
|
|
6
|
+
display: flex;
|
|
7
|
+
padding: 0 12px;
|
|
8
|
+
|
|
9
|
+
&::after {
|
|
10
|
+
content: '';
|
|
11
|
+
position: absolute;
|
|
12
|
+
left: 0;
|
|
13
|
+
bottom: 0;
|
|
14
|
+
width: 100%;
|
|
15
|
+
height: 0;
|
|
16
|
+
border-bottom: 1px dashed @c-border-light;
|
|
17
|
+
|
|
18
|
+
@{dark-selector} & {
|
|
19
|
+
border-bottom-color: @c-border-less-dark;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
&-wrap {
|
|
24
|
+
display: flex;
|
|
25
|
+
white-space: nowrap;
|
|
26
|
+
overflow: hidden;
|
|
27
|
+
|
|
28
|
+
&&-ping-left {
|
|
29
|
+
box-shadow: 5px 0 5px -5px rgba(0, 0, 0, 10%) inset;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
&&-ping-right ~ * > .@{prefix}-tabs-nav-more {
|
|
33
|
+
box-shadow: 0 0 5px rgba(0, 0, 0, 10%);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
&-list {
|
|
38
|
+
position: relative;
|
|
39
|
+
z-index: 1;
|
|
40
|
+
display: flex;
|
|
41
|
+
transition: transform 0.2s;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
&-more {
|
|
45
|
+
height: 100%;
|
|
46
|
+
cursor: pointer;
|
|
47
|
+
background: none;
|
|
48
|
+
border: 0;
|
|
49
|
+
transition: box-shadow 0.2s;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
&-tab {
|
|
54
|
+
display: flex;
|
|
55
|
+
margin: 0 12px;
|
|
56
|
+
|
|
57
|
+
&-btn {
|
|
58
|
+
padding: 0;
|
|
59
|
+
color: @c-text-secondary;
|
|
60
|
+
font-size: 14px;
|
|
61
|
+
line-height: 36px;
|
|
62
|
+
border: 0;
|
|
63
|
+
outline: none;
|
|
64
|
+
background: transparent;
|
|
65
|
+
box-sizing: border-box;
|
|
66
|
+
cursor: pointer;
|
|
67
|
+
transition: all 0.2s;
|
|
68
|
+
|
|
69
|
+
@{dark-selector} & {
|
|
70
|
+
color: @c-text-secondary-dark;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
&:hover {
|
|
74
|
+
color: @c-text;
|
|
75
|
+
|
|
76
|
+
@{dark-selector} & {
|
|
77
|
+
color: @c-text-dark;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
&-active &-btn {
|
|
83
|
+
color: @c-text;
|
|
84
|
+
|
|
85
|
+
@{dark-selector} & {
|
|
86
|
+
color: @c-text-dark;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
&-ink-bar {
|
|
92
|
+
position: absolute;
|
|
93
|
+
height: 1px;
|
|
94
|
+
background: @c-primary;
|
|
95
|
+
transition: left 0.2s, width 0.2s;
|
|
96
|
+
pointer-events: none;
|
|
97
|
+
bottom: 0;
|
|
98
|
+
|
|
99
|
+
@{dark-selector} & {
|
|
100
|
+
background: @c-primary-dark;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
&-dropdown {
|
|
105
|
+
position: absolute;
|
|
106
|
+
background: inherit;
|
|
107
|
+
border: 1px solid @c-border;
|
|
108
|
+
max-height: 200px;
|
|
109
|
+
overflow: auto;
|
|
110
|
+
|
|
111
|
+
@{dark-selector} & {
|
|
112
|
+
border-color: @c-border-dark;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
> ul {
|
|
116
|
+
list-style: none;
|
|
117
|
+
margin: 0;
|
|
118
|
+
padding: 0;
|
|
119
|
+
|
|
120
|
+
> li {
|
|
121
|
+
padding: 4px 12px;
|
|
122
|
+
font-size: 14px;
|
|
123
|
+
cursor: pointer;
|
|
124
|
+
|
|
125
|
+
&:hover {
|
|
126
|
+
color: @c-primary;
|
|
127
|
+
|
|
128
|
+
@{dark-selector} & {
|
|
129
|
+
color: @c-primary-dark;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
&:not(:last-child) {
|
|
134
|
+
border-bottom: 1px dashed @c-border;
|
|
135
|
+
|
|
136
|
+
@{dark-selector} & {
|
|
137
|
+
border-bottom-color: @c-border-dark;
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
&-hidden {
|
|
144
|
+
display: none;
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
&-tabpane-hidden {
|
|
149
|
+
display: none;
|
|
150
|
+
}
|
|
151
|
+
}
|