@ariakit/react-core 0.4.22 → 0.4.23
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
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# @ariakit/react-core
|
|
2
2
|
|
|
3
|
+
## 0.4.23
|
|
4
|
+
|
|
5
|
+
- 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.
|
|
6
|
+
|
|
3
7
|
## 0.4.22
|
|
4
8
|
|
|
5
9
|
- Fixed [`MenuItemRadio`](https://ariakit.org/reference/menu-item-radio) so controlled reset states are reflected correctly by the menu item and [`MenuItemCheck`](https://ariakit.org/reference/menu-item-check).
|
|
@@ -13,6 +13,9 @@ require('../__chunks/DIWKSV34.cjs');
|
|
|
13
13
|
require('../__chunks/CFNQ2EAV.cjs');
|
|
14
14
|
require('../__chunks/4JH5Q6AQ.cjs');
|
|
15
15
|
require('../__chunks/T3QB4FR3.cjs');
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
var _YY2UXBEBcjs = require('../__chunks/YY2UXBEB.cjs');
|
|
16
19
|
require('../__chunks/SS26HAQ2.cjs');
|
|
17
20
|
|
|
18
21
|
|
|
@@ -21,6 +24,7 @@ require('../__chunks/SS26HAQ2.cjs');
|
|
|
21
24
|
var _743QABRAcjs = require('../__chunks/743QABRA.cjs');
|
|
22
25
|
|
|
23
26
|
|
|
27
|
+
|
|
24
28
|
var _KGFTRA3Ccjs = require('../__chunks/KGFTRA3C.cjs');
|
|
25
29
|
require('../__chunks/XMDZRF6Y.cjs');
|
|
26
30
|
|
|
@@ -63,10 +67,15 @@ var useComboboxDisclosure = _743QABRAcjs.createHook.call(void 0, function useCom
|
|
|
63
67
|
onClickProp == null ? void 0 : onClickProp(event);
|
|
64
68
|
if (event.defaultPrevented) return;
|
|
65
69
|
if (!store) return;
|
|
66
|
-
const { baseElement } = store.getState();
|
|
67
|
-
store.setDisclosureElement(
|
|
70
|
+
const { baseElement: baseElement2 } = store.getState();
|
|
71
|
+
store.setDisclosureElement(baseElement2);
|
|
68
72
|
});
|
|
69
|
-
const
|
|
73
|
+
const baseElement = _YY2UXBEBcjs.useStoreState.call(void 0, store, "baseElement");
|
|
74
|
+
const open = _YY2UXBEBcjs.useStoreState.call(void 0, store, "open");
|
|
75
|
+
_KGFTRA3Ccjs.useSafeLayoutEffect.call(void 0, () => {
|
|
76
|
+
if (!baseElement) return;
|
|
77
|
+
store.setDisclosureElement(baseElement);
|
|
78
|
+
}, [store, baseElement]);
|
|
70
79
|
props = {
|
|
71
80
|
children,
|
|
72
81
|
tabIndex: -1,
|
|
@@ -14,6 +14,9 @@ import "../__chunks/HMKTUWOU.js";
|
|
|
14
14
|
import "../__chunks/PZ3OL7I2.js";
|
|
15
15
|
import "../__chunks/U6HHPQDW.js";
|
|
16
16
|
import "../__chunks/SWN3JYXT.js";
|
|
17
|
+
import {
|
|
18
|
+
useStoreState
|
|
19
|
+
} from "../__chunks/Q5W46E73.js";
|
|
17
20
|
import "../__chunks/SMPCIMZM.js";
|
|
18
21
|
import {
|
|
19
22
|
createElement,
|
|
@@ -21,7 +24,8 @@ import {
|
|
|
21
24
|
forwardRef
|
|
22
25
|
} from "../__chunks/GWSL6KNJ.js";
|
|
23
26
|
import {
|
|
24
|
-
useEvent
|
|
27
|
+
useEvent,
|
|
28
|
+
useSafeLayoutEffect
|
|
25
29
|
} from "../__chunks/KPHZR4MB.js";
|
|
26
30
|
import "../__chunks/YXGXYGQX.js";
|
|
27
31
|
|
|
@@ -64,10 +68,15 @@ var useComboboxDisclosure = createHook(function useComboboxDisclosure2({ store,
|
|
|
64
68
|
onClickProp == null ? void 0 : onClickProp(event);
|
|
65
69
|
if (event.defaultPrevented) return;
|
|
66
70
|
if (!store) return;
|
|
67
|
-
const { baseElement } = store.getState();
|
|
68
|
-
store.setDisclosureElement(
|
|
71
|
+
const { baseElement: baseElement2 } = store.getState();
|
|
72
|
+
store.setDisclosureElement(baseElement2);
|
|
69
73
|
});
|
|
70
|
-
const
|
|
74
|
+
const baseElement = useStoreState(store, "baseElement");
|
|
75
|
+
const open = useStoreState(store, "open");
|
|
76
|
+
useSafeLayoutEffect(() => {
|
|
77
|
+
if (!baseElement) return;
|
|
78
|
+
store.setDisclosureElement(baseElement);
|
|
79
|
+
}, [store, baseElement]);
|
|
71
80
|
props = {
|
|
72
81
|
children,
|
|
73
82
|
tabIndex: -1,
|