@coinbase/cds-mobile 8.40.2 → 8.42.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 (115) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/dts/alpha/combobox/Combobox.d.ts.map +1 -1
  3. package/dts/alpha/combobox/DefaultComboboxControl.d.ts +1 -0
  4. package/dts/alpha/combobox/DefaultComboboxControl.d.ts.map +1 -1
  5. package/dts/alpha/data-card/DataCard.d.ts +27 -0
  6. package/dts/alpha/data-card/DataCard.d.ts.map +1 -0
  7. package/dts/alpha/data-card/DataCardLayout.d.ts +38 -0
  8. package/dts/alpha/data-card/DataCardLayout.d.ts.map +1 -0
  9. package/dts/alpha/data-card/__figma__/DataCard.figma.d.ts +2 -0
  10. package/dts/alpha/data-card/__figma__/DataCard.figma.d.ts.map +1 -0
  11. package/dts/alpha/data-card/index.d.ts +3 -0
  12. package/dts/alpha/data-card/index.d.ts.map +1 -0
  13. package/dts/alpha/index.d.ts +1 -0
  14. package/dts/alpha/index.d.ts.map +1 -1
  15. package/dts/alpha/select/DefaultSelectControl.d.ts +1 -0
  16. package/dts/alpha/select/DefaultSelectControl.d.ts.map +1 -1
  17. package/dts/alpha/select/Select.d.ts.map +1 -1
  18. package/dts/alpha/select/types.d.ts +6 -0
  19. package/dts/alpha/select/types.d.ts.map +1 -1
  20. package/dts/cards/AnnouncementCard.d.ts +2 -2
  21. package/dts/cards/AnnouncementCard.d.ts.map +1 -1
  22. package/dts/cards/CardMedia.d.ts +1 -2
  23. package/dts/cards/CardMedia.d.ts.map +1 -1
  24. package/dts/cards/CardRoot.d.ts +32 -0
  25. package/dts/cards/CardRoot.d.ts.map +1 -0
  26. package/dts/cards/ContainedAssetCard.d.ts +27 -0
  27. package/dts/cards/ContainedAssetCard.d.ts.map +1 -1
  28. package/dts/cards/ContentCard/ContentCard.d.ts.map +1 -1
  29. package/dts/cards/ContentCard/ContentCardBody.d.ts +82 -10
  30. package/dts/cards/ContentCard/ContentCardBody.d.ts.map +1 -1
  31. package/dts/cards/ContentCard/ContentCardFooter.d.ts.map +1 -1
  32. package/dts/cards/ContentCard/ContentCardHeader.d.ts +50 -12
  33. package/dts/cards/ContentCard/ContentCardHeader.d.ts.map +1 -1
  34. package/dts/cards/DataCard.d.ts.map +1 -1
  35. package/dts/cards/FeatureEntryCard.d.ts +2 -2
  36. package/dts/cards/FeatureEntryCard.d.ts.map +1 -1
  37. package/dts/cards/FeedCard.d.ts +3 -0
  38. package/dts/cards/FeedCard.d.ts.map +1 -1
  39. package/dts/cards/FloatingAssetCard.d.ts +25 -0
  40. package/dts/cards/FloatingAssetCard.d.ts.map +1 -1
  41. package/dts/cards/MediaCard/MediaCardLayout.d.ts +40 -0
  42. package/dts/cards/MediaCard/MediaCardLayout.d.ts.map +1 -0
  43. package/dts/cards/MediaCard/__figma__/MediaCard.figma.d.ts +2 -0
  44. package/dts/cards/MediaCard/__figma__/MediaCard.figma.d.ts.map +1 -0
  45. package/dts/cards/MediaCard/index.d.ts +28 -0
  46. package/dts/cards/MediaCard/index.d.ts.map +1 -0
  47. package/dts/cards/MessagingCard/MessagingCardLayout.d.ts +62 -0
  48. package/dts/cards/MessagingCard/MessagingCardLayout.d.ts.map +1 -0
  49. package/dts/cards/MessagingCard/__figma__/MessagingCard.figma.d.ts +2 -0
  50. package/dts/cards/MessagingCard/__figma__/MessagingCard.figma.d.ts.map +1 -0
  51. package/dts/cards/MessagingCard/index.d.ts +21 -0
  52. package/dts/cards/MessagingCard/index.d.ts.map +1 -0
  53. package/dts/cards/NudgeCard.d.ts +27 -0
  54. package/dts/cards/NudgeCard.d.ts.map +1 -1
  55. package/dts/cards/UpsellCard.d.ts +27 -0
  56. package/dts/cards/UpsellCard.d.ts.map +1 -1
  57. package/dts/cards/index.d.ts +4 -0
  58. package/dts/cards/index.d.ts.map +1 -1
  59. package/dts/examples/ExampleScreen.d.ts.map +1 -1
  60. package/esm/alpha/combobox/Combobox.js +5 -2
  61. package/esm/alpha/combobox/DefaultComboboxControl.js +7 -2
  62. package/esm/alpha/combobox/__stories__/Combobox.stories.js +123 -0
  63. package/esm/alpha/data-card/DataCard.js +44 -0
  64. package/esm/alpha/data-card/DataCardLayout.js +80 -0
  65. package/esm/alpha/data-card/__figma__/DataCard.figma.js +29 -0
  66. package/esm/alpha/data-card/__stories__/DataCard.stories.js +367 -0
  67. package/esm/alpha/data-card/index.js +1 -0
  68. package/esm/alpha/index.js +1 -0
  69. package/esm/alpha/select/DefaultSelectControl.js +20 -6
  70. package/esm/alpha/select/Select.js +3 -1
  71. package/esm/alpha/select/__stories__/AlphaSelect.stories.js +117 -0
  72. package/esm/cards/AnnouncementCard.js +2 -2
  73. package/esm/cards/CardMedia.js +5 -4
  74. package/esm/cards/CardRoot.js +27 -0
  75. package/esm/cards/ContainedAssetCard.js +27 -0
  76. package/esm/cards/ContentCard/ContentCard.js +7 -6
  77. package/esm/cards/ContentCard/ContentCardBody.js +74 -19
  78. package/esm/cards/ContentCard/ContentCardFooter.js +4 -5
  79. package/esm/cards/ContentCard/ContentCardHeader.js +60 -23
  80. package/esm/cards/ContentCard/__figma__/ContentCard.figma.js +9 -6
  81. package/esm/cards/DataCard.js +35 -0
  82. package/esm/cards/FeatureEntryCard.js +2 -2
  83. package/esm/cards/FeedCard.js +5 -0
  84. package/esm/cards/FloatingAssetCard.js +25 -0
  85. package/esm/cards/MediaCard/MediaCardLayout.js +68 -0
  86. package/esm/cards/MediaCard/__figma__/MediaCard.figma.js +41 -0
  87. package/esm/cards/MediaCard/index.js +45 -0
  88. package/esm/cards/MessagingCard/MessagingCardLayout.js +175 -0
  89. package/esm/cards/MessagingCard/__figma__/MessagingCard.figma.js +44 -0
  90. package/esm/cards/MessagingCard/index.js +58 -0
  91. package/esm/cards/NudgeCard.js +27 -0
  92. package/esm/cards/UpsellCard.js +27 -0
  93. package/esm/cards/__stories__/ContentCard.stories.js +375 -47
  94. package/esm/cards/__stories__/MediaCard.stories.js +189 -0
  95. package/esm/cards/__stories__/MessagingCard.stories.js +535 -0
  96. package/esm/cards/__stories__/NudgeCard.stories.js +2 -2
  97. package/esm/cards/__stories__/UpsellCard.stories.js +2 -2
  98. package/esm/cards/index.js +8 -1
  99. package/esm/controls/__stories__/TextInput.stories.js +1 -1
  100. package/esm/dates/__stories__/DateInput.stories.js +6 -4
  101. package/esm/dates/__stories__/DatePicker.stories.js +6 -4
  102. package/esm/examples/ExampleScreen.js +2 -2
  103. package/package.json +3 -3
  104. package/dts/cards/CardRemoteImage.d.ts +0 -5
  105. package/dts/cards/CardRemoteImage.d.ts.map +0 -1
  106. package/dts/cards/ContentCard/__figma__/ContentCardBody.figma.d.ts +0 -2
  107. package/dts/cards/ContentCard/__figma__/ContentCardBody.figma.d.ts.map +0 -1
  108. package/dts/cards/ContentCard/__figma__/ContentCardFooter.figma.d.ts +0 -2
  109. package/dts/cards/ContentCard/__figma__/ContentCardFooter.figma.d.ts.map +0 -1
  110. package/dts/cards/ContentCard/__figma__/ContentCardHeader.figma.d.ts +0 -2
  111. package/dts/cards/ContentCard/__figma__/ContentCardHeader.figma.d.ts.map +0 -1
  112. package/esm/cards/CardRemoteImage.js +0 -18
  113. package/esm/cards/ContentCard/__figma__/ContentCardBody.figma.js +0 -39
  114. package/esm/cards/ContentCard/__figma__/ContentCardFooter.figma.js +0 -142
  115. package/esm/cards/ContentCard/__figma__/ContentCardHeader.figma.js +0 -25
