@bazza-ui/react 0.0.0 → 0.1.0-canary.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.
Files changed (81) hide show
  1. package/dist/ListboxStore-BtcTXpzi.d.cts +351 -0
  2. package/dist/ListboxStore-DPqpLlAL.d.ts +351 -0
  3. package/dist/adapters/index.cjs +2 -0
  4. package/dist/adapters/index.cjs.map +1 -0
  5. package/dist/adapters/index.d.cts +363 -0
  6. package/dist/adapters/index.d.ts +363 -0
  7. package/dist/adapters/index.js +2 -0
  8. package/dist/adapters/index.js.map +1 -0
  9. package/dist/chunk-4C666HHU.js +2 -0
  10. package/dist/chunk-4C666HHU.js.map +1 -0
  11. package/dist/chunk-AVZ64JQ3.js +2 -0
  12. package/dist/chunk-AVZ64JQ3.js.map +1 -0
  13. package/dist/chunk-BGJJC6GX.cjs +2 -0
  14. package/dist/chunk-BGJJC6GX.cjs.map +1 -0
  15. package/dist/chunk-FWWOE2SW.cjs +2 -0
  16. package/dist/chunk-FWWOE2SW.cjs.map +1 -0
  17. package/dist/chunk-JSPKF52O.cjs +2 -0
  18. package/dist/chunk-JSPKF52O.cjs.map +1 -0
  19. package/dist/chunk-KWGD24VS.js +2 -0
  20. package/dist/chunk-KWGD24VS.js.map +1 -0
  21. package/dist/chunk-M4G6J7DP.cjs +2 -0
  22. package/dist/chunk-M4G6J7DP.cjs.map +1 -0
  23. package/dist/chunk-WKAPAKUL.js +2 -0
  24. package/dist/chunk-WKAPAKUL.js.map +1 -0
  25. package/dist/combobox/index.cjs +2 -0
  26. package/dist/combobox/index.cjs.map +1 -0
  27. package/dist/combobox/index.d.cts +1039 -0
  28. package/dist/combobox/index.d.ts +1039 -0
  29. package/dist/combobox/index.js +2 -0
  30. package/dist/combobox/index.js.map +1 -0
  31. package/dist/command-score-Dgo3ZS3Z.d.ts +36 -0
  32. package/dist/command-score-YjNr3ZWi.d.cts +36 -0
  33. package/dist/context-menu/index.cjs +2 -0
  34. package/dist/context-menu/index.cjs.map +1 -0
  35. package/dist/context-menu/index.d.cts +658 -0
  36. package/dist/context-menu/index.d.ts +658 -0
  37. package/dist/context-menu/index.js +2 -0
  38. package/dist/context-menu/index.js.map +1 -0
  39. package/dist/data-surface-B-eIGTBi.d.cts +678 -0
  40. package/dist/data-surface-D1OilMDu.d.ts +678 -0
  41. package/dist/dropdown-menu/index.cjs +2 -0
  42. package/dist/dropdown-menu/index.cjs.map +1 -0
  43. package/dist/dropdown-menu/index.d.cts +700 -0
  44. package/dist/dropdown-menu/index.d.ts +700 -0
  45. package/dist/dropdown-menu/index.js +2 -0
  46. package/dist/dropdown-menu/index.js.map +1 -0
  47. package/dist/events-BPr8sRGH.d.cts +166 -0
  48. package/dist/events-BPr8sRGH.d.ts +166 -0
  49. package/dist/input-BoIK003I.d.cts +41 -0
  50. package/dist/input-DF7D8YzW.d.ts +41 -0
  51. package/dist/internal/listbox/index.cjs +2 -0
  52. package/dist/internal/listbox/index.cjs.map +1 -0
  53. package/dist/internal/listbox/index.d.cts +269 -0
  54. package/dist/internal/listbox/index.d.ts +269 -0
  55. package/dist/internal/listbox/index.js +2 -0
  56. package/dist/internal/listbox/index.js.map +1 -0
  57. package/dist/internal/popup-menu/index.cjs +2 -0
  58. package/dist/internal/popup-menu/index.cjs.map +1 -0
  59. package/dist/internal/popup-menu/index.d.cts +846 -0
  60. package/dist/internal/popup-menu/index.d.ts +846 -0
  61. package/dist/internal/popup-menu/index.js +2 -0
  62. package/dist/internal/popup-menu/index.js.map +1 -0
  63. package/dist/item-equality-B6TbXlBT.d.cts +7 -0
  64. package/dist/item-equality-B6TbXlBT.d.ts +7 -0
  65. package/dist/loading-DphSt8MY.d.cts +27 -0
  66. package/dist/loading-TsgH6v92.d.ts +27 -0
  67. package/dist/select/index.cjs +2 -0
  68. package/dist/select/index.cjs.map +1 -0
  69. package/dist/select/index.d.cts +927 -0
  70. package/dist/select/index.d.ts +927 -0
  71. package/dist/select/index.js +2 -0
  72. package/dist/select/index.js.map +1 -0
  73. package/dist/separator-B4Ot84B0.d.ts +748 -0
  74. package/dist/separator-BmbUeeaT.d.cts +748 -0
  75. package/dist/types-9vS1uLIK.d.cts +1557 -0
  76. package/dist/types-lQCIvWW8.d.ts +1557 -0
  77. package/dist/use-listbox-item-BIi4eRPI.d.cts +182 -0
  78. package/dist/use-listbox-item-BIi4eRPI.d.ts +182 -0
  79. package/package.json +50 -12
  80. package/dist/index.d.ts +0 -2
  81. package/dist/index.js +0 -2
