@progress/kendo-react-dropdowns
Version:
React DropDowns offer an interface for users to select different items from a list and more. KendoReact Dropdowns package
9 lines (8 loc) • 19.3 kB
JavaScript
/**
* @license
*-------------------------------------------------------------------------------------------
* Copyright © 2025 Progress Software Corporation. All rights reserved.
* Licensed under commercial license. See LICENSE.md in the package root for more information
*-------------------------------------------------------------------------------------------
*/
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Bt=require("react"),L=require("prop-types"),o=require("@progress/kendo-react-common"),Wt=require("@progress/kendo-react-labels"),_t=require("@progress/kendo-svg-icons"),Ut=require("../common/ListContainer.js"),Gt=require("../common/ListFilter.js"),tt=require("../common/GroupStickyHeader.js"),jt=require("../common/ListDefaultItem.js"),$t=require("../common/List.js"),rt=require("../common/DropDownBase.js"),d=require("../common/utils.js"),nt=require("../package-metadata.js"),Yt=require("@progress/kendo-react-buttons"),Jt=require("@progress/kendo-react-intl"),$=require("../messages/index.js"),Qt=require("@progress/kendo-react-layout"),Rt=require("../common/AdaptiveMode.js");function Xt(N){const Y=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(N){for(const T in N)if(T!=="default"){const ne=Object.getOwnPropertyDescriptor(N,T);Object.defineProperty(Y,T,ne.get?ne:{enumerable:!0,get:()=>N[T]})}}return Y.default=N,Object.freeze(Y)}const i=Xt(Bt),Zt="Please select a value from the list!",me=i.forwardRef((N,Y)=>{let T=!1;const ne=o.getLicenseMessage(nt.packageMetadata),n=o.usePropsContext(ot,N),{delay:st=P.delay,tabIndex:at=P.tabIndex,ignoreCase:ge=P.ignoreCase,size:O=P.size,rounded:Ne=P.rounded,fillMode:fe=P.fillMode,groupMode:en=P.groupMode}=n;if(n.filterable||n.virtual){const e=[];n.filterable&&e.push("filterable"),n.virtual&&e.push("virtualization"),T=!o.validatePackage(nt.packageMetadata,{component:"DropDownList",features:e})}const b=o.useUnstyled(),ve=o.useId(n.id),ye=()=>{var e;if(o.canUseDOM)return((e=Q.current)==null?void 0:e.ownerDocument)||window.document},it=()=>{var e,r;(e=t==null?void 0:t.current)!=null&&e.wrapper&&((r=t==null?void 0:t.current)==null||r.wrapper.focus({preventScroll:!0}))},k=()=>{let e;return z.current!==void 0&&z.current!==null?e=z.current:n.value!==void 0?e=n.value:g.value!==void 0&&g.value!==null?e=g.value:n.defaultValue!==void 0&&n.defaultValue!==null&&(e=n.defaultValue),!d.isPresent(e)&&n.defaultItem!==void 0&&n.defaultItem!==null&&(e=n.defaultItem),e},lt=()=>{const{dataItemKey:e}=n,r=d.getFilteredData(n),s=k();return r.findIndex(c=>d.areSame(c,s,e))},De=()=>n.required!==void 0?n.required:P.required,Ie=()=>{const e=n.validationMessage!==void 0,r=k(),s=!De()||r!==null&&r!==""&&r!==void 0,c=n.valid!==void 0?n.valid:s;return{customError:e,valid:c,valueMissing:r===null}},dt=()=>n.validityStyles!==void 0?n.validityStyles:P.validityStyles,re=e=>{oe.current=!0,e.focus(),window.setTimeout(()=>oe.current=!1,30)},we=()=>{R.current&&re(R.current),n.adaptive&&setTimeout(()=>{R.current&&re(R.current)},300)},ct=i.useCallback(e=>{for(const r of e)Ft(r.target.clientWidth)},[]),Te=()=>{var e;(e=Ce.current)!=null&&e.setCustomValidity&&Ce.current.setCustomValidity(Ie().valid?"":n.validationMessage||Zt)},W=(e,r)=>{const s=k();d.areSame(s,e,n.dataItemKey)||(n.value===void 0&&(r.data.value=e),t.current.updateComponentArgs({value:e}),z.current=e,r.events.push({type:"onChange"}))},E=e=>{var r;(r=t==null?void 0:t.current)==null||r.applyState(e),z.current=void 0},J=(e,r)=>{var p;const{virtual:s,dataItemKey:c,defaultItem:u}=n,m=d.getFilteredData(n),y=s?s.skip:0,f=k(),a=e===-1&&u!==void 0?u:m[e-y],v=!d.areSame(a,f,c);W(a,r),v&&((p=t==null?void 0:t.current)==null||p.triggerPageChangeCornerItems(a,r))},q=(e,r,s)=>{var x,I;const{defaultItem:c,dataItemKey:u,virtual:m={skip:0,total:0,pageSize:0}}=n,y=k(),f=d.getFilteredData(n),a=(x=t==null?void 0:t.current)==null?void 0:x.vs,v=f.findIndex(h=>d.areSame(h,y,u)),p=(I=t==null?void 0:t.current)==null?void 0:I.navigation.navigate({current:m.skip+v,max:(a!=null&&a.enabled?m.total:f.length)-1,min:c!==void 0?-1:0,keyCode:r,skipItems:s||void 0});p!==void 0&&J(p,e),E(e)},ut=e=>{Q.current=e,t.current.wrapper=e},pt=e=>i.createElement("select",{name:n.name,ref:r=>{Ce.current=r},tabIndex:-1,"aria-hidden":!0,title:n.label,style:{opacity:0,width:1,border:0,zIndex:-1,position:"absolute",left:"50%"}},i.createElement("option",{value:n.valueMap?n.valueMap.call(void 0,e):e})),he=()=>{const{textField:e,dataItemKey:r,virtual:s={skip:0},focusedItemIndex:c=d.itemIndexStartsWith,filterable:u,skipDisabledItems:m=!0}=n,y=k(),f=d.getFilteredData(n),a=n.filter?n.filter:g.text;return m&&e&&!a&&!y?f.findIndex(v=>!v.disabled&&v[e]):d.isPresent(y)&&a===void 0||u&&a===""?f.findIndex(v=>d.areSame(v,y,r)):a?Le.current?c(f,a,e):f.findIndex(v=>d.areSame(v,y,r)):s.skip===0?0:-1},Oe=(e,r)=>r!==void 0&&r!==-1&&e&&e.length>0&&e[r].disabled,Se=()=>{const e=d.getFilteredData(n),r=t.current.initState(),s=he();Oe(e,s)&&(W(null,r),E(r))},xe=e=>{if(e.isPropagationStopped())return;const r=t.current.initState();r.syntheticEvent=e,g.focused||(r.data.focused=!0),Se(),t.current.togglePopup(r),E(r)},qe=e=>{var M,ue,B,pe,j,Ze,et;e&&e.target instanceof Element&&e.target.nodeName==="INPUT"&&e.stopPropagation&&e.stopPropagation();const{filterable:r,disabled:s,defaultItem:c,leftRightKeysNavigation:u=!0,virtual:m={skip:0,total:0,pageSize:0},dataItemKey:y,groupField:f="",textField:a,skipDisabledItems:v=!0}=n,p=d.getFilteredData(n),x=k(),I=p.findIndex(C=>d.areSame(C,x,y)),h=n.opened!==void 0?n.opened:g.opened,l=e.keyCode,F=l===o.Keys.home||l===o.Keys.end,K=l===o.Keys.up||l===o.Keys.down,G=!h&&(e.altKey&&l===o.Keys.down||l===o.Keys.enter||l===o.Keys.space),te=h&&(e.altKey&&l===o.Keys.up||l===o.Keys.esc),de=u&&(l===o.Keys.left||l===o.Keys.right),ce=K||de&&!r||F,S=t.current.initState();if(S.syntheticEvent=e,!s){if(F&&((M=t==null?void 0:t.current)!=null&&M.vs.enabled))l===o.Keys.home?m.skip!==0?((ue=t==null?void 0:t.current)==null||ue.triggerOnPageChange(S,0,m.pageSize),V.current=!0):W(p[0],S):m.skip<m.total-m.pageSize?((B=t==null?void 0:t.current)==null||B.triggerOnPageChange(S,m.total-m.pageSize,m.pageSize),V.current=!0):W(p[p.length-1],S);else if(h&&l===o.Keys.pageUp)e.preventDefault(),(pe=t==null?void 0:t.current)==null||pe.scrollPopupByPageSize(-1);else if(h&&l===o.Keys.pageDown)e.preventDefault(),(j=t==null?void 0:t.current)==null||j.scrollPopupByPageSize(1);else if(h&&l===o.Keys.enter){const C=he();Oe(p,C)?(W(null,S),E(S)):J(C,S),(Ze=t==null?void 0:t.current)==null||Ze.togglePopup(S),e.preventDefault()}else if(G||te)te&&Se(),(et=t==null?void 0:t.current)==null||et.togglePopup(S),e.preventDefault();else if(ce){if(Le.current=!1,f!==""&&a)if(!v&&h)q(S,l);else{let C;if(l===o.Keys.down||l===o.Keys.right){const w=p.slice(I+1).find(D=>!D.disabled&&D[a]);C=w&&p.findIndex(D=>D[a]===w[a])}else if(l===o.Keys.up||l===o.Keys.left){let w;if(I===0&&c)C=-1;else if(I===-1)w=p,C=p.findIndex(D=>!D.disabled&&D[a]);else{w=p.slice(0,I);let D=w.pop();for(;D&&D.disabled;)D=w.pop();C=D&&p.findIndex(Me=>Me[a]===D[a])}}if(C!==void 0){const w=C-I;q(S,l,w)}else C===void 0&&p.findIndex(w=>w[a]===x[a])===p.length-1&&q(S,l)}else if(!v&&h||F)q(S,l);else if(a){let C;if(l===o.Keys.down||l===o.Keys.right){const w=p.slice(I+1).find(D=>!D.disabled&&D[a]);C=w&&p.findIndex(D=>D[a]===w[a])}else if(l===o.Keys.up||l===o.Keys.left){let w;if(I===0&&c)C=-1;else if(I===-1)w=p,C=p.find(D=>!D.disabled&&D[a]);else{w=p.slice(0,I);let D=w.pop();for(;D&&D.disabled;)D=w.pop();C=D&&p.findIndex(Me=>Me[a]===D[a])}}if(C!==void 0){const w=C-I;q(S,l,w)}else C===void 0&&p.findIndex(w=>w[a]===x[a])===p.length-1&&q(S,l)}else q(S,l);e.preventDefault()}E(S)}},mt=e=>{const r=t.current.initState();r.syntheticEvent=e.syntheticEvent,n.filter===void 0&&(r.data.text=e.target.value),t.current.filterChanged(e.target.value,r),Le.current=!0,E(r),Z({group:void 0,text:String(e.target.value)})},ze=e=>{const r=n.filter!==void 0?n.filter:g.text;return n.filterable&&i.createElement(Gt,{value:r,ref:s=>{R.current=s&&s.element},onChange:mt,onKeyDown:qe,size:e?"large":O,rounded:Ne,fillMode:fe,renderListFilterWrapper:!0,placeholder:_e.toLanguageString($.dropDownListAdaptiveFilterPlaceholder,$.messages[$.dropDownListAdaptiveFilterPlaceholder])})},gt=e=>{var s;const r=t.current.initState();r.syntheticEvent=e,(s=t==null?void 0:t.current)==null||s.togglePopup(r),W(n.defaultItem,r),E(r)},ft=()=>{const{textField:e,defaultItem:r,dataItemKey:s}=n,c=k();return r!==void 0&&i.createElement(jt,{defaultItem:r,textField:e,selected:d.areSame(c,r,s),key:"defaultitemkey",onClick:gt})},vt=(e,r)=>{var s;(s=t==null?void 0:t.current)==null||s.handleItemClick(e,r),z.current=void 0},yt=e=>{const{vs:r,list:s}=t.current;r.scrollHandler(e);const{groupField:c}=n;let u=d.getFilteredData(n);if(!(!c||!u.length)&&c){const m=Be.current=Be.current||(r.enabled?r.itemHeight:s?s.children[0].offsetHeight:0),f=e.target.scrollTop-r.skip*m;u=t.current.getGroupedDataModernMode(u,c);let a=u[0][c];for(let v=1;v<u.length&&!(m*v>f);v++)u[v]&&u[v][c]&&(a=u[v][c]);a!==g.group&&Z({group:a})}},Ve=()=>{var l;const{textField:e,dataItemKey:r,virtual:s={skip:0,total:void 0},groupHeaderItemRender:c,listNoDataRender:u,itemRender:m}=n,y=d.getFilteredData(n),f=b&&b.uDropDownList,a=t.current.vs,v=s.skip,p=n.opened!==void 0?n.opened:g.opened,x=t.current.getPopupSettings(),I=`translateY(${a.translate}px)`,h=k();return i.createElement($t,{id:be,show:p,data:y.slice(),focusedIndex:he(),value:h,textField:e,valueField:r,optionsGuid:Ge,groupField:n.groupField,groupMode:"modern",listRef:F=>{a.list=t.current.list=F},wrapperStyle:{maxHeight:U?void 0:x.height},wrapperCssClass:o.classNames(o.uDropDownList.listContent({c:f})),listStyle:a.enabled?{transform:I}:void 0,key:"listkey",skip:v,onClick:vt,itemRender:m,groupHeaderItemRender:c,noDataRender:u,onScroll:yt,wrapperRef:a.scrollerRef,scroller:(l=t==null?void 0:t.current)==null?void 0:l.renderScrollElement(),ariaSetSize:s.total})},Dt=()=>{const{groupField:e}=n,r=d.getFilteredData(n),s=n.opened!==void 0?n.opened:g.opened,c=b&&b.uDropDownList,u={title:n.adaptiveTitle||n.label,subTitle:n.adaptiveSubtitle,expand:s,onClose:y=>xe(y),windowWidth:Ke,mobileFilter:ze(!0)};let{group:m}=g;return m===void 0&&e!==void 0&&(m=d.getItemValue(r[0],e)),i.createElement(Rt.AdaptiveMode,{...u},i.createElement(Qt.ActionSheetContent,null,i.createElement("div",{className:o.classNames(o.uDropDownList.listContainer({c,popup:!1}))},St())))},It=()=>{g.focused&&window.setTimeout(()=>{g.focused&&t.current.wrapper&&re(t.current.wrapper)})},wt=e=>{"onMouseDownOutside"in(n.popupSettings||{})&&n.popupSettings.onMouseDownOutside.call(void 0,e)},ht=()=>{const{header:e,footer:r,dir:s,groupField:c,groupStickyHeaderItemRender:u,list:m}=n,y=d.getFilteredData(n),f=t.current,a=f.getPopupSettings(),v=n.opened!==void 0?n.opened:g.opened,p=a.width!==void 0?a.width:f.popupWidth,x=b&&b.uDropDownList,I={dir:s!==void 0?s:f.dirCalculated,width:p,popupSettings:{...a,popupClass:o.classNames(a.popupClass,o.uDropDownList.listContainer({c:x,popup:!0})),anchor:a.anchor||Q.current,show:v,onOpen:we,onClose:It,onMouseDownOutside:wt},itemsCount:[y.length]};let{group:h}=g;return h===void 0&&c!==void 0&&(h=d.getItemValue(y[0],c)),i.createElement(Ut,{...I},ze(!1),e&&i.createElement("div",{className:o.classNames(o.uDropDownList.listHeader({c:x}))},e),i.createElement("div",{className:o.classNames(o.uDropDownList.list({c:x,size:O,virtual:t.current.vs.enabled}))},ft(),!m&&h&&y.length!==0&&i.createElement(tt,{group:h,groupMode:"modern",render:u}),Ve()),r&&i.createElement("div",{className:o.classNames(o.uDropDownList.listFooter({c:x}))},r),T&&i.createElement(o.WatermarkOverlay,{message:ne}))},St=()=>{const{header:e,footer:r,groupStickyHeaderItemRender:s,groupField:c,list:u}=n,m=d.getFilteredData(n),y=b&&b.uDropDownList;let{group:f}=g;return f===void 0&&c!==void 0&&(f=d.getItemValue(m[0],c)),i.createElement(i.Fragment,null,e&&i.createElement("div",{className:o.classNames(o.uDropDownList.listHeader({c:y}))},e),i.createElement("div",{className:o.classNames("k-list",{[`k-list-${U?"lg":o.sizeMap[O]||O}`]:O})},!u&&f&&m.length!==0&&i.createElement(tt,{group:f,groupMode:"modern",render:s}),Ve()),r&&i.createElement("div",{className:"k-list-footer"},r))},xt=e=>{const{dataItemKey:r}=n,s=d.getFilteredData(n),c=k();let u=s.map((K,G)=>({item:K,itemIndex:G}));const m=_.current.word,y=_.current.last,f=d.sameCharsOnly(m,y);let a=u.length,v=Math.max(0,s.findIndex(K=>d.areSame(K,c,r))),p;n.defaultItem&&(p={item:n.defaultItem,itemIndex:-1},a+=1,v+=1),v+=f?1:0,u=d.shuffleData(u,v,p);let x,I,h,l=0;const{textField:F}=n;for(;l<a;){if(x=d.getItemValue(u[l].item,F),I=f&&d.matchText(x,y,ge),h=d.matchText(x,m,ge),I||h){l=u[l].itemIndex;break}l++}if(l!==a){const K=t.current.initState();K.syntheticEvent=e,J(l,K),E(K),z.current=void 0}},Ct=e=>{clearTimeout(He.current),n.filterable||(He.current=window.setTimeout(()=>_.current.word="",st),xt(e))},Lt=e=>{oe.current||t.current.handleFocus(e)},kt=e=>{if(oe.current||!g.focused)return;const r=n.opened!==void 0?n.opened:g.opened,s=t.current.initState();s.syntheticEvent=e,s.data.focused=!1,s.events.push({type:"onBlur"}),r&&Se(),r&&!U&&t.current.togglePopup(s),E(s)},Kt=e=>{if(n.filterable||e.which===0||e.keyCode===o.Keys.enter)return;let r=String.fromCharCode(e.charCode||e.keyCode);ge&&(r=r.toLowerCase()),r===" "&&e.preventDefault(),_.current={word:_.current.word+r,last:_.current.last+r},Ct(e)},bt=()=>{const e=t.current.initState();e.data.opened=g.opened,t.current.togglePopup(e),E(e)},Ae=i.useRef(null),Q=i.useRef(null),Ce=i.useRef(null),R=i.useRef(null);i.useImperativeHandle(Ae,()=>({get element(){return Q.current},get index(){return lt()},get name(){return n.name},get validity(){return Ie()},get value(){return k()},get focused(){return g.focused},get opened(){return g.opened},focus:it,props:n,togglePopup:bt})),i.useImperativeHandle(Y,()=>Ae.current);const He=i.useRef(null),_=i.useRef({word:"",last:""}),oe=i.useRef(!1),z=i.useRef(null),V=i.useRef(!1),Le=i.useRef(!1),A=i.useRef({}),ke=i.useRef({}),t=i.useRef(new rt({props:n,setState:()=>{},state:{},forceUpdate:()=>{},element:null,value:null,handleItemSelect:()=>{}})),Be=i.useRef(0),X=i.useRef(null),[g,Et]=i.useState({}),[Ke,Ft]=i.useState(),[,We]=i.useReducer(e=>e,!0),_e=Jt.useLocalization(),Z=e=>{Et({...g,...e})};i.useEffect(()=>{t.current.updateComponentArgs({props:n,setState:Z,state:g,forceUpdate:We,element:Q.current,handleItemSelect:J,value:k()})},[Z,g,We,J,k]),i.useEffect(()=>{var v,p,x,I,h,l,F,K,G,te,de,ce,S;const{dataItemKey:e,virtual:r,groupField:s="",textField:c}=n,u=d.getFilteredData(n),m=A.current.virtual?A.current.virtual.total:0,y=n.opened!==void 0?n.opened:g.opened,f=A.current.opened!==void 0?A.current.opened:ke.current.opened,a=!f&&y;if((v=t==null?void 0:t.current)==null||v.didUpdate(),(p=t==null?void 0:t.current)!=null&&p.getPopupSettings().animate||a&&we(),r&&r.total!==m)(x=t==null?void 0:t.current)==null||x.vs.calcScrollElementHeight(),(I=t==null?void 0:t.current)==null||I.vs.reset();else{const M=k(),ue=A.current.value!==void 0?A.current.value:ke.current.value;let B=u.findIndex(j=>d.areSame(j,M,e));s!==""&&M&&c&&(B=(l=(h=t==null?void 0:t.current)==null?void 0:h.getGroupedDataModernMode(u,s))==null?void 0:l.map(j=>j[c]).indexOf(M[c]));const pe=!d.areSame(ue,M,e);a&&r?(F=t==null?void 0:t.current)==null||F.scrollToVirtualItem(r,B):a&&!r?(we(),u&&u.length!==0&&((K=t==null?void 0:t.current)==null||K.resetGroupStickyHeader(u[0][s],{setState:Z,group:g.group,state:g})),(G=t==null?void 0:t.current)==null||G.scrollToItem(B)):y&&f&&M&&pe&&!V.current?(de=t==null?void 0:t.current)==null||de.scrollToItem(B,(te=t==null?void 0:t.current)==null?void 0:te.vs.enabled):y&&f&&V.current&&(V.current&&r&&r.skip===0?(ce=t==null?void 0:t.current)==null||ce.vs.reset():V.current&&r&&r.skip===r.total-r.pageSize&&((S=t==null?void 0:t.current)==null||S.vs.scrollToEnd()))}V.current=!1,ke.current=g,A.current=n,Te()}),i.useEffect(()=>{var e,r;return X.current=o.canUseDOM&&window.ResizeObserver&&new window.ResizeObserver(ct.bind(void 0)),(e=t==null?void 0:t.current)==null||e.didMount(),Te(),(r=ye())!=null&&r.body&&X.current&&X.current.observe(ye().body),()=>{var s;(s=ye())!=null&&s.body&&X.current&&X.current.disconnect()}},[]);const Ue=ve+"-accessibility-id",be=ve+"-listbox-id",Ge=ve+"-guid",Pt=_e.toLanguageString($.dropDownListArrowBtnAriaLabel,$.messages[$.dropDownListArrowBtnAriaLabel]),{style:se,className:Mt,label:Ee,dir:Nt,virtual:H,adaptive:tn,dataItemKey:Tt,disabled:ae,loading:je,iconClassName:$e,svgIcon:Ot,valueRender:Ye}=n,Fe=n.opened!==void 0?n.opened:g.opened,ie=k(),Pe=d.getItemValue(ie,n.textField),Je=!dt()||Ie().valid,le=t.current,qt=le.vs,ee=b&&b.uDropDownList;qt.enabled=H!==void 0;const Qe=o.useAdaptiveModeContext(),U=!!(Ke&&Qe&&Ke<=Qe.medium&&n.adaptive);H!==void 0&&(le.vs.skip=H.skip,le.vs.total=H.total,le.vs.pageSize=H.pageSize);const zt=d.getFilteredData(n),{focused:Vt}=g,At=zt.findIndex(e=>d.areSame(e,ie,Tt)),Re=i.createElement("span",{id:Ue,className:o.classNames(o.uDropDownList.inputInner({c:ee}))},Pe&&i.createElement("span",{className:o.classNames(o.uDropDownList.inputText({c:ee}))},Pe)),Ht=Ye!==void 0?Ye.call(void 0,Re,ie):Re,Xe=i.createElement(i.Fragment,null,i.createElement("span",{ref:ut,className:o.classNames(o.uDropDownList.wrapper({c:ee,size:O,rounded:Ne,fillMode:fe,focused:Vt,disabled:ae,invalid:!Je,loading:je,required:De()}),Mt),style:Ee?{...se,width:void 0}:se,dir:Nt,onMouseDown:Fe?e=>{e.target.nodeName!=="INPUT"&&(re(t.current.wrapper),e.preventDefault())}:void 0,onFocus:U?e=>xe(e):Lt,onBlur:kt,tabIndex:o.getTabIndex(at,ae),accessKey:n.accessKey,onKeyDown:qe,onKeyPress:Kt,onClick:ae?void 0:xe,role:"combobox","aria-required":De(),"aria-disabled":ae||void 0,"aria-haspopup":"listbox","aria-expanded":Fe||!1,"aria-owns":be,"aria-activedescendant":Fe?"option-"+Ge+"-"+(At+(H?H.skip:0)):void 0,"aria-label":n.ariaLabel||n.label,"aria-labelledby":n.ariaLabelledBy,"aria-describedby":n.ariaDescribedBy||Ue,"aria-controls":be,id:n.id,title:n.title},Ht,je&&i.createElement(o.IconWrap,{className:o.classNames(o.uDropDownList.loadingIcon({c:ee})),name:"loading"}),i.createElement(Yt.Button,{tabIndex:-1,type:"button","aria-label":Pt,size:O,fillMode:fe,className:o.classNames(o.uDropDownList.inputButton({c:ee})),rounded:null,themeColor:"base",iconClass:$e,svgIcon:$e?void 0:Ot||_t.caretAltDownIcon,onMouseDown:e=>g.focused&&e.preventDefault()}),pt(ie),!U&&ht()),U&&Dt());return Ee?i.createElement(Wt.FloatingLabel,{label:Ee,editorValue:Pe,editorValid:Je,editorDisabled:n.disabled,style:{width:se?se.width:void 0},children:Xe}):Xe});me.propTypes={delay:L.number,ignoreCase:L.bool,iconClassName:L.string,svgIcon:o.svgIconPropType,defaultItem:L.any,valueRender:L.func,valueMap:L.func,validationMessage:L.string,required:L.bool,id:L.string,ariaLabelledBy:L.string,ariaDescribedBy:L.string,ariaLabel:L.string,leftRightKeysNavigation:L.bool,title:L.string,groupField:L.string,list:L.any,skipDisabledItems:L.bool};const P={delay:500,tabIndex:0,ignoreCase:!0,...rt.defaultProps,required:!1,size:"medium",rounded:"medium",fillMode:"solid",groupMode:"modern"};me.displayName="KendoReactDropDownList";const ot=o.createPropsContext();me.displayName="KendoReactDropDownList";exports.DropDownList=me;exports.DropDownListPropsContext=ot;exports.dropDownListDefaultProps=P;