UNPKG

@primer/react

Version:

An implementation of GitHub's Primer Design System using React

101 lines (100 loc) 3.04 kB
import TextInput_default from "../TextInput/TextInput.js"; import FilteredActionList_module_css_default from "./FilteredActionList.module.css.js"; import { c } from "react-compiler-runtime"; import { clsx } from "clsx"; import { jsx } from "react/jsx-runtime"; //#region src/FilteredActionList/FilteredActionListInput.tsx function FilteredActionListInput(t0) { const $ = c(28); let className; let fullScreenOnNarrow; let inputDescriptionTextId; let inputRef; let listId; let loading; let onInputChange; let onInputKeyDown; let onInputKeyPress; let placeholderText; let restTextInputProps; let value; if ($[0] !== t0) { ({inputRef, value, onInputChange, onInputKeyPress, onInputKeyDown, placeholderText, listId, inputDescriptionTextId, loading, fullScreenOnNarrow, className, ...restTextInputProps} = t0); $[0] = t0; $[1] = className; $[2] = fullScreenOnNarrow; $[3] = inputDescriptionTextId; $[4] = inputRef; $[5] = listId; $[6] = loading; $[7] = onInputChange; $[8] = onInputKeyDown; $[9] = onInputKeyPress; $[10] = placeholderText; $[11] = restTextInputProps; $[12] = value; } else { className = $[1]; fullScreenOnNarrow = $[2]; inputDescriptionTextId = $[3]; inputRef = $[4]; listId = $[5]; loading = $[6]; onInputChange = $[7]; onInputKeyDown = $[8]; onInputKeyPress = $[9]; placeholderText = $[10]; restTextInputProps = $[11]; value = $[12]; } let t1; if ($[13] !== className || $[14] !== fullScreenOnNarrow) { t1 = clsx(className, { [FilteredActionList_module_css_default.FullScreenTextInput]: fullScreenOnNarrow }); $[13] = className; $[14] = fullScreenOnNarrow; $[15] = t1; } else t1 = $[15]; let t2; if ($[16] !== inputDescriptionTextId || $[17] !== inputRef || $[18] !== listId || $[19] !== loading || $[20] !== onInputChange || $[21] !== onInputKeyDown || $[22] !== onInputKeyPress || $[23] !== placeholderText || $[24] !== restTextInputProps || $[25] !== t1 || $[26] !== value) { t2 = /*#__PURE__*/ jsx("div", { className: FilteredActionList_module_css_default.Header, "data-component": "FilteredActionList.Header", children: /*#__PURE__*/ jsx(TextInput_default, { ref: inputRef, block: true, width: "auto", color: "fg.default", value, onChange: onInputChange, onKeyPress: onInputKeyPress, onKeyDown: onInputKeyDown, placeholder: placeholderText, role: "combobox", "aria-expanded": "true", "aria-autocomplete": "list", "aria-controls": listId, "aria-label": placeholderText, "aria-describedby": inputDescriptionTextId, loaderPosition: "leading", loading, className: t1, ...restTextInputProps }) }); $[16] = inputDescriptionTextId; $[17] = inputRef; $[18] = listId; $[19] = loading; $[20] = onInputChange; $[21] = onInputKeyDown; $[22] = onInputKeyPress; $[23] = placeholderText; $[24] = restTextInputProps; $[25] = t1; $[26] = value; $[27] = t2; } else t2 = $[27]; return t2; } //#endregion export { FilteredActionListInput };