@sproutsocial/seeds-react-narrative-kit 0.3.0 → 0.5.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 (50) hide show
  1. package/.turbo/turbo-build.log +11 -11
  2. package/CHANGELOG.md +33 -0
  3. package/dist/ai-container.css +39 -0
  4. package/dist/esm/index.js +199 -0
  5. package/dist/esm/index.js.map +1 -1
  6. package/dist/index.d.mts +186 -4
  7. package/dist/index.d.ts +186 -4
  8. package/dist/index.js +204 -0
  9. package/dist/index.js.map +1 -1
  10. package/dist/narrative-attribution.css +56 -0
  11. package/dist/narrative-data-callout.css +103 -0
  12. package/dist/narrative-ordered-list.css +112 -0
  13. package/dist/narrative-social-media-card.css +82 -0
  14. package/dist/pull-quote.css +4 -25
  15. package/package.json +12 -5
  16. package/src/AIContainer/AIContainer.stories.tsx +54 -0
  17. package/src/AIContainer/AIContainer.tsx +35 -0
  18. package/src/AIContainer/AIContainerTypes.ts +14 -0
  19. package/src/AIContainer/__tests__/AIContainer.test.tsx +61 -0
  20. package/src/AIContainer/index.ts +2 -0
  21. package/src/NarrativeAttribution/NarrativeAttribution.stories.tsx +78 -0
  22. package/src/NarrativeAttribution/NarrativeAttribution.tsx +54 -0
  23. package/src/NarrativeAttribution/NarrativeAttributionTypes.ts +13 -0
  24. package/src/NarrativeAttribution/index.ts +2 -0
  25. package/src/NarrativeDataCallout/NarrativeDataCallout.stories.tsx +71 -0
  26. package/src/NarrativeDataCallout/NarrativeDataCallout.tsx +50 -0
  27. package/src/NarrativeDataCallout/NarrativeDataCalloutTypes.ts +18 -0
  28. package/src/NarrativeDataCallout/__tests__/NarrativeDataCallout.test.tsx +69 -0
  29. package/src/NarrativeDataCallout/index.ts +2 -0
  30. package/src/NarrativeOrderedList/NarrativeOrderedList.stories.tsx +69 -0
  31. package/src/NarrativeOrderedList/NarrativeOrderedList.tsx +74 -0
  32. package/src/NarrativeOrderedList/NarrativeOrderedListTypes.ts +39 -0
  33. package/src/NarrativeOrderedList/__tests__/NarrativeOrderedList.test.tsx +89 -0
  34. package/src/NarrativeOrderedList/index.ts +6 -0
  35. package/src/NarrativeSocialMediaCard/NarrativeSocialMediaCard.stories.tsx +111 -0
  36. package/src/NarrativeSocialMediaCard/NarrativeSocialMediaCard.tsx +80 -0
  37. package/src/NarrativeSocialMediaCard/NarrativeSocialMediaCardTypes.ts +30 -0
  38. package/src/NarrativeSocialMediaCard/__tests__/NarrativeSocialMediaCard.test.tsx +154 -0
  39. package/src/NarrativeSocialMediaCard/index.ts +5 -0
  40. package/src/Playground/Playground.stories.tsx +176 -5
  41. package/src/PullQuote/PullQuote.stories.tsx +1 -0
  42. package/src/PullQuote/PullQuote.tsx +6 -3
  43. package/src/ai-container.css +39 -0
  44. package/src/css.d.ts +1 -0
  45. package/src/index.ts +25 -0
  46. package/src/narrative-attribution.css +56 -0
  47. package/src/narrative-data-callout.css +103 -0
  48. package/src/narrative-ordered-list.css +112 -0
  49. package/src/narrative-social-media-card.css +82 -0
  50. package/src/pull-quote.css +4 -25
