@wallarm-org/design-system 0.78.0 → 0.78.1-rc-fix-table-body-cell-text-selection.2

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.
@@ -1,10 +1,12 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
2
  import { Menu } from "@ark-ui/react/menu";
3
+ import { cn } from "../../utils/cn.js";
3
4
  import { useTestId } from "../../utils/testId.js";
4
- const DropdownMenuContextTrigger = ({ children, 'data-testid': testIdProp, ...props })=>{
5
+ const DropdownMenuContextTrigger = ({ children, className, 'data-testid': testIdProp, ...props })=>{
5
6
  const testId = useTestId('context-trigger', testIdProp);
6
7
  return /*#__PURE__*/ jsx(Menu.ContextTrigger, {
7
8
  ...props,
9
+ className: cn('[@media(pointer:fine)]:select-text!', className),
8
10
  "data-testid": testId,
9
11
  children: children
10
12
  });
@@ -33,7 +33,7 @@ const TableHeadCell = ({ header, hasTextDescription })=>{
33
33
  const sortDirection = column.getIsSorted();
34
34
  const pinningStyles = getPinningStyles(column);
35
35
  const lastLeft = isLastPinnedLeft(column, allLeafColumns, column.id);
36
- const { canDnd, setNodeRef, dndStyle, attributes, listeners } = useColumnDnd(column);
36
+ const { canDnd, isDragging, setNodeRef, dndStyle, attributes, listeners } = useColumnDnd(column);
37
37
  const { hasOverflow } = useHorizontalScrollState(containerRef, isMasterColumn);
38
38
  const headerDef = header.column.columnDef.header;
39
39
  const headerCtx = header.getContext();
@@ -62,6 +62,7 @@ const TableHeadCell = ({ header, hasTextDescription })=>{
62
62
  pinned: 'left' === isPinned,
63
63
  lastPinnedLeft: lastLeft,
64
64
  draggable: canDnd,
65
+ dragging: isDragging,
65
66
  style: {
66
67
  ...pinningStyles,
67
68
  ...dndStyle,
@@ -74,10 +75,6 @@ const TableHeadCell = ({ header, hasTextDescription })=>{
74
75
  ...attributes
75
76
  } : {},
76
77
  tabIndex: -1,
77
- onMouseDown: (e)=>{
78
- const target = e.target;
79
- if (!target.closest('button')) e.preventDefault();
80
- },
81
78
  children: [
82
79
  isNotBasicColumn && content,
83
80
  !header.isPlaceholder && !isNotBasicColumn && /*#__PURE__*/ jsxs(HStack, {
@@ -4,6 +4,7 @@ export declare const tableHeadCellVariants: (props?: ({
4
4
  pinned?: boolean | null | undefined;
5
5
  lastPinnedLeft?: boolean | null | undefined;
6
6
  draggable?: boolean | null | undefined;
7
+ dragging?: boolean | null | undefined;
7
8
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
8
9
  export declare const tableBodyCellVariants: (props?: ({
9
10
  pinned?: boolean | null | undefined;
@@ -1,8 +1,8 @@
1
1
  import { cva } from "class-variance-authority";
2
2
  import { cn } from "../../utils/cn.js";
3
- const tableCellBase = cn('border-b border-r border-border-primary-light last:border-r-0', 'overlay overflow-visible', 'select-none font-sans');
3
+ const tableCellBase = cn('border-b border-r border-border-primary-light last:border-r-0', 'overlay overflow-visible', 'font-sans');
4
4
  const pinnedLeftShadow = cn('group-data-[scrolled]/scroll:shadow-[0px_20px_25px_-5px_rgba(0,0,0,0.1)]', 'group-data-[scrolled]/scroll:[clip-path:inset(0px_-40px_0px_0px)]');
5
- const tableHeadCellVariants = cva(cn(tableCellBase, 'pl-16 pr-4 py-4 text-xs font-medium text-text-secondary', 'first:rounded-tl-12 last:rounded-tr-12', 'bg-bg-light-primary', 'whitespace-nowrap select-none outline-none'), {
5
+ const tableHeadCellVariants = cva(cn(tableCellBase, 'pl-16 pr-4 py-4 text-xs font-medium text-text-secondary', 'first:rounded-tl-12 last:rounded-tr-12', 'bg-bg-light-primary', 'whitespace-nowrap outline-none'), {
6
6
  variants: {
7
7
  interactive: {
8
8
  true: 'hover:overlay-states-primary-hover',
@@ -23,6 +23,10 @@ const tableHeadCellVariants = cva(cn(tableCellBase, 'pl-16 pr-4 py-4 text-xs fon
23
23
  draggable: {
24
24
  true: 'cursor-grab active:cursor-grabbing',
25
25
  false: ''
26
+ },
27
+ dragging: {
28
+ true: 'select-none',
29
+ false: ''
26
30
  }
27
31
  },
28
32
  defaultVariants: {
@@ -30,7 +34,8 @@ const tableHeadCellVariants = cva(cn(tableCellBase, 'pl-16 pr-4 py-4 text-xs fon
30
34
  sorted: false,
31
35
  pinned: false,
32
36
  lastPinnedLeft: false,
33
- draggable: false
37
+ draggable: false,
38
+ dragging: false
34
39
  }
35
40
  });
36
41
  const tableBodyCellVariants = cva(cn(tableCellBase, 'px-16 py-8 text-sm text-text-primary', 'bg-bg-surface-2', 'align-top', 'group-hover/row:overlay-states-primary-hover', 'group-data-[selected]/row:overlay-states-primary-active', 'group-data-[selected]/row:group-hover/row:overlay-states-primary-hover', 'group-data-[preview-active]/row:overlay-states-primary-active', 'group-data-[preview-active]/row:group-hover/row:overlay-states-primary-hover', '[&:has([data-state=open][data-part=context-trigger])]:ring-2', '[&:has([data-state=open][data-part=context-trigger])]:ring-inset', '[&:has([data-state=open][data-part=context-trigger])]:ring-border-strong-brand', '[&:has([data-part=context-trigger])]:p-0', '[&_[data-part=context-trigger]]:w-full', '[&_[data-part=context-trigger]]:px-16 [&_[data-part=context-trigger]]:py-8', '[&_[data-part=context-trigger]]:text-left [&_[data-part=context-trigger]]:outline-none'), {
@@ -2,7 +2,7 @@ import { jsx } from "react/jsx-runtime";
2
2
  import { forwardRef } from "react";
3
3
  import { cn } from "../../../utils/cn.js";
4
4
  import { tableHeadCellVariants } from "../classes.js";
5
- const Th = /*#__PURE__*/ forwardRef(({ className, interactive, sorted, pinned, lastPinnedLeft, draggable, ...props }, ref)=>/*#__PURE__*/ jsx("th", {
5
+ const Th = /*#__PURE__*/ forwardRef(({ className, interactive, sorted, pinned, lastPinnedLeft, draggable, dragging, ...props }, ref)=>/*#__PURE__*/ jsx("th", {
6
6
  ref: ref,
7
7
  scope: "col",
8
8
  className: cn(tableHeadCellVariants({
@@ -10,7 +10,8 @@ const Th = /*#__PURE__*/ forwardRef(({ className, interactive, sorted, pinned, l
10
10
  sorted,
11
11
  pinned,
12
12
  lastPinnedLeft,
13
- draggable
13
+ draggable,
14
+ dragging
14
15
  }), className),
15
16
  ...props
16
17
  }));
@@ -4,7 +4,7 @@ import { cva } from "class-variance-authority";
4
4
  import { cn } from "../../utils/cn.js";
5
5
  import { TestIdProvider, useTestId } from "../../utils/testId.js";
6
6
  import { badgeVariants } from "../Badge/index.js";
7
- const tagVariants = cva(cn('inline-flex items-center', 'rounded-8 border border-border-primary overlay', 'focus-visible:outline-none focus-visible:ring-3 focus-visible:ring-focus-primary', 'transition-colors cursor-pointer select-none', '[&_[data-slot=tag-close]]:cursor-pointer'), {
7
+ const tagVariants = cva(cn('inline-flex items-center', 'rounded-8 border border-border-primary overlay', 'focus-visible:outline-none focus-visible:ring-3 focus-visible:ring-focus-primary', 'transition-colors cursor-pointer', '[&_[data-slot=tag-close]]:cursor-pointer'), {
8
8
  variants: {
9
9
  disabled: {
10
10
  true: 'opacity-50 cursor-not-allowed pointer-events-none',
@@ -1,6 +1,6 @@
1
1
  {
2
- "version": "0.77.6",
3
- "generatedAt": "2026-07-28T11:51:29.981Z",
2
+ "version": "0.78.0",
3
+ "generatedAt": "2026-07-30T08:54:41.721Z",
4
4
  "components": [
5
5
  {
6
6
  "name": "Accordion",
@@ -71484,6 +71484,14 @@
71484
71484
  ],
71485
71485
  "defaultValue": "false"
71486
71486
  },
71487
+ {
71488
+ "name": "dragging",
71489
+ "options": [
71490
+ "true",
71491
+ "false"
71492
+ ],
71493
+ "defaultValue": "false"
71494
+ },
71487
71495
  {
71488
71496
  "name": "expanded",
71489
71497
  "options": [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wallarm-org/design-system",
3
- "version": "0.78.0",
3
+ "version": "0.78.1-rc-fix-table-body-cell-text-selection.2",
4
4
  "description": "Core design system library with React components and Storybook documentation",
5
5
  "publishConfig": {
6
6
  "access": "public",