@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
@@ -5,10 +5,14 @@ interface SpinnerProps extends ViewProps {
5
5
  * Size of Spinner.
6
6
  */
7
7
  size?: 'small' | 'medium';
8
+ /**
9
+ * Spinner's variant.
10
+ */
11
+ intent?: 'primary' | 'inverted';
8
12
  /**
9
13
  * Testing id of the component.
10
14
  */
11
15
  testID?: string;
12
16
  }
13
- declare const Spinner: ({ testID, size, ...nativeProps }: SpinnerProps) => ReactElement;
17
+ declare const Spinner: ({ testID, size, intent, ...nativeProps }: SpinnerProps) => ReactElement;
14
18
  export default Spinner;
@@ -0,0 +1,10 @@
1
+ import { TouchableOpacity } from 'react-native';
2
+ export declare type ActionIntent = 'primary' | 'success' | 'danger';
3
+ export declare const StyledRectButton: import("@emotion/native").StyledComponent<import("react-native").TouchableOpacityProps & {
4
+ theme?: import("@emotion/react").Theme;
5
+ as?: import("react").ElementType<any>;
6
+ } & {
7
+ themeIntent: ActionIntent;
8
+ }, {}, {
9
+ ref?: import("react").Ref<TouchableOpacity>;
10
+ }>;
@@ -0,0 +1,27 @@
1
+ import { ReactNode } from 'react';
2
+ import { StyleProp, ViewStyle } from 'react-native';
3
+ import { ActionIntent } from './StyledSwipeable';
4
+ export interface SwipeableActionProps {
5
+ /**
6
+ * Visual intent color applied to action.
7
+ */
8
+ intent?: ActionIntent;
9
+ /**
10
+ * Callback when the action button is pressed.
11
+ */
12
+ onPress?: () => void;
13
+ /**
14
+ * Action button's content
15
+ */
16
+ children?: ReactNode;
17
+ /**
18
+ * Additional style.
19
+ */
20
+ style?: StyleProp<ViewStyle>;
21
+ /**
22
+ * Testing id of the component.
23
+ */
24
+ testID?: string;
25
+ }
26
+ declare const SwipeableAction: ({ intent, onPress, style, children, testID, }: SwipeableActionProps) => JSX.Element;
27
+ export default SwipeableAction;
@@ -0,0 +1,41 @@
1
+ import { ReactNode } from 'react';
2
+ import type { SwipeableProps as RnghSwipeableProps } from 'react-native-gesture-handler/Swipeable';
3
+ import { RectButton } from 'react-native-gesture-handler';
4
+ declare type State = 'closed' | 'leftOpen' | 'rightOpen';
5
+ export interface SwipeableProps extends Pick<RnghSwipeableProps, 'enableTrackpadTwoFingerGesture' | 'friction' | 'leftThreshold' | 'rightThreshold' | 'overshootLeft' | 'overshootRight' | 'overshootFriction' | 'useNativeAnimations' | 'containerStyle' | 'childrenContainerStyle'> {
6
+ /**
7
+ * React node that is swipeable.
8
+ */
9
+ children: ReactNode;
10
+ /**
11
+ * State of the component.
12
+ */
13
+ state?: 'closed' | 'leftOpen' | 'rightOpen';
14
+ /**
15
+ * Callback when the state of the component changes.
16
+ */
17
+ onStateChange?: (state: State) => void;
18
+ /**
19
+ * Action panel that is going to be revealed from the left side when user swipes right.
20
+ */
21
+ leftActions?: ReactNode;
22
+ /**
23
+ * Width of the left action panel.
24
+ * By default, it will take up the whole width of the device.
25
+ */
26
+ leftActionsWidth?: number;
27
+ /**
28
+ * Action panel that is going to be revealed from the right side when user swipes left.
29
+ */
30
+ rightActions?: ReactNode;
31
+ /**
32
+ * Width of the right action panel.
33
+ * By default, it will take up the whole width of the device.
34
+ */
35
+ rightActionsWidth?: number;
36
+ }
37
+ declare const _default: (({ children, state, onStateChange, leftActions, leftActionsWidth, rightActions, rightActionsWidth, ...swipeableProps }: SwipeableProps) => JSX.Element) & {
38
+ Action: ({ intent, onPress, style, children, testID, }: import("./SwipeableAction").SwipeableActionProps) => JSX.Element;
39
+ Content: typeof RectButton;
40
+ };
41
+ export default _default;
@@ -1,10 +1,8 @@
1
1
  import { TextInput, View } from 'react-native';
