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