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.
Files changed (197) hide show
  1. package/dist/ActionSheet.d.ts +2 -317
  2. package/dist/ActionSheet.js.map +1 -1
  3. package/dist/Avatar.d.ts +1 -70
  4. package/dist/Avatar.js +4 -4
  5. package/dist/Avatar.js.map +1 -1
  6. package/dist/Badge.d.ts +1 -8
  7. package/dist/Badge.js.map +1 -1
  8. package/dist/Banner.d.ts +1 -14
  9. package/dist/Banner.js.map +1 -1
  10. package/dist/Body.d.ts +2 -10
  11. package/dist/Body.js.map +1 -1
  12. package/dist/Box.js +4 -4
  13. package/dist/Box.js.map +1 -1
  14. package/dist/Button.d.ts +1 -24
  15. package/dist/Button.js.map +1 -1
  16. package/dist/Card.d.ts +1 -3
  17. package/dist/Card.js +14 -4
  18. package/dist/Card.js.map +1 -1
  19. package/dist/CheckBox.d.ts +1 -1
  20. package/dist/CheckBox.js +2 -2
  21. package/dist/CheckBox.js.map +1 -1
  22. package/dist/Common.d.ts +713 -371
  23. package/dist/Common.js +0 -35
  24. package/dist/Common.js.map +1 -1
  25. package/dist/CustomSelect.d.ts +1 -12
  26. package/dist/CustomSelect.js +6 -3
  27. package/dist/CustomSelect.js.map +1 -1
  28. package/dist/DateTimeActionSheet.d.ts +1 -10
  29. package/dist/DateTimeActionSheet.js +8 -10
  30. package/dist/DateTimeActionSheet.js.map +1 -1
  31. package/dist/DecimalRangeActionSheet.d.ts +1 -13
  32. package/dist/DecimalRangeActionSheet.js.map +1 -1
  33. package/dist/ErrorBoundary.d.ts +1 -1
  34. package/dist/ErrorPage.d.ts +1 -5
  35. package/dist/ErrorPage.js.map +1 -1
  36. package/dist/Field.d.ts +2 -20
  37. package/dist/Field.js +15 -15
  38. package/dist/Field.js.map +1 -1
  39. package/dist/Form.d.ts +1 -7
  40. package/dist/Form.js.map +1 -1
  41. package/dist/Heading.d.ts +1 -1
  42. package/dist/Heading.js +2 -2
  43. package/dist/Heading.js.map +1 -1
  44. package/dist/HeightActionSheet.d.ts +1 -6
  45. package/dist/HeightActionSheet.js.map +1 -1
  46. package/dist/Hyperlink.d.ts +2 -14
  47. package/dist/Hyperlink.js +2 -1
  48. package/dist/Hyperlink.js.map +1 -1
  49. package/dist/Icon.d.ts +1 -1
  50. package/dist/Icon.js +4 -3
  51. package/dist/Icon.js.map +1 -1
  52. package/dist/IconButton.d.ts +1 -24
  53. package/dist/IconButton.js +6 -6
  54. package/dist/IconButton.js.map +1 -1
  55. package/dist/InfoTooltipButton.d.ts +1 -6
  56. package/dist/InfoTooltipButton.js.map +1 -1
  57. package/dist/Link.d.ts +1 -5
  58. package/dist/Link.js.map +1 -1
  59. package/dist/MobileAddressAutoComplete.d.ts +2 -11
  60. package/dist/MobileAddressAutoComplete.js +2 -2
  61. package/dist/MobileAddressAutoComplete.js.map +1 -1
  62. package/dist/Modal.d.ts +1 -17
  63. package/dist/Modal.js +2 -2
  64. package/dist/Modal.js.map +1 -1
  65. package/dist/NumberPickerActionSheet.d.ts +1 -8
  66. package/dist/NumberPickerActionSheet.js.map +1 -1
  67. package/dist/Page.d.ts +1 -21
  68. package/dist/Page.js.map +1 -1
  69. package/dist/PickerSelect.d.ts +1 -2
  70. package/dist/Pill.d.ts +1 -3
  71. package/dist/Pill.js +3 -5
  72. package/dist/Pill.js.map +1 -1
  73. package/dist/Pog.d.ts +2 -14
  74. package/dist/Pog.js +1 -1
  75. package/dist/Pog.js.map +1 -1
  76. package/dist/ProgressBar.d.ts +1 -5
  77. package/dist/ProgressBar.js.map +1 -1
  78. package/dist/SelectList.d.ts +4 -2
  79. package/dist/SelectList.js.map +1 -1
  80. package/dist/SideDrawer.d.ts +1 -11
  81. package/dist/SideDrawer.js.map +1 -1
  82. package/dist/Spinner.d.ts +1 -5
  83. package/dist/Spinner.js +2 -1
  84. package/dist/Spinner.js.map +1 -1
  85. package/dist/Switch.d.ts +1 -3
  86. package/dist/Switch.js +15 -5
  87. package/dist/Switch.js.map +1 -1
  88. package/dist/Table.d.ts +1 -28
  89. package/dist/Table.js +4 -2
  90. package/dist/Table.js.map +1 -1
  91. package/dist/TableHeader.d.ts +1 -17
  92. package/dist/TableHeader.js.map +1 -1
  93. package/dist/TableHeaderCell.d.ts +2 -11
  94. package/dist/TableHeaderCell.js +1 -1
  95. package/dist/TableHeaderCell.js.map +1 -1
  96. package/dist/TableRow.d.ts +2 -25
  97. package/dist/TableRow.js.map +1 -1
  98. package/dist/TapToEdit.d.ts +1 -2
  99. package/dist/TapToEdit.js +2 -2
  100. package/dist/TapToEdit.js.map +1 -1
  101. package/dist/Text.d.ts +1 -18
  102. package/dist/Text.js.map +1 -1
  103. package/dist/TextArea.d.ts +1 -4
  104. package/dist/TextArea.js +3 -9
  105. package/dist/TextArea.js.map +1 -1
  106. package/dist/TextField.d.ts +1 -1
  107. package/dist/TextField.js +6 -5
  108. package/dist/TextField.js.map +1 -1
  109. package/dist/TextFieldNumberActionSheet.d.ts +2 -8
  110. package/dist/TextFieldNumberActionSheet.js.map +1 -1
  111. package/dist/Toast.d.ts +2 -10
  112. package/dist/Toast.js +1 -1
  113. package/dist/Toast.js.map +1 -1
  114. package/dist/Tooltip.d.ts +1 -7
  115. package/dist/Tooltip.js +8 -6
  116. package/dist/Tooltip.js.map +1 -1
  117. package/dist/UnifiedAddressAutoComplete.d.ts +2 -11
  118. package/dist/UnifiedAddressAutoComplete.js +4 -4
  119. package/dist/UnifiedAddressAutoComplete.js.map +1 -1
  120. package/dist/Utilities.d.ts +3 -0
  121. package/dist/Utilities.js +24 -0
  122. package/dist/Utilities.js.map +1 -1
  123. package/dist/WebAddressAutocomplete.d.ts +2 -9
  124. package/dist/WebAddressAutocomplete.js +1 -0
  125. package/dist/WebAddressAutocomplete.js.map +1 -1
  126. package/dist/WithLabel.d.ts +1 -12
  127. package/dist/WithLabel.js.map +1 -1
  128. package/dist/dayjsExtended.js +1 -0
  129. package/dist/dayjsExtended.js.map +1 -1
  130. package/dist/index.d.ts +6 -7
  131. package/dist/index.js +0 -2
  132. package/dist/index.js.map +1 -1
  133. package/package.json +17 -39
  134. package/src/ActionSheet.tsx +1 -351
  135. package/src/Avatar.tsx +5 -85
  136. package/src/Badge.tsx +1 -12
  137. package/src/Banner.tsx +1 -15
  138. package/src/Body.tsx +2 -11
  139. package/src/Box.tsx +4 -4
  140. package/src/Button.tsx +1 -27
  141. package/src/Card.tsx +15 -17
  142. package/src/CheckBox.tsx +2 -0
  143. package/src/Common.ts +801 -531
  144. package/src/CustomSelect.tsx +7 -13
  145. package/src/DateTimeActionSheet.tsx +9 -21
  146. package/src/DecimalRangeActionSheet.tsx +1 -14
  147. package/src/ErrorPage.tsx +1 -4
  148. package/src/Field.tsx +17 -37
  149. package/src/Form.tsx +1 -8
  150. package/src/Heading.tsx +8 -2
  151. package/src/HeightActionSheet.tsx +1 -7
  152. package/src/Hyperlink.tsx +7 -16
  153. package/src/Icon.tsx +4 -2
  154. package/src/IconButton.tsx +6 -43
  155. package/src/InfoTooltipButton.tsx +1 -6
  156. package/src/Link.tsx +2 -5
  157. package/src/MobileAddressAutoComplete.tsx +4 -11
  158. package/src/Modal.tsx +3 -26
  159. package/src/NumberPickerActionSheet.tsx +1 -9
  160. package/src/Page.tsx +1 -22
  161. package/src/PickerSelect.tsx +1 -1
  162. package/src/Pill.tsx +15 -17
  163. package/src/Pog.tsx +2 -14
  164. package/src/ProgressBar.tsx +1 -6
  165. package/src/SelectList.tsx +4 -4
  166. package/src/SideDrawer.tsx +1 -16
  167. package/src/Spinner.tsx +3 -7
  168. package/src/Switch.tsx +6 -12
  169. package/src/Table.tsx +5 -29
  170. package/src/TableHeader.tsx +1 -17
  171. package/src/TableHeaderCell.tsx +7 -11
  172. package/src/TableRow.tsx +2 -25
  173. package/src/TapToEdit.tsx +4 -4
  174. package/src/Text.tsx +1 -19
  175. package/src/TextArea.tsx +2 -10
  176. package/src/TextField.tsx +6 -3
  177. package/src/TextFieldNumberActionSheet.tsx +2 -9
  178. package/src/Toast.tsx +2 -14
  179. package/src/Tooltip.tsx +9 -15
  180. package/src/UnifiedAddressAutoComplete.tsx +6 -11
  181. package/src/Utilities.tsx +27 -1
  182. package/src/WebAddressAutocomplete.tsx +3 -9
  183. package/src/WithLabel.tsx +1 -13
  184. package/src/dayjsExtended.ts +1 -0
  185. package/src/index.tsx +6 -7
  186. package/dist/Layer.d.ts +0 -9
  187. package/dist/Layer.js +0 -12
  188. package/dist/Layer.js.map +0 -1
  189. package/dist/Meta.d.ts +0 -5
  190. package/dist/Meta.js +0 -7
  191. package/dist/Meta.js.map +0 -1
  192. package/dist/UnifiedScreens.d.ts +0 -9
  193. package/dist/UnifiedScreens.js +0 -25
  194. package/dist/UnifiedScreens.js.map +0 -1
  195. package/src/Layer.tsx +0 -17
  196. package/src/Meta.tsx +0 -9
  197. 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
