UNPKG

@progress/kendo-themes-html

Version:

A collection of HTML helpers used for developing Kendo UI themes

2 lines (1 loc) 22.3 kB
var n=(...e)=>e.filter(t=>t!==!0&&!!t).map(t=>Array.isArray(t)?n(...t):typeof t=="object"?Object.keys(t).map((o,s)=>t[s]||t[o]&&o||null).filter(o=>o!==null).join(" "):t).filter(t=>!!t).join(" ");var h=(e,t)=>n({[`${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"}),_=(e,t)=>{let{valid:o,invalid:s,hover:i,focus:r,checked:d,active:m,selected:f,disabled:N,indeterminate:b,loading:T,empty:S,readonly:O,highlighted:A,...L}=t;return n({"k-valid":o,"k-invalid":s,"k-hover":i,"k-focus":r,"k-checked":d,"k-active":m,"k-selected":f,"k-disabled":N,"k-indeterminate":b&&!d,"k-loading":T,"k-empty":S,"k-readonly":O,"k-highlighted":A},Object.keys(L).reduce((g,P)=>(P.startsWith("k-")?g[P]=L[P]:g[`k-${P}`]=L[P],g),{}))};function we(e,t){if(!t)return{};let o=Array.isArray(t)?t:[t];return Object.fromEntries(o.map(s=>[`k-${s}`,!0]))}var a={undefined:void 0,xsmall:"xsmall",small:"small",medium:"medium",large:"large",xlarge:"xlarge",xxlarge:"xxlarge",xxxlarge:"xxxlarge"},u={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"},C={undefined:void 0,outline:"outline",solid:"solid",duotone:"duotone"},c={undefined:void 0,inherit:"inherit",base:"base",primary:"primary",secondary:"secondary",tertiary:"tertiary",info:"info",success:"success",warning:"warning",error:"error",inverse:"inverse"},l={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 Ke(e){return de[e]=(de[e]||0)+1,`k-${e}-${de[e]}`}var J="input",Z=J;import{jsx as _t}from"react/jsx-runtime";var j="k-input",Lt=[l.hover,l.focus,l.valid,l.invalid,l.required,l.disabled,l.loading,l.readonly],Pt={size:[a.undefined,a.small,a.medium,a.large],rounded:[u.undefined,u.none,u.small,u.medium,u.large,u.full],fillMode:[x.undefined,x.solid,x.flat,x.outline]},Rt={},I=e=>{let{hover:t,focus:o,disabled:s,invalid:i,valid:r,loading:d,readonly:m,size:f,rounded:N,fillMode:b,...T}=e;return _t("span",{...T,className:n(e.className,j,h(j,{size:f,rounded:N,fillMode:b}),_(j,{hover:t,focus:o,disabled:s,invalid:i,valid:r,loading:d,readonly:m}))})};I.states=Lt;I.options=Pt;I.className=j;I.defaultOptions=Rt;I.moduleName=J;I.folderName=Z;import{jsx as Kt}from"react/jsx-runtime";var ee="k-picker",Ht=[l.hover,l.focus,l.valid,l.invalid,l.required,l.disabled,l.loading,l.readonly],Bt={size:[a.undefined,a.small,a.medium,a.large],rounded:[u.undefined,u.none,u.small,u.medium,u.large,u.full],fillMode:[x.undefined,x.solid,x.flat,x.outline]},wt={},V=e=>{let{hover:t,focus:o,disabled:s,invalid:i,valid:r,loading:d,readonly:m,size:f,rounded:N,fillMode:b,...T}=e;return Kt("span",{...T,className:n(e.className,ee,h(ee,{size:f,rounded:N,fillMode:b}),_(ee,{hover:t,focus:o,disabled:s,invalid:i,valid:r,loading:d,readonly:m})),children:e.children})};V.states=Ht;V.options=Bt;V.className=ee;V.defaultOptions=wt;V.moduleName=J;V.folderName=Z;import{Fragment as Vt,jsx as De}from"react/jsx-runtime";var pe="k-font-icon",Dt=[],zt={size:[a.undefined,a.xsmall,a.small,a.medium,a.large,a.xlarge,a.xxlarge,a.xxxlarge],themeColor:[c.undefined,c.base,c.primary,c.secondary,c.tertiary,c.success,c.warning,c.error,c.info]},Ut={},X=e=>{let{size:t,themeColor:o,icon:s,rotate:i,flip:r,...d}=e;return s?De("span",{...d,className:n(e.className,pe,h(pe,{size:t}),{[`k-i-${s}`]:s,[`k-color-${o}`]:o,[`k-rotate-${i}`]:i,"k-flip-h":r==="h"||r==="both","k-flip-v":r==="v"||r==="both"}),"aria-hidden":"true"}):De(Vt,{})};X.states=Dt;X.options=zt;X.className=pe;X.defaultOptions=Ut;var ze=X;import{Fragment as qt,jsx as te}from"react/jsx-runtime";var ue="k-svg-icon",Ft=[],$t={size:[a.undefined,a.xsmall,a.small,a.medium,a.large,a.xlarge,a.xxlarge,a.xxxlarge],themeColor:[c.undefined,c.base,c.primary,c.secondary,c.tertiary,c.success,c.warning,c.error,c.info],variant:[C.outline,C.solid,C.duotone]},fe={viewBox:"0 0 24 24",variant:C.outline},W=e=>{let{size:t,themeColor:o,rotate:s,flip:i,viewBox:r=fe.viewBox,variant:d=fe.variant,icon:m,...f}=e;if(!m)return te(qt,{});if(m==="none")return te("span",{...f,className:n(e.className,ue,h("k-icon",{size:t}),"k-none"),"aria-hidden":"true"});let N=typeof m=="object"&&m.name&&m.name,b=typeof m=="object"?d&&m.variants?.[d]||m.variants?.outline||m.content:void 0;return te("span",{...f,className:n(e.className,ue,h("k-icon",{size:t}),{[`k-svg-i-${N}`]:N,[`k-color-${o}`]:o,[`k-rotate-${s}`]:s,"k-flip-h":i==="h"||i==="both","k-flip-v":i==="v"||i==="both"}),"aria-hidden":"true",children:te("svg",{"aria-hidden":!0,focusable:!1,xmlns:"http://www.w3.org/2000/svg",viewBox:typeof m=="object"?m.viewBox:r,dangerouslySetInnerHTML:b!==void 0?{__html:b}:void 0,children:m?void 0:e.children})})};W.states=Ft;W.options=$t;W.className=ue;W.defaultOptions=fe;var Ne=W;import*as be from"@progress/kendo-svg-icons";var Ue="icon",Ve="icons";import{useContext as Jt}from"react";import{createContext as Gt}from"react";var Fe=Gt({iconsType:"svg"});import{Fragment as $e,jsx as Y}from"react/jsx-runtime";var oe="k-icon",Xt=e=>e.replace(/([-_][a-z0-9])/gi,t=>t.toUpperCase().replace("-","").replace("_","")),Wt=[],Yt={size:[a.undefined,a.xsmall,a.small,a.medium,a.large,a.xlarge,a.xxlarge,a.xxxlarge],themeColor:[c.undefined,c.base,c.primary,c.secondary,c.tertiary,c.success,c.warning,c.error,c.info],variant:[C.outline,C.solid,C.duotone]},ne={viewBox:"0 0 24 24",type:"svg",variant:C.outline},k=e=>{let{iconsType:t}=Jt(Fe),{size:o,themeColor:s,icon:i,type:r=t||ne.type,rotate:d,flip:m,viewBox:f=ne.viewBox,variant:N=ne.variant,...b}=e;if(!i)return Y($e,{});if((t||r)==="svg"){if(i==="none")return Y(Ne,{...b,className:n(e.className,oe),icon:i,size:o,variant:N});let S=be[i]?i:Xt(`${i}-icon`);return be[S]?Y(Ne,{...b,className:n(e.className,oe),icon:be[S],size:o,themeColor:s,rotate:d,flip:m,viewBox:f,variant:N}):Y($e,{})}return Y(ze,{...b,className:n(e.className,oe),icon:i,size:o,themeColor:s,rotate:d,flip:m})};k.states=Wt;k.options=Yt;k.defaultOptions=ne;k.className=oe;k.moduleName=Ue;k.folderName=Ve;k.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 jt,jsx as xe}from"react/jsx-runtime";var qe="k-clear-value",Qt=[l.disabled,l.loading,l.readonly],Zt={},K=e=>{let{disabled:t,loading:o,readonly:s,value:i}=e;return t||s||o||!i?xe(jt,{}):xe("span",{className:n(e.className,qe),children:xe(k,{icon:"x"})})};K.states=Qt;K.options=Zt;K.className=qe;import{jsx as oo}from"react/jsx-runtime";var he="k-input-inner",eo=[],to={},ae={type:"text",autocomplete:"off",value:"",placeholder:""},D=e=>{let{value:t=ae.value,type:o=ae.type,placeholder:s=ae.placeholder,autocomplete:i=ae.autocomplete,disabled:r,readOnly:d,...m}=e;return oo("input",{...m,type:o,className:n(e.className,he,h(he,e)),placeholder:s,autoComplete:i,defaultValue:t,disabled:r||void 0,readOnly:d||void 0})};D.states=eo;D.options=to;D.className=he;import{jsx as Ge,jsxs as io}from"react/jsx-runtime";var ke="k-input-inner",no=[],ao={},Te=e=>{let{value:t,placeholder:o,showValue:s,valueIcon:i,valueIconName:r,...d}=e;return io("span",{...d,className:n(e.className,ke,h(ke,e)),children:[i,!i&&r&&Ge(k,{className:"k-input-value-icon",icon:r}),s&&!t&&o,s&&t&&Ge("span",{className:"k-input-value-text",children:t})]})};Te.states=no;Te.options=ao;Te.className=ke;import{jsx as lo}from"react/jsx-runtime";var ge="k-input-inner",so=[],ro={},Je={value:"",placeholder:""},Ie=e=>{let{value:t=Je.value,placeholder:o=Je.placeholder,rows:s,disabled:i,...r}=e;return lo("textarea",{...r,className:n(e.className,ge,h(ge,e)),placeholder:o,rows:s,defaultValue:t,disabled:i||void 0})};Ie.states=so;Ie.options=ro;Ie.className=ge;import{Fragment as mo,jsx as Xe}from"react/jsx-runtime";var We="k-input-loading-icon",co=[l.disabled,l.loading],F=e=>{let{disabled:t,loading:o}=e;return t||!o?Xe(mo,{}):Xe("span",{className:n(e.className,We,"k-icon k-i-loading")})};F.states=co;F.className=We;import{Fragment as fo,jsx as Ye}from"react/jsx-runtime";var Qe="k-input-validation-icon",po=[l.valid,l.invalid,l.disabled,l.loading],uo={},z=e=>{let{valid:t,invalid:o,disabled:s,loading:i}=e,r=o?"warning-circle":"check-circle";return s||i||!!!(t||o)?Ye(fo,{}):Ye(k,{className:n(Qe),icon:r})};z.states=po;z.options=uo;z.className=Qe;import{Fragment as xo,jsx as Ze}from"react/jsx-runtime";var No="k-input-prefix",bo={direction:"horizontal"},ie=e=>{let{direction:t=bo.direction,...o}=e;return e.children?Ze("span",{...o,className:n(No,e.className,{[`k-input-prefix-${t}`]:t}),children:e.children}):Ze(xo,{})};import{Fragment as To,jsx as je}from"react/jsx-runtime";var ho="k-input-suffix",ko={direction:"horizontal"},se=e=>{let{direction:t=ko.direction,...o}=e;return e.children?je("span",{...o,className:n(ho,e.className,{[`k-input-suffix-${t}`]:t}),children:e.children}):je(To,{})};import{jsx as Ta}from"react/jsx-runtime";import{jsx as Sa}from"react/jsx-runtime";import{jsx as Io}from"react/jsx-runtime";var et="k-input-separator",go={direction:"vertical"},ve=e=>{let{direction:t=go.direction,...o}=e;return Io("span",{...o,className:n(et,e.className,{[`${et}-${t}`]:t})})};var Se="button",tt=Se;import{Fragment as ot,jsx as $,jsxs as nt}from"react/jsx-runtime";var Q="k-button",vo=["icon-button"],So=[l.hover,l.focus,l.active,l.selected,l.disabled,l.generating],Mo={size:[a.undefined,a.xsmall,a.small,a.medium,a.large],rounded:[u.undefined,u.none,u.small,u.medium,u.large,u.full],fillMode:[x.undefined,x.solid,x.flat,x.outline,x.clear,x.link],themeColor:[c.undefined,c.base,c.primary,c.secondary,c.tertiary,c.success,c.warning,c.error,c.info,c.inverse]},Me={showArrow:!1,arrowIconName:"chevron-down"},p=e=>{let{as:t="button",size:o,rounded:s,fillMode:i,themeColor:r,showArrow:d=Me.showArrow,arrowIconName:m=Me.arrowIconName,variant:f,hover:N,focus:b,active:T,selected:S,disabled:O,togglable:A,ariaDisabled:L,icon:g,iconSize:P,text:w,iconClassName:yt,className:At,...Ct}=e,Et=g!=null,Ot=e.children!==void 0;return nt(t,{className:n(At,Q,we(Q,f),h(Q,{size:o,rounded:s,fillMode:i,themeColor:r}),_(Q,{hover:N,focus:b,active:T,disabled:O||L,selected:S}),{"k-icon-button":!w&&!Ot&&Et}),"aria-pressed":A?S?"true":"false":void 0,...Ct,"aria-disabled":L?"true":void 0,disabled:O||void 0,children:[typeof g=="string"&&g&&$(k,{className:n(yt,"k-button-icon"),icon:g,size:P}),g&&typeof g!="string"&&$(ot,{children:g}),w?nt(ot,{children:[w&&$("span",{className:"k-button-text",children:w}),e.children]}):e.children&&$("span",{className:"k-button-text",children:e.children}),d&&$("span",{className:"k-menu-button-arrow k-button-arrow",children:$(k,{icon:m})})]})};p.states=So;p.options=Mo;p.variants=vo;p.className=Q;p.defaultOptions=Me;p.moduleName=Se;p.folderName=tt;p.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 yo}from"react/jsx-runtime";var re=e=>yo(p,{children:"Button",...e});import{Fragment as at,jsx as E,jsxs as ye}from"react/jsx-runtime";var Ao=I.states,Co=I.defaultOptions,Eo=I.options,Oo=[{name:"prefix",title:"Prefix"},{name:"suffix",title:"Suffix"},{name:"clear-button",title:"`Clear` Button"},{name:"validation-icon",title:"Validation Icon"},{name:"separators",title:"Separators"}],Lo=[],q=e=>{let{modifiers:t,valid:o,invalid:s,loading:i,disabled:r,readonly:d,...m}=e,f=t?.prefix,N=t?.suffix,b=t?.["clear-button"],T=t?.["validation-icon"],S=t?.separators;return ye(I,{...m,valid:o,invalid:s,loading:i,disabled:r,readonly:d,style:{width:300},children:[f&&ye(at,{children:[E(ie,{children:E(k,{icon:"lock"})}),S&&E(ve,{})]}),E(D,{placeholder:"Placeholder",value:"Value"}),T&&E(z,{valid:o,invalid:s,loading:i,disabled:r}),E(F,{loading:i,disabled:r}),b&&E(K,{loading:i,disabled:r,readonly:d,value:"Value"}),N&&ye(at,{children:[S&&E(ve,{}),E(se,{children:E(re,{size:m.size,fillMode:"clear",children:"Send"})})]})]})};q.options=Eo;q.states=Ao;q.variants=Lo;q.defaultOptions=Co;q.modifiers=Oo;q.className=I.className;import{jsx as Po}from"react/jsx-runtime";var it=e=>Po(p,{icon:"folder",...e,"aria-label":e["aria-label"]||"Folder",children:void 0});import{jsx as Ro}from"react/jsx-runtime";var st=e=>Ro(p,{icon:"folder",children:"Button",...e});import{jsx as Ae}from"react/jsx-runtime";var _o=p.options,Ho=p.states,Bo={...p.defaultOptions,variant:"text"},wo=[{name:"icon-only",title:"Icon Only"},{name:"icon-and-text",title:"Icon & Text"},{name:"text",title:"Text"}],Ko=[],G=e=>{let{variant:t,...o}=e;switch(t){case"icon-only":return Ae(it,{...o,icon:"star"});case"icon-and-text":return Ae(st,{...o,icon:"star",children:"Button"});default:return Ae(re,{...o,children:"Button"})}};G.options=_o;G.states=Ho;G.variants=wo;G.defaultOptions=Bo;G.modifiers=Ko;G.className=p.className;var Ce="popup",rt=Ce;import{jsx as lt}from"react/jsx-runtime";var ct="k-animation-container",Do=[],zo={},Ee={positionMode:"absolute",shown:!0},H=e=>{let{positionMode:t=Ee.positionMode,shown:o=Ee.shown,animationStyle:s,offset:i,...r}=e;return lt("div",{...r,style:{...i,...e.style},className:n(e.className,ct,{"k-animation-container-shown":o,"k-animation-container-fixed":t==="fixed"}),children:lt("div",{className:"k-child-animation-container",style:s,children:e.children})})};H.states=Do;H.options=zo;H.className=ct;H.defaultOptions=Ee;H.moduleName=Ce;H.folderName=rt;var Oe="popup",mt=Oe;import{jsx as dt}from"react/jsx-runtime";var pt="k-popup",Uo=[],Vo={},ut={positionMode:"absolute"},M=e=>{let{offset:t,positionMode:o=ut.positionMode,animationStyle:s,containerClassName:i,containerRole:r,containerAriaLabel:d,...m}=e;return dt(H,{positionMode:o,offset:t,animationStyle:s,className:i,role:r,"aria-label":d,children:dt("div",{...m,className:n(e.className,pt),children:e.children})})};M.states=Uo;M.options=Vo;M.className=pt;M.defaultOptions=ut;M.moduleName=Oe;M.folderName=mt;M.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 ft="time-selector",Nt="timeselector";import{Fragment as bt,jsx as le,jsxs as xt}from"react/jsx-runtime";var Le="k-timeselector",Fo=[],$o={size:[a.undefined,a.small,a.medium,a.large]},qo={},R=e=>{let{size:t,header:o,fastSelection:s,columns:i,focusedColumn:r,...d}=e,m=i.map(function(f,N){let b=!1,T=!0;return f===r&&(b=!0),(N===0||f==="tt")&&(T=!1),le(Pe,{type:f,focus:b,separator:T},N)});return xt("div",{...d,className:n(e.className,Le,h(Le,{size:t})),role:"group","aria-label":"Time selector",children:[le(bt,{children:o}),le(bt,{children:s}),xt("div",{className:"k-time-list-container",children:[le("span",{className:"k-time-highlight"}),m]})]})};R.states=Fo;R.options=$o;R.className=Le;R.defaultOptions=qo;R.moduleName=ft;R.folderName=Nt;R.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 Jo,jsx as U,jsxs as Re}from"react/jsx-runtime";var Go=[l.focus],Pe=e=>{let{type:t,focus:o,separator:s,...i}=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 m=d.map((f,N)=>U("li",{className:"k-item",role:"option","aria-selected":"false",children:U("span",{children:f})},N));return Re(Jo,{children:[s&&U("div",{className:"k-time-separator",children:":"}),Re("div",{...i,className:n(e.className,"k-time-list-wrapper",_("k-time-list-wrapper",{focus:o})),children:[U("span",{className:"k-title",children:r}),U("div",{className:"k-time-list",role:"listbox","aria-label":r,children:Re("div",{className:"k-content k-scrollable k-time-container",children:[U("ul",{className:"k-reset",style:{transform:"translateY(97px)"},role:"none",children:m}),U("div",{className:"k-scrollable-placeholder"})]})})]})]})};Pe.states=Go;import{jsx as as,jsxs as is}from"react/jsx-runtime";var _e="action-buttons",ht=_e;import{jsx as Yo}from"react/jsx-runtime";var ce="k-actions",Xo=[],Wo={},He={alignment:"start",orientation:"horizontal"},v=e=>{let{alignment:t=He.alignment,orientation:o=He.orientation,...s}=e;return Yo("div",{...s,className:n(ce,{[`${ce}-${t}`]:t,[`${ce}-${o}`]:o},e.className),children:e.children})};v.states=Xo;v.options=Wo;v.className=ce;v.defaultOptions=He;v.moduleName=_e;v.folderName=ht;import{jsx as Be,jsxs as Zo}from"react/jsx-runtime";var Qo="k-time-fast-selection",kt=e=>{let{...t}=e;return Zo(v,{...t,alignment:"start",className:n(e.className,Qo),children:[Be(p,{children:"1 d"}),Be(p,{children:"1 h"}),Be(p,{children:"15 m"})]})};import{Fragment as As,jsx as Ms,jsxs as ys}from"react/jsx-runtime";import{Fragment as ws,jsx as Hs,jsxs as Bs}from"react/jsx-runtime";import{Fragment as Js,jsx as qs,jsxs as Gs}from"react/jsx-runtime";var It="time-duration-picker",vt="timedurationpicker";import{Fragment as on,jsx as y,jsxs as me}from"react/jsx-runtime";var St="k-timedurationpicker",jo=[l.hover,l.focus,l.valid,l.invalid,l.required,l.disabled,l.loading,l.readonly],en={size:[a.undefined,a.small,a.medium,a.large],rounded:[u.undefined,u.none,u.small,u.medium,u.large,u.full],fillMode:[x.undefined,x.solid,x.flat,x.outline]},tn={},B=e=>{let{size:t,rounded:o,fillMode:s,prefix:i,suffix:r,value:d,placeholder:m,hover:f,focus:N,valid:b,invalid:T,required:S,loading:O,disabled:A,readonly:L,opened:g,...P}=e,w=Ke("timedurationpicker-popup");return me(on,{children:[me(I,{...P,size:t,rounded:o,fillMode:s,hover:f,focus:N,valid:b,invalid:T,required:S,loading:O,disabled:A,readonly:L,className:n(e.className,St),children:[y(ie,{children:i}),y(D,{placeholder:m,value:d,role:"combobox","aria-haspopup":"dialog","aria-expanded":g?"true":"false","aria-controls":g?w:void 0,"aria-invalid":T?"true":void 0,"aria-label":"Select time duration",disabled:A}),y(z,{valid:b,invalid:T,loading:O,disabled:A}),y(F,{loading:O,disabled:A}),y(K,{loading:O,disabled:A,readonly:L,value:d}),y(se,{children:r}),y(p,{className:"k-input-button",icon:"clock-arrow-rotate",size:t,fillMode:s,tabIndex:-1,"aria-label":"Select time duration",disabled:A})]}),g&&me(M,{id:w,className:"k-timedurationpicker-popup",children:[y(R,{columns:["dd","HH","mm"],focusedColumn:"HH",fastSelection:y(kt,{})}),me(v,{alignment:"stretched",className:"k-timeduration-footer",children:[y(p,{className:"k-time-cancel",children:"Cancel"}),y(p,{themeColor:"primary",className:"k-time-accept",children:"Set"})]})]})]})};B.states=jo;B.options=en;B.className=St;B.defaultOptions=tn;B.moduleName=It;B.folderName=vt;B.ariaSpec={selector:".k-timedurationpicker",rules:[{selector:".k-timedurationpicker .k-input-inner",attribute:"role=combobox",usage:"The input element follows the combobox specification."},{selector:".k-timedurationpicker .k-input-inner",attribute:"aria-haspopup=dialog",usage:"Indicates the component has a Dialog Popup."},{selector:".k-timedurationpicker .k-input-inner",attribute:"aria-expanded=true/false",usage:"Announces whether the Popup is visible or not."},{selector:".k-timedurationpicker .k-input-inner",attribute:"aria-controls (when open)",usage:"Points to the popup element."},{selector:".k-timedurationpicker .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-timedurationpicker .k-input-button",attribute:"tabindex=-1",usage:"Button element must not be focusable."},{selector:".k-timedurationpicker .k-input-button",attribute:"aria-label",usage:"The button needs an accessible name."},{selector:".k-timedurationpicker.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 Mt=B;import{jsx as nn}from"react/jsx-runtime";var fr=e=>nn(Mt,{opened:!0,...e});export{fr as TimeDurationPickerPopup};