UNPKG

@progress/kendo-themes-html

Version:

A collection of HTML helpers used for developing Kendo UI themes

2 lines (1 loc) 1.77 kB
var r=(...l)=>l.filter(e=>e!==!0&&!!e).map(e=>Array.isArray(e)?r(...e):typeof e=="object"?Object.keys(e).map((t,i)=>e[i]||e[t]&&t||null).filter(t=>t!==null).join(" "):e).filter(e=>!!e).join(" ");import{jsx as c}from"react/jsx-runtime";var u="k-list-ul",a=l=>{let{children:e,role:t,id:i,...n}=l;return c("ul",{...n,id:i,role:t,className:r(u,l.className),children:e})};a.ariaSpec={selector:".k-list-ul",rules:[{selector:'.k-list-ul[role="listbox"]',attribute:"role=listbox",usage:"For ungrouped lists, the UL has the listbox role."},{selector:'.k-list-ul[role="listbox"]',attribute:"aria-label or aria-labelledby (when has accessible name)",usage:"Accessible name for the listbox."},{selector:'.k-list-ul[role="group"]',attribute:"role=group",usage:"For grouped sublists under a group header."},{selector:'.k-list-ul[role="group"]',attribute:"aria-labelledby (when grouped)",usage:"References the group header ID."}]};import{jsx as o,jsxs as m}from"react/jsx-runtime";var b="k-list-content",g=l=>{let{virtualization:e,grouping:t,"aria-label":i,"aria-labelledby":n,listboxId:s,...d}=l;return m("div",{...d,className:r(b,l.className),role:t?"listbox":void 0,id:t?s:void 0,"aria-label":t?i:void 0,"aria-labelledby":t?n:void 0,children:[t?l.children:o(a,{role:"listbox",id:s,"aria-label":i,"aria-labelledby":n,children:l.children}),e&&o("div",{className:"k-height-container",children:o("div",{})})]})};g.ariaSpec={selector:".k-list-content",rules:[{selector:'.k-list-content[role="listbox"]',attribute:"role=listbox",usage:"For grouped lists, the list content container has the listbox role."},{selector:'.k-list-content[role="listbox"]',attribute:"aria-label or aria-labelledby (when has accessible name)",usage:"Accessible name for the listbox."}]};export{g as ListContent};