UNPKG

@progress/kendo-themes-html

Version:

A collection of HTML helpers used for developing Kendo UI themes

2 lines (1 loc) 6.34 kB
var c=(...t)=>t.filter(e=>e!==!0&&!!e).map(e=>Array.isArray(e)?c(...e):typeof e=="object"?Object.keys(e).map((l,n)=>e[n]||e[l]&&l||null).filter(l=>l!==null).join(" "):e).filter(e=>!!e).join(" ");var P=(t,e)=>c({[`${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"}),w=(t,e)=>c({"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"};var 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"},N={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"};import{jsx as X}from"react/jsx-runtime";var x="k-pane",D=[],J={},$={resizable:!0,flex:!1},m=t=>{let{scrollable:e,flexBasis:l,flex:n=$.flex,collapsible:r,resizable:s=$.resizable,pinned:i,unpinned:d,tabbed:p,...f}=t;return X("div",{...f,style:{flexBasis:l,...t.style},className:c(t.className,x,{[`${x}-static`]:l,[`${x}-flex`]:n,"k-scrollable":e,[`${x}-pinned`]:i,[`${x}-unpinned`]:d,[`${x}-tabbed`]:p}),children:t.children})};m.states=D;m.options=J;m.className=x;m.defaultOptions=$;import{Fragment as Z,jsx as E}from"react/jsx-runtime";var I="k-icon k-font-icon",q=[],W={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]},U={},v=t=>{let{size:e,themeColor:l,icon:n,rotate:r,flip:s,...i}=t;return n?E("span",{...i,className:c(t.className,I,P(I,{size:e}),{[`k-i-${n}`]:n,[`k-color-${l}`]:l,[`k-rotate-${r}`]:r,"k-flip-h":s==="h"||s==="both","k-flip-v":s==="v"||s==="both"})}):E(Z,{})};v.states=q;v.options=W;v.className=I;v.defaultOptions=U;var B=v;import{Fragment as j,jsx as C}from"react/jsx-runtime";var T="k-icon k-svg-icon",Q=[],Y={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]},R={viewBox:"0 0 24 24"},y=t=>{let{size:e,themeColor:l,rotate:n,flip:r,viewBox:s=R.viewBox,icon:i,...d}=t;if(!i)return C(j,{});i==="none"&&{...d,className:c(t.className,T,"k-none")};let p=typeof i=="object"&&i.name&&i.name;return C("span",{...d,className:c(t.className,T,P("k-icon",{size:e}),{[`k-svg-i-${p}`]:p,[`k-color-${l}`]:l,[`k-rotate-${n}`]:n,"k-flip-h":r==="h"||r==="both","k-flip-v":r==="v"||r==="both"}),children:C("svg",{"aria-hidden":!0,focusable:!1,xmlns:"http://www.w3.org/2000/svg",viewBox:typeof i=="object"?i.viewBox:s,dangerouslySetInnerHTML:typeof i=="object"?{__html:i.content}:void 0,children:i?void 0:t.children})})};y.states=Q;y.options=Y;y.className=T;y.defaultOptions=R;var M=y;import*as K from"@progress/kendo-svg-icons";import{Fragment as H,jsx as k}from"react/jsx-runtime";var ee=t=>t.replace(/([-_][a-z0-9])/gi,e=>e.toUpperCase().replace("-","").replace("_","")),te=[],oe={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]},A={viewBox:"0 0 24 24",type:"svg"},b=t=>{let{size:e,themeColor:l,icon:n,type:r=A.type,rotate:s,flip:i,viewBox:d=A.viewBox,...p}=t;if(!n)return k(H,{});if(r==="svg"){if(n==="none")return k(M,{...p,icon:n,size:e});let f=ee(`${n}-icon`);return K[f]?k(M,{...p,icon:K[f],size:e,themeColor:l,rotate:s,flip:i,viewBox:d}):k(H,{})}return k(B,{...p,icon:n,size:e,themeColor:l,rotate:s,flip:i})};b.states=te;b.options=oe;b.defaultOptions=A;import{Fragment as _,jsx as u,jsxs as ie}from"react/jsx-runtime";var S="k-splitbar",le=[N.hover,N.focus],ne={},L={orientation:"horizontal",draggable:!0},g=t=>{let{hover:e,focus:l,orientation:n=L.orientation,draggable:r=L.draggable,collapsePrev:s,collapseNext:i,...d}=t;return ie("div",{...d,className:c(t.className,S,w(S,{hover:e,focus:l}),{[`${S}-${n}`]:n,[`${S}-draggable-${n}`]:r,[`${S}-static-${n}`]:!r&&!s&&!i}),children:[s&&u(_,{children:u("div",{className:"k-collapse-prev",children:u(b,{icon:`caret-alt-${n==="horizontal"?"left":"up"}`,size:"xsmall"})})}),u("div",{className:"k-resize-handle"}),i&&u(_,{children:u("div",{className:"k-collapse-next",children:u(b,{icon:`caret-alt-${n==="horizontal"?"right":"down"}`,size:"xsmall"})})})]})};g.states=le;g.options=ne;g.className=S;g.defaultOptions=L;import{jsx as F}from"react/jsx-runtime";import{createElement as re}from"react";var O="k-splitter",ae={},V={orientation:"horizontal"},h=t=>{let{orientation:e=V.orientation,children:l,...n}=t,r=[];return l&&Array.isArray(l)&&l.map((s,i)=>{if(s.type===m){let d=l[i+1],p=s.props,f=d?.props;r.push(re(m,{...p,key:i}),d&&F(g,{draggable:p.resizable!==!1&&f.resizable!==!1,collapsePrev:p.collapsible,collapseNext:f.collapsible,orientation:e},`splitbar-${i}`))}else r.push(s)}),F("div",{...n,className:c(t.className,O,{[`${O}-${e}`]:e},"k-splitter-flex"),children:r})};h.options=ae;h.className=O;h.defaultOptions=V;import{jsx as Qe,jsxs as Ye}from"react/jsx-runtime";import{jsx as ot,jsxs as lt}from"react/jsx-runtime";import{jsx as de}from"react/jsx-runtime";var G="k-chart-wizard-splitter",se=[],ce={},pe={},z=t=>{let{children:e,...l}=t;return de(h,{...l,className:c(t.className,G),children:e})};z.states=se;z.options=ce;z.className=G;z.defaultOptions=pe;var xt=z;export{G as CHARTWIZARDSPLITTER_CLASSNAME,z as ChartWizardSplitter,xt as default};