@ariakit/react 0.4.28 → 0.4.29
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-035.md → CHANGELOG-0314.md} +205 -0
- package/CHANGELOG.md +48 -202
- package/cjs/__chunks/{SXAPGTJ4.cjs → 2ENQD3AS.cjs} +6 -6
- package/cjs/__chunks/{L2IFVMDU.cjs → 2WBRQ3I7.cjs} +7 -6
- package/cjs/__chunks/{N3DLR7OL.cjs → 3B6TF7HK.cjs} +6 -6
- package/cjs/__chunks/{XPQIHUQ7.cjs → 42GL4LKI.cjs} +20 -20
- package/cjs/__chunks/{VXUZM542.cjs → 53Q7HWXL.cjs} +165 -165
- package/cjs/__chunks/{3FIXGHZ2.cjs → 5QRVCRDI.cjs} +5 -5
- package/cjs/__chunks/{7MXJT4IN.cjs → 5XICU34X.cjs} +3 -3
- package/cjs/__chunks/{334WKW6I.cjs → 5ZX5ACFH.cjs} +4 -4
- package/cjs/__chunks/{2MDC3Z3V.cjs → 6BNWLCHF.cjs} +10 -10
- package/cjs/__chunks/{IFZV5LA3.cjs → 6XKLGFUO.cjs} +17 -17
- package/cjs/__chunks/{PZXRBFZF.cjs → 7SEEXNY6.cjs} +7 -7
- package/cjs/__chunks/{VXDLN5CP.cjs → 7XB4QE2H.cjs} +29 -29
- package/cjs/__chunks/{RVXPEX7O.cjs → AI3BA27G.cjs} +18 -18
- package/cjs/__chunks/{NG34QRI6.cjs → BTARPES4.cjs} +79 -32
- package/cjs/__chunks/{LCX235VJ.cjs → CKHOJYDQ.cjs} +6 -6
- package/cjs/__chunks/{C4NVIV6V.cjs → CRPG37KH.cjs} +104 -84
- package/cjs/__chunks/{4RKQMGBK.cjs → CYTUSXPR.cjs} +236 -222
- package/cjs/__chunks/{IHVFJGGN.cjs → D6USTXKA.cjs} +4 -4
- package/cjs/__chunks/{NFZWL7LE.cjs → DDV252ZY.cjs} +4 -4
- package/cjs/__chunks/DVB2WSHD.cjs +41 -0
- package/cjs/__chunks/{YEXJT4IL.cjs → EF57ZMJN.cjs} +10 -10
- package/cjs/__chunks/{RR46KI45.cjs → EQYJ6RA7.cjs} +3 -3
- package/cjs/__chunks/{D4HCGWOU.cjs → FHPV2Q7C.cjs} +182 -78
- package/cjs/__chunks/{FHQ5DVYQ.cjs → FNYFMCD7.cjs} +4 -4
- package/cjs/__chunks/{FELYQPO5.cjs → FWVWDDOL.cjs} +182 -173
- package/cjs/__chunks/{GUY4MKX2.cjs → G2JI2Z7U.cjs} +12 -12
- package/cjs/__chunks/{Z5PDS46M.cjs → GI27TVAM.cjs} +159 -159
- package/cjs/__chunks/{PTE2IJM5.cjs → GQZ5DRPC.cjs} +32 -30
- package/cjs/__chunks/{XH4GE3VE.cjs → GV4SR2CM.cjs} +7 -7
- package/cjs/__chunks/{PU63IQFD.cjs → HCYQ5Z7Z.cjs} +58 -58
- package/cjs/__chunks/{ASOIXRUN.cjs → HGV6FCZP.cjs} +61 -61
- package/cjs/__chunks/{OOFUBC32.cjs → I4JS2KAF.cjs} +17 -19
- package/cjs/__chunks/{DVWS2XPY.cjs → I6N3772N.cjs} +21 -21
- package/cjs/__chunks/{7POA4244.cjs → IEVLYJJP.cjs} +22 -22
- package/cjs/__chunks/{ZNW2LLWJ.cjs → IGWSYIUY.cjs} +15 -15
- package/cjs/__chunks/{QAUJZR6Y.cjs → JBOLBTVU.cjs} +15 -4
- package/cjs/__chunks/{MN5TONXW.cjs → JXYV7OWF.cjs} +33 -36
- package/cjs/__chunks/{FIPBE5IX.cjs → KDVG735H.cjs} +3 -3
- package/cjs/__chunks/{TSBEWPNT.cjs → KFUU3G3B.cjs} +39 -39
- package/cjs/__chunks/{ZYPARRXG.cjs → LGUAIO4Q.cjs} +4 -4
- package/cjs/__chunks/{5NTEPQ2U.cjs → M6YHODMV.cjs} +20 -20
- package/cjs/__chunks/{SIF7IN4L.cjs → MWZS5XD4.cjs} +12 -12
- package/cjs/__chunks/{UUEFM3TG.cjs → NBAYASRC.cjs} +17 -17
- package/cjs/__chunks/{RXZPZPJX.cjs → OFFSDIY3.cjs} +21 -21
- package/cjs/__chunks/{RGH2H3WL.cjs → OP2QHIHD.cjs} +4 -4
- package/cjs/__chunks/{2HXQHKBC.cjs → P6Y2DILA.cjs} +17 -17
- package/cjs/__chunks/{LMCBLO3G.cjs → P7AY4KL3.cjs} +10 -10
- package/cjs/__chunks/{PDPE2VAZ.cjs → QJQWEU4Q.cjs} +134 -120
- package/cjs/__chunks/{UV7CXZEM.cjs → RZJLQJQM.cjs} +9 -9
- package/cjs/__chunks/{34UJGLOZ.cjs → SAFZBKT3.cjs} +61 -48
- package/cjs/__chunks/{LVHC4DSB.cjs → TMY4OIYC.cjs} +19 -19
- package/cjs/__chunks/{LS5VO6AA.cjs → ULDO57DJ.cjs} +12 -12
- package/cjs/__chunks/{NMUCJYMR.cjs → US2XYAXE.cjs} +83 -83
- package/cjs/__chunks/{GUB6WHB6.cjs → VUISVT3V.cjs} +9 -9
- package/cjs/__chunks/{RLKC7JVT.cjs → WHUT2PFL.cjs} +4 -4
- package/cjs/__chunks/WLHP5OM6.cjs +37 -0
- package/cjs/__chunks/{7M4GY5DS.cjs → WYI5CKPV.cjs} +38 -38
- package/cjs/__chunks/{SQ72MZ63.cjs → ZPWE3FTF.cjs} +39 -39
- package/cjs/button.cjs +5 -5
- package/cjs/checkbox.cjs +8 -8
- package/cjs/collection.cjs +6 -6
- package/cjs/combobox.cjs +30 -30
- package/cjs/command.cjs +4 -4
- package/cjs/composite.cjs +17 -17
- package/cjs/dialog.cjs +18 -18
- package/cjs/disclosure.cjs +9 -9
- package/cjs/focus-trap.cjs +5 -5
- package/cjs/focusable.cjs +3 -3
- package/cjs/form.cjs +14 -14
- package/cjs/group.cjs +3 -3
- package/cjs/heading.cjs +3 -3
- package/cjs/hovercard.cjs +25 -25
- package/cjs/index.cjs +59 -59
- package/cjs/menu.cjs +42 -42
- package/cjs/menubar.cjs +8 -8
- package/cjs/popover.cjs +25 -25
- package/cjs/portal.cjs +5 -5
- package/cjs/radio.cjs +12 -12
- package/cjs/role.cjs +3 -3
- package/cjs/select.cjs +36 -36
- package/cjs/separator.cjs +3 -3
- package/cjs/store.cjs +3 -3
- package/cjs/tab.cjs +15 -15
- package/cjs/toolbar.cjs +13 -13
- package/cjs/tooltip.cjs +15 -15
- package/cjs/visually-hidden.cjs +3 -3
- package/package.json +4 -4
- package/cjs/__chunks/FVIS5BFZ.cjs +0 -41
- package/cjs/__chunks/TLUFYZC7.cjs +0 -37
|
@@ -1,3 +1,208 @@
|
|
|
1
|
+
# @ariakit/react
|
|
2
|
+
|
|
3
|
+
## 0.3.14
|
|
4
|
+
|
|
5
|
+
- Fixed a regression introduced in `v0.3.13` where dialogs wouldn't close when clicking outside on iOS.
|
|
6
|
+
- Updated dependencies: `@ariakit/react-core@0.3.14`
|
|
7
|
+
|
|
8
|
+
## 0.3.13
|
|
9
|
+
|
|
10
|
+
### Improved performance of large collections
|
|
11
|
+
|
|
12
|
+
Components like [`MenuItem`](https://ariakit.org/reference/menu-item), [`ComboboxItem`](https://ariakit.org/reference/combobox-item), and [`SelectItem`](https://ariakit.org/reference/select-item) should now offer improved performance when rendering large collections.
|
|
13
|
+
|
|
14
|
+
### New `FormControl` component
|
|
15
|
+
|
|
16
|
+
This version introduces a new [`FormControl`](https://ariakit.org/reference/form-control) component. In future versions, this will replace the [`FormField`](https://ariakit.org/reference/form-field) component.
|
|
17
|
+
|
|
18
|
+
### Other updates
|
|
19
|
+
|
|
20
|
+
- Adjusted the focus behavior in Safari to occur prior to the `pointerup` event instead of `mouseup`.
|
|
21
|
+
- Improved JSDocs.
|
|
22
|
+
- Updated dependencies: `@ariakit/react-core@0.3.13`
|
|
23
|
+
|
|
24
|
+
## 0.3.12
|
|
25
|
+
|
|
26
|
+
- The auto-select feature on [Combobox](https://ariakit.org/components/combobox) now resets with each keystroke.
|
|
27
|
+
- Fixed [`Combobox`](https://ariakit.org/reference/combobox) with the [`autoSelect`](https://ariakit.org/reference/combobox#autoselect) prop calling `onFocus` with every input change.
|
|
28
|
+
- Fixed [`Hovercard`](https://ariakit.org/reference/hovercard) flickering when used with shadow DOM.
|
|
29
|
+
- Fixed [`Select`](https://ariakit.org/reference/select) with [`Combobox`](https://ariakit.org/reference/combobox) scroll jumping when opening using keyboard navigation.
|
|
30
|
+
- Fixed [`CompositeItem`](https://ariakit.org/reference/composite-item) triggering blur on focus.
|
|
31
|
+
- Fixed [`ComboboxItem`](https://ariakit.org/reference/combobox-item) not triggering the `onClick` event when the item is partially visible.
|
|
32
|
+
- Improved JSDocs.
|
|
33
|
+
- Updated dependencies: `@ariakit/react-core@0.3.12`
|
|
34
|
+
|
|
35
|
+
## 0.3.11
|
|
36
|
+
|
|
37
|
+
### Modal Combobox
|
|
38
|
+
|
|
39
|
+
The [Combobox](https://ariakit.org/components/combobox) components now support the [`modal`](https://ariakit.org/reference/combobox-popover#modal) prop on [`ComboboxPopover`](https://ariakit.org/reference/combobox-popover).
|
|
40
|
+
|
|
41
|
+
When a modal combobox is expanded, users can interact with and tab through all the combobox controls, including [`Combobox`](https://ariakit.org/reference/combobox), [`ComboboxDisclosure`](https://ariakit.org/reference/combobox-disclosure), and [`ComboboxCancel`](https://ariakit.org/reference/combobox-cancel), even if they're rendered outside the popover. The rest of the page will be inert.
|
|
42
|
+
|
|
43
|
+
### Controlling the auto-select functionality of Combobox
|
|
44
|
+
|
|
45
|
+
The [`Combobox`](https://ariakit.org/reference/combobox) component now includes a new [`getAutoSelectId`](https://ariakit.org/reference/combobox#getautoselectid) prop. This allows you to specify the [`ComboboxItem`](https://ariakit.org/reference/combobox-item) that should be auto-selected if the [`autoSelect`](https://ariakit.org/reference/combobox#autoselect) prop is `true`.
|
|
46
|
+
|
|
47
|
+
By default, the first _enabled_ item is auto-selected. Now you can customize this behavior by returning the id of another item from [`getAutoSelectId`](https://ariakit.org/reference/combobox#getautoselectid):
|
|
48
|
+
|
|
49
|
+
```jsx
|
|
50
|
+
<Combobox
|
|
51
|
+
autoSelect
|
|
52
|
+
getAutoSelectId={(items) => {
|
|
53
|
+
// Auto select the first enabled item with a value
|
|
54
|
+
const item = items.find((item) => {
|
|
55
|
+
if (item.disabled) return false;
|
|
56
|
+
if (!item.value) return false;
|
|
57
|
+
return true;
|
|
58
|
+
});
|
|
59
|
+
return item?.id;
|
|
60
|
+
}}
|
|
61
|
+
/>
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
### Styling Combobox without an active descendant
|
|
65
|
+
|
|
66
|
+
The [`Combobox`](https://ariakit.org/reference/combobox) component now includes a [`data-active-item`](https://ariakit.org/guide/styling#data-active-item) attribute when it's the only active item in the composite widget. In other words, when no [`ComboboxItem`](https://ariakit.org/reference/combobox-item) is active and the focus is solely on the combobox input.
|
|
67
|
+
|
|
68
|
+
You can use this as a CSS selector to style the combobox differently, providing additional affordance to users who pressed <kbd>↑</kbd> on the first item or <kbd>↓</kbd> on the last item. This action would place both virtual and actual DOM focus on the combobox input.
|
|
69
|
+
|
|
70
|
+
```css
|
|
71
|
+
.combobox[data-active-item] {
|
|
72
|
+
outline-width: 2px;
|
|
73
|
+
}
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
### Other updates
|
|
77
|
+
|
|
78
|
+
- Fixed [`useTabStore`](https://ariakit.org/reference/use-tab-store) return value not updating its own reference.
|
|
79
|
+
- Fixed keyboard navigation on [Combobox](https://ariakit.org/components/combobox) when the content element is a grid.
|
|
80
|
+
- Fixed [`ComboboxDisclosure`](https://ariakit.org/reference/combobox-disclosure) to update its `aria-expanded` attribute when the combobox expands.
|
|
81
|
+
- Fixed `Maximum update depth exceeded` warning when rendering multiple collection items on the page.
|
|
82
|
+
- Improved JSDocs.
|
|
83
|
+
- Updated dependencies: `@ariakit/react-core@0.3.11`
|
|
84
|
+
|
|
85
|
+
## 0.3.10
|
|
86
|
+
|
|
87
|
+
### Overwriting `aria-selected` value on `ComboboxItem`
|
|
88
|
+
|
|
89
|
+
It's now possible to pass a custom `aria-selected` value to the [`ComboboxItem`](https://ariakit.org/reference/combobox-item) component, overwriting the internal behavior.
|
|
90
|
+
|
|
91
|
+
### Limiting `slide` on popovers
|
|
92
|
+
|
|
93
|
+
When components like [Popover](https://ariakit.org/components/popover) and [Menu](https://ariakit.org/components/menu) with the [`slide`](https://ariakit.org/reference/popover#slide) prop are positioned to the right or left of the anchor element, they will now cease to slide across the screen, disengaged from the anchor element, upon reaching the edge of said element.
|
|
94
|
+
|
|
95
|
+
### Other updates
|
|
96
|
+
|
|
97
|
+
- Fixed [`blurOnHoverEnd`](https://ariakit.org/reference/menu-item#bluronhoverend) set to `false` not keeping submenus open.
|
|
98
|
+
- Fixed scroll jump on Safari when selecting a [`CompositeItem`](https://ariakit.org/reference/composite-item).
|
|
99
|
+
- Fixed [`preserveTabOrderAnchor`](https://ariakit.org/reference/menu#preservetaborderanchor) on nested menus.
|
|
100
|
+
- Fixed focus behavior when using the [`preserveTabOrder`](https://ariakit.org/reference/portal#preservetaborder) prop.
|
|
101
|
+
- Updated dependencies: `@ariakit/react-core@0.3.10`
|
|
102
|
+
|
|
103
|
+
## 0.3.9
|
|
104
|
+
|
|
105
|
+
### Automatic role on ComboboxGroup
|
|
106
|
+
|
|
107
|
+
The [`ComboboxGroup`](https://ariakit.org/reference/combobox-group) component now automatically assigns the `role` attribute as `rowgroup` if it's nestled within a [`ComboboxPopover`](https://ariakit.org/reference/combobox-popover) or [`ComboboxList`](https://ariakit.org/reference/combobox-list) wrapper that has the `role` attribute set to `grid`.
|
|
108
|
+
|
|
109
|
+
### Custom submenu auto focus
|
|
110
|
+
|
|
111
|
+
When opening nested [Menu](https://ariakit.org/components/menu) components with <kbd>Enter</kbd>, <kbd>Space</kbd>, or arrow keys, the first tabbable element will now receive focus, even if it's not a [`MenuItem`](https://ariakit.org/reference/menu-item) element. This should enable custom popups that behave like submenus, but use different semantics.
|
|
112
|
+
|
|
113
|
+
### Hovercard display timeout
|
|
114
|
+
|
|
115
|
+
The [Hovercard](https://ariakit.org/components/hovercard), [Menu](https://ariakit.org/components/menu), and [Tooltip](https://ariakit.org/components/tooltip) components now display synchronously when the [`timeout`](https://ariakit.org/reference/hovercard-provider#timeout) or [`showTimeout`](https://ariakit.org/reference/hovercard-provider#showtimeout) states are set to `0`. This should stop submenus from vanishing for a few frames prior to displaying a new menu when hovering over menu items in sequence.
|
|
116
|
+
|
|
117
|
+
### Other updates
|
|
118
|
+
|
|
119
|
+
- Fixed [`CollectionItem`](https://ariakit.org/reference/collection-item) elements getting out of order when composing stores.
|
|
120
|
+
- Fixed [`MenuButton`](https://ariakit.org/reference/menu-button) not assigning the correct `role` attribute when used within a [`ComboboxList`](https://ariakit.org/reference/combobox-list) element.
|
|
121
|
+
- Fixed [`MenuItem`](https://ariakit.org/reference/menu-item) with an explicit [`focusOnHover`](https://ariakit.org/reference/menu-item#focusonhover) prop not moving focus properly.
|
|
122
|
+
- Fixed [`blurOnHoverEnd`](https://ariakit.org/reference/menu-item#bluronhoverend) not working on submenu triggers.
|
|
123
|
+
- Fixed [Dialog](https://ariakit.org/components/dialog) not respecting the controlled [`open`](https://ariakit.org/reference/use-dialog-store#open) state.
|
|
124
|
+
- Fixed unmounted [`SelectPopover`](https://ariakit.org/reference/select-popover) not re-opening when its [`open`](https://ariakit.org/reference/select-provider#open) state is initially set to `true`.
|
|
125
|
+
- Fixed TypeScript build errors.
|
|
126
|
+
- Fixed focus order when using [Popover](https://ariakit.org/components/popover) with the [`portal`](https://ariakit.org/reference/popover#portal) prop with VoiceOver.
|
|
127
|
+
- Updated dependencies: `@ariakit/react-core@0.3.9`
|
|
128
|
+
|
|
129
|
+
## 0.3.8
|
|
130
|
+
|
|
131
|
+
### Multi-selectable Combobox
|
|
132
|
+
|
|
133
|
+
We've added support for the [Combobox](https://ariakit.org/components/combobox) with multiple selection capabilities using a new [`selectedValue`](https://ariakit.org/reference/combobox-provider#selectedvalue) prop, along with [`defaultSelectedValue`](https://ariakit.org/reference/combobox-provider#defaultselectedvalue) and [`setSelectedValue`](https://ariakit.org/reference/combobox-provider#setselectedvalue).
|
|
134
|
+
|
|
135
|
+
This works similarly to the [`value`](https://ariakit.org/reference/select-provider#value) prop on [Select](https://ariakit.org/components/select) components. If it receives an array, the combobox will allow multiple selections. By default, it's a string that represents the selected value in a single-select combobox.
|
|
136
|
+
|
|
137
|
+
Check out the [Multi-selectable Combobox](https://ariakit.org/examples/combobox-multiple) example to see it in action.
|
|
138
|
+
|
|
139
|
+
### New Combobox components
|
|
140
|
+
|
|
141
|
+
This version introduces new [Combobox](https://ariakit.org/components/combobox) components:
|
|
142
|
+
|
|
143
|
+
- [`ComboboxLabel`](https://ariakit.org/reference/combobox-label): This renders a `label` element for a [`Combobox`](https://ariakit.org/reference/combobox), with the `htmlFor` prop set automatically.
|
|
144
|
+
- [`ComboboxItemCheck`](https://ariakit.org/reference/combobox-item-check): This displays a checkmark for a [`ComboboxItem`](https://ariakit.org/reference/combobox-item) when the item is selected.
|
|
145
|
+
|
|
146
|
+
### Other updates
|
|
147
|
+
|
|
148
|
+
- Added [`resetValueOnSelect`](https://ariakit.org/reference/combobox-provider#resetvalueonselect) state to [Combobox](https://ariakit.org/components/combobox) components.
|
|
149
|
+
- Added [`selectValueOnClick`](https://ariakit.org/reference/combobox-item#selectvalueonclick) prop to [`ComboboxItem`](https://ariakit.org/reference/combobox-item).
|
|
150
|
+
- Fixed [`SelectItem`](https://ariakit.org/reference/select-item) rendering an `aria-selected` attribute even when the [`value`](https://ariakit.org/reference/select-item#value) prop is omitted.
|
|
151
|
+
- Updated dependencies: `@ariakit/react-core@0.3.8`
|
|
152
|
+
|
|
153
|
+
## 0.3.7
|
|
154
|
+
|
|
155
|
+
### Expanding Menubar
|
|
156
|
+
|
|
157
|
+
The [Menubar](https://ariakit.org/components/menubar) component will now only expand if there's another menu already expanded in the same menubar.
|
|
158
|
+
|
|
159
|
+
### Internal data attribute changes
|
|
160
|
+
|
|
161
|
+
Just like the change in v0.3.6 that removed the `data-command` and `data-disclosure` attributes from elements, this update stops the `data-composite-hover` attribute from infiltrating composite item elements in the DOM. We're mentioning this in the changelog as some users might have snapshot tests that require updating.
|
|
162
|
+
|
|
163
|
+
### Other updates
|
|
164
|
+
|
|
165
|
+
- Fixed `setSelectionRange` error when used with [unsupported](https://html.spec.whatwg.org/multipage/input.html#concept-input-apply) input types.
|
|
166
|
+
- Fixed [`MenuButton`](https://ariakit.org/reference/menu-button) with [`showOnHover`](https://ariakit.org/reference/menu-button#showonhover) not updating the `activeId` state when hovered.
|
|
167
|
+
- Updated [`onFocusVisible`](https://ariakit.org/reference/focusable#onfocusvisible) element type on [`Focusable`](https://ariakit.org/reference/focusable) from `Element` to `HTMLElement`.
|
|
168
|
+
- Updated dependencies: `@ariakit/react-core@0.3.7`
|
|
169
|
+
|
|
170
|
+
## 0.3.6
|
|
171
|
+
|
|
172
|
+
### Data attributes for duplicate components
|
|
173
|
+
|
|
174
|
+
The internal logic that identifies duplicate components has been refined. This implies that some internal `data-*` attributes will no longer seep into the rendered DOM elements. If you're doing snapshot tests on the DOM generated by Ariakit components, you should see the `data-command` and `data-disclosure` attributes removed.
|
|
175
|
+
|
|
176
|
+
### Multiple disclosure and anchor elements
|
|
177
|
+
|
|
178
|
+
The `disclosureElement` and `anchorElement` states on [Disclosure](https://ariakit.org/components/disclosure), [Popover](https://ariakit.org/components/popover), and [Menu](https://ariakit.org/components/menu), along with related components, are now set only upon interaction.
|
|
179
|
+
|
|
180
|
+
This change enables us to support multiple disclosure/anchor elements for the same `contentElement` (typically the popup element) when triggered by hover or focus.
|
|
181
|
+
|
|
182
|
+
### Expanding Menubar with focus
|
|
183
|
+
|
|
184
|
+
Adjacent [`Menu`](https://ariakit.org/reference/menu) popups will now open when the focus moves through [`MenuItem`](https://ariakit.org/reference/menu-item) elements in a [Menubar](https://ariakit.org/components/menubar). Before, they would only open when another [`Menu`](https://ariakit.org/reference/menu) was already visible.
|
|
185
|
+
|
|
186
|
+
### Maintaining Popover tab order
|
|
187
|
+
|
|
188
|
+
[`Popover`](https://ariakit.org/reference/popover) and related components now automatically set the new [`preserveTabOrderAnchor`](https://ariakit.org/reference/portal#preservetaborderanchor) prop as the disclosure element.
|
|
189
|
+
|
|
190
|
+
This ensures that, when the [`portal`](https://ariakit.org/reference/popover#portal) prop is enabled, the tab order will be preserved from the disclosure to the content element even when the [`Popover`](https://ariakit.org/reference/popover) component is rendered in a different location in the React tree.
|
|
191
|
+
|
|
192
|
+
### New Menubar components
|
|
193
|
+
|
|
194
|
+
This version introduces a new [Menubar](https://ariakit.org/components/menubar) module that can be used without the [`MenubarProvider`](https://ariakit.org/reference/menubar-provider) wrapper.
|
|
195
|
+
|
|
196
|
+
### Other updates
|
|
197
|
+
|
|
198
|
+
- Fixed [Hovercard](https://ariakit.org/components/hovercard) when used with multiple [`HovercardAnchor`](https://ariakit.org/reference/hovercard-anchor) elements.
|
|
199
|
+
- Added new [`preserveTabOrderAnchor`](https://ariakit.org/reference/portal#preservetaborderanchor) prop to [`Portal`](https://ariakit.org/reference/portal) and related components.
|
|
200
|
+
- Added new [`tabbable`](https://ariakit.org/reference/composite-item#tabbable) prop to [`CompositeItem`](https://ariakit.org/reference/composite-item) and related components.
|
|
201
|
+
- Added new [`blurOnHoverEnd`](https://ariakit.org/reference/composite-hover#bluronhoverend) prop to [`CompositeHover`](https://ariakit.org/reference/composite-hover) and related components.
|
|
202
|
+
- Updated dependencies: `@ariakit/react-core@0.3.6`
|
|
203
|
+
|
|
204
|
+
---
|
|
205
|
+
|
|
1
206
|
# @ariakit/ariakit
|
|
2
207
|
|
|
3
208
|
## 0.3.5
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,52 @@
|
|
|
1
1
|
# @ariakit/react
|
|
2
2
|
|
|
3
|
+
## 0.4.29
|
|
4
|
+
|
|
5
|
+
### Fixed `Combobox` dropping characters when the popover resizes while typing
|
|
6
|
+
|
|
7
|
+
The [`Combobox`](https://ariakit.com/reference/combobox) component with [`autoSelect`](https://ariakit.com/reference/combobox#autoselect) enabled no longer loses typed characters when the popover is resized as the user types.
|
|
8
|
+
|
|
9
|
+
This could happen with a virtualized list on mobile devices, where the keyboard's autocomplete bar repeatedly changes the available viewport height. Each resize re-rendered the list and re-applied the auto-selection, briefly moving focus away from the input and dropping keystrokes.
|
|
10
|
+
|
|
11
|
+
### Composite items keep their enclosing store
|
|
12
|
+
|
|
13
|
+
Fixed [`CompositeItem`](https://ariakit.com/reference/composite-item) to register on the enclosing [`Composite`](https://ariakit.com/reference/composite) store when rendered as the same element as a component that sets its own composite context, such as a [`MenuButton`](https://ariakit.com/reference/menu-button) inside a [`MenuProvider`](https://ariakit.com/reference/menu-provider). This keeps the item reachable with the arrow keys in one- and two-dimensional composite widgets.
|
|
14
|
+
|
|
15
|
+
The [`CompositeItem`](https://ariakit.com/reference/composite-item) can now omit the explicit `store` prop and still register on the enclosing composite:
|
|
16
|
+
|
|
17
|
+
```tsx {5-7}
|
|
18
|
+
const composite = Ariakit.useCompositeStore();
|
|
19
|
+
|
|
20
|
+
<Ariakit.Composite store={composite}>
|
|
21
|
+
<Ariakit.MenuProvider>
|
|
22
|
+
<Ariakit.CompositeItem render={<Ariakit.MenuButton />}>
|
|
23
|
+
Menu
|
|
24
|
+
</Ariakit.CompositeItem>
|
|
25
|
+
<Ariakit.Menu>
|
|
26
|
+
<Ariakit.MenuItem>Edit</Ariakit.MenuItem>
|
|
27
|
+
</Ariakit.Menu>
|
|
28
|
+
</Ariakit.MenuProvider>
|
|
29
|
+
</Ariakit.Composite>;
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
### Components no longer throw on events with a non-element target
|
|
33
|
+
|
|
34
|
+
Several components attach global event listeners that read `event.target`/`event.relatedTarget` and call methods like `contains()` and `hasAttribute()` on them. When third-party code dispatched an event whose target was a non-element `EventTarget` (such as `window` or an `XMLHttpRequest`), those calls threw a `TypeError`.
|
|
35
|
+
|
|
36
|
+
This affected [`Dialog`](https://ariakit.com/reference/dialog) (its interact-outside and Escape-to-close listeners), [`HovercardDisclosure`](https://ariakit.com/reference/hovercard-disclosure) (its focusout listener), and the shared `isFocusEventOutside` and `isPortalEvent` helpers used by [`Focusable`](https://ariakit.com/reference/focusable), [`Combobox`](https://ariakit.com/reference/combobox), [`Composite`](https://ariakit.com/reference/composite), and [`Portal`](https://ariakit.com/reference/portal).
|
|
37
|
+
|
|
38
|
+
### Other updates
|
|
39
|
+
|
|
40
|
+
- Improved performance of components that subscribe to internal store state by upgrading the underlying [`@ariakit/store`](https://www.npmjs.com/package/@ariakit/store) package.
|
|
41
|
+
- Fixed [`Button`](https://ariakit.com/reference/button) to preserve React form pending state when submitted with the keyboard.
|
|
42
|
+
- Fixed [`Dialog`](https://ariakit.com/reference/dialog) to preserve closing animations when using [`unmountOnHide`](https://ariakit.com/reference/dialog#unmountonhide) with the controlled [`open`](https://ariakit.com/reference/dialog#open) and [`onClose`](https://ariakit.com/reference/dialog#onclose) props and no explicit store.
|
|
43
|
+
- Documented that [`removeValue`](https://ariakit.com/reference/use-form-store#removevalue) preserves array length by replacing removed items with `null`.
|
|
44
|
+
- Fixed runtime `process.env.NODE_ENV` checks in published package output, including test-only behavior and development warnings.
|
|
45
|
+
- Fixed rendering many [`Menu`](https://ariakit.com/reference/menu) components on the same page potentially causing a "Maximum update depth exceeded" error. [`MenuItem`](https://ariakit.com/reference/menu-item) elements now register only while the menu is visible, instead of registering on mount even while it's hidden.
|
|
46
|
+
- Fixed [`Tab`](https://ariakit.com/reference/tab) to move focus to the selected tab after a controlled [`selectedId`](https://ariakit.com/reference/tab-provider#selectedid) update while a tab has DOM focus.
|
|
47
|
+
- Fixed [`TooltipProvider`](https://ariakit.com/reference/tooltip-provider) to avoid a re-entrant loop when multiple tooltips are forced open at the same time.
|
|
48
|
+
- Updated dependencies: `@ariakit/react-components@0.1.2`
|
|
49
|
+
|
|
3
50
|
## 0.4.28
|
|
4
51
|
|
|
5
52
|
- Release artifacts now include npm trusted publishing provenance.
|
|
@@ -726,207 +773,6 @@ You can learn more about these new features in the [Composition guide](https://a
|
|
|
726
773
|
- Added new [`disclosure`](https://ariakit.org/reference/use-disclosure-store#disclosure-1) property to disclosure stores.
|
|
727
774
|
- Updated dependencies: `@ariakit/react-core@0.4.0`
|
|
728
775
|
|
|
729
|
-
## 0.3.14
|
|
730
|
-
|
|
731
|
-
- Fixed a regression introduced in `v0.3.13` where dialogs wouldn't close when clicking outside on iOS.
|
|
732
|
-
- Updated dependencies: `@ariakit/react-core@0.3.14`
|
|
733
|
-
|
|
734
|
-
## 0.3.13
|
|
735
|
-
|
|
736
|
-
### Improved performance of large collections
|
|
737
|
-
|
|
738
|
-
Components like [`MenuItem`](https://ariakit.org/reference/menu-item), [`ComboboxItem`](https://ariakit.org/reference/combobox-item), and [`SelectItem`](https://ariakit.org/reference/select-item) should now offer improved performance when rendering large collections.
|
|
739
|
-
|
|
740
|
-
### New `FormControl` component
|
|
741
|
-
|
|
742
|
-
This version introduces a new [`FormControl`](https://ariakit.org/reference/form-control) component. In future versions, this will replace the [`FormField`](https://ariakit.org/reference/form-field) component.
|
|
743
|
-
|
|
744
|
-
### Other updates
|
|
745
|
-
|
|
746
|
-
- Adjusted the focus behavior in Safari to occur prior to the `pointerup` event instead of `mouseup`.
|
|
747
|
-
- Improved JSDocs.
|
|
748
|
-
- Updated dependencies: `@ariakit/react-core@0.3.13`
|
|
749
|
-
|
|
750
|
-
## 0.3.12
|
|
751
|
-
|
|
752
|
-
- The auto-select feature on [Combobox](https://ariakit.org/components/combobox) now resets with each keystroke.
|
|
753
|
-
- Fixed [`Combobox`](https://ariakit.org/reference/combobox) with the [`autoSelect`](https://ariakit.org/reference/combobox#autoselect) prop calling `onFocus` with every input change.
|
|
754
|
-
- Fixed [`Hovercard`](https://ariakit.org/reference/hovercard) flickering when used with shadow DOM.
|
|
755
|
-
- Fixed [`Select`](https://ariakit.org/reference/select) with [`Combobox`](https://ariakit.org/reference/combobox) scroll jumping when opening using keyboard navigation.
|
|
756
|
-
- Fixed [`CompositeItem`](https://ariakit.org/reference/composite-item) triggering blur on focus.
|
|
757
|
-
- Fixed [`ComboboxItem`](https://ariakit.org/reference/combobox-item) not triggering the `onClick` event when the item is partially visible.
|
|
758
|
-
- Improved JSDocs.
|
|
759
|
-
- Updated dependencies: `@ariakit/react-core@0.3.12`
|
|
760
|
-
|
|
761
|
-
## 0.3.11
|
|
762
|
-
|
|
763
|
-
### Modal Combobox
|
|
764
|
-
|
|
765
|
-
The [Combobox](https://ariakit.org/components/combobox) components now support the [`modal`](https://ariakit.org/reference/combobox-popover#modal) prop on [`ComboboxPopover`](https://ariakit.org/reference/combobox-popover).
|
|
766
|
-
|
|
767
|
-
When a modal combobox is expanded, users can interact with and tab through all the combobox controls, including [`Combobox`](https://ariakit.org/reference/combobox), [`ComboboxDisclosure`](https://ariakit.org/reference/combobox-disclosure), and [`ComboboxCancel`](https://ariakit.org/reference/combobox-cancel), even if they're rendered outside the popover. The rest of the page will be inert.
|
|
768
|
-
|
|
769
|
-
### Controlling the auto-select functionality of Combobox
|
|
770
|
-
|
|
771
|
-
The [`Combobox`](https://ariakit.org/reference/combobox) component now includes a new [`getAutoSelectId`](https://ariakit.org/reference/combobox#getautoselectid) prop. This allows you to specify the [`ComboboxItem`](https://ariakit.org/reference/combobox-item) that should be auto-selected if the [`autoSelect`](https://ariakit.org/reference/combobox#autoselect) prop is `true`.
|
|
772
|
-
|
|
773
|
-
By default, the first _enabled_ item is auto-selected. Now you can customize this behavior by returning the id of another item from [`getAutoSelectId`](https://ariakit.org/reference/combobox#getautoselectid):
|
|
774
|
-
|
|
775
|
-
```jsx
|
|
776
|
-
<Combobox
|
|
777
|
-
autoSelect
|
|
778
|
-
getAutoSelectId={(items) => {
|
|
779
|
-
// Auto select the first enabled item with a value
|
|
780
|
-
const item = items.find((item) => {
|
|
781
|
-
if (item.disabled) return false;
|
|
782
|
-
if (!item.value) return false;
|
|
783
|
-
return true;
|
|
784
|
-
});
|
|
785
|
-
return item?.id;
|
|
786
|
-
}}
|
|
787
|
-
/>
|
|
788
|
-
```
|
|
789
|
-
|
|
790
|
-
### Styling Combobox without an active descendant
|
|
791
|
-
|
|
792
|
-
The [`Combobox`](https://ariakit.org/reference/combobox) component now includes a [`data-active-item`](https://ariakit.org/guide/styling#data-active-item) attribute when it's the only active item in the composite widget. In other words, when no [`ComboboxItem`](https://ariakit.org/reference/combobox-item) is active and the focus is solely on the combobox input.
|
|
793
|
-
|
|
794
|
-
You can use this as a CSS selector to style the combobox differently, providing additional affordance to users who pressed <kbd>↑</kbd> on the first item or <kbd>↓</kbd> on the last item. This action would place both virtual and actual DOM focus on the combobox input.
|
|
795
|
-
|
|
796
|
-
```css
|
|
797
|
-
.combobox[data-active-item] {
|
|
798
|
-
outline-width: 2px;
|
|
799
|
-
}
|
|
800
|
-
```
|
|
801
|
-
|
|
802
|
-
### Other updates
|
|
803
|
-
|
|
804
|
-
- Fixed [`useTabStore`](https://ariakit.org/reference/use-tab-store) return value not updating its own reference.
|
|
805
|
-
- Fixed keyboard navigation on [Combobox](https://ariakit.org/components/combobox) when the content element is a grid.
|
|
806
|
-
- Fixed [`ComboboxDisclosure`](https://ariakit.org/reference/combobox-disclosure) to update its `aria-expanded` attribute when the combobox expands.
|
|
807
|
-
- Fixed `Maximum update depth exceeded` warning when rendering multiple collection items on the page.
|
|
808
|
-
- Improved JSDocs.
|
|
809
|
-
- Updated dependencies: `@ariakit/react-core@0.3.11`
|
|
810
|
-
|
|
811
|
-
## 0.3.10
|
|
812
|
-
|
|
813
|
-
### Overwriting `aria-selected` value on `ComboboxItem`
|
|
814
|
-
|
|
815
|
-
It's now possible to pass a custom `aria-selected` value to the [`ComboboxItem`](https://ariakit.org/reference/combobox-item) component, overwriting the internal behavior.
|
|
816
|
-
|
|
817
|
-
### Limiting `slide` on popovers
|
|
818
|
-
|
|
819
|
-
When components like [Popover](https://ariakit.org/components/popover) and [Menu](https://ariakit.org/components/menu) with the [`slide`](https://ariakit.org/reference/popover#slide) prop are positioned to the right or left of the anchor element, they will now cease to slide across the screen, disengaged from the anchor element, upon reaching the edge of said element.
|
|
820
|
-
|
|
821
|
-
### Other updates
|
|
822
|
-
|
|
823
|
-
- Fixed [`blurOnHoverEnd`](https://ariakit.org/reference/menu-item#bluronhoverend) set to `false` not keeping submenus open.
|
|
824
|
-
- Fixed scroll jump on Safari when selecting a [`CompositeItem`](https://ariakit.org/reference/composite-item).
|
|
825
|
-
- Fixed [`preserveTabOrderAnchor`](https://ariakit.org/reference/menu#preservetaborderanchor) on nested menus.
|
|
826
|
-
- Fixed focus behavior when using the [`preserveTabOrder`](https://ariakit.org/reference/portal#preservetaborder) prop.
|
|
827
|
-
- Updated dependencies: `@ariakit/react-core@0.3.10`
|
|
828
|
-
|
|
829
|
-
## 0.3.9
|
|
830
|
-
|
|
831
|
-
### Automatic role on ComboboxGroup
|
|
832
|
-
|
|
833
|
-
The [`ComboboxGroup`](https://ariakit.org/reference/combobox-group) component now automatically assigns the `role` attribute as `rowgroup` if it's nestled within a [`ComboboxPopover`](https://ariakit.org/reference/combobox-popover) or [`ComboboxList`](https://ariakit.org/reference/combobox-list) wrapper that has the `role` attribute set to `grid`.
|
|
834
|
-
|
|
835
|
-
### Custom submenu auto focus
|
|
836
|
-
|
|
837
|
-
When opening nested [Menu](https://ariakit.org/components/menu) components with <kbd>Enter</kbd>, <kbd>Space</kbd>, or arrow keys, the first tabbable element will now receive focus, even if it's not a [`MenuItem`](https://ariakit.org/reference/menu-item) element. This should enable custom popups that behave like submenus, but use different semantics.
|
|
838
|
-
|
|
839
|
-
### Hovercard display timeout
|
|
840
|
-
|
|
841
|
-
The [Hovercard](https://ariakit.org/components/hovercard), [Menu](https://ariakit.org/components/menu), and [Tooltip](https://ariakit.org/components/tooltip) components now display synchronously when the [`timeout`](https://ariakit.org/reference/hovercard-provider#timeout) or [`showTimeout`](https://ariakit.org/reference/hovercard-provider#showtimeout) states are set to `0`. This should stop submenus from vanishing for a few frames prior to displaying a new menu when hovering over menu items in sequence.
|
|
842
|
-
|
|
843
|
-
### Other updates
|
|
844
|
-
|
|
845
|
-
- Fixed [`CollectionItem`](https://ariakit.org/reference/collection-item) elements getting out of order when composing stores.
|
|
846
|
-
- Fixed [`MenuButton`](https://ariakit.org/reference/menu-button) not assigning the correct `role` attribute when used within a [`ComboboxList`](https://ariakit.org/reference/combobox-list) element.
|
|
847
|
-
- Fixed [`MenuItem`](https://ariakit.org/reference/menu-item) with an explicit [`focusOnHover`](https://ariakit.org/reference/menu-item#focusonhover) prop not moving focus properly.
|
|
848
|
-
- Fixed [`blurOnHoverEnd`](https://ariakit.org/reference/menu-item#bluronhoverend) not working on submenu triggers.
|
|
849
|
-
- Fixed [Dialog](https://ariakit.org/components/dialog) not respecting the controlled [`open`](https://ariakit.org/reference/use-dialog-store#open) state.
|
|
850
|
-
- Fixed unmounted [`SelectPopover`](https://ariakit.org/reference/select-popover) not re-opening when its [`open`](https://ariakit.org/reference/select-provider#open) state is initially set to `true`.
|
|
851
|
-
- Fixed TypeScript build errors.
|
|
852
|
-
- Fixed focus order when using [Popover](https://ariakit.org/components/popover) with the [`portal`](https://ariakit.org/reference/popover#portal) prop with VoiceOver.
|
|
853
|
-
- Updated dependencies: `@ariakit/react-core@0.3.9`
|
|
854
|
-
|
|
855
|
-
## 0.3.8
|
|
856
|
-
|
|
857
|
-
### Multi-selectable Combobox
|
|
858
|
-
|
|
859
|
-
We've added support for the [Combobox](https://ariakit.org/components/combobox) with multiple selection capabilities using a new [`selectedValue`](https://ariakit.org/reference/combobox-provider#selectedvalue) prop, along with [`defaultSelectedValue`](https://ariakit.org/reference/combobox-provider#defaultselectedvalue) and [`setSelectedValue`](https://ariakit.org/reference/combobox-provider#setselectedvalue).
|
|
860
|
-
|
|
861
|
-
This works similarly to the [`value`](https://ariakit.org/reference/select-provider#value) prop on [Select](https://ariakit.org/components/select) components. If it receives an array, the combobox will allow multiple selections. By default, it's a string that represents the selected value in a single-select combobox.
|
|
862
|
-
|
|
863
|
-
Check out the [Multi-selectable Combobox](https://ariakit.org/examples/combobox-multiple) example to see it in action.
|
|
864
|
-
|
|
865
|
-
### New Combobox components
|
|
866
|
-
|
|
867
|
-
This version introduces new [Combobox](https://ariakit.org/components/combobox) components:
|
|
868
|
-
|
|
869
|
-
- [`ComboboxLabel`](https://ariakit.org/reference/combobox-label): This renders a `label` element for a [`Combobox`](https://ariakit.org/reference/combobox), with the `htmlFor` prop set automatically.
|
|
870
|
-
- [`ComboboxItemCheck`](https://ariakit.org/reference/combobox-item-check): This displays a checkmark for a [`ComboboxItem`](https://ariakit.org/reference/combobox-item) when the item is selected.
|
|
871
|
-
|
|
872
|
-
### Other updates
|
|
873
|
-
|
|
874
|
-
- Added [`resetValueOnSelect`](https://ariakit.org/reference/combobox-provider#resetvalueonselect) state to [Combobox](https://ariakit.org/components/combobox) components.
|
|
875
|
-
- Added [`selectValueOnClick`](https://ariakit.org/reference/combobox-item#selectvalueonclick) prop to [`ComboboxItem`](https://ariakit.org/reference/combobox-item).
|
|
876
|
-
- Fixed [`SelectItem`](https://ariakit.org/reference/select-item) rendering an `aria-selected` attribute even when the [`value`](https://ariakit.org/reference/select-item#value) prop is omitted.
|
|
877
|
-
- Updated dependencies: `@ariakit/react-core@0.3.8`
|
|
878
|
-
|
|
879
|
-
## 0.3.7
|
|
880
|
-
|
|
881
|
-
### Expanding Menubar
|
|
882
|
-
|
|
883
|
-
The [Menubar](https://ariakit.org/components/menubar) component will now only expand if there's another menu already expanded in the same menubar.
|
|
884
|
-
|
|
885
|
-
### Internal data attribute changes
|
|
886
|
-
|
|
887
|
-
Just like the change in v0.3.6 that removed the `data-command` and `data-disclosure` attributes from elements, this update stops the `data-composite-hover` attribute from infiltrating composite item elements in the DOM. We're mentioning this in the changelog as some users might have snapshot tests that require updating.
|
|
888
|
-
|
|
889
|
-
### Other updates
|
|
890
|
-
|
|
891
|
-
- Fixed `setSelectionRange` error when used with [unsupported](https://html.spec.whatwg.org/multipage/input.html#concept-input-apply) input types.
|
|
892
|
-
- Fixed [`MenuButton`](https://ariakit.org/reference/menu-button) with [`showOnHover`](https://ariakit.org/reference/menu-button#showonhover) not updating the `activeId` state when hovered.
|
|
893
|
-
- Updated [`onFocusVisible`](https://ariakit.org/reference/focusable#onfocusvisible) element type on [`Focusable`](https://ariakit.org/reference/focusable) from `Element` to `HTMLElement`.
|
|
894
|
-
- Updated dependencies: `@ariakit/react-core@0.3.7`
|
|
895
|
-
|
|
896
|
-
## 0.3.6
|
|
897
|
-
|
|
898
|
-
### Data attributes for duplicate components
|
|
899
|
-
|
|
900
|
-
The internal logic that identifies duplicate components has been refined. This implies that some internal `data-*` attributes will no longer seep into the rendered DOM elements. If you're doing snapshot tests on the DOM generated by Ariakit components, you should see the `data-command` and `data-disclosure` attributes removed.
|
|
901
|
-
|
|
902
|
-
### Multiple disclosure and anchor elements
|
|
903
|
-
|
|
904
|
-
The `disclosureElement` and `anchorElement` states on [Disclosure](https://ariakit.org/components/disclosure), [Popover](https://ariakit.org/components/popover), and [Menu](https://ariakit.org/components/menu), along with related components, are now set only upon interaction.
|
|
905
|
-
|
|
906
|
-
This change enables us to support multiple disclosure/anchor elements for the same `contentElement` (typically the popup element) when triggered by hover or focus.
|
|
907
|
-
|
|
908
|
-
### Expanding Menubar with focus
|
|
909
|
-
|
|
910
|
-
Adjacent [`Menu`](https://ariakit.org/reference/menu) popups will now open when the focus moves through [`MenuItem`](https://ariakit.org/reference/menu-item) elements in a [Menubar](https://ariakit.org/components/menubar). Before, they would only open when another [`Menu`](https://ariakit.org/reference/menu) was already visible.
|
|
911
|
-
|
|
912
|
-
### Maintaining Popover tab order
|
|
913
|
-
|
|
914
|
-
[`Popover`](https://ariakit.org/reference/popover) and related components now automatically set the new [`preserveTabOrderAnchor`](https://ariakit.org/reference/portal#preservetaborderanchor) prop as the disclosure element.
|
|
915
|
-
|
|
916
|
-
This ensures that, when the [`portal`](https://ariakit.org/reference/popover#portal) prop is enabled, the tab order will be preserved from the disclosure to the content element even when the [`Popover`](https://ariakit.org/reference/popover) component is rendered in a different location in the React tree.
|
|
917
|
-
|
|
918
|
-
### New Menubar components
|
|
919
|
-
|
|
920
|
-
This version introduces a new [Menubar](https://ariakit.org/components/menubar) module that can be used without the [`MenubarProvider`](https://ariakit.org/reference/menubar-provider) wrapper.
|
|
921
|
-
|
|
922
|
-
### Other updates
|
|
923
|
-
|
|
924
|
-
- Fixed [Hovercard](https://ariakit.org/components/hovercard) when used with multiple [`HovercardAnchor`](https://ariakit.org/reference/hovercard-anchor) elements.
|
|
925
|
-
- Added new [`preserveTabOrderAnchor`](https://ariakit.org/reference/portal#preservetaborderanchor) prop to [`Portal`](https://ariakit.org/reference/portal) and related components.
|
|
926
|
-
- Added new [`tabbable`](https://ariakit.org/reference/composite-item#tabbable) prop to [`CompositeItem`](https://ariakit.org/reference/composite-item) and related components.
|
|
927
|
-
- Added new [`blurOnHoverEnd`](https://ariakit.org/reference/composite-hover#bluronhoverend) prop to [`CompositeHover`](https://ariakit.org/reference/composite-hover) and related components.
|
|
928
|
-
- Updated dependencies: `@ariakit/react-core@0.3.6`
|
|
929
|
-
|
|
930
776
|
---
|
|
931
777
|
|
|
932
|
-
[Previous versions](https://github.com/ariakit/ariakit/blob/main/packages/ariakit-react/CHANGELOG-
|
|
778
|
+
[Previous versions](https://github.com/ariakit/ariakit/blob/main/packages/ariakit-react/CHANGELOG-0314.md)
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _RZJLQJQMcjs = require('./RZJLQJQM.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var _JBOLBTVUcjs = require('./JBOLBTVU.cjs');
|
|
9
9
|
|
|
10
10
|
// ../ariakit-react-components/dist/popover/popover-description.js
|
|
11
11
|
var TagName = "p";
|
|
12
|
-
var usePopoverDescription =
|
|
13
|
-
props =
|
|
12
|
+
var usePopoverDescription = _JBOLBTVUcjs.createHook.call(void 0, function usePopoverDescription2(props) {
|
|
13
|
+
props = _RZJLQJQMcjs.useDialogDescription.call(void 0, props);
|
|
14
14
|
return props;
|
|
15
15
|
});
|
|
16
|
-
var PopoverDescription =
|
|
17
|
-
return
|
|
16
|
+
var PopoverDescription = _JBOLBTVUcjs.forwardRef.call(void 0, function PopoverDescription2(props) {
|
|
17
|
+
return _JBOLBTVUcjs.createElement.call(void 0, TagName, usePopoverDescription(props));
|
|
18
18
|
});
|
|
19
19
|
|
|
20
20
|
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _42GL4LKIcjs = require('./42GL4LKI.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var
|
|
9
|
+
var _JBOLBTVUcjs = require('./JBOLBTVU.cjs');
|
|
10
10
|
|
|
11
11
|
// ../ariakit-react-components/dist/composite/composite-context.js
|
|
12
12
|
var _react = require('react');
|
|
13
|
-
var ctx =
|
|
13
|
+
var ctx = _JBOLBTVUcjs.createStoreContext.call(void 0, [_42GL4LKIcjs.CollectionContextProvider], [_42GL4LKIcjs.CollectionScopedContextProvider]);
|
|
14
14
|
var useCompositeContext = ctx.useContext;
|
|
15
15
|
var useCompositeScopedContext = ctx.useScopedContext;
|
|
16
16
|
var useCompositeProviderContext = ctx.useProviderContext;
|
|
@@ -52,9 +52,9 @@ function groupItemsByRows(items) {
|
|
|
52
52
|
return rows;
|
|
53
53
|
}
|
|
54
54
|
function selectTextField(element, collapseToEnd = false) {
|
|
55
|
-
if (
|
|
55
|
+
if (_JBOLBTVUcjs.isTextField.call(void 0, element)) element.setSelectionRange(collapseToEnd ? element.value.length : 0, element.value.length);
|
|
56
56
|
else if (element.isContentEditable) {
|
|
57
|
-
const selection =
|
|
57
|
+
const selection = _JBOLBTVUcjs.getDocument.call(void 0, element).getSelection();
|
|
58
58
|
selection == null ? void 0 : selection.selectAllChildren(element);
|
|
59
59
|
if (collapseToEnd) selection == null ? void 0 : selection.collapseToEnd();
|
|
60
60
|
}
|
|
@@ -93,4 +93,5 @@ function isItem(store, element, exclude) {
|
|
|
93
93
|
|
|
94
94
|
|
|
95
95
|
|
|
96
|
-
|
|
96
|
+
|
|
97
|
+
exports.useCompositeContext = useCompositeContext; exports.useCompositeScopedContext = useCompositeScopedContext; exports.useCompositeProviderContext = useCompositeProviderContext; exports.CompositeContextProvider = CompositeContextProvider; exports.CompositeScopedContextProvider = CompositeScopedContextProvider; exports.CompositeItemContext = CompositeItemContext; exports.CompositeRowContext = CompositeRowContext; exports.flipItems = flipItems; exports.findFirstEnabledItem = findFirstEnabledItem; exports.getEnabledItem = getEnabledItem; exports.groupItemsByRows = groupItemsByRows; exports.selectTextField = selectTextField; exports.focusSilently = focusSilently; exports.silentlyFocused = silentlyFocused; exports.isItem = isItem;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _OP2QHIHDcjs = require('./OP2QHIHD.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var _JBOLBTVUcjs = require('./JBOLBTVU.cjs');
|
|
9
9
|
|
|
10
10
|
// ../ariakit-react-components/dist/focus-trap/focus-trap.js
|
|
11
11
|
var TagName = "span";
|
|
12
|
-
var useFocusTrap =
|
|
12
|
+
var useFocusTrap = _JBOLBTVUcjs.createHook.call(void 0, function useFocusTrap2(props) {
|
|
13
13
|
props = {
|
|
14
14
|
"data-focus-trap": "",
|
|
15
15
|
tabIndex: 0,
|
|
@@ -22,11 +22,11 @@ var useFocusTrap = _QAUJZR6Ycjs.createHook.call(void 0, function useFocusTrap2(p
|
|
|
22
22
|
...props.style
|
|
23
23
|
}
|
|
24
24
|
};
|
|
25
|
-
props =
|
|
25
|
+
props = _OP2QHIHDcjs.useVisuallyHidden.call(void 0, props);
|
|
26
26
|
return props;
|
|
27
27
|
});
|
|
28
|
-
var FocusTrap =
|
|
29
|
-
return
|
|
28
|
+
var FocusTrap = _JBOLBTVUcjs.forwardRef.call(void 0, function FocusTrap2(props) {
|
|
29
|
+
return _JBOLBTVUcjs.createElement.call(void 0, TagName, useFocusTrap(props));
|
|
30
30
|
});
|
|
31
31
|
|
|
32
32
|
|