package/dist/index.d.mts CHANGED
@@ -140,9 +140,10 @@ interface TypePullQuoteProps extends React.HTMLAttributes<HTMLElement> {
140
140
  * optional attribution row (author name, avatar, network).
141
141
  *
142
142
  * Rendered as semantic `<figure>` / `<blockquote>` / `<figcaption>` markup.
143
- * Styled via `pull-quote.css` (Seeds CSS custom properties); consumers import
144
- * the classes through `@sproutsocial/racine/css/components`. Surface overrides
145
- * are done with standard `className` / `style`.
143
+ * Styled via `pull-quote.css` and `ai-container.css` (Seeds CSS custom
144
+ * properties); consumers import the classes through
145
+ * `@sproutsocial/racine/css/components`. Surface overrides are done with
146
+ * standard `className` / `style`.
146
147
  */
147
148
  declare const PullQuote: React.ForwardRefExoticComponent<TypePullQuoteProps & React.RefAttributes<HTMLElement>>;
148
149
 
@@ -324,6 +325,187 @@ interface TypeNarrativeSummaryProps extends React.HTMLAttributes<HTMLDivElement>
324
325
  */
325
326
  declare const NarrativeSummary: React.ForwardRefExoticComponent<TypeNarrativeSummaryProps & React.RefAttributes<HTMLDivElement>>;
326
327
 
328
+ /**
329
+ * Item arrangement.
330
+ * - `"vertical"`: items stacked full-width, one per row (the default).
331
+ * - `"horizontal"`: items laid out as a row of equal columns that collapses
332
+ * back to a stack when the container is narrow (container query).
333
+ */
334
+ type TypeNarrativeOrderedListOrientation = "vertical" | "horizontal";
335
+ interface TypeNarrativeOrderedListItem {
336
+ /** Bold action title for the item. A plain string or any React node. */
337
+ title: React.ReactNode;
338
+ /**
339
+ * Descriptive text below the title. A plain string or any React node. The
340
+ * paragraph is omitted when this is empty.
341
+ */
342
+ description?: React.ReactNode;
343
+ /**
344
+ * Optional call-to-action rendered below the description, only when provided.
345
+ * Typically a Seeds `<Button>` in an AI appearance (e.g.
346
+ * `appearance="ai-secondary"`). Pass it without system props so it renders the
347
+ * Tailwind path — same as NarrativeSummary's `action` slot.
348
+ */
349
+ action?: React.ReactNode;
350
+ }
351
+ interface TypeNarrativeOrderedListProps extends React.HTMLAttributes<HTMLDivElement> {
352
+ /** The ordered items. Numbered automatically (01, 02, …) in order. */
353
+ items: TypeNarrativeOrderedListItem[];
354
+ /**
355
+ * Item arrangement. `"horizontal"` lays items in a row of equal columns that
356
+ * collapses to a stack when the container is narrow; `"vertical"` is always
357
+ * stacked.
358
+ * @default "vertical"
359
+ */
360
+ orientation?: TypeNarrativeOrderedListOrientation;
361
+ }
362
+
363
+ /**
364
+ * NarrativeOrderedList — a numbered list of action items. Each item pairs a
365
+ * large ordinal (01, 02, …) with a title, an optional description, and an
366
+ * optional call-to-action slot.
367
+ *
368
+ * Renders inner content only — it carries no surface, shadow, or accent of its
369
+ * own. Drop it into a `NarrativeContainer` (see the stories / playground).
370
+ *
371
+ * Layout is driven by container queries, so it responds to the width the
372
+ * component is actually given, not the viewport:
373
+ * - `"vertical"` (default) → items stacked full-width, one per row.
374
+ * - `"horizontal"` → items laid out as a row of equal columns once there is
375
+ * room, collapsing back to a stack when the container is narrow.
376
+ *
377
+ * Styled via `narrative-ordered-list.css` (Seeds CSS custom properties);
378
+ * consumers import the classes through `@sproutsocial/racine/css/components`.
379
+ * Overrides come via standard `className` / `style`.
380
+ */
381
+ declare const NarrativeOrderedList: React.ForwardRefExoticComponent<TypeNarrativeOrderedListProps & React.RefAttributes<HTMLDivElement>>;
382
+
383
+ interface TypeNarrativeDataCalloutProps extends React.HTMLAttributes<HTMLDivElement> {
384
+ /**
385
+ * Data-viz component rendered in the left slot (occupies ~1/3 of the width).
386
+ * The kit ships no chart of its own — drop in any data-viz node, e.g. a v2
387
+ * `DonutChart` from `@sproutsocial/seeds-react-data-viz`.
388
+ */
389
+ visual: React.ReactNode;
390
+ /** Body copy / description occupying the right two-thirds. */
391
+ children: React.ReactNode;
392
+ /**
393
+ * Accessible label for the visual slot region. Omit when the injected visual
394
+ * already carries its own description/label.
395
+ */
396
+ visualLabel?: string;
397
+ }
398
+
399
+ /**
400
+ * NarrativeDataCallout — a horizontally oriented callout that pairs an injected
401
+ * data-viz visual (left, ~1/3 width) with a block of body copy (right, ~2/3).
402
+ *
403
+ * The kit ships no chart of its own; the `visual` slot accepts any node — the
404
+ * stories drop in a v2 `DonutChart` from `@sproutsocial/seeds-react-data-viz`.
405
+ * narrative-kit takes no runtime dependency on data-viz (mirrors MetricHighlight's
406
+ * `sparkline` slot).
407
+ *
408
+ * Renders inner content only — it carries no surface, shadow, or accent of its
409
+ * own. Drop it into a `NarrativeContainer` (see the stories) to reproduce the
410
+ * card look.
411
+ *
412
+ * Layout is a flex row driven by a container query, so it collapses to a stacked
413
+ * column (visual on top, text below) based on the width the component is actually
414
+ * given, not the viewport.
415
+ *
416
+ * Styled via `narrative-data-callout.css` (Seeds CSS custom properties); consumers
417
+ * import the classes through `@sproutsocial/racine/css/components`. Overrides come
418
+ * via standard `className` / `style`.
419
+ */
420
+ declare const NarrativeDataCallout: React.ForwardRefExoticComponent<TypeNarrativeDataCalloutProps & React.RefAttributes<HTMLDivElement>>;
421
+
422
+ interface TypeAIContainerProps extends React.HTMLAttributes<HTMLDivElement> {
423
+ /** Content rendered inside the container. */
424
+ children?: React.ReactNode;
425
+ /**
426
+ * Visual treatment of the AI gradient surface.
427
+ * - `subtle` — a light 20% gradient tint over the base surface with dark text.
428
+ * - `vivid` — the full-saturation AI gradient with white text (always white).
429
+ * @default "subtle"
430
+ */
431
+ appearance?: "subtle" | "vivid";
432
+ }
433
+
434
+ /**
435
+ * AIContainer — a rounded surface primitive with the AI gradient background.
436
+ * Provides the outer shell (border-radius, shadow, overflow, gradient) without
437
+ * any padding. Used by PullQuote and available as a standalone container.
438
+ *
439
+ * - `subtle` — a light 20% gradient tint over the base surface with adaptive text color.
440
+ * - `vivid` — the full-saturation AI gradient with white text (always white).
441
+ *
442
+ * Styled via `ai-container.css` (Seeds CSS custom properties).
443
+ */
444
+ declare const AIContainer: React.ForwardRefExoticComponent<TypeAIContainerProps & React.RefAttributes<HTMLDivElement>>;
445
+
446
+ interface TypeNarrativeSocialMediaCardMeta {
447
+ /** Icon for the metadata (e.g., reply, heart, repost). */
448
+ icon: React.ReactNode;
449
+ /** Number or formatted string value for the metadata. */
450
+ value: number | string;
451
+ /** Optional accessible label for the metadata. */
452
+ label?: string;
453
+ }
454
+ interface TypeNarrativeSocialMediaCardProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "children"> {
455
+ /** Avatar image URL for the social media profile. */
456
+ avatar: string;
457
+ /** Alt text for the avatar image. */
458
+ avatarAlt: string;
459
+ /** Display name for the social media profile. */
460
+ displayName: string;
461
+ /** Social media network icon (e.g., Twitter, Instagram, LinkedIn). */
462
+ socialIcon: React.ReactNode;
463
+ /** Optional image to display above the text content. */
464
+ image?: React.ReactNode;
465
+ /** The text content of the social media post. */
466
+ text: React.ReactNode;
467
+ /** Array of metadata with icons and values (e.g., replies, likes, reposts). */
468
+ meta: TypeNarrativeSocialMediaCardMeta[];
469
+ /** Visual appearance of the card. Default has gray background, "no-background" removes the background. */
470
+ appearance?: "no-background";
471
+ }
472
+
473
+ /**
474
+ * NarrativeSocialMediaCard — a narrative primitive that displays a social media
475
+ * post card with a header (avatar + handle), content area, and footer with
476
+ * engagement metadata (replies, likes, reposts, etc.).
477
+ *
478
+ * Styled via narrative-social-media-card.css (Seeds CSS custom properties);
479
+ * consumers import the classes through @sproutsocial/racine/css/components.
480
+ * Layout is vertically stacked with clean typography and icon-based metadata in
481
+ * the footer. Default has a gray background; use appearance="no-background" to
482
+ * remove the background and blend seamlessly with the page.
483
+ */
484
+ declare const NarrativeSocialMediaCard: React.ForwardRefExoticComponent<TypeNarrativeSocialMediaCardProps & React.RefAttributes<HTMLDivElement>>;
485
+
486
+ interface TypeNarrativeAttributionProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "children"> {
487
+ /** Avatar image URL for the social media profile. */
488
+ avatarUrl: string;
489
+ /** Alt text for the avatar image. */
490
+ avatarAlt?: string;
491
+ /** User name or display name for the social media profile. */
492
+ userName: string;
493
+ /** Social media network icon (e.g., Twitter, Instagram, LinkedIn). */
494
+ socialIcon: React.ReactNode;
495
+ }
496
+
497
+ /**
498
+ * NarrativeAttribution — a narrative primitive that displays attribution
499
+ * information for social media content, including an avatar, social network
500
+ * icon, and user name.
501
+ *
502
+ * Styled via narrative-attribution.css (Seeds CSS custom properties);
503
+ * consumers import the classes through @sproutsocial/racine/css/components.
504
+ * Layout is horizontal with avatar, social icon, and user name arranged
505
+ * side by side. Surface overrides are done with standard className / style.
506
+ */
507
+ declare const NarrativeAttribution: React.ForwardRefExoticComponent<TypeNarrativeAttributionProps & React.RefAttributes<HTMLDivElement>>;
508
+
327
509
  /**
328
510
  * Shared types for narrative primitives.
329
511
  *
@@ -336,4 +518,4 @@ declare const NarrativeSummary: React.ForwardRefExoticComponent<TypeNarrativeSum
336
518
  */
337
519
  type TypeNarrativeTone = "neutral" | "positive" | "negative" | "opportunity";
338
520
 
339
- export { EyebrowToken, MetricHighlight, NarrativeContainer, NarrativeDivider, NarrativeHeadline, NarrativeHeadlineHighlight, NarrativeHeadlineRoll, NarrativeSummary, PullQuote, type TypeEyebrowTokenProps, type TypeMetricHighlightProps, type TypeMetricHighlightTrend, type TypeNarrativeContainerProps, type TypeNarrativeDividerProps, type TypeNarrativeHeadlineHighlightProps, type TypeNarrativeHeadlineLevel, type TypeNarrativeHeadlineProps, type TypeNarrativeHeadlineRollProps, type TypeNarrativeSummaryLayout, type TypeNarrativeSummaryProps, type TypeNarrativeTone, type TypePullQuoteProps };
521
+ export { AIContainer, EyebrowToken, MetricHighlight, NarrativeAttribution, NarrativeContainer, NarrativeDataCallout, NarrativeDivider, NarrativeHeadline, NarrativeHeadlineHighlight, NarrativeHeadlineRoll, NarrativeOrderedList, NarrativeSocialMediaCard, NarrativeSummary, PullQuote, type TypeAIContainerProps, type TypeEyebrowTokenProps, type TypeMetricHighlightProps, type TypeMetricHighlightTrend, type TypeNarrativeAttributionProps, type TypeNarrativeContainerProps, type TypeNarrativeDataCalloutProps, type TypeNarrativeDividerProps, type TypeNarrativeHeadlineHighlightProps, type TypeNarrativeHeadlineLevel, type TypeNarrativeHeadlineProps, type TypeNarrativeHeadlineRollProps, type TypeNarrativeOrderedListItem, type TypeNarrativeOrderedListOrientation, type TypeNarrativeOrderedListProps, type TypeNarrativeSocialMediaCardMeta, type TypeNarrativeSocialMediaCardProps, type TypeNarrativeSummaryLayout, type TypeNarrativeSummaryProps, type TypeNarrativeTone, type TypePullQuoteProps };
package/dist/index.d.ts CHANGED
@@ -140,9 +140,10 @@ interface TypePullQuoteProps extends React.HTMLAttributes<HTMLElement> {
140
140
  * optional attribution row (author name, avatar, network).
141
141
  *
142
142
  * Rendered as semantic `<figure>` / `<blockquote>` / `<figcaption>` markup.
143
- * Styled via `pull-quote.css` (Seeds CSS custom properties); consumers import
144
- * the classes through `@sproutsocial/racine/css/components`. Surface overrides
145
- * are done with standard `className` / `style`.
143
+ * Styled via `pull-quote.css` and `ai-container.css` (Seeds CSS custom
144
+ * properties); consumers import the classes through
145
+ * `@sproutsocial/racine/css/components`. Surface overrides are done with
146
+ * standard `className` / `style`.
146
147
  */
147
148
  declare const PullQuote: React.ForwardRefExoticComponent<TypePullQuoteProps & React.RefAttributes<HTMLElement>>;
148
149
 
@@ -324,6 +325,187 @@ interface TypeNarrativeSummaryProps extends React.HTMLAttributes<HTMLDivElement>
324
325
  */
325
326
  declare const NarrativeSummary: React.ForwardRefExoticComponent<TypeNarrativeSummaryProps & React.RefAttributes<HTMLDivElement>>;
326
327
 
328
+ /**
329
+ * Item arrangement.
330
+ * - `"vertical"`: items stacked full-width, one per row (the default).
331
+ * - `"horizontal"`: items laid out as a row of equal columns that collapses
332
+ * back to a stack when the container is narrow (container query).
333
+ */
334
+ type TypeNarrativeOrderedListOrientation = "vertical" | "horizontal";
335
+ interface TypeNarrativeOrderedListItem {
336
+ /** Bold action title for the item. A plain string or any React node. */
337
+ title: React.ReactNode;
338
+ /**
339
+ * Descriptive text below the title. A plain string or any React node. The
340
+ * paragraph is omitted when this is empty.
341
+ */
342
+ description?: React.ReactNode;
343
+ /**
344
+ * Optional call-to-action rendered below the description, only when provided.
345
+ * Typically a Seeds `<Button>` in an AI appearance (e.g.
346
+ * `appearance="ai-secondary"`). Pass it without system props so it renders the
347
+ * Tailwind path — same as NarrativeSummary's `action` slot.
348
+ */
349
+ action?: React.ReactNode;
350
+ }
351
+ interface TypeNarrativeOrderedListProps extends React.HTMLAttributes<HTMLDivElement> {
352
+ /** The ordered items. Numbered automatically (01, 02, …) in order. */
353
+ items: TypeNarrativeOrderedListItem[];
354
+ /**
355
+ * Item arrangement. `"horizontal"` lays items in a row of equal columns that
356
+ * collapses to a stack when the container is narrow; `"vertical"` is always
357
+ * stacked.
358
+ * @default "vertical"
359
+ */
360
+ orientation?: TypeNarrativeOrderedListOrientation;
361
+ }
362
+
363
+ /**
364
+ * NarrativeOrderedList — a numbered list of action items. Each item pairs a
365
+ * large ordinal (01, 02, …) with a title, an optional description, and an
366
+ * optional call-to-action slot.
367
+ *
368
+ * Renders inner content only — it carries no surface, shadow, or accent of its
369
+ * own. Drop it into a `NarrativeContainer` (see the stories / playground).
370
+ *
371
+ * Layout is driven by container queries, so it responds to the width the
372
+ * component is actually given, not the viewport:
373
+ * - `"vertical"` (default) → items stacked full-width, one per row.
374
+ * - `"horizontal"` → items laid out as a row of equal columns once there is
375
+ * room, collapsing back to a stack when the container is narrow.
376
+ *
377
+ * Styled via `narrative-ordered-list.css` (Seeds CSS custom properties);
378
+ * consumers import the classes through `@sproutsocial/racine/css/components`.
379
+ * Overrides come via standard `className` / `style`.
380
+ */
381
+ declare const NarrativeOrderedList: React.ForwardRefExoticComponent<TypeNarrativeOrderedListProps & React.RefAttributes<HTMLDivElement>>;
382
+
383
+ interface TypeNarrativeDataCalloutProps extends React.HTMLAttributes<HTMLDivElement> {
384
+ /**
385
+ * Data-viz component rendered in the left slot (occupies ~1/3 of the width).
386
+ * The kit ships no chart of its own — drop in any data-viz node, e.g. a v2
387
+ * `DonutChart` from `@sproutsocial/seeds-react-data-viz`.
388
+ */
389
+ visual: React.ReactNode;
390
+ /** Body copy / description occupying the right two-thirds. */
391
+ children: React.ReactNode;
392
+ /**
393
+ * Accessible label for the visual slot region. Omit when the injected visual
394
+ * already carries its own description/label.
395
+ */
396
+ visualLabel?: string;
397
+ }
398
+
399
+ /**
400
+ * NarrativeDataCallout — a horizontally oriented callout that pairs an injected
401
+ * data-viz visual (left, ~1/3 width) with a block of body copy (right, ~2/3).
402
+ *
403
+ * The kit ships no chart of its own; the `visual` slot accepts any node — the
404
+ * stories drop in a v2 `DonutChart` from `@sproutsocial/seeds-react-data-viz`.
405
+ * narrative-kit takes no runtime dependency on data-viz (mirrors MetricHighlight's
406
+ * `sparkline` slot).
407
+ *
408
+ * Renders inner content only — it carries no surface, shadow, or accent of its
409
+ * own. Drop it into a `NarrativeContainer` (see the stories) to reproduce the
410
+ * card look.
411
+ *
412
+ * Layout is a flex row driven by a container query, so it collapses to a stacked
413
+ * column (visual on top, text below) based on the width the component is actually
414
+ * given, not the viewport.
415
+ *
416
+ * Styled via `narrative-data-callout.css` (Seeds CSS custom properties); consumers
417
+ * import the classes through `@sproutsocial/racine/css/components`. Overrides come
418
+ * via standard `className` / `style`.
419
+ */
420
+ declare const NarrativeDataCallout: React.ForwardRefExoticComponent<TypeNarrativeDataCalloutProps & React.RefAttributes<HTMLDivElement>>;
421
+
422
+ interface TypeAIContainerProps extends React.HTMLAttributes<HTMLDivElement> {
423
+ /** Content rendered inside the container. */
424
+ children?: React.ReactNode;
425
+ /**
426
+ * Visual treatment of the AI gradient surface.
427
+ * - `subtle` — a light 20% gradient tint over the base surface with dark text.
428
+ * - `vivid` — the full-saturation AI gradient with white text (always white).
429
+ * @default "subtle"
430
+ */
431
+ appearance?: "subtle" | "vivid";
432
+ }
433
+
434
+ /**
435
+ * AIContainer — a rounded surface primitive with the AI gradient background.
436
+ * Provides the outer shell (border-radius, shadow, overflow, gradient) without
437
+ * any padding. Used by PullQuote and available as a standalone container.
438
+ *
439
+ * - `subtle` — a light 20% gradient tint over the base surface with adaptive text color.
440
+ * - `vivid` — the full-saturation AI gradient with white text (always white).
441
+ *
442
+ * Styled via `ai-container.css` (Seeds CSS custom properties).
443
+ */
444
+ declare const AIContainer: React.ForwardRefExoticComponent<TypeAIContainerProps & React.RefAttributes<HTMLDivElement>>;
445
+
446
+ interface TypeNarrativeSocialMediaCardMeta {
447
+ /** Icon for the metadata (e.g., reply, heart, repost). */
448
+ icon: React.ReactNode;
449
+ /** Number or formatted string value for the metadata. */
450
+ value: number | string;
451
+ /** Optional accessible label for the metadata. */
452
+ label?: string;
453
+ }
454
+ interface TypeNarrativeSocialMediaCardProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "children"> {
455
+ /** Avatar image URL for the social media profile. */
456
+ avatar: string;
457
+ /** Alt text for the avatar image. */
458
+ avatarAlt: string;
459
+ /** Display name for the social media profile. */
460
+ displayName: string;
461
+ /** Social media network icon (e.g., Twitter, Instagram, LinkedIn). */
462
+ socialIcon: React.ReactNode;
463
+ /** Optional image to display above the text content. */
464
+ image?: React.ReactNode;
465
+ /** The text content of the social media post. */
466
+ text: React.ReactNode;
467
+ /** Array of metadata with icons and values (e.g., replies, likes, reposts). */
468
+ meta: TypeNarrativeSocialMediaCardMeta[];
469
+ /** Visual appearance of the card. Default has gray background, "no-background" removes the background. */
470
+ appearance?: "no-background";
471
+ }
472
+
473
+ /**
474
+ * NarrativeSocialMediaCard — a narrative primitive that displays a social media
475
+ * post card with a header (avatar + handle), content area, and footer with
476
+ * engagement metadata (replies, likes, reposts, etc.).
477
+ *
478
+ * Styled via narrative-social-media-card.css (Seeds CSS custom properties);
479
+ * consumers import the classes through @sproutsocial/racine/css/components.
480
+ * Layout is vertically stacked with clean typography and icon-based metadata in
481
+ * the footer. Default has a gray background; use appearance="no-background" to
482
+ * remove the background and blend seamlessly with the page.
483
+ */
484
+ declare const NarrativeSocialMediaCard: React.ForwardRefExoticComponent<TypeNarrativeSocialMediaCardProps & React.RefAttributes<HTMLDivElement>>;
485
+
486
+ interface TypeNarrativeAttributionProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "children"> {
487
+ /** Avatar image URL for the social media profile. */
488
+ avatarUrl: string;
489
+ /** Alt text for the avatar image. */
490
+ avatarAlt?: string;
491
+ /** User name or display name for the social media profile. */
492
+ userName: string;
493
+ /** Social media network icon (e.g., Twitter, Instagram, LinkedIn). */
494
+ socialIcon: React.ReactNode;
495
+ }
496
+
497
+ /**
498
+ * NarrativeAttribution — a narrative primitive that displays attribution
499
+ * information for social media content, including an avatar, social network
500
+ * icon, and user name.
501
+ *
502
+ * Styled via narrative-attribution.css (Seeds CSS custom properties);
503
+ * consumers import the classes through @sproutsocial/racine/css/components.
504
+ * Layout is horizontal with avatar, social icon, and user name arranged
505
+ * side by side. Surface overrides are done with standard className / style.
506
+ */
507
+ declare const NarrativeAttribution: React.ForwardRefExoticComponent<TypeNarrativeAttributionProps & React.RefAttributes<HTMLDivElement>>;
508
+
327
509
  /**
328
510
  * Shared types for narrative primitives.
329
511
  *
@@ -336,4 +518,4 @@ declare const NarrativeSummary: React.ForwardRefExoticComponent<TypeNarrativeSum
336
518
  */
337
519
  type TypeNarrativeTone = "neutral" | "positive" | "negative" | "opportunity";
338
520
 
339
- export { EyebrowToken, MetricHighlight, NarrativeContainer, NarrativeDivider, NarrativeHeadline, NarrativeHeadlineHighlight, NarrativeHeadlineRoll, NarrativeSummary, PullQuote, type TypeEyebrowTokenProps, type TypeMetricHighlightProps, type TypeMetricHighlightTrend, type TypeNarrativeContainerProps, type TypeNarrativeDividerProps, type TypeNarrativeHeadlineHighlightProps, type TypeNarrativeHeadlineLevel, type TypeNarrativeHeadlineProps, type TypeNarrativeHeadlineRollProps, type TypeNarrativeSummaryLayout, type TypeNarrativeSummaryProps, type TypeNarrativeTone, type TypePullQuoteProps };
521
+ export { AIContainer, EyebrowToken, MetricHighlight, NarrativeAttribution, NarrativeContainer, NarrativeDataCallout, NarrativeDivider, NarrativeHeadline, NarrativeHeadlineHighlight, NarrativeHeadlineRoll, NarrativeOrderedList, NarrativeSocialMediaCard, NarrativeSummary, PullQuote, type TypeAIContainerProps, type TypeEyebrowTokenProps, type TypeMetricHighlightProps, type TypeMetricHighlightTrend, type TypeNarrativeAttributionProps, type TypeNarrativeContainerProps, type TypeNarrativeDataCalloutProps, type TypeNarrativeDividerProps, type TypeNarrativeHeadlineHighlightProps, type TypeNarrativeHeadlineLevel, type TypeNarrativeHeadlineProps, type TypeNarrativeHeadlineRollProps, type TypeNarrativeOrderedListItem, type TypeNarrativeOrderedListOrientation, type TypeNarrativeOrderedListProps, type TypeNarrativeSocialMediaCardMeta, type TypeNarrativeSocialMediaCardProps, type TypeNarrativeSummaryLayout, type TypeNarrativeSummaryProps, type TypeNarrativeTone, type TypePullQuoteProps };
package/dist/index.js CHANGED
@@ -30,13 +30,18 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
30
30
  // src/index.ts
31
31
  var index_exports = {};
32
32
  __export(index_exports, {
33
+ AIContainer: () => AIContainer_default,
33
34
  EyebrowToken: () => EyebrowToken_default,
34
35
  MetricHighlight: () => MetricHighlight_default,
36
+ NarrativeAttribution: () => NarrativeAttribution_default,
35
37
  NarrativeContainer: () => NarrativeContainer_default,
38
+ NarrativeDataCallout: () => NarrativeDataCallout_default,
36
39
  NarrativeDivider: () => NarrativeDivider_default,
37
40
  NarrativeHeadline: () => NarrativeHeadline_default,
38
41
  NarrativeHeadlineHighlight: () => NarrativeHeadlineHighlight_default,
39
42
  NarrativeHeadlineRoll: () => NarrativeHeadlineRoll_default,
43
+ NarrativeOrderedList: () => NarrativeOrderedList_default,
44
+ NarrativeSocialMediaCard: () => NarrativeSocialMediaCard_default,
40
45
  NarrativeSummary: () => NarrativeSummary_default,
41
46
  PullQuote: () => PullQuote_default
42
47
  });
@@ -207,6 +212,8 @@ var PullQuote = React5.forwardRef(
207
212
  ref,
208
213
  className: cn(
209
214
  "seeds-pull-quote",
215
+ "seeds-ai-container",
216
+ { "seeds-ai-container-vivid": appearance === "vivid" },
210
217
  { "seeds-pull-quote-vivid": appearance === "vivid" },
211
218
  className
212
219
  ),
@@ -392,15 +399,212 @@ var NarrativeSummary = React9.forwardRef(
392
399
  );
393
400
  NarrativeSummary.displayName = "NarrativeSummary";
394
401
  var NarrativeSummary_default = NarrativeSummary;
402
+
403
+ // src/NarrativeOrderedList/NarrativeOrderedList.tsx
404
+ var React10 = __toESM(require("react"));
405
+ var import_jsx_runtime10 = require("react/jsx-runtime");
406
+ var NarrativeOrderedList = React10.forwardRef(({ items, orientation = "vertical", className, ...props }, ref) => {
407
+ return (
408
+ // The outer element establishes the query container. The ol inside switches
409
+ // direction based on this element's width — a container query can only style
410
+ // descendants of the container, never the container element itself.
411
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
412
+ "div",
413
+ {
414
+ ref,
415
+ className: cn("seeds-narrative-ordered-list", className),
416
+ ...props,
417
+ children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
418
+ "ol",
419
+ {
420
+ className: cn("seeds-narrative-ordered-list-track", {
421
+ "seeds-narrative-ordered-list-horizontal": orientation === "horizontal"
422
+ }),
423
+ children: items.map((item, i) => /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("li", { className: "seeds-narrative-ordered-list-item", children: [
424
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
425
+ "span",
426
+ {
427
+ className: "seeds-narrative-ordered-list-number",
428
+ "aria-hidden": "true",
429
+ children: String(i + 1).padStart(2, "0")
430
+ }
431
+ ),
432
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "seeds-narrative-ordered-list-body", children: [
433
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("p", { className: "seeds-narrative-ordered-list-title", children: item.title }),
434
+ item.description != null && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("p", { className: "seeds-narrative-ordered-list-description", children: item.description }),
435
+ item.action != null && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "seeds-narrative-ordered-list-action", children: item.action })
436
+ ] })
437
+ ] }, i))
438
+ }
439
+ )
440
+ }
441
+ )
442
+ );
443
+ });
444
+ NarrativeOrderedList.displayName = "NarrativeOrderedList";
445
+ var NarrativeOrderedList_default = NarrativeOrderedList;
446
+
447
+ // src/NarrativeDataCallout/NarrativeDataCallout.tsx
448
+ var React11 = __toESM(require("react"));
449
+ var import_jsx_runtime11 = require("react/jsx-runtime");
450
+ var NarrativeDataCallout = React11.forwardRef(({ visual, children, visualLabel, className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
451
+ "div",
452
+ {
453
+ ref,
454
+ className: cn("seeds-narrative-data-callout", className),
455
+ ...props,
456
+ children: /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "seeds-narrative-data-callout-row", children: [
457
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
458
+ "div",
459
+ {
460
+ className: "seeds-narrative-data-callout-visual",
461
+ role: visualLabel != null ? "img" : void 0,
462
+ "aria-label": visualLabel,
463
+ children: visual
464
+ }
465
+ ),
466
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "seeds-narrative-data-callout-body", children })
467
+ ] })
468
+ }
469
+ ));
470
+ NarrativeDataCallout.displayName = "NarrativeDataCallout";
471
+ var NarrativeDataCallout_default = NarrativeDataCallout;
472
+
473
+ // src/AIContainer/AIContainer.tsx
474
+ var React12 = __toESM(require("react"));
475
+ var import_jsx_runtime12 = require("react/jsx-runtime");
476
+ var AIContainer = React12.forwardRef(
477
+ ({ children, appearance = "subtle", className, ...props }, ref) => {
478
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
479
+ "div",
480
+ {
481
+ ref,
482
+ className: cn(
483
+ "seeds-ai-container",
484
+ { "seeds-ai-container-vivid": appearance === "vivid" },
485
+ className
486
+ ),
487
+ ...props,
488
+ children
489
+ }
490
+ );
491
+ }
492
+ );
493
+ AIContainer.displayName = "AIContainer";
494
+ var AIContainer_default = AIContainer;
495
+
496
+ // src/NarrativeSocialMediaCard/NarrativeSocialMediaCard.tsx
497
+ var React14 = __toESM(require("react"));
498
+
499
+ // src/NarrativeAttribution/NarrativeAttribution.tsx
500
+ var React13 = __toESM(require("react"));
501
+ var import_jsx_runtime13 = require("react/jsx-runtime");
502
+ var NarrativeAttribution = React13.forwardRef(
503
+ ({
504
+ avatarUrl,
505
+ avatarAlt = "Profile avatar",
506
+ userName,
507
+ socialIcon,
508
+ className,
509
+ ...props
510
+ }, ref) => {
511
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
512
+ "div",
513
+ {
514
+ ref,
515
+ className: cn("seeds-narrative-attribution", className),
516
+ ...props,
517
+ children: [
518
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
519
+ "img",
520
+ {
521
+ src: avatarUrl,
522
+ alt: avatarAlt,
523
+ className: "seeds-narrative-attribution-avatar"
524
+ }
525
+ ),
526
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "seeds-narrative-attribution-social-icon", children: socialIcon }),
527
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "seeds-narrative-attribution-user-name", children: userName })
528
+ ]
529
+ }
530
+ );
531
+ }
532
+ );
533
+ NarrativeAttribution.displayName = "NarrativeAttribution";
534
+ var NarrativeAttribution_default = NarrativeAttribution;
535
+
536
+ // src/NarrativeSocialMediaCard/NarrativeSocialMediaCard.tsx
537
+ var import_jsx_runtime14 = require("react/jsx-runtime");
538
+ var NarrativeSocialMediaCard = React14.forwardRef(
539
+ ({
540
+ avatar,
541
+ avatarAlt,
542
+ displayName,
543
+ socialIcon,
544
+ image,
545
+ text,
546
+ meta,
547
+ appearance,
548
+ className,
549
+ ...props
550
+ }, ref) => {
551
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
552
+ "div",
553
+ {
554
+ ref,
555
+ className: cn(
556
+ "seeds-narrative-social-media-card",
557
+ appearance === "no-background" && "seeds-narrative-social-media-card--no-background",
558
+ className
559
+ ),
560
+ ...props,
561
+ children: [
562
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
563
+ NarrativeAttribution_default,
564
+ {
565
+ avatarUrl: avatar,
566
+ avatarAlt,
567
+ userName: displayName,
568
+ socialIcon
569
+ }
570
+ ),
571
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "seeds-narrative-social-media-card-content", children: [
572
+ image,
573
+ text
574
+ ] }),
575
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "seeds-narrative-social-media-card-footer", children: meta.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
576
+ "div",
577
+ {
578
+ className: "seeds-narrative-social-media-card-stat",
579
+ "aria-label": item.label,
580
+ children: [
581
+ item.icon,
582
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "seeds-narrative-social-media-card-stat-value", children: item.value })
583
+ ]
584
+ },
585
+ index
586
+ )) })
587
+ ]
588
+ }
589
+ );
590
+ }
591
+ );
592
+ NarrativeSocialMediaCard.displayName = "NarrativeSocialMediaCard";
593
+ var NarrativeSocialMediaCard_default = NarrativeSocialMediaCard;
395
594
  // Annotate the CommonJS export names for ESM import in node:
396
595
  0 && (module.exports = {
596
+ AIContainer,
397
597
  EyebrowToken,
398
598
  MetricHighlight,
599
+ NarrativeAttribution,
399
600
  NarrativeContainer,
601
+ NarrativeDataCallout,
400
602
  NarrativeDivider,
401
603
  NarrativeHeadline,
402
604
  NarrativeHeadlineHighlight,
403
605
  NarrativeHeadlineRoll,
606
+ NarrativeOrderedList,
607
+ NarrativeSocialMediaCard,
404
608
  NarrativeSummary,
405
609
  PullQuote
406
610
  });