@s-hirano-ist/s-ui 1.2.0 → 1.3.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 (106) hide show
  1. package/dist/display/loading.d.ts +14 -0
  2. package/dist/display/loading.d.ts.map +1 -1
  3. package/dist/display/loading.js +14 -0
  4. package/dist/display/loading.js.map +1 -1
  5. package/dist/display/status/status-code-view.d.ts +29 -2
  6. package/dist/display/status/status-code-view.d.ts.map +1 -1
  7. package/dist/display/status/status-code-view.js +18 -0
  8. package/dist/display/status/status-code-view.js.map +1 -1
  9. package/dist/forms/fields/form-dropdown-input.d.ts +61 -7
  10. package/dist/forms/fields/form-dropdown-input.d.ts.map +1 -1
  11. package/dist/forms/fields/form-dropdown-input.js +64 -11
  12. package/dist/forms/fields/form-dropdown-input.js.map +1 -1
  13. package/dist/forms/fields/form-file-input.d.ts +30 -3
  14. package/dist/forms/fields/form-file-input.d.ts.map +1 -1
  15. package/dist/forms/fields/form-file-input.js +21 -0
  16. package/dist/forms/fields/form-file-input.js.map +1 -1
  17. package/dist/forms/fields/form-input-with-button.d.ts +41 -3
  18. package/dist/forms/fields/form-input-with-button.d.ts.map +1 -1
  19. package/dist/forms/fields/form-input-with-button.js +28 -0
  20. package/dist/forms/fields/form-input-with-button.js.map +1 -1
  21. package/dist/forms/fields/form-input.d.ts +32 -3
  22. package/dist/forms/fields/form-input.d.ts.map +1 -1
  23. package/dist/forms/fields/form-input.js +23 -0
  24. package/dist/forms/fields/form-input.js.map +1 -1
  25. package/dist/forms/fields/form-textarea.d.ts +31 -3
  26. package/dist/forms/fields/form-textarea.d.ts.map +1 -1
  27. package/dist/forms/fields/form-textarea.js +22 -0
  28. package/dist/forms/fields/form-textarea.js.map +1 -1
  29. package/dist/forms/generic-form-wrapper.d.ts +66 -3
  30. package/dist/forms/generic-form-wrapper.d.ts.map +1 -1
  31. package/dist/forms/generic-form-wrapper.js +53 -0
  32. package/dist/forms/generic-form-wrapper.js.map +1 -1
  33. package/dist/hooks/use-infinite-scroll.d.ts +58 -3
  34. package/dist/hooks/use-infinite-scroll.d.ts.map +1 -1
  35. package/dist/hooks/use-infinite-scroll.js +40 -0
  36. package/dist/hooks/use-infinite-scroll.js.map +1 -1
  37. package/dist/index.d.ts +36 -0
  38. package/dist/index.d.ts.map +1 -1
  39. package/dist/index.js +36 -0
  40. package/dist/index.js.map +1 -1
  41. package/dist/layouts/body/viewer-body.d.ts +49 -3
  42. package/dist/layouts/body/viewer-body.d.ts.map +1 -1
  43. package/dist/layouts/body/viewer-body.js +41 -1
  44. package/dist/layouts/body/viewer-body.js.map +1 -1
  45. package/dist/providers/theme-provider.d.ts +23 -0
  46. package/dist/providers/theme-provider.d.ts.map +1 -1
  47. package/dist/providers/theme-provider.js +23 -0
  48. package/dist/providers/theme-provider.js.map +1 -1
  49. package/dist/tsconfig.tsbuildinfo +1 -1
  50. package/dist/ui/badge.d.ts +41 -0
  51. package/dist/ui/badge.d.ts.map +1 -1
  52. package/dist/ui/badge.js +35 -0
  53. package/dist/ui/badge.js.map +1 -1
  54. package/dist/ui/button.d.ts +58 -0
  55. package/dist/ui/button.d.ts.map +1 -1
  56. package/dist/ui/button.js +50 -0
  57. package/dist/ui/button.js.map +1 -1
  58. package/dist/ui/card.d.ts +74 -0
  59. package/dist/ui/card.d.ts.map +1 -1
  60. package/dist/ui/card.js +74 -0
  61. package/dist/ui/card.js.map +1 -1
  62. package/dist/ui/command.d.ts +117 -1
  63. package/dist/ui/command.d.ts.map +1 -1
  64. package/dist/ui/command.js +117 -1
  65. package/dist/ui/command.js.map +1 -1
  66. package/dist/ui/dialog.d.ts +88 -0
  67. package/dist/ui/dialog.d.ts.map +1 -1
  68. package/dist/ui/dialog.js +88 -0
  69. package/dist/ui/dialog.js.map +1 -1
  70. package/dist/ui/drawer.d.ts +85 -0
  71. package/dist/ui/drawer.d.ts.map +1 -1
  72. package/dist/ui/drawer.js +85 -0
  73. package/dist/ui/drawer.js.map +1 -1
  74. package/dist/ui/dropdown-menu.d.ts +88 -0
  75. package/dist/ui/dropdown-menu.d.ts.map +1 -1
  76. package/dist/ui/dropdown-menu.js +88 -0
  77. package/dist/ui/dropdown-menu.js.map +1 -1
  78. package/dist/ui/input.d.ts +27 -0
  79. package/dist/ui/input.d.ts.map +1 -1
  80. package/dist/ui/input.js +22 -0
  81. package/dist/ui/input.js.map +1 -1
  82. package/dist/ui/label.d.ts +16 -0
  83. package/dist/ui/label.d.ts.map +1 -1
  84. package/dist/ui/label.js +20 -0
  85. package/dist/ui/label.js.map +1 -1
  86. package/dist/ui/popover.d.ts +50 -0
  87. package/dist/ui/popover.d.ts.map +1 -0
  88. package/dist/ui/popover.js +54 -0
  89. package/dist/ui/popover.js.map +1 -0
  90. package/dist/ui/sonner.d.ts +27 -0
  91. package/dist/ui/sonner.d.ts.map +1 -1
  92. package/dist/ui/sonner.js +22 -0
  93. package/dist/ui/sonner.js.map +1 -1
  94. package/dist/ui/tabs.d.ts +50 -0
  95. package/dist/ui/tabs.d.ts.map +1 -1
  96. package/dist/ui/tabs.js +50 -0
  97. package/dist/ui/tabs.js.map +1 -1
  98. package/dist/ui/textarea.d.ts +24 -0
  99. package/dist/ui/textarea.d.ts.map +1 -1
  100. package/dist/ui/textarea.js +19 -0
  101. package/dist/ui/textarea.js.map +1 -1
  102. package/dist/utils/cn.d.ts +19 -0
  103. package/dist/utils/cn.d.ts.map +1 -1
  104. package/dist/utils/cn.js +19 -0
  105. package/dist/utils/cn.js.map +1 -1
  106. package/package.json +1 -1
