@gridui/drawer 0.0.0 → 1.1.1

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
@@ -1,8 +1,48 @@
1
1
  # @gridui/drawer
2
2
 
3
- Core family. Public API: `Drawer`, `DrawerBody`, `DrawerBodyProps`, `DrawerClose`, `DrawerCloseButton`, `DrawerCloseButtonProps`, `DrawerDescription`, `DrawerDescriptionProps`, `DrawerFooter`, `DrawerFooterProps`, `DrawerHeader`, `DrawerHeaderProps`, `DrawerPanel`, `DrawerPanelProps`, `DrawerProps`, `DrawerTitle`, `DrawerTitleProps`, `DrawerTrigger`.
3
+ Core family. Public API: `Drawer`, `DrawerBody`, `DrawerBodyProps`, `DrawerClose`, `DrawerCloseProps`, `DrawerCloseButton`, `DrawerCloseButtonProps`, `DrawerDescription`, `DrawerDescriptionProps`, `DrawerFooter`, `DrawerFooterProps`, `DrawerHeader`, `DrawerHeaderProps`, `DrawerPanel`, `DrawerPanelProps`, `DrawerProps`, `DrawerSurface`, `DrawerSurfaceProps`, `DrawerTitle`, `DrawerTitleProps`, `DrawerTrigger`, `DrawerTriggerProps`.
4
4
 
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
8
  See [component ownership](../../docs/component-ownership.md) and [release history](.changeset/history/).
9
+
10
+ `DrawerPanel` portals its backdrop and surface to the document by default.
11
+ Set `portal={false}` to keep an ordinary modal panel in its owner's DOM scope.
12
+ `side="start" | "end"` follows writing direction; `"left" | "right"` fixes the
13
+ physical placement and entry direction, including in RTL.
14
+
15
+ ## Stable inline surfaces
16
+
17
+ Use `DrawerSurface` inside `Drawer` when the same content must stay mounted
18
+ while changing from inline content to a modal drawer. Closed content stays
19
+ visible inline; its owner may hide its containing region when appropriate.
20
+ Opening adds the panel presentation, backdrop, Radix focus trap and dismissal
21
+ lifecycle to the same DOM element. Closing removes that presentation without
22
+ remounting children, restarting their effects, or taking scroll snapshots.
23
+ Use `data-drawer-presentation="inline" | "overlay"` for presentation styles.
24
+
25
+ `DrawerSurface` accepts `DrawerPanel` props except `portal` and `forceMount`.
26
+ `asChild` preserves an owned semantic surface; native handlers, styles and refs
27
+ compose through Radix Slot. Supply `DrawerTitle`, or an accessible name with
28
+ `aria-label` and `aria-labelledby={undefined}`. Focus-restoration policy can be
29
+ customized through `onCloseAutoFocus`, as on `DrawerPanel`.
30
+
31
+ ```tsx
32
+ <Drawer open={open} onOpenChange={setOpen}>
33
+ <DrawerTrigger>Open navigation</DrawerTrigger>
34
+ <DrawerSurface side="left">
35
+ <DrawerTitle>Workspace</DrawerTitle>
36
+ <input aria-label="Navigation draft" defaultValue="Keep this draft" />
37
+ <DrawerClose>Close navigation</DrawerClose>
38
+ </DrawerSurface>
39
+ </Drawer>
40
+ ```
41
+
42
+ Radix changes its content implementation when modal presentation changes.
43
+ Drawer's private binding attaches the temporary modal lifecycle to the retained
44
+ surface; Sidebar does not implement that mechanism. The owner must keep this
45
+ inline surface outside transformed or clipping ancestors and provide an adequate
46
+ stacking context. Use a normal portalled `DrawerPanel` for independent overlays.
47
+
48
+ Surface motion uses `@gridui/overlay`; load `@gridui/overlay/styles.css` after Theme and before this family.
@@ -5,4 +5,6 @@
5
5
  * @description Drawer Close
6
6
  */
7
7
  import * as Dialog from "@radix-ui/react-dialog";
