@react-aria/grid 3.8.3-nightly.4149 → 3.8.3-nightly.4157
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/import.mjs +13 -13
- package/dist/main.js +13 -13
- package/dist/main.js.map +1 -1
- package/dist/module.js +13 -13
- package/dist/module.js.map +1 -1
- package/package.json +15 -15
package/dist/import.mjs
CHANGED
|
@@ -853,7 +853,7 @@ function $92599c3fd427b763$export$137e594ef3218a10(props, state) {
|
|
|
853
853
|
let { getRowText: getRowText = (key)=>{
|
|
854
854
|
var _state_collection, _state_collection_getTextValue1, _state_collection_getItem;
|
|
855
855
|
return (_state_collection_getTextValue = (_state_collection_getTextValue1 = (_state_collection = state.collection).getTextValue) === null || _state_collection_getTextValue1 === void 0 ? void 0 : _state_collection_getTextValue1.call(_state_collection, key)) !== null && _state_collection_getTextValue !== void 0 ? _state_collection_getTextValue : (_state_collection_getItem = state.collection.getItem(key)) === null || _state_collection_getItem === void 0 ? void 0 : _state_collection_getItem.textValue;
|
|
856
|
-
}
|
|
856
|
+
} } = props;
|
|
857
857
|
let stringFormatter = (0, $cVkRF$useLocalizedStringFormatter)((0, (/*@__PURE__*/$parcel$interopDefault($835c96616a7cb4f9$exports))));
|
|
858
858
|
// Many screen readers do not announce when items in a grid are selected/deselected.
|
|
859
859
|
// We do this using an ARIA live region.
|
|
@@ -951,8 +951,8 @@ function $5b9b5b5723db6ae1$export$be42ebdab07ae4c2(props) {
|
|
|
951
951
|
|
|
952
952
|
|
|
953
953
|
function $83c6e2eafa584c67$export$f6b86a04e5d66d90(props, state, ref) {
|
|
954
|
-
let { isVirtualized: isVirtualized
|
|
955
|
-
let { selectionManager: manager
|
|
954
|
+
let { isVirtualized: isVirtualized, keyboardDelegate: keyboardDelegate, focusMode: focusMode, scrollRef: scrollRef, getRowText: getRowText, onRowAction: onRowAction, onCellAction: onCellAction } = props;
|
|
955
|
+
let { selectionManager: manager } = state;
|
|
956
956
|
if (!props["aria-label"] && !props["aria-labelledby"]) console.warn("An aria-label or aria-labelledby prop is required for accessibility.");
|
|
957
957
|
// By default, a KeyboardDelegate is provided which uses the DOM to query layout information (e.g. for page up/page down).
|
|
958
958
|
// When virtualized, the layout object will be passed in as a prop and override this.
|
|
@@ -960,7 +960,7 @@ function $83c6e2eafa584c67$export$f6b86a04e5d66d90(props, state, ref) {
|
|
|
960
960
|
usage: "search",
|
|
961
961
|
sensitivity: "base"
|
|
962
962
|
});
|
|
963
|
-
let { direction: direction
|
|
963
|
+
let { direction: direction } = (0, $cVkRF$useLocale)();
|
|
964
964
|
let disabledBehavior = state.selectionManager.disabledBehavior;
|
|
965
965
|
let delegate = (0, $cVkRF$useMemo)(()=>keyboardDelegate || new (0, $d1c300d9c497e402$export$de9feff04fda126e)({
|
|
966
966
|
collection: state.collection,
|
|
@@ -979,7 +979,7 @@ function $83c6e2eafa584c67$export$f6b86a04e5d66d90(props, state, ref) {
|
|
|
979
979
|
collator,
|
|
980
980
|
focusMode
|
|
981
981
|
]);
|
|
982
|
-
let { collectionProps: collectionProps
|
|
982
|
+
let { collectionProps: collectionProps } = (0, $cVkRF$useSelectableCollection)({
|
|
983
983
|
ref: ref,
|
|
984
984
|
selectionManager: manager,
|
|
985
985
|
keyboardDelegate: delegate,
|
|
@@ -1077,9 +1077,9 @@ function $83c6e2eafa584c67$export$f6b86a04e5d66d90(props, state, ref) {
|
|
|
1077
1077
|
*/
|
|
1078
1078
|
|
|
1079
1079
|
function $4159a7a9cbb0cc18$export$96357d5a73f686fa(props, state, ref) {
|
|
1080
|
-
let { node: node
|
|
1081
|
-
let { actions: { onRowAction: onRowAction
|
|
1082
|
-
let { itemProps: itemProps
|
|
1080
|
+
let { node: node, isVirtualized: isVirtualized, shouldSelectOnPressUp: shouldSelectOnPressUp, onAction: onAction } = props;
|
|
1081
|
+
let { actions: { onRowAction: onRowAction } } = (0, $1af922eb41e03c8f$export$e6235c0d09b995d0).get(state);
|
|
1082
|
+
let { itemProps: itemProps, ...states } = (0, $cVkRF$useSelectableItem)({
|
|
1083
1083
|
selectionManager: state.selectionManager,
|
|
1084
1084
|
key: node.key,
|
|
1085
1085
|
ref: ref,
|
|
@@ -1121,9 +1121,9 @@ function $4159a7a9cbb0cc18$export$96357d5a73f686fa(props, state, ref) {
|
|
|
1121
1121
|
|
|
1122
1122
|
|
|
1123
1123
|
function $ab90dcbc1b5466d0$export$c7e10bfc0c59f67c(props, state, ref) {
|
|
1124
|
-
let { node: node
|
|
1125
|
-
let { direction: direction
|
|
1126
|
-
let { keyboardDelegate: keyboardDelegate
|
|
1124
|
+
let { node: node, isVirtualized: isVirtualized, focusMode: focusMode = "child", shouldSelectOnPressUp: shouldSelectOnPressUp, onAction: onAction } = props;
|
|
1125
|
+
let { direction: direction } = (0, $cVkRF$useLocale)();
|
|
1126
|
+
let { keyboardDelegate: keyboardDelegate, actions: { onCellAction: onCellAction } } = (0, $1af922eb41e03c8f$export$e6235c0d09b995d0).get(state);
|
|
1127
1127
|
// We need to track the key of the item at the time it was last focused so that we force
|
|
1128
1128
|
// focus to go to the item when the DOM node is reused for a different item in a virtualizer.
|
|
1129
1129
|
let keyWhenFocused = (0, $cVkRF$useRef)(null);
|
|
@@ -1142,7 +1142,7 @@ function $ab90dcbc1b5466d0$export$c7e10bfc0c59f67c(props, state, ref) {
|
|
|
1142
1142
|
}
|
|
1143
1143
|
if (keyWhenFocused.current != null && node.key !== keyWhenFocused.current || !ref.current.contains(document.activeElement)) (0, $cVkRF$focusSafely)(ref.current);
|
|
1144
1144
|
};
|
|
1145
|
-
let { itemProps: itemProps
|
|
1145
|
+
let { itemProps: itemProps, isPressed: isPressed } = (0, $cVkRF$useSelectableItem)({
|
|
1146
1146
|
selectionManager: state.selectionManager,
|
|
1147
1147
|
key: node.key,
|
|
1148
1148
|
ref: ref,
|
|
@@ -1304,7 +1304,7 @@ function $ab90dcbc1b5466d0$var$last(walker) {
|
|
|
1304
1304
|
|
|
1305
1305
|
|
|
1306
1306
|
function $7cb39d07f245a780$export$70e2eed1a92976ad(props, state) {
|
|
1307
|
-
let { key: key
|
|
1307
|
+
let { key: key } = props;
|
|
1308
1308
|
let manager = state.selectionManager;
|
|
1309
1309
|
let checkboxId = (0, $cVkRF$useId)();
|
|
1310
1310
|
let isDisabled = !state.selectionManager.canSelectItem(key);
|
package/dist/main.js
CHANGED
|
@@ -865,7 +865,7 @@ function $1eb174acfe8a0f16$export$137e594ef3218a10(props, state) {
|
|
|
865
865
|
let { getRowText: getRowText = (key)=>{
|
|
866
866
|
var _state_collection, _state_collection_getTextValue1, _state_collection_getItem;
|
|
867
867
|
return (_state_collection_getTextValue = (_state_collection_getTextValue1 = (_state_collection = state.collection).getTextValue) === null || _state_collection_getTextValue1 === void 0 ? void 0 : _state_collection_getTextValue1.call(_state_collection, key)) !== null && _state_collection_getTextValue !== void 0 ? _state_collection_getTextValue : (_state_collection_getItem = state.collection.getItem(key)) === null || _state_collection_getItem === void 0 ? void 0 : _state_collection_getItem.textValue;
|
|
868
|
-
}
|
|
868
|
+
} } = props;
|
|
869
869
|
let stringFormatter = (0, $2oePb$reactariai18n.useLocalizedStringFormatter)((0, (/*@__PURE__*/$parcel$interopDefault($085250522aa37816$exports))));
|
|
870
870
|
// Many screen readers do not announce when items in a grid are selected/deselected.
|
|
871
871
|
// We do this using an ARIA live region.
|
|
@@ -963,8 +963,8 @@ function $340f2fcd0ef9ce8d$export$be42ebdab07ae4c2(props) {
|
|
|
963
963
|
|
|
964
964
|
|
|
965
965
|
function $11d770dfabe45077$export$f6b86a04e5d66d90(props, state, ref) {
|
|
966
|
-
let { isVirtualized: isVirtualized
|
|
967
|
-
let { selectionManager: manager
|
|
966
|
+
let { isVirtualized: isVirtualized, keyboardDelegate: keyboardDelegate, focusMode: focusMode, scrollRef: scrollRef, getRowText: getRowText, onRowAction: onRowAction, onCellAction: onCellAction } = props;
|
|
967
|
+
let { selectionManager: manager } = state;
|
|
968
968
|
if (!props["aria-label"] && !props["aria-labelledby"]) console.warn("An aria-label or aria-labelledby prop is required for accessibility.");
|
|
969
969
|
// By default, a KeyboardDelegate is provided which uses the DOM to query layout information (e.g. for page up/page down).
|
|
970
970
|
// When virtualized, the layout object will be passed in as a prop and override this.
|
|
@@ -972,7 +972,7 @@ function $11d770dfabe45077$export$f6b86a04e5d66d90(props, state, ref) {
|
|
|
972
972
|
usage: "search",
|
|
973
973
|
sensitivity: "base"
|
|
974
974
|
});
|
|
975
|
-
let { direction: direction
|
|
975
|
+
let { direction: direction } = (0, $2oePb$reactariai18n.useLocale)();
|
|
976
976
|
let disabledBehavior = state.selectionManager.disabledBehavior;
|
|
977
977
|
let delegate = (0, $2oePb$react.useMemo)(()=>keyboardDelegate || new (0, $3187c0e19200cb16$export$de9feff04fda126e)({
|
|
978
978
|
collection: state.collection,
|
|
@@ -991,7 +991,7 @@ function $11d770dfabe45077$export$f6b86a04e5d66d90(props, state, ref) {
|
|
|
991
991
|
collator,
|
|
992
992
|
focusMode
|
|
993
993
|
]);
|
|
994
|
-
let { collectionProps: collectionProps
|
|
994
|
+
let { collectionProps: collectionProps } = (0, $2oePb$reactariaselection.useSelectableCollection)({
|
|
995
995
|
ref: ref,
|
|
996
996
|
selectionManager: manager,
|
|
997
997
|
keyboardDelegate: delegate,
|
|
@@ -1089,9 +1089,9 @@ function $11d770dfabe45077$export$f6b86a04e5d66d90(props, state, ref) {
|
|
|
1089
1089
|
*/
|
|
1090
1090
|
|
|
1091
1091
|
function $eed398987c639831$export$96357d5a73f686fa(props, state, ref) {
|
|
1092
|
-
let { node: node
|
|
1093
|
-
let { actions: { onRowAction: onRowAction
|
|
1094
|
-
let { itemProps: itemProps
|
|
1092
|
+
let { node: node, isVirtualized: isVirtualized, shouldSelectOnPressUp: shouldSelectOnPressUp, onAction: onAction } = props;
|
|
1093
|
+
let { actions: { onRowAction: onRowAction } } = (0, $8ee34951196858d0$export$e6235c0d09b995d0).get(state);
|
|
1094
|
+
let { itemProps: itemProps, ...states } = (0, $2oePb$reactariaselection.useSelectableItem)({
|
|
1095
1095
|
selectionManager: state.selectionManager,
|
|
1096
1096
|
key: node.key,
|
|
1097
1097
|
ref: ref,
|
|
@@ -1133,9 +1133,9 @@ function $eed398987c639831$export$96357d5a73f686fa(props, state, ref) {
|
|
|
1133
1133
|
|
|
1134
1134
|
|
|
1135
1135
|
function $cf2021be63b01ef4$export$c7e10bfc0c59f67c(props, state, ref) {
|
|
1136
|
-
let { node: node
|
|
1137
|
-
let { direction: direction
|
|
1138
|
-
let { keyboardDelegate: keyboardDelegate
|
|
1136
|
+
let { node: node, isVirtualized: isVirtualized, focusMode: focusMode = "child", shouldSelectOnPressUp: shouldSelectOnPressUp, onAction: onAction } = props;
|
|
1137
|
+
let { direction: direction } = (0, $2oePb$reactariai18n.useLocale)();
|
|
1138
|
+
let { keyboardDelegate: keyboardDelegate, actions: { onCellAction: onCellAction } } = (0, $8ee34951196858d0$export$e6235c0d09b995d0).get(state);
|
|
1139
1139
|
// We need to track the key of the item at the time it was last focused so that we force
|
|
1140
1140
|
// focus to go to the item when the DOM node is reused for a different item in a virtualizer.
|
|
1141
1141
|
let keyWhenFocused = (0, $2oePb$react.useRef)(null);
|
|
@@ -1154,7 +1154,7 @@ function $cf2021be63b01ef4$export$c7e10bfc0c59f67c(props, state, ref) {
|
|
|
1154
1154
|
}
|
|
1155
1155
|
if (keyWhenFocused.current != null && node.key !== keyWhenFocused.current || !ref.current.contains(document.activeElement)) (0, $2oePb$reactariafocus.focusSafely)(ref.current);
|
|
1156
1156
|
};
|
|
1157
|
-
let { itemProps: itemProps
|
|
1157
|
+
let { itemProps: itemProps, isPressed: isPressed } = (0, $2oePb$reactariaselection.useSelectableItem)({
|
|
1158
1158
|
selectionManager: state.selectionManager,
|
|
1159
1159
|
key: node.key,
|
|
1160
1160
|
ref: ref,
|
|
@@ -1316,7 +1316,7 @@ function $cf2021be63b01ef4$var$last(walker) {
|
|
|
1316
1316
|
|
|
1317
1317
|
|
|
1318
1318
|
function $d8385f73d3701365$export$70e2eed1a92976ad(props, state) {
|
|
1319
|
-
let { key: key
|
|
1319
|
+
let { key: key } = props;
|
|
1320
1320
|
let manager = state.selectionManager;
|
|
1321
1321
|
let checkboxId = (0, $2oePb$reactariautils.useId)();
|
|
1322
1322
|
let isDisabled = !state.selectionManager.canSelectItem(key);
|