UNPKG

@progress/kendo-react-dropdowns

Version:

React DropDowns offer an interface for users to select different items from a list and more. KendoReact Dropdowns package

57 lines (56 loc) 2.16 kB
/** * @license *------------------------------------------------------------------------------------------- * Copyright © 2025 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the package root for more information *------------------------------------------------------------------------------------------- */ import * as n from "react"; import e from "prop-types"; import { TextBox as y, InputPrefix as b, InputSeparator as I } from "@progress/kendo-react-inputs"; import { searchIcon as g } from "@progress/kendo-svg-icons"; import { useUnstyled as h, classNames as a, uDropDownsBase as l, IconWrap as D } from "@progress/kendo-react-common"; const u = n.forwardRef((r, c) => { const o = n.useRef(null), { renderListFilterWrapper: m = !1, renderPrefixSeparator: d = !1, ...f } = r, s = h(), t = s && s.uDropDownsBase; n.useImperativeHandle(c, () => o.current); const p = () => /* @__PURE__ */ n.createElement(n.Fragment, null, /* @__PURE__ */ n.createElement(b, null, /* @__PURE__ */ n.createElement( D, { name: "search", icon: g, className: a(l.inputIcon({ c: t })) } )), d && /* @__PURE__ */ n.createElement(I, null)), i = /* @__PURE__ */ n.createElement( y, { ...f, ref: o, className: a(l.searchbox({ c: t })), value: r.value || "", onChange: r.onChange, onKeyDown: r.onKeyDown, tabIndex: r.tabIndex, onClick: (x) => x.stopPropagation(), size: r.size, fillMode: r.fillMode, rounded: r.rounded, prefix: p } ); return m ? /* @__PURE__ */ n.createElement("div", { className: a(l.listFilter({ c: t })) }, " ", i, " ") : i; }); u.propTypes = { value: e.oneOfType([e.string, e.number, e.array]), tabIndex: e.number, onChange: e.func, onKeyDown: e.func, size: e.oneOf([null, "small", "medium", "large"]), rounded: e.oneOf([null, "small", "medium", "large", "full"]), fillMode: e.oneOf([null, "solid", "flat", "outline"]), renderListFilterWrapper: e.bool, renderPrefixSeparator: e.bool }; u.displayName = "KendoReactListFilter"; export { u as default };