Skip to content

Commit 9d1800a

Browse files
Release Version 1.0
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent c4c8696 commit 9d1800a

13 files changed

+53
-65
lines changed

.changeset/clean-buttons-jog.md

Lines changed: 0 additions & 9 deletions
This file was deleted.

.changeset/cool-islands-own.md

Lines changed: 0 additions & 8 deletions
This file was deleted.

.changeset/dull-taxis-attend.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

.changeset/good-bugs-hear.md

Lines changed: 0 additions & 9 deletions
This file was deleted.

.changeset/lazy-gorillas-whisper.md

Lines changed: 0 additions & 8 deletions
This file was deleted.

.changeset/pretty-wombats-switch.md

Lines changed: 0 additions & 7 deletions
This file was deleted.

.changeset/rare-carpets-change.md

Lines changed: 0 additions & 7 deletions
This file was deleted.

.changeset/tricky-singers-act.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

.changeset/warm-moles-share.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

apps/demo/CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# demo
2+
3+
## 0.1.4
4+
5+
### Patch Changes
6+
7+
- [`713aabc`](https://github.com/DaviDevMod/focus-trap/commit/713aabc0fb781068a559cf287105f1d0c5e10f1f) Thanks [@DaviDevMod](https://github.com/DaviDevMod)! - Fix "change" handlers for `<Switch>` components in TrapControls.tsx
8+
9+
They were using a potentially out of date state.
10+
In the process some typings have changed.
11+
12+
- Updated dependencies [[`2c17880`](https://github.com/DaviDevMod/focus-trap/commit/2c17880cdb4364afeec490a0f1ec39c49eaf54df), [`d95f7df`](https://github.com/DaviDevMod/focus-trap/commit/d95f7df5e2547a7b5ca4fe906e8c153f8e224c5f), [`c4c8696`](https://github.com/DaviDevMod/focus-trap/commit/c4c8696048e275be74c4d95c2cc16f54a8da5b6a), [`fd6cf73`](https://github.com/DaviDevMod/focus-trap/commit/fd6cf73d6cad7b31f8bd73dfabde63473c061022), [`2c5bd1c`](https://github.com/DaviDevMod/focus-trap/commit/2c5bd1c2ae4b7cf8a242f064d0da1555085c8b5a), [`0d154e8`](https://github.com/DaviDevMod/focus-trap/commit/0d154e84db7648a99ff395c739ca39f1a8e0343e), [`0d90cba`](https://github.com/DaviDevMod/focus-trap/commit/0d90cba8dcb7e3a7f73a8d1376950886ec7dfb35), [`79b0e44`](https://github.com/DaviDevMod/focus-trap/commit/79b0e4421c2846396a8d3cd49c37407007751211)]:
13+
- @davidevmod/focus-trap@1.0.0

apps/demo/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "demo",
3-
"version": "0.1.3",
3+
"version": "0.1.4",
44
"private": true,
55
"scripts": {
66
"dev": "next dev",

packages/focus-trap/CHANGELOG.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# @davidevmod/focus-trap
2+
3+
## 1.0.0
4+
5+
### Major Changes
6+
7+
- [`c4c8696`](https://github.com/DaviDevMod/focus-trap/commit/c4c8696048e275be74c4d95c2cc16f54a8da5b6a) Thanks [@DaviDevMod](https://github.com/DaviDevMod)! - Bump to v1.0
8+
9+
### Patch Changes
10+
11+
- [`2c17880`](https://github.com/DaviDevMod/focus-trap/commit/2c17880cdb4364afeec490a0f1ec39c49eaf54df) Thanks [@DaviDevMod](https://github.com/DaviDevMod)! - Remove possibility to provide `escape` as a function.
12+
13+
It is unnecessary, as the user of the library can easily listen for `Esc` key presses by themselves.
14+
15+
As a side note, the implementation of the previous behaviour was buggy.
16+
17+
- [`d95f7df`](https://github.com/DaviDevMod/focus-trap/commit/d95f7df5e2547a7b5ca4fe906e8c153f8e224c5f) Thanks [@DaviDevMod](https://github.com/DaviDevMod)! - Fix logic to "normalise" `returnFocus` in normalise.ts
18+
19+
The default `document.activeElement` was not given in case `returnFocus` was `undefined` or a string not corresponding to any ID in the DOM.
20+
It was given only when `returnFocus === true`.
21+
22+
- [`fd6cf73`](https://github.com/DaviDevMod/focus-trap/commit/fd6cf73d6cad7b31f8bd73dfabde63473c061022) Thanks [@DaviDevMod](https://github.com/DaviDevMod)! - Fix algorithm to find a destination for the focus.
23+
24+
When (during in the context of a <kbd>Tab</kbd> key press happening) `event.target` has a tab index of zero, the library should switch from looking for the next zero tabbable to look for a positive tabbable whenever `event.target` **is** or **precedes/follows** the **first/last zero tabbable in the whole focus trap**.
25+
26+
Before the fix, the switch in search would have happened only if `event.target` **was contained in** or **preceded/followed** the **first/last root in the focus-trap**.
27+
28+
- [`2c5bd1c`](https://github.com/DaviDevMod/focus-trap/commit/2c5bd1c2ae4b7cf8a242f064d0da1555085c8b5a) Thanks [@DaviDevMod](https://github.com/DaviDevMod)! - Remove custom type annotation for `Array.prototype.findLast`.
29+
30+
It is now buit-in since TypeScript v5.0 (https://github.com/microsoft/TypeScript/issues/48829#issuecomment-1442649966).
31+
32+
- [`0d154e8`](https://github.com/DaviDevMod/focus-trap/commit/0d154e84db7648a99ff395c739ca39f1a8e0343e) Thanks [@DaviDevMod](https://github.com/DaviDevMod)! - Fix `demolish` logic in trap-actions.ts
33+
34+
`state.isBuilt` was set to `false` before calling `pause` and the focus trap was therefore left up and running (while an error would be thrown, saying _"Cannot pause inexistent trap"_ ).
35+
36+
- [`0d90cba`](https://github.com/DaviDevMod/focus-trap/commit/0d90cba8dcb7e3a7f73a8d1376950886ec7dfb35) Thanks [@DaviDevMod](https://github.com/DaviDevMod)! - Export types
37+
38+
- [`79b0e44`](https://github.com/DaviDevMod/focus-trap/commit/79b0e4421c2846396a8d3cd49c37407007751211) Thanks [@DaviDevMod](https://github.com/DaviDevMod)! - Fix inefficient code in destination.ts

packages/focus-trap/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@davidevmod/focus-trap",
3-
"version": "0.0.1",
3+
"version": "1.0.0",
44
"license": "MIT",
55
"repository": "https://github.com/DaviDevMod/focus-trap/tree/main/packages/focus-trap",
66
"type": "module",

0 commit comments

Comments
 (0)