@progress/kendo-themes-html
Version:
A collection of HTML helpers used for developing Kendo UI themes
2 lines (1 loc) • 9.24 kB
JavaScript
var q=Object.create;var O=Object.defineProperty;var J=Object.getOwnPropertyDescriptor;var X=Object.getOwnPropertyNames;var Q=Object.getPrototypeOf,Y=Object.prototype.hasOwnProperty;var Z=(o,e)=>{for(var r in e)O(o,r,{get:e[r],enumerable:!0})},P=(o,e,r,l)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of X(e))!Y.call(o,a)&&a!==r&&O(o,a,{get:()=>e[a],enumerable:!(l=J(e,a))||l.enumerable});return o};var ee=(o,e,r)=>(r=o!=null?q(Q(o)):{},P(e||!o||!o.__esModule?O(r,"default",{value:o,enumerable:!0}):r,o)),oe=o=>P(O({},"__esModule",{value:!0}),o);var ue={};Z(ue,{ScrollViewNormal:()=>pe});module.exports=oe(ue);var c=(...o)=>o.filter(e=>e!==!0&&!!e).map(e=>Array.isArray(e)?c(...e):typeof e=="object"?Object.keys(e).map((r,l)=>e[l]||e[r]&&r||null).filter(r=>r!==null).join(" "):e).filter(e=>!!e).join(" ");var b=(o,e)=>c({[`${o}-xs`]:e.size==="xsmall",[`${o}-sm`]:e.size==="small",[`${o}-md`]:e.size==="medium",[`${o}-lg`]:e.size==="large",[`${o}-xl`]:e.size==="xlarge",[`${o}-xxl`]:e.size==="xxlarge",[`${o}-xxxl`]:e.size==="xxxlarge"},{[`${o}-${e.fillMode}`]:e.fillMode},{[`${o}-${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"});var s={undefined:void 0,xsmall:"xsmall",small:"small",medium:"medium",large:"large",xlarge:"xlarge",xxlarge:"xxlarge",xxxlarge:"xxxlarge"};var d={undefined:void 0,outline:"outline",solid:"solid",duotone:"duotone"},n={undefined:void 0,inherit:"inherit",base:"base",primary:"primary",secondary:"secondary",tertiary:"tertiary",info:"info",success:"success",warning:"warning",error:"error",inverse:"inverse"};var C=require("react/jsx-runtime"),z="k-font-icon",te=[],ne={size:[s.undefined,s.xsmall,s.small,s.medium,s.large,s.xlarge,s.xxlarge,s.xxxlarge],themeColor:[n.undefined,n.base,n.primary,n.secondary,n.tertiary,n.success,n.warning,n.error,n.info]},se={},S=o=>{let{size:e,themeColor:r,icon:l,rotate:a,flip:m,...u}=o;return l?(0,C.jsx)("span",{...u,className:c(o.className,z,b(z,{size:e}),{[`k-i-${l}`]:l,[`k-color-${r}`]:r,[`k-rotate-${a}`]:a,"k-flip-h":m==="h"||m==="both","k-flip-v":m==="v"||m==="both"}),"aria-hidden":"true"}):(0,C.jsx)(C.Fragment,{})};S.states=te;S.options=ne;S.className=z;S.defaultOptions=se;var B=S;var w=require("react/jsx-runtime"),A="k-svg-icon",re=[],ae={size:[s.undefined,s.xsmall,s.small,s.medium,s.large,s.xlarge,s.xxlarge,s.xxxlarge],themeColor:[n.undefined,n.base,n.primary,n.secondary,n.tertiary,n.success,n.warning,n.error,n.info],variant:[d.outline,d.solid,d.duotone]},_={viewBox:"0 0 24 24",variant:d.outline},I=o=>{var N,f;let{size:e,themeColor:r,rotate:l,flip:a,viewBox:m=_.viewBox,variant:u=_.variant,icon:i,...y}=o;if(!i)return(0,w.jsx)(w.Fragment,{});if(i==="none")return(0,w.jsx)("span",{...y,className:c(o.className,A,b("k-icon",{size:e}),"k-none"),"aria-hidden":"true"});let k=typeof i=="object"&&i.name&&i.name,x=typeof i=="object"?u&&((N=i.variants)==null?void 0:N[u])||((f=i.variants)==null?void 0:f.outline)||i.content:void 0;return(0,w.jsx)("span",{...y,className:c(o.className,A,b("k-icon",{size:e}),{[`k-svg-i-${k}`]:k,[`k-color-${r}`]:r,[`k-rotate-${l}`]:l,"k-flip-h":a==="h"||a==="both","k-flip-v":a==="v"||a==="both"}),"aria-hidden":"true",children:(0,w.jsx)("svg",{"aria-hidden":!0,focusable:!1,xmlns:"http://www.w3.org/2000/svg",viewBox:typeof i=="object"?i.viewBox:m,dangerouslySetInnerHTML:x!==void 0?{__html:x}:void 0,children:i?void 0:o.children})})};I.states=re;I.options=ae;I.className=A;I.defaultOptions=_;var T=I;var V=ee(require("@progress/kendo-svg-icons"));var H="icon",F="icons";var G=require("react");var D=require("react"),K=(0,D.createContext)({iconsType:"svg"});var v=require("react/jsx-runtime"),E="k-icon",ie=o=>o.replace(/([-_][a-z0-9])/gi,e=>e.toUpperCase().replace("-","").replace("_","")),le=[],ce={size:[s.undefined,s.xsmall,s.small,s.medium,s.large,s.xlarge,s.xxlarge,s.xxxlarge],themeColor:[n.undefined,n.base,n.primary,n.secondary,n.tertiary,n.success,n.warning,n.error,n.info],variant:[d.outline,d.solid,d.duotone]},L={viewBox:"0 0 24 24",type:"svg",variant:d.outline},p=o=>{let{iconsType:e}=(0,G.useContext)(K),{size:r,themeColor:l,icon:a,type:m=e||L.type,rotate:u,flip:i,viewBox:y=L.viewBox,variant:k=L.variant,...x}=o;if(!a)return(0,v.jsx)(v.Fragment,{});if((e||m)==="svg"){if(a==="none")return(0,v.jsx)(T,{...x,className:c(o.className,E),icon:a,size:r,variant:k});let f=V[a]?a:ie(`${a}-icon`);return V[f]?(0,v.jsx)(T,{...x,className:c(o.className,E),icon:V[f],size:r,themeColor:l,rotate:u,flip:i,viewBox:y,variant:k}):(0,v.jsx)(v.Fragment,{})}return(0,v.jsx)(B,{...x,className:c(o.className,E),icon:a,size:r,themeColor:l,rotate:u,flip:i})};p.states=le;p.options=ce;p.defaultOptions=L;p.className=E;p.moduleName=H;p.folderName=F;p.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 $="scrollview",W=$;var t=require("react/jsx-runtime"),R="k-scrollview",me=[],de={},g={mode:"normal",views:9,currentView:5,animate:!0,arrows:!0,pager:!0,rtl:!1},h=o=>{let{mode:e=g.mode,views:r=g.views,currentView:l=g.currentView,animate:a=g.animate,arrows:m=g.arrows,pager:u=g.pager,rtl:i=g.rtl,...y}=o,k=[],x=i?"chevron-right":"chevron-left",N=i?"chevron-left":"chevron-right",f="scrollview-wrap";for(let M=0;M<r;M++)k.push((0,t.jsx)("div",{className:"k-scrollview-view",role:"listitem","aria-roledescription":"slide"},M));return(0,t.jsxs)("div",{...y,className:c(R,o.className,{[`${R}-${e}`]:e!=="normal","k-rtl":i}),role:"application","aria-roledescription":"carousel",tabIndex:0,children:[(0,t.jsx)("div",{className:c("k-scrollview-wrap",{"k-scrollview-animate":a}),id:f,role:"list",style:{"--kendo-scrollview-views":r,"--kendo-scrollview-current":l},children:k}),(0,t.jsxs)("div",{className:"k-scrollview-elements",children:[m&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"k-scrollview-prev",role:"button","aria-label":"Previous","aria-controls":f,children:(0,t.jsx)(p,{icon:x,size:"xxxlarge"})}),(0,t.jsx)("span",{className:"k-scrollview-next",role:"button","aria-label":"Next","aria-controls":f,children:(0,t.jsx)(p,{icon:N,size:"xxxlarge"})})]}),u&&(0,t.jsx)("div",{className:"k-scrollview-nav-wrap",children:(0,t.jsxs)("div",{className:"k-scrollview-nav",children:[e==="light"&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"k-link"}),(0,t.jsx)("span",{className:"k-link k-primary"}),(0,t.jsx)("span",{className:"k-link k-primary k-focus"}),(0,t.jsx)("span",{className:"k-link k-focus"}),(0,t.jsx)("span",{className:"k-link"})]}),e==="normal"&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"k-link",style:{transform:"scale(0.5)"}}),(0,t.jsx)("span",{className:"k-link",style:{transform:"scale(0.65)"}}),(0,t.jsx)("span",{className:"k-link",style:{transform:"scale(0.8)"}}),(0,t.jsx)("span",{className:"k-link"}),(0,t.jsx)("span",{className:"k-link k-primary"}),(0,t.jsx)("span",{className:"k-link"}),(0,t.jsx)("span",{className:"k-link",style:{transform:"scale(0.8)"}}),(0,t.jsx)("span",{className:"k-link",style:{transform:"scale(0.65)"}}),(0,t.jsx)("span",{className:"k-link",style:{transform:"scale(0.5)"}})]}),e==="dark"&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"k-link",style:{transform:"scale(0.5)"}}),(0,t.jsx)("span",{className:"k-link",style:{transform:"scale(0.65)"}}),(0,t.jsx)("span",{className:"k-link"}),(0,t.jsx)("span",{className:"k-link k-primary"}),(0,t.jsx)("span",{className:"k-link"}),(0,t.jsx)("span",{className:"k-link",style:{transform:"scale(0.65)"}}),(0,t.jsx)("span",{className:"k-link",style:{transform:"scale(0.5)"}})]})]})})]}),(0,t.jsx)("div",{className:"k-sr-only","aria-live":"polite"})]})};h.states=me;h.options=de;h.className=R;h.defaultOptions=g;h.moduleName=$;h.folderName=W;h.ariaSpec={selector:".k-scrollview",rules:[{selector:".k-scrollview",attribute:"role=application",usage:"Specifies the role of the Carousel element."},{selector:".k-scrollview",attribute:"aria-roledescription=carousel",usage:"Clarifies the role of the Carousel element."},{selector:".k-scrollview",attribute:"tabindex=0",usage:"Carousel element must be focusable."},{selector:".k-scrollview-wrap",attribute:"role=list",usage:"Clarifies the scrollview wrap as a list of items (images)."},{selector:".k-scrollview-wrap>*",attribute:"role=listitem",usage:"Specifies the role of each Carousel item."},{selector:".k-scrollview-wrap>*",attribute:"aria-roledescription=slide",usage:"Clarifies the role of the Carousel item."},{selector:".k-scrollview-prev,.k-scrollview-next",attribute:"role=button",usage:"Specifies the role of the Previous/Next button."},{selector:".k-scrollview-prev,.k-scrollview-next",attribute:"aria-label",usage:"Specifies label for the Previous/Next button."},{selector:".k-scrollview-prev,.k-scrollview-next",attribute:"aria-controls",usage:"Points to the id of the items container element."},{selector:".k-scrollview>.k-sr-only",attribute:"aria-live=polite",usage:"Identifies a hidden element as a live region in the polite state."}]};var U=h;var j=require("react/jsx-runtime"),pe=o=>(0,j.jsx)(U,{...o});