@pixpilot/shadcn-ui 3.4.0 → 3.5.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.
Files changed (58) hide show
  1. package/dist/absolute-fill/AbsoluteFill.d.ts +2 -2
  2. package/dist/button/Button.d.cts +2 -2
  3. package/dist/button/Button.d.ts +2 -2
  4. package/dist/button-extended/ButtonExtended.d.cts +2 -2
  5. package/dist/button-extended/ButtonExtended.d.ts +2 -2
  6. package/dist/card/Card.d.cts +3 -3
  7. package/dist/card/Card.d.ts +3 -3
  8. package/dist/color-select/ColorSelect.d.cts +2 -2
  9. package/dist/color-select/ColorSelect.d.ts +2 -2
  10. package/dist/content-card/ContentCard.d.cts +2 -2
  11. package/dist/date-picker/DatePicker.d.cts +2 -2
  12. package/dist/dialog/Dialog.d.cts +5 -5
  13. package/dist/drawer/Drawer.cjs +39 -5
  14. package/dist/drawer/Drawer.d.cts +32 -9
  15. package/dist/drawer/Drawer.d.ts +31 -8
  16. package/dist/drawer/Drawer.js +40 -7
  17. package/dist/drawer/index.d.cts +3 -3
  18. package/dist/drawer/index.d.ts +3 -3
  19. package/dist/drawer/index.js +3 -3
  20. package/dist/drawer/mcp.js +5 -0
  21. package/dist/file-upload/FileUpload.d.cts +2 -2
  22. package/dist/file-upload/FileUpload.d.ts +2 -2
  23. package/dist/file-upload-inline/FileUploadInline.d.cts +2 -2
  24. package/dist/file-upload-inline/FileUploadInline.d.ts +2 -2
  25. package/dist/file-upload-root/FileUploadRoot.d.cts +2 -2
  26. package/dist/file-upload-root/FileUploadRoot.d.ts +2 -2
  27. package/dist/generated/mcp-registry.js +20 -18
  28. package/dist/index.cjs +3 -1
  29. package/dist/index.d.cts +5 -3
  30. package/dist/index.d.ts +5 -3
  31. package/dist/index.js +4 -3
  32. package/dist/input/Input.d.cts +2 -2
  33. package/dist/input/Input.d.ts +2 -2
  34. package/dist/rating/Rating.d.cts +4 -4
  35. package/dist/rating/Rating.d.ts +4 -4
  36. package/dist/rich-text-editor/RichTextEditor.cjs +2 -2
  37. package/dist/rich-text-editor/RichTextEditor.d.cts +1 -0
  38. package/dist/rich-text-editor/RichTextEditor.d.ts +1 -0
  39. package/dist/rich-text-editor/RichTextEditor.js +2 -2
  40. package/dist/rich-text-editor/mcp.js +2 -1
  41. package/dist/select/Select.d.cts +2 -2
  42. package/dist/select/Select.d.ts +2 -2
  43. package/dist/shake-styles/ShakeStyles.cjs +15 -0
  44. package/dist/shake-styles/ShakeStyles.d.cts +11 -0
  45. package/dist/shake-styles/ShakeStyles.d.ts +11 -0
  46. package/dist/shake-styles/ShakeStyles.js +12 -0
  47. package/dist/shake-styles/index.d.cts +1 -0
  48. package/dist/shake-styles/index.d.ts +1 -0
  49. package/dist/shake-styles/mcp.js +26 -0
  50. package/dist/tags-input/TagsInput.d.cts +2 -2
  51. package/dist/tags-input/TagsInput.d.ts +2 -2
  52. package/dist/tags-input/TagsInputInline.d.cts +2 -2
  53. package/dist/tags-input/TagsInputInline.d.ts +2 -2
  54. package/dist/theme-toggle/ThemeModeDropdown.d.cts +2 -2
  55. package/dist/theme-toggle/ThemeModeSwitchInside.d.cts +2 -2
  56. package/dist/theme-toggle/ThemeModeSwitchOutside.d.cts +2 -2
  57. package/dist/theme-toggle/ThemeModeToggleButton.d.cts +2 -2
  58. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import * as react_jsx_runtime0 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime4 from "react/jsx-runtime";
3
3
 
4
4
  //#region src/absolute-fill/AbsoluteFill.d.ts
5
5
 
@@ -10,7 +10,7 @@ import * as react_jsx_runtime0 from "react/jsx-runtime";
10
10
  */
11
11
  declare function AbsoluteFill(props: React.HTMLAttributes<HTMLDivElement> & {
12
12
  ref?: React.Ref<HTMLDivElement>;
13
- }): react_jsx_runtime0.JSX.Element;
13
+ }): react_jsx_runtime4.JSX.Element;
14
14
  declare namespace AbsoluteFill {
15
15
  var displayName: string;
16
16
  }
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime0 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime19 from "react/jsx-runtime";
2
2
  import { Button, Tooltip, TooltipContent, TooltipTrigger, buttonVariants } from "@pixpilot/shadcn";
