UNPKG

@progress/kendo-themes-html

Version:

A collection of HTML helpers used for developing Kendo UI themes

2 lines (1 loc) 34.7 kB
var s=(...t)=>t.filter(a=>a!==!0&&!!a).map(a=>Array.isArray(a)?s(...a):typeof a=="object"?Object.keys(a).map((l,r)=>a[r]||a[l]&&l||null).filter(l=>l!==null).join(" "):a).filter(a=>!!a).join(" ");var K=(t,a)=>s({[`${t}-xs`]:a.size==="xsmall",[`${t}-sm`]:a.size==="small",[`${t}-md`]:a.size==="medium",[`${t}-lg`]:a.size==="large",[`${t}-xl`]:a.size==="xlarge",[`${t}-xxl`]:a.size==="xxlarge",[`${t}-xxxl`]:a.size==="xxxlarge"},{[`${t}-${a.fillMode}`]:a.fillMode},{[`${t}-${a.themeColor}`]:a.themeColor},{"k-rounded-sm":a.rounded==="small","k-rounded-md":a.rounded==="medium","k-rounded-lg":a.rounded==="large","k-rounded-full":a.rounded==="full","k-rounded-none":a.rounded==="none"}),ge=(t,a)=>{let{valid:l,invalid:r,hover:i,focus:m,checked:u,active:p,selected:w,disabled:f,indeterminate:g,loading:L,empty:M,readonly:X,highlighted:ie,...W}=a;return s({"k-valid":l,"k-invalid":r,"k-hover":i,"k-focus":m,"k-checked":u,"k-active":p,"k-selected":w,"k-disabled":f,"k-indeterminate":g&&!u,"k-loading":L,"k-empty":M,"k-readonly":X,"k-highlighted":ie},Object.keys(W).reduce((E,z)=>(z.startsWith("k-")?E[z]=W[z]:E[`k-${z}`]=W[z],E),{}))};function je(t,a){if(!a)return{};let l=Array.isArray(a)?a:[a];return Object.fromEntries(l.map(r=>[`k-${r}`,!0]))}var n={undefined:void 0,xsmall:"xsmall",small:"small",medium:"medium",large:"large",xlarge:"xlarge",xxlarge:"xxlarge",xxxlarge:"xxxlarge"},J={undefined:void 0,none:"none",small:"small",medium:"medium",large:"large",full:"full"},G={undefined:void 0,solid:"solid",flat:"flat",outline:"outline",clear:"clear",link:"link"},_={undefined:void 0,outline:"outline",solid:"solid",duotone:"duotone"},C={undefined:void 0,inherit:"inherit",base:"base",primary:"primary",secondary:"secondary",tertiary:"tertiary",info:"info",success:"success",warning:"warning",error:"error",inverse:"inverse"},I={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 He={};function Q(t){return He[t]=(He[t]||0)+1,`k-${t}-${He[t]}`}import{jsx as Pa}from"react/jsx-runtime";var ea="k-calendar-view",_e={orientation:"horizontal",calendarView:"month"},Ne=t=>{let{orientation:a=_e.orientation,calendarView:l=_e.calendarView,gridRole:r,ariaLabelledBy:i,...m}=t;return Pa("div",{...m,className:s(t.className,ea,`k-calendar-${l}view`,"k-align-items-start","k-justify-content-center",{"k-hstack":a==="horizontal","k-vstack":a==="vertical"}),...r?{role:"grid","aria-labelledby":i,tabIndex:0}:{},children:t.children})};Ne.className=ea;Ne.defaultOptions=_e;import{Fragment as Ja,jsx as aa}from"react/jsx-runtime";var Ve="k-font-icon",Wa=[],Ua={size:[n.undefined,n.xsmall,n.small,n.medium,n.large,n.xlarge,n.xxlarge,n.xxxlarge],themeColor:[C.undefined,C.base,C.primary,C.secondary,C.tertiary,C.success,C.warning,C.error,C.info]},$a={},Ce=t=>{let{size:a,themeColor:l,icon:r,rotate:i,flip:m,...u}=t;return r?aa("span",{...u,className:s(t.className,Ve,K(Ve,{size:a}),{[`k-i-${r}`]:r,[`k-color-${l}`]:l,[`k-rotate-${i}`]:i,"k-flip-h":m==="h"||m==="both","k-flip-v":m==="v"||m==="both"}),"aria-hidden":"true"}):aa(Ja,{})};Ce.states=Wa;Ce.options=Ua;Ce.className=Ve;Ce.defaultOptions=$a;var ta=Ce;import{Fragment as qa,jsx as ve}from"react/jsx-runtime";var Be="k-svg-icon",Ga=[],Ya={size:[n.undefined,n.xsmall,n.small,n.medium,n.large,n.xlarge,n.xxlarge,n.xxxlarge],themeColor:[C.undefined,C.base,C.primary,C.secondary,C.tertiary,C.success,C.warning,C.error,C.info],variant:[_.outline,_.solid,_.duotone]},Fe={viewBox:"0 0 24 24",variant:_.outline},me=t=>{let{size:a,themeColor:l,rotate:r,flip:i,viewBox:m=Fe.viewBox,variant:u=Fe.variant,icon:p,...w}=t;if(!p)return ve(qa,{});if(p==="none")return ve("span",{...w,className:s(t.className,Be,K("k-icon",{size:a}),"k-none"),"aria-hidden":"true"});let f=typeof p=="object"&&p.name&&p.name,g=typeof p=="object"?u&&p.variants?.[u]||p.variants?.outline||p.content:void 0;return ve("span",{...w,className:s(t.className,Be,K("k-icon",{size:a}),{[`k-svg-i-${f}`]:f,[`k-color-${l}`]:l,[`k-rotate-${r}`]:r,"k-flip-h":i==="h"||i==="both","k-flip-v":i==="v"||i==="both"}),"aria-hidden":"true",children:ve("svg",{"aria-hidden":!0,focusable:!1,xmlns:"http://www.w3.org/2000/svg",viewBox:typeof p=="object"?p.viewBox:m,dangerouslySetInnerHTML:g!==void 0?{__html:g}:void 0,children:p?void 0:t.children})})};me.states=Ga;me.options=Ya;me.className=Be;me.defaultOptions=Fe;var Pe=me;import*as We from"@progress/kendo-svg-icons";var la="icon",na="icons";import{useContext as Qa}from"react";import{createContext as Xa}from"react";var oa=Xa({iconsType:"svg"});import{Fragment as ra,jsx as pe}from"react/jsx-runtime";var Ae="k-icon",Za=t=>t.replace(/([-_][a-z0-9])/gi,a=>a.toUpperCase().replace("-","").replace("_","")),ja=[],et={size:[n.undefined,n.xsmall,n.small,n.medium,n.large,n.xlarge,n.xxlarge,n.xxxlarge],themeColor:[C.undefined,C.base,C.primary,C.secondary,C.tertiary,C.success,C.warning,C.error,C.info],variant:[_.outline,_.solid,_.duotone]},Re={viewBox:"0 0 24 24",type:"svg",variant:_.outline},V=t=>{let{iconsType:a}=Qa(oa),{size:l,themeColor:r,icon:i,type:m=a||Re.type,rotate:u,flip:p,viewBox:w=Re.viewBox,variant:f=Re.variant,...g}=t;if(!i)return pe(ra,{});if((a||m)==="svg"){if(i==="none")return pe(Pe,{...g,className:s(t.className,Ae),icon:i,size:l,variant:f});let M=We[i]?i:Za(`${i}-icon`);return We[M]?pe(Pe,{...g,className:s(t.className,Ae),icon:We[M],size:l,themeColor:r,rotate:u,flip:p,viewBox:w,variant:f}):pe(ra,{})}return pe(ta,{...g,className:s(t.className,Ae),icon:i,size:l,themeColor:r,rotate:u,flip:p})};V.states=ja;V.options=et;V.defaultOptions=Re;V.className=Ae;V.moduleName=la;V.folderName=na;V.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 Ue="button",da=Ue;import{Fragment as ia,jsx as Z,jsxs as sa}from"react/jsx-runtime";var ue="k-button",at=["icon-button"],tt=[I.hover,I.focus,I.active,I.selected,I.disabled,I.generating],lt={size:[n.undefined,n.xsmall,n.small,n.medium,n.large],rounded:[J.undefined,J.none,J.small,J.medium,J.large,J.full],fillMode:[G.undefined,G.solid,G.flat,G.outline,G.clear,G.link],themeColor:[C.undefined,C.base,C.primary,C.secondary,C.tertiary,C.success,C.warning,C.error,C.info,C.inverse]},$e={showArrow:!1,arrowIconName:"chevron-down"},k=t=>{let{as:a="button",size:l,rounded:r,fillMode:i,themeColor:m,showArrow:u=$e.showArrow,arrowIconName:p=$e.arrowIconName,variant:w,hover:f,focus:g,active:L,selected:M,disabled:X,togglable:ie,ariaDisabled:W,icon:E,iconSize:z,text:se,iconClassName:he,className:ce,...Ke}=t,Te=E!=null,Fa=t.children!==void 0;return sa(a,{className:s(ce,ue,je(ue,w),K(ue,{size:l,rounded:r,fillMode:i,themeColor:m}),ge(ue,{hover:f,focus:g,active:L,disabled:X||W,selected:M}),{"k-icon-button":!se&&!Fa&&Te}),"aria-pressed":ie?M?"true":"false":void 0,...Ke,"aria-disabled":W?"true":void 0,disabled:X||void 0,children:[typeof E=="string"&&E&&Z(V,{className:s(he,"k-button-icon"),icon:E,size:z}),E&&typeof E!="string"&&Z(ia,{children:E}),se?sa(ia,{children:[se&&Z("span",{className:"k-button-text",children:se}),t.children]}):t.children&&Z("span",{className:"k-button-text",children:t.children}),u&&Z("span",{className:"k-menu-button-arrow k-button-arrow",children:Z(V,{icon:p})})]})};k.states=tt;k.options=lt;k.variants=at;k.className=ue;k.defaultOptions=$e;k.moduleName=Ue;k.folderName=da;k.ariaSpec={selector:".k-button",rules:[{selector:".k-button",attribute:"role=button or nodeName=button",usage:"The button role is implicit from the native <button> element."},{selector:".k-button",attribute:"aria-label (when icon-only)",usage:"Required for icon-only buttons that have no visible text."},{selector:".k-button",attribute:"aria-pressed (when togglable)",usage:"Indicates the pressed state of a toggle button."},{selector:".k-button",attribute:"disabled (when disabled)",usage:"Rendered when the button is disabled."}]};import{jsx as nt}from"react/jsx-runtime";var ca=t=>nt(k,{icon:"folder",...t,"aria-label":t["aria-label"]||"Folder",children:void 0});import{jsx as ot}from"react/jsx-runtime";var Ca=t=>ot(k,{icon:"folder",children:"Button",...t});import{jsx as rt}from"react/jsx-runtime";var ma=t=>rt(k,{children:"Button",...t});import{jsx as Je}from"react/jsx-runtime";var dt=k.options,it=k.states,st={...k.defaultOptions,variant:"text"},ct=[{name:"icon-only",title:"Icon Only"},{name:"icon-and-text",title:"Icon & Text"},{name:"text",title:"Text"}],Ct=[],j=t=>{let{variant:a,...l}=t;switch(a){case"icon-only":return Je(ca,{...l,icon:"star"});case"icon-and-text":return Je(Ca,{...l,icon:"star",children:"Button"});default:return Je(ma,{...l,children:"Button"})}};j.options=dt;j.states=it;j.variants=ct;j.defaultOptions=st;j.modifiers=Ct;j.className=k.className;import{jsx as xe,jsxs as pa}from"react/jsx-runtime";var ua="k-calendar-header",mt={size:[n.undefined,n.small,n.medium,n.large]},be={calendarTitleText:"October 2021",showToday:!0,showNavigationButtons:!0,orientation:"horizontal"},Y=t=>{let{calendarTitleText:a=be.calendarTitleText,showToday:l=be.showToday,showNavigationButtons:r=be.showNavigationButtons,orientation:i=be.orientation,size:m,calendarView:u,dir:p,titleId:w,...f}=t,g=p==="rtl"?"chevron-right":"chevron-left",L=p==="rtl"?"chevron-left":"chevron-right",M=w||Q("calendar-title");return pa("div",{...f,className:s(t.className,ua,{"k-vstack":i==="vertical"}),children:[xe(k,{disabled:u==="century",className:"k-calendar-title",text:a,size:m,fillMode:"flat",themeColor:"primary",id:M,tabIndex:-1,"aria-label":`Navigate to parent view: ${a}`,...u==="century"?{"aria-disabled":"true"}:{}}),xe("span",{className:"k-spacer"}),pa("span",{className:"k-calendar-nav",children:[r&&xe(k,{className:"k-calendar-nav-prev",icon:g,size:m,fillMode:"flat",tabIndex:-1,"aria-label":"Navigate to previous view"}),l&&xe(k,{size:m,fillMode:"flat",className:"k-calendar-nav-today",tabIndex:-1,children:"Today"}),r&&xe(k,{className:"k-calendar-nav-next",icon:L,size:m,fillMode:"flat",tabIndex:-1,"aria-label":"Navigate to next view"})]})]})};Y.options=mt;Y.className=ua;Y.defaultOptions=be;import{jsx as xa}from"react/jsx-runtime";var ba="k-calendar-footer",pt={size:[n.undefined,n.small,n.medium,n.large]},fa={calendarFooterText:"Tuesday, October 12, 2021"},fe=t=>{let{size:a,calendarFooterText:l=fa.calendarFooterText,...r}=t;return xa("div",{...r,className:s(t.className,ba),children:xa(k,{size:a,fillMode:"flat",themeColor:"primary",className:"k-calendar-nav-today",children:l})})};fe.options=pt;fe.className=ba;fe.defaultOptions=fa;var v="calendar",A=v;import{jsx as Ge,jsxs as bt}from"react/jsx-runtime";var Ye="k-calendar",ut=[],xt={size:[n.undefined,n.small,n.medium,n.large]},we={showCalendarHeader:!0,orientation:"horizontal",calendarView:"month",calendarTitleText:"October 2021"},y=t=>{let{size:a,orientation:l=we.orientation,calendarView:r=we.calendarView,calendarTitleText:i=we.calendarTitleText,showCalendarHeader:m=we.showCalendarHeader,showWeek:u,showCalendarFooter:p,calendarFooterText:w,dir:f,...g}=t,L=Q("calendar-title");return bt("div",{...g,dir:f,className:s(t.className,Ye,K(Ye,{size:a}),{"k-week-number":u}),children:[m&&Ge(Y,{calendarView:r,showToday:!p,calendarTitleText:i,orientation:l,size:a,dir:f,titleId:L}),Ge(Ne,{calendarView:r,orientation:l,gridRole:!0,ariaLabelledBy:L,children:t.children}),p&&Ge(fe,{calendarFooterText:w,size:a})]})};y.states=ut;y.options=xt;y.className=Ye;y.defaultOptions=we;y.moduleName=v;y.folderName=A;y.ariaSpec={selector:".k-calendar:not(.k-calendar-infinite):not(.k-calendar-range)",rules:[{selector:".k-calendar:not(.k-calendar-infinite):not(.k-calendar-range) .k-calendar-view",attribute:"role=grid",usage:"Specifies the role of the Calendar view container."},{selector:".k-calendar:not(.k-calendar-infinite):not(.k-calendar-range) .k-calendar-view",attribute:"aria-labelledby",usage:"Pointing to the current view label (e.g. March 2022 or 2020-2029)."},{selector:".k-calendar:not(.k-calendar-infinite):not(.k-calendar-range) .k-calendar-view",attribute:"tabindex=0",usage:"Makes the grid focusable."},{selector:".k-calendar:not(.k-calendar-infinite):not(.k-calendar-range) .k-calendar-table",attribute:"role=none",usage:"Inner table has role removed \u2014 content belongs to the grid on the view."},{selector:".k-calendar-thead",attribute:"role=rowgroup",usage:"Groups header rows."},{selector:".k-calendar-tbody",attribute:"role=rowgroup",usage:"Groups body rows."},{selector:".k-calendar-tr",attribute:"role=row",usage:"Each row in the calendar table."},{selector:".k-calendar-thead .k-calendar-th",attribute:"role=columnheader",usage:"Column header for day names."},{selector:".k-calendar-thead .k-calendar-th",attribute:"scope=col",usage:"Specifies the header applies to a column."},{selector:".k-calendar-thead .k-calendar-th",attribute:"aria-label",usage:"Full name of the day of the week."},{selector:".k-calendar-td:not(.k-alt):not(.k-empty)",attribute:"role=gridcell",usage:"Date cells in the calendar body."},{selector:".k-calendar-td.k-selected",attribute:"aria-selected=true",usage:"Indicates the selected date."},{selector:".k-calendar-td.k-disabled",attribute:"aria-disabled=true",usage:"Indicates a disabled date."},{selector:".k-calendar-nav-next,.k-calendar-nav-prev",attribute:"tabindex=-1",usage:"Navigation buttons are not focusable."},{selector:".k-calendar-nav-next,.k-calendar-nav-prev",attribute:"aria-label",usage:"Describes the navigation button purpose."},{selector:".k-calendar-title",attribute:"tabindex=-1",usage:"Title button is not focusable."},{selector:".k-calendar-title",attribute:"aria-label",usage:"Describes the title button purpose."},{selector:".k-calendar-nav-today",attribute:"tabindex=-1",usage:"Today link/button is not focusable."}]};import{jsx as yt}from"react/jsx-runtime";var wa="k-calendar-container",ft=[],wt={},kt={},ee=t=>{let{...a}=t;return yt("div",{...a,className:s(t.className,wa),children:t.children})};ee.states=ft;ee.options=wt;ee.className=wa;ee.defaultOptions=kt;ee.moduleName=v;ee.folderName=A;import{Fragment as Tt,jsx as ae,jsxs as gt}from"react/jsx-runtime";var ht=[I.hover,I.focus,I.active,I.selected,I.disabled],e=t=>{let{text:a,headerCell:l,today:r,weekend:i,showOtherMonth:m,weekCell:u,rangeStart:p,rangeMid:w,rangeEnd:f,dayIndicator:g,empty:L,hover:M,focus:X,active:ie,selected:W,disabled:E,...z}=t,he=`k-calendar-${l?"th":"td"}`,ce=[t.className,he,ge(he,{hover:M,focus:X,active:ie,selected:W,disabled:E}),{"k-today":r,"k-weekend":i,"k-other-month":m,"k-alt":u,"k-range-start":p,"k-range-mid":w,"k-range-end":f,"k-empty":L}],Ke={Su:"Sunday",Mo:"Monday",Tu:"Tuesday",We:"Wednesday",Th:"Thursday",Fr:"Friday",Sa:"Saturday",W:"Week number"};if(l){let Te=a?Ke[a]||a:void 0;return ae("th",{...z,className:s(ce),role:"columnheader",scope:"col","aria-label":Te,children:u?ae("span",{className:"k-sr-only",children:Te}):a})}return u?ae("td",{...z,className:s(ce),children:a}):ae("td",{...z,className:s(ce),role:"gridcell",...W?{"aria-selected":"true"}:{},...E?{"aria-disabled":"true"}:{},children:L&&!m?ae(Tt,{children:"\xA0"}):gt("span",{className:"k-link",children:[a,g&&ae("span",{className:"k-day-indicator"})]})})};e.states=ht;import{jsx as qe,jsxs as Nt}from"react/jsx-runtime";var ka="k-calendar-thead",ya={cellsText:["Su","Mo","Tu","We","Th","Fr","Sa"]},te=t=>{let{showWeek:a,cellsText:l=ya.cellsText,...r}=t;return qe("thead",{...r,className:s(t.className,ka),role:"rowgroup",children:Nt("tr",{className:"k-calendar-tr",role:"row",children:[a&&qe(e,{weekCell:!0,headerCell:!0,text:"W"}),l.map((i,m)=>qe(e,{text:i,headerCell:!0},m))]})})};te.className=ka;te.defaultOptions=ya;import{jsx as vt}from"react/jsx-runtime";var ha="k-calendar-tbody",N=t=>{let{...a}=t;return vt("tbody",{...a,className:s(t.className,ha),role:"rowgroup",children:t.children})};N.className=ha;N.moduleName=v;N.folderName=A;import{jsx as Xe,jsxs as Rt}from"react/jsx-runtime";var At="k-calendar-table",B=t=>{let{calendarCaption:a,showTableHead:l,showWeek:r,ariaLabelledBy:i,ariaActiveDescendant:m,gridRole:u,...p}=t;return Rt("table",{...p,className:s(t.className,At),...u?{role:"grid","aria-labelledby":i,"aria-activedescendant":m,tabIndex:0}:{role:"none"},children:[a&&Xe("caption",{className:"k-calendar-caption",children:a}),l&&Xe(te,{showWeek:r}),Xe(N,{children:t.children})]})};import{jsx as Qe,jsxs as Ta}from"react/jsx-runtime";var ga="k-calendar-navigation",ke=t=>Ta("div",{...t,className:s(t.className,ga),children:[Qe("span",{className:"k-calendar-navigation-highlight"}),Ta("div",{className:"k-content k-scrollable",children:[Qe("ul",{className:"k-reset",children:t.children}),Qe("div",{className:"k-scrollable-placeholder",style:{height:"1000px"}})]})]});ke.className=ga;ke.moduleName=v;ke.folderName=A;import{jsx as Lt}from"react/jsx-runtime";var Et="k-calendar-table",Ze=t=>{let{tableRole:a="none",ariaLabelledBy:l,...r}=t;return Lt("table",{...r,className:s(t.className,Et),role:a,...l?{"aria-labelledby":l}:{},...a==="grid"?{tabIndex:0}:{},children:t.children})};import{jsx as H,jsxs as Ee}from"react/jsx-runtime";var Na="k-calendar-view",le={orientation:"vertical",calendarView:"month",headerText:"April 2018",showWeekdays:!0,showNavigationButtons:!1},ne=t=>{let{orientation:a=le.orientation,calendarView:l=le.calendarView,headerText:r=le.headerText,showWeekdays:i=le.showWeekdays,showNavigationButtons:m=le.showNavigationButtons,showWeekNumbers:u,weekdayCellsText:p,gridLabelledBy:w,...f}=t;return Ee("div",{...f,className:s(Na,`k-calendar-${l}view`,t.className,{"k-hstack":a==="horizontal","k-vstack":a==="vertical"}),children:[H(Y,{showNavigationButtons:m,calendarTitleText:r,orientation:"horizontal"}),i&&Ee(Ze,{className:"k-calendar-weekdays",tableRole:"table",children:[Ee("colgroup",{children:[H("col",{}),H("col",{}),H("col",{}),H("col",{}),H("col",{}),H("col",{}),H("col",{})]}),H(te,{cellsText:p,showWeek:u})]}),Ee("div",{className:"k-content k-scrollable",role:"none",children:[H(Ze,{tableRole:"grid",ariaLabelledBy:w,children:t.children}),H("div",{className:"k-scrollable-placeholder",style:{height:"1000px"}})]})]})};ne.className=Na;ne.defaultOptions=le;ne.moduleName=v;ne.folderName=A;import{jsx as Le,jsxs as Ot}from"react/jsx-runtime";var va="k-calendar-infinite",Mt={size:[n.undefined,n.small,n.medium,n.large]},It=["Aug","Sep","Oct","Nov","Dec","2021","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","2022","Feb","Mar","Apr","May","Jun","Jul"],St={2021:"marker",2022:"marker"},Dt=(t,a)=>t.map((l,r)=>Le("li",{children:Le("span",{className:a[l]==="marker"?"k-calendar-navigation-marker":void 0,children:l})},r)),ye={showNavigation:!0,calendarView:"month",navigationItems:It,navigationMarkerConfig:St},h=t=>{let{size:a,showNavigation:l=ye.showNavigation,calendarView:r=ye.calendarView,navigationItems:i=ye.navigationItems,navigationMarkerConfig:m=ye.navigationMarkerConfig,calendarTitleText:u,showWeekdays:p,showWeekNumbers:w,showNavigationButtons:f,calendarWeekdays:g,...L}=t,M=Q("calendar-infinite-title");return Ot("div",{...L,className:s(t.className,"k-calendar",va,K("k-calendar",{size:a})),children:[l&&Le(ke,{children:Dt(i,m)}),Le(ne,{calendarView:r,headerText:u,showWeekdays:p,showWeekNumbers:w,showNavigationButtons:f,orientation:"vertical",weekdayCellsText:g,gridLabelledBy:M,children:t.children})]})};h.options=Mt;h.className=va;h.defaultOptions=ye;h.moduleName=v;h.folderName=A;h.ariaSpec={selector:".k-calendar-infinite",rules:[{selector:".k-calendar-infinite .k-content .k-calendar-table",attribute:"role=grid",usage:"The content table is the grid element for the infinite calendar."},{selector:".k-calendar-infinite .k-content .k-calendar-table",attribute:"aria-labelledby",usage:"Pointing to the current view title element."},{selector:".k-calendar-infinite .k-content .k-calendar-table",attribute:"tabindex=0",usage:"Makes the grid focusable."},{selector:".k-calendar-infinite .k-calendar-weekdays",attribute:"role=table",usage:"Weekday header table keeps table semantics (not part of grid)."},{selector:".k-calendar-view div.k-content.k-scrollable",attribute:"role=none",usage:"Scrollable wrapper is transparent to a11y tree."},{selector:".k-calendar-infinite .k-calendar-tbody",attribute:"role=rowgroup",usage:"Explicit rowgroup role on tbody."},{selector:".k-calendar-infinite .k-calendar-tr",attribute:"role=row",usage:"Explicit row role on tr."},{selector:".k-calendar-infinite .k-calendar-weekdays .k-calendar-th",attribute:"role=columnheader",usage:"Explicit columnheader role on weekday headers."},{selector:".k-calendar-infinite .k-calendar-weekdays .k-calendar-th",attribute:"scope=col",usage:"Specifies that the header applies to a column."},{selector:".k-calendar-infinite .k-calendar-weekdays .k-calendar-th",attribute:"aria-label",usage:"Full name of the day of the week."},{selector:".k-calendar-infinite .k-calendar-td:not(.k-alt):not(.k-empty)",attribute:"role=gridcell",usage:"Date cells in the calendar body."},{selector:".k-calendar-td.k-selected",attribute:"aria-selected=true",usage:"Specifies whether the date is selected."},{selector:".k-calendar-td.k-disabled",attribute:"aria-disabled=true",usage:"Specifies a disabled date."},{selector:".k-calendar-title",attribute:"tabindex=-1",usage:"Title button is not focusable."},{selector:".k-calendar-nav-today",attribute:"tabindex=-1",usage:"Today link is not focusable."}]};import{jsx as zt}from"react/jsx-runtime";var Aa="k-calendar-tr",o=t=>{let{...a}=t;return zt("tr",{...a,className:s(t.className,Aa),role:"row",children:t.children})};o.className=Aa;o.moduleName=v;o.folderName=A;import{jsx as Kt}from"react/jsx-runtime";var Ra="k-calendar-caption",R=t=>{let{text:a,scope:l,colSpan:r,rowSpan:i,...m}=t;return Kt("th",{...m,scope:l,colSpan:r,rowSpan:i,className:s(t.className,Ra),children:a})};R.className=Ra;R.moduleName=v;R.folderName=A;import{jsx as S,jsxs as Me}from"react/jsx-runtime";var Ea=({showOtherCentury:t,...a})=>S(y,{calendarView:"century",calendarTitleText:"2000 - 2099",children:Me(B,{children:[Me(o,{children:[S(e,{text:"1990 - 1999"}),S(e,{text:"2000 - 2009"}),S(e,{text:"2010 - 2019",today:!0}),S(e,{text:"2020 - 2029"})]}),Me(o,{children:[S(e,{text:"2030 - 2039"}),S(e,{text:"2040 - 2049"}),S(e,{text:"2050 - 2059"}),S(e,{text:"2060 - 2069"})]}),Me(o,{children:[S(e,{text:"2070 - 2079"}),S(e,{text:"2080 - 2089"}),S(e,{text:"2090 - 2099"}),S(e,{text:"2100 - 2109",empty:!t})]})]}),...a});import{jsx as D,jsxs as Ie}from"react/jsx-runtime";var La=({showOtherDecade:t,...a})=>D(y,{calendarView:"decade",calendarTitleText:"2020 - 2029",children:Ie(B,{children:[Ie(o,{children:[D(e,{text:"2019",empty:!t}),D(e,{text:"2020"}),D(e,{text:"2021",today:!0}),D(e,{text:"2022"})]}),Ie(o,{children:[D(e,{text:"2023"}),D(e,{text:"2024"}),D(e,{text:"2025"}),D(e,{text:"2026"})]}),Ie(o,{children:[D(e,{text:"2027"}),D(e,{text:"2028"}),D(e,{text:"2029"}),D(e,{text:"2030",empty:!t})]})]}),...a});import{jsx as c,jsxs as q}from"react/jsx-runtime";var Ma=({showCaptions:t,showOtherMonth:a,...l})=>c(y,{calendarView:"month",children:q(B,{calendarCaption:t&&"October 2021",showTableHead:!0,children:[q(o,{children:[c(e,{text:"26",showOtherMonth:a,empty:!a,weekend:a}),c(e,{text:"27",showOtherMonth:a,empty:!a}),c(e,{text:"28",showOtherMonth:a,empty:!a}),c(e,{text:"29",showOtherMonth:a,empty:!a}),c(e,{text:"30",showOtherMonth:a,empty:!a}),c(e,{text:"1"}),c(e,{text:"2",weekend:!0})]}),q(o,{children:[c(e,{text:"3",weekend:!0}),c(e,{text:"4"}),c(e,{text:"5"}),c(e,{text:"6"}),c(e,{text:"7"}),c(e,{text:"8"}),c(e,{text:"9",weekend:!0})]}),q(o,{children:[c(e,{text:"10",weekend:!0}),c(e,{text:"11"}),c(e,{text:"12",today:!0}),c(e,{text:"13"}),c(e,{text:"14"}),c(e,{text:"15"}),c(e,{text:"16",weekend:!0})]}),q(o,{children:[c(e,{text:"17",weekend:!0}),c(e,{text:"18"}),c(e,{text:"19"}),c(e,{text:"20"}),c(e,{text:"21"}),c(e,{text:"22"}),c(e,{text:"23",weekend:!0})]}),q(o,{children:[c(e,{text:"24",weekend:!0}),c(e,{text:"25"}),c(e,{text:"26"}),c(e,{text:"27"}),c(e,{text:"28"}),c(e,{text:"29"}),c(e,{text:"30",weekend:!0})]}),q(o,{children:[c(e,{text:"31",weekend:!0}),c(e,{text:"1",showOtherMonth:a,empty:!a}),c(e,{text:"2",showOtherMonth:a,empty:!a}),c(e,{text:"3",showOtherMonth:a,empty:!a}),c(e,{text:"4",showOtherMonth:a,empty:!a}),c(e,{text:"5",showOtherMonth:a,empty:!a}),c(e,{text:"6",showOtherMonth:a,empty:!a,weekend:a})]})]}),...l});import{jsx as Io,jsxs as So}from"react/jsx-runtime";import{jsx as O,jsxs as Se}from"react/jsx-runtime";var Ia=t=>O(y,{calendarView:"year",calendarTitleText:"2019",children:Se(B,{children:[Se(o,{children:[O(e,{text:"Jan"}),O(e,{text:"Feb"}),O(e,{text:"Mar"}),O(e,{text:"Apr"})]}),Se(o,{children:[O(e,{text:"May"}),O(e,{text:"Jun"}),O(e,{text:"Jul"}),O(e,{text:"Au"})]}),Se(o,{children:[O(e,{text:"Sep"}),O(e,{text:"Oct",today:!0}),O(e,{text:"Nov"}),O(e,{text:"Dec"})]})]}),...t});import{Fragment as Ht,jsx as d,jsxs as U}from"react/jsx-runtime";var Sa=({firstCaption:t="January 2021",secondCaption:a="February 2021",...l})=>d(h,{calendarTitleText:"January 2021",children:U(Ht,{children:[U("colgroup",{children:[d("col",{}),d("col",{}),d("col",{}),d("col",{}),d("col",{}),d("col",{}),d("col",{})]}),U(N,{children:[d(o,{"aria-hidden":"true",children:d(R,{scope:"col",colSpan:7,text:t})}),U(o,{children:[d(e,{empty:!0}),d(e,{empty:!0}),d(e,{empty:!0}),d(e,{empty:!0}),d(e,{empty:!0}),d(e,{text:"1"}),d(e,{text:"2",weekend:!0})]}),U(o,{children:[d(e,{text:"3",weekend:!0}),d(e,{text:"4"}),d(e,{text:"5"}),d(e,{text:"6"}),d(e,{text:"7"}),d(e,{text:"8"}),d(e,{text:"9",weekend:!0})]}),U(o,{children:[d(e,{text:"10",weekend:!0}),d(e,{text:"11"}),d(e,{text:"12"}),d(e,{text:"13"}),d(e,{text:"14"}),d(e,{text:"15"}),d(e,{text:"16",weekend:!0})]}),U(o,{children:[d(e,{text:"17",weekend:!0}),d(e,{text:"18"}),d(e,{text:"19"}),d(e,{text:"20"}),d(e,{text:"21"}),d(e,{text:"22"}),d(e,{text:"23",weekend:!0})]}),U(o,{children:[d(e,{text:"24",weekend:!0}),d(e,{text:"25"}),d(e,{text:"26"}),d(e,{text:"27"}),d(e,{text:"28"}),d(e,{text:"29"}),d(e,{text:"30",weekend:!0})]}),U(o,{children:[d(e,{text:"31",weekend:!0}),d(e,{empty:!0}),d(e,{empty:!0}),d(e,{empty:!0}),d(e,{empty:!0}),d(e,{empty:!0}),d(e,{empty:!0})]})]}),d(N,{children:d(o,{"aria-hidden":"true",children:d(R,{scope:"col",colSpan:7,text:a})})})]}),...l});import{Fragment as _t,jsx as x,jsxs as F}from"react/jsx-runtime";var Da=({firstCaption:t="2021",secondCaption:a="2022",...l})=>x(h,{calendarView:"year",showWeekdays:!1,calendarTitleText:"2021",navigationItems:["2016","2017","2018","2019","2020","2021","2022","2023","2024","2025","2026","2027","2028","2029","2030","2031","2032","2033","2034","2035","2036","2037","2038","2039","2040","2041","2042"],navigationMarkerConfig:{2021:"marker",2030:"marker",2040:"marker"},children:F(_t,{children:[F("colgroup",{children:[x("col",{}),x("col",{}),x("col",{}),x("col",{})]}),F(N,{children:[x(o,{"aria-hidden":"true",children:x(R,{scope:"col",colSpan:4,text:t})}),F(o,{children:[x(e,{text:"Jan",today:!0}),x(e,{text:"Feb"}),x(e,{text:"Mar"}),x(e,{text:"Apr"})]}),F(o,{children:[x(e,{text:"May"}),x(e,{text:"Jun"}),x(e,{text:"Jul"}),x(e,{text:"Aug"})]}),F(o,{children:[x(e,{text:"Sep"}),x(e,{text:"Oct"}),x(e,{text:"Nov"}),x(e,{text:"Dec"})]})]}),F(N,{children:[x(o,{"aria-hidden":"true",children:x(R,{scope:"col",colSpan:4,text:a})}),F(o,{children:[x(e,{text:"Jan"}),x(e,{text:"Feb"}),x(e,{text:"Mar"}),x(e,{text:"Apr"})]}),F(o,{children:[x(e,{text:"May"}),x(e,{text:"Jun"}),x(e,{text:"Jul"}),x(e,{text:"Aug"})]}),F(o,{children:[x(e,{text:"Sep"}),x(e,{text:"Oct"}),x(e,{text:"Nov"}),x(e,{text:"Dec"})]})]})]}),...l});import{Fragment as Vt,jsx as b,jsxs as P}from"react/jsx-runtime";var Oa=({firstCaption:t="2020 - 2029",secondCaption:a="2030 - 2039",...l})=>b(h,{calendarView:"decade",showWeekdays:!1,calendarTitleText:"2020 - 2029",navigationItems:["1970","1980","1990","2000","2010","2020","2030","2040","2050","2060","2070","2080","2090"],navigationMarkerConfig:{2020:"marker"},children:P(Vt,{children:[P("colgroup",{children:[b("col",{}),b("col",{}),b("col",{}),b("col",{})]}),P(N,{children:[b(o,{"aria-hidden":"true",children:b(R,{scope:"col",colSpan:4,text:t})}),P(o,{children:[b(e,{text:"2020",today:!0}),b(e,{text:"2021"}),b(e,{text:"2022"}),b(e,{text:"2023"})]}),P(o,{children:[b(e,{text:"2024"}),b(e,{text:"2025"}),b(e,{text:"2026"}),b(e,{text:"2027"})]}),P(o,{children:[b(e,{text:"2028"}),b(e,{text:"2029"}),b(e,{empty:!0}),b(e,{empty:!0})]})]}),P(N,{children:[b(o,{"aria-hidden":"true",children:b(R,{scope:"col",colSpan:4,text:a})}),P(o,{children:[b(e,{text:"2030"}),b(e,{text:"2031"}),b(e,{text:"2032"}),b(e,{text:"2033"})]}),P(o,{children:[b(e,{text:"2034"}),b(e,{text:"2035"}),b(e,{text:"2036"}),b(e,{text:"2037"})]}),P(o,{children:[b(e,{text:"2038"}),b(e,{text:"2039"}),b(e,{empty:!0}),b(e,{empty:!0})]})]})]}),...l});import{Fragment as Bt,jsx as T,jsxs as oe}from"react/jsx-runtime";var za=({firstCaption:t="2000 - 2099",...a})=>T(h,{calendarView:"century",showWeekdays:!1,calendarTitleText:"2000 - 2099",navigationItems:["1900","2000"],navigationMarkerConfig:{2e3:"marker"},children:oe(Bt,{children:[oe("colgroup",{children:[T("col",{}),T("col",{}),T("col",{}),T("col",{})]}),oe(N,{children:[T(o,{"aria-hidden":"true",children:T(R,{scope:"col",colSpan:4,text:t})}),oe(o,{children:[T(e,{text:"1900 - 1999"}),T(e,{text:"2000 - 2009"}),T(e,{text:"2010 - 2019"}),T(e,{text:"2020 - 2029"})]}),oe(o,{children:[T(e,{text:"2030 - 2039"}),T(e,{text:"2040 - 2049"}),T(e,{text:"2050 - 2059"}),T(e,{text:"2060 - 2069"})]}),oe(o,{children:[T(e,{text:"2070 - 2079"}),T(e,{text:"2080 - 2089"}),T(e,{text:"2090 - 2099"}),T(e,{empty:!0})]})]})]}),...a});import{Fragment as jo,jsx as Qo,jsxs as Zo}from"react/jsx-runtime";import{jsx as lr,jsxs as nr}from"react/jsx-runtime";import{Fragment as cr,jsx as ir,jsxs as sr}from"react/jsx-runtime";import{jsx as De}from"react/jsx-runtime";var Ft=y.options,Pt=y.states,Ka={...y.defaultOptions,variant:"month"},Wt=[{name:"month",title:"Month View"},{name:"year",title:"Year View"},{name:"decade",title:"Decade View"},{name:"century",title:"Century View"}],Ut=[{name:"footer",title:"Calendar Footer"},{name:"other",title:"Show other cells"}],re=t=>{let{variant:a,modifiers:l,...r}={...Ka,...t},i={showCalendarFooter:!1};Object.keys(l||{}).forEach(f=>{switch(f){case"other":i.showOtherMonth=!!l?.[f],i.showOtherCentury=!!l?.[f],i.showOtherDecade=!!l?.[f];break;case"footer":i.showCalendarFooter=!!l?.[f];break;default:return}});let{showOtherMonth:m,showOtherDecade:u,showOtherCentury:p,showCalendarFooter:w}=i;switch(a){case"century":return De(Ea,{size:r.size,showOtherCentury:p,showCalendarFooter:w});case"decade":return De(La,{size:r.size,showOtherDecade:u,showCalendarFooter:w});case"year":return De(Ia,{calendarTitleText:"2021",size:r.size,showCalendarFooter:w});default:return De(Ma,{size:r.size,showOtherMonth:m,showCalendarFooter:w})}};re.options=Ft;re.states=Pt;re.variants=Wt;re.defaultOptions=Ka;re.modifiers=Ut;re.className=y.className;import{jsx as Oe}from"react/jsx-runtime";var $t=h.options,Jt=h.states,Ha={...h.defaultOptions,variant:"month"},Gt=[{name:"month",title:"Month View"},{name:"year",title:"Year View"},{name:"decade",title:"Decade View"},{name:"century",title:"Century View"}],Yt=[{name:"footer",title:"Calendar Footer"},{name:"other",title:"Show other cells"}],de=t=>{let{variant:a,modifiers:l,...r}={...Ha,...t},i={showCalendarFooter:!1};Object.keys(l||{}).forEach(f=>{switch(f){case"other":i.showOtherMonth=!!l?.[f],i.showOtherCentury=!!l?.[f],i.showOtherDecade=!!l?.[f];break;case"footer":i.showCalendarFooter=!!l?.[f];break;default:return}});let{showOtherMonth:m,showOtherDecade:u,showOtherCentury:p,showCalendarFooter:w}=i;switch(a){case"century":return Oe(za,{size:r.size,showOtherCentury:p,showCalendarFooter:w});case"decade":return Oe(Oa,{size:r.size,showOtherDecade:u,showCalendarFooter:w});case"year":return Oe(Da,{size:r.size,showCalendarFooter:w});default:return Oe(Sa,{size:r.size,showOtherMonth:m,showCalendarFooter:w})}};de.options=$t;de.states=Jt;de.variants=Gt;de.defaultOptions=Ha;de.modifiers=Yt;de.className=h.className;var _a="calendar",Va="calendar";import{jsx as Qt}from"react/jsx-runtime";var Ba="k-calendar-range",qt=[],Xt={size:[n.undefined,n.small,n.medium,n.large]},ze={calendarTitleText:"October 2021 - November 2021",orientation:"horizontal",calendarView:"month"},$=t=>{let{size:a,orientation:l=ze.orientation,calendarView:r=ze.calendarView,calendarTitleText:i=ze.calendarTitleText,showCalendarFooter:m,showWeek:u,dir:p,...w}=t;return Qt(y,{...w,className:s(t.className,Ba),size:a,calendarTitleText:i,calendarView:r,orientation:l,showCalendarFooter:m,showWeek:u,dir:p})};$.states=qt;$.options=Xt;$.className=Ba;$.defaultOptions=ze;$.moduleName=_a;$.folderName=Va;$.ariaSpec={selector:".k-calendar-range",rules:[{selector:".k-calendar-range .k-calendar-view",attribute:"role=grid",usage:"Specifies the role of the multi-view calendar wrapper."},{selector:".k-calendar-range .k-calendar-view",attribute:"aria-labelledby",usage:"Pointing to the k-calendar-title element."},{selector:".k-calendar-range .k-calendar-view",attribute:"tabindex=0",usage:"Makes the grid focusable."},{selector:".k-calendar-range .k-calendar-table",attribute:"role=none",usage:"Inner tables have role removed \u2014 content belongs to single grid."},{selector:".k-calendar-thead",attribute:"role=rowgroup",usage:"Explicit rowgroup role."},{selector:".k-calendar-tbody",attribute:"role=rowgroup",usage:"Explicit rowgroup role."},{selector:".k-calendar-tr",attribute:"role=row",usage:"Explicit row role."},{selector:".k-calendar-thead .k-calendar-th",attribute:"role=columnheader",usage:"Column header for day names."},{selector:".k-calendar-thead .k-calendar-th",attribute:"scope=col",usage:"Specifies the header applies to a column."},{selector:".k-calendar-thead .k-calendar-th",attribute:"aria-label",usage:"Full name of the day of the week."},{selector:".k-calendar-td:not(.k-alt):not(.k-empty)",attribute:"role=gridcell",usage:"Date cells in the calendar body."},{selector:".k-calendar-td.k-selected",attribute:"aria-selected=true",usage:"Indicates the selected date."},{selector:".k-calendar-td.k-disabled",attribute:"aria-disabled=true",usage:"Indicates a disabled date."},{selector:".k-calendar-nav-prev,.k-calendar-nav-next",attribute:"tabindex=-1",usage:"Navigation buttons are not focusable."},{selector:".k-calendar-title",attribute:"tabindex=-1",usage:"Title button is not focusable."},{selector:".k-calendar-nav-today",attribute:"tabindex=-1",usage:"Today link is not focusable."}]};var id=$;export{$ as MultiViewCalendar,id as default};