@relayprotocol/relay-kit-ui 7.1.3 → 7.1.4

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.
@@ -20,7 +20,7 @@ const ErrorWell = ({ error, hasTxHashes, fromChain }) => {
20
20
  }
21
21
  if (!hasTxHashes ||
22
22
  error?.message?.includes('Deposit transaction with hash')) {
23
- return 'Oops, something went wrong while initiating the swap. Your request was not submitted. Please try again.';
23
+ return 'Oops, something went wrong while initiating the swap. Your request was not submitted. Please try again, and make sure your wallet is unlocked.';
24
24
  }
25
25
  else if (error?.message?.includes('solver status check')) {
26
26
  return 'This transaction is taking longer than usual to process. Please visit the transaction page for more details.';
@@ -33,11 +33,35 @@ const ErrorWell = ({ error, hasTxHashes, fromChain }) => {
33
33
  }
34
34
  return error?.message;
35
35
  }, [error?.message, hasTxHashes]);
36
+ const shouldScrollErrorMessage = typeof renderedErrorMessage === 'string' &&
37
+ renderedErrorMessage.length > 280;
38
+ const scrollStyles = shouldScrollErrorMessage
39
+ ? {
40
+ maxHeight: 'min(36vh, 220px)',
41
+ overflowY: 'auto',
42
+ px: '1',
43
+ scrollbarWidth: 'thin',
44
+ scrollbarColor: 'var(--relay-colors-gray5) transparent',
45
+ '&::-webkit-scrollbar': {
46
+ width: '6px',
47
+ background: 'transparent'
48
+ },
49
+ '&::-webkit-scrollbar-track': {
50
+ background: 'transparent'
51
+ },
52
+ '&::-webkit-scrollbar-thumb': {
53
+ backgroundColor: 'var(--relay-colors-gray5)',
54
+ borderRadius: '999px'
55
+ }
56
+ }
57
+ : {};
36
58
  return ((0, jsx_runtime_1.jsx)(index_js_1.Text, { style: "subtitle1", css: {
37
59
  my: '4',
38
60
  textAlign: 'center',
39
61
  width: '100%',
40
- wordBreak: 'break-word'
62
+ wordBreak: 'break-word',
63
+ overflowWrap: 'anywhere',
64
+ ...scrollStyles
41
65
  }, children: renderedErrorMessage }));
42
66
  };
43
67
  exports.default = ErrorWell;
@@ -1 +1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;YACxB,GAAG,YAAY;SAChB,YAEA,oBAAoB,GAChB,CACR,CAAA;AACH,CAAC,CAAA;AAED,kBAAe,SAAS,CAAA"}
@@ -1236,6 +1236,26 @@
1236
1236
  word-break: break-word;
1237
1237
  }
1238
1238
 
1239
+ .relay-overflow-wrap_anywhere:not(#\#):not(#\#):not(#\#):not(#\#) {
1240
+ overflow-wrap: anywhere;
1241
+ }
1242
+
1243
+ .relay-max-h_min\(36vh\,_220px\):not(#\#):not(#\#):not(#\#):not(#\#) {
1244
+ max-height: min(36vh, 220px);
1245
+ }
1246
+
1247
+ .relay-px_1:not(#\#):not(#\#):not(#\#):not(#\#) {
1248
+ padding-inline: var(--relay-spacing-1);
1249
+ }
1250
+
1251
+ .relay-scrollbar-width_thin:not(#\#):not(#\#):not(#\#):not(#\#) {
1252
+ scrollbar-width: thin;
1253
+ }
1254
+
1255
+ .relay-scrollbar-color_var\(--relay-colors-gray5\)_transparent:not(#\#):not(#\#):not(#\#):not(#\#) {
1256
+ scrollbar-color: var(--relay-colors-gray5) transparent;
1257
+ }
1258
+
1239
1259
  .relay-animation_spin_1s_linear_infinite:not(#\#):not(#\#):not(#\#):not(#\#) {
1240
1260
  animation: spin 1s linear infinite;
1241
1261
  }
@@ -1344,10 +1364,6 @@
1344
1364
  flex: none;
1345
1365
  }
1346
1366
 
