UNPKG

@progress/kendo-themes-html

Version:

A collection of HTML helpers used for developing Kendo UI themes

2 lines (1 loc) 9.35 kB
var Ne=Object.create;var R=Object.defineProperty;var be=Object.getOwnPropertyDescriptor;var Se=Object.getOwnPropertyNames;var ke=Object.getPrototypeOf,Me=Object.prototype.hasOwnProperty;var ze=(t,e)=>{for(var o in e)R(t,o,{get:e[o],enumerable:!0})},ee=(t,e,o,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Se(e))!Me.call(t,i)&&i!==o&&R(t,i,{get:()=>e[i],enumerable:!(s=be(e,i))||s.enumerable});return t};var Te=(t,e,o)=>(o=t!=null?Ne(ke(t)):{},ee(e||!t||!t.__esModule?R(o,"default",{value:t,enumerable:!0}):o,t)),Le=t=>ee(R({},"__esModule",{value:!0}),t);var at={};ze(at,{SearchboxNormal:()=>nt});module.exports=Le(at);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 u=(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.fillMode}-${e.themeColor}`]:e.fillMode&&e.themeColor},{[`${t}-${e.themeColor}`]:e.themeColor&&e.fillMode===void 0},{"k-rounded-sm":e.rounded==="small","k-rounded-md":e.rounded==="medium","k-rounded-lg":e.rounded==="large","k-rounded-full":e.rounded==="full"}),E=(t,e)=>r({"k-valid":e.valid,"k-invalid":e.invalid,"k-hover":e.hover,"k-focus":e.focus,"k-checked":e.checked,"k-active":e.active,"k-selected":e.selected,"k-disabled":e.disabled,"k-indeterminate":e.indeterminate&&!e.checked,"k-loading":e.loading,"k-empty":e.empty,"k-readonly":e.readonly,"k-highlighted":e.highlighted});var n={xsmall:"xsmall",small:"small",medium:"medium",large:"large",xlarge:"xlarge",xxlarge:"xxlarge",xxxlarge:"xxxlarge"},p={small:"small",medium:"medium",large:"large",full:"full"},m={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"},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"};var te=require("react/jsx-runtime"),$="k-input",Oe=[a.hover,a.focus,a.valid,a.invalid,a.required,a.disabled,a.loading,a.readonly],Ce={size:[n.small,n.medium,n.large],rounded:[p.small,p.medium,p.large,p.full],fillMode:[m.solid,m.flat,m.outline]},V={size:n.medium,rounded:n.medium,fillMode:m.solid},g=t=>{let{hover:e,focus:o,disabled:s,invalid:i,valid:d,loading:c,readonly:h,size:f=V.size,rounded:v=V.rounded,fillMode:S=V.fillMode,...k}=t;return(0,te.jsx)("span",{...k,className:r(t.className,$,u($,{size:f,rounded:v,fillMode:S}),E($,{hover:e,focus:o,disabled:s,invalid:i,valid:d,loading:c,readonly:h}))})};g.states=Oe;g.options=Ce;g.className=$;g.defaultOptions=V;var oe=require("react/jsx-runtime"),K="k-picker",He=[a.hover,a.focus,a.valid,a.invalid,a.required,a.disabled,a.loading,a.readonly],Ae={size:[n.small,n.medium,n.large],rounded:[p.small,p.medium,p.large,p.full],fillMode:[m.solid,m.flat,m.outline]},B={size:n.medium,rounded:p.medium,fillMode:m.solid},F=t=>{let{hover:e,focus:o,disabled:s,invalid:i,valid:d,loading:c,readonly:h,size:f=B.size,rounded:v=B.rounded,fillMode:S=B.fillMode,...k}=t;return(0,oe.jsx)("span",{...k,className:r(t.className,K,u(K,{size:f,rounded:v,fillMode:S}),E(K,{hover:e,focus:o,disabled:s,invalid:i,valid:d,loading:c,readonly:h})),children:t.children})};F.states=He;F.options=Ae;F.className=K;F.defaultOptions=B;var M=require("react/jsx-runtime"),G="k-icon k-font-icon",we=[],Pe={size:[n.xsmall,n.small,n.medium,n.large,n.xlarge,n.xxlarge,n.xxxlarge],themeColor:[l.base,l.primary,l.secondary,l.tertiary,l.success,l.warning,l.error,l.info,l.light,l.dark]},Re={},z=t=>{let{size:e,themeColor:o,icon:s,rotate:i,flip:d,...c}=t;return s?(0,M.jsx)("span",{...c,className:r(t.className,G,u(G,{size:e}),{[`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,M.jsx)(M.Fragment,{})};z.states=we;z.options=Pe;z.className=G;z.defaultOptions=Re;var ne=z;var N=require("react/jsx-runtime"),U="k-icon k-svg-icon",Ee=[],$e={size:[n.xsmall,n.small,n.medium,n.large,n.xlarge,n.xxlarge,n.xxxlarge],themeColor:[l.base,l.primary,l.secondary,l.tertiary,l.success,l.warning,l.error,l.info,l.light,l.dark]},ae={viewBox:"0 0 24 24"},T=t=>{let{size:e,themeColor:o,rotate:s,flip:i,viewBox:d=ae.viewBox,icon:c,...h}=t;if(!c)return(0,N.jsx)(N.Fragment,{});c==="none"&&{...h,className:r(t.className,U,"k-none")};let f=typeof c=="object"&&c.name&&c.name;return(0,N.jsx)("span",{...h,className:r(t.className,U,u("k-icon",{size:e}),{[`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,N.jsx)("svg",{"aria-hidden":!0,focusable:!1,xmlns:"http://www.w3.org/2000/svg",viewBox:typeof c=="object"?c.viewBox:d,dangerouslySetInnerHTML:typeof c=="object"?{__html:c.content}:void 0,children:c?void 0:t.children})})};T.states=Ee;T.options=$e;T.className=U;T.defaultOptions=ae;var D=T;var se=Te(require("@progress/kendo-svg-icons")),I=require("react/jsx-runtime"),Ve=t=>t.replace(/([-_][a-z0-9])/gi,e=>e.toUpperCase().replace("-","").replace("_","")),Ke=[],Be={size:[n.xsmall,n.small,n.medium,n.large,n.xlarge,n.xxlarge,n.xxxlarge],themeColor:[l.base,l.primary,l.secondary,l.tertiary,l.success,l.warning,l.error,l.info,l.light,l.dark]},X={viewBox:"0 0 24 24",type:"svg"},x=t=>{let{size:e,themeColor:o,icon:s,type:i=X.type,rotate:d,flip:c,viewBox:h=X.viewBox,...f}=t;if(!s)return(0,I.jsx)(I.Fragment,{});if(i==="svg"){if(s==="none")return(0,I.jsx)(D,{...f,icon:s,size:e});let v=Ve(`${s}-icon`);return se[v]?(0,I.jsx)(D,{...f,icon:se[v],size:e,themeColor:o,rotate:d,flip:c,viewBox:h}):(0,I.jsx)(I.Fragment,{})}return(0,I.jsx)(ne,{...f,icon:s,size:e,themeColor:o,rotate:d,flip:c})};x.states=Ke;x.options=Be;x.defaultOptions=X;var b=require("react/jsx-runtime"),le="k-clear-value",Fe=[a.disabled,a.loading,a.readonly],_e={},L=t=>{let{disabled:e,loading:o,readonly:s,value:i}=t;return e||s||o||!i?(0,b.jsx)(b.Fragment,{}):(0,b.jsx)("span",{className:r(t.className,le),children:(0,b.jsx)(x,{icon:"x"})})};L.states=Fe;L.options=_e;L.className=le;var ie=require("react/jsx-runtime"),J="k-input-inner",qe=[],Ge={},_={type:"text",autocomplete:"off",value:"",placeholder:""},O=t=>{let{value:e=_.value,type:o=_.type,placeholder:s=_.placeholder,autocomplete:i=_.autocomplete,...d}=t;return(0,ie.jsx)("input",{...d,type:o,className:r(t.className,J,u(J,t)),placeholder:s,autoComplete:i,defaultValue:e})};O.states=qe;O.options=Ge;O.className=J;var C=require("react/jsx-runtime"),Q="k-input-inner",Ue=[],De={},W=t=>{let{value:e,placeholder:o,showValue:s,valueIcon:i,valueIconName:d,...c}=t;return(0,C.jsxs)("span",{...c,className:r(t.className,Q,u(Q,t)),children:[i,!i&&d&&(0,C.jsx)(x,{className:"k-input-value-icon",icon:d}),s&&!e&&o,s&&e&&(0,C.jsx)("span",{className:"k-input-value-text",children:e})]})};W.states=Ue;W.options=De;W.className=Q;var ce=require("react/jsx-runtime"),Y="k-input-inner",Xe=[],Je={},re={value:"",placeholder:""},Z=t=>{let{value:e=re.value,placeholder:o=re.placeholder,rows:s,...i}=t;return(0,ce.jsx)("textarea",{...i,className:r(t.className,Y,u(Y,t)),placeholder:o,rows:s,defaultValue:e})};Z.states=Xe;Z.options=Je;Z.className=Y;var H=require("react/jsx-runtime"),de="k-input-loading-icon",Qe=[a.disabled,a.loading],q=t=>{let{disabled:e,loading:o}=t;return e||!o?(0,H.jsx)(H.Fragment,{}):(0,H.jsx)("span",{className:r(t.className,de,"k-icon k-i-loading")})};q.states=Qe;q.className=de;var A=require("react/jsx-runtime"),pe="k-input-validation-icon",We=[a.valid,a.invalid,a.disabled,a.loading],Ye={},w=t=>{let{valid:e,invalid:o,disabled:s,loading:i}=t,d=o?"warning-circle":"check-circle";return s||i||!!!(e||o)?(0,A.jsx)(A.Fragment,{}):(0,A.jsx)(x,{className:r(pe),icon:d})};w.states=We;w.options=Ye;w.className=pe;var ue=require("react/jsx-runtime");var me=require("react/jsx-runtime");var Ze=require("react/jsx-runtime");var je=require("react/jsx-runtime");var et=require("react/jsx-runtime");var y=require("react/jsx-runtime"),fe="k-searchbox",tt=[a.hover,a.focus,a.valid,a.invalid,a.required,a.disabled,a.loading],ot={size:[n.small,n.medium,n.large],rounded:[p.small,p.medium,p.large,p.full],fillMode:[m.solid,m.flat,m.outline]},j={showIcon:!0,icon:"search",size:g.defaultOptions.size,rounded:g.defaultOptions.rounded,fillMode:g.defaultOptions.fillMode},P=t=>{let{value:e,placeholder:o,size:s,rounded:i,fillMode:d,hover:c,focus:h,valid:f,invalid:v,required:S,loading:k,disabled:ge,showIcon:Ie=j.showIcon,icon:ve=j.icon,...ye}=t;return(0,y.jsxs)(g,{...ye,size:s,rounded:i,fillMode:d,hover:c,focus:h,valid:f,invalid:v,required:S,loading:k,disabled:ge,className:r(t.className,fe),children:[Ie&&(0,y.jsx)(x,{className:"k-input-icon",icon:ve}),(0,y.jsx)(O,{placeholder:o,value:e}),(0,y.jsx)(q,{...t}),(0,y.jsx)(w,{...t}),(0,y.jsx)(L,{...t})]})};P.states=tt;P.options=ot;P.className=fe;P.defaultOptions=j;var xe=P;var he=require("react/jsx-runtime"),nt=t=>(0,he.jsx)(xe,{...t});