@progress/kendo-themes-html
Version:
A collection of HTML helpers used for developing Kendo UI themes
2 lines (1 loc) • 12.8 kB
JavaScript
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,"k-highlighted":e.highlighted});var i={xsmall:"xsmall",small:"small",medium:"medium",large:"large",xlarge:"xlarge",xxlarge:"xxlarge",xxxlarge:"xxxlarge"},y={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",highlighted:"highlighted"},de={calloutMap:{top:"n",bottom:"s",left:"w",right:"e"},orientationMap:{vertical:"vstack",horizontal:"hstack"}};import{jsx as ze}from"react/jsx-runtime";var Ke="k-card-callout",G=t=>{let{callout:e,...n}=t;return ze("span",{...n,className:o(t.className,Ke,{[`k-callout-${de.calloutMap[e]||e}`]:e})})};import{Fragment as $e,jsx as pe,jsxs as Fe}from"react/jsx-runtime";var X="k-card",De=[c.hover,c.focus,c.selected,c.disabled],Pe={themeColor:[a.primary,a.success,a.warning,a.error,a.info]},_e={},x=t=>{let{orientation:e,themeColor:n,callout:r,hover:l,focus:m,selected:s,disabled:u,...p}=t;return Fe("div",{...p,className:o(t.className,X,T(X,{themeColor:n}),C(X,{hover:l,focus:m,disabled:u,selected:s}),{[`k-card-${e}`]:e,"k-card-with-callout":r}),children:[r&&r!=="true"&&pe(G,{callout:r}),pe($e,{children:t.children})]})};x.states=De;x.options=Pe;x.className=X;x.defaultOptions=_e;import{jsx as We}from"react/jsx-runtime";var j="k-card-title",Ve=[c.hover,c.focus],L=t=>{let{hover:e,focus:n,...r}=t;return We("div",{...r,className:o(t.className,j,C(j,{hover:e,focus:n})),children:t.children})};L.states=Ve;L.className=j;import{jsx as Ge}from"react/jsx-runtime";var Je="k-card-subtitle",h=t=>{let{...e}=t;return Ge("div",{...e,className:o(t.className,Je),children:t.children})};import{Fragment as uo,jsx as po}from"react/jsx-runtime";import{Fragment as Ye,jsx as ue}from"react/jsx-runtime";var ee="k-icon k-font-icon",Xe=[],Ue={size:[i.xsmall,i.small,i.medium,i.large,i.xlarge,i.xxlarge,i.xxxlarge],themeColor:[a.base,a.primary,a.secondary,a.tertiary,a.success,a.warning,a.error,a.info,a.light,a.dark]},qe={},O=t=>{let{size:e,themeColor:n,icon:r,rotate:l,flip:m,...s}=t;return r?ue("span",{...s,className:o(t.className,ee,T(ee,{size:e}),{[`k-i-${r}`]:r,[`k-color-${n}`]:n,[`k-rotate-${l}`]:l,"k-flip-h":m==="h"||m==="both","k-flip-v":m==="v"||m==="both"})}):ue(Ye,{})};O.states=Xe;O.options=Ue;O.className=ee;O.defaultOptions=qe;var fe=O;import{Fragment as je,jsx as U}from"react/jsx-runtime";var te="k-icon k-svg-icon",Ze=[],Qe={size:[i.xsmall,i.small,i.medium,i.large,i.xlarge,i.xxlarge,i.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:l,viewBox:m=Te.viewBox,icon:s,...u}=t;if(!s)return U(je,{});s==="none"&&{...u,className:o(t.className,te,"k-none")};let p=typeof s=="object"&&s.name&&s.name;return U("span",{...u,className:o(t.className,te,T("k-icon",{size:e}),{[`k-svg-i-${p}`]:p,[`k-color-${n}`]:n,[`k-rotate-${r}`]:r,"k-flip-h":l==="h"||l==="both","k-flip-v":l==="v"||l==="both"}),children:U("svg",{"aria-hidden":!0,focusable:!1,xmlns:"http://www.w3.org/2000/svg",viewBox:typeof s=="object"?s.viewBox:m,dangerouslySetInnerHTML:typeof s=="object"?{__html:s.content}:void 0,children:s?void 0:t.children})})};R.states=Ze;R.options=Qe;R.className=te;R.defaultOptions=Te;var oe=R;import*as Ce from"@progress/kendo-svg-icons";import{Fragment as xe,jsx as w}from"react/jsx-runtime";var et=t=>t.replace(/([-_][a-z0-9])/gi,e=>e.toUpperCase().replace("-","").replace("_","")),tt=[],ot={size:[i.xsmall,i.small,i.medium,i.large,i.xlarge,i.xxlarge,i.xxxlarge],themeColor:[a.base,a.primary,a.secondary,a.tertiary,a.success,a.warning,a.error,a.info,a.light,a.dark]},ae={viewBox:"0 0 24 24",type:"svg"},N=t=>{let{size:e,themeColor:n,icon:r,type:l=ae.type,rotate:m,flip:s,viewBox:u=ae.viewBox,...p}=t;if(!r)return w(xe,{});if(l==="svg"){if(r==="none")return w(oe,{...p,icon:r,size:e});let W=et(`${r}-icon`);return Ce[W]?w(oe,{...p,icon:Ce[W],size:e,themeColor:n,rotate:m,flip:s,viewBox:u}):w(xe,{})}return w(fe,{...p,icon:r,size:e,themeColor:n,rotate:m,flip:s})};N.states=tt;N.options=ot;N.defaultOptions=ae;import{Fragment as rt,jsx as K,jsxs as he}from"react/jsx-runtime";var q="k-button",at=[c.hover,c.focus,c.active,c.selected,c.disabled],nt={size:[i.small,i.medium,i.large],rounded:[y.small,y.medium,y.large,y.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:i.medium,rounded:y.medium,fillMode:b.solid,themeColor:a.base,showArrow:!1,arrowIconName:"caret-alt-down"},d=t=>{let{size:e=k.size,rounded:n=k.rounded,fillMode:r=k.fillMode,themeColor:l=k.themeColor,showArrow:m=k.showArrow,arrowIconName:s=k.arrowIconName,hover:u,focus:p,active:W,selected:Ie,disabled:He,icon:Q,text:J,iconClassName:Be,...Oe}=t,Re=Q!==void 0,we=t.children!==void 0;return he("button",{...Oe,className:o(t.className,q,T(q,{size:e,rounded:n,fillMode:r,themeColor:l}),C(q,{hover:u,focus:p,active:W,disabled:He,selected:Ie}),{"k-icon-button":!J&&!we&&Re}),children:[Q&&K(N,{className:o(Be,"k-button-icon"),icon:Q}),J?he(rt,{children:[J&&K("span",{className:"k-button-text",children:J}),t.children]}):t.children&&K("span",{className:"k-button-text",children:t.children}),m&&K("span",{className:"k-menu-button-arrow k-button-arrow",children:K(N,{icon:s})})]})};d.states=at;d.options=nt;d.className=q;d.defaultOptions=k;import{jsx as Ko}from"react/jsx-runtime";import{jsx as _o}from"react/jsx-runtime";import{jsx as Wo}from"react/jsx-runtime";import{Fragment as lt,jsx as z,jsxs as st}from"react/jsx-runtime";var it="k-card-header",D=t=>{let{title:e,subtitle:n,details:r,...l}=t;return st("div",{...l,className:o(t.className,it),children:[e&&z(L,{children:e}),n&&z(h,{children:n}),z(lt,{children:t.children}),r&&z("span",{className:"k-card-header-actions",children:z(d,{className:"k-card-details",icon:"more-vertical",rounded:"medium",size:"medium",fillMode:"flat",themeColor:"base"})})]})};import{jsx as ra}from"react/jsx-runtime";import{Fragment as mt,jsx as P,jsxs as dt}from"react/jsx-runtime";var ct="k-card-body",S=t=>{let{title:e,subtitle:n,details:r,...l}=t;return dt("div",{...l,className:o(t.className,ct),children:[e&&P(L,{children:e}),n&&P(h,{children:n}),P(mt,{children:t.children}),r&&P("span",{className:"k-card-header-actions",children:P(d,{className:"k-card-details",icon:"more-vertical",rounded:"medium",size:"medium",fillMode:"flat",themeColor:"base"})})]})};import{jsx as Ta}from"react/jsx-runtime";import{jsx as ft}from"react/jsx-runtime";var Y="k-actions",pt=[],ut={},ne={alignment:"start",orientation:"horizontal"},I=t=>{let{alignment:e=ne.alignment,orientation:n=ne.orientation,...r}=t;return ft("div",{...r,className:o(Y,{[`${Y}-${e}`]:e,[`${Y}-${n}`]:n},t.className),children:t.children})};I.states=pt;I.options=ut;I.className=Y;I.defaultOptions=ne;import{Fragment as La,jsx as Aa,jsxs as ya}from"react/jsx-runtime";import{Fragment as Ka,jsx as Ra,jsxs as wa}from"react/jsx-runtime";import{Fragment as xt,jsx as Ne}from"react/jsx-runtime";var _="k-timeline",Tt=[],Ct={},ve={orientation:"vertical"},v=t=>{let{orientation:e=ve.orientation,collapsibleEvents:n,alternatingMode:r,...l}=t;return Ne("div",{...l,className:o(t.className,_,{[`${_}-${e}`]:e,[`${_}-alternating`]:r,[`${_}-collapsible`]:n}),children:Ne(xt,{children:t.children})})};v.states=Tt;v.options=Ct;v.className=_;v.defaultOptions=ve;import{jsx as f,jsxs as re}from"react/jsx-runtime";var be="k-timeline-event",ht=[],Nt={},H={collapsed:!1,reverse:!1,title:"Event title",subtitle:"Event subtitle",content:"Event content"},E=t=>{let{date:e,content:n=H.content,collapsed:r=H.collapsed,reverse:l=H.reverse,title:m=H.title,subtitle:s=H.subtitle,showCollapseButton:u,...p}=t;return re("li",{...p,className:o(t.className,be,{"k-reverse":l}),children:[e&&f("div",{className:"k-timeline-date-wrap",children:f("span",{className:"k-timeline-date",children:e})}),f(ie,{}),n&&f("div",{className:o("k-timeline-card",{"k-collapsed":r}),children:f(g,{...l?{callout:"right"}:{callout:"left"},children:re("div",{className:"k-card-inner",children:[re(D,{children:[f(M,{collapsible:u,children:m}),f(h,{children:s})]}),f(S,{children:f("div",{className:"k-card-description",children:n})})]})})}),t.children]})};E.states=ht;E.options=Nt;E.className=be;E.defaultOptions=H;import{jsx as B,jsxs as le}from"react/jsx-runtime";var ke="k-timeline-event",vt=[],bt={},Z={title:"Event title",subtitle:"Event subtitle",content:"Event content"},$=t=>{let{content:e=Z.content,title:n=Z.title,subtitle:r=Z.subtitle,...l}=t;return le("li",{...l,className:o(t.className,ke),children:[e&&B("div",{className:o("k-timeline-card"),children:B(g,{orientation:"vertical",callout:"top",children:le("div",{className:"k-card-inner",children:[le(D,{children:[B(M,{children:n}),B(h,{children:r})]}),B(S,{children:B("div",{className:"k-card-description",children:e})})]})})}),t.children]})};$.states=vt;$.options=bt;$.className=ke;$.defaultOptions=Z;import{jsx as pn}from"react/jsx-runtime";import{jsx as Mt,jsxs as gt}from"react/jsx-runtime";var Ee="k-timeline-flag-wrap",kt=[c.focus,c.selected],Et={},Me={year:"2020"},A=t=>{let{year:e=Me.year,...n}=t;return gt("li",{...n,className:o(t.className,Ee),children:[Mt("span",{className:"k-timeline-flag",children:e}),t.children]})};A.states=kt;A.options=Et;A.className=Ee;A.defaultOptions=Me;import{jsx as yt}from"react/jsx-runtime";var At="k-timeline-circle",ie=t=>{let{...e}=t;return yt("span",{...e,className:o(t.className,At)})};import{jsx as kn}from"react/jsx-runtime";import{jsx as se,jsxs as It}from"react/jsx-runtime";var ge="k-card-title",Lt=[],St={},M=t=>{let{collapsible:e,children:n,...r}=t;return It("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(N,{icon:"chevron-right",className:"k-button-icon"})})]})};M.states=Lt;M.className=ge;M.defaultOptions=St;import{jsx as Ot}from"react/jsx-runtime";var Ae="k-timeline-card-callout",Ht=[],Bt={},F=t=>{let{...e}=t;return Ot(G,{className:o(t.className,Ae),...e})};F.states=Ht;F.className=Ae;F.defaultOptions=Bt;import{jsx as ye}from"react/jsx-runtime";var Le="k-timeline-date-wrap",Rt=[],wt={},Se={date:"May 25, 2008"},V=t=>{let{date:e=Se.date,...n}=t;return ye("div",{...n,className:o(t.className,Le),children:ye("span",{className:"k-timeline-date",children:e})})};V.states=Rt;V.options=wt;V.className=Le;V.defaultOptions=Se;import{jsx as _n,jsxs as $n}from"react/jsx-runtime";import{jsx as Gn}from"react/jsx-runtime";import{jsxs as zt}from"react/jsx-runtime";var ce="k-timeline-track-item",Kt=[c.focus],me=t=>{let{content:e,focus:n,...r}=t;return zt("li",{...r,className:o(t.className,ce,C(ce,{focus:n})),children:[e,t.children]})};me.states=Kt;me.className=ce;import{jsx as jn,jsxs as er}from"react/jsx-runtime";import{jsx as nr,jsxs as rr}from"react/jsx-runtime";import{jsx as cr,jsxs as mr}from"react/jsx-runtime";import{Fragment as Nr,jsx as xr,jsxs as hr}from"react/jsx-runtime";import{jsx as _t,jsxs as $t}from"react/jsx-runtime";var Dt=[],Pt={},g=t=>{let{callout:e,children:n,...r}=t;return $t(x,{className:o(t.className),orientation:"vertical",callout:"true",...r,children:[e&&_t(F,{callout:e}),n]})};g.states=Dt;g.defaultOptions=Pt;var Wr=g;export{g as TimelineCard,Wr as default};