@hero-design/rn 7.22.3 → 7.24.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 (197) hide show
  1. package/.turbo/turbo-build.log +3 -3
  2. package/assets/fonts/hero-icons.ttf +0 -0
  3. package/es/index.js +2974 -10456
  4. package/lib/assets/fonts/hero-icons.ttf +0 -0
  5. package/lib/index.js +2977 -10455
  6. package/package.json +8 -6
  7. package/rollup.config.js +1 -0
  8. package/src/components/Box/StyledBox.tsx +1 -2
  9. package/src/components/DatePicker/__tests__/__snapshots__/DatePickerAndroid.spec.tsx.snap +19 -4
  10. package/src/components/DatePicker/__tests__/__snapshots__/DatePickerIOS.spec.tsx.snap +19 -4
  11. package/src/components/Empty/index.tsx +1 -2
  12. package/src/components/Icon/HeroIcon/fonts/hero-icons.ttf +0 -0
  13. package/src/components/Icon/HeroIcon/glyphMap.json +1 -0
  14. package/src/components/Icon/HeroIcon/index.tsx +3 -7
  15. package/src/components/Icon/IconList.ts +8 -5
  16. package/src/components/Icon/index.tsx +1 -0
  17. package/src/components/RefreshControl/__tests__/__snapshots__/index.spec.tsx.snap +69 -0
  18. package/src/components/RefreshControl/__tests__/index.spec.tsx +55 -0
  19. package/src/components/RefreshControl/index.tsx +23 -0
  20. package/src/components/RichTextEditor/MentionList.tsx +25 -4
  21. package/src/components/RichTextEditor/RichTextEditor.tsx +3 -4
  22. package/src/components/RichTextEditor/__tests__/MentionList.spec.tsx +6 -6
  23. package/src/components/RichTextEditor/__tests__/__snapshots__/RichTextEditor.spec.tsx.snap +38 -8
  24. package/src/components/Select/MultiSelect/__tests__/__snapshots__/OptionList.spec.tsx.snap +8 -4
  25. package/src/components/Select/MultiSelect/__tests__/__snapshots__/index.spec.tsx.snap +95 -20
  26. package/src/components/Select/MultiSelect/index.tsx +1 -1
  27. package/src/components/Select/SingleSelect/__tests__/__snapshots__/OptionList.spec.tsx.snap +8 -4
  28. package/src/components/Select/SingleSelect/__tests__/__snapshots__/index.spec.tsx.snap +95 -20
  29. package/src/components/Select/SingleSelect/index.tsx +1 -1
  30. package/src/components/Select/types.ts +1 -3
  31. package/src/components/Spinner/AnimatedSpinner.tsx +22 -7
  32. package/src/components/Spinner/StyledSpinner.tsx +16 -11
  33. package/src/components/Spinner/__tests__/AnimatedSpinner.spec.tsx +3 -1
  34. package/src/components/Spinner/__tests__/StyledSpinner.spec.tsx +42 -31
  35. package/src/components/Spinner/__tests__/__snapshots__/AnimatedSpinner.spec.tsx.snap +8 -4
  36. package/src/components/Spinner/__tests__/__snapshots__/StyledSpinner.spec.tsx.snap +532 -72
  37. package/src/components/Spinner/__tests__/__snapshots__/index.spec.tsx.snap +8 -4
  38. package/src/components/Spinner/index.tsx +6 -1
  39. package/src/components/Swipeable/StyledSwipeable.tsx +11 -0
  40. package/src/components/Swipeable/SwipeableAction.tsx +45 -0
  41. package/src/components/Swipeable/__tests__/SwipeableAction.spec.tsx +37 -0
  42. package/src/components/Swipeable/__tests__/__snapshots__/SwipeableAction.spec.tsx.snap +130 -0
  43. package/src/components/Swipeable/__tests__/__snapshots__/index.spec.tsx.snap +33 -0
  44. package/src/components/Swipeable/__tests__/index.spec.tsx +34 -0
  45. package/src/components/Swipeable/index.tsx +148 -0
  46. package/src/components/TextInput/StyledTextInput.tsx +18 -19
  47. package/src/components/TextInput/__tests__/StyledTextInput.spec.tsx +14 -8
  48. package/src/components/TextInput/__tests__/__snapshots__/StyledTextInput.spec.tsx.snap +52 -150
  49. package/src/components/TextInput/__tests__/__snapshots__/index.spec.tsx.snap +247 -52
  50. package/src/components/TextInput/__tests__/index.spec.tsx +114 -124
  51. package/src/components/TextInput/index.tsx +27 -9
  52. package/src/components/TimePicker/__tests__/__snapshots__/TimePickerAndroid.spec.tsx.snap +19 -4
  53. package/src/components/TimePicker/__tests__/__snapshots__/TimePickerIOS.spec.tsx.snap +19 -4
  54. package/src/index.ts +8 -0
  55. package/src/theme/ThemeSwitcher.tsx +9 -2
  56. package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +20 -9
  57. package/src/theme/components/refreshControl.ts +11 -0
  58. package/src/theme/components/richTextEditor.ts +6 -5
  59. package/src/theme/components/spinner.ts +4 -1
  60. package/src/theme/components/swipeable.ts +13 -0
  61. package/src/theme/components/textInput.ts +0 -5
  62. package/src/theme/getTheme.ts +6 -0
  63. package/src/theme/global/colors/jobs.ts +17 -0
  64. package/src/theme/global/colors/work.ts +0 -2
  65. package/src/theme/global/index.ts +8 -1
  66. package/src/theme/index.ts +6 -1
  67. package/src/types.ts +2 -0
  68. package/src/utils/__tests__/helpers.spec.ts +27 -0
  69. package/src/utils/helpers.ts +21 -0
  70. package/testUtils/setup.tsx +13 -0
  71. package/tsconfig.prod.json +4 -0
  72. package/types/components/Empty/index.d.ts +1 -2
  73. package/types/components/Icon/IconList.d.ts +1 -1
  74. package/types/components/Icon/index.d.ts +4 -1
  75. package/types/components/Icon/utils.d.ts +1 -1
  76. package/types/components/RefreshControl/index.d.ts +5 -0
  77. package/types/components/RichTextEditor/MentionList.d.ts +7 -3
  78. package/types/components/RichTextEditor/index.d.ts +1 -1
  79. package/types/components/Select/types.d.ts +1 -3
  80. package/types/components/Spinner/AnimatedSpinner.d.ts +2 -1
  81. package/types/components/Spinner/StyledSpinner.d.ts +1 -0
  82. package/types/components/Spinner/index.d.ts +5 -1
  83. package/types/components/Swipeable/StyledSwipeable.d.ts +10 -0
  84. package/types/components/Swipeable/SwipeableAction.d.ts +27 -0
  85. package/types/components/Swipeable/index.d.ts +41 -0
  86. package/types/components/TextInput/StyledTextInput.d.ts +11 -4
  87. package/types/components/TextInput/index.d.ts +1 -1
  88. package/types/index.d.ts +4 -2
  89. package/types/theme/ThemeSwitcher.d.ts +1 -1
  90. package/types/theme/components/refreshControl.d.ts +7 -0
  91. package/types/theme/components/richTextEditor.d.ts +4 -3
  92. package/types/theme/components/spinner.d.ts +4 -1
  93. package/types/theme/components/swipeable.d.ts +9 -0
  94. package/types/theme/components/textInput.d.ts +0 -5
  95. package/types/theme/getTheme.d.ts +4 -0
  96. package/types/theme/global/colors/jobs.d.ts +3 -0
  97. package/types/theme/global/index.d.ts +2 -1
  98. package/types/theme/index.d.ts +2 -2
  99. package/types/types.d.ts +2 -1
  100. package/types/utils/helpers.d.ts +2 -0
  101. package/src/components/Box/__tests__/helpers.spec.ts +0 -14
  102. package/src/components/Box/helpers.ts +0 -10
  103. package/src/components/Icon/HeroIcon/selection.json +0 -7029
  104. package/types/components/Accordion/__tests__/AccordionItem.spec.d.ts +0 -1
  105. package/types/components/Accordion/__tests__/StyledAccordion.spec.d.ts +0 -1
  106. package/types/components/Accordion/__tests__/index.spec.d.ts +0 -1
  107. package/types/components/Alert/__tests__/index.spec.d.ts +0 -1
  108. package/types/components/Avatar/__tests__/StyledAvatar.spec.d.ts +0 -1
  109. package/types/components/Avatar/__tests__/index.spec.d.ts +0 -1
  110. package/types/components/Badge/__tests__/Badge.spec.d.ts +0 -1
  111. package/types/components/Badge/__tests__/Status.spec.d.ts +0 -1
  112. package/types/components/BottomNavigation/__tests__/index.spec.d.ts +0 -1
  113. package/types/components/BottomSheet/__tests__/index.spec.d.ts +0 -1
  114. package/types/components/Box/__tests__/helpers.spec.d.ts +0 -1
  115. package/types/components/Box/__tests__/index.spec.d.ts +0 -1
  116. package/types/components/Box/helpers.d.ts +0 -1
  117. package/types/components/Button/LoadingIndicator/__tests__/StyledLoadingIndicator.spec.d.ts +0 -1
  118. package/types/components/Button/LoadingIndicator/__tests__/index.spec.d.ts +0 -1
  119. package/types/components/Button/UtilityButton/__tests__/index.spec.d.ts +0 -1
  120. package/types/components/Button/__tests__/Button.spec.d.ts +0 -1
  121. package/types/components/Button/__tests__/IconButton.spec.d.ts +0 -1
  122. package/types/components/Button/__tests__/StyledButton.spec.d.ts +0 -1
  123. package/types/components/Calendar/__tests__/CalendarRowItem.spec.d.ts +0 -1
  124. package/types/components/Calendar/__tests__/helper.spec.d.ts +0 -1
  125. package/types/components/Calendar/__tests__/index.spec.d.ts +0 -1
  126. package/types/components/Card/DataCard/__tests__/StyledDataCard.spec.d.ts +0 -1
  127. package/types/components/Card/DataCard/__tests__/index.spec.d.ts +0 -1
  128. package/types/components/Card/__tests__/StyledCard.spec.d.ts +0 -1
  129. package/types/components/Card/__tests__/index.spec.d.ts +0 -1
  130. package/types/components/Checkbox/__tests__/StyledCheckbox.spec.d.ts +0 -1
  131. package/types/components/Checkbox/__tests__/index.spec.d.ts +0 -1
  132. package/types/components/Collapse/__tests__/StyledCollapse.spec.d.ts +0 -1
  133. package/types/components/Collapse/__tests__/index.spec.d.ts +0 -1
  134. package/types/components/ContentNavigator/__tests__/StyledContentNavigator.spec.d.ts +0 -1
  135. package/types/components/ContentNavigator/__tests__/index.spec.d.ts +0 -1
  136. package/types/components/DatePicker/__tests__/DatePicker.spec.d.ts +0 -1
  137. package/types/components/DatePicker/__tests__/DatePickerAndroid.spec.d.ts +0 -1
  138. package/types/components/DatePicker/__tests__/DatePickerIOS.spec.d.ts +0 -1
  139. package/types/components/Divider/__tests__/StyledDivider.spec.d.ts +0 -1
  140. package/types/components/Drawer/DragableDrawer/__tests__/helpers.spec.d.ts +0 -1
  141. package/types/components/Drawer/DragableDrawer/__tests__/index.spec.d.ts +0 -1
  142. package/types/components/Drawer/__tests__/index.spec.d.ts +0 -1
  143. package/types/components/Empty/__tests__/index.spec.d.ts +0 -1
  144. package/types/components/FAB/ActionGroup/__tests__/index.spec.d.ts +0 -1
  145. package/types/components/FAB/__tests__/AnimatedFABIcon.spec.d.ts +0 -1
  146. package/types/components/FAB/__tests__/StyledFAB.spec.d.ts +0 -1
  147. package/types/components/FAB/__tests__/index.spec.d.ts +0 -1
  148. package/types/components/Icon/__tests__/index.spec.d.ts +0 -1
  149. package/types/components/Image/__tests__/index.spec.d.ts +0 -1
  150. package/types/components/List/__tests__/BasicListItem.spec.d.ts +0 -1
  151. package/types/components/List/__tests__/ListItem.spec.d.ts +0 -1
  152. package/types/components/List/__tests__/StyledBasicListItem.spec.d.ts +0 -1
  153. package/types/components/List/__tests__/StyledListItem.spec.d.ts +0 -1
  154. package/types/components/PinInput/__tests__/PinCell.spec.d.ts +0 -1
  155. package/types/components/PinInput/__tests__/StyledPinInput.spec.d.ts +0 -1
  156. package/types/components/PinInput/__tests__/index.spec.d.ts +0 -1
  157. package/types/components/Radio/__tests__/Radio.spec.d.ts +0 -1
  158. package/types/components/Radio/__tests__/RadioGroup.spec.d.ts +0 -1
  159. package/types/components/RichTextEditor/__tests__/EditorToolbar.spec.d.ts +0 -1
  160. package/types/components/RichTextEditor/__tests__/MentionList.spec.d.ts +0 -1
  161. package/types/components/RichTextEditor/__tests__/RichTextEditor.spec.d.ts +0 -1
  162. package/types/components/SectionHeading/__tests__/StyledHeading.spec.d.ts +0 -1
  163. package/types/components/SectionHeading/__tests__/index.spec.d.ts +0 -1
  164. package/types/components/Select/MultiSelect/__tests__/Option.spec.d.ts +0 -1
  165. package/types/components/Select/MultiSelect/__tests__/OptionList.spec.d.ts +0 -1
  166. package/types/components/Select/MultiSelect/__tests__/index.spec.d.ts +0 -1
  167. package/types/components/Select/SingleSelect/__tests__/Option.spec.d.ts +0 -1
  168. package/types/components/Select/SingleSelect/__tests__/OptionList.spec.d.ts +0 -1
  169. package/types/components/Select/SingleSelect/__tests__/index.spec.d.ts +0 -1
  170. package/types/components/Select/__tests__/StyledSelect.spec.d.ts +0 -1
  171. package/types/components/Select/__tests__/helpers.spec.d.ts +0 -1
  172. package/types/components/Slider/__tests__/index.spec.d.ts +0 -1
  173. package/types/components/Spinner/__tests__/AnimatedSpinner.spec.d.ts +0 -1
  174. package/types/components/Spinner/__tests__/StyledSpinner.spec.d.ts +0 -1
  175. package/types/components/Spinner/__tests__/index.spec.d.ts +0 -1
  176. package/types/components/Switch/SelectorSwitch/__tests__/Option.spec.d.ts +0 -1
  177. package/types/components/Switch/SelectorSwitch/__tests__/index.spec.d.ts +0 -1
  178. package/types/components/Switch/__tests__/StyledSwitch.spec.d.ts +0 -1
  179. package/types/components/Switch/__tests__/index.spec.d.ts +0 -1
  180. package/types/components/Tabs/__tests__/ScrollableTabs.spec.d.ts +0 -1
  181. package/types/components/Tabs/__tests__/TabWithBadge.spec.d.ts +0 -1
  182. package/types/components/Tabs/__tests__/index.spec.d.ts +0 -1
  183. package/types/components/Tag/__tests__/Tag.spec.d.ts +0 -1
  184. package/types/components/TextInput/__tests__/StyledTextInput.spec.d.ts +0 -1
  185. package/types/components/TextInput/__tests__/index.spec.d.ts +0 -1
  186. package/types/components/TimePicker/__tests__/TimePicker.spec.d.ts +0 -1
  187. package/types/components/TimePicker/__tests__/TimePickerAndroid.spec.d.ts +0 -1
  188. package/types/components/TimePicker/__tests__/TimePickerIOS.spec.d.ts +0 -1
  189. package/types/components/Toast/__tests__/Toast.spec.d.ts +0 -1
  190. package/types/components/Toast/__tests__/ToastContainer.spec.d.ts +0 -1
  191. package/types/components/Toast/__tests__/index.spec.d.ts +0 -1
  192. package/types/components/Toolbar/__tests__/ToolbarGroup.spec.d.ts +0 -1
  193. package/types/components/Toolbar/__tests__/ToolbarItem.spec.d.ts +0 -1
  194. package/types/components/Typography/Text/__tests__/StyledText.spec.d.ts +0 -1
  195. package/types/components/Typography/Text/__tests__/index.spec.d.ts +0 -1
  196. package/types/theme/__tests__/index.spec.d.ts +0 -1
  197. package/types/utils/__tests__/scale.spec.d.ts +0 -1
