@transferwise/components 0.0.0-experimental-f3d17a6 → 0.0.0-experimental-e05dfa3
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/main.css +1 -1
- package/build/styles/dateLookup/DateLookup.css +1 -1
- package/build/styles/main.css +1 -1
- package/package.json +3 -3
- package/src/dateLookup/DateLookup.css +1 -1
- package/src/dateLookup/DateLookup.less +3 -16
- package/src/dateLookup/DateLookup.story.js +0 -2
- package/src/dateLookup/monthCalendar/table/MonthCalendarTable.spec.js +4 -4
- package/src/main.css +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@transferwise/components",
|
|
3
|
-
"version": "0.0.0-experimental-
|
|
3
|
+
"version": "0.0.0-experimental-e05dfa3",
|
|
4
4
|
"description": "Neptune React components",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -78,8 +78,8 @@
|
|
|
78
78
|
"rollup": "^3.28.1",
|
|
79
79
|
"storybook": "^7.4.5",
|
|
80
80
|
"@transferwise/less-config": "3.0.6",
|
|
81
|
-
"@
|
|
82
|
-
"@
|
|
81
|
+
"@transferwise/neptune-css": "14.7.1",
|
|
82
|
+
"@wise/components-theming": "0.8.4"
|
|
83
83
|
},
|
|
84
84
|
"peerDependencies": {
|
|
85
85
|
"@transferwise/icons": "^3.7.0",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.tw-date-lookup-menu{width:400px}.tw-date-lookup-calendar{background-color:inherit;min-width:300px;table-layout:fixed;text-align:center}.tw-date-lookup-calendar>tbody>tr>td:nth-child(7n+6) button,.tw-date-lookup-calendar>tbody>tr>td:nth-child(7n+7) button,.tw-date-lookup-calendar>thead>tr>th:nth-child(7n+6),.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>tbody>tr>td{padding:4px;padding:var(--size-4)}@media (max-width:320px){.tw-date-lookup-calendar>tbody>tr>td{padding:0}}.tw-date-lookup-calendar>tbody>tr>td:has(.tw-date-lookup-day-option){padding:1px}.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);color:#37517e;color:var(--color-content-primary);font-weight:600;font-weight:var(--font-weight-semi-bold);padding:4px 0;padding:var(--size-4) 0;width:100%}@media (max-width:320px){.tw-date-lookup-calendar>tbody>tr>td button{padding:0}}.tw-date-lookup-calendar>tbody>tr>td button.tw-date-lookup-day-option{align-items:center;border-radius:50%;display:inline-flex;height:40px;height:var(--size-40);justify-content:center;line-height:40px;line-height:var(--size-40);padding:0;width:40px;width:var(--size-40)}.tw-date-lookup-calendar>tbody>tr>td button.tw-date-lookup-day-option.today{text-decoration:underline;text-decoration-thickness:2px;text-underline-offset:4px}.tw-date-lookup-calendar>tbody>tr>td:hover button:not(.disabled,:disabled),.tw-date-lookup-calendar>tbody>tr>td:not(.disabled,:disabled) button.show-focus{background-color:var(--color-background-screen-hover)}.tw-date-lookup-calendar>tbody>tr>td:not(.disabled,:disabled) button.active{background-color:var(--color-interactive-primary);color:#00a2dd;color:var(--color-interactive-accent)}.tw-date-lookup-calendar abbr{text-decoration:none}.tw-date-lookup-header-current-container{display:inline
|
|
1
|
+
.tw-date-lookup-menu{width:400px}.tw-date-lookup-calendar{background-color:inherit;min-width:300px;table-layout:fixed;text-align:center}.tw-date-lookup-calendar>tbody>tr>td:nth-child(7n+6) button,.tw-date-lookup-calendar>tbody>tr>td:nth-child(7n+7) button,.tw-date-lookup-calendar>thead>tr>th:nth-child(7n+6),.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>tbody>tr>td{padding:4px;padding:var(--size-4)}@media (max-width:320px){.tw-date-lookup-calendar>tbody>tr>td{padding:0}}.tw-date-lookup-calendar>tbody>tr>td:has(.tw-date-lookup-day-option){padding:1px}.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);color:#37517e;color:var(--color-content-primary);font-weight:600;font-weight:var(--font-weight-semi-bold);padding:4px 0;padding:var(--size-4) 0;width:100%}@media (max-width:320px){.tw-date-lookup-calendar>tbody>tr>td button{padding:0}}.tw-date-lookup-calendar>tbody>tr>td button.tw-date-lookup-day-option{align-items:center;border-radius:50%;display:inline-flex;height:40px;height:var(--size-40);justify-content:center;line-height:40px;line-height:var(--size-40);padding:0;width:40px;width:var(--size-40)}.tw-date-lookup-calendar>tbody>tr>td button.tw-date-lookup-day-option.today{text-decoration:underline;text-decoration-thickness:2px;text-underline-offset:4px}.tw-date-lookup-calendar>tbody>tr>td:hover button:not(.disabled,:disabled),.tw-date-lookup-calendar>tbody>tr>td:not(.disabled,:disabled) button.show-focus{background-color:var(--color-background-screen-hover)}.tw-date-lookup-calendar>tbody>tr>td:not(.disabled,:disabled) button.active{background-color:var(--color-interactive-primary);color:#00a2dd;color:var(--color-interactive-accent)}.tw-date-lookup-calendar abbr{text-decoration:none}.tw-date-lookup-header-current-container{display:inline}.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)}
|
|
@@ -55,16 +55,9 @@
|
|
|
55
55
|
text-decoration-thickness: 2px;
|
|
56
56
|
text-underline-offset: 4px;
|
|
57
57
|
}
|
|
58
|
-
|
|
59
|
-
&:focus-visible {
|
|
60
|
-
// outline: none;
|
|
61
|
-
// background-color: var(--color-background-screen-hover);
|
|
62
|
-
// color: var(--color-interactive-accent);
|
|
63
|
-
}
|
|
64
58
|
}
|
|
65
59
|
}
|
|
66
60
|
|
|
67
|
-
// &:not(.disabled, :disabled) button.focus-visible,
|
|
68
61
|
&:not(.disabled, :disabled) button.show-focus,
|
|
69
62
|
&:hover button:not(.disabled, :disabled) {
|
|
70
63
|
background-color: var(--color-background-screen-hover);
|
|
@@ -84,12 +77,11 @@
|
|
|
84
77
|
}
|
|
85
78
|
|
|
86
79
|
.tw-date-lookup-header-current-container {
|
|
87
|
-
display: inline
|
|
80
|
+
display: inline;
|
|
88
81
|
}
|
|
82
|
+
|
|
89
83
|
.tw-date-lookup-header-current {
|
|
90
84
|
font-weight: var(--font-weight-bold);
|
|
91
|
-
|
|
92
|
-
|
|
93
85
|
}
|
|
94
86
|
|
|
95
87
|
.np-theme-personal {
|
|
@@ -110,10 +102,5 @@
|
|
|
110
102
|
.tw-date-lookup-header-current {
|
|
111
103
|
color: var(--color-content-primary);
|
|
112
104
|
}
|
|
113
|
-
|
|
114
|
-
// .tw-date-lookup-day-option.active {
|
|
115
|
-
// background-color: var(--color-interactive-primary);
|
|
116
|
-
// color: var(--color-interactive-accent);
|
|
117
|
-
// }
|
|
118
105
|
}
|
|
119
|
-
}
|
|
106
|
+
}
|
|
@@ -17,8 +17,6 @@ let thePast = new Date();
|
|
|
17
17
|
thePast.setDate(thePast.getDate() - 10);
|
|
18
18
|
|
|
19
19
|
export const Basic = () => {
|
|
20
|
-
// date set in the far future so that it doesn't change for UI tests
|
|
21
|
-
// const [value, setValue] = useState(new Date(2030, 6, 6));
|
|
22
20
|
const [value, setValue] = useState(null);
|
|
23
21
|
const disabled = boolean('disabled', false);
|
|
24
22
|
const label = text('label', 'label');
|
|
@@ -83,12 +83,12 @@ describe('MonthCalendarTable', () => {
|
|
|
83
83
|
});
|
|
84
84
|
|
|
85
85
|
it('sets autofocus to true when June is the selected month', () => {
|
|
86
|
-
component.setProps({ selectedDate: new Date(2018, 5, 1) });
|
|
86
|
+
component.setProps({ selectedDate: new Date(2018, 5, 1) });
|
|
87
87
|
expect(getTableLinkAt(5).prop('autofocus')).toBe(true);
|
|
88
88
|
});
|
|
89
89
|
|
|
90
90
|
it('does not set autofocus to true when June is the selected month but not the right year', () => {
|
|
91
|
-
component.setProps({ selectedDate: new Date(2017, 5, 1) });
|
|
91
|
+
component.setProps({ selectedDate: new Date(2017, 5, 1) });
|
|
92
92
|
expect(getTableLinkAt(5).prop('autofocus')).toBe(false);
|
|
93
93
|
});
|
|
94
94
|
|
|
@@ -107,8 +107,8 @@ describe('MonthCalendarTable', () => {
|
|
|
107
107
|
selectedDate: null,
|
|
108
108
|
viewYear: 2022,
|
|
109
109
|
min: new Date(2022, 1, 28),
|
|
110
|
-
viewMonth: 0,
|
|
111
|
-
isDisabled: (month) => month === 0,
|
|
110
|
+
viewMonth: 0,
|
|
111
|
+
isDisabled: (month) => month === 0,
|
|
112
112
|
});
|
|
113
113
|
|
|
114
114
|
expect(getTableLinkAt(0).prop('autofocus')).toBe(false);
|