@sproutsocial/seeds-react-narrative-kit 0.6.2 → 0.6.5

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.
@@ -14,69 +14,75 @@
14
14
  */
15
15
 
16
16
  @layer components {
17
-
18
- /* Main card container — gray background with rounded corners and padding.
17
+ /* Main card container — gray background with rounded corners and padding.
19
18
  Uses Seeds tokens for spacing, colors, and radius to match the design system.
20
19
  Fills the width it is given (e.g. a grid column) and stretches its content to
21
20
  match, mirroring the horizontal NarrativeOrderedList — so a row of cards grows
22
21
  and resizes together instead of being pinned to a fixed 320px. */
23
- .seeds-narrative-social-media-card {
24
- box-sizing: border-box;
25
- display: flex;
26
- flex-direction: column;
27
- align-items: stretch;
28
- width: 100%;
29
- padding: var(--space-450); /* 24px */
30
- border-radius: var(--radius-500); /* 6px */
31
- background-color: var(--color-app-bg-base);
32
- font-family: var(--font-family);
33
- color: var(--color-text-body);
34
- }
22
+ .seeds-narrative-social-media-card {
23
+ box-sizing: border-box;
24
+ display: flex;
25
+ flex-direction: column;
26
+ align-items: stretch;
27
+ width: 100%;
28
+ padding: var(--space-450); /* 24px */
29
+ border-radius: var(--radius-500); /* 6px */
30
+ background-color: var(--color-app-bg-base);
31
+ font-family: var(--font-family);
32
+ color: var(--color-text-body);
33
+ }
35
34
 
36
- /* No background — transparent background for cards that blend seamlessly with the page. */
37
- .seeds-narrative-social-media-card--no-background {
38
- background-color: transparent;
39
- }
35
+ /* No background — transparent background for cards that blend seamlessly with the page. */
36
+ .seeds-narrative-social-media-card--no-background {
37
+ background-color: transparent;
38
+ }
40
39
 
41
- /* Main content area — standard body text styling. */
42
- .seeds-narrative-social-media-card-content {
43
- flex: 1;
44
- margin-top: var(--space-400); /* 16px */
45
- font-family: var(--font-family);
46
- font-size: 14px;
47
- font-style: normal;
48
- font-weight: 400;
49
- line-height: 24px;
50
- color: var(--color-text-body);
51
- }
40
+ /* Main content area — standard body text styling. */
41
+ .seeds-narrative-social-media-card-content {
42
+ flex: 1;
43
+ margin-top: var(--space-400); /* 16px */
44
+ font-family: var(--font-family);
45
+ font-size: 14px;
46
+ font-style: normal;
47
+ font-weight: 400;
48
+ line-height: 24px;
49
+ color: var(--color-text-body);
50
+ }
52
51
 
53
- /* Footer section — horizontal layout for stats with equal spacing. */
54
- .seeds-narrative-social-media-card-footer {
55
- display: flex;
56
- align-items: center;
57
- gap: var(--space-400); /* 16px */
58
- margin-top: var(--space-400); /* 16px */;
59
- }
52
+ /* Footer section — horizontal layout for stats with equal spacing. */
53
+ .seeds-narrative-social-media-card-footer {
54
+ display: flex;
55
+ align-items: center;
56
+ gap: var(--space-400); /* 16px */
57
+ margin-top: var(--space-400); /* 16px */
58
+ }
60
59
 
61
- /* Hide footer when empty (no metadata items). */
62
- .seeds-narrative-social-media-card-footer:empty {
63
- display: none;
64
- }
65
-
66
- /* Individual stat container — icon + value in horizontal layout. */
67
- .seeds-narrative-social-media-card-stat {
68
- display: flex;
69
- align-items: center;
70
- gap: var(--space-200); /* 4px */
71
- }
60
+ /* Hide footer when empty (no metadata items). */
61
+ .seeds-narrative-social-media-card-footer:empty {
62
+ display: none;
63
+ }
72
64
 
73
- /* Stat value textmonospace font for numeric values. */
74
- .seeds-narrative-social-media-card-stat-value {
75
- font-family: var(--font-family-mono, ui-monospace, "SF Mono", SFMono-Regular, Menlo, monospace); font-size: 14px;
76
- font-style: normal;
77
- font-weight: 400;
78
- line-height: 24px;
79
- color: var(--color-text-body);
80
- }
65
+ /* Individual stat containericon + value in horizontal layout. */
66
+ .seeds-narrative-social-media-card-stat {
67
+ display: flex;
68
+ align-items: center;
69
+ gap: var(--space-200); /* 4px */
70
+ }
81
71
 
72
+ /* Stat value text — monospace font for numeric values. */
73
+ .seeds-narrative-social-media-card-stat-value {
74
+ font-family: var(
75
+ --font-family-mono,
76
+ ui-monospace,
77
+ "SF Mono",
78
+ SFMono-Regular,
79
+ Menlo,
80
+ monospace
81
+ );
82
+ font-size: 14px;
83
+ font-style: normal;
84
+ font-weight: 400;
85
+ line-height: 24px;
86
+ color: var(--color-text-body);
87
+ }
82
88
  }
