@transferwise/components 46.80.0 → 46.82.0

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.
Files changed (137) hide show
  1. package/build/avatar/Avatar.js +3 -0
  2. package/build/avatar/Avatar.js.map +1 -1
  3. package/build/avatar/Avatar.mjs +3 -0
  4. package/build/avatar/Avatar.mjs.map +1 -1
  5. package/build/avatarView/AvatarView.js +175 -0
  6. package/build/avatarView/AvatarView.js.map +1 -0
  7. package/build/avatarView/AvatarView.mjs +173 -0
  8. package/build/avatarView/AvatarView.mjs.map +1 -0
  9. package/build/avatarView/NotificationDot.js +59 -0
  10. package/build/avatarView/NotificationDot.js.map +1 -0
  11. package/build/avatarView/NotificationDot.mjs +57 -0
  12. package/build/avatarView/NotificationDot.mjs.map +1 -0
  13. package/build/avatarWrapper/AvatarWrapper.js +10 -4
  14. package/build/avatarWrapper/AvatarWrapper.js.map +1 -1
  15. package/build/avatarWrapper/AvatarWrapper.mjs +10 -4
  16. package/build/avatarWrapper/AvatarWrapper.mjs.map +1 -1
  17. package/build/badge/Badge.js +16 -4
  18. package/build/badge/Badge.js.map +1 -1
  19. package/build/badge/Badge.mjs +15 -3
  20. package/build/badge/Badge.mjs.map +1 -1
  21. package/build/badge/BadgeAssets.js +60 -0
  22. package/build/badge/BadgeAssets.js.map +1 -0
  23. package/build/badge/BadgeAssets.mjs +58 -0
  24. package/build/badge/BadgeAssets.mjs.map +1 -0
  25. package/build/common/circle/Circle.js +19 -1
  26. package/build/common/circle/Circle.js.map +1 -1
  27. package/build/common/circle/Circle.mjs +19 -1
  28. package/build/common/circle/Circle.mjs.map +1 -1
  29. package/build/i18n/en.json +5 -0
  30. package/build/i18n/en.json.js +5 -0
  31. package/build/i18n/en.json.js.map +1 -1
  32. package/build/i18n/en.json.mjs +5 -0
  33. package/build/i18n/en.json.mjs.map +1 -1
  34. package/build/i18n/zh-HK.json +5 -0
  35. package/build/i18n/zh-HK.json.js +5 -0
  36. package/build/i18n/zh-HK.json.js.map +1 -1
  37. package/build/i18n/zh-HK.json.mjs +5 -0
  38. package/build/i18n/zh-HK.json.mjs.map +1 -1
  39. package/build/index.js +18 -13
  40. package/build/index.js.map +1 -1
  41. package/build/index.mjs +10 -7
  42. package/build/index.mjs.map +1 -1
  43. package/build/main.css +348 -5
  44. package/build/money/Money.js +5 -2
  45. package/build/money/Money.js.map +1 -1
  46. package/build/money/Money.mjs +5 -2
  47. package/build/money/Money.mjs.map +1 -1
  48. package/build/styles/avatarView/AvatarView.css +36 -0
  49. package/build/styles/avatarView/NotificationDot.css +20 -0
  50. package/build/styles/badge/Badge.css +6 -5
  51. package/build/styles/common/circle/Circle.css +32 -0
  52. package/build/styles/main.css +348 -5
  53. package/build/styles/table/Table.css +274 -0
  54. package/build/types/avatar/Avatar.d.ts +3 -0
  55. package/build/types/avatar/Avatar.d.ts.map +1 -1
  56. package/build/types/avatarView/AvatarView.d.ts +26 -0
  57. package/build/types/avatarView/AvatarView.d.ts.map +1 -0
  58. package/build/types/avatarView/NotificationDot.d.ts +8 -0
  59. package/build/types/avatarView/NotificationDot.d.ts.map +1 -0
  60. package/build/types/avatarView/index.d.ts +3 -0
  61. package/build/types/avatarView/index.d.ts.map +1 -0
  62. package/build/types/avatarWrapper/AvatarWrapper.d.ts +3 -0
  63. package/build/types/avatarWrapper/AvatarWrapper.d.ts.map +1 -1
  64. package/build/types/badge/Badge.d.ts +9 -4
  65. package/build/types/badge/Badge.d.ts.map +1 -1
  66. package/build/types/badge/BadgeAssets.d.ts +14 -0
  67. package/build/types/badge/BadgeAssets.d.ts.map +1 -0
  68. package/build/types/badge/index.d.ts +2 -0
  69. package/build/types/badge/index.d.ts.map +1 -1
  70. package/build/types/common/circle/Circle.d.ts +2 -0
  71. package/build/types/common/circle/Circle.d.ts.map +1 -1
  72. package/build/types/index.d.ts +3 -1
  73. package/build/types/index.d.ts.map +1 -1
  74. package/build/types/money/Money.d.ts +2 -1
  75. package/build/types/money/Money.d.ts.map +1 -1
  76. package/build/types/table/Table.d.ts +23 -0
  77. package/build/types/table/Table.d.ts.map +1 -0
  78. package/build/types/table/Table.messages.d.ts +24 -0
  79. package/build/types/table/Table.messages.d.ts.map +1 -0
  80. package/build/types/table/TableCell.d.ts +40 -0
  81. package/build/types/table/TableCell.d.ts.map +1 -0
  82. package/build/types/table/TableHeader.d.ts +13 -0
  83. package/build/types/table/TableHeader.d.ts.map +1 -0
  84. package/build/types/table/TableRow.d.ts +17 -0
  85. package/build/types/table/TableRow.d.ts.map +1 -0
  86. package/build/types/table/TableStatusText.d.ts +10 -0
  87. package/build/types/table/TableStatusText.d.ts.map +1 -0
  88. package/build/types/table/index.d.ts +6 -0
  89. package/build/types/table/index.d.ts.map +1 -0
  90. package/build/types/test-utils/index.d.ts +10 -0
  91. package/build/types/test-utils/index.d.ts.map +1 -1
  92. package/package.json +3 -3
  93. package/src/avatar/Avatar.tsx +3 -0
  94. package/src/avatarView/AvatarView.css +36 -0
  95. package/src/avatarView/AvatarView.less +27 -0
  96. package/src/avatarView/AvatarView.story.tsx +467 -0
  97. package/src/avatarView/AvatarView.tsx +171 -0
  98. package/src/avatarView/NotificationDot.css +20 -0
  99. package/src/avatarView/NotificationDot.less +24 -0
  100. package/src/avatarView/NotificationDot.tsx +35 -0
  101. package/src/avatarView/index.ts +2 -0
  102. package/src/avatarWrapper/AvatarWrapper.story.tsx +19 -0
  103. package/src/avatarWrapper/AvatarWrapper.tsx +3 -0
  104. package/src/badge/Badge.css +6 -5
  105. package/src/badge/Badge.less +4 -3
  106. package/src/badge/Badge.tsx +20 -6
  107. package/src/badge/BadgeAssets.tsx +61 -0
  108. package/src/badge/index.ts +3 -0
  109. package/src/circularButton/CircularButton.spec.tsx +0 -36
  110. package/src/common/circle/Circle.css +32 -0
  111. package/src/common/circle/Circle.less +35 -0
  112. package/src/common/circle/Circle.tsx +24 -1
  113. package/src/flowNavigation/FlowNavigation.story.tsx +19 -52
  114. package/src/i18n/en.json +5 -0
  115. package/src/i18n/zh-HK.json +5 -0
  116. package/src/index.ts +3 -0
  117. package/src/listItem/ListItem.story.tsx +5 -47
  118. package/src/main.css +348 -5
  119. package/src/main.less +2 -0
  120. package/src/money/Money.tsx +9 -2
  121. package/src/overlayHeader/OverlayHeader.story.tsx +6 -14
  122. package/src/table/Table.css +274 -0
  123. package/src/table/Table.less +334 -0
  124. package/src/table/Table.messages.ts +24 -0
  125. package/src/table/Table.spec.tsx +82 -0
  126. package/src/table/Table.story.tsx +356 -0
  127. package/src/table/Table.tsx +167 -0
  128. package/src/table/TableCell.spec.tsx +298 -0
  129. package/src/table/TableCell.tsx +149 -0
  130. package/src/table/TableHeader.spec.tsx +50 -0
  131. package/src/table/TableHeader.tsx +74 -0
  132. package/src/table/TableRow.spec.tsx +112 -0
  133. package/src/table/TableRow.tsx +70 -0
  134. package/src/table/TableStatusText.spec.tsx +53 -0
  135. package/src/table/TableStatusText.tsx +40 -0
  136. package/src/table/index.ts +11 -0
  137. package/src/circularButton/__snapshots__/CircularButton.spec.tsx.snap +0 -381
