@pixpilot/shadcn-ui 2.1.0 → 3.1.0

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.
Files changed (114) hide show
  1. package/dist/button-extended/ButtonExtended.d.cts +2 -2
  2. package/dist/button-extended/ButtonExtended.d.ts +2 -2
  3. package/dist/card/Card.d.ts +3 -3
  4. package/dist/color-select/ColorSelect.d.cts +2 -2
  5. package/dist/color-select/ColorSelect.d.ts +2 -2
  6. package/dist/confirmation-dialog/ConfirmationDialog.cjs +2 -2
  7. package/dist/confirmation-dialog/ConfirmationDialog.js +2 -2
  8. package/dist/confirmation-dialog/mcp.js +3 -3
  9. package/dist/content-card/ContentCard.d.cts +2 -2
  10. package/dist/content-card/ContentCard.d.ts +2 -2
  11. package/dist/date-picker/DatePicker.d.cts +2 -2
  12. package/dist/date-picker/DatePicker.d.ts +2 -2
  13. package/dist/dialog/Dialog.d.cts +5 -5
  14. package/dist/dialog/Dialog.d.ts +5 -5
  15. package/dist/dialog/mcp.js +1 -1
  16. package/dist/dialog-registry/dialog-registry.cjs +24 -0
  17. package/dist/dialog-registry/dialog-registry.d.cts +23 -0
  18. package/dist/dialog-registry/dialog-registry.d.ts +23 -0
  19. package/dist/dialog-registry/dialog-registry.js +23 -0
  20. package/dist/dialog-registry/index.d.cts +3 -0
  21. package/dist/dialog-registry/index.d.ts +3 -0
  22. package/dist/dialog-registry/mcp.js +51 -0
  23. package/dist/dialog-registry/register-dialog.cjs +20 -0
  24. package/dist/dialog-registry/register-dialog.d.cts +21 -0
  25. package/dist/dialog-registry/register-dialog.d.ts +21 -0
  26. package/dist/dialog-registry/register-dialog.js +20 -0
  27. package/dist/dialog-registry/show-dialog.cjs +17 -0
  28. package/dist/dialog-registry/show-dialog.d.cts +18 -0
  29. package/dist/dialog-registry/show-dialog.d.ts +18 -0
  30. package/dist/dialog-registry/show-dialog.js +17 -0
  31. package/dist/drawer/Drawer.cjs +57 -0
  32. package/dist/drawer/Drawer.d.cts +40 -0
  33. package/dist/drawer/Drawer.d.ts +40 -0
  34. package/dist/drawer/Drawer.js +49 -0
  35. package/dist/drawer/index.d.cts +3 -0
  36. package/dist/drawer/index.d.ts +3 -0
  37. package/dist/drawer/index.js +4 -0
  38. package/dist/drawer/mcp.js +55 -0
  39. package/dist/drawer-registry/drawer-registry.cjs +28 -0
  40. package/dist/drawer-registry/drawer-registry.d.cts +27 -0
  41. package/dist/drawer-registry/drawer-registry.d.ts +27 -0
  42. package/dist/drawer-registry/drawer-registry.js +27 -0
  43. package/dist/drawer-registry/index.d.cts +3 -0
  44. package/dist/drawer-registry/index.d.ts +3 -0
  45. package/dist/drawer-registry/mcp.js +51 -0
  46. package/dist/drawer-registry/register-drawer.cjs +20 -0
  47. package/dist/drawer-registry/register-drawer.d.cts +21 -0
  48. package/dist/drawer-registry/register-drawer.d.ts +21 -0
  49. package/dist/drawer-registry/register-drawer.js +20 -0
  50. package/dist/drawer-registry/show-drawer.cjs +17 -0
  51. package/dist/drawer-registry/show-drawer.d.cts +18 -0
  52. package/dist/drawer-registry/show-drawer.d.ts +18 -0
  53. package/dist/drawer-registry/show-drawer.js +17 -0
  54. package/dist/file-upload/FileUpload.d.cts +2 -2
  55. package/dist/file-upload/FileUpload.d.ts +2 -2
  56. package/dist/file-upload-inline/FileUploadInline.d.cts +2 -2
  57. package/dist/file-upload-inline/FileUploadInline.d.ts +2 -2
  58. package/dist/file-upload-root/FileUploadRoot.d.cts +2 -2
  59. package/dist/file-upload-root/FileUploadRoot.d.ts +2 -2
  60. package/dist/generated/mcp-registry.js +38 -32
  61. package/dist/index.cjs +32 -9
  62. package/dist/index.d.cts +14 -6
  63. package/dist/index.d.ts +14 -6
  64. package/dist/index.js +11 -5
  65. package/dist/input/Input.d.cts +2 -2
  66. package/dist/overlay-provider/OverlayProvider.cjs +47 -0
  67. package/dist/overlay-provider/OverlayProvider.d.cts +18 -0
  68. package/dist/overlay-provider/OverlayProvider.d.ts +18 -0
  69. package/dist/overlay-provider/OverlayProvider.js +42 -0
  70. package/dist/overlay-provider/index.d.cts +2 -0
  71. package/dist/overlay-provider/index.d.ts +2 -0
  72. package/dist/overlay-provider/mcp.js +35 -0
  73. package/dist/overlay-provider/overlay-registry.cjs +104 -0
  74. package/dist/overlay-provider/overlay-registry.d.cts +91 -0
  75. package/dist/overlay-provider/overlay-registry.d.ts +91 -0
  76. package/dist/overlay-provider/overlay-registry.js +94 -0
  77. package/dist/overlay-provider/types.d.cts +20 -0
  78. package/dist/overlay-provider/types.d.ts +20 -0
  79. package/dist/rating/Rating.d.cts +3 -3
  80. package/dist/rating/Rating.d.ts +3 -3
  81. package/dist/select/Select.d.cts +2 -2
  82. package/dist/select/Select.d.ts +2 -2
  83. package/dist/tags-input/TagsInput.d.cts +2 -2
  84. package/dist/tags-input/TagsInput.d.ts +2 -2
  85. package/dist/tags-input/TagsInputInline.d.cts +2 -2
  86. package/dist/tags-input/TagsInputInline.d.ts +2 -2
  87. package/dist/theme-toggle/ThemeModeDropdown.d.cts +2 -2
  88. package/dist/theme-toggle/ThemeModeDropdown.d.ts +2 -2
  89. package/dist/theme-toggle/ThemeModeSwitchInside.d.cts +2 -2
  90. package/dist/theme-toggle/ThemeModeSwitchInside.d.ts +2 -2
  91. package/dist/theme-toggle/ThemeModeSwitchOutside.d.cts +2 -2
  92. package/dist/theme-toggle/ThemeModeSwitchOutside.d.ts +2 -2
  93. package/dist/theme-toggle/ThemeModeToggleButton.d.cts +2 -2
  94. package/dist/theme-toggle/ThemeModeToggleButton.d.ts +2 -2
  95. package/package.json +3 -3
  96. package/dist/dialog-provider/DialogProvider.cjs +0 -40
  97. package/dist/dialog-provider/DialogProvider.d.cts +0 -28
  98. package/dist/dialog-provider/DialogProvider.d.ts +0 -28
  99. package/dist/dialog-provider/DialogProvider.js +0 -36
  100. package/dist/dialog-provider/dialog-registry.cjs +0 -100
  101. package/dist/dialog-provider/dialog-registry.d.cts +0 -150
  102. package/dist/dialog-provider/dialog-registry.d.ts +0 -150
  103. package/dist/dialog-provider/dialog-registry.js +0 -93
  104. package/dist/dialog-provider/index.d.cts +0 -4
  105. package/dist/dialog-provider/index.d.ts +0 -4
  106. package/dist/dialog-provider/mcp.js +0 -24
  107. package/dist/dialog-provider/register-dialog.cjs +0 -64
  108. package/dist/dialog-provider/register-dialog.d.cts +0 -98
  109. package/dist/dialog-provider/register-dialog.d.ts +0 -98
  110. package/dist/dialog-provider/register-dialog.js +0 -61
  111. package/dist/dialog-provider/show-dialog.cjs +0 -30
  112. package/dist/dialog-provider/show-dialog.d.cts +0 -24
  113. package/dist/dialog-provider/show-dialog.d.ts +0 -24
  114. package/dist/dialog-provider/show-dialog.js +0 -28
