diff --git a/src/app/page.tsx b/src/app/page.tsx index f175318..c0675ed 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -3,11 +3,13 @@ import * as React from 'react'; import { matchSorter } from 'match-sorter'; import { Accordion } from '@/components/Accordion'; +import { Collapsible } from '@/components/Collapsible'; import { ActionBar, ActionBarLabel, ActionBarActions } from '@/components/ActionBar'; import { Autocomplete } from '@/components/Autocomplete'; import { Alert } from '@/components/Alert'; import { AlertDialog } from '@/components/AlertDialog'; import { Dialog } from '@/components/Dialog'; +import { Drawer } from '@/components/Drawer'; import { Badge } from '@/components/Badge'; import { Breadcrumb } from '@/components/Breadcrumb'; import { Button } from '@/components/Button'; @@ -56,6 +58,7 @@ import { import { Toast, ToastVariant } from '@/components/Toast'; import { Tooltip } from '@/components/Tooltip'; import { Popover } from '@/components/Popover'; +import { PreviewCard } from '@/components/PreviewCard'; import { Logo } from '@/components/Logo'; import { Toggle, ToggleGroup } from '@/components/Toggle'; // Data for combobox examples @@ -1536,6 +1539,92 @@ function LiveDemo() { ); } +const drawerRequests = [ + { id: 'ck8qs-177', method: 'GET', path: '/customers', status: 200, duration: '314ms', host: 'grid-k507nwxq0.vercel.app', cache: 'HIT' }, + { id: 'ck8qs-178', method: 'POST', path: '/transactions', status: 201, duration: '892ms', host: 'grid-k507nwxq0.vercel.app', cache: 'MISS' }, + { id: 'ck8qs-179', method: 'GET', path: '/fees', status: 200, duration: '156ms', host: 'grid-k507nwxq0.vercel.app', cache: 'HIT' }, +]; + +function DrawerDemo() { + const [selected, setSelected] = React.useState(null); + + return ( +
+ + + + + + + + + + + {drawerRequests.map((req) => ( + setSelected(req)} + style={{ borderBottom: 'var(--stroke-xs) solid var(--border-primary)', cursor: 'pointer' }} + onMouseOver={(e) => { e.currentTarget.style.backgroundColor = 'var(--surface-hover)'; }} + onMouseOut={(e) => { e.currentTarget.style.backgroundColor = ''; }} + > + + + + + + ))} + +
MethodPathStatusDuration
{req.method}{req.path} + {req.status} + {req.duration}
+ + { if (!open) setSelected(null); }} swipeDirection="right"> + + + + + {selected && ( + <> +
+ + {selected.method} {selected.path} + +
+ {selected.status} + }> + + +
+
+ +
+
+ {[ + ['Request ID', selected.id], + ['Path', selected.path], + ['Host', selected.host], + ['Duration', selected.duration], + ['Cache', selected.cache], + ].map(([label, value]) => ( +
+ {label} + {value} +
+ ))} +
+
+
+ + )} +
+
+
+
+
+ ); +} + export default function Home() { return (
@@ -1577,7 +1666,6 @@ export default function Home() { -

Action Bar Component

@@ -1605,7 +1693,6 @@ export default function Home() {
-

Alert Component

@@ -1614,7 +1701,6 @@ export default function Home() {
-

Alert Dialog Component

@@ -1664,76 +1750,9 @@ export default function Home() {
- -

Dialog Component

- -
- - }> - Open Dialog - - - - - - - Dialog Title - - This is a description of the dialog content. - - - -

- Dialog content goes here. This area can contain forms, text, or any other content. -

-
- - }> - Cancel - - - -
-
-
- - - }> - Without Close Button - - - - - - No Close Button - - This dialog does not have an X close button. - - - -

- The user must use the footer buttons or press Escape to close. -

-
- - }> - Cancel - - }> - Done - - -
-
-
-
-

Autocomplete Component

-

Badge Component

@@ -1760,7 +1779,6 @@ export default function Home() { Label
-

Breadcrumb Component

@@ -1818,7 +1836,6 @@ export default function Home() {
-

Button Component

{/* Variants */} @@ -1871,7 +1888,6 @@ export default function Home() { -

Button Group

@@ -1933,247 +1949,462 @@ export default function Home() {
+

Card Component

+ +
+ + + + Structured + With card surface + + + +

Body content with sectioned layout.

+
+ + + +
-

Textarea

+ + + Simple + No card surface + + +

Body content with uniform padding.

+
+ +
+
+

Charts

-
-
- - Default - -