@@ -1,10 +1,15 @@
1
1
  import React, { useMemo } from 'react';
2
2
 
3
3
  import getTheme from './getTheme';
4
- import { defaultScale, swagSystemPalette, workSystemPalette } from './global';
4
+ import {
5
+ defaultScale,
6
+ swagSystemPalette,
7
+ workSystemPalette,
8
+ jobsSystemPalette,
9
+ } from './global';
5
10
  import ThemeProvider from './ThemeProvider';
6
11
 
7
- type ThemeName = 'swag' | 'work';
12
+ type ThemeName = 'swag' | 'work' | 'jobs';
8
13
 
9
14
  const ThemeSwitcher = ({
10
15
  name = 'swag',
@@ -19,6 +24,8 @@ const ThemeSwitcher = ({
19
24
  return getTheme(defaultScale, swagSystemPalette);
20
25
  case 'work':
21
26
  return getTheme(defaultScale, workSystemPalette);
27
+ case 'jobs':
28
+ return getTheme(defaultScale, jobsSystemPalette);
22
29
  }
23
30
  }, [name]);
24
31
  return <ThemeProvider theme={theme}>{children}</ThemeProvider>;
@@ -530,10 +530,12 @@ Object {
530
530
  "groupTopMargin": 4,
531
531
  },
532
532
  },
