@mediaradar/design-components 0.63.1 → 0.65.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 +1 -1
- package/dist/index.cjs +1067 -512
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +332 -30
- package/dist/index.d.ts +332 -30
- package/dist/index.js +1063 -509
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.d.cts
CHANGED
|
@@ -2254,6 +2254,12 @@ interface FilterDropdownFooterProps extends CommonProps {
|
|
|
2254
2254
|
onApply: () => void;
|
|
2255
2255
|
clearLabel?: string;
|
|
2256
2256
|
applyLabel?: string;
|
|
2257
|
+
/**
|
|
2258
|
+
* Adds a Cancel button (secondary) before Apply, for a dropdown that stages
|
|
2259
|
+
* picks: it should close and drop them. Omit for no Cancel.
|
|
2260
|
+
*/
|
|
2261
|
+
onCancel?: () => void;
|
|
2262
|
+
cancelLabel?: string;
|
|
2257
2263
|
}
|
|
2258
2264
|
/**
|
|
2259
2265
|
* @pattern FilterDropdownFooter
|
|
@@ -2262,17 +2268,20 @@ interface FilterDropdownFooterProps extends CommonProps {
|
|
|
2262
2268
|
* @description Fixed Apply/Clear All footer for quick-filter dropdowns —
|
|
2263
2269
|
* pinned below the (independently scrollable) option list so it's always
|
|
2264
2270
|
* visible. Shared by the Media/Advertiser/Date/Group By/Time Increment quick
|
|
2265
|
-
* filters on Sports Dashboard, Publisher Intel, and Opportunities.
|
|
2271
|
+
* filters on Sports Dashboard, Publisher Intel, and Opportunities. With
|
|
2272
|
+
* `onCancel`, a secondary Cancel sits right before Apply (DataTable's header
|
|
2273
|
+
* menu), Clear all, if any, staying on the left.
|
|
2266
2274
|
* @tokens border-border-default
|
|
2267
|
-
* @a11y Clear and Apply are real Buttons with visible text as their
|
|
2268
|
-
* names, in that DOM order. It adds no roles or live regions of its own --
|
|
2275
|
+
* @a11y Clear, Cancel and Apply are real Buttons with visible text as their
|
|
2276
|
+
* accessible names, in that DOM order. It adds no roles or live regions of its own --
|
|
2269
2277
|
* the menu that contains it owns dismissal and focus.
|
|
2270
2278
|
* @usage
|
|
2271
2279
|
* ```tsx
|
|
2272
2280
|
* <FilterDropdownFooter onApply={handleApply} onClear={handleClear} />
|
|
2281
|
+
* <FilterDropdownFooter onApply={apply} onCancel={discard} />
|
|
2273
2282
|
* ```
|
|
2274
2283
|
*/
|
|
2275
|
-
declare function FilterDropdownFooter({ onClear, onApply, clearLabel, applyLabel, className, testIdPrefix, }: FilterDropdownFooterProps): react.JSX.Element;
|
|
2284
|
+
declare function FilterDropdownFooter({ onClear, onApply, clearLabel, applyLabel, onCancel, cancelLabel, className, testIdPrefix, }: FilterDropdownFooterProps): react.JSX.Element;
|
|
2276
2285
|
|
|
2277
2286
|
interface NameListModalProps extends CommonProps {
|
|
2278
2287
|
/** Classes on the dialog panel (the visible surface), not the backdrop. */
|
|
@@ -2469,7 +2478,11 @@ interface SortButtonProps<K extends string> extends CommonProps {
|
|
|
2469
2478
|
* that can never be sorted. Unlike `disabled`, nothing about it is a control.
|
|
2470
2479
|
*/
|
|
2471
2480
|
sortable?: boolean;
|
|
2472
|
-
/**
|
|
2481
|
+
/**
|
|
2482
|
+
* Matches the column's alignment, so a label that wraps lines up with the
|
|
2483
|
+
* cells under it. `right` (a figure column) also puts the arrow before the
|
|
2484
|
+
* label, so the label ends exactly where the figures do.
|
|
2485
|
+
*/
|
|
2473
2486
|
align?: "left" | "center" | "right";
|
|
2474
2487
|
/**
|
|
2475
2488
|
* What the column means, for a non-obvious measure ("Share of the set's
|
|
@@ -2494,7 +2507,10 @@ interface SortButtonProps<K extends string> extends CommonProps {
|
|
|
2494
2507
|
* table's default sort before anyone clicks. Every other sortable column's
|
|
2495
2508
|
* ArrowUpDown is hidden until the header is hovered or focused (faint on
|
|
2496
2509
|
* touch screens, which can't hover); its space is always kept, so nothing
|
|
2497
|
-
* shifts.
|
|
2510
|
+
* shifts. On a right-aligned (figure) column the arrow sits before the
|
|
2511
|
+
* label, its space kept on the left, so the label's right edge lines up
|
|
2512
|
+
* exactly with the figures under it; on a left-aligned column it follows the
|
|
2513
|
+
* label. A header with a `description` gets a dotted underline and shows
|
|
2498
2514
|
* the description on hover and focus (UXD-196).
|
|
2499
2515
|
* @tokens text-text-tertiary, text-brand-primaryAction, hover:text-text-primary, focus-visible:outline-border-focus, decoration-text-tertiary
|
|
2500
2516
|
* @dependencies lucide-react
|
|
@@ -2733,6 +2749,8 @@ declare function Tag({ children, className, testIdPrefix }: TagProps): react.JSX
|
|
|
2733
2749
|
* so nothing moves.
|
|
2734
2750
|
* @use under a full-page table: the results of a search or a list the user
|
|
2735
2751
|
* works through, where the total and the page size matter.
|
|
2752
|
+
* @use as the `footer` of a `sticky` DataTable, which pins it to the bottom
|
|
2753
|
+
* of the screen once the page scrolls.
|
|
2736
2754
|
* @avoid in a card or a compact list -- use Pager, which is only the page
|
|
2737
2755
|
* controls and fits the narrower space.
|
|
2738
2756
|
* @tokens text-dense, rounded-control, text-text-primary, text-text-secondary, text-text-tertiary, bg-subtle, hover:bg-subtle, hover:text-text-primary, focus-visible:outline-border-focus
|
|
@@ -2795,7 +2813,7 @@ type DateGranularity = 'month' | 'quarter' | 'year';
|
|
|
2795
2813
|
/** Resolve a label to its actual [start, end] span, ending at `today`. */
|
|
2796
2814
|
declare function resolveRange(label: string, today?: Date): [Date, Date];
|
|
2797
2815
|
/** @deprecated Use DateRangeFilter, with `granularity="month"` for monthly data. */
|
|
2798
|
-
declare function DateRangePicker({ defaultValue, granularity, align, presets, onChange, onRangeChange, showFooter, today, years, formatDate, formatRange, className, testIdPrefix, }: CommonProps & {
|
|
2816
|
+
declare function DateRangePicker({ defaultValue, granularity, align, presets, onChange, onRangeChange, showFooter, today, years, formatDate, formatRange, caption, className, testIdPrefix, }: CommonProps & {
|
|
2799
2817
|
defaultValue?: string;
|
|
2800
2818
|
align?: 'left' | 'right';
|
|
2801
2819
|
/**
|
|
@@ -2831,6 +2849,12 @@ declare function DateRangePicker({ defaultValue, granularity, align, presets, on
|
|
|
2831
2849
|
* `${formatDate(start)} – ${formatDate(end)}`.
|
|
2832
2850
|
*/
|
|
2833
2851
|
formatRange?: (start: Date, end: Date) => string;
|
|
2852
|
+
/**
|
|
2853
|
+
* A caption over the label, for a page header ("Date range"): the chip
|
|
2854
|
+
* reads caption over value like SelectFilter, and the dates move into a
|
|
2855
|
+
* tooltip on hover and focus. Leave out for the dates line on top.
|
|
2856
|
+
*/
|
|
2857
|
+
caption?: string;
|
|
2834
2858
|
}): react.JSX.Element;
|
|
2835
2859
|
type DateRangePickerProps = Parameters<typeof DateRangePicker>[0];
|
|
2836
2860
|
|
|
@@ -2868,7 +2892,10 @@ interface MultiSelectGroup {
|
|
|
2868
2892
|
* there's no error state, the click just does nothing. Group parents are
|
|
2869
2893
|
* tri-state and toggle all of their children in one action.
|
|
2870
2894
|
* @a11y Trigger is a <button> with aria-expanded; the menu is role="dialog" and
|
|
2871
|
-
* Escape closes it.
|
|
2895
|
+
* Escape closes it. Each option row is a button with role="checkbox" and
|
|
2896
|
+
* aria-checked, so screen readers hear whether it's ticked; a group parent
|
|
2897
|
+
* with some children ticked is aria-checked="mixed". The box drawn inside
|
|
2898
|
+
* (CheckBoxBox) is aria-hidden. Focus
|
|
2872
2899
|
* is not moved into the menu on open, so keyboard users tab into it in DOM
|
|
2873
2900
|
* order. The loading rows carry role="status" and the error line role="alert".
|
|
2874
2901
|
* @behavior `valueLabel` replaces the trigger's value text, for when a picked
|
|
@@ -2877,17 +2904,40 @@ interface MultiSelectGroup {
|
|
|
2877
2904
|
* definition under an option's label, keyed by option or group id, for a term
|
|
2878
2905
|
* the user may not know. `note` is one line of explanation under the list.
|
|
2879
2906
|
* Clear all applies the default at once and closes the menu.
|
|
2907
|
+
* @behavior `hideCaption` drops the visible caption for a 40px trigger with
|
|
2908
|
+
* only the value, SelectFilter's `hideCaption`; the caption becomes the
|
|
2909
|
+
* trigger's aria-label. `max` caps the ticks: at the cap every unticked
|
|
2910
|
+
* option greys out (text-text-tertiary, a disabled box, no hover wash) and
|
|
2911
|
+
* keeps its place in the tab order with aria-disabled; hover or keyboard
|
|
2912
|
+
* focus shows why in a Tooltip (`maxReason`, default "Up to {max}. Untick one
|
|
2913
|
+
* to add another."), and a click does nothing, live or with `showFooter`. A
|
|
2914
|
+
* group parent ticks all its children or none, so a parent whose unticked
|
|
2915
|
+
* children wouldn't all fit under the cap greys out the same way; unticking
|
|
2916
|
+
* a full parent always works.
|
|
2880
2917
|
* @behavior `loading` swaps the list for grey placeholder rows and `error`
|
|
2881
2918
|
* for a plain "Couldn't load options." line with a Try again link
|
|
2882
2919
|
* (`onRetry`). The trigger never changes in either state.
|
|
2920
|
+
* @behavior `size="sm"` is SelectFilter's compact trigger: 32px, 13px
|
|
2921
|
+
* (text-dense), value only, the caption as its aria-label; `inlineCaption`
|
|
2922
|
+
* shows "Caption: value" instead. The menu doesn't change.
|
|
2923
|
+
* @use `hideCaption` in a toolbar above a table, beside a SearchBar `md`,
|
|
2924
|
+
* when the value names itself; `max` with `valueLabel` ("Charted · 3 of 3")
|
|
2925
|
+
* for picking what a chart above the table shows.
|
|
2926
|
+
* @use `size="sm"` for a control in a card or panel header, beside a
|
|
2927
|
+
* SelectFilter `size="sm"` (the chart's "Charted · 2 of 3" next to its
|
|
2928
|
+
* "Spend"); add `inlineCaption` when the value alone doesn't say what it sets.
|
|
2883
2929
|
* @usage
|
|
2884
2930
|
* ```tsx
|
|
2885
2931
|
* <MultiSelectFilter caption="Media" options={mediaOptions} selected={selected} onChange={setSelected} />
|
|
2932
|
+
* <MultiSelectFilter caption="Charted brands" hideCaption max={3} valueLabel={`Charted · ${picked.length} of 3`}
|
|
2933
|
+
* options={brands} selected={picked} onChange={setPicked} />
|
|
2934
|
+
* <MultiSelectFilter caption="Charted brands" size="sm" max={3} valueLabel={`Charted · ${picked.length} of 3`}
|
|
2935
|
+
* options={brands} selected={picked} onChange={setPicked} />
|
|
2886
2936
|
* <MultiSelectFilter caption="Market" options={markets} selected={selected} onChange={setSelected}
|
|
2887
2937
|
* hints={{ national: "Ads that run nationwide" }} note="Nothing picked means every market." />
|
|
2888
2938
|
* ```
|
|
2889
2939
|
*/
|
|
2890
|
-
declare function MultiSelectFilter({ caption, options, groups, counts, variant, selected, onChange, allLabel, searchable, searchPlaceholder, align, fullIsAll, min, icon, showFooter, clearValue, menuWidthClass, plainParent, fullWidth, loading, error, onRetry, valueLabel, hints, note, className, testIdPrefix, }: Omit<CommonProps, 'testIdPrefix'> & {
|
|
2940
|
+
declare function MultiSelectFilter({ caption, options, groups, counts, variant, selected, onChange, allLabel, searchable, searchPlaceholder, align, fullIsAll, min, icon, showFooter, clearValue, menuWidthClass, plainParent, fullWidth, loading, error, onRetry, valueLabel, hints, note, hideCaption, size, inlineCaption, max, maxReason, className, testIdPrefix, }: Omit<CommonProps, 'testIdPrefix'> & {
|
|
2891
2941
|
/**
|
|
2892
2942
|
* `data-testid` on the wrapper, and the prefix for the trigger
|
|
2893
2943
|
* (`${testIdPrefix}-trigger`) and the open menu (`${testIdPrefix}-popover`).
|
|
@@ -2954,6 +3004,32 @@ declare function MultiSelectFilter({ caption, options, groups, counts, variant,
|
|
|
2954
3004
|
hints?: Record<string, string>;
|
|
2955
3005
|
/** One line of explanation under the list, above the footer. */
|
|
2956
3006
|
note?: React.ReactNode;
|
|
3007
|
+
/**
|
|
3008
|
+
* Drop the visible caption for a 40px trigger showing only the value, as
|
|
3009
|
+
* SelectFilter's `hideCaption` -- for a toolbar above a table, where the
|
|
3010
|
+
* value names itself ("Charted · 3 of 7"; pass it as `valueLabel`). The
|
|
3011
|
+
* caption becomes the trigger's accessible name.
|
|
3012
|
+
*/
|
|
3013
|
+
hideCaption?: boolean;
|
|
3014
|
+
/**
|
|
3015
|
+
* 'sm' is SelectFilter's compact 32px trigger, value only (the caption
|
|
3016
|
+
* becomes its accessible name), for a control in a card or panel header.
|
|
3017
|
+
* `hideCaption` changes nothing at this size. Defaults to 'md'.
|
|
3018
|
+
*/
|
|
3019
|
+
size?: 'md' | 'sm';
|
|
3020
|
+
/**
|
|
3021
|
+
* With `size="sm"`: show the caption in the trigger, "Charted: 2 of 3",
|
|
3022
|
+
* as SelectFilter's `inlineCaption`, for a value that doesn't say what it sets.
|
|
3023
|
+
*/
|
|
3024
|
+
inlineCaption?: boolean;
|
|
3025
|
+
/**
|
|
3026
|
+
* The most options that can be ticked. Once that many are, the others grey
|
|
3027
|
+
* out and say why on hover and focus (`maxReason`); ticking past it does
|
|
3028
|
+
* nothing, live or with `showFooter`.
|
|
3029
|
+
*/
|
|
3030
|
+
max?: number;
|
|
3031
|
+
/** Why the other options can't be ticked at the cap. Default "Up to {max}. Untick one to add another." */
|
|
3032
|
+
maxReason?: string;
|
|
2957
3033
|
}): react.JSX.Element;
|
|
2958
3034
|
type MultiSelectFilterProps = Parameters<typeof MultiSelectFilter>[0];
|
|
2959
3035
|
|
|
@@ -3512,8 +3588,8 @@ interface DrawerProps extends CommonProps {
|
|
|
3512
3588
|
* @behavior Portals to <body>. Slides in from the right over 200ms while the
|
|
3513
3589
|
* scrim fades in, and slides back out before it unmounts; with reduced motion
|
|
3514
3590
|
* it appears and goes without moving. Escape, a click on the dimmed page and
|
|
3515
|
-
* the × all call `onClose` --
|
|
3516
|
-
*
|
|
3591
|
+
* the × all call `onClose` -- FilterDrawer asks "Discard changes?" there
|
|
3592
|
+
* first when it holds picks not yet applied. Focus moves to the first field (else the first footer
|
|
3517
3593
|
* button) on open, Tab stays inside, and focus goes back to whatever opened it
|
|
3518
3594
|
* on close. The page behind stops scrolling while it's open.
|
|
3519
3595
|
* @a11y role="dialog" with aria-modal, named by its title and described by
|
|
@@ -3543,6 +3619,36 @@ interface DrawerProps extends CommonProps {
|
|
|
3543
3619
|
*/
|
|
3544
3620
|
declare function Drawer({ open, onClose, title, description, size, footer, children, className, testIdPrefix }: DrawerProps): react.ReactPortal | null;
|
|
3545
3621
|
|
|
3622
|
+
/** One choice in a header menu section: "Subsidiary", "League". */
|
|
3623
|
+
interface DataTableHeaderMenuOption {
|
|
3624
|
+
id: string;
|
|
3625
|
+
label: string;
|
|
3626
|
+
}
|
|
3627
|
+
/** A pick-one section of the name column's header menu. */
|
|
3628
|
+
interface DataTableHeaderMenuChoice<V = string> {
|
|
3629
|
+
/** The section's heading. Defaults: "Group rows by", "Then break out by". */
|
|
3630
|
+
label?: string;
|
|
3631
|
+
options: DataTableHeaderMenuOption[];
|
|
3632
|
+
value: V;
|
|
3633
|
+
onChange: (id: V) => void;
|
|
3634
|
+
}
|
|
3635
|
+
/**
|
|
3636
|
+
* Turns the name column's header into a dropdown for how the rows are built:
|
|
3637
|
+
* what they're grouped by, what each group breaks out into, and A to Z / Z to
|
|
3638
|
+
* A. The header reads the choices ("Subsidiary › League").
|
|
3639
|
+
*/
|
|
3640
|
+
interface DataTableHeaderMenu {
|
|
3641
|
+
/** What each row is: "Subsidiary", "Brand". One pick, required. */
|
|
3642
|
+
groupBy: DataTableHeaderMenuChoice<string>;
|
|
3643
|
+
/**
|
|
3644
|
+
* What each row breaks out into, as sub-rows: "League". The menu adds a
|
|
3645
|
+
* "None" row first, which is `null`. An option equal to the group-by is
|
|
3646
|
+
* unavailable; picking a group-by equal to the break-out sets it to None
|
|
3647
|
+
* (staged, like every pick, until Apply).
|
|
3648
|
+
*/
|
|
3649
|
+
breakOutBy?: DataTableHeaderMenuChoice<string | null>;
|
|
3650
|
+
}
|
|
3651
|
+
|
|
3546
3652
|
type DataTableColumnWidth = "fill" | "sm" | "md" | "lg";
|
|
3547
3653
|
type DataTableDensity = "default" | "compact";
|
|
3548
3654
|
interface DataTableColumn<T, K extends string = string> {
|
|
@@ -3560,6 +3666,13 @@ interface DataTableColumn<T, K extends string = string> {
|
|
|
3560
3666
|
numeric?: boolean;
|
|
3561
3667
|
/** The rank (1, 2, 3 …) before the name: narrow, right-aligned, grey. */
|
|
3562
3668
|
rank?: boolean;
|
|
3669
|
+
/**
|
|
3670
|
+
* A column that sits before the name (a trend sparkline): put it before the
|
|
3671
|
+
* name in `columns`. On a wide table it pins with the name, like the
|
|
3672
|
+
* checkbox, chevron and rank. Left-aligned unless `numeric`; `sm` (96)
|
|
3673
|
+
* wide unless `width` says otherwise. Blank on sub-rows and the totals row.
|
|
3674
|
+
*/
|
|
3675
|
+
lead?: boolean;
|
|
3563
3676
|
/**
|
|
3564
3677
|
* What the column means, for a non-obvious measure only ("Share of the
|
|
3565
3678
|
* set's total spend"). Dotted underline on the header; shows on hover and
|
|
@@ -3583,6 +3696,16 @@ interface DataTableColumn<T, K extends string = string> {
|
|
|
3583
3696
|
* ("You") in the header or cells: the tint isn't the only cue.
|
|
3584
3697
|
*/
|
|
3585
3698
|
highlight?: boolean;
|
|
3699
|
+
/**
|
|
3700
|
+
* The name column only: its header becomes a dropdown ("Subsidiary ›
|
|
3701
|
+
* League") for what the rows are grouped by, what they break out into, and
|
|
3702
|
+
* A to Z / Z to A. A click opens it, never sorts. Picks are staged until
|
|
3703
|
+
* Apply, which calls each changed choice's `onChange` (the sort calls the
|
|
3704
|
+
* table's `onSortChange`); Cancel and every other close drop them. The
|
|
3705
|
+
* header shows the choices instead of `label`, which names the panel for
|
|
3706
|
+
* screen readers.
|
|
3707
|
+
*/
|
|
3708
|
+
headerMenu?: DataTableHeaderMenu;
|
|
3586
3709
|
}
|
|
3587
3710
|
interface DataTableProps<T, K extends string = string> extends CommonProps {
|
|
3588
3711
|
columns: DataTableColumn<T, K>[];
|
|
@@ -3713,10 +3836,29 @@ interface DataTableProps<T, K extends string = string> extends CommonProps {
|
|
|
3713
3836
|
onRetry?: () => void;
|
|
3714
3837
|
/** What the body shows when `rows` is empty. Defaults to NoResultsEmptyState. */
|
|
3715
3838
|
empty?: ReactNode;
|
|
3716
|
-
/** Caps the height so the body scrolls under a pinned header: sm 320, md 480, lg 640. */
|
|
3839
|
+
/** Caps the height so the body scrolls under a pinned header: sm 320, md 480, lg 640. Ignored with `sticky`. */
|
|
3717
3840
|
maxHeight?: "sm" | "md" | "lg";
|
|
3718
|
-
/**
|
|
3841
|
+
/**
|
|
3842
|
+
* Inside the frame, under the rows -- a `Pager`. A full-page table puts
|
|
3843
|
+
* `TablePagination` after the table instead; with `sticky`, pass it here
|
|
3844
|
+
* and the table pins it to the bottom of the screen once the page scrolls.
|
|
3845
|
+
*/
|
|
3719
3846
|
footer?: ReactNode;
|
|
3847
|
+
/**
|
|
3848
|
+
* For a full-page data table only -- the table that is the page's main
|
|
3849
|
+
* content; never in a modal, a drawer or a dashboard card. The header row
|
|
3850
|
+
* stays in view while the page scrolls, right under the page's StickyBar,
|
|
3851
|
+
* and `footer` (the page's TablePagination) sits under the frame, pinned to
|
|
3852
|
+
* the bottom of the screen once the page starts to scroll. Pinned first
|
|
3853
|
+
* columns and sideways scrolling work as usual.
|
|
3854
|
+
*/
|
|
3855
|
+
sticky?: boolean;
|
|
3856
|
+
/**
|
|
3857
|
+
* With `sticky`: how far from the top of the screen the header row sticks,
|
|
3858
|
+
* in pixels. Default: the height of the page's StickyBar, or 0 without one.
|
|
3859
|
+
* Set it for a page with its own sticky bar that isn't a StickyBar.
|
|
3860
|
+
*/
|
|
3861
|
+
stickyTop?: number;
|
|
3720
3862
|
className?: string;
|
|
3721
3863
|
/** `data-testid` on the frame; each sortable header's button gets `${testIdPrefix}-sort-<key>`. */
|
|
3722
3864
|
testIdPrefix?: string;
|
|
@@ -3752,7 +3894,13 @@ declare function TableLink({ className, ...props }: AnchorHTMLAttributes<HTMLAnc
|
|
|
3752
3894
|
* in place, as a panel or as sub-rows in the same columns, or open a side
|
|
3753
3895
|
* panel on click; the name links to the entity's overview (UXD-196). A
|
|
3754
3896
|
* totals row can sit first, and the reader's own brand can be marked with a
|
|
3755
|
-
* light brand fill on its row or column.
|
|
3897
|
+
* light brand fill on its row or column. A full-page table (`sticky`) keeps
|
|
3898
|
+
* its header row in view under the page's StickyBar and pins its pager to the
|
|
3899
|
+
* bottom of the screen once the page scrolls. A table wider than its space
|
|
3900
|
+
* always shows a thin scroll bar. A figure column's sort arrow sits before
|
|
3901
|
+
* its label, so the label ends where the figures do. The name column's
|
|
3902
|
+
* header can be a dropdown (`headerMenu`) for how the rows are grouped and
|
|
3903
|
+
* broken out, with A to Z / Z to A.
|
|
3756
3904
|
* @variant default - Default. Tables people read and act on.
|
|
3757
3905
|
* @variant compact - Reference data and long lists.
|
|
3758
3906
|
* @tokens rounded-card, rounded-small, border, border-border-default, bg-surface,
|
|
@@ -3763,11 +3911,19 @@ declare function TableLink({ className, ...props }: AnchorHTMLAttributes<HTMLAnc
|
|
|
3763
3911
|
* animate-pulse, border-t, decoration-text-tertiary, rounded-control,
|
|
3764
3912
|
* focus-visible:outline-border-focus, border-r-border-default,
|
|
3765
3913
|
* bg-brand-primaryTint, pl-10, pl-9, cursor-not-allowed, sr-only,
|
|
3766
|
-
* bg-linear-to-r, from-brand-primaryAction/10, border-border-focus
|
|
3914
|
+
* bg-linear-to-r, from-brand-primaryAction/10, border-border-focus,
|
|
3915
|
+
* [&::-webkit-scrollbar-thumb]:bg-border-strong, bg-canvas,
|
|
3916
|
+
* duration-(--mr-motion-duration-interactive), ease-interactive,
|
|
3917
|
+
* supports-[not_selector(::-webkit-scrollbar)]:[scrollbar-color:var(--mr-color-border-strong)_var(--mr-color-subtle)],
|
|
3918
|
+
* px-2, hover:bg-border-default, aria-expanded:bg-border-default, z-dropdown,
|
|
3919
|
+
* shadow-overlay
|
|
3767
3920
|
* @behavior Sorting: a `sortable` column's header gets a SortButton; clicks
|
|
3768
3921
|
* cycle the column's `firstDir`, then the reverse, then back to
|
|
3769
3922
|
* `defaultSort` (`cycleSort`), and call `onSortChange`. The sorted column
|
|
3770
|
-
* always shows its arrow; the others show theirs on hover and focus.
|
|
3923
|
+
* always shows its arrow; the others show theirs on hover and focus. On a
|
|
3924
|
+
* numeric column the arrow sits before the label (its space kept while
|
|
3925
|
+
* hidden), so the label's right edge lines up with the figures; on a text
|
|
3926
|
+
* column it follows the label. The table doesn't sort the rows
|
|
3771
3927
|
* itself: sort them before passing `rows`. `loading` keeps the header and
|
|
3772
3928
|
* draws `loadingRows` skeleton rows. An empty `rows` keeps the header and
|
|
3773
3929
|
* shows `empty` in one cell across every column, padded 48px top and bottom
|
|
@@ -3775,6 +3931,7 @@ declare function TableLink({ className, ...props }: AnchorHTMLAttributes<HTMLAnc
|
|
|
3775
3931
|
* A `cell` that returns nothing shows `NoValue` with the column's `missing`
|
|
3776
3932
|
* reason ("No data"); return `<NoValue reason="New this period" />` for
|
|
3777
3933
|
* another reason. A real zero is "0", never a dash.
|
|
3934
|
+
* The chevron column is 40px wide in both densities, the 24px button centred.
|
|
3778
3935
|
* With `renderExpanded`, a chevron at the row's start opens the row; a click
|
|
3779
3936
|
* anywhere else on it does too, except on its own controls (links, buttons,
|
|
3780
3937
|
* checkboxes, menus) or while selecting text. Several rows can be open;
|
|
@@ -3814,9 +3971,45 @@ declare function TableLink({ className, ...props }: AnchorHTMLAttributes<HTMLAnc
|
|
|
3814
3971
|
* with a limit on ticks, where ticking every row would break it.
|
|
3815
3972
|
* `selectionBar={false}` leaves out the "3 selected … Clear" bar, for a
|
|
3816
3973
|
* picker table where ticking chooses what a chart shows.
|
|
3974
|
+
* A `lead` column (a trend sparkline) sits before the name: it counts as part
|
|
3975
|
+
* of the row's start, so it pins with the checkbox, chevron, rank and name,
|
|
3976
|
+
* keeps its own alignment (left unless numeric), is `sm` wide by default, and
|
|
3977
|
+
* is blank on sub-rows and the totals row.
|
|
3817
3978
|
* `maxHeight` makes the body
|
|
3818
3979
|
* scroll under a pinned header; wide tables always scroll sideways rather than
|
|
3819
|
-
* squeeze
|
|
3980
|
+
* squeeze, with a thin scroll bar at the bottom of the frame on every
|
|
3981
|
+
* computer (a rounded border-strong thumb on a subtle track; drawn by the
|
|
3982
|
+
* table, so a Mac trackpad's hide-while-idle setting doesn't hide it; Firefox
|
|
3983
|
+
* gets the same colours and follows the system setting).
|
|
3984
|
+
* `headerMenu` on the name column turns its header into a quiet dropdown
|
|
3985
|
+
* trigger reading the current choices ("Subsidiary › League", a chevron
|
|
3986
|
+
* after), with a darker fill on hover and while open. A click opens a panel
|
|
3987
|
+
* (never sorts) with menu rows in three pick-one groups: "Group rows by",
|
|
3988
|
+
* "Then break out by" ("None" first, then the options; the one equal to the
|
|
3989
|
+
* staged group-by is unavailable), and "Sort" (A to Z / Z to A, ticked when
|
|
3990
|
+
* the table is sorted by this column; left out without `onSortChange`), and
|
|
3991
|
+
* a FilterDropdownFooter with Cancel and Apply. Picks are staged: the ticks
|
|
3992
|
+
* move, the table doesn't. Apply calls `onChange` only for what changed (the
|
|
3993
|
+
* sort calls `onSortChange` with this column) and closes; with nothing
|
|
3994
|
+
* changed it just closes. Cancel, Escape, a click outside and tabbing out
|
|
3995
|
+
* close it and drop the staged picks, without asking; it reopens on the
|
|
3996
|
+
* applied values. Picking a group-by equal to the break-out stages the
|
|
3997
|
+
* break-out back to None. The panel is portalled, so the frame never clips
|
|
3998
|
+
* it. `headerMenu` wins over `sortable` on the same column.
|
|
3999
|
+
* `sticky` (a full-page table only): once the header row scrolls up to the
|
|
4000
|
+
* page's StickyBar (or `stickyTop` pixels from the top), a copy of it stays
|
|
4001
|
+
* there, right under the bar, until the last row goes by. The copy scrolls
|
|
4002
|
+
* sideways with the frame, keeps the pinned columns and their edge, and its
|
|
4003
|
+
* sort buttons work with the mouse. The frame's own scroll bar stays at the
|
|
4004
|
+
* bottom of the frame. `footer` (the page's TablePagination) sits under the
|
|
4005
|
+
* frame on the page background, `sticky` to the bottom of the screen: hidden
|
|
4006
|
+
* at first, it slides up once the page scrolls and stays pinned to the
|
|
4007
|
+
* end, where it settles under the last row without a jump; a line above it
|
|
4008
|
+
* while pinned. Scrolled back to the very top, it hides again, as on first
|
|
4009
|
+
* load. A table that fits on screen shows it under the last row from
|
|
4010
|
+
* the start, so it's never out of reach; it's also shown while it has
|
|
4011
|
+
* keyboard focus. With reduced motion it appears without moving. `maxHeight`
|
|
4012
|
+
* is ignored with `sticky`.
|
|
3820
4013
|
* @a11y A real <table>. Named by `title` (aria-labelledby) or `aria-label`.
|
|
3821
4014
|
* Sorted columns carry aria-sort on the header cell; the sort control is a
|
|
3822
4015
|
* button inside it. A header's `info` shows on hover and keyboard focus and
|
|
@@ -3838,6 +4031,20 @@ declare function TableLink({ className, ...props }: AnchorHTMLAttributes<HTMLAnc
|
|
|
3838
4031
|
* The brand fill is never the only cue: the app puts a "You" badge in the
|
|
3839
4032
|
* row or column header beside it, and colour alone says nothing to someone
|
|
3840
4033
|
* who can't see it. `NoValue` reads its reason, not "dash". `loading` sets aria-busy.
|
|
4034
|
+
* The `headerMenu` trigger is a button with aria-haspopup="dialog" and
|
|
4035
|
+
* aria-expanded (the panel holds Cancel and Apply, so it's a dialog, as
|
|
4036
|
+
* MultiSelectFilter's, not a menu); Enter, Space or the down arrow opens it
|
|
4037
|
+
* and focus moves to the first group's picked row. Each group is a
|
|
4038
|
+
* radiogroup named by its heading, its rows role="radio" with aria-checked
|
|
4039
|
+
* and one tab stop; the arrows, Home and End move the pick within a group,
|
|
4040
|
+
* Tab goes to the next group, then Cancel and Apply. Escape, Cancel, Apply
|
|
4041
|
+
* and tabbing past either end close it and return focus to the trigger. The
|
|
4042
|
+
* <th> keeps aria-sort. The "›" is
|
|
4043
|
+
* hidden from screen readers, which hear "Subsidiary then League"; the panel
|
|
4044
|
+
* is named by the column's `label`.
|
|
4045
|
+
* With `sticky`, the header copy is aria-hidden and out of the tab order
|
|
4046
|
+
* (tabindex -1 on its buttons): screen readers and the keyboard use the real
|
|
4047
|
+
* header, so nothing is announced or reached twice.
|
|
3841
4048
|
* @use for every table of rows and columns, in a page or in a card.
|
|
3842
4049
|
* @use `title` for the table's name: it sits above the frame as a Section
|
|
3843
4050
|
* heading, with `subtitle` and `action` beside it. On a dashboard, beside
|
|
@@ -3848,6 +4055,11 @@ declare function TableLink({ className, ...props }: AnchorHTMLAttributes<HTMLAnc
|
|
|
3848
4055
|
* the cell of a change column. A bar or badge beside a figure goes before
|
|
3849
4056
|
* it, so the figure ends at the right edge.
|
|
3850
4057
|
* @use `rank` for a 1, 2, 3 … column before the name.
|
|
4058
|
+
* @use `headerMenu` on the name column when the screen lets people choose
|
|
4059
|
+
* what the rows are (group by, break out by): the header is where the choice
|
|
4060
|
+
* shows, next to the rows it shapes.
|
|
4061
|
+
* @use `lead` for another column before the name (a trend sparkline); it
|
|
4062
|
+
* pins with the name on a wide table and is blank on sub-rows and totals.
|
|
3851
4063
|
* @use a total column right after the name, styled like every other figure:
|
|
3852
4064
|
* no fill, no bold.
|
|
3853
4065
|
* @use `info` only for non-obvious measures (share of spend, index), never
|
|
@@ -3855,6 +4067,8 @@ declare function TableLink({ className, ...props }: AnchorHTMLAttributes<HTMLAnc
|
|
|
3855
4067
|
* @use `TableLink` for the name, to the entity's overview; end an expanded
|
|
3856
4068
|
* row with a "View overview" link.
|
|
3857
4069
|
* @use `footer={<Pager />}` in a card; `TablePagination` after a full-page table.
|
|
4070
|
+
* @use `sticky` with `footer={<TablePagination />}` for the table that is a
|
|
4071
|
+
* page's main content, under the page's filters in a StickyBar.
|
|
3858
4072
|
* @use `subRows` for children that share the parent's columns (products
|
|
3859
4073
|
* under a brand); `renderExpanded` for anything else (a trend, a list).
|
|
3860
4074
|
* @use `totalsRow` for a sum of the rows in a totals row (not a total column).
|
|
@@ -3870,6 +4084,8 @@ declare function TableLink({ className, ...props }: AnchorHTMLAttributes<HTMLAnc
|
|
|
3870
4084
|
* @avoid zebra stripes, or a row click that navigates: a row click opens the
|
|
3871
4085
|
* row or a side panel, and only the name goes to another page.
|
|
3872
4086
|
* @avoid `onRowClick` together with `renderExpanded` or `subRows`.
|
|
4087
|
+
* @avoid `sticky` in a modal, a drawer or a dashboard card: only a full-page
|
|
4088
|
+
* data table sticks.
|
|
3873
4089
|
* @avoid a layout of label/value pairs -- that's a description list, not a table.
|
|
3874
4090
|
* @usage
|
|
3875
4091
|
* ```tsx
|
|
@@ -3913,9 +4129,71 @@ declare function TableLink({ className, ...props }: AnchorHTMLAttributes<HTMLAnc
|
|
|
3913
4129
|
* selectAll={false}
|
|
3914
4130
|
* columns={columns}
|
|
3915
4131
|
* />
|
|
4132
|
+
*
|
|
4133
|
+
* // The name column's header picks what the rows are
|
|
4134
|
+
* const nameColumn = {
|
|
4135
|
+
* key: "name", label: "Name", cell: (r) => r.name,
|
|
4136
|
+
* headerMenu: {
|
|
4137
|
+
* groupBy: { options: [{ id: "subsidiary", label: "Subsidiary" }, { id: "brand", label: "Brand" }], value: groupBy, onChange: setGroupBy },
|
|
4138
|
+
* breakOutBy: { options: [{ id: "league", label: "League" }, { id: "brand", label: "Brand" }], value: breakOut, onChange: setBreakOut },
|
|
4139
|
+
* },
|
|
4140
|
+
* }
|
|
4141
|
+
*
|
|
4142
|
+
* // A full-page table: the header stays under the filters, the pager at the bottom
|
|
4143
|
+
* <StickyBar><FilterChipBar … /></StickyBar>
|
|
4144
|
+
* <DataTable
|
|
4145
|
+
* sticky
|
|
4146
|
+
* aria-label="Advertisers"
|
|
4147
|
+
* rowKey={(r) => r.id}
|
|
4148
|
+
* rows={pageRows}
|
|
4149
|
+
* columns={columns}
|
|
4150
|
+
* footer={<TablePagination page={page} perPage={25} totalItems={total} onPageChange={setPage} />}
|
|
4151
|
+
* />
|
|
3916
4152
|
* ```
|
|
3917
4153
|
*/
|
|
3918
|
-
declare function DataTable<T, K extends string = string>({ columns, rows, rowKey, title, subtitle, action, variant, titleAs, sort, onSortChange, defaultSort, renderExpanded: renderExpandedProp, canExpand, subRows: subRowsProp, subRowNoun, totalsRow, totalsLabel, onRowClick, rowClickLabel, highlightRow, rowLabel, selected, onSelectedChange, totalCount, onSelectAll, selectedCount, selectionActions, selectionDisabled, selectionBar, selectAll, density, loading, loadingRows, refreshing, onRetry, empty, maxHeight, footer, className, testIdPrefix, ...rest }: DataTableProps<T, K>): react.JSX.Element;
|
|
4154
|
+
declare function DataTable<T, K extends string = string>({ columns, rows, rowKey, title, subtitle, action, variant, titleAs, sort, onSortChange, defaultSort, renderExpanded: renderExpandedProp, canExpand, subRows: subRowsProp, subRowNoun, totalsRow, totalsLabel, onRowClick, rowClickLabel, highlightRow, rowLabel, selected, onSelectedChange, totalCount, onSelectAll, selectedCount, selectionActions, selectionDisabled, selectionBar, selectAll, density, loading, loadingRows, refreshing, onRetry, empty, maxHeight: maxHeightProp, footer, sticky, stickyTop, className, testIdPrefix, ...rest }: DataTableProps<T, K>): react.JSX.Element;
|
|
4155
|
+
|
|
4156
|
+
interface StickyBarProps extends CommonProps {
|
|
4157
|
+
/** The page's filter bar: AllFiltersButton, the chips, the date range. */
|
|
4158
|
+
children: ReactNode;
|
|
4159
|
+
className?: string;
|
|
4160
|
+
}
|
|
4161
|
+
/**
|
|
4162
|
+
* @pattern StickyBar
|
|
4163
|
+
* @since 0.64.0
|
|
4164
|
+
* @description Keeps a full-page table's filter bar at the top of the screen
|
|
4165
|
+
* while the page scrolls. Once pinned it becomes a full-width band in the
|
|
4166
|
+
* page colour, edge to edge of what scrolls, with a hairline under it and no
|
|
4167
|
+
* shadow, so rows scrolling under it never show through; at rest there is no
|
|
4168
|
+
* band. A DataTable with `sticky` on the same page finds it and
|
|
4169
|
+
* pins its header row right under it, whatever the bar's height. The filter
|
|
4170
|
+
* bar inside keeps its own card or row.
|
|
4171
|
+
* @tokens bg-canvas, border-b, border-border-default
|
|
4172
|
+
* @behavior Sticks to the very top of whatever the page scrolls in (the
|
|
4173
|
+
* window or the app's scrolling `<main>`, past that box's own padding), and
|
|
4174
|
+
* only within its parent: put it in the
|
|
4175
|
+
* same column as the table, so it stays stuck down to the table's last row.
|
|
4176
|
+
* While stuck it carries `data-stuck`, reaches out past its column's sides to
|
|
4177
|
+
* the scroll box's edges (the filter bar inside stays where it was) and shows
|
|
4178
|
+
* its hairline (border-border-default; transparent at rest, so nothing moves). DataTable measures the bar's height as it
|
|
4179
|
+
* changes (chips wrapping onto a second line), so its header stays flush
|
|
4180
|
+
* under it.
|
|
4181
|
+
* @a11y Adds no role or landmark: the filter bar inside keeps its own.
|
|
4182
|
+
* @use for the filter bar above a full-page data table with `sticky`.
|
|
4183
|
+
* @avoid in a modal, a drawer or a dashboard card -- only a page's own
|
|
4184
|
+
* filters stick.
|
|
4185
|
+
* @avoid more than one StickyBar on a page.
|
|
4186
|
+
* @usage
|
|
4187
|
+
* ```tsx
|
|
4188
|
+
* <div className="flex flex-col gap-4">
|
|
4189
|
+
* <StickyBar>
|
|
4190
|
+
* <FilterChipBar … />
|
|
4191
|
+
* </StickyBar>
|
|
4192
|
+
* <DataTable sticky … footer={<TablePagination … />} />
|
|
4193
|
+
* </div>
|
|
4194
|
+
* ```
|
|
4195
|
+
*/
|
|
4196
|
+
declare function StickyBar({ children, className, testIdPrefix }: StickyBarProps): react.JSX.Element;
|
|
3919
4197
|
|
|
3920
4198
|
type MediaType = "TV" | "CTV" | "Digital" | "Social" | "Radio" | "Newspaper" | "Magazine";
|
|
3921
4199
|
interface MediaLabelProps extends CommonProps {
|
|
@@ -4153,7 +4431,12 @@ interface FilterDrawerSection<Id extends string = string> {
|
|
|
4153
4431
|
}
|
|
4154
4432
|
interface FilterDrawerProps<Id extends string = string> extends CommonProps {
|
|
4155
4433
|
open: boolean;
|
|
4156
|
-
/**
|
|
4434
|
+
/**
|
|
4435
|
+
* Closes the drawer: Cancel, and the ×, Escape or the dimmed page. Those
|
|
4436
|
+
* three first ask "Discard changes?" while there are picks not yet
|
|
4437
|
+
* applied to the page (`hasChanges`); Discard then calls this. Unapplied
|
|
4438
|
+
* picks are dropped.
|
|
4439
|
+
*/
|
|
4157
4440
|
onClose: () => void;
|
|
4158
4441
|
sections: FilterDrawerSection<Id>[];
|
|
4159
4442
|
/** One filter's contents, shown when its row is opened. The page owns the draft. */
|
|
@@ -4173,6 +4456,14 @@ interface FilterDrawerProps<Id extends string = string> extends CommonProps {
|
|
|
4173
4456
|
focus?: Id | null;
|
|
4174
4457
|
/** Drawer width: sm 440 (default) for filters; md 640 when a filter holds a deep hierarchy. */
|
|
4175
4458
|
size?: DrawerSize;
|
|
4459
|
+
/**
|
|
4460
|
+
* Whether the draft holds picks the page doesn't show yet: closing with the
|
|
4461
|
+
* ×, Escape or the dimmed page asks "Discard changes?" while it's true.
|
|
4462
|
+
* Pass it from the page (draft differs from what's applied). Left out, the
|
|
4463
|
+
* drawer compares each filter's `count` and `badge` with what they were
|
|
4464
|
+
* when it opened, which misses a swap that keeps the same count.
|
|
4465
|
+
*/
|
|
4466
|
+
hasChanges?: boolean;
|
|
4176
4467
|
}
|
|
4177
4468
|
/**
|
|
4178
4469
|
* @pattern FilterDrawer
|
|
@@ -4183,8 +4474,9 @@ interface FilterDrawerProps<Id extends string = string> extends CommonProps {
|
|
|
4183
4474
|
* that filter as the whole panel, with a back arrow and a line under its
|
|
4184
4475
|
* title. The page keeps the draft and renders each filter's contents;
|
|
4185
4476
|
* FilterDrawer owns the list, the navigation, the slide between the two and
|
|
4186
|
-
* the footer: Clear inside a filter; Clear all, Cancel and See
|
|
4187
|
-
* results on the list.
|
|
4477
|
+
* the footer: Clear and Apply inside a filter; Clear all, Cancel and See
|
|
4478
|
+
* results on the list. Closing with picks not yet applied asks "Discard
|
|
4479
|
+
* changes?" first. Opened from AllFiltersButton, which carries the
|
|
4188
4480
|
* total. A filter with picks shows their number as a count badge (the
|
|
4189
4481
|
* style guide's Badge, brandSolid, count) on its row and beside its title
|
|
4190
4482
|
* in its panel.
|
|
@@ -4195,17 +4487,26 @@ interface FilterDrawerProps<Id extends string = string> extends CommonProps {
|
|
|
4195
4487
|
* ease-interactive, motion-reduce:transition-none, overflow-x-clip, pt-4,
|
|
4196
4488
|
* focus-visible:outline-offset-1
|
|
4197
4489
|
* @dependencies lucide-react, react-dom
|
|
4198
|
-
* @behavior Picks are kept in the page's draft as they're made
|
|
4199
|
-
* panel
|
|
4200
|
-
*
|
|
4201
|
-
*
|
|
4490
|
+
* @behavior Picks are kept in the page's draft as they're made. A filter's
|
|
4491
|
+
* panel ends with Clear and Apply: Apply returns to the list, where the
|
|
4492
|
+
* filter's row shows its count; the back arrow beside its title does the
|
|
4493
|
+
* same. See results, on the list only, applies the draft to the page. Moving
|
|
4494
|
+
* between filters loses nothing. The ×, Escape and the dimmed page, with
|
|
4495
|
+
* picks not yet applied (`hasChanges`, or a filter's count or badge changed
|
|
4496
|
+
* since opening), ask "Discard changes?" in a small Modal over the drawer,
|
|
4497
|
+
* with one line, "Your filter picks haven't been applied.": Keep editing
|
|
4498
|
+
* (secondary, focused first; Escape and its × do the same) returns to the
|
|
4499
|
+
* drawer as it was, Discard (danger) closes it and drops them. Nothing changed, they
|
|
4500
|
+
* close straight away. Cancel always closes without asking. Each
|
|
4202
4501
|
* opening starts on the list (or on `focus`). Opening a filter slides it in
|
|
4203
4502
|
* from the right as the list moves a third of the way out to the left; the
|
|
4204
4503
|
* back arrow reverses it. 200ms, the Drawer's own timing; with reduced motion
|
|
4205
4504
|
* it swaps without moving. Clear in a filter calls `onClearSection`, Clear all
|
|
4206
4505
|
* on the list `onClearAll`, See results `onApply` and then `onClose`.
|
|
4207
4506
|
* @a11y Built on Drawer: role="dialog", focus trap, Escape, focus back to the
|
|
4208
|
-
* opener.
|
|
4507
|
+
* opener. The discard question is a Modal (role="dialog", its own focus trap)
|
|
4508
|
+
* with focus on Keep editing; Keep editing puts focus back where it was in the
|
|
4509
|
+
* drawer, Discard on the drawer's opener. Each row is a button. Opening a filter moves focus to its
|
|
4209
4510
|
* back arrow ("Back to all filters"); going back puts focus on the row you left,
|
|
4210
4511
|
* so the keyboard never lands back at the top. The outgoing panel is inert
|
|
4211
4512
|
* while it slides out.
|
|
@@ -4228,7 +4529,7 @@ interface FilterDrawerProps<Id extends string = string> extends CommonProps {
|
|
|
4228
4529
|
* />
|
|
4229
4530
|
* ```
|
|
4230
4531
|
*/
|
|
4231
|
-
declare function FilterDrawer<Id extends string>({ open, onClose, sections, renderSection, activeCount: _activeCount, onClearSection, onClearAll, onApply, focus, size, testIdPrefix, }: FilterDrawerProps<Id>): react.JSX.Element;
|
|
4532
|
+
declare function FilterDrawer<Id extends string>({ open, onClose, sections, renderSection, activeCount: _activeCount, onClearSection, onClearAll, onApply, focus, size, hasChanges, testIdPrefix, }: FilterDrawerProps<Id>): react.JSX.Element;
|
|
4232
4533
|
|
|
4233
4534
|
interface AllFiltersButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, "children">, CommonProps {
|
|
4234
4535
|
/** Filters narrowing the page; the badge shows when above 0. */
|
|
@@ -4314,9 +4615,10 @@ interface MenuItemProps extends ButtonHTMLAttributes<HTMLButtonElement>, CommonP
|
|
|
4314
4615
|
asChild?: boolean;
|
|
4315
4616
|
}
|
|
4316
4617
|
declare const MenuItem: react.ForwardRefExoticComponent<MenuItemProps & react.RefAttributes<HTMLButtonElement>>;
|
|
4317
|
-
/** A small heading over a group of rows ("Workspace"). */
|
|
4318
|
-
declare function MenuLabel({ className, testIdPrefix, children }: CommonProps & {
|
|
4618
|
+
/** A small heading over a group of rows ("Workspace"). `id` lets a group name itself by it (aria-labelledby). */
|
|
4619
|
+
declare function MenuLabel({ className, testIdPrefix, id, children }: CommonProps & {
|
|
4319
4620
|
children: ReactNode;
|
|
4621
|
+
id?: string;
|
|
4320
4622
|
}): react.JSX.Element;
|
|
4321
4623
|
/** A line between groups of rows. */
|
|
4322
4624
|
declare function MenuSeparator({ className, testIdPrefix }: CommonProps): react.JSX.Element;
|
|
@@ -4519,4 +4821,4 @@ declare function LoadError({ onRetry, children }: {
|
|
|
4519
4821
|
/** The thin moving line along a card's top edge while new data loads over old. */
|
|
4520
4822
|
declare function RefreshLine(): react.JSX.Element;
|
|
4521
4823
|
|
|
4522
|
-
export { AISpark, type AISparkProps, AdvertiserNoResults, type AdvertiserNoResultsProps, AdvertiserQuickFilter, type AdvertiserQuickFilterProps, AdvertiserSearchPrompt, type AdvertiserSearchPromptProps, AllFiltersButton, type AllFiltersButtonProps, type AxisMonthLabel, Badge, type BadgeKind, type BadgeProps, type BadgeTone, BarChartPlaceholder, type BarChartPlaceholderProps, BarList, type BarListProps, type BarListRow, Button, type ButtonProps, Card, type CardProps, ChartLegend, type ChartLegendProps, ChartSkeleton, CheckBox, CheckBoxBox, type CheckBoxBoxProps, type CheckBoxProps, ChipContent, type ChipContentProps, type ChipVariant, type CommonProps, CopyButton, type CopyButtonProps, type Currency, DEFAULT_SEARCH_MATCH, DataScopeFilter, type DataScopeFilterProps, DataTable, type DataTableColumn, type DataTableColumnWidth, type DataTableDensity, type DataTableProps, type DateFormatOptions, type DateGranularity, type DateOrder, DateRangeFilter, type DateRangeFilterProps, type DateRangeFormatOptions, DateRangePicker, type DateRangePickerProps, Delta, type DeltaProps, Drawer, type DrawerProps, type DrawerSize, EmptyState, type EmptyStateProps, type EmptyStateSize, Figure, type FigureProps, 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, LoadError, LongWait, MediaLabel, type MediaLabelProps, type MediaType, Menu, MenuItem, type MenuItemProps, MenuLabel, type MenuProps, MenuSeparator, Modal, type ModalProps, type ModalSize, type MoneyFormatOptions, MultiSelectFilter, type MultiSelectFilterProps, type MultiSelectGroup, NO_RESULTS_BODY, NO_RESULTS_TITLE, NO_VALUE, NameListModal, type NameListModalProps, type NoResultsAction, NoResultsEmptyState, type NoResultsEmptyStateProps, NoValue, type NumberFormatOptions, PRIMARY_ACTION_CLASS, PageHeader, type PageHeaderProps, Pager, type PagerProps, type PickerColumn, type PickerFilter, type PickerRow, PieChartPlaceholder, type PieChartPlaceholderProps, PrimaryBadge, type PrimaryBadgeProps, type PubBreak, PublisherBreakdownList, type PublisherBreakdownListProps, QUIET_ACTION_CLASS, RefreshLine, 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, Skeleton, SkeletonLines, type SkeletonProps, SortButton, type SortButtonProps, type SortDir, type SortState, StackedColumnPlaceholder, type StackedColumnPlaceholderProps, StatStrip, type StatStripProps, StatStripSkeleton, StatTile, type StatTileProps, SuggestionChip, type SuggestionChipProps, type SummaryGroup, type SummaryGroupItemValue, type TabItem, TableLink, 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, defaultDateOrder, formatCount, formatCountFull, formatDate, formatDateRange, formatDateTime, formatIsoDate, formatMoney, formatMoneyFull, formatMonth, formatMonthAxis, formatOpenRange, formatPercent, formatQuarter, formatRelative, formatTime, formatWeek, noResultsBody, resolveRange, sortProp, useDelayedLoading };
|
|
4824
|
+
export { AISpark, type AISparkProps, AdvertiserNoResults, type AdvertiserNoResultsProps, AdvertiserQuickFilter, type AdvertiserQuickFilterProps, AdvertiserSearchPrompt, type AdvertiserSearchPromptProps, AllFiltersButton, type AllFiltersButtonProps, type AxisMonthLabel, Badge, type BadgeKind, type BadgeProps, type BadgeTone, BarChartPlaceholder, type BarChartPlaceholderProps, BarList, type BarListProps, type BarListRow, Button, type ButtonProps, Card, type CardProps, ChartLegend, type ChartLegendProps, ChartSkeleton, CheckBox, CheckBoxBox, type CheckBoxBoxProps, type CheckBoxProps, ChipContent, type ChipContentProps, type ChipVariant, type CommonProps, CopyButton, type CopyButtonProps, type Currency, DEFAULT_SEARCH_MATCH, DataScopeFilter, type DataScopeFilterProps, DataTable, type DataTableColumn, type DataTableColumnWidth, type DataTableDensity, type DataTableHeaderMenu, type DataTableHeaderMenuChoice, type DataTableHeaderMenuOption, type DataTableProps, type DateFormatOptions, type DateGranularity, type DateOrder, DateRangeFilter, type DateRangeFilterProps, type DateRangeFormatOptions, DateRangePicker, type DateRangePickerProps, Delta, type DeltaProps, Drawer, type DrawerProps, type DrawerSize, EmptyState, type EmptyStateProps, type EmptyStateSize, Figure, type FigureProps, 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, LoadError, LongWait, MediaLabel, type MediaLabelProps, type MediaType, Menu, MenuItem, type MenuItemProps, MenuLabel, type MenuProps, MenuSeparator, Modal, type ModalProps, type ModalSize, type MoneyFormatOptions, MultiSelectFilter, type MultiSelectFilterProps, type MultiSelectGroup, NO_RESULTS_BODY, NO_RESULTS_TITLE, NO_VALUE, NameListModal, type NameListModalProps, type NoResultsAction, NoResultsEmptyState, type NoResultsEmptyStateProps, NoValue, type NumberFormatOptions, PRIMARY_ACTION_CLASS, PageHeader, type PageHeaderProps, Pager, type PagerProps, type PickerColumn, type PickerFilter, type PickerRow, PieChartPlaceholder, type PieChartPlaceholderProps, PrimaryBadge, type PrimaryBadgeProps, type PubBreak, PublisherBreakdownList, type PublisherBreakdownListProps, QUIET_ACTION_CLASS, RefreshLine, 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, Skeleton, SkeletonLines, type SkeletonProps, SortButton, type SortButtonProps, type SortDir, type SortState, StackedColumnPlaceholder, type StackedColumnPlaceholderProps, StatStrip, type StatStripProps, StatStripSkeleton, StatTile, type StatTileProps, StickyBar, type StickyBarProps, SuggestionChip, type SuggestionChipProps, type SummaryGroup, type SummaryGroupItemValue, type TabItem, TableLink, 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, defaultDateOrder, formatCount, formatCountFull, formatDate, formatDateRange, formatDateTime, formatIsoDate, formatMoney, formatMoneyFull, formatMonth, formatMonthAxis, formatOpenRange, formatPercent, formatQuarter, formatRelative, formatTime, formatWeek, noResultsBody, resolveRange, sortProp, useDelayedLoading };
|