UNPKG

@progress/kendo-themes-html

Version:

A collection of HTML helpers used for developing Kendo UI themes

2 lines (1 loc) 9.03 kB
var me=Object.create;var _=Object.defineProperty;var ce=Object.getOwnPropertyDescriptor;var de=Object.getOwnPropertyNames;var pe=Object.getPrototypeOf,ue=Object.prototype.hasOwnProperty;var fe=(t,e)=>{for(var n in e)_(t,n,{get:e[n],enumerable:!0})},Z=(t,e,n,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of de(e))!ue.call(t,a)&&a!==n&&_(t,a,{get:()=>e[a],enumerable:!(s=ce(e,a))||s.enumerable});return t};var ve=(t,e,n)=>(n=t!=null?me(pe(t)):{},Z(e||!t||!t.__esModule?_(n,"default",{value:t,enumerable:!0}):n,t)),xe=t=>Z(_({},"__esModule",{value:!0}),t);var $e={};fe($e,{BottomNavIcons:()=>Ee});module.exports=xe($e);var d=(...t)=>t.filter(e=>e!==!0&&!!e).map(e=>Array.isArray(e)?d(...e):typeof e=="object"?Object.keys(e).map((n,s)=>e[s]||e[n]&&n||null).filter(n=>n!==null).join(" "):e).filter(e=>!!e).join(" ");var y=(t,e)=>d({[`${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.themeColor}`]:e.themeColor},{"k-rounded-sm":e.rounded==="small","k-rounded-md":e.rounded==="medium","k-rounded-lg":e.rounded==="large","k-rounded-full":e.rounded==="full","k-rounded-none":e.rounded==="none"}),w=(t,e)=>{let{valid:n,invalid:s,hover:a,focus:p,checked:c,active:l,selected:I,disabled:b,indeterminate:h,loading:S,empty:k,readonly:se,highlighted:le,...V}=e;return d({"k-valid":n,"k-invalid":s,"k-hover":a,"k-focus":p,"k-checked":c,"k-active":l,"k-selected":I,"k-disabled":b,"k-indeterminate":h&&!c,"k-loading":S,"k-empty":k,"k-readonly":se,"k-highlighted":le},Object.keys(V).reduce((R,T)=>(T.startsWith("k-")?R[T]=V[T]:R[`k-${T}`]=V[T],R),{}))};var r={undefined:void 0,xsmall:"xsmall",small:"small",medium:"medium",large:"large",xlarge:"xlarge",xxlarge:"xxlarge",xxxlarge:"xxxlarge"};var E={undefined:void 0,solid:"solid",flat:"flat",outline:"outline",clear:"clear",link:"link"},f={undefined:void 0,outline:"outline",solid:"solid",duotone:"duotone"},o={undefined:void 0,inherit:"inherit",base:"base",primary:"primary",secondary:"secondary",tertiary:"tertiary",info:"info",success:"success",warning:"warning",error:"error",inverse:"inverse"},M={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 P="bottom-navigation",j=P;var ee=require("react/jsx-runtime"),$="k-bottom-nav",Ne=[M.disabled],ge={fillMode:[E.undefined,E.solid,E.flat],themeColor:[o.undefined,o.base,o.primary,o.secondary,o.tertiary,o.inverse]},F={flow:"horizontal",border:!1},m=t=>{let{disabled:e,fillMode:n,themeColor:s,flow:a=F.flow,border:p=F.border,positionMode:c,dir:l}=t;return(0,ee.jsx)("nav",{className:d(t.className,$,y($,{fillMode:n,themeColor:s}),{[`k-bottom-nav-item-flow-${a}`]:a,"k-bottom-nav-border":p,[`k-pos-${c}`]:c},w($,{disabled:e})),dir:l,"aria-label":"Bottom navigation",children:t.children})};m.states=Ne;m.options=ge;m.className=$;m.defaultOptions=F;m.moduleName=P;m.folderName=j;m.ariaSpec={selector:".k-bottom-nav",rules:[{selector:".k-bottom-nav",attribute:"role=navigation or nodeName=nav",usage:"The landmark role navigation must be assigned to the bottom navigation."},{selector:".k-bottom-nav-item",attribute:"role=link or nodeName=a",usage:"Associate the link purpose of the bottom navigation items."},{selector:".k-bottom-nav-item.k-selected",attribute:"aria-current=true",usage:"Indicates the selected navigation item."}]};var L=require("react/jsx-runtime"),D="k-font-icon",he=[],be={size:[r.undefined,r.xsmall,r.small,r.medium,r.large,r.xlarge,r.xxlarge,r.xxxlarge],themeColor:[o.undefined,o.base,o.primary,o.secondary,o.tertiary,o.success,o.warning,o.error,o.info]},ke={},A=t=>{let{size:e,themeColor:n,icon:s,rotate:a,flip:p,...c}=t;return s?(0,L.jsx)("span",{...c,className:d(t.className,D,y(D,{size:e}),{[`k-i-${s}`]:s,[`k-color-${n}`]:n,[`k-rotate-${a}`]:a,"k-flip-h":p==="h"||p==="both","k-flip-v":p==="v"||p==="both"}),"aria-hidden":"true"}):(0,L.jsx)(L.Fragment,{})};A.states=he;A.options=be;A.className=D;A.defaultOptions=ke;var te=A;var B=require("react/jsx-runtime"),G="k-svg-icon",ye=[],Be={size:[r.undefined,r.xsmall,r.small,r.medium,r.large,r.xlarge,r.xxlarge,r.xxxlarge],themeColor:[o.undefined,o.base,o.primary,o.secondary,o.tertiary,o.success,o.warning,o.error,o.info],variant:[f.outline,f.solid,f.duotone]},U={viewBox:"0 0 24 24",variant:f.outline},z=t=>{var S,k;let{size:e,themeColor:n,rotate:s,flip:a,viewBox:p=U.viewBox,variant:c=U.variant,icon:l,...I}=t;if(!l)return(0,B.jsx)(B.Fragment,{});if(l==="none")return(0,B.jsx)("span",{...I,className:d(t.className,G,y("k-icon",{size:e}),"k-none"),"aria-hidden":"true"});let b=typeof l=="object"&&l.name&&l.name,h=typeof l=="object"?c&&((S=l.variants)==null?void 0:S[c])||((k=l.variants)==null?void 0:k.outline)||l.content:void 0;return(0,B.jsx)("span",{...I,className:d(t.className,G,y("k-icon",{size:e}),{[`k-svg-i-${b}`]:b,[`k-color-${n}`]:n,[`k-rotate-${s}`]:s,"k-flip-h":a==="h"||a==="both","k-flip-v":a==="v"||a==="both"}),"aria-hidden":"true",children:(0,B.jsx)("svg",{"aria-hidden":!0,focusable:!1,xmlns:"http://www.w3.org/2000/svg",viewBox:typeof l=="object"?l.viewBox:p,dangerouslySetInnerHTML:h!==void 0?{__html:h}:void 0,children:l?void 0:t.children})})};z.states=ye;z.options=Be;z.className=G;z.defaultOptions=U;var q=z;var W=ve(require("@progress/kendo-svg-icons"));var oe="icon",ne="icons";var ie=require("react");var ae=require("react"),re=(0,ae.createContext)({iconsType:"svg"});var v=require("react/jsx-runtime"),K="k-icon",Ce=t=>t.replace(/([-_][a-z0-9])/gi,e=>e.toUpperCase().replace("-","").replace("_","")),Ie=[],Me={size:[r.undefined,r.xsmall,r.small,r.medium,r.large,r.xlarge,r.xxlarge,r.xxxlarge],themeColor:[o.undefined,o.base,o.primary,o.secondary,o.tertiary,o.success,o.warning,o.error,o.info],variant:[f.outline,f.solid,f.duotone]},H={viewBox:"0 0 24 24",type:"svg",variant:f.outline},x=t=>{let{iconsType:e}=(0,ie.useContext)(re),{size:n,themeColor:s,icon:a,type:p=e||H.type,rotate:c,flip:l,viewBox:I=H.viewBox,variant:b=H.variant,...h}=t;if(!a)return(0,v.jsx)(v.Fragment,{});if((e||p)==="svg"){if(a==="none")return(0,v.jsx)(q,{...h,className:d(t.className,K),icon:a,size:n,variant:b});let k=W[a]?a:Ce(`${a}-icon`);return W[k]?(0,v.jsx)(q,{...h,className:d(t.className,K),icon:W[k],size:n,themeColor:s,rotate:c,flip:l,viewBox:I,variant:b}):(0,v.jsx)(v.Fragment,{})}return(0,v.jsx)(te,{...h,className:d(t.className,K),icon:a,size:n,themeColor:s,rotate:c,flip:l})};x.states=Ie;x.options=Me;x.defaultOptions=H;x.className=K;x.moduleName=oe;x.folderName=ne;x.ariaSpec={selector:".k-icon, .k-svg-icon",rules:[{selector:".k-icon, .k-svg-icon",attribute:"aria-hidden=true",usage:"Hides the icon element and all its children from assistive technologies."}]};var C=require("react/jsx-runtime"),J="k-bottom-nav-item",Oe=[M.focus,M.selected,M.disabled],Se={},Te={},i=t=>{let{focus:e,selected:n,disabled:s,icon:a,text:p,link:c}=t;return(0,C.jsxs)("span",{className:d(J,w(J,{focus:e,selected:n,disabled:s})),role:"link",...n&&{"aria-current":"true"},...!p&&!c&&a&&{"aria-label":a},children:[a&&(0,C.jsx)(x,{className:"k-bottom-nav-item-icon",icon:a,size:"xlarge"}),p&&(0,C.jsx)("span",{className:"k-bottom-nav-item-text",children:p}),c&&(0,C.jsx)("div",{className:"k-bottom-nav-link",children:(0,C.jsx)("span",{children:c})})]})};i.states=Oe;i.options=Se;i.className=J;i.defaultOptions=Te;var N=require("react/jsx-runtime"),Q=t=>(0,N.jsx)(m,{children:(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(i,{icon:"envelope",text:"BottomNavItem"}),(0,N.jsx)(i,{icon:"envelope",text:"BottomNavItem"}),(0,N.jsx)(i,{icon:"envelope",text:"BottomNavItem"})]}),...t});var X=require("react/jsx-runtime");var Y=require("react/jsx-runtime");var u=require("react/jsx-runtime"),Le=m.options,Ae=m.states,ze={...m.defaultOptions,variant:"vertical"},_e=[{name:"vertical",title:"Vertical"},{name:"horizontal",title:"Horizontal"}],we=[],O=t=>{let{variant:e,...n}=t;return e==="horizontal"?(0,u.jsxs)(Q,{border:!0,flow:"horizontal",...n,children:[(0,u.jsx)(i,{icon:"envelope",text:"Label"}),(0,u.jsx)(i,{icon:"chart-pie",text:"Label",selected:!0}),(0,u.jsx)(i,{icon:"gear",text:"Label"}),(0,u.jsx)(i,{icon:"more-horizontal",text:"Label"})]}):(0,u.jsxs)(Q,{border:!0,flow:"vertical",...n,children:[(0,u.jsx)(i,{icon:"envelope",text:"Label"}),(0,u.jsx)(i,{icon:"chart-pie",text:"Label",selected:!0}),(0,u.jsx)(i,{icon:"gear",text:"Label"}),(0,u.jsx)(i,{icon:"more-vertical",text:"Label"})]})};O.options=Le;O.states=Ae;O.variants=_e;O.defaultOptions=ze;O.modifiers=we;O.className=m.className;var g=require("react/jsx-runtime"),Ee=t=>(0,g.jsx)(m,{children:(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(i,{icon:"envelope"}),(0,g.jsx)(i,{icon:"envelope"}),(0,g.jsx)(i,{icon:"envelope"})]}),...t});