base-vaul 0.0.1 → 0.0.2
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.d.mts +8 -7
- package/dist/index.d.ts +8 -7
- package/dist/index.js +322 -355
- package/dist/index.mjs +259 -265
- package/package.json +27 -22
- package/style.css +254 -0
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as _base_ui_react from '@base-ui/react';
|
|
2
2
|
import { Dialog } from '@base-ui/react';
|
|
3
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
4
|
import React from 'react';
|
|
4
5
|
|
|
5
6
|
type BaseUIMouseEvent = React.MouseEvent<HTMLDivElement> & {
|
|
@@ -83,7 +84,7 @@ type DialogProps = {
|
|
|
83
84
|
* Direction of the drawer. Can be `top` or `bottom`, `left`, `right`.
|
|
84
85
|
* @default 'bottom'
|
|
85
86
|
*/
|
|
86
|
-
direction?:
|
|
87
|
+
direction?: "top" | "bottom" | "left" | "right";
|
|
87
88
|
/**
|
|
88
89
|
* Opened by default, skips initial enter animation. Still reacts to `open` state changes
|
|
89
90
|
* @default false
|
|
@@ -116,19 +117,19 @@ type DialogProps = {
|
|
|
116
117
|
preventScrollRestoration?: boolean;
|
|
117
118
|
autoFocus?: boolean;
|
|
118
119
|
} & (WithFadeFromProps | WithoutFadeFromProps);
|
|
119
|
-
declare function Root({ open: openProp, onOpenChange, children, onDrag: onDragProp, onRelease: onReleaseProp, snapPoints, shouldScaleBackground, setBackgroundColorOnScale, closeThreshold, scrollLockTimeout, dismissible, handleOnly, fadeFromIndex, activeSnapPoint: activeSnapPointProp, setActiveSnapPoint: setActiveSnapPointProp, fixed, modal, onClose, nested, noBodyStyles, direction, defaultOpen, disablePreventScroll, snapToSequentialPoint, preventScrollRestoration, repositionInputs, onAnimationEnd, container, autoFocus, }: DialogProps):
|
|
120
|
+
declare function Root({ open: openProp, onOpenChange, children, onDrag: onDragProp, onRelease: onReleaseProp, snapPoints, shouldScaleBackground, setBackgroundColorOnScale, closeThreshold, scrollLockTimeout, dismissible, handleOnly, fadeFromIndex, activeSnapPoint: activeSnapPointProp, setActiveSnapPoint: setActiveSnapPointProp, fixed, modal, onClose, nested, noBodyStyles, direction, defaultOpen, disablePreventScroll, snapToSequentialPoint, preventScrollRestoration, repositionInputs, onAnimationEnd, container, autoFocus, }: DialogProps): react_jsx_runtime.JSX.Element;
|
|
120
121
|
declare const Overlay: React.ForwardRefExoticComponent<Omit<_base_ui_react.DialogBackdropProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
121
122
|
type ContentProps = React.ComponentPropsWithoutRef<typeof Dialog.Popup>;
|
|
122
123
|
declare const Content: React.ForwardRefExoticComponent<Omit<_base_ui_react.DialogPopupProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
123
|
-
type HandleProps = React.ComponentPropsWithoutRef<
|
|
124
|
+
type HandleProps = React.ComponentPropsWithoutRef<"div"> & {
|
|
124
125
|
preventCycle?: boolean;
|
|
125
126
|
};
|
|
126
127
|
declare const Handle: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
127
|
-
preventCycle?: boolean
|
|
128
|
+
preventCycle?: boolean;
|
|
128
129
|
} & React.RefAttributes<HTMLDivElement>>;
|
|
129
|
-
declare function NestedRoot({ onDrag, onOpenChange, open: nestedIsOpen, ...rest }: DialogProps):
|
|
130
|
+
declare function NestedRoot({ onDrag, onOpenChange, open: nestedIsOpen, ...rest }: DialogProps): react_jsx_runtime.JSX.Element;
|
|
130
131
|
type PortalProps = React.ComponentPropsWithoutRef<typeof Dialog.Portal>;
|
|
131
|
-
declare function Portal(props: PortalProps):
|
|
132
|
+
declare function Portal(props: PortalProps): react_jsx_runtime.JSX.Element;
|
|
132
133
|
declare const Drawer: {
|
|
133
134
|
Root: typeof Root;
|
|
134
135
|
NestedRoot: typeof NestedRoot;
|
|
@@ -137,7 +138,7 @@ declare const Drawer: {
|
|
|
137
138
|
Trigger: Dialog.Trigger;
|
|
138
139
|
Portal: typeof Portal;
|
|
139
140
|
Handle: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
140
|
-
preventCycle?: boolean
|
|
141
|
+
preventCycle?: boolean;
|
|
141
142
|
} & React.RefAttributes<HTMLDivElement>>;
|
|
142
143
|
Close: React.ForwardRefExoticComponent<_base_ui_react.DialogCloseProps & React.RefAttributes<HTMLButtonElement>>;
|
|
143
144
|
Title: React.ForwardRefExoticComponent<_base_ui_react.DialogTitleProps & React.RefAttributes<HTMLParagraphElement>>;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as _base_ui_react from '@base-ui/react';
|
|
2
2
|
import { Dialog } from '@base-ui/react';
|
|
3
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
4
|
import React from 'react';
|
|
4
5
|
|
|
5
6
|
type BaseUIMouseEvent = React.MouseEvent<HTMLDivElement> & {
|
|
@@ -83,7 +84,7 @@ type DialogProps = {
|
|
|
83
84
|
* Direction of the drawer. Can be `top` or `bottom`, `left`, `right`.
|
|
84
85
|
* @default 'bottom'
|
|
85
86
|
*/
|
|
86
|
-
direction?:
|
|
87
|
+
direction?: "top" | "bottom" | "left" | "right";
|
|
87
88
|
/**
|
|
88
89
|
* Opened by default, skips initial enter animation. Still reacts to `open` state changes
|
|
89
90
|
* @default false
|
|
@@ -116,19 +117,19 @@ type DialogProps = {
|
|
|
116
117
|
preventScrollRestoration?: boolean;
|
|
117
118
|
autoFocus?: boolean;
|
|
118
119
|
} & (WithFadeFromProps | WithoutFadeFromProps);
|
|
119
|
-
declare function Root({ open: openProp, onOpenChange, children, onDrag: onDragProp, onRelease: onReleaseProp, snapPoints, shouldScaleBackground, setBackgroundColorOnScale, closeThreshold, scrollLockTimeout, dismissible, handleOnly, fadeFromIndex, activeSnapPoint: activeSnapPointProp, setActiveSnapPoint: setActiveSnapPointProp, fixed, modal, onClose, nested, noBodyStyles, direction, defaultOpen, disablePreventScroll, snapToSequentialPoint, preventScrollRestoration, repositionInputs, onAnimationEnd, container, autoFocus, }: DialogProps):
|
|
120
|
+
declare function Root({ open: openProp, onOpenChange, children, onDrag: onDragProp, onRelease: onReleaseProp, snapPoints, shouldScaleBackground, setBackgroundColorOnScale, closeThreshold, scrollLockTimeout, dismissible, handleOnly, fadeFromIndex, activeSnapPoint: activeSnapPointProp, setActiveSnapPoint: setActiveSnapPointProp, fixed, modal, onClose, nested, noBodyStyles, direction, defaultOpen, disablePreventScroll, snapToSequentialPoint, preventScrollRestoration, repositionInputs, onAnimationEnd, container, autoFocus, }: DialogProps): react_jsx_runtime.JSX.Element;
|
|
120
121
|
declare const Overlay: React.ForwardRefExoticComponent<Omit<_base_ui_react.DialogBackdropProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
121
122
|
type ContentProps = React.ComponentPropsWithoutRef<typeof Dialog.Popup>;
|
|
122
123
|
declare const Content: React.ForwardRefExoticComponent<Omit<_base_ui_react.DialogPopupProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
123
|
-
type HandleProps = React.ComponentPropsWithoutRef<
|
|
124
|
+
type HandleProps = React.ComponentPropsWithoutRef<"div"> & {
|
|
124
125
|
preventCycle?: boolean;
|
|
125
126
|
};
|
|
126
127
|
declare const Handle: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
127
|
-
preventCycle?: boolean
|
|
128
|
+
preventCycle?: boolean;
|
|
128
129
|
} & React.RefAttributes<HTMLDivElement>>;
|
|
129
|
-
declare function NestedRoot({ onDrag, onOpenChange, open: nestedIsOpen, ...rest }: DialogProps):
|
|
130
|
+
declare function NestedRoot({ onDrag, onOpenChange, open: nestedIsOpen, ...rest }: DialogProps): react_jsx_runtime.JSX.Element;
|
|
130
131
|
type PortalProps = React.ComponentPropsWithoutRef<typeof Dialog.Portal>;
|
|
131
|
-
declare function Portal(props: PortalProps):
|
|
132
|
+
declare function Portal(props: PortalProps): react_jsx_runtime.JSX.Element;
|
|
132
133
|
declare const Drawer: {
|
|
133
134
|
Root: typeof Root;
|
|
134
135
|
NestedRoot: typeof NestedRoot;
|
|
@@ -137,7 +138,7 @@ declare const Drawer: {
|
|
|
137
138
|
Trigger: Dialog.Trigger;
|
|
138
139
|
Portal: typeof Portal;
|
|
139
140
|
Handle: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
140
|
-
preventCycle?: boolean
|
|
141
|
+
preventCycle?: boolean;
|
|
141
142
|
} & React.RefAttributes<HTMLDivElement>>;
|
|
142
143
|
Close: React.ForwardRefExoticComponent<_base_ui_react.DialogCloseProps & React.RefAttributes<HTMLButtonElement>>;
|
|
143
144
|
Title: React.ForwardRefExoticComponent<_base_ui_react.DialogTitleProps & React.RefAttributes<HTMLParagraphElement>>;
|