@@ -0,0 +1,57 @@
1
+ const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
2
+ let __pixpilot_shadcn = require("@pixpilot/shadcn");
3
+ __pixpilot_shadcn = require_rolldown_runtime.__toESM(__pixpilot_shadcn);
4
+ let react = require("react");
5
+ react = require_rolldown_runtime.__toESM(react);
6
+ let react_jsx_runtime = require("react/jsx-runtime");
7
+ react_jsx_runtime = require_rolldown_runtime.__toESM(react_jsx_runtime);
8
+
9
+ //#region src/drawer/Drawer.tsx
10
+ /**
11
+ * Direction-aware "floating" overrides. Each rule targets vaul's
12
+ * `data-vaul-drawer-direction` attribute so a single set of classes works
13
+ * regardless of which edge the drawer root anchors to. Per-corner radius
14
+ * classes (`rounded-t-*`/`rounded-b-*`) are used for the top/bottom directions
15
+ * so they deterministically override the registry's `rounded-t-lg`/`rounded-b-lg`.
16
+ */
17
+ const floatingClass = (0, __pixpilot_shadcn.cn)("overflow-hidden border shadow-lg", "data-[vaul-drawer-direction=bottom]:inset-x-3 data-[vaul-drawer-direction=bottom]:bottom-3 data-[vaul-drawer-direction=bottom]:rounded-t-2xl data-[vaul-drawer-direction=bottom]:rounded-b-2xl", "data-[vaul-drawer-direction=top]:inset-x-3 data-[vaul-drawer-direction=top]:top-3 data-[vaul-drawer-direction=top]:rounded-t-2xl data-[vaul-drawer-direction=top]:rounded-b-2xl", "data-[vaul-drawer-direction=right]:inset-y-3 data-[vaul-drawer-direction=right]:right-3 data-[vaul-drawer-direction=right]:rounded-2xl", "data-[vaul-drawer-direction=left]:inset-y-3 data-[vaul-drawer-direction=left]:left-3 data-[vaul-drawer-direction=left]:rounded-2xl");
18
+ const DrawerContent = react.forwardRef(({ className, floating = true,...props }, ref) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.DrawerContent, {
19
+ ref,
20
+ className: (0, __pixpilot_shadcn.cn)("min-h-0 gap-4 px-6 pb-6", floating && floatingClass, className),
21
+ ...props
22
+ }));
23
+ DrawerContent.displayName = "DrawerContent";
24
+ function DrawerHeader({ className,...props }) {
25
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
26
+ "data-slot": "header",
27
+ className: (0, __pixpilot_shadcn.cn)("flex shrink-0 flex-col gap-2.5", className),
28
+ ...props
29
+ });
30
+ }
31
+ function DrawerBody({ className,...props }) {
32
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
33
+ "data-slot": "body",
34
+ className: (0, __pixpilot_shadcn.cn)("min-h-0 flex-1 overflow-auto -mx-6 px-6", className),
35
+ ...props
36
+ });
37
+ }
38
+ function DrawerFooter({ className,...props }) {
39
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
40
+ "data-slot": "footer",
41
+ className: (0, __pixpilot_shadcn.cn)("flex shrink-0 justify-end space-x-2", className),
42
+ ...props
43
+ });
44
+ }
45
+ function DrawerClose({ className,...props }) {
46
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.DrawerClose, {
47
+ className: (0, __pixpilot_shadcn.cn)(className),
48
+ ...props
49
+ });
50
+ }
51
+
52
+ //#endregion
53
+ exports.DrawerBody = DrawerBody;
54
+ exports.DrawerClose = DrawerClose;
55
+ exports.DrawerContent = DrawerContent;
56
+ exports.DrawerFooter = DrawerFooter;
57
+ exports.DrawerHeader = DrawerHeader;
@@ -0,0 +1,40 @@
1
+ import * as react_jsx_runtime22 from "react/jsx-runtime";
2
+ import { DrawerClose, DrawerContent } from "@pixpilot/shadcn";
3
+ import * as React$1 from "react";
4
+ import * as _radix_ui_react_dialog0 from "@radix-ui/react-dialog";
5
+
6
+ //#region src/drawer/Drawer.d.ts
7
+ type DrawerContentProps = React$1.ComponentPropsWithoutRef<typeof DrawerContent> & {
8
+ /**
9
+ * Detach the drawer from the viewport edges: adds a gap on every side and
10
+ * rounds all corners, so it reads as a floating card rather than a panel
11
+ * flush to the edge. Works for any `direction`. Default `true`.
12
+ */
13
+ floating?: boolean;
14
+ };
15
+ declare const DrawerContent$1: React$1.ForwardRefExoticComponent<Omit<Omit<_radix_ui_react_dialog0.DialogContentProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>, "ref"> & {
16
+ /**
17
+ * Detach the drawer from the viewport edges: adds a gap on every side and
18
+ * rounds all corners, so it reads as a floating card rather than a panel
19
+ * flush to the edge. Works for any `direction`. Default `true`.
20
+ */
21
+ floating?: boolean;
22
+ } & React$1.RefAttributes<HTMLDivElement>>;
23
+ declare function DrawerHeader({
24
+ className,
25
+ ...props
26
+ }: React$1.HTMLAttributes<HTMLDivElement>): react_jsx_runtime22.JSX.Element;
27
+ declare function DrawerBody({
28
+ className,
29
+ ...props
30
+ }: React$1.HTMLAttributes<HTMLDivElement>): react_jsx_runtime22.JSX.Element;
31
+ declare function DrawerFooter({
32
+ className,
33
+ ...props
34
+ }: React$1.HTMLAttributes<HTMLDivElement>): react_jsx_runtime22.JSX.Element;
35
+ declare function DrawerClose$1({
36
+ className,
37
+ ...props
38
+ }: React$1.ComponentPropsWithoutRef<typeof DrawerClose>): react_jsx_runtime22.JSX.Element;
39
+ //#endregion
40
+ export { DrawerBody, DrawerClose$1 as DrawerClose, DrawerContent$1 as DrawerContent, DrawerContentProps, DrawerFooter, DrawerHeader };
@@ -0,0 +1,40 @@
1
+ import { DrawerClose, DrawerContent } from "@pixpilot/shadcn";
2
+ import * as React$1 from "react";
3
+ import * as react_jsx_runtime13 from "react/jsx-runtime";
4
+ import * as _radix_ui_react_dialog0 from "@radix-ui/react-dialog";
5
+
6
+ //#region src/drawer/Drawer.d.ts
7
+ type DrawerContentProps = React$1.ComponentPropsWithoutRef<typeof DrawerContent> & {
8
+ /**
9
+ * Detach the drawer from the viewport edges: adds a gap on every side and
10
+ * rounds all corners, so it reads as a floating card rather than a panel
11
+ * flush to the edge. Works for any `direction`. Default `true`.
12
+ */
13
+ floating?: boolean;
14
+ };
15
+ declare const DrawerContent$1: React$1.ForwardRefExoticComponent<Omit<Omit<_radix_ui_react_dialog0.DialogContentProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>, "ref"> & {
16
+ /**
17
+ * Detach the drawer from the viewport edges: adds a gap on every side and
18
+ * rounds all corners, so it reads as a floating card rather than a panel
19
+ * flush to the edge. Works for any `direction`. Default `true`.
20
+ */
21
+ floating?: boolean;
22
+ } & React$1.RefAttributes<HTMLDivElement>>;
23
+ declare function DrawerHeader({
24
+ className,
25
+ ...props
26
+ }: React$1.HTMLAttributes<HTMLDivElement>): react_jsx_runtime13.JSX.Element;
27
+ declare function DrawerBody({
28
+ className,
29
+ ...props
30
+ }: React$1.HTMLAttributes<HTMLDivElement>): react_jsx_runtime13.JSX.Element;
31
+ declare function DrawerFooter({
32
+ className,
33
+ ...props
34
+ }: React$1.HTMLAttributes<HTMLDivElement>): react_jsx_runtime13.JSX.Element;
35
+ declare function DrawerClose$1({
36
+ className,
37
+ ...props
38
+ }: React$1.ComponentPropsWithoutRef<typeof DrawerClose>): react_jsx_runtime13.JSX.Element;
39
+ //#endregion
40
+ export { DrawerBody, DrawerClose$1 as DrawerClose, DrawerContent$1 as DrawerContent, DrawerContentProps, DrawerFooter, DrawerHeader };
@@ -0,0 +1,49 @@
1
+ import { DrawerClose, DrawerContent, cn } from "@pixpilot/shadcn";
2
+ import * as React$1 from "react";
3
+ import { jsx } from "react/jsx-runtime";
4
+
5
+ //#region src/drawer/Drawer.tsx
6
+ /**
7
+ * Direction-aware "floating" overrides. Each rule targets vaul's
8
+ * `data-vaul-drawer-direction` attribute so a single set of classes works
9
+ * regardless of which edge the drawer root anchors to. Per-corner radius
10
+ * classes (`rounded-t-*`/`rounded-b-*`) are used for the top/bottom directions
11
+ * so they deterministically override the registry's `rounded-t-lg`/`rounded-b-lg`.
12
+ */
13
+ const floatingClass = cn("overflow-hidden border shadow-lg", "data-[vaul-drawer-direction=bottom]:inset-x-3 data-[vaul-drawer-direction=bottom]:bottom-3 data-[vaul-drawer-direction=bottom]:rounded-t-2xl data-[vaul-drawer-direction=bottom]:rounded-b-2xl", "data-[vaul-drawer-direction=top]:inset-x-3 data-[vaul-drawer-direction=top]:top-3 data-[vaul-drawer-direction=top]:rounded-t-2xl data-[vaul-drawer-direction=top]:rounded-b-2xl", "data-[vaul-drawer-direction=right]:inset-y-3 data-[vaul-drawer-direction=right]:right-3 data-[vaul-drawer-direction=right]:rounded-2xl", "data-[vaul-drawer-direction=left]:inset-y-3 data-[vaul-drawer-direction=left]:left-3 data-[vaul-drawer-direction=left]:rounded-2xl");
14
+ const DrawerContent$1 = React$1.forwardRef(({ className, floating = true,...props }, ref) => /* @__PURE__ */ jsx(DrawerContent, {
15
+ ref,
16
+ className: cn("min-h-0 gap-4 px-6 pb-6", floating && floatingClass, className),
17
+ ...props
18
+ }));
19
+ DrawerContent$1.displayName = "DrawerContent";
20
+ function DrawerHeader({ className,...props }) {
21
+ return /* @__PURE__ */ jsx("div", {
22
+ "data-slot": "header",
23
+ className: cn("flex shrink-0 flex-col gap-2.5", className),
24
+ ...props
25
+ });
26
+ }
27
+ function DrawerBody({ className,...props }) {
28
+ return /* @__PURE__ */ jsx("div", {
29
+ "data-slot": "body",
30
+ className: cn("min-h-0 flex-1 overflow-auto -mx-6 px-6", className),
31
+ ...props
32
+ });
33
+ }
34
+ function DrawerFooter({ className,...props }) {
35
+ return /* @__PURE__ */ jsx("div", {
36
+ "data-slot": "footer",
37
+ className: cn("flex shrink-0 justify-end space-x-2", className),
38
+ ...props
39
+ });
40
+ }
41
+ function DrawerClose$1({ className,...props }) {
42
+ return /* @__PURE__ */ jsx(DrawerClose, {
43
+ className: cn(className),
44
+ ...props
45
+ });
46
+ }
47
+
48
+ //#endregion
49
+ export { DrawerBody, DrawerClose$1 as DrawerClose, DrawerContent$1 as DrawerContent, DrawerFooter, DrawerHeader };
@@ -0,0 +1,3 @@
1
+ import { DrawerBody, DrawerClose as DrawerClose$1, DrawerContent as DrawerContent$1, DrawerContentProps, DrawerFooter, DrawerHeader } from "./Drawer.cjs";
2
+ import { Drawer, DrawerDescription, DrawerTitle, DrawerTrigger } from "@pixpilot/shadcn";
3
+ export { Drawer, DrawerDescription, DrawerTitle, DrawerTrigger };
@@ -0,0 +1,3 @@
1
+ import { DrawerBody, DrawerClose as DrawerClose$1, DrawerContent as DrawerContent$1, DrawerContentProps, DrawerFooter, DrawerHeader } from "./Drawer.js";
2
+ import { Drawer, DrawerDescription, DrawerTitle, DrawerTrigger } from "@pixpilot/shadcn";
3
+ export { Drawer, DrawerDescription, DrawerTitle, DrawerTrigger };
@@ -0,0 +1,4 @@
1
+ import { DrawerBody, DrawerClose as DrawerClose$1, DrawerContent as DrawerContent$1, DrawerFooter, DrawerHeader } from "./Drawer.js";
2
+ import { Drawer, DrawerDescription, DrawerTitle, DrawerTrigger } from "@pixpilot/shadcn";
3
+
4
+ export { Drawer, DrawerDescription, DrawerTitle, DrawerTrigger };
@@ -0,0 +1,55 @@
1
+ import { defineProps } from "../mcp/src/utils.js";
2
+
3
+ //#region src/drawer/mcp.ts
4
+ const meta = {
5
+ name: "Drawer",
6
+ category: "Overlays",
7
+ description: "An edge-anchored overlay (\"drawer\") composed of DrawerContent, DrawerHeader, DrawerBody, DrawerFooter, and DrawerClose, with a scrollable body. Pulled from the shadcn registry — built on `vaul` (which wraps the Radix Dialog primitive) for a smooth spring animation and drag-to-dismiss. Anchors to the bottom edge by default with a drag handle.",
8
+ props: defineProps({
9
+ floating: {
10
+ description: "Detach the drawer from the viewport edges: adds a gap on every side and rounds all corners so it reads as a floating card rather than a panel flush to the edge. Works for any `direction`.",
11
+ type: "boolean",
12
+ defaultValue: "false"
13
+ },
14
+ asChild: {
15
+ description: "Merge behavior and styles onto the child element instead of the default content wrapper.",
16
+ type: "boolean",
17
+ defaultValue: "false"
18
+ },
19
+ forceMount: "Forces the content to render even when closed, so its mount can be controlled externally (e.g. for animations).",
20
+ onOpenAutoFocus: "Called when focus moves into the content on open; call preventDefault to opt out of autofocus.",
21
+ onCloseAutoFocus: "Called when focus returns to the trigger on close; call preventDefault to opt out.",
22
+ onEscapeKeyDown: "Called when the Escape key is pressed; call preventDefault to keep the drawer open.",
23
+ onPointerDownOutside: "Called when a pointer event occurs outside the content; call preventDefault to keep it open.",
24
+ onFocusOutside: "Called when focus moves outside the content; call preventDefault to keep it open.",
25
+ onInteractOutside: "Called on any interaction (pointer or focus) outside the content; call preventDefault to keep it open."
26
+ }),
27
+ notes: [
28
+ "Compose with the Drawer root, DrawerTrigger, DrawerTitle, and DrawerDescription from the shadcn drawer primitives.",
29
+ "The anchored edge is set with the `direction` prop on the Drawer root (`top | bottom | left | right`, default `bottom`) — not on DrawerContent. The drag handle only shows for the bottom direction.",
30
+ "DrawerHeader, DrawerBody, and DrawerFooter accept all native <div> props; DrawerContent forwards all vaul/Radix Dialog content props."
31
+ ],
32
+ examples: [{
33
+ title: "Drawer with body and footer",
34
+ code: "<Drawer>\n <DrawerTrigger asChild><Button>Open</Button></DrawerTrigger>\n <DrawerContent>\n <DrawerHeader><DrawerTitle>Edit</DrawerTitle></DrawerHeader>\n <DrawerBody>{form}</DrawerBody>\n <DrawerFooter><DrawerClose asChild><Button>Save</Button></DrawerClose></DrawerFooter>\n </DrawerContent>\n</Drawer>"
35
+ }, {
36
+ title: "Right-side drawer",
37
+ code: "<Drawer direction=\"right\">\n <DrawerTrigger asChild><Button>Open</Button></DrawerTrigger>\n <DrawerContent>{/* ... */}</DrawerContent>\n</Drawer>"
38
+ }],
39
+ related: [
40
+ "Dialog",
41
+ "ConfirmationDialog",
42
+ "registerDrawer"
43
+ ],
44
+ keywords: [
45
+ "drawer",
46
+ "sheet",
47
+ "overlay",
48
+ "panel",
49
+ "bottom-sheet",
50
+ "vaul"
51
+ ]
52
+ };
53
+
54
+ //#endregion
55
+ export { meta };
@@ -0,0 +1,28 @@
1
+ const require_overlay_registry = require('../overlay-provider/overlay-registry.cjs');
2
+
3
+ //#region src/drawer-registry/drawer-registry.ts
4
+ /**
5
+ * Drawer-named facade over the generic overlay registry (`../overlay-provider`).
6
+ * Behavior is shared with the dialog provider; only the names differ.
7
+ */
8
+ const useDrawer = require_overlay_registry.useOverlay;
9
+ /**
10
+ * Convenience registry facade for drawer operations.
11
+ *
12
+ * Use this when you prefer a single import with discoverable methods instead of
13
+ * importing `registerDrawer`, `showDrawer`, `hideDrawer`, `removeDrawer`, and
14
+ * `unregisterDrawer` separately.
15
+ *
16
+ * Usage:
17
+ * ```ts
18
+ * const filtersDrawer = drawer.register('filters-drawer', FiltersDrawer);
19
+ * await filtersDrawer.show({ category: 'shoes' });
20
+ * await drawer.show('filters-drawer', { category: 'bags' });
21
+ * drawer.unregister('filters-drawer');
22
+ * ```
23
+ */
24
+ const drawer = require_overlay_registry.overlayRegistry;
25
+
26
+ //#endregion
27
+ exports.drawer = drawer;
28
+ exports.useDrawer = useDrawer;
@@ -0,0 +1,27 @@
1
+ import { OverlayRegistry } from "../overlay-provider/types.cjs";
2
+ import * as _ebay_nice_modal_react0 from "@ebay/nice-modal-react";
3
+
4
+ //#region src/drawer-registry/drawer-registry.d.ts
5
+ /**
6
+ * Drawer-named facade over the generic overlay registry (`../overlay-provider`).
7
+ * Behavior is shared with the dialog provider; only the names differ.
8
+ */
9
+ declare const useDrawer: typeof _ebay_nice_modal_react0.useModal;
10
+ /**
11
+ * Convenience registry facade for drawer operations.
12
+ *
13
+ * Use this when you prefer a single import with discoverable methods instead of
14
+ * importing `registerDrawer`, `showDrawer`, `hideDrawer`, `removeDrawer`, and
15
+ * `unregisterDrawer` separately.
16
+ *
17
+ * Usage:
18
+ * ```ts
19
+ * const filtersDrawer = drawer.register('filters-drawer', FiltersDrawer);
20
+ * await filtersDrawer.show({ category: 'shoes' });
21
+ * await drawer.show('filters-drawer', { category: 'bags' });
22
+ * drawer.unregister('filters-drawer');
23
+ * ```
24
+ */
25
+ declare const drawer: OverlayRegistry;
26
+ //#endregion
27
+ export { drawer, useDrawer };
@@ -0,0 +1,27 @@
1
+ import { OverlayRegistry } from "../overlay-provider/types.js";
2
+ import * as _ebay_nice_modal_react0 from "@ebay/nice-modal-react";
3
+
4
+ //#region src/drawer-registry/drawer-registry.d.ts
5
+ /**
6
+ * Drawer-named facade over the generic overlay registry (`../overlay-provider`).
7
+ * Behavior is shared with the dialog provider; only the names differ.
8
+ */
9
+ declare const useDrawer: typeof _ebay_nice_modal_react0.useModal;
10
+ /**
11
+ * Convenience registry facade for drawer operations.
12
+ *
13
+ * Use this when you prefer a single import with discoverable methods instead of
14
+ * importing `registerDrawer`, `showDrawer`, `hideDrawer`, `removeDrawer`, and
15
+ * `unregisterDrawer` separately.
16
+ *
17
+ * Usage:
18
+ * ```ts
19
+ * const filtersDrawer = drawer.register('filters-drawer', FiltersDrawer);
20
+ * await filtersDrawer.show({ category: 'shoes' });
21
+ * await drawer.show('filters-drawer', { category: 'bags' });
22
+ * drawer.unregister('filters-drawer');
23
+ * ```
24
+ */
25
+ declare const drawer: OverlayRegistry;
26
+ //#endregion
27
+ export { drawer, useDrawer };
@@ -0,0 +1,27 @@
1
+ import { overlayRegistry, useOverlay } from "../overlay-provider/overlay-registry.js";
2
+
3
+ //#region src/drawer-registry/drawer-registry.ts
4
+ /**
5
+ * Drawer-named facade over the generic overlay registry (`../overlay-provider`).
6
+ * Behavior is shared with the dialog provider; only the names differ.
7
+ */
8
+ const useDrawer = useOverlay;
9
+ /**
10
+ * Convenience registry facade for drawer operations.
11
+ *
12
+ * Use this when you prefer a single import with discoverable methods instead of
13
+ * importing `registerDrawer`, `showDrawer`, `hideDrawer`, `removeDrawer`, and
14
+ * `unregisterDrawer` separately.
15
+ *
16
+ * Usage:
17
+ * ```ts
18
+ * const filtersDrawer = drawer.register('filters-drawer', FiltersDrawer);
19
+ * await filtersDrawer.show({ category: 'shoes' });
20
+ * await drawer.show('filters-drawer', { category: 'bags' });
21
+ * drawer.unregister('filters-drawer');
22
+ * ```
23
+ */
24
+ const drawer = overlayRegistry;
25
+
26
+ //#endregion
27
+ export { drawer, useDrawer };
@@ -0,0 +1,3 @@
1
+ import { drawer, useDrawer } from "./drawer-registry.cjs";
2
+ import { registerDrawer } from "./register-drawer.cjs";
3
+ import { ShowDrawerProps, showDrawer } from "./show-drawer.cjs";
@@ -0,0 +1,3 @@
1
+ import { drawer, useDrawer } from "./drawer-registry.js";
2
+ import { registerDrawer } from "./register-drawer.js";
3
+ import { ShowDrawerProps, showDrawer } from "./show-drawer.js";
@@ -0,0 +1,51 @@
1
+ import { defineProps } from "../mcp/src/utils.js";
2
+
3
+ //#region src/drawer-registry/mcp.ts
4
+ const meta = {
5
+ name: "registerDrawer",
6
+ category: "Overlays",
7
+ description: "Imperative drawer API built on the overlay provider (there is no `DrawerProvider` component — mount `OverlayProvider`). `registerDrawer(id, Component, defaultProps?)` registers a drawer once so you can open it from anywhere with a typed `show(props)` call — no JSX trigger or local open state. The same folder also exports `showDrawer`, the `drawer` registry facade, and the `useDrawer` hook.",
8
+ props: defineProps({}),
9
+ notes: [
10
+ "Mount `<OverlayProvider>` once near the app root; this facade shares that single provider with the dialog imperative API (`registerDialog`). There is no separate DrawerProvider component to render.",
11
+ "`registerDrawer(id, Component, defaultProps?)` returns a typed controller — call `controller.show(props)` (resolves when the drawer closes), `controller.hide()`, and `controller.remove()`. Props passed as `defaultProps` become optional in `show`.",
12
+ "The registered component receives controlled `open` and `onOpenChange` props automatically (wrapped with NiceModal), so it does not manage its own open state.",
13
+ "`showDrawer(id, props?)` opens a drawer by id when the typed controller is not in scope; prefer `registerDrawer(...).show(...)` when the component is available in the same module.",
14
+ "The `drawer` facade groups the same operations under one import: `drawer.register`, `drawer.show`, `drawer.hide`, `drawer.remove`, `drawer.unregister`.",
15
+ "`useDrawer()` (alias of `useOverlay`) reads drawer state from inside a component."
16
+ ],
17
+ examples: [
18
+ {
19
+ title: "Register and show with a typed controller",
20
+ code: "const filtersDrawer = registerDrawer('filters-drawer', FiltersDrawer, { direction: 'right' });\nawait filtersDrawer.show({ category: 'shoes' });"
21
+ },
22
+ {
23
+ title: "Open a drawer by id from anywhere",
24
+ code: "await showDrawer('filters-drawer', { category: 'bags' });"
25
+ },
26
+ {
27
+ title: "The `drawer` registry facade",
28
+ code: "const filtersDrawer = drawer.register('filters-drawer', FiltersDrawer);\nawait filtersDrawer.show({ category: 'shoes' });\ndrawer.unregister('filters-drawer');"
29
+ }
30
+ ],
31
+ related: [
32
+ "OverlayProvider",
33
+ "registerDialog",
34
+ "Drawer",
35
+ "ConfirmationDialog"
36
+ ],
37
+ keywords: [
38
+ "drawer",
39
+ "provider",
40
+ "sheet",
41
+ "imperative",
42
+ "show-drawer",
43
+ "register-drawer",
44
+ "use-drawer",
45
+ "overlay",
46
+ "drawer-provider"
47
+ ]
48
+ };
49
+
50
+ //#endregion
51
+ export { meta };
@@ -0,0 +1,20 @@
1
+ const require_overlay_registry = require('../overlay-provider/overlay-registry.cjs');
2
+
3
+ //#region src/drawer-registry/register-drawer.ts
4
+ /**
5
+ * Registers a drawer component and returns a typed controller for it.
6
+ *
7
+ * The component is wrapped with NiceModal automatically and receives controlled
8
+ * `open` and `onOpenChange` props. Props supplied as `defaultProps` become
9
+ * optional when calling `show`.
10
+ *
11
+ * Usage:
12
+ * ```ts
13
+ * const filtersDrawer = registerDrawer('filters-drawer', FiltersDrawer, { direction: 'right' });
14
+ * await filtersDrawer.show({ category: 'shoes' });
15
+ * ```
16
+ */
17
+ const registerDrawer = require_overlay_registry.registerOverlay;
18
+
19
+ //#endregion
20
+ exports.registerDrawer = registerDrawer;
@@ -0,0 +1,21 @@
1
+ import { registerOverlay } from "../overlay-provider/overlay-registry.cjs";
2
+ import "../overlay-provider/index.cjs";
3
+
4
+ //#region src/drawer-registry/register-drawer.d.ts
5
+
6
+ /**
7
+ * Registers a drawer component and returns a typed controller for it.
8
+ *
9
+ * The component is wrapped with NiceModal automatically and receives controlled
10
+ * `open` and `onOpenChange` props. Props supplied as `defaultProps` become
11
+ * optional when calling `show`.
12
+ *
13
+ * Usage:
14
+ * ```ts
15
+ * const filtersDrawer = registerDrawer('filters-drawer', FiltersDrawer, { direction: 'right' });
16
+ * await filtersDrawer.show({ category: 'shoes' });
17
+ * ```
18
+ */
19
+ declare const registerDrawer: typeof registerOverlay;
20
+ //#endregion
21
+ export { registerDrawer };
@@ -0,0 +1,21 @@
1
+ import { registerOverlay } from "../overlay-provider/overlay-registry.js";
2
+ import "../overlay-provider/index.js";
3
+
4
+ //#region src/drawer-registry/register-drawer.d.ts
5
+
6
+ /**
7
+ * Registers a drawer component and returns a typed controller for it.
8
+ *
9
+ * The component is wrapped with NiceModal automatically and receives controlled
10
+ * `open` and `onOpenChange` props. Props supplied as `defaultProps` become
11
+ * optional when calling `show`.
12
+ *
13
+ * Usage:
14
+ * ```ts
15
+ * const filtersDrawer = registerDrawer('filters-drawer', FiltersDrawer, { direction: 'right' });
16
+ * await filtersDrawer.show({ category: 'shoes' });
17
+ * ```
18
+ */
19
+ declare const registerDrawer: typeof registerOverlay;
20
+ //#endregion
21
+ export { registerDrawer };
@@ -0,0 +1,20 @@
1
+ import { registerOverlay } from "../overlay-provider/overlay-registry.js";
2
+
3
+ //#region src/drawer-registry/register-drawer.ts
4
+ /**
5
+ * Registers a drawer component and returns a typed controller for it.
6
+ *
7
+ * The component is wrapped with NiceModal automatically and receives controlled
8
+ * `open` and `onOpenChange` props. Props supplied as `defaultProps` become
9
+ * optional when calling `show`.
10
+ *
11
+ * Usage:
12
+ * ```ts
13
+ * const filtersDrawer = registerDrawer('filters-drawer', FiltersDrawer, { direction: 'right' });
14
+ * await filtersDrawer.show({ category: 'shoes' });
15
+ * ```
16
+ */
17
+ const registerDrawer = registerOverlay;
18
+
19
+ //#endregion
20
+ export { registerDrawer };
@@ -0,0 +1,17 @@
1
+ const require_overlay_registry = require('../overlay-provider/overlay-registry.cjs');
2
+
3
+ //#region src/drawer-registry/show-drawer.ts
4
+ /**
5
+ * Opens a registered drawer by id when the caller does not have its typed
6
+ * controller. Prefer `registerDrawer(...).show(...)` when the drawer component
7
+ * is available in the same module.
8
+ *
9
+ * Usage:
10
+ * ```ts
11
+ * await showDrawer('filters-drawer', { category: 'shoes' });
12
+ * ```
13
+ */
14
+ const showDrawer = require_overlay_registry.showOverlay;
15
+
16
+ //#endregion
17
+ exports.showDrawer = showDrawer;
@@ -0,0 +1,18 @@
1
+ import { ShowOverlayProps, showOverlay } from "../overlay-provider/overlay-registry.cjs";
2
+ import "../overlay-provider/index.cjs";
3
+
4
+ //#region src/drawer-registry/show-drawer.d.ts
5
+ type ShowDrawerProps = ShowOverlayProps;
6
+ /**
7
+ * Opens a registered drawer by id when the caller does not have its typed
8
+ * controller. Prefer `registerDrawer(...).show(...)` when the drawer component
9
+ * is available in the same module.
10
+ *
11
+ * Usage:
12
+ * ```ts
13
+ * await showDrawer('filters-drawer', { category: 'shoes' });
14
+ * ```
15
+ */
16
+ declare const showDrawer: typeof showOverlay;
17
+ //#endregion
18
+ export { ShowDrawerProps, showDrawer };
@@ -0,0 +1,18 @@
1
+ import { ShowOverlayProps, showOverlay } from "../overlay-provider/overlay-registry.js";
2
+ import "../overlay-provider/index.js";
3
+
4
+ //#region src/drawer-registry/show-drawer.d.ts
5
+ type ShowDrawerProps = ShowOverlayProps;
6
+ /**
7
+ * Opens a registered drawer by id when the caller does not have its typed
8
+ * controller. Prefer `registerDrawer(...).show(...)` when the drawer component
9
+ * is available in the same module.
10
+ *
11
+ * Usage:
12
+ * ```ts
13
+ * await showDrawer('filters-drawer', { category: 'shoes' });
14
+ * ```
15
+ */
16
+ declare const showDrawer: typeof showOverlay;
17
+ //#endregion
18
+ export { ShowDrawerProps, showDrawer };
@@ -0,0 +1,17 @@
1
+ import { showOverlay } from "../overlay-provider/overlay-registry.js";
2
+
3
+ //#region src/drawer-registry/show-drawer.ts
4
+ /**
5
+ * Opens a registered drawer by id when the caller does not have its typed
6
+ * controller. Prefer `registerDrawer(...).show(...)` when the drawer component
7
+ * is available in the same module.
8
+ *
9
+ * Usage:
10
+ * ```ts
11
+ * await showDrawer('filters-drawer', { category: 'shoes' });
12
+ * ```
13
+ */
14
+ const showDrawer = showOverlay;
15
+
16
+ //#endregion
17
+ export { showDrawer };
@@ -1,7 +1,7 @@
1
1
  import { FileUploadProps } from "./types/index.cjs";
