@coinbase/cds-mobile 8.47.0 → 8.47.2
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/CHANGELOG.md +12 -0
- package/dts/overlays/drawer/Drawer.d.ts.map +1 -1
- package/dts/overlays/tray/Tray.d.ts.map +1 -1
- package/esm/cards/CardRoot.js +1 -1
- package/esm/cards/__stories__/MessagingCard.stories.js +89 -33
- package/esm/overlays/__stories__/TrayPromotional.stories.js +246 -5
- package/esm/overlays/drawer/Drawer.js +4 -4
- package/esm/overlays/tray/Tray.js +6 -5
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,18 @@ All notable changes to this project will be documented in this file.
|
|
|
8
8
|
|
|
9
9
|
<!-- template-start -->
|
|
10
10
|
|
|
11
|
+
## 8.47.2 (2/19/2026 PST)
|
|
12
|
+
|
|
13
|
+
#### 🐞 Fixes
|
|
14
|
+
|
|
15
|
+
- Fix mobile CardRoot style forwarding logic. [[#405](https://github.com/coinbase/cds/pull/405)]
|
|
16
|
+
|
|
17
|
+
## 8.47.1 (2/19/2026 PST)
|
|
18
|
+
|
|
19
|
+
#### 🐞 Fixes
|
|
20
|
+
|
|
21
|
+
- Fix Tray title spacing and overflow. [[#414](https://github.com/coinbase/cds/pull/414)]
|
|
22
|
+
|
|
11
23
|
## 8.47.0 (2/19/2026 PST)
|
|
12
24
|
|
|
13
25
|
#### 🚀 Updates
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Drawer.d.ts","sourceRoot":"","sources":["../../../src/overlays/drawer/Drawer.tsx"],"names":[],"mappings":"AAAA,OAAO,KASN,MAAM,OAAO,CAAC;AAEf,OAAO,KAAK,EAAE,UAAU,EAAE,cAAc,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAarF,OAAO,KAAK,EACV,gBAAgB,EAChB,wBAAwB,EACxB,WAAW,EACZ,MAAM,4BAA4B,CAAC;AAIpC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S,CAAC,SAAS,CAAC,CAAC;KAC9B;6CAqIJ,CAAC;AAEF,eAAO,MAAM,gBAAgB,GAAI,cAAc;IAAE,QAAQ,EAAE,SAAS,CAAA;CAAE,4CAQrE,CAAC"}
|
package/esm/cards/CardRoot.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const _excluded = ["children", "
|
|
1
|
+
const _excluded = ["children", "renderAsPressable"];
|
|
2
2
|
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
3
3
|
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
4
4
|
import React, { forwardRef, memo } from 'react';
|
|
@@ -65,9 +65,7 @@ const DismissibleCardsExample = () => {
|
|
|
65
65
|
height: 100,
|
|
66
66
|
resizeMode: "cover",
|
|
67
67
|
shape: "rectangle",
|
|
68
|
-
source:
|
|
69
|
-
uri: coinbaseOneLogo
|
|
70
|
-
},
|
|
68
|
+
source: coinbaseOneLogo,
|
|
71
69
|
width: 80
|
|
72
70
|
}) : /*#__PURE__*/_jsx(Pictogram, {
|
|
73
71
|
accessibilityLabel: "Add to watchlist",
|
|
@@ -105,9 +103,7 @@ const MessagingCardScreen = () => {
|
|
|
105
103
|
height: 120,
|
|
106
104
|
resizeMode: "cover",
|
|
107
105
|
shape: "rectangle",
|
|
108
|
-
source:
|
|
109
|
-
uri: coinbaseOneLogo
|
|
110
|
-
},
|
|
106
|
+
source: coinbaseOneLogo,
|
|
111
107
|
width: 90
|
|
112
108
|
}),
|
|
113
109
|
mediaPlacement: "end",
|
|
@@ -162,9 +158,7 @@ const MessagingCardScreen = () => {
|
|
|
162
158
|
height: 120,
|
|
163
159
|
resizeMode: "cover",
|
|
164
160
|
shape: "rectangle",
|
|
165
|
-
source:
|
|
166
|
-
uri: coinbaseOneLogo
|
|
167
|
-
},
|
|
161
|
+
source: coinbaseOneLogo,
|
|
168
162
|
width: 90
|
|
169
163
|
}),
|
|
170
164
|
mediaPlacement: "end",
|
|
@@ -190,9 +184,7 @@ const MessagingCardScreen = () => {
|
|
|
190
184
|
height: 120,
|
|
191
185
|
resizeMode: "cover",
|
|
192
186
|
shape: "rectangle",
|
|
193
|
-
source:
|
|
194
|
-
uri: coinbaseOneLogo
|
|
195
|
-
},
|
|
187
|
+
source: coinbaseOneLogo,
|
|
196
188
|
width: 90
|
|
197
189
|
}),
|
|
198
190
|
mediaPlacement: "end",
|
|
@@ -218,9 +210,7 @@ const MessagingCardScreen = () => {
|
|
|
218
210
|
height: 156,
|
|
219
211
|
resizeMode: "cover",
|
|
220
212
|
shape: "rectangle",
|
|
221
|
-
source:
|
|
222
|
-
uri: coinbaseOneLogo
|
|
223
|
-
},
|
|
213
|
+
source: coinbaseOneLogo,
|
|
224
214
|
width: 120
|
|
225
215
|
}),
|
|
226
216
|
mediaPlacement: "end",
|
|
@@ -248,9 +238,7 @@ const MessagingCardScreen = () => {
|
|
|
248
238
|
height: 186,
|
|
249
239
|
resizeMode: "cover",
|
|
250
240
|
shape: "rectangle",
|
|
251
|
-
source:
|
|
252
|
-
uri: coinbaseOneLogo
|
|
253
|
-
},
|
|
241
|
+
source: coinbaseOneLogo,
|
|
254
242
|
width: 130
|
|
255
243
|
}),
|
|
256
244
|
mediaPlacement: "end",
|
|
@@ -287,9 +275,7 @@ const MessagingCardScreen = () => {
|
|
|
287
275
|
height: 156,
|
|
288
276
|
resizeMode: "cover",
|
|
289
277
|
shape: "rectangle",
|
|
290
|
-
source:
|
|
291
|
-
uri: coinbaseOneLogo
|
|
292
|
-
},
|
|
278
|
+
source: coinbaseOneLogo,
|
|
293
279
|
width: 120
|
|
294
280
|
}),
|
|
295
281
|
mediaPlacement: "end",
|
|
@@ -339,9 +325,7 @@ const MessagingCardScreen = () => {
|
|
|
339
325
|
height: 120,
|
|
340
326
|
resizeMode: "cover",
|
|
341
327
|
shape: "rectangle",
|
|
342
|
-
source:
|
|
343
|
-
uri: coinbaseOneLogo
|
|
344
|
-
},
|
|
328
|
+
source: coinbaseOneLogo,
|
|
345
329
|
width: 90
|
|
346
330
|
}),
|
|
347
331
|
mediaPlacement: "end",
|
|
@@ -386,9 +370,7 @@ const MessagingCardScreen = () => {
|
|
|
386
370
|
height: 120,
|
|
387
371
|
resizeMode: "cover",
|
|
388
372
|
shape: "rectangle",
|
|
389
|
-
source:
|
|
390
|
-
uri: coinbaseOneLogo
|
|
391
|
-
},
|
|
373
|
+
source: coinbaseOneLogo,
|
|
392
374
|
width: 90
|
|
393
375
|
}),
|
|
394
376
|
mediaPlacement: "end",
|
|
@@ -410,6 +392,84 @@ const MessagingCardScreen = () => {
|
|
|
410
392
|
type: "nudge"
|
|
411
393
|
})]
|
|
412
394
|
})
|
|
395
|
+
}), /*#__PURE__*/_jsx(Example, {
|
|
396
|
+
title: "Custom Background Color",
|
|
397
|
+
children: /*#__PURE__*/_jsxs(VStack, {
|
|
398
|
+
gap: 2,
|
|
399
|
+
children: [/*#__PURE__*/_jsx(MessagingCard, _extends({}, exampleProps, {
|
|
400
|
+
renderAsPressable: true,
|
|
401
|
+
accessibilityLabel: "View card details",
|
|
402
|
+
blendStyles: {
|
|
403
|
+
background: '#1E5A9E'
|
|
404
|
+
},
|
|
405
|
+
description: "Pressable card with custom background via blendStyles.background",
|
|
406
|
+
media: /*#__PURE__*/_jsx(RemoteImage, {
|
|
407
|
+
accessibilityLabel: "Coinbase One promotional image",
|
|
408
|
+
height: 130,
|
|
409
|
+
resizeMode: "cover",
|
|
410
|
+
shape: "rectangle",
|
|
411
|
+
source: coinbaseOneLogo,
|
|
412
|
+
width: 90
|
|
413
|
+
}),
|
|
414
|
+
mediaPlacement: "end",
|
|
415
|
+
onPress: NoopFn,
|
|
416
|
+
title: "Pressable with Custom Background",
|
|
417
|
+
type: "upsell"
|
|
418
|
+
})), /*#__PURE__*/_jsx(MessagingCard, _extends({}, exampleProps, {
|
|
419
|
+
renderAsPressable: true,
|
|
420
|
+
accessibilityLabel: "View nudge details",
|
|
421
|
+
blendStyles: {
|
|
422
|
+
background: '#FFF8E6'
|
|
423
|
+
},
|
|
424
|
+
description: "Pressable nudge with custom background via blendStyles.background",
|
|
425
|
+
media: /*#__PURE__*/_jsx(Pictogram, {
|
|
426
|
+
accessibilityLabel: "Rocket",
|
|
427
|
+
dimension: "48x48",
|
|
428
|
+
name: "baseRocket"
|
|
429
|
+
}),
|
|
430
|
+
mediaPlacement: "end",
|
|
431
|
+
onPress: NoopFn,
|
|
432
|
+
title: "Nudge with Custom Background",
|
|
433
|
+
type: "nudge"
|
|
434
|
+
})), /*#__PURE__*/_jsx(MessagingCard, _extends({}, exampleProps, {
|
|
435
|
+
accessibilityLabel: "Non-pressable card",
|
|
436
|
+
description: "Non-pressable card with custom background via styles.root",
|
|
437
|
+
media: /*#__PURE__*/_jsx(RemoteImage, {
|
|
438
|
+
accessibilityLabel: "Coinbase One promotional image",
|
|
439
|
+
height: 130,
|
|
440
|
+
resizeMode: "cover",
|
|
441
|
+
shape: "rectangle",
|
|
442
|
+
source: coinbaseOneLogo,
|
|
443
|
+
width: 90
|
|
444
|
+
}),
|
|
445
|
+
mediaPlacement: "end",
|
|
446
|
+
renderAsPressable: false,
|
|
447
|
+
styles: {
|
|
448
|
+
root: {
|
|
449
|
+
backgroundColor: '#1E5A9E'
|
|
450
|
+
}
|
|
451
|
+
},
|
|
452
|
+
title: "Non-pressable with Custom Background",
|
|
453
|
+
type: "upsell"
|
|
454
|
+
})), /*#__PURE__*/_jsx(MessagingCard, _extends({}, exampleProps, {
|
|
455
|
+
accessibilityLabel: "Non-pressable nudge",
|
|
456
|
+
description: "Non-pressable nudge with custom background via styles.root",
|
|
457
|
+
media: /*#__PURE__*/_jsx(Pictogram, {
|
|
458
|
+
accessibilityLabel: "Rocket",
|
|
459
|
+
dimension: "48x48",
|
|
460
|
+
name: "baseRocket"
|
|
461
|
+
}),
|
|
462
|
+
mediaPlacement: "end",
|
|
463
|
+
renderAsPressable: false,
|
|
464
|
+
styles: {
|
|
465
|
+
root: {
|
|
466
|
+
backgroundColor: '#FFF8E6'
|
|
467
|
+
}
|
|
468
|
+
},
|
|
469
|
+
title: "Non-pressable Nudge with Custom Background",
|
|
470
|
+
type: "nudge"
|
|
471
|
+
}))]
|
|
472
|
+
})
|
|
413
473
|
}), /*#__PURE__*/_jsx(Example, {
|
|
414
474
|
title: "Text Content",
|
|
415
475
|
children: /*#__PURE__*/_jsxs(VStack, {
|
|
@@ -421,9 +481,7 @@ const MessagingCardScreen = () => {
|
|
|
421
481
|
height: 160,
|
|
422
482
|
resizeMode: "cover",
|
|
423
483
|
shape: "rectangle",
|
|
424
|
-
source:
|
|
425
|
-
uri: coinbaseOneLogo
|
|
426
|
-
},
|
|
484
|
+
source: coinbaseOneLogo,
|
|
427
485
|
width: 120
|
|
428
486
|
}),
|
|
429
487
|
mediaPlacement: "end",
|
|
@@ -446,9 +504,7 @@ const MessagingCardScreen = () => {
|
|
|
446
504
|
height: 140,
|
|
447
505
|
resizeMode: "cover",
|
|
448
506
|
shape: "rectangle",
|
|
449
|
-
source:
|
|
450
|
-
uri: coinbaseOneLogo
|
|
451
|
-
},
|
|
507
|
+
source: coinbaseOneLogo,
|
|
452
508
|
width: 100
|
|
453
509
|
}),
|
|
454
510
|
mediaPlacement: "end",
|
|
@@ -1,10 +1,22 @@
|
|
|
1
|
-
|
|
1
|
+
const _excluded = ["key"];
|
|
2
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
3
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
4
|
+
import React, { memo, useCallback, useRef, useState } from 'react';
|
|
5
|
+
import { Platform } from 'react-native';
|
|
6
|
+
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
2
7
|
import { Button } from '../../buttons/Button';
|
|
8
|
+
import { ListCell } from '../../cells/ListCell';
|
|
3
9
|
import { Example, ExampleScreen } from '../../examples/ExampleScreen';
|
|
10
|
+
import { useDimensions } from '../../hooks/useDimensions';
|
|
11
|
+
import { Icon } from '../../icons';
|
|
4
12
|
import { SpotRectangle } from '../../illustrations';
|
|
5
|
-
import { Box, VStack } from '../../layout';
|
|
13
|
+
import { Box, HStack, VStack } from '../../layout';
|
|
6
14
|
import { StickyFooter } from '../../sticky-footer/StickyFooter';
|
|
15
|
+
import { ThemeProvider } from '../../system/ThemeProvider';
|
|
16
|
+
import { defaultTheme } from '../../themes/defaultTheme';
|
|
7
17
|
import { Text } from '../../typography/Text';
|
|
18
|
+
import { TextBody } from '../../typography/TextBody';
|
|
19
|
+
import { TextTitle1 } from '../../typography/TextTitle1';
|
|
8
20
|
import { Tray, TrayStickyFooter } from '../tray/Tray';
|
|
9
21
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
10
22
|
export const Default = () => {
|
|
@@ -64,11 +76,240 @@ export const Default = () => {
|
|
|
64
76
|
});
|
|
65
77
|
};
|
|
66
78
|
export const PromotionalTrayScreen = () => {
|
|
67
|
-
return /*#__PURE__*/
|
|
68
|
-
children: /*#__PURE__*/_jsx(Example, {
|
|
79
|
+
return /*#__PURE__*/_jsxs(ExampleScreen, {
|
|
80
|
+
children: [/*#__PURE__*/_jsx(Example, {
|
|
69
81
|
title: "Promotional Tray",
|
|
70
82
|
children: /*#__PURE__*/_jsx(Default, {})
|
|
71
|
-
})
|
|
83
|
+
}), /*#__PURE__*/_jsx(Example, {
|
|
84
|
+
title: "Credit Card Add Assets Tray",
|
|
85
|
+
children: /*#__PURE__*/_jsx(CreditCardAddAssetsTrayExample, {})
|
|
86
|
+
}), /*#__PURE__*/_jsx(Example, {
|
|
87
|
+
title: "Product Upsell Tray",
|
|
88
|
+
children: /*#__PURE__*/_jsx(ProductUpsellTrayExample, {})
|
|
89
|
+
})]
|
|
90
|
+
});
|
|
91
|
+
};
|
|
92
|
+
const quickActions = [{
|
|
93
|
+
name: 'buy',
|
|
94
|
+
title: 'Buy',
|
|
95
|
+
description: 'Buy crypto with cash'
|
|
96
|
+
}, {
|
|
97
|
+
name: 'transfer',
|
|
98
|
+
title: 'Deposit',
|
|
99
|
+
description: 'Transfer funds from your bank'
|
|
100
|
+
}, {
|
|
101
|
+
name: 'receive',
|
|
102
|
+
title: 'Receive crypto',
|
|
103
|
+
description: 'From another crypto wallet'
|
|
104
|
+
}];
|
|
105
|
+
const CreditCardAddAssetsTrayExample = () => {
|
|
106
|
+
const [isTrayVisible, setIsTrayVisible] = useState(false);
|
|
107
|
+
const [trayContentType, setTrayContentType] = useState('addFundsInfo');
|
|
108
|
+
const setIsTrayVisibleOff = useCallback(() => {
|
|
109
|
+
setTrayContentType('addFundsInfo');
|
|
110
|
+
setIsTrayVisible(false);
|
|
111
|
+
}, []);
|
|
112
|
+
const setIsTrayVisibleOn = useCallback(() => setIsTrayVisible(true), []);
|
|
113
|
+
const handleCTAPress = useCallback(() => {
|
|
114
|
+
setTrayContentType('addAssets');
|
|
115
|
+
}, []);
|
|
116
|
+
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
117
|
+
children: [/*#__PURE__*/_jsx(Button, {
|
|
118
|
+
onPress: setIsTrayVisibleOn,
|
|
119
|
+
children: "Open"
|
|
120
|
+
}), isTrayVisible && /*#__PURE__*/_jsx(Tray, {
|
|
121
|
+
handleBarAccessibilityLabel: "Information about rewards details",
|
|
122
|
+
onCloseComplete: setIsTrayVisibleOff,
|
|
123
|
+
title: trayContentType === 'addFundsInfo' ? /*#__PURE__*/_jsx(VStack, {
|
|
124
|
+
gap: 0.5,
|
|
125
|
+
paddingTop: 3,
|
|
126
|
+
paddingX: 3,
|
|
127
|
+
children: /*#__PURE__*/_jsx(Text, {
|
|
128
|
+
font: "title3",
|
|
129
|
+
children: "Lifetime rewards details"
|
|
130
|
+
})
|
|
131
|
+
}) : null,
|
|
132
|
+
children: trayContentType === 'addFundsInfo' ? /*#__PURE__*/_jsxs(VStack, {
|
|
133
|
+
paddingX: 3,
|
|
134
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
135
|
+
font: "body",
|
|
136
|
+
children: "Here's a breakdown of your lifetime rewards earned through your Coinbase Card purchases and transactions."
|
|
137
|
+
}), /*#__PURE__*/_jsx(VStack, {
|
|
138
|
+
paddingTop: 3,
|
|
139
|
+
children: /*#__PURE__*/_jsx(Button, {
|
|
140
|
+
block: true,
|
|
141
|
+
onPress: handleCTAPress,
|
|
142
|
+
children: "Got it"
|
|
143
|
+
})
|
|
144
|
+
})]
|
|
145
|
+
}) : /*#__PURE__*/_jsx(VStack, {
|
|
146
|
+
children: quickActions.map(action => /*#__PURE__*/_jsx(ListCell, {
|
|
147
|
+
accessory: "arrow",
|
|
148
|
+
description: action.description,
|
|
149
|
+
onPress: () => alert(action.title + " pressed"),
|
|
150
|
+
spacingVariant: "condensed",
|
|
151
|
+
title: action.title
|
|
152
|
+
}, action.name))
|
|
153
|
+
})
|
|
154
|
+
})]
|
|
155
|
+
});
|
|
156
|
+
};
|
|
157
|
+
const TOP_TRAY_OFFSET = 20;
|
|
158
|
+
const SAFE_AREA_OVERFLOW_MULTIPLIER = 2;
|
|
159
|
+
const BACKGROUND_COLOR = '#011C92';
|
|
160
|
+
const UPSELL_BENEFITS = [{
|
|
161
|
+
key: '1',
|
|
162
|
+
icon: 'cash',
|
|
163
|
+
text: 'Earn rewards on every purchase'
|
|
164
|
+
}, {
|
|
165
|
+
key: '2',
|
|
166
|
+
icon: 'lock',
|
|
167
|
+
text: 'No annual fee, ever'
|
|
168
|
+
}, {
|
|
169
|
+
key: '3',
|
|
170
|
+
icon: 'star',
|
|
171
|
+
text: 'Instant cashback in crypto'
|
|
172
|
+
}];
|
|
173
|
+
const UpsellBenefitPoint = /*#__PURE__*/memo(function UpsellBenefitPoint(_ref2) {
|
|
174
|
+
let {
|
|
175
|
+
icon,
|
|
176
|
+
text
|
|
177
|
+
} = _ref2;
|
|
178
|
+
return /*#__PURE__*/_jsxs(HStack, {
|
|
179
|
+
gap: 2,
|
|
180
|
+
children: [/*#__PURE__*/_jsx(Icon, {
|
|
181
|
+
color: "fg",
|
|
182
|
+
name: icon,
|
|
183
|
+
paddingTop: 0.5,
|
|
184
|
+
size: "s"
|
|
185
|
+
}), /*#__PURE__*/_jsx(Box, {
|
|
186
|
+
maxWidth: "90%",
|
|
187
|
+
children: /*#__PURE__*/_jsx(TextBody, {
|
|
188
|
+
color: "fg",
|
|
189
|
+
children: text
|
|
190
|
+
})
|
|
191
|
+
})]
|
|
192
|
+
});
|
|
193
|
+
});
|
|
194
|
+
const ProductUpsellTrayExample = () => {
|
|
195
|
+
const [isTrayVisible, setIsTrayVisible] = useState(false);
|
|
196
|
+
const setIsTrayVisibleOff = useCallback(() => setIsTrayVisible(false), []);
|
|
197
|
+
const setIsTrayVisibleOn = useCallback(() => setIsTrayVisible(true), []);
|
|
198
|
+
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
199
|
+
children: [/*#__PURE__*/_jsx(Button, {
|
|
200
|
+
onPress: setIsTrayVisibleOn,
|
|
201
|
+
children: "Open"
|
|
202
|
+
}), isTrayVisible && /*#__PURE__*/_jsx(Tray, {
|
|
203
|
+
handleBarAccessibilityLabel: "Product upsell details",
|
|
204
|
+
onCloseComplete: setIsTrayVisibleOff,
|
|
205
|
+
verticalDrawerPercentageOfView: 0.95,
|
|
206
|
+
children: _ref3 => {
|
|
207
|
+
let {
|
|
208
|
+
handleClose
|
|
209
|
+
} = _ref3;
|
|
210
|
+
return /*#__PURE__*/_jsx(ProductUpsellTrayContent, {
|
|
211
|
+
benefits: UPSELL_BENEFITS,
|
|
212
|
+
dismiss: handleClose
|
|
213
|
+
});
|
|
214
|
+
}
|
|
215
|
+
})]
|
|
72
216
|
});
|
|
73
217
|
};
|
|
218
|
+
const ProductUpsellTrayContent = /*#__PURE__*/memo(function ProductUpsellTrayContent(_ref4) {
|
|
219
|
+
let {
|
|
220
|
+
benefits,
|
|
221
|
+
dismiss
|
|
222
|
+
} = _ref4;
|
|
223
|
+
const {
|
|
224
|
+
screenWidth
|
|
225
|
+
} = useDimensions();
|
|
226
|
+
const insets = useSafeAreaInsets();
|
|
227
|
+
const bottom = Platform.OS === 'android' ? Math.max(insets.bottom, 24) : insets.bottom;
|
|
228
|
+
const handlePrimaryCtaPress = useCallback(() => {
|
|
229
|
+
alert('Primary CTA pressed');
|
|
230
|
+
dismiss();
|
|
231
|
+
}, [dismiss]);
|
|
232
|
+
return /*#__PURE__*/_jsx(ThemeProvider, {
|
|
233
|
+
activeColorScheme: "dark",
|
|
234
|
+
theme: defaultTheme,
|
|
235
|
+
children: /*#__PURE__*/_jsxs(VStack, {
|
|
236
|
+
position: "relative",
|
|
237
|
+
children: [/*#__PURE__*/_jsx(Box, {
|
|
238
|
+
bottom: -bottom * SAFE_AREA_OVERFLOW_MULTIPLIER,
|
|
239
|
+
dangerouslySetBackground: BACKGROUND_COLOR,
|
|
240
|
+
height: bottom * SAFE_AREA_OVERFLOW_MULTIPLIER,
|
|
241
|
+
left: 0,
|
|
242
|
+
position: "absolute",
|
|
243
|
+
right: 0,
|
|
244
|
+
width: "100%"
|
|
245
|
+
}), /*#__PURE__*/_jsx(Box, {
|
|
246
|
+
dangerouslySetBackground: BACKGROUND_COLOR,
|
|
247
|
+
height: TOP_TRAY_OFFSET,
|
|
248
|
+
left: 0,
|
|
249
|
+
position: "absolute",
|
|
250
|
+
right: 0,
|
|
251
|
+
top: -TOP_TRAY_OFFSET
|
|
252
|
+
}), /*#__PURE__*/_jsxs(VStack, {
|
|
253
|
+
dangerouslySetBackground: BACKGROUND_COLOR,
|
|
254
|
+
gap: 4,
|
|
255
|
+
paddingTop: 5,
|
|
256
|
+
paddingX: 3,
|
|
257
|
+
children: [/*#__PURE__*/_jsx(Box, {
|
|
258
|
+
alignItems: "center",
|
|
259
|
+
justifyContent: "center",
|
|
260
|
+
children: /*#__PURE__*/_jsx(SpotRectangle, {
|
|
261
|
+
name: "creditCardExcitement"
|
|
262
|
+
})
|
|
263
|
+
}), /*#__PURE__*/_jsxs(VStack, {
|
|
264
|
+
children: [/*#__PURE__*/_jsxs(VStack, {
|
|
265
|
+
gap: 1,
|
|
266
|
+
paddingBottom: 2,
|
|
267
|
+
children: [/*#__PURE__*/_jsx(TextTitle1, {
|
|
268
|
+
align: "center",
|
|
269
|
+
color: "fg",
|
|
270
|
+
children: "Upgrade your experience"
|
|
271
|
+
}), /*#__PURE__*/_jsx(TextBody, {
|
|
272
|
+
align: "center",
|
|
273
|
+
color: "fg",
|
|
274
|
+
children: "Unlock premium features and earn more rewards."
|
|
275
|
+
})]
|
|
276
|
+
}), /*#__PURE__*/_jsx(VStack, {
|
|
277
|
+
gap: 3,
|
|
278
|
+
paddingY: 1,
|
|
279
|
+
children: benefits.map(_ref5 => {
|
|
280
|
+
let {
|
|
281
|
+
key
|
|
282
|
+
} = _ref5,
|
|
283
|
+
benefit = _objectWithoutPropertiesLoose(_ref5, _excluded);
|
|
284
|
+
return /*#__PURE__*/_jsx(UpsellBenefitPoint, _extends({}, benefit), key);
|
|
285
|
+
})
|
|
286
|
+
}), /*#__PURE__*/_jsxs(VStack, {
|
|
287
|
+
paddingTop: 4,
|
|
288
|
+
children: [/*#__PURE__*/_jsx(Button, {
|
|
289
|
+
block: true,
|
|
290
|
+
onPress: handlePrimaryCtaPress,
|
|
291
|
+
children: "Get started"
|
|
292
|
+
}), /*#__PURE__*/_jsx(Box, {
|
|
293
|
+
paddingTop: 1,
|
|
294
|
+
children: /*#__PURE__*/_jsx(Button, {
|
|
295
|
+
block: true,
|
|
296
|
+
onPress: dismiss,
|
|
297
|
+
variant: "secondary",
|
|
298
|
+
children: "Maybe later"
|
|
299
|
+
})
|
|
300
|
+
}), /*#__PURE__*/_jsx(Box, {
|
|
301
|
+
opacity: 0.6,
|
|
302
|
+
paddingTop: 2,
|
|
303
|
+
children: /*#__PURE__*/_jsx(TextBody, {
|
|
304
|
+
align: "center",
|
|
305
|
+
color: "fgMuted",
|
|
306
|
+
children: "By continuing, you agree to the terms and conditions. Rewards are subject to eligibility requirements."
|
|
307
|
+
})
|
|
308
|
+
})]
|
|
309
|
+
})]
|
|
310
|
+
})]
|
|
311
|
+
})]
|
|
312
|
+
})
|
|
313
|
+
});
|
|
314
|
+
});
|
|
74
315
|
export default PromotionalTrayScreen;
|
|
@@ -148,8 +148,8 @@ export const Drawer = /*#__PURE__*/memo(/*#__PURE__*/forwardRef(function Drawer(
|
|
|
148
148
|
const rootStyle = useMemo(() => [style, styles == null ? void 0 : styles.root], [style, styles == null ? void 0 : styles.root]);
|
|
149
149
|
const containerStyle = useMemo(() => [drawerAnimationStyles, styles == null ? void 0 : styles.container], [drawerAnimationStyles, styles == null ? void 0 : styles.container]);
|
|
150
150
|
const drawerStyle = useMemo(() => [paddingStyles, {
|
|
151
|
-
overflow:
|
|
152
|
-
}, styles == null ? void 0 : styles.drawer], [paddingStyles,
|
|
151
|
+
overflow: 'hidden'
|
|
152
|
+
}, styles == null ? void 0 : styles.drawer], [paddingStyles, styles == null ? void 0 : styles.drawer]);
|
|
153
153
|
const handleBar = useMemo(() => /*#__PURE__*/_jsx(HandleBar, {
|
|
154
154
|
accessibilityLabel: handleBarAccessibilityLabel,
|
|
155
155
|
accessibilityRole: "button",
|
|
@@ -197,10 +197,10 @@ export const Drawer = /*#__PURE__*/memo(/*#__PURE__*/forwardRef(function Drawer(
|
|
|
197
197
|
elevation: 2,
|
|
198
198
|
maxHeight: !isSideDrawer ? verticalDrawerMaxHeight : '100%',
|
|
199
199
|
style: drawerStyle,
|
|
200
|
-
children: [showHandleBarInside && handleBar, /*#__PURE__*/_jsx(View, {
|
|
200
|
+
children: [showHandleBarInside && handleBar, showHandleBarInside ? /*#__PURE__*/_jsx(View, {
|
|
201
201
|
style: overflowStyle,
|
|
202
202
|
children: content
|
|
203
|
-
})]
|
|
203
|
+
}) : content]
|
|
204
204
|
})]
|
|
205
205
|
}))]
|
|
206
206
|
})
|
|
@@ -29,6 +29,7 @@ export const Tray = /*#__PURE__*/memo(/*#__PURE__*/forwardRef(function Tray(_ref
|
|
|
29
29
|
props = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
30
30
|
const [titleHeight, setTitleHeight] = useState(0);
|
|
31
31
|
const isInsideHandleBar = handleBarVariant === 'inside';
|
|
32
|
+
const isTitleString = typeof title === 'string';
|
|
32
33
|
const {
|
|
33
34
|
contentStyle,
|
|
34
35
|
headerStyle,
|
|
@@ -78,10 +79,10 @@ export const Tray = /*#__PURE__*/memo(/*#__PURE__*/forwardRef(function Tray(_ref
|
|
|
78
79
|
children: [title && /*#__PURE__*/_jsx(Box, {
|
|
79
80
|
justifyContent: "center",
|
|
80
81
|
onLayout: onTitleLayout,
|
|
81
|
-
paddingBottom: isInsideHandleBar ? 0.75 : 2,
|
|
82
|
-
paddingTop: isInsideHandleBar ? 0 : 3,
|
|
83
|
-
paddingX: 3,
|
|
84
|
-
children:
|
|
82
|
+
paddingBottom: isInsideHandleBar ? 0.75 : isTitleString ? 2 : 0,
|
|
83
|
+
paddingTop: isInsideHandleBar ? 0 : isTitleString ? 3 : 0,
|
|
84
|
+
paddingX: isInsideHandleBar || isTitleString ? 3 : 0,
|
|
85
|
+
children: isTitleString ? /*#__PURE__*/_jsx(Text, {
|
|
85
86
|
font: "title3",
|
|
86
87
|
style: titleStyle,
|
|
87
88
|
children: title
|
|
@@ -95,7 +96,7 @@ export const Tray = /*#__PURE__*/memo(/*#__PURE__*/forwardRef(function Tray(_ref
|
|
|
95
96
|
children: content
|
|
96
97
|
}), footerContent]
|
|
97
98
|
});
|
|
98
|
-
}, [title, contentStyle, onTitleLayout, isInsideHandleBar, headerElevation, headerStyle, titleStyle, header, children, footer]);
|
|
99
|
+
}, [title, isTitleString, contentStyle, onTitleLayout, isInsideHandleBar, headerElevation, headerStyle, titleStyle, header, children, footer]);
|
|
99
100
|
useEffect(() => {
|
|
100
101
|
onVisibilityChange == null || onVisibilityChange('visible');
|
|
101
102
|
return () => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coinbase/cds-mobile",
|
|
3
|
-
"version": "8.47.
|
|
3
|
+
"version": "8.47.2",
|
|
4
4
|
"description": "Coinbase Design System - Mobile",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -198,7 +198,7 @@
|
|
|
198
198
|
"react-native-svg": "^14.1.0"
|
|
199
199
|
},
|
|
200
200
|
"dependencies": {
|
|
201
|
-
"@coinbase/cds-common": "^8.47.
|
|
201
|
+
"@coinbase/cds-common": "^8.47.2",
|
|
202
202
|
"@coinbase/cds-icons": "^5.11.0",
|
|
203
203
|
"@coinbase/cds-illustrations": "^4.31.0",
|
|
204
204
|
"@coinbase/cds-lottie-files": "^3.3.4",
|