@progress/kendo-themes-html
Version:
A collection of HTML helpers used for developing Kendo UI themes
2 lines (1 loc) • 15 kB
JavaScript
var mt=Object.create;var ne=Object.defineProperty;var ut=Object.getOwnPropertyDescriptor;var ct=Object.getOwnPropertyNames;var ft=Object.getPrototypeOf,xt=Object.prototype.hasOwnProperty;var Nt=(e,t)=>{for(var o in t)ne(e,o,{get:t[o],enumerable:!0})},Ae=(e,t,o,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of ct(t))!xt.call(e,i)&&i!==o&&ne(e,i,{get:()=>t[i],enumerable:!(s=ut(t,i))||s.enumerable});return e};var Tt=(e,t,o)=>(o=e!=null?mt(ft(e)):{},Ae(t||!e||!e.__esModule?ne(o,"default",{value:e,enumerable:!0}):o,e)),It=e=>Ae(ne({},"__esModule",{value:!0}),e);var To={};Nt(To,{OneTimePasswordNormal:()=>No});module.exports=It(To);var r=(...e)=>e.filter(t=>t!==!0&&!!t).map(t=>Array.isArray(t)?r(...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 c=(e,t)=>r({[`${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.fillMode}-${t.themeColor}`]:t.fillMode&&t.themeColor},{[`${e}-${t.themeColor}`]:t.themeColor&&t.fillMode===void 0},{"k-rounded-sm":t.rounded==="small","k-rounded-md":t.rounded==="medium","k-rounded-lg":t.rounded==="large","k-rounded-full":t.rounded==="full"}),E=(e,t)=>{let{valid:o,invalid:s,hover:i,focus:d,checked:m,active:x,selected:f,disabled:I,indeterminate:h,loading:v,empty:z,readonly:L,highlighted:g,...C}=t;return r({"k-valid":o,"k-invalid":s,"k-hover":i,"k-focus":d,"k-checked":m,"k-active":x,"k-selected":f,"k-disabled":I,"k-indeterminate":h&&!m,"k-loading":v,"k-empty":z,"k-readonly":L,"k-highlighted":g},Object.keys(C).reduce((_,M)=>(M.startsWith("k-")?_[M]=C[M]:_[`k-${M}`]=C[M],_),{}))};function Ce(e,t){if(!t)return{};let o=Array.isArray(t)?t:[t];return Object.fromEntries(o.map(s=>[`k-${s}`,!0]))}var a={xsmall:"xsmall",small:"small",medium:"medium",large:"large",xlarge:"xlarge",xxlarge:"xxlarge",xxxlarge:"xxxlarge"},u={small:"small",medium:"medium",large:"large",full:"full"},p={solid:"solid",flat:"flat",outline:"outline",clear:"clear",link:"link"},l={inherit:"inherit",base:"base",primary:"primary",secondary:"secondary",tertiary:"tertiary",info:"info",success:"success",warning:"warning",error:"error",dark:"dark",light:"light",inverse:"inverse"},n={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 _e=require("react/jsx-runtime"),se="k-otp",Mt=[n.invalid],bt={size:[a.small,a.medium,a.large]},ze={size:a.medium},y=e=>{let{size:t=ze.size,invalid:o,...s}=e;return(0,_e.jsx)("div",{...s,className:r(e.className,se,c(se,{size:t}),E(se,{invalid:o})),children:e.children})};y.states=Mt;y.options=bt;y.className=se;y.defaultOptions=ze;y.moduleName="otp";y.folderName="otp";var xe="textbox",Ke=xe;var F="input",ae=F;var Re=require("react/jsx-runtime"),re="k-input",vt=[n.hover,n.focus,n.valid,n.invalid,n.required,n.disabled,n.loading,n.readonly],gt={size:[a.small,a.medium,a.large],rounded:[u.small,u.medium,u.large,u.full],fillMode:[p.solid,p.flat,p.outline]},ie={size:a.medium,rounded:a.medium,fillMode:p.solid},S=e=>{let{hover:t,focus:o,disabled:s,invalid:i,valid:d,loading:m,readonly:x,size:f=ie.size,rounded:I=ie.rounded,fillMode:h=ie.fillMode,...v}=e;return(0,Re.jsx)("span",{...v,className:r(e.className,re,c(re,{size:f,rounded:I,fillMode:h}),E(re,{hover:t,focus:o,disabled:s,invalid:i,valid:d,loading:m,readonly:x}))})};S.states=vt;S.options=gt;S.className=re;S.defaultOptions=ie;S.moduleName=F;S.folderName=ae;var He=require("react/jsx-runtime"),le="k-picker",yt=[n.hover,n.focus,n.valid,n.invalid,n.required,n.disabled,n.loading,n.readonly],St={size:[a.small,a.medium,a.large],rounded:[u.small,u.medium,u.large,u.full],fillMode:[p.solid,p.flat,p.outline]},de={size:a.medium,rounded:u.medium,fillMode:p.solid},D=e=>{let{hover:t,focus:o,disabled:s,invalid:i,valid:d,loading:m,readonly:x,size:f=de.size,rounded:I=de.rounded,fillMode:h=de.fillMode,...v}=e;return(0,He.jsx)("span",{...v,className:r(e.className,le,c(le,{size:f,rounded:I,fillMode:h}),E(le,{hover:t,focus:o,disabled:s,invalid:i,valid:d,loading:m,readonly:x})),children:e.children})};D.states=yt;D.options=St;D.className=le;D.defaultOptions=de;D.moduleName=F;D.folderName=ae;var G=require("react/jsx-runtime"),Ne="k-font-icon",Pt=[],wt={size:[a.xsmall,a.small,a.medium,a.large,a.xlarge,a.xxlarge,a.xxxlarge],themeColor:[l.base,l.primary,l.secondary,l.tertiary,l.success,l.warning,l.error,l.info,l.light,l.dark]},Et={},X=e=>{let{size:t,themeColor:o,icon:s,rotate:i,flip:d,...m}=e;return s?(0,G.jsx)("span",{...m,className:r(e.className,Ne,c(Ne,{size:t}),{[`k-i-${s}`]:s,[`k-color-${o}`]:o,[`k-rotate-${i}`]:i,"k-flip-h":d==="h"||d==="both","k-flip-v":d==="v"||d==="both"})}):(0,G.jsx)(G.Fragment,{})};X.states=Pt;X.options=wt;X.className=Ne;X.defaultOptions=Et;var Be=X;var K=require("react/jsx-runtime"),Te="k-svg-icon",kt=[],Lt={size:[a.xsmall,a.small,a.medium,a.large,a.xlarge,a.xxlarge,a.xxxlarge],themeColor:[l.base,l.primary,l.secondary,l.tertiary,l.success,l.warning,l.error,l.info,l.light,l.dark]},De={viewBox:"0 0 24 24"},q=e=>{let{size:t,themeColor:o,rotate:s,flip:i,viewBox:d=De.viewBox,icon:m,...x}=e;if(!m)return(0,K.jsx)(K.Fragment,{});m==="none"&&{...x,className:r(e.className,Te,"k-none")};let f=typeof m=="object"&&m.name&&m.name;return(0,K.jsx)("span",{...x,className:r(e.className,Te,c("k-icon",{size:t}),{[`k-svg-i-${f}`]:f,[`k-color-${o}`]:o,[`k-rotate-${s}`]:s,"k-flip-h":i==="h"||i==="both","k-flip-v":i==="v"||i==="both"}),children:(0,K.jsx)("svg",{"aria-hidden":!0,focusable:!1,xmlns:"http://www.w3.org/2000/svg",viewBox:typeof m=="object"?m.viewBox:d,dangerouslySetInnerHTML:typeof m=="object"?{__html:m.content}:void 0,children:m?void 0:e.children})})};q.states=kt;q.options=Lt;q.className=Te;q.defaultOptions=De;var Ie=q;var Oe=Tt(require("@progress/kendo-svg-icons"));var Ue="icon",Ve="icons";var A=require("react/jsx-runtime"),pe="k-icon",At=e=>e.replace(/([-_][a-z0-9])/gi,t=>t.toUpperCase().replace("-","").replace("_","")),Ct=[],zt={size:[a.xsmall,a.small,a.medium,a.large,a.xlarge,a.xxlarge,a.xxxlarge],themeColor:[l.base,l.primary,l.secondary,l.tertiary,l.success,l.warning,l.error,l.info,l.light,l.dark]},he={viewBox:"0 0 24 24",type:"svg"},N=e=>{let{size:t,themeColor:o,icon:s,type:i=he.type,rotate:d,flip:m,viewBox:x=he.viewBox,...f}=e;if(!s)return(0,A.jsx)(A.Fragment,{});if(i==="svg"){if(s==="none")return(0,A.jsx)(Ie,{...f,className:r(e.className,pe),icon:s,size:t});let I=Oe[s]?s:At(`${s}-icon`);return Oe[I]?(0,A.jsx)(Ie,{...f,className:r(e.className,pe),icon:Oe[I],size:t,themeColor:o,rotate:d,flip:m,viewBox:x}):(0,A.jsx)(A.Fragment,{})}return(0,A.jsx)(Be,{...f,className:r(e.className,pe),icon:s,size:t,themeColor:o,rotate:d,flip:m})};N.states=Ct;N.options=zt;N.defaultOptions=he;N.className=pe;N.moduleName=Ue;N.folderName=Ve;var U=require("react/jsx-runtime"),$e="k-clear-value",_t=[n.disabled,n.loading,n.readonly],Kt={},W=e=>{let{disabled:t,loading:o,readonly:s,value:i}=e;return t||s||o||!i?(0,U.jsx)(U.Fragment,{}):(0,U.jsx)("span",{className:r(e.className,$e),children:(0,U.jsx)(N,{icon:"x"})})};W.states=_t;W.options=Kt;W.className=$e;var Fe=require("react/jsx-runtime"),Me="k-input-inner",Rt=[],Ht={},me={type:"text",autocomplete:"off",value:"",placeholder:""},J=e=>{let{value:t=me.value,type:o=me.type,placeholder:s=me.placeholder,autocomplete:i=me.autocomplete,...d}=e;return(0,Fe.jsx)("input",{...d,type:o,className:r(e.className,Me,c(Me,e)),placeholder:s,autoComplete:i,defaultValue:t})};J.states=Rt;J.options=Ht;J.className=Me;var Q=require("react/jsx-runtime"),be="k-input-inner",Bt=[],Dt={},ve=e=>{let{value:t,placeholder:o,showValue:s,valueIcon:i,valueIconName:d,...m}=e;return(0,Q.jsxs)("span",{...m,className:r(e.className,be,c(be,e)),children:[i,!i&&d&&(0,Q.jsx)(N,{className:"k-input-value-icon",icon:d}),s&&!t&&o,s&&t&&(0,Q.jsx)("span",{className:"k-input-value-text",children:t})]})};ve.states=Bt;ve.options=Dt;ve.className=be;var Xe=require("react/jsx-runtime"),ge="k-input-inner",Ut=[],Vt={},Ge={value:"",placeholder:""},ye=e=>{let{value:t=Ge.value,placeholder:o=Ge.placeholder,rows:s,...i}=e;return(0,Xe.jsx)("textarea",{...i,className:r(e.className,ge,c(ge,e)),placeholder:o,rows:s,defaultValue:t})};ye.states=Ut;ye.options=Vt;ye.className=ge;var Y=require("react/jsx-runtime"),qe="k-input-loading-icon",$t=[n.disabled,n.loading],ue=e=>{let{disabled:t,loading:o}=e;return t||!o?(0,Y.jsx)(Y.Fragment,{}):(0,Y.jsx)("span",{className:r(e.className,qe,"k-icon k-i-loading")})};ue.states=$t;ue.className=qe;var Z=require("react/jsx-runtime"),We="k-input-validation-icon",Ft=[n.valid,n.invalid,n.disabled,n.loading],Gt={},j=e=>{let{valid:t,invalid:o,disabled:s,loading:i}=e,d=o?"warning-circle":"check-circle";return s||i||!!!(t||o)?(0,Z.jsx)(Z.Fragment,{}):(0,Z.jsx)(N,{className:r(We),icon:d})};j.states=Ft;j.options=Gt;j.className=We;var ee=require("react/jsx-runtime"),Xt="k-input-prefix",qt={direction:"horizontal"},Je=e=>{let{direction:t=qt.direction,...o}=e;return e.children?(0,ee.jsx)("span",{...o,className:r(Xt,e.className,{[`k-input-prefix-${t}`]:t}),children:e.children}):(0,ee.jsx)(ee.Fragment,{})};var te=require("react/jsx-runtime"),Wt="k-input-suffix",Jt={direction:"horizontal"},Qe=e=>{let{direction:t=Jt.direction,...o}=e;return e.children?(0,te.jsx)("span",{...o,className:r(Wt,e.className,{[`k-input-suffix-${t}`]:t}),children:e.children}):(0,te.jsx)(te.Fragment,{})};var Qt=require("react/jsx-runtime");var Yt=require("react/jsx-runtime");var Ze=require("react/jsx-runtime"),Ye="k-input-separator",Zt={direction:"vertical"},Se=e=>{let{direction:t=Zt.direction,...o}=e;return(0,Ze.jsx)("span",{...o,className:r(Ye,e.className,{[`${Ye}-${t}`]:t})})};var T=require("react/jsx-runtime"),je="k-textbox",jt=[n.hover,n.focus,n.valid,n.invalid,n.required,n.disabled,n.loading,n.readonly],eo={size:[a.small,a.medium,a.large],rounded:[u.small,u.medium,u.large,u.full],fillMode:[p.solid,p.flat,p.outline]},R={showClearButton:!0,showValidationIcon:!0,size:S.defaultOptions.size,rounded:S.defaultOptions.rounded,fillMode:S.defaultOptions.fillMode,separators:!0},P=e=>{let{size:t=R.size,rounded:o=R.rounded,fillMode:s=R.fillMode,separators:i=R.separators,showClearButton:d=R.showClearButton,showValidationIcon:m=R.showValidationIcon,prefix:x,suffix:f,type:I,value:h,placeholder:v,hover:z,focus:L,valid:g,invalid:C,required:_,loading:M,disabled:B,readonly:Le,...pt}=e;return(0,T.jsxs)(S,{...pt,size:t,rounded:o,fillMode:s,hover:z,focus:L,valid:g,invalid:C,required:_,loading:M,disabled:B,readonly:Le,className:r(e.className,je),children:[x&&(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(Je,{children:x}),i&&(0,T.jsx)(Se,{})]}),(0,T.jsx)(J,{placeholder:v,value:h,type:I}),m&&(0,T.jsx)(j,{valid:g,invalid:C,loading:M,disabled:B}),(0,T.jsx)(ue,{loading:M,disabled:B}),d&&(0,T.jsx)(W,{loading:M,disabled:B,readonly:Le,value:h}),f&&(0,T.jsxs)(T.Fragment,{children:[i&&(0,T.jsx)(Se,{}),(0,T.jsx)(Qe,{children:f})]})]})};P.states=jt;P.options=eo;P.className=je;P.defaultOptions=R;P.moduleName=xe;P.folderName=Ke;var to=require("react/jsx-runtime");var tt=require("react/jsx-runtime");var Pe="button",ot=Pe;var w=require("react/jsx-runtime"),oe="k-button",oo=["icon-button"],no=[n.hover,n.focus,n.active,n.selected,n.disabled,n.generating],so={size:[a.small,a.medium,a.large],rounded:[u.small,u.medium,u.large,u.full],fillMode:[p.solid,p.flat,p.outline,p.clear,p.link],themeColor:[l.base,l.primary,l.secondary,l.tertiary,l.success,l.warning,l.error,l.info,l.light,l.dark,l.inverse]},H={size:a.medium,rounded:u.medium,fillMode:p.solid,themeColor:l.base,showArrow:!1,arrowIconName:"caret-alt-down"},k=e=>{let{size:t=H.size,rounded:o=H.rounded,fillMode:s=H.fillMode,themeColor:i=H.themeColor,showArrow:d=H.showArrow,arrowIconName:m=H.arrowIconName,variant:x,hover:f,focus:I,active:h,selected:v,disabled:z,icon:L,text:g,iconClassName:C,..._}=e,M=L!==void 0,B=e.children!==void 0;return(0,w.jsxs)("button",{..._,className:r(e.className,oe,Ce(oe,x),c(oe,{size:t,rounded:o,fillMode:s,themeColor:i}),E(oe,{hover:f,focus:I,active:h,disabled:z,selected:v}),{"k-icon-button":!g&&!B&&M}),children:[L&&(0,w.jsx)(N,{className:r(C,"k-button-icon"),icon:L}),g?(0,w.jsxs)(w.Fragment,{children:[g&&(0,w.jsx)("span",{className:"k-button-text",children:g}),e.children]}):e.children&&(0,w.jsx)("span",{className:"k-button-text",children:e.children}),d&&(0,w.jsx)("span",{className:"k-menu-button-arrow k-button-arrow",children:(0,w.jsx)(N,{icon:m})})]})};k.states=no;k.options=so;k.variants=oo;k.className=oe;k.defaultOptions=H;k.moduleName=Pe;k.folderName=ot;var ao=require("react/jsx-runtime");var ro=require("react/jsx-runtime");var io=require("react/jsx-runtime");var nt=require("react/jsx-runtime");var at=require("react/jsx-runtime"),st="k-otp-input",lo=[n.hover,n.focus,n.valid,n.invalid,n.required,n.disabled,n.readonly],po={size:[a.small,a.medium,a.large],rounded:[u.small,u.medium,u.large,u.full],fillMode:[p.solid,p.flat,p.outline]},ce={size:P.defaultOptions.size,rounded:P.defaultOptions.rounded,fillMode:P.defaultOptions.fillMode},O=e=>{let{size:t=ce.size,rounded:o=ce.rounded,fillMode:s=ce.fillMode,type:i,value:d,placeholder:m,hover:x,focus:f,valid:I,invalid:h,required:v,disabled:z,readonly:L,...g}=e;return(0,at.jsx)(P,{...g,size:t,rounded:o,fillMode:s,type:i,value:d,placeholder:m,hover:x,focus:f,valid:I,invalid:h,required:v,disabled:z,readonly:L,showClearButton:!1,showValidationIcon:!1,className:r(e.className,st)})};O.states=lo;O.options=po;O.className=st;O.defaultOptions=ce;var it=require("react/jsx-runtime"),rt="k-otp-separator",mo=[],uo={},co={},V=e=>{let{children:t,...o}=e;return(0,it.jsx)("div",{...o,className:r(e.className,rt),children:t})};V.states=mo;V.options=uo;V.className=rt;V.defaultOptions=co;var dt=require("react/jsx-runtime"),fe="k-input-group",fo=[n.disabled],xo={fillMode:[p.solid,p.flat,p.outline,p.clear,p.link]},lt={fillMode:p.solid},$=e=>{let{fillMode:t=lt.fillMode,disabled:o,...s}=e;return(0,dt.jsx)("div",{...s,className:r(e.className,fe,c(fe,{fillMode:t}),E(fe,{disabled:o})),children:e.children})};$.states=fo;$.options=xo;$.className=fe;$.defaultOptions=lt;var we=require("react/jsx-runtime");var Ee=require("react/jsx-runtime");var ke=require("react/jsx-runtime");var b=require("react/jsx-runtime"),No=({hover:e,focus:t,invalid:o,fillMode:s,size:i,...d})=>(0,b.jsx)(y,{invalid:o,size:i,children:(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(O,{size:i,fillMode:s,invalid:o,focus:t,hover:e,...d}),(0,b.jsx)(O,{size:i,fillMode:s,invalid:o,...d}),(0,b.jsx)(O,{size:i,fillMode:s,invalid:o,...d}),(0,b.jsx)(O,{size:i,fillMode:s,invalid:o,...d}),(0,b.jsx)(O,{size:i,fillMode:s,invalid:o,...d}),(0,b.jsx)(O,{size:i,fillMode:s,invalid:o,...d})]})});