Arc UI v2.0
Releasing Arc Design System (ADS) 2.0 was our most ambitious release yet! We've completely swapped out the underlying styling technology and rebuilt much of our accessibility functionality on top of proven accessibility libraries.
#Breaking changes
#Stitches
styled-system
and relied on a theme provider wrapping any area where ADS components were used. In this release, ArcThemeProvider
is no longer needed and has been removed from the @wpmedia/ads-system
package. A top-level provider may be added again in the future for use in internationalization or style overrides.
Additionally, another feature of the previous system used the sx
prop to provide styles for a component. To make this work, a JSX pragma was required:
/** @jsx jsx */
import { jsx } from '@wpmedia/ads-system'
Stitches does not require JSX pragma and so this was removed from ADS in 2.0. Moving forward, the pragma declaration can be replaced by the standard React
import.
For more information on using Stitches with ADS, see the Stitches documentation and the ADS page on Styling with ADS.
#Packages back to Artifactory
@arc-ui
namespace. This change is reflected throughout the site.
#Icons
Icon
component. To use an icon, an icon name was passed as a prop, e.g., <Icon name="close" />
. As new icons were added to ADS, the icon package (and by extension, Icon
) grew in size even if the location Icon
was imported only used a single icon. To mitigate the inevitable bloat, ADS 2.0 now exports each icon as its own component. With this approach, you can be confident that you are not importing the entire ADS icon system when using an icon.
// pre-2.0
import { Icon } from '@wpmedia/ads-icon'
<Icon name="close" />
<Button iconName="close">Close</Button>
// 2.0!
import { Close } from '@wpmedia/ads-icon/Close'
<Close />
<Button icon={<Close />}>Close</Button>
#isSmall
removed
isSmall
prop to choose to use the small variant of a component. Given the nature and frequency of the small variant in Arc designs, isSmall
has been removed from all components and is now handled via a provider. By wrapping a component or a component sub-tree with the SmallProvider
every component that has a small variant will be adjusted to its smaller size.
<SmallProvider>
{/* everything here is small (if it has a small style) */}
<Button>A small button</Button>
</SmallProvider>
ADS also provides a hook to allow you to determine whether a component is within a small provider or not.
let isSmall = useSmallSize()
#onClick
is now onPress
react-aria
and react-stately
libraries. Following the example of Adobe Spectrum we've updated our handlers from onClick
to onPress
.
For more information on the reasoning behind this, see the thorough explanation from the Spectrum design system team.
See Button and IconButton.
#OverflowMenu
action handler moved
select
element and the ADS single select component, the onSelect
handler on MenuItem
has been removed.
Instead, to handle selections an onAction
handler has been added to OverflowMenu
component.
<OverflowMenu onAction={(key) => {...}}>
<MenuOption value="pick-me">Pick Me!</MenuOption>
</OverflowMenu>
Additionally, MenuItem
has been renamed to MenuOption
.
#Notifications
#What's new?
#React Components
- AddedSpinner
- AddedWorkbar
- AddedSingle select
- Coming soonTooltip
- Coming soonNotifications
#Design
- AddedAccessibility
- AddedDark mode color palette
- AddedDateTime picker
- AddedDrag & drop
- AddedEmpty state
- AddedFigma component design
- AddedInternationalization
- AddedTabs
#React components
#Added Spinner
#Added SingleSelect
#Design
#Added Accessibility
#Added Dark mode color palette
#Added DateTime picker
#Added Drag & drop
#Added Empty state
#Added Figma component design
#Added Internationalization
Back to release notes