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 St=Object.create;var de=Object.defineProperty;var Mt=Object.getOwnPropertyDescriptor;var Ct=Object.getOwnPropertyNames;var Ot=Object.getPrototypeOf,Et=Object.prototype.hasOwnProperty;var Lt=(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 Ct(e))!Et.call(t,n)&&n!==o&&de(t,n,{get:()=>e[n],enumerable:!(s=Mt(e,n))||s.enumerable});return t};var At=(t,e,o)=>(o=t!=null?St(Ot(t)):{},Fe(e||!t||!t.__esModule?de(o,"default",{value:t,enumerable:!0}):o,t)),Pt=t=>Fe(de({},"__esModule",{value:!0}),t);var Do={};Lt(Do,{CAPTCHA_CLASSNAME:()=>ye,Captcha:()=>K,default:()=>Vo});module.exports=Pt(Do);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 Y=require("react/jsx-runtime"),Ce="k-font-icon",wt=[],Bt={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]},_t={},Z=t=>{let{size:e,themeColor:o,icon:s,rotate:n,flip:d,...p}=t;return s?(0,Y.jsx)("span",{...p,className:r(t.className,Ce,g(Ce,{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,Y.jsx)(Y.Fragment,{})};Z.states=wt;Z.options=Bt;Z.className=Ce;Z.defaultOptions=_t;var Xe=Z;var R=require("react/jsx-runtime"),Oe="k-svg-icon",Kt=[],Rt={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]},Ee={viewBox:"0 0 24 24",variant:w.outline},j=t=>{var y,k;let{size:e,themeColor:o,rotate:s,flip:n,viewBox:d=Ee.viewBox,variant:p=Ee.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,Oe,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,Oe,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=Kt;j.options=Rt;j.className=Oe;j.defaultOptions=Ee;var Le=j;var Ae=At(require("@progress/kendo-svg-icons"));var qe="icon",Ge="icons";var Qe=require("react");var Je=require("react"),We=(0,Je.createContext)({iconsType:"svg"});var B=require("react/jsx-runtime"),pe="k-icon",zt=t=>t.replace(/([-_][a-z0-9])/gi,e=>e.toUpperCase().replace("-","").replace("_","")),Ht=[],Vt={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,Qe.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)(Le,{...b,className:r(t.className,pe),icon:n,size:o,variant:v});let k=Ae[n]?n:zt(`${n}-icon`);return Ae[k]?(0,B.jsx)(Le,{...b,className:r(t.className,pe),icon:Ae[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=Ht;x.options=Vt;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 Pe="button",Ye=Pe;var O=require("react/jsx-runtime"),ee="k-button",Dt=["icon-button"],Ut=[a.hover,a.focus,a.active,a.selected,a.disabled,a.generating],$t={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]},we={showArrow:!1,arrowIconName:"chevron-down"},f=t=>{let{as:e="button",size:o,rounded:s,fillMode:n,themeColor:d,showArrow:p=we.showArrow,arrowIconName:c=we.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:ke,...Te}=t,Se=M!=null,Me=t.children!==void 0;return(0,O.jsxs)(e,{className:r(ke,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&&!Me&&Se}),"aria-pressed":$?k?"true":"false":void 0,...Te,"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=Ut;f.options=$t;f.variants=Dt;f.className=ee;f.defaultOptions=we;f.moduleName=Pe;f.folderName=Ye;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"),Ft=f.options,Xt=f.states,qt={...f.defaultOptions,variant:"text"},Gt=[{name:"icon-only",title:"Icon Only"},{name:"icon-and-text",title:"Icon & Text"},{name:"text",title:"Text"}],Jt=[],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=Ft;F.states=Xt;F.variants=Gt;F.defaultOptions=qt;F.modifiers=Jt;F.className=f.className;var Be="textbox",nt=Be;var te="input",fe=te;var at=require("react/jsx-runtime"),xe="k-input",Wt=[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]},Yt={},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=Wt;C.options=Qt;C.className=xe;C.defaultOptions=Yt;C.moduleName=te;C.folderName=fe;var st=require("react/jsx-runtime"),be="k-picker",Zt=[a.hover,a.focus,a.valid,a.invalid,a.required,a.disabled,a.loading,a.readonly],jt={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]},eo={},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=Zt;X.options=jt;X.className=be;X.defaultOptions=eo;X.moduleName=te;X.folderName=fe;var q=require("react/jsx-runtime"),it="k-clear-value",to=[a.disabled,a.loading,a.readonly],oo={},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=to;H.options=oo;H.className=it;var rt=require("react/jsx-runtime"),_e="k-input-inner",no=[],ao={},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,_e,g(_e,t)),placeholder:s,autoComplete:n,defaultValue:e,disabled:d||void 0,readOnly:p||void 0})};V.states=no;V.options=ao;V.className=_e;var oe=require("react/jsx-runtime"),Ke="k-input-inner",so=[],io={},Re=t=>{let{value:e,placeholder:o,showValue:s,valueIcon:n,valueIconName:d,...p}=t;return(0,oe.jsxs)("span",{...p,className:r(t.className,Ke,g(Ke,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})]})};Re.states=so;Re.options=io;Re.className=Ke;var dt=require("react/jsx-runtime"),ze="k-input-inner",ro=[],lo={},lt={value:"",placeholder:""},He=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,ze,g(ze,t)),placeholder:o,rows:s,defaultValue:e,disabled:n||void 0})};He.states=ro;He.options=lo;He.className=ze;var ne=require("react/jsx-runtime"),ct="k-input-loading-icon",co=[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=co;G.className=ct;var ae=require("react/jsx-runtime"),pt="k-input-validation-icon",po=[a.valid,a.invalid,a.disabled,a.loading],uo={},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=po;D.options=uo;D.className=pt;var se=require("react/jsx-runtime"),mo="k-input-prefix",fo={direction:"horizontal"},Ne=t=>{let{direction:e=fo.direction,...o}=t;return t.children?(0,se.jsx)("span",{...o,className:r(mo,t.className,{[`k-input-prefix-${e}`]:e}),children:t.children}):(0,se.jsx)(se.Fragment,{})};var ie=require("react/jsx-runtime"),xo="k-input-suffix",bo={direction:"horizontal"},ve=t=>{let{direction:e=bo.direction,...o}=t;return t.children?(0,ie.jsx)("span",{...o,className:r(xo,t.className,{[`k-input-suffix-${e}`]:e}),children:t.children}):(0,ie.jsx)(ie.Fragment,{})};var ho=require("react/jsx-runtime");var No=require("react/jsx-runtime");var mt=require("react/jsx-runtime"),ut="k-input-separator",vo={direction:"vertical"},J=t=>{let{direction:e=vo.direction,...o}=t;return(0,mt.jsx)("span",{...o,className:r(ut,t.className,{[`${ut}-${e}`]:e})})};var h=require("react/jsx-runtime"),go=C.states,Io=C.defaultOptions,yo=C.options,ko=[{name:"prefix",title:"Prefix"},{name:"suffix",title:"Suffix"},{name:"clear-button",title:"`Clear` Button"},{name:"validation-icon",title:"Validation Icon"},{name:"separators",title:"Separators"}],To=[],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=yo;W.states=go;W.variants=To;W.defaultOptions=Io;W.modifiers=ko;W.className=C.className;var I=require("react/jsx-runtime"),ft="k-textbox",So=[a.hover,a.focus,a.valid,a.invalid,a.required,a.disabled,a.loading,a.readonly],Mo={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:ke,"aria-label":Te,"aria-describedby":Se,...Me}=t;return(0,I.jsxs)(C,{...Me,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:ke,placeholder:y,value:b,type:v,disabled:P,"aria-label":Te,"aria-describedby":Se,"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=So;T.options=Mo;T.className=ft;T.defaultOptions=ge;T.moduleName=Be;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 Co=require("react/jsx-runtime");var Ie=require("react/jsx-runtime"),Oo=T.states,Eo=T.defaultOptions,Lo=T.options,Ao=[{name:"prefix",title:"Prefix"},{name:"suffix",title:"Suffix"},{name:"clear-button",title:"`Clear` Button"}],Po=[],Q=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})};Q.options=Lo;Q.states=Oo;Q.variants=Po;Q.defaultOptions=Eo;Q.modifiers=Ao;Q.className=T.className;var Ve="skeleton",vt=Ve;var gt=require("react/jsx-runtime"),De="k-skeleton",wo=["circle","text","rect"],Bo=[],_o={},Ue={variant:"text",shape:"text",animation:"pulse"},L=t=>{let{variant:e,shape:o,animation:s=Ue.animation,...n}=t,d=`skeleton-${e||o||Ue.variant}`;return(0,gt.jsx)("span",{...n,className:r(t.className,De,ce(De,d),{[`k-skeleton-${s}`]:s}),style:t.style})};L.states=Bo;L.options=_o;L.variants=wo;L.className=De;L.defaultOptions=Ue;L.moduleName=Ve;L.folderName=vt;L.ariaSpec={selector:".k-skeleton",rules:[]};var Ko=require("react/jsx-runtime");var yt=require("react/jsx-runtime"),It=t=>(0,yt.jsx)(L,{shape:"rect",...t});var Ro=require("react/jsx-runtime");var $e="captcha",kt=$e;var S=require("react/jsx-runtime"),ye="k-captcha",zo=[a.loading,a.valid,a.invalid,a.disabled],Ho={},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,ye,_(ye,{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=zo;K.options=Ho;K.className=ye;K.defaultOptions=Tt;K.moduleName=$e;K.folderName=kt;var Vo=K;