@alexgorbatchev/shadcn 0.0.82 → 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";
@@ -38,7 +38,7 @@ import {
38
38
  MenuShortcut2,
39
39
  DropdownMenu2,
40
40
  DropdownMenuTrigger2
41
- } from "./chunk-tegj7xts.js";
41
+ } from "./chunk-w8hgwhgc.js";
42
42
  import {
43
43
  Alert2,
44
44
  AlertTitle2,
@@ -253,6 +253,7 @@ function ContextMenuContent2({
253
253
  dir: direction,
254
254
  "data-density": resolvedDensity,
255
255
  "data-slot": "context-menu-content",
256
+ "data-scroll": "none",
256
257
  className: (state) => cn2(" max-h-(--available-height) min-w-36 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-sm bg-popover p-1 text-popover-foreground border border-frame-edge shadow-frame duration-100 outline-none data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0 motion-reduce:data-open:animate-none motion-reduce:data-closed:animate-none ", typeof className === "function" ? className(state) : className),
257
258
  ...props
258
259
  })
@@ -17,6 +17,7 @@ import {
17
17
  } from "./chunk-5mydsjp3.js";
18
18
 
19
19
  // src/components/MenuPopup.tsx
20
+ import { useMemo } from "react";
20
21
  import { Menu as MenuPrimitive } from "@base-ui/react/menu";
21
22
  import { jsx } from "react/jsx-runtime";
22
23
  "use client";
@@ -34,6 +35,11 @@ function MenuPortal({ container, ref, children, ...props }) {
34
35
  })
35
36
  });
36
37
  }
