@hero-design/rn 7.8.0 → 7.10.1
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.
- package/.turbo/turbo-build.log +8 -8
- package/assets/fonts/hero-icons.ttf +0 -0
- package/es/index.js +741 -258
- package/lib/assets/fonts/hero-icons.ttf +0 -0
- package/lib/index.js +740 -257
- package/package.json +2 -2
- package/src/components/Button/Button.tsx +10 -2
- package/src/components/Button/LoadingIndicator/StyledLoadingIndicator.tsx +7 -1
- package/src/components/Button/LoadingIndicator/__tests__/StyledLoadingIndicator.spec.tsx +3 -0
- package/src/components/Button/LoadingIndicator/__tests__/__snapshots__/StyledLoadingIndicator.spec.tsx.snap +60 -0
- package/src/components/Button/LoadingIndicator/__tests__/__snapshots__/index.spec.tsx.snap +363 -0
- package/src/components/Button/LoadingIndicator/__tests__/index.spec.tsx +3 -0
- package/src/components/Button/LoadingIndicator/index.tsx +4 -1
- package/src/components/Button/StyledButton.tsx +57 -1
- package/src/components/Button/UtilityButton/__tests__/__snapshots__/index.spec.tsx.snap +167 -0
- package/src/components/Button/UtilityButton/__tests__/index.spec.tsx +55 -0
- package/src/components/Button/UtilityButton/index.tsx +53 -0
- package/src/components/Button/UtilityButton/styled.tsx +25 -0
- package/src/components/Button/__tests__/Button.spec.tsx +3 -0
- package/src/components/Button/__tests__/StyledButton.spec.tsx +18 -0
- package/src/components/Button/__tests__/__snapshots__/StyledButton.spec.tsx.snap +468 -0
- package/src/components/Button/index.tsx +3 -0
- package/src/components/Card/DataCard/StyledDataCard.tsx +1 -3
- package/src/components/Card/DataCard/__tests__/__snapshots__/StyledDataCard.spec.tsx.snap +0 -1
- package/src/components/Card/DataCard/__tests__/__snapshots__/index.spec.tsx.snap +0 -5
- package/src/components/Card/StyledCard.tsx +1 -3
- package/src/components/Card/__tests__/__snapshots__/StyledCard.spec.tsx.snap +0 -1
- package/src/components/Icon/HeroIcon/index.tsx +3 -1
- package/src/components/Icon/HeroIcon/selection.json +1 -1
- package/src/components/Icon/IconList.ts +2 -0
- package/src/components/Icon/index.tsx +2 -1
- package/src/components/Select/MultiSelect/__tests__/__snapshots__/index.spec.tsx.snap +248 -94
- package/src/components/Select/SingleSelect/__tests__/__snapshots__/index.spec.tsx.snap +248 -94
- package/src/components/TextInput/StyledTextInput.tsx +133 -11
- package/src/components/TextInput/__tests__/StyledTextInput.spec.tsx +143 -7
- package/src/components/TextInput/__tests__/__snapshots__/StyledTextInput.spec.tsx.snap +922 -15
- package/src/components/TextInput/__tests__/__snapshots__/index.spec.tsx.snap +2078 -0
- package/src/components/TextInput/__tests__/index.spec.tsx +302 -11
- package/src/components/TextInput/index.tsx +232 -28
- package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +73 -3
- package/src/theme/components/button.ts +6 -0
- package/src/theme/components/card.ts +5 -1
- package/src/theme/components/icon.ts +1 -0
- package/src/theme/components/textInput.ts +62 -3
- package/src/theme/global/colors.ts +1 -0
- package/src/types.ts +8 -1
- package/types/components/Button/Button.d.ts +2 -2
- package/types/components/Button/LoadingIndicator/StyledLoadingIndicator.d.ts +1 -1
- package/types/components/Button/LoadingIndicator/index.d.ts +1 -1
- package/types/components/Button/StyledButton.d.ts +1 -1
- package/types/components/{Select/MultiSelect/__tests__/StyledMultiSelect.spec.d.ts → Button/UtilityButton/__tests__/index.spec.d.ts} +0 -0
- package/types/components/Button/UtilityButton/index.d.ts +23 -0
- package/types/components/Button/UtilityButton/styled.d.ts +17 -0
- package/types/components/Button/index.d.ts +2 -0
- package/types/components/Icon/HeroIcon/index.d.ts +1 -1
- package/types/components/Icon/IconList.d.ts +1 -1
- package/types/components/Icon/index.d.ts +1 -1
- package/types/components/Icon/utils.d.ts +1 -1
- package/types/components/TextInput/StyledTextInput.d.ts +82 -3
- package/types/components/TextInput/index.d.ts +33 -5
- package/types/theme/components/button.d.ts +6 -0
- package/types/theme/components/card.d.ts +3 -0
- package/types/theme/components/icon.d.ts +1 -0
- package/types/theme/components/textInput.d.ts +61 -2
- package/types/theme/global/colors.d.ts +1 -0
- package/types/theme/global/index.d.ts +1 -0
- package/types/types.d.ts +2 -1
- package/.expo/README.md +0 -15
- package/.expo/packager-info.json +0 -10
- package/.expo/prebuild/cached-packages.json +0 -4
- package/.expo/settings.json +0 -10
- package/.expo/xcodebuild-error.log +0 -2
- package/.expo/xcodebuild.log +0 -11199
- package/types/components/Select/MultiSelect/Footer.d.ts +0 -5
- package/types/components/Select/MultiSelect/StyledMultiSelect.d.ts +0 -26
- package/types/components/Select/MultiSelect/types.d.ts +0 -5
|
@@ -1,23 +1,159 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import renderWithTheme from '../../../testHelpers/renderWithTheme';
|
|
3
|
-
import {
|
|
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('
|
|
6
|
-
it
|
|
7
|
-
|
|
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
|
-
|
|
14
|
-
|
|
15
|
-
|
|
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 />);
|