@transferwise/components 46.125.0 → 46.127.1
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/avatarView/AvatarView.js.map +1 -1
- package/build/avatarView/AvatarView.mjs.map +1 -1
- package/build/common/locale/index.js +13 -0
- package/build/common/locale/index.js.map +1 -1
- package/build/common/locale/index.mjs +13 -1
- package/build/common/locale/index.mjs.map +1 -1
- package/build/expressiveMoneyInput/currencySelector/CurrencySelector.js +31 -1
- package/build/expressiveMoneyInput/currencySelector/CurrencySelector.js.map +1 -1
- package/build/expressiveMoneyInput/currencySelector/CurrencySelector.mjs +32 -2
- package/build/expressiveMoneyInput/currencySelector/CurrencySelector.mjs.map +1 -1
- package/build/field/Field.js +1 -0
- package/build/field/Field.js.map +1 -1
- package/build/field/Field.mjs +1 -0
- package/build/field/Field.mjs.map +1 -1
- package/build/index.js +3 -0
- package/build/index.js.map +1 -1
- package/build/index.mjs +2 -1
- package/build/index.mjs.map +1 -1
- package/build/inputs/Input.js.map +1 -1
- package/build/inputs/Input.mjs.map +1 -1
- package/build/inputs/SearchInput.js.map +1 -1
- package/build/inputs/SearchInput.mjs.map +1 -1
- package/build/inputs/SelectInput.js.map +1 -1
- package/build/inputs/SelectInput.mjs.map +1 -1
- package/build/inputs/TextArea.js.map +1 -1
- package/build/inputs/TextArea.mjs.map +1 -1
- 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 +6 -4
- package/build/listItem/Prompt/ListItemPrompt.js.map +1 -1
- package/build/listItem/Prompt/ListItemPrompt.mjs +7 -2
- package/build/listItem/Prompt/ListItemPrompt.mjs.map +1 -1
- package/build/main.css +52 -21
- package/build/moneyInput/MoneyInput.js +6 -1
- package/build/moneyInput/MoneyInput.js.map +1 -1
- package/build/moneyInput/MoneyInput.mjs +6 -1
- package/build/moneyInput/MoneyInput.mjs.map +1 -1
- package/build/prompt/ActionPrompt/ActionPrompt.js +27 -4
- package/build/prompt/ActionPrompt/ActionPrompt.js.map +1 -1
- package/build/prompt/ActionPrompt/ActionPrompt.mjs +27 -4
- package/build/prompt/ActionPrompt/ActionPrompt.mjs.map +1 -1
- package/build/prompt/InfoPrompt/InfoPrompt.js +113 -0
- package/build/prompt/InfoPrompt/InfoPrompt.js.map +1 -0
- package/build/prompt/InfoPrompt/InfoPrompt.mjs +111 -0
- package/build/prompt/InfoPrompt/InfoPrompt.mjs.map +1 -0
- package/build/prompt/PrimitivePrompt/PrimitivePrompt.js.map +1 -1
- package/build/prompt/PrimitivePrompt/PrimitivePrompt.mjs.map +1 -1
- package/build/radioOption/RadioOption.js.map +1 -1
- package/build/radioOption/RadioOption.mjs.map +1 -1
- package/build/slidingPanel/SlidingPanel.js.map +1 -1
- package/build/slidingPanel/SlidingPanel.mjs.map +1 -1
- package/build/statusIcon/StatusIcon.js +2 -0
- package/build/statusIcon/StatusIcon.js.map +1 -1
- package/build/statusIcon/StatusIcon.mjs +2 -0
- package/build/statusIcon/StatusIcon.mjs.map +1 -1
- package/build/styles/main.css +52 -21
- package/build/styles/prompt/InfoPrompt/InfoPrompt.css +31 -0
- package/build/styles/sentimentSurface/SentimentSurface.css +21 -21
- package/build/table/TableCell.js.map +1 -1
- package/build/table/TableCell.mjs.map +1 -1
- package/build/typeahead/Typeahead.js +1 -0
- package/build/typeahead/Typeahead.js.map +1 -1
- package/build/typeahead/Typeahead.mjs +1 -0
- package/build/typeahead/Typeahead.mjs.map +1 -1
- package/build/types/avatarView/AvatarView.d.ts +1 -1
- package/build/types/avatarView/AvatarView.d.ts.map +1 -1
- package/build/types/common/locale/index.d.ts +8 -0
- package/build/types/common/locale/index.d.ts.map +1 -1
- package/build/types/expressiveMoneyInput/currencySelector/CurrencySelector.d.ts.map +1 -1
- package/build/types/index.d.ts +3 -2
- package/build/types/index.d.ts.map +1 -1
- package/build/types/inputs/Input.d.ts.map +1 -1
- package/build/types/inputs/SearchInput.d.ts.map +1 -1
- package/build/types/inputs/SelectInput.d.ts +1 -1
- package/build/types/inputs/SelectInput.d.ts.map +1 -1
- package/build/types/inputs/TextArea.d.ts.map +1 -1
- 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/build/types/moneyInput/MoneyInput.d.ts.map +1 -1
- package/build/types/primitives/PrimitiveAnchor/PrimitiveAnchor.types.d.ts.map +1 -1
- package/build/types/primitives/PrimitiveButton/PrimitiveButton.types.d.ts.map +1 -1
- package/build/types/prompt/ActionPrompt/ActionPrompt.d.ts +4 -2
- package/build/types/prompt/ActionPrompt/ActionPrompt.d.ts.map +1 -1
- package/build/types/prompt/InfoPrompt/InfoPrompt.d.ts +56 -0
- package/build/types/prompt/InfoPrompt/InfoPrompt.d.ts.map +1 -0
- package/build/types/prompt/InfoPrompt/index.d.ts +3 -0
- package/build/types/prompt/InfoPrompt/index.d.ts.map +1 -0
- package/build/types/prompt/PrimitivePrompt/PrimitivePrompt.d.ts +5 -5
- package/build/types/prompt/PrimitivePrompt/PrimitivePrompt.d.ts.map +1 -1
- package/build/types/prompt/index.d.ts +2 -0
- package/build/types/prompt/index.d.ts.map +1 -1
- package/build/types/radioOption/RadioOption.d.ts.map +1 -1
- package/build/types/slidingPanel/SlidingPanel.d.ts.map +1 -1
- package/build/types/statusIcon/StatusIcon.d.ts +2 -1
- package/build/types/statusIcon/StatusIcon.d.ts.map +1 -1
- package/build/types/table/TableCell.d.ts.map +1 -1
- package/build/types/withDisplayFormat/WithDisplayFormat.d.ts.map +1 -1
- package/build/withDisplayFormat/WithDisplayFormat.js.map +1 -1
- package/build/withDisplayFormat/WithDisplayFormat.mjs.map +1 -1
- package/package.json +3 -3
- 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/avatarLayout/AvatarLayout.story.tsx +3 -3
- package/src/avatarView/AvatarView.story.tsx +29 -24
- package/src/avatarView/AvatarView.tsx +1 -1
- 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.story.tsx +98 -0
- 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/locale/index.test.ts +36 -1
- package/src/common/locale/index.ts +13 -0
- package/src/common/panel/Panel.test.tsx +0 -6
- package/src/expressiveMoneyInput/currencySelector/CurrencySelector.tsx +5 -1
- package/src/flowNavigation/FlowNavigation.test.js +0 -10
- package/src/index.ts +3 -1
- package/src/inputs/Input.tsx +8 -9
- package/src/inputs/SearchInput.tsx +8 -9
- package/src/inputs/SelectInput.test.story.tsx +86 -0
- package/src/inputs/SelectInput.tsx +1 -1
- package/src/inputs/TextArea.tsx +6 -7
- 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 +52 -21
- package/src/main.less +2 -1
- package/src/moneyInput/MoneyInput.test.story.tsx +104 -0
- package/src/moneyInput/MoneyInput.tsx +20 -2
- package/src/overlayHeader/OverlayHeader.test.tsx +0 -3
- package/src/popover/Popover.test.tsx +0 -25
- package/src/primitives/PrimitiveAnchor/PrimitiveAnchor.types.ts +1 -3
- package/src/primitives/PrimitiveButton/PrimitiveButton.types.ts +1 -3
- package/src/promoCard/PromoCard.test.tsx +0 -6
- package/src/promoCard/PromoCardGroup.test.tsx +0 -5
- package/src/prompt/ActionPrompt/ActionPrompt.accessibility.docs.mdx +65 -0
- package/src/prompt/ActionPrompt/ActionPrompt.less +1 -1
- package/src/prompt/ActionPrompt/ActionPrompt.story.tsx +4 -1
- package/src/prompt/ActionPrompt/ActionPrompt.test.story.tsx +147 -0
- package/src/prompt/ActionPrompt/ActionPrompt.test.tsx +2 -7
- package/src/prompt/ActionPrompt/ActionPrompt.tsx +48 -7
- package/src/prompt/InfoPrompt/InfoPrompt.css +31 -0
- package/src/prompt/InfoPrompt/InfoPrompt.less +37 -0
- package/src/prompt/InfoPrompt/InfoPrompt.story.tsx +312 -0
- package/src/prompt/InfoPrompt/InfoPrompt.test.story.tsx +246 -0
- package/src/prompt/InfoPrompt/InfoPrompt.test.tsx +224 -0
- package/src/prompt/InfoPrompt/InfoPrompt.tsx +148 -0
- package/src/prompt/InfoPrompt/index.ts +2 -0
- package/src/prompt/InlinePrompt/InlinePrompt.story.tsx +13 -10
- package/src/prompt/InlinePrompt/InlinePrompt.test.tsx +13 -1
- package/src/prompt/PrimitivePrompt/PrimitivePrompt.less +1 -1
- package/src/prompt/PrimitivePrompt/PrimitivePrompt.tsx +5 -5
- package/src/prompt/index.ts +5 -0
- package/src/radioOption/RadioOption.tsx +2 -1
- package/src/sentimentSurface/SentimentSurface.css +21 -21
- package/src/sentimentSurface/SentimentSurface.less +13 -13
- package/src/sentimentSurface/SentimentSurface.story.tsx +1 -1
- package/src/sentimentSurface/SentimentSurface.test.story.tsx +48 -1
- package/src/slidingPanel/SlidingPanel.tsx +4 -2
- package/src/ssr.test.tsx +2 -0
- package/src/statusIcon/StatusIcon.tsx +8 -1
- package/src/table/TableCell.tsx +1 -3
- package/src/tile/Tile.test.tsx +0 -10
- package/src/tooltip/Tooltip.test.tsx +0 -10
- package/src/withDisplayFormat/WithDisplayFormat.tsx +13 -14
- 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
|
@@ -21,7 +21,7 @@ const screenModes: Theming['screenMode'][] = ['light', 'dark'];
|
|
|
21
21
|
|
|
22
22
|
export default {
|
|
23
23
|
component: SentimentSurface,
|
|
24
|
-
title: '
|
|
24
|
+
title: 'Content/SentimentSurface/Tests',
|
|
25
25
|
tags: ['!autodocs', '!manifest'],
|
|
26
26
|
} satisfies Meta<typeof SentimentSurface>;
|
|
27
27
|
|
|
@@ -124,3 +124,50 @@ export const ButtonsAcrossThemes: Story = {
|
|
|
124
124
|
</div>
|
|
125
125
|
),
|
|
126
126
|
};
|
|
127
|
+
|
|
128
|
+
export const NeutralSentimentOnNeutralBackground: Story = {
|
|
129
|
+
render: () => (
|
|
130
|
+
<div
|
|
131
|
+
style={{
|
|
132
|
+
display: 'flex',
|
|
133
|
+
flexDirection: 'column',
|
|
134
|
+
}}
|
|
135
|
+
>
|
|
136
|
+
<SentimentSurface
|
|
137
|
+
sentiment="neutral"
|
|
138
|
+
style={{
|
|
139
|
+
padding: '16px',
|
|
140
|
+
}}
|
|
141
|
+
>
|
|
142
|
+
<Button v2>Primary</Button>
|
|
143
|
+
<Button v2 priority="secondary" style={{ marginLeft: '8px' }}>
|
|
144
|
+
Secondary
|
|
145
|
+
</Button>
|
|
146
|
+
<Button v2 priority="secondary-neutral" style={{ marginLeft: '8px' }}>
|
|
147
|
+
Secondary Neutral
|
|
148
|
+
</Button>
|
|
149
|
+
<Button v2 priority="tertiary" style={{ marginLeft: '8px' }}>
|
|
150
|
+
Tertiary
|
|
151
|
+
</Button>
|
|
152
|
+
</SentimentSurface>
|
|
153
|
+
<SentimentSurface
|
|
154
|
+
sentiment="neutral"
|
|
155
|
+
emphasis="elevated"
|
|
156
|
+
style={{
|
|
157
|
+
padding: '16px',
|
|
158
|
+
}}
|
|
159
|
+
>
|
|
160
|
+
<Button v2>Primary</Button>
|
|
161
|
+
<Button v2 priority="secondary" style={{ marginLeft: '8px' }}>
|
|
162
|
+
Secondary
|
|
163
|
+
</Button>
|
|
164
|
+
<Button v2 priority="secondary-neutral" style={{ marginLeft: '8px' }}>
|
|
165
|
+
Secondary Neutral
|
|
166
|
+
</Button>
|
|
167
|
+
<Button v2 priority="tertiary" style={{ marginLeft: '8px' }}>
|
|
168
|
+
Tertiary
|
|
169
|
+
</Button>
|
|
170
|
+
</SentimentSurface>
|
|
171
|
+
</div>
|
|
172
|
+
),
|
|
173
|
+
};
|
|
@@ -6,8 +6,10 @@ import { Position } from '../common';
|
|
|
6
6
|
|
|
7
7
|
export const EXIT_ANIMATION = 350;
|
|
8
8
|
|
|
9
|
-
export interface SlidingPanelProps
|
|
10
|
-
|
|
9
|
+
export interface SlidingPanelProps extends Pick<
|
|
10
|
+
React.ComponentPropsWithRef<'div'>,
|
|
11
|
+
'ref' | 'className' | 'children'
|
|
12
|
+
> {
|
|
11
13
|
position?: `${Position.TOP | Position.RIGHT | Position.BOTTOM | Position.LEFT}`;
|
|
12
14
|
open: boolean;
|
|
13
15
|
showSlidingPanelBorder?: boolean;
|
package/src/ssr.test.tsx
CHANGED
|
@@ -73,6 +73,7 @@ const excluded = new Set<ExposedLibraryKeysType | string>([
|
|
|
73
73
|
'getLangFromLocale',
|
|
74
74
|
'getCountryFromLocale',
|
|
75
75
|
'getDirectionFromLocale',
|
|
76
|
+
'getLocaleCurrencyName',
|
|
76
77
|
'isServerSide',
|
|
77
78
|
'isBrowser',
|
|
78
79
|
|
|
@@ -91,6 +92,7 @@ describe('Server side rendering', () => {
|
|
|
91
92
|
|
|
92
93
|
// stick all possible properties we might need to render all components in here
|
|
93
94
|
const allProps: Record<string, unknown> = {
|
|
95
|
+
actionPrimary: { label: 'Action', onClick: jest.fn(), href: '#' },
|
|
94
96
|
currencies: [],
|
|
95
97
|
currencySelector: { options: [] },
|
|
96
98
|
steps: [],
|
|
@@ -18,6 +18,7 @@ type LegacySizes = SizeSmall | SizeMedium | SizeLarge;
|
|
|
18
18
|
export type StatusIconSentiment = Sentiment | Status.PENDING;
|
|
19
19
|
|
|
20
20
|
export type StatusIconProps = {
|
|
21
|
+
id?: string;
|
|
21
22
|
sentiment?: `${StatusIconSentiment}`;
|
|
22
23
|
size?: LegacySizes | 16 | 24 | 32 | 40 | 48 | 56 | 72;
|
|
23
24
|
/**
|
|
@@ -34,7 +35,12 @@ const mapLegacySize = {
|
|
|
34
35
|
[String(Size.LARGE)]: 48,
|
|
35
36
|
} satisfies Record<string, CircleProps['size']>;
|
|
36
37
|
|
|
37
|
-
const StatusIcon = ({
|
|
38
|
+
const StatusIcon = ({
|
|
39
|
+
id,
|
|
40
|
+
sentiment = 'neutral',
|
|
41
|
+
size: sizeProp = 40,
|
|
42
|
+
iconLabel,
|
|
43
|
+
}: StatusIconProps) => {
|
|
38
44
|
const intl = useIntl();
|
|
39
45
|
|
|
40
46
|
const iconMetaBySentiment: Record<
|
|
@@ -100,6 +106,7 @@ const StatusIcon = ({ sentiment = 'neutral', size: sizeProp = 40, iconLabel }: S
|
|
|
100
106
|
size={isTinyViewport && size < 40 ? 32 : size}
|
|
101
107
|
data-testid="status-icon"
|
|
102
108
|
className={clsx('status-circle', sentiment)}
|
|
109
|
+
id={id}
|
|
103
110
|
>
|
|
104
111
|
<Icon
|
|
105
112
|
className={clsx('status-icon', iconColor)}
|
package/src/table/TableCell.tsx
CHANGED
|
@@ -27,9 +27,7 @@ export interface TableCellMedia extends TableCellTypeProp, TableCellTextProps {
|
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
export interface TableCellLeading
|
|
30
|
-
extends TableCellTypeProp,
|
|
31
|
-
TableCellTextProps,
|
|
32
|
-
TableCellStatusProp {
|
|
30
|
+
extends TableCellTypeProp, TableCellTextProps, TableCellStatusProp {
|
|
33
31
|
avatar?: Pick<AvatarViewProps, 'badge' | 'imgSrc' | 'profileName' | 'profileType'> & {
|
|
34
32
|
asset?: AvatarViewProps['children'];
|
|
35
33
|
/** @deprecated Use `"imgSrc" instead. */
|
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">
|
|
@@ -36,20 +36,19 @@ interface WithDisplayFormatState {
|
|
|
36
36
|
selectionEnd: number;
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
-
export interface WithDisplayFormatProps<T extends TextElementProps = TextElementProps>
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
> {
|
|
39
|
+
export interface WithDisplayFormatProps<T extends TextElementProps = TextElementProps> extends Pick<
|
|
40
|
+
TextElementProps,
|
|
41
|
+
| 'className'
|
|
42
|
+
| 'disabled'
|
|
43
|
+
| 'id'
|
|
44
|
+
| 'maxLength'
|
|
45
|
+
| 'minLength'
|
|
46
|
+
| 'name'
|
|
47
|
+
| 'placeholder'
|
|
48
|
+
| 'readOnly'
|
|
49
|
+
| 'required'
|
|
50
|
+
| 'inputMode'
|
|
51
|
+
> {
|
|
53
52
|
value?: string;
|
|
54
53
|
displayPattern: string;
|
|
55
54
|
/**
|
|
@@ -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
|
-
`;
|