@transferwise/components 0.0.0-experimental-27bf250 → 0.0.0-experimental-bbf9517
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/listItem/ListItem.js +2 -2
- package/build/listItem/ListItem.js.map +1 -1
- package/build/listItem/ListItem.mjs +2 -2
- package/build/listItem/ListItem.mjs.map +1 -1
- package/build/listItem/Prompt/ListItemPrompt.js +5 -4
- package/build/listItem/Prompt/ListItemPrompt.js.map +1 -1
- package/build/listItem/Prompt/ListItemPrompt.mjs +6 -2
- package/build/listItem/Prompt/ListItemPrompt.mjs.map +1 -1
- package/build/main.css +4 -2
- package/build/styles/main.css +4 -2
- package/build/styles/prompt/InfoPrompt/InfoPrompt.css +4 -2
- package/build/types/listItem/ListItem.d.ts +1 -1
- package/build/types/listItem/Prompt/ListItemPrompt.d.ts +2 -3
- package/build/types/listItem/Prompt/ListItemPrompt.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/accordion/Accordion.test.js +0 -6
- package/src/accordion/AccordionItem/AccordionItem.test.js +0 -10
- package/src/actionButton/ActionButton.test.tsx +0 -4
- package/src/avatarWrapper/AvatarWrapper.test.tsx +0 -53
- package/src/checkbox/Checkbox.test.tsx +0 -5
- package/src/chevron/Chevron.test.tsx +0 -7
- package/src/chips/Chips.test.tsx +0 -8
- package/src/common/RadioButton/RadioButton.test.tsx +0 -18
- package/src/common/bottomSheet/BottomSheet.test.tsx +0 -9
- package/src/common/card/Card.test.tsx +0 -6
- package/src/common/closeButton/CloseButton.test.tsx +0 -4
- package/src/common/panel/Panel.test.tsx +0 -6
- package/src/flowNavigation/FlowNavigation.test.js +0 -10
- package/src/listItem/ListItem.tsx +2 -2
- package/src/listItem/Prompt/ListItemPrompt.story.tsx +71 -9
- package/src/listItem/Prompt/ListItemPrompt.test.tsx +31 -0
- package/src/listItem/Prompt/ListItemPrompt.tsx +8 -2
- package/src/logo/Logo.story.tsx +24 -5
- package/src/main.css +4 -2
- package/src/overlayHeader/OverlayHeader.test.tsx +0 -3
- package/src/popover/Popover.test.tsx +0 -25
- package/src/promoCard/PromoCard.test.tsx +0 -6
- package/src/promoCard/PromoCardGroup.test.tsx +0 -5
- package/src/prompt/InfoPrompt/InfoPrompt.css +4 -2
- package/src/prompt/InfoPrompt/InfoPrompt.less +5 -4
- package/src/prompt/InlinePrompt/InlinePrompt.story.tsx +13 -10
- package/src/prompt/InlinePrompt/InlinePrompt.test.tsx +13 -1
- package/src/tile/Tile.test.tsx +0 -10
- package/src/tooltip/Tooltip.test.tsx +0 -10
- package/src/accordion/AccordionItem/__snapshots__/AccordionItem.test.js.snap +0 -124
- package/src/accordion/__snapshots__/Accordion.test.js.snap +0 -3
- package/src/actionButton/__snapshots__/ActionButton.test.tsx.snap +0 -12
- package/src/avatarWrapper/__snapshots__/AvatarWrapper.test.tsx.snap +0 -156
- package/src/checkbox/__snapshots__/Checkbox.test.tsx.snap +0 -40
- package/src/chevron/__snapshots__/Chevron.test.tsx.snap +0 -24
- package/src/chips/__snapshots__/Chips.test.tsx.snap +0 -153
- package/src/common/RadioButton/__snapshots__/RadioButton.test.tsx.snap +0 -58
- package/src/common/bottomSheet/__snapshots__/BottomSheet.test.tsx.snap +0 -80
- package/src/common/card/__snapshots__/Card.test.tsx.snap +0 -10
- package/src/common/closeButton/__snapshots__/CloseButton.test.tsx.snap +0 -30
- package/src/common/flowHeader/FlowHeader.test.tsx +0 -22
- package/src/common/flowHeader/__snapshots__/FlowHeader.test.tsx.snap +0 -33
- package/src/common/panel/__snapshots__/Panel.test.tsx.snap +0 -3
- package/src/flowNavigation/__snapshots__/FlowNavigation.test.js.snap +0 -262
- package/src/logo/Logo.test.tsx +0 -55
- package/src/logo/__snapshots__/Logo.test.tsx.snap +0 -281
- package/src/overlayHeader/__snapshots__/OverlayHeader.test.tsx.snap +0 -65
- package/src/popover/__snapshots__/Popover.test.tsx.snap +0 -51
- package/src/promoCard/__snapshots__/PromoCard.test.tsx.snap +0 -40
- package/src/promoCard/__snapshots__/PromoCardGroup.test.tsx.snap +0 -80
- package/src/tile/__snapshots__/Tile.test.tsx.snap +0 -55
- package/src/tooltip/__snapshots__/Tooltip.test.tsx.snap +0 -32
|
@@ -225,24 +225,27 @@ export const Muted: StoryObj<PreviewStoryArgs> = {
|
|
|
225
225
|
* While all main sentiments (`warning`, `negative`, `positive` and`neutral`) are associated with a
|
|
226
226
|
* default `StatusIcon`s, we also allow for Icon overrides to bring the prompt's visual language
|
|
227
227
|
* closer to the prompt's content. <br /><br />
|
|
228
|
-
* It's also possible to override the default
|
|
229
|
-
* via `mediaLabel` prop, which is especially useful for the `proposition` sentiment.
|
|
228
|
+
* It's also possible to override the default StatusIcon's accessible name announced by screen
|
|
229
|
+
* readers via `mediaLabel` prop, which is especially useful for the `proposition` sentiment.
|
|
230
|
+
* <br /><br />
|
|
231
|
+
* **NB**: If you're setting a label on a custom Icon, the accessible name should be provided via
|
|
232
|
+
* Icon's `title` prop instead.
|
|
230
233
|
*/
|
|
231
234
|
export const IconOverrides: StoryObj<PreviewStoryArgs> = {
|
|
232
235
|
render: (args: PreviewStoryArgs) => {
|
|
233
236
|
return (
|
|
234
237
|
<>
|
|
235
|
-
<InlinePrompt {...args}
|
|
236
|
-
|
|
237
|
-
</InlinePrompt>
|
|
238
|
-
<InlinePrompt {...args} media={<Taxi />} sentiment="proposition" mediaLabel="Taxi addon: ">
|
|
239
|
-
Connect Wise with your taxi app to get exclusive discounts.
|
|
238
|
+
<InlinePrompt {...args} sentiment="negative" mediaLabel="Rejected: ">
|
|
239
|
+
This prompt uses default Icon, but with a custom label for screen readers.
|
|
240
240
|
</InlinePrompt>
|
|
241
|
-
<InlinePrompt {...args} media={<Clock />} sentiment="warning"
|
|
241
|
+
<InlinePrompt {...args} media={<Clock title="Processing: " />} sentiment="warning">
|
|
242
242
|
The account verification is taking longer than usual.
|
|
243
243
|
</InlinePrompt>
|
|
244
|
-
<InlinePrompt {...args} media={<
|
|
245
|
-
|
|
244
|
+
<InlinePrompt {...args} media={<Travel title="Activated: " />} sentiment="positive">
|
|
245
|
+
Your travel account is set up and ready to use.
|
|
246
|
+
</InlinePrompt>
|
|
247
|
+
<InlinePrompt {...args} media={<Taxi title="Taxi addon: " />} sentiment="proposition">
|
|
248
|
+
Connect Wise with your taxi app to get exclusive discounts.
|
|
246
249
|
</InlinePrompt>
|
|
247
250
|
</>
|
|
248
251
|
);
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Clock } from '@transferwise/icons';
|
|
1
2
|
import { mockMatchMedia, render, screen } from '../../test-utils';
|
|
2
3
|
import { InlinePrompt, InlinePromptProps } from './InlinePrompt';
|
|
3
4
|
import { Sentiment } from '../../common';
|
|
@@ -91,11 +92,22 @@ describe('InlinePrompt', () => {
|
|
|
91
92
|
});
|
|
92
93
|
}
|
|
93
94
|
|
|
94
|
-
it('should allow for customisation of aria label', () => {
|
|
95
|
+
it('should allow for customisation of aria label for StatusIcon', () => {
|
|
95
96
|
render(<InlinePrompt {...defaultProps} sentiment={sentiment} mediaLabel={mediaLabel} />);
|
|
96
97
|
expect(screen.getByLabelText(mediaLabel)).toBeInTheDocument();
|
|
97
98
|
});
|
|
98
99
|
|
|
100
|
+
it('should allow for customisation of aria label for a custom Icon', () => {
|
|
101
|
+
render(
|
|
102
|
+
<InlinePrompt
|
|
103
|
+
{...defaultProps}
|
|
104
|
+
sentiment={sentiment}
|
|
105
|
+
media={<Clock title={mediaLabel} />}
|
|
106
|
+
/>,
|
|
107
|
+
);
|
|
108
|
+
expect(screen.getByLabelText(mediaLabel)).toBeInTheDocument();
|
|
109
|
+
});
|
|
110
|
+
|
|
99
111
|
it('should retain custom label while muted', () => {
|
|
100
112
|
render(
|
|
101
113
|
<InlinePrompt {...defaultProps} sentiment={sentiment} mediaLabel={mediaLabel} muted />,
|
package/src/tile/Tile.test.tsx
CHANGED
|
@@ -17,16 +17,6 @@ describe(Tile, () => {
|
|
|
17
17
|
jest.clearAllMocks();
|
|
18
18
|
});
|
|
19
19
|
|
|
20
|
-
it('matches snapshot when regular size', () => {
|
|
21
|
-
const { asFragment } = render(<Tile {...defaultProps} />);
|
|
22
|
-
expect(asFragment()).toMatchSnapshot();
|
|
23
|
-
});
|
|
24
|
-
|
|
25
|
-
it('matches snapshot when small size', () => {
|
|
26
|
-
const { asFragment } = render(<Tile size={Size.SMALL} {...defaultProps} />);
|
|
27
|
-
expect(asFragment()).toMatchSnapshot();
|
|
28
|
-
});
|
|
29
|
-
|
|
30
20
|
it('calls onClick when anchor is clicked', () => {
|
|
31
21
|
render(<Tile {...defaultProps} />);
|
|
32
22
|
|
|
@@ -4,16 +4,6 @@ import { userEvent } from '@testing-library/user-event';
|
|
|
4
4
|
import Tooltip from '.';
|
|
5
5
|
|
|
6
6
|
describe('Tooltip Component', () => {
|
|
7
|
-
it('renders an empty list when no items are passed', () => {
|
|
8
|
-
expect(
|
|
9
|
-
render(
|
|
10
|
-
<Tooltip label="Test Tooltip">
|
|
11
|
-
<span>Hover me</span>
|
|
12
|
-
</Tooltip>,
|
|
13
|
-
).container,
|
|
14
|
-
).toMatchSnapshot();
|
|
15
|
-
});
|
|
16
|
-
|
|
17
7
|
it('initially is hidden (test with toBeInTheDocument)', () => {
|
|
18
8
|
render(
|
|
19
9
|
<Tooltip label="Test Tooltip">
|
|
@@ -1,124 +0,0 @@
|
|
|
1
|
-
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
|
|
2
|
-
|
|
3
|
-
exports[`AccordionItem open / close renders an item closed 1`] = `
|
|
4
|
-
<div>
|
|
5
|
-
<div
|
|
6
|
-
class="np-accordion-item"
|
|
7
|
-
id="test-accordion"
|
|
8
|
-
>
|
|
9
|
-
<button
|
|
10
|
-
aria-controls="test-accordion-section"
|
|
11
|
-
aria-expanded="false"
|
|
12
|
-
class="np-option decision"
|
|
13
|
-
id="test-accordion-control"
|
|
14
|
-
>
|
|
15
|
-
<div
|
|
16
|
-
class="media"
|
|
17
|
-
>
|
|
18
|
-
<div
|
|
19
|
-
class="media-body"
|
|
20
|
-
>
|
|
21
|
-
<div
|
|
22
|
-
aria-level="4"
|
|
23
|
-
class="np-text-body-large-bold text-primary np-option__title"
|
|
24
|
-
role="heading"
|
|
25
|
-
>
|
|
26
|
-
This is title number one
|
|
27
|
-
</div>
|
|
28
|
-
</div>
|
|
29
|
-
<div
|
|
30
|
-
class="media-right"
|
|
31
|
-
>
|
|
32
|
-
<span
|
|
33
|
-
class="tw-icon tw-icon-chevron-up tw-chevron chevron-color bottom"
|
|
34
|
-
data-testid="chevron-up-icon"
|
|
35
|
-
>
|
|
36
|
-
<svg
|
|
37
|
-
aria-hidden="true"
|
|
38
|
-
fill="currentColor"
|
|
39
|
-
focusable="false"
|
|
40
|
-
height="24"
|
|
41
|
-
role="none"
|
|
42
|
-
viewBox="0 0 24 24"
|
|
43
|
-
width="24"
|
|
44
|
-
>
|
|
45
|
-
<path
|
|
46
|
-
clip-rule="evenodd"
|
|
47
|
-
d="m12 9.414 7.293 7.293 1.414-1.414L12.714 7.3a1.01 1.01 0 0 0-1.428 0l-7.993 7.993 1.414 1.414z"
|
|
48
|
-
fill-rule="evenodd"
|
|
49
|
-
/>
|
|
50
|
-
</svg>
|
|
51
|
-
</span>
|
|
52
|
-
</div>
|
|
53
|
-
</div>
|
|
54
|
-
</button>
|
|
55
|
-
</div>
|
|
56
|
-
</div>
|
|
57
|
-
`;
|
|
58
|
-
|
|
59
|
-
exports[`AccordionItem open / close renders an item open 1`] = `
|
|
60
|
-
<div>
|
|
61
|
-
<div
|
|
62
|
-
class="np-accordion-item np-accordion-item--open"
|
|
63
|
-
id="test-accordion"
|
|
64
|
-
>
|
|
65
|
-
<button
|
|
66
|
-
aria-controls="test-accordion-section"
|
|
67
|
-
aria-expanded="true"
|
|
68
|
-
class="np-option decision"
|
|
69
|
-
id="test-accordion-control"
|
|
70
|
-
>
|
|
71
|
-
<div
|
|
72
|
-
class="media"
|
|
73
|
-
>
|
|
74
|
-
<div
|
|
75
|
-
class="media-body"
|
|
76
|
-
>
|
|
77
|
-
<div
|
|
78
|
-
aria-level="4"
|
|
79
|
-
class="np-text-body-large-bold text-primary np-option__title"
|
|
80
|
-
role="heading"
|
|
81
|
-
>
|
|
82
|
-
This is title number one
|
|
83
|
-
</div>
|
|
84
|
-
</div>
|
|
85
|
-
<div
|
|
86
|
-
class="media-right"
|
|
87
|
-
>
|
|
88
|
-
<span
|
|
89
|
-
class="tw-icon tw-icon-chevron-up tw-chevron chevron-color top"
|
|
90
|
-
data-testid="chevron-up-icon"
|
|
91
|
-
>
|
|
92
|
-
<svg
|
|
93
|
-
aria-hidden="true"
|
|
94
|
-
fill="currentColor"
|
|
95
|
-
focusable="false"
|
|
96
|
-
height="24"
|
|
97
|
-
role="none"
|
|
98
|
-
viewBox="0 0 24 24"
|
|
99
|
-
width="24"
|
|
100
|
-
>
|
|
101
|
-
<path
|
|
102
|
-
clip-rule="evenodd"
|
|
103
|
-
d="m12 9.414 7.293 7.293 1.414-1.414L12.714 7.3a1.01 1.01 0 0 0-1.428 0l-7.993 7.993 1.414 1.414z"
|
|
104
|
-
fill-rule="evenodd"
|
|
105
|
-
/>
|
|
106
|
-
</svg>
|
|
107
|
-
</span>
|
|
108
|
-
</div>
|
|
109
|
-
</div>
|
|
110
|
-
</button>
|
|
111
|
-
<div
|
|
112
|
-
aria-labelledby="test-accordion-control"
|
|
113
|
-
id="test-accordion-section"
|
|
114
|
-
role="region"
|
|
115
|
-
>
|
|
116
|
-
<span
|
|
117
|
-
class="np-text-body-large np-accordion-item__content d-block"
|
|
118
|
-
>
|
|
119
|
-
Lauri Ipsum has been the industry standard dummy text ever since the 1500s.
|
|
120
|
-
</span>
|
|
121
|
-
</div>
|
|
122
|
-
</div>
|
|
123
|
-
</div>
|
|
124
|
-
`;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
|
|
2
|
-
|
|
3
|
-
exports[`ActionButton by default renders the button 1`] = `
|
|
4
|
-
<div>
|
|
5
|
-
<button
|
|
6
|
-
class="np-action-btn np-text-body-default-bold btn-priority-1"
|
|
7
|
-
type="button"
|
|
8
|
-
>
|
|
9
|
-
Personal profile
|
|
10
|
-
</button>
|
|
11
|
-
</div>
|
|
12
|
-
`;
|
|
@@ -1,156 +0,0 @@
|
|
|
1
|
-
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
|
|
2
|
-
|
|
3
|
-
exports[`FlowNavigationAvatar with a name AND profileType FlowNavigationAvatar with a name AND profileType AND avatar url renders the image 1`] = `
|
|
4
|
-
<div
|
|
5
|
-
class="tw-avatar tw-avatar--48 tw-avatar--thumbnail"
|
|
6
|
-
>
|
|
7
|
-
<div
|
|
8
|
-
class="tw-avatar__content"
|
|
9
|
-
>
|
|
10
|
-
<img
|
|
11
|
-
alt=""
|
|
12
|
-
src="https://wise.com"
|
|
13
|
-
/>
|
|
14
|
-
</div>
|
|
15
|
-
</div>
|
|
16
|
-
`;
|
|
17
|
-
|
|
18
|
-
exports[`FlowNavigationAvatar with a name AND profileType FlowNavigationAvatar with a name AND profileType renders as BUSINESS profile type with an icon 1`] = `
|
|
19
|
-
<div
|
|
20
|
-
class="tw-avatar tw-avatar--48 tw-avatar--icon"
|
|
21
|
-
>
|
|
22
|
-
<div
|
|
23
|
-
class="tw-avatar__content"
|
|
24
|
-
>
|
|
25
|
-
<span
|
|
26
|
-
class="tw-icon tw-icon-briefcase "
|
|
27
|
-
data-testid="briefcase-icon"
|
|
28
|
-
>
|
|
29
|
-
<svg
|
|
30
|
-
aria-hidden="true"
|
|
31
|
-
fill="currentColor"
|
|
32
|
-
focusable="false"
|
|
33
|
-
height="24"
|
|
34
|
-
role="none"
|
|
35
|
-
viewBox="0 0 24 24"
|
|
36
|
-
width="24"
|
|
37
|
-
>
|
|
38
|
-
<path
|
|
39
|
-
clip-rule="evenodd"
|
|
40
|
-
d="M9.01 3A1.01 1.01 0 0 0 8 4.01V7H5a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-3V4.01A1.01 1.01 0 0 0 14.99 3zM14 7V5h-4v2zm-4 2h4v9h-4zM8 9H5v9h3zm8 9V9h3v9z"
|
|
41
|
-
fill-rule="evenodd"
|
|
42
|
-
/>
|
|
43
|
-
</svg>
|
|
44
|
-
</span>
|
|
45
|
-
</div>
|
|
46
|
-
</div>
|
|
47
|
-
`;
|
|
48
|
-
|
|
49
|
-
exports[`FlowNavigationAvatar with a name AND profileType FlowNavigationAvatar with a name AND profileType renders as PERSONAL profile type with an icon 1`] = `
|
|
50
|
-
<div
|
|
51
|
-
class="tw-avatar tw-avatar--48 tw-avatar--icon"
|
|
52
|
-
>
|
|
53
|
-
<div
|
|
54
|
-
class="tw-avatar__content"
|
|
55
|
-
>
|
|
56
|
-
<span
|
|
57
|
-
class="tw-icon tw-icon-person "
|
|
58
|
-
data-testid="person-icon"
|
|
59
|
-
>
|
|
60
|
-
<svg
|
|
61
|
-
aria-hidden="true"
|
|
62
|
-
fill="currentColor"
|
|
63
|
-
focusable="false"
|
|
64
|
-
height="24"
|
|
65
|
-
role="none"
|
|
66
|
-
viewBox="0 0 24 24"
|
|
67
|
-
width="24"
|
|
68
|
-
>
|
|
69
|
-
<path
|
|
70
|
-
clip-rule="evenodd"
|
|
71
|
-
d="M8 8a4 4 0 1 1 8 0 4 4 0 0 1-8 0m7.557 4.832a6 6 0 1 0-7.114 0A8 8 0 0 0 4 20v2h2v-2a6 6 0 0 1 12 0v2h2v-2a8 8 0 0 0-4.443-7.168"
|
|
72
|
-
fill-rule="evenodd"
|
|
73
|
-
/>
|
|
74
|
-
</svg>
|
|
75
|
-
</span>
|
|
76
|
-
</div>
|
|
77
|
-
</div>
|
|
78
|
-
`;
|
|
79
|
-
|
|
80
|
-
exports[`FlowNavigationAvatar with a name AND profileType with a badge url passed renders the badge 1`] = `
|
|
81
|
-
<div
|
|
82
|
-
class="tw-badge tw-badge-border-light tw-badge-lg"
|
|
83
|
-
>
|
|
84
|
-
<div
|
|
85
|
-
class="tw-badge__children"
|
|
86
|
-
>
|
|
87
|
-
<div
|
|
88
|
-
class="tw-avatar tw-avatar--48 tw-avatar--icon"
|
|
89
|
-
>
|
|
90
|
-
<div
|
|
91
|
-
class="tw-avatar__content"
|
|
92
|
-
>
|
|
93
|
-
<span
|
|
94
|
-
class="tw-icon tw-icon-person "
|
|
95
|
-
data-testid="person-icon"
|
|
96
|
-
>
|
|
97
|
-
<svg
|
|
98
|
-
aria-hidden="true"
|
|
99
|
-
fill="currentColor"
|
|
100
|
-
focusable="false"
|
|
101
|
-
height="24"
|
|
102
|
-
role="none"
|
|
103
|
-
viewBox="0 0 24 24"
|
|
104
|
-
width="24"
|
|
105
|
-
>
|
|
106
|
-
<path
|
|
107
|
-
clip-rule="evenodd"
|
|
108
|
-
d="M8 8a4 4 0 1 1 8 0 4 4 0 0 1-8 0m7.557 4.832a6 6 0 1 0-7.114 0A8 8 0 0 0 4 20v2h2v-2a6 6 0 0 1 12 0v2h2v-2a8 8 0 0 0-4.443-7.168"
|
|
109
|
-
fill-rule="evenodd"
|
|
110
|
-
/>
|
|
111
|
-
</svg>
|
|
112
|
-
</span>
|
|
113
|
-
</div>
|
|
114
|
-
</div>
|
|
115
|
-
</div>
|
|
116
|
-
<div
|
|
117
|
-
class="tw-badge__content"
|
|
118
|
-
>
|
|
119
|
-
<img
|
|
120
|
-
alt="badge alt text"
|
|
121
|
-
src="https://badge.com"
|
|
122
|
-
/>
|
|
123
|
-
</div>
|
|
124
|
-
</div>
|
|
125
|
-
`;
|
|
126
|
-
|
|
127
|
-
exports[`FlowNavigationAvatar with a name AND profileType with nothing passed renders a personal icon 1`] = `
|
|
128
|
-
<div
|
|
129
|
-
class="tw-avatar tw-avatar--48 tw-avatar--icon"
|
|
130
|
-
>
|
|
131
|
-
<div
|
|
132
|
-
class="tw-avatar__content"
|
|
133
|
-
>
|
|
134
|
-
<span
|
|
135
|
-
class="tw-icon tw-icon-person "
|
|
136
|
-
data-testid="person-icon"
|
|
137
|
-
>
|
|
138
|
-
<svg
|
|
139
|
-
aria-hidden="true"
|
|
140
|
-
fill="currentColor"
|
|
141
|
-
focusable="false"
|
|
142
|
-
height="24"
|
|
143
|
-
role="none"
|
|
144
|
-
viewBox="0 0 24 24"
|
|
145
|
-
width="24"
|
|
146
|
-
>
|
|
147
|
-
<path
|
|
148
|
-
clip-rule="evenodd"
|
|
149
|
-
d="M8 8a4 4 0 1 1 8 0 4 4 0 0 1-8 0m7.557 4.832a6 6 0 1 0-7.114 0A8 8 0 0 0 4 20v2h2v-2a6 6 0 0 1 12 0v2h2v-2a8 8 0 0 0-4.443-7.168"
|
|
150
|
-
fill-rule="evenodd"
|
|
151
|
-
/>
|
|
152
|
-
</svg>
|
|
153
|
-
</span>
|
|
154
|
-
</div>
|
|
155
|
-
</div>
|
|
156
|
-
`;
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
|
|
2
|
-
|
|
3
|
-
exports[`Checkbox renders the given label 1`] = `
|
|
4
|
-
<div>
|
|
5
|
-
<div
|
|
6
|
-
class="np-checkbox checkbox"
|
|
7
|
-
>
|
|
8
|
-
<label
|
|
9
|
-
class="np-checkbox-label"
|
|
10
|
-
>
|
|
11
|
-
<span
|
|
12
|
-
class="np-checkbox-button p-r-2"
|
|
13
|
-
>
|
|
14
|
-
<input
|
|
15
|
-
type="checkbox"
|
|
16
|
-
/>
|
|
17
|
-
<span
|
|
18
|
-
class="tw-checkbox-button"
|
|
19
|
-
>
|
|
20
|
-
<span
|
|
21
|
-
class="tw-checkbox-check"
|
|
22
|
-
/>
|
|
23
|
-
<span
|
|
24
|
-
class="np-tw-checkbox-indeterminate"
|
|
25
|
-
/>
|
|
26
|
-
</span>
|
|
27
|
-
</span>
|
|
28
|
-
<span
|
|
29
|
-
class="np-text-body-large np-checkbox__text"
|
|
30
|
-
>
|
|
31
|
-
<span>
|
|
32
|
-
<b>
|
|
33
|
-
hello
|
|
34
|
-
</b>
|
|
35
|
-
</span>
|
|
36
|
-
</span>
|
|
37
|
-
</label>
|
|
38
|
-
</div>
|
|
39
|
-
</div>
|
|
40
|
-
`;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
|
|
2
|
-
|
|
3
|
-
exports[`Chevron custom xs icon renders 1`] = `
|
|
4
|
-
<div>
|
|
5
|
-
<span
|
|
6
|
-
aria-hidden="true"
|
|
7
|
-
class="tw-icon tw-icon-chevron tw-chevron chevron-color bottom"
|
|
8
|
-
role="presentation"
|
|
9
|
-
>
|
|
10
|
-
<svg
|
|
11
|
-
fill="currentColor"
|
|
12
|
-
focusable="false"
|
|
13
|
-
height="10"
|
|
14
|
-
viewBox="0 0 10 10"
|
|
15
|
-
width="10"
|
|
16
|
-
>
|
|
17
|
-
<path
|
|
18
|
-
d="M4.9995 2.0865L0.0635004 6.7645L1.2745 7.9125L4.9995 4.3835L8.7245 7.9135L9.9355 6.7645L4.9995 2.0865Z"
|
|
19
|
-
fill-rule="evenodd"
|
|
20
|
-
/>
|
|
21
|
-
</svg>
|
|
22
|
-
</span>
|
|
23
|
-
</div>
|
|
24
|
-
`;
|
|
@@ -1,153 +0,0 @@
|
|
|
1
|
-
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
|
|
2
|
-
|
|
3
|
-
exports[`Chips Choice Chips renders as expected 1`] = `
|
|
4
|
-
<div>
|
|
5
|
-
<div
|
|
6
|
-
aria-label="Please select a category"
|
|
7
|
-
class="np-chips d-flex"
|
|
8
|
-
role="radiogroup"
|
|
9
|
-
>
|
|
10
|
-
<div
|
|
11
|
-
aria-checked="false"
|
|
12
|
-
class="np-chip d-flex align-items-center justify-content-between text-xs-nowrap"
|
|
13
|
-
role="radio"
|
|
14
|
-
tabindex="0"
|
|
15
|
-
>
|
|
16
|
-
<div
|
|
17
|
-
aria-hidden="false"
|
|
18
|
-
class="np-text-body-default-bold"
|
|
19
|
-
>
|
|
20
|
-
Accounting
|
|
21
|
-
</div>
|
|
22
|
-
</div>
|
|
23
|
-
<div
|
|
24
|
-
aria-checked="true"
|
|
25
|
-
class="np-chip d-flex align-items-center justify-content-between text-xs-nowrap np-chip--selected"
|
|
26
|
-
role="radio"
|
|
27
|
-
tabindex="0"
|
|
28
|
-
>
|
|
29
|
-
<div
|
|
30
|
-
aria-hidden="false"
|
|
31
|
-
class="np-text-body-default-bold"
|
|
32
|
-
>
|
|
33
|
-
Payroll
|
|
34
|
-
</div>
|
|
35
|
-
</div>
|
|
36
|
-
<div
|
|
37
|
-
aria-checked="false"
|
|
38
|
-
class="np-chip d-flex align-items-center justify-content-between text-xs-nowrap"
|
|
39
|
-
role="radio"
|
|
40
|
-
tabindex="0"
|
|
41
|
-
>
|
|
42
|
-
<div
|
|
43
|
-
aria-hidden="false"
|
|
44
|
-
class="np-text-body-default-bold"
|
|
45
|
-
>
|
|
46
|
-
Reporting
|
|
47
|
-
</div>
|
|
48
|
-
</div>
|
|
49
|
-
<div
|
|
50
|
-
aria-checked="false"
|
|
51
|
-
class="np-chip d-flex align-items-center justify-content-between text-xs-nowrap"
|
|
52
|
-
role="radio"
|
|
53
|
-
tabindex="0"
|
|
54
|
-
>
|
|
55
|
-
<div
|
|
56
|
-
aria-hidden="false"
|
|
57
|
-
class="np-text-body-default-bold"
|
|
58
|
-
>
|
|
59
|
-
Payments
|
|
60
|
-
</div>
|
|
61
|
-
</div>
|
|
62
|
-
</div>
|
|
63
|
-
</div>
|
|
64
|
-
`;
|
|
65
|
-
|
|
66
|
-
exports[`Chips Filter Chips renders as expected 1`] = `
|
|
67
|
-
<div>
|
|
68
|
-
<div
|
|
69
|
-
aria-label="Filter by categories"
|
|
70
|
-
class="np-chips d-flex"
|
|
71
|
-
role="group"
|
|
72
|
-
>
|
|
73
|
-
<div
|
|
74
|
-
aria-checked="false"
|
|
75
|
-
class="np-chip d-flex align-items-center justify-content-between text-xs-nowrap"
|
|
76
|
-
role="checkbox"
|
|
77
|
-
tabindex="0"
|
|
78
|
-
>
|
|
79
|
-
<div
|
|
80
|
-
aria-hidden="false"
|
|
81
|
-
class="np-text-body-default-bold"
|
|
82
|
-
>
|
|
83
|
-
Accounting
|
|
84
|
-
</div>
|
|
85
|
-
</div>
|
|
86
|
-
<div
|
|
87
|
-
aria-checked="false"
|
|
88
|
-
class="np-chip d-flex align-items-center justify-content-between text-xs-nowrap"
|
|
89
|
-
role="checkbox"
|
|
90
|
-
tabindex="0"
|
|
91
|
-
>
|
|
92
|
-
<div
|
|
93
|
-
aria-hidden="false"
|
|
94
|
-
class="np-text-body-default-bold"
|
|
95
|
-
>
|
|
96
|
-
Payroll
|
|
97
|
-
</div>
|
|
98
|
-
</div>
|
|
99
|
-
<div
|
|
100
|
-
aria-checked="false"
|
|
101
|
-
class="np-chip d-flex align-items-center justify-content-between text-xs-nowrap"
|
|
102
|
-
role="checkbox"
|
|
103
|
-
tabindex="0"
|
|
104
|
-
>
|
|
105
|
-
<div
|
|
106
|
-
aria-hidden="false"
|
|
107
|
-
class="np-text-body-default-bold"
|
|
108
|
-
>
|
|
109
|
-
Reporting
|
|
110
|
-
</div>
|
|
111
|
-
</div>
|
|
112
|
-
<div
|
|
113
|
-
aria-checked="true"
|
|
114
|
-
class="np-chip d-flex align-items-center justify-content-between np-chip--removable text-xs-nowrap np-chip--selected p-r-1"
|
|
115
|
-
role="checkbox"
|
|
116
|
-
tabindex="-1"
|
|
117
|
-
>
|
|
118
|
-
<div
|
|
119
|
-
aria-hidden="true"
|
|
120
|
-
class="np-text-body-default-bold"
|
|
121
|
-
>
|
|
122
|
-
Payments
|
|
123
|
-
</div>
|
|
124
|
-
<button
|
|
125
|
-
aria-label="Clear Payments"
|
|
126
|
-
class="np-close-button close btn-link text-no-decoration btn-unstyled"
|
|
127
|
-
type="button"
|
|
128
|
-
>
|
|
129
|
-
<span
|
|
130
|
-
class="tw-icon tw-icon-cross-circle-fill "
|
|
131
|
-
data-testid="cross-circle-fill-icon"
|
|
132
|
-
>
|
|
133
|
-
<svg
|
|
134
|
-
aria-hidden="true"
|
|
135
|
-
fill="currentColor"
|
|
136
|
-
focusable="false"
|
|
137
|
-
height="16"
|
|
138
|
-
role="none"
|
|
139
|
-
viewBox="0 0 24 24"
|
|
140
|
-
width="16"
|
|
141
|
-
>
|
|
142
|
-
<path
|
|
143
|
-
clip-rule="evenodd"
|
|
144
|
-
d="M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10m-4.707-6.707L10.586 12 7.293 8.707l1.414-1.414L12 10.586l3.293-3.293 1.414 1.414L13.414 12l3.293 3.293-1.414 1.414L12 13.414l-3.293 3.293z"
|
|
145
|
-
fill-rule="evenodd"
|
|
146
|
-
/>
|
|
147
|
-
</svg>
|
|
148
|
-
</span>
|
|
149
|
-
</button>
|
|
150
|
-
</div>
|
|
151
|
-
</div>
|
|
152
|
-
</div>
|
|
153
|
-
`;
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
|
|
2
|
-
|
|
3
|
-
exports[`Radio button renders checked state correctly 1`] = `
|
|
4
|
-
<div>
|
|
5
|
-
<input
|
|
6
|
-
checked=""
|
|
7
|
-
class="sr-only"
|
|
8
|
-
name="radio-name"
|
|
9
|
-
type="radio"
|
|
10
|
-
value=""
|
|
11
|
-
/>
|
|
12
|
-
<span
|
|
13
|
-
class="tw-radio-button checked"
|
|
14
|
-
>
|
|
15
|
-
<span
|
|
16
|
-
class="tw-radio-check"
|
|
17
|
-
/>
|
|
18
|
-
</span>
|
|
19
|
-
</div>
|
|
20
|
-
`;
|
|
21
|
-
|
|
22
|
-
exports[`Radio button renders correctly 1`] = `
|
|
23
|
-
<div>
|
|
24
|
-
<input
|
|
25
|
-
class="sr-only"
|
|
26
|
-
id="an-id"
|
|
27
|
-
name="a-name"
|
|
28
|
-
type="radio"
|
|
29
|
-
value="a-value"
|
|
30
|
-
/>
|
|
31
|
-
<span
|
|
32
|
-
class="tw-radio-button"
|
|
33
|
-
>
|
|
34
|
-
<span
|
|
35
|
-
class="tw-radio-check"
|
|
36
|
-
/>
|
|
37
|
-
</span>
|
|
38
|
-
</div>
|
|
39
|
-
`;
|
|
40
|
-
|
|
41
|
-
exports[`Radio button renders disabled state correctly 1`] = `
|
|
42
|
-
<div>
|
|
43
|
-
<input
|
|
44
|
-
class="sr-only"
|
|
45
|
-
disabled=""
|
|
46
|
-
name="radio-name"
|
|
47
|
-
type="radio"
|
|
48
|
-
value=""
|
|
49
|
-
/>
|
|
50
|
-
<span
|
|
51
|
-
class="tw-radio-button disabled"
|
|
52
|
-
>
|
|
53
|
-
<span
|
|
54
|
-
class="tw-radio-check"
|
|
55
|
-
/>
|
|
56
|
-
</span>
|
|
57
|
-
</div>
|
|
58
|
-
`;
|