@unofficialbox/box-open-elements-react 0.8.0 → 0.9.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.
Files changed (2) hide show
  1. package/README.md +8 -7
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -11,15 +11,16 @@ The core package stays framework-agnostic. This adapter is a thin layer that:
11
11
  Callbacks an adapter **declares** receive the **native** DOM event, not a React
12
12
  `SyntheticEvent`. They are registered with `addEventListener` on the custom
13
13
  element so the listener travels with it: React delegates from its root
14
- container, and `box-drawer` moves its subtree to `document.body` when it opens,
15
- which is enough to make a delegated handler silently stop firing. `Button`
16
- declares its own `onClick`, typed as `(event: MouseEvent) => void`, for exactly
17
- that reason.
14
+ container, so a node relocated out of that container silently stops receiving
15
+ delegated handlers. `Button` declares its own `onClick`, typed as
16
+ `(event: MouseEvent) => void`, for exactly that reason.
18
17
 
19
18
  Props an adapter does not declare — including React's `onClick` on `Select`,
20
19
  `TextField` and `Dialog` — are forwarded as ordinary host props and stay
21
- delegated, so they do not fire inside an open drawer. That is React's delegation
22
- model rather than these components': a plain `<div onClick>` behaves the same.
20
+ delegated. That is fine unless something moves the node out of the React root,
21
+ and it is React's delegation model rather than these components': a plain
22
+ `<div onClick>` in a relocated subtree behaves the same. (`box-drawer` used to
23
+ relocate its subtree and no longer does — it uses the top layer.)
23
24
 
24
25
  See [`docs/integration/react.md`](../../docs/integration/react.md) for the React
25
26
  boundary and the [framework adapter tracker](../../docs/integration/framework-adapters.md)
@@ -76,7 +77,7 @@ Angular, Vue, and Svelte adapters under `adapters-vX.Y.Z`, at the core's version
76
77
  | Dependency | Contract |
77
78
  | --- | --- |
78
79
  | React / React DOM | `^19.0.0` |
79
- | `@unofficialbox/box-open-elements` | `^0.8.0` |
80
+ | `@unofficialbox/box-open-elements` | `^0.9.0` |
80
81
  | Node.js for SSR | `>=20.9.0` |
81
82
  | Next.js validation host | `16.2.12` |
82
83
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unofficialbox/box-open-elements-react",
3
- "version": "0.8.0",
3
+ "version": "0.9.0",
4
4
  "description": "Optional React wrappers for box-open-elements Web Components. Thin adapters — core stays framework-agnostic.",
5
5
  "license": "MIT",
6
6
  "homepage": "https://unofficialbox.github.io/box-open-elements",
@@ -37,7 +37,7 @@
37
37
  "node": ">=20.9.0"
38
38
  },
39
39
  "peerDependencies": {
40
- "@unofficialbox/box-open-elements": "^0.8.0",
40
+ "@unofficialbox/box-open-elements": "^0.9.0",
41
41
  "react": "^19.0.0",
42
42
  "react-dom": "^19.0.0"
43
43
  },