@transferwise/components 0.0.0-experimental-7b7608c → 0.0.0-experimental-c76c3bc
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/avatar/Avatar.js +5 -0
- package/build/avatar/Avatar.js.map +1 -1
- package/build/avatar/Avatar.mjs +5 -0
- package/build/avatar/Avatar.mjs.map +1 -1
- package/build/circularButton/CircularButton.js +1 -1
- package/build/circularButton/CircularButton.js.map +1 -1
- package/build/circularButton/CircularButton.mjs +1 -1
- package/build/circularButton/CircularButton.mjs.map +1 -1
- package/build/common/circle/Circle.js +15 -2
- package/build/common/circle/Circle.js.map +1 -1
- package/build/common/circle/Circle.mjs +15 -2
- package/build/common/circle/Circle.mjs.map +1 -1
- package/build/i18n/en.json +0 -2
- package/build/i18n/en.json.js +0 -2
- package/build/i18n/en.json.js.map +1 -1
- package/build/i18n/en.json.mjs +0 -2
- package/build/i18n/en.json.mjs.map +1 -1
- package/build/main.css +6 -237
- package/build/statusIcon/StatusIcon.js +4 -4
- package/build/statusIcon/StatusIcon.js.map +1 -1
- package/build/statusIcon/StatusIcon.mjs +4 -4
- package/build/statusIcon/StatusIcon.mjs.map +1 -1
- package/build/styles/circularButton/CircularButton.css +2 -2
- package/build/styles/common/circle/Circle.css +4 -0
- package/build/styles/main.css +6 -237
- package/build/styles/statusIcon/StatusIcon.css +0 -20
- package/build/types/avatar/Avatar.d.ts.map +1 -1
- package/build/types/common/circle/Circle.d.ts +1 -1
- package/build/types/common/circle/Circle.d.ts.map +1 -1
- package/build/types/statusIcon/StatusIcon.d.ts +6 -2
- package/build/types/statusIcon/StatusIcon.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/avatar/Avatar.spec.tsx +3 -1
- package/src/avatar/Avatar.tsx +5 -2
- package/src/avatarWrapper/__snapshots__/AvatarWrapper.spec.tsx.snap +11 -11
- package/src/badge/Badge.spec.tsx +3 -1
- package/src/circularButton/CircularButton.css +2 -2
- package/src/circularButton/CircularButton.less +1 -1
- package/src/circularButton/CircularButton.tsx +1 -1
- package/src/circularButton/__snapshots__/CircularButton.spec.tsx.snap +10 -10
- package/src/common/circle/Circle.css +4 -0
- package/src/common/circle/Circle.less +6 -0
- package/src/common/circle/Circle.tsx +25 -2
- package/src/flowNavigation/__snapshots__/FlowNavigation.spec.js.snap +4 -4
- package/src/i18n/en.json +0 -2
- package/src/main.css +6 -237
- package/src/main.less +0 -1
- package/src/overlayHeader/OverlayHeader.spec.tsx +3 -1
- package/src/overlayHeader/__snapshots__/OverlayHeader.spec.tsx.snap +2 -2
- package/src/promoCard/PromoCard.spec.tsx +3 -1
- package/src/radio/Radio.rtl.spec.tsx +2 -1
- package/src/radio/__snapshots__/Radio.rtl.spec.tsx.snap +2 -2
- package/src/statusIcon/StatusIcon.css +0 -20
- package/src/statusIcon/StatusIcon.less +0 -17
- package/src/statusIcon/StatusIcon.spec.tsx +3 -21
- package/src/statusIcon/StatusIcon.story.tsx +31 -8
- package/src/statusIcon/StatusIcon.tsx +12 -6
- package/build/styles/table/Table.css +0 -215
- package/build/types/table/Table.d.ts +0 -23
- package/build/types/table/Table.d.ts.map +0 -1
- package/build/types/table/Table.messages.d.ts +0 -12
- package/build/types/table/Table.messages.d.ts.map +0 -1
- package/build/types/table/TableCell.d.ts +0 -37
- package/build/types/table/TableCell.d.ts.map +0 -1
- package/build/types/table/TableHeader.d.ts +0 -12
- package/build/types/table/TableHeader.d.ts.map +0 -1
- package/build/types/table/TableRow.d.ts +0 -17
- package/build/types/table/TableRow.d.ts.map +0 -1
- package/build/types/table/TableStatusText.d.ts +0 -9
- package/build/types/table/TableStatusText.d.ts.map +0 -1
- package/build/types/table/index.d.ts +0 -6
- package/build/types/table/index.d.ts.map +0 -1
- package/src/table/Table.css +0 -215
- package/src/table/Table.less +0 -261
- package/src/table/Table.messages.ts +0 -12
- package/src/table/Table.spec.tsx +0 -87
- package/src/table/Table.story.tsx +0 -352
- package/src/table/Table.tsx +0 -121
- package/src/table/TableCell.spec.tsx +0 -298
- package/src/table/TableCell.tsx +0 -153
- package/src/table/TableHeader.spec.tsx +0 -58
- package/src/table/TableHeader.tsx +0 -50
- package/src/table/TableRow.spec.tsx +0 -104
- package/src/table/TableRow.tsx +0 -62
- package/src/table/TableStatusText.spec.tsx +0 -53
- package/src/table/TableStatusText.tsx +0 -35
- package/src/table/index.ts +0 -11
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Meta, StoryObj } from '@storybook/react';
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { Sentiment, Size } from '../common';
|
|
4
4
|
|
|
5
5
|
import StatusIcon from './StatusIcon';
|
|
6
6
|
|
|
@@ -11,22 +11,45 @@ export default {
|
|
|
11
11
|
|
|
12
12
|
type Story = StoryObj<typeof StatusIcon>;
|
|
13
13
|
|
|
14
|
-
export const
|
|
15
|
-
render: (
|
|
16
|
-
<span style={{ display: 'flex' }}>
|
|
17
|
-
|
|
14
|
+
export const Variants: Story = {
|
|
15
|
+
render: () => (
|
|
16
|
+
<span style={{ display: 'flex', justifyContent: 'space-between', maxWidth: '400px' }}>
|
|
17
|
+
{[
|
|
18
|
+
Sentiment.POSITIVE,
|
|
19
|
+
Sentiment.NEGATIVE,
|
|
20
|
+
Sentiment.WARNING,
|
|
21
|
+
Sentiment.NEUTRAL,
|
|
22
|
+
Sentiment.PENDING,
|
|
23
|
+
].map((sentiment) => {
|
|
24
|
+
return (
|
|
25
|
+
<span
|
|
26
|
+
key={sentiment}
|
|
27
|
+
style={{
|
|
28
|
+
display: 'flex',
|
|
29
|
+
justifyContent: 'space-between',
|
|
30
|
+
flexDirection: 'column',
|
|
31
|
+
minHeight: '150px',
|
|
32
|
+
alignItems: 'center',
|
|
33
|
+
}}
|
|
34
|
+
>
|
|
35
|
+
{([16, 24, 32, 40, 48, 56, 72] as const).map((size) => {
|
|
36
|
+
return <StatusIcon key={size} size={size} sentiment={sentiment} />;
|
|
37
|
+
})}
|
|
38
|
+
</span>
|
|
39
|
+
);
|
|
40
|
+
})}
|
|
18
41
|
</span>
|
|
19
42
|
),
|
|
20
43
|
};
|
|
21
44
|
|
|
22
|
-
export const
|
|
23
|
-
render: () => (
|
|
45
|
+
export const LegacySizes: Story = {
|
|
46
|
+
render: (args) => (
|
|
24
47
|
<span style={{ display: 'flex', justifyContent: 'space-between', maxWidth: '400px' }}>
|
|
25
48
|
{[
|
|
26
49
|
Sentiment.POSITIVE,
|
|
27
50
|
Sentiment.NEGATIVE,
|
|
28
|
-
Sentiment.NEUTRAL,
|
|
29
51
|
Sentiment.WARNING,
|
|
52
|
+
Sentiment.NEUTRAL,
|
|
30
53
|
Sentiment.PENDING,
|
|
31
54
|
].map((sentiment) => {
|
|
32
55
|
return (
|
|
@@ -5,9 +5,14 @@ import { SizeSmall, SizeMedium, SizeLarge, Sentiment, Size, Breakpoint } from '.
|
|
|
5
5
|
import Circle, { CircleProps } from '../common/circle';
|
|
6
6
|
import { useMedia } from '../common/hooks/useMedia';
|
|
7
7
|
|
|
8
|
+
/**
|
|
9
|
+
* @deprecated use `16 | 24 | 32 | 40 | 48 | 56 | 72` component instead
|
|
10
|
+
*/
|
|
11
|
+
type LegacySizes = SizeSmall | SizeMedium | SizeLarge;
|
|
12
|
+
|
|
8
13
|
export type StatusIconProps = {
|
|
9
|
-
sentiment
|
|
10
|
-
size
|
|
14
|
+
sentiment?: `${Sentiment}`;
|
|
15
|
+
size?: LegacySizes | 16 | 24 | 32 | 40 | 48 | 56 | 72;
|
|
11
16
|
};
|
|
12
17
|
|
|
13
18
|
const iconTypeMap = {
|
|
@@ -27,17 +32,18 @@ const mapLegacySize = {
|
|
|
27
32
|
[String(Size.LARGE)]: 48,
|
|
28
33
|
} satisfies Record<string, CircleProps['size']>;
|
|
29
34
|
|
|
30
|
-
const StatusIcon = ({ sentiment = 'neutral', size: sizeProp =
|
|
35
|
+
const StatusIcon = ({ sentiment = 'neutral', size: sizeProp = 40 }: StatusIconProps) => {
|
|
31
36
|
const Icon = iconTypeMap[sentiment];
|
|
32
37
|
const iconColor = sentiment === 'warning' || sentiment === 'pending' ? 'dark' : 'light';
|
|
33
38
|
const isTinyViewport = useMedia(`(max-width: ${Breakpoint.ZOOM_400}px)`);
|
|
34
|
-
const size
|
|
39
|
+
const size: CircleProps['size'] =
|
|
40
|
+
typeof sizeProp === 'string' ? mapLegacySize[sizeProp] : sizeProp;
|
|
35
41
|
return (
|
|
36
42
|
<Circle
|
|
37
43
|
as="span"
|
|
38
|
-
size={size}
|
|
44
|
+
size={isTinyViewport && size < 40 ? 32 : size}
|
|
39
45
|
data-testid="status-icon"
|
|
40
|
-
className={clsx('status-circle',
|
|
46
|
+
className={clsx('status-circle', sentiment)}
|
|
41
47
|
>
|
|
42
48
|
<Icon className={clsx('status-icon', iconColor)} />
|
|
43
49
|
</Circle>
|
|
@@ -1,215 +0,0 @@
|
|
|
1
|
-
.np-table {
|
|
2
|
-
width: 100%;
|
|
3
|
-
background-color: transparent;
|
|
4
|
-
}
|
|
5
|
-
.np-table-container {
|
|
6
|
-
padding: 8px;
|
|
7
|
-
padding: var(--size-8);
|
|
8
|
-
background-color: rgba(134,167,189,0.10196);
|
|
9
|
-
background-color: var(--color-background-neutral);
|
|
10
|
-
border-radius: 16px;
|
|
11
|
-
border-radius: var(--radius-medium);
|
|
12
|
-
}
|
|
13
|
-
.np-table-container--loading .np-table-header {
|
|
14
|
-
min-width: calc(160px * 2);
|
|
15
|
-
}
|
|
16
|
-
.np-table-container--center {
|
|
17
|
-
margin-right: auto;
|
|
18
|
-
margin-left: auto;
|
|
19
|
-
}
|
|
20
|
-
.np-table-container--full-width {
|
|
21
|
-
width: 100%;
|
|
22
|
-
}
|
|
23
|
-
.np-table-inner-container {
|
|
24
|
-
background-image: linear-gradient(to right, var(--color-contrast-overlay), var(--color-contrast-overlay)), linear-gradient(to right, var(--color-contrast-overlay), var(--color-contrast-overlay)), linear-gradient(to right, rgba(0, 0, 0, 0.1), rgba(255, 255, 255, 0)), linear-gradient(to left, rgba(0, 0, 0, 0.1), rgba(255, 255, 255, 0));
|
|
25
|
-
background-position: left center, right center, left center, right center;
|
|
26
|
-
background-repeat: no-repeat;
|
|
27
|
-
background-color: var(--color-contrast-overlay);
|
|
28
|
-
background-size: 15px 100%, 15px 100%, 15px 100%, 15px 100%;
|
|
29
|
-
background-attachment: local, local, scroll, scroll;
|
|
30
|
-
overflow-x: auto;
|
|
31
|
-
border-radius: 10px;
|
|
32
|
-
}
|
|
33
|
-
.np-theme-personal--dark .np-table-inner-container {
|
|
34
|
-
background-image: linear-gradient(to right, var(--color-contrast-overlay), var(--color-contrast-overlay)), linear-gradient(to right, var(--color-contrast-overlay), var(--color-contrast-overlay)), linear-gradient(to right, #000000, rgba(0, 0, 0, 0)), linear-gradient(to left, #000000, rgba(0, 0, 0, 0));
|
|
35
|
-
}
|
|
36
|
-
.np-table-row:last-child .np-table-cell:first-child {
|
|
37
|
-
border-bottom-left-radius: 10px;
|
|
38
|
-
}
|
|
39
|
-
.np-table-row:last-child .np-table-cell:last-child {
|
|
40
|
-
border-bottom-right-radius: 10px;
|
|
41
|
-
}
|
|
42
|
-
.np-table-row--clickable:hover .np-table-cell {
|
|
43
|
-
background-color: var(--color-background-screen-hover);
|
|
44
|
-
cursor: pointer;
|
|
45
|
-
}
|
|
46
|
-
.np-table-row--separator .np-table-cell {
|
|
47
|
-
padding: 0;
|
|
48
|
-
}
|
|
49
|
-
.np-table-header,
|
|
50
|
-
.np-table-cell {
|
|
51
|
-
padding: 0;
|
|
52
|
-
}
|
|
53
|
-
.np-table-header:first-child,
|
|
54
|
-
.np-table-cell:first-child {
|
|
55
|
-
padding-left: 16px;
|
|
56
|
-
padding-left: var(--size-16);
|
|
57
|
-
}
|
|
58
|
-
.np-table-header:first-child .np-table-header-content,
|
|
59
|
-
.np-table-cell:first-child .np-table-header-content,
|
|
60
|
-
.np-table-header:first-child .np-table-cell-content,
|
|
61
|
-
.np-table-cell:first-child .np-table-cell-content {
|
|
62
|
-
padding-left: 0;
|
|
63
|
-
}
|
|
64
|
-
.np-table-header:last-child,
|
|
65
|
-
.np-table-cell:last-child {
|
|
66
|
-
padding-right: 16px;
|
|
67
|
-
padding-right: var(--size-16);
|
|
68
|
-
}
|
|
69
|
-
.np-table-header:last-child .np-table-header-content,
|
|
70
|
-
.np-table-cell:last-child .np-table-header-content,
|
|
71
|
-
.np-table-header:last-child .np-table-cell-content,
|
|
72
|
-
.np-table-cell:last-child .np-table-cell-content {
|
|
73
|
-
padding-right: 0;
|
|
74
|
-
}
|
|
75
|
-
.np-table-header .np-text-body-large-bold,
|
|
76
|
-
.np-table-cell .np-text-body-large-bold {
|
|
77
|
-
font-size: 0.875rem;
|
|
78
|
-
font-size: var(--font-size-14);
|
|
79
|
-
}
|
|
80
|
-
.np-table-header.np-table-header--right,
|
|
81
|
-
.np-table-cell.np-table-cell--right {
|
|
82
|
-
padding-right: calc(8px + 12px);
|
|
83
|
-
padding-right: calc(var(--size-8) + var(--size-12));
|
|
84
|
-
}
|
|
85
|
-
.np-table-header.np-table-header--right > .np-text-body-default,
|
|
86
|
-
.np-table-cell.np-table-cell--right > .np-text-body-default {
|
|
87
|
-
text-align: right;
|
|
88
|
-
}
|
|
89
|
-
.np-table-header.np-table-header--right .np-table-header-content,
|
|
90
|
-
.np-table-cell.np-table-cell--right .np-table-content {
|
|
91
|
-
justify-content: end;
|
|
92
|
-
}
|
|
93
|
-
.np-table-header-content,
|
|
94
|
-
.np-table-content {
|
|
95
|
-
display: flex;
|
|
96
|
-
align-items: center;
|
|
97
|
-
justify-content: start;
|
|
98
|
-
}
|
|
99
|
-
.np-table-header {
|
|
100
|
-
min-width: 160px;
|
|
101
|
-
padding-right: 8px;
|
|
102
|
-
padding-right: var(--size-8);
|
|
103
|
-
padding-bottom: 8px;
|
|
104
|
-
padding-bottom: var(--size-8);
|
|
105
|
-
padding-left: 8px;
|
|
106
|
-
padding-left: var(--size-8);
|
|
107
|
-
background-color: rgba(134,167,189,0.10196);
|
|
108
|
-
background-color: var(--color-background-neutral);
|
|
109
|
-
color: #37517e;
|
|
110
|
-
color: var(--color-content-primary);
|
|
111
|
-
}
|
|
112
|
-
.np-table-header-content {
|
|
113
|
-
padding-top: 5px;
|
|
114
|
-
padding-bottom: 5px;
|
|
115
|
-
white-space: nowrap;
|
|
116
|
-
}
|
|
117
|
-
.np-table-header--has-error {
|
|
118
|
-
color: var(--color-sentiment-negative);
|
|
119
|
-
}
|
|
120
|
-
.np-table-cell {
|
|
121
|
-
padding: 16px 8px;
|
|
122
|
-
padding: var(--size-16) var(--size-8);
|
|
123
|
-
}
|
|
124
|
-
.np-table-cell--primary {
|
|
125
|
-
min-width: 200px;
|
|
126
|
-
}
|
|
127
|
-
.np-table-cell--currency .np-text-body-default {
|
|
128
|
-
white-space: nowrap;
|
|
129
|
-
}
|
|
130
|
-
.np-table-cell--status .status-circle {
|
|
131
|
-
width: 24px;
|
|
132
|
-
height: 24px;
|
|
133
|
-
}
|
|
134
|
-
.np-table-cell--status .status-circle .status-icon > svg {
|
|
135
|
-
width: 21px;
|
|
136
|
-
height: 21px;
|
|
137
|
-
}
|
|
138
|
-
.np-table-cell .tw-chevron {
|
|
139
|
-
margin-left: 8px;
|
|
140
|
-
margin-left: var(--size-8);
|
|
141
|
-
}
|
|
142
|
-
.np-table-cell-separator {
|
|
143
|
-
margin-top: 4px;
|
|
144
|
-
margin-top: var(--size-4);
|
|
145
|
-
margin-bottom: 4px;
|
|
146
|
-
margin-bottom: var(--size-4);
|
|
147
|
-
height: 1px;
|
|
148
|
-
padding: 0;
|
|
149
|
-
background-color: rgba(134,167,189,0.10196);
|
|
150
|
-
background-color: var(--color-background-neutral);
|
|
151
|
-
}
|
|
152
|
-
.np-table-cell .np-text-body-default {
|
|
153
|
-
line-height: 1.375rem;
|
|
154
|
-
line-height: var(--line-height-22);
|
|
155
|
-
}
|
|
156
|
-
.np-table-cell .np-text-body-large-bold {
|
|
157
|
-
display: flex;
|
|
158
|
-
align-items: center;
|
|
159
|
-
color: #37517e;
|
|
160
|
-
color: var(--color-content-primary);
|
|
161
|
-
white-space: nowrap;
|
|
162
|
-
}
|
|
163
|
-
.np-table-cell .np-table-content--success {
|
|
164
|
-
color: var(--color-sentiment-positive);
|
|
165
|
-
}
|
|
166
|
-
.np-table-cell .np-table-content--error {
|
|
167
|
-
color: var(--color-sentiment-negative);
|
|
168
|
-
}
|
|
169
|
-
.np-table-cell .tw-loader {
|
|
170
|
-
margin: 150px auto;
|
|
171
|
-
}
|
|
172
|
-
@media (max-width: 320px) {
|
|
173
|
-
.np-table-cell .tw-loader {
|
|
174
|
-
margin-top: 70px;
|
|
175
|
-
margin-bottom: 70px;
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
.np-table-content {
|
|
179
|
-
gap: 12px;
|
|
180
|
-
gap: var(--size-12);
|
|
181
|
-
}
|
|
182
|
-
.np-table-content--success,
|
|
183
|
-
.np-table-content--error {
|
|
184
|
-
gap: 4px;
|
|
185
|
-
gap: var(--size-4);
|
|
186
|
-
}
|
|
187
|
-
.np-table-content--success .np-table-content-text,
|
|
188
|
-
.np-table-content--error .np-table-content-text {
|
|
189
|
-
line-height: 155%;
|
|
190
|
-
}
|
|
191
|
-
.np-table-content-media {
|
|
192
|
-
flex-shrink: 0;
|
|
193
|
-
}
|
|
194
|
-
.np-table-content-body {
|
|
195
|
-
display: flex;
|
|
196
|
-
flex-direction: column;
|
|
197
|
-
font-size: 0.75rem;
|
|
198
|
-
font-size: var(--font-size-12);
|
|
199
|
-
color: #768e9c;
|
|
200
|
-
color: var(--color-content-tertiary);
|
|
201
|
-
}
|
|
202
|
-
.np-table-content--reversed {
|
|
203
|
-
flex-direction: row-reverse;
|
|
204
|
-
}
|
|
205
|
-
.np-table-content--reversed .np-table-content-body {
|
|
206
|
-
align-items: end;
|
|
207
|
-
}
|
|
208
|
-
.np-table-empty-data {
|
|
209
|
-
display: flex;
|
|
210
|
-
align-items: center;
|
|
211
|
-
}
|
|
212
|
-
.np-table-empty-data .status-circle {
|
|
213
|
-
margin-right: 12px;
|
|
214
|
-
margin-right: var(--size-12);
|
|
215
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { TableHeaderType } from './TableHeader';
|
|
2
|
-
import { TableRowClickableType, TableRowType } from './TableRow';
|
|
3
|
-
export interface TableProps {
|
|
4
|
-
data: {
|
|
5
|
-
headers?: TableHeaderType[];
|
|
6
|
-
content?: TableRowType[] | TableRowClickableType[];
|
|
7
|
-
onRowClick?: (rowData: TableRowType | TableRowClickableType) => void;
|
|
8
|
-
};
|
|
9
|
-
loading?: boolean;
|
|
10
|
-
className?: string | undefined;
|
|
11
|
-
fullWidth?: boolean;
|
|
12
|
-
error?: {
|
|
13
|
-
message?: string;
|
|
14
|
-
action?: {
|
|
15
|
-
href?: string;
|
|
16
|
-
text?: string;
|
|
17
|
-
};
|
|
18
|
-
};
|
|
19
|
-
onRetry?: () => void;
|
|
20
|
-
}
|
|
21
|
-
declare const Table: React.FC<TableProps>;
|
|
22
|
-
export default Table;
|
|
23
|
-
//# sourceMappingURL=Table.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Table.d.ts","sourceRoot":"","sources":["../../../src/table/Table.tsx"],"names":[],"mappings":"AAEA,OAAoB,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAC7D,OAAiB,EAAE,qBAAqB,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAS3E,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE;QACJ,OAAO,CAAC,EAAE,eAAe,EAAE,CAAC;QAC5B,OAAO,CAAC,EAAE,YAAY,EAAE,GAAG,qBAAqB,EAAE,CAAC;QACnD,UAAU,CAAC,EAAE,CAAC,OAAO,EAAE,YAAY,GAAG,qBAAqB,KAAK,IAAI,CAAC;KACtE,CAAC;IACF,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC/B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,KAAK,CAAC,EAAE;QACN,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,MAAM,CAAC,EAAE;YACP,IAAI,CAAC,EAAE,MAAM,CAAC;YACd,IAAI,CAAC,EAAE,MAAM,CAAC;SACf,CAAC;KACH,CAAC;IACF,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,QAAA,MAAM,KAAK,EAAE,KAAK,CAAC,EAAE,CAAC,UAAU,CAuF/B,CAAC;AAEF,eAAe,KAAK,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Table.messages.d.ts","sourceRoot":"","sources":["../../../src/table/Table.messages.ts"],"names":[],"mappings":";;;;;;;;;;AAEA,wBASG"}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
interface TextPropsType {
|
|
3
|
-
primaryText?: string;
|
|
4
|
-
secondaryText?: string;
|
|
5
|
-
}
|
|
6
|
-
interface StatusPropsType {
|
|
7
|
-
status?: 'error' | 'success';
|
|
8
|
-
}
|
|
9
|
-
export interface LeadingContentType extends TextPropsType, StatusPropsType {
|
|
10
|
-
initials?: string;
|
|
11
|
-
}
|
|
12
|
-
export interface TextContentType extends StatusPropsType {
|
|
13
|
-
text?: string;
|
|
14
|
-
}
|
|
15
|
-
interface CurrencyType {
|
|
16
|
-
value: string | number;
|
|
17
|
-
currency: string;
|
|
18
|
-
}
|
|
19
|
-
export interface CurrencyContentType extends StatusPropsType {
|
|
20
|
-
primaryCurrency?: CurrencyType;
|
|
21
|
-
secondaryCurrency?: CurrencyType;
|
|
22
|
-
}
|
|
23
|
-
export interface StatusContentType extends TextPropsType {
|
|
24
|
-
sentiment?: 'negative' | 'neutral' | 'positive' | 'warning' | 'pending';
|
|
25
|
-
}
|
|
26
|
-
export interface TableCellProps {
|
|
27
|
-
type?: 'leading' | 'text' | 'currency' | 'status';
|
|
28
|
-
content?: LeadingContentType & TextContentType & CurrencyContentType & StatusContentType;
|
|
29
|
-
alignment?: 'right' | 'left';
|
|
30
|
-
className?: string;
|
|
31
|
-
colSpan?: number;
|
|
32
|
-
hasSeparator?: boolean;
|
|
33
|
-
children?: React.ReactNode;
|
|
34
|
-
}
|
|
35
|
-
declare const TableCell: ({ type, content, alignment, className, colSpan, hasSeparator, children, }: TableCellProps) => React.JSX.Element;
|
|
36
|
-
export default TableCell;
|
|
37
|
-
//# sourceMappingURL=TableCell.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TableCell.d.ts","sourceRoot":"","sources":["../../../src/table/TableCell.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,UAAU,aAAa;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAGD,UAAU,eAAe;IACvB,MAAM,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;CAC9B;AAGD,MAAM,WAAW,kBAAmB,SAAQ,aAAa,EAAE,eAAe;IACxE,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,eAAgB,SAAQ,eAAe;IACtD,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,UAAU,YAAY;IACpB,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,mBAAoB,SAAQ,eAAe;IAC1D,eAAe,CAAC,EAAE,YAAY,CAAC;IAC/B,iBAAiB,CAAC,EAAE,YAAY,CAAC;CAClC;AAED,MAAM,WAAW,iBAAkB,SAAQ,aAAa;IACtD,SAAS,CAAC,EAAE,UAAU,GAAG,SAAS,GAAG,UAAU,GAAG,SAAS,GAAG,SAAS,CAAC;CACzE;AAED,MAAM,WAAW,cAAc;IAC7B,IAAI,CAAC,EAAE,SAAS,GAAG,MAAM,GAAG,UAAU,GAAG,QAAQ,CAAC;IAClD,OAAO,CAAC,EAAE,kBAAkB,GAAG,eAAe,GAAG,mBAAmB,GAAG,iBAAiB,CAAC;IACzF,SAAS,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED,QAAA,MAAM,SAAS,8EAQZ,cAAc,sBAwFhB,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export interface TableHeaderType {
|
|
2
|
-
header?: string;
|
|
3
|
-
className?: string;
|
|
4
|
-
alignment?: 'right' | 'left';
|
|
5
|
-
hasError?: boolean;
|
|
6
|
-
}
|
|
7
|
-
export interface TableHeaderProps extends TableHeaderType {
|
|
8
|
-
hasActionColumn?: boolean;
|
|
9
|
-
}
|
|
10
|
-
declare const TableHeader: React.FC<TableHeaderProps>;
|
|
11
|
-
export default TableHeader;
|
|
12
|
-
//# sourceMappingURL=TableHeader.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TableHeader.d.ts","sourceRoot":"","sources":["../../../src/table/TableHeader.tsx"],"names":[],"mappings":"AAIA,MAAM,WAAW,eAAe;IAC9B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IAC7B,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,gBAAiB,SAAQ,eAAe;IACvD,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED,QAAA,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CAgC3C,CAAC;AAEF,eAAe,WAAW,CAAC"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { TableCellProps } from './TableCell';
|
|
3
|
-
export interface TableRowType {
|
|
4
|
-
rowContent?: TableCellProps[];
|
|
5
|
-
}
|
|
6
|
-
export interface TableRowClickableType extends TableRowType {
|
|
7
|
-
id: number | string;
|
|
8
|
-
}
|
|
9
|
-
export interface TableRowProps {
|
|
10
|
-
rowData?: TableRowType | TableRowClickableType;
|
|
11
|
-
hasSeparator?: boolean;
|
|
12
|
-
children?: React.ReactNode;
|
|
13
|
-
onRowClick?: (rowData: TableRowType | TableRowClickableType) => void;
|
|
14
|
-
}
|
|
15
|
-
declare const TableRow: ({ rowData, hasSeparator, children, onRowClick }: TableRowProps) => React.JSX.Element;
|
|
16
|
-
export default TableRow;
|
|
17
|
-
//# sourceMappingURL=TableRow.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TableRow.d.ts","sourceRoot":"","sources":["../../../src/table/TableRow.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAkB,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAKxD,MAAM,WAAW,YAAY;IAC3B,UAAU,CAAC,EAAE,cAAc,EAAE,CAAC;CAC/B;AAED,MAAM,WAAW,qBAAsB,SAAQ,YAAY;IACzD,EAAE,EAAE,MAAM,GAAG,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,aAAa;IAC5B,OAAO,CAAC,EAAE,YAAY,GAAG,qBAAqB,CAAC;IAC/C,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,UAAU,CAAC,EAAE,CAAC,OAAO,EAAE,YAAY,GAAG,qBAAqB,KAAK,IAAI,CAAC;CACtE;AAED,QAAA,MAAM,QAAQ,oDAA6D,aAAa,sBAsCvF,CAAC;AAEF,eAAe,QAAQ,CAAC"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export interface TableStatusTextProps {
|
|
2
|
-
text: string;
|
|
3
|
-
className?: string;
|
|
4
|
-
status?: 'success' | 'error';
|
|
5
|
-
typography?: 'default' | 'large-bold';
|
|
6
|
-
}
|
|
7
|
-
declare const TableStatusText: React.FC<TableStatusTextProps>;
|
|
8
|
-
export default TableStatusText;
|
|
9
|
-
//# sourceMappingURL=TableStatusText.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TableStatusText.d.ts","sourceRoot":"","sources":["../../../src/table/TableStatusText.tsx"],"names":[],"mappings":"AAGA,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,SAAS,GAAG,OAAO,CAAC;IAC7B,UAAU,CAAC,EAAE,SAAS,GAAG,YAAY,CAAC;CACvC;AAED,QAAA,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAsBnD,CAAC;AAEF,eAAe,eAAe,CAAC"}
|
|
@@ -1,6 +0,0 @@
|
|
|
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 { LeadingContentType, TextContentType, CurrencyContentType, StatusContentType, TableCellProps, } from './TableCell';
|
|
6
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/table/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,YAAY,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAC1C,YAAY,EAAE,YAAY,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AACtE,YAAY,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AACrD,YAAY,EACV,kBAAkB,EAClB,eAAe,EACf,mBAAmB,EACnB,iBAAiB,EACjB,cAAc,GACf,MAAM,aAAa,CAAC"}
|
package/src/table/Table.css
DELETED
|
@@ -1,215 +0,0 @@
|
|
|
1
|
-
.np-table {
|
|
2
|
-
width: 100%;
|
|
3
|
-
background-color: transparent;
|
|
4
|
-
}
|
|
5
|
-
.np-table-container {
|
|
6
|
-
padding: 8px;
|
|
7
|
-
padding: var(--size-8);
|
|
8
|
-
background-color: rgba(134,167,189,0.10196);
|
|
9
|
-
background-color: var(--color-background-neutral);
|
|
10
|
-
border-radius: 16px;
|
|
11
|
-
border-radius: var(--radius-medium);
|
|
12
|
-
}
|
|
13
|
-
.np-table-container--loading .np-table-header {
|
|
14
|
-
min-width: calc(160px * 2);
|
|
15
|
-
}
|
|
16
|
-
.np-table-container--center {
|
|
17
|
-
margin-right: auto;
|
|
18
|
-
margin-left: auto;
|
|
19
|
-
}
|
|
20
|
-
.np-table-container--full-width {
|
|
21
|
-
width: 100%;
|
|
22
|
-
}
|
|
23
|
-
.np-table-inner-container {
|
|
24
|
-
background-image: linear-gradient(to right, var(--color-contrast-overlay), var(--color-contrast-overlay)), linear-gradient(to right, var(--color-contrast-overlay), var(--color-contrast-overlay)), linear-gradient(to right, rgba(0, 0, 0, 0.1), rgba(255, 255, 255, 0)), linear-gradient(to left, rgba(0, 0, 0, 0.1), rgba(255, 255, 255, 0));
|
|
25
|
-
background-position: left center, right center, left center, right center;
|
|
26
|
-
background-repeat: no-repeat;
|
|
27
|
-
background-color: var(--color-contrast-overlay);
|
|
28
|
-
background-size: 15px 100%, 15px 100%, 15px 100%, 15px 100%;
|
|
29
|
-
background-attachment: local, local, scroll, scroll;
|
|
30
|
-
overflow-x: auto;
|
|
31
|
-
border-radius: 10px;
|
|
32
|
-
}
|
|
33
|
-
.np-theme-personal--dark .np-table-inner-container {
|
|
34
|
-
background-image: linear-gradient(to right, var(--color-contrast-overlay), var(--color-contrast-overlay)), linear-gradient(to right, var(--color-contrast-overlay), var(--color-contrast-overlay)), linear-gradient(to right, #000000, rgba(0, 0, 0, 0)), linear-gradient(to left, #000000, rgba(0, 0, 0, 0));
|
|
35
|
-
}
|
|
36
|
-
.np-table-row:last-child .np-table-cell:first-child {
|
|
37
|
-
border-bottom-left-radius: 10px;
|
|
38
|
-
}
|
|
39
|
-
.np-table-row:last-child .np-table-cell:last-child {
|
|
40
|
-
border-bottom-right-radius: 10px;
|
|
41
|
-
}
|
|
42
|
-
.np-table-row--clickable:hover .np-table-cell {
|
|
43
|
-
background-color: var(--color-background-screen-hover);
|
|
44
|
-
cursor: pointer;
|
|
45
|
-
}
|
|
46
|
-
.np-table-row--separator .np-table-cell {
|
|
47
|
-
padding: 0;
|
|
48
|
-
}
|
|
49
|
-
.np-table-header,
|
|
50
|
-
.np-table-cell {
|
|
51
|
-
padding: 0;
|
|
52
|
-
}
|
|
53
|
-
.np-table-header:first-child,
|
|
54
|
-
.np-table-cell:first-child {
|
|
55
|
-
padding-left: 16px;
|
|
56
|
-
padding-left: var(--size-16);
|
|
57
|
-
}
|
|
58
|
-
.np-table-header:first-child .np-table-header-content,
|
|
59
|
-
.np-table-cell:first-child .np-table-header-content,
|
|
60
|
-
.np-table-header:first-child .np-table-cell-content,
|
|
61
|
-
.np-table-cell:first-child .np-table-cell-content {
|
|
62
|
-
padding-left: 0;
|
|
63
|
-
}
|
|
64
|
-
.np-table-header:last-child,
|
|
65
|
-
.np-table-cell:last-child {
|
|
66
|
-
padding-right: 16px;
|
|
67
|
-
padding-right: var(--size-16);
|
|
68
|
-
}
|
|
69
|
-
.np-table-header:last-child .np-table-header-content,
|
|
70
|
-
.np-table-cell:last-child .np-table-header-content,
|
|
71
|
-
.np-table-header:last-child .np-table-cell-content,
|
|
72
|
-
.np-table-cell:last-child .np-table-cell-content {
|
|
73
|
-
padding-right: 0;
|
|
74
|
-
}
|
|
75
|
-
.np-table-header .np-text-body-large-bold,
|
|
76
|
-
.np-table-cell .np-text-body-large-bold {
|
|
77
|
-
font-size: 0.875rem;
|
|
78
|
-
font-size: var(--font-size-14);
|
|
79
|
-
}
|
|
80
|
-
.np-table-header.np-table-header--right,
|
|
81
|
-
.np-table-cell.np-table-cell--right {
|
|
82
|
-
padding-right: calc(8px + 12px);
|
|
83
|
-
padding-right: calc(var(--size-8) + var(--size-12));
|
|
84
|
-
}
|
|
85
|
-
.np-table-header.np-table-header--right > .np-text-body-default,
|
|
86
|
-
.np-table-cell.np-table-cell--right > .np-text-body-default {
|
|
87
|
-
text-align: right;
|
|
88
|
-
}
|
|
89
|
-
.np-table-header.np-table-header--right .np-table-header-content,
|
|
90
|
-
.np-table-cell.np-table-cell--right .np-table-content {
|
|
91
|
-
justify-content: end;
|
|
92
|
-
}
|
|
93
|
-
.np-table-header-content,
|
|
94
|
-
.np-table-content {
|
|
95
|
-
display: flex;
|
|
96
|
-
align-items: center;
|
|
97
|
-
justify-content: start;
|
|
98
|
-
}
|
|
99
|
-
.np-table-header {
|
|
100
|
-
min-width: 160px;
|
|
101
|
-
padding-right: 8px;
|
|
102
|
-
padding-right: var(--size-8);
|
|
103
|
-
padding-bottom: 8px;
|
|
104
|
-
padding-bottom: var(--size-8);
|
|
105
|
-
padding-left: 8px;
|
|
106
|
-
padding-left: var(--size-8);
|
|
107
|
-
background-color: rgba(134,167,189,0.10196);
|
|
108
|
-
background-color: var(--color-background-neutral);
|
|
109
|
-
color: #37517e;
|
|
110
|
-
color: var(--color-content-primary);
|
|
111
|
-
}
|
|
112
|
-
.np-table-header-content {
|
|
113
|
-
padding-top: 5px;
|
|
114
|
-
padding-bottom: 5px;
|
|
115
|
-
white-space: nowrap;
|
|
116
|
-
}
|
|
117
|
-
.np-table-header--has-error {
|
|
118
|
-
color: var(--color-sentiment-negative);
|
|
119
|
-
}
|
|
120
|
-
.np-table-cell {
|
|
121
|
-
padding: 16px 8px;
|
|
122
|
-
padding: var(--size-16) var(--size-8);
|
|
123
|
-
}
|
|
124
|
-
.np-table-cell--primary {
|
|
125
|
-
min-width: 200px;
|
|
126
|
-
}
|
|
127
|
-
.np-table-cell--currency .np-text-body-default {
|
|
128
|
-
white-space: nowrap;
|
|
129
|
-
}
|
|
130
|
-
.np-table-cell--status .status-circle {
|
|
131
|
-
width: 24px;
|
|
132
|
-
height: 24px;
|
|
133
|
-
}
|
|
134
|
-
.np-table-cell--status .status-circle .status-icon > svg {
|
|
135
|
-
width: 21px;
|
|
136
|
-
height: 21px;
|
|
137
|
-
}
|
|
138
|
-
.np-table-cell .tw-chevron {
|
|
139
|
-
margin-left: 8px;
|
|
140
|
-
margin-left: var(--size-8);
|
|
141
|
-
}
|
|
142
|
-
.np-table-cell-separator {
|
|
143
|
-
margin-top: 4px;
|
|
144
|
-
margin-top: var(--size-4);
|
|
145
|
-
margin-bottom: 4px;
|
|
146
|
-
margin-bottom: var(--size-4);
|
|
147
|
-
height: 1px;
|
|
148
|
-
padding: 0;
|
|
149
|
-
background-color: rgba(134,167,189,0.10196);
|
|
150
|
-
background-color: var(--color-background-neutral);
|
|
151
|
-
}
|
|
152
|
-
.np-table-cell .np-text-body-default {
|
|
153
|
-
line-height: 1.375rem;
|
|
154
|
-
line-height: var(--line-height-22);
|
|
155
|
-
}
|
|
156
|
-
.np-table-cell .np-text-body-large-bold {
|
|
157
|
-
display: flex;
|
|
158
|
-
align-items: center;
|
|
159
|
-
color: #37517e;
|
|
160
|
-
color: var(--color-content-primary);
|
|
161
|
-
white-space: nowrap;
|
|
162
|
-
}
|
|
163
|
-
.np-table-cell .np-table-content--success {
|
|
164
|
-
color: var(--color-sentiment-positive);
|
|
165
|
-
}
|
|
166
|
-
.np-table-cell .np-table-content--error {
|
|
167
|
-
color: var(--color-sentiment-negative);
|
|
168
|
-
}
|
|
169
|
-
.np-table-cell .tw-loader {
|
|
170
|
-
margin: 150px auto;
|
|
171
|
-
}
|
|
172
|
-
@media (max-width: 320px) {
|
|
173
|
-
.np-table-cell .tw-loader {
|
|
174
|
-
margin-top: 70px;
|
|
175
|
-
margin-bottom: 70px;
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
.np-table-content {
|
|
179
|
-
gap: 12px;
|
|
180
|
-
gap: var(--size-12);
|
|
181
|
-
}
|
|
182
|
-
.np-table-content--success,
|
|
183
|
-
.np-table-content--error {
|
|
184
|
-
gap: 4px;
|
|
185
|
-
gap: var(--size-4);
|
|
186
|
-
}
|
|
187
|
-
.np-table-content--success .np-table-content-text,
|
|
188
|
-
.np-table-content--error .np-table-content-text {
|
|
189
|
-
line-height: 155%;
|
|
190
|
-
}
|
|
191
|
-
.np-table-content-media {
|
|
192
|
-
flex-shrink: 0;
|
|
193
|
-
}
|
|
194
|
-
.np-table-content-body {
|
|
195
|
-
display: flex;
|
|
196
|
-
flex-direction: column;
|
|
197
|
-
font-size: 0.75rem;
|
|
198
|
-
font-size: var(--font-size-12);
|
|
199
|
-
color: #768e9c;
|
|
200
|
-
color: var(--color-content-tertiary);
|
|
201
|
-
}
|
|
202
|
-
.np-table-content--reversed {
|
|
203
|
-
flex-direction: row-reverse;
|
|
204
|
-
}
|
|
205
|
-
.np-table-content--reversed .np-table-content-body {
|
|
206
|
-
align-items: end;
|
|
207
|
-
}
|
|
208
|
-
.np-table-empty-data {
|
|
209
|
-
display: flex;
|
|
210
|
-
align-items: center;
|
|
211
|
-
}
|
|
212
|
-
.np-table-empty-data .status-circle {
|
|
213
|
-
margin-right: 12px;
|
|
214
|
-
margin-right: var(--size-12);
|
|
215
|
-
}
|