@react-spectrum/calendar 3.0.0-nightly.1498 → 3.0.0-nightly.1502
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/main.css +1 -1
- package/dist/main.js +45 -13
- package/dist/main.js.map +1 -1
- package/dist/module.js +47 -15
- package/dist/module.js.map +1 -1
- package/dist/types.d.ts.map +1 -1
- package/package.json +19 -18
- package/src/Calendar.tsx +3 -2
- package/src/CalendarBase.tsx +21 -3
- package/src/CalendarCell.tsx +9 -5
- package/src/RangeCalendar.tsx +3 -2
package/dist/main.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.spectrum-Calendar_6099b6{isolation:isolate;display:block}.spectrum-Calendar--padded_6099b6{margin:32px 24px}.spectrum-Calendar-header_6099b6{display:-ms-grid;width:100%;gap:var(--spectrum-global-dimension-size-300);grid-auto-columns:1fr;grid-auto-flow:column;display:grid}.spectrum-Calendar-monthHeader_6099b6{display:-ms-grid;-ms-grid-columns:minmax(auto,1fr)auto minmax(auto,1fr);width:100%;min-width:calc(var(--spectrum-calendar-day-width,var(--spectrum-global-dimension-size-400))*7);max-width:calc(var(--spectrum-calendar-day-width,var(--spectrum-global-dimension-size-400))*7 + var(--spectrum-calendar-day-padding,4px)*12);padding:0 var(--spectrum-global-dimension-size-40);box-sizing:border-box;grid-template-columns:minmax(auto,1fr) auto minmax(auto,1fr);grid-template-areas:"prev title next";align-content:start;display:grid}.spectrum-Calendar-title_6099b6{font-size:var(--spectrum-calendar-title-text-size,var(--spectrum-global-dimension-font-size-300));font-weight:700;line-height:var(--spectrum-calendar-title-height,var(--spectrum-global-dimension-static-size-400));margin:0 var(--spectrum-global-dimension-size-75);text-align:center;white-space:nowrap;text-overflow:ellipsis;grid-area:title;overflow:hidden}.spectrum-Calendar-prevMonth_6099b6{grid-area:prev;justify-self:start}.spectrum-Calendar-nextMonth_6099b6{grid-area:next;justify-self:end}.spectrum-Calendar-months_6099b6{display:-ms-grid;gap:var(--spectrum-global-dimension-size-300);grid-auto-columns:1fr;grid-auto-flow:column;align-items:start;display:grid}.spectrum-Calendar-dayOfWeek_6099b6{height:100%;width:100%;font-size:var(--spectrum-calendar-day-title-text-size,var(--spectrum-global-dimension-font-size-50));font-weight:var(--spectrum-calendar-day-title-text-font-weight,var(--spectrum-global-font-weight-medium));text-transform:uppercase;cursor:default;flex-direction:column;justify-content:flex-end;display:flex;border-bottom:0!important;text-decoration:none!important}.spectrum-Calendar-dayOfWeek_6099b6[title]{border-bottom:0;text-decoration:underline dotted}.spectrum-Calendar-body_6099b6{outline:0}.spectrum-Calendar-table_6099b6{table-layout:fixed;width:100%;min-width:calc(var(--spectrum-calendar-day-width,var(--spectrum-global-dimension-size-400))*7);max-width:calc(var(--spectrum-calendar-day-width,var(--spectrum-global-dimension-size-400))*7 + var(--spectrum-calendar-day-padding,4px)*12);border-collapse:collapse;border-spacing:0;-webkit-user-select:none;user-select:none}.spectrum-Calendar-tableCell_6099b6{text-align:center;box-sizing:content-box;height:var(--spectrum-calendar-day-height,var(--spectrum-global-dimension-size-400));width:var(--spectrum-calendar-day-width,var(--spectrum-global-dimension-size-400));padding:0;padding:var(--spectrum-calendar-day-padding,4px)0;position:relative}.spectrum-Calendar-tableCell_6099b6:focus{outline:0}.spectrum-Calendar-date_6099b6{box-sizing:border-box;height:var(--spectrum-calendar-day-height,var(--spectrum-global-dimension-size-400));width:100%;margin:var(--spectrum-calendar-day-padding,4px)0;border-radius:var(--spectrum-calendar-day-width,var(--spectrum-global-dimension-size-400));font-size:var(--spectrum-calendar-day-text-size,var(--spectrum-alias-font-size-default));line-height:var(--spectrum-calendar-day-height,var(--spectrum-global-dimension-size-400));white-space:nowrap;cursor:default;transition:background var(--spectrum-global-animation-duration-100,130ms)ease-in-out,color var(--spectrum-global-animation-duration-100,130ms)ease-in-out,border-color var(--spectrum-global-animation-duration-100,130ms)ease-in-out;--margin:calc((100% - var(--spectrum-calendar-day-width,var(--spectrum-global-dimension-size-400)))/2);display:block;position:absolute;top:0;left:0}[dir=ltr] .spectrum-Calendar-date_6099b6 .spectrum-Calendar-dateText_6099b6{margin-left:auto}[dir=rtl] .spectrum-Calendar-date_6099b6 .spectrum-Calendar-dateText_6099b6{margin-right:auto}[dir=ltr] .spectrum-Calendar-date_6099b6 .spectrum-Calendar-dateText_6099b6{margin-right:var(--margin)}[dir=rtl] .spectrum-Calendar-date_6099b6 .spectrum-Calendar-dateText_6099b6{margin-left:var(--margin)}.spectrum-Calendar-date_6099b6 .spectrum-Calendar-dateText_6099b6{width:var(--spectrum-calendar-day-width,var(--spectrum-global-dimension-size-400));margin:0 auto;display:block}.spectrum-Calendar-date_6099b6:focus{outline:0}.spectrum-Calendar-date_6099b6:lang(ja),.spectrum-Calendar-date_6099b6:lang(zh),.spectrum-Calendar-date_6099b6:lang(ko){font-size:var(--spectrum-calendar-day-text-size-han,var(--spectrum-global-dimension-font-size-50))}.spectrum-Calendar-date_6099b6.is-disabled_6099b6{cursor:default;pointer-events:none}.spectrum-Calendar-date_6099b6.is-unavailable_6099b6 .spectrum-Calendar-dateText_6099b6 span{position:relative}.spectrum-Calendar-date_6099b6.is-unavailable_6099b6 .spectrum-Calendar-dateText_6099b6 span:after{content:"";height:2px;background:currentColor;border-radius:1px;position:absolute;top:50%;left:-4px;right:-4px;transform:rotate(-16deg)}.spectrum-Calendar-date_6099b6.is-outsideMonth_6099b6{visibility:hidden}.spectrum-Calendar-date_6099b6:before{border-radius:calc(var(--spectrum-calendar-day-width,var(--spectrum-global-dimension-size-400)) + var(--spectrum-alias-focus-ring-gap,var(--spectrum-global-dimension-static-size-25)));content:"";top:calc(50% - var(--spectrum-calendar-day-width,var(--spectrum-global-dimension-size-400))/2);left:calc(50% - var(--spectrum-calendar-day-width,var(--spectrum-global-dimension-size-400))/2);width:calc(var(--spectrum-calendar-day-width,var(--spectrum-global-dimension-size-400)) + var(--spectrum-alias-focus-ring-gap,var(--spectrum-global-dimension-static-size-25))*2);height:calc(var(--spectrum-calendar-day-height,var(--spectrum-global-dimension-size-400)) + var(--spectrum-alias-focus-ring-gap,var(--spectrum-global-dimension-static-size-25))*2);transition:box-shadow var(--spectrum-global-animation-duration-100,130ms)ease-out,margin var(--spectrum-global-animation-duration-100,130ms)ease-out;margin:0;display:block;position:absolute;transform:translate(0)}.spectrum-Calendar-date_6099b6.is-focused_6099b6:before{margin:calc(var(--spectrum-alias-focus-ring-gap,var(--spectrum-global-dimension-static-size-25))*-1)}.spectrum-Calendar-date_6099b6:after{top:calc(50% - var(--spectrum-calendar-day-width,var(--spectrum-global-dimension-size-400))/2);left:calc(50% - var(--spectrum-calendar-day-width,var(--spectrum-global-dimension-size-400))/2);height:var(--spectrum-calendar-day-height,var(--spectrum-global-dimension-size-400));width:var(--spectrum-calendar-day-width,var(--spectrum-global-dimension-size-400));border-radius:var(--spectrum-calendar-day-width,var(--spectrum-global-dimension-size-400));content:"";z-index:-1;display:block;position:absolute}.spectrum-Calendar-date_6099b6.is-range-selection_6099b6{margin:var(--spectrum-calendar-day-padding,4px)0;line-height:var(--spectrum-calendar-day-height,var(--spectrum-global-dimension-size-400));border-radius:0;border-width:0}[dir=ltr] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-range-start_6099b6,[dir=ltr] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-start_6099b6{border-top-left-radius:var(--spectrum-calendar-day-width,var(--spectrum-global-dimension-size-400))}[dir=rtl] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-range-start_6099b6,[dir=rtl] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-start_6099b6{border-top-right-radius:var(--spectrum-calendar-day-width,var(--spectrum-global-dimension-size-400))}[dir=ltr] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-range-start_6099b6,[dir=ltr] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-start_6099b6{border-bottom-left-radius:var(--spectrum-calendar-day-width,var(--spectrum-global-dimension-size-400))}[dir=rtl] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-range-start_6099b6,[dir=rtl] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-start_6099b6{border-bottom-right-radius:var(--spectrum-calendar-day-width,var(--spectrum-global-dimension-size-400))}[dir=ltr] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-range-start_6099b6,[dir=ltr] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-start_6099b6{left:auto}[dir=rtl] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-range-start_6099b6,[dir=rtl] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-start_6099b6{right:auto}[dir=ltr] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-range-start_6099b6,[dir=ltr] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-start_6099b6{right:0}[dir=rtl] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-range-start_6099b6,[dir=rtl] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-start_6099b6{left:0}.spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-range-start_6099b6,.spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-start_6099b6{width:calc(100% - var(--margin))}[dir=ltr] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-range-start_6099b6:before,[dir=ltr] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-range-start_6099b6:after,[dir=ltr] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-range-start_6099b6 .spectrum-Calendar-dateText_6099b6,[dir=ltr] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-start_6099b6:before,[dir=ltr] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-start_6099b6:after,[dir=ltr] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-start_6099b6 .spectrum-Calendar-dateText_6099b6{left:0}[dir=rtl] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-range-start_6099b6:before,[dir=rtl] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-range-start_6099b6:after,[dir=rtl] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-range-start_6099b6 .spectrum-Calendar-dateText_6099b6,[dir=rtl] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-start_6099b6:before,[dir=rtl] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-start_6099b6:after,[dir=rtl] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-start_6099b6 .spectrum-Calendar-dateText_6099b6{right:0}[dir=ltr] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-range-start_6099b6:after,[dir=ltr] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-range-start_6099b6 .spectrum-Calendar-dateText_6099b6,[dir=ltr] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-start_6099b6:after,[dir=ltr] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-start_6099b6 .spectrum-Calendar-dateText_6099b6{margin-left:0}[dir=rtl] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-range-start_6099b6:after,[dir=rtl] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-range-start_6099b6 .spectrum-Calendar-dateText_6099b6,[dir=rtl] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-start_6099b6:after,[dir=rtl] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-start_6099b6 .spectrum-Calendar-dateText_6099b6{margin-right:0}[dir=ltr] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-range-end_6099b6,[dir=ltr] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-end_6099b6{border-top-right-radius:var(--spectrum-calendar-day-width,var(--spectrum-global-dimension-size-400))}[dir=rtl] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-range-end_6099b6,[dir=rtl] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-end_6099b6{border-top-left-radius:var(--spectrum-calendar-day-width,var(--spectrum-global-dimension-size-400))}[dir=ltr] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-range-end_6099b6,[dir=ltr] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-end_6099b6{border-bottom-right-radius:var(--spectrum-calendar-day-width,var(--spectrum-global-dimension-size-400))}[dir=rtl] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-range-end_6099b6,[dir=rtl] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-end_6099b6{border-bottom-left-radius:var(--spectrum-calendar-day-width,var(--spectrum-global-dimension-size-400))}[dir=ltr] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-range-end_6099b6,[dir=ltr] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-end_6099b6{left:0}[dir=rtl] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-range-end_6099b6,[dir=rtl] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-end_6099b6{right:0}[dir=ltr] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-range-end_6099b6,[dir=ltr] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-end_6099b6{right:var(--margin)}[dir=rtl] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-range-end_6099b6,[dir=rtl] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-end_6099b6{left:var(--margin)}.spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-range-end_6099b6,.spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-end_6099b6{width:auto}[dir=ltr] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-range-end_6099b6:before,[dir=ltr] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-range-end_6099b6:after,[dir=ltr] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-range-end_6099b6 .spectrum-Calendar-dateText_6099b6,[dir=ltr] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-end_6099b6:before,[dir=ltr] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-end_6099b6:after,[dir=ltr] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-end_6099b6 .spectrum-Calendar-dateText_6099b6{left:auto}[dir=rtl] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-range-end_6099b6:before,[dir=rtl] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-range-end_6099b6:after,[dir=rtl] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-range-end_6099b6 .spectrum-Calendar-dateText_6099b6,[dir=rtl] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-end_6099b6:before,[dir=rtl] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-end_6099b6:after,[dir=rtl] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-end_6099b6 .spectrum-Calendar-dateText_6099b6{right:auto}[dir=ltr] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-range-end_6099b6:before,[dir=ltr] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-range-end_6099b6:after,[dir=ltr] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-range-end_6099b6 .spectrum-Calendar-dateText_6099b6,[dir=ltr] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-end_6099b6:before,[dir=ltr] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-end_6099b6:after,[dir=ltr] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-end_6099b6 .spectrum-Calendar-dateText_6099b6{right:0}[dir=rtl] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-range-end_6099b6:before,[dir=rtl] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-range-end_6099b6:after,[dir=rtl] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-range-end_6099b6 .spectrum-Calendar-dateText_6099b6,[dir=rtl] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-end_6099b6:before,[dir=rtl] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-end_6099b6:after,[dir=rtl] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-end_6099b6 .spectrum-Calendar-dateText_6099b6{left:0}[dir=ltr] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-range-end_6099b6:after,[dir=ltr] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-range-end_6099b6 .spectrum-Calendar-dateText_6099b6,[dir=ltr] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-end_6099b6:after,[dir=ltr] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-end_6099b6 .spectrum-Calendar-dateText_6099b6{margin-right:0}[dir=rtl] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-range-end_6099b6:after,[dir=rtl] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-range-end_6099b6 .spectrum-Calendar-dateText_6099b6,[dir=rtl] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-end_6099b6:after,[dir=rtl] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-end_6099b6 .spectrum-Calendar-dateText_6099b6{margin-left:0}[dir=ltr] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-start_6099b6.is-selection-end_6099b6,[dir=ltr] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-start_6099b6.is-range-end_6099b6,[dir=ltr] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-end_6099b6.is-range-start_6099b6,[dir=ltr] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-range-start_6099b6.is-range-end_6099b6{left:0}[dir=rtl] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-start_6099b6.is-selection-end_6099b6,[dir=rtl] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-start_6099b6.is-range-end_6099b6,[dir=rtl] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-end_6099b6.is-range-start_6099b6,[dir=rtl] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-range-start_6099b6.is-range-end_6099b6,[dir=ltr] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-start_6099b6.is-selection-end_6099b6,[dir=ltr] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-start_6099b6.is-range-end_6099b6,[dir=ltr] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-end_6099b6.is-range-start_6099b6,[dir=ltr] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-range-start_6099b6.is-range-end_6099b6{right:0}[dir=rtl] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-start_6099b6.is-selection-end_6099b6,[dir=rtl] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-start_6099b6.is-range-end_6099b6,[dir=rtl] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-end_6099b6.is-range-start_6099b6,[dir=rtl] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-range-start_6099b6.is-range-end_6099b6{left:0}[dir=ltr] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-start_6099b6.is-selection-end_6099b6,[dir=ltr] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-start_6099b6.is-range-end_6099b6,[dir=ltr] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-end_6099b6.is-range-start_6099b6,[dir=ltr] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-range-start_6099b6.is-range-end_6099b6{margin-left:auto}[dir=rtl] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-start_6099b6.is-selection-end_6099b6,[dir=rtl] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-start_6099b6.is-range-end_6099b6,[dir=rtl] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-end_6099b6.is-range-start_6099b6,[dir=rtl] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-range-start_6099b6.is-range-end_6099b6{margin-right:auto}[dir=ltr] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-start_6099b6.is-selection-end_6099b6,[dir=ltr] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-start_6099b6.is-range-end_6099b6,[dir=ltr] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-end_6099b6.is-range-start_6099b6,[dir=ltr] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-range-start_6099b6.is-range-end_6099b6{margin-right:var(--margin)}[dir=rtl] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-start_6099b6.is-selection-end_6099b6,[dir=rtl] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-start_6099b6.is-range-end_6099b6,[dir=rtl] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-end_6099b6.is-range-start_6099b6,[dir=rtl] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-range-start_6099b6.is-range-end_6099b6{margin-left:var(--margin)}.spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-start_6099b6.is-selection-end_6099b6,.spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-start_6099b6.is-range-end_6099b6,.spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-end_6099b6.is-range-start_6099b6,.spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-range-start_6099b6.is-range-end_6099b6{width:var(--spectrum-calendar-day-width,var(--spectrum-global-dimension-size-400));border-radius:var(--spectrum-calendar-day-width,var(--spectrum-global-dimension-size-400))}[dir=ltr] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-start_6099b6.is-selection-end_6099b6:after,[dir=ltr] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-start_6099b6.is-selection-end_6099b6 .spectrum-Calendar-dateText_6099b6,[dir=ltr] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-start_6099b6.is-range-end_6099b6:after,[dir=ltr] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-start_6099b6.is-range-end_6099b6 .spectrum-Calendar-dateText_6099b6,[dir=ltr] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-end_6099b6.is-range-start_6099b6:after,[dir=ltr] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-end_6099b6.is-range-start_6099b6 .spectrum-Calendar-dateText_6099b6,[dir=ltr] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-range-start_6099b6.is-range-end_6099b6:after,[dir=ltr] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-range-start_6099b6.is-range-end_6099b6 .spectrum-Calendar-dateText_6099b6{margin-left:auto}[dir=rtl] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-start_6099b6.is-selection-end_6099b6:after,[dir=rtl] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-start_6099b6.is-selection-end_6099b6 .spectrum-Calendar-dateText_6099b6,[dir=rtl] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-start_6099b6.is-range-end_6099b6:after,[dir=rtl] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-start_6099b6.is-range-end_6099b6 .spectrum-Calendar-dateText_6099b6,[dir=rtl] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-end_6099b6.is-range-start_6099b6:after,[dir=rtl] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-end_6099b6.is-range-start_6099b6 .spectrum-Calendar-dateText_6099b6,[dir=rtl] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-range-start_6099b6.is-range-end_6099b6:after,[dir=rtl] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-range-start_6099b6.is-range-end_6099b6 .spectrum-Calendar-dateText_6099b6{margin-right:auto}[dir=ltr] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-start_6099b6.is-selection-end_6099b6:after,[dir=ltr] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-start_6099b6.is-selection-end_6099b6 .spectrum-Calendar-dateText_6099b6,[dir=ltr] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-start_6099b6.is-range-end_6099b6:after,[dir=ltr] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-start_6099b6.is-range-end_6099b6 .spectrum-Calendar-dateText_6099b6,[dir=ltr] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-end_6099b6.is-range-start_6099b6:after,[dir=ltr] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-end_6099b6.is-range-start_6099b6 .spectrum-Calendar-dateText_6099b6,[dir=ltr] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-range-start_6099b6.is-range-end_6099b6:after,[dir=ltr] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-range-start_6099b6.is-range-end_6099b6 .spectrum-Calendar-dateText_6099b6{margin-right:var(--margin)}[dir=rtl] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-start_6099b6.is-selection-end_6099b6:after,[dir=rtl] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-start_6099b6.is-selection-end_6099b6 .spectrum-Calendar-dateText_6099b6,[dir=rtl] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-start_6099b6.is-range-end_6099b6:after,[dir=rtl] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-start_6099b6.is-range-end_6099b6 .spectrum-Calendar-dateText_6099b6,[dir=rtl] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-end_6099b6.is-range-start_6099b6:after,[dir=rtl] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-end_6099b6.is-range-start_6099b6 .spectrum-Calendar-dateText_6099b6,[dir=rtl] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-range-start_6099b6.is-range-end_6099b6:after,[dir=rtl] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-range-start_6099b6.is-range-end_6099b6 .spectrum-Calendar-dateText_6099b6{margin-left:var(--margin)}.spectrum-Calendar-body_6099b6.is-range-selecting_6099b6 .spectrum-Calendar-date_6099b6{transition:none}.spectrum-Calendar-prevMonth_6099b6,.spectrum-Calendar-nextMonth_6099b6{color:var(--spectrum-calendar-button-icon-color,var(--spectrum-global-color-gray-700))}.spectrum-Calendar-dayOfWeek_6099b6{color:var(--spectrum-calendar-day-title-text-color,var(--spectrum-global-color-gray-700))}.spectrum-Calendar-date_6099b6{--spectrum-calendar-day-background-color-cap-selected:var(--spectrum-global-color-blue-400);--spectrum-calendar-day-background-color-cap-selected-hover:var(--spectrum-global-color-blue-500);--spectrum-calendar-day-background-color-cap-selected-down:var(--spectrum-global-color-blue-600);--spectrum-calendar-day-text-color-cap-selected:white;--spectrum-calendar-day-text-color-cap-selected-hover:white;--spectrum-calendar-day-today-background-color:var(--spectrum-global-color-gray-300);--spectrum-calendar-day-today-background-color-hover:var(--spectrum-global-color-gray-400);--spectrum-calendar-day-today-background-color-down:var(--spectrum-global-color-gray-500);--background:transparent}.spectrum-Calendar-date_6099b6:after{background:var(--background)}.spectrum-Calendar-date_6099b6.is-range-selection_6099b6{background:var(--spectrum-calendar-day-background-color-selected,var(--spectrum-alias-highlight-selected))}.spectrum-Calendar-date_6099b6.is-today_6099b6{color:var(--spectrum-calendar-day-today-text-color,var(--spectrum-global-color-gray-800));border-color:var(--spectrum-calendar-day-today-background-color);--background:var(--spectrum-calendar-day-today-background-color)}.spectrum-Calendar-date_6099b6.is-selected_6099b6:not(.is-range-selection_6099b6),.spectrum-Calendar-date_6099b6.is-selection-start_6099b6,.spectrum-Calendar-date_6099b6.is-selection-end_6099b6{color:var(--spectrum-calendar-day-text-color-cap-selected,var(--spectrum-global-color-gray-900));--background:var(--spectrum-calendar-day-background-color-cap-selected,var(--spectrum-alias-highlight-selected-hover))}.spectrum-Calendar-date_6099b6.is-hovered_6099b6{color:var(--spectrum-calendar-day-text-color-hover,var(--spectrum-global-color-gray-900));--background:var(--spectrum-calendar-day-background-color-hover,var(--spectrum-alias-highlight-hover))}.spectrum-Calendar-date_6099b6.is-hovered_6099b6.is-range-selection_6099b6{color:var(--spectrum-calendar-day-text-color-selected-hover,var(--spectrum-global-color-gray-900));--background:var(--spectrum-alias-highlight-selected)}.spectrum-Calendar-date_6099b6.is-hovered_6099b6.is-today_6099b6{--background:var(--spectrum-calendar-day-today-background-color-hover)}.spectrum-Calendar-date_6099b6.is-hovered_6099b6.is-selected_6099b6:not(.is-range-selection_6099b6),.spectrum-Calendar-date_6099b6.is-hovered_6099b6.is-selection-start_6099b6,.spectrum-Calendar-date_6099b6.is-hovered_6099b6.is-selection-end_6099b6{color:var(--spectrum-calendar-day-text-color-cap-selected-hover);--background:var(--spectrum-calendar-day-background-color-cap-selected-hover)}.spectrum-Calendar-date_6099b6.is-pressed_6099b6{color:var(--spectrum-calendar-day-text-color-hover,var(--spectrum-global-color-gray-900));--background:var(--spectrum-calendar-day-background-color-down,var(--spectrum-alias-highlight-active))}.spectrum-Calendar-date_6099b6.is-pressed_6099b6.is-range-selection_6099b6{color:var(--spectrum-calendar-day-text-color-selected-hover,var(--spectrum-global-color-gray-900));--background:var(--spectrum-alias-highlight-selected-hover)}.spectrum-Calendar-date_6099b6.is-pressed_6099b6.is-today_6099b6{--background:var(--spectrum-calendar-day-today-background-color-down)}.spectrum-Calendar-date_6099b6.is-pressed_6099b6.is-selected_6099b6:not(.is-range-selection_6099b6),.spectrum-Calendar-date_6099b6.is-pressed_6099b6.is-selection-start_6099b6,.spectrum-Calendar-date_6099b6.is-pressed_6099b6.is-selection-end_6099b6{color:var(--spectrum-calendar-day-text-color-cap-selected-hover);--background:var(--spectrum-calendar-day-background-color-cap-selected-down)}.spectrum-Calendar-date_6099b6.is-focused_6099b6:before{box-shadow:0 0 0 var(--spectrum-calendar-day-border-size-key-focus,2px)var(--spectrum-calendar-day-border-color-key-focus,var(--spectrum-alias-focus-color))}.spectrum-Calendar-date_6099b6.is-disabled_6099b6,.spectrum-Calendar-date_6099b6.is-disabled_6099b6.is-today_6099b6{--background:var(--spectrum-calendar-day-background-color-disabled,transparent)}.spectrum-Calendar-date_6099b6.is-disabled_6099b6,.spectrum-Calendar-date_6099b6.is-disabled_6099b6.is-today_6099b6,.spectrum-Calendar-date_6099b6.is-disabled_6099b6.is-selected_6099b6{color:var(--spectrum-calendar-day-text-color-disabled,var(--spectrum-global-color-gray-500))}.spectrum-Calendar-date_6099b6.is-unavailable_6099b6,.spectrum-Calendar-date_6099b6.is-unavailable_6099b6.is-today_6099b6{--background:transparent}
|
|
1
|
+
.spectrum-Calendar_6099b6{isolation:isolate;display:block}.spectrum-Calendar--padded_6099b6{margin:32px 24px}.spectrum-Calendar-header_6099b6{display:-ms-grid;width:100%;gap:var(--spectrum-global-dimension-size-300);grid-auto-columns:1fr;grid-auto-flow:column;display:grid}.spectrum-Calendar-monthHeader_6099b6{display:-ms-grid;-ms-grid-columns:minmax(auto,1fr)auto minmax(auto,1fr);width:100%;min-width:calc(var(--spectrum-calendar-day-width,var(--spectrum-global-dimension-size-400))*7);max-width:calc(var(--spectrum-calendar-day-width,var(--spectrum-global-dimension-size-400))*7 + var(--spectrum-calendar-day-padding,4px)*12);padding:0 var(--spectrum-global-dimension-size-40);box-sizing:border-box;grid-template-columns:minmax(auto,1fr) auto minmax(auto,1fr);grid-template-areas:"prev title next";align-content:start;display:grid}.spectrum-Calendar-title_6099b6{font-size:var(--spectrum-calendar-title-text-size,var(--spectrum-global-dimension-font-size-300));font-weight:700;line-height:var(--spectrum-calendar-title-height,var(--spectrum-global-dimension-static-size-400));margin:0 var(--spectrum-global-dimension-size-75);text-align:center;white-space:nowrap;text-overflow:ellipsis;grid-area:title;overflow:hidden}.spectrum-Calendar-prevMonth_6099b6{grid-area:prev;justify-self:start}.spectrum-Calendar-nextMonth_6099b6{grid-area:next;justify-self:end}.spectrum-Calendar-months_6099b6{display:-ms-grid;gap:var(--spectrum-global-dimension-size-300);grid-auto-columns:1fr;grid-auto-flow:column;align-items:start;display:grid}.spectrum-Calendar-dayOfWeek_6099b6{height:100%;width:100%;font-size:var(--spectrum-calendar-day-title-text-size,var(--spectrum-global-dimension-font-size-50));font-weight:var(--spectrum-calendar-day-title-text-font-weight,var(--spectrum-global-font-weight-medium));text-transform:uppercase;cursor:default;flex-direction:column;justify-content:flex-end;display:flex;border-bottom:0!important;text-decoration:none!important}.spectrum-Calendar-dayOfWeek_6099b6[title]{border-bottom:0;text-decoration:underline dotted}.spectrum-Calendar-body_6099b6{outline:0}.spectrum-Calendar-table_6099b6{table-layout:fixed;width:100%;min-width:calc(var(--spectrum-calendar-day-width,var(--spectrum-global-dimension-size-400))*7);max-width:calc(var(--spectrum-calendar-day-width,var(--spectrum-global-dimension-size-400))*7 + var(--spectrum-calendar-day-padding,4px)*12);border-collapse:collapse;border-spacing:0;-webkit-user-select:none;user-select:none}.spectrum-Calendar-tableCell_6099b6{text-align:center;box-sizing:content-box;height:var(--spectrum-calendar-day-height,var(--spectrum-global-dimension-size-400));width:var(--spectrum-calendar-day-width,var(--spectrum-global-dimension-size-400));padding:0;padding:var(--spectrum-calendar-day-padding,4px)0;position:relative}.spectrum-Calendar-tableCell_6099b6:focus{outline:0}.spectrum-Calendar-date_6099b6{box-sizing:border-box;height:var(--spectrum-calendar-day-height,var(--spectrum-global-dimension-size-400));width:100%;margin:var(--spectrum-calendar-day-padding,4px)0;border-radius:var(--spectrum-calendar-day-width,var(--spectrum-global-dimension-size-400));font-size:var(--spectrum-calendar-day-text-size,var(--spectrum-alias-font-size-default));line-height:var(--spectrum-calendar-day-height,var(--spectrum-global-dimension-size-400));white-space:nowrap;cursor:default;transition:background var(--spectrum-global-animation-duration-100,130ms)ease-in-out,color var(--spectrum-global-animation-duration-100,130ms)ease-in-out,border-color var(--spectrum-global-animation-duration-100,130ms)ease-in-out;--margin:calc((100% - var(--spectrum-calendar-day-width,var(--spectrum-global-dimension-size-400)))/2);display:block;position:absolute;top:0;left:0}[dir=ltr] .spectrum-Calendar-date_6099b6 .spectrum-Calendar-dateText_6099b6{margin-left:auto}[dir=rtl] .spectrum-Calendar-date_6099b6 .spectrum-Calendar-dateText_6099b6{margin-right:auto}[dir=ltr] .spectrum-Calendar-date_6099b6 .spectrum-Calendar-dateText_6099b6{margin-right:var(--margin)}[dir=rtl] .spectrum-Calendar-date_6099b6 .spectrum-Calendar-dateText_6099b6{margin-left:var(--margin)}.spectrum-Calendar-date_6099b6 .spectrum-Calendar-dateText_6099b6{width:var(--spectrum-calendar-day-width,var(--spectrum-global-dimension-size-400));margin:0 auto;display:block}.spectrum-Calendar-date_6099b6:focus{outline:0}.spectrum-Calendar-date_6099b6:lang(ja),.spectrum-Calendar-date_6099b6:lang(zh),.spectrum-Calendar-date_6099b6:lang(ko){font-size:var(--spectrum-calendar-day-text-size-han,var(--spectrum-global-dimension-font-size-50))}.spectrum-Calendar-date_6099b6.is-disabled_6099b6{cursor:default;pointer-events:none}.spectrum-Calendar-date_6099b6.is-unavailable_6099b6 .spectrum-Calendar-dateText_6099b6 span{position:relative}.spectrum-Calendar-date_6099b6.is-unavailable_6099b6 .spectrum-Calendar-dateText_6099b6 span:after{content:"";height:2px;background:currentColor;border-radius:1px;position:absolute;top:50%;left:-4px;right:-4px;transform:rotate(-16deg)}.spectrum-Calendar-date_6099b6.is-outsideMonth_6099b6{visibility:hidden}.spectrum-Calendar-date_6099b6:before{border-radius:calc(var(--spectrum-calendar-day-width,var(--spectrum-global-dimension-size-400)) + var(--spectrum-alias-focus-ring-gap,var(--spectrum-global-dimension-static-size-25)));content:"";top:calc(50% - var(--spectrum-calendar-day-width,var(--spectrum-global-dimension-size-400))/2);left:calc(50% - var(--spectrum-calendar-day-width,var(--spectrum-global-dimension-size-400))/2);width:calc(var(--spectrum-calendar-day-width,var(--spectrum-global-dimension-size-400)) + var(--spectrum-alias-focus-ring-gap,var(--spectrum-global-dimension-static-size-25))*2);height:calc(var(--spectrum-calendar-day-height,var(--spectrum-global-dimension-size-400)) + var(--spectrum-alias-focus-ring-gap,var(--spectrum-global-dimension-static-size-25))*2);transition:box-shadow var(--spectrum-global-animation-duration-100,130ms)ease-out,margin var(--spectrum-global-animation-duration-100,130ms)ease-out;margin:0;display:block;position:absolute;transform:translate(0)}.spectrum-Calendar-date_6099b6.is-focused_6099b6:before{margin:calc(var(--spectrum-alias-focus-ring-gap,var(--spectrum-global-dimension-static-size-25))*-1)}.spectrum-Calendar-date_6099b6:after{top:calc(50% - var(--spectrum-calendar-day-width,var(--spectrum-global-dimension-size-400))/2);left:calc(50% - var(--spectrum-calendar-day-width,var(--spectrum-global-dimension-size-400))/2);height:var(--spectrum-calendar-day-height,var(--spectrum-global-dimension-size-400));width:var(--spectrum-calendar-day-width,var(--spectrum-global-dimension-size-400));border-radius:var(--spectrum-calendar-day-width,var(--spectrum-global-dimension-size-400));content:"";z-index:-1;display:block;position:absolute}.spectrum-Calendar-date_6099b6.is-range-selection_6099b6{margin:var(--spectrum-calendar-day-padding,4px)0;line-height:var(--spectrum-calendar-day-height,var(--spectrum-global-dimension-size-400));border-radius:0;border-width:0}[dir=ltr] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-range-start_6099b6,[dir=ltr] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-start_6099b6{border-top-left-radius:var(--spectrum-calendar-day-width,var(--spectrum-global-dimension-size-400))}[dir=rtl] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-range-start_6099b6,[dir=rtl] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-start_6099b6{border-top-right-radius:var(--spectrum-calendar-day-width,var(--spectrum-global-dimension-size-400))}[dir=ltr] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-range-start_6099b6,[dir=ltr] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-start_6099b6{border-bottom-left-radius:var(--spectrum-calendar-day-width,var(--spectrum-global-dimension-size-400))}[dir=rtl] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-range-start_6099b6,[dir=rtl] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-start_6099b6{border-bottom-right-radius:var(--spectrum-calendar-day-width,var(--spectrum-global-dimension-size-400))}[dir=ltr] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-range-start_6099b6,[dir=ltr] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-start_6099b6{left:auto}[dir=rtl] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-range-start_6099b6,[dir=rtl] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-start_6099b6{right:auto}[dir=ltr] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-range-start_6099b6,[dir=ltr] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-start_6099b6{right:0}[dir=rtl] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-range-start_6099b6,[dir=rtl] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-start_6099b6{left:0}.spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-range-start_6099b6,.spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-start_6099b6{width:calc(100% - var(--margin))}[dir=ltr] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-range-start_6099b6:before,[dir=ltr] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-range-start_6099b6:after,[dir=ltr] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-range-start_6099b6 .spectrum-Calendar-dateText_6099b6,[dir=ltr] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-start_6099b6:before,[dir=ltr] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-start_6099b6:after,[dir=ltr] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-start_6099b6 .spectrum-Calendar-dateText_6099b6{left:0}[dir=rtl] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-range-start_6099b6:before,[dir=rtl] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-range-start_6099b6:after,[dir=rtl] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-range-start_6099b6 .spectrum-Calendar-dateText_6099b6,[dir=rtl] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-start_6099b6:before,[dir=rtl] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-start_6099b6:after,[dir=rtl] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-start_6099b6 .spectrum-Calendar-dateText_6099b6{right:0}[dir=ltr] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-range-start_6099b6:after,[dir=ltr] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-range-start_6099b6 .spectrum-Calendar-dateText_6099b6,[dir=ltr] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-start_6099b6:after,[dir=ltr] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-start_6099b6 .spectrum-Calendar-dateText_6099b6{margin-left:0}[dir=rtl] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-range-start_6099b6:after,[dir=rtl] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-range-start_6099b6 .spectrum-Calendar-dateText_6099b6,[dir=rtl] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-start_6099b6:after,[dir=rtl] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-start_6099b6 .spectrum-Calendar-dateText_6099b6{margin-right:0}[dir=ltr] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-range-end_6099b6,[dir=ltr] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-end_6099b6{border-top-right-radius:var(--spectrum-calendar-day-width,var(--spectrum-global-dimension-size-400))}[dir=rtl] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-range-end_6099b6,[dir=rtl] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-end_6099b6{border-top-left-radius:var(--spectrum-calendar-day-width,var(--spectrum-global-dimension-size-400))}[dir=ltr] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-range-end_6099b6,[dir=ltr] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-end_6099b6{border-bottom-right-radius:var(--spectrum-calendar-day-width,var(--spectrum-global-dimension-size-400))}[dir=rtl] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-range-end_6099b6,[dir=rtl] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-end_6099b6{border-bottom-left-radius:var(--spectrum-calendar-day-width,var(--spectrum-global-dimension-size-400))}[dir=ltr] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-range-end_6099b6,[dir=ltr] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-end_6099b6{left:0}[dir=rtl] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-range-end_6099b6,[dir=rtl] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-end_6099b6{right:0}[dir=ltr] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-range-end_6099b6,[dir=ltr] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-end_6099b6{right:var(--margin)}[dir=rtl] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-range-end_6099b6,[dir=rtl] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-end_6099b6{left:var(--margin)}.spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-range-end_6099b6,.spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-end_6099b6{width:auto}[dir=ltr] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-range-end_6099b6:before,[dir=ltr] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-range-end_6099b6:after,[dir=ltr] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-range-end_6099b6 .spectrum-Calendar-dateText_6099b6,[dir=ltr] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-end_6099b6:before,[dir=ltr] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-end_6099b6:after,[dir=ltr] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-end_6099b6 .spectrum-Calendar-dateText_6099b6{left:auto}[dir=rtl] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-range-end_6099b6:before,[dir=rtl] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-range-end_6099b6:after,[dir=rtl] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-range-end_6099b6 .spectrum-Calendar-dateText_6099b6,[dir=rtl] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-end_6099b6:before,[dir=rtl] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-end_6099b6:after,[dir=rtl] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-end_6099b6 .spectrum-Calendar-dateText_6099b6{right:auto}[dir=ltr] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-range-end_6099b6:before,[dir=ltr] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-range-end_6099b6:after,[dir=ltr] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-range-end_6099b6 .spectrum-Calendar-dateText_6099b6,[dir=ltr] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-end_6099b6:before,[dir=ltr] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-end_6099b6:after,[dir=ltr] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-end_6099b6 .spectrum-Calendar-dateText_6099b6{right:0}[dir=rtl] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-range-end_6099b6:before,[dir=rtl] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-range-end_6099b6:after,[dir=rtl] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-range-end_6099b6 .spectrum-Calendar-dateText_6099b6,[dir=rtl] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-end_6099b6:before,[dir=rtl] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-end_6099b6:after,[dir=rtl] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-end_6099b6 .spectrum-Calendar-dateText_6099b6{left:0}[dir=ltr] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-range-end_6099b6:after,[dir=ltr] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-range-end_6099b6 .spectrum-Calendar-dateText_6099b6,[dir=ltr] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-end_6099b6:after,[dir=ltr] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-end_6099b6 .spectrum-Calendar-dateText_6099b6{margin-right:0}[dir=rtl] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-range-end_6099b6:after,[dir=rtl] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-range-end_6099b6 .spectrum-Calendar-dateText_6099b6,[dir=rtl] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-end_6099b6:after,[dir=rtl] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-end_6099b6 .spectrum-Calendar-dateText_6099b6{margin-left:0}[dir=ltr] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-start_6099b6.is-selection-end_6099b6,[dir=ltr] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-start_6099b6.is-range-end_6099b6,[dir=ltr] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-end_6099b6.is-range-start_6099b6,[dir=ltr] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-range-start_6099b6.is-range-end_6099b6{left:0}[dir=rtl] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-start_6099b6.is-selection-end_6099b6,[dir=rtl] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-start_6099b6.is-range-end_6099b6,[dir=rtl] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-end_6099b6.is-range-start_6099b6,[dir=rtl] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-range-start_6099b6.is-range-end_6099b6,[dir=ltr] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-start_6099b6.is-selection-end_6099b6,[dir=ltr] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-start_6099b6.is-range-end_6099b6,[dir=ltr] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-end_6099b6.is-range-start_6099b6,[dir=ltr] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-range-start_6099b6.is-range-end_6099b6{right:0}[dir=rtl] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-start_6099b6.is-selection-end_6099b6,[dir=rtl] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-start_6099b6.is-range-end_6099b6,[dir=rtl] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-end_6099b6.is-range-start_6099b6,[dir=rtl] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-range-start_6099b6.is-range-end_6099b6{left:0}[dir=ltr] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-start_6099b6.is-selection-end_6099b6,[dir=ltr] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-start_6099b6.is-range-end_6099b6,[dir=ltr] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-end_6099b6.is-range-start_6099b6,[dir=ltr] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-range-start_6099b6.is-range-end_6099b6{margin-left:auto}[dir=rtl] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-start_6099b6.is-selection-end_6099b6,[dir=rtl] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-start_6099b6.is-range-end_6099b6,[dir=rtl] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-end_6099b6.is-range-start_6099b6,[dir=rtl] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-range-start_6099b6.is-range-end_6099b6{margin-right:auto}[dir=ltr] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-start_6099b6.is-selection-end_6099b6,[dir=ltr] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-start_6099b6.is-range-end_6099b6,[dir=ltr] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-end_6099b6.is-range-start_6099b6,[dir=ltr] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-range-start_6099b6.is-range-end_6099b6{margin-right:var(--margin)}[dir=rtl] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-start_6099b6.is-selection-end_6099b6,[dir=rtl] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-start_6099b6.is-range-end_6099b6,[dir=rtl] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-end_6099b6.is-range-start_6099b6,[dir=rtl] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-range-start_6099b6.is-range-end_6099b6{margin-left:var(--margin)}.spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-start_6099b6.is-selection-end_6099b6,.spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-start_6099b6.is-range-end_6099b6,.spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-end_6099b6.is-range-start_6099b6,.spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-range-start_6099b6.is-range-end_6099b6{width:var(--spectrum-calendar-day-width,var(--spectrum-global-dimension-size-400));border-radius:var(--spectrum-calendar-day-width,var(--spectrum-global-dimension-size-400))}[dir=ltr] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-start_6099b6.is-selection-end_6099b6:after,[dir=ltr] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-start_6099b6.is-selection-end_6099b6 .spectrum-Calendar-dateText_6099b6,[dir=ltr] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-start_6099b6.is-range-end_6099b6:after,[dir=ltr] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-start_6099b6.is-range-end_6099b6 .spectrum-Calendar-dateText_6099b6,[dir=ltr] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-end_6099b6.is-range-start_6099b6:after,[dir=ltr] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-end_6099b6.is-range-start_6099b6 .spectrum-Calendar-dateText_6099b6,[dir=ltr] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-range-start_6099b6.is-range-end_6099b6:after,[dir=ltr] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-range-start_6099b6.is-range-end_6099b6 .spectrum-Calendar-dateText_6099b6{margin-left:auto}[dir=rtl] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-start_6099b6.is-selection-end_6099b6:after,[dir=rtl] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-start_6099b6.is-selection-end_6099b6 .spectrum-Calendar-dateText_6099b6,[dir=rtl] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-start_6099b6.is-range-end_6099b6:after,[dir=rtl] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-start_6099b6.is-range-end_6099b6 .spectrum-Calendar-dateText_6099b6,[dir=rtl] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-end_6099b6.is-range-start_6099b6:after,[dir=rtl] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-end_6099b6.is-range-start_6099b6 .spectrum-Calendar-dateText_6099b6,[dir=rtl] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-range-start_6099b6.is-range-end_6099b6:after,[dir=rtl] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-range-start_6099b6.is-range-end_6099b6 .spectrum-Calendar-dateText_6099b6{margin-right:auto}[dir=ltr] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-start_6099b6.is-selection-end_6099b6:after,[dir=ltr] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-start_6099b6.is-selection-end_6099b6 .spectrum-Calendar-dateText_6099b6,[dir=ltr] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-start_6099b6.is-range-end_6099b6:after,[dir=ltr] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-start_6099b6.is-range-end_6099b6 .spectrum-Calendar-dateText_6099b6,[dir=ltr] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-end_6099b6.is-range-start_6099b6:after,[dir=ltr] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-end_6099b6.is-range-start_6099b6 .spectrum-Calendar-dateText_6099b6,[dir=ltr] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-range-start_6099b6.is-range-end_6099b6:after,[dir=ltr] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-range-start_6099b6.is-range-end_6099b6 .spectrum-Calendar-dateText_6099b6{margin-right:var(--margin)}[dir=rtl] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-start_6099b6.is-selection-end_6099b6:after,[dir=rtl] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-start_6099b6.is-selection-end_6099b6 .spectrum-Calendar-dateText_6099b6,[dir=rtl] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-start_6099b6.is-range-end_6099b6:after,[dir=rtl] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-start_6099b6.is-range-end_6099b6 .spectrum-Calendar-dateText_6099b6,[dir=rtl] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-end_6099b6.is-range-start_6099b6:after,[dir=rtl] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-selection-end_6099b6.is-range-start_6099b6 .spectrum-Calendar-dateText_6099b6,[dir=rtl] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-range-start_6099b6.is-range-end_6099b6:after,[dir=rtl] .spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-range-start_6099b6.is-range-end_6099b6 .spectrum-Calendar-dateText_6099b6{margin-left:var(--margin)}.spectrum-Calendar-body_6099b6.is-range-selecting_6099b6 .spectrum-Calendar-date_6099b6{transition:none}.spectrum-Calendar-prevMonth_6099b6,.spectrum-Calendar-nextMonth_6099b6{color:var(--spectrum-calendar-button-icon-color,var(--spectrum-global-color-gray-700))}.spectrum-Calendar-dayOfWeek_6099b6{color:var(--spectrum-calendar-day-title-text-color,var(--spectrum-global-color-gray-700))}.spectrum-Calendar-date_6099b6{--spectrum-calendar-day-background-color-cap-selected:var(--spectrum-global-color-blue-400);--spectrum-calendar-day-background-color-cap-selected-hover:var(--spectrum-global-color-blue-500);--spectrum-calendar-day-background-color-cap-selected-down:var(--spectrum-global-color-blue-600);--spectrum-calendar-day-background-color-cap-invalid-selected:var(--spectrum-global-color-red-500);--spectrum-calendar-day-background-color-cap-invalid-selected-hover:var(--spectrum-global-color-red-600);--spectrum-calendar-day-background-color-cap-invalid-selected-down:var(--spectrum-global-color-red-700);--spectrum-calendar-day-background-color-selected-hover:var(--spectrum-alias-highlight-selected);--spectrum-calendar-day-background-color-invalid-selected:#d7373f26;--spectrum-calendar-day-text-color-cap-selected:white;--spectrum-calendar-day-text-color-cap-selected-hover:white;--spectrum-calendar-day-today-background-color:var(--spectrum-global-color-gray-300);--spectrum-calendar-day-today-background-color-hover:var(--spectrum-global-color-gray-400);--spectrum-calendar-day-today-background-color-down:var(--spectrum-global-color-gray-500);--background:transparent}.spectrum-Calendar-date_6099b6:after{background:var(--background)}.spectrum-Calendar-date_6099b6.is-range-selection_6099b6{background:var(--spectrum-calendar-day-background-color-selected,var(--spectrum-alias-highlight-selected))}.spectrum-Calendar-date_6099b6.is-range-selection_6099b6.is-invalid_6099b6{background:var(--spectrum-calendar-day-background-color-invalid-selected)}.spectrum-Calendar-date_6099b6.is-today_6099b6{color:var(--spectrum-calendar-day-today-text-color,var(--spectrum-global-color-gray-800));border-color:var(--spectrum-calendar-day-today-background-color);--background:var(--spectrum-calendar-day-today-background-color)}.spectrum-Calendar-date_6099b6.is-selected_6099b6:not(.is-range-selection_6099b6),.spectrum-Calendar-date_6099b6.is-selection-start_6099b6,.spectrum-Calendar-date_6099b6.is-selection-end_6099b6{color:var(--spectrum-calendar-day-text-color-cap-selected,var(--spectrum-global-color-gray-900));--background:var(--spectrum-calendar-day-background-color-cap-selected,var(--spectrum-alias-highlight-selected-hover))}.spectrum-Calendar-date_6099b6.is-selected_6099b6:not(.is-range-selection_6099b6).is-invalid_6099b6,.spectrum-Calendar-date_6099b6.is-selection-start_6099b6.is-invalid_6099b6,.spectrum-Calendar-date_6099b6.is-selection-end_6099b6.is-invalid_6099b6{--background:var(--spectrum-calendar-day-background-color-cap-invalid-selected)}.spectrum-Calendar-date_6099b6.is-hovered_6099b6{color:var(--spectrum-calendar-day-text-color-hover,var(--spectrum-global-color-gray-900));--background:var(--spectrum-calendar-day-background-color-hover,var(--spectrum-alias-highlight-hover))}.spectrum-Calendar-date_6099b6.is-hovered_6099b6.is-range-selection_6099b6{color:var(--spectrum-calendar-day-text-color-selected-hover,var(--spectrum-global-color-gray-900));--background:var(--spectrum-calendar-day-background-color-selected-hover,var(--spectrum-alias-highlight-selected-hover))}.spectrum-Calendar-date_6099b6.is-hovered_6099b6.is-range-selection_6099b6.is-invalid_6099b6{--background:var(--spectrum-calendar-day-background-color-invalid-selected)}.spectrum-Calendar-date_6099b6.is-hovered_6099b6.is-today_6099b6{--background:var(--spectrum-calendar-day-today-background-color-hover)}.spectrum-Calendar-date_6099b6.is-hovered_6099b6.is-selected_6099b6:not(.is-range-selection_6099b6),.spectrum-Calendar-date_6099b6.is-hovered_6099b6.is-selection-start_6099b6,.spectrum-Calendar-date_6099b6.is-hovered_6099b6.is-selection-end_6099b6{color:var(--spectrum-calendar-day-text-color-cap-selected-hover);--background:var(--spectrum-calendar-day-background-color-cap-selected-hover)}.spectrum-Calendar-date_6099b6.is-hovered_6099b6.is-selected_6099b6:not(.is-range-selection_6099b6).is-invalid_6099b6,.spectrum-Calendar-date_6099b6.is-hovered_6099b6.is-selection-start_6099b6.is-invalid_6099b6,.spectrum-Calendar-date_6099b6.is-hovered_6099b6.is-selection-end_6099b6.is-invalid_6099b6{--background:var(--spectrum-calendar-day-background-color-cap-invalid-selected-hover)}.spectrum-Calendar-date_6099b6.is-pressed_6099b6{color:var(--spectrum-calendar-day-text-color-hover,var(--spectrum-global-color-gray-900));--background:var(--spectrum-calendar-day-background-color-down,var(--spectrum-alias-highlight-active))}.spectrum-Calendar-date_6099b6.is-pressed_6099b6.is-range-selection_6099b6{color:var(--spectrum-calendar-day-text-color-selected-hover,var(--spectrum-global-color-gray-900));--background:var(--spectrum-calendar-day-background-color-selected-hover,var(--spectrum-alias-highlight-selected-hover))}.spectrum-Calendar-date_6099b6.is-pressed_6099b6.is-range-selection_6099b6.is-invalid_6099b6{--background:var(--spectrum-calendar-day-background-color-invalid-selected)}.spectrum-Calendar-date_6099b6.is-pressed_6099b6.is-today_6099b6{--background:var(--spectrum-calendar-day-today-background-color-down)}.spectrum-Calendar-date_6099b6.is-pressed_6099b6.is-selected_6099b6:not(.is-range-selection_6099b6),.spectrum-Calendar-date_6099b6.is-pressed_6099b6.is-selection-start_6099b6,.spectrum-Calendar-date_6099b6.is-pressed_6099b6.is-selection-end_6099b6{color:var(--spectrum-calendar-day-text-color-cap-selected-hover);--background:var(--spectrum-calendar-day-background-color-cap-selected-down)}.spectrum-Calendar-date_6099b6.is-pressed_6099b6.is-selected_6099b6:not(.is-range-selection_6099b6).is-invalid_6099b6,.spectrum-Calendar-date_6099b6.is-pressed_6099b6.is-selection-start_6099b6.is-invalid_6099b6,.spectrum-Calendar-date_6099b6.is-pressed_6099b6.is-selection-end_6099b6.is-invalid_6099b6{--background:var(--spectrum-calendar-day-background-color-cap-invalid-selected-down)}.spectrum-Calendar-date_6099b6.is-focused_6099b6:before{box-shadow:0 0 0 var(--spectrum-calendar-day-border-size-key-focus,2px)var(--spectrum-calendar-day-border-color-key-focus,var(--spectrum-alias-focus-color))}.spectrum-Calendar-date_6099b6.is-disabled_6099b6,.spectrum-Calendar-date_6099b6.is-disabled_6099b6.is-today_6099b6{--background:var(--spectrum-calendar-day-background-color-disabled,transparent)}.spectrum-Calendar-date_6099b6.is-disabled_6099b6,.spectrum-Calendar-date_6099b6.is-disabled_6099b6.is-today_6099b6,.spectrum-Calendar-date_6099b6.is-disabled_6099b6.is-selected_6099b6{color:var(--spectrum-calendar-day-text-color-disabled,var(--spectrum-global-color-gray-500))}.spectrum-Calendar-date_6099b6.is-unavailable_6099b6:not(.is-selected_6099b6),.spectrum-Calendar-date_6099b6.is-unavailable_6099b6:not(.is-selected_6099b6).is-today_6099b6{--background:transparent}
|
package/dist/main.js
CHANGED
|
@@ -8,6 +8,7 @@ var $4BAFd$reactspectrumbutton = require("@react-spectrum/button");
|
|
|
8
8
|
var $4BAFd$spectrumiconsuiChevronLeftLarge = require("@spectrum-icons/ui/ChevronLeftLarge");
|
|
9
9
|
var $4BAFd$spectrumiconsuiChevronRightLarge = require("@spectrum-icons/ui/ChevronRightLarge");
|
|
10
10
|
var $4BAFd$reactspectrumutils = require("@react-spectrum/utils");
|
|
11
|
+
var $4BAFd$reactspectrumlabel = require("@react-spectrum/label");
|
|
11
12
|
var $4BAFd$reactspectrumprovider = require("@react-spectrum/provider");
|
|
12
13
|
var $4BAFd$reactariavisuallyhidden = require("@react-aria/visually-hidden");
|
|
13
14
|
var $4BAFd$reactariautils = require("@react-aria/utils");
|
|
@@ -71,6 +72,7 @@ $parcel$export($915891ae6206caad$exports, "is-selection-start", () => $915891ae6
|
|
|
71
72
|
$parcel$export($915891ae6206caad$exports, "is-range-end", () => $915891ae6206caad$export$52890a3cb1ab46b, (v) => $915891ae6206caad$export$52890a3cb1ab46b = v);
|
|
72
73
|
$parcel$export($915891ae6206caad$exports, "is-selection-end", () => $915891ae6206caad$export$50722ae5663230f9, (v) => $915891ae6206caad$export$50722ae5663230f9 = v);
|
|
73
74
|
$parcel$export($915891ae6206caad$exports, "is-range-selecting", () => $915891ae6206caad$export$7a763a0407a04336, (v) => $915891ae6206caad$export$7a763a0407a04336 = v);
|
|
75
|
+
$parcel$export($915891ae6206caad$exports, "is-invalid", () => $915891ae6206caad$export$14a30de2866685fa, (v) => $915891ae6206caad$export$14a30de2866685fa = v);
|
|
74
76
|
$parcel$export($915891ae6206caad$exports, "is-today", () => $915891ae6206caad$export$189f6cc7eaf68d8b, (v) => $915891ae6206caad$export$189f6cc7eaf68d8b = v);
|
|
75
77
|
$parcel$export($915891ae6206caad$exports, "is-selected", () => $915891ae6206caad$export$1e0fb04f31d3c22a, (v) => $915891ae6206caad$export$1e0fb04f31d3c22a = v);
|
|
76
78
|
$parcel$export($915891ae6206caad$exports, "is-hovered", () => $915891ae6206caad$export$b8813cd5d7824ce7, (v) => $915891ae6206caad$export$b8813cd5d7824ce7 = v);
|
|
@@ -99,6 +101,7 @@ var $915891ae6206caad$export$f0091c9d6b8c19d3;
|
|
|
99
101
|
var $915891ae6206caad$export$52890a3cb1ab46b;
|
|
100
102
|
var $915891ae6206caad$export$50722ae5663230f9;
|
|
101
103
|
var $915891ae6206caad$export$7a763a0407a04336;
|
|
104
|
+
var $915891ae6206caad$export$14a30de2866685fa;
|
|
102
105
|
var $915891ae6206caad$export$189f6cc7eaf68d8b;
|
|
103
106
|
var $915891ae6206caad$export$1e0fb04f31d3c22a;
|
|
104
107
|
var $915891ae6206caad$export$b8813cd5d7824ce7;
|
|
@@ -127,6 +130,7 @@ $915891ae6206caad$export$f0091c9d6b8c19d3 = "is-selection-start_6099b6";
|
|
|
127
130
|
$915891ae6206caad$export$52890a3cb1ab46b = "is-range-end_6099b6";
|
|
128
131
|
$915891ae6206caad$export$50722ae5663230f9 = "is-selection-end_6099b6";
|
|
129
132
|
$915891ae6206caad$export$7a763a0407a04336 = "is-range-selecting_6099b6";
|
|
133
|
+
$915891ae6206caad$export$14a30de2866685fa = "is-invalid_6099b6";
|
|
130
134
|
$915891ae6206caad$export$189f6cc7eaf68d8b = "is-today_6099b6";
|
|
131
135
|
$915891ae6206caad$export$1e0fb04f31d3c22a = "is-selected_6099b6";
|
|
132
136
|
$915891ae6206caad$export$b8813cd5d7824ce7 = "is-hovered_6099b6";
|
|
@@ -138,15 +142,15 @@ $915891ae6206caad$export$15b73a232798b8d3 = "is-pressed_6099b6";
|
|
|
138
142
|
|
|
139
143
|
function $52c7c3c887827b64$export$5d847498420df57b({ state: state , currentMonth: currentMonth , ...props }) {
|
|
140
144
|
let ref = $4BAFd$react.useRef();
|
|
141
|
-
let { cellProps: cellProps , buttonProps: buttonProps , isPressed: isPressed , isSelected: isSelected , isDisabled: isDisabled , isFocused: isFocused , formattedDate: formattedDate } = $4BAFd$reactariacalendar.useCalendarCell({
|
|
145
|
+
let { cellProps: cellProps , buttonProps: buttonProps , isPressed: isPressed , isSelected: isSelected , isDisabled: isDisabled , isFocused: isFocused , isInvalid: isInvalid , formattedDate: formattedDate } = $4BAFd$reactariacalendar.useCalendarCell({
|
|
142
146
|
...props,
|
|
143
147
|
isDisabled: !$4BAFd$internationalizeddate.isSameMonth(props.date, currentMonth)
|
|
144
148
|
}, state, ref);
|
|
145
149
|
let isUnavailable = state.isCellUnavailable(props.date) && !isDisabled;
|
|
146
|
-
let isLastSelectedBeforeDisabled = !isDisabled && state.isCellUnavailable(props.date.add({
|
|
150
|
+
let isLastSelectedBeforeDisabled = !isDisabled && !isInvalid && state.isCellUnavailable(props.date.add({
|
|
147
151
|
days: 1
|
|
148
152
|
}));
|
|
149
|
-
let isFirstSelectedAfterDisabled = !isDisabled && state.isCellUnavailable(props.date.subtract({
|
|
153
|
+
let isFirstSelectedAfterDisabled = !isDisabled && !isInvalid && state.isCellUnavailable(props.date.subtract({
|
|
150
154
|
days: 1
|
|
151
155
|
}));
|
|
152
156
|
let highlightedRange = 'highlightedRange' in state && state.highlightedRange;
|
|
@@ -170,8 +174,10 @@ function $52c7c3c887827b64$export$5d847498420df57b({ state: state , currentMonth
|
|
|
170
174
|
'is-today': $4BAFd$internationalizeddate.isToday(props.date, state.timeZone),
|
|
171
175
|
'is-selected': isSelected,
|
|
172
176
|
'is-focused': isFocused && isFocusVisible,
|
|
173
|
-
|
|
174
|
-
|
|
177
|
+
// Style disabled (i.e. out of min/max range), but selected dates as unavailable
|
|
178
|
+
// since it is more clear than trying to dim the selection.
|
|
179
|
+
'is-disabled': isDisabled && !isInvalid,
|
|
180
|
+
'is-unavailable': isUnavailable || isInvalid && isDisabled,
|
|
175
181
|
'is-outsideMonth': !$4BAFd$internationalizeddate.isSameMonth(props.date, currentMonth),
|
|
176
182
|
'is-range-start': isRangeStart,
|
|
177
183
|
'is-range-end': isRangeEnd,
|
|
@@ -179,7 +185,8 @@ function $52c7c3c887827b64$export$5d847498420df57b({ state: state , currentMonth
|
|
|
179
185
|
'is-selection-start': isSelectionStart,
|
|
180
186
|
'is-selection-end': isSelectionEnd,
|
|
181
187
|
'is-hovered': isHovered,
|
|
182
|
-
'is-pressed': isPressed && !state.isReadOnly
|
|
188
|
+
'is-pressed': isPressed && !state.isReadOnly,
|
|
189
|
+
'is-invalid': isInvalid
|
|
183
190
|
})
|
|
184
191
|
}, /*#__PURE__*/ ($parcel$interopDefault($4BAFd$react)).createElement("span", {
|
|
185
192
|
className: $4BAFd$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($915891ae6206caad$exports)), 'spectrum-Calendar-dateText')
|
|
@@ -260,12 +267,25 @@ function $02c19eea15a72a7b$export$26e2752316b9a375(props) {
|
|
|
260
267
|
|
|
261
268
|
|
|
262
269
|
|
|
270
|
+
var $66fb2556060f0755$exports = {};
|
|
271
|
+
var $5e9d23939f79d1b1$exports = {};
|
|
272
|
+
$5e9d23939f79d1b1$exports = JSON.parse("{\"invalidSelection\":\"Selected {selectedCount, plural, one {date} other {dates}} unavailable.\"}");
|
|
273
|
+
|
|
274
|
+
|
|
275
|
+
$66fb2556060f0755$exports = {
|
|
276
|
+
"en-US": $5e9d23939f79d1b1$exports
|
|
277
|
+
};
|
|
278
|
+
|
|
279
|
+
|
|
280
|
+
|
|
263
281
|
|
|
264
282
|
|
|
265
283
|
|
|
266
284
|
function $6d416018158e3a26$export$bfd52a43017368fe(props) {
|
|
267
285
|
props = $4BAFd$reactspectrumprovider.useProviderProps(props);
|
|
268
|
-
let { state: state , calendarProps: calendarProps , nextButtonProps: nextButtonProps , prevButtonProps: prevButtonProps , calendarRef: ref , visibleMonths: visibleMonths = 1 } = props;
|
|
286
|
+
let { state: state , calendarProps: calendarProps , nextButtonProps: nextButtonProps , prevButtonProps: prevButtonProps , errorMessageProps: errorMessageProps , calendarRef: ref , visibleMonths: visibleMonths = 1 } = props;
|
|
287
|
+
let { styleProps: styleProps } = $4BAFd$reactspectrumutils.useStyleProps(props);
|
|
288
|
+
let formatMessage = $4BAFd$reactariai18n.useMessageFormatter((/*@__PURE__*/$parcel$interopDefault($66fb2556060f0755$exports)));
|
|
269
289
|
let { direction: direction } = $4BAFd$reactariai18n.useLocale();
|
|
270
290
|
let currentMonth = state.visibleRange.start;
|
|
271
291
|
let monthDateFormatter = $4BAFd$reactariai18n.useDateFormatter({
|
|
@@ -305,14 +325,24 @@ function $6d416018158e3a26$export$bfd52a43017368fe(props) {
|
|
|
305
325
|
}));
|
|
306
326
|
}
|
|
307
327
|
return(/*#__PURE__*/ ($parcel$interopDefault($4BAFd$react)).createElement("div", {
|
|
328
|
+
...styleProps,
|
|
308
329
|
...calendarProps,
|
|
309
330
|
ref: ref,
|
|
310
|
-
className: $4BAFd$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($915891ae6206caad$exports)), 'spectrum-Calendar')
|
|
331
|
+
className: $4BAFd$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($915891ae6206caad$exports)), 'spectrum-Calendar', styleProps.className)
|
|
311
332
|
}, /*#__PURE__*/ ($parcel$interopDefault($4BAFd$react)).createElement("div", {
|
|
312
333
|
className: $4BAFd$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($915891ae6206caad$exports)), 'spectrum-Calendar-header')
|
|
313
334
|
}, titles), /*#__PURE__*/ ($parcel$interopDefault($4BAFd$react)).createElement("div", {
|
|
314
335
|
className: $4BAFd$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($915891ae6206caad$exports)), 'spectrum-Calendar-months')
|
|
315
|
-
}, calendars)))
|
|
336
|
+
}, calendars), state.validationState === 'invalid' && /*#__PURE__*/ ($parcel$interopDefault($4BAFd$react)).createElement($4BAFd$reactspectrumlabel.HelpText, {
|
|
337
|
+
showErrorIcon: true,
|
|
338
|
+
errorMessage: props.errorMessage || formatMessage('invalidSelection', {
|
|
339
|
+
selectedCount: 'highlightedRange' in state ? 2 : 1
|
|
340
|
+
}),
|
|
341
|
+
errorMessageProps: errorMessageProps,
|
|
342
|
+
validationState: "invalid",
|
|
343
|
+
// Intentionally a global class name so it can be targeted in DatePicker CSS...
|
|
344
|
+
UNSAFE_className: "spectrum-Calendar-helpText"
|
|
345
|
+
})));
|
|
316
346
|
}
|
|
317
347
|
|
|
318
348
|
|
|
@@ -337,14 +367,15 @@ function $d9490b77e8681e44$export$e1aef45b828286de(props) {
|
|
|
337
367
|
createCalendar: $4BAFd$internationalizeddate.createCalendar
|
|
338
368
|
});
|
|
339
369
|
let ref = $4BAFd$react.useRef();
|
|
340
|
-
let { calendarProps: calendarProps , prevButtonProps: prevButtonProps , nextButtonProps: nextButtonProps } = $4BAFd$reactariacalendar.useCalendar(props, state);
|
|
370
|
+
let { calendarProps: calendarProps , prevButtonProps: prevButtonProps , nextButtonProps: nextButtonProps , errorMessageProps: errorMessageProps } = $4BAFd$reactariacalendar.useCalendar(props, state);
|
|
341
371
|
return(/*#__PURE__*/ ($parcel$interopDefault($4BAFd$react)).createElement($6d416018158e3a26$export$bfd52a43017368fe, {
|
|
342
372
|
...props,
|
|
343
373
|
state: state,
|
|
344
374
|
calendarRef: ref,
|
|
345
375
|
calendarProps: calendarProps,
|
|
346
376
|
prevButtonProps: prevButtonProps,
|
|
347
|
-
nextButtonProps: nextButtonProps
|
|
377
|
+
nextButtonProps: nextButtonProps,
|
|
378
|
+
errorMessageProps: errorMessageProps
|
|
348
379
|
}));
|
|
349
380
|
}
|
|
350
381
|
|
|
@@ -374,14 +405,15 @@ function $4d045066f2092e3b$export$a4f5c8b89d277a8d(props) {
|
|
|
374
405
|
createCalendar: $4BAFd$internationalizeddate.createCalendar
|
|
375
406
|
});
|
|
376
407
|
let ref = $4BAFd$react.useRef();
|
|
377
|
-
let { calendarProps: calendarProps , prevButtonProps: prevButtonProps , nextButtonProps: nextButtonProps } = $4BAFd$reactariacalendar.useRangeCalendar(props, state, ref);
|
|
408
|
+
let { calendarProps: calendarProps , prevButtonProps: prevButtonProps , nextButtonProps: nextButtonProps , errorMessageProps: errorMessageProps } = $4BAFd$reactariacalendar.useRangeCalendar(props, state, ref);
|
|
378
409
|
return(/*#__PURE__*/ ($parcel$interopDefault($4BAFd$react)).createElement($6d416018158e3a26$export$bfd52a43017368fe, {
|
|
379
410
|
...props,
|
|
380
411
|
state: state,
|
|
381
412
|
calendarRef: ref,
|
|
382
413
|
calendarProps: calendarProps,
|
|
383
414
|
prevButtonProps: prevButtonProps,
|
|
384
|
-
nextButtonProps: nextButtonProps
|
|
415
|
+
nextButtonProps: nextButtonProps,
|
|
416
|
+
errorMessageProps: errorMessageProps
|
|
385
417
|
}));
|
|
386
418
|
}
|
|
387
419
|
|
package/dist/main.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AKAA,GAAmC;AACnC,GAA2C;AAC3C,GAA0C;AAC1C,GAA+C;AAC/C,GAAyC;AACzC,GAA6C;AAC7C,GAA6C;AAC7C,GAA0C;AAC1C,GAA6C;AAC7C,GAAwC;AACxC,GAAyC;AACzC,GAA6C;AAC7C,GAAwC;AACxC,GAA4C;AAC5C,GAA6B;AAC7B,GAAgC;AAChC,GAAiC;AACjC,GAA4B;AAC5B,GAAoC;AACpC,GAAgC;AAChC,GAAoC;AACpC,GAA8B;AAC9B,GAAkC;AAClC,GAAoC;AACpC,GAA0B;AAC1B,GAA6B;AAC7B,GAA4B;AAC5B,GAA4B;AA3B5B,yCAAmC,GAAG,CAA0B;AAChE,yCAA2C,GAAG,CAAkC;AAChF,yCAA0C,GAAG,CAAiC;AAC9E,yCAA+C,GAAG,CAAsC;AACxF,yCAAyC,GAAG,CAAgC;AAC5E,yCAA6C,GAAG,CAAoC;AACpF,yCAA6C,GAAG,CAAoC;AACpF,yCAA0C,GAAG,CAAiC;AAC9E,yCAA6C,GAAG,CAAoC;AACpF,yCAAwC,GAAG,CAA+B;AAC1E,yCAAyC,GAAG,CAAgC;AAC5E,yCAA6C,GAAG,CAAoC;AACpF,yCAAwC,GAAG,CAA+B;AAC1E,yCAA4C,GAAG,CAAmC;AAClF,yCAA6B,GAAG,CAAoB;AACpD,yCAAgC,GAAG,CAAuB;AAC1D,yCAAiC,GAAG,CAAwB;AAC5D,yCAA4B,GAAG,CAAmB;AAClD,yCAAoC,GAAG,CAA2B;AAClE,yCAAgC,GAAG,CAAuB;AAC1D,yCAAo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AChB,GAAG,CAAC,CAAC,gBAAA,aAAa,oBAAE,eAAe,oBAAE,eAAe,EAAA,CAAC,GAAG,oCAAW,CAAC,KAAK,EAAE,KAAK;IAEhF,MAAM,oEACH,yCAAY;WACP,KAAK;QACT,KAAK,EAAE,KAAK;QACZ,WAAW,EAAE,GAAG;QAChB,aAAa,EAAE,aAAa;QAC5B,eAAe,EAAE,eAAe;QAChC,eAAe,EAAE,eAAe;;AAEtC,CAAC;;;;;;;;;;;;SKvBe,yCAAa,CAAsB,KAAoC,EAAE,CAAC;IACxF,GAAG,CAAC,CAAC,gBAAA,aAAa,GAAG,CAAC,EAAA,CAAC,GAAG,KAAK;IAC/B,GAAG,CAAC,eAAe,GAAG,oBAAO,MAAQ,CAAC;YAAA,MAAM,EAAE,aAAa;QAAA,CAAC;MAAG,CAAC;QAAA,aAAa;IAAA,CAAC;IAC9E,GAAG,CAAC,CAAC,SAAA,MAAM,EAAA,CAAC,GAAG,8BAAS;IACxB,GAAG,CAAC,KAAK,GAAG,iDAAqB,CAAC,CAAC;WAC9B,KAAK;gBACR,MAAM;yBACN,eAAe;wBACf,2CAAc;IAChB,CAAC;IAED,GAAG,CAAC,GAAG,GAAG,mBAAM;IAChB,GAAG,CAAC,CAAC,gBAAA,aAAa,oBAAE,eAAe,oBAAE,eAAe,EAAA,CAAC,GAAG,yCAAgB,CAAC,KAAK,EAAE,KAAK,EAAE,GAAG;IAE1F,MAAM,oEACH,yCAAY;WACP,KAAK;QACT,KAAK,EAAE,KAAK;QACZ,WAAW,EAAE,GAAG;QAChB,aAAa,EAAE,aAAa;QAC5B,eAAe,EAAE,eAAe;QAChC,eAAe,EAAE,eAAe;;AAEtC,CAAC;;","sources":["packages/@react-spectrum/calendar/src/index.ts","packages/@react-spectrum/calendar/src/Calendar.tsx","packages/@react-spectrum/calendar/src/CalendarBase.tsx","packages/@react-spectrum/calendar/src/CalendarMonth.tsx","packages/@react-spectrum/calendar/src/CalendarCell.tsx","packages/@adobe/spectrum-css-temp/components/calendar/vars.css","packages/@react-spectrum/calendar/src/RangeCalendar.tsx"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n/// <reference types=\"css-module-types\" />\n\nexport * from './Calendar';\nexport * from './RangeCalendar';\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {CalendarBase} from './CalendarBase';\nimport {createCalendar} from '@internationalized/date';\nimport {DateValue, SpectrumCalendarProps} from '@react-types/calendar';\nimport React, {useMemo, useRef} from 'react';\nimport {useCalendar} from '@react-aria/calendar';\nimport {useCalendarState} from '@react-stately/calendar';\nimport {useLocale} from '@react-aria/i18n';\n\n/**\n * Calendars display a grid of days in one or more months and allow users to select a single date.\n */\nexport function Calendar<T extends DateValue>(props: SpectrumCalendarProps<T>) {\n let {visibleMonths = 1} = props;\n let visibleDuration = useMemo(() => ({months: visibleMonths}), [visibleMonths]);\n let {locale} = useLocale();\n let state = useCalendarState({\n ...props,\n locale,\n visibleDuration,\n createCalendar\n });\n\n let ref = useRef();\n let {calendarProps, prevButtonProps, nextButtonProps} = useCalendar(props, state);\n\n return (\n <CalendarBase\n {...props}\n state={state}\n calendarRef={ref}\n calendarProps={calendarProps}\n prevButtonProps={prevButtonProps}\n nextButtonProps={nextButtonProps} />\n );\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {ActionButton} from '@react-spectrum/button';\nimport {AriaButtonProps} from '@react-types/button';\nimport {CalendarMonth} from './CalendarMonth';\nimport {CalendarPropsBase} from '@react-types/calendar';\nimport {CalendarState, RangeCalendarState} from '@react-stately/calendar';\nimport ChevronLeft from '@spectrum-icons/ui/ChevronLeftLarge';\nimport ChevronRight from '@spectrum-icons/ui/ChevronRightLarge';\nimport {classNames} from '@react-spectrum/utils';\nimport {DOMProps, StyleProps} from '@react-types/shared';\nimport React, {HTMLAttributes, RefObject} from 'react';\nimport styles from '@adobe/spectrum-css-temp/components/calendar/vars.css';\nimport {useDateFormatter, useLocale} from '@react-aria/i18n';\nimport {useProviderProps} from '@react-spectrum/provider';\n\ninterface CalendarBaseProps<T extends CalendarState | RangeCalendarState> extends CalendarPropsBase, DOMProps, StyleProps {\n state: T,\n visibleMonths?: number,\n calendarProps: HTMLAttributes<HTMLElement>,\n nextButtonProps: AriaButtonProps,\n prevButtonProps: AriaButtonProps,\n calendarRef: RefObject<HTMLDivElement>\n}\n\nexport function CalendarBase<T extends CalendarState | RangeCalendarState>(props: CalendarBaseProps<T>) {\n props = useProviderProps(props);\n let {\n state,\n calendarProps,\n nextButtonProps,\n prevButtonProps,\n calendarRef: ref,\n visibleMonths = 1\n } = props;\n let {direction} = useLocale();\n let currentMonth = state.visibleRange.start;\n let monthDateFormatter = useDateFormatter({\n month: 'long',\n year: 'numeric',\n era: currentMonth.calendar.identifier !== 'gregory' ? 'long' : undefined,\n calendar: currentMonth.calendar.identifier,\n timeZone: state.timeZone\n });\n\n let titles = [];\n let calendars = [];\n for (let i = 0; i < visibleMonths; i++) {\n titles.push(\n <div key={i} className={classNames(styles, 'spectrum-Calendar-monthHeader')}>\n {i === 0 &&\n <ActionButton\n {...prevButtonProps}\n UNSAFE_className={classNames(styles, 'spectrum-Calendar-prevMonth')}\n isQuiet>\n {direction === 'rtl' ? <ChevronRight /> : <ChevronLeft />}\n </ActionButton>\n }\n <h2\n className={classNames(styles, 'spectrum-Calendar-title')}>\n {monthDateFormatter.format(currentMonth.add({months: i}).toDate(state.timeZone))}\n </h2>\n {i === visibleMonths - 1 &&\n <ActionButton\n {...nextButtonProps}\n UNSAFE_className={classNames(styles, 'spectrum-Calendar-nextMonth')}\n isQuiet>\n {direction === 'rtl' ? <ChevronLeft /> : <ChevronRight />}\n </ActionButton>\n }\n </div>\n );\n\n let d = currentMonth.add({months: i});\n calendars.push(\n <CalendarMonth\n {...props}\n key={`${d.year}-${d.month}-${d.day}`}\n state={state}\n startDate={d} />\n );\n }\n\n return (\n <div\n {...calendarProps}\n ref={ref}\n className={\n classNames(styles,\n 'spectrum-Calendar'\n )\n }>\n <div className={classNames(styles, 'spectrum-Calendar-header')}>\n {titles}\n </div>\n <div className={classNames(styles, 'spectrum-Calendar-months')}>\n {calendars}\n </div>\n </div>\n );\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {CalendarCell} from './CalendarCell';\nimport {CalendarDate, endOfMonth, getWeeksInMonth, startOfWeek} from '@internationalized/date';\nimport {CalendarPropsBase} from '@react-types/calendar';\nimport {CalendarState, RangeCalendarState} from '@react-stately/calendar';\nimport {classNames} from '@react-spectrum/utils';\nimport {DOMProps, StyleProps} from '@react-types/shared';\nimport React, {useEffect, useState} from 'react';\nimport styles from '@adobe/spectrum-css-temp/components/calendar/vars.css';\nimport {useCalendarGrid} from '@react-aria/calendar';\nimport {useLocale} from '@react-aria/i18n';\nimport {useProviderProps} from '@react-spectrum/provider';\nimport {VisuallyHidden} from '@react-aria/visually-hidden';\n\ninterface CalendarMonthProps extends CalendarPropsBase, DOMProps, StyleProps {\n state: CalendarState | RangeCalendarState,\n startDate: CalendarDate\n}\n\nexport function CalendarMonth(props: CalendarMonthProps) {\n props = useProviderProps(props);\n let {\n state,\n startDate\n } = props;\n let {\n gridProps,\n weekDays\n } = useCalendarGrid({\n ...props,\n endDate: endOfMonth(startDate)\n }, state);\n\n let {locale} = useLocale();\n let monthStart = startOfWeek(startDate, locale);\n let weeksInMonth = getWeeksInMonth(startDate, locale);\n\n let [isRangeSelecting, setRangeSelecting] = useState(false);\n let hasAnchorDate = 'anchorDate' in state && state.anchorDate != null;\n\n // Update isRangeSelecting immediately when it becomes true.\n // This feels weird but is actually fine...\n // https://reactjs.org/docs/hooks-faq.html#how-do-i-implement-getderivedstatefromprops\n if (hasAnchorDate && !isRangeSelecting) {\n setRangeSelecting(true);\n }\n\n // Delay removing the is-range-selecting class for a frame after selection ends.\n // This avoids an undesired animation on touch devices.\n useEffect(() => {\n if (!hasAnchorDate && isRangeSelecting) {\n let raf = requestAnimationFrame(() => setRangeSelecting(false));\n return () => cancelAnimationFrame(raf);\n }\n }, [hasAnchorDate, isRangeSelecting]);\n\n return (\n <table\n {...gridProps}\n className={classNames(styles, 'spectrum-Calendar-body', 'spectrum-Calendar-table', {'is-range-selecting': isRangeSelecting})}>\n <thead>\n <tr>\n {weekDays.map((day, index) => (\n <th\n key={index}\n className={classNames(styles, 'spectrum-Calendar-tableCell')}>\n {/* Make sure screen readers read the full day name, but we show an abbreviation visually. */}\n <VisuallyHidden>{day.long}</VisuallyHidden>\n <span aria-hidden=\"true\" className={classNames(styles, 'spectrum-Calendar-dayOfWeek')}>\n {day.narrow}\n </span>\n </th>\n ))}\n </tr>\n </thead>\n <tbody>\n {[...new Array(weeksInMonth).keys()].map(weekIndex => (\n <tr key={weekIndex}>\n {[...new Array(7).keys()].map(dayIndex => (\n <CalendarCell\n key={dayIndex}\n state={state}\n date={monthStart.add({weeks: weekIndex, days: dayIndex})}\n currentMonth={startDate} />\n ))}\n </tr>\n ))}\n </tbody>\n </table>\n );\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {AriaCalendarCellProps, useCalendarCell} from '@react-aria/calendar';\nimport {CalendarDate, getDayOfWeek, isSameDay, isSameMonth, isToday} from '@internationalized/date';\nimport {CalendarState, RangeCalendarState} from '@react-stately/calendar';\nimport {classNames} from '@react-spectrum/utils';\nimport {mergeProps} from '@react-aria/utils';\nimport React, {useRef} from 'react';\nimport styles from '@adobe/spectrum-css-temp/components/calendar/vars.css';\nimport {useFocusRing} from '@react-aria/focus';\nimport {useHover} from '@react-aria/interactions';\nimport {useLocale} from '@react-aria/i18n';\n\ninterface CalendarCellProps extends AriaCalendarCellProps {\n state: CalendarState | RangeCalendarState,\n currentMonth: CalendarDate\n}\n\nexport function CalendarCell({state, currentMonth, ...props}: CalendarCellProps) {\n let ref = useRef<HTMLElement>();\n let {\n cellProps,\n buttonProps,\n isPressed,\n isSelected,\n isDisabled,\n isFocused,\n formattedDate\n } = useCalendarCell({\n ...props,\n isDisabled: !isSameMonth(props.date, currentMonth)\n }, state, ref);\n let isUnavailable = state.isCellUnavailable(props.date) && !isDisabled;\n let isLastSelectedBeforeDisabled = !isDisabled && state.isCellUnavailable(props.date.add({days: 1}));\n let isFirstSelectedAfterDisabled = !isDisabled && state.isCellUnavailable(props.date.subtract({days: 1}));\n let highlightedRange = 'highlightedRange' in state && state.highlightedRange;\n let isSelectionStart = isSelected && highlightedRange && isSameDay(props.date, highlightedRange.start);\n let isSelectionEnd = isSelected && highlightedRange && isSameDay(props.date, highlightedRange.end);\n let {locale} = useLocale();\n let dayOfWeek = getDayOfWeek(props.date, locale);\n let isRangeStart = isSelected && (isFirstSelectedAfterDisabled || dayOfWeek === 0 || props.date.day === 1);\n let isRangeEnd = isSelected && (isLastSelectedBeforeDisabled || dayOfWeek === 6 || props.date.day === currentMonth.calendar.getDaysInMonth(currentMonth));\n let {focusProps, isFocusVisible} = useFocusRing();\n let {hoverProps, isHovered} = useHover({isDisabled: isDisabled || isUnavailable || state.isReadOnly});\n\n return (\n <td\n {...cellProps}\n className={classNames(styles, 'spectrum-Calendar-tableCell')}>\n <span\n {...mergeProps(buttonProps, hoverProps, focusProps)}\n ref={ref}\n className={classNames(styles, 'spectrum-Calendar-date', {\n 'is-today': isToday(props.date, state.timeZone),\n 'is-selected': isSelected,\n 'is-focused': isFocused && isFocusVisible,\n 'is-disabled': isDisabled,\n 'is-unavailable': isUnavailable,\n 'is-outsideMonth': !isSameMonth(props.date, currentMonth),\n 'is-range-start': isRangeStart,\n 'is-range-end': isRangeEnd,\n 'is-range-selection': isSelected && 'highlightedRange' in state,\n 'is-selection-start': isSelectionStart,\n 'is-selection-end': isSelectionEnd,\n 'is-hovered': isHovered,\n 'is-pressed': isPressed && !state.isReadOnly\n })}>\n <span className={classNames(styles, 'spectrum-Calendar-dateText')}>\n <span>{formattedDate}</span>\n </span>\n </span>\n </td>\n );\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n@import './index.css';\n@import './skin.css';\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {CalendarBase} from './CalendarBase';\nimport {createCalendar} from '@internationalized/date';\nimport {DateValue, SpectrumRangeCalendarProps} from '@react-types/calendar';\nimport React, {useMemo, useRef} from 'react';\nimport {useLocale} from '@react-aria/i18n';\nimport {useRangeCalendar} from '@react-aria/calendar';\nimport {useRangeCalendarState} from '@react-stately/calendar';\n\n/**\n * RangeCalendars display a grid of days in one or more months and allow users to select a contiguous range of dates.\n */\nexport function RangeCalendar<T extends DateValue>(props: SpectrumRangeCalendarProps<T>) {\n let {visibleMonths = 1} = props;\n let visibleDuration = useMemo(() => ({months: visibleMonths}), [visibleMonths]);\n let {locale} = useLocale();\n let state = useRangeCalendarState({\n ...props,\n locale,\n visibleDuration,\n createCalendar\n });\n\n let ref = useRef();\n let {calendarProps, prevButtonProps, nextButtonProps} = useRangeCalendar(props, state, ref);\n\n return (\n <CalendarBase\n {...props}\n state={state}\n calendarRef={ref}\n calendarProps={calendarProps}\n prevButtonProps={prevButtonProps}\n nextButtonProps={nextButtonProps} />\n );\n}\n"],"names":[],"version":3,"file":"main.js.map"}
|
|
1
|
+
{"mappings":";;;;;;;;;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IAC9E,GAAG,CAAC,CAAC,SAAA,MAAM,EAAA,CAAC,GAAG,8BAAS;IACxB,GAAG,CAAC,KAAK,GAAG,iDAAqB,CAAC,CAAC;WAC9B,KAAK;gBACR,MAAM;yBACN,eAAe;wBACf,2CAAc;IAChB,CAAC;IAED,GAAG,CAAC,GAAG,GAAG,mBAAM;IAChB,GAAG,CAAC,CAAC,gBAAA,aAAa,oBAAE,eAAe,oBAAE,eAAe,sBAAE,iBAAiB,EAAA,CAAC,GAAG,yCAAgB,CAAC,KAAK,EAAE,KAAK,EAAE,GAAG;IAE7G,MAAM,oEACH,yCAAY;WACP,KAAK;QACT,KAAK,EAAE,KAAK;QACZ,WAAW,EAAE,GAAG;QAChB,aAAa,EAAE,aAAa;QAC5B,eAAe,EAAE,eAAe;QAChC,eAAe,EAAE,eAAe;QAChC,iBAAiB,EAAE,iBAAiB;;AAE1C,CAAC;;","sources":["packages/@react-spectrum/calendar/src/index.ts","packages/@react-spectrum/calendar/src/Calendar.tsx","packages/@react-spectrum/calendar/src/CalendarBase.tsx","packages/@react-spectrum/calendar/src/CalendarMonth.tsx","packages/@react-spectrum/calendar/src/CalendarCell.tsx","packages/@adobe/spectrum-css-temp/components/calendar/vars.css","packages/@react-spectrum/calendar/intl/*.js","packages/@react-spectrum/calendar/intl/en-US.json","packages/@react-spectrum/calendar/src/RangeCalendar.tsx"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n/// <reference types=\"css-module-types\" />\n\nexport * from './Calendar';\nexport * from './RangeCalendar';\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {CalendarBase} from './CalendarBase';\nimport {createCalendar} from '@internationalized/date';\nimport {DateValue, SpectrumCalendarProps} from '@react-types/calendar';\nimport React, {useMemo, useRef} from 'react';\nimport {useCalendar} from '@react-aria/calendar';\nimport {useCalendarState} from '@react-stately/calendar';\nimport {useLocale} from '@react-aria/i18n';\n\n/**\n * Calendars display a grid of days in one or more months and allow users to select a single date.\n */\nexport function Calendar<T extends DateValue>(props: SpectrumCalendarProps<T>) {\n let {visibleMonths = 1} = props;\n let visibleDuration = useMemo(() => ({months: visibleMonths}), [visibleMonths]);\n let {locale} = useLocale();\n let state = useCalendarState({\n ...props,\n locale,\n visibleDuration,\n createCalendar\n });\n\n let ref = useRef();\n let {calendarProps, prevButtonProps, nextButtonProps, errorMessageProps} = useCalendar(props, state);\n\n return (\n <CalendarBase\n {...props}\n state={state}\n calendarRef={ref}\n calendarProps={calendarProps}\n prevButtonProps={prevButtonProps}\n nextButtonProps={nextButtonProps}\n errorMessageProps={errorMessageProps} />\n );\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {ActionButton} from '@react-spectrum/button';\nimport {AriaButtonProps} from '@react-types/button';\nimport {CalendarMonth} from './CalendarMonth';\nimport {CalendarPropsBase} from '@react-types/calendar';\nimport {CalendarState, RangeCalendarState} from '@react-stately/calendar';\nimport ChevronLeft from '@spectrum-icons/ui/ChevronLeftLarge';\nimport ChevronRight from '@spectrum-icons/ui/ChevronRightLarge';\nimport {classNames, useStyleProps} from '@react-spectrum/utils';\nimport {DOMProps, StyleProps} from '@react-types/shared';\nimport {HelpText} from '@react-spectrum/label';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport React, {HTMLAttributes, RefObject} from 'react';\nimport styles from '@adobe/spectrum-css-temp/components/calendar/vars.css';\nimport {useDateFormatter, useLocale, useMessageFormatter} from '@react-aria/i18n';\nimport {useProviderProps} from '@react-spectrum/provider';\n\ninterface CalendarBaseProps<T extends CalendarState | RangeCalendarState> extends CalendarPropsBase, DOMProps, StyleProps {\n state: T,\n visibleMonths?: number,\n calendarProps: HTMLAttributes<HTMLElement>,\n nextButtonProps: AriaButtonProps,\n prevButtonProps: AriaButtonProps,\n errorMessageProps: HTMLAttributes<HTMLElement>,\n calendarRef: RefObject<HTMLDivElement>\n}\n\nexport function CalendarBase<T extends CalendarState | RangeCalendarState>(props: CalendarBaseProps<T>) {\n props = useProviderProps(props);\n let {\n state,\n calendarProps,\n nextButtonProps,\n prevButtonProps,\n errorMessageProps,\n calendarRef: ref,\n visibleMonths = 1\n } = props;\n let {styleProps} = useStyleProps(props);\n let formatMessage = useMessageFormatter(intlMessages);\n let {direction} = useLocale();\n let currentMonth = state.visibleRange.start;\n let monthDateFormatter = useDateFormatter({\n month: 'long',\n year: 'numeric',\n era: currentMonth.calendar.identifier !== 'gregory' ? 'long' : undefined,\n calendar: currentMonth.calendar.identifier,\n timeZone: state.timeZone\n });\n\n let titles = [];\n let calendars = [];\n for (let i = 0; i < visibleMonths; i++) {\n titles.push(\n <div key={i} className={classNames(styles, 'spectrum-Calendar-monthHeader')}>\n {i === 0 &&\n <ActionButton\n {...prevButtonProps}\n UNSAFE_className={classNames(styles, 'spectrum-Calendar-prevMonth')}\n isQuiet>\n {direction === 'rtl' ? <ChevronRight /> : <ChevronLeft />}\n </ActionButton>\n }\n <h2\n className={classNames(styles, 'spectrum-Calendar-title')}>\n {monthDateFormatter.format(currentMonth.add({months: i}).toDate(state.timeZone))}\n </h2>\n {i === visibleMonths - 1 &&\n <ActionButton\n {...nextButtonProps}\n UNSAFE_className={classNames(styles, 'spectrum-Calendar-nextMonth')}\n isQuiet>\n {direction === 'rtl' ? <ChevronLeft /> : <ChevronRight />}\n </ActionButton>\n }\n </div>\n );\n\n let d = currentMonth.add({months: i});\n calendars.push(\n <CalendarMonth\n {...props}\n key={`${d.year}-${d.month}-${d.day}`}\n state={state}\n startDate={d} />\n );\n }\n\n return (\n <div\n {...styleProps}\n {...calendarProps}\n ref={ref}\n className={\n classNames(styles,\n 'spectrum-Calendar',\n styleProps.className\n )\n }>\n <div className={classNames(styles, 'spectrum-Calendar-header')}>\n {titles}\n </div>\n <div className={classNames(styles, 'spectrum-Calendar-months')}>\n {calendars}\n </div>\n {state.validationState === 'invalid' &&\n <HelpText\n showErrorIcon\n errorMessage={props.errorMessage || formatMessage('invalidSelection', {selectedCount: 'highlightedRange' in state ? 2 : 1})}\n errorMessageProps={errorMessageProps}\n validationState=\"invalid\"\n // Intentionally a global class name so it can be targeted in DatePicker CSS...\n UNSAFE_className=\"spectrum-Calendar-helpText\" />\n }\n </div>\n );\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {CalendarCell} from './CalendarCell';\nimport {CalendarDate, endOfMonth, getWeeksInMonth, startOfWeek} from '@internationalized/date';\nimport {CalendarPropsBase} from '@react-types/calendar';\nimport {CalendarState, RangeCalendarState} from '@react-stately/calendar';\nimport {classNames} from '@react-spectrum/utils';\nimport {DOMProps, StyleProps} from '@react-types/shared';\nimport React, {useEffect, useState} from 'react';\nimport styles from '@adobe/spectrum-css-temp/components/calendar/vars.css';\nimport {useCalendarGrid} from '@react-aria/calendar';\nimport {useLocale} from '@react-aria/i18n';\nimport {useProviderProps} from '@react-spectrum/provider';\nimport {VisuallyHidden} from '@react-aria/visually-hidden';\n\ninterface CalendarMonthProps extends CalendarPropsBase, DOMProps, StyleProps {\n state: CalendarState | RangeCalendarState,\n startDate: CalendarDate\n}\n\nexport function CalendarMonth(props: CalendarMonthProps) {\n props = useProviderProps(props);\n let {\n state,\n startDate\n } = props;\n let {\n gridProps,\n weekDays\n } = useCalendarGrid({\n ...props,\n endDate: endOfMonth(startDate)\n }, state);\n\n let {locale} = useLocale();\n let monthStart = startOfWeek(startDate, locale);\n let weeksInMonth = getWeeksInMonth(startDate, locale);\n\n let [isRangeSelecting, setRangeSelecting] = useState(false);\n let hasAnchorDate = 'anchorDate' in state && state.anchorDate != null;\n\n // Update isRangeSelecting immediately when it becomes true.\n // This feels weird but is actually fine...\n // https://reactjs.org/docs/hooks-faq.html#how-do-i-implement-getderivedstatefromprops\n if (hasAnchorDate && !isRangeSelecting) {\n setRangeSelecting(true);\n }\n\n // Delay removing the is-range-selecting class for a frame after selection ends.\n // This avoids an undesired animation on touch devices.\n useEffect(() => {\n if (!hasAnchorDate && isRangeSelecting) {\n let raf = requestAnimationFrame(() => setRangeSelecting(false));\n return () => cancelAnimationFrame(raf);\n }\n }, [hasAnchorDate, isRangeSelecting]);\n\n return (\n <table\n {...gridProps}\n className={classNames(styles, 'spectrum-Calendar-body', 'spectrum-Calendar-table', {'is-range-selecting': isRangeSelecting})}>\n <thead>\n <tr>\n {weekDays.map((day, index) => (\n <th\n key={index}\n className={classNames(styles, 'spectrum-Calendar-tableCell')}>\n {/* Make sure screen readers read the full day name, but we show an abbreviation visually. */}\n <VisuallyHidden>{day.long}</VisuallyHidden>\n <span aria-hidden=\"true\" className={classNames(styles, 'spectrum-Calendar-dayOfWeek')}>\n {day.narrow}\n </span>\n </th>\n ))}\n </tr>\n </thead>\n <tbody>\n {[...new Array(weeksInMonth).keys()].map(weekIndex => (\n <tr key={weekIndex}>\n {[...new Array(7).keys()].map(dayIndex => (\n <CalendarCell\n key={dayIndex}\n state={state}\n date={monthStart.add({weeks: weekIndex, days: dayIndex})}\n currentMonth={startDate} />\n ))}\n </tr>\n ))}\n </tbody>\n </table>\n );\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {AriaCalendarCellProps, useCalendarCell} from '@react-aria/calendar';\nimport {CalendarDate, getDayOfWeek, isSameDay, isSameMonth, isToday} from '@internationalized/date';\nimport {CalendarState, RangeCalendarState} from '@react-stately/calendar';\nimport {classNames} from '@react-spectrum/utils';\nimport {mergeProps} from '@react-aria/utils';\nimport React, {useRef} from 'react';\nimport styles from '@adobe/spectrum-css-temp/components/calendar/vars.css';\nimport {useFocusRing} from '@react-aria/focus';\nimport {useHover} from '@react-aria/interactions';\nimport {useLocale} from '@react-aria/i18n';\n\ninterface CalendarCellProps extends AriaCalendarCellProps {\n state: CalendarState | RangeCalendarState,\n currentMonth: CalendarDate\n}\n\nexport function CalendarCell({state, currentMonth, ...props}: CalendarCellProps) {\n let ref = useRef<HTMLElement>();\n let {\n cellProps,\n buttonProps,\n isPressed,\n isSelected,\n isDisabled,\n isFocused,\n isInvalid,\n formattedDate\n } = useCalendarCell({\n ...props,\n isDisabled: !isSameMonth(props.date, currentMonth)\n }, state, ref);\n let isUnavailable = state.isCellUnavailable(props.date) && !isDisabled;\n let isLastSelectedBeforeDisabled = !isDisabled && !isInvalid && state.isCellUnavailable(props.date.add({days: 1}));\n let isFirstSelectedAfterDisabled = !isDisabled && !isInvalid && state.isCellUnavailable(props.date.subtract({days: 1}));\n let highlightedRange = 'highlightedRange' in state && state.highlightedRange;\n let isSelectionStart = isSelected && highlightedRange && isSameDay(props.date, highlightedRange.start);\n let isSelectionEnd = isSelected && highlightedRange && isSameDay(props.date, highlightedRange.end);\n let {locale} = useLocale();\n let dayOfWeek = getDayOfWeek(props.date, locale);\n let isRangeStart = isSelected && (isFirstSelectedAfterDisabled || dayOfWeek === 0 || props.date.day === 1);\n let isRangeEnd = isSelected && (isLastSelectedBeforeDisabled || dayOfWeek === 6 || props.date.day === currentMonth.calendar.getDaysInMonth(currentMonth));\n let {focusProps, isFocusVisible} = useFocusRing();\n let {hoverProps, isHovered} = useHover({isDisabled: isDisabled || isUnavailable || state.isReadOnly});\n\n return (\n <td\n {...cellProps}\n className={classNames(styles, 'spectrum-Calendar-tableCell')}>\n <span\n {...mergeProps(buttonProps, hoverProps, focusProps)}\n ref={ref}\n className={classNames(styles, 'spectrum-Calendar-date', {\n 'is-today': isToday(props.date, state.timeZone),\n 'is-selected': isSelected,\n 'is-focused': isFocused && isFocusVisible,\n // Style disabled (i.e. out of min/max range), but selected dates as unavailable\n // since it is more clear than trying to dim the selection.\n 'is-disabled': isDisabled && !isInvalid,\n 'is-unavailable': isUnavailable || (isInvalid && isDisabled),\n 'is-outsideMonth': !isSameMonth(props.date, currentMonth),\n 'is-range-start': isRangeStart,\n 'is-range-end': isRangeEnd,\n 'is-range-selection': isSelected && 'highlightedRange' in state,\n 'is-selection-start': isSelectionStart,\n 'is-selection-end': isSelectionEnd,\n 'is-hovered': isHovered,\n 'is-pressed': isPressed && !state.isReadOnly,\n 'is-invalid': isInvalid\n })}>\n <span className={classNames(styles, 'spectrum-Calendar-dateText')}>\n <span>{formattedDate}</span>\n </span>\n </span>\n </td>\n );\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n@import './index.css';\n@import './skin.css';\n","const _temp0 = require(\"./en-US.json\");\nmodule.exports = {\n \"en-US\": _temp0\n}","{\n \"invalidSelection\": \"Selected {selectedCount, plural, one {date} other {dates}} unavailable.\"\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {CalendarBase} from './CalendarBase';\nimport {createCalendar} from '@internationalized/date';\nimport {DateValue, SpectrumRangeCalendarProps} from '@react-types/calendar';\nimport React, {useMemo, useRef} from 'react';\nimport {useLocale} from '@react-aria/i18n';\nimport {useRangeCalendar} from '@react-aria/calendar';\nimport {useRangeCalendarState} from '@react-stately/calendar';\n\n/**\n * RangeCalendars display a grid of days in one or more months and allow users to select a contiguous range of dates.\n */\nexport function RangeCalendar<T extends DateValue>(props: SpectrumRangeCalendarProps<T>) {\n let {visibleMonths = 1} = props;\n let visibleDuration = useMemo(() => ({months: visibleMonths}), [visibleMonths]);\n let {locale} = useLocale();\n let state = useRangeCalendarState({\n ...props,\n locale,\n visibleDuration,\n createCalendar\n });\n\n let ref = useRef();\n let {calendarProps, prevButtonProps, nextButtonProps, errorMessageProps} = useRangeCalendar(props, state, ref);\n\n return (\n <CalendarBase\n {...props}\n state={state}\n calendarRef={ref}\n calendarProps={calendarProps}\n prevButtonProps={prevButtonProps}\n nextButtonProps={nextButtonProps}\n errorMessageProps={errorMessageProps} />\n );\n}\n"],"names":[],"version":3,"file":"main.js.map"}
|
package/dist/module.js
CHANGED
|
@@ -3,11 +3,12 @@ import {createCalendar as $40VnT$createCalendar, endOfMonth as $40VnT$endOfMonth
|
|
|
3
3
|
import $40VnT$react, {useMemo as $40VnT$useMemo, useRef as $40VnT$useRef, useState as $40VnT$useState, useEffect as $40VnT$useEffect} from "react";
|
|
4
4
|
import {useCalendar as $40VnT$useCalendar, useCalendarGrid as $40VnT$useCalendarGrid, useCalendarCell as $40VnT$useCalendarCell, useRangeCalendar as $40VnT$useRangeCalendar} from "@react-aria/calendar";
|
|
5
5
|
import {useCalendarState as $40VnT$useCalendarState, useRangeCalendarState as $40VnT$useRangeCalendarState} from "@react-stately/calendar";
|
|
6
|
-
import {useLocale as $40VnT$useLocale, useDateFormatter as $40VnT$useDateFormatter} from "@react-aria/i18n";
|
|
6
|
+
import {useLocale as $40VnT$useLocale, useMessageFormatter as $40VnT$useMessageFormatter, useDateFormatter as $40VnT$useDateFormatter} from "@react-aria/i18n";
|
|
7
7
|
import {ActionButton as $40VnT$ActionButton} from "@react-spectrum/button";
|
|
8
8
|
import $40VnT$spectrumiconsuiChevronLeftLarge from "@spectrum-icons/ui/ChevronLeftLarge";
|
|
9
9
|
import $40VnT$spectrumiconsuiChevronRightLarge from "@spectrum-icons/ui/ChevronRightLarge";
|
|
10
|
-
import {classNames as $40VnT$classNames} from "@react-spectrum/utils";
|
|
10
|
+
import {useStyleProps as $40VnT$useStyleProps, classNames as $40VnT$classNames} from "@react-spectrum/utils";
|
|
11
|
+
import {HelpText as $40VnT$HelpText} from "@react-spectrum/label";
|
|
11
12
|
import {useProviderProps as $40VnT$useProviderProps} from "@react-spectrum/provider";
|
|
12
13
|
import {VisuallyHidden as $40VnT$VisuallyHidden} from "@react-aria/visually-hidden";
|
|
13
14
|
import {mergeProps as $40VnT$mergeProps} from "@react-aria/utils";
|
|
@@ -55,6 +56,7 @@ $parcel$export($52c51313300b3b3e$exports, "is-selection-start", () => $52c513133
|
|
|
55
56
|
$parcel$export($52c51313300b3b3e$exports, "is-range-end", () => $52c51313300b3b3e$export$52890a3cb1ab46b, (v) => $52c51313300b3b3e$export$52890a3cb1ab46b = v);
|
|
56
57
|
$parcel$export($52c51313300b3b3e$exports, "is-selection-end", () => $52c51313300b3b3e$export$50722ae5663230f9, (v) => $52c51313300b3b3e$export$50722ae5663230f9 = v);
|
|
57
58
|
$parcel$export($52c51313300b3b3e$exports, "is-range-selecting", () => $52c51313300b3b3e$export$7a763a0407a04336, (v) => $52c51313300b3b3e$export$7a763a0407a04336 = v);
|
|
59
|
+
$parcel$export($52c51313300b3b3e$exports, "is-invalid", () => $52c51313300b3b3e$export$14a30de2866685fa, (v) => $52c51313300b3b3e$export$14a30de2866685fa = v);
|
|
58
60
|
$parcel$export($52c51313300b3b3e$exports, "is-today", () => $52c51313300b3b3e$export$189f6cc7eaf68d8b, (v) => $52c51313300b3b3e$export$189f6cc7eaf68d8b = v);
|
|
59
61
|
$parcel$export($52c51313300b3b3e$exports, "is-selected", () => $52c51313300b3b3e$export$1e0fb04f31d3c22a, (v) => $52c51313300b3b3e$export$1e0fb04f31d3c22a = v);
|
|
60
62
|
$parcel$export($52c51313300b3b3e$exports, "is-hovered", () => $52c51313300b3b3e$export$b8813cd5d7824ce7, (v) => $52c51313300b3b3e$export$b8813cd5d7824ce7 = v);
|
|
@@ -83,6 +85,7 @@ var $52c51313300b3b3e$export$f0091c9d6b8c19d3;
|
|
|
83
85
|
var $52c51313300b3b3e$export$52890a3cb1ab46b;
|
|
84
86
|
var $52c51313300b3b3e$export$50722ae5663230f9;
|
|
85
87
|
var $52c51313300b3b3e$export$7a763a0407a04336;
|
|
88
|
+
var $52c51313300b3b3e$export$14a30de2866685fa;
|
|
86
89
|
var $52c51313300b3b3e$export$189f6cc7eaf68d8b;
|
|
87
90
|
var $52c51313300b3b3e$export$1e0fb04f31d3c22a;
|
|
88
91
|
var $52c51313300b3b3e$export$b8813cd5d7824ce7;
|
|
@@ -111,6 +114,7 @@ $52c51313300b3b3e$export$f0091c9d6b8c19d3 = "is-selection-start_6099b6";
|
|
|
111
114
|
$52c51313300b3b3e$export$52890a3cb1ab46b = "is-range-end_6099b6";
|
|
112
115
|
$52c51313300b3b3e$export$50722ae5663230f9 = "is-selection-end_6099b6";
|
|
113
116
|
$52c51313300b3b3e$export$7a763a0407a04336 = "is-range-selecting_6099b6";
|
|
117
|
+
$52c51313300b3b3e$export$14a30de2866685fa = "is-invalid_6099b6";
|
|
114
118
|
$52c51313300b3b3e$export$189f6cc7eaf68d8b = "is-today_6099b6";
|
|
115
119
|
$52c51313300b3b3e$export$1e0fb04f31d3c22a = "is-selected_6099b6";
|
|
116
120
|
$52c51313300b3b3e$export$b8813cd5d7824ce7 = "is-hovered_6099b6";
|
|
@@ -122,15 +126,15 @@ $52c51313300b3b3e$export$15b73a232798b8d3 = "is-pressed_6099b6";
|
|
|
122
126
|
|
|
123
127
|
function $453c556b9066da11$export$5d847498420df57b({ state: state , currentMonth: currentMonth , ...props }) {
|
|
124
128
|
let ref = $40VnT$useRef();
|
|
125
|
-
let { cellProps: cellProps , buttonProps: buttonProps , isPressed: isPressed , isSelected: isSelected , isDisabled: isDisabled , isFocused: isFocused , formattedDate: formattedDate } = $40VnT$useCalendarCell({
|
|
129
|
+
let { cellProps: cellProps , buttonProps: buttonProps , isPressed: isPressed , isSelected: isSelected , isDisabled: isDisabled , isFocused: isFocused , isInvalid: isInvalid , formattedDate: formattedDate } = $40VnT$useCalendarCell({
|
|
126
130
|
...props,
|
|
127
131
|
isDisabled: !$40VnT$isSameMonth(props.date, currentMonth)
|
|
128
132
|
}, state, ref);
|
|
129
133
|
let isUnavailable = state.isCellUnavailable(props.date) && !isDisabled;
|
|
130
|
-
let isLastSelectedBeforeDisabled = !isDisabled && state.isCellUnavailable(props.date.add({
|
|
134
|
+
let isLastSelectedBeforeDisabled = !isDisabled && !isInvalid && state.isCellUnavailable(props.date.add({
|
|
131
135
|
days: 1
|
|
132
136
|
}));
|
|
133
|
-
let isFirstSelectedAfterDisabled = !isDisabled && state.isCellUnavailable(props.date.subtract({
|
|
137
|
+
let isFirstSelectedAfterDisabled = !isDisabled && !isInvalid && state.isCellUnavailable(props.date.subtract({
|
|
134
138
|
days: 1
|
|
135
139
|
}));
|
|
136
140
|
let highlightedRange = 'highlightedRange' in state && state.highlightedRange;
|
|
@@ -154,8 +158,10 @@ function $453c556b9066da11$export$5d847498420df57b({ state: state , currentMonth
|
|
|
154
158
|
'is-today': $40VnT$isToday(props.date, state.timeZone),
|
|
155
159
|
'is-selected': isSelected,
|
|
156
160
|
'is-focused': isFocused && isFocusVisible,
|
|
157
|
-
|
|
158
|
-
|
|
161
|
+
// Style disabled (i.e. out of min/max range), but selected dates as unavailable
|
|
162
|
+
// since it is more clear than trying to dim the selection.
|
|
163
|
+
'is-disabled': isDisabled && !isInvalid,
|
|
164
|
+
'is-unavailable': isUnavailable || isInvalid && isDisabled,
|
|
159
165
|
'is-outsideMonth': !$40VnT$isSameMonth(props.date, currentMonth),
|
|
160
166
|
'is-range-start': isRangeStart,
|
|
161
167
|
'is-range-end': isRangeEnd,
|
|
@@ -163,7 +169,8 @@ function $453c556b9066da11$export$5d847498420df57b({ state: state , currentMonth
|
|
|
163
169
|
'is-selection-start': isSelectionStart,
|
|
164
170
|
'is-selection-end': isSelectionEnd,
|
|
165
171
|
'is-hovered': isHovered,
|
|
166
|
-
'is-pressed': isPressed && !state.isReadOnly
|
|
172
|
+
'is-pressed': isPressed && !state.isReadOnly,
|
|
173
|
+
'is-invalid': isInvalid
|
|
167
174
|
})
|
|
168
175
|
}, /*#__PURE__*/ $40VnT$react.createElement("span", {
|
|
169
176
|
className: $40VnT$classNames((/*@__PURE__*/$parcel$interopDefault($52c51313300b3b3e$exports)), 'spectrum-Calendar-dateText')
|
|
@@ -244,12 +251,25 @@ function $faa2f3867773cfe5$export$26e2752316b9a375(props) {
|
|
|
244
251
|
|
|
245
252
|
|
|
246
253
|
|
|
254
|
+
var $cd536cc47911c090$exports = {};
|
|
255
|
+
var $16d2015735d51a41$exports = {};
|
|
256
|
+
$16d2015735d51a41$exports = JSON.parse("{\"invalidSelection\":\"Selected {selectedCount, plural, one {date} other {dates}} unavailable.\"}");
|
|
257
|
+
|
|
258
|
+
|
|
259
|
+
$cd536cc47911c090$exports = {
|
|
260
|
+
"en-US": $16d2015735d51a41$exports
|
|
261
|
+
};
|
|
262
|
+
|
|
263
|
+
|
|
264
|
+
|
|
247
265
|
|
|
248
266
|
|
|
249
267
|
|
|
250
268
|
function $62cd1e80f0dffb66$export$bfd52a43017368fe(props) {
|
|
251
269
|
props = $40VnT$useProviderProps(props);
|
|
252
|
-
let { state: state , calendarProps: calendarProps , nextButtonProps: nextButtonProps , prevButtonProps: prevButtonProps , calendarRef: ref , visibleMonths: visibleMonths = 1 } = props;
|
|
270
|
+
let { state: state , calendarProps: calendarProps , nextButtonProps: nextButtonProps , prevButtonProps: prevButtonProps , errorMessageProps: errorMessageProps , calendarRef: ref , visibleMonths: visibleMonths = 1 } = props;
|
|
271
|
+
let { styleProps: styleProps } = $40VnT$useStyleProps(props);
|
|
272
|
+
let formatMessage = $40VnT$useMessageFormatter((/*@__PURE__*/$parcel$interopDefault($cd536cc47911c090$exports)));
|
|
253
273
|
let { direction: direction } = $40VnT$useLocale();
|
|
254
274
|
let currentMonth = state.visibleRange.start;
|
|
255
275
|
let monthDateFormatter = $40VnT$useDateFormatter({
|
|
@@ -289,14 +309,24 @@ function $62cd1e80f0dffb66$export$bfd52a43017368fe(props) {
|
|
|
289
309
|
}));
|
|
290
310
|
}
|
|
291
311
|
return(/*#__PURE__*/ $40VnT$react.createElement("div", {
|
|
312
|
+
...styleProps,
|
|
292
313
|
...calendarProps,
|
|
293
314
|
ref: ref,
|
|
294
|
-
className: $40VnT$classNames((/*@__PURE__*/$parcel$interopDefault($52c51313300b3b3e$exports)), 'spectrum-Calendar')
|
|
315
|
+
className: $40VnT$classNames((/*@__PURE__*/$parcel$interopDefault($52c51313300b3b3e$exports)), 'spectrum-Calendar', styleProps.className)
|
|
295
316
|
}, /*#__PURE__*/ $40VnT$react.createElement("div", {
|
|
296
317
|
className: $40VnT$classNames((/*@__PURE__*/$parcel$interopDefault($52c51313300b3b3e$exports)), 'spectrum-Calendar-header')
|
|
297
318
|
}, titles), /*#__PURE__*/ $40VnT$react.createElement("div", {
|
|
298
319
|
className: $40VnT$classNames((/*@__PURE__*/$parcel$interopDefault($52c51313300b3b3e$exports)), 'spectrum-Calendar-months')
|
|
299
|
-
}, calendars)
|
|
320
|
+
}, calendars), state.validationState === 'invalid' && /*#__PURE__*/ $40VnT$react.createElement($40VnT$HelpText, {
|
|
321
|
+
showErrorIcon: true,
|
|
322
|
+
errorMessage: props.errorMessage || formatMessage('invalidSelection', {
|
|
323
|
+
selectedCount: 'highlightedRange' in state ? 2 : 1
|
|
324
|
+
}),
|
|
325
|
+
errorMessageProps: errorMessageProps,
|
|
326
|
+
validationState: "invalid",
|
|
327
|
+
// Intentionally a global class name so it can be targeted in DatePicker CSS...
|
|
328
|
+
UNSAFE_className: "spectrum-Calendar-helpText"
|
|
329
|
+
})));
|
|
300
330
|
}
|
|
301
331
|
|
|
302
332
|
|
|
@@ -321,14 +351,15 @@ function $d2b8d4577dd88671$export$e1aef45b828286de(props) {
|
|
|
321
351
|
createCalendar: $40VnT$createCalendar
|
|
322
352
|
});
|
|
323
353
|
let ref = $40VnT$useRef();
|
|
324
|
-
let { calendarProps: calendarProps , prevButtonProps: prevButtonProps , nextButtonProps: nextButtonProps } = $40VnT$useCalendar(props, state);
|
|
354
|
+
let { calendarProps: calendarProps , prevButtonProps: prevButtonProps , nextButtonProps: nextButtonProps , errorMessageProps: errorMessageProps } = $40VnT$useCalendar(props, state);
|
|
325
355
|
return(/*#__PURE__*/ $40VnT$react.createElement($62cd1e80f0dffb66$export$bfd52a43017368fe, {
|
|
326
356
|
...props,
|
|
327
357
|
state: state,
|
|
328
358
|
calendarRef: ref,
|
|
329
359
|
calendarProps: calendarProps,
|
|
330
360
|
prevButtonProps: prevButtonProps,
|
|
331
|
-
nextButtonProps: nextButtonProps
|
|
361
|
+
nextButtonProps: nextButtonProps,
|
|
362
|
+
errorMessageProps: errorMessageProps
|
|
332
363
|
}));
|
|
333
364
|
}
|
|
334
365
|
|
|
@@ -358,14 +389,15 @@ function $8b1e8eddbf3b15de$export$a4f5c8b89d277a8d(props) {
|
|
|
358
389
|
createCalendar: $40VnT$createCalendar
|
|
359
390
|
});
|
|
360
391
|
let ref = $40VnT$useRef();
|
|
361
|
-
let { calendarProps: calendarProps , prevButtonProps: prevButtonProps , nextButtonProps: nextButtonProps } = $40VnT$useRangeCalendar(props, state, ref);
|
|
392
|
+
let { calendarProps: calendarProps , prevButtonProps: prevButtonProps , nextButtonProps: nextButtonProps , errorMessageProps: errorMessageProps } = $40VnT$useRangeCalendar(props, state, ref);
|
|
362
393
|
return(/*#__PURE__*/ $40VnT$react.createElement($62cd1e80f0dffb66$export$bfd52a43017368fe, {
|
|
363
394
|
...props,
|
|
364
395
|
state: state,
|
|
365
396
|
calendarRef: ref,
|
|
366
397
|
calendarProps: calendarProps,
|
|
367
398
|
prevButtonProps: prevButtonProps,
|
|
368
|
-
nextButtonProps: nextButtonProps
|
|
399
|
+
nextButtonProps: nextButtonProps,
|
|
400
|
+
errorMessageProps: errorMessageProps
|
|
369
401
|
}));
|
|
370
402
|
}
|
|
371
403
|
|
package/dist/module.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AKAA,GA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AC;;;;;;;;;;;;SKvBe,yCAAa,CAAsB,KAAoC,EAAE,CAAC;IACxF,GAAG,CAAC,CAAC,gBAAA,aAAa,GAAG,CAAC,EAAA,CAAC,GAAG,KAAK;IAC/B,GAAG,CAAC,eAAe,GAAG,cAAO,MAAQ,CAAC;YAAA,MAAM,EAAE,aAAa;QAAA,CAAC;MAAG,CAAC;QAAA,aAAa;IAAA,CAAC;IAC9E,GAAG,CAAC,CAAC,SAAA,MAAM,EAAA,CAAC,GAAG,gBAAS;IACxB,GAAG,CAAC,KAAK,GAAG,4BAAqB,CAAC,CAAC;WAC9B,KAAK;gBACR,MAAM;yBACN,eAAe;wBACf,qBAAc;IAChB,CAAC;IAED,GAAG,CAAC,GAAG,GAAG,aAAM;IAChB,GAAG,CAAC,CAAC,gBAAA,aAAa,oBAAE,eAAe,oBAAE,eAAe,EAAA,CAAC,GAAG,uBAAgB,CAAC,KAAK,EAAE,KAAK,EAAE,GAAG;IAE1F,MAAM,0CACH,yCAAY;WACP,KAAK;QACT,KAAK,EAAE,KAAK;QACZ,WAAW,EAAE,GAAG;QAChB,aAAa,EAAE,aAAa;QAC5B,eAAe,EAAE,eAAe;QAChC,eAAe,EAAE,eAAe;;AAEtC,CAAC;;","sources":["packages/@react-spectrum/calendar/src/index.ts","packages/@react-spectrum/calendar/src/Calendar.tsx","packages/@react-spectrum/calendar/src/CalendarBase.tsx","packages/@react-spectrum/calendar/src/CalendarMonth.tsx","packages/@react-spectrum/calendar/src/CalendarCell.tsx","packages/@adobe/spectrum-css-temp/components/calendar/vars.css","packages/@react-spectrum/calendar/src/RangeCalendar.tsx"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n/// <reference types=\"css-module-types\" />\n\nexport * from './Calendar';\nexport * from './RangeCalendar';\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {CalendarBase} from './CalendarBase';\nimport {createCalendar} from '@internationalized/date';\nimport {DateValue, SpectrumCalendarProps} from '@react-types/calendar';\nimport React, {useMemo, useRef} from 'react';\nimport {useCalendar} from '@react-aria/calendar';\nimport {useCalendarState} from '@react-stately/calendar';\nimport {useLocale} from '@react-aria/i18n';\n\n/**\n * Calendars display a grid of days in one or more months and allow users to select a single date.\n */\nexport function Calendar<T extends DateValue>(props: SpectrumCalendarProps<T>) {\n let {visibleMonths = 1} = props;\n let visibleDuration = useMemo(() => ({months: visibleMonths}), [visibleMonths]);\n let {locale} = useLocale();\n let state = useCalendarState({\n ...props,\n locale,\n visibleDuration,\n createCalendar\n });\n\n let ref = useRef();\n let {calendarProps, prevButtonProps, nextButtonProps} = useCalendar(props, state);\n\n return (\n <CalendarBase\n {...props}\n state={state}\n calendarRef={ref}\n calendarProps={calendarProps}\n prevButtonProps={prevButtonProps}\n nextButtonProps={nextButtonProps} />\n );\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {ActionButton} from '@react-spectrum/button';\nimport {AriaButtonProps} from '@react-types/button';\nimport {CalendarMonth} from './CalendarMonth';\nimport {CalendarPropsBase} from '@react-types/calendar';\nimport {CalendarState, RangeCalendarState} from '@react-stately/calendar';\nimport ChevronLeft from '@spectrum-icons/ui/ChevronLeftLarge';\nimport ChevronRight from '@spectrum-icons/ui/ChevronRightLarge';\nimport {classNames} from '@react-spectrum/utils';\nimport {DOMProps, StyleProps} from '@react-types/shared';\nimport React, {HTMLAttributes, RefObject} from 'react';\nimport styles from '@adobe/spectrum-css-temp/components/calendar/vars.css';\nimport {useDateFormatter, useLocale} from '@react-aria/i18n';\nimport {useProviderProps} from '@react-spectrum/provider';\n\ninterface CalendarBaseProps<T extends CalendarState | RangeCalendarState> extends CalendarPropsBase, DOMProps, StyleProps {\n state: T,\n visibleMonths?: number,\n calendarProps: HTMLAttributes<HTMLElement>,\n nextButtonProps: AriaButtonProps,\n prevButtonProps: AriaButtonProps,\n calendarRef: RefObject<HTMLDivElement>\n}\n\nexport function CalendarBase<T extends CalendarState | RangeCalendarState>(props: CalendarBaseProps<T>) {\n props = useProviderProps(props);\n let {\n state,\n calendarProps,\n nextButtonProps,\n prevButtonProps,\n calendarRef: ref,\n visibleMonths = 1\n } = props;\n let {direction} = useLocale();\n let currentMonth = state.visibleRange.start;\n let monthDateFormatter = useDateFormatter({\n month: 'long',\n year: 'numeric',\n era: currentMonth.calendar.identifier !== 'gregory' ? 'long' : undefined,\n calendar: currentMonth.calendar.identifier,\n timeZone: state.timeZone\n });\n\n let titles = [];\n let calendars = [];\n for (let i = 0; i < visibleMonths; i++) {\n titles.push(\n <div key={i} className={classNames(styles, 'spectrum-Calendar-monthHeader')}>\n {i === 0 &&\n <ActionButton\n {...prevButtonProps}\n UNSAFE_className={classNames(styles, 'spectrum-Calendar-prevMonth')}\n isQuiet>\n {direction === 'rtl' ? <ChevronRight /> : <ChevronLeft />}\n </ActionButton>\n }\n <h2\n className={classNames(styles, 'spectrum-Calendar-title')}>\n {monthDateFormatter.format(currentMonth.add({months: i}).toDate(state.timeZone))}\n </h2>\n {i === visibleMonths - 1 &&\n <ActionButton\n {...nextButtonProps}\n UNSAFE_className={classNames(styles, 'spectrum-Calendar-nextMonth')}\n isQuiet>\n {direction === 'rtl' ? <ChevronLeft /> : <ChevronRight />}\n </ActionButton>\n }\n </div>\n );\n\n let d = currentMonth.add({months: i});\n calendars.push(\n <CalendarMonth\n {...props}\n key={`${d.year}-${d.month}-${d.day}`}\n state={state}\n startDate={d} />\n );\n }\n\n return (\n <div\n {...calendarProps}\n ref={ref}\n className={\n classNames(styles,\n 'spectrum-Calendar'\n )\n }>\n <div className={classNames(styles, 'spectrum-Calendar-header')}>\n {titles}\n </div>\n <div className={classNames(styles, 'spectrum-Calendar-months')}>\n {calendars}\n </div>\n </div>\n );\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {CalendarCell} from './CalendarCell';\nimport {CalendarDate, endOfMonth, getWeeksInMonth, startOfWeek} from '@internationalized/date';\nimport {CalendarPropsBase} from '@react-types/calendar';\nimport {CalendarState, RangeCalendarState} from '@react-stately/calendar';\nimport {classNames} from '@react-spectrum/utils';\nimport {DOMProps, StyleProps} from '@react-types/shared';\nimport React, {useEffect, useState} from 'react';\nimport styles from '@adobe/spectrum-css-temp/components/calendar/vars.css';\nimport {useCalendarGrid} from '@react-aria/calendar';\nimport {useLocale} from '@react-aria/i18n';\nimport {useProviderProps} from '@react-spectrum/provider';\nimport {VisuallyHidden} from '@react-aria/visually-hidden';\n\ninterface CalendarMonthProps extends CalendarPropsBase, DOMProps, StyleProps {\n state: CalendarState | RangeCalendarState,\n startDate: CalendarDate\n}\n\nexport function CalendarMonth(props: CalendarMonthProps) {\n props = useProviderProps(props);\n let {\n state,\n startDate\n } = props;\n let {\n gridProps,\n weekDays\n } = useCalendarGrid({\n ...props,\n endDate: endOfMonth(startDate)\n }, state);\n\n let {locale} = useLocale();\n let monthStart = startOfWeek(startDate, locale);\n let weeksInMonth = getWeeksInMonth(startDate, locale);\n\n let [isRangeSelecting, setRangeSelecting] = useState(false);\n let hasAnchorDate = 'anchorDate' in state && state.anchorDate != null;\n\n // Update isRangeSelecting immediately when it becomes true.\n // This feels weird but is actually fine...\n // https://reactjs.org/docs/hooks-faq.html#how-do-i-implement-getderivedstatefromprops\n if (hasAnchorDate && !isRangeSelecting) {\n setRangeSelecting(true);\n }\n\n // Delay removing the is-range-selecting class for a frame after selection ends.\n // This avoids an undesired animation on touch devices.\n useEffect(() => {\n if (!hasAnchorDate && isRangeSelecting) {\n let raf = requestAnimationFrame(() => setRangeSelecting(false));\n return () => cancelAnimationFrame(raf);\n }\n }, [hasAnchorDate, isRangeSelecting]);\n\n return (\n <table\n {...gridProps}\n className={classNames(styles, 'spectrum-Calendar-body', 'spectrum-Calendar-table', {'is-range-selecting': isRangeSelecting})}>\n <thead>\n <tr>\n {weekDays.map((day, index) => (\n <th\n key={index}\n className={classNames(styles, 'spectrum-Calendar-tableCell')}>\n {/* Make sure screen readers read the full day name, but we show an abbreviation visually. */}\n <VisuallyHidden>{day.long}</VisuallyHidden>\n <span aria-hidden=\"true\" className={classNames(styles, 'spectrum-Calendar-dayOfWeek')}>\n {day.narrow}\n </span>\n </th>\n ))}\n </tr>\n </thead>\n <tbody>\n {[...new Array(weeksInMonth).keys()].map(weekIndex => (\n <tr key={weekIndex}>\n {[...new Array(7).keys()].map(dayIndex => (\n <CalendarCell\n key={dayIndex}\n state={state}\n date={monthStart.add({weeks: weekIndex, days: dayIndex})}\n currentMonth={startDate} />\n ))}\n </tr>\n ))}\n </tbody>\n </table>\n );\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {AriaCalendarCellProps, useCalendarCell} from '@react-aria/calendar';\nimport {CalendarDate, getDayOfWeek, isSameDay, isSameMonth, isToday} from '@internationalized/date';\nimport {CalendarState, RangeCalendarState} from '@react-stately/calendar';\nimport {classNames} from '@react-spectrum/utils';\nimport {mergeProps} from '@react-aria/utils';\nimport React, {useRef} from 'react';\nimport styles from '@adobe/spectrum-css-temp/components/calendar/vars.css';\nimport {useFocusRing} from '@react-aria/focus';\nimport {useHover} from '@react-aria/interactions';\nimport {useLocale} from '@react-aria/i18n';\n\ninterface CalendarCellProps extends AriaCalendarCellProps {\n state: CalendarState | RangeCalendarState,\n currentMonth: CalendarDate\n}\n\nexport function CalendarCell({state, currentMonth, ...props}: CalendarCellProps) {\n let ref = useRef<HTMLElement>();\n let {\n cellProps,\n buttonProps,\n isPressed,\n isSelected,\n isDisabled,\n isFocused,\n formattedDate\n } = useCalendarCell({\n ...props,\n isDisabled: !isSameMonth(props.date, currentMonth)\n }, state, ref);\n let isUnavailable = state.isCellUnavailable(props.date) && !isDisabled;\n let isLastSelectedBeforeDisabled = !isDisabled && state.isCellUnavailable(props.date.add({days: 1}));\n let isFirstSelectedAfterDisabled = !isDisabled && state.isCellUnavailable(props.date.subtract({days: 1}));\n let highlightedRange = 'highlightedRange' in state && state.highlightedRange;\n let isSelectionStart = isSelected && highlightedRange && isSameDay(props.date, highlightedRange.start);\n let isSelectionEnd = isSelected && highlightedRange && isSameDay(props.date, highlightedRange.end);\n let {locale} = useLocale();\n let dayOfWeek = getDayOfWeek(props.date, locale);\n let isRangeStart = isSelected && (isFirstSelectedAfterDisabled || dayOfWeek === 0 || props.date.day === 1);\n let isRangeEnd = isSelected && (isLastSelectedBeforeDisabled || dayOfWeek === 6 || props.date.day === currentMonth.calendar.getDaysInMonth(currentMonth));\n let {focusProps, isFocusVisible} = useFocusRing();\n let {hoverProps, isHovered} = useHover({isDisabled: isDisabled || isUnavailable || state.isReadOnly});\n\n return (\n <td\n {...cellProps}\n className={classNames(styles, 'spectrum-Calendar-tableCell')}>\n <span\n {...mergeProps(buttonProps, hoverProps, focusProps)}\n ref={ref}\n className={classNames(styles, 'spectrum-Calendar-date', {\n 'is-today': isToday(props.date, state.timeZone),\n 'is-selected': isSelected,\n 'is-focused': isFocused && isFocusVisible,\n 'is-disabled': isDisabled,\n 'is-unavailable': isUnavailable,\n 'is-outsideMonth': !isSameMonth(props.date, currentMonth),\n 'is-range-start': isRangeStart,\n 'is-range-end': isRangeEnd,\n 'is-range-selection': isSelected && 'highlightedRange' in state,\n 'is-selection-start': isSelectionStart,\n 'is-selection-end': isSelectionEnd,\n 'is-hovered': isHovered,\n 'is-pressed': isPressed && !state.isReadOnly\n })}>\n <span className={classNames(styles, 'spectrum-Calendar-dateText')}>\n <span>{formattedDate}</span>\n </span>\n </span>\n </td>\n );\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n@import './index.css';\n@import './skin.css';\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {CalendarBase} from './CalendarBase';\nimport {createCalendar} from '@internationalized/date';\nimport {DateValue, SpectrumRangeCalendarProps} from '@react-types/calendar';\nimport React, {useMemo, useRef} from 'react';\nimport {useLocale} from '@react-aria/i18n';\nimport {useRangeCalendar} from '@react-aria/calendar';\nimport {useRangeCalendarState} from '@react-stately/calendar';\n\n/**\n * RangeCalendars display a grid of days in one or more months and allow users to select a contiguous range of dates.\n */\nexport function RangeCalendar<T extends DateValue>(props: SpectrumRangeCalendarProps<T>) {\n let {visibleMonths = 1} = props;\n let visibleDuration = useMemo(() => ({months: visibleMonths}), [visibleMonths]);\n let {locale} = useLocale();\n let state = useRangeCalendarState({\n ...props,\n locale,\n visibleDuration,\n createCalendar\n });\n\n let ref = useRef();\n let {calendarProps, prevButtonProps, nextButtonProps} = useRangeCalendar(props, state, ref);\n\n return (\n <CalendarBase\n {...props}\n state={state}\n calendarRef={ref}\n calendarProps={calendarProps}\n prevButtonProps={prevButtonProps}\n nextButtonProps={nextButtonProps} />\n );\n}\n"],"names":[],"version":3,"file":"module.js.map"}
|
|
1
|
+
{"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AKAA,GAAmC;AACnC,GAA2C;AAC3C,GAA0C;AAC1C,GAA+C;AAC/C,GAAyC;AACzC,GAA6C;AAC7C,GAA6C;AAC7C,GAA0C;AAC1C,GAA6C;AAC7C,GAAwC;AACxC,GAAyC;AACzC,GAA6C;AAC7C,GAAwC;AACxC,GAA4C;AAC5C,GAA6B;AAC7B,G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AgB,CAAC,KAAK,EAAE,KAAK,EAAE,GAAG;IAE7G,MAAM,0CACH,yCAAY;WACP,KAAK;QACT,KAAK,EAAE,KAAK;QACZ,WAAW,EAAE,GAAG;QAChB,aAAa,EAAE,aAAa;QAC5B,eAAe,EAAE,eAAe;QAChC,eAAe,EAAE,eAAe;QAChC,iBAAiB,EAAE,iBAAiB;;AAE1C,CAAC;;","sources":["packages/@react-spectrum/calendar/src/index.ts","packages/@react-spectrum/calendar/src/Calendar.tsx","packages/@react-spectrum/calendar/src/CalendarBase.tsx","packages/@react-spectrum/calendar/src/CalendarMonth.tsx","packages/@react-spectrum/calendar/src/CalendarCell.tsx","packages/@adobe/spectrum-css-temp/components/calendar/vars.css","packages/@react-spectrum/calendar/intl/*.js","packages/@react-spectrum/calendar/intl/en-US.json","packages/@react-spectrum/calendar/src/RangeCalendar.tsx"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n/// <reference types=\"css-module-types\" />\n\nexport * from './Calendar';\nexport * from './RangeCalendar';\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {CalendarBase} from './CalendarBase';\nimport {createCalendar} from '@internationalized/date';\nimport {DateValue, SpectrumCalendarProps} from '@react-types/calendar';\nimport React, {useMemo, useRef} from 'react';\nimport {useCalendar} from '@react-aria/calendar';\nimport {useCalendarState} from '@react-stately/calendar';\nimport {useLocale} from '@react-aria/i18n';\n\n/**\n * Calendars display a grid of days in one or more months and allow users to select a single date.\n */\nexport function Calendar<T extends DateValue>(props: SpectrumCalendarProps<T>) {\n let {visibleMonths = 1} = props;\n let visibleDuration = useMemo(() => ({months: visibleMonths}), [visibleMonths]);\n let {locale} = useLocale();\n let state = useCalendarState({\n ...props,\n locale,\n visibleDuration,\n createCalendar\n });\n\n let ref = useRef();\n let {calendarProps, prevButtonProps, nextButtonProps, errorMessageProps} = useCalendar(props, state);\n\n return (\n <CalendarBase\n {...props}\n state={state}\n calendarRef={ref}\n calendarProps={calendarProps}\n prevButtonProps={prevButtonProps}\n nextButtonProps={nextButtonProps}\n errorMessageProps={errorMessageProps} />\n );\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {ActionButton} from '@react-spectrum/button';\nimport {AriaButtonProps} from '@react-types/button';\nimport {CalendarMonth} from './CalendarMonth';\nimport {CalendarPropsBase} from '@react-types/calendar';\nimport {CalendarState, RangeCalendarState} from '@react-stately/calendar';\nimport ChevronLeft from '@spectrum-icons/ui/ChevronLeftLarge';\nimport ChevronRight from '@spectrum-icons/ui/ChevronRightLarge';\nimport {classNames, useStyleProps} from '@react-spectrum/utils';\nimport {DOMProps, StyleProps} from '@react-types/shared';\nimport {HelpText} from '@react-spectrum/label';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport React, {HTMLAttributes, RefObject} from 'react';\nimport styles from '@adobe/spectrum-css-temp/components/calendar/vars.css';\nimport {useDateFormatter, useLocale, useMessageFormatter} from '@react-aria/i18n';\nimport {useProviderProps} from '@react-spectrum/provider';\n\ninterface CalendarBaseProps<T extends CalendarState | RangeCalendarState> extends CalendarPropsBase, DOMProps, StyleProps {\n state: T,\n visibleMonths?: number,\n calendarProps: HTMLAttributes<HTMLElement>,\n nextButtonProps: AriaButtonProps,\n prevButtonProps: AriaButtonProps,\n errorMessageProps: HTMLAttributes<HTMLElement>,\n calendarRef: RefObject<HTMLDivElement>\n}\n\nexport function CalendarBase<T extends CalendarState | RangeCalendarState>(props: CalendarBaseProps<T>) {\n props = useProviderProps(props);\n let {\n state,\n calendarProps,\n nextButtonProps,\n prevButtonProps,\n errorMessageProps,\n calendarRef: ref,\n visibleMonths = 1\n } = props;\n let {styleProps} = useStyleProps(props);\n let formatMessage = useMessageFormatter(intlMessages);\n let {direction} = useLocale();\n let currentMonth = state.visibleRange.start;\n let monthDateFormatter = useDateFormatter({\n month: 'long',\n year: 'numeric',\n era: currentMonth.calendar.identifier !== 'gregory' ? 'long' : undefined,\n calendar: currentMonth.calendar.identifier,\n timeZone: state.timeZone\n });\n\n let titles = [];\n let calendars = [];\n for (let i = 0; i < visibleMonths; i++) {\n titles.push(\n <div key={i} className={classNames(styles, 'spectrum-Calendar-monthHeader')}>\n {i === 0 &&\n <ActionButton\n {...prevButtonProps}\n UNSAFE_className={classNames(styles, 'spectrum-Calendar-prevMonth')}\n isQuiet>\n {direction === 'rtl' ? <ChevronRight /> : <ChevronLeft />}\n </ActionButton>\n }\n <h2\n className={classNames(styles, 'spectrum-Calendar-title')}>\n {monthDateFormatter.format(currentMonth.add({months: i}).toDate(state.timeZone))}\n </h2>\n {i === visibleMonths - 1 &&\n <ActionButton\n {...nextButtonProps}\n UNSAFE_className={classNames(styles, 'spectrum-Calendar-nextMonth')}\n isQuiet>\n {direction === 'rtl' ? <ChevronLeft /> : <ChevronRight />}\n </ActionButton>\n }\n </div>\n );\n\n let d = currentMonth.add({months: i});\n calendars.push(\n <CalendarMonth\n {...props}\n key={`${d.year}-${d.month}-${d.day}`}\n state={state}\n startDate={d} />\n );\n }\n\n return (\n <div\n {...styleProps}\n {...calendarProps}\n ref={ref}\n className={\n classNames(styles,\n 'spectrum-Calendar',\n styleProps.className\n )\n }>\n <div className={classNames(styles, 'spectrum-Calendar-header')}>\n {titles}\n </div>\n <div className={classNames(styles, 'spectrum-Calendar-months')}>\n {calendars}\n </div>\n {state.validationState === 'invalid' &&\n <HelpText\n showErrorIcon\n errorMessage={props.errorMessage || formatMessage('invalidSelection', {selectedCount: 'highlightedRange' in state ? 2 : 1})}\n errorMessageProps={errorMessageProps}\n validationState=\"invalid\"\n // Intentionally a global class name so it can be targeted in DatePicker CSS...\n UNSAFE_className=\"spectrum-Calendar-helpText\" />\n }\n </div>\n );\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {CalendarCell} from './CalendarCell';\nimport {CalendarDate, endOfMonth, getWeeksInMonth, startOfWeek} from '@internationalized/date';\nimport {CalendarPropsBase} from '@react-types/calendar';\nimport {CalendarState, RangeCalendarState} from '@react-stately/calendar';\nimport {classNames} from '@react-spectrum/utils';\nimport {DOMProps, StyleProps} from '@react-types/shared';\nimport React, {useEffect, useState} from 'react';\nimport styles from '@adobe/spectrum-css-temp/components/calendar/vars.css';\nimport {useCalendarGrid} from '@react-aria/calendar';\nimport {useLocale} from '@react-aria/i18n';\nimport {useProviderProps} from '@react-spectrum/provider';\nimport {VisuallyHidden} from '@react-aria/visually-hidden';\n\ninterface CalendarMonthProps extends CalendarPropsBase, DOMProps, StyleProps {\n state: CalendarState | RangeCalendarState,\n startDate: CalendarDate\n}\n\nexport function CalendarMonth(props: CalendarMonthProps) {\n props = useProviderProps(props);\n let {\n state,\n startDate\n } = props;\n let {\n gridProps,\n weekDays\n } = useCalendarGrid({\n ...props,\n endDate: endOfMonth(startDate)\n }, state);\n\n let {locale} = useLocale();\n let monthStart = startOfWeek(startDate, locale);\n let weeksInMonth = getWeeksInMonth(startDate, locale);\n\n let [isRangeSelecting, setRangeSelecting] = useState(false);\n let hasAnchorDate = 'anchorDate' in state && state.anchorDate != null;\n\n // Update isRangeSelecting immediately when it becomes true.\n // This feels weird but is actually fine...\n // https://reactjs.org/docs/hooks-faq.html#how-do-i-implement-getderivedstatefromprops\n if (hasAnchorDate && !isRangeSelecting) {\n setRangeSelecting(true);\n }\n\n // Delay removing the is-range-selecting class for a frame after selection ends.\n // This avoids an undesired animation on touch devices.\n useEffect(() => {\n if (!hasAnchorDate && isRangeSelecting) {\n let raf = requestAnimationFrame(() => setRangeSelecting(false));\n return () => cancelAnimationFrame(raf);\n }\n }, [hasAnchorDate, isRangeSelecting]);\n\n return (\n <table\n {...gridProps}\n className={classNames(styles, 'spectrum-Calendar-body', 'spectrum-Calendar-table', {'is-range-selecting': isRangeSelecting})}>\n <thead>\n <tr>\n {weekDays.map((day, index) => (\n <th\n key={index}\n className={classNames(styles, 'spectrum-Calendar-tableCell')}>\n {/* Make sure screen readers read the full day name, but we show an abbreviation visually. */}\n <VisuallyHidden>{day.long}</VisuallyHidden>\n <span aria-hidden=\"true\" className={classNames(styles, 'spectrum-Calendar-dayOfWeek')}>\n {day.narrow}\n </span>\n </th>\n ))}\n </tr>\n </thead>\n <tbody>\n {[...new Array(weeksInMonth).keys()].map(weekIndex => (\n <tr key={weekIndex}>\n {[...new Array(7).keys()].map(dayIndex => (\n <CalendarCell\n key={dayIndex}\n state={state}\n date={monthStart.add({weeks: weekIndex, days: dayIndex})}\n currentMonth={startDate} />\n ))}\n </tr>\n ))}\n </tbody>\n </table>\n );\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {AriaCalendarCellProps, useCalendarCell} from '@react-aria/calendar';\nimport {CalendarDate, getDayOfWeek, isSameDay, isSameMonth, isToday} from '@internationalized/date';\nimport {CalendarState, RangeCalendarState} from '@react-stately/calendar';\nimport {classNames} from '@react-spectrum/utils';\nimport {mergeProps} from '@react-aria/utils';\nimport React, {useRef} from 'react';\nimport styles from '@adobe/spectrum-css-temp/components/calendar/vars.css';\nimport {useFocusRing} from '@react-aria/focus';\nimport {useHover} from '@react-aria/interactions';\nimport {useLocale} from '@react-aria/i18n';\n\ninterface CalendarCellProps extends AriaCalendarCellProps {\n state: CalendarState | RangeCalendarState,\n currentMonth: CalendarDate\n}\n\nexport function CalendarCell({state, currentMonth, ...props}: CalendarCellProps) {\n let ref = useRef<HTMLElement>();\n let {\n cellProps,\n buttonProps,\n isPressed,\n isSelected,\n isDisabled,\n isFocused,\n isInvalid,\n formattedDate\n } = useCalendarCell({\n ...props,\n isDisabled: !isSameMonth(props.date, currentMonth)\n }, state, ref);\n let isUnavailable = state.isCellUnavailable(props.date) && !isDisabled;\n let isLastSelectedBeforeDisabled = !isDisabled && !isInvalid && state.isCellUnavailable(props.date.add({days: 1}));\n let isFirstSelectedAfterDisabled = !isDisabled && !isInvalid && state.isCellUnavailable(props.date.subtract({days: 1}));\n let highlightedRange = 'highlightedRange' in state && state.highlightedRange;\n let isSelectionStart = isSelected && highlightedRange && isSameDay(props.date, highlightedRange.start);\n let isSelectionEnd = isSelected && highlightedRange && isSameDay(props.date, highlightedRange.end);\n let {locale} = useLocale();\n let dayOfWeek = getDayOfWeek(props.date, locale);\n let isRangeStart = isSelected && (isFirstSelectedAfterDisabled || dayOfWeek === 0 || props.date.day === 1);\n let isRangeEnd = isSelected && (isLastSelectedBeforeDisabled || dayOfWeek === 6 || props.date.day === currentMonth.calendar.getDaysInMonth(currentMonth));\n let {focusProps, isFocusVisible} = useFocusRing();\n let {hoverProps, isHovered} = useHover({isDisabled: isDisabled || isUnavailable || state.isReadOnly});\n\n return (\n <td\n {...cellProps}\n className={classNames(styles, 'spectrum-Calendar-tableCell')}>\n <span\n {...mergeProps(buttonProps, hoverProps, focusProps)}\n ref={ref}\n className={classNames(styles, 'spectrum-Calendar-date', {\n 'is-today': isToday(props.date, state.timeZone),\n 'is-selected': isSelected,\n 'is-focused': isFocused && isFocusVisible,\n // Style disabled (i.e. out of min/max range), but selected dates as unavailable\n // since it is more clear than trying to dim the selection.\n 'is-disabled': isDisabled && !isInvalid,\n 'is-unavailable': isUnavailable || (isInvalid && isDisabled),\n 'is-outsideMonth': !isSameMonth(props.date, currentMonth),\n 'is-range-start': isRangeStart,\n 'is-range-end': isRangeEnd,\n 'is-range-selection': isSelected && 'highlightedRange' in state,\n 'is-selection-start': isSelectionStart,\n 'is-selection-end': isSelectionEnd,\n 'is-hovered': isHovered,\n 'is-pressed': isPressed && !state.isReadOnly,\n 'is-invalid': isInvalid\n })}>\n <span className={classNames(styles, 'spectrum-Calendar-dateText')}>\n <span>{formattedDate}</span>\n </span>\n </span>\n </td>\n );\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n@import './index.css';\n@import './skin.css';\n","const _temp0 = require(\"./en-US.json\");\nmodule.exports = {\n \"en-US\": _temp0\n}","{\n \"invalidSelection\": \"Selected {selectedCount, plural, one {date} other {dates}} unavailable.\"\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {CalendarBase} from './CalendarBase';\nimport {createCalendar} from '@internationalized/date';\nimport {DateValue, SpectrumRangeCalendarProps} from '@react-types/calendar';\nimport React, {useMemo, useRef} from 'react';\nimport {useLocale} from '@react-aria/i18n';\nimport {useRangeCalendar} from '@react-aria/calendar';\nimport {useRangeCalendarState} from '@react-stately/calendar';\n\n/**\n * RangeCalendars display a grid of days in one or more months and allow users to select a contiguous range of dates.\n */\nexport function RangeCalendar<T extends DateValue>(props: SpectrumRangeCalendarProps<T>) {\n let {visibleMonths = 1} = props;\n let visibleDuration = useMemo(() => ({months: visibleMonths}), [visibleMonths]);\n let {locale} = useLocale();\n let state = useRangeCalendarState({\n ...props,\n locale,\n visibleDuration,\n createCalendar\n });\n\n let ref = useRef();\n let {calendarProps, prevButtonProps, nextButtonProps, errorMessageProps} = useRangeCalendar(props, state, ref);\n\n return (\n <CalendarBase\n {...props}\n state={state}\n calendarRef={ref}\n calendarProps={calendarProps}\n prevButtonProps={prevButtonProps}\n nextButtonProps={nextButtonProps}\n errorMessageProps={errorMessageProps} />\n );\n}\n"],"names":[],"version":3,"file":"module.js.map"}
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";AGoBA;;GAEG;AACH,yBAAyB,CAAC,SAAS,SAAS,EAAE,KAAK,EAAE,sBAAsB,CAAC,CAAC,
|
|
1
|
+
{"mappings":";AGoBA;;GAEG;AACH,yBAAyB,CAAC,SAAS,SAAS,EAAE,KAAK,EAAE,sBAAsB,CAAC,CAAC,eAwB5E;AC3BD;;GAEG;AACH,8BAA8B,CAAC,SAAS,SAAS,EAAE,KAAK,EAAE,2BAA2B,CAAC,CAAC,eAwBtF","sources":["packages/@react-spectrum/calendar/src/packages/@react-spectrum/calendar/src/CalendarCell.tsx","packages/@react-spectrum/calendar/src/packages/@react-spectrum/calendar/src/CalendarMonth.tsx","packages/@react-spectrum/calendar/src/packages/@react-spectrum/calendar/src/CalendarBase.tsx","packages/@react-spectrum/calendar/src/packages/@react-spectrum/calendar/src/Calendar.tsx","packages/@react-spectrum/calendar/src/packages/@react-spectrum/calendar/src/RangeCalendar.tsx","packages/@react-spectrum/calendar/src/packages/@react-spectrum/calendar/src/index.ts","packages/@react-spectrum/calendar/src/index.ts"],"sourcesContent":[null,null,null,null,null,null,"/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n/// <reference types=\"css-module-types\" />\n\nexport * from './Calendar';\nexport * from './RangeCalendar';\n"],"names":[],"version":3,"file":"types.d.ts.map"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-spectrum/calendar",
|
|
3
|
-
"version": "3.0.0-nightly.
|
|
3
|
+
"version": "3.0.0-nightly.1502+bacfedcaa",
|
|
4
4
|
"description": "Spectrum UI components in React",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "dist/main.js",
|
|
@@ -32,25 +32,26 @@
|
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@babel/runtime": "^7.6.2",
|
|
35
|
-
"@internationalized/date": "3.0.0-nightly.
|
|
36
|
-
"@react-aria/calendar": "3.0.0-nightly.
|
|
37
|
-
"@react-aria/focus": "3.0.0-nightly.
|
|
38
|
-
"@react-aria/i18n": "3.0.0-nightly.
|
|
39
|
-
"@react-aria/interactions": "3.0.0-nightly.
|
|
40
|
-
"@react-aria/utils": "3.0.0-nightly.
|
|
41
|
-
"@react-aria/visually-hidden": "3.0.0-nightly.
|
|
42
|
-
"@react-spectrum/button": "3.0.0-nightly.
|
|
43
|
-
"@react-spectrum/
|
|
44
|
-
"@react-
|
|
45
|
-
"@react-
|
|
46
|
-
"@react-types/
|
|
47
|
-
"@react-types/
|
|
48
|
-
"@
|
|
35
|
+
"@internationalized/date": "3.0.0-nightly.3201+bacfedcaa",
|
|
36
|
+
"@react-aria/calendar": "3.0.0-nightly.1502+bacfedcaa",
|
|
37
|
+
"@react-aria/focus": "3.0.0-nightly.1502+bacfedcaa",
|
|
38
|
+
"@react-aria/i18n": "3.0.0-nightly.1502+bacfedcaa",
|
|
39
|
+
"@react-aria/interactions": "3.0.0-nightly.1502+bacfedcaa",
|
|
40
|
+
"@react-aria/utils": "3.0.0-nightly.1502+bacfedcaa",
|
|
41
|
+
"@react-aria/visually-hidden": "3.0.0-nightly.1502+bacfedcaa",
|
|
42
|
+
"@react-spectrum/button": "3.0.0-nightly.1502+bacfedcaa",
|
|
43
|
+
"@react-spectrum/label": "3.4.6-nightly.3201+bacfedcaa",
|
|
44
|
+
"@react-spectrum/utils": "3.0.0-nightly.1502+bacfedcaa",
|
|
45
|
+
"@react-stately/calendar": "3.0.0-nightly.1502+bacfedcaa",
|
|
46
|
+
"@react-types/button": "3.4.5-nightly.3201+bacfedcaa",
|
|
47
|
+
"@react-types/calendar": "3.0.0-nightly.1502+bacfedcaa",
|
|
48
|
+
"@react-types/shared": "3.0.0-nightly.1502+bacfedcaa",
|
|
49
|
+
"@spectrum-icons/ui": "3.0.0-nightly.1502+bacfedcaa",
|
|
49
50
|
"date-fns": "^1.30.1"
|
|
50
51
|
},
|
|
51
52
|
"devDependencies": {
|
|
52
|
-
"@adobe/spectrum-css-temp": "3.0.0-nightly.
|
|
53
|
-
"@react-spectrum/test-utils": "3.0.0-nightly.
|
|
53
|
+
"@adobe/spectrum-css-temp": "3.0.0-nightly.1502+bacfedcaa",
|
|
54
|
+
"@react-spectrum/test-utils": "3.0.0-nightly.1502+bacfedcaa"
|
|
54
55
|
},
|
|
55
56
|
"peerDependencies": {
|
|
56
57
|
"@react-spectrum/provider": "^3.0.0",
|
|
@@ -60,5 +61,5 @@
|
|
|
60
61
|
"publishConfig": {
|
|
61
62
|
"access": "public"
|
|
62
63
|
},
|
|
63
|
-
"gitHead": "
|
|
64
|
+
"gitHead": "bacfedcaa8ffbc8a750cca94c5eca77895db93b9"
|
|
64
65
|
}
|
package/src/Calendar.tsx
CHANGED
|
@@ -33,7 +33,7 @@ export function Calendar<T extends DateValue>(props: SpectrumCalendarProps<T>) {
|
|
|
33
33
|
});
|
|
34
34
|
|
|
35
35
|
let ref = useRef();
|
|
36
|
-
let {calendarProps, prevButtonProps, nextButtonProps} = useCalendar(props, state);
|
|
36
|
+
let {calendarProps, prevButtonProps, nextButtonProps, errorMessageProps} = useCalendar(props, state);
|
|
37
37
|
|
|
38
38
|
return (
|
|
39
39
|
<CalendarBase
|
|
@@ -42,6 +42,7 @@ export function Calendar<T extends DateValue>(props: SpectrumCalendarProps<T>) {
|
|
|
42
42
|
calendarRef={ref}
|
|
43
43
|
calendarProps={calendarProps}
|
|
44
44
|
prevButtonProps={prevButtonProps}
|
|
45
|
-
nextButtonProps={nextButtonProps}
|
|
45
|
+
nextButtonProps={nextButtonProps}
|
|
46
|
+
errorMessageProps={errorMessageProps} />
|
|
46
47
|
);
|
|
47
48
|
}
|
package/src/CalendarBase.tsx
CHANGED
|
@@ -17,11 +17,14 @@ import {CalendarPropsBase} from '@react-types/calendar';
|
|
|
17
17
|
import {CalendarState, RangeCalendarState} from '@react-stately/calendar';
|
|
18
18
|
import ChevronLeft from '@spectrum-icons/ui/ChevronLeftLarge';
|
|
19
19
|
import ChevronRight from '@spectrum-icons/ui/ChevronRightLarge';
|
|
20
|
-
import {classNames} from '@react-spectrum/utils';
|
|
20
|
+
import {classNames, useStyleProps} from '@react-spectrum/utils';
|
|
21
21
|
import {DOMProps, StyleProps} from '@react-types/shared';
|
|
22
|
+
import {HelpText} from '@react-spectrum/label';
|
|
23
|
+
// @ts-ignore
|
|
24
|
+
import intlMessages from '../intl/*.json';
|
|
22
25
|
import React, {HTMLAttributes, RefObject} from 'react';
|
|
23
26
|
import styles from '@adobe/spectrum-css-temp/components/calendar/vars.css';
|
|
24
|
-
import {useDateFormatter, useLocale} from '@react-aria/i18n';
|
|
27
|
+
import {useDateFormatter, useLocale, useMessageFormatter} from '@react-aria/i18n';
|
|
25
28
|
import {useProviderProps} from '@react-spectrum/provider';
|
|
26
29
|
|
|
27
30
|
interface CalendarBaseProps<T extends CalendarState | RangeCalendarState> extends CalendarPropsBase, DOMProps, StyleProps {
|
|
@@ -30,6 +33,7 @@ interface CalendarBaseProps<T extends CalendarState | RangeCalendarState> extend
|
|
|
30
33
|
calendarProps: HTMLAttributes<HTMLElement>,
|
|
31
34
|
nextButtonProps: AriaButtonProps,
|
|
32
35
|
prevButtonProps: AriaButtonProps,
|
|
36
|
+
errorMessageProps: HTMLAttributes<HTMLElement>,
|
|
33
37
|
calendarRef: RefObject<HTMLDivElement>
|
|
34
38
|
}
|
|
35
39
|
|
|
@@ -40,9 +44,12 @@ export function CalendarBase<T extends CalendarState | RangeCalendarState>(props
|
|
|
40
44
|
calendarProps,
|
|
41
45
|
nextButtonProps,
|
|
42
46
|
prevButtonProps,
|
|
47
|
+
errorMessageProps,
|
|
43
48
|
calendarRef: ref,
|
|
44
49
|
visibleMonths = 1
|
|
45
50
|
} = props;
|
|
51
|
+
let {styleProps} = useStyleProps(props);
|
|
52
|
+
let formatMessage = useMessageFormatter(intlMessages);
|
|
46
53
|
let {direction} = useLocale();
|
|
47
54
|
let currentMonth = state.visibleRange.start;
|
|
48
55
|
let monthDateFormatter = useDateFormatter({
|
|
@@ -93,11 +100,13 @@ export function CalendarBase<T extends CalendarState | RangeCalendarState>(props
|
|
|
93
100
|
|
|
94
101
|
return (
|
|
95
102
|
<div
|
|
103
|
+
{...styleProps}
|
|
96
104
|
{...calendarProps}
|
|
97
105
|
ref={ref}
|
|
98
106
|
className={
|
|
99
107
|
classNames(styles,
|
|
100
|
-
'spectrum-Calendar'
|
|
108
|
+
'spectrum-Calendar',
|
|
109
|
+
styleProps.className
|
|
101
110
|
)
|
|
102
111
|
}>
|
|
103
112
|
<div className={classNames(styles, 'spectrum-Calendar-header')}>
|
|
@@ -106,6 +115,15 @@ export function CalendarBase<T extends CalendarState | RangeCalendarState>(props
|
|
|
106
115
|
<div className={classNames(styles, 'spectrum-Calendar-months')}>
|
|
107
116
|
{calendars}
|
|
108
117
|
</div>
|
|
118
|
+
{state.validationState === 'invalid' &&
|
|
119
|
+
<HelpText
|
|
120
|
+
showErrorIcon
|
|
121
|
+
errorMessage={props.errorMessage || formatMessage('invalidSelection', {selectedCount: 'highlightedRange' in state ? 2 : 1})}
|
|
122
|
+
errorMessageProps={errorMessageProps}
|
|
123
|
+
validationState="invalid"
|
|
124
|
+
// Intentionally a global class name so it can be targeted in DatePicker CSS...
|
|
125
|
+
UNSAFE_className="spectrum-Calendar-helpText" />
|
|
126
|
+
}
|
|
109
127
|
</div>
|
|
110
128
|
);
|
|
111
129
|
}
|
package/src/CalendarCell.tsx
CHANGED
|
@@ -35,14 +35,15 @@ export function CalendarCell({state, currentMonth, ...props}: CalendarCellProps)
|
|
|
35
35
|
isSelected,
|
|
36
36
|
isDisabled,
|
|
37
37
|
isFocused,
|
|
38
|
+
isInvalid,
|
|
38
39
|
formattedDate
|
|
39
40
|
} = useCalendarCell({
|
|
40
41
|
...props,
|
|
41
42
|
isDisabled: !isSameMonth(props.date, currentMonth)
|
|
42
43
|
}, state, ref);
|
|
43
44
|
let isUnavailable = state.isCellUnavailable(props.date) && !isDisabled;
|
|
44
|
-
let isLastSelectedBeforeDisabled = !isDisabled && state.isCellUnavailable(props.date.add({days: 1}));
|
|
45
|
-
let isFirstSelectedAfterDisabled = !isDisabled && state.isCellUnavailable(props.date.subtract({days: 1}));
|
|
45
|
+
let isLastSelectedBeforeDisabled = !isDisabled && !isInvalid && state.isCellUnavailable(props.date.add({days: 1}));
|
|
46
|
+
let isFirstSelectedAfterDisabled = !isDisabled && !isInvalid && state.isCellUnavailable(props.date.subtract({days: 1}));
|
|
46
47
|
let highlightedRange = 'highlightedRange' in state && state.highlightedRange;
|
|
47
48
|
let isSelectionStart = isSelected && highlightedRange && isSameDay(props.date, highlightedRange.start);
|
|
48
49
|
let isSelectionEnd = isSelected && highlightedRange && isSameDay(props.date, highlightedRange.end);
|
|
@@ -64,8 +65,10 @@ export function CalendarCell({state, currentMonth, ...props}: CalendarCellProps)
|
|
|
64
65
|
'is-today': isToday(props.date, state.timeZone),
|
|
65
66
|
'is-selected': isSelected,
|
|
66
67
|
'is-focused': isFocused && isFocusVisible,
|
|
67
|
-
|
|
68
|
-
|
|
68
|
+
// Style disabled (i.e. out of min/max range), but selected dates as unavailable
|
|
69
|
+
// since it is more clear than trying to dim the selection.
|
|
70
|
+
'is-disabled': isDisabled && !isInvalid,
|
|
71
|
+
'is-unavailable': isUnavailable || (isInvalid && isDisabled),
|
|
69
72
|
'is-outsideMonth': !isSameMonth(props.date, currentMonth),
|
|
70
73
|
'is-range-start': isRangeStart,
|
|
71
74
|
'is-range-end': isRangeEnd,
|
|
@@ -73,7 +76,8 @@ export function CalendarCell({state, currentMonth, ...props}: CalendarCellProps)
|
|
|
73
76
|
'is-selection-start': isSelectionStart,
|
|
74
77
|
'is-selection-end': isSelectionEnd,
|
|
75
78
|
'is-hovered': isHovered,
|
|
76
|
-
'is-pressed': isPressed && !state.isReadOnly
|
|
79
|
+
'is-pressed': isPressed && !state.isReadOnly,
|
|
80
|
+
'is-invalid': isInvalid
|
|
77
81
|
})}>
|
|
78
82
|
<span className={classNames(styles, 'spectrum-Calendar-dateText')}>
|
|
79
83
|
<span>{formattedDate}</span>
|
package/src/RangeCalendar.tsx
CHANGED
|
@@ -33,7 +33,7 @@ export function RangeCalendar<T extends DateValue>(props: SpectrumRangeCalendarP
|
|
|
33
33
|
});
|
|
34
34
|
|
|
35
35
|
let ref = useRef();
|
|
36
|
-
let {calendarProps, prevButtonProps, nextButtonProps} = useRangeCalendar(props, state, ref);
|
|
36
|
+
let {calendarProps, prevButtonProps, nextButtonProps, errorMessageProps} = useRangeCalendar(props, state, ref);
|
|
37
37
|
|
|
38
38
|
return (
|
|
39
39
|
<CalendarBase
|
|
@@ -42,6 +42,7 @@ export function RangeCalendar<T extends DateValue>(props: SpectrumRangeCalendarP
|
|
|
42
42
|
calendarRef={ref}
|
|
43
43
|
calendarProps={calendarProps}
|
|
44
44
|
prevButtonProps={prevButtonProps}
|
|
45
|
-
nextButtonProps={nextButtonProps}
|
|
45
|
+
nextButtonProps={nextButtonProps}
|
|
46
|
+
errorMessageProps={errorMessageProps} />
|
|
46
47
|
);
|
|
47
48
|
}
|