@transferwise/components 46.81.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.
- package/build/i18n/en.json +5 -0
- package/build/i18n/en.json.js +5 -0
- package/build/i18n/en.json.js.map +1 -1
- package/build/i18n/en.json.mjs +5 -0
- package/build/i18n/en.json.mjs.map +1 -1
- package/build/main.css +274 -0
- package/build/money/Money.js +5 -2
- package/build/money/Money.js.map +1 -1
- package/build/money/Money.mjs +5 -2
- package/build/money/Money.mjs.map +1 -1
- package/build/styles/main.css +274 -0
- package/build/styles/table/Table.css +274 -0
- package/build/types/money/Money.d.ts +2 -1
- package/build/types/money/Money.d.ts.map +1 -1
- package/build/types/table/Table.d.ts +23 -0
- package/build/types/table/Table.d.ts.map +1 -0
- package/build/types/table/Table.messages.d.ts +24 -0
- package/build/types/table/Table.messages.d.ts.map +1 -0
- package/build/types/table/TableCell.d.ts +40 -0
- package/build/types/table/TableCell.d.ts.map +1 -0
- package/build/types/table/TableHeader.d.ts +13 -0
- package/build/types/table/TableHeader.d.ts.map +1 -0
- package/build/types/table/TableRow.d.ts +17 -0
- package/build/types/table/TableRow.d.ts.map +1 -0
- package/build/types/table/TableStatusText.d.ts +10 -0
- package/build/types/table/TableStatusText.d.ts.map +1 -0
- package/build/types/table/index.d.ts +6 -0
- package/build/types/table/index.d.ts.map +1 -0
- package/build/types/test-utils/index.d.ts +10 -0
- package/build/types/test-utils/index.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/i18n/en.json +5 -0
- package/src/main.css +274 -0
- package/src/main.less +1 -0
- package/src/money/Money.tsx +9 -2
- package/src/table/Table.css +274 -0
- package/src/table/Table.less +334 -0
- package/src/table/Table.messages.ts +24 -0
- package/src/table/Table.spec.tsx +82 -0
- package/src/table/Table.story.tsx +356 -0
- package/src/table/Table.tsx +167 -0
- package/src/table/TableCell.spec.tsx +298 -0
- package/src/table/TableCell.tsx +149 -0
- package/src/table/TableHeader.spec.tsx +50 -0
- package/src/table/TableHeader.tsx +74 -0
- package/src/table/TableRow.spec.tsx +112 -0
- package/src/table/TableRow.tsx +70 -0
- package/src/table/TableStatusText.spec.tsx +53 -0
- package/src/table/TableStatusText.tsx +40 -0
- package/src/table/index.ts +11 -0
package/build/i18n/en.json
CHANGED
|
@@ -35,6 +35,11 @@
|
|
|
35
35
|
"neptune.Summary.statusDone": "Item done",
|
|
36
36
|
"neptune.Summary.statusNotDone": "Item to do",
|
|
37
37
|
"neptune.Summary.statusPending": "Item pending",
|
|
38
|
+
"neptune.Table.actionHeader": "Action",
|
|
39
|
+
"neptune.Table.emptyData": "No results found",
|
|
40
|
+
"neptune.Table.loaded": "Table data has loaded",
|
|
41
|
+
"neptune.Table.loading": "Table data is loading",
|
|
42
|
+
"neptune.Table.refreshPage": "Refresh page",
|
|
38
43
|
"neptune.Upload.csButtonText": "Upload another file?",
|
|
39
44
|
"neptune.Upload.csFailureText": "Upload failed. Please, try again",
|
|
40
45
|
"neptune.Upload.csSuccessText": "Upload complete!",
|
package/build/i18n/en.json.js
CHANGED
|
@@ -37,6 +37,11 @@ var en = {
|
|
|
37
37
|
"neptune.Summary.statusDone": "Item done",
|
|
38
38
|
"neptune.Summary.statusNotDone": "Item to do",
|
|
39
39
|
"neptune.Summary.statusPending": "Item pending",
|
|
40
|
+
"neptune.Table.actionHeader": "Action",
|
|
41
|
+
"neptune.Table.emptyData": "No results found",
|
|
42
|
+
"neptune.Table.loaded": "Table data has loaded",
|
|
43
|
+
"neptune.Table.loading": "Table data is loading",
|
|
44
|
+
"neptune.Table.refreshPage": "Refresh page",
|
|
40
45
|
"neptune.Upload.csButtonText": "Upload another file?",
|
|
41
46
|
"neptune.Upload.csFailureText": "Upload failed. Please, try again",
|
|
42
47
|
"neptune.Upload.csSuccessText": "Upload complete!",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"en.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"en.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/build/i18n/en.json.mjs
CHANGED
|
@@ -35,6 +35,11 @@ var en = {
|
|
|
35
35
|
"neptune.Summary.statusDone": "Item done",
|
|
36
36
|
"neptune.Summary.statusNotDone": "Item to do",
|
|
37
37
|
"neptune.Summary.statusPending": "Item pending",
|
|
38
|
+
"neptune.Table.actionHeader": "Action",
|
|
39
|
+
"neptune.Table.emptyData": "No results found",
|
|
40
|
+
"neptune.Table.loaded": "Table data has loaded",
|
|
41
|
+
"neptune.Table.loading": "Table data is loading",
|
|
42
|
+
"neptune.Table.refreshPage": "Refresh page",
|
|
38
43
|
"neptune.Upload.csButtonText": "Upload another file?",
|
|
39
44
|
"neptune.Upload.csFailureText": "Upload failed. Please, try again",
|
|
40
45
|
"neptune.Upload.csSuccessText": "Upload complete!",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"en.json.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"en.json.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/build/main.css
CHANGED
|
@@ -5121,6 +5121,280 @@ html:not([dir="rtl"]) .np-navigation-option {
|
|
|
5121
5121
|
padding: 0 var(--size-24);
|
|
5122
5122
|
}
|
|
5123
5123
|
}
|
|
5124
|
+
.np-table {
|
|
5125
|
+
width: 100%;
|
|
5126
|
+
background-color: transparent;
|
|
5127
|
+
}
|
|
5128
|
+
.np-table-outer-container {
|
|
5129
|
+
border-radius: 16px;
|
|
5130
|
+
border-radius: var(--radius-medium);
|
|
5131
|
+
}
|
|
5132
|
+
.np-table-outer-container:focus {
|
|
5133
|
+
outline: none;
|
|
5134
|
+
}
|
|
5135
|
+
.np-table-outer-container:focus-visible {
|
|
5136
|
+
outline: var(--ring-outline-color) solid var(--ring-outline-width);
|
|
5137
|
+
outline-offset: var(--ring-outline-offset);
|
|
5138
|
+
}
|
|
5139
|
+
.np-table-outer-container:focus-visible {
|
|
5140
|
+
outline-offset: 0;
|
|
5141
|
+
}
|
|
5142
|
+
.np-table-outer-container--center {
|
|
5143
|
+
margin-right: auto;
|
|
5144
|
+
margin-left: auto;
|
|
5145
|
+
}
|
|
5146
|
+
@media (max-width: 767px) {
|
|
5147
|
+
.np-table-outer-container--center {
|
|
5148
|
+
width: 100%;
|
|
5149
|
+
}
|
|
5150
|
+
}
|
|
5151
|
+
.np-table-outer-container--full-width {
|
|
5152
|
+
width: 100%;
|
|
5153
|
+
}
|
|
5154
|
+
.np-table-container {
|
|
5155
|
+
padding: 8px;
|
|
5156
|
+
padding: var(--size-8);
|
|
5157
|
+
background-color: rgba(134,167,189,0.10196);
|
|
5158
|
+
background-color: var(--color-background-neutral);
|
|
5159
|
+
border-radius: inherit;
|
|
5160
|
+
}
|
|
5161
|
+
.np-table-container--loading .np-table-inner-container {
|
|
5162
|
+
background-image: none;
|
|
5163
|
+
}
|
|
5164
|
+
.np-table-inner-container {
|
|
5165
|
+
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));
|
|
5166
|
+
background-position: left center, right center, left center, right center;
|
|
5167
|
+
background-repeat: no-repeat;
|
|
5168
|
+
background-color: var(--color-contrast-overlay);
|
|
5169
|
+
background-size: 15px 100%, 15px 100%, 15px 100%, 15px 100%;
|
|
5170
|
+
background-attachment: local, local, scroll, scroll;
|
|
5171
|
+
overflow-x: auto;
|
|
5172
|
+
border-radius: 10px;
|
|
5173
|
+
}
|
|
5174
|
+
.np-theme-personal--dark .np-table-inner-container {
|
|
5175
|
+
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));
|
|
5176
|
+
}
|
|
5177
|
+
.np-table-row:last-child .np-table-cell:first-child {
|
|
5178
|
+
border-bottom-left-radius: 10px;
|
|
5179
|
+
}
|
|
5180
|
+
.np-table-row:last-child .np-table-cell:last-child {
|
|
5181
|
+
border-bottom-right-radius: 10px;
|
|
5182
|
+
}
|
|
5183
|
+
.np-table-row:focus {
|
|
5184
|
+
outline: none;
|
|
5185
|
+
}
|
|
5186
|
+
.np-table-row:focus-visible {
|
|
5187
|
+
outline: var(--ring-outline-color) solid var(--ring-outline-width);
|
|
5188
|
+
outline-offset: var(--ring-outline-offset);
|
|
5189
|
+
}
|
|
5190
|
+
.np-table-row:focus-visible {
|
|
5191
|
+
outline-offset: -2px;
|
|
5192
|
+
border-radius: 6px;
|
|
5193
|
+
}
|
|
5194
|
+
.np-table-row--clickable .np-table-cell {
|
|
5195
|
+
position: relative;
|
|
5196
|
+
}
|
|
5197
|
+
.np-table-row--clickable .np-table-cell:before {
|
|
5198
|
+
display: none;
|
|
5199
|
+
content: "";
|
|
5200
|
+
position: absolute;
|
|
5201
|
+
height: 100%;
|
|
5202
|
+
width: 100%;
|
|
5203
|
+
top: 0;
|
|
5204
|
+
left: 0;
|
|
5205
|
+
background-color: var(--color-background-screen-hover);
|
|
5206
|
+
}
|
|
5207
|
+
.np-table-row--clickable .np-table-cell:first-child:before,
|
|
5208
|
+
.np-table-row--clickable .np-table-cell:last-child:before {
|
|
5209
|
+
width: calc(100% - 8px);
|
|
5210
|
+
width: calc(100% - var(--size-8));
|
|
5211
|
+
}
|
|
5212
|
+
.np-table-row--clickable .np-table-cell:first-child:before {
|
|
5213
|
+
left: 8px;
|
|
5214
|
+
left: var(--size-8);
|
|
5215
|
+
border-top-left-radius: 6px;
|
|
5216
|
+
border-bottom-left-radius: 6px;
|
|
5217
|
+
}
|
|
5218
|
+
.np-table-row--clickable .np-table-cell:last-child:before {
|
|
5219
|
+
border-top-right-radius: 6px;
|
|
5220
|
+
border-bottom-right-radius: 6px;
|
|
5221
|
+
}
|
|
5222
|
+
.np-table-row--clickable:hover .np-table-cell:before {
|
|
5223
|
+
display: block;
|
|
5224
|
+
}
|
|
5225
|
+
.np-table-row--clickable:hover:focus-visible .np-table-cell:first-child:before,
|
|
5226
|
+
.np-table-row--clickable:hover:focus-visible .np-table-cell:last-child:before {
|
|
5227
|
+
width: 100%;
|
|
5228
|
+
}
|
|
5229
|
+
.np-table-row--clickable:hover:focus-visible .np-table-cell:first-child:before {
|
|
5230
|
+
left: 0;
|
|
5231
|
+
}
|
|
5232
|
+
.np-table-row--cosmetic .np-table-cell {
|
|
5233
|
+
height: 8px;
|
|
5234
|
+
height: var(--size-8);
|
|
5235
|
+
padding: 0;
|
|
5236
|
+
}
|
|
5237
|
+
.np-table-header,
|
|
5238
|
+
.np-table-cell {
|
|
5239
|
+
padding: 0;
|
|
5240
|
+
}
|
|
5241
|
+
.np-table-header:first-child,
|
|
5242
|
+
.np-table-cell:first-child {
|
|
5243
|
+
padding-left: 16px;
|
|
5244
|
+
padding-left: var(--size-16);
|
|
5245
|
+
}
|
|
5246
|
+
.np-table-header:first-child .np-table-header-content,
|
|
5247
|
+
.np-table-cell:first-child .np-table-header-content,
|
|
5248
|
+
.np-table-header:first-child .np-table-cell-content,
|
|
5249
|
+
.np-table-cell:first-child .np-table-cell-content {
|
|
5250
|
+
padding-left: 0;
|
|
5251
|
+
}
|
|
5252
|
+
.np-table-header:last-child,
|
|
5253
|
+
.np-table-cell:last-child {
|
|
5254
|
+
padding-right: 16px;
|
|
5255
|
+
padding-right: var(--size-16);
|
|
5256
|
+
}
|
|
5257
|
+
.np-table-header:last-child .np-table-header-content,
|
|
5258
|
+
.np-table-cell:last-child .np-table-header-content,
|
|
5259
|
+
.np-table-header:last-child .np-table-cell-content,
|
|
5260
|
+
.np-table-cell:last-child .np-table-cell-content {
|
|
5261
|
+
padding-right: 0;
|
|
5262
|
+
}
|
|
5263
|
+
.np-table-header.np-table-header--right > .np-text-body-default,
|
|
5264
|
+
.np-table-cell.np-table-cell--right > .np-text-body-default {
|
|
5265
|
+
text-align: right;
|
|
5266
|
+
}
|
|
5267
|
+
.np-table-header.np-table-header--right + .np-table-header:not(.np-table-header--right),
|
|
5268
|
+
.np-table-cell.np-table-cell--right + .np-table-cell:not(.np-table-cell--right) {
|
|
5269
|
+
padding-left: calc(8px + 12px);
|
|
5270
|
+
padding-left: calc(var(--size-8) + var(--size-12));
|
|
5271
|
+
}
|
|
5272
|
+
.np-table-header.np-table-header--right .np-table-header-content,
|
|
5273
|
+
.np-table-cell.np-table-cell--right .np-table-content {
|
|
5274
|
+
justify-content: end;
|
|
5275
|
+
}
|
|
5276
|
+
.np-table-header-content,
|
|
5277
|
+
.np-table-content {
|
|
5278
|
+
display: flex;
|
|
5279
|
+
align-items: center;
|
|
5280
|
+
justify-content: start;
|
|
5281
|
+
}
|
|
5282
|
+
.np-table-header {
|
|
5283
|
+
min-width: 160px;
|
|
5284
|
+
padding-right: 8px;
|
|
5285
|
+
padding-right: var(--size-8);
|
|
5286
|
+
padding-bottom: 8px;
|
|
5287
|
+
padding-bottom: var(--size-8);
|
|
5288
|
+
padding-left: 8px;
|
|
5289
|
+
padding-left: var(--size-8);
|
|
5290
|
+
background-color: rgba(134,167,189,0.10196);
|
|
5291
|
+
background-color: var(--color-background-neutral);
|
|
5292
|
+
color: var(--color-interactive-primary);
|
|
5293
|
+
}
|
|
5294
|
+
.np-table-header-content {
|
|
5295
|
+
padding-top: 5px;
|
|
5296
|
+
padding-bottom: 5px;
|
|
5297
|
+
white-space: nowrap;
|
|
5298
|
+
line-height: 1.375rem;
|
|
5299
|
+
line-height: var(--line-height-22);
|
|
5300
|
+
letter-spacing: 0.0125em;
|
|
5301
|
+
letter-spacing: var(--letter-spacing-sm);
|
|
5302
|
+
}
|
|
5303
|
+
.np-table-header--error {
|
|
5304
|
+
color: var(--color-sentiment-negative);
|
|
5305
|
+
}
|
|
5306
|
+
.np-table-header--action {
|
|
5307
|
+
min-width: 0;
|
|
5308
|
+
padding: 0;
|
|
5309
|
+
}
|
|
5310
|
+
.np-table-cell {
|
|
5311
|
+
padding: 16px 8px;
|
|
5312
|
+
padding: var(--size-16) var(--size-8);
|
|
5313
|
+
position: relative;
|
|
5314
|
+
}
|
|
5315
|
+
.np-table-cell--cosmetic {
|
|
5316
|
+
padding: 0;
|
|
5317
|
+
}
|
|
5318
|
+
.np-table-cell--primary {
|
|
5319
|
+
min-width: 200px;
|
|
5320
|
+
}
|
|
5321
|
+
.np-table-cell--currency .np-text-body-default {
|
|
5322
|
+
white-space: nowrap;
|
|
5323
|
+
}
|
|
5324
|
+
.np-table-cell .tw-chevron {
|
|
5325
|
+
margin-left: 8px;
|
|
5326
|
+
margin-left: var(--size-8);
|
|
5327
|
+
}
|
|
5328
|
+
.np-table-cell-separator {
|
|
5329
|
+
margin-top: 4px;
|
|
5330
|
+
margin-top: var(--size-4);
|
|
5331
|
+
margin-bottom: 4px;
|
|
5332
|
+
margin-bottom: var(--size-4);
|
|
5333
|
+
height: 1px;
|
|
5334
|
+
background-color: rgba(134,167,189,0.10196);
|
|
5335
|
+
background-color: var(--color-background-neutral);
|
|
5336
|
+
padding: 0;
|
|
5337
|
+
}
|
|
5338
|
+
.np-table-cell .np-text-body-default-bold {
|
|
5339
|
+
display: flex;
|
|
5340
|
+
align-items: center;
|
|
5341
|
+
color: #37517e;
|
|
5342
|
+
color: var(--color-content-primary);
|
|
5343
|
+
white-space: nowrap;
|
|
5344
|
+
}
|
|
5345
|
+
.np-table-cell .np-table-content--success {
|
|
5346
|
+
color: var(--color-sentiment-positive);
|
|
5347
|
+
}
|
|
5348
|
+
.np-table-cell .np-table-content--error {
|
|
5349
|
+
color: var(--color-sentiment-negative);
|
|
5350
|
+
}
|
|
5351
|
+
.np-table-cell .tw-loader {
|
|
5352
|
+
margin: 150px auto;
|
|
5353
|
+
}
|
|
5354
|
+
@media (max-width: 320px) {
|
|
5355
|
+
.np-table-cell .tw-loader {
|
|
5356
|
+
margin-top: 70px;
|
|
5357
|
+
margin-bottom: 70px;
|
|
5358
|
+
}
|
|
5359
|
+
}
|
|
5360
|
+
.np-table-content {
|
|
5361
|
+
gap: 12px;
|
|
5362
|
+
gap: var(--size-12);
|
|
5363
|
+
}
|
|
5364
|
+
.np-table-content--success,
|
|
5365
|
+
.np-table-content--error {
|
|
5366
|
+
gap: 4px;
|
|
5367
|
+
gap: var(--size-4);
|
|
5368
|
+
}
|
|
5369
|
+
.np-table-content--success .np-table-content-text,
|
|
5370
|
+
.np-table-content--error .np-table-content-text {
|
|
5371
|
+
line-height: 155%;
|
|
5372
|
+
}
|
|
5373
|
+
.np-table-content-media {
|
|
5374
|
+
flex-shrink: 0;
|
|
5375
|
+
}
|
|
5376
|
+
.np-table-content-body {
|
|
5377
|
+
display: flex;
|
|
5378
|
+
flex-direction: column;
|
|
5379
|
+
font-size: 0.75rem;
|
|
5380
|
+
font-size: var(--font-size-12);
|
|
5381
|
+
color: #768e9c;
|
|
5382
|
+
color: var(--color-content-tertiary);
|
|
5383
|
+
}
|
|
5384
|
+
.np-table-content--reversed {
|
|
5385
|
+
flex-direction: row-reverse;
|
|
5386
|
+
}
|
|
5387
|
+
.np-table-content--reversed .np-table-content-body {
|
|
5388
|
+
align-items: end;
|
|
5389
|
+
}
|
|
5390
|
+
.np-table-empty-data {
|
|
5391
|
+
display: flex;
|
|
5392
|
+
align-items: center;
|
|
5393
|
+
}
|
|
5394
|
+
.np-table-empty-data .status-circle {
|
|
5395
|
+
margin-right: 12px;
|
|
5396
|
+
margin-right: var(--size-12);
|
|
5397
|
+
}
|
|
5124
5398
|
.np-tile {
|
|
5125
5399
|
min-width: 120px;
|
|
5126
5400
|
border-radius: 10px;
|
package/build/money/Money.js
CHANGED
|
@@ -6,13 +6,16 @@ var jsxRuntime = require('react/jsx-runtime');
|
|
|
6
6
|
|
|
7
7
|
const Money = ({
|
|
8
8
|
amount,
|
|
9
|
-
currency
|
|
9
|
+
currency,
|
|
10
|
+
alwaysShowDecimals = false
|
|
10
11
|
}) => {
|
|
11
12
|
const {
|
|
12
13
|
locale
|
|
13
14
|
} = reactIntl.useIntl();
|
|
14
15
|
return /*#__PURE__*/jsxRuntime.jsx(jsxRuntime.Fragment, {
|
|
15
|
-
children: formatting.formatMoney(amount, currency, locale
|
|
16
|
+
children: formatting.formatMoney(amount, currency, locale, {
|
|
17
|
+
alwaysShowDecimals
|
|
18
|
+
})
|
|
16
19
|
});
|
|
17
20
|
};
|
|
18
21
|
|
package/build/money/Money.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Money.js","sources":["../../src/money/Money.tsx"],"sourcesContent":["import { formatMoney } from '@transferwise/formatting';\nimport { useIntl } from 'react-intl';\n\nexport interface MoneyProps {\n amount: number;\n currency: string;\n}\n\nconst Money = ({ amount, currency }: MoneyProps) => {\n const { locale } = useIntl();\n return
|
|
1
|
+
{"version":3,"file":"Money.js","sources":["../../src/money/Money.tsx"],"sourcesContent":["import { formatMoney } from '@transferwise/formatting';\nimport { useIntl } from 'react-intl';\n\nexport interface MoneyProps {\n amount: number;\n currency: string;\n alwaysShowDecimals?: boolean;\n}\n\nconst Money = ({ amount, currency, alwaysShowDecimals = false }: MoneyProps) => {\n const { locale } = useIntl();\n return (\n <>\n {formatMoney(amount, currency, locale, {\n alwaysShowDecimals,\n })}\n </>\n );\n};\n\nexport default Money;\n"],"names":["Money","amount","currency","alwaysShowDecimals","locale","useIntl","_jsx","_Fragment","children","formatMoney"],"mappings":";;;;;;AASMA,MAAAA,KAAK,GAAGA,CAAC;EAAEC,MAAM;EAAEC,QAAQ;AAAEC,EAAAA,kBAAkB,GAAG,KAAA;AAAK,CAAc,KAAI;EAC7E,MAAM;AAAEC,IAAAA,MAAAA;GAAQ,GAAGC,iBAAO,EAAE,CAAA;EAC5B,oBACEC,cAAA,CAAAC,mBAAA,EAAA;IAAAC,QAAA,EACGC,sBAAW,CAACR,MAAM,EAAEC,QAAQ,EAAEE,MAAM,EAAE;AACrCD,MAAAA,kBAAAA;KACD,CAAA;AAAC,GACJ,CAAG,CAAA;AAEP;;;;"}
|
package/build/money/Money.mjs
CHANGED
|
@@ -4,13 +4,16 @@ import { jsx, Fragment } from 'react/jsx-runtime';
|
|
|
4
4
|
|
|
5
5
|
const Money = ({
|
|
6
6
|
amount,
|
|
7
|
-
currency
|
|
7
|
+
currency,
|
|
8
|
+
alwaysShowDecimals = false
|
|
8
9
|
}) => {
|
|
9
10
|
const {
|
|
10
11
|
locale
|
|
11
12
|
} = useIntl();
|
|
12
13
|
return /*#__PURE__*/jsx(Fragment, {
|
|
13
|
-
children: formatMoney(amount, currency, locale
|
|
14
|
+
children: formatMoney(amount, currency, locale, {
|
|
15
|
+
alwaysShowDecimals
|
|
16
|
+
})
|
|
14
17
|
});
|
|
15
18
|
};
|
|
16
19
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Money.mjs","sources":["../../src/money/Money.tsx"],"sourcesContent":["import { formatMoney } from '@transferwise/formatting';\nimport { useIntl } from 'react-intl';\n\nexport interface MoneyProps {\n amount: number;\n currency: string;\n}\n\nconst Money = ({ amount, currency }: MoneyProps) => {\n const { locale } = useIntl();\n return
|
|
1
|
+
{"version":3,"file":"Money.mjs","sources":["../../src/money/Money.tsx"],"sourcesContent":["import { formatMoney } from '@transferwise/formatting';\nimport { useIntl } from 'react-intl';\n\nexport interface MoneyProps {\n amount: number;\n currency: string;\n alwaysShowDecimals?: boolean;\n}\n\nconst Money = ({ amount, currency, alwaysShowDecimals = false }: MoneyProps) => {\n const { locale } = useIntl();\n return (\n <>\n {formatMoney(amount, currency, locale, {\n alwaysShowDecimals,\n })}\n </>\n );\n};\n\nexport default Money;\n"],"names":["Money","amount","currency","alwaysShowDecimals","locale","useIntl","_jsx","_Fragment","children","formatMoney"],"mappings":";;;;AASMA,MAAAA,KAAK,GAAGA,CAAC;EAAEC,MAAM;EAAEC,QAAQ;AAAEC,EAAAA,kBAAkB,GAAG,KAAA;AAAK,CAAc,KAAI;EAC7E,MAAM;AAAEC,IAAAA,MAAAA;GAAQ,GAAGC,OAAO,EAAE,CAAA;EAC5B,oBACEC,GAAA,CAAAC,QAAA,EAAA;IAAAC,QAAA,EACGC,WAAW,CAACR,MAAM,EAAEC,QAAQ,EAAEE,MAAM,EAAE;AACrCD,MAAAA,kBAAAA;KACD,CAAA;AAAC,GACJ,CAAG,CAAA;AAEP;;;;"}
|
package/build/styles/main.css
CHANGED
|
@@ -5121,6 +5121,280 @@ html:not([dir="rtl"]) .np-navigation-option {
|
|
|
5121
5121
|
padding: 0 var(--size-24);
|
|
5122
5122
|
}
|
|
5123
5123
|
}
|
|
5124
|
+
.np-table {
|
|
5125
|
+
width: 100%;
|
|
5126
|
+
background-color: transparent;
|
|
5127
|
+
}
|
|
5128
|
+
.np-table-outer-container {
|
|
5129
|
+
border-radius: 16px;
|
|
5130
|
+
border-radius: var(--radius-medium);
|
|
5131
|
+
}
|
|
5132
|
+
.np-table-outer-container:focus {
|
|
5133
|
+
outline: none;
|
|
5134
|
+
}
|
|
5135
|
+
.np-table-outer-container:focus-visible {
|
|
5136
|
+
outline: var(--ring-outline-color) solid var(--ring-outline-width);
|
|
5137
|
+
outline-offset: var(--ring-outline-offset);
|
|
5138
|
+
}
|
|
5139
|
+
.np-table-outer-container:focus-visible {
|
|
5140
|
+
outline-offset: 0;
|
|
5141
|
+
}
|
|
5142
|
+
.np-table-outer-container--center {
|
|
5143
|
+
margin-right: auto;
|
|
5144
|
+
margin-left: auto;
|
|
5145
|
+
}
|
|
5146
|
+
@media (max-width: 767px) {
|
|
5147
|
+
.np-table-outer-container--center {
|
|
5148
|
+
width: 100%;
|
|
5149
|
+
}
|
|
5150
|
+
}
|
|
5151
|
+
.np-table-outer-container--full-width {
|
|
5152
|
+
width: 100%;
|
|
5153
|
+
}
|
|
5154
|
+
.np-table-container {
|
|
5155
|
+
padding: 8px;
|
|
5156
|
+
padding: var(--size-8);
|
|
5157
|
+
background-color: rgba(134,167,189,0.10196);
|
|
5158
|
+
background-color: var(--color-background-neutral);
|
|
5159
|
+
border-radius: inherit;
|
|
5160
|
+
}
|
|
5161
|
+
.np-table-container--loading .np-table-inner-container {
|
|
5162
|
+
background-image: none;
|
|
5163
|
+
}
|
|
5164
|
+
.np-table-inner-container {
|
|
5165
|
+
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));
|
|
5166
|
+
background-position: left center, right center, left center, right center;
|
|
5167
|
+
background-repeat: no-repeat;
|
|
5168
|
+
background-color: var(--color-contrast-overlay);
|
|
5169
|
+
background-size: 15px 100%, 15px 100%, 15px 100%, 15px 100%;
|
|
5170
|
+
background-attachment: local, local, scroll, scroll;
|
|
5171
|
+
overflow-x: auto;
|
|
5172
|
+
border-radius: 10px;
|
|
5173
|
+
}
|
|
5174
|
+
.np-theme-personal--dark .np-table-inner-container {
|
|
5175
|
+
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));
|
|
5176
|
+
}
|
|
5177
|
+
.np-table-row:last-child .np-table-cell:first-child {
|
|
5178
|
+
border-bottom-left-radius: 10px;
|
|
5179
|
+
}
|
|
5180
|
+
.np-table-row:last-child .np-table-cell:last-child {
|
|
5181
|
+
border-bottom-right-radius: 10px;
|
|
5182
|
+
}
|
|
5183
|
+
.np-table-row:focus {
|
|
5184
|
+
outline: none;
|
|
5185
|
+
}
|
|
5186
|
+
.np-table-row:focus-visible {
|
|
5187
|
+
outline: var(--ring-outline-color) solid var(--ring-outline-width);
|
|
5188
|
+
outline-offset: var(--ring-outline-offset);
|
|
5189
|
+
}
|
|
5190
|
+
.np-table-row:focus-visible {
|
|
5191
|
+
outline-offset: -2px;
|
|
5192
|
+
border-radius: 6px;
|
|
5193
|
+
}
|
|
5194
|
+
.np-table-row--clickable .np-table-cell {
|
|
5195
|
+
position: relative;
|
|
5196
|
+
}
|
|
5197
|
+
.np-table-row--clickable .np-table-cell:before {
|
|
5198
|
+
display: none;
|
|
5199
|
+
content: "";
|
|
5200
|
+
position: absolute;
|
|
5201
|
+
height: 100%;
|
|
5202
|
+
width: 100%;
|
|
5203
|
+
top: 0;
|
|
5204
|
+
left: 0;
|
|
5205
|
+
background-color: var(--color-background-screen-hover);
|
|
5206
|
+
}
|
|
5207
|
+
.np-table-row--clickable .np-table-cell:first-child:before,
|
|
5208
|
+
.np-table-row--clickable .np-table-cell:last-child:before {
|
|
5209
|
+
width: calc(100% - 8px);
|
|
5210
|
+
width: calc(100% - var(--size-8));
|
|
5211
|
+
}
|
|
5212
|
+
.np-table-row--clickable .np-table-cell:first-child:before {
|
|
5213
|
+
left: 8px;
|
|
5214
|
+
left: var(--size-8);
|
|
5215
|
+
border-top-left-radius: 6px;
|
|
5216
|
+
border-bottom-left-radius: 6px;
|
|
5217
|
+
}
|
|
5218
|
+
.np-table-row--clickable .np-table-cell:last-child:before {
|
|
5219
|
+
border-top-right-radius: 6px;
|
|
5220
|
+
border-bottom-right-radius: 6px;
|
|
5221
|
+
}
|
|
5222
|
+
.np-table-row--clickable:hover .np-table-cell:before {
|
|
5223
|
+
display: block;
|
|
5224
|
+
}
|
|
5225
|
+
.np-table-row--clickable:hover:focus-visible .np-table-cell:first-child:before,
|
|
5226
|
+
.np-table-row--clickable:hover:focus-visible .np-table-cell:last-child:before {
|
|
5227
|
+
width: 100%;
|
|
5228
|
+
}
|
|
5229
|
+
.np-table-row--clickable:hover:focus-visible .np-table-cell:first-child:before {
|
|
5230
|
+
left: 0;
|
|
5231
|
+
}
|
|
5232
|
+
.np-table-row--cosmetic .np-table-cell {
|
|
5233
|
+
height: 8px;
|
|
5234
|
+
height: var(--size-8);
|
|
5235
|
+
padding: 0;
|
|
5236
|
+
}
|
|
5237
|
+
.np-table-header,
|
|
5238
|
+
.np-table-cell {
|
|
5239
|
+
padding: 0;
|
|
5240
|
+
}
|
|
5241
|
+
.np-table-header:first-child,
|
|
5242
|
+
.np-table-cell:first-child {
|
|
5243
|
+
padding-left: 16px;
|
|
5244
|
+
padding-left: var(--size-16);
|
|
5245
|
+
}
|
|
5246
|
+
.np-table-header:first-child .np-table-header-content,
|
|
5247
|
+
.np-table-cell:first-child .np-table-header-content,
|
|
5248
|
+
.np-table-header:first-child .np-table-cell-content,
|
|
5249
|
+
.np-table-cell:first-child .np-table-cell-content {
|
|
5250
|
+
padding-left: 0;
|
|
5251
|
+
}
|
|
5252
|
+
.np-table-header:last-child,
|
|
5253
|
+
.np-table-cell:last-child {
|
|
5254
|
+
padding-right: 16px;
|
|
5255
|
+
padding-right: var(--size-16);
|
|
5256
|
+
}
|
|
5257
|
+
.np-table-header:last-child .np-table-header-content,
|
|
5258
|
+
.np-table-cell:last-child .np-table-header-content,
|
|
5259
|
+
.np-table-header:last-child .np-table-cell-content,
|
|
5260
|
+
.np-table-cell:last-child .np-table-cell-content {
|
|
5261
|
+
padding-right: 0;
|
|
5262
|
+
}
|
|
5263
|
+
.np-table-header.np-table-header--right > .np-text-body-default,
|
|
5264
|
+
.np-table-cell.np-table-cell--right > .np-text-body-default {
|
|
5265
|
+
text-align: right;
|
|
5266
|
+
}
|
|
5267
|
+
.np-table-header.np-table-header--right + .np-table-header:not(.np-table-header--right),
|
|
5268
|
+
.np-table-cell.np-table-cell--right + .np-table-cell:not(.np-table-cell--right) {
|
|
5269
|
+
padding-left: calc(8px + 12px);
|
|
5270
|
+
padding-left: calc(var(--size-8) + var(--size-12));
|
|
5271
|
+
}
|
|
5272
|
+
.np-table-header.np-table-header--right .np-table-header-content,
|
|
5273
|
+
.np-table-cell.np-table-cell--right .np-table-content {
|
|
5274
|
+
justify-content: end;
|
|
5275
|
+
}
|
|
5276
|
+
.np-table-header-content,
|
|
5277
|
+
.np-table-content {
|
|
5278
|
+
display: flex;
|
|
5279
|
+
align-items: center;
|
|
5280
|
+
justify-content: start;
|
|
5281
|
+
}
|
|
5282
|
+
.np-table-header {
|
|
5283
|
+
min-width: 160px;
|
|
5284
|
+
padding-right: 8px;
|
|
5285
|
+
padding-right: var(--size-8);
|
|
5286
|
+
padding-bottom: 8px;
|
|
5287
|
+
padding-bottom: var(--size-8);
|
|
5288
|
+
padding-left: 8px;
|
|
5289
|
+
padding-left: var(--size-8);
|
|
5290
|
+
background-color: rgba(134,167,189,0.10196);
|
|
5291
|
+
background-color: var(--color-background-neutral);
|
|
5292
|
+
color: var(--color-interactive-primary);
|
|
5293
|
+
}
|
|
5294
|
+
.np-table-header-content {
|
|
5295
|
+
padding-top: 5px;
|
|
5296
|
+
padding-bottom: 5px;
|
|
5297
|
+
white-space: nowrap;
|
|
5298
|
+
line-height: 1.375rem;
|
|
5299
|
+
line-height: var(--line-height-22);
|
|
5300
|
+
letter-spacing: 0.0125em;
|
|
5301
|
+
letter-spacing: var(--letter-spacing-sm);
|
|
5302
|
+
}
|
|
5303
|
+
.np-table-header--error {
|
|
5304
|
+
color: var(--color-sentiment-negative);
|
|
5305
|
+
}
|
|
5306
|
+
.np-table-header--action {
|
|
5307
|
+
min-width: 0;
|
|
5308
|
+
padding: 0;
|
|
5309
|
+
}
|
|
5310
|
+
.np-table-cell {
|
|
5311
|
+
padding: 16px 8px;
|
|
5312
|
+
padding: var(--size-16) var(--size-8);
|
|
5313
|
+
position: relative;
|
|
5314
|
+
}
|
|
5315
|
+
.np-table-cell--cosmetic {
|
|
5316
|
+
padding: 0;
|
|
5317
|
+
}
|
|
5318
|
+
.np-table-cell--primary {
|
|
5319
|
+
min-width: 200px;
|
|
5320
|
+
}
|
|
5321
|
+
.np-table-cell--currency .np-text-body-default {
|
|
5322
|
+
white-space: nowrap;
|
|
5323
|
+
}
|
|
5324
|
+
.np-table-cell .tw-chevron {
|
|
5325
|
+
margin-left: 8px;
|
|
5326
|
+
margin-left: var(--size-8);
|
|
5327
|
+
}
|
|
5328
|
+
.np-table-cell-separator {
|
|
5329
|
+
margin-top: 4px;
|
|
5330
|
+
margin-top: var(--size-4);
|
|
5331
|
+
margin-bottom: 4px;
|
|
5332
|
+
margin-bottom: var(--size-4);
|
|
5333
|
+
height: 1px;
|
|
5334
|
+
background-color: rgba(134,167,189,0.10196);
|
|
5335
|
+
background-color: var(--color-background-neutral);
|
|
5336
|
+
padding: 0;
|
|
5337
|
+
}
|
|
5338
|
+
.np-table-cell .np-text-body-default-bold {
|
|
5339
|
+
display: flex;
|
|
5340
|
+
align-items: center;
|
|
5341
|
+
color: #37517e;
|
|
5342
|
+
color: var(--color-content-primary);
|
|
5343
|
+
white-space: nowrap;
|
|
5344
|
+
}
|
|
5345
|
+
.np-table-cell .np-table-content--success {
|
|
5346
|
+
color: var(--color-sentiment-positive);
|
|
5347
|
+
}
|
|
5348
|
+
.np-table-cell .np-table-content--error {
|
|
5349
|
+
color: var(--color-sentiment-negative);
|
|
5350
|
+
}
|
|
5351
|
+
.np-table-cell .tw-loader {
|
|
5352
|
+
margin: 150px auto;
|
|
5353
|
+
}
|
|
5354
|
+
@media (max-width: 320px) {
|
|
5355
|
+
.np-table-cell .tw-loader {
|
|
5356
|
+
margin-top: 70px;
|
|
5357
|
+
margin-bottom: 70px;
|
|
5358
|
+
}
|
|
5359
|
+
}
|
|
5360
|
+
.np-table-content {
|
|
5361
|
+
gap: 12px;
|
|
5362
|
+
gap: var(--size-12);
|
|
5363
|
+
}
|
|
5364
|
+
.np-table-content--success,
|
|
5365
|
+
.np-table-content--error {
|
|
5366
|
+
gap: 4px;
|
|
5367
|
+
gap: var(--size-4);
|
|
5368
|
+
}
|
|
5369
|
+
.np-table-content--success .np-table-content-text,
|
|
5370
|
+
.np-table-content--error .np-table-content-text {
|
|
5371
|
+
line-height: 155%;
|
|
5372
|
+
}
|
|
5373
|
+
.np-table-content-media {
|
|
5374
|
+
flex-shrink: 0;
|
|
5375
|
+
}
|
|
5376
|
+
.np-table-content-body {
|
|
5377
|
+
display: flex;
|
|
5378
|
+
flex-direction: column;
|
|
5379
|
+
font-size: 0.75rem;
|
|
5380
|
+
font-size: var(--font-size-12);
|
|
5381
|
+
color: #768e9c;
|
|
5382
|
+
color: var(--color-content-tertiary);
|
|
5383
|
+
}
|
|
5384
|
+
.np-table-content--reversed {
|
|
5385
|
+
flex-direction: row-reverse;
|
|
5386
|
+
}
|
|
5387
|
+
.np-table-content--reversed .np-table-content-body {
|
|
5388
|
+
align-items: end;
|
|
5389
|
+
}
|
|
5390
|
+
.np-table-empty-data {
|
|
5391
|
+
display: flex;
|
|
5392
|
+
align-items: center;
|
|
5393
|
+
}
|
|
5394
|
+
.np-table-empty-data .status-circle {
|
|
5395
|
+
margin-right: 12px;
|
|
5396
|
+
margin-right: var(--size-12);
|
|
5397
|
+
}
|
|
5124
5398
|
.np-tile {
|
|
5125
5399
|
min-width: 120px;
|
|
5126
5400
|
border-radius: 10px;
|