3
3
  import React from "react";
4
4
  import { VariantProps } from "class-variance-authority";
@@ -27,7 +27,7 @@ interface ButtonProps extends React.ComponentProps<typeof Button>, VariantProps<
27
27
  }
28
28
  declare function Button$1(props: ButtonProps & {
29
29
  ref?: React.Ref<HTMLButtonElement>;
30
- }): react_jsx_runtime0.JSX.Element;
30
+ }): react_jsx_runtime19.JSX.Element;
31
31
  declare namespace Button$1 {
32
32
  var displayName: string;
33
33
  }
@@ -1,6 +1,6 @@
1
1
  import { Button, Tooltip, TooltipContent, TooltipTrigger, buttonVariants } from "@pixpilot/shadcn";
2
2
  import React from "react";
3
- import * as react_jsx_runtime1 from "react/jsx-runtime";
3
+ import * as react_jsx_runtime0 from "react/jsx-runtime";
4
4
  import { VariantProps } from "class-variance-authority";
5
5
 
6
6
  //#region src/button/Button.d.ts
@@ -27,7 +27,7 @@ interface ButtonProps extends React.ComponentProps<typeof Button>, VariantProps<
27
27
  }
28
28
  declare function Button$1(props: ButtonProps & {
29
29
  ref?: React.Ref<HTMLButtonElement>;
30
- }): react_jsx_runtime1.JSX.Element;
30
+ }): react_jsx_runtime0.JSX.Element;
31
31
  declare namespace Button$1 {
32
32
  var displayName: string;
33
33
  }
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime2 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime0 from "react/jsx-runtime";
2
2
  import { Button, Tooltip, TooltipContent, TooltipTrigger, buttonVariants } from "@pixpilot/shadcn";
3
3
  import React from "react";
4
4
  import { VariantProps } from "class-variance-authority";
@@ -50,7 +50,7 @@ interface ButtonExtendedProps extends React.ComponentProps<typeof Button>, Varia
50
50
  }
51
51
  declare function ButtonExtended(props: ButtonExtendedProps & {
52
52
  ref?: React.Ref<HTMLButtonElement>;
53
- }): react_jsx_runtime2.JSX.Element;
53
+ }): react_jsx_runtime0.JSX.Element;
54
54
  declare namespace ButtonExtended {
55
55
  var displayName: string;
56
56
  }
@@ -1,6 +1,6 @@
1
1
  import { Button, Tooltip, TooltipContent, TooltipTrigger, buttonVariants } from "@pixpilot/shadcn";
2
2
  import React from "react";
3
- import * as react_jsx_runtime2 from "react/jsx-runtime";
3
+ import * as react_jsx_runtime0 from "react/jsx-runtime";
4
4
  import { VariantProps } from "class-variance-authority";
5
5
 
6
6
  //#region src/button-extended/ButtonExtended.d.ts
@@ -50,7 +50,7 @@ interface ButtonExtendedProps extends React.ComponentProps<typeof Button>, Varia
50
50
  }
51
51
  declare function ButtonExtended(props: ButtonExtendedProps & {
52
52
  ref?: React.Ref<HTMLButtonElement>;
53
- }): react_jsx_runtime2.JSX.Element;
53
+ }): react_jsx_runtime0.JSX.Element;
54
54
  declare namespace ButtonExtended {
55
55
  var displayName: string;
56
56
  }
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime18 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime20 from "react/jsx-runtime";
2
2
  import { Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from "@pixpilot/shadcn";
3
3
  import React from "react";
4
4
 
@@ -6,10 +6,10 @@ import React from "react";
6
6
  declare function CardTitle$1({
7
7
  className,
8
8
  ...props
9
- }: React.ComponentProps<typeof CardTitle>): react_jsx_runtime18.JSX.Element;
9
+ }: React.ComponentProps<typeof CardTitle>): react_jsx_runtime20.JSX.Element;
10
10
  declare function CardHeader$1({
11
11
  className,
12
12
  ...props
13
- }: React.ComponentProps<typeof CardHeader>): react_jsx_runtime18.JSX.Element;
13
+ }: React.ComponentProps<typeof CardHeader>): react_jsx_runtime20.JSX.Element;
14
14
  //#endregion
15
15
  export { Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader$1 as CardHeader, CardTitle$1 as CardTitle };
@@ -1,15 +1,15 @@
1
1
  import { Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from "@pixpilot/shadcn";
2
2
  import React from "react";
3
- import * as react_jsx_runtime3 from "react/jsx-runtime";
3
+ import * as react_jsx_runtime1 from "react/jsx-runtime";
4
4
 
5
5
  //#region src/card/Card.d.ts
6
6
  declare function CardTitle$1({
7
7
  className,
8
8
  ...props
9
- }: React.ComponentProps<typeof CardTitle>): react_jsx_runtime3.JSX.Element;
9
+ }: React.ComponentProps<typeof CardTitle>): react_jsx_runtime1.JSX.Element;
10
10
  declare function CardHeader$1({
11
11
  className,
12
12
  ...props
13
- }: React.ComponentProps<typeof CardHeader>): react_jsx_runtime3.JSX.Element;
13
+ }: React.ComponentProps<typeof CardHeader>): react_jsx_runtime1.JSX.Element;
14
14
  //#endregion
