@charcoal-ui/react-sandbox 2.4.0 → 2.5.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/dist/components/Carousel/index.d.ts.map +1 -1
- package/dist/hooks/index.d.ts +3 -0
- package/dist/hooks/index.d.ts.map +1 -0
- package/dist/index.cjs +5 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.modern.js +5 -3
- package/dist/index.modern.js.map +1 -1
- package/dist/index.module.js +5 -3
- package/dist/index.module.js.map +1 -1
- package/dist/styled.d.ts +75 -73
- package/dist/styled.d.ts.map +1 -1
- package/package.json +7 -7
- package/src/components/Carousel/index.tsx +5 -10
- package/src/hooks/index.ts +4 -0
package/dist/index.module.js
CHANGED
|
@@ -1087,6 +1087,8 @@ var isEdge = function isEdge() {
|
|
|
1087
1087
|
return navigator.userAgent.includes('Edge/');
|
|
1088
1088
|
};
|
|
1089
1089
|
|
|
1090
|
+
var useIsomorphicLayoutEffect = typeof window !== 'undefined' ? useLayoutEffect : useEffect;
|
|
1091
|
+
|
|
1090
1092
|
function unreachable(value) {
|
|
1091
1093
|
throw new Error(arguments.length === 0 ? 'unreachable' : "unreachable (" + JSON.stringify(value) + ")");
|
|
1092
1094
|
}
|
|
@@ -1364,7 +1366,7 @@ function Carousel(_ref) {
|
|
|
1364
1366
|
onResize(clientWidth);
|
|
1365
1367
|
}
|
|
1366
1368
|
}, [onResize]);
|
|
1367
|
-
|
|
1369
|
+
useIsomorphicLayoutEffect(function () {
|
|
1368
1370
|
var elm = ref.current;
|
|
1369
1371
|
var innerElm = innerRef.current;
|
|
1370
1372
|
|
|
@@ -1386,7 +1388,7 @@ function Carousel(_ref) {
|
|
|
1386
1388
|
};
|
|
1387
1389
|
}, [handleResize, handleScroll]); // 初期スクロールを行う
|
|
1388
1390
|
|
|
1389
|
-
|
|
1391
|
+
useIsomorphicLayoutEffect(function () {
|
|
1390
1392
|
if (align !== 'left' || scrollOffset !== 0) {
|
|
1391
1393
|
var scroll = ref.current;
|
|
1392
1394
|
|
|
@@ -1412,7 +1414,7 @@ function Carousel(_ref) {
|
|
|
1412
1414
|
disableGradient = _useState4[0],
|
|
1413
1415
|
setDisableGradient = _useState4[1];
|
|
1414
1416
|
|
|
1415
|
-
|
|
1417
|
+
useIsomorphicLayoutEffect(function () {
|
|
1416
1418
|
if (isEdge()) {
|
|
1417
1419
|
setDisableGradient(true);
|
|
1418
1420
|
}
|