@@ -16,111 +16,109 @@
16
16
  */
17
17
 
18
18
  @layer components {
19
-
20
- /* Establishes the query container. The grid inside reacts to this element's
19
+ /* Establishes the query container. The grid inside reacts to this element's
21
20
  inline size. */
22
- .seeds-narrative-summary {
23
- container-type: inline-size;
24
- box-sizing: border-box;
25
- font-family: var(--font-family);
26
- }
21
+ .seeds-narrative-summary {
22
+ container-type: inline-size;
23
+ box-sizing: border-box;
24
+ font-family: var(--font-family);
25
+ }
27
26
 
28
- /* Stacked single column by default (narrow). The container query below expands
27
+ /* Stacked single column by default (narrow). The container query below expands
29
28
  it once there is room. */
30
- .seeds-narrative-summary-grid {
31
- display: grid;
32
- grid-template-columns: 1fr;
33
- gap: var(--space-450); /* 24px */
34
- }
29
+ .seeds-narrative-summary-grid {
30
+ display: grid;
31
+ grid-template-columns: 1fr;
32
+ gap: var(--space-450); /* 24px */
33
+ }
35
34
 
36
- /* The lead column: eyebrow, headline, optional action. align-items:flex-start
35
+ /* The lead column: eyebrow, headline, optional action. align-items:flex-start
37
36
  keeps the eyebrow pill and the action sized to their content — without it the
38
37
  column's default stretch would blow the eyebrow out to full width. The
39
38
  headline still fills and wraps because its text is wider than the track. */
40
- .seeds-narrative-summary-lead {
41
- display: flex;
42
- flex-direction: column;
43
- align-items: flex-start;
44
- gap: var(--space-300); /* 8px */
45
- min-width: 0;
46
- }
39
+ .seeds-narrative-summary-lead {
40
+ display: flex;
41
+ flex-direction: column;
42
+ align-items: flex-start;
43
+ gap: var(--space-300); /* 8px */
44
+ min-width: 0;
45
+ }
47
46
 
48
- /* The headline area grows so the action anchors toward the bottom of the lead
47
+ /* The headline area grows so the action anchors toward the bottom of the lead
49
48
  column when the neighboring columns are taller. align-self:stretch fills the
50
49
  track width (the lead column pins other items to flex-start) so the headline
51
50
  wraps at the column edge regardless of its length. */
52
- .seeds-narrative-summary-headline {
53
- flex: 1 1 auto;
54
- align-self: stretch;
55
- }
51
+ .seeds-narrative-summary-headline {
52
+ flex: 1 1 auto;
53
+ align-self: stretch;
54
+ }
56
55
 
57
- /* In three-column mode the content wrapper is transparent to the grid, so its
56
+ /* In three-column mode the content wrapper is transparent to the grid, so its
58
57
  two sections become grid items in their own columns. In two-column mode the
59
58
  container query below turns it into a real, stacking grid item. */
60
- .seeds-narrative-summary-content {
61
- display: contents;
62
- }
59
+ .seeds-narrative-summary-content {
60
+ display: contents;
61
+ }
63
62
 
64
- .seeds-narrative-summary-section {
65
- display: flex;
66
- flex-direction: column;
67
- gap: var(--space-300); /* 8px */
68
- min-width: 0;
69
- }
63
+ .seeds-narrative-summary-section {
64
+ display: flex;
65
+ flex-direction: column;
66
+ gap: var(--space-300); /* 8px */
67
+ min-width: 0;
68
+ }
70
69
 
71
- /* Section label. 14px / 24px has no exact type token (the scale skips from
70
+ /* Section label. 14px / 24px has no exact type token (the scale skips from
72
71
  13px to 16px), so the design value is kept verbatim — same rationale as
73
72
  eyebrow-token.css. All other values use tokens. */
74
- .seeds-narrative-summary-label {
75
- margin: 0;
76
- font-size: 14px;
77
- line-height: 24px;
78
- font-weight: var(--font-weight-bold);
79
- color: var(--color-text-headline);
80
- }
73
+ .seeds-narrative-summary-label {
74
+ margin: 0;
75
+ font-size: 14px;
76
+ line-height: 24px;
77
+ font-weight: var(--font-weight-bold);
78
+ color: var(--color-text-headline);
79
+ }
81
80
 
82
- .seeds-narrative-summary-text {
83
- margin: 0;
84
- font-size: 14px; /* off-scale, see label above */
85
- line-height: 24px;
86
- font-weight: var(--font-weight-normal);
87
- color: var(--color-text-body);
88
- }
81
+ .seeds-narrative-summary-text {
82
+ margin: 0;
83
+ font-size: 14px; /* off-scale, see label above */
84
+ line-height: 24px;
85
+ font-weight: var(--font-weight-normal);
86
+ color: var(--color-text-body);
87
+ }
89
88
 
90
- .seeds-narrative-summary-list {
91
- margin: 0;
92
- padding-inline-start: 21px;
93
- list-style: disc;
94
- font-size: 14px; /* off-scale, see label above */
95
- line-height: 24px;
96
- font-weight: var(--font-weight-normal);
97
- color: var(--color-text-body);
98
- }
89
+ .seeds-narrative-summary-list {
90
+ margin: 0;
91
+ padding-inline-start: 21px;
92
+ list-style: disc;
93
+ font-size: 14px; /* off-scale, see label above */
94
+ line-height: 24px;
95
+ font-weight: var(--font-weight-normal);
96
+ color: var(--color-text-body);
97
+ }
99
98
 
100
- .seeds-narrative-summary-list li {
101
- margin: 0;
102
- }
99
+ .seeds-narrative-summary-list li {
100
+ margin: 0;
101
+ }
103
102
 
104
- /* Expand to the multi-column layout once the component is wide enough. The
103
+ /* Expand to the multi-column layout once the component is wide enough. The
105
104
  threshold is on the component's own width (container query), so a narrow card
106
105
  on a wide screen still stacks. 640px = Tailwind/Seeds sm breakpoint. */
107
- @container (min-width: 640px) {
108
- .seeds-narrative-summary-grid {
109
- grid-template-columns: repeat(3, 1fr);
110
- }
106
+ @container (min-width: 640px) {
107
+ .seeds-narrative-summary-grid {
108
+ grid-template-columns: repeat(3, 1fr);
109
+ }
111
110
 
112
- /* 1/3 lead + 2/3 content. */
113
- .seeds-narrative-summary-two-column {
114
- grid-template-columns: 1fr 2fr;
115
- }
111
+ /* 1/3 lead + 2/3 content. */
112
+ .seeds-narrative-summary-two-column {
113
+ grid-template-columns: 1fr 2fr;
114
+ }
116
115
 
117
- /* The content wrapper becomes a real grid item that stacks its two sections. */
118
- .seeds-narrative-summary-two-column .seeds-narrative-summary-content {
119
- display: flex;
120
- flex-direction: column;
121
- gap: var(--space-450); /* 24px */
122
- min-width: 0;
116
+ /* The content wrapper becomes a real grid item that stacks its two sections. */
117
+ .seeds-narrative-summary-two-column .seeds-narrative-summary-content {
118
+ display: flex;
119
+ flex-direction: column;
120
+ gap: var(--space-450); /* 24px */
121
+ min-width: 0;
122
+ }
123
123
  }
124
124
  }
125
-
126
- }
@@ -11,58 +11,56 @@
11
11
  */
12
12
 
13
13
  @layer components {
14
-
15
- .seeds-pull-quote {
16
- width: 100%;
17
- display: flex;
18
- flex-direction: column;
19
- align-items: flex-start;
20
- margin: 0; /* reset the browser default <figure> margin */
21
- /* 40px block / 48px inline — 48px is off the space scale, so derive it from
14
+ .seeds-pull-quote {
15
+ width: 100%;
16
+ display: flex;
17
+ flex-direction: column;
18
+ align-items: flex-start;
19
+ margin: 0; /* reset the browser default <figure> margin */
20
+ /* 40px block / 48px inline — 48px is off the space scale, so derive it from
22
21
  two tokens (40 + 8) rather than hardcoding an off-scale value. */
23
- padding: var(--space-600) calc(var(--space-600) + var(--space-300));
24
- }
22
+ padding: var(--space-600) calc(var(--space-600) + var(--space-300));
23
+ }
25
24
 
26
- /* The accented bar holding the quote and attribution. */
27
- .seeds-pull-quote-bar {
28
- box-sizing: border-box;
29
- display: flex;
30
- flex-direction: column;
31
- align-items: flex-start;
32
- gap: var(--space-450); /* 24px */
33
- width: 100%;
34
- padding-left: var(--space-450); /* 24px */
35
- /* 4px is off the border-width scale (max token is 3px); the bar is a
25
+ /* The accented bar holding the quote and attribution. */
26
+ .seeds-pull-quote-bar {
27
+ box-sizing: border-box;
28
+ display: flex;
29
+ flex-direction: column;
30
+ align-items: flex-start;
31
+ gap: var(--space-450); /* 24px */
32
+ width: 100%;
33
+ padding-left: var(--space-450); /* 24px */
34
+ /* 4px is off the border-width scale (max token is 3px); the bar is a
36
35
  decorative accent, mirroring NarrativeContainer's hardcoded 4px ring. The
37
36
  subtle accent uses the AI gradient mid stop (#9747ff — no exact token). */
38
- border-left: 4px solid #9747ff;
39
- }
37
+ border-left: 4px solid #9747ff;
38
+ }
40
39
 
41
- .seeds-pull-quote-vivid .seeds-pull-quote-bar {
42
- border-left-color: #fff;
43
- }
40
+ .seeds-pull-quote-vivid .seeds-pull-quote-bar {
41
+ border-left-color: #fff;
42
+ }
44
43
 
45
- .seeds-pull-quote-text {
46
- margin: 0; /* reset the browser default <blockquote> margin */
47
- font-size: var(--font-size-600);
48
- line-height: var(--line-height-600);
49
- font-style: italic;
50
- font-weight: var(--font-weight-normal);
51
- color: inherit;
52
- overflow-wrap: break-word;
53
- }
44
+ .seeds-pull-quote-text {
45
+ margin: 0; /* reset the browser default <blockquote> margin */
46
+ font-size: var(--font-size-600);
47
+ line-height: var(--line-height-600);
48
+ font-style: italic;
49
+ font-weight: var(--font-weight-normal);
50
+ color: inherit;
51
+ overflow-wrap: break-word;
52
+ }
54
53
 
55
- /* Attribution row — a flex container for author name, avatar, network, etc.
54
+ /* Attribution row — a flex container for author name, avatar, network, etc.
56
55
  Direct text inherits a bold, small treatment to match the display-name style;
57
56
  richer content (e.g. an Avatar) composes freely. */
58
- .seeds-pull-quote-attribution {
59
- display: flex;
60
- align-items: center;
61
- gap: var(--space-300); /* 8px */
62
- font-size: var(--font-size-200);
63
- line-height: var(--line-height-200);
64
- font-weight: var(--font-weight-bold);
65
- color: inherit;
66
- }
67
-
57
+ .seeds-pull-quote-attribution {
58
+ display: flex;
59
+ align-items: center;
60
+ gap: var(--space-300); /* 8px */
61
+ font-size: var(--font-size-200);
62
+ line-height: var(--line-height-200);
63
+ font-weight: var(--font-weight-bold);
64
+ color: inherit;
65
+ }
68
66
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sproutsocial/seeds-react-narrative-kit",
3
- "version": "0.6.2",
3
+ "version": "0.6.5",
4
4
  "description": "Seeds React Narrative Kit — composable narrative primitives for executive-brief style pages",
5
5
  "author": "Sprout Social, Inc.",
6
6
  "license": "MIT",
@@ -38,13 +38,13 @@
38
38
  "test:watch": "jest --watch --coverage=false"
39
39
  },
