@hero-design/rn 7.22.3 → 7.23.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 (148) hide show
  1. package/.turbo/turbo-build.log +3 -3
  2. package/es/index.js +2124 -1638
  3. package/lib/index.js +2124 -1636
  4. package/package.json +6 -6
  5. package/src/components/Box/StyledBox.tsx +1 -2
  6. package/src/components/DatePicker/__tests__/__snapshots__/DatePickerAndroid.spec.tsx.snap +18 -4
  7. package/src/components/DatePicker/__tests__/__snapshots__/DatePickerIOS.spec.tsx.snap +18 -4
  8. package/src/components/RefreshControl/__tests__/__snapshots__/index.spec.tsx.snap +69 -0
  9. package/src/components/RefreshControl/__tests__/index.spec.tsx +55 -0
  10. package/src/components/RefreshControl/index.tsx +23 -0
  11. package/src/components/RichTextEditor/MentionList.tsx +25 -4
  12. package/src/components/RichTextEditor/RichTextEditor.tsx +3 -1
  13. package/src/components/RichTextEditor/__tests__/MentionList.spec.tsx +6 -6
  14. package/src/components/RichTextEditor/__tests__/__snapshots__/RichTextEditor.spec.tsx.snap +36 -8
  15. package/src/components/Select/MultiSelect/__tests__/__snapshots__/index.spec.tsx.snap +90 -20
  16. package/src/components/Select/MultiSelect/index.tsx +1 -1
  17. package/src/components/Select/SingleSelect/__tests__/__snapshots__/index.spec.tsx.snap +90 -20
  18. package/src/components/Select/SingleSelect/index.tsx +1 -1
  19. package/src/components/Select/types.ts +1 -3
  20. package/src/components/TextInput/StyledTextInput.tsx +16 -11
  21. package/src/components/TextInput/__tests__/StyledTextInput.spec.tsx +3 -3
  22. package/src/components/TextInput/__tests__/__snapshots__/StyledTextInput.spec.tsx.snap +36 -18
  23. package/src/components/TextInput/__tests__/__snapshots__/index.spec.tsx.snap +234 -52
  24. package/src/components/TextInput/index.tsx +21 -4
  25. package/src/components/TimePicker/__tests__/__snapshots__/TimePickerAndroid.spec.tsx.snap +18 -4
  26. package/src/components/TimePicker/__tests__/__snapshots__/TimePickerIOS.spec.tsx.snap +18 -4
  27. package/src/index.ts +4 -0
  28. package/src/theme/ThemeSwitcher.tsx +9 -2
  29. package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +9 -3
  30. package/src/theme/components/refreshControl.ts +11 -0
  31. package/src/theme/components/richTextEditor.ts +6 -5
  32. package/src/theme/getTheme.ts +3 -0
  33. package/src/theme/global/colors/jobs.ts +18 -0
  34. package/src/theme/global/index.ts +8 -1
  35. package/src/theme/index.ts +6 -1
  36. package/src/utils/__tests__/helpers.spec.ts +27 -0
  37. package/src/utils/helpers.ts +21 -0
  38. package/tsconfig.prod.json +4 -0
  39. package/types/components/RefreshControl/index.d.ts +5 -0
  40. package/types/components/RichTextEditor/MentionList.d.ts +7 -3
  41. package/types/components/RichTextEditor/index.d.ts +1 -1
  42. package/types/components/Select/types.d.ts +1 -3
  43. package/types/components/TextInput/StyledTextInput.d.ts +9 -3
  44. package/types/index.d.ts +3 -2
  45. package/types/theme/ThemeSwitcher.d.ts +1 -1
  46. package/types/theme/components/refreshControl.d.ts +7 -0
  47. package/types/theme/components/richTextEditor.d.ts +4 -3
  48. package/types/theme/getTheme.d.ts +2 -0
  49. package/types/theme/global/colors/jobs.d.ts +3 -0
  50. package/types/theme/global/index.d.ts +2 -1
  51. package/types/theme/index.d.ts +2 -2
  52. package/types/utils/helpers.d.ts +2 -0
  53. package/src/components/Box/__tests__/helpers.spec.ts +0 -14
  54. package/src/components/Box/helpers.ts +0 -10
  55. package/types/components/Accordion/__tests__/AccordionItem.spec.d.ts +0 -1
  56. package/types/components/Accordion/__tests__/StyledAccordion.spec.d.ts +0 -1
  57. package/types/components/Accordion/__tests__/index.spec.d.ts +0 -1
  58. package/types/components/Alert/__tests__/index.spec.d.ts +0 -1
  59. package/types/components/Avatar/__tests__/StyledAvatar.spec.d.ts +0 -1
  60. package/types/components/Avatar/__tests__/index.spec.d.ts +0 -1
  61. package/types/components/Badge/__tests__/Badge.spec.d.ts +0 -1
  62. package/types/components/Badge/__tests__/Status.spec.d.ts +0 -1
  63. package/types/components/BottomNavigation/__tests__/index.spec.d.ts +0 -1
  64. package/types/components/BottomSheet/__tests__/index.spec.d.ts +0 -1
  65. package/types/components/Box/__tests__/helpers.spec.d.ts +0 -1
  66. package/types/components/Box/__tests__/index.spec.d.ts +0 -1
  67. package/types/components/Box/helpers.d.ts +0 -1
  68. package/types/components/Button/LoadingIndicator/__tests__/StyledLoadingIndicator.spec.d.ts +0 -1
  69. package/types/components/Button/LoadingIndicator/__tests__/index.spec.d.ts +0 -1
  70. package/types/components/Button/UtilityButton/__tests__/index.spec.d.ts +0 -1
  71. package/types/components/Button/__tests__/Button.spec.d.ts +0 -1
  72. package/types/components/Button/__tests__/IconButton.spec.d.ts +0 -1
  73. package/types/components/Button/__tests__/StyledButton.spec.d.ts +0 -1
  74. package/types/components/Calendar/__tests__/CalendarRowItem.spec.d.ts +0 -1
  75. package/types/components/Calendar/__tests__/helper.spec.d.ts +0 -1
  76. package/types/components/Calendar/__tests__/index.spec.d.ts +0 -1
  77. package/types/components/Card/DataCard/__tests__/StyledDataCard.spec.d.ts +0 -1
  78. package/types/components/Card/DataCard/__tests__/index.spec.d.ts +0 -1
  79. package/types/components/Card/__tests__/StyledCard.spec.d.ts +0 -1
  80. package/types/components/Card/__tests__/index.spec.d.ts +0 -1
  81. package/types/components/Checkbox/__tests__/StyledCheckbox.spec.d.ts +0 -1
  82. package/types/components/Checkbox/__tests__/index.spec.d.ts +0 -1
  83. package/types/components/Collapse/__tests__/StyledCollapse.spec.d.ts +0 -1
  84. package/types/components/Collapse/__tests__/index.spec.d.ts +0 -1
  85. package/types/components/ContentNavigator/__tests__/StyledContentNavigator.spec.d.ts +0 -1
  86. package/types/components/ContentNavigator/__tests__/index.spec.d.ts +0 -1
  87. package/types/components/DatePicker/__tests__/DatePicker.spec.d.ts +0 -1
  88. package/types/components/DatePicker/__tests__/DatePickerAndroid.spec.d.ts +0 -1
  89. package/types/components/DatePicker/__tests__/DatePickerIOS.spec.d.ts +0 -1
  90. package/types/components/Divider/__tests__/StyledDivider.spec.d.ts +0 -1
  91. package/types/components/Drawer/DragableDrawer/__tests__/helpers.spec.d.ts +0 -1
  92. package/types/components/Drawer/DragableDrawer/__tests__/index.spec.d.ts +0 -1
  93. package/types/components/Drawer/__tests__/index.spec.d.ts +0 -1
  94. package/types/components/Empty/__tests__/index.spec.d.ts +0 -1
  95. package/types/components/FAB/ActionGroup/__tests__/index.spec.d.ts +0 -1
  96. package/types/components/FAB/__tests__/AnimatedFABIcon.spec.d.ts +0 -1
  97. package/types/components/FAB/__tests__/StyledFAB.spec.d.ts +0 -1
  98. package/types/components/FAB/__tests__/index.spec.d.ts +0 -1
  99. package/types/components/Icon/__tests__/index.spec.d.ts +0 -1
  100. package/types/components/Image/__tests__/index.spec.d.ts +0 -1
  101. package/types/components/List/__tests__/BasicListItem.spec.d.ts +0 -1
  102. package/types/components/List/__tests__/ListItem.spec.d.ts +0 -1
  103. package/types/components/List/__tests__/StyledBasicListItem.spec.d.ts +0 -1
  104. package/types/components/List/__tests__/StyledListItem.spec.d.ts +0 -1
  105. package/types/components/PinInput/__tests__/PinCell.spec.d.ts +0 -1
  106. package/types/components/PinInput/__tests__/StyledPinInput.spec.d.ts +0 -1
  107. package/types/components/PinInput/__tests__/index.spec.d.ts +0 -1
  108. package/types/components/Radio/__tests__/Radio.spec.d.ts +0 -1
  109. package/types/components/Radio/__tests__/RadioGroup.spec.d.ts +0 -1
  110. package/types/components/RichTextEditor/__tests__/EditorToolbar.spec.d.ts +0 -1
  111. package/types/components/RichTextEditor/__tests__/MentionList.spec.d.ts +0 -1
  112. package/types/components/RichTextEditor/__tests__/RichTextEditor.spec.d.ts +0 -1
  113. package/types/components/SectionHeading/__tests__/StyledHeading.spec.d.ts +0 -1
  114. package/types/components/SectionHeading/__tests__/index.spec.d.ts +0 -1
  115. package/types/components/Select/MultiSelect/__tests__/Option.spec.d.ts +0 -1
  116. package/types/components/Select/MultiSelect/__tests__/OptionList.spec.d.ts +0 -1
  117. package/types/components/Select/MultiSelect/__tests__/index.spec.d.ts +0 -1
  118. package/types/components/Select/SingleSelect/__tests__/Option.spec.d.ts +0 -1
  119. package/types/components/Select/SingleSelect/__tests__/OptionList.spec.d.ts +0 -1
  120. package/types/components/Select/SingleSelect/__tests__/index.spec.d.ts +0 -1
  121. package/types/components/Select/__tests__/StyledSelect.spec.d.ts +0 -1
  122. package/types/components/Select/__tests__/helpers.spec.d.ts +0 -1
  123. package/types/components/Slider/__tests__/index.spec.d.ts +0 -1
  124. package/types/components/Spinner/__tests__/AnimatedSpinner.spec.d.ts +0 -1
  125. package/types/components/Spinner/__tests__/StyledSpinner.spec.d.ts +0 -1
  126. package/types/components/Spinner/__tests__/index.spec.d.ts +0 -1
  127. package/types/components/Switch/SelectorSwitch/__tests__/Option.spec.d.ts +0 -1
  128. package/types/components/Switch/SelectorSwitch/__tests__/index.spec.d.ts +0 -1
  129. package/types/components/Switch/__tests__/StyledSwitch.spec.d.ts +0 -1
  130. package/types/components/Switch/__tests__/index.spec.d.ts +0 -1
  131. package/types/components/Tabs/__tests__/ScrollableTabs.spec.d.ts +0 -1
  132. package/types/components/Tabs/__tests__/TabWithBadge.spec.d.ts +0 -1
  133. package/types/components/Tabs/__tests__/index.spec.d.ts +0 -1
  134. package/types/components/Tag/__tests__/Tag.spec.d.ts +0 -1
  135. package/types/components/TextInput/__tests__/StyledTextInput.spec.d.ts +0 -1
  136. package/types/components/TextInput/__tests__/index.spec.d.ts +0 -1
  137. package/types/components/TimePicker/__tests__/TimePicker.spec.d.ts +0 -1
  138. package/types/components/TimePicker/__tests__/TimePickerAndroid.spec.d.ts +0 -1
  139. package/types/components/TimePicker/__tests__/TimePickerIOS.spec.d.ts +0 -1
  140. package/types/components/Toast/__tests__/Toast.spec.d.ts +0 -1
  141. package/types/components/Toast/__tests__/ToastContainer.spec.d.ts +0 -1
  142. package/types/components/Toast/__tests__/index.spec.d.ts +0 -1
  143. package/types/components/Toolbar/__tests__/ToolbarGroup.spec.d.ts +0 -1
  144. package/types/components/Toolbar/__tests__/ToolbarItem.spec.d.ts +0 -1
  145. package/types/components/Typography/Text/__tests__/StyledText.spec.d.ts +0 -1
  146. package/types/components/Typography/Text/__tests__/index.spec.d.ts +0 -1
  147. package/types/theme/__tests__/index.spec.d.ts +0 -1
  148. 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
  },
