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.
Files changed (2) hide show
  1. package/dist/index.js +14 -7
  2. 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((document.body.clientWidth - Iy) / 8);
16449
- return t.useEffect(() => {
16450
- function t() {
16451
- !c.current || e.length === 0 || u((c.current.offsetWidth - Iy) / e.length);
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
- return window.addEventListener("resize", t), () => {
16454
- window.removeEventListener("resize", t);
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
- }, [e.length]), /* @__PURE__ */ b("div", {
16463
+ }, [d]), /* @__PURE__ */ b("div", {
16457
16464
  className: "calendar-time-slot",
16458
16465
  ref: c,
16459
16466
  onClick: (e) => {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "loon-bulma-react",
3
3
  "private": false,
4
- "version": "2026.0.53",
4
+ "version": "2026.0.54",
5
5
  "description": "Bulma &amp; React componenten voor Loon Salarissoftware",
6
6
  "type": "module",
7
7
  "license": "MIT",