@react-aria/tag 3.4.0 → 3.4.1
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/dist/ar-AE.mjs +1 -1
- package/dist/bg-BG.mjs +1 -1
- package/dist/cs-CZ.mjs +1 -1
- package/dist/da-DK.mjs +1 -1
- package/dist/de-DE.mjs +1 -1
- package/dist/el-GR.mjs +1 -1
- package/dist/en-US.mjs +1 -1
- package/dist/es-ES.mjs +1 -1
- package/dist/et-EE.mjs +1 -1
- package/dist/fi-FI.mjs +1 -1
- package/dist/fr-FR.mjs +1 -1
- package/dist/he-IL.mjs +1 -1
- package/dist/hr-HR.mjs +1 -1
- package/dist/hu-HU.mjs +1 -1
- package/dist/intlStrings.mjs +1 -1
- package/dist/it-IT.mjs +1 -1
- package/dist/ja-JP.mjs +1 -1
- package/dist/ko-KR.mjs +1 -1
- package/dist/lt-LT.mjs +1 -1
- package/dist/lv-LV.mjs +1 -1
- package/dist/nb-NO.mjs +1 -1
- package/dist/nl-NL.mjs +1 -1
- package/dist/pl-PL.mjs +1 -1
- package/dist/pt-BR.mjs +1 -1
- package/dist/pt-PT.mjs +1 -1
- package/dist/ro-RO.mjs +1 -1
- package/dist/ru-RU.mjs +1 -1
- package/dist/sk-SK.mjs +1 -1
- package/dist/sl-SI.mjs +1 -1
- package/dist/sr-SP.mjs +1 -1
- package/dist/sv-SE.mjs +1 -1
- package/dist/tr-TR.mjs +1 -1
- package/dist/uk-UA.mjs +1 -1
- package/dist/useTag.main.js +9 -9
- package/dist/useTag.mjs +10 -10
- package/dist/useTag.module.js +9 -9
- package/dist/useTagGroup.main.js +7 -7
- package/dist/useTagGroup.mjs +8 -8
- package/dist/useTagGroup.module.js +7 -7
- package/dist/zh-CN.mjs +1 -1
- package/dist/zh-TW.mjs +1 -1
- package/package.json +11 -11
package/dist/ar-AE.mjs
CHANGED
package/dist/bg-BG.mjs
CHANGED
package/dist/cs-CZ.mjs
CHANGED
package/dist/da-DK.mjs
CHANGED
package/dist/de-DE.mjs
CHANGED
package/dist/el-GR.mjs
CHANGED
package/dist/en-US.mjs
CHANGED
package/dist/es-ES.mjs
CHANGED
package/dist/et-EE.mjs
CHANGED
package/dist/fi-FI.mjs
CHANGED
package/dist/fr-FR.mjs
CHANGED
package/dist/he-IL.mjs
CHANGED
package/dist/hr-HR.mjs
CHANGED
package/dist/hu-HU.mjs
CHANGED
package/dist/intlStrings.mjs
CHANGED
package/dist/it-IT.mjs
CHANGED
package/dist/ja-JP.mjs
CHANGED
package/dist/ko-KR.mjs
CHANGED
package/dist/lt-LT.mjs
CHANGED
package/dist/lv-LV.mjs
CHANGED
package/dist/nb-NO.mjs
CHANGED
package/dist/nl-NL.mjs
CHANGED
package/dist/pl-PL.mjs
CHANGED
package/dist/pt-BR.mjs
CHANGED
package/dist/pt-PT.mjs
CHANGED
package/dist/ro-RO.mjs
CHANGED
package/dist/ru-RU.mjs
CHANGED
package/dist/sk-SK.mjs
CHANGED
package/dist/sl-SI.mjs
CHANGED
package/dist/sr-SP.mjs
CHANGED
package/dist/sv-SE.mjs
CHANGED
package/dist/tr-TR.mjs
CHANGED
package/dist/uk-UA.mjs
CHANGED
package/dist/useTag.main.js
CHANGED
|
@@ -33,7 +33,7 @@ $parcel$export(module.exports, "useTag", () => $a442534c81d8ad16$export$3f568fff
|
|
|
33
33
|
|
|
34
34
|
function $a442534c81d8ad16$export$3f568fff7dff2f03(props, state, ref) {
|
|
35
35
|
let { item: item } = props;
|
|
36
|
-
let stringFormatter = (0, $8p8DL$reactariai18n.useLocalizedStringFormatter)((0, ($parcel$interopDefault($b6a2538ff098a9ff$exports))),
|
|
36
|
+
let stringFormatter = (0, $8p8DL$reactariai18n.useLocalizedStringFormatter)((0, ($parcel$interopDefault($b6a2538ff098a9ff$exports))), '@react-aria/tag');
|
|
37
37
|
let buttonId = (0, $8p8DL$reactariautils.useId)();
|
|
38
38
|
let { onRemove: onRemove } = (0, $09704b0efefe5140$exports.hookData).get(state) || {};
|
|
39
39
|
let { rowProps: rowProps, gridCellProps: gridCellProps, ...states } = (0, $8p8DL$reactariagridlist.useGridListItem)({
|
|
@@ -44,7 +44,7 @@ function $a442534c81d8ad16$export$3f568fff7dff2f03(props, state, ref) {
|
|
|
44
44
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
45
45
|
let { descriptionProps: _, ...stateWithoutDescription } = states;
|
|
46
46
|
let onKeyDown = (e)=>{
|
|
47
|
-
if (e.key ===
|
|
47
|
+
if (e.key === 'Delete' || e.key === 'Backspace') {
|
|
48
48
|
e.preventDefault();
|
|
49
49
|
if (state.selectionManager.isSelected(item.key)) onRemove === null || onRemove === void 0 ? void 0 : onRemove(new Set(state.selectionManager.selectedKeys));
|
|
50
50
|
else onRemove === null || onRemove === void 0 ? void 0 : onRemove(new Set([
|
|
@@ -53,8 +53,8 @@ function $a442534c81d8ad16$export$3f568fff7dff2f03(props, state, ref) {
|
|
|
53
53
|
}
|
|
54
54
|
};
|
|
55
55
|
let modality = (0, $8p8DL$reactariainteractions.useInteractionModality)();
|
|
56
|
-
if (modality ===
|
|
57
|
-
let description = onRemove && (modality ===
|
|
56
|
+
if (modality === 'virtual' && typeof window !== 'undefined' && 'ontouchstart' in window) modality = 'pointer';
|
|
57
|
+
let description = onRemove && (modality === 'keyboard' || modality === 'virtual') ? stringFormatter.format('removeDescription') : '';
|
|
58
58
|
let descProps = (0, $8p8DL$reactariautils.useDescription)(description);
|
|
59
59
|
let isFocused = item.key === state.selectionManager.focusedKey;
|
|
60
60
|
// @ts-ignore - data attributes are ok but TS doesn't know about them.
|
|
@@ -62,8 +62,8 @@ function $a442534c81d8ad16$export$3f568fff7dff2f03(props, state, ref) {
|
|
|
62
62
|
let linkProps = (0, $8p8DL$reactariautils.getSyntheticLinkProps)(item.props);
|
|
63
63
|
return {
|
|
64
64
|
removeButtonProps: {
|
|
65
|
-
|
|
66
|
-
|
|
65
|
+
'aria-label': stringFormatter.format('removeButtonLabel'),
|
|
66
|
+
'aria-labelledby': `${buttonId} ${rowProps.id}`,
|
|
67
67
|
id: buttonId,
|
|
68
68
|
onPress: ()=>onRemove ? onRemove(new Set([
|
|
69
69
|
item.key
|
|
@@ -73,11 +73,11 @@ function $a442534c81d8ad16$export$3f568fff7dff2f03(props, state, ref) {
|
|
|
73
73
|
rowProps: (0, $8p8DL$reactariautils.mergeProps)(rowProps, domProps, linkProps, {
|
|
74
74
|
tabIndex: isFocused || state.selectionManager.focusedKey == null ? 0 : -1,
|
|
75
75
|
onKeyDown: onRemove ? onKeyDown : undefined,
|
|
76
|
-
|
|
76
|
+
'aria-describedby': descProps['aria-describedby']
|
|
77
77
|
}),
|
|
78
78
|
gridCellProps: (0, $8p8DL$reactariautils.mergeProps)(gridCellProps, {
|
|
79
|
-
|
|
80
|
-
|
|
79
|
+
'aria-errormessage': props['aria-errormessage'],
|
|
80
|
+
'aria-label': props['aria-label']
|
|
81
81
|
}),
|
|
82
82
|
...stateWithoutDescription,
|
|
83
83
|
allowsRemoving: !!onRemove
|
package/dist/useTag.mjs
CHANGED
|
@@ -27,7 +27,7 @@ function $parcel$interopDefault(a) {
|
|
|
27
27
|
|
|
28
28
|
function $fc6126c82a4601f1$export$3f568fff7dff2f03(props, state, ref) {
|
|
29
29
|
let { item: item } = props;
|
|
30
|
-
let stringFormatter = (0, $ioKwR$useLocalizedStringFormatter)((0, ($parcel$interopDefault($ioKwR$intlStringsmodulejs))),
|
|
30
|
+
let stringFormatter = (0, $ioKwR$useLocalizedStringFormatter)((0, ($parcel$interopDefault($ioKwR$intlStringsmodulejs))), '@react-aria/tag');
|
|
31
31
|
let buttonId = (0, $ioKwR$useId)();
|
|
32
32
|
let { onRemove: onRemove } = (0, $d7323bca8d074eeb$export$653eddfc964b0f8a).get(state) || {};
|
|
33
33
|
let { rowProps: rowProps, gridCellProps: gridCellProps, ...states } = (0, $ioKwR$useGridListItem)({
|
|
@@ -38,7 +38,7 @@ function $fc6126c82a4601f1$export$3f568fff7dff2f03(props, state, ref) {
|
|
|
38
38
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
39
39
|
let { descriptionProps: _, ...stateWithoutDescription } = states;
|
|
40
40
|
let onKeyDown = (e)=>{
|
|
41
|
-
if (e.key ===
|
|
41
|
+
if (e.key === 'Delete' || e.key === 'Backspace') {
|
|
42
42
|
e.preventDefault();
|
|
43
43
|
if (state.selectionManager.isSelected(item.key)) onRemove === null || onRemove === void 0 ? void 0 : onRemove(new Set(state.selectionManager.selectedKeys));
|
|
44
44
|
else onRemove === null || onRemove === void 0 ? void 0 : onRemove(new Set([
|
|
@@ -47,8 +47,8 @@ function $fc6126c82a4601f1$export$3f568fff7dff2f03(props, state, ref) {
|
|
|
47
47
|
}
|
|
48
48
|
};
|
|
49
49
|
let modality = (0, $ioKwR$useInteractionModality)();
|
|
50
|
-
if (modality ===
|
|
51
|
-
let description = onRemove && (modality ===
|
|
50
|
+
if (modality === 'virtual' && typeof window !== 'undefined' && 'ontouchstart' in window) modality = 'pointer';
|
|
51
|
+
let description = onRemove && (modality === 'keyboard' || modality === 'virtual') ? stringFormatter.format('removeDescription') : '';
|
|
52
52
|
let descProps = (0, $ioKwR$useDescription)(description);
|
|
53
53
|
let isFocused = item.key === state.selectionManager.focusedKey;
|
|
54
54
|
// @ts-ignore - data attributes are ok but TS doesn't know about them.
|
|
@@ -56,8 +56,8 @@ function $fc6126c82a4601f1$export$3f568fff7dff2f03(props, state, ref) {
|
|
|
56
56
|
let linkProps = (0, $ioKwR$getSyntheticLinkProps)(item.props);
|
|
57
57
|
return {
|
|
58
58
|
removeButtonProps: {
|
|
59
|
-
|
|
60
|
-
|
|
59
|
+
'aria-label': stringFormatter.format('removeButtonLabel'),
|
|
60
|
+
'aria-labelledby': `${buttonId} ${rowProps.id}`,
|
|
61
61
|
id: buttonId,
|
|
62
62
|
onPress: ()=>onRemove ? onRemove(new Set([
|
|
63
63
|
item.key
|
|
@@ -67,11 +67,11 @@ function $fc6126c82a4601f1$export$3f568fff7dff2f03(props, state, ref) {
|
|
|
67
67
|
rowProps: (0, $ioKwR$mergeProps)(rowProps, domProps, linkProps, {
|
|
68
68
|
tabIndex: isFocused || state.selectionManager.focusedKey == null ? 0 : -1,
|
|
69
69
|
onKeyDown: onRemove ? onKeyDown : undefined,
|
|
70
|
-
|
|
70
|
+
'aria-describedby': descProps['aria-describedby']
|
|
71
71
|
}),
|
|
72
72
|
gridCellProps: (0, $ioKwR$mergeProps)(gridCellProps, {
|
|
73
|
-
|
|
74
|
-
|
|
73
|
+
'aria-errormessage': props['aria-errormessage'],
|
|
74
|
+
'aria-label': props['aria-label']
|
|
75
75
|
}),
|
|
76
76
|
...stateWithoutDescription,
|
|
77
77
|
allowsRemoving: !!onRemove
|
|
@@ -80,4 +80,4 @@ function $fc6126c82a4601f1$export$3f568fff7dff2f03(props, state, ref) {
|
|
|
80
80
|
|
|
81
81
|
|
|
82
82
|
export {$fc6126c82a4601f1$export$3f568fff7dff2f03 as useTag};
|
|
83
|
-
//# sourceMappingURL=useTag.
|
|
83
|
+
//# sourceMappingURL=useTag.module.js.map
|
package/dist/useTag.module.js
CHANGED
|
@@ -27,7 +27,7 @@ function $parcel$interopDefault(a) {
|
|
|
27
27
|
|
|
28
28
|
function $fc6126c82a4601f1$export$3f568fff7dff2f03(props, state, ref) {
|
|
29
29
|
let { item: item } = props;
|
|
30
|
-
let stringFormatter = (0, $ioKwR$useLocalizedStringFormatter)((0, ($parcel$interopDefault($ioKwR$intlStringsmodulejs))),
|
|
30
|
+
let stringFormatter = (0, $ioKwR$useLocalizedStringFormatter)((0, ($parcel$interopDefault($ioKwR$intlStringsmodulejs))), '@react-aria/tag');
|
|
31
31
|
let buttonId = (0, $ioKwR$useId)();
|
|
32
32
|
let { onRemove: onRemove } = (0, $d7323bca8d074eeb$export$653eddfc964b0f8a).get(state) || {};
|
|
33
33
|
let { rowProps: rowProps, gridCellProps: gridCellProps, ...states } = (0, $ioKwR$useGridListItem)({
|
|
@@ -38,7 +38,7 @@ function $fc6126c82a4601f1$export$3f568fff7dff2f03(props, state, ref) {
|
|
|
38
38
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
39
39
|
let { descriptionProps: _, ...stateWithoutDescription } = states;
|
|
40
40
|
let onKeyDown = (e)=>{
|
|
41
|
-
if (e.key ===
|
|
41
|
+
if (e.key === 'Delete' || e.key === 'Backspace') {
|
|
42
42
|
e.preventDefault();
|
|
43
43
|
if (state.selectionManager.isSelected(item.key)) onRemove === null || onRemove === void 0 ? void 0 : onRemove(new Set(state.selectionManager.selectedKeys));
|
|
44
44
|
else onRemove === null || onRemove === void 0 ? void 0 : onRemove(new Set([
|
|
@@ -47,8 +47,8 @@ function $fc6126c82a4601f1$export$3f568fff7dff2f03(props, state, ref) {
|
|
|
47
47
|
}
|
|
48
48
|
};
|
|
49
49
|
let modality = (0, $ioKwR$useInteractionModality)();
|
|
50
|
-
if (modality ===
|
|
51
|
-
let description = onRemove && (modality ===
|
|
50
|
+
if (modality === 'virtual' && typeof window !== 'undefined' && 'ontouchstart' in window) modality = 'pointer';
|
|
51
|
+
let description = onRemove && (modality === 'keyboard' || modality === 'virtual') ? stringFormatter.format('removeDescription') : '';
|
|
52
52
|
let descProps = (0, $ioKwR$useDescription)(description);
|
|
53
53
|
let isFocused = item.key === state.selectionManager.focusedKey;
|
|
54
54
|
// @ts-ignore - data attributes are ok but TS doesn't know about them.
|
|
@@ -56,8 +56,8 @@ function $fc6126c82a4601f1$export$3f568fff7dff2f03(props, state, ref) {
|
|
|
56
56
|
let linkProps = (0, $ioKwR$getSyntheticLinkProps)(item.props);
|
|
57
57
|
return {
|
|
58
58
|
removeButtonProps: {
|
|
59
|
-
|
|
60
|
-
|
|
59
|
+
'aria-label': stringFormatter.format('removeButtonLabel'),
|
|
60
|
+
'aria-labelledby': `${buttonId} ${rowProps.id}`,
|
|
61
61
|
id: buttonId,
|
|
62
62
|
onPress: ()=>onRemove ? onRemove(new Set([
|
|
63
63
|
item.key
|
|
@@ -67,11 +67,11 @@ function $fc6126c82a4601f1$export$3f568fff7dff2f03(props, state, ref) {
|
|
|
67
67
|
rowProps: (0, $ioKwR$mergeProps)(rowProps, domProps, linkProps, {
|
|
68
68
|
tabIndex: isFocused || state.selectionManager.focusedKey == null ? 0 : -1,
|
|
69
69
|
onKeyDown: onRemove ? onKeyDown : undefined,
|
|
70
|
-
|
|
70
|
+
'aria-describedby': descProps['aria-describedby']
|
|
71
71
|
}),
|
|
72
72
|
gridCellProps: (0, $ioKwR$mergeProps)(gridCellProps, {
|
|
73
|
-
|
|
74
|
-
|
|
73
|
+
'aria-errormessage': props['aria-errormessage'],
|
|
74
|
+
'aria-label': props['aria-label']
|
|
75
75
|
}),
|
|
76
76
|
...stateWithoutDescription,
|
|
77
77
|
allowsRemoving: !!onRemove
|
package/dist/useTagGroup.main.js
CHANGED
|
@@ -36,21 +36,21 @@ function $09704b0efefe5140$export$4f8b5cda58b7e8ff(props, state, ref) {
|
|
|
36
36
|
let keyboardDelegate = props.keyboardDelegate || new (0, $jLhmn$reactariaselection.ListKeyboardDelegate)({
|
|
37
37
|
collection: state.collection,
|
|
38
38
|
ref: ref,
|
|
39
|
-
orientation:
|
|
39
|
+
orientation: 'horizontal',
|
|
40
40
|
direction: direction,
|
|
41
41
|
disabledKeys: state.disabledKeys,
|
|
42
42
|
disabledBehavior: state.selectionManager.disabledBehavior
|
|
43
43
|
});
|
|
44
44
|
let { labelProps: labelProps, fieldProps: fieldProps, descriptionProps: descriptionProps, errorMessageProps: errorMessageProps } = (0, $jLhmn$reactarialabel.useField)({
|
|
45
45
|
...props,
|
|
46
|
-
labelElementType:
|
|
46
|
+
labelElementType: 'span'
|
|
47
47
|
});
|
|
48
48
|
let { gridProps: gridProps } = (0, $jLhmn$reactariagridlist.useGridList)({
|
|
49
49
|
...props,
|
|
50
50
|
...fieldProps,
|
|
51
51
|
keyboardDelegate: keyboardDelegate,
|
|
52
52
|
shouldFocusWrap: true,
|
|
53
|
-
linkBehavior:
|
|
53
|
+
linkBehavior: 'override'
|
|
54
54
|
}, state, ref);
|
|
55
55
|
let [isFocusWithin, setFocusWithin] = (0, $jLhmn$react.useState)(false);
|
|
56
56
|
let { focusWithinProps: focusWithinProps } = (0, $jLhmn$reactariainteractions.useFocusWithin)({
|
|
@@ -72,10 +72,10 @@ function $09704b0efefe5140$export$4f8b5cda58b7e8ff(props, state, ref) {
|
|
|
72
72
|
});
|
|
73
73
|
return {
|
|
74
74
|
gridProps: (0, $jLhmn$reactariautils.mergeProps)(gridProps, domProps, {
|
|
75
|
-
role: state.collection.size ?
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
75
|
+
role: state.collection.size ? 'grid' : null,
|
|
76
|
+
'aria-atomic': false,
|
|
77
|
+
'aria-relevant': 'additions',
|
|
78
|
+
'aria-live': isFocusWithin ? 'polite' : 'off',
|
|
79
79
|
...focusWithinProps,
|
|
80
80
|
...fieldProps
|
|
81
81
|
}),
|
package/dist/useTagGroup.mjs
CHANGED
|
@@ -29,21 +29,21 @@ function $d7323bca8d074eeb$export$4f8b5cda58b7e8ff(props, state, ref) {
|
|
|
29
29
|
let keyboardDelegate = props.keyboardDelegate || new (0, $eUtJD$ListKeyboardDelegate)({
|
|
30
30
|
collection: state.collection,
|
|
31
31
|
ref: ref,
|
|
32
|
-
orientation:
|
|
32
|
+
orientation: 'horizontal',
|
|
33
33
|
direction: direction,
|
|
34
34
|
disabledKeys: state.disabledKeys,
|
|
35
35
|
disabledBehavior: state.selectionManager.disabledBehavior
|
|
36
36
|
});
|
|
37
37
|
let { labelProps: labelProps, fieldProps: fieldProps, descriptionProps: descriptionProps, errorMessageProps: errorMessageProps } = (0, $eUtJD$useField)({
|
|
38
38
|
...props,
|
|
39
|
-
labelElementType:
|
|
39
|
+
labelElementType: 'span'
|
|
40
40
|
});
|
|
41
41
|
let { gridProps: gridProps } = (0, $eUtJD$useGridList)({
|
|
42
42
|
...props,
|
|
43
43
|
...fieldProps,
|
|
44
44
|
keyboardDelegate: keyboardDelegate,
|
|
45
45
|
shouldFocusWrap: true,
|
|
46
|
-
linkBehavior:
|
|
46
|
+
linkBehavior: 'override'
|
|
47
47
|
}, state, ref);
|
|
48
48
|
let [isFocusWithin, setFocusWithin] = (0, $eUtJD$useState)(false);
|
|
49
49
|
let { focusWithinProps: focusWithinProps } = (0, $eUtJD$useFocusWithin)({
|
|
@@ -65,10 +65,10 @@ function $d7323bca8d074eeb$export$4f8b5cda58b7e8ff(props, state, ref) {
|
|
|
65
65
|
});
|
|
66
66
|
return {
|
|
67
67
|
gridProps: (0, $eUtJD$mergeProps)(gridProps, domProps, {
|
|
68
|
-
role: state.collection.size ?
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
68
|
+
role: state.collection.size ? 'grid' : null,
|
|
69
|
+
'aria-atomic': false,
|
|
70
|
+
'aria-relevant': 'additions',
|
|
71
|
+
'aria-live': isFocusWithin ? 'polite' : 'off',
|
|
72
72
|
...focusWithinProps,
|
|
73
73
|
...fieldProps
|
|
74
74
|
}),
|
|
@@ -80,4 +80,4 @@ function $d7323bca8d074eeb$export$4f8b5cda58b7e8ff(props, state, ref) {
|
|
|
80
80
|
|
|
81
81
|
|
|
82
82
|
export {$d7323bca8d074eeb$export$653eddfc964b0f8a as hookData, $d7323bca8d074eeb$export$4f8b5cda58b7e8ff as useTagGroup};
|
|
83
|
-
//# sourceMappingURL=useTagGroup.
|
|
83
|
+
//# sourceMappingURL=useTagGroup.module.js.map
|
|
@@ -29,21 +29,21 @@ function $d7323bca8d074eeb$export$4f8b5cda58b7e8ff(props, state, ref) {
|
|
|
29
29
|
let keyboardDelegate = props.keyboardDelegate || new (0, $eUtJD$ListKeyboardDelegate)({
|
|
30
30
|
collection: state.collection,
|
|
31
31
|
ref: ref,
|
|
32
|
-
orientation:
|
|
32
|
+
orientation: 'horizontal',
|
|
33
33
|
direction: direction,
|
|
34
34
|
disabledKeys: state.disabledKeys,
|
|
35
35
|
disabledBehavior: state.selectionManager.disabledBehavior
|
|
36
36
|
});
|
|
37
37
|
let { labelProps: labelProps, fieldProps: fieldProps, descriptionProps: descriptionProps, errorMessageProps: errorMessageProps } = (0, $eUtJD$useField)({
|
|
38
38
|
...props,
|
|
39
|
-
labelElementType:
|
|
39
|
+
labelElementType: 'span'
|
|
40
40
|
});
|
|
41
41
|
let { gridProps: gridProps } = (0, $eUtJD$useGridList)({
|
|
42
42
|
...props,
|
|
43
43
|
...fieldProps,
|
|
44
44
|
keyboardDelegate: keyboardDelegate,
|
|
45
45
|
shouldFocusWrap: true,
|
|
46
|
-
linkBehavior:
|
|
46
|
+
linkBehavior: 'override'
|
|
47
47
|
}, state, ref);
|
|
48
48
|
let [isFocusWithin, setFocusWithin] = (0, $eUtJD$useState)(false);
|
|
49
49
|
let { focusWithinProps: focusWithinProps } = (0, $eUtJD$useFocusWithin)({
|
|
@@ -65,10 +65,10 @@ function $d7323bca8d074eeb$export$4f8b5cda58b7e8ff(props, state, ref) {
|
|
|
65
65
|
});
|
|
66
66
|
return {
|
|
67
67
|
gridProps: (0, $eUtJD$mergeProps)(gridProps, domProps, {
|
|
68
|
-
role: state.collection.size ?
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
68
|
+
role: state.collection.size ? 'grid' : null,
|
|
69
|
+
'aria-atomic': false,
|
|
70
|
+
'aria-relevant': 'additions',
|
|
71
|
+
'aria-live': isFocusWithin ? 'polite' : 'off',
|
|
72
72
|
...focusWithinProps,
|
|
73
73
|
...fieldProps
|
|
74
74
|
}),
|
package/dist/zh-CN.mjs
CHANGED
package/dist/zh-TW.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-aria/tag",
|
|
3
|
-
"version": "3.4.
|
|
3
|
+
"version": "3.4.1",
|
|
4
4
|
"description": "Spectrum UI components in React",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "dist/main.js",
|
|
@@ -22,15 +22,15 @@
|
|
|
22
22
|
"url": "https://github.com/adobe/react-spectrum"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@react-aria/gridlist": "^3.8.
|
|
26
|
-
"@react-aria/i18n": "^3.11.
|
|
27
|
-
"@react-aria/interactions": "^3.21.
|
|
28
|
-
"@react-aria/label": "^3.7.
|
|
29
|
-
"@react-aria/selection": "^3.18.
|
|
30
|
-
"@react-aria/utils": "^3.24.
|
|
31
|
-
"@react-stately/list": "^3.10.
|
|
32
|
-
"@react-types/button": "^3.9.
|
|
33
|
-
"@react-types/shared": "^3.23.
|
|
25
|
+
"@react-aria/gridlist": "^3.8.1",
|
|
26
|
+
"@react-aria/i18n": "^3.11.1",
|
|
27
|
+
"@react-aria/interactions": "^3.21.3",
|
|
28
|
+
"@react-aria/label": "^3.7.8",
|
|
29
|
+
"@react-aria/selection": "^3.18.1",
|
|
30
|
+
"@react-aria/utils": "^3.24.1",
|
|
31
|
+
"@react-stately/list": "^3.10.5",
|
|
32
|
+
"@react-types/button": "^3.9.4",
|
|
33
|
+
"@react-types/shared": "^3.23.1",
|
|
34
34
|
"@swc/helpers": "^0.5.0"
|
|
35
35
|
},
|
|
36
36
|
"peerDependencies": {
|
|
@@ -40,5 +40,5 @@
|
|
|
40
40
|
"publishConfig": {
|
|
41
41
|
"access": "public"
|
|
42
42
|
},
|
|
43
|
-
"gitHead": "
|
|
43
|
+
"gitHead": "b77d7d594dff4dcfb5359bffbcfd18142b146433"
|
|
44
44
|
}
|