diff --git a/docs/src/app/experiments/accordion-animations.tsx b/docs/src/app/experiments/accordion-animations.tsx index 375cb9b1e..c7d689c96 100644 --- a/docs/src/app/experiments/accordion-animations.tsx +++ b/docs/src/app/experiments/accordion-animations.tsx @@ -10,12 +10,9 @@ function classNames(...c: Array) { export default function App() { return (
-

- CSS @keyframe animations + `hidden="until-found"` + keepMounted -

+

CSS @keyframe animations + `hidden="until-found"`

diff --git a/docs/src/app/experiments/collapsible.tsx b/docs/src/app/experiments/collapsible.tsx deleted file mode 100644 index 9e4c20b75..000000000 --- a/docs/src/app/experiments/collapsible.tsx +++ /dev/null @@ -1,205 +0,0 @@ -'use client'; -import * as React from 'react'; -import { Collapsible } from '@base_ui/react/Collapsible'; - -const DURATION = '350ms'; - -export default function CollapsibleDemo() { - return ( -
-
- - - - - - - - Trigger (CSS animation) - - -

This is the collapsed content

-

This component is animated with CSS @keyframe animations

-

demo: https://codepen.io/aardrian/pen/QWjBNQG

-

https://adrianroselli.com/2020/05/disclosure-widgets.html

-
-
-
- -
- - - - - - - - Trigger (CSS transition) - - -

This is the collapsed content

-

This component is animated with CSS transitions

-

demo: https://codepen.io/aardrian/pen/QWjBNQG

-

https://adrianroselli.com/2020/05/disclosure-widgets.html

-
-
-
- - } className="MyCollapsible-root"> - - - - - - - Trigger (root renders a span + CSS transition) - - -

This is the collapsed content

-

This component is animated with CSS transitions

-

demo: https://codepen.io/aardrian/pen/QWjBNQG

-

https://adrianroselli.com/2020/05/disclosure-widgets.html

-
-
- -
- ); -} - -const grey = { - 50: '#F3F6F9', - 100: '#E5EAF2', - 200: '#DAE2ED', - 300: '#C7D0DD', - 400: '#B0B8C4', - 500: '#9DA8B7', - 600: '#6B7A90', - 700: '#434D5B', - 800: '#303740', - 900: '#1C2025', -}; - -export function Styles() { - return ( - - ); -} diff --git a/docs/src/app/experiments/progress.tsx b/docs/src/app/experiments/progress.tsx deleted file mode 100644 index 3bab4439a..000000000 --- a/docs/src/app/experiments/progress.tsx +++ /dev/null @@ -1,256 +0,0 @@ -'use client'; -import * as React from 'react'; -import { useTheme } from '@mui/system'; -import { Progress } from '@base_ui/react/Progress'; - -const VAL1 = 33; - -const CUSTOM_BUFFER_VAL = 77; - -export default function ProgressDemos() { - return ( -
- - - - - - - - - Indeterminate Progress - - - - - - - - - Progress (RTL) - - - - - - - - - Indeterminate (RTL) - - - - - - -

Customizations

- - - `${value}% complete, ${CUSTOM_BUFFER_VAL}% buffered` - } - max={Math.min(100, CUSTOM_BUFFER_VAL)} - > - - Custom Buffer Component - - - - - - - - - `${value}% complete, ${CUSTOM_BUFFER_VAL}% buffered` - } - max={Math.min(100, CUSTOM_BUFFER_VAL)} - direction="rtl" - > - - Custom Buffer Component (RTL) - - - - - - - -
- ); -} - -function MyBuffer(props: any) { - const { value, style, ...rest } = props; - const percentageValue = valueToPercent(value, 0, 100); - return ( - - ); -} - -function valueToPercent(value: number | undefined, min: number, max: number) { - if (value === undefined) { - return value; - } - - return ((value - min) * 100) / (max - min); -} - -const grey = { - 50: '#F3F6F9', - 100: '#E5EAF2', - 200: '#DAE2ED', - 300: '#C7D0DD', - 400: '#B0B8C4', - 500: '#9DA8B7', - 600: '#6B7A90', - 700: '#434D5B', - 800: '#303740', - 900: '#1C2025', -}; - -const BLUE400 = '#3399FF'; -const BLUE500 = '#007FFF'; - -function useIsDarkMode() { - const theme = useTheme(); - return theme.palette.mode === 'dark'; -} - -export function Styles() { - const isDarkMode = useIsDarkMode(); - return ( - - ); -}