UNPKG

@progress/kendo-themes-html

Version:

A collection of HTML helpers used for developing Kendo UI themes

2 lines (1 loc) 12.3 kB
var Me=Object.create;var J=Object.defineProperty;var Ae=Object.getOwnPropertyDescriptor;var Le=Object.getOwnPropertyNames;var Oe=Object.getPrototypeOf,$e=Object.prototype.hasOwnProperty;var Te=(t,e)=>{for(var s in e)J(t,s,{get:e[s],enumerable:!0})},me=(t,e,s,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Le(e))!$e.call(t,i)&&i!==s&&J(t,i,{get:()=>e[i],enumerable:!(n=Ae(e,i))||n.enumerable});return t};var Ie=(t,e,s)=>(s=t!=null?Me(Oe(t)):{},me(e||!t||!t.__esModule?J(s,"default",{value:t,enumerable:!0}):s,t)),Ee=t=>me(J({},"__esModule",{value:!0}),t);var bt={};Te(bt,{WizardNormal:()=>St});module.exports=Ee(bt);var r=(...t)=>t.filter(e=>e!==!0&&!!e).map(e=>Array.isArray(e)?r(...e):typeof e=="object"?Object.keys(e).map((s,n)=>e[n]||e[s]&&s||null).filter(s=>s!==null).join(" "):e).filter(e=>!!e).join(" ");var R=(t,e)=>r({[`${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"}),x=(t,e)=>r({"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"},H={small:"small",medium:"medium",large:"large",full:"full"},M={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"};var ue=require("react/jsx-runtime"),F="k-wizard",Ke=[d.disabled],Re={},oe={orientation:"horizontal",contentPosition:"right"},A=t=>{let{disabled:e,orientation:s=oe.orientation,contentPosition:n=oe.contentPosition,...i}=t;return(0,ue.jsx)("div",{...i,className:r(t.className,F,x(F,{disabled:e}),{[`${F}-${s}`]:s,[`${F}-${n}`]:n&&s!=="horizontal"}),children:t.children})};A.states=Ke;A.options=Re;A.className=F;A.defaultOptions=oe;var G=require("react/jsx-runtime"),se="k-icon k-font-icon",He=[],We={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]},_e={},D=t=>{let{size:e,themeColor:s,icon:n,rotate:i,flip:c,...l}=t;return n?(0,G.jsx)("span",{...l,className:r(t.className,se,R(se,{size:e}),{[`k-i-${n}`]:n,[`k-color-${s}`]:s,[`k-rotate-${i}`]:i,"k-flip-h":c==="h"||c==="both","k-flip-v":c==="v"||c==="both"})}):(0,G.jsx)(G.Fragment,{})};D.states=He;D.options=We;D.className=se;D.defaultOptions=_e;var fe=D;var L=require("react/jsx-runtime"),ne="k-icon k-svg-icon",Ve=[],Fe={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]},he={viewBox:"0 0 24 24"},Z=t=>{let{size:e,themeColor:s,rotate:n,flip:i,viewBox:c=he.viewBox,icon:l,...m}=t;if(!l)return(0,L.jsx)(L.Fragment,{});l==="none"&&{...m,className:r(t.className,ne,"k-none")};let u=typeof l=="object"&&l.name&&l.name;return(0,L.jsx)("span",{...m,className:r(t.className,ne,R("k-icon",{size:e}),{[`k-svg-i-${u}`]:u,[`k-color-${s}`]:s,[`k-rotate-${n}`]:n,"k-flip-h":i==="h"||i==="both","k-flip-v":i==="v"||i==="both"}),children:(0,L.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})})};Z.states=Ve;Z.options=Fe;Z.className=ne;Z.defaultOptions=he;var re=Z;var xe=Ie(require("@progress/kendo-svg-icons")),y=require("react/jsx-runtime"),Ge=t=>t.replace(/([-_][a-z0-9])/gi,e=>e.toUpperCase().replace("-","").replace("_","")),De=[],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]},ae={viewBox:"0 0 24 24",type:"svg"},N=t=>{let{size:e,themeColor:s,icon:n,type:i=ae.type,rotate:c,flip:l,viewBox:m=ae.viewBox,...u}=t;if(!n)return(0,y.jsx)(y.Fragment,{});if(i==="svg"){if(n==="none")return(0,y.jsx)(re,{...u,icon:n,size:e});let f=Ge(`${n}-icon`);return xe[f]?(0,y.jsx)(re,{...u,icon:xe[f],size:e,themeColor:s,rotate:c,flip:l,viewBox:m}):(0,y.jsx)(y.Fragment,{})}return(0,y.jsx)(fe,{...u,icon:n,size:e,themeColor:s,rotate:c,flip:l})};N.states=De;N.options=Ze;N.defaultOptions=ae;var S=require("react/jsx-runtime"),X="k-button",Ue=[d.hover,d.focus,d.active,d.selected,d.disabled],qe={size:[a.small,a.medium,a.large],rounded:[H.small,H.medium,H.large,H.full],fillMode:[M.solid,M.flat,M.outline,M.clear,M.link],themeColor:[o.base,o.primary,o.secondary,o.tertiary,o.success,o.warning,o.error,o.info,o.light,o.dark,o.inverse]},O={size:a.medium,rounded:H.medium,fillMode:M.solid,themeColor:o.base,showArrow:!1,arrowIconName:"caret-alt-down"},k=t=>{let{size:e=O.size,rounded:s=O.rounded,fillMode:n=O.fillMode,themeColor:i=O.themeColor,showArrow:c=O.showArrow,arrowIconName:l=O.arrowIconName,hover:m,focus:u,active:f,selected:W,disabled:_,icon:w,text:B,iconClassName:V,...q}=t,ee=w!==void 0,te=t.children!==void 0;return(0,S.jsxs)("button",{...q,className:r(t.className,X,R(X,{size:e,rounded:s,fillMode:n,themeColor:i}),x(X,{hover:m,focus:u,active:f,disabled:_,selected:W}),{"k-icon-button":!B&&!te&&ee}),children:[w&&(0,S.jsx)(N,{className:r(V,"k-button-icon"),icon:w}),B?(0,S.jsxs)(S.Fragment,{children:[B&&(0,S.jsx)("span",{className:"k-button-text",children:B}),t.children]}):t.children&&(0,S.jsx)("span",{className:"k-button-text",children:t.children}),c&&(0,S.jsx)("span",{className:"k-menu-button-arrow k-button-arrow",children:(0,S.jsx)(N,{icon:l})})]})};k.states=Ue;k.options=qe;k.className=X;k.defaultOptions=O;var Je=require("react/jsx-runtime");var Xe=require("react/jsx-runtime");var Qe=require("react/jsx-runtime");var h=require("react/jsx-runtime"),ie="k-wizard-step",Ye=[d.focus],je={},et=(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)("span",{className:"k-wizard-buttons-left",children:(0,h.jsx)("span",{className:"k-wizard-pager",children:"Step 2 of 3"})}),(0,h.jsxs)("span",{className:"k-wizard-buttons-right",children:[(0,h.jsx)(k,{children:"Previous"}),(0,h.jsx)(k,{themeColor:"primary",children:"Next"})]})]}),ge={buttons:et},$=t=>{let{focus:e,buttons:s=ge.buttons,...n}=t;return(0,h.jsxs)("div",{...n,className:r(t.className,ie,x(ie,{focus:e})),children:[(0,h.jsx)("div",{className:"k-wizard-content",children:t.children}),s&&(0,h.jsx)("div",{className:"k-wizard-buttons",children:s})]})};$.states=Ye;$.options=je;$.className=ie;$.defaultOptions=ge;var be=require("react/jsx-runtime"),Se="k-wizard-steps",tt=[],ot={},st={},T=t=>(0,be.jsx)("div",{...t,className:r(t.className,Se),children:t.children});T.states=tt;T.options=ot;T.className=Se;T.defaultOptions=st;var ve=require("react/jsx-runtime"),ke="k-stepper",nt=[],rt={},at={},I=t=>{let{style:e,...s}=t;return(0,ve.jsx)("nav",{...s,style:e,className:r(t.className,ke),children:t.children})};I.options=rt;I.states=nt;I.className=ke;I.defaultOptions=at;var Ne=require("react/jsx-runtime"),le="k-step-list",it=[],lt={},ye={orientation:"horizontal"},E=t=>{let{style:e,orientation:s=ye.orientation,...n}=t;return(0,Ne.jsx)("ol",{...n,style:e,className:r(t.className,le,{[`${le}-${s}`]:s}),children:t.children})};E.options=lt;E.states=it;E.className=le;E.defaultOptions=ye;var p=require("react/jsx-runtime"),v="k-step",ct=[d.disabled,d.hover,d.focus,d.invalid,d.valid],dt={},pt={},z=t=>{let{style:e,disabled:s,hover:n,focus:i,invalid:c,valid:l,optional:m,first:u,done:f,current:W,last:_,label:w,text:B,icon:V,stepContent:q,...ee}=t,te=c?"warning-circle":"check-circle",Be=!!(l||c);return(0,p.jsxs)("li",{...ee,style:e,className:r(t.className,v,{[`${v}-done`]:f,[`${v}-first`]:u,[`${v}-current`]:W,[`${v}-last`]:_,[`${v}-optional`]:m,[`${v}-success`]:l,[`${v}-error`]:c},x(v,{hover:n,focus:i,disabled:s})),children:[(0,p.jsxs)("a",{href:"#",className:"k-step-link",children:[B&&!V&&(0,p.jsx)("span",{className:"k-step-indicator",children:(0,p.jsx)("span",{className:"k-step-indicator-text",children:B})}),V&&(0,p.jsx)("span",{className:"k-step-indicator",children:(0,p.jsx)(N,{className:"k-step-indicator-icon",icon:V})}),m&&!w&&(0,p.jsx)("span",{className:"k-step-label",children:(0,p.jsx)("span",{className:"k-step-label-optional",children:"(Optional)"})}),w&&(0,p.jsxs)("span",{className:"k-step-label",children:[(0,p.jsx)("span",{className:"k-step-text",children:w}),Be&&(0,p.jsx)(N,{icon:te}),m&&(0,p.jsx)("span",{className:"k-step-label-optional",children:"(Optional)"})]})]}),q&&(0,p.jsx)("div",{className:"k-step-content",style:{height:"140px"},children:q})]})};z.options=dt;z.states=ct;z.className=v;z.defaultOptions=pt;var P=require("react/jsx-runtime"),g="k-progressbar",mt=[d.disabled,d.indeterminate],ut={},K={indeterminate:!1,label:!0,labelPosition:"start",orientation:"horizontal",reverse:!1,value:"0"},U=t=>{let{disabled:e,height:s,indeterminate:n=K.indeterminate,label:i=K.label,labelPosition:c=K.labelPosition,orientation:l=K.orientation,reverse:m=K.reverse,value:u=K.value,width:f,style:W,..._}=t;return(0,P.jsxs)("div",{..._,className:r(t.className,g,x(g,{disabled:e}),{[`${g}-${l}`]:l,[`${g}-indeterminate`]:n,[`${g}-reverse`]:m}),style:{...W,"--kendo-progressbar-value":u,[l==="horizontal"?"height":"width"]:l==="horizontal"?s:f},children:[(0,P.jsx)("span",{className:r("k-progress-status-wrap",{[`k-progress-${c}`]:c&&!n}),children:i&&(0,P.jsxs)("span",{className:"k-progress-status",children:[u,"%"]})}),!n&&(0,P.jsx)("div",{className:"k-progressbar-value k-selected",children:(0,P.jsx)("span",{className:r("k-progress-status-wrap",{[`k-progress-${c}`]:c}),children:i&&(0,P.jsxs)("span",{className:"k-progress-status",children:[t.value,"%"]})})})]})};U.states=mt;U.options=ut;U.className=g;U.defaultOptions=K;var ze=U;var Y=require("react/jsx-runtime"),Ce="k-chunk-progressbar",ft=(t,e)=>e<=t-1,ht=[d.disabled,d.indeterminate],xt={},Q={chunkCount:5,orientation:"horizontal",progress:0},j=t=>{let{disabled:e,chunkCount:s=Q.chunkCount,indeterminate:n,orientation:i=Q.orientation,progress:c=Q.progress,reverse:l,...m}=t;return(0,Y.jsx)("div",{...m,className:r(t.className,g,Ce,x(g,{disabled:e}),{[`${g}-${i}`]:i,[`${g}-indeterminate`]:n,[`${g}-reverse`]:l}),children:(0,Y.jsx)("ul",{className:"k-progressbar-chunks k-reset",children:[...Array(s)].map((u,f)=>(0,Y.jsx)("li",{className:r("k-progressbar-chunk",{"k-first":f===0,"k-last":f===[...Array(s)].length-1,"k-selected":ft(c,f)})},f))})})};j.states=ht;j.options=xt;j.className=Ce;j.defaultOptions=Q;var Pe=require("react/jsx-runtime"),ce=t=>(0,Pe.jsx)(ze,{...t});var gt=require("react/jsx-runtime");var b=require("react/jsx-runtime"),we=({gridTemplateColumns:t="repeat(6, 1fr)",...e})=>(0,b.jsx)(I,{style:{display:"grid",gridTemplateColumns:t},children:(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)(E,{style:{gridColumnStart:"1",gridColumnEnd:"-1"},children:[(0,b.jsx)(z,{first:!0,done:!0,icon:"check",style:{maxWidth:"33.333%"}}),(0,b.jsx)(z,{current:!0,focus:!0,text:"2",style:{maxWidth:"33.333%"}}),(0,b.jsx)(z,{last:!0,optional:!0,text:"3",style:{maxWidth:"33.333%"}})]}),(0,b.jsx)(ce,{label:!1,value:"50"})]}),...e});var de=require("react/jsx-runtime");var pe=require("react/jsx-runtime");var C=require("react/jsx-runtime"),St=({...t})=>(0,C.jsx)(A,{id:"wizard",children:(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(we,{}),(0,C.jsx)(T,{children:(0,C.jsx)($,{children:"Short content"})})]}),...t});