@mediaradar/design-components 0.38.0 → 0.40.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/approved-components.json +44 -1
- package/dist/index.cjs +55 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +78 -12
- package/dist/index.d.ts +78 -12
- package/dist/index.js +69 -20
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.d.cts
CHANGED
|
@@ -5,6 +5,7 @@ import { VariantProps } from 'class-variance-authority';
|
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* @pattern InfoTip
|
|
8
|
+
* @status stable
|
|
8
9
|
* @description Info tooltip — a small info glyph that opens a portalled,
|
|
9
10
|
* viewport-clamped bubble. Mirrors the Publisher Intel header affordance so
|
|
10
11
|
* page subtitles can collapse into the eyebrow.
|
|
@@ -53,17 +54,21 @@ declare function InfoTip({ text, size, label, trigger }: InfoTipProps): react.JS
|
|
|
53
54
|
|
|
54
55
|
/**
|
|
55
56
|
* @pattern AdvertiserQuickFilter
|
|
57
|
+
* @status stable
|
|
56
58
|
* @description Search-first quick filter. Mirrors the standard filter-chip
|
|
57
|
-
* shape (two-line caption + value + chevron) but never preloads the
|
|
58
|
-
* list -- users must search first, since the advertiser pool is
|
|
59
|
-
* endless.
|
|
60
|
-
*
|
|
61
|
-
*
|
|
62
|
-
*
|
|
63
|
-
*
|
|
59
|
+
* shape (two-line caption + value + chevron) but by default never preloads the
|
|
60
|
+
* option list -- users must search first, since the advertiser pool is
|
|
61
|
+
* effectively endless. With `prepopulate`, a short, known list (leagues,
|
|
62
|
+
* brands on one dashboard) shows in full on open and the search box only
|
|
63
|
+
* narrows it; `pageSize` then lists it a page at a time. Selections are pinned
|
|
64
|
+
* in a "Selected (n)" section at the top so they're never lost when the user
|
|
65
|
+
* runs another search. Named for its original (and still primary) use, but
|
|
66
|
+
* the copy props make it reusable for any dimension that's also search-first
|
|
67
|
+
* in its own filter tray, so the dimension reads the same in the quick bar as
|
|
68
|
+
* it does there.
|
|
64
69
|
* @tokens text-control-caption, rounded-control, rounded-card, border-border-default, border-border-strong,
|
|
65
70
|
* border-border-interactive, border-border-focus, bg-surface, bg-input,
|
|
66
|
-
* shadow-overlay, text-text-primary, text-text-secondary, text-text-tertiary,
|
|
71
|
+
* shadow-overlay, text-xs, text-text-primary, text-text-secondary, text-text-tertiary,
|
|
67
72
|
* text-text-link, bg-brand-primaryAction, text-brand-onprimary,
|
|
68
73
|
* hover:bg-subtle, hover:text-text-primary, placeholder:text-text-tertiary
|
|
69
74
|
* @dependencies lucide-react
|
|
@@ -73,15 +78,21 @@ declare function InfoTip({ text, size, label, trigger }: InfoTipProps): react.JS
|
|
|
73
78
|
* to `onChange`. With `showFooter`, only the Apply button commits -- every
|
|
74
79
|
* other close path discards the draft, so the trigger label never previews
|
|
75
80
|
* an unapplied change. The pinned "selected" section persists across
|
|
76
|
-
* searches and collapses when the search is cleared.
|
|
81
|
+
* searches and collapses when the search is cleared. With `pageSize`, a new
|
|
82
|
+
* query or reopening the tray goes back to the first page.
|
|
77
83
|
* @a11y Trigger is a <button> with aria-expanded and aria-haspopup; the menu is
|
|
78
84
|
* role="dialog", closed on Escape. Option rows are role="checkbox" with
|
|
79
85
|
* aria-checked, so each row is itself the control -- don't wrap them in
|
|
80
|
-
* another clickable element.
|
|
86
|
+
* another clickable element. With `prepopulate`, a visually hidden
|
|
87
|
+
* role="status" line announces the result count ("12 results, showing 10")
|
|
88
|
+
* as the list changes. "Show N more" is a real <button>; after it loads a
|
|
89
|
+
* page, focus moves to the first new option, so keyboard users continue
|
|
90
|
+
* where the list grew instead of losing focus when the button goes away.
|
|
81
91
|
* @usage
|
|
82
92
|
* ```tsx
|
|
83
93
|
* <AdvertiserQuickFilter options={advertisers} selected={selected} onChange={setSelected} />
|
|
84
94
|
* <AdvertiserQuickFilter options={advertisers} selected={selected} onChange={setSelected} showFooter clearValue={defaults} />
|
|
95
|
+
* <AdvertiserQuickFilter caption="League" options={leagues} selected={selected} onChange={setSelected} prepopulate pageSize={10} />
|
|
85
96
|
* ```
|
|
86
97
|
*/
|
|
87
98
|
interface AdvertiserQuickFilterProps {
|
|
@@ -111,6 +122,19 @@ interface AdvertiserQuickFilterProps {
|
|
|
111
122
|
* selection -- still committed back, still removable -- but they narrow
|
|
112
123
|
* nothing, so the trigger label leaves them out of the count. */
|
|
113
124
|
parked?: string[];
|
|
125
|
+
/**
|
|
126
|
+
* List every option as soon as the tray opens, instead of the "start
|
|
127
|
+
* typing" prompt; the search box then only narrows the list. For a short,
|
|
128
|
+
* known list. Leave it off for an effectively endless pool (advertisers).
|
|
129
|
+
* Defaults to false: search first, exactly as before.
|
|
130
|
+
*/
|
|
131
|
+
prepopulate?: boolean;
|
|
132
|
+
/**
|
|
133
|
+
* With `prepopulate`: list this many rows at a time, with a "Show N more"
|
|
134
|
+
* button for the next page. Omit to list every option. Ignored without
|
|
135
|
+
* `prepopulate`.
|
|
136
|
+
*/
|
|
137
|
+
pageSize?: number;
|
|
114
138
|
/** Search box placeholder. Override alongside the other copy props when
|
|
115
139
|
* the filter isn't advertisers, so the empty and no-results states name
|
|
116
140
|
* the right dimension. */
|
|
@@ -126,7 +150,8 @@ interface AdvertiserQuickFilterProps {
|
|
|
126
150
|
* (`${testIdPrefix}-trigger`), the popover (`-popover`), the search input
|
|
127
151
|
* (`-search`), the selected-section toggle (`-selected-toggle`), the
|
|
128
152
|
* select-all-visible row (`-select-all-visible`), each option row
|
|
129
|
-
* (`-option-<slugified-id>`),
|
|
153
|
+
* (`-option-<slugified-id>`), the "Show N more" row (`-show-more`), and
|
|
154
|
+
* the footer's Clear All (`-clear-all`) and
|
|
130
155
|
* Apply (`-apply`). Omit entirely for no test-id wiring at all --
|
|
131
156
|
* added specifically so an existing Playwright suite keyed off these ids
|
|
132
157
|
* (mr-clientapps' `AdvertisersPicker`) doesn't lose its locators when
|
|
@@ -134,10 +159,11 @@ interface AdvertiserQuickFilterProps {
|
|
|
134
159
|
*/
|
|
135
160
|
testIdPrefix?: string;
|
|
136
161
|
}
|
|
137
|
-
declare function AdvertiserQuickFilter({ caption, options, selected, onChange, align, icon, showFooter, clearValue, parked, searchPlaceholder, promptLabel, noResultsHint, clearLabel, testIdPrefix, }: AdvertiserQuickFilterProps): react.JSX.Element;
|
|
162
|
+
declare function AdvertiserQuickFilter({ caption, options, selected, onChange, align, icon, showFooter, clearValue, parked, prepopulate, pageSize, searchPlaceholder, promptLabel, noResultsHint, clearLabel, testIdPrefix, }: AdvertiserQuickFilterProps): react.JSX.Element;
|
|
138
163
|
|
|
139
164
|
/**
|
|
140
165
|
* @pattern AdvertiserSearchPrompt
|
|
166
|
+
* @status stable
|
|
141
167
|
* @description Pre-search empty state for a search-first picker — shown the
|
|
142
168
|
* moment the tray opens, before anything has been typed. Used for option
|
|
143
169
|
* pools too large to preload (the advertiser list is effectively endless),
|
|
@@ -193,6 +219,7 @@ interface BadgeProps {
|
|
|
193
219
|
}
|
|
194
220
|
/**
|
|
195
221
|
* @pattern Badge
|
|
222
|
+
* @status stable
|
|
196
223
|
* @description The one small label that annotates something else: a count on
|
|
197
224
|
* a filter, a status, a category, an AI marker, a flag over artwork. Two
|
|
198
225
|
* props -- `tone` (what kind of thing) and `kind` (shape and case) -- which
|
|
@@ -262,6 +289,7 @@ interface DeltaProps {
|
|
|
262
289
|
}
|
|
263
290
|
/**
|
|
264
291
|
* @pattern Delta
|
|
292
|
+
* @status stable
|
|
265
293
|
* @description A change over time -- the +6.2% / -2.1% beside a figure. Green
|
|
266
294
|
* up, red down, always with an explicit sign.
|
|
267
295
|
* @props
|
|
@@ -301,6 +329,7 @@ declare function Delta({ value, suffix, arrow, period, className }: DeltaProps):
|
|
|
301
329
|
|
|
302
330
|
/**
|
|
303
331
|
* @pattern CheckBox
|
|
332
|
+
* @status stable
|
|
304
333
|
* @audited 2026-11-12
|
|
305
334
|
* @description Tri-state checkbox rendered as a `<button>` (not a native
|
|
306
335
|
* `<input type="checkbox">`), so it can carry an indeterminate "some but not
|
|
@@ -383,6 +412,7 @@ interface CheckBoxProps {
|
|
|
383
412
|
declare function CheckBox({ checked, indeterminate, onChange, ariaLabel, disabled, stopPropagation, testId, title, className, }: CheckBoxProps): react.JSX.Element;
|
|
384
413
|
/**
|
|
385
414
|
* @pattern CheckBoxBox
|
|
415
|
+
* @status stable
|
|
386
416
|
* @description Presentational checkbox -- draws the same box as `CheckBox`
|
|
387
417
|
* and nothing else. Use it when an ancestor already carries the interaction
|
|
388
418
|
* and the checkbox semantics (a clickable option row, a `<label>`), since a
|
|
@@ -561,6 +591,7 @@ declare function DateRangeFilter({ caption, defaultValue, value: controlledValue
|
|
|
561
591
|
|
|
562
592
|
/**
|
|
563
593
|
* @pattern SearchBar
|
|
594
|
+
* @status stable
|
|
564
595
|
* @description Filter-bar keyword search. 'default' is a plain keyword
|
|
565
596
|
* input; 'filterable' adds an attached match-type dropdown sharing one
|
|
566
597
|
* bordered control, mirroring the legacy Creative Intel search + match-type
|
|
@@ -645,6 +676,7 @@ declare function SearchBar({ placeholder, value, onChange, variant, size, matchV
|
|
|
645
676
|
|
|
646
677
|
/**
|
|
647
678
|
* @pattern SectionRail
|
|
679
|
+
* @status stable
|
|
648
680
|
* @audited 2026-11-12
|
|
649
681
|
* @description Generic titled section wrapper for a row of cards — a
|
|
650
682
|
* horizontal scroll rail on mobile/tablet (snap, bleeds to edges), a
|
|
@@ -696,6 +728,7 @@ declare function SectionRail({ title, titleSerif, subtitle, viewAllLabel, viewAl
|
|
|
696
728
|
|
|
697
729
|
/**
|
|
698
730
|
* @pattern DataScopeFilter
|
|
731
|
+
* @status stable
|
|
699
732
|
* @description "Data" scope chip -- toggles the filter bar between All data
|
|
700
733
|
* and Final-only data (data that's finalized across the selected media
|
|
701
734
|
* formats, for stable report-ready numbers). One boolean, one control,
|
|
@@ -734,6 +767,7 @@ declare function DataScopeFilter({ value, onChange, align }: DataScopeFilterProp
|
|
|
734
767
|
|
|
735
768
|
/**
|
|
736
769
|
* @pattern SelectFilter
|
|
770
|
+
* @status stable
|
|
737
771
|
* @description Single-select filter chip -- the caption-over-value trigger
|
|
738
772
|
* shape shared with AdvertiserQuickFilter/DateRangeFilter, opening a
|
|
739
773
|
* lightweight listbox of plain string options. Portal-rendered to
|
|
@@ -925,6 +959,7 @@ declare const PRIMARY_ACTION_CLASS = "rounded-control bg-brand-primaryAction px-
|
|
|
925
959
|
declare const QUIET_ACTION_CLASS = "rounded-control text-[13px] font-medium text-text-link transition-colors hover:underline focus-visible:outline-solid focus-visible:outline-2 focus-visible:outline-border-focus";
|
|
926
960
|
/**
|
|
927
961
|
* @pattern NoResultsEmptyState
|
|
962
|
+
* @status stable
|
|
928
963
|
* @description Guided empty state for a query that returned nothing.
|
|
929
964
|
* Deliberately one state for two causes, because the user can't tell them
|
|
930
965
|
* apart and the fix is the same either way -- loosen the filters or widen the
|
|
@@ -1171,6 +1206,7 @@ declare function PieChartPlaceholder({ height, legendRows }: PieChartPlaceholder
|
|
|
1171
1206
|
|
|
1172
1207
|
/**
|
|
1173
1208
|
* @pattern StackedColumnPlaceholder
|
|
1209
|
+
* @status stable
|
|
1174
1210
|
* @audited 2026-11-12
|
|
1175
1211
|
* @description Neutral, dataless stand-in for a 100% stacked column -- a
|
|
1176
1212
|
* single banded column beside a blank legend. `axis` follows the live card
|
|
@@ -1207,6 +1243,7 @@ declare function StackedColumnPlaceholder({ height, width, legendRows, axis, }:
|
|
|
1207
1243
|
|
|
1208
1244
|
/**
|
|
1209
1245
|
* @pattern Tooltip
|
|
1246
|
+
* @status stable
|
|
1210
1247
|
* @description Portalled hover/focus tooltip. Two ways to attach a trigger:
|
|
1211
1248
|
* wrap `children` (the default -- an inline trigger, e.g. a truncated table
|
|
1212
1249
|
* cell or a chart legend entry), or pass `anchorRef` for an element that
|
|
@@ -1320,6 +1357,7 @@ declare function Tooltip({ label, children, anchorRef, className, whenTruncated,
|
|
|
1320
1357
|
|
|
1321
1358
|
/**
|
|
1322
1359
|
* @pattern AdvertiserNoResults
|
|
1360
|
+
* @status stable
|
|
1323
1361
|
* @description Shown when a search-first picker's search returns nothing --
|
|
1324
1362
|
* gives an actionable next step rather than just a bare "no results"
|
|
1325
1363
|
* message. Named for its original (and still primary) use across
|
|
@@ -1684,6 +1722,7 @@ interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement>, VariantPr
|
|
|
1684
1722
|
}
|
|
1685
1723
|
/**
|
|
1686
1724
|
* @pattern Button
|
|
1725
|
+
* @status stable
|
|
1687
1726
|
* @description The one control for every clickable action, from the main call
|
|
1688
1727
|
* to action on a screen down to a quiet toolbar utility. Six variants
|
|
1689
1728
|
* (primary, secondary, ghost, danger, dangerGhost, link) across four sizes
|
|
@@ -1758,6 +1797,7 @@ interface FilterDropdownFooterProps {
|
|
|
1758
1797
|
}
|
|
1759
1798
|
/**
|
|
1760
1799
|
* @pattern FilterDropdownFooter
|
|
1800
|
+
* @status stable
|
|
1761
1801
|
* @description Fixed Apply/Clear All footer for quick-filter dropdowns —
|
|
1762
1802
|
* pinned below the (independently scrollable) option list so it's always
|
|
1763
1803
|
* visible. Shared by the Media/Advertiser/Date/Group By/Time Increment quick
|
|
@@ -1805,6 +1845,7 @@ interface NameListModalProps {
|
|
|
1805
1845
|
}
|
|
1806
1846
|
/**
|
|
1807
1847
|
* @pattern NameListModal
|
|
1848
|
+
* @status stable
|
|
1808
1849
|
* @description Create/rename dialog — a name field, and optionally a few
|
|
1809
1850
|
* checkboxes under it. Shared by the Account Lists table and the list detail
|
|
1810
1851
|
* page so create/rename look identical; `fieldLabel`/`placeholder` relabel it
|
|
@@ -1845,6 +1886,7 @@ interface ChipContentProps {
|
|
|
1845
1886
|
}
|
|
1846
1887
|
/**
|
|
1847
1888
|
* @pattern ChipTrigger
|
|
1889
|
+
* @status stable
|
|
1848
1890
|
* @description Shared foundation for filter-bar chip triggers — pairs
|
|
1849
1891
|
* `chipTriggerClass` with `ChipContent` for the caption/value/icon layout, so
|
|
1850
1892
|
* every dropdown chip across the app matches.
|
|
@@ -1886,6 +1928,7 @@ interface FilterChipBarProps<T extends ChipLike> {
|
|
|
1886
1928
|
}
|
|
1887
1929
|
/**
|
|
1888
1930
|
* @pattern FilterChipBar
|
|
1931
|
+
* @status stable
|
|
1889
1932
|
* @description Applied-filter chips — wrap freely across as many rows as
|
|
1890
1933
|
* needed, every chip shown. Each chip reveals its filter category on hover
|
|
1891
1934
|
* (tooltip + outline). "Clear all" trails the chips. Generic over the
|
|
@@ -1959,6 +2002,7 @@ interface SortButtonProps<K extends string> {
|
|
|
1959
2002
|
}
|
|
1960
2003
|
/**
|
|
1961
2004
|
* @pattern SortButton
|
|
2005
|
+
* @status stable
|
|
1962
2006
|
* @audited 2026-11-12
|
|
1963
2007
|
* @description Design-system rule: every sortable table column header uses
|
|
1964
2008
|
* this exact icon/color treatment. Sortable-but-inactive columns show a
|
|
@@ -2007,6 +2051,7 @@ interface PagerProps {
|
|
|
2007
2051
|
}
|
|
2008
2052
|
/**
|
|
2009
2053
|
* @pattern Pager
|
|
2054
|
+
* @status stable
|
|
2010
2055
|
* @description Compact prev/next pager with a windowed page-number list —
|
|
2011
2056
|
* shows every page up to 7 total, otherwise 1 … current±1 … last with
|
|
2012
2057
|
* ellipsis gaps, each number formatted for the locale ("14,433"). Shared by
|
|
@@ -2049,6 +2094,7 @@ interface WorkspaceAvatarProps {
|
|
|
2049
2094
|
}
|
|
2050
2095
|
/**
|
|
2051
2096
|
* @pattern WorkspaceAvatar
|
|
2097
|
+
* @status stable
|
|
2052
2098
|
* @audited 2026-11-12
|
|
2053
2099
|
* @description The square tile that identifies a workspace in a switch
|
|
2054
2100
|
* list — first 1–2 word initials of the workspace name. Pass no name for
|
|
@@ -2093,6 +2139,7 @@ interface ToastProps {
|
|
|
2093
2139
|
}
|
|
2094
2140
|
/**
|
|
2095
2141
|
* @pattern Toast
|
|
2142
|
+
* @status stable
|
|
2096
2143
|
* @description Transient feedback about the page or the task: "12 accounts
|
|
2097
2144
|
* removed", "Export started". Floats at the bottom of the window so it never
|
|
2098
2145
|
* pushes the page around, dismisses itself, and may carry one action.
|
|
@@ -2178,6 +2225,7 @@ declare function Tag({ children, className }: TagProps): react.JSX.Element;
|
|
|
2178
2225
|
|
|
2179
2226
|
/**
|
|
2180
2227
|
* @pattern TablePagination
|
|
2228
|
+
* @status stable
|
|
2181
2229
|
* @audited 2026-11-12
|
|
2182
2230
|
* @description Full table-footer pagination bar: a rows-per-page select, a
|
|
2183
2231
|
* first/prev/pages/next/last pager, and the resolved "1 – 25 of N results"
|
|
@@ -2286,6 +2334,7 @@ interface MultiSelectGroup {
|
|
|
2286
2334
|
}
|
|
2287
2335
|
/**
|
|
2288
2336
|
* @pattern MultiSelectFilter
|
|
2337
|
+
* @status stable
|
|
2289
2338
|
* @description Quick-access multi-select chip — mirrors the DateRangeFilter
|
|
2290
2339
|
* button shape (two-line caption + value with a chevron) and opens a
|
|
2291
2340
|
* searchable checkbox popover. Used for the page-level Media type /
|
|
@@ -2406,6 +2455,7 @@ interface ToggleProps {
|
|
|
2406
2455
|
}
|
|
2407
2456
|
/**
|
|
2408
2457
|
* @pattern Toggle
|
|
2458
|
+
* @status stable
|
|
2409
2459
|
* @description The app's on/off switch. Use it for a setting that takes effect
|
|
2410
2460
|
* as a state the user keeps — "only include enriched creatives", "email me a
|
|
2411
2461
|
* digest" — where a checkbox would read as an item being ticked off a list.
|
|
@@ -2441,6 +2491,7 @@ interface AISparkProps {
|
|
|
2441
2491
|
}
|
|
2442
2492
|
/**
|
|
2443
2493
|
* @pattern AISpark
|
|
2494
|
+
* @status stable
|
|
2444
2495
|
* @description Assistant glyph — the lucide Sparkles icon stroked with the
|
|
2445
2496
|
* MR orange→violet assistant gradient. Each instance scopes its own gradient
|
|
2446
2497
|
* id, and the stops follow light/dark mode.
|
|
@@ -2458,6 +2509,7 @@ interface FreshnessProps {
|
|
|
2458
2509
|
}
|
|
2459
2510
|
/**
|
|
2460
2511
|
* @pattern Freshness
|
|
2512
|
+
* @status stable
|
|
2461
2513
|
* @audited 2026-11-12
|
|
2462
2514
|
* @description Freshness dot — prefixed to card meta rows so a row of 4
|
|
2463
2515
|
* timestamps stops reading as a wall of identical text. Color carries the
|
|
@@ -2488,6 +2540,7 @@ interface SectionHeadingProps {
|
|
|
2488
2540
|
}
|
|
2489
2541
|
/**
|
|
2490
2542
|
* @pattern SectionHeading
|
|
2543
|
+
* @status stable
|
|
2491
2544
|
* @description The title of a section within a page -- "Start from a template",
|
|
2492
2545
|
* "Saved reports". One size everywhere (16px semibold), so every page's sections
|
|
2493
2546
|
* read at the same level under the page title. Optional one-line description
|
|
@@ -2545,6 +2598,7 @@ interface PageHeaderProps {
|
|
|
2545
2598
|
}
|
|
2546
2599
|
/**
|
|
2547
2600
|
* @pattern PageHeader
|
|
2601
|
+
* @status stable
|
|
2548
2602
|
* @description The top of a page: its title (the page's only h1), an optional
|
|
2549
2603
|
* one-line description under it, and the page's main actions on the right.
|
|
2550
2604
|
* Title 20px over a 14px description, 2px apart, so the two read as one unit;
|
|
@@ -2600,6 +2654,7 @@ interface ModalProps {
|
|
|
2600
2654
|
}
|
|
2601
2655
|
/**
|
|
2602
2656
|
* @pattern Modal
|
|
2657
|
+
* @status stable
|
|
2603
2658
|
* @description A dialog over a dimmed page: title, optional one-line
|
|
2604
2659
|
* description, content, and a footer of buttons. Four widths -- sm 440 for a
|
|
2605
2660
|
* confirm, md 640 for a form, lg 880 for a table or a list, xl 1200 for a
|
|
@@ -2661,6 +2716,7 @@ interface EmptyStateProps {
|
|
|
2661
2716
|
}
|
|
2662
2717
|
/**
|
|
2663
2718
|
* @pattern EmptyState
|
|
2719
|
+
* @status stable
|
|
2664
2720
|
* @description What shows where content would be: an icon, a title saying
|
|
2665
2721
|
* what's empty, one line on what to do next, and one action. Two sizes -- sm
|
|
2666
2722
|
* inside a table, card or dropdown; md when it fills a page or a panel.
|
|
@@ -2710,6 +2766,7 @@ interface TabsProps<T extends string = string> {
|
|
|
2710
2766
|
}
|
|
2711
2767
|
/**
|
|
2712
2768
|
* @pattern Tabs
|
|
2769
|
+
* @status stable
|
|
2713
2770
|
* @description Underline tabs that switch between the sections of one page --
|
|
2714
2771
|
* Overview, Creative, Contacts. The selected tab is semibold with a brand
|
|
2715
2772
|
* underline; the row sits on a hairline. For switching how the same data is
|
|
@@ -2758,6 +2815,7 @@ interface SegmentedControlProps<T extends string = string> {
|
|
|
2758
2815
|
}
|
|
2759
2816
|
/**
|
|
2760
2817
|
* @pattern SegmentedControl
|
|
2818
|
+
* @status stable
|
|
2761
2819
|
* @description A pill of 2 to 4 options that switches how the same data is
|
|
2762
2820
|
* shown -- Spend / Share, Chart / Table, Weekly / Monthly. The selected option
|
|
2763
2821
|
* is a raised white pill. Heights match the control scale: sm 32, md 40. For
|
|
@@ -2802,6 +2860,7 @@ interface TextFieldProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "si
|
|
|
2802
2860
|
}
|
|
2803
2861
|
/**
|
|
2804
2862
|
* @pattern TextField
|
|
2863
|
+
* @status stable
|
|
2805
2864
|
* @description A single-line text input with an optional label, hint and
|
|
2806
2865
|
* error. Same heights as Button -- sm 32, md 40, lg 44 -- so a field and a
|
|
2807
2866
|
* button side by side line up. 13px text, the strong border every control you
|
|
@@ -2849,6 +2908,7 @@ interface DrawerProps {
|
|
|
2849
2908
|
}
|
|
2850
2909
|
/**
|
|
2851
2910
|
* @pattern Drawer
|
|
2911
|
+
* @status stable
|
|
2852
2912
|
* @description A panel that slides in from the right over the dimmed page:
|
|
2853
2913
|
* title, optional one-line description, a scrolling body, and an optional
|
|
2854
2914
|
* footer pinned at the bottom. Three widths -- sm 440 for filters, md 640 for
|
|
@@ -2952,6 +3012,7 @@ interface DataTableProps<T, K extends string = string> {
|
|
|
2952
3012
|
}
|
|
2953
3013
|
/**
|
|
2954
3014
|
* @pattern DataTable
|
|
3015
|
+
* @status stable
|
|
2955
3016
|
* @description The shared table: a card frame, an optional title row, the
|
|
2956
3017
|
* header band, rows with hairline dividers and a hover wash, and the empty
|
|
2957
3018
|
* and loading states. Each screen describes its columns -- label, cell,
|
|
@@ -3019,6 +3080,7 @@ interface MediaLabelProps {
|
|
|
3019
3080
|
}
|
|
3020
3081
|
/**
|
|
3021
3082
|
* @pattern MediaLabel
|
|
3083
|
+
* @status stable
|
|
3022
3084
|
* @description The small solid label naming a creative's media type -- TV,
|
|
3023
3085
|
* CTV, Digital, Social, Radio, Newspaper, Magazine -- usually laid over the
|
|
3024
3086
|
* corner of a thumbnail. One colour per type, from the `color.media.*`
|
|
@@ -3058,6 +3120,7 @@ interface SuggestionChipProps extends Omit<ButtonHTMLAttributes<HTMLButtonElemen
|
|
|
3058
3120
|
}
|
|
3059
3121
|
/**
|
|
3060
3122
|
* @pattern SuggestionChip
|
|
3123
|
+
* @status stable
|
|
3061
3124
|
* @description An outlined grey pill offering a ready-made search or
|
|
3062
3125
|
* question: "Or try: Luxury SUV brands", an AI follow-up, a "Did you mean".
|
|
3063
3126
|
* Clicking it runs that suggestion. Text only, normal case.
|
|
@@ -3096,6 +3159,7 @@ interface ToggleChipProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>,
|
|
|
3096
3159
|
}
|
|
3097
3160
|
/**
|
|
3098
3161
|
* @pattern ToggleChip
|
|
3162
|
+
* @status stable
|
|
3099
3163
|
* @description A pill you switch on and off, in a row where several can be
|
|
3100
3164
|
* on at once: countries, media types, quick filters. On, it takes a pale
|
|
3101
3165
|
* tint of the brand blue, a brand border and a tick before the label, so the state
|
|
@@ -3136,6 +3200,7 @@ interface CopyButtonProps {
|
|
|
3136
3200
|
}
|
|
3137
3201
|
/**
|
|
3138
3202
|
* @pattern CopyButton
|
|
3203
|
+
* @status stable
|
|
3139
3204
|
* @description Copies a value to the clipboard and confirms on the button
|
|
3140
3205
|
* itself: the copy icon becomes a green tick for two seconds (a labelled
|
|
3141
3206
|
* button also reads "Copied"), then it's ready again. Two looks -- icon only,
|
|
@@ -3177,6 +3242,7 @@ interface InlineMessageProps {
|
|
|
3177
3242
|
}
|
|
3178
3243
|
/**
|
|
3179
3244
|
* @pattern InlineMessage
|
|
3245
|
+
* @status stable
|
|
3180
3246
|
* @description A message that sits in the page, next to what it's about, and
|
|
3181
3247
|
* stays until it's dealt with: "A similar organization already exists",
|
|
3182
3248
|
* "3 rows couldn't be matched". Icon, a short title, an optional line, and
|