vanilla-jui 1.7.21 → 1.7.23
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/swiper.ts +16 -4
- package/src/css/layout.css +6 -3
- package/src/css/themes/default/avatar.css +2 -1
- package/src/css/themes/default/breadcrumb.css +2 -1
- package/src/css/themes/default/button.css +4 -1
- package/src/css/themes/default/editor.css +15 -8
- package/src/css/themes/default/form.css +21 -16
- package/src/css/themes/default/theme-palette.css +4 -4
- package/src/css/tokens.css +18 -18
package/package.json
CHANGED
package/src/components/swiper.ts
CHANGED
|
@@ -259,6 +259,18 @@ function cloneData(data: SwiperDataItem[] | undefined): SwiperDataItem[] {
|
|
|
259
259
|
return Array.isArray(data) ? data.map((item) => ({ ...item })) : [];
|
|
260
260
|
}
|
|
261
261
|
|
|
262
|
+
function cloneRenderableContent<TContext>(
|
|
263
|
+
content: RenderableContent<TContext>
|
|
264
|
+
): RenderableContent<TContext> {
|
|
265
|
+
if (typeof Node !== 'undefined' && content instanceof Node) {
|
|
266
|
+
return content.cloneNode(true);
|
|
267
|
+
}
|
|
268
|
+
if (Array.isArray(content)) {
|
|
269
|
+
return content.map((item) => cloneRenderableContent(item));
|
|
270
|
+
}
|
|
271
|
+
return content;
|
|
272
|
+
}
|
|
273
|
+
|
|
262
274
|
function cloneDataSource(source: SwiperDataSource): SwiperDataSource {
|
|
263
275
|
return Array.isArray(source) ? cloneData(source) : source;
|
|
264
276
|
}
|
|
@@ -774,7 +786,7 @@ export function createSwiper(input: SwiperProps = {}): Swiper {
|
|
|
774
786
|
const realIndex = (): number =>
|
|
775
787
|
toRealIndexFromTrackPosition(trackIndexAccessor());
|
|
776
788
|
const slideContent = () => {
|
|
777
|
-
const { item } = itemAccessor();
|
|
789
|
+
const { item, clone } = itemAccessor();
|
|
778
790
|
if (item.children != null) {
|
|
779
791
|
const context = {
|
|
780
792
|
swiper,
|
|
@@ -783,11 +795,11 @@ export function createSwiper(input: SwiperProps = {}): Swiper {
|
|
|
783
795
|
return realIndex();
|
|
784
796
|
},
|
|
785
797
|
} as SwiperSlideContext;
|
|
786
|
-
|
|
798
|
+
const content =
|
|
787
799
|
typeof item.children === 'function'
|
|
788
800
|
? item.children(context)
|
|
789
|
-
: item.children
|
|
790
|
-
);
|
|
801
|
+
: item.children;
|
|
802
|
+
return asRenderable(clone ? cloneRenderableContent(content) : content);
|
|
791
803
|
}
|
|
792
804
|
return [
|
|
793
805
|
item.image
|
package/src/css/layout.css
CHANGED
|
@@ -156,8 +156,10 @@
|
|
|
156
156
|
.container {
|
|
157
157
|
width: 100%;
|
|
158
158
|
max-width: var(--screen-xl, 1200px);
|
|
159
|
-
margin-inline: auto;
|
|
160
|
-
padding-inline:
|
|
159
|
+
/* margin-inline: auto; */
|
|
160
|
+
/* padding-inline: 1rem; */
|
|
161
|
+
margin: 0 auto;
|
|
162
|
+
padding: 0 1rem;
|
|
161
163
|
}
|
|
162
164
|
|
|
163
165
|
.auto-container {
|
|
@@ -168,8 +170,9 @@
|
|
|
168
170
|
}
|
|
169
171
|
|
|
170
172
|
.block-center {
|
|
171
|
-
margin-inline: auto;
|
|
172
173
|
height: fit-content;
|
|
174
|
+
margin: 0 auto;
|
|
175
|
+
/* margin-inline: auto; */
|
|
173
176
|
}
|
|
174
177
|
|
|
175
178
|
.group {
|
|
@@ -195,7 +195,10 @@
|
|
|
195
195
|
opacity: var(--opacity-active);
|
|
196
196
|
}
|
|
197
197
|
|
|
198
|
-
.j-button:not(:disabled).is-active
|
|
198
|
+
.j-button:not(:disabled).is-active {
|
|
199
|
+
--btn-border-color: var(--tone-solid);
|
|
200
|
+
}
|
|
201
|
+
|
|
199
202
|
.j-button:not(:disabled):focus,
|
|
200
203
|
.j-button:not(:disabled):focus-within,
|
|
201
204
|
.j-button:not(:disabled):focus-visible {
|
|
@@ -93,7 +93,7 @@
|
|
|
93
93
|
font-size: 2em;
|
|
94
94
|
letter-spacing: -0.02em;
|
|
95
95
|
line-height: 1.25;
|
|
96
|
-
margin
|
|
96
|
+
margin: 0;
|
|
97
97
|
}
|
|
98
98
|
|
|
99
99
|
.j-editor h2 {
|
|
@@ -287,7 +287,8 @@
|
|
|
287
287
|
|
|
288
288
|
/* Definition List */
|
|
289
289
|
.j-editor dl {
|
|
290
|
-
margin-block: var(--editor-block-space);
|
|
290
|
+
/* margin-block: var(--editor-block-space); */
|
|
291
|
+
margin: var(--editor-block-space) 0;
|
|
291
292
|
}
|
|
292
293
|
|
|
293
294
|
.j-editor dt {
|
|
@@ -390,7 +391,8 @@
|
|
|
390
391
|
}
|
|
391
392
|
|
|
392
393
|
.j-editor blockquote > * {
|
|
393
|
-
margin-block: 0;
|
|
394
|
+
/* margin-block: 0; */
|
|
395
|
+
margin: 0;
|
|
394
396
|
}
|
|
395
397
|
|
|
396
398
|
.j-editor blockquote > * + * {
|
|
@@ -399,7 +401,8 @@
|
|
|
399
401
|
|
|
400
402
|
.j-editor cite {
|
|
401
403
|
display: block;
|
|
402
|
-
margin-block: 0.25rem;
|
|
404
|
+
/* margin-block: 0.25rem; */
|
|
405
|
+
margin: 0.25rem 0;
|
|
403
406
|
font-style: normal;
|
|
404
407
|
font-size: 0.875em;
|
|
405
408
|
color: var(--editor-caption-fg);
|
|
@@ -746,13 +749,15 @@
|
|
|
746
749
|
border-radius: 9999px;
|
|
747
750
|
overflow: hidden;
|
|
748
751
|
height: 0.625em;
|
|
749
|
-
margin-block: 0.25em;
|
|
752
|
+
/* margin-block: 0.25em; */
|
|
753
|
+
margin: 0.25em 0;
|
|
750
754
|
}
|
|
751
755
|
|
|
752
756
|
.j-editor meter {
|
|
753
757
|
max-width: 100%;
|
|
754
758
|
height: 1em;
|
|
755
|
-
margin-block: 0.125em;
|
|
759
|
+
/* margin-block: 0.125em; */
|
|
760
|
+
margin: 0.125em 0;
|
|
756
761
|
}
|
|
757
762
|
|
|
758
763
|
.j-editor progress::-webkit-progress-value,
|
|
@@ -773,7 +778,8 @@
|
|
|
773
778
|
============================================ */
|
|
774
779
|
.j-editor address {
|
|
775
780
|
font-style: normal;
|
|
776
|
-
margin-block: var(--editor-block-space);
|
|
781
|
+
/* margin-block: var(--editor-block-space); */
|
|
782
|
+
margin: var(--editor-block-space) 0;
|
|
777
783
|
padding: 1em 1.25em;
|
|
778
784
|
background-color: var(--editor-bg-subtle);
|
|
779
785
|
border-radius: var(--radius-lg);
|
|
@@ -794,7 +800,8 @@
|
|
|
794
800
|
|
|
795
801
|
.j-editor table,
|
|
796
802
|
.j-editor .block {
|
|
797
|
-
margin-block: var(--editor-block-space);
|
|
803
|
+
/* margin-block: var(--editor-block-space); */
|
|
804
|
+
margin: var(--editor-block-space) 0;
|
|
798
805
|
}
|
|
799
806
|
|
|
800
807
|
.j-editor table {
|
|
@@ -139,22 +139,25 @@
|
|
|
139
139
|
color: var(--ui-fg-muted);
|
|
140
140
|
appearance: none;
|
|
141
141
|
border-width: 0;
|
|
142
|
-
border-inline-end-width: 1px;
|
|
142
|
+
/* border-inline-end-width: 1px; */
|
|
143
|
+
border-right-width: 1px;
|
|
143
144
|
border-radius: 0;
|
|
144
145
|
border-color: var(--ui-border);
|
|
145
146
|
background-color: transparent;
|
|
146
|
-
margin: calc(var(--
|
|
147
|
+
margin: calc(var(--s2) * -1);
|
|
147
148
|
font-size: var(--input-font-size);
|
|
148
149
|
}
|
|
149
150
|
|
|
150
151
|
.j-input[type='file']::file-selector-button,
|
|
151
152
|
.j-font-sm .j-input[type='file']::file-selector-button {
|
|
152
|
-
margin-inline-end: var(--s2);
|
|
153
|
+
/* margin-inline-end: var(--s2); */
|
|
154
|
+
margin-right: var(--s2);
|
|
153
155
|
padding: var(--s2);
|
|
154
156
|
}
|
|
155
157
|
|
|
156
158
|
.j-font-md .j-input[type='file']::file-selector-button {
|
|
157
|
-
margin-inline-end: calc(var(--space) * 2.75);
|
|
159
|
+
/* margin-inline-end: calc(var(--space) * 2.75); */
|
|
160
|
+
margin-right: calc(var(--space) * 2.75);
|
|
158
161
|
padding: calc(var(--space) * 2.75);
|
|
159
162
|
}
|
|
160
163
|
|
|
@@ -615,11 +618,14 @@
|
|
|
615
618
|
}
|
|
616
619
|
|
|
617
620
|
.input-inner-group .el-addon + .j-input {
|
|
618
|
-
padding-inline: 0 var(--space);
|
|
621
|
+
/* padding-inline: 0 var(--space); */
|
|
622
|
+
padding-left: 0;
|
|
623
|
+
padding-right: var(--space);
|
|
619
624
|
}
|
|
620
625
|
|
|
621
626
|
.input-inner-group .el-addon + .j-select {
|
|
622
|
-
padding-inline-start: 2px;
|
|
627
|
+
/* padding-inline-start: 2px; */
|
|
628
|
+
padding-left: 2px;
|
|
623
629
|
}
|
|
624
630
|
|
|
625
631
|
.input-inner-group .el-addon {
|
|
@@ -655,13 +661,17 @@
|
|
|
655
661
|
.input-inner-group .el-addon.is-text {
|
|
656
662
|
display: flex;
|
|
657
663
|
align-items: center;
|
|
658
|
-
padding-inline: var(--s2);
|
|
659
664
|
user-select: none;
|
|
665
|
+
/* padding-inline: var(--s2); */
|
|
666
|
+
padding-left: var(--s2);
|
|
667
|
+
padding-right: var(--s2);
|
|
660
668
|
}
|
|
661
669
|
|
|
662
670
|
.input-inner-group .el-addon.inner-wrap {
|
|
663
671
|
gap: var(--space);
|
|
664
|
-
padding-inline: var(--space);
|
|
672
|
+
/* padding-inline: var(--space); */
|
|
673
|
+
padding-left: var(--space);
|
|
674
|
+
padding-right: var(--space);
|
|
665
675
|
}
|
|
666
676
|
|
|
667
677
|
.input-group .el-addon,
|
|
@@ -801,16 +811,11 @@
|
|
|
801
811
|
/*************************
|
|
802
812
|
* .mobile
|
|
803
813
|
*************************/
|
|
804
|
-
.mobile .j-input[type='file']
|
|
805
|
-
padding:
|
|
806
|
-
margin: calc(var(--space) * -1.7);
|
|
807
|
-
margin-inline-end: calc(var(--space) * 2.75);
|
|
808
|
-
}
|
|
809
|
-
|
|
810
|
-
.mobile.j-font-md .j-input.is-lg[type='file']::file-selector-button {
|
|
811
|
-
margin: calc(var(--space) * -1.4);
|
|
814
|
+
.mobile input.j-input[type='file'] {
|
|
815
|
+
--input-padding: 0.5rem;
|
|
812
816
|
}
|
|
813
817
|
|
|
818
|
+
.mobile .j-input[type='file'],
|
|
814
819
|
.mobile .j-textarea {
|
|
815
820
|
width: 100%;
|
|
816
821
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
@layer components {
|
|
2
2
|
.j-theme-palette {
|
|
3
|
-
padding:
|
|
3
|
+
padding: 1rem 1rem 2rem;
|
|
4
4
|
}
|
|
5
5
|
|
|
6
6
|
.j-theme-palette .palette-container,
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
|
|
37
37
|
.j-theme-palette [data-theme-group='theme'] .j-button {
|
|
38
38
|
justify-content: flex-start;
|
|
39
|
-
padding
|
|
39
|
+
--btn-padding: 0 var(--s2);
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
.j-theme-palette .j-button .item-hex {
|
|
@@ -49,11 +49,11 @@
|
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
.mobile .j-theme-palette {
|
|
52
|
-
padding
|
|
52
|
+
padding: 1rem 1rem 4rem;
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
.mobile .j-theme-palette [data-theme-group='theme'] .j-button {
|
|
56
|
-
padding
|
|
56
|
+
--btn-padding: 0 6px;
|
|
57
57
|
}
|
|
58
58
|
|
|
59
59
|
.j-theme-palette .j-button .button-text {
|
package/src/css/tokens.css
CHANGED
|
@@ -1261,15 +1261,15 @@
|
|
|
1261
1261
|
--font-size-xl: 1.25rem;
|
|
1262
1262
|
--font-size-2xl: 1.5rem;
|
|
1263
1263
|
|
|
1264
|
-
--el-height-3xs: 1.
|
|
1265
|
-
--el-height-2xs:
|
|
1266
|
-
--el-height-xs:
|
|
1267
|
-
--el-height-sm: 2.
|
|
1268
|
-
--el-height-md: 2.
|
|
1269
|
-
--el-height-lg:
|
|
1270
|
-
--el-height-xl:
|
|
1271
|
-
--el-height-2xl: 3.
|
|
1272
|
-
--el-height-3xl: 3.
|
|
1264
|
+
--el-height-3xs: 1.5rem;
|
|
1265
|
+
--el-height-2xs: 1.75rem;
|
|
1266
|
+
--el-height-xs: 2rem;
|
|
1267
|
+
--el-height-sm: 2.25rem;
|
|
1268
|
+
--el-height-md: 2.5rem;
|
|
1269
|
+
--el-height-lg: 2.75rem;
|
|
1270
|
+
--el-height-xl: 3rem;
|
|
1271
|
+
--el-height-2xl: 3.25rem;
|
|
1272
|
+
--el-height-3xl: 3.5rem;
|
|
1273
1273
|
}
|
|
1274
1274
|
|
|
1275
1275
|
.mobile.j-font-md {
|
|
@@ -1280,14 +1280,14 @@
|
|
|
1280
1280
|
--font-size-xl: 1.5rem;
|
|
1281
1281
|
--font-size-2xl: 1.75rem;
|
|
1282
1282
|
|
|
1283
|
-
--el-height-3xs:
|
|
1284
|
-
--el-height-2xs:
|
|
1285
|
-
--el-height-xs: 2.
|
|
1286
|
-
--el-height-sm: 2.
|
|
1287
|
-
--el-height-md:
|
|
1288
|
-
--el-height-lg:
|
|
1289
|
-
--el-height-xl: 3.
|
|
1290
|
-
--el-height-2xl: 3.
|
|
1291
|
-
--el-height-3xl:
|
|
1283
|
+
--el-height-3xs: 1.75rem;
|
|
1284
|
+
--el-height-2xs: 2rem;
|
|
1285
|
+
--el-height-xs: 2.25rem;
|
|
1286
|
+
--el-height-sm: 2.5rem;
|
|
1287
|
+
--el-height-md: 2.75rem;
|
|
1288
|
+
--el-height-lg: 3rem;
|
|
1289
|
+
--el-height-xl: 3.25rem;
|
|
1290
|
+
--el-height-2xl: 3.5rem;
|
|
1291
|
+
--el-height-3xl: 3.75rem;
|
|
1292
1292
|
}
|
|
1293
1293
|
}
|