2
- import * as react_jsx_runtime2 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime1 from "react/jsx-runtime";
3
3
 
4
4
  //#region src/file-upload/FileUpload.d.ts
5
- declare function FileUpload(props: FileUploadProps): react_jsx_runtime2.JSX.Element;
5
+ declare function FileUpload(props: FileUploadProps): react_jsx_runtime1.JSX.Element;
6
6
  //#endregion
7
7
  export { FileUpload };
@@ -1,7 +1,7 @@
1
1
  import { FileUploadProps } from "./types/index.js";
2
- import * as react_jsx_runtime13 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime6 from "react/jsx-runtime";
3
3
 
4
4
  //#region src/file-upload/FileUpload.d.ts
5
- declare function FileUpload(props: FileUploadProps): react_jsx_runtime13.JSX.Element;
5
+ declare function FileUpload(props: FileUploadProps): react_jsx_runtime6.JSX.Element;
6
6
  //#endregion
7
7
  export { FileUpload };
@@ -1,10 +1,10 @@
1
1
  import { FileUploadInlineProps } from "./types.cjs";
2
- import * as react_jsx_runtime17 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime26 from "react/jsx-runtime";
3
3
 
4
4
  //#region src/file-upload-inline/FileUploadInline.d.ts
5
5
  /**
6
6
  * FileUploadInline - An inline file upload component using FileUpload primitives
7
7
  */
8
- declare function FileUploadInline(props: FileUploadInlineProps): react_jsx_runtime17.JSX.Element;
8
+ declare function FileUploadInline(props: FileUploadInlineProps): react_jsx_runtime26.JSX.Element;
9
9
  //#endregion
10
10
  export { FileUploadInline };
@@ -1,10 +1,10 @@
1
1
  import { FileUploadInlineProps } from "./types.js";
2
- import * as react_jsx_runtime10 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime18 from "react/jsx-runtime";
3
3
 
4
4
  //#region src/file-upload-inline/FileUploadInline.d.ts
5
5
  /**
6
6
  * FileUploadInline - An inline file upload component using FileUpload primitives
7
7
  */
8
- declare function FileUploadInline(props: FileUploadInlineProps): react_jsx_runtime10.JSX.Element;
8
+ declare function FileUploadInline(props: FileUploadInlineProps): react_jsx_runtime18.JSX.Element;
9
9
  //#endregion
10
10
  export { FileUploadInline };