|
| 1 | +{ |
| 2 | + "name": "AutocompleteRoot", |
| 3 | + "description": "Groups all parts of the autocomplete.\nDoesn't render its own HTML element.", |
| 4 | + "props": { |
| 5 | + "name": { |
| 6 | + "type": "string", |
| 7 | + "description": "Identifies the field when a form is submitted.", |
| 8 | + "detailedType": "string | undefined" |
| 9 | + }, |
| 10 | + "defaultValue": { |
| 11 | + "type": "string | number | string[]", |
| 12 | + "description": "The uncontrolled input value of the autocomplete when it's initially rendered.\n\nTo render a controlled autocomplete, use the `value` prop instead.", |
| 13 | + "detailedType": "string | number | string[] | undefined" |
| 14 | + }, |
| 15 | + "value": { |
| 16 | + "type": "string | number | string[]", |
| 17 | + "description": "The input value of the autocomplete. Use when controlled.", |
| 18 | + "detailedType": "string | number | string[] | undefined" |
| 19 | + }, |
| 20 | + "onValueChange": { |
| 21 | + "type": "((value: string, eventDetails: Autocomplete.Root.ChangeEventDetails) => void)", |
| 22 | + "description": "Callback fired when the input value of the autocomplete changes.", |
| 23 | + "detailedType": "| ((\n value: string,\n eventDetails: Autocomplete.Root.ChangeEventDetails,\n ) => void)\n| undefined" |
| 24 | + }, |
| 25 | + "defaultOpen": { |
| 26 | + "type": "boolean", |
| 27 | + "default": "false", |
| 28 | + "description": "Whether the popup is initially open.\n\nTo render a controlled popup, use the `open` prop instead.", |
| 29 | + "detailedType": "boolean | undefined" |
| 30 | + }, |
| 31 | + "open": { |
| 32 | + "type": "boolean", |
| 33 | + "description": "Whether the popup is currently open.", |
| 34 | + "detailedType": "boolean | undefined" |
| 35 | + }, |
| 36 | + "onOpenChange": { |
| 37 | + "type": "((open: boolean, eventDetails: Autocomplete.Root.ChangeEventDetails) => void)", |
| 38 | + "description": "Event handler called when the popup is opened or closed.", |
| 39 | + "detailedType": "| ((\n open: boolean,\n eventDetails: Autocomplete.Root.ChangeEventDetails,\n ) => void)\n| undefined" |
| 40 | + }, |
| 41 | + "actionsRef": { |
| 42 | + "type": "RefObject<Autocomplete.Root.Actions>", |
| 43 | + "description": "A ref to imperative actions.\n- `unmount`: When specified, the autocomplete will not be unmounted when closed.\nInstead, the `unmount` function must be called to unmount the autocomplete manually.\nUseful when the autocomplete's animation is controlled by an external library.", |
| 44 | + "detailedType": "| React.RefObject<Autocomplete.Root.Actions>\n| undefined" |
| 45 | + }, |
| 46 | + "autoHighlight": { |
| 47 | + "type": "boolean", |
| 48 | + "default": "false", |
| 49 | + "description": "Whether to automatically highlight the first item when the popup opens.", |
| 50 | + "detailedType": "boolean | undefined" |
| 51 | + }, |
| 52 | + "cols": { |
| 53 | + "type": "number", |
| 54 | + "default": "1", |
| 55 | + "description": "The maximum number of columns present when the items are rendered in grid layout.\nA value of more than `1` turns the listbox into a grid.", |
| 56 | + "detailedType": "number | undefined" |
| 57 | + }, |
| 58 | + "filter": { |
| 59 | + "type": "((itemValue: Value, query: string, itemToStringLabel: ((itemValue: Value) => string) | undefined) => boolean) | null", |
| 60 | + "description": "Filter function used to match items vs input query.\nThe `itemToStringLabel` function is provided to help convert items to strings for comparison.", |
| 61 | + "detailedType": "| ((\n itemValue: Value,\n query: string,\n itemToStringLabel:\n | ((itemValue: Value) => string)\n | undefined,\n ) => boolean)\n| null\n| undefined" |
| 62 | + }, |
| 63 | + "itemToStringValue": { |
| 64 | + "type": "((itemValue: Value) => string)", |
| 65 | + "description": "When items' values are objects, converts its value to a string representation for display in the input.", |
| 66 | + "detailedType": "((itemValue: Value) => string) | undefined" |
| 67 | + }, |
| 68 | + "items": { |
| 69 | + "type": "Group<Value>[] | Value[]", |
| 70 | + "detailedType": "Group<Value>[] | Value[] | undefined" |
| 71 | + }, |
| 72 | + "limit": { |
| 73 | + "type": "number", |
| 74 | + "default": "-1", |
| 75 | + "description": "The maximum number of items to display in the list.", |
| 76 | + "detailedType": "number | undefined" |
| 77 | + }, |
| 78 | + "locale": { |
| 79 | + "type": "Intl.LocalesArgument", |
| 80 | + "description": "The locale to use for string comparison.\nDefaults to the user's runtime locale.", |
| 81 | + "detailedType": "Intl.LocalesArgument | undefined" |
| 82 | + }, |
| 83 | + "modal": { |
| 84 | + "type": "boolean", |
| 85 | + "default": "false", |
| 86 | + "description": "Determines if the popup enters a modal state when open.\n- `true`: user interaction is limited to the popup: document page scroll is locked and pointer interactions on outside elements are disabled.\n- `false`: user interaction with the rest of the document is allowed.", |
| 87 | + "detailedType": "boolean | undefined" |
| 88 | + }, |
| 89 | + "mode": { |
| 90 | + "type": "'none' | 'list' | 'inline' | 'both'", |
| 91 | + "default": "'list'", |
| 92 | + "description": "Controls how the autocomplete behaves with respect to list filtering and inline autocompletion.\n- `list` (default): items are dynamically filtered based on the input value. The input value does not change based on the active item.\n- `both`: items are dynamically filtered based on the input value, which will temporarily change based on the active item (inline autocompletion).\n- `inline`: items are static (not filtered), and the input value will temporarily change based on the active item (inline autocompletion).\n- `none`: items are static (not filtered), and the input value will not change based on the active item.", |
| 93 | + "detailedType": "'none' | 'list' | 'inline' | 'both' | undefined" |
| 94 | + }, |
| 95 | + "onItemHighlighted": { |
| 96 | + "type": "((itemValue: Value | undefined, data: { type: 'none' | 'keyboard' | 'pointer', index: number }) => void)", |
| 97 | + "description": "Callback fired when the user navigates the list and highlights an item.\nPasses the item and the type of navigation or `undefined` when no item is highlighted.\n- `keyboard`: The item was highlighted via keyboard navigation.\n- `pointer`: The item was highlighted via pointer navigation.\n- `none`: The item was highlighted via programmatic navigation.", |
| 98 | + "detailedType": "| ((\n itemValue: Value | undefined,\n data: {\n type: 'none' | 'keyboard' | 'pointer'\n index: number\n },\n ) => void)\n| undefined" |
| 99 | + }, |
| 100 | + "onOpenChangeComplete": { |
| 101 | + "type": "((open: boolean) => void)", |
| 102 | + "description": "Event handler called after any animations complete when the popup is opened or closed.", |
| 103 | + "detailedType": "((open: boolean) => void) | undefined" |
| 104 | + }, |
| 105 | + "openOnInputClick": { |
| 106 | + "type": "boolean", |
| 107 | + "default": "true", |
| 108 | + "description": "Whether the popup opens when clicking the input.", |
| 109 | + "detailedType": "boolean | undefined" |
| 110 | + }, |
| 111 | + "virtualized": { |
| 112 | + "type": "boolean", |
| 113 | + "default": "false", |
| 114 | + "description": "Whether the items are being externally virtualized.", |
| 115 | + "detailedType": "boolean | undefined" |
| 116 | + }, |
| 117 | + "disabled": { |
| 118 | + "type": "boolean", |
| 119 | + "default": "false", |
| 120 | + "description": "Whether the component should ignore user interaction.", |
| 121 | + "detailedType": "boolean | undefined" |
| 122 | + }, |
| 123 | + "readOnly": { |
| 124 | + "type": "boolean", |
| 125 | + "default": "false", |
| 126 | + "description": "Whether the user should be unable to choose a different option from the popup.", |
| 127 | + "detailedType": "boolean | undefined" |
| 128 | + }, |
| 129 | + "required": { |
| 130 | + "type": "boolean", |
| 131 | + "default": "false", |
| 132 | + "description": "Whether the user must choose a value before submitting a form.", |
| 133 | + "detailedType": "boolean | undefined" |
| 134 | + }, |
| 135 | + "inputRef": { |
| 136 | + "type": "RefObject<HTMLInputElement>", |
| 137 | + "description": "A ref to the hidden input element.", |
| 138 | + "detailedType": "React.RefObject<HTMLInputElement> | undefined" |
| 139 | + }, |
| 140 | + "id": { |
| 141 | + "type": "string", |
| 142 | + "description": "The id of the component.", |
| 143 | + "detailedType": "string | undefined" |
| 144 | + }, |
| 145 | + "children": { |
| 146 | + "type": "ReactNode", |
| 147 | + "detailedType": "React.ReactNode | undefined" |
| 148 | + } |
| 149 | + }, |
| 150 | + "dataAttributes": {}, |
| 151 | + "cssVariables": {} |
| 152 | +} |
0 commit comments