@hero-design/rn-work-uikit 1.9.4 → 1.9.6

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 (41) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/assets/fonts/hero-icons-mobile.ttf +0 -0
  3. package/es/index.js +69810 -0
  4. package/lib/index.js +809 -440
  5. package/package.json +5 -5
  6. package/src/components/RichTextEditor/MentionList.tsx +2 -1
  7. package/testUtils/renderWithTheme.tsx +2 -2
  8. package/types/index.d.ts +525 -0
  9. package/src/__tests__/index-export.spec.ts +0 -64
  10. package/src/__tests__/index.spec.tsx +0 -14
  11. package/src/components/DatePicker/__tests__/__snapshots__/index.spec.tsx.snap +0 -1649
  12. package/src/components/DatePicker/__tests__/index.spec.tsx +0 -56
  13. package/src/components/FormGroup/__tests__/__snapshots__/index.spec.tsx.snap +0 -908
  14. package/src/components/FormGroup/__tests__/index.spec.tsx +0 -319
  15. package/src/components/FormGroup/__tests__/utils.spec.ts +0 -73
  16. package/src/components/RichTextEditor/__tests__/EditorToolbar.spec.tsx +0 -154
  17. package/src/components/RichTextEditor/__tests__/MentionList.spec.tsx +0 -105
  18. package/src/components/RichTextEditor/__tests__/RichTextEditor.spec.tsx +0 -81
  19. package/src/components/RichTextEditor/__tests__/RichTextEditorInput.spec.tsx +0 -174
  20. package/src/components/RichTextEditor/__tests__/__snapshots__/EditorToolbar.spec.tsx.snap +0 -407
  21. package/src/components/RichTextEditor/__tests__/__snapshots__/MentionList.spec.tsx.snap +0 -13
  22. package/src/components/Select/__tests__/__snapshots__/index.spec.tsx.snap +0 -1324
  23. package/src/components/Select/__tests__/index.spec.tsx +0 -43
  24. package/src/components/TextInput/__tests__/ErrorOrHelpText.spec.tsx +0 -20
  25. package/src/components/TextInput/__tests__/FloatingLabel.spec.tsx +0 -193
  26. package/src/components/TextInput/__tests__/InputComponent.spec.tsx +0 -41
  27. package/src/components/TextInput/__tests__/InputRow.spec.tsx +0 -233
  28. package/src/components/TextInput/__tests__/MaxLengthMessage.spec.tsx +0 -17
  29. package/src/components/TextInput/__tests__/PrefixComponent.spec.tsx +0 -14
  30. package/src/components/TextInput/__tests__/StyledTextInput.spec.tsx +0 -114
  31. package/src/components/TextInput/__tests__/SuffixComponent.spec.tsx +0 -20
  32. package/src/components/TextInput/__tests__/__snapshots__/StyledTextInput.spec.tsx.snap +0 -583
  33. package/src/components/TextInput/__tests__/__snapshots__/index.spec.tsx.snap +0 -5835
  34. package/src/components/TextInput/__tests__/getState.spec.tsx +0 -89
  35. package/src/components/TextInput/__tests__/index.spec.tsx +0 -679
  36. package/src/components/TimePicker/__tests__/index.spec.tsx +0 -34
  37. package/src/theme/__tests__/ThemeProvider.spec.tsx +0 -32
  38. package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +0 -2042
  39. package/src/theme/__tests__/index.spec.ts +0 -7
  40. package/src/utils/__tests__/helpers.spec.ts +0 -92
  41. package/stats/1.3.0/rn-work-uikit-stats.html +0 -4842
@@ -1,7 +0,0 @@
1
- import theme from '..';
2
-
3
- describe('theme', () => {
4
- it('returns correct theme object', () => {
5
- expect(theme).toMatchSnapshot();
6
- });
7
- });
@@ -1,92 +0,0 @@
1
- import { deepCompareValue, omit, pick } from '../helpers';
2
-
3
- describe('pick', () => {
4
- it('works', () => {
5
- const props = { a: 1, b: true, c: 'outline', d: null, f: 'whatever' };
6
-
7
- expect(pick(['a', 'b', 'f'], props)).toEqual({
8
- a: 1,
9
- b: true,
10
- f: 'whatever',
11
- });
12
- });
13
-
14
- it('work with unknown object type', () => {
15
- const props: Record<string, unknown> = {
16
- a: 1,
17
- b: true,
18
- c: 'outline',
19
- d: null,
20
- f: 'whatever',
21
- };
22
-
23
- expect(pick(['a', 'b', 'f'], props)).toEqual({
24
- a: 1,
25
- b: true,
26
- f: 'whatever',
27
- });
28
- });
29
- });
30
-
31
- describe('omit', () => {
32
- it('works', () => {
33
- const props = { a: 1, b: true, c: 'outline', d: null, f: 'whatever' };
34
-
35
- expect(omit(['a', 'b'], props)).toEqual({
36
- c: 'outline',
37
- d: null,
38
- f: 'whatever',
39
- });
40
- });
41
-
42
- it('work with unknown object type', () => {
43
- const props: Record<string, unknown> = {
44
- a: 1,
45
- b: true,
46
- c: 'outline',
47
- d: null,
48
- f: 'whatever',
49
- };
50
-
51
- expect(omit(['a', 'b'], props)).toEqual({
52
- c: 'outline',
53
- d: null,
54
- f: 'whatever',
55
- });
56
- });
57
- });
58
-
59
- describe('deepCompareValue', () => {
60
- it.each`
61
- a | b | expected
62
- ${1} | ${1} | ${true}
63
- ${'test'} | ${'test'} | ${true}
64
- ${true} | ${true} | ${true}
65
- ${null} | ${null} | ${true}
66
- ${undefined} | ${undefined} | ${true}
67
- ${1} | ${2} | ${false}
68
- ${'test'} | ${'other'} | ${false}
69
- ${true} | ${false} | ${false}
70
- ${null} | ${undefined} | ${false}
71
- ${NaN} | ${NaN} | ${false}
72
- ${1} | ${NaN} | ${false}
73
- ${[1, 2, 3]} | ${[1, 2, 3]} | ${true}
74
- ${['a', 'b']} | ${['a', 'b']} | ${true}
75
- ${[]} | ${[]} | ${true}
76
- ${[1, 2]} | ${[1, 2, 3]} | ${false}
77
- ${[1, 2]} | ${[2, 1]} | ${false}
78
- ${[1, [2, 3]]} | ${[1, [2, 3]]} | ${true}
79
- ${[1, [2, 3]]} | ${[1, [2, 4]]} | ${false}
80
- ${{ a: 1, b: 2 }} | ${{ a: 1, b: 2 }} | ${true}
81
- ${{}} | ${{}} | ${true}
82
- ${{ a: 1 }} | ${{ a: 2 }} | ${false}
83
- ${{ a: 1 }} | ${{ b: 1 }} | ${false}
84
- ${{ a: 1 }} | ${{ a: 1, b: 2 }} | ${false}
85
- ${{ a: { b: 1 } }} | ${{ a: { b: 1 } }} | ${true}
86
- ${{ a: { b: 1 } }} | ${{ a: { b: 2 } }} | ${false}
87
- ${1} | ${'1'} | ${false}
88
- ${[]} | ${{}} | ${false}
89
- `('should compare $a and $b correctly', ({ a, b, expected }) => {
90
- expect(deepCompareValue(a, b)).toBe(expected);
91
- });
92
- });