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