@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.
- package/.turbo/turbo-build.log +3 -3
- package/assets/fonts/hero-icons.ttf +0 -0
- package/es/index.js +2974 -10456
- package/lib/assets/fonts/hero-icons.ttf +0 -0
- package/lib/index.js +2977 -10455
- package/package.json +8 -6
- package/rollup.config.js +1 -0
- package/src/components/Box/StyledBox.tsx +1 -2
- package/src/components/DatePicker/__tests__/__snapshots__/DatePickerAndroid.spec.tsx.snap +19 -4
- package/src/components/DatePicker/__tests__/__snapshots__/DatePickerIOS.spec.tsx.snap +19 -4
- package/src/components/Empty/index.tsx +1 -2
- package/src/components/Icon/HeroIcon/fonts/hero-icons.ttf +0 -0
- package/src/components/Icon/HeroIcon/glyphMap.json +1 -0
- package/src/components/Icon/HeroIcon/index.tsx +3 -7
- package/src/components/Icon/IconList.ts +8 -5
- package/src/components/Icon/index.tsx +1 -0
- package/src/components/RefreshControl/__tests__/__snapshots__/index.spec.tsx.snap +69 -0
- package/src/components/RefreshControl/__tests__/index.spec.tsx +55 -0
- package/src/components/RefreshControl/index.tsx +23 -0
- package/src/components/RichTextEditor/MentionList.tsx +25 -4
- package/src/components/RichTextEditor/RichTextEditor.tsx +3 -4
- package/src/components/RichTextEditor/__tests__/MentionList.spec.tsx +6 -6
- package/src/components/RichTextEditor/__tests__/__snapshots__/RichTextEditor.spec.tsx.snap +38 -8
- package/src/components/Select/MultiSelect/__tests__/__snapshots__/OptionList.spec.tsx.snap +8 -4
- package/src/components/Select/MultiSelect/__tests__/__snapshots__/index.spec.tsx.snap +95 -20
- package/src/components/Select/MultiSelect/index.tsx +1 -1
- package/src/components/Select/SingleSelect/__tests__/__snapshots__/OptionList.spec.tsx.snap +8 -4
- package/src/components/Select/SingleSelect/__tests__/__snapshots__/index.spec.tsx.snap +95 -20
- package/src/components/Select/SingleSelect/index.tsx +1 -1
- package/src/components/Select/types.ts +1 -3
- package/src/components/Spinner/AnimatedSpinner.tsx +22 -7
- package/src/components/Spinner/StyledSpinner.tsx +16 -11
- package/src/components/Spinner/__tests__/AnimatedSpinner.spec.tsx +3 -1
- package/src/components/Spinner/__tests__/StyledSpinner.spec.tsx +42 -31
- package/src/components/Spinner/__tests__/__snapshots__/AnimatedSpinner.spec.tsx.snap +8 -4
- package/src/components/Spinner/__tests__/__snapshots__/StyledSpinner.spec.tsx.snap +532 -72
- package/src/components/Spinner/__tests__/__snapshots__/index.spec.tsx.snap +8 -4
- package/src/components/Spinner/index.tsx +6 -1
- package/src/components/Swipeable/StyledSwipeable.tsx +11 -0
- package/src/components/Swipeable/SwipeableAction.tsx +45 -0
- package/src/components/Swipeable/__tests__/SwipeableAction.spec.tsx +37 -0
- package/src/components/Swipeable/__tests__/__snapshots__/SwipeableAction.spec.tsx.snap +130 -0
- package/src/components/Swipeable/__tests__/__snapshots__/index.spec.tsx.snap +33 -0
- package/src/components/Swipeable/__tests__/index.spec.tsx +34 -0
- package/src/components/Swipeable/index.tsx +148 -0
- package/src/components/TextInput/StyledTextInput.tsx +18 -19
- package/src/components/TextInput/__tests__/StyledTextInput.spec.tsx +14 -8
- package/src/components/TextInput/__tests__/__snapshots__/StyledTextInput.spec.tsx.snap +52 -150
- package/src/components/TextInput/__tests__/__snapshots__/index.spec.tsx.snap +247 -52
- package/src/components/TextInput/__tests__/index.spec.tsx +114 -124
- package/src/components/TextInput/index.tsx +27 -9
- package/src/components/TimePicker/__tests__/__snapshots__/TimePickerAndroid.spec.tsx.snap +19 -4
- package/src/components/TimePicker/__tests__/__snapshots__/TimePickerIOS.spec.tsx.snap +19 -4
- package/src/index.ts +8 -0
- package/src/theme/ThemeSwitcher.tsx +9 -2
- package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +20 -9
- package/src/theme/components/refreshControl.ts +11 -0
- package/src/theme/components/richTextEditor.ts +6 -5
- package/src/theme/components/spinner.ts +4 -1
- package/src/theme/components/swipeable.ts +13 -0
- package/src/theme/components/textInput.ts +0 -5
- package/src/theme/getTheme.ts +6 -0
- package/src/theme/global/colors/jobs.ts +17 -0
- package/src/theme/global/colors/work.ts +0 -2
- package/src/theme/global/index.ts +8 -1
- package/src/theme/index.ts +6 -1
- package/src/types.ts +2 -0
- package/src/utils/__tests__/helpers.spec.ts +27 -0
- package/src/utils/helpers.ts +21 -0
- package/testUtils/setup.tsx +13 -0
- package/tsconfig.prod.json +4 -0
- package/types/components/Empty/index.d.ts +1 -2
- package/types/components/Icon/IconList.d.ts +1 -1
- package/types/components/Icon/index.d.ts +4 -1
- package/types/components/Icon/utils.d.ts +1 -1
- package/types/components/RefreshControl/index.d.ts +5 -0
- package/types/components/RichTextEditor/MentionList.d.ts +7 -3
- package/types/components/RichTextEditor/index.d.ts +1 -1
- package/types/components/Select/types.d.ts +1 -3
- package/types/components/Spinner/AnimatedSpinner.d.ts +2 -1
- package/types/components/Spinner/StyledSpinner.d.ts +1 -0
- package/types/components/Spinner/index.d.ts +5 -1
- package/types/components/Swipeable/StyledSwipeable.d.ts +10 -0
- package/types/components/Swipeable/SwipeableAction.d.ts +27 -0
- package/types/components/Swipeable/index.d.ts +41 -0
- package/types/components/TextInput/StyledTextInput.d.ts +11 -4
- package/types/components/TextInput/index.d.ts +1 -1
- package/types/index.d.ts +4 -2
- package/types/theme/ThemeSwitcher.d.ts +1 -1
- package/types/theme/components/refreshControl.d.ts +7 -0
- package/types/theme/components/richTextEditor.d.ts +4 -3
- package/types/theme/components/spinner.d.ts +4 -1
- package/types/theme/components/swipeable.d.ts +9 -0
- package/types/theme/components/textInput.d.ts +0 -5
- package/types/theme/getTheme.d.ts +4 -0
- package/types/theme/global/colors/jobs.d.ts +3 -0
- package/types/theme/global/index.d.ts +2 -1
- package/types/theme/index.d.ts +2 -2
- package/types/types.d.ts +2 -1
- package/types/utils/helpers.d.ts +2 -0
- package/src/components/Box/__tests__/helpers.spec.ts +0 -14
- package/src/components/Box/helpers.ts +0 -10
- package/src/components/Icon/HeroIcon/selection.json +0 -7029
- package/types/components/Accordion/__tests__/AccordionItem.spec.d.ts +0 -1
- package/types/components/Accordion/__tests__/StyledAccordion.spec.d.ts +0 -1
- package/types/components/Accordion/__tests__/index.spec.d.ts +0 -1
- package/types/components/Alert/__tests__/index.spec.d.ts +0 -1
- package/types/components/Avatar/__tests__/StyledAvatar.spec.d.ts +0 -1
- package/types/components/Avatar/__tests__/index.spec.d.ts +0 -1
- package/types/components/Badge/__tests__/Badge.spec.d.ts +0 -1
- package/types/components/Badge/__tests__/Status.spec.d.ts +0 -1
- package/types/components/BottomNavigation/__tests__/index.spec.d.ts +0 -1
- package/types/components/BottomSheet/__tests__/index.spec.d.ts +0 -1
- package/types/components/Box/__tests__/helpers.spec.d.ts +0 -1
- package/types/components/Box/__tests__/index.spec.d.ts +0 -1
- package/types/components/Box/helpers.d.ts +0 -1
- package/types/components/Button/LoadingIndicator/__tests__/StyledLoadingIndicator.spec.d.ts +0 -1
- package/types/components/Button/LoadingIndicator/__tests__/index.spec.d.ts +0 -1
- package/types/components/Button/UtilityButton/__tests__/index.spec.d.ts +0 -1
- package/types/components/Button/__tests__/Button.spec.d.ts +0 -1
- package/types/components/Button/__tests__/IconButton.spec.d.ts +0 -1
- package/types/components/Button/__tests__/StyledButton.spec.d.ts +0 -1
- package/types/components/Calendar/__tests__/CalendarRowItem.spec.d.ts +0 -1
- package/types/components/Calendar/__tests__/helper.spec.d.ts +0 -1
- package/types/components/Calendar/__tests__/index.spec.d.ts +0 -1
- package/types/components/Card/DataCard/__tests__/StyledDataCard.spec.d.ts +0 -1
- package/types/components/Card/DataCard/__tests__/index.spec.d.ts +0 -1
- package/types/components/Card/__tests__/StyledCard.spec.d.ts +0 -1
- package/types/components/Card/__tests__/index.spec.d.ts +0 -1
- package/types/components/Checkbox/__tests__/StyledCheckbox.spec.d.ts +0 -1
- package/types/components/Checkbox/__tests__/index.spec.d.ts +0 -1
- package/types/components/Collapse/__tests__/StyledCollapse.spec.d.ts +0 -1
- package/types/components/Collapse/__tests__/index.spec.d.ts +0 -1
- package/types/components/ContentNavigator/__tests__/StyledContentNavigator.spec.d.ts +0 -1
- package/types/components/ContentNavigator/__tests__/index.spec.d.ts +0 -1
- package/types/components/DatePicker/__tests__/DatePicker.spec.d.ts +0 -1
- package/types/components/DatePicker/__tests__/DatePickerAndroid.spec.d.ts +0 -1
- package/types/components/DatePicker/__tests__/DatePickerIOS.spec.d.ts +0 -1
- package/types/components/Divider/__tests__/StyledDivider.spec.d.ts +0 -1
- package/types/components/Drawer/DragableDrawer/__tests__/helpers.spec.d.ts +0 -1
- package/types/components/Drawer/DragableDrawer/__tests__/index.spec.d.ts +0 -1
- package/types/components/Drawer/__tests__/index.spec.d.ts +0 -1
- package/types/components/Empty/__tests__/index.spec.d.ts +0 -1
- package/types/components/FAB/ActionGroup/__tests__/index.spec.d.ts +0 -1
- package/types/components/FAB/__tests__/AnimatedFABIcon.spec.d.ts +0 -1
- package/types/components/FAB/__tests__/StyledFAB.spec.d.ts +0 -1
- package/types/components/FAB/__tests__/index.spec.d.ts +0 -1
- package/types/components/Icon/__tests__/index.spec.d.ts +0 -1
- package/types/components/Image/__tests__/index.spec.d.ts +0 -1
- package/types/components/List/__tests__/BasicListItem.spec.d.ts +0 -1
- package/types/components/List/__tests__/ListItem.spec.d.ts +0 -1
- package/types/components/List/__tests__/StyledBasicListItem.spec.d.ts +0 -1
- package/types/components/List/__tests__/StyledListItem.spec.d.ts +0 -1
- package/types/components/PinInput/__tests__/PinCell.spec.d.ts +0 -1
- package/types/components/PinInput/__tests__/StyledPinInput.spec.d.ts +0 -1
- package/types/components/PinInput/__tests__/index.spec.d.ts +0 -1
- package/types/components/Radio/__tests__/Radio.spec.d.ts +0 -1
- package/types/components/Radio/__tests__/RadioGroup.spec.d.ts +0 -1
- package/types/components/RichTextEditor/__tests__/EditorToolbar.spec.d.ts +0 -1
- package/types/components/RichTextEditor/__tests__/MentionList.spec.d.ts +0 -1
- package/types/components/RichTextEditor/__tests__/RichTextEditor.spec.d.ts +0 -1
- package/types/components/SectionHeading/__tests__/StyledHeading.spec.d.ts +0 -1
- package/types/components/SectionHeading/__tests__/index.spec.d.ts +0 -1
- package/types/components/Select/MultiSelect/__tests__/Option.spec.d.ts +0 -1
- package/types/components/Select/MultiSelect/__tests__/OptionList.spec.d.ts +0 -1
- package/types/components/Select/MultiSelect/__tests__/index.spec.d.ts +0 -1
- package/types/components/Select/SingleSelect/__tests__/Option.spec.d.ts +0 -1
- package/types/components/Select/SingleSelect/__tests__/OptionList.spec.d.ts +0 -1
- package/types/components/Select/SingleSelect/__tests__/index.spec.d.ts +0 -1
- package/types/components/Select/__tests__/StyledSelect.spec.d.ts +0 -1
- package/types/components/Select/__tests__/helpers.spec.d.ts +0 -1
- package/types/components/Slider/__tests__/index.spec.d.ts +0 -1
- package/types/components/Spinner/__tests__/AnimatedSpinner.spec.d.ts +0 -1
- package/types/components/Spinner/__tests__/StyledSpinner.spec.d.ts +0 -1
- package/types/components/Spinner/__tests__/index.spec.d.ts +0 -1
- package/types/components/Switch/SelectorSwitch/__tests__/Option.spec.d.ts +0 -1
- package/types/components/Switch/SelectorSwitch/__tests__/index.spec.d.ts +0 -1
- package/types/components/Switch/__tests__/StyledSwitch.spec.d.ts +0 -1
- package/types/components/Switch/__tests__/index.spec.d.ts +0 -1
- package/types/components/Tabs/__tests__/ScrollableTabs.spec.d.ts +0 -1
- package/types/components/Tabs/__tests__/TabWithBadge.spec.d.ts +0 -1
- package/types/components/Tabs/__tests__/index.spec.d.ts +0 -1
- package/types/components/Tag/__tests__/Tag.spec.d.ts +0 -1
- package/types/components/TextInput/__tests__/StyledTextInput.spec.d.ts +0 -1
- package/types/components/TextInput/__tests__/index.spec.d.ts +0 -1
- package/types/components/TimePicker/__tests__/TimePicker.spec.d.ts +0 -1
- package/types/components/TimePicker/__tests__/TimePickerAndroid.spec.d.ts +0 -1
- package/types/components/TimePicker/__tests__/TimePickerIOS.spec.d.ts +0 -1
- package/types/components/Toast/__tests__/Toast.spec.d.ts +0 -1
- package/types/components/Toast/__tests__/ToastContainer.spec.d.ts +0 -1
- package/types/components/Toast/__tests__/index.spec.d.ts +0 -1
- package/types/components/Toolbar/__tests__/ToolbarGroup.spec.d.ts +0 -1
- package/types/components/Toolbar/__tests__/ToolbarItem.spec.d.ts +0 -1
- package/types/components/Typography/Text/__tests__/StyledText.spec.d.ts +0 -1
- package/types/components/Typography/Text/__tests__/index.spec.d.ts +0 -1
- package/types/theme/__tests__/index.spec.d.ts +0 -1
- package/types/utils/__tests__/scale.spec.d.ts +0 -1
|
@@ -1,37 +1,27 @@
|
|
|
1
|
-
import { fireEvent, within } from
|
|
2
|
-
import React from
|
|
3
|
-
import { theme } from
|
|
4
|
-
import renderWithTheme from
|
|
5
|
-
import Icon from
|
|
6
|
-
import TextInput, { getVariant } from
|
|
7
|
-
|
|
8
|
-
describe(
|
|
1
|
+
import { fireEvent, within } from '@testing-library/react-native';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { theme } from '../../..';
|
|
4
|
+
import renderWithTheme from '../../../testHelpers/renderWithTheme';
|
|
5
|
+
import Icon from '../../Icon';
|
|
6
|
+
import TextInput, { getVariant } from '../index';
|
|
7
|
+
|
|
8
|
+
describe('getVariant', () => {
|
|
9
9
|
it.each`
|
|
10
|
-
disabled | error | editable | loading |
|
|
11
|
-
${false} | ${undefined} | ${true} | ${false} | ${
|
|
12
|
-
${false} | ${undefined} | ${true} | ${false} | ${false}
|
|
13
|
-
${false} | ${undefined} | ${
|
|
14
|
-
${false} | ${
|
|
15
|
-
${
|
|
16
|
-
${true} | ${"This field is required"} | ${false} | ${false} | ${true} | ${true} | ${"disabled"}
|
|
10
|
+
disabled | error | editable | loading | isEmptyValue | expected
|
|
11
|
+
${false} | ${undefined} | ${true} | ${false} | ${true} | ${'default'}
|
|
12
|
+
${false} | ${undefined} | ${true} | ${false} | ${false} | ${'filled'}
|
|
13
|
+
${false} | ${undefined} | ${false} | ${true} | ${true} | ${'readonly'}
|
|
14
|
+
${false} | ${'This field is required'} | ${false} | ${false} | ${true} | ${'error'}
|
|
15
|
+
${true} | ${'This field is required'} | ${false} | ${false} | ${true} | ${'disabled'}
|
|
17
16
|
`(
|
|
18
|
-
|
|
19
|
-
({
|
|
20
|
-
disabled,
|
|
21
|
-
error,
|
|
22
|
-
editable,
|
|
23
|
-
loading,
|
|
24
|
-
isFocused,
|
|
25
|
-
isEmptyValue,
|
|
26
|
-
expected,
|
|
27
|
-
}) => {
|
|
17
|
+
'should return the correct variant when disabled $disabled, errorMessage $errorMessage, editable $false, isEmptyValue $isEmptyValue',
|
|
18
|
+
({ disabled, error, editable, loading, isEmptyValue, expected }) => {
|
|
28
19
|
expect(
|
|
29
20
|
getVariant({
|
|
30
21
|
disabled,
|
|
31
22
|
error,
|
|
32
23
|
editable,
|
|
33
24
|
loading,
|
|
34
|
-
isFocused,
|
|
35
25
|
isEmptyValue,
|
|
36
26
|
})
|
|
37
27
|
).toBe(expected);
|
|
@@ -39,9 +29,9 @@ describe("getVariant", () => {
|
|
|
39
29
|
);
|
|
40
30
|
});
|
|
41
31
|
|
|
42
|
-
describe(
|
|
43
|
-
describe(
|
|
44
|
-
it(
|
|
32
|
+
describe('TextInput', () => {
|
|
33
|
+
describe('idle', () => {
|
|
34
|
+
it('renders correctly', () => {
|
|
45
35
|
const { getByTestId, toJSON } = renderWithTheme(
|
|
46
36
|
<TextInput
|
|
47
37
|
label="Amount (AUD)"
|
|
@@ -53,25 +43,25 @@ describe("TextInput", () => {
|
|
|
53
43
|
);
|
|
54
44
|
|
|
55
45
|
expect(toJSON()).toMatchSnapshot();
|
|
56
|
-
expect(getByTestId(
|
|
46
|
+
expect(getByTestId('idle-text-input')).toBeTruthy();
|
|
57
47
|
expect(
|
|
58
|
-
within(getByTestId(
|
|
48
|
+
within(getByTestId('idle-text-input')).queryAllByTestId('text-input')
|
|
59
49
|
).toHaveLength(1);
|
|
60
50
|
expect(
|
|
61
|
-
within(getByTestId(
|
|
51
|
+
within(getByTestId('idle-text-input')).queryAllByText('Amount (AUD)')
|
|
62
52
|
).toHaveLength(1);
|
|
63
53
|
expect(
|
|
64
|
-
within(getByTestId(
|
|
54
|
+
within(getByTestId('idle-text-input')).queryAllByTestId('input-label')
|
|
65
55
|
).toHaveLength(1);
|
|
66
56
|
expect(
|
|
67
|
-
within(getByTestId(
|
|
57
|
+
within(getByTestId('idle-text-input')).queryAllByTestId('input-prefix')
|
|
68
58
|
).toHaveLength(1);
|
|
69
59
|
expect(
|
|
70
|
-
within(getByTestId(
|
|
60
|
+
within(getByTestId('idle-text-input')).queryAllByTestId('input-suffix')
|
|
71
61
|
).toHaveLength(1);
|
|
72
62
|
});
|
|
73
63
|
|
|
74
|
-
it(
|
|
64
|
+
it('should not render input-label if label is empty', () => {
|
|
75
65
|
const { getByTestId } = renderWithTheme(
|
|
76
66
|
<TextInput
|
|
77
67
|
prefix="dollar-sign"
|
|
@@ -80,13 +70,13 @@ describe("TextInput", () => {
|
|
|
80
70
|
/>
|
|
81
71
|
);
|
|
82
72
|
|
|
83
|
-
expect(getByTestId(
|
|
73
|
+
expect(getByTestId('idle-text-input')).toBeTruthy();
|
|
84
74
|
expect(
|
|
85
|
-
within(getByTestId(
|
|
75
|
+
within(getByTestId('idle-text-input')).queryAllByTestId('input-label')
|
|
86
76
|
).toHaveLength(0);
|
|
87
77
|
});
|
|
88
78
|
|
|
89
|
-
it(
|
|
79
|
+
it('onChangeText, onBlur, onFocus', () => {
|
|
90
80
|
const onChangeText = jest.fn();
|
|
91
81
|
const onBlur = jest.fn();
|
|
92
82
|
const onFocus = jest.fn();
|
|
@@ -102,23 +92,23 @@ describe("TextInput", () => {
|
|
|
102
92
|
/>
|
|
103
93
|
);
|
|
104
94
|
|
|
105
|
-
const testInput = within(getByTestId(
|
|
106
|
-
|
|
95
|
+
const testInput = within(getByTestId('idle-text-input')).getByTestId(
|
|
96
|
+
'text-input'
|
|
107
97
|
);
|
|
108
98
|
|
|
109
|
-
fireEvent.changeText(testInput,
|
|
110
|
-
expect(onChangeText).toHaveBeenCalledWith(
|
|
99
|
+
fireEvent.changeText(testInput, 'Thong Quach');
|
|
100
|
+
expect(onChangeText).toHaveBeenCalledWith('Thong Quach');
|
|
111
101
|
|
|
112
|
-
fireEvent(testInput,
|
|
102
|
+
fireEvent(testInput, 'blur');
|
|
113
103
|
expect(onBlur).toHaveBeenCalledTimes(1);
|
|
114
104
|
|
|
115
|
-
fireEvent(testInput,
|
|
105
|
+
fireEvent(testInput, 'focus');
|
|
116
106
|
expect(onFocus).toHaveBeenCalledTimes(1);
|
|
117
107
|
});
|
|
118
108
|
});
|
|
119
109
|
|
|
120
|
-
describe(
|
|
121
|
-
it(
|
|
110
|
+
describe('idle with suffix and prefix are React Element', () => {
|
|
111
|
+
it('renders correctly', () => {
|
|
122
112
|
const { toJSON, queryAllByTestId, queryAllByText } = renderWithTheme(
|
|
123
113
|
<TextInput
|
|
124
114
|
label="Amount (AUD)"
|
|
@@ -129,16 +119,16 @@ describe("TextInput", () => {
|
|
|
129
119
|
);
|
|
130
120
|
|
|
131
121
|
expect(toJSON()).toMatchSnapshot();
|
|
132
|
-
expect(queryAllByText(
|
|
133
|
-
expect(queryAllByText(
|
|
134
|
-
expect(queryAllByTestId(
|
|
135
|
-
expect(queryAllByTestId(
|
|
136
|
-
expect(queryAllByTestId(
|
|
137
|
-
expect(queryAllByTestId(
|
|
122
|
+
expect(queryAllByText('Amount (AUD)')).toHaveLength(1);
|
|
123
|
+
expect(queryAllByText('*')).toHaveLength(1);
|
|
124
|
+
expect(queryAllByTestId('input-label')).toHaveLength(1);
|
|
125
|
+
expect(queryAllByTestId('prefix-element')).toHaveLength(1);
|
|
126
|
+
expect(queryAllByTestId('suffix-element')).toHaveLength(1);
|
|
127
|
+
expect(queryAllByTestId('text-input')).toHaveLength(1);
|
|
138
128
|
});
|
|
139
129
|
});
|
|
140
|
-
describe(
|
|
141
|
-
it(
|
|
130
|
+
describe('required', () => {
|
|
131
|
+
it('renders correctly', () => {
|
|
142
132
|
const { toJSON, queryAllByTestId, queryAllByText } = renderWithTheme(
|
|
143
133
|
<TextInput
|
|
144
134
|
label="Amount (AUD)"
|
|
@@ -149,17 +139,17 @@ describe("TextInput", () => {
|
|
|
149
139
|
);
|
|
150
140
|
|
|
151
141
|
expect(toJSON()).toMatchSnapshot();
|
|
152
|
-
expect(queryAllByText(
|
|
153
|
-
expect(queryAllByText(
|
|
154
|
-
expect(queryAllByTestId(
|
|
155
|
-
expect(queryAllByTestId(
|
|
156
|
-
expect(queryAllByTestId(
|
|
157
|
-
expect(queryAllByTestId(
|
|
142
|
+
expect(queryAllByText('Amount (AUD)')).toHaveLength(1);
|
|
143
|
+
expect(queryAllByText('*')).toHaveLength(1);
|
|
144
|
+
expect(queryAllByTestId('input-label')).toHaveLength(1);
|
|
145
|
+
expect(queryAllByTestId('input-prefix')).toHaveLength(1);
|
|
146
|
+
expect(queryAllByTestId('input-suffix')).toHaveLength(1);
|
|
147
|
+
expect(queryAllByTestId('text-input')).toHaveLength(1);
|
|
158
148
|
});
|
|
159
149
|
});
|
|
160
150
|
|
|
161
|
-
describe(
|
|
162
|
-
it(
|
|
151
|
+
describe('filled', () => {
|
|
152
|
+
it('renders correctly', () => {
|
|
163
153
|
const {
|
|
164
154
|
toJSON,
|
|
165
155
|
queryAllByTestId,
|
|
@@ -175,17 +165,17 @@ describe("TextInput", () => {
|
|
|
175
165
|
);
|
|
176
166
|
|
|
177
167
|
expect(toJSON()).toMatchSnapshot();
|
|
178
|
-
expect(queryAllByText(
|
|
179
|
-
expect(queryAllByDisplayValue(
|
|
180
|
-
expect(queryAllByTestId(
|
|
181
|
-
expect(queryAllByTestId(
|
|
182
|
-
expect(queryAllByTestId(
|
|
183
|
-
expect(queryAllByTestId(
|
|
168
|
+
expect(queryAllByText('Amount (AUD)')).toHaveLength(1);
|
|
169
|
+
expect(queryAllByDisplayValue('100')).toHaveLength(1);
|
|
170
|
+
expect(queryAllByTestId('input-label')).toHaveLength(1);
|
|
171
|
+
expect(queryAllByTestId('input-prefix')).toHaveLength(1);
|
|
172
|
+
expect(queryAllByTestId('input-suffix')).toHaveLength(1);
|
|
173
|
+
expect(queryAllByTestId('text-input')).toHaveLength(1);
|
|
184
174
|
});
|
|
185
175
|
});
|
|
186
176
|
|
|
187
|
-
describe(
|
|
188
|
-
it(
|
|
177
|
+
describe('readonly', () => {
|
|
178
|
+
it('renders correctly', () => {
|
|
189
179
|
const onChangeText = jest.fn();
|
|
190
180
|
const {
|
|
191
181
|
toJSON,
|
|
@@ -206,31 +196,31 @@ describe("TextInput", () => {
|
|
|
206
196
|
);
|
|
207
197
|
|
|
208
198
|
expect(toJSON()).toMatchSnapshot();
|
|
209
|
-
expect(queryAllByText(
|
|
210
|
-
expect(queryAllByDisplayValue(
|
|
211
|
-
expect(queryAllByTestId(
|
|
212
|
-
expect(queryAllByTestId(
|
|
213
|
-
expect(queryAllByTestId(
|
|
214
|
-
expect(queryAllByTestId(
|
|
215
|
-
|
|
216
|
-
expect(getByTestId(
|
|
199
|
+
expect(queryAllByText('Amount (AUD)')).toHaveLength(1);
|
|
200
|
+
expect(queryAllByDisplayValue('100')).toHaveLength(1);
|
|
201
|
+
expect(queryAllByTestId('input-label')).toHaveLength(1);
|
|
202
|
+
expect(queryAllByTestId('input-prefix')).toHaveLength(1);
|
|
203
|
+
expect(queryAllByTestId('input-suffix')).toHaveLength(1);
|
|
204
|
+
expect(queryAllByTestId('text-input')).toHaveLength(1);
|
|
205
|
+
|
|
206
|
+
expect(getByTestId('text-input')).not.toHaveProp('editable', 'false');
|
|
217
207
|
});
|
|
218
208
|
});
|
|
219
209
|
|
|
220
|
-
describe(
|
|
221
|
-
it(
|
|
210
|
+
describe('loading', () => {
|
|
211
|
+
it('renders correctly', () => {
|
|
222
212
|
const { toJSON, queryAllByTestId, getByTestId } = renderWithTheme(
|
|
223
213
|
<TextInput suffix="arrow-down" loading />
|
|
224
214
|
);
|
|
225
215
|
|
|
226
216
|
expect(toJSON()).toMatchSnapshot();
|
|
227
|
-
expect(queryAllByTestId(
|
|
228
|
-
expect(getByTestId(
|
|
217
|
+
expect(queryAllByTestId('text-input')).toHaveLength(1);
|
|
218
|
+
expect(getByTestId('input-suffix')).toHaveProp('name', 'loading');
|
|
229
219
|
});
|
|
230
220
|
});
|
|
231
221
|
|
|
232
|
-
describe(
|
|
233
|
-
it(
|
|
222
|
+
describe('max length', () => {
|
|
223
|
+
it('renders correctly', () => {
|
|
234
224
|
const {
|
|
235
225
|
toJSON,
|
|
236
226
|
queryAllByTestId,
|
|
@@ -249,18 +239,18 @@ describe("TextInput", () => {
|
|
|
249
239
|
);
|
|
250
240
|
|
|
251
241
|
expect(toJSON()).toMatchSnapshot();
|
|
252
|
-
expect(queryAllByText(
|
|
253
|
-
expect(queryAllByDisplayValue(
|
|
254
|
-
expect(queryAllByText(
|
|
255
|
-
expect(queryAllByTestId(
|
|
256
|
-
expect(queryAllByTestId(
|
|
242
|
+
expect(queryAllByText('Shout out')).toHaveLength(1);
|
|
243
|
+
expect(queryAllByDisplayValue('shout out Tung Van')).toHaveLength(1);
|
|
244
|
+
expect(queryAllByText('18/255')).toHaveLength(1);
|
|
245
|
+
expect(queryAllByTestId('input-label')).toHaveLength(1);
|
|
246
|
+
expect(queryAllByTestId('text-input')).toHaveLength(1);
|
|
257
247
|
|
|
258
|
-
expect(getByTestId(
|
|
248
|
+
expect(getByTestId('text-input')).not.toHaveProp('multiline', 'true');
|
|
259
249
|
});
|
|
260
250
|
});
|
|
261
251
|
|
|
262
|
-
describe(
|
|
263
|
-
it(
|
|
252
|
+
describe('disabled', () => {
|
|
253
|
+
it('renders correctly', () => {
|
|
264
254
|
const { toJSON, queryAllByTestId, queryAllByText, getByTestId } =
|
|
265
255
|
renderWithTheme(
|
|
266
256
|
<TextInput
|
|
@@ -273,17 +263,17 @@ describe("TextInput", () => {
|
|
|
273
263
|
);
|
|
274
264
|
|
|
275
265
|
expect(toJSON()).toMatchSnapshot();
|
|
276
|
-
expect(queryAllByText(
|
|
277
|
-
expect(queryAllByTestId(
|
|
278
|
-
expect(queryAllByTestId(
|
|
279
|
-
expect(getByTestId(
|
|
266
|
+
expect(queryAllByText('Amount (AUD)')).toHaveLength(1);
|
|
267
|
+
expect(queryAllByTestId('input-label')).toHaveLength(1);
|
|
268
|
+
expect(queryAllByTestId('text-input')).toHaveLength(1);
|
|
269
|
+
expect(getByTestId('disabled-text-input')).toBeDisabled();
|
|
280
270
|
|
|
281
|
-
expect(getByTestId(
|
|
271
|
+
expect(getByTestId('text-input')).not.toHaveProp('multiline', 'true');
|
|
282
272
|
});
|
|
283
273
|
});
|
|
284
274
|
|
|
285
|
-
describe(
|
|
286
|
-
it(
|
|
275
|
+
describe('error', () => {
|
|
276
|
+
it('renders correctly', () => {
|
|
287
277
|
const { toJSON, queryAllByText } = renderWithTheme(
|
|
288
278
|
<TextInput
|
|
289
279
|
label="Amount (AUD)"
|
|
@@ -294,12 +284,12 @@ describe("TextInput", () => {
|
|
|
294
284
|
);
|
|
295
285
|
|
|
296
286
|
expect(toJSON()).toMatchSnapshot();
|
|
297
|
-
expect(queryAllByText(
|
|
298
|
-
expect(queryAllByText(
|
|
287
|
+
expect(queryAllByText('Amount (AUD)')).toHaveLength(1);
|
|
288
|
+
expect(queryAllByText('This field is required')).toHaveLength(1);
|
|
299
289
|
});
|
|
300
290
|
});
|
|
301
|
-
describe(
|
|
302
|
-
it(
|
|
291
|
+
describe('helper text', () => {
|
|
292
|
+
it('renders correctly', () => {
|
|
303
293
|
const { toJSON, queryAllByText } = renderWithTheme(
|
|
304
294
|
<TextInput
|
|
305
295
|
label="Amount (AUD)"
|
|
@@ -310,14 +300,14 @@ describe("TextInput", () => {
|
|
|
310
300
|
);
|
|
311
301
|
|
|
312
302
|
expect(toJSON()).toMatchSnapshot();
|
|
313
|
-
expect(queryAllByText(
|
|
314
|
-
expect(queryAllByText(
|
|
303
|
+
expect(queryAllByText('Amount (AUD)')).toHaveLength(1);
|
|
304
|
+
expect(queryAllByText('This is helper text')).toHaveLength(1);
|
|
315
305
|
});
|
|
316
306
|
});
|
|
317
307
|
|
|
318
|
-
describe(
|
|
319
|
-
describe(
|
|
320
|
-
it(
|
|
308
|
+
describe('placeholder', () => {
|
|
309
|
+
describe('TextInput is idle', () => {
|
|
310
|
+
it('renders correctly', () => {
|
|
321
311
|
const wrapper = renderWithTheme(
|
|
322
312
|
<TextInput
|
|
323
313
|
label="Amount (AUD)"
|
|
@@ -329,20 +319,20 @@ describe("TextInput", () => {
|
|
|
329
319
|
);
|
|
330
320
|
|
|
331
321
|
expect(wrapper.toJSON()).toMatchSnapshot();
|
|
332
|
-
expect(wrapper.queryByPlaceholderText(
|
|
322
|
+
expect(wrapper.queryByPlaceholderText('Enter Amount')).toBeFalsy();
|
|
333
323
|
|
|
334
|
-
fireEvent(wrapper.getByTestId(
|
|
335
|
-
expect(wrapper.queryByPlaceholderText(
|
|
324
|
+
fireEvent(wrapper.getByTestId('text-input'), 'focus');
|
|
325
|
+
expect(wrapper.queryByPlaceholderText('Enter Amount')).toBeTruthy();
|
|
336
326
|
|
|
337
|
-
fireEvent(wrapper.getByTestId(
|
|
338
|
-
expect(wrapper.queryByPlaceholderText(
|
|
327
|
+
fireEvent(wrapper.getByTestId('text-input'), 'blur');
|
|
328
|
+
expect(wrapper.queryByPlaceholderText('Enter Amount')).toBeFalsy();
|
|
339
329
|
});
|
|
340
330
|
});
|
|
341
331
|
});
|
|
342
332
|
|
|
343
|
-
describe(
|
|
344
|
-
describe(
|
|
345
|
-
it(
|
|
333
|
+
describe('defaultValue', () => {
|
|
334
|
+
describe('TextInput is idle', () => {
|
|
335
|
+
it('renders correctly', () => {
|
|
346
336
|
const wrapper = renderWithTheme(
|
|
347
337
|
<TextInput
|
|
348
338
|
label="Amount (AUD)"
|
|
@@ -356,13 +346,13 @@ describe("TextInput", () => {
|
|
|
356
346
|
);
|
|
357
347
|
|
|
358
348
|
expect(wrapper.toJSON()).toMatchSnapshot();
|
|
359
|
-
expect(wrapper.queryByDisplayValue(
|
|
360
|
-
expect(wrapper.queryByText(
|
|
349
|
+
expect(wrapper.queryByDisplayValue('1000')).toBeTruthy();
|
|
350
|
+
expect(wrapper.queryByText('4/255')).toBeTruthy();
|
|
361
351
|
});
|
|
362
352
|
});
|
|
363
353
|
|
|
364
|
-
describe(
|
|
365
|
-
it(
|
|
354
|
+
describe('default Value and Value', () => {
|
|
355
|
+
it('renders correctly with 2000', () => {
|
|
366
356
|
const wrapper = renderWithTheme(
|
|
367
357
|
<TextInput
|
|
368
358
|
label="Amount (AUD)"
|
|
@@ -377,9 +367,9 @@ describe("TextInput", () => {
|
|
|
377
367
|
);
|
|
378
368
|
|
|
379
369
|
expect(wrapper.toJSON()).toMatchSnapshot();
|
|
380
|
-
expect(wrapper.queryByDisplayValue(
|
|
381
|
-
expect(wrapper.queryByDisplayValue(
|
|
382
|
-
expect(wrapper.queryByText(
|
|
370
|
+
expect(wrapper.queryByDisplayValue('2000')).toBeTruthy();
|
|
371
|
+
expect(wrapper.queryByDisplayValue('1000')).toBeFalsy();
|
|
372
|
+
expect(wrapper.queryByText('4/255')).toBeTruthy();
|
|
383
373
|
});
|
|
384
374
|
});
|
|
385
375
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { useMemo } from 'react';
|
|
2
2
|
import { StyleSheet } from 'react-native';
|
|
3
3
|
import type {
|
|
4
4
|
TextInputProps as NativeTextInputProps,
|
|
@@ -22,12 +22,14 @@ import {
|
|
|
22
22
|
StyledTextInputAndLabelContainer,
|
|
23
23
|
StyledLabelContainerInsideTextInput,
|
|
24
24
|
StyledErrorAndHelpTextContainer,
|
|
25
|
+
StyledBorderBackDrop,
|
|
25
26
|
StyledErrorAndMaxLengthContainer,
|
|
26
27
|
} from './StyledTextInput';
|
|
27
28
|
import Icon from '../Icon';
|
|
28
29
|
import { useTheme } from '../../theme';
|
|
29
30
|
import type { Variant } from './StyledTextInput';
|
|
30
31
|
import type { IconName } from '../Icon';
|
|
32
|
+
import { omit, pick } from '../../utils/helpers';
|
|
31
33
|
|
|
32
34
|
export interface TextInputProps extends NativeTextInputProps {
|
|
33
35
|
/**
|
|
@@ -102,7 +104,6 @@ export const getVariant = ({
|
|
|
102
104
|
error,
|
|
103
105
|
editable,
|
|
104
106
|
loading,
|
|
105
|
-
isFocused,
|
|
106
107
|
isEmptyValue,
|
|
107
108
|
}: {
|
|
108
109
|
disabled?: boolean;
|
|
@@ -121,9 +122,6 @@ export const getVariant = ({
|
|
|
121
122
|
if (!editable || loading) {
|
|
122
123
|
return 'readonly';
|
|
123
124
|
}
|
|
124
|
-
if (isFocused) {
|
|
125
|
-
return 'focused';
|
|
126
|
-
}
|
|
127
125
|
if (!isEmptyValue) {
|
|
128
126
|
return 'filled';
|
|
129
127
|
}
|
|
@@ -169,10 +167,25 @@ const TextInput = ({
|
|
|
169
167
|
|
|
170
168
|
const theme = useTheme();
|
|
171
169
|
|
|
170
|
+
const { borderStyle, textStyleWithoutBorderStyle } = useMemo(() => {
|
|
171
|
+
if (!textStyle) {
|
|
172
|
+
return {};
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
const flattenTextStyle = StyleSheet.flatten(textStyle);
|
|
176
|
+
const borderKeys = Object.keys(flattenTextStyle).filter((key) => {
|
|
177
|
+
return key.startsWith('border');
|
|
178
|
+
});
|
|
179
|
+
return {
|
|
180
|
+
borderStyle: pick(borderKeys, flattenTextStyle),
|
|
181
|
+
textStyleWithoutBorderStyle: omit(borderKeys, flattenTextStyle),
|
|
182
|
+
};
|
|
183
|
+
}, [textStyle]);
|
|
184
|
+
|
|
172
185
|
const nativeInputProps: NativeTextInputProps = {
|
|
173
186
|
style: StyleSheet.flatten([
|
|
174
187
|
{ color: theme.__hd__.textInput.colors.text },
|
|
175
|
-
|
|
188
|
+
textStyleWithoutBorderStyle,
|
|
176
189
|
]),
|
|
177
190
|
testID: 'text-input',
|
|
178
191
|
accessibilityState: {
|
|
@@ -196,19 +209,24 @@ const TextInput = ({
|
|
|
196
209
|
nativeProps.onChangeText?.(text);
|
|
197
210
|
},
|
|
198
211
|
defaultValue,
|
|
199
|
-
placeholder:
|
|
212
|
+
placeholder:
|
|
213
|
+
isFocused || label === undefined ? nativeProps.placeholder : undefined,
|
|
200
214
|
};
|
|
201
215
|
|
|
202
216
|
return (
|
|
203
217
|
<StyledContainer
|
|
218
|
+
style={style}
|
|
204
219
|
pointerEvents={
|
|
205
220
|
variant === 'disabled' || variant === 'readonly' ? 'none' : 'auto'
|
|
206
221
|
}
|
|
207
222
|
testID={testID}
|
|
208
|
-
style={style}
|
|
209
|
-
themeVariant={variant}
|
|
210
223
|
>
|
|
211
224
|
<StyledTextInputContainer>
|
|
225
|
+
<StyledBorderBackDrop
|
|
226
|
+
themeFocused={isFocused}
|
|
227
|
+
themeVariant={variant}
|
|
228
|
+
style={borderStyle}
|
|
229
|
+
/>
|
|
212
230
|
{(isFocused || (label && !isEmptyValue)) && (
|
|
213
231
|
<StyledLabelContainer pointerEvents="none">
|
|
214
232
|
{required && (
|
|
@@ -26,16 +26,12 @@ exports[`TimePickerAndroid renders correctly 1`] = `
|
|
|
26
26
|
style={
|
|
27
27
|
Array [
|
|
28
28
|
Object {
|
|
29
|
-
"borderColor": "#001f23",
|
|
30
|
-
"borderRadius": 8,
|
|
31
|
-
"borderWidth": 1,
|
|
32
29
|
"marginVertical": 8,
|
|
33
30
|
"width": "100%",
|
|
34
31
|
},
|
|
35
32
|
undefined,
|
|
36
33
|
]
|
|
37
34
|
}
|
|
38
|
-
themeVariant="filled"
|
|
39
35
|
>
|
|
40
36
|
<View
|
|
41
37
|
style={
|
|
@@ -49,6 +45,25 @@ exports[`TimePickerAndroid renders correctly 1`] = `
|
|
|
49
45
|
]
|
|
50
46
|
}
|
|
51
47
|
>
|
|
48
|
+
<View
|
|
49
|
+
style={
|
|
50
|
+
Array [
|
|
51
|
+
Object {
|
|
52
|
+
"borderColor": "#001f23",
|
|
53
|
+
"borderRadius": 8,
|
|
54
|
+
"borderWidth": 1,
|
|
55
|
+
"bottom": 0,
|
|
56
|
+
"left": 0,
|
|
57
|
+
"position": "absolute",
|
|
58
|
+
"right": 0,
|
|
59
|
+
"top": 0,
|
|
60
|
+
},
|
|
61
|
+
undefined,
|
|
62
|
+
]
|
|
63
|
+
}
|
|
64
|
+
themeFocused={false}
|
|
65
|
+
themeVariant="filled"
|
|
66
|
+
/>
|
|
52
67
|
<View
|
|
53
68
|
pointerEvents="none"
|
|
54
69
|
style={
|
|
@@ -26,16 +26,12 @@ exports[`TimePickerIOS renders correctly 1`] = `
|
|
|
26
26
|
style={
|
|
27
27
|
Array [
|
|
28
28
|
Object {
|
|
29
|
-
"borderColor": "#001f23",
|
|
30
|
-
"borderRadius": 8,
|
|
31
|
-
"borderWidth": 1,
|
|
32
29
|
"marginVertical": 8,
|
|
33
30
|
"width": "100%",
|
|
34
31
|
},
|
|
35
32
|
undefined,
|
|
36
33
|
]
|
|
37
34
|
}
|
|
38
|
-
themeVariant="filled"
|
|
39
35
|
>
|
|
40
36
|
<View
|
|
41
37
|
style={
|
|
@@ -49,6 +45,25 @@ exports[`TimePickerIOS renders correctly 1`] = `
|
|
|
49
45
|
]
|
|
50
46
|
}
|
|
51
47
|
>
|
|
48
|
+
<View
|
|
49
|
+
style={
|
|
50
|
+
Array [
|
|
51
|
+
Object {
|
|
52
|
+
"borderColor": "#001f23",
|
|
53
|
+
"borderRadius": 8,
|
|
54
|
+
"borderWidth": 1,
|
|
55
|
+
"bottom": 0,
|
|
56
|
+
"left": 0,
|
|
57
|
+
"position": "absolute",
|
|
58
|
+
"right": 0,
|
|
59
|
+
"top": 0,
|
|
60
|
+
},
|
|
61
|
+
undefined,
|
|
62
|
+
]
|
|
63
|
+
}
|
|
64
|
+
themeFocused={false}
|
|
65
|
+
themeVariant="filled"
|
|
66
|
+
/>
|
|
52
67
|
<View
|
|
53
68
|
pointerEvents="none"
|
|
54
69
|
style={
|
package/src/index.ts
CHANGED
|
@@ -4,6 +4,8 @@ import theme, {
|
|
|
4
4
|
useTheme,
|
|
5
5
|
swagSystemPalette,
|
|
6
6
|
workSystemPalette,
|
|
7
|
+
jobsSystemPalette,
|
|
8
|
+
ThemeSwitcher,
|
|
7
9
|
} from './theme';
|
|
8
10
|
import { scale } from './utils/scale';
|
|
9
11
|
|
|
@@ -32,6 +34,7 @@ import PinInput from './components/PinInput';
|
|
|
32
34
|
import Progress from './components/Progress';
|
|
33
35
|
import Slider from './components/Slider';
|
|
34
36
|
import Spinner from './components/Spinner';
|
|
37
|
+
import Swipeable from './components/Swipeable';
|
|
35
38
|
import Radio from './components/Radio';
|
|
36
39
|
import SectionHeading from './components/SectionHeading';
|
|
37
40
|
import Select from './components/Select';
|
|
@@ -43,6 +46,7 @@ import TimePicker from './components/TimePicker';
|
|
|
43
46
|
import Toast from './components/Toast';
|
|
44
47
|
import Toolbar from './components/Toolbar';
|
|
45
48
|
import Typography from './components/Typography';
|
|
49
|
+
import RefreshControl from './components/RefreshControl';
|
|
46
50
|
import RichTextEditor from './components/RichTextEditor';
|
|
47
51
|
|
|
48
52
|
export {
|
|
@@ -51,8 +55,10 @@ export {
|
|
|
51
55
|
useTheme,
|
|
52
56
|
scale,
|
|
53
57
|
ThemeProvider,
|
|
58
|
+
ThemeSwitcher,
|
|
54
59
|
swagSystemPalette,
|
|
55
60
|
workSystemPalette,
|
|
61
|
+
jobsSystemPalette,
|
|
56
62
|
Accordion,
|
|
57
63
|
Alert,
|
|
58
64
|
Avatar,
|
|
@@ -78,6 +84,7 @@ export {
|
|
|
78
84
|
Progress,
|
|
79
85
|
Slider,
|
|
80
86
|
Spinner,
|
|
87
|
+
Swipeable,
|
|
81
88
|
Radio,
|
|
82
89
|
SectionHeading,
|
|
83
90
|
Select,
|
|
@@ -89,6 +96,7 @@ export {
|
|
|
89
96
|
Toast,
|
|
90
97
|
Toolbar,
|
|
91
98
|
Typography,
|
|
99
|
+
RefreshControl,
|
|
92
100
|
RichTextEditor,
|
|
93
101
|
};
|
|
94
102
|
|