@transferwise/components 0.0.0-experimental-0427c06 → 0.0.0-experimental-6be1a18

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.
@@ -1 +1 @@
1
- {"version":3,"file":"DateHeader.d.ts","sourceRoot":"","sources":["../../../../src/dateLookup/dateHeader/DateHeader.js"],"names":[],"mappings":";AAUA;;;;;;gCA+CC;;;;;;;;;;;;QAYe,uCAAQ"}
1
+ {"version":3,"file":"DateHeader.d.ts","sourceRoot":"","sources":["../../../../src/dateLookup/dateHeader/DateHeader.js"],"names":[],"mappings":";AASA;;;;;;gCA6CC;;;;;;;;;;;;QAYe,uCAAQ"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@transferwise/components",
3
- "version": "0.0.0-experimental-0427c06",
3
+ "version": "0.0.0-experimental-6be1a18",
4
4
  "description": "Neptune React components",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -1 +1 @@
1
- .tw-date-lookup-menu{width:400px}.tw-date-lookup-calendar{min-width:300px;table-layout:fixed;text-align:center}.tw-date-lookup-calendar>tbody>tr>td{padding:4px;padding:var(--size-4)}.tw-date-lookup-calendar>tbody>tr>td button{background-color:transparent;border:transparent;border-radius:10px;border-radius:var(--radius-small);color:#0097c7;color:var(--color-content-accent);font-weight:600;font-weight:var(--font-weight-semi-bold);padding:4px 0;padding:var(--size-4) 0;width:100%}.tw-date-lookup-calendar>tbody>tr>td button:not(.disabled,:disabled).active{background-color:#0081ba;background-color:var(--color-interactive-accent-active);color:#fff}.tw-date-lookup-calendar>tbody>tr>td button:not(.disabled,:disabled):hover{background-color:#008fc9;background-color:var(--color-interactive-accent-hover);color:#fff}.np-theme-personal .tw-date-lookup-calendar>tbody>tr>td button{color:#37517e;color:var(--color-content-primary)}.np-theme-personal .tw-date-lookup-calendar>tbody>tr>td button:not(.disabled,:disabled).active,.np-theme-personal .tw-date-lookup-calendar>tbody>tr>td button:not(.disabled,:disabled):hover{color:var(--color-interactive-control)}.np-theme-personal .tw-date-lookup-calendar>tbody>tr>td:nth-child(7n+6) button,.np-theme-personal .tw-date-lookup-calendar>tbody>tr>td:nth-child(7n+7) button,.np-theme-personal .tw-date-lookup-calendar>thead>tr>th:nth-child(7n+6),.np-theme-personal .tw-date-lookup-calendar>thead>tr>th:nth-child(7n+7){color:#5d7079;color:var(--color-content-secondary);font-weight:400;font-weight:var(--font-weight-regular)}.tw-date-lookup-calendar abbr{text-decoration:none}.np-theme-personal .tw-date-lookup-calendar{background-color:inherit}.np-theme-personal .tw-date-lookup-menu .table-bordered,.np-theme-personal.tw-date-lookup-menu .table-bordered{border:none}.np-theme-personal .tw-date-lookup-menu thead,.np-theme-personal.tw-date-lookup-menu thead{background-color:unset}.np-theme-personal .tw-date-lookup-menu td,.np-theme-personal.tw-date-lookup-menu td{border:none}.np-theme-personal .tw-date-lookup-menu .tw-date-lookup-header-current-container,.np-theme-personal.tw-date-lookup-menu .tw-date-lookup-header-current-container{display:inline-block}.np-theme-personal .tw-date-lookup-menu .tw-date-lookup-header-current-container .tw-date-lookup-header-current,.np-theme-personal.tw-date-lookup-menu .tw-date-lookup-header-current-container .tw-date-lookup-header-current{color:#37517e;color:var(--color-content-primary)}.np-theme-personal .tw-date-lookup-menu .tw-date-lookup-day-option,.np-theme-personal.tw-date-lookup-menu .tw-date-lookup-day-option{align-items:center;color:#37517e;color:var(--color-content-primary);display:inline-flex;height:32px;height:var(--size-32);justify-content:center;line-height:32px;line-height:var(--size-32)}.np-theme-personal .tw-date-lookup-menu .tw-date-lookup-day-option.active,.np-theme-personal.tw-date-lookup-menu .tw-date-lookup-day-option.active{background-color:#00a2dd;background-color:var(--color-interactive-accent);color:var(--color-interactive-primary)}
1
+ .tw-date-lookup-menu{width:400px}.tw-date-lookup-calendar{min-width:300px;table-layout:fixed;text-align:center}.tw-date-lookup-calendar>tbody>tr>td{padding:4px;padding:var(--size-4)}.tw-date-lookup-calendar>tbody>tr>td button{background-color:transparent;border:transparent;border-radius:10px;border-radius:var(--radius-small);color:#0097c7;color:var(--color-content-accent);font-weight:600;font-weight:var(--font-weight-semi-bold);padding:4px 0;padding:var(--size-4) 0;width:100%}.tw-date-lookup-calendar>tbody>tr>td button:not(.disabled,:disabled).active{background-color:#0081ba;background-color:var(--color-interactive-accent-active);color:#fff}.tw-date-lookup-calendar>tbody>tr>td button:not(.disabled,:disabled):hover{background-color:#008fc9;background-color:var(--color-interactive-accent-hover);color:#fff}.np-theme-personal .tw-date-lookup-calendar>tbody>tr>td button{color:#37517e;color:var(--color-content-primary)}.np-theme-personal .tw-date-lookup-calendar>tbody>tr>td button:not(.disabled,:disabled).active,.np-theme-personal .tw-date-lookup-calendar>tbody>tr>td button:not(.disabled,:disabled):hover{color:var(--color-interactive-control)}.np-theme-personal .tw-date-lookup-calendar>tbody>tr>td:nth-child(7n+6) button,.np-theme-personal .tw-date-lookup-calendar>tbody>tr>td:nth-child(7n+7) button,.np-theme-personal .tw-date-lookup-calendar>thead>tr>th:nth-child(7n+6),.np-theme-personal .tw-date-lookup-calendar>thead>tr>th:nth-child(7n+7){color:#5d7079;color:var(--color-content-secondary);font-weight:400;font-weight:var(--font-weight-regular)}.tw-date-lookup-calendar abbr{text-decoration:none}.np-theme-personal .tw-date-lookup-calendar{background-color:inherit}.tw-date-lookup-header-current{font-weight:800;font-weight:var(--font-weight-bold)}.np-theme-personal .tw-date-lookup-menu .table-bordered,.np-theme-personal.tw-date-lookup-menu .table-bordered{border:none}.np-theme-personal .tw-date-lookup-menu thead,.np-theme-personal.tw-date-lookup-menu thead{background-color:unset}.np-theme-personal .tw-date-lookup-menu td,.np-theme-personal.tw-date-lookup-menu td{border:none}.np-theme-personal .tw-date-lookup-menu .tw-date-lookup-header-current,.np-theme-personal.tw-date-lookup-menu .tw-date-lookup-header-current{color:#37517e;color:var(--color-content-primary)}.np-theme-personal .tw-date-lookup-menu .tw-date-lookup-day-option,.np-theme-personal.tw-date-lookup-menu .tw-date-lookup-day-option{align-items:center;color:#37517e;color:var(--color-content-primary);display:inline-flex;height:32px;height:var(--size-32);justify-content:center;line-height:32px;line-height:var(--size-32)}.np-theme-personal .tw-date-lookup-menu .tw-date-lookup-day-option.active,.np-theme-personal.tw-date-lookup-menu .tw-date-lookup-day-option.active{background-color:#00a2dd;background-color:var(--color-interactive-accent);color:var(--color-interactive-primary)}
@@ -63,6 +63,10 @@
63
63
  }
64
64
  }
65
65
 
66
+ .tw-date-lookup-header-current {
67
+ font-weight: var(--font-weight-bold);
68
+ }
69
+
66
70
  .np-theme-personal {
67
71
  &.tw-date-lookup-menu,
68
72
  .tw-date-lookup-menu {
@@ -77,13 +81,9 @@
77
81
  td {
78
82
  border: none;
79
83
  }
80
-
81
- .tw-date-lookup-header-current-container {
82
- display: inline-block;
83
84
 
84
- .tw-date-lookup-header-current {
85
- color: var(--color-content-primary);
86
- }
85
+ .tw-date-lookup-header-current {
86
+ color: var(--color-content-primary);
87
87
  }
88
88
 
89
89
  .tw-date-lookup-day-option {
@@ -2,7 +2,6 @@ import { boolean, select, date, text } from '@storybook/addon-knobs';
2
2
  import { useState } from 'react';
3
3
 
4
4
  import { Size } from '../common';
5
- import { within, userEvent } from '../test-utils';
6
5
 
7
6
  import DateLookup from './DateLookup';
8
7
 
@@ -42,11 +41,6 @@ export const Basic = () => {
42
41
  );
43
42
  };
44
43
 
45
- Basic.play = ({ canvasElement }) => {
46
- const canvas = within(canvasElement);
47
- userEvent.click(canvas.getByRole('button'));
48
- };
49
-
50
44
  export const RightAligned = () => {
51
45
  const [value, setValue] = useState(null);
52
46
  const disabled = boolean('disabled', false);
@@ -2,8 +2,7 @@ import PropTypes from 'prop-types';
2
2
  import { useIntl } from 'react-intl';
3
3
 
4
4
  import Chevron from '../../chevron';
5
- import { Position, Size, Typography } from '../../common';
6
- import Title from '../../title';
5
+ import { Position, Size } from '../../common';
7
6
  import messages from '../DateLookup.messages';
8
7
 
9
8
  const buttonClasses = 'btn-link p-a-0 text-no-decoration np-text-body-large-bold rounded-sm';
@@ -28,16 +27,14 @@ const DateHeader = ({ label, onLabelClick, onPreviousClick, onNextClick, dateMod
28
27
  </button>
29
28
  </div>
30
29
  {label && (
31
- <Title type={Typography.TITLE_BODY} className="tw-date-lookup-header-current-container">
32
- <button
33
- type="button"
34
- className={`tw-date-lookup-header-current ${buttonClasses}`}
35
- aria-label={intl.formatMessage(messages.goTo20YearView)}
36
- onClick={onLabelClick}
37
- >
38
- {label}
39
- </button>
40
- </Title>
30
+ <button
31
+ type="button"
32
+ className={`tw-date-lookup-header-current ${buttonClasses}`}
33
+ aria-label={intl.formatMessage(messages.goTo20YearView)}
34
+ onClick={onLabelClick}
35
+ >
36
+ {label}
37
+ </button>
41
38
  )}
42
39
  <div className="pull-right-single-direction">
43
40
  <button
package/src/i18n/zh.json CHANGED
@@ -1,44 +1,44 @@
1
1
  {
2
- "neptune.Chips.ariaLabel": "清除{choice}",
3
- "neptune.ClearButton.ariaLabel": "清除",
4
- "neptune.CloseButton.ariaLabel": "關閉",
2
+ "neptune.Chips.ariaLabel": "清除 {choice}",
3
+ "neptune.ClearButton.ariaLabel": "清晰",
4
+ "neptune.CloseButton.ariaLabel": "关闭",
5
5
  "neptune.DateInput.day.label": "日",
6
6
  "neptune.DateInput.month.label": "月",
7
7
  "neptune.DateInput.year.label": "年",
8
- "neptune.MoneyInput.Select.placeholder": "選擇一個選項…",
9
- "neptune.Pagination.ariaLabel": "分頁導航",
10
- "neptune.PaginationLink.ariaLabel.active": "前往第{pageNumber}頁",
11
- "neptune.PaginationLink.ariaLabel.inactive": "目前在第{pageNumber}頁",
12
- "neptune.Select.searchPlaceholder": "搜尋…",
13
- "neptune.Summary.statusDone": "已完成事項",
14
- "neptune.Summary.statusNotDone": "未完成事項",
15
- "neptune.Summary.statusPending": "待處理事項",
16
- "neptune.Upload.csButtonText": "上載另一個檔案?",
17
- "neptune.Upload.csFailureText": "上載失敗,請重試。",
18
- "neptune.Upload.csSuccessText": "上載完成!",
19
- "neptune.Upload.csTooLargeMessage": "請提供小於5MB的檔案",
20
- "neptune.Upload.csWrongTypeMessage": "不支持檔案類型,請使用其他檔案重試",
8
+ "neptune.MoneyInput.Select.placeholder": "请选择...",
9
+ "neptune.Pagination.ariaLabel": "分页导航",
10
+ "neptune.PaginationLink.ariaLabel.active": "转到第 {pageNumber} 页",
11
+ "neptune.PaginationLink.ariaLabel.inactive": "当前页面,第 {pageNumber} 页",
12
+ "neptune.Select.searchPlaceholder": "搜索",
13
+ "neptune.Summary.statusDone": "已完成",
14
+ "neptune.Summary.statusNotDone": "未完成",
15
+ "neptune.Summary.statusPending": "待处理",
16
+ "neptune.Upload.csButtonText": "上传另一个文件?",
17
+ "neptune.Upload.csFailureText": "上传失败。请重试",
18
+ "neptune.Upload.csSuccessText": "上传完毕!",
19
+ "neptune.Upload.csTooLargeMessage": "请提供小于 5MB 的文件",
20
+ "neptune.Upload.csWrongTypeMessage": "不支持该文件类型,请试试其他文件",
21
21
  "neptune.Upload.psButtonText": "取消",
22
- "neptune.Upload.psProcessingText": "上載中...",
23
- "neptune.Upload.usButtonText": "或者選擇一個檔案",
24
- "neptune.Upload.usDropMessage": "拖放檔案以開始上載",
25
- "neptune.Upload.usPlaceholder": "拖放不超過5MB的檔案",
26
- "neptune.UploadButton.allFileTypes": "所有檔案類型",
27
- "neptune.UploadButton.dropFiles": "拖放檔案以開始上載",
28
- "neptune.UploadButton.instructions": "{fileTypes},小於{size}MB",
29
- "neptune.UploadButton.uploadFile": "上載檔案",
30
- "neptune.UploadButton.uploadFiles": "上載檔案",
31
- "neptune.UploadInput.deleteModalBody": "移除此檔案會把它從我們的系統中刪除。",
22
+ "neptune.Upload.psProcessingText": "正在上传…",
23
+ "neptune.Upload.usButtonText": "或选择文件",
24
+ "neptune.Upload.usDropMessage": "拖放文件开始上传",
25
+ "neptune.Upload.usPlaceholder": "拖放小于 5MB 的文件",
26
+ "neptune.UploadButton.allFileTypes": "所有文件类型",
27
+ "neptune.UploadButton.dropFiles": "拖放文件开始上传",
28
+ "neptune.UploadButton.instructions": "{fileTypes},小于 {size}MB",
29
+ "neptune.UploadButton.uploadFile": "上传文件",
30
+ "neptune.UploadButton.uploadFiles": "上传文件",
31
+ "neptune.UploadInput.deleteModalBody": "删除此文件会将其从我们的系统中删除",
32
32
  "neptune.UploadInput.deleteModalCancelButtonText": "取消",
33
- "neptune.UploadInput.deleteModalConfirmButtonText": "移除",
34
- "neptune.UploadInput.deleteModalTitle": "你確定要移除此檔案嗎?",
35
- "neptune.UploadInput.fileIsTooLarge": "檔案太大",
36
- "neptune.UploadInput.fileTypeNotSupported": "不支持檔案類型",
37
- "neptune.UploadInput.maximumFilesAlreadyUploaded": "抱歉,這次上載失敗,因為我們每次最多只能接受{maxFilesAllowed}個檔案。",
38
- "neptune.UploadItem.deleting": "刪除中…",
39
- "neptune.UploadItem.removeFile": "移除檔案{filename}",
40
- "neptune.UploadItem.uploaded": "已上載",
41
- "neptune.UploadItem.uploadedFile": "已上載檔案",
42
- "neptune.UploadItem.uploading": "上載中...",
43
- "neptune.UploadItem.uploadingFailed": "上載失敗"
33
+ "neptune.UploadInput.deleteModalConfirmButtonText": "删除",
34
+ "neptune.UploadInput.deleteModalTitle": "确定要删除此文件吗?",
35
+ "neptune.UploadInput.fileIsTooLarge": "文件太大",
36
+ "neptune.UploadInput.fileTypeNotSupported": "文件类型不受支持",
37
+ "neptune.UploadInput.maximumFilesAlreadyUploaded": "抱歉,此上传失败,因为我们一次只能接受 {maxFilesAllowed} 个文件。",
38
+ "neptune.UploadItem.deleting": "正在删除…",
39
+ "neptune.UploadItem.removeFile": "删除文件 {filename}",
40
+ "neptune.UploadItem.uploaded": "已上传",
41
+ "neptune.UploadItem.uploadedFile": "上传的文件",
42
+ "neptune.UploadItem.uploading": "正在上传…",
43
+ "neptune.UploadItem.uploadingFailed": "上传失败"
44
44
  }