react-motion-modal 1.2.3 → 1.2.5
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/CHANGELOG.md +18 -5
- package/dist/index.d.ts +23 -0
- package/dist/index.js +2165 -4810
- package/package.json +4 -5
package/CHANGELOG.md
CHANGED
|
@@ -7,15 +7,28 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
## [1.2.5] - 2026-05-30
|
|
11
11
|
|
|
12
|
-
###
|
|
12
|
+
### Fixed
|
|
13
|
+
- Removed Tailwind CSS injection from the distributed library build.
|
|
14
|
+
- Moved Tailwind CSS import to the example app only.
|
|
15
|
+
- Replaced internal modal layout Tailwind classes with inline styles to avoid overriding consumer app utilities.
|
|
13
16
|
|
|
14
|
-
|
|
17
|
+
## [1.2.4] - 2025-05-30
|
|
15
18
|
|
|
16
|
-
###
|
|
19
|
+
### Changed
|
|
20
|
+
- Split `modal.type.ts` into separate files for better maintainability
|
|
21
|
+
- `base-modal-params.type.ts` – base modal parameter types
|
|
22
|
+
- `modal-components.type.ts` – modal component and config types
|
|
23
|
+
- `modal-state.type.ts` – modal state and action types
|
|
24
|
+
- `modal.type.ts` now re-exports all types (backward compatible)
|
|
25
|
+
- Bumped dependencies (motion, zustand, vite, tailwindcss, biome, playwright, etc.)
|
|
26
|
+
|
|
27
|
+
## [1.2.3] - 2025-05-30
|
|
17
28
|
|
|
18
29
|
### Fixed
|
|
30
|
+
- Fixed `ModalParams` type to correctly extend `ModalDefinition[T]` with `closeModal`
|
|
31
|
+
- Dependency updates for stability
|
|
19
32
|
|
|
20
33
|
## [1.2.2] - 2025-11-21
|
|
21
34
|
|
|
@@ -57,4 +70,4 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
57
70
|
|
|
58
71
|
## [Previous Versions]
|
|
59
72
|
|
|
60
|
-
For versions prior to 1.1.7, please refer to the git commit history.
|
|
73
|
+
For versions prior to 1.1.7, please refer to the git commit history.
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
1
2
|
import { ReactElement } from 'react';
|
|
2
3
|
import { ReactPortal } from 'react';
|
|
3
4
|
import { StoreApi } from 'zustand/vanilla';
|
|
@@ -33,6 +34,10 @@ declare type ActiveModal = {
|
|
|
33
34
|
params?: Params<ModalName>;
|
|
34
35
|
};
|
|
35
36
|
|
|
37
|
+
/**
|
|
38
|
+
* Base parameters available for all modals.
|
|
39
|
+
* These parameters control modal behavior, styling, and animation.
|
|
40
|
+
*/
|
|
36
41
|
declare type BaseModalParams = {
|
|
37
42
|
/**
|
|
38
43
|
* Function to close the modal programmatically.
|
|
@@ -64,6 +69,11 @@ declare type BaseModalParams = {
|
|
|
64
69
|
* Useful for custom styling or responsive behavior.
|
|
65
70
|
*/
|
|
66
71
|
className?: string;
|
|
72
|
+
/**
|
|
73
|
+
* Inline styles to merge after the default backdrop styles.
|
|
74
|
+
* Useful when consumers need deterministic overrides without relying on global CSS order.
|
|
75
|
+
*/
|
|
76
|
+
style?: CSSProperties;
|
|
67
77
|
};
|
|
68
78
|
/**
|
|
69
79
|
* Styling options for the modal content/body.
|
|
@@ -75,6 +85,11 @@ declare type BaseModalParams = {
|
|
|
75
85
|
* Useful for custom styling, sizing, or positioning of modal content.
|
|
76
86
|
*/
|
|
77
87
|
className?: string;
|
|
88
|
+
/**
|
|
89
|
+
* Inline styles to merge after the default body styles.
|
|
90
|
+
* Useful for overriding default padding, sizing, or positioning.
|
|
91
|
+
*/
|
|
92
|
+
style?: CSSProperties;
|
|
78
93
|
};
|
|
79
94
|
/**
|
|
80
95
|
* Framer Motion animation settings for modal entrance and exit animations.
|
|
@@ -186,8 +201,16 @@ declare type BaseModalParams = {
|
|
|
186
201
|
|
|
187
202
|
export declare const MODAL_POSITIONS: {
|
|
188
203
|
TOP: string;
|
|
204
|
+
TOP_LEFT: string;
|
|
205
|
+
TOP_CENTER: string;
|
|
206
|
+
TOP_RIGHT: string;
|
|
207
|
+
CENTER_LEFT: string;
|
|
189
208
|
CENTER: string;
|
|
209
|
+
CENTER_RIGHT: string;
|
|
190
210
|
BOTTOM: string;
|
|
211
|
+
BOTTOM_LEFT: string;
|
|
212
|
+
BOTTOM_CENTER: string;
|
|
213
|
+
BOTTOM_RIGHT: string;
|
|
191
214
|
};
|
|
192
215
|
|
|
193
216
|
/**
|