@progress/kendo-themes-html
Version:
A collection of HTML helpers used for developing Kendo UI themes
2 lines (1 loc) • 8.22 kB
JavaScript
var ue=Object.create;var H=Object.defineProperty;var fe=Object.getOwnPropertyDescriptor;var pe=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})},W=(t,e,r,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let l of pe(e))!he.call(t,l)&&l!==r&&H(t,l,{get:()=>e[l],enumerable:!(a=fe(e,l))||a.enumerable});return t};var be=(t,e,r)=>(r=t!=null?ue(xe(t)):{},W(e||!t||!t.__esModule?H(r,"default",{value:t,enumerable:!0}):r,t)),ve=t=>W(H({},"__esModule",{value:!0}),t);var Je={};Ce(Je,{TIMELINECARDCALLOUT_CLASSNAME:()=>Q,TimelineCardCallout:()=>L,default:()=>Ye});module.exports=ve(Je);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 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"}),y=(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 n={xsmall:"xsmall",small:"small",medium:"medium",large:"large",xlarge:"xlarge",xxlarge:"xxlarge",xxxlarge:"xxxlarge"},k={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"},X={calloutMap:{top:"n",bottom:"s",left:"w",right:"e"},orientationMap:{vertical:"vstack",horizontal:"hstack"}};var Z=require("react/jsx-runtime"),Ne="k-card-callout",E=t=>{let{callout:e,...r}=t;return(0,Z.jsx)("span",{...r,className:s(t.className,Ne,{[`k-callout-${X.calloutMap[e]||e}`]:e})})};var b=require("react/jsx-runtime"),I="k-card",ye=[c.hover,c.focus,c.selected,c.disabled],ke={themeColor:[o.primary,o.success,o.warning,o.error,o.info]},ge={},g=t=>{let{orientation:e,themeColor:r,callout:a,hover:l,focus:d,selected:i,disabled:x,...f}=t;return(0,b.jsxs)("div",{...f,className:s(t.className,I,h(I,{themeColor:r}),y(I,{hover:l,focus:d,disabled:x,selected:i}),{[`k-card-${e}`]:e,"k-card-with-callout":a}),children:[a&&a!=="true"&&(0,b.jsx)(E,{callout:a}),(0,b.jsx)(b.Fragment,{children:t.children})]})};g.states=ye;g.options=ke;g.className=I;g.defaultOptions=ge;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,y(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,h(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,...x}=t;if(!i)return(0,v.jsx)(v.Fragment,{});i==="none"&&{...x,className:s(t.className,_,"k-none")};let f=typeof i=="object"&&i.name&&i.name;return(0,v.jsx)("span",{...x,className:s(t.className,_,h("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("_","")),He=[],Ee={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:x=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:x}):(0,p.jsx)(p.Fragment,{})}return(0,p.jsx)(te,{...f,icon:a,size:e,themeColor:r,rotate:d,flip:i})};A.states=He;A.options=Ee;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:[k.small,k.medium,k.large,k.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:k.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:x,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,h(K,{size:e,rounded:r,fillMode:a,themeColor:l}),y(K,{hover:x,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 Y=require("react/jsx-runtime");var J=require("react/jsx-runtime");var ae=require("react/jsx-runtime"),Q="k-timeline-card-callout",Ve=[],qe={},L=t=>{let{...e}=t;return(0,ae.jsx)(E,{className:s(t.className,Q),...e})};L.states=Ve;L.className=Q;L.defaultOptions=qe;var Ye=L;