@@ -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;
@@ -22,6 +22,7 @@ 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';
@@ -62,6 +63,7 @@ type Theme = GlobalTheme & {
62
63
  pinInput: ReturnType<typeof getPinInputTheme>;
63
64
  progress: ReturnType<typeof getProgressTheme>;
64
65
  radio: ReturnType<typeof getRadioTheme>;
66
+ refreshControl: ReturnType<typeof getRefreshControlTheme>;
65
67
  richTextEditor: ReturnType<typeof getRichTextEditorTheme>;
66
68
  sectionHeading: ReturnType<typeof getSectionHeadingTheme>;
67
69
  select: ReturnType<typeof getSelectTheme>;
@@ -108,6 +110,7 @@ const getTheme = (
108
110
  pinInput: getPinInputTheme(globalTheme),
109
111
  progress: getProgressTheme(globalTheme),
110
112
  radio: getRadioTheme(globalTheme),
113
+ refreshControl: getRefreshControlTheme(globalTheme),
111
114
  richTextEditor: getRichTextEditorTheme(globalTheme),
112
115
  sectionHeading: getSectionHeadingTheme(globalTheme),
113
116
  select: getSelectTheme(globalTheme),
@@ -0,0 +1,18 @@
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
+ onPrimary: palette.maasstrichtBlue,
11
+ secondary: palette.apple,
12
+ mutedSecondary: palette.maasstrichtBlueLight50,
13
+ disabledSecondary: palette.hitPinkLight50,
14
+ highlightedSurface: palette.hitPinkLight80,
15
+ lightHighlightedSurface: palette.hitPinkLight90,
16
+ };
17
+
18
+ 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
 
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;
@@ -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
+ };
@@ -0,0 +1,4 @@
1
+ {
2
+ "extends": "./tsconfig.json",
3
+ "exclude": ["src/**/*.spec.ts", "src/**/*.spec.tsx"]
4
+ }
@@ -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
  */
