@transferwise/components 0.0.0-experimental-8d248e3 → 0.0.0-experimental-0b6896b
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/index.esm.js +4 -0
- package/build/index.esm.js.map +1 -1
- package/build/index.js +4 -0
- package/build/index.js.map +1 -1
- package/build/types/select/Select.d.ts.map +1 -1
- package/build/types/select/searchBox/SearchBox.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/dateInput/DateInput.story.tsx +0 -3
- package/src/moneyInput/MoneyInput.story.tsx +0 -3
- package/src/phoneNumberInput/PhoneNumberInput.story.js +0 -3
- package/src/select/Select.js +2 -0
- package/src/select/Select.story.js +0 -6
- package/src/select/searchBox/SearchBox.spec.js +3 -7
- package/src/select/searchBox/SearchBox.tsx +2 -0
- package/src/select/searchBox/__snapshots__/SearchBox.spec.js.snap +0 -46
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../../../src/select/Select.js"],"names":[],"mappings":"AA8EA;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../../../src/select/Select.js"],"names":[],"mappings":"AA8EA;;;;;;;;;;;;;;;;;;;;;;gCAmeC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SearchBox.d.ts","sourceRoot":"","sources":["../../../../src/select/searchBox/SearchBox.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAc,mBAAmB,EAAE,MAAM,OAAO,CAAC;AAUxD,QAAA,MAAM,SAAS;;;;
|
|
1
|
+
{"version":3,"file":"SearchBox.d.ts","sourceRoot":"","sources":["../../../../src/select/searchBox/SearchBox.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAc,mBAAmB,EAAE,MAAM,OAAO,CAAC;AAUxD,QAAA,MAAM,SAAS;;;;oJA0Cd,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
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-0b6896b",
|
|
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.6.1",
|
|
82
|
+
"@wise/components-theming": "0.8.4"
|
|
83
83
|
},
|
|
84
84
|
"peerDependencies": {
|
|
85
85
|
"@transferwise/icons": "^3.7.0",
|
package/src/select/Select.js
CHANGED
|
@@ -333,6 +333,8 @@ export default function Select({
|
|
|
333
333
|
ref={optionsListReference}
|
|
334
334
|
id={listboxId}
|
|
335
335
|
role="listbox"
|
|
336
|
+
aria-orientation="vertical"
|
|
337
|
+
aria-activedescendant={getUniqueIdForOption(id, selected)}
|
|
336
338
|
tabIndex="-1"
|
|
337
339
|
className={dropdownClass}
|
|
338
340
|
{...dropdownProps}
|
|
@@ -41,12 +41,6 @@ export const Basic = () => {
|
|
|
41
41
|
return (
|
|
42
42
|
<Select
|
|
43
43
|
id={id}
|
|
44
|
-
buttonProps={{
|
|
45
|
-
'aria-label': 'Basic button',
|
|
46
|
-
}}
|
|
47
|
-
dropdownProps={{
|
|
48
|
-
'aria-label': 'Options for basic button',
|
|
49
|
-
}}
|
|
50
44
|
size={size}
|
|
51
45
|
classNames={`${hasError ? 'has-error' : ''}`}
|
|
52
46
|
placeholder={placeholder}
|
|
@@ -1,11 +1,7 @@
|
|
|
1
|
-
import '
|
|
2
|
-
|
|
3
|
-
import { render } from '../../test-utils';
|
|
1
|
+
import { render, screen } from '../../test-utils';
|
|
4
2
|
|
|
5
3
|
import SearchBox from '.';
|
|
6
4
|
|
|
7
|
-
jest.mock('react-transition-group/Transition', () => jest.fn('placeholder'));
|
|
8
|
-
|
|
9
5
|
describe('SearchBox', () => {
|
|
10
6
|
const props = {
|
|
11
7
|
classNames: {},
|
|
@@ -17,8 +13,8 @@ describe('SearchBox', () => {
|
|
|
17
13
|
};
|
|
18
14
|
|
|
19
15
|
it('renders', () => {
|
|
20
|
-
|
|
16
|
+
render(<SearchBox {...props} />);
|
|
21
17
|
|
|
22
|
-
expect(
|
|
18
|
+
expect(screen.getByRole('searchbox')).toBeInTheDocument();
|
|
23
19
|
});
|
|
24
20
|
});
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
-
|
|
3
|
-
exports[`SearchBox renders 1`] = `
|
|
4
|
-
<div>
|
|
5
|
-
<li
|
|
6
|
-
class="border-bottom"
|
|
7
|
-
>
|
|
8
|
-
<a
|
|
9
|
-
class="np-select-filter-link p-a-0"
|
|
10
|
-
>
|
|
11
|
-
<div
|
|
12
|
-
class="input-group"
|
|
13
|
-
>
|
|
14
|
-
<span
|
|
15
|
-
class="input-group-addon input-group-addon--search"
|
|
16
|
-
>
|
|
17
|
-
<span
|
|
18
|
-
aria-hidden="true"
|
|
19
|
-
class="tw-icon tw-icon-search tw-icon tw-icon-search"
|
|
20
|
-
data-testid="search-icon"
|
|
21
|
-
role="presentation"
|
|
22
|
-
>
|
|
23
|
-
<svg
|
|
24
|
-
fill="currentColor"
|
|
25
|
-
focusable="false"
|
|
26
|
-
height="24"
|
|
27
|
-
viewBox="0 0 24 24"
|
|
28
|
-
width="24"
|
|
29
|
-
>
|
|
30
|
-
<path
|
|
31
|
-
d="m20.786 19.543-4.029-4.029c1.072-1.328 1.672-3 1.672-4.8C18.429 6.471 14.957 3 10.714 3S3 6.471 3 10.714s3.471 7.715 7.714 7.715c1.8 0 3.472-.643 4.8-1.672l4.029 4.029 1.243-1.243Zm-10.029-2.829c-3.3 0-6-2.7-6-6s2.7-6 6-6 6 2.7 6 6-2.7 6-6 6Z"
|
|
32
|
-
/>
|
|
33
|
-
</svg>
|
|
34
|
-
</span>
|
|
35
|
-
</span>
|
|
36
|
-
<input
|
|
37
|
-
class="np-select-filter form-control np-form-control np-form-control--size-auto np-text-body-large np-input np-input--shape-rectangle"
|
|
38
|
-
placeholder="placeholder"
|
|
39
|
-
spellcheck="false"
|
|
40
|
-
value="value"
|
|
41
|
-
/>
|
|
42
|
-
</div>
|
|
43
|
-
</a>
|
|
44
|
-
</li>
|
|
45
|
-
</div>
|
|
46
|
-
`;
|