UNPKG

@progress/kendo-themes-html

Version:

A collection of HTML helpers used for developing Kendo UI themes

2 lines (1 loc) 9.16 kB
var ce=Object.create;var O=Object.defineProperty;var pe=Object.getOwnPropertyDescriptor;var me=Object.getOwnPropertyNames;var de=Object.getPrototypeOf,ue=Object.prototype.hasOwnProperty;var fe=(t,e)=>{for(var o in e)O(t,o,{get:e[o],enumerable:!0})},X=(t,e,o,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of me(e))!ue.call(t,i)&&i!==o&&O(t,i,{get:()=>e[i],enumerable:!(r=pe(e,i))||r.enumerable});return t};var he=(t,e,o)=>(o=t!=null?ce(de(t)):{},X(e||!t||!t.__esModule?O(o,"default",{value:t,enumerable:!0}):o,t)),xe=t=>X(O({},"__esModule",{value:!0}),t);var _e={};fe(_e,{StepperVertical:()=>Ke});module.exports=xe(_e);var l=(...t)=>t.filter(e=>e!==!0&&!!e).map(e=>Array.isArray(e)?l(...e):typeof e=="object"?Object.keys(e).map((o,r)=>e[r]||e[o]&&o||null).filter(o=>o!==null).join(" "):e).filter(e=>!!e).join(" ");var A=(t,e)=>l({[`${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"}),P=(t,e)=>l({"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"};var s={inherit:"inherit",base:"base",primary:"primary",secondary:"secondary",tertiary:"tertiary",info:"info",success:"success",warning:"warning",error:"error",dark:"dark",light:"light",inverse:"inverse"},u={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 Y=require("react/jsx-runtime"),Q="k-stepper",ge=[],ke={},ve={},S=t=>{let{style:e,...o}=t;return(0,Y.jsx)("nav",{...o,style:e,className:l(t.className,Q),children:t.children})};S.options=ke;S.states=ge;S.className=Q;S.defaultOptions=ve;var j=require("react/jsx-runtime"),_="k-step-list",ye=[],Se={},Z={orientation:"horizontal"},b=t=>{let{style:e,orientation:o=Z.orientation,...r}=t;return(0,j.jsx)("ol",{...r,style:e,className:l(t.className,_,{[`${_}-${o}`]:o}),children:t.children})};b.options=Se;b.states=ye;b.className=_;b.defaultOptions=Z;var z=require("react/jsx-runtime"),G="k-icon k-font-icon",be=[],Ne={size:[n.xsmall,n.small,n.medium,n.large,n.xlarge,n.xxlarge,n.xxxlarge],themeColor:[s.base,s.primary,s.secondary,s.tertiary,s.success,s.warning,s.error,s.info,s.light,s.dark]},Ce={},L=t=>{let{size:e,themeColor:o,icon:r,rotate:i,flip:c,...a}=t;return r?(0,z.jsx)("span",{...a,className:l(t.className,G,A(G,{size:e}),{[`k-i-${r}`]:r,[`k-color-${o}`]:o,[`k-rotate-${i}`]:i,"k-flip-h":c==="h"||c==="both","k-flip-v":c==="v"||c==="both"})}):(0,z.jsx)(z.Fragment,{})};L.states=be;L.options=Ne;L.className=G;L.defaultOptions=Ce;var ee=L;var N=require("react/jsx-runtime"),F="k-icon k-svg-icon",Pe=[],$e={size:[n.xsmall,n.small,n.medium,n.large,n.xlarge,n.xxlarge,n.xxxlarge],themeColor:[s.base,s.primary,s.secondary,s.tertiary,s.success,s.warning,s.error,s.info,s.light,s.dark]},te={viewBox:"0 0 24 24"},B=t=>{let{size:e,themeColor:o,rotate:r,flip:i,viewBox:c=te.viewBox,icon:a,...m}=t;if(!a)return(0,N.jsx)(N.Fragment,{});a==="none"&&{...m,className:l(t.className,F,"k-none")};let d=typeof a=="object"&&a.name&&a.name;return(0,N.jsx)("span",{...m,className:l(t.className,F,A("k-icon",{size:e}),{[`k-svg-i-${d}`]:d,[`k-color-${o}`]:o,[`k-rotate-${r}`]:r,"k-flip-h":i==="h"||i==="both","k-flip-v":i==="v"||i==="both"}),children:(0,N.jsx)("svg",{"aria-hidden":!0,focusable:!1,xmlns:"http://www.w3.org/2000/svg",viewBox:typeof a=="object"?a.viewBox:c,dangerouslySetInnerHTML:typeof a=="object"?{__html:a.content}:void 0,children:a?void 0:t.children})})};B.states=Pe;B.options=$e;B.className=F;B.defaultOptions=te;var V=B;var oe=he(require("@progress/kendo-svg-icons")),k=require("react/jsx-runtime"),ze=t=>t.replace(/([-_][a-z0-9])/gi,e=>e.toUpperCase().replace("-","").replace("_","")),Le=[],Be={size:[n.xsmall,n.small,n.medium,n.large,n.xlarge,n.xxlarge,n.xxxlarge],themeColor:[s.base,s.primary,s.secondary,s.tertiary,s.success,s.warning,s.error,s.info,s.light,s.dark]},W={viewBox:"0 0 24 24",type:"svg"},$=t=>{let{size:e,themeColor:o,icon:r,type:i=W.type,rotate:c,flip:a,viewBox:m=W.viewBox,...d}=t;if(!r)return(0,k.jsx)(k.Fragment,{});if(i==="svg"){if(r==="none")return(0,k.jsx)(V,{...d,icon:r,size:e});let h=ze(`${r}-icon`);return oe[h]?(0,k.jsx)(V,{...d,icon:oe[h],size:e,themeColor:o,rotate:c,flip:a,viewBox:m}):(0,k.jsx)(k.Fragment,{})}return(0,k.jsx)(ee,{...d,icon:r,size:e,themeColor:o,rotate:c,flip:a})};$.states=Le;$.options=Be;$.defaultOptions=W;var p=require("react/jsx-runtime"),g="k-step",Me=[u.disabled,u.hover,u.focus,u.invalid,u.valid],Oe={},Ae={},v=t=>{let{style:e,disabled:o,hover:r,focus:i,invalid:c,valid:a,optional:m,first:d,done:h,current:E,last:R,label:H,text:U,icon:K,stepContent:J,...ne}=t,ie=c?"warning-circle":"check-circle",le=!!(a||c);return(0,p.jsxs)("li",{...ne,style:e,className:l(t.className,g,{[`${g}-done`]:h,[`${g}-first`]:d,[`${g}-current`]:E,[`${g}-last`]:R,[`${g}-optional`]:m,[`${g}-success`]:a,[`${g}-error`]:c},P(g,{hover:r,focus:i,disabled:o})),children:[(0,p.jsxs)("a",{href:"#",className:"k-step-link",children:[U&&!K&&(0,p.jsx)("span",{className:"k-step-indicator",children:(0,p.jsx)("span",{className:"k-step-indicator-text",children:U})}),K&&(0,p.jsx)("span",{className:"k-step-indicator",children:(0,p.jsx)($,{className:"k-step-indicator-icon",icon:K})}),m&&!H&&(0,p.jsx)("span",{className:"k-step-label",children:(0,p.jsx)("span",{className:"k-step-label-optional",children:"(Optional)"})}),H&&(0,p.jsxs)("span",{className:"k-step-label",children:[(0,p.jsx)("span",{className:"k-step-text",children:H}),le&&(0,p.jsx)($,{icon:ie}),m&&(0,p.jsx)("span",{className:"k-step-label-optional",children:"(Optional)"})]})]}),J&&(0,p.jsx)("div",{className:"k-step-content",style:{height:"140px"},children:J})]})};v.options=Oe;v.states=Me;v.className=g;v.defaultOptions=Ae;var y=require("react/jsx-runtime"),f="k-progressbar",we=[u.disabled,u.indeterminate],Ie={},C={indeterminate:!1,label:!0,labelPosition:"start",orientation:"horizontal",reverse:!1,value:"0"},M=t=>{let{disabled:e,height:o,indeterminate:r=C.indeterminate,label:i=C.label,labelPosition:c=C.labelPosition,orientation:a=C.orientation,reverse:m=C.reverse,value:d=C.value,width:h,style:E,...R}=t;return(0,y.jsxs)("div",{...R,className:l(t.className,f,P(f,{disabled:e}),{[`${f}-${a}`]:a,[`${f}-indeterminate`]:r,[`${f}-reverse`]:m}),style:{...E,"--kendo-progressbar-value":d,[a==="horizontal"?"height":"width"]:a==="horizontal"?o:h},children:[(0,y.jsx)("span",{className:l("k-progress-status-wrap",{[`k-progress-${c}`]:c&&!r}),children:i&&(0,y.jsxs)("span",{className:"k-progress-status",children:[d,"%"]})}),!r&&(0,y.jsx)("div",{className:"k-progressbar-value k-selected",children:(0,y.jsx)("span",{className:l("k-progress-status-wrap",{[`k-progress-${c}`]:c}),children:i&&(0,y.jsxs)("span",{className:"k-progress-status",children:[t.value,"%"]})})})]})};M.states=we;M.options=Ie;M.className=f;M.defaultOptions=C;var se=M;var I=require("react/jsx-runtime"),re="k-chunk-progressbar",Te=(t,e)=>e<=t-1,Ee=[u.disabled,u.indeterminate],Re={},w={chunkCount:5,orientation:"horizontal",progress:0},T=t=>{let{disabled:e,chunkCount:o=w.chunkCount,indeterminate:r,orientation:i=w.orientation,progress:c=w.progress,reverse:a,...m}=t;return(0,I.jsx)("div",{...m,className:l(t.className,f,re,P(f,{disabled:e}),{[`${f}-${i}`]:i,[`${f}-indeterminate`]:r,[`${f}-reverse`]:a}),children:(0,I.jsx)("ul",{className:"k-progressbar-chunks k-reset",children:[...Array(o)].map((d,h)=>(0,I.jsx)("li",{className:l("k-progressbar-chunk",{"k-first":h===0,"k-last":h===[...Array(o)].length-1,"k-selected":Te(c,h)})},h))})})};T.states=Ee;T.options=Re;T.className=re;T.defaultOptions=w;var ae=require("react/jsx-runtime"),q=t=>(0,ae.jsx)(se,{...t});var He=require("react/jsx-runtime");var D=require("react/jsx-runtime");var x=require("react/jsx-runtime"),Ke=({gridTemplateRows:t="repeat(3, 1fr)",...e})=>(0,x.jsx)(S,{style:{display:"grid",gridTemplateRows:t},children:(0,x.jsxs)(x.Fragment,{children:[(0,x.jsxs)(b,{orientation:"vertical",style:{gridRowStart:"1",gridRowEnd:"-1"},children:[(0,x.jsx)(v,{first:!0,done:!0,icon:"check",style:{maxHeight:"33.333%"}}),(0,x.jsx)(v,{current:!0,focus:!0,text:"2",style:{maxHeight:"33.333%"}}),(0,x.jsx)(v,{last:!0,optional:!0,text:"3",style:{maxHeight:"33.333%"}})]}),(0,x.jsx)(q,{orientation:"vertical",reverse:!0,label:!1,value:"50"})]}),...e});