2
- export declare type Variant = 'default' | 'filled' | 'focused' | 'disabled' | 'readonly' | 'error';
2
+ export declare type Variant = 'default' | 'filled' | 'disabled' | 'readonly' | 'error';
3
3
  declare const StyledContainer: import("@emotion/native").StyledComponent<import("react-native").ViewProps & {
4
4
  theme?: import("@emotion/react").Theme;
5
5
  as?: import("react").ElementType<any>;
6
- } & {
7
- themeVariant: Variant;
8
6
  }, {}, {
9
7
  ref?: import("react").Ref<View>;
10
8
  }>;
@@ -70,6 +68,15 @@ declare const StyledTextInput: import("@emotion/native").StyledComponent<import(
70
68
  }, {}, {
71
69
  ref?: import("react").Ref<TextInput>;
72
70
  }>;
71
+ declare const StyledBorderBackDrop: import("@emotion/native").StyledComponent<import("react-native").ViewProps & {
72
+ theme?: import("@emotion/react").Theme;
73
+ as?: import("react").ElementType<any>;
74
+ } & {
75
+ themeVariant: Variant;
76
+ themeFocused: boolean;
77
+ }, {}, {
78
+ ref?: import("react").Ref<View>;
79
+ }>;
73
80
  declare const StyledTextInputContainer: import("@emotion/native").StyledComponent<import("react-native").ViewProps & {
74
81
  theme?: import("@emotion/react").Theme;
75
82
  as?: import("react").ElementType<any>;
@@ -94,4 +101,4 @@ declare const StyledErrorAndMaxLengthContainer: import("@emotion/native").Styled
94
101
  }, {}, {
95
102
  ref?: import("react").Ref<View>;
96
103
  }>;
97
- export { StyledTextInputContainer, StyledLabel, StyledLabelContainer, StyledAsteriskLabel, StyledAsteriskLabelInsideTextInput, StyledTextInput, StyledError, StyledMaxLengthMessage, StyledLabelInsideTextInput, StyledContainer, StyledErrorContainer, StyledHelperText, StyledTextInputAndLabelContainer, StyledLabelContainerInsideTextInput, StyledErrorAndHelpTextContainer, StyledErrorAndMaxLengthContainer, };
104
+ export { StyledTextInputContainer, StyledLabel, StyledLabelContainer, StyledAsteriskLabel, StyledAsteriskLabelInsideTextInput, StyledTextInput, StyledError, StyledMaxLengthMessage, StyledLabelInsideTextInput, StyledContainer, StyledErrorContainer, StyledHelperText, StyledTextInputAndLabelContainer, StyledLabelContainerInsideTextInput, StyledErrorAndHelpTextContainer, StyledBorderBackDrop, StyledErrorAndMaxLengthContainer, };
@@ -53,7 +53,7 @@ export interface TextInputProps extends NativeTextInputProps {
53
53
  helpText?: string;
54
54
  renderInputValue?: (inputProps: NativeTextInputProps) => React.ReactNode;
55
55
  }
