@progress/kendo-themes-html
Version:
A collection of HTML helpers used for developing Kendo UI themes
2 lines (1 loc) • 14.1 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 x=(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"}),h=(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"},S={small:"small",medium:"medium",large:"large",full:"full"},M={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"},Te={calloutMap:{top:"n",bottom:"s",left:"w",right:"e"},orientationMap:{vertical:"vstack",horizontal:"hstack"}};import{Fragment as Xe,jsx as Ce}from"react/jsx-runtime";var D="k-timeline",Je=[],Ge={},xe={orientation:"vertical"},T=t=>{let{orientation:e=xe.orientation,collapsibleEvents:n,alternatingMode:r,...l}=t;return Ce("div",{...l,className:o(t.className,D,{[`${D}-${e}`]:e,[`${D}-alternating`]:r,[`${D}-collapsible`]:n}),children:Ce(Xe,{children:t.children})})};T.states=Je;T.options=Ge;T.className=D;T.defaultOptions=xe;import{jsx as qe}from"react/jsx-runtime";var Ue="k-card-callout",Y=t=>{let{callout:e,...n}=t;return qe("span",{...n,className:o(t.className,Ue,{[`k-callout-${Te.calloutMap[e]||e}`]:e})})};import{Fragment as je,jsx as he,jsxs as et}from"react/jsx-runtime";var Z="k-card",Ye=[c.hover,c.focus,c.selected,c.disabled],Ze={themeColor:[a.primary,a.success,a.warning,a.error,a.info]},Qe={},N=t=>{let{orientation:e,themeColor:n,callout:r,hover:l,focus:d,selected:s,disabled:f,...u}=t;return et("div",{...u,className:o(t.className,Z,x(Z,{themeColor:n}),h(Z,{hover:l,focus:d,disabled:f,selected:s}),{[`k-card-${e}`]:e,"k-card-with-callout":r}),children:[r&&r!=="true"&&he(Y,{callout:r}),he(je,{children:t.children})]})};N.states=Ye;N.options=Ze;N.className=Z;N.defaultOptions=Qe;import{jsx as ot}from"react/jsx-runtime";var ae="k-card-title",tt=[c.hover,c.focus],I=t=>{let{hover:e,focus:n,...r}=t;return ot("div",{...r,className:o(t.className,ae,h(ae,{hover:e,focus:n})),children:t.children})};I.states=tt;I.className=ae;import{jsx as nt}from"react/jsx-runtime";var at="k-card-subtitle",v=t=>{let{...e}=t;return nt("div",{...e,className:o(t.className,at),children:t.children})};import{Fragment as Bo,jsx as Ho}from"react/jsx-runtime";import{Fragment as st,jsx as Ne}from"react/jsx-runtime";var ne="k-icon k-font-icon",rt=[],it={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]},lt={},P=t=>{let{size:e,themeColor:n,icon:r,rotate:l,flip:d,...s}=t;return r?Ne("span",{...s,className:o(t.className,ne,x(ne,{size:e}),{[`k-i-${r}`]:r,[`k-color-${n}`]:n,[`k-rotate-${l}`]:l,"k-flip-h":d==="h"||d==="both","k-flip-v":d==="v"||d==="both"})}):Ne(st,{})};P.states=rt;P.options=it;P.className=ne;P.defaultOptions=lt;var ve=P;import{Fragment as dt,jsx as Q}from"react/jsx-runtime";var re="k-icon k-svg-icon",ct=[],mt={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]},be={viewBox:"0 0 24 24"},_=t=>{let{size:e,themeColor:n,rotate:r,flip:l,viewBox:d=be.viewBox,icon:s,...f}=t;if(!s)return Q(dt,{});s==="none"&&{...f,className:o(t.className,re,"k-none")};let u=typeof s=="object"&&s.name&&s.name;return Q("span",{...f,className:o(t.className,re,x("k-icon",{size:e}),{[`k-svg-i-${u}`]:u,[`k-color-${n}`]:n,[`k-rotate-${r}`]:r,"k-flip-h":l==="h"||l==="both","k-flip-v":l==="v"||l==="both"}),children:Q("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})})};_.states=ct;_.options=mt;_.className=re;_.defaultOptions=be;var ie=_;import*as ke from"@progress/kendo-svg-icons";import{Fragment as Ee,jsx as $}from"react/jsx-runtime";var pt=t=>t.replace(/([-_][a-z0-9])/gi,e=>e.toUpperCase().replace("-","").replace("_","")),ut=[],ft={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]},le={viewBox:"0 0 24 24",type:"svg"},b=t=>{let{size:e,themeColor:n,icon:r,type:l=le.type,rotate:d,flip:s,viewBox:f=le.viewBox,...u}=t;if(!r)return $(Ee,{});if(l==="svg"){if(r==="none")return $(ie,{...u,icon:r,size:e});let U=pt(`${r}-icon`);return ke[U]?$(ie,{...u,icon:ke[U],size:e,themeColor:n,rotate:d,flip:s,viewBox:f}):$(Ee,{})}return $(ve,{...u,icon:r,size:e,themeColor:n,rotate:d,flip:s})};b.states=ut;b.options=ft;b.defaultOptions=le;import{Fragment as xt,jsx as F,jsxs as Me}from"react/jsx-runtime";var j="k-button",Tt=[c.hover,c.focus,c.active,c.selected,c.disabled],Ct={size:[i.small,i.medium,i.large],rounded:[S.small,S.medium,S.large,S.full],fillMode:[M.solid,M.flat,M.outline,M.clear,M.link],themeColor:[a.base,a.primary,a.secondary,a.tertiary,a.success,a.warning,a.error,a.info,a.light,a.dark,a.inverse]},g={size:i.medium,rounded:S.medium,fillMode:M.solid,themeColor:a.base,showArrow:!1,arrowIconName:"caret-alt-down"},m=t=>{let{size:e=g.size,rounded:n=g.rounded,fillMode:r=g.fillMode,themeColor:l=g.themeColor,showArrow:d=g.showArrow,arrowIconName:s=g.arrowIconName,hover:f,focus:u,active:U,selected:Pe,disabled:_e,icon:oe,text:q,iconClassName:$e,...Fe}=t,Ve=oe!==void 0,We=t.children!==void 0;return Me("button",{...Fe,className:o(t.className,j,x(j,{size:e,rounded:n,fillMode:r,themeColor:l}),h(j,{hover:f,focus:u,active:U,disabled:_e,selected:Pe}),{"k-icon-button":!q&&!We&&Ve}),children:[oe&&F(b,{className:o($e,"k-button-icon"),icon:oe}),q?Me(xt,{children:[q&&F("span",{className:"k-button-text",children:q}),t.children]}):t.children&&F("span",{className:"k-button-text",children:t.children}),d&&F("span",{className:"k-menu-button-arrow k-button-arrow",children:F(b,{icon:s})})]})};m.states=Tt;m.options=Ct;m.className=j;m.defaultOptions=g;import{jsx as ta}from"react/jsx-runtime";import{jsx as ra}from"react/jsx-runtime";import{jsx as ca}from"react/jsx-runtime";import{Fragment as Nt,jsx as V,jsxs as vt}from"react/jsx-runtime";var ht="k-card-header",W=t=>{let{title:e,subtitle:n,details:r,...l}=t;return vt("div",{...l,className:o(t.className,ht),children:[e&&V(I,{children:e}),n&&V(v,{children:n}),V(Nt,{children:t.children}),r&&V("span",{className:"k-card-header-actions",children:V(m,{className:"k-card-details",icon:"more-vertical",rounded:"medium",size:"medium",fillMode:"flat",themeColor:"base"})})]})};import{jsx as Ma}from"react/jsx-runtime";import{Fragment as kt,jsx as J,jsxs as Et}from"react/jsx-runtime";var bt="k-card-body",H=t=>{let{title:e,subtitle:n,details:r,...l}=t;return Et("div",{...l,className:o(t.className,bt),children:[e&&J(I,{children:e}),n&&J(v,{children:n}),J(kt,{children:t.children}),r&&J("span",{className:"k-card-header-actions",children:J(m,{className:"k-card-details",icon:"more-vertical",rounded:"medium",size:"medium",fillMode:"flat",themeColor:"base"})})]})};import{jsx as Ra}from"react/jsx-runtime";import{jsx as At}from"react/jsx-runtime";var ee="k-actions",Mt=[],gt={},se={alignment:"start",orientation:"horizontal"},B=t=>{let{alignment:e=se.alignment,orientation:n=se.orientation,...r}=t;return At("div",{...r,className:o(ee,{[`${ee}-${e}`]:e,[`${ee}-${n}`]:n},t.className),children:t.children})};B.states=Mt;B.options=gt;B.className=ee;B.defaultOptions=se;import{Fragment as Xa,jsx as Ja,jsxs as Ga}from"react/jsx-runtime";import{Fragment as tn,jsx as ja,jsxs as en}from"react/jsx-runtime";import{jsx as C,jsxs as ce}from"react/jsx-runtime";var ge="k-timeline-event",yt=[],Lt={},O={collapsed:!1,reverse:!1,title:"Event title",subtitle:"Event subtitle",content:"Event content"},A=t=>{let{date:e,content:n=O.content,collapsed:r=O.collapsed,reverse:l=O.reverse,title:d=O.title,subtitle:s=O.subtitle,showCollapseButton:f,...u}=t;return ce("li",{...u,className:o(t.className,ge,{"k-reverse":l}),children:[e&&C("div",{className:"k-timeline-date-wrap",children:C("span",{className:"k-timeline-date",children:e})}),C(R,{}),n&&C("div",{className:o("k-timeline-card",{"k-collapsed":r}),children:C(w,{...l?{callout:"right"}:{callout:"left"},children:ce("div",{className:"k-card-inner",children:[ce(W,{children:[C(y,{collapsible:f,children:d}),C(v,{children:s})]}),C(H,{children:C("div",{className:"k-card-description",children:n})})]})})}),t.children]})};A.states=yt;A.options=Lt;A.className=ge;A.defaultOptions=O;import{jsx as K,jsxs as me}from"react/jsx-runtime";var Ae="k-timeline-event",St=[],It={},te={title:"Event title",subtitle:"Event subtitle",content:"Event content"},z=t=>{let{content:e=te.content,title:n=te.title,subtitle:r=te.subtitle,...l}=t;return me("li",{...l,className:o(t.className,Ae),children:[e&&K("div",{className:o("k-timeline-card"),children:K(w,{orientation:"vertical",callout:"top",children:me("div",{className:"k-card-inner",children:[me(W,{children:[K(y,{children:n}),K(v,{children:r})]}),K(H,{children:K("div",{className:"k-card-description",children:e})})]})})}),t.children]})};z.states=St;z.options=It;z.className=Ae;z.defaultOptions=te;import{jsx as ye}from"react/jsx-runtime";var Ht="k-timeline-events-list",Le=t=>{let{...e}=t;return ye("div",{...e,className:o(t.className,Ht),children:ye("ul",{className:"k-timeline-scrollable-wrap",children:t.children})})};import{jsx as Rt,jsxs as wt}from"react/jsx-runtime";var Se="k-timeline-flag-wrap",Bt=[c.focus,c.selected],Ot={},Ie={year:"2020"},L=t=>{let{year:e=Ie.year,...n}=t;return wt("li",{...n,className:o(t.className,Se),children:[Rt("span",{className:"k-timeline-flag",children:e}),t.children]})};L.states=Bt;L.options=Ot;L.className=Se;L.defaultOptions=Ie;import{jsx as zt}from"react/jsx-runtime";var Kt="k-timeline-circle",R=t=>{let{...e}=t;return zt("span",{...e,className:o(t.className,Kt)})};import{jsx as Pt}from"react/jsx-runtime";var Dt="k-timeline-flag",de=t=>{let{content:e,...n}=t;return Pt("span",{...n,className:o(t.className,Dt),children:e})};import{jsx as Ft,jsxs as Vt}from"react/jsx-runtime";var _t=[],$t={},w=t=>{let{callout:e,children:n,...r}=t;return Vt(N,{className:o(t.className),orientation:"vertical",callout:"true",...r,children:[e&&Ft(G,{callout:e}),n]})};w.states=_t;w.defaultOptions=$t;import{jsx as pe,jsxs as Gt}from"react/jsx-runtime";var He="k-card-title",Wt=[],Jt={},y=t=>{let{collapsible:e,children:n,...r}=t;return Gt("div",{className:o(t.className,He),...r,children:[pe("span",{className:"k-event-title",children:n}),e&&pe("span",{className:"k-event-collapse k-button k-button-md k-rounded-md k-button-flat k-button-flat-base k-icon-button",children:pe(b,{icon:"chevron-right",className:"k-button-icon"})})]})};y.states=Wt;y.className=He;y.defaultOptions=Jt;import{jsx as qt}from"react/jsx-runtime";var Be="k-timeline-card-callout",Xt=[],Ut={},G=t=>{let{...e}=t;return qt(Y,{className:o(t.className,Be),...e})};G.states=Xt;G.className=Be;G.defaultOptions=Ut;import{jsx as Oe}from"react/jsx-runtime";var Re="k-timeline-date-wrap",Yt=[],Zt={},we={date:"May 25, 2008"},k=t=>{let{date:e=we.date,...n}=t;return Oe("div",{...n,className:o(t.className,Re),children:Oe("span",{className:"k-timeline-date",children:e})})};k.states=Yt;k.options=Zt;k.className=Re;k.defaultOptions=we;import{jsx as ue,jsxs as jt}from"react/jsx-runtime";var Qt="k-timeline-track-wrap",Ke=t=>{let{...e}=t;return jt("div",{...e,className:o(t.className,Qt),children:[ue(m,{className:"k-timeline-arrow k-timeline-arrow-left",rounded:"full",icon:"caret-alt-left",disabled:!0}),ue(m,{className:"k-timeline-arrow k-timeline-arrow-right",rounded:"full",icon:"caret-alt-right"}),ue(ze,{children:t.children})]})};import{jsx as De}from"react/jsx-runtime";var eo="k-timeline-track",ze=t=>{let{...e}=t;return De("div",{...e,className:o(t.className,eo),children:De("ul",{className:"k-timeline-scrollable-wrap",children:t.children})})};import{jsxs as oo}from"react/jsx-runtime";var fe="k-timeline-track-item",to=[c.focus],E=t=>{let{content:e,focus:n,...r}=t;return oo("li",{...r,className:o(t.className,fe,h(fe,{focus:n})),children:[e,t.children]})};E.states=to;E.className=fe;import{jsx as Tr,jsxs as Cr}from"react/jsx-runtime";import{jsx as vr,jsxs as br}from"react/jsx-runtime";import{jsx as gr,jsxs as Ar}from"react/jsx-runtime";import{Fragment as ao,jsx as p,jsxs as X}from"react/jsx-runtime";var Ur=t=>p(T,{orientation:"horizontal",children:X(ao,{children:[X(Ke,{children:[p(E,{className:"k-timeline-flag-wrap",children:p(de,{content:"2015"})}),X(E,{children:[p(k,{date:"Jan 14, 2015"}),p(R,{})]}),X(E,{focus:!0,children:[p(k,{date:"Jun 1, 2015"}),p(R,{})]}),X(E,{children:[p(k,{date:"Sep 29, 2015"}),p(R,{})]}),p(E,{className:"k-timeline-flag-wrap",children:p(de,{content:"2016"})})]}),p(Le,{children:p(z,{})})]}),...t});export{Ur as TimelineHorizontal};