8
- export declare const DrawerClose: import("react").ForwardRefExoticComponent<Dialog.DialogCloseProps & import("react").RefAttributes<HTMLButtonElement>>;
8
+ import type { ComponentPropsWithRef, FC } from "react";
9
+ export type DrawerCloseProps = ComponentPropsWithRef<typeof Dialog.Close>;
10
+ export declare const DrawerClose: FC<DrawerCloseProps>;
@@ -7,6 +7,7 @@
7
7
  import * as Dialog from "@radix-ui/react-dialog";
8
8
  import type { ComponentPropsWithRef, FC } from "react";
9
9
  export type DrawerPanelProps = ComponentPropsWithRef<typeof Dialog.Content> & {
10
- readonly side?: "start" | "end";
10
+ readonly side?: "start" | "end" | "left" | "right";
11
+ readonly portal?: boolean;
11
12
  };
12
13
  export declare const DrawerPanel: FC<DrawerPanelProps>;
@@ -0,0 +1,10 @@
1
+ /**
2
+ * @author WMXPY
3
+ * @package Drawer
4
+ * @namespace DrawerSurface
5
+ * @description Drawer Surface
6
+ */
7
+ import { type DrawerPanelProps } from "../drawer-panel/drawer-panel";
8
+ import { type FC } from "react";
9
+ export type DrawerSurfaceProps = Omit<DrawerPanelProps, "portal" | "forceMount">;
10
+ export declare const DrawerSurface: FC<DrawerSurfaceProps>;
@@ -0,0 +1,21 @@
1
+ /**
2
+ * @author WMXPY
3
+ * @package Drawer
4
+ * @namespace DrawerSurface
5
+ * @description Surface Binding
6
+ */
7
+ import { Slot } from "@radix-ui/react-slot";
8
+ import { type ComponentPropsWithRef, type FC, type Ref, type RefObject } from "react";
9
+ export type SurfaceProps = ComponentPropsWithRef<typeof Slot>;
10
+ export type SurfaceHandle = {
11
+ readonly element: HTMLElement | null;
12
+ readonly bind: (props: SurfaceProps | null) => void;
13
+ };
14
+ export type SurfaceViewProps = SurfaceProps & {
15
+ readonly handle: Ref<SurfaceHandle>;
16
+ };
17
+ export declare const SurfaceView: FC<SurfaceViewProps>;
18
+ export type SurfaceBindingProps = SurfaceProps & {
19
+ readonly handle: RefObject<SurfaceHandle | null>;
20
+ };
21
+ export declare const SurfaceBinding: FC<SurfaceBindingProps>;
@@ -5,4 +5,6 @@
5
5
  * @description Drawer Trigger
6
6
  */
7
7
  import * as Dialog from "@radix-ui/react-dialog";
8
- export declare const DrawerTrigger: import("react").ForwardRefExoticComponent<Dialog.DialogTriggerProps & import("react").RefAttributes<HTMLButtonElement>>;
8
+ import type { ComponentPropsWithRef, FC } from "react";
9
+ export type DrawerTriggerProps = ComponentPropsWithRef<typeof Dialog.Trigger>;
10
+ export declare const DrawerTrigger: FC<DrawerTriggerProps>;
package/dist/index.d.ts CHANGED
@@ -8,6 +8,7 @@ export type { DrawerProps } from "./drawer/drawer";
8
8
  export { Drawer } from "./drawer/drawer";
9
9
  export type { DrawerBodyProps } from "./drawer-body/drawer-body";
10
10
  export { DrawerBody } from "./drawer-body/drawer-body";
11
+ export type { DrawerCloseProps } from "./drawer-close/drawer-close";
11
12
  export { DrawerClose } from "./drawer-close/drawer-close";
12
13
  export type { DrawerCloseButtonProps } from "./drawer-close-button/drawer-close-button";
13
14
  export { DrawerCloseButton } from "./drawer-close-button/drawer-close-button";
@@ -19,6 +20,9 @@ export type { DrawerHeaderProps } from "./drawer-header/drawer-header";
19
20
  export { DrawerHeader } from "./drawer-header/drawer-header";
20
21
  export type { DrawerPanelProps } from "./drawer-panel/drawer-panel";
21
22
  export { DrawerPanel } from "./drawer-panel/drawer-panel";
23
+ export type { DrawerSurfaceProps } from "./drawer-surface/drawer-surface";
24
+ export { DrawerSurface } from "./drawer-surface/drawer-surface";
22
25
  export type { DrawerTitleProps } from "./drawer-title/drawer-title";
