@transferwise/components 46.116.1 → 46.117.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. package/build/main.css +60 -131
  2. package/build/prompt/InlinePrompt/InlinePrompt.js +14 -8
  3. package/build/prompt/InlinePrompt/InlinePrompt.js.map +1 -1
  4. package/build/prompt/InlinePrompt/InlinePrompt.mjs +15 -9
  5. package/build/prompt/InlinePrompt/InlinePrompt.mjs.map +1 -1
  6. package/build/sentimentSurface/SentimentSurface.js +6 -5
  7. package/build/sentimentSurface/SentimentSurface.js.map +1 -1
  8. package/build/sentimentSurface/SentimentSurface.mjs +6 -5
  9. package/build/sentimentSurface/SentimentSurface.mjs.map +1 -1
  10. package/build/styles/button/Button.css +17 -17
  11. package/build/styles/button/Button.vars.css +16 -16
  12. package/build/styles/iconButton/IconButton.css +8 -8
  13. package/build/styles/link/Link.css +1 -0
  14. package/build/styles/main.css +60 -131
  15. package/build/styles/prompt/InlinePrompt/InlinePrompt.css +26 -105
  16. package/build/styles/sentimentSurface/SentimentSurface.css +8 -1
  17. package/build/types/prompt/InlinePrompt/InlinePrompt.d.ts +19 -3
  18. package/build/types/prompt/InlinePrompt/InlinePrompt.d.ts.map +1 -1
  19. package/build/types/sentimentSurface/SentimentSurface.d.ts +5 -4
  20. package/build/types/sentimentSurface/SentimentSurface.d.ts.map +1 -1
  21. package/build/types/sentimentSurface/SentimentSurface.types.d.ts +4 -16
  22. package/build/types/sentimentSurface/SentimentSurface.types.d.ts.map +1 -1
  23. package/build/types/test-utils/story-config.d.ts +24 -0
  24. package/build/types/test-utils/story-config.d.ts.map +1 -1
  25. package/package.json +12 -11
  26. package/src/button/Button.css +17 -17
  27. package/src/button/Button.less +1 -1
  28. package/src/button/Button.story.tsx +75 -110
  29. package/src/button/Button.tests.story.tsx +189 -0
  30. package/src/button/Button.vars.css +16 -16
  31. package/src/button/Button.vars.less +58 -18
  32. package/src/iconButton/IconButton.css +8 -8
  33. package/src/iconButton/IconButton.less +35 -4
  34. package/src/iconButton/IconButton.story.tsx +72 -3
  35. package/src/link/Link.css +1 -0
  36. package/src/link/Link.less +1 -0
  37. package/src/link/Link.story.tsx +28 -0
  38. package/src/main.css +60 -131
  39. package/src/prompt/InlinePrompt/InlinePrompt.css +26 -105
  40. package/src/prompt/InlinePrompt/InlinePrompt.less +31 -119
  41. package/src/prompt/InlinePrompt/InlinePrompt.spec.tsx +87 -29
  42. package/src/prompt/InlinePrompt/InlinePrompt.story.tsx +223 -31
  43. package/src/prompt/InlinePrompt/InlinePrompt.tsx +42 -11
  44. package/src/sentimentSurface/SentimentSurface.css +8 -1
  45. package/src/sentimentSurface/SentimentSurface.docs.mdx +32 -495
  46. package/src/sentimentSurface/SentimentSurface.less +121 -114
  47. package/src/sentimentSurface/SentimentSurface.spec.tsx +31 -11
  48. package/src/sentimentSurface/SentimentSurface.story.tsx +323 -108
  49. package/src/sentimentSurface/SentimentSurface.tests.story.tsx +90 -40
  50. package/src/sentimentSurface/SentimentSurface.tsx +16 -9
  51. package/src/sentimentSurface/SentimentSurface.types.ts +5 -20
  52. package/src/test-utils/story-config.ts +0 -1
  53. package/build/sentimentSurface/classMap.js +0 -17
  54. package/build/sentimentSurface/classMap.js.map +0 -1
  55. package/build/sentimentSurface/classMap.mjs +0 -14
  56. package/build/sentimentSurface/classMap.mjs.map +0 -1
  57. package/build/types/sentimentSurface/classMap.d.ts +0 -4
  58. package/build/types/sentimentSurface/classMap.d.ts.map +0 -1
  59. package/src/sentimentSurface/classMap.ts +0 -15
