@structyl/core 1.0.0

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.
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/slot.tsx","../src/primitive.tsx","../src/create-context.tsx","../src/portal.tsx","../src/visually-hidden.tsx","../src/direction.tsx","../src/_internal.ts","../src/presence.tsx","../src/focus-scope.tsx","../src/focus-guards.tsx","../src/dismissable-layer.tsx","../src/collection.tsx","../src/roving-focus-group.tsx","../src/arrow.tsx","../src/accessible-icon.tsx","../src/scroll-lock.tsx","../src/popper.tsx"],"names":["React","React2","createContext","React3","React4","ReactDOM","React5","React6","composeRefs","React7","useId","React8","getElementRef","React9","React10","React11","layers","index","React12","useCollection","EVENT_OPTIONS","React13","focusFirst","React14","React15","React16","React17","offsetMiddleware","shiftMiddleware","limitShift","flipMiddleware","sizeMiddleware","arrowMiddleware","hideMiddleware","useFloating","autoUpdate"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAYA,IAAM,IAAA,GAAaA,kBAAA,CAAA,UAAA,CAAmC,CAAC,KAAA,EAAO,YAAA,KAAiB;AAC7E,EAAA,MAAM,EAAE,QAAA,EAAU,GAAG,SAAA,EAAU,GAAI,KAAA;AACnC,EAAA,MAAM,aAAA,GAAsBA,kBAAA,CAAA,QAAA,CAAS,OAAA,CAAQ,QAAQ,CAAA;AACrD,EAAA,MAAM,SAAA,GAAY,aAAA,CAAc,IAAA,CAAK,WAAW,CAAA;AAEhD,EAAA,IAAI,SAAA,EAAW;AAEb,IAAA,MAAM,UAAA,GAAc,UAAU,KAAA,CAAwC,QAAA;AACtE,IAAA,MAAM,WAAA,GAAc,aAAA,CAAc,GAAA,CAAI,CAAC,KAAA,KAAU;AAC/C,MAAA,IAAI,UAAU,SAAA,EAAW;AACvB,QAAA,IAAUA,kBAAA,CAAA,QAAA,CAAS,MAAM,UAAU,CAAA,GAAI,GAAG,OAAaA,kBAAA,CAAA,QAAA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AC/C,MAAA,MAAM,KAAA,GAAQ,QAAQ,CAAC,CAAA;AACvB,MAAA,IAAI,CAAC,KAAA,EAAO;AACZ,MAAA,MAAM,SAAA,GAAY,KAAA,CAAM,aAAA,GAAgB,CAAC,CAAA;AACzC,MAAA,MAAM,CAAA,GAAI,SAAA,GAAY,SAAA,CAAU,UAAA,GAAa,MAAM,WAAA,CAAY,KAAA;AAC/D,MAAA,MAAM,CAAA,GAAI,SAAA,GAAY,SAAA,CAAU,SAAA,GAAY,MAAM,WAAA,CAAY,MAAA;AAC9D,MAAA,OAAA,CAAQ,EAAE,KAAA,EAAO,CAAA,EAAG,MAAA,EAAQ,GAAG,CAAA;AAAA,IACjC,CAAC,CAAA;AACD,IAAA,QAAA,CAAS,OAAA,CAAQ,OAAA,EAAS,EAAE,GAAA,EAAK,cAAc,CAAA;AAC/C,IAAA,OAAO,MAAM,SAAS,UAAA,EAAW;AAAA,EACnC,CAAA,EAAG,CAAC,OAAO,CAAC,CAAA;AACZ,EAAA,OAAO,IAAA;AACT","file":"index.cjs","sourcesContent":["'use client';\n\nimport * as React from 'react';\n\ninterface SlotProps extends React.HTMLAttributes<HTMLElement> {\n children?: React.ReactNode;\n}\n\n/**\n * Renders a copy of its child element with merged props.\n * Powers the `asChild` pattern across the library.\n */\nconst Slot = React.forwardRef<HTMLElement, SlotProps>((props, forwardedRef) => {\n const { children, ...slotProps } = props;\n const childrenArray = React.Children.toArray(children);\n const slottable = childrenArray.find(isSlottable);\n\n if (slottable) {\n // The new element to render is the one passed as a child of `Slottable`\n const newElement = (slottable.props as { children: React.ReactNode }).children;\n const newChildren = childrenArray.map((child) => {\n if (child === slottable) {\n if (React.Children.count(newElement) > 1) return React.Children.only(null);\n return React.isValidElement(newElement)\n ? (newElement.props as { children: React.ReactNode }).children\n : null;\n }\n return child;\n });\n\n return (\n <SlotClone {...slotProps} ref={forwardedRef}>\n {React.isValidElement(newElement)\n ? React.cloneElement(newElement, undefined, newChildren)\n : null}\n </SlotClone>\n );\n }\n\n // Pass the single filtered child — avoids SlotClone seeing boolean falsy values\n // (e.g. {icon && <span/>}) that components emit when asChild=true.\n const singleChild = childrenArray.length === 1 ? childrenArray[0] : children;\n return (\n <SlotClone {...slotProps} ref={forwardedRef}>\n {singleChild}\n </SlotClone>\n );\n});\nSlot.displayName = 'Slot';\n\ninterface SlotCloneProps {\n children: React.ReactNode;\n}\n\nconst SlotClone = React.forwardRef<unknown, SlotCloneProps>((props, forwardedRef) => {\n const { children, ...slotProps } = props;\n\n if (React.isValidElement(children)) {\n const childRef = getElementRef(children);\n const ref = forwardedRef ? composeRefs(forwardedRef, childRef) : childRef;\n return React.cloneElement(\n children,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n { ...mergeProps(slotProps, children.props as Record<string, any>), ref } as any,\n );\n }\n\n return React.Children.count(children) > 1 ? React.Children.only(null) : null;\n});\nSlotClone.displayName = 'SlotClone';\n\nconst Slottable = ({ children }: { children: React.ReactNode }) => <>{children}</>;\n\nfunction isSlottable(child: React.ReactNode): child is React.ReactElement {\n return React.isValidElement(child) && child.type === Slottable;\n}\n\nfunction mergeProps(\n slotProps: Record<string, unknown>,\n childProps: Record<string, unknown>,\n): Record<string, unknown> {\n const overrideProps = { ...childProps };\n\n for (const propName in childProps) {\n const slotPropValue = slotProps[propName];\n const childPropValue = childProps[propName];\n const isHandler = /^on[A-Z]/.test(propName);\n if (isHandler) {\n if (slotPropValue && childPropValue) {\n overrideProps[propName] = (...args: unknown[]) => {\n (childPropValue as (...a: unknown[]) => unknown)(...args);\n (slotPropValue as (...a: unknown[]) => unknown)(...args);\n };\n } else if (slotPropValue) {\n overrideProps[propName] = slotPropValue;\n }\n } else if (propName === 'style') {\n overrideProps[propName] = { ...(slotPropValue as object), ...(childPropValue as object) };\n } else if (propName === 'className') {\n overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(' ');\n }\n }\n\n return { ...slotProps, ...overrideProps };\n}\n\nfunction composeRefs<T>(...refs: (React.Ref<T> | undefined)[]) {\n return (node: T) =>\n refs.forEach((ref) => {\n if (typeof ref === 'function') ref(node);\n else if (ref != null) (ref as { current: T }).current = node;\n });\n}\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction getElementRef(element: React.ReactElement): React.Ref<any> | undefined {\n // React <=18 in DEV exposes `ref` on `props` behind a warning getter.\n let getter = Object.getOwnPropertyDescriptor(element.props, 'ref')?.get;\n let mayWarn = getter && 'isReactWarning' in getter && getter.isReactWarning;\n if (mayWarn) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return (element as any).ref;\n }\n\n // React 19 in DEV exposes `ref` on the element behind a warning getter.\n getter = Object.getOwnPropertyDescriptor(element, 'ref')?.get;\n mayWarn = getter && 'isReactWarning' in getter && getter.isReactWarning;\n if (mayWarn) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return (element.props as any).ref;\n }\n\n // Production, or once React has moved `ref` onto `props`.\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return (element.props as any).ref || (element as any).ref;\n}\n\nexport { Slot, Slottable };\nexport type { SlotProps };\n","'use client';\n\nimport * as React from 'react';\nimport { Slot } from './slot';\n\nconst NODES = [\n 'a',\n 'button',\n 'div',\n 'form',\n 'h2',\n 'h3',\n 'img',\n 'input',\n 'label',\n 'li',\n 'nav',\n 'ol',\n 'p',\n 'span',\n 'svg',\n 'ul',\n] as const;\n\ntype PrimitivePropsWithRef<E extends React.ElementType> = React.ComponentPropsWithRef<E> & {\n asChild?: boolean;\n};\n\ntype Primitives = {\n [E in (typeof NODES)[number]]: PrimitiveForwardRefComponent<E>;\n};\n\ntype PrimitiveForwardRefComponent<E extends React.ElementType> = React.ForwardRefExoticComponent<\n PrimitivePropsWithRef<E>\n>;\n\nconst Primitive = NODES.reduce((primitive, node) => {\n const Node = React.forwardRef(\n (props: PrimitivePropsWithRef<typeof node>, forwardedRef: React.ForwardedRef<unknown>) => {\n const { asChild, ...rest } = props;\n const Comp = asChild ? Slot : (node as React.ElementType);\n // Workaround for \"Hooks may not appear inside JSX...\" — ensures stable runtime\n if (typeof window !== 'undefined') {\n // noop — kept for env parity\n }\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return <Comp {...(rest as any)} ref={forwardedRef as React.Ref<any>} />;\n },\n );\n\n Node.displayName = `Primitive.${node}`;\n return { ...primitive, [node]: Node };\n}, {} as Primitives);\n\n/**\n * Polymorphic primitive component. Renders as the given HTML element by default,\n * or as the child element when `asChild` is true.\n *\n * @example\n * <Primitive.button onClick={...}>Click</Primitive.button>\n * <Primitive.button asChild><a href=\"/\">Link</a></Primitive.button>\n */\nexport { Primitive };\nexport type { PrimitivePropsWithRef };\n","'use client';\n\nimport * as React from 'react';\n\n/* ── Scope types ─────────────────────────────────────────────────────────── */\n\ntype Scope<C = unknown> = { [scopeName: string]: React.Context<C>[] } | undefined;\ntype ScopeHook = (scope: Scope) => { [__scopeProp: string]: Scope };\ninterface CreateScope {\n scopeName: string;\n (): ScopeHook;\n}\n\n/* ── createContext ───────────────────────────────────────────────────────── */\n\n/**\n * Create a typed context with a sensible error when used outside its Provider.\n *\n * @example\n * const [DialogProvider, useDialogContext] = createContext<DialogContextValue>('Dialog');\n */\nexport function createContext<ContextValueType extends object | null>(\n rootComponentName: string,\n defaultContext?: ContextValueType,\n): readonly [\n React.FC<ContextValueType & { children: React.ReactNode }>,\n (consumerName: string) => ContextValueType,\n] {\n const Context = React.createContext<ContextValueType | undefined>(defaultContext);\n\n function Provider(props: ContextValueType & { children: React.ReactNode }): React.JSX.Element {\n const { children, ...context } = props;\n // eslint-disable-next-line react-hooks/exhaustive-deps\n const value = React.useMemo(() => context, Object.values(context)) as ContextValueType;\n return <Context.Provider value={value}>{children}</Context.Provider>;\n }\n Provider.displayName = `${rootComponentName}Provider`;\n\n function useContextHook(consumerName: string): ContextValueType {\n const ctx = React.useContext(Context);\n if (ctx !== undefined) return ctx;\n if (defaultContext !== undefined) return defaultContext;\n throw new Error(`\\`${consumerName}\\` must be used within \\`${rootComponentName}\\``);\n }\n\n return [Provider, useContextHook] as const;\n}\n\n/* ── createContextScope ──────────────────────────────────────────────────── */\n\n/**\n * Create a scoped context factory. Solves context leakage when the same\n * component family is nested inside itself (e.g. nested Dialogs, nested Menus)\n * or when two families share an internal primitive (e.g. both use PopperContext).\n *\n * Returns `[createContext, createScope]`:\n * - `createContext` behaves like the simple version above but scoped.\n * - `createScope` is a CreateScope factory consumed by other component families\n * that depend on this one.\n *\n * @example\n * const [createDialogContext, createDialogScope] = createContextScope('Dialog');\n * const [DialogProvider, useDialogContext] = createDialogContext<DialogContextValue>('Dialog');\n *\n * // In Dialog.Root:\n * function Root({ __scopeDialog, ...props }) {\n * const scope = useDialogScope(__scopeDialog);\n * return <DialogProvider {...scope} open={...}>{props.children}</DialogProvider>;\n * }\n */\nexport function createContextScope(\n scopeName: string,\n createContextScopeDeps: CreateScope[] = [],\n): readonly [\n <ContextValueType extends object | null>(\n rootComponentName: string,\n defaultContext?: ContextValueType,\n ) => readonly [\n React.FC<ContextValueType & { scope: Scope; children: React.ReactNode }>,\n (consumerName: string, scope: Scope) => ContextValueType,\n ],\n CreateScope,\n] {\n // Accumulates the base context instances registered via createScopedContext\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n let defaultContexts: React.Context<any>[] = [];\n\n /* ── Scoped context factory ── */\n function createScopedContext<ContextValueType extends object | null>(\n rootComponentName: string,\n defaultContext?: ContextValueType,\n ) {\n const BaseContext = React.createContext<ContextValueType | undefined>(defaultContext);\n const index = defaultContexts.push(BaseContext) - 1;\n\n function Provider(\n props: ContextValueType & { scope: Scope; children: React.ReactNode },\n ): React.JSX.Element {\n const { scope, children, ...context } = props;\n const Context = (\n (scope?.[scopeName]?.[index] as React.Context<ContextValueType | undefined> | undefined) ??\n BaseContext\n );\n // eslint-disable-next-line react-hooks/exhaustive-deps\n const value = React.useMemo(() => context as ContextValueType, Object.values(context));\n return <Context.Provider value={value}>{children}</Context.Provider>;\n }\n Provider.displayName = `${rootComponentName}Provider`;\n\n function useScopedContext(consumerName: string, scope: Scope): ContextValueType {\n const Context = (\n (scope?.[scopeName]?.[index] as React.Context<ContextValueType | undefined> | undefined) ??\n BaseContext\n );\n const ctx = React.useContext(Context);\n if (ctx !== undefined) return ctx;\n if (defaultContext !== undefined) return defaultContext;\n throw new Error(`\\`${consumerName}\\` must be used within \\`${rootComponentName}\\``);\n }\n\n return [Provider, useScopedContext] as const;\n }\n\n /* ── Scope hook factory ── */\n const createScope: CreateScope = () => {\n // Create a fresh set of context instances for this scope level —\n // one per registered createScopedContext call.\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const scopeContexts: React.Context<any>[] = defaultContexts.map(() =>\n React.createContext<unknown>(undefined),\n );\n return function useScopeHook(parentScope: Scope) {\n return {\n [`__scope${scopeName}`]: { ...parentScope, [scopeName]: scopeContexts },\n } as { [__scopeProp: string]: Scope };\n };\n };\n createScope.scopeName = scopeName;\n\n return [\n createScopedContext,\n composeContextScopes(createScope, ...createContextScopeDeps),\n ] as const;\n}\n\n/* ── composeContextScopes ────────────────────────────────────────────────── */\n\n/**\n * Merge multiple CreateScope factories into one. Used internally when a\n * component family depends on another (e.g. DropdownMenu depends on Popper).\n */\nexport function composeContextScopes(...scopes: CreateScope[]): CreateScope {\n const composed: CreateScope = () => {\n const scopeHooks = scopes.map(scope => scope());\n return function useComposedScopeHook(parentScope: Scope) {\n return scopeHooks.reduce<Record<string, Scope>>(\n (nextScope, hook) => ({ ...nextScope, ...hook(parentScope) }),\n {},\n );\n };\n };\n composed.scopeName = scopes.map(s => s.scopeName).join(',');\n return composed;\n}\n","'use client';\n\nimport * as React from 'react';\nimport * as ReactDOM from 'react-dom';\nimport { Primitive } from './primitive';\n\ninterface PortalProps extends React.ComponentPropsWithoutRef<typeof Primitive.div> {\n /** Element where the portal renders. Defaults to `document.body`. */\n container?: Element | DocumentFragment | null;\n}\n\nconst Portal = React.forwardRef<HTMLDivElement, PortalProps>(\n (props, forwardedRef) => {\n const { container: containerProp, ...portalProps } = props;\n const [mounted, setMounted] = React.useState(false);\n\n React.useEffect(() => setMounted(true), []);\n\n const container =\n containerProp ?? (typeof document !== 'undefined' ? document.body : null);\n\n if (!mounted || !container) return null;\n\n return ReactDOM.createPortal(\n <Primitive.div {...portalProps} ref={forwardedRef} />,\n container,\n );\n },\n);\nPortal.displayName = 'Portal';\n\nexport { Portal };\nexport type { PortalProps };\n","'use client';\n\nimport * as React from 'react';\nimport { Primitive } from './primitive';\n\nconst VISUALLY_HIDDEN_STYLES: React.CSSProperties = {\n position: 'absolute',\n border: 0,\n width: 1,\n height: 1,\n padding: 0,\n margin: -1,\n overflow: 'hidden',\n clip: 'rect(0, 0, 0, 0)',\n whiteSpace: 'nowrap',\n wordWrap: 'normal',\n};\n\ntype VisuallyHiddenProps = React.ComponentPropsWithoutRef<typeof Primitive.span>;\n\nconst VisuallyHidden = React.forwardRef<HTMLSpanElement, VisuallyHiddenProps>(\n (props, forwardedRef) => (\n <Primitive.span\n {...props}\n ref={forwardedRef}\n style={{ ...VISUALLY_HIDDEN_STYLES, ...props.style }}\n />\n ),\n);\nVisuallyHidden.displayName = 'VisuallyHidden';\n\nexport { VisuallyHidden };\nexport type { VisuallyHiddenProps };\n","'use client';\n\nimport * as React from 'react';\n\ntype Direction = 'ltr' | 'rtl';\n\nconst DirectionContext = React.createContext<Direction | undefined>(undefined);\n\ninterface DirectionProviderProps {\n children?: React.ReactNode;\n dir: Direction;\n}\n\nconst DirectionProvider: React.FC<DirectionProviderProps> = ({ dir, children }) => (\n <DirectionContext.Provider value={dir}>{children}</DirectionContext.Provider>\n);\n\nexport function useDirection(localDir?: Direction): Direction {\n const globalDir = React.useContext(DirectionContext);\n return localDir ?? globalDir ?? 'ltr';\n}\n\nexport { DirectionProvider };\nexport type { Direction };\n","'use client';\n\nimport * as React from 'react';\n\ntype PossibleRef<T> = React.Ref<T> | undefined | ((value: T | null) => void);\n\nfunction setRef<T>(ref: PossibleRef<T>, value: T | null) {\n if (typeof ref === 'function') ref(value as T);\n else if (ref != null && typeof ref === 'object')\n (ref as { current: T | null }).current = value;\n}\n\nexport function composeRefs<T>(...refs: PossibleRef<T>[]): (node: T | null) => void {\n return (node) => refs.forEach((ref) => setRef(ref, node));\n}\n\nexport function useComposedRefs<T>(...refs: PossibleRef<T>[]): (node: T | null) => void {\n // eslint-disable-next-line react-hooks/exhaustive-deps\n return React.useCallback(composeRefs(...refs), refs);\n}\n\nexport function useCallbackRef<T extends (...args: never[]) => unknown>(\n callback: T | undefined,\n): T {\n const callbackRef = React.useRef(callback);\n React.useEffect(() => {\n callbackRef.current = callback;\n });\n return React.useMemo(\n () => ((...args) => callbackRef.current?.(...args)) as T,\n [],\n );\n}\n\ninterface ControllableStateParams<T> {\n prop?: T | undefined;\n defaultProp?: T | undefined;\n onChange?: (value: T) => void;\n}\n\nexport function useControllableState<T>({\n prop,\n defaultProp,\n onChange = () => {},\n}: ControllableStateParams<T>): [T | undefined, React.Dispatch<React.SetStateAction<T | undefined>>] {\n const [uncontrolled, setUncontrolled] = React.useState(defaultProp);\n const isControlled = prop !== undefined;\n const value = isControlled ? prop : uncontrolled;\n const handleChange = useCallbackRef(onChange);\n\n const setValue: React.Dispatch<React.SetStateAction<T | undefined>> = React.useCallback(\n (nextValue) => {\n if (isControlled) {\n const setter = nextValue as ((prev?: T) => T) | T;\n const newValue =\n typeof setter === 'function' ? (setter as (prev?: T) => T)(prop) : (setter as T);\n if (newValue !== prop) handleChange(newValue as T);\n } else {\n setUncontrolled((prev) => {\n const setter = nextValue as ((prev?: T) => T) | T;\n const newValue =\n typeof setter === 'function' ? (setter as (prev?: T) => T)(prev) : (setter as T);\n if (newValue !== prev) handleChange(newValue as T);\n return newValue;\n });\n }\n },\n [isControlled, prop, handleChange],\n );\n\n return [value, setValue];\n}\n\nlet idCounter = 0;\nfunction useReactId() {\n return (React as unknown as { useId?: () => string }).useId?.() ?? '';\n}\n\nexport function useId(prefix?: string): string {\n const reactId = useReactId();\n const [id, setId] = React.useState<string>(reactId);\n React.useEffect(() => {\n if (!reactId) setId(`yl-${++idCounter}`);\n }, [reactId]);\n return prefix ? `${prefix}-${id || reactId}` : id || reactId;\n}\n\nexport function composeEventHandlers<E>(\n originalEventHandler?: (event: E) => void,\n ourEventHandler?: (event: E) => void,\n { checkForDefaultPrevented = true } = {},\n): (event: E) => void {\n return function handleEvent(event: E) {\n originalEventHandler?.(event);\n if (\n checkForDefaultPrevented === false ||\n !(event as unknown as { defaultPrevented: boolean }).defaultPrevented\n ) {\n ourEventHandler?.(event);\n }\n };\n}\n","'use client';\n\nimport * as React from 'react';\nimport { useComposedRefs } from './_internal';\n\ntype PresenceState = 'mounted' | 'unmountSuspended' | 'unmounted';\ntype PresenceEvent = 'MOUNT' | 'ANIMATION_OUT' | 'ANIMATION_END' | 'UNMOUNT';\n\nconst machine: Record<PresenceState, Partial<Record<PresenceEvent, PresenceState>>> = {\n mounted: {\n UNMOUNT: 'unmounted',\n ANIMATION_OUT: 'unmountSuspended',\n },\n unmountSuspended: {\n MOUNT: 'mounted',\n ANIMATION_END: 'unmounted',\n },\n unmounted: {\n MOUNT: 'mounted',\n },\n};\n\n/**\n * Drives an animation-aware presence state machine. When `present` flips from\n * true → false the node remains mounted until a CSS animation or transition\n * completes, allowing exit animations to play.\n */\nfunction usePresence(present: boolean) {\n const [node, setNode] = React.useState<HTMLElement | null>(null);\n const stylesRef = React.useRef<CSSStyleDeclaration | null>(null);\n const prevPresentRef = React.useRef(present);\n const prevAnimationNameRef = React.useRef<string>('none');\n const initialState: PresenceState = present ? 'mounted' : 'unmounted';\n const [state, setState] = React.useState<PresenceState>(initialState);\n\n const send = React.useCallback((event: PresenceEvent) => {\n setState((prev) => {\n const next = machine[prev][event];\n return next ?? prev;\n });\n }, []);\n\n React.useEffect(() => {\n const currentAnimationName = getAnimationName(stylesRef.current);\n prevAnimationNameRef.current = state === 'mounted' ? currentAnimationName : 'none';\n }, [state]);\n\n React.useEffect(() => {\n const styles = stylesRef.current;\n const wasPresent = prevPresentRef.current;\n const hasPresentChanged = wasPresent !== present;\n\n if (hasPresentChanged) {\n const prevAnimationName = prevAnimationNameRef.current;\n const currentAnimationName = getAnimationName(styles);\n\n if (present) {\n send('MOUNT');\n } else if (currentAnimationName === 'none' || styles?.display === 'none') {\n send('UNMOUNT');\n } else {\n const isAnimating = prevAnimationName !== currentAnimationName;\n if (wasPresent && isAnimating) {\n send('ANIMATION_OUT');\n } else {\n send('UNMOUNT');\n }\n }\n\n prevPresentRef.current = present;\n }\n }, [present, send]);\n\n React.useEffect(() => {\n if (!node) {\n send('ANIMATION_END');\n return;\n }\n const handleAnimationEnd = (event: AnimationEvent | TransitionEvent) => {\n const currentAnimationName = getAnimationName(stylesRef.current);\n const animationName =\n 'animationName' in event ? event.animationName : '';\n const isCurrent =\n currentAnimationName.includes(animationName) || animationName === '';\n if (event.target === node && isCurrent) {\n send('ANIMATION_END');\n }\n };\n const handleAnimationStart = (event: AnimationEvent) => {\n if (event.target === node) {\n prevAnimationNameRef.current = getAnimationName(stylesRef.current);\n }\n };\n node.addEventListener('animationstart', handleAnimationStart);\n node.addEventListener('animationcancel', handleAnimationEnd);\n node.addEventListener('animationend', handleAnimationEnd);\n node.addEventListener('transitioncancel', handleAnimationEnd);\n node.addEventListener('transitionend', handleAnimationEnd);\n return () => {\n node.removeEventListener('animationstart', handleAnimationStart);\n node.removeEventListener('animationcancel', handleAnimationEnd);\n node.removeEventListener('animationend', handleAnimationEnd);\n node.removeEventListener('transitioncancel', handleAnimationEnd);\n node.removeEventListener('transitionend', handleAnimationEnd);\n };\n }, [node, send]);\n\n return {\n isPresent: state !== 'unmounted',\n ref: React.useCallback((el: HTMLElement | null) => {\n stylesRef.current = el ? getComputedStyle(el) : null;\n setNode(el);\n }, []),\n };\n}\n\nfunction getAnimationName(styles: CSSStyleDeclaration | null): string {\n return styles?.animationName || 'none';\n}\n\ninterface PresenceProps {\n present: boolean;\n children:\n | React.ReactElement\n | ((props: { present: boolean }) => React.ReactElement);\n /** Force the element to stay mounted regardless of `present`. */\n forceMount?: boolean;\n}\n\nconst Presence: React.FC<PresenceProps> = (props) => {\n const { present, children, forceMount } = props;\n const presence = usePresence(present);\n const isFunctionChild = typeof children === 'function';\n\n const child = isFunctionChild\n ? children({ present: presence.isPresent })\n : (React.Children.only(children) as React.ReactElement);\n\n const childRef = getElementRef(child);\n const ref = useComposedRefs(presence.ref, childRef);\n\n const shouldRender = forceMount || isFunctionChild || presence.isPresent;\n if (!shouldRender) return null;\n\n return React.cloneElement(child, { ref } as { ref?: React.Ref<HTMLElement> });\n};\nPresence.displayName = 'Presence';\n\nfunction getElementRef(\n element: React.ReactElement,\n): React.Ref<HTMLElement> | undefined {\n const props = element.props as { ref?: React.Ref<HTMLElement> };\n const ref19 = props?.ref;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const ref18 = (element as any).ref;\n return (ref19 ?? ref18) as React.Ref<HTMLElement> | undefined;\n}\n\nexport { Presence, usePresence };\nexport type { PresenceProps };\n","'use client';\n\nimport * as React from 'react';\nimport { useComposedRefs, useCallbackRef } from './_internal';\nimport { Primitive } from './primitive';\n\nconst AUTOFOCUS_ON_MOUNT = 'focusScope.autoFocusOnMount';\nconst AUTOFOCUS_ON_UNMOUNT = 'focusScope.autoFocusOnUnmount';\nconst EVENT_OPTIONS = { bubbles: false, cancelable: true } as const;\n\ntype FocusableTarget = HTMLElement | { focus: () => void };\n\ninterface FocusScopeProps extends React.ComponentPropsWithoutRef<typeof Primitive.div> {\n /** When true, tabbing from the last focusable wraps to the first. */\n loop?: boolean;\n /** When true, focus cannot leave the scope while it is mounted. */\n trapped?: boolean;\n /** Called when focus moves into the scope. Call `event.preventDefault()` to prevent default. */\n onMountAutoFocus?: (event: Event) => void;\n /** Called when focus is about to leave the scope on unmount. Call `event.preventDefault()` to prevent default restoration. */\n onUnmountAutoFocus?: (event: Event) => void;\n}\n\nconst FocusScope = React.forwardRef<HTMLDivElement, FocusScopeProps>(\n (props, forwardedRef) => {\n const {\n loop = false,\n trapped = false,\n onMountAutoFocus: onMountAutoFocusProp,\n onUnmountAutoFocus: onUnmountAutoFocusProp,\n ...scopeProps\n } = props;\n\n const [container, setContainer] = React.useState<HTMLDivElement | null>(null);\n const onMountAutoFocus = useCallbackRef(onMountAutoFocusProp);\n const onUnmountAutoFocus = useCallbackRef(onUnmountAutoFocusProp);\n const lastFocusedElementRef = React.useRef<HTMLElement | null>(null);\n const composedRefs = useComposedRefs(forwardedRef, setContainer);\n\n // Scope-stack registration (must be declared before effects that depend on it)\n const scope = React.useRef<FocusScopeAPI>({\n paused: false,\n pause() {\n this.paused = true;\n },\n resume() {\n this.paused = false;\n },\n }).current;\n\n // Track focus within the scope so we can restore inside on focusout\n React.useEffect(() => {\n if (!trapped) return;\n const handleFocusIn = (event: FocusEvent) => {\n if (focusScopesStack.active !== scope) return;\n const target = event.target as HTMLElement | null;\n if (container?.contains(target)) {\n lastFocusedElementRef.current = target;\n } else {\n focus(lastFocusedElementRef.current, { select: true });\n }\n };\n const handleFocusOut = (event: FocusEvent) => {\n if (focusScopesStack.active !== scope) return;\n const relatedTarget = event.relatedTarget as HTMLElement | null;\n if (relatedTarget === null) return;\n if (!container?.contains(relatedTarget)) {\n focus(lastFocusedElementRef.current, { select: true });\n }\n };\n const handleMutations = (mutations: MutationRecord[]) => {\n const focusedEl = document.activeElement as HTMLElement | null;\n if (focusedEl !== document.body) return;\n for (const mutation of mutations) {\n if (mutation.removedNodes.length > 0) {\n focus(container, { select: true });\n }\n }\n };\n document.addEventListener('focusin', handleFocusIn);\n document.addEventListener('focusout', handleFocusOut);\n const mutationObserver = new MutationObserver(handleMutations);\n if (container) {\n mutationObserver.observe(container, { childList: true, subtree: true });\n }\n return () => {\n document.removeEventListener('focusin', handleFocusIn);\n document.removeEventListener('focusout', handleFocusOut);\n mutationObserver.disconnect();\n };\n }, [trapped, container, scope]);\n\n // Manage scope stack & mount/unmount focus\n React.useEffect(() => {\n if (!container) return;\n focusScopesStack.add(scope);\n const previouslyFocusedElement = document.activeElement as HTMLElement | null;\n const hasFocusedCandidate = container.contains(previouslyFocusedElement);\n\n if (!hasFocusedCandidate) {\n const mountEvent = new CustomEvent(AUTOFOCUS_ON_MOUNT, EVENT_OPTIONS);\n container.addEventListener(AUTOFOCUS_ON_MOUNT, onMountAutoFocus);\n container.dispatchEvent(mountEvent);\n if (!mountEvent.defaultPrevented) {\n focusFirst(removeLinks(getTabbableCandidates(container)), { select: true });\n if (document.activeElement === previouslyFocusedElement) {\n focus(container);\n }\n }\n }\n\n return () => {\n container.removeEventListener(AUTOFOCUS_ON_MOUNT, onMountAutoFocus);\n setTimeout(() => {\n const unmountEvent = new CustomEvent(AUTOFOCUS_ON_UNMOUNT, EVENT_OPTIONS);\n container.addEventListener(AUTOFOCUS_ON_UNMOUNT, onUnmountAutoFocus);\n container.dispatchEvent(unmountEvent);\n if (!unmountEvent.defaultPrevented) {\n focus(previouslyFocusedElement ?? document.body, { select: true });\n }\n container.removeEventListener(AUTOFOCUS_ON_UNMOUNT, onUnmountAutoFocus);\n focusScopesStack.remove(scope);\n }, 0);\n };\n }, [container, onMountAutoFocus, onUnmountAutoFocus, scope]);\n\n // Keyboard tab cycling\n const handleKeyDown = React.useCallback(\n (event: React.KeyboardEvent) => {\n if (!loop && !trapped) return;\n if (scope.paused) return;\n const isTabKey = event.key === 'Tab' && !event.altKey && !event.ctrlKey && !event.metaKey;\n const focusedElement = document.activeElement as HTMLElement | null;\n if (!isTabKey || !focusedElement) return;\n const containerEl = event.currentTarget as HTMLElement;\n const [first, last] = getTabbableEdges(containerEl);\n const hasTabbable = first && last;\n if (!hasTabbable) {\n if (focusedElement === containerEl) event.preventDefault();\n } else {\n if (!event.shiftKey && focusedElement === last) {\n event.preventDefault();\n if (loop) focus(first, { select: true });\n } else if (event.shiftKey && focusedElement === first) {\n event.preventDefault();\n if (loop) focus(last, { select: true });\n }\n }\n },\n [loop, trapped, scope.paused],\n );\n\n return (\n <Primitive.div\n tabIndex={-1}\n {...scopeProps}\n ref={composedRefs}\n onKeyDown={handleKeyDown}\n />\n );\n },\n);\nFocusScope.displayName = 'FocusScope';\n\n/* ── helpers ─────────────────────────────────────────────────────────── */\n\nfunction focus(element?: FocusableTarget | null, { select = false } = {}) {\n if (element && (element as HTMLElement).focus) {\n const previouslyFocusedElement = document.activeElement;\n (element as HTMLElement).focus({ preventScroll: true });\n if (\n element !== previouslyFocusedElement &&\n isSelectableInput(element as HTMLElement) &&\n select\n ) {\n (element as HTMLInputElement).select();\n }\n }\n}\n\nfunction focusFirst(candidates: HTMLElement[], { select = false } = {}) {\n const previouslyFocusedElement = document.activeElement;\n for (const candidate of candidates) {\n focus(candidate, { select });\n if (document.activeElement !== previouslyFocusedElement) return;\n }\n}\n\nfunction getTabbableEdges(container: HTMLElement): [HTMLElement | undefined, HTMLElement | undefined] {\n const candidates = getTabbableCandidates(container);\n const first = findVisible(candidates, container);\n const last = findVisible(candidates.reverse(), container);\n return [first, last];\n}\n\nfunction getTabbableCandidates(container: HTMLElement): HTMLElement[] {\n const nodes: HTMLElement[] = [];\n const walker = document.createTreeWalker(container, NodeFilter.SHOW_ELEMENT, {\n acceptNode: (node: Node) => {\n const el = node as HTMLElement;\n const isHiddenInput = el.tagName === 'INPUT' && (el as HTMLInputElement).type === 'hidden';\n if (el.hasAttribute('disabled') || el.hasAttribute('hidden') || isHiddenInput) {\n return NodeFilter.FILTER_SKIP;\n }\n return el.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;\n },\n });\n while (walker.nextNode()) nodes.push(walker.currentNode as HTMLElement);\n return nodes;\n}\n\nfunction findVisible(elements: HTMLElement[], container: HTMLElement): HTMLElement | undefined {\n for (const element of elements) {\n if (!isHidden(element, { upTo: container })) return element;\n }\n return undefined;\n}\n\nfunction isHidden(node: HTMLElement, { upTo }: { upTo?: HTMLElement } = {}): boolean {\n if (getComputedStyle(node).visibility === 'hidden') return true;\n let current: HTMLElement | null = node;\n while (current) {\n if (upTo !== undefined && current === upTo) return false;\n if (getComputedStyle(current).display === 'none') return true;\n current = current.parentElement;\n }\n return false;\n}\n\nfunction isSelectableInput(element: HTMLElement): element is HTMLInputElement {\n return element instanceof HTMLInputElement && 'select' in element;\n}\n\nfunction removeLinks(items: HTMLElement[]): HTMLElement[] {\n return items.filter((item) => item.tagName !== 'A');\n}\n\n/* ── stack ───────────────────────────────────────────────────────────── */\n\ntype FocusScopeAPI = { paused: boolean; pause: () => void; resume: () => void };\n\nconst focusScopesStack = createFocusScopesStack();\n\nfunction createFocusScopesStack() {\n let stack: FocusScopeAPI[] = [];\n return {\n add(focusScope: FocusScopeAPI) {\n const active = stack[0];\n if (focusScope !== active) active?.pause();\n stack = arrayRemove(stack, focusScope);\n stack.unshift(focusScope);\n },\n remove(focusScope: FocusScopeAPI) {\n stack = arrayRemove(stack, focusScope);\n stack[0]?.resume();\n },\n get active() {\n return stack[0];\n },\n };\n}\n\nfunction arrayRemove<T>(arr: T[], item: T): T[] {\n const newArr = [...arr];\n const idx = newArr.indexOf(item);\n if (idx !== -1) newArr.splice(idx, 1);\n return newArr;\n}\n\nexport { FocusScope };\nexport type { FocusScopeProps };\n","'use client';\n\nimport * as React from 'react';\n\nlet count = 0;\n\n/**\n * Inject visually-hidden focusable sentinel elements at the start and end of\n * the document body. When Tab attempts to leave a trapped FocusScope the\n * sentinels catch focus and FocusScope re-enters the scope.\n *\n * Counted singleton — multiple `<FocusGuards />` mounted at once still only\n * inserts one pair of guards.\n */\nfunction useFocusGuards() {\n React.useEffect(() => {\n if (typeof document === 'undefined') return;\n const edgeGuards = document.querySelectorAll('[data-structyl-focus-guard]');\n document.body.insertAdjacentElement('afterbegin', edgeGuards[0] ?? createFocusGuard());\n document.body.insertAdjacentElement('beforeend', edgeGuards[1] ?? createFocusGuard());\n count++;\n return () => {\n if (count === 1) {\n document\n .querySelectorAll('[data-structyl-focus-guard]')\n .forEach((node) => node.remove());\n }\n count--;\n };\n }, []);\n}\n\nfunction createFocusGuard(): HTMLSpanElement {\n const element = document.createElement('span');\n element.setAttribute('data-structyl-focus-guard', '');\n element.tabIndex = 0;\n element.style.cssText =\n 'outline: none; opacity: 0; position: fixed; pointer-events: none';\n return element;\n}\n\nconst FocusGuards: React.FC<{ children?: React.ReactNode }> = ({ children }) => {\n useFocusGuards();\n return <>{children}</>;\n};\nFocusGuards.displayName = 'FocusGuards';\n\nexport { FocusGuards, useFocusGuards };\n","'use client';\n\nimport * as React from 'react';\nimport { useComposedRefs, useCallbackRef, composeEventHandlers } from './_internal';\nimport { Primitive } from './primitive';\n\nconst CONTEXT_UPDATE = 'dismissableLayer.update';\nconst POINTER_DOWN_OUTSIDE = 'dismissableLayer.pointerDownOutside';\nconst FOCUS_OUTSIDE = 'dismissableLayer.focusOutside';\n\nlet originalBodyPointerEvents: string;\n\ninterface DismissableLayerContextValue {\n layers: Set<HTMLElement>;\n layersWithOutsidePointerEventsDisabled: Set<HTMLElement>;\n branches: Set<HTMLElement>;\n}\n\nconst DismissableLayerContext = React.createContext<DismissableLayerContextValue>({\n layers: new Set(),\n layersWithOutsidePointerEventsDisabled: new Set(),\n branches: new Set(),\n});\n\ntype PointerDownOutsideEvent = CustomEvent<{ originalEvent: PointerEvent }>;\ntype FocusOutsideEvent = CustomEvent<{ originalEvent: FocusEvent }>;\n\ninterface DismissableLayerProps extends React.ComponentPropsWithoutRef<typeof Primitive.div> {\n /** When true, hovering outside the layer disables pointer events on outside elements. */\n disableOutsidePointerEvents?: boolean;\n /** Called when Escape is pressed. Call `event.preventDefault()` to cancel dismissal. */\n onEscapeKeyDown?: (event: KeyboardEvent) => void;\n /** Called on pointerdown outside the layer. */\n onPointerDownOutside?: (event: PointerDownOutsideEvent) => void;\n /** Called when focus moves outside the layer. */\n onFocusOutside?: (event: FocusOutsideEvent) => void;\n /** Called on any interaction (pointer or focus) outside the layer. */\n onInteractOutside?: (event: PointerDownOutsideEvent | FocusOutsideEvent) => void;\n /** Called when the layer should dismiss. */\n onDismiss?: () => void;\n}\n\nconst DismissableLayer = React.forwardRef<HTMLDivElement, DismissableLayerProps>(\n (props, forwardedRef) => {\n const {\n disableOutsidePointerEvents = false,\n onEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside,\n onInteractOutside,\n onDismiss,\n ...layerProps\n } = props;\n\n const context = React.useContext(DismissableLayerContext);\n const [node, setNode] = React.useState<HTMLDivElement | null>(null);\n const [, forceUpdate] = React.useState({});\n const ownerDocument = node?.ownerDocument ?? (typeof document !== 'undefined' ? document : null);\n const layers = Array.from(context.layers);\n const [highestLayerWithOutsidePointerEventsDisabled] = [...context.layersWithOutsidePointerEventsDisabled].slice(-1);\n const highestLayerWithOutsidePointerEventsDisabledIndex = highestLayerWithOutsidePointerEventsDisabled\n ? layers.indexOf(highestLayerWithOutsidePointerEventsDisabled)\n : -1;\n const index = node ? layers.indexOf(node) : -1;\n const isBodyPointerEventsDisabled = context.layersWithOutsidePointerEventsDisabled.size > 0;\n const isPointerEventsEnabled = index >= highestLayerWithOutsidePointerEventsDisabledIndex;\n\n const pointerDownOutside = usePointerDownOutside((event) => {\n const target = event.target as HTMLElement;\n const isPointerDownOnBranch = [...context.branches].some((branch) =>\n branch.contains(target),\n );\n if (!isPointerEventsEnabled || isPointerDownOnBranch) return;\n onPointerDownOutside?.(event);\n onInteractOutside?.(event);\n if (!event.defaultPrevented) onDismiss?.();\n }, ownerDocument);\n\n const focusOutside = useFocusOutside((event) => {\n const target = event.target as HTMLElement;\n const isFocusOnBranch = [...context.branches].some((branch) =>\n branch.contains(target),\n );\n if (isFocusOnBranch) return;\n onFocusOutside?.(event);\n onInteractOutside?.(event);\n if (!event.defaultPrevented) onDismiss?.();\n }, ownerDocument);\n\n useEscapeKeydown((event) => {\n // Read from the live Set so newly registered layers are included\n const layers = Array.from(context.layers);\n const index = node ? layers.indexOf(node) : -1;\n const isHighest = node != null && index === layers.length - 1;\n if (!isHighest) return;\n onEscapeKeyDown?.(event);\n if (!event.defaultPrevented && onDismiss) {\n event.preventDefault();\n onDismiss();\n }\n }, ownerDocument);\n\n // Register layer and manage body pointer-events.\n // Uses useLayoutEffect so that the imperative style update happens\n // before the browser paints, preventing a flash of broken pointer-events.\n React.useLayoutEffect(() => {\n if (!node) return;\n if (disableOutsidePointerEvents) {\n if (context.layersWithOutsidePointerEventsDisabled.size === 0 && ownerDocument) {\n originalBodyPointerEvents = ownerDocument.body.style.pointerEvents;\n ownerDocument.body.style.pointerEvents = 'none';\n }\n context.layersWithOutsidePointerEventsDisabled.add(node);\n }\n context.layers.add(node);\n\n // Imperatively set pointer-events on this node now that the layer\n // sets have been updated. This avoids a render-cycle delay that\n // would otherwise leave the node with pointer-events:none inherited\n // from body.\n updatePointerEventsOnNode(node, context);\n\n dispatchUpdate();\n forceUpdate({});\n return () => {\n if (\n disableOutsidePointerEvents &&\n context.layersWithOutsidePointerEventsDisabled.size === 1 &&\n ownerDocument\n ) {\n ownerDocument.body.style.pointerEvents = originalBodyPointerEvents;\n }\n };\n }, [node, ownerDocument, disableOutsidePointerEvents, context]);\n\n React.useLayoutEffect(() => {\n return () => {\n if (!node) return;\n context.layers.delete(node);\n context.layersWithOutsidePointerEventsDisabled.delete(node);\n dispatchUpdate();\n };\n }, [node, context]);\n\n // Keep pointer-events in sync when other layers register/unregister.\n React.useEffect(() => {\n const handleUpdate = () => {\n if (node) updatePointerEventsOnNode(node, context);\n forceUpdate({});\n };\n document.addEventListener(CONTEXT_UPDATE, handleUpdate);\n return () => document.removeEventListener(CONTEXT_UPDATE, handleUpdate);\n }, [node, context]);\n\n const composedRefs = useComposedRefs(forwardedRef, setNode);\n\n return (\n <Primitive.div\n {...layerProps}\n ref={composedRefs}\n style={{\n pointerEvents: isBodyPointerEventsDisabled\n ? isPointerEventsEnabled\n ? 'auto'\n : 'none'\n : undefined,\n ...layerProps.style,\n }}\n onFocusCapture={composeEventHandlers(layerProps.onFocusCapture, focusOutside.onFocusCapture)}\n onBlurCapture={composeEventHandlers(layerProps.onBlurCapture, focusOutside.onBlurCapture)}\n onPointerDownCapture={composeEventHandlers(\n layerProps.onPointerDownCapture,\n pointerDownOutside.onPointerDownCapture,\n )}\n />\n );\n },\n);\nDismissableLayer.displayName = 'DismissableLayer';\n\n/* ── Branch (lets nested portaled content be treated as \"inside\") ───── */\n\ninterface DismissableLayerBranchProps extends React.ComponentPropsWithoutRef<typeof Primitive.div> {}\n\nconst DismissableLayerBranch = React.forwardRef<HTMLDivElement, DismissableLayerBranchProps>(\n (props, forwardedRef) => {\n const context = React.useContext(DismissableLayerContext);\n const ref = React.useRef<HTMLDivElement>(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n\n React.useEffect(() => {\n const node = ref.current;\n if (!node) return;\n context.branches.add(node);\n return () => {\n context.branches.delete(node);\n };\n }, [context]);\n\n return <Primitive.div {...props} ref={composedRefs} />;\n },\n);\nDismissableLayerBranch.displayName = 'DismissableLayerBranch';\n\n\n/* ── helpers ─────────────────────────────────────────────────────────── */\n\n/**\n * Imperatively update `pointer-events` on a DismissableLayer node.\n * This is called from layout-effects so the style is applied before\n * the browser paints, avoiding a broken-pointer-events flash.\n */\nfunction updatePointerEventsOnNode(\n node: HTMLElement,\n context: DismissableLayerContextValue,\n) {\n const layers = Array.from(context.layers);\n const [highest] = [...context.layersWithOutsidePointerEventsDisabled].slice(-1);\n const highestIndex = highest ? layers.indexOf(highest) : -1;\n const nodeIndex = layers.indexOf(node);\n const isBodyDisabled = context.layersWithOutsidePointerEventsDisabled.size > 0;\n const isEnabled = nodeIndex >= highestIndex;\n\n if (isBodyDisabled) {\n node.style.pointerEvents = isEnabled ? 'auto' : 'none';\n } else {\n node.style.removeProperty('pointer-events');\n }\n}\n\n\nfunction dispatchUpdate() {\n if (typeof document === 'undefined') return;\n const event = new CustomEvent(CONTEXT_UPDATE);\n document.dispatchEvent(event);\n}\n\nfunction usePointerDownOutside(\n onPointerDownOutside?: (event: PointerDownOutsideEvent) => void,\n ownerDocument: Document | null = typeof document !== 'undefined' ? document : null,\n) {\n const handler = useCallbackRef(onPointerDownOutside);\n const isPointerInsideReactTreeRef = React.useRef(false);\n const handleClickRef = React.useRef(() => {});\n\n React.useEffect(() => {\n if (!ownerDocument) return;\n const handlePointerDown = (event: PointerEvent) => {\n if (event.target && !isPointerInsideReactTreeRef.current) {\n const eventDetail = { originalEvent: event };\n const handleAndDispatchPointerDownOutsideEvent = () => {\n const customEvent = new CustomEvent(POINTER_DOWN_OUTSIDE, {\n bubbles: false,\n cancelable: true,\n detail: eventDetail,\n }) as PointerDownOutsideEvent;\n const targetEl = event.target as HTMLElement;\n targetEl.addEventListener(POINTER_DOWN_OUTSIDE, handler as EventListener, { once: true });\n targetEl.dispatchEvent(customEvent);\n };\n\n if (event.pointerType === 'touch') {\n ownerDocument.removeEventListener('click', handleClickRef.current);\n handleClickRef.current = handleAndDispatchPointerDownOutsideEvent;\n ownerDocument.addEventListener('click', handleClickRef.current, { once: true });\n } else {\n handleAndDispatchPointerDownOutsideEvent();\n }\n } else {\n ownerDocument.removeEventListener('click', handleClickRef.current);\n }\n isPointerInsideReactTreeRef.current = false;\n };\n const timerId = window.setTimeout(() => {\n ownerDocument.addEventListener('pointerdown', handlePointerDown);\n }, 0);\n return () => {\n window.clearTimeout(timerId);\n ownerDocument.removeEventListener('pointerdown', handlePointerDown);\n ownerDocument.removeEventListener('click', handleClickRef.current);\n };\n }, [ownerDocument, handler]);\n\n return {\n onPointerDownCapture: () => {\n isPointerInsideReactTreeRef.current = true;\n },\n };\n}\n\nfunction useFocusOutside(\n onFocusOutside?: (event: FocusOutsideEvent) => void,\n ownerDocument: Document | null = typeof document !== 'undefined' ? document : null,\n) {\n const handler = useCallbackRef(onFocusOutside);\n const isFocusInsideReactTreeRef = React.useRef(false);\n\n React.useEffect(() => {\n if (!ownerDocument) return;\n const handleFocus = (event: FocusEvent) => {\n if (event.target && !isFocusInsideReactTreeRef.current) {\n const eventDetail = { originalEvent: event };\n const customEvent = new CustomEvent(FOCUS_OUTSIDE, {\n bubbles: false,\n cancelable: true,\n detail: eventDetail,\n }) as FocusOutsideEvent;\n const targetEl = event.target as HTMLElement;\n targetEl.addEventListener(FOCUS_OUTSIDE, handler as EventListener, { once: true });\n targetEl.dispatchEvent(customEvent);\n }\n };\n ownerDocument.addEventListener('focusin', handleFocus);\n return () => ownerDocument.removeEventListener('focusin', handleFocus);\n }, [ownerDocument, handler]);\n\n return {\n onFocusCapture: () => {\n isFocusInsideReactTreeRef.current = true;\n },\n onBlurCapture: () => {\n isFocusInsideReactTreeRef.current = false;\n },\n };\n}\n\nfunction useEscapeKeydown(\n onEscapeKeyDown?: (event: KeyboardEvent) => void,\n ownerDocument: Document | null = typeof document !== 'undefined' ? document : null,\n) {\n const handler = useCallbackRef(onEscapeKeyDown);\n React.useEffect(() => {\n if (!ownerDocument) return;\n const handleKeyDown = (event: KeyboardEvent) => {\n if (event.key === 'Escape') handler(event);\n };\n ownerDocument.addEventListener('keydown', handleKeyDown, { capture: true });\n return () => ownerDocument.removeEventListener('keydown', handleKeyDown, { capture: true });\n }, [handler, ownerDocument]);\n}\n\nexport { DismissableLayer, DismissableLayerBranch };\nexport type {\n DismissableLayerProps,\n DismissableLayerBranchProps,\n PointerDownOutsideEvent,\n FocusOutsideEvent,\n};\n","'use client';\n\nimport * as React from 'react';\nimport { useComposedRefs } from './_internal';\nimport { Slot } from './slot';\n\ntype CollectionElement = HTMLElement;\ntype ItemData<I> = { ref: React.RefObject<CollectionElement | null> } & I;\n\ninterface CollectionContextValue<I> {\n collectionRef: React.RefObject<CollectionElement | null>;\n itemMap: Map<React.RefObject<CollectionElement | null>, ItemData<I>>;\n}\n\n/**\n * Create an ordered collection for tracking child items in DOM order.\n * Used by RovingFocusGroup, Menu, Select, etc. to expose\n * `getItems()` returning items sorted as they appear in the DOM.\n */\nfunction createCollection<I extends Record<string, unknown> = Record<string, unknown>>(name: string) {\n const CollectionContext = React.createContext<CollectionContextValue<I>>({\n collectionRef: { current: null },\n itemMap: new Map(),\n });\n\n const CollectionProvider: React.FC<{ children?: React.ReactNode }> = ({ children }) => {\n const collectionRef = React.useRef<CollectionElement | null>(null);\n const itemMap = React.useRef(new Map<React.RefObject<CollectionElement | null>, ItemData<I>>()).current;\n const value = React.useMemo(() => ({ collectionRef, itemMap }), [itemMap]);\n return <CollectionContext.Provider value={value}>{children}</CollectionContext.Provider>;\n };\n CollectionProvider.displayName = `${name}CollectionProvider`;\n\n const CollectionSlot = React.forwardRef<CollectionElement, { children: React.ReactNode }>(\n ({ children }, forwardedRef) => {\n const context = React.useContext(CollectionContext);\n const composedRefs = useComposedRefs(forwardedRef, context.collectionRef);\n return <Slot ref={composedRefs}>{children}</Slot>;\n },\n );\n CollectionSlot.displayName = `${name}CollectionSlot`;\n\n const ITEM_DATA_ATTR = `data-${name.toLowerCase()}-collection-item`;\n\n type ItemSlotProps = { children: React.ReactNode } & I;\n\n const CollectionItemSlot = React.forwardRef<CollectionElement, ItemSlotProps>(\n (props, forwardedRef) => {\n const { children, ...itemData } = props as { children: React.ReactNode } & Record<string, unknown>;\n const ref = React.useRef<CollectionElement | null>(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n const context = React.useContext(CollectionContext);\n\n React.useEffect(() => {\n context.itemMap.set(ref, { ref, ...(itemData as unknown as I) });\n return () => {\n context.itemMap.delete(ref);\n };\n });\n\n return (\n <Slot {...{ [ITEM_DATA_ATTR]: '' }} ref={composedRefs}>\n {children}\n </Slot>\n );\n },\n );\n CollectionItemSlot.displayName = `${name}CollectionItemSlot`;\n\n function useCollection(): () => Array<ItemData<I>> {\n const context = React.useContext(CollectionContext);\n\n return React.useCallback(() => {\n const collectionNode = context.collectionRef.current;\n if (!collectionNode) return [];\n const orderedNodes = Array.from(\n collectionNode.querySelectorAll(`[${ITEM_DATA_ATTR}]`),\n );\n const items = Array.from(context.itemMap.values());\n items.sort(\n (a, b) =>\n orderedNodes.indexOf(a.ref.current as Element) -\n orderedNodes.indexOf(b.ref.current as Element),\n );\n return items;\n }, [context.collectionRef, context.itemMap]);\n }\n\n return [\n { Provider: CollectionProvider, Slot: CollectionSlot, ItemSlot: CollectionItemSlot },\n useCollection,\n ] as const;\n}\n\nexport { createCollection };\n","'use client';\n\nimport * as React from 'react';\nimport {\n useControllableState,\n useId,\n useComposedRefs,\n useCallbackRef,\n composeEventHandlers,\n} from './_internal';\nimport { createContext } from './create-context';\nimport { createCollection } from './collection';\nimport { useDirection, type Direction } from './direction';\nimport { Primitive } from './primitive';\n\ntype Orientation = 'horizontal' | 'vertical';\n\nconst ENTRY_FOCUS = 'rovingFocusGroup.onEntryFocus';\nconst EVENT_OPTIONS = { bubbles: false, cancelable: true } as const;\n\n/* ── collection ──────────────────────────────────────────────────────── */\n\ntype ItemData = { id: string; focusable: boolean; active: boolean };\nconst [Collection, useCollection] = createCollection<ItemData>('RovingFocus');\n\n/* ── context ─────────────────────────────────────────────────────────── */\n\ninterface RovingContextValue {\n orientation?: Orientation;\n dir: Direction;\n loop: boolean;\n currentTabStopId: string | null;\n onItemFocus: (tabStopId: string) => void;\n onItemShiftTab: () => void;\n onFocusableItemAdd: () => void;\n onFocusableItemRemove: () => void;\n}\n\nconst [RovingFocusProvider, useRovingFocusContext] =\n createContext<RovingContextValue>('RovingFocusGroup');\n\n/* ── Group ───────────────────────────────────────────────────────────── */\n\ninterface RovingFocusGroupProps extends React.ComponentPropsWithoutRef<typeof Primitive.div> {\n orientation?: Orientation;\n dir?: Direction;\n loop?: boolean;\n currentTabStopId?: string | null;\n defaultCurrentTabStopId?: string;\n onCurrentTabStopIdChange?: (tabStopId: string | null) => void;\n onEntryFocus?: (event: Event) => void;\n preventScrollOnEntryFocus?: boolean;\n}\n\nconst RovingFocusGroup = React.forwardRef<HTMLDivElement, RovingFocusGroupProps>(\n (props, forwardedRef) => {\n const {\n orientation,\n dir: dirProp,\n loop = false,\n currentTabStopId: currentTabStopIdProp,\n defaultCurrentTabStopId,\n onCurrentTabStopIdChange,\n onEntryFocus,\n preventScrollOnEntryFocus = false,\n ...groupProps\n } = props;\n\n const ref = React.useRef<HTMLDivElement>(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n const dir = useDirection(dirProp);\n const [currentTabStopId = null, setCurrentTabStopId] = useControllableState({\n prop: currentTabStopIdProp,\n defaultProp: defaultCurrentTabStopId,\n onChange: onCurrentTabStopIdChange,\n });\n const [isTabbingBackOut, setIsTabbingBackOut] = React.useState(false);\n const handleEntryFocus = useCallbackRef(onEntryFocus);\n const getItems = useCollection();\n const isClickFocusRef = React.useRef(false);\n const [focusableItemsCount, setFocusableItemsCount] = React.useState(0);\n\n React.useEffect(() => {\n const node = ref.current;\n if (!node) return;\n const handler = (e: Event) => handleEntryFocus(e);\n node.addEventListener(ENTRY_FOCUS, handler);\n return () => node.removeEventListener(ENTRY_FOCUS, handler);\n }, [handleEntryFocus]);\n\n return (\n <Collection.Provider>\n <Collection.Slot>\n <RovingFocusProvider\n orientation={orientation}\n dir={dir}\n loop={loop}\n currentTabStopId={currentTabStopId}\n onItemFocus={React.useCallback(\n (id) => setCurrentTabStopId(id),\n [setCurrentTabStopId],\n )}\n onItemShiftTab={React.useCallback(() => setIsTabbingBackOut(true), [])}\n onFocusableItemAdd={React.useCallback(\n () => setFocusableItemsCount((c) => c + 1),\n [],\n )}\n onFocusableItemRemove={React.useCallback(\n () => setFocusableItemsCount((c) => c - 1),\n [],\n )}\n >\n <Primitive.div\n tabIndex={isTabbingBackOut || focusableItemsCount === 0 ? -1 : 0}\n data-orientation={orientation}\n {...groupProps}\n ref={composedRefs}\n style={{ outline: 'none', ...groupProps.style }}\n onMouseDown={composeEventHandlers(groupProps.onMouseDown, () => {\n isClickFocusRef.current = true;\n })}\n onFocus={composeEventHandlers(groupProps.onFocus, (event) => {\n const isKeyboardFocus = !isClickFocusRef.current;\n if (event.target === event.currentTarget && isKeyboardFocus && !isTabbingBackOut) {\n const entryEvent = new CustomEvent(ENTRY_FOCUS, EVENT_OPTIONS);\n event.currentTarget.dispatchEvent(entryEvent);\n if (!entryEvent.defaultPrevented) {\n const items = getItems().filter((item) => item.focusable);\n const activeItem = items.find((item) => item.active);\n const currentItem = items.find((item) => item.id === currentTabStopId);\n const candidateItems = [activeItem, currentItem, ...items].filter(\n Boolean,\n ) as typeof items;\n focusFirst(\n candidateItems.map((i) => i.ref.current!).filter(Boolean),\n preventScrollOnEntryFocus,\n );\n }\n }\n isClickFocusRef.current = false;\n })}\n onBlur={composeEventHandlers(groupProps.onBlur, () => setIsTabbingBackOut(false))}\n />\n </RovingFocusProvider>\n </Collection.Slot>\n </Collection.Provider>\n );\n },\n);\nRovingFocusGroup.displayName = 'RovingFocusGroup';\n\n/* ── Item ────────────────────────────────────────────────────────────── */\n\ninterface RovingFocusItemProps extends React.ComponentPropsWithoutRef<typeof Primitive.span> {\n tabStopId?: string;\n focusable?: boolean;\n active?: boolean;\n}\n\nconst RovingFocusItem = React.forwardRef<HTMLSpanElement, RovingFocusItemProps>(\n (props, forwardedRef) => {\n const { focusable = true, active = false, tabStopId, ...itemProps } = props;\n const autoId = useId();\n const id = tabStopId ?? autoId;\n const context = useRovingFocusContext('RovingFocusItem');\n const isCurrentTabStop = context.currentTabStopId === id;\n const getItems = useCollection();\n\n const { onFocusableItemAdd, onFocusableItemRemove } = context;\n React.useEffect(() => {\n if (!focusable) return undefined;\n onFocusableItemAdd();\n return () => onFocusableItemRemove();\n }, [focusable, onFocusableItemAdd, onFocusableItemRemove]);\n\n return (\n <Collection.ItemSlot id={id} focusable={focusable} active={active}>\n <Primitive.span\n tabIndex={isCurrentTabStop ? 0 : -1}\n data-orientation={context.orientation}\n {...itemProps}\n ref={forwardedRef}\n onMouseDown={composeEventHandlers(itemProps.onMouseDown, (event) => {\n if (!focusable) event.preventDefault();\n else context.onItemFocus(id);\n })}\n onFocus={composeEventHandlers(itemProps.onFocus, () => context.onItemFocus(id))}\n onKeyDown={composeEventHandlers(itemProps.onKeyDown, (event) => {\n if (event.key === 'Tab' && event.shiftKey) {\n context.onItemShiftTab();\n return;\n }\n if (event.target !== event.currentTarget) return;\n const focusIntent = getFocusIntent(event, context.orientation, context.dir);\n if (focusIntent !== undefined) {\n if (event.metaKey || event.ctrlKey || event.altKey || event.shiftKey) return;\n event.preventDefault();\n let candidateNodes = getItems()\n .filter((item) => item.focusable)\n .map((item) => item.ref.current!)\n .filter(Boolean);\n if (focusIntent === 'last') candidateNodes.reverse();\n else if (focusIntent === 'prev' || focusIntent === 'next') {\n if (focusIntent === 'prev') candidateNodes.reverse();\n const currentIndex = candidateNodes.indexOf(event.currentTarget as HTMLElement);\n candidateNodes = context.loop\n ? wrapArray(candidateNodes, currentIndex + 1)\n : candidateNodes.slice(currentIndex + 1);\n }\n setTimeout(() => focusFirst(candidateNodes));\n }\n })}\n />\n </Collection.ItemSlot>\n );\n },\n);\nRovingFocusItem.displayName = 'RovingFocusItem';\n\n/* ── helpers ─────────────────────────────────────────────────────────── */\n\ntype FocusIntent = 'first' | 'last' | 'prev' | 'next';\n\nconst MAP_KEY_TO_FOCUS_INTENT: Record<string, FocusIntent> = {\n ArrowLeft: 'prev',\n ArrowUp: 'prev',\n ArrowRight: 'next',\n ArrowDown: 'next',\n PageUp: 'first',\n Home: 'first',\n PageDown: 'last',\n End: 'last',\n};\n\nfunction getDirectionAwareKey(key: string, dir?: Direction): string {\n if (dir !== 'rtl') return key;\n if (key === 'ArrowLeft') return 'ArrowRight';\n if (key === 'ArrowRight') return 'ArrowLeft';\n return key;\n}\n\nfunction getFocusIntent(\n event: React.KeyboardEvent,\n orientation?: Orientation,\n dir?: Direction,\n): FocusIntent | undefined {\n const key = getDirectionAwareKey(event.key, dir);\n if (orientation === 'vertical' && ['ArrowLeft', 'ArrowRight'].includes(key)) return undefined;\n if (orientation === 'horizontal' && ['ArrowUp', 'ArrowDown'].includes(key)) return undefined;\n return MAP_KEY_TO_FOCUS_INTENT[key];\n}\n\nfunction focusFirst(candidates: HTMLElement[], preventScroll = false) {\n const PREVIOUSLY_FOCUSED_ELEMENT = document.activeElement;\n for (const candidate of candidates) {\n if (candidate === PREVIOUSLY_FOCUSED_ELEMENT) return;\n candidate.focus({ preventScroll });\n if (document.activeElement !== PREVIOUSLY_FOCUSED_ELEMENT) return;\n }\n}\n\nfunction wrapArray<T>(arr: T[], startIdx: number): T[] {\n return arr.map((_, index) => arr[(startIdx + index) % arr.length] as T);\n}\n\nexport { RovingFocusGroup, RovingFocusItem };\nexport type { RovingFocusGroupProps, RovingFocusItemProps, Orientation };\n","'use client';\n\nimport * as React from 'react';\nimport { Primitive } from './primitive';\n\ninterface ArrowProps extends React.ComponentPropsWithoutRef<typeof Primitive.svg> {\n width?: number;\n height?: number;\n}\n\n/**\n * SVG arrow used by `Popper` (and any tooltip/popover that needs a pointer).\n * Composed via `Popper.Arrow` which positions and rotates this element.\n */\nconst Arrow = React.forwardRef<SVGSVGElement, ArrowProps>((props, forwardedRef) => {\n const { width = 10, height = 5, ...arrowProps } = props;\n return (\n <Primitive.svg\n {...arrowProps}\n ref={forwardedRef as React.Ref<SVGSVGElement>}\n width={width}\n height={height}\n viewBox=\"0 0 30 10\"\n preserveAspectRatio=\"none\"\n >\n <polygon points=\"0,0 30,0 15,10\" fill=\"currentColor\" />\n </Primitive.svg>\n );\n});\nArrow.displayName = 'Arrow';\n\nexport { Arrow };\nexport type { ArrowProps };\n","'use client';\n\nimport * as React from 'react';\nimport { VisuallyHidden } from './visually-hidden';\n\ninterface AccessibleIconProps {\n /** Visually-hidden label announced to assistive tech. */\n label: string;\n /** The icon element (must be a single React element). */\n children: React.ReactElement;\n}\n\n/**\n * Wraps an icon element with `aria-hidden` and an adjacent visually-hidden label,\n * so the icon is decorative to sighted users but still announced to screen readers.\n */\nconst AccessibleIcon: React.FC<AccessibleIconProps> = ({ label, children }) => {\n const child = React.Children.only(children);\n return (\n <>\n {React.cloneElement(child, {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ...(child.props as any),\n 'aria-hidden': 'true',\n focusable: 'false',\n } as React.HTMLAttributes<HTMLElement>)}\n <VisuallyHidden>{label}</VisuallyHidden>\n </>\n );\n};\nAccessibleIcon.displayName = 'AccessibleIcon';\n\nexport { AccessibleIcon };\nexport type { AccessibleIconProps };\n","'use client';\n\nimport * as React from 'react';\n\nlet lockCount = 0;\nlet originalOverflow = '';\nlet originalPaddingRight = '';\n\nfunction getScrollbarWidth(): number {\n if (typeof window === 'undefined' || typeof document === 'undefined') return 0;\n return window.innerWidth - document.documentElement.clientWidth;\n}\n\n/**\n * Lock body scroll while mounted. Compensates for scrollbar disappearance\n * to avoid layout shift. Reference-counted so nested usages work.\n */\nfunction useScrollLock(enabled: boolean = true) {\n React.useEffect(() => {\n if (!enabled || typeof document === 'undefined') return;\n if (lockCount === 0) {\n const body = document.body;\n const scrollbarWidth = getScrollbarWidth();\n originalOverflow = body.style.overflow;\n originalPaddingRight = body.style.paddingRight;\n const existingPadding = parseInt(window.getComputedStyle(body).paddingRight, 10) || 0;\n body.style.overflow = 'hidden';\n if (scrollbarWidth > 0) {\n body.style.paddingRight = `${existingPadding + scrollbarWidth}px`;\n }\n }\n lockCount++;\n return () => {\n lockCount--;\n if (lockCount === 0) {\n document.body.style.overflow = originalOverflow;\n document.body.style.paddingRight = originalPaddingRight;\n }\n };\n }, [enabled]);\n}\n\nconst ScrollLock: React.FC<{ children?: React.ReactNode; enabled?: boolean }> = ({\n children,\n enabled = true,\n}) => {\n useScrollLock(enabled);\n return <>{children}</>;\n};\nScrollLock.displayName = 'ScrollLock';\n\nexport { ScrollLock, useScrollLock };\n","'use client';\n\nimport * as React from 'react';\nimport {\n useFloating,\n autoUpdate,\n offset as offsetMiddleware,\n flip as flipMiddleware,\n shift as shiftMiddleware,\n arrow as arrowMiddleware,\n size as sizeMiddleware,\n hide as hideMiddleware,\n limitShift,\n type Placement,\n type Strategy,\n type Middleware,\n} from '@floating-ui/react';\nimport { useComposedRefs, useCallbackRef } from './_internal';\nimport { createContext } from './create-context';\nimport { useDirection } from './direction';\nimport { Primitive } from './primitive';\nimport { Arrow as ArrowPrimitive, type ArrowProps } from './arrow';\n\ntype Side = 'top' | 'right' | 'bottom' | 'left';\ntype Align = 'start' | 'center' | 'end';\ntype Sticky = 'partial' | 'always';\n\n/* ── Root context ────────────────────────────────────────────────────── */\n\ninterface PopperContextValue {\n anchor: HTMLElement | null;\n onAnchorChange: (anchor: HTMLElement | null) => void;\n}\n\nconst [PopperProvider, usePopperContext] = createContext<PopperContextValue>('Popper');\n\nconst Popper: React.FC<{ children?: React.ReactNode }> = ({ children }) => {\n const [anchor, setAnchor] = React.useState<HTMLElement | null>(null);\n return (\n <PopperProvider anchor={anchor} onAnchorChange={setAnchor}>\n {children}\n </PopperProvider>\n );\n};\nPopper.displayName = 'Popper';\n\n/* ── Anchor ──────────────────────────────────────────────────────────── */\n\ninterface PopperAnchorProps extends React.ComponentPropsWithoutRef<typeof Primitive.div> {\n virtualRef?: React.RefObject<{ getBoundingClientRect: () => DOMRect }>;\n}\n\nconst PopperAnchor = React.forwardRef<HTMLDivElement, PopperAnchorProps>((props, forwardedRef) => {\n const { virtualRef, ...anchorProps } = props;\n const ctx = usePopperContext('PopperAnchor');\n const ref = React.useRef<HTMLDivElement>(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n\n React.useEffect(() => {\n ctx.onAnchorChange((virtualRef?.current as unknown as HTMLElement) ?? ref.current);\n });\n\n return virtualRef ? null : <Primitive.div {...anchorProps} ref={composedRefs} />;\n});\nPopperAnchor.displayName = 'PopperAnchor';\n\n/* ── Content ─────────────────────────────────────────────────────────── */\n\ninterface PopperContentContextValue {\n placedSide: Side;\n placedAlign: Align;\n arrowX?: number;\n arrowY?: number;\n shouldHideArrow: boolean;\n onArrowChange: (arrow: HTMLSpanElement | null) => void;\n}\n\nconst [PopperContentProvider, useContentContext] =\n createContext<PopperContentContextValue>('PopperContent');\n\ninterface PopperContentProps extends React.ComponentPropsWithoutRef<typeof Primitive.div> {\n side?: Side;\n sideOffset?: number;\n align?: Align;\n alignOffset?: number;\n arrowPadding?: number;\n avoidCollisions?: boolean;\n collisionBoundary?: Element | Element[] | null;\n collisionPadding?: number | Partial<Record<Side, number>>;\n sticky?: Sticky;\n hideWhenDetached?: boolean;\n updatePositionStrategy?: 'always' | 'optimized';\n onPlaced?: () => void;\n strategy?: Strategy;\n}\n\nconst PopperContent = React.forwardRef<HTMLDivElement, PopperContentProps>(\n (props, forwardedRef) => {\n const {\n side = 'bottom',\n sideOffset = 0,\n align = 'center',\n alignOffset = 0,\n arrowPadding = 0,\n avoidCollisions = true,\n collisionBoundary = [],\n collisionPadding: collisionPaddingProp = 0,\n sticky = 'partial',\n hideWhenDetached = false,\n updatePositionStrategy = 'optimized',\n onPlaced,\n strategy = 'fixed',\n ...contentProps\n } = props;\n\n const ctx = usePopperContext('PopperContent');\n const [content, setContent] = React.useState<HTMLDivElement | null>(null);\n const composedRefs = useComposedRefs(forwardedRef, setContent);\n const [arrow, setArrow] = React.useState<HTMLSpanElement | null>(null);\n const arrowSize = useSize(arrow);\n const arrowWidth = arrowSize?.width ?? 0;\n const arrowHeight = arrowSize?.height ?? 0;\n\n const dir = useDirection();\n const desiredPlacement = (side + (align !== 'center' ? '-' + align : '')) as Placement;\n\n const collisionPadding =\n typeof collisionPaddingProp === 'number'\n ? collisionPaddingProp\n : { top: 0, right: 0, bottom: 0, left: 0, ...collisionPaddingProp };\n\n const boundary = Array.isArray(collisionBoundary)\n ? collisionBoundary\n : [collisionBoundary].filter(Boolean);\n\n const detectOverflowOptions = {\n padding: collisionPadding,\n boundary: boundary.filter(isHTMLElement) as Element[],\n altBoundary: boundary.length > 0,\n } as const;\n\n const middleware: Middleware[] = [\n offsetMiddleware({ mainAxis: sideOffset + arrowHeight, alignmentAxis: alignOffset }),\n avoidCollisions &&\n shiftMiddleware({\n mainAxis: true,\n crossAxis: true,\n limiter: sticky === 'partial' ? limitShift() : undefined,\n ...detectOverflowOptions,\n }),\n avoidCollisions && flipMiddleware({ ...detectOverflowOptions }),\n sizeMiddleware({\n ...detectOverflowOptions,\n apply: ({ elements, rects, availableWidth, availableHeight }) => {\n const { width: anchorWidth, height: anchorHeight } = rects.reference;\n const contentStyle = elements.floating.style;\n contentStyle.setProperty('--structyl-popper-available-width', `${availableWidth}px`);\n contentStyle.setProperty('--structyl-popper-available-height', `${availableHeight}px`);\n contentStyle.setProperty('--structyl-popper-anchor-width', `${anchorWidth}px`);\n contentStyle.setProperty('--structyl-popper-anchor-height', `${anchorHeight}px`);\n },\n }),\n arrow && arrowMiddleware({ element: arrow, padding: arrowPadding }),\n transformOrigin({ arrowWidth, arrowHeight }),\n hideWhenDetached && hideMiddleware({ strategy: 'referenceHidden' }),\n ].filter(Boolean) as Middleware[];\n\n const { refs, floatingStyles, placement, isPositioned, middlewareData } = useFloating({\n strategy,\n placement: desiredPlacement,\n whileElementsMounted: (...args) =>\n autoUpdate(...args, {\n animationFrame: updatePositionStrategy === 'always',\n }),\n middleware,\n });\n\n React.useLayoutEffect(() => {\n refs.setPositionReference(ctx.anchor);\n }, [ctx.anchor, refs]);\n\n const [placedSide, placedAlign] = getSideAndAlignFromPlacement(placement);\n\n const handlePlaced = useCallbackRef(onPlaced);\n React.useLayoutEffect(() => {\n if (isPositioned) handlePlaced();\n }, [isPositioned, handlePlaced]);\n\n const arrowX = middlewareData.arrow?.x;\n const arrowY = middlewareData.arrow?.y;\n const cannotCenterArrow = middlewareData.arrow?.centerOffset !== 0;\n const contentStyleZIndex = contentProps.style?.zIndex;\n const [contentZIndex, setContentZIndex] = React.useState<React.CSSProperties['zIndex']>(\n contentStyleZIndex ?? 50,\n );\n React.useLayoutEffect(() => {\n if (!content) {\n setContentZIndex(contentStyleZIndex ?? 50);\n return;\n }\n const computedZIndex = window.getComputedStyle(content).zIndex;\n setContentZIndex(computedZIndex === 'auto' ? (contentStyleZIndex ?? 50) : computedZIndex);\n }, [content, contentProps.className, contentStyleZIndex]);\n\n return (\n <div\n ref={refs.setFloating}\n data-structyl-popper-content-wrapper=\"\"\n style={{\n ...floatingStyles,\n transform: isPositioned ? floatingStyles.transform : 'translate(0, -200%)',\n minWidth: 'max-content',\n zIndex: contentZIndex,\n ['--structyl-popper-transform-origin' as string]:\n [middlewareData.transformOrigin?.x, middlewareData.transformOrigin?.y].join(' ') ||\n undefined,\n ...(middlewareData.hide?.referenceHidden && {\n visibility: 'hidden',\n pointerEvents: 'none',\n }),\n }}\n dir={dir}\n >\n <PopperContentProvider\n placedSide={placedSide}\n placedAlign={placedAlign}\n arrowX={arrowX}\n arrowY={arrowY}\n shouldHideArrow={cannotCenterArrow}\n onArrowChange={setArrow}\n >\n <Primitive.div\n data-side={placedSide}\n data-align={placedAlign}\n {...contentProps}\n ref={composedRefs}\n style={{ ...contentProps.style, animation: !isPositioned ? 'none' : undefined }}\n />\n </PopperContentProvider>\n </div>\n );\n },\n);\nPopperContent.displayName = 'PopperContent';\n\n/* ── Popper.Arrow ────────────────────────────────────────────────────── */\n\nconst OPPOSITE_SIDE: Record<Side, Side> = {\n top: 'bottom',\n right: 'left',\n bottom: 'top',\n left: 'right',\n};\n\nconst PopperArrow = React.forwardRef<SVGSVGElement, ArrowProps>((props, forwardedRef) => {\n const { ...arrowProps } = props;\n const contentContext = useContentContext('PopperArrow');\n const baseSide = OPPOSITE_SIDE[contentContext.placedSide];\n return (\n <span\n ref={contentContext.onArrowChange}\n style={{\n position: 'absolute',\n left: contentContext.arrowX,\n top: contentContext.arrowY,\n [baseSide]: 0,\n transformOrigin: {\n top: '',\n right: '0 0',\n bottom: 'center 0',\n left: '100% 0',\n }[contentContext.placedSide],\n transform: {\n top: 'translateY(100%)',\n right: 'translateY(50%) rotate(90deg) translateX(-50%)',\n bottom: 'rotate(180deg)',\n left: 'translateY(50%) rotate(-90deg) translateX(50%)',\n }[contentContext.placedSide],\n visibility: contentContext.shouldHideArrow ? 'hidden' : undefined,\n }}\n >\n <ArrowPrimitive\n {...arrowProps}\n ref={forwardedRef}\n style={{ ...arrowProps.style, display: 'block' }}\n />\n </span>\n );\n});\nPopperArrow.displayName = 'PopperArrow';\n\n/* ── helpers ─────────────────────────────────────────────────────────── */\n\nfunction isHTMLElement(value: unknown): value is HTMLElement {\n return value instanceof Element;\n}\n\nfunction getSideAndAlignFromPlacement(placement: Placement): [Side, Align] {\n const [side, align = 'center'] = placement.split('-');\n return [side as Side, align as Align];\n}\n\nfunction transformOrigin(options: { arrowWidth: number; arrowHeight: number }): Middleware {\n return {\n name: 'transformOrigin',\n options,\n fn(data) {\n const { placement, rects, middlewareData } = data;\n const cannotCenterArrow = middlewareData.arrow?.centerOffset !== 0;\n const isArrowHidden = cannotCenterArrow;\n const arrowWidth = isArrowHidden ? 0 : options.arrowWidth;\n const arrowHeight = isArrowHidden ? 0 : options.arrowHeight;\n const [placedSide, placedAlign] = getSideAndAlignFromPlacement(placement);\n const noArrowAlign = { start: '0%', center: '50%', end: '100%' }[placedAlign];\n const arrowXCenter = (middlewareData.arrow?.x ?? 0) + arrowWidth / 2;\n const arrowYCenter = (middlewareData.arrow?.y ?? 0) + arrowHeight / 2;\n let x = '';\n let y = '';\n if (placedSide === 'bottom') {\n x = isArrowHidden ? noArrowAlign : `${arrowXCenter}px`;\n y = `${-arrowHeight}px`;\n } else if (placedSide === 'top') {\n x = isArrowHidden ? noArrowAlign : `${arrowXCenter}px`;\n y = `${rects.floating.height + arrowHeight}px`;\n } else if (placedSide === 'right') {\n x = `${-arrowHeight}px`;\n y = isArrowHidden ? noArrowAlign : `${arrowYCenter}px`;\n } else if (placedSide === 'left') {\n x = `${rects.floating.width + arrowHeight}px`;\n y = isArrowHidden ? noArrowAlign : `${arrowYCenter}px`;\n }\n return { data: { x, y } };\n },\n };\n}\n\nfunction useSize(element: HTMLElement | null) {\n const [size, setSize] = React.useState<{ width: number; height: number } | undefined>(undefined);\n React.useLayoutEffect(() => {\n if (!element) {\n setSize(undefined);\n return;\n }\n setSize({ width: element.offsetWidth, height: element.offsetHeight });\n const observer = new ResizeObserver((entries) => {\n const entry = entries[0];\n if (!entry) return;\n const borderBox = entry.borderBoxSize?.[0];\n const w = borderBox ? borderBox.inlineSize : entry.contentRect.width;\n const h = borderBox ? borderBox.blockSize : entry.contentRect.height;\n setSize({ width: w, height: h });\n });\n observer.observe(element, { box: 'border-box' });\n return () => observer.disconnect();\n }, [element]);\n return size;\n}\n\nexport { Popper as Root, PopperAnchor as Anchor, PopperContent as Content, PopperArrow as Arrow };\nexport type { PopperContentProps, PopperAnchorProps, Side, Align };\n"]}
@@ -0,0 +1,282 @@
1
+ import * as React from 'react';
2
+ import { Strategy } from '@floating-ui/react';
3
+
4
+ declare const NODES: readonly ["a", "button", "div", "form", "h2", "h3", "img", "input", "label", "li", "nav", "ol", "p", "span", "svg", "ul"];
5
+ type PrimitivePropsWithRef<E extends React.ElementType> = React.ComponentPropsWithRef<E> & {
6
+ asChild?: boolean;
7
+ };
8
+ type Primitives = {
9
+ [E in (typeof NODES)[number]]: PrimitiveForwardRefComponent<E>;
10
+ };
11
+ type PrimitiveForwardRefComponent<E extends React.ElementType> = React.ForwardRefExoticComponent<PrimitivePropsWithRef<E>>;
12
+ declare const Primitive: Primitives;
13
+
14
+ interface SlotProps extends React.HTMLAttributes<HTMLElement> {
15
+ children?: React.ReactNode;
16
+ }
17
+ /**
18
+ * Renders a copy of its child element with merged props.
19
+ * Powers the `asChild` pattern across the library.
20
+ */
21
+ declare const Slot: React.ForwardRefExoticComponent<SlotProps & React.RefAttributes<HTMLElement>>;
22
+ declare const Slottable: ({ children }: {
23
+ children: React.ReactNode;
24
+ }) => React.JSX.Element;
25
+
26
+ type Scope<C = unknown> = {
27
+ [scopeName: string]: React.Context<C>[];
28
+ } | undefined;
29
+ type ScopeHook = (scope: Scope) => {
30
+ [__scopeProp: string]: Scope;
31
+ };
32
+ interface CreateScope {
33
+ scopeName: string;
34
+ (): ScopeHook;
35
+ }
36
+ /**
37
+ * Create a typed context with a sensible error when used outside its Provider.
38
+ *
39
+ * @example
40
+ * const [DialogProvider, useDialogContext] = createContext<DialogContextValue>('Dialog');
41
+ */
42
+ declare function createContext<ContextValueType extends object | null>(rootComponentName: string, defaultContext?: ContextValueType): readonly [
43
+ React.FC<ContextValueType & {
44
+ children: React.ReactNode;
45
+ }>,
46
+ (consumerName: string) => ContextValueType
47
+ ];
48
+ /**
49
+ * Create a scoped context factory. Solves context leakage when the same
50
+ * component family is nested inside itself (e.g. nested Dialogs, nested Menus)
51
+ * or when two families share an internal primitive (e.g. both use PopperContext).
52
+ *
53
+ * Returns `[createContext, createScope]`:
54
+ * - `createContext` behaves like the simple version above but scoped.
55
+ * - `createScope` is a CreateScope factory consumed by other component families
56
+ * that depend on this one.
57
+ *
58
+ * @example
59
+ * const [createDialogContext, createDialogScope] = createContextScope('Dialog');
60
+ * const [DialogProvider, useDialogContext] = createDialogContext<DialogContextValue>('Dialog');
61
+ *
62
+ * // In Dialog.Root:
63
+ * function Root({ __scopeDialog, ...props }) {
64
+ * const scope = useDialogScope(__scopeDialog);
65
+ * return <DialogProvider {...scope} open={...}>{props.children}</DialogProvider>;
66
+ * }
67
+ */
68
+ declare function createContextScope(scopeName: string, createContextScopeDeps?: CreateScope[]): readonly [
69
+ <ContextValueType extends object | null>(rootComponentName: string, defaultContext?: ContextValueType) => readonly [
70
+ React.FC<ContextValueType & {
71
+ scope: Scope;
72
+ children: React.ReactNode;
73
+ }>,
74
+ (consumerName: string, scope: Scope) => ContextValueType
75
+ ],
76
+ CreateScope
77
+ ];
78
+ /**
79
+ * Merge multiple CreateScope factories into one. Used internally when a
80
+ * component family depends on another (e.g. DropdownMenu depends on Popper).
81
+ */
82
+ declare function composeContextScopes(...scopes: CreateScope[]): CreateScope;
83
+
84
+ interface PortalProps extends React.ComponentPropsWithoutRef<typeof Primitive.div> {
85
+ /** Element where the portal renders. Defaults to `document.body`. */
86
+ container?: Element | DocumentFragment | null;
87
+ }
88
+ declare const Portal: React.ForwardRefExoticComponent<PortalProps & React.RefAttributes<HTMLDivElement>>;
89
+
90
+ type VisuallyHiddenProps = React.ComponentPropsWithoutRef<typeof Primitive.span>;
91
+ declare const VisuallyHidden: React.ForwardRefExoticComponent<Omit<React.ClassAttributes<HTMLSpanElement> & React.HTMLAttributes<HTMLSpanElement> & {
92
+ asChild?: boolean;
93
+ }, "ref"> & React.RefAttributes<HTMLSpanElement>>;
94
+
95
+ type Direction = 'ltr' | 'rtl';
96
+ interface DirectionProviderProps {
97
+ children?: React.ReactNode;
98
+ dir: Direction;
99
+ }
100
+ declare const DirectionProvider: React.FC<DirectionProviderProps>;
101
+ declare function useDirection(localDir?: Direction): Direction;
102
+
103
+ /**
104
+ * Drives an animation-aware presence state machine. When `present` flips from
105
+ * true → false the node remains mounted until a CSS animation or transition
106
+ * completes, allowing exit animations to play.
107
+ */
108
+ declare function usePresence(present: boolean): {
109
+ isPresent: boolean;
110
+ ref: (el: HTMLElement | null) => void;
111
+ };
112
+ interface PresenceProps {
113
+ present: boolean;
114
+ children: React.ReactElement | ((props: {
115
+ present: boolean;
116
+ }) => React.ReactElement);
117
+ /** Force the element to stay mounted regardless of `present`. */
118
+ forceMount?: boolean;
119
+ }
120
+ declare const Presence: React.FC<PresenceProps>;
121
+
122
+ interface FocusScopeProps extends React.ComponentPropsWithoutRef<typeof Primitive.div> {
123
+ /** When true, tabbing from the last focusable wraps to the first. */
124
+ loop?: boolean;
125
+ /** When true, focus cannot leave the scope while it is mounted. */
126
+ trapped?: boolean;
127
+ /** Called when focus moves into the scope. Call `event.preventDefault()` to prevent default. */
128
+ onMountAutoFocus?: (event: Event) => void;
129
+ /** Called when focus is about to leave the scope on unmount. Call `event.preventDefault()` to prevent default restoration. */
130
+ onUnmountAutoFocus?: (event: Event) => void;
131
+ }
132
+ declare const FocusScope: React.ForwardRefExoticComponent<FocusScopeProps & React.RefAttributes<HTMLDivElement>>;
133
+
134
+ /**
135
+ * Inject visually-hidden focusable sentinel elements at the start and end of
136
+ * the document body. When Tab attempts to leave a trapped FocusScope the
137
+ * sentinels catch focus and FocusScope re-enters the scope.
138
+ *
139
+ * Counted singleton — multiple `<FocusGuards />` mounted at once still only
140
+ * inserts one pair of guards.
141
+ */
142
+ declare function useFocusGuards(): void;
143
+ declare const FocusGuards: React.FC<{
144
+ children?: React.ReactNode;
145
+ }>;
146
+
147
+ type PointerDownOutsideEvent = CustomEvent<{
148
+ originalEvent: PointerEvent;
149
+ }>;
150
+ type FocusOutsideEvent = CustomEvent<{
151
+ originalEvent: FocusEvent;
152
+ }>;
153
+ interface DismissableLayerProps extends React.ComponentPropsWithoutRef<typeof Primitive.div> {
154
+ /** When true, hovering outside the layer disables pointer events on outside elements. */
155
+ disableOutsidePointerEvents?: boolean;
156
+ /** Called when Escape is pressed. Call `event.preventDefault()` to cancel dismissal. */
157
+ onEscapeKeyDown?: (event: KeyboardEvent) => void;
158
+ /** Called on pointerdown outside the layer. */
159
+ onPointerDownOutside?: (event: PointerDownOutsideEvent) => void;
160
+ /** Called when focus moves outside the layer. */
161
+ onFocusOutside?: (event: FocusOutsideEvent) => void;
162
+ /** Called on any interaction (pointer or focus) outside the layer. */
163
+ onInteractOutside?: (event: PointerDownOutsideEvent | FocusOutsideEvent) => void;
164
+ /** Called when the layer should dismiss. */
165
+ onDismiss?: () => void;
166
+ }
167
+ declare const DismissableLayer: React.ForwardRefExoticComponent<DismissableLayerProps & React.RefAttributes<HTMLDivElement>>;
168
+ interface DismissableLayerBranchProps extends React.ComponentPropsWithoutRef<typeof Primitive.div> {
169
+ }
170
+ declare const DismissableLayerBranch: React.ForwardRefExoticComponent<DismissableLayerBranchProps & React.RefAttributes<HTMLDivElement>>;
171
+
172
+ type Orientation = 'horizontal' | 'vertical';
173
+ interface RovingFocusGroupProps extends React.ComponentPropsWithoutRef<typeof Primitive.div> {
174
+ orientation?: Orientation;
175
+ dir?: Direction;
176
+ loop?: boolean;
177
+ currentTabStopId?: string | null;
178
+ defaultCurrentTabStopId?: string;
179
+ onCurrentTabStopIdChange?: (tabStopId: string | null) => void;
180
+ onEntryFocus?: (event: Event) => void;
181
+ preventScrollOnEntryFocus?: boolean;
182
+ }
183
+ declare const RovingFocusGroup: React.ForwardRefExoticComponent<RovingFocusGroupProps & React.RefAttributes<HTMLDivElement>>;
184
+ interface RovingFocusItemProps extends React.ComponentPropsWithoutRef<typeof Primitive.span> {
185
+ tabStopId?: string;
186
+ focusable?: boolean;
187
+ active?: boolean;
188
+ }
189
+ declare const RovingFocusItem: React.ForwardRefExoticComponent<RovingFocusItemProps & React.RefAttributes<HTMLSpanElement>>;
190
+
191
+ type CollectionElement = HTMLElement;
192
+ type ItemData<I> = {
193
+ ref: React.RefObject<CollectionElement | null>;
194
+ } & I;
195
+ /**
196
+ * Create an ordered collection for tracking child items in DOM order.
197
+ * Used by RovingFocusGroup, Menu, Select, etc. to expose
198
+ * `getItems()` returning items sorted as they appear in the DOM.
199
+ */
200
+ declare function createCollection<I extends Record<string, unknown> = Record<string, unknown>>(name: string): readonly [{
201
+ readonly Provider: React.FC<{
202
+ children?: React.ReactNode;
203
+ }>;
204
+ readonly Slot: React.ForwardRefExoticComponent<{
205
+ children: React.ReactNode;
206
+ } & React.RefAttributes<HTMLElement>>;
207
+ readonly ItemSlot: React.ForwardRefExoticComponent<React.PropsWithoutRef<{
208
+ children: React.ReactNode;
209
+ } & I> & React.RefAttributes<HTMLElement>>;
210
+ }, () => () => Array<ItemData<I>>];
211
+
212
+ interface ArrowProps extends React.ComponentPropsWithoutRef<typeof Primitive.svg> {
213
+ width?: number;
214
+ height?: number;
215
+ }
216
+ /**
217
+ * SVG arrow used by `Popper` (and any tooltip/popover that needs a pointer).
218
+ * Composed via `Popper.Arrow` which positions and rotates this element.
219
+ */
220
+ declare const Arrow: React.ForwardRefExoticComponent<ArrowProps & React.RefAttributes<SVGSVGElement>>;
221
+
222
+ interface AccessibleIconProps {
223
+ /** Visually-hidden label announced to assistive tech. */
224
+ label: string;
225
+ /** The icon element (must be a single React element). */
226
+ children: React.ReactElement;
227
+ }
228
+ /**
229
+ * Wraps an icon element with `aria-hidden` and an adjacent visually-hidden label,
230
+ * so the icon is decorative to sighted users but still announced to screen readers.
231
+ */
232
+ declare const AccessibleIcon: React.FC<AccessibleIconProps>;
233
+
234
+ /**
235
+ * Lock body scroll while mounted. Compensates for scrollbar disappearance
236
+ * to avoid layout shift. Reference-counted so nested usages work.
237
+ */
238
+ declare function useScrollLock(enabled?: boolean): void;
239
+ declare const ScrollLock: React.FC<{
240
+ children?: React.ReactNode;
241
+ enabled?: boolean;
242
+ }>;
243
+
244
+ type Side = 'top' | 'right' | 'bottom' | 'left';
245
+ type Align = 'start' | 'center' | 'end';
246
+ type Sticky = 'partial' | 'always';
247
+ declare const Popper: React.FC<{
248
+ children?: React.ReactNode;
249
+ }>;
250
+ interface PopperAnchorProps extends React.ComponentPropsWithoutRef<typeof Primitive.div> {
251
+ virtualRef?: React.RefObject<{
252
+ getBoundingClientRect: () => DOMRect;
253
+ }>;
254
+ }
255
+ declare const PopperAnchor: React.ForwardRefExoticComponent<PopperAnchorProps & React.RefAttributes<HTMLDivElement>>;
256
+ interface PopperContentProps extends React.ComponentPropsWithoutRef<typeof Primitive.div> {
257
+ side?: Side;
258
+ sideOffset?: number;
259
+ align?: Align;
260
+ alignOffset?: number;
261
+ arrowPadding?: number;
262
+ avoidCollisions?: boolean;
263
+ collisionBoundary?: Element | Element[] | null;
264
+ collisionPadding?: number | Partial<Record<Side, number>>;
265
+ sticky?: Sticky;
266
+ hideWhenDetached?: boolean;
267
+ updatePositionStrategy?: 'always' | 'optimized';
268
+ onPlaced?: () => void;
269
+ strategy?: Strategy;
270
+ }
271
+ declare const PopperContent: React.ForwardRefExoticComponent<PopperContentProps & React.RefAttributes<HTMLDivElement>>;
272
+ declare const PopperArrow: React.ForwardRefExoticComponent<ArrowProps & React.RefAttributes<SVGSVGElement>>;
273
+
274
+ type popper_Align = Align;
275
+ type popper_PopperAnchorProps = PopperAnchorProps;
276
+ type popper_PopperContentProps = PopperContentProps;
277
+ type popper_Side = Side;
278
+ declare namespace popper {
279
+ export { type popper_Align as Align, PopperAnchor as Anchor, PopperArrow as Arrow, PopperContent as Content, type popper_PopperAnchorProps as PopperAnchorProps, type popper_PopperContentProps as PopperContentProps, Popper as Root, type popper_Side as Side };
280
+ }
281
+
282
+ export { AccessibleIcon, type AccessibleIconProps, Arrow, type ArrowProps, type Direction, DirectionProvider, DismissableLayer, DismissableLayerBranch, type DismissableLayerBranchProps, type DismissableLayerProps, FocusGuards, type FocusOutsideEvent, FocusScope, type FocusScopeProps, type Orientation, type PointerDownOutsideEvent, popper as Popper, Portal, type PortalProps, Presence, type PresenceProps, Primitive, type PrimitivePropsWithRef, RovingFocusGroup, type RovingFocusGroupProps, RovingFocusItem, type RovingFocusItemProps, ScrollLock, Slot, type SlotProps, Slottable, VisuallyHidden, type VisuallyHiddenProps, composeContextScopes, createCollection, createContext, createContextScope, useDirection, useFocusGuards, usePresence, useScrollLock };