react-motion-modal 1.2.9 → 1.3.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/README.md CHANGED
@@ -31,6 +31,8 @@ or with yarn:
31
31
  yarn add react-motion-modal motion zustand
32
32
  ```
33
33
 
34
+ `react` and `react-dom` are expected to already exist in your app.
35
+
34
36
  ## 🚀 Usage
35
37
 
36
38
  ### 1. Import styles
@@ -86,9 +88,9 @@ export const App = () => {
86
88
  ### 4. Open modal anywhere
87
89
 
88
90
  ```tsx
89
- import { MODAL_POSITIONS, useModal } from 'react-motion-modal';
91
+ import { MODAL_POSITIONS, modalStore } from 'react-motion-modal';
90
92
 
91
- const { openModal } = useModal();
93
+ const { openModal } = modalStore();
92
94
 
93
95
  openModal('ConfirmModal', {
94
96
  title: 'Are you sure you want to delete?',
package/dist/index.d.ts CHANGED
@@ -202,6 +202,18 @@ declare type BaseModalParams = {
202
202
  blur?: boolean;
203
203
  };
204
204
 
205
+ export declare const MODAL_BODY_ANIMATION_VISIBLE: TargetAndTransition;
206
+
207
+ export declare const MODAL_ENTER_TRANSITION: {
208
+ duration: number;
209
+ ease: "easeOut";
210
+ };
211
+
212
+ export declare const MODAL_EXIT_TRANSITION: {
213
+ duration: number;
214
+ ease: "easeIn";
215
+ };
216
+
205
217
  export declare const MODAL_POSITIONS: {
206
218
  TOP: string;
207
219
  TOP_LEFT: string;
@@ -217,6 +229,8 @@ export declare const MODAL_POSITIONS: {
217
229
  BOTTOM_CENTER: string;
218
230
  };
219
231
 
232
+ export declare const MODAL_Z_INDEX = 1000;
233
+
220
234
  /**
221
235
  * Actions that can be performed on the modal system.
222
236
  * These are the functions available to control modal behavior.
@@ -404,6 +418,8 @@ declare type ModalState = {
404
418
  active?: ActiveModal;
405
419
  };
406
420
 
421
+ export declare const modalStore: UseBoundStore<StoreApi<ModalState & ModalAction>>;
422
+
407
423
  /**
408
424
  * Combines the modal-specific parameters from ModalDefinition with the base modal parameters.
409
425
  * This represents the complete set of props that a modal component will receive.
@@ -423,6 +439,4 @@ declare type Props = {
423
439
  initialParams?: Partial<BaseModalParams>;
424
440
  };
425
441
 
426
- export declare const useModal: UseBoundStore<StoreApi<ModalState & ModalAction>>;
427
-
428
442
  export { }