@stenajs-webui/modal 20.6.11 → 20.7.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.
package/dist/common-types.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
export
|
|
1
|
+
export type SlideFrom = SlideFromLeftRight | SlideFromTopBottom;
|
|
2
|
+
export type SlideFromLeftRight = "left" | "right";
|
|
3
|
+
export type SlideFromTopBottom = "top" | "bottom";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import ReactModal from "react-modal";
|
|
3
3
|
import { SlideFromLeftRight, SlideFromTopBottom } from "../../common-types";
|
|
4
|
-
export
|
|
4
|
+
export type DrawerProps = DrawerBaseLeftRight | DrawerBaseTopBottom;
|
|
5
5
|
interface DrawerBaseLeftRight extends DrawerBaseProps {
|
|
6
6
|
width?: string;
|
|
7
7
|
/**
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
export
|
|
1
|
+
export type ShowCommand<TProps, TPromiseResolve> = keyof TProps extends never ? () => Promise<TPromiseResolve | undefined> : (props: TProps) => Promise<TPromiseResolve | undefined>;
|
|
2
|
+
export type ResolveCommand<TPromiseResolve> = (resolveValue: TPromiseResolve) => void;
|
|
3
|
+
export type RejectCommand = (error?: Error) => void;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React, { CSSProperties, ReactNode, RefObject } from "react";
|
|
2
2
|
import { RejectCommand, ShowCommand } from "./DialogCommands";
|
|
3
|
-
|
|
3
|
+
type UseDialogCallbacks<TProps, TPromiseResolve> = {
|
|
4
4
|
show: ShowCommand<TProps, TPromiseResolve>;
|
|
5
5
|
reject: RejectCommand;
|
|
6
6
|
};
|
|
7
|
-
export
|
|
7
|
+
export type UseDialogResult<TProps, TPromiseResolve> = [
|
|
8
8
|
ReactNode,
|
|
9
9
|
UseDialogCallbacks<TProps, TPromiseResolve>
|
|
10
10
|
];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stenajs-webui/modal",
|
|
3
|
-
"version": "20.
|
|
3
|
+
"version": "20.7.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "",
|
|
6
6
|
"author": "mattias800",
|
|
@@ -33,9 +33,9 @@
|
|
|
33
33
|
"deploy": "gh-pages -d example/build"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@stenajs-webui/core": "20.
|
|
37
|
-
"@stenajs-webui/elements": "20.
|
|
38
|
-
"@stenajs-webui/theme": "20.
|
|
36
|
+
"@stenajs-webui/core": "20.7.0",
|
|
37
|
+
"@stenajs-webui/elements": "20.7.0",
|
|
38
|
+
"@stenajs-webui/theme": "20.7.0",
|
|
39
39
|
"@types/react-modal": "^3.13.1",
|
|
40
40
|
"classnames": "^2.3.1",
|
|
41
41
|
"react-draggable": "^4.4.5",
|
|
@@ -65,5 +65,5 @@
|
|
|
65
65
|
"files": [
|
|
66
66
|
"dist"
|
|
67
67
|
],
|
|
68
|
-
"gitHead": "
|
|
68
|
+
"gitHead": "8dc9fe226a0ae212caa675f867b9d9bce3bbb7e6"
|
|
69
69
|
}
|