56
- export declare const getVariant: ({ disabled, error, editable, loading, isFocused, isEmptyValue, }: {
56
+ export declare const getVariant: ({ disabled, error, editable, loading, isEmptyValue, }: {
57
57
  disabled?: boolean;
58
58
  error?: string;
59
59
  editable?: boolean;
package/types/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import theme, { getTheme, ThemeProvider, useTheme, swagSystemPalette, workSystemPalette } from './theme';
1
+ import theme, { getTheme, ThemeProvider, useTheme, swagSystemPalette, workSystemPalette, jobsSystemPalette, ThemeSwitcher } from './theme';
2
2
  import { scale } from './utils/scale';
3
3
  import Accordion from './components/Accordion';
4
4
  import Alert from './components/Alert';
@@ -25,6 +25,7 @@ import PinInput from './components/PinInput';
25
25
  import Progress from './components/Progress';
26
26
  import Slider from './components/Slider';
27
27
  import Spinner from './components/Spinner';
28
+ import Swipeable from './components/Swipeable';
28
29
  import Radio from './components/Radio';
29
30
  import SectionHeading from './components/SectionHeading';
30
31
  import Select from './components/Select';
@@ -36,6 +37,7 @@ import TimePicker from './components/TimePicker';
36
37
  import Toast from './components/Toast';
37
38
  import Toolbar from './components/Toolbar';
38
39
  import Typography from './components/Typography';
40
+ import RefreshControl from './components/RefreshControl';
39
41
  import RichTextEditor from './components/RichTextEditor';
40
- export { theme, getTheme, useTheme, scale, ThemeProvider, swagSystemPalette, workSystemPalette, Accordion, Alert, Avatar, Badge, BottomNavigation, BottomSheet, Box, Button, Calendar, Card, Collapse, Checkbox, ContentNavigator, DatePicker, Divider, Drawer, Empty, FAB, Icon, Image, List, PinInput, Progress, Slider, Spinner, Radio, SectionHeading, Select, Switch, Tabs, Tag, TextInput, TimePicker, Toast, Toolbar, Typography, RichTextEditor, };
42
+ export { theme, getTheme, useTheme, scale, ThemeProvider, ThemeSwitcher, swagSystemPalette, workSystemPalette, jobsSystemPalette, Accordion, Alert, Avatar, Badge, BottomNavigation, BottomSheet, Box, Button, Calendar, Card, Collapse, Checkbox, ContentNavigator, DatePicker, Divider, Drawer, Empty, FAB, Icon, Image, List, PinInput, Progress, Slider, Spinner, Swipeable, Radio, SectionHeading, Select, Switch, Tabs, Tag, TextInput, TimePicker, Toast, Toolbar, Typography, RefreshControl, RichTextEditor, };
41
43
  export * from './types';
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- declare type ThemeName = 'swag' | 'work';
2
+ declare type ThemeName = 'swag' | 'work' | 'jobs';
3
3
  declare const ThemeSwitcher: ({ name, children, }: {
4
4
  name?: ThemeName;
5
5
  children: React.ReactNode;
@@ -0,0 +1,7 @@
1
+ import type { GlobalTheme } from '../global';
2
+ declare const getRefreshControlTheme: (theme: GlobalTheme) => {
3
+ colors: {
4
+ indicator: string;
5
+ };
6
+ };
7
+ export default getRefreshControlTheme;
@@ -9,9 +9,7 @@ declare const getRichTextEditorTheme: (theme: GlobalTheme) => {
9
9
  wrapperMarginBottom: number;
10
10
  toolbarHorizontalPadding: number;
11
11
  editorPadding: number;
12
- };
13
- borderWidths: {
14
- webViewBorderBottomWidth: number;
12
+ mention: number;
15
13
  };
16
14
  fontSizes: {
17
15
  editor: number;
@@ -22,5 +20,8 @@ declare const getRichTextEditorTheme: (theme: GlobalTheme) => {
22
20
  toolbarSeparatorWidth: number;
23
21
  toolbarSeparatorHeight: number;
24
22
  };
23
+ radii: {
24
+ mention: number;
25
+ };
25
26
  };
26
27
  export default getRichTextEditorTheme;
@@ -1,7 +1,10 @@
1
1
  import type { GlobalTheme } from '../global';
2
2
  declare const getSpinnerTheme: (theme: GlobalTheme) => {
3
3
  colors: {
4
- dot: string;
4
+ dot: {
5
+ primary: string;
6
+ inverted: string;
7
+ };
5
8
  };
6
9
  space: {
7
10
  spinnerDot: {
@@ -0,0 +1,9 @@
1
+ import type { GlobalTheme } from '../global';
2
+ declare const getSwipeableTheme: (theme: GlobalTheme) => {
3
+ colors: {
4
+ success: string;
5
+ danger: string;
6
+ primary: string;
7
+ };
8
+ };
9
+ export default getSwipeableTheme;
@@ -8,7 +8,6 @@ declare const getTextInputTheme: (theme: GlobalTheme) => {
8
8
  disabled: string;
9
9
  readonly: string;
10
10
  filled: string;
11
- focused: string;
12
11
  };
13
12
  error: string;
14
13
  placeholderIfNotFocused: string;
@@ -23,7 +22,6 @@ declare const getTextInputTheme: (theme: GlobalTheme) => {
23
22
  disabled: string;
24
23
  readonly: string;
25
24
  filled: string;
26
- focused: string;
27
25
  };
28
26
  labels: {
29
27
  default: string;
@@ -31,7 +29,6 @@ declare const getTextInputTheme: (theme: GlobalTheme) => {
31
29
  disabled: string;
32
30
  readonly: string;
33
31
  filled: string;
34
- focused: string;
35
32
  };
36
33
  labelsInsideTextInput: {
37
34
  default: string;
@@ -39,7 +36,6 @@ declare const getTextInputTheme: (theme: GlobalTheme) => {
39
36
  disabled: string;
40
37
  readonly: string;
41
38
  filled: string;
42
- focused: string;
43
39
  };
44
40
  maxLengthLabels: {
45
41
  default: string;
@@ -47,7 +43,6 @@ declare const getTextInputTheme: (theme: GlobalTheme) => {
47
43
  disabled: string;
48
44
  readonly: string;
49
45
  filled: string;
50
- focused: string;
51
46
  };
52
47
  };
53
48
  space: {
@@ -20,11 +20,13 @@ import getListTheme from './components/list';
20
20
  import getPinInputTheme from './components/pinInput';
21
21
  import getProgressTheme from './components/progress';
22
22
  import getRadioTheme from './components/radio';
23
+ import getRefreshControlTheme from './components/refreshControl';
23
24
  import getRichTextEditorTheme from './components/richTextEditor';
24
25
  import getSectionHeadingTheme from './components/sectionHeading';
25
26
  import getSelectTheme from './components/select';
26
27
  import getSliderTheme from './components/slider';
27
28
  import getSpinnerTheme from './components/spinner';
29
+ import getSwipeableTheme from './components/swipeable';
28
30
  import getSwitchTheme from './components/switch';
29
31
  import getTabsTheme from './components/tabs';
30
32
  import getTagTheme from './components/tag';
@@ -58,11 +60,13 @@ declare type Theme = GlobalTheme & {
58
60
  pinInput: ReturnType<typeof getPinInputTheme>;
59
61
  progress: ReturnType<typeof getProgressTheme>;
60
62
  radio: ReturnType<typeof getRadioTheme>;
63
+ refreshControl: ReturnType<typeof getRefreshControlTheme>;
61
64
  richTextEditor: ReturnType<typeof getRichTextEditorTheme>;
62
65
  sectionHeading: ReturnType<typeof getSectionHeadingTheme>;
63
66
  select: ReturnType<typeof getSelectTheme>;
64
67
  slider: ReturnType<typeof getSliderTheme>;
65
68
  spinner: ReturnType<typeof getSpinnerTheme>;
69
+ swipeable: ReturnType<typeof getSwipeableTheme>;
66
70
  switch: ReturnType<typeof getSwitchTheme>;
67
71
  tabs: ReturnType<typeof getTabsTheme>;
68
72
  tag: ReturnType<typeof getTagTheme>;
@@ -0,0 +1,3 @@
1
+ import type { SystemPalette } from './types';
2
+ declare const jobsSystemPalette: SystemPalette;
3
+ export default jobsSystemPalette;
@@ -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
  import type { Scale } from './scale';
5
6
  import type { SystemPalette } from './colors/types';
6
7
  declare const getGlobalTheme: (scale: Scale, systemPalette: SystemPalette) => {
@@ -87,4 +88,4 @@ declare const getGlobalTheme: (scale: Scale, systemPalette: SystemPalette) => {
87
88
  };
88
89
  declare type GlobalTheme = ReturnType<typeof getGlobalTheme>;
89
90
  export type { GlobalTheme, Scale, SystemPalette };
90
- export { getGlobalTheme, defaultScale, swagSystemPalette, workSystemPalette };
91
+ export { getGlobalTheme, defaultScale, swagSystemPalette, workSystemPalette, jobsSystemPalette, };
@@ -1,9 +1,9 @@
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 { swagSystemPalette, workSystemPalette, jobsSystemPalette } from './global';
5
5
  import type { Theme } from './getTheme';
6
6
  declare const defaultTheme: Theme;
7
7
  export type { Theme };
8
- export { getTheme, ThemeProvider, ThemeSwitcher, useTheme, swagSystemPalette, workSystemPalette, };
8
+ export { getTheme, ThemeProvider, ThemeSwitcher, useTheme, swagSystemPalette, workSystemPalette, jobsSystemPalette, };
9
9
  export default defaultTheme;
package/types/types.d.ts CHANGED
@@ -6,4 +6,5 @@ import type { TextInputProps } from './components/TextInput';
6
6
  import type { RichTextEditorRef, RichTextEditorProps } from './components/RichTextEditor';
7
7
  import type { Theme } from './theme';
8
8
  import type { ListRenderOptionInfo, SectionListRenderOptionInfo } from './components/Select/types';
9
- export type { BottomNavigationTabType, IconName, SingleSelectProps, MultiSelectProps, ListRenderOptionInfo, SectionListRenderOptionInfo, RichTextEditorProps, RichTextEditorRef, TabType, TextInputProps, Theme, };
9
+ import { SwipeableProps } from './components/Swipeable';
10
+ export type { BottomNavigationTabType, IconName, SingleSelectProps, MultiSelectProps, ListRenderOptionInfo, SectionListRenderOptionInfo, SwipeableProps, RichTextEditorProps, RichTextEditorRef, TabType, TextInputProps, Theme, };
@@ -1,2 +1,4 @@
1
1
  export declare const isIOS: boolean;
2
2
  export declare const isAndroid: boolean;
3
+ export declare const pick: (keys: Array<string>, props: Record<string, any>) => {};
4
+ export declare const omit: (keys: Array<string>, props: Record<string, any>) => Record<string, any>;
@@ -1,14 +0,0 @@
1
- import { 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
- });
@@ -1,10 +0,0 @@
1
- export const pick = (keys: Array<string>, props: Record<string, any>) =>
2
- keys
3
- .filter((key) => key in props)
4
- .reduce(
5
- (result, cur) => ({
6
- ...result,
7
- [cur]: props[cur],
8
- }),
9
- {}
10
- );