@progress/kendo-themes-html
Version:
A collection of HTML helpers used for developing Kendo UI themes
2 lines (1 loc) • 7.79 kB
JavaScript
var n=(...o)=>o.filter(e=>e!==!0&&!!e).map(e=>Array.isArray(e)?n(...e):typeof e=="object"?Object.keys(e).map((s,a)=>e[a]||e[s]&&s||null).filter(s=>s!==null).join(" "):e).filter(e=>!!e).join(" ");var f=(o,e)=>n({[`${o}-xs`]:e.size==="xsmall",[`${o}-sm`]:e.size==="small",[`${o}-md`]:e.size==="medium",[`${o}-lg`]:e.size==="large",[`${o}-xl`]:e.size==="xlarge",[`${o}-xxl`]:e.size==="xxlarge",[`${o}-xxxl`]:e.size==="xxxlarge"},{[`${o}-${e.fillMode}`]:e.fillMode},{[`${o}-${e.fillMode}-${e.themeColor}`]:e.fillMode&&e.themeColor},{[`${o}-${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"}),b=(o,e)=>n({"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});var r={xsmall:"xsmall",small:"small",medium:"medium",large:"large",xlarge:"xlarge",xxlarge:"xxlarge",xxxlarge:"xxxlarge"},v={small:"small",medium:"medium",large:"large",full:"full"},h={solid:"solid",flat:"flat",outline:"outline",clear:"clear",link:"link"},t={inherit:"inherit",base:"base",primary:"primary",secondary:"secondary",tertiary:"tertiary",info:"info",success:"success",warning:"warning",error:"error",dark:"dark",light:"light",inverse:"inverse"},i={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"},F={calloutMap:{top:"n",bottom:"s",left:"w",right:"e"},orientationMap:{vertical:"vstack",horizontal:"hstack"}};import{jsx as ne}from"react/jsx-runtime";var re="k-card-callout",G=o=>{let{callout:e,...s}=o;return ne("span",{...s,className:n(o.className,re,{[`k-callout-${F.calloutMap[e]||e}`]:e})})};import{Fragment as ie,jsx as V,jsxs as de}from"react/jsx-runtime";var L="k-card",ae=[i.hover,i.focus,i.selected,i.disabled],se={themeColor:[t.primary,t.success,t.warning,t.error,t.info]},le={},x=o=>{let{orientation:e,themeColor:s,callout:a,hover:d,focus:c,selected:l,disabled:p,...u}=o;return de("div",{...u,className:n(o.className,L,f(L,{themeColor:s}),b(L,{hover:d,focus:c,disabled:p,selected:l}),{[`k-card-${e}`]:e,"k-card-with-callout":a}),children:[a&&a!=="true"&&V(G,{callout:a}),V(ie,{children:o.children})]})};x.states=ae;x.options=se;x.className=L;x.defaultOptions=le;import{jsx as me}from"react/jsx-runtime";var E="k-card-title",ce=[i.hover,i.focus],z=o=>{let{hover:e,focus:s,...a}=o;return me("div",{...a,className:n(o.className,E,b(E,{hover:e,focus:s})),children:o.children})};z.states=ce;z.className=E;import{jsx as et}from"react/jsx-runtime";import{Fragment as at,jsx as nt}from"react/jsx-runtime";import{Fragment as xe,jsx as U}from"react/jsx-runtime";var I="k-icon k-font-icon",ue=[],pe={size:[r.xsmall,r.small,r.medium,r.large,r.xlarge,r.xxlarge,r.xxxlarge],themeColor:[t.base,t.primary,t.secondary,t.tertiary,t.success,t.warning,t.error,t.info,t.light,t.dark]},fe={},k=o=>{let{size:e,themeColor:s,icon:a,rotate:d,flip:c,...l}=o;return a?U("span",{...l,className:n(o.className,I,f(I,{size:e}),{[`k-i-${a}`]:a,[`k-color-${s}`]:s,[`k-rotate-${d}`]:d,"k-flip-h":c==="h"||c==="both","k-flip-v":c==="v"||c==="both"})}):U(xe,{})};k.states=ue;k.options=pe;k.className=I;k.defaultOptions=fe;var q=k;import{Fragment as be,jsx as w}from"react/jsx-runtime";var R="k-icon k-svg-icon",he=[],Ce={size:[r.xsmall,r.small,r.medium,r.large,r.xlarge,r.xxlarge,r.xxxlarge],themeColor:[t.base,t.primary,t.secondary,t.tertiary,t.success,t.warning,t.error,t.info,t.light,t.dark]},Y={viewBox:"0 0 24 24"},g=o=>{let{size:e,themeColor:s,rotate:a,flip:d,viewBox:c=Y.viewBox,icon:l,...p}=o;if(!l)return w(be,{});l==="none"&&{...p,className:n(o.className,R,"k-none")};let u=typeof l=="object"&&l.name&&l.name;return w("span",{...p,className:n(o.className,R,f("k-icon",{size:e}),{[`k-svg-i-${u}`]:u,[`k-color-${s}`]:s,[`k-rotate-${a}`]:a,"k-flip-h":d==="h"||d==="both","k-flip-v":d==="v"||d==="both"}),children:w("svg",{"aria-hidden":!0,focusable:!1,xmlns:"http://www.w3.org/2000/svg",viewBox:typeof l=="object"?l.viewBox:c,dangerouslySetInnerHTML:typeof l=="object"?{__html:l.content}:void 0,children:l?void 0:o.children})})};g.states=he;g.options=Ce;g.className=R;g.defaultOptions=Y;var $=g;import*as J from"@progress/kendo-svg-icons";import{Fragment as Q,jsx as A}from"react/jsx-runtime";var ve=o=>o.replace(/([-_][a-z0-9])/gi,e=>e.toUpperCase().replace("-","").replace("_","")),ye=[],Ne={size:[r.xsmall,r.small,r.medium,r.large,r.xlarge,r.xxlarge,r.xxxlarge],themeColor:[t.base,t.primary,t.secondary,t.tertiary,t.success,t.warning,t.error,t.info,t.light,t.dark]},D={viewBox:"0 0 24 24",type:"svg"},y=o=>{let{size:e,themeColor:s,icon:a,type:d=D.type,rotate:c,flip:l,viewBox:p=D.viewBox,...u}=o;if(!a)return A(Q,{});if(d==="svg"){if(a==="none")return A($,{...u,icon:a,size:e});let T=ve(`${a}-icon`);return J[T]?A($,{...u,icon:J[T],size:e,themeColor:s,rotate:c,flip:l,viewBox:p}):A(Q,{})}return A(q,{...u,icon:a,size:e,themeColor:s,rotate:c,flip:l})};y.states=ye;y.options=Ne;y.defaultOptions=D;import{Fragment as Ae,jsx as M,jsxs as W}from"react/jsx-runtime";var H="k-button",ke=[i.hover,i.focus,i.active,i.selected,i.disabled],ge={size:[r.small,r.medium,r.large],rounded:[v.small,v.medium,v.large,v.full],fillMode:[h.solid,h.flat,h.outline,h.clear,h.link],themeColor:[t.base,t.primary,t.secondary,t.tertiary,t.success,t.warning,t.error,t.info,t.light,t.dark,t.inverse]},C={size:r.medium,rounded:v.medium,fillMode:h.solid,themeColor:t.base,showArrow:!1,arrowIconName:"caret-alt-down"},m=o=>{let{size:e=C.size,rounded:s=C.rounded,fillMode:a=C.fillMode,themeColor:d=C.themeColor,showArrow:c=C.showArrow,arrowIconName:l=C.arrowIconName,hover:p,focus:u,active:T,selected:X,disabled:Z,icon:K,text:B,iconClassName:j,...ee}=o,te=K!==void 0,oe=o.children!==void 0;return W("button",{...ee,className:n(o.className,H,f(H,{size:e,rounded:s,fillMode:a,themeColor:d}),b(H,{hover:p,focus:u,active:T,disabled:Z,selected:X}),{"k-icon-button":!B&&!oe&&te}),children:[K&&M(y,{className:n(j,"k-button-icon"),icon:K}),B?W(Ae,{children:[B&&M("span",{className:"k-button-text",children:B}),o.children]}):o.children&&M("span",{className:"k-button-text",children:o.children}),c&&M("span",{className:"k-menu-button-arrow k-button-arrow",children:M(y,{icon:l})})]})};m.states=ke;m.options=ge;m.className=H;m.defaultOptions=C;import{jsx as Bt}from"react/jsx-runtime";import{jsx as Ht}from"react/jsx-runtime";import{jsx as It}from"react/jsx-runtime";import{Fragment as Qt,jsx as Jt,jsxs as Wt}from"react/jsx-runtime";import{jsx as eo}from"react/jsx-runtime";import{Fragment as io,jsx as lo,jsxs as co}from"react/jsx-runtime";import{jsx as fo}from"react/jsx-runtime";import{jsx as Be}from"react/jsx-runtime";var O="k-actions",Se=[],Te={},P={alignment:"start",orientation:"horizontal"},N=o=>{let{alignment:e=P.alignment,orientation:s=P.orientation,...a}=o;return Be("div",{...a,className:n(O,{[`${O}-${e}`]:e,[`${O}-${s}`]:s},o.className),children:o.children})};N.states=Se;N.options=Te;N.className=O;N.defaultOptions=P;import{Fragment as Bo,jsx as So,jsxs as To}from"react/jsx-runtime";import{Fragment as Io,jsx as Ko,jsxs as Eo}from"react/jsx-runtime";import{jsx as Oe}from"react/jsx-runtime";var _="k-taskboard-card",ze=[],we={},He={},S=o=>{let{children:e,category:s,...a}=o;return Oe(x,{...a,className:n(o.className,_,{[`${_}-category`]:s}),children:e})};S.states=ze;S.options=we;S.className=_;S.defaultOptions=He;var tr=S;export{_ as TASKBOARDCARD_CLASSNAME,S as TaskBoardCard,tr as default};