@hero-design/rn 8.91.1 → 8.91.3

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 (86) hide show
  1. package/.turbo/turbo-build.log +2 -2
  2. package/CHANGELOG.md +16 -0
  3. package/es/index.js +155 -35
  4. package/lib/index.js +155 -35
  5. package/package.json +1 -1
  6. package/src/components/AnimatedScroller/__tests__/__snapshots__/ScrollablesWithFAB.spec.tsx.snap +6 -6
  7. package/src/components/Checkbox/StyledCheckbox.tsx +3 -3
  8. package/src/components/Checkbox/__tests__/__snapshots__/StyledCheckbox.spec.tsx.snap +1 -1
  9. package/src/components/Checkbox/__tests__/__snapshots__/index.spec.tsx.snap +4 -4
  10. package/src/components/Checkbox/__tests__/index.spec.tsx +11 -7
  11. package/src/components/Checkbox/index.tsx +11 -2
  12. package/src/components/Chip/__tests__/__snapshots__/index.spec.tsx.snap +8 -8
  13. package/src/components/DatePicker/__tests__/__snapshots__/DatePicker.spec.tsx.snap +63 -3
  14. package/src/components/DatePicker/__tests__/__snapshots__/DatePickerAndroid.spec.tsx.snap +21 -1
  15. package/src/components/DatePicker/__tests__/__snapshots__/DatePickerCalendar.spec.tsx.snap +21 -1
  16. package/src/components/DatePicker/__tests__/__snapshots__/DatePickerIOS.spec.tsx.snap +42 -2
  17. package/src/components/FAB/ActionGroup/__tests__/__snapshots__/index.spec.tsx.snap +3 -3
  18. package/src/components/FAB/Pair/__tests__/__snapshots__/index.spec.tsx.snap +2 -2
  19. package/src/components/FAB/__tests__/__snapshots__/StyledFAB.spec.tsx.snap +2 -2
  20. package/src/components/FAB/__tests__/__snapshots__/index.spec.tsx.snap +3 -3
  21. package/src/components/FloatingIsland/__tests__/__snapshots__/index.spec.tsx.snap +4 -4
  22. package/src/components/List/__tests__/__snapshots__/ListItem.spec.tsx.snap +3 -2
  23. package/src/components/List/__tests__/__snapshots__/StyledListItem.spec.tsx.snap +2 -2
  24. package/src/components/MapPin/__tests__/__snapshots__/index.spec.tsx.snap +4 -4
  25. package/src/components/RichTextEditor/RichTextEditor.tsx +2 -1
  26. package/src/components/RichTextEditor/__tests__/__snapshots__/RichTextEditor.spec.tsx.snap +40 -2
  27. package/src/components/Search/SearchOneLine.tsx +3 -1
  28. package/src/components/Search/__tests__/__snapshots__/SearchOneLine.spec.tsx.snap +7 -0
  29. package/src/components/Select/MultiSelect/__tests__/__snapshots__/index.spec.tsx.snap +147 -7
  30. package/src/components/Select/SingleSelect/__tests__/__snapshots__/index.spec.tsx.snap +126 -6
  31. package/src/components/Slider/__tests__/__snapshots__/RangeSlider.spec.tsx.snap +2 -2
  32. package/src/components/Switch/SelectorSwitch/__tests__/__snapshots__/index.spec.tsx.snap +1 -1
  33. package/src/components/Switch/StyledSwitch.tsx +1 -0
  34. package/src/components/Switch/__tests__/__snapshots__/StyledSwitch.spec.tsx.snap +8 -4
  35. package/src/components/Switch/__tests__/__snapshots__/index.spec.tsx.snap +4 -2
  36. package/src/components/TextInput/__tests__/__snapshots__/index.spec.tsx.snap +337 -16
  37. package/src/components/TextInput/__tests__/index.spec.tsx +2 -0
  38. package/src/components/TextInput/index.tsx +7 -2
  39. package/src/components/TimePicker/__tests__/__snapshots__/TimePickerAndroid.spec.tsx.snap +42 -2
  40. package/src/components/TimePicker/__tests__/__snapshots__/TimePickerIOS.spec.tsx.snap +42 -2
  41. package/src/components/Toast/__tests__/__snapshots__/Toast.spec.tsx.snap +7 -7
  42. package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +42 -14
  43. package/src/theme/components/checkbox.ts +7 -0
  44. package/src/theme/components/switch.ts +5 -5
  45. package/src/theme/components/textInput.ts +1 -0
  46. package/src/theme/global/colors/__tests__/__snapshots__/swagLight.spec.ts.snap +4 -3
  47. package/src/theme/global/colors/__tests__/__snapshots__/swagLightGlobal.spec.ts.snap +3 -3
  48. package/src/theme/global/colors/__tests__/__snapshots__/swagLightJobs.spec.ts.snap +4 -3
  49. package/src/theme/global/colors/ehWorkDark.ts +1 -0
  50. package/src/theme/global/colors/swagLight.ts +1 -0
  51. package/src/theme/global/colors/swagLightGlobal.ts +3 -3
  52. package/src/theme/global/colors/swagLightJobs.ts +3 -1
  53. package/src/theme/global/colors/types.ts +2 -0
  54. package/src/theme/global/shadows/__tests__/__snapshots__/ehWorkDark.spec.ts.snap +36 -0
  55. package/src/theme/global/shadows/__tests__/__snapshots__/swagLight.spec.ts.snap +36 -0
  56. package/src/theme/global/shadows/__tests__/__snapshots__/swagLightJobs.spec.ts.snap +36 -0
  57. package/src/theme/global/shadows/__tests__/ehWorkDark.spec.ts +7 -0
  58. package/src/theme/global/shadows/__tests__/index.spec.ts +24 -0
  59. package/src/theme/global/shadows/__tests__/swagLight.spec.ts +7 -0
  60. package/src/theme/global/shadows/__tests__/swagLightJobs.spec.ts +7 -0
  61. package/src/theme/global/shadows/ehWorkDark.ts +37 -0
  62. package/src/theme/global/shadows/index.ts +23 -0
  63. package/src/theme/global/shadows/swagLight.ts +37 -0
  64. package/src/theme/global/shadows/swagLightJobs.ts +37 -0
  65. package/src/theme/global/shadows/types.ts +16 -0
  66. package/stats/8.91.2/rn-stats.html +4842 -0
  67. package/stats/8.91.3/rn-stats.html +4844 -0
  68. package/types/components/Checkbox/StyledCheckbox.d.ts +1 -1
  69. package/types/components/Checkbox/index.d.ts +2 -1
  70. package/types/components/TextInput/index.d.ts +3 -1
  71. package/types/theme/components/checkbox.d.ts +7 -0
  72. package/types/theme/components/chip.d.ts +1 -10
  73. package/types/theme/components/floatingIsland.d.ts +1 -10
  74. package/types/theme/components/slider.d.ts +1 -10
  75. package/types/theme/components/switch.d.ts +1 -1
  76. package/types/theme/components/textInput.d.ts +1 -0
  77. package/types/theme/global/colors/swagLightJobs.d.ts +2 -50
  78. package/types/theme/global/colors/types.d.ts +2 -0
  79. package/types/theme/global/index.d.ts +2 -12
  80. package/types/theme/global/shadows/ehWorkDark.d.ts +3 -0
  81. package/types/theme/global/shadows/index.d.ts +5 -0
  82. package/types/theme/global/shadows/swagLight.d.ts +3 -0
  83. package/types/theme/global/shadows/swagLightJobs.d.ts +3 -0
  84. package/types/theme/global/shadows/types.d.ts +15 -0
  85. package/src/theme/global/shadows.ts +0 -19
  86. package/types/theme/global/shadows.d.ts +0 -16
