@progress/kendo-themes-html
Version:
A collection of HTML helpers used for developing Kendo UI themes
2 lines (1 loc) • 5.75 kB
JavaScript
var c=Object.defineProperty;var k=Object.getOwnPropertyDescriptor;var p=Object.getOwnPropertyNames;var f=Object.prototype.hasOwnProperty;var y=(t,e)=>{for(var o in e)c(t,o,{get:e[o],enumerable:!0})},x=(t,e,o,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of p(e))!f.call(t,r)&&r!==o&&c(t,r,{get:()=>e[r],enumerable:!(n=k(e,r))||n.enumerable});return t};var w=t=>x(c({},"__esModule",{value:!0}),t);var N={};y(N,{Scheduler:()=>l,default:()=>C});module.exports=w(N);var a=(...t)=>t.filter(e=>e!==!0&&!!e).map(e=>Array.isArray(e)?a(...e):typeof e=="object"?Object.keys(e).map((o,n)=>e[n]||e[o]&&o||null).filter(o=>o!==null).join(" "):e).filter(e=>!!e).join(" ");var i="scheduler",d=i;var b=require("react/jsx-runtime"),h="k-scheduler-layout",E=[],S={},M={},s=t=>{let{as:e="div",view:o,...n}=t,r=o==="agenda"?"grid":o==="year"?void 0:"none";return(0,b.jsx)(e,{...n,className:a(t.className,h,{[`k-scheduler-${o}view`]:o}),...r&&{role:r},children:t.children})};s.states=E;s.options=S;s.className=h;s.defaultOptions=M;s.moduleName=i;s.folderName=d;var m=s;var u=require("react/jsx-runtime"),g="k-scheduler",L=[],R={},A={},l=t=>{let{view:e,toolbar:o,footer:n,layout:r,...v}=t;return(0,u.jsxs)("div",{...v,className:a(t.className,g),role:"application",children:[o,(0,u.jsx)(m,{className:a({"k-scheduler-layout-flex":r==="flex"}),as:r==="table"?"table":"div",view:e,children:t.children}),n]})};l.states=L;l.options=R;l.className=g;l.defaultOptions=A;l.moduleName=i;l.folderName=d;l.ariaSpec={selector:".k-scheduler",rules:[{selector:".k-scheduler",attribute:"role=application",usage:"Specifies the role of the component."},{selector:".k-scheduler-toolbar",attribute:"role=toolbar",usage:"Follows Toolbar spec: sets the component role."},{selector:".k-scheduler-toolbar",attribute:"aria-label or title",usage:"Follows Toolbar spec: each toolbar must have a label specifying its purpose."},{selector:'.k-scheduler-navigation .k-button:has([class*="i-chevron-left"])',attribute:"aria-label",usage:"Required as the previous navigation button contains only an icon (no text)."},{selector:'.k-scheduler-navigation .k-button:has([class*="i-chevron-right"])',attribute:"aria-label",usage:"Required as the next navigation button contains only an icon (no text)."},{selector:".k-nav-current",attribute:"aria-live=polite",usage:"The new date of the Scheduler view will be announced upon navigation to a new time span or view type."},{selector:".k-views-dropdown",attribute:"aria-label",usage:"The <select> element visible on the toolbar on small screens must have its aria-label set."},{selector:".k-scheduler-views",attribute:"role=group",usage:"Follows SegmentedControl spec: sets the proper role for the group of view buttons."},{selector:".k-scheduler-views .k-segmented-control-button",attribute:"aria-pressed (when selected)",usage:"Follows SegmentedControl spec: specifies the current state of the view SegmentedControl. Only the selected button within the group will have this attribute set to true."},{selector:".k-scheduler-agendaview",attribute:"role=grid",usage:"The main table of the Agenda view must indicate it is a Data Grid."},{selector:".k-scheduler-agendaview>tbody",attribute:"role=none/presentation",usage:"The <tbody> element must have its semantics removed."},{selector:".k-scheduler-agendaview .k-scheduler-table",attribute:"role=none/presentation",usage:"Inner <table> elements within the Agenda Scheduler must have their semantic role removed."},{selector:".k-scheduler-agendaview .k-scheduler-table>tbody",attribute:"role=rowgroup",usage:"Must have role explicitly set as it has been removed by the <table> role set (none/presentation)."},{selector:".k-scheduler-agendaview .k-scheduler-table>tbody>tr",attribute:"role=row",usage:"Must have role explicitly set as it has been removed by the <table> role set (none/presentation)."},{selector:".k-scheduler-agendaview .k-scheduler-table>tbody>tr>th",attribute:"role=columnheader",usage:"Must have role explicitly set as it has been removed by the <table> role set (none/presentation)."},{selector:".k-scheduler-agendaview .k-scheduler-content tr .k-selected",attribute:"aria-selected",usage:"Used to signify the currently selected row in Agenda view."},{selector:".k-scheduler-content>.k-scheduler-table>tbody>tr>.k-scheduler-groupcolumn,.k-scheduler-content>.k-scheduler-table>tbody>tr>.k-scheduler-datecolumn",attribute:"role=rowheader",usage:"Must have role explicitly set as it has been removed by the <table> role set (none/presentation)."},{selector:".k-scheduler-content>.k-scheduler-table>tbody>tr>.k-scheduler-timecolumn,.k-scheduler-content>.k-scheduler-table>tbody>tr>.k-scheduler-timecolumn+td",attribute:"role=gridcell",usage:"Must have role explicitly set as it has been removed by the <table> role set (none/presentation)."},{selector:".k-scheduler-dayview,.k-scheduler-weekview,.k-scheduler-monthview,.k-scheduler-timelineview",attribute:"role=none/presentation",usage:"All <table> elements within the Scheduler must have their semantic role removed."},{selector:".k-scheduler-times .k-scheduler-table",attribute:"role=none/presentation",usage:"Times sidebar tables must have their semantics removed. The role propagates to child th/tr elements, resolving empty-table-header violations."},{selector:".k-event",attribute:"role=button",usage:"Indicating that the event element is interactive."},{selector:".k-event",attribute:"aria-label",usage:"Label containing the title, start, and end date of the appointment."},{selector:".k-scheduler-layout:not(.k-scheduler-agendaview) .k-scheduler-content",attribute:"tabindex=0",usage:"Scrollable elements need to be focusable to ensure scrolling with arrow keys is available (does not apply to agenda view)."}]};var C=l;