@ariakit/react 0.4.23 → 0.4.24
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/CHANGELOG.md +58 -0
- package/package.json +31 -27
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,63 @@
|
|
|
1
1
|
# @ariakit/react
|
|
2
2
|
|
|
3
|
+
## 0.4.24
|
|
4
|
+
|
|
5
|
+
This release improves React combobox and form reliability, including preserved combobox input and popover scroll position during result updates, more predictable focus behavior after filtering selects on iOS Safari, proper isolation of [`FormRadio`](https://ariakit.org/reference/form-radio) groups inside nested composite widgets, safer handling of explicitly undefined [`id`](https://ariakit.org/reference/select-item#id) props, and better generic typing for [`CheckboxProvider`](https://ariakit.org/reference/checkbox-provider) wrappers.
|
|
6
|
+
|
|
7
|
+
### Improved `CheckboxProvider` generic typing
|
|
8
|
+
|
|
9
|
+
This fixes TypeScript errors when wrapping [`CheckboxProvider`](https://ariakit.org/reference/checkbox-provider) in generic React components. Controlled and uncontrolled checkbox group wrappers now type-check correctly without requiring non-null assertions on values such as `defaultValue`.
|
|
10
|
+
|
|
11
|
+
Before, generic wrappers often needed a non-null assertion to satisfy the provider props:
|
|
12
|
+
|
|
13
|
+
```tsx {15}
|
|
14
|
+
interface CheckboxCardGridProps<T extends string | number> extends Pick<
|
|
15
|
+
Ariakit.CheckboxProviderProps<T>,
|
|
16
|
+
"value" | "setValue" | "defaultValue"
|
|
17
|
+
> {}
|
|
18
|
+
|
|
19
|
+
function CheckboxCardGrid<T extends string | number>({
|
|
20
|
+
value,
|
|
21
|
+
setValue,
|
|
22
|
+
defaultValue,
|
|
23
|
+
}: CheckboxCardGridProps<T>) {
|
|
24
|
+
return (
|
|
25
|
+
<CheckboxProvider
|
|
26
|
+
value={value}
|
|
27
|
+
setValue={setValue}
|
|
28
|
+
defaultValue={defaultValue!}
|
|
29
|
+
/>
|
|
30
|
+
);
|
|
31
|
+
}
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Now the same wrapper can type-check without the workaround:
|
|
35
|
+
|
|
36
|
+
```tsx {4}
|
|
37
|
+
<CheckboxProvider
|
|
38
|
+
value={value}
|
|
39
|
+
setValue={setValue}
|
|
40
|
+
defaultValue={defaultValue}
|
|
41
|
+
/>
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
### Fixed `Combobox` input scroll position resetting
|
|
45
|
+
|
|
46
|
+
When a [`Combobox`](https://ariakit.org/reference/combobox) input's text overflowed its width, the input's horizontal scroll position reset to the beginning each time the results changed. This happened because the virtual focus mechanism briefly moved DOM focus to the active item and back when [`autoSelect`](https://ariakit.org/reference/combobox#autoselect) was enabled, causing browsers to reset the input's internal `scrollLeft`.
|
|
47
|
+
|
|
48
|
+
The scroll position is now preserved across these focus transitions.
|
|
49
|
+
|
|
50
|
+
### Fixed `FormRadio` registering to ancestor composite stores
|
|
51
|
+
|
|
52
|
+
[`FormRadio`](https://ariakit.org/reference/form-radio) items nested inside components like [`TabPanel`](https://ariakit.org/reference/tab-panel) were incorrectly registering to the tab store, causing arrow keys in the tab list to navigate to radio items instead of other tabs. [`FormRadioGroup`](https://ariakit.org/reference/form-radio-group) now resets the composite context for its children, preventing form radio items from being picked up by unrelated parent stores.
|
|
53
|
+
|
|
54
|
+
### Other updates
|
|
55
|
+
|
|
56
|
+
- Fixed [`ComboboxPopover`](https://ariakit.org/reference/combobox-popover) scroll position resetting when items change in multi-select mode (e.g., during infinite scroll).
|
|
57
|
+
- Fixed [`SelectItem`](https://ariakit.org/reference/select-item) stealing focus from the combobox input when the selected item reappears after filtering, which dismissed the keyboard on iOS Safari.
|
|
58
|
+
- Fixed components crashing with "Maximum call stack size exceeded" when the [`id`](https://ariakit.org/reference/select-item#id) prop is explicitly passed as `undefined`.
|
|
59
|
+
- Updated dependencies: `@ariakit/react-core@0.4.24`
|
|
60
|
+
|
|
3
61
|
## 0.4.23
|
|
4
62
|
|
|
5
63
|
- Fixed [`ComboboxDisclosure`](https://ariakit.org/reference/combobox-disclosure) so pressing Escape closes [`ComboboxPopover`](https://ariakit.org/reference/combobox-popover) when the popover starts open and the [`Combobox`](https://ariakit.org/reference/combobox) input is auto-focused.
|
package/package.json
CHANGED
|
@@ -1,43 +1,42 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ariakit/react",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.24",
|
|
4
4
|
"description": "Toolkit for building accessible web apps with React",
|
|
5
|
-
"
|
|
6
|
-
|
|
5
|
+
"keywords": [
|
|
6
|
+
"a11y",
|
|
7
|
+
"ariakit",
|
|
8
|
+
"components",
|
|
9
|
+
"react",
|
|
10
|
+
"toolkit",
|
|
11
|
+
"ui"
|
|
12
|
+
],
|
|
7
13
|
"homepage": "https://ariakit.org",
|
|
8
|
-
"
|
|
9
|
-
"main": "cjs/index.cjs",
|
|
10
|
-
"module": "esm/index.js",
|
|
11
|
-
"types": "cjs/index.d.ts",
|
|
12
|
-
"repository": {
|
|
13
|
-
"type": "git",
|
|
14
|
-
"url": "https://github.com/ariakit/ariakit.git",
|
|
15
|
-
"directory": "packages/ariakit-react"
|
|
16
|
-
},
|
|
14
|
+
"license": "MIT",
|
|
17
15
|
"author": {
|
|
18
16
|
"name": "Diego Haz",
|
|
19
17
|
"email": "hazdiego@gmail.com",
|
|
20
18
|
"url": "https://github.com/diegohaz"
|
|
21
19
|
},
|
|
20
|
+
"repository": {
|
|
21
|
+
"type": "git",
|
|
22
|
+
"url": "https://github.com/ariakit/ariakit.git",
|
|
23
|
+
"directory": "packages/ariakit-react"
|
|
24
|
+
},
|
|
22
25
|
"funding": {
|
|
23
26
|
"type": "opencollective",
|
|
24
27
|
"url": "https://opencollective.com/ariakit"
|
|
25
28
|
},
|
|
26
|
-
"
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
"keywords": [
|
|
32
|
-
"ariakit",
|
|
33
|
-
"react",
|
|
34
|
-
"a11y",
|
|
35
|
-
"ui",
|
|
36
|
-
"toolkit",
|
|
37
|
-
"components"
|
|
38
|
-
],
|
|
29
|
+
"type": "module",
|
|
30
|
+
"sideEffects": false,
|
|
31
|
+
"main": "cjs/index.cjs",
|
|
32
|
+
"module": "esm/index.js",
|
|
33
|
+
"types": "cjs/index.d.ts",
|
|
39
34
|
"dependencies": {
|
|
40
|
-
"@ariakit/react-core": "0.4.
|
|
35
|
+
"@ariakit/react-core": "0.4.24"
|
|
36
|
+
},
|
|
37
|
+
"devDependencies": {
|
|
38
|
+
"react": "18.3.1",
|
|
39
|
+
"react-dom": "18.3.1"
|
|
41
40
|
},
|
|
42
41
|
"peerDependencies": {
|
|
43
42
|
"react": "^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
@@ -241,5 +240,10 @@
|
|
|
241
240
|
}
|
|
242
241
|
},
|
|
243
242
|
"./package.json": "./package.json"
|
|
243
|
+
},
|
|
244
|
+
"scripts": {
|
|
245
|
+
"lint": "oxlint . && oxfmt --check .",
|
|
246
|
+
"build": "node ../../scripts/build/build.js",
|
|
247
|
+
"clean": "node ../../scripts/build/clean.js"
|
|
244
248
|
}
|
|
245
|
-
}
|
|
249
|
+
}
|