@linktr.ee/messaging-react 3.32.0-rc-1786000762 → 3.32.0-rc-1786001289
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/dist/index.d.ts
CHANGED
|
@@ -755,8 +755,8 @@ export declare interface LinkAttachmentCta {
|
|
|
755
755
|
* (which controls bubble side, not button emphasis).
|
|
756
756
|
*
|
|
757
757
|
* NOTE: this is the presentational half only. The wire-format value should
|
|
758
|
-
* ride the shared action contract (
|
|
759
|
-
*
|
|
758
|
+
* ride the shared interactive-surfaces action contract (the `InteractiveAction`
|
|
759
|
+
* shape), not be re-invented per surface.
|
|
760
760
|
*/
|
|
761
761
|
variant?: 'primary' | 'secondary';
|
|
762
762
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@linktr.ee/messaging-react",
|
|
3
|
-
"version": "3.32.0-rc-
|
|
3
|
+
"version": "3.32.0-rc-1786001289",
|
|
4
4
|
"description": "React messaging components built on messaging-core for web applications",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.cjs",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
},
|
|
51
51
|
"dependencies": {
|
|
52
52
|
"@linktr.ee/component-library": "11.8.6",
|
|
53
|
-
"@linktr.ee/messaging-core": "2.4.0-rc-
|
|
53
|
+
"@linktr.ee/messaging-core": "2.4.0-rc-1786001289",
|
|
54
54
|
"@linktr.ee/messaging-taxonomy": "^0.5.1",
|
|
55
55
|
"@phosphor-icons/react": "^2.1.10"
|
|
56
56
|
},
|
|
@@ -262,6 +262,87 @@ const ACCENT_CARD = {
|
|
|
262
262
|
thumbnailUrl: IMAGE_THUMBNAIL,
|
|
263
263
|
}
|
|
264
264
|
|
|
265
|
+
/**
|
|
266
|
+
* CTA emphasis — `cta.variant`. `primary` (default) is the filled button;
|
|
267
|
+
* `secondary` is the subtle/grey button used by the official-channel cards.
|
|
268
|
+
* Shown on both surfaces, and over an accent-derived chin: the translucent
|
|
269
|
+
* `secondary` fills (`bg-white/15`, `bg-black/[0.06]`) composite against the
|
|
270
|
+
* extracted colour, whereas the opaque `primary` fill is accent-independent —
|
|
271
|
+
* the bottom rows are the Chromatic guard for that legibility difference.
|
|
272
|
+
*/
|
|
273
|
+
export const CtaEmphasis: StoryFn = () => {
|
|
274
|
+
const cta = (label: string, variant?: 'primary' | 'secondary') => ({
|
|
275
|
+
label,
|
|
276
|
+
onClick: () => alert(`Tapped ${label}`),
|
|
277
|
+
...(variant ? { variant } : {}),
|
|
278
|
+
})
|
|
279
|
+
return (
|
|
280
|
+
<Table>
|
|
281
|
+
<TableHead columns={['primary (default)', 'secondary']} />
|
|
282
|
+
<tbody>
|
|
283
|
+
<tr>
|
|
284
|
+
<RowLabel>Received (light)</RowLabel>
|
|
285
|
+
<td className="align-top">
|
|
286
|
+
<LinkAttachment.Received {...ACCENT_CARD} cta={cta('Add now')} />
|
|
287
|
+
</td>
|
|
288
|
+
<td className="align-top">
|
|
289
|
+
<LinkAttachment.Received
|
|
290
|
+
{...ACCENT_CARD}
|
|
291
|
+
cta={cta('Add now', 'secondary')}
|
|
292
|
+
/>
|
|
293
|
+
</td>
|
|
294
|
+
</tr>
|
|
295
|
+
<tr>
|
|
296
|
+
<RowLabel>Sent (dark)</RowLabel>
|
|
297
|
+
<td className="align-top">
|
|
298
|
+
<LinkAttachment.Sent {...ACCENT_CARD} cta={cta('Add now')} />
|
|
299
|
+
</td>
|
|
300
|
+
<td className="align-top">
|
|
301
|
+
<LinkAttachment.Sent
|
|
302
|
+
{...ACCENT_CARD}
|
|
303
|
+
cta={cta('Add now', 'secondary')}
|
|
304
|
+
/>
|
|
305
|
+
</td>
|
|
306
|
+
</tr>
|
|
307
|
+
<tr>
|
|
308
|
+
<RowLabel>Received + accent chin</RowLabel>
|
|
309
|
+
<td className="align-top">
|
|
310
|
+
<LinkAttachment.Received
|
|
311
|
+
{...ACCENT_CARD}
|
|
312
|
+
accentColor="#7008E7"
|
|
313
|
+
cta={cta('Add now')}
|
|
314
|
+
/>
|
|
315
|
+
</td>
|
|
316
|
+
<td className="align-top">
|
|
317
|
+
<LinkAttachment.Received
|
|
318
|
+
{...ACCENT_CARD}
|
|
319
|
+
accentColor="#7008E7"
|
|
320
|
+
cta={cta('Add now', 'secondary')}
|
|
321
|
+
/>
|
|
322
|
+
</td>
|
|
323
|
+
</tr>
|
|
324
|
+
<tr>
|
|
325
|
+
<RowLabel>Sent + accent chin</RowLabel>
|
|
326
|
+
<td className="align-top">
|
|
327
|
+
<LinkAttachment.Sent
|
|
328
|
+
{...ACCENT_CARD}
|
|
329
|
+
accentColor="#7008E7"
|
|
330
|
+
cta={cta('Add now')}
|
|
331
|
+
/>
|
|
332
|
+
</td>
|
|
333
|
+
<td className="align-top">
|
|
334
|
+
<LinkAttachment.Sent
|
|
335
|
+
{...ACCENT_CARD}
|
|
336
|
+
accentColor="#7008E7"
|
|
337
|
+
cta={cta('Add now', 'secondary')}
|
|
338
|
+
/>
|
|
339
|
+
</td>
|
|
340
|
+
</tr>
|
|
341
|
+
</tbody>
|
|
342
|
+
</Table>
|
|
343
|
+
)
|
|
344
|
+
}
|
|
345
|
+
|
|
265
346
|
/**
|
|
266
347
|
* The dominant-colour card and its WCAG AA gate (MES-1349, corrected MES-1388).
|
|
267
348
|
*
|
|
@@ -118,8 +118,8 @@ export interface LinkAttachmentCta {
|
|
|
118
118
|
* (which controls bubble side, not button emphasis).
|
|
119
119
|
*
|
|
120
120
|
* NOTE: this is the presentational half only. The wire-format value should
|
|
121
|
-
* ride the shared action contract (
|
|
122
|
-
*
|
|
121
|
+
* ride the shared interactive-surfaces action contract (the `InteractiveAction`
|
|
122
|
+
* shape), not be re-invented per surface.
|
|
123
123
|
*/
|
|
124
124
|
variant?: 'primary' | 'secondary'
|
|
125
125
|
}
|