@economic/taco 2.59.0 → 2.60.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/taco.cjs CHANGED
@@ -37314,13 +37314,26 @@ function Body(props) {
37314
37314
  }
37315
37315
  }
37316
37316
  };
37317
- const handleMouseMove = React.useCallback((event) => {
37318
- var _a, _b;
37319
- const index2 = (_b = (_a = event.target) == null ? void 0 : _a.closest("tr")) == null ? void 0 : _b.getAttribute("data-row-index");
37320
- if (index2) {
37321
- tableMeta.rowActive.setRowHoverIndex(Number.parseInt(index2));
37322
- }
37323
- }, []);
37317
+ const handleMouseMove = React.useCallback(
37318
+ (event) => {
37319
+ var _a, _b;
37320
+ if (!(event.target instanceof HTMLElement)) {
37321
+ return;
37322
+ }
37323
+ const currentTable = (_a = ref.current) == null ? void 0 : _a.closest("table");
37324
+ const targetTable = event.target.closest("table");
37325
+ if (targetTable !== currentTable) {
37326
+ return;
37327
+ }
37328
+ const rowIndex = (_b = event.target.closest("tr[data-row-id]")) == null ? void 0 : _b.getAttribute("data-row-index");
37329
+ if (!rowIndex) {
37330
+ tableMeta.rowActive.setRowHoverIndex(void 0);
37331
+ return;
37332
+ }
37333
+ tableMeta.rowActive.setRowHoverIndex(Number(rowIndex));
37334
+ },
37335
+ [ref]
37336
+ );
37324
37337
  const handleMouseLeave = React.useCallback(() => tableMeta.rowActive.setRowHoverIndex(void 0), []);
37325
37338
  return /* @__PURE__ */ React.createElement(
37326
37339
  "tbody",
@@ -43414,19 +43427,20 @@ function Control(props) {
43414
43427
  }
43415
43428
  }, [controlRenderer]);
43416
43429
  if (typeof controlRenderer === "function") {
43417
- return React.cloneElement(
43418
- controlRenderer(
43419
- {
43420
- ...attributes,
43421
- setValue: (value2) => onChange(value2),
43422
- value
43423
- },
43424
- void 0,
43425
- filters
43426
- ),
43427
- { ["data-query-selector"]: querySelector, className: "focus:yt-focus" }
43430
+ const control = controlRenderer(
43431
+ {
43432
+ ...attributes,
43433
+ setValue: (value2) => onChange(value2),
43434
+ value
43435
+ },
43436
+ void 0,
43437
+ filters
43428
43438
  );
43429
- } else if (controlRenderer === "datepicker" || dataType === "datetime" || dataType === "date") {
43439
+ if (control) {
43440
+ return React.cloneElement(control, { ["data-query-selector"]: querySelector, className: "focus:yt-focus" });
43441
+ }
43442
+ }
43443
+ if (controlRenderer === "datepicker" || dataType === "datetime" || dataType === "date") {
43430
43444
  return /* @__PURE__ */ React.createElement(Datepicker, { ...attributes, onChange: (event) => onChange(event.detail), value });
43431
43445
  } else if (controlRenderer === "switch") {
43432
43446
  return /* @__PURE__ */ React.createElement(Switch$1, { ...attributes, className: "m-1.5", checked: Boolean(value), onChange });