@sproutsocial/seeds-react-narrative-kit 0.1.0 → 0.2.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.
- package/.turbo/turbo-build.log +11 -11
- package/CHANGELOG.md +9 -0
- package/dist/esm/index.js +296 -2
- package/dist/esm/index.js.map +1 -1
- package/dist/eyebrow-token.css +37 -0
- package/dist/index.d.mts +205 -1
- package/dist/index.d.ts +205 -1
- package/dist/index.js +303 -3
- package/dist/index.js.map +1 -1
- package/dist/metric-highlight.css +178 -0
- package/dist/narrative-container.css +1 -1
- package/dist/narrative-headline.css +125 -0
- package/dist/pull-quote.css +89 -0
- package/package.json +9 -3
- package/src/EyebrowToken/EyebrowToken.stories.tsx +25 -0
- package/src/EyebrowToken/EyebrowToken.tsx +29 -0
- package/src/EyebrowToken/EyebrowTokenTypes.ts +7 -0
- package/src/EyebrowToken/__tests__/EyebrowToken.test.tsx +35 -0
- package/src/EyebrowToken/index.ts +2 -0
- package/src/MetricHighlight/MetricHighlight.stories.tsx +87 -0
- package/src/MetricHighlight/MetricHighlight.tsx +196 -0
- package/src/MetricHighlight/MetricHighlightTypes.ts +61 -0
- package/src/MetricHighlight/__tests__/MetricHighlight.test.tsx +151 -0
- package/src/MetricHighlight/index.ts +5 -0
- package/src/NarrativeContainer/NarrativeContainer.stories.tsx +3 -3
- package/src/NarrativeContainer/NarrativeContainer.tsx +1 -23
- package/src/NarrativeHeadline/NarrativeHeadline.stories.tsx +68 -0
- package/src/NarrativeHeadline/NarrativeHeadline.tsx +36 -0
- package/src/NarrativeHeadline/NarrativeHeadlineHighlight.tsx +31 -0
- package/src/NarrativeHeadline/NarrativeHeadlineRoll.tsx +100 -0
- package/src/NarrativeHeadline/NarrativeHeadlineTypes.ts +54 -0
- package/src/NarrativeHeadline/__tests__/NarrativeHeadline.test.tsx +138 -0
- package/src/NarrativeHeadline/index.ts +9 -0
- package/src/Playground/Playground.stories.tsx +113 -0
- package/src/PullQuote/PullQuote.stories.tsx +43 -0
- package/src/PullQuote/PullQuote.tsx +42 -0
- package/src/PullQuote/PullQuoteTypes.ts +19 -0
- package/src/PullQuote/__tests__/PullQuote.test.tsx +48 -0
- package/src/PullQuote/index.ts +2 -0
- package/src/_internal/cn.ts +22 -0
- package/src/eyebrow-token.css +37 -0
- package/src/index.ts +20 -0
- package/src/metric-highlight.css +178 -0
- package/src/narrative-container.css +1 -1
- package/src/narrative-headline.css +125 -0
- package/src/pull-quote.css +89 -0
package/dist/index.d.mts
CHANGED
|
@@ -21,6 +21,210 @@ interface TypeNarrativeContainerProps extends React.HTMLAttributes<HTMLDivElemen
|
|
|
21
21
|
*/
|
|
22
22
|
declare const NarrativeContainer: React.ForwardRefExoticComponent<TypeNarrativeContainerProps & React.RefAttributes<HTMLDivElement>>;
|
|
23
23
|
|
|
24
|
+
/** Heading level the headline text renders as. */
|
|
25
|
+
type TypeNarrativeHeadlineLevel = 1 | 2 | 3 | 4 | 5 | 6;
|
|
26
|
+
interface TypeNarrativeHeadlineProps extends React.HTMLAttributes<HTMLHeadingElement> {
|
|
27
|
+
/**
|
|
28
|
+
* The headline text. Wrap part of it in `<NarrativeHeadlineHighlight>` for a
|
|
29
|
+
* static gradient accent, or `<NarrativeHeadlineRoll>` for the rolling "roll"
|
|
30
|
+
* variant.
|
|
31
|
+
*/
|
|
32
|
+
children?: React.ReactNode;
|
|
33
|
+
/**
|
|
34
|
+
* Heading element the headline text renders as, for document outline /
|
|
35
|
+
* accessibility. Visual size is unaffected.
|
|
36
|
+
* @default 2
|
|
37
|
+
*/
|
|
38
|
+
headingLevel?: TypeNarrativeHeadlineLevel;
|
|
39
|
+
}
|
|
40
|
+
interface TypeNarrativeHeadlineHighlightProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
41
|
+
/** Text painted with the AI gradient. */
|
|
42
|
+
children?: React.ReactNode;
|
|
43
|
+
}
|
|
44
|
+
interface TypeNarrativeHeadlineRollProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
45
|
+
/** Words to cycle through. The first word is shown initially. */
|
|
46
|
+
words: string[];
|
|
47
|
+
/**
|
|
48
|
+
* Milliseconds each word holds before rolling out.
|
|
49
|
+
* @default 2200
|
|
50
|
+
*/
|
|
51
|
+
intervalMs?: number;
|
|
52
|
+
/**
|
|
53
|
+
* Milliseconds of the slide animation.
|
|
54
|
+
* @default 500
|
|
55
|
+
*/
|
|
56
|
+
transitionMs?: number;
|
|
57
|
+
/**
|
|
58
|
+
* Direction the active word rolls in from.
|
|
59
|
+
* @default "up"
|
|
60
|
+
*/
|
|
61
|
+
direction?: "up" | "down";
|
|
62
|
+
/**
|
|
63
|
+
* Paint each word with the AI gradient. Apply it here rather than nesting
|
|
64
|
+
* inside `<NarrativeHeadlineHighlight>` — `background-clip: text` does not
|
|
65
|
+
* apply across the absolutely-positioned rolling words.
|
|
66
|
+
* @default true
|
|
67
|
+
*/
|
|
68
|
+
gradient?: boolean;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* NarrativeHeadline — the titling primitive for a narrative block. A single
|
|
73
|
+
* heading element, nothing more: supporting copy and tags/tokens belong to
|
|
74
|
+
* sibling primitives that compose alongside it, not baked into the title.
|
|
75
|
+
*
|
|
76
|
+
* Wrap part of the headline in `<NarrativeHeadlineHighlight>` for a static
|
|
77
|
+
* gradient accent, or `<NarrativeHeadlineRoll>` for the rolling "roll" variant.
|
|
78
|
+
*
|
|
79
|
+
* Styled via `narrative-headline.css` (Seeds CSS custom properties). Consumers
|
|
80
|
+
* import the classes through `@sproutsocial/racine/css/components`. Overrides
|
|
81
|
+
* are done with standard `className` / `style`.
|
|
82
|
+
*/
|
|
83
|
+
declare const NarrativeHeadline: React.ForwardRefExoticComponent<TypeNarrativeHeadlineProps & React.RefAttributes<HTMLHeadingElement>>;
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* NarrativeHeadlineHighlight — paints a span of headline text with the AI
|
|
87
|
+
* brand gradient (the "highlighted word" treatment). Drop it inline inside a
|
|
88
|
+
* `<NarrativeHeadline>`:
|
|
89
|
+
*
|
|
90
|
+
* <NarrativeHeadline>
|
|
91
|
+
* Headline with a <NarrativeHeadlineHighlight>highlighted</NarrativeHeadlineHighlight> word
|
|
92
|
+
* </NarrativeHeadline>
|
|
93
|
+
*/
|
|
94
|
+
declare const NarrativeHeadlineHighlight: React.ForwardRefExoticComponent<TypeNarrativeHeadlineHighlightProps & React.RefAttributes<HTMLSpanElement>>;
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* NarrativeHeadlineRoll — the "roll" variant: a vertical word roll for the
|
|
98
|
+
* highlighted slot of a headline. The active word slides into view while the
|
|
99
|
+
* previous one rolls out (no typing). Inspired by the performative-ui WordRoll.
|
|
100
|
+
*
|
|
101
|
+
* <NarrativeHeadline>
|
|
102
|
+
* Built for{" "}
|
|
103
|
+
* <NarrativeHeadlineRoll words={["marketers", "agencies", "teams"]} />
|
|
104
|
+
* </NarrativeHeadline>
|
|
105
|
+
*
|
|
106
|
+
* The container width follows the active word so it sits naturally inline.
|
|
107
|
+
* Gradient-painted by default; honors `prefers-reduced-motion` by holding the
|
|
108
|
+
* first word static.
|
|
109
|
+
*/
|
|
110
|
+
declare const NarrativeHeadlineRoll: React.ForwardRefExoticComponent<TypeNarrativeHeadlineRollProps & React.RefAttributes<HTMLSpanElement>>;
|
|
111
|
+
|
|
112
|
+
interface TypePullQuoteProps extends React.HTMLAttributes<HTMLElement> {
|
|
113
|
+
/** The quotation text, rendered emphasized inside the accented bar. */
|
|
114
|
+
quote: React.ReactNode;
|
|
115
|
+
/**
|
|
116
|
+
* Optional attribution slot rendered beneath the quote (e.g. an author name,
|
|
117
|
+
* avatar, and network). Composed by the consumer; omitted entirely when absent.
|
|
118
|
+
*/
|
|
119
|
+
attribution?: React.ReactNode;
|
|
120
|
+
/**
|
|
121
|
+
* Visual treatment of the AI gradient surface.
|
|
122
|
+
* - `subtle` — a light 20% gradient tint over the base surface with dark text.
|
|
123
|
+
* - `vivid` — the full-saturation AI gradient with white text.
|
|
124
|
+
* @default "subtle"
|
|
125
|
+
*/
|
|
126
|
+
appearance?: "subtle" | "vivid";
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* PullQuote — a narrative primitive that spotlights a quotation on an AI
|
|
131
|
+
* gradient surface. The quote sits behind an accented vertical bar with an
|
|
132
|
+
* optional attribution row (author name, avatar, network).
|
|
133
|
+
*
|
|
134
|
+
* Rendered as semantic `<figure>` / `<blockquote>` / `<figcaption>` markup.
|
|
135
|
+
* Styled via `pull-quote.css` (Seeds CSS custom properties); consumers import
|
|
136
|
+
* the classes through `@sproutsocial/racine/css/components`. Surface overrides
|
|
137
|
+
* are done with standard `className` / `style`.
|
|
138
|
+
*/
|
|
139
|
+
declare const PullQuote: React.ForwardRefExoticComponent<TypePullQuoteProps & React.RefAttributes<HTMLElement>>;
|
|
140
|
+
|
|
141
|
+
interface TypeEyebrowTokenProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
142
|
+
/** The eyebrow text — a date, category, or short kicker. */
|
|
143
|
+
children: React.ReactNode;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* EyebrowToken — a small gray pill that sits above a headline to carry a short
|
|
148
|
+
* bit of context: a date (e.g. "May 31, 2026"), category, or kicker.
|
|
149
|
+
*
|
|
150
|
+
* A faithful match of the Figma "Token / Non Clickable / Default" design — a
|
|
151
|
+
* solid `#dee1e1` fill with a matching border, 6px radius, and small body text.
|
|
152
|
+
* Styled via `eyebrow-token.css` (Seeds CSS custom properties); consumers import
|
|
153
|
+
* the classes through `@sproutsocial/racine/css/components`. Overrides come via
|
|
154
|
+
* standard `className` / `style`.
|
|
155
|
+
*/
|
|
156
|
+
declare const EyebrowToken: React.ForwardRefExoticComponent<TypeEyebrowTokenProps & React.RefAttributes<HTMLSpanElement>>;
|
|
157
|
+
|
|
158
|
+
interface TypeMetricHighlightTrend {
|
|
159
|
+
/**
|
|
160
|
+
* Direction of movement. Selects the arrow glyph and the sentiment color of
|
|
161
|
+
* the badge (green for `up`, red for `down`).
|
|
162
|
+
* @default "up"
|
|
163
|
+
*/
|
|
164
|
+
direction?: "up" | "down";
|
|
165
|
+
/**
|
|
166
|
+
* Optional value rendered next to the arrow (e.g. `"240%"`, `12`). When
|
|
167
|
+
* omitted the badge is icon-only.
|
|
168
|
+
*/
|
|
169
|
+
value?: React.ReactNode;
|
|
170
|
+
/**
|
|
171
|
+
* Accessible label describing the trend (e.g. `"up 240%"`). The arrow glyph is
|
|
172
|
+
* decorative, so provide this whenever the trend conveys meaning on its own.
|
|
173
|
+
*/
|
|
174
|
+
"aria-label"?: string;
|
|
175
|
+
}
|
|
176
|
+
interface TypeMetricHighlightProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
177
|
+
/** Short metric label rendered above/beside the value (e.g. `"Insight metric"`). */
|
|
178
|
+
label: React.ReactNode;
|
|
179
|
+
/** The metric value, rendered as the emphasized monospace figure (e.g. `"123"`, `"1.2M"`). */
|
|
180
|
+
value: React.ReactNode;
|
|
181
|
+
/** Optional trend badge — a directional arrow plus an optional value. */
|
|
182
|
+
trend?: TypeMetricHighlightTrend;
|
|
183
|
+
/**
|
|
184
|
+
* Sparkline data points. When omitted, a sensible default series is used
|
|
185
|
+
* (sloped to match `trend`). Pass an explicit array to override, or an empty
|
|
186
|
+
* array to opt out of the chart.
|
|
187
|
+
*/
|
|
188
|
+
data?: number[];
|
|
189
|
+
/**
|
|
190
|
+
* Render the sparkline.
|
|
191
|
+
* @default true
|
|
192
|
+
*/
|
|
193
|
+
chart?: boolean;
|
|
194
|
+
/**
|
|
195
|
+
* Layout direction.
|
|
196
|
+
* - `horizontal` — metric block beside the sparkline.
|
|
197
|
+
* - `vertical` — metric block stacked above a full-width sparkline.
|
|
198
|
+
* @default "horizontal"
|
|
199
|
+
*/
|
|
200
|
+
appearance?: "horizontal" | "vertical";
|
|
201
|
+
/**
|
|
202
|
+
* Size of the value and overall density.
|
|
203
|
+
* - `default` — large value, label stacked above it.
|
|
204
|
+
* - `small` — condensed value, label and value on a single row.
|
|
205
|
+
* @default "default"
|
|
206
|
+
*/
|
|
207
|
+
size?: "default" | "small";
|
|
208
|
+
/**
|
|
209
|
+
* Render the padded surface background. Set `false` to drop the surface and
|
|
210
|
+
* compose the metric inside another container.
|
|
211
|
+
* @default true
|
|
212
|
+
*/
|
|
213
|
+
container?: boolean;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
/**
|
|
217
|
+
* MetricHighlight — a narrative primitive that spotlights a single metric: a
|
|
218
|
+
* label, a large monospace value, an optional trend badge (a directional arrow
|
|
219
|
+
* plus an optional number such as "240%"), and an optional sparkline.
|
|
220
|
+
*
|
|
221
|
+
* Styled via `metric-highlight.css` (Seeds CSS custom properties); consumers
|
|
222
|
+
* import the classes through `@sproutsocial/racine/css/components`. Layout flexes
|
|
223
|
+
* across `appearance` (horizontal/vertical) and `size` (default/small); surface
|
|
224
|
+
* overrides are done with standard `className` / `style`.
|
|
225
|
+
*/
|
|
226
|
+
declare const MetricHighlight: React.ForwardRefExoticComponent<TypeMetricHighlightProps & React.RefAttributes<HTMLDivElement>>;
|
|
227
|
+
|
|
24
228
|
/**
|
|
25
229
|
* Shared types for narrative primitives.
|
|
26
230
|
*
|
|
@@ -33,4 +237,4 @@ declare const NarrativeContainer: React.ForwardRefExoticComponent<TypeNarrativeC
|
|
|
33
237
|
*/
|
|
34
238
|
type TypeNarrativeTone = "neutral" | "positive" | "negative" | "opportunity";
|
|
35
239
|
|
|
36
|
-
export { NarrativeContainer, type TypeNarrativeContainerProps, type TypeNarrativeTone };
|
|
240
|
+
export { EyebrowToken, MetricHighlight, NarrativeContainer, NarrativeHeadline, NarrativeHeadlineHighlight, NarrativeHeadlineRoll, PullQuote, type TypeEyebrowTokenProps, type TypeMetricHighlightProps, type TypeMetricHighlightTrend, type TypeNarrativeContainerProps, type TypeNarrativeHeadlineHighlightProps, type TypeNarrativeHeadlineLevel, type TypeNarrativeHeadlineProps, type TypeNarrativeHeadlineRollProps, type TypeNarrativeTone, type TypePullQuoteProps };
|
package/dist/index.d.ts
CHANGED
|
@@ -21,6 +21,210 @@ interface TypeNarrativeContainerProps extends React.HTMLAttributes<HTMLDivElemen
|
|
|
21
21
|
*/
|
|
22
22
|
declare const NarrativeContainer: React.ForwardRefExoticComponent<TypeNarrativeContainerProps & React.RefAttributes<HTMLDivElement>>;
|
|
23
23
|
|
|
24
|
+
/** Heading level the headline text renders as. */
|
|
25
|
+
type TypeNarrativeHeadlineLevel = 1 | 2 | 3 | 4 | 5 | 6;
|
|
26
|
+
interface TypeNarrativeHeadlineProps extends React.HTMLAttributes<HTMLHeadingElement> {
|
|
27
|
+
/**
|
|
28
|
+
* The headline text. Wrap part of it in `<NarrativeHeadlineHighlight>` for a
|
|
29
|
+
* static gradient accent, or `<NarrativeHeadlineRoll>` for the rolling "roll"
|
|
30
|
+
* variant.
|
|
31
|
+
*/
|
|
32
|
+
children?: React.ReactNode;
|
|
33
|
+
/**
|
|
34
|
+
* Heading element the headline text renders as, for document outline /
|
|
35
|
+
* accessibility. Visual size is unaffected.
|
|
36
|
+
* @default 2
|
|
37
|
+
*/
|
|
38
|
+
headingLevel?: TypeNarrativeHeadlineLevel;
|
|
39
|
+
}
|
|
40
|
+
interface TypeNarrativeHeadlineHighlightProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
41
|
+
/** Text painted with the AI gradient. */
|
|
42
|
+
children?: React.ReactNode;
|
|
43
|
+
}
|
|
44
|
+
interface TypeNarrativeHeadlineRollProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
45
|
+
/** Words to cycle through. The first word is shown initially. */
|
|
46
|
+
words: string[];
|
|
47
|
+
/**
|
|
48
|
+
* Milliseconds each word holds before rolling out.
|
|
49
|
+
* @default 2200
|
|
50
|
+
*/
|
|
51
|
+
intervalMs?: number;
|
|
52
|
+
/**
|
|
53
|
+
* Milliseconds of the slide animation.
|
|
54
|
+
* @default 500
|
|
55
|
+
*/
|
|
56
|
+
transitionMs?: number;
|
|
57
|
+
/**
|
|
58
|
+
* Direction the active word rolls in from.
|
|
59
|
+
* @default "up"
|
|
60
|
+
*/
|
|
61
|
+
direction?: "up" | "down";
|
|
62
|
+
/**
|
|
63
|
+
* Paint each word with the AI gradient. Apply it here rather than nesting
|
|
64
|
+
* inside `<NarrativeHeadlineHighlight>` — `background-clip: text` does not
|
|
65
|
+
* apply across the absolutely-positioned rolling words.
|
|
66
|
+
* @default true
|
|
67
|
+
*/
|
|
68
|
+
gradient?: boolean;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* NarrativeHeadline — the titling primitive for a narrative block. A single
|
|
73
|
+
* heading element, nothing more: supporting copy and tags/tokens belong to
|
|
74
|
+
* sibling primitives that compose alongside it, not baked into the title.
|
|
75
|
+
*
|
|
76
|
+
* Wrap part of the headline in `<NarrativeHeadlineHighlight>` for a static
|
|
77
|
+
* gradient accent, or `<NarrativeHeadlineRoll>` for the rolling "roll" variant.
|
|
78
|
+
*
|
|
79
|
+
* Styled via `narrative-headline.css` (Seeds CSS custom properties). Consumers
|
|
80
|
+
* import the classes through `@sproutsocial/racine/css/components`. Overrides
|
|
81
|
+
* are done with standard `className` / `style`.
|
|
82
|
+
*/
|
|
83
|
+
declare const NarrativeHeadline: React.ForwardRefExoticComponent<TypeNarrativeHeadlineProps & React.RefAttributes<HTMLHeadingElement>>;
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* NarrativeHeadlineHighlight — paints a span of headline text with the AI
|
|
87
|
+
* brand gradient (the "highlighted word" treatment). Drop it inline inside a
|
|
88
|
+
* `<NarrativeHeadline>`:
|
|
89
|
+
*
|
|
90
|
+
* <NarrativeHeadline>
|
|
91
|
+
* Headline with a <NarrativeHeadlineHighlight>highlighted</NarrativeHeadlineHighlight> word
|
|
92
|
+
* </NarrativeHeadline>
|
|
93
|
+
*/
|
|
94
|
+
declare const NarrativeHeadlineHighlight: React.ForwardRefExoticComponent<TypeNarrativeHeadlineHighlightProps & React.RefAttributes<HTMLSpanElement>>;
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* NarrativeHeadlineRoll — the "roll" variant: a vertical word roll for the
|
|
98
|
+
* highlighted slot of a headline. The active word slides into view while the
|
|
99
|
+
* previous one rolls out (no typing). Inspired by the performative-ui WordRoll.
|
|
100
|
+
*
|
|
101
|
+
* <NarrativeHeadline>
|
|
102
|
+
* Built for{" "}
|
|
103
|
+
* <NarrativeHeadlineRoll words={["marketers", "agencies", "teams"]} />
|
|
104
|
+
* </NarrativeHeadline>
|
|
105
|
+
*
|
|
106
|
+
* The container width follows the active word so it sits naturally inline.
|
|
107
|
+
* Gradient-painted by default; honors `prefers-reduced-motion` by holding the
|
|
108
|
+
* first word static.
|
|
109
|
+
*/
|
|
110
|
+
declare const NarrativeHeadlineRoll: React.ForwardRefExoticComponent<TypeNarrativeHeadlineRollProps & React.RefAttributes<HTMLSpanElement>>;
|
|
111
|
+
|
|
112
|
+
interface TypePullQuoteProps extends React.HTMLAttributes<HTMLElement> {
|
|
113
|
+
/** The quotation text, rendered emphasized inside the accented bar. */
|
|
114
|
+
quote: React.ReactNode;
|
|
115
|
+
/**
|
|
116
|
+
* Optional attribution slot rendered beneath the quote (e.g. an author name,
|
|
117
|
+
* avatar, and network). Composed by the consumer; omitted entirely when absent.
|
|
118
|
+
*/
|
|
119
|
+
attribution?: React.ReactNode;
|
|
120
|
+
/**
|
|
121
|
+
* Visual treatment of the AI gradient surface.
|
|
122
|
+
* - `subtle` — a light 20% gradient tint over the base surface with dark text.
|
|
123
|
+
* - `vivid` — the full-saturation AI gradient with white text.
|
|
124
|
+
* @default "subtle"
|
|
125
|
+
*/
|
|
126
|
+
appearance?: "subtle" | "vivid";
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* PullQuote — a narrative primitive that spotlights a quotation on an AI
|
|
131
|
+
* gradient surface. The quote sits behind an accented vertical bar with an
|
|
132
|
+
* optional attribution row (author name, avatar, network).
|
|
133
|
+
*
|
|
134
|
+
* Rendered as semantic `<figure>` / `<blockquote>` / `<figcaption>` markup.
|
|
135
|
+
* Styled via `pull-quote.css` (Seeds CSS custom properties); consumers import
|
|
136
|
+
* the classes through `@sproutsocial/racine/css/components`. Surface overrides
|
|
137
|
+
* are done with standard `className` / `style`.
|
|
138
|
+
*/
|
|
139
|
+
declare const PullQuote: React.ForwardRefExoticComponent<TypePullQuoteProps & React.RefAttributes<HTMLElement>>;
|
|
140
|
+
|
|
141
|
+
interface TypeEyebrowTokenProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
142
|
+
/** The eyebrow text — a date, category, or short kicker. */
|
|
143
|
+
children: React.ReactNode;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* EyebrowToken — a small gray pill that sits above a headline to carry a short
|
|
148
|
+
* bit of context: a date (e.g. "May 31, 2026"), category, or kicker.
|
|
149
|
+
*
|
|
150
|
+
* A faithful match of the Figma "Token / Non Clickable / Default" design — a
|
|
151
|
+
* solid `#dee1e1` fill with a matching border, 6px radius, and small body text.
|
|
152
|
+
* Styled via `eyebrow-token.css` (Seeds CSS custom properties); consumers import
|
|
153
|
+
* the classes through `@sproutsocial/racine/css/components`. Overrides come via
|
|
154
|
+
* standard `className` / `style`.
|
|
155
|
+
*/
|
|
156
|
+
declare const EyebrowToken: React.ForwardRefExoticComponent<TypeEyebrowTokenProps & React.RefAttributes<HTMLSpanElement>>;
|
|
157
|
+
|
|
158
|
+
interface TypeMetricHighlightTrend {
|
|
159
|
+
/**
|
|
160
|
+
* Direction of movement. Selects the arrow glyph and the sentiment color of
|
|
161
|
+
* the badge (green for `up`, red for `down`).
|
|
162
|
+
* @default "up"
|
|
163
|
+
*/
|
|
164
|
+
direction?: "up" | "down";
|
|
165
|
+
/**
|
|
166
|
+
* Optional value rendered next to the arrow (e.g. `"240%"`, `12`). When
|
|
167
|
+
* omitted the badge is icon-only.
|
|
168
|
+
*/
|
|
169
|
+
value?: React.ReactNode;
|
|
170
|
+
/**
|
|
171
|
+
* Accessible label describing the trend (e.g. `"up 240%"`). The arrow glyph is
|
|
172
|
+
* decorative, so provide this whenever the trend conveys meaning on its own.
|
|
173
|
+
*/
|
|
174
|
+
"aria-label"?: string;
|
|
175
|
+
}
|
|
176
|
+
interface TypeMetricHighlightProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
177
|
+
/** Short metric label rendered above/beside the value (e.g. `"Insight metric"`). */
|
|
178
|
+
label: React.ReactNode;
|
|
179
|
+
/** The metric value, rendered as the emphasized monospace figure (e.g. `"123"`, `"1.2M"`). */
|
|
180
|
+
value: React.ReactNode;
|
|
181
|
+
/** Optional trend badge — a directional arrow plus an optional value. */
|
|
182
|
+
trend?: TypeMetricHighlightTrend;
|
|
183
|
+
/**
|
|
184
|
+
* Sparkline data points. When omitted, a sensible default series is used
|
|
185
|
+
* (sloped to match `trend`). Pass an explicit array to override, or an empty
|
|
186
|
+
* array to opt out of the chart.
|
|
187
|
+
*/
|
|
188
|
+
data?: number[];
|
|
189
|
+
/**
|
|
190
|
+
* Render the sparkline.
|
|
191
|
+
* @default true
|
|
192
|
+
*/
|
|
193
|
+
chart?: boolean;
|
|
194
|
+
/**
|
|
195
|
+
* Layout direction.
|
|
196
|
+
* - `horizontal` — metric block beside the sparkline.
|
|
197
|
+
* - `vertical` — metric block stacked above a full-width sparkline.
|
|
198
|
+
* @default "horizontal"
|
|
199
|
+
*/
|
|
200
|
+
appearance?: "horizontal" | "vertical";
|
|
201
|
+
/**
|
|
202
|
+
* Size of the value and overall density.
|
|
203
|
+
* - `default` — large value, label stacked above it.
|
|
204
|
+
* - `small` — condensed value, label and value on a single row.
|
|
205
|
+
* @default "default"
|
|
206
|
+
*/
|
|
207
|
+
size?: "default" | "small";
|
|
208
|
+
/**
|
|
209
|
+
* Render the padded surface background. Set `false` to drop the surface and
|
|
210
|
+
* compose the metric inside another container.
|
|
211
|
+
* @default true
|
|
212
|
+
*/
|
|
213
|
+
container?: boolean;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
/**
|
|
217
|
+
* MetricHighlight — a narrative primitive that spotlights a single metric: a
|
|
218
|
+
* label, a large monospace value, an optional trend badge (a directional arrow
|
|
219
|
+
* plus an optional number such as "240%"), and an optional sparkline.
|
|
220
|
+
*
|
|
221
|
+
* Styled via `metric-highlight.css` (Seeds CSS custom properties); consumers
|
|
222
|
+
* import the classes through `@sproutsocial/racine/css/components`. Layout flexes
|
|
223
|
+
* across `appearance` (horizontal/vertical) and `size` (default/small); surface
|
|
224
|
+
* overrides are done with standard `className` / `style`.
|
|
225
|
+
*/
|
|
226
|
+
declare const MetricHighlight: React.ForwardRefExoticComponent<TypeMetricHighlightProps & React.RefAttributes<HTMLDivElement>>;
|
|
227
|
+
|
|
24
228
|
/**
|
|
25
229
|
* Shared types for narrative primitives.
|
|
26
230
|
*
|
|
@@ -33,4 +237,4 @@ declare const NarrativeContainer: React.ForwardRefExoticComponent<TypeNarrativeC
|
|
|
33
237
|
*/
|
|
34
238
|
type TypeNarrativeTone = "neutral" | "positive" | "negative" | "opportunity";
|
|
35
239
|
|
|
36
|
-
export { NarrativeContainer, type TypeNarrativeContainerProps, type TypeNarrativeTone };
|
|
240
|
+
export { EyebrowToken, MetricHighlight, NarrativeContainer, NarrativeHeadline, NarrativeHeadlineHighlight, NarrativeHeadlineRoll, PullQuote, type TypeEyebrowTokenProps, type TypeMetricHighlightProps, type TypeMetricHighlightTrend, type TypeNarrativeContainerProps, type TypeNarrativeHeadlineHighlightProps, type TypeNarrativeHeadlineLevel, type TypeNarrativeHeadlineProps, type TypeNarrativeHeadlineRollProps, type TypeNarrativeTone, type TypePullQuoteProps };
|