@progress/kendo-themes-html
Version:
A collection of HTML helpers used for developing Kendo UI themes
2 lines (1 loc) • 14.9 kB
JavaScript
var nt=Object.create;var te=Object.defineProperty;var rt=Object.getOwnPropertyDescriptor;var it=Object.getOwnPropertyNames;var lt=Object.getPrototypeOf,st=Object.prototype.hasOwnProperty;var ct=(e,t)=>{for(var a in t)te(e,a,{get:t[a],enumerable:!0})},Ee=(e,t,a,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of it(t))!st.call(e,i)&&i!==a&&te(e,i,{get:()=>t[i],enumerable:!(r=rt(t,i))||r.enumerable});return e};var mt=(e,t,a)=>(a=e!=null?nt(lt(e)):{},Ee(t||!e||!e.__esModule?te(a,"default",{value:e,enumerable:!0}):a,e)),dt=e=>Ee(te({},"__esModule",{value:!0}),e);var io={};ct(io,{TimelineHorizontal:()=>ro});module.exports=dt(io);var o=(...e)=>e.filter(t=>t!==!0&&!!t).map(t=>Array.isArray(t)?o(...t):typeof t=="object"?Object.keys(t).map((a,r)=>t[r]||t[a]&&a||null).filter(a=>a!==null).join(" "):t).filter(t=>!!t).join(" ");var k=(e,t)=>o({[`${e}-xs`]:t.size==="xsmall",[`${e}-sm`]:t.size==="small",[`${e}-md`]:t.size==="medium",[`${e}-lg`]:t.size==="large",[`${e}-xl`]:t.size==="xlarge",[`${e}-xxl`]:t.size==="xxlarge",[`${e}-xxxl`]:t.size==="xxxlarge"},{[`${e}-${t.fillMode}`]:t.fillMode},{[`${e}-${t.fillMode}-${t.themeColor}`]:t.fillMode&&t.themeColor},{[`${e}-${t.themeColor}`]:t.themeColor&&t.fillMode===void 0},{"k-rounded-sm":t.rounded==="small","k-rounded-md":t.rounded==="medium","k-rounded-lg":t.rounded==="large","k-rounded-full":t.rounded==="full"}),E=(e,t)=>o({"k-valid":t.valid,"k-invalid":t.invalid,"k-hover":t.hover,"k-focus":t.focus,"k-checked":t.checked,"k-active":t.active,"k-selected":t.selected,"k-disabled":t.disabled,"k-indeterminate":t.indeterminate&&!t.checked,"k-loading":t.loading,"k-empty":t.empty,"k-readonly":t.readonly,"k-highlighted":t.highlighted});var l={xsmall:"xsmall",small:"small",medium:"medium",large:"large",xlarge:"xlarge",xxlarge:"xxlarge",xxxlarge:"xxxlarge"},K={small:"small",medium:"medium",large:"large",full:"full"},S={solid:"solid",flat:"flat",outline:"outline",clear:"clear",link:"link"},n={inherit:"inherit",base:"base",primary:"primary",secondary:"secondary",tertiary:"tertiary",info:"info",success:"success",warning:"warning",error:"error",dark:"dark",light:"light",inverse:"inverse"},m={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"},Me={calloutMap:{top:"n",bottom:"s",left:"w",right:"e"},orientationMap:{vertical:"vstack",horizontal:"hstack"}};var X=require("react/jsx-runtime"),G="k-timeline",pt=[],ut={},ge={orientation:"vertical"},v=e=>{let{orientation:t=ge.orientation,collapsibleEvents:a,alternatingMode:r,...i}=e;return(0,X.jsx)("div",{...i,className:o(e.className,G,{[`${G}-${t}`]:t,[`${G}-alternating`]:r,[`${G}-collapsible`]:a}),children:(0,X.jsx)(X.Fragment,{children:e.children})})};v.states=pt;v.options=ut;v.className=G;v.defaultOptions=ge;var Ae=require("react/jsx-runtime"),ft="k-card-callout",oe=e=>{let{callout:t,...a}=e;return(0,Ae.jsx)("span",{...a,className:o(e.className,ft,{[`k-callout-${Me.calloutMap[t]||t}`]:t})})};var I=require("react/jsx-runtime"),ae="k-card",Tt=[m.hover,m.focus,m.selected,m.disabled],Ct={themeColor:[n.primary,n.success,n.warning,n.error,n.info]},xt={},M=e=>{let{orientation:t,themeColor:a,callout:r,hover:i,focus:p,selected:c,disabled:x,...f}=e;return(0,I.jsxs)("div",{...f,className:o(e.className,ae,k(ae,{themeColor:a}),E(ae,{hover:i,focus:p,disabled:x,selected:c}),{[`k-card-${t}`]:t,"k-card-with-callout":r}),children:[r&&r!=="true"&&(0,I.jsx)(oe,{callout:r}),(0,I.jsx)(I.Fragment,{children:e.children})]})};M.states=Tt;M.options=Ct;M.className=ae;M.defaultOptions=xt;var ye=require("react/jsx-runtime"),me="k-card-title",ht=[m.hover,m.focus],z=e=>{let{hover:t,focus:a,...r}=e;return(0,ye.jsx)("div",{...r,className:o(e.className,me,E(me,{hover:t,focus:a})),children:e.children})};z.states=ht;z.className=me;var Le=require("react/jsx-runtime"),Nt="k-card-subtitle",g=e=>{let{...t}=e;return(0,Le.jsx)("div",{...t,className:o(e.className,Nt),children:e.children})};var Se=require("react/jsx-runtime");var U=require("react/jsx-runtime"),de="k-icon k-font-icon",vt=[],bt={size:[l.xsmall,l.small,l.medium,l.large,l.xlarge,l.xxlarge,l.xxxlarge],themeColor:[n.base,n.primary,n.secondary,n.tertiary,n.success,n.warning,n.error,n.info,n.light,n.dark]},kt={},q=e=>{let{size:t,themeColor:a,icon:r,rotate:i,flip:p,...c}=e;return r?(0,U.jsx)("span",{...c,className:o(e.className,de,k(de,{size:t}),{[`k-i-${r}`]:r,[`k-color-${a}`]:a,[`k-rotate-${i}`]:i,"k-flip-h":p==="h"||p==="both","k-flip-v":p==="v"||p==="both"})}):(0,U.jsx)(U.Fragment,{})};q.states=vt;q.options=bt;q.className=de;q.defaultOptions=kt;var Ie=q;var H=require("react/jsx-runtime"),pe="k-icon k-svg-icon",Et=[],Mt={size:[l.xsmall,l.small,l.medium,l.large,l.xlarge,l.xxlarge,l.xxxlarge],themeColor:[n.base,n.primary,n.secondary,n.tertiary,n.success,n.warning,n.error,n.info,n.light,n.dark]},He={viewBox:"0 0 24 24"},Y=e=>{let{size:t,themeColor:a,rotate:r,flip:i,viewBox:p=He.viewBox,icon:c,...x}=e;if(!c)return(0,H.jsx)(H.Fragment,{});c==="none"&&{...x,className:o(e.className,pe,"k-none")};let f=typeof c=="object"&&c.name&&c.name;return(0,H.jsx)("span",{...x,className:o(e.className,pe,k("k-icon",{size:t}),{[`k-svg-i-${f}`]:f,[`k-color-${a}`]:a,[`k-rotate-${r}`]:r,"k-flip-h":i==="h"||i==="both","k-flip-v":i==="v"||i==="both"}),children:(0,H.jsx)("svg",{"aria-hidden":!0,focusable:!1,xmlns:"http://www.w3.org/2000/svg",viewBox:typeof c=="object"?c.viewBox:p,dangerouslySetInnerHTML:typeof c=="object"?{__html:c.content}:void 0,children:c?void 0:e.children})})};Y.states=Et;Y.options=Mt;Y.className=pe;Y.defaultOptions=He;var ue=Y;var Be=mt(require("@progress/kendo-svg-icons")),b=require("react/jsx-runtime"),gt=e=>e.replace(/([-_][a-z0-9])/gi,t=>t.toUpperCase().replace("-","").replace("_","")),At=[],yt={size:[l.xsmall,l.small,l.medium,l.large,l.xlarge,l.xxlarge,l.xxxlarge],themeColor:[n.base,n.primary,n.secondary,n.tertiary,n.success,n.warning,n.error,n.info,n.light,n.dark]},fe={viewBox:"0 0 24 24",type:"svg"},A=e=>{let{size:t,themeColor:a,icon:r,type:i=fe.type,rotate:p,flip:c,viewBox:x=fe.viewBox,...f}=e;if(!r)return(0,b.jsx)(b.Fragment,{});if(i==="svg"){if(r==="none")return(0,b.jsx)(ue,{...f,icon:r,size:t});let j=gt(`${r}-icon`);return Be[j]?(0,b.jsx)(ue,{...f,icon:Be[j],size:t,themeColor:a,rotate:p,flip:c,viewBox:x}):(0,b.jsx)(b.Fragment,{})}return(0,b.jsx)(Ie,{...f,icon:r,size:t,themeColor:a,rotate:p,flip:c})};A.states=At;A.options=yt;A.defaultOptions=fe;var T=require("react/jsx-runtime"),ne="k-button",Lt=[m.hover,m.focus,m.active,m.selected,m.disabled],St={size:[l.small,l.medium,l.large],rounded:[K.small,K.medium,K.large,K.full],fillMode:[S.solid,S.flat,S.outline,S.clear,S.link],themeColor:[n.base,n.primary,n.secondary,n.tertiary,n.success,n.warning,n.error,n.info,n.light,n.dark,n.inverse]},B={size:l.medium,rounded:K.medium,fillMode:S.solid,themeColor:n.base,showArrow:!1,arrowIconName:"caret-alt-down"},d=e=>{let{size:t=B.size,rounded:a=B.rounded,fillMode:r=B.fillMode,themeColor:i=B.themeColor,showArrow:p=B.showArrow,arrowIconName:c=B.arrowIconName,hover:x,focus:f,active:j,selected:Qe,disabled:je,icon:ce,text:ee,iconClassName:et,...tt}=e,ot=ce!==void 0,at=e.children!==void 0;return(0,T.jsxs)("button",{...tt,className:o(e.className,ne,k(ne,{size:t,rounded:a,fillMode:r,themeColor:i}),E(ne,{hover:x,focus:f,active:j,disabled:je,selected:Qe}),{"k-icon-button":!ee&&!at&&ot}),children:[ce&&(0,T.jsx)(A,{className:o(et,"k-button-icon"),icon:ce}),ee?(0,T.jsxs)(T.Fragment,{children:[ee&&(0,T.jsx)("span",{className:"k-button-text",children:ee}),e.children]}):e.children&&(0,T.jsx)("span",{className:"k-button-text",children:e.children}),p&&(0,T.jsx)("span",{className:"k-menu-button-arrow k-button-arrow",children:(0,T.jsx)(A,{icon:c})})]})};d.states=Lt;d.options=St;d.className=ne;d.defaultOptions=B;var It=require("react/jsx-runtime");var Ht=require("react/jsx-runtime");var Bt=require("react/jsx-runtime");var h=require("react/jsx-runtime"),Ot="k-card-header",Z=e=>{let{title:t,subtitle:a,details:r,...i}=e;return(0,h.jsxs)("div",{...i,className:o(e.className,Ot),children:[t&&(0,h.jsx)(z,{children:t}),a&&(0,h.jsx)(g,{children:a}),(0,h.jsx)(h.Fragment,{children:e.children}),r&&(0,h.jsx)("span",{className:"k-card-header-actions",children:(0,h.jsx)(d,{className:"k-card-details",icon:"more-vertical",rounded:"medium",size:"medium",fillMode:"flat",themeColor:"base"})})]})};var Rt=require("react/jsx-runtime");var N=require("react/jsx-runtime"),wt="k-card-body",D=e=>{let{title:t,subtitle:a,details:r,...i}=e;return(0,N.jsxs)("div",{...i,className:o(e.className,wt),children:[t&&(0,N.jsx)(z,{children:t}),a&&(0,N.jsx)(g,{children:a}),(0,N.jsx)(N.Fragment,{children:e.children}),r&&(0,N.jsx)("span",{className:"k-card-header-actions",children:(0,N.jsx)(d,{className:"k-card-details",icon:"more-vertical",rounded:"medium",size:"medium",fillMode:"flat",themeColor:"base"})})]})};var Kt=require("react/jsx-runtime");var Oe=require("react/jsx-runtime"),re="k-actions",zt=[],Dt={},Te={alignment:"start",orientation:"horizontal"},P=e=>{let{alignment:t=Te.alignment,orientation:a=Te.orientation,...r}=e;return(0,Oe.jsx)("div",{...r,className:o(re,{[`${re}-${t}`]:t,[`${re}-${a}`]:a},e.className),children:e.children})};P.states=zt;P.options=Dt;P.className=re;P.defaultOptions=Te;var Ce=require("react/jsx-runtime");var xe=require("react/jsx-runtime");var u=require("react/jsx-runtime"),Re="k-timeline-event",Pt=[],_t={},_={collapsed:!1,reverse:!1,title:"Event title",subtitle:"Event subtitle",content:"Event content"},O=e=>{let{date:t,content:a=_.content,collapsed:r=_.collapsed,reverse:i=_.reverse,title:p=_.title,subtitle:c=_.subtitle,showCollapseButton:x,...f}=e;return(0,u.jsxs)("li",{...f,className:o(e.className,Re,{"k-reverse":i}),children:[t&&(0,u.jsx)("div",{className:"k-timeline-date-wrap",children:(0,u.jsx)("span",{className:"k-timeline-date",children:t})}),(0,u.jsx)($,{}),a&&(0,u.jsx)("div",{className:o("k-timeline-card",{"k-collapsed":r}),children:(0,u.jsx)(F,{...i?{callout:"right"}:{callout:"left"},children:(0,u.jsxs)("div",{className:"k-card-inner",children:[(0,u.jsxs)(Z,{children:[(0,u.jsx)(R,{collapsible:x,children:p}),(0,u.jsx)(g,{children:c})]}),(0,u.jsx)(D,{children:(0,u.jsx)("div",{className:"k-card-description",children:a})})]})})}),e.children]})};O.states=Pt;O.options=_t;O.className=Re;O.defaultOptions=_;var C=require("react/jsx-runtime"),we="k-timeline-event",$t=[],Ft={},ie={title:"Event title",subtitle:"Event subtitle",content:"Event content"},V=e=>{let{content:t=ie.content,title:a=ie.title,subtitle:r=ie.subtitle,...i}=e;return(0,C.jsxs)("li",{...i,className:o(e.className,we),children:[t&&(0,C.jsx)("div",{className:o("k-timeline-card"),children:(0,C.jsx)(F,{orientation:"vertical",callout:"top",children:(0,C.jsxs)("div",{className:"k-card-inner",children:[(0,C.jsxs)(Z,{children:[(0,C.jsx)(R,{children:a}),(0,C.jsx)(g,{children:r})]}),(0,C.jsx)(D,{children:(0,C.jsx)("div",{className:"k-card-description",children:t})})]})})}),e.children]})};V.states=$t;V.options=Ft;V.className=we;V.defaultOptions=ie;var he=require("react/jsx-runtime"),Vt="k-timeline-events-list",Ke=e=>{let{...t}=e;return(0,he.jsx)("div",{...t,className:o(e.className,Vt),children:(0,he.jsx)("ul",{className:"k-timeline-scrollable-wrap",children:e.children})})};var le=require("react/jsx-runtime"),ze="k-timeline-flag-wrap",Wt=[m.focus,m.selected],Jt={},De={year:"2020"},w=e=>{let{year:t=De.year,...a}=e;return(0,le.jsxs)("li",{...a,className:o(e.className,ze),children:[(0,le.jsx)("span",{className:"k-timeline-flag",children:t}),e.children]})};w.states=Wt;w.options=Jt;w.className=ze;w.defaultOptions=De;var Pe=require("react/jsx-runtime"),Gt="k-timeline-circle",$=e=>{let{...t}=e;return(0,Pe.jsx)("span",{...t,className:o(e.className,Gt)})};var _e=require("react/jsx-runtime"),Xt="k-timeline-flag",Ne=e=>{let{content:t,...a}=e;return(0,_e.jsx)("span",{...a,className:o(e.className,Xt),children:t})};var se=require("react/jsx-runtime"),Ut=[],qt={},F=e=>{let{callout:t,children:a,...r}=e;return(0,se.jsxs)(M,{className:o(e.className),orientation:"vertical",callout:"true",...r,children:[t&&(0,se.jsx)(Q,{callout:t}),a]})};F.states=Ut;F.defaultOptions=qt;var W=require("react/jsx-runtime"),$e="k-card-title",Yt=[],Zt={},R=e=>{let{collapsible:t,children:a,...r}=e;return(0,W.jsxs)("div",{className:o(e.className,$e),...r,children:[(0,W.jsx)("span",{className:"k-event-title",children:a}),t&&(0,W.jsx)("span",{className:"k-event-collapse k-button k-button-md k-rounded-md k-button-flat k-button-flat-base k-icon-button",children:(0,W.jsx)(A,{icon:"chevron-right",className:"k-button-icon"})})]})};R.states=Yt;R.className=$e;R.defaultOptions=Zt;var Ve=require("react/jsx-runtime"),Fe="k-timeline-card-callout",Qt=[],jt={},Q=e=>{let{...t}=e;return(0,Ve.jsx)(oe,{className:o(e.className,Fe),...t})};Q.states=Qt;Q.className=Fe;Q.defaultOptions=jt;var ve=require("react/jsx-runtime"),We="k-timeline-date-wrap",eo=[],to={},Je={date:"May 25, 2008"},y=e=>{let{date:t=Je.date,...a}=e;return(0,ve.jsx)("div",{...a,className:o(e.className,We),children:(0,ve.jsx)("span",{className:"k-timeline-date",children:t})})};y.states=eo;y.options=to;y.className=We;y.defaultOptions=Je;var J=require("react/jsx-runtime"),oo="k-timeline-track-wrap",Ge=e=>{let{...t}=e;return(0,J.jsxs)("div",{...t,className:o(e.className,oo),children:[(0,J.jsx)(d,{className:"k-timeline-arrow k-timeline-arrow-left",rounded:"full",icon:"caret-alt-left",disabled:!0}),(0,J.jsx)(d,{className:"k-timeline-arrow k-timeline-arrow-right",rounded:"full",icon:"caret-alt-right"}),(0,J.jsx)(Xe,{children:e.children})]})};var be=require("react/jsx-runtime"),ao="k-timeline-track",Xe=e=>{let{...t}=e;return(0,be.jsx)("div",{...t,className:o(e.className,ao),children:(0,be.jsx)("ul",{className:"k-timeline-scrollable-wrap",children:e.children})})};var Ue=require("react/jsx-runtime"),ke="k-timeline-track-item",no=[m.focus],L=e=>{let{content:t,focus:a,...r}=e;return(0,Ue.jsxs)("li",{...r,className:o(e.className,ke,E(ke,{focus:a})),children:[t,e.children]})};L.states=no;L.className=ke;var qe=require("react/jsx-runtime");var Ye=require("react/jsx-runtime");var Ze=require("react/jsx-runtime");var s=require("react/jsx-runtime"),ro=e=>(0,s.jsx)(v,{orientation:"horizontal",children:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(Ge,{children:[(0,s.jsx)(L,{className:"k-timeline-flag-wrap",children:(0,s.jsx)(Ne,{content:"2015"})}),(0,s.jsxs)(L,{children:[(0,s.jsx)(y,{date:"Jan 14, 2015"}),(0,s.jsx)($,{})]}),(0,s.jsxs)(L,{focus:!0,children:[(0,s.jsx)(y,{date:"Jun 1, 2015"}),(0,s.jsx)($,{})]}),(0,s.jsxs)(L,{children:[(0,s.jsx)(y,{date:"Sep 29, 2015"}),(0,s.jsx)($,{})]}),(0,s.jsx)(L,{className:"k-timeline-flag-wrap",children:(0,s.jsx)(Ne,{content:"2016"})})]}),(0,s.jsx)(Ke,{children:(0,s.jsx)(V,{})})]}),...e});