@x-plat/design-system 0.5.58 → 0.5.60
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/components/CheckBox/index.css +1 -1
- package/dist/components/Radio/index.css +1 -1
- package/dist/components/Swiper/index.cjs +6 -1
- package/dist/components/Swiper/index.css +0 -1
- package/dist/components/Swiper/index.js +6 -1
- package/dist/components/index.cjs +6 -1
- package/dist/components/index.css +2 -3
- package/dist/components/index.js +6 -1
- package/dist/index.cjs +6 -1
- package/dist/index.css +2 -3
- package/dist/index.js +6 -1
- package/package.json +1 -1
|
@@ -88,7 +88,7 @@ var Swiper = (props) => {
|
|
|
88
88
|
);
|
|
89
89
|
const [isDragging, setIsDragging] = import_react.default.useState(false);
|
|
90
90
|
const [dragOffset, setDragOffset] = import_react.default.useState(0);
|
|
91
|
-
const [animated, setAnimated] = import_react.default.useState(
|
|
91
|
+
const [animated, setAnimated] = import_react.default.useState(false);
|
|
92
92
|
const [containerWidth, setContainerWidth] = import_react.default.useState(0);
|
|
93
93
|
const containerRef = import_react.default.useRef(null);
|
|
94
94
|
const startXRef = import_react.default.useRef(0);
|
|
@@ -96,12 +96,17 @@ var Swiper = (props) => {
|
|
|
96
96
|
const autoplayTimerRef = import_react.default.useRef(null);
|
|
97
97
|
const resumeTimeoutRef = import_react.default.useRef(null);
|
|
98
98
|
const [paused, setPaused] = import_react.default.useState(false);
|
|
99
|
+
const initializedRef = import_react.default.useRef(false);
|
|
99
100
|
import_react.default.useEffect(() => {
|
|
100
101
|
const el = containerRef.current;
|
|
101
102
|
if (!el) return;
|
|
102
103
|
const ro = new ResizeObserver((entries) => {
|
|
103
104
|
for (const entry of entries) {
|
|
104
105
|
setContainerWidth(entry.contentRect.width);
|
|
106
|
+
if (!initializedRef.current) {
|
|
107
|
+
initializedRef.current = true;
|
|
108
|
+
requestAnimationFrame(() => setAnimated(true));
|
|
109
|
+
}
|
|
105
110
|
}
|
|
106
111
|
});
|
|
107
112
|
ro.observe(el);
|
|
@@ -52,7 +52,7 @@ var Swiper = (props) => {
|
|
|
52
52
|
);
|
|
53
53
|
const [isDragging, setIsDragging] = React.useState(false);
|
|
54
54
|
const [dragOffset, setDragOffset] = React.useState(0);
|
|
55
|
-
const [animated, setAnimated] = React.useState(
|
|
55
|
+
const [animated, setAnimated] = React.useState(false);
|
|
56
56
|
const [containerWidth, setContainerWidth] = React.useState(0);
|
|
57
57
|
const containerRef = React.useRef(null);
|
|
58
58
|
const startXRef = React.useRef(0);
|
|
@@ -60,12 +60,17 @@ var Swiper = (props) => {
|
|
|
60
60
|
const autoplayTimerRef = React.useRef(null);
|
|
61
61
|
const resumeTimeoutRef = React.useRef(null);
|
|
62
62
|
const [paused, setPaused] = React.useState(false);
|
|
63
|
+
const initializedRef = React.useRef(false);
|
|
63
64
|
React.useEffect(() => {
|
|
64
65
|
const el = containerRef.current;
|
|
65
66
|
if (!el) return;
|
|
66
67
|
const ro = new ResizeObserver((entries) => {
|
|
67
68
|
for (const entry of entries) {
|
|
68
69
|
setContainerWidth(entry.contentRect.width);
|
|
70
|
+
if (!initializedRef.current) {
|
|
71
|
+
initializedRef.current = true;
|
|
72
|
+
requestAnimationFrame(() => setAnimated(true));
|
|
73
|
+
}
|
|
69
74
|
}
|
|
70
75
|
});
|
|
71
76
|
ro.observe(el);
|
|
@@ -5447,7 +5447,7 @@ var Swiper = (props) => {
|
|
|
5447
5447
|
);
|
|
5448
5448
|
const [isDragging, setIsDragging] = import_react32.default.useState(false);
|
|
5449
5449
|
const [dragOffset, setDragOffset] = import_react32.default.useState(0);
|
|
5450
|
-
const [animated, setAnimated] = import_react32.default.useState(
|
|
5450
|
+
const [animated, setAnimated] = import_react32.default.useState(false);
|
|
5451
5451
|
const [containerWidth, setContainerWidth] = import_react32.default.useState(0);
|
|
5452
5452
|
const containerRef = import_react32.default.useRef(null);
|
|
5453
5453
|
const startXRef = import_react32.default.useRef(0);
|
|
@@ -5455,12 +5455,17 @@ var Swiper = (props) => {
|
|
|
5455
5455
|
const autoplayTimerRef = import_react32.default.useRef(null);
|
|
5456
5456
|
const resumeTimeoutRef = import_react32.default.useRef(null);
|
|
5457
5457
|
const [paused, setPaused] = import_react32.default.useState(false);
|
|
5458
|
+
const initializedRef = import_react32.default.useRef(false);
|
|
5458
5459
|
import_react32.default.useEffect(() => {
|
|
5459
5460
|
const el = containerRef.current;
|
|
5460
5461
|
if (!el) return;
|
|
5461
5462
|
const ro = new ResizeObserver((entries) => {
|
|
5462
5463
|
for (const entry of entries) {
|
|
5463
5464
|
setContainerWidth(entry.contentRect.width);
|
|
5465
|
+
if (!initializedRef.current) {
|
|
5466
|
+
initializedRef.current = true;
|
|
5467
|
+
requestAnimationFrame(() => setAnimated(true));
|
|
5468
|
+
}
|
|
5464
5469
|
}
|
|
5465
5470
|
});
|
|
5466
5471
|
ro.observe(el);
|
|
@@ -2684,7 +2684,7 @@
|
|
|
2684
2684
|
/* src/components/CheckBox/checkbox.scss */
|
|
2685
2685
|
.lib-xplat-checkbox {
|
|
2686
2686
|
display: flex;
|
|
2687
|
-
align-items:
|
|
2687
|
+
align-items: flex-start;
|
|
2688
2688
|
gap: var(--spacing-space-2);
|
|
2689
2689
|
cursor: pointer;
|
|
2690
2690
|
user-select: none;
|
|
@@ -4086,7 +4086,7 @@
|
|
|
4086
4086
|
/* src/components/Radio/radio.scss */
|
|
4087
4087
|
.lib-xplat-radio {
|
|
4088
4088
|
display: flex;
|
|
4089
|
-
align-items:
|
|
4089
|
+
align-items: flex-start;
|
|
4090
4090
|
gap: var(--spacing-space-2);
|
|
4091
4091
|
user-select: none;
|
|
4092
4092
|
cursor: pointer;
|
|
@@ -4589,7 +4589,6 @@
|
|
|
4589
4589
|
.lib-xplat-swiper__slide img {
|
|
4590
4590
|
-webkit-user-drag: none;
|
|
4591
4591
|
user-drag: none;
|
|
4592
|
-
pointer-events: none;
|
|
4593
4592
|
}
|
|
4594
4593
|
.lib-xplat-swiper__progress {
|
|
4595
4594
|
margin-top: var(--spacing-space-4);
|
package/dist/components/index.js
CHANGED
|
@@ -5356,7 +5356,7 @@ var Swiper = (props) => {
|
|
|
5356
5356
|
);
|
|
5357
5357
|
const [isDragging, setIsDragging] = React31.useState(false);
|
|
5358
5358
|
const [dragOffset, setDragOffset] = React31.useState(0);
|
|
5359
|
-
const [animated, setAnimated] = React31.useState(
|
|
5359
|
+
const [animated, setAnimated] = React31.useState(false);
|
|
5360
5360
|
const [containerWidth, setContainerWidth] = React31.useState(0);
|
|
5361
5361
|
const containerRef = React31.useRef(null);
|
|
5362
5362
|
const startXRef = React31.useRef(0);
|
|
@@ -5364,12 +5364,17 @@ var Swiper = (props) => {
|
|
|
5364
5364
|
const autoplayTimerRef = React31.useRef(null);
|
|
5365
5365
|
const resumeTimeoutRef = React31.useRef(null);
|
|
5366
5366
|
const [paused, setPaused] = React31.useState(false);
|
|
5367
|
+
const initializedRef = React31.useRef(false);
|
|
5367
5368
|
React31.useEffect(() => {
|
|
5368
5369
|
const el = containerRef.current;
|
|
5369
5370
|
if (!el) return;
|
|
5370
5371
|
const ro = new ResizeObserver((entries) => {
|
|
5371
5372
|
for (const entry of entries) {
|
|
5372
5373
|
setContainerWidth(entry.contentRect.width);
|
|
5374
|
+
if (!initializedRef.current) {
|
|
5375
|
+
initializedRef.current = true;
|
|
5376
|
+
requestAnimationFrame(() => setAnimated(true));
|
|
5377
|
+
}
|
|
5373
5378
|
}
|
|
5374
5379
|
});
|
|
5375
5380
|
ro.observe(el);
|
package/dist/index.cjs
CHANGED
|
@@ -9859,7 +9859,7 @@ var Swiper = (props) => {
|
|
|
9859
9859
|
);
|
|
9860
9860
|
const [isDragging, setIsDragging] = import_react32.default.useState(false);
|
|
9861
9861
|
const [dragOffset, setDragOffset] = import_react32.default.useState(0);
|
|
9862
|
-
const [animated, setAnimated] = import_react32.default.useState(
|
|
9862
|
+
const [animated, setAnimated] = import_react32.default.useState(false);
|
|
9863
9863
|
const [containerWidth, setContainerWidth] = import_react32.default.useState(0);
|
|
9864
9864
|
const containerRef = import_react32.default.useRef(null);
|
|
9865
9865
|
const startXRef = import_react32.default.useRef(0);
|
|
@@ -9867,12 +9867,17 @@ var Swiper = (props) => {
|
|
|
9867
9867
|
const autoplayTimerRef = import_react32.default.useRef(null);
|
|
9868
9868
|
const resumeTimeoutRef = import_react32.default.useRef(null);
|
|
9869
9869
|
const [paused, setPaused] = import_react32.default.useState(false);
|
|
9870
|
+
const initializedRef = import_react32.default.useRef(false);
|
|
9870
9871
|
import_react32.default.useEffect(() => {
|
|
9871
9872
|
const el = containerRef.current;
|
|
9872
9873
|
if (!el) return;
|
|
9873
9874
|
const ro = new ResizeObserver((entries) => {
|
|
9874
9875
|
for (const entry of entries) {
|
|
9875
9876
|
setContainerWidth(entry.contentRect.width);
|
|
9877
|
+
if (!initializedRef.current) {
|
|
9878
|
+
initializedRef.current = true;
|
|
9879
|
+
requestAnimationFrame(() => setAnimated(true));
|
|
9880
|
+
}
|
|
9876
9881
|
}
|
|
9877
9882
|
});
|
|
9878
9883
|
ro.observe(el);
|
package/dist/index.css
CHANGED
|
@@ -2684,7 +2684,7 @@
|
|
|
2684
2684
|
/* src/components/CheckBox/checkbox.scss */
|
|
2685
2685
|
.lib-xplat-checkbox {
|
|
2686
2686
|
display: flex;
|
|
2687
|
-
align-items:
|
|
2687
|
+
align-items: flex-start;
|
|
2688
2688
|
gap: var(--spacing-space-2);
|
|
2689
2689
|
cursor: pointer;
|
|
2690
2690
|
user-select: none;
|
|
@@ -4086,7 +4086,7 @@
|
|
|
4086
4086
|
/* src/components/Radio/radio.scss */
|
|
4087
4087
|
.lib-xplat-radio {
|
|
4088
4088
|
display: flex;
|
|
4089
|
-
align-items:
|
|
4089
|
+
align-items: flex-start;
|
|
4090
4090
|
gap: var(--spacing-space-2);
|
|
4091
4091
|
user-select: none;
|
|
4092
4092
|
cursor: pointer;
|
|
@@ -4589,7 +4589,6 @@
|
|
|
4589
4589
|
.lib-xplat-swiper__slide img {
|
|
4590
4590
|
-webkit-user-drag: none;
|
|
4591
4591
|
user-drag: none;
|
|
4592
|
-
pointer-events: none;
|
|
4593
4592
|
}
|
|
4594
4593
|
.lib-xplat-swiper__progress {
|
|
4595
4594
|
margin-top: var(--spacing-space-4);
|
package/dist/index.js
CHANGED
|
@@ -9459,7 +9459,7 @@ var Swiper = (props) => {
|
|
|
9459
9459
|
);
|
|
9460
9460
|
const [isDragging, setIsDragging] = React31.useState(false);
|
|
9461
9461
|
const [dragOffset, setDragOffset] = React31.useState(0);
|
|
9462
|
-
const [animated, setAnimated] = React31.useState(
|
|
9462
|
+
const [animated, setAnimated] = React31.useState(false);
|
|
9463
9463
|
const [containerWidth, setContainerWidth] = React31.useState(0);
|
|
9464
9464
|
const containerRef = React31.useRef(null);
|
|
9465
9465
|
const startXRef = React31.useRef(0);
|
|
@@ -9467,12 +9467,17 @@ var Swiper = (props) => {
|
|
|
9467
9467
|
const autoplayTimerRef = React31.useRef(null);
|
|
9468
9468
|
const resumeTimeoutRef = React31.useRef(null);
|
|
9469
9469
|
const [paused, setPaused] = React31.useState(false);
|
|
9470
|
+
const initializedRef = React31.useRef(false);
|
|
9470
9471
|
React31.useEffect(() => {
|
|
9471
9472
|
const el = containerRef.current;
|
|
9472
9473
|
if (!el) return;
|
|
9473
9474
|
const ro = new ResizeObserver((entries) => {
|
|
9474
9475
|
for (const entry of entries) {
|
|
9475
9476
|
setContainerWidth(entry.contentRect.width);
|
|
9477
|
+
if (!initializedRef.current) {
|
|
9478
|
+
initializedRef.current = true;
|
|
9479
|
+
requestAnimationFrame(() => setAnimated(true));
|
|
9480
|
+
}
|
|
9476
9481
|
}
|
|
9477
9482
|
});
|
|
9478
9483
|
ro.observe(el);
|