UNPKG

@progress/kendo-themes-html

Version:

A collection of HTML helpers used for developing Kendo UI themes

2 lines (1 loc) 7.04 kB
var J=Object.create;var M=Object.defineProperty;var X=Object.getOwnPropertyDescriptor;var Q=Object.getOwnPropertyNames;var Y=Object.getPrototypeOf,j=Object.prototype.hasOwnProperty;var ee=(t,e)=>{for(var s in e)M(t,s,{get:e[s],enumerable:!0})},H=(t,e,s,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Q(e))!j.call(t,i)&&i!==s&&M(t,i,{get:()=>e[i],enumerable:!(r=X(e,i))||r.enumerable});return t};var te=(t,e,s)=>(s=t!=null?J(Y(t)):{},H(e||!t||!t.__esModule?M(s,"default",{value:t,enumerable:!0}):s,t)),oe=t=>H(M({},"__esModule",{value:!0}),t);var be={};ee(be,{WIZZARDSTEP_CLASSNAME:()=>$,WizardStep:()=>w,default:()=>ve});module.exports=oe(be);var a=(...t)=>t.filter(e=>e!==!0&&!!e).map(e=>Array.isArray(e)?a(...e):typeof e=="object"?Object.keys(e).map((s,r)=>e[r]||e[s]&&s||null).filter(s=>s!==null).join(" "):e).filter(e=>!!e).join(" ");var b=(t,e)=>a({[`${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"}),O=(t,e)=>a({"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"},k={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"},x={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 S=require("react/jsx-runtime"),L="k-icon k-font-icon",ne=[],se={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]},re={},N=t=>{let{size:e,themeColor:s,icon:r,rotate:i,flip:d,...l}=t;return r?(0,S.jsx)("span",{...l,className:a(t.className,L,b(L,{size:e}),{[`k-i-${r}`]:r,[`k-color-${s}`]:s,[`k-rotate-${i}`]:i,"k-flip-h":d==="h"||d==="both","k-flip-v":d==="v"||d==="both"})}):(0,S.jsx)(S.Fragment,{})};N.states=ne;N.options=se;N.className=L;N.defaultOptions=re;var F=N;var g=require("react/jsx-runtime"),K="k-icon k-svg-icon",ie=[],le={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]},R={viewBox:"0 0 24 24"},C=t=>{let{size:e,themeColor:s,rotate:r,flip:i,viewBox:d=R.viewBox,icon:l,...v}=t;if(!l)return(0,g.jsx)(g.Fragment,{});l==="none"&&{...v,className:a(t.className,K,"k-none")};let p=typeof l=="object"&&l.name&&l.name;return(0,g.jsx)("span",{...v,className:a(t.className,K,b("k-icon",{size:e}),{[`k-svg-i-${p}`]:p,[`k-color-${s}`]:s,[`k-rotate-${r}`]:r,"k-flip-h":i==="h"||i==="both","k-flip-v":i==="v"||i==="both"}),children:(0,g.jsx)("svg",{"aria-hidden":!0,focusable:!1,xmlns:"http://www.w3.org/2000/svg",viewBox:typeof l=="object"?l.viewBox:d,dangerouslySetInnerHTML:typeof l=="object"?{__html:l.content}:void 0,children:l?void 0:t.children})})};C.states=ie;C.options=le;C.className=K;C.defaultOptions=R;var P=C;var _=te(require("@progress/kendo-svg-icons")),f=require("react/jsx-runtime"),ae=t=>t.replace(/([-_][a-z0-9])/gi,e=>e.toUpperCase().replace("-","").replace("_","")),ce=[],de={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]},E={viewBox:"0 0 24 24",type:"svg"},z=t=>{let{size:e,themeColor:s,icon:r,type:i=E.type,rotate:d,flip:l,viewBox:v=E.viewBox,...p}=t;if(!r)return(0,f.jsx)(f.Fragment,{});if(i==="svg"){if(r==="none")return(0,f.jsx)(P,{...p,icon:r,size:e});let B=ae(`${r}-icon`);return _[B]?(0,f.jsx)(P,{...p,icon:_[B],size:e,themeColor:s,rotate:d,flip:l,viewBox:v}):(0,f.jsx)(f.Fragment,{})}return(0,f.jsx)(F,{...p,icon:r,size:e,themeColor:s,rotate:d,flip:l})};z.states=ce;z.options=de;z.defaultOptions=E;var m=require("react/jsx-runtime"),T="k-button",me=[x.hover,x.focus,x.active,x.selected,x.disabled],ue={size:[n.small,n.medium,n.large],rounded:[k.small,k.medium,k.large,k.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]},y={size:n.medium,rounded:k.medium,fillMode:h.solid,themeColor:o.base,showArrow:!1,arrowIconName:"caret-alt-down"},u=t=>{let{size:e=y.size,rounded:s=y.rounded,fillMode:r=y.fillMode,themeColor:i=y.themeColor,showArrow:d=y.showArrow,arrowIconName:l=y.arrowIconName,hover:v,focus:p,active:B,selected:V,disabled:W,icon:A,text:I,iconClassName:q,...D}=t,U=A!==void 0,Z=t.children!==void 0;return(0,m.jsxs)("button",{...D,className:a(t.className,T,b(T,{size:e,rounded:s,fillMode:r,themeColor:i}),O(T,{hover:v,focus:p,active:B,disabled:W,selected:V}),{"k-icon-button":!I&&!Z&&U}),children:[A&&(0,m.jsx)(z,{className:a(q,"k-button-icon"),icon:A}),I?(0,m.jsxs)(m.Fragment,{children:[I&&(0,m.jsx)("span",{className:"k-button-text",children:I}),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)(z,{icon:l})})]})};u.states=me;u.options=ue;u.className=T;u.defaultOptions=y;var fe=require("react/jsx-runtime");var pe=require("react/jsx-runtime");var xe=require("react/jsx-runtime");var c=require("react/jsx-runtime"),$="k-wizard-step",he=[x.focus],ge={},ye=(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("span",{className:"k-wizard-buttons-left",children:(0,c.jsx)("span",{className:"k-wizard-pager",children:"Step 2 of 3"})}),(0,c.jsxs)("span",{className:"k-wizard-buttons-right",children:[(0,c.jsx)(u,{children:"Previous"}),(0,c.jsx)(u,{themeColor:"primary",children:"Next"})]})]}),G={buttons:ye},w=t=>{let{focus:e,buttons:s=G.buttons,...r}=t;return(0,c.jsxs)("div",{...r,className:a(t.className,$,O($,{focus:e})),children:[(0,c.jsx)("div",{className:"k-wizard-content",children:t.children}),s&&(0,c.jsx)("div",{className:"k-wizard-buttons",children:s})]})};w.states=he;w.options=ge;w.className=$;w.defaultOptions=G;var ve=w;