@charcoal-ui/react-sandbox 2.3.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/components/TextEllipsis/helper.d.ts +1 -1
- package/dist/components/TextEllipsis/helper.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 +6 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.modern.js +6 -5
- package/dist/index.modern.js.map +1 -1
- package/dist/index.module.js +6 -5
- 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
|
@@ -10,7 +10,7 @@ import { animated, useSpring } from 'react-spring';
|
|
|
10
10
|
import warning from 'warning';
|
|
11
11
|
|
|
12
12
|
function _extends() {
|
|
13
|
-
_extends = Object.assign
|
|
13
|
+
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
14
14
|
for (var i = 1; i < arguments.length; i++) {
|
|
15
15
|
var source = arguments[i];
|
|
16
16
|
|
|
@@ -23,7 +23,6 @@ function _extends() {
|
|
|
23
23
|
|
|
24
24
|
return target;
|
|
25
25
|
};
|
|
26
|
-
|
|
27
26
|
return _extends.apply(this, arguments);
|
|
28
27
|
}
|
|
29
28
|
|
|
@@ -1088,6 +1087,8 @@ var isEdge = function isEdge() {
|
|
|
1088
1087
|
return navigator.userAgent.includes('Edge/');
|
|
1089
1088
|
};
|
|
1090
1089
|
|
|
1090
|
+
var useIsomorphicLayoutEffect = typeof window !== 'undefined' ? useLayoutEffect : useEffect;
|
|
1091
|
+
|
|
1091
1092
|
function unreachable(value) {
|
|
1092
1093
|
throw new Error(arguments.length === 0 ? 'unreachable' : "unreachable (" + JSON.stringify(value) + ")");
|
|
1093
1094
|
}
|
|
@@ -1365,7 +1366,7 @@ function Carousel(_ref) {
|
|
|
1365
1366
|
onResize(clientWidth);
|
|
1366
1367
|
}
|
|
1367
1368
|
}, [onResize]);
|
|
1368
|
-
|
|
1369
|
+
useIsomorphicLayoutEffect(function () {
|
|
1369
1370
|
var elm = ref.current;
|
|
1370
1371
|
var innerElm = innerRef.current;
|
|
1371
1372
|
|
|
@@ -1387,7 +1388,7 @@ function Carousel(_ref) {
|
|
|
1387
1388
|
};
|
|
1388
1389
|
}, [handleResize, handleScroll]); // 初期スクロールを行う
|
|
1389
1390
|
|
|
1390
|
-
|
|
1391
|
+
useIsomorphicLayoutEffect(function () {
|
|
1391
1392
|
if (align !== 'left' || scrollOffset !== 0) {
|
|
1392
1393
|
var scroll = ref.current;
|
|
1393
1394
|
|
|
@@ -1413,7 +1414,7 @@ function Carousel(_ref) {
|
|
|
1413
1414
|
disableGradient = _useState4[0],
|
|
1414
1415
|
setDisableGradient = _useState4[1];
|
|
1415
1416
|
|
|
1416
|
-
|
|
1417
|
+
useIsomorphicLayoutEffect(function () {
|
|
1417
1418
|
if (isEdge()) {
|
|
1418
1419
|
setDisableGradient(true);
|
|
1419
1420
|
}
|