Skip to content

feat(antares): add Calendar and RangeCalendar components#202

Draft
egaitan-godaddy wants to merge 14 commits into
mainfrom
feat/calendar
Draft

feat(antares): add Calendar and RangeCalendar components#202
egaitan-godaddy wants to merge 14 commits into
mainfrom
feat/calendar

Conversation

@egaitan-godaddy

Copy link
Copy Markdown
Contributor

WIP

@changeset-bot

changeset-bot Bot commented May 29, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: fd2022c

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@godaddy/antares Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

egaitan-godaddy and others added 10 commits June 4, 2026 09:20
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…nth range headers

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
RAC's <CalendarMonthPicker> / <CalendarYearPicker> read `state.focusedDate.month`
for their displayed value. In a 2-month RangeCalendar, the focused date moves
when the user hovers a cell during an in-progress range pick (RAC's
`highlightDate` calls `setFocusedDate` to drive the highlight preview), so the
dropdown labels would jump even though the underlying grids stayed stable.

Pin the picker state Proxy's `focusedDate` to `state.visibleRange.start` (plus
the position offset) instead of `state.focusedDate`. This anchors the dropdown
labels to the GRID month and is no longer position-conditional — both left and
right pickers benefit from the stable label.

Adds a regression browser test.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
useCalendarState / useRangeCalendarState return plain object literals, so
{ ...baseState, focusedDate, setFocusedDate } gives the same result with no
trap mechanics. Drops useMemo too — RAC's state hook returns a fresh object
each render, so memoizing on baseState identity buys nothing.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- Replace RACButton with antares Button (variant="minimal", size="sm")
  in CalendarHeader so prev/next inherit hover/focus/disabled styling
  from the design system. Drop the now-unused .navButton CSS.
- Trim verbose JSDoc on Calendar, RangeCalendar, and CalendarHeader.
…hevrons in RTL

- Rename internal `position?: 'single' | 'left' | 'right'` prop to
  `range?: 'start' | 'end'` (omit for single calendars). Names match the
  range value shape (`{ start, end }`) and are locale-direction-agnostic.
- Read `useLocale()` and flip the prev/next chevron icons in RTL so they
  point opposite the reading direction (matches RAC's recommended pattern).
- Update the calendar.node SSR snapshot — the prior Button-swap commit's
  markup change (.navButton → antares Button classes) was never captured.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@egaitan-godaddy egaitan-godaddy changed the base branch from feat/date-field to main June 4, 2026 16:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants