@gridui/drawer 1.1.1 → 1.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -5,7 +5,7 @@ Core family. Public API: `Drawer`, `DrawerBody`, `DrawerBodyProps`, `DrawerClose
5
5
  Import components from `@gridui/drawer` and load `@gridui/drawer/styles.css` after Theme.
6
6
  Load styles for any composed dependency used by this family. Applications own routes, labels, state persistence, and branding.
7
7
 
8
- See [component ownership](../../docs/component-ownership.md) and [release history](.changeset/history/).
8
+ See [component ownership](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/docs/component-ownership.md) and [release history](https://github.com/sudo-ui/GridUI-React-Monorepo/tree/main/packages-core/drawer/.changeset/history).
9
9
 
10
10
  `DrawerPanel` portals its backdrop and surface to the document by default.
11
11
  Set `portal={false}` to keep an ordinary modal panel in its owner's DOM scope.
package/dist/index.js CHANGED
@@ -24,7 +24,7 @@ import { cn } from "@gridui/style-utils";
24
24
  import { cva } from "class-variance-authority";
25
25
  var drawerBodyStyles = cva(cn(
26
26
  "gridui-drawer-body",
27
- "min-h-0 flex-1 overflow-y-auto overscroll-contain p-gridui-24"
27
+ "gridui-u-min-h-0 gridui-u-flex-1 gridui-u-overflow-y-auto gridui-u-overscroll-contain gridui-u-p-gridui-24"
28
28
  ));
29
29
 
30
30
  // src/drawer-body/drawer-body.tsx
@@ -98,7 +98,7 @@ import { cn as cn3 } from "@gridui/style-utils";
98
98
  import { cva as cva2 } from "class-variance-authority";
99
99
  var drawerDescriptionStyles = cva2(cn3(
100
100
  "gridui-drawer-description",
101
- "text-muted"
101
+ "gridui-u-text-muted"
102
102
  ));
103
103
 
104
104
  // src/drawer-description/drawer-description.tsx
@@ -124,8 +124,8 @@ import { cn as cn5 } from "@gridui/style-utils";
124
124
  import { cva as cva3 } from "class-variance-authority";
125
125
  var drawerFooterStyles = cva3(cn5(
126
126
  "gridui-drawer-footer",
127
- "shrink-0 p-gridui-24",
128
- "max-h-[50dvh] overflow-y-auto pb-[max(var(--gridui-space-24),env(safe-area-inset-bottom))] border-t border-solid border-border"
127
+ "gridui-u-shrink-0 gridui-u-p-gridui-24",
128
+ "gridui-u-max-h-[50dvh] gridui-u-overflow-y-auto gridui-u-pb-[max(var(--gridui-space-24),env(safe-area-inset-bottom))] gridui-u-border-t gridui-u-border-solid gridui-u-border-border"
129
129
  ));
130
130
 
131
131
  // src/drawer-footer/drawer-footer.tsx
@@ -147,8 +147,8 @@ import { cn as cn7 } from "@gridui/style-utils";
147
147
  import { cva as cva4 } from "class-variance-authority";
148
148
  var drawerHeaderStyles = cva4(cn7(
149
149
  "gridui-drawer-header",
150
- "shrink-0 p-gridui-24",
151
- "flex items-center justify-between gap-gridui-16 pt-[max(var(--gridui-space-24),env(safe-area-inset-top))] border-b border-solid border-border"
150
+ "gridui-u-shrink-0 gridui-u-p-gridui-24",
151
+ "gridui-u-flex gridui-u-items-center gridui-u-justify-between gridui-u-gap-gridui-16 gridui-u-pt-[max(var(--gridui-space-24),env(safe-area-inset-top))] gridui-u-border-b gridui-u-border-solid gridui-u-border-border"
152
152
  ));
153
153
 
154
154
  // src/drawer-header/drawer-header.tsx
@@ -172,17 +172,17 @@ import { cva as cva5 } from "class-variance-authority";
172
172
  var drawerOverlayStyles = cva5(cn9(
173
173
  overlayBackdropStyles({ pace: "deliberate" }),
174
174
  "gridui-drawer-overlay",
175
- "fixed z-(--gridui-z-drawer-backdrop) inset-0 bg-[light-dark(rgb(0_0_0/25%),rgb(0_0_0/60%))]",
176
- "data-[state='closed']:pointer-events-none"
175
+ "gridui-u-fixed gridui-u-z-(--gridui-z-drawer-backdrop) gridui-u-inset-0 gridui-u-bg-[light-dark(rgb(0_0_0/25%),rgb(0_0_0/60%))]",
176
+ "gridui-u-data-[state='closed']:pointer-events-none"
177
177
  ));
178
178
  var drawerPanelStyles = cva5(cn9(
179
179
  "gridui-drawer-panel",
180
- "fixed z-(--gridui-z-drawer) inset-y-0 flex w-[min(100%,var(--gridui-drawer-width,24rem))] max-w-full h-dvh min-h-0 flex-col box-border border border-solid border-border border-y-0 text-foreground bg-background type-supporting",
181
- "data-[side='end']:inset-e-0 data-[side='end']:[border-inline-end:0]",
182
- "data-[side='start']:inset-s-0 data-[side='start']:[border-inline-start:0]",
183
- "data-[side='left']:left-0 data-[side='left']:border-l-0",
184
- "data-[side='right']:right-0 data-[side='right']:border-r-0",
185
- "data-[state='closed']:pointer-events-none"
180
+ "gridui-u-fixed gridui-u-z-(--gridui-z-drawer) gridui-u-inset-y-0 gridui-u-flex gridui-u-w-[min(100%,var(--gridui-drawer-width,24rem))] gridui-u-max-w-full gridui-u-h-dvh gridui-u-min-h-0 gridui-u-flex-col gridui-u-box-border gridui-u-border gridui-u-border-solid gridui-u-border-border gridui-u-border-y-0 gridui-u-text-foreground gridui-u-bg-background gridui-u-type-supporting",
181
+ "gridui-u-data-[side='end']:inset-e-0 gridui-u-data-[side='end']:[border-inline-end:0]",
182
+ "gridui-u-data-[side='start']:inset-s-0 gridui-u-data-[side='start']:[border-inline-start:0]",
183
+ "gridui-u-data-[side='left']:left-0 gridui-u-data-[side='left']:border-l-0",
184
+ "gridui-u-data-[side='right']:right-0 gridui-u-data-[side='right']:border-r-0",
185
+ "gridui-u-data-[state='closed']:pointer-events-none"
186
186
  ));
187
187
 
188
188
  // src/drawer-panel/drawer-panel.tsx
@@ -342,7 +342,7 @@ import { cn as cn11 } from "@gridui/style-utils";
342
342
  import { cva as cva6 } from "class-variance-authority";
343
343
  var drawerTitleStyles = cva6(cn11(
344
344
  "gridui-drawer-title",
345
- "m-0 type-subheading"
345
+ "gridui-u-m-0 gridui-u-type-subheading"
346
346
  ));
347
347
 
348
348
  // src/drawer-title/drawer-title.tsx
package/dist/index.js.map CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../src/drawer/drawer.tsx", "../src/drawer-body/style.ts", "../src/drawer-body/drawer-body.tsx", "../src/drawer-close/drawer-close.tsx", "../src/drawer-close-button/drawer-close-button.tsx", "../src/drawer-description/style.ts", "../src/drawer-description/drawer-description.tsx", "../src/drawer-footer/style.ts", "../src/drawer-footer/drawer-footer.tsx", "../src/drawer-header/style.ts", "../src/drawer-header/drawer-header.tsx", "../src/drawer-panel/style.ts", "../src/drawer-panel/drawer-panel.tsx", "../src/drawer-surface/surface-binding.tsx", "../src/drawer-surface/drawer-surface.tsx", "../src/drawer-title/style.ts", "../src/drawer-title/drawer-title.tsx", "../src/drawer-trigger/drawer-trigger.tsx"],
4
- "sourcesContent": ["/**\n * @author WMXPY\n * @package Drawer\n * @namespace Drawer\n * @description Drawer\n */\n\nimport { OverlayOpen, useOverlayState } from \"@gridui/overlay\";\nimport * as Dialog from \"@radix-ui/react-dialog\";\nimport type { ComponentPropsWithRef, FC } from \"react\";\n\nexport type DrawerProps = ComponentPropsWithRef<typeof Dialog.Root>;\n\nexport const Drawer: FC<DrawerProps> = (props: DrawerProps) => {\n const state = useOverlayState(props);\n return (<OverlayOpen.Provider\n value={state.open}\n >\n <Dialog.Root\n {...props}\n {...state}\n />\n </OverlayOpen.Provider>);\n};\n", "/**\n * @author WMXPY\n * @package Drawer\n * @namespace DrawerBody\n * @description Style\n */\n\nimport { cn } from \"@gridui/style-utils\";\nimport { cva } from \"class-variance-authority\";\n\nexport const drawerBodyStyles = cva(cn(\n \"gridui-drawer-body\",\n \"min-h-0 flex-1 overflow-y-auto overscroll-contain p-gridui-24\",\n));\n", "/**\n * @author WMXPY\n * @package Drawer\n * @namespace DrawerBody\n * @description Drawer Body\n */\n\nimport { drawerBodyStyles } from \"./style\";\nimport { cn } from \"@gridui/style-utils\";\nimport type { ComponentPropsWithRef, FC } from \"react\";\n\nexport type DrawerBodyProps = ComponentPropsWithRef<\"div\">;\n\nexport const DrawerBody: FC<DrawerBodyProps> = (props: DrawerBodyProps) => {\n const { className, ...restProps } = props;\n return (<div\n {...restProps}\n className={cn(drawerBodyStyles(), className)}\n />);\n};\n", "/**\n * @author WMXPY\n * @package Drawer\n * @namespace DrawerClose\n * @description Drawer Close\n */\n\nimport * as Dialog from \"@radix-ui/react-dialog\";\nimport type { ComponentPropsWithRef, FC } from \"react\";\n\nexport type DrawerCloseProps = ComponentPropsWithRef<typeof Dialog.Close>;\n\nexport const DrawerClose: FC<DrawerCloseProps> = (props: DrawerCloseProps) => {\n return (<Dialog.Close\n {...props}\n />);\n};\n", "/**\n * @author WMXPY\n * @package Drawer\n * @namespace DrawerCloseButton\n * @description Drawer Close Button\n */\n\nimport { Button, type ButtonProps } from \"@gridui/button\";\nimport * as Dialog from \"@radix-ui/react-dialog\";\nimport { X } from \"lucide-react\";\nimport type { FC } from \"react\";\n\nexport type DrawerCloseButtonProps = ButtonProps;\n\nexport const DrawerCloseButton: FC<DrawerCloseButtonProps> = (props: DrawerCloseButtonProps) => {\n const {\n children,\n size = \"small\",\n ...restProps\n } = props;\n const buttonProps: ButtonProps = (restProps.variant === \"text\" || restProps.variant === \"underlined\") ? {\n ...restProps,\n layout: \"standard\",\n } : {\n ...restProps,\n variant: restProps.variant === undefined ? \"quiet\" : restProps.variant,\n layout: restProps.layout === undefined ? \"icon\" : restProps.layout,\n };\n return (<Dialog.Close\n asChild\n >\n <Button\n {...buttonProps}\n size={size}\n >\n {children ?? (<X\n aria-hidden=\"true\"\n />)}\n </Button>\n </Dialog.Close>);\n};\n", "/**\n * @author WMXPY\n * @package Drawer\n * @namespace DrawerDescription\n * @description Style\n */\n\nimport { cn } from \"@gridui/style-utils\";\nimport { cva } from \"class-variance-authority\";\n\nexport const drawerDescriptionStyles = cva(cn(\n \"gridui-drawer-description\",\n \"text-muted\",\n));\n", "/**\n * @author WMXPY\n * @package Drawer\n * @namespace DrawerDescription\n * @description Drawer Description\n */\n\nimport { drawerDescriptionStyles } from \"./style\";\nimport { cn } from \"@gridui/style-utils\";\nimport * as Dialog from \"@radix-ui/react-dialog\";\nimport type { ComponentPropsWithRef, FC } from \"react\";\n\nexport type DrawerDescriptionProps = ComponentPropsWithRef<typeof Dialog.Description>;\n\nexport const DrawerDescription: FC<DrawerDescriptionProps> = (props: DrawerDescriptionProps) => {\n const {\n className,\n ...restProps\n } = props;\n return (<Dialog.Description\n {...restProps}\n className={cn(drawerDescriptionStyles(), className)}\n />);\n};\n", "/**\n * @author WMXPY\n * @package Drawer\n * @namespace DrawerFooter\n * @description Style\n */\n\nimport { cn } from \"@gridui/style-utils\";\nimport { cva } from \"class-variance-authority\";\n\nexport const drawerFooterStyles = cva(cn(\n \"gridui-drawer-footer\",\n \"shrink-0 p-gridui-24\",\n \"max-h-[50dvh] overflow-y-auto pb-[max(var(--gridui-space-24),env(safe-area-inset-bottom))] border-t border-solid border-border\",\n));\n", "/**\n * @author WMXPY\n * @package Drawer\n * @namespace DrawerFooter\n * @description Drawer Footer\n */\n\nimport { drawerFooterStyles } from \"./style\";\nimport { cn } from \"@gridui/style-utils\";\nimport type { ComponentPropsWithRef, FC } from \"react\";\n\nexport type DrawerFooterProps = ComponentPropsWithRef<\"div\">;\n\nexport const DrawerFooter: FC<DrawerFooterProps> = (props: DrawerFooterProps) => {\n const { className, ...restProps } = props;\n return (<div\n {...restProps}\n className={cn(drawerFooterStyles(), className)}\n />);\n};\n", "/**\n * @author WMXPY\n * @package Drawer\n * @namespace DrawerHeader\n * @description Style\n */\n\nimport { cn } from \"@gridui/style-utils\";\nimport { cva } from \"class-variance-authority\";\n\nexport const drawerHeaderStyles = cva(cn(\n \"gridui-drawer-header\",\n \"shrink-0 p-gridui-24\",\n \"flex items-center justify-between gap-gridui-16 pt-[max(var(--gridui-space-24),env(safe-area-inset-top))] border-b border-solid border-border\",\n));\n", "/**\n * @author WMXPY\n * @package Drawer\n * @namespace DrawerHeader\n * @description Drawer Header\n */\n\nimport { drawerHeaderStyles } from \"./style\";\nimport { cn } from \"@gridui/style-utils\";\nimport type { ComponentPropsWithRef, FC } from \"react\";\n\nexport type DrawerHeaderProps = ComponentPropsWithRef<\"div\">;\n\nexport const DrawerHeader: FC<DrawerHeaderProps> = (props: DrawerHeaderProps) => {\n const { className, ...restProps } = props;\n return (<div\n {...restProps}\n className={cn(drawerHeaderStyles(), className)}\n />);\n};\n", "/**\n * @author WMXPY\n * @package Drawer\n * @namespace DrawerPanel\n * @description Style\n */\n\nimport { overlayBackdropStyles } from \"@gridui/overlay\";\nimport { cn } from \"@gridui/style-utils\";\nimport { cva } from \"class-variance-authority\";\n\nexport const drawerOverlayStyles = cva(cn(\n overlayBackdropStyles({ pace: \"deliberate\" }),\n \"gridui-drawer-overlay\",\n \"fixed z-(--gridui-z-drawer-backdrop) inset-0 bg-[light-dark(rgb(0_0_0/25%),rgb(0_0_0/60%))]\",\n \"data-[state='closed']:pointer-events-none\",\n));\n\nexport const drawerPanelStyles = cva(cn(\n \"gridui-drawer-panel\",\n \"fixed z-(--gridui-z-drawer) inset-y-0 flex w-[min(100%,var(--gridui-drawer-width,24rem))] max-w-full h-dvh min-h-0 flex-col box-border border border-solid border-border border-y-0 text-foreground bg-background type-supporting\",\n \"data-[side='end']:inset-e-0 data-[side='end']:[border-inline-end:0]\",\n \"data-[side='start']:inset-s-0 data-[side='start']:[border-inline-start:0]\",\n \"data-[side='left']:left-0 data-[side='left']:border-l-0\",\n \"data-[side='right']:right-0 data-[side='right']:border-r-0\",\n \"data-[state='closed']:pointer-events-none\",\n));\n", "/**\n * @author WMXPY\n * @package Drawer\n * @namespace DrawerPanel\n * @description Drawer Panel\n */\n\nimport { drawerOverlayStyles, drawerPanelStyles } from \"./style\";\nimport { RetainedLayer } from \"@gridui/overlay\";\nimport { cn } from \"@gridui/style-utils\";\nimport * as Dialog from \"@radix-ui/react-dialog\";\nimport type { ComponentPropsWithRef, FC } from \"react\";\n\nexport type DrawerPanelProps = ComponentPropsWithRef<typeof Dialog.Content> & {\n readonly side?: \"start\" | \"end\" | \"left\" | \"right\";\n readonly portal?: boolean;\n};\n\nexport const DrawerPanel: FC<DrawerPanelProps> = (props: DrawerPanelProps) => {\n const { side = \"end\", portal = true, className, forceMount, ...restProps } = props;\n const content = (<Dialog.Content\n {...restProps}\n forceMount={forceMount}\n aria-describedby={restProps[\"aria-describedby\"]}\n data-side={side}\n className={cn(drawerPanelStyles(), className)}\n />);\n const mountedContent = forceMount ? (<RetainedLayer>\n {content}\n </RetainedLayer>) : content;\n if (!portal) {\n return (<>\n <Dialog.Overlay\n className={cn(drawerOverlayStyles())}\n />\n {mountedContent}\n </>);\n }\n return (<>\n <Dialog.Portal>\n <Dialog.Overlay\n className={cn(drawerOverlayStyles())}\n />\n </Dialog.Portal>\n <Dialog.Portal\n forceMount={forceMount}\n >\n {mountedContent}\n </Dialog.Portal>\n </>);\n};\n", "/**\n * @author WMXPY\n * @package Drawer\n * @namespace DrawerSurface\n * @description Surface Binding\n */\n\nimport { Slot } from \"@radix-ui/react-slot\";\nimport { type ComponentPropsWithRef, type FC, type Ref, type RefObject, useImperativeHandle, useLayoutEffect, useRef, useState } from \"react\";\n\nexport type SurfaceProps = ComponentPropsWithRef<typeof Slot>;\nexport type SurfaceHandle = {\n readonly element: HTMLElement | null;\n readonly bind: (props: SurfaceProps | null) => void;\n};\nexport type SurfaceViewProps = SurfaceProps & {\n readonly handle: Ref<SurfaceHandle>;\n};\n\nexport const SurfaceView: FC<SurfaceViewProps> = (props: SurfaceViewProps) => {\n const { handle, ...surfaceProps } = props;\n const element = useRef<HTMLElement>(null);\n const [\n modalProps,\n setModalProps,\n ] = useState<SurfaceProps | null>(null);\n useImperativeHandle(handle, () => {\n return {\n get element() { return element.current; },\n bind: setModalProps,\n };\n }, []);\n return (<Slot\n {...modalProps}\n ref={element}\n data-drawer-presentation={modalProps ? \"overlay\" : \"inline\"}\n >\n <Slot\n {...surfaceProps}\n />\n </Slot>);\n};\n\nexport type SurfaceBindingProps = SurfaceProps & {\n readonly handle: RefObject<SurfaceHandle | null>;\n};\n\n// Radix owns the temporary modal lifecycle. Slot merges its handlers and refs\n// onto the stable surface without moving or remounting the caller's content.\nexport const SurfaceBinding: FC<SurfaceBindingProps> = (props: SurfaceBindingProps) => {\n const { handle, ref, ...modalProps } = props;\n useLayoutEffect(() => {\n handle.current?.bind(modalProps);\n });\n useLayoutEffect(() => {\n const surface = handle.current;\n return () => {\n surface?.bind(null);\n };\n }, [handle]);\n useImperativeHandle(ref, () => {\n const element = handle.current?.element;\n if (!element) {\n throw new Error(\"DrawerSurface must mount before its modal lifecycle.\");\n }\n return element;\n }, [handle]);\n return null;\n};\n", "/**\n * @author WMXPY\n * @package Drawer\n * @namespace DrawerSurface\n * @description Drawer Surface\n */\n\nimport { DrawerPanel, type DrawerPanelProps } from \"../drawer-panel/drawer-panel\";\nimport { SurfaceBinding, type SurfaceHandle, SurfaceView } from \"./surface-binding\";\nimport { OverlayOpen } from \"@gridui/overlay\";\nimport { type FC, useContext, useRef } from \"react\";\n\nexport type DrawerSurfaceProps = Omit<DrawerPanelProps, \"portal\" | \"forceMount\">;\n\nexport const DrawerSurface: FC<DrawerSurfaceProps> = (props: DrawerSurfaceProps) => {\n const {\n asChild = false, side = \"end\", children,\n onOpenAutoFocus, onCloseAutoFocus, onEscapeKeyDown,\n onPointerDownOutside, onFocusOutside, onInteractOutside,\n ...surfaceProps\n } = props;\n const open = useContext(OverlayOpen);\n const handle = useRef<SurfaceHandle>(null);\n return (<>\n <SurfaceView\n {...surfaceProps}\n handle={handle}\n >\n {asChild ? children : (<div>\n {children}\n </div>)}\n </SurfaceView>\n {open && (<DrawerPanel\n asChild\n portal={false}\n side={side}\n onOpenAutoFocus={onOpenAutoFocus}\n onCloseAutoFocus={onCloseAutoFocus}\n onEscapeKeyDown={onEscapeKeyDown}\n onPointerDownOutside={onPointerDownOutside}\n onFocusOutside={onFocusOutside}\n onInteractOutside={onInteractOutside}\n >\n <SurfaceBinding\n handle={handle}\n />\n </DrawerPanel>)}\n </>);\n};\n", "/**\n * @author WMXPY\n * @package Drawer\n * @namespace DrawerTitle\n * @description Style\n */\n\nimport { cn } from \"@gridui/style-utils\";\nimport { cva } from \"class-variance-authority\";\n\nexport const drawerTitleStyles = cva(cn(\n \"gridui-drawer-title\",\n \"m-0 type-subheading\",\n));\n", "/**\n * @author WMXPY\n * @package Drawer\n * @namespace DrawerTitle\n * @description Drawer Title\n */\n\nimport { drawerTitleStyles } from \"./style\";\nimport { cn } from \"@gridui/style-utils\";\nimport * as Dialog from \"@radix-ui/react-dialog\";\nimport type { ComponentPropsWithRef, FC } from \"react\";\n\nexport type DrawerTitleProps = ComponentPropsWithRef<typeof Dialog.Title>;\n\nexport const DrawerTitle: FC<DrawerTitleProps> = (props: DrawerTitleProps) => {\n const {\n className,\n ...restProps\n } = props;\n return (<Dialog.Title\n {...restProps}\n className={cn(drawerTitleStyles(), className)}\n />);\n};\n", "/**\n * @author WMXPY\n * @package Drawer\n * @namespace DrawerTrigger\n * @description Drawer Trigger\n */\n\nimport * as Dialog from \"@radix-ui/react-dialog\";\nimport type { ComponentPropsWithRef, FC } from \"react\";\n\nexport type DrawerTriggerProps = ComponentPropsWithRef<typeof Dialog.Trigger>;\n\nexport const DrawerTrigger: FC<DrawerTriggerProps> = (props: DrawerTriggerProps) => {\n return (<Dialog.Trigger\n {...props}\n />);\n};\n"],
4
+ "sourcesContent": ["/**\n * @author WMXPY\n * @package Drawer\n * @namespace Drawer\n * @description Drawer\n */\n\nimport { OverlayOpen, useOverlayState } from \"@gridui/overlay\";\nimport * as Dialog from \"@radix-ui/react-dialog\";\nimport type { ComponentPropsWithRef, FC } from \"react\";\n\nexport type DrawerProps = ComponentPropsWithRef<typeof Dialog.Root>;\n\nexport const Drawer: FC<DrawerProps> = (props: DrawerProps) => {\n const state = useOverlayState(props);\n return (<OverlayOpen.Provider\n value={state.open}\n >\n <Dialog.Root\n {...props}\n {...state}\n />\n </OverlayOpen.Provider>);\n};\n", "/**\n * @author WMXPY\n * @package Drawer\n * @namespace DrawerBody\n * @description Style\n */\n\nimport { cn } from \"@gridui/style-utils\";\nimport { cva } from \"class-variance-authority\";\n\nexport const drawerBodyStyles = cva(cn(\n \"gridui-drawer-body\",\n \"gridui-u-min-h-0 gridui-u-flex-1 gridui-u-overflow-y-auto gridui-u-overscroll-contain gridui-u-p-gridui-24\",\n));\n", "/**\n * @author WMXPY\n * @package Drawer\n * @namespace DrawerBody\n * @description Drawer Body\n */\n\nimport { drawerBodyStyles } from \"./style\";\nimport { cn } from \"@gridui/style-utils\";\nimport type { ComponentPropsWithRef, FC } from \"react\";\n\nexport type DrawerBodyProps = ComponentPropsWithRef<\"div\">;\n\nexport const DrawerBody: FC<DrawerBodyProps> = (props: DrawerBodyProps) => {\n const { className, ...restProps } = props;\n return (<div\n {...restProps}\n className={cn(drawerBodyStyles(), className)}\n />);\n};\n", "/**\n * @author WMXPY\n * @package Drawer\n * @namespace DrawerClose\n * @description Drawer Close\n */\n\nimport * as Dialog from \"@radix-ui/react-dialog\";\nimport type { ComponentPropsWithRef, FC } from \"react\";\n\nexport type DrawerCloseProps = ComponentPropsWithRef<typeof Dialog.Close>;\n\nexport const DrawerClose: FC<DrawerCloseProps> = (props: DrawerCloseProps) => {\n return (<Dialog.Close\n {...props}\n />);\n};\n", "/**\n * @author WMXPY\n * @package Drawer\n * @namespace DrawerCloseButton\n * @description Drawer Close Button\n */\n\nimport { Button, type ButtonProps } from \"@gridui/button\";\nimport * as Dialog from \"@radix-ui/react-dialog\";\nimport { X } from \"lucide-react\";\nimport type { FC } from \"react\";\n\nexport type DrawerCloseButtonProps = ButtonProps;\n\nexport const DrawerCloseButton: FC<DrawerCloseButtonProps> = (props: DrawerCloseButtonProps) => {\n const {\n children,\n size = \"small\",\n ...restProps\n } = props;\n const buttonProps: ButtonProps = (restProps.variant === \"text\" || restProps.variant === \"underlined\") ? {\n ...restProps,\n layout: \"standard\",\n } : {\n ...restProps,\n variant: restProps.variant === undefined ? \"quiet\" : restProps.variant,\n layout: restProps.layout === undefined ? \"icon\" : restProps.layout,\n };\n return (<Dialog.Close\n asChild\n >\n <Button\n {...buttonProps}\n size={size}\n >\n {children ?? (<X\n aria-hidden=\"true\"\n />)}\n </Button>\n </Dialog.Close>);\n};\n", "/**\n * @author WMXPY\n * @package Drawer\n * @namespace DrawerDescription\n * @description Style\n */\n\nimport { cn } from \"@gridui/style-utils\";\nimport { cva } from \"class-variance-authority\";\n\nexport const drawerDescriptionStyles = cva(cn(\n \"gridui-drawer-description\",\n \"gridui-u-text-muted\",\n));\n", "/**\n * @author WMXPY\n * @package Drawer\n * @namespace DrawerDescription\n * @description Drawer Description\n */\n\nimport { drawerDescriptionStyles } from \"./style\";\nimport { cn } from \"@gridui/style-utils\";\nimport * as Dialog from \"@radix-ui/react-dialog\";\nimport type { ComponentPropsWithRef, FC } from \"react\";\n\nexport type DrawerDescriptionProps = ComponentPropsWithRef<typeof Dialog.Description>;\n\nexport const DrawerDescription: FC<DrawerDescriptionProps> = (props: DrawerDescriptionProps) => {\n const {\n className,\n ...restProps\n } = props;\n return (<Dialog.Description\n {...restProps}\n className={cn(drawerDescriptionStyles(), className)}\n />);\n};\n", "/**\n * @author WMXPY\n * @package Drawer\n * @namespace DrawerFooter\n * @description Style\n */\n\nimport { cn } from \"@gridui/style-utils\";\nimport { cva } from \"class-variance-authority\";\n\nexport const drawerFooterStyles = cva(cn(\n \"gridui-drawer-footer\",\n \"gridui-u-shrink-0 gridui-u-p-gridui-24\",\n \"gridui-u-max-h-[50dvh] gridui-u-overflow-y-auto gridui-u-pb-[max(var(--gridui-space-24),env(safe-area-inset-bottom))] gridui-u-border-t gridui-u-border-solid gridui-u-border-border\",\n));\n", "/**\n * @author WMXPY\n * @package Drawer\n * @namespace DrawerFooter\n * @description Drawer Footer\n */\n\nimport { drawerFooterStyles } from \"./style\";\nimport { cn } from \"@gridui/style-utils\";\nimport type { ComponentPropsWithRef, FC } from \"react\";\n\nexport type DrawerFooterProps = ComponentPropsWithRef<\"div\">;\n\nexport const DrawerFooter: FC<DrawerFooterProps> = (props: DrawerFooterProps) => {\n const { className, ...restProps } = props;\n return (<div\n {...restProps}\n className={cn(drawerFooterStyles(), className)}\n />);\n};\n", "/**\n * @author WMXPY\n * @package Drawer\n * @namespace DrawerHeader\n * @description Style\n */\n\nimport { cn } from \"@gridui/style-utils\";\nimport { cva } from \"class-variance-authority\";\n\nexport const drawerHeaderStyles = cva(cn(\n \"gridui-drawer-header\",\n \"gridui-u-shrink-0 gridui-u-p-gridui-24\",\n \"gridui-u-flex gridui-u-items-center gridui-u-justify-between gridui-u-gap-gridui-16 gridui-u-pt-[max(var(--gridui-space-24),env(safe-area-inset-top))] gridui-u-border-b gridui-u-border-solid gridui-u-border-border\",\n));\n", "/**\n * @author WMXPY\n * @package Drawer\n * @namespace DrawerHeader\n * @description Drawer Header\n */\n\nimport { drawerHeaderStyles } from \"./style\";\nimport { cn } from \"@gridui/style-utils\";\nimport type { ComponentPropsWithRef, FC } from \"react\";\n\nexport type DrawerHeaderProps = ComponentPropsWithRef<\"div\">;\n\nexport const DrawerHeader: FC<DrawerHeaderProps> = (props: DrawerHeaderProps) => {\n const { className, ...restProps } = props;\n return (<div\n {...restProps}\n className={cn(drawerHeaderStyles(), className)}\n />);\n};\n", "/**\n * @author WMXPY\n * @package Drawer\n * @namespace DrawerPanel\n * @description Style\n */\n\nimport { overlayBackdropStyles } from \"@gridui/overlay\";\nimport { cn } from \"@gridui/style-utils\";\nimport { cva } from \"class-variance-authority\";\n\nexport const drawerOverlayStyles = cva(cn(\n overlayBackdropStyles({ pace: \"deliberate\" }),\n \"gridui-drawer-overlay\",\n \"gridui-u-fixed gridui-u-z-(--gridui-z-drawer-backdrop) gridui-u-inset-0 gridui-u-bg-[light-dark(rgb(0_0_0/25%),rgb(0_0_0/60%))]\",\n \"gridui-u-data-[state='closed']:pointer-events-none\",\n));\n\nexport const drawerPanelStyles = cva(cn(\n \"gridui-drawer-panel\",\n \"gridui-u-fixed gridui-u-z-(--gridui-z-drawer) gridui-u-inset-y-0 gridui-u-flex gridui-u-w-[min(100%,var(--gridui-drawer-width,24rem))] gridui-u-max-w-full gridui-u-h-dvh gridui-u-min-h-0 gridui-u-flex-col gridui-u-box-border gridui-u-border gridui-u-border-solid gridui-u-border-border gridui-u-border-y-0 gridui-u-text-foreground gridui-u-bg-background gridui-u-type-supporting\",\n \"gridui-u-data-[side='end']:inset-e-0 gridui-u-data-[side='end']:[border-inline-end:0]\",\n \"gridui-u-data-[side='start']:inset-s-0 gridui-u-data-[side='start']:[border-inline-start:0]\",\n \"gridui-u-data-[side='left']:left-0 gridui-u-data-[side='left']:border-l-0\",\n \"gridui-u-data-[side='right']:right-0 gridui-u-data-[side='right']:border-r-0\",\n \"gridui-u-data-[state='closed']:pointer-events-none\",\n));\n", "/**\n * @author WMXPY\n * @package Drawer\n * @namespace DrawerPanel\n * @description Drawer Panel\n */\n\nimport { drawerOverlayStyles, drawerPanelStyles } from \"./style\";\nimport { RetainedLayer } from \"@gridui/overlay\";\nimport { cn } from \"@gridui/style-utils\";\nimport * as Dialog from \"@radix-ui/react-dialog\";\nimport type { ComponentPropsWithRef, FC } from \"react\";\n\nexport type DrawerPanelProps = ComponentPropsWithRef<typeof Dialog.Content> & {\n readonly side?: \"start\" | \"end\" | \"left\" | \"right\";\n readonly portal?: boolean;\n};\n\nexport const DrawerPanel: FC<DrawerPanelProps> = (props: DrawerPanelProps) => {\n const { side = \"end\", portal = true, className, forceMount, ...restProps } = props;\n const content = (<Dialog.Content\n {...restProps}\n forceMount={forceMount}\n aria-describedby={restProps[\"aria-describedby\"]}\n data-side={side}\n className={cn(drawerPanelStyles(), className)}\n />);\n const mountedContent = forceMount ? (<RetainedLayer>\n {content}\n </RetainedLayer>) : content;\n if (!portal) {\n return (<>\n <Dialog.Overlay\n className={cn(drawerOverlayStyles())}\n />\n {mountedContent}\n </>);\n }\n return (<>\n <Dialog.Portal>\n <Dialog.Overlay\n className={cn(drawerOverlayStyles())}\n />\n </Dialog.Portal>\n <Dialog.Portal\n forceMount={forceMount}\n >\n {mountedContent}\n </Dialog.Portal>\n </>);\n};\n", "/**\n * @author WMXPY\n * @package Drawer\n * @namespace DrawerSurface\n * @description Surface Binding\n */\n\nimport { Slot } from \"@radix-ui/react-slot\";\nimport { type ComponentPropsWithRef, type FC, type Ref, type RefObject, useImperativeHandle, useLayoutEffect, useRef, useState } from \"react\";\n\nexport type SurfaceProps = ComponentPropsWithRef<typeof Slot>;\nexport type SurfaceHandle = {\n readonly element: HTMLElement | null;\n readonly bind: (props: SurfaceProps | null) => void;\n};\nexport type SurfaceViewProps = SurfaceProps & {\n readonly handle: Ref<SurfaceHandle>;\n};\n\nexport const SurfaceView: FC<SurfaceViewProps> = (props: SurfaceViewProps) => {\n const { handle, ...surfaceProps } = props;\n const element = useRef<HTMLElement>(null);\n const [\n modalProps,\n setModalProps,\n ] = useState<SurfaceProps | null>(null);\n useImperativeHandle(handle, () => {\n return {\n get element() { return element.current; },\n bind: setModalProps,\n };\n }, []);\n return (<Slot\n {...modalProps}\n ref={element}\n data-drawer-presentation={modalProps ? \"overlay\" : \"inline\"}\n >\n <Slot\n {...surfaceProps}\n />\n </Slot>);\n};\n\nexport type SurfaceBindingProps = SurfaceProps & {\n readonly handle: RefObject<SurfaceHandle | null>;\n};\n\n// Radix owns the temporary modal lifecycle. Slot merges its handlers and refs\n// onto the stable surface without moving or remounting the caller's content.\nexport const SurfaceBinding: FC<SurfaceBindingProps> = (props: SurfaceBindingProps) => {\n const { handle, ref, ...modalProps } = props;\n useLayoutEffect(() => {\n handle.current?.bind(modalProps);\n });\n useLayoutEffect(() => {\n const surface = handle.current;\n return () => {\n surface?.bind(null);\n };\n }, [handle]);\n useImperativeHandle(ref, () => {\n const element = handle.current?.element;\n if (!element) {\n throw new Error(\"DrawerSurface must mount before its modal lifecycle.\");\n }\n return element;\n }, [handle]);\n return null;\n};\n", "/**\n * @author WMXPY\n * @package Drawer\n * @namespace DrawerSurface\n * @description Drawer Surface\n */\n\nimport { DrawerPanel, type DrawerPanelProps } from \"../drawer-panel/drawer-panel\";\nimport { SurfaceBinding, type SurfaceHandle, SurfaceView } from \"./surface-binding\";\nimport { OverlayOpen } from \"@gridui/overlay\";\nimport { type FC, useContext, useRef } from \"react\";\n\nexport type DrawerSurfaceProps = Omit<DrawerPanelProps, \"portal\" | \"forceMount\">;\n\nexport const DrawerSurface: FC<DrawerSurfaceProps> = (props: DrawerSurfaceProps) => {\n const {\n asChild = false, side = \"end\", children,\n onOpenAutoFocus, onCloseAutoFocus, onEscapeKeyDown,\n onPointerDownOutside, onFocusOutside, onInteractOutside,\n ...surfaceProps\n } = props;\n const open = useContext(OverlayOpen);\n const handle = useRef<SurfaceHandle>(null);\n return (<>\n <SurfaceView\n {...surfaceProps}\n handle={handle}\n >\n {asChild ? children : (<div>\n {children}\n </div>)}\n </SurfaceView>\n {open && (<DrawerPanel\n asChild\n portal={false}\n side={side}\n onOpenAutoFocus={onOpenAutoFocus}\n onCloseAutoFocus={onCloseAutoFocus}\n onEscapeKeyDown={onEscapeKeyDown}\n onPointerDownOutside={onPointerDownOutside}\n onFocusOutside={onFocusOutside}\n onInteractOutside={onInteractOutside}\n >\n <SurfaceBinding\n handle={handle}\n />\n </DrawerPanel>)}\n </>);\n};\n", "/**\n * @author WMXPY\n * @package Drawer\n * @namespace DrawerTitle\n * @description Style\n */\n\nimport { cn } from \"@gridui/style-utils\";\nimport { cva } from \"class-variance-authority\";\n\nexport const drawerTitleStyles = cva(cn(\n \"gridui-drawer-title\",\n \"gridui-u-m-0 gridui-u-type-subheading\",\n));\n", "/**\n * @author WMXPY\n * @package Drawer\n * @namespace DrawerTitle\n * @description Drawer Title\n */\n\nimport { drawerTitleStyles } from \"./style\";\nimport { cn } from \"@gridui/style-utils\";\nimport * as Dialog from \"@radix-ui/react-dialog\";\nimport type { ComponentPropsWithRef, FC } from \"react\";\n\nexport type DrawerTitleProps = ComponentPropsWithRef<typeof Dialog.Title>;\n\nexport const DrawerTitle: FC<DrawerTitleProps> = (props: DrawerTitleProps) => {\n const {\n className,\n ...restProps\n } = props;\n return (<Dialog.Title\n {...restProps}\n className={cn(drawerTitleStyles(), className)}\n />);\n};\n", "/**\n * @author WMXPY\n * @package Drawer\n * @namespace DrawerTrigger\n * @description Drawer Trigger\n */\n\nimport * as Dialog from \"@radix-ui/react-dialog\";\nimport type { ComponentPropsWithRef, FC } from \"react\";\n\nexport type DrawerTriggerProps = ComponentPropsWithRef<typeof Dialog.Trigger>;\n\nexport const DrawerTrigger: FC<DrawerTriggerProps> = (props: DrawerTriggerProps) => {\n return (<Dialog.Trigger\n {...props}\n />);\n};\n"],
5
5
  "mappings": ";AAOA,SAAS,aAAa,uBAAuB;AAC7C,YAAY,YAAY;AAUhB;AALD,IAAM,SAA0B,CAAC,UAAuB;AAC3D,QAAM,QAAQ,gBAAgB,KAAK;AACnC,SAAQ;AAAA,IAAC,YAAY;AAAA,IAAZ;AAAA,MACL,OAAO,MAAM;AAAA,MAEb;AAAA,QAAQ;AAAA,QAAP;AAAA,UACI,GAAG;AAAA,UACH,GAAG;AAAA;AAAA,MACR;AAAA;AAAA,EACJ;AACJ;;;AChBA,SAAS,UAAU;AACnB,SAAS,WAAW;AAEb,IAAM,mBAAmB,IAAI;AAAA,EAChC;AAAA,EACA;AACJ,CAAC;;;ACLD,SAAS,MAAAA,WAAU;AAOP,gBAAAC,YAAA;AAFL,IAAM,aAAkC,CAAC,UAA2B;AACvE,QAAM,EAAE,WAAW,GAAG,UAAU,IAAI;AACpC,SAAQ,gBAAAA;AAAA,IAAC;AAAA;AAAA,MACJ,GAAG;AAAA,MACJ,WAAWD,IAAG,iBAAiB,GAAG,SAAS;AAAA;AAAA,EAC/C;AACJ;;;ACZA,YAAYE,aAAY;AAMZ,gBAAAC,YAAA;AADL,IAAM,cAAoC,CAAC,UAA4B;AAC1E,SAAQ,gBAAAA;AAAA,IAAQ;AAAA,IAAP;AAAA,MACJ,GAAG;AAAA;AAAA,EACR;AACJ;;;ACTA,SAAS,cAAgC;AACzC,YAAYC,aAAY;AACxB,SAAS,SAAS;AA0BQ,gBAAAC,YAAA;AArBnB,IAAM,oBAAgD,CAAC,UAAkC;AAC5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,EACA;AACJ,CAAC;;;ACLD,SAAS,MAAAE,YAAU;AACnB,YAAYC,aAAY;AAUZ,gBAAAC,aAAA;AALL,IAAM,cAAoC,CAAC,UAA4B;AAC1E,QAAM;AAAA,IACF;AAAA,IACA,GAAG;AAAA,EACP,IAAI;AACJ,SAAQ,gBAAAA;AAAA,IAAQ;AAAA,IAAP;AAAA,MACJ,GAAG;AAAA,MACJ,WAAWF,KAAG,kBAAkB,GAAG,SAAS;AAAA;AAAA,EAChD;AACJ;;;AChBA,YAAYG,aAAY;AAMZ,gBAAAC,aAAA;AADL,IAAM,gBAAwC,CAAC,UAA8B;AAChF,SAAQ,gBAAAA;AAAA,IAAQ;AAAA,IAAP;AAAA,MACJ,GAAG;AAAA;AAAA,EACR;AACJ;",
6
6
  "names": ["cn", "jsx", "Dialog", "jsx", "Dialog", "jsx", "cn", "cva", "cn", "Dialog", "jsx", "cn", "cva", "cn", "jsx", "cn", "cva", "cn", "jsx", "cn", "cva", "cn", "Dialog", "jsx", "jsx", "OverlayOpen", "useRef", "Fragment", "jsx", "jsxs", "cn", "cva", "cn", "Dialog", "jsx", "Dialog", "jsx"]
7
7
  }
package/dist/styles.css CHANGED
@@ -2,152 +2,149 @@
2
2
  @layer properties;
3
3
  @layer theme, base, components, utilities;
4
4
  @layer utilities {
5
- .fixed {
5
+ .gridui-u-fixed {
6
6
  position: fixed;
7
7
  }
8
- .inset-0 {
8
+ .gridui-u-inset-0 {
9
9
  inset: 0px;
10
10
  }
11
- .inset-y-0 {
11
+ .gridui-u-inset-y-0 {
12
12
  inset-block: 0px;
13
13
  }
14
- .z-\(--gridui-z-drawer\) {
14
+ .gridui-u-z-\(--gridui-z-drawer\) {
15
15
  z-index: var(--gridui-z-drawer);
16
16
  }
17
- .z-\(--gridui-z-drawer-backdrop\) {
17
+ .gridui-u-z-\(--gridui-z-drawer-backdrop\) {
18
18
  z-index: var(--gridui-z-drawer-backdrop);
19
19
  }
20
- .m-0 {
20
+ .gridui-u-m-0 {
21
21
  margin: 0px;
22
22
  }
23
- .box-border {
23
+ .gridui-u-box-border {
24
24
  box-sizing: border-box;
25
25
  }
26
- .flex {
26
+ .gridui-u-flex {
27
27
  display: flex;
28
28
  }
29
- .inline {
30
- display: inline;
31
- }
32
- .h-dvh {
29
+ .gridui-u-h-dvh {
33
30
  height: 100dvh;
34
31
  }
35
- .max-h-\[50dvh\] {
32
+ .gridui-u-max-h-\[50dvh\] {
36
33
  max-height: 50dvh;
37
34
  }
38
- .min-h-0 {
35
+ .gridui-u-min-h-0 {
39
36
  min-height: 0px;
40
37
  }
41
- .w-\[min\(100\%\,var\(--gridui-drawer-width\,24rem\)\)\] {
38
+ .gridui-u-w-\[min\(100\%\,var\(--gridui-drawer-width\,24rem\)\)\] {
42
39
  width: min(100%, var(--gridui-drawer-width,24rem));
43
40
  }
44
- .max-w-full {
41
+ .gridui-u-max-w-full {
45
42
  max-width: 100%;
46
43
  }
47
- .flex-1 {
44
+ .gridui-u-flex-1 {
48
45
  flex: 1;
49
46
  }
50
- .shrink-0 {
47
+ .gridui-u-shrink-0 {
51
48
  flex-shrink: 0;
52
49
  }
53
- .flex-col {
50
+ .gridui-u-flex-col {
54
51
  flex-direction: column;
55
52
  }
56
- .items-center {
53
+ .gridui-u-items-center {
57
54
  align-items: center;
58
55
  }
59
- .justify-between {
56
+ .gridui-u-justify-between {
60
57
  justify-content: space-between;
61
58
  }
62
- .gap-gridui-16 {
59
+ .gridui-u-gap-gridui-16 {
63
60
  gap: var(--gridui-space-16);
64
61
  }
65
- .overflow-y-auto {
62
+ .gridui-u-overflow-y-auto {
66
63
  overflow-y: auto;
67
64
  }
68
- .overscroll-contain {
65
+ .gridui-u-overscroll-contain {
69
66
  overscroll-behavior: contain;
70
67
  }
71
- .border {
68
+ .gridui-u-border {
72
69
  border-style: var(--tw-border-style);
73
70
  border-width: 1px;
74
71
  }
75
- .border-y-0 {
72
+ .gridui-u-border-y-0 {
76
73
  border-block-style: var(--tw-border-style);
77
74
  border-block-width: 0px;
78
75
  }
79
- .border-t {
76
+ .gridui-u-border-t {
80
77
  border-top-style: var(--tw-border-style);
81
78
  border-top-width: 1px;
82
79
  }
83
- .border-b {
80
+ .gridui-u-border-b {
84
81
  border-bottom-style: var(--tw-border-style);
85
82
  border-bottom-width: 1px;
86
83
  }
87
- .border-solid {
84
+ .gridui-u-border-solid {
88
85
  --tw-border-style: solid;
89
86
  border-style: solid;
90
87
  }
91
- .border-border {
88
+ .gridui-u-border-border {
92
89
  border-color: var(--gridui-border);
93
90
  }
94
- .bg-\[light-dark\(rgb\(0_0_0\/25\%\)\,rgb\(0_0_0\/60\%\)\)\] {
91
+ .gridui-u-bg-\[light-dark\(rgb\(0_0_0\/25\%\)\,rgb\(0_0_0\/60\%\)\)\] {
95
92
  background-color: light-dark(rgb(0 0 0/25%),rgb(0 0 0/60%));
96
93
  }
97
- .bg-background {
94
+ .gridui-u-bg-background {
98
95
  background-color: var(--gridui-background);
99
96
  }
100
- .p-gridui-24 {
97
+ .gridui-u-p-gridui-24 {
101
98
  padding: var(--gridui-space-24);
102
99
  }
103
- .pt-\[max\(var\(--gridui-space-24\)\,env\(safe-area-inset-top\)\)\] {
100
+ .gridui-u-pt-\[max\(var\(--gridui-space-24\)\,env\(safe-area-inset-top\)\)\] {
104
101
  padding-top: max(var(--gridui-space-24), env(safe-area-inset-top));
105
102
  }
106
- .pb-\[max\(var\(--gridui-space-24\)\,env\(safe-area-inset-bottom\)\)\] {
103
+ .gridui-u-pb-\[max\(var\(--gridui-space-24\)\,env\(safe-area-inset-bottom\)\)\] {
107
104
  padding-bottom: max(var(--gridui-space-24), env(safe-area-inset-bottom));
108
105
  }
109
- .type-subheading {
106
+ .gridui-u-type-subheading {
110
107
  font: var(--gridui-type-subheading);
111
108
  letter-spacing: normal;
112
109
  text-wrap: balance;
113
110
  }
114
- .type-supporting {
111
+ .gridui-u-type-supporting {
115
112
  font: var(--gridui-type-supporting);
116
113
  letter-spacing: normal;
117
114
  }
118
- .text-foreground {
115
+ .gridui-u-text-foreground {
119
116
  color: var(--gridui-foreground);
120
117
  }
121
- .text-muted {
118
+ .gridui-u-text-muted {
122
119
  color: var(--gridui-muted);
123
120
  }
124
- .data-\[side\=\'end\'\]\:inset-e-0[data-side='end'] {
121
+ .gridui-u-data-\[side\=\'end\'\]\:inset-e-0[data-side='end'] {
125
122
  inset-inline-end: 0px;
126
123
  }
127
- .data-\[side\=\'end\'\]\:\[border-inline-end\:0\][data-side='end'] {
124
+ .gridui-u-data-\[side\=\'end\'\]\:\[border-inline-end\:0\][data-side='end'] {
128
125
  border-inline-end: 0;
129
126
  }
130
- .data-\[side\=\'left\'\]\:left-0[data-side='left'] {
127
+ .gridui-u-data-\[side\=\'left\'\]\:left-0[data-side='left'] {
131
128
  left: 0px;
132
129
  }
133
- .data-\[side\=\'left\'\]\:border-l-0[data-side='left'] {
130
+ .gridui-u-data-\[side\=\'left\'\]\:border-l-0[data-side='left'] {
134
131
  border-left-style: var(--tw-border-style);
135
132
  border-left-width: 0px;
136
133
  }
137
- .data-\[side\=\'right\'\]\:right-0[data-side='right'] {
134
+ .gridui-u-data-\[side\=\'right\'\]\:right-0[data-side='right'] {
138
135
  right: 0px;
139
136
  }
140
- .data-\[side\=\'right\'\]\:border-r-0[data-side='right'] {
137
+ .gridui-u-data-\[side\=\'right\'\]\:border-r-0[data-side='right'] {
141
138
  border-right-style: var(--tw-border-style);
142
139
  border-right-width: 0px;
143
140
  }
144
- .data-\[side\=\'start\'\]\:inset-s-0[data-side='start'] {
141
+ .gridui-u-data-\[side\=\'start\'\]\:inset-s-0[data-side='start'] {
145
142
  inset-inline-start: 0px;
146
143
  }
147
- .data-\[side\=\'start\'\]\:\[border-inline-start\:0\][data-side='start'] {
144
+ .gridui-u-data-\[side\=\'start\'\]\:\[border-inline-start\:0\][data-side='start'] {
148
145
  border-inline-start: 0;
149
146
  }
150
- .data-\[state\=\'closed\'\]\:pointer-events-none[data-state='closed'] {
147
+ .gridui-u-data-\[state\=\'closed\'\]\:pointer-events-none[data-state='closed'] {
151
148
  pointer-events: none;
152
149
  }
153
150
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gridui/drawer",
3
- "version": "1.1.1",
3
+ "version": "1.1.2",
4
4
  "description": "GridUI React drawer",
5
5
  "license": "UNLICENSED",
6
6
  "type": "module",
@@ -26,18 +26,19 @@
26
26
  "react-dom": "^19.2.0"
27
27
  },
28
28
  "dependencies": {
29
- "@gridui/button": "^2.1.2",
30
- "@gridui/overlay": "^1.1.1",
31
- "@gridui/style-utils": "^2.1.3",
32
- "@gridui/theme": "^2.2.1",
29
+ "@gridui/button": "^2.2.0",
30
+ "@gridui/overlay": "^1.1.2",
31
+ "@gridui/style-utils": "^2.1.4",
32
+ "@gridui/theme": "^2.3.2",
33
33
  "@radix-ui/react-dialog": "1.3.1",
34
34
  "@radix-ui/react-slot": "1.5.0",
35
35
  "class-variance-authority": "0.7.1",
36
- "lucide-react": "1.63.0"
36
+ "lucide-react": "1.65.0"
37
37
  },
38
38
  "devDependencies": {
39
39
  "@gridui-internal/configuration": "0.0.0-internal",
40
40
  "@jest/globals": "30.5.2",
41
+ "@storybook/react-vite": "10.6.5",
41
42
  "@types/jest": "30.0.0",
42
43
  "@types/node": "26.6.6",
43
44
  "@types/react": "19.3.0",