Skip to content

✨(Modal, Calendar): add variants and extract calendar#381

Open
PanchoutNathan wants to merge 7 commits intomainfrom
feat/new-calendar-and-fix-modals
Open

✨(Modal, Calendar): add variants and extract calendar#381
PanchoutNathan wants to merge 7 commits intomainfrom
feat/new-calendar-and-fix-modals

Conversation

@PanchoutNathan
Copy link
Copy Markdown
Collaborator

@PanchoutNathan PanchoutNathan commented Mar 24, 2026

Summary

  • Modal: add variant system (default + tab) with extracted
    layout components, new styles, tokens, tests and stories
  • Calendar: extract as standalone public component from
    DatePicker, with dedicated styles, tokens, tests and stories
  • Forms: harmonize font-size (md → sm) across inputs
  • Button: update border-radius (8px → 4px)
  • Deps: bump react-aria packages to latest versions

Refactor Modal to support two variants: default and tab.
Extract layout components into separate files:
- ModalDefaultLayout: title, subtitle, icon, compact mode
- ModalTabLayout: sidebar navigation with tab selection
- ModalFooter: left/right split actions
- ChevronIcons and CloseIcon: SVG icon components
Update helper modals to use new rightActions prop.
Add SCSS styles for default and tab modal variants:
- Compact title mode with smaller font size
- Subtitle support and title icon alignment
- Tab sidebar with active/hover states
- Responsive footer with left/right split
Add component tokens for new variant properties.
Add tests covering tab navigation and mobile view.
Add stories for subtitle, title icon, compact mode
and sticky footer.
Move Calendar, CalendarCell and CalendarGrid from
Forms/DatePicker into a new top-level Calendar
component directory.
Export Calendar and CalendarRange from the library.
Add dedicated SCSS styles, tokens, tests and stories.
Update DatePicker imports to use new Calendar path.
Reduce form input font-size from md to sm across
Input, Select, TextArea, LabelledBox and DatePicker.
Update Button border-radius from 8px to 4px.
Remove calendar-related tokens from DatePicker
(now in Calendar component tokens).
Update form SCSS styles accordingly.
Bump react-aria packages to latest versions:
- @react-aria/calendar 3.8.0 → 3.9.5
- @react-aria/datepicker 3.14.2 → 3.16.1
- @react-aria/i18n 3.12.8 → 3.12.16
- react-aria 3.39.0 → 3.47.0
- react-aria-components 1.8.0 → 1.16.0
Add calendar-specific locale keys for reset,
cancel and ok buttons in en-US and fr-FR.
Regenerate CSS, JS, SCSS and TS token files to
reflect new Calendar component tokens, updated
Modal tokens and form font-size changes.
@PanchoutNathan PanchoutNathan changed the title feat(Modal, Calendar): add variants and extract calendar ✨(Modal, Calendar): add variants and extract calendar Mar 24, 2026
Copy link
Copy Markdown
Collaborator

@NathanVss NathanVss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Noïce :)!

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's stick to one file per icon to optimize imports

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Story do not work anymore

Image

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

( The Docs main one )

closeOnClickOutside?: boolean;
closeOnEsc?: boolean;
preventClose?: boolean;
dimensions?: ModalDimensions;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what this new addition solves as a problem?

Not sure we want to introduce custom sized modals, as the DS should give strict rules, I fear that the apps will have yolo modals with all kind of sizes

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some stories do not load anymore.

Image

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make sure to update the main story to include this variants

https://suitenumerique.github.io/cunningham/storybook/?path=/docs/components-modal--docs

// Dimensions stories
// =====================

export const FixedHeight: Story = {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Image

Not fixed if screen is reduced, is it wanted? It is not really fixed, if so

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BUG

Image

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These background do not look really noïce

Poke @robin-lecomte

Image

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