-
Notifications
You must be signed in to change notification settings - Fork 1.3k
docs: Update React Aria example styling #9049
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
@@ -0,0 +1,277 @@ | |||
@layer utilities { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These utilities are used across many different components, but currently are not displayed in the docs themselves. Do we want to add "utilities.css" and "theme.css" as tabs to the RAC examples? Should we split the utilities up into individual files? Should we put them all in theme.css so there's only one extra tab? 🤷
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm good to have them all in theme.css
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It does make that file quite large: over 500 lines
Build successful! 🎉 |
## API Changes
react-aria-components/react-aria-components:ColumnRenderProps ColumnRenderProps {
allowsSorting: boolean
isFocusVisible: boolean
isFocused: boolean
isHovered: boolean
+ isPressed: boolean
isResizing: boolean
sort: (SortDirection) => void
sortDirection: SortDirection | undefined
startResize: () => void @react-aria/table/@react-aria/table:TableColumnHeaderAria TableColumnHeaderAria {
columnHeaderProps: DOMAttributes
+ isPressed: boolean
} |
@@ -1,188 +1,204 @@ | |||
@import "./theme.css"; | |||
|
|||
.react-aria-GridList { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed GridList styling to be more like CardView and less similar to ListBox. Maybe it will help with the confusion between the two components.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Noticed in TextFields there's no difference between data-focused and focus-visible
Disclosure is using native focus ring
Form example, hitting 'reset' after filling out the form causes blur and validation which increase the width of the form and then you missing completing the click on reset. We should hardcode the width.
GridList, tab to first example, press arrow down, entire page scrolls. I think this was pre-existing.
Link, tabbing to the link seems to bring up a square focus ring that then turns into the rounded one.
RangeCalendar wiggles are you select, i am guessing we need to use box-sizing border-box somewhere in there
GridList, selection in checkbox not visible in HCM
Tabs, next to impossible to see the selection indicator in HCM (at least, in dark mode)
Updates the styling of all React Aria docs examples to look much nicer than before. Most of the changes are in the vanilla starter, so this will only affect the new docs. There were also a few changes in the Tailwind starter.
Mainly, the vanilla starter now has a more 3d appearance, which is implemented with box-shadow. This effect is centralized into 3 utility classes:
button-base
provides a common look for buttons (optionally with selection). These appear raised above the page.indicator
is a small indicator such as a checkbox/radio/switch. These are also raised above the page, but have higher contrast.inset
is a class that makes an element look etched into the page. Used for things like textfields and slider tracks.The styles are themable by setting the
--tint
CSS variable. All of the colors are calculated from this base color usingoklch
, which guarantees a baseline level of contrast across all hues. I provided some default hues as variables, but it can also work with any arbitrary color. Added a picker to the docs to change the theme when on the Vanilla CSS examples.Test instructions