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: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{Fragment as Va,jsx as Ze}from"react/jsx-runtime";var Ke="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?Ze("span",{...f,className:s(t.className,Ke,K(Ke,{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"}):Ze(Va,{})};ce.states=Ba;ce.options=Ha;ce.className=Ke;ce.defaultOptions=_a;var je=ce;import{Fragment as Wa,jsx as ge}from"react/jsx-runtime";var Be="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]},He={viewBox:"0 0 24 24",variant:H.outline},Ce=t=>{let{size:a,themeColor:l,rotate:r,flip:i,viewBox:m=He.viewBox,variant:f=He.variant,icon:p,...w}=t;if(!p)return ge(Wa,{});if(p==="none")return ge("span",{...w,className:s(t.className,Be,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,Be,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})})};Ce.states=Fa;Ce.options=Pa;Ce.className=Be;Ce.defaultOptions=He;var _e=Ce;import*as Ve from"@progress/kendo-svg-icons";var ea="icon",aa="icons";import{useContext as Ua}from"react";import{createContext as $a}from"react";var ta=$a({iconsType:"svg"});import{Fragment as la,jsx as me}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(ta),{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 me(la,{});if((a||m)==="svg"){if(i==="none")return me(_e,{...g,className:s(t.className,Ne),icon:i,size:l,variant:b});let I=Ve[i]?i:Ja(`${i}-icon`);return Ve[I]?me(_e,{...g,className:s(t.className,Ne),icon:Ve[I],size:l,themeColor:r,rotate:f,flip:p,viewBox:w,variant:b}):me(la,{})}return me(je,{...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=ea;_.folderName=aa;_.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 Fe="button",na=Fe;import{Fragment as oa,jsx as Z,jsxs as ra}from"react/jsx-runtime";var pe="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]},Pe={showArrow:!1,arrowIconName:"chevron-down"},y=t=>{let{as:a="button",size:l,rounded:r,fillMode:i,themeColor:m,showArrow:f=Pe.showArrow,arrowIconName:p=Pe.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 ra(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(oa,{children:E}),ie?ra(oa,{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=Xa;y.options=Qa;y.variants=qa;y.className=pe;y.defaultOptions=Pe;y.moduleName=Fe;y.folderName=na;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 da=t=>Za(y,{icon:"folder",...t,"aria-label":t["aria-label"]||"Folder",children:void 0});import{jsx as ja}from"react/jsx-runtime";var ia=t=>ja(y,{icon:"folder",children:"Button",...t});import{jsx as et}from"react/jsx-runtime";var sa=t=>et(y,{children:"Button",...t});import{jsx as We}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=[],j=t=>{let{variant:a,...l}=t;switch(a){case"icon-only":return We(da,{...l,icon:"star"});case"icon-and-text":return We(ia,{...l,icon:"star",children:"Button"});default:return We(sa,{...l,children:"Button"})}};j.options=at;j.states=tt;j.variants=nt;j.defaultOptions=lt;j.modifiers=ot;j.className=y.className;import{jsx as xe,jsxs as ca}from"react/jsx-runtime";var Ca="k-calendar-header",rt={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,Ca,{"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=rt;G.className=Ca;G.defaultOptions=ue;import{jsx as it}from"react/jsx-runtime";var dt="k-calendar-table",$e=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 ma="k-calendar-view",Ue={orientation:"horizontal",calendarView:"month"},Re=t=>{let{orientation:a=Ue.orientation,calendarView:l=Ue.calendarView,gridRole:r,ariaLabelledBy:i,...m}=t;return st("div",{...m,className:s(t.className,ma,`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=ma;Re.defaultOptions=Ue;import{jsx as pa}from"react/jsx-runtime";var xa="k-calendar-footer",ct={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=ct;be.className=xa;be.defaultOptions=ua;var v="calendar",R=v;import{jsx as Je,jsxs as pt}from"react/jsx-runtime";var Ge="k-calendar",Ct=[],mt={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 pt("div",{...g,dir:b,className:s(t.className,Ge,K(Ge,{size:a}),{"k-week-number":f}),children:[m&&Je(G,{calendarView:r,showToday:!p,calendarTitleText:i,orientation:l,size:a,dir:b,titleId:L}),Je(Re,{calendarView:r,orientation:l,gridRole:!0,ariaLabelledBy:L,children:t.children}),p&&Je(be,{calendarFooterText:w,size:a})]})};k.states=Ct;k.options=mt;k.className=Ge;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 ft}from"react/jsx-runtime";var ba="k-calendar-container",xt=[],ut={},bt={},ee=t=>{let{...a}=t;return ft("div",{...a,className:s(t.className,ba),children:t.children})};ee.states=xt;ee.options=ut;ee.className=ba;ee.defaultOptions=bt;ee.moduleName=v;ee.folderName=R;import{Fragment as yt,jsx as ae,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: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(yt,{children:"\xA0"}):kt("span",{className:"k-link",children:[a,g&&ae("span",{className:"k-day-indicator"})]})})};e.states=wt;import{jsx as ht}from"react/jsx-runtime";var fa="k-calendar-tbody",N=t=>{let{...a}=t;return ht("tbody",{...a,className:s(t.className,fa),role:"rowgroup",children:t.children})};N.className=fa;N.moduleName=v;N.folderName=R;import{jsx as Ye,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&&Ye("caption",{className:"k-calendar-caption",children:a}),l&&Ye(te,{showWeek:r}),Ye(N,{children:t.children})]})};import{jsx as qe,jsxs as wa}from"react/jsx-runtime";var ya="k-calendar-navigation",we=t=>wa("div",{...t,className:s(t.className,ya),children:[qe("span",{className:"k-calendar-navigation-highlight"}),wa("div",{className:"k-content k-scrollable",children:[qe("ul",{className:"k-reset",children:t.children}),qe("div",{className:"k-scrollable-placeholder",style:{height:"1000px"}})]})]});we.className=ya;we.moduleName=v;we.folderName=R;import{jsx as Ae,jsxs as Et}from"react/jsx-runtime";var ka="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)=>Ae("li",{children:Ae("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",ka,K("k-calendar",{size:a})),children:[l&&Ae(we,{children:At(i,m)}),Ae(Y,{calendarView:r,headerText:f,showWeekdays:p,showWeekNumbers:w,showNavigationButtons:b,orientation:"vertical",weekdayCellsText:g,gridLabelledBy:I,children:t.children})]})};h.options=Nt;h.className=ka;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 ha="k-calendar-tr",n=t=>{let{...a}=t;return Lt("tr",{...a,className:s(t.className,ha),role:"row",children:t.children})};n.className=ha;n.moduleName=v;n.folderName=R;import{jsx as It}from"react/jsx-runtime";var Ta="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,Ta),children:a})};A.className=Ta;A.moduleName=v;A.folderName=R;import{jsx as S,jsxs as Ee}from"react/jsx-runtime";var ga=({showOtherCentury:t,...a})=>S(k,{calendarView:"century",calendarTitleText:"2000 - 2099",children:Ee(V,{children:[Ee(n,{children:[S(e,{text:"1990 - 1999"}),S(e,{text:"2000 - 2009"}),S(e,{text:"2010 - 2019",today:!0}),S(e,{text:"2020 - 2029"})]}),Ee(n,{children:[S(e,{text:"2030 - 2039"}),S(e,{text:"2040 - 2049"}),S(e,{text:"2050 - 2059"}),S(e,{text:"2060 - 2069"})]}),Ee(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 Le}from"react/jsx-runtime";var Na=({showOtherDecade:t,...a})=>D(k,{calendarView:"decade",calendarTitleText:"2020 - 2029",children:Le(V,{children:[Le(n,{children:[D(e,{text:"2019",empty:!t}),D(e,{text:"2020"}),D(e,{text:"2021",today:!0}),D(e,{text:"2022"})]}),Le(n,{children:[D(e,{text:"2023"}),D(e,{text:"2024"}),D(e,{text:"2025"}),D(e,{text:"2026"})]}),Le(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 va=({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 mo,jsxs as po}from"react/jsx-runtime";import{jsx as O,jsxs as Ie}from"react/jsx-runtime";var Ra=t=>O(k,{calendarView:"year",calendarTitleText:"2019",children:Ie(V,{children:[Ie(n,{children:[O(e,{text:"Jan"}),O(e,{text:"Feb"}),O(e,{text:"Mar"}),O(e,{text:"Apr"})]}),Ie(n,{children:[O(e,{text:"May"}),O(e,{text:"Jun"}),O(e,{text:"Jul"}),O(e,{text:"Au"})]}),Ie(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 Aa=({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 Ea=({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 La=({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 le}from"react/jsx-runtime";var Ia=({firstCaption:t="2000 - 2099",...a})=>T(h,{calendarView:"century",showWeekdays:!1,calendarTitleText:"2000 - 2099",navigationItems:["1900","2000"],navigationMarkerConfig:{2e3:"marker"},children:le(Ot,{children:[le("colgroup",{children:[T("col",{}),T("col",{}),T("col",{}),T("col",{})]}),le(N,{children:[T(n,{"aria-hidden":"true",children:T(A,{scope:"col",colSpan:4,text:t})}),le(n,{children:[T(e,{text:"1900 - 1999"}),T(e,{text:"2000 - 2009"}),T(e,{text:"2010 - 2019"}),T(e,{text:"2020 - 2029"})]}),le(n,{children:[T(e,{text:"2030 - 2039"}),T(e,{text:"2040 - 2049"}),T(e,{text:"2050 - 2059"}),T(e,{text:"2060 - 2069"})]}),le(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 Oo,jsx as So,jsxs as Do}from"react/jsx-runtime";import{jsx as Ho,jsxs as _o}from"react/jsx-runtime";import{Fragment as Uo,jsx as Wo,jsxs as $o}from"react/jsx-runtime";import{jsx as Me}from"react/jsx-runtime";var zt=k.options,Kt=k.states,Ma={...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"}],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(ga,{size:r.size,showOtherCentury:p,showCalendarFooter:w});case"decade":return Me(Na,{size:r.size,showOtherDecade:f,showCalendarFooter:w});case"year":return Me(Ra,{calendarTitleText:"2021",size:r.size,showCalendarFooter:w});default:return Me(va,{size:r.size,showOtherMonth:m,showCalendarFooter:w})}};ne.options=zt;ne.states=Kt;ne.variants=Bt;ne.defaultOptions=Ma;ne.modifiers=Ht;ne.className=k.className;import{jsx as Se}from"react/jsx-runtime";var _t=h.options,Vt=h.states,Sa={...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"}],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(Ia,{size:r.size,showOtherCentury:p,showCalendarFooter:w});case"decade":return Se(La,{size:r.size,showOtherDecade:f,showCalendarFooter:w});case"year":return Se(Ea,{size:r.size,showCalendarFooter:w});default:return Se(Aa,{size:r.size,showOtherMonth:m,showCalendarFooter:w})}};oe.options=_t;oe.states=Vt;oe.variants=Ft;oe.defaultOptions=Sa;oe.modifiers=Pt;oe.className=h.className;import{jsx as Xe,jsxs as Wt}from"react/jsx-runtime";var Da="k-calendar-thead",Oa={cellsText:["Su","Mo","Tu","We","Th","Fr","Sa"]},te=t=>{let{showWeek:a,cellsText:l=Oa.cellsText,...r}=t;return Xe("thead",{...r,className:s(t.className,Da),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))]})})};te.className=Da;te.defaultOptions=Oa;import{jsx as B,jsxs as De}from"react/jsx-runtime";var za="k-calendar-view",re={orientation:"vertical",calendarView:"month",headerText:"April 2018",showWeekdays:!0,showNavigationButtons:!1},Y=t=>{let{orientation:a=re.orientation,calendarView:l=re.calendarView,headerText:r=re.headerText,showWeekdays:i=re.showWeekdays,showNavigationButtons:m=re.showNavigationButtons,showWeekNumbers:f,weekdayCellsText:p,gridLabelledBy:w,...b}=t;return De("div",{...b,className:s(za,`k-calendar-${l}view`,t.className,{"k-hstack":a==="horizontal","k-vstack":a==="vertical"}),children:[B(G,{showNavigationButtons:m,calendarTitleText:r,orientation:"horizontal"}),i&&De($e,{className:"k-calendar-weekdays",tableRole:"table",children:[De("colgroup",{children:[B("col",{}),B("col",{}),B("col",{}),B("col",{}),B("col",{}),B("col",{}),B("col",{})]}),B(te,{cellsText:p,showWeek:f})]}),De("div",{className:"k-content k-scrollable",role:"none",children:[B($e,{tableRole:"grid",ariaLabelledBy:w,children:t.children}),B("div",{className:"k-scrollable-placeholder",style:{height:"1000px"}})]})]})};Y.className=za;Y.defaultOptions=re;Y.moduleName=v;Y.folderName=R;var Yr=Y;export{Y as CalendarInfiniteView,Yr as default};