UNPKG

@infinityfx/fluid

Version:

React UI library, using zero-runtime CSS-in-JS.

4 lines (3 loc) 575 B
"use client"; import{jsx as o}from"react/jsx-runtime";import{getFocusable as r}from"../../../core/utils.js";import e from"../../layout/popover/index.js";import{usePopover as t}from"../../layout/popover/root.js";function n(n){const{content:i}=t();return o(e.Trigger,{...n,role:"combobox",onKeyDown:o=>{if(n.children.props.onKeyDown?.(o),n.onKeyDown?.(o),"Tab"===o.key&&!o.shiftKey||"ArrowDown"===o.key){const e=r(i.current,!1);e&&(o.preventDefault(),e.focus())}},children:n.children})}n.displayName="Combobox.Trigger";export{n as default}; //# sourceMappingURL=trigger.js.map