@fanvue/ui 3.23.0 → 3.24.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/dist/charts.d.ts +94 -4
- package/dist/charts.mjs +4 -0
- package/dist/charts.mjs.map +1 -1
- package/dist/cjs/charts.cjs +4 -0
- package/dist/cjs/charts.cjs.map +1 -1
- package/dist/cjs/components/AiButton/AiButton.cjs +170 -0
- package/dist/cjs/components/AiButton/AiButton.cjs.map +1 -0
- package/dist/cjs/components/AnimatedNumber/AnimatedNumber.cjs +170 -0
- package/dist/cjs/components/AnimatedNumber/AnimatedNumber.cjs.map +1 -0
- package/dist/cjs/components/Chart/ChartLoadingOverlay.cjs +24 -2
- package/dist/cjs/components/Chart/ChartLoadingOverlay.cjs.map +1 -1
- package/dist/cjs/components/Chart/ChartMetricTrend.cjs +71 -0
- package/dist/cjs/components/Chart/ChartMetricTrend.cjs.map +1 -0
- package/dist/cjs/components/Chart/ChartSkeleton.cjs +95 -0
- package/dist/cjs/components/Chart/ChartSkeleton.cjs.map +1 -0
- package/dist/cjs/components/Chip/Chip.cjs +40 -11
- package/dist/cjs/components/Chip/Chip.cjs.map +1 -1
- package/dist/cjs/components/CountryFlag/CountryFlag.cjs +91 -0
- package/dist/cjs/components/CountryFlag/CountryFlag.cjs.map +1 -0
- package/dist/cjs/components/CountryFlag/flagShapes.cjs +3358 -0
- package/dist/cjs/components/CountryFlag/flagShapes.cjs.map +1 -0
- package/dist/cjs/components/CyclingText/CyclingText.cjs +9 -26
- package/dist/cjs/components/CyclingText/CyclingText.cjs.map +1 -1
- package/dist/cjs/components/CyclingText/useCyclingMotion.cjs +53 -0
- package/dist/cjs/components/CyclingText/useCyclingMotion.cjs.map +1 -0
- package/dist/cjs/components/Demographics/Demographics.cjs +39 -0
- package/dist/cjs/components/Demographics/Demographics.cjs.map +1 -0
- package/dist/cjs/components/Drawer/Drawer.cjs +9 -1
- package/dist/cjs/components/Drawer/Drawer.cjs.map +1 -1
- package/dist/cjs/components/DropdownMenu/DropdownMenu.cjs +122 -16
- package/dist/cjs/components/DropdownMenu/DropdownMenu.cjs.map +1 -1
- package/dist/cjs/components/IconButton/IconButton.cjs +11 -1
- package/dist/cjs/components/IconButton/IconButton.cjs.map +1 -1
- package/dist/cjs/components/ProgressBar/ProgressBar.cjs +9 -1
- package/dist/cjs/components/ProgressBar/ProgressBar.cjs.map +1 -1
- package/dist/cjs/components/Tabs/TabsList.cjs +123 -91
- package/dist/cjs/components/Tabs/TabsList.cjs.map +1 -1
- package/dist/cjs/components/Tooltip/Tooltip.cjs +36 -25
- package/dist/cjs/components/Tooltip/Tooltip.cjs.map +1 -1
- package/dist/cjs/components/Tooltip/TooltipLabel.cjs +71 -0
- package/dist/cjs/components/Tooltip/TooltipLabel.cjs.map +1 -0
- package/dist/cjs/components/TrendPill/TrendPill.cjs +46 -0
- package/dist/cjs/components/TrendPill/TrendPill.cjs.map +1 -0
- package/dist/cjs/components/UserItem/UserItem.cjs +7 -2
- package/dist/cjs/components/UserItem/UserItem.cjs.map +1 -1
- package/dist/cjs/components/UserItem/UserItemTrailing.cjs +34 -0
- package/dist/cjs/components/UserItem/UserItemTrailing.cjs.map +1 -0
- package/dist/cjs/flags.cjs +6 -0
- package/dist/cjs/flags.cjs.map +1 -0
- package/dist/cjs/index.cjs +13 -0
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/cjs/{components/CyclingText → utils}/usePrefersReducedMotion.cjs +14 -14
- package/dist/cjs/utils/usePrefersReducedMotion.cjs.map +1 -0
- package/dist/components/AiButton/AiButton.mjs +153 -0
- package/dist/components/AiButton/AiButton.mjs.map +1 -0
- package/dist/components/AnimatedNumber/AnimatedNumber.mjs +153 -0
- package/dist/components/AnimatedNumber/AnimatedNumber.mjs.map +1 -0
- package/dist/components/Chart/ChartLoadingOverlay.mjs +24 -2
- package/dist/components/Chart/ChartLoadingOverlay.mjs.map +1 -1
- package/dist/components/Chart/ChartMetricTrend.mjs +54 -0
- package/dist/components/Chart/ChartMetricTrend.mjs.map +1 -0
- package/dist/components/Chart/ChartSkeleton.mjs +78 -0
- package/dist/components/Chart/ChartSkeleton.mjs.map +1 -0
- package/dist/components/Chip/Chip.mjs +40 -11
- package/dist/components/Chip/Chip.mjs.map +1 -1
- package/dist/components/CountryFlag/CountryFlag.mjs +74 -0
- package/dist/components/CountryFlag/CountryFlag.mjs.map +1 -0
- package/dist/components/CountryFlag/flagShapes.mjs +3358 -0
- package/dist/components/CountryFlag/flagShapes.mjs.map +1 -0
- package/dist/components/CyclingText/CyclingText.mjs +9 -26
- package/dist/components/CyclingText/CyclingText.mjs.map +1 -1
- package/dist/components/CyclingText/useCyclingMotion.mjs +36 -0
- package/dist/components/CyclingText/useCyclingMotion.mjs.map +1 -0
- package/dist/components/Demographics/Demographics.mjs +22 -0
- package/dist/components/Demographics/Demographics.mjs.map +1 -0
- package/dist/components/Drawer/Drawer.mjs +9 -1
- package/dist/components/Drawer/Drawer.mjs.map +1 -1
- package/dist/components/DropdownMenu/DropdownMenu.mjs +122 -16
- package/dist/components/DropdownMenu/DropdownMenu.mjs.map +1 -1
- package/dist/components/IconButton/IconButton.mjs +11 -1
- package/dist/components/IconButton/IconButton.mjs.map +1 -1
- package/dist/components/ProgressBar/ProgressBar.mjs +9 -1
- package/dist/components/ProgressBar/ProgressBar.mjs.map +1 -1
- package/dist/components/Tabs/TabsList.mjs +123 -91
- package/dist/components/Tabs/TabsList.mjs.map +1 -1
- package/dist/components/Tooltip/Tooltip.mjs +37 -26
- package/dist/components/Tooltip/Tooltip.mjs.map +1 -1
- package/dist/components/Tooltip/TooltipLabel.mjs +54 -0
- package/dist/components/Tooltip/TooltipLabel.mjs.map +1 -0
- package/dist/components/TrendPill/TrendPill.mjs +29 -0
- package/dist/components/TrendPill/TrendPill.mjs.map +1 -0
- package/dist/components/UserItem/UserItem.mjs +7 -2
- package/dist/components/UserItem/UserItem.mjs.map +1 -1
- package/dist/components/UserItem/UserItemTrailing.mjs +17 -0
- package/dist/components/UserItem/UserItemTrailing.mjs.map +1 -0
- package/dist/flags.d.ts +59 -0
- package/dist/flags.mjs +6 -0
- package/dist/flags.mjs.map +1 -0
- package/dist/index.d.ts +381 -11
- package/dist/index.mjs +14 -1
- package/dist/index.mjs.map +1 -1
- package/dist/styles/base.css +166 -0
- package/dist/styles/theme.css +12 -0
- package/dist/utils/usePrefersReducedMotion.mjs +22 -0
- package/dist/utils/usePrefersReducedMotion.mjs.map +1 -0
- package/package.json +13 -2
- package/dist/cjs/components/CyclingText/usePrefersReducedMotion.cjs.map +0 -1
- package/dist/components/CyclingText/usePrefersReducedMotion.mjs +0 -22
- package/dist/components/CyclingText/usePrefersReducedMotion.mjs.map +0 -1
package/dist/flags.d.ts
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import * as React_2 from 'react';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* A country's flag, drawn as a circle. Use it wherever a row is keyed by
|
|
5
|
+
* country — a demographics breakdown, a country picker, the country selector on
|
|
6
|
+
* `PhoneField`.
|
|
7
|
+
*
|
|
8
|
+
* Prefer this to a flag emoji: emoji flags fall back to bare letter pairs on
|
|
9
|
+
* Windows, where the fonts carry no flag glyphs.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```tsx
|
|
13
|
+
* <CountryFlag country="US" label="United States" />
|
|
14
|
+
* ```
|
|
15
|
+
*/
|
|
16
|
+
export declare const CountryFlag: React_2.ForwardRefExoticComponent<Omit<CountryFlagProps, "ref"> & React_2.RefAttributes<SVGSVGElement>>;
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Every code {@link FLAG_SHAPES} has artwork for. Mostly ISO 3166-1 alpha-2,
|
|
20
|
+
* plus the codes the source ships alongside them (`eu`, `un`, `xk`, `xx`, ...).
|
|
21
|
+
*/
|
|
22
|
+
export declare type CountryFlagCode = "ac" | "ad" | "ae" | "af" | "ag" | "ai" | "al" | "am" | "an" | "ao" | "aq" | "ar" | "as" | "at" | "au" | "aw" | "ax" | "az" | "ba" | "bb" | "bd" | "be" | "bf" | "bg" | "bh" | "bi" | "bj" | "bl" | "bm" | "bn" | "bo" | "bq" | "br" | "bs" | "bt" | "bv" | "bw" | "by" | "bz" | "ca" | "cc" | "cd" | "cf" | "cg" | "ch" | "ci" | "ck" | "cl" | "cm" | "cn" | "co" | "cp" | "cq" | "cr" | "cu" | "cv" | "cw" | "cx" | "cy" | "cz" | "de" | "dg" | "dj" | "dk" | "dm" | "do" | "dz" | "ea" | "ec" | "ee" | "eg" | "eh" | "er" | "es" | "et" | "eu" | "fi" | "fj" | "fk" | "fm" | "fo" | "fr" | "fx" | "ga" | "gb" | "gd" | "ge" | "gf" | "gg" | "gh" | "gi" | "gl" | "gm" | "gn" | "gp" | "gq" | "gr" | "gs" | "gt" | "gu" | "gw" | "gy" | "hk" | "hm" | "hn" | "hr" | "ht" | "hu" | "ic" | "id" | "ie" | "il" | "im" | "in" | "io" | "iq" | "ir" | "is" | "it" | "je" | "jm" | "jo" | "jp" | "ke" | "kg" | "kh" | "ki" | "km" | "kn" | "kp" | "kr" | "kw" | "ky" | "kz" | "la" | "lb" | "lc" | "li" | "lk" | "lr" | "ls" | "lt" | "lu" | "lv" | "ly" | "ma" | "mc" | "md" | "me" | "mf" | "mg" | "mh" | "mk" | "ml" | "mm" | "mn" | "mo" | "mp" | "mq" | "mr" | "ms" | "mt" | "mu" | "mv" | "mw" | "mx" | "my" | "mz" | "na" | "nc" | "ne" | "nf" | "ng" | "ni" | "nl" | "no" | "np" | "nr" | "nu" | "nz" | "om" | "pa" | "pe" | "pf" | "pg" | "ph" | "pk" | "pl" | "pm" | "pn" | "pr" | "ps" | "pt" | "pw" | "py" | "qa" | "re" | "ro" | "rs" | "ru" | "rw" | "sa" | "sb" | "sc" | "sd" | "se" | "sg" | "sh" | "si" | "sj" | "sk" | "sl" | "sm" | "sn" | "so" | "sr" | "ss" | "st" | "su" | "sv" | "sx" | "sy" | "sz" | "ta" | "tc" | "td" | "tf" | "tg" | "th" | "tj" | "tk" | "tl" | "tm" | "tn" | "to" | "tr" | "tt" | "tv" | "tw" | "tz" | "ua" | "ug" | "uk" | "um" | "un" | "us" | "uy" | "uz" | "va" | "vc" | "ve" | "vg" | "vi" | "vn" | "vu" | "wf" | "ws" | "xk" | "xx" | "ye" | "yt" | "yu" | "za" | "zm" | "zw";
|
|
23
|
+
|
|
24
|
+
/** Props for {@link CountryFlag}. */
|
|
25
|
+
export declare interface CountryFlagProps extends Omit<React_2.SVGProps<SVGSVGElement>, "children"> {
|
|
26
|
+
/**
|
|
27
|
+
* Two-letter country code, case-insensitive (e.g. `"US"`, `"nl"`). Codes we
|
|
28
|
+
* hold no artwork for render a grey placeholder disc, so a live feed of
|
|
29
|
+
* country codes can be passed straight through.
|
|
30
|
+
*/
|
|
31
|
+
country: string;
|
|
32
|
+
/** Rendered edge length in px. Defaults to 20, the size the designs use. */
|
|
33
|
+
size?: CountryFlagSize;
|
|
34
|
+
/**
|
|
35
|
+
* Accessible name, e.g. the country's translated name. Leave unset when the
|
|
36
|
+
* flag sits next to that name anyway — it is then hidden from assistive tech
|
|
37
|
+
* rather than read out twice.
|
|
38
|
+
*/
|
|
39
|
+
label?: string;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/** Rendered edge length in px. */
|
|
43
|
+
export declare type CountryFlagSize = keyof typeof SIZE_CLASS;
|
|
44
|
+
|
|
45
|
+
declare const SIZE_CLASS: {
|
|
46
|
+
readonly 16: "size-4";
|
|
47
|
+
readonly 20: "size-5";
|
|
48
|
+
readonly 24: "size-6";
|
|
49
|
+
readonly 32: "size-8";
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
export { }
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
declare module "vitest" {
|
|
56
|
+
interface Assertion<T> {
|
|
57
|
+
toHaveNoViolations(): T;
|
|
58
|
+
}
|
|
59
|
+
}
|
package/dist/flags.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"flags.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
|
package/dist/index.d.ts
CHANGED
|
@@ -125,6 +125,47 @@ export declare const AI2Icon: React_2.ForwardRefExoticComponent<BaseIconProps &
|
|
|
125
125
|
/** Props for {@link AI2Icon}. See {@link BaseIconProps} for the shared shape. */
|
|
126
126
|
export declare type AI2IconProps = BaseIconProps;
|
|
127
127
|
|
|
128
|
+
/**
|
|
129
|
+
* A pill button for AI actions. The label shimmers letter by letter and the glyph
|
|
130
|
+
* flickers at rest; on hover both settle and the green treatment eases in together
|
|
131
|
+
* — outline, rim and a sheen pooling along the bottom edge under the cursor, which
|
|
132
|
+
* follows it across the button. On focus each letter blooms once before the shimmer
|
|
133
|
+
* resumes. The lit rim and sheen come from the `fv-ai-button` utility in `base.css`.
|
|
134
|
+
*
|
|
135
|
+
* It shares {@link Button}'s geometry — `rounded-full`, the same heights and label
|
|
136
|
+
* typography — so it sits alongside one without looking foreign. Both labels are
|
|
137
|
+
* rendered stacked in a single grid cell, so swapping to `active` crossfades
|
|
138
|
+
* without the button changing width.
|
|
139
|
+
*
|
|
140
|
+
* Honours `prefers-reduced-motion`: the shimmer and flicker are dropped and the
|
|
141
|
+
* label renders in its settled state.
|
|
142
|
+
*
|
|
143
|
+
* @example
|
|
144
|
+
* ```tsx
|
|
145
|
+
* <AiButton label="Analyse" activeLabel="Analysing" active={isPending} onClick={run} />
|
|
146
|
+
* ```
|
|
147
|
+
*/
|
|
148
|
+
export declare const AiButton: React_2.ForwardRefExoticComponent<AiButtonProps & React_2.RefAttributes<HTMLButtonElement>>;
|
|
149
|
+
|
|
150
|
+
/** Props for {@link AiButton}. */
|
|
151
|
+
export declare interface AiButtonProps extends Omit<React_2.ButtonHTMLAttributes<HTMLButtonElement>, "type"> {
|
|
152
|
+
/** Resting label. Also the accessible name unless `aria-label` is given. */
|
|
153
|
+
label: string;
|
|
154
|
+
/** Label shown while `active`. Falls back to {@link label}. */
|
|
155
|
+
activeLabel?: string;
|
|
156
|
+
/** Swap to {@link activeLabel} and keep the shimmer running. @default false */
|
|
157
|
+
active?: boolean;
|
|
158
|
+
/** @default "32" */
|
|
159
|
+
size?: AiButtonSize;
|
|
160
|
+
/** Replace the leading AI glyph. */
|
|
161
|
+
icon?: React_2.ReactNode;
|
|
162
|
+
/** @default "button" */
|
|
163
|
+
type?: "button" | "submit" | "reset";
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
/** Height, padding and label typography, matching {@link Button}'s scale. */
|
|
167
|
+
export declare type AiButtonSize = "24" | "32" | "40";
|
|
168
|
+
|
|
128
169
|
/**
|
|
129
170
|
* AI Call icon. Renders at sizes 16, 24, or 32 px with outlined and filled variants.
|
|
130
171
|
*
|
|
@@ -241,6 +282,59 @@ export declare interface AlertProps extends React_2.HTMLAttributes<HTMLDivElemen
|
|
|
241
282
|
/** Visual style variant of the alert. */
|
|
242
283
|
export declare type AlertVariant = "info" | "success" | "warning" | "error" | "neutral";
|
|
243
284
|
|
|
285
|
+
/**
|
|
286
|
+
* Animates a number when its value changes, either by rolling each digit like
|
|
287
|
+
* an odometer or by counting through the intermediate values.
|
|
288
|
+
*
|
|
289
|
+
* Both variants collapse to an instant swap under
|
|
290
|
+
* `prefers-reduced-motion: reduce`.
|
|
291
|
+
*
|
|
292
|
+
* The rolling variant stacks all ten digits in each column, so the visual is
|
|
293
|
+
* hidden from assistive technology and the formatted value is exposed once as
|
|
294
|
+
* text instead.
|
|
295
|
+
*
|
|
296
|
+
* @example
|
|
297
|
+
* ```tsx
|
|
298
|
+
* // Headline figure
|
|
299
|
+
* <AnimatedNumber value={totalGross} format={formatPrice} variant="roll" />
|
|
300
|
+
*
|
|
301
|
+
* // Supporting figure
|
|
302
|
+
* <AnimatedNumber value={activeFans} variant="count" />
|
|
303
|
+
* ```
|
|
304
|
+
*/
|
|
305
|
+
export declare const AnimatedNumber: React_2.ForwardRefExoticComponent<AnimatedNumberProps & React_2.RefAttributes<HTMLSpanElement>>;
|
|
306
|
+
|
|
307
|
+
/** Props for {@link AnimatedNumber}. */
|
|
308
|
+
export declare interface AnimatedNumberProps extends Omit<React_2.HTMLAttributes<HTMLSpanElement>, "children"> {
|
|
309
|
+
/** The value to display. Animates whenever this changes. */
|
|
310
|
+
value: number;
|
|
311
|
+
/**
|
|
312
|
+
* Turns the value into the displayed string. Receives interpolated values in
|
|
313
|
+
* the `count` variant, so it must handle non-integers.
|
|
314
|
+
* @default String(Math.round(value))
|
|
315
|
+
*/
|
|
316
|
+
format?: (value: number) => string;
|
|
317
|
+
/** Which animation to run. @default "count" */
|
|
318
|
+
variant?: AnimatedNumberVariant;
|
|
319
|
+
/** Animation duration in milliseconds. @default 500 */
|
|
320
|
+
durationMs?: number;
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
/** How a value change is animated. */
|
|
324
|
+
export declare type AnimatedNumberVariant =
|
|
325
|
+
/**
|
|
326
|
+
* Per-digit odometer: each digit column slides to its new value and the box
|
|
327
|
+
* width eases when the digit count changes. Reads as mechanical, so it suits
|
|
328
|
+
* a single headline figure rather than a grid of them.
|
|
329
|
+
*/
|
|
330
|
+
"roll"
|
|
331
|
+
/**
|
|
332
|
+
* Interpolates the value and re-formats it each frame, so the whole number
|
|
333
|
+
* counts from old to new. Calmer than `roll` when several figures on a page
|
|
334
|
+
* change at once.
|
|
335
|
+
*/
|
|
336
|
+
| "count";
|
|
337
|
+
|
|
244
338
|
/**
|
|
245
339
|
* Apps icon. Renders at sizes 16, 24, or 32 px with outlined and filled variants.
|
|
246
340
|
*
|
|
@@ -1624,6 +1718,15 @@ export declare interface ChipProps extends React_2.HTMLAttributes<HTMLElement> {
|
|
|
1624
1718
|
* @default false
|
|
1625
1719
|
*/
|
|
1626
1720
|
dotted?: boolean;
|
|
1721
|
+
/**
|
|
1722
|
+
* Draws the unselected state as a 1px `buttons-chip-default` outline over a
|
|
1723
|
+
* transparent background instead of filling with that same token. This is the
|
|
1724
|
+
* Figma `V2 Insights Chips` treatment, used where chips sit over a chart and a
|
|
1725
|
+
* row of solid fills would compete with the plotted series. The selected state
|
|
1726
|
+
* is unaffected — it stays filled — as are the `dark` and `dotted` variants.
|
|
1727
|
+
* @default false
|
|
1728
|
+
*/
|
|
1729
|
+
outlined?: boolean;
|
|
1627
1730
|
/** Icon element displayed before the label. */
|
|
1628
1731
|
leftIcon?: React_2.ReactNode;
|
|
1629
1732
|
/** Icon element displayed after the label. */
|
|
@@ -2067,6 +2170,42 @@ export declare interface CyclingTextProps extends Omit<React_2.HTMLAttributes<HT
|
|
|
2067
2170
|
/** How the wrapper should be sized to accommodate variable-length items. */
|
|
2068
2171
|
export declare type CyclingTextSizing = "longest" | "current";
|
|
2069
2172
|
|
|
2173
|
+
/**
|
|
2174
|
+
* One row of a breakdown: a leading glyph and label, its share at the far end,
|
|
2175
|
+
* and a bar underneath. Stack these to show how a total splits across
|
|
2176
|
+
* categories — the top-countries breakdown on the insights dashboard, and the
|
|
2177
|
+
* same list expanded inside a dialog.
|
|
2178
|
+
*
|
|
2179
|
+
* @example
|
|
2180
|
+
* ```tsx
|
|
2181
|
+
* <Demographics
|
|
2182
|
+
* icon={<span aria-hidden>🇺🇸</span>}
|
|
2183
|
+
* label="United States"
|
|
2184
|
+
* value={52.6}
|
|
2185
|
+
* formattedValue="52.6%"
|
|
2186
|
+
* />
|
|
2187
|
+
* ```
|
|
2188
|
+
*/
|
|
2189
|
+
export declare const Demographics: React_2.ForwardRefExoticComponent<DemographicsProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
2190
|
+
|
|
2191
|
+
/** Props for {@link Demographics}. */
|
|
2192
|
+
export declare interface DemographicsProps extends Omit<React_2.HTMLAttributes<HTMLDivElement>, "title"> {
|
|
2193
|
+
/**
|
|
2194
|
+
* Row label, e.g. a country name. Pass a translated string for i18n.
|
|
2195
|
+
*
|
|
2196
|
+
* A string rather than a node because it is also the bar's accessible name:
|
|
2197
|
+
* a node would leave the bar announcing "Progress" and a bare number, with
|
|
2198
|
+
* nothing saying which row it belongs to.
|
|
2199
|
+
*/
|
|
2200
|
+
label: string;
|
|
2201
|
+
/** Share of the total, 0–100. Drives the bar and is announced to assistive tech. */
|
|
2202
|
+
value: number;
|
|
2203
|
+
/** Formatted share shown at the end of the row, e.g. `"52.6%"`. */
|
|
2204
|
+
formattedValue: React_2.ReactNode;
|
|
2205
|
+
/** Leading 20px glyph — a flag for a country row. */
|
|
2206
|
+
icon?: React_2.ReactNode;
|
|
2207
|
+
}
|
|
2208
|
+
|
|
2070
2209
|
/**
|
|
2071
2210
|
* Dense grid view icon (3×3 tiles) — the compact-grid counterpart of
|
|
2072
2211
|
* {@link GridViewIcon}. Renders at sizes 16, 24, or 32 px.
|
|
@@ -2407,7 +2546,8 @@ export declare interface DrawerContentProps extends React_2.ComponentPropsWithou
|
|
|
2407
2546
|
size?: DrawerSize;
|
|
2408
2547
|
/**
|
|
2409
2548
|
* Visual treatment of the panel. Use `"sheet"` (with `position="bottom"`) for
|
|
2410
|
-
* a bottom sheet with the modal surface treatment
|
|
2549
|
+
* a bottom sheet with the modal surface treatment, or `"menu"` for a floating
|
|
2550
|
+
* inset menu carrying the dropdown surface. @default "panel"
|
|
2411
2551
|
*/
|
|
2412
2552
|
variant?: DrawerVariant;
|
|
2413
2553
|
/**
|
|
@@ -2519,12 +2659,44 @@ export declare type DrawerTriggerProps = React_2.ComponentPropsWithoutRef<typeof
|
|
|
2519
2659
|
* - `"sheet"` — a bottom-sheet treatment matching the modal surface: large
|
|
2520
2660
|
* top-only radius (32px), modal background/stroke, and menu blur+shadow.
|
|
2521
2661
|
* Intended for `position="bottom"`.
|
|
2662
|
+
* - `"menu"` — a floating menu near the bottom edge rather than a sheet fixed to
|
|
2663
|
+
* it: inset from all three sides and rounded on every corner. Shares the modal
|
|
2664
|
+
* surface with `"sheet"`; only the shape differs. Intended for
|
|
2665
|
+
* `position="bottom"`.
|
|
2522
2666
|
*/
|
|
2523
|
-
export declare type DrawerVariant = "panel" | "sheet";
|
|
2667
|
+
export declare type DrawerVariant = "panel" | "sheet" | "menu";
|
|
2524
2668
|
|
|
2525
2669
|
/** Root component that manages open/close state for a dropdown menu. */
|
|
2526
2670
|
export declare function DropdownMenu({ open: openProp, defaultOpen, onOpenChange, variant, children, ...props }: DropdownMenuProps): JSX.Element;
|
|
2527
2671
|
|
|
2672
|
+
/**
|
|
2673
|
+
* A single multi-select choice within a dropdown menu. Shows a square indicator
|
|
2674
|
+
* that fills when checked, an optional leading avatar, and an optional helper
|
|
2675
|
+
* line underneath the title.
|
|
2676
|
+
*
|
|
2677
|
+
* Pair with {@link DropdownMenuHeader} at `type="search"` for filterable menus.
|
|
2678
|
+
* Use {@link DropdownMenuRadioItem} instead when only one option may be active.
|
|
2679
|
+
*
|
|
2680
|
+
* @example
|
|
2681
|
+
* ```tsx
|
|
2682
|
+
* <DropdownMenuCheckboxItem
|
|
2683
|
+
* checked={selected.has(creator.id)}
|
|
2684
|
+
* onCheckedChange={() => toggle(creator.id)}
|
|
2685
|
+
* avatar={<Avatar size={32} src={creator.avatarUrl} />}
|
|
2686
|
+
* >
|
|
2687
|
+
* @sofiabloom
|
|
2688
|
+
* </DropdownMenuCheckboxItem>
|
|
2689
|
+
* ```
|
|
2690
|
+
*/
|
|
2691
|
+
export declare const DropdownMenuCheckboxItem: React_2.ForwardRefExoticComponent<DropdownMenuCheckboxItemProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
2692
|
+
|
|
2693
|
+
export declare interface DropdownMenuCheckboxItemProps extends React_2.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.CheckboxItem> {
|
|
2694
|
+
/** Optional secondary text shown below the title. */
|
|
2695
|
+
helper?: string;
|
|
2696
|
+
/** Leading avatar rendered between the checkbox and the title. Render at 32px to match the design. */
|
|
2697
|
+
avatar?: React_2.ReactNode;
|
|
2698
|
+
}
|
|
2699
|
+
|
|
2528
2700
|
/**
|
|
2529
2701
|
* The positioned content panel rendered inside a portal.
|
|
2530
2702
|
*
|
|
@@ -2608,6 +2780,12 @@ export declare interface DropdownMenuHeaderSearchProps {
|
|
|
2608
2780
|
placeholder?: string;
|
|
2609
2781
|
/** Accessible label for the search input. @default "Search" */
|
|
2610
2782
|
"aria-label"?: string;
|
|
2783
|
+
/**
|
|
2784
|
+
* Focus the input as soon as the menu opens, so typing filters immediately.
|
|
2785
|
+
* Radix parks initial focus on the content element (which is what drives its
|
|
2786
|
+
* typeahead), so without this the first keystrokes never reach the input.
|
|
2787
|
+
*/
|
|
2788
|
+
autoFocus?: boolean;
|
|
2611
2789
|
}
|
|
2612
2790
|
|
|
2613
2791
|
/** Header height preset. Matches the menu item sizing scale. */
|
|
@@ -3191,7 +3369,10 @@ export declare type HourglassIconProps = BaseIconProps;
|
|
|
3191
3369
|
* Shape is size-driven for the standard variants: the `24` size is squared
|
|
3192
3370
|
* (`rounded-xs`), every larger size is circular. Bespoke variants (`brand`,
|
|
3193
3371
|
* `contrast`, `messaging`, `navTray`, `tertiaryDestructive`, `stop`,
|
|
3194
|
-
* `microphone`) stay circular at all sizes.
|
|
3372
|
+
* `microphone`) stay circular at all sizes. `field` is the exception that is
|
|
3373
|
+
* never circular — it takes the inputs' `rounded-sm` so it matches the fields it
|
|
3374
|
+
* sits beside. Use it at `32`, `40` or `48`: those are the sizes `Select` offers,
|
|
3375
|
+
* and the variant only earns its surface when it lines up with one.
|
|
3195
3376
|
*
|
|
3196
3377
|
* @example
|
|
3197
3378
|
* ```tsx
|
|
@@ -3230,7 +3411,7 @@ export declare type IconButtonSize = "24" | "32" | "40" | "48" | "52" | "72";
|
|
|
3230
3411
|
* `brand`, `contrast`, `messaging`, `navTray`, `tertiaryDestructive`, `stop` and
|
|
3231
3412
|
* `microphone` are bespoke variants that stay circular at every size.
|
|
3232
3413
|
*/
|
|
3233
|
-
export declare type IconButtonVariant = "primary" | "secondary" | "tertiary" | "outline" | "error" | "white" | "black" | "brand" | "contrast" | "messaging" | "navTray" | "tertiaryDestructive" | "stop" | "microphone";
|
|
3414
|
+
export declare type IconButtonVariant = "primary" | "secondary" | "tertiary" | "outline" | "error" | "white" | "black" | "brand" | "contrast" | "messaging" | "navTray" | "tertiaryDestructive" | "stop" | "microphone" | "field";
|
|
3234
3415
|
|
|
3235
3416
|
/** A single drawable path within an icon variant. */
|
|
3236
3417
|
export declare type IconPath = {
|
|
@@ -4261,7 +4442,7 @@ export declare type ProgressBarItemVariant = "brand" | "mono";
|
|
|
4261
4442
|
export declare interface ProgressBarProps extends Omit<React_2.HTMLAttributes<HTMLDivElement>, "title"> {
|
|
4262
4443
|
/** Current progress value, clamped to 0–100. */
|
|
4263
4444
|
value: number;
|
|
4264
|
-
/** Track height — `"default"` (12px) or `"small"` (6px). @default "default" */
|
|
4445
|
+
/** Track height — `"default"` (12px), `"medium"` (8px) or `"small"` (6px). @default "default" */
|
|
4265
4446
|
size?: ProgressBarSize;
|
|
4266
4447
|
/** Colour mode. Prefer `"brand"` or `"mono"` (V2); `"default"`/`"generic"`/`"neutral"` are legacy. @default "default" */
|
|
4267
4448
|
variant?: ProgressBarVariant;
|
|
@@ -4283,8 +4464,8 @@ export declare interface ProgressBarProps extends Omit<React_2.HTMLAttributes<HT
|
|
|
4283
4464
|
ariaValueText?: string;
|
|
4284
4465
|
}
|
|
4285
4466
|
|
|
4286
|
-
/** Track height — `"default"` (12px) or `"small"` (6px). */
|
|
4287
|
-
export declare type ProgressBarSize = "default" | "small";
|
|
4467
|
+
/** Track height — `"default"` (12px), `"medium"` (8px) or `"small"` (6px). */
|
|
4468
|
+
export declare type ProgressBarSize = "default" | "medium" | "small";
|
|
4288
4469
|
|
|
4289
4470
|
/**
|
|
4290
4471
|
* A segmented (stepped) progress indicator built from {@link ProgressBarItem}
|
|
@@ -4318,9 +4499,11 @@ export declare interface ProgressBarStepsProps extends React_2.HTMLAttributes<HT
|
|
|
4318
4499
|
* - `"mono"` — V2 monochrome fill on a tinted track (theme-aware).
|
|
4319
4500
|
* - `"default"` — legacy value-coded red/yellow/green.
|
|
4320
4501
|
* - `"generic"` — legacy solid brand green on a neutral track.
|
|
4502
|
+
* - `"sky"` — chart sky fill on the muted-sky track, for data bars such as the
|
|
4503
|
+
* demographics breakdown.
|
|
4321
4504
|
* - `"neutral"` — legacy theme-aware inverse colour on a neutral track.
|
|
4322
4505
|
*/
|
|
4323
|
-
export declare type ProgressBarVariant = "brand" | "mono" | "default" | "generic" | "neutral";
|
|
4506
|
+
export declare type ProgressBarVariant = "brand" | "mono" | "sky" | "default" | "generic" | "neutral";
|
|
4324
4507
|
|
|
4325
4508
|
/**
|
|
4326
4509
|
* Queue icon. Renders at sizes 16, 24, or 32 px.
|
|
@@ -5627,6 +5810,28 @@ export declare const TabsList: React_2.ForwardRefExoticComponent<Omit<TabsPrimit
|
|
|
5627
5810
|
alignLeft?: boolean | Breakpoint;
|
|
5628
5811
|
/** Explicit layout variant. `"hug"` sizes the list to its content; `"fill"` stretches it full-width with equal-width tabs. Takes precedence over `fullWidth`/`alignLeft`. */
|
|
5629
5812
|
variant?: "fill" | "hug";
|
|
5813
|
+
/**
|
|
5814
|
+
* Drops the leading padding on the first tab so its label sits flush with the
|
|
5815
|
+
* list's left edge, lining it up with page content above or below the bar
|
|
5816
|
+
* (a heading, for instance) rather than being indented by the tab's own
|
|
5817
|
+
* padding. Spacing between tabs is unaffected. Pair with `alignLeft` or
|
|
5818
|
+
* `variant="hug"`. @default false
|
|
5819
|
+
*/
|
|
5820
|
+
flushLeft?: boolean;
|
|
5821
|
+
/**
|
|
5822
|
+
* Scrolls the row horizontally when the tabs don't fit, instead of letting
|
|
5823
|
+
* them compress. By default a tab may shrink until its label ellipsises,
|
|
5824
|
+
* which on a narrow viewport can truncate every label at once; here each tab
|
|
5825
|
+
* keeps its natural width and the overflow scrolls. The scrollbar itself is
|
|
5826
|
+
* hidden — the clipped tab at the edge is the affordance.
|
|
5827
|
+
*
|
|
5828
|
+
* Because the tabs are content-sized, they no longer spread to fill the row:
|
|
5829
|
+
* a set that does fit sits left-aligned, as with `alignLeft`.
|
|
5830
|
+
*
|
|
5831
|
+
* Horizontal orientation only: a vertical list already grows downwards.
|
|
5832
|
+
* @default false
|
|
5833
|
+
*/
|
|
5834
|
+
scrollable?: boolean;
|
|
5630
5835
|
} & React_2.RefAttributes<HTMLDivElement>>;
|
|
5631
5836
|
|
|
5632
5837
|
/** Props for the {@link TabsList} component. */
|
|
@@ -5642,6 +5847,28 @@ export declare type TabsListProps = React_2.ComponentPropsWithoutRef<typeof Tabs
|
|
|
5642
5847
|
alignLeft?: boolean | Breakpoint;
|
|
5643
5848
|
/** Explicit layout variant. `"hug"` sizes the list to its content; `"fill"` stretches it full-width with equal-width tabs. Takes precedence over `fullWidth`/`alignLeft`. */
|
|
5644
5849
|
variant?: "fill" | "hug";
|
|
5850
|
+
/**
|
|
5851
|
+
* Drops the leading padding on the first tab so its label sits flush with the
|
|
5852
|
+
* list's left edge, lining it up with page content above or below the bar
|
|
5853
|
+
* (a heading, for instance) rather than being indented by the tab's own
|
|
5854
|
+
* padding. Spacing between tabs is unaffected. Pair with `alignLeft` or
|
|
5855
|
+
* `variant="hug"`. @default false
|
|
5856
|
+
*/
|
|
5857
|
+
flushLeft?: boolean;
|
|
5858
|
+
/**
|
|
5859
|
+
* Scrolls the row horizontally when the tabs don't fit, instead of letting
|
|
5860
|
+
* them compress. By default a tab may shrink until its label ellipsises,
|
|
5861
|
+
* which on a narrow viewport can truncate every label at once; here each tab
|
|
5862
|
+
* keeps its natural width and the overflow scrolls. The scrollbar itself is
|
|
5863
|
+
* hidden — the clipped tab at the edge is the affordance.
|
|
5864
|
+
*
|
|
5865
|
+
* Because the tabs are content-sized, they no longer spread to fill the row:
|
|
5866
|
+
* a set that does fit sits left-aligned, as with `alignLeft`.
|
|
5867
|
+
*
|
|
5868
|
+
* Horizontal orientation only: a vertical list already grows downwards.
|
|
5869
|
+
* @default false
|
|
5870
|
+
*/
|
|
5871
|
+
scrollable?: boolean;
|
|
5645
5872
|
};
|
|
5646
5873
|
|
|
5647
5874
|
/** Props for the {@link Tabs} root component. Extends Radix `Tabs.Root` props. */
|
|
@@ -5948,12 +6175,46 @@ export declare const Tooltip: React_2.FC<TooltipPrimitive.TooltipProps>;
|
|
|
5948
6175
|
|
|
5949
6176
|
export declare const TooltipContent: React_2.ForwardRefExoticComponent<TooltipContentProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
5950
6177
|
|
|
5951
|
-
export declare interface TooltipContentProps extends React_2.ComponentPropsWithoutRef<typeof TooltipPrimitive.Content> {
|
|
6178
|
+
export declare interface TooltipContentProps extends Omit<React_2.ComponentPropsWithoutRef<typeof TooltipPrimitive.Content>, "title"> {
|
|
5952
6179
|
/**
|
|
5953
6180
|
* Position of the tooltip relative to the trigger. Takes precedence over `side` and `align`.
|
|
5954
6181
|
* @default "top"
|
|
5955
6182
|
*/
|
|
5956
6183
|
placement?: TooltipPlacement;
|
|
6184
|
+
/**
|
|
6185
|
+
* Optional heading above the body, for the two-row tooltip: a bold label
|
|
6186
|
+
* naming the thing, then a plain-weight description of it. Without it the
|
|
6187
|
+
* tooltip is a single bold line.
|
|
6188
|
+
*/
|
|
6189
|
+
title?: React_2.ReactNode;
|
|
6190
|
+
}
|
|
6191
|
+
|
|
6192
|
+
/**
|
|
6193
|
+
* A text label that is itself the tooltip trigger, marked by a dashed
|
|
6194
|
+
* underline. Use this instead of pairing a label with a separate info glyph:
|
|
6195
|
+
* the visible text becomes the trigger's accessible name, and the row stays at
|
|
6196
|
+
* text height rather than being stretched by an icon button.
|
|
6197
|
+
*
|
|
6198
|
+
* The label is repeated as the tooltip's heading, so the tooltip reads as the
|
|
6199
|
+
* two-row block the design specifies — the term, then what it means.
|
|
6200
|
+
*
|
|
6201
|
+
* Tapping the label toggles the tooltip on touch devices, where there is no
|
|
6202
|
+
* hover to trigger it. Tapping elsewhere, scrolling, or opening another tooltip
|
|
6203
|
+
* dismisses it.
|
|
6204
|
+
*
|
|
6205
|
+
* @example
|
|
6206
|
+
* ```tsx
|
|
6207
|
+
* <TooltipLabel tooltip="Total earnings for the selected period.">Total Earnings</TooltipLabel>
|
|
6208
|
+
* ```
|
|
6209
|
+
*/
|
|
6210
|
+
export declare const TooltipLabel: React_2.ForwardRefExoticComponent<TooltipLabelProps & React_2.RefAttributes<HTMLButtonElement>>;
|
|
6211
|
+
|
|
6212
|
+
/** Props for {@link TooltipLabel}. */
|
|
6213
|
+
export declare interface TooltipLabelProps extends Omit<React_2.ComponentPropsWithoutRef<"button">, "title"> {
|
|
6214
|
+
/** Tooltip content. Pass a translated string for i18n. */
|
|
6215
|
+
tooltip: React_2.ReactNode;
|
|
6216
|
+
/** The label text, which doubles as the trigger. */
|
|
6217
|
+
children: React_2.ReactNode;
|
|
5957
6218
|
}
|
|
5958
6219
|
|
|
5959
6220
|
/** Position of the tooltip relative to its trigger, combining side and alignment (MUI-style). */
|
|
@@ -5966,8 +6227,20 @@ export declare interface TooltipProps extends React_2.ComponentPropsWithoutRef<t
|
|
|
5966
6227
|
defaultOpen?: boolean;
|
|
5967
6228
|
}
|
|
5968
6229
|
|
|
5969
|
-
/**
|
|
5970
|
-
|
|
6230
|
+
/**
|
|
6231
|
+
* Provides tooltip delay and skip-delay context. Wrap your app or a subtree.
|
|
6232
|
+
*
|
|
6233
|
+
* Defaults `delayDuration` to 200ms rather than inheriting Radix's 700ms, which
|
|
6234
|
+
* reads as unresponsive on the short hint labels this library uses tooltips for.
|
|
6235
|
+
* Pass `delayDuration` to override.
|
|
6236
|
+
*
|
|
6237
|
+
* Note that `TooltipLabel`, `ChartCard` and `SwitchField` each mount their own
|
|
6238
|
+
* provider internally, so they take this default but not an app-level override.
|
|
6239
|
+
*/
|
|
6240
|
+
export declare const TooltipProvider: {
|
|
6241
|
+
({ delayDuration, ...props }: TooltipProviderProps): JSX.Element;
|
|
6242
|
+
displayName: string;
|
|
6243
|
+
};
|
|
5971
6244
|
|
|
5972
6245
|
/** Props for the {@link TooltipProvider}. Wraps Radix `Tooltip.Provider`. */
|
|
5973
6246
|
export declare type TooltipProviderProps = React_2.ComponentPropsWithoutRef<typeof TooltipPrimitive.Provider>;
|
|
@@ -6008,6 +6281,40 @@ export declare const TrashIcon: React_2.ForwardRefExoticComponent<BaseIconProps
|
|
|
6008
6281
|
/** Props for {@link TrashIcon}. See {@link BaseIconProps} for the shared shape. */
|
|
6009
6282
|
export declare type TrashIconProps = BaseIconProps;
|
|
6010
6283
|
|
|
6284
|
+
/** Whether a change is an improvement or a decline. */
|
|
6285
|
+
export declare type TrendDirection = "positive" | "negative";
|
|
6286
|
+
|
|
6287
|
+
/**
|
|
6288
|
+
* A filled pill stating a change, green for positive and red for negative
|
|
6289
|
+
* (Figma `V2 Trend Pill`).
|
|
6290
|
+
*
|
|
6291
|
+
* Distinct from {@link ChartCard}'s `trendChip`, which is Figma's `V2 Trend`: an
|
|
6292
|
+
* unfilled arrow and label sitting beside a headline. Use this one where the
|
|
6293
|
+
* change needs to hold its own against surrounding content rather than trail a
|
|
6294
|
+
* number, such as inside a list row.
|
|
6295
|
+
*
|
|
6296
|
+
* @example
|
|
6297
|
+
* ```tsx
|
|
6298
|
+
* <TrendPill label="$240 vs Jun" trend="positive" />
|
|
6299
|
+
* ```
|
|
6300
|
+
*/
|
|
6301
|
+
export declare const TrendPill: React_2.ForwardRefExoticComponent<TrendPillProps & React_2.RefAttributes<HTMLSpanElement>>;
|
|
6302
|
+
|
|
6303
|
+
/** Props for {@link TrendPill}. */
|
|
6304
|
+
export declare interface TrendPillProps extends Omit<React_2.HTMLAttributes<HTMLSpanElement>, "children"> {
|
|
6305
|
+
/** The change itself, already formatted (e.g. "$240 vs Jun"). */
|
|
6306
|
+
label: React_2.ReactNode;
|
|
6307
|
+
/** Drives the colour and the leading glyph. */
|
|
6308
|
+
trend: TrendDirection;
|
|
6309
|
+
/**
|
|
6310
|
+
* Announced before {@link label} when `trend` is `"positive"`. Overridable
|
|
6311
|
+
* because the component cannot translate it. @default "Increase"
|
|
6312
|
+
*/
|
|
6313
|
+
increaseLabel?: string;
|
|
6314
|
+
/** As {@link increaseLabel}, for `"negative"`. @default "Decrease" */
|
|
6315
|
+
decreaseLabel?: string;
|
|
6316
|
+
}
|
|
6317
|
+
|
|
6011
6318
|
/**
|
|
6012
6319
|
* Trophy icon. Renders at sizes 16, 24, or 32 px with outlined and filled variants.
|
|
6013
6320
|
*
|
|
@@ -6207,10 +6514,24 @@ export declare type UserIconProps = BaseIconProps;
|
|
|
6207
6514
|
* A compact user row showing an avatar, display name (or nickname) and handle,
|
|
6208
6515
|
* with optional verified and AI-disclosure badges and online and muted indicators.
|
|
6209
6516
|
*
|
|
6517
|
+
* Pass {@link UserItemProps.trailing} to pin a value to the end of the row, the
|
|
6518
|
+
* shape most list rows need — top spenders, most active fans, a recent-activity
|
|
6519
|
+
* feed.
|
|
6520
|
+
*
|
|
6210
6521
|
* @example
|
|
6211
6522
|
* ```tsx
|
|
6212
6523
|
* <UserItem user={{ displayName: "Jane Doe", handle: "jane_doe" }} />
|
|
6213
6524
|
* ```
|
|
6525
|
+
*
|
|
6526
|
+
* @example A list row with a trailing value
|
|
6527
|
+
* ```tsx
|
|
6528
|
+
* <UserItem
|
|
6529
|
+
* user={user}
|
|
6530
|
+
* avatarSize={32}
|
|
6531
|
+
* showHandle={false}
|
|
6532
|
+
* trailing={<span className="typography-body-small-14px-semibold">$14,523.59</span>}
|
|
6533
|
+
* />
|
|
6534
|
+
* ```
|
|
6214
6535
|
*/
|
|
6215
6536
|
export declare const UserItem: React_2.ForwardRefExoticComponent<UserItemProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
6216
6537
|
|
|
@@ -6237,6 +6558,55 @@ export declare interface UserItemProps extends React_2.HTMLAttributes<HTMLDivEle
|
|
|
6237
6558
|
verified?: boolean;
|
|
6238
6559
|
/** Accessible label for the verified badge. @default "Verified" */
|
|
6239
6560
|
verifiedLabel?: string;
|
|
6561
|
+
/**
|
|
6562
|
+
* Content pinned to the end of the row — a value, count, timestamp or action.
|
|
6563
|
+
* It keeps its intrinsic width while the name block absorbs the remaining
|
|
6564
|
+
* space, so trailing content stays aligned down the rows of a list.
|
|
6565
|
+
*
|
|
6566
|
+
* Prefer {@link UserItemTrailing} over composing the lines yourself.
|
|
6567
|
+
*/
|
|
6568
|
+
trailing?: React_2.ReactNode;
|
|
6569
|
+
/**
|
|
6570
|
+
* Replace the display-name line with arbitrary content, for rows that read as
|
|
6571
|
+
* a sentence about the user rather than their name — an activity feed entry,
|
|
6572
|
+
* for instance. Badges do not apply to custom content.
|
|
6573
|
+
*/
|
|
6574
|
+
primary?: React_2.ReactNode;
|
|
6575
|
+
/**
|
|
6576
|
+
* A supporting line under the name, mirroring {@link UserItemTrailing}'s `meta`.
|
|
6577
|
+
* Both are block lines on the same 18px advance, so a row using `secondary` on
|
|
6578
|
+
* the left and `meta` on the right reads as two aligned tiers. Prefer it over
|
|
6579
|
+
* letting a long primary wrap, which mixes line heights and drifts out of step.
|
|
6580
|
+
*/
|
|
6581
|
+
secondary?: React_2.ReactNode;
|
|
6582
|
+
}
|
|
6583
|
+
|
|
6584
|
+
/**
|
|
6585
|
+
* The end-of-row block for a {@link UserItem}: a value with an optional
|
|
6586
|
+
* supporting line beneath it, both aligned to the right edge so figures line up
|
|
6587
|
+
* down a list.
|
|
6588
|
+
*
|
|
6589
|
+
* Pass it to {@link UserItem}'s `trailing` slot rather than composing the two
|
|
6590
|
+
* lines at each call site, so value and meta typography stay consistent
|
|
6591
|
+
* wherever a list row carries a figure.
|
|
6592
|
+
*
|
|
6593
|
+
* @example
|
|
6594
|
+
* ```tsx
|
|
6595
|
+
* <UserItem
|
|
6596
|
+
* user={user}
|
|
6597
|
+
* showHandle={false}
|
|
6598
|
+
* trailing={<UserItemTrailing value="$421.32" meta="7 hours ago" />}
|
|
6599
|
+
* />
|
|
6600
|
+
* ```
|
|
6601
|
+
*/
|
|
6602
|
+
export declare const UserItemTrailing: React_2.ForwardRefExoticComponent<UserItemTrailingProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
6603
|
+
|
|
6604
|
+
/** Props for {@link UserItemTrailing}. */
|
|
6605
|
+
export declare interface UserItemTrailingProps extends React_2.HTMLAttributes<HTMLDivElement> {
|
|
6606
|
+
/** The headline figure — an amount, a count, a percentage. */
|
|
6607
|
+
value: React_2.ReactNode;
|
|
6608
|
+
/** Optional supporting line under the value, such as a timestamp. */
|
|
6609
|
+
meta?: React_2.ReactNode;
|
|
6240
6610
|
}
|
|
6241
6611
|
|
|
6242
6612
|
/** Minimal user shape consumed by {@link UserItem}. */
|