vxui-react 1.2.7 → 1.2.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +19 -19
- package/dist/index.js +601 -577
- package/dist/src/components/Dialog.d.ts +10 -2
- package/dist/src/components/__tests__/AppShell.test.d.ts +1 -0
- package/dist/src/components/__tests__/Shell.test.d.ts +1 -0
- package/dist/src/lib/index.d.ts +2 -1
- package/dist/vxui-react.css +1 -1
- package/package.json +1 -1
|
@@ -2,6 +2,7 @@ import { ReactNode } from 'react';
|
|
|
2
2
|
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
3
3
|
export type DialogSize = 'sm' | 'md' | 'lg' | 'xl' | 'full';
|
|
4
4
|
export type DialogPadding = 'none' | 'sm' | 'md' | 'lg';
|
|
5
|
+
export type DialogPlacement = 'center' | 'top' | 'right' | 'bottom' | 'left' | 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right' | 'top-half' | 'right-half' | 'bottom-half' | 'left-half';
|
|
5
6
|
export interface DialogProps extends Pick<DialogPrimitive.DialogProps, 'defaultOpen' | 'onOpenChange' | 'open'> {
|
|
6
7
|
trigger: ReactNode;
|
|
7
8
|
title: string;
|
|
@@ -13,9 +14,16 @@ export interface DialogProps extends Pick<DialogPrimitive.DialogProps, 'defaultO
|
|
|
13
14
|
size?: DialogSize;
|
|
14
15
|
/** Inner padding preset. Default: 'md' */
|
|
15
16
|
padding?: DialogPadding;
|
|
16
|
-
/**
|
|
17
|
+
/** Dialog placement preset. Default: 'center' */
|
|
18
|
+
placement?: DialogPlacement;
|
|
19
|
+
/** Allow the body to scroll when content overflows. Default: true */
|
|
17
20
|
scrollable?: boolean;
|
|
18
21
|
/** Show the close (×) button. Default: true */
|
|
19
22
|
closable?: boolean;
|
|
20
23
|
}
|
|
21
|
-
export declare function Dialog({ trigger, title, description, children, footer, className, size, padding, scrollable, closable, ...props }: DialogProps): import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
export declare function Dialog({ trigger, title, description, children, footer, className, size, padding, placement, scrollable, closable, ...props }: DialogProps): import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
/**
|
|
26
|
+
* Wraps any child element so that clicking it closes the parent Dialog.
|
|
27
|
+
* Usage: <DialogClose asChild><Button>Cancel</Button></DialogClose>
|
|
28
|
+
*/
|
|
29
|
+
export declare const DialogClose: import('react').ForwardRefExoticComponent<DialogPrimitive.DialogCloseProps & import('react').RefAttributes<HTMLButtonElement>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/src/lib/index.d.ts
CHANGED
|
@@ -9,7 +9,8 @@ export type { ShellProps, ShellSidebarProps, ShellNavProps, ShellNavSectionProps
|
|
|
9
9
|
export { Badge } from '../components/Badge';
|
|
10
10
|
export { Button } from '../components/Button';
|
|
11
11
|
export { Card, CardContent, CardDescription, CardHeader, CardTitle } from '../components/Card';
|
|
12
|
-
export { Dialog } from '../components/Dialog';
|
|
12
|
+
export { Dialog, DialogClose } from '../components/Dialog';
|
|
13
|
+
export type { DialogProps, DialogSize, DialogPadding, DialogPlacement } from '../components/Dialog';
|
|
13
14
|
export { Input } from '../components/Input';
|
|
14
15
|
export { Switch } from '../components/Switch';
|
|
15
16
|
export { Tabs, TabsContent, TabsList, TabsTrigger } from '../components/Tabs';
|