1347
- .relay-px_1:not(#\#):not(#\#):not(#\#):not(#\#) {
1348
- padding-inline: var(--relay-spacing-1);
1349
- }
1350
-
1351
1367
  .relay-border_none:not(#\#):not(#\#):not(#\#):not(#\#) {
1352
1368
  border: none;
1353
1369
  }
@@ -1972,10 +1988,6 @@
1972
1988
  max-height: 290px;
1973
1989
  }
1974
1990
 
1975
- .relay-scrollbar-color_var\(--relay-colors-gray5\)_transparent:not(#\#):not(#\#):not(#\#):not(#\#) {
1976
- scrollbar-color: var(--relay-colors-gray5) transparent;
1977
- }
1978
-
1979
1991
  .relay-px_2:not(#\#):not(#\#):not(#\#):not(#\#) {
1980
1992
  padding-inline: var(--relay-spacing-2);
1981
1993
  }
@@ -2576,6 +2588,10 @@
2576
2588
  top: var(--relay-spacing-3);
2577
2589
  }
2578
2590
 
2591
+ .relay-overflow-y_auto:not(#\#):not(#\#):not(#\#):not(#\#) {
2592
+ overflow-y: auto;
2593
+ }
2594
+
2579
2595
  .relay-top_0:not(#\#):not(#\#):not(#\#):not(#\#) {
2580
2596
  top: 0;
2581
2597
  }
@@ -2736,10 +2752,6 @@
2736
2752
  top: 100%;
2737
2753
  }
2738
2754
 
2739
- .relay-overflow-y_auto:not(#\#):not(#\#):not(#\#):not(#\#) {
2740
- overflow-y: auto;
2741
- }
2742
-
2743
2755
  .relay-items_flex-start:not(#\#):not(#\#):not(#\#):not(#\#) {
2744
2756
  align-items: flex-start;
2745
2757
  }
@@ -3196,6 +3208,18 @@
3196
3208
  color: var(--relay-colors-gray12);
3197
3209
  }
3198
3210
 
3211
+ .\[\&\:\:-webkit-scrollbar\]\:relay-w_6px:not(#\#):not(#\#):not(#\#):not(#\#)::-webkit-scrollbar {
3212
+ width: 6px;
3213
+ }
3214
+
3215
+ .\[\&\:\:-webkit-scrollbar\]\:relay-bg_transparent:not(#\#):not(#\#):not(#\#):not(#\#)::-webkit-scrollbar,.\[\&\:\:-webkit-scrollbar-track\]\:relay-bg_transparent:not(#\#):not(#\#):not(#\#):not(#\#)::-webkit-scrollbar-track {
3216
+ background: transparent;
3217
+ }
3218
+
3219
+ .\[\&\:\:-webkit-scrollbar-thumb\]\:relay-rounded_999px:not(#\#):not(#\#):not(#\#):not(#\#)::-webkit-scrollbar-thumb {
3220
+ border-radius: 999px;
3221
+ }
3222
+
3199
3223
  .disabled\:relay-cursor_not-allowed:is(:disabled, [disabled], [data-disabled]):not(#\#):not(#\#):not(#\#):not(#\#) {
3200
3224
  cursor: not-allowed;
3201
3225
  }
@@ -3308,6 +3332,10 @@
3308
3332
  color: var(--relay-colors-text-default);
3309
3333
  }
3310
3334
 
3335
+ .\[\&\:\:-webkit-scrollbar-thumb\]\:relay-bg_var\(--relay-colors-gray5\):not(#\#):not(#\#):not(#\#):not(#\#)::-webkit-scrollbar-thumb {
3336
+ background-color: var(--relay-colors-gray5);
3337
+ }
3338
+
3311
3339
  .disabled\:relay-bg_button-disabled-background:is(:disabled, [disabled], [data-disabled]):not(#\#):not(#\#):not(#\#):not(#\#) {
3312
3340
  background-color: var(--relay-colors-button-disabled-background);
3313
3341
  }
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.UI_VERSION = void 0;
4
- exports.UI_VERSION = '7.1.3';
4
+ exports.UI_VERSION = '7.1.4';
5
5
  //# sourceMappingURL=version.js.map