UNPKG

@progress/kendo-themes-html

Version:

A collection of HTML helpers used for developing Kendo UI themes

2 lines (1 loc) 13.3 kB
var o=(...t)=>t.filter(e=>e!==!0&&!!e).map(e=>Array.isArray(e)?o(...e):typeof e=="object"?Object.keys(e).map((n,r)=>e[r]||e[n]&&n||null).filter(n=>n!==null).join(" "):e).filter(e=>!!e).join(" ");var T=(t,e)=>o({[`${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"}),C=(t,e)=>o({"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 l={xsmall:"xsmall",small:"small",medium:"medium",large:"large",xlarge:"xlarge",xxlarge:"xxlarge",xxxlarge:"xxxlarge"},g={small:"small",medium:"medium",large:"large",full:"full"},b={solid:"solid",flat:"flat",outline:"outline",clear:"clear",link:"link"},a={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"},pe={calloutMap:{top:"n",bottom:"s",left:"w",right:"e"},orientationMap:{vertical:"vstack",horizontal:"hstack"}};import{Fragment as Ve,jsx as ue}from"react/jsx-runtime";var j="k-icon k-font-icon",_e=[],$e={size:[l.xsmall,l.small,l.medium,l.large,l.xlarge,l.xxlarge,l.xxxlarge],themeColor:[a.base,a.primary,a.secondary,a.tertiary,a.success,a.warning,a.error,a.info,a.light,a.dark]},Fe={},O=t=>{let{size:e,themeColor:n,icon:r,rotate:i,flip:d,...s}=t;return r?ue("span",{...s,className:o(t.className,j,T(j,{size:e}),{[`k-i-${r}`]:r,[`k-color-${n}`]:n,[`k-rotate-${i}`]:i,"k-flip-h":d==="h"||d==="both","k-flip-v":d==="v"||d==="both"})}):ue(Ve,{})};O.states=_e;O.options=$e;O.className=j;O.defaultOptions=Fe;var fe=O;import{Fragment as Je,jsx as J}from"react/jsx-runtime";var ee="k-icon k-svg-icon",We=[],Ge={size:[l.xsmall,l.small,l.medium,l.large,l.xlarge,l.xxlarge,l.xxxlarge],themeColor:[a.base,a.primary,a.secondary,a.tertiary,a.success,a.warning,a.error,a.info,a.light,a.dark]},Te={viewBox:"0 0 24 24"},R=t=>{let{size:e,themeColor:n,rotate:r,flip:i,viewBox:d=Te.viewBox,icon:s,...u}=t;if(!s)return J(Je,{});s==="none"&&{...u,className:o(t.className,ee,"k-none")};let p=typeof s=="object"&&s.name&&s.name;return J("span",{...u,className:o(t.className,ee,T("k-icon",{size:e}),{[`k-svg-i-${p}`]:p,[`k-color-${n}`]:n,[`k-rotate-${r}`]:r,"k-flip-h":i==="h"||i==="both","k-flip-v":i==="v"||i==="both"}),children:J("svg",{"aria-hidden":!0,focusable:!1,xmlns:"http://www.w3.org/2000/svg",viewBox:typeof s=="object"?s.viewBox:d,dangerouslySetInnerHTML:typeof s=="object"?{__html:s.content}:void 0,children:s?void 0:t.children})})};R.states=We;R.options=Ge;R.className=ee;R.defaultOptions=Te;var te=R;import*as Ce from"@progress/kendo-svg-icons";import{Fragment as xe,jsx as w}from"react/jsx-runtime";var Ue=t=>t.replace(/([-_][a-z0-9])/gi,e=>e.toUpperCase().replace("-","").replace("_","")),Xe=[],qe={size:[l.xsmall,l.small,l.medium,l.large,l.xlarge,l.xxlarge,l.xxxlarge],themeColor:[a.base,a.primary,a.secondary,a.tertiary,a.success,a.warning,a.error,a.info,a.light,a.dark]},oe={viewBox:"0 0 24 24",type:"svg"},x=t=>{let{size:e,themeColor:n,icon:r,type:i=oe.type,rotate:d,flip:s,viewBox:u=oe.viewBox,...p}=t;if(!r)return w(xe,{});if(i==="svg"){if(r==="none")return w(te,{...p,icon:r,size:e});let W=Ue(`${r}-icon`);return Ce[W]?w(te,{...p,icon:Ce[W],size:e,themeColor:n,rotate:d,flip:s,viewBox:u}):w(xe,{})}return w(fe,{...p,icon:r,size:e,themeColor:n,rotate:d,flip:s})};x.states=Xe;x.options=qe;x.defaultOptions=oe;import{Fragment as Qe,jsx as K,jsxs as Ne}from"react/jsx-runtime";var U="k-button",Ye=[c.hover,c.focus,c.active,c.selected,c.disabled],Ze={size:[l.small,l.medium,l.large],rounded:[g.small,g.medium,g.large,g.full],fillMode:[b.solid,b.flat,b.outline,b.clear,b.link],themeColor:[a.base,a.primary,a.secondary,a.tertiary,a.success,a.warning,a.error,a.info,a.light,a.dark,a.inverse]},k={size:l.medium,rounded:g.medium,fillMode:b.solid,themeColor:a.base,showArrow:!1,arrowIconName:"caret-alt-down"},m=t=>{let{size:e=k.size,rounded:n=k.rounded,fillMode:r=k.fillMode,themeColor:i=k.themeColor,showArrow:d=k.showArrow,arrowIconName:s=k.arrowIconName,hover:u,focus:p,active:W,selected:Re,disabled:we,icon:Q,text:G,iconClassName:Ke,...ze}=t,De=Q!==void 0,Pe=t.children!==void 0;return Ne("button",{...ze,className:o(t.className,U,T(U,{size:e,rounded:n,fillMode:r,themeColor:i}),C(U,{hover:u,focus:p,active:W,disabled:we,selected:Re}),{"k-icon-button":!G&&!Pe&&De}),children:[Q&&K(x,{className:o(Ke,"k-button-icon"),icon:Q}),G?Ne(Qe,{children:[G&&K("span",{className:"k-button-text",children:G}),t.children]}):t.children&&K("span",{className:"k-button-text",children:t.children}),d&&K("span",{className:"k-menu-button-arrow k-button-arrow",children:K(x,{icon:s})})]})};m.states=Ye;m.options=Ze;m.className=U;m.defaultOptions=k;import{jsx as Ao}from"react/jsx-runtime";import{jsx as So}from"react/jsx-runtime";import{jsx as Oo}from"react/jsx-runtime";import{Fragment as tt,jsx as he}from"react/jsx-runtime";var z="k-timeline",je=[],et={},ve={orientation:"vertical"},N=t=>{let{orientation:e=ve.orientation,collapsibleEvents:n,alternatingMode:r,...i}=t;return he("div",{...i,className:o(t.className,z,{[`${z}-${e}`]:e,[`${z}-alternating`]:r,[`${z}-collapsible`]:n}),children:he(tt,{children:t.children})})};N.states=je;N.options=et;N.className=z;N.defaultOptions=ve;import{jsx as at}from"react/jsx-runtime";var ot="k-card-callout",X=t=>{let{callout:e,...n}=t;return at("span",{...n,className:o(t.className,ot,{[`k-callout-${pe.calloutMap[e]||e}`]:e})})};import{Fragment as it,jsx as be,jsxs as st}from"react/jsx-runtime";var q="k-card",nt=[c.hover,c.focus,c.selected,c.disabled],rt={themeColor:[a.primary,a.success,a.warning,a.error,a.info]},lt={},h=t=>{let{orientation:e,themeColor:n,callout:r,hover:i,focus:d,selected:s,disabled:u,...p}=t;return st("div",{...p,className:o(t.className,q,T(q,{themeColor:n}),C(q,{hover:i,focus:d,disabled:u,selected:s}),{[`k-card-${e}`]:e,"k-card-with-callout":r}),children:[r&&r!=="true"&&be(X,{callout:r}),be(it,{children:t.children})]})};h.states=nt;h.options=rt;h.className=q;h.defaultOptions=lt;import{jsx as mt}from"react/jsx-runtime";var ae="k-card-title",ct=[c.hover,c.focus],y=t=>{let{hover:e,focus:n,...r}=t;return mt("div",{...r,className:o(t.className,ae,C(ae,{hover:e,focus:n})),children:t.children})};y.states=ct;y.className=ae;import{jsx as pt}from"react/jsx-runtime";var dt="k-card-subtitle",v=t=>{let{...e}=t;return pt("div",{...e,className:o(t.className,dt),children:t.children})};import{Fragment as ra,jsx as na}from"react/jsx-runtime";import{Fragment as ft,jsx as D,jsxs as Tt}from"react/jsx-runtime";var ut="k-card-header",P=t=>{let{title:e,subtitle:n,details:r,...i}=t;return Tt("div",{...i,className:o(t.className,ut),children:[e&&D(y,{children:e}),n&&D(v,{children:n}),D(ft,{children:t.children}),r&&D("span",{className:"k-card-header-actions",children:D(m,{className:"k-card-details",icon:"more-vertical",rounded:"medium",size:"medium",fillMode:"flat",themeColor:"base"})})]})};import{jsx as Ta}from"react/jsx-runtime";import{Fragment as xt,jsx as _,jsxs as Nt}from"react/jsx-runtime";var Ct="k-card-body",L=t=>{let{title:e,subtitle:n,details:r,...i}=t;return Nt("div",{...i,className:o(t.className,Ct),children:[e&&_(y,{children:e}),n&&_(v,{children:n}),_(xt,{children:t.children}),r&&_("span",{className:"k-card-header-actions",children:_(m,{className:"k-card-details",icon:"more-vertical",rounded:"medium",size:"medium",fillMode:"flat",themeColor:"base"})})]})};import{jsx as Aa}from"react/jsx-runtime";import{jsx as bt}from"react/jsx-runtime";var Y="k-actions",ht=[],vt={},ne={alignment:"start",orientation:"horizontal"},S=t=>{let{alignment:e=ne.alignment,orientation:n=ne.orientation,...r}=t;return bt("div",{...r,className:o(Y,{[`${Y}-${e}`]:e,[`${Y}-${n}`]:n},t.className),children:t.children})};S.states=ht;S.options=vt;S.className=Y;S.defaultOptions=ne;import{Fragment as Da,jsx as Ka,jsxs as za}from"react/jsx-runtime";import{Fragment as Ja,jsx as Wa,jsxs as Ga}from"react/jsx-runtime";import{jsx as f,jsxs as re}from"react/jsx-runtime";var ke="k-timeline-event",kt=[],Et={},I={collapsed:!1,reverse:!1,title:"Event title",subtitle:"Event subtitle",content:"Event content"},E=t=>{let{date:e,content:n=I.content,collapsed:r=I.collapsed,reverse:i=I.reverse,title:d=I.title,subtitle:s=I.subtitle,showCollapseButton:u,...p}=t;return re("li",{...p,className:o(t.className,ke,{"k-reverse":i}),children:[e&&f("div",{className:"k-timeline-date-wrap",children:f("span",{className:"k-timeline-date",children:e})}),f(le,{}),n&&f("div",{className:o("k-timeline-card",{"k-collapsed":r}),children:f(H,{...i?{callout:"right"}:{callout:"left"},children:re("div",{className:"k-card-inner",children:[re(P,{children:[f(M,{collapsible:u,children:d}),f(v,{children:s})]}),f(L,{children:f("div",{className:"k-card-description",children:n})})]})})}),t.children]})};E.states=kt;E.options=Et;E.className=ke;E.defaultOptions=I;import{jsx as B,jsxs as ie}from"react/jsx-runtime";var Ee="k-timeline-event",Mt=[],At={},Z={title:"Event title",subtitle:"Event subtitle",content:"Event content"},$=t=>{let{content:e=Z.content,title:n=Z.title,subtitle:r=Z.subtitle,...i}=t;return ie("li",{...i,className:o(t.className,Ee),children:[e&&B("div",{className:o("k-timeline-card"),children:B(H,{orientation:"vertical",callout:"top",children:ie("div",{className:"k-card-inner",children:[ie(P,{children:[B(M,{children:n}),B(v,{children:r})]}),B(L,{children:B("div",{className:"k-card-description",children:e})})]})})}),t.children]})};$.states=Mt;$.options=At;$.className=Ee;$.defaultOptions=Z;import{jsx as hn}from"react/jsx-runtime";import{jsx as Lt,jsxs as St}from"react/jsx-runtime";var Me="k-timeline-flag-wrap",gt=[c.focus,c.selected],yt={},Ae={year:"2020"},A=t=>{let{year:e=Ae.year,...n}=t;return St("li",{...n,className:o(t.className,Me),children:[Lt("span",{className:"k-timeline-flag",children:e}),t.children]})};A.states=gt;A.options=yt;A.className=Me;A.defaultOptions=Ae;import{jsx as Ht}from"react/jsx-runtime";var It="k-timeline-circle",le=t=>{let{...e}=t;return Ht("span",{...e,className:o(t.className,It)})};import{jsx as Sn}from"react/jsx-runtime";import{jsx as Rt,jsxs as wt}from"react/jsx-runtime";var Bt=[],Ot={},H=t=>{let{callout:e,children:n,...r}=t;return wt(h,{className:o(t.className),orientation:"vertical",callout:"true",...r,children:[e&&Rt(F,{callout:e}),n]})};H.states=Bt;H.defaultOptions=Ot;import{jsx as se,jsxs as Dt}from"react/jsx-runtime";var ge="k-card-title",Kt=[],zt={},M=t=>{let{collapsible:e,children:n,...r}=t;return Dt("div",{className:o(t.className,ge),...r,children:[se("span",{className:"k-event-title",children:n}),e&&se("span",{className:"k-event-collapse k-button k-button-md k-rounded-md k-button-flat k-button-flat-base k-icon-button",children:se(x,{icon:"chevron-right",className:"k-button-icon"})})]})};M.states=Kt;M.className=ge;M.defaultOptions=zt;import{jsx as $t}from"react/jsx-runtime";var ye="k-timeline-card-callout",Pt=[],_t={},F=t=>{let{...e}=t;return $t(X,{className:o(t.className,ye),...e})};F.states=Pt;F.className=ye;F.defaultOptions=_t;import{jsx as Le}from"react/jsx-runtime";var Se="k-timeline-date-wrap",Ft=[],Vt={},Ie={date:"May 25, 2008"},V=t=>{let{date:e=Ie.date,...n}=t;return Le("div",{...n,className:o(t.className,Se),children:Le("span",{className:"k-timeline-date",children:e})})};V.states=Ft;V.options=Vt;V.className=Se;V.defaultOptions=Ie;import{jsx as He}from"react/jsx-runtime";var Wt="k-timeline-track",Be=t=>{let{...e}=t;return He("div",{...e,className:o(t.className,Wt),children:He("ul",{className:"k-timeline-scrollable-wrap",children:t.children})})};import{jsxs as Jt}from"react/jsx-runtime";var ce="k-timeline-track-item",Gt=[c.focus],me=t=>{let{content:e,focus:n,...r}=t;return Jt("li",{...r,className:o(t.className,ce,C(ce,{focus:n})),children:[e,t.children]})};me.states=Gt;me.className=ce;import{jsx as ar,jsxs as nr}from"react/jsx-runtime";import{jsx as sr,jsxs as cr}from"react/jsx-runtime";import{jsx as ur,jsxs as fr}from"react/jsx-runtime";import{Fragment as kr,jsx as vr,jsxs as br}from"react/jsx-runtime";import{jsx as de,jsxs as Xt}from"react/jsx-runtime";var Ut="k-timeline-track-wrap",Oe=t=>{let{...e}=t;return Xt("div",{...e,className:o(t.className,Ut),children:[de(m,{className:"k-timeline-arrow k-timeline-arrow-left",rounded:"full",icon:"caret-alt-left",disabled:!0}),de(m,{className:"k-timeline-arrow k-timeline-arrow-right",rounded:"full",icon:"caret-alt-right"}),de(Be,{children:t.children})]})},Jr=Oe;export{Ut as TIMELINETRACKWRAP_CLASSNAME,Oe as TimelineTrackWrap,Jr as default};