@progress/kendo-themes-html
Version:
A collection of HTML helpers used for developing Kendo UI themes
2 lines (1 loc) • 34.5 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 A=(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"}),D=(e,t)=>{let{valid:o,invalid:a,hover:n,focus:r,checked:d,active:c,selected:m,disabled:h,indeterminate:b,loading:N,empty:k,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":k,"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"},F={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 Fe={};function Et(e){return Fe[e]=(Fe[e]||0)+1,`k-${e}-${Fe[e]}`}var xe="input",ye=xe;import{jsx as Po}from"react/jsx-runtime";var Oe="k-input",Oo=[s.hover,s.focus,s.valid,s.invalid,s.required,s.disabled,s.loading,s.readonly],Co={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]},Lo={},g=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 Po("span",{...N,className:i(e.className,Oe,A(Oe,{size:m,rounded:h,fillMode:b}),D(Oe,{hover:t,focus:o,disabled:a,invalid:n,valid:r,loading:d,readonly:c}))})};g.states=Oo;g.options=Co;g.className=Oe;g.defaultOptions=Lo;g.moduleName=xe;g.folderName=ye;import{jsx as Ko}from"react/jsx-runtime";var Ce="k-picker",Ro=[s.hover,s.focus,s.valid,s.invalid,s.required,s.disabled,s.loading,s.readonly],Ho={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]},_o={},ne=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 Ko("span",{...N,className:i(e.className,Ce,A(Ce,{size:m,rounded:h,fillMode:b}),D(Ce,{hover:t,focus:o,disabled:a,invalid:n,valid:r,loading:d,readonly:c})),children:e.children})};ne.states=Ro;ne.options=Ho;ne.className=Ce;ne.defaultOptions=_o;ne.moduleName=xe;ne.folderName=ye;import{Fragment as Do,jsx as Mt}from"react/jsx-runtime";var Ue="k-font-icon",wo=[],Bo={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]},zo={},Ne=e=>{let{size:t,themeColor:o,icon:a,rotate:n,flip:r,...d}=e;return a?Mt("span",{...d,className:i(e.className,Ue,A(Ue,{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"}):Mt(Do,{})};Ne.states=wo;Ne.options=Bo;Ne.className=Ue;Ne.defaultOptions=zo;var It=Ne;import{Fragment as Vo,jsx as Le}from"react/jsx-runtime";var Ve="k-svg-icon",Fo=[],Uo={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:[F.outline,F.solid,F.duotone]},$e={viewBox:"0 0 24 24",variant:F.outline},Se=e=>{let{size:t,themeColor:o,rotate:a,flip:n,viewBox:r=$e.viewBox,variant:d=$e.variant,icon:c,...m}=e;if(!c)return Le(Vo,{});if(c==="none")return Le("span",{...m,className:i(e.className,Ve,A("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 Le("span",{...m,className:i(e.className,Ve,A("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:Le("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})})};Se.states=Fo;Se.options=Uo;Se.className=Ve;Se.defaultOptions=$e;var Xe=Se;import*as Je from"@progress/kendo-svg-icons";var yt="icon",Ot="icons";import{useContext as Xo}from"react";import{createContext as $o}from"react";var Ct=$o({iconsType:"svg"});import{Fragment as Lt,jsx as ve}from"react/jsx-runtime";var Pe="k-icon",Jo=e=>e.replace(/([-_][a-z0-9])/gi,t=>t.toUpperCase().replace("-","").replace("_","")),qo=[],Go={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:[F.outline,F.solid,F.duotone]},Re={viewBox:"0 0 24 24",type:"svg",variant:F.outline},S=e=>{let{iconsType:t}=Xo(Ct),{size:o,themeColor:a,icon:n,type:r=t||Re.type,rotate:d,flip:c,viewBox:m=Re.viewBox,variant:h=Re.variant,...b}=e;if(!n)return ve(Lt,{});if((t||r)==="svg"){if(n==="none")return ve(Xe,{...b,className:i(e.className,Pe),icon:n,size:o,variant:h});let k=Je[n]?n:Jo(`${n}-icon`);return Je[k]?ve(Xe,{...b,className:i(e.className,Pe),icon:Je[k],size:o,themeColor:a,rotate:d,flip:c,viewBox:m,variant:h}):ve(Lt,{})}return ve(It,{...b,className:i(e.className,Pe),icon:n,size:o,themeColor:a,rotate:d,flip:c})};S.states=qo;S.options=Go;S.defaultOptions=Re;S.className=Pe;S.moduleName=yt;S.folderName=Ot;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 Qo,jsx as qe}from"react/jsx-runtime";var Pt="k-clear-value",Yo=[s.disabled,s.loading,s.readonly],Wo={},K=e=>{let{disabled:t,loading:o,readonly:a,value:n}=e;return t||a||o||!n?qe(Qo,{}):qe("span",{className:i(e.className,Pt),children:qe(S,{icon:"x"})})};K.states=Yo;K.options=Wo;K.className=Pt;import{jsx as en}from"react/jsx-runtime";var Ge="k-input-inner",Zo=[],jo={},He={type:"text",autocomplete:"off",value:"",placeholder:""},w=e=>{let{value:t=He.value,type:o=He.type,placeholder:a=He.placeholder,autocomplete:n=He.autocomplete,disabled:r,readOnly:d,...c}=e;return en("input",{...c,type:o,className:i(e.className,Ge,A(Ge,e)),placeholder:a,autoComplete:n,defaultValue:t,disabled:r||void 0,readOnly:d||void 0})};w.states=Zo;w.options=jo;w.className=Ge;import{jsx as Rt,jsxs as nn}from"react/jsx-runtime";var Ye="k-input-inner",tn=[],on={},We=e=>{let{value:t,placeholder:o,showValue:a,valueIcon:n,valueIconName:r,...d}=e;return nn("span",{...d,className:i(e.className,Ye,A(Ye,e)),children:[n,!n&&r&&Rt(S,{className:"k-input-value-icon",icon:r}),a&&!t&&o,a&&t&&Rt("span",{className:"k-input-value-text",children:t})]})};We.states=tn;We.options=on;We.className=Ye;import{jsx as rn}from"react/jsx-runtime";var Qe="k-input-inner",an=[],sn={},Ht={value:"",placeholder:""},Ze=e=>{let{value:t=Ht.value,placeholder:o=Ht.placeholder,rows:a,disabled:n,...r}=e;return rn("textarea",{...r,className:i(e.className,Qe,A(Qe,e)),placeholder:o,rows:a,defaultValue:t,disabled:n||void 0})};Ze.states=an;Ze.options=sn;Ze.className=Qe;import{Fragment as cn,jsx as _t}from"react/jsx-runtime";var Kt="k-input-loading-icon",ln=[s.disabled,s.loading],U=e=>{let{disabled:t,loading:o}=e;return t||!o?_t(cn,{}):_t("span",{className:i(e.className,Kt,"k-icon k-i-loading")})};U.states=ln;U.className=Kt;import{Fragment as pn,jsx as wt}from"react/jsx-runtime";var Bt="k-input-validation-icon",dn=[s.valid,s.invalid,s.disabled,s.loading],mn={},B=e=>{let{valid:t,invalid:o,disabled:a,loading:n}=e,r=o?"warning-circle":"check-circle";return a||n||!!!(t||o)?wt(pn,{}):wt(S,{className:i(Bt),icon:r})};B.states=dn;B.options=mn;B.className=Bt;import{Fragment as hn,jsx as zt}from"react/jsx-runtime";var un="k-input-prefix",fn={direction:"horizontal"},ae=e=>{let{direction:t=fn.direction,...o}=e;return e.children?zt("span",{...o,className:i(un,e.className,{[`k-input-prefix-${t}`]:t}),children:e.children}):zt(hn,{})};import{Fragment as Nn,jsx as Dt}from"react/jsx-runtime";var bn="k-input-suffix",xn={direction:"horizontal"},ie=e=>{let{direction:t=xn.direction,...o}=e;return e.children?Dt("span",{...o,className:i(bn,e.className,{[`k-input-suffix-${t}`]:t}),children:e.children}):Dt(Nn,{})};import{jsx as as}from"react/jsx-runtime";import{jsx as ls}from"react/jsx-runtime";import{jsx as vn}from"react/jsx-runtime";var Ft="k-input-separator",Sn={direction:"vertical"},se=e=>{let{direction:t=Sn.direction,...o}=e;return vn("span",{...o,className:i(Ft,e.className,{[`${Ft}-${t}`]:t})})};var je="button",Ut=je;import{Fragment as Vt,jsx as re,jsxs as $t}from"react/jsx-runtime";var Te="k-button",Tn=["icon-button"],An=[s.hover,s.focus,s.active,s.selected,s.disabled,s.generating],kn={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]},et={showArrow:!1,arrowIconName:"chevron-down"},f=e=>{let{as:t="button",size:o,rounded:a,fillMode:n,themeColor:r,showArrow:d=et.showArrow,arrowIconName:c=et.arrowIconName,variant:m,hover:h,focus:b,active:N,selected:k,disabled:P,togglable:I,ariaDisabled:y,icon:v,iconSize:O,text:H,iconClassName:oe,className:he,...be}=e,Z=v!=null,De=e.children!==void 0;return $t(t,{className:i(he,Te,gt(Te,m),A(Te,{size:o,rounded:a,fillMode:n,themeColor:r}),D(Te,{hover:h,focus:b,active:N,disabled:P||y,selected:k}),{"k-icon-button":!H&&!De&&Z}),"aria-pressed":I?k?"true":"false":void 0,...be,"aria-disabled":y?"true":void 0,disabled:P||void 0,children:[typeof v=="string"&&v&&re(S,{className:i(oe,"k-button-icon"),icon:v,size:O}),v&&typeof v!="string"&&re(Vt,{children:v}),H?$t(Vt,{children:[H&&re("span",{className:"k-button-text",children:H}),e.children]}):e.children&&re("span",{className:"k-button-text",children:e.children}),d&&re("span",{className:"k-menu-button-arrow k-button-arrow",children:re(S,{icon:c})})]})};f.states=An;f.options=kn;f.variants=Tn;f.className=Te;f.defaultOptions=et;f.moduleName=je;f.folderName=Ut;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 gn}from"react/jsx-runtime";var j=e=>gn(f,{children:"Button",...e});import{Fragment as Xt,jsx as V,jsxs as tt}from"react/jsx-runtime";var En=g.states,Mn=g.defaultOptions,In=g.options,yn=[{name:"prefix",title:"Prefix"},{name:"suffix",title:"Suffix"},{name:"clear-button",title:"`Clear` Button"},{name:"validation-icon",title:"Validation Icon"},{name:"separators",title:"Separators"}],On=[],le=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"],k=t?.separators;return tt(g,{...c,valid:o,invalid:a,loading:n,disabled:r,readonly:d,style:{width:300},children:[m&&tt(Xt,{children:[V(ae,{children:V(S,{icon:"lock"})}),k&&V(se,{})]}),V(w,{placeholder:"Placeholder",value:"Value"}),N&&V(B,{valid:o,invalid:a,loading:n,disabled:r}),V(U,{loading:n,disabled:r}),b&&V(K,{loading:n,disabled:r,readonly:d,value:"Value"}),h&&tt(Xt,{children:[k&&V(se,{}),V(ie,{children:V(j,{size:c.size,fillMode:"clear",children:"Send"})})]})]})};le.options=In;le.states=En;le.variants=On;le.defaultOptions=Mn;le.modifiers=yn;le.className=g.className;import{jsx as Cn}from"react/jsx-runtime";var Jt=e=>Cn(f,{icon:"folder",...e,"aria-label":e["aria-label"]||"Folder",children:void 0});import{jsx as Ln}from"react/jsx-runtime";var qt=e=>Ln(f,{icon:"folder",children:"Button",...e});import{jsx as ot}from"react/jsx-runtime";var Pn=f.options,Rn=f.states,Hn={...f.defaultOptions,variant:"text"},_n=[{name:"icon-only",title:"Icon Only"},{name:"icon-and-text",title:"Icon & Text"},{name:"text",title:"Text"}],Kn=[],ce=e=>{let{variant:t,...o}=e;switch(t){case"icon-only":return ot(Jt,{...o,icon:"star"});case"icon-and-text":return ot(qt,{...o,icon:"star",children:"Button"});default:return ot(j,{...o,children:"Button"})}};ce.options=Pn;ce.states=Rn;ce.variants=_n;ce.defaultOptions=Hn;ce.modifiers=Kn;ce.className=f.className;var nt="popup",Gt=nt;import{jsx as Yt}from"react/jsx-runtime";var Wt="k-animation-container",wn=[],Bn={},at={positionMode:"absolute",shown:!0},$=e=>{let{positionMode:t=at.positionMode,shown:o=at.shown,animationStyle:a,offset:n,...r}=e;return Yt("div",{...r,style:{...n,...e.style},className:i(e.className,Wt,{"k-animation-container-shown":o,"k-animation-container-fixed":t==="fixed"}),children:Yt("div",{className:"k-child-animation-container",style:a,children:e.children})})};$.states=wn;$.options=Bn;$.className=Wt;$.defaultOptions=at;$.moduleName=nt;$.folderName=Gt;var it="popup",Qt=it;import{jsx as Zt}from"react/jsx-runtime";var jt="k-popup",zn=[],Dn={},eo={positionMode:"absolute"},_=e=>{let{offset:t,positionMode:o=eo.positionMode,animationStyle:a,containerClassName:n,containerRole:r,containerAriaLabel:d,...c}=e;return Zt($,{positionMode:o,offset:t,animationStyle:a,className:n,role:r,"aria-label":d,children:Zt("div",{...c,className:i(e.className,jt),children:e.children})})};_.states=zn;_.options=Dn;_.className=jt;_.defaultOptions=eo;_.moduleName=it;_.folderName=Qt;_.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 to="time-selector",oo="timeselector";import{Fragment as no,jsx as _e,jsxs as ao}from"react/jsx-runtime";var st="k-timeselector",Fn=[],Un={size:[l.undefined,l.small,l.medium,l.large]},Vn={},X=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),_e(rt,{type:m,focus:b,separator:N},h)});return ao("div",{...d,className:i(e.className,st,A(st,{size:t})),role:"group","aria-label":"Time selector",children:[_e(no,{children:o}),_e(no,{children:a}),ao("div",{className:"k-time-list-container",children:[_e("span",{className:"k-time-highlight"}),c]})]})};X.states=Fn;X.options=Un;X.className=st;X.defaultOptions=Vn;X.moduleName=to;X.folderName=oo;X.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 Xn,jsx as ee,jsxs as lt}from"react/jsx-runtime";var $n=[s.focus],rt=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 lt(Xn,{children:[a&&ee("div",{className:"k-time-separator",children:":"}),lt("div",{...n,className:i(e.className,"k-time-list-wrapper",D("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:lt("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"})]})})]})]})};rt.states=$n;import{jsx as qn,jsxs as Gn}from"react/jsx-runtime";var Jn="k-time-header",de=e=>{let{title:t,...o}=e;return Gn("div",{...o,className:i(e.className,Jn),children:[t!=null&&qn("span",{className:"k-title",children:t}),e.children]})};var ct="action-buttons",io=ct;import{jsx as Qn}from"react/jsx-runtime";var Ke="k-actions",Yn=[],Wn={},dt={alignment:"start",orientation:"horizontal"},L=e=>{let{alignment:t=dt.alignment,orientation:o=dt.orientation,...a}=e;return Qn("div",{...a,className:i(Ke,{[`${Ke}-${t}`]:t,[`${Ke}-${o}`]:o},e.className),children:e.children})};L.states=Yn;L.options=Wn;L.className=Ke;L.defaultOptions=dt;L.moduleName=ct;L.folderName=io;import{jsx as el,jsxs as tl}from"react/jsx-runtime";import{Fragment as ml,jsx as cl,jsxs as dl}from"react/jsx-runtime";import{Fragment as Tl,jsx as Sl,jsxs as vl}from"react/jsx-runtime";import{Fragment as Ll,jsx as Ol,jsxs as Cl}from"react/jsx-runtime";import{jsx as jn}from"react/jsx-runtime";var Zn="k-actionsheet-footer",ro={alignment:"stretched",orientation:"horizontal"},J=e=>{let{alignment:t=ro.alignment,orientation:o=ro.orientation,template:a,as:n=a?"div":L,...r}=e;return jn(n,{...r,...!a&&{alignment:t,orientation:o},className:i(e.className,Zn),children:e.children})};var mt="searchbox",lo=mt;import{jsx as Ae,jsxs as oa}from"react/jsx-runtime";var co="k-searchbox",ea=[s.hover,s.focus,s.valid,s.invalid,s.required,s.disabled,s.loading],ta={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]},pt={showIcon:!0,icon:"search"},q=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:k,showIcon:P=pt.showIcon,icon:I=pt.icon,"aria-label":y,...v}=e;return oa(g,{...v,size:a,rounded:n,fillMode:r,hover:d,focus:c,valid:m,invalid:h,required:b,loading:N,disabled:k,className:i(e.className,co),children:[P&&Ae(S,{className:"k-input-icon",icon:I}),Ae(w,{placeholder:o,value:t,"aria-label":y}),Ae(U,{...e}),Ae(B,{...e}),Ae(K,{...e})]})};q.states=ea;q.options=ta;q.className=co;q.defaultOptions=pt;q.moduleName=mt;q.folderName=lo;import{jsx as tc}from"react/jsx-runtime";var ut="textbox",mo=ut;import{Fragment as po,jsx as G,jsxs as ft}from"react/jsx-runtime";var uo="k-textbox",na=[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:[p.undefined,p.none,p.small,p.medium,p.large,p.full],fillMode:[x.undefined,x.solid,x.flat,x.outline]},we={showClearButton:!0,showValidationIcon:!0,separators:!0},C=e=>{let{size:t,rounded:o,fillMode:a,separators:n=we.separators,showClearButton:r=we.showClearButton,showValidationIcon:d=we.showValidationIcon,prefix:c,suffix:m,type:h,value:b,placeholder:N,hover:k,focus:P,valid:I,invalid:y,required:v,loading:O,disabled:H,readonly:oe,id:he,"aria-label":be,"aria-describedby":Z,...De}=e;return ft(g,{...De,size:t,rounded:o,fillMode:a,hover:k,focus:P,valid:I,invalid:y,required:v,loading:O,disabled:H,readonly:oe,className:i(e.className,uo),children:[c&&ft(po,{children:[G(ae,{children:c}),n&&G(se,{})]}),G(w,{id:he,placeholder:N,value:b,type:h,disabled:H,"aria-label":be,"aria-describedby":Z,"aria-invalid":y?"true":void 0}),d&&G(B,{valid:I,invalid:y,loading:O,disabled:H}),G(U,{loading:O,disabled:H}),r&&G(K,{loading:O,disabled:H,readonly:oe,value:b}),m&&ft(po,{children:[n&&G(se,{}),G(ie,{children:m})]})]})};C.states=na;C.options=aa;C.className=uo;C.defaultOptions=we;C.moduleName=ut;C.folderName=mo;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 ke=C;import{jsx as ia}from"react/jsx-runtime";var fo=e=>ia(ke,{...e});import{Fragment as Sc,jsx as Nc}from"react/jsx-runtime";import{Fragment as Ec,jsx as gc}from"react/jsx-runtime";import{jsx as Oc}from"react/jsx-runtime";import{jsx as ht}from"react/jsx-runtime";var sa=C.states,ra=C.defaultOptions,la=C.options,ca=[{name:"prefix",title:"Prefix"},{name:"suffix",title:"Suffix"},{name:"clear-button",title:"`Clear` Button"}],da=[],me=e=>{let{modifiers:t,...o}=e,a={};return Object.keys(t||{}).forEach(n=>{switch(n){case"prefix":a.prefix=t?.[n]?ht(S,{icon:"lock"}):void 0;break;case"suffix":a.suffix=t?.[n]?ht(j,{size:o.size,fillMode:"clear",children:"Send"}):void 0;break;case"clear-button":a.showClearButton=t?.[n];break;default:break}}),ht(fo,{value:"Value",style:{width:300},...o,...a})};me.options=la;me.states=sa;me.variants=da;me.defaultOptions=ra;me.modifiers=ca;me.className=C.className;import{jsx as Y,jsxs as bt}from"react/jsx-runtime";var ho="k-actionsheet-titlebar",ma={},z=e=>{let{title:t,subtitle:o,actionsStart:a,actionsEnd:n,filter:r,input:d,inputValue:c,inputPlaceholder:m,adaptive:h,titleId:b,children:N,...k}=e;return bt("div",{...k,className:i(e.className,ho),children:[bt("div",{className:"k-actionsheet-titlebar-group",children:[a&&Y("div",{className:"k-actionsheet-actions",children:a}),!N&&bt("div",{className:"k-actionsheet-title",id:b,children:[t&&Y("div",{className:"k-text-center",children:t}),o&&Y("div",{className:"k-actionsheet-subtitle k-text-center",children:o})]}),N&&Y("div",{className:"k-actionsheet-title",id:b,children:N}),n&&Y("div",{className:"k-actionsheet-actions",children:n})]}),(d||r)&&Y("div",{className:"k-actionsheet-titlebar-group k-actionsheet-filter",children:d?Y(C,{value:c,placeholder:m,size:h?"large":"medium","aria-label":t||m||"Input"}):Y(q,{placeholder:"Filter",size:h?"large":"medium","aria-label":"Filter options"})})]})};z.className=ho;z.defaultOptions=ma;import{jsx as xt,jsxs as ha}from"react/jsx-runtime";var Nt="k-actionsheet-view",pa=[],ua={},fa={},pe=e=>{let{adaptive:t,animated:o,children:a,header:n,footer:r,titleId:d,...c}=e,m=n?.type===z&&xt(z,{adaptive:t,titleId:d,...n?.props}),h=r?.type===J&&xt(J,{...r?.props});return ha("div",{...c,className:i(e.className,Nt,{[`${Nt}-animated`]:o}),children:[m,xt("div",{className:"k-actionsheet-content",children:a}),h]})};pe.states=pa;pe.options=ua;pe.className=Nt;pe.defaultOptions=fa;var ge="action-sheet",Be=ge;var St="overlay",bo=St;import{jsx as Sa}from"react/jsx-runtime";var xo="k-overlay",ba=[],xa={},Na={},W=e=>{let{...t}=e;return Sa("div",{...t,className:i(e.className,xo),children:e.children})};W.states=ba;W.options=xa;W.className=xo;W.defaultOptions=Na;W.moduleName=St;W.folderName=bo;import{jsx as ze,jsxs as Aa}from"react/jsx-runtime";var No="k-actionsheet",va=[],Ta={},Ee={side:"bottom",fullscreen:!1,adaptive:!1,overlay:!0},E=e=>{let{side:t=Ee.side,fullscreen:o=Ee.fullscreen,adaptive:a=Ee.adaptive,overlay:n=Ee.overlay,template:r,children:d,header:c,footer:m,id:h,...b}=e,N=h&&!r&&c?`${h}-title`:void 0;return Aa("div",{className:"k-actionsheet-container",children:[n&&ze(W,{}),ze($,{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:ze("div",{...b,id:h,role:"dialog","aria-modal":n?"true":void 0,"aria-labelledby":N,className:i(e.className,No,{[`k-actionsheet-${t}`]:o===!1,"k-actionsheet-fullscreen":o===!0,"k-adaptive-actionsheet":a}),children:r||ze(pe,{header:c,footer:m,adaptive:a,titleId:N,...e,children:d})})})]})};E.states=va;E.options=Ta;E.className=No;E.defaultOptions=Ee;E.moduleName=ge;E.folderName=Be;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 Ma}from"react/jsx-runtime";var So="k-actionsheet-container",ka=[],ga={},Ea={},ue=e=>{let{children:t,...o}=e;return Ma("div",{...o,className:So,children:t})};ue.states=ka;ue.options=ga;ue.className=So;ue.defaultOptions=Ea;ue.moduleName=ge;ue.folderName=Be;import{jsx as Ia}from"react/jsx-runtime";var vt=e=>{let{...t}=e;return Ia("div",{...t,className:i(e.className,"k-list-ul"),children:e.children})};import{Fragment as Oa,jsx as Me,jsxs as Tt}from"react/jsx-runtime";var At="k-actionsheet-item",ya=[s.hover,s.focus,s.selected,s.disabled],Q=e=>{let{iconName:t,text:o,description:a,hover:n,focus:r,selected:d,disabled:c,...m}=e;return Tt("span",{...m,className:i(e.className,At,D(At,{hover:n,focus:r,selected:d,disabled:c})),children:[!e.children&&Me(Oa,{children:Tt("span",{className:"k-actionsheet-action",children:[t&&Me("span",{className:"k-icon-wrap",children:Me(S,{className:"k-actionsheet-item-icon",icon:t})}),Tt("span",{className:"k-actionsheet-item-text",children:[o&&Me("span",{className:"k-actionsheet-item-title",children:o}),a&&Me("span",{className:"k-actionsheet-item-description",children:a})]})]})}),e.children]})};Q.states=ya;Q.className=At;import{jsx as yd,jsxs as Od}from"react/jsx-runtime";import{jsx as Rd}from"react/jsx-runtime";import{jsx as wd}from"react/jsx-runtime";import{jsx as Fd}from"react/jsx-runtime";import{jsx as M,jsxs as kt}from"react/jsx-runtime";var Ca=E.options,La=E.states,To={...E.defaultOptions,variant:"normal"},Pa=[{name:"normal",title:"Normal"},{name:"adaptive",title:"Adaptive"},{name:"fullScreen",title:"Full Screen"}],Ra=[{name:"actions",title:"Titlebar Actions",type:"boolean"},{name:"subtitle",title:"Subtitle",type:"boolean"},{name:"footer",title:"Footer",type:"boolean"}],fe=e=>{let{variant:t,modifiers:o,...a}={...To,...e},n={},r=kt(vt,{children:[M(Q,{text:"Edit Item",description:"Click to edit",iconName:"edit-tools"}),M(Q,{text:"Add to Favorites",iconName:"heart"}),M(Q,{text:"Upload New",iconName:"upload",disabled:!0}),M("hr",{className:"k-hr"}),M(Q,{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(z,{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?kt(J,{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(z,{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?kt(J,{alignment:"stretched",children:[M(f,{text:"Apply",themeColor:"primary"}),M(f,{text:"Cancel",themeColor:"base"})]}):void 0,children:r})};fe.options=Ca;fe.states=La;fe.variants=Pa;fe.defaultOptions=To;fe.modifiers=Ra;fe.className=E.className;var Ao="time-picker",ko="timepicker";import{Fragment as wa,jsx as T,jsxs as Ie}from"react/jsx-runtime";var go="k-timepicker",Ha=[s.hover,s.focus,s.valid,s.invalid,s.required,s.disabled,s.loading,s.readonly],_a={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]},Ka={},R=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:k,loading:P,disabled:I,readonly:y,opened:v,adaptive:O,adaptiveSettings:H,adaptiveTitle:oe,adaptiveSubtitle:he,...be}=e,Z=Et("timepicker-popup");return Ie(wa,{children:[Ie(g,{...be,size:t,rounded:o,fillMode:a,hover:m,focus:h,valid:b,invalid:N,required:k,loading:P,disabled:I,readonly:y,className:i(e.className,go),children:[T(ae,{children:n}),T(w,{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}),T(B,{valid:b,invalid:N,loading:P,disabled:I}),T(U,{loading:P,disabled:I}),T(K,{loading:P,disabled:I,readonly:y,value:d}),T(ie,{children:r}),T(f,{className:"k-input-button",icon:"clock",size:t,fillMode:a,tabIndex:-1,"aria-label":"Select time",disabled:I})]}),v&&Ie(_,{id:Z,className:"k-list-container k-timepicker-popup",children:[T(X,{columns:["HH","mm","ss","tt"],focusedColumn:"mm",header:T(de,{title:"10:00:00 AM",children:T(f,{fillMode:"flat",className:"k-time-now",children:"Now"})})}),Ie(L,{alignment:"stretched",className:"k-time-footer",children:[T(f,{themeColor:"primary",className:"k-time-accept",children:"Set"}),T(f,{className:"k-time-cancel",children:"Cancel"})]})]}),O&&T(E,{adaptive:!0,id:Z,...H,header:T(z,{actionsEnd:T(f,{icon:"check",themeColor:"primary",size:"large",fillMode:"flat","aria-label":"Apply"}),title:oe,subtitle:he}),footer:Ie(J,{children:[T(f,{text:"Cancel",size:"large"}),T(f,{text:"Set time",size:"large",themeColor:"primary"})]}),children:T(X,{size:"large",columns:["HH","mm","ss","tt"],focusedColumn:"HH",header:T(de,{title:"10:00:00 \u0410\u041C",children:T(f,{size:"large",fillMode:"flat",className:"k-time-now",children:"Now"})})})})]})};R.states=Ha;R.options=_a;R.className=go;R.defaultOptions=Ka;R.moduleName=Ao;R.folderName=ko;R.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 Eo=R;import{jsx as Ba}from"react/jsx-runtime";var Mo=e=>Ba(Eo,{...e});import{jsx as Io}from"react/jsx-runtime";var za=R.options,Da=R.states,yo=R.defaultOptions,Fa=[{name:"opened",title:"Opened"}],Ua=[],te=e=>{let{modifiers:t,...o}={...yo,...e},a={};return Object.keys(t||{}).forEach(n=>{n==="opened"&&(a.opened=!!t?.[n])}),Io("div",{style:a.opened?{height:"378px"}:{},children:Io(Mo,{style:{width:"300px"},value:"00:00:00 AM",...o,...a})})};te.options=za;te.states=Da;te.variants=Ua;te.defaultOptions=yo;te.modifiers=Fa;te.className=R.className;var Om=te;export{te as TimepickerDemo,Om as default};