@progress/kendo-themes-html
Version:
A collection of HTML helpers used for developing Kendo UI themes
2 lines (1 loc) • 34 kB
JavaScript
var i=(...e)=>e.filter(t=>t!==!0&&!!t).map(t=>Array.isArray(t)?i(...t):typeof t=="object"?Object.keys(t).map((o,a)=>t[a]||t[o]&&o||null).filter(o=>o!==null).join(" "):t).filter(t=>!!t).join(" ");var T=(e,t)=>i({[`${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"}),z=(e,t)=>{let{valid:o,invalid:a,hover:n,focus:r,checked:d,active:c,selected:m,disabled:h,indeterminate:b,loading:N,empty:g,readonly:P,highlighted:I,...y}=t;return i({"k-valid":o,"k-invalid":a,"k-hover":n,"k-focus":r,"k-checked":d,"k-active":c,"k-selected":m,"k-disabled":h,"k-indeterminate":b&&!d,"k-loading":N,"k-empty":g,"k-readonly":P,"k-highlighted":I},Object.keys(y).reduce((v,O)=>(O.startsWith("k-")?v[O]=y[O]:v[`k-${O}`]=y[O],v),{}))};function gt(e,t){if(!t)return{};let o=Array.isArray(t)?t:[t];return Object.fromEntries(o.map(a=>[`k-${a}`,!0]))}var l={undefined:void 0,xsmall:"xsmall",small:"small",medium:"medium",large:"large",xlarge:"xlarge",xxlarge:"xxlarge",xxxlarge:"xxxlarge"},p={undefined:void 0,none:"none",small:"small",medium:"medium",large:"large",full:"full"},x={undefined:void 0,solid:"solid",flat:"flat",outline:"outline",clear:"clear",link:"link"},D={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 De={};function kt(e){return De[e]=(De[e]||0)+1,`k-${e}-${De[e]}`}var be="input",Ie=be;import{jsx as Io}from"react/jsx-runtime";var ye="k-input",ko=[s.hover,s.focus,s.valid,s.invalid,s.required,s.disabled,s.loading,s.readonly],Eo={size:[l.undefined,l.small,l.medium,l.large],rounded:[p.undefined,p.none,p.small,p.medium,p.large,p.full],fillMode:[x.undefined,x.solid,x.flat,x.outline]},Mo={},k=e=>{let{hover:t,focus:o,disabled:a,invalid:n,valid:r,loading:d,readonly:c,size:m,rounded:h,fillMode:b,...N}=e;return Io("span",{...N,className:i(e.className,ye,T(ye,{size:m,rounded:h,fillMode:b}),z(ye,{hover:t,focus:o,disabled:a,invalid:n,valid:r,loading:d,readonly:c}))})};k.states=ko;k.options=Eo;k.className=ye;k.defaultOptions=Mo;k.moduleName=be;k.folderName=Ie;import{jsx as Lo}from"react/jsx-runtime";var Oe="k-picker",yo=[s.hover,s.focus,s.valid,s.invalid,s.required,s.disabled,s.loading,s.readonly],Oo={size:[l.undefined,l.small,l.medium,l.large],rounded:[p.undefined,p.none,p.small,p.medium,p.large,p.full],fillMode:[x.undefined,x.solid,x.flat,x.outline]},Co={},oe=e=>{let{hover:t,focus:o,disabled:a,invalid:n,valid:r,loading:d,readonly:c,size:m,rounded:h,fillMode:b,...N}=e;return Lo("span",{...N,className:i(e.className,Oe,T(Oe,{size:m,rounded:h,fillMode:b}),z(Oe,{hover:t,focus:o,disabled:a,invalid:n,valid:r,loading:d,readonly:c})),children:e.children})};oe.states=yo;oe.options=Oo;oe.className=Oe;oe.defaultOptions=Co;oe.moduleName=be;oe.folderName=Ie;import{Fragment as _o,jsx as Et}from"react/jsx-runtime";var Fe="k-font-icon",Po=[],Ro={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]},Ho={},xe=e=>{let{size:t,themeColor:o,icon:a,rotate:n,flip:r,...d}=e;return a?Et("span",{...d,className:i(e.className,Fe,T(Fe,{size:t}),{[`k-i-${a}`]:a,[`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"}):Et(_o,{})};xe.states=Po;xe.options=Ro;xe.className=Fe;xe.defaultOptions=Ho;var Mt=xe;import{Fragment as Bo,jsx as Ce}from"react/jsx-runtime";var Ue="k-svg-icon",Ko=[],wo={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:[D.outline,D.solid,D.duotone]},Ve={viewBox:"0 0 24 24",variant:D.outline},Ne=e=>{let{size:t,themeColor:o,rotate:a,flip:n,viewBox:r=Ve.viewBox,variant:d=Ve.variant,icon:c,...m}=e;if(!c)return Ce(Bo,{});if(c==="none")return Ce("span",{...m,className:i(e.className,Ue,T("k-icon",{size:t}),"k-none"),"aria-hidden":"true"});let h=typeof c=="object"&&c.name&&c.name,b=typeof c=="object"?d&&c.variants?.[d]||c.variants?.outline||c.content:void 0;return Ce("span",{...m,className:i(e.className,Ue,T("k-icon",{size:t}),{[`k-svg-i-${h}`]:h,[`k-color-${o}`]:o,[`k-rotate-${a}`]:a,"k-flip-h":n==="h"||n==="both","k-flip-v":n==="v"||n==="both"}),"aria-hidden":"true",children:Ce("svg",{"aria-hidden":!0,focusable:!1,xmlns:"http://www.w3.org/2000/svg",viewBox:typeof c=="object"?c.viewBox:r,dangerouslySetInnerHTML:b!==void 0?{__html:b}:void 0,children:c?void 0:e.children})})};Ne.states=Ko;Ne.options=wo;Ne.className=Ue;Ne.defaultOptions=Ve;var $e=Ne;import*as Xe from"@progress/kendo-svg-icons";var It="icon",yt="icons";import{useContext as Do}from"react";import{createContext as zo}from"react";var Ot=zo({iconsType:"svg"});import{Fragment as Ct,jsx as Se}from"react/jsx-runtime";var Le="k-icon",Fo=e=>e.replace(/([-_][a-z0-9])/gi,t=>t.toUpperCase().replace("-","").replace("_","")),Uo=[],Vo={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:[D.outline,D.solid,D.duotone]},Pe={viewBox:"0 0 24 24",type:"svg",variant:D.outline},S=e=>{let{iconsType:t}=Do(Ot),{size:o,themeColor:a,icon:n,type:r=t||Pe.type,rotate:d,flip:c,viewBox:m=Pe.viewBox,variant:h=Pe.variant,...b}=e;if(!n)return Se(Ct,{});if((t||r)==="svg"){if(n==="none")return Se($e,{...b,className:i(e.className,Le),icon:n,size:o,variant:h});let g=Xe[n]?n:Fo(`${n}-icon`);return Xe[g]?Se($e,{...b,className:i(e.className,Le),icon:Xe[g],size:o,themeColor:a,rotate:d,flip:c,viewBox:m,variant:h}):Se(Ct,{})}return Se(Mt,{...b,className:i(e.className,Le),icon:n,size:o,themeColor:a,rotate:d,flip:c})};S.states=Uo;S.options=Vo;S.defaultOptions=Pe;S.className=Le;S.moduleName=It;S.folderName=yt;S.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 Jo,jsx as Je}from"react/jsx-runtime";var Lt="k-clear-value",$o=[s.disabled,s.loading,s.readonly],Xo={},_=e=>{let{disabled:t,loading:o,readonly:a,value:n}=e;return t||a||o||!n?Je(Jo,{}):Je("span",{className:i(e.className,Lt),children:Je(S,{icon:"x"})})};_.states=$o;_.options=Xo;_.className=Lt;import{jsx as Yo}from"react/jsx-runtime";var qe="k-input-inner",qo=[],Go={},Re={type:"text",autocomplete:"off",value:"",placeholder:""},K=e=>{let{value:t=Re.value,type:o=Re.type,placeholder:a=Re.placeholder,autocomplete:n=Re.autocomplete,disabled:r,readOnly:d,...c}=e;return Yo("input",{...c,type:o,className:i(e.className,qe,T(qe,e)),placeholder:a,autoComplete:n,defaultValue:t,disabled:r||void 0,readOnly:d||void 0})};K.states=qo;K.options=Go;K.className=qe;import{jsx as Pt,jsxs as Zo}from"react/jsx-runtime";var Ge="k-input-inner",Wo=[],Qo={},Ye=e=>{let{value:t,placeholder:o,showValue:a,valueIcon:n,valueIconName:r,...d}=e;return Zo("span",{...d,className:i(e.className,Ge,T(Ge,e)),children:[n,!n&&r&&Pt(S,{className:"k-input-value-icon",icon:r}),a&&!t&&o,a&&t&&Pt("span",{className:"k-input-value-text",children:t})]})};Ye.states=Wo;Ye.options=Qo;Ye.className=Ge;import{jsx as tn}from"react/jsx-runtime";var We="k-input-inner",jo=[],en={},Rt={value:"",placeholder:""},Qe=e=>{let{value:t=Rt.value,placeholder:o=Rt.placeholder,rows:a,disabled:n,...r}=e;return tn("textarea",{...r,className:i(e.className,We,T(We,e)),placeholder:o,rows:a,defaultValue:t,disabled:n||void 0})};Qe.states=jo;Qe.options=en;Qe.className=We;import{Fragment as nn,jsx as Ht}from"react/jsx-runtime";var _t="k-input-loading-icon",on=[s.disabled,s.loading],F=e=>{let{disabled:t,loading:o}=e;return t||!o?Ht(nn,{}):Ht("span",{className:i(e.className,_t,"k-icon k-i-loading")})};F.states=on;F.className=_t;import{Fragment as rn,jsx as Kt}from"react/jsx-runtime";var wt="k-input-validation-icon",an=[s.valid,s.invalid,s.disabled,s.loading],sn={},w=e=>{let{valid:t,invalid:o,disabled:a,loading:n}=e,r=o?"warning-circle":"check-circle";return a||n||!!!(t||o)?Kt(rn,{}):Kt(S,{className:i(wt),icon:r})};w.states=an;w.options=sn;w.className=wt;import{Fragment as dn,jsx as Bt}from"react/jsx-runtime";var ln="k-input-prefix",cn={direction:"horizontal"},ne=e=>{let{direction:t=cn.direction,...o}=e;return e.children?Bt("span",{...o,className:i(ln,e.className,{[`k-input-prefix-${t}`]:t}),children:e.children}):Bt(dn,{})};import{Fragment as un,jsx as zt}from"react/jsx-runtime";var mn="k-input-suffix",pn={direction:"horizontal"},ae=e=>{let{direction:t=pn.direction,...o}=e;return e.children?zt("span",{...o,className:i(mn,e.className,{[`k-input-suffix-${t}`]:t}),children:e.children}):zt(un,{})};import{jsx as Gi}from"react/jsx-runtime";import{jsx as Zi}from"react/jsx-runtime";import{jsx as hn}from"react/jsx-runtime";var Dt="k-input-separator",fn={direction:"vertical"},ie=e=>{let{direction:t=fn.direction,...o}=e;return hn("span",{...o,className:i(Dt,e.className,{[`${Dt}-${t}`]:t})})};var Ze="button",Ft=Ze;import{Fragment as Ut,jsx as se,jsxs as Vt}from"react/jsx-runtime";var ve="k-button",bn=["icon-button"],xn=[s.hover,s.focus,s.active,s.selected,s.disabled,s.generating],Nn={size:[l.undefined,l.xsmall,l.small,l.medium,l.large],rounded:[p.undefined,p.none,p.small,p.medium,p.large,p.full],fillMode:[x.undefined,x.solid,x.flat,x.outline,x.clear,x.link],themeColor:[u.undefined,u.base,u.primary,u.secondary,u.tertiary,u.success,u.warning,u.error,u.info,u.inverse]},je={showArrow:!1,arrowIconName:"chevron-down"},f=e=>{let{as:t="button",size:o,rounded:a,fillMode:n,themeColor:r,showArrow:d=je.showArrow,arrowIconName:c=je.arrowIconName,variant:m,hover:h,focus:b,active:N,selected:g,disabled:P,togglable:I,ariaDisabled:y,icon:v,iconSize:O,text:R,iconClassName:te,className:fe,...he}=e,Z=v!=null,ze=e.children!==void 0;return Vt(t,{className:i(fe,ve,gt(ve,m),T(ve,{size:o,rounded:a,fillMode:n,themeColor:r}),z(ve,{hover:h,focus:b,active:N,disabled:P||y,selected:g}),{"k-icon-button":!R&&!ze&&Z}),"aria-pressed":I?g?"true":"false":void 0,...he,"aria-disabled":y?"true":void 0,disabled:P||void 0,children:[typeof v=="string"&&v&&se(S,{className:i(te,"k-button-icon"),icon:v,size:O}),v&&typeof v!="string"&&se(Ut,{children:v}),R?Vt(Ut,{children:[R&&se("span",{className:"k-button-text",children:R}),e.children]}):e.children&&se("span",{className:"k-button-text",children:e.children}),d&&se("span",{className:"k-menu-button-arrow k-button-arrow",children:se(S,{icon:c})})]})};f.states=xn;f.options=Nn;f.variants=bn;f.className=ve;f.defaultOptions=je;f.moduleName=Ze;f.folderName=Ft;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 Sn}from"react/jsx-runtime";var j=e=>Sn(f,{children:"Button",...e});import{Fragment as $t,jsx as U,jsxs as et}from"react/jsx-runtime";var vn=k.states,An=k.defaultOptions,Tn=k.options,gn=[{name:"prefix",title:"Prefix"},{name:"suffix",title:"Suffix"},{name:"clear-button",title:"`Clear` Button"},{name:"validation-icon",title:"Validation Icon"},{name:"separators",title:"Separators"}],kn=[],re=e=>{let{modifiers:t,valid:o,invalid:a,loading:n,disabled:r,readonly:d,...c}=e,m=t?.prefix,h=t?.suffix,b=t?.["clear-button"],N=t?.["validation-icon"],g=t?.separators;return et(k,{...c,valid:o,invalid:a,loading:n,disabled:r,readonly:d,style:{width:300},children:[m&&et($t,{children:[U(ne,{children:U(S,{icon:"lock"})}),g&&U(ie,{})]}),U(K,{placeholder:"Placeholder",value:"Value"}),N&&U(w,{valid:o,invalid:a,loading:n,disabled:r}),U(F,{loading:n,disabled:r}),b&&U(_,{loading:n,disabled:r,readonly:d,value:"Value"}),h&&et($t,{children:[g&&U(ie,{}),U(ae,{children:U(j,{size:c.size,fillMode:"clear",children:"Send"})})]})]})};re.options=Tn;re.states=vn;re.variants=kn;re.defaultOptions=An;re.modifiers=gn;re.className=k.className;import{jsx as En}from"react/jsx-runtime";var Xt=e=>En(f,{icon:"folder",...e,"aria-label":e["aria-label"]||"Folder",children:void 0});import{jsx as Mn}from"react/jsx-runtime";var Jt=e=>Mn(f,{icon:"folder",children:"Button",...e});import{jsx as tt}from"react/jsx-runtime";var In=f.options,yn=f.states,On={...f.defaultOptions,variant:"text"},Cn=[{name:"icon-only",title:"Icon Only"},{name:"icon-and-text",title:"Icon & Text"},{name:"text",title:"Text"}],Ln=[],le=e=>{let{variant:t,...o}=e;switch(t){case"icon-only":return tt(Xt,{...o,icon:"star"});case"icon-and-text":return tt(Jt,{...o,icon:"star",children:"Button"});default:return tt(j,{...o,children:"Button"})}};le.options=In;le.states=yn;le.variants=Cn;le.defaultOptions=On;le.modifiers=Ln;le.className=f.className;var ot="popup",qt=ot;import{jsx as Gt}from"react/jsx-runtime";var Yt="k-animation-container",Pn=[],Rn={},nt={positionMode:"absolute",shown:!0},V=e=>{let{positionMode:t=nt.positionMode,shown:o=nt.shown,animationStyle:a,offset:n,...r}=e;return Gt("div",{...r,style:{...n,...e.style},className:i(e.className,Yt,{"k-animation-container-shown":o,"k-animation-container-fixed":t==="fixed"}),children:Gt("div",{className:"k-child-animation-container",style:a,children:e.children})})};V.states=Pn;V.options=Rn;V.className=Yt;V.defaultOptions=nt;V.moduleName=ot;V.folderName=qt;var at="popup",Wt=at;import{jsx as Qt}from"react/jsx-runtime";var Zt="k-popup",Hn=[],_n={},jt={positionMode:"absolute"},H=e=>{let{offset:t,positionMode:o=jt.positionMode,animationStyle:a,containerClassName:n,containerRole:r,containerAriaLabel:d,...c}=e;return Qt(V,{positionMode:o,offset:t,animationStyle:a,className:n,role:r,"aria-label":d,children:Qt("div",{...c,className:i(e.className,Zt),children:e.children})})};H.states=Hn;H.options=_n;H.className=Zt;H.defaultOptions=jt;H.moduleName=at;H.folderName=Wt;H.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 eo="time-selector",to="timeselector";import{Fragment as oo,jsx as He,jsxs as no}from"react/jsx-runtime";var it="k-timeselector",Kn=[],wn={size:[l.undefined,l.small,l.medium,l.large]},Bn={},$=e=>{let{size:t,header:o,fastSelection:a,columns:n,focusedColumn:r,...d}=e,c=n.map(function(m,h){let b=!1,N=!0;return m===r&&(b=!0),(h===0||m==="tt")&&(N=!1),He(st,{type:m,focus:b,separator:N},h)});return no("div",{...d,className:i(e.className,it,T(it,{size:t})),role:"group","aria-label":"Time selector",children:[He(oo,{children:o}),He(oo,{children:a}),no("div",{className:"k-time-list-container",children:[He("span",{className:"k-time-highlight"}),c]})]})};$.states=Kn;$.options=wn;$.className=it;$.defaultOptions=Bn;$.moduleName=eo;$.folderName=to;$.ariaSpec={selector:".k-timeselector",rules:[{selector:".k-timeselector",attribute:"role=group",usage:"Groups the time selection columns."},{selector:".k-timeselector",attribute:"aria-label",usage:"Describes the time selector purpose."},{selector:".k-time-list",attribute:"role=listbox",usage:"Each time column list acts as a listbox."},{selector:".k-time-list",attribute:"aria-label",usage:"Describes which time unit the column selects."},{selector:".k-time-list-wrapper .k-reset",attribute:"role=none",usage:"Removes semantic meaning from the ul element."},{selector:".k-time-list-wrapper .k-item",attribute:"role=option",usage:"Each item in the time list is an option."}]};import{Fragment as Dn,jsx as ee,jsxs as rt}from"react/jsx-runtime";var zn=[s.focus],st=e=>{let{type:t,focus:o,separator:a,...n}=e,r,d=["00","01","02","03","04","05","06","07","08","09"];switch(t){case"dd":r="Day";break;case"HH":r="Hour";break;case"mm":r="Minute";break;case"ss":r="Second";break;case"SSS":r="Millisecond",d=["000","001","002","003","004","005","006","007","008","009"];break;case"tt":r="AM/PM",d=["AM","PM"];break;default:r="Column Name";break}let c=d.map((m,h)=>ee("li",{className:"k-item",role:"option","aria-selected":"false",children:ee("span",{children:m})},h));return rt(Dn,{children:[a&&ee("div",{className:"k-time-separator",children:":"}),rt("div",{...n,className:i(e.className,"k-time-list-wrapper",z("k-time-list-wrapper",{focus:o})),children:[ee("span",{className:"k-title",children:r}),ee("div",{className:"k-time-list",role:"listbox","aria-label":r,children:rt("div",{className:"k-content k-scrollable k-time-container",children:[ee("ul",{className:"k-reset",style:{transform:"translateY(97px)"},role:"none",children:c}),ee("div",{className:"k-scrollable-placeholder"})]})})]})]})};st.states=zn;import{jsx as Un,jsxs as Vn}from"react/jsx-runtime";var Fn="k-time-header",ce=e=>{let{title:t,...o}=e;return Vn("div",{...o,className:i(e.className,Fn),children:[t!=null&&Un("span",{className:"k-title",children:t}),e.children]})};var lt="action-buttons",ao=lt;import{jsx as Jn}from"react/jsx-runtime";var _e="k-actions",$n=[],Xn={},ct={alignment:"start",orientation:"horizontal"},L=e=>{let{alignment:t=ct.alignment,orientation:o=ct.orientation,...a}=e;return Jn("div",{...a,className:i(_e,{[`${_e}-${t}`]:t,[`${_e}-${o}`]:o},e.className),children:e.children})};L.states=$n;L.options=Xn;L.className=_e;L.defaultOptions=ct;L.moduleName=lt;L.folderName=ao;import{jsx as $r,jsxs as Xr}from"react/jsx-runtime";import{Fragment as tl,jsx as jr,jsxs as el}from"react/jsx-runtime";import{Fragment as ml,jsx as cl,jsxs as dl}from"react/jsx-runtime";import{Fragment as Al,jsx as Sl,jsxs as vl}from"react/jsx-runtime";import{jsx as Gn}from"react/jsx-runtime";var qn="k-actionsheet-footer",so={alignment:"stretched",orientation:"horizontal"},X=e=>{let{alignment:t=so.alignment,orientation:o=so.orientation,template:a,as:n=a?"div":L,...r}=e;return Gn(n,{...r,...!a&&{alignment:t,orientation:o},className:i(e.className,qn),children:e.children})};var dt="searchbox",ro=dt;import{jsx as Ae,jsxs as Qn}from"react/jsx-runtime";var lo="k-searchbox",Yn=[s.hover,s.focus,s.valid,s.invalid,s.required,s.disabled,s.loading],Wn={size:[l.undefined,l.small,l.medium,l.large],rounded:[p.undefined,p.none,p.small,p.medium,p.large,p.full],fillMode:[x.undefined,x.solid,x.flat,x.outline]},mt={showIcon:!0,icon:"search"},J=e=>{let{value:t,placeholder:o,size:a,rounded:n,fillMode:r,hover:d,focus:c,valid:m,invalid:h,required:b,loading:N,disabled:g,showIcon:P=mt.showIcon,icon:I=mt.icon,"aria-label":y,...v}=e;return Qn(k,{...v,size:a,rounded:n,fillMode:r,hover:d,focus:c,valid:m,invalid:h,required:b,loading:N,disabled:g,className:i(e.className,lo),children:[P&&Ae(S,{className:"k-input-icon",icon:I}),Ae(K,{placeholder:o,value:t,"aria-label":y}),Ae(F,{...e}),Ae(w,{...e}),Ae(_,{...e})]})};J.states=Yn;J.options=Wn;J.className=lo;J.defaultOptions=mt;J.moduleName=dt;J.folderName=ro;import{jsx as Xl}from"react/jsx-runtime";var pt="textbox",co=pt;import{Fragment as mo,jsx as q,jsxs as ut}from"react/jsx-runtime";var po="k-textbox",Zn=[s.hover,s.focus,s.valid,s.invalid,s.required,s.disabled,s.loading,s.readonly],jn={size:[l.undefined,l.small,l.medium,l.large],rounded:[p.undefined,p.none,p.small,p.medium,p.large,p.full],fillMode:[x.undefined,x.solid,x.flat,x.outline]},Ke={showClearButton:!0,showValidationIcon:!0,separators:!0},C=e=>{let{size:t,rounded:o,fillMode:a,separators:n=Ke.separators,showClearButton:r=Ke.showClearButton,showValidationIcon:d=Ke.showValidationIcon,prefix:c,suffix:m,type:h,value:b,placeholder:N,hover:g,focus:P,valid:I,invalid:y,required:v,loading:O,disabled:R,readonly:te,id:fe,"aria-label":he,"aria-describedby":Z,...ze}=e;return ut(k,{...ze,size:t,rounded:o,fillMode:a,hover:g,focus:P,valid:I,invalid:y,required:v,loading:O,disabled:R,readonly:te,className:i(e.className,po),children:[c&&ut(mo,{children:[q(ne,{children:c}),n&&q(ie,{})]}),q(K,{id:fe,placeholder:N,value:b,type:h,disabled:R,"aria-label":he,"aria-describedby":Z,"aria-invalid":y?"true":void 0}),d&&q(w,{valid:I,invalid:y,loading:O,disabled:R}),q(F,{loading:O,disabled:R}),r&&q(_,{loading:O,disabled:R,readonly:te,value:b}),m&&ut(mo,{children:[n&&q(ie,{}),q(ae,{children:m})]})]})};C.states=Zn;C.options=jn;C.className=po;C.defaultOptions=Ke;C.moduleName=pt;C.folderName=co;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 Te=C;import{jsx as ea}from"react/jsx-runtime";var uo=e=>ea(Te,{...e});import{Fragment as cc,jsx as lc}from"react/jsx-runtime";import{Fragment as hc,jsx as fc}from"react/jsx-runtime";import{jsx as Sc}from"react/jsx-runtime";import{jsx as ft}from"react/jsx-runtime";var ta=C.states,oa=C.defaultOptions,na=C.options,aa=[{name:"prefix",title:"Prefix"},{name:"suffix",title:"Suffix"},{name:"clear-button",title:"`Clear` Button"}],ia=[],de=e=>{let{modifiers:t,...o}=e,a={};return Object.keys(t||{}).forEach(n=>{switch(n){case"prefix":a.prefix=t?.[n]?ft(S,{icon:"lock"}):void 0;break;case"suffix":a.suffix=t?.[n]?ft(j,{size:o.size,fillMode:"clear",children:"Send"}):void 0;break;case"clear-button":a.showClearButton=t?.[n];break;default:break}}),ft(uo,{value:"Value",style:{width:300},...o,...a})};de.options=na;de.states=ta;de.variants=ia;de.defaultOptions=oa;de.modifiers=aa;de.className=C.className;import{jsx as G,jsxs as ht}from"react/jsx-runtime";var fo="k-actionsheet-titlebar",sa={},B=e=>{let{title:t,subtitle:o,actionsStart:a,actionsEnd:n,filter:r,input:d,inputValue:c,inputPlaceholder:m,adaptive:h,titleId:b,children:N,...g}=e;return ht("div",{...g,className:i(e.className,fo),children:[ht("div",{className:"k-actionsheet-titlebar-group",children:[a&&G("div",{className:"k-actionsheet-actions",children:a}),!N&&ht("div",{className:"k-actionsheet-title",id:b,children:[t&&G("div",{className:"k-text-center",children:t}),o&&G("div",{className:"k-actionsheet-subtitle k-text-center",children:o})]}),N&&G("div",{className:"k-actionsheet-title",id:b,children:N}),n&&G("div",{className:"k-actionsheet-actions",children:n})]}),(d||r)&&G("div",{className:"k-actionsheet-titlebar-group k-actionsheet-filter",children:d?G(C,{value:c,placeholder:m,size:h?"large":"medium","aria-label":t||m||"Input"}):G(J,{placeholder:"Filter",size:h?"large":"medium","aria-label":"Filter options"})})]})};B.className=fo;B.defaultOptions=sa;import{jsx as bt,jsxs as da}from"react/jsx-runtime";var xt="k-actionsheet-view",ra=[],la={},ca={},me=e=>{let{adaptive:t,animated:o,children:a,header:n,footer:r,titleId:d,...c}=e,m=n?.type===B&&bt(B,{adaptive:t,titleId:d,...n?.props}),h=r?.type===X&&bt(X,{...r?.props});return da("div",{...c,className:i(e.className,xt,{[`${xt}-animated`]:o}),children:[m,bt("div",{className:"k-actionsheet-content",children:a}),h]})};me.states=ra;me.options=la;me.className=xt;me.defaultOptions=ca;var ge="action-sheet",we=ge;var Nt="overlay",ho=Nt;import{jsx as fa}from"react/jsx-runtime";var bo="k-overlay",ma=[],pa={},ua={},Y=e=>{let{...t}=e;return fa("div",{...t,className:i(e.className,bo),children:e.children})};Y.states=ma;Y.options=pa;Y.className=bo;Y.defaultOptions=ua;Y.moduleName=Nt;Y.folderName=ho;import{jsx as Be,jsxs as xa}from"react/jsx-runtime";var xo="k-actionsheet",ha=[],ba={},ke={side:"bottom",fullscreen:!1,adaptive:!1,overlay:!0},E=e=>{let{side:t=ke.side,fullscreen:o=ke.fullscreen,adaptive:a=ke.adaptive,overlay:n=ke.overlay,template:r,children:d,header:c,footer:m,id:h,...b}=e,N=h&&!r&&c?`${h}-title`:void 0;return xa("div",{className:"k-actionsheet-container",children:[n&&Be(Y,{}),Be(V,{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:Be("div",{...b,id:h,role:"dialog","aria-modal":n?"true":void 0,"aria-labelledby":N,className:i(e.className,xo,{[`k-actionsheet-${t}`]:o===!1,"k-actionsheet-fullscreen":o===!0,"k-adaptive-actionsheet":a}),children:r||Be(me,{header:c,footer:m,adaptive:a,titleId:N,...e,children:d})})})]})};E.states=ha;E.options=ba;E.className=xo;E.defaultOptions=ke;E.moduleName=ge;E.folderName=we;E.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 Aa}from"react/jsx-runtime";var No="k-actionsheet-container",Na=[],Sa={},va={},pe=e=>{let{children:t,...o}=e;return Aa("div",{...o,className:No,children:t})};pe.states=Na;pe.options=Sa;pe.className=No;pe.defaultOptions=va;pe.moduleName=ge;pe.folderName=we;import{jsx as Ta}from"react/jsx-runtime";var St=e=>{let{...t}=e;return Ta("div",{...t,className:i(e.className,"k-list-ul"),children:e.children})};import{Fragment as ka,jsx as Ee,jsxs as vt}from"react/jsx-runtime";var At="k-actionsheet-item",ga=[s.hover,s.focus,s.selected,s.disabled],W=e=>{let{iconName:t,text:o,description:a,hover:n,focus:r,selected:d,disabled:c,...m}=e;return vt("span",{...m,className:i(e.className,At,z(At,{hover:n,focus:r,selected:d,disabled:c})),children:[!e.children&&Ee(ka,{children:vt("span",{className:"k-actionsheet-action",children:[t&&Ee("span",{className:"k-icon-wrap",children:Ee(S,{className:"k-actionsheet-item-icon",icon:t})}),vt("span",{className:"k-actionsheet-item-text",children:[o&&Ee("span",{className:"k-actionsheet-item-title",children:o}),a&&Ee("span",{className:"k-actionsheet-item-description",children:a})]})]})}),e.children]})};W.states=ga;W.className=At;import{jsx as Nd,jsxs as Sd}from"react/jsx-runtime";import{jsx as gd}from"react/jsx-runtime";import{jsx as Id}from"react/jsx-runtime";import{jsx as Ld}from"react/jsx-runtime";import{jsx as M,jsxs as Tt}from"react/jsx-runtime";var Ea=E.options,Ma=E.states,vo={...E.defaultOptions,variant:"normal"},Ia=[{name:"normal",title:"Normal"},{name:"adaptive",title:"Adaptive"},{name:"fullScreen",title:"Full Screen"}],ya=[{name:"actions",title:"Titlebar Actions",type:"boolean"},{name:"subtitle",title:"Subtitle",type:"boolean"},{name:"footer",title:"Footer",type:"boolean"}],ue=e=>{let{variant:t,modifiers:o,...a}={...vo,...e},n={},r=Tt(St,{children:[M(W,{text:"Edit Item",description:"Click to edit",iconName:"edit-tools"}),M(W,{text:"Add to Favorites",iconName:"heart"}),M(W,{text:"Upload New",iconName:"upload",disabled:!0}),M("hr",{className:"k-hr"}),M(W,{text:"Cancel",iconName:"cancel"})]}),d="Choose from the items below",c="Select Item";return t==="fullScreen"&&(n.fullScreen=!0),Object.keys(o||{}).forEach(m=>{switch(m){case"actions":n.actionsStart=!!o?.[m],n.actionsEnd=!!o?.[m];break;case"subtitle":n.subtitle=o?.[m]?d:void 0;break;case"footer":n.footer=!!o?.[m];break;default:break}}),t==="adaptive"?M(E,{...a,adaptive:!0,fullscreen:n.fullScreen,header:M(B,{actionsStart:n.actionsStart?M(f,{icon:"chevron-left",size:"large",fillMode:"flat"}):void 0,actionsEnd:n.actionsEnd?M(f,{icon:"x",size:"large",fillMode:"flat"}):void 0,title:c,subtitle:n.subtitle}),footer:n.footer?Tt(X,{alignment:"stretched",children:[M(f,{text:"Cancel",size:"large",themeColor:"base"}),M(f,{text:"Apply",size:"large",themeColor:"primary"})]}):void 0,children:r}):M(E,{...a,fullscreen:n.fullScreen,header:M(B,{actionsStart:n.actionsStart?M(f,{icon:"chevron-left",fillMode:"flat"}):void 0,actionsEnd:n.actionsEnd?M(f,{icon:"x",fillMode:"flat"}):void 0,title:"Select Item",subtitle:n.subtitle}),footer:n.footer?Tt(X,{alignment:"stretched",children:[M(f,{text:"Apply",themeColor:"primary"}),M(f,{text:"Cancel",themeColor:"base"})]}):void 0,children:r})};ue.options=Ea;ue.states=Ma;ue.variants=Ia;ue.defaultOptions=vo;ue.modifiers=ya;ue.className=E.className;var Ao="time-picker",To="timepicker";import{Fragment as Pa,jsx as A,jsxs as Me}from"react/jsx-runtime";var go="k-timepicker",Oa=[s.hover,s.focus,s.valid,s.invalid,s.required,s.disabled,s.loading,s.readonly],Ca={size:[l.undefined,l.small,l.medium,l.large],rounded:[p.undefined,p.none,p.small,p.medium,p.large,p.full],fillMode:[x.undefined,x.solid,x.flat,x.outline]},La={},Q=e=>{let{size:t,rounded:o,fillMode:a,prefix:n,suffix:r,value:d,placeholder:c,hover:m,focus:h,valid:b,invalid:N,required:g,loading:P,disabled:I,readonly:y,opened:v,adaptive:O,adaptiveSettings:R,adaptiveTitle:te,adaptiveSubtitle:fe,...he}=e,Z=kt("timepicker-popup");return Me(Pa,{children:[Me(k,{...he,size:t,rounded:o,fillMode:a,hover:m,focus:h,valid:b,invalid:N,required:g,loading:P,disabled:I,readonly:y,className:i(e.className,go),children:[A(ne,{children:n}),A(K,{placeholder:c,value:d,role:"combobox","aria-haspopup":"dialog","aria-expanded":v?"true":"false","aria-controls":v||O?Z:void 0,"aria-invalid":N?"true":void 0,"aria-label":"Select time",disabled:I}),A(w,{valid:b,invalid:N,loading:P,disabled:I}),A(F,{loading:P,disabled:I}),A(_,{loading:P,disabled:I,readonly:y,value:d}),A(ae,{children:r}),A(f,{className:"k-input-button",icon:"clock",size:t,fillMode:a,tabIndex:-1,"aria-label":"Select time",disabled:I})]}),v&&Me(H,{id:Z,className:"k-list-container k-timepicker-popup",children:[A($,{columns:["HH","mm","ss","tt"],focusedColumn:"mm",header:A(ce,{title:"10:00:00 AM",children:A(f,{fillMode:"flat",className:"k-time-now",children:"Now"})})}),Me(L,{alignment:"stretched",className:"k-time-footer",children:[A(f,{themeColor:"primary",className:"k-time-accept",children:"Set"}),A(f,{className:"k-time-cancel",children:"Cancel"})]})]}),O&&A(E,{adaptive:!0,id:Z,...R,header:A(B,{actionsEnd:A(f,{icon:"check",themeColor:"primary",size:"large",fillMode:"flat","aria-label":"Apply"}),title:te,subtitle:fe}),footer:Me(X,{children:[A(f,{text:"Cancel",size:"large"}),A(f,{text:"Set time",size:"large",themeColor:"primary"})]}),children:A($,{size:"large",columns:["HH","mm","ss","tt"],focusedColumn:"HH",header:A(ce,{title:"10:00:00 \u0410\u041C",children:A(f,{size:"large",fillMode:"flat",className:"k-time-now",children:"Now"})})})})]})};Q.states=Oa;Q.options=Ca;Q.className=go;Q.defaultOptions=La;Q.moduleName=Ao;Q.folderName=To;Q.ariaSpec={selector:".k-timepicker",rules:[{selector:".k-timepicker .k-input-inner",attribute:"role=combobox",usage:"The input element follows the combobox specification."},{selector:".k-timepicker .k-input-inner",attribute:"aria-haspopup=dialog",usage:"Indicates the component has a Dialog Popup."},{selector:".k-timepicker .k-input-inner",attribute:"aria-expanded=true/false",usage:"Announces whether the Popup is visible or not."},{selector:".k-timepicker .k-input-inner",attribute:"aria-controls (when open)",usage:"Points to the popup element."},{selector:".k-timepicker .k-input-inner",attribute:"label for or aria-label or aria-labelledby",usage:"The input needs an accessible name."},{selector:".k-invalid .k-input-inner",attribute:"aria-invalid=true",usage:"Rendered only when the picker is in form and announces invalid state."},{selector:".k-disabled .k-input-inner",attribute:"disabled or aria-disabled=true",usage:"Rendered only when the picker is disabled."},{selector:".k-timepicker .k-input-button",attribute:"tabindex=-1",usage:"Button element must not be focusable."},{selector:".k-timepicker .k-input-button",attribute:"aria-label",usage:"The button needs an accessible name."},{selector:".k-timepicker.k-disabled .k-button",attribute:"disabled or aria-disabled",usage:"Rendered only when the picker is disabled."},{selector:".k-time-list",attribute:"role=listbox",usage:"The timelist elements must have listbox role."},{selector:".k-time-list",attribute:"aria-label or aria-labelledby",usage:"The listbox needs an accessible name."},{selector:".k-time-list-wrapper .k-reset",attribute:"role=none",usage:"The ul element semantic meaning must be removed."},{selector:".k-time-list-wrapper .k-item",attribute:"role=option",usage:"The available options must be marked as such."}]};var mm=Q;export{go as TIMEPICKER_CLASSNAME,Q as TimePicker,mm as default};