@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.
@@ -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
- useLayoutEffect(function () {
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
- useLayoutEffect(function () {
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
- useLayoutEffect(function () {
1417
+ useIsomorphicLayoutEffect(function () {
1416
1418
  if (isEdge()) {
1417
1419
  setDisableGradient(true);
1418
1420
  }