From bdb847a6eb878895bf0cea41ce678c6a4f1a0a46 Mon Sep 17 00:00:00 2001 From: Alireza Date: Tue, 22 Apr 2025 10:45:14 -0400 Subject: [PATCH] fix docs (#4988) --- platform/docs/src/pages/components-list.tsx | 14 +- .../pages/components/AllinOneMenuShowcase.tsx | 274 +++++++++--------- .../pages/components/CinePlayerShowcase.tsx | 64 ++-- .../src/pages/components/TooltipShowcase.tsx | 50 ++-- 4 files changed, 212 insertions(+), 190 deletions(-) diff --git a/platform/docs/src/pages/components-list.tsx b/platform/docs/src/pages/components-list.tsx index efaae8a44..4549e049b 100644 --- a/platform/docs/src/pages/components-list.tsx +++ b/platform/docs/src/pages/components-list.tsx @@ -1,17 +1,17 @@ import React from 'react'; import '../css/custom.css'; import Layout from '@theme/Layout'; -import { TooltipProvider } from '../../../ui-next/src/components/Tooltip'; +import { TooltipProvider } from '../../../../platform/ui-next/src/components/Tooltip'; // Navigation card components -import { Card, CardHeader, CardTitle, CardDescription } from '../../../ui-next/src/components/Card'; -import { Icons } from '../../../ui-next/src/components/Icons'; +import { Card, CardHeader, CardTitle, CardDescription } from '../../../../platform/ui-next/src/components/Card'; +import { Icons } from '../../../../platform/ui-next/src/components/Icons'; /* Showcase components (alphabetical) */ -import AllinOneMenuShowcase from './components/AllinOneMenuShowcase'; +// import AllinOneMenuShowcase from './components/AllinOneMenuShowcase'; import ButtonShowcase from './components/ButtonShowcase'; import CheckboxShowcase from './components/CheckboxShowcase'; -import CinePlayerShowcase from './components/CinePlayerShowcase'; +// import CinePlayerShowcase from './components/CinePlayerShowcase'; import ComboboxShowcase from './components/ComboboxShowcase'; import DataRowShowcase from './components/DataRowShowcase'; import DialogShowcase from './components/DialogShowcase'; @@ -98,10 +98,10 @@ export default function ComponentsList() {

Components

- + {/* */} - + {/* */} diff --git a/platform/docs/src/pages/components/AllinOneMenuShowcase.tsx b/platform/docs/src/pages/components/AllinOneMenuShowcase.tsx index f479b5d9d..50a7429c6 100644 --- a/platform/docs/src/pages/components/AllinOneMenuShowcase.tsx +++ b/platform/docs/src/pages/components/AllinOneMenuShowcase.tsx @@ -1,142 +1,150 @@ -import React from 'react'; -import AllInOneMenu, { - IconMenu, - SubMenu, - ItemPanel, - Item, - DividerItem, - HorizontalDirection, - VerticalDirection, -} from '../../../../ui-next/src/components/AllInOneMenu'; -import { Switch } from '../../../../ui-next/src/components/Switch'; -import ShowcaseRow from './ShowcaseRow'; +// import React from 'react'; +// import * as AllInOneMenu from '../../../../../platform/ui-next/src/components/AllInOneMenu'; +// import { Switch } from '../../../../../platform/ui-next/src/components/Switch'; +// import ShowcaseRow from './ShowcaseRow'; /** * Pure‑UI mock of the in‑app Window/Level menu. * Clickable, but all actions are inert. */ export default function AllinOneMenuShowcase() { - /* Helpers to build common static items so the JSX stays concise */ - const renderColorLUTItems = () => - [ - 'Grayscale', - 'X Ray', - 'HSV', - 'Hot Iron', - 'Red Hot', - 'S PET', - 'Perfusion', - 'Rainbow', - 'SUV', - 'GE 256', - 'GE', - 'Siemens', - ].map(name => ); + return null; +} - const renderWindowPresetItems = () => - [ - { desc: 'Soft tissue', wl: '400 / 40' }, - { desc: 'Lung', wl: '1500 / -600' }, - { desc: 'Liver', wl: '150 / 90' }, - { desc: 'Bone', wl: '2500 / 480' }, - { desc: 'Brain', wl: '80 / 40' }, - ].map(p => ( - - )); +// /* Helpers to build common static items so the JSX stays concise */ +// const renderColorLUTItems = () => +// [ +// 'Grayscale', +// 'X Ray', +// 'HSV', +// 'Hot Iron', +// 'Red Hot', +// 'S PET', +// 'Perfusion', +// 'Rainbow', +// 'SUV', +// 'GE 256', +// 'GE', +// 'Siemens', +// ].map(name => ( +// +// )); - return ( - - - } /> - - - - } /> - - - - - - - - - - - - - - - - - - - - - - - - - -`} - > -
- - - - } - useIconSpace={false} - /> - - - - - } - /> - - {renderColorLUTItems()} - - - - {renderWindowPresetItems()} - - - +// const renderWindowPresetItems = () => +// [ +// { desc: 'Soft tissue', wl: '400 / 40' }, +// { desc: 'Lung', wl: '1500 / -600' }, +// { desc: 'Liver', wl: '150 / 90' }, +// { desc: 'Bone', wl: '2500 / 480' }, +// { desc: 'Brain', wl: '80 / 40' }, +// ].map(p => ( +// +// )); - - Click the icon to explore an example - -
-
- ); -} \ No newline at end of file +// return ( +// +// +// } /> +// +// +// +// } /> +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// +// `} +// > +//
+// +// +// +// } +// useIconSpace={false} +// /> +// +// +// +// +// } +// /> +// +// {renderColorLUTItems()} +// +// +// +// +// {renderWindowPresetItems()} +// +// +// +// + +// +// Click the icon to explore an example +// +//
+//
+// ); +// } diff --git a/platform/docs/src/pages/components/CinePlayerShowcase.tsx b/platform/docs/src/pages/components/CinePlayerShowcase.tsx index dc07be265..f9bb3d6bc 100644 --- a/platform/docs/src/pages/components/CinePlayerShowcase.tsx +++ b/platform/docs/src/pages/components/CinePlayerShowcase.tsx @@ -1,37 +1,39 @@ -import React, { useState } from 'react'; -import CinePlayer from '../../../../ui-next/src/components/CinePlayer/CinePlayer'; -import ShowcaseRow from './ShowcaseRow'; +// import React, { useState } from 'react'; +// import CinePlayer from '../../../../ui-next/src/components/CinePlayer/CinePlayer'; +// import ShowcaseRow from './ShowcaseRow'; /** * CinePlayerShowcase displays a playable/pausable cine player with FPS control. */ export default function CinePlayerShowcase() { - const [isPlaying, setIsPlaying] = useState(false); - const [fps, setFps] = useState(24); - - return ( - console.log('close clicked')} -/> - `} - > - console.log('close clicked')} - /> - - ); + return null; } +// const [isPlaying, setIsPlaying] = useState(false); +// const [fps, setFps] = useState(24); + +// return ( +// console.log('close clicked')} +// /> +// `} +// > +// console.log('close clicked')} +// /> +// +// ); +// } diff --git a/platform/docs/src/pages/components/TooltipShowcase.tsx b/platform/docs/src/pages/components/TooltipShowcase.tsx index c9ad13651..7fd2c778b 100644 --- a/platform/docs/src/pages/components/TooltipShowcase.tsx +++ b/platform/docs/src/pages/components/TooltipShowcase.tsx @@ -1,6 +1,11 @@ import React from 'react'; -import { Tooltip, TooltipTrigger, TooltipContent } from '../../../../ui-next/src/components/Tooltip'; -import { Button } from '../../../../ui-next/src/components/Button'; +import { + Tooltip, + TooltipTrigger, + TooltipContent, + TooltipProvider, +} from '../../../../../platform/ui-next/src/components/Tooltip'; +import { Button } from '../../../../../platform/ui-next/src/components/Button'; import ShowcaseRow from './ShowcaseRow'; /** @@ -12,24 +17,31 @@ export default function TooltipShowcase() { title="Tooltip" description="Tooltips reveal helper text when users hover, focus, or tap an element." code={` - - - - - - Tooltip content - - + + + + + + + Tooltip content + + + `} > - - - - - - Tooltip content - - + + + + + + Tooltip content + + ); -} \ No newline at end of file +}