38
+ function usePointAnchor(point) {
39
+ const x = point?.clientX;
40
+ const y = point?.clientY;
41
+ return useMemo(() => x === undefined || y === undefined ? undefined : { getBoundingClientRect: () => DOMRect.fromRect({ x, y, width: 0, height: 0 }) }, [x, y]);
42
+ }
37
43
  function MenuPopup({
38
44
  density,
39
45
  width = "content",
@@ -41,23 +47,24 @@ function MenuPopup({
41
47
  alignOffset = 0,
42
48
  side = "bottom",
43
49
  sideOffset = 4,
50
+ point,
44
51
  className,
45
52
  ...props
46
53
  }) {
47
54
  const resolvedDensity = useDensity(density);
48
55
  const direction = useDirection2();
56
+ const anchor = usePointAnchor(point);
57
+ const placement = anchor ? { anchor, align: "start", alignOffset: 0, side: "bottom", sideOffset: 0, sticky: true } : { align, alignOffset, side, sideOffset };
49
58
  return /* @__PURE__ */ jsx(MenuPortal, {
50
59
  children: /* @__PURE__ */ jsx(MenuPrimitive.Positioner, {
51
60
  dir: direction,
52
61
  className: "isolate outline-none",
53
- align,
54
- alignOffset,
55
- side,
56
- sideOffset,
62
+ ...placement,
57
63
  children: /* @__PURE__ */ jsx(MenuPrimitive.Popup, {
58
64
  dir: direction,
59
65
  "data-density": resolvedDensity,
60
66
  "data-slot": "dropdown-menu-content",
67
+ "data-scroll": "none",
61
68
  className: (state) => cn2("max-h-(--available-height) max-w-(--available-width) min-w-32 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-md bg-popover p-1 text-popover-foreground shadow-frame border border-frame-edge shadow-frame duration-120 outline-none data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:overflow-hidden data-closed:fade-out-0", width === "anchor" ? "w-(--anchor-width)" : "w-max", typeof className === "function" ? className(state) : className),
62
69
  ...props
63
70
  })
@@ -198,6 +205,33 @@ function MenuSubContent2({
198
205
  ...props
199
206
  });
200
207
  }
208
+ function MenuFilterProvider2(props) {
209
+ return /* @__PURE__ */ jsx2(MenuPrimitive2.FilterProvider, {
210
+ ...props
211
+ });
212
+ }
213
+ function MenuInput2({ density, className, ...props }) {
214
+ return /* @__PURE__ */ jsx2(MenuPrimitive2.Input, {
215
+ "data-density": density,
216
+ "data-slot": "menu-input",
217
+ className: (state) => cn2("mb-1 h-control-sm w-full min-w-0 rounded-sm border border-input bg-secondary px-1.5 text-sm outline-none placeholder:text-faint-foreground focus-visible:border-ring focus-visible:ring-1 focus-visible:ring-ring", typeof className === "function" ? className(state) : className),
218
+ ...props
219
+ });
220
+ }
221
+ function MenuList2(props) {
222
+ return /* @__PURE__ */ jsx2(MenuPrimitive2.List, {
223
+ "data-slot": "menu-list",
224
+ ...props
225
+ });
226
+ }
227
+ function MenuEmpty2({ density, className, ...props }) {
228
+ return /* @__PURE__ */ jsx2(MenuPrimitive2.Empty, {
229
+ "data-density": density,
230
+ "data-slot": "menu-empty",
231
+ className: (state) => cn2("px-1.5 py-1 text-sm text-muted-foreground empty:hidden", typeof className === "function" ? className(state) : className),
232
+ ...props
233
+ });
234
+ }
201
235
  function MenuCheckboxItem2({
202
236
  analytics,
203
237
  density,
@@ -294,4 +328,4 @@ function DropdownMenuTrigger2({ ...props }) {
294
328
  });
295
329
  }
296
330
 
297
- export { MenuPortal, MenuPopup, MenuGroup2, MenuLabel2, MenuItem2, MenuLinkItem2, MenuSub2, MenuSubTrigger2, MenuSubContent2, MenuCheckboxItem2, MenuRadioGroup2, MenuRadioItem2, MenuSeparator2, MenuShortcut2, DropdownMenu2, DropdownMenuTrigger2 };
331
+ export { MenuPortal, MenuPopup, MenuGroup2, MenuLabel2, MenuItem2, MenuLinkItem2, MenuSub2, MenuSubTrigger2, MenuSubContent2, MenuFilterProvider2, MenuInput2, MenuList2, MenuEmpty2, MenuCheckboxItem2, MenuRadioGroup2, MenuRadioItem2, MenuSeparator2, MenuShortcut2, DropdownMenu2, DropdownMenuTrigger2 };
@@ -14,6 +14,20 @@ declare function MenuLinkItem({ analytics, density, className, inset, variant, .
14
14
  declare function MenuSub({ analytics, ...props }: MenuPrimitive.SubmenuRoot.Props & IAnalyticsProps): ReactElement;
15
15
  declare function MenuSubTrigger({ density, className, inset, children, ...props }: MenuSubTriggerProps): ReactElement;
16
16
  declare function MenuSubContent({ density, align, alignOffset, side, sideOffset, className, ...props }: MenuPopupProps): ReactElement;
17
+ /**
18
+ * Makes the menu or submenu it wraps filterable: put a `MenuInput` at the top of its content and its items in a
19
+ * `MenuList`. Pass `filter={null}` with a controlled `value` to render the matching items yourself, for example to show
20
+ * only as many as fit.
21
+ */
22
+ declare function MenuFilterProvider(props: MenuPrimitive.FilterProvider.Props): ReactElement;
23
+ type MenuInputProps = MenuPrimitive.Input.Props & IDensityProps;
24
+ /** The filter field of a `MenuFilterProvider` menu; typing narrows the items while the arrows keep moving among them. */
25
+ declare function MenuInput({ density, className, ...props }: MenuInputProps): ReactElement;
26
+ /** The items of a filterable menu, so the filter field can share the popup with them. */
27
+ declare function MenuList(props: MenuPrimitive.List.Props): ReactElement;
28
+ type MenuEmptyProps = MenuPrimitive.Empty.Props & IDensityProps;
29
+ /** Shown in a filterable menu when no item matches its query. */
30
+ declare function MenuEmpty({ density, className, ...props }: MenuEmptyProps): ReactElement;
17
31
  declare function MenuCheckboxItem({ analytics, density, className, children, checked, inset, ...props }: MenuCheckboxItemProps & IAnalyticsProps): ReactElement;
18
32
  declare function MenuRadioGroup({ analytics, ...props }: MenuPrimitive.RadioGroup.Props & IAnalyticsProps): ReactElement;
19
33
  declare function MenuRadioItem({ density, className, children, inset, ...props }: MenuRadioItemProps): ReactElement;
@@ -21,4 +35,4 @@ type MenuSeparatorProps = MenuPrimitive.Separator.Props & IDensityProps;
21
35
  declare function MenuSeparator({ density, className, ...props }: MenuSeparatorProps): ReactElement;
22
36
  type MenuShortcutProps = ComponentProps<"span"> & IDensityProps;
23
37
  declare function MenuShortcut({ density, className, ...props }: MenuShortcutProps): ReactElement;
24
- export { MenuGroup, MenuLabel, MenuItem, MenuLinkItem, MenuCheckboxItem, MenuRadioGroup, MenuRadioItem, MenuSeparator, MenuShortcut, MenuSub, MenuSubTrigger, MenuSubContent, };
38
+ export { MenuGroup, MenuLabel, MenuItem, MenuLinkItem, MenuCheckboxItem, MenuRadioGroup, MenuRadioItem, MenuSeparator, MenuShortcut, MenuSub, MenuSubTrigger, MenuSubContent, MenuFilterProvider, MenuInput, MenuList, MenuEmpty, };
@@ -1,6 +1,6 @@
1
1
  import type { MenuPopupProps } from "../menu/types.js";
2
- import type { ReactElement } from "react";
2
+ import { type ReactElement } from "react";
3
3
  import { Menu as MenuPrimitive } from "@base-ui/react/menu";
4
4
  declare function MenuPortal({ container, ref, children, ...props }: MenuPrimitive.Portal.Props): ReactElement;
5
- declare function MenuPopup({ density, width, align, alignOffset, side, sideOffset, className, ...props }: MenuPopupProps): ReactElement;
5
+ declare function MenuPopup({ density, width, align, alignOffset, side, sideOffset, point, className, ...props }: MenuPopupProps): ReactElement;
6
6
  export { MenuPortal, MenuPopup };
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  RegenerateMenu2
3
- } from "../../../chunk-6em6sp6y.js";
4
- import"../../../chunk-tegj7xts.js";
3
+ } from "../../../chunk-4r1fne02.js";
4
+ import"../../../chunk-w8hgwhgc.js";
5
5
  import"../../../chunk-32t5kc0y.js";
6
6
  import"../../../chunk-x90xmrba.js";
7
7
  import"../../../chunk-jpvw9xqy.js";
@@ -481,10 +481,10 @@ import {
481
481
  import {
482
482
  RecommendationCard2
483
483
  } from "../../chunk-nqgpzqmk.js";
484
- import"../../chunk-tegj7xts.js";
484
+ import"../../chunk-w8hgwhgc.js";
485
485
  import {
486
486
  RegenerateMenu2
487
- } from "../../chunk-6em6sp6y.js";
487
+ } from "../../chunk-4r1fne02.js";
488
488
  import {
489
489
  ResearchReport2
490
490
  } from "../../chunk-fdhssr0q.js";
@@ -31,13 +31,13 @@ import {
31
31
  DrawerHeader2,
32
32
  DrawerTitle2,
33
33
  DrawerDescription2
34
- } from "../../chunk-kh4ecqqe.js";
34
+ } from "../../chunk-kk558p5p.js";
35
35
  import {
36
36
  MenuPopup,
37
37
  MenuItem2,
38
38
  DropdownMenu2,
39
39
  DropdownMenuTrigger2
40
- } from "../../chunk-tegj7xts.js";
40
+ } from "../../chunk-w8hgwhgc.js";
41
41
  import {
42
42
  Alert2,
43
43
  AlertTitle2,
package/dist/index.d.ts CHANGED
@@ -3,7 +3,8 @@ export { ButtonLink } from "./components/ButtonLink.js";
3
3
  export { DropdownMenu, DropdownMenuPortal, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuGroup, DropdownMenuLabel, DropdownMenuItem, DropdownMenuCheckboxItem, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubTrigger, DropdownMenuSubContent, } from "./components/DropdownMenu.js";
4
4
  export { ActionsMenu, ActionsMenuTrigger, ActionsMenuContextTarget, ActionsMenuContextContent, } from "./components/ActionsMenu.js";
5
5
  export type { IActionsMenuProps, ActionsMenuTriggerProps } from "./components/ActionsMenu.js";
6
- export { MenuGroup, MenuLabel, MenuLinkItem, MenuItem, MenuCheckboxItem, MenuRadioGroup, MenuRadioItem, MenuSeparator, MenuShortcut, MenuSub, MenuSubTrigger, MenuSubContent, } from "./components/MenuParts.js";
6
+ export { MenuGroup, MenuLabel, MenuLinkItem, MenuItem, MenuCheckboxItem, MenuRadioGroup, MenuRadioItem, MenuSeparator, MenuShortcut, MenuSub, MenuSubTrigger, MenuSubContent, MenuFilterProvider, MenuInput, MenuList, MenuEmpty, } from "./components/MenuParts.js";
7
+ export type { MenuPoint, MenuPopupProps } from "./menu/types.js";
7
8
  export { FormDialog } from "./components/FormDialog.js";
8
9
  export { Accordion, AccordionItem, AccordionTrigger, AccordionContent } from "./components/Accordion.js";
9
10
  export { Popover, PopoverContent, PopoverDescription, PopoverHeader, PopoverTitle, PopoverTrigger, } from "./components/Popover.js";
package/dist/index.js CHANGED
@@ -174,7 +174,7 @@ import {
174
174
  StatusTracker2,
175
175
  DashboardLayout2,
176
176
  BillingUsage2
177
- } from "./chunk-kh4ecqqe.js";
177
+ } from "./chunk-kk558p5p.js";
178
178
  import {
179
179
  Combobox2,
180
180
  ComboboxValue2,
@@ -236,6 +236,10 @@ import {
236
236
  MenuSub2,
237
237
  MenuSubTrigger2,
238
238
  MenuSubContent2,
239
+ MenuFilterProvider2,
240
+ MenuInput2,
241
+ MenuList2,
242
+ MenuEmpty2,
239
243
  MenuCheckboxItem2,
240
244
  MenuRadioGroup2,
241
245
  MenuRadioItem2,
@@ -243,7 +247,7 @@ import {
243
247
  MenuShortcut2,
244
248
  DropdownMenu2,
245
249
  DropdownMenuTrigger2
246
- } from "./chunk-tegj7xts.js";
250
+ } from "./chunk-w8hgwhgc.js";
247
251
  import {
248
252
  Empty2,
249
253
  EmptyHeader2,
@@ -671,10 +675,14 @@ export {
671
675
  MarkerContent2 as MarkerContent,
672
676
  MarkerIcon2 as MarkerIcon,
673
677
  MenuCheckboxItem2 as MenuCheckboxItem,
678
+ MenuEmpty2 as MenuEmpty,
679
+ MenuFilterProvider2 as MenuFilterProvider,
674
680
  MenuGroup2 as MenuGroup,
681
+ MenuInput2 as MenuInput,
675
682
  MenuItem2 as MenuItem,
676
683
  MenuLabel2 as MenuLabel,
677
684
  MenuLinkItem2 as MenuLinkItem,
685
+ MenuList2 as MenuList,
678
686
  MenuRadioGroup2 as MenuRadioGroup,
679
687
  MenuRadioItem2 as MenuRadioItem,
680
688
  MenuSeparator2 as MenuSeparator,
@@ -21,7 +21,15 @@ export type MenuItemProps = Menu.Item.Props & IMenuItemOptions;
21
21
  export type MenuSubTriggerProps = Menu.SubmenuTrigger.Props & IMenuInsetProps;
22
22
  export type MenuCheckboxItemProps = Menu.CheckboxItem.Props & IMenuInsetProps;
23
23
  export type MenuRadioItemProps = Menu.RadioItem.Props & IMenuInsetProps;
24
+ /** A viewport point in CSS pixels, such as the right-click event that asked for a menu. */
25
+ export type MenuPoint = Pick<MouseEvent, "clientX" | "clientY">;
24
26
  export type MenuPopupProps = Menu.Popup.Props & Pick<Menu.Positioner.Props, "align" | "alignOffset" | "side" | "sideOffset"> & IDensityProps & {
25
27
  width?: "content" | "anchor";
28
+ /**
29
+ * Opens the menu at this viewport point instead of at its trigger, as a context menu opens at the pointer. The
30
+ * menu's top start corner sits on the point; where the menu does not fit, it flips to the side with room and then
31
+ * shifts until it lies wholly inside the viewport. `side`, `align` and their offsets are ignored.
32
+ */
33
+ point?: MenuPoint;
26
34
  };
27
35
  export {};
package/dist/prototype.js CHANGED
@@ -2051,7 +2051,7 @@ var program = new Command;
2051
2051
  // package.json
2052
2052
  var package_default = {
2053
2053
  name: "@alexgorbatchev/shadcn",
2054
- version: "0.0.82",
2054
+ version: "0.0.83",
2055
2055
  description: "Sharp, monospace React components with compact and comfortable densities.",
2056
2056
  license: "MIT",
2057
2057
  repository: {
@@ -8,7 +8,7 @@ Source: src/components/stories/navigation/DropdownMenu.stories.tsx
8
8
  ## Public imports
9
9
 
10
10
  ```tsx
11
- import { DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuGroup, DropdownMenuLabel, DropdownMenuItem, DropdownMenuCheckboxItem, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubTrigger, DropdownMenuSubContent, Button, DirectionProvider, Avatar, AvatarImage, AvatarFallback } from "@alexgorbatchev/shadcn";
11
+ import { DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuGroup, DropdownMenuLabel, DropdownMenuItem, DropdownMenuCheckboxItem, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubTrigger, DropdownMenuSubContent, MenuEmpty, MenuFilterProvider, MenuInput, MenuList, type MenuPoint, Button, DirectionProvider, Avatar, AvatarImage, AvatarFallback } from "@alexgorbatchev/shadcn";
12
12
  ```
13
13
 
14
14
  ## Supporting imports
@@ -631,3 +631,58 @@ Storybook CSF excerpts. Default args and render apply unless overridden. Local h
631
631
  }
632
632
  }
633
633
  ```
634
+
635
+ ### AtPoint
636
+
637
+ ```tsx
638
+ {
639
+ render: function Render() {
640
+ const [point, setPoint] = useState<MenuPoint>();
641
+ const [row, setRow] = useState<string>();
642
+ return (<div className="flex flex-col gap-1">
643
+ {["Alpha", "Bravo", "Charlie"].map((name) => (<div key={name} role="button" tabIndex={0} className="rounded-sm border border-border px-2 py-1" onContextMenu={(event) => {
644
+ event.preventDefault();
645
+ setRow(name);
646
+ setPoint({ clientX: event.clientX, clientY: event.clientY });
647
+ }}>
648
+ {name}
649
+ </div>))}
650
+ <DropdownMenu open={point !== undefined} onOpenChange={(isOpen) => !isOpen && setPoint(undefined)}>
651
+ <DropdownMenuContent point={point} aria-label={`Actions for ${row ?? "row"}`}>
652
+ <DropdownMenuGroup>
653
+ <DropdownMenuLabel>{row}</DropdownMenuLabel>
654
+ <DropdownMenuItem>Open</DropdownMenuItem>
655
+ <DropdownMenuItem>Rename</DropdownMenuItem>
656
+ </DropdownMenuGroup>
657
+ </DropdownMenuContent>
658
+ </DropdownMenu>
659
+ </div>);
660
+ }
661
+ }
662
+ ```
663
+
664
+ ### FilterableSubmenu
665
+
666
+ ```tsx
667
+ {
668
+ render: () => (<DropdownMenu>
669
+ <DropdownMenuTrigger render={<Button variant="outline"/>}>Track actions</DropdownMenuTrigger>
670
+ <DropdownMenuContent>
671
+ <DropdownMenuGroup>
672
+ <MenuFilterProvider>
673
+ <DropdownMenuSub>
674
+ <DropdownMenuSubTrigger>Add to playlist</DropdownMenuSubTrigger>
675
+ <DropdownMenuSubContent aria-label="Add to playlist">
676
+ <MenuInput aria-label="Filter playlists" placeholder="Filter playlists"/>
677
+ <MenuList>
678
+ {PLAYLISTS.map((playlist) => (<DropdownMenuItem key={playlist}>{playlist}</DropdownMenuItem>))}
679
+ </MenuList>
680
+ <MenuEmpty>No playlists match</MenuEmpty>
681
+ </DropdownMenuSubContent>
682
+ </DropdownMenuSub>
683
+ </MenuFilterProvider>
684
+ </DropdownMenuGroup>
685
+ </DropdownMenuContent>
686
+ </DropdownMenu>)
687
+ }
688
+ ```
package/llms/setup.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alexgorbatchev/shadcn",
3
- "version": "0.0.82",
3
+ "version": "0.0.83",
4
4
  "description": "Sharp, monospace React components with compact and comfortable densities.",
5
5
  "license": "MIT",
6
6
  "repository": {