@trackunit/react-drawer 1.7.110 → 1.7.113
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/index.cjs.js
CHANGED
|
@@ -193,7 +193,7 @@ const NOOP$1 = () => void 0;
|
|
|
193
193
|
* @param {DrawerProps} props - The props for the Drawer component
|
|
194
194
|
*/
|
|
195
195
|
const Drawer = ({ open = false, // Default to closed
|
|
196
|
-
onClose = NOOP$1, onOpen = NOOP$1, hasOverlay = true, position = DEFAULT_POSITION, children, dataTestId, className, renderInPortal = false, keepMountedWhenClosed = false, containerClassName, ref, ...others }) => {
|
|
196
|
+
onClose = NOOP$1, onOpen = NOOP$1, hasOverlay = true, position = DEFAULT_POSITION, children, "data-testid": dataTestId, className, renderInPortal = false, keepMountedWhenClosed = false, containerClassName, ref, ...others }) => {
|
|
197
197
|
const { isSm } = reactComponents.useViewportBreakpoints();
|
|
198
198
|
const shouldUsePortal = !isSm || renderInPortal;
|
|
199
199
|
const [shouldRender, setShouldRender] = react.useState(open);
|
package/index.esm.js
CHANGED
|
@@ -191,7 +191,7 @@ const NOOP$1 = () => void 0;
|
|
|
191
191
|
* @param {DrawerProps} props - The props for the Drawer component
|
|
192
192
|
*/
|
|
193
193
|
const Drawer = ({ open = false, // Default to closed
|
|
194
|
-
onClose = NOOP$1, onOpen = NOOP$1, hasOverlay = true, position = DEFAULT_POSITION, children, dataTestId, className, renderInPortal = false, keepMountedWhenClosed = false, containerClassName, ref, ...others }) => {
|
|
194
|
+
onClose = NOOP$1, onOpen = NOOP$1, hasOverlay = true, position = DEFAULT_POSITION, children, "data-testid": dataTestId, className, renderInPortal = false, keepMountedWhenClosed = false, containerClassName, ref, ...others }) => {
|
|
195
195
|
const { isSm } = useViewportBreakpoints();
|
|
196
196
|
const shouldUsePortal = !isSm || renderInPortal;
|
|
197
197
|
const [shouldRender, setShouldRender] = useState(open);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trackunit/react-drawer",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.113",
|
|
4
4
|
"repository": "https://github.com/Trackunit/manager",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"engines": {
|
|
@@ -9,10 +9,10 @@
|
|
|
9
9
|
"dependencies": {
|
|
10
10
|
"react": "19.0.0",
|
|
11
11
|
"react-swipeable": "^7.0.1",
|
|
12
|
-
"@trackunit/react-components": "1.10.
|
|
13
|
-
"@trackunit/css-class-variance-utilities": "1.7.
|
|
14
|
-
"@trackunit/ui-icons": "1.7.
|
|
15
|
-
"@trackunit/i18n-library-translation": "1.7.
|
|
12
|
+
"@trackunit/react-components": "1.10.52",
|
|
13
|
+
"@trackunit/css-class-variance-utilities": "1.7.77",
|
|
14
|
+
"@trackunit/ui-icons": "1.7.78",
|
|
15
|
+
"@trackunit/i18n-library-translation": "1.7.95"
|
|
16
16
|
},
|
|
17
17
|
"module": "./index.esm.js",
|
|
18
18
|
"main": "./index.cjs.js",
|
|
@@ -63,6 +63,6 @@ export interface DrawerProps extends CommonProps {
|
|
|
63
63
|
* @param {DrawerProps} props - The props for the Drawer component
|
|
64
64
|
*/
|
|
65
65
|
export declare const Drawer: {
|
|
66
|
-
({ open, onClose, onOpen, hasOverlay, position, children, dataTestId, className, renderInPortal, keepMountedWhenClosed, containerClassName, ref, ...others }: DrawerProps): import("react/jsx-runtime").JSX.Element | null;
|
|
66
|
+
({ open, onClose, onOpen, hasOverlay, position, children, "data-testid": dataTestId, className, renderInPortal, keepMountedWhenClosed, containerClassName, ref, ...others }: DrawerProps): import("react/jsx-runtime").JSX.Element | null;
|
|
67
67
|
displayName: string;
|
|
68
68
|
};
|
|
@@ -6,7 +6,7 @@ type Story = StoryObj<typeof Drawer | typeof SwipeableDrawer>;
|
|
|
6
6
|
declare const meta: {
|
|
7
7
|
title: string;
|
|
8
8
|
component: {
|
|
9
|
-
({ open, onClose, onOpen, hasOverlay, position, children, dataTestId, className, renderInPortal, keepMountedWhenClosed, containerClassName, ref, ...others }: DrawerProps): import("react/jsx-runtime").JSX.Element | null;
|
|
9
|
+
({ open, onClose, onOpen, hasOverlay, position, children, "data-testid": dataTestId, className, renderInPortal, keepMountedWhenClosed, containerClassName, ref, ...others }: DrawerProps): import("react/jsx-runtime").JSX.Element | null;
|
|
10
10
|
displayName: string;
|
|
11
11
|
};
|
|
12
12
|
tags: string[];
|