@@ -1,10 +1,10 @@
1
1
  .wds-Button {
2
- --Button-background: var(--color-interactive-accent);
3
- --Button-background-hover: var(--color-interactive-accent-hover);
4
- --Button-background-active: var(--color-interactive-accent-active);
5
- --Button-color: var(--color-interactive-control);
6
- --Button-color-hover: var(--color-interactive-control-hover);
7
- --Button-color-active: var(--color-interactive-control-active);
2
+ --Button-background: var(--color-sentiment-interactive-primary, var(--color-interactive-accent));
3
+ --Button-background-hover: var(--color-sentiment-interactive-primary-hover, var(--color-interactive-accent-hover));
4
+ --Button-background-active: var(--color-sentiment-interactive-primary-active, var(--color-interactive-accent-active));
5
+ --Button-color: var(--color-sentiment-interactive-control, var(--color-interactive-control));
6
+ --Button-color-hover: var(--color-sentiment-interactive-control-hover, var(--color-interactive-control-hover));
7
+ --Button-color-active: var(--color-sentiment-interactive-control-active, var(--color-interactive-control-active));
8
8
  --Button-border-radius: var(--radius-full);
9
9
  --Button-label-gap: var(--size-4);
10
10
  --Button-large-padding: var(--size-12) var(--size-16);
@@ -13,16 +13,16 @@
13
13
  --Button-avatar-border-color: var(--color-border-neutral);
14
14
  --Button-transition-duration: 150ms;
15
15
  --Button-transition-easing: ease-in-out;
16
- --Button-secondary-background: var(--color-interactive-neutral);
17
- --Button-secondary-background-hover: var(--color-interactive-neutral-hover);
18
- --Button-secondary-background-active: var(--color-interactive-neutral-active);
19
- --Button-secondary-color: var(--color-interactive-primary);
20
- --Button-secondary-color-hover: var(--color-interactive-primary-hover);
21
- --Button-secondary-color-active: var(--color-interactive-primary-active);
22
- --Button-secondary-neutral-background: var(--color-background-neutral);
23
- --Button-secondary-neutral-background-hover: var(--color-background-neutral-hover);
24
- --Button-secondary-neutral-background-active: var(--color-background-neutral-active);
25
- --Button-secondary-neutral-color: var(--color-content-primary);
16
+ --Button-secondary-background: var(--color-sentiment-interactive-secondary-neutral, var(--color-interactive-neutral));
17
+ --Button-secondary-background-hover: var(--color-sentiment-interactive-secondary-neutral-hover, var(--color-interactive-neutral-hover));
18
+ --Button-secondary-background-active: var(--color-sentiment-interactive-secondary-neutral-active, var(--color-interactive-neutral-active));
19
+ --Button-secondary-color: var(--color-sentiment-content-primary, var(--color-interactive-primary));
20
+ --Button-secondary-color-hover: var(--color-sentiment-content-primary-hover, var(--color-interactive-primary-hover));
21
+ --Button-secondary-color-active: var(--color-sentiment-content-primary-active, var(--color-interactive-primary-active));
22
+ --Button-secondary-neutral-background: var(--color-sentiment-interactive-secondary-neutral, var(--color-background-neutral));
23
+ --Button-secondary-neutral-background-hover: var(--color-sentiment-interactive-secondary-neutral-hover, var(--color-background-neutral-hover));
24
+ --Button-secondary-neutral-background-active: var(--color-sentiment-interactive-secondary-neutral-active, var(--color-background-neutral-active));
25
+ --Button-secondary-neutral-color: var(--color-sentiment-content-primary, var(--color-content-primary));
26
26
  --Button-tertiary-background: transparent;
27
27
  --Button-tertiary-background-hover: var(--color-background-screen-hover);
28
28
  --Button-tertiary-background-active: var(--color-background-screen-active);
@@ -13,17 +13,17 @@
13
13
  background-color: var(--color-background-neutral-active);
14
14
  }
15
15
  .np-icon-button-primary-default {
16
- color: var(--color-interactive-control);
16
+ color: var(--color-sentiment-interactive-control, var(--color-interactive-control));
17
17
  background-color: #00a2dd;
18
- background-color: var(--color-interactive-accent);
18
+ background-color: var(--color-sentiment-interactive-primary, var(--color-interactive-accent));
19
19
  }
20
20
  .np-icon-button-primary-default:not(.disabled):not(:disabled):hover {
21
21
  background-color: #008fc9;
22
- background-color: var(--color-interactive-accent-hover);
22
+ background-color: var(--color-sentiment-interactive-primary-hover, var(--color-interactive-accent-hover));
23
23
  }
24
24
  .np-icon-button-primary-default:not(.disabled):not(:disabled):active {
25
25
  background-color: #0081ba;
26
- background-color: var(--color-interactive-accent-active);
26
+ background-color: var(--color-sentiment-interactive-primary-active, var(--color-interactive-accent-active));
27
27
  }
28
28
  .np-icon-button-primary-negative {
29
29
  color: var(--color-contrast-overlay);
@@ -51,14 +51,14 @@
51
51
  background-color: var(--color-background-screen-active);
52
52
  }
53
53
  .np-icon-button-secondary-default {
54
- color: var(--color-interactive-primary);
55
- background-color: var(--color-interactive-neutral);
54
+ color: var(--color-sentiment-content-primary, var(--color-interactive-primary));
55
+ background-color: var(--color-sentiment-interactive-secondary-neutral, var(--color-interactive-neutral));
56
56
  }
57
57
  .np-icon-button-secondary-default:not(.disabled):not(:disabled):hover {
58
- background-color: var(--color-interactive-neutral-hover);
58
+ background-color: var(--color-sentiment-interactive-secondary-neutral-hover, var(--color-interactive-neutral-hover));
59
59
  }
60
60
  .np-icon-button-secondary-default:not(.disabled):not(:disabled):active {
61
- background-color: var(--color-interactive-neutral-active);
61
+ background-color: var(--color-sentiment-interactive-secondary-neutral-active, var(--color-interactive-neutral-active));
62
62
  }
63
63
  .np-theme-personal--bright-green .np-icon-button-secondary-default,
