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