@progress/kendo-themes-html
Version:
A collection of HTML helpers used for developing Kendo UI themes
2 lines (1 loc) • 8.28 kB
JavaScript
var ue=Object.create;var H=Object.defineProperty;var pe=Object.getOwnPropertyDescriptor;var fe=Object.getOwnPropertyNames;var xe=Object.getPrototypeOf,he=Object.prototype.hasOwnProperty;var Ce=(t,e)=>{for(var r in e)H(t,r,{get:e[r],enumerable:!0})},Q=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let l of fe(e))!he.call(t,l)&&l!==r&&H(t,l,{get:()=>e[l],enumerable:!(n=pe(e,l))||n.enumerable});return t};var be=(t,e,r)=>(r=t!=null?ue(xe(t)):{},Q(e||!t||!t.__esModule?H(r,"default",{value:t,enumerable:!0}):r,t)),ve=t=>Q(H({},"__esModule",{value:!0}),t);var Qe={};Ce(Qe,{TASKBOARDCARD_CLASSNAME:()=>R,TaskBoardCard:()=>S,default:()=>Je});module.exports=ve(Qe);var s=(...t)=>t.filter(e=>e!==!0&&!!e).map(e=>Array.isArray(e)?s(...e):typeof e=="object"?Object.keys(e).map((r,n)=>e[n]||e[r]&&r||null).filter(r=>r!==null).join(" "):e).filter(e=>!!e).join(" ");var h=(t,e)=>s({[`${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)=>s({"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 a={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"},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"},d={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"},W={calloutMap:{top:"n",bottom:"s",left:"w",right:"e"},orientationMap:{vertical:"vstack",horizontal:"hstack"}};var Z=require("react/jsx-runtime"),ye="k-card-callout",X=t=>{let{callout:e,...r}=t;return(0,Z.jsx)("span",{...r,className:s(t.className,ye,{[`k-callout-${W.calloutMap[e]||e}`]:e})})};var v=require("react/jsx-runtime"),O="k-card",Ne=[d.hover,d.focus,d.selected,d.disabled],ke={themeColor:[o.primary,o.success,o.warning,o.error,o.info]},ge={},C=t=>{let{orientation:e,themeColor:r,callout:n,hover:l,focus:c,selected:i,disabled:x,...p}=t;return(0,v.jsxs)("div",{...p,className:s(t.className,O,h(O,{themeColor:r}),k(O,{hover:l,focus:c,disabled:x,selected:i}),{[`k-card-${e}`]:e,"k-card-with-callout":n}),children:[n&&n!=="true"&&(0,v.jsx)(X,{callout:n}),(0,v.jsx)(v.Fragment,{children:t.children})]})};C.states=Ne;C.options=ke;C.className=O;C.defaultOptions=ge;var j=require("react/jsx-runtime"),D="k-card-title",Ae=[d.hover,d.focus],K=t=>{let{hover:e,focus:r,...n}=t;return(0,j.jsx)("div",{...n,className:s(t.className,D,k(D,{hover:e,focus:r})),children:t.children})};K.states=Ae;K.className=D;var Me=require("react/jsx-runtime");var ee=require("react/jsx-runtime");var T=require("react/jsx-runtime"),P="k-icon k-font-icon",Se=[],Te={size:[a.xsmall,a.small,a.medium,a.large,a.xlarge,a.xxlarge,a.xxxlarge],themeColor:[o.base,o.primary,o.secondary,o.tertiary,o.success,o.warning,o.error,o.info,o.light,o.dark]},Be={},B=t=>{let{size:e,themeColor:r,icon:n,rotate:l,flip:c,...i}=t;return n?(0,T.jsx)("span",{...i,className:s(t.className,P,h(P,{size:e}),{[`k-i-${n}`]:n,[`k-color-${r}`]:r,[`k-rotate-${l}`]:l,"k-flip-h":c==="h"||c==="both","k-flip-v":c==="v"||c==="both"})}):(0,T.jsx)(T.Fragment,{})};B.states=Se;B.options=Te;B.className=P;B.defaultOptions=Be;var te=B;var y=require("react/jsx-runtime"),_="k-icon k-svg-icon",Le=[],ze={size:[a.xsmall,a.small,a.medium,a.large,a.xlarge,a.xxlarge,a.xxxlarge],themeColor:[o.base,o.primary,o.secondary,o.tertiary,o.success,o.warning,o.error,o.info,o.light,o.dark]},oe={viewBox:"0 0 24 24"},L=t=>{let{size:e,themeColor:r,rotate:n,flip:l,viewBox:c=oe.viewBox,icon:i,...x}=t;if(!i)return(0,y.jsx)(y.Fragment,{});i==="none"&&{...x,className:s(t.className,_,"k-none")};let p=typeof i=="object"&&i.name&&i.name;return(0,y.jsx)("span",{...x,className:s(t.className,_,h("k-icon",{size:e}),{[`k-svg-i-${p}`]:p,[`k-color-${r}`]:r,[`k-rotate-${n}`]:n,"k-flip-h":l==="h"||l==="both","k-flip-v":l==="v"||l==="both"}),children:(0,y.jsx)("svg",{"aria-hidden":!0,focusable:!1,xmlns:"http://www.w3.org/2000/svg",viewBox:typeof i=="object"?i.viewBox:c,dangerouslySetInnerHTML:typeof i=="object"?{__html:i.content}:void 0,children:i?void 0:t.children})})};L.states=Le;L.options=ze;L.className=_;L.defaultOptions=oe;var F=L;var re=be(require("@progress/kendo-svg-icons")),f=require("react/jsx-runtime"),we=t=>t.replace(/([-_][a-z0-9])/gi,e=>e.toUpperCase().replace("-","").replace("_","")),He=[],Oe={size:[a.xsmall,a.small,a.medium,a.large,a.xlarge,a.xxlarge,a.xxxlarge],themeColor:[o.base,o.primary,o.secondary,o.tertiary,o.success,o.warning,o.error,o.info,o.light,o.dark]},G={viewBox:"0 0 24 24",type:"svg"},A=t=>{let{size:e,themeColor:r,icon:n,type:l=G.type,rotate:c,flip:i,viewBox:x=G.viewBox,...p}=t;if(!n)return(0,f.jsx)(f.Fragment,{});if(l==="svg"){if(n==="none")return(0,f.jsx)(F,{...p,icon:n,size:e});let z=we(`${n}-icon`);return re[z]?(0,f.jsx)(F,{...p,icon:re[z],size:e,themeColor:r,rotate:c,flip:i,viewBox:x}):(0,f.jsx)(f.Fragment,{})}return(0,f.jsx)(te,{...p,icon:n,size:e,themeColor:r,rotate:c,flip:i})};A.states=He;A.options=Oe;A.defaultOptions=G;var m=require("react/jsx-runtime"),E="k-button",Ke=[d.hover,d.focus,d.active,d.selected,d.disabled],Ee={size:[a.small,a.medium,a.large],rounded:[g.small,g.medium,g.large,g.full],fillMode:[b.solid,b.flat,b.outline,b.clear,b.link],themeColor:[o.base,o.primary,o.secondary,o.tertiary,o.success,o.warning,o.error,o.info,o.light,o.dark,o.inverse]},N={size:a.medium,rounded:g.medium,fillMode:b.solid,themeColor:o.base,showArrow:!1,arrowIconName:"caret-alt-down"},u=t=>{let{size:e=N.size,rounded:r=N.rounded,fillMode:n=N.fillMode,themeColor:l=N.themeColor,showArrow:c=N.showArrow,arrowIconName:i=N.arrowIconName,hover:x,focus:p,active:z,selected:se,disabled:le,icon:$,text:w,iconClassName:ie,...de}=t,ce=$!==void 0,me=t.children!==void 0;return(0,m.jsxs)("button",{...de,className:s(t.className,E,h(E,{size:e,rounded:r,fillMode:n,themeColor:l}),k(E,{hover:x,focus:p,active:z,disabled:le,selected:se}),{"k-icon-button":!w&&!me&&ce}),children:[$&&(0,m.jsx)(A,{className:s(ie,"k-button-icon"),icon:$}),w?(0,m.jsxs)(m.Fragment,{children:[w&&(0,m.jsx)("span",{className:"k-button-text",children:w}),t.children]}):t.children&&(0,m.jsx)("span",{className:"k-button-text",children:t.children}),c&&(0,m.jsx)("span",{className:"k-menu-button-arrow k-button-arrow",children:(0,m.jsx)(A,{icon:i})})]})};u.states=Ke;u.options=Ee;u.className=E;u.defaultOptions=N;var Ie=require("react/jsx-runtime");var Re=require("react/jsx-runtime");var $e=require("react/jsx-runtime");var V=require("react/jsx-runtime");var Pe=require("react/jsx-runtime");var U=require("react/jsx-runtime");var _e=require("react/jsx-runtime");var ne=require("react/jsx-runtime"),I="k-actions",Fe=[],Ge={},q={alignment:"start",orientation:"horizontal"},M=t=>{let{alignment:e=q.alignment,orientation:r=q.orientation,...n}=t;return(0,ne.jsx)("div",{...n,className:s(I,{[`${I}-${e}`]:e,[`${I}-${r}`]:r},t.className),children:t.children})};M.states=Fe;M.options=Ge;M.className=I;M.defaultOptions=q;var Y=require("react/jsx-runtime");var J=require("react/jsx-runtime");var ae=require("react/jsx-runtime"),R="k-taskboard-card",Ue=[],qe={},Ye={},S=t=>{let{children:e,category:r,...n}=t;return(0,ae.jsx)(C,{...n,className:s(t.className,R,{[`${R}-category`]:r}),children:e})};S.states=Ue;S.options=qe;S.className=R;S.defaultOptions=Ye;var Je=S;