From 9dd6644a794f082dc6aa192175d4a66b7717f8f3 Mon Sep 17 00:00:00 2001 From: Albert Yu Date: Thu, 6 Feb 2025 20:22:44 +0800 Subject: [PATCH] Update experiments --- .../src/app/(private)/experiments/toolbar.tsx | 427 ------------------ .../(private)/experiments/toolbar/_icons.tsx | 173 +++++++ .../(private)/experiments/toolbar/basic.tsx | 85 ++++ .../experiments/toolbar/text-editor.tsx | 268 +++++++++++ .../{ => toolbar}/toolbar.module.css | 54 ++- .../Experiments/ExperimentsList.tsx | 10 +- 6 files changed, 584 insertions(+), 433 deletions(-) delete mode 100644 docs/src/app/(private)/experiments/toolbar.tsx create mode 100644 docs/src/app/(private)/experiments/toolbar/_icons.tsx create mode 100644 docs/src/app/(private)/experiments/toolbar/basic.tsx create mode 100644 docs/src/app/(private)/experiments/toolbar/text-editor.tsx rename docs/src/app/(private)/experiments/{ => toolbar}/toolbar.module.css (80%) diff --git a/docs/src/app/(private)/experiments/toolbar.tsx b/docs/src/app/(private)/experiments/toolbar.tsx deleted file mode 100644 index 0ddfbb5da2..0000000000 --- a/docs/src/app/(private)/experiments/toolbar.tsx +++ /dev/null @@ -1,427 +0,0 @@ -'use client'; -import * as React from 'react'; -import { Separator } from '@base-ui-components/react/separator'; -import { Toolbar } from '@base-ui-components/react/toolbar'; -import { Toggle } from '@base-ui-components/react/toggle'; -import { ToggleGroup } from '@base-ui-components/react/toggle-group'; -import { Select } from '@base-ui-components/react/select'; -import { Menu } from '@base-ui-components/react/menu'; -import s from './toolbar.module.css'; -import selectClasses from '../../(public)/(content)/react/components/select/demos/hero/css-modules/index.module.css'; -import menuClasses from '../../(public)/(content)/react/components/menu/demos/hero/css-modules/index.module.css'; -import '../../../demo-theme.css'; - -const DISABLED = false; - -export default function App() { - return ( - - toolbar pattern - - console.log('clicked a regular toolbar button')} - > - A regular button - - - Visit base-ui.com - - - } - className={selectClasses.Select} - > - - - - - - - - - - - - - - - - - Sans-serif - - - - - - - - Serif - - - - - - - - Monospace - - - - - - - - Cursive - - - - - - - - - - } - defaultValue={[]} - className={s.ToggleGroup} - > - } - aria-label="Bold" - value="bold" - className={s.Toggle} - disabled={DISABLED} - > - - - } - aria-label="Italics" - value="italics" - className={s.Toggle} - disabled={DISABLED} - > - - - } - aria-label="Underline" - value="underline" - className={s.Toggle} - disabled={DISABLED} - > - - - - - - - } - defaultValue={['left']} - className={s.ToggleGroup} - disabled={DISABLED} - > - } - aria-label="Align left" - value="left" - className={s.Toggle} - > - - - } - aria-label="Align center" - value="center" - className={s.Toggle} - > - - - } - aria-label="Align right" - value="right" - className={s.Toggle} - > - - - - - - - - } - className={s.More} - > - - - - - - - - - Zoom in - Zoom out - Reset zoom - - Minimize - Maximize - - - - - -