loon-bulma-react 2026.0.53 → 2026.0.54
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.js +14 -7
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -16445,15 +16445,22 @@ function Ly({ hour: e }) {
|
|
|
16445
16445
|
});
|
|
16446
16446
|
}
|
|
16447
16447
|
function Ry({ events: e, hour: n, date: r, onEventClick: i, onCellClick: a, options: o, lastVisibleHour: s }) {
|
|
16448
|
-
let c = t.useRef(null), [l, u] = t.useState(
|
|
16449
|
-
|
|
16450
|
-
|
|
16451
|
-
|
|
16448
|
+
let c = t.useRef(null), [l, u] = t.useState(0), d = t.useCallback(() => {
|
|
16449
|
+
let t = c.current?.offsetWidth ?? 0;
|
|
16450
|
+
if (e.length === 0 || t <= 0) {
|
|
16451
|
+
u(0);
|
|
16452
|
+
return;
|
|
16452
16453
|
}
|
|
16453
|
-
|
|
16454
|
-
|
|
16454
|
+
let n = Math.max(0, t - Iy);
|
|
16455
|
+
u(n / e.length);
|
|
16456
|
+
}, [e.length]);
|
|
16457
|
+
return t.useEffect(() => {
|
|
16458
|
+
d();
|
|
16459
|
+
let e = c.current, t = e ? new ResizeObserver(d) : null;
|
|
16460
|
+
return e && t?.observe(e), window.addEventListener("resize", d), () => {
|
|
16461
|
+
t?.disconnect(), window.removeEventListener("resize", d);
|
|
16455
16462
|
};
|
|
16456
|
-
}, [
|
|
16463
|
+
}, [d]), /* @__PURE__ */ b("div", {
|
|
16457
16464
|
className: "calendar-time-slot",
|
|
16458
16465
|
ref: c,
|
|
16459
16466
|
onClick: (e) => {
|