UNPKG

@progress/kendo-themes-html

Version:

A collection of HTML helpers used for developing Kendo UI themes

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