40
40
  "dependencies": {
41
- "@sproutsocial/seeds-react-theme": "^4.3.0"
41
+ "@sproutsocial/seeds-react-theme": "^4.4.0"
42
42
  },
43
43
  "devDependencies": {
44
44
  "@sproutsocial/eslint-config-seeds": "*",
45
45
  "@sproutsocial/seeds-react-button": "*",
46
46
  "@sproutsocial/seeds-react-data-viz": "*",
47
- "@sproutsocial/seeds-react-grid": "^0.2.10",
47
+ "@sproutsocial/seeds-react-grid": "^0.2.15",
48
48
  "@sproutsocial/seeds-react-icon": "*",
49
49
  "@sproutsocial/seeds-react-partner-logo": "*",
50
50
  "@sproutsocial/seeds-react-text": "*",
@@ -11,29 +11,27 @@
11
11
  */
12
12
 
13
13
  @layer components {
14
-
15
- .seeds-ai-container {
16
- position: relative;
17
- overflow: hidden;
18
- box-sizing: border-box;
19
- border-radius: var(--radius-800);
20
- box-shadow: var(--shadow-low);
21
- font-family: var(--font-family);
22
- /* Subtle (default): the 20% AI gradient tint composited over the base
14
+ .seeds-ai-container {
15
+ position: relative;
16
+ overflow: hidden;
17
+ box-sizing: border-box;
18
+ border-radius: var(--radius-800);
19
+ box-shadow: var(--shadow-low);
20
+ font-family: var(--font-family);
21
+ /* Subtle (default): the 20% AI gradient tint composited over the base
23
22
  surface. --color-gradient-ai-subtle is already translucent, so layering it
24
23
  over the opaque base color produces the soft wash. */
25
- background-color: var(--color-container-bg-base);
26
- background-image: var(--color-gradient-ai-subtle);
27
- color: var(--color-text-headline);
28
- }
24
+ background-color: var(--color-container-bg-base);
25
+ background-image: var(--color-gradient-ai-subtle);
26
+ color: var(--color-text-headline);
27
+ }
29
28
 
30
- /* Vivid: the full-saturation AI gradient with white content. White has no
29
+ /* Vivid: the full-saturation AI gradient with white content. White has no
31
30
  semantic Seeds token; it is part of the AI gradient treatment (mirrors the
32
31
  raw brand hex used in --color-gradient-ai). */
33
- .seeds-ai-container-vivid {
34
- background-color: transparent;
35
- background-image: var(--color-gradient-ai);
36
- color: #fff;
37
- }
38
-
32
+ .seeds-ai-container-vivid {
33
+ background-color: transparent;
34
+ background-image: var(--color-gradient-ai);
35
+ color: #fff;
36
+ }
39
37
  }
