@fanvue/ui 3.23.0 → 3.25.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 +115 -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/SegmentedControl/SegmentedControl.cjs +14 -4
- package/dist/cjs/components/SegmentedControl/SegmentedControl.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 +115 -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/SegmentedControl/SegmentedControl.mjs +15 -5
- package/dist/components/SegmentedControl/SegmentedControl.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 +406 -17
- 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 +14 -3
- 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.
|
|
@@ -4632,6 +4815,20 @@ export declare type SearchIconProps = BaseIconProps;
|
|
|
4632
4815
|
* aria-label="View"
|
|
4633
4816
|
* />
|
|
4634
4817
|
* ```
|
|
4818
|
+
*
|
|
4819
|
+
* @example Icon + label with the brand-green pill (e.g. the Home/Agent nav switch)
|
|
4820
|
+
* ```tsx
|
|
4821
|
+
* <SegmentedControl
|
|
4822
|
+
* appearance="brand"
|
|
4823
|
+
* options={[
|
|
4824
|
+
* { label: "Home", value: "home", icon: <HomeIcon size={16} /> },
|
|
4825
|
+
* { label: "Agent", value: "agent", icon: <AIIcon size={16} /> },
|
|
4826
|
+
* ]}
|
|
4827
|
+
* value={mode}
|
|
4828
|
+
* onChange={setMode}
|
|
4829
|
+
* aria-label="Navigation mode"
|
|
4830
|
+
* />
|
|
4831
|
+
* ```
|
|
4635
4832
|
*/
|
|
4636
4833
|
export declare const SegmentedControl: React_2.ForwardRefExoticComponent<SegmentedControlProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
4637
4834
|
|
|
@@ -4640,22 +4837,27 @@ export declare const SegmentedControl: React_2.ForwardRefExoticComponent<Segment
|
|
|
4640
4837
|
* - `"pill"`: the container has a muted background and the selected segment shows a filled pill (default).
|
|
4641
4838
|
* - `"plain"`: no container or selected-pill background; segments are bare content and selection is
|
|
4642
4839
|
* communicated by color alone. Designed for icon-only toggles (e.g. a list/grid view switch).
|
|
4840
|
+
* - `"brand"`: like `"pill"`, but segments render their `icon` alongside the visible `label` and the
|
|
4841
|
+
* selected segment uses the brand-green pill. Designed for prominent toggles such as the
|
|
4842
|
+
* Home/Agent navigation switch.
|
|
4643
4843
|
*/
|
|
4644
|
-
export declare type SegmentedControlAppearance = "pill" | "plain";
|
|
4844
|
+
export declare type SegmentedControlAppearance = "pill" | "plain" | "brand";
|
|
4645
4845
|
|
|
4646
4846
|
/** Describes one selectable segment. */
|
|
4647
4847
|
export declare interface SegmentedControlOption {
|
|
4648
4848
|
/**
|
|
4649
|
-
* Display label for the segment.
|
|
4650
|
-
* this value
|
|
4849
|
+
* Display label for the segment. In `pill`/`plain` appearances, when `icon` is provided the
|
|
4850
|
+
* segment renders icon-only and this value becomes its accessible name (applied as `aria-label`)
|
|
4851
|
+
* instead of visible text. In the `brand` appearance the label is always rendered as visible text
|
|
4852
|
+
* (alongside the icon when present).
|
|
4651
4853
|
*/
|
|
4652
4854
|
label: string;
|
|
4653
4855
|
/** Value identifier returned via `onChange`. */
|
|
4654
4856
|
value: string;
|
|
4655
4857
|
/**
|
|
4656
|
-
* Icon to render
|
|
4657
|
-
* `label` becomes required as its accessible name
|
|
4658
|
-
*
|
|
4858
|
+
* Icon to render for the segment. In `pill`/`plain` appearances the segment renders icon-only and
|
|
4859
|
+
* `label` becomes required as its accessible name (applied as `aria-label`, no visible text). In
|
|
4860
|
+
* the `brand` appearance the icon renders alongside the visible `label`.
|
|
4659
4861
|
*/
|
|
4660
4862
|
icon?: React_2.ReactNode;
|
|
4661
4863
|
}
|
|
@@ -5627,6 +5829,28 @@ export declare const TabsList: React_2.ForwardRefExoticComponent<Omit<TabsPrimit
|
|
|
5627
5829
|
alignLeft?: boolean | Breakpoint;
|
|
5628
5830
|
/** 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
5831
|
variant?: "fill" | "hug";
|
|
5832
|
+
/**
|
|
5833
|
+
* Drops the leading padding on the first tab so its label sits flush with the
|
|
5834
|
+
* list's left edge, lining it up with page content above or below the bar
|
|
5835
|
+
* (a heading, for instance) rather than being indented by the tab's own
|
|
5836
|
+
* padding. Spacing between tabs is unaffected. Pair with `alignLeft` or
|
|
5837
|
+
* `variant="hug"`. @default false
|
|
5838
|
+
*/
|
|
5839
|
+
flushLeft?: boolean;
|
|
5840
|
+
/**
|
|
5841
|
+
* Scrolls the row horizontally when the tabs don't fit, instead of letting
|
|
5842
|
+
* them compress. By default a tab may shrink until its label ellipsises,
|
|
5843
|
+
* which on a narrow viewport can truncate every label at once; here each tab
|
|
5844
|
+
* keeps its natural width and the overflow scrolls. The scrollbar itself is
|
|
5845
|
+
* hidden — the clipped tab at the edge is the affordance.
|
|
5846
|
+
*
|
|
5847
|
+
* Because the tabs are content-sized, they no longer spread to fill the row:
|
|
5848
|
+
* a set that does fit sits left-aligned, as with `alignLeft`.
|
|
5849
|
+
*
|
|
5850
|
+
* Horizontal orientation only: a vertical list already grows downwards.
|
|
5851
|
+
* @default false
|
|
5852
|
+
*/
|
|
5853
|
+
scrollable?: boolean;
|
|
5630
5854
|
} & React_2.RefAttributes<HTMLDivElement>>;
|
|
5631
5855
|
|
|
5632
5856
|
/** Props for the {@link TabsList} component. */
|
|
@@ -5642,6 +5866,28 @@ export declare type TabsListProps = React_2.ComponentPropsWithoutRef<typeof Tabs
|
|
|
5642
5866
|
alignLeft?: boolean | Breakpoint;
|
|
5643
5867
|
/** 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
5868
|
variant?: "fill" | "hug";
|
|
5869
|
+
/**
|
|
5870
|
+
* Drops the leading padding on the first tab so its label sits flush with the
|
|
5871
|
+
* list's left edge, lining it up with page content above or below the bar
|
|
5872
|
+
* (a heading, for instance) rather than being indented by the tab's own
|
|
5873
|
+
* padding. Spacing between tabs is unaffected. Pair with `alignLeft` or
|
|
5874
|
+
* `variant="hug"`. @default false
|
|
5875
|
+
*/
|
|
5876
|
+
flushLeft?: boolean;
|
|
5877
|
+
/**
|
|
5878
|
+
* Scrolls the row horizontally when the tabs don't fit, instead of letting
|
|
5879
|
+
* them compress. By default a tab may shrink until its label ellipsises,
|
|
5880
|
+
* which on a narrow viewport can truncate every label at once; here each tab
|
|
5881
|
+
* keeps its natural width and the overflow scrolls. The scrollbar itself is
|
|
5882
|
+
* hidden — the clipped tab at the edge is the affordance.
|
|
5883
|
+
*
|
|
5884
|
+
* Because the tabs are content-sized, they no longer spread to fill the row:
|
|
5885
|
+
* a set that does fit sits left-aligned, as with `alignLeft`.
|
|
5886
|
+
*
|
|
5887
|
+
* Horizontal orientation only: a vertical list already grows downwards.
|
|
5888
|
+
* @default false
|
|
5889
|
+
*/
|
|
5890
|
+
scrollable?: boolean;
|
|
5645
5891
|
};
|
|
5646
5892
|
|
|
5647
5893
|
/** Props for the {@link Tabs} root component. Extends Radix `Tabs.Root` props. */
|
|
@@ -5948,12 +6194,46 @@ export declare const Tooltip: React_2.FC<TooltipPrimitive.TooltipProps>;
|
|
|
5948
6194
|
|
|
5949
6195
|
export declare const TooltipContent: React_2.ForwardRefExoticComponent<TooltipContentProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
5950
6196
|
|
|
5951
|
-
export declare interface TooltipContentProps extends React_2.ComponentPropsWithoutRef<typeof TooltipPrimitive.Content> {
|
|
6197
|
+
export declare interface TooltipContentProps extends Omit<React_2.ComponentPropsWithoutRef<typeof TooltipPrimitive.Content>, "title"> {
|
|
5952
6198
|
/**
|
|
5953
6199
|
* Position of the tooltip relative to the trigger. Takes precedence over `side` and `align`.
|
|
5954
6200
|
* @default "top"
|
|
5955
6201
|
*/
|
|
5956
6202
|
placement?: TooltipPlacement;
|
|
6203
|
+
/**
|
|
6204
|
+
* Optional heading above the body, for the two-row tooltip: a bold label
|
|
6205
|
+
* naming the thing, then a plain-weight description of it. Without it the
|
|
6206
|
+
* tooltip is a single bold line.
|
|
6207
|
+
*/
|
|
6208
|
+
title?: React_2.ReactNode;
|
|
6209
|
+
}
|
|
6210
|
+
|
|
6211
|
+
/**
|
|
6212
|
+
* A text label that is itself the tooltip trigger, marked by a dashed
|
|
6213
|
+
* underline. Use this instead of pairing a label with a separate info glyph:
|
|
6214
|
+
* the visible text becomes the trigger's accessible name, and the row stays at
|
|
6215
|
+
* text height rather than being stretched by an icon button.
|
|
6216
|
+
*
|
|
6217
|
+
* The label is repeated as the tooltip's heading, so the tooltip reads as the
|
|
6218
|
+
* two-row block the design specifies — the term, then what it means.
|
|
6219
|
+
*
|
|
6220
|
+
* Tapping the label toggles the tooltip on touch devices, where there is no
|
|
6221
|
+
* hover to trigger it. Tapping elsewhere, scrolling, or opening another tooltip
|
|
6222
|
+
* dismisses it.
|
|
6223
|
+
*
|
|
6224
|
+
* @example
|
|
6225
|
+
* ```tsx
|
|
6226
|
+
* <TooltipLabel tooltip="Total earnings for the selected period.">Total Earnings</TooltipLabel>
|
|
6227
|
+
* ```
|
|
6228
|
+
*/
|
|
6229
|
+
export declare const TooltipLabel: React_2.ForwardRefExoticComponent<TooltipLabelProps & React_2.RefAttributes<HTMLButtonElement>>;
|
|
6230
|
+
|
|
6231
|
+
/** Props for {@link TooltipLabel}. */
|
|
6232
|
+
export declare interface TooltipLabelProps extends Omit<React_2.ComponentPropsWithoutRef<"button">, "title"> {
|
|
6233
|
+
/** Tooltip content. Pass a translated string for i18n. */
|
|
6234
|
+
tooltip: React_2.ReactNode;
|
|
6235
|
+
/** The label text, which doubles as the trigger. */
|
|
6236
|
+
children: React_2.ReactNode;
|
|
5957
6237
|
}
|
|
5958
6238
|
|
|
5959
6239
|
/** Position of the tooltip relative to its trigger, combining side and alignment (MUI-style). */
|
|
@@ -5966,8 +6246,20 @@ export declare interface TooltipProps extends React_2.ComponentPropsWithoutRef<t
|
|
|
5966
6246
|
defaultOpen?: boolean;
|
|
5967
6247
|
}
|
|
5968
6248
|
|
|
5969
|
-
/**
|
|
5970
|
-
|
|
6249
|
+
/**
|
|
6250
|
+
* Provides tooltip delay and skip-delay context. Wrap your app or a subtree.
|
|
6251
|
+
*
|
|
6252
|
+
* Defaults `delayDuration` to 200ms rather than inheriting Radix's 700ms, which
|
|
6253
|
+
* reads as unresponsive on the short hint labels this library uses tooltips for.
|
|
6254
|
+
* Pass `delayDuration` to override.
|
|
6255
|
+
*
|
|
6256
|
+
* Note that `TooltipLabel`, `ChartCard` and `SwitchField` each mount their own
|
|
6257
|
+
* provider internally, so they take this default but not an app-level override.
|
|
6258
|
+
*/
|
|
6259
|
+
export declare const TooltipProvider: {
|
|
6260
|
+
({ delayDuration, ...props }: TooltipProviderProps): JSX.Element;
|
|
6261
|
+
displayName: string;
|
|
6262
|
+
};
|
|
5971
6263
|
|
|
5972
6264
|
/** Props for the {@link TooltipProvider}. Wraps Radix `Tooltip.Provider`. */
|
|
5973
6265
|
export declare type TooltipProviderProps = React_2.ComponentPropsWithoutRef<typeof TooltipPrimitive.Provider>;
|
|
@@ -6008,6 +6300,40 @@ export declare const TrashIcon: React_2.ForwardRefExoticComponent<BaseIconProps
|
|
|
6008
6300
|
/** Props for {@link TrashIcon}. See {@link BaseIconProps} for the shared shape. */
|
|
6009
6301
|
export declare type TrashIconProps = BaseIconProps;
|
|
6010
6302
|
|
|
6303
|
+
/** Whether a change is an improvement or a decline. */
|
|
6304
|
+
export declare type TrendDirection = "positive" | "negative";
|
|
6305
|
+
|
|
6306
|
+
/**
|
|
6307
|
+
* A filled pill stating a change, green for positive and red for negative
|
|
6308
|
+
* (Figma `V2 Trend Pill`).
|
|
6309
|
+
*
|
|
6310
|
+
* Distinct from {@link ChartCard}'s `trendChip`, which is Figma's `V2 Trend`: an
|
|
6311
|
+
* unfilled arrow and label sitting beside a headline. Use this one where the
|
|
6312
|
+
* change needs to hold its own against surrounding content rather than trail a
|
|
6313
|
+
* number, such as inside a list row.
|
|
6314
|
+
*
|
|
6315
|
+
* @example
|
|
6316
|
+
* ```tsx
|
|
6317
|
+
* <TrendPill label="$240 vs Jun" trend="positive" />
|
|
6318
|
+
* ```
|
|
6319
|
+
*/
|
|
6320
|
+
export declare const TrendPill: React_2.ForwardRefExoticComponent<TrendPillProps & React_2.RefAttributes<HTMLSpanElement>>;
|
|
6321
|
+
|
|
6322
|
+
/** Props for {@link TrendPill}. */
|
|
6323
|
+
export declare interface TrendPillProps extends Omit<React_2.HTMLAttributes<HTMLSpanElement>, "children"> {
|
|
6324
|
+
/** The change itself, already formatted (e.g. "$240 vs Jun"). */
|
|
6325
|
+
label: React_2.ReactNode;
|
|
6326
|
+
/** Drives the colour and the leading glyph. */
|
|
6327
|
+
trend: TrendDirection;
|
|
6328
|
+
/**
|
|
6329
|
+
* Announced before {@link label} when `trend` is `"positive"`. Overridable
|
|
6330
|
+
* because the component cannot translate it. @default "Increase"
|
|
6331
|
+
*/
|
|
6332
|
+
increaseLabel?: string;
|
|
6333
|
+
/** As {@link increaseLabel}, for `"negative"`. @default "Decrease" */
|
|
6334
|
+
decreaseLabel?: string;
|
|
6335
|
+
}
|
|
6336
|
+
|
|
6011
6337
|
/**
|
|
6012
6338
|
* Trophy icon. Renders at sizes 16, 24, or 32 px with outlined and filled variants.
|
|
6013
6339
|
*
|
|
@@ -6207,10 +6533,24 @@ export declare type UserIconProps = BaseIconProps;
|
|
|
6207
6533
|
* A compact user row showing an avatar, display name (or nickname) and handle,
|
|
6208
6534
|
* with optional verified and AI-disclosure badges and online and muted indicators.
|
|
6209
6535
|
*
|
|
6536
|
+
* Pass {@link UserItemProps.trailing} to pin a value to the end of the row, the
|
|
6537
|
+
* shape most list rows need — top spenders, most active fans, a recent-activity
|
|
6538
|
+
* feed.
|
|
6539
|
+
*
|
|
6210
6540
|
* @example
|
|
6211
6541
|
* ```tsx
|
|
6212
6542
|
* <UserItem user={{ displayName: "Jane Doe", handle: "jane_doe" }} />
|
|
6213
6543
|
* ```
|
|
6544
|
+
*
|
|
6545
|
+
* @example A list row with a trailing value
|
|
6546
|
+
* ```tsx
|
|
6547
|
+
* <UserItem
|
|
6548
|
+
* user={user}
|
|
6549
|
+
* avatarSize={32}
|
|
6550
|
+
* showHandle={false}
|
|
6551
|
+
* trailing={<span className="typography-body-small-14px-semibold">$14,523.59</span>}
|
|
6552
|
+
* />
|
|
6553
|
+
* ```
|
|
6214
6554
|
*/
|
|
6215
6555
|
export declare const UserItem: React_2.ForwardRefExoticComponent<UserItemProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
6216
6556
|
|
|
@@ -6237,6 +6577,55 @@ export declare interface UserItemProps extends React_2.HTMLAttributes<HTMLDivEle
|
|
|
6237
6577
|
verified?: boolean;
|
|
6238
6578
|
/** Accessible label for the verified badge. @default "Verified" */
|
|
6239
6579
|
verifiedLabel?: string;
|
|
6580
|
+
/**
|
|
6581
|
+
* Content pinned to the end of the row — a value, count, timestamp or action.
|
|
6582
|
+
* It keeps its intrinsic width while the name block absorbs the remaining
|
|
6583
|
+
* space, so trailing content stays aligned down the rows of a list.
|
|
6584
|
+
*
|
|
6585
|
+
* Prefer {@link UserItemTrailing} over composing the lines yourself.
|
|
6586
|
+
*/
|
|
6587
|
+
trailing?: React_2.ReactNode;
|
|
6588
|
+
/**
|
|
6589
|
+
* Replace the display-name line with arbitrary content, for rows that read as
|
|
6590
|
+
* a sentence about the user rather than their name — an activity feed entry,
|
|
6591
|
+
* for instance. Badges do not apply to custom content.
|
|
6592
|
+
*/
|
|
6593
|
+
primary?: React_2.ReactNode;
|
|
6594
|
+
/**
|
|
6595
|
+
* A supporting line under the name, mirroring {@link UserItemTrailing}'s `meta`.
|
|
6596
|
+
* Both are block lines on the same 18px advance, so a row using `secondary` on
|
|
6597
|
+
* the left and `meta` on the right reads as two aligned tiers. Prefer it over
|
|
6598
|
+
* letting a long primary wrap, which mixes line heights and drifts out of step.
|
|
6599
|
+
*/
|
|
6600
|
+
secondary?: React_2.ReactNode;
|
|
6601
|
+
}
|
|
6602
|
+
|
|
6603
|
+
/**
|
|
6604
|
+
* The end-of-row block for a {@link UserItem}: a value with an optional
|
|
6605
|
+
* supporting line beneath it, both aligned to the right edge so figures line up
|
|
6606
|
+
* down a list.
|
|
6607
|
+
*
|
|
6608
|
+
* Pass it to {@link UserItem}'s `trailing` slot rather than composing the two
|
|
6609
|
+
* lines at each call site, so value and meta typography stay consistent
|
|
6610
|
+
* wherever a list row carries a figure.
|
|
6611
|
+
*
|
|
6612
|
+
* @example
|
|
6613
|
+
* ```tsx
|
|
6614
|
+
* <UserItem
|
|
6615
|
+
* user={user}
|
|
6616
|
+
* showHandle={false}
|
|
6617
|
+
* trailing={<UserItemTrailing value="$421.32" meta="7 hours ago" />}
|
|
6618
|
+
* />
|
|
6619
|
+
* ```
|
|
6620
|
+
*/
|
|
6621
|
+
export declare const UserItemTrailing: React_2.ForwardRefExoticComponent<UserItemTrailingProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
6622
|
+
|
|
6623
|
+
/** Props for {@link UserItemTrailing}. */
|
|
6624
|
+
export declare interface UserItemTrailingProps extends React_2.HTMLAttributes<HTMLDivElement> {
|
|
6625
|
+
/** The headline figure — an amount, a count, a percentage. */
|
|
6626
|
+
value: React_2.ReactNode;
|
|
6627
|
+
/** Optional supporting line under the value, such as a timestamp. */
|
|
6628
|
+
meta?: React_2.ReactNode;
|
|
6240
6629
|
}
|
|
6241
6630
|
|
|
6242
6631
|
/** Minimal user shape consumed by {@link UserItem}. */
|