15
15
  export { Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader$1 as CardHeader, CardTitle$1 as CardTitle };
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime3 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime1 from "react/jsx-runtime";
2
2
  import { Select, SelectContent } from "@pixpilot/shadcn";
3
3
  import React, { ComponentProps } from "react";
4
4
 
@@ -17,6 +17,6 @@ type BaseColorSelectProps = {
17
17
  keyboardMode?: 'cycle' | 'dropdown';
18
18
  className?: string;
19
19
  } & Omit<ComponentProps<typeof Select>, 'value' | 'onValueChange' | 'children'>;
20
- declare function ColorSelect(props: BaseColorSelectProps): react_jsx_runtime3.JSX.Element;
20
+ declare function ColorSelect(props: BaseColorSelectProps): react_jsx_runtime1.JSX.Element;
21
21
  //#endregion
22
22
  export { BaseColorSelectProps, ColorSelect, ColorSelectOption };
@@ -1,6 +1,6 @@
1
1
  import { Select, SelectContent } from "@pixpilot/shadcn";
2
2
  import React, { ComponentProps } from "react";
3
- import * as react_jsx_runtime5 from "react/jsx-runtime";
3
+ import * as react_jsx_runtime3 from "react/jsx-runtime";
4
4
 
5
5
  //#region src/color-select/ColorSelect.d.ts
6
6
  interface ColorSelectOption {
@@ -17,6 +17,6 @@ type BaseColorSelectProps = {
17
17
  keyboardMode?: 'cycle' | 'dropdown';
18
18
  className?: string;
19
19
  } & Omit<ComponentProps<typeof Select>, 'value' | 'onValueChange' | 'children'>;
20
- declare function ColorSelect(props: BaseColorSelectProps): react_jsx_runtime5.JSX.Element;
20
+ declare function ColorSelect(props: BaseColorSelectProps): react_jsx_runtime3.JSX.Element;
21
21
  //#endregion
22
22
  export { BaseColorSelectProps, ColorSelect, ColorSelectOption };
@@ -1,6 +1,6 @@
1
1
  import { Card } from "../card/Card.cjs";
2
2
  import "../card/index.cjs";
3
- import * as react_jsx_runtime8 from "react/jsx-runtime";
3
+ import * as react_jsx_runtime3 from "react/jsx-runtime";
4
4
  import React, { ReactNode } from "react";
5
5
 
6
6
  //#region src/content-card/ContentCard.d.ts
@@ -9,7 +9,7 @@ interface SectionCardProps extends React.ComponentProps<typeof Card> {
9
9
  children: ReactNode;
10
10
  marginBottom?: boolean;
11
11
  }
12
- declare function ContentCard(props: SectionCardProps): react_jsx_runtime8.JSX.Element;
12
+ declare function ContentCard(props: SectionCardProps): react_jsx_runtime3.JSX.Element;
13
13
  declare namespace ContentCard {
14
14
  var displayName: string;
15
15
  }
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime9 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime4 from "react/jsx-runtime";
2
2
  import { Calendar } from "@pixpilot/shadcn";
3
3
  import { ComponentProps } from "react";
4
4
 
@@ -10,7 +10,7 @@ type DatePickerProps = {
10
10
  placeholder?: string;
11
11
  showClearButton?: boolean;
12
12
  } & Omit<ComponentProps<typeof Calendar>, 'selected' | 'onSelect' | 'mode'>;
13
- declare function DatePicker(props: DatePickerProps): react_jsx_runtime9.JSX.Element;
13
+ declare function DatePicker(props: DatePickerProps): react_jsx_runtime4.JSX.Element;
14
14
  declare namespace DatePicker {
15
15
  var displayName: string;
16
16
  }
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime4 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime5 from "react/jsx-runtime";
2
2
  import { DialogClose, DialogContent } from "@pixpilot/shadcn";
3
3
  import * as React$1 from "react";
4
4
 
@@ -10,18 +10,18 @@ declare const DialogContent$1: React$1.ForwardRefExoticComponent<DialogContentPr
10
10
  declare function DialogHeader({
11
11
  className,
12
12
  ...props
13
- }: React$1.HTMLAttributes<HTMLDivElement>): react_jsx_runtime4.JSX.Element;
13
+ }: React$1.HTMLAttributes<HTMLDivElement>): react_jsx_runtime5.JSX.Element;
14
14
  declare function DialogBody({
15
15
  className,
16
16
  ...props
17
- }: React$1.HTMLAttributes<HTMLDivElement>): react_jsx_runtime4.JSX.Element;
17
+ }: React$1.HTMLAttributes<HTMLDivElement>): react_jsx_runtime5.JSX.Element;
18
18
  declare function DialogFooter({
19
19
  className,
20
20
  ...props
21
- }: React$1.HTMLAttributes<HTMLDivElement>): react_jsx_runtime4.JSX.Element;
21
+ }: React$1.HTMLAttributes<HTMLDivElement>): react_jsx_runtime5.JSX.Element;
22
22
  declare function DialogClose$1({
23
23
  className,
24
24
  ...props
25
- }: React$1.ComponentPropsWithoutRef<typeof DialogClose>): react_jsx_runtime4.JSX.Element;
25
+ }: React$1.ComponentPropsWithoutRef<typeof DialogClose>): react_jsx_runtime5.JSX.Element;
26
26
  //#endregion
