@trackunit/react-modal 1.8.53 → 1.8.54
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/package.json +7 -7
- package/src/modal/Modal.stories.d.ts +95 -12
- package/src/modal/ModalBody/ModalBody.stories.d.ts +30 -5
- package/src/modal/ModalFooter/ModalFooter.stories.d.ts +47 -6
- package/src/modal/ModalHeader/ModalHeader.d.ts +1 -2
- package/src/modal/ModalHeader/ModalHeader.stories.d.ts +23 -6
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trackunit/react-modal",
|
|
3
|
-
"version": "1.8.
|
|
3
|
+
"version": "1.8.54",
|
|
4
4
|
"repository": "https://github.com/Trackunit/manager",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"engines": {
|
|
@@ -8,14 +8,14 @@
|
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {
|
|
10
10
|
"react": "19.0.0",
|
|
11
|
-
"@trackunit/react-components": "1.9.
|
|
12
|
-
"@trackunit/react-core-hooks": "1.7.
|
|
13
|
-
"@trackunit/css-class-variance-utilities": "1.7.
|
|
14
|
-
"@trackunit/i18n-library-translation": "1.7.
|
|
15
|
-
"@trackunit/react-test-setup": "1.4.
|
|
11
|
+
"@trackunit/react-components": "1.9.54",
|
|
12
|
+
"@trackunit/react-core-hooks": "1.7.44",
|
|
13
|
+
"@trackunit/css-class-variance-utilities": "1.7.38",
|
|
14
|
+
"@trackunit/i18n-library-translation": "1.7.45",
|
|
15
|
+
"@trackunit/react-test-setup": "1.4.38",
|
|
16
16
|
"@floating-ui/react": "^0.26.25",
|
|
17
17
|
"@floating-ui/react-dom": "2.1.2",
|
|
18
|
-
"@trackunit/ui-design-tokens": "1.7.
|
|
18
|
+
"@trackunit/ui-design-tokens": "1.7.38"
|
|
19
19
|
},
|
|
20
20
|
"module": "./index.esm.js",
|
|
21
21
|
"main": "./index.cjs.js",
|
|
@@ -1,13 +1,96 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { ReactElement } from "react";
|
|
2
|
+
declare const meta: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: {
|
|
5
|
+
<TOnCloseFnArgs extends import("./useModal").BaseUseModalActionArgs = [], TOnOpenFnArgs extends import("./useModal").BaseUseModalActionArgs = []>({ children, isOpen, role, dataTestId, className, containerClassName, onBackdropClick, floatingUi, ref, }: import("./Modal").ModalProps<TOnCloseFnArgs, TOnOpenFnArgs>): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
displayName: string;
|
|
7
|
+
};
|
|
8
|
+
tags: string[];
|
|
9
|
+
parameters: {
|
|
10
|
+
docs: {
|
|
11
|
+
source: {
|
|
12
|
+
type: string;
|
|
13
|
+
excludeDecorators: boolean;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
argTypes: {
|
|
18
|
+
floatingUi: {
|
|
19
|
+
table: {
|
|
20
|
+
disable: true;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
closeOnOutsideClick: {
|
|
24
|
+
table: {
|
|
25
|
+
category: string;
|
|
26
|
+
defaultValue: {
|
|
27
|
+
summary: string;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
ref: {
|
|
32
|
+
table: {
|
|
33
|
+
category: string;
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
onBackdropClick: {
|
|
37
|
+
table: {
|
|
38
|
+
category: string;
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
open: {
|
|
42
|
+
table: {
|
|
43
|
+
category: string;
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
close: {
|
|
47
|
+
table: {
|
|
48
|
+
category: string;
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
toggle: {
|
|
52
|
+
table: {
|
|
53
|
+
category: string;
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
isOpen: {
|
|
57
|
+
description: string;
|
|
58
|
+
table: {
|
|
59
|
+
category: string;
|
|
60
|
+
defaultValue: {
|
|
61
|
+
summary: string;
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
};
|
|
65
|
+
};
|
|
66
|
+
};
|
|
5
67
|
export default meta;
|
|
6
|
-
export declare const
|
|
7
|
-
export declare const Default:
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
export declare const
|
|
12
|
-
|
|
13
|
-
|
|
68
|
+
export declare const PackageName: () => ReactElement;
|
|
69
|
+
export declare const Default: {
|
|
70
|
+
render: () => import("react/jsx-runtime").JSX.Element;
|
|
71
|
+
args: {};
|
|
72
|
+
};
|
|
73
|
+
export declare const IncorrectUsageErrorModal: {
|
|
74
|
+
render: () => import("react/jsx-runtime").JSX.Element;
|
|
75
|
+
args: {};
|
|
76
|
+
};
|
|
77
|
+
export declare const CorrectUsagePrimaryAction: {
|
|
78
|
+
render: () => import("react/jsx-runtime").JSX.Element;
|
|
79
|
+
args: {};
|
|
80
|
+
};
|
|
81
|
+
export declare const IncorrectUsageLongText: {
|
|
82
|
+
render: () => import("react/jsx-runtime").JSX.Element;
|
|
83
|
+
args: {};
|
|
84
|
+
};
|
|
85
|
+
export declare const CorrectUsageImportantAction: {
|
|
86
|
+
render: () => import("react/jsx-runtime").JSX.Element;
|
|
87
|
+
args: {};
|
|
88
|
+
};
|
|
89
|
+
export declare const CorrectAccessibility: {
|
|
90
|
+
render: () => import("react/jsx-runtime").JSX.Element;
|
|
91
|
+
args: {};
|
|
92
|
+
};
|
|
93
|
+
export declare const CorrectStateManagement: {
|
|
94
|
+
render: () => import("react/jsx-runtime").JSX.Element;
|
|
95
|
+
args: {};
|
|
96
|
+
};
|
|
@@ -1,8 +1,33 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
type Story =
|
|
4
|
-
declare const meta:
|
|
1
|
+
import { StoryObjWithOptionalArgs } from "@trackunit/shared-utils";
|
|
2
|
+
import { ReactElement } from "react";
|
|
3
|
+
type Story = StoryObjWithOptionalArgs<typeof meta, "children">;
|
|
4
|
+
declare const meta: {
|
|
5
|
+
title: string;
|
|
6
|
+
component: import("react").ForwardRefExoticComponent<import("./ModalBody").ModalBodyProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
7
|
+
tags: string[];
|
|
8
|
+
parameters: {
|
|
9
|
+
docs: {
|
|
10
|
+
source: {
|
|
11
|
+
type: string;
|
|
12
|
+
excludeDecorators: boolean;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
argTypes: {
|
|
17
|
+
children: {
|
|
18
|
+
control: false;
|
|
19
|
+
};
|
|
20
|
+
className: {
|
|
21
|
+
control: "text";
|
|
22
|
+
description: string;
|
|
23
|
+
};
|
|
24
|
+
dataTestId: {
|
|
25
|
+
control: "text";
|
|
26
|
+
description: string;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
};
|
|
5
30
|
export default meta;
|
|
6
|
-
export declare const
|
|
31
|
+
export declare const PackageName: () => ReactElement;
|
|
7
32
|
export declare const Default: Story;
|
|
8
33
|
export declare const InContextWithinModal: Story;
|
|
@@ -1,9 +1,50 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
type Story = StoryObj<typeof
|
|
4
|
-
declare const meta:
|
|
1
|
+
import { StoryObj } from "@storybook/react-webpack5";
|
|
2
|
+
import { ReactElement } from "react";
|
|
3
|
+
type Story = StoryObj<typeof meta>;
|
|
4
|
+
declare const meta: {
|
|
5
|
+
title: string;
|
|
6
|
+
component: import("react").ForwardRefExoticComponent<import("./ModalFooter").ModalFooterProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
7
|
+
tags: string[];
|
|
8
|
+
parameters: {
|
|
9
|
+
docs: {
|
|
10
|
+
source: {
|
|
11
|
+
type: string;
|
|
12
|
+
excludeDecorators: boolean;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
argTypes: {
|
|
17
|
+
onCancel: {
|
|
18
|
+
action: string;
|
|
19
|
+
};
|
|
20
|
+
primaryAction: {
|
|
21
|
+
action: string;
|
|
22
|
+
};
|
|
23
|
+
secondaryAction: {
|
|
24
|
+
action: string;
|
|
25
|
+
};
|
|
26
|
+
primaryVariant: {
|
|
27
|
+
control: {
|
|
28
|
+
type: "select";
|
|
29
|
+
};
|
|
30
|
+
options: string[];
|
|
31
|
+
};
|
|
32
|
+
secondaryVariant: {
|
|
33
|
+
control: {
|
|
34
|
+
type: "select";
|
|
35
|
+
};
|
|
36
|
+
options: string[];
|
|
37
|
+
};
|
|
38
|
+
primaryLoading: {
|
|
39
|
+
control: "boolean";
|
|
40
|
+
};
|
|
41
|
+
secondaryLoading: {
|
|
42
|
+
control: "boolean";
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
};
|
|
5
46
|
export default meta;
|
|
6
|
-
export declare const
|
|
47
|
+
export declare const PackageName: () => ReactElement;
|
|
7
48
|
export declare const Default: Story;
|
|
8
49
|
export declare const WithSecondaryAction: Story;
|
|
9
50
|
export declare const PrimaryDanger: Story;
|
|
@@ -11,4 +52,4 @@ export declare const LoadingPrimary: Story;
|
|
|
11
52
|
export declare const OnlyCancel: Story;
|
|
12
53
|
export declare const SecondaryDanger: Story;
|
|
13
54
|
export declare const LoadingSecondary: Story;
|
|
14
|
-
export declare const InContextWithinModal: () =>
|
|
55
|
+
export declare const InContextWithinModal: () => ReactElement;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CommonProps } from "@trackunit/react-components";
|
|
2
|
-
interface ModalHeaderProps extends CommonProps {
|
|
2
|
+
export interface ModalHeaderProps extends CommonProps {
|
|
3
3
|
/**
|
|
4
4
|
* Main title displayed in the modal header.
|
|
5
5
|
*/
|
|
@@ -27,4 +27,3 @@ interface ModalHeaderProps extends CommonProps {
|
|
|
27
27
|
* @returns {ReactElement} The modal header element.
|
|
28
28
|
*/
|
|
29
29
|
export declare const ModalHeader: import("react").ForwardRefExoticComponent<ModalHeaderProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
30
|
-
export {};
|
|
@@ -1,10 +1,27 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
type Story = StoryObj<typeof
|
|
4
|
-
declare const meta:
|
|
1
|
+
import { StoryObj } from "@storybook/react-webpack5";
|
|
2
|
+
import { ReactElement } from "react";
|
|
3
|
+
type Story = StoryObj<typeof meta>;
|
|
4
|
+
declare const meta: {
|
|
5
|
+
title: string;
|
|
6
|
+
component: import("react").ForwardRefExoticComponent<import("./ModalHeader").ModalHeaderProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
7
|
+
tags: string[];
|
|
8
|
+
parameters: {
|
|
9
|
+
docs: {
|
|
10
|
+
source: {
|
|
11
|
+
type: string;
|
|
12
|
+
excludeDecorators: boolean;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
argTypes: {
|
|
17
|
+
onClose: {
|
|
18
|
+
action: string;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
};
|
|
5
22
|
export default meta;
|
|
6
|
-
export declare const
|
|
23
|
+
export declare const PackageName: () => ReactElement;
|
|
7
24
|
export declare const Default: Story;
|
|
8
25
|
export declare const WithSubHeading: Story;
|
|
9
26
|
export declare const LongHeadings: Story;
|
|
10
|
-
export declare const InContextWithinModal: () =>
|
|
27
|
+
export declare const InContextWithinModal: () => ReactElement;
|