@behivetech/atoms.modal 0.2.2 → 0.2.4
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 +2 -12
- package/docs.json +1 -1
- package/package.json +6 -4
package/README.md
CHANGED
|
@@ -6,6 +6,8 @@ for focus trapping, Escape-to-close, and outside-click-to-close. It has no
|
|
|
6
6
|
opinion on what goes inside the panel — an optional `title` renders a header
|
|
7
7
|
with a close button, otherwise just the `children` are shown.
|
|
8
8
|
|
|
9
|
+
Docs: https://bht-galaxy.vercel.app/behivetech/atoms/modal
|
|
10
|
+
|
|
9
11
|
For a panel that docks to an edge of the viewport instead — optionally
|
|
10
12
|
non-blocking — use `@behivetech/atoms.drawer`.
|
|
11
13
|
|
|
@@ -18,15 +20,3 @@ import { Modal } from "@behivetech/atoms.modal";
|
|
|
18
20
|
<div>Dialog content</div>
|
|
19
21
|
</Modal>;
|
|
20
22
|
```
|
|
21
|
-
|
|
22
|
-
## Props
|
|
23
|
-
|
|
24
|
-
| Prop | Type | Default | Description |
|
|
25
|
-
| -------------- | ---------------------------- | ------- | ------------------------------------------------------------------------------------------- |
|
|
26
|
-
| `onClose` | `() => void` | — | Called when the modal is dismissed (backdrop click, Escape, or the close button) — required |
|
|
27
|
-
| `title` | `string` | — | Optional header title; omit to render no header and no close button |
|
|
28
|
-
| `icon` | `ReactNode` | — | Optional icon rendered before the title; ignored if `title` is omitted |
|
|
29
|
-
| `padding` | `none \| sm \| md \| lg` | `none` | Internal padding of the panel body — same values as `Card`'s `padding` prop |
|
|
30
|
-
| `headingLevel` | `1 \| 2 \| 3 \| 4 \| 5 \| 6` | `3` | Which heading tag wraps `title` — same values as `Card`'s `headingLevel` prop |
|
|
31
|
-
| `children` | `ReactNode` | — | Dialog content |
|
|
32
|
-
| `className` | `string` | — | Additional class names |
|
package/docs.json
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@behivetech/atoms.modal",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.4",
|
|
4
4
|
"license": "MIT",
|
|
5
|
+
"description": "A `Card` centered in the viewport with a dimmed backdrop that blocks interaction with the rest of the page, built on [Radix `Dialog`](https://www.radix-ui.com/primitives/docs/components/dialog) for focus trapping, Escape-to-close, and outside-click-to-close. It has no opinion on what goes inside the panel — an optional `title` renders a header with a close button, otherwise just the `children` are shown.",
|
|
5
6
|
"type": "module",
|
|
6
7
|
"private": false,
|
|
7
8
|
"exports": {
|
|
@@ -27,9 +28,9 @@
|
|
|
27
28
|
},
|
|
28
29
|
"dependencies": {
|
|
29
30
|
"@radix-ui/react-dialog": "^1.1.23",
|
|
30
|
-
"@behivetech/atoms.button": "0.4.
|
|
31
|
-
"@behivetech/atoms.card": "0.4.
|
|
32
|
-
"@behivetech/atoms.icon": "0.3.
|
|
31
|
+
"@behivetech/atoms.button": "0.4.4",
|
|
32
|
+
"@behivetech/atoms.card": "0.4.4",
|
|
33
|
+
"@behivetech/atoms.icon": "0.3.4"
|
|
33
34
|
},
|
|
34
35
|
"peerDependencies": {
|
|
35
36
|
"react": "^19.2.7",
|
|
@@ -50,6 +51,7 @@
|
|
|
50
51
|
"url": "https://github.com/behivetech/bht-galaxy.git",
|
|
51
52
|
"directory": "registry/behivetech/atoms/modal"
|
|
52
53
|
},
|
|
54
|
+
"homepage": "https://bht-galaxy.vercel.app/behivetech/atoms/modal",
|
|
53
55
|
"publishConfig": {
|
|
54
56
|
"registry": "https://registry.npmjs.org",
|
|
55
57
|
"access": "public",
|