@aramiworks/design-app 1.3.0 → 2.0.0-pr528-20261129140108
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/index.d.mts +243 -387
- package/dist/index.d.ts +243 -387
- package/dist/index.js +1587 -1841
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1552 -1795
- package/dist/index.mjs.map +1 -1
- package/manifest.json +34 -162
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -164,45 +164,6 @@ interface AlertDialogProps {
|
|
|
164
164
|
/** Controlled confirm dialog over a scrim, with cancel and confirm buttons. */
|
|
165
165
|
declare function AlertDialog({ open, title, description, confirmLabel, cancelLabel, destructive, onConfirm, onCancel, testID, confirmLoading, confirmLoadingLabel, error, }: AlertDialogProps): react_jsx_runtime.JSX.Element;
|
|
166
166
|
|
|
167
|
-
/** A quick-pick chip under the field; pressing it replaces the amount with `value`. */
|
|
168
|
-
interface AmountInputPreset {
|
|
169
|
-
/** Text the field takes when pressed, formatted like the app's input. */
|
|
170
|
-
value: string;
|
|
171
|
-
/** Chip label, e.g. "+10" or "50". */
|
|
172
|
-
label: string;
|
|
173
|
-
testID?: string;
|
|
174
|
-
}
|
|
175
|
-
/** Where the unit sits: before the number ("$ 12") or after it ("12 kg"). */
|
|
176
|
-
type AmountInputUnitPosition = "prefix" | "suffix";
|
|
177
|
-
interface AmountInputProps {
|
|
178
|
-
/** The text as typed; parsing and grouping are the app's job. */
|
|
179
|
-
value: string;
|
|
180
|
-
onChangeText: (text: string) => void;
|
|
181
|
-
placeholder: string;
|
|
182
|
-
/** Visible label above the field; also the input's accessible name. */
|
|
183
|
-
label?: string;
|
|
184
|
-
/** Currency or unit shown inside the field, e.g. "$" or "kg". */
|
|
185
|
-
unit?: string;
|
|
186
|
-
/** Defaults to `suffix`. */
|
|
187
|
-
unitPosition?: AmountInputUnitPosition;
|
|
188
|
-
/** Decimal keyboard instead of digits only. */
|
|
189
|
-
allowDecimal?: boolean;
|
|
190
|
-
/** Inline error under the field; also outlines it in destructive. */
|
|
191
|
-
error?: string | null;
|
|
192
|
-
/** False while the form is busy. Defaults to true. */
|
|
193
|
-
editable?: boolean;
|
|
194
|
-
testID?: string;
|
|
195
|
-
/** Muted read-back line under the field, formatted by the app, e.g. the amount in words. */
|
|
196
|
-
hint?: string;
|
|
197
|
-
/** Quick-pick chips under the field; the one whose value equals the field is selected. */
|
|
198
|
-
presets?: AmountInputPreset[];
|
|
199
|
-
}
|
|
200
|
-
/**
|
|
201
|
-
* Numeric amount field with an optional currency or unit before or after the number, an
|
|
202
|
-
* optional read-back hint and quick-pick preset chips.
|
|
203
|
-
*/
|
|
204
|
-
declare function AmountInput({ value, onChangeText, placeholder, label, unit, unitPosition, allowDecimal, error, editable, testID, hint, presets, }: AmountInputProps): react_jsx_runtime.JSX.Element;
|
|
205
|
-
|
|
206
167
|
interface AppBarAction {
|
|
207
168
|
/** Visible text, or the accessibility label when `icon` is set. */
|
|
208
169
|
label: string;
|
|
@@ -244,34 +205,6 @@ interface BannerProps {
|
|
|
244
205
|
/** Full-width notice strip, e.g. an offline notice or a send error above the composer. */
|
|
245
206
|
declare function Banner({ message, tone, icon, testID, }: BannerProps): react_jsx_runtime.JSX.Element;
|
|
246
207
|
|
|
247
|
-
interface BarChartCardBar {
|
|
248
|
-
/** Identifies the bar. */
|
|
249
|
-
key: string;
|
|
250
|
-
/** Short label under the bar, e.g. "Mon". */
|
|
251
|
-
label: string;
|
|
252
|
-
/** Non-negative value; negative values draw as zero. */
|
|
253
|
-
value: number;
|
|
254
|
-
}
|
|
255
|
-
interface BarChartCardProps {
|
|
256
|
-
title: string;
|
|
257
|
-
/** Muted line under the title, e.g. "Last 7 days". */
|
|
258
|
-
caption?: string;
|
|
259
|
-
bars: BarChartCardBar[];
|
|
260
|
-
/** Value of a full-height bar. Defaults to the largest value. */
|
|
261
|
-
max?: number;
|
|
262
|
-
/** Formats each value for the screen reader summary. Defaults to `String`. */
|
|
263
|
-
formatValue?: (value: number) => string;
|
|
264
|
-
/** Shown instead of the bars when `bars` is empty. */
|
|
265
|
-
emptyLabel?: string;
|
|
266
|
-
testID?: string;
|
|
267
|
-
}
|
|
268
|
-
/**
|
|
269
|
-
* Small bar chart card: a title, an optional caption and one bar per item with a label
|
|
270
|
-
* below. Bar heights are relative to `max`. The chart is announced as one image whose
|
|
271
|
-
* label lists every bar.
|
|
272
|
-
*/
|
|
273
|
-
declare function BarChartCard({ title, caption, bars, max, formatValue, emptyLabel, testID, }: BarChartCardProps): react_jsx_runtime.JSX.Element;
|
|
274
|
-
|
|
275
208
|
/** A text button at the end of the sheet's title row, such as Reset or Done. */
|
|
276
209
|
interface BottomSheetAction {
|
|
277
210
|
label: string;
|
|
@@ -489,20 +422,23 @@ interface EmptyStateAction {
|
|
|
489
422
|
/**
|
|
490
423
|
* `screen`: centered, large icon, fills an empty screen; `inline`: compact dashed card
|
|
491
424
|
* inside a section, text only; `card`: a tinted card with an icon tile and small actions,
|
|
492
|
-
* e.g. a first-run welcome inside a dashboard
|
|
425
|
+
* e.g. a first-run welcome inside a dashboard; `error`: compact, centered and announced as
|
|
426
|
+
* an alert, with a destructive title, an optional code line and outlined pill actions.
|
|
493
427
|
*/
|
|
494
|
-
type EmptyStateVariant = "screen" | "inline" | "card";
|
|
428
|
+
type EmptyStateVariant = "screen" | "inline" | "card" | "error";
|
|
495
429
|
interface EmptyStateProps {
|
|
496
430
|
/** Ionicons name: large and muted above the title (`screen`), or in the icon tile (`card`). */
|
|
497
431
|
icon?: IconName;
|
|
498
432
|
title: string;
|
|
499
433
|
/** Muted line under the title. */
|
|
500
434
|
description?: string;
|
|
435
|
+
/** Small muted technical line under the description (`error` only), formatted by the app, e.g. "Code: not-allowed". */
|
|
436
|
+
code?: string;
|
|
501
437
|
/** Tappable starter prompts shown as SuggestionChips (`screen` only). */
|
|
502
438
|
suggestions?: SuggestionChipsItem[];
|
|
503
|
-
/** Filled button under the text (`screen` and `card`). */
|
|
439
|
+
/** Filled button under the text (`screen` and `card`); an outlined pill (`error`). */
|
|
504
440
|
primaryAction?: EmptyStateAction;
|
|
505
|
-
/** Text button after the primary action (`screen` and `
|
|
441
|
+
/** Text button after the primary action (`screen`, `card` and `error`). */
|
|
506
442
|
secondaryAction?: EmptyStateAction;
|
|
507
443
|
/** Defaults to `screen`. */
|
|
508
444
|
variant?: EmptyStateVariant;
|
|
@@ -517,7 +453,7 @@ interface EmptyStateProps {
|
|
|
517
453
|
* optional description, suggestion chips and calls to action; a compact dashed card inside
|
|
518
454
|
* a section; or a tinted card with an icon tile and small actions.
|
|
519
455
|
*/
|
|
520
|
-
declare function EmptyState({ icon, title, description, suggestions, primaryAction, secondaryAction, variant, testID, loading, loadingLabel, }: EmptyStateProps): react_jsx_runtime.JSX.Element;
|
|
456
|
+
declare function EmptyState({ icon, title, description, code, suggestions, primaryAction, secondaryAction, variant, testID, loading, loadingLabel, }: EmptyStateProps): react_jsx_runtime.JSX.Element;
|
|
521
457
|
|
|
522
458
|
/** Small read-only star rating at the end of the title line. */
|
|
523
459
|
interface EntryCardRating {
|
|
@@ -565,29 +501,6 @@ interface EntryCardProps {
|
|
|
565
501
|
*/
|
|
566
502
|
declare function EntryCard({ title, rating, body, images, onImagePress, imageLabel, onPress, pressLabel, actions, testID, subtitle, }: EntryCardProps): react_jsx_runtime.JSX.Element;
|
|
567
503
|
|
|
568
|
-
interface ErrorStateAction {
|
|
569
|
-
/** Button text, also its accessible name, e.g. "Try again". */
|
|
570
|
-
label: string;
|
|
571
|
-
onPress: () => void;
|
|
572
|
-
/** testID of the button; defaults to "<testID>-action" or "<testID>-secondary-action". */
|
|
573
|
-
testID?: string;
|
|
574
|
-
}
|
|
575
|
-
interface ErrorStateProps {
|
|
576
|
-
/** Short headline, e.g. "Microphone unavailable". */
|
|
577
|
-
title: string;
|
|
578
|
-
/** Optional explanation under the title. */
|
|
579
|
-
message?: string;
|
|
580
|
-
/** Optional technical code, shown small; the app formats it (e.g. "Code: not-allowed"). */
|
|
581
|
-
code?: string;
|
|
582
|
-
/** Optional outlined button, such as retry. */
|
|
583
|
-
action?: ErrorStateAction;
|
|
584
|
-
testID?: string;
|
|
585
|
-
/** Optional text button beside the action, such as going back. */
|
|
586
|
-
secondaryAction?: ErrorStateAction;
|
|
587
|
-
}
|
|
588
|
-
/** Compact, centered error announced as an alert: title, optional message, code and up to two actions. */
|
|
589
|
-
declare function ErrorState({ title, message, code, action, testID, secondaryAction, }: ErrorStateProps): react_jsx_runtime.JSX.Element;
|
|
590
|
-
|
|
591
504
|
interface FilterChipGroupOption<T extends string = string> {
|
|
592
505
|
value: T;
|
|
593
506
|
label: string;
|
|
@@ -711,22 +624,42 @@ declare function FloatingCard({ title, subtitle, meta, thumbnailUri, onPress, ac
|
|
|
711
624
|
|
|
712
625
|
/** `background`: the screen color, 44px, for a canvas; `card`: the card color, 40px, over images. */
|
|
713
626
|
type FloatingIconButtonTone = "background" | "card";
|
|
627
|
+
/**
|
|
628
|
+
* `md`: the floating look, sized by `tone`, with a shadow, dimming while pressed. `sm`: a
|
|
629
|
+
* 36px button on the screen color with a border, no shadow and a muted 18px glyph, for
|
|
630
|
+
* sitting over a list.
|
|
631
|
+
*/
|
|
632
|
+
type FloatingIconButtonSize = "md" | "sm";
|
|
633
|
+
/** `none`: the parent positions it. `bottom-center`: absolute, 12px above its parent's bottom edge, centered. */
|
|
634
|
+
type FloatingIconButtonPlacement = "none" | "bottom-center";
|
|
714
635
|
interface FloatingIconButtonProps {
|
|
715
636
|
/** Ionicons name, e.g. "locate-outline" or "arrow-back". */
|
|
716
637
|
icon: IconName;
|
|
717
|
-
/** Accessible name of the button. */
|
|
638
|
+
/** Accessible name of the button; a badge count is appended, e.g. "Scroll to latest (3)". */
|
|
718
639
|
label: string;
|
|
719
640
|
onPress: () => void;
|
|
720
|
-
/** Defaults to `background`. */
|
|
641
|
+
/** `md` only. Defaults to `background`. */
|
|
721
642
|
tone?: FloatingIconButtonTone;
|
|
643
|
+
/** Defaults to `md`. */
|
|
644
|
+
size?: FloatingIconButtonSize;
|
|
645
|
+
/** Count shown as a primary badge on the top right when above 0; capped at "99+". */
|
|
646
|
+
count?: number;
|
|
647
|
+
/**
|
|
648
|
+
* When set, the button fades in over 200ms as it turns true and renders nothing while
|
|
649
|
+
* false, e.g. a jump-to-latest button that shows once a list scrolls away. Unset: always shown.
|
|
650
|
+
*/
|
|
651
|
+
visible?: boolean;
|
|
652
|
+
/** Defaults to `none`. */
|
|
653
|
+
placement?: FloatingIconButtonPlacement;
|
|
722
654
|
testID?: string;
|
|
723
655
|
}
|
|
724
656
|
/**
|
|
725
|
-
* Round, bordered icon button
|
|
726
|
-
* "Recenter" on a map
|
|
727
|
-
*
|
|
657
|
+
* Round, bordered icon button that floats over a canvas, an image or a list, such as
|
|
658
|
+
* "Recenter" on a map, a back button over a photo or a jump-to-latest button in a chat.
|
|
659
|
+
* Optional count badge, fade-in on `visible` and bottom-center placement; otherwise the
|
|
660
|
+
* parent positions it.
|
|
728
661
|
*/
|
|
729
|
-
declare function FloatingIconButton({ icon, label, onPress, tone, testID, }: FloatingIconButtonProps): react_jsx_runtime.JSX.Element;
|
|
662
|
+
declare function FloatingIconButton({ icon, label, onPress, tone, size, count, visible, placement, testID, }: FloatingIconButtonProps): react_jsx_runtime.JSX.Element | null;
|
|
730
663
|
|
|
731
664
|
/**
|
|
732
665
|
* `panel`: a floating card up to 400px wide that scrolls its content with 16px padding and
|
|
@@ -746,12 +679,36 @@ interface FloatingPanelProps {
|
|
|
746
679
|
*/
|
|
747
680
|
declare function FloatingPanel({ children, variant, testID, }: FloatingPanelProps): react_jsx_runtime.JSX.Element;
|
|
748
681
|
|
|
682
|
+
/** The bar's full-width primary button, e.g. a form's save. */
|
|
683
|
+
interface FooterBarSubmit {
|
|
684
|
+
label: string;
|
|
685
|
+
onPress: () => void;
|
|
686
|
+
/** Shows a spinner and blocks presses, e.g. while saving. */
|
|
687
|
+
loading?: boolean;
|
|
688
|
+
disabled?: boolean;
|
|
689
|
+
testID?: string;
|
|
690
|
+
}
|
|
691
|
+
/**
|
|
692
|
+
* Width of the bar's content column: `page` (720px, 16px side padding) or `form` (640px,
|
|
693
|
+
* 20px side padding, the same column as a FormTemplate's fields).
|
|
694
|
+
*/
|
|
695
|
+
type FooterBarColumn = "page" | "form";
|
|
749
696
|
interface FooterBarProps {
|
|
750
697
|
/** The bar's content, e.g. an embedded ActionBar or a short note and a button. */
|
|
751
|
-
children
|
|
698
|
+
children?: ReactNode;
|
|
699
|
+
/** A full-width primary button after the content. */
|
|
700
|
+
submit?: FooterBarSubmit;
|
|
701
|
+
/**
|
|
702
|
+
* Form-level error above the submit button, announced as an alert, e.g. "Could not save."
|
|
703
|
+
* Field errors belong on the fields.
|
|
704
|
+
*/
|
|
705
|
+
error?: string | null;
|
|
706
|
+
errorTestID?: string;
|
|
707
|
+
/** Defaults to `page`. */
|
|
708
|
+
column?: FooterBarColumn;
|
|
752
709
|
/**
|
|
753
710
|
* Pads the bottom safe-area inset under the content. Set false inside tabs, where the
|
|
754
|
-
* TabBar pads it. Defaults to true.
|
|
711
|
+
* TabBar pads it, or when the screen pads it. Defaults to true.
|
|
755
712
|
*/
|
|
756
713
|
safeAreaBottom?: boolean;
|
|
757
714
|
/**
|
|
@@ -762,11 +719,12 @@ interface FooterBarProps {
|
|
|
762
719
|
testID?: string;
|
|
763
720
|
}
|
|
764
721
|
/**
|
|
765
|
-
* Sticky bottom bar with a top hairline, holding any content
|
|
766
|
-
* and
|
|
767
|
-
*
|
|
722
|
+
* Sticky bottom bar with a top hairline, holding any content and an optional form-level
|
|
723
|
+
* error and full-width submit button, in a centered column capped at 720px (or 640px for a
|
|
724
|
+
* form). Pads the bottom safe-area inset, so a bar inside it does not again, or renders as a
|
|
725
|
+
* compact pinned row.
|
|
768
726
|
*/
|
|
769
|
-
declare function FooterBar({ children, safeAreaBottom, compact, testID, }: FooterBarProps): react_jsx_runtime.JSX.Element;
|
|
727
|
+
declare function FooterBar({ children, submit, error, errorTestID, column, safeAreaBottom, compact, testID, }: FooterBarProps): react_jsx_runtime.JSX.Element;
|
|
770
728
|
|
|
771
729
|
/** One line: a link with an optional muted prompt before it. */
|
|
772
730
|
interface FooterLinksItem {
|
|
@@ -1096,8 +1054,14 @@ interface ListSectionAction {
|
|
|
1096
1054
|
onPress: () => void;
|
|
1097
1055
|
testID?: string;
|
|
1098
1056
|
}
|
|
1099
|
-
/**
|
|
1100
|
-
|
|
1057
|
+
/**
|
|
1058
|
+
* `plain`: rows sit on the background; `card`: rows sit in a bordered card, divided by
|
|
1059
|
+
* hairlines; `panel`: an 18px heading and the rows sit together in one bordered card, e.g. a
|
|
1060
|
+
* group of settings.
|
|
1061
|
+
*/
|
|
1062
|
+
type ListSectionVariant = "plain" | "card" | "panel";
|
|
1063
|
+
/** `destructive` draws the panel border, icon and heading in the destructive color, e.g. a danger zone (`panel` only). */
|
|
1064
|
+
type ListSectionTone = "default" | "destructive";
|
|
1101
1065
|
interface ListSectionProps {
|
|
1102
1066
|
/** Section heading, e.g. a month or a category. Without it (and without `icon` and `action`) no heading row is drawn. */
|
|
1103
1067
|
title?: string;
|
|
@@ -1119,13 +1083,16 @@ interface ListSectionProps {
|
|
|
1119
1083
|
moreAction?: ListSectionAction;
|
|
1120
1084
|
/** Defaults to `plain`. */
|
|
1121
1085
|
variant?: ListSectionVariant;
|
|
1086
|
+
/** Defaults to `default`. Only the `panel` variant draws it. */
|
|
1087
|
+
tone?: ListSectionTone;
|
|
1122
1088
|
}
|
|
1123
1089
|
/**
|
|
1124
1090
|
* Titled group in a list: a muted heading (optionally with an icon and a count) with an
|
|
1125
1091
|
* optional text action, its rows (plain or in a divided card), an optional show-more button
|
|
1126
|
-
* and an optional footnote.
|
|
1092
|
+
* and an optional footnote. `panel` puts an 18px heading and the rows in one bordered card
|
|
1093
|
+
* (a settings group), and `tone` destructive turns it into a danger zone.
|
|
1127
1094
|
*/
|
|
1128
|
-
declare function ListSection({ title, count, description, action, children, footer, footerTestID, testID, icon, moreAction, variant, }: ListSectionProps): react_jsx_runtime.JSX.Element;
|
|
1095
|
+
declare function ListSection({ title, count, description, action, children, footer, footerTestID, testID, icon, moreAction, variant, tone, }: ListSectionProps): react_jsx_runtime.JSX.Element;
|
|
1129
1096
|
|
|
1130
1097
|
interface LiveCaptionProps {
|
|
1131
1098
|
/** What the user is saying, updated live; small muted text, up to 3 lines. */
|
|
@@ -1192,36 +1159,6 @@ interface MessageListProps<T> {
|
|
|
1192
1159
|
/** Inverted message stream: newest row at the bottom, app-rendered rows, a loading-more spinner on top. */
|
|
1193
1160
|
declare function MessageList<T>({ data, keyExtractor, renderItem, onEndReached, loadingMore, loadingMoreLabel, onScroll, listRef, empty, testID, }: MessageListProps<T>): react_jsx_runtime.JSX.Element;
|
|
1194
1161
|
|
|
1195
|
-
interface MeterCardMeter {
|
|
1196
|
-
/** Identifies the meter in the list. */
|
|
1197
|
-
key: string;
|
|
1198
|
-
/** What is measured, e.g. "Weekly limit". */
|
|
1199
|
-
label: string;
|
|
1200
|
-
/** Share used, from 0 to 1. Values outside the range are clamped. */
|
|
1201
|
-
value: number;
|
|
1202
|
-
/** Muted line under the bar, e.g. "Resets in 2h". */
|
|
1203
|
-
caption?: string;
|
|
1204
|
-
testID?: string;
|
|
1205
|
-
}
|
|
1206
|
-
interface MeterCardProps {
|
|
1207
|
-
title: string;
|
|
1208
|
-
/** Muted text on the right of the title, e.g. a plan name or "Updated 3 min ago". */
|
|
1209
|
-
caption?: string;
|
|
1210
|
-
/** Ionicons name shown before the title. */
|
|
1211
|
-
icon?: IconName;
|
|
1212
|
-
/** Notice under the title row, e.g. why the numbers may be out of date. */
|
|
1213
|
-
message?: string;
|
|
1214
|
-
messageTestID?: string;
|
|
1215
|
-
/** May be empty when `message` explains why there is nothing to show. */
|
|
1216
|
-
meters: MeterCardMeter[];
|
|
1217
|
-
testID?: string;
|
|
1218
|
-
}
|
|
1219
|
-
/**
|
|
1220
|
-
* Card of quota or limit meters: a title row, then one labeled bar per meter with its
|
|
1221
|
-
* percentage and an optional caption. A meter at 90% or more turns destructive.
|
|
1222
|
-
*/
|
|
1223
|
-
declare function MeterCard({ title, caption, icon, message, messageTestID, meters, testID, }: MeterCardProps): react_jsx_runtime.JSX.Element;
|
|
1224
|
-
|
|
1225
1162
|
/** Dot colors under a date: filled primary, hollow primary, muted or destructive. */
|
|
1226
1163
|
type MonthCalendarDotTone = "primary" | "outline" | "muted" | "destructive";
|
|
1227
1164
|
interface MonthCalendarProps {
|
|
@@ -1420,28 +1357,6 @@ interface ProgressBarProps {
|
|
|
1420
1357
|
*/
|
|
1421
1358
|
declare function ProgressBar({ value, label, valueLabel, caption, tone, testID, rating, }: ProgressBarProps): react_jsx_runtime.JSX.Element;
|
|
1422
1359
|
|
|
1423
|
-
/** Arc color: `default` is primary, `destructive` flags a value near a limit. */
|
|
1424
|
-
type ProgressRingTone = "default" | "destructive";
|
|
1425
|
-
/** `sm`: 56px ring; `md`: 88px ring. */
|
|
1426
|
-
type ProgressRingSize = "sm" | "md";
|
|
1427
|
-
interface ProgressRingProps {
|
|
1428
|
-
/** Share done, from 0 to 1. Values outside the range are clamped. */
|
|
1429
|
-
value: number;
|
|
1430
|
-
/** Muted text under the ring; also the progress bar's accessible name. */
|
|
1431
|
-
label: string;
|
|
1432
|
-
/** Text in the middle instead of the percentage, e.g. "3/10". */
|
|
1433
|
-
valueLabel?: string;
|
|
1434
|
-
tone?: ProgressRingTone;
|
|
1435
|
-
size?: ProgressRingSize;
|
|
1436
|
-
testID?: string;
|
|
1437
|
-
}
|
|
1438
|
-
/**
|
|
1439
|
-
* Circular progress: a track with an arc from 12 o'clock, the percentage (or a value
|
|
1440
|
-
* label) in the middle and a muted label under it. Drawn with Views, no SVG dependency.
|
|
1441
|
-
* Announced as a progress bar named by the label.
|
|
1442
|
-
*/
|
|
1443
|
-
declare function ProgressRing({ value, label, valueLabel, tone, size, testID, }: ProgressRingProps): react_jsx_runtime.JSX.Element;
|
|
1444
|
-
|
|
1445
1360
|
/** One tier count under the name: `stars` gold stars and how many items reached that tier. */
|
|
1446
1361
|
interface RankedRowTier {
|
|
1447
1362
|
/** Number of gold stars drawn, e.g. 3. */
|
|
@@ -1504,19 +1419,6 @@ interface RatingStarsProps {
|
|
|
1504
1419
|
*/
|
|
1505
1420
|
declare function RatingStars({ value, max, onChange, label, size, testID, }: RatingStarsProps): react_jsx_runtime.JSX.Element;
|
|
1506
1421
|
|
|
1507
|
-
interface ScrollToBottomFabProps {
|
|
1508
|
-
/** Shows the button; it renders nothing while false. */
|
|
1509
|
-
visible: boolean;
|
|
1510
|
-
/** Unread count shown as a badge when above 0; capped at "99+". */
|
|
1511
|
-
count?: number;
|
|
1512
|
-
onPress: () => void;
|
|
1513
|
-
/** Accessible name of the button; the badge count is appended, e.g. "Scroll to latest (3)". Defaults to "Scroll to latest". */
|
|
1514
|
-
accessibilityLabel?: string;
|
|
1515
|
-
testID?: string;
|
|
1516
|
-
}
|
|
1517
|
-
/** Round button, absolute at the bottom center of its parent, that jumps a list to the newest item. */
|
|
1518
|
-
declare function ScrollToBottomFab({ visible, count, onPress, accessibilityLabel, testID, }: ScrollToBottomFabProps): react_jsx_runtime.JSX.Element | null;
|
|
1519
|
-
|
|
1520
1422
|
/** An icon button right of the input, such as a filter toggle. */
|
|
1521
1423
|
interface SearchBarFilterAction {
|
|
1522
1424
|
/** Ionicons name, e.g. "options-outline". */
|
|
@@ -1569,106 +1471,6 @@ interface SearchBarProps {
|
|
|
1569
1471
|
*/
|
|
1570
1472
|
declare function SearchBar({ value, onChangeText, placeholder, onSubmit, clearLabel, filterAction, maxLength, autoFocus, inputTestID, testID, suggestions, suggestionsLabel, }: SearchBarProps): react_jsx_runtime.JSX.Element;
|
|
1571
1473
|
|
|
1572
|
-
interface SelectOption<T extends string = string> {
|
|
1573
|
-
value: T;
|
|
1574
|
-
label: string;
|
|
1575
|
-
/** Muted second line under the label. */
|
|
1576
|
-
description?: string;
|
|
1577
|
-
/** Ionicons name shown before the label. */
|
|
1578
|
-
icon?: IconName;
|
|
1579
|
-
/**
|
|
1580
|
-
* The unfiltered choice, e.g. "All". It is checked in the sheet while chosen, but the
|
|
1581
|
-
* trigger keeps showing the placeholder (e.g. "Category") and a chip stays unfilled.
|
|
1582
|
-
*/
|
|
1583
|
-
all?: boolean;
|
|
1584
|
-
}
|
|
1585
|
-
interface SelectProps<T extends string = string> {
|
|
1586
|
-
options: SelectOption<T>[];
|
|
1587
|
-
/** Value of the chosen option; `null` or unset shows the placeholder. */
|
|
1588
|
-
value?: T | null;
|
|
1589
|
-
onChange: (value: T) => void;
|
|
1590
|
-
/** Shown muted while nothing is chosen, e.g. "Choose one". */
|
|
1591
|
-
placeholder: string;
|
|
1592
|
-
/** Visible label above the field; also the sheet's heading. */
|
|
1593
|
-
label?: string;
|
|
1594
|
-
/** Sheet heading when it should differ from `label`. Defaults to `label`, then `placeholder`. */
|
|
1595
|
-
sheetTitle?: string;
|
|
1596
|
-
/** Accessible name of the sheet's close button. Defaults to "Close". */
|
|
1597
|
-
closeLabel?: string;
|
|
1598
|
-
/** Inline error under the field; also outlines it in destructive. */
|
|
1599
|
-
error?: string | null;
|
|
1600
|
-
disabled?: boolean;
|
|
1601
|
-
testID?: string;
|
|
1602
|
-
/**
|
|
1603
|
-
* `field`: a labelled field box; `chip`: a compact pill showing the current value with a
|
|
1604
|
-
* chevron, e.g. a filter in a row of filters. Defaults to `field`.
|
|
1605
|
-
*/
|
|
1606
|
-
variant?: SelectVariant;
|
|
1607
|
-
/** `chip`: the value that counts as unfiltered; the chip fills with primary while another value is chosen. */
|
|
1608
|
-
defaultValue?: T | null;
|
|
1609
|
-
}
|
|
1610
|
-
/** `field`: a labelled field box; `chip`: a compact pill trigger. */
|
|
1611
|
-
type SelectVariant = "field" | "chip";
|
|
1612
|
-
/**
|
|
1613
|
-
* Labelled field, or a compact chip, that opens a bottom sheet of options (radio rows with
|
|
1614
|
-
* an optional icon and description). Choosing an option calls `onChange` and closes the sheet.
|
|
1615
|
-
*/
|
|
1616
|
-
declare function Select<T extends string = string>({ options, value, onChange, placeholder, label, sheetTitle, closeLabel, error, disabled, testID, variant, defaultValue, }: SelectProps<T>): react_jsx_runtime.JSX.Element;
|
|
1617
|
-
|
|
1618
|
-
/** An option of a SearchSelect; same shape as a Select option. */
|
|
1619
|
-
type SearchSelectOption<T extends string = string> = SelectOption<T>;
|
|
1620
|
-
/** The "create new" row shown while the query matches no option exactly. */
|
|
1621
|
-
interface SearchSelectCreate {
|
|
1622
|
-
/** Row label for the typed query, e.g. (q) => `Add "${q}"`. */
|
|
1623
|
-
label: (query: string) => string;
|
|
1624
|
-
/** Called with the trimmed query; the sheet closes. The app creates the item and sets `value`. */
|
|
1625
|
-
onCreate: (query: string) => void;
|
|
1626
|
-
testID?: string;
|
|
1627
|
-
}
|
|
1628
|
-
interface SearchSelectProps<T extends string = string> {
|
|
1629
|
-
options: SearchSelectOption<T>[];
|
|
1630
|
-
/** Value of the chosen option; `null` or unset shows the placeholder. */
|
|
1631
|
-
value?: T | null;
|
|
1632
|
-
onChange: (value: T) => void;
|
|
1633
|
-
/**
|
|
1634
|
-
* Label of the chosen option when it is not in `options`, e.g. after an async search
|
|
1635
|
-
* replaced the list. Defaults to the matching option's label.
|
|
1636
|
-
*/
|
|
1637
|
-
valueLabel?: string;
|
|
1638
|
-
/** Shown muted in the field while nothing is chosen. */
|
|
1639
|
-
placeholder: string;
|
|
1640
|
-
/** Placeholder of the search input, also its accessible name. */
|
|
1641
|
-
searchPlaceholder: string;
|
|
1642
|
-
/** Visible label above the field; also the sheet's heading. */
|
|
1643
|
-
label?: string;
|
|
1644
|
-
/** Sheet heading when it should differ from `label`. Defaults to `label`, then `placeholder`. */
|
|
1645
|
-
sheetTitle?: string;
|
|
1646
|
-
/**
|
|
1647
|
-
* Called as the query changes. When set, the app owns filtering (e.g. an async search)
|
|
1648
|
-
* and passes the results as `options`; otherwise options are filtered by label here.
|
|
1649
|
-
*/
|
|
1650
|
-
onQueryChange?: (query: string) => void;
|
|
1651
|
-
/** Shows a spinner instead of the list, e.g. while the app's search runs. */
|
|
1652
|
-
loading?: boolean;
|
|
1653
|
-
/** Accessible name of the spinner. Defaults to "Loading". */
|
|
1654
|
-
loadingLabel?: string;
|
|
1655
|
-
/** Shown when no option matches. */
|
|
1656
|
-
emptyMessage?: string;
|
|
1657
|
-
/** Optional "create new" row for a query with no exact match. */
|
|
1658
|
-
create?: SearchSelectCreate;
|
|
1659
|
-
/** Accessible name of the sheet's close button. Defaults to "Close". */
|
|
1660
|
-
closeLabel?: string;
|
|
1661
|
-
/** Inline error under the field; also outlines it in destructive. */
|
|
1662
|
-
error?: string | null;
|
|
1663
|
-
disabled?: boolean;
|
|
1664
|
-
testID?: string;
|
|
1665
|
-
}
|
|
1666
|
-
/**
|
|
1667
|
-
* Select with a search input: the sheet filters options as the user types, can offer a
|
|
1668
|
-
* "create new" row for the query and shows a loading state for app-driven async search.
|
|
1669
|
-
*/
|
|
1670
|
-
declare function SearchSelect<T extends string = string>({ options, value, onChange, valueLabel, placeholder, searchPlaceholder, label, sheetTitle, onQueryChange, loading, loadingLabel, emptyMessage, create, closeLabel, error, disabled, testID, }: SearchSelectProps<T>): react_jsx_runtime.JSX.Element;
|
|
1671
|
-
|
|
1672
1474
|
/** One group of rows under a sticky heading. */
|
|
1673
1475
|
interface SectionedListSection<T> {
|
|
1674
1476
|
/** Stable key of the section, e.g. "2026-11". */
|
|
@@ -1697,7 +1499,7 @@ interface SectionedListProps<T> {
|
|
|
1697
1499
|
loadingMore?: boolean;
|
|
1698
1500
|
/** Accessible name of the loading spinner. Defaults to "Loading more". */
|
|
1699
1501
|
loadingMoreLabel?: string;
|
|
1700
|
-
/** Scrolls above the first section, e.g. a
|
|
1502
|
+
/** Scrolls above the first section, e.g. a StatTile with variant summary. */
|
|
1701
1503
|
header?: ReactNode;
|
|
1702
1504
|
/** Shown under the header while every section is empty, usually an EmptyState. */
|
|
1703
1505
|
empty?: ReactNode;
|
|
@@ -1715,37 +1517,116 @@ declare function SectionedList<T>({ sections, keyExtractor, renderItem, onEndRea
|
|
|
1715
1517
|
interface SegmentedControlOption<T extends string = string> {
|
|
1716
1518
|
value: T;
|
|
1717
1519
|
label: string;
|
|
1520
|
+
/** Defaults to `<testID>-<value>` when the control has a `testID` (segmented only). */
|
|
1521
|
+
testID?: string;
|
|
1718
1522
|
}
|
|
1523
|
+
/**
|
|
1524
|
+
* `segmented`: an outlined row of options, the selected one filled with primary, for picking
|
|
1525
|
+
* a value (radio-group semantics). `tabs`: underlined tabs on a hairline border that switch
|
|
1526
|
+
* the view below (tab-list semantics).
|
|
1527
|
+
*/
|
|
1528
|
+
type SegmentedControlVariant = "segmented" | "tabs";
|
|
1719
1529
|
interface SegmentedControlProps<T extends string = string> {
|
|
1720
|
-
/** 2 to 4
|
|
1530
|
+
/** 2 to 4 options (`segmented`) or 2 to 5 tabs (`tabs`). */
|
|
1721
1531
|
options: SegmentedControlOption<T>[];
|
|
1722
1532
|
/** Value of the selected option. */
|
|
1723
1533
|
value: T;
|
|
1724
1534
|
onChange: (value: T) => void;
|
|
1725
|
-
/** Accessible name of the group, e.g. "Theme". */
|
|
1535
|
+
/** Accessible name of the group, e.g. "Theme" or "Sections". */
|
|
1726
1536
|
accessibilityLabel?: string;
|
|
1537
|
+
/** Defaults to `segmented`. */
|
|
1538
|
+
variant?: SegmentedControlVariant;
|
|
1727
1539
|
testID?: string;
|
|
1728
1540
|
}
|
|
1729
|
-
/**
|
|
1730
|
-
|
|
1541
|
+
/**
|
|
1542
|
+
* 2-4 exclusive options in one outlined row; the selected option fills with primary. With
|
|
1543
|
+
* `variant="tabs"`, a row of underlined tabs: the selected tab has a semibold label and a
|
|
1544
|
+
* 2px primary underline, and the strip sits on a hairline border.
|
|
1545
|
+
*/
|
|
1546
|
+
declare function SegmentedControl<T extends string = string>({ options, value, onChange, accessibilityLabel, variant, testID, }: SegmentedControlProps<T>): react_jsx_runtime.JSX.Element;
|
|
1731
1547
|
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
/**
|
|
1736
|
-
title: string;
|
|
1737
|
-
/** Settings organisms: ListRow, ProfileHeader, SegmentedControl, FilterChipGroup, FormSection. */
|
|
1738
|
-
children: ReactNode;
|
|
1739
|
-
testID?: string;
|
|
1740
|
-
/** Ionicons name before the heading. */
|
|
1741
|
-
icon?: IconName;
|
|
1742
|
-
/** Muted hint under the heading. */
|
|
1548
|
+
interface SelectOption<T extends string = string> {
|
|
1549
|
+
value: T;
|
|
1550
|
+
label: string;
|
|
1551
|
+
/** Muted second line under the label. */
|
|
1743
1552
|
description?: string;
|
|
1744
|
-
/**
|
|
1745
|
-
|
|
1553
|
+
/** Ionicons name shown before the label. */
|
|
1554
|
+
icon?: IconName;
|
|
1555
|
+
/**
|
|
1556
|
+
* The unfiltered choice, e.g. "All". It is checked in the sheet while chosen, but the
|
|
1557
|
+
* trigger keeps showing the placeholder (e.g. "Category") and a chip stays unfilled.
|
|
1558
|
+
*/
|
|
1559
|
+
all?: boolean;
|
|
1746
1560
|
}
|
|
1747
|
-
/**
|
|
1748
|
-
|
|
1561
|
+
/** The "create new" row shown while the search query matches no option exactly. */
|
|
1562
|
+
interface SelectCreate {
|
|
1563
|
+
/** Row label for the typed query, e.g. (q) => `Add "${q}"`. */
|
|
1564
|
+
label: (query: string) => string;
|
|
1565
|
+
/** Called with the trimmed query; the sheet closes. The app creates the item and sets `value`. */
|
|
1566
|
+
onCreate: (query: string) => void;
|
|
1567
|
+
testID?: string;
|
|
1568
|
+
}
|
|
1569
|
+
/** A search input at the top of the sheet, for long or server-backed lists. */
|
|
1570
|
+
interface SelectSearchable {
|
|
1571
|
+
/** Placeholder of the search input, also its accessible name. */
|
|
1572
|
+
placeholder: string;
|
|
1573
|
+
/**
|
|
1574
|
+
* Called as the query changes. When set, the app owns filtering (e.g. an async search)
|
|
1575
|
+
* and passes the results as `options`; otherwise options are filtered by label here.
|
|
1576
|
+
*/
|
|
1577
|
+
onQueryChange?: (query: string) => void;
|
|
1578
|
+
/** Shows a spinner instead of the list, e.g. while the app's search runs. */
|
|
1579
|
+
loading?: boolean;
|
|
1580
|
+
/** Accessible name of the spinner. Defaults to "Loading". */
|
|
1581
|
+
loadingLabel?: string;
|
|
1582
|
+
/** Shown when no option matches. */
|
|
1583
|
+
emptyMessage?: string;
|
|
1584
|
+
/** Optional "create new" row for a query with no exact match. */
|
|
1585
|
+
create?: SelectCreate;
|
|
1586
|
+
}
|
|
1587
|
+
interface SelectProps<T extends string = string> {
|
|
1588
|
+
options: SelectOption<T>[];
|
|
1589
|
+
/** Value of the chosen option; `null` or unset shows the placeholder. */
|
|
1590
|
+
value?: T | null;
|
|
1591
|
+
onChange: (value: T) => void;
|
|
1592
|
+
/**
|
|
1593
|
+
* Label of the chosen option when it is not in `options`, e.g. after an async search
|
|
1594
|
+
* replaced the list. Defaults to the matching option's label.
|
|
1595
|
+
*/
|
|
1596
|
+
valueLabel?: string;
|
|
1597
|
+
/** Shown muted while nothing is chosen, e.g. "Choose one". */
|
|
1598
|
+
placeholder: string;
|
|
1599
|
+
/** Visible label above the field; also the sheet's heading. */
|
|
1600
|
+
label?: string;
|
|
1601
|
+
/** Sheet heading when it should differ from `label`. Defaults to `label`, then `placeholder`. */
|
|
1602
|
+
sheetTitle?: string;
|
|
1603
|
+
/** Accessible name of the sheet's close button. Defaults to "Close". */
|
|
1604
|
+
closeLabel?: string;
|
|
1605
|
+
/** Inline error under the field; also outlines it in destructive. */
|
|
1606
|
+
error?: string | null;
|
|
1607
|
+
disabled?: boolean;
|
|
1608
|
+
testID?: string;
|
|
1609
|
+
/**
|
|
1610
|
+
* `field`: a labelled field box; `chip`: a compact pill showing the current value with a
|
|
1611
|
+
* chevron, e.g. a filter in a row of filters. Defaults to `field`.
|
|
1612
|
+
*/
|
|
1613
|
+
variant?: SelectVariant;
|
|
1614
|
+
/** `chip`: the value that counts as unfiltered; the chip fills with primary while another value is chosen. */
|
|
1615
|
+
defaultValue?: T | null;
|
|
1616
|
+
/**
|
|
1617
|
+
* Adds a search input to the sheet: options filter as the user types, or the app filters
|
|
1618
|
+
* them (`onQueryChange`) with a loading state, an empty message and a create row.
|
|
1619
|
+
*/
|
|
1620
|
+
searchable?: SelectSearchable;
|
|
1621
|
+
}
|
|
1622
|
+
/** `field`: a labelled field box; `chip`: a compact pill trigger. */
|
|
1623
|
+
type SelectVariant = "field" | "chip";
|
|
1624
|
+
/**
|
|
1625
|
+
* Labelled field, or a compact chip, that opens a bottom sheet of options (radio rows with
|
|
1626
|
+
* an optional icon and description). Choosing an option calls `onChange` and closes the
|
|
1627
|
+
* sheet. With `searchable` the sheet starts with a search input.
|
|
1628
|
+
*/
|
|
1629
|
+
declare function Select<T extends string = string>({ options, value, onChange, valueLabel, placeholder, label, sheetTitle, closeLabel, error, disabled, testID, variant, defaultValue, searchable, }: SelectProps<T>): react_jsx_runtime.JSX.Element;
|
|
1749
1630
|
|
|
1750
1631
|
type SkeletonListVariant = "chat" | "list" | "detail" | "ranked";
|
|
1751
1632
|
interface SkeletonListProps {
|
|
@@ -1838,6 +1719,23 @@ declare function SocialSignInButton({ provider, onPress, label, loading, disable
|
|
|
1838
1719
|
|
|
1839
1720
|
/** Color of the value: `positive` uses primary, `negative` uses destructive. */
|
|
1840
1721
|
type StatTileTone = "default" | "positive" | "negative";
|
|
1722
|
+
/**
|
|
1723
|
+
* `tile`: a card that shares a row with other tiles; `summary`: a full-width totals card on
|
|
1724
|
+
* the secondary surface, with the caption right of the value and an optional row of
|
|
1725
|
+
* sub-stats under it.
|
|
1726
|
+
*/
|
|
1727
|
+
type StatTileVariant = "tile" | "summary";
|
|
1728
|
+
/** Color of a sub-stat value: `primary` highlights it, `muted` plays it down. */
|
|
1729
|
+
type StatTileStatTone = "default" | "primary" | "muted";
|
|
1730
|
+
/** One sub-stat in the divided row under a `summary` headline. */
|
|
1731
|
+
interface StatTileStat {
|
|
1732
|
+
label: string;
|
|
1733
|
+
/** Formatted by the app, e.g. "1,200". */
|
|
1734
|
+
value: string;
|
|
1735
|
+
/** Defaults to `default`. */
|
|
1736
|
+
tone?: StatTileStatTone;
|
|
1737
|
+
testID?: string;
|
|
1738
|
+
}
|
|
1841
1739
|
interface StatTileProps {
|
|
1842
1740
|
/** Muted line above the value, e.g. "Total". */
|
|
1843
1741
|
label: string;
|
|
@@ -1845,19 +1743,25 @@ interface StatTileProps {
|
|
|
1845
1743
|
value: string;
|
|
1846
1744
|
/** Muted line under the value, e.g. "12 entries". */
|
|
1847
1745
|
caption?: string;
|
|
1848
|
-
/** Ionicons name shown in the top-right corner. */
|
|
1746
|
+
/** Ionicons name shown in the top-right corner (`tile` only). */
|
|
1849
1747
|
icon?: IconName;
|
|
1850
1748
|
tone?: StatTileTone;
|
|
1851
|
-
/** Makes the tile a button, e.g. to open the list behind the number. */
|
|
1749
|
+
/** Makes the tile a button, e.g. to open the list behind the number (`tile` only). */
|
|
1852
1750
|
onPress?: () => void;
|
|
1853
1751
|
testID?: string;
|
|
1854
1752
|
/**
|
|
1855
1753
|
* Draws a progress ring left of the text, turning the tile into a hero summary, e.g.
|
|
1856
|
-
* the share of a collection completed.
|
|
1754
|
+
* the share of a collection completed (`tile` only).
|
|
1857
1755
|
*/
|
|
1858
1756
|
progress?: StatTileProgress;
|
|
1859
1757
|
/** testID of the value text, e.g. for an end-to-end check of the number. */
|
|
1860
1758
|
valueTestID?: string;
|
|
1759
|
+
/** Defaults to `tile`. */
|
|
1760
|
+
variant?: StatTileVariant;
|
|
1761
|
+
/** Up to three sub-stats in a divided row under the headline (`summary` only). */
|
|
1762
|
+
stats?: StatTileStat[];
|
|
1763
|
+
/** testID of the caption text. */
|
|
1764
|
+
captionTestID?: string;
|
|
1861
1765
|
}
|
|
1862
1766
|
interface StatTileProgress {
|
|
1863
1767
|
/** Share done, from 0 to 1. Values outside the range are clamped. */
|
|
@@ -1869,62 +1773,10 @@ interface StatTileProgress {
|
|
|
1869
1773
|
}
|
|
1870
1774
|
/**
|
|
1871
1775
|
* Summary stat card: a label, a large value and an optional caption and icon. Tiles
|
|
1872
|
-
* share a row equally (each takes `flex: 1`).
|
|
1776
|
+
* share a row equally (each takes `flex: 1`). `summary` is a full-width totals card with
|
|
1777
|
+
* the caption beside the value and up to three sub-stats under it.
|
|
1873
1778
|
*/
|
|
1874
|
-
declare function StatTile(
|
|
1875
|
-
|
|
1876
|
-
/** The bar's full-width primary button. */
|
|
1877
|
-
interface SubmitBarSubmit {
|
|
1878
|
-
label: string;
|
|
1879
|
-
onPress: () => void;
|
|
1880
|
-
/** Shows a spinner and blocks presses, e.g. while saving. */
|
|
1881
|
-
loading?: boolean;
|
|
1882
|
-
disabled?: boolean;
|
|
1883
|
-
testID?: string;
|
|
1884
|
-
}
|
|
1885
|
-
interface SubmitBarProps {
|
|
1886
|
-
submit: SubmitBarSubmit;
|
|
1887
|
-
/** Form-level error above the button, e.g. "Could not save." Field errors belong on the fields. */
|
|
1888
|
-
error?: string | null;
|
|
1889
|
-
errorTestID?: string;
|
|
1890
|
-
testID?: string;
|
|
1891
|
-
}
|
|
1892
|
-
/**
|
|
1893
|
-
* Bar pinned under a form: a top hairline, an optional form-level error announced as an
|
|
1894
|
-
* alert, and a full-width submit button, in a column capped at 640px. The parent pads the
|
|
1895
|
-
* bottom safe-area inset.
|
|
1896
|
-
*/
|
|
1897
|
-
declare function SubmitBar({ submit, error, errorTestID, testID, }: SubmitBarProps): react_jsx_runtime.JSX.Element;
|
|
1898
|
-
|
|
1899
|
-
/** Color of a sub-stat value: `primary` highlights it, `muted` plays it down. */
|
|
1900
|
-
type SummaryCardTone = "default" | "primary" | "muted";
|
|
1901
|
-
/** One sub-stat in the row under the headline. */
|
|
1902
|
-
interface SummaryCardStat {
|
|
1903
|
-
label: string;
|
|
1904
|
-
/** Formatted by the app, e.g. "1,200". */
|
|
1905
|
-
value: string;
|
|
1906
|
-
/** Defaults to `default`. */
|
|
1907
|
-
tone?: SummaryCardTone;
|
|
1908
|
-
testID?: string;
|
|
1909
|
-
}
|
|
1910
|
-
interface SummaryCardProps {
|
|
1911
|
-
/** Muted label above the headline value, e.g. "Total". */
|
|
1912
|
-
label: string;
|
|
1913
|
-
/** Headline value, formatted by the app. */
|
|
1914
|
-
value: string;
|
|
1915
|
-
valueTestID?: string;
|
|
1916
|
-
/** Muted text on the right of the headline, e.g. a count. */
|
|
1917
|
-
caption?: string;
|
|
1918
|
-
captionTestID?: string;
|
|
1919
|
-
/** Up to three sub-stats in a divided row under the headline. */
|
|
1920
|
-
stats?: SummaryCardStat[];
|
|
1921
|
-
testID?: string;
|
|
1922
|
-
}
|
|
1923
|
-
/**
|
|
1924
|
-
* Totals card on the secondary surface: a headline (label, large value, optional caption on
|
|
1925
|
-
* the right) over a divided row of up to three sub-stats.
|
|
1926
|
-
*/
|
|
1927
|
-
declare function SummaryCard({ label, value, valueTestID, caption, captionTestID, stats, testID, }: SummaryCardProps): react_jsx_runtime.JSX.Element;
|
|
1779
|
+
declare function StatTile(props: StatTileProps): react_jsx_runtime.JSX.Element;
|
|
1928
1780
|
|
|
1929
1781
|
/** One tab: a route or screen the bar switches to. */
|
|
1930
1782
|
interface TabBarItem {
|
|
@@ -1965,28 +1817,6 @@ interface TabBarProps {
|
|
|
1965
1817
|
*/
|
|
1966
1818
|
declare function TabBar({ items, activeKey, onSelect, centerAction, safeAreaBottom, testID, }: TabBarProps): react_jsx_runtime.JSX.Element;
|
|
1967
1819
|
|
|
1968
|
-
interface TabStripOption<T extends string = string> {
|
|
1969
|
-
value: T;
|
|
1970
|
-
label: string;
|
|
1971
|
-
testID?: string;
|
|
1972
|
-
}
|
|
1973
|
-
interface TabStripProps<T extends string = string> {
|
|
1974
|
-
/** 2 to 5 tabs, each switching the view below the strip. */
|
|
1975
|
-
options: TabStripOption<T>[];
|
|
1976
|
-
/** Value of the selected tab. */
|
|
1977
|
-
value: T;
|
|
1978
|
-
onChange: (value: T) => void;
|
|
1979
|
-
/** Accessible name of the tab list, e.g. "Sections". */
|
|
1980
|
-
accessibilityLabel?: string;
|
|
1981
|
-
testID?: string;
|
|
1982
|
-
}
|
|
1983
|
-
/**
|
|
1984
|
-
* Row of underlined tabs that switch the view below it. The selected tab has a semibold
|
|
1985
|
-
* label and a 2px primary underline; the strip sits on a hairline border. Tab-list
|
|
1986
|
-
* semantics; for picking a value use SegmentedControl instead.
|
|
1987
|
-
*/
|
|
1988
|
-
declare function TabStrip<T extends string = string>({ options, value, onChange, accessibilityLabel, testID, }: TabStripProps<T>): react_jsx_runtime.JSX.Element;
|
|
1989
|
-
|
|
1990
1820
|
/** A small button after the input, e.g. "Add" for an inline add field. */
|
|
1991
1821
|
interface TextFieldAction {
|
|
1992
1822
|
label: string;
|
|
@@ -1994,15 +1824,29 @@ interface TextFieldAction {
|
|
|
1994
1824
|
disabled?: boolean;
|
|
1995
1825
|
testID?: string;
|
|
1996
1826
|
}
|
|
1827
|
+
/** `text`: free text; `amount`: a number with a digits or decimal keyboard and an optional unit. */
|
|
1828
|
+
type TextFieldKind = "text" | "amount";
|
|
1829
|
+
/** `amount`: a quick-pick chip under the field; pressing it replaces the text with `value`. */
|
|
1830
|
+
interface TextFieldPreset {
|
|
1831
|
+
/** Text the field takes when pressed, formatted like the app's input. */
|
|
1832
|
+
value: string;
|
|
1833
|
+
/** Chip label, e.g. "+10" or "50". */
|
|
1834
|
+
label: string;
|
|
1835
|
+
testID?: string;
|
|
1836
|
+
}
|
|
1837
|
+
/** Where the unit sits: before the number ("$ 12") or after it ("12 kg"). */
|
|
1838
|
+
type TextFieldUnitPosition = "prefix" | "suffix";
|
|
1997
1839
|
interface TextFieldProps {
|
|
1998
|
-
/** The text as typed; the field is controlled. */
|
|
1840
|
+
/** The text as typed; the field is controlled. Parsing and grouping are the app's job. */
|
|
1999
1841
|
value: string;
|
|
2000
1842
|
onChangeText: (text: string) => void;
|
|
2001
1843
|
/** Visible label above the field; also the input's accessible name. */
|
|
2002
1844
|
label?: string;
|
|
2003
1845
|
/** Muted text while empty; the accessible name when there is no label. */
|
|
2004
1846
|
placeholder?: string;
|
|
2005
|
-
/**
|
|
1847
|
+
/** Defaults to `text`. */
|
|
1848
|
+
kind?: TextFieldKind;
|
|
1849
|
+
/** `text` only: a box that grows with its text (from three lines) instead of one 44px line. */
|
|
2006
1850
|
multiline?: boolean;
|
|
2007
1851
|
/** Maximum number of characters the input accepts. */
|
|
2008
1852
|
maxLength?: number;
|
|
@@ -2010,19 +1854,31 @@ interface TextFieldProps {
|
|
|
2010
1854
|
error?: string | null;
|
|
2011
1855
|
/** False while the form is busy; dims the field. Defaults to true. */
|
|
2012
1856
|
editable?: boolean;
|
|
2013
|
-
/**
|
|
1857
|
+
/** `text` only: an optional small button after the input. */
|
|
2014
1858
|
action?: TextFieldAction;
|
|
2015
1859
|
/** Called with the current text when the keyboard's return key is pressed (single line only). */
|
|
2016
1860
|
onSubmit?: (text: string) => void;
|
|
2017
1861
|
/** Focuses the input on mount, e.g. an add field that just opened. */
|
|
2018
1862
|
autoFocus?: boolean;
|
|
2019
1863
|
testID?: string;
|
|
1864
|
+
/** `amount` only: currency or unit shown inside the field, e.g. "$" or "kg". */
|
|
1865
|
+
unit?: string;
|
|
1866
|
+
/** `amount` only. Defaults to `suffix`. */
|
|
1867
|
+
unitPosition?: TextFieldUnitPosition;
|
|
1868
|
+
/** `amount` only: a decimal keyboard instead of digits only. */
|
|
1869
|
+
allowDecimal?: boolean;
|
|
1870
|
+
/** `amount` only: muted read-back line under the field, e.g. the amount in words. */
|
|
1871
|
+
hint?: string;
|
|
1872
|
+
/** `amount` only: quick-pick chips under the field; the one whose value equals the field is selected. */
|
|
1873
|
+
presets?: TextFieldPreset[];
|
|
2020
1874
|
}
|
|
2021
1875
|
/**
|
|
2022
1876
|
* One labelled text field outside a FormSection: a single line or a growing multiline box,
|
|
2023
|
-
* an inline error and an optional small button after the input.
|
|
1877
|
+
* an inline error and an optional small button after the input. `kind="amount"` makes it a
|
|
1878
|
+
* numeric field with an optional unit before or after the number, a read-back hint and
|
|
1879
|
+
* preset chips.
|
|
2024
1880
|
*/
|
|
2025
|
-
declare function TextField({ value, onChangeText, label, placeholder, multiline, maxLength, error, editable, action, onSubmit, autoFocus, testID, }: TextFieldProps): react_jsx_runtime.JSX.Element;
|
|
1881
|
+
declare function TextField({ value, onChangeText, label, placeholder, kind, multiline, maxLength, error, editable, action, onSubmit, autoFocus, testID, unit, unitPosition, allowDecimal, hint, presets, }: TextFieldProps): react_jsx_runtime.JSX.Element;
|
|
2026
1882
|
|
|
2027
1883
|
interface TypingIndicatorProps {
|
|
2028
1884
|
/** Accessible name of the indicator. Defaults to "Typing". */
|
|
@@ -2097,7 +1953,7 @@ interface ChatTemplateProps {
|
|
|
2097
1953
|
header?: ReactNode;
|
|
2098
1954
|
/** The stream: a MessageList, SkeletonList or EmptyState. Fills the remaining height. */
|
|
2099
1955
|
list: ReactNode;
|
|
2100
|
-
/** Floats over the list, e.g. a
|
|
1956
|
+
/** Floats over the list, e.g. a FloatingIconButton with `placement="bottom-center"`. */
|
|
2101
1957
|
overlay?: ReactNode;
|
|
2102
1958
|
/** Strip between the list and the composer, e.g. an offline or error Banner. */
|
|
2103
1959
|
banner?: ReactNode;
|
|
@@ -2158,7 +2014,7 @@ interface DetailTemplateProps {
|
|
|
2158
2014
|
declare function DetailTemplate({ header, hero, children, footer, testID, onBack, backLabel, safeAreaBottom, heroPadded, }: DetailTemplateProps): react_jsx_runtime.JSX.Element;
|
|
2159
2015
|
|
|
2160
2016
|
/** Full-width primary button pinned under the form. */
|
|
2161
|
-
type FormTemplateSubmit =
|
|
2017
|
+
type FormTemplateSubmit = FooterBarSubmit;
|
|
2162
2018
|
/** Pinned bottom bar: a form-level error above the submit button. */
|
|
2163
2019
|
interface FormTemplateFooter {
|
|
2164
2020
|
submit: FormTemplateSubmit;
|
|
@@ -2169,7 +2025,7 @@ interface FormTemplateFooter {
|
|
|
2169
2025
|
interface FormTemplateProps {
|
|
2170
2026
|
/** Fixed above the form, usually an AppBar with a back or close action. */
|
|
2171
2027
|
header?: ReactNode;
|
|
2172
|
-
/** Field organisms (
|
|
2028
|
+
/** Field organisms (TextField, DateField, FilterChipGroup, ...), stacked with a 24px gap. */
|
|
2173
2029
|
children: ReactNode;
|
|
2174
2030
|
/** Submit bar pinned to the bottom so the action is reachable without scrolling. */
|
|
2175
2031
|
footer?: FormTemplateFooter;
|
|
@@ -2308,7 +2164,7 @@ declare function OverlayTemplate({ canvas, search, actions, card, sheet, safeAre
|
|
|
2308
2164
|
interface SettingsTemplateProps {
|
|
2309
2165
|
/** Header slot, usually an AppBar with a back action. Stays fixed above the scroll. */
|
|
2310
2166
|
header?: ReactNode;
|
|
2311
|
-
/**
|
|
2167
|
+
/** ListSection panels (variant panel), stacked with a 20px gap. */
|
|
2312
2168
|
children: ReactNode;
|
|
2313
2169
|
testID?: string;
|
|
2314
2170
|
}
|
|
@@ -2360,7 +2216,7 @@ interface VoiceTemplateProps {
|
|
|
2360
2216
|
header?: ReactNode;
|
|
2361
2217
|
/** The centerpiece, usually an Orb. */
|
|
2362
2218
|
orb: ReactNode;
|
|
2363
|
-
/** Shown under the orb, usually an
|
|
2219
|
+
/** Shown under the orb, usually an EmptyState with variant error. */
|
|
2364
2220
|
error?: ReactNode;
|
|
2365
2221
|
/** Shown under the orb and error, usually a LiveCaption. */
|
|
2366
2222
|
caption?: ReactNode;
|
|
@@ -2374,4 +2230,4 @@ interface VoiceTemplateProps {
|
|
|
2374
2230
|
*/
|
|
2375
2231
|
declare function VoiceTemplate({ header, orb, error, caption, controls, testID, }: VoiceTemplateProps): react_jsx_runtime.JSX.Element;
|
|
2376
2232
|
|
|
2377
|
-
export { ActionBar, type ActionBarAction, type ActionBarProps, type ActionBarTone, ActionCard, type ActionCardProps, type ActionCardRating, type ActionCardTone, ActionToggle, type ActionToggleProps, type ActionToggleTone, AlertDialog, type AlertDialogProps,
|
|
2233
|
+
export { ActionBar, type ActionBarAction, type ActionBarProps, type ActionBarTone, ActionCard, type ActionCardProps, type ActionCardRating, type ActionCardTone, ActionToggle, type ActionToggleProps, type ActionToggleTone, AlertDialog, type AlertDialogProps, AppBar, type AppBarAction, type AppBarProps, AppShell, type AppShellProps, AuthTemplate, type AuthTemplateFooterLink, type AuthTemplateProps, Banner, type BannerProps, type BannerTone, BottomSheet, type BottomSheetAction, type BottomSheetPresentation, type BottomSheetProps, BrandMark, type BrandMarkProps, ChatTemplate, type ChatTemplateProps, Composer, type ComposerAccessory, type ComposerProps, DateField, type DateFieldProps, type DateFieldShortcut, DetailHeader, type DetailHeaderAction, type DetailHeaderProps, type DetailHeaderRating, type DetailHeaderSize, DetailTemplate, type DetailTemplateProps, EmptyState, type EmptyStateAction, type EmptyStateProps, type EmptyStateVariant, EntryCard, type EntryCardAction, type EntryCardProps, type EntryCardRating, FilterChipGroup, type FilterChipGroupAddAction, type FilterChipGroupBaseProps, type FilterChipGroupLayout, type FilterChipGroupMultipleProps, type FilterChipGroupOption, type FilterChipGroupProps, type FilterChipGroupSection, type FilterChipGroupSingleProps, FloatingCard, type FloatingCardAction, type FloatingCardProps, type FloatingCardRating, FloatingIconButton, type FloatingIconButtonPlacement, type FloatingIconButtonProps, type FloatingIconButtonSize, type FloatingIconButtonTone, FloatingPanel, type FloatingPanelProps, type FloatingPanelVariant, FooterBar, type FooterBarColumn, type FooterBarProps, type FooterBarSubmit, FooterLinks, type FooterLinksItem, type FooterLinksProps, FormSection, type FormSectionAction, type FormSectionField, type FormSectionProps, FormTemplate, type FormTemplateFooter, type FormTemplateProps, type FormTemplateSubmit, ImageCarousel, type ImageCarouselProps, ImagePickerTile, type ImagePickerTileProps, type ImagePickerTileSize, ImageStrip, type ImageStripProps, ImageViewer, type ImageViewerProps, LabeledDivider, type LabeledDividerProps, type LabeledDividerTone, Legend, type LegendItem, type LegendProps, ListRow, type ListRowAction, type ListRowActionsPlacement, type ListRowAvatar, type ListRowBadgeTone, type ListRowIndicator, type ListRowProps, type ListRowRating, type ListRowToggle, type ListRowTone, type ListRowValueTone, ListSection, type ListSectionAction, type ListSectionProps, type ListSectionTone, type ListSectionVariant, ListTemplate, type ListTemplateProps, type ListTemplateScrollEvent, type ListTemplateScrollHandle, LiveCaption, type LiveCaptionProps, LockTemplate, type LockTemplateBiometric, type LockTemplatePin, type LockTemplateProps, MessageBubble, type MessageBubbleProps, type MessageBubbleRole, MessageList, type MessageListProps, MonthCalendar, type MonthCalendarDotTone, type MonthCalendarProps, NavigationRail, type NavigationRailFooterAction, type NavigationRailItem, type NavigationRailProps, Orb, type OrbProps, type OrbState, OverlayTemplate, type OverlayTemplateAction, type OverlayTemplateProps, PinEntry, type PinEntryBiometric, type PinEntryPin, type PinEntryProps, ProfileHeader, type ProfileHeaderAction, type ProfileHeaderProps, ProgressBar, type ProgressBarProps, type ProgressBarTone, RankedRow, type RankedRowProps, type RankedRowTier, RatingStars, type RatingStarsProps, type RatingStarsSize, SearchBar, type SearchBarFilterAction, type SearchBarProps, type SearchBarSuggestion, SectionedList, type SectionedListItemInfo, type SectionedListProps, type SectionedListSection, SegmentedControl, type SegmentedControlOption, type SegmentedControlProps, type SegmentedControlVariant, Select, type SelectCreate, type SelectOption, type SelectProps, type SelectSearchable, type SelectVariant, SettingsTemplate, type SettingsTemplateProps, SkeletonList, type SkeletonListProps, type SkeletonListVariant, Snackbar, type SnackbarContextValue, type SnackbarOptions, type SnackbarPlacement, type SnackbarProps, SnackbarProvider, type SnackbarProviderProps, type SnackbarTone, SocialSignInButton, type SocialSignInButtonProps, type SocialSignInButtonProvider, SplitLayout, type SplitLayoutListSize, type SplitLayoutPane, type SplitLayoutProps, StatTile, type StatTileProgress, type StatTileProps, type StatTileStat, type StatTileStatTone, type StatTileTone, type StatTileVariant, SuggestionChips, type SuggestionChipsItem, type SuggestionChipsLayout, type SuggestionChipsProps, TabBar, type TabBarCenterAction, type TabBarItem, type TabBarProps, TextField, type TextFieldAction, type TextFieldKind, type TextFieldPreset, type TextFieldProps, type TextFieldUnitPosition, type ThemeColorName, type ThemeColors, type ThemeContextValue, type ThemeMode, type ThemeModePreference, type ThemeName, ThemeProvider, type ThemeProviderProps, TypingIndicator, type TypingIndicatorProps, VoiceTemplate, type VoiceTemplateProps, useSnackbar, useSplitLayout, useTheme };
|