sellmate-design-system-react 9.0.0-beta.76 → 9.0.0-beta.77

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 CHANGED
@@ -16586,6 +16586,7 @@ var STableImpl = /* @__PURE__ */ forwardRef(function STable({
16586
16586
  onVirtualReachEnd,
16587
16587
  tableId,
16588
16588
  onRowClick,
16589
+ onRowDoubleClick,
16589
16590
  className,
16590
16591
  style
16591
16592
  }, ref) {
@@ -17438,13 +17439,18 @@ var STableImpl = /* @__PURE__ */ forwardRef(function STable({
17438
17439
  {
17439
17440
  "data-row-index": rowIndex,
17440
17441
  onClick: () => onRowClick?.(row),
17442
+ onDoubleClick: onRowDoubleClick ? (event) => {
17443
+ const target = event.target;
17444
+ if (target.closest(ROW_INTERACTIVE_SELECTOR)) return;
17445
+ onRowDoubleClick(row);
17446
+ } : void 0,
17441
17447
  onMouseDown: dragSelectOn ? (event) => startDragSelect(rowIndex, event) : void 0,
17442
17448
  onMouseEnter: dragSelectOn ? () => extendDragSelect(rowIndex) : void 0,
17443
17449
  onContextMenu: contextMenuOn ? (event) => openContextMenu(row, event) : void 0,
17444
17450
  className: cn(
17445
17451
  "group/table-row",
17446
17452
  rowHover && "hover:bg-[var(--color-grey-05)]",
17447
- onRowClick && "cursor-pointer",
17453
+ (onRowClick || onRowDoubleClick) && "cursor-pointer",
17448
17454
  dragSelectOn && "select-none"
17449
17455
  ),
17450
17456
  style: { height: virtualScroll ? effectiveRowHeight : rowH },
@@ -17467,6 +17473,7 @@ var STableImpl = /* @__PURE__ */ forwardRef(function STable({
17467
17473
  background: rowLocked ? LOCKED_BG : void 0
17468
17474
  },
17469
17475
  onClick: (e) => e.stopPropagation(),
17476
+ onDoubleClick: (e) => e.stopPropagation(),
17470
17477
  onClickCapture: (e) => {
17471
17478
  shiftPressedRef.current = e.shiftKey;
17472
17479
  if (e.shiftKey) window.getSelection()?.removeAllRanges();