@stenajs-webui/elements 19.0.4 → 20.0.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/components/ui/icon/CircledIcon.d.ts +1 -1
- package/dist/index.d.ts +0 -5
- package/dist/index.es.js +1669 -1815
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +7 -7
- package/dist/index.js.map +1 -1
- package/package.json +11 -4
- package/dist/components/ui/dialog/DialogCommands.d.ts +0 -3
- package/dist/components/ui/dialog/DialogContext.d.ts +0 -7
- package/dist/components/ui/dialog/UseDialog.d.ts +0 -23
- package/dist/components/ui/dialog/UseDialogPromise.d.ts +0 -2
- package/dist/components/ui/dialog/alert/UseAlertDialog.d.ts +0 -3
- package/dist/components/ui/dialog/drawer/UseDrawerDialog.d.ts +0 -9
- package/dist/components/ui/dialog/modal/UseModalDialog.d.ts +0 -3
package/package.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stenajs-webui/elements",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "20.0.0",
|
|
4
|
+
"type": "module",
|
|
4
5
|
"description": "",
|
|
5
6
|
"author": "mattias800",
|
|
6
7
|
"license": "MIT",
|
|
@@ -12,6 +13,11 @@
|
|
|
12
13
|
"types": "dist/index.d.ts",
|
|
13
14
|
"module": "dist/index.es.js",
|
|
14
15
|
"jsnext:main": "dist/index.es.js",
|
|
16
|
+
"exports": {
|
|
17
|
+
"require": "dist/index.js",
|
|
18
|
+
"import": "dist/index.es.js",
|
|
19
|
+
"types": "dist/index.d.ts"
|
|
20
|
+
},
|
|
15
21
|
"sideEffects": false,
|
|
16
22
|
"engines": {
|
|
17
23
|
"node": ">=8",
|
|
@@ -20,6 +26,7 @@
|
|
|
20
26
|
"scripts": {
|
|
21
27
|
"build": "yarn tsc -p tsconfig.build.json && yarn vite build",
|
|
22
28
|
"start": "yarn tsc -p tsconfig.build.json && yarn vite build --watch",
|
|
29
|
+
"test": "vitest run --passWithNoTests",
|
|
23
30
|
"clean": "rimraf dist",
|
|
24
31
|
"prepare": "yarn clean && yarn run build",
|
|
25
32
|
"predeploy": "cd example && yarn install && yarn run build",
|
|
@@ -27,8 +34,8 @@
|
|
|
27
34
|
},
|
|
28
35
|
"dependencies": {
|
|
29
36
|
"@react-aria/focus": "^3.15.0",
|
|
30
|
-
"@stenajs-webui/core": "
|
|
31
|
-
"@stenajs-webui/theme": "
|
|
37
|
+
"@stenajs-webui/core": "20.0.0",
|
|
38
|
+
"@stenajs-webui/theme": "20.0.0",
|
|
32
39
|
"classnames": "^2.3.1"
|
|
33
40
|
},
|
|
34
41
|
"peerDependencies": {
|
|
@@ -61,5 +68,5 @@
|
|
|
61
68
|
"files": [
|
|
62
69
|
"dist"
|
|
63
70
|
],
|
|
64
|
-
"gitHead": "
|
|
71
|
+
"gitHead": "44209c859186d3264a3bd136fac61c622b51d01d"
|
|
65
72
|
}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
export declare type ShowCommand<TProps, TPromiseResolve> = keyof TProps extends never ? () => Promise<TPromiseResolve | undefined> : (props: TProps) => Promise<TPromiseResolve | undefined>;
|
|
2
|
-
export declare type ResolveCommand<TPromiseResolve> = (resolveValue: TPromiseResolve) => void;
|
|
3
|
-
export declare type RejectCommand = (error?: Error) => void;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { RejectCommand, ResolveCommand } from "./DialogCommands";
|
|
3
|
-
export interface DialogContextValue<TResolveValue> {
|
|
4
|
-
resolve: ResolveCommand<TResolveValue>;
|
|
5
|
-
reject: RejectCommand;
|
|
6
|
-
}
|
|
7
|
-
export declare const DialogContext: import("react").Context<DialogContextValue<any> | undefined>;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import React, { CSSProperties, ReactNode, RefObject } from "react";
|
|
2
|
-
import { RejectCommand, ShowCommand } from "./DialogCommands";
|
|
3
|
-
declare type UseDialogCallbacks<TProps, TPromiseResolve> = {
|
|
4
|
-
show: ShowCommand<TProps, TPromiseResolve>;
|
|
5
|
-
reject: RejectCommand;
|
|
6
|
-
};
|
|
7
|
-
export declare type UseDialogResult<TProps, TPromiseResolve> = [
|
|
8
|
-
ReactNode,
|
|
9
|
-
UseDialogCallbacks<TProps, TPromiseResolve>
|
|
10
|
-
];
|
|
11
|
-
export interface DialogOptions {
|
|
12
|
-
disableCloseOnClickOutside?: boolean;
|
|
13
|
-
modal: boolean;
|
|
14
|
-
className: string;
|
|
15
|
-
closingClassName: string;
|
|
16
|
-
contentWrapperClassName: string;
|
|
17
|
-
dialogStyle?: CSSProperties;
|
|
18
|
-
ref?: RefObject<HTMLDialogElement>;
|
|
19
|
-
onResolve?: () => void;
|
|
20
|
-
onReject?: () => void;
|
|
21
|
-
}
|
|
22
|
-
export declare function useDialog<TProps, TPromiseResolve = void>(component: React.FC<TProps>, options: DialogOptions): UseDialogResult<TProps, TPromiseResolve>;
|
|
23
|
-
export {};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { DialogOptions, UseDialogResult } from "../UseDialog";
|
|
3
|
-
export declare type SlideFrom = SlideFromLeftRight | SlideFromTopBottom;
|
|
4
|
-
export declare type SlideFromLeftRight = "left" | "right";
|
|
5
|
-
export declare type SlideFromTopBottom = "top" | "bottom";
|
|
6
|
-
interface DrawerOptions extends Partial<Omit<DialogOptions, "disableCloseOnClickOutside">> {
|
|
7
|
-
}
|
|
8
|
-
export declare function useDrawerDialog<TProps, TPromiseResolve = void>(component: React.FC<TProps>, slideFrom?: SlideFrom, options?: DrawerOptions): UseDialogResult<TProps, TPromiseResolve>;
|
|
9
|
-
export {};
|