@hero-design/rn-work-uikit 1.9.5 → 1.10.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/CHANGELOG.md +21 -0
- package/README.md +219 -63
- package/assets/fonts/hero-icons-mobile.ttf +0 -0
- package/es/index.js +55337 -0
- package/lib/index.js +7173 -21259
- package/package.json +22 -22
- package/src/components/FormGroup/index.tsx +21 -10
- package/src/components/FormGroup/utils.ts +3 -3
- package/src/components/TextInput/InputRow.tsx +3 -6
- package/src/components/TextInput/index.tsx +4 -4
- package/src/components/TextInput/types.ts +4 -8
- package/types/index.d.ts +525 -0
- package/src/__tests__/index-export.spec.ts +0 -64
- package/src/__tests__/index.spec.tsx +0 -14
- package/src/components/DatePicker/__tests__/__snapshots__/index.spec.tsx.snap +0 -1649
- package/src/components/DatePicker/__tests__/index.spec.tsx +0 -56
- package/src/components/FormGroup/__tests__/__snapshots__/index.spec.tsx.snap +0 -908
- package/src/components/FormGroup/__tests__/index.spec.tsx +0 -319
- package/src/components/FormGroup/__tests__/utils.spec.ts +0 -73
- package/src/components/RichTextEditor/__tests__/EditorToolbar.spec.tsx +0 -154
- package/src/components/RichTextEditor/__tests__/MentionList.spec.tsx +0 -105
- package/src/components/RichTextEditor/__tests__/RichTextEditor.spec.tsx +0 -81
- package/src/components/RichTextEditor/__tests__/RichTextEditorInput.spec.tsx +0 -174
- package/src/components/RichTextEditor/__tests__/__snapshots__/EditorToolbar.spec.tsx.snap +0 -407
- package/src/components/RichTextEditor/__tests__/__snapshots__/MentionList.spec.tsx.snap +0 -13
- package/src/components/Select/__tests__/__snapshots__/index.spec.tsx.snap +0 -1324
- package/src/components/Select/__tests__/index.spec.tsx +0 -43
- package/src/components/TextInput/__tests__/ErrorOrHelpText.spec.tsx +0 -20
- package/src/components/TextInput/__tests__/FloatingLabel.spec.tsx +0 -190
- package/src/components/TextInput/__tests__/InputComponent.spec.tsx +0 -41
- package/src/components/TextInput/__tests__/InputRow.spec.tsx +0 -233
- package/src/components/TextInput/__tests__/MaxLengthMessage.spec.tsx +0 -17
- package/src/components/TextInput/__tests__/PrefixComponent.spec.tsx +0 -14
- package/src/components/TextInput/__tests__/StyledTextInput.spec.tsx +0 -114
- package/src/components/TextInput/__tests__/SuffixComponent.spec.tsx +0 -20
- package/src/components/TextInput/__tests__/__snapshots__/StyledTextInput.spec.tsx.snap +0 -583
- package/src/components/TextInput/__tests__/__snapshots__/index.spec.tsx.snap +0 -5835
- package/src/components/TextInput/__tests__/getState.spec.tsx +0 -89
- package/src/components/TextInput/__tests__/index.spec.tsx +0 -679
- package/src/components/TimePicker/__tests__/index.spec.tsx +0 -34
- package/src/theme/__tests__/ThemeProvider.spec.tsx +0 -32
- package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +0 -2042
- package/src/theme/__tests__/index.spec.ts +0 -7
- package/src/utils/__tests__/helpers.spec.ts +0 -92
- package/stats/1.3.0/rn-work-uikit-stats.html +0 -4842
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Platform } from 'react-native';
|
|
3
|
-
import renderWithTheme from '../../../../testUtils/renderWithTheme';
|
|
4
|
-
import DatePicker from '..';
|
|
5
|
-
|
|
6
|
-
describe('DatePicker', () => {
|
|
7
|
-
it('renders correctly (snapshot)', () => {
|
|
8
|
-
const { toJSON } = renderWithTheme(
|
|
9
|
-
<DatePicker
|
|
10
|
-
label="Start date"
|
|
11
|
-
value={new Date('1995-12-17T00:00:00.000Z')}
|
|
12
|
-
minDate={new Date('1994-12-17T00:00:00.000Z')}
|
|
13
|
-
maxDate={new Date('1996-12-17T00:00:00.000Z')}
|
|
14
|
-
confirmLabel="Confirm"
|
|
15
|
-
onChange={jest.fn()}
|
|
16
|
-
/>
|
|
17
|
-
);
|
|
18
|
-
expect(toJSON()).toMatchSnapshot();
|
|
19
|
-
});
|
|
20
|
-
});
|
|
21
|
-
|
|
22
|
-
describe('Dialog', () => {
|
|
23
|
-
it('renders DatePickerIOS when OS is iOS', () => {
|
|
24
|
-
Platform.OS = 'ios';
|
|
25
|
-
const { getByTestId, toJSON } = renderWithTheme(
|
|
26
|
-
<DatePicker
|
|
27
|
-
label="Start date"
|
|
28
|
-
value={new Date('1995-12-17T00:00:00.000Z')}
|
|
29
|
-
minDate={new Date('1994-12-17T00:00:00.000Z')}
|
|
30
|
-
maxDate={new Date('1996-12-17T00:00:00.000Z')}
|
|
31
|
-
confirmLabel="Confirm"
|
|
32
|
-
onChange={jest.fn()}
|
|
33
|
-
/>
|
|
34
|
-
);
|
|
35
|
-
|
|
36
|
-
expect(toJSON()).toMatchSnapshot();
|
|
37
|
-
expect(getByTestId('datePickerInputIOS')).toBeDefined();
|
|
38
|
-
});
|
|
39
|
-
|
|
40
|
-
it('renders DatePickerAndroid when OS is android', () => {
|
|
41
|
-
Platform.OS = 'android';
|
|
42
|
-
const { getByTestId, toJSON } = renderWithTheme(
|
|
43
|
-
<DatePicker
|
|
44
|
-
label="Start date"
|
|
45
|
-
value={new Date('1995-12-17T00:00:00.000Z')}
|
|
46
|
-
minDate={new Date('1994-12-17T00:00:00.000Z')}
|
|
47
|
-
maxDate={new Date('1996-12-17T00:00:00.000Z')}
|
|
48
|
-
confirmLabel="Confirm"
|
|
49
|
-
onChange={jest.fn()}
|
|
50
|
-
/>
|
|
51
|
-
);
|
|
52
|
-
|
|
53
|
-
expect(toJSON()).toMatchSnapshot();
|
|
54
|
-
expect(getByTestId('datePickerInputAndroid')).toBeDefined();
|
|
55
|
-
});
|
|
56
|
-
});
|