@@ -0,0 +1,36 @@
1
+ // Jest Snapshot v1, https://goo.gl/fbAQLP
2
+
3
+ exports[`swagLightJobsShadowPalette returns correct theme object 1`] = `
4
+ {
5
+ "cardDrawer": {
6
+ "elevation": 6,
7
+ "shadowColor": "#001f23",
8
+ "shadowOffset": {
9
+ "height": 2,
10
+ "width": 0,
11
+ },
12
+ "shadowOpacity": 0.12,
13
+ "shadowRadius": 2,
14
+ },
15
+ "default": {
16
+ "elevation": 3,
17
+ "shadowColor": "#121214",
18
+ "shadowOffset": {
19
+ "height": 2,
20
+ "width": 0,
21
+ },
22
+ "shadowOpacity": 0.12,
23
+ "shadowRadius": 4,
24
+ },
25
+ "tabBar": {
26
+ "elevation": 10,
27
+ "shadowColor": "#001f23",
28
+ "shadowOffset": {
29
+ "height": -4,
30
+ "width": 0,
31
+ },
32
+ "shadowOpacity": 0.04,
33
+ "shadowRadius": 6,
34
+ },
35
+ }
36
+ `;
@@ -0,0 +1,7 @@
1
+ import ehWorkDarkShadowPalette from '../ehWorkDark';
2
+
3
+ describe('ehWorkDarkShadowPalette', () => {
4
+ it('returns correct theme object', () => {
5
+ expect(ehWorkDarkShadowPalette).toMatchSnapshot();
6
+ });
7
+ });
@@ -0,0 +1,24 @@
1
+ import swagLightSystemPalette from '../../colors/swagLight';
2
+ import swagLightJobsSystemPalette from '../../colors/swagLightJobs';
3
+ import ehWorkDarkSystemPalette from '../../colors/ehWorkDark';
4
+ import swagSystemPalette from '../../colors/swag';
5
+ import { getShadows } from '../index';
6
+ import swagLightShadowPalette from '../swagLight';
7
+ import swagLightJobsShadowPalette from '../swagLightJobs';
8
+ import ehWorkDarkShadowPalette from '../ehWorkDark';
9
+
10
+ describe('getShadows', () => {
11
+ it.each`
12
+ colorPalette | shadowPalette
13
+ ${swagLightSystemPalette} | ${swagLightShadowPalette}
14
+ ${swagLightJobsSystemPalette} | ${swagLightJobsShadowPalette}
15
+ ${ehWorkDarkSystemPalette} | ${ehWorkDarkShadowPalette}
16
+ ${swagSystemPalette} | ${swagLightShadowPalette}
17
+ `(
18
+ 'should return the correct shadow palette for $colorPalette',
19
+ ({ colorPalette, shadowPalette }) => {
20
+ const actual = getShadows(colorPalette);
21
+ expect(actual).toEqual(shadowPalette);
22
+ }
23
+ );
24
+ });
@@ -0,0 +1,7 @@
1
+ import swagLightShadowPalette from '../swagLight';
2
+
3
+ describe('swagLightShadowPalette', () => {
4
+ it('returns correct theme object', () => {
5
+ expect(swagLightShadowPalette).toMatchSnapshot();
6
+ });
7
+ });
@@ -0,0 +1,7 @@
1
+ import swagLightJobsShadowPalette from '../swagLightJobs';
2
+
3
+ describe('swagLightJobsShadowPalette', () => {
4
+ it('returns correct theme object', () => {
5
+ expect(swagLightJobsShadowPalette).toMatchSnapshot();
6
+ });
7
+ });
@@ -0,0 +1,37 @@
1
+ import ehWorkDarkSystemPalette from '../colors/ehWorkDark';
2
+ import type { ShadowPalette } from './types';
3
+
4
+ const ehWorkDarkShadowPalette: ShadowPalette = {
5
+ default: {
6
+ shadowOffset: {
7
+ width: 0,
8
+ height: 2,
9
+ },
10
+ shadowColor: ehWorkDarkSystemPalette.primaryOutline,
11
+ shadowOpacity: 0.12,
12
+ shadowRadius: 4,
13
+ elevation: 3,
14
+ },
15
+ cardDrawer: {
16
+ shadowOffset: {
17
+ width: 0,
18
+ height: 2,
19
+ },
20
+ shadowColor: '#000000',
21
+ shadowOpacity: 0.56,
22
+ shadowRadius: 2,
23
+ elevation: 6,
24
+ },
25
+ tabBar: {
26
+ shadowOffset: {
27
+ width: 0,
28
+ height: -4,
29
+ },
30
+ shadowColor: '#000000',
31
+ shadowOpacity: 0.24,
32
+ shadowRadius: 6,
33
+ elevation: 10,
34
+ },
35
+ };
36
+
37
+ export default ehWorkDarkShadowPalette;
@@ -0,0 +1,23 @@
1
+ import swagLightShadowPalette from './swagLight';
2
+ import swagLightJobsShadowPalette from './swagLightJobs';
3
+ import ehWorkDarkShadowPalette from './ehWorkDark';
4
+
5
+ import { SystemPalette } from '../colors/types';
6
+
7
+ const getShadows = (palette: SystemPalette) => {
8
+ switch (palette.name) {
9
+ case 'swagLight':
10
+ return swagLightShadowPalette;
11
+ case 'swagLightJobs':
12
+ return swagLightJobsShadowPalette;
13
+ case 'ehWorkDark':
14
+ return ehWorkDarkShadowPalette;
15
+ default:
16
+ return swagLightShadowPalette;
17
+ }
18
+ };
19
+
20
+ type Shadows = ReturnType<typeof getShadows>;
21
+
22
+ export { getShadows };
23
+ export type { Shadows };
@@ -0,0 +1,37 @@
1
+ import swagLightSystemPalette from '../colors/swagLight';
2
+ import type { ShadowPalette } from './types';
3
+
4
+ const swagLightShadowPalette: ShadowPalette = {
5
+ default: {
6
+ shadowOffset: {
7
+ width: 0,
8
+ height: 2,
9
+ },
10
+ shadowColor: swagLightSystemPalette.primaryOutline,
11
+ shadowOpacity: 0.12,
12
+ shadowRadius: 4,
13
+ elevation: 3,
14
+ },
15
+ cardDrawer: {
16
+ shadowOffset: {
17
+ width: 0,
18
+ height: 2,
19
+ },
20
+ shadowColor: '#001f23',
21
+ shadowOpacity: 0.12,
22
+ shadowRadius: 2,
23
+ elevation: 6,
24
+ },
25
+ tabBar: {
26
+ shadowOffset: {
27
+ width: 0,
28
+ height: -4,
29
+ },
30
+ shadowColor: '#001f23',
31
+ shadowOpacity: 0.04,
32
+ shadowRadius: 6,
33
+ elevation: 10,
34
+ },
35
+ };
36
+
37
+ export default swagLightShadowPalette;
@@ -0,0 +1,37 @@
1
+ import type { ShadowPalette } from './types';
2
+ import swagLightJobsSystemPalette from '../colors/swagLightJobs';
3
+
4
+ const swagLightJobsShadowPalette: ShadowPalette = {
5
+ default: {
6
+ shadowOffset: {
7
+ width: 0,
8
+ height: 2,
9
+ },
10
+ shadowColor: swagLightJobsSystemPalette.primaryOutline,
11
+ shadowOpacity: 0.12,
12
+ shadowRadius: 4,
13
+ elevation: 3,
14
+ },
15
+ cardDrawer: {
16
+ shadowOffset: {
17
+ width: 0,
18
+ height: 2,
19
+ },
20
+ shadowColor: '#001f23',
21
+ shadowOpacity: 0.12,
22
+ shadowRadius: 2,
23
+ elevation: 6,
24
+ },
25
+ tabBar: {
26
+ shadowOffset: {
27
+ width: 0,
28
+ height: -4,
29
+ },
30
+ shadowColor: '#001f23',
31
+ shadowOpacity: 0.04,
32
+ shadowRadius: 6,
33
+ elevation: 10,
34
+ },
35
+ };
36
+
37
+ export default swagLightJobsShadowPalette;
@@ -0,0 +1,16 @@
1
+ export type ShadowStyles = {
2
+ shadowOffset: {
3
+ width: number;
4
+ height: number;
5
+ };
6
+ shadowColor: string;
7
+ shadowOpacity: number;
8
+ shadowRadius: number;
9
+ elevation: number;
10
+ };
11
+
12
+ export type ShadowPalette = {
13
+ default: ShadowStyles;
14
+ cardDrawer: ShadowStyles;
15
+ tabBar: ShadowStyles;
16
+ };