UNPKG

@progress/kendo-themes-html

Version:

A collection of HTML helpers used for developing Kendo UI themes

2 lines (1 loc) 32.3 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"}),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:q,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":q,"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 X(t){return ze[t]=(ze[t]||0)+1,`k-${t}-${ze[t]}`}var v="calendar",R=v;import{jsx as Ke,jsxs as Ze}from"react/jsx-runtime";var je="k-calendar-navigation",ce=t=>Ze("div",{...t,className:s(t.className,je),children:[Ke("span",{className:"k-calendar-navigation-highlight"}),Ze("div",{className:"k-content k-scrollable",children:[Ke("ul",{className:"k-reset",children:t.children}),Ke("div",{className:"k-scrollable-placeholder",style:{height:"1000px"}})]})]});ce.className=je;ce.moduleName=v;ce.folderName=R;import{Fragment as Va,jsx as ea}from"react/jsx-runtime";var Be="k-font-icon",Ba=[],Ha={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]},_a={},Ce=t=>{let{size:a,themeColor:l,icon:r,rotate:i,flip:m,...f}=t;return r?ea("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"}):ea(Va,{})};Ce.states=Ba;Ce.options=Ha;Ce.className=Be;Ce.defaultOptions=_a;var aa=Ce;import{Fragment as Wa,jsx as ge}from"react/jsx-runtime";var He="k-svg-icon",Fa=[],Pa={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},me=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 ge(Wa,{});if(p==="none")return ge("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 ge("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:ge("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=Fa;me.options=Pa;me.className=He;me.defaultOptions=_e;var Ve=me;import*as Fe from"@progress/kendo-svg-icons";var ta="icon",la="icons";import{useContext as Ua}from"react";import{createContext as $a}from"react";var na=$a({iconsType:"svg"});import{Fragment as oa,jsx as pe}from"react/jsx-runtime";var Ne="k-icon",Ja=t=>t.replace(/([-_][a-z0-9])/gi,a=>a.toUpperCase().replace("-","").replace("_","")),Ga=[],Ya={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]},ve={viewBox:"0 0 24 24",type:"svg",variant:H.outline},_=t=>{let{iconsType:a}=Ua(na),{size:l,themeColor:r,icon:i,type:m=a||ve.type,rotate:f,flip:p,viewBox:w=ve.viewBox,variant:b=ve.variant,...g}=t;if(!i)return pe(oa,{});if((a||m)==="svg"){if(i==="none")return pe(Ve,{...g,className:s(t.className,Ne),icon:i,size:l,variant:b});let I=Fe[i]?i:Ja(`${i}-icon`);return Fe[I]?pe(Ve,{...g,className:s(t.className,Ne),icon:Fe[I],size:l,themeColor:r,rotate:f,flip:p,viewBox:w,variant:b}):pe(oa,{})}return pe(aa,{...g,className:s(t.className,Ne),icon:i,size:l,themeColor:r,rotate:f,flip:p})};_.states=Ga;_.options=Ya;_.defaultOptions=ve;_.className=Ne;_.moduleName=ta;_.folderName=la;_.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",ra=Pe;import{Fragment as da,jsx as Q,jsxs as ia}from"react/jsx-runtime";var xe="k-button",qa=["icon-button"],Xa=[M.hover,M.focus,M.active,M.selected,M.disabled,M.generating],Qa={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:q,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 ia(a,{className:s(se,xe,Qe(xe,w),K(xe,{size:l,rounded:r,fillMode:i,themeColor:m}),Te(xe,{hover:b,focus:g,active:L,disabled:q||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:q||void 0,children:[typeof E=="string"&&E&&Q(_,{className:s(ke,"k-button-icon"),icon:E,size:z}),E&&typeof E!="string"&&Q(da,{children:E}),ie?ia(da,{children:[ie&&Q("span",{className:"k-button-text",children:ie}),t.children]}):t.children&&Q("span",{className:"k-button-text",children:t.children}),f&&Q("span",{className:"k-menu-button-arrow k-button-arrow",children:Q(_,{icon:p})})]})};y.states=Xa;y.options=Qa;y.variants=qa;y.className=xe;y.defaultOptions=We;y.moduleName=Pe;y.folderName=ra;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 Za}from"react/jsx-runtime";var sa=t=>Za(y,{icon:"folder",...t,"aria-label":t["aria-label"]||"Folder",children:void 0});import{jsx as ja}from"react/jsx-runtime";var ca=t=>ja(y,{icon:"folder",children:"Button",...t});import{jsx as et}from"react/jsx-runtime";var Ca=t=>et(y,{children:"Button",...t});import{jsx as $e}from"react/jsx-runtime";var at=y.options,tt=y.states,lt={...y.defaultOptions,variant:"text"},nt=[{name:"icon-only",title:"Icon Only"},{name:"icon-and-text",title:"Icon & Text"},{name:"text",title:"Text"}],ot=[],Z=t=>{let{variant:a,...l}=t;switch(a){case"icon-only":return $e(sa,{...l,icon:"star"});case"icon-and-text":return $e(ca,{...l,icon:"star",children:"Button"});default:return $e(Ca,{...l,children:"Button"})}};Z.options=at;Z.states=tt;Z.variants=nt;Z.defaultOptions=lt;Z.modifiers=ot;Z.className=y.className;import{jsx as ue,jsxs as ma}from"react/jsx-runtime";var pa="k-calendar-header",rt={size:[d.undefined,d.small,d.medium,d.large]},be={calendarTitleText:"October 2021",showToday:!0,showNavigationButtons:!0,orientation:"horizontal"},G=t=>{let{calendarTitleText:a=be.calendarTitleText,showToday:l=be.showToday,showNavigationButtons:r=be.showNavigationButtons,orientation:i=be.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||X("calendar-title");return ma("div",{...b,className:s(t.className,pa,{"k-vstack":i==="vertical"}),children:[ue(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"}:{}}),ue("span",{className:"k-spacer"}),ma("span",{className:"k-calendar-nav",children:[r&&ue(y,{className:"k-calendar-nav-prev",icon:g,size:m,fillMode:"flat",tabIndex:-1,"aria-label":"Navigate to previous view"}),l&&ue(y,{size:m,fillMode:"flat",className:"k-calendar-nav-today",tabIndex:-1,children:"Today"}),r&&ue(y,{className:"k-calendar-nav-next",icon:L,size:m,fillMode:"flat",tabIndex:-1,"aria-label":"Navigate to next view"})]})]})};G.options=rt;G.className=pa;G.defaultOptions=be;import{jsx as it}from"react/jsx-runtime";var dt="k-calendar-table",Ue=t=>{let{tableRole:a="none",ariaLabelledBy:l,...r}=t;return it("table",{...r,className:s(t.className,dt),role:a,...l?{"aria-labelledby":l}:{},...a==="grid"?{tabIndex:0}:{},children:t.children})};import{jsx as st}from"react/jsx-runtime";var xa="k-calendar-view",Je={orientation:"horizontal",calendarView:"month"},Re=t=>{let{orientation:a=Je.orientation,calendarView:l=Je.calendarView,gridRole:r,ariaLabelledBy:i,...m}=t;return st("div",{...m,className:s(t.className,xa,`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})};Re.className=xa;Re.defaultOptions=Je;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"},fe=t=>{let{size:a,calendarFooterText:l=fa.calendarFooterText,...r}=t;return ua("div",{...r,className:s(t.className,ba),children:ua(y,{size:a,fillMode:"flat",themeColor:"primary",className:"k-calendar-nav-today",children:l})})};fe.options=ct;fe.className=ba;fe.defaultOptions=fa;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]},we={showCalendarHeader:!0,orientation:"horizontal",calendarView:"month",calendarTitleText:"October 2021"},k=t=>{let{size:a,orientation:l=we.orientation,calendarView:r=we.calendarView,calendarTitleText:i=we.calendarTitleText,showCalendarHeader:m=we.showCalendarHeader,showWeek:f,showCalendarFooter:p,calendarFooterText:w,dir:b,...g}=t,L=X("calendar-title");return pt("div",{...g,dir:b,className:s(t.className,Ye,K(Ye,{size:a}),{"k-week-number":f}),children:[m&&Ge(G,{calendarView:r,showToday:!p,calendarTitleText:i,orientation:l,size:a,dir:b,titleId:L}),Ge(Re,{calendarView:r,orientation:l,gridRole:!0,ariaLabelledBy:L,children:t.children}),p&&Ge(fe,{calendarFooterText:w,size:a})]})};k.states=Ct;k.options=mt;k.className=Ye;k.defaultOptions=we;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 ft}from"react/jsx-runtime";var wa="k-calendar-container",xt=[],ut={},bt={},j=t=>{let{...a}=t;return ft("div",{...a,className:s(t.className,wa),children:t.children})};j.states=xt;j.options=ut;j.className=wa;j.defaultOptions=bt;j.moduleName=v;j.folderName=R;import{Fragment as yt,jsx as ee,jsxs as kt}from"react/jsx-runtime";var wt=[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:q,active:de,selected:W,disabled:E,...z}=t,ke=`k-calendar-${l?"th":"td"}`,se=[t.className,ke,Te(ke,{hover:I,focus:q,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 ee("th",{...z,className:s(se),role:"columnheader",scope:"col","aria-label":he,children:f?ee("span",{className:"k-sr-only",children:he}):a})}return f?ee("td",{...z,className:s(se),children:a}):ee("td",{...z,className:s(se),role:"gridcell",...W?{"aria-selected":"true"}:{},...E?{"aria-disabled":"true"}:{},children:L&&!m?ee(yt,{children:"\xA0"}):kt("span",{className:"k-link",children:[a,g&&ee("span",{className:"k-day-indicator"})]})})};e.states=wt;import{jsx as ht}from"react/jsx-runtime";var ya="k-calendar-tbody",N=t=>{let{...a}=t;return ht("tbody",{...a,className:s(t.className,ya),role:"rowgroup",children:t.children})};N.className=ya;N.moduleName=v;N.folderName=R;import{jsx as qe,jsxs as gt}from"react/jsx-runtime";var Tt="k-calendar-table",V=t=>{let{calendarCaption:a,showTableHead:l,showWeek:r,ariaLabelledBy:i,ariaActiveDescendant:m,gridRole:f,...p}=t;return gt("table",{...p,className:s(t.className,Tt),...f?{role:"grid","aria-labelledby":i,"aria-activedescendant":m,tabIndex:0}:{role:"none"},children:[a&&qe("caption",{className:"k-calendar-caption",children:a}),l&&qe(ae,{showWeek:r}),qe(N,{children:t.children})]})};import{jsx as Nt}from"react/jsx-runtime";var ka="k-calendar-tr",n=t=>{let{...a}=t;return Nt("tr",{...a,className:s(t.className,ka),role:"row",children:t.children})};n.className=ka;n.moduleName=v;n.folderName=R;import{jsx as vt}from"react/jsx-runtime";var ha="k-calendar-caption",A=t=>{let{text:a,scope:l,colSpan:r,rowSpan:i,...m}=t;return vt("th",{...m,scope:l,colSpan:r,rowSpan:i,className:s(t.className,ha),children:a})};A.className=ha;A.moduleName=v;A.folderName=R;import{jsx as S,jsxs as Ae}from"react/jsx-runtime";var Ta=({showOtherCentury:t,...a})=>S(k,{calendarView:"century",calendarTitleText:"2000 - 2099",children:Ae(V,{children:[Ae(n,{children:[S(e,{text:"1990 - 1999"}),S(e,{text:"2000 - 2009"}),S(e,{text:"2010 - 2019",today:!0}),S(e,{text:"2020 - 2029"})]}),Ae(n,{children:[S(e,{text:"2030 - 2039"}),S(e,{text:"2040 - 2049"}),S(e,{text:"2050 - 2059"}),S(e,{text:"2060 - 2069"})]}),Ae(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 Ee}from"react/jsx-runtime";var ga=({showOtherDecade:t,...a})=>D(k,{calendarView:"decade",calendarTitleText:"2020 - 2029",children:Ee(V,{children:[Ee(n,{children:[D(e,{text:"2019",empty:!t}),D(e,{text:"2020"}),D(e,{text:"2021",today:!0}),D(e,{text:"2022"})]}),Ee(n,{children:[D(e,{text:"2023"}),D(e,{text:"2024"}),D(e,{text:"2025"}),D(e,{text:"2026"})]}),Ee(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 Y}from"react/jsx-runtime";var Na=({showCaptions:t,showOtherMonth:a,...l})=>c(k,{calendarView:"month",children:Y(V,{calendarCaption:t&&"October 2021",showTableHead:!0,children:[Y(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})]}),Y(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})]}),Y(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})]}),Y(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})]}),Y(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})]}),Y(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 no,jsxs as oo}from"react/jsx-runtime";import{jsx as O,jsxs as Le}from"react/jsx-runtime";var va=t=>O(k,{calendarView:"year",calendarTitleText:"2019",children:Le(V,{children:[Le(n,{children:[O(e,{text:"Jan"}),O(e,{text:"Feb"}),O(e,{text:"Mar"}),O(e,{text:"Apr"})]}),Le(n,{children:[O(e,{text:"May"}),O(e,{text:"Jun"}),O(e,{text:"Jul"}),O(e,{text:"Au"})]}),Le(n,{children:[O(e,{text:"Sep"}),O(e,{text:"Oct",today:!0}),O(e,{text:"Nov"}),O(e,{text:"Dec"})]})]}),...t});import{Fragment as Rt,jsx as o,jsxs as $}from"react/jsx-runtime";var Ra=({firstCaption:t="January 2021",secondCaption:a="February 2021",...l})=>o(h,{calendarTitleText:"January 2021",children:$(Rt,{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 At,jsx as x,jsxs as F}from"react/jsx-runtime";var Aa=({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(At,{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 Et,jsx as u,jsxs as P}from"react/jsx-runtime";var Ea=({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(Et,{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 Lt,jsx as T,jsxs as te}from"react/jsx-runtime";var La=({firstCaption:t="2000 - 2099",...a})=>T(h,{calendarView:"century",showWeekdays:!1,calendarTitleText:"2000 - 2099",navigationItems:["1900","2000"],navigationMarkerConfig:{2e3:"marker"},children:te(Lt,{children:[te("colgroup",{children:[T("col",{}),T("col",{}),T("col",{}),T("col",{})]}),te(N,{children:[T(n,{"aria-hidden":"true",children:T(A,{scope:"col",colSpan:4,text:t})}),te(n,{children:[T(e,{text:"1900 - 1999"}),T(e,{text:"2000 - 2009"}),T(e,{text:"2010 - 2019"}),T(e,{text:"2020 - 2029"})]}),te(n,{children:[T(e,{text:"2030 - 2039"}),T(e,{text:"2040 - 2049"}),T(e,{text:"2050 - 2059"}),T(e,{text:"2060 - 2069"})]}),te(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 Ao,jsx as vo,jsxs as Ro}from"react/jsx-runtime";import{jsx as Mo,jsxs as So}from"react/jsx-runtime";import{Fragment as Ho,jsx as Ko,jsxs as Bo}from"react/jsx-runtime";import{jsx as Ie}from"react/jsx-runtime";var It=k.options,Mt=k.states,Ia={...k.defaultOptions,variant:"month"},St=[{name:"month",title:"Month View"},{name:"year",title:"Year View"},{name:"decade",title:"Decade View"},{name:"century",title:"Century View"}],Dt=[{name:"footer",title:"Calendar Footer"},{name:"other",title:"Show other cells"}],le=t=>{let{variant:a,modifiers:l,...r}={...Ia,...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 Ie(Ta,{size:r.size,showOtherCentury:p,showCalendarFooter:w});case"decade":return Ie(ga,{size:r.size,showOtherDecade:f,showCalendarFooter:w});case"year":return Ie(va,{calendarTitleText:"2021",size:r.size,showCalendarFooter:w});default:return Ie(Na,{size:r.size,showOtherMonth:m,showCalendarFooter:w})}};le.options=It;le.states=Mt;le.variants=St;le.defaultOptions=Ia;le.modifiers=Dt;le.className=k.className;import{jsx as Me}from"react/jsx-runtime";var Ot=h.options,zt=h.states,Ma={...h.defaultOptions,variant:"month"},Kt=[{name:"month",title:"Month View"},{name:"year",title:"Year View"},{name:"decade",title:"Decade View"},{name:"century",title:"Century View"}],Bt=[{name:"footer",title:"Calendar Footer"},{name:"other",title:"Show other cells"}],ne=t=>{let{variant:a,modifiers:l,...r}={...Ma,...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 Me(La,{size:r.size,showOtherCentury:p,showCalendarFooter:w});case"decade":return Me(Ea,{size:r.size,showOtherDecade:f,showCalendarFooter:w});case"year":return Me(Aa,{size:r.size,showCalendarFooter:w});default:return Me(Ra,{size:r.size,showOtherMonth:m,showCalendarFooter:w})}};ne.options=Ot;ne.states=zt;ne.variants=Kt;ne.defaultOptions=Ma;ne.modifiers=Bt;ne.className=h.className;import{jsx as Xe,jsxs as Ht}from"react/jsx-runtime";var Sa="k-calendar-thead",Da={cellsText:["Su","Mo","Tu","We","Th","Fr","Sa"]},ae=t=>{let{showWeek:a,cellsText:l=Da.cellsText,...r}=t;return Xe("thead",{...r,className:s(t.className,Sa),role:"rowgroup",children:Ht("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))]})})};ae.className=Sa;ae.defaultOptions=Da;import{jsx as B,jsxs as Se}from"react/jsx-runtime";var Oa="k-calendar-view",oe={orientation:"vertical",calendarView:"month",headerText:"April 2018",showWeekdays:!0,showNavigationButtons:!1},re=t=>{let{orientation:a=oe.orientation,calendarView:l=oe.calendarView,headerText:r=oe.headerText,showWeekdays:i=oe.showWeekdays,showNavigationButtons:m=oe.showNavigationButtons,showWeekNumbers:f,weekdayCellsText:p,gridLabelledBy:w,...b}=t;return Se("div",{...b,className:s(Oa,`k-calendar-${l}view`,t.className,{"k-hstack":a==="horizontal","k-vstack":a==="vertical"}),children:[B(G,{showNavigationButtons:m,calendarTitleText:r,orientation:"horizontal"}),i&&Se(Ue,{className:"k-calendar-weekdays",tableRole:"table",children:[Se("colgroup",{children:[B("col",{}),B("col",{}),B("col",{}),B("col",{}),B("col",{}),B("col",{}),B("col",{})]}),B(ae,{cellsText:p,showWeek:f})]}),Se("div",{className:"k-content k-scrollable",role:"none",children:[B(Ue,{tableRole:"grid",ariaLabelledBy:w,children:t.children}),B("div",{className:"k-scrollable-placeholder",style:{height:"1000px"}})]})]})};re.className=Oa;re.defaultOptions=oe;re.moduleName=v;re.folderName=R;import{jsx as De,jsxs as Wt}from"react/jsx-runtime";var za="k-calendar-infinite",_t={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"],Ft={2021:"marker",2022:"marker"},Pt=(t,a)=>t.map((l,r)=>De("li",{children:De("span",{className:a[l]==="marker"?"k-calendar-navigation-marker":void 0,children:l})},r)),ye={showNavigation:!0,calendarView:"month",navigationItems:Vt,navigationMarkerConfig:Ft},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=X("calendar-infinite-title");return Wt("div",{...L,className:s(t.className,"k-calendar",za,K("k-calendar",{size:a})),children:[l&&De(ce,{children:Pt(i,m)}),De(re,{calendarView:r,headerText:f,showWeekdays:p,showWeekNumbers:w,showNavigationButtons:b,orientation:"vertical",weekdayCellsText:g,gridLabelledBy:I,children:t.children})]})};h.options=_t;h.className=za;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."}]};var Yr=h;export{h as CalendarInfinite,Yr as default};