@@ -3,8 +3,6 @@ export declare type Variant = 'default' | 'filled' | 'focused' | 'disabled' | 'r
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,14 @@ 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
+ }, {}, {
77
+ ref?: import("react").Ref<View>;
78
+ }>;
73
79
  declare const StyledTextInputContainer: import("@emotion/native").StyledComponent<import("react-native").ViewProps & {
74
80
  theme?: import("@emotion/react").Theme;
75
81
  as?: import("react").ElementType<any>;
@@ -94,4 +100,4 @@ declare const StyledErrorAndMaxLengthContainer: import("@emotion/native").Styled
94
100
  }, {}, {
95
101
  ref?: import("react").Ref<View>;
96
102
  }>;
97
- export { StyledTextInputContainer, StyledLabel, StyledLabelContainer, StyledAsteriskLabel, StyledAsteriskLabelInsideTextInput, StyledTextInput, StyledError, StyledMaxLengthMessage, StyledLabelInsideTextInput, StyledContainer, StyledErrorContainer, StyledHelperText, StyledTextInputAndLabelContainer, StyledLabelContainerInsideTextInput, StyledErrorAndHelpTextContainer, StyledErrorAndMaxLengthContainer, };
103
+ export { StyledTextInputContainer, StyledLabel, StyledLabelContainer, StyledAsteriskLabel, StyledAsteriskLabelInsideTextInput, StyledTextInput, StyledError, StyledMaxLengthMessage, StyledLabelInsideTextInput, StyledContainer, StyledErrorContainer, StyledHelperText, StyledTextInputAndLabelContainer, StyledLabelContainerInsideTextInput, StyledErrorAndHelpTextContainer, StyledBorderBackDrop, StyledErrorAndMaxLengthContainer, };
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 } from './theme';
2
2
  import { scale } from './utils/scale';
