@progress/kendo-themes-html
Version:
A collection of HTML helpers used for developing Kendo UI themes
2 lines (1 loc) • 9.29 kB
JavaScript
var pe=Object.create;var F=Object.defineProperty;var ue=Object.getOwnPropertyDescriptor;var fe=Object.getOwnPropertyNames;var xe=Object.getPrototypeOf,he=Object.prototype.hasOwnProperty;var ge=(t,e)=>{for(var r in e)F(t,r,{get:e[r],enumerable:!0})},te=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of fe(e))!he.call(t,a)&&a!==r&&F(t,a,{get:()=>e[a],enumerable:!(n=ue(e,a))||n.enumerable});return t};var ke=(t,e,r)=>(r=t!=null?pe(xe(t)):{},te(e||!t||!t.__esModule?F(r,"default",{value:t,enumerable:!0}):r,t)),Ne=t=>te(F({},"__esModule",{value:!0}),t);var He={};ge(He,{SliderNormal:()=>Pe});module.exports=Ne(He);var i=(...t)=>t.filter(e=>e!==!0&&!!e).map(e=>Array.isArray(e)?i(...e):typeof e=="object"?Object.keys(e).map((r,n)=>e[n]||e[r]&&r||null).filter(r=>r!==null).join(" "):e).filter(e=>!!e).join(" ");var E=(t,e)=>i({[`${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"}),L=(t,e)=>{let{valid:r,invalid:n,hover:a,focus:d,checked:s,active:k,selected:p,disabled:b,indeterminate:A,loading:_,empty:T,readonly:C,highlighted:N,...S}=e;return i({"k-valid":r,"k-invalid":n,"k-hover":a,"k-focus":d,"k-checked":s,"k-active":k,"k-selected":p,"k-disabled":b,"k-indeterminate":A&&!s,"k-loading":_,"k-empty":T,"k-readonly":C,"k-highlighted":N},Object.keys(S).reduce((R,w)=>(w.startsWith("k-")?R[w]=S[w]:R[`k-${w}`]=S[w],R),{}))};function oe(t,e){if(!e)return{};let r=Array.isArray(e)?e:[e];return Object.fromEntries(r.map(n=>[`k-${n}`,!0]))}var l={xsmall:"xsmall",small:"small",medium:"medium",large:"large",xlarge:"xlarge",xxlarge:"xxlarge",xxxlarge:"xxxlarge"},z={small:"small",medium:"medium",large:"large",full:"full"},O={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"},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",generating:"generating",expanded:"expanded"};var K=require("react/jsx-runtime"),V="k-font-icon",be=[],Se={size:[l.xsmall,l.small,l.medium,l.large,l.xlarge,l.xxlarge,l.xxxlarge],themeColor:[o.base,o.primary,o.secondary,o.tertiary,o.success,o.warning,o.error,o.info,o.light,o.dark]},ye={},$=t=>{let{size:e,themeColor:r,icon:n,rotate:a,flip:d,...s}=t;return n?(0,K.jsx)("span",{...s,className:i(t.className,V,E(V,{size:e}),{[`k-i-${n}`]:n,[`k-color-${r}`]:r,[`k-rotate-${a}`]:a,"k-flip-h":d==="h"||d==="both","k-flip-v":d==="v"||d==="both"})}):(0,K.jsx)(K.Fragment,{})};$.states=be;$.options=Se;$.className=V;$.defaultOptions=ye;var re=$;var B=require("react/jsx-runtime"),G="k-svg-icon",ve=[],Me={size:[l.xsmall,l.small,l.medium,l.large,l.xlarge,l.xxlarge,l.xxxlarge],themeColor:[o.base,o.primary,o.secondary,o.tertiary,o.success,o.warning,o.error,o.info,o.light,o.dark]},ne={viewBox:"0 0 24 24"},D=t=>{let{size:e,themeColor:r,rotate:n,flip:a,viewBox:d=ne.viewBox,icon:s,...k}=t;if(!s)return(0,B.jsx)(B.Fragment,{});s==="none"&&{...k,className:i(t.className,G,"k-none")};let p=typeof s=="object"&&s.name&&s.name;return(0,B.jsx)("span",{...k,className:i(t.className,G,E("k-icon",{size:e}),{[`k-svg-i-${p}`]:p,[`k-color-${r}`]:r,[`k-rotate-${n}`]:n,"k-flip-h":a==="h"||a==="both","k-flip-v":a==="v"||a==="both"}),children:(0,B.jsx)("svg",{"aria-hidden":!0,focusable:!1,xmlns:"http://www.w3.org/2000/svg",viewBox:typeof s=="object"?s.viewBox:d,dangerouslySetInnerHTML:typeof s=="object"?{__html:s.content}:void 0,children:s?void 0:t.children})})};D.states=ve;D.options=Me;D.className=G;D.defaultOptions=ne;var q=D;var W=ke(require("@progress/kendo-svg-icons"));var le="icon",se="icons";var y=require("react/jsx-runtime"),U="k-icon",Te=t=>t.replace(/([-_][a-z0-9])/gi,e=>e.toUpperCase().replace("-","").replace("_","")),Ce=[],we={size:[l.xsmall,l.small,l.medium,l.large,l.xlarge,l.xxlarge,l.xxxlarge],themeColor:[o.base,o.primary,o.secondary,o.tertiary,o.success,o.warning,o.error,o.info,o.light,o.dark]},J={viewBox:"0 0 24 24",type:"svg"},v=t=>{let{size:e,themeColor:r,icon:n,type:a=J.type,rotate:d,flip:s,viewBox:k=J.viewBox,...p}=t;if(!n)return(0,y.jsx)(y.Fragment,{});if(a==="svg"){if(n==="none")return(0,y.jsx)(q,{...p,className:i(t.className,U),icon:n,size:e});let b=W[n]?n:Te(`${n}-icon`);return W[b]?(0,y.jsx)(q,{...p,className:i(t.className,U),icon:W[b],size:e,themeColor:r,rotate:d,flip:s,viewBox:k}):(0,y.jsx)(y.Fragment,{})}return(0,y.jsx)(re,{...p,className:i(t.className,U),icon:n,size:e,themeColor:r,rotate:d,flip:s})};v.states=Ce;v.options=we;v.defaultOptions=J;v.className=U;v.moduleName=le;v.folderName=se;var Q="button",ae=Q;var h=require("react/jsx-runtime"),P="k-button",Oe=["icon-button"],Be=[u.hover,u.focus,u.active,u.selected,u.disabled,u.generating],Ie={size:[l.small,l.medium,l.large],rounded:[z.small,z.medium,z.large,z.full],fillMode:[O.solid,O.flat,O.outline,O.clear,O.link],themeColor:[o.base,o.primary,o.secondary,o.tertiary,o.success,o.warning,o.error,o.info,o.light,o.dark,o.inverse]},I={size:l.medium,rounded:z.medium,fillMode:O.solid,themeColor:o.base,showArrow:!1,arrowIconName:"caret-alt-down"},f=t=>{let{size:e=I.size,rounded:r=I.rounded,fillMode:n=I.fillMode,themeColor:a=I.themeColor,showArrow:d=I.showArrow,arrowIconName:s=I.arrowIconName,variant:k,hover:p,focus:b,active:A,selected:_,disabled:T,icon:C,text:N,iconClassName:S,...R}=t,w=C!==void 0,me=t.children!==void 0;return(0,h.jsxs)("button",{...R,className:i(t.className,P,oe(P,k),E(P,{size:e,rounded:r,fillMode:n,themeColor:a}),L(P,{hover:p,focus:b,active:A,disabled:T,selected:_}),{"k-icon-button":!N&&!me&&w}),children:[C&&(0,h.jsx)(v,{className:i(S,"k-button-icon"),icon:C}),N?(0,h.jsxs)(h.Fragment,{children:[N&&(0,h.jsx)("span",{className:"k-button-text",children:N}),t.children]}):t.children&&(0,h.jsx)("span",{className:"k-button-text",children:t.children}),d&&(0,h.jsx)("span",{className:"k-menu-button-arrow k-button-arrow",children:(0,h.jsx)(v,{icon:s})})]})};f.states=Be;f.options=Ie;f.variants=Oe;f.className=P;f.defaultOptions=I;f.moduleName=Q;f.folderName=ae;var Ae=require("react/jsx-runtime");var Ee=require("react/jsx-runtime");var Le=require("react/jsx-runtime");var X="slider",ie=X;var g=require("react/jsx-runtime"),H="k-slider",ze=[u.hover,u.focus,u.active,u.disabled,u.readonly],_e={},M={type:"single",orientation:"horizontal",readonly:!1,disabled:!1,handlePosition:"end",showButtons:!0,showTicks:!0},x=t=>{let{type:e=M.type,orientation:r=M.orientation,readonly:n=M.readonly,disabled:a=M.disabled,handlePosition:d=M.handlePosition,showButtons:s=M.showButtons,showTicks:k=M.showTicks,hover:p,focus:b,active:A,trackStyle:_,dir:T,...C}=t,N,S;return r==="horizontal"?(N=T==="rtl"?"caret-alt-left":"caret-alt-right",S=T==="rtl"?"caret-alt-right":"caret-alt-left"):r==="vertical"&&(N="caret-alt-up",S="caret-alt-down"),(0,g.jsxs)("div",{...C,className:i(H,t.className,L(H,{readonly:n,disabled:a}),{[`k-slider-${r}`]:r,"k-colorgradient-slider":e==="gradient"}),dir:T,children:[s&&(0,g.jsx)(f,{className:"k-button-decrease",rounded:"full",icon:S}),(0,g.jsxs)("div",{className:"k-slider-track-wrap",children:[k&&(0,g.jsx)("ul",{className:"k-reset k-slider-items",children:t.children}),(0,g.jsxs)("div",{className:"k-slider-track",style:_,children:[(0,g.jsx)("div",{className:"k-slider-selection"}),e==="range"&&(0,g.jsx)("span",{className:i("k-draghandle","k-draghandle-start",L(H,{hover:p,focus:b,active:A}))}),(0,g.jsx)("span",{className:i("k-draghandle",`k-draghandle-${d}`,L(H,{hover:p,focus:b,active:A}))})]})]}),s&&(0,g.jsx)(f,{className:"k-button-increase",rounded:"full",icon:N})]})};x.states=ze;x.options=_e;x.className=H;x.defaultOptions=M;x.moduleName=X;x.folderName=ie;var Y=require("react/jsx-runtime"),ce="k-tick",Re=[],Ke={},de={label:!1},c=t=>{let{style:e,label:r=de.label,orientation:n,large:a,text:d,...s}=t;return(0,Y.jsx)("li",{...s,className:i(t.className,ce,{[`k-tick-${n}`]:n,"k-tick-large":a}),style:e,children:r&&(0,Y.jsx)("span",{className:"k-label",children:d})})};c.states=Re;c.options=Ke;c.className=ce;c.defaultOptions=de;var Z=require("react/jsx-runtime");var j=require("react/jsx-runtime");var ee=require("react/jsx-runtime");var $e=require("react/jsx-runtime");var De=require("react/jsx-runtime");var m=require("react/jsx-runtime"),Pe=t=>(0,m.jsx)(x,{children:(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(c,{className:"k-first",label:!0,large:!0,text:"0"}),(0,m.jsx)(c,{}),(0,m.jsx)(c,{}),(0,m.jsx)(c,{}),(0,m.jsx)(c,{}),(0,m.jsx)(c,{label:!0,large:!0,text:"5"}),(0,m.jsx)(c,{}),(0,m.jsx)(c,{}),(0,m.jsx)(c,{}),(0,m.jsx)(c,{}),(0,m.jsx)(c,{className:"k-last",label:!0,large:!0,text:"10"})]}),...t});