@aramiworks/design 0.0.0-stage → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -2
- package/dist/index.d.mts +2260 -0
- package/dist/index.d.ts +2260 -0
- package/dist/index.js +6931 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +6862 -0
- package/dist/index.mjs.map +1 -0
- package/manifest.json +1121 -0
- package/package.json +108 -4
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,2260 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { ReactNode, ComponentProps, Ref, ReactElement } from 'react';
|
|
3
|
+
import Ionicons from '@expo/vector-icons/Ionicons';
|
|
4
|
+
import { TextInputProps, ListRenderItem, NativeSyntheticEvent, NativeScrollEvent, FlatList } from 'react-native';
|
|
5
|
+
|
|
6
|
+
type ThemeName = "coral" | "macaron";
|
|
7
|
+
type ThemeMode = "light" | "dark";
|
|
8
|
+
/** A color token name, the CSS variable without its `--` (`primary`, `muted-foreground`). */
|
|
9
|
+
type ThemeColorName = "background" | "foreground" | "card" | "card-foreground" | "popover" | "popover-foreground" | "primary" | "primary-foreground" | "secondary" | "secondary-foreground" | "muted" | "muted-foreground" | "accent" | "accent-foreground" | "destructive" | "destructive-foreground" | "border" | "input" | "ring" | "gold" | "gold-dark" | "silver" | "bronze" | "medal-foreground" | "info" | "info-foreground";
|
|
10
|
+
|
|
11
|
+
/** Every color token as a ready-to-use string (`"hsl(358, 100%, 67%)"`), keyed by token name. */
|
|
12
|
+
type ThemeColors = Readonly<Record<ThemeColorName, string>>;
|
|
13
|
+
/** `system` follows the device appearance. */
|
|
14
|
+
type ThemeModePreference = ThemeMode | "system";
|
|
15
|
+
interface ThemeContextValue {
|
|
16
|
+
/** Active theme name. */
|
|
17
|
+
theme: ThemeName;
|
|
18
|
+
/** Mode the provider was given (`system`, `light` or `dark`). */
|
|
19
|
+
mode: ThemeModePreference;
|
|
20
|
+
/** Mode actually applied after resolving `system`. */
|
|
21
|
+
resolvedMode: ThemeMode;
|
|
22
|
+
/**
|
|
23
|
+
* Resolved colors for the active theme and `resolvedMode`. Only for things token classes
|
|
24
|
+
* cannot reach: native map markers, a status bar, a web focus ring, a chart engine. Never
|
|
25
|
+
* hard-code a color instead (D61).
|
|
26
|
+
*/
|
|
27
|
+
colors: ThemeColors;
|
|
28
|
+
}
|
|
29
|
+
interface ThemeProviderProps {
|
|
30
|
+
/** Bundled theme to apply. */
|
|
31
|
+
theme: ThemeName;
|
|
32
|
+
/** Light, dark, or follow the device. Defaults to `system`. */
|
|
33
|
+
mode?: ThemeModePreference;
|
|
34
|
+
children: ReactNode;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Applies a bundled theme to everything below it by setting the token CSS
|
|
38
|
+
* variables with NativeWind `vars()` (D6, D14). Wrap the app root once.
|
|
39
|
+
*/
|
|
40
|
+
declare function ThemeProvider({ theme, mode, children, }: ThemeProviderProps): react_jsx_runtime.JSX.Element;
|
|
41
|
+
/** Reads the active theme. Must be called below a `ThemeProvider`. */
|
|
42
|
+
declare function useTheme(): ThemeContextValue;
|
|
43
|
+
|
|
44
|
+
/** Fill of an ActionBar button: primary (default) or destructive, e.g. for delete. */
|
|
45
|
+
type ActionBarTone = "default" | "destructive";
|
|
46
|
+
interface ActionBarAction {
|
|
47
|
+
label: string;
|
|
48
|
+
onPress: () => void;
|
|
49
|
+
/** Shows a spinner and blocks presses, e.g. while saving. */
|
|
50
|
+
loading?: boolean;
|
|
51
|
+
disabled?: boolean;
|
|
52
|
+
tone?: ActionBarTone;
|
|
53
|
+
testID?: string;
|
|
54
|
+
}
|
|
55
|
+
interface ActionBarProps {
|
|
56
|
+
/** Filled button on the right; full width alone, half width beside `secondary`. */
|
|
57
|
+
primary: ActionBarAction;
|
|
58
|
+
/** Outlined button left of the primary one, e.g. cancel or edit; same width. */
|
|
59
|
+
secondary?: ActionBarAction;
|
|
60
|
+
/**
|
|
61
|
+
* Renders only the buttons, without the bar's border, padding and inset. Use it inside
|
|
62
|
+
* a DetailTemplate `footer`, which already draws them.
|
|
63
|
+
*/
|
|
64
|
+
embedded?: boolean;
|
|
65
|
+
/** Pads the bottom safe-area inset (default). Ignored when `embedded`. */
|
|
66
|
+
safeAreaBottom?: boolean;
|
|
67
|
+
/** Accessible name of the spinners. Defaults to "Loading". */
|
|
68
|
+
loadingLabel?: string;
|
|
69
|
+
testID?: string;
|
|
70
|
+
/**
|
|
71
|
+
* Up to two outlined, equal-width buttons in a second row under the primary one, e.g.
|
|
72
|
+
* share and duplicate. Only the first two are drawn.
|
|
73
|
+
*/
|
|
74
|
+
extraActions?: ActionBarAction[];
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Bottom action bar: an optional outlined secondary button and a filled primary one, each
|
|
78
|
+
* with loading, disabled and destructive states. Pads the bottom safe-area inset.
|
|
79
|
+
*/
|
|
80
|
+
declare function ActionBar({ primary, secondary, embedded, safeAreaBottom, loadingLabel, testID, extraActions, }: ActionBarProps): react_jsx_runtime.JSX.Element;
|
|
81
|
+
|
|
82
|
+
/** Any Ionicons glyph name, e.g. "settings-outline". */
|
|
83
|
+
type IconName = ComponentProps<typeof Ionicons>["name"];
|
|
84
|
+
|
|
85
|
+
/** Small read-only star rating at the end of the card. */
|
|
86
|
+
interface ActionCardRating {
|
|
87
|
+
value: number;
|
|
88
|
+
/** Number of stars. Defaults to 5. */
|
|
89
|
+
max?: number;
|
|
90
|
+
/** Accessible name of the rating, e.g. "Rating". */
|
|
91
|
+
label: string;
|
|
92
|
+
}
|
|
93
|
+
/** `default`: bordered card; `accent`: primary border and tint, e.g. once the action is done. */
|
|
94
|
+
type ActionCardTone = "default" | "accent";
|
|
95
|
+
interface ActionCardProps {
|
|
96
|
+
/** Ionicons name in the round tile at the start, e.g. "location-outline". */
|
|
97
|
+
icon: IconName;
|
|
98
|
+
title: string;
|
|
99
|
+
/** Muted line under the title, e.g. what has been done so far. */
|
|
100
|
+
summary?: string;
|
|
101
|
+
rating?: ActionCardRating;
|
|
102
|
+
/** Defaults to `default`. */
|
|
103
|
+
tone?: ActionCardTone;
|
|
104
|
+
/** Label of a filled pill at the end, e.g. "Start"; without it the card shows a chevron. */
|
|
105
|
+
cta?: string;
|
|
106
|
+
onPress: () => void;
|
|
107
|
+
/** Accessible name of the card. Defaults to its visible text. */
|
|
108
|
+
accessibilityLabel?: string;
|
|
109
|
+
testID?: string;
|
|
110
|
+
/** testID of the summary line, e.g. for an end-to-end test that reads it. */
|
|
111
|
+
summaryTestID?: string;
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* One pressable status card that opens a flow: an icon tile, a title and summary, an
|
|
115
|
+
* optional small rating, and a call-to-action pill or a chevron. The `accent` tone marks
|
|
116
|
+
* a done or active state.
|
|
117
|
+
*/
|
|
118
|
+
declare function ActionCard({ icon, title, summary, rating, tone, cta, onPress, accessibilityLabel, testID, summaryTestID, }: ActionCardProps): react_jsx_runtime.JSX.Element;
|
|
119
|
+
|
|
120
|
+
type ActionToggleTone = "default" | "destructive";
|
|
121
|
+
interface ActionToggleProps {
|
|
122
|
+
/** Ionicons name shown while inactive (and always for a plain action). */
|
|
123
|
+
icon: IconName;
|
|
124
|
+
/** Ionicons name shown while active. Defaults to `icon`. */
|
|
125
|
+
activeIcon?: IconName;
|
|
126
|
+
/** Accessible name, e.g. "Mute microphone". */
|
|
127
|
+
label: string;
|
|
128
|
+
/** Toggle state: primary fill while true. */
|
|
129
|
+
active?: boolean;
|
|
130
|
+
/** Makes it a toggle (switch role); called with the next state. */
|
|
131
|
+
onToggle?: (next: boolean) => void;
|
|
132
|
+
/** Plain action when there is no state to toggle, e.g. ending a session. */
|
|
133
|
+
onPress?: () => void;
|
|
134
|
+
/** "destructive" fills it with the destructive color. Defaults to "default". */
|
|
135
|
+
tone?: ActionToggleTone;
|
|
136
|
+
testID?: string;
|
|
137
|
+
}
|
|
138
|
+
/** Round 56px icon button: a toggle with `onToggle`, or a plain action with `onPress`. */
|
|
139
|
+
declare function ActionToggle({ icon, activeIcon, label, active, onToggle, onPress, tone, testID, }: ActionToggleProps): react_jsx_runtime.JSX.Element;
|
|
140
|
+
|
|
141
|
+
interface AlertDialogProps {
|
|
142
|
+
/** Shows the dialog. The app owns this state. */
|
|
143
|
+
open: boolean;
|
|
144
|
+
title: string;
|
|
145
|
+
description?: string;
|
|
146
|
+
confirmLabel: string;
|
|
147
|
+
cancelLabel: string;
|
|
148
|
+
/** Fills the confirm button with the destructive color, e.g. for sign out or delete. */
|
|
149
|
+
destructive?: boolean;
|
|
150
|
+
onConfirm: () => void;
|
|
151
|
+
/** Called by the cancel button, the Android back button and Escape on web. */
|
|
152
|
+
onCancel: () => void;
|
|
153
|
+
testID?: string;
|
|
154
|
+
/**
|
|
155
|
+
* Shows a spinner in the confirm button while the app runs the action, disables both
|
|
156
|
+
* buttons and ignores back and Escape until it is cleared.
|
|
157
|
+
*/
|
|
158
|
+
confirmLoading?: boolean;
|
|
159
|
+
/** Accessible name of the confirm spinner. Defaults to "Loading". */
|
|
160
|
+
confirmLoadingLabel?: string;
|
|
161
|
+
/** A destructive line above the buttons, e.g. when the action failed. Announced as an alert. */
|
|
162
|
+
error?: string | null;
|
|
163
|
+
}
|
|
164
|
+
/** Controlled confirm dialog over a scrim, with cancel and confirm buttons. */
|
|
165
|
+
declare function AlertDialog({ open, title, description, confirmLabel, cancelLabel, destructive, onConfirm, onCancel, testID, confirmLoading, confirmLoadingLabel, error, }: AlertDialogProps): react_jsx_runtime.JSX.Element;
|
|
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
|
+
interface AppBarAction {
|
|
207
|
+
/** Visible text, or the accessibility label when `icon` is set. */
|
|
208
|
+
label: string;
|
|
209
|
+
onPress: () => void;
|
|
210
|
+
/** Ionicons name. When set, the action shows only this icon. */
|
|
211
|
+
icon?: IconName;
|
|
212
|
+
/** Dims the action and blocks presses, e.g. refresh while a refresh runs. */
|
|
213
|
+
disabled?: boolean;
|
|
214
|
+
testID?: string;
|
|
215
|
+
}
|
|
216
|
+
interface AppBarProps {
|
|
217
|
+
/** Screen title, shown bold on the left. */
|
|
218
|
+
title: string;
|
|
219
|
+
/** Shows a back arrow left of the title when set. */
|
|
220
|
+
onBack?: () => void;
|
|
221
|
+
/** Accessibility label of the back arrow. Defaults to "Back". */
|
|
222
|
+
backLabel?: string;
|
|
223
|
+
/** One action on the right, shown as text or as an icon. */
|
|
224
|
+
action?: AppBarAction;
|
|
225
|
+
testID?: string;
|
|
226
|
+
/** Ionicons name drawn in the primary color before the title, e.g. a section's accent glyph. */
|
|
227
|
+
icon?: IconName;
|
|
228
|
+
}
|
|
229
|
+
/**
|
|
230
|
+
* Top bar of a screen: optional back arrow, optional accent icon, title, and one text or
|
|
231
|
+
* icon action.
|
|
232
|
+
*/
|
|
233
|
+
declare function AppBar({ title, onBack, backLabel, action, testID, icon, }: AppBarProps): react_jsx_runtime.JSX.Element;
|
|
234
|
+
|
|
235
|
+
type BannerTone = "neutral" | "destructive";
|
|
236
|
+
interface BannerProps {
|
|
237
|
+
message: string;
|
|
238
|
+
/** neutral: secondary fill; destructive: destructive fill, announced as an alert. Defaults to neutral. */
|
|
239
|
+
tone?: BannerTone;
|
|
240
|
+
/** Ionicons name shown before the message. */
|
|
241
|
+
icon?: IconName;
|
|
242
|
+
testID?: string;
|
|
243
|
+
}
|
|
244
|
+
/** Full-width notice strip, e.g. an offline notice or a send error above the composer. */
|
|
245
|
+
declare function Banner({ message, tone, icon, testID, }: BannerProps): react_jsx_runtime.JSX.Element;
|
|
246
|
+
|
|
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
|
+
/** A text button at the end of the sheet's title row, such as Reset or Done. */
|
|
276
|
+
interface BottomSheetAction {
|
|
277
|
+
label: string;
|
|
278
|
+
onPress: () => void;
|
|
279
|
+
/** `primary` fills the button; `ghost` is text only. Defaults to `ghost`. */
|
|
280
|
+
variant?: "primary" | "ghost";
|
|
281
|
+
disabled?: boolean;
|
|
282
|
+
testID?: string;
|
|
283
|
+
}
|
|
284
|
+
/** `sheet`: always a bottom sheet; `dialog`: a centered card on windows 768px and wider. */
|
|
285
|
+
type BottomSheetPresentation = "sheet" | "dialog";
|
|
286
|
+
interface BottomSheetProps {
|
|
287
|
+
/** Shows the sheet. The app owns this state. */
|
|
288
|
+
open: boolean;
|
|
289
|
+
/** Called by the backdrop, a drag below the lowest snap height, the Android back button and Escape on web. */
|
|
290
|
+
onDismiss: () => void;
|
|
291
|
+
/** Heading at the top of the sheet; also the dialog's accessible name. */
|
|
292
|
+
title: string;
|
|
293
|
+
/** Sheet content: design-system organisms such as ListSections or a FormSection. Scrolls inside the sheet. */
|
|
294
|
+
children: ReactNode;
|
|
295
|
+
/**
|
|
296
|
+
* Heights the sheet rests at, ascending, as fractions of the window height (0.1 to 1),
|
|
297
|
+
* e.g. [0.4, 0.9]. Dragging the handle moves between them; `initialSnap` and
|
|
298
|
+
* `onSnapChange` index this ascending list. Defaults to [0.5].
|
|
299
|
+
*/
|
|
300
|
+
snapPoints?: number[];
|
|
301
|
+
/** Index into `snapPoints` the sheet opens at. Defaults to 0. */
|
|
302
|
+
initialSnap?: number;
|
|
303
|
+
/** Called with the new index when a drag settles on another snap height. */
|
|
304
|
+
onSnapChange?: (index: number) => void;
|
|
305
|
+
/** Accessible name of the backdrop button. Defaults to "Close". */
|
|
306
|
+
dismissLabel?: string;
|
|
307
|
+
testID?: string;
|
|
308
|
+
/** Muted line under the title, e.g. the item the sheet is about. */
|
|
309
|
+
subtitle?: string;
|
|
310
|
+
/** Up to two text buttons at the end of the title row, e.g. Reset and Done. */
|
|
311
|
+
actions?: BottomSheetAction[];
|
|
312
|
+
/**
|
|
313
|
+
* `dialog` shows a centered card sized to its content on wide windows (768px and up),
|
|
314
|
+
* e.g. a form on wide web; narrower windows keep the sheet. Defaults to `sheet`.
|
|
315
|
+
*/
|
|
316
|
+
presentation?: BottomSheetPresentation;
|
|
317
|
+
}
|
|
318
|
+
/**
|
|
319
|
+
* Controlled modal sheet that slides up from the bottom over a fading scrim: a drag
|
|
320
|
+
* handle, a title and a scrolling content slot, resting at one or more snap heights.
|
|
321
|
+
* Optional subtitle and header actions; `presentation: "dialog"` centers it as a card on
|
|
322
|
+
* wide windows. Content stays mounted until the closing animation ends.
|
|
323
|
+
*/
|
|
324
|
+
declare function BottomSheet({ open, onDismiss, title, children, snapPoints, initialSnap, onSnapChange, dismissLabel, testID, subtitle, actions, presentation, }: BottomSheetProps): react_jsx_runtime.JSX.Element;
|
|
325
|
+
|
|
326
|
+
interface BrandMarkProps {
|
|
327
|
+
/** Product name, shown as the wordmark. */
|
|
328
|
+
name: string;
|
|
329
|
+
/** One short line under the name. */
|
|
330
|
+
tagline?: string;
|
|
331
|
+
testID?: string;
|
|
332
|
+
/** Ionicons glyph on a 64px primary rounded tile above the name, for an app without logo artwork. */
|
|
333
|
+
icon?: IconName;
|
|
334
|
+
/**
|
|
335
|
+
* Slot for the app's logo artwork only (its SVG component or image), drawn in a 64px box
|
|
336
|
+
* above the name and hidden from screen readers (the name is the header). Wins over `icon`.
|
|
337
|
+
*/
|
|
338
|
+
logo?: ReactNode;
|
|
339
|
+
}
|
|
340
|
+
/** Product wordmark with an optional logo or icon tile above it and a tagline, centered. */
|
|
341
|
+
declare function BrandMark({ name, tagline, testID, icon, logo, }: BrandMarkProps): react_jsx_runtime.JSX.Element;
|
|
342
|
+
|
|
343
|
+
/** An icon button shown between the input and Send, such as a voice-mode button. */
|
|
344
|
+
interface ComposerAccessory {
|
|
345
|
+
/** Ionicons name. */
|
|
346
|
+
icon: IconName;
|
|
347
|
+
/** Accessible name of the button. */
|
|
348
|
+
label: string;
|
|
349
|
+
onPress: () => void;
|
|
350
|
+
testID?: string;
|
|
351
|
+
}
|
|
352
|
+
interface ComposerProps {
|
|
353
|
+
/** Current text; the composer is controlled. */
|
|
354
|
+
value: string;
|
|
355
|
+
onChangeText: (text: string) => void;
|
|
356
|
+
/** Called with the current text when Send is pressed (or Enter on web). The app clears `value`. */
|
|
357
|
+
onSend: (text: string) => void;
|
|
358
|
+
placeholder: string;
|
|
359
|
+
/** Blocks typing and sending. */
|
|
360
|
+
disabled?: boolean;
|
|
361
|
+
/** Accessible name of the Send button. Defaults to "Send". */
|
|
362
|
+
sendLabel?: string;
|
|
363
|
+
/** Optional icon button between the input and Send. */
|
|
364
|
+
accessory?: ComposerAccessory;
|
|
365
|
+
/** Adds the bottom safe-area inset to the bottom padding. Set false when a parent already pads it. Defaults to true. */
|
|
366
|
+
safeAreaBottom?: boolean;
|
|
367
|
+
inputTestID?: string;
|
|
368
|
+
sendTestID?: string;
|
|
369
|
+
testID?: string;
|
|
370
|
+
}
|
|
371
|
+
/** Message input bar: multiline input, optional accessory icon button and a Send icon button. */
|
|
372
|
+
declare function Composer({ value, onChangeText, onSend, placeholder, disabled, sendLabel, accessory, safeAreaBottom, inputTestID, sendTestID, testID, }: ComposerProps): react_jsx_runtime.JSX.Element;
|
|
373
|
+
|
|
374
|
+
/** A quick-pick button beside the field, e.g. "Today". */
|
|
375
|
+
interface DateFieldShortcut {
|
|
376
|
+
label: string;
|
|
377
|
+
/** Fills the button while the field holds this date. */
|
|
378
|
+
selected?: boolean;
|
|
379
|
+
onPress: () => void;
|
|
380
|
+
testID?: string;
|
|
381
|
+
}
|
|
382
|
+
interface DateFieldProps {
|
|
383
|
+
/** The chosen date, already formatted by the app, e.g. "Nov 25, 2026". */
|
|
384
|
+
valueLabel?: string;
|
|
385
|
+
/** Shown muted while there is no `valueLabel`, e.g. "Choose a date". */
|
|
386
|
+
placeholder: string;
|
|
387
|
+
/** Visible label above the field. */
|
|
388
|
+
label?: string;
|
|
389
|
+
/** Opens the app's date picker (the native picker stays in the app). */
|
|
390
|
+
onPress: () => void;
|
|
391
|
+
/** Inline error under the field; also outlines it in destructive. */
|
|
392
|
+
error?: string | null;
|
|
393
|
+
disabled?: boolean;
|
|
394
|
+
testID?: string;
|
|
395
|
+
/**
|
|
396
|
+
* Quick-pick buttons beside the field, e.g. "Today", "Yesterday" and "No date". They
|
|
397
|
+
* wrap under the field when the row is too narrow for both (the field keeps 160px).
|
|
398
|
+
*/
|
|
399
|
+
shortcuts?: DateFieldShortcut[];
|
|
400
|
+
/** Announces the field as expanded while the app shows a calendar under it. */
|
|
401
|
+
expanded?: boolean;
|
|
402
|
+
}
|
|
403
|
+
/**
|
|
404
|
+
* Read-only, pressable date field: a calendar icon and the formatted date (or a muted
|
|
405
|
+
* placeholder), with optional quick-pick buttons beside it (or under it when narrow). The app opens its own date
|
|
406
|
+
* picker (or an inline MonthCalendar, announced with `expanded`) on press.
|
|
407
|
+
*/
|
|
408
|
+
declare function DateField({ valueLabel, placeholder, label, onPress, error, disabled, testID, shortcuts, expanded, }: DateFieldProps): react_jsx_runtime.JSX.Element;
|
|
409
|
+
|
|
410
|
+
/** Read-only star rating under the subtitle, with an optional muted caption beside it. */
|
|
411
|
+
interface DetailHeaderRating {
|
|
412
|
+
/** Rating from 0 to `max`; halves show as half stars. */
|
|
413
|
+
value: number;
|
|
414
|
+
/** Number of stars. Defaults to 5. */
|
|
415
|
+
max?: number;
|
|
416
|
+
/** Accessible name of the rating, e.g. "Rating". */
|
|
417
|
+
label: string;
|
|
418
|
+
/** Muted text after the stars, e.g. what the rating means. */
|
|
419
|
+
caption?: string;
|
|
420
|
+
}
|
|
421
|
+
/** An on/off icon toggle beside the title, e.g. save or follow. */
|
|
422
|
+
interface DetailHeaderAction {
|
|
423
|
+
/** Ionicons name shown while off, e.g. "bookmark-outline". */
|
|
424
|
+
icon: IconName;
|
|
425
|
+
/** Ionicons name shown while on, e.g. "bookmark". Defaults to `icon`. */
|
|
426
|
+
activeIcon?: IconName;
|
|
427
|
+
/** Accessible name of the toggle. */
|
|
428
|
+
label: string;
|
|
429
|
+
active: boolean;
|
|
430
|
+
/** Called with the next state when pressed. */
|
|
431
|
+
onChange: (next: boolean) => void;
|
|
432
|
+
testID?: string;
|
|
433
|
+
}
|
|
434
|
+
/** `lg`: 30px title for a full detail screen; `md`: 24px title for a card or panel. */
|
|
435
|
+
type DetailHeaderSize = "lg" | "md";
|
|
436
|
+
interface DetailHeaderProps {
|
|
437
|
+
title: string;
|
|
438
|
+
/** Muted line under the title, e.g. a place and a category. */
|
|
439
|
+
subtitle?: string;
|
|
440
|
+
rating?: DetailHeaderRating;
|
|
441
|
+
/** Icon toggle at the end of the title row. */
|
|
442
|
+
action?: DetailHeaderAction;
|
|
443
|
+
/** Shows a close button at the end of the title row, e.g. in a floating panel. */
|
|
444
|
+
onClose?: () => void;
|
|
445
|
+
/** Accessible name of the close button. Defaults to "Close". */
|
|
446
|
+
closeLabel?: string;
|
|
447
|
+
/** Defaults to `lg`. */
|
|
448
|
+
size?: DetailHeaderSize;
|
|
449
|
+
testID?: string;
|
|
450
|
+
}
|
|
451
|
+
/**
|
|
452
|
+
* Title block of a detail screen or panel: a display-face title, a muted subtitle, a
|
|
453
|
+
* read-only star rating with a caption, and an icon toggle (and optional close button)
|
|
454
|
+
* at the end of the title row.
|
|
455
|
+
*/
|
|
456
|
+
declare function DetailHeader({ title, subtitle, rating, action, onClose, closeLabel, size, testID, }: DetailHeaderProps): react_jsx_runtime.JSX.Element;
|
|
457
|
+
|
|
458
|
+
interface SuggestionChipsItem {
|
|
459
|
+
label: string;
|
|
460
|
+
/** Called when the chip is pressed. A chip without it (e.g. an active filter that can only be removed) is plain text. */
|
|
461
|
+
onPress?: () => void;
|
|
462
|
+
/** Adds a remove button at the chip's end, e.g. to clear an active filter. */
|
|
463
|
+
onRemove?: () => void;
|
|
464
|
+
/** Accessible name of the remove button. Defaults to "Remove <label>". */
|
|
465
|
+
removeLabel?: string;
|
|
466
|
+
testID?: string;
|
|
467
|
+
}
|
|
468
|
+
/** `wrap`: chips wrap and center; `scroll`: one start-aligned row that scrolls sideways. */
|
|
469
|
+
type SuggestionChipsLayout = "wrap" | "scroll";
|
|
470
|
+
interface SuggestionChipsProps {
|
|
471
|
+
/** One chip per item, in order. */
|
|
472
|
+
items: SuggestionChipsItem[];
|
|
473
|
+
/** Defaults to `wrap`. */
|
|
474
|
+
layout?: SuggestionChipsLayout;
|
|
475
|
+
testID?: string;
|
|
476
|
+
}
|
|
477
|
+
/**
|
|
478
|
+
* Fully rounded chips on the secondary color that wrap and center, or scroll in one row.
|
|
479
|
+
* A chip can be pressed, removed with a trailing close button, or both.
|
|
480
|
+
*/
|
|
481
|
+
declare function SuggestionChips({ items, layout, testID, }: SuggestionChipsProps): react_jsx_runtime.JSX.Element;
|
|
482
|
+
|
|
483
|
+
/** A call to action under the text, e.g. "Add the first item". */
|
|
484
|
+
interface EmptyStateAction {
|
|
485
|
+
label: string;
|
|
486
|
+
onPress: () => void;
|
|
487
|
+
testID?: string;
|
|
488
|
+
}
|
|
489
|
+
/**
|
|
490
|
+
* `screen`: centered, large icon, fills an empty screen; `inline`: compact dashed card
|
|
491
|
+
* 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.
|
|
493
|
+
*/
|
|
494
|
+
type EmptyStateVariant = "screen" | "inline" | "card";
|
|
495
|
+
interface EmptyStateProps {
|
|
496
|
+
/** Ionicons name: large and muted above the title (`screen`), or in the icon tile (`card`). */
|
|
497
|
+
icon?: IconName;
|
|
498
|
+
title: string;
|
|
499
|
+
/** Muted line under the title. */
|
|
500
|
+
description?: string;
|
|
501
|
+
/** Tappable starter prompts shown as SuggestionChips (`screen` only). */
|
|
502
|
+
suggestions?: SuggestionChipsItem[];
|
|
503
|
+
/** Filled button under the text (`screen` and `card`). */
|
|
504
|
+
primaryAction?: EmptyStateAction;
|
|
505
|
+
/** Text button after the primary action (`screen` and `card`). */
|
|
506
|
+
secondaryAction?: EmptyStateAction;
|
|
507
|
+
/** Defaults to `screen`. */
|
|
508
|
+
variant?: EmptyStateVariant;
|
|
509
|
+
testID?: string;
|
|
510
|
+
/** Shows a spinner in place of the icon while something is checked (`screen` and `card`). */
|
|
511
|
+
loading?: boolean;
|
|
512
|
+
/** Accessible name of the spinner. Defaults to "Loading". */
|
|
513
|
+
loadingLabel?: string;
|
|
514
|
+
}
|
|
515
|
+
/**
|
|
516
|
+
* Empty state: a centered screen with a large icon (or a spinner while loading), title,
|
|
517
|
+
* optional description, suggestion chips and calls to action; a compact dashed card inside
|
|
518
|
+
* a section; or a tinted card with an icon tile and small actions.
|
|
519
|
+
*/
|
|
520
|
+
declare function EmptyState({ icon, title, description, suggestions, primaryAction, secondaryAction, variant, testID, loading, loadingLabel, }: EmptyStateProps): react_jsx_runtime.JSX.Element;
|
|
521
|
+
|
|
522
|
+
/** Small read-only star rating at the end of the title line. */
|
|
523
|
+
interface EntryCardRating {
|
|
524
|
+
value: number;
|
|
525
|
+
/** Number of stars. Defaults to 5. */
|
|
526
|
+
max?: number;
|
|
527
|
+
/** Accessible name of the rating, e.g. "Rating". */
|
|
528
|
+
label: string;
|
|
529
|
+
}
|
|
530
|
+
/** A small text button under the card's content, e.g. "Delete". */
|
|
531
|
+
interface EntryCardAction {
|
|
532
|
+
label: string;
|
|
533
|
+
onPress: () => void;
|
|
534
|
+
/** `destructive` colors the label. Defaults to `default`. */
|
|
535
|
+
tone?: "default" | "destructive";
|
|
536
|
+
testID?: string;
|
|
537
|
+
}
|
|
538
|
+
interface EntryCardProps {
|
|
539
|
+
/** First line, e.g. a date. */
|
|
540
|
+
title: string;
|
|
541
|
+
rating?: EntryCardRating;
|
|
542
|
+
/** Muted text under the title, cut to two lines. */
|
|
543
|
+
body?: string;
|
|
544
|
+
/** Image URIs shown as a thumbnail strip under the text. */
|
|
545
|
+
images?: string[];
|
|
546
|
+
/** Called with the pressed thumbnail's index, e.g. to open an ImageViewer there. */
|
|
547
|
+
onImagePress?: (index: number) => void;
|
|
548
|
+
/** Thumbnail names are "<imageLabel> <n>". Defaults to "Image". */
|
|
549
|
+
imageLabel?: string;
|
|
550
|
+
/** Makes the title, rating and body pressable, e.g. to edit the entry. */
|
|
551
|
+
onPress?: () => void;
|
|
552
|
+
/** Accessible name of the pressable part. Defaults to its visible text. */
|
|
553
|
+
pressLabel?: string;
|
|
554
|
+
/** Small text buttons in a row under the content. */
|
|
555
|
+
actions?: EntryCardAction[];
|
|
556
|
+
testID?: string;
|
|
557
|
+
/** Muted meta line under the title, cut to one line, e.g. a place and a date. */
|
|
558
|
+
subtitle?: string;
|
|
559
|
+
}
|
|
560
|
+
/**
|
|
561
|
+
* One logged entry in a bordered card: a title line with a small star rating, an optional
|
|
562
|
+
* one-line meta subtitle, a two-line
|
|
563
|
+
* muted body, a strip of image thumbnails and small text actions. The text part can be
|
|
564
|
+
* pressable, e.g. to edit the entry.
|
|
565
|
+
*/
|
|
566
|
+
declare function EntryCard({ title, rating, body, images, onImagePress, imageLabel, onPress, pressLabel, actions, testID, subtitle, }: EntryCardProps): react_jsx_runtime.JSX.Element;
|
|
567
|
+
|
|
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
|
+
interface FilterChipGroupOption<T extends string = string> {
|
|
592
|
+
value: T;
|
|
593
|
+
label: string;
|
|
594
|
+
/** Ionicons name shown before the label. */
|
|
595
|
+
icon?: IconName;
|
|
596
|
+
}
|
|
597
|
+
/** A trailing ghost chip that asks the app to add an option, e.g. "Add". */
|
|
598
|
+
interface FilterChipGroupAddAction {
|
|
599
|
+
label: string;
|
|
600
|
+
onPress: () => void;
|
|
601
|
+
testID?: string;
|
|
602
|
+
}
|
|
603
|
+
/** `wrap`: chips wrap onto new lines; `scroll`: one row that scrolls sideways. */
|
|
604
|
+
type FilterChipGroupLayout = "wrap" | "scroll";
|
|
605
|
+
/** Props shared by the single- and multi-select forms. */
|
|
606
|
+
interface FilterChipGroupBaseProps<T extends string = string> {
|
|
607
|
+
/** Chips in display order. */
|
|
608
|
+
options: FilterChipGroupOption<T>[];
|
|
609
|
+
/** Accessible name of the group, e.g. "Language". */
|
|
610
|
+
accessibilityLabel?: string;
|
|
611
|
+
testID?: string;
|
|
612
|
+
/** Defaults to `wrap`. */
|
|
613
|
+
layout?: FilterChipGroupLayout;
|
|
614
|
+
/** Optional ghost chip after the options, e.g. to add a category. */
|
|
615
|
+
addAction?: FilterChipGroupAddAction;
|
|
616
|
+
/**
|
|
617
|
+
* More chip groups in the same row after this one, each after a thin vertical divider,
|
|
618
|
+
* e.g. a multi-select group followed by a single-select group in one scroll row.
|
|
619
|
+
*/
|
|
620
|
+
sections?: FilterChipGroupSection[];
|
|
621
|
+
/** Visible label above the chips, as on a form field; also the group's name when `accessibilityLabel` is unset. */
|
|
622
|
+
label?: string;
|
|
623
|
+
/** Inline error under the chips, announced as an alert (testID "<testID>-error"). */
|
|
624
|
+
error?: string | null;
|
|
625
|
+
}
|
|
626
|
+
/** Single select (default): one chip is always selected. Radio-group semantics. */
|
|
627
|
+
interface FilterChipGroupSingleProps<T extends string = string> extends FilterChipGroupBaseProps<T> {
|
|
628
|
+
multiple?: false;
|
|
629
|
+
/** Value of the selected chip. */
|
|
630
|
+
value: T;
|
|
631
|
+
onChange: (value: T) => void;
|
|
632
|
+
}
|
|
633
|
+
/** Multi select: any number of chips, including none. Checkbox semantics. */
|
|
634
|
+
interface FilterChipGroupMultipleProps<T extends string = string> extends FilterChipGroupBaseProps<T> {
|
|
635
|
+
multiple: true;
|
|
636
|
+
/** Values of the selected chips. */
|
|
637
|
+
values: T[];
|
|
638
|
+
/** Called with the new selection, in option order. */
|
|
639
|
+
onChange: (values: T[]) => void;
|
|
640
|
+
}
|
|
641
|
+
type FilterChipGroupProps<T extends string = string> = FilterChipGroupSingleProps<T> | FilterChipGroupMultipleProps<T>;
|
|
642
|
+
/** A further group in the same row: its own options, selection mode, name and testID. */
|
|
643
|
+
type FilterChipGroupSection = Omit<FilterChipGroupSingleProps, "layout" | "addAction" | "sections" | "label" | "error"> | Omit<FilterChipGroupMultipleProps, "layout" | "addAction" | "sections" | "label" | "error">;
|
|
644
|
+
/**
|
|
645
|
+
* Chips that wrap or scroll in one row; selected chips fill with primary. Single select
|
|
646
|
+
* by default (radio group); `multiple` toggles chips independently (checkboxes). More
|
|
647
|
+
* groups can share the row through `sections`, split by vertical dividers.
|
|
648
|
+
*/
|
|
649
|
+
declare function FilterChipGroup<T extends string = string>(props: FilterChipGroupProps<T>): react_jsx_runtime.JSX.Element;
|
|
650
|
+
|
|
651
|
+
/** The card's full-width primary button, such as "Directions" or "Open". */
|
|
652
|
+
interface FloatingCardAction {
|
|
653
|
+
label: string;
|
|
654
|
+
onPress: () => void;
|
|
655
|
+
testID?: string;
|
|
656
|
+
}
|
|
657
|
+
/** Small read-only star rating under the text, with an optional muted caption. */
|
|
658
|
+
interface FloatingCardRating {
|
|
659
|
+
value: number;
|
|
660
|
+
/** Number of stars. Defaults to 5. */
|
|
661
|
+
max?: number;
|
|
662
|
+
/** Accessible name of the rating, e.g. "Rating". */
|
|
663
|
+
label: string;
|
|
664
|
+
/** Muted text after the stars, e.g. what the rating means. */
|
|
665
|
+
caption?: string;
|
|
666
|
+
}
|
|
667
|
+
interface FloatingCardProps {
|
|
668
|
+
title: string;
|
|
669
|
+
/** Muted line under the title, e.g. the item's category. */
|
|
670
|
+
subtitle?: string;
|
|
671
|
+
/** Small muted line under the subtitle, e.g. a distance, a rating or opening hours. */
|
|
672
|
+
meta?: string;
|
|
673
|
+
/** Image URI shown as a square thumbnail at the start of the card. */
|
|
674
|
+
thumbnailUri?: string;
|
|
675
|
+
/** Makes the title area pressable, e.g. to open the item's detail screen. */
|
|
676
|
+
onPress?: () => void;
|
|
677
|
+
/** Full-width primary button under the text. */
|
|
678
|
+
action?: FloatingCardAction;
|
|
679
|
+
/** Shows a close button in the top-right corner. */
|
|
680
|
+
onClose?: () => void;
|
|
681
|
+
/** Accessible name of the close button. Defaults to "Close". */
|
|
682
|
+
closeLabel?: string;
|
|
683
|
+
testID?: string;
|
|
684
|
+
/** Star rating on its own line under the text. */
|
|
685
|
+
rating?: FloatingCardRating;
|
|
686
|
+
/** Small status pill after the rating, e.g. "Saved". */
|
|
687
|
+
badge?: string;
|
|
688
|
+
/** testID of the status pill. */
|
|
689
|
+
badgeTestID?: string;
|
|
690
|
+
/**
|
|
691
|
+
* Image URIs shown as a swipeable, rounded hero across the top of the card (an
|
|
692
|
+
* ImageCarousel) instead of the square thumbnail; `null` draws a placeholder for an
|
|
693
|
+
* image that is still loading.
|
|
694
|
+
*/
|
|
695
|
+
images?: (string | null)[];
|
|
696
|
+
/** Called with the pressed hero image's index, e.g. to open an ImageViewer there. */
|
|
697
|
+
onImagePress?: (index: number) => void;
|
|
698
|
+
/** Hero image names are "<imageLabel> <n> of <total>". Defaults to "Image". */
|
|
699
|
+
imageLabel?: string;
|
|
700
|
+
/** Shown hero image, for a controlled hero (e.g. to load the next image lazily). */
|
|
701
|
+
imageIndex?: number;
|
|
702
|
+
/** Called with the new hero index after a swipe or a dot press. */
|
|
703
|
+
onImageIndexChange?: (index: number) => void;
|
|
704
|
+
}
|
|
705
|
+
/**
|
|
706
|
+
* Raised summary card that floats over a canvas or media, e.g. for a selected item:
|
|
707
|
+
* an optional thumbnail or swipeable image hero, title, subtitle and meta line, a primary action and a close
|
|
708
|
+
* button. Up to 420px wide; the parent (such as OverlayTemplate) positions it.
|
|
709
|
+
*/
|
|
710
|
+
declare function FloatingCard({ title, subtitle, meta, thumbnailUri, onPress, action, onClose, closeLabel, testID, rating, badge, badgeTestID, images, onImagePress, imageLabel, imageIndex, onImageIndexChange, }: FloatingCardProps): react_jsx_runtime.JSX.Element;
|
|
711
|
+
|
|
712
|
+
type InputProps = Pick<TextInputProps, "value" | "onChangeText" | "placeholder" | "secureTextEntry" | "keyboardType" | "inputMode" | "autoCapitalize" | "autoComplete" | "returnKeyType" | "onSubmitEditing" | "maxLength" | "autoFocus" | "accessibilityLabel" | "testID" | "autoCorrect" | "numberOfLines" | "onKeyPress"> & {
|
|
713
|
+
/** False while the form is busy; dims an `outline` or `multiline` input. */
|
|
714
|
+
editable: boolean;
|
|
715
|
+
/**
|
|
716
|
+
* `outline`: a 44px bordered box on its own; `bare`: no box, fills a FieldFrame row;
|
|
717
|
+
* `multiline`: a bordered box that grows from 40px to 128px with its text. Defaults to `outline`.
|
|
718
|
+
*/
|
|
719
|
+
variant?: "outline" | "bare" | "multiline";
|
|
720
|
+
/** Outlines an `outline` or `multiline` input in the destructive color. */
|
|
721
|
+
invalid?: boolean;
|
|
722
|
+
/**
|
|
723
|
+
* Reports focus and blur. Set on a `bare` input whose frame draws the focus indicator:
|
|
724
|
+
* the input then drops its own browser outline on web.
|
|
725
|
+
*/
|
|
726
|
+
onFocusChange?: (focused: boolean) => void;
|
|
727
|
+
};
|
|
728
|
+
|
|
729
|
+
/** One text field. `key` identifies it; the rest mirrors the input's props. */
|
|
730
|
+
type FormSectionField = Omit<InputProps, "editable" | "variant" | "inputMode" | "accessibilityLabel"> & {
|
|
731
|
+
key: string;
|
|
732
|
+
};
|
|
733
|
+
interface FormSectionAction {
|
|
734
|
+
label: string;
|
|
735
|
+
onPress: () => void;
|
|
736
|
+
testID?: string;
|
|
737
|
+
}
|
|
738
|
+
interface FormSectionProps {
|
|
739
|
+
fields: FormSectionField[];
|
|
740
|
+
/** Inline error shown above the submit button. */
|
|
741
|
+
error?: string | null;
|
|
742
|
+
errorTestID?: string;
|
|
743
|
+
/** Full-width primary button. */
|
|
744
|
+
submit: FormSectionAction & {
|
|
745
|
+
loading?: boolean;
|
|
746
|
+
disabled?: boolean;
|
|
747
|
+
};
|
|
748
|
+
/** Optional muted text link under the button, e.g. "Forgot password?". */
|
|
749
|
+
secondaryAction?: FormSectionAction;
|
|
750
|
+
}
|
|
751
|
+
/** Text fields, an inline error, a submit button with a loading state and an optional text link. */
|
|
752
|
+
declare function FormSection({ fields, error, errorTestID, submit, secondaryAction, }: FormSectionProps): react_jsx_runtime.JSX.Element;
|
|
753
|
+
|
|
754
|
+
interface ImageCarouselProps {
|
|
755
|
+
/**
|
|
756
|
+
* Image URIs in order; `null` draws a placeholder surface for an image that is not
|
|
757
|
+
* ready yet (e.g. its URL is still loading). Renders nothing when empty.
|
|
758
|
+
*/
|
|
759
|
+
uris: (string | null)[];
|
|
760
|
+
/** Index of the image shown. Leave it out to let the carousel track it. */
|
|
761
|
+
index?: number;
|
|
762
|
+
/** Called with the new index after a swipe or a dot press. */
|
|
763
|
+
onIndexChange?: (index: number) => void;
|
|
764
|
+
/** Small credit line per image, shown over its bottom-left corner, e.g. the author. */
|
|
765
|
+
credits?: (string | undefined)[];
|
|
766
|
+
/** Height in px. Defaults to 280. */
|
|
767
|
+
height?: number;
|
|
768
|
+
/** Rounds the corners, for a carousel inside a card. Defaults to false (edge to edge). */
|
|
769
|
+
rounded?: boolean;
|
|
770
|
+
/** Called with the pressed image's index, e.g. to open an ImageViewer there. */
|
|
771
|
+
onPress?: (index: number) => void;
|
|
772
|
+
/** Image names are "<imageLabel> <n> of <total>". Defaults to "Image". */
|
|
773
|
+
imageLabel?: string;
|
|
774
|
+
/** Page dots are named "<dotLabel> <image name>". Defaults to "Show". */
|
|
775
|
+
dotLabel?: string;
|
|
776
|
+
testID?: string;
|
|
777
|
+
/** Added to a placeholder's name: "<image name>, <placeholderLabel>". Defaults to "loading". */
|
|
778
|
+
placeholderLabel?: string;
|
|
779
|
+
}
|
|
780
|
+
/**
|
|
781
|
+
* Swipeable, paged row of full-width images with page dots and a per-image credit line,
|
|
782
|
+
* e.g. the hero of a detail screen. Controlled through `index` or self-tracking.
|
|
783
|
+
*/
|
|
784
|
+
declare function ImageCarousel({ uris, index, onIndexChange, credits, height, rounded, onPress, imageLabel, dotLabel, testID, placeholderLabel, }: ImageCarouselProps): react_jsx_runtime.JSX.Element | null;
|
|
785
|
+
|
|
786
|
+
/** `sm`: 72px square (strips, grids); `md`: 96px square with a visible add label. */
|
|
787
|
+
type ImagePickerTileSize = "sm" | "md";
|
|
788
|
+
interface ImagePickerTileProps {
|
|
789
|
+
/** The selected image. Without it the tile is an empty add slot. */
|
|
790
|
+
uri?: string;
|
|
791
|
+
/**
|
|
792
|
+
* Empty tile: asks the app to pick a image (the picker stays in the app). Selected tile:
|
|
793
|
+
* e.g. opens the image in an ImageViewer.
|
|
794
|
+
*/
|
|
795
|
+
onPress?: () => void;
|
|
796
|
+
/** Selected tile only: shows a round remove button in the corner. */
|
|
797
|
+
onRemove?: () => void;
|
|
798
|
+
/** Shows a spinner over the tile and disables it, e.g. while a image uploads. */
|
|
799
|
+
loading?: boolean;
|
|
800
|
+
disabled?: boolean;
|
|
801
|
+
size?: ImagePickerTileSize;
|
|
802
|
+
/** Name of the empty tile; shown under the camera icon on `md`. Defaults to "Add image". */
|
|
803
|
+
addLabel?: string;
|
|
804
|
+
/** Name of the selected image. Defaults to "Image". */
|
|
805
|
+
imageLabel?: string;
|
|
806
|
+
/** Name of the remove button. Defaults to "Remove image". */
|
|
807
|
+
removeLabel?: string;
|
|
808
|
+
testID?: string;
|
|
809
|
+
}
|
|
810
|
+
/**
|
|
811
|
+
* Square image slot: an empty dashed tile with a camera icon that asks the app to pick a
|
|
812
|
+
* image, or the selected image with an optional remove button. Image picking, cropping and
|
|
813
|
+
* uploads stay in the app (D9).
|
|
814
|
+
*/
|
|
815
|
+
declare function ImagePickerTile({ uri, onPress, onRemove, loading, disabled, size, addLabel, imageLabel, removeLabel, testID, }: ImagePickerTileProps): react_jsx_runtime.JSX.Element;
|
|
816
|
+
|
|
817
|
+
interface ImageStripProps {
|
|
818
|
+
/** Image URIs in order. */
|
|
819
|
+
uris: string[];
|
|
820
|
+
/** Called with the pressed image's index, e.g. to open an ImageViewer there. */
|
|
821
|
+
onPress?: (index: number) => void;
|
|
822
|
+
/**
|
|
823
|
+
* Shows at most this many images; the last one shown gets a "+N" overlay for the rest
|
|
824
|
+
* and reports its own index when pressed.
|
|
825
|
+
*/
|
|
826
|
+
maxVisible?: number;
|
|
827
|
+
/** Adds an add tile after the images that asks the app to pick more (D9). */
|
|
828
|
+
onAdd?: () => void;
|
|
829
|
+
/** Name of the add tile. Defaults to "Add image". */
|
|
830
|
+
addLabel?: string;
|
|
831
|
+
/** Image names are "<imageLabel> <n>". Defaults to "Image". */
|
|
832
|
+
imageLabel?: string;
|
|
833
|
+
testID?: string;
|
|
834
|
+
/** Adds a remove button to each image's corner; called with that image's index. */
|
|
835
|
+
onRemove?: (index: number) => void;
|
|
836
|
+
/** Remove buttons are named "<removeLabel> <imageLabel> <n>". Defaults to "Remove". */
|
|
837
|
+
removeLabel?: string;
|
|
838
|
+
}
|
|
839
|
+
/**
|
|
840
|
+
* Horizontal row of 72px image thumbnails with an optional "+N" overflow tile, remove
|
|
841
|
+
* buttons and an add tile. Scrolls sideways when the row is wider than the screen.
|
|
842
|
+
*/
|
|
843
|
+
declare function ImageStrip({ uris, onPress, maxVisible, onAdd, addLabel, imageLabel, testID, onRemove, removeLabel, }: ImageStripProps): react_jsx_runtime.JSX.Element;
|
|
844
|
+
|
|
845
|
+
interface ImageViewerProps {
|
|
846
|
+
/** Shows the viewer. The app owns this state. */
|
|
847
|
+
open: boolean;
|
|
848
|
+
/** Image URIs in order. */
|
|
849
|
+
uris: string[];
|
|
850
|
+
/** Index of the image shown. The app owns this state. */
|
|
851
|
+
index: number;
|
|
852
|
+
/** Called when a swipe or the previous/next buttons move to another image. */
|
|
853
|
+
onIndexChange: (index: number) => void;
|
|
854
|
+
/** Called by the close button, the Android back button and Escape on web. */
|
|
855
|
+
onClose: () => void;
|
|
856
|
+
/** Text under the image, e.g. the current image's caption. */
|
|
857
|
+
caption?: string;
|
|
858
|
+
/** Name of the close button. Defaults to "Close". */
|
|
859
|
+
closeLabel?: string;
|
|
860
|
+
/** Name of the previous button. Defaults to "Previous image". */
|
|
861
|
+
previousLabel?: string;
|
|
862
|
+
/** Name of the next button. Defaults to "Next image". */
|
|
863
|
+
nextLabel?: string;
|
|
864
|
+
/** Image names are "<imageLabel> <n>". Defaults to "Image". */
|
|
865
|
+
imageLabel?: string;
|
|
866
|
+
/** Accessible name of the viewer dialog. Defaults to "Images". */
|
|
867
|
+
label?: string;
|
|
868
|
+
testID?: string;
|
|
869
|
+
}
|
|
870
|
+
/**
|
|
871
|
+
* Full-screen image viewer over a near-black scrim: swipe between images (FlatList paging)
|
|
872
|
+
* or use the previous/next buttons, with a counter, a close button and an optional caption.
|
|
873
|
+
* The app controls `open` and `index`.
|
|
874
|
+
*/
|
|
875
|
+
declare function ImageViewer({ open, onClose, label, ...rest }: ImageViewerProps): react_jsx_runtime.JSX.Element;
|
|
876
|
+
|
|
877
|
+
type LabeledDividerTone = "neutral" | "accent";
|
|
878
|
+
interface LabeledDividerProps {
|
|
879
|
+
/** Centered text, such as a date or "New messages". */
|
|
880
|
+
label: string;
|
|
881
|
+
/** neutral: border lines and muted text; accent: primary lines and medium primary text. Defaults to neutral. */
|
|
882
|
+
tone?: LabeledDividerTone;
|
|
883
|
+
testID?: string;
|
|
884
|
+
}
|
|
885
|
+
/** A horizontal rule with a centered label: line, label, line. */
|
|
886
|
+
declare function LabeledDivider({ label, tone, testID, }: LabeledDividerProps): react_jsx_runtime.JSX.Element;
|
|
887
|
+
|
|
888
|
+
interface LegendItem {
|
|
889
|
+
/** What the marker means, e.g. "3 points". */
|
|
890
|
+
label: string;
|
|
891
|
+
/** Number of gold stars before the label, e.g. 3 for a three-star tier. */
|
|
892
|
+
rating?: number;
|
|
893
|
+
/** Ionicons name before the label, shown muted; drawn after the stars when both are set. */
|
|
894
|
+
icon?: IconName;
|
|
895
|
+
/** Spoken text when the stars or icon carry meaning, e.g. "Three stars: 3 points". */
|
|
896
|
+
accessibilityLabel?: string;
|
|
897
|
+
}
|
|
898
|
+
interface LegendProps {
|
|
899
|
+
/** Muted heading before the items, e.g. "Points". */
|
|
900
|
+
title?: string;
|
|
901
|
+
items: LegendItem[];
|
|
902
|
+
testID?: string;
|
|
903
|
+
}
|
|
904
|
+
/**
|
|
905
|
+
* Key that explains markers used elsewhere on the screen: an optional muted title, then
|
|
906
|
+
* items (gold stars or an icon, and a label) that wrap onto more lines when needed.
|
|
907
|
+
*/
|
|
908
|
+
declare function Legend({ title, items, testID }: LegendProps): react_jsx_runtime.JSX.Element;
|
|
909
|
+
|
|
910
|
+
/** Label color and role of a pressable row. */
|
|
911
|
+
type ListRowTone = "default" | "link" | "destructive";
|
|
912
|
+
/** Color of the value: `primary` highlights it, e.g. an incoming amount; `muted` plays it down. */
|
|
913
|
+
type ListRowValueTone = "default" | "primary" | "muted";
|
|
914
|
+
/**
|
|
915
|
+
* Color of the badge pill: `primary` (default) tinted, `muted` neutral, `destructive` an
|
|
916
|
+
* alert, `gold` a highlight such as a top tier (dark text on gold).
|
|
917
|
+
*/
|
|
918
|
+
type ListRowBadgeTone = "primary" | "muted" | "destructive" | "gold";
|
|
919
|
+
/**
|
|
920
|
+
* Where `actions` go: `end` (default) after the text on the same line; `below` on a second
|
|
921
|
+
* line under the text; `auto` below while the row is narrower than 400px, so the label keeps
|
|
922
|
+
* its room next to a badge and two buttons on phones.
|
|
923
|
+
*/
|
|
924
|
+
type ListRowActionsPlacement = "end" | "below" | "auto";
|
|
925
|
+
/** Read-only star rating at the end of the row. */
|
|
926
|
+
interface ListRowRating {
|
|
927
|
+
/** Rating from 0 to `max`; halves show as half stars. */
|
|
928
|
+
value: number;
|
|
929
|
+
/** Number of stars. Defaults to 5. */
|
|
930
|
+
max?: number;
|
|
931
|
+
/** Accessible name of the stars. Defaults to "Rating". */
|
|
932
|
+
label?: string;
|
|
933
|
+
}
|
|
934
|
+
/** A small muted status icon, e.g. a saved marker. */
|
|
935
|
+
interface ListRowIndicator {
|
|
936
|
+
icon: IconName;
|
|
937
|
+
/** Accessible name of the icon, e.g. "Saved". */
|
|
938
|
+
label: string;
|
|
939
|
+
}
|
|
940
|
+
/** Round initials avatar at the start of the row, e.g. for a person. */
|
|
941
|
+
interface ListRowAvatar {
|
|
942
|
+
/** Name whose initials fill the circle. */
|
|
943
|
+
name: string;
|
|
944
|
+
}
|
|
945
|
+
/** A small button at the end of the row, e.g. "Done". */
|
|
946
|
+
interface ListRowAction {
|
|
947
|
+
label: string;
|
|
948
|
+
onPress: () => void;
|
|
949
|
+
/** `primary`: filled; `outline`: bordered; `ghost`: text only. Defaults to `primary`. */
|
|
950
|
+
variant?: "primary" | "outline" | "ghost";
|
|
951
|
+
disabled?: boolean;
|
|
952
|
+
testID?: string;
|
|
953
|
+
/** Ionicons glyph before the label. */
|
|
954
|
+
icon?: IconName;
|
|
955
|
+
}
|
|
956
|
+
/** An on/off switch at the end of the row; the row label is its accessible name. */
|
|
957
|
+
interface ListRowToggle {
|
|
958
|
+
value: boolean;
|
|
959
|
+
onChange: (next: boolean) => void;
|
|
960
|
+
disabled?: boolean;
|
|
961
|
+
testID?: string;
|
|
962
|
+
}
|
|
963
|
+
interface ListRowProps {
|
|
964
|
+
label: string;
|
|
965
|
+
/** Muted second line under the label, e.g. a relation or a last date. */
|
|
966
|
+
subtitle?: string;
|
|
967
|
+
/** Initials avatar at the start of the row. */
|
|
968
|
+
avatar?: ListRowAvatar;
|
|
969
|
+
/** Text on the right, e.g. a version number or an amount. */
|
|
970
|
+
value?: string;
|
|
971
|
+
/** Color of `value`. Defaults to `default`. */
|
|
972
|
+
valueTone?: ListRowValueTone;
|
|
973
|
+
/** Muted footnote under `value`, e.g. what the amount means. */
|
|
974
|
+
valueCaption?: string;
|
|
975
|
+
valueTestID?: string;
|
|
976
|
+
/** Small pill on the right, e.g. a countdown such as "D-3". */
|
|
977
|
+
badge?: string;
|
|
978
|
+
badgeTestID?: string;
|
|
979
|
+
/** Up to two small buttons on the right. */
|
|
980
|
+
actions?: ListRowAction[];
|
|
981
|
+
/** On/off switch on the right, for settings. */
|
|
982
|
+
toggle?: ListRowToggle;
|
|
983
|
+
/** Color of `badge`. Defaults to `primary`. */
|
|
984
|
+
badgeTone?: ListRowBadgeTone;
|
|
985
|
+
/** Read-only star rating on the right, before the value. */
|
|
986
|
+
rating?: ListRowRating;
|
|
987
|
+
/** Small muted status icons on the right, before the badge. */
|
|
988
|
+
indicators?: ListRowIndicator[];
|
|
989
|
+
/** A total row: semibold label and a larger semibold value. */
|
|
990
|
+
emphasis?: boolean;
|
|
991
|
+
/** Makes the row (except its actions and toggle) pressable. */
|
|
992
|
+
onPress?: () => void;
|
|
993
|
+
/**
|
|
994
|
+
* Pressable rows only. `default`: foreground label, and a chevron when nothing else is on
|
|
995
|
+
* the right; `link`: primary label with the link role; `destructive`: destructive label.
|
|
996
|
+
*/
|
|
997
|
+
tone?: ListRowTone;
|
|
998
|
+
testID?: string;
|
|
999
|
+
/** Lines the subtitle may take before it ends with an ellipsis. Unset: no limit. */
|
|
1000
|
+
subtitleLines?: number;
|
|
1001
|
+
/** Where `actions` go. Defaults to `end`. */
|
|
1002
|
+
actionsPlacement?: ListRowActionsPlacement;
|
|
1003
|
+
/** Dims the row and blocks its press, actions and switch, e.g. while it is busy. */
|
|
1004
|
+
disabled?: boolean;
|
|
1005
|
+
}
|
|
1006
|
+
/**
|
|
1007
|
+
* One list row: a label (optionally with an initials avatar and a subtitle) and trailing
|
|
1008
|
+
* content — status icons, a badge, a star rating, a value, small action buttons or a
|
|
1009
|
+
* switch — and an emphasized total style, or a pressable
|
|
1010
|
+
* navigation, link or destructive row.
|
|
1011
|
+
*/
|
|
1012
|
+
declare function ListRow({ label, subtitle, avatar, value, valueTone, valueCaption, valueTestID, badge, badgeTestID, badgeTone, rating, indicators, emphasis, actions, toggle, onPress, tone, testID, subtitleLines, actionsPlacement, disabled, }: ListRowProps): react_jsx_runtime.JSX.Element;
|
|
1013
|
+
|
|
1014
|
+
/** A text action on the right of the section heading, such as "Show more". */
|
|
1015
|
+
interface ListSectionAction {
|
|
1016
|
+
/** Visible text, also the accessible name. */
|
|
1017
|
+
label: string;
|
|
1018
|
+
onPress: () => void;
|
|
1019
|
+
testID?: string;
|
|
1020
|
+
}
|
|
1021
|
+
/** `plain`: rows sit on the background; `card`: rows sit in a bordered card, divided by hairlines. */
|
|
1022
|
+
type ListSectionVariant = "plain" | "card";
|
|
1023
|
+
interface ListSectionProps {
|
|
1024
|
+
/** Section heading, e.g. a month or a category. Without it (and without `icon` and `action`) no heading row is drawn. */
|
|
1025
|
+
title?: string;
|
|
1026
|
+
/** Number shown after the heading, e.g. how many rows the section has. */
|
|
1027
|
+
count?: number;
|
|
1028
|
+
/** Muted line under the heading that explains the section. */
|
|
1029
|
+
description?: string;
|
|
1030
|
+
/** Optional text action right of the heading. */
|
|
1031
|
+
action?: ListSectionAction;
|
|
1032
|
+
/** The section's rows: ListRow, EmptyState or SkeletonList. */
|
|
1033
|
+
children: ReactNode;
|
|
1034
|
+
/** Muted footnote under the rows. */
|
|
1035
|
+
footer?: string;
|
|
1036
|
+
footerTestID?: string;
|
|
1037
|
+
testID?: string;
|
|
1038
|
+
/** Ionicons glyph in a tinted circle before the heading. */
|
|
1039
|
+
icon?: IconName;
|
|
1040
|
+
/** Text button under the rows, e.g. "Show more". */
|
|
1041
|
+
moreAction?: ListSectionAction;
|
|
1042
|
+
/** Defaults to `plain`. */
|
|
1043
|
+
variant?: ListSectionVariant;
|
|
1044
|
+
}
|
|
1045
|
+
/**
|
|
1046
|
+
* Titled group in a list: a muted heading (optionally with an icon and a count) with an
|
|
1047
|
+
* optional text action, its rows (plain or in a divided card), an optional show-more button
|
|
1048
|
+
* and an optional footnote.
|
|
1049
|
+
*/
|
|
1050
|
+
declare function ListSection({ title, count, description, action, children, footer, footerTestID, testID, icon, moreAction, variant, }: ListSectionProps): react_jsx_runtime.JSX.Element;
|
|
1051
|
+
|
|
1052
|
+
interface LiveCaptionProps {
|
|
1053
|
+
/** What the user is saying, updated live; small muted text, up to 3 lines. */
|
|
1054
|
+
input?: string;
|
|
1055
|
+
/** The reply; body text clamped to 6 lines. */
|
|
1056
|
+
response?: string;
|
|
1057
|
+
testID?: string;
|
|
1058
|
+
}
|
|
1059
|
+
/** Stacked, centered live transcript: the user's words above the reply. Keeps a 120px minimum height. */
|
|
1060
|
+
declare function LiveCaption({ input, response, testID }: LiveCaptionProps): react_jsx_runtime.JSX.Element;
|
|
1061
|
+
|
|
1062
|
+
type MessageBubbleRole = "user" | "assistant";
|
|
1063
|
+
interface MessageBubbleProps {
|
|
1064
|
+
/** Who wrote the message: user messages sit right on primary, assistant messages left on secondary. */
|
|
1065
|
+
role: MessageBubbleRole;
|
|
1066
|
+
/** Body slot: the app renders its own content here, such as markdown (D9). */
|
|
1067
|
+
children?: ReactNode;
|
|
1068
|
+
/** Plain-text body with the bubble's text style, used when `children` is absent. */
|
|
1069
|
+
text?: string;
|
|
1070
|
+
/** Shows the typing indicator inside the bubble when there is no body yet. */
|
|
1071
|
+
typing?: boolean;
|
|
1072
|
+
/** Accessible name of the typing indicator. Defaults to "Typing". */
|
|
1073
|
+
typingLabel?: string;
|
|
1074
|
+
/** Line under the bubble, such as a timestamp or "Sending…". */
|
|
1075
|
+
meta?: string;
|
|
1076
|
+
/** testID of the meta line, e.g. to assert a "Sending…" status in e2e tests. */
|
|
1077
|
+
metaTestID?: string;
|
|
1078
|
+
/** Marks the message as failed: destructive border and a retry line. */
|
|
1079
|
+
failed?: boolean;
|
|
1080
|
+
/** Called from the retry line of a failed message. */
|
|
1081
|
+
onRetry?: () => void;
|
|
1082
|
+
/** Text of the retry line. Defaults to "Failed — tap to retry". */
|
|
1083
|
+
retryLabel?: string;
|
|
1084
|
+
/** Long press on the bubble, e.g. to copy the message. */
|
|
1085
|
+
onLongPress?: () => void;
|
|
1086
|
+
testID?: string;
|
|
1087
|
+
}
|
|
1088
|
+
/** One chat message: a role-colored bubble with an app-owned body, optional meta line and failed state. */
|
|
1089
|
+
declare function MessageBubble({ role, children, text, typing, typingLabel, meta, metaTestID, failed, onRetry, retryLabel, onLongPress, testID, }: MessageBubbleProps): react_jsx_runtime.JSX.Element;
|
|
1090
|
+
|
|
1091
|
+
interface MessageListProps<T> {
|
|
1092
|
+
/** Rows, newest first: the list is inverted so index 0 sits at the bottom. */
|
|
1093
|
+
data: readonly T[];
|
|
1094
|
+
keyExtractor: (item: T, index: number) => string;
|
|
1095
|
+
/** Renders one row, usually a MessageBubble or LabeledDivider. */
|
|
1096
|
+
renderItem: ListRenderItem<T>;
|
|
1097
|
+
/** Called near the top (the oldest row), e.g. to load older messages. */
|
|
1098
|
+
onEndReached?: () => void;
|
|
1099
|
+
/** Shows a spinner above the oldest row while older rows load. */
|
|
1100
|
+
loadingMore?: boolean;
|
|
1101
|
+
/** Accessible name of the loading spinner. Defaults to "Loading more". */
|
|
1102
|
+
loadingMoreLabel?: string;
|
|
1103
|
+
onScroll?: (event: NativeSyntheticEvent<NativeScrollEvent>) => void;
|
|
1104
|
+
/**
|
|
1105
|
+
* Shown instead of the list while `data` is empty, centered in the list's area,
|
|
1106
|
+
* usually an EmptyState. Rendered outside the inverted FlatList so it is never
|
|
1107
|
+
* flipped or pinned to the bottom; `listRef` is unset while it shows.
|
|
1108
|
+
*/
|
|
1109
|
+
empty?: ReactNode;
|
|
1110
|
+
/** Ref to the underlying FlatList, e.g. for `scrollToOffset({ offset: 0 })` to jump to the newest row. */
|
|
1111
|
+
listRef?: Ref<FlatList<T>>;
|
|
1112
|
+
testID?: string;
|
|
1113
|
+
}
|
|
1114
|
+
/** Inverted message stream: newest row at the bottom, app-rendered rows, a loading-more spinner on top. */
|
|
1115
|
+
declare function MessageList<T>({ data, keyExtractor, renderItem, onEndReached, loadingMore, loadingMoreLabel, onScroll, listRef, empty, testID, }: MessageListProps<T>): react_jsx_runtime.JSX.Element;
|
|
1116
|
+
|
|
1117
|
+
interface MeterCardMeter {
|
|
1118
|
+
/** Identifies the meter in the list. */
|
|
1119
|
+
key: string;
|
|
1120
|
+
/** What is measured, e.g. "Weekly limit". */
|
|
1121
|
+
label: string;
|
|
1122
|
+
/** Share used, from 0 to 1. Values outside the range are clamped. */
|
|
1123
|
+
value: number;
|
|
1124
|
+
/** Muted line under the bar, e.g. "Resets in 2h". */
|
|
1125
|
+
caption?: string;
|
|
1126
|
+
testID?: string;
|
|
1127
|
+
}
|
|
1128
|
+
interface MeterCardProps {
|
|
1129
|
+
title: string;
|
|
1130
|
+
/** Muted text on the right of the title, e.g. a plan name or "Updated 3 min ago". */
|
|
1131
|
+
caption?: string;
|
|
1132
|
+
/** Ionicons name shown before the title. */
|
|
1133
|
+
icon?: IconName;
|
|
1134
|
+
/** Notice under the title row, e.g. why the numbers may be out of date. */
|
|
1135
|
+
message?: string;
|
|
1136
|
+
messageTestID?: string;
|
|
1137
|
+
/** May be empty when `message` explains why there is nothing to show. */
|
|
1138
|
+
meters: MeterCardMeter[];
|
|
1139
|
+
testID?: string;
|
|
1140
|
+
}
|
|
1141
|
+
/**
|
|
1142
|
+
* Card of quota or limit meters: a title row, then one labeled bar per meter with its
|
|
1143
|
+
* percentage and an optional caption. A meter at 90% or more turns destructive.
|
|
1144
|
+
*/
|
|
1145
|
+
declare function MeterCard({ title, caption, icon, message, messageTestID, meters, testID, }: MeterCardProps): react_jsx_runtime.JSX.Element;
|
|
1146
|
+
|
|
1147
|
+
/** Dot colors under a date: filled primary, hollow primary, muted or destructive. */
|
|
1148
|
+
type MonthCalendarDotTone = "primary" | "outline" | "muted" | "destructive";
|
|
1149
|
+
interface MonthCalendarProps {
|
|
1150
|
+
/** Shown month as "YYYY-MM"; the calendar is controlled. */
|
|
1151
|
+
month: string;
|
|
1152
|
+
/** Called with the new "YYYY-MM" by the previous and next buttons. */
|
|
1153
|
+
onMonthChange: (month: string) => void;
|
|
1154
|
+
/** Selected date(s) as "YYYY-MM-DD". */
|
|
1155
|
+
selected?: string | string[] | null;
|
|
1156
|
+
/** Called with the pressed "YYYY-MM-DD". The app decides what selection becomes. */
|
|
1157
|
+
onSelectDate?: (date: string) => void;
|
|
1158
|
+
/** Dots under dates, keyed by "YYYY-MM-DD"; up to three are shown per date. */
|
|
1159
|
+
marks?: Record<string, MonthCalendarDotTone[]>;
|
|
1160
|
+
/** Today's "YYYY-MM-DD", ringed. The app passes it so the calendar stays pure. */
|
|
1161
|
+
today?: string;
|
|
1162
|
+
/** Earliest selectable "YYYY-MM-DD"; earlier days and months are disabled. */
|
|
1163
|
+
minDate?: string;
|
|
1164
|
+
/** Latest selectable "YYYY-MM-DD"; later days and months are disabled. */
|
|
1165
|
+
maxDate?: string;
|
|
1166
|
+
/** First column: 0 = Sunday (default), 1 = Monday. */
|
|
1167
|
+
weekStartsOn?: 0 | 1;
|
|
1168
|
+
/** Seven weekday headers starting with Sunday. Defaults to English initials. */
|
|
1169
|
+
weekdayLabels?: string[];
|
|
1170
|
+
/** Twelve month names, January first, for the title and day names. Defaults to English. */
|
|
1171
|
+
monthNames?: string[];
|
|
1172
|
+
/** Title for the shown month. Defaults to "<Month> <year>". */
|
|
1173
|
+
formatTitle?: (year: number, monthIndex: number) => string;
|
|
1174
|
+
/** Accessible name of a day. Defaults to "<Month> <day>, <year>". */
|
|
1175
|
+
formatDayLabel?: (date: string) => string;
|
|
1176
|
+
/** Accessible name of the previous button. Defaults to "Previous month". */
|
|
1177
|
+
previousLabel?: string;
|
|
1178
|
+
/** Accessible name of the next button. Defaults to "Next month". */
|
|
1179
|
+
nextLabel?: string;
|
|
1180
|
+
testID?: string;
|
|
1181
|
+
/** testID of the month title, e.g. to check which month is shown. */
|
|
1182
|
+
titleTestID?: string;
|
|
1183
|
+
/**
|
|
1184
|
+
* Colors weekend headers and day numbers: Sunday red (destructive) and Saturday blue (info), as
|
|
1185
|
+
* Korean and Japanese calendars do. Selected days keep their filled style.
|
|
1186
|
+
*/
|
|
1187
|
+
weekendTones?: boolean;
|
|
1188
|
+
}
|
|
1189
|
+
/**
|
|
1190
|
+
* Month grid with previous and next buttons, selected dates filled with primary, an
|
|
1191
|
+
* optional today ring, up to three dots per date and min/max bounds. Dates are ISO strings.
|
|
1192
|
+
*/
|
|
1193
|
+
declare function MonthCalendar({ month, onMonthChange, selected, onSelectDate, marks, today, minDate, maxDate, weekStartsOn, weekdayLabels, monthNames, formatTitle, formatDayLabel, previousLabel, nextLabel, testID, titleTestID, weekendTones, }: MonthCalendarProps): react_jsx_runtime.JSX.Element;
|
|
1194
|
+
|
|
1195
|
+
/** One destination: a route or section the rail switches to. Same shape as a TabBar item. */
|
|
1196
|
+
interface NavigationRailItem {
|
|
1197
|
+
/** Stable key passed to `onSelect`, e.g. the route name. */
|
|
1198
|
+
key: string;
|
|
1199
|
+
/** Visible label under the icon; also the item's accessible name. */
|
|
1200
|
+
label: string;
|
|
1201
|
+
/** Ionicons name shown while the item is not selected. */
|
|
1202
|
+
icon: IconName;
|
|
1203
|
+
/** Ionicons name shown while the item is selected. Defaults to `icon`. */
|
|
1204
|
+
activeIcon?: IconName;
|
|
1205
|
+
testID?: string;
|
|
1206
|
+
}
|
|
1207
|
+
/** An icon button pinned to the bottom of the rail, such as settings or sign out. */
|
|
1208
|
+
interface NavigationRailFooterAction {
|
|
1209
|
+
/** Ionicons name. */
|
|
1210
|
+
icon: IconName;
|
|
1211
|
+
/** Visible label under the icon; also the button's accessible name. */
|
|
1212
|
+
label: string;
|
|
1213
|
+
onPress: () => void;
|
|
1214
|
+
testID?: string;
|
|
1215
|
+
}
|
|
1216
|
+
interface NavigationRailProps {
|
|
1217
|
+
items: NavigationRailItem[];
|
|
1218
|
+
/** Key of the selected item. */
|
|
1219
|
+
activeKey: string;
|
|
1220
|
+
/** Called with an item's key when it is pressed. */
|
|
1221
|
+
onSelect: (key: string) => void;
|
|
1222
|
+
/** Top of the rail, above the items: the app's logo, or a design-system organism. */
|
|
1223
|
+
header?: ReactNode;
|
|
1224
|
+
/** Button pinned to the bottom of the rail. */
|
|
1225
|
+
footerAction?: NavigationRailFooterAction;
|
|
1226
|
+
/** Pads the top and bottom safe-area insets. Set false when a parent already pads them. Defaults to true. */
|
|
1227
|
+
safeArea?: boolean;
|
|
1228
|
+
testID?: string;
|
|
1229
|
+
}
|
|
1230
|
+
/**
|
|
1231
|
+
* Vertical navigation for wide layouts (tablet, web): icon and label items in an 80px
|
|
1232
|
+
* column, the selected one on a secondary pill with its icon in primary, an optional
|
|
1233
|
+
* header on top and a footer action at the bottom.
|
|
1234
|
+
*/
|
|
1235
|
+
declare function NavigationRail({ items, activeKey, onSelect, header, footerAction, safeArea, testID, }: NavigationRailProps): react_jsx_runtime.JSX.Element;
|
|
1236
|
+
|
|
1237
|
+
type OrbState = "off" | "listening" | "waiting" | "speaking" | "muted" | "error";
|
|
1238
|
+
interface OrbProps {
|
|
1239
|
+
/** Voice state; sets the pulse speed, size and opacity. */
|
|
1240
|
+
state: OrbState;
|
|
1241
|
+
/** Tap on the orb, e.g. to start, interrupt or retry. */
|
|
1242
|
+
onPress: () => void;
|
|
1243
|
+
/** Accessible name of the orb for the current state, e.g. "Stop and listen". */
|
|
1244
|
+
accessibilityLabel: string;
|
|
1245
|
+
/** Status line under the orb, e.g. "Listening". */
|
|
1246
|
+
label?: string;
|
|
1247
|
+
testID?: string;
|
|
1248
|
+
}
|
|
1249
|
+
/** Animated voice orb whose pulse shows what a voice session is doing, with an optional status line. */
|
|
1250
|
+
declare function Orb({ state, onPress, accessibilityLabel, label, testID, }: OrbProps): react_jsx_runtime.JSX.Element;
|
|
1251
|
+
|
|
1252
|
+
interface ProfileHeaderAction {
|
|
1253
|
+
label: string;
|
|
1254
|
+
onPress: () => void;
|
|
1255
|
+
disabled?: boolean;
|
|
1256
|
+
testID?: string;
|
|
1257
|
+
}
|
|
1258
|
+
interface ProfileHeaderProps {
|
|
1259
|
+
/** Display name: the title, and the source of the avatar initials. */
|
|
1260
|
+
name: string;
|
|
1261
|
+
/** Line under the name, e.g. an email address. */
|
|
1262
|
+
subtitle?: string;
|
|
1263
|
+
/** Outlined button under the profile, e.g. "Edit name". */
|
|
1264
|
+
action?: ProfileHeaderAction;
|
|
1265
|
+
/** testID of the name text. */
|
|
1266
|
+
nameTestID?: string;
|
|
1267
|
+
/** testID of the subtitle text. */
|
|
1268
|
+
subtitleTestID?: string;
|
|
1269
|
+
testID?: string;
|
|
1270
|
+
}
|
|
1271
|
+
/** Avatar with initials, a name, an optional subtitle and an optional outlined action. */
|
|
1272
|
+
declare function ProfileHeader({ name, subtitle, action, nameTestID, subtitleTestID, testID, }: ProfileHeaderProps): react_jsx_runtime.JSX.Element;
|
|
1273
|
+
|
|
1274
|
+
/**
|
|
1275
|
+
* Fill color: `default` is primary, `destructive` flags a value near a limit, `gold` matches
|
|
1276
|
+
* gold star tiers (the value text stays foreground, since gold text is too light to read).
|
|
1277
|
+
*/
|
|
1278
|
+
type ProgressBarTone = "default" | "destructive" | "gold";
|
|
1279
|
+
interface ProgressBarProps {
|
|
1280
|
+
/** Share done, from 0 to 1. Values outside the range are clamped. */
|
|
1281
|
+
value: number;
|
|
1282
|
+
/** What is measured, shown above the bar; also the progress bar's accessible name. */
|
|
1283
|
+
label: string;
|
|
1284
|
+
/** Text on the right instead of the percentage, e.g. "3 / 10". */
|
|
1285
|
+
valueLabel?: string;
|
|
1286
|
+
/** Muted line under the bar, e.g. "Resets in 2h". */
|
|
1287
|
+
caption?: string;
|
|
1288
|
+
tone?: ProgressBarTone;
|
|
1289
|
+
testID?: string;
|
|
1290
|
+
/** Number of gold stars before the label, e.g. 3 for a three-star tier. */
|
|
1291
|
+
rating?: number;
|
|
1292
|
+
}
|
|
1293
|
+
/**
|
|
1294
|
+
* Labeled linear progress bar: the label and percentage (or a value label) over a rounded
|
|
1295
|
+
* track, with an optional caption. Announced as a progress bar named by the label.
|
|
1296
|
+
*/
|
|
1297
|
+
declare function ProgressBar({ value, label, valueLabel, caption, tone, testID, rating, }: ProgressBarProps): react_jsx_runtime.JSX.Element;
|
|
1298
|
+
|
|
1299
|
+
/** Arc color: `default` is primary, `destructive` flags a value near a limit. */
|
|
1300
|
+
type ProgressRingTone = "default" | "destructive";
|
|
1301
|
+
/** `sm`: 56px ring; `md`: 88px ring. */
|
|
1302
|
+
type ProgressRingSize = "sm" | "md";
|
|
1303
|
+
interface ProgressRingProps {
|
|
1304
|
+
/** Share done, from 0 to 1. Values outside the range are clamped. */
|
|
1305
|
+
value: number;
|
|
1306
|
+
/** Muted text under the ring; also the progress bar's accessible name. */
|
|
1307
|
+
label: string;
|
|
1308
|
+
/** Text in the middle instead of the percentage, e.g. "3/10". */
|
|
1309
|
+
valueLabel?: string;
|
|
1310
|
+
tone?: ProgressRingTone;
|
|
1311
|
+
size?: ProgressRingSize;
|
|
1312
|
+
testID?: string;
|
|
1313
|
+
}
|
|
1314
|
+
/**
|
|
1315
|
+
* Circular progress: a track with an arc from 12 o'clock, the percentage (or a value
|
|
1316
|
+
* label) in the middle and a muted label under it. Drawn with Views, no SVG dependency.
|
|
1317
|
+
* Announced as a progress bar named by the label.
|
|
1318
|
+
*/
|
|
1319
|
+
declare function ProgressRing({ value, label, valueLabel, tone, size, testID, }: ProgressRingProps): react_jsx_runtime.JSX.Element;
|
|
1320
|
+
|
|
1321
|
+
/** One tier count under the name: `stars` gold stars and how many items reached that tier. */
|
|
1322
|
+
interface RankedRowTier {
|
|
1323
|
+
/** Number of gold stars drawn, e.g. 3. */
|
|
1324
|
+
stars: number;
|
|
1325
|
+
/** How many items have that tier, shown after the stars. */
|
|
1326
|
+
count: number;
|
|
1327
|
+
/** Spoken text, e.g. "Three stars: 2". Defaults to "<stars> stars: <count>". */
|
|
1328
|
+
accessibilityLabel?: string;
|
|
1329
|
+
}
|
|
1330
|
+
interface RankedRowProps {
|
|
1331
|
+
/** Position in the ranking, e.g. 1. */
|
|
1332
|
+
rank: number;
|
|
1333
|
+
/** Display name; also the source of the avatar initials. */
|
|
1334
|
+
name: string;
|
|
1335
|
+
/** Muted line under the name, e.g. a level or a streak. */
|
|
1336
|
+
subtitle?: string;
|
|
1337
|
+
/** Score on the right, already formatted by the app, e.g. "1,250". */
|
|
1338
|
+
score: string;
|
|
1339
|
+
/** Avatar image; without it the avatar shows the name's initials. */
|
|
1340
|
+
avatarUri?: string;
|
|
1341
|
+
/** Marks the current user's row with a card fill and a primary border. */
|
|
1342
|
+
highlighted?: boolean;
|
|
1343
|
+
/** Small label after the name, e.g. "You". */
|
|
1344
|
+
badge?: string;
|
|
1345
|
+
/** Makes the row a button, e.g. to open the person's profile. */
|
|
1346
|
+
onPress?: () => void;
|
|
1347
|
+
testID?: string;
|
|
1348
|
+
/** Draws ranks 1, 2 and 3 on a gold, silver or bronze disc; other ranks stay plain. */
|
|
1349
|
+
medal?: boolean;
|
|
1350
|
+
/** Ionicons name drawn gold before the score, e.g. "star". */
|
|
1351
|
+
scoreIcon?: IconName;
|
|
1352
|
+
/** Muted line under the score, e.g. "12 entries". */
|
|
1353
|
+
scoreCaption?: string;
|
|
1354
|
+
/** Tier counts drawn as gold stars and a number, under the name (after the subtitle). */
|
|
1355
|
+
tiers?: RankedRowTier[];
|
|
1356
|
+
}
|
|
1357
|
+
/**
|
|
1358
|
+
* Ranked row: rank, avatar (image or initials), name with an optional badge, subtitle and
|
|
1359
|
+
* a score. The current user's row can be highlighted.
|
|
1360
|
+
*/
|
|
1361
|
+
declare function RankedRow({ rank, name, subtitle, score, avatarUri, highlighted, badge, onPress, testID, medal, scoreIcon, scoreCaption, tiers, }: RankedRowProps): react_jsx_runtime.JSX.Element;
|
|
1362
|
+
|
|
1363
|
+
/** `sm`: 16px stars for lists and cards; `md`: 28px stars for detail screens and input. */
|
|
1364
|
+
type RatingStarsSize = "sm" | "md";
|
|
1365
|
+
interface RatingStarsProps {
|
|
1366
|
+
/** Rating from 0 to `max`. Display mode shows halves (3.5); input mode rounds. */
|
|
1367
|
+
value: number;
|
|
1368
|
+
/** Number of stars. Defaults to 5. */
|
|
1369
|
+
max?: number;
|
|
1370
|
+
/** Makes the stars an input: a radio group with one radio per star. */
|
|
1371
|
+
onChange?: (value: number) => void;
|
|
1372
|
+
/** Accessible name of the rating, e.g. "Rating". */
|
|
1373
|
+
label: string;
|
|
1374
|
+
size?: RatingStarsSize;
|
|
1375
|
+
testID?: string;
|
|
1376
|
+
}
|
|
1377
|
+
/**
|
|
1378
|
+
* Row of gold stars. Without `onChange` it is a read-only image named "label: value/max";
|
|
1379
|
+
* with `onChange` it is a radio group named by `label`, one radio per star.
|
|
1380
|
+
*/
|
|
1381
|
+
declare function RatingStars({ value, max, onChange, label, size, testID, }: RatingStarsProps): react_jsx_runtime.JSX.Element;
|
|
1382
|
+
|
|
1383
|
+
interface ScrollToBottomFabProps {
|
|
1384
|
+
/** Shows the button; it renders nothing while false. */
|
|
1385
|
+
visible: boolean;
|
|
1386
|
+
/** Unread count shown as a badge when above 0; capped at "99+". */
|
|
1387
|
+
count?: number;
|
|
1388
|
+
onPress: () => void;
|
|
1389
|
+
/** Accessible name of the button; the badge count is appended, e.g. "Scroll to latest (3)". Defaults to "Scroll to latest". */
|
|
1390
|
+
accessibilityLabel?: string;
|
|
1391
|
+
testID?: string;
|
|
1392
|
+
}
|
|
1393
|
+
/** Round button, absolute at the bottom center of its parent, that jumps a list to the newest item. */
|
|
1394
|
+
declare function ScrollToBottomFab({ visible, count, onPress, accessibilityLabel, testID, }: ScrollToBottomFabProps): react_jsx_runtime.JSX.Element | null;
|
|
1395
|
+
|
|
1396
|
+
/** An icon button right of the input, such as a filter toggle. */
|
|
1397
|
+
interface SearchBarFilterAction {
|
|
1398
|
+
/** Ionicons name, e.g. "options-outline". */
|
|
1399
|
+
icon: IconName;
|
|
1400
|
+
/** Accessible name of the button. */
|
|
1401
|
+
label: string;
|
|
1402
|
+
onPress: () => void;
|
|
1403
|
+
/** Fills the button with primary, e.g. while filters are shown or applied. Announced as expanded. */
|
|
1404
|
+
active?: boolean;
|
|
1405
|
+
testID?: string;
|
|
1406
|
+
/** Shows a count badge on the button, e.g. the number of applied filters; 0 or unset hides it. */
|
|
1407
|
+
count?: number;
|
|
1408
|
+
}
|
|
1409
|
+
/** One result row in the list under the input. */
|
|
1410
|
+
interface SearchBarSuggestion {
|
|
1411
|
+
label: string;
|
|
1412
|
+
/** Muted second line, e.g. where the item is. */
|
|
1413
|
+
subtitle?: string;
|
|
1414
|
+
/** Ionicons name shown before the label. */
|
|
1415
|
+
icon?: IconName;
|
|
1416
|
+
onPress: () => void;
|
|
1417
|
+
testID?: string;
|
|
1418
|
+
}
|
|
1419
|
+
interface SearchBarProps {
|
|
1420
|
+
/** Current query; the search bar is controlled. */
|
|
1421
|
+
value: string;
|
|
1422
|
+
onChangeText: (text: string) => void;
|
|
1423
|
+
/** Placeholder, also the input's accessible name. */
|
|
1424
|
+
placeholder: string;
|
|
1425
|
+
/** Called with the current text when the keyboard's search key (or Enter on web) is pressed. */
|
|
1426
|
+
onSubmit?: (text: string) => void;
|
|
1427
|
+
/** Accessible name of the clear button. Defaults to "Clear search". */
|
|
1428
|
+
clearLabel?: string;
|
|
1429
|
+
/** Optional icon button right of the input. */
|
|
1430
|
+
filterAction?: SearchBarFilterAction;
|
|
1431
|
+
/** Maximum number of characters the input accepts. */
|
|
1432
|
+
maxLength?: number;
|
|
1433
|
+
/** Focuses the input on mount. */
|
|
1434
|
+
autoFocus?: boolean;
|
|
1435
|
+
inputTestID?: string;
|
|
1436
|
+
testID?: string;
|
|
1437
|
+
/** Result rows in a card under the input, e.g. matches while typing; hidden while empty. */
|
|
1438
|
+
suggestions?: SearchBarSuggestion[];
|
|
1439
|
+
/** Accessible name of the suggestion list. Defaults to "Suggestions". */
|
|
1440
|
+
suggestionsLabel?: string;
|
|
1441
|
+
}
|
|
1442
|
+
/**
|
|
1443
|
+
* Search input with a leading search icon, a clear button while it has text, an optional
|
|
1444
|
+
* filter button with a count badge and an optional list of suggestions under it.
|
|
1445
|
+
*/
|
|
1446
|
+
declare function SearchBar({ value, onChangeText, placeholder, onSubmit, clearLabel, filterAction, maxLength, autoFocus, inputTestID, testID, suggestions, suggestionsLabel, }: SearchBarProps): react_jsx_runtime.JSX.Element;
|
|
1447
|
+
|
|
1448
|
+
interface SelectOption<T extends string = string> {
|
|
1449
|
+
value: T;
|
|
1450
|
+
label: string;
|
|
1451
|
+
/** Muted second line under the label. */
|
|
1452
|
+
description?: string;
|
|
1453
|
+
/** Ionicons name shown before the label. */
|
|
1454
|
+
icon?: IconName;
|
|
1455
|
+
/**
|
|
1456
|
+
* The unfiltered choice, e.g. "All". It is checked in the sheet while chosen, but the
|
|
1457
|
+
* trigger keeps showing the placeholder (e.g. "Category") and a chip stays unfilled.
|
|
1458
|
+
*/
|
|
1459
|
+
all?: boolean;
|
|
1460
|
+
}
|
|
1461
|
+
interface SelectProps<T extends string = string> {
|
|
1462
|
+
options: SelectOption<T>[];
|
|
1463
|
+
/** Value of the chosen option; `null` or unset shows the placeholder. */
|
|
1464
|
+
value?: T | null;
|
|
1465
|
+
onChange: (value: T) => void;
|
|
1466
|
+
/** Shown muted while nothing is chosen, e.g. "Choose one". */
|
|
1467
|
+
placeholder: string;
|
|
1468
|
+
/** Visible label above the field; also the sheet's heading. */
|
|
1469
|
+
label?: string;
|
|
1470
|
+
/** Sheet heading when it should differ from `label`. Defaults to `label`, then `placeholder`. */
|
|
1471
|
+
sheetTitle?: string;
|
|
1472
|
+
/** Accessible name of the sheet's close button. Defaults to "Close". */
|
|
1473
|
+
closeLabel?: string;
|
|
1474
|
+
/** Inline error under the field; also outlines it in destructive. */
|
|
1475
|
+
error?: string | null;
|
|
1476
|
+
disabled?: boolean;
|
|
1477
|
+
testID?: string;
|
|
1478
|
+
/**
|
|
1479
|
+
* `field`: a labelled field box; `chip`: a compact pill showing the current value with a
|
|
1480
|
+
* chevron, e.g. a filter in a row of filters. Defaults to `field`.
|
|
1481
|
+
*/
|
|
1482
|
+
variant?: SelectVariant;
|
|
1483
|
+
/** `chip`: the value that counts as unfiltered; the chip fills with primary while another value is chosen. */
|
|
1484
|
+
defaultValue?: T | null;
|
|
1485
|
+
}
|
|
1486
|
+
/** `field`: a labelled field box; `chip`: a compact pill trigger. */
|
|
1487
|
+
type SelectVariant = "field" | "chip";
|
|
1488
|
+
/**
|
|
1489
|
+
* Labelled field, or a compact chip, that opens a bottom sheet of options (radio rows with
|
|
1490
|
+
* an optional icon and description). Choosing an option calls `onChange` and closes the sheet.
|
|
1491
|
+
*/
|
|
1492
|
+
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;
|
|
1493
|
+
|
|
1494
|
+
/** An option of a SearchSelect; same shape as a Select option. */
|
|
1495
|
+
type SearchSelectOption<T extends string = string> = SelectOption<T>;
|
|
1496
|
+
/** The "create new" row shown while the query matches no option exactly. */
|
|
1497
|
+
interface SearchSelectCreate {
|
|
1498
|
+
/** Row label for the typed query, e.g. (q) => `Add "${q}"`. */
|
|
1499
|
+
label: (query: string) => string;
|
|
1500
|
+
/** Called with the trimmed query; the sheet closes. The app creates the item and sets `value`. */
|
|
1501
|
+
onCreate: (query: string) => void;
|
|
1502
|
+
testID?: string;
|
|
1503
|
+
}
|
|
1504
|
+
interface SearchSelectProps<T extends string = string> {
|
|
1505
|
+
options: SearchSelectOption<T>[];
|
|
1506
|
+
/** Value of the chosen option; `null` or unset shows the placeholder. */
|
|
1507
|
+
value?: T | null;
|
|
1508
|
+
onChange: (value: T) => void;
|
|
1509
|
+
/**
|
|
1510
|
+
* Label of the chosen option when it is not in `options`, e.g. after an async search
|
|
1511
|
+
* replaced the list. Defaults to the matching option's label.
|
|
1512
|
+
*/
|
|
1513
|
+
valueLabel?: string;
|
|
1514
|
+
/** Shown muted in the field while nothing is chosen. */
|
|
1515
|
+
placeholder: string;
|
|
1516
|
+
/** Placeholder of the search input, also its accessible name. */
|
|
1517
|
+
searchPlaceholder: string;
|
|
1518
|
+
/** Visible label above the field; also the sheet's heading. */
|
|
1519
|
+
label?: string;
|
|
1520
|
+
/** Sheet heading when it should differ from `label`. Defaults to `label`, then `placeholder`. */
|
|
1521
|
+
sheetTitle?: string;
|
|
1522
|
+
/**
|
|
1523
|
+
* Called as the query changes. When set, the app owns filtering (e.g. an async search)
|
|
1524
|
+
* and passes the results as `options`; otherwise options are filtered by label here.
|
|
1525
|
+
*/
|
|
1526
|
+
onQueryChange?: (query: string) => void;
|
|
1527
|
+
/** Shows a spinner instead of the list, e.g. while the app's search runs. */
|
|
1528
|
+
loading?: boolean;
|
|
1529
|
+
/** Accessible name of the spinner. Defaults to "Loading". */
|
|
1530
|
+
loadingLabel?: string;
|
|
1531
|
+
/** Shown when no option matches. */
|
|
1532
|
+
emptyMessage?: string;
|
|
1533
|
+
/** Optional "create new" row for a query with no exact match. */
|
|
1534
|
+
create?: SearchSelectCreate;
|
|
1535
|
+
/** Accessible name of the sheet's close button. Defaults to "Close". */
|
|
1536
|
+
closeLabel?: string;
|
|
1537
|
+
/** Inline error under the field; also outlines it in destructive. */
|
|
1538
|
+
error?: string | null;
|
|
1539
|
+
disabled?: boolean;
|
|
1540
|
+
testID?: string;
|
|
1541
|
+
}
|
|
1542
|
+
/**
|
|
1543
|
+
* Select with a search input: the sheet filters options as the user types, can offer a
|
|
1544
|
+
* "create new" row for the query and shows a loading state for app-driven async search.
|
|
1545
|
+
*/
|
|
1546
|
+
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;
|
|
1547
|
+
|
|
1548
|
+
/** One group of rows under a sticky heading. */
|
|
1549
|
+
interface SectionedListSection<T> {
|
|
1550
|
+
/** Stable key of the section, e.g. "2026-11". */
|
|
1551
|
+
key: string;
|
|
1552
|
+
/** Sticky heading; omit for a flat list with one untitled section. */
|
|
1553
|
+
title?: string;
|
|
1554
|
+
data: readonly T[];
|
|
1555
|
+
/** testID of the section heading, e.g. "month-2026-11". */
|
|
1556
|
+
testID?: string;
|
|
1557
|
+
}
|
|
1558
|
+
/** What `renderItem` receives for each row. */
|
|
1559
|
+
interface SectionedListItemInfo<T> {
|
|
1560
|
+
item: T;
|
|
1561
|
+
/** Index of the row inside its section. */
|
|
1562
|
+
index: number;
|
|
1563
|
+
section: SectionedListSection<T>;
|
|
1564
|
+
}
|
|
1565
|
+
interface SectionedListProps<T> {
|
|
1566
|
+
sections: readonly SectionedListSection<T>[];
|
|
1567
|
+
keyExtractor: (item: T, index: number) => string;
|
|
1568
|
+
/** Renders one row, usually a ListRow. */
|
|
1569
|
+
renderItem: (info: SectionedListItemInfo<T>) => ReactElement | null;
|
|
1570
|
+
/** Called near the end of the list, e.g. to load the next page. */
|
|
1571
|
+
onEndReached?: () => void;
|
|
1572
|
+
/** Shows a spinner after the last row while the next page loads. */
|
|
1573
|
+
loadingMore?: boolean;
|
|
1574
|
+
/** Accessible name of the loading spinner. Defaults to "Loading more". */
|
|
1575
|
+
loadingMoreLabel?: string;
|
|
1576
|
+
/** Scrolls above the first section, e.g. a SummaryCard. */
|
|
1577
|
+
header?: ReactNode;
|
|
1578
|
+
/** Shown under the header while every section is empty, usually an EmptyState. */
|
|
1579
|
+
empty?: ReactNode;
|
|
1580
|
+
testID?: string;
|
|
1581
|
+
/** Draws a hairline between rows inside a section. */
|
|
1582
|
+
separators?: boolean;
|
|
1583
|
+
}
|
|
1584
|
+
/**
|
|
1585
|
+
* Virtualized list of sections with sticky muted headings, an optional header above them,
|
|
1586
|
+
* an empty state and a loading-more spinner; it scrolls itself, so use it with
|
|
1587
|
+
* `ListTemplate scroll={false}`.
|
|
1588
|
+
*/
|
|
1589
|
+
declare function SectionedList<T>({ sections, keyExtractor, renderItem, onEndReached, loadingMore, loadingMoreLabel, header, empty, testID, separators, }: SectionedListProps<T>): react_jsx_runtime.JSX.Element;
|
|
1590
|
+
|
|
1591
|
+
interface SegmentedControlOption<T extends string = string> {
|
|
1592
|
+
value: T;
|
|
1593
|
+
label: string;
|
|
1594
|
+
}
|
|
1595
|
+
interface SegmentedControlProps<T extends string = string> {
|
|
1596
|
+
/** 2 to 4 mutually exclusive options. */
|
|
1597
|
+
options: SegmentedControlOption<T>[];
|
|
1598
|
+
/** Value of the selected option. */
|
|
1599
|
+
value: T;
|
|
1600
|
+
onChange: (value: T) => void;
|
|
1601
|
+
/** Accessible name of the group, e.g. "Theme". */
|
|
1602
|
+
accessibilityLabel?: string;
|
|
1603
|
+
testID?: string;
|
|
1604
|
+
}
|
|
1605
|
+
/** 2-4 exclusive options in one outlined row; the selected option fills with primary. */
|
|
1606
|
+
declare function SegmentedControl<T extends string = string>({ options, value, onChange, accessibilityLabel, testID, }: SegmentedControlProps<T>): react_jsx_runtime.JSX.Element;
|
|
1607
|
+
|
|
1608
|
+
/** `destructive` draws the card border, icon and heading in the destructive color, e.g. a danger zone. */
|
|
1609
|
+
type SettingsSectionTone = "default" | "destructive";
|
|
1610
|
+
interface SettingsSectionProps {
|
|
1611
|
+
/** Card heading, e.g. "Appearance". */
|
|
1612
|
+
title: string;
|
|
1613
|
+
/** Settings organisms: ListRow, ProfileHeader, SegmentedControl, FilterChipGroup, FormSection. */
|
|
1614
|
+
children: ReactNode;
|
|
1615
|
+
testID?: string;
|
|
1616
|
+
/** Ionicons name before the heading. */
|
|
1617
|
+
icon?: IconName;
|
|
1618
|
+
/** Muted hint under the heading. */
|
|
1619
|
+
description?: string;
|
|
1620
|
+
/** Defaults to `default`. */
|
|
1621
|
+
tone?: SettingsSectionTone;
|
|
1622
|
+
}
|
|
1623
|
+
/** Settings card: a heading (optional icon and hint) over a column of settings organisms. */
|
|
1624
|
+
declare function SettingsSection({ title, children, testID, icon, description, tone, }: SettingsSectionProps): react_jsx_runtime.JSX.Element;
|
|
1625
|
+
|
|
1626
|
+
type SkeletonListVariant = "chat" | "list" | "detail" | "ranked";
|
|
1627
|
+
interface SkeletonListProps {
|
|
1628
|
+
/**
|
|
1629
|
+
* Placeholder shape. "chat": bubbles alternating right and left, bottom-aligned;
|
|
1630
|
+
* "list": list rows (title, subtitle, trailing value) separated by hairlines; "detail": a
|
|
1631
|
+
* detail screen (hero image, title, meta line, stars, `count` text lines); "ranked": ranked
|
|
1632
|
+
* rows (rank, avatar, name, score). Defaults to "chat".
|
|
1633
|
+
*/
|
|
1634
|
+
variant?: SkeletonListVariant;
|
|
1635
|
+
/** Number of placeholder rows. Defaults to 4. */
|
|
1636
|
+
count?: number;
|
|
1637
|
+
/** Accessible name of the placeholder. Defaults to "Loading". */
|
|
1638
|
+
accessibilityLabel?: string;
|
|
1639
|
+
testID?: string;
|
|
1640
|
+
}
|
|
1641
|
+
/** Loading placeholder: pulsing chat bubbles, list rows, ranked rows or a detail screen. */
|
|
1642
|
+
declare function SkeletonList({ variant, count, accessibilityLabel, testID, }: SkeletonListProps): react_jsx_runtime.JSX.Element;
|
|
1643
|
+
|
|
1644
|
+
type SnackbarTone = "default" | "success" | "error";
|
|
1645
|
+
/**
|
|
1646
|
+
* `auto` sits above a `TabBar` mounted inside the same `SnackbarProvider` (its height,
|
|
1647
|
+
* safe-area padding and raised center action included), and at the bottom when there is none.
|
|
1648
|
+
* `bottom` always sits at the bottom edge, e.g. over a full-screen layer that covers the tabs.
|
|
1649
|
+
*/
|
|
1650
|
+
type SnackbarPlacement = "auto" | "bottom";
|
|
1651
|
+
interface SnackbarProps {
|
|
1652
|
+
/** Shows the snackbar; the hide timer starts when it turns true. */
|
|
1653
|
+
visible: boolean;
|
|
1654
|
+
message: string;
|
|
1655
|
+
/** `success` and `error` add a colored outline and icon. Defaults to `default`. */
|
|
1656
|
+
tone?: SnackbarTone;
|
|
1657
|
+
/** Milliseconds before `onHide` is called. Defaults to 3000. */
|
|
1658
|
+
duration?: number;
|
|
1659
|
+
/** Called when the duration has passed; set `visible` to false here. */
|
|
1660
|
+
onHide?: () => void;
|
|
1661
|
+
/** Where it sits. Defaults to `auto`: above a mounted TabBar. */
|
|
1662
|
+
placement?: SnackbarPlacement;
|
|
1663
|
+
testID?: string;
|
|
1664
|
+
}
|
|
1665
|
+
/**
|
|
1666
|
+
* Transient message pinned to the bottom of its parent, capped at 420px. Inside a
|
|
1667
|
+
* `SnackbarProvider` it sits above a mounted `TabBar` unless `placement` is `bottom`. Controlled: the
|
|
1668
|
+
* app sets `visible` and hides it from `onHide`. Most apps use `SnackbarProvider` and
|
|
1669
|
+
* `useSnackbar()` instead.
|
|
1670
|
+
*/
|
|
1671
|
+
declare function Snackbar({ visible, message, tone, duration, onHide, placement, testID, }: SnackbarProps): react_jsx_runtime.JSX.Element | null;
|
|
1672
|
+
/** What `useSnackbar().show` takes. */
|
|
1673
|
+
interface SnackbarOptions {
|
|
1674
|
+
message: string;
|
|
1675
|
+
tone?: SnackbarTone;
|
|
1676
|
+
/** Milliseconds on screen. Defaults to 3000. */
|
|
1677
|
+
duration?: number;
|
|
1678
|
+
/** Defaults to `auto`: above a mounted TabBar. */
|
|
1679
|
+
placement?: SnackbarPlacement;
|
|
1680
|
+
}
|
|
1681
|
+
interface SnackbarContextValue {
|
|
1682
|
+
/** Shows a snackbar, replacing the one on screen. */
|
|
1683
|
+
show: (options: SnackbarOptions) => void;
|
|
1684
|
+
/** Hides the snackbar on screen early. */
|
|
1685
|
+
hide: () => void;
|
|
1686
|
+
}
|
|
1687
|
+
interface SnackbarProviderProps {
|
|
1688
|
+
/** The app. The snackbar shows over it, at the bottom. */
|
|
1689
|
+
children: ReactNode;
|
|
1690
|
+
testID?: string;
|
|
1691
|
+
}
|
|
1692
|
+
/**
|
|
1693
|
+
* Hosts one snackbar over the app; `useSnackbar()` inside it shows messages. A `TabBar`
|
|
1694
|
+
* rendered inside it lifts every snackbar above the bar (D61).
|
|
1695
|
+
*/
|
|
1696
|
+
declare function SnackbarProvider({ children, testID }: SnackbarProviderProps): react_jsx_runtime.JSX.Element;
|
|
1697
|
+
/** `show({ message, tone })` and `hide()` for the nearest `SnackbarProvider`. */
|
|
1698
|
+
declare function useSnackbar(): SnackbarContextValue;
|
|
1699
|
+
|
|
1700
|
+
/** Identity provider the button signs in with. */
|
|
1701
|
+
type SocialSignInButtonProvider = "apple" | "google";
|
|
1702
|
+
interface SocialSignInButtonProps {
|
|
1703
|
+
provider: SocialSignInButtonProvider;
|
|
1704
|
+
onPress: () => void;
|
|
1705
|
+
/** Visible text. Defaults to "Continue with Apple" / "Continue with Google". */
|
|
1706
|
+
label?: string;
|
|
1707
|
+
/** Shows a spinner in place of the logo and blocks presses. */
|
|
1708
|
+
loading?: boolean;
|
|
1709
|
+
disabled?: boolean;
|
|
1710
|
+
testID?: string;
|
|
1711
|
+
}
|
|
1712
|
+
/** Full-width "Continue with Apple/Google" button in the provider's general look. */
|
|
1713
|
+
declare function SocialSignInButton({ provider, onPress, label, loading, disabled, testID, }: SocialSignInButtonProps): react_jsx_runtime.JSX.Element;
|
|
1714
|
+
|
|
1715
|
+
/** Color of the value: `positive` uses primary, `negative` uses destructive. */
|
|
1716
|
+
type StatTileTone = "default" | "positive" | "negative";
|
|
1717
|
+
interface StatTileProps {
|
|
1718
|
+
/** Muted line above the value, e.g. "Total". */
|
|
1719
|
+
label: string;
|
|
1720
|
+
/** The number, already formatted by the app, e.g. "1,250" or "+30%". */
|
|
1721
|
+
value: string;
|
|
1722
|
+
/** Muted line under the value, e.g. "12 entries". */
|
|
1723
|
+
caption?: string;
|
|
1724
|
+
/** Ionicons name shown in the top-right corner. */
|
|
1725
|
+
icon?: IconName;
|
|
1726
|
+
tone?: StatTileTone;
|
|
1727
|
+
/** Makes the tile a button, e.g. to open the list behind the number. */
|
|
1728
|
+
onPress?: () => void;
|
|
1729
|
+
testID?: string;
|
|
1730
|
+
/**
|
|
1731
|
+
* Draws a progress ring left of the text, turning the tile into a hero summary, e.g.
|
|
1732
|
+
* the share of a collection completed.
|
|
1733
|
+
*/
|
|
1734
|
+
progress?: StatTileProgress;
|
|
1735
|
+
/** testID of the value text, e.g. for an end-to-end check of the number. */
|
|
1736
|
+
valueTestID?: string;
|
|
1737
|
+
}
|
|
1738
|
+
interface StatTileProgress {
|
|
1739
|
+
/** Share done, from 0 to 1. Values outside the range are clamped. */
|
|
1740
|
+
value: number;
|
|
1741
|
+
/** Text in the ring instead of the percentage, e.g. "3/10". */
|
|
1742
|
+
valueLabel?: string;
|
|
1743
|
+
/** Accessible name of the ring. Defaults to the tile's `label`. */
|
|
1744
|
+
label?: string;
|
|
1745
|
+
}
|
|
1746
|
+
/**
|
|
1747
|
+
* Summary stat card: a label, a large value and an optional caption and icon. Tiles
|
|
1748
|
+
* share a row equally (each takes `flex: 1`).
|
|
1749
|
+
*/
|
|
1750
|
+
declare function StatTile({ label, value, caption, icon, tone, onPress, testID, progress, valueTestID, }: StatTileProps): react_jsx_runtime.JSX.Element;
|
|
1751
|
+
|
|
1752
|
+
/** Color of a sub-stat value: `primary` highlights it, `muted` plays it down. */
|
|
1753
|
+
type SummaryCardTone = "default" | "primary" | "muted";
|
|
1754
|
+
/** One sub-stat in the row under the headline. */
|
|
1755
|
+
interface SummaryCardStat {
|
|
1756
|
+
label: string;
|
|
1757
|
+
/** Formatted by the app, e.g. "1,200". */
|
|
1758
|
+
value: string;
|
|
1759
|
+
/** Defaults to `default`. */
|
|
1760
|
+
tone?: SummaryCardTone;
|
|
1761
|
+
testID?: string;
|
|
1762
|
+
}
|
|
1763
|
+
interface SummaryCardProps {
|
|
1764
|
+
/** Muted label above the headline value, e.g. "Total". */
|
|
1765
|
+
label: string;
|
|
1766
|
+
/** Headline value, formatted by the app. */
|
|
1767
|
+
value: string;
|
|
1768
|
+
valueTestID?: string;
|
|
1769
|
+
/** Muted text on the right of the headline, e.g. a count. */
|
|
1770
|
+
caption?: string;
|
|
1771
|
+
captionTestID?: string;
|
|
1772
|
+
/** Up to three sub-stats in a divided row under the headline. */
|
|
1773
|
+
stats?: SummaryCardStat[];
|
|
1774
|
+
testID?: string;
|
|
1775
|
+
}
|
|
1776
|
+
/**
|
|
1777
|
+
* Totals card on the secondary surface: a headline (label, large value, optional caption on
|
|
1778
|
+
* the right) over a divided row of up to three sub-stats.
|
|
1779
|
+
*/
|
|
1780
|
+
declare function SummaryCard({ label, value, valueTestID, caption, captionTestID, stats, testID, }: SummaryCardProps): react_jsx_runtime.JSX.Element;
|
|
1781
|
+
|
|
1782
|
+
/** One tab: a route or screen the bar switches to. */
|
|
1783
|
+
interface TabBarItem {
|
|
1784
|
+
/** Stable key passed to `onSelect`, e.g. the route name. */
|
|
1785
|
+
key: string;
|
|
1786
|
+
/** Visible label under the icon; also the tab's accessible name. */
|
|
1787
|
+
label: string;
|
|
1788
|
+
/** Ionicons name shown while the tab is not selected. */
|
|
1789
|
+
icon: IconName;
|
|
1790
|
+
/** Ionicons name shown while the tab is selected. Defaults to `icon`. */
|
|
1791
|
+
activeIcon?: IconName;
|
|
1792
|
+
testID?: string;
|
|
1793
|
+
}
|
|
1794
|
+
/** A raised round primary button in the middle of the bar, such as a create button. */
|
|
1795
|
+
interface TabBarCenterAction {
|
|
1796
|
+
/** Ionicons name. */
|
|
1797
|
+
icon: IconName;
|
|
1798
|
+
/** Accessible name of the button. */
|
|
1799
|
+
label: string;
|
|
1800
|
+
onPress: () => void;
|
|
1801
|
+
testID?: string;
|
|
1802
|
+
}
|
|
1803
|
+
interface TabBarProps {
|
|
1804
|
+
items: TabBarItem[];
|
|
1805
|
+
/** Key of the selected tab. */
|
|
1806
|
+
activeKey: string;
|
|
1807
|
+
/** Called with a tab's key when it is pressed. */
|
|
1808
|
+
onSelect: (key: string) => void;
|
|
1809
|
+
/** Optional raised button in the middle; the tabs split evenly around it (the left side takes the extra one). */
|
|
1810
|
+
centerAction?: TabBarCenterAction;
|
|
1811
|
+
/** Adds the bottom safe-area inset to the bottom padding. Set false when a parent already pads it. Defaults to true. */
|
|
1812
|
+
safeAreaBottom?: boolean;
|
|
1813
|
+
testID?: string;
|
|
1814
|
+
}
|
|
1815
|
+
/**
|
|
1816
|
+
* Bottom tab bar: icon and label tabs, the selected one in primary, with an optional raised
|
|
1817
|
+
* center action. Inside a `SnackbarProvider`, snackbars sit above it automatically.
|
|
1818
|
+
*/
|
|
1819
|
+
declare function TabBar({ items, activeKey, onSelect, centerAction, safeAreaBottom, testID, }: TabBarProps): react_jsx_runtime.JSX.Element;
|
|
1820
|
+
|
|
1821
|
+
interface TabStripOption<T extends string = string> {
|
|
1822
|
+
value: T;
|
|
1823
|
+
label: string;
|
|
1824
|
+
testID?: string;
|
|
1825
|
+
}
|
|
1826
|
+
interface TabStripProps<T extends string = string> {
|
|
1827
|
+
/** 2 to 5 tabs, each switching the view below the strip. */
|
|
1828
|
+
options: TabStripOption<T>[];
|
|
1829
|
+
/** Value of the selected tab. */
|
|
1830
|
+
value: T;
|
|
1831
|
+
onChange: (value: T) => void;
|
|
1832
|
+
/** Accessible name of the tab list, e.g. "Sections". */
|
|
1833
|
+
accessibilityLabel?: string;
|
|
1834
|
+
testID?: string;
|
|
1835
|
+
}
|
|
1836
|
+
/**
|
|
1837
|
+
* Row of underlined tabs that switch the view below it. The selected tab has a semibold
|
|
1838
|
+
* label and a 2px primary underline; the strip sits on a hairline border. Tab-list
|
|
1839
|
+
* semantics; for picking a value use SegmentedControl instead.
|
|
1840
|
+
*/
|
|
1841
|
+
declare function TabStrip<T extends string = string>({ options, value, onChange, accessibilityLabel, testID, }: TabStripProps<T>): react_jsx_runtime.JSX.Element;
|
|
1842
|
+
|
|
1843
|
+
/** A small button after the input, e.g. "Add" for an inline add field. */
|
|
1844
|
+
interface TextFieldAction {
|
|
1845
|
+
label: string;
|
|
1846
|
+
onPress: () => void;
|
|
1847
|
+
disabled?: boolean;
|
|
1848
|
+
testID?: string;
|
|
1849
|
+
}
|
|
1850
|
+
interface TextFieldProps {
|
|
1851
|
+
/** The text as typed; the field is controlled. */
|
|
1852
|
+
value: string;
|
|
1853
|
+
onChangeText: (text: string) => void;
|
|
1854
|
+
/** Visible label above the field; also the input's accessible name. */
|
|
1855
|
+
label?: string;
|
|
1856
|
+
/** Muted text while empty; the accessible name when there is no label. */
|
|
1857
|
+
placeholder?: string;
|
|
1858
|
+
/** A box that grows with its text (from three lines) instead of one 44px line. */
|
|
1859
|
+
multiline?: boolean;
|
|
1860
|
+
/** Maximum number of characters the input accepts. */
|
|
1861
|
+
maxLength?: number;
|
|
1862
|
+
/** Inline error under the field; also outlines it in destructive. */
|
|
1863
|
+
error?: string | null;
|
|
1864
|
+
/** False while the form is busy; dims the field. Defaults to true. */
|
|
1865
|
+
editable?: boolean;
|
|
1866
|
+
/** Optional small button after the input. */
|
|
1867
|
+
action?: TextFieldAction;
|
|
1868
|
+
/** Called with the current text when the keyboard's return key is pressed (single line only). */
|
|
1869
|
+
onSubmit?: (text: string) => void;
|
|
1870
|
+
/** Focuses the input on mount, e.g. an add field that just opened. */
|
|
1871
|
+
autoFocus?: boolean;
|
|
1872
|
+
testID?: string;
|
|
1873
|
+
}
|
|
1874
|
+
/**
|
|
1875
|
+
* One labelled text field outside a FormSection: a single line or a growing multiline box,
|
|
1876
|
+
* an inline error and an optional small button after the input.
|
|
1877
|
+
*/
|
|
1878
|
+
declare function TextField({ value, onChangeText, label, placeholder, multiline, maxLength, error, editable, action, onSubmit, autoFocus, testID, }: TextFieldProps): react_jsx_runtime.JSX.Element;
|
|
1879
|
+
|
|
1880
|
+
interface TypingIndicatorProps {
|
|
1881
|
+
/** Accessible name of the indicator. Defaults to "Typing". */
|
|
1882
|
+
accessibilityLabel?: string;
|
|
1883
|
+
testID?: string;
|
|
1884
|
+
}
|
|
1885
|
+
/** Three pulsing dots shown while a reply is being written. */
|
|
1886
|
+
declare function TypingIndicator({ accessibilityLabel, testID, }: TypingIndicatorProps): react_jsx_runtime.JSX.Element;
|
|
1887
|
+
|
|
1888
|
+
/**
|
|
1889
|
+
* `content` caps the column at 720px for reading on tablets and desktop. `phone` caps it
|
|
1890
|
+
* at 480px and frames it: on a window wider than that the column gets side borders and
|
|
1891
|
+
* the space around it takes the secondary token background, the way a mobile-first app
|
|
1892
|
+
* looks on desktop web.
|
|
1893
|
+
*/
|
|
1894
|
+
type AppShellMaxWidth = "content" | "phone";
|
|
1895
|
+
interface AppShellProps {
|
|
1896
|
+
/** Header slot, usually an AppBar. Stays fixed above the content. */
|
|
1897
|
+
header?: ReactNode;
|
|
1898
|
+
/** Screen content. Fills the remaining height. */
|
|
1899
|
+
children: ReactNode;
|
|
1900
|
+
/** Width of the centered column on wide screens. Defaults to `content` (720px). */
|
|
1901
|
+
maxWidth?: AppShellMaxWidth;
|
|
1902
|
+
testID?: string;
|
|
1903
|
+
}
|
|
1904
|
+
/**
|
|
1905
|
+
* Screen frame: safe-area aware, themed background, and a content column centered on
|
|
1906
|
+
* wide screens: 720px by default, or a framed 480px phone column with `maxWidth="phone"`.
|
|
1907
|
+
* It pads the top and bottom safe-area insets once: templates and bars inside skip them (D66).
|
|
1908
|
+
*/
|
|
1909
|
+
declare function AppShell({ header, children, maxWidth, testID, }: AppShellProps): react_jsx_runtime.JSX.Element;
|
|
1910
|
+
|
|
1911
|
+
interface AuthTemplateFooterLink {
|
|
1912
|
+
/** The link text, e.g. "Create account" or "Privacy policy". */
|
|
1913
|
+
label: string;
|
|
1914
|
+
onPress: () => void;
|
|
1915
|
+
/** Muted text before the link on the same line, e.g. "New here?". */
|
|
1916
|
+
prompt?: string;
|
|
1917
|
+
testID?: string;
|
|
1918
|
+
}
|
|
1919
|
+
interface AuthTemplateProps {
|
|
1920
|
+
/** Top of the column, usually a BrandMark. */
|
|
1921
|
+
header?: ReactNode;
|
|
1922
|
+
/** The form, usually a FormSection. */
|
|
1923
|
+
children: ReactNode;
|
|
1924
|
+
/**
|
|
1925
|
+
* Pads the screen above the keyboard on iOS and Android (edge-to-edge, D46).
|
|
1926
|
+
* Set false when the app wraps the screen in its own keyboard engine, such as
|
|
1927
|
+
* react-native-keyboard-controller (D9). Defaults to true.
|
|
1928
|
+
*/
|
|
1929
|
+
keyboardAvoiding?: boolean;
|
|
1930
|
+
testID?: string;
|
|
1931
|
+
/**
|
|
1932
|
+
* Links centered under the form, one per line: a link with an optional muted prompt
|
|
1933
|
+
* before it (sign-up) or a plain muted link (policy).
|
|
1934
|
+
*/
|
|
1935
|
+
footerLinks?: AuthTemplateFooterLink[];
|
|
1936
|
+
/**
|
|
1937
|
+
* Pads the top safe-area inset, so the background reaches under the status bar. Skipped
|
|
1938
|
+
* when an enclosing AppShell or template already pads it (D66). Set false when something else above
|
|
1939
|
+
* the screen pads it. Defaults to true.
|
|
1940
|
+
*/
|
|
1941
|
+
safeAreaTop?: boolean;
|
|
1942
|
+
/**
|
|
1943
|
+
* Pads the bottom safe-area inset. Skipped when an enclosing AppShell or template already
|
|
1944
|
+
* pads it (D66). Set false when something below the screen pads it. Defaults to true.
|
|
1945
|
+
*/
|
|
1946
|
+
safeAreaBottom?: boolean;
|
|
1947
|
+
}
|
|
1948
|
+
/**
|
|
1949
|
+
* Sign-in style screen: safe-area aware, keyboard-avoiding, vertically centered column
|
|
1950
|
+
* capped at 420px, scrollable when the keyboard leaves too little room.
|
|
1951
|
+
*/
|
|
1952
|
+
declare function AuthTemplate({ header, children, keyboardAvoiding, testID, footerLinks, safeAreaTop, safeAreaBottom, }: AuthTemplateProps): react_jsx_runtime.JSX.Element;
|
|
1953
|
+
|
|
1954
|
+
interface ChatTemplateProps {
|
|
1955
|
+
/** Top bar, usually an AppBar. */
|
|
1956
|
+
header?: ReactNode;
|
|
1957
|
+
/** The stream: a MessageList, SkeletonList or EmptyState. Fills the remaining height. */
|
|
1958
|
+
list: ReactNode;
|
|
1959
|
+
/** Floats over the list, e.g. a ScrollToBottomFab (which positions itself). */
|
|
1960
|
+
overlay?: ReactNode;
|
|
1961
|
+
/** Strip between the list and the composer, e.g. an offline or error Banner. */
|
|
1962
|
+
banner?: ReactNode;
|
|
1963
|
+
/** Bottom input, usually a Composer. */
|
|
1964
|
+
composer: ReactNode;
|
|
1965
|
+
/**
|
|
1966
|
+
* Pads the screen above the keyboard on iOS and Android (edge-to-edge, D46).
|
|
1967
|
+
* Set false when the app wraps the screen in its own keyboard engine, such as
|
|
1968
|
+
* react-native-keyboard-controller (D9). Defaults to true.
|
|
1969
|
+
*/
|
|
1970
|
+
keyboardAvoiding?: boolean;
|
|
1971
|
+
testID?: string;
|
|
1972
|
+
/**
|
|
1973
|
+
* Pads the top safe-area inset. Skipped when an enclosing AppShell already pads it
|
|
1974
|
+
* (D66). Set false when something else above the screen pads it. Defaults to true.
|
|
1975
|
+
* The bottom inset is the composer's (`Composer` pads it).
|
|
1976
|
+
*/
|
|
1977
|
+
safeAreaTop?: boolean;
|
|
1978
|
+
}
|
|
1979
|
+
/**
|
|
1980
|
+
* Chat screen frame: safe-area aware (top), keyboard-avoiding, a column capped at 720px and centered,
|
|
1981
|
+
* with header, list (plus overlay), banner and composer stacked top to bottom.
|
|
1982
|
+
*/
|
|
1983
|
+
declare function ChatTemplate({ header, list, overlay, banner, composer, keyboardAvoiding, testID, safeAreaTop, }: ChatTemplateProps): react_jsx_runtime.JSX.Element;
|
|
1984
|
+
|
|
1985
|
+
interface DetailTemplateProps {
|
|
1986
|
+
/** Top bar, usually an AppBar with a back action. Stays fixed. */
|
|
1987
|
+
header?: ReactNode;
|
|
1988
|
+
/** Edge-to-edge top of the scroll, e.g. a photo strip or a ProfileHeader. */
|
|
1989
|
+
hero?: ReactNode;
|
|
1990
|
+
/** Sections under the hero, usually ListSections. Stacked with a 24px gap in a padded column. */
|
|
1991
|
+
children: ReactNode;
|
|
1992
|
+
/** Sticky bottom bar for the screen's actions; pads the bottom safe-area inset. */
|
|
1993
|
+
footer?: ReactNode;
|
|
1994
|
+
testID?: string;
|
|
1995
|
+
/**
|
|
1996
|
+
* Shows a round back button floating over the top-left of the hero, for screens
|
|
1997
|
+
* without a header. Without a hero the content leaves room under it.
|
|
1998
|
+
*/
|
|
1999
|
+
onBack?: () => void;
|
|
2000
|
+
/** Accessible name of the back button. Defaults to "Back". */
|
|
2001
|
+
backLabel?: string;
|
|
2002
|
+
/**
|
|
2003
|
+
* Pads the bottom safe-area inset (under the content, or in the footer). Set false
|
|
2004
|
+
* inside tabs, where the TabBar pads it. Defaults to true.
|
|
2005
|
+
*/
|
|
2006
|
+
safeAreaBottom?: boolean;
|
|
2007
|
+
/**
|
|
2008
|
+
* Pads the hero 16px on the sides and top, matching the sections, for a hero that is
|
|
2009
|
+
* not a full-bleed image (e.g. a ProfileHeader). Defaults to false (edge to edge).
|
|
2010
|
+
*/
|
|
2011
|
+
heroPadded?: boolean;
|
|
2012
|
+
}
|
|
2013
|
+
/**
|
|
2014
|
+
* Detail screen frame: safe-area aware, a fixed header, a scrolling column (hero, then
|
|
2015
|
+
* sections) capped at 720px and centered, and an optional sticky footer.
|
|
2016
|
+
*/
|
|
2017
|
+
declare function DetailTemplate({ header, hero, children, footer, testID, onBack, backLabel, safeAreaBottom, heroPadded, }: DetailTemplateProps): react_jsx_runtime.JSX.Element;
|
|
2018
|
+
|
|
2019
|
+
/** Full-width primary button pinned under the form. */
|
|
2020
|
+
interface FormTemplateSubmit {
|
|
2021
|
+
label: string;
|
|
2022
|
+
onPress: () => void;
|
|
2023
|
+
/** Shows a spinner and blocks presses, e.g. while saving. */
|
|
2024
|
+
loading?: boolean;
|
|
2025
|
+
disabled?: boolean;
|
|
2026
|
+
testID?: string;
|
|
2027
|
+
}
|
|
2028
|
+
/** Pinned bottom bar: a form-level error above the submit button. */
|
|
2029
|
+
interface FormTemplateFooter {
|
|
2030
|
+
submit: FormTemplateSubmit;
|
|
2031
|
+
/** Form-level error, e.g. "Could not save." Field errors belong on the fields. */
|
|
2032
|
+
error?: string | null;
|
|
2033
|
+
errorTestID?: string;
|
|
2034
|
+
}
|
|
2035
|
+
interface FormTemplateProps {
|
|
2036
|
+
/** Fixed above the form, usually an AppBar with a back or close action. */
|
|
2037
|
+
header?: ReactNode;
|
|
2038
|
+
/** Field organisms (AmountInput, DateField, FilterChipGroup, ...), stacked with a 24px gap. */
|
|
2039
|
+
children: ReactNode;
|
|
2040
|
+
/** Submit bar pinned to the bottom so the action is reachable without scrolling. */
|
|
2041
|
+
footer?: FormTemplateFooter;
|
|
2042
|
+
testID?: string;
|
|
2043
|
+
}
|
|
2044
|
+
/**
|
|
2045
|
+
* Form screen, often shown as a modal: safe-area aware and keyboard-avoiding, a fixed
|
|
2046
|
+
* header, a scrolling column of fields capped at 640px, and an optional pinned submit bar.
|
|
2047
|
+
*/
|
|
2048
|
+
declare function FormTemplate({ header, children, footer, testID, }: FormTemplateProps): react_jsx_runtime.JSX.Element;
|
|
2049
|
+
|
|
2050
|
+
/** Where the scrolled content sits, in content coordinates (px from the top of the content). */
|
|
2051
|
+
interface ListTemplateScrollEvent {
|
|
2052
|
+
/** How far the content is scrolled. */
|
|
2053
|
+
offsetY: number;
|
|
2054
|
+
/** Height of the visible part of the list, between the fixed rows and the footer. */
|
|
2055
|
+
viewportHeight: number;
|
|
2056
|
+
/** Full height of the scrolled content, padding included. */
|
|
2057
|
+
contentHeight: number;
|
|
2058
|
+
}
|
|
2059
|
+
/** Scroll control for the template's own scroll view (`scroll`, the default). */
|
|
2060
|
+
interface ListTemplateScrollHandle {
|
|
2061
|
+
/** Scrolls so that `y` (content coordinates, as in `onScroll`) is at the top of the viewport. Animated unless `animated` is false. */
|
|
2062
|
+
scrollTo: (options: {
|
|
2063
|
+
y: number;
|
|
2064
|
+
animated?: boolean;
|
|
2065
|
+
}) => void;
|
|
2066
|
+
}
|
|
2067
|
+
interface ListTemplateProps {
|
|
2068
|
+
/** Top bar, usually an AppBar. Stays fixed. */
|
|
2069
|
+
header?: ReactNode;
|
|
2070
|
+
/** Fixed under the header, usually a SearchBar. */
|
|
2071
|
+
search?: ReactNode;
|
|
2072
|
+
/** Fixed under the search, usually a FilterChipGroup. */
|
|
2073
|
+
filters?: ReactNode;
|
|
2074
|
+
/**
|
|
2075
|
+
* The list content. With `scroll` (default) the template scrolls it in a padded column:
|
|
2076
|
+
* ListSections, EmptyState, SkeletonList. With `scroll={false}` it fills the remaining
|
|
2077
|
+
* height unpadded and must scroll itself, e.g. a virtualized list such as MessageList.
|
|
2078
|
+
*/
|
|
2079
|
+
children: ReactNode;
|
|
2080
|
+
/** Scroll the content inside the template. Set false when the content is its own list. Defaults to true. */
|
|
2081
|
+
scroll?: boolean;
|
|
2082
|
+
/** Pad the bottom safe-area inset. Set false on a tab screen, where the TabBar pads it. Defaults to true. */
|
|
2083
|
+
safeAreaBottom?: boolean;
|
|
2084
|
+
testID?: string;
|
|
2085
|
+
/**
|
|
2086
|
+
* Pinned under the content above a hairline, e.g. the viewer's own ListRow or RankedRow
|
|
2087
|
+
* while it is scrolled out of view. The app decides when to pass it.
|
|
2088
|
+
*/
|
|
2089
|
+
footer?: ReactNode;
|
|
2090
|
+
/**
|
|
2091
|
+
* Reports the scroll position with the viewport and content heights, whenever the list
|
|
2092
|
+
* scrolls or either height changes (so also once both are measured, before any scroll).
|
|
2093
|
+
* Use it to tell when a row is out of view, e.g. to show `footer`. Only with `scroll`.
|
|
2094
|
+
*/
|
|
2095
|
+
onScroll?: (event: ListTemplateScrollEvent) => void;
|
|
2096
|
+
/** Receives a handle that scrolls the content, e.g. back to the row pinned in `footer`. Only with `scroll`. */
|
|
2097
|
+
scrollRef?: Ref<ListTemplateScrollHandle>;
|
|
2098
|
+
}
|
|
2099
|
+
/**
|
|
2100
|
+
* List screen frame: safe-area aware, a fixed header, optional search and filter rows,
|
|
2101
|
+
* then the list content in a column capped at 720px and centered on wide screens, and an
|
|
2102
|
+
* optional pinned footer row. With `onScroll` and `scrollRef` the app can tell what is in
|
|
2103
|
+
* view and scroll the content, e.g. to pin the viewer's own row while it is scrolled away.
|
|
2104
|
+
*/
|
|
2105
|
+
declare function ListTemplate({ header, search, filters, children, scroll, safeAreaBottom, testID, footer, onScroll, scrollRef, }: ListTemplateProps): react_jsx_runtime.JSX.Element;
|
|
2106
|
+
|
|
2107
|
+
/** PIN entry: dots for the digits typed so far and a numeric keypad. */
|
|
2108
|
+
interface LockTemplatePin {
|
|
2109
|
+
/** Number of digits, e.g. 4 or 6. */
|
|
2110
|
+
length: number;
|
|
2111
|
+
/** Digits typed so far; the PIN is controlled. */
|
|
2112
|
+
value: string;
|
|
2113
|
+
onChange: (value: string) => void;
|
|
2114
|
+
/** Called with the full PIN when the last digit is typed. The app verifies it. */
|
|
2115
|
+
onComplete?: (value: string) => void;
|
|
2116
|
+
}
|
|
2117
|
+
/** Button that starts the app's biometric prompt (the engine stays in the app, D9). */
|
|
2118
|
+
interface LockTemplateBiometric {
|
|
2119
|
+
/** Ionicons name, e.g. "finger-print" or "scan-outline". */
|
|
2120
|
+
icon: IconName;
|
|
2121
|
+
/** Accessible name; also the button text when there is no PIN, e.g. "Unlock". */
|
|
2122
|
+
label: string;
|
|
2123
|
+
onPress: () => void;
|
|
2124
|
+
/** Blocks presses, e.g. while the OS prompt is up. */
|
|
2125
|
+
disabled?: boolean;
|
|
2126
|
+
testID?: string;
|
|
2127
|
+
}
|
|
2128
|
+
interface LockTemplateProps {
|
|
2129
|
+
title: string;
|
|
2130
|
+
subtitle?: string;
|
|
2131
|
+
/** PIN dots and keypad. Without it the screen shows only the biometric button. */
|
|
2132
|
+
pin?: LockTemplatePin;
|
|
2133
|
+
/** Biometric unlock: a keypad key next to 0, or a full-width button without `pin`. */
|
|
2134
|
+
biometric?: LockTemplateBiometric;
|
|
2135
|
+
/** Shown under the dots, announced as an alert; the dots shake each time it changes. */
|
|
2136
|
+
error?: string | null;
|
|
2137
|
+
/** Accessible name of the delete key. Defaults to "Delete". */
|
|
2138
|
+
deleteLabel?: string;
|
|
2139
|
+
/** Accessible name of the dots. Defaults to "<n> of <length> digits entered". */
|
|
2140
|
+
formatProgress?: (entered: number, length: number) => string;
|
|
2141
|
+
testID?: string;
|
|
2142
|
+
}
|
|
2143
|
+
/**
|
|
2144
|
+
* App lock screen: title and subtitle, PIN dots, a numeric keypad with delete and an
|
|
2145
|
+
* optional biometric key. Wrong PINs show an error and shake the dots; the app verifies.
|
|
2146
|
+
* A full-screen cover: it pads its own safe-area insets even when shown in a Modal over a
|
|
2147
|
+
* screen whose AppShell already padded them (D66).
|
|
2148
|
+
*/
|
|
2149
|
+
declare function LockTemplate({ title, subtitle, pin, biometric, error, deleteLabel, formatProgress, testID, }: LockTemplateProps): react_jsx_runtime.JSX.Element;
|
|
2150
|
+
|
|
2151
|
+
/** A round floating button over the canvas, such as "Recenter" or "Layers". */
|
|
2152
|
+
interface OverlayTemplateAction {
|
|
2153
|
+
/** Ionicons name, e.g. "locate-outline". */
|
|
2154
|
+
icon: IconName;
|
|
2155
|
+
/** Accessible name of the button. */
|
|
2156
|
+
label: string;
|
|
2157
|
+
onPress: () => void;
|
|
2158
|
+
testID?: string;
|
|
2159
|
+
}
|
|
2160
|
+
interface OverlayTemplateProps {
|
|
2161
|
+
/** The app's full-bleed engine (a map, a camera preview, a drawing surface), filling the screen edge to edge and keeping its gestures (D9). */
|
|
2162
|
+
canvas: ReactNode;
|
|
2163
|
+
/** Floats at the top under the status bar, usually a SearchBar. */
|
|
2164
|
+
search?: ReactNode;
|
|
2165
|
+
/** Round buttons stacked at the top right, under the search. */
|
|
2166
|
+
actions?: OverlayTemplateAction[];
|
|
2167
|
+
/** Floats at the bottom, usually a FloatingCard for the selected item. */
|
|
2168
|
+
card?: ReactNode;
|
|
2169
|
+
/** A BottomSheet for a list or filters; it opens as a modal over the screen. */
|
|
2170
|
+
sheet?: ReactNode;
|
|
2171
|
+
/** Adds the bottom safe-area inset under the card. Set false above a TabBar, which pads it. Defaults to true. */
|
|
2172
|
+
safeAreaBottom?: boolean;
|
|
2173
|
+
testID?: string;
|
|
2174
|
+
/**
|
|
2175
|
+
* A larger floating panel docked at the bottom left, up to 400px wide and as tall as
|
|
2176
|
+
* the space under the search allows (it scrolls), e.g. an item's full detail
|
|
2177
|
+
* (DetailHeader, ImageCarousel, ActionCard) on a wide screen. Use it instead of `card`.
|
|
2178
|
+
*/
|
|
2179
|
+
panel?: ReactNode;
|
|
2180
|
+
/** Adds the top safe-area inset above the search. Set false under an AppBar, which pads it. Defaults to true. */
|
|
2181
|
+
safeAreaTop?: boolean;
|
|
2182
|
+
}
|
|
2183
|
+
/**
|
|
2184
|
+
* Full-screen canvas with floating overlays: the app's engine edge to edge, with a search bar and
|
|
2185
|
+
* round action buttons floating at the top, a card floating at the bottom and an
|
|
2186
|
+
* optional bottom sheet. Overlays respect the safe area and let touches through to
|
|
2187
|
+
* the canvas around them.
|
|
2188
|
+
*/
|
|
2189
|
+
declare function OverlayTemplate({ canvas, search, actions, card, sheet, safeAreaBottom, testID, panel, safeAreaTop, }: OverlayTemplateProps): react_jsx_runtime.JSX.Element;
|
|
2190
|
+
|
|
2191
|
+
interface SettingsTemplateProps {
|
|
2192
|
+
/** Header slot, usually an AppBar with a back action. Stays fixed above the scroll. */
|
|
2193
|
+
header?: ReactNode;
|
|
2194
|
+
/** SettingsSection cards, stacked with a 20px gap. */
|
|
2195
|
+
children: ReactNode;
|
|
2196
|
+
testID?: string;
|
|
2197
|
+
}
|
|
2198
|
+
/**
|
|
2199
|
+
* Settings screen frame: safe-area aware, a fixed header, then a scrolling column of
|
|
2200
|
+
* sections capped at 640px and centered on wide screens.
|
|
2201
|
+
*/
|
|
2202
|
+
declare function SettingsTemplate({ header, children, testID, }: SettingsTemplateProps): react_jsx_runtime.JSX.Element;
|
|
2203
|
+
|
|
2204
|
+
/** Width of the list pane on wide screens: `sm` 320px, `md` 380px, `lg` 440px. */
|
|
2205
|
+
type SplitLayoutListSize = "sm" | "md" | "lg";
|
|
2206
|
+
/** Which pane a narrow screen shows. */
|
|
2207
|
+
type SplitLayoutPane = "list" | "detail";
|
|
2208
|
+
interface SplitLayoutProps {
|
|
2209
|
+
/** The list or sidebar pane, e.g. a ListTemplate's content or ListSections. */
|
|
2210
|
+
list: ReactNode;
|
|
2211
|
+
/** The selected item's pane, e.g. a DetailTemplate or a OverlayTemplate. */
|
|
2212
|
+
detail?: ReactNode;
|
|
2213
|
+
/** Shown in the detail pane on wide screens while `detail` is unset, usually an EmptyState. */
|
|
2214
|
+
emptyDetail?: ReactNode;
|
|
2215
|
+
/** Wide screens only: a NavigationRail at the start of the row. */
|
|
2216
|
+
rail?: ReactNode;
|
|
2217
|
+
/** Narrow screens only: a TabBar under the pane. */
|
|
2218
|
+
tabBar?: ReactNode;
|
|
2219
|
+
/** Which pane a narrow screen shows. Defaults to `detail` while `detail` is set, otherwise `list`. */
|
|
2220
|
+
narrowPane?: SplitLayoutPane;
|
|
2221
|
+
/** Forces the wide (true) or narrow (false) layout. Defaults to the window width against `breakpoint`. */
|
|
2222
|
+
wide?: boolean;
|
|
2223
|
+
/** Window width in px from which the layout is wide. Defaults to 768. */
|
|
2224
|
+
breakpoint?: number;
|
|
2225
|
+
/** Width of the list pane on wide screens. Defaults to `md`. */
|
|
2226
|
+
listSize?: SplitLayoutListSize;
|
|
2227
|
+
testID?: string;
|
|
2228
|
+
}
|
|
2229
|
+
/** `wide` is true while the window is at least `breakpoint` px wide (768 by default). */
|
|
2230
|
+
declare function useSplitLayout(breakpoint?: number): {
|
|
2231
|
+
wide: boolean;
|
|
2232
|
+
};
|
|
2233
|
+
/**
|
|
2234
|
+
* Master-detail frame: on wide screens (tablet, web) an optional NavigationRail, a
|
|
2235
|
+
* fixed-width list pane and a detail pane side by side; on narrow screens one pane at
|
|
2236
|
+
* a time above an optional TabBar. Safe-area aware; the rail and the tab bar pad
|
|
2237
|
+
* their own insets.
|
|
2238
|
+
*/
|
|
2239
|
+
declare function SplitLayout({ list, detail, emptyDetail, rail, tabBar, narrowPane, wide, breakpoint, listSize, testID, }: SplitLayoutProps): react_jsx_runtime.JSX.Element;
|
|
2240
|
+
|
|
2241
|
+
interface VoiceTemplateProps {
|
|
2242
|
+
/** Top bar, usually an AppBar. */
|
|
2243
|
+
header?: ReactNode;
|
|
2244
|
+
/** The centerpiece, usually an Orb. */
|
|
2245
|
+
orb: ReactNode;
|
|
2246
|
+
/** Shown under the orb, usually an ErrorState. */
|
|
2247
|
+
error?: ReactNode;
|
|
2248
|
+
/** Shown under the orb and error, usually a LiveCaption. */
|
|
2249
|
+
caption?: ReactNode;
|
|
2250
|
+
/** Bottom row of controls, usually ActionToggles. */
|
|
2251
|
+
controls: ReactNode;
|
|
2252
|
+
testID?: string;
|
|
2253
|
+
}
|
|
2254
|
+
/**
|
|
2255
|
+
* Voice screen: safe-area aware, themed background, a column capped at 640px
|
|
2256
|
+
* with the orb, error and caption centered and the controls row at the bottom.
|
|
2257
|
+
*/
|
|
2258
|
+
declare function VoiceTemplate({ header, orb, error, caption, controls, testID, }: VoiceTemplateProps): react_jsx_runtime.JSX.Element;
|
|
2259
|
+
|
|
2260
|
+
export { ActionBar, type ActionBarAction, type ActionBarProps, type ActionBarTone, ActionCard, type ActionCardProps, type ActionCardRating, type ActionCardTone, ActionToggle, type ActionToggleProps, type ActionToggleTone, AlertDialog, type AlertDialogProps, AmountInput, type AmountInputPreset, type AmountInputProps, type AmountInputUnitPosition, AppBar, type AppBarAction, type AppBarProps, AppShell, type AppShellProps, AuthTemplate, type AuthTemplateFooterLink, type AuthTemplateProps, Banner, type BannerProps, type BannerTone, BarChartCard, type BarChartCardBar, type BarChartCardProps, 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, ErrorState, type ErrorStateAction, type ErrorStateProps, FilterChipGroup, type FilterChipGroupAddAction, type FilterChipGroupBaseProps, type FilterChipGroupLayout, type FilterChipGroupMultipleProps, type FilterChipGroupOption, type FilterChipGroupProps, type FilterChipGroupSection, type FilterChipGroupSingleProps, FloatingCard, type FloatingCardAction, type FloatingCardProps, type FloatingCardRating, 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 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, MeterCard, type MeterCardMeter, type MeterCardProps, MonthCalendar, type MonthCalendarDotTone, type MonthCalendarProps, NavigationRail, type NavigationRailFooterAction, type NavigationRailItem, type NavigationRailProps, Orb, type OrbProps, type OrbState, OverlayTemplate, type OverlayTemplateAction, type OverlayTemplateProps, ProfileHeader, type ProfileHeaderAction, type ProfileHeaderProps, ProgressBar, type ProgressBarProps, type ProgressBarTone, ProgressRing, type ProgressRingProps, type ProgressRingSize, type ProgressRingTone, RankedRow, type RankedRowProps, type RankedRowTier, RatingStars, type RatingStarsProps, type RatingStarsSize, ScrollToBottomFab, type ScrollToBottomFabProps, SearchBar, type SearchBarFilterAction, type SearchBarProps, type SearchBarSuggestion, SearchSelect, type SearchSelectCreate, type SearchSelectOption, type SearchSelectProps, SectionedList, type SectionedListItemInfo, type SectionedListProps, type SectionedListSection, SegmentedControl, type SegmentedControlOption, type SegmentedControlProps, Select, type SelectOption, type SelectProps, type SelectVariant, SettingsSection, type SettingsSectionProps, type SettingsSectionTone, 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 StatTileTone, SuggestionChips, type SuggestionChipsItem, type SuggestionChipsLayout, type SuggestionChipsProps, SummaryCard, type SummaryCardProps, type SummaryCardStat, type SummaryCardTone, TabBar, type TabBarCenterAction, type TabBarItem, type TabBarProps, TabStrip, type TabStripOption, type TabStripProps, TextField, type TextFieldAction, type TextFieldProps, type ThemeColorName, type ThemeColors, type ThemeContextValue, type ThemeMode, type ThemeModePreference, type ThemeName, ThemeProvider, type ThemeProviderProps, TypingIndicator, type TypingIndicatorProps, VoiceTemplate, type VoiceTemplateProps, useSnackbar, useSplitLayout, useTheme };
|