@purpurds/modal 3.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/LICENSE.txt +478 -0
- package/dist/modal-content.d.ts +69 -0
- package/dist/modal-content.d.ts.map +1 -0
- package/dist/modal-trigger.d.ts +8 -0
- package/dist/modal-trigger.d.ts.map +1 -0
- package/dist/modal.cjs.js +66 -0
- package/dist/modal.cjs.js.map +1 -0
- package/dist/modal.d.ts +22 -0
- package/dist/modal.d.ts.map +1 -0
- package/dist/modal.es.js +2144 -0
- package/dist/modal.es.js.map +1 -0
- package/dist/modal.system.js +66 -0
- package/dist/modal.system.js.map +1 -0
- package/dist/styles.css +1 -0
- package/package.json +66 -0
- package/readme.mdx +81 -0
- package/src/global.d.ts +4 -0
- package/src/modal-content.module.scss +251 -0
- package/src/modal-content.stories.tsx +120 -0
- package/src/modal-content.test.tsx +141 -0
- package/src/modal-content.tsx +304 -0
- package/src/modal-trigger.tsx +27 -0
- package/src/modal.stories.tsx +124 -0
- package/src/modal.test.tsx +74 -0
- package/src/modal.tsx +36 -0
package/dist/modal.d.ts
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React, { ReactElement } from "react";
|
|
2
|
+
import { ModalContent } from "./modal-content";
|
|
3
|
+
import { ModalTrigger } from "./modal-trigger";
|
|
4
|
+
export type ModalProps = {
|
|
5
|
+
["data-testid"]?: string;
|
|
6
|
+
children: Array<ReactElement<typeof ModalTrigger | typeof ModalContent>>;
|
|
7
|
+
/**
|
|
8
|
+
* Event handler called when the open state of the dialog changes.
|
|
9
|
+
* */
|
|
10
|
+
onOpenChange?: (value: boolean) => void;
|
|
11
|
+
/**
|
|
12
|
+
* The controlled open state of the dialog. Must be used in conjunction with `onOpenChange`.
|
|
13
|
+
* */
|
|
14
|
+
open?: boolean;
|
|
15
|
+
};
|
|
16
|
+
export declare const Modal: {
|
|
17
|
+
({ ["data-testid"]: dataTestId, children, open, onOpenChange, }: ModalProps): React.JSX.Element;
|
|
18
|
+
Trigger: React.ForwardRefExoticComponent<import("./modal-trigger").ModalTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
19
|
+
Content: React.ForwardRefExoticComponent<import("./modal-content").ModalContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
20
|
+
displayName: string;
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=modal.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"modal.d.ts","sourceRoot":"","sources":["../src/modal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAG5C,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,MAAM,MAAM,UAAU,GAAG;IACvB,CAAC,aAAa,CAAC,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,EAAE,KAAK,CAAC,YAAY,CAAC,OAAO,YAAY,GAAG,OAAO,YAAY,CAAC,CAAC,CAAC;IACzE;;SAEK;IACL,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IACxC;;SAEK;IACL,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB,CAAC;AAEF,eAAO,MAAM,KAAK;qEAKf,UAAU;;;;CAMZ,CAAC"}
|