@react-aria/tag 3.8.1 → 3.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 (197) hide show
  1. package/dist/import.mjs +2 -4
  2. package/dist/main.js +3 -5
  3. package/dist/main.js.map +1 -1
  4. package/dist/module.js +2 -4
  5. package/dist/module.js.map +1 -1
  6. package/dist/types/src/index.d.ts +2 -0
  7. package/package.json +15 -20
  8. package/src/index.ts +2 -4
  9. package/dist/ar-AE.main.js +0 -7
  10. package/dist/ar-AE.main.js.map +0 -1
  11. package/dist/ar-AE.mjs +0 -9
  12. package/dist/ar-AE.module.js +0 -9
  13. package/dist/ar-AE.module.js.map +0 -1
  14. package/dist/bg-BG.main.js +0 -7
  15. package/dist/bg-BG.main.js.map +0 -1
  16. package/dist/bg-BG.mjs +0 -9
  17. package/dist/bg-BG.module.js +0 -9
  18. package/dist/bg-BG.module.js.map +0 -1
  19. package/dist/cs-CZ.main.js +0 -7
  20. package/dist/cs-CZ.main.js.map +0 -1
  21. package/dist/cs-CZ.mjs +0 -9
  22. package/dist/cs-CZ.module.js +0 -9
  23. package/dist/cs-CZ.module.js.map +0 -1
  24. package/dist/da-DK.main.js +0 -7
  25. package/dist/da-DK.main.js.map +0 -1
  26. package/dist/da-DK.mjs +0 -9
  27. package/dist/da-DK.module.js +0 -9
  28. package/dist/da-DK.module.js.map +0 -1
  29. package/dist/de-DE.main.js +0 -7
  30. package/dist/de-DE.main.js.map +0 -1
  31. package/dist/de-DE.mjs +0 -9
  32. package/dist/de-DE.module.js +0 -9
  33. package/dist/de-DE.module.js.map +0 -1
  34. package/dist/el-GR.main.js +0 -7
  35. package/dist/el-GR.main.js.map +0 -1
  36. package/dist/el-GR.mjs +0 -9
  37. package/dist/el-GR.module.js +0 -9
  38. package/dist/el-GR.module.js.map +0 -1
  39. package/dist/en-US.main.js +0 -7
  40. package/dist/en-US.main.js.map +0 -1
  41. package/dist/en-US.mjs +0 -9
  42. package/dist/en-US.module.js +0 -9
  43. package/dist/en-US.module.js.map +0 -1
  44. package/dist/es-ES.main.js +0 -7
  45. package/dist/es-ES.main.js.map +0 -1
  46. package/dist/es-ES.mjs +0 -9
  47. package/dist/es-ES.module.js +0 -9
  48. package/dist/es-ES.module.js.map +0 -1
  49. package/dist/et-EE.main.js +0 -7
  50. package/dist/et-EE.main.js.map +0 -1
  51. package/dist/et-EE.mjs +0 -9
  52. package/dist/et-EE.module.js +0 -9
  53. package/dist/et-EE.module.js.map +0 -1
  54. package/dist/fi-FI.main.js +0 -7
  55. package/dist/fi-FI.main.js.map +0 -1
  56. package/dist/fi-FI.mjs +0 -9
  57. package/dist/fi-FI.module.js +0 -9
  58. package/dist/fi-FI.module.js.map +0 -1
  59. package/dist/fr-FR.main.js +0 -7
  60. package/dist/fr-FR.main.js.map +0 -1
  61. package/dist/fr-FR.mjs +0 -9
  62. package/dist/fr-FR.module.js +0 -9
  63. package/dist/fr-FR.module.js.map +0 -1
  64. package/dist/he-IL.main.js +0 -7
  65. package/dist/he-IL.main.js.map +0 -1
  66. package/dist/he-IL.mjs +0 -9
  67. package/dist/he-IL.module.js +0 -9
  68. package/dist/he-IL.module.js.map +0 -1
  69. package/dist/hr-HR.main.js +0 -7
  70. package/dist/hr-HR.main.js.map +0 -1
  71. package/dist/hr-HR.mjs +0 -9
  72. package/dist/hr-HR.module.js +0 -9
  73. package/dist/hr-HR.module.js.map +0 -1
  74. package/dist/hu-HU.main.js +0 -7
  75. package/dist/hu-HU.main.js.map +0 -1
  76. package/dist/hu-HU.mjs +0 -9
  77. package/dist/hu-HU.module.js +0 -9
  78. package/dist/hu-HU.module.js.map +0 -1
  79. package/dist/intlStrings.main.js +0 -108
  80. package/dist/intlStrings.main.js.map +0 -1
  81. package/dist/intlStrings.mjs +0 -110
  82. package/dist/intlStrings.module.js +0 -110
  83. package/dist/intlStrings.module.js.map +0 -1
  84. package/dist/it-IT.main.js +0 -7
  85. package/dist/it-IT.main.js.map +0 -1
  86. package/dist/it-IT.mjs +0 -9
  87. package/dist/it-IT.module.js +0 -9
  88. package/dist/it-IT.module.js.map +0 -1
  89. package/dist/ja-JP.main.js +0 -7
  90. package/dist/ja-JP.main.js.map +0 -1
  91. package/dist/ja-JP.mjs +0 -9
  92. package/dist/ja-JP.module.js +0 -9
  93. package/dist/ja-JP.module.js.map +0 -1
  94. package/dist/ko-KR.main.js +0 -7
  95. package/dist/ko-KR.main.js.map +0 -1
  96. package/dist/ko-KR.mjs +0 -9
  97. package/dist/ko-KR.module.js +0 -9
  98. package/dist/ko-KR.module.js.map +0 -1
  99. package/dist/lt-LT.main.js +0 -7
  100. package/dist/lt-LT.main.js.map +0 -1
  101. package/dist/lt-LT.mjs +0 -9
  102. package/dist/lt-LT.module.js +0 -9
  103. package/dist/lt-LT.module.js.map +0 -1
  104. package/dist/lv-LV.main.js +0 -7
  105. package/dist/lv-LV.main.js.map +0 -1
  106. package/dist/lv-LV.mjs +0 -9
  107. package/dist/lv-LV.module.js +0 -9
  108. package/dist/lv-LV.module.js.map +0 -1
  109. package/dist/nb-NO.main.js +0 -7
  110. package/dist/nb-NO.main.js.map +0 -1
  111. package/dist/nb-NO.mjs +0 -9
  112. package/dist/nb-NO.module.js +0 -9
  113. package/dist/nb-NO.module.js.map +0 -1
  114. package/dist/nl-NL.main.js +0 -7
  115. package/dist/nl-NL.main.js.map +0 -1
  116. package/dist/nl-NL.mjs +0 -9
  117. package/dist/nl-NL.module.js +0 -9
  118. package/dist/nl-NL.module.js.map +0 -1
  119. package/dist/pl-PL.main.js +0 -7
  120. package/dist/pl-PL.main.js.map +0 -1
  121. package/dist/pl-PL.mjs +0 -9
  122. package/dist/pl-PL.module.js +0 -9
  123. package/dist/pl-PL.module.js.map +0 -1
  124. package/dist/pt-BR.main.js +0 -7
  125. package/dist/pt-BR.main.js.map +0 -1
  126. package/dist/pt-BR.mjs +0 -9
  127. package/dist/pt-BR.module.js +0 -9
  128. package/dist/pt-BR.module.js.map +0 -1
  129. package/dist/pt-PT.main.js +0 -7
  130. package/dist/pt-PT.main.js.map +0 -1
  131. package/dist/pt-PT.mjs +0 -9
  132. package/dist/pt-PT.module.js +0 -9
  133. package/dist/pt-PT.module.js.map +0 -1
  134. package/dist/ro-RO.main.js +0 -7
  135. package/dist/ro-RO.main.js.map +0 -1
  136. package/dist/ro-RO.mjs +0 -9
  137. package/dist/ro-RO.module.js +0 -9
  138. package/dist/ro-RO.module.js.map +0 -1
  139. package/dist/ru-RU.main.js +0 -7
  140. package/dist/ru-RU.main.js.map +0 -1
  141. package/dist/ru-RU.mjs +0 -9
  142. package/dist/ru-RU.module.js +0 -9
  143. package/dist/ru-RU.module.js.map +0 -1
  144. package/dist/sk-SK.main.js +0 -7
  145. package/dist/sk-SK.main.js.map +0 -1
  146. package/dist/sk-SK.mjs +0 -9
  147. package/dist/sk-SK.module.js +0 -9
  148. package/dist/sk-SK.module.js.map +0 -1
  149. package/dist/sl-SI.main.js +0 -7
  150. package/dist/sl-SI.main.js.map +0 -1
  151. package/dist/sl-SI.mjs +0 -9
  152. package/dist/sl-SI.module.js +0 -9
  153. package/dist/sl-SI.module.js.map +0 -1
  154. package/dist/sr-SP.main.js +0 -7
  155. package/dist/sr-SP.main.js.map +0 -1
  156. package/dist/sr-SP.mjs +0 -9
  157. package/dist/sr-SP.module.js +0 -9
  158. package/dist/sr-SP.module.js.map +0 -1
  159. package/dist/sv-SE.main.js +0 -7
  160. package/dist/sv-SE.main.js.map +0 -1
  161. package/dist/sv-SE.mjs +0 -9
  162. package/dist/sv-SE.module.js +0 -9
  163. package/dist/sv-SE.module.js.map +0 -1
  164. package/dist/tr-TR.main.js +0 -7
  165. package/dist/tr-TR.main.js.map +0 -1
  166. package/dist/tr-TR.mjs +0 -9
  167. package/dist/tr-TR.module.js +0 -9
  168. package/dist/tr-TR.module.js.map +0 -1
  169. package/dist/types.d.ts +0 -73
  170. package/dist/types.d.ts.map +0 -1
  171. package/dist/uk-UA.main.js +0 -7
  172. package/dist/uk-UA.main.js.map +0 -1
  173. package/dist/uk-UA.mjs +0 -9
  174. package/dist/uk-UA.module.js +0 -9
  175. package/dist/uk-UA.module.js.map +0 -1
  176. package/dist/useTag.main.js +0 -94
  177. package/dist/useTag.main.js.map +0 -1
  178. package/dist/useTag.mjs +0 -89
  179. package/dist/useTag.module.js +0 -89
  180. package/dist/useTag.module.js.map +0 -1
  181. package/dist/useTagGroup.main.js +0 -90
  182. package/dist/useTagGroup.main.js.map +0 -1
  183. package/dist/useTagGroup.mjs +0 -84
  184. package/dist/useTagGroup.module.js +0 -84
  185. package/dist/useTagGroup.module.js.map +0 -1
  186. package/dist/zh-CN.main.js +0 -7
  187. package/dist/zh-CN.main.js.map +0 -1
  188. package/dist/zh-CN.mjs +0 -9
  189. package/dist/zh-CN.module.js +0 -9
  190. package/dist/zh-CN.module.js.map +0 -1
  191. package/dist/zh-TW.main.js +0 -7
  192. package/dist/zh-TW.main.js.map +0 -1
  193. package/dist/zh-TW.mjs +0 -9
  194. package/dist/zh-TW.module.js +0 -9
  195. package/dist/zh-TW.module.js.map +0 -1
  196. package/src/useTag.ts +0 -119
  197. package/src/useTagGroup.ts +0 -128
