@douyinfe/semi-foundation 2.90.13 → 2.91.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/button/button.scss +1 -1
- package/button/variables.scss +32 -32
- package/cascader/variables.scss +13 -13
- package/checkbox/variables.scss +19 -19
- package/datePicker/variables.scss +15 -15
- package/inputNumber/foundation.ts +1 -1
- package/jsonViewer/jsonViewer.scss +3 -0
- package/jsonViewer/variables.scss +3 -0
- package/lib/cjs/button/button.scss +1 -1
- package/lib/cjs/button/variables.scss +32 -32
- package/lib/cjs/cascader/variables.scss +13 -13
- package/lib/cjs/checkbox/variables.scss +19 -19
- package/lib/cjs/datePicker/variables.scss +15 -15
- package/lib/cjs/inputNumber/foundation.js +1 -1
- package/lib/cjs/jsonViewer/jsonViewer.css +4 -0
- package/lib/cjs/jsonViewer/jsonViewer.scss +3 -0
- package/lib/cjs/jsonViewer/variables.scss +3 -0
- package/lib/cjs/navigation/variables.scss +9 -9
- package/lib/cjs/radio/variables.scss +22 -22
- package/lib/cjs/select/variables.scss +27 -28
- package/lib/cjs/sidebar/animation.scss +7 -0
- package/lib/cjs/sidebar/constants.d.ts +37 -0
- package/lib/cjs/sidebar/constants.js +43 -0
- package/lib/cjs/sidebar/containerFoundation.d.ts +42 -0
- package/lib/cjs/sidebar/containerFoundation.js +50 -0
- package/lib/cjs/sidebar/mcpCofContentFoundation.d.ts +52 -0
- package/lib/cjs/sidebar/mcpCofContentFoundation.js +74 -0
- package/lib/cjs/sidebar/sidebar.css +533 -0
- package/lib/cjs/sidebar/sidebar.scss +677 -0
- package/lib/cjs/sidebar/utils.d.ts +3 -0
- package/lib/cjs/sidebar/utils.js +28 -0
- package/lib/cjs/sidebar/variables.scss +138 -0
- package/lib/cjs/switch/variables.scss +30 -30
- package/lib/cjs/table/variables.scss +18 -19
- package/lib/cjs/tabs/variables.scss +5 -5
- package/lib/cjs/upload/variables.scss +10 -10
- package/lib/es/button/button.scss +1 -1
- package/lib/es/button/variables.scss +32 -32
- package/lib/es/cascader/variables.scss +13 -13
- package/lib/es/checkbox/variables.scss +19 -19
- package/lib/es/datePicker/variables.scss +15 -15
- package/lib/es/inputNumber/foundation.js +1 -1
- package/lib/es/jsonViewer/jsonViewer.css +4 -0
- package/lib/es/jsonViewer/jsonViewer.scss +3 -0
- package/lib/es/jsonViewer/variables.scss +3 -0
- package/lib/es/navigation/variables.scss +9 -9
- package/lib/es/radio/variables.scss +22 -22
- package/lib/es/select/variables.scss +27 -28
- package/lib/es/sidebar/animation.scss +7 -0
- package/lib/es/sidebar/constants.d.ts +37 -0
- package/lib/es/sidebar/constants.js +38 -0
- package/lib/es/sidebar/containerFoundation.d.ts +42 -0
- package/lib/es/sidebar/containerFoundation.js +42 -0
- package/lib/es/sidebar/mcpCofContentFoundation.d.ts +52 -0
- package/lib/es/sidebar/mcpCofContentFoundation.js +66 -0
- package/lib/es/sidebar/sidebar.css +533 -0
- package/lib/es/sidebar/sidebar.scss +677 -0
- package/lib/es/sidebar/utils.d.ts +3 -0
- package/lib/es/sidebar/utils.js +21 -0
- package/lib/es/sidebar/variables.scss +138 -0
- package/lib/es/switch/variables.scss +30 -30
- package/lib/es/table/variables.scss +18 -19
- package/lib/es/tabs/variables.scss +5 -5
- package/lib/es/upload/variables.scss +10 -10
- package/navigation/variables.scss +9 -9
- package/package.json +124 -4
- package/radio/variables.scss +22 -22
- package/select/variables.scss +27 -28
- package/sidebar/animation.scss +7 -0
- package/sidebar/constants.ts +41 -0
- package/sidebar/containerFoundation.ts +77 -0
- package/sidebar/mcpCofContentFoundation.ts +106 -0
- package/sidebar/sidebar.scss +677 -0
- package/sidebar/utils.ts +26 -0
- package/sidebar/variables.scss +138 -0
- package/switch/variables.scss +30 -30
- package/table/variables.scss +18 -19
- package/tabs/variables.scss +5 -5
- package/upload/variables.scss +10 -10
|
@@ -0,0 +1,677 @@
|
|
|
1
|
+
@import './variables.scss';
|
|
2
|
+
@import './animation.scss';
|
|
3
|
+
|
|
4
|
+
$module: #{$prefix}-sidebar;
|
|
5
|
+
|
|
6
|
+
.#{$module} {
|
|
7
|
+
|
|
8
|
+
&-main {
|
|
9
|
+
.#{$module}-container-content {
|
|
10
|
+
overflow: hidden;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
&-content-wrapper {
|
|
14
|
+
display: flex;
|
|
15
|
+
flex-direction: column;
|
|
16
|
+
height: 100%;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
&-content {
|
|
20
|
+
padding: $spacing-sidebar_main_content-padding;
|
|
21
|
+
height: 100%;
|
|
22
|
+
box-sizing: border-box;
|
|
23
|
+
overflow: auto;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
// base container
|
|
28
|
+
&-container {
|
|
29
|
+
height: 100%;
|
|
30
|
+
border-left: $width-sidebar_container-borderLeft solid $color-sidebar_container-borderLeft;
|
|
31
|
+
box-sizing: border-box;
|
|
32
|
+
display: flex;
|
|
33
|
+
flex-direction: column;
|
|
34
|
+
overflow: hidden;
|
|
35
|
+
position: relative;
|
|
36
|
+
|
|
37
|
+
&-header {
|
|
38
|
+
display: flex;
|
|
39
|
+
align-items: center;
|
|
40
|
+
padding: $spacing-sidebar_container_header-paddingY $spacing-sidebar_container_header-paddingRight $spacing-sidebar_container_header-paddingY $spacing-sidebar_container_header-paddingLeft;
|
|
41
|
+
border-bottom: $width-sidebar_container_header_borderBottom solid $color-sidebar_container_header-borderBottom;
|
|
42
|
+
|
|
43
|
+
&-title {
|
|
44
|
+
flex: 1;
|
|
45
|
+
@include font-size-header-6;
|
|
46
|
+
font-weight: $font-weight-bold;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
&-closeBtn {
|
|
50
|
+
flex-shrink: 0;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
&-content {
|
|
56
|
+
flex: 1 1;
|
|
57
|
+
overflow: hidden;
|
|
58
|
+
// overflow: auto;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.#{$prefix}-toast-wrapper {
|
|
62
|
+
position: absolute;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
@keyframes #{$module}-slideShow_right {
|
|
68
|
+
from {
|
|
69
|
+
transform: translateX(100%);
|
|
70
|
+
}
|
|
71
|
+
to {
|
|
72
|
+
transform: translateX(0);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
@keyframes #{$module}-slideHide_right {
|
|
77
|
+
from {
|
|
78
|
+
transform: translateX(0);
|
|
79
|
+
}
|
|
80
|
+
to {
|
|
81
|
+
transform: translateX(100%);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
&-animation-content_show {
|
|
86
|
+
animation: #{$module}-slideShow_right $animation_duration_sidebar_inner-show $animation_function_sidebar_inner-show $animation_delay_sidebar_inner-show;
|
|
87
|
+
animation-fill-mode: forwards;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
&-animation-content_hide {
|
|
91
|
+
animation: #{$module}-slideHide_right $animation_duration_sidebar_inner-hide $animation_function_sidebar_inner-hide $animation_delay_sidebar_inner-hide;
|
|
92
|
+
animation-fill-mode: forwards;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
// mcp configure content
|
|
97
|
+
&-mcp-configure-content {
|
|
98
|
+
padding: $spacing-sidebar_mcp_content-paddingY $spacing-sidebar_mcp_content-paddingX;
|
|
99
|
+
display: flex;
|
|
100
|
+
flex-direction: column;
|
|
101
|
+
height: 100%;
|
|
102
|
+
box-sizing: border-box;
|
|
103
|
+
|
|
104
|
+
&-header {
|
|
105
|
+
display: flex;
|
|
106
|
+
align-items: center;
|
|
107
|
+
justify-content: space-between;
|
|
108
|
+
|
|
109
|
+
&-count {
|
|
110
|
+
@include font-size-small;
|
|
111
|
+
vertical-align: middle;
|
|
112
|
+
color: $color-sidebar_mcp_header_counter-text;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
&-search {
|
|
117
|
+
margin: $spacing-sidebar_mcp_search-marginY $spacing-sidebar_mcp_search-marginX;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
&-search-container {
|
|
121
|
+
display: flex;
|
|
122
|
+
column-gap: $spacing-sidebar_mcp_search_container-columnGap;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
&-item-container {
|
|
126
|
+
overflow-y: auto;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
&-item {
|
|
130
|
+
padding: $spacing-sidebar_mcp_item-paddingY $spacing-sidebar_mcp_item-paddingX;
|
|
131
|
+
display: flex;
|
|
132
|
+
align-items: center;
|
|
133
|
+
border-bottom: $width-sidebar_mcp_item-borderBottom solid $color-sidebar_mcp_item-borderBottom;
|
|
134
|
+
|
|
135
|
+
&-sign {
|
|
136
|
+
width: $width-sidebar_mcp_item_sign;
|
|
137
|
+
height: $width-sidebar_mcp_item_sign;
|
|
138
|
+
margin-right: $spacing-sidebar_mcp_item_sign-marginRight;
|
|
139
|
+
flex-shrink: 0;
|
|
140
|
+
|
|
141
|
+
.#{$prefix}-icon {
|
|
142
|
+
font-size: $font-sidebar_mcp_item_sign_icon-fontSize;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
&-content {
|
|
147
|
+
justify-content: center;
|
|
148
|
+
flex: 1;
|
|
149
|
+
min-width: 0;
|
|
150
|
+
margin-right: $spacing-sidebar_mcp_item_content-marginRight;
|
|
151
|
+
|
|
152
|
+
&-label {
|
|
153
|
+
@include font-size-regular;
|
|
154
|
+
font-weight: $font-weight-bold;
|
|
155
|
+
color: $color-sidebar_mcp_item_label;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
&-desc {
|
|
159
|
+
@include font-size-small;
|
|
160
|
+
color: $color-sidebar_mcp_item_desc;
|
|
161
|
+
overflow: hidden;
|
|
162
|
+
text-overflow: ellipsis;
|
|
163
|
+
white-space: nowrap;
|
|
164
|
+
max-width: 100%;
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
&-button {
|
|
169
|
+
flex-shrink: 0;
|
|
170
|
+
|
|
171
|
+
&-configure {
|
|
172
|
+
margin-right: $spacing-sidebar_mcp_item_button_configure-marginRight;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
&.#{$prefix}-button.#{$prefix}-button-with-icon-only {
|
|
176
|
+
width: $width-sidebar_mcp_item_button;
|
|
177
|
+
height: $width-sidebar_mcp_item_button;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
&-custom-empty {
|
|
184
|
+
margin-top: $spacing-sidebar_mcp_custom_empty-marginTop;
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
&-annotation {
|
|
189
|
+
.#{$module}-container-content {
|
|
190
|
+
padding: $spacing-sidebar_annotation_container-padding;
|
|
191
|
+
overflow: auto;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
&-content {
|
|
195
|
+
display: flex;
|
|
196
|
+
flex-direction: row;
|
|
197
|
+
flex-wrap: wrap;
|
|
198
|
+
gap: $spacing-sidebar_annotation_content-gap;
|
|
199
|
+
width: 100%;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
&-item {
|
|
203
|
+
cursor: pointer;
|
|
204
|
+
|
|
205
|
+
&-title {
|
|
206
|
+
// 最多两行
|
|
207
|
+
overflow: hidden;
|
|
208
|
+
text-overflow: ellipsis;
|
|
209
|
+
white-space: normal;
|
|
210
|
+
max-width: 100%;
|
|
211
|
+
display: -webkit-box;
|
|
212
|
+
line-clamp: 2;
|
|
213
|
+
-webkit-line-clamp: 2;
|
|
214
|
+
-webkit-box-orient: vertical;
|
|
215
|
+
@include font-size-regular;
|
|
216
|
+
color: var(--semi-color-text-0);
|
|
217
|
+
font-weight: $font-weight-bold;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
&-footer {
|
|
221
|
+
display: flex;
|
|
222
|
+
column-gap: $spacing-sidebar_annotation_footer-columnGap;
|
|
223
|
+
align-items: center;
|
|
224
|
+
|
|
225
|
+
&-logo {
|
|
226
|
+
font-size: $font-sidebar_annotation_footer_logo-fontSize;
|
|
227
|
+
width: $width-sidebar_annotation_footer_logo;
|
|
228
|
+
height: $width-sidebar_annotation_footer_logo;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
&-text {
|
|
232
|
+
@include font-size-small;
|
|
233
|
+
color: var(--semi-color-text-0);
|
|
234
|
+
overflow: hidden;
|
|
235
|
+
text-overflow: ellipsis;
|
|
236
|
+
white-space: nowrap;
|
|
237
|
+
flex-grow: 1;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
&-order {
|
|
241
|
+
box-sizing: border-box;
|
|
242
|
+
min-width: $width-sidebar_annotation_footer_order-minWidth;
|
|
243
|
+
padding: $spacing-sidebar_annotation_footer_order-paddingY $spacing-sidebar_annotation_footer_order-paddingX;
|
|
244
|
+
height: $height-sidebar_annotation_footer_order;
|
|
245
|
+
border-radius: $radius-sidebar_annotation_footer_order;
|
|
246
|
+
background-color: var(--semi-color-fill-1);
|
|
247
|
+
display: flex;
|
|
248
|
+
align-items: center;
|
|
249
|
+
justify-content: center;
|
|
250
|
+
@include font-size-small;
|
|
251
|
+
color: var(--semi-color-text-2);
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
&-text {
|
|
256
|
+
padding: $spacing-sidebar_annotation_text-paddingY $spacing-sidebar_annotation_text-paddingX;
|
|
257
|
+
width: 100%;
|
|
258
|
+
row-gap: $spacing-sidebar_annotation_content-gap;
|
|
259
|
+
display: flex;
|
|
260
|
+
flex-direction: column;
|
|
261
|
+
|
|
262
|
+
&-detail {
|
|
263
|
+
overflow: hidden;
|
|
264
|
+
text-overflow: ellipsis;
|
|
265
|
+
white-space: normal;
|
|
266
|
+
max-width: 100%;
|
|
267
|
+
display: -webkit-box;
|
|
268
|
+
line-clamp: 4;
|
|
269
|
+
-webkit-line-clamp: 4;
|
|
270
|
+
-webkit-box-orient: vertical;
|
|
271
|
+
@include font-size-small;
|
|
272
|
+
color: var(--semi-color-text-2);
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
&-video {
|
|
277
|
+
border-radius: $radius-sidebar_annotation_video;
|
|
278
|
+
border: $width-sidebar_annotation_video-border solid $color-sidebar_annotation_video-border;
|
|
279
|
+
overflow: hidden;
|
|
280
|
+
width: calc((100% - #{$spacing-sidebar_annotation_content-gap}) / 2);
|
|
281
|
+
box-sizing: border-box;
|
|
282
|
+
|
|
283
|
+
&-content {
|
|
284
|
+
padding: $spacing-sidebar_annotation_video_content-paddingTop $spacing-sidebar_annotation_video_content-paddingRight $spacing-sidebar_annotation_video_content-paddingBottom $spacing-sidebar_annotation_video_content-paddingLeft;
|
|
285
|
+
display: flex;
|
|
286
|
+
flex-direction: column;
|
|
287
|
+
row-gap: $spacing-sidebar_annotation_content-gap;
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
.#{$module}-annotation-item-title {
|
|
291
|
+
height: $height-sidebar_annotation_video_item_title;
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
&-img {
|
|
295
|
+
width: 100%;
|
|
296
|
+
height: 100%;
|
|
297
|
+
object-fit: cover;
|
|
298
|
+
|
|
299
|
+
&-wrapper {
|
|
300
|
+
position: relative;
|
|
301
|
+
width: 100%;
|
|
302
|
+
height: $height-sidebar_annotation_video_img-wrapper;
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
&-play {
|
|
307
|
+
position: absolute;
|
|
308
|
+
top: $spacing-sidebar_annotation_video_play-top;
|
|
309
|
+
right: $spacing-sidebar_annotation_video_play-right;
|
|
310
|
+
border: 1px solid var(--semi-color-bg-0);
|
|
311
|
+
background: var(--semi-color-text-2);
|
|
312
|
+
color: var(--semi-color-bg-0);
|
|
313
|
+
border-radius: 50%;
|
|
314
|
+
width: $width-sidebar_annotation_video_play;
|
|
315
|
+
height: $width-sidebar_annotation_video_play;
|
|
316
|
+
|
|
317
|
+
&.#{$prefix}-icon {
|
|
318
|
+
display: inline-flex;
|
|
319
|
+
align-items: center;
|
|
320
|
+
justify-content: center;
|
|
321
|
+
font-size: $font-sidebar_annotation_video_play_icon-fontSize;
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
&-duration {
|
|
327
|
+
padding: $spacing-sidebar_annotation_video_duration-paddingY $spacing-sidebar_annotation_video_duration-paddingX;
|
|
328
|
+
position: absolute;
|
|
329
|
+
bottom: $spacing-sidebar_annotation_video_duration-bottom;
|
|
330
|
+
right: $spacing-sidebar_annotation_video_duration-right;
|
|
331
|
+
background-color: $color-sidebar_annotation_video_duration-bg;
|
|
332
|
+
border-radius: $radius-sidebar_annotation_video_duration;
|
|
333
|
+
@include font-size-small;
|
|
334
|
+
color: $color-sidebar_annotation_video_duration-text;
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
&-title {
|
|
338
|
+
@include font-size-regular;
|
|
339
|
+
color: $color-sidebar_annotation_video_title-text;
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
&-code-content {
|
|
346
|
+
height: 100%;
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
&-code-content, &-main-content {
|
|
350
|
+
|
|
351
|
+
.#{$prefix}-codeHighlight-defaultTheme pre[class*=language-] {
|
|
352
|
+
margin: 0px;
|
|
353
|
+
padding-top: 0px;
|
|
354
|
+
padding-bottom: 0px;
|
|
355
|
+
background-color: transparent;
|
|
356
|
+
overflow-y: hidden;
|
|
357
|
+
overflow-x: auto;
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
.#{$prefix}-codeHighlight .line-numbers .line-numbers-rows {
|
|
361
|
+
border-right: none;
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
.#{$prefix}-json-viewer {
|
|
365
|
+
padding-top: 0px;
|
|
366
|
+
padding-bottom: 0px;
|
|
367
|
+
background-color: transparent;
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
&-collapse {
|
|
373
|
+
|
|
374
|
+
.#{$prefix}-collapse-item {
|
|
375
|
+
border: $width-sidebar_collapse_item_border solid $color-sidebar_collapse_item-border;
|
|
376
|
+
border-radius: $radius-sidebar_collapse_item;
|
|
377
|
+
|
|
378
|
+
&:not(:last-child) {
|
|
379
|
+
margin-bottom: $spacing-sidebar_collapse_item_marginBottom;
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
.#{$prefix}-collapse-header {
|
|
384
|
+
padding: $spacing-sidebar_collapse_header-paddingY $spacing-sidebar_collapse_header-paddingX;
|
|
385
|
+
margin: 0px;
|
|
386
|
+
font-weight: $font-weight-regular;
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
&-header-content {
|
|
390
|
+
display: flex;
|
|
391
|
+
align-items: center;
|
|
392
|
+
gap: $spacing-sidebar_collapse_header_content_gap;
|
|
393
|
+
width: 100%;
|
|
394
|
+
padding-right: $spacing-sidebar_collapse_header_content_paddingRight;
|
|
395
|
+
|
|
396
|
+
.#{$prefix}-icon {
|
|
397
|
+
color: var(--semi-color-text-1);
|
|
398
|
+
}
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
&-header-text {
|
|
402
|
+
flex: 1;
|
|
403
|
+
overflow: hidden;
|
|
404
|
+
text-overflow: ellipsis;
|
|
405
|
+
white-space: nowrap;
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
&-header-expand-btn {
|
|
409
|
+
flex-shrink: 0;
|
|
410
|
+
|
|
411
|
+
&.semi-button.semi-button-with-icon-only {
|
|
412
|
+
padding: $spacing-sidebar_collapse_header_expand_btn-padding;
|
|
413
|
+
width: $width-sidebar_collapse_header_expand_btn;
|
|
414
|
+
height: $width-sidebar_collapse_header_expand_btn;
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
.#{$prefix}-collapse-item-active {
|
|
419
|
+
.#{$prefix}-collapsible-wrapper {
|
|
420
|
+
border-top: $width-sidebar_collapse_item_content-borderTop solid $color-sidebar_collapse_item_content-borderTop;
|
|
421
|
+
}
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
&-code {
|
|
425
|
+
.#{$prefix}-collapse-content {
|
|
426
|
+
padding: 12px 0px;
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
&-options {
|
|
433
|
+
display: flex;
|
|
434
|
+
flex-direction: row;
|
|
435
|
+
flex-wrap: wrap;
|
|
436
|
+
gap: $spacing-sidebar_options-gap;
|
|
437
|
+
padding: $spacing-sidebar_options-paddingY $spacing-sidebar_options-paddingX;
|
|
438
|
+
border-bottom: $width-sidebar_options-borderBottom solid $color-sidebar_options-borderBottom;
|
|
439
|
+
|
|
440
|
+
&-button {
|
|
441
|
+
.semi-button-content-right {
|
|
442
|
+
margin-left: $spacing-sidebar_options_button-marginLeft;
|
|
443
|
+
}
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
&-normal {
|
|
447
|
+
&.semi-button-primary.semi-button-light {
|
|
448
|
+
color: $color-sidebar_options_button-text;
|
|
449
|
+
font-weight: $font-weight-regular;
|
|
450
|
+
}
|
|
451
|
+
}
|
|
452
|
+
}
|
|
453
|
+
|
|
454
|
+
&-file {
|
|
455
|
+
|
|
456
|
+
.tiptap {
|
|
457
|
+
font-size: $font-sidebar_file-fontSize;
|
|
458
|
+
line-height: $font-sidebar_file-lineHeight;
|
|
459
|
+
|
|
460
|
+
::selection {
|
|
461
|
+
background: $color-sidebar_file_selection-bg;
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
::-moz-selection {
|
|
465
|
+
background: $color-sidebar_file_selection-bg;
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
p.is-editor-empty:first-child::before {
|
|
469
|
+
color: $color-sidebar_file_placeholder-text;
|
|
470
|
+
content: attr(data-placeholder);
|
|
471
|
+
float: left;
|
|
472
|
+
height: 0;
|
|
473
|
+
pointer-events: none;
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
p {
|
|
477
|
+
margin: 0px;
|
|
478
|
+
white-space: pre-wrap;
|
|
479
|
+
color: $color-sidebar_file-text;
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
blockquote {
|
|
483
|
+
border-left: $width-sidebar_file_blockquote-borderLeft solid $color-sidebar_file_blockquote-borderLeft;
|
|
484
|
+
margin: $spacing-sidebar_file_blockquote-marginY $spacing-sidebar_file_blockquote-marginX;
|
|
485
|
+
padding-left: $spacing-sidebar_file_blockquote-paddingLeft;
|
|
486
|
+
}
|
|
487
|
+
|
|
488
|
+
&:focus {
|
|
489
|
+
outline: none;
|
|
490
|
+
}
|
|
491
|
+
|
|
492
|
+
pre {
|
|
493
|
+
background-color: $color-sidebar_file_pre_bg;
|
|
494
|
+
padding: $spacing-sidebar_file_pre-paddingY $spacing-sidebar_file_pre-paddingX;
|
|
495
|
+
border-radius: $radius-sidebar_file_pre;
|
|
496
|
+
overflow: auto;
|
|
497
|
+
font-size: $font-sidebar_file_pre-fontSize;
|
|
498
|
+
line-height: $font-sidebar_file_pre-lineHeight;
|
|
499
|
+
border: $width-sidebar_file_pre-border solid $color-sidebar_file_pre-border;
|
|
500
|
+
|
|
501
|
+
code {
|
|
502
|
+
background-color: transparent;
|
|
503
|
+
}
|
|
504
|
+
}
|
|
505
|
+
|
|
506
|
+
code {
|
|
507
|
+
background-color: $color-sidebar_file_code-bg;
|
|
508
|
+
padding: $spacing-sidebar_file_code-paddingY $spacing-sidebar_file_code-paddingX;
|
|
509
|
+
}
|
|
510
|
+
|
|
511
|
+
hr {
|
|
512
|
+
border: none;
|
|
513
|
+
border-top: $width-sidebar_file_hr-border solid $color-sidebar_file_hr-borderTop;
|
|
514
|
+
}
|
|
515
|
+
|
|
516
|
+
span.select {
|
|
517
|
+
display: inline-block;
|
|
518
|
+
background-color: $color-sidebar_file_selection-bg;
|
|
519
|
+
line-height: $font-sidebar_file-lineHeight;
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
&.ProseMirror img:not([data-type="emoji"] img) {
|
|
523
|
+
outline: .125rem solid transparent;
|
|
524
|
+
margin: 12px 0;
|
|
525
|
+
}
|
|
526
|
+
|
|
527
|
+
&.ProseMirror img:not([data-type="emoji"] img).ProseMirror-selectednode {
|
|
528
|
+
outline-color: var(--semi-color-text-0);
|
|
529
|
+
}
|
|
530
|
+
|
|
531
|
+
.tiptap-image-slot {
|
|
532
|
+
.uploadFail, .validateFail, .uploading, .success {
|
|
533
|
+
.#{$prefix}-upload-drag-area {
|
|
534
|
+
display: none;
|
|
535
|
+
}
|
|
536
|
+
}
|
|
537
|
+
|
|
538
|
+
}
|
|
539
|
+
|
|
540
|
+
}
|
|
541
|
+
|
|
542
|
+
&-menu-bar {
|
|
543
|
+
display: flex;
|
|
544
|
+
flex-direction: row;
|
|
545
|
+
align-items: center;
|
|
546
|
+
justify-content: center;
|
|
547
|
+
flex-wrap: wrap;
|
|
548
|
+
gap: $spacing-sidebar_file_menu_bar-gap;
|
|
549
|
+
border-top: $width-sidebar_menu_bar-borderTop solid $color-sidebar_menu_bar-borderTop;
|
|
550
|
+
border-bottom: $width-sidebar_menu_bar-borderBottom solid $color-sidebar_menu_bar-borderBottom;
|
|
551
|
+
padding: $spacing-sidebar_file_menu_bar-paddingY $spacing-sidebar_file_menu_bar-paddingX;
|
|
552
|
+
|
|
553
|
+
&-dropdown-item-active {
|
|
554
|
+
color: $color-sidebar_menu_bar_dropdown_item-active-text;
|
|
555
|
+
background: $color-sidebar_menu_bar_dropdown_item-active-bg;
|
|
556
|
+
}
|
|
557
|
+
|
|
558
|
+
.#{$prefix}-divider-vertical {
|
|
559
|
+
margin: $spacing-sidebar_menu_bar_divider-margin;
|
|
560
|
+
}
|
|
561
|
+
|
|
562
|
+
&-btn {
|
|
563
|
+
|
|
564
|
+
&-active {
|
|
565
|
+
|
|
566
|
+
&.#{$prefix}-button-tertiary.#{$prefix}-button-borderless {
|
|
567
|
+
background: $color-sidebar_menu_bar_btn-active-bg;
|
|
568
|
+
}
|
|
569
|
+
}
|
|
570
|
+
|
|
571
|
+
&-codeblock {
|
|
572
|
+
font-size: $font-sidebar_file_menu_bar_codeblock-fontSize;
|
|
573
|
+
line-height: $font-sidebar_file_menu_bar_codeblock-lineHeight;
|
|
574
|
+
padding: $spacing-sidebar_file_menu_bar_codeblock-padding;
|
|
575
|
+
}
|
|
576
|
+
|
|
577
|
+
}
|
|
578
|
+
|
|
579
|
+
&-link-dropdown {
|
|
580
|
+
padding: $spacing-sidebar_file_menu_bar-link-dropdown-padding;
|
|
581
|
+
display: flex;
|
|
582
|
+
align-items: center;
|
|
583
|
+
justify-content: center;
|
|
584
|
+
|
|
585
|
+
&-btn-active {
|
|
586
|
+
|
|
587
|
+
&.#{$prefix}-button-tertiary.#{$prefix}-button-borderless {
|
|
588
|
+
color: $color-sidebar_menu_bar_link_dropdown_btn-active;
|
|
589
|
+
}
|
|
590
|
+
}
|
|
591
|
+
}
|
|
592
|
+
}
|
|
593
|
+
|
|
594
|
+
}
|
|
595
|
+
|
|
596
|
+
&-detail {
|
|
597
|
+
.#{$module}-file {
|
|
598
|
+
height: 100%;
|
|
599
|
+
display: flex;
|
|
600
|
+
flex-direction: column;
|
|
601
|
+
|
|
602
|
+
&-content {
|
|
603
|
+
height: 100%;
|
|
604
|
+
}
|
|
605
|
+
|
|
606
|
+
&-editor {
|
|
607
|
+
overflow: auto;
|
|
608
|
+
flex: 1;
|
|
609
|
+
padding: $spacing-sidebar_detail_file_editor-paddingY $spacing-sidebar_detail_file_editor-paddingX;
|
|
610
|
+
}
|
|
611
|
+
}
|
|
612
|
+
|
|
613
|
+
.#{$module}-code-content {
|
|
614
|
+
overflow: auto;
|
|
615
|
+
}
|
|
616
|
+
}
|
|
617
|
+
|
|
618
|
+
&-main {
|
|
619
|
+
|
|
620
|
+
.#{$module}-code-content {
|
|
621
|
+
height: 200px;
|
|
622
|
+
overflow: auto;
|
|
623
|
+
}
|
|
624
|
+
|
|
625
|
+
.#{$module}-collapse-file {
|
|
626
|
+
.#{$prefix}-collapse-content {
|
|
627
|
+
max-height: $height-sidebar_main_collapse_file_content-maxHeight;
|
|
628
|
+
overflow: auto;
|
|
629
|
+
}
|
|
630
|
+
}
|
|
631
|
+
|
|
632
|
+
|
|
633
|
+
|
|
634
|
+
.#{$module}-collapse-code {
|
|
635
|
+
.#{$prefix}-collapse-content {
|
|
636
|
+
max-height: $height-sidebar_main_collapse_code_content-maxHeight;
|
|
637
|
+
overflow: auto;
|
|
638
|
+
}
|
|
639
|
+
}
|
|
640
|
+
|
|
641
|
+
.#{$prefix}-codeHighlight {
|
|
642
|
+
height: 200px;
|
|
643
|
+
overflow: auto;
|
|
644
|
+
// margin-top: -12px;
|
|
645
|
+
}
|
|
646
|
+
|
|
647
|
+
|
|
648
|
+
}
|
|
649
|
+
|
|
650
|
+
&-detail-header {
|
|
651
|
+
display: flex;
|
|
652
|
+
flex-direction: row;
|
|
653
|
+
justify-content: space-between;
|
|
654
|
+
align-items: center;
|
|
655
|
+
color: $color-sidebar_detail_header-text;
|
|
656
|
+
padding: $spacing-sidebar_detail_header-padding;
|
|
657
|
+
|
|
658
|
+
&-left {
|
|
659
|
+
display: flex;
|
|
660
|
+
flex-direction: row;
|
|
661
|
+
column-gap: $spacing-sidebar_detail_header_left-columnGap;
|
|
662
|
+
align-items: center;
|
|
663
|
+
}
|
|
664
|
+
|
|
665
|
+
&-title {
|
|
666
|
+
@include font-size-header-6;
|
|
667
|
+
font-weight: $font-weight-bold;
|
|
668
|
+
}
|
|
669
|
+
|
|
670
|
+
&-right {
|
|
671
|
+
display: flex;
|
|
672
|
+
flex-direction: row;
|
|
673
|
+
column-gap: $spacing-sidebar_detail_header_right-columnGap;
|
|
674
|
+
align-items: center;
|
|
675
|
+
}
|
|
676
|
+
}
|
|
677
|
+
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { MCPOption } from './mcpCofContentFoundation';
|
|
2
|
+
export declare function getFilterResult(inputValue: string, options?: MCPOption[], customFilter?: (value: string, option: MCPOption) => boolean): MCPOption[];
|
|
3
|
+
export declare function baseFilter(value: string, option: MCPOption): boolean;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.baseFilter = baseFilter;
|
|
7
|
+
exports.getFilterResult = getFilterResult;
|
|
8
|
+
function getFilterResult(inputValue) {
|
|
9
|
+
let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
10
|
+
let customFilter = arguments.length > 2 ? arguments[2] : undefined;
|
|
11
|
+
const lowCaseInputValue = inputValue.toLowerCase();
|
|
12
|
+
const filteredOptions = options.filter(option => {
|
|
13
|
+
if (typeof customFilter === 'function') {
|
|
14
|
+
return customFilter(lowCaseInputValue, option);
|
|
15
|
+
} else {
|
|
16
|
+
return baseFilter(lowCaseInputValue, option);
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
return filteredOptions;
|
|
20
|
+
}
|
|
21
|
+
function baseFilter(value, option) {
|
|
22
|
+
const labelText = typeof option.label === 'string' ? option.label : '';
|
|
23
|
+
if (labelText.toLowerCase().includes(value)) {
|
|
24
|
+
return true;
|
|
25
|
+
}
|
|
26
|
+
const descText = typeof option.desc === 'string' ? option.desc : '';
|
|
27
|
+
return descText.toLowerCase().includes(value);
|
|
28
|
+
}
|