@hero-design/rn 7.9.0 → 7.10.2-rc.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 (62) hide show
  1. package/.turbo/turbo-build.log +2 -2
  2. package/assets/fonts/hero-icons.ttf +0 -0
  3. package/es/index.js +733 -252
  4. package/lib/assets/fonts/hero-icons.ttf +0 -0
  5. package/lib/index.js +732 -251
  6. package/package.json +2 -2
  7. package/src/components/Button/Button.tsx +10 -2
  8. package/src/components/Button/LoadingIndicator/StyledLoadingIndicator.tsx +7 -1
  9. package/src/components/Button/LoadingIndicator/__tests__/StyledLoadingIndicator.spec.tsx +3 -0
  10. package/src/components/Button/LoadingIndicator/__tests__/__snapshots__/StyledLoadingIndicator.spec.tsx.snap +60 -0
  11. package/src/components/Button/LoadingIndicator/__tests__/__snapshots__/index.spec.tsx.snap +363 -0
  12. package/src/components/Button/LoadingIndicator/__tests__/index.spec.tsx +3 -0
  13. package/src/components/Button/LoadingIndicator/index.tsx +4 -1
  14. package/src/components/Button/StyledButton.tsx +57 -1
  15. package/src/components/Button/UtilityButton/__tests__/__snapshots__/index.spec.tsx.snap +167 -0
  16. package/src/components/Button/UtilityButton/__tests__/index.spec.tsx +55 -0
  17. package/src/components/Button/UtilityButton/index.tsx +53 -0
  18. package/src/components/Button/UtilityButton/styled.tsx +25 -0
  19. package/src/components/Button/__tests__/Button.spec.tsx +3 -0
  20. package/src/components/Button/__tests__/StyledButton.spec.tsx +18 -0
  21. package/src/components/Button/__tests__/__snapshots__/StyledButton.spec.tsx.snap +468 -0
  22. package/src/components/Button/index.tsx +3 -0
  23. package/src/components/Icon/HeroIcon/selection.json +1 -1
  24. package/src/components/Icon/IconList.ts +2 -0
  25. package/src/components/Select/MultiSelect/__tests__/__snapshots__/index.spec.tsx.snap +248 -94
  26. package/src/components/Select/SingleSelect/__tests__/__snapshots__/index.spec.tsx.snap +248 -94
  27. package/src/components/TextInput/StyledTextInput.tsx +133 -11
  28. package/src/components/TextInput/__tests__/.log/ti-10343.log +62 -0
  29. package/src/components/TextInput/__tests__/.log/tsserver.log +6983 -0
  30. package/src/components/TextInput/__tests__/StyledTextInput.spec.tsx +143 -7
  31. package/src/components/TextInput/__tests__/__snapshots__/StyledTextInput.spec.tsx.snap +922 -15
  32. package/src/components/TextInput/__tests__/__snapshots__/index.spec.tsx.snap +2561 -0
  33. package/src/components/TextInput/__tests__/index.spec.tsx +346 -11
  34. package/src/components/TextInput/index.tsx +235 -28
  35. package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +69 -3
  36. package/src/theme/components/button.ts +6 -0
  37. package/src/theme/components/textInput.ts +62 -3
  38. package/src/theme/global/colors.ts +1 -0
  39. package/src/types.ts +8 -1
  40. package/types/components/Button/Button.d.ts +2 -2
  41. package/types/components/Button/LoadingIndicator/StyledLoadingIndicator.d.ts +1 -1
  42. package/types/components/Button/LoadingIndicator/index.d.ts +1 -1
  43. package/types/components/Button/StyledButton.d.ts +1 -1
  44. package/types/components/Button/UtilityButton/__tests__/index.spec.d.ts +1 -0
  45. package/types/components/Button/UtilityButton/index.d.ts +23 -0
  46. package/types/components/Button/UtilityButton/styled.d.ts +17 -0
  47. package/types/components/Button/index.d.ts +2 -0
  48. package/types/components/Icon/IconList.d.ts +1 -1
  49. package/types/components/Icon/utils.d.ts +1 -1
  50. package/types/components/TextInput/StyledTextInput.d.ts +82 -3
  51. package/types/components/TextInput/index.d.ts +33 -5
  52. package/types/theme/components/button.d.ts +6 -0
  53. package/types/theme/components/textInput.d.ts +61 -2
  54. package/types/theme/global/colors.d.ts +1 -0
  55. package/types/theme/global/index.d.ts +1 -0
  56. package/types/types.d.ts +2 -1
  57. package/.expo/README.md +0 -15
  58. package/.expo/packager-info.json +0 -10
  59. package/.expo/prebuild/cached-packages.json +0 -4
  60. package/.expo/settings.json +0 -10
  61. package/.expo/xcodebuild-error.log +0 -2
  62. package/.expo/xcodebuild.log +0 -11199
@@ -1,23 +1,159 @@
1
1
  import React from 'react';
2
2
  import renderWithTheme from '../../../testHelpers/renderWithTheme';
3
- import { Container, Label, StyledTextInput } from '../StyledTextInput';
3
+ import { StyledHeaderText } from '../../FAB/ActionGroup/StyledActionGroup';
4
+ import {
5
+ StyledLabel,
6
+ StyledTextInput,
7
+ StyledMaxLengthMessage,
8
+ StyledError,
9
+ StyledErrorContainer,
10
+ StyledAsteriskLabel,
11
+ StyledLabelContainer,
12
+ StyledLabelInsideTextInput,
13
+ StyledBorderBackDrop,
14
+ } from '../StyledTextInput';
4
15
 