@@ -1,7 +0,0 @@
1
- module.exports = {
2
- "removeButtonLabel": `\u{79FB}\u{9664}`,
3
- "removeDescription": `\u{6309} Delete \u{9375}\u{4EE5}\u{79FB}\u{9664}\u{6A19}\u{8A18}\u{3002}`
4
- };
5
-
6
-
7
- //# sourceMappingURL=zh-TW.main.js.map
@@ -1 +0,0 @@
1
- {"mappings":"AAAA,iBAAiB;IAAG,qBAAqB,CAAC,gBAAE,CAAC;IAC3C,qBAAqB,CAAC,wEAAgB,CAAC;AACzC","sources":["packages/@react-aria/tag/intl/zh-TW.json"],"sourcesContent":["{\n \"removeButtonLabel\": \"移除\",\n \"removeDescription\": \"按 Delete 鍵以移除標記。\"\n}\n"],"names":[],"version":3,"file":"zh-TW.main.js.map"}
package/dist/zh-TW.mjs DELETED
@@ -1,9 +0,0 @@
1
- var $09cd168ab18773f4$exports = {};
2
- $09cd168ab18773f4$exports = {
3
- "removeButtonLabel": `\u{79FB}\u{9664}`,
4
- "removeDescription": `\u{6309} Delete \u{9375}\u{4EE5}\u{79FB}\u{9664}\u{6A19}\u{8A18}\u{3002}`
5
- };
6
-
7
-
8
- export {$09cd168ab18773f4$exports as default};
9
- //# sourceMappingURL=zh-TW.module.js.map
@@ -1,9 +0,0 @@
1
- var $09cd168ab18773f4$exports = {};
2
- $09cd168ab18773f4$exports = {
3
- "removeButtonLabel": `\u{79FB}\u{9664}`,
4
- "removeDescription": `\u{6309} Delete \u{9375}\u{4EE5}\u{79FB}\u{9664}\u{6A19}\u{8A18}\u{3002}`
5
- };
6
-
7
-
8
- export {$09cd168ab18773f4$exports as default};
9
- //# sourceMappingURL=zh-TW.module.js.map
@@ -1 +0,0 @@
1
- {"mappings":";AAAA,4BAAiB;IAAG,qBAAqB,CAAC,gBAAE,CAAC;IAC3C,qBAAqB,CAAC,wEAAgB,CAAC;AACzC","sources":["packages/@react-aria/tag/intl/zh-TW.json"],"sourcesContent":["{\n \"removeButtonLabel\": \"移除\",\n \"removeDescription\": \"按 Delete 鍵以移除標記。\"\n}\n"],"names":[],"version":3,"file":"zh-TW.module.js.map"}
package/src/useTag.ts DELETED
@@ -1,119 +0,0 @@
1
- /*
2
- * Copyright 2020 Adobe. All rights reserved.
3
- * This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
- * you may not use this file except in compliance with the License. You may obtain a copy
5
- * of the License at http://www.apache.org/licenses/LICENSE-2.0
6
- *
7
- * Unless required by applicable law or agreed to in writing, software distributed under
8
- * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9
- * OF ANY KIND, either express or implied. See the License for the specific language
10
- * governing permissions and limitations under the License.
11
- */
12
-
13
- import {AriaButtonProps} from '@react-types/button';
14
- import {DOMAttributes, FocusableElement, Node, RefObject} from '@react-types/shared';
15
- import {filterDOMProps, mergeProps, useDescription, useId, useSyntheticLinkProps} from '@react-aria/utils';
16
- import {hookData} from './useTagGroup';
17
- // @ts-ignore
18
- import intlMessages from '../intl/*.json';
19
- import {KeyboardEvent} from 'react';
20
- import type {ListState} from '@react-stately/list';
21
- import {SelectableItemStates} from '@react-aria/selection';
22
- import {useFocusable, useInteractionModality} from '@react-aria/interactions';
23
- import {useGridListItem} from '@react-aria/gridlist';
24
- import {useLocalizedStringFormatter} from '@react-aria/i18n';
25
-
26
-
27
- export interface TagAria extends Omit<SelectableItemStates, 'hasAction'> {
28
- /** Props for the tag row element. */
29
- rowProps: DOMAttributes,
30
- /** Props for the tag cell element. */
31
- gridCellProps: DOMAttributes,
32
- /** Props for the tag remove button. */
33
- removeButtonProps: AriaButtonProps,
34
- /** Whether the tag can be removed. */
35
- allowsRemoving: boolean
36
- }
37
-
38
- export interface AriaTagProps<T> {
39
- /** An object representing the tag. Contains all the relevant information that makes up the tag. */
40
- item: Node<T>
41
- }
42
-
43
- /**
44
- * Provides the behavior and accessibility implementation for a tag component.
45
- * @param props - Props to be applied to the tag.
46
- * @param state - State for the tag group, as returned by `useListState`.
47
- * @param ref - A ref to a DOM element for the tag.
48
- */
49
- export function useTag<T>(props: AriaTagProps<T>, state: ListState<T>, ref: RefObject<FocusableElement | null>): TagAria {
50
- let {item} = props;
51
- let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-aria/tag');
52
- let buttonId = useId();
53
-
54
- let {onRemove} = hookData.get(state) || {};
55
- let {rowProps, gridCellProps, ...states} = useGridListItem({
56
- node: item
57
- }, state, ref);
58
-
59
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
60
- let {descriptionProps: _, ...stateWithoutDescription} = states;
61
-
62
- let isDisabled = state.disabledKeys.has(item.key) || item.props.isDisabled;
63
- let onKeyDown = (e: KeyboardEvent) => {
64
- if (e.key === 'Delete' || e.key === 'Backspace') {
65
- if (isDisabled) {
66
- return;
67
- }
68
-
69
- e.preventDefault();
70
- if (state.selectionManager.isSelected(item.key)) {
71
- onRemove?.(new Set(state.selectionManager.selectedKeys));
72
- } else {
73
- onRemove?.(new Set([item.key]));
74
- }
75
- }
76
- };
77
-
78
- let modality = useInteractionModality();
79
- if (modality === 'virtual' && (typeof window !== 'undefined' && 'ontouchstart' in window)) {
80
- modality = 'pointer';
81
- }
82
- let description = onRemove && (modality === 'keyboard' || modality === 'virtual') ? stringFormatter.format('removeDescription') : '';
83
- let descProps = useDescription(description);
84
-
85
- let isItemFocused = item.key === state.selectionManager.focusedKey;
86
- let isFocused = state.selectionManager.focusedKey != null;
87
- let tabIndex = -1;
88
- if (!isDisabled && (isItemFocused || !isFocused)) {
89
- tabIndex = 0;
90
- }
91
-
92
- let domProps = filterDOMProps(item.props);
93
- let linkProps = useSyntheticLinkProps(item.props);
94
- let {focusableProps} = useFocusable({
95
- ...item.props,
96
- isDisabled
97
- }, ref);
98
-
99
- return {
100
- removeButtonProps: {
101
- 'aria-label': stringFormatter.format('removeButtonLabel'),
102
- 'aria-labelledby': `${buttonId} ${rowProps.id}`,
103
- isDisabled,
104
- id: buttonId,
105
- onPress: () => onRemove ? onRemove(new Set([item.key])) : null
106
- },
107
- rowProps: mergeProps(focusableProps, rowProps, domProps, linkProps, {
108
- tabIndex,
109
- onKeyDown: onRemove ? onKeyDown : undefined,
110
- 'aria-describedby': descProps['aria-describedby']
111
- }),
112
- gridCellProps: mergeProps(gridCellProps, {
113
- 'aria-errormessage': props['aria-errormessage'],
114
- 'aria-label': props['aria-label']
115
- }),
116
- ...stateWithoutDescription,
117
- allowsRemoving: !!onRemove
118
- };
119
- }
@@ -1,128 +0,0 @@
1
- /*
2
- * Copyright 2020 Adobe. All rights reserved.
3
- * This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
- * you may not use this file except in compliance with the License. You may obtain a copy
5
- * of the License at http://www.apache.org/licenses/LICENSE-2.0
6
- *
7
- * Unless required by applicable law or agreed to in writing, software distributed under
8
- * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9
- * OF ANY KIND, either express or implied. See the License for the specific language
10
- * governing permissions and limitations under the License.
11
- */
12
-
13
- import {AriaGridListProps, useGridList} from '@react-aria/gridlist';
14
- import {AriaLabelingProps, CollectionBase, DOMAttributes, DOMProps, HelpTextProps, Key, KeyboardDelegate, LabelableProps, MultipleSelection, RefObject, SelectionBehavior} from '@react-types/shared';
15
- import {filterDOMProps, mergeProps} from '@react-aria/utils';
16
- import {ListKeyboardDelegate} from '@react-aria/selection';
17
- import type {ListState} from '@react-stately/list';
18
- import {ReactNode, useEffect, useRef, useState} from 'react';
19
- import {useField} from '@react-aria/label';
20
- import {useFocusWithin} from '@react-aria/interactions';
21
- import {useLocale} from '@react-aria/i18n';
22
-
23
- export interface TagGroupAria {
24
- /** Props for the tag grouping element. */
25
- gridProps: DOMAttributes,
26
- /** Props for the tag group's visible label (if any). */
27
- labelProps: DOMAttributes,
28
- /** Props for the tag group description element, if any. */
29
- descriptionProps: DOMAttributes,
30
- /** Props for the tag group error message element, if any. */
31
- errorMessageProps: DOMAttributes
32
- }
33
-
34
- export interface AriaTagGroupProps<T> extends CollectionBase<T>, MultipleSelection, Pick<AriaGridListProps<T>, 'escapeKeyBehavior'>, DOMProps, LabelableProps, AriaLabelingProps, Omit<HelpTextProps, 'errorMessage'> {
35
- /** How multiple selection should behave in the collection. */
36
- selectionBehavior?: SelectionBehavior,
37
- /** Whether selection should occur on press up instead of press down. */
38
- shouldSelectOnPressUp?: boolean,
39
- /** Handler that is called when a user deletes a tag. */
40
- onRemove?: (keys: Set<Key>) => void,
41
- /** An error message for the field. */
42
- errorMessage?: ReactNode,
43
- /**
44
- * Whether pressing the escape key should clear selection in the TagGroup or not.
45
- *
46
- * Most experiences should not modify this option as it eliminates a keyboard user's ability to
47
- * easily clear selection. Only use if the escape key is being handled externally or should not
48
- * trigger selection clearing contextually.
49
- * @default 'clearSelection'
50
- */
51
- escapeKeyBehavior?: 'clearSelection' | 'none'
52
- }
53
-
54
- export interface AriaTagGroupOptions<T> extends Omit<AriaTagGroupProps<T>, 'children'> {
55
- /**
56
- * An optional keyboard delegate to handle arrow key navigation,
57
- * to override the default.
58
- */
59
- keyboardDelegate?: KeyboardDelegate
60
- }
61
-
62
- interface HookData {
63
- onRemove?: (keys: Set<Key>) => void
64
- }
65
-
66
- export const hookData: WeakMap<ListState<any>, HookData> = new WeakMap<ListState<any>, HookData>();
67
-
68
- /**
69
- * Provides the behavior and accessibility implementation for a tag group component.
70
- * A tag group is a focusable list of labels, categories, keywords, filters, or other items, with support for keyboard navigation, selection, and removal.
71
- * @param props - Props to be applied to the tag group.
72
- * @param state - State for the tag group, as returned by `useListState`.
73
- * @param ref - A ref to a DOM element for the tag group.
74
- */
75
- export function useTagGroup<T>(props: AriaTagGroupOptions<T>, state: ListState<T>, ref: RefObject<HTMLElement | null>): TagGroupAria {
76
- let {direction} = useLocale();
77
- let keyboardDelegate = props.keyboardDelegate || new ListKeyboardDelegate({
78
- collection: state.collection,
79
- ref,
80
- orientation: 'horizontal',
81
- direction,
82
- disabledKeys: state.disabledKeys,
83
- disabledBehavior: state.selectionManager.disabledBehavior
84
- });
85
- let {labelProps, fieldProps, descriptionProps, errorMessageProps} = useField({
86
- ...props,
87
- labelElementType: 'span'
88
- });
89
- let {gridProps} = useGridList({
90
- ...props,
91
- ...fieldProps,
92
- keyboardDelegate,
93
- shouldFocusWrap: true,
94
- linkBehavior: 'override',
95
- keyboardNavigationBehavior: 'tab'
96
- }, state, ref);
97
-
98
- let [isFocusWithin, setFocusWithin] = useState(false);
99
- let {focusWithinProps} = useFocusWithin({
100
- onFocusWithinChange: setFocusWithin
101
- });
102
- let domProps = filterDOMProps(props);
103
-
104
- // If the last tag is removed, focus the container.
105
- let prevCount = useRef(state.collection.size);
106
- useEffect(() => {
107
- if (ref.current && prevCount.current > 0 && state.collection.size === 0 && isFocusWithin) {
108
- ref.current.focus();
109
- }
110
- prevCount.current = state.collection.size;
111
- }, [state.collection.size, isFocusWithin, ref]);
112
-
113
- hookData.set(state, {onRemove: props.onRemove});
114
-
115
- return {
116
- gridProps: mergeProps(gridProps, domProps, {
117
- role: state.collection.size ? 'grid' : 'group',
118
- 'aria-atomic': false,
119
- 'aria-relevant': 'additions',
120
- 'aria-live': isFocusWithin ? 'polite' : 'off',
121
- ...focusWithinProps,
122
- ...fieldProps
123
- }),
124
- labelProps,
125
- descriptionProps,
126
- errorMessageProps
127
- };
128
- }