@react-aria/grid 3.7.2-nightly.3960 → 3.7.2-nightly.3969
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 +23 -23
- package/dist/main.js +23 -23
- package/dist/main.js.map +1 -1
- package/dist/module.js +23 -23
- package/dist/module.js.map +1 -1
- package/package.json +16 -16
package/dist/import.mjs
CHANGED
|
@@ -102,8 +102,8 @@ class $d1c300d9c497e402$export$de9feff04fda126e {
|
|
|
102
102
|
// otherwise focus the parent row.
|
|
103
103
|
if (this.isCell(item)) {
|
|
104
104
|
let parent = this.collection.getItem(item.parentKey);
|
|
105
|
-
let
|
|
106
|
-
let next = this.direction === "rtl" ? (0, $cVkRF$getNthItem)(
|
|
105
|
+
let children = (0, $cVkRF$getChildNodes)(parent, this.collection);
|
|
106
|
+
let next = this.direction === "rtl" ? (0, $cVkRF$getNthItem)(children, item.index - 1) : (0, $cVkRF$getNthItem)(children, item.index + 1);
|
|
107
107
|
if (next) return next.key;
|
|
108
108
|
// focus row only if focusMode is set to row
|
|
109
109
|
if (this.focusMode === "row") return item.parentKey;
|
|
@@ -122,8 +122,8 @@ class $d1c300d9c497e402$export$de9feff04fda126e {
|
|
|
122
122
|
// otherwise focus the parent row.
|
|
123
123
|
if (this.isCell(item)) {
|
|
124
124
|
let parent = this.collection.getItem(item.parentKey);
|
|
125
|
-
let
|
|
126
|
-
let prev = this.direction === "rtl" ? (0, $cVkRF$getNthItem)(
|
|
125
|
+
let children = (0, $cVkRF$getChildNodes)(parent, this.collection);
|
|
126
|
+
let prev = this.direction === "rtl" ? (0, $cVkRF$getNthItem)(children, item.index + 1) : (0, $cVkRF$getNthItem)(children, item.index - 1);
|
|
127
127
|
if (prev) return prev.key;
|
|
128
128
|
// focus row only if focusMode is set to row
|
|
129
129
|
if (this.focusMode === "row") return item.parentKey;
|
|
@@ -146,8 +146,8 @@ class $d1c300d9c497e402$export$de9feff04fda126e {
|
|
|
146
146
|
key = this.findNextKey();
|
|
147
147
|
// If global flag is set (or if focus mode is cell), focus the first cell in the first row.
|
|
148
148
|
if (key != null && item && this.isCell(item) && global || this.focusMode === "cell") {
|
|
149
|
-
let
|
|
150
|
-
key = (0, $cVkRF$getFirstItem)((0, $cVkRF$getChildNodes)(
|
|
149
|
+
let item = this.collection.getItem(key);
|
|
150
|
+
key = (0, $cVkRF$getFirstItem)((0, $cVkRF$getChildNodes)(item, this.collection)).key;
|
|
151
151
|
}
|
|
152
152
|
// Otherwise, focus the row itself.
|
|
153
153
|
return key;
|
|
@@ -169,9 +169,9 @@ class $d1c300d9c497e402$export$de9feff04fda126e {
|
|
|
169
169
|
key = this.findPreviousKey();
|
|
170
170
|
// If global flag is set (or if focus mode is cell), focus the last cell in the last row.
|
|
171
171
|
if (key != null && item && this.isCell(item) && global || this.focusMode === "cell") {
|
|
172
|
-
let
|
|
173
|
-
let
|
|
174
|
-
key = (0, $cVkRF$getLastItem)(
|
|
172
|
+
let item = this.collection.getItem(key);
|
|
173
|
+
let children = (0, $cVkRF$getChildNodes)(item, this.collection);
|
|
174
|
+
key = (0, $cVkRF$getLastItem)(children).key;
|
|
175
175
|
}
|
|
176
176
|
// Otherwise, focus the row itself.
|
|
177
177
|
return key;
|
|
@@ -296,7 +296,7 @@ class $d1c300d9c497e402$export$de9feff04fda126e {
|
|
|
296
296
|
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
297
297
|
* governing permissions and limitations under the License.
|
|
298
298
|
*/
|
|
299
|
-
var $
|
|
299
|
+
var $835c96616a7cb4f9$exports = {};
|
|
300
300
|
var $682989befd4f478d$exports = {};
|
|
301
301
|
$682989befd4f478d$exports = {
|
|
302
302
|
"deselectedItem": (args)=>`${args.item} غير المحدد`,
|
|
@@ -807,7 +807,7 @@ $7e60654723031b6f$exports = {
|
|
|
807
807
|
};
|
|
808
808
|
|
|
809
809
|
|
|
810
|
-
$
|
|
810
|
+
$835c96616a7cb4f9$exports = {
|
|
811
811
|
"ar-AE": $682989befd4f478d$exports,
|
|
812
812
|
"bg-BG": $f7fca02019afd941$exports,
|
|
813
813
|
"cs-CZ": $8f86f40be75387f1$exports,
|
|
@@ -854,7 +854,7 @@ function $92599c3fd427b763$export$137e594ef3218a10(props, state) {
|
|
|
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
|
-
let stringFormatter = (0, $cVkRF$useLocalizedStringFormatter)((0, (/*@__PURE__*/$parcel$interopDefault($
|
|
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.
|
|
860
860
|
let selection = state.selectionManager.rawSelection;
|
|
@@ -927,7 +927,7 @@ function $92599c3fd427b763$var$diffSelection(a, b) {
|
|
|
927
927
|
|
|
928
928
|
|
|
929
929
|
function $5b9b5b5723db6ae1$export$be42ebdab07ae4c2(props) {
|
|
930
|
-
let stringFormatter = (0, $cVkRF$useLocalizedStringFormatter)((0, (/*@__PURE__*/$parcel$interopDefault($
|
|
930
|
+
let stringFormatter = (0, $cVkRF$useLocalizedStringFormatter)((0, (/*@__PURE__*/$parcel$interopDefault($835c96616a7cb4f9$exports))));
|
|
931
931
|
let modality = (0, $cVkRF$useInteractionModality)();
|
|
932
932
|
// null is the default if the user hasn't interacted with the table at all yet or the rest of the page
|
|
933
933
|
let shouldLongPress = (modality === "pointer" || modality === "virtual" || modality == null) && typeof window !== "undefined" && "ontouchstart" in window;
|
|
@@ -1200,13 +1200,13 @@ function $ab90dcbc1b5466d0$export$c7e10bfc0c59f67c(props, state, ref) {
|
|
|
1200
1200
|
}
|
|
1201
1201
|
case "ArrowRight":
|
|
1202
1202
|
{
|
|
1203
|
-
let
|
|
1204
|
-
if (focusMode === "child" &&
|
|
1205
|
-
if (
|
|
1203
|
+
let focusable = direction === "rtl" ? walker.previousNode() : walker.nextNode();
|
|
1204
|
+
if (focusMode === "child" && focusable === ref.current) focusable = null;
|
|
1205
|
+
if (focusable) {
|
|
1206
1206
|
e.preventDefault();
|
|
1207
1207
|
e.stopPropagation();
|
|
1208
|
-
(0, $cVkRF$focusSafely)(
|
|
1209
|
-
(0, $cVkRF$scrollIntoViewport)(
|
|
1208
|
+
(0, $cVkRF$focusSafely)(focusable);
|
|
1209
|
+
(0, $cVkRF$scrollIntoViewport)(focusable, {
|
|
1210
1210
|
containingElement: (0, $cVkRF$getScrollParent)(ref.current)
|
|
1211
1211
|
});
|
|
1212
1212
|
} else {
|
|
@@ -1221,10 +1221,10 @@ function $ab90dcbc1b5466d0$export$c7e10bfc0c59f67c(props, state, ref) {
|
|
|
1221
1221
|
});
|
|
1222
1222
|
} else {
|
|
1223
1223
|
walker.currentNode = ref.current;
|
|
1224
|
-
|
|
1225
|
-
if (
|
|
1226
|
-
(0, $cVkRF$focusSafely)(
|
|
1227
|
-
(0, $cVkRF$scrollIntoViewport)(
|
|
1224
|
+
focusable = direction === "rtl" ? $ab90dcbc1b5466d0$var$last(walker) : walker.firstChild();
|
|
1225
|
+
if (focusable) {
|
|
1226
|
+
(0, $cVkRF$focusSafely)(focusable);
|
|
1227
|
+
(0, $cVkRF$scrollIntoViewport)(focusable, {
|
|
1228
1228
|
containingElement: (0, $cVkRF$getScrollParent)(ref.current)
|
|
1229
1229
|
});
|
|
1230
1230
|
}
|
|
@@ -1310,7 +1310,7 @@ function $7cb39d07f245a780$export$70e2eed1a92976ad(props, state) {
|
|
|
1310
1310
|
let isDisabled = !state.selectionManager.canSelectItem(key);
|
|
1311
1311
|
let isSelected = state.selectionManager.isSelected(key);
|
|
1312
1312
|
let onChange = ()=>manager.select(key);
|
|
1313
|
-
const stringFormatter = (0, $cVkRF$useLocalizedStringFormatter)((0, (/*@__PURE__*/$parcel$interopDefault($
|
|
1313
|
+
const stringFormatter = (0, $cVkRF$useLocalizedStringFormatter)((0, (/*@__PURE__*/$parcel$interopDefault($835c96616a7cb4f9$exports))));
|
|
1314
1314
|
return {
|
|
1315
1315
|
checkboxProps: {
|
|
1316
1316
|
id: checkboxId,
|
package/dist/main.js
CHANGED
|
@@ -114,8 +114,8 @@ class $3187c0e19200cb16$export$de9feff04fda126e {
|
|
|
114
114
|
// otherwise focus the parent row.
|
|
115
115
|
if (this.isCell(item)) {
|
|
116
116
|
let parent = this.collection.getItem(item.parentKey);
|
|
117
|
-
let
|
|
118
|
-
let next = this.direction === "rtl" ? (0, $2oePb$reactstatelycollections.getNthItem)(
|
|
117
|
+
let children = (0, $2oePb$reactstatelycollections.getChildNodes)(parent, this.collection);
|
|
118
|
+
let next = this.direction === "rtl" ? (0, $2oePb$reactstatelycollections.getNthItem)(children, item.index - 1) : (0, $2oePb$reactstatelycollections.getNthItem)(children, item.index + 1);
|
|
119
119
|
if (next) return next.key;
|
|
120
120
|
// focus row only if focusMode is set to row
|
|
121
121
|
if (this.focusMode === "row") return item.parentKey;
|
|
@@ -134,8 +134,8 @@ class $3187c0e19200cb16$export$de9feff04fda126e {
|
|
|
134
134
|
// otherwise focus the parent row.
|
|
135
135
|
if (this.isCell(item)) {
|
|
136
136
|
let parent = this.collection.getItem(item.parentKey);
|
|
137
|
-
let
|
|
138
|
-
let prev = this.direction === "rtl" ? (0, $2oePb$reactstatelycollections.getNthItem)(
|
|
137
|
+
let children = (0, $2oePb$reactstatelycollections.getChildNodes)(parent, this.collection);
|
|
138
|
+
let prev = this.direction === "rtl" ? (0, $2oePb$reactstatelycollections.getNthItem)(children, item.index + 1) : (0, $2oePb$reactstatelycollections.getNthItem)(children, item.index - 1);
|
|
139
139
|
if (prev) return prev.key;
|
|
140
140
|
// focus row only if focusMode is set to row
|
|
141
141
|
if (this.focusMode === "row") return item.parentKey;
|
|
@@ -158,8 +158,8 @@ class $3187c0e19200cb16$export$de9feff04fda126e {
|
|
|
158
158
|
key = this.findNextKey();
|
|
159
159
|
// If global flag is set (or if focus mode is cell), focus the first cell in the first row.
|
|
160
160
|
if (key != null && item && this.isCell(item) && global || this.focusMode === "cell") {
|
|
161
|
-
let
|
|
162
|
-
key = (0, $2oePb$reactstatelycollections.getFirstItem)((0, $2oePb$reactstatelycollections.getChildNodes)(
|
|
161
|
+
let item = this.collection.getItem(key);
|
|
162
|
+
key = (0, $2oePb$reactstatelycollections.getFirstItem)((0, $2oePb$reactstatelycollections.getChildNodes)(item, this.collection)).key;
|
|
163
163
|
}
|
|
164
164
|
// Otherwise, focus the row itself.
|
|
165
165
|
return key;
|
|
@@ -181,9 +181,9 @@ class $3187c0e19200cb16$export$de9feff04fda126e {
|
|
|
181
181
|
key = this.findPreviousKey();
|
|
182
182
|
// If global flag is set (or if focus mode is cell), focus the last cell in the last row.
|
|
183
183
|
if (key != null && item && this.isCell(item) && global || this.focusMode === "cell") {
|
|
184
|
-
let
|
|
185
|
-
let
|
|
186
|
-
key = (0, $2oePb$reactstatelycollections.getLastItem)(
|
|
184
|
+
let item = this.collection.getItem(key);
|
|
185
|
+
let children = (0, $2oePb$reactstatelycollections.getChildNodes)(item, this.collection);
|
|
186
|
+
key = (0, $2oePb$reactstatelycollections.getLastItem)(children).key;
|
|
187
187
|
}
|
|
188
188
|
// Otherwise, focus the row itself.
|
|
189
189
|
return key;
|
|
@@ -308,7 +308,7 @@ class $3187c0e19200cb16$export$de9feff04fda126e {
|
|
|
308
308
|
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
309
309
|
* governing permissions and limitations under the License.
|
|
310
310
|
*/
|
|
311
|
-
var $
|
|
311
|
+
var $085250522aa37816$exports = {};
|
|
312
312
|
var $6f42661ae0214332$exports = {};
|
|
313
313
|
$6f42661ae0214332$exports = {
|
|
314
314
|
"deselectedItem": (args)=>`${args.item} غير المحدد`,
|
|
@@ -819,7 +819,7 @@ $a33ce76c4b030d83$exports = {
|
|
|
819
819
|
};
|
|
820
820
|
|
|
821
821
|
|
|
822
|
-
$
|
|
822
|
+
$085250522aa37816$exports = {
|
|
823
823
|
"ar-AE": $6f42661ae0214332$exports,
|
|
824
824
|
"bg-BG": $3e5d289b19f0fad9$exports,
|
|
825
825
|
"cs-CZ": $786c35956e916979$exports,
|
|
@@ -866,7 +866,7 @@ function $1eb174acfe8a0f16$export$137e594ef3218a10(props, state) {
|
|
|
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
|
-
let stringFormatter = (0, $2oePb$reactariai18n.useLocalizedStringFormatter)((0, (/*@__PURE__*/$parcel$interopDefault($
|
|
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.
|
|
872
872
|
let selection = state.selectionManager.rawSelection;
|
|
@@ -939,7 +939,7 @@ function $1eb174acfe8a0f16$var$diffSelection(a, b) {
|
|
|
939
939
|
|
|
940
940
|
|
|
941
941
|
function $340f2fcd0ef9ce8d$export$be42ebdab07ae4c2(props) {
|
|
942
|
-
let stringFormatter = (0, $2oePb$reactariai18n.useLocalizedStringFormatter)((0, (/*@__PURE__*/$parcel$interopDefault($
|
|
942
|
+
let stringFormatter = (0, $2oePb$reactariai18n.useLocalizedStringFormatter)((0, (/*@__PURE__*/$parcel$interopDefault($085250522aa37816$exports))));
|
|
943
943
|
let modality = (0, $2oePb$reactariainteractions.useInteractionModality)();
|
|
944
944
|
// null is the default if the user hasn't interacted with the table at all yet or the rest of the page
|
|
945
945
|
let shouldLongPress = (modality === "pointer" || modality === "virtual" || modality == null) && typeof window !== "undefined" && "ontouchstart" in window;
|
|
@@ -1212,13 +1212,13 @@ function $cf2021be63b01ef4$export$c7e10bfc0c59f67c(props, state, ref) {
|
|
|
1212
1212
|
}
|
|
1213
1213
|
case "ArrowRight":
|
|
1214
1214
|
{
|
|
1215
|
-
let
|
|
1216
|
-
if (focusMode === "child" &&
|
|
1217
|
-
if (
|
|
1215
|
+
let focusable = direction === "rtl" ? walker.previousNode() : walker.nextNode();
|
|
1216
|
+
if (focusMode === "child" && focusable === ref.current) focusable = null;
|
|
1217
|
+
if (focusable) {
|
|
1218
1218
|
e.preventDefault();
|
|
1219
1219
|
e.stopPropagation();
|
|
1220
|
-
(0, $2oePb$reactariafocus.focusSafely)(
|
|
1221
|
-
(0, $2oePb$reactariautils.scrollIntoViewport)(
|
|
1220
|
+
(0, $2oePb$reactariafocus.focusSafely)(focusable);
|
|
1221
|
+
(0, $2oePb$reactariautils.scrollIntoViewport)(focusable, {
|
|
1222
1222
|
containingElement: (0, $2oePb$reactariautils.getScrollParent)(ref.current)
|
|
1223
1223
|
});
|
|
1224
1224
|
} else {
|
|
@@ -1233,10 +1233,10 @@ function $cf2021be63b01ef4$export$c7e10bfc0c59f67c(props, state, ref) {
|
|
|
1233
1233
|
});
|
|
1234
1234
|
} else {
|
|
1235
1235
|
walker.currentNode = ref.current;
|
|
1236
|
-
|
|
1237
|
-
if (
|
|
1238
|
-
(0, $2oePb$reactariafocus.focusSafely)(
|
|
1239
|
-
(0, $2oePb$reactariautils.scrollIntoViewport)(
|
|
1236
|
+
focusable = direction === "rtl" ? $cf2021be63b01ef4$var$last(walker) : walker.firstChild();
|
|
1237
|
+
if (focusable) {
|
|
1238
|
+
(0, $2oePb$reactariafocus.focusSafely)(focusable);
|
|
1239
|
+
(0, $2oePb$reactariautils.scrollIntoViewport)(focusable, {
|
|
1240
1240
|
containingElement: (0, $2oePb$reactariautils.getScrollParent)(ref.current)
|
|
1241
1241
|
});
|
|
1242
1242
|
}
|
|
@@ -1322,7 +1322,7 @@ function $d8385f73d3701365$export$70e2eed1a92976ad(props, state) {
|
|
|
1322
1322
|
let isDisabled = !state.selectionManager.canSelectItem(key);
|
|
1323
1323
|
let isSelected = state.selectionManager.isSelected(key);
|
|
1324
1324
|
let onChange = ()=>manager.select(key);
|
|
1325
|
-
const stringFormatter = (0, $2oePb$reactariai18n.useLocalizedStringFormatter)((0, (/*@__PURE__*/$parcel$interopDefault($
|
|
1325
|
+
const stringFormatter = (0, $2oePb$reactariai18n.useLocalizedStringFormatter)((0, (/*@__PURE__*/$parcel$interopDefault($085250522aa37816$exports))));
|
|
1326
1326
|
return {
|
|
1327
1327
|
checkboxProps: {
|
|
1328
1328
|
id: checkboxId,
|