@alexgorbatchev/shadcn 0.0.81 → 0.0.83

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/README.md CHANGED
@@ -452,6 +452,10 @@ Keep preferred widths separate from the table's rendered sizing atom. In `onFitW
452
452
 
453
453
  `ActionsMenu` shares one `items` definition between a dropdown action and an optional context menu. Supply an accessible `label`; the default trigger is a ghost icon button. `size="sm"` displays the label, and `variant`, `disabled`, and `trigger` customize the action. Supplying `contextTarget` composes the native context trigger with that element and adds its popup. Compose items with `MenuItem`, `MenuLinkItem`, checkbox/radio parts, groups, labels, separators, shortcuts, and submenu parts; dropdown and context menus share these implementations. `MenuLinkItem` retains its native anchor and menu keyboard semantics.
454
454
 
455
+ Menus never scroll. `DropdownMenuContent`, `ContextMenuContent`, and submenu content carry `data-scroll="none"`, so the development `ScrollGuard` reports a menu whose content outgrows the viewport; shorten it, for example by grouping items under submenus, instead of letting it scroll. A list longer than a menu should show belongs in a filterable menu: wrap the menu or submenu root in `MenuFilterProvider`, put `MenuInput` at the top of its content, its items in `MenuList`, and an optional `MenuEmpty` message after them. Typing narrows the items while the arrow keys keep moving among them. Pass `filter={null}` with a controlled `value` and `onValueChange` to render the matching items yourself, for example only as many as fit.
456
+
457
+ One menu instance can serve a whole list: open it through a `DropdownMenu` `handle` with each row's payload, and pass `point={{ clientX: event.clientX, clientY: event.clientY }}` to `DropdownMenuContent` when a right-click opened it, so it opens at the pointer instead of at the row's trigger. At a point the menu's top start corner sits on the pointer; near the viewport's edges it flips to the side with room and then shifts until it lies wholly inside the viewport. Leave `point` unset for keyboard and trigger opens, which anchor to their trigger.
458
+
455
459
  For nested layouts, compose `ActionsMenuTrigger`, `ActionsMenuContextTarget`, and `ActionsMenuContextContent` explicitly inside `ActionsMenu`. The dropdown trigger owns its local native dropdown root and popup; the context target and content share an independent context root. A tree row can use `TreeItem render={<ActionsMenuContextTarget />}` and put the trigger in its action slot. For a table row, render the context target as the actual `tr`, then place the dropdown trigger and context content inside a `td`: native popup portals insert focus guards at their declaration, which must remain valid table children.
456
460
 
457
461
  `TreeItem linkProps` places the registered tree item, roving focus, and native drag handlers on an anchor. Pass `href` and anchor events directly, or compose a router link through `linkProps.render`. The outer `render` and `ref` remain available for row overlays; disclosure and `endEnhancer` controls remain siblings of the link. Enter and modified clicks retain native link behavior, while tree arrows retain navigation and expansion behavior. Optional `dropHint={{ content, open, side }}` displays caller-controlled drag feedback without adding a focus target. `isDimmed` fades a settled row, such as completed work, to 70% opacity and exposes `data-dimmed`; hovering or focusing anything in the row restores full opacity, and the row stays interactive.
@@ -9,7 +9,7 @@ import {
9
9
  MenuItem2,
10
10
  DropdownMenu2,
11
11
  DropdownMenuTrigger2
12
- } from "./chunk-tegj7xts.js";
12
+ } from "./chunk-w8hgwhgc.js";
13
13
  import {
14
14
  mono
15
15
  } from "./chunk-fgmcbtyt.js";