@@ -1,21 +1,109 @@
1
1
  import { Dialog as DialogPrimitive } from "radix-ui";
2
2
  import * as React from "react";
3
+ /**
4
+ * Root dialog component for modal overlays.
5
+ *
6
+ * @remarks
7
+ * Built on Radix UI Dialog primitive. Provides accessible modal dialogs
8
+ * with focus trapping and keyboard navigation.
9
+ *
10
+ * @example
11
+ * ```tsx
12
+ * <Dialog open={open} onOpenChange={setOpen}>
13
+ * <DialogTrigger asChild>
14
+ * <Button>Open Dialog</Button>
15
+ * </DialogTrigger>
16
+ * <DialogContent>
17
+ * <DialogHeader>
18
+ * <DialogTitle>Dialog Title</DialogTitle>
19
+ * <DialogDescription>Dialog description text.</DialogDescription>
20
+ * </DialogHeader>
21
+ * <p>Dialog content</p>
22
+ * <DialogFooter>
23
+ * <Button>Close</Button>
24
+ * </DialogFooter>
25
+ * </DialogContent>
26
+ * </Dialog>
27
+ * ```
28
+ *
29
+ * @see {@link DialogContent} for the dialog body
30
+ * @see {@link DialogTrigger} for the trigger button
31
+ */
3
32
  declare const Dialog: React.FC<DialogPrimitive.DialogProps>;
33
+ /**
34
+ * Button or element that opens the dialog.
35
+ *
36
+ * @see {@link Dialog} for parent component
37
+ */
4
38
  declare const DialogTrigger: React.ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
39
+ /**
40
+ * Portal for rendering dialog outside the DOM hierarchy.
41
+ * @internal
42
+ */
5
43
  declare const DialogPortal: React.FC<DialogPrimitive.DialogPortalProps>;
44
+ /**
45
+ * Semi-transparent overlay behind the dialog.
46
+ *
47
+ * @remarks
48
+ * Automatically included by DialogContent.
49
+ * Provides backdrop blur and click-outside-to-close behavior.
50
+ */
6
51
  declare const DialogOverlay: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
