vanilla-jui 1.5.26 → 1.5.28
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.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 +6 -4
- package/src/css/editor.css +6 -15
- package/src/locales/index.ts +2 -0
package/package.json
CHANGED
package/src/components/flow.ts
CHANGED
|
@@ -12,6 +12,7 @@ import {
|
|
|
12
12
|
resolveProps,
|
|
13
13
|
validateParam,
|
|
14
14
|
} from '../utilities/types.ts';
|
|
15
|
+
import { translate } from '../utilities/locale.ts';
|
|
15
16
|
|
|
16
17
|
export type FlowData = Record<string, unknown>;
|
|
17
18
|
export type FlowPayload = FlowData | null;
|
|
@@ -443,10 +444,11 @@ const FLOW_PROPS_SCHEMA = {
|
|
|
443
444
|
normalize: (value: unknown) => {
|
|
444
445
|
const text = isPlainObject(value) ? (value as Partial<FlowText>) : {};
|
|
445
446
|
return {
|
|
446
|
-
back: typeof text.back === 'string' ? text.back : '
|
|
447
|
-
next: typeof text.next === 'string' ? text.next : 'Next',
|
|
448
|
-
finish:
|
|
449
|
-
|
|
447
|
+
back: typeof text.back === 'string' ? text.back : translate('b'),
|
|
448
|
+
next: typeof text.next === 'string' ? text.next : translate('Next'),
|
|
449
|
+
finish:
|
|
450
|
+
typeof text.finish === 'string' ? text.finish : translate('Finish'),
|
|
451
|
+
reset: typeof text.reset === 'string' ? text.reset : translate('Reset'),
|
|
450
452
|
};
|
|
451
453
|
},
|
|
452
454
|
},
|
package/src/css/editor.css
CHANGED
|
@@ -33,11 +33,11 @@
|
|
|
33
33
|
/* ============================================
|
|
34
34
|
Typography - 段落与标题
|
|
35
35
|
============================================ */
|
|
36
|
-
.j-editor p:first-
|
|
36
|
+
.j-editor > p:first-of-type {
|
|
37
37
|
margin-bottom: var(--editor-paragraph-space);
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
-
.j-editor p:not(:first-
|
|
40
|
+
.j-editor > p:not(:first-of-type) {
|
|
41
41
|
margin-block: var(--editor-paragraph-space);
|
|
42
42
|
}
|
|
43
43
|
|
|
@@ -48,9 +48,8 @@
|
|
|
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.8);
|
|
52
52
|
font-weight: 600;
|
|
53
|
-
/* line-height: 1.3; */
|
|
54
53
|
color: var(--editor-heading-fg);
|
|
55
54
|
letter-spacing: -0.02em;
|
|
56
55
|
}
|
|
@@ -268,10 +267,6 @@
|
|
|
268
267
|
color: var(--tone-body);
|
|
269
268
|
}
|
|
270
269
|
|
|
271
|
-
.j-editor dd + dt {
|
|
272
|
-
margin-top: 1em;
|
|
273
|
-
}
|
|
274
|
-
|
|
275
270
|
/* checkbox - 任务列表 */
|
|
276
271
|
.j-editor .j-checkbox {
|
|
277
272
|
margin-block: var(--editor-paragraph-space);
|
|
@@ -293,11 +288,11 @@
|
|
|
293
288
|
}
|
|
294
289
|
|
|
295
290
|
.j-editor blockquote p {
|
|
296
|
-
margin: 0;
|
|
291
|
+
margin-block: 0;
|
|
297
292
|
}
|
|
298
293
|
|
|
299
294
|
.j-editor blockquote p + p {
|
|
300
|
-
margin-top: 0.
|
|
295
|
+
margin-top: 0.625em;
|
|
301
296
|
}
|
|
302
297
|
|
|
303
298
|
.j-editor cite {
|
|
@@ -649,10 +644,6 @@
|
|
|
649
644
|
margin-bottom: 1em;
|
|
650
645
|
}
|
|
651
646
|
|
|
652
|
-
/* .j-editor details[open]>summary {
|
|
653
|
-
margin-bottom: 0.75em;
|
|
654
|
-
} */
|
|
655
|
-
|
|
656
647
|
.j-editor details[open] > summary + * {
|
|
657
648
|
margin-top: 0;
|
|
658
649
|
}
|
|
@@ -685,7 +676,7 @@
|
|
|
685
676
|
|
|
686
677
|
.j-editor address {
|
|
687
678
|
font-style: normal;
|
|
688
|
-
margin:
|
|
679
|
+
margin-block: var(--editor-block-space);
|
|
689
680
|
padding: 1em 1.25em;
|
|
690
681
|
background-color: var(--editor-bg-subtle);
|
|
691
682
|
border-radius: var(--radius-lg);
|