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