reifyui 0.6.0 → 0.6.1
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.cjs +4 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +4 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/Carousel.jsx +10 -3
- package/styles/chat.css +5 -1
package/dist/index.js
CHANGED
|
@@ -2851,6 +2851,7 @@ function sheetToAoA(sheet, { cellText = defaultCellValue } = {}) {
|
|
|
2851
2851
|
// src/components/Carousel.jsx
|
|
2852
2852
|
import React9, { useCallback as useCallback5, useEffect as useEffect9, useRef as useRef8, useState as useState9 } from "react";
|
|
2853
2853
|
import { jsx as jsx14, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
2854
|
+
var EDGE = 2;
|
|
2854
2855
|
function Carousel(props) {
|
|
2855
2856
|
const { label, step, children, classNames = {} } = props;
|
|
2856
2857
|
const ref = useRef8(null);
|
|
@@ -2858,11 +2859,11 @@ function Carousel(props) {
|
|
|
2858
2859
|
const measure = useCallback5(() => {
|
|
2859
2860
|
const el = ref.current;
|
|
2860
2861
|
if (!el) return;
|
|
2861
|
-
const overflow = el.scrollWidth - el.clientWidth >
|
|
2862
|
+
const overflow = el.scrollWidth - el.clientWidth > EDGE;
|
|
2862
2863
|
setEdges({
|
|
2863
2864
|
overflow,
|
|
2864
|
-
start: el.scrollLeft <=
|
|
2865
|
-
end: el.scrollLeft >= el.scrollWidth - el.clientWidth -
|
|
2865
|
+
start: el.scrollLeft <= EDGE,
|
|
2866
|
+
end: el.scrollLeft >= el.scrollWidth - el.clientWidth - EDGE
|
|
2866
2867
|
});
|
|
2867
2868
|
}, []);
|
|
2868
2869
|
useEffect9(() => {
|