5
- describe('Container', () => {
6
- it('renders correctly', () => {
7
- const { toJSON } = renderWithTheme(<Container />);
16
+ describe('Label', () => {
17
+ it.each`
18
+ themeVariant
19
+ ${'default'}
20
+ ${'filled'}
21
+ ${'focused'}
22
+ ${'error'}
23
+ ${'disabled'}
24
+ ${'readonly'}
25
+ `('renders correctly with themeVariant $themeVariant', ({ themeVariant }) => {
26
+ const { toJSON } = renderWithTheme(
27
+ <StyledLabel themeVariant={themeVariant}>Label</StyledLabel>
28
+ );
8
29
 
9
30
  expect(toJSON()).toMatchSnapshot();
10
31
  });
11
32
  });
33
+ describe('LabelInsideTextInput', () => {
34
+ it.each`
35
+ themeVariant
36
+ ${'default'}
37
+ ${'filled'}
38
+ ${'focused'}
39
+ ${'error'}
40
+ ${'disabled'}
41
+ ${'readonly'}
42
+ `(
43
+ 'renders correctly with themeVariant $themeVariant',
44
+ ({ themeVariant }): void => {
45
+ const { toJSON } = renderWithTheme(
46
+ <StyledLabelInsideTextInput themeVariant={themeVariant}>
47
+ Label
48
+ </StyledLabelInsideTextInput>
49
+ );
12
50
 
13
- describe('Label', () => {
14
- it('renders correctly', () => {
15
- const { toJSON } = renderWithTheme(<Label>Label</Label>);
51
+ expect(toJSON()).toMatchSnapshot();
52
+ }
53
+ );
54
+ });
55
+
56
+ describe('LabelContainer', () => {
57
+ it('renders correctly', (): void => {
58
+ const { toJSON } = renderWithTheme(<StyledLabelContainer />);
59
+
60
+ expect(toJSON()).toMatchSnapshot();
61
+ });
62
+ });
63
+
64
+ describe('StyledAsteriskLabel', () => {
65
+ it.each`
66
+ themeVariant
67
+ ${'default'}
68
+ ${'filled'}
69
+ ${'focused'}
70
+ ${'error'}
71
+ ${'disabled'}
72
+ ${'readonly'}
73
+ `(
74
+ 'renders correctly with themeVariant $themeVariant',
75
+ ({ themeVariant }): void => {
76
+ const { toJSON } = renderWithTheme(
77
+ <StyledAsteriskLabel themeVariant={themeVariant}>*</StyledAsteriskLabel>
78
+ );
79
+
80
+ expect(toJSON()).toMatchSnapshot();
81
+ }
82
+ );
83
+ });
84
+
85
+ describe('StyledErrorMessageContainer', () => {
86
+ it('renders correctly', (): void => {
87
+ const { toJSON } = renderWithTheme(<StyledErrorContainer />);
88
+
89
+ expect(toJSON()).toMatchSnapshot();
90
+ });
91
+ });
92
+
93
+ describe('StyledErrorMessage', () => {
94
+ it('renders correctly', (): void => {
95
+ const { toJSON } = renderWithTheme(
96
+ <StyledError>must not exceed character limit</StyledError>
97
+ );
16
98
 
17
99
  expect(toJSON()).toMatchSnapshot();
18
100
  });
19
101
  });
20
102
 
103
+ describe('StyledMaxLengthMessage', () => {
104
+ it.each`
105
+ themeVariant
106
+ ${'default'}
107
+ ${'filled'}
108
+ ${'focused'}
109
+ ${'error'}
110
+ ${'disabled'}
111
+ ${'readonly'}
112
+ `(
113
+ 'renders correctly with themeVariant $themeVariant',
114
+ ({ themeVariant }): void => {
115
+ const { toJSON } = renderWithTheme(
116
+ <StyledMaxLengthMessage themeVariant={themeVariant}>
117
+ 100/255
118
+ </StyledMaxLengthMessage>
119
+ );
120
+
121
+ expect(toJSON()).toMatchSnapshot();
122
+ }
123
+ );
124
+ });
125
+
126
+ describe('StyledHelperText', () => {
127
+ it('renders correctly', (): void => {
128
+ const { toJSON } = renderWithTheme(
129
+ <StyledHeaderText>helper text</StyledHeaderText>
130
+ );
131
+
132
+ expect(toJSON()).toMatchSnapshot();
133
+ });
134
+ });
135
+
136
+ describe('StyledBorderBackDrop', () => {
137
+ it.each`
138
+ themeVariant
139
+ ${'default'}
140
+ ${'filled'}
141
+ ${'focused'}
142
+ ${'error'}
143
+ ${'disabled'}
144
+ ${'readonly'}
145
+ `(
146
+ 'renders correctly with themeVariant $themeVariant',
147
+ ({ themeVariant }): void => {
148
+ const { toJSON } = renderWithTheme(
149
+ <StyledBorderBackDrop themeVariant={themeVariant} />
150
+ );
151
+
152
+ expect(toJSON()).toMatchSnapshot();
153
+ }
154
+ );
155
+ });
156
+
21
157
  describe('StyledTextInput', () => {
22
158
  it('renders correctly', () => {
23
159
  const { toJSON } = renderWithTheme(<StyledTextInput />);