@@ -6,6 +6,7 @@ import { TextInput } from '../../controls';
6
6
  import { Example, ExampleScreen } from '../../examples/ExampleScreen';
7
7
  import { HStack, VStack } from '../../layout';
8
8
  import { Carousel, RemoteImage, RemoteImageGroup } from '../../media';
9
+ import { Pressable } from '../../system/Pressable';
9
10
  import { Text } from '../../typography/Text';
10
11
  import { ContentCard, ContentCardBody, ContentCardFooter, ContentCardHeader } from '../ContentCard';
11
12
  import { LikeButton } from '../LikeButton';
@@ -20,10 +21,15 @@ const styles = StyleSheet.create({
20
21
  });
21
22
  const exampleProps = {
22
23
  contentHeaderProps: {
23
- avatar: assets.eth.imageUrl,
24
+ thumbnail: /*#__PURE__*/_jsx(RemoteImage, {
25
+ accessibilityLabel: "Ethereum thumbnail",
26
+ shape: "circle",
27
+ size: "l",
28
+ source: ethBackground
29
+ }),
24
30
  title: 'CoinDesk',
25
- meta: 'News',
26
- end: /*#__PURE__*/_jsxs(HStack, {
31
+ subtitle: 'News',
32
+ actions: /*#__PURE__*/_jsxs(HStack, {
27
33
  gap: 0,
28
34
  children: [/*#__PURE__*/_jsx(IconButton, {
29
35
  transparent: true,
@@ -39,30 +45,17 @@ const exampleProps = {
39
45
  })
40
46
  },
41
47
  contentBodyProps: {
42
- body: 'Ethereum Network Shatters Records With Hashrate Climbing to 464 EH/s',
43
- label: /*#__PURE__*/_jsxs(HStack, {
44
- alignItems: "flex-end",
45
- flexWrap: "wrap",
46
- gap: 0.5,
47
- children: [/*#__PURE__*/_jsx(Text, {
48
- color: "fgMuted",
49
- font: "label2",
50
- numberOfLines: 1,
51
- children: "$9,9081.01"
52
- }), /*#__PURE__*/_jsx(Text, {
53
- color: "fgPositive",
54
- font: "label2",
55
- children: "\u2197 6.37%"
56
- })]
57
- }),
58
- media: /*#__PURE__*/_jsx(Image, {
59
- accessibilityIgnoresInvertColors: true,
48
+ title: 'Ethereum Network Shatters Records With Hashrate Climbing to 464 EH/s',
49
+ description: 'This is a description of the Ethereum Network Shatters Records With Hashrate Climbing to 464 EH/s, marking a significant milestone for the blockchain.',
50
+ media: /*#__PURE__*/_jsx(RemoteImage, {
51
+ accessibilityLabel: "Ethereum background",
52
+ resizeMode: "cover",
60
53
  source: {
61
54
  uri: ethBackground
62
55
  },
63
- style: styles.media
56
+ width: "100%"
64
57
  }),
65
- mediaPosition: 'top'
58
+ mediaPlacement: 'top'
66
59
  },
67
60
  contentFooterProps: {
68
61
  children: /*#__PURE__*/_jsxs(_Fragment, {
@@ -70,12 +63,16 @@ const exampleProps = {
70
63
  shape: "circle",
71
64
  size: 32,
72
65
  children: [/*#__PURE__*/_jsx(RemoteImage, {
66
+ accessibilityLabel: "Ethereum",
73
67
  source: assets.eth.imageUrl
74
68
  }), /*#__PURE__*/_jsx(RemoteImage, {
69
+ accessibilityLabel: "Polygon",
75
70
  source: assets.polygon.imageUrl
76
71
  }), /*#__PURE__*/_jsx(RemoteImage, {
72
+ accessibilityLabel: "Uniswap",
77
73
  source: assets.uni.imageUrl
78
74
  }), /*#__PURE__*/_jsx(RemoteImage, {
75
+ accessibilityLabel: "Sushi",
79
76
  source: assets.sushi.imageUrl
80
77
  })]
81
78
  }), /*#__PURE__*/_jsx(Button, {
@@ -90,6 +87,7 @@ const CarouselItem = () => /*#__PURE__*/_jsxs(VStack, {
90
87
  position: "relative",
91
88
  children: [/*#__PURE__*/_jsx(Image, {
92
89
  accessibilityIgnoresInvertColors: true,
90
+ accessibilityLabel: "Ethereum background",
93
91
  source: {
94
92
  uri: ethBackground
95
93
  },
@@ -121,7 +119,6 @@ const ContentCardScreen = () => {
121
119
  paddingX: 0,
122
120
  children: [/*#__PURE__*/_jsx(Text, {
123
121
  font: "title3",
124
- paddingX: 3,
125
122
  children: "Full Example"
126
123
  }), /*#__PURE__*/_jsxs(ContentCard, {
127
124
  children: [/*#__PURE__*/_jsx(ContentCardHeader, _extends({}, exampleProps.contentHeaderProps)), /*#__PURE__*/_jsx(ContentCardBody, _extends({}, exampleProps.contentBodyProps)), /*#__PURE__*/_jsx(ContentCardFooter, _extends({}, exampleProps.contentFooterProps))]
@@ -130,23 +127,22 @@ const ContentCardScreen = () => {
130
127
  paddingX: 0,
131
128
  children: [/*#__PURE__*/_jsx(Text, {
132
129
  font: "title3",
133
- paddingX: 3,
134
- children: "Full Example with mediaPosition bottom"
130
+ children: "Full Example with mediaPlacement bottom"
135
131
  }), /*#__PURE__*/_jsxs(ContentCard, {
136
132
  children: [/*#__PURE__*/_jsx(ContentCardHeader, _extends({}, exampleProps.contentHeaderProps)), /*#__PURE__*/_jsx(ContentCardBody, _extends({}, exampleProps.contentBodyProps, {
137
- mediaPosition: "bottom"
133
+ mediaPlacement: "bottom"
138
134
  })), /*#__PURE__*/_jsx(ContentCardFooter, _extends({}, exampleProps.contentFooterProps))]
139
135
  })]
140
136
  }), /*#__PURE__*/_jsxs(Example, {
141
137
  paddingX: 0,
142
138
  children: [/*#__PURE__*/_jsx(Text, {
143
139
  font: "title3",
144
- paddingX: 3,
145
- children: "Full Example with mediaPosition right"
140
+ children: "Full Example with mediaPlacement end"
146
141
  }), /*#__PURE__*/_jsxs(ContentCard, {
147
142
  children: [/*#__PURE__*/_jsx(ContentCardHeader, _extends({}, exampleProps.contentHeaderProps)), /*#__PURE__*/_jsx(ContentCardBody, _extends({}, exampleProps.contentBodyProps, {
148
143
  media: /*#__PURE__*/_jsx(Image, {
149
144
  accessibilityIgnoresInvertColors: true,
145
+ accessibilityLabel: "Ethereum media",
150
146
  source: {
151
147
  uri: ethBackground
152
148
  },
@@ -154,19 +150,19 @@ const ContentCardScreen = () => {
154
150
  height: 96
155
151
  })
156
152
  }),
157
- mediaPosition: "right"
153
+ mediaPlacement: "end"
158
154
  })), /*#__PURE__*/_jsx(ContentCardFooter, _extends({}, exampleProps.contentFooterProps))]
159
155
  })]
160
156
  }), /*#__PURE__*/_jsxs(Example, {
161
157
  paddingX: 0,
162
158
  children: [/*#__PURE__*/_jsx(Text, {
163
159
  font: "title3",
164
- paddingX: 3,
165
- children: "Full Example with mediaPosition left"
160
+ children: "Full Example with mediaPlacement start"
166
161
  }), /*#__PURE__*/_jsxs(ContentCard, {
167
162
  children: [/*#__PURE__*/_jsx(ContentCardHeader, _extends({}, exampleProps.contentHeaderProps)), /*#__PURE__*/_jsx(ContentCardBody, _extends({}, exampleProps.contentBodyProps, {
168
163
  media: /*#__PURE__*/_jsx(Image, {
169
164
  accessibilityIgnoresInvertColors: true,
165
+ accessibilityLabel: "Ethereum media",
170
166
  source: {
171
167
  uri: ethBackground
172
168
  },
@@ -174,14 +170,13 @@ const ContentCardScreen = () => {
174
170
  height: 96
175
171
  })
176
172
  }),
177
- mediaPosition: "left"
173
+ mediaPlacement: "start"
178
174
  })), /*#__PURE__*/_jsx(ContentCardFooter, _extends({}, exampleProps.contentFooterProps))]
179
175
  })]
180
176
  }), /*#__PURE__*/_jsxs(Example, {
181
177
  paddingX: 0,
182
178
  children: [/*#__PURE__*/_jsx(Text, {
183
179
  font: "title3",
184
- paddingX: 3,
185
180
  children: "Full Example with no media"
186
181
  }), /*#__PURE__*/_jsxs(ContentCard, {
187
182
  children: [/*#__PURE__*/_jsx(ContentCardHeader, _extends({}, exampleProps.contentHeaderProps)), /*#__PURE__*/_jsx(ContentCardBody, _extends({}, exampleProps.contentBodyProps, {
@@ -192,11 +187,9 @@ const ContentCardScreen = () => {
192
187
  paddingX: 0,
193
188
  children: [/*#__PURE__*/_jsx(Text, {
194
189
  font: "title3",
195
- paddingX: 3,
196
190
  children: "Full Example with product component"
197
191
  }), /*#__PURE__*/_jsxs(ContentCard, {
198
192
  children: [/*#__PURE__*/_jsx(ContentCardHeader, _extends({}, exampleProps.contentHeaderProps)), /*#__PURE__*/_jsx(ContentCardBody, _extends({}, exampleProps.contentBodyProps, {
199
- label: null,
200
193
  media: null,
201
194
  children: /*#__PURE__*/_jsx(TextInput, {
202
195
  accessibilityLabel: "Text input field",
@@ -225,27 +218,24 @@ const ContentCardScreen = () => {
225
218
  paddingX: 0,
226
219
  children: [/*#__PURE__*/_jsx(Text, {
227
220
  font: "title3",
228
- paddingX: 3,
229
221
  children: "Full Example with product component - Custom Media"
230
222
  }), /*#__PURE__*/_jsxs(ContentCard, {
231
223
  children: [/*#__PURE__*/_jsx(ContentCardHeader, _extends({}, exampleProps.contentHeaderProps, {
232
- avatar: null,
233
- end: /*#__PURE__*/_jsx(Text, {
224
+ actions: /*#__PURE__*/_jsx(Text, {
234
225
  color: "fgMuted",
235
226
  font: "legal",
236
227
  children: "Updated 1hr ago"
237
228
  }),
238
- meta: null,
239
229
  title: /*#__PURE__*/_jsx(Text, {
240
230
  font: "title3",
241
231
  children: "Today's briefing"
242
232
  })
243
233
  })), /*#__PURE__*/_jsx(ContentCardBody, _extends({}, exampleProps.contentBodyProps, {
244
- label: null,
245
234
  media: /*#__PURE__*/_jsxs(HStack, {
246
235
  position: "relative",
247
236
  children: [/*#__PURE__*/_jsx(Image, {
248
237
  accessibilityIgnoresInvertColors: true,
238
+ accessibilityLabel: "Ethereum media",
249
239
  source: {
250
240
  uri: ethBackground
251
241
  },
@@ -279,19 +269,17 @@ const ContentCardScreen = () => {
279
269
  paddingX: 0,
280
270
  children: [/*#__PURE__*/_jsx(Text, {
281
271
  font: "title3",
282
- paddingX: 3,
283
272
  children: "Full Example with product component - Carousel"
284
273
  }), /*#__PURE__*/_jsxs(ContentCard, {
285
274
  children: [/*#__PURE__*/_jsx(ContentCardHeader, _extends({}, exampleProps.contentHeaderProps, {
286
- avatar: null,
287
- end: null,
288
- meta: null,
275
+ actions: null,
276
+ subtitle: null,
277
+ thumbnail: null,
289
278
  title: /*#__PURE__*/_jsx(Text, {
290
279
  font: "title3",
291
280
  children: "Crypto moves money forward"
292
281
  })
293
282
  })), /*#__PURE__*/_jsx(ContentCardBody, _extends({}, exampleProps.contentBodyProps, {
294
- label: null,
295
283
  media: null,
296
284
  children: /*#__PURE__*/_jsx(Carousel, {
297
285
  gap: 1.5,
@@ -303,7 +291,6 @@ const ContentCardScreen = () => {
303
291
  paddingX: 0,
304
292
  children: [/*#__PURE__*/_jsx(Text, {
305
293
  font: "title3",
306
- paddingX: 3,
307
294
  children: "Full Example with IconCounterButton"
308
295
  }), /*#__PURE__*/_jsxs(ContentCard, {
309
296
  children: [/*#__PURE__*/_jsx(ContentCardHeader, _extends({}, exampleProps.contentHeaderProps)), /*#__PURE__*/_jsx(ContentCardBody, _extends({}, exampleProps.contentBodyProps, {
@@ -314,18 +301,359 @@ const ContentCardScreen = () => {
314
301
  justifyContent: "space-between",
315
302
  paddingTop: 0.5,
316
303
  children: [/*#__PURE__*/_jsx(IconCounterButton, {
304
+ accessibilityLabel: "like, 99 likes",
317
305
  count: 99,
318
306
  icon: "heart"
319
307
  }), /*#__PURE__*/_jsx(IconCounterButton, {
308
+ accessibilityLabel: "comment, 4200 comments",
320
309
  count: 4200,
321
310
  icon: "comment"
322
311
  }), /*#__PURE__*/_jsx(IconCounterButton, {
312
+ accessibilityLabel: "share, 9900000 shares",
323
313
  count: 9900000,
324
314
  icon: "arrowsHorizontal"
325
315
  })]
326
316
  })
327
317
  })]
328
318
  })]
319
+ }), /*#__PURE__*/_jsx(Example, {
320
+ paddingX: 0,
321
+ children: /*#__PURE__*/_jsx(Text, {
322
+ font: "title2",
323
+ children: "With Background"
324
+ })
325
+ }), /*#__PURE__*/_jsxs(Example, {
326
+ paddingX: 0,
327
+ children: [/*#__PURE__*/_jsx(Text, {
328
+ font: "title3",
329
+ children: "Full Example with background"
330
+ }), /*#__PURE__*/_jsxs(ContentCard, {
331
+ background: "bgAlternate",
332
+ children: [/*#__PURE__*/_jsx(ContentCardHeader, _extends({}, exampleProps.contentHeaderProps)), /*#__PURE__*/_jsx(ContentCardBody, _extends({}, exampleProps.contentBodyProps)), /*#__PURE__*/_jsxs(ContentCardFooter, {
333
+ children: [/*#__PURE__*/_jsxs(RemoteImageGroup, {
334
+ shape: "circle",
335
+ size: 32,
336
+ children: [/*#__PURE__*/_jsx(RemoteImage, {
337
+ accessibilityLabel: "Ethereum",
338
+ source: assets.eth.imageUrl
339
+ }), /*#__PURE__*/_jsx(RemoteImage, {
340
+ accessibilityLabel: "Polygon",
341
+ source: assets.polygon.imageUrl
342
+ }), /*#__PURE__*/_jsx(RemoteImage, {
343
+ accessibilityLabel: "Uniswap",
344
+ source: assets.uni.imageUrl
345
+ }), /*#__PURE__*/_jsx(RemoteImage, {
346
+ accessibilityLabel: "Sushi",
347
+ source: assets.sushi.imageUrl
348
+ })]
349
+ }), /*#__PURE__*/_jsx(Button, {
350
+ compact: true,
351
+ variant: "tertiary",
352
+ children: "Share"
353
+ })]
354
+ })]
355
+ })]
356
+ }), /*#__PURE__*/_jsxs(Example, {
357
+ paddingX: 0,
358
+ children: [/*#__PURE__*/_jsx(Text, {
359
+ font: "title3",
360
+ children: "mediaPlacement end with background"
361
+ }), /*#__PURE__*/_jsxs(ContentCard, {
362
+ background: "bgAlternate",
363
+ children: [/*#__PURE__*/_jsx(ContentCardHeader, _extends({}, exampleProps.contentHeaderProps)), /*#__PURE__*/_jsx(ContentCardBody, _extends({}, exampleProps.contentBodyProps, {
364
+ media: /*#__PURE__*/_jsx(Image, {
365
+ accessibilityIgnoresInvertColors: true,
366
+ accessibilityLabel: "Ethereum media",
367
+ source: {
368
+ uri: ethBackground
369
+ },
370
+ style: _extends({}, styles.media, {
371
+ height: 96
372
+ })
373
+ }),
374
+ mediaPlacement: "end"
375
+ })), /*#__PURE__*/_jsxs(ContentCardFooter, {
376
+ children: [/*#__PURE__*/_jsxs(RemoteImageGroup, {
377
+ shape: "circle",
378
+ size: 32,
379
+ children: [/*#__PURE__*/_jsx(RemoteImage, {
380
+ accessibilityLabel: "Ethereum",
381
+ source: assets.eth.imageUrl
382
+ }), /*#__PURE__*/_jsx(RemoteImage, {
383
+ accessibilityLabel: "Polygon",
384
+ source: assets.polygon.imageUrl
385
+ }), /*#__PURE__*/_jsx(RemoteImage, {
386
+ accessibilityLabel: "Uniswap",
387
+ source: assets.uni.imageUrl
388
+ }), /*#__PURE__*/_jsx(RemoteImage, {
389
+ accessibilityLabel: "Sushi",
390
+ source: assets.sushi.imageUrl
391
+ })]
392
+ }), /*#__PURE__*/_jsx(Button, {
393
+ compact: true,
394
+ variant: "tertiary",
395
+ children: "Share"
396
+ })]
397
+ })]
398
+ })]
399
+ }), /*#__PURE__*/_jsxs(Example, {
400
+ paddingX: 0,
401
+ children: [/*#__PURE__*/_jsx(Text, {
402
+ font: "title3",
403
+ children: "No media with background"
404
+ }), /*#__PURE__*/_jsxs(ContentCard, {
405
+ background: "bgAlternate",
406
+ children: [/*#__PURE__*/_jsx(ContentCardHeader, _extends({}, exampleProps.contentHeaderProps)), /*#__PURE__*/_jsx(ContentCardBody, _extends({}, exampleProps.contentBodyProps, {
407
+ media: null
408
+ })), /*#__PURE__*/_jsxs(ContentCardFooter, {
409
+ children: [/*#__PURE__*/_jsxs(RemoteImageGroup, {
410
+ shape: "circle",
411
+ size: 32,
412
+ children: [/*#__PURE__*/_jsx(RemoteImage, {
413
+ accessibilityLabel: "Ethereum",
414
+ source: assets.eth.imageUrl
415
+ }), /*#__PURE__*/_jsx(RemoteImage, {
416
+ accessibilityLabel: "Polygon",
417
+ source: assets.polygon.imageUrl
418
+ }), /*#__PURE__*/_jsx(RemoteImage, {
419
+ accessibilityLabel: "Uniswap",
420
+ source: assets.uni.imageUrl
421
+ }), /*#__PURE__*/_jsx(RemoteImage, {
422
+ accessibilityLabel: "Sushi",
423
+ source: assets.sushi.imageUrl
424
+ })]
425
+ }), /*#__PURE__*/_jsx(Button, {
426
+ compact: true,
427
+ variant: "tertiary",
428
+ children: "Share"
429
+ })]
430
+ })]
431
+ })]
432
+ }), /*#__PURE__*/_jsxs(Example, {
433
+ paddingX: 0,
434
+ children: [/*#__PURE__*/_jsx(Text, {
435
+ font: "title3",
436
+ children: "IconCounterButton with background"
437
+ }), /*#__PURE__*/_jsxs(ContentCard, {
438
+ background: "bgAlternate",
439
+ children: [/*#__PURE__*/_jsx(ContentCardHeader, _extends({}, exampleProps.contentHeaderProps)), /*#__PURE__*/_jsx(ContentCardBody, _extends({}, exampleProps.contentBodyProps, {
440
+ media: null
441
+ })), /*#__PURE__*/_jsxs(ContentCardFooter, {
442
+ gap: 4,
443
+ justifyContent: "space-between",
444
+ children: [/*#__PURE__*/_jsx(IconCounterButton, {
445
+ accessibilityLabel: "like, 99 likes",
446
+ count: 99,
447
+ icon: "heart"
448
+ }), /*#__PURE__*/_jsx(IconCounterButton, {
449
+ accessibilityLabel: "comment, 4200 comments",
450
+ count: 4200,
451
+ icon: "comment"
452
+ }), /*#__PURE__*/_jsx(IconCounterButton, {
453
+ accessibilityLabel: "share, 9900000 shares",
454
+ count: 9900000,
455
+ icon: "arrowsHorizontal"
456
+ })]
457
+ })]
458
+ })]
459
+ }), /*#__PURE__*/_jsxs(Example, {
460
+ paddingX: 0,
461
+ children: [/*#__PURE__*/_jsx(Text, {
462
+ font: "title2",
463
+ children: "Accessible Pressable Cards"
464
+ }), /*#__PURE__*/_jsx(Text, {
465
+ color: "fgMuted",
466
+ font: "body",
467
+ children: "Uses accessible false with an internal button for VoiceOver access."
468
+ })]
469
+ }), /*#__PURE__*/_jsxs(Example, {
470
+ paddingX: 0,
471
+ children: [/*#__PURE__*/_jsx(Text, {
472
+ font: "title3",
473
+ children: "Accessible pressable card"
474
+ }), /*#__PURE__*/_jsx(Pressable, {
475
+ accessible: false,
476
+ background: "bg",
477
+ borderRadius: 500,
478
+ onPress: () => {},
479
+ children: /*#__PURE__*/_jsxs(ContentCard, {
480
+ children: [/*#__PURE__*/_jsx(ContentCardHeader, {
481
+ subtitle: "News",
482
+ thumbnail: /*#__PURE__*/_jsx(RemoteImage, {
483
+ accessibilityLabel: "Ethereum thumbnail",
484
+ shape: "circle",
485
+ size: "l",
486
+ source: ethBackground
487
+ }),
488
+ title: "CoinDesk"
489
+ }), /*#__PURE__*/_jsx(ContentCardBody, _extends({}, exampleProps.contentBodyProps)), /*#__PURE__*/_jsxs(ContentCardFooter, {
490
+ children: [/*#__PURE__*/_jsxs(RemoteImageGroup, {
491
+ shape: "circle",
492
+ size: 32,
493
+ children: [/*#__PURE__*/_jsx(RemoteImage, {
494
+ accessibilityLabel: "Ethereum",
495
+ source: assets.eth.imageUrl
496
+ }), /*#__PURE__*/_jsx(RemoteImage, {
497
+ accessibilityLabel: "Polygon",
498
+ source: assets.polygon.imageUrl
499
+ }), /*#__PURE__*/_jsx(RemoteImage, {
500
+ accessibilityLabel: "Uniswap",
501
+ source: assets.uni.imageUrl
502
+ }), /*#__PURE__*/_jsx(RemoteImage, {
503
+ accessibilityLabel: "Sushi",
504
+ source: assets.sushi.imageUrl
505
+ })]
506
+ }), /*#__PURE__*/_jsx(Button, {
507
+ compact: true,
508
+ onPress: () => {},
509
+ variant: "secondary",
510
+ children: "View Details"
511
+ })]
512
+ })]
513
+ })
514
+ })]
515
+ }), /*#__PURE__*/_jsxs(Example, {
516
+ paddingX: 0,
517
+ children: [/*#__PURE__*/_jsx(Text, {
518
+ font: "title3",
519
+ children: "Accessible pressable card with background"
520
+ }), /*#__PURE__*/_jsx(Pressable, {
521
+ accessible: false,
522
+ background: "bgAlternate",
523
+ borderRadius: 500,
524
+ onPress: () => {},
525
+ children: /*#__PURE__*/_jsxs(ContentCard, {
526
+ children: [/*#__PURE__*/_jsx(ContentCardHeader, {
527
+ subtitle: "News",
528
+ thumbnail: /*#__PURE__*/_jsx(RemoteImage, {
529
+ accessibilityLabel: "Ethereum thumbnail",
530
+ shape: "circle",
531
+ size: "l",
532
+ source: ethBackground
533
+ }),
534
+ title: "CoinDesk"
535
+ }), /*#__PURE__*/_jsx(ContentCardBody, _extends({}, exampleProps.contentBodyProps)), /*#__PURE__*/_jsxs(ContentCardFooter, {
536
+ children: [/*#__PURE__*/_jsxs(RemoteImageGroup, {
537
+ shape: "circle",
538
+ size: 32,
539
+ children: [/*#__PURE__*/_jsx(RemoteImage, {
540
+ accessibilityLabel: "Ethereum",
541
+ source: assets.eth.imageUrl
542
+ }), /*#__PURE__*/_jsx(RemoteImage, {
543
+ accessibilityLabel: "Polygon",
544
+ source: assets.polygon.imageUrl
545
+ }), /*#__PURE__*/_jsx(RemoteImage, {
546
+ accessibilityLabel: "Uniswap",
547
+ source: assets.uni.imageUrl
548
+ }), /*#__PURE__*/_jsx(RemoteImage, {
549
+ accessibilityLabel: "Sushi",
550
+ source: assets.sushi.imageUrl
551
+ })]
552
+ }), /*#__PURE__*/_jsx(Button, {
553
+ compact: true,
554
+ onPress: () => {},
555
+ variant: "tertiary",
556
+ children: "View Details"
557
+ })]
558
+ })]
559
+ })
560
+ })]
561
+ }), /*#__PURE__*/_jsxs(Example, {
562
+ paddingX: 0,
563
+ children: [/*#__PURE__*/_jsx(Text, {
564
+ font: "title3",
565
+ children: "Accessible pressable card (no media)"
566
+ }), /*#__PURE__*/_jsx(Pressable, {
567
+ accessible: false,
568
+ background: "bgAlternate",
569
+ borderRadius: 500,
570
+ onPress: () => {},
571
+ children: /*#__PURE__*/_jsxs(ContentCard, {
572
+ children: [/*#__PURE__*/_jsx(ContentCardHeader, {
573
+ subtitle: "News",
574
+ thumbnail: /*#__PURE__*/_jsx(RemoteImage, {
575
+ accessibilityLabel: "Ethereum thumbnail",
576
+ shape: "circle",
577
+ size: "l",
578
+ source: ethBackground
579
+ }),
580
+ title: "CoinDesk"
581
+ }), /*#__PURE__*/_jsx(ContentCardBody, _extends({}, exampleProps.contentBodyProps, {
582
+ media: null
583
+ })), /*#__PURE__*/_jsxs(ContentCardFooter, {
584
+ children: [/*#__PURE__*/_jsxs(RemoteImageGroup, {
585
+ shape: "circle",
586
+ size: 32,
587
+ children: [/*#__PURE__*/_jsx(RemoteImage, {
588
+ accessibilityLabel: "Ethereum",
589
+ source: assets.eth.imageUrl
590
+ }), /*#__PURE__*/_jsx(RemoteImage, {
591
+ accessibilityLabel: "Polygon",
592
+ source: assets.polygon.imageUrl
593
+ }), /*#__PURE__*/_jsx(RemoteImage, {
594
+ accessibilityLabel: "Uniswap",
595
+ source: assets.uni.imageUrl
596
+ }), /*#__PURE__*/_jsx(RemoteImage, {
597
+ accessibilityLabel: "Sushi",
598
+ source: assets.sushi.imageUrl
599
+ })]
600
+ }), /*#__PURE__*/_jsx(Button, {
601
+ compact: true,
602
+ onPress: () => {},
603
+ variant: "tertiary",
604
+ children: "View Details"
605
+ })]
606
+ })]
607
+ })
608
+ })]
609
+ }), /*#__PURE__*/_jsxs(Example, {
610
+ paddingX: 0,
611
+ children: [/*#__PURE__*/_jsx(Text, {
612
+ font: "title3",
613
+ children: "Accessible pressable card (disabled)"
614
+ }), /*#__PURE__*/_jsx(Pressable, {
615
+ disabled: true,
616
+ accessible: false,
617
+ background: "bgAlternate",
618
+ borderRadius: 500,
619
+ children: /*#__PURE__*/_jsxs(ContentCard, {
620
+ children: [/*#__PURE__*/_jsx(ContentCardHeader, {
621
+ subtitle: "News",
622
+ thumbnail: /*#__PURE__*/_jsx(RemoteImage, {
623
+ accessibilityLabel: "Ethereum thumbnail",
624
+ shape: "circle",
625
+ size: "l",
626
+ source: ethBackground
627
+ }),
628
+ title: "CoinDesk"
629
+ }), /*#__PURE__*/_jsx(ContentCardBody, _extends({}, exampleProps.contentBodyProps, {
630
+ media: null
631
+ })), /*#__PURE__*/_jsxs(ContentCardFooter, {
632
+ children: [/*#__PURE__*/_jsxs(RemoteImageGroup, {
633
+ shape: "circle",
634
+ size: 32,
635
+ children: [/*#__PURE__*/_jsx(RemoteImage, {
636
+ accessibilityLabel: "Ethereum",
637
+ source: assets.eth.imageUrl
638
+ }), /*#__PURE__*/_jsx(RemoteImage, {
639
+ accessibilityLabel: "Polygon",
640
+ source: assets.polygon.imageUrl
641
+ }), /*#__PURE__*/_jsx(RemoteImage, {
642
+ accessibilityLabel: "Uniswap",
643
+ source: assets.uni.imageUrl
644
+ }), /*#__PURE__*/_jsx(RemoteImage, {
645
+ accessibilityLabel: "Sushi",
646
+ source: assets.sushi.imageUrl
647
+ })]
648
+ }), /*#__PURE__*/_jsx(Button, {
649
+ compact: true,
650
+ disabled: true,
651
+ variant: "tertiary",
652
+ children: "View Details"
653
+ })]
654
+ })]
655
+ })
656
+ })]
329
657
  })]
330
658
  });
331
659
  };