UNPKG

@progress/kendo-themes-html

Version:

A collection of HTML helpers used for developing Kendo UI themes

2 lines (1 loc) 8.34 kB
var ue=Object.create;var O=Object.defineProperty;var pe=Object.getOwnPropertyDescriptor;var fe=Object.getOwnPropertyNames;var he=Object.getPrototypeOf,xe=Object.prototype.hasOwnProperty;var Ce=(t,e)=>{for(var r in e)O(t,r,{get:e[r],enumerable:!0})},Y=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of fe(e))!xe.call(t,i)&&i!==r&&O(t,i,{get:()=>e[i],enumerable:!(n=pe(e,i))||n.enumerable});return t};var be=(t,e,r)=>(r=t!=null?ue(he(t)):{},Y(e||!t||!t.__esModule?O(r,"default",{value:t,enumerable:!0}):r,t)),ge=t=>Y(O({},"__esModule",{value:!0}),t);var Ye={};Ce(Ye,{TASKBOARDCARD_CLASSNAME:()=>R,TaskBoardCard:()=>M,default:()=>Xe});module.exports=ge(Ye);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 x=(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"}),N=(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,"k-highlighted":e.highlighted});var a={xsmall:"xsmall",small:"small",medium:"medium",large:"large",xlarge:"xlarge",xxlarge:"xxlarge",xxxlarge:"xxxlarge"},k={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",highlighted:"highlighted"},Q={calloutMap:{top:"n",bottom:"s",left:"w",right:"e"},orientationMap:{vertical:"vstack",horizontal:"hstack"}};var Z=require("react/jsx-runtime"),ve="k-card-callout",W=t=>{let{callout:e,...r}=t;return(0,Z.jsx)("span",{...r,className:s(t.className,ve,{[`k-callout-${Q.calloutMap[e]||e}`]:e})})};var g=require("react/jsx-runtime"),H="k-card",ye=[d.hover,d.focus,d.selected,d.disabled],Ne={themeColor:[o.primary,o.success,o.warning,o.error,o.info]},ke={},C=t=>{let{orientation:e,themeColor:r,callout:n,hover:i,focus:c,selected:l,disabled:h,...p}=t;return(0,g.jsxs)("div",{...p,className:s(t.className,H,x(H,{themeColor:r}),N(H,{hover:i,focus:c,disabled:h,selected:l}),{[`k-card-${e}`]:e,"k-card-with-callout":n}),children:[n&&n!=="true"&&(0,g.jsx)(W,{callout:n}),(0,g.jsx)(g.Fragment,{children:t.children})]})};C.states=ye;C.options=Ne;C.className=H;C.defaultOptions=ke;var j=require("react/jsx-runtime"),D="k-card-title",Ae=[d.hover,d.focus],E=t=>{let{hover:e,focus:r,...n}=t;return(0,j.jsx)("div",{...n,className:s(t.className,D,N(D,{hover:e,focus:r})),children:t.children})};E.states=Ae;E.className=D;var Se=require("react/jsx-runtime");var ee=require("react/jsx-runtime");var T=require("react/jsx-runtime"),P="k-icon k-font-icon",Me=[],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:i,flip:c,...l}=t;return n?(0,T.jsx)("span",{...l,className:s(t.className,P,x(P,{size:e}),{[`k-i-${n}`]:n,[`k-color-${r}`]:r,[`k-rotate-${i}`]:i,"k-flip-h":c==="h"||c==="both","k-flip-v":c==="v"||c==="both"})}):(0,T.jsx)(T.Fragment,{})};B.states=Me;B.options=Te;B.className=P;B.defaultOptions=Be;var te=B;var v=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:i,viewBox:c=oe.viewBox,icon:l,...h}=t;if(!l)return(0,v.jsx)(v.Fragment,{});l==="none"&&{...h,className:s(t.className,_,"k-none")};let p=typeof l=="object"&&l.name&&l.name;return(0,v.jsx)("span",{...h,className:s(t.className,_,x("k-icon",{size:e}),{[`k-svg-i-${p}`]:p,[`k-color-${r}`]:r,[`k-rotate-${n}`]:n,"k-flip-h":i==="h"||i==="both","k-flip-v":i==="v"||i==="both"}),children:(0,v.jsx)("svg",{"aria-hidden":!0,focusable:!1,xmlns:"http://www.w3.org/2000/svg",viewBox:typeof l=="object"?l.viewBox:c,dangerouslySetInnerHTML:typeof l=="object"?{__html:l.content}:void 0,children:l?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("_","")),Oe=[],He={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:i=G.type,rotate:c,flip:l,viewBox:h=G.viewBox,...p}=t;if(!n)return(0,f.jsx)(f.Fragment,{});if(i==="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:l,viewBox:h}):(0,f.jsx)(f.Fragment,{})}return(0,f.jsx)(te,{...p,icon:n,size:e,themeColor:r,rotate:c,flip:l})};A.states=Oe;A.options=He;A.defaultOptions=G;var m=require("react/jsx-runtime"),K="k-button",Ee=[d.hover,d.focus,d.active,d.selected,d.disabled],Ke={size:[a.small,a.medium,a.large],rounded:[k.small,k.medium,k.large,k.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]},y={size:a.medium,rounded:k.medium,fillMode:b.solid,themeColor:o.base,showArrow:!1,arrowIconName:"caret-alt-down"},u=t=>{let{size:e=y.size,rounded:r=y.rounded,fillMode:n=y.fillMode,themeColor:i=y.themeColor,showArrow:c=y.showArrow,arrowIconName:l=y.arrowIconName,hover:h,focus:p,active:z,selected:se,disabled:ie,icon:$,text:w,iconClassName:le,...de}=t,ce=$!==void 0,me=t.children!==void 0;return(0,m.jsxs)("button",{...de,className:s(t.className,K,x(K,{size:e,rounded:r,fillMode:n,themeColor:i}),N(K,{hover:h,focus:p,active:z,disabled:ie,selected:se}),{"k-icon-button":!w&&!me&&ce}),children:[$&&(0,m.jsx)(A,{className:s(le,"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:l})})]})};u.states=Ee;u.options=Ke;u.className=K;u.defaultOptions=y;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"},S=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})};S.states=Fe;S.options=Ge;S.className=I;S.defaultOptions=q;var J=require("react/jsx-runtime");var X=require("react/jsx-runtime");var ae=require("react/jsx-runtime"),R="k-taskboard-card",Ue=[],qe={},Je={},M=t=>{let{children:e,category:r,...n}=t;return(0,ae.jsx)(C,{...n,className:s(t.className,R,{[`${R}-category`]:r}),children:e})};M.states=Ue;M.options=qe;M.className=R;M.defaultOptions=Je;var Xe=M;