Skip to content

Commit 8099234

Browse files
committed
Primitives 1344 documentation (#376)
* Add new version pages * Remove references to `forwards` in new versions
1 parent 0a7dbd0 commit 8099234

File tree

21 files changed

+1520
-41
lines changed

21 files changed

+1520
-41
lines changed

components/demos/Accordion.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,10 @@ const StyledContent = styled(AccordionPrimitive.Content, {
7474
backgroundColor: mauve.mauve2,
7575

7676
'&[data-state="open"]': {
77-
animation: `${slideDown} 300ms cubic-bezier(0.87, 0, 0.13, 1) forwards`,
77+
animation: `${slideDown} 300ms cubic-bezier(0.87, 0, 0.13, 1)`,
7878
},
7979
'&[data-state="closed"]': {
80-
animation: `${slideUp} 300ms cubic-bezier(0.87, 0, 0.13, 1) forwards`,
80+
animation: `${slideUp} 300ms cubic-bezier(0.87, 0, 0.13, 1)`,
8181
},
8282
});
8383

components/demos/AlertDialog.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ const StyledOverlay = styled(AlertDialogPrimitive.Overlay, {
1818
position: 'fixed',
1919
inset: 0,
2020
'@media (prefers-reduced-motion: no-preference)': {
21-
animation: `${overlayShow} 150ms cubic-bezier(0.16, 1, 0.3, 1) forwards`,
21+
animation: `${overlayShow} 150ms cubic-bezier(0.16, 1, 0.3, 1)`,
2222
},
2323
});
2424

@@ -35,7 +35,7 @@ const StyledContent = styled(AlertDialogPrimitive.Content, {
3535
maxHeight: '85vh',
3636
padding: 25,
3737
'@media (prefers-reduced-motion: no-preference)': {
38-
animation: `${contentShow} 150ms cubic-bezier(0.16, 1, 0.3, 1) forwards`,
38+
animation: `${contentShow} 150ms cubic-bezier(0.16, 1, 0.3, 1)`,
3939
},
4040
'&:focus': { outline: 'none' },
4141
});

components/demos/Dialog.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const StyledOverlay = styled(DialogPrimitive.Overlay, {
1919
position: 'fixed',
2020
inset: 0,
2121
'@media (prefers-reduced-motion: no-preference)': {
22-
animation: `${overlayShow} 150ms cubic-bezier(0.16, 1, 0.3, 1) forwards`,
22+
animation: `${overlayShow} 150ms cubic-bezier(0.16, 1, 0.3, 1)`,
2323
},
2424
});
2525

@@ -36,7 +36,7 @@ const StyledContent = styled(DialogPrimitive.Content, {
3636
maxHeight: '85vh',
3737
padding: 25,
3838
'@media (prefers-reduced-motion: no-preference)': {
39-
animation: `${contentShow} 150ms cubic-bezier(0.16, 1, 0.3, 1) forwards`,
39+
animation: `${contentShow} 150ms cubic-bezier(0.16, 1, 0.3, 1)`,
4040
},
4141
'&:focus': { outline: 'none' },
4242
});

components/demos/DropdownMenu.jsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ const StyledContent = styled(DropdownMenuPrimitive.Content, {
3939
'@media (prefers-reduced-motion: no-preference)': {
4040
animationDuration: '400ms',
4141
animationTimingFunction: 'cubic-bezier(0.16, 1, 0.3, 1)',
42-
animationFillMode: 'forwards',
4342
willChange: 'transform, opacity',
4443
'&[data-state="open"]': {
4544
'&[data-side="top"]': { animationName: slideDownAndFade },

components/demos/HoverCard.jsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ const StyledContent = styled(HoverCardPrimitive.Content, {
3232
'@media (prefers-reduced-motion: no-preference)': {
3333
animationDuration: '400ms',
3434
animationTimingFunction: 'cubic-bezier(0.16, 1, 0.3, 1)',
35-
animationFillMode: 'forwards',
3635
willChange: 'transform, opacity',
3736
'&[data-state="open"]': {
3837
'&[data-side="top"]': { animationName: slideDownAndFade },

components/demos/Popover.jsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ const StyledContent = styled(PopoverPrimitive.Content, {
3232
'@media (prefers-reduced-motion: no-preference)': {
3333
animationDuration: '400ms',
3434
animationTimingFunction: 'cubic-bezier(0.16, 1, 0.3, 1)',
35-
animationFillMode: 'forwards',
3635
willChange: 'transform, opacity',
3736
'&[data-state="open"]': {
3837
'&[data-side="top"]': { animationName: slideDownAndFade },

components/demos/Toast.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ const StyledToast = styled(ToastPrimitive.Root, {
5252
animation: `${slideIn} 150ms cubic-bezier(0.16, 1, 0.3, 1)`,
5353
},
5454
'&[data-state="closed"]': {
55-
animation: `${hide} 100ms ease-in forwards`,
55+
animation: `${hide} 100ms ease-in`,
5656
},
5757
'&[data-swipe="move"]': {
5858
transform: 'translateX(var(--radix-toast-swipe-move-x))',
@@ -62,7 +62,7 @@ const StyledToast = styled(ToastPrimitive.Root, {
6262
transition: 'transform 200ms ease-out',
6363
},
6464
'&[data-swipe="end"]': {
65-
animation: `${swipeOut} 100ms ease-out forwards`,
65+
animation: `${swipeOut} 100ms ease-out`,
6666
},
6767
},
6868
});

components/demos/Tooltip.jsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ const StyledContent = styled(TooltipPrimitive.Content, {
3535
'@media (prefers-reduced-motion: no-preference)': {
3636
animationDuration: '400ms',
3737
animationTimingFunction: 'cubic-bezier(0.16, 1, 0.3, 1)',
38-
animationFillMode: 'forwards',
3938
willChange: 'transform, opacity',
4039
'&[data-state="delayed-open"]': {
4140
'&[data-side="top"]': { animationName: slideDownAndFade },

data/primitives/components/accordion/0.1.6.mdx renamed to data/primitives/components/accordion/0.1.7.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -368,8 +368,8 @@ const AccordionHeader = styled(Accordion.Header, {
368368

369369
const AccordionContent = styled(Accordion.Content, {
370370
overflow: 'hidden',
371-
'&[data-state="open"]': { animation: `${open} 300ms ease-out forwards` },
372-
'&[data-state="closed"]': { animation: `${close} 300ms ease-out forwards` },
371+
'&[data-state="open"]': { animation: `${open} 300ms ease-out` },
372+
'&[data-state="closed"]': { animation: `${close} 300ms ease-out` },
373373
});
374374

375375
export default () => (
File renamed without changes.

0 commit comments

Comments
 (0)