@transferwise/components 0.0.0-experimental-e9526a8 → 0.0.0-experimental-9a61b0a

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 (61) hide show
  1. package/build/i18n/en.json +8 -0
  2. package/build/index.esm.js +388 -241
  3. package/build/index.esm.js.map +1 -1
  4. package/build/index.js +387 -240
  5. package/build/index.js.map +1 -1
  6. package/build/main.css +1 -1
  7. package/build/styles/dateLookup/DateLookup.css +1 -1
  8. package/build/styles/main.css +1 -1
  9. package/build/types/common/focusBoundary/FocusBoundary.d.ts +2 -2
  10. package/build/types/common/focusBoundary/FocusBoundary.d.ts.map +1 -1
  11. package/build/types/common/focusBoundary/utils/getFocusableElements.d.ts +2 -0
  12. package/build/types/common/focusBoundary/utils/getFocusableElements.d.ts.map +1 -0
  13. package/build/types/common/focusBoundary/utils/index.d.ts +3 -0
  14. package/build/types/common/focusBoundary/utils/index.d.ts.map +1 -0
  15. package/build/types/common/focusBoundary/utils/resetFocus.d.ts +2 -0
  16. package/build/types/common/focusBoundary/utils/resetFocus.d.ts.map +1 -0
  17. package/build/types/dateLookup/DateLookup.messages.d.ts +65 -0
  18. package/build/types/dateLookup/DateLookup.messages.d.ts.map +1 -0
  19. package/build/types/dateLookup/dateHeader/DateHeader.d.ts +3 -1
  20. package/build/types/dateLookup/dateHeader/DateHeader.d.ts.map +1 -1
  21. package/build/types/dateLookup/tableLink/TableLink.d.ts +4 -26
  22. package/build/types/dateLookup/tableLink/TableLink.d.ts.map +1 -1
  23. package/build/types/dateLookup/yearCalendar/YearCalendar.d.ts +4 -29
  24. package/build/types/dateLookup/yearCalendar/YearCalendar.d.ts.map +1 -1
  25. package/build/types/upload/steps/completeStep/completeStep.d.ts.map +1 -1
  26. package/build/types/upload/steps/processingStep/processingStep.d.ts.map +1 -1
  27. package/package.json +1 -2
  28. package/src/common/bottomSheet/__snapshots__/BottomSheet.spec.tsx.snap +1 -8
  29. package/src/common/focusBoundary/FocusBoundary.spec.tsx +66 -0
  30. package/src/common/focusBoundary/FocusBoundary.tsx +36 -6
  31. package/src/common/focusBoundary/__snapshots__/FocusBoundary.spec.tsx.snap +16 -0
  32. package/src/common/focusBoundary/utils/getFocusableElements.js +25 -0
  33. package/src/common/focusBoundary/utils/getFocusableElements.spec.js +51 -0
  34. package/src/common/focusBoundary/utils/index.js +2 -0
  35. package/src/common/focusBoundary/utils/resetFocus.js +23 -0
  36. package/src/common/focusBoundary/utils/resetFocus.spec.js +103 -0
  37. package/src/dateLookup/DateLookup.css +1 -1
  38. package/src/dateLookup/DateLookup.keyboardEvents.spec.js +3 -3
  39. package/src/dateLookup/DateLookup.less +4 -0
  40. package/src/dateLookup/DateLookup.messages.js +44 -0
  41. package/src/dateLookup/DateLookup.testingLibrary.spec.js +39 -0
  42. package/src/dateLookup/dateHeader/DateHeader.js +48 -26
  43. package/src/dateLookup/dateHeader/DateHeader.spec.js +37 -0
  44. package/src/dateLookup/dayCalendar/DayCalendar.js +3 -1
  45. package/src/dateLookup/dayCalendar/DayCalendar.spec.js +7 -1
  46. package/src/dateLookup/dayCalendar/table/DayCalendarTable.js +7 -3
  47. package/src/dateLookup/dayCalendar/table/DayCalendarTable.spec.js +1 -0
  48. package/src/dateLookup/monthCalendar/MonthCalendar.js +3 -1
  49. package/src/dateLookup/monthCalendar/MonthCalendar.spec.js +7 -1
  50. package/src/dateLookup/monthCalendar/table/MonthCalendarTable.spec.js +4 -5
  51. package/src/dateLookup/tableLink/TableLink.js +24 -3
  52. package/src/dateLookup/tableLink/TableLink.spec.js +60 -4
  53. package/src/dateLookup/yearCalendar/YearCalendar.js +16 -3
  54. package/src/dateLookup/yearCalendar/YearCalendar.spec.js +14 -1
  55. package/src/dateLookup/yearCalendar/table/YearCalendarTable.spec.js +4 -5
  56. package/src/i18n/en.json +8 -0
  57. package/src/main.css +1 -1
  58. package/src/upload/Upload.js +1 -1
  59. package/src/upload/steps/completeStep/completeStep.js +4 -1
  60. package/src/upload/steps/processingStep/processingStep.js +1 -0
  61. package/src/uploadInput/uploadItem/UploadItem.tsx +1 -1