533
- "richTextEditor": Object {
534
- "borderWidths": Object {
535
- "webViewBorderBottomWidth": 0.8,
533
+ "refreshControl": Object {
534
+ "colors": Object {
535
+ "indicator": "#001f23",
536
536
  },
537
+ },
538
+ "richTextEditor": Object {
537
539
  "colors": Object {
538
540
  "toolbarBackgroundColor": "#f6f6f7",
539
541
  "toolbarBorderColor": "#e8e9ea",
@@ -542,6 +544,9 @@ Object {
542
544
  "fontSizes": Object {
543
545
  "editor": 14,
544
546
  },
547
+ "radii": Object {
548
+ "mention": 8,
549
+ },
545
550
  "sizes": Object {
546
551
  "editorMinHeight": 24,
547
552
  "toolbarButtonSize": 48,
@@ -550,6 +555,7 @@ Object {
550
555
  },
551
556
  "space": Object {
552
557
  "editorPadding": 16,
558
+ "mention": 4,
553
559
  "toolbarHorizontalPadding": 8,
554
560
  "wrapperMarginBottom": 16,
555
561
  },
@@ -591,7 +597,10 @@ Object {
591
597
  },
592
598
  "spinner": Object {
593
599
  "colors": Object {
594
- "dot": "#001f23",
600
+ "dot": Object {
601
+ "inverted": "#ffffff",
602
+ "primary": "#001f23",
603
+ },
595
604
  },
596
605
  "radii": Object {
597
606
  "default": 999,
@@ -611,6 +620,13 @@ Object {
611
620
  },
612
621
  },
613
622
  },
623
+ "swipeable": Object {
624
+ "colors": Object {
625
+ "danger": "#f46363",
626
+ "primary": "#001f23",
627
+ "success": "#5ace7d",
628
+ },
629
+ },
614
630
  "switch": Object {
615
631
  "colors": Object {
616
632
  "backgroundColors": Object {
@@ -730,7 +746,6 @@ Object {
730
746
  "disabled": "#bfc1c5",
731
747
  "error": "#f46363",
732
748
  "filled": "#f46363",
733
- "focused": "#f46363",
734
749
  "readonly": "#808f91",
735
750
  },
736
751
  "borders": Object {
@@ -738,7 +753,6 @@ Object {
738
753
  "disabled": "#bfc1c5",
739
754
  "error": "#f46363",
740
755
  "filled": "#001f23",
741
- "focused": "#001f23",
742
756
  "readonly": "#808f91",
743
757
  },
744
758
  "disabledLabel": "#bfc1c5",
@@ -750,7 +764,6 @@ Object {
750
764
  "disabled": "#bfc1c5",
751
765
  "error": "#001f23",
752
766
  "filled": "#001f23",
753
- "focused": "#001f23",
754
767
  "readonly": "#bfc1c5",
755
768
  },
756
769
  "labelsInsideTextInput": Object {
@@ -758,7 +771,6 @@ Object {
758
771
  "disabled": "#bfc1c5",
759
772
  "error": "#001f23",
760
773
  "filled": "#001f23",
761
- "focused": "#001f23",
762
774
  "readonly": "#bfc1c5",
763
775
  },
764
776
  "maxLengthLabels": Object {
@@ -766,7 +778,6 @@ Object {
766
778
  "disabled": "#bfc1c5",
767
779
  "error": "#f46363",
768
780
  "filled": "#001f23",
769
- "focused": "#001f23",
770
781
  "readonly": "#bfc1c5",
771
782
  },
772
783
  "placeholderIfFocued": "#808f91",
@@ -0,0 +1,11 @@
1
+ import type { GlobalTheme } from '../global';
2
+
3
+ const getRefreshControlTheme = (theme: GlobalTheme) => {
4
+ const colors = {
5
+ indicator: theme.colors.primary,
6
+ };
7
+
8
+ return { colors };
9
+ };
10
+
11
+ export default getRefreshControlTheme;
@@ -7,10 +7,6 @@ const getRichTextEditorTheme = (theme: GlobalTheme) => {
7
7
  toolbarButtonSelectedBackground: theme.colors.lightHighlightedSurface,
8
8
  };
9
9
 
10
- const borderWidths = {
11
- webViewBorderBottomWidth: 0.8,
12
- };
13
-
14
10
  const sizes = {
15
11
  editorMinHeight: theme.sizes.large,
16
12
  toolbarButtonSize: theme.sizes.xxxlarge,
@@ -26,9 +22,14 @@ const getRichTextEditorTheme = (theme: GlobalTheme) => {
26
22
  wrapperMarginBottom: theme.space.medium,
27
23
  toolbarHorizontalPadding: theme.space.small,
28
24
  editorPadding: theme.space.medium,
25
+ mention: theme.space.xsmall,
26
+ };
27
+
28
+ const radii = {
29
+ mention: theme.radii.medium,
29
30
  };
30
31
 
31
- return { colors, space, borderWidths, fontSizes, sizes };
32
+ return { colors, space, fontSizes, sizes, radii };
32
33
  };
33
34
 
34
35
  export default getRichTextEditorTheme;
@@ -2,7 +2,10 @@ import type { GlobalTheme } from '../global';
2
2
 
3
3
  const getSpinnerTheme = (theme: GlobalTheme) => {
4
4
  const colors = {
5
- dot: theme.colors.primary,
5
+ dot: {
6
+ primary: theme.colors.primary,
7
+ inverted: theme.colors.onPrimary,
8
+ },
6
9
  };
7
10
 
8
11
  const space = {
@@ -0,0 +1,13 @@
1
+ import type { GlobalTheme } from '../global';
2
+
3
+ const getSwipeableTheme = (theme: GlobalTheme) => {
4
+ const colors = {
5
+ success: theme.colors.success,
6
+ danger: theme.colors.error,
7
+ primary: theme.colors.primary,
8
+ };
9
+
10
+ return { colors };
11
+ };
12
+
13
+ export default getSwipeableTheme;
@@ -9,7 +9,6 @@ const getTextInputTheme = (theme: GlobalTheme) => {
9
9
  disabled: theme.colors.disabledOnDefaultGlobalSurface,
10
10
  readonly: theme.colors.mutedSecondary,
11
11
  filled: theme.colors.error,
12
- focused: theme.colors.error,
13
12
  },
14
13
  error: theme.colors.error,
15
14
  placeholderIfNotFocused: theme.colors.globalPrimary,
@@ -24,7 +23,6 @@ const getTextInputTheme = (theme: GlobalTheme) => {
24
23
  disabled: theme.colors.disabledOnDefaultGlobalSurface,
25
24
  readonly: theme.colors.mutedSecondary,
26
25
  filled: theme.colors.globalPrimary,
27
- focused: theme.colors.globalPrimary,
28
26
  },
29
27
  labels: {
30
28
  default: theme.colors.globalPrimary,
@@ -32,7 +30,6 @@ const getTextInputTheme = (theme: GlobalTheme) => {
32
30
  disabled: theme.colors.disabledOnDefaultGlobalSurface,
33
31
  readonly: theme.colors.disabledOnDefaultGlobalSurface,
34
32
  filled: theme.colors.globalPrimary,
35
- focused: theme.colors.globalPrimary,
36
33
  },
37
34
  labelsInsideTextInput: {
38
35
  default: theme.colors.globalPrimary,
@@ -40,7 +37,6 @@ const getTextInputTheme = (theme: GlobalTheme) => {
40
37
  disabled: theme.colors.disabledOnDefaultGlobalSurface,
41
38
  readonly: theme.colors.disabledOnDefaultGlobalSurface,
42
39
  filled: theme.colors.globalPrimary,
43
- focused: theme.colors.globalPrimary,
44
40
  },
45
41
  maxLengthLabels: {
46
42
  default: theme.colors.globalPrimary,
@@ -48,7 +44,6 @@ const getTextInputTheme = (theme: GlobalTheme) => {
48
44
  disabled: theme.colors.disabledOnDefaultGlobalSurface,
49
45
  readonly: theme.colors.disabledOnDefaultGlobalSurface,
50
46
  filled: theme.colors.globalPrimary,
51
- focused: theme.colors.globalPrimary,
52
47
  },
53
48
  };
54
49
 
@@ -22,11 +22,13 @@ import getListTheme from './components/list';
22
22
  import getPinInputTheme from './components/pinInput';
23
23
  import getProgressTheme from './components/progress';
24
24
  import getRadioTheme from './components/radio';
25
+ import getRefreshControlTheme from './components/refreshControl';
25
26
  import getRichTextEditorTheme from './components/richTextEditor';
26
27
  import getSectionHeadingTheme from './components/sectionHeading';
27
28
  import getSelectTheme from './components/select';
28
29
  import getSliderTheme from './components/slider';
29
30
  import getSpinnerTheme from './components/spinner';
31
+ import getSwipeableTheme from './components/swipeable';
30
32
  import getSwitchTheme from './components/switch';
31
33
  import getTabsTheme from './components/tabs';
32
34
  import getTagTheme from './components/tag';
@@ -62,11 +64,13 @@ type Theme = GlobalTheme & {
62
64
  pinInput: ReturnType<typeof getPinInputTheme>;
63
65
  progress: ReturnType<typeof getProgressTheme>;
64
66
  radio: ReturnType<typeof getRadioTheme>;
67
+ refreshControl: ReturnType<typeof getRefreshControlTheme>;
65
68
  richTextEditor: ReturnType<typeof getRichTextEditorTheme>;
66
69
  sectionHeading: ReturnType<typeof getSectionHeadingTheme>;
67
70
  select: ReturnType<typeof getSelectTheme>;
68
71
  slider: ReturnType<typeof getSliderTheme>;
69
72
  spinner: ReturnType<typeof getSpinnerTheme>;
73
+ swipeable: ReturnType<typeof getSwipeableTheme>;
70
74
  switch: ReturnType<typeof getSwitchTheme>;
71
75
  tabs: ReturnType<typeof getTabsTheme>;
72
76
  tag: ReturnType<typeof getTagTheme>;
@@ -108,11 +112,13 @@ const getTheme = (
108
112
  pinInput: getPinInputTheme(globalTheme),
109
113
  progress: getProgressTheme(globalTheme),
110
114
  radio: getRadioTheme(globalTheme),
115
+ refreshControl: getRefreshControlTheme(globalTheme),
111
116
  richTextEditor: getRichTextEditorTheme(globalTheme),
112
117
  sectionHeading: getSectionHeadingTheme(globalTheme),
113
118
  select: getSelectTheme(globalTheme),
114
119
  slider: getSliderTheme(globalTheme),
115
120
  spinner: getSpinnerTheme(globalTheme),
121
+ swipeable: getSwipeableTheme(globalTheme),
116
122
  switch: getSwitchTheme(globalTheme),
117
123
  tabs: getTabsTheme(globalTheme),
118
124
  tag: getTagTheme(globalTheme),
@@ -0,0 +1,17 @@
1
+ import { jobsPalette as palette } from '@hero-design/colors';
2
+ import swag from './swag';
3
+ import type { SystemPalette } from './types';
4
+
5
+ const jobsSystemPalette: SystemPalette = {
6
+ ...swag,
7
+
8
+ primary: palette.hitPink,
9
+ mutedPrimary: palette.hitPinkLight90,
10
+ secondary: palette.apple,
11
+ mutedSecondary: palette.maasstrichtBlueLight50,
12
+ disabledSecondary: palette.hitPinkLight50,
13
+ highlightedSurface: palette.hitPinkLight80,
14
+ lightHighlightedSurface: palette.hitPinkLight90,
15
+ };
16
+
17
+ export default jobsSystemPalette;
@@ -7,9 +7,7 @@ const workSystemPalette: SystemPalette = {
7
7
 
8
8
  primary: palette.gold,
9
9
  mutedPrimary: palette.goldLight90,
10
- onPrimary: palette.maasstrichtBlue,
11
10
  secondary: palette.violet,
12
- onSecondary: palette.white,
13
11
  mutedSecondary: palette.maasstrichtBlueLight50,
14
12
  disabledSecondary: palette.violetLight50,
15
13
  highlightedSurface: palette.violetLight80,
@@ -1,6 +1,7 @@
1
1
  import { scale as defaultScale } from './scale';
2
2
  import swagSystemPalette from './colors/swag';
3
3
  import workSystemPalette from './colors/work';
4
+ import jobsSystemPalette from './colors/jobs';
4
5
 
5
6
  import { getFonts, getFontSizes, getLineHeights } from './typography';
6
7
  import { getSpace } from './space';
@@ -36,4 +37,10 @@ type GlobalTheme = ReturnType<typeof getGlobalTheme>;
36
37
 
37
38
  export type { GlobalTheme, Scale, SystemPalette };
38
39
 
39
- export { getGlobalTheme, defaultScale, swagSystemPalette, workSystemPalette };
40
+ export {
41
+ getGlobalTheme,
42
+ defaultScale,
43
+ swagSystemPalette,
44
+ workSystemPalette,
45
+ jobsSystemPalette,
46
+ };
@@ -1,7 +1,11 @@
1
1
  import getTheme from './getTheme';
2
2
  import ThemeProvider, { useTheme } from './ThemeProvider';
3
3
  import ThemeSwitcher from './ThemeSwitcher';
4
- import { swagSystemPalette, workSystemPalette } from './global';
4
+ import {
5
+ swagSystemPalette,
6
+ workSystemPalette,
7
+ jobsSystemPalette,
8
+ } from './global';
5
9
 
6
10
  import type { Theme } from './getTheme';
7
11
 
@@ -16,6 +20,7 @@ export {
16
20
  useTheme,
17
21
  swagSystemPalette,
18
22
  workSystemPalette,
23
+ jobsSystemPalette,
19
24
  };
20
25
 
21
26
  export default defaultTheme;
package/src/types.ts CHANGED
@@ -12,6 +12,7 @@ import type {
12
12
  ListRenderOptionInfo,
13
13
  SectionListRenderOptionInfo,
14
14
  } from './components/Select/types';
15
+ import { SwipeableProps } from './components/Swipeable';
15
16
 
16
17
  export type {
17
18
  BottomNavigationTabType,
@@ -20,6 +21,7 @@ export type {
20
21
  MultiSelectProps,
21
22
  ListRenderOptionInfo,
22
23
  SectionListRenderOptionInfo,
24
+ SwipeableProps,
23
25
  RichTextEditorProps,
24
26
  RichTextEditorRef,
25
27
  TabType,
@@ -0,0 +1,27 @@
1
+ import { omit, pick } from '../helpers';
2
+
3
+ describe('pick', () => {
4
+ it('works', () => {
5
+ const keys = ['a', 'b', 'f'];
6
+ const props = { a: 1, b: true, c: 'outline', d: null, f: 'whatever' };
7
+
8
+ expect(pick(keys, props)).toEqual({
9
+ a: 1,
10
+ b: true,
11
+ f: 'whatever',
12
+ });
13
+ });
14
+ });
15
+
16
+ describe('omit', () => {
17
+ it('works', () => {
18
+ const keys = ['a', 'b'];
19
+ const props = { a: 1, b: true, c: 'outline', d: null, f: 'whatever' };
20
+
21
+ expect(omit(keys, props)).toEqual({
22
+ c: 'outline',
23
+ d: null,
24
+ f: 'whatever',
25
+ });
26
+ });
27
+ });
@@ -2,3 +2,24 @@ import { Platform } from 'react-native';
2
2
 
3
3
  export const isIOS = Platform.OS === 'ios';
4
4
  export const isAndroid = Platform.OS === 'android';
5
+
6
+ export const pick = (keys: Array<string>, props: Record<string, any>) =>
7
+ keys
8
+ .filter((key) => key in props)
9
+ .reduce(
10
+ (result, cur) => ({
11
+ ...result,
12
+ [cur]: props[cur],
13
+ }),
14
+ {}
15
+ );
16
+
17
+ export const omit = (keys: Array<string>, props: Record<string, any>) => {
18
+ const result = props;
19
+
20
+ keys.forEach((key) => {
21
+ delete result[key];
22
+ });
23
+
24
+ return result;
25
+ };
@@ -3,6 +3,7 @@
3
3
  /* eslint-disable react/prefer-stateless-function */
4
4
  /* eslint-disable max-classes-per-file */
5
5
  jest.mock('react-native-vector-icons', () => ({
6
+ createIconSet: jest.fn(() => 'HeroIcon'),
6
7
  createIconSetFromIcoMoon: jest.fn(() => 'HeroIcon'),
7
8
  }));
8
9
 
@@ -83,4 +84,16 @@ jest.mock('react-native-webview', () => {
83
84
 
84
85
  jest.mock('hero-editor/dist/app.js', () => ({ default: '' }));
85
86
 
87
+ jest.mock('react-native-gesture-handler', () => {
88
+ const ReactNative = jest.requireActual('react-native');
89
+
90
+ return {
91
+ Swipeable: ReactNative.View,
92
+ GestureHandlerRootView: ReactNative.View,
93
+ FlatList: ReactNative.FlatList,
94
+ RectButton: ReactNative.Button,
95
+ TouchableOpacity: ReactNative.TouchableOpacity,
96
+ };
97
+ });
98
+
86
99
  export {};
@@ -0,0 +1,4 @@
1
+ {
2
+ "extends": "./tsconfig.json",
3
+ "exclude": ["src/**/*.spec.ts", "src/**/*.spec.tsx"]
4
+ }
@@ -15,8 +15,7 @@ interface EmptyProps {
15
15
  */
16
16
  description?: string;
17
17
  /**
18
- * Empty's variant
19
- * 'dark' if rendered on a dark background and 'light' otherwise
18
+ * Empty's variant.
20
19
  */
21
20
  variant?: 'light' | 'dark';
22
21
  /**
@@ -1,2 +1,2 @@
1
- declare const IconList: readonly ["activate", "add-emoji", "add-person", "adjustment", "alignment", "archive", "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", "filter-outlined", "folder-user", "folder", "format-bold", "format-heading1", "format-heading2", "format-italic", "format-list-bulleted", "format-list-numbered", "format-underlined", "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", "mandatory", "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", "reply-arrow", "reschedule", "rostering", "save", "schedule-send", "schedule", "search-person", "send", "speaker", "star-award", "star-badge", "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-emoji", "add-person", "adjustment", "alignment", "archive", "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-3", "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", "format-bold", "format-heading1", "format-heading2", "format-italic", "format-list-bulleted", "format-list-numbered", "format-underlined", "funnel-filter", "global-dollar", "globe", "graduation-cap", "graph", "happy-sun", "health-bag", "heart", "home", "image", "import", "incident-siren", "instapay", "list", "loading-2", "loading", "location", "lock", "looks-one", "looks-two", "mandatory", "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", "rectangle-mandatory", "reply-arrow", "reply", "reschedule", "rostering", "save", "schedule-send", "schedule", "search-person", "send", "speaker", "star-award", "star-badge", "star-medal", "star", "steps-circle", "stopwatch", "suitcase", "survey", "swag", "switch", "tag", "target", "teams", "timesheet", "touch-id", "trash-bin", "unlock", "user", "video-1", "video-2", "warning", "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", "filter-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", "trash-outlined", "unavailable", "underline", "unlock-outlined", "upload-outlined", "user-circle-outlined", "user-outlined", "user-rectangle-outlined", "video-1-outlined", "video-2-outlined", "wallet-outlined"];
2
2
  export default IconList;
@@ -27,5 +27,8 @@ export interface IconProps {
27
27
  */
28
28
  testID?: string;
29
29
  }
30
- declare const Icon: ({ icon, style, size, intent, testID, spin, }: IconProps) => JSX.Element;
30
+ declare const Icon: {
31
+ ({ icon, style, size, intent, testID, spin, }: IconProps): JSX.Element;
32
+ List: readonly ["activate", "add-emoji", "add-person", "adjustment", "alignment", "archive", "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-3", "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", "format-bold", "format-heading1", "format-heading2", "format-italic", "format-list-bulleted", "format-list-numbered", "format-underlined", "funnel-filter", "global-dollar", "globe", "graduation-cap", "graph", "happy-sun", "health-bag", "heart", "home", "image", "import", "incident-siren", "instapay", "list", "loading-2", "loading", "location", "lock", "looks-one", "looks-two", "mandatory", "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", "rectangle-mandatory", "reply-arrow", "reply", "reschedule", "rostering", "save", "schedule-send", "schedule", "search-person", "send", "speaker", "star-award", "star-badge", "star-medal", "star", "steps-circle", "stopwatch", "suitcase", "survey", "swag", "switch", "tag", "target", "teams", "timesheet", "touch-id", "trash-bin", "unlock", "user", "video-1", "video-2", "warning", "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", "filter-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", "trash-outlined", "unavailable", "underline", "unlock-outlined", "upload-outlined", "user-circle-outlined", "user-outlined", "user-rectangle-outlined", "video-1-outlined", "video-2-outlined", "wallet-outlined"];
33
+ };
31
34
  export default Icon;
@@ -1,2 +1,2 @@
1
- declare const isHeroIcon: (x: any) => x is "number" | "swag" | "bold" | "menu" | "image" | "switch" | "list" | "warning" | "activate" | "add-emoji" | "add-person" | "adjustment" | "alignment" | "archive" | "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" | "filter-outlined" | "folder-user" | "folder" | "format-bold" | "format-heading1" | "format-heading2" | "format-italic" | "format-list-bulleted" | "format-list-numbered" | "format-underlined" | "funnel-filter" | "global-dollar" | "globe" | "graduation-cap" | "graph" | "happy-sun" | "health-bag" | "heart" | "home" | "import" | "incident-siren" | "instapay" | "loading" | "loading-2" | "location" | "lock" | "looks-one" | "looks-two" | "mandatory" | "media-content" | "moneybag" | "moon" | "multiple-stars" | "multiple-users" | "node" | "open-folder" | "paperclip" | "payment-summary" | "pencil" | "phone" | "piggy-bank" | "plane" | "play-circle" | "print" | "raising-hands" | "reply" | "reply-arrow" | "reschedule" | "rostering" | "save" | "schedule-send" | "schedule" | "search-person" | "send" | "speaker" | "star-award" | "star-badge" | "star-medal" | "star" | "steps-circle" | "stopwatch" | "suitcase" | "survey" | "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" | "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";
1
+ declare const isHeroIcon: (x: any) => x is "number" | "swag" | "bold" | "menu" | "image" | "switch" | "list" | "warning" | "activate" | "add-emoji" | "add-person" | "adjustment" | "alignment" | "archive" | "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-3" | "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" | "format-bold" | "format-heading1" | "format-heading2" | "format-italic" | "format-list-bulleted" | "format-list-numbered" | "format-underlined" | "funnel-filter" | "global-dollar" | "globe" | "graduation-cap" | "graph" | "happy-sun" | "health-bag" | "heart" | "home" | "import" | "incident-siren" | "instapay" | "loading-2" | "loading" | "location" | "lock" | "looks-one" | "looks-two" | "mandatory" | "media-content" | "moneybag" | "moon" | "multiple-stars" | "multiple-users" | "node" | "open-folder" | "paperclip" | "payment-summary" | "pencil" | "phone" | "piggy-bank" | "plane" | "play-circle" | "print" | "raising-hands" | "rectangle-mandatory" | "reply-arrow" | "reply" | "reschedule" | "rostering" | "save" | "schedule-send" | "schedule" | "search-person" | "send" | "speaker" | "star-award" | "star-badge" | "star-medal" | "star" | "steps-circle" | "stopwatch" | "suitcase" | "survey" | "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" | "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" | "filter-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" | "trash-outlined" | "unavailable" | "underline" | "unlock-outlined" | "upload-outlined" | "user-circle-outlined" | "user-outlined" | "user-rectangle-outlined" | "video-1-outlined" | "video-2-outlined" | "wallet-outlined";
2
2
  export { isHeroIcon };
@@ -0,0 +1,5 @@
1
+ import { RefreshControlProps as NativeRefreshControlProps } from 'react-native';
2
+ export interface RefreshControlProps extends Omit<NativeRefreshControlProps, 'colors' | 'tintColor'> {
3
+ }
4
+ declare const RefreshControl: ({ ...props }: RefreshControlProps) => JSX.Element;
5
+ export default RefreshControl;
@@ -1,4 +1,8 @@
1
- export interface MentionListProps {
1
+ interface OnSelectOptionsType<TMetaData> {
2
+ highlighted: boolean;
3
+ meta?: TMetaData;
4
+ }
5
+ export interface MentionListProps<TMetaData = unknown> {
2
6
  /**
3
7
  * Unique name used to communicate with webview, should be the same with the RichTextEditor component it used with
4
8
  */
@@ -6,7 +10,7 @@ export interface MentionListProps {
6
10
  /**
7
11
  * Function used to render mention options
8
12
  */
9
- render: (searchText: string, onSelect: (id: string, name: string) => void) => JSX.Element;
13
+ render: (searchText: string, onSelect: (id: string, name: string, options?: OnSelectOptionsType<TMetaData>) => void) => JSX.Element;
10
14
  }
11
- declare const MentionList: ({ name: eventPrefix, render }: MentionListProps) => JSX.Element;
15
+ declare const MentionList: <TMetaData>({ name: eventPrefix, render }: MentionListProps<TMetaData>) => JSX.Element;
12
16
  export default MentionList;
@@ -1,7 +1,7 @@
1
1
  import type { RichTextEditorProps, RichTextEditorRef } from './RichTextEditor';
2
2
  export type { RichTextEditorProps, RichTextEditorRef };
3
3
  declare const _default: import("react").ForwardRefExoticComponent<Omit<RichTextEditorProps, "forwardedRef"> & import("react").RefAttributes<RichTextEditorRef>> & {
4
- MentionList: ({ name: eventPrefix, render }: import("./MentionList").MentionListProps) => JSX.Element;
4
+ MentionList: <TMetaData>({ name: eventPrefix, render }: import("./MentionList").MentionListProps<TMetaData>) => JSX.Element;
5
5
  Toolbar: ({ name, buttons, testID, }: import("./EditorToolbar").EditorToolbarProps) => JSX.Element;
6
6
  };
7
7
  export default _default;
@@ -57,9 +57,7 @@ export interface SelectProps<V, T extends OptionType<V>> extends Pick<TextInputP
57
57
  /**
58
58
  * Props that are passed to TextInput.
59
59
  */
60
- inputProps?: {
61
- loading?: boolean;
62
- };
60
+ inputProps?: Pick<TextInputProps, 'loading' | 'required'>;
63
61
  /**
64
62
  * Field label.
65
63
  */
@@ -1,4 +1,5 @@
1
- declare const AnimatedSpinner: ({ size }: {
1
+ declare const AnimatedSpinner: ({ size, intent, }: {
2
2
  size: 'small' | 'medium';
3
+ intent: 'primary' | 'inverted';
3
4
  }) => JSX.Element;
4
5
  export { AnimatedSpinner };
@@ -27,6 +27,7 @@ declare const StyledSpinnerDot: import("@emotion/native").StyledComponent<ViewPr
27
27
  } & {
28
28
  themePosition: 'topLeft' | 'topRight' | 'bottomLeft' | 'bottomRight';
29
29
  themeSize: 'small' | 'medium';
30
+ themeIntent: 'primary' | 'inverted';
30
31
  }, {}, {
31
32
  ref?: import("react").Ref<View>;
32
33
  }>;