- export interface ChatPaneProps {
489
- messagesView: any;
490
- textFormView: any;
491
- ref: any;
399
+ interface LayoutRectangle {
400
+ x: number;
401
+ y: number;
402
+ width: number;
403
+ height: number;
492
404
  }
493
- export interface ScrollViewProps {
494
- scrollTo?: (y?: number | {
495
- x?: number;
496
- y?: number;
497
- animated?: boolean;
498
- }, x?: number, animated?: boolean) => void;
405
+ interface LayoutChangeEvent {
406
+ nativeEvent: {
407
+ layout: LayoutRectangle;
408
+ };
409
+ }
410
+ export interface SplitPageProps {
499
411
  /**
500
- * These styles will be applied to the scroll view content container which
501
- * wraps all of the child views. Example:
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
- contentContainerStyle?: any;
415
+ children?: ReactChild | ReactChild[] | null;
515
416
  /**
516
- * When true the scroll view's children are arranged horizontally in a row
517
- * instead of vertically in a column. The default value is false.
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
- horizontal?: boolean | null;
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
- * If sticky headers should stick at the bottom instead of the top of the
522
- * ScrollView. This is usually used with inverted ScrollViews.
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
- * Determines whether the keyboard gets dismissed in response to a drag.
526
- * - 'none' (the default) drags do not dismiss the keyboard.
527
- * - 'onDrag' the keyboard is dismissed when a drag begins.
528
- * - 'interactive' the keyboard is dismissed interactively with the drag
529
- * and moves in synchrony with the touch; dragging upwards cancels the
530
- * dismissal.
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
- * Determines when the keyboard should stay visible after a tap.
534
- * - 'never' (the default), tapping outside of the focused text input when the keyboard is up dismisses the keyboard. When this happens, children won't receive the tap.
535
- * - 'always', the keyboard will not dismiss automatically, and the scroll view will not catch taps, but children of the scroll view can catch taps.
536
- * - 'handled', the keyboard will not dismiss automatically when the tap was handled by a children, (or captured by an ancestor).
537
- * - false, deprecated, use 'never' instead
538
- * - true, deprecated, use 'always' instead
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
- keyboardShouldPersistTaps?: boolean | "always" | "never" | "handled";
520
+ springOffset?: number;
541
521
  /**
542
- * Called when scrollable content view of the ScrollView changes.
543
- * Handler function is passed the content width and content height as parameters: (contentWidth, contentHeight)
544
- * It's implemented using onLayout handler attached to the content container which this ScrollView renders.
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
- * Fires at most once per frame during scrolling.
549
- * The frequency of the events can be contolled using the scrollEventThrottle prop.
534
+ * Color of the gestureEnabled Indicator.
535
+
536
+ | Type | Required |
537
+ | ---- | -------- |
538
+ | string | no |
539
+
540
+ Default: `"#f0f0f0"`
550
541
  */
551
- onScroll?: (event: any) => void;
542
+ indicatorColor?: string;
552
543
  /**
553
- * Fires if a user initiates a scroll gesture.
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
- * Fires when a user has finished scrolling.
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
- * Fires when scroll view has finished moving
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
- * Fires when scroll view has begun moving
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
- * When true the scroll view stops on multiples of the scroll view's size
566
- * when scrolling. This can be used for horizontal pagination. The default
567
- * value is false.
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
- * When false, the content does not scroll. The default value is true
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
- * Experimental: When true offscreen child views (whose `overflow` value is
574
- * `hidden`) are removed from their native backing superview when offscreen.
575
- * This canimprove scrolling performance on long lists. The default value is
576
- * false.
604
+ * Any custom styles for the container.
605
+
606
+ | Type | Required |
607
+ | ---- | -------- |
608
+ | Object | no |
577
609
  */
610
+ containerStyle?: ViewStyle;
578
611
  /**
579
- * When true, shows a horizontal scroll indicator.
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
- * When true, shows a vertical scroll indicator.
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
- * Style
632
+ * Duration of closing animation.
633
+
634
+ | Type | Required |
635
+ | ---- | -------- |
636
+ | number | no |
637
+
638
+ Default: `300`
586
639
  */
587
- style?: any;
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
- * Rendered in between each item, but not at the top or bottom
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
- ItemSeparatorComponent?: React.ComponentType<any> | null;
651
+ bounciness?: number;
614
652
  /**
615
- * Rendered when the list is empty.
653
+ * Will the ActionSheet close on `hardwareBackPress` event.
654
+
655
+ | Type | Required |
656
+ | ---- | -------- |
657
+ | boolean | no |
658
+
659
+ Default: `true`
616
660
  */
617
- ListEmptyComponent?: React.ComponentType<any> | React.ReactElement | null;
661
+ closeOnPressBack?: boolean;
618
662
  /**
619
- * Rendered at the very end of the list.
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
- ListFooterComponent?: React.ComponentType<any> | React.ReactElement | null;
671
+ defaultOverlayOpacity?: number;
622
672
  /**
623
- * Styling for internal View for ListFooterComponent
673
+ * Enables gesture control of ActionSheet
674
+
675
+ | Type | Required |
676
+ | ---- | -------- |
677
+ | boolean | no |
678
+
679
+ Default: `false`
624
680
  */
625
- ListFooterComponentStyle?: ViewStyle | null;
681
+ gestureEnabled?: boolean;
626
682
  /**
627
- * Rendered at the very beginning of the list.
683
+ * Bounces the ActionSheet on open.
684
+
685
+ | Type | Required |
686
+ | ---- | -------- |
687
+ | boolean | no |
688
+
689
+ Default: `false`
628
690
  */
629
- ListHeaderComponent?: React.ComponentType<any> | React.ReactElement | null;
691
+ bounceOnOpen?: boolean;
630
692
  /**
631
- * Styling for internal View for ListHeaderComponent
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
- ListHeaderComponentStyle?: ViewStyle | null;
702
+ keyboardShouldPersistTaps?: boolean | "always" | "never" | "handled";
634
703
  /**
635
- * Optional custom style for multi-item rows generated when numColumns > 1
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
- columnWrapperStyle?: StyleProp;
712
+ statusBarTranslucent?: boolean;
638
713
  /**
639
- * Determines when the keyboard should stay visible after a tap.
640
- * - 'never' (the default), tapping outside of the focused text input when the keyboard is up dismisses the keyboard. When this happens, children won't receive the tap.
641
- * - 'always', the keyboard will not dismiss automatically, and the scroll view will not catch taps, but children of the scroll view can catch taps.
642
- * - 'handled', the keyboard will not dismiss automatically when the tap was handled by a children, (or captured by an ancestor).
643
- * - false, deprecated, use 'never' instead
644
- * - true, deprecated, use 'always' instead
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
- keyboardShouldPersistTaps?: boolean | "always" | "never" | "handled";
723
+ closable?: boolean;
647
724
  /**
648
- * Multiple columns can only be rendered with `horizontal={false}` and will zig-zag like a `flexWrap` layout.
649
- * Items should all be the same height - masonry layouts are not supported.
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
- numColumns?: number;
734
+ drawUnderStatusBar?: boolean;
652
735
  /**
653
- * The default accessor functions assume this is an Array<{key: string}> but you can override
654
- * getItem, getItemCount, and keyExtractor to handle any type of index-based data.
736
+ * Snap ActionSheet to this location if `closable` is set to false;
737
+ *
738
+ *
739
+ * | Type | Required |
740
+ | ---- | -------- |
741
+ | number | no |
655
742
  */
656
- data?: any;
743
+ bottomOffset?: number;
657
744
  /**
658
- * `debug` will turn on extra logging and visual overlays to aid with debugging both usage and
659
- * implementation, but with a significant perf hit.
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
- debug?: boolean;
753
+ keyboardMode?: "padding" | "position";
662
754
  /**
663
- * DEPRECATED: Virtualization provides significant performance and memory optimizations, but fully
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
- disableVirtualization?: boolean;
757
+ testID?: string;
668
758
  /**
669
- * A marker property for telling the list to re-render (since it implements `PureComponent`). If
670
- * any of your `renderItem`, Header, Footer, etc. functions depend on anything outside of the
671
- * `data` prop, stick it here and treat it immutably.
759
+ *
760
+ Event called when the ActionSheet closes.
761
+
762
+
763
+ * | Type | Required |
764
+ | ---- | -------- |
765
+ | function | no |
766
+
767
+
768
+ #
672
769
  */
673
- extraData?: any;
770
+ onClose?: () => void;
674
771
  /**
675
- * A generic accessor for extracting an item from any sort of data blob.
772
+ * An event called when the ActionSheet Opens.
773
+
774
+ | Type | Required |
775
+ | ---- | -------- |
776
+ | function | no |
676
777
  */
677
- getItem?: (data: any, index: number) => ItemT;
778
+ onOpen?: () => void;
678
779
  /**
679
- * Determines how many items are in the data blob.
780
+ * Event called when position of ActionSheet changes.
680
781
  */
681
- getItemCount?: (data: any) => number;
682
- getItemLayout?: (data: any, index: number) => {
683
- length: number;
684
- offset: number;
685
- index: number;
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
- * How many items to render in the initial batch. This should be enough to fill the screen but not
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
- initialNumToRender?: number;
791
+ name: string;
694
792
  /**
695
- * Instead of starting at the top with the first item, start at `initialScrollIndex`. This
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
- initialScrollIndex?: number | null;
795
+ initials?: string;
701
796
  /**
702
- * Reverses the direction of scroll. Uses scale transforms of -1.
797
+ * Adds a white border around Avatar so it's visible when displayed on other images.
703
798
  */
704
- inverted?: boolean | null;
705
- keyExtractor?: (item: ItemT, index: number) => string;
706
- listKey?: string;
799
+ outline?: boolean;
707
800
  /**
708
- * The maximum number of items to render in each incremental render batch. The more rendered at
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
- maxToRenderPerBatch?: number;
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
- * If provided, a standard RefreshControl will be added for "Pull to Refresh" functionality. Make
720
- * sure to also set the `refreshing` prop correctly.
805
+ * The URL of the user's image.
721
806
  */
722
- onRefresh?: (() => void) | null;
807
+ src?: string;
723
808
  /**
724
- * Used to handle failures when scrolling to an index that has not been measured yet.
725
- * Recommended action is to either compute your own offset and `scrollTo` it, or scroll as far
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
- onScrollToIndexFailed?: (info: {
729
- index: number;
730
- highestMeasuredFrameIndex: number;
731
- averageItemLength: number;
732
- }) => void;
812
+ imageFit?: "cover" | "contain" | "none";
733
813
  /**
734
- * Called when the viewability of rows changes, as defined by the
735
- * `viewabilityConfig` prop.
814
+ * Allow user to edit the image of the avatar
736
815
  */
737
- onViewableItemsChanged?: ((info: {
738
- viewableItems: any[];
739
- changed: any[];
740
- }) => void) | null;
816
+ editAvatarImage?: boolean;
741
817
  /**
742
- * Set this when offset is needed for the loading indicator to show correctly.
743
- * @platform android
818
+ * Function to handle the avatar image edit
744
819
  */
745
- progressViewOffset?: number;
820
+ onChange?: (val: any) => void;
746
821
  /**
747
- * Set this true while waiting for new data from a refresh.
822
+ * Resize image width. If only the width is provided, the image will preserve aspect ratio
748
823
  */
749
- refreshing?: boolean | null;
824
+ avatarImageWidth?: number;
750
825
  /**
751
- * Note: may have bugs (missing content) in some circumstances - use at your own risk.
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
- removeClippedSubviews?: boolean;
829
+ avatarImageHeight?: number;
756
830
  /**
757
- * Render a custom scroll component, e.g. with a differently styled `RefreshControl`.
831
+ * The image format that the image will be saved as after any edits by the expo-image-manipulator
758
832
  */
759
- renderScrollComponent?: (props: ScrollViewProps) => React.ReactElement<ScrollViewProps>;
833
+ avatarImageFormat?: SaveFormat;
760
834
  /**
761
- * Amount of time between low-pri item render batches, e.g. for rendering items quite a ways off
762
- * screen. Similar fill rate/responsiveness tradeoff as `maxToRenderPerBatch`.
835
+ * The status of the user to display with the avatar.
763
836
  */
764
- updateCellsBatchingPeriod?: number;
765
- viewabilityConfig?: any;
766
- viewabilityConfigCallbackPairs?: any;
837
+ status?: AvatarStatus;
767
838
  /**
768
- * Determines the maximum number of items rendered outside of the visible area, in units of
769
- * visible lengths. So if your list fills the screen, then `windowSize={21}` (the default) will
770
- * render the visible screen area plus up to 10 screens above and 10 below the viewport. Reducing
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
- windowSize?: number;
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
- * can accept either one React Child or any array of ReactChild. If this is not provided,
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
- children?: ReactChild | ReactChild[] | null;
847
+ statusText?: string;
793
848
  /**
794
- * The names of the tabs that will be generated per ReactChild provided. Tabs will not be generated if renderContent is provided in place of children
849
+ * If edit icon should be present when no image is present
795
850
  */
796
- tabs?: string[];
797
- selectLimit?: number;
798
- bottomNavBarHeight?: number;
799
- showItemList?: boolean;
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
- renderListViewItem: (itemInfo: ListRenderItemInfo<any>) => ReactElement | null;
804
- renderListViewHeader?: () => ReactElement | null;
805
- renderContent?: (index?: number) => ReactElement | ReactElement[] | null;
806
- listViewData: any[];
807
- listViewExtraData?: any;
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 type LogLevel = "fatal" | "error" | "warning" | "info" | "debug" | "critical";
813
- export type PermissionKind = "location" | "locationAlways" | "camera" | "microphone" | "photo" | "contacts" | "event" | "reminder" | "bluetooth" | "notification" | "backgroundRefresh" | "speechRecognition" | "mediaLibrary" | "motion";
814
- export type PermissionStatus = "authorized" | "denied" | "softDenied" | "restricted" | "undetermined";
815
- export interface TrackingProperties {
816
- [name: string]: any;
817
- }
818
- export declare function isTestUser(profile?: BaseProfile): boolean | "" | undefined;
819
- export interface TrackerInterface {
820
- initFinished: boolean;
821
- init: (config: TrackingConfig) => void;
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 AddressInterface {
849
- address1: string;
850
- address2?: string;
851
- city: string;
852
- state: string;
853
- zipcode: string;
854
- countyName?: string;
855
- countyCode?: string;
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 {};