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