64
64
  .np-theme-personal--forest-green .np-icon-button-secondary-default {
@@ -1,6 +1,7 @@
1
1
  a,
2
2
  button.np-link {
3
3
  border-radius: 2px;
4
+ color: var(--color-sentiment-content-primary, var(--color-content-link));
4
5
  }
5
6
  .np-link .tw-icon {
6
7
  display: flex;
@@ -1,3 +1,10 @@
1
+ .wds-sentiment-surface {
2
+ --ring-outline-color: var(--color-sentiment-content-primary, var(--color-content-primary));
3
+ }
4
+ .wds-sentiment-surface--hasBaseStyles {
5
+ background-color: var(--color-sentiment-background-surface);
6
+ color: var(--color-sentiment-content-primary);
7
+ }
1
8
  .np-theme-personal .wds-sentiment-surface-negative-base,
2
9
  .np-theme-personal--bright-green .wds-sentiment-surface-negative-base {
3
10
  --color-sentiment-content-primary: #CB272F;
@@ -32,7 +39,7 @@
32
39
  --color-sentiment-interactive-secondary-active: #A72027;
33
40
  --color-sentiment-interactive-secondary-neutral: #9B141B;
34
41
  --color-sentiment-interactive-secondary-neutral-hover: #831116;
35
- --color-sentiment-interactive-secondary-neutral-active: #6D0E13;
42
+ --color-sentiment-interactive-secondary-neutral-active: #6D0e13;
36
43
  --color-sentiment-interactive-control: #CB272F;
37
44
  --color-sentiment-interactive-control-hover: #B8232B;
38
45
  --color-sentiment-interactive-control-active: #A72027;
@@ -874,18 +881,35 @@
874
881
  position: relative;
875
882
  z-index: 1;
876
883
  }
884
+ .wds-inline-prompt:has(a):hover,
885
+ .wds-inline-prompt:has(button):hover {
886
+ background-color: var(--color-sentiment-background-surface-hover);
887
+ }
888
+ .wds-inline-prompt:has(a):active,
889
+ .wds-inline-prompt:has(button):active {
890
+ background-color: var(--color-sentiment-background-surface-active);
891
+ }
877
892
  .wds-inline-prompt--muted {
878
893
  opacity: 0.93;
879
894
  filter: grayscale(1);
880
895
  }
881
896
  .wds-inline-prompt a,
882
897
  .wds-inline-prompt button {
898
+ color: var(--color-sentiment-content-primary);
883
899
  text-underline-offset: calc(4px / 2);
884
900
  text-underline-offset: calc(var(--size-4) / 2);
885
901
  }
902
+ .wds-inline-prompt a:hover,
903
+ .wds-inline-prompt button:hover {
904
+ color: var(--color-sentiment-content-primary-hover);
905
+ }
906
+ .wds-inline-prompt a:active,
907
+ .wds-inline-prompt button:active {
908
+ color: var(--color-sentiment-content-primary-active);
909
+ }
886
910
  .wds-inline-prompt a:first-of-type:before,
887
911
  .wds-inline-prompt button:first-of-type:before {
888
- content: '';
912
+ content: "";
889
913
  position: absolute;
890
914
  inset: 0;
891
915
  }
@@ -899,112 +923,16 @@
899
923
  }
900
924
  .wds-inline-prompt__media-wrapper .tw-icon-tags,
901
925
  .wds-inline-prompt__media-wrapper .tw-icon-confetti {
902
- color: var(--color-sentiment-positive-primary);
903
- }
904
- .wds-inline-prompt--negative {
905
- background-color: var(--color-sentiment-negative-secondary);
906
- color: var(--color-sentiment-negative-primary);
907
- }
908
- .wds-inline-prompt--negative a,
909
- .wds-inline-prompt--negative button {
910
- color: var(--color-sentiment-negative-primary);
911
- }
912
- .wds-inline-prompt--negative a:hover,
913
- .wds-inline-prompt--negative button:hover {
914
- color: var(--color-sentiment-negative-primary-hover);
915
- }
916
- .wds-inline-prompt--negative a:active,
917
- .wds-inline-prompt--negative button:active {
918
- color: var(--color-sentiment-negative-primary-active);
919
- }
920
- .wds-inline-prompt.wds-inline-prompt--negative:has(a, button):hover {
921
- background-color: var(--color-sentiment-negative-secondary-hover);
922
- }
923
- .wds-inline-prompt.wds-inline-prompt--negative:has(a, button):active {
924
- background-color: var(--color-sentiment-negative-secondary-active);
925
- }
926
- .wds-inline-prompt--positive {
927
- background-color: var(--color-sentiment-positive-secondary);
928
- color: var(--color-sentiment-positive-primary);
929
- }
930
- .wds-inline-prompt--positive a,
931
- .wds-inline-prompt--positive button {
932
- color: var(--color-sentiment-positive-primary);
933
- }
934
- .wds-inline-prompt--positive a:hover,
935
- .wds-inline-prompt--positive button:hover {
936
- color: var(--color-sentiment-positive-primary-hover);
926
+ color: var(--color-sentiment-content-primary);
937
927
  }
938
- .wds-inline-prompt--positive a:active,
939
- .wds-inline-prompt--positive button:active {
940
- color: var(--color-sentiment-positive-primary-active);
941
- }
942
- .wds-inline-prompt.wds-inline-prompt--positive:has(a, button):hover {
943
- background-color: var(--color-sentiment-positive-secondary-hover);
944
- }
945
- .wds-inline-prompt.wds-inline-prompt--positive:has(a, button):active {
946
- background-color: var(--color-sentiment-positive-secondary-active);
947
- }
948
- .wds-inline-prompt--proposition {
949
- background-color: #D2F9F7;
950
- color: var(--color-interactive-primary);
951
- }
952
- .wds-inline-prompt--proposition a,
953
- .wds-inline-prompt--proposition button {
954
- color: var(--color-interactive-primary);
955
- }
956
- .wds-inline-prompt--proposition a:hover,
957
- .wds-inline-prompt--proposition button:hover {
958
- color: var(--color-interactive-primary-hover);
959
- }
960
- .wds-inline-prompt--proposition a:active,
961
- .wds-inline-prompt--proposition button:active {
962
- color: var(--color-interactive-primary-active);
963
- }
964
- .wds-inline-prompt.wds-inline-prompt--proposition:has(a, button):hover {
965
- background-color: #B2F4F3;
966
- }
967
- .wds-inline-prompt.wds-inline-prompt--proposition:has(a, button):active {
968
- background-color: #91F0EE;
969
- }
970
- .wds-inline-prompt--neutral {
971
- background-color: rgba(134,167,189,0.10196);
972
- background-color: var(--color-background-neutral);
973
- color: #37517e;
974
- color: var(--color-content-primary);
975
- }
976
- .wds-inline-prompt--neutral a,
977
- .wds-inline-prompt--neutral button {
978
- color: #37517e;
979
- color: var(--color-content-primary);
980
- }
981
- .wds-inline-prompt.wds-inline-prompt--neutral:has(a, button):hover {
982
- background-color: var(--color-background-neutral-hover);
983
- }
984
- .wds-inline-prompt.wds-inline-prompt--neutral:has(a, button):active {
985
- background-color: var(--color-background-neutral-active);
986
- }
987
- .wds-inline-prompt--warning {
988
- background-color: var(--color-sentiment-warning-secondary);
989
- color: var(--color-sentiment-warning-content);
990
- }
991
- .wds-inline-prompt--warning a,
992
- .wds-inline-prompt--warning button {
993
- color: var(--color-sentiment-warning-content);
994
- }
995
- .wds-inline-prompt--warning a:hover,
996
- .wds-inline-prompt--warning button:hover {
997
- color: var(--color-sentiment-warning-content-hover);
998
- }
999
- .wds-inline-prompt--warning a:active,
1000
- .wds-inline-prompt--warning button:active {
1001
- color: var(--color-sentiment-warning-content-active);
1002
- }
1003
- .wds-inline-prompt.wds-inline-prompt--warning:has(a, button):hover {
1004
- background-color: color-mix(in srgb, var(--color-sentiment-warning-secondary) 92%, var(--color-sentiment-warning-primary));
928
+ .wds-inline-prompt .wds-inline-prompt-process-indicator {
929
+ width: 16px;
930
+ width: var(--size-16);
931
+ height: 16px;
932
+ height: var(--size-16);
1005
933
  }
1006
- .wds-inline-prompt.wds-inline-prompt--warning:has(a, button):active {
1007
- background-color: color-mix(in srgb, var(--color-sentiment-warning-secondary) 84%, var(--color-sentiment-warning-primary));
934
+ .wds-inline-prompt .wds-inline-prompt-process-indicator .process-circle {
935
+ stroke: currentColor;
1008
936
  }
1009
937
  .np-dot {
1010
938
  --np-dot-size: 14px;
@@ -1107,17 +1035,17 @@
1107
1035
  background-color: var(--color-background-neutral-active);
1108
1036
  }
1109
1037
  .np-icon-button-primary-default {
1110
- color: var(--color-interactive-control);
1038
+ color: var(--color-sentiment-interactive-control, var(--color-interactive-control));
1111
1039
  background-color: #00a2dd;
1112
- background-color: var(--color-interactive-accent);
1040
+ background-color: var(--color-sentiment-interactive-primary, var(--color-interactive-accent));
1113
1041
  }
1114
1042
  .np-icon-button-primary-default:not(.disabled):not(:disabled):hover {
1115
1043
  background-color: #008fc9;
1116
- background-color: var(--color-interactive-accent-hover);
1044
+ background-color: var(--color-sentiment-interactive-primary-hover, var(--color-interactive-accent-hover));
1117
1045
  }
1118
1046
  .np-icon-button-primary-default:not(.disabled):not(:disabled):active {
1119
1047
  background-color: #0081ba;
1120
- background-color: var(--color-interactive-accent-active);
1048
+ background-color: var(--color-sentiment-interactive-primary-active, var(--color-interactive-accent-active));
1121
1049
  }
1122
1050
  .np-icon-button-primary-negative {
1123
1051
  color: var(--color-contrast-overlay);
@@ -1145,14 +1073,14 @@
1145
1073
  background-color: var(--color-background-screen-active);
1146
1074
  }
1147
1075
  .np-icon-button-secondary-default {
1148
- color: var(--color-interactive-primary);
1149
- background-color: var(--color-interactive-neutral);
1076
+ color: var(--color-sentiment-content-primary, var(--color-interactive-primary));
1077
+ background-color: var(--color-sentiment-interactive-secondary-neutral, var(--color-interactive-neutral));
1150
1078
  }
1151
1079
  .np-icon-button-secondary-default:not(.disabled):not(:disabled):hover {
1152
- background-color: var(--color-interactive-neutral-hover);
1080
+ background-color: var(--color-sentiment-interactive-secondary-neutral-hover, var(--color-interactive-neutral-hover));
1153
1081
  }
1154
1082
  .np-icon-button-secondary-default:not(.disabled):not(:disabled):active {
1155
- background-color: var(--color-interactive-neutral-active);
1083
+ background-color: var(--color-sentiment-interactive-secondary-neutral-active, var(--color-interactive-neutral-active));
1156
1084
  }
1157
1085
  .np-theme-personal--bright-green .np-icon-button-secondary-default,
1158
1086
  .np-theme-personal--forest-green .np-icon-button-secondary-default {
@@ -1266,12 +1194,12 @@
1266
1194
  pointer-events: auto;
1267
1195
  }
1268
1196
  .wds-Button {
1269
- --Button-background: var(--color-interactive-accent);
1270
- --Button-background-hover: var(--color-interactive-accent-hover);
1271
- --Button-background-active: var(--color-interactive-accent-active);
1272
- --Button-color: var(--color-interactive-control);
1273
- --Button-color-hover: var(--color-interactive-control-hover);
1274
- --Button-color-active: var(--color-interactive-control-active);
1197
+ --Button-background: var(--color-sentiment-interactive-primary, var(--color-interactive-accent));
1198
+ --Button-background-hover: var(--color-sentiment-interactive-primary-hover, var(--color-interactive-accent-hover));
1199
+ --Button-background-active: var(--color-sentiment-interactive-primary-active, var(--color-interactive-accent-active));
1200
+ --Button-color: var(--color-sentiment-interactive-control, var(--color-interactive-control));
1201
+ --Button-color-hover: var(--color-sentiment-interactive-control-hover, var(--color-interactive-control-hover));
1202
+ --Button-color-active: var(--color-sentiment-interactive-control-active, var(--color-interactive-control-active));
1275
1203
  --Button-border-radius: var(--radius-full);
1276
1204
  --Button-label-gap: var(--size-4);
1277
1205
  --Button-large-padding: var(--size-12) var(--size-16);
@@ -1280,16 +1208,16 @@
1280
1208
  --Button-avatar-border-color: var(--color-border-neutral);
1281
1209
  --Button-transition-duration: 150ms;
1282
1210
  --Button-transition-easing: ease-in-out;
1283
- --Button-secondary-background: var(--color-interactive-neutral);
1284
- --Button-secondary-background-hover: var(--color-interactive-neutral-hover);
1285
- --Button-secondary-background-active: var(--color-interactive-neutral-active);
1286
- --Button-secondary-color: var(--color-interactive-primary);
1287
- --Button-secondary-color-hover: var(--color-interactive-primary-hover);
1288
- --Button-secondary-color-active: var(--color-interactive-primary-active);
1289
- --Button-secondary-neutral-background: var(--color-background-neutral);
1290
- --Button-secondary-neutral-background-hover: var(--color-background-neutral-hover);
1291
- --Button-secondary-neutral-background-active: var(--color-background-neutral-active);
1292
- --Button-secondary-neutral-color: var(--color-content-primary);
1211
+ --Button-secondary-background: var(--color-sentiment-interactive-secondary-neutral, var(--color-interactive-neutral));
1212
+ --Button-secondary-background-hover: var(--color-sentiment-interactive-secondary-neutral-hover, var(--color-interactive-neutral-hover));
1213
+ --Button-secondary-background-active: var(--color-sentiment-interactive-secondary-neutral-active, var(--color-interactive-neutral-active));
1214
+ --Button-secondary-color: var(--color-sentiment-content-primary, var(--color-interactive-primary));
1215
+ --Button-secondary-color-hover: var(--color-sentiment-content-primary-hover, var(--color-interactive-primary-hover));
1216
+ --Button-secondary-color-active: var(--color-sentiment-content-primary-active, var(--color-interactive-primary-active));
1217
+ --Button-secondary-neutral-background: var(--color-sentiment-interactive-secondary-neutral, var(--color-background-neutral));
1218
+ --Button-secondary-neutral-background-hover: var(--color-sentiment-interactive-secondary-neutral-hover, var(--color-background-neutral-hover));
1219
+ --Button-secondary-neutral-background-active: var(--color-sentiment-interactive-secondary-neutral-active, var(--color-background-neutral-active));
1220
+ --Button-secondary-neutral-color: var(--color-sentiment-content-primary, var(--color-content-primary));
1293
1221
  --Button-tertiary-background: transparent;
1294
1222
  --Button-tertiary-background-hover: var(--color-background-screen-hover);
1295
1223
  --Button-tertiary-background-active: var(--color-background-screen-active);
@@ -1380,7 +1308,7 @@
1380
1308
  --Button-color-active: var(--Button-secondary-neutral-color);
1381
1309
  }
1382
1310
  .wds-Button--secondary-neutral .wds-Button-icon--end {
1383
- color: var(--color-interactive-primary);
1311
+ color: var(--Button-secondary-color);
1384
1312
  }
1385
1313
  .wds-Button--tertiary {
1386
1314
  --Button-background: var(--Button-tertiary-background);
@@ -4321,6 +4249,7 @@ html:not([dir="rtl"]) .np-flow-navigation--sm .np-flow-navigation__stepper {
4321
4249
  a,
4322
4250
  button.np-link {
4323
4251
  border-radius: 2px;
4252
+ color: var(--color-sentiment-content-primary, var(--color-content-link));
4324
4253
  }
4325
4254
  .np-link .tw-icon {
4326
4255
  display: flex;
@@ -19,18 +19,35 @@
19
19
  position: relative;
20
20
  z-index: 1;
21
21
  }
22
+ .wds-inline-prompt:has(a):hover,
23
+ .wds-inline-prompt:has(button):hover {
24
+ background-color: var(--color-sentiment-background-surface-hover);
25
+ }
26
+ .wds-inline-prompt:has(a):active,
27
+ .wds-inline-prompt:has(button):active {
28
+ background-color: var(--color-sentiment-background-surface-active);
29
+ }
22
30
  .wds-inline-prompt--muted {
23
31
  opacity: 0.93;
24
32
  filter: grayscale(1);
25
33
  }
26
34
  .wds-inline-prompt a,
27
35
  .wds-inline-prompt button {
36
+ color: var(--color-sentiment-content-primary);
28
37
  text-underline-offset: calc(4px / 2);
29
38
  text-underline-offset: calc(var(--size-4) / 2);
30
39
  }
40
+ .wds-inline-prompt a:hover,
41
+ .wds-inline-prompt button:hover {
42
+ color: var(--color-sentiment-content-primary-hover);
43
+ }
44
+ .wds-inline-prompt a:active,
45
+ .wds-inline-prompt button:active {
46
+ color: var(--color-sentiment-content-primary-active);
47
+ }
31
48
  .wds-inline-prompt a:first-of-type:before,
32
49
  .wds-inline-prompt button:first-of-type:before {
33
- content: '';
50
+ content: "";
34
51
  position: absolute;
35
52
  inset: 0;
36
53
  }
@@ -44,110 +61,14 @@
44
61
  }
45
62
  .wds-inline-prompt__media-wrapper .tw-icon-tags,
46
63
  .wds-inline-prompt__media-wrapper .tw-icon-confetti {
47
- color: var(--color-sentiment-positive-primary);
48
- }
49
- .wds-inline-prompt--negative {
50
- background-color: var(--color-sentiment-negative-secondary);
51
- color: var(--color-sentiment-negative-primary);
52
- }
53
- .wds-inline-prompt--negative a,
54
- .wds-inline-prompt--negative button {
55
- color: var(--color-sentiment-negative-primary);
56
- }
57
- .wds-inline-prompt--negative a:hover,
58
- .wds-inline-prompt--negative button:hover {
59
- color: var(--color-sentiment-negative-primary-hover);
60
- }
61
- .wds-inline-prompt--negative a:active,
62
- .wds-inline-prompt--negative button:active {
63
- color: var(--color-sentiment-negative-primary-active);
64
- }
65
- .wds-inline-prompt.wds-inline-prompt--negative:has(a, button):hover {
66
- background-color: var(--color-sentiment-negative-secondary-hover);
67
- }
68
- .wds-inline-prompt.wds-inline-prompt--negative:has(a, button):active {
69
- background-color: var(--color-sentiment-negative-secondary-active);
70
- }
71
- .wds-inline-prompt--positive {
72
- background-color: var(--color-sentiment-positive-secondary);
73
- color: var(--color-sentiment-positive-primary);
74
- }
75
- .wds-inline-prompt--positive a,
76
- .wds-inline-prompt--positive button {
77
- color: var(--color-sentiment-positive-primary);
78
- }
79
- .wds-inline-prompt--positive a:hover,
80
- .wds-inline-prompt--positive button:hover {
81
- color: var(--color-sentiment-positive-primary-hover);
82
- }
83
- .wds-inline-prompt--positive a:active,
84
- .wds-inline-prompt--positive button:active {
85
- color: var(--color-sentiment-positive-primary-active);
86
- }
87
- .wds-inline-prompt.wds-inline-prompt--positive:has(a, button):hover {
88
- background-color: var(--color-sentiment-positive-secondary-hover);
89
- }
90
- .wds-inline-prompt.wds-inline-prompt--positive:has(a, button):active {
91
- background-color: var(--color-sentiment-positive-secondary-active);
92
- }
93
- .wds-inline-prompt--proposition {
94
- background-color: #D2F9F7;
95
- color: var(--color-interactive-primary);
96
- }
97
- .wds-inline-prompt--proposition a,
98
- .wds-inline-prompt--proposition button {
99
- color: var(--color-interactive-primary);
100
- }
101
- .wds-inline-prompt--proposition a:hover,
102
- .wds-inline-prompt--proposition button:hover {
103
- color: var(--color-interactive-primary-hover);
104
- }
105
- .wds-inline-prompt--proposition a:active,
106
- .wds-inline-prompt--proposition button:active {
107
- color: var(--color-interactive-primary-active);
108
- }
109
- .wds-inline-prompt.wds-inline-prompt--proposition:has(a, button):hover {
110
- background-color: #B2F4F3;
111
- }
112
- .wds-inline-prompt.wds-inline-prompt--proposition:has(a, button):active {
113
- background-color: #91F0EE;
114
- }
115
- .wds-inline-prompt--neutral {
116
- background-color: rgba(134,167,189,0.10196);
117
- background-color: var(--color-background-neutral);
118
- color: #37517e;
119
- color: var(--color-content-primary);
120
- }
121
- .wds-inline-prompt--neutral a,
122
- .wds-inline-prompt--neutral button {
123
- color: #37517e;
124
- color: var(--color-content-primary);
125
- }
126
- .wds-inline-prompt.wds-inline-prompt--neutral:has(a, button):hover {
127
- background-color: var(--color-background-neutral-hover);
128
- }
129
- .wds-inline-prompt.wds-inline-prompt--neutral:has(a, button):active {
130
- background-color: var(--color-background-neutral-active);
131
- }
132
- .wds-inline-prompt--warning {
133
- background-color: var(--color-sentiment-warning-secondary);
134
- color: var(--color-sentiment-warning-content);
135
- }
136
- .wds-inline-prompt--warning a,
137
- .wds-inline-prompt--warning button {
138
- color: var(--color-sentiment-warning-content);
139
- }
140
- .wds-inline-prompt--warning a:hover,
141
- .wds-inline-prompt--warning button:hover {
142
- color: var(--color-sentiment-warning-content-hover);
143
- }
144
- .wds-inline-prompt--warning a:active,
145
- .wds-inline-prompt--warning button:active {
146
- color: var(--color-sentiment-warning-content-active);
64
+ color: var(--color-sentiment-content-primary);
147
65
  }
148
- .wds-inline-prompt.wds-inline-prompt--warning:has(a, button):hover {
149
- background-color: color-mix(in srgb, var(--color-sentiment-warning-secondary) 92%, var(--color-sentiment-warning-primary));
66
+ .wds-inline-prompt .wds-inline-prompt-process-indicator {
67
+ width: 16px;
68
+ width: var(--size-16);
69
+ height: 16px;
70
+ height: var(--size-16);
150
71
  }
151
- .wds-inline-prompt.wds-inline-prompt--warning:has(a, button):active {
152
- background-color: color-mix(in srgb, var(--color-sentiment-warning-secondary) 84%, var(--color-sentiment-warning-primary));
72
+ .wds-inline-prompt .wds-inline-prompt-process-indicator .process-circle {
73
+ stroke: currentColor;
153
74
  }
@@ -1,3 +1,10 @@
1
+ .wds-sentiment-surface {
2
+ --ring-outline-color: var(--color-sentiment-content-primary, var(--color-content-primary));
3
+ }
4
+ .wds-sentiment-surface--hasBaseStyles {
5
+ background-color: var(--color-sentiment-background-surface);
6
+ color: var(--color-sentiment-content-primary);
7
+ }
1
8
  .np-theme-personal .wds-sentiment-surface-negative-base,
2
9
  .np-theme-personal--bright-green .wds-sentiment-surface-negative-base {
3
10
  --color-sentiment-content-primary: #CB272F;
@@ -32,7 +39,7 @@
32
39
  --color-sentiment-interactive-secondary-active: #A72027;
33
40
  --color-sentiment-interactive-secondary-neutral: #9B141B;
34
41
  --color-sentiment-interactive-secondary-neutral-hover: #831116;
35
- --color-sentiment-interactive-secondary-neutral-active: #6D0E13;
42
+ --color-sentiment-interactive-secondary-neutral-active: #6D0e13;
36
43
  --color-sentiment-interactive-control: #CB272F;
37
44
  --color-sentiment-interactive-control-hover: #B8232B;
38
45
  --color-sentiment-interactive-control-active: #A72027;
@@ -1,16 +1,32 @@
1
1
  import { Sentiment } from '../../common';
2
2
  export type InlinePromptProps = {
3
+ /**
4
+ * The sentiment determines the colour scheme
5
+ */
3
6
  sentiment?: `${Sentiment.POSITIVE | Sentiment.NEGATIVE | Sentiment.NEUTRAL | Sentiment.WARNING}` | 'proposition';
7
+ /**
8
+ * Replaces the icon with a spinner while waiting for the short-lived action to finish.
9
+ * @default false
10
+ */
4
11
  loading?: boolean;
5
12
  /**
6
- * Use for short-lived inline prompts to avoid swap of the icon (which is bad UX for short-lived prompts, e.g. when submit form)
13
+ * While prompts cannot be fully (visually and functionally) disabled, this prop should be enabled
14
+ * they are associated with actually disabled component (e.g. a disabled list item or input).
15
+ * @default false
7
16
  */
8
17
  muted?: boolean;
18
+ /**
19
+ * Icon override for `proposition` and `positive` sentiments. Unsupported for remaining ones.
20
+ */
21
+ media?: React.ReactNode;
9
22
  id?: string;
10
23
  className?: string;
11
24
  'data-testid'?: string;
12
25
  children: React.ReactNode;
13
- media?: React.ReactNode;
14
26
  };
15
- export declare const InlinePrompt: ({ sentiment, muted, loading, className, children, media, ...rest }: InlinePromptProps) => import("react").JSX.Element;
27
+ /**
28
+ * Inline prompts appear alongside a specific component on the screen. They help the user stay
29
+ * informed, fix something, or get more out of what they're doing.
30
+ */
31
+ export declare const InlinePrompt: ({ sentiment, muted, loading, className, children, media, "data-testid": dataTestId, ...rest }: InlinePromptProps) => import("react").JSX.Element;
16
32
  //# sourceMappingURL=InlinePrompt.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"InlinePrompt.d.ts","sourceRoot":"","sources":["../../../../src/prompt/InlinePrompt/InlinePrompt.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAOzC,MAAM,MAAM,iBAAiB,GAAG;IAC9B,SAAS,CAAC,EACN,GAAG,SAAS,CAAC,QAAQ,GAAG,SAAS,CAAC,QAAQ,GAAG,SAAS,CAAC,OAAO,GAAG,SAAS,CAAC,OAAO,EAAE,GACpF,aAAa,CAAC;IAClB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CACzB,CAAC;AAEF,eAAO,MAAM,YAAY,GAAI,oEAQ1B,iBAAiB,gCAkCnB,CAAC"}
1
+ {"version":3,"file":"InlinePrompt.d.ts","sourceRoot":"","sources":["../../../../src/prompt/InlinePrompt/InlinePrompt.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAQzC,MAAM,MAAM,iBAAiB,GAAG;IAC9B;;OAEG;IACH,SAAS,CAAC,EACN,GAAG,SAAS,CAAC,QAAQ,GAAG,SAAS,CAAC,QAAQ,GAAG,SAAS,CAAC,OAAO,GAAG,SAAS,CAAC,OAAO,EAAE,GACpF,aAAa,CAAC;IAClB;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;;OAIG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,YAAY,GAAI,+FAS1B,iBAAiB,gCA+CnB,CAAC"}
@@ -1,17 +1,18 @@
1
1
  import { SentimentSurfaceComponent } from './SentimentSurface.types';
2
2
  /**
3
- * SentimentSurface is a polymorphic container component that applies contextual background colours
4
- * and text styling based on sentiment types (negative, warning, neutral, success, proposition).
5
- * It's designed to visually communicate the nature or importance of its content through colour.
3
+ * SentimentSurface is a polymorphic container component that exposes and, optionally, applies
4
+ * contextual colour tokens as CSS custom properties, based on sentiment types (`negative`,
5
+ * `warning`, `neutral`, `success`, `proposition`).
6
6
  *
7
7
  * @param {ElementType} [as='div'] - Optional prop to override the HTML element rendered.
8
8
  * @param {Sentiment} sentiment - Required prop to set the sentiment type (negative, warning, neutral, success, proposition).
9
9
  * @param {Emphasis} [emphasis='base'] - Optional prop to specify the emphasis level (base or elevated).
10
+ * @param {boolean} [hasBaseStyles=true] - If true, sets the `background-color` and `color` on the container. Otherwise, only exposes the tokens as CSS custom properties without rendering.
10
11
  * @param {ReactNode} [children] - Content to render inside the surface.
11
12
  * @param {string} [className] - Additional CSS classes to apply.
12
13
  * @param {CSSProperties} [style] - Inline styles to apply.
13
14
  * @param {string} [id] - Unique identifier for the component.
14
- * @param {string} [testId] - A unique string that appears as data attribute `data-testid` in the rendered code.
15
+ * @param {string} [data-testid] - A unique string that appears as data attribute `data-testid` in the rendered code.
15
16
  *
16
17
  * @component
17
18
  * @example
@@ -1 +1 @@
1
- {"version":3,"file":"SentimentSurface.d.ts","sourceRoot":"","sources":["../../../src/sentimentSurface/SentimentSurface.tsx"],"names":[],"mappings":"AAGA,OAAO,EAEL,yBAAyB,EAC1B,MAAM,0BAA0B,CAAC;AAGlC;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,QAAA,MAAM,gBAAgB,EAAE,yBA+BtB,CAAC;AAIH,eAAe,gBAAgB,CAAC"}
1
+ {"version":3,"file":"SentimentSurface.d.ts","sourceRoot":"","sources":["../../../src/sentimentSurface/SentimentSurface.tsx"],"names":[],"mappings":"AAGA,OAAO,EAEL,yBAAyB,EAC1B,MAAM,0BAA0B,CAAC;AAElC;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,QAAA,MAAM,gBAAgB,EAAE,yBAsCtB,CAAC;AAIH,eAAe,gBAAgB,CAAC"}
@@ -21,30 +21,18 @@ export interface CommonProps {
21
21
  */
22
22
  emphasis?: Emphasis;
23
23
  /**
24
- * Content to render inside the surface
24
+ * If true, sets the `background-color` and `color` on the container. Otherwise, only exposes the tokens as CSS custom properties without rendering.
25
+ * @default true
25
26
  */
27
+ hasBaseStyles?: boolean;
26
28
  children?: ReactNode;
27
- /**
28
- * Additional CSS classes
29
- */
30
29
  className?: string;
31
- /**
32
- * Inline styles
33
- */
34
30
  style?: CSSProperties;
35
- /**
36
- * Unique identifier for the component
37
- */
38
31
  id?: string;
39
32
  /**
40
33
  * A unique string that appears as data attribute `data-testid` in the rendered code, serving as a hook for automated tests
41
34
  */
42
- testId?: string;
43
- /**
44
- * `data-testid` is strictly controlled through the `testId` prop.
45
- * This lets consumers know that this data attribute will not be applied.
46
- */
47
- 'data-testid'?: never;
35
+ 'data-testid'?: string;
48
36
  }
49
37
  /**
50
38
  * Props when rendering as a div or custom element