@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.
- package/build/i18n/zh.json +37 -37
- package/build/index.esm.js +43 -47
- package/build/index.esm.js.map +1 -1
- package/build/index.js +43 -47
- package/build/index.js.map +1 -1
- package/build/main.css +1 -1
- package/build/styles/dateLookup/DateLookup.css +1 -1
- package/build/styles/main.css +1 -1
- package/build/types/dateLookup/dateHeader/DateHeader.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/dateLookup/DateLookup.css +1 -1
- package/src/dateLookup/DateLookup.less +6 -6
- package/src/dateLookup/DateLookup.story.js +0 -6
- package/src/dateLookup/dateHeader/DateHeader.js +9 -12
- package/src/i18n/zh.json +37 -37
- package/src/main.css +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DateHeader.d.ts","sourceRoot":"","sources":["../../../../src/dateLookup/dateHeader/DateHeader.js"],"names":[],"mappings":";
|
|
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 +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
|
|
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
|
-
|
|
85
|
-
|
|
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
|
|
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
|
-
<
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
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": "
|
|
11
|
-
"neptune.PaginationLink.ariaLabel.inactive": "
|
|
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": "
|
|
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": "
|
|
26
|
-
"neptune.UploadButton.allFileTypes": "
|
|
27
|
-
"neptune.UploadButton.dropFiles": "
|
|
28
|
-
"neptune.UploadButton.instructions": "{fileTypes}
|
|
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": "
|
|
38
|
-
"neptune.UploadItem.deleting": "
|
|
39
|
-
"neptune.UploadItem.removeFile": "
|
|
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
|
}
|