UNPKG

@progress/kendo-themes-html

Version:

A collection of HTML helpers used for developing Kendo UI themes

2 lines (1 loc) 19.9 kB
var Mt=Object.create;var de=Object.defineProperty;var Ct=Object.getOwnPropertyDescriptor;var Ot=Object.getOwnPropertyNames;var Et=Object.getPrototypeOf,Lt=Object.prototype.hasOwnProperty;var At=(t,e)=>{for(var o in e)de(t,o,{get:e[o],enumerable:!0})},Fe=(t,e,o,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of Ot(e))!Lt.call(t,n)&&n!==o&&de(t,n,{get:()=>e[n],enumerable:!(s=Ct(e,n))||s.enumerable});return t};var Pt=(t,e,o)=>(o=t!=null?Mt(Et(t)):{},Fe(e||!t||!t.__esModule?de(o,"default",{value:t,enumerable:!0}):o,t)),wt=t=>Fe(de({},"__esModule",{value:!0}),t);var Uo={};At(Uo,{CaptchaNormal:()=>Do});module.exports=wt(Uo);var r=(...t)=>t.filter(e=>e!==!0&&!!e).map(e=>Array.isArray(e)?r(...e):typeof e=="object"?Object.keys(e).map((o,s)=>e[s]||e[o]&&o||null).filter(o=>o!==null).join(" "):e).filter(e=>!!e).join(" ");var g=(t,e)=>r({[`${t}-xs`]:e.size==="xsmall",[`${t}-sm`]:e.size==="small",[`${t}-md`]:e.size==="medium",[`${t}-lg`]:e.size==="large",[`${t}-xl`]:e.size==="xlarge",[`${t}-xxl`]:e.size==="xxlarge",[`${t}-xxxl`]:e.size==="xxxlarge"},{[`${t}-${e.fillMode}`]:e.fillMode},{[`${t}-${e.themeColor}`]:e.themeColor},{"k-rounded-sm":e.rounded==="small","k-rounded-md":e.rounded==="medium","k-rounded-lg":e.rounded==="large","k-rounded-full":e.rounded==="full","k-rounded-none":e.rounded==="none"}),_=(t,e)=>{let{valid:o,invalid:s,hover:n,focus:d,checked:p,active:c,selected:N,disabled:v,indeterminate:b,loading:y,empty:k,readonly:U,highlighted:$,...A}=e;return r({"k-valid":o,"k-invalid":s,"k-hover":n,"k-focus":d,"k-checked":p,"k-active":c,"k-selected":N,"k-disabled":v,"k-indeterminate":b&&!p,"k-loading":y,"k-empty":k,"k-readonly":U,"k-highlighted":$},Object.keys(A).reduce((M,E)=>(E.startsWith("k-")?M[E]=A[E]:M[`k-${E}`]=A[E],M),{}))};function ce(t,e){if(!e)return{};let o=Array.isArray(e)?e:[e];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"},m={undefined:void 0,solid:"solid",flat:"flat",outline:"outline",clear:"clear",link:"link"},w={undefined:void 0,outline:"outline",solid:"solid",duotone:"duotone"},l={undefined:void 0,inherit:"inherit",base:"base",primary:"primary",secondary:"secondary",tertiary:"tertiary",info:"info",success:"success",warning:"warning",error:"error",inverse:"inverse"},a={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 Q=require("react/jsx-runtime"),Me="k-font-icon",Bt=[],_t={size:[i.undefined,i.xsmall,i.small,i.medium,i.large,i.xlarge,i.xxlarge,i.xxxlarge],themeColor:[l.undefined,l.base,l.primary,l.secondary,l.tertiary,l.success,l.warning,l.error,l.info]},Kt={},Z=t=>{let{size:e,themeColor:o,icon:s,rotate:n,flip:d,...p}=t;return s?(0,Q.jsx)("span",{...p,className:r(t.className,Me,g(Me,{size:e}),{[`k-i-${s}`]:s,[`k-color-${o}`]:o,[`k-rotate-${n}`]:n,"k-flip-h":d==="h"||d==="both","k-flip-v":d==="v"||d==="both"}),"aria-hidden":"true"}):(0,Q.jsx)(Q.Fragment,{})};Z.states=Bt;Z.options=_t;Z.className=Me;Z.defaultOptions=Kt;var Xe=Z;var R=require("react/jsx-runtime"),Ce="k-svg-icon",Rt=[],zt={size:[i.undefined,i.xsmall,i.small,i.medium,i.large,i.xlarge,i.xxlarge,i.xxxlarge],themeColor:[l.undefined,l.base,l.primary,l.secondary,l.tertiary,l.success,l.warning,l.error,l.info],variant:[w.outline,w.solid,w.duotone]},Oe={viewBox:"0 0 24 24",variant:w.outline},j=t=>{var y,k;let{size:e,themeColor:o,rotate:s,flip:n,viewBox:d=Oe.viewBox,variant:p=Oe.variant,icon:c,...N}=t;if(!c)return(0,R.jsx)(R.Fragment,{});if(c==="none")return(0,R.jsx)("span",{...N,className:r(t.className,Ce,g("k-icon",{size:e}),"k-none"),"aria-hidden":"true"});let v=typeof c=="object"&&c.name&&c.name,b=typeof c=="object"?p&&((y=c.variants)==null?void 0:y[p])||((k=c.variants)==null?void 0:k.outline)||c.content:void 0;return(0,R.jsx)("span",{...N,className:r(t.className,Ce,g("k-icon",{size:e}),{[`k-svg-i-${v}`]:v,[`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,R.jsx)("svg",{"aria-hidden":!0,focusable:!1,xmlns:"http://www.w3.org/2000/svg",viewBox:typeof c=="object"?c.viewBox:d,dangerouslySetInnerHTML:b!==void 0?{__html:b}:void 0,children:c?void 0:t.children})})};j.states=Rt;j.options=zt;j.className=Ce;j.defaultOptions=Oe;var Ee=j;var Le=Pt(require("@progress/kendo-svg-icons"));var qe="icon",Ge="icons";var Ye=require("react");var Je=require("react"),We=(0,Je.createContext)({iconsType:"svg"});var B=require("react/jsx-runtime"),pe="k-icon",Ht=t=>t.replace(/([-_][a-z0-9])/gi,e=>e.toUpperCase().replace("-","").replace("_","")),Vt=[],Dt={size:[i.undefined,i.xsmall,i.small,i.medium,i.large,i.xlarge,i.xxlarge,i.xxxlarge],themeColor:[l.undefined,l.base,l.primary,l.secondary,l.tertiary,l.success,l.warning,l.error,l.info],variant:[w.outline,w.solid,w.duotone]},ue={viewBox:"0 0 24 24",type:"svg",variant:w.outline},x=t=>{let{iconsType:e}=(0,Ye.useContext)(We),{size:o,themeColor:s,icon:n,type:d=e||ue.type,rotate:p,flip:c,viewBox:N=ue.viewBox,variant:v=ue.variant,...b}=t;if(!n)return(0,B.jsx)(B.Fragment,{});if((e||d)==="svg"){if(n==="none")return(0,B.jsx)(Ee,{...b,className:r(t.className,pe),icon:n,size:o,variant:v});let k=Le[n]?n:Ht(`${n}-icon`);return Le[k]?(0,B.jsx)(Ee,{...b,className:r(t.className,pe),icon:Le[k],size:o,themeColor:s,rotate:p,flip:c,viewBox:N,variant:v}):(0,B.jsx)(B.Fragment,{})}return(0,B.jsx)(Xe,{...b,className:r(t.className,pe),icon:n,size:o,themeColor:s,rotate:p,flip:c})};x.states=Vt;x.options=Dt;x.defaultOptions=ue;x.className=pe;x.moduleName=qe;x.folderName=Ge;x.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 Ae="button",Qe=Ae;var O=require("react/jsx-runtime"),ee="k-button",Ut=["icon-button"],$t=[a.hover,a.focus,a.active,a.selected,a.disabled,a.generating],Ft={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:[m.undefined,m.solid,m.flat,m.outline,m.clear,m.link],themeColor:[l.undefined,l.base,l.primary,l.secondary,l.tertiary,l.success,l.warning,l.error,l.info,l.inverse]},Pe={showArrow:!1,arrowIconName:"chevron-down"},f=t=>{let{as:e="button",size:o,rounded:s,fillMode:n,themeColor:d,showArrow:p=Pe.showArrow,arrowIconName:c=Pe.arrowIconName,variant:N,hover:v,focus:b,active:y,selected:k,disabled:U,togglable:$,ariaDisabled:A,icon:M,iconSize:E,text:P,iconClassName:le,className:ye,...ke}=t,Te=M!=null,Se=t.children!==void 0;return(0,O.jsxs)(e,{className:r(ye,ee,ce(ee,N),g(ee,{size:o,rounded:s,fillMode:n,themeColor:d}),_(ee,{hover:v,focus:b,active:y,disabled:U||A,selected:k}),{"k-icon-button":!P&&!Se&&Te}),"aria-pressed":$?k?"true":"false":void 0,...ke,"aria-disabled":A?"true":void 0,disabled:U||void 0,children:[typeof M=="string"&&M&&(0,O.jsx)(x,{className:r(le,"k-button-icon"),icon:M,size:E}),M&&typeof M!="string"&&(0,O.jsx)(O.Fragment,{children:M}),P?(0,O.jsxs)(O.Fragment,{children:[P&&(0,O.jsx)("span",{className:"k-button-text",children:P}),t.children]}):t.children&&(0,O.jsx)("span",{className:"k-button-text",children:t.children}),p&&(0,O.jsx)("span",{className:"k-menu-button-arrow k-button-arrow",children:(0,O.jsx)(x,{icon:c})})]})};f.states=$t;f.options=Ft;f.variants=Ut;f.className=ee;f.defaultOptions=Pe;f.moduleName=Ae;f.folderName=Qe;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."}]};var je=require("react/jsx-runtime"),Ze=t=>(0,je.jsx)(f,{icon:"folder",...t,"aria-label":t["aria-label"]||"Folder",children:void 0});var tt=require("react/jsx-runtime"),et=t=>(0,tt.jsx)(f,{icon:"folder",children:"Button",...t});var ot=require("react/jsx-runtime"),z=t=>(0,ot.jsx)(f,{children:"Button",...t});var me=require("react/jsx-runtime"),Xt=f.options,qt=f.states,Gt={...f.defaultOptions,variant:"text"},Jt=[{name:"icon-only",title:"Icon Only"},{name:"icon-and-text",title:"Icon & Text"},{name:"text",title:"Text"}],Wt=[],F=t=>{let{variant:e,...o}=t;switch(e){case"icon-only":return(0,me.jsx)(Ze,{...o,icon:"star"});case"icon-and-text":return(0,me.jsx)(et,{...o,icon:"star",children:"Button"});default:return(0,me.jsx)(z,{...o,children:"Button"})}};F.options=Xt;F.states=qt;F.variants=Jt;F.defaultOptions=Gt;F.modifiers=Wt;F.className=f.className;var we="textbox",nt=we;var te="input",fe=te;var at=require("react/jsx-runtime"),xe="k-input",Yt=[a.hover,a.focus,a.valid,a.invalid,a.required,a.disabled,a.loading,a.readonly],Qt={size:[i.undefined,i.small,i.medium,i.large],rounded:[u.undefined,u.none,u.small,u.medium,u.large,u.full],fillMode:[m.undefined,m.solid,m.flat,m.outline]},Zt={},C=t=>{let{hover:e,focus:o,disabled:s,invalid:n,valid:d,loading:p,readonly:c,size:N,rounded:v,fillMode:b,...y}=t;return(0,at.jsx)("span",{...y,className:r(t.className,xe,g(xe,{size:N,rounded:v,fillMode:b}),_(xe,{hover:e,focus:o,disabled:s,invalid:n,valid:d,loading:p,readonly:c}))})};C.states=Yt;C.options=Qt;C.className=xe;C.defaultOptions=Zt;C.moduleName=te;C.folderName=fe;var st=require("react/jsx-runtime"),be="k-picker",jt=[a.hover,a.focus,a.valid,a.invalid,a.required,a.disabled,a.loading,a.readonly],eo={size:[i.undefined,i.small,i.medium,i.large],rounded:[u.undefined,u.none,u.small,u.medium,u.large,u.full],fillMode:[m.undefined,m.solid,m.flat,m.outline]},to={},X=t=>{let{hover:e,focus:o,disabled:s,invalid:n,valid:d,loading:p,readonly:c,size:N,rounded:v,fillMode:b,...y}=t;return(0,st.jsx)("span",{...y,className:r(t.className,be,g(be,{size:N,rounded:v,fillMode:b}),_(be,{hover:e,focus:o,disabled:s,invalid:n,valid:d,loading:p,readonly:c})),children:t.children})};X.states=jt;X.options=eo;X.className=be;X.defaultOptions=to;X.moduleName=te;X.folderName=fe;var q=require("react/jsx-runtime"),it="k-clear-value",oo=[a.disabled,a.loading,a.readonly],no={},H=t=>{let{disabled:e,loading:o,readonly:s,value:n}=t;return e||s||o||!n?(0,q.jsx)(q.Fragment,{}):(0,q.jsx)("span",{className:r(t.className,it),children:(0,q.jsx)(x,{icon:"x"})})};H.states=oo;H.options=no;H.className=it;var rt=require("react/jsx-runtime"),Be="k-input-inner",ao=[],so={},he={type:"text",autocomplete:"off",value:"",placeholder:""},V=t=>{let{value:e=he.value,type:o=he.type,placeholder:s=he.placeholder,autocomplete:n=he.autocomplete,disabled:d,readOnly:p,...c}=t;return(0,rt.jsx)("input",{...c,type:o,className:r(t.className,Be,g(Be,t)),placeholder:s,autoComplete:n,defaultValue:e,disabled:d||void 0,readOnly:p||void 0})};V.states=ao;V.options=so;V.className=Be;var oe=require("react/jsx-runtime"),_e="k-input-inner",io=[],ro={},Ke=t=>{let{value:e,placeholder:o,showValue:s,valueIcon:n,valueIconName:d,...p}=t;return(0,oe.jsxs)("span",{...p,className:r(t.className,_e,g(_e,t)),children:[n,!n&&d&&(0,oe.jsx)(x,{className:"k-input-value-icon",icon:d}),s&&!e&&o,s&&e&&(0,oe.jsx)("span",{className:"k-input-value-text",children:e})]})};Ke.states=io;Ke.options=ro;Ke.className=_e;var dt=require("react/jsx-runtime"),Re="k-input-inner",lo=[],co={},lt={value:"",placeholder:""},ze=t=>{let{value:e=lt.value,placeholder:o=lt.placeholder,rows:s,disabled:n,...d}=t;return(0,dt.jsx)("textarea",{...d,className:r(t.className,Re,g(Re,t)),placeholder:o,rows:s,defaultValue:e,disabled:n||void 0})};ze.states=lo;ze.options=co;ze.className=Re;var ne=require("react/jsx-runtime"),ct="k-input-loading-icon",po=[a.disabled,a.loading],G=t=>{let{disabled:e,loading:o}=t;return e||!o?(0,ne.jsx)(ne.Fragment,{}):(0,ne.jsx)("span",{className:r(t.className,ct,"k-icon k-i-loading")})};G.states=po;G.className=ct;var ae=require("react/jsx-runtime"),pt="k-input-validation-icon",uo=[a.valid,a.invalid,a.disabled,a.loading],mo={},D=t=>{let{valid:e,invalid:o,disabled:s,loading:n}=t,d=o?"warning-circle":"check-circle";return s||n||!!!(e||o)?(0,ae.jsx)(ae.Fragment,{}):(0,ae.jsx)(x,{className:r(pt),icon:d})};D.states=uo;D.options=mo;D.className=pt;var se=require("react/jsx-runtime"),fo="k-input-prefix",xo={direction:"horizontal"},Ne=t=>{let{direction:e=xo.direction,...o}=t;return t.children?(0,se.jsx)("span",{...o,className:r(fo,t.className,{[`k-input-prefix-${e}`]:e}),children:t.children}):(0,se.jsx)(se.Fragment,{})};var ie=require("react/jsx-runtime"),bo="k-input-suffix",ho={direction:"horizontal"},ve=t=>{let{direction:e=ho.direction,...o}=t;return t.children?(0,ie.jsx)("span",{...o,className:r(bo,t.className,{[`k-input-suffix-${e}`]:e}),children:t.children}):(0,ie.jsx)(ie.Fragment,{})};var No=require("react/jsx-runtime");var vo=require("react/jsx-runtime");var mt=require("react/jsx-runtime"),ut="k-input-separator",go={direction:"vertical"},J=t=>{let{direction:e=go.direction,...o}=t;return(0,mt.jsx)("span",{...o,className:r(ut,t.className,{[`${ut}-${e}`]:e})})};var h=require("react/jsx-runtime"),Io=C.states,yo=C.defaultOptions,ko=C.options,To=[{name:"prefix",title:"Prefix"},{name:"suffix",title:"Suffix"},{name:"clear-button",title:"`Clear` Button"},{name:"validation-icon",title:"Validation Icon"},{name:"separators",title:"Separators"}],So=[],W=t=>{let{modifiers:e,valid:o,invalid:s,loading:n,disabled:d,readonly:p,...c}=t,N=e==null?void 0:e.prefix,v=e==null?void 0:e.suffix,b=e==null?void 0:e["clear-button"],y=e==null?void 0:e["validation-icon"],k=e==null?void 0:e.separators;return(0,h.jsxs)(C,{...c,valid:o,invalid:s,loading:n,disabled:d,readonly:p,style:{width:300},children:[N&&(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(Ne,{children:(0,h.jsx)(x,{icon:"lock"})}),k&&(0,h.jsx)(J,{})]}),(0,h.jsx)(V,{placeholder:"Placeholder",value:"Value"}),y&&(0,h.jsx)(D,{valid:o,invalid:s,loading:n,disabled:d}),(0,h.jsx)(G,{loading:n,disabled:d}),b&&(0,h.jsx)(H,{loading:n,disabled:d,readonly:p,value:"Value"}),v&&(0,h.jsxs)(h.Fragment,{children:[k&&(0,h.jsx)(J,{}),(0,h.jsx)(ve,{children:(0,h.jsx)(z,{size:c.size,fillMode:"clear",children:"Send"})})]})]})};W.options=ko;W.states=Io;W.variants=So;W.defaultOptions=yo;W.modifiers=To;W.className=C.className;var I=require("react/jsx-runtime"),ft="k-textbox",Mo=[a.hover,a.focus,a.valid,a.invalid,a.required,a.disabled,a.loading,a.readonly],Co={size:[i.undefined,i.small,i.medium,i.large],rounded:[u.undefined,u.none,u.small,u.medium,u.large,u.full],fillMode:[m.undefined,m.solid,m.flat,m.outline]},ge={showClearButton:!0,showValidationIcon:!0,separators:!0},T=t=>{let{size:e,rounded:o,fillMode:s,separators:n=ge.separators,showClearButton:d=ge.showClearButton,showValidationIcon:p=ge.showValidationIcon,prefix:c,suffix:N,type:v,value:b,placeholder:y,hover:k,focus:U,valid:$,invalid:A,required:M,loading:E,disabled:P,readonly:le,id:ye,"aria-label":ke,"aria-describedby":Te,...Se}=t;return(0,I.jsxs)(C,{...Se,size:e,rounded:o,fillMode:s,hover:k,focus:U,valid:$,invalid:A,required:M,loading:E,disabled:P,readonly:le,className:r(t.className,ft),children:[c&&(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(Ne,{children:c}),n&&(0,I.jsx)(J,{})]}),(0,I.jsx)(V,{id:ye,placeholder:y,value:b,type:v,disabled:P,"aria-label":ke,"aria-describedby":Te,"aria-invalid":A?"true":void 0}),p&&(0,I.jsx)(D,{valid:$,invalid:A,loading:E,disabled:P}),(0,I.jsx)(G,{loading:E,disabled:P}),d&&(0,I.jsx)(H,{loading:E,disabled:P,readonly:le,value:b}),N&&(0,I.jsxs)(I.Fragment,{children:[n&&(0,I.jsx)(J,{}),(0,I.jsx)(ve,{children:N})]})]})};T.states=Mo;T.options=Co;T.className=ft;T.defaultOptions=ge;T.moduleName=we;T.folderName=nt;T.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 re=T;var bt=require("react/jsx-runtime"),xt=t=>(0,bt.jsx)(re,{...t});var ht=require("react/jsx-runtime");var Nt=require("react/jsx-runtime");var Oo=require("react/jsx-runtime");var Ie=require("react/jsx-runtime"),Eo=T.states,Lo=T.defaultOptions,Ao=T.options,Po=[{name:"prefix",title:"Prefix"},{name:"suffix",title:"Suffix"},{name:"clear-button",title:"`Clear` Button"}],wo=[],Y=t=>{let{modifiers:e,...o}=t,s={};return Object.keys(e||{}).forEach(n=>{switch(n){case"prefix":s.prefix=e!=null&&e[n]?(0,Ie.jsx)(x,{icon:"lock"}):void 0;break;case"suffix":s.suffix=e!=null&&e[n]?(0,Ie.jsx)(z,{size:o.size,fillMode:"clear",children:"Send"}):void 0;break;case"clear-button":s.showClearButton=e==null?void 0:e[n];break;default:break}}),(0,Ie.jsx)(xt,{value:"Value",style:{width:300},...o,...s})};Y.options=Ao;Y.states=Eo;Y.variants=wo;Y.defaultOptions=Lo;Y.modifiers=Po;Y.className=T.className;var He="skeleton",vt=He;var gt=require("react/jsx-runtime"),Ve="k-skeleton",Bo=["circle","text","rect"],_o=[],Ko={},De={variant:"text",shape:"text",animation:"pulse"},L=t=>{let{variant:e,shape:o,animation:s=De.animation,...n}=t,d=`skeleton-${e||o||De.variant}`;return(0,gt.jsx)("span",{...n,className:r(t.className,Ve,ce(Ve,d),{[`k-skeleton-${s}`]:s}),style:t.style})};L.states=_o;L.options=Ko;L.variants=Bo;L.className=Ve;L.defaultOptions=De;L.moduleName=He;L.folderName=vt;L.ariaSpec={selector:".k-skeleton",rules:[]};var Ro=require("react/jsx-runtime");var yt=require("react/jsx-runtime"),It=t=>(0,yt.jsx)(L,{shape:"rect",...t});var zo=require("react/jsx-runtime");var Ue="captcha",kt=Ue;var S=require("react/jsx-runtime"),$e="k-captcha",Ho=[a.loading,a.valid,a.invalid,a.disabled],Vo={},Tt={imgPath:"/packages/html/assets/captcha.jpg"},K=t=>{let{value:e,valid:o,invalid:s,loading:n,disabled:d,imgPath:p=Tt.imgPath,...c}=t;return(0,S.jsxs)("div",{...c,className:r(t.className,$e,_($e,{disabled:d}),{"k-captcha-loading":n}),children:[(0,S.jsxs)("div",{className:"k-captcha-image-wrap k-hstack",children:[(0,S.jsxs)("div",{className:"k-captcha-image",children:[(0,S.jsx)("img",{className:r({"k-hidden":n}),src:p,alt:"Captcha image"}),n&&(0,S.jsx)(It,{style:{width:"100%",height:"100%"}})]}),(0,S.jsxs)("div",{className:"k-captcha-image-controls k-vstack",children:[(0,S.jsx)(f,{icon:"volume-up",disabled:n===!0,"aria-label":"Play audio"}),(0,S.jsx)(f,{icon:"arrow-rotate-cw",disabled:n===!0,"aria-label":"Refresh captcha"})]}),(0,S.jsx)("div",{className:"k-captcha-volume-control k-vstack k-pos-absolute k-hidden",children:(0,S.jsx)("div",{className:"k-slider k-slider-vertical"})})]}),(0,S.jsxs)("div",{className:"k-captcha-input k-vstack",children:[(0,S.jsx)(T,{value:e,valid:o,invalid:s,disabled:n===!0,"aria-label":"Captcha code"}),o&&!n&&(0,S.jsx)("span",{className:"k-captcha-validation-message !k-text-success",children:"Verification Success"})]})]})};K.states=Ho;K.options=Vo;K.className=$e;K.defaultOptions=Tt;K.moduleName=Ue;K.folderName=kt;var St=require("react/jsx-runtime"),Do=t=>(0,St.jsx)(K,{value:"YR890",...t});