@hero-design/rn 7.10.2 → 7.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (103) hide show
  1. package/.turbo/turbo-build.log +8 -8
  2. package/assets/fonts/hero-icons.ttf +0 -0
  3. package/es/index.js +3778 -728
  4. package/global-setup.js +3 -0
  5. package/jest.config.js +1 -0
  6. package/lib/assets/fonts/hero-icons.ttf +0 -0
  7. package/lib/index.js +3779 -726
  8. package/package.json +7 -3
  9. package/rollup.config.js +8 -1
  10. package/src/components/ContentNavigator/__tests__/__snapshots__/index.spec.tsx.snap +2 -0
  11. package/src/components/ContentNavigator/__tests__/index.spec.tsx +19 -2
  12. package/src/components/ContentNavigator/index.tsx +12 -1
  13. package/src/components/FAB/ActionGroup/__tests__/__snapshots__/index.spec.tsx.snap +4 -0
  14. package/src/components/FAB/ActionGroup/index.tsx +16 -5
  15. package/src/components/Icon/HeroIcon/selection.json +1 -1
  16. package/src/components/Icon/IconList.ts +1 -0
  17. package/src/components/PinInput/PinCell.tsx +34 -0
  18. package/src/components/PinInput/StyledPinInput.tsx +88 -0
  19. package/src/components/PinInput/__tests__/PinCell.spec.tsx +48 -0
  20. package/src/components/PinInput/__tests__/StyledPinInput.spec.tsx +22 -0
  21. package/src/components/PinInput/__tests__/__snapshots__/PinCell.spec.tsx.snap +186 -0
  22. package/src/components/PinInput/__tests__/__snapshots__/StyledPinInput.spec.tsx.snap +58 -0
  23. package/src/components/PinInput/__tests__/__snapshots__/index.spec.tsx.snap +1028 -0
  24. package/src/components/PinInput/__tests__/index.spec.tsx +91 -0
  25. package/src/components/PinInput/index.tsx +173 -0
  26. package/src/components/Select/MultiSelect/Option.tsx +1 -1
  27. package/src/components/Select/MultiSelect/OptionList.tsx +48 -26
  28. package/src/components/Select/MultiSelect/__tests__/OptionList.spec.tsx +13 -0
  29. package/src/components/Select/MultiSelect/__tests__/__snapshots__/OptionList.spec.tsx.snap +1062 -556
  30. package/src/components/Select/MultiSelect/__tests__/__snapshots__/index.spec.tsx.snap +983 -889
  31. package/src/components/Select/MultiSelect/index.tsx +59 -31
  32. package/src/components/Select/SingleSelect/OptionList.tsx +45 -26
  33. package/src/components/Select/SingleSelect/__tests__/OptionList.spec.tsx +8 -0
  34. package/src/components/Select/SingleSelect/__tests__/__snapshots__/OptionList.spec.tsx.snap +992 -500
  35. package/src/components/Select/SingleSelect/__tests__/__snapshots__/index.spec.tsx.snap +880 -786
  36. package/src/components/Select/SingleSelect/index.tsx +60 -31
  37. package/src/components/Select/StyledOptionList.tsx +88 -0
  38. package/src/components/Select/StyledSelect.tsx +18 -16
  39. package/src/components/Select/__tests__/StyledSelect.spec.tsx +1 -14
  40. package/src/components/Select/__tests__/__snapshots__/StyledSelect.spec.tsx.snap +0 -13
  41. package/src/components/Select/types.tsx +47 -0
  42. package/src/components/TextInput/__tests__/index.spec.tsx +15 -0
  43. package/src/components/TextInput/index.tsx +20 -16
  44. package/src/components/TimePicker/StyledTimePicker.tsx +8 -0
  45. package/src/components/TimePicker/TimePickerAndroid.tsx +61 -0
  46. package/src/components/TimePicker/TimePickerIOS.tsx +91 -0
  47. package/src/components/TimePicker/__tests__/TimePicker.spec.tsx +34 -0
  48. package/src/components/TimePicker/__tests__/TimePickerAndroid.spec.tsx +39 -0
  49. package/src/components/TimePicker/__tests__/TimePickerIOS.spec.tsx +46 -0
  50. package/src/components/TimePicker/__tests__/__snapshots__/TimePickerAndroid.spec.tsx.snap +200 -0
  51. package/src/components/TimePicker/__tests__/__snapshots__/TimePickerIOS.spec.tsx.snap +513 -0
  52. package/src/components/TimePicker/index.tsx +15 -0
  53. package/src/components/TimePicker/types.ts +50 -0
  54. package/src/components/Typography/Text/StyledText.tsx +1 -1
  55. package/src/components/Typography/Text/__tests__/StyledText.spec.tsx +1 -0
  56. package/src/components/Typography/Text/__tests__/__snapshots__/StyledText.spec.tsx.snap +22 -0
  57. package/src/components/Typography/Text/index.tsx +1 -1
  58. package/src/index.ts +4 -0
  59. package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +44 -0
  60. package/src/theme/components/pinInput.ts +45 -0
  61. package/src/theme/components/select.ts +4 -0
  62. package/src/theme/components/timePicker.ts +11 -0
  63. package/src/theme/components/typography.ts +2 -0
  64. package/src/theme/global/colors.ts +1 -1
  65. package/src/theme/global/space.ts +10 -10
  66. package/src/theme/index.ts +9 -3
  67. package/testUtils/setup.tsx +10 -0
  68. package/types/components/ContentNavigator/index.d.ts +5 -1
  69. package/types/components/Icon/IconList.d.ts +1 -1
  70. package/types/components/Icon/utils.d.ts +1 -1
  71. package/types/components/PinInput/PinCell.d.ts +8 -0
  72. package/types/components/PinInput/StyledPinInput.d.ts +73 -0
  73. package/types/components/PinInput/__tests__/PinCell.spec.d.ts +1 -0
  74. package/types/components/PinInput/__tests__/StyledPinInput.spec.d.ts +1 -0
  75. package/types/components/PinInput/__tests__/index.spec.d.ts +1 -0
  76. package/types/components/PinInput/index.d.ts +48 -0
  77. package/types/components/Select/MultiSelect/OptionList.d.ts +1 -1
  78. package/types/components/Select/MultiSelect/index.d.ts +3 -25
  79. package/types/components/Select/SingleSelect/OptionList.d.ts +1 -1
  80. package/types/components/Select/SingleSelect/index.d.ts +4 -26
  81. package/types/components/Select/StyledOptionList.d.ts +17 -0
  82. package/types/components/Select/StyledSelect.d.ts +7 -7
  83. package/types/components/Select/index.d.ts +1 -1
  84. package/types/components/Select/types.d.ts +44 -0
  85. package/types/components/TimePicker/StyledTimePicker.d.ts +8 -0
  86. package/types/components/TimePicker/TimePickerAndroid.d.ts +3 -0
  87. package/types/components/TimePicker/TimePickerIOS.d.ts +3 -0
  88. package/types/components/TimePicker/__tests__/TimePicker.spec.d.ts +1 -0
  89. package/types/components/TimePicker/__tests__/TimePickerAndroid.spec.d.ts +1 -0
  90. package/types/components/TimePicker/__tests__/TimePickerIOS.spec.d.ts +1 -0
  91. package/types/components/TimePicker/index.d.ts +3 -0
  92. package/types/components/TimePicker/types.d.ts +49 -0
  93. package/types/components/Typography/Text/StyledText.d.ts +1 -1
  94. package/types/components/Typography/Text/index.d.ts +1 -1
  95. package/types/index.d.ts +3 -1
  96. package/types/theme/components/pinInput.d.ts +35 -0
  97. package/types/theme/components/select.d.ts +4 -0
  98. package/types/theme/components/timePicker.d.ts +6 -0
  99. package/types/theme/components/typography.d.ts +2 -0
  100. package/types/theme/index.d.ts +6 -2
  101. package/src/components/Select/types.ts +0 -1
  102. package/src/components/TextInput/__tests__/.log/ti-10343.log +0 -62
  103. package/src/components/TextInput/__tests__/.log/tsserver.log +0 -15584
