Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .storybook-s2/docs/Migrating.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,7 @@ export function Migrating() {
<li className={style({font: 'body', marginY: 8})}>Remove <Code>validationState="valid"</Code> (it is no longer supported in Spectrum 2)</li>
<li className={style({font: 'body', marginY: 8})}>Update <Code>Item</Code> to be a <Code>PickerItem</Code></li>
<li className={style({font: 'body', marginY: 8})}>Change <Code>isLoading</Code> to <Code>loadingState</Code> and provide the appropriate loading state.</li>
<li className={style({font: 'body', marginY: 8})}><Code>defaultSelectedKey</Code> and <Code>selectedKey</Code> have been deprecated in favor of <Code>defaultValue</Code> and <Code>value</Code> respectively. See the <Link href="?path=/docs/picker--docs">props table</Link> for the new accepted types.</li>
</ul>

<H3>ProgressBar</H3>
Expand Down
5 changes: 4 additions & 1 deletion packages/@react-spectrum/s2/src/Disclosure.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,10 @@ const panelStyles = style({
font: 'body',
height: '--disclosure-panel-height',
overflow: 'clip',
transition: '[height]'
transition: {
default: '[height]',
'@media (prefers-reduced-motion: reduce)': 'none'
}
});

const panelInner = style({
Expand Down
4 changes: 3 additions & 1 deletion packages/@react-spectrum/s2/stories/Picker.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,9 @@ const meta: Meta<typeof Picker<any>> = {
description: {control: {type: 'text'}},
errorMessage: {control: {type: 'text'}},
children: {table: {disable: true}},
contextualHelp: {table: {disable: true}}
contextualHelp: {table: {disable: true}},
defaultSelectedKey: {table: {disable: true}},
selectedKey: {table: {disable: true}}
},
args: {...getActionArgs(events)},
title: 'Picker'
Expand Down
4 changes: 4 additions & 0 deletions packages/dev/s2-docs/pages/react-aria/SegmentedControl.css
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@
border-radius: 8px;
background: var(--gray-50);
outline: 2px solid var(--gray-600);

@media (prefers-reduced-motion: reduce) {
transition: none;
}
}

.segmented-control-item {
Expand Down
4 changes: 4 additions & 0 deletions packages/react-aria-components/docs/Disclosure.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,10 @@ import {ChevronRight} from 'lucide-react';
height: var(--disclosure-panel-height);
transition: height 250ms;
overflow: clip;

@media (prefers-reduced-motion: reduce) {
transition: none;
}
}
```

Expand Down
4 changes: 4 additions & 0 deletions packages/react-aria-components/docs/Tabs.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,10 @@ import {Tabs, TabList, Tab, TabPanel, SelectionIndicator} from 'react-aria-compo
position: absolute;
transition-property: translate, width, height;
transition-duration: 200ms;

@media (prefers-reduced-motion: reduce) {
transition: none;
}
}

&[data-hovered],
Expand Down
4 changes: 4 additions & 0 deletions packages/react-aria-components/docs/ToggleButtonGroup.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,10 @@ import {ToggleButtonGroup, ToggleButton, SelectionIndicator} from 'react-aria-co
border-radius: 8px;
background: var(--gray-50);
outline: 2px solid var(--gray-600);

@media (prefers-reduced-motion: reduce) {
transition: none;
}
}

.react-aria-ToggleButton {
Expand Down
4 changes: 4 additions & 0 deletions starters/docs/src/Disclosure.css
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,8 @@
height: var(--disclosure-panel-height);
transition: height 250ms;
overflow: clip;

@media (prefers-reduced-motion: reduce) {
transition: none;
}
}
4 changes: 4 additions & 0 deletions starters/docs/src/Tabs.css
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@
position: absolute;
transition-property: translate, width, height;
transition-duration: 200ms;

@media (prefers-reduced-motion: reduce) {
transition: none;
}
}

&[data-selected] {
Expand Down
2 changes: 1 addition & 1 deletion starters/tailwind/src/Disclosure.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ export interface DisclosurePanelProps extends AriaDisclosurePanelProps {

export function DisclosurePanel({ children, ...props }: DisclosurePanelProps) {
return (
<AriaDisclosurePanel {...props} className={composeTailwindRenderProps(props.className, 'h-(--disclosure-panel-height) transition-[height] overflow-clip')}>
<AriaDisclosurePanel {...props} className={composeTailwindRenderProps(props.className, 'h-(--disclosure-panel-height) motion-safe:transition-[height] overflow-clip')}>
<div className="px-4 py-2">{children}</div>
</AriaDisclosurePanel>
);
Expand Down
2 changes: 1 addition & 1 deletion starters/tailwind/src/Tabs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export function Tab(props: TabProps) {
)}>
{composeRenderProps(props.children, children => (<>
{children}
<SelectionIndicator className="absolute top-0 left-0 w-full h-full z-10 bg-white rounded-full mix-blend-difference transition-[translate,width,height]" />
<SelectionIndicator className="absolute top-0 left-0 w-full h-full z-10 bg-white rounded-full mix-blend-difference motion-safe:transition-[translate,width,height] " />
</>))}
</RACTab>
);
Expand Down
Loading