UNPKG

@progress/kendo-themes-html

Version:

A collection of HTML helpers used for developing Kendo UI themes

2 lines (1 loc) 12.5 kB
var Z=Object.create;var T=Object.defineProperty;var ee=Object.getOwnPropertyDescriptor;var te=Object.getOwnPropertyNames;var oe=Object.getPrototypeOf,re=Object.prototype.hasOwnProperty;var ie=(t,e)=>{for(var r in e)T(t,r,{get:e[r],enumerable:!0})},G=(t,e,r,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of te(e))!re.call(t,a)&&a!==r&&T(t,a,{get:()=>e[a],enumerable:!(s=ee(e,a))||s.enumerable});return t};var B=(t,e,r)=>(r=t!=null?Z(oe(t)):{},G(e||!t||!t.__esModule?T(r,"default",{value:t,enumerable:!0}):r,t)),ae=t=>G(T({},"__esModule",{value:!0}),t);var xe={};ie(xe,{PIVOTGRID_CLASSNAME:()=>$,PivotGrid:()=>h,default:()=>ke});module.exports=ae(xe);var l=(...t)=>t.filter(e=>e!==!0&&!!e).map(e=>Array.isArray(e)?l(...e):typeof e=="object"?Object.keys(e).map((r,s)=>e[s]||e[r]&&r||null).filter(r=>r!==null).join(" "):e).filter(e=>!!e).join(" ");var y=(t,e)=>l({[`${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"});var i={undefined:void 0,xsmall:"xsmall",small:"small",medium:"medium",large:"large",xlarge:"xlarge",xxlarge:"xxlarge",xxxlarge:"xxxlarge"};var u={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"};var A={};function V(t){return A[t]=(A[t]||0)+1,`k-${t}-${A[t]}`}var w=require("react/jsx-runtime"),L="k-font-icon",ne=[],se={size:[i.undefined,i.xsmall,i.small,i.medium,i.large,i.xlarge,i.xxlarge,i.xxxlarge],themeColor:[o.undefined,o.base,o.primary,o.secondary,o.tertiary,o.success,o.warning,o.error,o.info]},le={},N=t=>{let{size:e,themeColor:r,icon:s,rotate:a,flip:c,...p}=t;return s?(0,w.jsx)("span",{...p,className:l(t.className,L,y(L,{size:e}),{[`k-i-${s}`]:s,[`k-color-${r}`]:r,[`k-rotate-${a}`]:a,"k-flip-h":c==="h"||c==="both","k-flip-v":c==="v"||c==="both"}),"aria-hidden":"true"}):(0,w.jsx)(w.Fragment,{})};N.states=ne;N.options=se;N.className=L;N.defaultOptions=le;var q=N;var v=require("react/jsx-runtime"),z="k-svg-icon",de=[],ce={size:[i.undefined,i.xsmall,i.small,i.medium,i.large,i.xlarge,i.xxlarge,i.xxxlarge],themeColor:[o.undefined,o.base,o.primary,o.secondary,o.tertiary,o.success,o.warning,o.error,o.info],variant:[u.outline,u.solid,u.duotone]},P={viewBox:"0 0 24 24",variant:u.outline},C=t=>{var E,x;let{size:e,themeColor:r,rotate:s,flip:a,viewBox:c=P.viewBox,variant:p=P.variant,icon:n,...f}=t;if(!n)return(0,v.jsx)(v.Fragment,{});if(n==="none")return(0,v.jsx)("span",{...f,className:l(t.className,z,y("k-icon",{size:e}),"k-none"),"aria-hidden":"true"});let b=typeof n=="object"&&n.name&&n.name,k=typeof n=="object"?p&&((E=n.variants)==null?void 0:E[p])||((x=n.variants)==null?void 0:x.outline)||n.content:void 0;return(0,v.jsx)("span",{...f,className:l(t.className,z,y("k-icon",{size:e}),{[`k-svg-i-${b}`]:b,[`k-color-${r}`]:r,[`k-rotate-${s}`]:s,"k-flip-h":a==="h"||a==="both","k-flip-v":a==="v"||a==="both"}),"aria-hidden":"true",children:(0,v.jsx)("svg",{"aria-hidden":!0,focusable:!1,xmlns:"http://www.w3.org/2000/svg",viewBox:typeof n=="object"?n.viewBox:c,dangerouslySetInnerHTML:k!==void 0?{__html:k}:void 0,children:n?void 0:t.children})})};C.states=de;C.options=ce;C.className=z;C.defaultOptions=P;var _=C;var D=B(require("@progress/kendo-svg-icons"));var F="icon",U="icons";var J=require("react");var K=require("react"),j=(0,K.createContext)({iconsType:"svg"});var m=require("react/jsx-runtime"),M="k-icon",ue=t=>t.replace(/([-_][a-z0-9])/gi,e=>e.toUpperCase().replace("-","").replace("_","")),pe=[],me={size:[i.undefined,i.xsmall,i.small,i.medium,i.large,i.xlarge,i.xxlarge,i.xxxlarge],themeColor:[o.undefined,o.base,o.primary,o.secondary,o.tertiary,o.success,o.warning,o.error,o.info],variant:[u.outline,u.solid,u.duotone]},S={viewBox:"0 0 24 24",type:"svg",variant:u.outline},g=t=>{let{iconsType:e}=(0,J.useContext)(j),{size:r,themeColor:s,icon:a,type:c=e||S.type,rotate:p,flip:n,viewBox:f=S.viewBox,variant:b=S.variant,...k}=t;if(!a)return(0,m.jsx)(m.Fragment,{});if((e||c)==="svg"){if(a==="none")return(0,m.jsx)(_,{...k,className:l(t.className,M),icon:a,size:r,variant:b});let x=D[a]?a:ue(`${a}-icon`);return D[x]?(0,m.jsx)(_,{...k,className:l(t.className,M),icon:D[x],size:r,themeColor:s,rotate:p,flip:n,viewBox:f,variant:b}):(0,m.jsx)(m.Fragment,{})}return(0,m.jsx)(q,{...k,className:l(t.className,M),icon:a,size:r,themeColor:s,rotate:p,flip:n})};g.states=pe;g.options=me;g.defaultOptions=S;g.className=M;g.moduleName=F;g.folderName=U;g.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 I=require("react/jsx-runtime"),X="k-pivotgrid-configurator-button",ge=[],he={},ve={},O=t=>{let{...e}=t;return(0,I.jsx)("div",{...e,className:l(t.className,X),"aria-hidden":"true",children:(0,I.jsxs)("span",{children:["Change settings",(0,I.jsx)(g,{icon:"gear"})]})})};O.states=ge;O.options=he;O.className=X;O.defaultOptions=ve;var W=O;var Y=B(require("react"));var H="pivotgrid",Q=H;var d=require("react/jsx-runtime"),$="k-pivotgrid",fe=[],be={},R={emptyCell:(0,d.jsx)("div",{className:"k-pivotgrid-empty-cell",role:"none",children:(0,d.jsx)("table",{role:"none",children:(0,d.jsx)("thead",{role:"none",children:(0,d.jsx)("tr",{role:"none",children:(0,d.jsx)("th",{"aria-colspan":1,"aria-rowspan":1,id:V("pivotgrid-empty"),children:(0,d.jsx)("span",{className:"k-sr-only",children:"PivotGrid component. Use the arrow keys to navigate."})})})})})}),configuratorDisplay:"none",configuratorPosition:"right"},h=t=>{let{emptyCell:e=R.emptyCell,configuratorDisplay:r=R.configuratorDisplay,configuratorPosition:s=R.configuratorPosition,configurator:a,columnHeaders:c,rowHeaders:p,children:n,...f}=t;return(0,d.jsxs)("div",{className:{left:"k-d-flex k-flex-row-reverse k-pos-relative",bottom:"k-d-flex k-flex-col k-pos-relative",top:"k-d-flex k-flex-col-reverse k-pos-relative",right:"k-d-flex k-flex-row k-pos-relative"}[s],children:[(0,d.jsxs)("div",{...f,className:l(t.className,$),role:"grid",children:[e,(0,d.jsx)("div",{className:"k-pivotgrid-column-headers",role:"none",children:c}),(0,d.jsx)("div",{className:"k-pivotgrid-row-headers",role:"none",children:p}),(0,d.jsx)("div",{className:"k-pivotgrid-values",role:"none",children:n})]}),a&&r==="opened"&&a,a&&r==="closed"&&Y.default.cloneElement(a,{"aria-hidden":"true"}),r!=="none"&&(0,d.jsx)(W,{})]})};h.states=fe;h.options=be;h.className=$;h.defaultOptions=R;h.moduleName=H;h.folderName=Q;h.ariaSpec={selector:".k-pivotgrid",rules:[{selector:".k-pivotgrid",attribute:"role=grid",usage:"The role specifies the element is a Data Grid."},{selector:".k-pivotgrid-empty-cell th",attribute:"id",usage:"Sets a unique identifier for the cell to be referenced from the first column header row aria-owns attribute."},{selector:".k-pivotgrid-column-headers>.k-pivotgrid-table",attribute:"role=none",usage:"Negates the default semantic role of the <table> element."},{selector:".k-pivotgrid-column-headers>.k-pivotgrid-table>tbody",attribute:"role=rowgroup",usage:"Required as the owner <table> element has its semantic role removed."},{selector:".k-pivotgrid-column-headers>.k-pivotgrid-table>tbody>.k-pivotgrid-row",attribute:"role=row",usage:"Required as the owner <table> element has its semantic role removed."},{selector:".k-pivotgrid-column-headers>.k-pivotgrid-table>tbody>.k-pivotgrid-row:first-child",attribute:"aria-owns",usage:"Lists the IDs of the empty cell and all cells in the first column headers row to construct the a11y tree."},{selector:".k-pivotgrid-column-headers>.k-pivotgrid-table>tbody>.k-pivotgrid-row>th",attribute:"role=columnheader",usage:"Required as the owner <table> element has its semantic role removed."},{selector:".k-pivotgrid-column-headers>.k-pivotgrid-table>tbody>.k-pivotgrid-row>th",attribute:"aria-expanded (when expandable)",usage:"Indicates the current expanded state of the header."},{selector:".k-pivotgrid-column-headers>.k-pivotgrid-table>tbody>.k-pivotgrid-row>th",attribute:"id",usage:"Unique and deterministic identifier, used to associate the header cell with respective data cells."},{selector:'[class*="i-chevron-up"]',attribute:"aria-hidden=true",usage:"Excludes the collapse icon from the screen reader output."},{selector:'[class*="i-chevron-down"]',attribute:"aria-hidden=true",usage:"Excludes the expand icon from the screen reader output."},{selector:".k-pivotgrid-row-headers>.k-pivotgrid-table",attribute:"role=none",usage:"Negates the default semantic role of the <table> element."},{selector:".k-pivotgrid-row-headers>.k-pivotgrid-table>tbody",attribute:"role=rowgroup",usage:"Required as the owner <table> element has its semantic role removed."},{selector:".k-pivotgrid-row-headers>.k-pivotgrid-table>tbody>.k-pivotgrid-row",attribute:"role=row",usage:"Required as the owner <table> element has its semantic role removed."},{selector:".k-pivotgrid-row-headers>.k-pivotgrid-table>tbody>.k-pivotgrid-row",attribute:"aria-owns (when present)",usage:"Used to associate row header cells with the corresponding data cells."},{selector:".k-pivotgrid-row-headers>.k-pivotgrid-table>tbody>.k-pivotgrid-row>th",attribute:"role=rowheader",usage:"Required as the owner <table> element has its semantic role removed."},{selector:".k-pivotgrid-row-headers>.k-pivotgrid-table>tbody>.k-pivotgrid-row>th",attribute:"aria-expanded (when expandable)",usage:"Indicates the current expanded state of the header."},{selector:".k-pivotgrid-values>.k-pivotgrid-table",attribute:"role=none",usage:"Negates the default semantic role of the <table> element."},{selector:".k-pivotgrid-values>.k-pivotgrid-table>tbody",attribute:"role=none",usage:"The contained rows are associated with their headers through alternative mechanics."},{selector:".k-pivotgrid-values>.k-pivotgrid-table>tbody>.k-pivotgrid-row",attribute:"role=none",usage:"The rows are associated with their headers through alternative mechanics."},{selector:".k-pivotgrid-values>.k-pivotgrid-table>tbody>.k-pivotgrid-row>td",attribute:"role=gridcell",usage:"Required as the owner <table> element has its semantic role removed."},{selector:".k-pivotgrid-values>.k-pivotgrid-table>tbody>.k-pivotgrid-row>td",attribute:"id",usage:"Unique and deterministic identifier, used to associate the data cell with respective row header cells."},{selector:".k-pivotgrid-values>.k-pivotgrid-table>tbody>.k-pivotgrid-row>td",attribute:"aria-describedby (when present)",usage:"Used to associate the data cells with the respective column header cells."},{selector:".k-pivotgrid-configurator-button",attribute:"aria-hidden=true",usage:"Hide the element from assistive technologies."},{selector:".k-pivotgrid-configurator",attribute:"role=dialog",usage:"The role specifies the element is a dialog."},{selector:".k-pivotgrid-configurator",attribute:"aria-hidden (when closed)",usage:"Specifies whether the configurator is visible if it is still in the DOM when closed."},{selector:".k-pivotgrid-configurator",attribute:"aria-labelledby",usage:"Associates the configurator wrapper with its internal header element."},{selector:".k-pivotgrid-configurator-header-text",attribute:"id",usage:"Unique identifier used to associate the header text with elements that reference it as a label."},{selector:".k-pivotgrid-configurator-content .k-label",attribute:"id",usage:"Unique identifier used to associate the label text with elements that reference it as a label."},{selector:".k-pivotgrid-configurator-actions .k-button.k-disabled",attribute:"aria-disabled=true (when disabled)",usage:"Announces the non-interactive state of the configurator Cancel and Apply buttons."},{selector:".k-fields-list-wrapper .k-treeview",attribute:"aria-labelledby",usage:"Associates the fields chooser TreeView with the Fields section and Configurator header texts."},{selector:".k-pivotgrid-configurator-content .k-chip-list",attribute:"aria-labelledby",usage:"Associates the chip lists with their respective section label and Configurator header texts."}]};var ke=h;