@@ -2,8 +2,6 @@ import * as formatting from '@transferwise/formatting';
2
2
  import { shallow } from 'enzyme';
3
3
  import { useIntl } from 'react-intl';
4
4
 
5
- import TableLink from '../../tableLink';
6
-
7
5
  import YearCalendarTable from '.';
8
6
 
9
7
  jest.mock('react-intl');
@@ -29,7 +27,7 @@ describe('YearCalendarTable', () => {
29
27
  it('generates 5x4 table', () => {
30
28
  expect(component.find('tbody tr')).toHaveLength(5);
31
29
  expect(component.find('tbody td')).toHaveLength(20);
32
- expect(component.find(TableLink)).toHaveLength(20);
30
+ expect(getTableLink()).toHaveLength(20);
33
31
  });
34
32
 
35
33
  it('starts with year 2000, 2020, 2040 etc', () => {
@@ -81,7 +79,7 @@ describe('YearCalendarTable', () => {
81
79
  selectedDate: today,
82
80
  viewYear: today.getFullYear(),
83
81
  });
84
- expect(component.find(TableLink).find({ today: true }).prop('item')).toBe(today.getFullYear());
82
+ expect(getTableLink().find({ today: true }).prop('item')).toBe(today.getFullYear());
85
83
  });
86
84
 
87
85
  it('passes onSelect to TableLink', () => {
@@ -92,5 +90,6 @@ describe('YearCalendarTable', () => {
92
90
  expect(component.find('.sr-only').text()).toBe('Enter date..');
93
91
  });
94
92
 
95
- const getTableLinkAt = (i) => component.find(TableLink).at(i);
93
+ const getTableLinkAt = (i) => component.find('[type="year"]').at(i);
94
+ const getTableLink = () => component.find('[type="year"]');
96
95
  });
package/src/i18n/en.json CHANGED
@@ -5,6 +5,14 @@
5
5
  "neptune.DateInput.day.label": "Day",
6
6
  "neptune.DateInput.month.label": "Month",
7
7
  "neptune.DateInput.year.label": "Year",
8
+ "neptune.DateLookup.day": "day",
9
+ "neptune.DateLookup.goTo20YearView": "Go to 20 year view",
10
+ "neptune.DateLookup.month": "month",
11
+ "neptune.DateLookup.next": "next",
12
+ "neptune.DateLookup.previous": "previous",
13
+ "neptune.DateLookup.selected": "selected",
14
+ "neptune.DateLookup.twentyYears": "20 years",
15
+ "neptune.DateLookup.year": "year",
8
16
  "neptune.Link.opensInNewTab": "(opens in new tab)",
9
17
  "neptune.MoneyInput.Select.placeholder": "Select an option...",
10
18
  "neptune.Select.searchPlaceholder": "Search...",