52
+ /**
53
+ * Main content container for the dialog.
54
+ *
55
+ * @remarks
56
+ * Centered modal with overlay, animations, and proper styling.
57
+ * Includes the DialogOverlay automatically.
58
+ *
59
+ * @param props - Content props including fullWidth option
60
+ * @returns A styled dialog content container
61
+ *
62
+ * @see {@link Dialog} for parent component
63
+ * @see {@link DialogHeader} for header section
64
+ * @see {@link DialogFooter} for footer section
65
+ */
7
66
  declare const DialogContent: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
8
67
  fullWidth?: boolean;
9
68
  } & React.RefAttributes<HTMLDivElement>>;
69
+ /**
70
+ * Header section for dialog title and description.
71
+ *
72
+ * @see {@link DialogTitle} for the title element
73
+ * @see {@link DialogDescription} for the description element
74
+ */
10
75
  declare function DialogHeader({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
11
76
  declare namespace DialogHeader {
12
77
  var displayName: string;
13
78
  }
79
+ /**
80
+ * Footer section for dialog actions.
81
+ *
82
+ * @remarks
83
+ * Typically contains buttons for confirm/cancel actions.
84
+ * Uses flexbox with responsive layout.
85
+ */
14
86
  declare function DialogFooter({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
15
87
  declare namespace DialogFooter {
16
88
  var displayName: string;
17
89
  }
90
+ /**
91
+ * Title element for the dialog.
92
+ *
93
+ * @remarks
94
+ * Provides accessible naming for the dialog.
95
+ *
96
+ * @see {@link DialogHeader} for parent section
97
+ */
18
98
  declare const DialogTitle: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
99
+ /**
100
+ * Description text for the dialog.
101
+ *
102
+ * @remarks
103
+ * Provides accessible description for the dialog content.
104
+ *
105
+ * @see {@link DialogHeader} for parent section
106
+ */
19
107
  declare const DialogDescription: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
20
108
  export { Dialog, DialogPortal, DialogOverlay, DialogTrigger, DialogContent, DialogHeader, DialogFooter, DialogTitle, DialogDescription, };
21
109
  //# sourceMappingURL=dialog.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"dialog.d.ts","sourceRoot":"","sources":["../../ui/dialog.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,UAAU,CAAC;AACrD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AACH,iBAAS,YAAY,CAAC,EACrB,SAAS,EACT,GAAG,KAAK,EACR,EAAE,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,2CAUtC;kBAbQ,YAAY;;;AAgBrB;;;;;;GAMG;AACH,iBAAS,YAAY,CAAC,EACrB,SAAS,EACT,GAAG,KAAK,EACR,EAAE,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,2CAUtC;kBAbQ,YAAY;;;AAgBrB;;;;;;;GAOG;AACH,QAAA,MAAM,WAAW,oKAYf,CAAC;AAGH;;;;;;;GAOG;AACH,QAAA,MAAM,iBAAiB,8KASrB,CAAC;AAGH,OAAO,EACN,MAAM,EACN,YAAY,EACZ,aAAa,EACb,aAAa,EACb,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,iBAAiB,GACjB,CAAC"}
package/dist/ui/dialog.js CHANGED
@@ -3,23 +3,111 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import { Dialog as DialogPrimitive } from "radix-ui";
4
4
  import * as React from "react";
5
5
  import { cn } from "../utils/cn";
6
+ /**
7
+ * Root dialog component for modal overlays.
8
+ *
9
+ * @remarks
10
+ * Built on Radix UI Dialog primitive. Provides accessible modal dialogs
11
+ * with focus trapping and keyboard navigation.
12
+ *
13
+ * @example
14
+ * ```tsx
15
+ * <Dialog open={open} onOpenChange={setOpen}>
16
+ * <DialogTrigger asChild>
17
+ * <Button>Open Dialog</Button>
18
+ * </DialogTrigger>
19
+ * <DialogContent>
20
+ * <DialogHeader>
21
+ * <DialogTitle>Dialog Title</DialogTitle>
22
+ * <DialogDescription>Dialog description text.</DialogDescription>
23
+ * </DialogHeader>
24
+ * <p>Dialog content</p>
25
+ * <DialogFooter>
26
+ * <Button>Close</Button>
27
+ * </DialogFooter>
28
+ * </DialogContent>
29
+ * </Dialog>
30
+ * ```
31
+ *
32
+ * @see {@link DialogContent} for the dialog body
33
+ * @see {@link DialogTrigger} for the trigger button
34
+ */
6
35
  const Dialog = DialogPrimitive.Root;
36
+ /**
37
+ * Button or element that opens the dialog.
38
+ *
39
+ * @see {@link Dialog} for parent component
40
+ */
7
41
  const DialogTrigger = DialogPrimitive.Trigger;
42
+ /**
43
+ * Portal for rendering dialog outside the DOM hierarchy.
44
+ * @internal
45
+ */
8
46
  const DialogPortal = DialogPrimitive.Portal;
47
+ /**
48
+ * Semi-transparent overlay behind the dialog.
49
+ *
50
+ * @remarks
51
+ * Automatically included by DialogContent.
52
+ * Provides backdrop blur and click-outside-to-close behavior.
53
+ */
9
54
  const DialogOverlay = React.forwardRef(({ className, ...props }, ref) => (_jsx(DialogPrimitive.Overlay, { className: cn("data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/80 data-[state=closed]:animate-out data-[state=open]:animate-in", className), ref: ref, ...props })));
10
55
  DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
56
+ /**
57
+ * Main content container for the dialog.
58
+ *
59
+ * @remarks
60
+ * Centered modal with overlay, animations, and proper styling.
61
+ * Includes the DialogOverlay automatically.
62
+ *
63
+ * @param props - Content props including fullWidth option
64
+ * @returns A styled dialog content container
65
+ *
66
+ * @see {@link Dialog} for parent component
67
+ * @see {@link DialogHeader} for header section
68
+ * @see {@link DialogFooter} for footer section
69
+ */
11
70
  const DialogContent = React.forwardRef(({ className, children, fullWidth = false, ...props }, ref) => (_jsxs(DialogPortal, { children: [_jsx(DialogOverlay, {}), _jsx(DialogPrimitive.Content, { className: cn("data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] fixed top-[50%] left-[50%] z-50 grid w-full max-w-4xl translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=closed]:animate-out data-[state=open]:animate-in sm:rounded-lg", !fullWidth && "max-w-lg", className), ref: ref, ...props, children: children })] })));
12
71
  DialogContent.displayName = DialogPrimitive.Content.displayName;
72
+ /**
73
+ * Header section for dialog title and description.
74
+ *
75
+ * @see {@link DialogTitle} for the title element
76
+ * @see {@link DialogDescription} for the description element
77
+ */
13
78
  function DialogHeader({ className, ...props }) {
14
79
  return (_jsx("div", { className: cn("flex flex-col space-y-1.5 text-center sm:text-left", className), ...props }));
15
80
  }
16
81
  DialogHeader.displayName = "DialogHeader";
82
+ /**
83
+ * Footer section for dialog actions.
84
+ *
85
+ * @remarks
86
+ * Typically contains buttons for confirm/cancel actions.
87
+ * Uses flexbox with responsive layout.
88
+ */
17
89
  function DialogFooter({ className, ...props }) {
18
90
  return (_jsx("div", { className: cn("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", className), ...props }));
19
91
  }
20
92
  DialogFooter.displayName = "DialogFooter";
93
+ /**
94
+ * Title element for the dialog.
95
+ *
96
+ * @remarks
97
+ * Provides accessible naming for the dialog.
98
+ *
99
+ * @see {@link DialogHeader} for parent section
100
+ */
21
101
  const DialogTitle = React.forwardRef(({ className, ...props }, ref) => (_jsx(DialogPrimitive.Title, { className: cn("font-semibold text-lg leading-none tracking-tight", className), ref: ref, ...props })));
22
102
  DialogTitle.displayName = DialogPrimitive.Title.displayName;
103
+ /**
104
+ * Description text for the dialog.
105
+ *
106
+ * @remarks
107
+ * Provides accessible description for the dialog content.
108
+ *
109
+ * @see {@link DialogHeader} for parent section
110
+ */
23
111
  const DialogDescription = React.forwardRef(({ className, ...props }, ref) => (_jsx(DialogPrimitive.Description, { className: cn("text-muted-foreground text-sm", className), ref: ref, ...props })));
24
112
  DialogDescription.displayName = DialogPrimitive.Description.displayName;
25
113
  export { Dialog, DialogPortal, DialogOverlay, DialogTrigger, DialogContent, DialogHeader, DialogFooter, DialogTitle, DialogDescription, };
@@ -1 +1 @@
1
- {"version":3,"file":"dialog.js","sourceRoot":"","sources":["../../ui/dialog.tsx"],"names":[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 +1,99 @@
1
1
  import type * as React from "react";
2
2
  import { Drawer as DrawerPrimitive } from "vaul";
3
+ /**
4
+ * Root drawer component for slide-in panels.
5
+ *
6
+ * @remarks
7
+ * Built on the vaul library. Provides accessible slide-in panels
8
+ * from any direction (top, bottom, left, right).
9
+ *
10
+ * @example
11
+ * ```tsx
12
+ * <Drawer>
13
+ * <DrawerTrigger asChild>
14
+ * <Button>Open Drawer</Button>
15
+ * </DrawerTrigger>
16
+ * <DrawerContent>
17
+ * <DrawerHeader>
18
+ * <DrawerTitle>Drawer Title</DrawerTitle>
19
+ * <DrawerDescription>Drawer description.</DrawerDescription>
20
+ * </DrawerHeader>
21
+ * <p>Drawer content</p>
22
+ * <DrawerFooter>
23
+ * <DrawerClose asChild>
24
+ * <Button>Close</Button>
25
+ * </DrawerClose>
26
+ * </DrawerFooter>
27
+ * </DrawerContent>
28
+ * </Drawer>
29
+ * ```
30
+ *
31
+ * @see {@link DrawerContent} for the drawer body
32
+ * @see {@link DrawerTrigger} for the trigger button
33
+ */
3
34
  declare function Drawer({ ...props }: React.ComponentProps<typeof DrawerPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
35
+ /**
36
+ * Button or element that opens the drawer.
37
+ *
38
+ * @see {@link Drawer} for parent component
39
+ */
4
40
  declare function DrawerTrigger({ ...props }: React.ComponentProps<typeof DrawerPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
41
+ /**
42
+ * Portal for rendering drawer outside the DOM hierarchy.
43
+ * @internal
44
+ */
5
45
  declare function DrawerPortal({ ...props }: React.ComponentProps<typeof DrawerPrimitive.Portal>): import("react/jsx-runtime").JSX.Element;
46
+ /**
47
+ * Button that closes the drawer.
48
+ *
49
+ * @see {@link DrawerFooter} for typical placement
50
+ */
6
51
  declare function DrawerClose({ ...props }: React.ComponentProps<typeof DrawerPrimitive.Close>): import("react/jsx-runtime").JSX.Element;
52
+ /**
53
+ * Semi-transparent overlay behind the drawer.
54
+ *
55
+ * @remarks
56
+ * Automatically included by DrawerContent.
57
+ */
7
58
  declare function DrawerOverlay({ className, ...props }: React.ComponentProps<typeof DrawerPrimitive.Overlay>): import("react/jsx-runtime").JSX.Element;
59
+ /**
60
+ * Main content container for the drawer.
61
+ *
62
+ * @remarks
63
+ * Supports all four directions via the vaul direction prop.
64
+ * Includes a drag handle indicator for bottom drawers.
65
+ *
66
+ * @see {@link Drawer} for parent component
67
+ * @see {@link DrawerHeader} for header section
68
+ * @see {@link DrawerFooter} for footer section
69
+ */
8
70
  declare function DrawerContent({ className, children, ...props }: React.ComponentProps<typeof DrawerPrimitive.Content>): import("react/jsx-runtime").JSX.Element;
71
+ /**
72
+ * Header section for drawer title and description.
73
+ *
74
+ * @see {@link DrawerTitle} for the title element
75
+ * @see {@link DrawerDescription} for the description element
76
+ */
9
77
  declare function DrawerHeader({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
78
+ /**
79
+ * Footer section for drawer actions.
80
+ *
81
+ * @remarks
82
+ * Positioned at the bottom of the drawer.
83
+ * Typically contains buttons for actions.
84
+ */
10
85
  declare function DrawerFooter({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
86
+ /**
87
+ * Title element for the drawer.
88
+ *
89
+ * @see {@link DrawerHeader} for parent section
90
+ */
11
91
  declare function DrawerTitle({ className, ...props }: React.ComponentProps<typeof DrawerPrimitive.Title>): import("react/jsx-runtime").JSX.Element;
92
+ /**
93
+ * Description text for the drawer.
94
+ *
95
+ * @see {@link DrawerHeader} for parent section
96
+ */
12
97
  declare function DrawerDescription({ className, ...props }: React.ComponentProps<typeof DrawerPrimitive.Description>): import("react/jsx-runtime").JSX.Element;
13
98
  export { Drawer, DrawerPortal, DrawerOverlay, DrawerTrigger, DrawerClose, DrawerContent, DrawerHeader, DrawerFooter, DrawerTitle, DrawerDescription, };
14
99
  //# sourceMappingURL=drawer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"drawer.d.ts","sourceRoot":"","sources":["../../ui/dr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Ac,CAAC,OAAO,eAAe,CAAC,OAAO,CAAC,2CAqBtD;AAED;;;;;GAKG;AACH,iBAAS,YAAY,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,2CAWzE;AAED;;;;;;GAMG;AACH,iBAAS,YAAY,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,2CAQzE;AAED;;;;GAIG;AACH,iBAAS,WAAW,CAAC,EACpB,SAAS,EACT,GAAG,KAAK,EACR,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,KAAK,CAAC,2CAQpD;AAED;;;;GAIG;AACH,iBAAS,iBAAiB,CAAC,EAC1B,SAAS,EACT,GAAG,KAAK,EACR,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,WAAW,CAAC,2CAQ1D;AAED,OAAO,EACN,MAAM,EACN,YAAY,EACZ,aAAa,EACb,aAAa,EACb,WAAW,EACX,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,iBAAiB,GACjB,CAAC"}
package/dist/ui/drawer.js CHANGED
@@ -2,33 +2,118 @@
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import { Drawer as DrawerPrimitive } from "vaul";
4
4
  import { cn } from "../utils/cn";
5
+ /**
6
+ * Root drawer component for slide-in panels.
7
+ *
8
+ * @remarks
9
+ * Built on the vaul library. Provides accessible slide-in panels
10
+ * from any direction (top, bottom, left, right).
11
+ *
12
+ * @example
13
+ * ```tsx
14
+ * <Drawer>
15
+ * <DrawerTrigger asChild>
16
+ * <Button>Open Drawer</Button>
17
+ * </DrawerTrigger>
18
+ * <DrawerContent>
19
+ * <DrawerHeader>
20
+ * <DrawerTitle>Drawer Title</DrawerTitle>
21
+ * <DrawerDescription>Drawer description.</DrawerDescription>
22
+ * </DrawerHeader>
23
+ * <p>Drawer content</p>
24
+ * <DrawerFooter>
25
+ * <DrawerClose asChild>
26
+ * <Button>Close</Button>
27
+ * </DrawerClose>
28
+ * </DrawerFooter>
29
+ * </DrawerContent>
30
+ * </Drawer>
31
+ * ```
32
+ *
33
+ * @see {@link DrawerContent} for the drawer body
34
+ * @see {@link DrawerTrigger} for the trigger button
35
+ */
5
36
  function Drawer({ ...props }) {
6
37
  return _jsx(DrawerPrimitive.Root, { "data-slot": "drawer", ...props });
7
38
  }
39
+ /**
40
+ * Button or element that opens the drawer.
41
+ *
42
+ * @see {@link Drawer} for parent component
43
+ */
8
44
  function DrawerTrigger({ ...props }) {
9
45
  return _jsx(DrawerPrimitive.Trigger, { "data-slot": "drawer-trigger", ...props });
10
46
  }
47
+ /**
48
+ * Portal for rendering drawer outside the DOM hierarchy.
49
+ * @internal
50
+ */
11
51
  function DrawerPortal({ ...props }) {
12
52
  return _jsx(DrawerPrimitive.Portal, { "data-slot": "drawer-portal", ...props });
13
53
  }
54
+ /**
55
+ * Button that closes the drawer.
56
+ *
57
+ * @see {@link DrawerFooter} for typical placement
58
+ */
14
59
  function DrawerClose({ ...props }) {
15
60
  return _jsx(DrawerPrimitive.Close, { "data-slot": "drawer-close", ...props });
16
61
  }
62
+ /**
63
+ * Semi-transparent overlay behind the drawer.
64
+ *
65
+ * @remarks
66
+ * Automatically included by DrawerContent.
67
+ */
17
68
  function DrawerOverlay({ className, ...props }) {
18
69
  return (_jsx(DrawerPrimitive.Overlay, { className: cn("data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=open]:animate-in", className), "data-slot": "drawer-overlay", ...props }));
19
70
  }
71
+ /**
72
+ * Main content container for the drawer.
73
+ *
74
+ * @remarks
75
+ * Supports all four directions via the vaul direction prop.
76
+ * Includes a drag handle indicator for bottom drawers.
77
+ *
78
+ * @see {@link Drawer} for parent component
79
+ * @see {@link DrawerHeader} for header section
80
+ * @see {@link DrawerFooter} for footer section
81
+ */
20
82
  function DrawerContent({ className, children, ...props }) {
21
83
  return (_jsxs(DrawerPortal, { "data-slot": "drawer-portal", children: [_jsx(DrawerOverlay, {}), _jsxs(DrawerPrimitive.Content, { className: cn("group/drawer-content fixed z-50 flex h-auto flex-col bg-background", "data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=top]:rounded-b-lg data-[vaul-drawer-direction=top]:border-b", "data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[80vh] data-[vaul-drawer-direction=bottom]:rounded-t-lg data-[vaul-drawer-direction=bottom]:border-t", "data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=right]:border-l data-[vaul-drawer-direction=right]:sm:max-w-sm", "data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=left]:left-0 data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=left]:border-r data-[vaul-drawer-direction=left]:sm:max-w-sm", className), "data-slot": "drawer-content", ...props, children: [_jsx("div", { className: "mx-auto mt-4 hidden h-2 w-[100px] shrink-0 rounded-full bg-muted group-data-[vaul-drawer-direction=bottom]/drawer-content:block" }), children] })] }));
22
84
  }
85
+ /**
86
+ * Header section for drawer title and description.
87
+ *
88
+ * @see {@link DrawerTitle} for the title element
89
+ * @see {@link DrawerDescription} for the description element
90
+ */
23
91
  function DrawerHeader({ className, ...props }) {
24
92
  return (_jsx("div", { className: cn("flex flex-col gap-0.5 p-4 group-data-[vaul-drawer-direction=bottom]/drawer-content:text-center group-data-[vaul-drawer-direction=top]/drawer-content:text-center md:gap-1.5 md:text-left", className), "data-slot": "drawer-header", ...props }));
25
93
  }
94
+ /**
95
+ * Footer section for drawer actions.
96
+ *
97
+ * @remarks
98
+ * Positioned at the bottom of the drawer.
99
+ * Typically contains buttons for actions.
100
+ */
26
101
  function DrawerFooter({ className, ...props }) {
27
102
  return (_jsx("div", { className: cn("mt-auto flex flex-col gap-2 p-4", className), "data-slot": "drawer-footer", ...props }));
28
103
  }
104
+ /**
105
+ * Title element for the drawer.
106
+ *
107
+ * @see {@link DrawerHeader} for parent section
108
+ */
29
109
  function DrawerTitle({ className, ...props }) {
30
110
  return (_jsx(DrawerPrimitive.Title, { className: cn("font-semibold text-foreground", className), "data-slot": "drawer-title", ...props }));
31
111
  }
112
+ /**
113
+ * Description text for the drawer.
114
+ *
115
+ * @see {@link DrawerHeader} for parent section
116
+ */
32
117
  function DrawerDescription({ className, ...props }) {
33
118
  return (_jsx(DrawerPrimitive.Description, { className: cn("text-muted-foreground text-sm", className), "data-slot": "drawer-description", ...props }));
34
119
  }
@@ -1 +1 @@
1
- {"version":3,"file":"drawer.js","sourceRoot":"","sources":["../../ui/drawer.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAGb,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,MAAM,CAAC;AAEjD,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AAEjC,SAAS,MAAM,CAAC,EACf,GAAG,KAAK,EAC2C;IACnD,OAAO,KAAC,eAAe,CAAC,IAAI,iBAAW,QAAQ,KAAK,KAAK,GAAI,CAAC;AAC/D,CAAC;AAED,SAAS,aAAa,CAAC,EACtB,GAAG,KAAK,EAC8C;IACtD,OAAO,KAAC,eAAe,CAAC,OAAO,iBAAW,gBAAgB,KAAK,KAAK,GAAI,CAAC;AAC1E,CAAC;AAED,SAAS,YAAY,CAAC,EACrB,GAAG,KAAK,EAC6C;IACrD,OAAO,KAAC,eAAe,CAAC,MAAM,iBAAW,eAAe,KAAK,KAAK,GAAI,CAAC;AACxE,CAAC;AAED,SAAS,WAAW,CA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c,KACpB,KAAK,GACR,CACF,CAAC;AACH,CAAC;AAED;;;;GAIG;AACH,SAAS,iBAAiB,CAAC,EAC1B,SAAS,EACT,GAAG,KAAK,EACkD;IAC1D,OAAO,CACN,KAAC,eAAe,CAAC,WAAW,IAC3B,SAAS,EAAE,EAAE,CAAC,+BAA+B,EAAE,SAAS,CAAC,eAC/C,oBAAoB,KAC1B,KAAK,GACR,CACF,CAAC;AACH,CAAC;AAED,OAAO,EACN,MAAM,EACN,YAAY,EACZ,aAAa,EACb,aAAa,EACb,WAAW,EACX,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,iBAAiB,GACjB,CAAC"}
@@ -1,20 +1,108 @@
1
1
  import { DropdownMenu as DropdownMenuPrimitive } from "radix-ui";
2
2
  import * as React from "react";
3
+ /**
4
+ * Root dropdown menu component.
5
+ *
6
+ * @remarks
7
+ * Built on Radix UI DropdownMenu primitive. Provides accessible
8
+ * dropdown menus with keyboard navigation.
9
+ *
10
+ * @example
11
+ * ```tsx
12
+ * <DropdownMenu>
13
+ * <DropdownMenuTrigger asChild>
14
+ * <Button>Open Menu</Button>
15
+ * </DropdownMenuTrigger>
16
+ * <DropdownMenuContent>
17
+ * <DropdownMenuLabel>My Account</DropdownMenuLabel>
18
+ * <DropdownMenuSeparator />
19
+ * <DropdownMenuItem>Profile</DropdownMenuItem>
20
+ * <DropdownMenuItem>Settings</DropdownMenuItem>
21
+ * </DropdownMenuContent>
22
+ * </DropdownMenu>
23
+ * ```
24
+ *
25
+ * @see {@link DropdownMenuContent} for the menu body
26
+ * @see {@link DropdownMenuTrigger} for the trigger button
27
+ */
3
28
  declare const DropdownMenu: React.FC<DropdownMenuPrimitive.DropdownMenuProps>;
29
+ /**
30
+ * Button or element that opens the dropdown menu.
31
+ *
32
+ * @see {@link DropdownMenu} for parent component
33
+ */
4
34
  declare const DropdownMenuTrigger: React.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuTriggerProps & React.RefAttributes<HTMLButtonElement>>;
35
+ /**
36
+ * Group container for related menu items.
37
+ *
38
+ * @see {@link DropdownMenuItem} for items within the group
39
+ */
5
40
  declare const DropdownMenuGroup: React.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuGroupProps & React.RefAttributes<HTMLDivElement>>;
41
+ /**
42
+ * Portal for rendering menu outside the DOM hierarchy.
43
+ * @internal
44
+ */
6
45
  declare const DropdownMenuPortal: React.FC<DropdownMenuPrimitive.DropdownMenuPortalProps>;
46
+ /**
47
+ * Root for nested submenu.
48
+ *
49
+ * @see {@link DropdownMenuSubContent} for submenu content
50
+ */
7
51
  declare const DropdownMenuSub: React.FC<DropdownMenuPrimitive.DropdownMenuSubProps>;
52
+ /**
53
+ * Group for radio-style menu items.
54
+ */
8
55
  declare const DropdownMenuRadioGroup: React.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuRadioGroupProps & React.RefAttributes<HTMLDivElement>>;
56
+ /**
57
+ * Content container for nested submenu.
58
+ *
59
+ * @see {@link DropdownMenuSub} for parent component
60
+ */
9
61
  declare const DropdownMenuSubContent: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSubContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
62
+ /**
63
+ * Main content container for the dropdown menu.
64
+ *
65
+ * @remarks
66
+ * Contains menu items with proper animations and positioning.
67
+ *
68
+ * @see {@link DropdownMenu} for parent component
69
+ * @see {@link DropdownMenuItem} for menu items
70
+ */
10
71
  declare const DropdownMenuContent: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
72
+ /**
73
+ * Individual selectable item in the dropdown menu.
74
+ *
75
+ * @remarks
76
+ * Supports keyboard navigation and focus states.
77
+ *
78
+ * @see {@link DropdownMenuContent} for parent component
79
+ */
11
80
  declare const DropdownMenuItem: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
12
81
  inset?: boolean;
13
82
  } & React.RefAttributes<HTMLDivElement>>;
83
+ /**
84
+ * Non-interactive label for a menu section.
85
+ *
86
+ * @see {@link DropdownMenuContent} for parent component
87
+ */
14
88
  declare const DropdownMenuLabel: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuLabelProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
15
89
  inset?: boolean;
16
90
  } & React.RefAttributes<HTMLDivElement>>;
91
+ /**
92
+ * Visual separator between menu sections.
93
+ */
17
94
  declare const DropdownMenuSeparator: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
95
+ /**
96
+ * Keyboard shortcut hint for a menu item.
97
+ *
98
+ * @example
99
+ * ```tsx
100
+ * <DropdownMenuItem>
101
+ * Save
102
+ * <DropdownMenuShortcut>⌘S</DropdownMenuShortcut>
103
+ * </DropdownMenuItem>
104
+ * ```
105
+ */
18
106
  declare function DropdownMenuShortcut({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>): import("react/jsx-runtime").JSX.Element;
19
107
  declare namespace DropdownMenuShortcut {
20
108
  var displayName: string;
@@ -1 +1 @@
1
- {"version":3,"file":"dropdown-menu.d.ts","sourceRoot":"","sources":["../../ui/dropdown-menu.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,IAAI,qBAAqB,EAAE,MAAM,UAAU,CAAC;AACjE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,QAAA,MAAM,YAAY,mDAA6B,CAAC;AAEhD,QAAA,MAAM,mBAAmB,0HAAgC,CAAC;AAE1D,QAAA,MAAM,iBAAiB,qHAA8B,CAAC;AAEtD,QAAA,MAAM,kBAAkB,yDAA+B,CAAC;AAExD,QAAA,MAAM,eAAe,sDAA4B,CAAC;AAEl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