Skip to content

Commit

Permalink
ui(component): Added new Toast (Sonner) component (#4412)
Browse files Browse the repository at this point in the history
  • Loading branch information
dan-rukas authored Oct 17, 2024
1 parent 43f54aa commit e0fca8c
Show file tree
Hide file tree
Showing 16 changed files with 1,213 additions and 248 deletions.
2 changes: 2 additions & 0 deletions platform/docs/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -176,12 +176,14 @@ module.exports = {
target: '_blank',
position: 'left',
},
/*
{
to: '/playground',
label: 'UI Playground',
position: 'left',
className: 'new-badge',
},
*/
{
to: '/help',
//activeBaseRegex: '(^/help$)|(/help)',
Expand Down
10 changes: 8 additions & 2 deletions platform/docs/src/pages/patterns/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,22 @@ export default function Patterns() {
<h1>Patterns</h1>
<button
className="bg-slate-400"
onClick={() => history.push('/patterns/segmentation-panel')}
onClick={() => history.push('/patterns/patterns-segmentation')}
>
{'Segmentation Panel'}
</button>
<button
className="bg-slate-400"
onClick={() => history.push('/patterns/measurement-panel')}
onClick={() => history.push('/patterns/patterns-measurements')}
>
{'Measurements Panel'}
</button>
<button
className="bg-slate-400"
onClick={() => history.push('/patterns/patterns-tmtv')}
>
{'tmtv'}
</button>
</Layout>
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,18 @@ import {
SelectItem,
} from '../../../../ui-next/src/components/Select';
import { Icons } from '../../../../ui-next/src/components/Icons';
import {
DropdownMenu,
DropdownMenuTrigger,
DropdownMenuContent,
DropdownMenuItem,
DropdownMenuSeparator,
DropdownMenuLabel,
DropdownMenuSub,
DropdownMenuSubTrigger,
DropdownMenuSubContent,
DropdownMenuPortal,
} from '../../../../ui-next/src/components/DropdownMenu';
import {
Accordion,
AccordionItem,
Expand Down Expand Up @@ -85,6 +97,50 @@ export default function SegmentationPanel() {
<div className="mb-0">
{/* Header Controls */}
<div className="bg-muted flex h-10 w-full items-center space-x-1 rounded-t px-1.5">
<DropdownMenu>
<DropdownMenuTrigger asChild>
<Button
variant="ghost"
size="icon"
>
<Icons.More className="h-6 w-6" />
</Button>
</DropdownMenuTrigger>
<DropdownMenuContent align="start">
<DropdownMenuItem>
<Icons.Add className="text-foreground" />
<span className="pl-2">Create New Segmentation</span>
</DropdownMenuItem>
<DropdownMenuSeparator />
<DropdownMenuLabel>Manage Current Segmentation</DropdownMenuLabel>
<DropdownMenuItem>
<Icons.Series className="text-foreground" />
<span className="pl-2">Remove from Viewport</span>
</DropdownMenuItem>
<DropdownMenuItem>
<Icons.Rename className="text-foreground" />
<span className="pl-2">Rename</span>
</DropdownMenuItem>
<DropdownMenuSub>
<DropdownMenuSubTrigger>
<Icons.Export className="text-foreground" />
<span className="pl-2">Export & Download</span>
</DropdownMenuSubTrigger>
<DropdownMenuPortal>
<DropdownMenuSubContent>
<DropdownMenuItem>Export DICOM SEG</DropdownMenuItem>
<DropdownMenuItem>Download DICOM SEG</DropdownMenuItem>
<DropdownMenuItem>Download DICOM RTSTRUCT</DropdownMenuItem>
</DropdownMenuSubContent>
</DropdownMenuPortal>
</DropdownMenuSub>
<DropdownMenuSeparator />
<DropdownMenuItem>
<Icons.Delete className="text-red-600" />
<span className="pl-2 text-red-600">Delete</span>
</DropdownMenuItem>
</DropdownMenuContent>
</DropdownMenu>
<Select>
<SelectTrigger className="w-full overflow-hidden">
<SelectValue placeholder="Segmentation 1" />
Expand Down
43 changes: 43 additions & 0 deletions platform/docs/src/pages/patterns/patterns-split-panel.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
import React, { useState } from 'react';

import { DataRow } from '../../../../ui-next/src/components/DataRow';
import { Button } from '../../../../ui-next/src/components/Button';
import {
Select,
SelectValue,
SelectTrigger,
SelectContent,
SelectItem,
} from '../../../../ui-next/src/components/Select';
import { Icons } from '../../../../ui-next/src/components/Icons';
import {
Accordion,
AccordionItem,
AccordionTrigger,
AccordionContent,
} from '../../../../ui-next/src/components/Accordion';
import { Slider } from '../../../../ui-next/src/components/Slider';
import { Switch } from '../../../../ui-next/src/components/Switch';
import { Label } from '../../../../ui-next/src/components/Label';
import { Input } from '../../../../ui-next/src/components/Input';
import { Tabs, TabsList, TabsTrigger } from '../../../../ui-next/src/components/Tabs';
import { actionOptionsMap, dataList } from '../../../../ui-next/assets/data';

interface DataItem {
id: number;
title: string;
description: string;
optionalField?: string;
colorHex?: string;
details?: string;
series?: string;
}

interface ListGroup {
type: string;
items: DataItem[];
}

export default function SplitPanel() {
return <div>hellosssssss</div>;
}
Loading

0 comments on commit e0fca8c

Please sign in to comment.