@transferwise/components 0.0.0-experimental-9773c7e → 0.0.0-experimental-c0ebd4f
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/alert/Alert.js.map +1 -1
- package/build/alert/Alert.mjs.map +1 -1
- package/build/avatarWrapper/AvatarWrapper.js.map +1 -1
- package/build/avatarWrapper/AvatarWrapper.mjs.map +1 -1
- package/build/common/propsValues/sentiment.js +1 -0
- package/build/common/propsValues/sentiment.js.map +1 -1
- package/build/common/propsValues/sentiment.mjs +1 -0
- package/build/common/propsValues/sentiment.mjs.map +1 -1
- package/build/i18n/cs.json +9 -9
- package/build/i18n/cs.json.js +9 -9
- package/build/i18n/cs.json.mjs +9 -9
- package/build/index.js +0 -1
- package/build/index.js.map +1 -1
- package/build/index.mjs +1 -1
- package/build/main.css +60 -190
- package/build/statusIcon/StatusIcon.js +2 -2
- package/build/statusIcon/StatusIcon.js.map +1 -1
- package/build/statusIcon/StatusIcon.mjs +2 -2
- package/build/statusIcon/StatusIcon.mjs.map +1 -1
- package/build/styles/inputs/Input.css +28 -2
- package/build/styles/inputs/TextArea.css +28 -2
- package/build/styles/main.css +60 -190
- package/build/styles/popover/Popover.css +28 -2
- package/build/title/Title.js.map +1 -1
- package/build/title/Title.mjs.map +1 -1
- package/build/types/alert/Alert.d.ts +2 -2
- package/build/types/alert/Alert.d.ts.map +1 -1
- package/build/types/avatarWrapper/AvatarWrapper.d.ts +2 -2
- package/build/types/avatarWrapper/AvatarWrapper.d.ts.map +1 -1
- package/build/types/common/propsValues/sentiment.d.ts.map +1 -1
- package/build/types/index.d.ts +0 -2
- package/build/types/index.d.ts.map +1 -1
- package/build/types/statusIcon/StatusIcon.d.ts +3 -2
- package/build/types/statusIcon/StatusIcon.d.ts.map +1 -1
- package/build/types/test-utils/fake-data.d.ts +0 -1
- package/build/types/test-utils/fake-data.d.ts.map +1 -1
- package/build/types/title/Title.d.ts.map +1 -1
- package/package.json +4 -4
- package/src/alert/Alert.story.tsx +5 -3
- package/src/alert/Alert.tsx +11 -2
- package/src/avatarWrapper/AvatarWrapper.story.tsx +2 -2
- package/src/avatarWrapper/AvatarWrapper.tsx +3 -2
- package/src/common/propsValues/sentiment.ts +1 -0
- package/src/i18n/cs.json +9 -9
- package/src/index.ts +0 -2
- package/src/inputs/Input.css +28 -2
- package/src/inputs/TextArea.css +28 -2
- package/src/main.css +60 -190
- package/src/main.less +0 -1
- package/src/popover/Popover.css +28 -2
- package/src/statusIcon/StatusIcon.docs.mdx +1 -1
- package/src/statusIcon/StatusIcon.spec.tsx +10 -4
- package/src/statusIcon/StatusIcon.story.tsx +10 -5
- package/src/statusIcon/StatusIcon.tsx +6 -4
- package/src/test-utils/fake-data.ts +0 -3
- package/src/title/Title.test.story.tsx +19 -12
- package/src/title/Title.tsx +1 -0
- package/build/styles/item/Item.css +0 -186
- package/build/types/item/Item.d.ts +0 -40
- package/build/types/item/Item.d.ts.map +0 -1
- package/build/types/item/ItemAdditionalInfo.d.ts +0 -9
- package/build/types/item/ItemAdditionalInfo.d.ts.map +0 -1
- package/build/types/item/ItemCheckbox.d.ts +0 -4
- package/build/types/item/ItemCheckbox.d.ts.map +0 -1
- package/build/types/item/ItemIconButton.d.ts +0 -4
- package/build/types/item/ItemIconButton.d.ts.map +0 -1
- package/build/types/item/ItemImage.d.ts +0 -4
- package/build/types/item/ItemImage.d.ts.map +0 -1
- package/build/types/item/ItemNavigation.d.ts +0 -4
- package/build/types/item/ItemNavigation.d.ts.map +0 -1
- package/build/types/item/index.d.ts +0 -5
- package/build/types/item/index.d.ts.map +0 -1
- package/build/types/item/prompt/Prompt.d.ts +0 -12
- package/build/types/item/prompt/Prompt.d.ts.map +0 -1
- package/src/item/Item.css +0 -186
- package/src/item/Item.less +0 -177
- package/src/item/Item.story.tsx +0 -93
- package/src/item/Item.tsx +0 -165
- package/src/item/ItemAdditionalInfo.tsx +0 -31
- package/src/item/ItemCheckbox.tsx +0 -16
- package/src/item/ItemIconButton.tsx +0 -15
- package/src/item/ItemImage.tsx +0 -11
- package/src/item/ItemNavigation.tsx +0 -16
- package/src/item/index.ts +0 -4
- package/src/item/prompt/Prompt.spec.tsx +0 -77
- package/src/item/prompt/Prompt.story.tsx +0 -170
- package/src/item/prompt/Prompt.tsx +0 -44
|
@@ -10,6 +10,7 @@ import {
|
|
|
10
10
|
Size,
|
|
11
11
|
Sentiment,
|
|
12
12
|
getInitials,
|
|
13
|
+
Status,
|
|
13
14
|
} from '../common';
|
|
14
15
|
import StatusIcon from '../statusIcon/StatusIcon';
|
|
15
16
|
|
|
@@ -17,7 +18,7 @@ interface OptionalBadgeProps extends Omit<BadgeProps, 'badge'> {
|
|
|
17
18
|
url?: string;
|
|
18
19
|
ariaLabel?: string;
|
|
19
20
|
altText?: string;
|
|
20
|
-
statusIcon?: Sentiment;
|
|
21
|
+
statusIcon?: Sentiment | Status.PENDING;
|
|
21
22
|
}
|
|
22
23
|
|
|
23
24
|
const OptionalBadge = ({
|
|
@@ -66,7 +67,7 @@ export type AvatarWrapperProps = {
|
|
|
66
67
|
| {
|
|
67
68
|
badgeUrl?: never;
|
|
68
69
|
badgeAltText?: never;
|
|
69
|
-
badgeStatusIcon: Sentiment;
|
|
70
|
+
badgeStatusIcon: Sentiment | Status.PENDING;
|
|
70
71
|
}
|
|
71
72
|
| {
|
|
72
73
|
badgeUrl?: never;
|
package/src/i18n/cs.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"neptune.Button.loadingAriaLabel": "načítání",
|
|
3
|
-
"neptune.Chips.ariaLabel": "
|
|
4
|
-
"neptune.ClearButton.ariaLabel": "
|
|
3
|
+
"neptune.Chips.ariaLabel": "Vymazat {choice}",
|
|
4
|
+
"neptune.ClearButton.ariaLabel": "Vymazat",
|
|
5
5
|
"neptune.CloseButton.ariaLabel": "Zavřít",
|
|
6
6
|
"neptune.DateInput.day.label": "Den",
|
|
7
7
|
"neptune.DateInput.day.placeholder": "DD",
|
|
@@ -47,25 +47,25 @@
|
|
|
47
47
|
"neptune.Upload.csWrongTypeMessage": "Tento formát souboru není podporován. Zkuste to znovu s jiným souborem",
|
|
48
48
|
"neptune.Upload.psButtonText": "Zrušit",
|
|
49
49
|
"neptune.Upload.psProcessingText": "Načítání...",
|
|
50
|
-
"neptune.Upload.retry": "
|
|
50
|
+
"neptune.Upload.retry": "Zkusit znovu",
|
|
51
51
|
"neptune.Upload.usButtonText": "Nebo vyberte soubor",
|
|
52
|
-
"neptune.Upload.usDropMessage": "
|
|
52
|
+
"neptune.Upload.usDropMessage": "Přetáhněte soubor a zahajte nahrávání",
|
|
53
53
|
"neptune.Upload.usPlaceholder": "Přetáhněte soubor menší než {maxSize} MB",
|
|
54
54
|
"neptune.UploadButton.allFileTypes": "Všechny typy souborů",
|
|
55
|
-
"neptune.UploadButton.dropFiles": "
|
|
56
|
-
"neptune.UploadButton.instructions": "{fileTypes}, menší než {size}MB",
|
|
55
|
+
"neptune.UploadButton.dropFiles": "Přetáhněte soubor a zahajte nahrávání",
|
|
56
|
+
"neptune.UploadButton.instructions": "{fileTypes}, menší než {size} MB",
|
|
57
57
|
"neptune.UploadButton.maximumFiles": "Max. počet souborů: {maxFiles}.",
|
|
58
58
|
"neptune.UploadButton.uploadFile": "Nahrát soubor",
|
|
59
59
|
"neptune.UploadButton.uploadFiles": "Nahrát soubory",
|
|
60
60
|
"neptune.UploadInput.deleteModalBody": "Odstraněním tohoto souboru jej smažete z našeho systému.",
|
|
61
61
|
"neptune.UploadInput.deleteModalCancelButtonText": "Zrušit",
|
|
62
62
|
"neptune.UploadInput.deleteModalConfirmButtonText": "Odstranit",
|
|
63
|
-
"neptune.UploadInput.deleteModalTitle": "
|
|
63
|
+
"neptune.UploadInput.deleteModalTitle": "Opravdu chcete odstranit tento soubor?",
|
|
64
64
|
"neptune.UploadInput.fileIsTooLarge": "Soubor je příliš velký",
|
|
65
65
|
"neptune.UploadInput.fileTypeNotSupported": "Typ souboru není podporován",
|
|
66
66
|
"neptune.UploadInput.maximumFilesAlreadyUploaded": "Je nám líto, ale toto nahrání se nezdařilo, protože můžeme přijmout pouze {maxFilesAllowed} souborů najednou.",
|
|
67
|
-
"neptune.UploadItem.deleting": "
|
|
68
|
-
"neptune.UploadItem.removeFile": "
|
|
67
|
+
"neptune.UploadItem.deleting": "Odstraňování...",
|
|
68
|
+
"neptune.UploadItem.removeFile": "Odebrat soubor {filename}",
|
|
69
69
|
"neptune.UploadItem.uploaded": "Nahráno",
|
|
70
70
|
"neptune.UploadItem.uploadedFile": "Nahraný soubor",
|
|
71
71
|
"neptune.UploadItem.uploading": "Nahrávání...",
|
package/src/index.ts
CHANGED
|
@@ -109,7 +109,6 @@ export type {
|
|
|
109
109
|
TableCellStatus,
|
|
110
110
|
TableCellType,
|
|
111
111
|
} from './table';
|
|
112
|
-
export type { ItemProps, ItemAdditionalInfoProps, ItemCheckboxProps } from './item';
|
|
113
112
|
|
|
114
113
|
/**
|
|
115
114
|
* Components
|
|
@@ -212,7 +211,6 @@ export { default as Typeahead } from './typeahead';
|
|
|
212
211
|
export { default as Upload } from './upload';
|
|
213
212
|
export { default as UploadInput } from './uploadInput';
|
|
214
213
|
export { default as Table } from './table';
|
|
215
|
-
export { default as Item } from './table';
|
|
216
214
|
|
|
217
215
|
/**
|
|
218
216
|
* Hooks
|
package/src/inputs/Input.css
CHANGED
|
@@ -71,8 +71,6 @@
|
|
|
71
71
|
line-height: 1.2;
|
|
72
72
|
line-height: var(--line-height-title);
|
|
73
73
|
letter-spacing: 0;
|
|
74
|
-
-webkit-hyphens: auto;
|
|
75
|
-
hyphens: auto;
|
|
76
74
|
margin-bottom: 0;
|
|
77
75
|
margin-bottom: initial;
|
|
78
76
|
font-size: 1.375rem;
|
|
@@ -83,6 +81,34 @@
|
|
|
83
81
|
line-height: 125%;
|
|
84
82
|
height: 72px !important;
|
|
85
83
|
height: var(--size-72) !important;
|
|
84
|
+
}@supports (hyphenate-limit-chars: 1) {
|
|
85
|
+
.np-form-control--size-lg {
|
|
86
|
+
-webkit-hyphens: auto;
|
|
87
|
+
hyphens: auto;
|
|
88
|
+
hyphenate-limit-chars: 7 3;
|
|
89
|
+
}
|
|
90
|
+
@media (min-width: 768px) {
|
|
91
|
+
.np-form-control--size-lg {
|
|
92
|
+
hyphenate-limit-chars: 8 3;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
@media (min-width: 992px) {
|
|
96
|
+
.np-form-control--size-lg {
|
|
97
|
+
hyphenate-limit-chars: 10 4 3;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}@supports (not (hyphenate-limit-chars: 1)) and (-webkit-hyphenate-limit-before: 1) {
|
|
101
|
+
.np-form-control--size-lg {
|
|
102
|
+
-webkit-hyphens: auto;
|
|
103
|
+
hyphens: auto;
|
|
104
|
+
-webkit-hyphenate-limit-before: 3;
|
|
105
|
+
-webkit-hyphenate-limit-after: 3;
|
|
106
|
+
}
|
|
107
|
+
@media (min-width: 992px) {
|
|
108
|
+
.np-form-control--size-lg {
|
|
109
|
+
-webkit-hyphenate-limit-before: 4;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
86
112
|
}.np-form-control--size-lg + p,
|
|
87
113
|
.np-form-control--size-lg + ul:not(.list-unstyled),
|
|
88
114
|
.np-form-control--size-lg + ol:not(.list-unstyled) {
|
package/src/inputs/TextArea.css
CHANGED
|
@@ -71,8 +71,6 @@
|
|
|
71
71
|
line-height: 1.2;
|
|
72
72
|
line-height: var(--line-height-title);
|
|
73
73
|
letter-spacing: 0;
|
|
74
|
-
-webkit-hyphens: auto;
|
|
75
|
-
hyphens: auto;
|
|
76
74
|
margin-bottom: 0;
|
|
77
75
|
margin-bottom: initial;
|
|
78
76
|
font-size: 1.375rem;
|
|
@@ -83,6 +81,34 @@
|
|
|
83
81
|
line-height: 125%;
|
|
84
82
|
height: 72px !important;
|
|
85
83
|
height: var(--size-72) !important;
|
|
84
|
+
}@supports (hyphenate-limit-chars: 1) {
|
|
85
|
+
.np-form-control--size-lg {
|
|
86
|
+
-webkit-hyphens: auto;
|
|
87
|
+
hyphens: auto;
|
|
88
|
+
hyphenate-limit-chars: 7 3;
|
|
89
|
+
}
|
|
90
|
+
@media (min-width: 768px) {
|
|
91
|
+
.np-form-control--size-lg {
|
|
92
|
+
hyphenate-limit-chars: 8 3;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
@media (min-width: 992px) {
|
|
96
|
+
.np-form-control--size-lg {
|
|
97
|
+
hyphenate-limit-chars: 10 4 3;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}@supports (not (hyphenate-limit-chars: 1)) and (-webkit-hyphenate-limit-before: 1) {
|
|
101
|
+
.np-form-control--size-lg {
|
|
102
|
+
-webkit-hyphens: auto;
|
|
103
|
+
hyphens: auto;
|
|
104
|
+
-webkit-hyphenate-limit-before: 3;
|
|
105
|
+
-webkit-hyphenate-limit-after: 3;
|
|
106
|
+
}
|
|
107
|
+
@media (min-width: 992px) {
|
|
108
|
+
.np-form-control--size-lg {
|
|
109
|
+
-webkit-hyphenate-limit-before: 4;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
86
112
|
}.np-form-control--size-lg + p,
|
|
87
113
|
.np-form-control--size-lg + ul:not(.list-unstyled),
|
|
88
114
|
.np-form-control--size-lg + ol:not(.list-unstyled) {
|
package/src/main.css
CHANGED
|
@@ -2585,8 +2585,6 @@ html:not([dir="rtl"]) .np-flow-navigation--sm .np-flow-navigation__stepper {
|
|
|
2585
2585
|
line-height: 1.2;
|
|
2586
2586
|
line-height: var(--line-height-title);
|
|
2587
2587
|
letter-spacing: 0;
|
|
2588
|
-
-webkit-hyphens: auto;
|
|
2589
|
-
hyphens: auto;
|
|
2590
2588
|
margin-bottom: 0;
|
|
2591
2589
|
margin-bottom: initial;
|
|
2592
2590
|
font-size: 1.375rem;
|
|
@@ -2598,6 +2596,36 @@ html:not([dir="rtl"]) .np-flow-navigation--sm .np-flow-navigation__stepper {
|
|
|
2598
2596
|
height: 72px !important;
|
|
2599
2597
|
height: var(--size-72) !important;
|
|
2600
2598
|
}
|
|
2599
|
+
@supports (hyphenate-limit-chars: 1) {
|
|
2600
|
+
.np-form-control--size-lg {
|
|
2601
|
+
-webkit-hyphens: auto;
|
|
2602
|
+
hyphens: auto;
|
|
2603
|
+
hyphenate-limit-chars: 7 3;
|
|
2604
|
+
}
|
|
2605
|
+
@media (min-width: 768px) {
|
|
2606
|
+
.np-form-control--size-lg {
|
|
2607
|
+
hyphenate-limit-chars: 8 3;
|
|
2608
|
+
}
|
|
2609
|
+
}
|
|
2610
|
+
@media (min-width: 992px) {
|
|
2611
|
+
.np-form-control--size-lg {
|
|
2612
|
+
hyphenate-limit-chars: 10 4 3;
|
|
2613
|
+
}
|
|
2614
|
+
}
|
|
2615
|
+
}
|
|
2616
|
+
@supports (not (hyphenate-limit-chars: 1)) and (-webkit-hyphenate-limit-before: 1) {
|
|
2617
|
+
.np-form-control--size-lg {
|
|
2618
|
+
-webkit-hyphens: auto;
|
|
2619
|
+
hyphens: auto;
|
|
2620
|
+
-webkit-hyphenate-limit-before: 3;
|
|
2621
|
+
-webkit-hyphenate-limit-after: 3;
|
|
2622
|
+
}
|
|
2623
|
+
@media (min-width: 992px) {
|
|
2624
|
+
.np-form-control--size-lg {
|
|
2625
|
+
-webkit-hyphenate-limit-before: 4;
|
|
2626
|
+
}
|
|
2627
|
+
}
|
|
2628
|
+
}
|
|
2601
2629
|
.np-form-control--size-lg + p,
|
|
2602
2630
|
.np-form-control--size-lg + ul:not(.list-unstyled),
|
|
2603
2631
|
.np-form-control--size-lg + ol:not(.list-unstyled) {
|
|
@@ -2620,192 +2648,6 @@ html:not([dir="rtl"]) .np-flow-navigation--sm .np-flow-navigation__stepper {
|
|
|
2620
2648
|
border-radius: 9999px !important;
|
|
2621
2649
|
border-radius: var(--radius-full) !important;
|
|
2622
2650
|
}
|
|
2623
|
-
.np-item {
|
|
2624
|
-
padding: 16px;
|
|
2625
|
-
padding: var(--size-16);
|
|
2626
|
-
border-radius: 24px;
|
|
2627
|
-
border-radius: var(--radius-large);
|
|
2628
|
-
background-color: #ffffff;
|
|
2629
|
-
background-color: var(--color-background-screen);
|
|
2630
|
-
display: flex;
|
|
2631
|
-
gap: 16px;
|
|
2632
|
-
gap: var(--size-16);
|
|
2633
|
-
align-items: center;
|
|
2634
|
-
flex-direction: row;
|
|
2635
|
-
cursor: pointer;
|
|
2636
|
-
}
|
|
2637
|
-
.np-item:hover {
|
|
2638
|
-
background-color: var(--color-background-screen-hover);
|
|
2639
|
-
}
|
|
2640
|
-
.np-item:active {
|
|
2641
|
-
background-color: var(--color-background-screen-active);
|
|
2642
|
-
}
|
|
2643
|
-
.np-item-media {
|
|
2644
|
-
flex: 0 0 auto;
|
|
2645
|
-
align-items: flex-start;
|
|
2646
|
-
}
|
|
2647
|
-
.np-item-title {
|
|
2648
|
-
color: #37517e;
|
|
2649
|
-
color: var(--color-content-primary);
|
|
2650
|
-
}
|
|
2651
|
-
.np-item-additional-info {
|
|
2652
|
-
color: #768e9c;
|
|
2653
|
-
color: var(--color-content-tertiary);
|
|
2654
|
-
}
|
|
2655
|
-
.np-item-value {
|
|
2656
|
-
flex: 0 0 auto;
|
|
2657
|
-
}
|
|
2658
|
-
.np-item-control {
|
|
2659
|
-
flex: 0 0 auto;
|
|
2660
|
-
}
|
|
2661
|
-
.np-item-spotlight-active {
|
|
2662
|
-
background-color: rgba(134,167,189,0.10196);
|
|
2663
|
-
background-color: var(--color-background-neutral);
|
|
2664
|
-
}
|
|
2665
|
-
.np-item-spotlight-active:hover {
|
|
2666
|
-
background-color: var(--color-background-neutral-hover);
|
|
2667
|
-
}
|
|
2668
|
-
.np-item-spotlight-active:active {
|
|
2669
|
-
background-color: var(--color-background-neutral-active);
|
|
2670
|
-
}
|
|
2671
|
-
.np-item-spotlight-inactive {
|
|
2672
|
-
background-color: rgba(134, 167, 189, 0.025);
|
|
2673
|
-
border: 1px dashed rgba(0,0,0,0.10196);
|
|
2674
|
-
border: 1px dashed var(--color-border-neutral);
|
|
2675
|
-
}
|
|
2676
|
-
@supports (color: color-mix(in lch, red, blue)) {
|
|
2677
|
-
.np-item-spotlight-inactive {
|
|
2678
|
-
background-color: color-mix(in srgb, var(--color-background-neutral) 25%, transparent);
|
|
2679
|
-
}
|
|
2680
|
-
}
|
|
2681
|
-
.np-item-spotlight-inactive:hover {
|
|
2682
|
-
background-color: color-mix(in srgb, var(--color-background-neutral-hover) 25%, transparent);
|
|
2683
|
-
}
|
|
2684
|
-
.np-item-spotlight-inactive:active {
|
|
2685
|
-
background-color: color-mix(in srgb, var(--color-background-neutral-active) 25%, transparent);
|
|
2686
|
-
}
|
|
2687
|
-
.np-item-prompt {
|
|
2688
|
-
display: inline-flex;
|
|
2689
|
-
padding-top: calc(8px / 2);
|
|
2690
|
-
padding-top: calc(var(--padding-x-small) / 2);
|
|
2691
|
-
padding-bottom: calc(8px / 2);
|
|
2692
|
-
padding-bottom: calc(var(--padding-x-small) / 2);
|
|
2693
|
-
padding-left: calc(8px - 1px);
|
|
2694
|
-
padding-left: calc(var(--padding-x-small) - 1px);
|
|
2695
|
-
padding-right: 8px;
|
|
2696
|
-
padding-right: var(--padding-x-small);
|
|
2697
|
-
border-radius: 10px;
|
|
2698
|
-
border-radius: var(--radius-small);
|
|
2699
|
-
word-break: break-word;
|
|
2700
|
-
word-wrap: break-word;
|
|
2701
|
-
}
|
|
2702
|
-
.np-item-prompt .np-prompt-icon {
|
|
2703
|
-
padding-right: calc(12px / 2);
|
|
2704
|
-
padding-right: calc(var(--size-12) / 2);
|
|
2705
|
-
padding-top: calc(4px - 1);
|
|
2706
|
-
padding-top: calc(var(--size-4) - 1);
|
|
2707
|
-
padding-bottom: calc(4px - 1);
|
|
2708
|
-
padding-bottom: calc(var(--size-4) - 1);
|
|
2709
|
-
}
|
|
2710
|
-
.np-item-prompt .np-prompt-icon .tw-icon-tags,
|
|
2711
|
-
.np-item-prompt .np-prompt-icon .tw-icon-confetti {
|
|
2712
|
-
color: var(--color-sentiment-positive-primary);
|
|
2713
|
-
}
|
|
2714
|
-
.np-item-prompt a {
|
|
2715
|
-
text-underline-offset: calc(4px / 2);
|
|
2716
|
-
text-underline-offset: calc(var(--size-4) / 2);
|
|
2717
|
-
}
|
|
2718
|
-
.np-item-prompt.np-prompt-interactive {
|
|
2719
|
-
-webkit-text-decoration: none;
|
|
2720
|
-
text-decoration: none;
|
|
2721
|
-
cursor: pointer;
|
|
2722
|
-
border: none;
|
|
2723
|
-
}
|
|
2724
|
-
.np-item-prompt.negative {
|
|
2725
|
-
background-color: var(--color-sentiment-negative-secondary);
|
|
2726
|
-
color: var(--color-sentiment-negative-primary);
|
|
2727
|
-
}
|
|
2728
|
-
.np-item-prompt.negative a {
|
|
2729
|
-
color: var(--color-sentiment-negative-primary);
|
|
2730
|
-
}
|
|
2731
|
-
.np-item-prompt.negative a:hover {
|
|
2732
|
-
color: var(--color-sentiment-negative-primary-hover);
|
|
2733
|
-
}
|
|
2734
|
-
.np-item-prompt.negative a:active {
|
|
2735
|
-
color: var(--color-sentiment-negative-primary-active);
|
|
2736
|
-
}
|
|
2737
|
-
.np-prompt-interactive.np-item-prompt.negative:hover {
|
|
2738
|
-
background-color: color-mix(in srgb, var(--color-sentiment-negative-secondary) 95%, var(--color-sentiment-negative-primary));
|
|
2739
|
-
}
|
|
2740
|
-
.np-prompt-interactive.np-item-prompt.negative:active {
|
|
2741
|
-
background-color: color-mix(in srgb, var(--color-sentiment-negative-secondary) 90%, var(--color-sentiment-negative-primary));
|
|
2742
|
-
}
|
|
2743
|
-
.np-item-prompt.positive,
|
|
2744
|
-
.np-item-prompt.discount,
|
|
2745
|
-
.np-item-prompt.savings {
|
|
2746
|
-
background-color: var(--color-sentiment-positive-secondary);
|
|
2747
|
-
color: var(--color-sentiment-positive-primary);
|
|
2748
|
-
}
|
|
2749
|
-
.np-item-prompt.positive a,
|
|
2750
|
-
.np-item-prompt.discount a,
|
|
2751
|
-
.np-item-prompt.savings a {
|
|
2752
|
-
color: var(--color-sentiment-positive-primary);
|
|
2753
|
-
}
|
|
2754
|
-
.np-item-prompt.positive a:hover,
|
|
2755
|
-
.np-item-prompt.discount a:hover,
|
|
2756
|
-
.np-item-prompt.savings a:hover {
|
|
2757
|
-
color: var(--color-sentiment-positive-primary-hover);
|
|
2758
|
-
}
|
|
2759
|
-
.np-item-prompt.positive a:active,
|
|
2760
|
-
.np-item-prompt.discount a:active,
|
|
2761
|
-
.np-item-prompt.savings a:active {
|
|
2762
|
-
color: var(--color-sentiment-positive-primary-active);
|
|
2763
|
-
}
|
|
2764
|
-
.np-prompt-interactive.np-item-prompt.positive:hover,
|
|
2765
|
-
.np-prompt-interactive.np-item-prompt.discount:hover,
|
|
2766
|
-
.np-prompt-interactive.np-item-prompt.savings:hover {
|
|
2767
|
-
background-color: color-mix(in srgb, var(--color-sentiment-positive-secondary) 95%, var(--color-sentiment-positive-primary));
|
|
2768
|
-
}
|
|
2769
|
-
.np-prompt-interactive.np-item-prompt.positive:active,
|
|
2770
|
-
.np-prompt-interactive.np-item-prompt.discount:active,
|
|
2771
|
-
.np-prompt-interactive.np-item-prompt.savings:active {
|
|
2772
|
-
background-color: color-mix(in srgb, var(--color-sentiment-positive-secondary) 90%, var(--color-sentiment-positive-primary));
|
|
2773
|
-
}
|
|
2774
|
-
.np-item-prompt.neutral {
|
|
2775
|
-
background-color: rgba(134,167,189,0.10196);
|
|
2776
|
-
background-color: var(--color-background-neutral);
|
|
2777
|
-
color: #37517e;
|
|
2778
|
-
color: var(--color-content-primary);
|
|
2779
|
-
}
|
|
2780
|
-
.np-item-prompt.neutral a {
|
|
2781
|
-
color: #37517e;
|
|
2782
|
-
color: var(--color-content-primary);
|
|
2783
|
-
}
|
|
2784
|
-
.np-prompt-interactive.np-item-prompt.neutral:hover {
|
|
2785
|
-
background-color: var(--color-background-neutral-hover);
|
|
2786
|
-
}
|
|
2787
|
-
.np-prompt-interactive.np-item-prompt.neutral:active {
|
|
2788
|
-
background-color: var(--color-background-neutral-active);
|
|
2789
|
-
}
|
|
2790
|
-
.np-item-prompt.warning {
|
|
2791
|
-
background-color: var(--color-sentiment-warning-secondary);
|
|
2792
|
-
color: var(--color-sentiment-warning-content);
|
|
2793
|
-
}
|
|
2794
|
-
.np-item-prompt.warning a {
|
|
2795
|
-
color: var(--color-sentiment-warning-content);
|
|
2796
|
-
}
|
|
2797
|
-
.np-item-prompt.warning a:hover {
|
|
2798
|
-
color: var(--color-sentiment-warning-content-hover);
|
|
2799
|
-
}
|
|
2800
|
-
.np-item-prompt.warning a:active {
|
|
2801
|
-
color: var(--color-sentiment-warning-content-active);
|
|
2802
|
-
}
|
|
2803
|
-
.np-prompt-interactive.np-item-prompt.warning:hover {
|
|
2804
|
-
background-color: color-mix(in srgb, var(--color-sentiment-warning-secondary) 90%, var(--color-sentiment-warning-primary));
|
|
2805
|
-
}
|
|
2806
|
-
.np-prompt-interactive.np-item-prompt.warning:active {
|
|
2807
|
-
background-color: color-mix(in srgb, var(--color-sentiment-warning-secondary) 80%, var(--color-sentiment-warning-primary));
|
|
2808
|
-
}
|
|
2809
2651
|
.np-field-control {
|
|
2810
2652
|
margin-top: 4px;
|
|
2811
2653
|
margin-top: var(--size-4);
|
|
@@ -4209,8 +4051,6 @@ html:not([dir="rtl"]) .np-navigation-option {
|
|
|
4209
4051
|
line-height: 1.2;
|
|
4210
4052
|
line-height: var(--line-height-title);
|
|
4211
4053
|
letter-spacing: 0;
|
|
4212
|
-
-webkit-hyphens: auto;
|
|
4213
|
-
hyphens: auto;
|
|
4214
4054
|
margin-bottom: 0;
|
|
4215
4055
|
margin-bottom: initial;
|
|
4216
4056
|
font-weight: 600;
|
|
@@ -4220,6 +4060,36 @@ html:not([dir="rtl"]) .np-navigation-option {
|
|
|
4220
4060
|
letter-spacing: -0.02em;
|
|
4221
4061
|
line-height: 122%;
|
|
4222
4062
|
}
|
|
4063
|
+
@supports (hyphenate-limit-chars: 1) {
|
|
4064
|
+
.np-popover__container.np-bottom-sheet .np-popover__title {
|
|
4065
|
+
-webkit-hyphens: auto;
|
|
4066
|
+
hyphens: auto;
|
|
4067
|
+
hyphenate-limit-chars: 7 3;
|
|
4068
|
+
}
|
|
4069
|
+
@media (min-width: 768px) {
|
|
4070
|
+
.np-popover__container.np-bottom-sheet .np-popover__title {
|
|
4071
|
+
hyphenate-limit-chars: 8 3;
|
|
4072
|
+
}
|
|
4073
|
+
}
|
|
4074
|
+
@media (min-width: 992px) {
|
|
4075
|
+
.np-popover__container.np-bottom-sheet .np-popover__title {
|
|
4076
|
+
hyphenate-limit-chars: 10 4 3;
|
|
4077
|
+
}
|
|
4078
|
+
}
|
|
4079
|
+
}
|
|
4080
|
+
@supports (not (hyphenate-limit-chars: 1)) and (-webkit-hyphenate-limit-before: 1) {
|
|
4081
|
+
.np-popover__container.np-bottom-sheet .np-popover__title {
|
|
4082
|
+
-webkit-hyphens: auto;
|
|
4083
|
+
hyphens: auto;
|
|
4084
|
+
-webkit-hyphenate-limit-before: 3;
|
|
4085
|
+
-webkit-hyphenate-limit-after: 3;
|
|
4086
|
+
}
|
|
4087
|
+
@media (min-width: 992px) {
|
|
4088
|
+
.np-popover__container.np-bottom-sheet .np-popover__title {
|
|
4089
|
+
-webkit-hyphenate-limit-before: 4;
|
|
4090
|
+
}
|
|
4091
|
+
}
|
|
4092
|
+
}
|
|
4223
4093
|
.np-popover__container.np-bottom-sheet .np-popover__title + p,
|
|
4224
4094
|
.np-popover__container.np-bottom-sheet .np-popover__title + ul:not(.list-unstyled),
|
|
4225
4095
|
.np-popover__container.np-bottom-sheet .np-popover__title + ol:not(.list-unstyled) {
|
package/src/main.less
CHANGED
package/src/popover/Popover.css
CHANGED
|
@@ -24,8 +24,6 @@
|
|
|
24
24
|
line-height: 1.2;
|
|
25
25
|
line-height: var(--line-height-title);
|
|
26
26
|
letter-spacing: 0;
|
|
27
|
-
-webkit-hyphens: auto;
|
|
28
|
-
hyphens: auto;
|
|
29
27
|
margin-bottom: 0;
|
|
30
28
|
margin-bottom: initial;
|
|
31
29
|
font-weight: 600;
|
|
@@ -34,6 +32,34 @@
|
|
|
34
32
|
font-size: var(--font-size-26);
|
|
35
33
|
letter-spacing: -0.02em;
|
|
36
34
|
line-height: 122%;
|
|
35
|
+
}@supports (hyphenate-limit-chars: 1) {
|
|
36
|
+
.np-popover__container.np-bottom-sheet .np-popover__title {
|
|
37
|
+
-webkit-hyphens: auto;
|
|
38
|
+
hyphens: auto;
|
|
39
|
+
hyphenate-limit-chars: 7 3;
|
|
40
|
+
}
|
|
41
|
+
@media (min-width: 768px) {
|
|
42
|
+
.np-popover__container.np-bottom-sheet .np-popover__title {
|
|
43
|
+
hyphenate-limit-chars: 8 3;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
@media (min-width: 992px) {
|
|
47
|
+
.np-popover__container.np-bottom-sheet .np-popover__title {
|
|
48
|
+
hyphenate-limit-chars: 10 4 3;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}@supports (not (hyphenate-limit-chars: 1)) and (-webkit-hyphenate-limit-before: 1) {
|
|
52
|
+
.np-popover__container.np-bottom-sheet .np-popover__title {
|
|
53
|
+
-webkit-hyphens: auto;
|
|
54
|
+
hyphens: auto;
|
|
55
|
+
-webkit-hyphenate-limit-before: 3;
|
|
56
|
+
-webkit-hyphenate-limit-after: 3;
|
|
57
|
+
}
|
|
58
|
+
@media (min-width: 992px) {
|
|
59
|
+
.np-popover__container.np-bottom-sheet .np-popover__title {
|
|
60
|
+
-webkit-hyphenate-limit-before: 4;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
37
63
|
}.np-popover__container.np-bottom-sheet .np-popover__title + p,
|
|
38
64
|
.np-popover__container.np-bottom-sheet .np-popover__title + ul:not(.list-unstyled),
|
|
39
65
|
.np-popover__container.np-bottom-sheet .np-popover__title + ol:not(.list-unstyled) {
|
|
@@ -10,7 +10,7 @@ By default, the component offers accessible names for all the icons, to ensure t
|
|
|
10
10
|
Sentiment.NEGATIVE -> 'Error:'
|
|
11
11
|
Sentiment.POSITIVE -> 'Success:'
|
|
12
12
|
Sentiment.WARNING -> 'Warning:'
|
|
13
|
-
|
|
13
|
+
Status.PENDING -> 'Pending:'
|
|
14
14
|
Sentiment.NEUTRAL -> 'Information:'
|
|
15
15
|
|
|
16
16
|
// deprecated
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { Sentiment, Size } from '../common';
|
|
1
|
+
import { Sentiment, Size, Status } from '../common';
|
|
2
2
|
import { render, cleanup, screen, mockMatchMedia } from '../test-utils';
|
|
3
3
|
|
|
4
4
|
import StatusIcon, { type StatusIconProps } from '.';
|
|
5
|
+
import { StatusIconSentiment } from './StatusIcon';
|
|
5
6
|
|
|
6
7
|
mockMatchMedia();
|
|
7
8
|
|
|
@@ -29,12 +30,13 @@ describe('StatusIcon', () => {
|
|
|
29
30
|
[Sentiment.NEGATIVE, Sentiment.NEGATIVE],
|
|
30
31
|
[Sentiment.NEUTRAL, Sentiment.NEUTRAL],
|
|
31
32
|
[Sentiment.PENDING, Sentiment.PENDING],
|
|
33
|
+
[Status.PENDING, Status.PENDING],
|
|
32
34
|
[Sentiment.POSITIVE, Sentiment.POSITIVE],
|
|
33
35
|
[Sentiment.WARNING, Sentiment.WARNING],
|
|
34
36
|
])(
|
|
35
37
|
"if prop 'sentiment' equals '%s' is passed, renders the status icon with class '%s'",
|
|
36
38
|
(sentiment, expectedClass) => {
|
|
37
|
-
renderStatusIcon({ sentiment });
|
|
39
|
+
renderStatusIcon({ sentiment: sentiment as StatusIconSentiment });
|
|
38
40
|
|
|
39
41
|
expect(screen.getByTestId('status-icon')).toHaveClass(expectedClass);
|
|
40
42
|
cleanup();
|
|
@@ -48,6 +50,10 @@ describe('StatusIcon', () => {
|
|
|
48
50
|
|
|
49
51
|
renderStatusIcon({ sentiment: Sentiment.PENDING });
|
|
50
52
|
expect(screen.getByTestId('clock-borderless-icon')).toHaveClass('dark');
|
|
53
|
+
cleanup();
|
|
54
|
+
|
|
55
|
+
renderStatusIcon({ sentiment: Status.PENDING });
|
|
56
|
+
expect(screen.getByTestId('clock-borderless-icon')).toHaveClass('dark');
|
|
51
57
|
});
|
|
52
58
|
|
|
53
59
|
it("'positive', 'negative', and 'neutral' sentiments generate 'light' colored icons", () => {
|
|
@@ -68,13 +74,13 @@ describe('StatusIcon', () => {
|
|
|
68
74
|
['Error', Sentiment.NEGATIVE],
|
|
69
75
|
['Success', Sentiment.POSITIVE],
|
|
70
76
|
['Warning', Sentiment.WARNING],
|
|
71
|
-
['Pending',
|
|
77
|
+
['Pending', Status.PENDING],
|
|
72
78
|
['Information', Sentiment.NEUTRAL],
|
|
73
79
|
['Error', Sentiment.ERROR],
|
|
74
80
|
['Information', Sentiment.INFO],
|
|
75
81
|
['Success', Sentiment.SUCCESS],
|
|
76
82
|
])("should set '%s' as an accessible name for the '%s' sentiment", (label, sentiment) => {
|
|
77
|
-
renderStatusIcon({ sentiment });
|
|
83
|
+
renderStatusIcon({ sentiment: sentiment as StatusIconSentiment });
|
|
78
84
|
|
|
79
85
|
expect(screen.getByLabelText(`${label}:`)).toBeInTheDocument();
|
|
80
86
|
});
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Meta, StoryObj } from '@storybook/react';
|
|
2
2
|
|
|
3
|
-
import { Sentiment, Size } from '../common';
|
|
3
|
+
import { Sentiment, Size, Status } from '../common';
|
|
4
4
|
|
|
5
|
-
import StatusIcon from './StatusIcon';
|
|
5
|
+
import StatusIcon, { StatusIconSentiment } from './StatusIcon';
|
|
6
6
|
import { storyConfig } from '../test-utils';
|
|
7
7
|
|
|
8
8
|
export default {
|
|
@@ -42,6 +42,7 @@ export const Variants = storyConfig(
|
|
|
42
42
|
Sentiment.WARNING,
|
|
43
43
|
Sentiment.NEUTRAL,
|
|
44
44
|
Sentiment.PENDING,
|
|
45
|
+
Status.PENDING,
|
|
45
46
|
].map((sentiment) => {
|
|
46
47
|
return (
|
|
47
48
|
<span
|
|
@@ -55,7 +56,9 @@ export const Variants = storyConfig(
|
|
|
55
56
|
}}
|
|
56
57
|
>
|
|
57
58
|
{([16, 24, 32, 40, 48, 56, 72] as const).map((size) => {
|
|
58
|
-
return
|
|
59
|
+
return (
|
|
60
|
+
<StatusIcon key={size} size={size} sentiment={sentiment as StatusIconSentiment} />
|
|
61
|
+
);
|
|
59
62
|
})}
|
|
60
63
|
</span>
|
|
61
64
|
);
|
|
@@ -74,7 +77,7 @@ export const LegacySizes: Story = {
|
|
|
74
77
|
Sentiment.NEGATIVE,
|
|
75
78
|
Sentiment.NEUTRAL,
|
|
76
79
|
Sentiment.WARNING,
|
|
77
|
-
|
|
80
|
+
Status.PENDING,
|
|
78
81
|
].map((sentiment) => {
|
|
79
82
|
return (
|
|
80
83
|
<span
|
|
@@ -88,7 +91,9 @@ export const LegacySizes: Story = {
|
|
|
88
91
|
}}
|
|
89
92
|
>
|
|
90
93
|
{([Size.SMALL, Size.MEDIUM, Size.LARGE] as const).map((size) => {
|
|
91
|
-
return
|
|
94
|
+
return (
|
|
95
|
+
<StatusIcon key={size} size={size} sentiment={sentiment as StatusIconSentiment} />
|
|
96
|
+
);
|
|
92
97
|
})}
|
|
93
98
|
</span>
|
|
94
99
|
);
|
|
@@ -2,7 +2,7 @@ import { Info, Alert, Cross, Check, ClockBorderless } from '@transferwise/icons'
|
|
|
2
2
|
import { clsx } from 'clsx';
|
|
3
3
|
import { useIntl } from 'react-intl';
|
|
4
4
|
|
|
5
|
-
import { SizeSmall, SizeMedium, SizeLarge, Sentiment, Size, Breakpoint } from '../common';
|
|
5
|
+
import { SizeSmall, SizeMedium, SizeLarge, Sentiment, Size, Breakpoint, Status } from '../common';
|
|
6
6
|
import Circle, { CircleProps } from '../common/circle';
|
|
7
7
|
import { useMedia } from '../common/hooks/useMedia';
|
|
8
8
|
|
|
@@ -13,8 +13,10 @@ import messages from './StatusIcon.messages';
|
|
|
13
13
|
*/
|
|
14
14
|
type LegacySizes = SizeSmall | SizeMedium | SizeLarge;
|
|
15
15
|
|
|
16
|
+
export type StatusIconSentiment = Sentiment | Status.PENDING;
|
|
17
|
+
|
|
16
18
|
export type StatusIconProps = {
|
|
17
|
-
sentiment?: `${
|
|
19
|
+
sentiment?: `${StatusIconSentiment}`;
|
|
18
20
|
size?: LegacySizes | 16 | 24 | 32 | 40 | 48 | 56 | 72;
|
|
19
21
|
/**
|
|
20
22
|
* Override for the sentiment's-derived, default, accessible
|
|
@@ -34,7 +36,7 @@ const StatusIcon = ({ sentiment = 'neutral', size: sizeProp = 40, iconLabel }: S
|
|
|
34
36
|
const intl = useIntl();
|
|
35
37
|
|
|
36
38
|
const iconMetaBySentiment: Record<
|
|
37
|
-
`${Sentiment}
|
|
39
|
+
`${Sentiment}` | Status.PENDING,
|
|
38
40
|
{
|
|
39
41
|
Icon: React.ElementType;
|
|
40
42
|
defaultIconLabel: string;
|
|
@@ -52,7 +54,7 @@ const StatusIcon = ({ sentiment = 'neutral', size: sizeProp = 40, iconLabel }: S
|
|
|
52
54
|
Icon: Alert,
|
|
53
55
|
defaultIconLabel: intl.formatMessage(messages.warningLabel),
|
|
54
56
|
},
|
|
55
|
-
[
|
|
57
|
+
[Status.PENDING]: {
|
|
56
58
|
Icon: ClockBorderless,
|
|
57
59
|
defaultIconLabel: intl.formatMessage(messages.pendingLabel),
|
|
58
60
|
},
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
export const lorem10 =
|
|
2
2
|
'Lorem ipsum, dolor sit amet consectetur adipisicing elit. Iste, architecto?';
|
|
3
3
|
|
|
4
|
-
export const lorem20 =
|
|
5
|
-
'Lorem ipsum dolor sit amet consectetur adipisicing elit. Dolorum non explicabo doloribus rerum saepe ut beatae adipisci rem vero optio.';
|
|
6
|
-
|
|
7
4
|
export const lorem40 =
|
|
8
5
|
'Lorem ipsum dolor sit amet consectetur, adipisicing elit. Illo esse quod et iure deserunt facilis similique voluptatem reprehenderit mollitia inventore, ab voluptate dignissimos autem repellat accusamus perferendis sed pariatur tempore possimus ipsam praesentium ipsum? Nesciunt cumque repellendus impedit aliquam! Error?';
|
|
9
6
|
|