@kanso-labs/react-native-kanso-ui 0.7.0 → 0.8.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.
- package/README.md +37 -0
- package/dist/badge/index.js +25 -23
- package/dist/badge/index.js.map +1 -1
- package/dist/button/index.d.ts +2 -1
- package/dist/button/index.js.map +1 -1
- package/dist/button/pending.js +17 -21
- package/dist/button/pending.js.map +1 -1
- package/dist/calendar/index.js +1 -1
- package/dist/components/autocomplete/index.js +28 -26
- package/dist/components/autocomplete/index.js.map +1 -1
- package/dist/components/avatar/index.d.ts +2 -2
- package/dist/components/avatar/index.js +2 -2
- package/dist/components/avatar/index.js.map +1 -1
- package/dist/components/calendar/index.d.ts +1 -1
- package/dist/components/calendar/index.js +77 -38
- package/dist/components/calendar/index.js.map +1 -1
- package/dist/components/chip-group/index.d.ts +4 -3
- package/dist/components/chip-group/index.js +47 -45
- package/dist/components/chip-group/index.js.map +1 -1
- package/dist/components/copy-field/index.d.ts +5 -5
- package/dist/components/copy-field/index.js +30 -28
- package/dist/components/copy-field/index.js.map +1 -1
- package/dist/components/currency/index.d.ts +2 -2
- package/dist/components/currency/index.js +3 -1
- package/dist/components/currency/index.js.map +1 -1
- package/dist/components/list/index.d.ts +6 -5
- package/dist/components/list/index.js +97 -106
- package/dist/components/list/index.js.map +1 -1
- package/dist/components/menu/index.d.ts +4 -3
- package/dist/components/menu/index.js +32 -39
- package/dist/components/menu/index.js.map +1 -1
- package/dist/components/meter/index.d.ts +2 -1
- package/dist/components/meter/index.js +9 -7
- package/dist/components/meter/index.js.map +1 -1
- package/dist/components/number-field/index.d.ts +7 -3
- package/dist/components/number-field/index.js +214 -192
- package/dist/components/number-field/index.js.map +1 -1
- package/dist/components/product-icon/index.d.ts +2 -2
- package/dist/components/product-icon/index.js +2 -2
- package/dist/components/product-icon/index.js.map +1 -1
- package/dist/components/progress-indicator/index.d.ts +2 -1
- package/dist/components/progress-indicator/index.js +15 -13
- package/dist/components/progress-indicator/index.js.map +1 -1
- package/dist/components/search-field/index.d.ts +3 -3
- package/dist/components/search-field/index.js +105 -104
- package/dist/components/search-field/index.js.map +1 -1
- package/dist/components/sheet/index.d.ts +2 -2
- package/dist/components/sheet/index.js +22 -26
- package/dist/components/sheet/index.js.map +1 -1
- package/dist/components/snackbar/index.d.ts +3 -3
- package/dist/components/snackbar/index.js +36 -34
- package/dist/components/snackbar/index.js.map +1 -1
- package/dist/components/tag/index.d.ts +58 -0
- package/dist/components/tag/index.js +205 -0
- package/dist/components/tag/index.js.map +1 -0
- package/dist/components/text-field/index.d.ts +6 -3
- package/dist/components/text-field/index.js +3 -0
- package/dist/components/text-field/index.js.map +1 -1
- package/dist/field/index.js +39 -36
- package/dist/field/index.js.map +1 -1
- package/dist/i18n/index.js +12 -1
- package/dist/i18n/index.js.map +1 -1
- package/dist/i18n/messages.js +367 -0
- package/dist/i18n/messages.js.map +1 -1
- package/dist/i18n/provider.d.ts +53 -0
- package/dist/i18n/provider.js +96 -0
- package/dist/i18n/provider.js.map +1 -0
- package/dist/index.d.ts +3 -1
- package/dist/index.js +3 -1
- package/dist/indicator/index.js +1 -2
- package/dist/indicator/index.js.map +1 -1
- package/dist/mark/index.js +77 -117
- package/dist/mark/index.js.map +1 -1
- package/dist/mark/initials.js.map +1 -1
- package/dist/number/count.js +15 -0
- package/dist/number/count.js.map +1 -0
- package/dist/number/locale.js.map +1 -1
- package/dist/overlay/host.js +30 -21
- package/dist/overlay/host.js.map +1 -1
- package/package.json +1 -1
|
@@ -5,9 +5,10 @@ import { useTypeRole } from "../../typography/roles.js";
|
|
|
5
5
|
import { rowContentColor, rowStyles } from "../../row/styles.js";
|
|
6
6
|
import { RowContent, hasContent, rowStyleOf } from "../../row/index.js";
|
|
7
7
|
import { AutocompleteContext } from "../../autocomplete/index.js";
|
|
8
|
+
import { resultsFor } from "../../i18n/index.js";
|
|
9
|
+
import { useLocaleOf, useMessages } from "../../i18n/provider.js";
|
|
8
10
|
import { toggleState } from "../../button/index.js";
|
|
9
11
|
import { ProgressIndicator } from "../progress-indicator/index.js";
|
|
10
|
-
import { messagesFor, resultsFor } from "../../i18n/index.js";
|
|
11
12
|
import { CheckboxBox } from "../../control/checkbox-box.js";
|
|
12
13
|
import { c } from "react/compiler-runtime";
|
|
13
14
|
import { AccessibilityInfo, FlatList, Platform, Pressable, StyleSheet, Text, View } from "react-native";
|
|
@@ -85,7 +86,7 @@ const ListContext = createContext(null);
|
|
|
85
86
|
* while the keyboard is up.
|
|
86
87
|
*/
|
|
87
88
|
function List(t0) {
|
|
88
|
-
const $ = c(
|
|
89
|
+
const $ = c(64);
|
|
89
90
|
let children;
|
|
90
91
|
let contentContainerStyle;
|
|
91
92
|
let defaultSelectedKeys;
|
|
@@ -188,6 +189,7 @@ function List(t0) {
|
|
|
188
189
|
const listStyle = composeStyles(own.list, style);
|
|
189
190
|
const loadMore = loader?.props;
|
|
190
191
|
const isLoading = loadMore?.isLoading ?? false;
|
|
192
|
+
const messages = useMessages();
|
|
191
193
|
let t7;
|
|
192
194
|
if ($[31] !== style || $[32] !== theme) {
|
|
193
195
|
t7 = StyleSheet.flatten(style)?.backgroundColor ?? theme.colors.surface;
|
|
@@ -196,14 +198,9 @@ function List(t0) {
|
|
|
196
198
|
$[33] = t7;
|
|
197
199
|
} else t7 = $[33];
|
|
198
200
|
const ground = t7;
|
|
199
|
-
|
|
200
|
-
if ($[34] !== selectLabel) {
|
|
201
|
-
t8 = selectLabel ?? messagesFor().select;
|
|
202
|
-
$[34] = selectLabel;
|
|
203
|
-
$[35] = t8;
|
|
204
|
-
} else t8 = $[35];
|
|
201
|
+
const t8 = selectLabel ?? messages.select;
|
|
205
202
|
let t9;
|
|
206
|
-
if ($[
|
|
203
|
+
if ($[34] !== ground || $[35] !== loadMore || $[36] !== onAction || $[37] !== renderEmptyState || $[38] !== state || $[39] !== t8) {
|
|
207
204
|
t9 = {
|
|
208
205
|
ground,
|
|
209
206
|
loadMore,
|
|
@@ -212,14 +209,14 @@ function List(t0) {
|
|
|
212
209
|
selectLabel: t8,
|
|
213
210
|
state
|
|
214
211
|
};
|
|
215
|
-
$[
|
|
216
|
-
$[
|
|
217
|
-
$[
|
|
218
|
-
$[
|
|
219
|
-
$[
|
|
220
|
-
$[
|
|
221
|
-
$[
|
|
222
|
-
} else t9 = $[
|
|
212
|
+
$[34] = ground;
|
|
213
|
+
$[35] = loadMore;
|
|
214
|
+
$[36] = onAction;
|
|
215
|
+
$[37] = renderEmptyState;
|
|
216
|
+
$[38] = state;
|
|
217
|
+
$[39] = t8;
|
|
218
|
+
$[40] = t9;
|
|
219
|
+
} else t9 = $[40];
|
|
223
220
|
const value = t9;
|
|
224
221
|
const T0 = ListContext;
|
|
225
222
|
const T1 = FlatList;
|
|
@@ -228,14 +225,14 @@ function List(t0) {
|
|
|
228
225
|
const t12 = isLoading ? void 0 : EmptyState;
|
|
229
226
|
const t13 = loadMore === void 0 ? void 0 : LoaderRow;
|
|
230
227
|
let t14;
|
|
231
|
-
if ($[
|
|
228
|
+
if ($[41] !== loadMore) {
|
|
232
229
|
t14 = loadMore === void 0 ? void 0 : loadMoreOf(loadMore);
|
|
233
|
-
$[
|
|
234
|
-
$[
|
|
235
|
-
} else t14 = $[
|
|
230
|
+
$[41] = loadMore;
|
|
231
|
+
$[42] = t14;
|
|
232
|
+
} else t14 = $[42];
|
|
236
233
|
const t15 = loadMore?.scrollOffset ?? LOAD_OFFSET;
|
|
237
234
|
let t16;
|
|
238
|
-
if ($[
|
|
235
|
+
if ($[43] !== T1 || $[44] !== entries || $[45] !== listStyle || $[46] !== props || $[47] !== ref || $[48] !== sticky || $[49] !== t10 || $[50] !== t11 || $[51] !== t12 || $[52] !== t13 || $[53] !== t14 || $[54] !== t15) {
|
|
239
236
|
t16 = /* @__PURE__ */ jsx(T1, {
|
|
240
237
|
...props,
|
|
241
238
|
contentContainerStyle: t10,
|
|
@@ -251,39 +248,39 @@ function List(t0) {
|
|
|
251
248
|
stickyHeaderIndices: sticky,
|
|
252
249
|
style: listStyle
|
|
253
250
|
});
|
|
254
|
-
$[
|
|
255
|
-
$[
|
|
256
|
-
$[
|
|
257
|
-
$[
|
|
258
|
-
$[
|
|
259
|
-
$[
|
|
260
|
-
$[
|
|
261
|
-
$[
|
|
262
|
-
$[
|
|
263
|
-
$[
|
|
264
|
-
$[
|
|
265
|
-
$[
|
|
266
|
-
$[
|
|
267
|
-
} else t16 = $[
|
|
251
|
+
$[43] = T1;
|
|
252
|
+
$[44] = entries;
|
|
253
|
+
$[45] = listStyle;
|
|
254
|
+
$[46] = props;
|
|
255
|
+
$[47] = ref;
|
|
256
|
+
$[48] = sticky;
|
|
257
|
+
$[49] = t10;
|
|
258
|
+
$[50] = t11;
|
|
259
|
+
$[51] = t12;
|
|
260
|
+
$[52] = t13;
|
|
261
|
+
$[53] = t14;
|
|
262
|
+
$[54] = t15;
|
|
263
|
+
$[55] = t16;
|
|
264
|
+
} else t16 = $[55];
|
|
268
265
|
let t17;
|
|
269
|
-
if ($[
|
|
266
|
+
if ($[56] !== autocomplete || $[57] !== rows) {
|
|
270
267
|
t17 = autocomplete === null ? null : /* @__PURE__ */ jsx(ResultsStatus, { count: rows });
|
|
271
|
-
$[
|
|
272
|
-
$[
|
|
273
|
-
$[
|
|
274
|
-
} else t17 = $[
|
|
268
|
+
$[56] = autocomplete;
|
|
269
|
+
$[57] = rows;
|
|
270
|
+
$[58] = t17;
|
|
271
|
+
} else t17 = $[58];
|
|
275
272
|
let t18;
|
|
276
|
-
if ($[
|
|
273
|
+
if ($[59] !== T0 || $[60] !== t16 || $[61] !== t17 || $[62] !== value) {
|
|
277
274
|
t18 = /* @__PURE__ */ jsxs(T0, {
|
|
278
275
|
value,
|
|
279
276
|
children: [t16, t17]
|
|
280
277
|
});
|
|
281
|
-
$[
|
|
282
|
-
$[
|
|
283
|
-
$[
|
|
284
|
-
$[
|
|
285
|
-
$[
|
|
286
|
-
} else t18 = $[
|
|
278
|
+
$[59] = T0;
|
|
279
|
+
$[60] = t16;
|
|
280
|
+
$[61] = t17;
|
|
281
|
+
$[62] = value;
|
|
282
|
+
$[63] = t18;
|
|
283
|
+
} else t18 = $[63];
|
|
287
284
|
return t18;
|
|
288
285
|
}
|
|
289
286
|
/**
|
|
@@ -358,6 +355,7 @@ function EmptyRow() {
|
|
|
358
355
|
const theme = useTheme();
|
|
359
356
|
const own = stylesOf(theme);
|
|
360
357
|
const headline = useTypeRole("bodyLarge");
|
|
358
|
+
const messages = useMessages();
|
|
361
359
|
const T0 = View;
|
|
362
360
|
let t0;
|
|
363
361
|
if ($[0] !== theme) {
|
|
@@ -368,32 +366,28 @@ function EmptyRow() {
|
|
|
368
366
|
const T1 = Text;
|
|
369
367
|
const t1 = composeStyles(headline, own.empty);
|
|
370
368
|
let t2;
|
|
371
|
-
if ($[2]
|
|
372
|
-
t2 =
|
|
373
|
-
$[2] = t2;
|
|
374
|
-
} else t2 = $[2];
|
|
375
|
-
let t3;
|
|
376
|
-
if ($[3] !== T1 || $[4] !== t1) {
|
|
377
|
-
t3 = /* @__PURE__ */ jsx(T1, {
|
|
369
|
+
if ($[2] !== T1 || $[3] !== messages.noResults || $[4] !== t1) {
|
|
370
|
+
t2 = /* @__PURE__ */ jsx(T1, {
|
|
378
371
|
style: t1,
|
|
379
|
-
children:
|
|
372
|
+
children: messages.noResults
|
|
380
373
|
});
|
|
381
|
-
$[
|
|
374
|
+
$[2] = T1;
|
|
375
|
+
$[3] = messages.noResults;
|
|
382
376
|
$[4] = t1;
|
|
383
|
-
$[5] =
|
|
384
|
-
} else
|
|
385
|
-
let
|
|
386
|
-
if ($[6] !== T0 || $[7] !== t0 || $[8] !==
|
|
387
|
-
|
|
377
|
+
$[5] = t2;
|
|
378
|
+
} else t2 = $[5];
|
|
379
|
+
let t3;
|
|
380
|
+
if ($[6] !== T0 || $[7] !== t0 || $[8] !== t2) {
|
|
381
|
+
t3 = /* @__PURE__ */ jsx(T0, {
|
|
388
382
|
style: t0,
|
|
389
|
-
children:
|
|
383
|
+
children: t2
|
|
390
384
|
});
|
|
391
385
|
$[6] = T0;
|
|
392
386
|
$[7] = t0;
|
|
393
|
-
$[8] =
|
|
394
|
-
$[9] =
|
|
395
|
-
} else
|
|
396
|
-
return
|
|
387
|
+
$[8] = t2;
|
|
388
|
+
$[9] = t3;
|
|
389
|
+
} else t3 = $[9];
|
|
390
|
+
return t3;
|
|
397
391
|
}
|
|
398
392
|
function emptyState() {
|
|
399
393
|
return /* @__PURE__ */ jsx(EmptyRow, {});
|
|
@@ -843,48 +837,43 @@ function ListRowNode(t0) {
|
|
|
843
837
|
* as it appears.
|
|
844
838
|
*/
|
|
845
839
|
function LoaderRow() {
|
|
846
|
-
const $ = c(
|
|
840
|
+
const $ = c(8);
|
|
847
841
|
const own = stylesOf(useTheme());
|
|
848
842
|
const { isLoading: t0, label, style, testID } = useList().loadMore ?? IDLE;
|
|
849
843
|
const isLoading = t0 === void 0 ? false : t0;
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
t1 = label ?? messagesFor().loadingMore;
|
|
853
|
-
$[0] = label;
|
|
854
|
-
$[1] = t1;
|
|
855
|
-
} else t1 = $[1];
|
|
856
|
-
const name = t1;
|
|
844
|
+
const messages = useMessages();
|
|
845
|
+
const name = label ?? messages.loadingMore;
|
|
857
846
|
useLoadingAnnouncement(isLoading, name);
|
|
858
847
|
const T0 = View;
|
|
859
|
-
const
|
|
860
|
-
const
|
|
861
|
-
let
|
|
862
|
-
if ($[
|
|
863
|
-
|
|
848
|
+
const t1 = "polite";
|
|
849
|
+
const t2 = composeStyles(isLoading ? own.loading : styles.idle, style);
|
|
850
|
+
let t3;
|
|
851
|
+
if ($[0] !== isLoading || $[1] !== name) {
|
|
852
|
+
t3 = isLoading ? /* @__PURE__ */ jsx(ProgressIndicator, {
|
|
864
853
|
"aria-label": name,
|
|
865
854
|
diameter: LOADING_DIAMETER,
|
|
866
855
|
isIndeterminate: true,
|
|
867
856
|
variant: "circular"
|
|
868
857
|
}) : null;
|
|
869
|
-
$[
|
|
870
|
-
$[
|
|
871
|
-
$[
|
|
872
|
-
} else
|
|
873
|
-
let
|
|
874
|
-
if ($[
|
|
875
|
-
|
|
876
|
-
"aria-live":
|
|
877
|
-
style:
|
|
858
|
+
$[0] = isLoading;
|
|
859
|
+
$[1] = name;
|
|
860
|
+
$[2] = t3;
|
|
861
|
+
} else t3 = $[2];
|
|
862
|
+
let t4;
|
|
863
|
+
if ($[3] !== T0 || $[4] !== t2 || $[5] !== t3 || $[6] !== testID) {
|
|
864
|
+
t4 = /* @__PURE__ */ jsx(T0, {
|
|
865
|
+
"aria-live": t1,
|
|
866
|
+
style: t2,
|
|
878
867
|
testID,
|
|
879
|
-
children:
|
|
868
|
+
children: t3
|
|
880
869
|
});
|
|
881
|
-
$[
|
|
882
|
-
$[
|
|
870
|
+
$[3] = T0;
|
|
871
|
+
$[4] = t2;
|
|
872
|
+
$[5] = t3;
|
|
873
|
+
$[6] = testID;
|
|
883
874
|
$[7] = t4;
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
} else t5 = $[9];
|
|
887
|
-
return t5;
|
|
875
|
+
} else t4 = $[7];
|
|
876
|
+
return t4;
|
|
888
877
|
}
|
|
889
878
|
function loadMoreOf({ isLoading = false, onLoadMore }) {
|
|
890
879
|
return () => {
|
|
@@ -913,7 +902,7 @@ function renderEntry({ item }) {
|
|
|
913
902
|
* so nothing is drawn there at all.
|
|
914
903
|
*/
|
|
915
904
|
function ResultsStatus(t0) {
|
|
916
|
-
const $ = c(
|
|
905
|
+
const $ = c(8);
|
|
917
906
|
const { count } = t0;
|
|
918
907
|
const t1 = useTheme();
|
|
919
908
|
let t2;
|
|
@@ -923,17 +912,19 @@ function ResultsStatus(t0) {
|
|
|
923
912
|
$[1] = t2;
|
|
924
913
|
} else t2 = $[1];
|
|
925
914
|
const own = t2;
|
|
915
|
+
const locale = useLocaleOf(void 0);
|
|
926
916
|
let t3;
|
|
927
|
-
if ($[2] !== count) {
|
|
928
|
-
t3 = resultsFor(count);
|
|
917
|
+
if ($[2] !== count || $[3] !== locale) {
|
|
918
|
+
t3 = resultsFor(count, locale);
|
|
929
919
|
$[2] = count;
|
|
930
|
-
$[3] =
|
|
931
|
-
|
|
920
|
+
$[3] = locale;
|
|
921
|
+
$[4] = t3;
|
|
922
|
+
} else t3 = $[4];
|
|
932
923
|
const message = t3;
|
|
933
924
|
useResultsAnnouncement(message);
|
|
934
925
|
if (Platform.OS === "ios") return null;
|
|
935
926
|
let t4;
|
|
936
|
-
if ($[
|
|
927
|
+
if ($[5] !== message || $[6] !== own.status) {
|
|
937
928
|
t4 = /* @__PURE__ */ jsx(View, {
|
|
938
929
|
"aria-live": "polite",
|
|
939
930
|
style: styles.status,
|
|
@@ -942,10 +933,10 @@ function ResultsStatus(t0) {
|
|
|
942
933
|
children: message
|
|
943
934
|
})
|
|
944
935
|
});
|
|
945
|
-
$[
|
|
946
|
-
$[
|
|
947
|
-
$[
|
|
948
|
-
} else t4 = $[
|
|
936
|
+
$[5] = message;
|
|
937
|
+
$[6] = own.status;
|
|
938
|
+
$[7] = t4;
|
|
939
|
+
} else t4 = $[7];
|
|
949
940
|
return t4;
|
|
950
941
|
}
|
|
951
942
|
/** A section's heading, on the list's ground so the rows pass under it. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["ReactElement","ReactNode","Ref","AccessibilityActionEvent","ColorValue","GestureResponderEvent","HostInstance","ListRenderItemInfo","PressableProps","ScrollViewProps","StyleProp","TextStyle","ViewStyle","Key","Node","Selection","SelectionMode","ListState","ListProps","StatelyListProps","Children","createContext","use","useEffect","useMemo","useRef","AccessibilityInfo","FlatList","Text","NativeText","Platform","Pressable","StyleSheet","View","useListState","AutocompleteValue","ResolvedTheme","AutocompleteContext","toggleState","CheckboxBox","messagesFor","resultsFor","hitSlop","usePressFeedback","hasContent","RowContent","rowContentColor","rowStyleOf","rowStyles","useTheme","composeStyles","themedStyles","useTypeRole","ProgressIndicator","BOX_SLOT","LOADING_DIAMETER","LOAD_OFFSET","IDLE","ListLoadMoreProps","styles","create","box","alignItems","height","justifyContent","width","idle","status","overflow","pointerEvents","position","stylesOf","colors","sizing","spacing","content","paddingVertical","sm","empty","color","onSurfaceVariant","header","paddingBottom","xxs","paddingHorizontal","lg","paddingTop","lead","flexDirection","gap","list","backgroundColor","surface","loading","minHeight","rowSm","onSurface","ListEntry","kind","node","isLoading","label","onLoadMore","scrollOffset","style","testID","Omit","children","item","T","defaultSelectedKeys","Iterable","disabledKeys","disallowEmptySelection","items","onAction","key","onSelectionChange","keys","ref","renderEmptyState","selectedKeys","selectionMode","selectLabel","ListRowProps","id","isDisabled","leading","overline","supporting","textValue","trailing","ListSectionProps","ListValue","ground","loadMore","state","ListContext","List","t0","$","_c","contentContainerStyle","keyboardShouldPersistTaps","props","t1","t2","undefined","emptyState","theme","own","autocomplete","matches","t3","filterOf","filter","t4","t5","t6","entriesOf","entries","loader","rows","sticky","listStyle","t7","flatten","t8","select","t9","value","T0","T1","t10","t11","t12","EmptyState","t13","LoaderRow","t14","loadMoreOf","t15","t16","keyOf","renderEntry","t17","t18","ListLoadMore","_props","getCollectionNode","hasChildNodes","rendered","type","ListRow","ListSection","forEach","child","push","childNodes","element","EmptyRow","headline","Symbol","for","noResults","useList","collection","length","getChildren","row","nodes","keptOf","kept","some","String","ListRowNode","onBlur","onFocus","onHoverIn","onHoverOut","onLongPress","onPress","onPressIn","onPressOut","_id","_isDisabled","_textValue","selectionManager","action","acts","checks","disabled","selectable","selected","canSelectItem","isSelected","listAction","isEmpty","feedback","withBox","lines","bb0","rowStyle","accessibilityActions","name","onAccessibilityAction","selectionActionOf","handlers","pressThen","noop","ring","layer","loadingMore","useLoadingAnnouncement","then","event","ResultsStatus","count","message","useResultsAnnouncement","OS","SectionHeader","title","SelectBox","drawn","nativeEvent","actionName","Error","was","current","announceForAccessibility","Item","LoadMore","Section","_c","NativeText"],"sources":["../../../src/components/list/index.tsx"],"sourcesContent":["import type { ReactElement, ReactNode, Ref } from 'react'\nimport type {\n AccessibilityActionEvent,\n ColorValue,\n GestureResponderEvent,\n HostInstance,\n ListRenderItemInfo,\n PressableProps,\n ScrollViewProps,\n StyleProp,\n TextStyle,\n ViewStyle,\n} from 'react-native'\nimport type { Key, Node, Selection, SelectionMode } from 'react-stately'\nimport type {\n ListState,\n ListProps as StatelyListProps,\n} from 'react-stately/useListState'\n\nimport { Children, createContext, use, useEffect, useMemo, useRef } from 'react'\nimport {\n AccessibilityInfo,\n FlatList,\n Text as NativeText,\n Platform,\n Pressable,\n StyleSheet,\n View,\n} from 'react-native'\nimport { useListState } from 'react-stately/useListState'\n\nimport type { AutocompleteValue } from '../../autocomplete'\nimport type { ResolvedTheme } from '../../theme/scope'\n\nimport { AutocompleteContext } from '../../autocomplete'\nimport { toggleState } from '../../button'\nimport { CheckboxBox } from '../../control/checkbox-box'\nimport { messagesFor, resultsFor } from '../../i18n'\nimport { hitSlop, usePressFeedback } from '../../press'\nimport {\n hasContent,\n RowContent,\n rowContentColor,\n rowStyleOf,\n rowStyles,\n} from '../../row'\nimport { useTheme } from '../../theme/scope'\nimport { composeStyles, themedStyles } from '../../theme/styles'\nimport { useTypeRole } from '../../typography/roles'\nimport { ProgressIndicator } from '../progress-indicator'\n\n// kanso-ui's List, from the lists page: a column of the rows ListItem draws,\n// shared through src/row, with selection, an action per row, sections and a\n// row that loads more. It is a `FlatList`, so a long list draws the rows in\n// view and a few screens either side rather than every row it holds.\n//\n// Four things differ from web's, each because a screen reader or a touch on\n// a phone works differently from a keyboard in a browser.\n//\n// **A row is one element to a screen reader.** Web's row is a grid row whose\n// checkbox is a cell a keyboard reaches on its own. VoiceOver and TalkBack\n// read a pressable row as one element and reach nothing inside it, so the\n// row is a button that reports whether it is selected, and selecting it is an\n// accessibility action named by `selectLabel`, which is what web's checkbox\n// is named by. The checkbox is drawn for the eye and hidden from the reader.\n// Under React Native Web the row reports itself pressed instead, as a toggle\n// button does, since a button cannot be selected there.\n//\n// **A press does what React Aria's touch press does.** On a row that selects\n// and has no action, a press selects it. On one with an action, a press runs\n// the action while nothing is selected and selects once something is, and a\n// long press selects; a press on the checkbox selects either way.\n//\n// **Sections are flattened, with sticky headers.** A `FlatList` holds one\n// column of cells, so a section is its header, which stays at the top while\n// its rows scroll under it, and then its rows. The header is a heading to a\n// screen reader rather than the name of a group.\n//\n// **The list is drawn on surface,** the lists page's container colour, which\n// web leaves to the page. A sticky header needs a ground to cover the rows\n// scrolling under it, and it takes the list's, so a `style` giving the list\n// another background gives its headers the same one.\n\n// A checkbox drawn in a row sits in a slot an icon's size, the lists page's\n// 24dp, rather than in the 40dp state layer Checkbox draws it in.\nconst BOX_SLOT = 24\n\n// The ring the loading row draws, a row's icon across.\nconst LOADING_DIAMETER = '24px'\n\n// How far past the visible end of the list `onLoadMore` is called, as a\n// share of the list's visible height, as web's `scrollOffset` defaults.\nconst LOAD_OFFSET = 1\n\n// What the loading row reads when the list has no `List.LoadMore`, which\n// leaves it nothing to draw.\nconst IDLE: ListLoadMoreProps = {}\n\nconst styles = StyleSheet.create({\n box: {\n alignItems: 'center',\n height: BOX_SLOT,\n justifyContent: 'center',\n width: BOX_SLOT,\n },\n // What `List.LoadMore` leaves while nothing is loading: the live region,\n // with nothing in it and no height.\n idle: {\n height: 0,\n },\n // The count a search leaves, which a screen reader hears and no one sees:\n // out of the flow, and a point across, as web's visually hidden status is.\n status: {\n height: 1,\n overflow: 'hidden',\n pointerEvents: 'none',\n position: 'absolute',\n width: 1,\n },\n})\n\nconst stylesOf = themedStyles(({ colors, sizing, spacing }: ResolvedTheme) =>\n StyleSheet.create({\n // The 8dp above the first row and below the last, as web's container\n // draws them.\n content: {\n paddingVertical: spacing.sm,\n },\n empty: {\n color: colors.onSurfaceVariant,\n },\n // The lists page's subhead: title small in on surface variant, at the\n // row's inline padding so it lines up with the headlines under it, with\n // more room above than below so it reads as belonging to what follows.\n header: {\n color: colors.onSurfaceVariant,\n paddingBottom: spacing.xxs,\n paddingHorizontal: spacing.lg,\n paddingTop: spacing.lg,\n },\n // The checkbox beside whatever the row's leading slot was given, a\n // row's own gap apart.\n lead: {\n alignItems: 'center',\n flexDirection: 'row',\n gap: spacing.lg,\n },\n list: {\n backgroundColor: colors.surface,\n },\n // A row's height for the ring, so the list does not jump when the next\n // items land.\n loading: {\n alignItems: 'center',\n justifyContent: 'center',\n minHeight: sizing.rowSm,\n },\n // Never seen, but in a pair that reads, for a checker that looks.\n status: {\n color: colors.onSurface,\n },\n }),\n)\n\n/** One cell of the `FlatList`: a section's header, or a row. */\ntype ListEntry = {\n readonly kind: 'header' | 'item'\n readonly node: Node<unknown>\n}\n\ntype ListLoadMoreProps = {\n /**\n * Draws the ring in a row of its own while more items are being fetched.\n * @default false\n */\n readonly isLoading?: boolean\n /**\n * What a screen reader calls the ring, and hears as it appears. Left out,\n * it is the word for it in the device's language, \"Loading more\" in\n * English.\n */\n readonly label?: string\n /**\n * Called when the end of the list comes within `scrollOffset` of its\n * visible end, while nothing is loading. Called once for each length the\n * list reaches, so a load that adds nothing does not start another.\n */\n readonly onLoadMore?: () => void\n /**\n * How far past the visible end of the list the next items are asked for,\n * as a share of the list's visible height.\n * @default 1\n */\n readonly scrollOffset?: number\n readonly style?: StyleProp<ViewStyle>\n readonly testID?: string\n}\n\ntype ListProps<T extends object = object> = Omit<\n ScrollViewProps,\n 'children' | 'role' | 'stickyHeaderIndices' | 'style'\n> & {\n /**\n * The rows, each a `List.Item`, `List.Section` or `List.LoadMore`. With\n * `items`, a function from an item to its part, called for each item in\n * turn.\n */\n readonly children?: ((item: T) => ReactElement) | ReactNode\n /** The keys selected at first, when the list keeps its own selection. */\n readonly defaultSelectedKeys?: 'all' | Iterable<Key>\n /** The keys of the rows drawn disabled, which take no presses. */\n readonly disabledKeys?: Iterable<Key>\n /**\n * Keeps the last selected row selected, so a press on it changes nothing.\n * @default false\n */\n readonly disallowEmptySelection?: boolean\n /** The entries `children` draws a part for, when it is a function. */\n readonly items?: Iterable<T>\n /**\n * Called with a row's key when a press runs its action. A row's own\n * `onAction` takes its place for that row.\n */\n readonly onAction?: (key: Key) => void\n /** Called with the selected keys whenever a press changes them. */\n readonly onSelectionChange?: (keys: Selection) => void\n readonly ref?: Ref<FlatList>\n /**\n * What the list shows when it has no rows and nothing is loading. Left\n * out, it is a muted row saying \"No results\" in the device's language, so\n * the list keeps a row's height.\n */\n readonly renderEmptyState?: () => ReactNode\n /**\n * The selected keys, for a call site holding the selection itself with\n * `onSelectionChange`.\n */\n readonly selectedKeys?: 'all' | Iterable<Key>\n /**\n * Whether rows can be selected: one at a time, several, or none. A list\n * that selects draws a checkbox on every row.\n * @default 'none'\n */\n readonly selectionMode?: SelectionMode\n /**\n * What selecting a row is called, for a screen reader: the accessibility\n * action each selectable row offers, which is what its checkbox does. The\n * row's own text is what names the row. Left out, it is the word for it in\n * the device's language, \"Select\" in English.\n */\n readonly selectLabel?: string\n readonly style?: StyleProp<ViewStyle>\n}\n\n// `Row` rather than `Item`, though the part is `List.Item`, for the reason\n// web gives: `ListItemProps` is the standalone ListItem's, and both are\n// exported from the package.\ntype ListRowProps = Omit<\n PressableProps,\n 'children' | 'disabled' | 'id' | 'role' | 'style'\n> & {\n /** The row's headline, the one thing it is mostly about. */\n readonly children?: ReactNode\n /** The key the row is selected and reported by. Give one to every row. */\n readonly id?: Key\n /**\n * Draws the row disabled, and takes no presses on it, as a key in the\n * list's `disabledKeys` does.\n * @default false\n */\n readonly isDisabled?: boolean\n /** Content before the headline: an avatar, an icon. */\n readonly leading?: ReactNode\n /**\n * Called when a press runs the row's action, in place of the list's\n * `onAction` for this row.\n */\n readonly onAction?: () => void\n /**\n * A line above the headline, in label small and the muted role. Given\n * beside `supporting`, it makes the row the three-line item.\n */\n readonly overline?: ReactNode\n readonly ref?: Ref<HostInstance>\n readonly style?: StyleProp<ViewStyle>\n /** A second line under the headline, in body medium and the muted role. */\n readonly supporting?: ReactNode\n /**\n * The row's text, read off `children` when they are a plain string, so a\n * row whose headline is an element passes it.\n */\n readonly textValue?: string\n /** Content after the headline, such as an amount or a control. */\n readonly trailing?: ReactNode\n}\n\ntype ListSectionProps = {\n /** The rows in the section. */\n readonly children?: ReactNode\n /**\n * The section's heading, which stays at the top of the list while the\n * section's rows scroll under it. A section without one is its rows alone.\n */\n readonly header?: ReactNode\n readonly id?: Key\n}\n\n// What the cells of the `FlatList` read from the list they are drawn in.\ntype ListValue = {\n /** The ground a sticky header covers the rows under it with. */\n readonly ground: ColorValue\n /** The `List.LoadMore` the list ends in, if it has one. */\n readonly loadMore: ListLoadMoreProps | undefined\n readonly onAction: ((key: Key) => void) | undefined\n readonly renderEmptyState: () => ReactNode\n readonly selectLabel: string\n readonly state: ListState<unknown>\n}\n\nconst ListContext = createContext<ListValue | null>(null)\n\n/**\n * A list of rows, one or more of which can be selected. Selection is React\n * Stately's, as web's is React Aria's: set `selectionMode` to `single` or\n * `multiple`, and pass `selectedKeys` with `onSelectionChange` to control\n * it or `defaultSelectedKeys` to let it keep its own. A list whose rows do\n * something takes `onAction`, or an `onAction` on each row.\n *\n * ```tsx\n * <List aria-label=\"Label\" selectionMode=\"multiple\">\n * <List.Item id=\"first\" supporting=\"Supporting line\">First item</List.Item>\n * </List>\n * ```\n *\n * ListItem is the row on its own; this is the collection that draws the\n * same row and adds selection, sections and a row that loads more. Composed\n * from parts, `List.Item`, `List.Section` and `List.LoadMore`, which the\n * list draws from their props, so none of them renders anything on its\n * own. Name the list with `aria-label`. It scrolls by itself, so it wants a\n * height to fill: a short list on a page that scrolls takes\n * `scrollEnabled={false}` and is laid out at its full length. `style` and\n * `ref` land on the `FlatList`.\n *\n * Inside an `Autocomplete`, the list shows the rows the search keeps and\n * says how many there are to a screen reader, and a tap on a row reaches it\n * while the keyboard is up.\n */\nfunction List<T extends object = object>({\n children,\n contentContainerStyle,\n defaultSelectedKeys,\n disabledKeys,\n disallowEmptySelection,\n items,\n keyboardShouldPersistTaps,\n onAction,\n onSelectionChange,\n ref,\n renderEmptyState = emptyState,\n selectedKeys,\n selectionMode = 'none',\n selectLabel,\n style,\n ...props\n}: ListProps<T>) {\n const theme = useTheme()\n const own = stylesOf(theme)\n const autocomplete = use(AutocompleteContext)\n const matches = autocomplete?.matches\n const filter = useMemo(\n () => (matches === undefined ? undefined : filterOf<T>(matches)),\n [matches],\n )\n const state = useListState<T>({\n // Each part builds its own entry in the collection; see the parts'\n // `getCollectionNode`. The collection skips what is not an element, as a\n // ReactNode may be, and asks any element for its entry.\n // oxlint-disable-next-line typescript/no-unsafe-type-assertion -- see above\n children: children as StatelyListProps<T>['children'],\n defaultSelectedKeys,\n disabledKeys,\n disallowEmptySelection,\n filter,\n items,\n onSelectionChange,\n selectedKeys,\n selectionMode,\n })\n const { entries, loader, rows, sticky } = useMemo(\n () => entriesOf(state),\n [state],\n )\n const listStyle = composeStyles<ViewStyle>(own.list, style)\n // oxlint-disable-next-line typescript/no-unsafe-assignment -- a node carries the props its part was written with, which React Stately types as `any`\n const loadMore: ListLoadMoreProps | undefined = loader?.props\n const isLoading = loadMore?.isLoading ?? false\n // The list's own ground unless `style` gives it another.\n const ground =\n StyleSheet.flatten(style)?.backgroundColor ?? theme.colors.surface\n const value = useMemo<ListValue>(\n () => ({\n ground,\n loadMore,\n onAction,\n renderEmptyState,\n selectLabel: selectLabel ?? messagesFor().select,\n state,\n }),\n [ground, loadMore, onAction, renderEmptyState, selectLabel, state],\n )\n\n return (\n <ListContext value={value}>\n <FlatList\n {...props}\n contentContainerStyle={composeStyles<ViewStyle>(\n own.content,\n contentContainerStyle,\n )}\n data={entries}\n keyboardShouldPersistTaps={\n keyboardShouldPersistTaps ??\n (autocomplete === null ? undefined : 'handled')\n }\n keyExtractor={keyOf}\n ListEmptyComponent={isLoading ? undefined : EmptyState}\n ListFooterComponent={loadMore === undefined ? undefined : LoaderRow}\n onEndReached={loadMore === undefined ? undefined : loadMoreOf(loadMore)}\n onEndReachedThreshold={loadMore?.scrollOffset ?? LOAD_OFFSET}\n ref={ref}\n renderItem={renderEntry}\n stickyHeaderIndices={sticky}\n style={listStyle}\n />\n {autocomplete === null ? null : <ResultsStatus count={rows} />}\n </ListContext>\n )\n}\n\n/**\n * The row shown while more items are being fetched. `onLoadMore` is called\n * as the reader nears the end of the list, and the ring is drawn only while\n * `isLoading`, in a live region, so a screen reader hears it arrive. It\n * goes last, after the rows it loads more of.\n */\nfunction ListLoadMore(_props: ListLoadMoreProps): null {\n return null\n}\n\nListLoadMore.getCollectionNode = function* getCollectionNode(\n props: ListLoadMoreProps,\n) {\n yield { hasChildNodes: false, props, rendered: null, type: 'loader' }\n}\n\n/**\n * One row. Its slots are ListItem's: `leading`, the headline as children,\n * `overline` above it, `supporting` under it, and `trailing`. Give every\n * row an `id`, which is the key selection is reported by. A list that\n * selects draws a checkbox before whatever `leading` holds.\n *\n * The list draws it from its entry in the collection, so it renders nothing\n * on its own. `style`, `ref` and `testID` land on the row.\n */\nfunction ListRow(_props: ListRowProps): null {\n return null\n}\n\n// The entry the collection holds for a row, as React Stately's own `Item`\n// gives one: keyed by the row's `id`, and carrying the props it is drawn\n// from.\nListRow.getCollectionNode = function* getCollectionNode(props: ListRowProps) {\n yield {\n 'aria-label': props['aria-label'],\n hasChildNodes: false,\n key: props.id,\n props,\n rendered: props.children,\n textValue:\n props.textValue ??\n (typeof props.children === 'string' ? props.children : ''),\n type: 'item',\n }\n}\n\n/**\n * A group of rows under a heading, which stays at the top of the list while\n * the group's rows scroll under it.\n */\nfunction ListSection(_props: ListSectionProps): null {\n return null\n}\n\nListSection.getCollectionNode = function* getCollectionNode(\n props: ListSectionProps,\n) {\n const children: ReactNode[] = []\n\n // Walked as React Stately's own Section walks them, which leaves each\n // child its own key rather than the one `Children.toArray` gives it.\n Children.forEach(props.children, (child) => {\n if (child !== null && child !== undefined && child !== false) {\n children.push(child)\n }\n })\n\n yield {\n *childNodes() {\n for (const element of children) {\n yield { element }\n }\n },\n hasChildNodes: true,\n key: props.id,\n props,\n rendered: props.header,\n type: 'section',\n }\n}\n\n/**\n * The muted row a list shows when nothing is in it: a row's box and\n * headline in on surface variant, with no press of its own.\n */\nfunction EmptyRow() {\n const theme = useTheme()\n const own = stylesOf(theme)\n const headline = useTypeRole('bodyLarge')\n\n return (\n <View style={rowStyleOf(theme, {})}>\n <NativeText style={composeStyles<TextStyle>(headline, own.empty)}>\n {messagesFor().noResults}\n </NativeText>\n </View>\n )\n}\n\n// What the list shows when nothing is in it.\nfunction emptyState() {\n return <EmptyRow />\n}\n\n// The list's empty state, as the component `ListEmptyComponent` takes.\nfunction EmptyState() {\n return <>{useList().renderEmptyState()}</>\n}\n\n/**\n * The cells the `FlatList` draws, in order, where the headers among them\n * are, and how many rows there are: the rows outside any section, and each\n * section's header followed by its rows. The row that loads more is drawn\n * after them all.\n */\nfunction entriesOf<T>(state: ListState<T>) {\n const entries: ListEntry[] = []\n const sticky: number[] = []\n let loader: Node<T> | undefined\n let rows = 0\n\n for (const node of state.collection) {\n if (node.type === 'loader') {\n loader = node\n } else if (node.type === 'section') {\n if (hasContent(node.rendered)) {\n sticky.push(entries.length)\n entries.push({ kind: 'header', node })\n }\n const children =\n state.collection.getChildren?.(node.key) ??\n // oxlint-disable-next-line typescript/no-deprecated -- a fallback for a collection without getChildren\n node.childNodes\n for (const row of children) {\n entries.push({ kind: 'item', node: row })\n rows++\n }\n } else {\n entries.push({ kind: 'item', node })\n rows++\n }\n }\n\n return { entries, loader, rows, sticky }\n}\n\n/**\n * What a list inside an Autocomplete builds its collection from: the rows\n * the search keeps, each section with a row left in it, and the row that\n * loads more. Each node is copied rather than handed on, as React Stately's\n * ComboBox copies its own, since a collection numbers the nodes it holds.\n */\nfunction filterOf<T>(matches: AutocompleteValue['matches']) {\n return (nodes: Iterable<Node<T>>) => keptOf(nodes, matches)\n}\n\nfunction keptOf<T>(\n nodes: Iterable<Node<T>>,\n matches: AutocompleteValue['matches'],\n): Node<T>[] {\n const kept: Node<T>[] = []\n\n for (const node of nodes) {\n if (node.type === 'section') {\n // oxlint-disable-next-line typescript/no-deprecated -- a filter is handed the nodes before a collection holds them, so there is none to ask\n const rows = keptOf(node.childNodes, matches)\n\n if (rows.some((row) => row.type === 'item')) {\n // oxlint-disable-next-line typescript/no-deprecated -- the field the collection reads a section's rows from\n kept.push({ ...node, childNodes: rows })\n }\n } else if (node.type !== 'item' || matches(node.textValue, node)) {\n kept.push({ ...node })\n }\n }\n\n return kept\n}\n\n// A cell's key in the `FlatList`: a header's and a row's apart, since a\n// section's header carries the section's key.\nfunction keyOf({ kind, node }: ListEntry) {\n return `${kind}:${String(node.key)}`\n}\n\n/**\n * A row: the state layer, the ripple and the focus ring over the checkbox,\n * the leading slot, the lines and the trailing slot, on primary container\n * while selected. A row with nothing to do on a press, in a list that\n * neither selects nor acts, is a `View` that only presents.\n */\nfunction ListRowNode({ node }: { readonly node: Node<unknown> }) {\n const theme = useTheme()\n const own = stylesOf(theme)\n const list = useList()\n\n // oxlint-disable-next-line typescript/no-unsafe-assignment -- a node carries the props its row was written with, which React Stately types as `any`\n const {\n children,\n id: _id,\n isDisabled: _isDisabled,\n leading,\n onAction,\n onBlur,\n onFocus,\n onHoverIn,\n onHoverOut,\n onLongPress,\n onPress,\n onPressIn,\n onPressOut,\n overline,\n ref,\n style,\n supporting,\n textValue: _textValue,\n trailing,\n ...props\n }: ListRowProps = node.props\n const { selectionManager } = list.state\n const { key } = node\n // The selection manager reads a row's own `isDisabled` off its entry,\n // beside the list's `disabledKeys`, so it answers for both.\n const disabled = selectionManager.isDisabled(key)\n const checks = selectionManager.selectionMode !== 'none'\n const selectable = selectionManager.canSelectItem(key)\n const selected = checks && selectionManager.isSelected(key)\n const listAction = list.onAction\n const action =\n onAction ??\n (listAction === undefined\n ? undefined\n : () => {\n listAction(key)\n })\n // React Aria's rule for a touch press on a row that selects with a\n // checkbox: the action while nothing is selected, the selection after.\n const acts = action !== undefined && (!selectable || selectionManager.isEmpty)\n const select = () => {\n selectionManager.select(key)\n }\n const content = rowContentColor(theme, {\n isDisabled: disabled,\n isSelected: selected,\n })\n const feedback = usePressFeedback({\n color: content,\n disabled,\n onBlur,\n onFocus,\n onHoverIn,\n onHoverOut,\n onPressIn,\n onPressOut,\n })\n\n const lead = checks\n ? withBox(\n <SelectBox\n isDisabled={disabled}\n isSelected={selected}\n onPress={acts && selectable ? select : undefined}\n />,\n leading,\n own.lead,\n )\n : leading\n const lines = (\n <RowContent\n isDisabled={disabled}\n isSelected={selected}\n leading={lead}\n overline={overline}\n supporting={supporting}\n trailing={trailing}\n >\n {children}\n </RowContent>\n )\n const rowStyle = rowStyleOf(theme, {\n isSelected: selected,\n overline,\n supporting,\n })\n\n if (!checks && action === undefined && onPress === undefined) {\n return (\n <View\n aria-disabled={disabled || undefined}\n ref={ref}\n style={composeStyles<ViewStyle>(rowStyle, style)}\n testID={props.testID}\n >\n {lines}\n </View>\n )\n }\n\n return (\n <Pressable\n role=\"button\"\n {...props}\n {...(checks ? toggleState(selected) : undefined)}\n {...(selectable\n ? {\n accessibilityActions: [{ label: list.selectLabel, name: 'select' }],\n onAccessibilityAction: selectionActionOf(select),\n }\n : undefined)}\n {...feedback.handlers}\n disabled={disabled}\n onLongPress={\n action !== undefined && selectable\n ? pressThen(onLongPress, select)\n : onLongPress\n }\n onPress={pressThen(onPress, acts ? action : selectable ? select : noop)}\n ref={ref}\n style={composeStyles<ViewStyle>(\n rowStyle,\n feedback.ring,\n feedback.ring === undefined ? undefined : rowStyles.ring,\n style,\n )}\n >\n {feedback.layer}\n {lines}\n </Pressable>\n )\n}\n\n/**\n * The row `List.LoadMore` draws: a live region, empty while idle and\n * holding the ring while loading. Android and React Native Web say what\n * arrives in it; iOS has no live regions, so the ring's name is said there\n * as it appears.\n */\nfunction LoaderRow() {\n const own = stylesOf(useTheme())\n const { isLoading = false, label, style, testID } = useList().loadMore ?? IDLE\n const name = label ?? messagesFor().loadingMore\n\n useLoadingAnnouncement(isLoading, name)\n\n return (\n <View\n aria-live=\"polite\"\n style={composeStyles<ViewStyle>(\n isLoading ? own.loading : styles.idle,\n style,\n )}\n testID={testID}\n >\n {isLoading ? (\n <ProgressIndicator\n aria-label={name}\n diameter={LOADING_DIAMETER}\n isIndeterminate\n variant=\"circular\"\n />\n ) : null}\n </View>\n )\n}\n\n// Asks for more as the reader nears the end, unless a load is under way.\nfunction loadMoreOf({ isLoading = false, onLoadMore }: ListLoadMoreProps) {\n return () => {\n if (!isLoading) {\n onLoadMore?.()\n }\n }\n}\n\nfunction noop() {\n // A press on a row with nothing to do runs the call site's `onPress` alone.\n}\n\n/**\n * The press handler of a row: the call site's own handler, then the row's.\n * Built by a call rather than written inline at the prop, which is what\n * react-perf's no-new-function-as-prop is after.\n */\nfunction pressThen(\n onPress: PressableProps['onPress'],\n then: (() => void) | undefined,\n) {\n return (event: GestureResponderEvent) => {\n onPress?.(event)\n then?.()\n }\n}\n\n// One cell, drawn as the part it came from.\nfunction renderEntry({ item }: ListRenderItemInfo<ListEntry>) {\n return item.kind === 'header' ? (\n <SectionHeader node={item.node} />\n ) : (\n <ListRowNode node={item.node} />\n )\n}\n\n/**\n * How many rows a search leaves, said to a screen reader as it changes and\n * never drawn: in a polite live region on Android and under React Native\n * Web, and through `AccessibilityInfo` on iOS, which has no live regions,\n * so nothing is drawn there at all.\n */\nfunction ResultsStatus({ count }: { readonly count: number }) {\n const own = stylesOf(useTheme())\n const message = resultsFor(count)\n\n useResultsAnnouncement(message)\n\n if (Platform.OS === 'ios') {\n return null\n }\n\n return (\n <View aria-live=\"polite\" style={styles.status}>\n <NativeText style={own.status}>{message}</NativeText>\n </View>\n )\n}\n\n/** A section's heading, on the list's ground so the rows pass under it. */\nfunction SectionHeader({ node }: { readonly node: Node<unknown> }) {\n const own = stylesOf(useTheme())\n const title = useTypeRole('titleSmall')\n const { ground } = useList()\n\n return (\n <View style={composeStyles<ViewStyle>({ backgroundColor: ground })}>\n <NativeText\n role=\"heading\"\n style={composeStyles<TextStyle>(title, own.header)}\n >\n {node.rendered}\n </NativeText>\n </View>\n )\n}\n\n/**\n * The checkbox a selecting row draws, for the eye alone: the row is what a\n * screen reader hears and presses. On a row whose press runs an action, a\n * touch on the box selects instead, through a press of its own the size of\n * a 48dp target, hidden from the reader as the box is.\n */\nfunction SelectBox({\n isDisabled,\n isSelected,\n onPress,\n}: {\n readonly isDisabled: boolean\n readonly isSelected: boolean\n readonly onPress: (() => void) | undefined\n}) {\n const drawn = (\n <CheckboxBox\n isDisabled={isDisabled}\n isSelected={isSelected}\n within={BOX_SLOT}\n />\n )\n\n if (onPress === undefined) {\n return <View style={styles.box}>{drawn}</View>\n }\n\n return (\n <Pressable\n accessible={false}\n aria-hidden\n disabled={isDisabled}\n focusable={false}\n hitSlop={hitSlop(BOX_SLOT, BOX_SLOT)}\n onPress={onPress}\n style={styles.box}\n tabIndex={-1}\n >\n {drawn}\n </Pressable>\n )\n}\n\n// Runs the selection when a screen reader asks for the row's select action.\nfunction selectionActionOf(select: () => void) {\n return (event: AccessibilityActionEvent) => {\n if (event.nativeEvent.actionName === 'select') {\n select()\n }\n }\n}\n\n// The list a cell is drawn in. Every cell is the `FlatList`'s, inside the\n// list's own provider, so there always is one.\nfunction useList(): ListValue {\n const list = use(ListContext)\n\n if (list === null) {\n throw new Error('A List part is drawn by the List it is in.')\n }\n return list\n}\n\n// Says the ring's name on iOS as it appears. A list loading as it mounts\n// says nothing, as a live region does not read what it was mounted holding.\nfunction useLoadingAnnouncement(isLoading: boolean, label: string) {\n const was = useRef(isLoading)\n\n useEffect(() => {\n if (isLoading && !was.current && Platform.OS === 'ios') {\n AccessibilityInfo.announceForAccessibility(label)\n }\n was.current = isLoading\n }, [isLoading, label])\n}\n\n// Says how many rows are left on iOS each time the count changes. The count\n// a list mounts with is not said, as a live region does not read what it was\n// mounted holding.\nfunction useResultsAnnouncement(message: string) {\n const was = useRef(message)\n\n useEffect(() => {\n if (message !== was.current && Platform.OS === 'ios') {\n AccessibilityInfo.announceForAccessibility(message)\n }\n was.current = message\n }, [message])\n}\n\n/**\n * The leading slot of a row that selects: the checkbox, then whatever the\n * row was given, in a row of their own so the two sit side by side.\n */\nfunction withBox(\n box: ReactElement,\n leading: ReactNode,\n style: StyleProp<ViewStyle>,\n): ReactNode {\n return hasContent(leading) ? (\n <View style={style}>\n {box}\n {leading}\n </View>\n ) : (\n box\n )\n}\n\nList.Item = ListRow\nList.LoadMore = ListLoadMore\nList.Section = ListSection\n\nexport { List, ListLoadMore, ListRow, ListSection }\nexport type { ListLoadMoreProps, ListProps, ListRowProps, ListSectionProps }\n"],"mappings":";;;;;;;;;;;;;;;;;AAqFA,MAAMsD,WAAW;AAGjB,MAAMC,mBAAmB;AAIzB,MAAMC,cAAc;AAIpB,MAAMC,OAA0B,CAAC;AAEjC,MAAME,SAAS3B,WAAW4B,OAAO;CAC/BC,KAAK;EACHC,YAAY;EACZC,QAAQT;EACRU,gBAAgB;EAChBC,OAAOX;CACT;CAGAY,MAAM,EACJH,QAAQ,EACV;CAGAI,QAAQ;EACNJ,QAAQ;EACRK,UAAU;EACVC,eAAe;EACfC,UAAU;EACVL,OAAO;CACT;AACF,CAAC;AAED,MAAMM,WAAWpB,cAAc,EAAEqB,QAAQC,QAAQC,cAC/C1C,WAAW4B,OAAO;CAGhBe,SAAS,EACPC,iBAAiBF,QAAQG,GAC3B;CACAC,OAAO,EACLC,OAAOP,OAAOQ,iBAChB;CAIAC,QAAQ;EACNF,OAAOP,OAAOQ;EACdE,eAAeR,QAAQS;EACvBC,mBAAmBV,QAAQW;EAC3BC,YAAYZ,QAAQW;CACtB;CAGAE,MAAM;EACJzB,YAAY;EACZ0B,eAAe;EACfC,KAAKf,QAAQW;CACf;CACAK,MAAM,EACJC,iBAAiBnB,OAAOoB,QAC1B;CAGAC,SAAS;EACP/B,YAAY;EACZE,gBAAgB;EAChB8B,WAAWrB,OAAOsB;CACpB;CAEA5B,QAAQ,EACNY,OAAOP,OAAOwB,UAChB;AACF,CAAC,CACH;AA6JA,MAAMyC,cAAcpH,cAAgC,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4BxD,SAAAq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,UAAUoH,IAKPM,EAAS;AAAC;;;;;AAOf,SAAS8F,QACPlL,KACAkE,SACAvB,OACW;CACX,OAAO5D,WAAWmF,OAAO,IACvB,qBAAC,MAAD;EAAavB;EAAb,UAAA,CACG3C,KACAkE,OACG;CAENlE,CAAAA,IAAAA;AAEJ;AAEA6E,KAAKqI,OAAO9E;AACZvD,KAAKsI,WAAWrF;AAChBjD,KAAKuI,UAAU/E"}
|
|
1
|
+
{"version":3,"file":"index.js","names":["ReactElement","ReactNode","Ref","AccessibilityActionEvent","ColorValue","GestureResponderEvent","HostInstance","ListRenderItemInfo","PressableProps","ScrollViewProps","StyleProp","TextStyle","ViewStyle","Key","Node","Selection","SelectionMode","ListState","ListProps","StatelyListProps","Children","createContext","use","useEffect","useMemo","useRef","AccessibilityInfo","FlatList","Text","NativeText","Platform","Pressable","StyleSheet","View","useListState","AutocompleteValue","ResolvedTheme","AutocompleteContext","toggleState","CheckboxBox","resultsFor","useLocaleOf","useMessages","hitSlop","usePressFeedback","hasContent","RowContent","rowContentColor","rowStyleOf","rowStyles","useTheme","composeStyles","themedStyles","useTypeRole","ProgressIndicator","BOX_SLOT","LOADING_DIAMETER","LOAD_OFFSET","IDLE","ListLoadMoreProps","styles","create","box","alignItems","height","justifyContent","width","idle","status","overflow","pointerEvents","position","stylesOf","colors","sizing","spacing","content","paddingVertical","sm","empty","color","onSurfaceVariant","header","paddingBottom","xxs","paddingHorizontal","lg","paddingTop","lead","flexDirection","gap","list","backgroundColor","surface","loading","minHeight","rowSm","onSurface","ListEntry","kind","node","isLoading","label","onLoadMore","scrollOffset","style","testID","Omit","children","item","T","defaultSelectedKeys","Iterable","disabledKeys","disallowEmptySelection","items","onAction","key","onSelectionChange","keys","ref","renderEmptyState","selectedKeys","selectionMode","selectLabel","ListRowProps","id","isDisabled","leading","overline","supporting","textValue","trailing","ListSectionProps","ListValue","ground","loadMore","state","ListContext","List","t0","$","_c","contentContainerStyle","keyboardShouldPersistTaps","props","t1","t2","undefined","emptyState","theme","own","autocomplete","matches","t3","filterOf","filter","t4","t5","t6","entriesOf","entries","loader","rows","sticky","listStyle","messages","t7","flatten","t8","select","t9","value","T0","T1","t10","t11","t12","EmptyState","t13","LoaderRow","t14","loadMoreOf","t15","t16","keyOf","renderEntry","t17","t18","ListLoadMore","_props","getCollectionNode","hasChildNodes","rendered","type","ListRow","ListSection","forEach","child","push","childNodes","element","EmptyRow","headline","noResults","useList","collection","length","getChildren","row","nodes","keptOf","kept","some","String","ListRowNode","onBlur","onFocus","onHoverIn","onHoverOut","onLongPress","onPress","onPressIn","onPressOut","_id","_isDisabled","_textValue","selectionManager","action","acts","checks","disabled","selectable","selected","canSelectItem","isSelected","listAction","isEmpty","feedback","withBox","lines","Symbol","for","bb0","rowStyle","accessibilityActions","name","onAccessibilityAction","selectionActionOf","handlers","pressThen","noop","ring","layer","loadingMore","useLoadingAnnouncement","then","event","ResultsStatus","count","locale","message","useResultsAnnouncement","OS","SectionHeader","title","SelectBox","drawn","nativeEvent","actionName","Error","was","current","announceForAccessibility","Item","LoadMore","Section","_c","NativeText"],"sources":["../../../src/components/list/index.tsx"],"sourcesContent":["import type { ReactElement, ReactNode, Ref } from 'react'\nimport type {\n AccessibilityActionEvent,\n ColorValue,\n GestureResponderEvent,\n HostInstance,\n ListRenderItemInfo,\n PressableProps,\n ScrollViewProps,\n StyleProp,\n TextStyle,\n ViewStyle,\n} from 'react-native'\nimport type { Key, Node, Selection, SelectionMode } from 'react-stately'\nimport type {\n ListState,\n ListProps as StatelyListProps,\n} from 'react-stately/useListState'\n\nimport { Children, createContext, use, useEffect, useMemo, useRef } from 'react'\nimport {\n AccessibilityInfo,\n FlatList,\n Text as NativeText,\n Platform,\n Pressable,\n StyleSheet,\n View,\n} from 'react-native'\nimport { useListState } from 'react-stately/useListState'\n\nimport type { AutocompleteValue } from '../../autocomplete'\nimport type { ResolvedTheme } from '../../theme/scope'\n\nimport { AutocompleteContext } from '../../autocomplete'\nimport { toggleState } from '../../button'\nimport { CheckboxBox } from '../../control/checkbox-box'\nimport { resultsFor } from '../../i18n'\nimport { useLocaleOf, useMessages } from '../../i18n/provider'\nimport { hitSlop, usePressFeedback } from '../../press'\nimport {\n hasContent,\n RowContent,\n rowContentColor,\n rowStyleOf,\n rowStyles,\n} from '../../row'\nimport { useTheme } from '../../theme/scope'\nimport { composeStyles, themedStyles } from '../../theme/styles'\nimport { useTypeRole } from '../../typography/roles'\nimport { ProgressIndicator } from '../progress-indicator'\n\n// kanso-ui's List, from the lists page: a column of the rows ListItem draws,\n// shared through src/row, with selection, an action per row, sections and a\n// row that loads more. It is a `FlatList`, so a long list draws the rows in\n// view and a few screens either side rather than every row it holds.\n//\n// Four things differ from web's, each because a screen reader or a touch on\n// a phone works differently from a keyboard in a browser.\n//\n// **A row is one element to a screen reader.** Web's row is a grid row whose\n// checkbox is a cell a keyboard reaches on its own. VoiceOver and TalkBack\n// read a pressable row as one element and reach nothing inside it, so the\n// row is a button that reports whether it is selected, and selecting it is an\n// accessibility action named by `selectLabel`, which is what web's checkbox\n// is named by. The checkbox is drawn for the eye and hidden from the reader.\n// Under React Native Web the row reports itself pressed instead, as a toggle\n// button does, since a button cannot be selected there.\n//\n// **A press does what React Aria's touch press does.** On a row that selects\n// and has no action, a press selects it. On one with an action, a press runs\n// the action while nothing is selected and selects once something is, and a\n// long press selects; a press on the checkbox selects either way.\n//\n// **Sections are flattened, with sticky headers.** A `FlatList` holds one\n// column of cells, so a section is its header, which stays at the top while\n// its rows scroll under it, and then its rows. The header is a heading to a\n// screen reader rather than the name of a group.\n//\n// **The list is drawn on surface,** the lists page's container colour, which\n// web leaves to the page. A sticky header needs a ground to cover the rows\n// scrolling under it, and it takes the list's, so a `style` giving the list\n// another background gives its headers the same one.\n\n// A checkbox drawn in a row sits in a slot an icon's size, the lists page's\n// 24dp, rather than in the 40dp state layer Checkbox draws it in.\nconst BOX_SLOT = 24\n\n// The ring the loading row draws, a row's icon across.\nconst LOADING_DIAMETER = '24px'\n\n// How far past the visible end of the list `onLoadMore` is called, as a\n// share of the list's visible height, as web's `scrollOffset` defaults.\nconst LOAD_OFFSET = 1\n\n// What the loading row reads when the list has no `List.LoadMore`, which\n// leaves it nothing to draw.\nconst IDLE: ListLoadMoreProps = {}\n\nconst styles = StyleSheet.create({\n box: {\n alignItems: 'center',\n height: BOX_SLOT,\n justifyContent: 'center',\n width: BOX_SLOT,\n },\n // What `List.LoadMore` leaves while nothing is loading: the live region,\n // with nothing in it and no height.\n idle: {\n height: 0,\n },\n // The count a search leaves, which a screen reader hears and no one sees:\n // out of the flow, and a point across, as web's visually hidden status is.\n status: {\n height: 1,\n overflow: 'hidden',\n pointerEvents: 'none',\n position: 'absolute',\n width: 1,\n },\n})\n\nconst stylesOf = themedStyles(({ colors, sizing, spacing }: ResolvedTheme) =>\n StyleSheet.create({\n // The 8dp above the first row and below the last, as web's container\n // draws them.\n content: {\n paddingVertical: spacing.sm,\n },\n empty: {\n color: colors.onSurfaceVariant,\n },\n // The lists page's subhead: title small in on surface variant, at the\n // row's inline padding so it lines up with the headlines under it, with\n // more room above than below so it reads as belonging to what follows.\n header: {\n color: colors.onSurfaceVariant,\n paddingBottom: spacing.xxs,\n paddingHorizontal: spacing.lg,\n paddingTop: spacing.lg,\n },\n // The checkbox beside whatever the row's leading slot was given, a\n // row's own gap apart.\n lead: {\n alignItems: 'center',\n flexDirection: 'row',\n gap: spacing.lg,\n },\n list: {\n backgroundColor: colors.surface,\n },\n // A row's height for the ring, so the list does not jump when the next\n // items land.\n loading: {\n alignItems: 'center',\n justifyContent: 'center',\n minHeight: sizing.rowSm,\n },\n // Never seen, but in a pair that reads, for a checker that looks.\n status: {\n color: colors.onSurface,\n },\n }),\n)\n\n/** One cell of the `FlatList`: a section's header, or a row. */\ntype ListEntry = {\n readonly kind: 'header' | 'item'\n readonly node: Node<unknown>\n}\n\ntype ListLoadMoreProps = {\n /**\n * Draws the ring in a row of its own while more items are being fetched.\n * @default false\n */\n readonly isLoading?: boolean\n /**\n * What a screen reader calls the ring, and hears as it appears. Left out,\n * it is the word for it in the `I18nProvider`'s language, or the device's\n * outside one, \"Loading more\" in English.\n */\n readonly label?: string\n /**\n * Called when the end of the list comes within `scrollOffset` of its\n * visible end, while nothing is loading. Called once for each length the\n * list reaches, so a load that adds nothing does not start another.\n */\n readonly onLoadMore?: () => void\n /**\n * How far past the visible end of the list the next items are asked for,\n * as a share of the list's visible height.\n * @default 1\n */\n readonly scrollOffset?: number\n readonly style?: StyleProp<ViewStyle>\n readonly testID?: string\n}\n\ntype ListProps<T extends object = object> = Omit<\n ScrollViewProps,\n 'children' | 'role' | 'stickyHeaderIndices' | 'style'\n> & {\n /**\n * The rows, each a `List.Item`, `List.Section` or `List.LoadMore`. With\n * `items`, a function from an item to its part, called for each item in\n * turn.\n */\n readonly children?: ((item: T) => ReactElement) | ReactNode\n /** The keys selected at first, when the list keeps its own selection. */\n readonly defaultSelectedKeys?: 'all' | Iterable<Key>\n /** The keys of the rows drawn disabled, which take no presses. */\n readonly disabledKeys?: Iterable<Key>\n /**\n * Keeps the last selected row selected, so a press on it changes nothing.\n * @default false\n */\n readonly disallowEmptySelection?: boolean\n /** The entries `children` draws a part for, when it is a function. */\n readonly items?: Iterable<T>\n /**\n * Called with a row's key when a press runs its action. A row's own\n * `onAction` takes its place for that row.\n */\n readonly onAction?: (key: Key) => void\n /** Called with the selected keys whenever a press changes them. */\n readonly onSelectionChange?: (keys: Selection) => void\n readonly ref?: Ref<FlatList>\n /**\n * What the list shows when it has no rows and nothing is loading. Left\n * out, it is a muted row saying \"No results\" in the `I18nProvider`'s\n * language, or the device's outside one, so the list keeps a row's height.\n */\n readonly renderEmptyState?: () => ReactNode\n /**\n * The selected keys, for a call site holding the selection itself with\n * `onSelectionChange`.\n */\n readonly selectedKeys?: 'all' | Iterable<Key>\n /**\n * Whether rows can be selected: one at a time, several, or none. A list\n * that selects draws a checkbox on every row.\n * @default 'none'\n */\n readonly selectionMode?: SelectionMode\n /**\n * What selecting a row is called, for a screen reader: the accessibility\n * action each selectable row offers, which is what its checkbox does. The\n * row's own text is what names the row. Left out, it is the word for it in\n * the `I18nProvider`'s language, or the device's outside one, \"Select\" in\n * English.\n */\n readonly selectLabel?: string\n readonly style?: StyleProp<ViewStyle>\n}\n\n// `Row` rather than `Item`, though the part is `List.Item`, for the reason\n// web gives: `ListItemProps` is the standalone ListItem's, and both are\n// exported from the package.\ntype ListRowProps = Omit<\n PressableProps,\n 'children' | 'disabled' | 'id' | 'role' | 'style'\n> & {\n /** The row's headline, the one thing it is mostly about. */\n readonly children?: ReactNode\n /** The key the row is selected and reported by. Give one to every row. */\n readonly id?: Key\n /**\n * Draws the row disabled, and takes no presses on it, as a key in the\n * list's `disabledKeys` does.\n * @default false\n */\n readonly isDisabled?: boolean\n /** Content before the headline: an avatar, an icon. */\n readonly leading?: ReactNode\n /**\n * Called when a press runs the row's action, in place of the list's\n * `onAction` for this row.\n */\n readonly onAction?: () => void\n /**\n * A line above the headline, in label small and the muted role. Given\n * beside `supporting`, it makes the row the three-line item.\n */\n readonly overline?: ReactNode\n readonly ref?: Ref<HostInstance>\n readonly style?: StyleProp<ViewStyle>\n /** A second line under the headline, in body medium and the muted role. */\n readonly supporting?: ReactNode\n /**\n * The row's text, read off `children` when they are a plain string, so a\n * row whose headline is an element passes it.\n */\n readonly textValue?: string\n /** Content after the headline, such as an amount or a control. */\n readonly trailing?: ReactNode\n}\n\ntype ListSectionProps = {\n /** The rows in the section. */\n readonly children?: ReactNode\n /**\n * The section's heading, which stays at the top of the list while the\n * section's rows scroll under it. A section without one is its rows alone.\n */\n readonly header?: ReactNode\n readonly id?: Key\n}\n\n// What the cells of the `FlatList` read from the list they are drawn in.\ntype ListValue = {\n /** The ground a sticky header covers the rows under it with. */\n readonly ground: ColorValue\n /** The `List.LoadMore` the list ends in, if it has one. */\n readonly loadMore: ListLoadMoreProps | undefined\n readonly onAction: ((key: Key) => void) | undefined\n readonly renderEmptyState: () => ReactNode\n readonly selectLabel: string\n readonly state: ListState<unknown>\n}\n\nconst ListContext = createContext<ListValue | null>(null)\n\n/**\n * A list of rows, one or more of which can be selected. Selection is React\n * Stately's, as web's is React Aria's: set `selectionMode` to `single` or\n * `multiple`, and pass `selectedKeys` with `onSelectionChange` to control\n * it or `defaultSelectedKeys` to let it keep its own. A list whose rows do\n * something takes `onAction`, or an `onAction` on each row.\n *\n * ```tsx\n * <List aria-label=\"Label\" selectionMode=\"multiple\">\n * <List.Item id=\"first\" supporting=\"Supporting line\">First item</List.Item>\n * </List>\n * ```\n *\n * ListItem is the row on its own; this is the collection that draws the\n * same row and adds selection, sections and a row that loads more. Composed\n * from parts, `List.Item`, `List.Section` and `List.LoadMore`, which the\n * list draws from their props, so none of them renders anything on its\n * own. Name the list with `aria-label`. It scrolls by itself, so it wants a\n * height to fill: a short list on a page that scrolls takes\n * `scrollEnabled={false}` and is laid out at its full length. `style` and\n * `ref` land on the `FlatList`.\n *\n * Inside an `Autocomplete`, the list shows the rows the search keeps and\n * says how many there are to a screen reader, and a tap on a row reaches it\n * while the keyboard is up.\n */\nfunction List<T extends object = object>({\n children,\n contentContainerStyle,\n defaultSelectedKeys,\n disabledKeys,\n disallowEmptySelection,\n items,\n keyboardShouldPersistTaps,\n onAction,\n onSelectionChange,\n ref,\n renderEmptyState = emptyState,\n selectedKeys,\n selectionMode = 'none',\n selectLabel,\n style,\n ...props\n}: ListProps<T>) {\n const theme = useTheme()\n const own = stylesOf(theme)\n const autocomplete = use(AutocompleteContext)\n const matches = autocomplete?.matches\n const filter = useMemo(\n () => (matches === undefined ? undefined : filterOf<T>(matches)),\n [matches],\n )\n const state = useListState<T>({\n // Each part builds its own entry in the collection; see the parts'\n // `getCollectionNode`. The collection skips what is not an element, as a\n // ReactNode may be, and asks any element for its entry.\n // oxlint-disable-next-line typescript/no-unsafe-type-assertion -- see above\n children: children as StatelyListProps<T>['children'],\n defaultSelectedKeys,\n disabledKeys,\n disallowEmptySelection,\n filter,\n items,\n onSelectionChange,\n selectedKeys,\n selectionMode,\n })\n const { entries, loader, rows, sticky } = useMemo(\n () => entriesOf(state),\n [state],\n )\n const listStyle = composeStyles<ViewStyle>(own.list, style)\n // oxlint-disable-next-line typescript/no-unsafe-assignment -- a node carries the props its part was written with, which React Stately types as `any`\n const loadMore: ListLoadMoreProps | undefined = loader?.props\n const isLoading = loadMore?.isLoading ?? false\n const messages = useMessages()\n // The list's own ground unless `style` gives it another.\n const ground =\n StyleSheet.flatten(style)?.backgroundColor ?? theme.colors.surface\n const value = useMemo<ListValue>(\n () => ({\n ground,\n loadMore,\n onAction,\n renderEmptyState,\n selectLabel: selectLabel ?? messages.select,\n state,\n }),\n [\n ground,\n loadMore,\n messages,\n onAction,\n renderEmptyState,\n selectLabel,\n state,\n ],\n )\n\n return (\n <ListContext value={value}>\n <FlatList\n {...props}\n contentContainerStyle={composeStyles<ViewStyle>(\n own.content,\n contentContainerStyle,\n )}\n data={entries}\n keyboardShouldPersistTaps={\n keyboardShouldPersistTaps ??\n (autocomplete === null ? undefined : 'handled')\n }\n keyExtractor={keyOf}\n ListEmptyComponent={isLoading ? undefined : EmptyState}\n ListFooterComponent={loadMore === undefined ? undefined : LoaderRow}\n onEndReached={loadMore === undefined ? undefined : loadMoreOf(loadMore)}\n onEndReachedThreshold={loadMore?.scrollOffset ?? LOAD_OFFSET}\n ref={ref}\n renderItem={renderEntry}\n stickyHeaderIndices={sticky}\n style={listStyle}\n />\n {autocomplete === null ? null : <ResultsStatus count={rows} />}\n </ListContext>\n )\n}\n\n/**\n * The row shown while more items are being fetched. `onLoadMore` is called\n * as the reader nears the end of the list, and the ring is drawn only while\n * `isLoading`, in a live region, so a screen reader hears it arrive. It\n * goes last, after the rows it loads more of.\n */\nfunction ListLoadMore(_props: ListLoadMoreProps): null {\n return null\n}\n\nListLoadMore.getCollectionNode = function* getCollectionNode(\n props: ListLoadMoreProps,\n) {\n yield { hasChildNodes: false, props, rendered: null, type: 'loader' }\n}\n\n/**\n * One row. Its slots are ListItem's: `leading`, the headline as children,\n * `overline` above it, `supporting` under it, and `trailing`. Give every\n * row an `id`, which is the key selection is reported by. A list that\n * selects draws a checkbox before whatever `leading` holds.\n *\n * The list draws it from its entry in the collection, so it renders nothing\n * on its own. `style`, `ref` and `testID` land on the row.\n */\nfunction ListRow(_props: ListRowProps): null {\n return null\n}\n\n// The entry the collection holds for a row, as React Stately's own `Item`\n// gives one: keyed by the row's `id`, and carrying the props it is drawn\n// from.\nListRow.getCollectionNode = function* getCollectionNode(props: ListRowProps) {\n yield {\n 'aria-label': props['aria-label'],\n hasChildNodes: false,\n key: props.id,\n props,\n rendered: props.children,\n textValue:\n props.textValue ??\n (typeof props.children === 'string' ? props.children : ''),\n type: 'item',\n }\n}\n\n/**\n * A group of rows under a heading, which stays at the top of the list while\n * the group's rows scroll under it.\n */\nfunction ListSection(_props: ListSectionProps): null {\n return null\n}\n\nListSection.getCollectionNode = function* getCollectionNode(\n props: ListSectionProps,\n) {\n const children: ReactNode[] = []\n\n // Walked as React Stately's own Section walks them, which leaves each\n // child its own key rather than the one `Children.toArray` gives it.\n Children.forEach(props.children, (child) => {\n if (child !== null && child !== undefined && child !== false) {\n children.push(child)\n }\n })\n\n yield {\n *childNodes() {\n for (const element of children) {\n yield { element }\n }\n },\n hasChildNodes: true,\n key: props.id,\n props,\n rendered: props.header,\n type: 'section',\n }\n}\n\n/**\n * The muted row a list shows when nothing is in it: a row's box and\n * headline in on surface variant, with no press of its own.\n */\nfunction EmptyRow() {\n const theme = useTheme()\n const own = stylesOf(theme)\n const headline = useTypeRole('bodyLarge')\n const messages = useMessages()\n\n return (\n <View style={rowStyleOf(theme, {})}>\n <NativeText style={composeStyles<TextStyle>(headline, own.empty)}>\n {messages.noResults}\n </NativeText>\n </View>\n )\n}\n\n// What the list shows when nothing is in it.\nfunction emptyState() {\n return <EmptyRow />\n}\n\n// The list's empty state, as the component `ListEmptyComponent` takes.\nfunction EmptyState() {\n return <>{useList().renderEmptyState()}</>\n}\n\n/**\n * The cells the `FlatList` draws, in order, where the headers among them\n * are, and how many rows there are: the rows outside any section, and each\n * section's header followed by its rows. The row that loads more is drawn\n * after them all.\n */\nfunction entriesOf<T>(state: ListState<T>) {\n const entries: ListEntry[] = []\n const sticky: number[] = []\n let loader: Node<T> | undefined\n let rows = 0\n\n for (const node of state.collection) {\n if (node.type === 'loader') {\n loader = node\n } else if (node.type === 'section') {\n if (hasContent(node.rendered)) {\n sticky.push(entries.length)\n entries.push({ kind: 'header', node })\n }\n const children =\n state.collection.getChildren?.(node.key) ??\n // oxlint-disable-next-line typescript/no-deprecated -- a fallback for a collection without getChildren\n node.childNodes\n for (const row of children) {\n entries.push({ kind: 'item', node: row })\n rows++\n }\n } else {\n entries.push({ kind: 'item', node })\n rows++\n }\n }\n\n return { entries, loader, rows, sticky }\n}\n\n/**\n * What a list inside an Autocomplete builds its collection from: the rows\n * the search keeps, each section with a row left in it, and the row that\n * loads more. Each node is copied rather than handed on, as React Stately's\n * ComboBox copies its own, since a collection numbers the nodes it holds.\n */\nfunction filterOf<T>(matches: AutocompleteValue['matches']) {\n return (nodes: Iterable<Node<T>>) => keptOf(nodes, matches)\n}\n\nfunction keptOf<T>(\n nodes: Iterable<Node<T>>,\n matches: AutocompleteValue['matches'],\n): Node<T>[] {\n const kept: Node<T>[] = []\n\n for (const node of nodes) {\n if (node.type === 'section') {\n // oxlint-disable-next-line typescript/no-deprecated -- a filter is handed the nodes before a collection holds them, so there is none to ask\n const rows = keptOf(node.childNodes, matches)\n\n if (rows.some((row) => row.type === 'item')) {\n // oxlint-disable-next-line typescript/no-deprecated -- the field the collection reads a section's rows from\n kept.push({ ...node, childNodes: rows })\n }\n } else if (node.type !== 'item' || matches(node.textValue, node)) {\n kept.push({ ...node })\n }\n }\n\n return kept\n}\n\n// A cell's key in the `FlatList`: a header's and a row's apart, since a\n// section's header carries the section's key.\nfunction keyOf({ kind, node }: ListEntry) {\n return `${kind}:${String(node.key)}`\n}\n\n/**\n * A row: the state layer, the ripple and the focus ring over the checkbox,\n * the leading slot, the lines and the trailing slot, on primary container\n * while selected. A row with nothing to do on a press, in a list that\n * neither selects nor acts, is a `View` that only presents.\n */\nfunction ListRowNode({ node }: { readonly node: Node<unknown> }) {\n const theme = useTheme()\n const own = stylesOf(theme)\n const list = useList()\n\n // oxlint-disable-next-line typescript/no-unsafe-assignment -- a node carries the props its row was written with, which React Stately types as `any`\n const {\n children,\n id: _id,\n isDisabled: _isDisabled,\n leading,\n onAction,\n onBlur,\n onFocus,\n onHoverIn,\n onHoverOut,\n onLongPress,\n onPress,\n onPressIn,\n onPressOut,\n overline,\n ref,\n style,\n supporting,\n textValue: _textValue,\n trailing,\n ...props\n }: ListRowProps = node.props\n const { selectionManager } = list.state\n const { key } = node\n // The selection manager reads a row's own `isDisabled` off its entry,\n // beside the list's `disabledKeys`, so it answers for both.\n const disabled = selectionManager.isDisabled(key)\n const checks = selectionManager.selectionMode !== 'none'\n const selectable = selectionManager.canSelectItem(key)\n const selected = checks && selectionManager.isSelected(key)\n const listAction = list.onAction\n const action =\n onAction ??\n (listAction === undefined\n ? undefined\n : () => {\n listAction(key)\n })\n // React Aria's rule for a touch press on a row that selects with a\n // checkbox: the action while nothing is selected, the selection after.\n const acts = action !== undefined && (!selectable || selectionManager.isEmpty)\n const select = () => {\n selectionManager.select(key)\n }\n const content = rowContentColor(theme, {\n isDisabled: disabled,\n isSelected: selected,\n })\n const feedback = usePressFeedback({\n color: content,\n disabled,\n onBlur,\n onFocus,\n onHoverIn,\n onHoverOut,\n onPressIn,\n onPressOut,\n })\n\n const lead = checks\n ? withBox(\n <SelectBox\n isDisabled={disabled}\n isSelected={selected}\n onPress={acts && selectable ? select : undefined}\n />,\n leading,\n own.lead,\n )\n : leading\n const lines = (\n <RowContent\n isDisabled={disabled}\n isSelected={selected}\n leading={lead}\n overline={overline}\n supporting={supporting}\n trailing={trailing}\n >\n {children}\n </RowContent>\n )\n const rowStyle = rowStyleOf(theme, {\n isSelected: selected,\n overline,\n supporting,\n })\n\n if (!checks && action === undefined && onPress === undefined) {\n return (\n <View\n aria-disabled={disabled || undefined}\n ref={ref}\n style={composeStyles<ViewStyle>(rowStyle, style)}\n testID={props.testID}\n >\n {lines}\n </View>\n )\n }\n\n return (\n <Pressable\n role=\"button\"\n {...props}\n {...(checks ? toggleState(selected) : undefined)}\n {...(selectable\n ? {\n accessibilityActions: [{ label: list.selectLabel, name: 'select' }],\n onAccessibilityAction: selectionActionOf(select),\n }\n : undefined)}\n {...feedback.handlers}\n disabled={disabled}\n onLongPress={\n action !== undefined && selectable\n ? pressThen(onLongPress, select)\n : onLongPress\n }\n onPress={pressThen(onPress, acts ? action : selectable ? select : noop)}\n ref={ref}\n style={composeStyles<ViewStyle>(\n rowStyle,\n feedback.ring,\n feedback.ring === undefined ? undefined : rowStyles.ring,\n style,\n )}\n >\n {feedback.layer}\n {lines}\n </Pressable>\n )\n}\n\n/**\n * The row `List.LoadMore` draws: a live region, empty while idle and\n * holding the ring while loading. Android and React Native Web say what\n * arrives in it; iOS has no live regions, so the ring's name is said there\n * as it appears.\n */\nfunction LoaderRow() {\n const own = stylesOf(useTheme())\n const { isLoading = false, label, style, testID } = useList().loadMore ?? IDLE\n const messages = useMessages()\n const name = label ?? messages.loadingMore\n\n useLoadingAnnouncement(isLoading, name)\n\n return (\n <View\n aria-live=\"polite\"\n style={composeStyles<ViewStyle>(\n isLoading ? own.loading : styles.idle,\n style,\n )}\n testID={testID}\n >\n {isLoading ? (\n <ProgressIndicator\n aria-label={name}\n diameter={LOADING_DIAMETER}\n isIndeterminate\n variant=\"circular\"\n />\n ) : null}\n </View>\n )\n}\n\n// Asks for more as the reader nears the end, unless a load is under way.\nfunction loadMoreOf({ isLoading = false, onLoadMore }: ListLoadMoreProps) {\n return () => {\n if (!isLoading) {\n onLoadMore?.()\n }\n }\n}\n\nfunction noop() {\n // A press on a row with nothing to do runs the call site's `onPress` alone.\n}\n\n/**\n * The press handler of a row: the call site's own handler, then the row's.\n * Built by a call rather than written inline at the prop, which is what\n * react-perf's no-new-function-as-prop is after.\n */\nfunction pressThen(\n onPress: PressableProps['onPress'],\n then: (() => void) | undefined,\n) {\n return (event: GestureResponderEvent) => {\n onPress?.(event)\n then?.()\n }\n}\n\n// One cell, drawn as the part it came from.\nfunction renderEntry({ item }: ListRenderItemInfo<ListEntry>) {\n return item.kind === 'header' ? (\n <SectionHeader node={item.node} />\n ) : (\n <ListRowNode node={item.node} />\n )\n}\n\n/**\n * How many rows a search leaves, said to a screen reader as it changes and\n * never drawn: in a polite live region on Android and under React Native\n * Web, and through `AccessibilityInfo` on iOS, which has no live regions,\n * so nothing is drawn there at all.\n */\nfunction ResultsStatus({ count }: { readonly count: number }) {\n const own = stylesOf(useTheme())\n const locale = useLocaleOf(undefined)\n const message = resultsFor(count, locale)\n\n useResultsAnnouncement(message)\n\n if (Platform.OS === 'ios') {\n return null\n }\n\n return (\n <View aria-live=\"polite\" style={styles.status}>\n <NativeText style={own.status}>{message}</NativeText>\n </View>\n )\n}\n\n/** A section's heading, on the list's ground so the rows pass under it. */\nfunction SectionHeader({ node }: { readonly node: Node<unknown> }) {\n const own = stylesOf(useTheme())\n const title = useTypeRole('titleSmall')\n const { ground } = useList()\n\n return (\n <View style={composeStyles<ViewStyle>({ backgroundColor: ground })}>\n <NativeText\n role=\"heading\"\n style={composeStyles<TextStyle>(title, own.header)}\n >\n {node.rendered}\n </NativeText>\n </View>\n )\n}\n\n/**\n * The checkbox a selecting row draws, for the eye alone: the row is what a\n * screen reader hears and presses. On a row whose press runs an action, a\n * touch on the box selects instead, through a press of its own the size of\n * a 48dp target, hidden from the reader as the box is.\n */\nfunction SelectBox({\n isDisabled,\n isSelected,\n onPress,\n}: {\n readonly isDisabled: boolean\n readonly isSelected: boolean\n readonly onPress: (() => void) | undefined\n}) {\n const drawn = (\n <CheckboxBox\n isDisabled={isDisabled}\n isSelected={isSelected}\n within={BOX_SLOT}\n />\n )\n\n if (onPress === undefined) {\n return <View style={styles.box}>{drawn}</View>\n }\n\n return (\n <Pressable\n accessible={false}\n aria-hidden\n disabled={isDisabled}\n focusable={false}\n hitSlop={hitSlop(BOX_SLOT, BOX_SLOT)}\n onPress={onPress}\n style={styles.box}\n tabIndex={-1}\n >\n {drawn}\n </Pressable>\n )\n}\n\n// Runs the selection when a screen reader asks for the row's select action.\nfunction selectionActionOf(select: () => void) {\n return (event: AccessibilityActionEvent) => {\n if (event.nativeEvent.actionName === 'select') {\n select()\n }\n }\n}\n\n// The list a cell is drawn in. Every cell is the `FlatList`'s, inside the\n// list's own provider, so there always is one.\nfunction useList(): ListValue {\n const list = use(ListContext)\n\n if (list === null) {\n throw new Error('A List part is drawn by the List it is in.')\n }\n return list\n}\n\n// Says the ring's name on iOS as it appears. A list loading as it mounts\n// says nothing, as a live region does not read what it was mounted holding.\nfunction useLoadingAnnouncement(isLoading: boolean, label: string) {\n const was = useRef(isLoading)\n\n useEffect(() => {\n if (isLoading && !was.current && Platform.OS === 'ios') {\n AccessibilityInfo.announceForAccessibility(label)\n }\n was.current = isLoading\n }, [isLoading, label])\n}\n\n// Says how many rows are left on iOS each time the count changes. The count\n// a list mounts with is not said, as a live region does not read what it was\n// mounted holding.\nfunction useResultsAnnouncement(message: string) {\n const was = useRef(message)\n\n useEffect(() => {\n if (message !== was.current && Platform.OS === 'ios') {\n AccessibilityInfo.announceForAccessibility(message)\n }\n was.current = message\n }, [message])\n}\n\n/**\n * The leading slot of a row that selects: the checkbox, then whatever the\n * row was given, in a row of their own so the two sit side by side.\n */\nfunction withBox(\n box: ReactElement,\n leading: ReactNode,\n style: StyleProp<ViewStyle>,\n): ReactNode {\n return hasContent(leading) ? (\n <View style={style}>\n {box}\n {leading}\n </View>\n ) : (\n box\n )\n}\n\nList.Item = ListRow\nList.LoadMore = ListLoadMore\nList.Section = ListSection\n\nexport { List, ListLoadMore, ListRow, ListSection }\nexport type { ListLoadMoreProps, ListProps, ListRowProps, ListSectionProps }\n"],"mappings":";;;;;;;;;;;;;;;;;;AAsFA,MAAMuD,WAAW;AAGjB,M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