27
27
  export { DialogBody, DialogClose$1 as DialogClose, DialogContent$1 as DialogContent, DialogContentProps, DialogFooter, DialogHeader };
@@ -10,6 +10,34 @@ react_jsx_runtime = require_rolldown_runtime.__toESM(react_jsx_runtime);
10
10
 
11
11
  //#region src/drawer/Drawer.tsx
12
12
  /**
13
+ * Shared by every drawer part so `noDrag` set on the root propagates down
14
+ * without threading props by hand. The root provides its `noDrag` value here;
15
+ * each part ORs it with its own local `noDrag` prop.
16
+ */
17
+ const DrawerNoDragContext = react.createContext(false);
18
+ /**
19
+ * Vaul decides whether a pointer-down starts a drag in its internal
20
+ * `shouldDrag`. For `left`/`right` drawers that check returns `true` before it
21
+ * ever looks at highlighted text, so selecting text inside the panel drags the
22
+ * whole drawer. The one escape hatch vaul honours is the `data-vaul-no-drag`
23
+ * attribute (matched via `.closest()`, so it also covers descendants). This
24
+ * helper renders that attribute when either the root context or the part's own
25
+ * `noDrag` prop is set, and nothing otherwise.
26
+ */
27
+ function useNoDragProps(local) {
28
+ return react.use(DrawerNoDragContext) || local ? { "data-vaul-no-drag": "" } : {};
29
+ }
30
+ /**
31
+ * Drawer root. Wraps the vaul/Radix root and, when `noDrag` is set, disables
32
+ * drag-to-dismiss for the whole drawer via context.
33
+ */
34
+ function Drawer({ noDrag = false,...props }) {
35
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DrawerNoDragContext, {
36
+ value: noDrag,
37
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.Drawer, { ...props })
38
+ });
39
+ }
40
+ /**
13
41
  * Direction-aware "floating" overrides. Each rule targets vaul's
14
42
  * `data-vaul-drawer-direction` attribute so a single set of classes works
15
43
  * regardless of which edge the drawer root anchors to. Per-corner radius
@@ -17,9 +45,10 @@ react_jsx_runtime = require_rolldown_runtime.__toESM(react_jsx_runtime);
17
45
  * so they deterministically override the registry's `rounded-t-lg`/`rounded-b-lg`.
18
46
  */
19
47
  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");
20
- const DrawerContent = react.forwardRef(({ className, floating = true, showCloseButton = true,...props }, ref) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__pixpilot_shadcn.DrawerContent, {
48
+ const DrawerContent = react.forwardRef(({ className, floating = true, showCloseButton = true, noDrag,...props }, ref) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__pixpilot_shadcn.DrawerContent, {
21
49
  ref,
22
50
  className: (0, __pixpilot_shadcn.cn)("min-h-0 gap-4 px-6 pb-6", floating && floatingClass, className),
51
+ ...useNoDragProps(noDrag),
23
52
  ...props,
24
53
  children: [props.children, showCloseButton && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__pixpilot_shadcn.DrawerClose, {
25
54
  "data-slot": "drawer-close",
@@ -31,35 +60,40 @@ const DrawerContent = react.forwardRef(({ className, floating = true, showCloseB
31
60
  })]
32
61
  }));
33
62
  DrawerContent.displayName = "DrawerContent";
34
- function DrawerHeader({ className,...props }) {
63
+ function DrawerHeader({ className, noDrag,...props }) {
35
64
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
36
65
  "data-slot": "header",
37
66
  className: (0, __pixpilot_shadcn.cn)("flex shrink-0 flex-col gap-2.5", className),
67
+ ...useNoDragProps(noDrag),
38
68
  ...props
39
69
  });
40
70
  }
41
- function DrawerBody({ className,...props }) {
71
+ function DrawerBody({ className, noDrag,...props }) {
42
72
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
43
73
  "data-slot": "body",
44
74
  className: (0, __pixpilot_shadcn.cn)("min-h-0 flex-1 overflow-auto -mx-6 px-6", className),
75
+ ...useNoDragProps(noDrag),
45
76
  ...props
46
77
  });
47
78
  }
48
- function DrawerFooter({ className,...props }) {
79
+ function DrawerFooter({ className, noDrag,...props }) {
49
80
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
50
81
  "data-slot": "footer",
51
82
  className: (0, __pixpilot_shadcn.cn)("flex shrink-0 justify-end space-x-2", className),
83
+ ...useNoDragProps(noDrag),
52
84
  ...props
53
85
  });
54
86
  }
