UNPKG

@progress/kendo-themes-html

Version:

A collection of HTML helpers used for developing Kendo UI themes

2 lines (1 loc) 36.5 kB
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 $t(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 je={};function Xt(e){return je[e]=(je[e]||0)+1,`k-${e}-${je[e]}`}var Re="input",ze=Re;import{jsx as ea}from"react/jsx-runtime";var Fe="k-input",Qo=[s.hover,s.focus,s.valid,s.invalid,s.required,s.disabled,s.loading,s.readonly],Zo={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]},jo={},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 ea("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=Qo;g.options=Zo;g.className=Fe;g.defaultOptions=jo;g.moduleName=Re;g.folderName=ze;import{jsx as na}from"react/jsx-runtime";var Ue="k-picker",ta=[s.hover,s.focus,s.valid,s.invalid,s.required,s.disabled,s.loading,s.readonly],oa={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]},aa={},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 na("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=ta;ue.options=oa;ue.className=Ue;ue.defaultOptions=aa;ue.moduleName=Re;ue.folderName=ze;import{Fragment as ra,jsx as Jt}from"react/jsx-runtime";var et="k-font-icon",sa=[],ia={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]},la={},Oe=e=>{let{size:t,themeColor:o,icon:i,rotate:n,flip:r,...c}=e;return i?Jt("span",{...c,className:a(e.className,et,A(et,{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"}):Jt(ra,{})};Oe.states=sa;Oe.options=ia;Oe.className=et;Oe.defaultOptions=la;var Wt=Oe;import{Fragment as pa,jsx as Ve}from"react/jsx-runtime";var tt="k-svg-icon",da=[],ca={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]},ot={viewBox:"0 0 24 24",variant:X.outline},we=e=>{let{size:t,themeColor:o,rotate:i,flip:n,viewBox:r=ot.viewBox,variant:c=ot.variant,icon:d,...b}=e;if(!d)return Ve(pa,{});if(d==="none")return Ve("span",{...b,className:a(e.className,tt,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,tt,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=da;we.options=ca;we.className=tt;we.defaultOptions=ot;var at=we;import*as nt from"@progress/kendo-svg-icons";var qt="icon",Yt="icons";import{useContext as ua}from"react";import{createContext as ma}from"react";var Qt=ma({iconsType:"svg"});import{Fragment as Zt,jsx as ke}from"react/jsx-runtime";var Ge="k-icon",ba=e=>e.replace(/([-_][a-z0-9])/gi,t=>t.toUpperCase().replace("-","").replace("_","")),Ta=[],fa={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}=ua(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(Zt,{});if((t||r)==="svg"){if(n==="none")return ke(at,{...h,className:a(e.className,Ge),icon:n,size:o,variant:x});let y=nt[n]?n:ba(`${n}-icon`);return nt[y]?ke(at,{...h,className:a(e.className,Ge),icon:nt[y],size:o,themeColor:i,rotate:c,flip:d,viewBox:b,variant:x}):ke(Zt,{})}return ke(Wt,{...h,className:a(e.className,Ge),icon:n,size:o,themeColor:i,rotate:c,flip:d})};N.states=Ta;N.options=fa;N.defaultOptions=$e;N.className=Ge;N.moduleName=qt;N.folderName=Yt;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 Na,jsx as st}from"react/jsx-runtime";var jt="k-clear-value",xa=[s.disabled,s.loading,s.readonly],ha={},_=e=>{let{disabled:t,loading:o,readonly:i,value:n}=e;return t||i||o||!n?st(Na,{}):st("span",{className:a(e.className,jt),children:st(N,{icon:"x"})})};_.states=xa;_.options=ha;_.className=jt;import{jsx as Sa}from"react/jsx-runtime";var it="k-input-inner",La=[],Aa={},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 Sa("input",{...d,type:o,className:a(e.className,it,A(it,e)),placeholder:i,autoComplete:n,defaultValue:t,disabled:r||void 0,readOnly:c||void 0})};P.states=La;P.options=Aa;P.className=it;import{jsx as eo,jsxs as Ea}from"react/jsx-runtime";var lt="k-input-inner",ya=[],va={},rt=e=>{let{value:t,placeholder:o,showValue:i,valueIcon:n,valueIconName:r,...c}=e;return Ea("span",{...c,className:a(e.className,lt,A(lt,e)),children:[n,!n&&r&&eo(N,{className:"k-input-value-icon",icon:r}),i&&!t&&o,i&&t&&eo("span",{className:"k-input-value-text",children:t})]})};rt.states=ya;rt.options=va;rt.className=lt;import{jsx as Ia}from"react/jsx-runtime";var dt="k-input-inner",Ma=[],ga={},to={value:"",placeholder:""},ct=e=>{let{value:t=to.value,placeholder:o=to.placeholder,rows:i,disabled:n,...r}=e;return Ia("textarea",{...r,className:a(e.className,dt,A(dt,e)),placeholder:o,rows:i,defaultValue:t,disabled:n||void 0})};ct.states=Ma;ct.options=ga;ct.className=dt;import{Fragment as Oa,jsx as oo}from"react/jsx-runtime";var ao="k-input-loading-icon",Ra=[s.disabled,s.loading],J=e=>{let{disabled:t,loading:o}=e;return t||!o?oo(Oa,{}):oo("span",{className:a(e.className,ao,"k-icon k-i-loading")})};J.states=Ra;J.className=ao;import{Fragment as Da,jsx as no}from"react/jsx-runtime";var so="k-input-validation-icon",wa=[s.valid,s.invalid,s.disabled,s.loading],ka={},B=e=>{let{valid:t,invalid:o,disabled:i,loading:n}=e,r=o?"warning-circle":"check-circle";return i||n||!!!(t||o)?no(Da,{}):no(N,{className:a(so),icon:r})};B.states=wa;B.options=ka;B.className=so;import{Fragment as Ka,jsx as io}from"react/jsx-runtime";var Ca="k-input-prefix",Ha={direction:"horizontal"},be=e=>{let{direction:t=Ha.direction,...o}=e;return e.children?io("span",{...o,className:a(Ca,e.className,{[`k-input-prefix-${t}`]:t}),children:e.children}):io(Ka,{})};import{Fragment as Ba,jsx as lo}from"react/jsx-runtime";var _a="k-input-suffix",Pa={direction:"horizontal"},Te=e=>{let{direction:t=Pa.direction,...o}=e;return e.children?lo("span",{...o,className:a(_a,e.className,{[`k-input-suffix-${t}`]:t}),children:e.children}):lo(Ba,{})};import{jsx as ll}from"react/jsx-runtime";import{jsx as pl}from"react/jsx-runtime";import{jsx as Fa}from"react/jsx-runtime";var ro="k-input-separator",za={direction:"vertical"},j=e=>{let{direction:t=za.direction,...o}=e;return Fa("span",{...o,className:a(ro,e.className,{[`${ro}-${t}`]:t})})};var pt="button",co=pt;import{Fragment as po,jsx as fe,jsxs as mo}from"react/jsx-runtime";var De="k-button",Ua=["icon-button"],Va=[s.hover,s.focus,s.active,s.selected,s.disabled,s.generating],Ga={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]},mt={showArrow:!1,arrowIconName:"chevron-down"},f=e=>{let{as:t="button",size:o,rounded:i,fillMode:n,themeColor:r,showArrow:c=mt.showArrow,arrowIconName:d=mt.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 mo(t,{className:a(Me,De,$t(De,b),A(De,{size:o,rounded:i,fillMode:n,themeColor:r}),M(De,{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(po,{children:E}),K?mo(po,{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=Va;f.options=Ga;f.variants=Ua;f.className=De;f.defaultOptions=mt;f.moduleName=pt;f.folderName=co;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 $a}from"react/jsx-runtime";var pe=e=>$a(f,{children:"Button",...e});import{Fragment as uo,jsx as W,jsxs as ut}from"react/jsx-runtime";var Xa=g.states,Ja=g.defaultOptions,Wa=g.options,qa=[{name:"prefix",title:"Prefix"},{name:"suffix",title:"Suffix"},{name:"clear-button",title:"`Clear` Button"},{name:"validation-icon",title:"Validation Icon"},{name:"separators",title:"Separators"}],Ya=[],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 ut(g,{...d,valid:o,invalid:i,loading:n,disabled:r,readonly:c,style:{width:300},children:[b&&ut(uo,{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&&ut(uo,{children:[y&&W(j,{}),W(Te,{children:W(pe,{size:d.size,fillMode:"clear",children:"Send"})})]})]})};xe.options=Wa;xe.states=Xa;xe.variants=Ya;xe.defaultOptions=Ja;xe.modifiers=qa;xe.className=g.className;import{jsx as Qa}from"react/jsx-runtime";var bo=e=>Qa(f,{icon:"folder",...e,"aria-label":e["aria-label"]||"Folder",children:void 0});import{jsx as Za}from"react/jsx-runtime";var To=e=>Za(f,{icon:"folder",children:"Button",...e});import{jsx as bt}from"react/jsx-runtime";var ja=f.options,en=f.states,tn={...f.defaultOptions,variant:"text"},on=[{name:"icon-only",title:"Icon Only"},{name:"icon-and-text",title:"Icon & Text"},{name:"text",title:"Text"}],an=[],he=e=>{let{variant:t,...o}=e;switch(t){case"icon-only":return bt(bo,{...o,icon:"star"});case"icon-and-text":return bt(To,{...o,icon:"star",children:"Button"});default:return bt(pe,{...o,children:"Button"})}};he.options=ja;he.states=en;he.variants=on;he.defaultOptions=tn;he.modifiers=an;he.className=f.className;var Tt="popup",fo=Tt;import{jsx as xo}from"react/jsx-runtime";var ho="k-animation-container",nn=[],sn={},ft={positionMode:"absolute",shown:!0},q=e=>{let{positionMode:t=ft.positionMode,shown:o=ft.shown,animationStyle:i,offset:n,...r}=e;return xo("div",{...r,style:{...n,...e.style},className:a(e.className,ho,{"k-animation-container-shown":o,"k-animation-container-fixed":t==="fixed"}),children:xo("div",{className:"k-child-animation-container",style:i,children:e.children})})};q.states=nn;q.options=sn;q.className=ho;q.defaultOptions=ft;q.moduleName=Tt;q.folderName=fo;var xt="popup",No=xt;import{jsx as Lo}from"react/jsx-runtime";var Ao="k-popup",ln=[],rn={},So={positionMode:"absolute"},ee=e=>{let{offset:t,positionMode:o=So.positionMode,animationStyle:i,containerClassName:n,containerRole:r,containerAriaLabel:c,...d}=e;return Lo(q,{positionMode:o,offset:t,animationStyle:i,className:n,role:r,"aria-label":c,children:Lo("div",{...d,className:a(e.className,Ao),children:e.children})})};ee.states=ln;ee.options=rn;ee.className=Ao;ee.defaultOptions=So;ee.moduleName=xt;ee.folderName=No;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 ht="action-buttons",yo=ht;import{jsx as pn}from"react/jsx-runtime";var Je="k-actions",dn=[],cn={},Nt={alignment:"start",orientation:"horizontal"},oe=e=>{let{alignment:t=Nt.alignment,orientation:o=Nt.orientation,...i}=e;return pn("div",{...i,className:a(Je,{[`${Je}-${t}`]:t,[`${Je}-${o}`]:o},e.className),children:e.children})};oe.states=dn;oe.options=cn;oe.className=Je;oe.defaultOptions=Nt;oe.moduleName=ht;oe.folderName=yo;import{jsx as un}from"react/jsx-runtime";var mn="k-actionsheet-footer",vo={alignment:"stretched",orientation:"horizontal"},Ne=e=>{let{alignment:t=vo.alignment,orientation:o=vo.orientation,template:i,as:n=i?"div":oe,...r}=e;return un(n,{...r,...!i&&{alignment:t,orientation:o},className:a(e.className,mn),children:e.children})};var Lt="searchbox",Eo=Lt;import{jsx as Ce,jsxs as fn}from"react/jsx-runtime";var Mo="k-searchbox",bn=[s.hover,s.focus,s.valid,s.invalid,s.required,s.disabled,s.loading],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]},At={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:$=At.showIcon,icon:H=At.icon,"aria-label":v,...E}=e;return fn(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,Mo),children:[$&&Ce(N,{className:"k-input-icon",icon:H}),Ce(P,{placeholder:o,value:t,"aria-label":v}),Ce(J,{...e}),Ce(B,{...e}),Ce(_,{...e})]})};ae.states=bn;ae.options=Tn;ae.className=Mo;ae.defaultOptions=At;ae.moduleName=Lt;ae.folderName=Eo;import{jsx as td}from"react/jsx-runtime";var St="textbox",go=St;import{Fragment as Io,jsx as ne,jsxs as yt}from"react/jsx-runtime";var Ro="k-textbox",xn=[s.hover,s.focus,s.valid,s.invalid,s.required,s.disabled,s.loading,s.readonly],hn={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},D=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 yt(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,Ro),children:[d&&yt(Io,{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&&yt(Io,{children:[n&&ne(j,{}),ne(Te,{children:b})]})]})};D.states=xn;D.options=hn;D.className=Ro;D.defaultOptions=We;D.moduleName=St;D.folderName=go;D.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=D;import{jsx as Nn}from"react/jsx-runtime";var Oo=e=>Nn(He,{...e});import{Fragment as Nd,jsx as hd}from"react/jsx-runtime";import{Fragment as Ed,jsx as vd}from"react/jsx-runtime";import{jsx as Rd}from"react/jsx-runtime";import{jsx as vt}from"react/jsx-runtime";var Ln=D.states,An=D.defaultOptions,Sn=D.options,yn=[{name:"prefix",title:"Prefix"},{name:"suffix",title:"Suffix"},{name:"clear-button",title:"`Clear` Button"}],vn=[],Le=e=>{let{modifiers:t,...o}=e,i={};return Object.keys(t||{}).forEach(n=>{switch(n){case"prefix":i.prefix=t?.[n]?vt(N,{icon:"lock"}):void 0;break;case"suffix":i.suffix=t?.[n]?vt(pe,{size:o.size,fillMode:"clear",children:"Send"}):void 0;break;case"clear-button":i.showClearButton=t?.[n];break;default:break}}),vt(Oo,{value:"Value",style:{width:300},...o,...i})};Le.options=Sn;Le.states=Ln;Le.variants=vn;Le.defaultOptions=An;Le.modifiers=yn;Le.className=D.className;import{jsx as se,jsxs as Et}from"react/jsx-runtime";var wo="k-actionsheet-titlebar",En={},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 Et("div",{...y,className:a(e.className,wo),children:[Et("div",{className:"k-actionsheet-titlebar-group",children:[i&&se("div",{className:"k-actionsheet-actions",children:i}),!L&&Et("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(D,{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=wo;z.defaultOptions=En;import{jsx as Mt,jsxs as Rn}from"react/jsx-runtime";var gt="k-actionsheet-view",Mn=[],gn={},In={},Ae=e=>{let{adaptive:t,animated:o,children:i,header:n,footer:r,titleId:c,...d}=e,b=n?.type===z&&Mt(z,{adaptive:t,titleId:c,...n?.props}),x=r?.type===Ne&&Mt(Ne,{...r?.props});return Rn("div",{...d,className:a(e.className,gt,{[`${gt}-animated`]:o}),children:[b,Mt("div",{className:"k-actionsheet-content",children:i}),x]})};Ae.states=Mn;Ae.options=gn;Ae.className=gt;Ae.defaultOptions=In;var Ke="action-sheet",qe=Ke;var It="overlay",ko=It;import{jsx as Dn}from"react/jsx-runtime";var Do="k-overlay",On=[],wn={},kn={},ie=e=>{let{...t}=e;return Dn("div",{...t,className:a(e.className,Do),children:e.children})};ie.states=On;ie.options=wn;ie.className=Do;ie.defaultOptions=kn;ie.moduleName=It;ie.folderName=ko;import{jsx as Ye,jsxs as Kn}from"react/jsx-runtime";var Co="k-actionsheet",Cn=[],Hn={},_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 Kn("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,Co,{[`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=Cn;R.options=Hn;R.className=Co;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 zn}from"react/jsx-runtime";var Ho="k-actionsheet-container",_n=[],Pn={},Bn={},Se=e=>{let{children:t,...o}=e;return zn("div",{...o,className:Ho,children:t})};Se.states=_n;Se.options=Pn;Se.className=Ho;Se.defaultOptions=Bn;Se.moduleName=Ke;Se.folderName=qe;import{jsx as Fn}from"react/jsx-runtime";var Rt=e=>{let{...t}=e;return Fn("div",{...t,className:a(e.className,"k-list-ul"),children:e.children})};import{Fragment as Vn,jsx as Pe,jsxs as Ot}from"react/jsx-runtime";var wt="k-actionsheet-item",Un=[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 Ot("span",{...b,className:a(e.className,wt,M(wt,{hover:n,focus:r,selected:c,disabled:d})),children:[!e.children&&Pe(Vn,{children:Ot("span",{className:"k-actionsheet-action",children:[t&&Pe("span",{className:"k-icon-wrap",children:Pe(N,{className:"k-actionsheet-item-icon",icon:t})}),Ot("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=Un;le.className=wt;import{jsx as Ic,jsxs as Rc}from"react/jsx-runtime";import{jsx as Dc}from"react/jsx-runtime";import{jsx as _c}from"react/jsx-runtime";import{jsx as Fc}from"react/jsx-runtime";import{jsx as O,jsxs as kt}from"react/jsx-runtime";var Gn=R.options,$n=R.states,_o={...R.defaultOptions,variant:"normal"},Xn=[{name:"normal",title:"Normal"},{name:"adaptive",title:"Adaptive"},{name:"fullScreen",title:"Full Screen"}],Jn=[{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}={..._o,...e},n={},r=kt(Rt,{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?kt(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?kt(Ne,{alignment:"stretched",children:[O(f,{text:"Apply",themeColor:"primary"}),O(f,{text:"Cancel",themeColor:"base"})]}):void 0,children:r})};ye.options=Gn;ye.states=$n;ye.variants=Xn;ye.defaultOptions=_o;ye.modifiers=Jn;ye.className=R.className;var w="table",k=w;import{jsx as Qn}from"react/jsx-runtime";var Po="k-data-table",Wn=[],qn={size:[l.undefined,l.small,l.medium,l.large]},Yn={},F=e=>{let{size:t,...o}=e;return Qn("div",{...o,className:a(e.className,Po,A("k-table",{size:t})),children:e.children})};F.states=Wn;F.options=qn;F.className=Po;F.defaultOptions=Yn;F.moduleName=w;F.folderName=k;import{jsx as ts}from"react/jsx-runtime";var Dt="k-table-header-wrap",Zn=[s.hover,s.focus,s.disabled],jn={},es={},re=e=>{let{children:t,hover:o,focus:i,disabled:n,...r}=e;return ts("div",{...r,className:a(e.className,Dt,M(Dt,{hover:o,focus:i,disabled:n})),children:t})};re.states=Zn;re.options=jn;re.className=Dt;re.defaultOptions=es;re.moduleName=w;re.folderName=k;import{jsx as ss}from"react/jsx-runtime";var Ct="k-table",os=[],as={size:[l.undefined,l.small,l.medium,l.large]},ns={},Y=e=>{let{size:t,...o}=e;return ss("table",{...o,className:a(e.className,Ct,A(Ct,{size:t})),children:e.children})};Y.states=os;Y.options=as;Y.className=Ct;Y.defaultOptions=ns;Y.moduleName=w;Y.folderName=k;import{jsx as Ht}from"react/jsx-runtime";var Kt="k-table-header",is=[s.hover,s.focus,s.disabled],ls={},rs={},U=e=>{let{children:t,hover:o,focus:i,disabled:n,...r}=e;return Ht("div",{...r,className:a(e.className,Kt,M(Kt,{hover:o,focus:i,disabled:n})),children:Ht(re,{children:Ht(Y,{children:t})})})};U.states=is;U.options=ls;U.className=Kt;U.defaultOptions=rs;U.moduleName=w;U.folderName=k;import{jsx as ms}from"react/jsx-runtime";var Bo="k-table-scroller",ds=[],cs={},ps={},ve=e=>{let{children:t,...o}=e;return ms("div",{...o,className:a(e.className,Bo),children:t})};ve.states=ds;ve.options=cs;ve.className=Bo;ve.defaultOptions=ps;ve.moduleName=w;ve.folderName=k;import{jsx as bs}from"react/jsx-runtime";var us="k-table-body",Be=e=>bs("div",{className:a(e.className,us,"k-table-scroller"),children:e.children});import{jsx as hs}from"react/jsx-runtime";var zo="k-table-footer",Ts=[],fs={},xs={},Q=e=>{let{children:t,...o}=e;return hs("div",{...o,className:a(e.className,zo),children:t})};Q.states=Ts;Q.options=fs;Q.className=zo;Q.defaultOptions=xs;Q.moduleName=w;Q.folderName=k;import{jsx as Ss}from"react/jsx-runtime";var _t="k-table-list",Ns=[],Ls={size:[l.undefined,l.small,l.medium,l.large]},As={},Z=e=>{let{size:t,virtualization:o,...i}=e;return Ss("ul",{...i,className:a(e.className,"k-table",_t,A(_t,{size:t}),{"k-virtual-table":o}),children:e.children})};Z.states=Ns;Z.options=Ls;Z.className=_t;Z.defaultOptions=As;Z.moduleName=w;Z.folderName=k;import{jsx as vs}from"react/jsx-runtime";var ys="k-table-thead",Ee=e=>vs("thead",{className:a(e.className,ys),children:e.children});import{jsx as Yp}from"react/jsx-runtime";import{jsx as em}from"react/jsx-runtime";import{jsx as Ms}from"react/jsx-runtime";var Pt="k-table-row",Es=[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 Ms("tr",{...d,className:a(e.className,Pt,{"k-table-alt-row":c},M(Pt,{hover:t,focus:o,disabled:r,selected:i,highlighted:n})),children:e.children})};de.states=Es;de.className=Pt;import{jsx as Is}from"react/jsx-runtime";var Bt="k-table-row",gs=[s.hover,s.focus,s.selected,s.disabled],V=e=>{let{hover:t,focus:o,selected:i,disabled:n,alt:r,...c}=e;return Is("li",{...c,className:a(e.className,Bt,{"k-table-alt-row":r},M(Bt,{hover:t,focus:o,disabled:n,selected:i})),children:e.children})};V.states=gs;V.className=Bt;import{jsx as Rs}from"react/jsx-runtime";var Fo="k-table-th",G=e=>{let{text:t,colspan:o,rowspan:i,...n}=e,r=t||e.children;return Rs("th",{colSpan:o,rowSpan:i,...n,className:a(e.className,Fo),children:r})};G.className=Fo;G.moduleName=w;G.folderName=k;import{jsx as ws}from"react/jsx-runtime";var Os="k-table-th",Qe=e=>{let{text:t,...o}=e,i=t||e.children;return ws("span",{...o,className:a(e.className,Os),children:i})};import{jsx as Ds}from"react/jsx-runtime";var zt="k-table-td",ks=[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 Ds("td",{colSpan:r,rowSpan:c,...d,className:a(e.className,zt,M(zt,{focus:t,selected:o,highlighted:i})),children:b})};Ze.states=ks;Ze.className=zt;import{jsx as Hs}from"react/jsx-runtime";var Cs="k-table-td",S=e=>{let{text:t,...o}=e,i=t||e.children;return Hs("span",{...o,className:a(e.className,Cs),children:i})};import{jsx as ym}from"react/jsx-runtime";import{jsx as _s}from"react/jsx-runtime";var Ks="k-table-group-sticky-header",Ft=e=>_s("div",{className:a(e.className,Ks),children:e.children});import{jsx as Om}from"react/jsx-runtime";import{jsx as Bs}from"react/jsx-runtime";var Ps="k-table-group-row",Ut=e=>{let{className:t,children:o,...i}=e;return Bs("li",{...i,className:a(t,Ps),children:o})};import{jsx as _m,jsxs as Pm}from"react/jsx-runtime";import{jsx as Um,jsxs as Vm}from"react/jsx-runtime";import{jsx as Jm,jsxs as Wm}from"react/jsx-runtime";import{Fragment as eu,jsx as Zm,jsxs as jm}from"react/jsx-runtime";var Uo="dropdown-grid",Vo="dropdowngrid";import{Fragment as Vt,jsx as p,jsxs as C}from"react/jsx-runtime";var Go="k-dropdowngrid",Vs=[s.hover,s.focus,s.valid,s.invalid,s.required,s.disabled,s.loading,s.readonly],Gs={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]},$o={separators:!0},ce=e=>{let{size:t,rounded:o,fillMode:i,separators:n=$o.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:Jo,activeDescendant:Gt,"aria-label":Wo,...qo}=e,Yo=te?`${te}-table-list`:void 0;return C(Vt,{children:[C(g,{...qo,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,Go,"k-combobox"),children:[r&&C(Vt,{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?Yo:void 0,"aria-activedescendant":I&&Gt?Gt:void 0,"aria-autocomplete":Jo,"aria-invalid":y?"true":void 0,"aria-busy":H?"true":void 0,"aria-label":Wo,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&&C(Vt,{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:C(F,{size:"large",children:[C(U,{children:[C("colgroup",{children:[p("col",{style:{width:"50px"}}),p("col",{style:{width:"160px"}}),p("col",{})]}),p(Ee,{children:C(de,{children:[p(G,{text:"ID"}),p(G,{text:"Name"}),p(G,{text:"Job Title"})]})})]}),p(Ft,{children:p(Qe,{text:"Initial group"})}),p(Be,{children:C(Z,{role:"listbox",id:te?`${te}-table-list`:void 0,"aria-label":"Options",children:[C(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"})]}),C(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"})]}),C(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(Ut,{role:"presentation",children:p(Qe,{text:"Group"})}),C(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"})]}),C(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"})]}),C(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=Vs;ce.options=Gs;ce.className=Go;ce.defaultOptions=$o;ce.moduleName=Uo;ce.folderName=Vo;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 Xo=ce;import{jsx as $s}from"react/jsx-runtime";var Fu=e=>$s(Xo,{id:Xt("ddg"),"aria-label":"Select item",...e});export{Fu as DropdownGridNormal};