@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 i=(...t)=>t.filter(e=>e!==!0&&!!e).map(e=>Array.isArray(e)?i(...e):typeof e=="object"?Object.keys(e).map((n,a)=>e[a]||e[n]&&n||null).filter(n=>n!==null).join(" "):e).filter(e=>!!e).join(" ");var C=(t,e)=>i({[`${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"}),z=(t,e)=>i({"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 r={xsmall:"xsmall",small:"small",medium:"medium",large:"large",xlarge:"xlarge",xxlarge:"xxlarge",xxxlarge:"xxxlarge"},b={small:"small",medium:"medium",large:"large",full:"full"},x={solid:"solid",flat:"flat",outline:"outline",clear:"clear",link:"link"},o={inherit:"inherit",base:"base",primary:"primary",secondary:"secondary",tertiary:"tertiary",info:"info",success:"success",warning:"warning",error:"error",dark:"dark",light:"light",inverse:"inverse"},c={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"};import{Fragment as He,jsx as de}from"react/jsx-runtime";var j="k-icon k-font-icon",Ee=[],Ke={size:[r.xsmall,r.small,r.medium,r.large,r.xlarge,r.xxlarge,r.xxxlarge],themeColor:[o.base,o.primary,o.secondary,o.tertiary,o.success,o.warning,o.error,o.info,o.light,o.dark]},Re={},U=t=>{let{size:e,themeColor:n,icon:a,rotate:m,flip:l,...s}=t;return a?de("span",{...s,className:i(t.className,j,C(j,{size:e}),{[`k-i-${a}`]:a,[`k-color-${n}`]:n,[`k-rotate-${m}`]:m,"k-flip-h":l==="h"||l==="both","k-flip-v":l==="v"||l==="both"})}):de(He,{})};U.states=Ee;U.options=Ke;U.className=j;U.defaultOptions=Re;var fe=U;import{Fragment as Ue,jsx as G}from"react/jsx-runtime";var ee="k-icon k-svg-icon",$e=[],_e={size:[r.xsmall,r.small,r.medium,r.large,r.xlarge,r.xxlarge,r.xxxlarge],themeColor:[o.base,o.primary,o.secondary,o.tertiary,o.success,o.warning,o.error,o.info,o.light,o.dark]},xe={viewBox:"0 0 24 24"},F=t=>{let{size:e,themeColor:n,rotate:a,flip:m,viewBox:l=xe.viewBox,icon:s,...u}=t;if(!s)return G(Ue,{});s==="none"&&{...u,className:i(t.className,ee,"k-none")};let p=typeof s=="object"&&s.name&&s.name;return G("span",{...u,className:i(t.className,ee,C("k-icon",{size:e}),{[`k-svg-i-${p}`]:p,[`k-color-${n}`]:n,[`k-rotate-${a}`]:a,"k-flip-h":m==="h"||m==="both","k-flip-v":m==="v"||m==="both"}),children:G("svg",{"aria-hidden":!0,focusable:!1,xmlns:"http://www.w3.org/2000/svg",viewBox:typeof s=="object"?s.viewBox:l,dangerouslySetInnerHTML:typeof s=="object"?{__html:s.content}:void 0,children:s?void 0:t.children})})};F.states=$e;F.options=_e;F.className=ee;F.defaultOptions=xe;var te=F;import*as Me from"@progress/kendo-svg-icons";import{Fragment as he,jsx as W}from"react/jsx-runtime";var Fe=t=>t.replace(/([-_][a-z0-9])/gi,e=>e.toUpperCase().replace("-","").replace("_","")),We=[],Je={size:[r.xsmall,r.small,r.medium,r.large,r.xlarge,r.xxlarge,r.xxxlarge],themeColor:[o.base,o.primary,o.secondary,o.tertiary,o.success,o.warning,o.error,o.info,o.light,o.dark]},oe={viewBox:"0 0 24 24",type:"svg"},M=t=>{let{size:e,themeColor:n,icon:a,type:m=oe.type,rotate:l,flip:s,viewBox:u=oe.viewBox,...p}=t;if(!a)return W(he,{});if(m==="svg"){if(a==="none")return W(te,{...p,icon:a,size:e});let h=Fe(`${a}-icon`);return Me[h]?W(te,{...p,icon:Me[h],size:e,themeColor:n,rotate:l,flip:s,viewBox:u}):W(he,{})}return W(fe,{...p,icon:a,size:e,themeColor:n,rotate:l,flip:s})};M.states=We;M.options=Je;M.defaultOptions=oe;import{Fragment as Ge,jsx as J,jsxs as be}from"react/jsx-runtime";var D="k-button",Ve=[c.hover,c.focus,c.active,c.selected,c.disabled],Xe={size:[r.small,r.medium,r.large],rounded:[b.small,b.medium,b.large,b.full],fillMode:[x.solid,x.flat,x.outline,x.clear,x.link],themeColor:[o.base,o.primary,o.secondary,o.tertiary,o.success,o.warning,o.error,o.info,o.light,o.dark,o.inverse]},B={size:r.medium,rounded:b.medium,fillMode:x.solid,themeColor:o.base,showArrow:!1,arrowIconName:"caret-alt-down"},d=t=>{let{size:e=B.size,rounded:n=B.rounded,fillMode:a=B.fillMode,themeColor:m=B.themeColor,showArrow:l=B.showArrow,arrowIconName:s=B.arrowIconName,hover:u,focus:p,active:h,selected:f,disabled:N,icon:I,text:k,iconClassName:v,...L}=t,S=I!==void 0,A=t.children!==void 0;return be("button",{...L,className:i(t.className,D,C(D,{size:e,rounded:n,fillMode:a,themeColor:m}),z(D,{hover:u,focus:p,active:h,disabled:N,selected:f}),{"k-icon-button":!k&&!A&&S}),children:[I&&J(M,{className:i(v,"k-button-icon"),icon:I}),k?be(Ge,{children:[k&&J("span",{className:"k-button-text",children:k}),t.children]}):t.children&&J("span",{className:"k-button-text",children:t.children}),l&&J("span",{className:"k-menu-button-arrow k-button-arrow",children:J(M,{icon:s})})]})};d.states=Ve;d.options=Xe;d.className=D;d.defaultOptions=B;import{jsx as Zt}from"react/jsx-runtime";import{jsx as oo}from"react/jsx-runtime";import{jsx as io}from"react/jsx-runtime";import{jsx as Ie}from"react/jsx-runtime";var Ne="k-animation-container",De=[],qe={},ke={positionMode:"absolute"},K=t=>{let{positionMode:e=ke.positionMode,animationStyle:n,offset:a,...m}=t;return Ie("div",{...m,style:{...a,...t.style},className:i(t.className,Ne,"k-animation-container-shown",{"k-animation-container-fixed":e==="fixed"}),children:Ie("div",{className:"k-child-animation-container",style:n,children:t.children})})};K.states=De;K.options=qe;K.className=Ne;K.defaultOptions=ke;import{jsx as ve}from"react/jsx-runtime";var ge="k-popup",Qe=[],Ye={},we={positionMode:"absolute"},P=t=>{let{offset:e,positionMode:n=we.positionMode,animationStyle:a,...m}=t;return ve(K,{positionMode:n,offset:e,animationStyle:a,children:ve("div",{...m,className:i(t.className,ge),children:t.children})})};P.states=Qe;P.options=Ye;P.className=ge;P.defaultOptions=we;import{Fragment as et,jsx as ye,jsxs as tt}from"react/jsx-runtime";var Se="k-menu-button",Ze=[c.hover,c.focus,c.active,c.selected,c.disabled],je={size:[r.small,r.medium,r.large],rounded:[b.small,b.medium,b.large,b.full],fillMode:[x.solid,x.flat,x.outline,x.clear,x.link],themeColor:[o.base,o.primary,o.secondary,o.tertiary,o.success,o.warning,o.error,o.info,o.light,o.dark,o.inverse]},T={size:r.medium,rounded:b.medium,fillMode:x.solid,themeColor:o.base,showArrow:!0,arrowIconName:"caret-alt-down"},R=t=>{let{size:e=T.size,rounded:n=T.rounded,fillMode:a=T.fillMode,themeColor:m=T.themeColor,hover:l,focus:s,active:u,selected:p,disabled:h,icon:f,text:N,showArrow:I=T.showArrow,arrowIconName:k=T.arrowIconName,popup:v,opened:L,...S}=t;return tt(et,{children:[ye(d,{...S,className:i(t.className,Se),text:N,size:e,rounded:n,fillMode:a,themeColor:m,hover:l,focus:s,active:u,selected:p,disabled:h,icon:f,showArrow:I,arrowIconName:k}),L&&v&&ye(P,{className:"k-menu-popup",children:v})]})};R.states=Ze;R.options=je;R.className=Se;R.defaultOptions=T;import{jsx as Po}from"react/jsx-runtime";import{jsx as Ko}from"react/jsx-runtime";import{jsx as _o}from"react/jsx-runtime";import{Fragment as rt,jsx as H,jsxs as Ae}from"react/jsx-runtime";var re="k-menu-item",ot=[c.hover,c.focus,c.active,c.selected,c.disabled],nt={},Ce={iconPosition:"before"},g=t=>{let{hover:e,focus:n,active:a,selected:m,disabled:l,icon:s,text:u,first:p,last:h,showArrow:f,arrowIconName:N,iconPosition:I=Ce.iconPosition,dir:k,children:v,...L}=t,S=H(rt,{});v&&v.forEach(E=>{if(E.type==="MenuItemContent"){S.props.children.push(E);return}});let A=N;return A||(A=k==="rtl"?"caret-alt-left":"caret-alt-right"),Ae("li",{...L,className:i(t.className,re,"k-item",z(re,{focus:n,disabled:l,hover:e,active:a,selected:m}),{"k-first":p,"k-last":h}),children:[Ae("span",{className:i("k-link k-menu-link"),children:[s&&I==="before"&&H(M,{className:"k-menu-link-icon",icon:s}),H("span",{className:"k-menu-link-text",children:u}),s&&I==="after"&&H(M,{className:"k-menu-link-icon",icon:s}),f&&H("span",{className:"k-menu-expand-arrow",children:H(M,{icon:A})})]}),S]})};g.states=ot;g.options=nt;g.className=re;g.defaultOptions=Ce;import{Fragment as at,jsx as $,jsxs as Le}from"react/jsx-runtime";var se="k-menu-item",st=[c.hover,c.focus,c.active,c.selected,c.disabled],it={},ie={dir:"ltr",iconPosition:"before"},w=t=>{let{hover:e,focus:n,active:a,selected:m,disabled:l,icon:s,text:u,first:p,last:h,showArrow:f,arrowIconName:N,iconPosition:I=ie.iconPosition,dir:k=ie.dir,children:v,popup:L,...S}=t,A=$(at,{});v&&v.forEach(Z=>{if(Z.type==="MenuListItemContent"){A.props.children.push(Z);return}});let E=N;return E||(E=k==="rtl"?"caret-alt-left":"caret-alt-right"),Le("li",{...S,className:i(t.className,se,"k-item",z(se,{focus:n,disabled:l}),{"k-first":p,"k-last":h}),children:[Le("span",{className:i("k-link k-menu-link",z("k-menu-link",{hover:e,active:a,selected:m,disabled:l})),children:[s&&I==="before"&&$(M,{className:"k-menu-link-icon",icon:s}),$("span",{className:"k-menu-link-text",children:u}),s&&I==="after"&&$(M,{className:"k-menu-link-icon",icon:s}),f&&$("span",{className:"k-menu-expand-arrow",children:$(M,{icon:E})})]}),A,L]})};w.states=st;w.options=it;w.className=se;w.defaultOptions=ie;import{jsx as ut}from"react/jsx-runtime";var ze="k-menu-scroll-wrapper",lt=[],mt={},ct={},V=t=>{let{className:e,children:n,orientation:a,...m}=t;return ut("div",{...m,className:i(e,ze,{"k-menu-scroll-wrapper-vertical":a==="vertical"}),children:n})};V.states=lt;V.options=mt;V.className=ze;V.defaultOptions=ct;var Be=V;import{Fragment as ae,jsx as O,jsxs as q}from"react/jsx-runtime";var le="k-menu",pt=[],dt={},Q={orientation:"horizontal",header:!0,scrollButtonsPosition:"around"},y=t=>{let{children:e,orientation:n=Q.orientation,header:a=Q.header,scrollable:m,scrollButtonsPosition:l=Q.scrollButtonsPosition,wrapperStyles:s,dir:u,popup:p,...h}=t,f={horizontal:{prev:u!=="rtl"?"left":"right",next:u!=="rtl"?"right":"left"},vertical:{prev:"up",next:"down"}},N=O("ul",{dir:u,...h,className:i(t.className,"k-reset",le,{[`${le}-${n}`]:n,"k-header":a}),children:e});return q(ae,{children:[m?q(Be,{orientation:n,style:s,dir:t.dir,children:[l==="start"&&q(ae,{children:[O(d,{fillMode:"flat",rounded:null,size:"medium",icon:`caret-alt-${f[n].prev}`,className:"k-menu-scroll-button k-menu-scroll-button-prev"}),O(d,{fillMode:"flat",rounded:null,size:"medium",icon:`caret-alt-${f[n].next}`,className:"k-menu-scroll-button k-menu-scroll-button-next"})]}),l==="around"&&O(d,{fillMode:"flat",rounded:null,size:"medium",icon:`caret-alt-${f[n].prev}`,className:"k-menu-scroll-button k-menu-scroll-button-prev"}),N,l==="end"&&q(ae,{children:[O(d,{fillMode:"flat",rounded:null,size:"medium",icon:`caret-alt-${f[n].prev}`,className:"k-menu-scroll-button k-menu-scroll-button-prev"}),O(d,{fillMode:"flat",rounded:null,size:"medium",icon:`caret-alt-${f[n].next}`,className:"k-menu-scroll-button k-menu-scroll-button-next"})]}),l==="around"&&O(d,{fillMode:"flat",rounded:null,size:"medium",icon:`caret-alt-${f[n].next}`,className:"k-menu-scroll-button k-menu-scroll-button-next"})]}):N,p]})};y.states=pt;y.options=dt;y.className=le;y.defaultOptions=Q;import{jsx as ft}from"react/jsx-runtime";var me="k-separator",Pe={orientation:"horizontal"},X=t=>{let{orientation:e=Pe.orientation,...n}=t;return ft("li",{...n,className:i(t.className,"k-item",me,{[`${me}-${e}`]:e})})};X.className=me;X.defaultOptions=Pe;import{Fragment as cn,jsx as un}from"react/jsx-runtime";import{jsx as Te}from"react/jsx-runtime";import{createElement as ht}from"react";var ce="k-menu-group",xt=[],Mt={size:[r.small,r.medium,r.large]},ue={size:r.medium,dir:"ltr"},_=t=>{let{children:e,size:n=ue.size,dir:a=ue.dir,...m}=t,l=[];return e&&Array.isArray(e)&&e.map((s,u)=>{s.type===w?l.push(ht(w,{...s.props,dir:a,key:u})):s.type===X?l.push(Te(X,{})):l.push(s)}),Te("ul",{...m,className:i(t.className,ce,C(ce,{size:n})),children:l})};_.states=xt;_.options=Mt;_.className=ce;_.defaultOptions=ue;import{Fragment as kn,jsx as Nn,jsxs as vn}from"react/jsx-runtime";import{Fragment as Ln,jsx as An,jsxs as Cn}from"react/jsx-runtime";import{Fragment as On,jsx as Tn,jsxs as En}from"react/jsx-runtime";import{Fragment as _n,jsx as $n,jsxs as Un}from"react/jsx-runtime";import{Fragment as Xn,jsx as Vn,jsxs as Gn}from"react/jsx-runtime";import{jsx as ur,jsxs as pr}from"react/jsx-runtime";import{Fragment as Nt,jsx as pe,jsxs as kt}from"react/jsx-runtime";var bt=[],It={},Oe={buttonText:"Export"},Y=t=>{let{buttonText:e=Oe.buttonText,children:n}=t;return kt(Nt,{children:[pe("div",{className:"k-preview-pane-header",children:pe(R,{fillMode:"flat",icon:"export",showArrow:!1,children:e})}),pe("div",{className:"k-preview-pane-content",children:n})]})};Y.states=bt;Y.options=It;Y.defaultOptions=Oe;var kr=Y;export{Y as ChartWizardPreviewPanelContent,kr as default};