@@ -0,0 +1,2 @@
1
+ import{$ as Z,$a as he,A as po,B as ro,Ca as pe,Da as re,Fa as se,Ja as ie,Ka as U,Kb as F,L as W,Lb as Q,Mb as Y,N as q,Oa as ce,P as J,Pa as le,Qa as de,Ra as me,Sa as Pe,U as Mo,Ua as xe,Va as Me,W as go,X as Co,Xa as ge,Ya as Ce,Za as Se,_ as K,aa as So,bb as be,ca as $,da as A,db as fe,ea as ho,eb as fo,fb as Ro,gb as Io,ib as yo,ja as ee,l as eo,la as N,m as oo,ma as j,oa as oe,pa as E,qa as bo,sa as ne,t as no,u as to,w as ao,wa as te,x as uo,xa as ae,ya as ue}from"../chunk-WKAPAKUL.js";import{f as so,g as io,o as co,p as lo,v as mo,w as Po,x as xo}from"../chunk-KWGD24VS.js";import{a as Ae}from"../chunk-4C666HHU.js";var ze={};Ae(ze,{Arrow:()=>q,Backdrop:()=>J,CheckboxItem:()=>pe,CheckboxItemIndicator:()=>re,DataInput:()=>E,DataList:()=>F,DataSubpages:()=>Q,DataSurface:()=>Y,Empty:()=>oe,Group:()=>de,GroupLabel:()=>me,Icon:()=>ee,Input:()=>E,Item:()=>se,List:()=>ne,Popup:()=>K,Portal:()=>Z,Positioner:()=>$,RadioGroup:()=>ie,RadioGroupValue:()=>U,RadioItem:()=>ce,RadioItemIndicator:()=>le,Root:()=>ke,ScrollDownArrow:()=>ae,ScrollUpArrow:()=>te,Separator:()=>Pe,Shortcut:()=>xe,Submenu:()=>Me,SubmenuTrigger:()=>Ce,SubmenuTriggerIndicator:()=>ge,Subpage:()=>Se,SubpageBack:()=>he,SubpageBackItem:()=>be,SubpageTrigger:()=>fe,Surface:()=>ue,Trigger:()=>Te,useAsyncMenuCoordinator:()=>N,useMaybeAsyncMenuCoordinator:()=>j});import{Popover as ko}from"@base-ui/react/popover";import*as a from"react";import{jsx as X}from"react/jsx-runtime";var Ie=a.createContext(null);function ye(){let l=a.useContext(Ie);if(!l)throw new Error("ContextMenu components must be used within a ContextMenu.Root");return l}function Re(l,c,p=!1){let o=p?10:0;return{getBoundingClientRect(){return DOMRect.fromRect({width:o,height:o,x:l,y:c})}}}function ke(l){let{open:c,onOpenChange:p,defaultOpen:o=!1,virtualized:d=!1,items:n,onHighlightChange:e,disabled:y=!1,modal:k=!0,closeOnOutsidePress:S="pointerdown",onOpenChangeComplete:h,actionsRef:b,getQualifiedRowId:s,debug:V,children:C}=l,{store:i,focusOwnerStore:D,openChainStore:T,registerSurface:M,closeAll:z,virtualization:f,handleOpenChange:P,disabled:r,setDisabled:m}=W({onOpenChange:p,defaultOpen:o,virtualized:d,items:n,onHighlightChange:e,closeOnOutsidePress:S,disabled:y}),R=a.useRef(null);a.useImperativeHandle(b,()=>({close:()=>{R.current?.close()},unmount:()=>{R.current?.unmount()},setDisabled:m}),[m]),i.useControlledProp("open",c,o);let I=i.useState("open"),[B,H]=a.useState(()=>Re(0,0)),v=a.useCallback((g,O,$e=!1)=>{H(Re(g,O,$e))},[]),w=a.useCallback(()=>{r||i.setOpen(!0)},[i,r]),t=a.useCallback(()=>{P(!1)},[P]),x=a.useCallback(g=>{!g&&i.context.clearSearchOnClose==="after-exit"&&(i.clearSearch(),i.setInputActive(!1)),g||(i.context.onCloseComplete?.(),i.context.onPopupCloseComplete?.()),h?.(g)},[i,h]),G=a.useCallback((g,O)=>{P(g,O.reason,O.event)},[P]),L=a.useMemo(()=>({setAnchorPosition:v,openMenu:w,closeMenu:t,disabled:r,open:I}),[v,w,t,r,I]);return X(Ie.Provider,{value:L,children:X(A,{store:i,focusOwnerStore:D,openChainStore:T,disabled:r,depth:0,closeAll:z,registerSurface:M,virtualization:f,virtualAnchor:B,menuType:"context",closeOnOutsidePress:S,componentName:"context-menu",getQualifiedRowId:s,debug:V,children:X(ko.Root,{open:I,onOpenChange:G,onOpenChangeComplete:x,modal:k,actionsRef:b?R:void 0,children:C})})})}import{useRender as To}from"@base-ui/react/use-render";import*as u from"react";var _=(d=>(d.slot="bazzaui-context-menu-trigger",d.popupOpen="data-popup-open",d.pressed="data-pressed",d.disabled="data-disabled",d))(_||{});var zo=500,vo=10,wo={open:l=>l?{"data-popup-open":""}:null,pressed:l=>l?{"data-pressed":""}:null,disabled:l=>l?{"data-disabled":""}:null},Te=u.forwardRef(function(c,p){let{disabled:o=!1,render:d,className:n,style:e,onContextMenu:y,onTouchStart:k,onTouchMove:S,onTouchEnd:h,onTouchCancel:b,children:s,...V}=c,{setAnchorPosition:C,openMenu:i,disabled:D,open:T}=ye(),M=o||D,[z,f]=u.useState(!1),P=u.useRef(null),r=u.useRef(null),m=u.useCallback(()=>{P.current&&(clearTimeout(P.current),P.current=null),f(!1)},[]);u.useEffect(()=>()=>{m()},[m]);let R=u.useCallback(t=>{y?.(t),!t.defaultPrevented&&(M||(t.preventDefault(),C(t.clientX,t.clientY,!1),i()))},[y,M,C,i]),I=u.useCallback(t=>{if(k?.(t),t.defaultPrevented||M)return;let x=t.touches[0];x&&(r.current={x:x.clientX,y:x.clientY},f(!0),P.current=setTimeout(()=>{r.current&&(C(r.current.x,r.current.y,!0),i(),f(!1),r.current=null)},zo))},[k,M,C,i]),B=u.useCallback(t=>{if(S?.(t),!r.current)return;let x=t.touches[0];if(!x)return;let G=x.clientX-r.current.x,L=x.clientY-r.current.y;Math.sqrt(G*G+L*L)>vo&&(m(),r.current=null)},[S,m]),H=u.useCallback(t=>{h?.(t),m(),r.current=null},[h,m]),v=u.useCallback(t=>{b?.(t),m(),r.current=null},[b,m]),w=u.useMemo(()=>({open:T,pressed:z,disabled:M}),[T,z,M]);return To({render:d,ref:p,state:w,stateAttributesMapping:wo,props:{...V,"bazzaui-context-menu-trigger":"",onContextMenu:R,onTouchStart:I,onTouchMove:B,onTouchEnd:H,onTouchCancel:v,className:n,style:{WebkitTouchCallout:"none",WebkitUserSelect:"none",userSelect:"none",...e},children:s},defaultTagName:"div"})});var ve=(e=>(e.slot="bazzaui-context-menu-arrow",e.open="data-open",e.closed="data-closed",e.side="data-side",e.align="data-align",e.uncentered="data-uncentered",e))(ve||{});var we=(n=>(n.slot="bazzaui-context-menu-backdrop",n.open="data-open",n.closed="data-closed",n.startingStyle="data-starting-style",n.endingStyle="data-ending-style",n))(we||{});var Ge=(n=>(n.slot="bazzaui-context-menu-checkbox-item",n.checked="data-checked",n.unchecked="data-unchecked",n.highlighted="data-highlighted",n.disabled="data-disabled",n))(Ge||{}),Le=(o=>(o.slot="bazzaui-context-menu-checkbox-item-indicator",o.checked="data-checked",o.unchecked="data-unchecked",o))(Le||{});var Oe=(c=>(c.slot="bazzaui-context-menu-empty",c))(Oe||{});var Ee=(c=>(c.slot="bazzaui-context-menu-group",c))(Ee||{});var Ve=(c=>(c.slot="bazzaui-context-menu-group-label",c))(Ve||{});var Go={slot:"bazzaui-context-menu-icon",open:"data-popup-open"};var De=(o=>(o.slot="bazzaui-context-menu-input",o.open="data-open",o.closed="data-closed",o))(De||{});var Be=(o=>(o.slot="bazzaui-context-menu-item",o.highlighted="data-highlighted",o.disabled="data-disabled",o))(Be||{});var He=(p=>(p.slot="bazzaui-context-menu-list",p.list="data-popup-menu-list",p))(He||{});var Ne=(s=>(s.slot="bazzaui-context-menu-popup",s.open="data-open",s.closed="data-closed",s.side="data-side",s.align="data-align",s.startingStyle="data-starting-style",s.endingStyle="data-ending-style",s.instant="data-instant",s.focused="data-focused",s.hasOpenSubmenu="data-has-open-submenu",s.submenu="data-submenu",s.navigating="data-navigating",s))(Ne||{});var je=(e=>(e.slot="bazzaui-context-menu-positioner",e.open="data-open",e.closed="data-closed",e.anchorHidden="data-anchor-hidden",e.side="data-side",e.align="data-align",e))(je||{});var Ue=(p=>(p.slot="bazzaui-context-menu-radio-group",p.disabled="data-disabled",p))(Ue||{});var Fe=(n=>(n.slot="bazzaui-context-menu-radio-item",n.checked="data-checked",n.unchecked="data-unchecked",n.highlighted="data-highlighted",n.disabled="data-disabled",n))(Fe||{}),Qe=(o=>(o.slot="bazzaui-context-menu-radio-item-indicator",o.checked="data-checked",o.unchecked="data-unchecked",o))(Qe||{});var Lo={slotUp:"bazzaui-context-menu-scroll-up-arrow",slotDown:"bazzaui-context-menu-scroll-down-arrow",direction:"data-direction",side:"data-side"};var Ye=(c=>(c.slot="bazzaui-context-menu-separator",c))(Ye||{});var Xe=(p=>(p.slot="bazzaui-context-menu-shortcut",p.highlighted="data-highlighted",p))(Xe||{});var _e=(e=>(e.slot="bazzaui-context-menu-submenu-trigger",e.submenuTrigger="data-submenu-trigger",e.popupOpen="data-popup-open",e.popupFocused="data-popup-focused",e.highlighted="data-highlighted",e.disabled="data-disabled",e))(_e||{}),We=(p=>(p.slot="bazzaui-context-menu-submenu-trigger-indicator",p.popupOpen="data-popup-open",p))(We||{});var qe=(o=>(o.slot="bazzaui-context-menu-subpage-back",o.canGoBack="data-can-go-back",o.disabled="data-disabled",o))(qe||{});var Je=(d=>(d.slot="bazzaui-context-menu-subpage-back-item",d.subpageBackItem="data-subpage-back-item",d.highlighted="data-highlighted",d.disabled="data-disabled",d))(Je||{});var Ke=(e=>(e.slot="bazzaui-context-menu-subpage-trigger",e.subpageTrigger="data-subpage-trigger",e.popupOpen="data-popup-open",e.popupFocused="data-popup-focused",e.highlighted="data-highlighted",e.disabled="data-disabled",e))(Ke||{});var Ze=(c=>(c.slot="bazzaui-context-menu-surface",c))(Ze||{});export{ze as ContextMenu,ve as ContextMenuArrowDataAttributes,we as ContextMenuBackdropDataAttributes,Ge as ContextMenuCheckboxItemDataAttributes,Le as ContextMenuCheckboxItemIndicatorDataAttributes,E as ContextMenuDataInput,F as ContextMenuDataList,Q as ContextMenuDataSubpages,Y as ContextMenuDataSurface,Oe as ContextMenuEmptyDataAttributes,Ee as ContextMenuGroupDataAttributes,Ve as ContextMenuGroupLabelDataAttributes,Go as ContextMenuIconDataAttributes,De as ContextMenuInputDataAttributes,Be as ContextMenuItemDataAttributes,bo as ContextMenuListCssVars,He as ContextMenuListDataAttributes,Ne as ContextMenuPopupDataAttributes,So as ContextMenuPositionerCssVars,je as ContextMenuPositionerDataAttributes,Ue as ContextMenuRadioGroupDataAttributes,U as ContextMenuRadioGroupValue,Fe as ContextMenuRadioItemDataAttributes,Qe as ContextMenuRadioItemIndicatorDataAttributes,Lo as ContextMenuScrollArrowDataAttributes,Ye as ContextMenuSeparatorDataAttributes,Xe as ContextMenuShortcutDataAttributes,xo as ContextMenuStore,_e as ContextMenuSubmenuTriggerDataAttributes,We as ContextMenuSubmenuTriggerIndicatorDataAttributes,qe as ContextMenuSubpageBackDataAttributes,Je as ContextMenuSubpageBackItemDataAttributes,Ke as ContextMenuSubpageTriggerDataAttributes,Ze as ContextMenuSurfaceDataAttributes,_ as ContextMenuTriggerDataAttributes,Mo as DataSurfaceContext,mo as commandScore,Po as defaultFilter,fo as defineRadioGroup,Ro as isDisplayGroupNode,Io as isDisplayRadioGroupNode,yo as isDisplayRowNode,N as useAsyncMenuCoordinator,go as useDataSurfaceContext,ho as useItem,so as useItemContext,j as useMaybeAsyncMenuCoordinator,Co as useMaybeDataSurfaceContext,io as useMaybeItemContext,oo as useMaybeRootContext,to as useMaybeSubmenuContext,uo as useMaybeSubpageContext,ro as useMaybeSubpageStack,lo as useMaybeSurfaceContext,eo as useRootContext,no as useSubmenuContext,ao as useSubpageContext,po as useSubpageStack,co as useSurfaceContext};
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/context-menu/index.parts.ts","../../src/context-menu/root/root.tsx","../../src/context-menu/trigger/trigger.tsx","../../src/context-menu/trigger/trigger.data-attrs.ts","../../src/context-menu/arrow/arrow.data-attrs.ts","../../src/context-menu/backdrop/backdrop.data-attrs.ts","../../src/context-menu/checkbox-item/checkbox-item.data-attrs.ts","../../src/context-menu/empty/empty.data-attrs.ts","../../src/context-menu/group/group.data-attrs.ts","../../src/context-menu/group-label/group-label.data-attrs.ts","../../src/context-menu/icon/icon.data-attrs.ts","../../src/context-menu/input/input.data-attrs.ts","../../src/context-menu/item/item.data-attrs.ts","../../src/context-menu/list/list.data-attrs.ts","../../src/context-menu/popup/popup.data-attrs.ts","../../src/context-menu/positioner/positioner.data-attrs.ts","../../src/context-menu/radio-group/radio-group.data-attrs.ts","../../src/context-menu/radio-item/radio-item.data-attrs.ts","../../src/context-menu/scroll-arrow/scroll-arrow.data-attrs.ts","../../src/context-menu/separator/separator.data-attrs.ts","../../src/context-menu/shortcut/shortcut.data-attrs.ts","../../src/context-menu/submenu-trigger/submenu-trigger.data-attrs.ts","../../src/context-menu/subpage-back/subpage-back.data-attrs.ts","../../src/context-menu/subpage-back-item/subpage-back-item.data-attrs.ts","../../src/context-menu/subpage-trigger/subpage-trigger.data-attrs.ts","../../src/context-menu/surface/surface.data-attrs.ts"],"sourcesContent":["// ============================================================================\n// Context Menu Parts\n// ============================================================================\n// Re-exports shared components from internal/popup-menu with context-menu specific\n// Root and Trigger components.\n\n// Re-export VirtualItem type from internal/listbox\nexport type { VirtualItem } from '../internal/listbox/index.js'\n// Re-export shared components from internal/popup-menu\nexport {\n PopupMenuArrow as Arrow,\n PopupMenuBackdrop as Backdrop,\n PopupMenuCheckboxItem as CheckboxItem,\n PopupMenuCheckboxItemIndicator as CheckboxItemIndicator,\n PopupMenuDataInput as DataInput,\n PopupMenuDataList as DataList,\n PopupMenuDataSubpages as DataSubpages,\n // Deep Search (Data-First API)\n PopupMenuDataSurface as DataSurface,\n PopupMenuEmpty as Empty,\n // Structure\n PopupMenuGroup as Group,\n PopupMenuGroupLabel as GroupLabel,\n // Trigger components\n PopupMenuIcon as Icon,\n PopupMenuInput as Input,\n // Items\n PopupMenuItem as Item,\n PopupMenuList as List,\n PopupMenuPopup as Popup,\n // Positioning & Container\n PopupMenuPortal as Portal,\n PopupMenuPositioner as Positioner,\n PopupMenuRadioGroup as RadioGroup,\n PopupMenuRadioGroupValue as RadioGroupValue,\n PopupMenuRadioItem as RadioItem,\n PopupMenuRadioItemIndicator as RadioItemIndicator,\n // Scroll indicators\n PopupMenuScrollDownArrow as ScrollDownArrow,\n PopupMenuScrollUpArrow as ScrollUpArrow,\n PopupMenuSeparator as Separator,\n // Utility\n PopupMenuShortcut as Shortcut,\n // Submenus\n PopupMenuSubmenuRoot as Submenu,\n PopupMenuSubmenuTrigger as SubmenuTrigger,\n PopupMenuSubmenuTriggerIndicator as SubmenuTriggerIndicator,\n PopupMenuSubpage as Subpage,\n PopupMenuSubpageBack as SubpageBack,\n PopupMenuSubpageBackItem as SubpageBackItem,\n PopupMenuSubpageTrigger as SubpageTrigger,\n // Content\n PopupMenuSurface as Surface,\n // Async coordinator hooks\n useAsyncMenuCoordinator,\n useMaybeAsyncMenuCoordinator,\n} from '../internal/popup-menu/index.js'\n// Context-menu specific components\nexport { ContextMenuRoot as Root } from './root/root.js'\nexport { ContextMenuTrigger as Trigger } from './trigger/trigger.js'\n","'use client'\n\nimport { Popover } from '@base-ui/react/popover'\nimport * as React from 'react'\nimport type { VirtualItem } from '../../internal/listbox/index.js'\nimport type { GetQualifiedRowIdFn } from '../../internal/popup-menu/deep-search/types.js'\nimport {\n type PopupMenuDebugOptions,\n PopupMenuProviders,\n type PopupMenuRootActions,\n type UsePopupMenuRootParams,\n usePopupMenuRoot,\n type VirtualAnchor,\n} from '../../internal/popup-menu/index.js'\nimport type {\n ContextMenuHighlightChangeEventDetails,\n ContextMenuOpenChangeEventDetails,\n} from '../events.js'\n\nexport interface ContextMenuRootProps {\n /**\n * Whether the context menu is open.\n * Use for controlled mode.\n */\n open?: boolean\n\n /**\n * Callback when the open state changes.\n * The second parameter contains event details including the reason for the change.\n */\n onOpenChange?: (\n open: boolean,\n eventDetails: ContextMenuOpenChangeEventDetails,\n ) => void\n\n /**\n * Whether the context menu is initially open.\n * Use for uncontrolled mode.\n * @default false\n */\n defaultOpen?: boolean\n\n /**\n * Whether virtualization mode is enabled.\n * When true, items should provide an explicit `index` prop and\n * the `items` prop should be provided for navigation to work correctly.\n * @default false\n */\n virtualized?: boolean\n\n /**\n * Pre-registered items for virtualization.\n * When provided with `virtualized={true}`, this allows navigation to work\n * for items that aren't currently mounted in the DOM.\n */\n items?: VirtualItem[]\n\n /**\n * Callback when the highlighted item changes.\n * Useful for synchronizing with a virtualizer (e.g., scrollToIndex) or other UI state.\n * The third parameter contains event details including the reason for the change.\n */\n onHighlightChange?: (\n id: string | null,\n index: number,\n eventDetails: ContextMenuHighlightChangeEventDetails,\n ) => void\n\n /**\n * Whether the component should ignore user interaction.\n * @default false\n */\n disabled?: boolean\n\n /**\n * Determines if the context menu enters a modal state when open.\n *\n * - `true`: user interaction is limited to the menu: document page scroll\n * is locked, and pointer interactions on outside elements are disabled.\n * - `false`: user interaction with the rest of the document is allowed.\n *\n * @default true\n */\n modal?: boolean\n\n /**\n * When to close the menu on outside interactions.\n * - `'pointerdown'`: Close immediately when pointer is pressed outside (default)\n * - `'click'`: Close when a full click (pointerdown + pointerup) occurs outside\n * @default 'pointerdown'\n */\n closeOnOutsidePress?: 'click' | 'pointerdown'\n\n /**\n * Event handler called after any open/close animations have completed.\n * When `clearSearchOnClose=\"after-exit\"` is set on Surface, the search\n * will be cleared before this callback is invoked.\n */\n onOpenChangeComplete?: (open: boolean) => void\n\n /**\n * A ref to imperative actions.\n * - `close`: closes the menu imperatively.\n * - `unmount`: unmounts the popup imperatively (when keep-mounted mode is enabled).\n * - `setDisabled`: enables/disables the menu imperatively.\n */\n actionsRef?: React.RefObject<ContextMenuRoot.Actions | null>\n\n /**\n * Function to generate qualified unique IDs for rows.\n * Defined once at the root level and applied to all surfaces (root and submenus).\n *\n * Default behavior:\n * - If node.id is provided, use it as-is (treat as globally unique)\n * - Otherwise, qualify with breadcrumbs + slugified value when deep searching\n */\n getQualifiedRowId?: GetQualifiedRowIdFn\n\n /**\n * Debug visualization options for submenu interaction heuristics.\n */\n debug?: PopupMenuDebugOptions\n\n children: React.ReactNode\n}\n\n/**\n * Internal context for ContextMenu-specific state.\n * Used by Trigger to set the virtual anchor position.\n */\ninterface ContextMenuInternalContextValue {\n /** Set the virtual anchor position (called by Trigger on right-click) */\n setAnchorPosition: (x: number, y: number, isTouchEvent?: boolean) => void\n /** Open the menu */\n openMenu: () => void\n /** Close the menu */\n closeMenu: () => void\n /** Whether the menu is disabled */\n disabled: boolean\n /** Whether the menu is open */\n open: boolean\n}\n\nconst ContextMenuInternalContext =\n React.createContext<ContextMenuInternalContextValue | null>(null)\n\nexport function useContextMenuInternal(): ContextMenuInternalContextValue {\n const context = React.useContext(ContextMenuInternalContext)\n if (!context) {\n throw new Error(\n 'ContextMenu components must be used within a ContextMenu.Root',\n )\n }\n return context\n}\n\n/**\n * Creates a virtual anchor at a specific point for positioning.\n */\nfunction createVirtualAnchor(\n x: number,\n y: number,\n isTouchEvent = false,\n): VirtualAnchor {\n // Touch events use a larger anchor for better UX\n const size = isTouchEvent ? 10 : 0\n return {\n getBoundingClientRect() {\n return DOMRect.fromRect({\n width: size,\n height: size,\n x,\n y,\n })\n },\n }\n}\n\n/**\n * Groups all parts of the context menu.\n * Manages open state and provides context to children.\n * Doesn't render its own HTML element.\n */\nexport function ContextMenuRoot(props: ContextMenuRoot.Props) {\n const {\n open: openProp,\n onOpenChange,\n defaultOpen = false,\n virtualized = false,\n items: itemsProp,\n onHighlightChange,\n disabled: disabledProp = false,\n modal = true,\n closeOnOutsidePress = 'pointerdown',\n onOpenChangeComplete: onOpenChangeCompleteProp,\n actionsRef,\n getQualifiedRowId,\n debug,\n children,\n } = props\n\n // Use shared hook to create stores and utilities\n const {\n store,\n focusOwnerStore,\n openChainStore,\n registerSurface,\n closeAll,\n virtualization,\n handleOpenChange,\n disabled: menuDisabled,\n setDisabled,\n } = usePopupMenuRoot({\n // Cast to generic type - component handles type safety via narrowed types\n onOpenChange:\n onOpenChange as unknown as UsePopupMenuRootParams['onOpenChange'],\n defaultOpen,\n virtualized,\n items: itemsProp,\n onHighlightChange:\n onHighlightChange as unknown as UsePopupMenuRootParams['onHighlightChange'],\n closeOnOutsidePress,\n disabled: disabledProp,\n })\n\n const popoverActionsRef = React.useRef<Popover.Root.Actions | null>(null)\n\n React.useImperativeHandle(\n actionsRef,\n () => ({\n close: () => {\n popoverActionsRef.current?.close()\n },\n unmount: () => {\n popoverActionsRef.current?.unmount()\n },\n setDisabled,\n }),\n [setDisabled],\n )\n\n // Sync controlled open prop to store\n store.useControlledProp('open', openProp, defaultOpen)\n\n // Get open state from store\n const open = store.useState('open')\n\n // Virtual anchor state (position where menu appears)\n const [virtualAnchor, setVirtualAnchor] = React.useState<VirtualAnchor>(() =>\n createVirtualAnchor(0, 0),\n )\n\n // Set anchor position (called by Trigger on right-click/long-press)\n const setAnchorPosition = React.useCallback(\n (x: number, y: number, isTouchEvent = false) => {\n setVirtualAnchor(createVirtualAnchor(x, y, isTouchEvent))\n },\n [],\n )\n\n // Open the menu\n const openMenu = React.useCallback(() => {\n if (menuDisabled) return\n store.setOpen(true)\n }, [store, menuDisabled])\n\n // Close the menu\n const closeMenu = React.useCallback(() => {\n handleOpenChange(false)\n }, [handleOpenChange])\n\n // Handle animation complete - clear search and hide input if clearSearchOnClose is 'after-exit'\n const handleOpenChangeComplete = React.useCallback(\n (nextOpen: boolean) => {\n // Clear search and hide input after exit animation completes\n if (!nextOpen && store.context.clearSearchOnClose === 'after-exit') {\n store.clearSearch()\n store.setInputActive(false)\n }\n // Reset row width measurements after close animation completes\n if (!nextOpen) {\n store.context.onCloseComplete?.()\n store.context.onPopupCloseComplete?.()\n }\n // Call user's callback\n onOpenChangeCompleteProp?.(nextOpen)\n },\n [store, onOpenChangeCompleteProp],\n )\n\n // Wrapper to adapt Popover's event details to our handleOpenChange\n const handlePopoverOpenChange = React.useCallback(\n (nextOpen: boolean, popoverDetails: Popover.Root.ChangeEventDetails) => {\n // Forward to our internal handler with the reason and event\n handleOpenChange(\n nextOpen,\n popoverDetails.reason as ContextMenuOpenChangeEventDetails['reason'],\n popoverDetails.event,\n )\n },\n [handleOpenChange],\n )\n\n // Internal context for Trigger\n const internalContextValue: ContextMenuInternalContextValue = React.useMemo(\n () => ({\n setAnchorPosition,\n openMenu,\n closeMenu,\n disabled: menuDisabled,\n open,\n }),\n [setAnchorPosition, openMenu, closeMenu, menuDisabled, open],\n )\n\n return (\n <ContextMenuInternalContext.Provider value={internalContextValue}>\n <PopupMenuProviders\n store={store}\n focusOwnerStore={focusOwnerStore}\n openChainStore={openChainStore}\n disabled={menuDisabled}\n depth={0}\n closeAll={closeAll}\n registerSurface={registerSurface}\n virtualization={virtualization}\n virtualAnchor={virtualAnchor}\n menuType=\"context\"\n closeOnOutsidePress={closeOnOutsidePress}\n componentName=\"context-menu\"\n getQualifiedRowId={getQualifiedRowId}\n debug={debug}\n >\n <Popover.Root\n open={open}\n onOpenChange={handlePopoverOpenChange}\n onOpenChangeComplete={handleOpenChangeComplete}\n modal={modal}\n actionsRef={actionsRef ? popoverActionsRef : undefined}\n >\n {children}\n </Popover.Root>\n </PopupMenuProviders>\n </ContextMenuInternalContext.Provider>\n )\n}\n\nexport namespace ContextMenuRoot {\n export interface Props extends ContextMenuRootProps {}\n export type OpenChangeEventDetails = ContextMenuOpenChangeEventDetails\n export type HighlightChangeEventDetails =\n ContextMenuHighlightChangeEventDetails\n export type Actions = PopupMenuRootActions\n}\n","'use client'\n\nimport { useRender } from '@base-ui/react/use-render'\nimport * as React from 'react'\nimport type { ComponentProps } from '../../utils/types.js'\nimport { useContextMenuInternal } from '../root/root.js'\nimport { ContextMenuTriggerDataAttributes } from './trigger.data-attrs.js'\n\n// Long-press delay in milliseconds\nconst LONG_PRESS_DELAY = 500\n// Movement threshold to cancel long-press (in pixels)\nconst MOVE_THRESHOLD = 10\n\nexport interface ContextMenuTriggerState extends Record<string, unknown> {\n /**\n * Whether the context menu is currently open.\n */\n open: boolean\n /**\n * Whether the trigger is currently being pressed (long-press in progress).\n */\n pressed: boolean\n /**\n * Whether the trigger is disabled.\n */\n disabled: boolean\n}\n\nexport interface ContextMenuTriggerProps\n extends ComponentProps<'div', ContextMenuTrigger.State> {\n /**\n * Whether the trigger is disabled.\n * When disabled, right-click and long-press will not open the menu.\n * @default false\n */\n disabled?: boolean\n}\n\nconst stateAttributesMapping = {\n open: (value: unknown): Record<string, string> | null =>\n value ? { [ContextMenuTriggerDataAttributes.popupOpen]: '' } : null,\n pressed: (value: unknown): Record<string, string> | null =>\n value ? { [ContextMenuTriggerDataAttributes.pressed]: '' } : null,\n disabled: (value: unknown): Record<string, string> | null =>\n value ? { [ContextMenuTriggerDataAttributes.disabled]: '' } : null,\n}\n\n/**\n * An area that opens the context menu on right-click or long-press.\n * Renders a `<div>` element.\n */\nexport const ContextMenuTrigger = React.forwardRef<\n HTMLDivElement,\n ContextMenuTrigger.Props\n>(function ContextMenuTrigger(props, forwardedRef) {\n const {\n disabled: disabledProp = false,\n render,\n className,\n style,\n onContextMenu,\n onTouchStart,\n onTouchMove,\n onTouchEnd,\n onTouchCancel,\n children,\n ...rest\n } = props\n\n const {\n setAnchorPosition,\n openMenu,\n disabled: rootDisabled,\n open,\n } = useContextMenuInternal()\n\n const disabled = disabledProp || rootDisabled\n\n // Long-press state\n const [pressed, setPressed] = React.useState(false)\n const longPressTimeoutRef = React.useRef<ReturnType<\n typeof setTimeout\n > | null>(null)\n const touchStartPosRef = React.useRef<{ x: number; y: number } | null>(null)\n\n // Cleanup long-press timeout\n const clearLongPressTimeout = React.useCallback(() => {\n if (longPressTimeoutRef.current) {\n clearTimeout(longPressTimeoutRef.current)\n longPressTimeoutRef.current = null\n }\n setPressed(false)\n }, [])\n\n // Cleanup on unmount\n React.useEffect(() => {\n return () => {\n clearLongPressTimeout()\n }\n }, [clearLongPressTimeout])\n\n // Handle right-click (contextmenu event)\n const handleContextMenu = React.useCallback(\n (event: React.MouseEvent<HTMLDivElement>) => {\n onContextMenu?.(event)\n\n if (event.defaultPrevented) return\n if (disabled) return\n\n // Prevent default browser context menu\n event.preventDefault()\n\n // Set anchor at cursor position\n setAnchorPosition(event.clientX, event.clientY, false)\n\n // Open the menu\n openMenu()\n },\n [onContextMenu, disabled, setAnchorPosition, openMenu],\n )\n\n // Handle touch start (begin long-press detection)\n const handleTouchStart = React.useCallback(\n (event: React.TouchEvent<HTMLDivElement>) => {\n onTouchStart?.(event)\n\n if (event.defaultPrevented) return\n if (disabled) return\n\n const touch = event.touches[0]\n if (!touch) return\n\n // Store initial touch position\n touchStartPosRef.current = { x: touch.clientX, y: touch.clientY }\n setPressed(true)\n\n // Start long-press timer\n longPressTimeoutRef.current = setTimeout(() => {\n if (!touchStartPosRef.current) return\n\n // Set anchor at touch position\n setAnchorPosition(\n touchStartPosRef.current.x,\n touchStartPosRef.current.y,\n true,\n )\n\n // Open the menu\n openMenu()\n\n // Reset state\n setPressed(false)\n touchStartPosRef.current = null\n }, LONG_PRESS_DELAY)\n },\n [onTouchStart, disabled, setAnchorPosition, openMenu],\n )\n\n // Handle touch move (cancel if moved too far)\n const handleTouchMove = React.useCallback(\n (event: React.TouchEvent<HTMLDivElement>) => {\n onTouchMove?.(event)\n\n if (!touchStartPosRef.current) return\n\n const touch = event.touches[0]\n if (!touch) return\n\n // Calculate distance moved\n const dx = touch.clientX - touchStartPosRef.current.x\n const dy = touch.clientY - touchStartPosRef.current.y\n const distance = Math.sqrt(dx * dx + dy * dy)\n\n // Cancel if moved beyond threshold\n if (distance > MOVE_THRESHOLD) {\n clearLongPressTimeout()\n touchStartPosRef.current = null\n }\n },\n [onTouchMove, clearLongPressTimeout],\n )\n\n // Handle touch end (cleanup)\n const handleTouchEnd = React.useCallback(\n (event: React.TouchEvent<HTMLDivElement>) => {\n onTouchEnd?.(event)\n clearLongPressTimeout()\n touchStartPosRef.current = null\n },\n [onTouchEnd, clearLongPressTimeout],\n )\n\n // Handle touch cancel (cleanup)\n const handleTouchCancel = React.useCallback(\n (event: React.TouchEvent<HTMLDivElement>) => {\n onTouchCancel?.(event)\n clearLongPressTimeout()\n touchStartPosRef.current = null\n },\n [onTouchCancel, clearLongPressTimeout],\n )\n\n const state: ContextMenuTrigger.State = React.useMemo(\n () => ({\n open,\n pressed,\n disabled,\n }),\n [open, pressed, disabled],\n )\n\n return useRender({\n render,\n ref: forwardedRef,\n state,\n stateAttributesMapping,\n props: {\n ...rest,\n [ContextMenuTriggerDataAttributes.slot]: '',\n onContextMenu: handleContextMenu,\n onTouchStart: handleTouchStart,\n onTouchMove: handleTouchMove,\n onTouchEnd: handleTouchEnd,\n onTouchCancel: handleTouchCancel,\n className,\n style: {\n // Prevent native iOS callout on long-press\n WebkitTouchCallout: 'none',\n // Prevent text selection on long-press\n WebkitUserSelect: 'none',\n userSelect: 'none',\n ...style,\n },\n children,\n },\n defaultTagName: 'div',\n })\n})\n\nexport namespace ContextMenuTrigger {\n export type State = ContextMenuTriggerState\n export interface Props extends ContextMenuTriggerProps {}\n}\n","export enum ContextMenuTriggerDataAttributes {\n /**\n * Identifies the component part.\n * @type {'bazzaui-context-menu-trigger'}\n */\n slot = 'bazzaui-context-menu-trigger',\n /** Present when the corresponding context menu is open. */\n popupOpen = 'data-popup-open',\n /** Present when the trigger is being pressed (long-press). */\n pressed = 'data-pressed',\n /** Present when the trigger is disabled. */\n disabled = 'data-disabled',\n}\n","export enum ContextMenuArrowDataAttributes {\n /**\n * Identifies the component part.\n * @type {'bazzaui-context-menu-arrow'}\n */\n slot = 'bazzaui-context-menu-arrow',\n /**\n * Present when the popup menu is open.\n */\n open = 'data-open',\n /**\n * Present when the popup menu is closed.\n */\n closed = 'data-closed',\n /**\n * Indicates which side the popup is positioned relative to the trigger.\n * @type {'top' | 'bottom' | 'left' | 'right' | 'inline-end' | 'inline-start'}\n */\n side = 'data-side',\n /**\n * Indicates how the popup is aligned relative to specified side.\n * @type {'start' | 'center' | 'end'}\n */\n align = 'data-align',\n /**\n * Present when the arrow is not centered due to collision avoidance.\n */\n uncentered = 'data-uncentered',\n}\n","export enum ContextMenuBackdropDataAttributes {\n /**\n * Identifies the component part.\n * @type {'bazzaui-context-menu-backdrop'}\n */\n slot = 'bazzaui-context-menu-backdrop',\n /**\n * Present when the popup menu is open.\n */\n open = 'data-open',\n /**\n * Present when the popup menu is closed.\n */\n closed = 'data-closed',\n /**\n * Present when the popup menu is animating in.\n */\n startingStyle = 'data-starting-style',\n /**\n * Present when the popup menu is animating out.\n */\n endingStyle = 'data-ending-style',\n}\n","export enum ContextMenuCheckboxItemDataAttributes {\n /**\n * Identifies the component part.\n * @type {'bazzaui-context-menu-checkbox-item'}\n */\n slot = 'bazzaui-context-menu-checkbox-item',\n /**\n * Present when the checkbox item is checked.\n */\n checked = 'data-checked',\n /**\n * Present when the checkbox item is unchecked.\n */\n unchecked = 'data-unchecked',\n /**\n * Present when the item is highlighted (via keyboard or pointer).\n */\n highlighted = 'data-highlighted',\n /**\n * Present when the item is disabled.\n */\n disabled = 'data-disabled',\n}\n\nexport enum ContextMenuCheckboxItemIndicatorDataAttributes {\n /**\n * Identifies the component part.\n * @type {'bazzaui-context-menu-checkbox-item-indicator'}\n */\n slot = 'bazzaui-context-menu-checkbox-item-indicator',\n /**\n * Present when the checkbox item is checked.\n */\n checked = 'data-checked',\n /**\n * Present when the checkbox item is unchecked.\n */\n unchecked = 'data-unchecked',\n}\n","export enum ContextMenuEmptyDataAttributes {\n /**\n * Identifies the component part.\n * @type {'bazzaui-context-menu-empty'}\n */\n slot = 'bazzaui-context-menu-empty',\n}\n","export enum ContextMenuGroupDataAttributes {\n /**\n * Identifies the component part.\n * @type {'bazzaui-context-menu-group'}\n */\n slot = 'bazzaui-context-menu-group',\n}\n","export enum ContextMenuGroupLabelDataAttributes {\n /**\n * Identifies the component part.\n * @type {'bazzaui-context-menu-group-label'}\n */\n slot = 'bazzaui-context-menu-group-label',\n}\n","export const ContextMenuIconDataAttributes = {\n /**\n * Identifies the component part.\n * @type {'bazzaui-context-menu-icon'}\n */\n slot: 'bazzaui-context-menu-icon',\n /** Present when the popup is open. */\n open: 'data-popup-open',\n} as const\n","export enum ContextMenuInputDataAttributes {\n /**\n * Identifies the component part.\n * @type {'bazzaui-context-menu-input'}\n */\n slot = 'bazzaui-context-menu-input',\n /**\n * Present when the popup menu is open.\n */\n open = 'data-open',\n /**\n * Present when the popup menu is closed.\n */\n closed = 'data-closed',\n}\n","export enum ContextMenuItemDataAttributes {\n /**\n * Identifies the component part.\n * @type {'bazzaui-context-menu-item'}\n */\n slot = 'bazzaui-context-menu-item',\n /**\n * Present when the item is highlighted (via keyboard or pointer).\n */\n highlighted = 'data-highlighted',\n /**\n * Present when the item is disabled.\n */\n disabled = 'data-disabled',\n}\n","export enum ContextMenuListDataAttributes {\n /**\n * Identifies the component part.\n * @type {'bazzaui-context-menu-list'}\n */\n slot = 'bazzaui-context-menu-list',\n /**\n * Always present on the list element.\n * Used for styling and by useStickyRowWidth to find the list container.\n */\n list = 'data-popup-menu-list',\n}\n","export enum ContextMenuPopupDataAttributes {\n /**\n * Identifies the component part.\n * @type {'bazzaui-context-menu-popup'}\n */\n slot = 'bazzaui-context-menu-popup',\n /**\n * Present when the popup menu is open.\n */\n open = 'data-open',\n /**\n * Present when the popup menu is closed.\n */\n closed = 'data-closed',\n /**\n * Indicates which side the popup is positioned relative to the trigger.\n * @type {'top' | 'bottom' | 'left' | 'right'}\n */\n side = 'data-side',\n /**\n * Indicates how the popup is aligned relative to specified side.\n * @type {'start' | 'center' | 'end'}\n */\n align = 'data-align',\n /**\n * Present when the popup is animating in.\n */\n startingStyle = 'data-starting-style',\n /**\n * Present when the popup is animating out.\n */\n endingStyle = 'data-ending-style',\n /**\n * Present if animations should be instant.\n * @type {'click' | 'dismiss'}\n */\n instant = 'data-instant',\n /**\n * Present when this popup's surface is the focus owner.\n * Useful for styling the currently focused menu in a submenu chain.\n */\n focused = 'data-focused',\n /**\n * Present when this popup has an open submenu below it in the menu tree.\n * Useful for styling all parent menus in an open submenu chain.\n */\n hasOpenSubmenu = 'data-has-open-submenu',\n /**\n * Present when this popup is a submenu (not the root menu).\n * Useful for applying different styles to submenus vs root menus.\n */\n submenu = 'data-submenu',\n /**\n * Present while navigating between subpages in this popup.\n * Useful for temporary transition adjustments during subpage focus handoff.\n */\n navigating = 'data-navigating',\n}\n","export enum ContextMenuPositionerDataAttributes {\n /**\n * Identifies the component part.\n * @type {'bazzaui-context-menu-positioner'}\n */\n slot = 'bazzaui-context-menu-positioner',\n /**\n * Present when the popup menu is open.\n */\n open = 'data-open',\n /**\n * Present when the popup menu is closed.\n */\n closed = 'data-closed',\n /**\n * Present when the anchor is hidden.\n */\n anchorHidden = 'data-anchor-hidden',\n /**\n * Indicates which side the popup is positioned relative to the trigger.\n * @type {'top' | 'bottom' | 'left' | 'right' | 'inline-end' | 'inline-start'}\n */\n side = 'data-side',\n /**\n * Indicates how the popup is aligned relative to specified side.\n * @type {'start' | 'center' | 'end' | 'list-start'}\n */\n align = 'data-align',\n}\n","export enum ContextMenuRadioGroupDataAttributes {\n /**\n * Identifies the component part.\n * @type {'bazzaui-context-menu-radio-group'}\n */\n slot = 'bazzaui-context-menu-radio-group',\n /**\n * Present when the radio group is disabled.\n */\n disabled = 'data-disabled',\n}\n","export enum ContextMenuRadioItemDataAttributes {\n /**\n * Identifies the component part.\n * @type {'bazzaui-context-menu-radio-item'}\n */\n slot = 'bazzaui-context-menu-radio-item',\n /**\n * Present when the radio item is checked/selected.\n */\n checked = 'data-checked',\n /**\n * Present when the radio item is unchecked.\n */\n unchecked = 'data-unchecked',\n /**\n * Present when the item is highlighted (via keyboard or pointer).\n */\n highlighted = 'data-highlighted',\n /**\n * Present when the item is disabled.\n */\n disabled = 'data-disabled',\n}\n\nexport enum ContextMenuRadioItemIndicatorDataAttributes {\n /**\n * Identifies the component part.\n * @type {'bazzaui-context-menu-radio-item-indicator'}\n */\n slot = 'bazzaui-context-menu-radio-item-indicator',\n /**\n * Present when the radio item is checked/selected.\n */\n checked = 'data-checked',\n /**\n * Present when the radio item is unchecked.\n */\n unchecked = 'data-unchecked',\n}\n","export const ContextMenuScrollArrowDataAttributes = {\n /**\n * Identifies the component part for scroll up arrow.\n * @type {'bazzaui-context-menu-scroll-up-arrow'}\n */\n slotUp: 'bazzaui-context-menu-scroll-up-arrow',\n /**\n * Identifies the component part for scroll down arrow.\n * @type {'bazzaui-context-menu-scroll-down-arrow'}\n */\n slotDown: 'bazzaui-context-menu-scroll-down-arrow',\n /**\n * Direction of the scroll arrow.\n * @type {'up' | 'down'}\n */\n direction: 'data-direction',\n /**\n * Side of the popup.\n * @type {'top' | 'bottom' | 'left' | 'right'}\n */\n side: 'data-side',\n} as const\n","export enum ContextMenuSeparatorDataAttributes {\n /**\n * Identifies the component part.\n * @type {'bazzaui-context-menu-separator'}\n */\n slot = 'bazzaui-context-menu-separator',\n}\n","export enum ContextMenuShortcutDataAttributes {\n /**\n * Identifies the component part.\n * @type {'bazzaui-context-menu-shortcut'}\n */\n slot = 'bazzaui-context-menu-shortcut',\n /**\n * Present when the parent item is highlighted.\n */\n highlighted = 'data-highlighted',\n}\n","export enum ContextMenuSubmenuTriggerDataAttributes {\n /**\n * Identifies the component part.\n * @type {'bazzaui-context-menu-submenu-trigger'}\n */\n slot = 'bazzaui-context-menu-submenu-trigger',\n /**\n * Present on submenu trigger elements.\n */\n submenuTrigger = 'data-submenu-trigger',\n /**\n * Present when the submenu popup is open.\n */\n popupOpen = 'data-popup-open',\n /**\n * Present when the submenu owns keyboard focus.\n */\n popupFocused = 'data-popup-focused',\n /**\n * Present when the item is highlighted.\n */\n highlighted = 'data-highlighted',\n /**\n * Present when the item is disabled.\n */\n disabled = 'data-disabled',\n}\n\nexport enum ContextMenuSubmenuTriggerIndicatorDataAttributes {\n /**\n * Identifies the component part.\n * @type {'bazzaui-context-menu-submenu-trigger-indicator'}\n */\n slot = 'bazzaui-context-menu-submenu-trigger-indicator',\n /**\n * Present when the submenu popup is open.\n */\n popupOpen = 'data-popup-open',\n}\n","export enum ContextMenuSubpageBackDataAttributes {\n /**\n * Identifies the component part.\n * @type {'bazzaui-context-menu-subpage-back'}\n */\n slot = 'bazzaui-context-menu-subpage-back',\n /**\n * Present when navigating back is available.\n */\n canGoBack = 'data-can-go-back',\n /**\n * Present when the button is disabled.\n */\n disabled = 'data-disabled',\n}\n","export enum ContextMenuSubpageBackItemDataAttributes {\n /**\n * Identifies the component part.\n * @type {'bazzaui-context-menu-subpage-back-item'}\n */\n slot = 'bazzaui-context-menu-subpage-back-item',\n /**\n * Present on subpage back item elements.\n */\n subpageBackItem = 'data-subpage-back-item',\n /**\n * Present when the item is highlighted.\n */\n highlighted = 'data-highlighted',\n /**\n * Present when the item is disabled.\n */\n disabled = 'data-disabled',\n}\n","export enum ContextMenuSubpageTriggerDataAttributes {\n /**\n * Identifies the component part.\n * @type {'bazzaui-context-menu-subpage-trigger'}\n */\n slot = 'bazzaui-context-menu-subpage-trigger',\n /**\n * Present on subpage trigger elements.\n */\n subpageTrigger = 'data-subpage-trigger',\n /**\n * Present when the target page is active.\n */\n popupOpen = 'data-popup-open',\n /**\n * Present when the target page owns keyboard focus.\n */\n popupFocused = 'data-popup-focused',\n /**\n * Present when the item is highlighted.\n */\n highlighted = 'data-highlighted',\n /**\n * Present when the item is disabled.\n */\n disabled = 'data-disabled',\n}\n","export enum ContextMenuSurfaceDataAttributes {\n /**\n * Identifies the component part.\n * @type {'bazzaui-context-menu-surface'}\n */\n slot = 'bazzaui-context-menu-surface',\n}\n"],"mappings":"unBAAA,IAAAA,GAAA,GAAAC,GAAAD,GAAA,WAAAE,EAAA,aAAAC,EAAA,iBAAAC,GAAA,0BAAAC,GAAA,cAAAC,EAAA,aAAAC,EAAA,iBAAAC,EAAA,gBAAAC,EAAA,UAAAC,GAAA,UAAAC,GAAA,eAAAC,GAAA,SAAAC,GAAA,UAAAP,EAAA,SAAAQ,G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A,eAAiB,uBAIjBA,EAAA,UAAY,kBAIZA,EAAA,aAAe,qBAIfA,EAAA,YAAc,mBAIdA,EAAA,SAAW,gBAzBDA,QAAA,IA4BAC,QAKVA,EAAA,KAAO,iDAIPA,EAAA,UAAY,kBATFA,QAAA,IC5BL,IAAKC,QAKVA,EAAA,KAAO,oCAIPA,EAAA,UAAY,mBAIZA,EAAA,SAAW,gBAbDA,QAAA,ICAL,IAAKC,QAKVA,EAAA,KAAO,yCAIPA,EAAA,gBAAkB,yBAIlBA,EAAA,YAAc,mBAIdA,EAAA,SAAW,gBAjBDA,QAAA,ICAL,IAAKC,QAKVA,EAAA,KAAO,uCAIPA,EAAA,eAAiB,uBAIjBA,EAAA,UAAY,kBAIZA,EAAA,aAAe,qBAIfA,EAAA,YAAc,mBAIdA,EAAA,SAAW,gBAzBDA,QAAA,ICAL,IAAKC,QAKVA,EAAA,KAAO,+BALGA,QAAA","names":["index_parts_exports","__export","PopupMenuArrow","PopupMenuBackdrop","PopupMenuCheckboxItem","PopupMenuCheckboxItemIndicator","PopupMenuInput","PopupMenuDataList","PopupMenuDataSubpages","PopupMenuDataSurface","PopupMenuEmpty","PopupMenuGroup","PopupMenuGroupLabel","PopupMenuIcon","PopupMenuItem","PopupMenuList","PopupMenuPopup","PopupMenuPortal","PopupMenuPositioner","PopupMenuRadioGroup","PopupMenuRadioGroupValue","PopupMenuRadioItem","PopupMenuRadioItemIndicator","ContextMenuRoot","PopupMenuScrollDownArrow","PopupMenuScrollUpArrow","PopupMenuSeparator","PopupMenuShortcut","PopupMenuSubmenuRoot","PopupMenuSubmenuTrigger","PopupMenuSubmenuTriggerIndicator","PopupMenuSubpage","PopupMenuSubpageBack","PopupMenuSubpageBackItem","PopupMenuSubpageTrigger","PopupMenuSurface","ContextMenuTrigger","useAsyncMenuCoordinator","useMaybeAsyncMenuCoordinator","Popover","React","jsx","ContextMenuInternalContext","useContextMenuInternal","context","createVirtualAnchor","x","y","isTouchEvent","size","ContextMenuRoot","props","openProp","onOpenChange","defaultOpen","virtualized","itemsProp","onHighlightChange","disabledProp","modal","closeOnOutsidePress","onOpenChangeCompleteProp","actionsRef","getQualifiedRowId","debug","children","store","focusOwnerStore","openChainStore","registerSurface","closeAll","virtualization","handleOpenChange","menuDisabled","setDisabled","usePopupMenuRoot","popoverActionsRef","open","virtualAnchor","setVirtualAnchor","setAnchorPosition","openMenu","closeMenu","handleOpenChangeComplete","nextOpen","handlePopoverOpenChange","popoverDetails","internalContextValue","PopupMenuProviders","Popover","useRender","React","ContextMenuTriggerDataAttributes","LONG_PRESS_DELAY","MOVE_THRESHOLD","stateAttributesMapping","value","ContextMenuTrigger","props","forwardedRef","disabledProp","render","className","style","onContextMenu","onTouchStart","onTouchMove","onTouchEnd","onTouchCancel","children","rest","setAnchorPosition","openMenu","rootDisabled","open","useContextMenuInternal","disabled","pressed","setPressed","longPressTimeoutRef","touchStartPosRef","clearLongPressTimeout","handleContextMenu","event","handleTouchStart","touch","handleTouchMove","dx","dy","handleTouchEnd","handleTouchCancel","state","useRender","ContextMenuArrowDataAttributes","ContextMenuBackdropDataAttributes","ContextMenuCheckboxItemDataAttributes","ContextMenuCheckboxItemIndicatorDataAttributes","ContextMenuEmptyDataAttributes","ContextMenuGroupDataAttributes","ContextMenuGroupLabelDataAttributes","ContextMenuIconDataAttributes","ContextMenuInputDataAttributes","ContextMenuItemDataAttributes","ContextMenuListDataAttributes","ContextMenuPopupDataAttributes","ContextMenuPositionerDataAttributes","ContextMenuRadioGroupDataAttributes","ContextMenuRadioItemDataAttributes","ContextMenuRadioItemIndicatorDataAttributes","ContextMenuScrollArrowDataAttributes","ContextMenuSeparatorDataAttributes","ContextMenuShortcutDataAttributes","ContextMenuSubmenuTriggerDataAttributes","ContextMenuSubmenuTriggerIndicatorDataAttributes","ContextMenuSubpageBackDataAttributes","ContextMenuSubpageBackItemDataAttributes","ContextMenuSubpageTriggerDataAttributes","ContextMenuSurfaceDataAttributes"]}