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