vanilla-jui 1.5.28 → 1.5.30
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/dist/index.d.ts +0 -1
- package/dist/index.js +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/components/flow.ts +0 -5
- package/src/css/avatar.css +4 -0
- package/src/css/editor.css +49 -57
- package/src/css/flow.css +1 -3
- package/src/css/form.css +2 -5
- package/src/css/icon.css +3 -5
- package/src/css/themes/default/avatar.css +2 -2
- package/src/css/themes/default/button.css +1 -1
- package/src/css/themes/default/editor.css +6 -15
- package/src/css/themes/default/tooltip.css +1 -1
package/package.json
CHANGED
package/src/components/flow.ts
CHANGED
|
@@ -49,7 +49,6 @@ export interface FlowStep {
|
|
|
49
49
|
title?: string;
|
|
50
50
|
content?: RenderableContent<FlowContext>;
|
|
51
51
|
data?: FlowData;
|
|
52
|
-
modal?: FlowData | ((context: FlowContext) => FlowData | null) | null;
|
|
53
52
|
onEnter?: FlowLifecycleHook;
|
|
54
53
|
onLeave?: FlowLifecycleHook;
|
|
55
54
|
onNext?: FlowMoveHook;
|
|
@@ -377,10 +376,6 @@ function cloneSteps(steps: unknown): FlowStep[] {
|
|
|
377
376
|
return {
|
|
378
377
|
...source,
|
|
379
378
|
data: clonePlainObject(source.data),
|
|
380
|
-
modal:
|
|
381
|
-
typeof source.modal === 'function' || source.modal == null
|
|
382
|
-
? source.modal
|
|
383
|
-
: clonePlainObject(source.modal),
|
|
384
379
|
};
|
|
385
380
|
});
|
|
386
381
|
}
|
package/src/css/avatar.css
CHANGED
package/src/css/editor.css
CHANGED
|
@@ -15,29 +15,29 @@
|
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
/* ============================================
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
Editor - 文章阅读/编辑器预览样式
|
|
19
|
+
============================================ */
|
|
20
20
|
.j-editor {
|
|
21
21
|
font-size: var(--editor-font-size);
|
|
22
22
|
line-height: var(--editor-line-height);
|
|
23
23
|
letter-spacing: var(--editor-letter-space);
|
|
24
24
|
word-spacing: var(--editor-word-space);
|
|
25
25
|
word-break: break-word;
|
|
26
|
-
|
|
27
|
-
-webkit-font-smoothing: antialiased;
|
|
28
|
-
-moz-osx-font-smoothing: grayscale;
|
|
29
|
-
outline: var(--editor-outline);
|
|
26
|
+
outline: 0;
|
|
30
27
|
position: relative;
|
|
31
28
|
}
|
|
32
29
|
|
|
33
30
|
/* ============================================
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
.j-editor
|
|
37
|
-
margin
|
|
31
|
+
reset - 重置样式
|
|
32
|
+
============================================ */
|
|
33
|
+
.j-editor p {
|
|
34
|
+
margin: 0;
|
|
38
35
|
}
|
|
39
36
|
|
|
40
|
-
|
|
37
|
+
/* ============================================
|
|
38
|
+
Typography - 段落与标题
|
|
39
|
+
============================================ */
|
|
40
|
+
.j-editor > p {
|
|
41
41
|
margin-block: var(--editor-paragraph-space);
|
|
42
42
|
}
|
|
43
43
|
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
.j-editor h5,
|
|
49
49
|
.j-editor h6 {
|
|
50
50
|
margin: var(--editor-heading-space) 0
|
|
51
|
-
calc(var(--editor-heading-space) * 0.
|
|
51
|
+
calc(var(--editor-heading-space) * 0.625);
|
|
52
52
|
font-weight: 600;
|
|
53
53
|
color: var(--editor-heading-fg);
|
|
54
54
|
letter-spacing: -0.02em;
|
|
@@ -56,24 +56,22 @@
|
|
|
56
56
|
|
|
57
57
|
.j-editor h1 {
|
|
58
58
|
font-size: 2em;
|
|
59
|
-
font-weight: 700;
|
|
60
59
|
letter-spacing: -0.03em;
|
|
61
60
|
margin-top: 0;
|
|
62
61
|
}
|
|
63
62
|
|
|
64
63
|
.j-editor h2 {
|
|
65
|
-
font-size: 1.
|
|
66
|
-
|
|
67
|
-
padding-bottom: 0.25em;
|
|
64
|
+
font-size: 1.75em;
|
|
65
|
+
padding-bottom: 2px;
|
|
68
66
|
border-bottom: 1px solid var(--editor-border-subtle);
|
|
69
67
|
}
|
|
70
68
|
|
|
71
69
|
.j-editor h3 {
|
|
72
|
-
font-size: 1.
|
|
70
|
+
font-size: 1.5em;
|
|
73
71
|
}
|
|
74
72
|
|
|
75
73
|
.j-editor h4 {
|
|
76
|
-
font-size: 1.
|
|
74
|
+
font-size: 1.25em;
|
|
77
75
|
}
|
|
78
76
|
|
|
79
77
|
.j-editor h5,
|
|
@@ -82,21 +80,21 @@
|
|
|
82
80
|
}
|
|
83
81
|
|
|
84
82
|
/* 标题后的段落减少间距 */
|
|
85
|
-
.j-editor h1
|
|
86
|
-
.j-editor h2
|
|
87
|
-
.j-editor h3
|
|
88
|
-
.j-editor h4
|
|
89
|
-
.j-editor h5
|
|
90
|
-
.j-editor h6
|
|
83
|
+
/* .j-editor h1+p,
|
|
84
|
+
.j-editor h2+p,
|
|
85
|
+
.j-editor h3+p,
|
|
86
|
+
.j-editor h4+p,
|
|
87
|
+
.j-editor h5+p,
|
|
88
|
+
.j-editor h6+p {
|
|
91
89
|
margin-top: calc(var(--editor-paragraph-space) * -0.5);
|
|
92
|
-
}
|
|
90
|
+
} */
|
|
93
91
|
|
|
94
92
|
/* ============================================
|
|
95
93
|
Inline Elements - 内联元素
|
|
96
94
|
============================================ */
|
|
97
95
|
.j-editor strong,
|
|
98
96
|
.j-editor b {
|
|
99
|
-
font-weight:
|
|
97
|
+
font-weight: 600;
|
|
100
98
|
color: var(--editor-heading-fg);
|
|
101
99
|
}
|
|
102
100
|
|
|
@@ -247,30 +245,27 @@
|
|
|
247
245
|
|
|
248
246
|
/* Definition List */
|
|
249
247
|
.j-editor dl {
|
|
250
|
-
margin:
|
|
248
|
+
margin-block: var(--editor-block-space);
|
|
251
249
|
}
|
|
252
250
|
|
|
253
251
|
.j-editor dt {
|
|
254
252
|
font-weight: 600;
|
|
255
|
-
margin-top: 0.
|
|
256
|
-
margin-bottom:
|
|
253
|
+
margin-top: 0.75rem;
|
|
254
|
+
margin-bottom: var(--editor-dot-space);
|
|
257
255
|
color: var(--editor-heading-fg);
|
|
258
256
|
}
|
|
259
257
|
|
|
260
|
-
.j-editor dt:first-child {
|
|
258
|
+
.j-editor dl dt:first-child {
|
|
261
259
|
margin-top: 0;
|
|
262
260
|
}
|
|
263
261
|
|
|
264
262
|
.j-editor dd {
|
|
265
|
-
margin: 0 0 0.
|
|
266
|
-
padding-left:
|
|
263
|
+
margin: 0 0 0.75rem;
|
|
264
|
+
padding-left: var(--editor-paragraph-space);
|
|
267
265
|
color: var(--tone-body);
|
|
268
266
|
}
|
|
269
267
|
|
|
270
|
-
/*
|
|
271
|
-
.j-editor .j-checkbox {
|
|
272
|
-
margin-block: var(--editor-paragraph-space);
|
|
273
|
-
}
|
|
268
|
+
/* 任务列表 */
|
|
274
269
|
|
|
275
270
|
/* ============================================
|
|
276
271
|
Blockquote - 引用
|
|
@@ -279,7 +274,7 @@
|
|
|
279
274
|
margin: var(--editor-block-space) 0;
|
|
280
275
|
margin-left: 0;
|
|
281
276
|
margin-right: 0;
|
|
282
|
-
padding:
|
|
277
|
+
padding: 0.75rem 1.25rem;
|
|
283
278
|
border-left: 3px solid var(--editor-border-tone);
|
|
284
279
|
border-radius: 0 var(--radius-md) var(--radius-md) 0;
|
|
285
280
|
background-color: var(--editor-blockquote-bg);
|
|
@@ -292,12 +287,12 @@
|
|
|
292
287
|
}
|
|
293
288
|
|
|
294
289
|
.j-editor blockquote p + p {
|
|
295
|
-
margin-top: 0.
|
|
290
|
+
margin-top: 0.5rem;
|
|
296
291
|
}
|
|
297
292
|
|
|
298
293
|
.j-editor cite {
|
|
299
294
|
display: block;
|
|
300
|
-
margin-
|
|
295
|
+
margin-block: 0.5rem;
|
|
301
296
|
font-style: normal;
|
|
302
297
|
font-size: 0.875em;
|
|
303
298
|
color: var(--editor-caption-fg);
|
|
@@ -315,13 +310,14 @@
|
|
|
315
310
|
}
|
|
316
311
|
|
|
317
312
|
.j-editor code:not([class*='language-']) {
|
|
318
|
-
font-family:
|
|
319
|
-
'SF Mono', SFMono-Regular, Consolas, 'Liberation Mono', Menlo, monospace;
|
|
313
|
+
/* font-family:
|
|
314
|
+
'SF Mono', SFMono-Regular, Consolas, 'Liberation Mono', Menlo, monospace; */
|
|
315
|
+
font-family: Menlo, Monaco, Consolas, 'Liberation Mono', monospace;
|
|
320
316
|
font-size: 0.875em;
|
|
321
317
|
border: 1px solid var(--editor-border-subtle);
|
|
322
318
|
border-radius: var(--radius-sm);
|
|
323
319
|
word-break: break-word;
|
|
324
|
-
padding:
|
|
320
|
+
padding: 2px 4px;
|
|
325
321
|
background: var(--editor-code-bg);
|
|
326
322
|
color: var(--editor-code-fg);
|
|
327
323
|
}
|
|
@@ -333,7 +329,7 @@
|
|
|
333
329
|
border: 1px solid var(--editor-border);
|
|
334
330
|
border-bottom-width: 2px;
|
|
335
331
|
border-radius: var(--radius-sm);
|
|
336
|
-
padding:
|
|
332
|
+
padding: 2px 8px;
|
|
337
333
|
color: var(--tone-body);
|
|
338
334
|
}
|
|
339
335
|
|
|
@@ -539,7 +535,6 @@
|
|
|
539
535
|
.j-editor img {
|
|
540
536
|
max-width: 100%;
|
|
541
537
|
height: auto;
|
|
542
|
-
border-radius: var(--radius-lg);
|
|
543
538
|
}
|
|
544
539
|
|
|
545
540
|
.j-editor figure {
|
|
@@ -554,8 +549,8 @@
|
|
|
554
549
|
}
|
|
555
550
|
|
|
556
551
|
.j-editor figcaption {
|
|
557
|
-
margin-top: 0.
|
|
558
|
-
font-size:
|
|
552
|
+
margin-top: 0.75rem;
|
|
553
|
+
font-size: var(--font-size-md);
|
|
559
554
|
color: var(--editor-caption-fg);
|
|
560
555
|
text-align: center;
|
|
561
556
|
line-height: 1.5;
|
|
@@ -671,9 +666,8 @@
|
|
|
671
666
|
}
|
|
672
667
|
|
|
673
668
|
/* ============================================
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
669
|
+
Address
|
|
670
|
+
============================================ */
|
|
677
671
|
.j-editor address {
|
|
678
672
|
font-style: normal;
|
|
679
673
|
margin-block: var(--editor-block-space);
|
|
@@ -685,14 +679,8 @@
|
|
|
685
679
|
}
|
|
686
680
|
|
|
687
681
|
/* ============================================
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
.j-editor .block-item {
|
|
692
|
-
margin: var(--editor-block-space) 0;
|
|
693
|
-
}
|
|
694
|
-
|
|
695
|
-
/* First/Last child margin reset */
|
|
682
|
+
Block Item - 通用块级元素
|
|
683
|
+
============================================ */
|
|
696
684
|
.j-editor > *:first-child {
|
|
697
685
|
margin-top: 0;
|
|
698
686
|
}
|
|
@@ -700,4 +688,8 @@
|
|
|
700
688
|
.j-editor > *:last-child {
|
|
701
689
|
margin-bottom: 0;
|
|
702
690
|
}
|
|
691
|
+
|
|
692
|
+
.j-editor .block {
|
|
693
|
+
margin: var(--editor-block-space) 0;
|
|
694
|
+
}
|
|
703
695
|
}
|
package/src/css/flow.css
CHANGED
package/src/css/form.css
CHANGED
|
@@ -95,7 +95,7 @@
|
|
|
95
95
|
|
|
96
96
|
/* input */
|
|
97
97
|
.j-input:not([type='checkbox']) {
|
|
98
|
-
display: block;
|
|
98
|
+
/* display: block; */
|
|
99
99
|
padding: var(--input-padding, calc(var(--space) * 1.5) var(--s2));
|
|
100
100
|
border-width: var(--input-border-width, 1px);
|
|
101
101
|
border-style: var(--input-border-style, solid);
|
|
@@ -896,10 +896,7 @@
|
|
|
896
896
|
|
|
897
897
|
/* status readonly */
|
|
898
898
|
.j-input:not([type='file']):not(.is-line):not(.is-blank)[readonly] {
|
|
899
|
-
background-color: var(
|
|
900
|
-
--input-readonly-background,
|
|
901
|
-
var(--ui-surface-active)
|
|
902
|
-
);
|
|
899
|
+
background-color: var(--input-readonly-bg, var(--ui-surface-active));
|
|
903
900
|
}
|
|
904
901
|
|
|
905
902
|
.j-textarea[readonly] {
|
package/src/css/icon.css
CHANGED
|
@@ -11,8 +11,6 @@
|
|
|
11
11
|
transform: scale(1);
|
|
12
12
|
width: var(--font-size-xl);
|
|
13
13
|
height: var(--font-size-xl);
|
|
14
|
-
/* border: 1px solid; */
|
|
15
|
-
/* border-radius: 50%; */
|
|
16
14
|
color: inherit;
|
|
17
15
|
cursor: pointer;
|
|
18
16
|
}
|
|
@@ -47,12 +45,12 @@
|
|
|
47
45
|
background-color: var(--tone-subtle);
|
|
48
46
|
}
|
|
49
47
|
|
|
50
|
-
/* icon
|
|
51
|
-
.el-icon[data-action
|
|
48
|
+
/* icon status */
|
|
49
|
+
.el-icon[data-action='close'] {
|
|
52
50
|
cursor: pointer;
|
|
53
51
|
}
|
|
54
52
|
|
|
55
|
-
.el-icon[data-action
|
|
53
|
+
.el-icon[data-action='close']:active {
|
|
56
54
|
transform: scale(0.85);
|
|
57
55
|
}
|
|
58
56
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
@layer themes {
|
|
2
2
|
.j-avatar {
|
|
3
3
|
--avatar-size: var(--el-height-md);
|
|
4
|
-
--avatar-border-radius: var(--radius-
|
|
4
|
+
--avatar-border-radius: var(--radius-sm);
|
|
5
5
|
--avatar-box-shadow: var(--shadow-sm);
|
|
6
6
|
}
|
|
7
7
|
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
.j-avatar.is-round {
|
|
33
|
-
--avatar-border-radius:
|
|
33
|
+
--avatar-border-radius: var(--radius-lg);
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
.j-avatar.is-text {
|
|
@@ -9,15 +9,15 @@
|
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
.j-editor {
|
|
12
|
-
--editor-outline: 0;
|
|
13
12
|
--editor-font-size: var(--font-size-lg);
|
|
14
13
|
--editor-line-height: 1.75;
|
|
15
14
|
--editor-letter-space: 0.01em;
|
|
16
15
|
--editor-word-space: 0.02em;
|
|
17
|
-
--editor-
|
|
18
|
-
--editor-
|
|
19
|
-
--editor-
|
|
20
|
-
--editor-list-space: 0.
|
|
16
|
+
--editor-heading-space: 2rem;
|
|
17
|
+
--editor-block-space: 1.5rem;
|
|
18
|
+
--editor-paragraph-space: 1.25rem;
|
|
19
|
+
--editor-list-space: 0.25rem;
|
|
20
|
+
--editor-dot-space: 0.125rem;
|
|
21
21
|
|
|
22
22
|
--editor-heading-fg: var(--tone-heading);
|
|
23
23
|
--editor-caption-fg: var(--tone-caption);
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
--editor-link-hover: var(--tone-link-hover);
|
|
31
31
|
--editor-link-visited: var(--tone-link-visited);
|
|
32
32
|
--editor-link-active: var(--tone-link-active);
|
|
33
|
-
--editor-border: var(--ui-border);
|
|
33
|
+
--editor-border: var(--ui-border-subtle);
|
|
34
34
|
--editor-code-bg: var(--tone-code-bg);
|
|
35
35
|
--editor-code-fg: var(--tone-code-fg);
|
|
36
36
|
--editor-bg-subtle: var(--ui-bg-subtle);
|
|
@@ -39,25 +39,16 @@
|
|
|
39
39
|
.j-editor.is-sm {
|
|
40
40
|
--editor-font-size: var(--font-size-md);
|
|
41
41
|
--editor-line-height: 1.65;
|
|
42
|
-
--editor-paragraph-space: 1em;
|
|
43
|
-
--editor-heading-space: 1.25em;
|
|
44
|
-
--editor-block-space: 1.25em;
|
|
45
42
|
}
|
|
46
43
|
|
|
47
44
|
.j-editor.is-lg {
|
|
48
45
|
--editor-font-size: var(--font-size-xl);
|
|
49
46
|
--editor-line-height: 1.8;
|
|
50
|
-
--editor-paragraph-space: 1.5em;
|
|
51
|
-
--editor-heading-space: 1.75em;
|
|
52
|
-
--editor-block-space: 1.75em;
|
|
53
47
|
}
|
|
54
48
|
|
|
55
49
|
.j-editor.is-xl {
|
|
56
50
|
--editor-font-size: var(--font-size-2xl);
|
|
57
51
|
--editor-line-height: 1.85;
|
|
58
|
-
--editor-paragraph-space: 1.75em;
|
|
59
|
-
--editor-heading-space: 2em;
|
|
60
|
-
--editor-block-space: 2em;
|
|
61
52
|
}
|
|
62
53
|
|
|
63
54
|
.j-radius-round .j-editor {
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
--tooltip-border-color: var(--ui-border-strong);
|
|
8
8
|
--tooltip-border-radius: var(--radius-md);
|
|
9
9
|
--tooltip-max-width: 260px;
|
|
10
|
-
--tooltip-padding:
|
|
10
|
+
--tooltip-padding: 2px var(--s2);
|
|
11
11
|
--tooltip-font-size: var(--font-size-md);
|
|
12
12
|
--tooltip-line-height: var(--line-height);
|
|
13
13
|
}
|