55
- function DrawerClose({ className,...props }) {
87
+ function DrawerClose({ className, noDrag,...props }) {
56
88
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(__pixpilot_shadcn.DrawerClose, {
57
89
  className: (0, __pixpilot_shadcn.cn)(className),
90
+ ...useNoDragProps(noDrag),
58
91
  ...props
59
92
  });
60
93
  }
61
94
 
62
95
  //#endregion
96
+ exports.Drawer = Drawer;
63
97
  exports.DrawerBody = DrawerBody;
64
98
  exports.DrawerClose = DrawerClose;
65
99
  exports.DrawerContent = DrawerContent;
@@ -1,10 +1,29 @@
1
- import * as react_jsx_runtime11 from "react/jsx-runtime";
2
- import { DrawerClose, DrawerContent } from "@pixpilot/shadcn";
1
+ import * as react_jsx_runtime9 from "react/jsx-runtime";
2
+ import { Drawer, DrawerClose, DrawerContent } from "@pixpilot/shadcn";
3
3
  import * as React$1 from "react";
4
4
  import * as _radix_ui_react_dialog0 from "@radix-ui/react-dialog";
5
5
 
6
6
  //#region src/drawer/Drawer.d.ts
7
- type DrawerContentProps = React$1.ComponentPropsWithoutRef<typeof DrawerContent> & {
7
+ /** A drawer part that can opt out of vaul's drag-to-dismiss. */
8
+ interface NoDragProps {
9
+ /**
10
+ * Disable vaul's drag-to-dismiss for this element and everything inside it.
11
+ * Useful for text editors, sliders, or any content where a press-and-move
12
+ * gesture should select/interact instead of dragging the drawer. Setting it
13
+ * on the `Drawer` root disables dragging for the entire drawer.
14
+ */
15
+ noDrag?: boolean;
16
+ }
17
+ type DrawerProps = React$1.ComponentProps<typeof Drawer> & NoDragProps;
18
+ /**
19
+ * Drawer root. Wraps the vaul/Radix root and, when `noDrag` is set, disables
20
+ * drag-to-dismiss for the whole drawer via context.
21
+ */
22
+ declare function Drawer$1({
23
+ noDrag,
24
+ ...props
25
+ }: DrawerProps): react_jsx_runtime9.JSX.Element;
26
+ type DrawerContentProps = React$1.ComponentPropsWithoutRef<typeof DrawerContent> & NoDragProps & {
8
27
  /**
9
28
  * Detach the drawer from the viewport edges: adds a gap on every side and
10
29
  * rounds all corners, so it reads as a floating card rather than a panel
@@ -13,7 +32,7 @@ type DrawerContentProps = React$1.ComponentPropsWithoutRef<typeof DrawerContent>
13
32
  floating?: boolean;
14
33
  showCloseButton?: boolean;
15
34
  };
16
- declare const DrawerContent$1: React$1.ForwardRefExoticComponent<Omit<Omit<_radix_ui_react_dialog0.DialogContentProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>, "ref"> & {
35
+ declare const DrawerContent$1: React$1.ForwardRefExoticComponent<Omit<Omit<_radix_ui_react_dialog0.DialogContentProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>, "ref"> & NoDragProps & {
17
36
  /**
18
37
  * Detach the drawer from the viewport edges: adds a gap on every side and
19
38
  * rounds all corners, so it reads as a floating card rather than a panel
@@ -24,19 +43,23 @@ declare const DrawerContent$1: React$1.ForwardRefExoticComponent<Omit<Omit<_radi
24
43
  } & React$1.RefAttributes<HTMLDivElement>>;
25
44
  declare function DrawerHeader({
26
45
  className,
46
+ noDrag,
27
47
  ...props
28
- }: React$1.HTMLAttributes<HTMLDivElement>): react_jsx_runtime11.JSX.Element;
48
+ }: React$1.HTMLAttributes<HTMLDivElement> & NoDragProps): react_jsx_runtime9.JSX.Element;
29
49
  declare function DrawerBody({
30
50
  className,
51
+ noDrag,
31
52
  ...props
32
- }: React$1.HTMLAttributes<HTMLDivElement>): react_jsx_runtime11.JSX.Element;
53
+ }: React$1.HTMLAttributes<HTMLDivElement> & NoDragProps): react_jsx_runtime9.JSX.Element;
33
54
  declare function DrawerFooter({
34
55
  className,
56
+ noDrag,
35
57
  ...props
36
- }: React$1.HTMLAttributes<HTMLDivElement>): react_jsx_runtime11.JSX.Element;
58
+ }: React$1.HTMLAttributes<HTMLDivElement> & NoDragProps): react_jsx_runtime9.JSX.Element;
37
59
  declare function DrawerClose$1({
38
60
  className,
61
+ noDrag,
39
62
  ...props
40
- }: React$1.ComponentPropsWithoutRef<typeof DrawerClose>): react_jsx_runtime11.JSX.Element;
63
+ }: React$1.ComponentPropsWithoutRef<typeof DrawerClose> & NoDragProps): react_jsx_runtime9.JSX.Element;
41
64
  //#endregion
42
- export { DrawerBody, DrawerClose$1 as DrawerClose, DrawerContent$1 as DrawerContent, DrawerContentProps, DrawerFooter, DrawerHeader };
65
+ export { Drawer$1 as Drawer, DrawerBody, DrawerClose$1 as DrawerClose, DrawerContent$1 as DrawerContent, DrawerContentProps, DrawerFooter, DrawerHeader, DrawerProps };
@@ -1,10 +1,29 @@
1
- import { DrawerClose, DrawerContent } from "@pixpilot/shadcn";
1
+ import { Drawer, DrawerClose, DrawerContent } from "@pixpilot/shadcn";
2
2
  import * as React$1 from "react";
3
3
  import * as react_jsx_runtime12 from "react/jsx-runtime";
4
4
  import * as _radix_ui_react_dialog0 from "@radix-ui/react-dialog";
5
5
 
6
6
  //#region src/drawer/Drawer.d.ts
7
- type DrawerContentProps = React$1.ComponentPropsWithoutRef<typeof DrawerContent> & {
7
+ /** A drawer part that can opt out of vaul's drag-to-dismiss. */
8
+ interface NoDragProps {
9
+ /**
10
+ * Disable vaul's drag-to-dismiss for this element and everything inside it.
11
+ * Useful for text editors, sliders, or any content where a press-and-move
12
+ * gesture should select/interact instead of dragging the drawer. Setting it
13
+ * on the `Drawer` root disables dragging for the entire drawer.
14
+ */
15
+ noDrag?: boolean;
16
+ }
17
+ type DrawerProps = React$1.ComponentProps<typeof Drawer> & NoDragProps;
18
+ /**
19
+ * Drawer root. Wraps the vaul/Radix root and, when `noDrag` is set, disables
20
+ * drag-to-dismiss for the whole drawer via context.
21
+ */
22
+ declare function Drawer$1({
23
+ noDrag,
24
+ ...props
25
+ }: DrawerProps): react_jsx_runtime12.JSX.Element;
26
+ type DrawerContentProps = React$1.ComponentPropsWithoutRef<typeof DrawerContent> & NoDragProps & {
8
27
  /**
9
28
  * Detach the drawer from the viewport edges: adds a gap on every side and
10
29
  * rounds all corners, so it reads as a floating card rather than a panel
@@ -13,7 +32,7 @@ type DrawerContentProps = React$1.ComponentPropsWithoutRef<typeof DrawerContent>
13
32
  floating?: boolean;
14
33
  showCloseButton?: boolean;
15
34
  };
16
- declare const DrawerContent$1: React$1.ForwardRefExoticComponent<Omit<Omit<_radix_ui_react_dialog0.DialogContentProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>, "ref"> & {
35
+ declare const DrawerContent$1: React$1.ForwardRefExoticComponent<Omit<Omit<_radix_ui_react_dialog0.DialogContentProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>, "ref"> & NoDragProps & {
17
36
  /**
18
37
  * Detach the drawer from the viewport edges: adds a gap on every side and
19
38
  * rounds all corners, so it reads as a floating card rather than a panel
@@ -24,19 +43,23 @@ declare const DrawerContent$1: React$1.ForwardRefExoticComponent<Omit<Omit<_radi
24
43
  } & React$1.RefAttributes<HTMLDivElement>>;
25
44
  declare function DrawerHeader({
26
45
  className,
46
+ noDrag,
27
47
  ...props
28
- }: React$1.HTMLAttributes<HTMLDivElement>): react_jsx_runtime12.JSX.Element;
48
+ }: React$1.HTMLAttributes<HTMLDivElement> & NoDragProps): react_jsx_runtime12.JSX.Element;
29
49
  declare function DrawerBody({
30
50
  className,
51
+ noDrag,
31
52
  ...props
32
- }: React$1.HTMLAttributes<HTMLDivElement>): react_jsx_runtime12.JSX.Element;
53
+ }: React$1.HTMLAttributes<HTMLDivElement> & NoDragProps): react_jsx_runtime12.JSX.Element;
33
54
  declare function DrawerFooter({
34
55
  className,
56
+ noDrag,
35
57
  ...props
36
- }: React$1.HTMLAttributes<HTMLDivElement>): react_jsx_runtime12.JSX.Element;
58
+ }: React$1.HTMLAttributes<HTMLDivElement> & NoDragProps): react_jsx_runtime12.JSX.Element;
37
59
  declare function DrawerClose$1({
38
60
  className,
61
+ noDrag,
39
62
  ...props
40
- }: React$1.ComponentPropsWithoutRef<typeof DrawerClose>): react_jsx_runtime12.JSX.Element;
63
+ }: React$1.ComponentPropsWithoutRef<typeof DrawerClose> & NoDragProps): react_jsx_runtime12.JSX.Element;
41
64
  //#endregion
42
- export { DrawerBody, DrawerClose$1 as DrawerClose, DrawerContent$1 as DrawerContent, DrawerContentProps, DrawerFooter, DrawerHeader };
65
+ export { Drawer$1 as Drawer, DrawerBody, DrawerClose$1 as DrawerClose, DrawerContent$1 as DrawerContent, DrawerContentProps, DrawerFooter, DrawerHeader, DrawerProps };
@@ -1,10 +1,38 @@
1
- import { DrawerClose, DrawerContent, cn } from "@pixpilot/shadcn";
1
+ import { Drawer, DrawerClose, DrawerContent, cn } from "@pixpilot/shadcn";
2
2
  import { XIcon } from "lucide-react";
3
3
  import * as React$1 from "react";
4
4
  import { jsx, jsxs } from "react/jsx-runtime";
5
5
 
6
6
  //#region src/drawer/Drawer.tsx
7
7
  /**
8
+ * Shared by every drawer part so `noDrag` set on the root propagates down
9
+ * without threading props by hand. The root provides its `noDrag` value here;
10
+ * each part ORs it with its own local `noDrag` prop.
11
+ */
12
+ const DrawerNoDragContext = React$1.createContext(false);
13
+ /**
14
+ * Vaul decides whether a pointer-down starts a drag in its internal
15
+ * `shouldDrag`. For `left`/`right` drawers that check returns `true` before it
16
+ * ever looks at highlighted text, so selecting text inside the panel drags the
17
+ * whole drawer. The one escape hatch vaul honours is the `data-vaul-no-drag`
18
+ * attribute (matched via `.closest()`, so it also covers descendants). This
19
+ * helper renders that attribute when either the root context or the part's own
20
+ * `noDrag` prop is set, and nothing otherwise.
21
+ */
22
+ function useNoDragProps(local) {
23
+ return React$1.use(DrawerNoDragContext) || local ? { "data-vaul-no-drag": "" } : {};
24
+ }
25
+ /**
26
+ * Drawer root. Wraps the vaul/Radix root and, when `noDrag` is set, disables
27
+ * drag-to-dismiss for the whole drawer via context.
28
+ */
29
+ function Drawer$1({ noDrag = false,...props }) {
30
+ return /* @__PURE__ */ jsx(DrawerNoDragContext, {
31
+ value: noDrag,
32
+ children: /* @__PURE__ */ jsx(Drawer, { ...props })
33
+ });
34
+ }
35
+ /**
8
36
  * Direction-aware "floating" overrides. Each rule targets vaul's
9
37
  * `data-vaul-drawer-direction` attribute so a single set of classes works
10
38
  * regardless of which edge the drawer root anchors to. Per-corner radius
@@ -12,9 +40,10 @@ import { jsx, jsxs } from "react/jsx-runtime";
12
40
  * so they deterministically override the registry's `rounded-t-lg`/`rounded-b-lg`.
13
41
  */
14
42
  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");
15
- const DrawerContent$1 = React$1.forwardRef(({ className, floating = true, showCloseButton = true,...props }, ref) => /* @__PURE__ */ jsxs(DrawerContent, {
43
+ const DrawerContent$1 = React$1.forwardRef(({ className, floating = true, showCloseButton = true, noDrag,...props }, ref) => /* @__PURE__ */ jsxs(DrawerContent, {
16
44
  ref,
17
45
  className: cn("min-h-0 gap-4 px-6 pb-6", floating && floatingClass, className),
46
+ ...useNoDragProps(noDrag),
18
47
  ...props,
19
48
  children: [props.children, showCloseButton && /* @__PURE__ */ jsxs(DrawerClose, {
20
49
  "data-slot": "drawer-close",
@@ -26,33 +55,37 @@ const DrawerContent$1 = React$1.forwardRef(({ className, floating = true, showCl
26
55
  })]
27
56
  }));
28
57
  DrawerContent$1.displayName = "DrawerContent";
29
- function DrawerHeader({ className,...props }) {
58
+ function DrawerHeader({ className, noDrag,...props }) {
30
59
  return /* @__PURE__ */ jsx("div", {
31
60
  "data-slot": "header",
32
61
  className: cn("flex shrink-0 flex-col gap-2.5", className),
62
+ ...useNoDragProps(noDrag),
33
63
  ...props
34
64
  });
35
65
  }
36
- function DrawerBody({ className,...props }) {
66
+ function DrawerBody({ className, noDrag,...props }) {
37
67
  return /* @__PURE__ */ jsx("div", {
38
68
  "data-slot": "body",
39
69
  className: cn("min-h-0 flex-1 overflow-auto -mx-6 px-6", className),
70
+ ...useNoDragProps(noDrag),
40
71
  ...props
41
72
  });
42
73
  }
43
- function DrawerFooter({ className,...props }) {
74
+ function DrawerFooter({ className, noDrag,...props }) {
44
75
  return /* @__PURE__ */ jsx("div", {
45
76
  "data-slot": "footer",
46
77
  className: cn("flex shrink-0 justify-end space-x-2", className),
78
+ ...useNoDragProps(noDrag),
47
79
  ...props
48
80
  });
49
81
  }
50
- function DrawerClose$1({ className,...props }) {
82
+ function DrawerClose$1({ className, noDrag,...props }) {
51
83
  return /* @__PURE__ */ jsx(DrawerClose, {
52
84
  className: cn(className),
85
+ ...useNoDragProps(noDrag),
53
86
  ...props
54
87
  });
55
88
  }
56
89
 
57
90
  //#endregion
58
- export { DrawerBody, DrawerClose$1 as DrawerClose, DrawerContent$1 as DrawerContent, DrawerFooter, DrawerHeader };
91
+ export { Drawer$1 as Drawer, DrawerBody, DrawerClose$1 as DrawerClose, DrawerContent$1 as DrawerContent, DrawerFooter, DrawerHeader };
@@ -1,3 +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 };
1
+ import { Drawer as Drawer$1, DrawerBody, DrawerClose as DrawerClose$1, DrawerContent as DrawerContent$1, DrawerContentProps, DrawerFooter, DrawerHeader, DrawerProps } from "./Drawer.cjs";
2
+ import { DrawerDescription, DrawerTitle, DrawerTrigger } from "@pixpilot/shadcn";
3
+ export { DrawerDescription, DrawerTitle, DrawerTrigger };
@@ -1,3 +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 };
1
+ import { Drawer as Drawer$1, DrawerBody, DrawerClose as DrawerClose$1, DrawerContent as DrawerContent$1, DrawerContentProps, DrawerFooter, DrawerHeader, DrawerProps } from "./Drawer.js";
2
+ import { DrawerDescription, DrawerTitle, DrawerTrigger } from "@pixpilot/shadcn";
3
+ export { DrawerDescription, DrawerTitle, DrawerTrigger };
@@ -1,4 +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";
1
+ import { Drawer as Drawer$1, DrawerBody, DrawerClose as DrawerClose$1, DrawerContent as DrawerContent$1, DrawerFooter, DrawerHeader } from "./Drawer.js";
2
+ import { DrawerDescription, DrawerTitle, DrawerTrigger } from "@pixpilot/shadcn";
3
3
 
4
- export { Drawer, DrawerDescription, DrawerTitle, DrawerTrigger };
4
+ export { DrawerDescription, DrawerTitle, DrawerTrigger };
@@ -16,6 +16,11 @@ const meta = {
16
16
  type: "boolean",
17
17
  defaultValue: "true"
18
18
  },
19
+ noDrag: {
20
+ description: "Disable vaul's drag-to-dismiss for this element and everything inside it (renders `data-vaul-no-drag`). Use for text editors, sliders, or any content where a press-and-move gesture should select/interact instead of dragging the drawer. Available on every drawer part; set on the Drawer root to disable dragging for the whole drawer.",
21
+ type: "boolean",
22
+ defaultValue: "false"
23
+ },
19
24
  asChild: {
20
25
  description: "Merge behavior and styles onto the child element instead of the default content wrapper.",
21
26
  type: "boolean",
@@ -1,7 +1,7 @@
1
1
  import { FileUploadProps } from "./types/index.cjs";
2
- import * as react_jsx_runtime1 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime2 from "react/jsx-runtime";
3
3
 
4
4
  //#region src/file-upload/FileUpload.d.ts
5
- declare function FileUpload(props: FileUploadProps): react_jsx_runtime1.JSX.Element;
5
+ declare function FileUpload(props: FileUploadProps): react_jsx_runtime2.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_runtime0 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime5 from "react/jsx-runtime";
3
3
 
4
4
  //#region src/file-upload/FileUpload.d.ts
5
- declare function FileUpload(props: FileUploadProps): react_jsx_runtime0.JSX.Element;
5
+ declare function FileUpload(props: FileUploadProps): react_jsx_runtime5.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_runtime15 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime22 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_runtime15.JSX.Element;
8
+ declare function FileUploadInline(props: FileUploadInlineProps): react_jsx_runtime22.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_runtime16 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime17 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_runtime16.JSX.Element;
8
+ declare function FileUploadInline(props: FileUploadInlineProps): react_jsx_runtime17.JSX.Element;
9
9
  //#endregion
10
10
  export { FileUploadInline };