@@ -0,0 +1,70 @@
1
+ import React from 'react';
2
+ import TableCell, { TableCellProps } from './TableCell';
3
+ import Chevron from '../chevron';
4
+ import { Position } from '../common';
5
+ import { clsx } from 'clsx';
6
+
7
+ export interface TableRowType {
8
+ cells?: TableCellProps[];
9
+ }
10
+
11
+ export interface TableRowClickableType extends TableRowType {
12
+ id: number | string; // `id` is mandatory for clickable rows
13
+ }
14
+
15
+ export interface TableRowProps {
16
+ rowData?: TableRowType | TableRowClickableType;
17
+ hasSeparator?: boolean;
18
+ children?: React.ReactNode;
19
+ onRowClick?: (rowData: TableRowType | TableRowClickableType) => void;
20
+ }
21
+
22
+ const TableRow = ({ rowData, hasSeparator = false, children, onRowClick }: TableRowProps) => {
23
+ return (
24
+ <>
25
+ <tr
26
+ className={clsx('np-table-row', { 'np-table-row--clickable': !!onRowClick })}
27
+ data-testid="np-table-row"
28
+ role={onRowClick ? 'button' : undefined}
29
+ tabIndex={0}
30
+ onClick={onRowClick && rowData ? () => onRowClick(rowData) : undefined}
31
+ onKeyDown={({ key }) => {
32
+ if (onRowClick && rowData && key === 'Enter') {
33
+ onRowClick(rowData);
34
+ }
35
+ }}
36
+ >
37
+ {rowData?.cells
38
+ ? rowData?.cells?.map((item, index) => {
39
+ const itemIndex = item.cell?.text ? item.cell?.text.concat(index.toString()) : index;
40
+ return <TableCell key={itemIndex} {...item} />;
41
+ })
42
+ : children}
43
+ {onRowClick && (
44
+ <TableCell className="np-table-cell--action">
45
+ <div aria-hidden="true">
46
+ <Chevron orientation={Position.RIGHT} />
47
+ </div>
48
+ </TableCell>
49
+ )}
50
+ </tr>
51
+ {hasSeparator && (
52
+ <tr
53
+ aria-hidden="true"
54
+ className="np-table-row np-table-row--separator"
55
+ data-testid="np-table-row--separator"
56
+ >
57
+ <td
58
+ className="np-table-cell np-table-cell--cosmetic"
59
+ colSpan={onRowClick ? Number(rowData?.cells?.length) + 1 : rowData?.cells?.length}
60
+ data-testid="np-table-cell--cosmetic"
61
+ >
62
+ <div className="np-table-cell-separator" data-testid="np-table-cell-separator" />
63
+ </td>
64
+ </tr>
65
+ )}
66
+ </>
67
+ );
68
+ };
69
+
70
+ export default TableRow;
@@ -0,0 +1,53 @@
1
+ import { render, screen } from '@testing-library/react';
2
+ import TableStatusText, { TableStatusTextProps } from './TableStatusText';
3
+
4
+ describe('TableStatusText Component', () => {
5
+ const renderComponent = (props: Partial<TableStatusTextProps> = {}) => {
6
+ const defaultProps: TableStatusTextProps = {
7
+ text: 'Status Text',
8
+ ...props,
9
+ };
10
+ return render(<TableStatusText {...defaultProps} />);
11
+ };
12
+
13
+ it('renders the text and applies the default class', () => {
14
+ renderComponent();
15
+ expect(screen.getByText('Status Text')).toBeInTheDocument();
16
+ expect(screen.getByText('Status Text')).toHaveClass('np-text-body-default');
17
+ });
18
+
19
+ it('applies the custom class name', () => {
20
+ renderComponent({ className: 'custom-class' });
21
+ expect(screen.getByText('Status Text')).toHaveClass('custom-class');
22
+ });
23
+
24
+ it('applies the default typography class when typography is not provided', () => {
25
+ renderComponent();
26
+ expect(screen.getByText('Status Text')).toHaveClass('np-text-body-default');
27
+ });
28
+
29
+ it('applies the typography class when typography equals `default-bold`', () => {
30
+ renderComponent({ typography: 'default-bold' });
31
+ expect(screen.getByText('Status Text')).toHaveClass('np-text-body-default-bold');
32
+ });
33
+
34
+ it('does not render any icon when status is not provided', () => {
35
+ renderComponent();
36
+ expect(screen.queryByTestId('check-icon')).not.toBeInTheDocument();
37
+ expect(screen.queryByTestId('alert-icon')).not.toBeInTheDocument();
38
+ });
39
+
40
+ it('applies the typography and status classes, renders the error icon when status equals `error`', () => {
41
+ renderComponent({ status: 'error' });
42
+ expect(screen.getByText('Status Text')).toHaveClass('np-text-body-default-bold');
43
+ expect(screen.getByText('Status Text')).toHaveClass('np-table-content--error');
44
+ expect(screen.getByTestId('alert-icon')).toBeInTheDocument();
45
+ });
46
+
47
+ it('applies the typography and status classes, renders the success icon when status equals `success`', () => {
48
+ renderComponent({ status: 'success' });
49
+ expect(screen.getByText('Status Text')).toHaveClass('np-text-body-default-bold');
50
+ expect(screen.getByText('Status Text')).toHaveClass('np-table-content--success');
51
+ expect(screen.getByTestId('check-icon')).toBeInTheDocument();
52
+ });
53
+ });
@@ -0,0 +1,40 @@
1
+ import { AlertCircle, CheckCircle } from '@transferwise/icons';
2
+ import { clsx } from 'clsx';
3
+ import React from 'react';
4
+ import Body from '../body';
5
+ import { Typography } from '../common';
6
+
7
+ export interface TableStatusTextProps {
8
+ text: string | React.ReactNode;
9
+ className?: string;
10
+ status?: 'success' | 'error';
11
+ typography?: 'default' | 'default-bold';
12
+ }
13
+
14
+ const TableStatusText = ({
15
+ text,
16
+ className,
17
+ status,
18
+ typography = 'default',
19
+ }: TableStatusTextProps) => {
20
+ const typographyType =
21
+ (status ?? typography === 'default-bold')
22
+ ? Typography.BODY_DEFAULT_BOLD
23
+ : Typography.BODY_DEFAULT;
24
+
25
+ return (
26
+ <Body
27
+ type={typographyType}
28
+ className={clsx(className, {
29
+ 'np-table-content--success': status === 'success',
30
+ 'np-table-content--error': status === 'error',
31
+ })}
32
+ >
33
+ {text}
34
+ {status === 'success' && <CheckCircle className="tw-icon--status" data-testid="check-icon" />}
35
+ {status === 'error' && <AlertCircle className="tw-icon--status" data-testid="alert-icon" />}
36
+ </Body>
37
+ );
38
+ };
39
+
40
+ export default TableStatusText;
@@ -0,0 +1,11 @@
1
+ export { default } from './Table';
2
+ export type { TableProps } from './Table';
3
+ export type { TableRowType, TableRowClickableType } from './TableRow';
4
+ export type { TableHeaderType } from './TableHeader';
5
+ export type {
6
+ TableCellLeading,
7
+ TableCellText,
8
+ TableCellCurrency,
9
+ TableCellStatus,
10
+ TableCellType,
11
+ } from './TableCell';
@@ -1,381 +0,0 @@
1
- // Jest Snapshot v1, https://goo.gl/fbAQLP
2
-
3
- exports[`CircularButton defaults renders a button of type accent and priority primary 1`] = `
4
- <div>
5
- <label
6
- class="np-circular-btn primary accent"
7
- >
8
- <input
9
- aria-label="Add money"
10
- class="np-circle d-flex align-items-center justify-content-center btn np-btn m-b-1 btn-accent btn-priority-1"
11
- style="--circle-size: var(--size-56); --circle-icon-size: 28px;"
12
- type="button"
13
- />
14
- <span
15
- class="tw-icon tw-icon-plus "
16
- data-testid="plus-icon"
17
- >
18
- <svg
19
- aria-hidden="true"
20
- fill="currentColor"
21
- focusable="false"
22
- height="24"
23
- role="none"
24
- viewBox="0 0 24 24"
25
- width="24"
26
- >
27
- <path
28
- d="M22.286 11.143h-9.429V1.715h-1.714v9.428H1.714v1.715h9.429v9.428h1.714v-9.428h9.429v-1.715Z"
29
- />
30
- </svg>
31
- </span>
32
- <span
33
- class="np-text-body-default-bold np-circular-btn__label"
34
- >
35
- Add money
36
- </span>
37
- </label>
38
- </div>
39
- `;
40
-
41
- exports[`CircularButton priorities renders primary buttons 1`] = `
42
- <div>
43
- <label
44
- class="np-circular-btn primary accent"
45
- >
46
- <input
47
- aria-label="Add money"
48
- class="np-circle d-flex align-items-center justify-content-center btn np-btn m-b-1 btn-accent btn-priority-1"
49
- style="--circle-size: var(--size-56); --circle-icon-size: 28px;"
50
- type="button"
51
- />
52
- <span
53
- class="tw-icon tw-icon-plus "
54
- data-testid="plus-icon"
55
- >
56
- <svg
57
- aria-hidden="true"
58
- fill="currentColor"
59
- focusable="false"
60
- height="24"
61
- role="none"
62
- viewBox="0 0 24 24"
63
- width="24"
64
- >
65
- <path
66
- d="M22.286 11.143h-9.429V1.715h-1.714v9.428H1.714v1.715h9.429v9.428h1.714v-9.428h9.429v-1.715Z"
67
- />
68
- </svg>
69
- </span>
70
- <span
71
- class="np-text-body-default-bold np-circular-btn__label"
72
- >
73
- Add money
74
- </span>
75
- </label>
76
- </div>
77
- `;
78
-
79
- exports[`CircularButton priorities renders primary buttons 2`] = `
80
- <div>
81
- <label
82
- class="np-circular-btn primary positive"
83
- >
84
- <input
85
- aria-label="Add money"
86
- class="np-circle d-flex align-items-center justify-content-center btn np-btn m-b-1 btn-positive btn-priority-1"
87
- style="--circle-size: var(--size-56); --circle-icon-size: 28px;"
88
- type="button"
89
- />
90
- <span
91
- class="tw-icon tw-icon-plus "
92
- data-testid="plus-icon"
93
- >
94
- <svg
95
- aria-hidden="true"
96
- fill="currentColor"
97
- focusable="false"
98
- height="24"
99
- role="none"
100
- viewBox="0 0 24 24"
101
- width="24"
102
- >
103
- <path
104
- d="M22.286 11.143h-9.429V1.715h-1.714v9.428H1.714v1.715h9.429v9.428h1.714v-9.428h9.429v-1.715Z"
105
- />
106
- </svg>
107
- </span>
108
- <span
109
- class="np-text-body-default-bold np-circular-btn__label"
110
- >
111
- Add money
112
- </span>
113
- </label>
114
- </div>
115
- `;
116
-
117
- exports[`CircularButton priorities renders primary buttons 3`] = `
118
- <div>
119
- <label
120
- class="np-circular-btn primary negative"
121
- >
122
- <input
123
- aria-label="Add money"
124
- class="np-circle d-flex align-items-center justify-content-center btn np-btn m-b-1 btn-negative btn-priority-1"
125
- style="--circle-size: var(--size-56); --circle-icon-size: 28px;"
126
- type="button"
127
- />
128
- <span
129
- class="tw-icon tw-icon-plus "
130
- data-testid="plus-icon"
131
- >
132
- <svg
133
- aria-hidden="true"
134
- fill="currentColor"
135
- focusable="false"
136
- height="24"
137
- role="none"
138
- viewBox="0 0 24 24"
139
- width="24"
140
- >
141
- <path
142
- d="M22.286 11.143h-9.429V1.715h-1.714v9.428H1.714v1.715h9.429v9.428h1.714v-9.428h9.429v-1.715Z"
143
- />
144
- </svg>
145
- </span>
146
- <span
147
- class="np-text-body-default-bold np-circular-btn__label"
148
- >
149
- Add money
150
- </span>
151
- </label>
152
- </div>
153
- `;
154
-
155
- exports[`CircularButton priorities renders secondary buttons 1`] = `
156
- <div>
157
- <label
158
- class="np-circular-btn secondary accent"
159
- >
160
- <input
161
- aria-label="Add money"
162
- class="np-circle d-flex align-items-center justify-content-center btn np-btn m-b-1 btn-accent btn-priority-2"
163
- style="--circle-size: var(--size-56); --circle-icon-size: 28px;"
164
- type="button"
165
- />
166
- <span
167
- class="tw-icon tw-icon-plus "
168
- data-testid="plus-icon"
169
- >
170
- <svg
171
- aria-hidden="true"
172
- fill="currentColor"
173
- focusable="false"
174
- height="24"
175
- role="none"
176
- viewBox="0 0 24 24"
177
- width="24"
178
- >
179
- <path
180
- d="M22.286 11.143h-9.429V1.715h-1.714v9.428H1.714v1.715h9.429v9.428h1.714v-9.428h9.429v-1.715Z"
181
- />
182
- </svg>
183
- </span>
184
- <span
185
- class="np-text-body-default-bold np-circular-btn__label"
186
- >
187
- Add money
188
- </span>
189
- </label>
190
- </div>
191
- `;
192
-
193
- exports[`CircularButton priorities renders secondary buttons 2`] = `
194
- <div>
195
- <label
196
- class="np-circular-btn secondary positive"
197
- >
198
- <input
199
- aria-label="Add money"
200
- class="np-circle d-flex align-items-center justify-content-center btn np-btn m-b-1 btn-positive btn-priority-2"
201
- style="--circle-size: var(--size-56); --circle-icon-size: 28px;"
202
- type="button"
203
- />
204
- <span
205
- class="tw-icon tw-icon-plus "
206
- data-testid="plus-icon"
207
- >
208
- <svg
209
- aria-hidden="true"
210
- fill="currentColor"
211
- focusable="false"
212
- height="24"
213
- role="none"
214
- viewBox="0 0 24 24"
215
- width="24"
216
- >
217
- <path
218
- d="M22.286 11.143h-9.429V1.715h-1.714v9.428H1.714v1.715h9.429v9.428h1.714v-9.428h9.429v-1.715Z"
219
- />
220
- </svg>
221
- </span>
222
- <span
223
- class="np-text-body-default-bold np-circular-btn__label"
224
- >
225
- Add money
226
- </span>
227
- </label>
228
- </div>
229
- `;
230
-
231
- exports[`CircularButton priorities renders secondary buttons 3`] = `
232
- <div>
233
- <label
234
- class="np-circular-btn secondary negative"
235
- >
236
- <input
237
- aria-label="Add money"
238
- class="np-circle d-flex align-items-center justify-content-center btn np-btn m-b-1 btn-negative btn-priority-2"
239
- style="--circle-size: var(--size-56); --circle-icon-size: 28px;"
240
- type="button"
241
- />
242
- <span
243
- class="tw-icon tw-icon-plus "
244
- data-testid="plus-icon"
245
- >
246
- <svg
247
- aria-hidden="true"
248
- fill="currentColor"
249
- focusable="false"
250
- height="24"
251
- role="none"
252
- viewBox="0 0 24 24"
253
- width="24"
254
- >
255
- <path
256
- d="M22.286 11.143h-9.429V1.715h-1.714v9.428H1.714v1.715h9.429v9.428h1.714v-9.428h9.429v-1.715Z"
257
- />
258
- </svg>
259
- </span>
260
- <span
261
- class="np-text-body-default-bold np-circular-btn__label"
262
- >
263
- Add money
264
- </span>
265
- </label>
266
- </div>
267
- `;
268
-
269
- exports[`CircularButton types renders accent buttons 1`] = `
270
- <div>
271
- <label
272
- class="np-circular-btn primary accent"
273
- >
274
- <input
275
- aria-label="Add money"
276
- class="np-circle d-flex align-items-center justify-content-center btn np-btn m-b-1 btn-accent btn-priority-1"
277
- style="--circle-size: var(--size-56); --circle-icon-size: 28px;"
278
- type="button"
279
- />
280
- <span
281
- class="tw-icon tw-icon-plus "
282
- data-testid="plus-icon"
283
- >
284
- <svg
285
- aria-hidden="true"
286
- fill="currentColor"
287
- focusable="false"
288
- height="24"
289
- role="none"
290
- viewBox="0 0 24 24"
291
- width="24"
292
- >
293
- <path
294
- d="M22.286 11.143h-9.429V1.715h-1.714v9.428H1.714v1.715h9.429v9.428h1.714v-9.428h9.429v-1.715Z"
295
- />
296
- </svg>
297
- </span>
298
- <span
299
- class="np-text-body-default-bold np-circular-btn__label"
300
- >
301
- Add money
302
- </span>
303
- </label>
304
- </div>
305
- `;
306
-
307
- exports[`CircularButton types renders negative buttons 1`] = `
308
- <div>
309
- <label
310
- class="np-circular-btn primary negative"
311
- >
312
- <input
313
- aria-label="Add money"
314
- class="np-circle d-flex align-items-center justify-content-center btn np-btn m-b-1 btn-negative btn-priority-1"
315
- style="--circle-size: var(--size-56); --circle-icon-size: 28px;"
316
- type="button"
317
- />
318
- <span
319
- class="tw-icon tw-icon-plus "
320
- data-testid="plus-icon"
321
- >
322
- <svg
323
- aria-hidden="true"
324
- fill="currentColor"
325
- focusable="false"
326
- height="24"
327
- role="none"
328
- viewBox="0 0 24 24"
329
- width="24"
330
- >
331
- <path
332
- d="M22.286 11.143h-9.429V1.715h-1.714v9.428H1.714v1.715h9.429v9.428h1.714v-9.428h9.429v-1.715Z"
333
- />
334
- </svg>
335
- </span>
336
- <span
337
- class="np-text-body-default-bold np-circular-btn__label"
338
- >
339
- Add money
340
- </span>
341
- </label>
342
- </div>
343
- `;
344
-
345
- exports[`CircularButton types renders positive buttons 1`] = `
346
- <div>
347
- <label
348
- class="np-circular-btn primary positive"
349
- >
350
- <input
351
- aria-label="Add money"
352
- class="np-circle d-flex align-items-center justify-content-center btn np-btn m-b-1 btn-positive btn-priority-1"
353
- style="--circle-size: var(--size-56); --circle-icon-size: 28px;"
354
- type="button"
355
- />
356
- <span
357
- class="tw-icon tw-icon-plus "
358
- data-testid="plus-icon"
359
- >
360
- <svg
361
- aria-hidden="true"
362
- fill="currentColor"
363
- focusable="false"
364
- height="24"
365
- role="none"
366
- viewBox="0 0 24 24"
367
- width="24"
368
- >
369
- <path
370
- d="M22.286 11.143h-9.429V1.715h-1.714v9.428H1.714v1.715h9.429v9.428h1.714v-9.428h9.429v-1.715Z"
371
- />
372
- </svg>
373
- </span>
374
- <span
375
- class="np-text-body-default-bold np-circular-btn__label"
376
- >
377
- Add money
378
- </span>
379
- </label>
380
- </div>
381
- `;