23
26
  export { DrawerTitle } from "./drawer-title/drawer-title";
27
+ export type { DrawerTriggerProps } from "./drawer-trigger/drawer-trigger";
24
28
  export { DrawerTrigger } from "./drawer-trigger/drawer-trigger";
package/dist/index.js CHANGED
@@ -43,13 +43,21 @@ var DrawerBody = (props) => {
43
43
 
44
44
  // src/drawer-close/drawer-close.tsx
45
45
  import * as Dialog2 from "@radix-ui/react-dialog";
46
- var DrawerClose = Dialog2.Close;
46
+ import { jsx as jsx3 } from "react/jsx-runtime";
47
+ var DrawerClose = (props) => {
48
+ return /* @__PURE__ */ jsx3(
49
+ Dialog2.Close,
50
+ {
51
+ ...props
52
+ }
53
+ );
54
+ };
47
55
 
48
56
  // src/drawer-close-button/drawer-close-button.tsx
49
57
  import { Button } from "@gridui/button";
50
58
  import * as Dialog3 from "@radix-ui/react-dialog";
51
59
  import { X } from "lucide-react";
52
- import { jsx as jsx3 } from "react/jsx-runtime";
60
+ import { jsx as jsx4 } from "react/jsx-runtime";
53
61
  var DrawerCloseButton = (props) => {
54
62
  const {
55
63
  children,
@@ -64,16 +72,16 @@ var DrawerCloseButton = (props) => {
64
72
  variant: restProps.variant === void 0 ? "quiet" : restProps.variant,
65
73
  layout: restProps.layout === void 0 ? "icon" : restProps.layout
66
74
  };
67
- return /* @__PURE__ */ jsx3(
75
+ return /* @__PURE__ */ jsx4(
68
76
  Dialog3.Close,
69
77
  {
70
78
  asChild: true,
71
- children: /* @__PURE__ */ jsx3(
79
+ children: /* @__PURE__ */ jsx4(
72
80
  Button,
73
81
  {
74
82
  ...buttonProps,
75
83
  size,
76
- children: children ?? /* @__PURE__ */ jsx3(
84
+ children: children ?? /* @__PURE__ */ jsx4(
77
85
  X,
78
86
  {
79
87
  "aria-hidden": "true"
@@ -96,13 +104,13 @@ var drawerDescriptionStyles = cva2(cn3(
96
104
  // src/drawer-description/drawer-description.tsx
97
105
  import { cn as cn4 } from "@gridui/style-utils";
98
106
  import * as Dialog4 from "@radix-ui/react-dialog";
99
- import { jsx as jsx4 } from "react/jsx-runtime";
107
+ import { jsx as jsx5 } from "react/jsx-runtime";
100
108
  var DrawerDescription = (props) => {
101
109
  const {
102
110
  className,
103
111
  ...restProps
104
112
  } = props;
105
- return /* @__PURE__ */ jsx4(
113
+ return /* @__PURE__ */ jsx5(
106
114
  Dialog4.Description,
107
115
  {
108
116
  ...restProps,
@@ -122,10 +130,10 @@ var drawerFooterStyles = cva3(cn5(
122
130
 
123
131
  // src/drawer-footer/drawer-footer.tsx
124
132
  import { cn as cn6 } from "@gridui/style-utils";
125
- import { jsx as jsx5 } from "react/jsx-runtime";
133
+ import { jsx as jsx6 } from "react/jsx-runtime";
126
134
  var DrawerFooter = (props) => {
127
135
  const { className, ...restProps } = props;
128
- return /* @__PURE__ */ jsx5(
136
+ return /* @__PURE__ */ jsx6(
129
137
  "div",
130
138
  {
131
139
  ...restProps,
@@ -145,10 +153,10 @@ var drawerHeaderStyles = cva4(cn7(
145
153
 
146
154
  // src/drawer-header/drawer-header.tsx
147
155
  import { cn as cn8 } from "@gridui/style-utils";
148
- import { jsx as jsx6 } from "react/jsx-runtime";
156
+ import { jsx as jsx7 } from "react/jsx-runtime";
149
157
  var DrawerHeader = (props) => {
150
158
  const { className, ...restProps } = props;
151
- return /* @__PURE__ */ jsx6(
159
+ return /* @__PURE__ */ jsx7(
152
160
  "div",
153
161
  {
154
162
  ...restProps,
@@ -158,9 +166,11 @@ var DrawerHeader = (props) => {
158
166
  };
159
167
 
160
168
  // src/drawer-panel/style.ts
169
+ import { overlayBackdropStyles } from "@gridui/overlay";
161
170
  import { cn as cn9 } from "@gridui/style-utils";
162
171
  import { cva as cva5 } from "class-variance-authority";
163
172
  var drawerOverlayStyles = cva5(cn9(
173
+ overlayBackdropStyles({ pace: "deliberate" }),
164
174
  "gridui-drawer-overlay",
165
175
  "fixed z-(--gridui-z-drawer-backdrop) inset-0 bg-[light-dark(rgb(0_0_0/25%),rgb(0_0_0/60%))]",
166
176
  "data-[state='closed']:pointer-events-none"
@@ -170,6 +180,8 @@ var drawerPanelStyles = cva5(cn9(
170
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",
171
181
  "data-[side='end']:inset-e-0 data-[side='end']:[border-inline-end:0]",
172
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",
173
185
  "data-[state='closed']:pointer-events-none"
174
186
  ));
175
187
 
@@ -177,10 +189,10 @@ var drawerPanelStyles = cva5(cn9(
177
189
  import { RetainedLayer } from "@gridui/overlay";
178
190
  import { cn as cn10 } from "@gridui/style-utils";
179
191
  import * as Dialog5 from "@radix-ui/react-dialog";
180
- import { Fragment, jsx as jsx7, jsxs } from "react/jsx-runtime";
192
+ import { Fragment, jsx as jsx8, jsxs } from "react/jsx-runtime";
181
193
  var DrawerPanel = (props) => {
182
- const { side = "end", className, forceMount, ...restProps } = props;
183
- const content = /* @__PURE__ */ jsx7(
194
+ const { side = "end", portal = true, className, forceMount, ...restProps } = props;
195
+ const content = /* @__PURE__ */ jsx8(
184
196
  Dialog5.Content,
185
197
  {
186
198
  ...restProps,
@@ -190,18 +202,136 @@ var DrawerPanel = (props) => {
190
202
  className: cn10(drawerPanelStyles(), className)
191
203
  }
192
204
  );
205
+ const mountedContent = forceMount ? /* @__PURE__ */ jsx8(RetainedLayer, { children: content }) : content;
206
+ if (!portal) {
207
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
208
+ /* @__PURE__ */ jsx8(
209
+ Dialog5.Overlay,
210
+ {
211
+ className: cn10(drawerOverlayStyles())
212
+ }
213
+ ),
214
+ mountedContent
215
+ ] });
216
+ }
193
217
  return /* @__PURE__ */ jsxs(Fragment, { children: [
194
- /* @__PURE__ */ jsx7(Dialog5.Portal, { children: /* @__PURE__ */ jsx7(
218
+ /* @__PURE__ */ jsx8(Dialog5.Portal, { children: /* @__PURE__ */ jsx8(
195
219
  Dialog5.Overlay,
196
220
  {
197
221
  className: cn10(drawerOverlayStyles())
198
222
  }
199
223
  ) }),
200
- /* @__PURE__ */ jsx7(
224
+ /* @__PURE__ */ jsx8(
201
225
  Dialog5.Portal,
202
226
  {
203
227
  forceMount,
204
- children: forceMount ? /* @__PURE__ */ jsx7(RetainedLayer, { children: content }) : content
228
+ children: mountedContent
229
+ }
230
+ )
231
+ ] });
232
+ };
233
+
234
+ // src/drawer-surface/surface-binding.tsx
235
+ import { Slot } from "@radix-ui/react-slot";
236
+ import { useImperativeHandle, useLayoutEffect, useRef, useState } from "react";
237
+ import { jsx as jsx9 } from "react/jsx-runtime";
238
+ var SurfaceView = (props) => {
239
+ const { handle, ...surfaceProps } = props;
240
+ const element = useRef(null);
241
+ const [
242
+ modalProps,
243
+ setModalProps
244
+ ] = useState(null);
245
+ useImperativeHandle(handle, () => {
246
+ return {
247
+ get element() {
248
+ return element.current;
249
+ },
250
+ bind: setModalProps
251
+ };
252
+ }, []);
253
+ return /* @__PURE__ */ jsx9(
254
+ Slot,
255
+ {
256
+ ...modalProps,
257
+ ref: element,
258
+ "data-drawer-presentation": modalProps ? "overlay" : "inline",
259
+ children: /* @__PURE__ */ jsx9(
260
+ Slot,
261
+ {
262
+ ...surfaceProps
263
+ }
264
+ )
265
+ }
266
+ );
267
+ };
268
+ var SurfaceBinding = (props) => {
269
+ const { handle, ref, ...modalProps } = props;
270
+ useLayoutEffect(() => {
271
+ handle.current?.bind(modalProps);
272
+ });
273
+ useLayoutEffect(() => {
274
+ const surface = handle.current;
275
+ return () => {
276
+ surface?.bind(null);
277
+ };
278
+ }, [handle]);
279
+ useImperativeHandle(ref, () => {
280
+ const element = handle.current?.element;
281
+ if (!element) {
282
+ throw new Error("DrawerSurface must mount before its modal lifecycle.");
283
+ }
284
+ return element;
285
+ }, [handle]);
286
+ return null;
287
+ };
288
+
289
+ // src/drawer-surface/drawer-surface.tsx
290
+ import { OverlayOpen as OverlayOpen2 } from "@gridui/overlay";
291
+ import { useContext, useRef as useRef2 } from "react";
292
+ import { Fragment as Fragment2, jsx as jsx10, jsxs as jsxs2 } from "react/jsx-runtime";
293
+ var DrawerSurface = (props) => {
294
+ const {
295
+ asChild = false,
296
+ side = "end",
297
+ children,
298
+ onOpenAutoFocus,
299
+ onCloseAutoFocus,
300
+ onEscapeKeyDown,
301
+ onPointerDownOutside,
302
+ onFocusOutside,
303
+ onInteractOutside,
304
+ ...surfaceProps
305
+ } = props;
306
+ const open = useContext(OverlayOpen2);
307
+ const handle = useRef2(null);
308
+ return /* @__PURE__ */ jsxs2(Fragment2, { children: [
309
+ /* @__PURE__ */ jsx10(
310
+ SurfaceView,
311
+ {
312
+ ...surfaceProps,
313
+ handle,
314
+ children: asChild ? children : /* @__PURE__ */ jsx10("div", { children })
315
+ }
316
+ ),
317
+ open && /* @__PURE__ */ jsx10(
318
+ DrawerPanel,
319
+ {
320
+ asChild: true,
321
+ portal: false,
322
+ side,
323
+ onOpenAutoFocus,
324
+ onCloseAutoFocus,
325
+ onEscapeKeyDown,
326
+ onPointerDownOutside,
327
+ onFocusOutside,
328
+ onInteractOutside,
329
+ children: /* @__PURE__ */ jsx10(
330
+ SurfaceBinding,
331
+ {
332
+ handle
333
+ }
334
+ )
205
335
  }
206
336
  )
207
337
  ] });
@@ -218,13 +348,13 @@ var drawerTitleStyles = cva6(cn11(
218
348
  // src/drawer-title/drawer-title.tsx
219
349
  import { cn as cn12 } from "@gridui/style-utils";
220
350
  import * as Dialog6 from "@radix-ui/react-dialog";
221
- import { jsx as jsx8 } from "react/jsx-runtime";
351
+ import { jsx as jsx11 } from "react/jsx-runtime";
222
352
  var DrawerTitle = (props) => {
223
353
  const {
224
354
  className,
225
355
  ...restProps
226
356
  } = props;
227
- return /* @__PURE__ */ jsx8(
357
+ return /* @__PURE__ */ jsx11(
228
358
  Dialog6.Title,
229
359
  {
230
360
  ...restProps,
@@ -235,7 +365,15 @@ var DrawerTitle = (props) => {
235
365
 
236
366
  // src/drawer-trigger/drawer-trigger.tsx
237
367
  import * as Dialog7 from "@radix-ui/react-dialog";
238
- var DrawerTrigger = Dialog7.Trigger;
368
+ import { jsx as jsx12 } from "react/jsx-runtime";
369
+ var DrawerTrigger = (props) => {
370
+ return /* @__PURE__ */ jsx12(
371
+ Dialog7.Trigger,
372
+ {
373
+ ...props
374
+ }
375
+ );
376
+ };
239
377
  export {
240
378
  Drawer,
241
379
  DrawerBody,
@@ -245,6 +383,7 @@ export {
245
383
  DrawerFooter,
246
384
  DrawerHeader,
247
385
  DrawerPanel,
386
+ DrawerSurface,
248
387
  DrawerTitle,
249
388
  DrawerTrigger
250
389
  };
package/dist/index.js.map CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 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-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\";\n\nexport const DrawerClose = Dialog.Close;\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 { cn } from \"@gridui/style-utils\";\nimport { cva } from \"class-variance-authority\";\n\nexport const drawerOverlayStyles = cva(cn(\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-[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\";\n};\n\nexport const DrawerPanel: FC<DrawerPanelProps> = (props: DrawerPanelProps) => {\n const { side = \"end\", 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 return (<>\n <Dialog.Portal>\n <Dialog.Overlay\n className={cn(drawerOverlayStyles())}\n />\n </Dialog.Portal>\n <Dialog.Portal\n forceMount={forceMount}\n >\n {forceMount ? (<RetainedLayer>\n {content}\n </RetainedLayer>) : content}\n </Dialog.Portal>\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\";\n\nexport const DrawerTrigger = Dialog.Trigger;\n"],
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,iBAAi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AAA,MAC9C,aAAW;AAAA,MACX,WAAWF,KAAG,kBAAkB,GAAG,SAAS;AAAA;AAAA,EAChD;AACA,SAAQ,iCACJ;AAAA,oBAAAE,KAAQ,gBAAP,EACG,0BAAAA;AAAA,MAAQ;AAAA,MAAP;AAAA,QACG,WAAWF,KAAG,oBAAoB,CAAC;AAAA;AAAA,IACvC,GACJ;AAAA,IACA,gBAAAE;AAAA,MAAQ;AAAA,MAAP;AAAA,QACG;AAAA,QAEC,uBAAc,gBAAAA,KAAC,iBACX,mBACL,IAAoB;AAAA;AAAA,IACxB;AAAA,KACJ;AACJ;;;ACjCA,SAAS,MAAAC,YAAU;AACnB,SAAS,OAAAC,YAAW;AAEb,IAAM,oBAAoBA,KAAID;AAAA,EACjC;AAAA,EACA;AACJ,CAAC;;;ACLD,SAAS,MAAAE,YAAU;AACnB,YAAYC,aAAY;AAUZ,gBAAAC,YAAA;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;AAEjB,IAAM,gBAAuB;",
6
- "names": ["cn", "jsx", "Dialog", "Dialog", "jsx", "cn", "cva", "cn", "Dialog", "jsx", "cn", "cva", "cn", "jsx", "cn", "cva", "cn", "jsx", "cn", "cva", "cn", "Dialog", "jsx", "cn", "cva", "cn", "Dialog", "jsx", "Dialog"]
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"],
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/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AA,QACP,QAAQ;AAAA,QACR;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QAEA,0BAAAA;AAAA,UAAC;AAAA;AAAA,YACG;AAAA;AAAA,QACJ;AAAA;AAAA,IACJ;AAAA,KACJ;AACJ;;;ACzCA,SAAS,MAAAE,YAAU;AACnB,SAAS,OAAAC,YAAW;AAEb,IAAM,oBAAoBA,KAAID;AAAA,EACjC;AAAA,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
+ "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
@@ -26,6 +26,9 @@
26
26
  .flex {
27
27
  display: flex;
28
28
  }
29
+ .inline {
30
+ display: inline;
31
+ }
29
32
  .h-dvh {
30
33
  height: 100dvh;
31
34
  }
@@ -124,6 +127,20 @@
124
127
  .data-\[side\=\'end\'\]\:\[border-inline-end\:0\][data-side='end'] {
125
128
  border-inline-end: 0;
126
129
  }
130
+ .data-\[side\=\'left\'\]\:left-0[data-side='left'] {
131
+ left: 0px;
132
+ }
133
+ .data-\[side\=\'left\'\]\:border-l-0[data-side='left'] {
134
+ border-left-style: var(--tw-border-style);
135
+ border-left-width: 0px;
136
+ }
137
+ .data-\[side\=\'right\'\]\:right-0[data-side='right'] {
138
+ right: 0px;
139
+ }
140
+ .data-\[side\=\'right\'\]\:border-r-0[data-side='right'] {
141
+ border-right-style: var(--tw-border-style);
142
+ border-right-width: 0px;
143
+ }
127
144
  .data-\[side\=\'start\'\]\:inset-s-0[data-side='start'] {
128
145
  inset-inline-start: 0px;
129
146
  }
@@ -138,7 +155,7 @@
138
155
  .gridui-drawer-panel {
139
156
  --gridui-drawer-offset: 100%;
140
157
  }
141
- .gridui-drawer-panel[data-side="start"] {
158
+ .gridui-drawer-panel[data-side="left"], .gridui-drawer-panel[data-side="start"] {
142
159
  --gridui-drawer-offset: -100%;
143
160
  }
144
161
  .gridui-drawer-panel[data-side="end"]:dir(rtl) {
@@ -153,12 +170,6 @@
153
170
  .gridui-drawer-panel[data-state="closed"] {
154
171
  animation: gridui-drawer-exit var(--gridui-motion-duration-normal) var(--gridui-motion-ease-in) both;
155
172
  }
156
- .gridui-drawer-overlay[data-state="open"] {
157
- animation: gridui-drawer-overlay-enter var(--gridui-motion-duration-deliberate) var(--gridui-motion-ease-out) both;
158
- }
159
- .gridui-drawer-overlay[data-state="closed"] {
160
- animation: gridui-drawer-overlay-exit var(--gridui-motion-duration-normal) var(--gridui-motion-ease-in) both;
161
- }
162
173
  @keyframes gridui-drawer-enter {
163
174
  from {
164
175
  transform: translateX(var(--gridui-drawer-offset));
@@ -175,24 +186,8 @@
175
186
  transform: translateX(var(--gridui-drawer-offset));
176
187
  }
177
188
  }
178
- @keyframes gridui-drawer-overlay-enter {
179
- from {
180
- opacity: 0;
181
- }
182
- to {
183
- opacity: 1;
184
- }
185
- }
186
- @keyframes gridui-drawer-overlay-exit {
187
- from {
188
- opacity: 1;
189
- }
190
- to {
191
- opacity: 0;
192
- }
193
- }
194
189
  @media (prefers-reduced-motion: reduce) {
195
- .gridui-drawer-panel[data-state], .gridui-drawer-overlay[data-state] {
190
+ .gridui-drawer-panel[data-state] {
196
191
  animation: none;
197
192
  }
198
193
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gridui/drawer",
3
- "version": "0.0.0",
3
+ "version": "1.1.1",
4
4
  "description": "GridUI React drawer",
5
5
  "license": "UNLICENSED",
6
6
  "type": "module",
@@ -26,19 +26,20 @@
26
26
  "react-dom": "^19.2.0"
27
27
  },
28
28
  "dependencies": {
29
- "@gridui/button": "^2.1.1",
30
- "@gridui/overlay": "^0.0.0",
31
- "@gridui/style-utils": "^2.1.2",
32
- "@gridui/theme": "^2.1.2",
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",
33
33
  "@radix-ui/react-dialog": "1.3.1",
34
+ "@radix-ui/react-slot": "1.5.0",
34
35
  "class-variance-authority": "0.7.1",
35
- "lucide-react": "1.62.0"
36
+ "lucide-react": "1.63.0"
36
37
  },
37
38
  "devDependencies": {
38
- "@gridui-internal/configuration": "0.0.0",
39
+ "@gridui-internal/configuration": "0.0.0-internal",
39
40
  "@jest/globals": "30.5.2",
40
41
  "@types/jest": "30.0.0",
41
- "@types/node": "26.6.5",
42
+ "@types/node": "26.6.6",
42
43
  "@types/react": "19.3.0",
43
44
  "@types/react-dom": "19.3.0",
44
45
  "jest": "30.5.2",