@progress/kendo-themes-html
Version:
A collection of HTML helpers used for developing Kendo UI themes
2 lines (1 loc) • 4.46 kB
JavaScript
var c=(...t)=>t.filter(e=>e!==!0&&!!e).map(e=>Array.isArray(e)?c(...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 d=(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"});var i={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"};import{Fragment as E,jsx as w}from"react/jsx-runtime";var k="k-icon k-font-icon",B=[],L={size:[i.xsmall,i.small,i.medium,i.large,i.xlarge,i.xxlarge,i.xxxlarge],themeColor:[o.base,o.primary,o.secondary,o.tertiary,o.success,o.warning,o.error,o.info,o.light,o.dark]},H={},p=t=>{let{size:e,themeColor:r,icon:n,rotate:l,flip:s,...a}=t;return n?w("span",{...a,className:c(t.className,k,d(k,{size:e}),{[`k-i-${n}`]:n,[`k-color-${r}`]:r,[`k-rotate-${l}`]:l,"k-flip-h":s==="h"||s==="both","k-flip-v":s==="v"||s==="both"})}):w(E,{})};p.states=B;p.options=L;p.className=k;p.defaultOptions=H;var M=p;import{Fragment as R,jsx as y}from"react/jsx-runtime";var N="k-icon k-svg-icon",P=[],F={size:[i.xsmall,i.small,i.medium,i.large,i.xlarge,i.xxlarge,i.xxxlarge],themeColor:[o.base,o.primary,o.secondary,o.tertiary,o.success,o.warning,o.error,o.info,o.light,o.dark]},O={viewBox:"0 0 24 24"},u=t=>{let{size:e,themeColor:r,rotate:n,flip:l,viewBox:s=O.viewBox,icon:a,...g}=t;if(!a)return y(R,{});a==="none"&&{...g,className:c(t.className,N,"k-none")};let f=typeof a=="object"&&a.name&&a.name;return y("span",{...g,className:c(t.className,N,d("k-icon",{size:e}),{[`k-svg-i-${f}`]:f,[`k-color-${r}`]:r,[`k-rotate-${n}`]:n,"k-flip-h":l==="h"||l==="both","k-flip-v":l==="v"||l==="both"}),children:y("svg",{"aria-hidden":!0,focusable:!1,xmlns:"http://www.w3.org/2000/svg",viewBox:typeof a=="object"?a.viewBox:s,dangerouslySetInnerHTML:typeof a=="object"?{__html:a.content}:void 0,children:a?void 0:t.children})})};u.states=P;u.options=F;u.className=N;u.defaultOptions=O;var b=u;import*as $ from"@progress/kendo-svg-icons";import{Fragment as T,jsx as h}from"react/jsx-runtime";var _=t=>t.replace(/([-_][a-z0-9])/gi,e=>e.toUpperCase().replace("-","").replace("_","")),K=[],G={size:[i.xsmall,i.small,i.medium,i.large,i.xlarge,i.xxlarge,i.xxxlarge],themeColor:[o.base,o.primary,o.secondary,o.tertiary,o.success,o.warning,o.error,o.info,o.light,o.dark]},C={viewBox:"0 0 24 24",type:"svg"},x=t=>{let{size:e,themeColor:r,icon:n,type:l=C.type,rotate:s,flip:a,viewBox:g=C.viewBox,...f}=t;if(!n)return h(T,{});if(l==="svg"){if(n==="none")return h(b,{...f,icon:n,size:e});let z=_(`${n}-icon`);return $[z]?h(b,{...f,icon:$[z],size:e,themeColor:r,rotate:s,flip:a,viewBox:g}):h(T,{})}return h(M,{...f,icon:n,size:e,themeColor:r,rotate:s,flip:a})};x.states=K;x.options=G;x.defaultOptions=C;import{Fragment as D,jsx as v,jsxs as A}from"react/jsx-runtime";var I="k-notification",V=[],q={themeColor:[o.base,o.primary,o.secondary,o.tertiary,o.success,o.warning,o.error,o.info,o.light,o.dark,o.inverse]},S={themeColor:o.base,closable:!1},m=t=>{let{actions:e,themeColor:r=S.themeColor,text:n,icon:l,closable:s=S.closable,...a}=t;return A("div",{...a,className:c(t.className,I,d(I,{themeColor:r}),{"k-notification-closable":s}),children:[l&&v(x,{className:"k-notification-status",icon:l}),t.children?A("div",{className:"k-notification-content",children:[n,t.children]}):v(D,{children:n&&v("div",{className:"k-notification-content",children:n})}),e&&v("span",{className:"k-notification-actions",children:e})]})};m.states=V;m.options=q;m.className=I;m.defaultOptions=S;import{jsx as Ie}from"react/jsx-runtime";import{jsx as Me}from"react/jsx-runtime";import{jsx as Ae}from"react/jsx-runtime";import{jsx as Ee}from"react/jsx-runtime";import{jsx as X}from"react/jsx-runtime";var Je=t=>X(m,{text:"Notification",...t});export{Je as NotificationNormal};