@@ -354,6 +354,39 @@ Object {
354
354
  "leadingStatus": 8,
355
355
  },
356
356
  },
357
+ "pinInput": Object {
358
+ "borderWidths": Object {
359
+ "default": 1,
360
+ "focused": 2,
361
+ },
362
+ "colors": Object {
363
+ "default": "#292a2b",
364
+ "disabled": "#bfc1c5",
365
+ "error": "#de350b",
366
+ "mask": "#727478",
367
+ },
368
+ "fontSizes": Object {
369
+ "cellText": 28,
370
+ "errorMessage": 12,
371
+ },
372
+ "fonts": Object {
373
+ "cellText": "BeVietnamPro-SemiBold",
374
+ "errorMessage": "BeVietnamPro-Regular",
375
+ },
376
+ "radii": Object {
377
+ "cell": 8,
378
+ "mask": 999,
379
+ },
380
+ "sizes": Object {
381
+ "cellHeight": 48,
382
+ "cellWidth": 40,
383
+ "mask": 16,
384
+ },
385
+ "space": Object {
386
+ "errorMessagePadding": 4,
387
+ "spacer": 16,
388
+ },
389
+ },
357
390
  "progress": Object {
358
391
  "colors": Object {
359
392
  "background": "#dadbde",
@@ -417,9 +450,13 @@ Object {
417
450
  "option": 4,
418
451
  },
419
452
  "space": Object {
453
+ "minimumOptionListHeight": 280,
420
454
  "optionListPadding": 16,
421
455
  "optionListSpacing": 4,
422
456
  "optionPadding": 16,
457
+ "searchBarBottomSpacing": 8,
458
+ "searchBarHorizontalSpacing": 16,
459
+ "searchBarMarginTopSpacing": 8,
423
460
  },
424
461
  },
425
462
  "spinner": Object {
@@ -599,6 +636,11 @@ Object {
599
636
  "maxLengthLabelMarginLeft": 4,
600
637
  },
601
638
  },
639
+ "timePicker": Object {
640
+ "sizes": Object {
641
+ "height": 176,
642
+ },
643
+ },
602
644
  "toast": Object {
603
645
  "borderWidths": Object {
604
646
  "base": 1,
@@ -655,6 +697,7 @@ Object {
655
697
  "medium": 14,
656
698
  "small": 12,
657
699
  "xlarge": 18,
700
+ "xxxxxlarge": 32,
658
701
  },
659
702
  "fonts": Object {
660
703
  "light": "BeVietnamPro-Light",
@@ -666,6 +709,7 @@ Object {
666
709
  "medium": 22,
667
710
  "small": 20,
668
711
  "xlarge": 26,
712
+ "xxxxxlarge": 40,
669
713
  },
670
714
  },
671
715
  },
@@ -0,0 +1,45 @@
1
+ import { GlobalTheme } from '../global';
2
+
3
+ const getPinInputTheme = (theme: GlobalTheme) => {
4
+ const borderWidths = {
5
+ default: theme.borderWidths.base,
6
+ focused: theme.borderWidths.medium,
7
+ };
8
+
9
+ const colors = {
10
+ default: theme.colors.text,
11
+ mask: theme.colors.subduedText, // should be Maastricht Blue light 50
12
+ error: theme.colors.danger, // using this so that the color is the same as danger Icon, should be Vermilion
13
+ disabled: theme.colors.archivedDark,
14
+ };
15
+
16
+ const fonts = {
17
+ cellText: theme.fonts.semiBold,
18
+ errorMessage: theme.fonts.regular,
19
+ };
20
+
21
+ const fontSizes = {
22
+ cellText: theme.fontSizes.xxxxlarge,
23
+ errorMessage: theme.fontSizes.small,
24
+ };
25
+
26
+ const sizes = {
27
+ cellWidth: theme.space.xxlarge,
28
+ cellHeight: theme.space.xxxlarge,
29
+ mask: theme.space.medium,
30
+ };
31
+
32
+ const space = {
33
+ spacer: theme.space.medium,
34
+ errorMessagePadding: theme.space.xsmall,
35
+ };
36
+
37
+ const radii = {
38
+ cell: theme.radii.medium,
39
+ mask: theme.radii.rounded,
40
+ };
41
+
42
+ return { borderWidths, colors, fonts, fontSizes, sizes, space, radii };
43
+ };
44
+
45
+ export default getPinInputTheme;
@@ -8,9 +8,13 @@ const getSelectTheme = (theme: GlobalTheme) => {
8
8
  };
9
9
 
10
10
  const space = {
11
+ minimumOptionListHeight: theme.space.xxxxlarge * 5,
11
12
  optionPadding: theme.space.medium,
12
13
  optionListPadding: theme.space.medium, // left padding should be 12 according to the design
13
14
  optionListSpacing: theme.space.xsmall,
15
+ searchBarMarginTopSpacing: theme.space.small,
16
+ searchBarHorizontalSpacing: theme.space.medium,
17
+ searchBarBottomSpacing: theme.space.small,
14
18
  };
15
19
 
16
20
  const radii = {
@@ -0,0 +1,11 @@
1
+ import { scale } from '../../utils/scale';
2
+
3
+ const getTimePickerTheme = () => {
4
+ const sizes = {
5
+ height: scale(176),
6
+ };
7
+
8
+ return { sizes };
9
+ };
10
+
11
+ export default getTimePickerTheme;
@@ -22,6 +22,7 @@ const getTypographyTheme = (theme: GlobalTheme) => {
22
22
  medium: theme.fontSizes.medium,
23
23
  large: theme.fontSizes.large,
24
24
  xlarge: theme.fontSizes.xlarge,
25
+ xxxxxlarge: theme.fontSizes.xxxxxlarge,
25
26
  };
26
27
 
27
28
  const lineHeights = {
@@ -29,6 +30,7 @@ const getTypographyTheme = (theme: GlobalTheme) => {
29
30
  medium: theme.lineHeights.medium,
30
31
  large: theme.lineHeights.large,
31
32
  xlarge: theme.lineHeights.xlarge,
33
+ xxxxxlarge: theme.lineHeights.xxxxxlarge,
32
34
  };
33
35
 
34
36
  return { colors, fonts, fontSizes, lineHeights };
@@ -28,7 +28,7 @@ const systemPalette = {
28
28
  platformBackground: palette.white,
29
29
  backgroundLight: palette.greyLight95,
30
30
  backgroundDark: palette.greyDark75,
31
- text: palette.greyDark75,
31
+ text: palette.greyDark75, // should be Maastricht Blue
32
32
  subduedText: palette.greyDark30,
33
33
  disabledText: palette.greyDark15,
34
34
  disabledLightText: palette.greyLight45,
@@ -14,16 +14,16 @@ interface Space {
14
14
  }
15
15
 
16
16
  const getSpace = (baseSpace: number): Space => ({
17
- xxsmall: scale(baseSpace * 0.25),
18
- xsmall: scale(baseSpace * 0.5),
19
- small: scale(baseSpace),
20
- smallMedium: scale(baseSpace) * 1.5,
21
- medium: scale(baseSpace * 2),
22
- large: scale(baseSpace * 3),
23
- xlarge: scale(baseSpace * 4),
24
- xxlarge: scale(baseSpace * 5),
25
- xxxlarge: scale(baseSpace * 6),
26
- xxxxlarge: scale(baseSpace * 7),
17
+ xxsmall: scale(baseSpace * 0.25), // 2
18
+ xsmall: scale(baseSpace * 0.5), // 4
19
+ small: scale(baseSpace), // 8
20
+ smallMedium: scale(baseSpace) * 1.5, // 12
21
+ medium: scale(baseSpace * 2), // 16
22
+ large: scale(baseSpace * 3), // 24
23
+ xlarge: scale(baseSpace * 4), // 32
24
+ xxlarge: scale(baseSpace * 5), // 40
25
+ xxxlarge: scale(baseSpace * 6), // 48
26
+ xxxxlarge: scale(baseSpace * 7), // 56
27
27
  });
28
28
 
29
29
  export { Space, getSpace };
@@ -22,6 +22,8 @@ import getDividerTheme from './components/divider';
22
22
  import getDrawerTheme from './components/drawer';
23
23
  import getFABTheme from './components/fab';
24
24
  import getIconTheme from './components/icon';
25
+ import getListTheme from './components/list';
26
+ import getPinInputTheme from './components/pinInput';
25
27
  import getProgressTheme from './components/progress';
26
28
  import getRadioTheme from './components/radio';
27
29
  import getSectionHeadingTheme from './components/sectionHeading';
@@ -31,10 +33,10 @@ import getSwitchTheme from './components/switch';
31
33
  import getTabsTheme from './components/tabs';
32
34
  import getTagTheme from './components/tag';
33
35
  import getTextInputTheme from './components/textInput';
36
+ import getTimePickerTheme from './components/timePicker';
34
37
  import getToastTheme from './components/toast';
35
38
  import getToolbarTheme from './components/toolbar';
36
39
  import getTypographyTheme from './components/typography';
37
- import getListTheme from './components/list';
38
40
 
39
41
  type Theme = GlobalTheme & {
40
42
  __hd__: {
@@ -51,6 +53,8 @@ type Theme = GlobalTheme & {
51
53
  drawer: ReturnType<typeof getDrawerTheme>;
52
54
  fab: ReturnType<typeof getFABTheme>;
53
55
  icon: ReturnType<typeof getIconTheme>;
56
+ list: ReturnType<typeof getListTheme>;
57
+ pinInput: ReturnType<typeof getPinInputTheme>;
54
58
  progress: ReturnType<typeof getProgressTheme>;
55
59
  radio: ReturnType<typeof getRadioTheme>;
56
60
  sectionHeading: ReturnType<typeof getSectionHeadingTheme>;
@@ -60,10 +64,10 @@ type Theme = GlobalTheme & {
60
64
  tabs: ReturnType<typeof getTabsTheme>;
61
65
  tag: ReturnType<typeof getTagTheme>;
62
66
  textInput: ReturnType<typeof getTextInputTheme>;
67
+ timePicker: ReturnType<typeof getTimePickerTheme>;
63
68
  toast: ReturnType<typeof getToastTheme>;
64
69
  toolbar: ReturnType<typeof getToolbarTheme>;
65
70
  typography: ReturnType<typeof getTypographyTheme>;
66
- list: ReturnType<typeof getListTheme>;
67
71
  };
68
72
  };
69
73
 
@@ -88,6 +92,8 @@ const getTheme = (
88
92
  drawer: getDrawerTheme(globalTheme),
89
93
  fab: getFABTheme(globalTheme),
90
94
  icon: getIconTheme(globalTheme),
95
+ list: getListTheme(globalTheme),
96
+ pinInput: getPinInputTheme(globalTheme),
91
97
  progress: getProgressTheme(globalTheme),
92
98
  radio: getRadioTheme(globalTheme),
93
99
  sectionHeading: getSectionHeadingTheme(globalTheme),
@@ -97,10 +103,10 @@ const getTheme = (
97
103
  tabs: getTabsTheme(globalTheme),
98
104
  tag: getTagTheme(globalTheme),
99
105
  textInput: getTextInputTheme(globalTheme),
106
+ timePicker: getTimePickerTheme(),
100
107
  toast: getToastTheme(globalTheme),
101
108
  toolbar: getToolbarTheme(globalTheme),
102
109
  typography: getTypographyTheme(globalTheme),
103
- list: getListTheme(globalTheme),
104
110
  },
105
111
  };
106
112
  };
@@ -41,3 +41,13 @@ jest.mock('react-native-pager-view', () => {
41
41
  }
42
42
  };
43
43
  });
44
+
45
+ jest.mock('@react-native-community/datetimepicker', () => {
46
+ const React = jest.requireActual('react');
47
+
48
+ return class Picker extends React.Component {
49
+ render() {
50
+ return React.createElement('Picker', this.props, this.props.children);
51
+ }
52
+ };
53
+ });
@@ -12,6 +12,10 @@ interface ContentNavigatorProps {
12
12
  * Handler to handle press event of next icon.
13
13
  */
14
14
  onNextPress: () => void;
15
+ /**
16
+ * Handler to handle press event of content navigator value.
17
+ */
18
+ onPress?: () => void;
15
19
  /**
16
20
  * Whether the previous icon is disabled.
17
21
  */
@@ -29,5 +33,5 @@ interface ContentNavigatorProps {
29
33
  */
30
34
  testID?: string;
31
35
  }
32
- declare function ContentNavigator({ onPreviousPress, onNextPress, value, previousDisabled, nextDisabled, testID, style, }: ContentNavigatorProps): JSX.Element;
36
+ declare function ContentNavigator({ onPreviousPress, onNextPress, onPress, value, previousDisabled, nextDisabled, testID, style, }: ContentNavigatorProps): JSX.Element;
33
37
  export default ContentNavigator;
@@ -1,2 +1,2 @@
1
- declare const IconList: readonly ["activate", "add-person", "adjustment", "alignment", "bank", "bell", "billing", "bookmark", "box-check", "box", "buildings", "cake", "calendar-clock", "calendar", "candy-box-menu", "carat-down-small", "carat-down", "carat-left", "carat-right", "carat-up", "circle-add", "circle-cancel", "circle-check", "circle-down", "circle-info", "circle-left", "circle-ok", "circle-pencil", "circle-question", "circle-remove", "circle-right", "circle-up", "circle-warning", "clock", "cloud-download", "cloud-upload", "cog", "coin", "contacts", "credit-card", "diamond", "direction-arrows", "directory", "document", "dollar-coin-shine", "double-buildings", "edit-template", "envelope", "expense", "eye-circle", "eye-invisible", "eye", "face-meh", "face-sad", "face-smiley", "feed", "feedbacks", "file-certified", "file-clone", "file-copy", "file-csv", "file-dispose", "file-doc", "file-excel", "file-export", "file-lock", "file-pdf", "file-powerpoint", "file-search", "file-secured", "file-sheets", "file-slide", "file-verified", "file-word", "file", "folder-user", "folder", "funnel-filter", "global-dollar", "globe", "graduation-cap", "graph", "happy-sun", "health-bag", "heart", "home", "image", "import", "incident-siren", "instapay", "list", "loading", "loading-2", "location", "lock", "looks-one", "looks-two", "media-content", "menu", "moneybag", "moon", "multiple-stars", "multiple-users", "node", "open-folder", "paperclip", "payment-summary", "pencil", "phone", "piggy-bank", "plane", "play-circle", "print", "raising-hands", "reply", "reschedule", "rostering", "save", "schedule", "search-person", "send", "speaker", "star-medal", "star", "steps-circle", "stopwatch", "suitcase", "survey", "swag", "switch", "tag", "target", "teams", "timesheet", "touch-id", "trash-bin", "unlock", "user", "video-1", "video-2", "activate-outlined", "add-person-outlined", "add-section-outlined", "add-time-outlined", "add", "adjustment-outlined", "alignment-2-outlined", "alignment-outlined", "all-caps", "arrow-down", "arrow-left", "arrow-right", "arrow-up", "at-sign", "bell-outlined", "billing-outlined", "body-outlined", "bold", "bookmark-outlined", "box-check-outlined", "box-outlined", "bullet-points", "cake-outlined", "calendar-dates-outlined", "calendar-star-outlined", "camera-outlined", "cancel", "checkmark", "circle-add-outlined", "circle-cancel-outlined", "circle-down-outlined", "circle-info-outlined", "circle-left-outlined", "circle-ok-outlined", "circle-question-outlined", "circle-remove-outlined", "circle-right-outlined", "circle-up-outlined", "circle-warning-outlined", "clock-2-outlined", "clock-outlined", "cog-outlined", "coin-outlined", "comment-outlined", "contacts-outlined", "credit-card-outlined", "direction-arrows-outlined", "directory-outlined", "document-outlined", "dollar-coin-shine-outlined", "dollar-sign", "double-buildings-outlined", "double-left-arrows", "double-right-arrows", "download-outlined", "edit-template-outlined", "email-outlined", "enter-arrow", "envelope-outlined", "expense-outlined", "external-link", "eye-invisible-outlined", "eye-outlined", "face-id", "face-meh-outlined", "face-open-smiley-outlined", "face-sad-outlined", "face-smiley-outlined", "feed-outlined", "file-certified-outlined", "file-clone-outlined", "file-copy-outlined", "file-dispose-outlined", "file-download-outlined", "file-export-outlined", "file-lock-outlined", "file-outlined", "file-search-outlined", "file-secured-outlined", "file-verified-outlined", "folder-outlined", "folder-user-outlined", "funnel-filter-outline", "graph-outlined", "happy-sun-outlined", "health-bag-outlined", "heart-outlined", "home-outlined", "image-outlined", "import-outlined", "instapay-outlined", "italic", "link-1", "link-2", "list-outlined", "location-outlined", "lock-outlined", "locked-file-outlined", "log-out", "media-content-outlined", "menu-close", "menu-expand", "menu-fold-outlined", "menu-unfold-outlined", "moneybag-outlined", "moon-outlined", "more-horizontal", "more-vertical", "multiple-folders-outlined", "multiple-users-outlined", "node-outlined", "number-points", "number", "payment-summary-outlined", "payslip-outlined", "pencil-outlined", "percentage", "phone-outlined", "piggy-bank-outlined", "plane-outlined", "play-circle-outlined", "print-outlined", "qr-code-outlined", "re-assign", "redeem", "refresh", "remove", "reply-outlined", "restart", "return-arrow", "rostering-outlined", "save-outlined", "schedule-outlined", "search-outlined", "send-outlined", "share-1", "share-2", "single-down-arrow", "single-left-arrow", "single-right-arrow", "single-up-arrow", "speaker-outlined", "star-outlined", "stopwatch-outlined", "strikethrough", "suitcase-outlined", "survey-outlined", "switch-outlined", "sync", "target-outlined", "timesheet-outlined", "transfer", "trash-bin-outlined", "unavailable", "underline", "unlock-outlined", "upload-outlined", "user-circle-outlined", "user-outlined", "user-rectangle-outlined", "video-1-outlined", "video-2-outlined", "wallet-outlined", "warning"];
1
+ declare const IconList: readonly ["activate", "add-person", "adjustment", "alignment", "bank", "bell", "billing", "bookmark", "box-check", "box", "buildings", "cake", "calendar-clock", "calendar", "candy-box-menu", "carat-down-small", "carat-down", "carat-left", "carat-right", "carat-up", "circle-add", "circle-cancel", "circle-check", "circle-down", "circle-info", "circle-left", "circle-ok", "circle-pencil", "circle-question", "circle-remove", "circle-right", "circle-up", "circle-warning", "clock", "clock-3", "cloud-download", "cloud-upload", "cog", "coin", "contacts", "credit-card", "diamond", "direction-arrows", "directory", "document", "dollar-coin-shine", "double-buildings", "edit-template", "envelope", "expense", "eye-circle", "eye-invisible", "eye", "face-meh", "face-sad", "face-smiley", "feed", "feedbacks", "file-certified", "file-clone", "file-copy", "file-csv", "file-dispose", "file-doc", "file-excel", "file-export", "file-lock", "file-pdf", "file-powerpoint", "file-search", "file-secured", "file-sheets", "file-slide", "file-verified", "file-word", "file", "folder-user", "folder", "funnel-filter", "global-dollar", "globe", "graduation-cap", "graph", "happy-sun", "health-bag", "heart", "home", "image", "import", "incident-siren", "instapay", "list", "loading", "loading-2", "location", "lock", "looks-one", "looks-two", "media-content", "menu", "moneybag", "moon", "multiple-stars", "multiple-users", "node", "open-folder", "paperclip", "payment-summary", "pencil", "phone", "piggy-bank", "plane", "play-circle", "print", "raising-hands", "reply", "reschedule", "rostering", "save", "schedule", "search-person", "send", "speaker", "star-medal", "star", "steps-circle", "stopwatch", "suitcase", "survey", "swag", "switch", "tag", "target", "teams", "timesheet", "touch-id", "trash-bin", "unlock", "user", "video-1", "video-2", "activate-outlined", "add-person-outlined", "add-section-outlined", "add-time-outlined", "add", "adjustment-outlined", "alignment-2-outlined", "alignment-outlined", "all-caps", "arrow-down", "arrow-left", "arrow-right", "arrow-up", "at-sign", "bell-outlined", "billing-outlined", "body-outlined", "bold", "bookmark-outlined", "box-check-outlined", "box-outlined", "bullet-points", "cake-outlined", "calendar-dates-outlined", "calendar-star-outlined", "camera-outlined", "cancel", "checkmark", "circle-add-outlined", "circle-cancel-outlined", "circle-down-outlined", "circle-info-outlined", "circle-left-outlined", "circle-ok-outlined", "circle-question-outlined", "circle-remove-outlined", "circle-right-outlined", "circle-up-outlined", "circle-warning-outlined", "clock-2-outlined", "clock-outlined", "cog-outlined", "coin-outlined", "comment-outlined", "contacts-outlined", "credit-card-outlined", "direction-arrows-outlined", "directory-outlined", "document-outlined", "dollar-coin-shine-outlined", "dollar-sign", "double-buildings-outlined", "double-left-arrows", "double-right-arrows", "download-outlined", "edit-template-outlined", "email-outlined", "enter-arrow", "envelope-outlined", "expense-outlined", "external-link", "eye-invisible-outlined", "eye-outlined", "face-id", "face-meh-outlined", "face-open-smiley-outlined", "face-sad-outlined", "face-smiley-outlined", "feed-outlined", "file-certified-outlined", "file-clone-outlined", "file-copy-outlined", "file-dispose-outlined", "file-download-outlined", "file-export-outlined", "file-lock-outlined", "file-outlined", "file-search-outlined", "file-secured-outlined", "file-verified-outlined", "folder-outlined", "folder-user-outlined", "funnel-filter-outline", "graph-outlined", "happy-sun-outlined", "health-bag-outlined", "heart-outlined", "home-outlined", "image-outlined", "import-outlined", "instapay-outlined", "italic", "link-1", "link-2", "list-outlined", "location-outlined", "lock-outlined", "locked-file-outlined", "log-out", "media-content-outlined", "menu-close", "menu-expand", "menu-fold-outlined", "menu-unfold-outlined", "moneybag-outlined", "moon-outlined", "more-horizontal", "more-vertical", "multiple-folders-outlined", "multiple-users-outlined", "node-outlined", "number-points", "number", "payment-summary-outlined", "payslip-outlined", "pencil-outlined", "percentage", "phone-outlined", "piggy-bank-outlined", "plane-outlined", "play-circle-outlined", "print-outlined", "qr-code-outlined", "re-assign", "redeem", "refresh", "remove", "reply-outlined", "restart", "return-arrow", "rostering-outlined", "save-outlined", "schedule-outlined", "search-outlined", "send-outlined", "share-1", "share-2", "single-down-arrow", "single-left-arrow", "single-right-arrow", "single-up-arrow", "speaker-outlined", "star-outlined", "stopwatch-outlined", "strikethrough", "suitcase-outlined", "survey-outlined", "switch-outlined", "sync", "target-outlined", "timesheet-outlined", "transfer", "trash-bin-outlined", "unavailable", "underline", "unlock-outlined", "upload-outlined", "user-circle-outlined", "user-outlined", "user-rectangle-outlined", "video-1-outlined", "video-2-outlined", "wallet-outlined", "warning"];
2
2
  export default IconList;
@@ -1,2 +1,2 @@
1
- declare const isHeroIcon: (x: any) => x is "number" | "activate" | "add-person" | "adjustment" | "alignment" | "bank" | "bell" | "billing" | "bookmark" | "box-check" | "box" | "buildings" | "cake" | "calendar-clock" | "calendar" | "candy-box-menu" | "carat-down-small" | "carat-down" | "carat-left" | "carat-right" | "carat-up" | "circle-add" | "circle-cancel" | "circle-check" | "circle-down" | "circle-info" | "circle-left" | "circle-ok" | "circle-pencil" | "circle-question" | "circle-remove" | "circle-right" | "circle-up" | "circle-warning" | "clock" | "cloud-download" | "cloud-upload" | "cog" | "coin" | "contacts" | "credit-card" | "diamond" | "direction-arrows" | "directory" | "document" | "dollar-coin-shine" | "double-buildings" | "edit-template" | "envelope" | "expense" | "eye-circle" | "eye-invisible" | "eye" | "face-meh" | "face-sad" | "face-smiley" | "feed" | "feedbacks" | "file-certified" | "file-clone" | "file-copy" | "file-csv" | "file-dispose" | "file-doc" | "file-excel" | "file-export" | "file-lock" | "file-pdf" | "file-powerpoint" | "file-search" | "file-secured" | "file-sheets" | "file-slide" | "file-verified" | "file-word" | "file" | "folder-user" | "folder" | "funnel-filter" | "global-dollar" | "globe" | "graduation-cap" | "graph" | "happy-sun" | "health-bag" | "heart" | "home" | "image" | "import" | "incident-siren" | "instapay" | "list" | "loading" | "loading-2" | "location" | "lock" | "looks-one" | "looks-two" | "media-content" | "menu" | "moneybag" | "moon" | "multiple-stars" | "multiple-users" | "node" | "open-folder" | "paperclip" | "payment-summary" | "pencil" | "phone" | "piggy-bank" | "plane" | "play-circle" | "print" | "raising-hands" | "reply" | "reschedule" | "rostering" | "save" | "schedule" | "search-person" | "send" | "speaker" | "star-medal" | "star" | "steps-circle" | "stopwatch" | "suitcase" | "survey" | "swag" | "switch" | "tag" | "target" | "teams" | "timesheet" | "touch-id" | "trash-bin" | "unlock" | "user" | "video-1" | "video-2" | "activate-outlined" | "add-person-outlined" | "add-section-outlined" | "add-time-outlined" | "add" | "adjustment-outlined" | "alignment-2-outlined" | "alignment-outlined" | "all-caps" | "arrow-down" | "arrow-left" | "arrow-right" | "arrow-up" | "at-sign" | "bell-outlined" | "billing-outlined" | "body-outlined" | "bold" | "bookmark-outlined" | "box-check-outlined" | "box-outlined" | "bullet-points" | "cake-outlined" | "calendar-dates-outlined" | "calendar-star-outlined" | "camera-outlined" | "cancel" | "checkmark" | "circle-add-outlined" | "circle-cancel-outlined" | "circle-down-outlined" | "circle-info-outlined" | "circle-left-outlined" | "circle-ok-outlined" | "circle-question-outlined" | "circle-remove-outlined" | "circle-right-outlined" | "circle-up-outlined" | "circle-warning-outlined" | "clock-2-outlined" | "clock-outlined" | "cog-outlined" | "coin-outlined" | "comment-outlined" | "contacts-outlined" | "credit-card-outlined" | "direction-arrows-outlined" | "directory-outlined" | "document-outlined" | "dollar-coin-shine-outlined" | "dollar-sign" | "double-buildings-outlined" | "double-left-arrows" | "double-right-arrows" | "download-outlined" | "edit-template-outlined" | "email-outlined" | "enter-arrow" | "envelope-outlined" | "expense-outlined" | "external-link" | "eye-invisible-outlined" | "eye-outlined" | "face-id" | "face-meh-outlined" | "face-open-smiley-outlined" | "face-sad-outlined" | "face-smiley-outlined" | "feed-outlined" | "file-certified-outlined" | "file-clone-outlined" | "file-copy-outlined" | "file-dispose-outlined" | "file-download-outlined" | "file-export-outlined" | "file-lock-outlined" | "file-outlined" | "file-search-outlined" | "file-secured-outlined" | "file-verified-outlined" | "folder-outlined" | "folder-user-outlined" | "funnel-filter-outline" | "graph-outlined" | "happy-sun-outlined" | "health-bag-outlined" | "heart-outlined" | "home-outlined" | "image-outlined" | "import-outlined" | "instapay-outlined" | "italic" | "link-1" | "link-2" | "list-outlined" | "location-outlined" | "lock-outlined" | "locked-file-outlined" | "log-out" | "media-content-outlined" | "menu-close" | "menu-expand" | "menu-fold-outlined" | "menu-unfold-outlined" | "moneybag-outlined" | "moon-outlined" | "more-horizontal" | "more-vertical" | "multiple-folders-outlined" | "multiple-users-outlined" | "node-outlined" | "number-points" | "payment-summary-outlined" | "payslip-outlined" | "pencil-outlined" | "percentage" | "phone-outlined" | "piggy-bank-outlined" | "plane-outlined" | "play-circle-outlined" | "print-outlined" | "qr-code-outlined" | "re-assign" | "redeem" | "refresh" | "remove" | "reply-outlined" | "restart" | "return-arrow" | "rostering-outlined" | "save-outlined" | "schedule-outlined" | "search-outlined" | "send-outlined" | "share-1" | "share-2" | "single-down-arrow" | "single-left-arrow" | "single-right-arrow" | "single-up-arrow" | "speaker-outlined" | "star-outlined" | "stopwatch-outlined" | "strikethrough" | "suitcase-outlined" | "survey-outlined" | "switch-outlined" | "sync" | "target-outlined" | "timesheet-outlined" | "transfer" | "trash-bin-outlined" | "unavailable" | "underline" | "unlock-outlined" | "upload-outlined" | "user-circle-outlined" | "user-outlined" | "user-rectangle-outlined" | "video-1-outlined" | "video-2-outlined" | "wallet-outlined" | "warning";
1
+ declare const isHeroIcon: (x: any) => x is "number" | "activate" | "add-person" | "adjustment" | "alignment" | "bank" | "bell" | "billing" | "bookmark" | "box-check" | "box" | "buildings" | "cake" | "calendar-clock" | "calendar" | "candy-box-menu" | "carat-down-small" | "carat-down" | "carat-left" | "carat-right" | "carat-up" | "circle-add" | "circle-cancel" | "circle-check" | "circle-down" | "circle-info" | "circle-left" | "circle-ok" | "circle-pencil" | "circle-question" | "circle-remove" | "circle-right" | "circle-up" | "circle-warning" | "clock" | "clock-3" | "cloud-download" | "cloud-upload" | "cog" | "coin" | "contacts" | "credit-card" | "diamond" | "direction-arrows" | "directory" | "document" | "dollar-coin-shine" | "double-buildings" | "edit-template" | "envelope" | "expense" | "eye-circle" | "eye-invisible" | "eye" | "face-meh" | "face-sad" | "face-smiley" | "feed" | "feedbacks" | "file-certified" | "file-clone" | "file-copy" | "file-csv" | "file-dispose" | "file-doc" | "file-excel" | "file-export" | "file-lock" | "file-pdf" | "file-powerpoint" | "file-search" | "file-secured" | "file-sheets" | "file-slide" | "file-verified" | "file-word" | "file" | "folder-user" | "folder" | "funnel-filter" | "global-dollar" | "globe" | "graduation-cap" | "graph" | "happy-sun" | "health-bag" | "heart" | "home" | "image" | "import" | "incident-siren" | "instapay" | "list" | "loading" | "loading-2" | "location" | "lock" | "looks-one" | "looks-two" | "media-content" | "menu" | "moneybag" | "moon" | "multiple-stars" | "multiple-users" | "node" | "open-folder" | "paperclip" | "payment-summary" | "pencil" | "phone" | "piggy-bank" | "plane" | "play-circle" | "print" | "raising-hands" | "reply" | "reschedule" | "rostering" | "save" | "schedule" | "search-person" | "send" | "speaker" | "star-medal" | "star" | "steps-circle" | "stopwatch" | "suitcase" | "survey" | "swag" | "switch" | "tag" | "target" | "teams" | "timesheet" | "touch-id" | "trash-bin" | "unlock" | "user" | "video-1" | "video-2" | "activate-outlined" | "add-person-outlined" | "add-section-outlined" | "add-time-outlined" | "add" | "adjustment-outlined" | "alignment-2-outlined" | "alignment-outlined" | "all-caps" | "arrow-down" | "arrow-left" | "arrow-right" | "arrow-up" | "at-sign" | "bell-outlined" | "billing-outlined" | "body-outlined" | "bold" | "bookmark-outlined" | "box-check-outlined" | "box-outlined" | "bullet-points" | "cake-outlined" | "calendar-dates-outlined" | "calendar-star-outlined" | "camera-outlined" | "cancel" | "checkmark" | "circle-add-outlined" | "circle-cancel-outlined" | "circle-down-outlined" | "circle-info-outlined" | "circle-left-outlined" | "circle-ok-outlined" | "circle-question-outlined" | "circle-remove-outlined" | "circle-right-outlined" | "circle-up-outlined" | "circle-warning-outlined" | "clock-2-outlined" | "clock-outlined" | "cog-outlined" | "coin-outlined" | "comment-outlined" | "contacts-outlined" | "credit-card-outlined" | "direction-arrows-outlined" | "directory-outlined" | "document-outlined" | "dollar-coin-shine-outlined" | "dollar-sign" | "double-buildings-outlined" | "double-left-arrows" | "double-right-arrows" | "download-outlined" | "edit-template-outlined" | "email-outlined" | "enter-arrow" | "envelope-outlined" | "expense-outlined" | "external-link" | "eye-invisible-outlined" | "eye-outlined" | "face-id" | "face-meh-outlined" | "face-open-smiley-outlined" | "face-sad-outlined" | "face-smiley-outlined" | "feed-outlined" | "file-certified-outlined" | "file-clone-outlined" | "file-copy-outlined" | "file-dispose-outlined" | "file-download-outlined" | "file-export-outlined" | "file-lock-outlined" | "file-outlined" | "file-search-outlined" | "file-secured-outlined" | "file-verified-outlined" | "folder-outlined" | "folder-user-outlined" | "funnel-filter-outline" | "graph-outlined" | "happy-sun-outlined" | "health-bag-outlined" | "heart-outlined" | "home-outlined" | "image-outlined" | "import-outlined" | "instapay-outlined" | "italic" | "link-1" | "link-2" | "list-outlined" | "location-outlined" | "lock-outlined" | "locked-file-outlined" | "log-out" | "media-content-outlined" | "menu-close" | "menu-expand" | "menu-fold-outlined" | "menu-unfold-outlined" | "moneybag-outlined" | "moon-outlined" | "more-horizontal" | "more-vertical" | "multiple-folders-outlined" | "multiple-users-outlined" | "node-outlined" | "number-points" | "payment-summary-outlined" | "payslip-outlined" | "pencil-outlined" | "percentage" | "phone-outlined" | "piggy-bank-outlined" | "plane-outlined" | "play-circle-outlined" | "print-outlined" | "qr-code-outlined" | "re-assign" | "redeem" | "refresh" | "remove" | "reply-outlined" | "restart" | "return-arrow" | "rostering-outlined" | "save-outlined" | "schedule-outlined" | "search-outlined" | "send-outlined" | "share-1" | "share-2" | "single-down-arrow" | "single-left-arrow" | "single-right-arrow" | "single-up-arrow" | "speaker-outlined" | "star-outlined" | "stopwatch-outlined" | "strikethrough" | "suitcase-outlined" | "survey-outlined" | "switch-outlined" | "sync" | "target-outlined" | "timesheet-outlined" | "transfer" | "trash-bin-outlined" | "unavailable" | "underline" | "unlock-outlined" | "upload-outlined" | "user-circle-outlined" | "user-outlined" | "user-rectangle-outlined" | "video-1-outlined" | "video-2-outlined" | "wallet-outlined" | "warning";
2
2
  export { isHeroIcon };
@@ -0,0 +1,8 @@
1
+ import { State } from './StyledPinInput';
2
+ declare function PinCell({ value, secure, focused, state, }: {
3
+ value: string;
4
+ secure?: boolean;
5
+ focused?: boolean;
6
+ state?: State;
7
+ }): JSX.Element;
8
+ export default PinCell;
@@ -0,0 +1,73 @@
1
+ import { Text, TextInput, View } from 'react-native';
2
+ export declare const StyledWrapper: import("@emotion/native").StyledComponent<import("react-native").ViewProps & {
3
+ theme?: import("@emotion/react").Theme | undefined;
4
+ as?: import("react").ElementType<any> | undefined;
5
+ }, {}, {
6
+ ref?: import("react").Ref<View> | undefined;
7
+ }>;
8
+ export declare const StyledPinWrapper: import("@emotion/native").StyledComponent<import("react-native").ViewProps & {
9
+ theme?: import("@emotion/react").Theme | undefined;
10
+ as?: import("react").ElementType<any> | undefined;
11
+ }, {}, {
12
+ ref?: import("react").Ref<View> | undefined;
13
+ }>;
14
+ export declare type State = 'default' | 'disabled' | 'error';
15
+ export declare const StyledCell: import("@emotion/native").StyledComponent<import("react-native").ViewProps & {
16
+ theme?: import("@emotion/react").Theme | undefined;
17
+ as?: import("react").ElementType<any> | undefined;
18
+ } & {
19
+ themeFocused: boolean;
20
+ themeState: State;
21
+ }, {}, {
22
+ ref?: import("react").Ref<View> | undefined;
23
+ }>;
24
+ export declare const StyledCellText: import("@emotion/native").StyledComponent<import("react-native").TextProps & {
25
+ theme?: import("@emotion/react").Theme | undefined;
26
+ as?: import("react").ElementType<any> | undefined;
27
+ } & {
28
+ themeState: State;
29
+ }, {}, {
30
+ ref?: import("react").Ref<Text> | undefined;
31
+ }>;
32
+ export declare const StyledSpacer: import("@emotion/native").StyledComponent<import("react-native").ViewProps & {
33
+ theme?: import("@emotion/react").Theme | undefined;
34
+ as?: import("react").ElementType<any> | undefined;
35
+ }, {}, {
36
+ ref?: import("react").Ref<View> | undefined;
37
+ }>;
38
+ export declare const StyledMask: import("@emotion/native").StyledComponent<import("react-native").ViewProps & {
39
+ theme?: import("@emotion/react").Theme | undefined;
40
+ as?: import("react").ElementType<any> | undefined;
41
+ } & {
42
+ themeState: State;
43
+ }, {}, {
44
+ ref?: import("react").Ref<View> | undefined;
45
+ }>;
46
+ export declare const StyledFilledMask: import("@emotion/native").StyledComponent<import("react-native").ViewProps & {
47
+ theme?: import("@emotion/react").Theme | undefined;
48
+ as?: import("react").ElementType<any> | undefined;
49
+ } & {
50
+ themeState: State;
51
+ }, {}, {
52
+ ref?: import("react").Ref<View> | undefined;
53
+ }>;
54
+ export declare const StyledHiddenInput: import("@emotion/native").StyledComponent<import("react-native").TextInputProps & {
55
+ theme?: import("@emotion/react").Theme | undefined;
56
+ as?: import("react").ElementType<any> | undefined;
57
+ } & {
58
+ themePinLength: number;
59
+ }, {}, {
60
+ ref?: import("react").Ref<TextInput> | undefined;
61
+ }>;
62
+ export declare const StyledErrorContainer: import("@emotion/native").StyledComponent<import("react-native").ViewProps & {
63
+ theme?: import("@emotion/react").Theme | undefined;
64
+ as?: import("react").ElementType<any> | undefined;
65
+ }, {}, {
66
+ ref?: import("react").Ref<View> | undefined;
67
+ }>;
68
+ export declare const StyledErrorMessage: import("@emotion/native").StyledComponent<import("react-native").TextProps & {
69
+ theme?: import("@emotion/react").Theme | undefined;
70
+ as?: import("react").ElementType<any> | undefined;
71
+ }, {}, {
72
+ ref?: import("react").Ref<Text> | undefined;
73
+ }>;
@@ -0,0 +1,48 @@
1
+ import { StyleProp, ViewStyle } from 'react-native';
2
+ import { State } from './StyledPinInput';
3
+ interface PinInputProps {
4
+ /**
5
+ * The value to show for the input.
6
+ */
7
+ value?: string;
8
+ /**
9
+ * Callback function that's called when the text changed.
10
+ */
11
+ onChangeText: (value: string) => void;
12
+ /**
13
+ * Callback function that's called when the input is completely filled.
14
+ */
15
+ onFulfill?: (value: string) => void;
16
+ /**
17
+ * Number of character for the input.
18
+ */
19
+ length?: number;
20
+ disabled?: boolean;
21
+ /**
22
+ * Whether the pin value is secured using masks.
23
+ * By default, this is true, meaning that masks are shown to hide pin value.
24
+ */
25
+ secure?: boolean;
26
+ /**
27
+ * If true, focuses the input on componentDidMount.
28
+ */
29
+ autoFocus?: boolean;
30
+ /**
31
+ * Error message.
32
+ */
33
+ error?: string;
34
+ /**
35
+ * Additional style.
36
+ */
37
+ style?: StyleProp<ViewStyle>;
38
+ /**
39
+ * Testing id of the component.
40
+ */
41
+ testID?: string;
42
+ }
43
+ export declare function getState({ disabled, error, }: {
44
+ disabled?: boolean;
45
+ error?: string;
46
+ }): State;
47
+ declare function PinInput({ value, onChangeText, onFulfill, length, disabled, secure, autoFocus, error, style, testID, }: PinInputProps): JSX.Element;
48
+ export default PinInput;
@@ -5,5 +5,5 @@ interface OptionListProps<T> extends MultiSelectProps<T> {
5
5
  */
6
6
  onPress: (value: T[]) => void;
7
7
  }
8
- declare const OptionList: <T>({ value, options, onPress, keyExtractor, }: Pick<OptionListProps<T>, "onPress" | "value" | "options" | "keyExtractor">) => JSX.Element;
8
+ declare const OptionList: <T>({ keyExtractor, loading, onEndReached, onPress, onQueryChange, options, value, }: Pick<OptionListProps<T>, "loading" | "onPress" | "value" | "options" | "keyExtractor" | "onEndReached" | "onQueryChange">) => JSX.Element;
9
9
  export default OptionList;
@@ -1,10 +1,5 @@
1
- import { StyleProp, ViewStyle } from 'react-native';
2
- import { OptionType } from '../types';
3
- export interface MultiSelectProps<T> {
4
- /**
5
- * An array of options to be selected.
6
- */
7
- options: OptionType<T>[];
1
+ import { SelectProps } from '../types';
2
+ export interface MultiSelectProps<T> extends SelectProps<T> {
8
3
  /**
9
4
  * Current selected value.
10
5
  */
@@ -13,27 +8,10 @@ export interface MultiSelectProps<T> {
13
8
  * event handler for footer button.
14
9
  */
15
10
  onConfirm: (value: T[]) => void;
16
- /**
17
- * Field label.
18
- */
19
- label: string;
20
11
  /**
21
12
  * Footer label.
22
13
  */
23
14
  footerLabel: string;
24
- /**
25
- * Used to extract a unique key for a given option at the specified index. Key is used for caching and as the react key to track item re-ordering.
26
- * The default extractor checks option.key, and then falls back to using the index, like React does.
27
- */
28
- keyExtractor?: (option: OptionType<T>, index?: number) => string;
29
- /**
30
- * Additional style.
31
- */
32
- style?: StyleProp<ViewStyle>;
33
- /**
34
- * Testing id of the component.
35
- */
36
- testID?: string;
37
15
  }
38
- declare function MultiSelect<T>({ options, value, testID, style, label, footerLabel, onConfirm, }: MultiSelectProps<T>): JSX.Element;
16
+ declare function MultiSelect<T>({ footerLabel, label, loading, onConfirm, onDimiss, onEndReached, onQueryChange, options, query, style, testID, value, }: MultiSelectProps<T>): JSX.Element;
39
17
  export default MultiSelect;
@@ -5,5 +5,5 @@ interface OptionListProps<T> extends SingleSelectProps<T> {
5
5
  */
6
6
  onPress: (value: T | null) => void;
7
7
  }
8
- declare const OptionList: <T>({ value, options, onPress, keyExtractor, }: Pick<OptionListProps<T>, "onPress" | "value" | "options" | "keyExtractor">) => JSX.Element;
8
+ declare const OptionList: <T>({ keyExtractor, loading, onEndReached, onPress, onQueryChange, options, value, }: Pick<OptionListProps<T>, "loading" | "onPress" | "value" | "options" | "keyExtractor" | "onEndReached" | "onQueryChange">) => JSX.Element;
9
9
  export default OptionList;
@@ -1,35 +1,13 @@
1
- import { StyleProp, ViewStyle } from 'react-native';
2
- import { OptionType } from '../types';
3
- export interface SingleSelectProps<T> {
4
- /**
5
- * An array of options to be selected.
6
- */
7
- options: OptionType<T>[];
1
+ import { SelectProps } from '../types';
2
+ export interface SingleSelectProps<T> extends SelectProps<T> {
8
3
  /**
9
4
  * Current selected value.
10
5
  */
11
6
  value: T | null;
12
7
  /**
13
- * event handler for confirm button
8
+ * on select event handler
14
9
  */
15
10
  onConfirm: (value: T | null) => void;
16
- /**
17
- * Field label.
18
- */
19
- label: string;
20
- /**
21
- * Used to extract a unique key for a given option at the specified index. Key is used for caching and as the react key to track item re-ordering.
22
- * The default extractor checks option.key, and then falls back to using the index, like React does.
23
- */
24
- keyExtractor?: (option: OptionType<T>, index?: number) => string;
25
- /**
26
- * Additional style.
27
- */
28
- style?: StyleProp<ViewStyle>;
29
- /**
30
- * Testing id of the component.
31
- */
32
- testID?: string;
33
11
  }
34
- declare const SingleSelect: <T>({ options, value, testID, style, label, onConfirm, }: SingleSelectProps<T>) => JSX.Element;
12
+ declare const SingleSelect: <T>({ label, loading, onConfirm, onDimiss, onEndReached, onQueryChange, options, query, style, testID, value, }: SingleSelectProps<T>) => JSX.Element;
35
13
  export default SingleSelect;
@@ -0,0 +1,17 @@
1
+ import React from 'react';
2
+ import { OptionType, SelectProps } from './types';
3
+ export interface RenderItemProps<T> {
4
+ item: OptionType<T>;
5
+ }
6
+ export interface OptionListProps<T> extends SelectProps<T> {
7
+ /**
8
+ * FlatList renderItem Element
9
+ */
10
+ RenderItem: React.FC<RenderItemProps<T>>;
11
+ /**
12
+ * Selected scroll index
13
+ */
14
+ scrollIndex?: number;
15
+ }
16
+ declare const StyledOptionList: <T>({ keyExtractor, loading, onEndReached, onQueryChange, options, RenderItem, scrollIndex, }: Pick<OptionListProps<T>, "loading" | "options" | "keyExtractor" | "scrollIndex" | "onEndReached" | "RenderItem" | "onQueryChange">) => JSX.Element;
17
+ export default StyledOptionList;