@@ -10,28 +10,26 @@
10
10
  */
11
11
 
12
12
  @layer components {
13
-
14
- /* A solid gray pill matching the design: background and border are both the
13
+ /* A solid gray pill matching the design: background and border are both the
15
14
  #dee1e1 container-border-base token, which also tracks dark mode. The two
16
15
  pixel literals below have no exact theme token — the --space scale skips 6px
17
16
  (4px→8px) and the --font-size scale skips 12px (11px→13px) — so the design's
18
17
  values are kept verbatim. All colors use tokens. */
19
- .seeds-eyebrow-token {
20
- box-sizing: border-box;
21
- display: inline-flex;
22
- align-items: center;
23
- justify-content: center;
24
- gap: var(--space-100); /* 2px */
25
- padding: var(--space-100) var(--space-300); /* 2px / 8px */
26
- border: 1px solid var(--color-container-border-base); /* #dee1e1 */
27
- border-radius: var(--radius-500); /* 6px */
28
- background-color: var(--color-container-border-base); /* #dee1e1 */
29
- font-family: var(--font-family);
30
- font-size: 12px; /* text-sm */
31
- line-height: 20px;
32
- font-weight: var(--font-weight-normal);
33
- color: var(--color-text-body);
34
- white-space: nowrap;
35
- }
36
-
18
+ .seeds-eyebrow-token {
19
+ box-sizing: border-box;
20
+ display: inline-flex;
21
+ align-items: center;
22
+ justify-content: center;
23
+ gap: var(--space-100); /* 2px */
24
+ padding: var(--space-100) var(--space-300); /* 2px / 8px */
25
+ border: 1px solid var(--color-container-border-base); /* #dee1e1 */
26
+ border-radius: var(--radius-500); /* 6px */
27
+ background-color: var(--color-container-border-base); /* #dee1e1 */
28
+ font-family: var(--font-family);
29
+ font-size: 12px; /* text-sm */
30
+ line-height: 20px;
31
+ font-weight: var(--font-weight-normal);
32
+ color: var(--color-text-body);
33
+ white-space: nowrap;
34
+ }
37
35
  }