diff --git a/package-lock.json b/package-lock.json index 86f2419de..c8bdaae2a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2401,6 +2401,7 @@ }, "node_modules/@clack/prompts/node_modules/is-unicode-supported": { "version": "1.3.0", + "extraneous": true, "inBundle": true, "license": "MIT", "engines": { @@ -34197,7 +34198,7 @@ }, "packages/components/drawer": { "name": "@spark-ui/drawer", - "version": "0.3.5", + "version": "1.0.0", "license": "MIT", "dependencies": { "@radix-ui/react-dialog": "1.0.5", diff --git a/packages/components/drawer/package.json b/packages/components/drawer/package.json index 6ce11d718..ffa534f71 100644 --- a/packages/components/drawer/package.json +++ b/packages/components/drawer/package.json @@ -1,6 +1,6 @@ { "name": "@spark-ui/drawer", - "version": "0.3.5", + "version": "1.0.0", "description": "A panel that slides out from the edge of the screen. It can be useful when you need users to complete a task or view some details without leaving the current page.", "publishConfig": { "access": "public" diff --git a/packages/components/drawer/src/Drawer.stories.tsx b/packages/components/drawer/src/Drawer.stories.tsx index 2611a18b5..93443839c 100644 --- a/packages/components/drawer/src/Drawer.stories.tsx +++ b/packages/components/drawer/src/Drawer.stories.tsx @@ -1,11 +1,12 @@ import { Button } from '@spark-ui/button' +import { RadioGroup } from '@spark-ui/radio-group' import { Meta, StoryFn } from '@storybook/react' import { useState } from 'react' import { Drawer, type DrawerContentProps } from '.' const meta: Meta = { - title: 'Experimental/Drawer', + title: 'Components/Drawer', component: Drawer, } @@ -43,11 +44,17 @@ export const Usage: StoryFn = () => { ))} - - - + +
+ + +
@@ -62,21 +69,23 @@ export const Sizes = () => { const [open, setOpen] = useState(false) return ( - <> - -
- - - - - - - +
+ setSize(value as ExcludeNull['size'])} + > + Small + Medium + Large + Fullscreen + - - - -
+ + + + @@ -112,7 +121,7 @@ export const Sizes = () => { - +
) } @@ -122,24 +131,21 @@ export const Side = () => { return ( <> + setSide(value as ExcludeNull['side'])} + > + Right + Left + Top + Bottom + -
- - - - - - - - - - - - - - - -
+ + + diff --git a/packages/components/drawer/src/DrawerBody.tsx b/packages/components/drawer/src/DrawerBody.tsx index 0b48439fc..618740d8d 100644 --- a/packages/components/drawer/src/DrawerBody.tsx +++ b/packages/components/drawer/src/DrawerBody.tsx @@ -11,7 +11,7 @@ export const DrawerBody = forwardRef(
( diff --git a/packages/components/drawer/src/DrawerContent.styles.tsx b/packages/components/drawer/src/DrawerContent.styles.tsx index b29ccfb9a..545a126cc 100644 --- a/packages/components/drawer/src/DrawerContent.styles.tsx +++ b/packages/components/drawer/src/DrawerContent.styles.tsx @@ -11,6 +11,7 @@ export const drawerContentStyles = cva( sm: '', md: '', lg: '', + fullscreen: 'h-screen w-screen', }, side: { right: [ @@ -52,12 +53,12 @@ export const drawerContentStyles = cva( { side: ['right', 'left'], size: 'md', - class: ['w-sz-640', 'max-w-full'], + class: ['w-sz-672', 'max-w-full'], }, { side: ['right', 'left'], size: 'lg', - class: ['w-sz-768', 'max-w-full'], + class: ['w-sz-864', 'max-w-full'], }, { side: ['top', 'bottom'], @@ -67,12 +68,12 @@ export const drawerContentStyles = cva( { side: ['top', 'bottom'], size: 'md', - class: ['h-sz-640', 'max-h-full'], + class: ['h-sz-672', 'max-h-full'], }, { side: ['top', 'bottom'], size: 'lg', - class: ['h-sz-768', 'max-h-full'], + class: ['h-sz-864', 'max-h-full'], }, ], defaultVariants: {