@progress/kendo-themes-html
Version:
A collection of HTML helpers used for developing Kendo UI themes
2 lines (1 loc) • 36.4 kB
JavaScript
var a=(...e)=>e.filter(t=>t!==!0&&!!t).map(t=>Array.isArray(t)?a(...t):typeof t=="object"?Object.keys(t).map((o,i)=>t[i]||t[o]&&o||null).filter(o=>o!==null).join(" "):t).filter(t=>!!t).join(" ");var A=(e,t)=>a({[`${e}-xs`]:t.size==="xsmall",[`${e}-sm`]:t.size==="small",[`${e}-md`]:t.size==="medium",[`${e}-lg`]:t.size==="large",[`${e}-xl`]:t.size==="xlarge",[`${e}-xxl`]:t.size==="xxlarge",[`${e}-xxxl`]:t.size==="xxxlarge"},{[`${e}-${t.fillMode}`]:t.fillMode},{[`${e}-${t.themeColor}`]:t.themeColor},{"k-rounded-sm":t.rounded==="small","k-rounded-md":t.rounded==="medium","k-rounded-lg":t.rounded==="large","k-rounded-full":t.rounded==="full","k-rounded-none":t.rounded==="none"}),M=(e,t)=>{let{valid:o,invalid:i,hover:n,focus:r,checked:c,active:d,selected:b,disabled:x,indeterminate:h,loading:L,empty:y,readonly:$,highlighted:H,...v}=t;return a({"k-valid":o,"k-invalid":i,"k-hover":n,"k-focus":r,"k-checked":c,"k-active":d,"k-selected":b,"k-disabled":x,"k-indeterminate":h&&!c,"k-loading":L,"k-empty":y,"k-readonly":$,"k-highlighted":H},Object.keys(v).reduce((E,I)=>(I.startsWith("k-")?E[I]=v[I]:E[`k-${I}`]=v[I],E),{}))};function Gt(e,t){if(!t)return{};let o=Array.isArray(t)?t:[t];return Object.fromEntries(o.map(i=>[`k-${i}`,!0]))}var l={undefined:void 0,xsmall:"xsmall",small:"small",medium:"medium",large:"large",xlarge:"xlarge",xxlarge:"xxlarge",xxxlarge:"xxxlarge"},m={undefined:void 0,none:"none",small:"small",medium:"medium",large:"large",full:"full"},T={undefined:void 0,solid:"solid",flat:"flat",outline:"outline",clear:"clear",link:"link"},X={undefined:void 0,outline:"outline",solid:"solid",duotone:"duotone"},u={undefined:void 0,inherit:"inherit",base:"base",primary:"primary",secondary:"secondary",tertiary:"tertiary",info:"info",success:"success",warning:"warning",error:"error",inverse:"inverse"},s={open:"open",hover:"hover",focus:"focus",active:"active",selected:"selected",disabled:"disabled",valid:"valid",invalid:"invalid",loading:"loading",required:"required",empty:"empty",indeterminate:"indeterminate",checked:"checked",readonly:"readonly",highlighted:"highlighted",generating:"generating",expanded:"expanded"};var Re="input",ze=Re;import{jsx as Qo}from"react/jsx-runtime";var Fe="k-input",Wo=[s.hover,s.focus,s.valid,s.invalid,s.required,s.disabled,s.loading,s.readonly],qo={size:[l.undefined,l.small,l.medium,l.large],rounded:[m.undefined,m.none,m.small,m.medium,m.large,m.full],fillMode:[T.undefined,T.solid,T.flat,T.outline]},Yo={},g=e=>{let{hover:t,focus:o,disabled:i,invalid:n,valid:r,loading:c,readonly:d,size:b,rounded:x,fillMode:h,...L}=e;return Qo("span",{...L,className:a(e.className,Fe,A(Fe,{size:b,rounded:x,fillMode:h}),M(Fe,{hover:t,focus:o,disabled:i,invalid:n,valid:r,loading:c,readonly:d}))})};g.states=Wo;g.options=qo;g.className=Fe;g.defaultOptions=Yo;g.moduleName=Re;g.folderName=ze;import{jsx as ta}from"react/jsx-runtime";var Ue="k-picker",Zo=[s.hover,s.focus,s.valid,s.invalid,s.required,s.disabled,s.loading,s.readonly],jo={size:[l.undefined,l.small,l.medium,l.large],rounded:[m.undefined,m.none,m.small,m.medium,m.large,m.full],fillMode:[T.undefined,T.solid,T.flat,T.outline]},ea={},ue=e=>{let{hover:t,focus:o,disabled:i,invalid:n,valid:r,loading:c,readonly:d,size:b,rounded:x,fillMode:h,...L}=e;return ta("span",{...L,className:a(e.className,Ue,A(Ue,{size:b,rounded:x,fillMode:h}),M(Ue,{hover:t,focus:o,disabled:i,invalid:n,valid:r,loading:c,readonly:d})),children:e.children})};ue.states=Zo;ue.options=jo;ue.className=Ue;ue.defaultOptions=ea;ue.moduleName=Re;ue.folderName=ze;import{Fragment as sa,jsx as $t}from"react/jsx-runtime";var je="k-font-icon",oa=[],aa={size:[l.undefined,l.xsmall,l.small,l.medium,l.large,l.xlarge,l.xxlarge,l.xxxlarge],themeColor:[u.undefined,u.base,u.primary,u.secondary,u.tertiary,u.success,u.warning,u.error,u.info]},na={},Oe=e=>{let{size:t,themeColor:o,icon:i,rotate:n,flip:r,...c}=e;return i?$t("span",{...c,className:a(e.className,je,A(je,{size:t}),{[`k-i-${i}`]:i,[`k-color-${o}`]:o,[`k-rotate-${n}`]:n,"k-flip-h":r==="h"||r==="both","k-flip-v":r==="v"||r==="both"}),"aria-hidden":"true"}):$t(sa,{})};Oe.states=oa;Oe.options=aa;Oe.className=je;Oe.defaultOptions=na;var Xt=Oe;import{Fragment as ra,jsx as Ve}from"react/jsx-runtime";var et="k-svg-icon",ia=[],la={size:[l.undefined,l.xsmall,l.small,l.medium,l.large,l.xlarge,l.xxlarge,l.xxxlarge],themeColor:[u.undefined,u.base,u.primary,u.secondary,u.tertiary,u.success,u.warning,u.error,u.info],variant:[X.outline,X.solid,X.duotone]},tt={viewBox:"0 0 24 24",variant:X.outline},we=e=>{let{size:t,themeColor:o,rotate:i,flip:n,viewBox:r=tt.viewBox,variant:c=tt.variant,icon:d,...b}=e;if(!d)return Ve(ra,{});if(d==="none")return Ve("span",{...b,className:a(e.className,et,A("k-icon",{size:t}),"k-none"),"aria-hidden":"true"});let x=typeof d=="object"&&d.name&&d.name,h=typeof d=="object"?c&&d.variants?.[c]||d.variants?.outline||d.content:void 0;return Ve("span",{...b,className:a(e.className,et,A("k-icon",{size:t}),{[`k-svg-i-${x}`]:x,[`k-color-${o}`]:o,[`k-rotate-${i}`]:i,"k-flip-h":n==="h"||n==="both","k-flip-v":n==="v"||n==="both"}),"aria-hidden":"true",children:Ve("svg",{"aria-hidden":!0,focusable:!1,xmlns:"http://www.w3.org/2000/svg",viewBox:typeof d=="object"?d.viewBox:r,dangerouslySetInnerHTML:h!==void 0?{__html:h}:void 0,children:d?void 0:e.children})})};we.states=ia;we.options=la;we.className=et;we.defaultOptions=tt;var ot=we;import*as at from"@progress/kendo-svg-icons";var Jt="icon",Wt="icons";import{useContext as ca}from"react";import{createContext as da}from"react";var qt=da({iconsType:"svg"});import{Fragment as Yt,jsx as ke}from"react/jsx-runtime";var Ge="k-icon",pa=e=>e.replace(/([-_][a-z0-9])/gi,t=>t.toUpperCase().replace("-","").replace("_","")),ma=[],ua={size:[l.undefined,l.xsmall,l.small,l.medium,l.large,l.xlarge,l.xxlarge,l.xxxlarge],themeColor:[u.undefined,u.base,u.primary,u.secondary,u.tertiary,u.success,u.warning,u.error,u.info],variant:[X.outline,X.solid,X.duotone]},$e={viewBox:"0 0 24 24",type:"svg",variant:X.outline},N=e=>{let{iconsType:t}=ca(qt),{size:o,themeColor:i,icon:n,type:r=t||$e.type,rotate:c,flip:d,viewBox:b=$e.viewBox,variant:x=$e.variant,...h}=e;if(!n)return ke(Yt,{});if((t||r)==="svg"){if(n==="none")return ke(ot,{...h,className:a(e.className,Ge),icon:n,size:o,variant:x});let y=at[n]?n:pa(`${n}-icon`);return at[y]?ke(ot,{...h,className:a(e.className,Ge),icon:at[y],size:o,themeColor:i,rotate:c,flip:d,viewBox:b,variant:x}):ke(Yt,{})}return ke(Xt,{...h,className:a(e.className,Ge),icon:n,size:o,themeColor:i,rotate:c,flip:d})};N.states=ma;N.options=ua;N.defaultOptions=$e;N.className=Ge;N.moduleName=Jt;N.folderName=Wt;N.ariaSpec={selector:".k-icon, .k-svg-icon",rules:[{selector:".k-icon, .k-svg-icon",attribute:"aria-hidden=true",usage:"Hides the icon element and all its children from assistive technologies."}]};import{Fragment as fa,jsx as nt}from"react/jsx-runtime";var Qt="k-clear-value",ba=[s.disabled,s.loading,s.readonly],Ta={},_=e=>{let{disabled:t,loading:o,readonly:i,value:n}=e;return t||i||o||!n?nt(fa,{}):nt("span",{className:a(e.className,Qt),children:nt(N,{icon:"x"})})};_.states=ba;_.options=Ta;_.className=Qt;import{jsx as Na}from"react/jsx-runtime";var st="k-input-inner",xa=[],ha={},Xe={type:"text",autocomplete:"off",value:"",placeholder:""},P=e=>{let{value:t=Xe.value,type:o=Xe.type,placeholder:i=Xe.placeholder,autocomplete:n=Xe.autocomplete,disabled:r,readOnly:c,...d}=e;return Na("input",{...d,type:o,className:a(e.className,st,A(st,e)),placeholder:i,autoComplete:n,defaultValue:t,disabled:r||void 0,readOnly:c||void 0})};P.states=xa;P.options=ha;P.className=st;import{jsx as Zt,jsxs as Sa}from"react/jsx-runtime";var it="k-input-inner",La=[],Aa={},lt=e=>{let{value:t,placeholder:o,showValue:i,valueIcon:n,valueIconName:r,...c}=e;return Sa("span",{...c,className:a(e.className,it,A(it,e)),children:[n,!n&&r&&Zt(N,{className:"k-input-value-icon",icon:r}),i&&!t&&o,i&&t&&Zt("span",{className:"k-input-value-text",children:t})]})};lt.states=La;lt.options=Aa;lt.className=it;import{jsx as Ea}from"react/jsx-runtime";var rt="k-input-inner",ya=[],va={},jt={value:"",placeholder:""},dt=e=>{let{value:t=jt.value,placeholder:o=jt.placeholder,rows:i,disabled:n,...r}=e;return Ea("textarea",{...r,className:a(e.className,rt,A(rt,e)),placeholder:o,rows:i,defaultValue:t,disabled:n||void 0})};dt.states=ya;dt.options=va;dt.className=rt;import{Fragment as ga,jsx as eo}from"react/jsx-runtime";var to="k-input-loading-icon",Ma=[s.disabled,s.loading],J=e=>{let{disabled:t,loading:o}=e;return t||!o?eo(ga,{}):eo("span",{className:a(e.className,to,"k-icon k-i-loading")})};J.states=Ma;J.className=to;import{Fragment as Oa,jsx as oo}from"react/jsx-runtime";var ao="k-input-validation-icon",Ia=[s.valid,s.invalid,s.disabled,s.loading],Ra={},B=e=>{let{valid:t,invalid:o,disabled:i,loading:n}=e,r=o?"warning-circle":"check-circle";return i||n||!!!(t||o)?oo(Oa,{}):oo(N,{className:a(ao),icon:r})};B.states=Ia;B.options=Ra;B.className=ao;import{Fragment as Ca,jsx as no}from"react/jsx-runtime";var wa="k-input-prefix",ka={direction:"horizontal"},be=e=>{let{direction:t=ka.direction,...o}=e;return e.children?no("span",{...o,className:a(wa,e.className,{[`k-input-prefix-${t}`]:t}),children:e.children}):no(Ca,{})};import{Fragment as Ka,jsx as so}from"react/jsx-runtime";var Da="k-input-suffix",Ha={direction:"horizontal"},Te=e=>{let{direction:t=Ha.direction,...o}=e;return e.children?so("span",{...o,className:a(Da,e.className,{[`k-input-suffix-${t}`]:t}),children:e.children}):so(Ka,{})};import{jsx as al}from"react/jsx-runtime";import{jsx as ll}from"react/jsx-runtime";import{jsx as Pa}from"react/jsx-runtime";var io="k-input-separator",_a={direction:"vertical"},j=e=>{let{direction:t=_a.direction,...o}=e;return Pa("span",{...o,className:a(io,e.className,{[`${io}-${t}`]:t})})};var ct="button",lo=ct;import{Fragment as ro,jsx as fe,jsxs as co}from"react/jsx-runtime";var Ce="k-button",Ba=["icon-button"],za=[s.hover,s.focus,s.active,s.selected,s.disabled,s.generating],Fa={size:[l.undefined,l.xsmall,l.small,l.medium,l.large],rounded:[m.undefined,m.none,m.small,m.medium,m.large,m.full],fillMode:[T.undefined,T.solid,T.flat,T.outline,T.clear,T.link],themeColor:[u.undefined,u.base,u.primary,u.secondary,u.tertiary,u.success,u.warning,u.error,u.info,u.inverse]},pt={showArrow:!1,arrowIconName:"chevron-down"},f=e=>{let{as:t="button",size:o,rounded:i,fillMode:n,themeColor:r,showArrow:c=pt.showArrow,arrowIconName:d=pt.arrowIconName,variant:b,hover:x,focus:h,active:L,selected:y,disabled:$,togglable:H,ariaDisabled:v,icon:E,iconSize:I,text:K,iconClassName:me,className:Me,...ge}=e,Ie=E!=null,te=e.children!==void 0;return co(t,{className:a(Me,Ce,Gt(Ce,b),A(Ce,{size:o,rounded:i,fillMode:n,themeColor:r}),M(Ce,{hover:x,focus:h,active:L,disabled:$||v,selected:y}),{"k-icon-button":!K&&!te&&Ie}),"aria-pressed":H?y?"true":"false":void 0,...ge,"aria-disabled":v?"true":void 0,disabled:$||void 0,children:[typeof E=="string"&&E&&fe(N,{className:a(me,"k-button-icon"),icon:E,size:I}),E&&typeof E!="string"&&fe(ro,{children:E}),K?co(ro,{children:[K&&fe("span",{className:"k-button-text",children:K}),e.children]}):e.children&&fe("span",{className:"k-button-text",children:e.children}),c&&fe("span",{className:"k-menu-button-arrow k-button-arrow",children:fe(N,{icon:d})})]})};f.states=za;f.options=Fa;f.variants=Ba;f.className=Ce;f.defaultOptions=pt;f.moduleName=ct;f.folderName=lo;f.ariaSpec={selector:".k-button",rules:[{selector:".k-button",attribute:"role=button or nodeName=button",usage:"The button role is implicit from the native <button> element."},{selector:".k-button",attribute:"aria-label (when icon-only)",usage:"Required for icon-only buttons that have no visible text."},{selector:".k-button",attribute:"aria-pressed (when togglable)",usage:"Indicates the pressed state of a toggle button."},{selector:".k-button",attribute:"disabled (when disabled)",usage:"Rendered when the button is disabled."}]};import{jsx as Ua}from"react/jsx-runtime";var pe=e=>Ua(f,{children:"Button",...e});import{Fragment as po,jsx as W,jsxs as mt}from"react/jsx-runtime";var Va=g.states,Ga=g.defaultOptions,$a=g.options,Xa=[{name:"prefix",title:"Prefix"},{name:"suffix",title:"Suffix"},{name:"clear-button",title:"`Clear` Button"},{name:"validation-icon",title:"Validation Icon"},{name:"separators",title:"Separators"}],Ja=[],xe=e=>{let{modifiers:t,valid:o,invalid:i,loading:n,disabled:r,readonly:c,...d}=e,b=t?.prefix,x=t?.suffix,h=t?.["clear-button"],L=t?.["validation-icon"],y=t?.separators;return mt(g,{...d,valid:o,invalid:i,loading:n,disabled:r,readonly:c,style:{width:300},children:[b&&mt(po,{children:[W(be,{children:W(N,{icon:"lock"})}),y&&W(j,{})]}),W(P,{placeholder:"Placeholder",value:"Value"}),L&&W(B,{valid:o,invalid:i,loading:n,disabled:r}),W(J,{loading:n,disabled:r}),h&&W(_,{loading:n,disabled:r,readonly:c,value:"Value"}),x&&mt(po,{children:[y&&W(j,{}),W(Te,{children:W(pe,{size:d.size,fillMode:"clear",children:"Send"})})]})]})};xe.options=$a;xe.states=Va;xe.variants=Ja;xe.defaultOptions=Ga;xe.modifiers=Xa;xe.className=g.className;import{jsx as Wa}from"react/jsx-runtime";var mo=e=>Wa(f,{icon:"folder",...e,"aria-label":e["aria-label"]||"Folder",children:void 0});import{jsx as qa}from"react/jsx-runtime";var uo=e=>qa(f,{icon:"folder",children:"Button",...e});import{jsx as ut}from"react/jsx-runtime";var Ya=f.options,Qa=f.states,Za={...f.defaultOptions,variant:"text"},ja=[{name:"icon-only",title:"Icon Only"},{name:"icon-and-text",title:"Icon & Text"},{name:"text",title:"Text"}],en=[],he=e=>{let{variant:t,...o}=e;switch(t){case"icon-only":return ut(mo,{...o,icon:"star"});case"icon-and-text":return ut(uo,{...o,icon:"star",children:"Button"});default:return ut(pe,{...o,children:"Button"})}};he.options=Ya;he.states=Qa;he.variants=ja;he.defaultOptions=Za;he.modifiers=en;he.className=f.className;var bt="popup",bo=bt;import{jsx as To}from"react/jsx-runtime";var fo="k-animation-container",tn=[],on={},Tt={positionMode:"absolute",shown:!0},q=e=>{let{positionMode:t=Tt.positionMode,shown:o=Tt.shown,animationStyle:i,offset:n,...r}=e;return To("div",{...r,style:{...n,...e.style},className:a(e.className,fo,{"k-animation-container-shown":o,"k-animation-container-fixed":t==="fixed"}),children:To("div",{className:"k-child-animation-container",style:i,children:e.children})})};q.states=tn;q.options=on;q.className=fo;q.defaultOptions=Tt;q.moduleName=bt;q.folderName=bo;var ft="popup",xo=ft;import{jsx as ho}from"react/jsx-runtime";var No="k-popup",an=[],nn={},Lo={positionMode:"absolute"},ee=e=>{let{offset:t,positionMode:o=Lo.positionMode,animationStyle:i,containerClassName:n,containerRole:r,containerAriaLabel:c,...d}=e;return ho(q,{positionMode:o,offset:t,animationStyle:i,className:n,role:r,"aria-label":c,children:ho("div",{...d,className:a(e.className,No),children:e.children})})};ee.states=an;ee.options=nn;ee.className=No;ee.defaultOptions=Lo;ee.moduleName=ft;ee.folderName=xo;ee.ariaSpec={selector:".k-popup",rules:[{selector:".k-animation-container",attribute:"role (when appended to body)",usage:'Container gets role="region" when appended to document body. Popup is a building block \u2014 ARIA semantics come from consuming components.'}]};var xt="action-buttons",Ao=xt;import{jsx as rn}from"react/jsx-runtime";var Je="k-actions",sn=[],ln={},ht={alignment:"start",orientation:"horizontal"},oe=e=>{let{alignment:t=ht.alignment,orientation:o=ht.orientation,...i}=e;return rn("div",{...i,className:a(Je,{[`${Je}-${t}`]:t,[`${Je}-${o}`]:o},e.className),children:e.children})};oe.states=sn;oe.options=ln;oe.className=Je;oe.defaultOptions=ht;oe.moduleName=xt;oe.folderName=Ao;import{jsx as cn}from"react/jsx-runtime";var dn="k-actionsheet-footer",So={alignment:"stretched",orientation:"horizontal"},Ne=e=>{let{alignment:t=So.alignment,orientation:o=So.orientation,template:i,as:n=i?"div":oe,...r}=e;return cn(n,{...r,...!i&&{alignment:t,orientation:o},className:a(e.className,dn),children:e.children})};var Nt="searchbox",yo=Nt;import{jsx as De,jsxs as un}from"react/jsx-runtime";var vo="k-searchbox",pn=[s.hover,s.focus,s.valid,s.invalid,s.required,s.disabled,s.loading],mn={size:[l.undefined,l.small,l.medium,l.large],rounded:[m.undefined,m.none,m.small,m.medium,m.large,m.full],fillMode:[T.undefined,T.solid,T.flat,T.outline]},Lt={showIcon:!0,icon:"search"},ae=e=>{let{value:t,placeholder:o,size:i,rounded:n,fillMode:r,hover:c,focus:d,valid:b,invalid:x,required:h,loading:L,disabled:y,showIcon:$=Lt.showIcon,icon:H=Lt.icon,"aria-label":v,...E}=e;return un(g,{...E,size:i,rounded:n,fillMode:r,hover:c,focus:d,valid:b,invalid:x,required:h,loading:L,disabled:y,className:a(e.className,vo),children:[$&&De(N,{className:"k-input-icon",icon:H}),De(P,{placeholder:o,value:t,"aria-label":v}),De(J,{...e}),De(B,{...e}),De(_,{...e})]})};ae.states=pn;ae.options=mn;ae.className=vo;ae.defaultOptions=Lt;ae.moduleName=Nt;ae.folderName=yo;import{jsx as Qr}from"react/jsx-runtime";var At="textbox",Eo=At;import{Fragment as Mo,jsx as ne,jsxs as St}from"react/jsx-runtime";var go="k-textbox",bn=[s.hover,s.focus,s.valid,s.invalid,s.required,s.disabled,s.loading,s.readonly],Tn={size:[l.undefined,l.small,l.medium,l.large],rounded:[m.undefined,m.none,m.small,m.medium,m.large,m.full],fillMode:[T.undefined,T.solid,T.flat,T.outline]},We={showClearButton:!0,showValidationIcon:!0,separators:!0},C=e=>{let{size:t,rounded:o,fillMode:i,separators:n=We.separators,showClearButton:r=We.showClearButton,showValidationIcon:c=We.showValidationIcon,prefix:d,suffix:b,type:x,value:h,placeholder:L,hover:y,focus:$,valid:H,invalid:v,required:E,loading:I,disabled:K,readonly:me,id:Me,"aria-label":ge,"aria-describedby":Ie,...te}=e;return St(g,{...te,size:t,rounded:o,fillMode:i,hover:y,focus:$,valid:H,invalid:v,required:E,loading:I,disabled:K,readonly:me,className:a(e.className,go),children:[d&&St(Mo,{children:[ne(be,{children:d}),n&&ne(j,{})]}),ne(P,{id:Me,placeholder:L,value:h,type:x,disabled:K,"aria-label":ge,"aria-describedby":Ie,"aria-invalid":v?"true":void 0}),c&&ne(B,{valid:H,invalid:v,loading:I,disabled:K}),ne(J,{loading:I,disabled:K}),r&&ne(_,{loading:I,disabled:K,readonly:me,value:h}),b&&St(Mo,{children:[n&&ne(j,{}),ne(Te,{children:b})]})]})};C.states=bn;C.options=Tn;C.className=go;C.defaultOptions=We;C.moduleName=At;C.folderName=Eo;C.ariaSpec={selector:".k-textbox",rules:[{selector:".k-textbox > .k-input-inner",attribute:"role=textbox or nodeName=input",usage:"Describes the role of the component."},{selector:".k-textbox > .k-input-inner",attribute:"label for or aria-label or aria-labelledby (when has accessible name)",usage:"The input requires an accessible name (provided by consuming app)."},{selector:".k-textbox > .k-input-inner",attribute:"aria-invalid=true (when invalid)",usage:"Rendered when the TextBox is in an invalid state."},{selector:".k-textbox > .k-input-inner",attribute:"aria-describedby (when has hint or error)",usage:"Points to the hint or error message for the input."},{selector:".k-textbox.k-disabled > .k-input-inner",attribute:"disabled=disabled or aria-disabled=true",usage:"Rendered when the TextBox is disabled."}]};var He=C;import{jsx as fn}from"react/jsx-runtime";var Io=e=>fn(He,{...e});import{Fragment as Td,jsx as bd}from"react/jsx-runtime";import{Fragment as Ad,jsx as Ld}from"react/jsx-runtime";import{jsx as Ed}from"react/jsx-runtime";import{jsx as yt}from"react/jsx-runtime";var xn=C.states,hn=C.defaultOptions,Nn=C.options,Ln=[{name:"prefix",title:"Prefix"},{name:"suffix",title:"Suffix"},{name:"clear-button",title:"`Clear` Button"}],An=[],Le=e=>{let{modifiers:t,...o}=e,i={};return Object.keys(t||{}).forEach(n=>{switch(n){case"prefix":i.prefix=t?.[n]?yt(N,{icon:"lock"}):void 0;break;case"suffix":i.suffix=t?.[n]?yt(pe,{size:o.size,fillMode:"clear",children:"Send"}):void 0;break;case"clear-button":i.showClearButton=t?.[n];break;default:break}}),yt(Io,{value:"Value",style:{width:300},...o,...i})};Le.options=Nn;Le.states=xn;Le.variants=An;Le.defaultOptions=hn;Le.modifiers=Ln;Le.className=C.className;import{jsx as se,jsxs as vt}from"react/jsx-runtime";var Ro="k-actionsheet-titlebar",Sn={},z=e=>{let{title:t,subtitle:o,actionsStart:i,actionsEnd:n,filter:r,input:c,inputValue:d,inputPlaceholder:b,adaptive:x,titleId:h,children:L,...y}=e;return vt("div",{...y,className:a(e.className,Ro),children:[vt("div",{className:"k-actionsheet-titlebar-group",children:[i&&se("div",{className:"k-actionsheet-actions",children:i}),!L&&vt("div",{className:"k-actionsheet-title",id:h,children:[t&&se("div",{className:"k-text-center",children:t}),o&&se("div",{className:"k-actionsheet-subtitle k-text-center",children:o})]}),L&&se("div",{className:"k-actionsheet-title",id:h,children:L}),n&&se("div",{className:"k-actionsheet-actions",children:n})]}),(c||r)&&se("div",{className:"k-actionsheet-titlebar-group k-actionsheet-filter",children:c?se(C,{value:d,placeholder:b,size:x?"large":"medium","aria-label":t||b||"Input"}):se(ae,{placeholder:"Filter",size:x?"large":"medium","aria-label":"Filter options"})})]})};z.className=Ro;z.defaultOptions=Sn;import{jsx as Et,jsxs as Mn}from"react/jsx-runtime";var Mt="k-actionsheet-view",yn=[],vn={},En={},Ae=e=>{let{adaptive:t,animated:o,children:i,header:n,footer:r,titleId:c,...d}=e,b=n?.type===z&&Et(z,{adaptive:t,titleId:c,...n?.props}),x=r?.type===Ne&&Et(Ne,{...r?.props});return Mn("div",{...d,className:a(e.className,Mt,{[`${Mt}-animated`]:o}),children:[b,Et("div",{className:"k-actionsheet-content",children:i}),x]})};Ae.states=yn;Ae.options=vn;Ae.className=Mt;Ae.defaultOptions=En;var Ke="action-sheet",qe=Ke;var gt="overlay",Oo=gt;import{jsx as On}from"react/jsx-runtime";var wo="k-overlay",gn=[],In={},Rn={},ie=e=>{let{...t}=e;return On("div",{...t,className:a(e.className,wo),children:e.children})};ie.states=gn;ie.options=In;ie.className=wo;ie.defaultOptions=Rn;ie.moduleName=gt;ie.folderName=Oo;import{jsx as Ye,jsxs as Cn}from"react/jsx-runtime";var ko="k-actionsheet",wn=[],kn={},_e={side:"bottom",fullscreen:!1,adaptive:!1,overlay:!0},R=e=>{let{side:t=_e.side,fullscreen:o=_e.fullscreen,adaptive:i=_e.adaptive,overlay:n=_e.overlay,template:r,children:c,header:d,footer:b,id:x,...h}=e,L=x&&!r&&d?`${x}-title`:void 0;return Cn("div",{className:"k-actionsheet-container",children:[n&&Ye(ie,{}),Ye(q,{animationStyle:{[`${o===!0?"top":t}`]:0,[`${o===!0?"width":null}`]:"100%",[`${o===!0?"height":null}`]:"100%",[`${t==="top"||t==="bottom"?"width":null}`]:"100%",[`${t==="left"||t==="right"?"height":null}`]:"100%"},children:Ye("div",{...h,id:x,role:"dialog","aria-modal":n?"true":void 0,"aria-labelledby":L,className:a(e.className,ko,{[`k-actionsheet-${t}`]:o===!1,"k-actionsheet-fullscreen":o===!0,"k-adaptive-actionsheet":i}),children:r||Ye(Ae,{header:d,footer:b,adaptive:i,titleId:L,...e,children:c})})})]})};R.states=wn;R.options=kn;R.className=ko;R.defaultOptions=_e;R.moduleName=Ke;R.folderName=qe;R.ariaSpec={selector:".k-actionsheet",rules:[{selector:".k-actionsheet",attribute:"role=dialog",usage:"Announces the dialog role of the component."},{selector:".k-actionsheet",attribute:"aria-labelledby (when has title)",usage:"Associates the title of the action sheet."},{selector:".k-actionsheet",attribute:"aria-hidden=true/false (when hidden)",usage:"Announces the hidden state of the ActionSheet container."},{selector:".k-actionsheet",attribute:"aria-modal=true (when modal)",usage:"Announces that the action sheet is modal."},{selector:".k-actionsheet .k-actionsheet-title",attribute:"id",usage:"Used to associate the title with the action sheet wrapper element."}]};import{jsx as _n}from"react/jsx-runtime";var Co="k-actionsheet-container",Dn=[],Hn={},Kn={},Se=e=>{let{children:t,...o}=e;return _n("div",{...o,className:Co,children:t})};Se.states=Dn;Se.options=Hn;Se.className=Co;Se.defaultOptions=Kn;Se.moduleName=Ke;Se.folderName=qe;import{jsx as Pn}from"react/jsx-runtime";var It=e=>{let{...t}=e;return Pn("div",{...t,className:a(e.className,"k-list-ul"),children:e.children})};import{Fragment as zn,jsx as Pe,jsxs as Rt}from"react/jsx-runtime";var Ot="k-actionsheet-item",Bn=[s.hover,s.focus,s.selected,s.disabled],le=e=>{let{iconName:t,text:o,description:i,hover:n,focus:r,selected:c,disabled:d,...b}=e;return Rt("span",{...b,className:a(e.className,Ot,M(Ot,{hover:n,focus:r,selected:c,disabled:d})),children:[!e.children&&Pe(zn,{children:Rt("span",{className:"k-actionsheet-action",children:[t&&Pe("span",{className:"k-icon-wrap",children:Pe(N,{className:"k-actionsheet-item-icon",icon:t})}),Rt("span",{className:"k-actionsheet-item-text",children:[o&&Pe("span",{className:"k-actionsheet-item-title",children:o}),i&&Pe("span",{className:"k-actionsheet-item-description",children:i})]})]})}),e.children]})};le.states=Bn;le.className=Ot;import{jsx as vc,jsxs as Ec}from"react/jsx-runtime";import{jsx as Rc}from"react/jsx-runtime";import{jsx as Cc}from"react/jsx-runtime";import{jsx as _c}from"react/jsx-runtime";import{jsx as O,jsxs as wt}from"react/jsx-runtime";var Fn=R.options,Un=R.states,Ho={...R.defaultOptions,variant:"normal"},Vn=[{name:"normal",title:"Normal"},{name:"adaptive",title:"Adaptive"},{name:"fullScreen",title:"Full Screen"}],Gn=[{name:"actions",title:"Titlebar Actions",type:"boolean"},{name:"subtitle",title:"Subtitle",type:"boolean"},{name:"footer",title:"Footer",type:"boolean"}],ye=e=>{let{variant:t,modifiers:o,...i}={...Ho,...e},n={},r=wt(It,{children:[O(le,{text:"Edit Item",description:"Click to edit",iconName:"edit-tools"}),O(le,{text:"Add to Favorites",iconName:"heart"}),O(le,{text:"Upload New",iconName:"upload",disabled:!0}),O("hr",{className:"k-hr"}),O(le,{text:"Cancel",iconName:"cancel"})]}),c="Choose from the items below",d="Select Item";return t==="fullScreen"&&(n.fullScreen=!0),Object.keys(o||{}).forEach(b=>{switch(b){case"actions":n.actionsStart=!!o?.[b],n.actionsEnd=!!o?.[b];break;case"subtitle":n.subtitle=o?.[b]?c:void 0;break;case"footer":n.footer=!!o?.[b];break;default:break}}),t==="adaptive"?O(R,{...i,adaptive:!0,fullscreen:n.fullScreen,header:O(z,{actionsStart:n.actionsStart?O(f,{icon:"chevron-left",size:"large",fillMode:"flat"}):void 0,actionsEnd:n.actionsEnd?O(f,{icon:"x",size:"large",fillMode:"flat"}):void 0,title:d,subtitle:n.subtitle}),footer:n.footer?wt(Ne,{alignment:"stretched",children:[O(f,{text:"Cancel",size:"large",themeColor:"base"}),O(f,{text:"Apply",size:"large",themeColor:"primary"})]}):void 0,children:r}):O(R,{...i,fullscreen:n.fullScreen,header:O(z,{actionsStart:n.actionsStart?O(f,{icon:"chevron-left",fillMode:"flat"}):void 0,actionsEnd:n.actionsEnd?O(f,{icon:"x",fillMode:"flat"}):void 0,title:"Select Item",subtitle:n.subtitle}),footer:n.footer?wt(Ne,{alignment:"stretched",children:[O(f,{text:"Apply",themeColor:"primary"}),O(f,{text:"Cancel",themeColor:"base"})]}):void 0,children:r})};ye.options=Fn;ye.states=Un;ye.variants=Vn;ye.defaultOptions=Ho;ye.modifiers=Gn;ye.className=R.className;var w="table",k=w;import{jsx as Wn}from"react/jsx-runtime";var Ko="k-data-table",$n=[],Xn={size:[l.undefined,l.small,l.medium,l.large]},Jn={},F=e=>{let{size:t,...o}=e;return Wn("div",{...o,className:a(e.className,Ko,A("k-table",{size:t})),children:e.children})};F.states=$n;F.options=Xn;F.className=Ko;F.defaultOptions=Jn;F.moduleName=w;F.folderName=k;import{jsx as Zn}from"react/jsx-runtime";var kt="k-table-header-wrap",qn=[s.hover,s.focus,s.disabled],Yn={},Qn={},re=e=>{let{children:t,hover:o,focus:i,disabled:n,...r}=e;return Zn("div",{...r,className:a(e.className,kt,M(kt,{hover:o,focus:i,disabled:n})),children:t})};re.states=qn;re.options=Yn;re.className=kt;re.defaultOptions=Qn;re.moduleName=w;re.folderName=k;import{jsx as os}from"react/jsx-runtime";var Ct="k-table",jn=[],es={size:[l.undefined,l.small,l.medium,l.large]},ts={},Y=e=>{let{size:t,...o}=e;return os("table",{...o,className:a(e.className,Ct,A(Ct,{size:t})),children:e.children})};Y.states=jn;Y.options=es;Y.className=Ct;Y.defaultOptions=ts;Y.moduleName=w;Y.folderName=k;import{jsx as Dt}from"react/jsx-runtime";var Ht="k-table-header",as=[s.hover,s.focus,s.disabled],ns={},ss={},U=e=>{let{children:t,hover:o,focus:i,disabled:n,...r}=e;return Dt("div",{...r,className:a(e.className,Ht,M(Ht,{hover:o,focus:i,disabled:n})),children:Dt(re,{children:Dt(Y,{children:t})})})};U.states=as;U.options=ns;U.className=Ht;U.defaultOptions=ss;U.moduleName=w;U.folderName=k;import{jsx as ds}from"react/jsx-runtime";var _o="k-table-scroller",is=[],ls={},rs={},ve=e=>{let{children:t,...o}=e;return ds("div",{...o,className:a(e.className,_o),children:t})};ve.states=is;ve.options=ls;ve.className=_o;ve.defaultOptions=rs;ve.moduleName=w;ve.folderName=k;import{jsx as ps}from"react/jsx-runtime";var cs="k-table-body",Be=e=>ps("div",{className:a(e.className,cs,"k-table-scroller"),children:e.children});import{jsx as Ts}from"react/jsx-runtime";var Po="k-table-footer",ms=[],us={},bs={},Q=e=>{let{children:t,...o}=e;return Ts("div",{...o,className:a(e.className,Po),children:t})};Q.states=ms;Q.options=us;Q.className=Po;Q.defaultOptions=bs;Q.moduleName=w;Q.folderName=k;import{jsx as Ns}from"react/jsx-runtime";var Kt="k-table-list",fs=[],xs={size:[l.undefined,l.small,l.medium,l.large]},hs={},Z=e=>{let{size:t,virtualization:o,...i}=e;return Ns("ul",{...i,className:a(e.className,"k-table",Kt,A(Kt,{size:t}),{"k-virtual-table":o}),children:e.children})};Z.states=fs;Z.options=xs;Z.className=Kt;Z.defaultOptions=hs;Z.moduleName=w;Z.folderName=k;import{jsx as As}from"react/jsx-runtime";var Ls="k-table-thead",Ee=e=>As("thead",{className:a(e.className,Ls),children:e.children});import{jsx as Xp}from"react/jsx-runtime";import{jsx as Yp}from"react/jsx-runtime";import{jsx as ys}from"react/jsx-runtime";var _t="k-table-row",Ss=[s.hover,s.focus,s.selected,s.disabled,s.highlighted],de=e=>{let{hover:t,focus:o,selected:i,highlighted:n,disabled:r,alt:c,...d}=e;return ys("tr",{...d,className:a(e.className,_t,{"k-table-alt-row":c},M(_t,{hover:t,focus:o,disabled:r,selected:i,highlighted:n})),children:e.children})};de.states=Ss;de.className=_t;import{jsx as Es}from"react/jsx-runtime";var Pt="k-table-row",vs=[s.hover,s.focus,s.selected,s.disabled],V=e=>{let{hover:t,focus:o,selected:i,disabled:n,alt:r,...c}=e;return Es("li",{...c,className:a(e.className,Pt,{"k-table-alt-row":r},M(Pt,{hover:t,focus:o,disabled:n,selected:i})),children:e.children})};V.states=vs;V.className=Pt;import{jsx as Ms}from"react/jsx-runtime";var Bo="k-table-th",G=e=>{let{text:t,colspan:o,rowspan:i,...n}=e,r=t||e.children;return Ms("th",{colSpan:o,rowSpan:i,...n,className:a(e.className,Bo),children:r})};G.className=Bo;G.moduleName=w;G.folderName=k;import{jsx as Is}from"react/jsx-runtime";var gs="k-table-th",Qe=e=>{let{text:t,...o}=e,i=t||e.children;return Is("span",{...o,className:a(e.className,gs),children:i})};import{jsx as Os}from"react/jsx-runtime";var Bt="k-table-td",Rs=[s.focus,s.selected,s.highlighted],Ze=e=>{let{focus:t,selected:o,highlighted:i,text:n,colspan:r,rowspan:c,...d}=e,b=n||e.children;return Os("td",{colSpan:r,rowSpan:c,...d,className:a(e.className,Bt,M(Bt,{focus:t,selected:o,highlighted:i})),children:b})};Ze.states=Rs;Ze.className=Bt;import{jsx as ks}from"react/jsx-runtime";var ws="k-table-td",S=e=>{let{text:t,...o}=e,i=t||e.children;return ks("span",{...o,className:a(e.className,ws),children:i})};import{jsx as Nm}from"react/jsx-runtime";import{jsx as Ds}from"react/jsx-runtime";var Cs="k-table-group-sticky-header",zt=e=>Ds("div",{className:a(e.className,Cs),children:e.children});import{jsx as Mm}from"react/jsx-runtime";import{jsx as Ks}from"react/jsx-runtime";var Hs="k-table-group-row",Ft=e=>{let{className:t,children:o,...i}=e;return Ks("li",{...i,className:a(t,Hs),children:o})};import{jsx as Cm,jsxs as Dm}from"react/jsx-runtime";import{jsx as Pm,jsxs as Bm}from"react/jsx-runtime";import{jsx as Vm,jsxs as Gm}from"react/jsx-runtime";import{Fragment as Ym,jsx as Wm,jsxs as qm}from"react/jsx-runtime";var zo="dropdown-grid",Fo="dropdowngrid";import{Fragment as Ut,jsx as p,jsxs as D}from"react/jsx-runtime";var Uo="k-dropdowngrid",zs=[s.hover,s.focus,s.valid,s.invalid,s.required,s.disabled,s.loading,s.readonly],Fs={size:[l.undefined,l.small,l.medium,l.large],rounded:[m.undefined,m.none,m.small,m.medium,m.large,m.full],fillMode:[T.undefined,T.solid,T.flat,T.outline]},Vo={separators:!0},ce=e=>{let{size:t,rounded:o,fillMode:i,separators:n=Vo.separators,prefix:r,suffix:c,value:d,placeholder:b,hover:x,focus:h,valid:L,invalid:y,required:$,loading:H,disabled:v,popup:E,opened:I,readonly:K,adaptive:me,adaptiveSettings:Me,adaptiveTitle:ge,adaptiveSubtitle:Ie,id:te,ariaAutocomplete:Go,activeDescendant:Vt,"aria-label":$o,...Xo}=e,Jo=te?`${te}-table-list`:void 0;return D(Ut,{children:[D(g,{...Xo,size:t,rounded:o,fillMode:i,hover:x,focus:h,valid:L,invalid:y,required:$,loading:H,disabled:v,readonly:K,className:a(e.className,Uo,"k-combobox"),children:[r&&D(Ut,{children:[p(be,{children:r}),n&&p(j,{})]}),p(P,{placeholder:b,value:d,role:"combobox","aria-haspopup":"listbox","aria-expanded":I?"true":"false","aria-controls":I?Jo:void 0,"aria-activedescendant":I&&Vt?Vt:void 0,"aria-autocomplete":Go,"aria-invalid":y?"true":void 0,"aria-busy":H?"true":void 0,"aria-label":$o,disabled:v,readOnly:K}),p(B,{valid:L,invalid:y,loading:H,disabled:v}),p(J,{loading:H,disabled:v}),p(_,{loading:H,disabled:v,readonly:K,value:d}),c&&D(Ut,{children:[n&&p(j,{}),p(Te,{children:c})]}),p(f,{className:"k-input-button",icon:"chevron-down",size:t,fillMode:i,"aria-label":"Open popup",tabIndex:-1,disabled:v})]}),I&&E&&p(ee,{className:"k-dropdowngrid-popup",children:E}),me&&p(R,{adaptive:!0,...Me,header:p(z,{actionsEnd:p(f,{icon:"check",themeColor:"primary",size:"large",fillMode:"flat","aria-label":"Apply selection"}),input:!0,inputValue:d,inputPlaceholder:b,title:ge,subtitle:Ie}),children:p("div",{className:"k-list-container",children:D(F,{size:"large",children:[D(U,{children:[D("colgroup",{children:[p("col",{style:{width:"50px"}}),p("col",{style:{width:"160px"}}),p("col",{})]}),p(Ee,{children:D(de,{children:[p(G,{text:"ID"}),p(G,{text:"Name"}),p(G,{text:"Job Title"})]})})]}),p(zt,{children:p(Qe,{text:"Initial group"})}),p(Be,{children:D(Z,{role:"listbox",id:te?`${te}-table-list`:void 0,"aria-label":"Options",children:[D(V,{role:"option",children:[p(S,{text:"1",style:{width:"50px"}}),p(S,{text:"Data 1.2",style:{width:"160px"}}),p(S,{text:"Data 1.3"})]}),D(V,{role:"option",alt:!0,children:[p(S,{text:"2",style:{width:"50px"}}),p(S,{text:"Data 2.2 (alt)",style:{width:"160px"}}),p(S,{text:"Data 2.3"})]}),D(V,{role:"option",children:[p(S,{text:"3",style:{width:"50px"}}),p(S,{text:"Data 3.2",style:{width:"160px"}}),p(S,{text:"Data 3.3"})]}),p(Ft,{role:"presentation",children:p(Qe,{text:"Group"})}),D(V,{role:"option",children:[p(S,{text:"4",style:{width:"50px"}}),p(S,{text:"Data 4.2",style:{width:"160px"}}),p(S,{text:"Data 4.3"})]}),D(V,{role:"option",alt:!0,children:[p(S,{text:"5",style:{width:"50px"}}),p(S,{text:"Data 5.2 (alt)",style:{width:"160px"}}),p(S,{text:"Data 5.3"})]}),D(V,{role:"option",children:[p(S,{text:"6",style:{width:"50px"}}),p(S,{text:"Data 6.2",style:{width:"160px"}}),p(S,{text:"Data 6.3"})]})]})}),p(Q,{children:p(S,{text:"30 records in total"})})]})})})]})};ce.states=zs;ce.options=Fs;ce.className=Uo;ce.defaultOptions=Vo;ce.moduleName=zo;ce.folderName=Fo;ce.ariaSpec={rules:[{selector:".k-combobox .k-input-inner",attribute:"role=combobox",usage:"Identifies the input as a combobox."},{selector:".k-combobox .k-input-inner",attribute:"aria-haspopup=listbox",usage:"Indicates the combobox has a listbox popup."},{selector:".k-combobox .k-input-inner",attribute:"aria-expanded",usage:"Indicates whether the popup is open."},{selector:".k-combobox .k-input-inner",attribute:"aria-label",usage:"Accessible name for the combobox."},{selector:".k-combobox .k-input-button",attribute:"aria-label",usage:"Accessible name for the dropdown button."},{selector:".k-combobox .k-input-button",attribute:"tabindex=-1",usage:"Dropdown button is not in the tab order."},{selector:".k-dropdowngrid-popup .k-table-list",attribute:"role=listbox",usage:"Table list has listbox role."},{selector:'.k-dropdowngrid-popup .k-table-list[role="listbox"]',attribute:"aria-label or aria-labelledby",usage:"Table listbox must have an accessible name. Consuming code is responsible for associating with the component label via aria-labelledby."},{selector:".k-dropdowngrid-popup .k-table-list .k-table-row",attribute:"role=option",usage:"Each table row is an option."}]};var Cu=ce;export{Uo as DROPDOWNGRID_CLASSNAME,ce as DropdownGrid,Cu as default};