@mediaradar/design-components 0.53.0 → 0.54.1

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/index.d.cts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as react from 'react';
2
- import { ReactNode, RefObject, ButtonHTMLAttributes, Ref, ReactElement, MouseEventHandler, InputHTMLAttributes, ComponentType, HTMLAttributes } from 'react';
2
+ import { ReactNode, HTMLAttributes, RefObject, ButtonHTMLAttributes, Ref, ReactElement, MouseEventHandler, InputHTMLAttributes, ComponentType } from 'react';
3
3
  import * as class_variance_authority_types from 'class-variance-authority/types';
4
4
  import { VariantProps } from 'class-variance-authority';
5
5
 
@@ -1048,7 +1048,7 @@ declare function SelectFilter({ caption, value, options, onChange, align, fullWi
1048
1048
  * shell mr-clientapps-insights-studio's own `CardShell` used to hand-roll.
1049
1049
  * @tokens rounded-card, border-border-default, bg-surface, shadow-raised,
1050
1050
  * hover:shadow-overlay, p-card-padding, text-style-card-title, text-xs,
1051
- * text-text-tertiary
1051
+ * text-text-tertiary, text-panel-title, text-text-primary
1052
1052
  * @behavior Without `title`, children render directly as the card's only
1053
1053
  * content -- no padding is applied, so callers that need a full-bleed image
1054
1054
  * or gradient flush against the card edge (the common case in
@@ -1066,7 +1066,12 @@ declare function SelectFilter({ caption, value, options, onChange, align, fullWi
1066
1066
  * shadow on hover signals it responds to the cursor.
1067
1067
  * @variant static - Set `staticCard`. Non-clickable content -- no hover
1068
1068
  * treatment.
1069
+ * @variant chart - Set `variant="chart"` for a chart or data panel on a
1070
+ * dashboard: 15px title (`text-panel-title`), border only (no shadow, no
1071
+ * hover). Add `info` for the tip beside the title and put a toggle in `action`.
1069
1072
  * @use to group related content on a surface: a stat tile, a chart, a content panel.
1073
+ * @use `variant="chart"` for every chart or data panel on a dashboard, so
1074
+ * they all share one title size and edge.
1070
1075
  * @use `staticCard` on any card that is only read; the hover lift means the
1071
1076
  * whole card is a link.
1072
1077
  * @avoid setting a width on the card -- the parent grid or row decides it.
@@ -1082,6 +1087,10 @@ declare function SelectFilter({ caption, value, options, onChange, align, fullWi
1082
1087
  * <Card title="Spend trend" subtitle="Last 90 days" titleAs="h2" action={<Link to="/spend">View all</Link>}>
1083
1088
  * <SpendChart />
1084
1089
  * </Card>
1090
+ * <Card variant="chart" title="Share of spend over time" info="Each member's share of the set's spend, month by month."
1091
+ * subtitle="Monthly, for the selected months" action={<SegmentedControl ... />}>
1092
+ * <LineChart ... />
1093
+ * </Card>
1085
1094
  * ```
1086
1095
  */
1087
1096
  interface CardProps extends Omit<React.HTMLAttributes<HTMLElement>, "title">, CommonProps {
@@ -1102,6 +1111,13 @@ interface CardProps extends Omit<React.HTMLAttributes<HTMLElement>, "title">, Co
1102
1111
  titleAs?: "h2" | "h3" | "h4";
1103
1112
  /** Shown under `title` in a muted tertiary color. Ignored without `title`. */
1104
1113
  subtitle?: string;
1114
+ /** Explains the card: an info tip beside `title`. Ignored without `title`. */
1115
+ info?: string;
1116
+ /**
1117
+ * `chart` for a chart or data panel on a dashboard: a 15px title and a
1118
+ * border only, with no shadow or hover (it's read, not clicked).
1119
+ */
1120
+ variant?: "default" | "chart";
1105
1121
  /** Trailing header content, e.g. a "View all" link. Ignored without `title`. */
1106
1122
  action?: ReactNode;
1107
1123
  /** Card body. Rendered edge to edge without `title`; inside the standard padding with it. */
@@ -1109,6 +1125,176 @@ interface CardProps extends Omit<React.HTMLAttributes<HTMLElement>, "title">, Co
1109
1125
  }
1110
1126
  declare const Card: react.ForwardRefExoticComponent<CardProps & react.RefAttributes<HTMLElement>>;
1111
1127
 
1128
+ /**
1129
+ * @pattern StatStrip
1130
+ * @status stable
1131
+ * @since 0.54.0
1132
+ * @description The headline figures at the top of a dashboard, side by side in
1133
+ * one slim strip: share of spend, spend rank, spend. `StatStrip` is the strip;
1134
+ * each `StatTile` is one figure with its label, the change beside it, and an
1135
+ * optional quieter line under it. The strip is context for the charts below,
1136
+ * not the headline itself, so it stays one row high.
1137
+ * @variant StatTile: plain | icon (before the label) | info (tip after the label) | unit ("of 12") | change (a Delta) | note (second line) | children (a "compared with" row)
1138
+ * @tokens rounded-card, border-border-default, bg-surface, divide-border-default, px-5, py-3, text-micro, text-xl, leading-tight, tracking-tight, tracking-normal, text-dense, text-card-title, text-xs, text-text-primary, text-text-secondary, text-text-tertiary, text-brand-primaryAction
1139
+ * @dependencies InfoTip, Delta (passed in `change`)
1140
+ * @a11y The strip is a group named by `aria-label` ("Your position"). Each
1141
+ * tile reads in order: label, figure, change, note. The icon is decorative
1142
+ * and hidden; the label names the figure. The change is a `Delta`, which
1143
+ * always shows its sign, so direction never rests on colour alone. The info
1144
+ * tip is a button with its own label ("About share of spend").
1145
+ * @behavior Tiles share the width equally and are split by a thin line; below
1146
+ * the small breakpoint they stack, split the same way. Figures use tabular
1147
+ * numbers so they don't jump when they change.
1148
+ * @use for the two to four headline figures above a dashboard's charts.
1149
+ * @use `change` with a `Delta`, so every up/down change looks the same.
1150
+ * @avoid more than four tiles: past that the figures stop being headlines.
1151
+ * @avoid colouring the figure itself: only the change is green or red.
1152
+ * @usage
1153
+ * ```tsx
1154
+ * <StatStrip aria-label="Your position">
1155
+ * <StatTile label="Share of spend" icon={<PieChart size={13} />} info="Share of the set's total spend."
1156
+ * value="18.4%" change={<Delta value={1.2} suffix="pts" period="vs prior" />} />
1157
+ * <StatTile label="Spend rank" value="#3" unit="of 12" note="#9 of 18 in Luxury auto" />
1158
+ * <StatTile label="Spend" value="$4.2M" change={<Delta value={6.5} period="vs prior" />} note="Jan–Jun 2026" />
1159
+ * </StatStrip>
1160
+ * ```
1161
+ */
1162
+ interface StatStripProps extends HTMLAttributes<HTMLDivElement>, CommonProps {
1163
+ }
1164
+ declare const StatStrip: react.ForwardRefExoticComponent<StatStripProps & react.RefAttributes<HTMLDivElement>>;
1165
+ interface StatTileProps extends CommonProps {
1166
+ /** What the figure is ("Share of spend"). Shown small and uppercase. */
1167
+ label: string;
1168
+ /** The figure itself ("18.4%", "#3", "$4.2M"). */
1169
+ value: ReactNode;
1170
+ /** Small grey text after the figure ("of 12"). */
1171
+ unit?: ReactNode;
1172
+ /** The change beside the figure: pass a `Delta`. */
1173
+ change?: ReactNode;
1174
+ /** A quieter line under the figure (a category rank, the months). */
1175
+ note?: ReactNode;
1176
+ /** Icon before the label, about 13px. Decoration only. */
1177
+ icon?: ReactNode;
1178
+ /** Explains the figure: an info tip after the label. */
1179
+ info?: string;
1180
+ /** Extra rows under the note, e.g. the figure for a brand it's compared with. */
1181
+ children?: ReactNode;
1182
+ }
1183
+ declare function StatTile({ label, value, unit, change, note, icon, info, children, className, testIdPrefix }: StatTileProps): react.JSX.Element;
1184
+
1185
+ /**
1186
+ * @pattern ChartLegend
1187
+ * @status stable
1188
+ * @since 0.54.0
1189
+ * @description The key under or beside a chart: a small mark in each
1190
+ * series' colour and its name. `ChartLegend` is the row; each `LegendItem`
1191
+ * is one entry. The mark matches the chart: a line for a line chart, a
1192
+ * square for bars and areas, a dot for pies and points, and a dashed line
1193
+ * for preliminary data. Your own brand gets a bolder mark, darker text and
1194
+ * "(you)".
1195
+ * @variant LegendItem: dot | square | line | dashed | you
1196
+ * @tokens text-xs, text-text-tertiary, text-text-secondary, bg-text-tertiary, border-text-tertiary, rounded-pill, rounded-xs, gap-x-4, gap-y-1, gap-1.5
1197
+ * @a11y The legend is a list (`ul`), so screen readers announce how many
1198
+ * entries it has. The marks are decorative and hidden: the name says which
1199
+ * series it is, and "(you)" is real text, not a colour.
1200
+ * @behavior Entries wrap onto more lines when there isn't room. Without a
1201
+ * `color`, the mark is the muted grey used for "everyone else".
1202
+ * @use under every chart with more than one series, or with a dashed
1203
+ * preliminary stretch.
1204
+ * @use the same `mark` the chart draws, so the key looks like the chart.
1205
+ * @avoid a legend for a single series: the card title already names it.
1206
+ * @avoid colour as the only difference between entries that matter: name them.
1207
+ * @usage
1208
+ * ```tsx
1209
+ * <ChartLegend>
1210
+ * <LegendItem mark="line" color="var(--mr-color-brand-primary-action)" you>BMW</LegendItem>
1211
+ * <LegendItem mark="line">11 others in the set</LegendItem>
1212
+ * <LegendItem mark="dashed">Preliminary</LegendItem>
1213
+ * </ChartLegend>
1214
+ * ```
1215
+ */
1216
+ interface ChartLegendProps extends HTMLAttributes<HTMLUListElement>, CommonProps {
1217
+ }
1218
+ declare const ChartLegend: react.ForwardRefExoticComponent<ChartLegendProps & react.RefAttributes<HTMLUListElement>>;
1219
+ type LegendMark = "dot" | "square" | "line" | "dashed";
1220
+ interface LegendItemProps extends CommonProps {
1221
+ /** The mark: match what the chart draws. Default `dot`. */
1222
+ mark?: LegendMark;
1223
+ /** The series colour, any CSS colour or variable. Omit for the muted grey. */
1224
+ color?: string;
1225
+ /** Your own brand: bolder mark, darker text, and "(you)" after the name. */
1226
+ you?: boolean;
1227
+ /** The series name. */
1228
+ children: ReactNode;
1229
+ }
1230
+ declare function LegendItem({ mark, color, you, children, className, testIdPrefix }: LegendItemProps): react.JSX.Element;
1231
+
1232
+ /**
1233
+ * @pattern BarList
1234
+ * @status stable
1235
+ * @since 0.54.0
1236
+ * @description Rows of a name, its figures and a horizontal bar under them:
1237
+ * a brand's spend by channel, the set's top markets. Two forms from one part.
1238
+ * Full: give `columns` and each row's `values` line up under those headings
1239
+ * (Spend, Share), with an optional benchmark tick on the bar. Compact: no
1240
+ * `columns`, one value per row. Bars are 8px, and the biggest row fills the
1241
+ * width so small differences are easy to see.
1242
+ * @variant form: full (columns + values) | compact (one value)
1243
+ * @variant row: plain | note (grey text after the name) | color (series colour) | tick (benchmark mark)
1244
+ * @tokens text-dense, text-xs, text-micro, font-semibold, text-text-primary, text-text-secondary, text-text-tertiary, bg-subtle, bg-brand-primaryAction, bg-text-primary, rounded-pill, gap-2, py-2, w-16, w-13
1245
+ * @a11y The rows are a list, so screen readers say how many there are. Each
1246
+ * figure is read with its column heading ("Spend: $1.8M"); the visible
1247
+ * heading row is hidden from them to avoid saying it twice. Bars and the
1248
+ * tick are decorative: the figures carry the numbers, and `tickLabel` gives
1249
+ * the tick's value in words ("Set average 35%").
1250
+ * @behavior Bar length is each row's `bar` against the largest `bar` or
1251
+ * `tick` in the list. Long names truncate; the figures never wrap.
1252
+ * @use for a ranked breakdown where reading the figure and seeing the
1253
+ * proportion both matter.
1254
+ * @use `tick` for a benchmark (the set or category average) on the same scale.
1255
+ * @avoid when the order means nothing: sort rows by their bar, biggest first.
1256
+ * @avoid for more than about ten rows: show the top ones and link to the rest.
1257
+ * @usage
1258
+ * ```tsx
1259
+ * <BarList
1260
+ * aria-label="Spend by channel"
1261
+ * columns={["Spend", "Share"]}
1262
+ * rows={[
1263
+ * { key: "tv", label: "TV", values: ["$1.8M", "42%"], bar: 42, tick: 35, tickLabel: "Set average 35%", color: "var(--mr-color-media-tv)" },
1264
+ * { key: "digital", label: "Digital", values: ["$1.3M", "31%"], bar: 31, tick: 38, tickLabel: "Set average 38%" },
1265
+ * ]}
1266
+ * />
1267
+ * <BarList aria-label="Top markets" rows={[{ key: "ny", label: "New York", values: ["24%"], bar: 24 }]} />
1268
+ * ```
1269
+ */
1270
+ interface BarListRow {
1271
+ key: string;
1272
+ /** The name ("TV", "New York"). */
1273
+ label: ReactNode;
1274
+ /** Grey text after the name, e.g. a publisher's channel. */
1275
+ note?: string;
1276
+ /** The figures, in `columns` order. The first is bold in the full form. */
1277
+ values?: ReactNode[];
1278
+ /** The bar's length, in any unit shared by the list (usually a share). */
1279
+ bar: number;
1280
+ /** A benchmark on the same scale, drawn as a tick on the bar. */
1281
+ tick?: number;
1282
+ /** The tick in words, for screen readers ("Set average 35%"). */
1283
+ tickLabel?: string;
1284
+ /** Bar colour, any CSS colour or variable. Default is the brand colour. */
1285
+ color?: string;
1286
+ }
1287
+ interface BarListProps extends CommonProps {
1288
+ rows: BarListRow[];
1289
+ /** Column headings for the full form ("Spend", "Share"). Omit for the compact form. */
1290
+ columns?: string[];
1291
+ /** Names the list for screen readers ("Spend by channel"). */
1292
+ "aria-label"?: string;
1293
+ /** Shown instead when there are no rows. */
1294
+ empty?: ReactNode;
1295
+ }
1296
+ declare function BarList({ rows, columns, empty, className, testIdPrefix, "aria-label": ariaLabel }: BarListProps): react.JSX.Element | null;
1297
+
1112
1298
  /**
1113
1299
  * The one "no results" message, shared across every filtered table/list that
1114
1300
  * can end up empty for the same two reasons -- see the component doc below
@@ -2941,13 +3127,17 @@ interface ModalProps extends CommonProps {
2941
3127
  * @variant lg - 880px. A table, a long list, a preview.
2942
3128
  * @variant xl - 1200px. A full workspace: a column picker, a detail view with
2943
3129
  * its own tabs or panes, a grid.
2944
- * @tokens bg-scrim, z-modal, rounded-card, border-border-default, bg-surface,
3130
+ * @tokens bg-scrim, z-modal, transition-opacity, transition-transform,
3131
+ * duration-(--mr-motion-duration-interactive), ease-interactive,
3132
+ * motion-reduce:transition-none, rounded-card, border-border-default, bg-surface,
2945
3133
  * shadow-overlay, text-base, font-semibold, text-text-primary, text-sm,
2946
3134
  * text-text-secondary, text-text-tertiary, hover:bg-subtle,
2947
3135
  * hover:text-text-primary, rounded-control, border-t,
2948
3136
  * focus-visible:outline-border-focus
2949
3137
  * @dependencies lucide-react, react-dom
2950
- * @behavior Portals to <body>. Escape, a click on the background and the ×
3138
+ * @behavior Portals to <body>. Fades in over 200ms while the panel settles
3139
+ * from 98% to full size, and fades back out before it unmounts, as Drawer;
3140
+ * with reduced motion it appears and goes without moving. Escape, a click on the background and the ×
2951
3141
  * all call `onClose`. Focus moves to the first field (else the first footer
2952
3142
  * button) on open, Tab stays inside
2953
3143
  * it, and focus goes back to whatever opened it on close. The page behind
@@ -3763,4 +3953,4 @@ declare function MenuLabel({ className, testIdPrefix, children }: CommonProps &
3763
3953
  /** A line between groups of rows. */
3764
3954
  declare function MenuSeparator({ className, testIdPrefix }: CommonProps): react.JSX.Element;
3765
3955
 
3766
- export { AISpark, type AISparkProps, AdvertiserNoResults, type AdvertiserNoResultsProps, AdvertiserQuickFilter, type AdvertiserQuickFilterProps, AdvertiserSearchPrompt, type AdvertiserSearchPromptProps, AllFiltersButton, type AllFiltersButtonProps, Badge, type BadgeKind, type BadgeProps, type BadgeTone, BarChartPlaceholder, type BarChartPlaceholderProps, Button, type ButtonProps, Card, type CardProps, CheckBox, CheckBoxBox, type CheckBoxBoxProps, type CheckBoxProps, ChipContent, type ChipContentProps, type ChipVariant, type CommonProps, CopyButton, type CopyButtonProps, DEFAULT_SEARCH_MATCH, DataScopeFilter, type DataScopeFilterProps, DataTable, type DataTableColumn, type DataTableColumnWidth, type DataTableDensity, type DataTableProps, type DateGranularity, DateRangeFilter, type DateRangeFilterProps, DateRangePicker, type DateRangePickerProps, Delta, type DeltaProps, Drawer, type DrawerProps, type DrawerSize, EmptyState, type EmptyStateProps, type EmptyStateSize, FilterChipBar, type FilterChipBarProps, FilterDrawer, type FilterDrawerProps, type FilterDrawerSection, FilterDropdownFooter, type FilterDropdownFooterProps, Freshness, type FreshnessLevel, type FreshnessProps, InfoTip, type InfoTipProps, InlineMessage, type InlineMessageProps, type InlineMessageTone, LineChartPlaceholder, type LineChartPlaceholderProps, MediaLabel, type MediaLabelProps, type MediaType, Menu, MenuItem, type MenuItemProps, MenuLabel, type MenuProps, MenuSeparator, Modal, type ModalProps, type ModalSize, MultiSelectFilter, type MultiSelectFilterProps, type MultiSelectGroup, NO_RESULTS_BODY, NO_RESULTS_TITLE, NameListModal, type NameListModalProps, type NoResultsAction, NoResultsEmptyState, type NoResultsEmptyStateProps, PRIMARY_ACTION_CLASS, PageHeader, type PageHeaderProps, Pager, type PagerProps, type PickerColumn, type PickerFilter, type PickerRow, PieChartPlaceholder, type PieChartPlaceholderProps, type PubBreak, PublisherBreakdownList, type PublisherBreakdownListProps, QUIET_ACTION_CLASS, SearchBar, type SearchBarProps, type SearchBarSize, type SearchBarVariant, type SearchMatchMode, type SearchMatchValue, type SearchScope, SectionHeading, type SectionHeadingProps, SectionRail, type SectionRailProps, SegmentedControl, type SegmentedControlProps, type SegmentedControlSize, type SegmentedOption, SelectAllVisible, type SelectAllVisibleProps, SelectFilter, type SelectFilterProps, SelectedSection, type SelectedSectionProps, SelectionPicker, type SelectionPickerAccountList, type SelectionPickerProps, SortButton, type SortButtonProps, type SortDir, type SortState, StackedColumnPlaceholder, type StackedColumnPlaceholderProps, SuggestionChip, type SuggestionChipProps, type SummaryGroup, type SummaryGroupItemValue, type TabItem, TablePagination, type TablePaginationProps, Tabs, type TabsProps, Tag, type TagProps, TextField, type TextFieldProps, type TextFieldSize, Toast, type ToastProps, type ToastTone, Toggle, ToggleChip, type ToggleChipProps, type ToggleProps, Tooltip, type TooltipProps, WorkspaceAvatar, type WorkspaceAvatarProps, WorkspaceSelectedCard, type WorkspaceSelectedCardProps, ariaSortFor, buttonVariants, chipTriggerClass, cycleSort, noResultsBody, resolveRange, sortProp };
3956
+ export { AISpark, type AISparkProps, AdvertiserNoResults, type AdvertiserNoResultsProps, AdvertiserQuickFilter, type AdvertiserQuickFilterProps, AdvertiserSearchPrompt, type AdvertiserSearchPromptProps, AllFiltersButton, type AllFiltersButtonProps, Badge, type BadgeKind, type BadgeProps, type BadgeTone, BarChartPlaceholder, type BarChartPlaceholderProps, BarList, type BarListProps, type BarListRow, Button, type ButtonProps, Card, type CardProps, ChartLegend, type ChartLegendProps, CheckBox, CheckBoxBox, type CheckBoxBoxProps, type CheckBoxProps, ChipContent, type ChipContentProps, type ChipVariant, type CommonProps, CopyButton, type CopyButtonProps, DEFAULT_SEARCH_MATCH, DataScopeFilter, type DataScopeFilterProps, DataTable, type DataTableColumn, type DataTableColumnWidth, type DataTableDensity, type DataTableProps, type DateGranularity, DateRangeFilter, type DateRangeFilterProps, DateRangePicker, type DateRangePickerProps, Delta, type DeltaProps, Drawer, type DrawerProps, type DrawerSize, EmptyState, type EmptyStateProps, type EmptyStateSize, FilterChipBar, type FilterChipBarProps, FilterDrawer, type FilterDrawerProps, type FilterDrawerSection, FilterDropdownFooter, type FilterDropdownFooterProps, Freshness, type FreshnessLevel, type FreshnessProps, InfoTip, type InfoTipProps, InlineMessage, type InlineMessageProps, type InlineMessageTone, LegendItem, type LegendItemProps, type LegendMark, LineChartPlaceholder, type LineChartPlaceholderProps, MediaLabel, type MediaLabelProps, type MediaType, Menu, MenuItem, type MenuItemProps, MenuLabel, type MenuProps, MenuSeparator, Modal, type ModalProps, type ModalSize, MultiSelectFilter, type MultiSelectFilterProps, type MultiSelectGroup, NO_RESULTS_BODY, NO_RESULTS_TITLE, NameListModal, type NameListModalProps, type NoResultsAction, NoResultsEmptyState, type NoResultsEmptyStateProps, PRIMARY_ACTION_CLASS, PageHeader, type PageHeaderProps, Pager, type PagerProps, type PickerColumn, type PickerFilter, type PickerRow, PieChartPlaceholder, type PieChartPlaceholderProps, type PubBreak, PublisherBreakdownList, type PublisherBreakdownListProps, QUIET_ACTION_CLASS, SearchBar, type SearchBarProps, type SearchBarSize, type SearchBarVariant, type SearchMatchMode, type SearchMatchValue, type SearchScope, SectionHeading, type SectionHeadingProps, SectionRail, type SectionRailProps, SegmentedControl, type SegmentedControlProps, type SegmentedControlSize, type SegmentedOption, SelectAllVisible, type SelectAllVisibleProps, SelectFilter, type SelectFilterProps, SelectedSection, type SelectedSectionProps, SelectionPicker, type SelectionPickerAccountList, type SelectionPickerProps, SortButton, type SortButtonProps, type SortDir, type SortState, StackedColumnPlaceholder, type StackedColumnPlaceholderProps, StatStrip, type StatStripProps, StatTile, type StatTileProps, SuggestionChip, type SuggestionChipProps, type SummaryGroup, type SummaryGroupItemValue, type TabItem, TablePagination, type TablePaginationProps, Tabs, type TabsProps, Tag, type TagProps, TextField, type TextFieldProps, type TextFieldSize, Toast, type ToastProps, type ToastTone, Toggle, ToggleChip, type ToggleChipProps, type ToggleProps, Tooltip, type TooltipProps, WorkspaceAvatar, type WorkspaceAvatarProps, WorkspaceSelectedCard, type WorkspaceSelectedCardProps, ariaSortFor, buttonVariants, chipTriggerClass, cycleSort, noResultsBody, resolveRange, sortProp };
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as react from 'react';
2
- import { ReactNode, RefObject, ButtonHTMLAttributes, Ref, ReactElement, MouseEventHandler, InputHTMLAttributes, ComponentType, HTMLAttributes } from 'react';
2
+ import { ReactNode, HTMLAttributes, RefObject, ButtonHTMLAttributes, Ref, ReactElement, MouseEventHandler, InputHTMLAttributes, ComponentType } from 'react';
3
3
  import * as class_variance_authority_types from 'class-variance-authority/types';
4
4
  import { VariantProps } from 'class-variance-authority';
5
5
 
@@ -1048,7 +1048,7 @@ declare function SelectFilter({ caption, value, options, onChange, align, fullWi
1048
1048
  * shell mr-clientapps-insights-studio's own `CardShell` used to hand-roll.
1049
1049
  * @tokens rounded-card, border-border-default, bg-surface, shadow-raised,
1050
1050
  * hover:shadow-overlay, p-card-padding, text-style-card-title, text-xs,
1051
- * text-text-tertiary
1051
+ * text-text-tertiary, text-panel-title, text-text-primary
1052
1052
  * @behavior Without `title`, children render directly as the card's only
1053
1053
  * content -- no padding is applied, so callers that need a full-bleed image
1054
1054
  * or gradient flush against the card edge (the common case in
@@ -1066,7 +1066,12 @@ declare function SelectFilter({ caption, value, options, onChange, align, fullWi
1066
1066
  * shadow on hover signals it responds to the cursor.
1067
1067
  * @variant static - Set `staticCard`. Non-clickable content -- no hover
1068
1068
  * treatment.
1069
+ * @variant chart - Set `variant="chart"` for a chart or data panel on a
1070
+ * dashboard: 15px title (`text-panel-title`), border only (no shadow, no
1071
+ * hover). Add `info` for the tip beside the title and put a toggle in `action`.
1069
1072
  * @use to group related content on a surface: a stat tile, a chart, a content panel.
1073
+ * @use `variant="chart"` for every chart or data panel on a dashboard, so
1074
+ * they all share one title size and edge.
1070
1075
  * @use `staticCard` on any card that is only read; the hover lift means the
1071
1076
  * whole card is a link.
1072
1077
  * @avoid setting a width on the card -- the parent grid or row decides it.
@@ -1082,6 +1087,10 @@ declare function SelectFilter({ caption, value, options, onChange, align, fullWi
1082
1087
  * <Card title="Spend trend" subtitle="Last 90 days" titleAs="h2" action={<Link to="/spend">View all</Link>}>
1083
1088
  * <SpendChart />
1084
1089
  * </Card>
1090
+ * <Card variant="chart" title="Share of spend over time" info="Each member's share of the set's spend, month by month."
1091
+ * subtitle="Monthly, for the selected months" action={<SegmentedControl ... />}>
1092
+ * <LineChart ... />
1093
+ * </Card>
1085
1094
  * ```
1086
1095
  */
1087
1096
  interface CardProps extends Omit<React.HTMLAttributes<HTMLElement>, "title">, CommonProps {
@@ -1102,6 +1111,13 @@ interface CardProps extends Omit<React.HTMLAttributes<HTMLElement>, "title">, Co
1102
1111
  titleAs?: "h2" | "h3" | "h4";
1103
1112
  /** Shown under `title` in a muted tertiary color. Ignored without `title`. */
1104
1113
  subtitle?: string;
1114
+ /** Explains the card: an info tip beside `title`. Ignored without `title`. */
1115
+ info?: string;
1116
+ /**
1117
+ * `chart` for a chart or data panel on a dashboard: a 15px title and a
1118
+ * border only, with no shadow or hover (it's read, not clicked).
1119
+ */
1120
+ variant?: "default" | "chart";
1105
1121
  /** Trailing header content, e.g. a "View all" link. Ignored without `title`. */
1106
1122
  action?: ReactNode;
1107
1123
  /** Card body. Rendered edge to edge without `title`; inside the standard padding with it. */
@@ -1109,6 +1125,176 @@ interface CardProps extends Omit<React.HTMLAttributes<HTMLElement>, "title">, Co
1109
1125
  }
1110
1126
  declare const Card: react.ForwardRefExoticComponent<CardProps & react.RefAttributes<HTMLElement>>;
1111
1127
 
1128
+ /**
1129
+ * @pattern StatStrip
1130
+ * @status stable
1131
+ * @since 0.54.0
1132
+ * @description The headline figures at the top of a dashboard, side by side in
1133
+ * one slim strip: share of spend, spend rank, spend. `StatStrip` is the strip;
1134
+ * each `StatTile` is one figure with its label, the change beside it, and an
1135
+ * optional quieter line under it. The strip is context for the charts below,
1136
+ * not the headline itself, so it stays one row high.
1137
+ * @variant StatTile: plain | icon (before the label) | info (tip after the label) | unit ("of 12") | change (a Delta) | note (second line) | children (a "compared with" row)
1138
+ * @tokens rounded-card, border-border-default, bg-surface, divide-border-default, px-5, py-3, text-micro, text-xl, leading-tight, tracking-tight, tracking-normal, text-dense, text-card-title, text-xs, text-text-primary, text-text-secondary, text-text-tertiary, text-brand-primaryAction
1139
+ * @dependencies InfoTip, Delta (passed in `change`)
1140
+ * @a11y The strip is a group named by `aria-label` ("Your position"). Each
1141
+ * tile reads in order: label, figure, change, note. The icon is decorative
1142
+ * and hidden; the label names the figure. The change is a `Delta`, which
1143
+ * always shows its sign, so direction never rests on colour alone. The info
1144
+ * tip is a button with its own label ("About share of spend").
1145
+ * @behavior Tiles share the width equally and are split by a thin line; below
1146
+ * the small breakpoint they stack, split the same way. Figures use tabular
1147
+ * numbers so they don't jump when they change.
1148
+ * @use for the two to four headline figures above a dashboard's charts.
1149
+ * @use `change` with a `Delta`, so every up/down change looks the same.
1150
+ * @avoid more than four tiles: past that the figures stop being headlines.
1151
+ * @avoid colouring the figure itself: only the change is green or red.
1152
+ * @usage
1153
+ * ```tsx
1154
+ * <StatStrip aria-label="Your position">
1155
+ * <StatTile label="Share of spend" icon={<PieChart size={13} />} info="Share of the set's total spend."
1156
+ * value="18.4%" change={<Delta value={1.2} suffix="pts" period="vs prior" />} />
1157
+ * <StatTile label="Spend rank" value="#3" unit="of 12" note="#9 of 18 in Luxury auto" />
1158
+ * <StatTile label="Spend" value="$4.2M" change={<Delta value={6.5} period="vs prior" />} note="Jan–Jun 2026" />
1159
+ * </StatStrip>
1160
+ * ```
1161
+ */
1162
+ interface StatStripProps extends HTMLAttributes<HTMLDivElement>, CommonProps {
1163
+ }
1164
+ declare const StatStrip: react.ForwardRefExoticComponent<StatStripProps & react.RefAttributes<HTMLDivElement>>;
1165
+ interface StatTileProps extends CommonProps {
1166
+ /** What the figure is ("Share of spend"). Shown small and uppercase. */
1167
+ label: string;
1168
+ /** The figure itself ("18.4%", "#3", "$4.2M"). */
1169
+ value: ReactNode;
1170
+ /** Small grey text after the figure ("of 12"). */
1171
+ unit?: ReactNode;
1172
+ /** The change beside the figure: pass a `Delta`. */
1173
+ change?: ReactNode;
1174
+ /** A quieter line under the figure (a category rank, the months). */
1175
+ note?: ReactNode;
1176
+ /** Icon before the label, about 13px. Decoration only. */
1177
+ icon?: ReactNode;
1178
+ /** Explains the figure: an info tip after the label. */
1179
+ info?: string;
1180
+ /** Extra rows under the note, e.g. the figure for a brand it's compared with. */
1181
+ children?: ReactNode;
1182
+ }
1183
+ declare function StatTile({ label, value, unit, change, note, icon, info, children, className, testIdPrefix }: StatTileProps): react.JSX.Element;
1184
+
1185
+ /**
1186
+ * @pattern ChartLegend
1187
+ * @status stable
1188
+ * @since 0.54.0
1189
+ * @description The key under or beside a chart: a small mark in each
1190
+ * series' colour and its name. `ChartLegend` is the row; each `LegendItem`
1191
+ * is one entry. The mark matches the chart: a line for a line chart, a
1192
+ * square for bars and areas, a dot for pies and points, and a dashed line
1193
+ * for preliminary data. Your own brand gets a bolder mark, darker text and
1194
+ * "(you)".
1195
+ * @variant LegendItem: dot | square | line | dashed | you
1196
+ * @tokens text-xs, text-text-tertiary, text-text-secondary, bg-text-tertiary, border-text-tertiary, rounded-pill, rounded-xs, gap-x-4, gap-y-1, gap-1.5
1197
+ * @a11y The legend is a list (`ul`), so screen readers announce how many
1198
+ * entries it has. The marks are decorative and hidden: the name says which
1199
+ * series it is, and "(you)" is real text, not a colour.
1200
+ * @behavior Entries wrap onto more lines when there isn't room. Without a
1201
+ * `color`, the mark is the muted grey used for "everyone else".
1202
+ * @use under every chart with more than one series, or with a dashed
1203
+ * preliminary stretch.
1204
+ * @use the same `mark` the chart draws, so the key looks like the chart.
1205
+ * @avoid a legend for a single series: the card title already names it.
1206
+ * @avoid colour as the only difference between entries that matter: name them.
1207
+ * @usage
1208
+ * ```tsx
1209
+ * <ChartLegend>
1210
+ * <LegendItem mark="line" color="var(--mr-color-brand-primary-action)" you>BMW</LegendItem>
1211
+ * <LegendItem mark="line">11 others in the set</LegendItem>
1212
+ * <LegendItem mark="dashed">Preliminary</LegendItem>
1213
+ * </ChartLegend>
1214
+ * ```
1215
+ */
1216
+ interface ChartLegendProps extends HTMLAttributes<HTMLUListElement>, CommonProps {
1217
+ }
1218
+ declare const ChartLegend: react.ForwardRefExoticComponent<ChartLegendProps & react.RefAttributes<HTMLUListElement>>;
1219
+ type LegendMark = "dot" | "square" | "line" | "dashed";
1220
+ interface LegendItemProps extends CommonProps {
1221
+ /** The mark: match what the chart draws. Default `dot`. */
1222
+ mark?: LegendMark;
1223
+ /** The series colour, any CSS colour or variable. Omit for the muted grey. */
1224
+ color?: string;
1225
+ /** Your own brand: bolder mark, darker text, and "(you)" after the name. */
1226
+ you?: boolean;
1227
+ /** The series name. */
1228
+ children: ReactNode;
1229
+ }
1230
+ declare function LegendItem({ mark, color, you, children, className, testIdPrefix }: LegendItemProps): react.JSX.Element;
1231
+
1232
+ /**
1233
+ * @pattern BarList
1234
+ * @status stable
1235
+ * @since 0.54.0
1236
+ * @description Rows of a name, its figures and a horizontal bar under them:
1237
+ * a brand's spend by channel, the set's top markets. Two forms from one part.
1238
+ * Full: give `columns` and each row's `values` line up under those headings
1239
+ * (Spend, Share), with an optional benchmark tick on the bar. Compact: no
1240
+ * `columns`, one value per row. Bars are 8px, and the biggest row fills the
1241
+ * width so small differences are easy to see.
1242
+ * @variant form: full (columns + values) | compact (one value)
1243
+ * @variant row: plain | note (grey text after the name) | color (series colour) | tick (benchmark mark)
1244
+ * @tokens text-dense, text-xs, text-micro, font-semibold, text-text-primary, text-text-secondary, text-text-tertiary, bg-subtle, bg-brand-primaryAction, bg-text-primary, rounded-pill, gap-2, py-2, w-16, w-13
1245
+ * @a11y The rows are a list, so screen readers say how many there are. Each
1246
+ * figure is read with its column heading ("Spend: $1.8M"); the visible
1247
+ * heading row is hidden from them to avoid saying it twice. Bars and the
1248
+ * tick are decorative: the figures carry the numbers, and `tickLabel` gives
1249
+ * the tick's value in words ("Set average 35%").
1250
+ * @behavior Bar length is each row's `bar` against the largest `bar` or
1251
+ * `tick` in the list. Long names truncate; the figures never wrap.
1252
+ * @use for a ranked breakdown where reading the figure and seeing the
1253
+ * proportion both matter.
1254
+ * @use `tick` for a benchmark (the set or category average) on the same scale.
1255
+ * @avoid when the order means nothing: sort rows by their bar, biggest first.
1256
+ * @avoid for more than about ten rows: show the top ones and link to the rest.
1257
+ * @usage
1258
+ * ```tsx
1259
+ * <BarList
1260
+ * aria-label="Spend by channel"
1261
+ * columns={["Spend", "Share"]}
1262
+ * rows={[
1263
+ * { key: "tv", label: "TV", values: ["$1.8M", "42%"], bar: 42, tick: 35, tickLabel: "Set average 35%", color: "var(--mr-color-media-tv)" },
1264
+ * { key: "digital", label: "Digital", values: ["$1.3M", "31%"], bar: 31, tick: 38, tickLabel: "Set average 38%" },
1265
+ * ]}
1266
+ * />
1267
+ * <BarList aria-label="Top markets" rows={[{ key: "ny", label: "New York", values: ["24%"], bar: 24 }]} />
1268
+ * ```
1269
+ */
1270
+ interface BarListRow {
1271
+ key: string;
1272
+ /** The name ("TV", "New York"). */
1273
+ label: ReactNode;
1274
+ /** Grey text after the name, e.g. a publisher's channel. */
1275
+ note?: string;
1276
+ /** The figures, in `columns` order. The first is bold in the full form. */
1277
+ values?: ReactNode[];
1278
+ /** The bar's length, in any unit shared by the list (usually a share). */
1279
+ bar: number;
1280
+ /** A benchmark on the same scale, drawn as a tick on the bar. */
1281
+ tick?: number;
1282
+ /** The tick in words, for screen readers ("Set average 35%"). */
1283
+ tickLabel?: string;
1284
+ /** Bar colour, any CSS colour or variable. Default is the brand colour. */
1285
+ color?: string;
1286
+ }
1287
+ interface BarListProps extends CommonProps {
1288
+ rows: BarListRow[];
1289
+ /** Column headings for the full form ("Spend", "Share"). Omit for the compact form. */
1290
+ columns?: string[];
1291
+ /** Names the list for screen readers ("Spend by channel"). */
1292
+ "aria-label"?: string;
1293
+ /** Shown instead when there are no rows. */
1294
+ empty?: ReactNode;
1295
+ }
1296
+ declare function BarList({ rows, columns, empty, className, testIdPrefix, "aria-label": ariaLabel }: BarListProps): react.JSX.Element | null;
1297
+
1112
1298
  /**
1113
1299
  * The one "no results" message, shared across every filtered table/list that
1114
1300
  * can end up empty for the same two reasons -- see the component doc below
@@ -2941,13 +3127,17 @@ interface ModalProps extends CommonProps {
2941
3127
  * @variant lg - 880px. A table, a long list, a preview.
2942
3128
  * @variant xl - 1200px. A full workspace: a column picker, a detail view with
2943
3129
  * its own tabs or panes, a grid.
2944
- * @tokens bg-scrim, z-modal, rounded-card, border-border-default, bg-surface,
3130
+ * @tokens bg-scrim, z-modal, transition-opacity, transition-transform,
3131
+ * duration-(--mr-motion-duration-interactive), ease-interactive,
3132
+ * motion-reduce:transition-none, rounded-card, border-border-default, bg-surface,
2945
3133
  * shadow-overlay, text-base, font-semibold, text-text-primary, text-sm,
2946
3134
  * text-text-secondary, text-text-tertiary, hover:bg-subtle,
2947
3135
  * hover:text-text-primary, rounded-control, border-t,
2948
3136
  * focus-visible:outline-border-focus
2949
3137
  * @dependencies lucide-react, react-dom
2950
- * @behavior Portals to <body>. Escape, a click on the background and the ×
3138
+ * @behavior Portals to <body>. Fades in over 200ms while the panel settles
3139
+ * from 98% to full size, and fades back out before it unmounts, as Drawer;
3140
+ * with reduced motion it appears and goes without moving. Escape, a click on the background and the ×
2951
3141
  * all call `onClose`. Focus moves to the first field (else the first footer
2952
3142
  * button) on open, Tab stays inside
2953
3143
  * it, and focus goes back to whatever opened it on close. The page behind
@@ -3763,4 +3953,4 @@ declare function MenuLabel({ className, testIdPrefix, children }: CommonProps &
3763
3953
  /** A line between groups of rows. */
3764
3954
  declare function MenuSeparator({ className, testIdPrefix }: CommonProps): react.JSX.Element;
3765
3955
 
3766
- export { AISpark, type AISparkProps, AdvertiserNoResults, type AdvertiserNoResultsProps, AdvertiserQuickFilter, type AdvertiserQuickFilterProps, AdvertiserSearchPrompt, type AdvertiserSearchPromptProps, AllFiltersButton, type AllFiltersButtonProps, Badge, type BadgeKind, type BadgeProps, type BadgeTone, BarChartPlaceholder, type BarChartPlaceholderProps, Button, type ButtonProps, Card, type CardProps, CheckBox, CheckBoxBox, type CheckBoxBoxProps, type CheckBoxProps, ChipContent, type ChipContentProps, type ChipVariant, type CommonProps, CopyButton, type CopyButtonProps, DEFAULT_SEARCH_MATCH, DataScopeFilter, type DataScopeFilterProps, DataTable, type DataTableColumn, type DataTableColumnWidth, type DataTableDensity, type DataTableProps, type DateGranularity, DateRangeFilter, type DateRangeFilterProps, DateRangePicker, type DateRangePickerProps, Delta, type DeltaProps, Drawer, type DrawerProps, type DrawerSize, EmptyState, type EmptyStateProps, type EmptyStateSize, FilterChipBar, type FilterChipBarProps, FilterDrawer, type FilterDrawerProps, type FilterDrawerSection, FilterDropdownFooter, type FilterDropdownFooterProps, Freshness, type FreshnessLevel, type FreshnessProps, InfoTip, type InfoTipProps, InlineMessage, type InlineMessageProps, type InlineMessageTone, LineChartPlaceholder, type LineChartPlaceholderProps, MediaLabel, type MediaLabelProps, type MediaType, Menu, MenuItem, type MenuItemProps, MenuLabel, type MenuProps, MenuSeparator, Modal, type ModalProps, type ModalSize, MultiSelectFilter, type MultiSelectFilterProps, type MultiSelectGroup, NO_RESULTS_BODY, NO_RESULTS_TITLE, NameListModal, type NameListModalProps, type NoResultsAction, NoResultsEmptyState, type NoResultsEmptyStateProps, PRIMARY_ACTION_CLASS, PageHeader, type PageHeaderProps, Pager, type PagerProps, type PickerColumn, type PickerFilter, type PickerRow, PieChartPlaceholder, type PieChartPlaceholderProps, type PubBreak, PublisherBreakdownList, type PublisherBreakdownListProps, QUIET_ACTION_CLASS, SearchBar, type SearchBarProps, type SearchBarSize, type SearchBarVariant, type SearchMatchMode, type SearchMatchValue, type SearchScope, SectionHeading, type SectionHeadingProps, SectionRail, type SectionRailProps, SegmentedControl, type SegmentedControlProps, type SegmentedControlSize, type SegmentedOption, SelectAllVisible, type SelectAllVisibleProps, SelectFilter, type SelectFilterProps, SelectedSection, type SelectedSectionProps, SelectionPicker, type SelectionPickerAccountList, type SelectionPickerProps, SortButton, type SortButtonProps, type SortDir, type SortState, StackedColumnPlaceholder, type StackedColumnPlaceholderProps, SuggestionChip, type SuggestionChipProps, type SummaryGroup, type SummaryGroupItemValue, type TabItem, TablePagination, type TablePaginationProps, Tabs, type TabsProps, Tag, type TagProps, TextField, type TextFieldProps, type TextFieldSize, Toast, type ToastProps, type ToastTone, Toggle, ToggleChip, type ToggleChipProps, type ToggleProps, Tooltip, type TooltipProps, WorkspaceAvatar, type WorkspaceAvatarProps, WorkspaceSelectedCard, type WorkspaceSelectedCardProps, ariaSortFor, buttonVariants, chipTriggerClass, cycleSort, noResultsBody, resolveRange, sortProp };
3956
+ export { AISpark, type AISparkProps, AdvertiserNoResults, type AdvertiserNoResultsProps, AdvertiserQuickFilter, type AdvertiserQuickFilterProps, AdvertiserSearchPrompt, type AdvertiserSearchPromptProps, AllFiltersButton, type AllFiltersButtonProps, Badge, type BadgeKind, type BadgeProps, type BadgeTone, BarChartPlaceholder, type BarChartPlaceholderProps, BarList, type BarListProps, type BarListRow, Button, type ButtonProps, Card, type CardProps, ChartLegend, type ChartLegendProps, CheckBox, CheckBoxBox, type CheckBoxBoxProps, type CheckBoxProps, ChipContent, type ChipContentProps, type ChipVariant, type CommonProps, CopyButton, type CopyButtonProps, DEFAULT_SEARCH_MATCH, DataScopeFilter, type DataScopeFilterProps, DataTable, type DataTableColumn, type DataTableColumnWidth, type DataTableDensity, type DataTableProps, type DateGranularity, DateRangeFilter, type DateRangeFilterProps, DateRangePicker, type DateRangePickerProps, Delta, type DeltaProps, Drawer, type DrawerProps, type DrawerSize, EmptyState, type EmptyStateProps, type EmptyStateSize, FilterChipBar, type FilterChipBarProps, FilterDrawer, type FilterDrawerProps, type FilterDrawerSection, FilterDropdownFooter, type FilterDropdownFooterProps, Freshness, type FreshnessLevel, type FreshnessProps, InfoTip, type InfoTipProps, InlineMessage, type InlineMessageProps, type InlineMessageTone, LegendItem, type LegendItemProps, type LegendMark, LineChartPlaceholder, type LineChartPlaceholderProps, MediaLabel, type MediaLabelProps, type MediaType, Menu, MenuItem, type MenuItemProps, MenuLabel, type MenuProps, MenuSeparator, Modal, type ModalProps, type ModalSize, MultiSelectFilter, type MultiSelectFilterProps, type MultiSelectGroup, NO_RESULTS_BODY, NO_RESULTS_TITLE, NameListModal, type NameListModalProps, type NoResultsAction, NoResultsEmptyState, type NoResultsEmptyStateProps, PRIMARY_ACTION_CLASS, PageHeader, type PageHeaderProps, Pager, type PagerProps, type PickerColumn, type PickerFilter, type PickerRow, PieChartPlaceholder, type PieChartPlaceholderProps, type PubBreak, PublisherBreakdownList, type PublisherBreakdownListProps, QUIET_ACTION_CLASS, SearchBar, type SearchBarProps, type SearchBarSize, type SearchBarVariant, type SearchMatchMode, type SearchMatchValue, type SearchScope, SectionHeading, type SectionHeadingProps, SectionRail, type SectionRailProps, SegmentedControl, type SegmentedControlProps, type SegmentedControlSize, type SegmentedOption, SelectAllVisible, type SelectAllVisibleProps, SelectFilter, type SelectFilterProps, SelectedSection, type SelectedSectionProps, SelectionPicker, type SelectionPickerAccountList, type SelectionPickerProps, SortButton, type SortButtonProps, type SortDir, type SortState, StackedColumnPlaceholder, type StackedColumnPlaceholderProps, StatStrip, type StatStripProps, StatTile, type StatTileProps, SuggestionChip, type SuggestionChipProps, type SummaryGroup, type SummaryGroupItemValue, type TabItem, TablePagination, type TablePaginationProps, Tabs, type TabsProps, Tag, type TagProps, TextField, type TextFieldProps, type TextFieldSize, Toast, type ToastProps, type ToastTone, Toggle, ToggleChip, type ToggleChipProps, type ToggleProps, Tooltip, type TooltipProps, WorkspaceAvatar, type WorkspaceAvatarProps, WorkspaceSelectedCard, type WorkspaceSelectedCardProps, ariaSortFor, buttonVariants, chipTriggerClass, cycleSort, noResultsBody, resolveRange, sortProp };