ferns-ui 0.39.0 → 0.39.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ActionSheet.d.ts +2 -317
- package/dist/ActionSheet.js.map +1 -1
- package/dist/Avatar.d.ts +1 -70
- package/dist/Avatar.js +4 -4
- package/dist/Avatar.js.map +1 -1
- package/dist/Badge.d.ts +1 -8
- package/dist/Badge.js.map +1 -1
- package/dist/Banner.d.ts +1 -14
- package/dist/Banner.js.map +1 -1
- package/dist/Body.d.ts +2 -10
- package/dist/Body.js.map +1 -1
- package/dist/Box.js +4 -4
- package/dist/Box.js.map +1 -1
- package/dist/Button.d.ts +1 -24
- package/dist/Button.js.map +1 -1
- package/dist/Card.d.ts +1 -3
- package/dist/Card.js +14 -4
- package/dist/Card.js.map +1 -1
- package/dist/CheckBox.d.ts +1 -1
- package/dist/CheckBox.js +2 -2
- package/dist/CheckBox.js.map +1 -1
- package/dist/Common.d.ts +713 -371
- package/dist/Common.js +0 -35
- package/dist/Common.js.map +1 -1
- package/dist/CustomSelect.d.ts +1 -12
- package/dist/CustomSelect.js +6 -3
- package/dist/CustomSelect.js.map +1 -1
- package/dist/DateTimeActionSheet.d.ts +1 -10
- package/dist/DateTimeActionSheet.js +8 -10
- package/dist/DateTimeActionSheet.js.map +1 -1
- package/dist/DecimalRangeActionSheet.d.ts +1 -13
- package/dist/DecimalRangeActionSheet.js.map +1 -1
- package/dist/ErrorBoundary.d.ts +1 -1
- package/dist/ErrorPage.d.ts +1 -5
- package/dist/ErrorPage.js.map +1 -1
- package/dist/Field.d.ts +2 -20
- package/dist/Field.js +15 -15
- package/dist/Field.js.map +1 -1
- package/dist/Form.d.ts +1 -7
- package/dist/Form.js.map +1 -1
- package/dist/Heading.d.ts +1 -1
- package/dist/Heading.js +2 -2
- package/dist/Heading.js.map +1 -1
- package/dist/HeightActionSheet.d.ts +1 -6
- package/dist/HeightActionSheet.js.map +1 -1
- package/dist/Hyperlink.d.ts +2 -14
- package/dist/Hyperlink.js +2 -1
- package/dist/Hyperlink.js.map +1 -1
- package/dist/Icon.d.ts +1 -1
- package/dist/Icon.js +4 -3
- package/dist/Icon.js.map +1 -1
- package/dist/IconButton.d.ts +1 -24
- package/dist/IconButton.js +6 -6
- package/dist/IconButton.js.map +1 -1
- package/dist/InfoTooltipButton.d.ts +1 -6
- package/dist/InfoTooltipButton.js.map +1 -1
- package/dist/Link.d.ts +1 -5
- package/dist/Link.js.map +1 -1
- package/dist/MobileAddressAutoComplete.d.ts +2 -11
- package/dist/MobileAddressAutoComplete.js +2 -2
- package/dist/MobileAddressAutoComplete.js.map +1 -1
- package/dist/Modal.d.ts +1 -17
- package/dist/Modal.js +2 -2
- package/dist/Modal.js.map +1 -1
- package/dist/NumberPickerActionSheet.d.ts +1 -8
- package/dist/NumberPickerActionSheet.js.map +1 -1
- package/dist/Page.d.ts +1 -21
- package/dist/Page.js.map +1 -1
- package/dist/PickerSelect.d.ts +1 -2
- package/dist/Pill.d.ts +1 -3
- package/dist/Pill.js +3 -5
- package/dist/Pill.js.map +1 -1
- package/dist/Pog.d.ts +2 -14
- package/dist/Pog.js +1 -1
- package/dist/Pog.js.map +1 -1
- package/dist/ProgressBar.d.ts +1 -5
- package/dist/ProgressBar.js.map +1 -1
- package/dist/SelectList.d.ts +4 -2
- package/dist/SelectList.js.map +1 -1
- package/dist/SideDrawer.d.ts +1 -11
- package/dist/SideDrawer.js.map +1 -1
- package/dist/Spinner.d.ts +1 -5
- package/dist/Spinner.js +2 -1
- package/dist/Spinner.js.map +1 -1
- package/dist/Switch.d.ts +1 -3
- package/dist/Switch.js +15 -5
- package/dist/Switch.js.map +1 -1
- package/dist/Table.d.ts +1 -28
- package/dist/Table.js +4 -2
- package/dist/Table.js.map +1 -1
- package/dist/TableHeader.d.ts +1 -17
- package/dist/TableHeader.js.map +1 -1
- package/dist/TableHeaderCell.d.ts +2 -11
- package/dist/TableHeaderCell.js +1 -1
- package/dist/TableHeaderCell.js.map +1 -1
- package/dist/TableRow.d.ts +2 -25
- package/dist/TableRow.js.map +1 -1
- package/dist/TapToEdit.d.ts +1 -2
- package/dist/TapToEdit.js +2 -2
- package/dist/TapToEdit.js.map +1 -1
- package/dist/Text.d.ts +1 -18
- package/dist/Text.js.map +1 -1
- package/dist/TextArea.d.ts +1 -4
- package/dist/TextArea.js +3 -9
- package/dist/TextArea.js.map +1 -1
- package/dist/TextField.d.ts +1 -1
- package/dist/TextField.js +6 -5
- package/dist/TextField.js.map +1 -1
- package/dist/TextFieldNumberActionSheet.d.ts +2 -8
- package/dist/TextFieldNumberActionSheet.js.map +1 -1
- package/dist/Toast.d.ts +2 -10
- package/dist/Toast.js +1 -1
- package/dist/Toast.js.map +1 -1
- package/dist/Tooltip.d.ts +1 -7
- package/dist/Tooltip.js +8 -6
- package/dist/Tooltip.js.map +1 -1
- package/dist/UnifiedAddressAutoComplete.d.ts +2 -11
- package/dist/UnifiedAddressAutoComplete.js +4 -4
- package/dist/UnifiedAddressAutoComplete.js.map +1 -1
- package/dist/Utilities.d.ts +3 -0
- package/dist/Utilities.js +24 -0
- package/dist/Utilities.js.map +1 -1
- package/dist/WebAddressAutocomplete.d.ts +2 -9
- package/dist/WebAddressAutocomplete.js +1 -0
- package/dist/WebAddressAutocomplete.js.map +1 -1
- package/dist/WithLabel.d.ts +1 -12
- package/dist/WithLabel.js.map +1 -1
- package/dist/dayjsExtended.js +1 -0
- package/dist/dayjsExtended.js.map +1 -1
- package/dist/index.d.ts +6 -7
- package/dist/index.js +0 -2
- package/dist/index.js.map +1 -1
- package/package.json +17 -39
- package/src/ActionSheet.tsx +1 -351
- package/src/Avatar.tsx +5 -85
- package/src/Badge.tsx +1 -12
- package/src/Banner.tsx +1 -15
- package/src/Body.tsx +2 -11
- package/src/Box.tsx +4 -4
- package/src/Button.tsx +1 -27
- package/src/Card.tsx +15 -17
- package/src/CheckBox.tsx +2 -0
- package/src/Common.ts +801 -531
- package/src/CustomSelect.tsx +7 -13
- package/src/DateTimeActionSheet.tsx +9 -21
- package/src/DecimalRangeActionSheet.tsx +1 -14
- package/src/ErrorPage.tsx +1 -4
- package/src/Field.tsx +17 -37
- package/src/Form.tsx +1 -8
- package/src/Heading.tsx +8 -2
- package/src/HeightActionSheet.tsx +1 -7
- package/src/Hyperlink.tsx +7 -16
- package/src/Icon.tsx +4 -2
- package/src/IconButton.tsx +6 -43
- package/src/InfoTooltipButton.tsx +1 -6
- package/src/Link.tsx +2 -5
- package/src/MobileAddressAutoComplete.tsx +4 -11
- package/src/Modal.tsx +3 -26
- package/src/NumberPickerActionSheet.tsx +1 -9
- package/src/Page.tsx +1 -22
- package/src/PickerSelect.tsx +1 -1
- package/src/Pill.tsx +15 -17
- package/src/Pog.tsx +2 -14
- package/src/ProgressBar.tsx +1 -6
- package/src/SelectList.tsx +4 -4
- package/src/SideDrawer.tsx +1 -16
- package/src/Spinner.tsx +3 -7
- package/src/Switch.tsx +6 -12
- package/src/Table.tsx +5 -29
- package/src/TableHeader.tsx +1 -17
- package/src/TableHeaderCell.tsx +7 -11
- package/src/TableRow.tsx +2 -25
- package/src/TapToEdit.tsx +4 -4
- package/src/Text.tsx +1 -19
- package/src/TextArea.tsx +2 -10
- package/src/TextField.tsx +6 -3
- package/src/TextFieldNumberActionSheet.tsx +2 -9
- package/src/Toast.tsx +2 -14
- package/src/Tooltip.tsx +9 -15
- package/src/UnifiedAddressAutoComplete.tsx +6 -11
- package/src/Utilities.tsx +27 -1
- package/src/WebAddressAutocomplete.tsx +3 -9
- package/src/WithLabel.tsx +1 -13
- package/src/dayjsExtended.ts +1 -0
- package/src/index.tsx +6 -7
- package/dist/Layer.d.ts +0 -9
- package/dist/Layer.js +0 -12
- package/dist/Layer.js.map +0 -1
- package/dist/Meta.d.ts +0 -5
- package/dist/Meta.js +0 -7
- package/dist/Meta.js.map +0 -1
- package/dist/UnifiedScreens.d.ts +0 -9
- package/dist/UnifiedScreens.js +0 -25
- package/dist/UnifiedScreens.js.map +0 -1
- package/src/Layer.tsx +0 -17
- package/src/Meta.tsx +0 -9
- package/src/UnifiedScreens.ts +0 -24
package/dist/Common.d.ts
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
|
+
import { SaveFormat } from "expo-image-manipulator";
|
|
1
2
|
import React, { ReactElement, ReactNode, SyntheticEvent } from "react";
|
|
2
|
-
import { ListRenderItemInfo } from "react-native";
|
|
3
|
+
import { ListRenderItemInfo, StyleProp, ViewStyle } from "react-native";
|
|
4
|
+
import { DimensionValue } from "react-native/Libraries/StyleSheet/StyleSheetTypes";
|
|
5
|
+
import { Styles } from "react-native-google-places-autocomplete";
|
|
6
|
+
import { SelectListOptions } from "./SelectList";
|
|
3
7
|
export interface BaseProfile {
|
|
4
8
|
email: string;
|
|
5
9
|
id: string;
|
|
@@ -7,58 +11,6 @@ export interface BaseProfile {
|
|
|
7
11
|
testUser?: boolean;
|
|
8
12
|
};
|
|
9
13
|
}
|
|
10
|
-
export interface TrackingConfig {
|
|
11
|
-
MIXPANEL_TOKEN: string;
|
|
12
|
-
SENTRY_WEB_DSN: string;
|
|
13
|
-
SENTRY_MOBILE_DSN: string;
|
|
14
|
-
USER_PROPERTY_KEYS: string[];
|
|
15
|
-
}
|
|
16
|
-
export interface IConfig extends TrackingConfig {
|
|
17
|
-
FEEDBACK_URL: string;
|
|
18
|
-
PRIVACY_POLICY_URL: string;
|
|
19
|
-
PROFILE_COLLECTION: string;
|
|
20
|
-
TERMS_URL: string;
|
|
21
|
-
BASE_URL: string;
|
|
22
|
-
PRODUCTION: boolean;
|
|
23
|
-
primaryLighterColor: string;
|
|
24
|
-
primaryLightColor: string;
|
|
25
|
-
primaryColor: string;
|
|
26
|
-
primaryDarkColor: string;
|
|
27
|
-
primaryDarkerColor: string;
|
|
28
|
-
secondaryLighterColor: string;
|
|
29
|
-
secondaryLightColor: string;
|
|
30
|
-
secondaryColor: string;
|
|
31
|
-
secondaryDarkColor: string;
|
|
32
|
-
secondaryDarkerColor: string;
|
|
33
|
-
accentLighterColor: string;
|
|
34
|
-
accentLightColor: string;
|
|
35
|
-
accentColor: string;
|
|
36
|
-
accentDarkColor: string;
|
|
37
|
-
accentDarkerColor: string;
|
|
38
|
-
tertiaryLighterColor: string;
|
|
39
|
-
tertiaryLightColor: string;
|
|
40
|
-
tertiaryColor: string;
|
|
41
|
-
tertiaryDarkColor: string;
|
|
42
|
-
tertiaryDarkerColor: string;
|
|
43
|
-
neutral900: string;
|
|
44
|
-
neutral800: string;
|
|
45
|
-
neutral700: string;
|
|
46
|
-
neutral600: string;
|
|
47
|
-
neutral500: string;
|
|
48
|
-
neutral400: string;
|
|
49
|
-
neutral300: string;
|
|
50
|
-
neutral200: string;
|
|
51
|
-
neutral100: string;
|
|
52
|
-
neutral90: string;
|
|
53
|
-
neutral80: string;
|
|
54
|
-
neutral70: string;
|
|
55
|
-
neutral60: string;
|
|
56
|
-
neutral50: string;
|
|
57
|
-
neutral40: string;
|
|
58
|
-
neutral30: string;
|
|
59
|
-
neutral20: string;
|
|
60
|
-
neutral10: string;
|
|
61
|
-
}
|
|
62
14
|
export interface UnifiedTheme {
|
|
63
15
|
blue: string;
|
|
64
16
|
darkGray: string;
|
|
@@ -162,38 +114,16 @@ export declare const SPACING = 4;
|
|
|
162
114
|
export type TextFieldType = "date" | "datetime" | "decimal" | "decimalRange" | "email" | "height" | "password" | "phoneNumber" | "number" | "numberRange" | "search" | "text" | "time" | "url" | "username";
|
|
163
115
|
export type IconSize = "xs" | "sm" | "md" | "lg" | "xl";
|
|
164
116
|
export declare const iconSizeToNumber: (size?: IconSize) => number;
|
|
165
|
-
export declare const iconNumberToSize: (size?: number) => IconSize;
|
|
166
|
-
export declare function getSectionColor(section: "Breakfast" | "Lunch" | "Dinner" | "Snack" | "workouts"): Color;
|
|
167
117
|
export type TextSize = "sm" | "md" | "lg";
|
|
168
118
|
export type TextColor = "blue" | "darkGray" | "eggplant" | "gray" | "green" | "lightGray" | "maroon" | "midnight" | "navy" | "olive" | "orange" | "orchid" | "pine" | "purple" | "red" | "watermelon" | "white";
|
|
169
119
|
export type ButtonColor = "blue" | "gray" | "red" | "white" | "primary" | "secondary" | "accent" | "tertiary";
|
|
170
120
|
export type IconPrefix = "far" | "fas";
|
|
171
|
-
export interface ActionBannerProps {
|
|
172
|
-
/** The text to show in the banner. */
|
|
173
|
-
text: string;
|
|
174
|
-
color?: AllColors;
|
|
175
|
-
textColor?: TextColor;
|
|
176
|
-
negativeXMargin?: number;
|
|
177
|
-
onClick: () => void;
|
|
178
|
-
shape?: Rounding;
|
|
179
|
-
}
|
|
180
121
|
export interface BlurBoxProps extends BoxProps {
|
|
181
122
|
blurType?: "regular" | "dark" | "prominent";
|
|
182
123
|
}
|
|
183
124
|
export interface LayerProps {
|
|
184
125
|
children: ReactChildren;
|
|
185
126
|
}
|
|
186
|
-
export interface ModalProps {
|
|
187
|
-
header?: React.ReactNode;
|
|
188
|
-
accessibilityModalLabel: string;
|
|
189
|
-
children?: ReactChildren;
|
|
190
|
-
closeOnOutsideClick?: boolean;
|
|
191
|
-
footer?: ReactChild;
|
|
192
|
-
heading?: string | ReactChild;
|
|
193
|
-
onDismiss: () => void;
|
|
194
|
-
role?: "alertdialog" | "dialog";
|
|
195
|
-
size?: "sm" | "md" | "lg" | number;
|
|
196
|
-
}
|
|
197
127
|
export interface BoxProps {
|
|
198
128
|
alignContent?: AlignContent;
|
|
199
129
|
alignItems?: AlignItems;
|
|
@@ -295,27 +225,10 @@ export interface BoxProps {
|
|
|
295
225
|
testID?: string;
|
|
296
226
|
}
|
|
297
227
|
export type BoxColor = AllColors | "transparent";
|
|
298
|
-
export interface DrawerProps {
|
|
299
|
-
animationOpenTime: number;
|
|
300
|
-
animationCloseTime: number;
|
|
301
|
-
direction: Direction;
|
|
302
|
-
dismissWhenTouchOutside?: boolean;
|
|
303
|
-
fadeOpacity?: number;
|
|
304
|
-
drawerScreenWidth: number;
|
|
305
|
-
drawerScreenHeight: number;
|
|
306
|
-
style?: any;
|
|
307
|
-
parent: any;
|
|
308
|
-
dismiss?: any;
|
|
309
|
-
}
|
|
310
|
-
export type DrawerDirection = "left" | "right" | "bottom" | "top";
|
|
311
228
|
export interface ErrorBoundaryProps {
|
|
312
229
|
onError?: (error: Error, stack: any) => void;
|
|
313
230
|
children?: ReactNode;
|
|
314
231
|
}
|
|
315
|
-
export interface FaceBookButtonProps {
|
|
316
|
-
errorMessageColor?: "red" | "white";
|
|
317
|
-
signUp: boolean;
|
|
318
|
-
}
|
|
319
232
|
export interface IconProps {
|
|
320
233
|
prefix?: IconPrefix;
|
|
321
234
|
name: IconName;
|
|
@@ -323,9 +236,7 @@ export interface IconProps {
|
|
|
323
236
|
size?: IconSize;
|
|
324
237
|
iconStyle?: any;
|
|
325
238
|
containerStyle?: any;
|
|
326
|
-
|
|
327
|
-
export interface NavigatorProps {
|
|
328
|
-
config?: any;
|
|
239
|
+
testID?: string;
|
|
329
240
|
}
|
|
330
241
|
export type TooltipDirection = "top" | "bottom" | "left" | "right";
|
|
331
242
|
export type IndicatorDirection = "topLeft" | "topRight" | "bottomLeft" | "bottomRight";
|
|
@@ -348,6 +259,7 @@ export interface SegmentedControlProps {
|
|
|
348
259
|
selectLimit?: number;
|
|
349
260
|
}
|
|
350
261
|
export interface FieldWithLabelsProps {
|
|
262
|
+
testID?: string;
|
|
351
263
|
errorMessage?: string;
|
|
352
264
|
errorMessageColor?: AllColors;
|
|
353
265
|
label?: string;
|
|
@@ -393,9 +305,6 @@ export interface TextFieldProps extends FieldWithLabelsProps {
|
|
|
393
305
|
max?: number;
|
|
394
306
|
}
|
|
395
307
|
export type TextAreaProps = TextFieldProps;
|
|
396
|
-
export interface SubmittingFormProps {
|
|
397
|
-
onSubmitEditting: () => void;
|
|
398
|
-
}
|
|
399
308
|
export interface SwitchProps extends FieldWithLabelsProps {
|
|
400
309
|
id?: string;
|
|
401
310
|
onChange: (value: boolean) => void;
|
|
@@ -435,6 +344,7 @@ export interface HeadingProps {
|
|
|
435
344
|
overflow?: "normal" | "breakWord";
|
|
436
345
|
size?: "sm" | "md" | "lg";
|
|
437
346
|
truncate?: boolean;
|
|
347
|
+
testID?: string;
|
|
438
348
|
}
|
|
439
349
|
export interface MetaProps {
|
|
440
350
|
itemProp?: string;
|
|
@@ -484,379 +394,811 @@ export interface CheckBoxProps {
|
|
|
484
394
|
label?: string;
|
|
485
395
|
subLabel?: string;
|
|
486
396
|
labelColor?: AllColors;
|
|
397
|
+
testID?: string;
|
|
487
398
|
}
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
399
|
+
interface LayoutRectangle {
|
|
400
|
+
x: number;
|
|
401
|
+
y: number;
|
|
402
|
+
width: number;
|
|
403
|
+
height: number;
|
|
492
404
|
}
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
405
|
+
interface LayoutChangeEvent {
|
|
406
|
+
nativeEvent: {
|
|
407
|
+
layout: LayoutRectangle;
|
|
408
|
+
};
|
|
409
|
+
}
|
|
410
|
+
export interface SplitPageProps {
|
|
499
411
|
/**
|
|
500
|
-
*
|
|
501
|
-
*
|
|
502
|
-
*
|
|
503
|
-
* return (
|
|
504
|
-
* <ScrollView contentContainerStyle={styles.contentContainer}>
|
|
505
|
-
* </ScrollView>
|
|
506
|
-
* );
|
|
507
|
-
* ...
|
|
508
|
-
* const styles = StyleSheet.create({
|
|
509
|
-
* contentContainer: {
|
|
510
|
-
* paddingVertical: 20
|
|
511
|
-
* }
|
|
512
|
-
* });
|
|
412
|
+
* can accept either one React Child or any array of ReactChild. If this is not provided,
|
|
413
|
+
* renderContent must return one or many ReactChild.
|
|
513
414
|
*/
|
|
514
|
-
|
|
415
|
+
children?: ReactChild | ReactChild[] | null;
|
|
515
416
|
/**
|
|
516
|
-
*
|
|
517
|
-
*
|
|
417
|
+
* The names of the tabs that will be generated per ReactChild provided.
|
|
418
|
+
* Tabs will not be generated if renderContent is provided in place of children
|
|
518
419
|
*/
|
|
519
|
-
|
|
420
|
+
tabs?: string[];
|
|
421
|
+
selectLimit?: number;
|
|
422
|
+
bottomNavBarHeight?: number;
|
|
423
|
+
showItemList?: boolean;
|
|
424
|
+
loading?: boolean;
|
|
425
|
+
color?: Color;
|
|
426
|
+
keyboardOffset?: number;
|
|
427
|
+
renderListViewItem: (itemInfo: ListRenderItemInfo<any>) => ReactElement | null;
|
|
428
|
+
renderListViewHeader?: () => ReactElement | null;
|
|
429
|
+
renderContent?: (index?: number) => ReactElement | ReactElement[] | null;
|
|
430
|
+
listViewData: any[];
|
|
431
|
+
listViewExtraData?: any;
|
|
432
|
+
listViewWidth?: number;
|
|
433
|
+
renderChild?: () => ReactChild;
|
|
434
|
+
onSelectionChange?: (value?: any) => void | Promise<void>;
|
|
435
|
+
}
|
|
436
|
+
export type PermissionKind = "location" | "locationAlways" | "camera" | "microphone" | "photo" | "contacts" | "event" | "reminder" | "bluetooth" | "notification" | "backgroundRefresh" | "speechRecognition" | "mediaLibrary" | "motion";
|
|
437
|
+
export type PermissionStatus = "authorized" | "denied" | "softDenied" | "restricted" | "undetermined";
|
|
438
|
+
export interface AddressInterface {
|
|
439
|
+
address1: string;
|
|
440
|
+
address2?: string;
|
|
441
|
+
city: string;
|
|
442
|
+
state: string;
|
|
443
|
+
zipcode: string;
|
|
444
|
+
countyName?: string;
|
|
445
|
+
countyCode?: string;
|
|
446
|
+
}
|
|
447
|
+
export type ReactChild = ReactNode;
|
|
448
|
+
export type ReactChildren = ReactNode;
|
|
449
|
+
export type WithChildren<P> = P & {
|
|
450
|
+
children?: ReactNode;
|
|
451
|
+
};
|
|
452
|
+
export interface AddressAutocompleteProps {
|
|
453
|
+
disabled?: boolean;
|
|
454
|
+
googleMapsApiKey?: string;
|
|
455
|
+
includeCounty?: boolean;
|
|
456
|
+
inputValue: string;
|
|
457
|
+
styles?: Styles;
|
|
458
|
+
handleAddressChange: OnChangeCallback;
|
|
459
|
+
handleAutoCompleteChange: (value: AddressInterface) => void;
|
|
460
|
+
googlePlacesMobileStyles?: Styles;
|
|
461
|
+
testID?: string;
|
|
462
|
+
}
|
|
463
|
+
export type ActionSheetProps = {
|
|
464
|
+
children?: React.ReactNode;
|
|
465
|
+
ref?: React.MutableRefObject<{
|
|
466
|
+
/**
|
|
467
|
+
* Open or close the ActionSheet.
|
|
468
|
+
*/
|
|
469
|
+
setModalVisible(visible?: boolean): void;
|
|
470
|
+
/**
|
|
471
|
+
* Open the Action Sheet.
|
|
472
|
+
*/
|
|
473
|
+
show(): void;
|
|
474
|
+
/**
|
|
475
|
+
* Close the ActionSheet.
|
|
476
|
+
*/
|
|
477
|
+
hide(): void;
|
|
478
|
+
/**
|
|
479
|
+
* Attach this to any child ScrollView Component's onScrollEndDrag,
|
|
480
|
+
* onMomentumScrollEnd,onScrollAnimationEnd callbacks to handle the ActionSheet
|
|
481
|
+
* closing and bouncing back properly.
|
|
482
|
+
*/
|
|
483
|
+
handleChildScrollEnd(): void;
|
|
484
|
+
/**
|
|
485
|
+
* Snap ActionSheet to given offset
|
|
486
|
+
*/
|
|
487
|
+
snapToOffset(offset: number): void;
|
|
488
|
+
}>;
|
|
520
489
|
/**
|
|
521
|
-
*
|
|
522
|
-
|
|
490
|
+
* Animate the opening and closing of ActionSheet.
|
|
491
|
+
|
|
492
|
+
| Type | Required |
|
|
493
|
+
| ---- | -------- |
|
|
494
|
+
| boolean | no |
|
|
495
|
+
|
|
496
|
+
Default: `true`
|
|
523
497
|
*/
|
|
498
|
+
animated?: boolean;
|
|
524
499
|
/**
|
|
525
|
-
*
|
|
526
|
-
*
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
500
|
+
* Use if you want to show the ActionSheet Partially on Opening.
|
|
501
|
+
* **Requires `gestureEnabled=true`**
|
|
502
|
+
|
|
503
|
+
| Type | Required |
|
|
504
|
+
| ---- | -------- |
|
|
505
|
+
| boolean | no |
|
|
506
|
+
|
|
507
|
+
Default:`1`
|
|
531
508
|
*/
|
|
509
|
+
initialOffsetFromBottom?: number;
|
|
532
510
|
/**
|
|
533
|
-
*
|
|
534
|
-
*
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
511
|
+
* When touch ends and user has not moved farther from the set springOffset,
|
|
512
|
+
* the ActionSheet will return to previous position.
|
|
513
|
+
|
|
514
|
+
| Type | Required |
|
|
515
|
+
| ---- | -------- |
|
|
516
|
+
| number | no |
|
|
517
|
+
|
|
518
|
+
Default: `50`
|
|
539
519
|
*/
|
|
540
|
-
|
|
520
|
+
springOffset?: number;
|
|
541
521
|
/**
|
|
542
|
-
*
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
522
|
+
* Add elevation to the ActionSheet container.
|
|
523
|
+
|
|
524
|
+
| Type | Required |
|
|
525
|
+
| ---- | -------- |
|
|
526
|
+
| number | no |
|
|
527
|
+
|
|
528
|
+
Default: `0`
|
|
529
|
+
|
|
530
|
+
#
|
|
546
531
|
*/
|
|
532
|
+
elevation?: number;
|
|
547
533
|
/**
|
|
548
|
-
*
|
|
549
|
-
|
|
534
|
+
* Color of the gestureEnabled Indicator.
|
|
535
|
+
|
|
536
|
+
| Type | Required |
|
|
537
|
+
| ---- | -------- |
|
|
538
|
+
| string | no |
|
|
539
|
+
|
|
540
|
+
Default: `"#f0f0f0"`
|
|
550
541
|
*/
|
|
551
|
-
|
|
542
|
+
indicatorColor?: string;
|
|
552
543
|
/**
|
|
553
|
-
*
|
|
544
|
+
* Normally when the ActionSheet is fully opened, a small portion from the bottom is hidden by
|
|
545
|
+
* default. Use this prop if you want the ActionSheet to hover over the bottom of screen and not
|
|
546
|
+
* hide a little behind it.
|
|
547
|
+
|
|
548
|
+
| Type | Required |
|
|
549
|
+
| ---- | -------- |
|
|
550
|
+
| number | no |
|
|
551
|
+
|
|
552
|
+
Default:`0`
|
|
554
553
|
*/
|
|
554
|
+
extraScroll?: number;
|
|
555
555
|
/**
|
|
556
|
-
*
|
|
556
|
+
* Color of the overlay/backdrop.
|
|
557
|
+
|
|
558
|
+
| Type | Required |
|
|
559
|
+
| ---- | -------- |
|
|
560
|
+
| string | no |
|
|
561
|
+
|
|
562
|
+
Default: `"black"`
|
|
557
563
|
*/
|
|
564
|
+
overlayColor?: string;
|
|
558
565
|
/**
|
|
559
|
-
*
|
|
566
|
+
* Keep the header always visible even when gestures are disabled.
|
|
567
|
+
|
|
568
|
+
| Type | Required |
|
|
569
|
+
| ---- | -------- |
|
|
570
|
+
| boolean | no |
|
|
571
|
+
|
|
572
|
+
Default: `false`
|
|
560
573
|
*/
|
|
574
|
+
headerAlwaysVisible?: boolean;
|
|
561
575
|
/**
|
|
562
|
-
*
|
|
576
|
+
* Delay draw of ActionSheet on open for android.
|
|
577
|
+
|
|
578
|
+
| Type | Required |
|
|
579
|
+
| ---- | -------- |
|
|
580
|
+
| boolean | no |
|
|
581
|
+
|
|
582
|
+
Default: `false`
|
|
563
583
|
*/
|
|
584
|
+
delayActionSheetDraw?: boolean;
|
|
564
585
|
/**
|
|
565
|
-
*
|
|
566
|
-
|
|
567
|
-
|
|
586
|
+
* Delay draw of ActionSheet on open for android time.
|
|
587
|
+
|
|
588
|
+
| Type | Required |
|
|
589
|
+
| ---- | -------- |
|
|
590
|
+
| number (ms) | no |
|
|
591
|
+
|
|
592
|
+
Default: `50`
|
|
568
593
|
*/
|
|
594
|
+
delayActionSheetDrawTime?: number;
|
|
569
595
|
/**
|
|
570
|
-
*
|
|
596
|
+
* Your custom header component. Using this will hide the default indicator.
|
|
597
|
+
|
|
598
|
+
| Type | Required |
|
|
599
|
+
| ---- | -------- |
|
|
600
|
+
| React.Component | no |
|
|
571
601
|
*/
|
|
602
|
+
CustomHeaderComponent?: React.ReactNode;
|
|
572
603
|
/**
|
|
573
|
-
*
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
604
|
+
* Any custom styles for the container.
|
|
605
|
+
|
|
606
|
+
| Type | Required |
|
|
607
|
+
| ---- | -------- |
|
|
608
|
+
| Object | no |
|
|
577
609
|
*/
|
|
610
|
+
containerStyle?: ViewStyle;
|
|
578
611
|
/**
|
|
579
|
-
*
|
|
612
|
+
* Control closing ActionSheet by touching on backdrop.
|
|
613
|
+
|
|
614
|
+
| Type | Required |
|
|
615
|
+
| ---- | -------- |
|
|
616
|
+
| boolean | no |
|
|
617
|
+
|
|
618
|
+
Default: `true`
|
|
580
619
|
*/
|
|
620
|
+
closeOnTouchBackdrop?: boolean;
|
|
581
621
|
/**
|
|
582
|
-
*
|
|
622
|
+
* Speed of opening animation. Higher means the ActionSheet will open more quickly.
|
|
623
|
+
|
|
624
|
+
| Type | Required |
|
|
625
|
+
| ---- | -------- |
|
|
626
|
+
| number | no |
|
|
627
|
+
|
|
628
|
+
Default: `12`
|
|
583
629
|
*/
|
|
630
|
+
openAnimationSpeed?: number;
|
|
584
631
|
/**
|
|
585
|
-
*
|
|
632
|
+
* Duration of closing animation.
|
|
633
|
+
|
|
634
|
+
| Type | Required |
|
|
635
|
+
| ---- | -------- |
|
|
636
|
+
| number | no |
|
|
637
|
+
|
|
638
|
+
Default: `300`
|
|
586
639
|
*/
|
|
587
|
-
|
|
588
|
-
}
|
|
589
|
-
type ItemT = any;
|
|
590
|
-
type ViewStyle = any;
|
|
591
|
-
export interface StyleProp {
|
|
592
|
-
[key: string]: any;
|
|
593
|
-
}
|
|
594
|
-
interface LayoutRectangle {
|
|
595
|
-
x: number;
|
|
596
|
-
y: number;
|
|
597
|
-
width: number;
|
|
598
|
-
height: number;
|
|
599
|
-
}
|
|
600
|
-
interface LayoutChangeEvent {
|
|
601
|
-
nativeEvent: {
|
|
602
|
-
layout: LayoutRectangle;
|
|
603
|
-
};
|
|
604
|
-
}
|
|
605
|
-
interface RenderItemData {
|
|
606
|
-
item: any;
|
|
607
|
-
index: number;
|
|
608
|
-
}
|
|
609
|
-
export interface FlatListProps extends ScrollViewProps {
|
|
640
|
+
closeAnimationDuration?: number;
|
|
610
641
|
/**
|
|
611
|
-
*
|
|
642
|
+
*
|
|
643
|
+
How much you want the ActionSheet to bounce when it is opened.
|
|
644
|
+
|
|
645
|
+
| Type | Required |
|
|
646
|
+
| ---- | -------- |
|
|
647
|
+
| number | no |
|
|
648
|
+
|
|
649
|
+
Default: `8`
|
|
612
650
|
*/
|
|
613
|
-
|
|
651
|
+
bounciness?: number;
|
|
614
652
|
/**
|
|
615
|
-
*
|
|
653
|
+
* Will the ActionSheet close on `hardwareBackPress` event.
|
|
654
|
+
|
|
655
|
+
| Type | Required |
|
|
656
|
+
| ---- | -------- |
|
|
657
|
+
| boolean | no |
|
|
658
|
+
|
|
659
|
+
Default: `true`
|
|
616
660
|
*/
|
|
617
|
-
|
|
661
|
+
closeOnPressBack?: boolean;
|
|
618
662
|
/**
|
|
619
|
-
*
|
|
663
|
+
* Default opacity of the overlay/backdrop.
|
|
664
|
+
|
|
665
|
+
| Type | Required |
|
|
666
|
+
| ---- | -------- |
|
|
667
|
+
| number 0 - 1 | no |
|
|
668
|
+
|
|
669
|
+
Default: `0.3`
|
|
620
670
|
*/
|
|
621
|
-
|
|
671
|
+
defaultOverlayOpacity?: number;
|
|
622
672
|
/**
|
|
623
|
-
*
|
|
673
|
+
* Enables gesture control of ActionSheet
|
|
674
|
+
|
|
675
|
+
| Type | Required |
|
|
676
|
+
| ---- | -------- |
|
|
677
|
+
| boolean | no |
|
|
678
|
+
|
|
679
|
+
Default: `false`
|
|
624
680
|
*/
|
|
625
|
-
|
|
681
|
+
gestureEnabled?: boolean;
|
|
626
682
|
/**
|
|
627
|
-
*
|
|
683
|
+
* Bounces the ActionSheet on open.
|
|
684
|
+
|
|
685
|
+
| Type | Required |
|
|
686
|
+
| ---- | -------- |
|
|
687
|
+
| boolean | no |
|
|
688
|
+
|
|
689
|
+
Default: `false`
|
|
628
690
|
*/
|
|
629
|
-
|
|
691
|
+
bounceOnOpen?: boolean;
|
|
630
692
|
/**
|
|
631
|
-
*
|
|
693
|
+
* Setting the keyboard persistence of the ScrollView component, should be one of "never",
|
|
694
|
+
* "always", or "handled"
|
|
695
|
+
|
|
696
|
+
| Type | Required |
|
|
697
|
+
| ---- | -------- |
|
|
698
|
+
| string | no |
|
|
699
|
+
|
|
700
|
+
Default: `"never"`
|
|
632
701
|
*/
|
|
633
|
-
|
|
702
|
+
keyboardShouldPersistTaps?: boolean | "always" | "never" | "handled";
|
|
634
703
|
/**
|
|
635
|
-
*
|
|
704
|
+
* Determine whether the modal should go under the system statusbar.
|
|
705
|
+
|
|
706
|
+
| Type | Required |
|
|
707
|
+
| ---- | -------- |
|
|
708
|
+
| boolean | no |
|
|
709
|
+
|
|
710
|
+
Default: `true`
|
|
636
711
|
*/
|
|
637
|
-
|
|
712
|
+
statusBarTranslucent?: boolean;
|
|
638
713
|
/**
|
|
639
|
-
*
|
|
640
|
-
*
|
|
641
|
-
*
|
|
642
|
-
*
|
|
643
|
-
*
|
|
644
|
-
*
|
|
714
|
+
* Prevent ActionSheet from closing on
|
|
715
|
+
* gesture or tapping on backdrop.
|
|
716
|
+
* Instead snap it to `bottomOffset` location
|
|
717
|
+
*
|
|
718
|
+
*
|
|
719
|
+
* | Type | Required |
|
|
720
|
+
| ---- | -------- |
|
|
721
|
+
| boolean | no |
|
|
645
722
|
*/
|
|
646
|
-
|
|
723
|
+
closable?: boolean;
|
|
647
724
|
/**
|
|
648
|
-
*
|
|
649
|
-
*
|
|
725
|
+
* Allow ActionSheet to draw under the StatusBar.
|
|
726
|
+
* This is enabled by default.
|
|
727
|
+
*
|
|
728
|
+
*
|
|
729
|
+
* | Type | Required |
|
|
730
|
+
| ---- | -------- |
|
|
731
|
+
| boolean | no |
|
|
732
|
+
Default: `true`
|
|
650
733
|
*/
|
|
651
|
-
|
|
734
|
+
drawUnderStatusBar?: boolean;
|
|
652
735
|
/**
|
|
653
|
-
*
|
|
654
|
-
*
|
|
736
|
+
* Snap ActionSheet to this location if `closable` is set to false;
|
|
737
|
+
*
|
|
738
|
+
*
|
|
739
|
+
* | Type | Required |
|
|
740
|
+
| ---- | -------- |
|
|
741
|
+
| number | no |
|
|
655
742
|
*/
|
|
656
|
-
|
|
743
|
+
bottomOffset?: number;
|
|
657
744
|
/**
|
|
658
|
-
*
|
|
659
|
-
*
|
|
745
|
+
* Change how ActionSheet behaves when keyboard is opened.
|
|
746
|
+
*
|
|
747
|
+
*
|
|
748
|
+
* | Type | Required |
|
|
749
|
+
| ---- | -------- |
|
|
750
|
+
| "padding" | "position" | no |
|
|
751
|
+
Default:`padding`
|
|
660
752
|
*/
|
|
661
|
-
|
|
753
|
+
keyboardMode?: "padding" | "position";
|
|
662
754
|
/**
|
|
663
|
-
*
|
|
664
|
-
* unmounts react instances that are outside of the render window. You should only need to disable
|
|
665
|
-
* this for debugging purposes.
|
|
755
|
+
* Test ID for unit testing
|
|
666
756
|
*/
|
|
667
|
-
|
|
757
|
+
testID?: string;
|
|
668
758
|
/**
|
|
669
|
-
*
|
|
670
|
-
|
|
671
|
-
|
|
759
|
+
*
|
|
760
|
+
Event called when the ActionSheet closes.
|
|
761
|
+
|
|
762
|
+
|
|
763
|
+
* | Type | Required |
|
|
764
|
+
| ---- | -------- |
|
|
765
|
+
| function | no |
|
|
766
|
+
|
|
767
|
+
|
|
768
|
+
#
|
|
672
769
|
*/
|
|
673
|
-
|
|
770
|
+
onClose?: () => void;
|
|
674
771
|
/**
|
|
675
|
-
*
|
|
772
|
+
* An event called when the ActionSheet Opens.
|
|
773
|
+
|
|
774
|
+
| Type | Required |
|
|
775
|
+
| ---- | -------- |
|
|
776
|
+
| function | no |
|
|
676
777
|
*/
|
|
677
|
-
|
|
778
|
+
onOpen?: () => void;
|
|
678
779
|
/**
|
|
679
|
-
*
|
|
780
|
+
* Event called when position of ActionSheet changes.
|
|
680
781
|
*/
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
horizontal?: boolean | null;
|
|
782
|
+
onPositionChanged?: (hasReachedTop: boolean) => void;
|
|
783
|
+
};
|
|
784
|
+
export type AvatarStatus = "online" | "offline" | "doNotDisturb" | "away" | "meeting" | "vacation" | "sick" | "outOfOffice" | "commuting";
|
|
785
|
+
export interface AvatarProps {
|
|
786
|
+
backgroundColor?: AllColors;
|
|
787
|
+
textColor?: AllColors;
|
|
688
788
|
/**
|
|
689
|
-
*
|
|
690
|
-
* much more. Note these items will never be unmounted as part of the windowed rendering in order
|
|
691
|
-
* to improve perceived performance of scroll-to-top actions.
|
|
789
|
+
* The name of the user. This is used for the placeholder treatment if an image is not available.
|
|
692
790
|
*/
|
|
693
|
-
|
|
791
|
+
name: string;
|
|
694
792
|
/**
|
|
695
|
-
*
|
|
696
|
-
* disables the "scroll to top" optimization that keeps the first `initialNumToRender` items
|
|
697
|
-
* always rendered and immediately renders the items starting at this initial index. Requires
|
|
698
|
-
* `getItemLayout` to be implemented.
|
|
793
|
+
* Override the generated initials from `name`.
|
|
699
794
|
*/
|
|
700
|
-
|
|
795
|
+
initials?: string;
|
|
701
796
|
/**
|
|
702
|
-
*
|
|
797
|
+
* Adds a white border around Avatar so it's visible when displayed on other images.
|
|
703
798
|
*/
|
|
704
|
-
|
|
705
|
-
keyExtractor?: (item: ItemT, index: number) => string;
|
|
706
|
-
listKey?: string;
|
|
799
|
+
outline?: boolean;
|
|
707
800
|
/**
|
|
708
|
-
*
|
|
709
|
-
* once, the better the fill rate, but responsiveness my suffer because rendering content may
|
|
710
|
-
* interfere with responding to button taps or other interactions.
|
|
801
|
+
* xs: 24px, sm: 32px, md: 48px, lg: 64px, xl: 120px.
|
|
711
802
|
*/
|
|
712
|
-
|
|
713
|
-
onEndReached?: ((info: {
|
|
714
|
-
distanceFromEnd: number;
|
|
715
|
-
}) => void) | null;
|
|
716
|
-
onEndReachedThreshold?: number | null;
|
|
717
|
-
onLayout?: (event: LayoutChangeEvent) => void;
|
|
803
|
+
size?: "xs" | "sm" | "md" | "lg" | "xl";
|
|
718
804
|
/**
|
|
719
|
-
*
|
|
720
|
-
* sure to also set the `refreshing` prop correctly.
|
|
805
|
+
* The URL of the user's image.
|
|
721
806
|
*/
|
|
722
|
-
|
|
807
|
+
src?: string;
|
|
723
808
|
/**
|
|
724
|
-
*
|
|
725
|
-
*
|
|
726
|
-
* as possible and then try again after more items have been rendered.
|
|
809
|
+
* The fit for the image within the Avatar: "cover" | "contain" | "none".
|
|
810
|
+
* Default is undefined. See Image.tsx for more info
|
|
727
811
|
*/
|
|
728
|
-
|
|
729
|
-
index: number;
|
|
730
|
-
highestMeasuredFrameIndex: number;
|
|
731
|
-
averageItemLength: number;
|
|
732
|
-
}) => void;
|
|
812
|
+
imageFit?: "cover" | "contain" | "none";
|
|
733
813
|
/**
|
|
734
|
-
*
|
|
735
|
-
* `viewabilityConfig` prop.
|
|
814
|
+
* Allow user to edit the image of the avatar
|
|
736
815
|
*/
|
|
737
|
-
|
|
738
|
-
viewableItems: any[];
|
|
739
|
-
changed: any[];
|
|
740
|
-
}) => void) | null;
|
|
816
|
+
editAvatarImage?: boolean;
|
|
741
817
|
/**
|
|
742
|
-
*
|
|
743
|
-
* @platform android
|
|
818
|
+
* Function to handle the avatar image edit
|
|
744
819
|
*/
|
|
745
|
-
|
|
820
|
+
onChange?: (val: any) => void;
|
|
746
821
|
/**
|
|
747
|
-
*
|
|
822
|
+
* Resize image width. If only the width is provided, the image will preserve aspect ratio
|
|
748
823
|
*/
|
|
749
|
-
|
|
824
|
+
avatarImageWidth?: number;
|
|
750
825
|
/**
|
|
751
|
-
*
|
|
752
|
-
*
|
|
753
|
-
* This may improve scroll performance for large lists.
|
|
826
|
+
* Resize image height. If avatarImageWidth is also provided, the image aspect ratio may be
|
|
827
|
+
* distorted.
|
|
754
828
|
*/
|
|
755
|
-
|
|
829
|
+
avatarImageHeight?: number;
|
|
756
830
|
/**
|
|
757
|
-
*
|
|
831
|
+
* The image format that the image will be saved as after any edits by the expo-image-manipulator
|
|
758
832
|
*/
|
|
759
|
-
|
|
833
|
+
avatarImageFormat?: SaveFormat;
|
|
760
834
|
/**
|
|
761
|
-
*
|
|
762
|
-
* screen. Similar fill rate/responsiveness tradeoff as `maxToRenderPerBatch`.
|
|
835
|
+
* The status of the user to display with the avatar.
|
|
763
836
|
*/
|
|
764
|
-
|
|
765
|
-
viewabilityConfig?: any;
|
|
766
|
-
viewabilityConfigCallbackPairs?: any;
|
|
837
|
+
status?: AvatarStatus;
|
|
767
838
|
/**
|
|
768
|
-
*
|
|
769
|
-
*
|
|
770
|
-
*
|
|
771
|
-
* this number will reduce memory consumption and may improve performance, but will increase the
|
|
772
|
-
* chance that fast scrolling may reveal momentary blank areas of unrendered content.
|
|
839
|
+
* If true, the status indicator will show a mobile icon instead of a dot, if status is one of
|
|
840
|
+
* "online", "away", "offline", or "doNotDisturb". Will show the normal status icon in other
|
|
841
|
+
* cases.
|
|
773
842
|
*/
|
|
774
|
-
|
|
775
|
-
renderItem: (info: RenderItemData) => React.ReactElement | null;
|
|
776
|
-
}
|
|
777
|
-
export interface PickerProps {
|
|
778
|
-
onValueChange?: (itemValue: any, itemPosition: number) => void;
|
|
779
|
-
selectedValue?: any;
|
|
780
|
-
style?: StyleProp;
|
|
781
|
-
testID?: string;
|
|
782
|
-
itemStyle?: StyleProp;
|
|
783
|
-
enabled?: boolean;
|
|
784
|
-
mode?: "dialog" | "dropdown";
|
|
785
|
-
prompt?: string;
|
|
786
|
-
}
|
|
787
|
-
export interface SplitPageProps {
|
|
843
|
+
statusMobile?: boolean;
|
|
788
844
|
/**
|
|
789
|
-
*
|
|
790
|
-
* renderContent must return one or many ReactChild.
|
|
845
|
+
* Text to show when hovering over the avatar image. Only works on web.
|
|
791
846
|
*/
|
|
792
|
-
|
|
847
|
+
statusText?: string;
|
|
793
848
|
/**
|
|
794
|
-
*
|
|
849
|
+
* If edit icon should be present when no image is present
|
|
795
850
|
*/
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
851
|
+
shouldShowEditIconIfNoImage?: boolean;
|
|
852
|
+
}
|
|
853
|
+
export interface BadgeProps {
|
|
854
|
+
title: string;
|
|
855
|
+
position?: "top" | "middle";
|
|
856
|
+
type?: "info" | "error" | "warning" | "success" | "neutral" | "custom";
|
|
857
|
+
color?: AllColors;
|
|
858
|
+
}
|
|
859
|
+
export interface BannerProps {
|
|
860
|
+
id: string;
|
|
861
|
+
dismissible?: boolean;
|
|
862
|
+
text: string;
|
|
863
|
+
subtext?: string;
|
|
864
|
+
iconName?: IconName;
|
|
865
|
+
color?: BoxColor;
|
|
866
|
+
textColor?: TextColor;
|
|
867
|
+
negativeXMargin?: number;
|
|
868
|
+
shape?: Rounding;
|
|
869
|
+
type?: "dismiss" | "action" | "permanent";
|
|
870
|
+
onClick?: () => void;
|
|
871
|
+
}
|
|
872
|
+
export interface BodyProps {
|
|
873
|
+
scroll?: boolean;
|
|
800
874
|
loading?: boolean;
|
|
875
|
+
padding?: UnsignedUpTo12;
|
|
876
|
+
height?: number | string;
|
|
877
|
+
avoidKeyboard?: boolean;
|
|
878
|
+
children?: ReactNode;
|
|
879
|
+
}
|
|
880
|
+
export interface ButtonProps {
|
|
881
|
+
children?: React.ReactElement;
|
|
882
|
+
text: string;
|
|
883
|
+
color?: ButtonColor | Color;
|
|
884
|
+
disabled?: boolean;
|
|
885
|
+
inline?: boolean;
|
|
886
|
+
size?: "sm" | "md" | "lg";
|
|
887
|
+
type?: "solid" | "ghost" | "outline";
|
|
888
|
+
loading?: boolean;
|
|
889
|
+
onClick: any;
|
|
890
|
+
icon?: IconName;
|
|
891
|
+
iconPrefix?: IconPrefix;
|
|
892
|
+
iconColor?: ButtonColor | Color;
|
|
893
|
+
withConfirmation?: boolean;
|
|
894
|
+
confirmationText?: string;
|
|
895
|
+
confirmationHeading?: string;
|
|
896
|
+
shape?: "rounded" | "pill";
|
|
897
|
+
testID?: string;
|
|
898
|
+
tooltip?: {
|
|
899
|
+
text: string;
|
|
900
|
+
idealDirection?: TooltipDirection;
|
|
901
|
+
};
|
|
902
|
+
}
|
|
903
|
+
export interface CustomSelectProps {
|
|
904
|
+
value: string;
|
|
905
|
+
onChange: (value: string) => void;
|
|
906
|
+
options: Array<{
|
|
907
|
+
label: string;
|
|
908
|
+
value: string;
|
|
909
|
+
}>;
|
|
910
|
+
placeholder?: string;
|
|
911
|
+
disabled?: boolean;
|
|
912
|
+
label?: string;
|
|
913
|
+
labelColor?: string;
|
|
914
|
+
}
|
|
915
|
+
export interface DateTimeActionSheetProps {
|
|
916
|
+
value?: string;
|
|
917
|
+
mode?: "date" | "time" | "datetime";
|
|
918
|
+
onChange: OnChangeCallback;
|
|
919
|
+
actionSheetRef: React.RefObject<any>;
|
|
920
|
+
visible: boolean;
|
|
921
|
+
onDismiss: () => void;
|
|
922
|
+
}
|
|
923
|
+
export interface DecimalRangeActionSheetProps {
|
|
924
|
+
value: string;
|
|
925
|
+
min: number;
|
|
926
|
+
max: number;
|
|
927
|
+
onChange: OnChangeCallback;
|
|
928
|
+
actionSheetRef: React.RefObject<any>;
|
|
929
|
+
}
|
|
930
|
+
export interface DecimalRangeActionSheetState {
|
|
931
|
+
whole: string;
|
|
932
|
+
decimal: string;
|
|
933
|
+
}
|
|
934
|
+
export interface ErrorPageProps {
|
|
935
|
+
error: Error;
|
|
936
|
+
resetError: () => void;
|
|
937
|
+
}
|
|
938
|
+
export interface FieldProps extends FieldWithLabelsProps {
|
|
939
|
+
name?: string;
|
|
940
|
+
label?: string;
|
|
941
|
+
height?: number;
|
|
942
|
+
type?: "address" | "boolean" | "currency" | "customSelect" | "date" | "datetime" | "email" | "multiselect" | "number" | "password" | "percent" | "phoneNumber" | "select" | "text" | "textarea" | "time" | "url";
|
|
943
|
+
rows?: number;
|
|
944
|
+
value?: any;
|
|
945
|
+
onChange?: any;
|
|
946
|
+
options?: SelectListOptions;
|
|
947
|
+
placeholder?: string;
|
|
948
|
+
disabled?: boolean;
|
|
949
|
+
useCheckbox?: boolean;
|
|
950
|
+
includeCounty?: boolean;
|
|
951
|
+
googleMapsApiKey?: string;
|
|
952
|
+
googlePlacesMobileStyles?: Styles;
|
|
953
|
+
}
|
|
954
|
+
export interface FormLineProps {
|
|
955
|
+
name: string;
|
|
956
|
+
value: any;
|
|
957
|
+
onSave: (value: any) => void;
|
|
958
|
+
kind: "boolean" | "string" | "textarea" | "select" | "multiboolean";
|
|
959
|
+
options?: string[];
|
|
960
|
+
}
|
|
961
|
+
export interface HeightActionSheetProps {
|
|
962
|
+
value?: string;
|
|
963
|
+
onChange: OnChangeCallback;
|
|
964
|
+
actionSheetRef: React.RefObject<any>;
|
|
965
|
+
}
|
|
966
|
+
export interface HyperlinkProps {
|
|
967
|
+
linkDefault?: boolean;
|
|
968
|
+
linkify?: any;
|
|
969
|
+
linkStyle?: StyleProp<any>;
|
|
970
|
+
linkText?: string | ((url: string) => string);
|
|
971
|
+
onPress?: (url: string) => void;
|
|
972
|
+
onLongPress?: (url: string, text: string) => void;
|
|
973
|
+
injectViewProps?: (url: string) => any;
|
|
974
|
+
children?: React.ReactNode;
|
|
975
|
+
style?: StyleProp<any>;
|
|
976
|
+
}
|
|
977
|
+
export interface IconButtonProps {
|
|
978
|
+
prefix?: IconPrefix;
|
|
979
|
+
icon: IconName;
|
|
980
|
+
accessibilityLabel: string;
|
|
981
|
+
iconColor: "darkGray" | ButtonColor | ThemeColor | Color;
|
|
982
|
+
onClick: () => void;
|
|
983
|
+
size?: IconSize;
|
|
984
|
+
bgColor?: "transparent" | "transparentDarkGray" | "gray" | "lightGray" | "white" | "background" | "backgroundSecondary";
|
|
985
|
+
disabled?: boolean;
|
|
986
|
+
selected?: boolean;
|
|
987
|
+
withConfirmation?: boolean;
|
|
988
|
+
confirmationText?: string;
|
|
989
|
+
confirmationHeading?: string;
|
|
990
|
+
tooltip?: {
|
|
991
|
+
text: string;
|
|
992
|
+
idealDirection?: TooltipDirection;
|
|
993
|
+
};
|
|
994
|
+
indicator?: boolean;
|
|
995
|
+
indicatorStyle?: {
|
|
996
|
+
position: IndicatorDirection;
|
|
997
|
+
color: AllColors;
|
|
998
|
+
};
|
|
999
|
+
testID?: string;
|
|
1000
|
+
}
|
|
1001
|
+
export interface InfoTooltipButtonProps {
|
|
1002
|
+
text: string;
|
|
1003
|
+
size?: IconSize;
|
|
1004
|
+
}
|
|
1005
|
+
export interface ModalProps {
|
|
1006
|
+
onDismiss: () => void;
|
|
1007
|
+
visible: boolean;
|
|
1008
|
+
align?: "center" | "start";
|
|
1009
|
+
children?: React.ReactElement;
|
|
1010
|
+
footer?: React.ReactElement;
|
|
1011
|
+
heading?: string;
|
|
1012
|
+
size?: "sm" | "md" | "lg";
|
|
1013
|
+
subHeading?: string;
|
|
1014
|
+
primaryButtonText?: string;
|
|
1015
|
+
primaryButtonOnClick?: (value?: any) => void;
|
|
1016
|
+
primaryButtonDisabled?: boolean;
|
|
1017
|
+
secondaryButtonText?: string;
|
|
1018
|
+
secondaryButtonOnClick?: (value?: any) => void;
|
|
1019
|
+
showClose?: boolean;
|
|
1020
|
+
}
|
|
1021
|
+
export interface NumberPickerActionSheetProps {
|
|
1022
|
+
value: string;
|
|
1023
|
+
min: number;
|
|
1024
|
+
max: number;
|
|
1025
|
+
onChange: OnChangeCallback;
|
|
1026
|
+
actionSheetRef: React.RefObject<any>;
|
|
1027
|
+
}
|
|
1028
|
+
export interface PageProps {
|
|
1029
|
+
navigation: any;
|
|
1030
|
+
scroll?: boolean;
|
|
1031
|
+
loading?: boolean;
|
|
1032
|
+
display?: "flex" | "none" | "block" | "inlineBlock";
|
|
1033
|
+
title?: string;
|
|
1034
|
+
backButton?: boolean;
|
|
1035
|
+
closeButton?: boolean;
|
|
1036
|
+
direction?: "row" | "column";
|
|
1037
|
+
padding?: UnsignedUpTo12;
|
|
801
1038
|
color?: Color;
|
|
1039
|
+
maxWidth?: number | string;
|
|
802
1040
|
keyboardOffset?: number;
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
listViewWidth?: number;
|
|
809
|
-
renderChild?: () => ReactChild;
|
|
810
|
-
onSelectionChange?: (value?: any) => void | Promise<void>;
|
|
1041
|
+
footer?: any;
|
|
1042
|
+
rightButton?: string;
|
|
1043
|
+
rightButtonOnClick?: () => void;
|
|
1044
|
+
children?: any;
|
|
1045
|
+
onError?: (error: Error, stack: any) => void;
|
|
811
1046
|
}
|
|
812
|
-
export
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
trackPages: () => void;
|
|
823
|
-
setUser: (user: BaseProfile) => void;
|
|
824
|
-
setUserProperty: (property: string, value: string | {
|
|
825
|
-
object: {
|
|
826
|
-
[id: string]: any;
|
|
827
|
-
};
|
|
828
|
-
}) => void;
|
|
829
|
-
track: (eventName: string, properties?: TrackingProperties) => void;
|
|
830
|
-
trackNavigation: (screen: string, properties?: TrackingProperties) => void;
|
|
831
|
-
trackLogin: (method: string, success: boolean, properties?: TrackingProperties) => void;
|
|
832
|
-
trackSignup: (method: string, success: boolean, properties?: TrackingProperties) => void;
|
|
833
|
-
trackSignOut: () => void;
|
|
834
|
-
log: (message: string, properties?: TrackingProperties, level?: LogLevel) => void;
|
|
835
|
-
error: (message: string, properties?: TrackingProperties) => void;
|
|
836
|
-
warn: (message: string, properties?: TrackingProperties) => void;
|
|
837
|
-
debug: (message: string, properties?: TrackingProperties) => void;
|
|
838
|
-
handleErrorAlert: (text: string, exception?: Error, showAlert?: boolean) => void;
|
|
839
|
-
trackPermission: (kind: PermissionKind, status: PermissionStatus, requested: boolean) => void;
|
|
840
|
-
updateAppInfo: () => void;
|
|
841
|
-
}
|
|
842
|
-
export interface NavConfig {
|
|
843
|
-
url?: string;
|
|
844
|
-
wrapper?: (component: any) => any;
|
|
845
|
-
store?: any;
|
|
846
|
-
provider?: any;
|
|
1047
|
+
export interface PogProps {
|
|
1048
|
+
active?: boolean;
|
|
1049
|
+
bgColor?: "transparent" | "transparentDarkGray" | "gray" | "lightGray" | "white" | "blue";
|
|
1050
|
+
focused?: boolean;
|
|
1051
|
+
hovered?: boolean;
|
|
1052
|
+
selected?: boolean;
|
|
1053
|
+
iconColor?: AllColors;
|
|
1054
|
+
icon: IconName;
|
|
1055
|
+
iconPrefix?: IconPrefix;
|
|
1056
|
+
size?: IconSize;
|
|
847
1057
|
}
|
|
848
|
-
export interface
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
1058
|
+
export interface ProgressBarProps {
|
|
1059
|
+
color: Color;
|
|
1060
|
+
completed: number;
|
|
1061
|
+
}
|
|
1062
|
+
export interface SideDrawerProps {
|
|
1063
|
+
position?: "right" | "left";
|
|
1064
|
+
isOpen: boolean;
|
|
1065
|
+
renderContent: () => ReactElement | ReactElement[];
|
|
1066
|
+
onClose?: () => void;
|
|
1067
|
+
onOpen?: () => void;
|
|
1068
|
+
drawerType?: "front" | "back" | "slide" | "permanent";
|
|
1069
|
+
children?: ReactElement;
|
|
1070
|
+
drawerStyles?: StyleProp<ViewStyle>;
|
|
1071
|
+
}
|
|
1072
|
+
export interface SpinnerProps {
|
|
1073
|
+
size?: "sm" | "md";
|
|
1074
|
+
color?: Color;
|
|
1075
|
+
}
|
|
1076
|
+
export interface TableProps {
|
|
1077
|
+
/**
|
|
1078
|
+
* Must be instances of TableHeader, TableRow, and/or TableFooter components.
|
|
1079
|
+
*/
|
|
1080
|
+
children: React.ReactNode | React.ReactNode[];
|
|
1081
|
+
/**
|
|
1082
|
+
* Width of columns in the table. This is used to calculate the width of each column.
|
|
1083
|
+
* Can be numbers for pixels or strings for percentages.
|
|
1084
|
+
*/
|
|
1085
|
+
columns: Array<number | string>;
|
|
1086
|
+
/**
|
|
1087
|
+
* Specify a border width for Table: "sm" is 1px.
|
|
1088
|
+
*/
|
|
1089
|
+
borderStyle?: "sm" | "none";
|
|
1090
|
+
/**
|
|
1091
|
+
* Use numbers for pixels: `maxHeight={100}` and strings for percentages: `maxHeight="100%"`.
|
|
1092
|
+
*/
|
|
1093
|
+
maxHeight?: DimensionValue;
|
|
1094
|
+
/**
|
|
1095
|
+
* If true, the header will stick to the top of the table when scrolling. Defaults to true.
|
|
1096
|
+
*/
|
|
1097
|
+
stickyHeader?: boolean;
|
|
1098
|
+
/**
|
|
1099
|
+
* If true, alternate rows will have a light gray background. Defaults to true.
|
|
1100
|
+
*/
|
|
1101
|
+
alternateRowBackground?: boolean;
|
|
1102
|
+
}
|
|
1103
|
+
export interface TableHeaderProps {
|
|
1104
|
+
/**
|
|
1105
|
+
* Must be an instance of TableRow.
|
|
1106
|
+
*/
|
|
1107
|
+
children: React.ReactNode | React.ReactNode[];
|
|
1108
|
+
/**
|
|
1109
|
+
* Display `visuallyHidden` ensures the component is visually hidden but still is read by screen
|
|
1110
|
+
* readers.
|
|
1111
|
+
*/
|
|
1112
|
+
display?: "tableHeaderGroup" | "visuallyHidden";
|
|
1113
|
+
/**
|
|
1114
|
+
* If true, the table header will be sticky and the table body will be scrollable. Not yet
|
|
1115
|
+
* implemented.
|
|
1116
|
+
*/
|
|
1117
|
+
sticky?: boolean;
|
|
1118
|
+
color?: BoxColor;
|
|
1119
|
+
}
|
|
1120
|
+
export interface TableHeaderCellProps {
|
|
1121
|
+
/**
|
|
1122
|
+
* The content of the table header cell.
|
|
1123
|
+
*/
|
|
1124
|
+
children: ReactElement;
|
|
1125
|
+
index: number;
|
|
1126
|
+
sortable?: boolean;
|
|
1127
|
+
onSortChange?: (direction: "asc" | "desc" | undefined) => void;
|
|
1128
|
+
}
|
|
1129
|
+
export interface TableRowProps {
|
|
1130
|
+
/**
|
|
1131
|
+
* Must be instances of TableCell or TableHeaderCell.
|
|
1132
|
+
*/
|
|
1133
|
+
children: React.ReactNode | React.ReactNode[];
|
|
1134
|
+
/**
|
|
1135
|
+
* Header rows have an extra thick bottom border.
|
|
1136
|
+
*/
|
|
1137
|
+
headerRow?: boolean;
|
|
1138
|
+
/**
|
|
1139
|
+
* Whether the row should start expanded or not.
|
|
1140
|
+
*/
|
|
1141
|
+
expanded?: boolean;
|
|
1142
|
+
/**
|
|
1143
|
+
* When the row is expanded, the drawerContents are shown. If not
|
|
1144
|
+
*/
|
|
1145
|
+
drawerContents?: React.ReactNode | React.ReactNode[];
|
|
1146
|
+
/**
|
|
1147
|
+
* Background color of the row. Defaults to white.
|
|
1148
|
+
*/
|
|
1149
|
+
color?: BoxColor;
|
|
1150
|
+
}
|
|
1151
|
+
export interface TextProps {
|
|
1152
|
+
align?: "left" | "right" | "center" | "justify";
|
|
1153
|
+
children?: React.ReactNode;
|
|
1154
|
+
color?: AllColors;
|
|
1155
|
+
inline?: boolean;
|
|
1156
|
+
italic?: boolean;
|
|
1157
|
+
onPress?: () => void;
|
|
1158
|
+
overflow?: "normal" | "breakWord";
|
|
1159
|
+
size?: TextSize;
|
|
1160
|
+
truncate?: boolean;
|
|
1161
|
+
font?: Font;
|
|
1162
|
+
underline?: boolean;
|
|
1163
|
+
numberOfLines?: number;
|
|
1164
|
+
skipLinking?: boolean;
|
|
1165
|
+
weight?: "bold" | "normal";
|
|
1166
|
+
testID?: string;
|
|
1167
|
+
}
|
|
1168
|
+
export interface TextFieldPickerActionSheetProps {
|
|
1169
|
+
value?: string;
|
|
1170
|
+
mode?: "date" | "time";
|
|
1171
|
+
onChange: OnChangeCallback;
|
|
1172
|
+
actionSheetRef: React.RefObject<any>;
|
|
1173
|
+
}
|
|
1174
|
+
export interface ToastProps {
|
|
1175
|
+
message: string;
|
|
1176
|
+
data: {
|
|
1177
|
+
variant?: "default" | "warning" | "error";
|
|
1178
|
+
buttonText?: string;
|
|
1179
|
+
buttonOnClick?: () => void | Promise<void>;
|
|
1180
|
+
persistent?: boolean;
|
|
1181
|
+
onDismiss?: () => void;
|
|
1182
|
+
};
|
|
1183
|
+
}
|
|
1184
|
+
export interface TooltipProps {
|
|
1185
|
+
children: React.ReactElement;
|
|
1186
|
+
text?: string;
|
|
1187
|
+
idealDirection?: "top" | "bottom" | "left" | "right";
|
|
1188
|
+
bgColor?: "white" | "lightGray" | "gray" | "darkGray";
|
|
1189
|
+
}
|
|
1190
|
+
export interface LinkProps extends TextProps {
|
|
1191
|
+
href: string;
|
|
1192
|
+
}
|
|
1193
|
+
export interface WithLabelProps {
|
|
1194
|
+
children?: ReactChildren;
|
|
1195
|
+
show?: boolean;
|
|
1196
|
+
label?: string;
|
|
1197
|
+
labelInline?: boolean;
|
|
1198
|
+
labelColor?: AllColors;
|
|
1199
|
+
labelJustifyContent?: JustifyContent;
|
|
1200
|
+
labelAlignItems?: AlignItems;
|
|
1201
|
+
labelPlacement?: "before" | "after";
|
|
1202
|
+
labelSize?: TextSize;
|
|
856
1203
|
}
|
|
857
|
-
export type ReactChild = ReactNode;
|
|
858
|
-
export type ReactChildren = ReactNode;
|
|
859
|
-
export type WithChildren<P> = P & {
|
|
860
|
-
children?: ReactNode;
|
|
861
|
-
};
|
|
862
1204
|
export {};
|