@progress/kendo-themes-html
Version:
A collection of HTML helpers used for developing Kendo UI themes
2 lines (1 loc) • 15.2 kB
JavaScript
var qe=Object.create;var ee=Object.defineProperty;var Ze=Object.getOwnPropertyDescriptor;var Qe=Object.getOwnPropertyNames;var Ye=Object.getPrototypeOf,je=Object.prototype.hasOwnProperty;var et=(t,e)=>{for(var n in e)ee(t,n,{get:e[n],enumerable:!0})},Ce=(t,e,n,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let l of Qe(e))!je.call(t,l)&&l!==n&&ee(t,l,{get:()=>e[l],enumerable:!(s=Ze(e,l))||s.enumerable});return t};var tt=(t,e,n)=>(n=t!=null?qe(Ye(t)):{},Ce(e||!t||!t.__esModule?ee(n,"default",{value:t,enumerable:!0}):n,t)),ot=t=>Ce(ee({},"__esModule",{value:!0}),t);var Xt={};et(Xt,{CHARTWIZARD_CLASSNAME:()=>Ae,ChartWizard:()=>G,default:()=>Jt});module.exports=ot(Xt);var r=(...t)=>t.filter(e=>e!==!0&&!!e).map(e=>Array.isArray(e)?r(...e):typeof e=="object"?Object.keys(e).map((n,s)=>e[s]||e[n]&&n||null).filter(n=>n!==null).join(" "):e).filter(e=>!!e).join(" ");var C=(t,e)=>r({[`${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"}),K=(t,e)=>r({"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"},I={small:"small",medium:"medium",large:"large",full:"full"},h={solid:"solid",flat:"flat",outline:"outline",clear:"clear",link:"link"},o={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"};var Le=require("react/jsx-runtime"),te="k-actions",nt=[],st={},ie={alignment:"start",orientation:"horizontal"},J=t=>{let{alignment:e=ie.alignment,orientation:n=ie.orientation,...s}=t;return(0,Le.jsx)("div",{...s,className:r(te,{[`${te}-${e}`]:e,[`${te}-${n}`]:n},t.className),children:t.children})};J.states=nt;J.options=st;J.className=te;J.defaultOptions=ie;var q=require("react/jsx-runtime"),ae="k-icon k-font-icon",rt=[],it={size:[i.xsmall,i.small,i.medium,i.large,i.xlarge,i.xxlarge,i.xxxlarge],themeColor:[o.base,o.primary,o.secondary,o.tertiary,o.success,o.warning,o.error,o.info,o.light,o.dark]},at={},Z=t=>{let{size:e,themeColor:n,icon:s,rotate:l,flip:m,...a}=t;return s?(0,q.jsx)("span",{...a,className:r(t.className,ae,C(ae,{size:e}),{[`k-i-${s}`]:s,[`k-color-${n}`]:n,[`k-rotate-${l}`]:l,"k-flip-h":m==="h"||m==="both","k-flip-v":m==="v"||m==="both"})}):(0,q.jsx)(q.Fragment,{})};Z.states=rt;Z.options=it;Z.className=ae;Z.defaultOptions=at;var Be=Z;var R=require("react/jsx-runtime"),le="k-icon k-svg-icon",lt=[],mt={size:[i.xsmall,i.small,i.medium,i.large,i.xlarge,i.xxlarge,i.xxxlarge],themeColor:[o.base,o.primary,o.secondary,o.tertiary,o.success,o.warning,o.error,o.info,o.light,o.dark]},ze={viewBox:"0 0 24 24"},Q=t=>{let{size:e,themeColor:n,rotate:s,flip:l,viewBox:m=ze.viewBox,icon:a,...d}=t;if(!a)return(0,R.jsx)(R.Fragment,{});a==="none"&&{...d,className:r(t.className,le,"k-none")};let u=typeof a=="object"&&a.name&&a.name;return(0,R.jsx)("span",{...d,className:r(t.className,le,C("k-icon",{size:e}),{[`k-svg-i-${u}`]:u,[`k-color-${n}`]:n,[`k-rotate-${s}`]:s,"k-flip-h":l==="h"||l==="both","k-flip-v":l==="v"||l==="both"}),children:(0,R.jsx)("svg",{"aria-hidden":!0,focusable:!1,xmlns:"http://www.w3.org/2000/svg",viewBox:typeof a=="object"?a.viewBox:m,dangerouslySetInnerHTML:typeof a=="object"?{__html:a.content}:void 0,children:a?void 0:t.children})})};Q.states=lt;Q.options=mt;Q.className=le;Q.defaultOptions=ze;var me=Q;var Te=tt(require("@progress/kendo-svg-icons")),L=require("react/jsx-runtime"),ct=t=>t.replace(/([-_][a-z0-9])/gi,e=>e.toUpperCase().replace("-","").replace("_","")),ut=[],dt={size:[i.xsmall,i.small,i.medium,i.large,i.xlarge,i.xxlarge,i.xxxlarge],themeColor:[o.base,o.primary,o.secondary,o.tertiary,o.success,o.warning,o.error,o.info,o.light,o.dark]},ce={viewBox:"0 0 24 24",type:"svg"},M=t=>{let{size:e,themeColor:n,icon:s,type:l=ce.type,rotate:m,flip:a,viewBox:d=ce.viewBox,...u}=t;if(!s)return(0,L.jsx)(L.Fragment,{});if(l==="svg"){if(s==="none")return(0,L.jsx)(me,{...u,icon:s,size:e});let b=ct(`${s}-icon`);return Te[b]?(0,L.jsx)(me,{...u,icon:Te[b],size:e,themeColor:n,rotate:m,flip:a,viewBox:d}):(0,L.jsx)(L.Fragment,{})}return(0,L.jsx)(Be,{...u,icon:s,size:e,themeColor:n,rotate:m,flip:a})};M.states=ut;M.options=dt;M.defaultOptions=ce;var g=require("react/jsx-runtime"),oe="k-button",pt=[c.hover,c.focus,c.active,c.selected,c.disabled],ft={size:[i.small,i.medium,i.large],rounded:[I.small,I.medium,I.large,I.full],fillMode:[h.solid,h.flat,h.outline,h.clear,h.link],themeColor:[o.base,o.primary,o.secondary,o.tertiary,o.success,o.warning,o.error,o.info,o.light,o.dark,o.inverse]},H={size:i.medium,rounded:I.medium,fillMode:h.solid,themeColor:o.base,showArrow:!1,arrowIconName:"caret-alt-down"},p=t=>{let{size:e=H.size,rounded:n=H.rounded,fillMode:s=H.fillMode,themeColor:l=H.themeColor,showArrow:m=H.showArrow,arrowIconName:a=H.arrowIconName,hover:d,focus:u,active:b,selected:x,disabled:y,icon:v,text:S,iconClassName:A,...E}=t,O=v!==void 0,P=t.children!==void 0;return(0,g.jsxs)("button",{...E,className:r(t.className,oe,C(oe,{size:e,rounded:n,fillMode:s,themeColor:l}),K(oe,{hover:d,focus:u,active:b,disabled:y,selected:x}),{"k-icon-button":!S&&!P&&O}),children:[v&&(0,g.jsx)(M,{className:r(A,"k-button-icon"),icon:v}),S?(0,g.jsxs)(g.Fragment,{children:[S&&(0,g.jsx)("span",{className:"k-button-text",children:S}),t.children]}):t.children&&(0,g.jsx)("span",{className:"k-button-text",children:t.children}),m&&(0,g.jsx)("span",{className:"k-menu-button-arrow k-button-arrow",children:(0,g.jsx)(M,{icon:a})})]})};p.states=pt;p.options=ft;p.className=oe;p.defaultOptions=H;var xt=require("react/jsx-runtime");var ht=require("react/jsx-runtime");var Mt=require("react/jsx-runtime");var ue=require("react/jsx-runtime"),Oe="k-animation-container",Nt=[],bt={},Pe={positionMode:"absolute"},X=t=>{let{positionMode:e=Pe.positionMode,animationStyle:n,offset:s,...l}=t;return(0,ue.jsx)("div",{...l,style:{...s,...t.style},className:r(t.className,Oe,"k-animation-container-shown",{"k-animation-container-fixed":e==="fixed"}),children:(0,ue.jsx)("div",{className:"k-child-animation-container",style:n,children:t.children})})};X.states=Nt;X.options=bt;X.className=Oe;X.defaultOptions=Pe;var de=require("react/jsx-runtime"),Ee="k-popup",It=[],wt={},Ke={positionMode:"absolute"},$=t=>{let{offset:e,positionMode:n=Ke.positionMode,animationStyle:s,...l}=t;return(0,de.jsx)(X,{positionMode:n,offset:e,animationStyle:s,children:(0,de.jsx)("div",{...l,className:r(t.className,Ee),children:t.children})})};$.states=It;$.options=wt;$.className=Ee;$.defaultOptions=Ke;var W=require("react/jsx-runtime"),Re="k-menu-button",kt=[c.hover,c.focus,c.active,c.selected,c.disabled],vt={size:[i.small,i.medium,i.large],rounded:[I.small,I.medium,I.large,I.full],fillMode:[h.solid,h.flat,h.outline,h.clear,h.link],themeColor:[o.base,o.primary,o.secondary,o.tertiary,o.success,o.warning,o.error,o.info,o.light,o.dark,o.inverse]},_={size:i.medium,rounded:I.medium,fillMode:h.solid,themeColor:o.base,showArrow:!0,arrowIconName:"caret-alt-down"},D=t=>{let{size:e=_.size,rounded:n=_.rounded,fillMode:s=_.fillMode,themeColor:l=_.themeColor,hover:m,focus:a,active:d,selected:u,disabled:b,icon:x,text:y,showArrow:v=_.showArrow,arrowIconName:S=_.arrowIconName,popup:A,opened:E,...O}=t;return(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(p,{...O,className:r(t.className,Re),text:y,size:e,rounded:n,fillMode:s,themeColor:l,hover:m,focus:a,active:d,selected:u,disabled:b,icon:x,showArrow:v,arrowIconName:S}),E&&A&&(0,W.jsx)($,{className:"k-menu-popup",children:A})]})};D.states=kt;D.options=vt;D.className=Re;D.defaultOptions=_;var gt=require("react/jsx-runtime");var yt=require("react/jsx-runtime");var St=require("react/jsx-runtime");var w=require("react/jsx-runtime"),fe="k-menu-item",At=[c.hover,c.focus,c.active,c.selected,c.disabled],Ct={},He={iconPosition:"before"},B=t=>{let{hover:e,focus:n,active:s,selected:l,disabled:m,icon:a,text:d,first:u,last:b,showArrow:x,arrowIconName:y,iconPosition:v=He.iconPosition,dir:S,children:A,...E}=t,O=(0,w.jsx)(w.Fragment,{});A&&A.forEach(F=>{if(F.type==="MenuItemContent"){O.props.children.push(F);return}});let P=y;return P||(P=S==="rtl"?"caret-alt-left":"caret-alt-right"),(0,w.jsxs)("li",{...E,className:r(t.className,fe,"k-item",K(fe,{focus:n,disabled:m,hover:e,active:s,selected:l}),{"k-first":u,"k-last":b}),children:[(0,w.jsxs)("span",{className:r("k-link k-menu-link"),children:[a&&v==="before"&&(0,w.jsx)(M,{className:"k-menu-link-icon",icon:a}),(0,w.jsx)("span",{className:"k-menu-link-text",children:d}),a&&v==="after"&&(0,w.jsx)(M,{className:"k-menu-link-icon",icon:a}),x&&(0,w.jsx)("span",{className:"k-menu-expand-arrow",children:(0,w.jsx)(M,{icon:P})})]}),O]})};B.states=At;B.options=Ct;B.className=fe;B.defaultOptions=He;var k=require("react/jsx-runtime"),xe="k-menu-item",Lt=[c.hover,c.focus,c.active,c.selected,c.disabled],Bt={},he={dir:"ltr",iconPosition:"before"},z=t=>{let{hover:e,focus:n,active:s,selected:l,disabled:m,icon:a,text:d,first:u,last:b,showArrow:x,arrowIconName:y,iconPosition:v=he.iconPosition,dir:S=he.dir,children:A,popup:E,...O}=t,P=(0,k.jsx)(k.Fragment,{});A&&A.forEach(re=>{if(re.type==="MenuListItemContent"){P.props.children.push(re);return}});let F=y;return F||(F=S==="rtl"?"caret-alt-left":"caret-alt-right"),(0,k.jsxs)("li",{...O,className:r(t.className,xe,"k-item",K(xe,{focus:n,disabled:m}),{"k-first":u,"k-last":b}),children:[(0,k.jsxs)("span",{className:r("k-link k-menu-link",K("k-menu-link",{hover:e,active:s,selected:l,disabled:m})),children:[a&&v==="before"&&(0,k.jsx)(M,{className:"k-menu-link-icon",icon:a}),(0,k.jsx)("span",{className:"k-menu-link-text",children:d}),a&&v==="after"&&(0,k.jsx)(M,{className:"k-menu-link-icon",icon:a}),x&&(0,k.jsx)("span",{className:"k-menu-expand-arrow",children:(0,k.jsx)(M,{icon:F})})]}),P,E]})};z.states=Lt;z.options=Bt;z.className=xe;z.defaultOptions=he;var We=require("react/jsx-runtime"),$e="k-menu-scroll-wrapper",zt=[],Tt={},Ot={},Y=t=>{let{className:e,children:n,orientation:s,...l}=t;return(0,We.jsx)("div",{...l,className:r(e,$e,{"k-menu-scroll-wrapper-vertical":s==="vertical"}),children:n})};Y.states=zt;Y.options=Tt;Y.className=$e;Y.defaultOptions=Ot;var _e=Y;var f=require("react/jsx-runtime"),Me="k-menu",Pt=[],Et={},ne={orientation:"horizontal",header:!0,scrollButtonsPosition:"around"},T=t=>{let{children:e,orientation:n=ne.orientation,header:s=ne.header,scrollable:l,scrollButtonsPosition:m=ne.scrollButtonsPosition,wrapperStyles:a,dir:d,popup:u,...b}=t,x={horizontal:{prev:d!=="rtl"?"left":"right",next:d!=="rtl"?"right":"left"},vertical:{prev:"up",next:"down"}},y=(0,f.jsx)("ul",{dir:d,...b,className:r(t.className,"k-reset",Me,{[`${Me}-${n}`]:n,"k-header":s}),children:e});return(0,f.jsxs)(f.Fragment,{children:[l?(0,f.jsxs)(_e,{orientation:n,style:a,dir:t.dir,children:[m==="start"&&(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(p,{fillMode:"flat",rounded:null,size:"medium",icon:`caret-alt-${x[n].prev}`,className:"k-menu-scroll-button k-menu-scroll-button-prev"}),(0,f.jsx)(p,{fillMode:"flat",rounded:null,size:"medium",icon:`caret-alt-${x[n].next}`,className:"k-menu-scroll-button k-menu-scroll-button-next"})]}),m==="around"&&(0,f.jsx)(p,{fillMode:"flat",rounded:null,size:"medium",icon:`caret-alt-${x[n].prev}`,className:"k-menu-scroll-button k-menu-scroll-button-prev"}),y,m==="end"&&(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(p,{fillMode:"flat",rounded:null,size:"medium",icon:`caret-alt-${x[n].prev}`,className:"k-menu-scroll-button k-menu-scroll-button-prev"}),(0,f.jsx)(p,{fillMode:"flat",rounded:null,size:"medium",icon:`caret-alt-${x[n].next}`,className:"k-menu-scroll-button k-menu-scroll-button-next"})]}),m==="around"&&(0,f.jsx)(p,{fillMode:"flat",rounded:null,size:"medium",icon:`caret-alt-${x[n].next}`,className:"k-menu-scroll-button k-menu-scroll-button-next"})]}):y,u]})};T.states=Pt;T.options=Et;T.className=Me;T.defaultOptions=ne;var Fe=require("react/jsx-runtime"),Ne="k-separator",Ue={orientation:"horizontal"},j=t=>{let{orientation:e=Ue.orientation,...n}=t;return(0,Fe.jsx)("li",{...n,className:r(t.className,"k-item",Ne,{[`${Ne}-${e}`]:e})})};j.className=Ne;j.defaultOptions=Ue;var Je=require("react/jsx-runtime");var we=require("react/jsx-runtime"),Xe=require("react"),be="k-menu-group",Kt=[],Rt={size:[i.small,i.medium,i.large]},Ie={size:i.medium,dir:"ltr"},V=t=>{let{children:e,size:n=Ie.size,dir:s=Ie.dir,...l}=t,m=[];return e&&Array.isArray(e)&&e.map((a,d)=>{a.type===z?m.push((0,Xe.createElement)(z,{...a.props,dir:s,key:d})):a.type===j?m.push((0,we.jsx)(j,{})):m.push(a)}),(0,we.jsx)("ul",{...l,className:r(t.className,be,C(be,{size:n})),children:m})};V.states=Kt;V.options=Rt;V.className=be;V.defaultOptions=Ie;var ke=require("react/jsx-runtime");var ve=require("react/jsx-runtime");var ge=require("react/jsx-runtime");var ye=require("react/jsx-runtime");var Se=require("react/jsx-runtime");var De=require("react/jsx-runtime");var N=require("react/jsx-runtime"),se="k-window",Ht=[],$t={themeColor:[o.primary,o.light,o.dark]},_t={},U=t=>{let{title:e,actions:n,minimized:s,themeColor:l,actionButtons:m,actionButtonsAlign:a,...d}=t;return(0,N.jsxs)("div",{...d,className:r(t.className,se,C(se,{themeColor:l}),{[`${se}-minimized`]:s}),children:[(e!==void 0||n)&&(0,N.jsxs)("div",{className:"k-window-titlebar",children:[e!==void 0&&(0,N.jsx)("span",{className:"k-window-title",children:e}),n&&(0,N.jsx)(N.Fragment,{children:(0,N.jsx)("div",{className:"k-window-titlebar-actions",children:n.map(u=>u==="more-vertical"?(0,N.jsx)(D,{icon:u,fillMode:"flat",showArrow:!1,className:"k-window-titlebar-action"},u):(0,N.jsx)(p,{icon:u,fillMode:"flat",className:"k-window-titlebar-action"},u))})})]}),(0,N.jsx)("div",{className:r("k-window-content",{"k-hidden":s}),children:t.children}),m&&(0,N.jsx)(J,{alignment:a,className:"k-window-actions",children:m})]})};U.states=Ht;U.options=$t;U.className=se;U.defaultOptions=_t;var Ve=require("react/jsx-runtime");var Ge=require("react/jsx-runtime"),Ae="k-chart-wizard",Wt=[],Ut={},Ft={},G=t=>{let{children:e,...n}=t;return(0,Ge.jsx)(U,{title:"Chart Preview",actions:["window","x"],...n,className:r(t.className,Ae),children:e})};G.states=Wt;G.options=Ut;G.className=Ae;G.defaultOptions=Ft;var Jt=G;