3
3
  import Accordion from './components/Accordion';
4
4
  import Alert from './components/Alert';
@@ -36,6 +36,7 @@ import TimePicker from './components/TimePicker';
36
36
  import Toast from './components/Toast';
37
37
  import Toolbar from './components/Toolbar';
38
38
  import Typography from './components/Typography';
39
+ import RefreshControl from './components/RefreshControl';
39
40
  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, };
41
+ export { theme, getTheme, useTheme, scale, ThemeProvider, 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, Radio, SectionHeading, Select, Switch, Tabs, Tag, TextInput, TimePicker, Toast, Toolbar, Typography, RefreshControl, RichTextEditor, };
41
42
  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;
@@ -20,6 +20,7 @@ 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';
@@ -58,6 +59,7 @@ declare type Theme = GlobalTheme & {
58
59
  pinInput: ReturnType<typeof getPinInputTheme>;
59
60
  progress: ReturnType<typeof getProgressTheme>;
60
61
  radio: ReturnType<typeof getRadioTheme>;
62
+ refreshControl: ReturnType<typeof getRefreshControlTheme>;
61
63
  richTextEditor: ReturnType<typeof getRichTextEditorTheme>;
62
64
  sectionHeading: ReturnType<typeof getSectionHeadingTheme>;
63
65
  select: ReturnType<typeof getSelectTheme>;
@@ -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;
@@ -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
- );
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export declare const pick: (keys: Array<string>, props: Record<string, any>) => {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- import '@testing-library/jest-native/extend-expect';
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};