@mediaradar/design-components 0.32.0 → 0.33.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/index.cjs +172 -47
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +100 -18
- package/dist/index.d.ts +100 -18
- package/dist/index.js +169 -45
- package/dist/index.js.map +1 -1
- package/package.json +7 -3
package/dist/index.d.cts
CHANGED
|
@@ -122,10 +122,12 @@ interface AdvertiserQuickFilterProps {
|
|
|
122
122
|
/** The clear link in footerless mode (unused when `showFooter` is set). */
|
|
123
123
|
clearLabel?: string;
|
|
124
124
|
/**
|
|
125
|
-
* Optional prefix for `data-testid` attributes on the trigger
|
|
126
|
-
*
|
|
127
|
-
*
|
|
128
|
-
*
|
|
125
|
+
* Optional prefix for `data-testid` attributes on the trigger
|
|
126
|
+
* (`${testIdPrefix}-trigger`), the popover (`-popover`), the search input
|
|
127
|
+
* (`-search`), the selected-section toggle (`-selected-toggle`), the
|
|
128
|
+
* select-all-visible row (`-select-all-visible`), each option row
|
|
129
|
+
* (`-option-<slugified-id>`), and the footer's Clear All (`-clear-all`) and
|
|
130
|
+
* Apply (`-apply`). Omit entirely for no test-id wiring at all --
|
|
129
131
|
* added specifically so an existing Playwright suite keyed off these ids
|
|
130
132
|
* (mr-clientapps' `AdvertisersPicker`) doesn't lose its locators when
|
|
131
133
|
* swapped over to this shared component.
|
|
@@ -494,7 +496,12 @@ interface DateRangeFilterProps {
|
|
|
494
496
|
icon?: React.ReactNode;
|
|
495
497
|
/** 'creativeIntel' swaps in the day-level shortcut list (Today/Yesterday/Last N days/All available history) used by that dashboard. */
|
|
496
498
|
presetSet?: "default" | "creativeIntel";
|
|
497
|
-
/**
|
|
499
|
+
/**
|
|
500
|
+
* Prefix for `data-testid` attributes on the trigger (`${testIdPrefix}-trigger`),
|
|
501
|
+
* the popover (`-popover`), each preset (`-option-<slugified-label>`, e.g.
|
|
502
|
+
* `-option-last-7-days`), and Cancel (`-cancel`) / Apply (`-apply`). Omit for
|
|
503
|
+
* no test-id wiring.
|
|
504
|
+
*/
|
|
498
505
|
testIdPrefix?: string;
|
|
499
506
|
/**
|
|
500
507
|
* 'month' for screens whose data comes by month: every range rounds out to
|
|
@@ -575,10 +582,11 @@ interface SearchBarProps {
|
|
|
575
582
|
onMatchChange?: (v: SearchMatchValue) => void;
|
|
576
583
|
className?: string;
|
|
577
584
|
/**
|
|
578
|
-
* Optional prefix for `data-testid` attributes on the input
|
|
579
|
-
*
|
|
580
|
-
* (
|
|
581
|
-
*
|
|
585
|
+
* Optional prefix for `data-testid` attributes on the input
|
|
586
|
+
* (`${testIdPrefix}-search`), its clear button (`-clear`), the match-type
|
|
587
|
+
* trigger (`-mode-trigger`) and popover (`-mode-popover`), each mode row
|
|
588
|
+
* (`-mode-anyWord`, `-mode-exactMatch`, `-mode-contextual`, `-mode-adCode`),
|
|
589
|
+
* and the Or/And radio pair (`-word-join-or`, `-word-join-and`). Omit
|
|
582
590
|
* entirely for no test-id wiring at all -- added specifically so an
|
|
583
591
|
* existing Playwright suite keyed off these ids (mr-clientapps'
|
|
584
592
|
* `KeywordSearchBar`) doesn't lose its locators when swapped over to
|
|
@@ -1252,7 +1260,7 @@ interface TooltipProps {
|
|
|
1252
1260
|
delay?: number;
|
|
1253
1261
|
/** 'surface' (default) or 'inverted' -- see the pattern description. */
|
|
1254
1262
|
variant?: "surface" | "inverted";
|
|
1255
|
-
/** Optional prefix for
|
|
1263
|
+
/** Optional prefix for the floating bubble's `data-testid` (`${testIdPrefix}-tooltip`). */
|
|
1256
1264
|
testIdPrefix?: string;
|
|
1257
1265
|
}
|
|
1258
1266
|
declare function Tooltip({ label, children, anchorRef, className, whenTruncated, interactive, placement, align, delay, variant, testIdPrefix, }: TooltipProps): react.JSX.Element | null;
|
|
@@ -1312,7 +1320,7 @@ interface SelectAllVisibleProps {
|
|
|
1312
1320
|
/** Whether every visible result is already selected. */
|
|
1313
1321
|
allSelected: boolean;
|
|
1314
1322
|
onToggle: () => void;
|
|
1315
|
-
/** Optional prefix for
|
|
1323
|
+
/** Optional prefix for the row's `data-testid` (`${testIdPrefix}-select-all-visible`). */
|
|
1316
1324
|
testIdPrefix?: string;
|
|
1317
1325
|
}
|
|
1318
1326
|
declare function SelectAllVisible({ count, allSelected, onToggle, testIdPrefix }: SelectAllVisibleProps): react.JSX.Element;
|
|
@@ -1349,7 +1357,7 @@ interface SelectedSectionProps {
|
|
|
1349
1357
|
onToggle: () => void;
|
|
1350
1358
|
/** The caller renders each selected row itself. */
|
|
1351
1359
|
children: React.ReactNode;
|
|
1352
|
-
/** Optional prefix for
|
|
1360
|
+
/** Optional prefix for the toggle button's `data-testid` (`${testIdPrefix}-selected-toggle`). */
|
|
1353
1361
|
testIdPrefix?: string;
|
|
1354
1362
|
}
|
|
1355
1363
|
declare function SelectedSection({ count, open, onToggle, children, testIdPrefix }: SelectedSectionProps): react.JSX.Element | null;
|
|
@@ -1452,8 +1460,10 @@ interface SelectionPickerProps<T extends PickerRow> {
|
|
|
1452
1460
|
/**
|
|
1453
1461
|
* Optional prefix for `data-testid` attributes on the search input
|
|
1454
1462
|
* (`${testIdPrefix}-search`), the source toggle buttons
|
|
1455
|
-
* (`${testIdPrefix}-source-search` /
|
|
1456
|
-
* trigger (`${testIdPrefix}-filter-<slug>`) and
|
|
1463
|
+
* (`${testIdPrefix}-source-search` / `${testIdPrefix}-source-lists`),
|
|
1464
|
+
* each filter dropdown trigger (`${testIdPrefix}-filter-<slug>`) and each
|
|
1465
|
+
* of its options
|
|
1466
|
+
* (`${testIdPrefix}-filter-<slug>-<option-slug>`), the
|
|
1457
1467
|
* select-all checkbox (`${testIdPrefix}-select-all`), each row
|
|
1458
1468
|
* (`${testIdPrefix}-row-<slug>`), the Load more button
|
|
1459
1469
|
* (`${testIdPrefix}-load-more`), and each Account lists row/count
|
|
@@ -2167,9 +2177,11 @@ declare function TablePagination({ page, perPage, totalItems, onPageChange, onPe
|
|
|
2167
2177
|
className?: string;
|
|
2168
2178
|
/**
|
|
2169
2179
|
* Optional prefix for `data-testid` attributes on the bar (`testIdPrefix`
|
|
2170
|
-
* itself), the per-page
|
|
2171
|
-
* `-
|
|
2172
|
-
*
|
|
2180
|
+
* itself), the rows-per-page menu (a `SelectFilter`: its button
|
|
2181
|
+
* `-per-page-trigger`, its list `-per-page-popover` and each size
|
|
2182
|
+
* `-per-page-option-<n>`, e.g. `-per-page-option-50`), the step buttons
|
|
2183
|
+
* (`-first`, `-prev`, `-next`, `-last`) and each page button (`-page-<n>`).
|
|
2184
|
+
* Omit for no test-id wiring.
|
|
2173
2185
|
*/
|
|
2174
2186
|
testIdPrefix?: string;
|
|
2175
2187
|
}): react.JSX.Element;
|
|
@@ -2757,6 +2769,76 @@ interface TextFieldProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "si
|
|
|
2757
2769
|
*/
|
|
2758
2770
|
declare const TextField: react.ForwardRefExoticComponent<TextFieldProps & react.RefAttributes<HTMLInputElement>>;
|
|
2759
2771
|
|
|
2772
|
+
type DrawerSize = "sm" | "md" | "lg";
|
|
2773
|
+
interface DrawerProps {
|
|
2774
|
+
/** Whether the drawer is showing. It slides in when this turns true and out when it turns false. */
|
|
2775
|
+
open: boolean;
|
|
2776
|
+
/** Called on Escape, a click on the dimmed page, or the close button. */
|
|
2777
|
+
onClose: () => void;
|
|
2778
|
+
/** The drawer's title -- "Filters", "Saved views", the advertiser's name. */
|
|
2779
|
+
title: ReactNode;
|
|
2780
|
+
/** One line under the title. */
|
|
2781
|
+
description?: ReactNode;
|
|
2782
|
+
/** sm 440 for filters, md 640 for lists and saved views, lg 920 for a detail panel. */
|
|
2783
|
+
size?: DrawerSize;
|
|
2784
|
+
/** Pinned at the bottom, right-aligned -- "Clear all" and "Apply" for filters. */
|
|
2785
|
+
footer?: ReactNode;
|
|
2786
|
+
children?: ReactNode;
|
|
2787
|
+
className?: string;
|
|
2788
|
+
}
|
|
2789
|
+
/**
|
|
2790
|
+
* @pattern Drawer
|
|
2791
|
+
* @description A panel that slides in from the right over the dimmed page:
|
|
2792
|
+
* title, optional one-line description, a scrolling body, and an optional
|
|
2793
|
+
* footer pinned at the bottom. Three widths -- sm 440 for filters, md 640 for
|
|
2794
|
+
* lists and saved views, lg 920 for a detail panel -- over the same warm
|
|
2795
|
+
* scrim as Modal, with no blur. Same header, footer and keyboard behaviour as
|
|
2796
|
+
* Modal, so the two read as one family.
|
|
2797
|
+
* @variant sm - 440px. Default. Filters.
|
|
2798
|
+
* @variant md - 640px. A list, saved views, a comparison.
|
|
2799
|
+
* @variant lg - 920px. A detail panel: a battle card, an event breakdown.
|
|
2800
|
+
* @tokens bg-scrim, z-modal, transition-opacity,
|
|
2801
|
+
* duration-(--mr-motion-duration-interactive), ease-interactive,
|
|
2802
|
+
* motion-reduce:transition-none, border-l, border-border-default, bg-surface,
|
|
2803
|
+
* shadow-overlay, transition-transform, text-base, font-semibold,
|
|
2804
|
+
* text-text-primary, text-sm, text-text-secondary, text-text-tertiary,
|
|
2805
|
+
* hover:bg-subtle, hover:text-text-primary, rounded-control, border-t,
|
|
2806
|
+
* focus-visible:outline-border-focus
|
|
2807
|
+
* @dependencies lucide-react, react-dom
|
|
2808
|
+
* @behavior Portals to <body>. Slides in from the right over 200ms while the
|
|
2809
|
+
* scrim fades in, and slides back out before it unmounts; with reduced motion
|
|
2810
|
+
* it appears and goes without moving. Escape, a click on the dimmed page and
|
|
2811
|
+
* the × all call `onClose` -- in a filter drawer, unapplied changes are dropped,
|
|
2812
|
+
* as with Cancel. Focus moves to the first field (else the first footer
|
|
2813
|
+
* button) on open, Tab stays inside, and focus goes back to whatever opened it
|
|
2814
|
+
* on close. The page behind stops scrolling while it's open.
|
|
2815
|
+
* @a11y role="dialog" with aria-modal, named by its title and described by
|
|
2816
|
+
* `description`. The close button is labelled "Close".
|
|
2817
|
+
* @use for work alongside the page that the page's own context explains:
|
|
2818
|
+
* filters, saved views, a detail panel for a row.
|
|
2819
|
+
* @use `sm` for filters, `md` for lists, `lg` for a detail panel -- pick by
|
|
2820
|
+
* content, never a custom width.
|
|
2821
|
+
* @use the footer for the drawer's actions, primary last: "Clear all" then
|
|
2822
|
+
* "Apply".
|
|
2823
|
+
* @avoid a drawer for a decision that needs the user's full attention -- a
|
|
2824
|
+
* confirm or a short form is a Modal.
|
|
2825
|
+
* @avoid a drawer opened from another drawer. A Modal opened from a drawer is
|
|
2826
|
+
* fine and sits on top.
|
|
2827
|
+
* @avoid a `className` width override, or a blur behind it.
|
|
2828
|
+
* @usage
|
|
2829
|
+
* ```tsx
|
|
2830
|
+
* <Drawer
|
|
2831
|
+
* open={open}
|
|
2832
|
+
* onClose={() => setOpen(false)}
|
|
2833
|
+
* title="Filters"
|
|
2834
|
+
* footer={<><Button variant="secondary" onClick={clear}>Clear all</Button><Button onClick={apply}>Apply</Button></>}
|
|
2835
|
+
* >
|
|
2836
|
+
* …filter groups…
|
|
2837
|
+
* </Drawer>
|
|
2838
|
+
* ```
|
|
2839
|
+
*/
|
|
2840
|
+
declare function Drawer({ open, onClose, title, description, size, footer, children, className }: DrawerProps): react.ReactPortal | null;
|
|
2841
|
+
|
|
2760
2842
|
type DataTableColumnWidth = "fill" | "sm" | "md" | "lg";
|
|
2761
2843
|
type DataTableDensity = "default" | "compact";
|
|
2762
2844
|
interface DataTableColumn<T, K extends string = string> {
|
|
@@ -3070,4 +3152,4 @@ interface InlineMessageProps {
|
|
|
3070
3152
|
*/
|
|
3071
3153
|
declare function InlineMessage({ tone, title, children, actions, onDismiss, className }: InlineMessageProps): react.JSX.Element;
|
|
3072
3154
|
|
|
3073
|
-
export { AISpark, type AISparkProps, AdvertiserNoResults, type AdvertiserNoResultsProps, AdvertiserQuickFilter, type AdvertiserQuickFilterProps, AdvertiserSearchPrompt, type AdvertiserSearchPromptProps, 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, 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, EmptyState, type EmptyStateProps, type EmptyStateSize, FilterChipBar, type FilterChipBarProps, FilterDropdownFooter, type FilterDropdownFooterProps, Freshness, type FreshnessLevel, type FreshnessProps, InfoTip, type InfoTipProps, InlineMessage, type InlineMessageProps, type InlineMessageTone, LineChartPlaceholder, type LineChartPlaceholderProps, MediaLabel, type MediaLabelProps, type MediaType, 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, 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 };
|
|
3155
|
+
export { AISpark, type AISparkProps, AdvertiserNoResults, type AdvertiserNoResultsProps, AdvertiserQuickFilter, type AdvertiserQuickFilterProps, AdvertiserSearchPrompt, type AdvertiserSearchPromptProps, 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, 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, FilterDropdownFooter, type FilterDropdownFooterProps, Freshness, type FreshnessLevel, type FreshnessProps, InfoTip, type InfoTipProps, InlineMessage, type InlineMessageProps, type InlineMessageTone, LineChartPlaceholder, type LineChartPlaceholderProps, MediaLabel, type MediaLabelProps, type MediaType, 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, 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 };
|
package/dist/index.d.ts
CHANGED
|
@@ -122,10 +122,12 @@ interface AdvertiserQuickFilterProps {
|
|
|
122
122
|
/** The clear link in footerless mode (unused when `showFooter` is set). */
|
|
123
123
|
clearLabel?: string;
|
|
124
124
|
/**
|
|
125
|
-
* Optional prefix for `data-testid` attributes on the trigger
|
|
126
|
-
*
|
|
127
|
-
*
|
|
128
|
-
*
|
|
125
|
+
* Optional prefix for `data-testid` attributes on the trigger
|
|
126
|
+
* (`${testIdPrefix}-trigger`), the popover (`-popover`), the search input
|
|
127
|
+
* (`-search`), the selected-section toggle (`-selected-toggle`), the
|
|
128
|
+
* select-all-visible row (`-select-all-visible`), each option row
|
|
129
|
+
* (`-option-<slugified-id>`), and the footer's Clear All (`-clear-all`) and
|
|
130
|
+
* Apply (`-apply`). Omit entirely for no test-id wiring at all --
|
|
129
131
|
* added specifically so an existing Playwright suite keyed off these ids
|
|
130
132
|
* (mr-clientapps' `AdvertisersPicker`) doesn't lose its locators when
|
|
131
133
|
* swapped over to this shared component.
|
|
@@ -494,7 +496,12 @@ interface DateRangeFilterProps {
|
|
|
494
496
|
icon?: React.ReactNode;
|
|
495
497
|
/** 'creativeIntel' swaps in the day-level shortcut list (Today/Yesterday/Last N days/All available history) used by that dashboard. */
|
|
496
498
|
presetSet?: "default" | "creativeIntel";
|
|
497
|
-
/**
|
|
499
|
+
/**
|
|
500
|
+
* Prefix for `data-testid` attributes on the trigger (`${testIdPrefix}-trigger`),
|
|
501
|
+
* the popover (`-popover`), each preset (`-option-<slugified-label>`, e.g.
|
|
502
|
+
* `-option-last-7-days`), and Cancel (`-cancel`) / Apply (`-apply`). Omit for
|
|
503
|
+
* no test-id wiring.
|
|
504
|
+
*/
|
|
498
505
|
testIdPrefix?: string;
|
|
499
506
|
/**
|
|
500
507
|
* 'month' for screens whose data comes by month: every range rounds out to
|
|
@@ -575,10 +582,11 @@ interface SearchBarProps {
|
|
|
575
582
|
onMatchChange?: (v: SearchMatchValue) => void;
|
|
576
583
|
className?: string;
|
|
577
584
|
/**
|
|
578
|
-
* Optional prefix for `data-testid` attributes on the input
|
|
579
|
-
*
|
|
580
|
-
* (
|
|
581
|
-
*
|
|
585
|
+
* Optional prefix for `data-testid` attributes on the input
|
|
586
|
+
* (`${testIdPrefix}-search`), its clear button (`-clear`), the match-type
|
|
587
|
+
* trigger (`-mode-trigger`) and popover (`-mode-popover`), each mode row
|
|
588
|
+
* (`-mode-anyWord`, `-mode-exactMatch`, `-mode-contextual`, `-mode-adCode`),
|
|
589
|
+
* and the Or/And radio pair (`-word-join-or`, `-word-join-and`). Omit
|
|
582
590
|
* entirely for no test-id wiring at all -- added specifically so an
|
|
583
591
|
* existing Playwright suite keyed off these ids (mr-clientapps'
|
|
584
592
|
* `KeywordSearchBar`) doesn't lose its locators when swapped over to
|
|
@@ -1252,7 +1260,7 @@ interface TooltipProps {
|
|
|
1252
1260
|
delay?: number;
|
|
1253
1261
|
/** 'surface' (default) or 'inverted' -- see the pattern description. */
|
|
1254
1262
|
variant?: "surface" | "inverted";
|
|
1255
|
-
/** Optional prefix for
|
|
1263
|
+
/** Optional prefix for the floating bubble's `data-testid` (`${testIdPrefix}-tooltip`). */
|
|
1256
1264
|
testIdPrefix?: string;
|
|
1257
1265
|
}
|
|
1258
1266
|
declare function Tooltip({ label, children, anchorRef, className, whenTruncated, interactive, placement, align, delay, variant, testIdPrefix, }: TooltipProps): react.JSX.Element | null;
|
|
@@ -1312,7 +1320,7 @@ interface SelectAllVisibleProps {
|
|
|
1312
1320
|
/** Whether every visible result is already selected. */
|
|
1313
1321
|
allSelected: boolean;
|
|
1314
1322
|
onToggle: () => void;
|
|
1315
|
-
/** Optional prefix for
|
|
1323
|
+
/** Optional prefix for the row's `data-testid` (`${testIdPrefix}-select-all-visible`). */
|
|
1316
1324
|
testIdPrefix?: string;
|
|
1317
1325
|
}
|
|
1318
1326
|
declare function SelectAllVisible({ count, allSelected, onToggle, testIdPrefix }: SelectAllVisibleProps): react.JSX.Element;
|
|
@@ -1349,7 +1357,7 @@ interface SelectedSectionProps {
|
|
|
1349
1357
|
onToggle: () => void;
|
|
1350
1358
|
/** The caller renders each selected row itself. */
|
|
1351
1359
|
children: React.ReactNode;
|
|
1352
|
-
/** Optional prefix for
|
|
1360
|
+
/** Optional prefix for the toggle button's `data-testid` (`${testIdPrefix}-selected-toggle`). */
|
|
1353
1361
|
testIdPrefix?: string;
|
|
1354
1362
|
}
|
|
1355
1363
|
declare function SelectedSection({ count, open, onToggle, children, testIdPrefix }: SelectedSectionProps): react.JSX.Element | null;
|
|
@@ -1452,8 +1460,10 @@ interface SelectionPickerProps<T extends PickerRow> {
|
|
|
1452
1460
|
/**
|
|
1453
1461
|
* Optional prefix for `data-testid` attributes on the search input
|
|
1454
1462
|
* (`${testIdPrefix}-search`), the source toggle buttons
|
|
1455
|
-
* (`${testIdPrefix}-source-search` /
|
|
1456
|
-
* trigger (`${testIdPrefix}-filter-<slug>`) and
|
|
1463
|
+
* (`${testIdPrefix}-source-search` / `${testIdPrefix}-source-lists`),
|
|
1464
|
+
* each filter dropdown trigger (`${testIdPrefix}-filter-<slug>`) and each
|
|
1465
|
+
* of its options
|
|
1466
|
+
* (`${testIdPrefix}-filter-<slug>-<option-slug>`), the
|
|
1457
1467
|
* select-all checkbox (`${testIdPrefix}-select-all`), each row
|
|
1458
1468
|
* (`${testIdPrefix}-row-<slug>`), the Load more button
|
|
1459
1469
|
* (`${testIdPrefix}-load-more`), and each Account lists row/count
|
|
@@ -2167,9 +2177,11 @@ declare function TablePagination({ page, perPage, totalItems, onPageChange, onPe
|
|
|
2167
2177
|
className?: string;
|
|
2168
2178
|
/**
|
|
2169
2179
|
* Optional prefix for `data-testid` attributes on the bar (`testIdPrefix`
|
|
2170
|
-
* itself), the per-page
|
|
2171
|
-
* `-
|
|
2172
|
-
*
|
|
2180
|
+
* itself), the rows-per-page menu (a `SelectFilter`: its button
|
|
2181
|
+
* `-per-page-trigger`, its list `-per-page-popover` and each size
|
|
2182
|
+
* `-per-page-option-<n>`, e.g. `-per-page-option-50`), the step buttons
|
|
2183
|
+
* (`-first`, `-prev`, `-next`, `-last`) and each page button (`-page-<n>`).
|
|
2184
|
+
* Omit for no test-id wiring.
|
|
2173
2185
|
*/
|
|
2174
2186
|
testIdPrefix?: string;
|
|
2175
2187
|
}): react.JSX.Element;
|
|
@@ -2757,6 +2769,76 @@ interface TextFieldProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "si
|
|
|
2757
2769
|
*/
|
|
2758
2770
|
declare const TextField: react.ForwardRefExoticComponent<TextFieldProps & react.RefAttributes<HTMLInputElement>>;
|
|
2759
2771
|
|
|
2772
|
+
type DrawerSize = "sm" | "md" | "lg";
|
|
2773
|
+
interface DrawerProps {
|
|
2774
|
+
/** Whether the drawer is showing. It slides in when this turns true and out when it turns false. */
|
|
2775
|
+
open: boolean;
|
|
2776
|
+
/** Called on Escape, a click on the dimmed page, or the close button. */
|
|
2777
|
+
onClose: () => void;
|
|
2778
|
+
/** The drawer's title -- "Filters", "Saved views", the advertiser's name. */
|
|
2779
|
+
title: ReactNode;
|
|
2780
|
+
/** One line under the title. */
|
|
2781
|
+
description?: ReactNode;
|
|
2782
|
+
/** sm 440 for filters, md 640 for lists and saved views, lg 920 for a detail panel. */
|
|
2783
|
+
size?: DrawerSize;
|
|
2784
|
+
/** Pinned at the bottom, right-aligned -- "Clear all" and "Apply" for filters. */
|
|
2785
|
+
footer?: ReactNode;
|
|
2786
|
+
children?: ReactNode;
|
|
2787
|
+
className?: string;
|
|
2788
|
+
}
|
|
2789
|
+
/**
|
|
2790
|
+
* @pattern Drawer
|
|
2791
|
+
* @description A panel that slides in from the right over the dimmed page:
|
|
2792
|
+
* title, optional one-line description, a scrolling body, and an optional
|
|
2793
|
+
* footer pinned at the bottom. Three widths -- sm 440 for filters, md 640 for
|
|
2794
|
+
* lists and saved views, lg 920 for a detail panel -- over the same warm
|
|
2795
|
+
* scrim as Modal, with no blur. Same header, footer and keyboard behaviour as
|
|
2796
|
+
* Modal, so the two read as one family.
|
|
2797
|
+
* @variant sm - 440px. Default. Filters.
|
|
2798
|
+
* @variant md - 640px. A list, saved views, a comparison.
|
|
2799
|
+
* @variant lg - 920px. A detail panel: a battle card, an event breakdown.
|
|
2800
|
+
* @tokens bg-scrim, z-modal, transition-opacity,
|
|
2801
|
+
* duration-(--mr-motion-duration-interactive), ease-interactive,
|
|
2802
|
+
* motion-reduce:transition-none, border-l, border-border-default, bg-surface,
|
|
2803
|
+
* shadow-overlay, transition-transform, text-base, font-semibold,
|
|
2804
|
+
* text-text-primary, text-sm, text-text-secondary, text-text-tertiary,
|
|
2805
|
+
* hover:bg-subtle, hover:text-text-primary, rounded-control, border-t,
|
|
2806
|
+
* focus-visible:outline-border-focus
|
|
2807
|
+
* @dependencies lucide-react, react-dom
|
|
2808
|
+
* @behavior Portals to <body>. Slides in from the right over 200ms while the
|
|
2809
|
+
* scrim fades in, and slides back out before it unmounts; with reduced motion
|
|
2810
|
+
* it appears and goes without moving. Escape, a click on the dimmed page and
|
|
2811
|
+
* the × all call `onClose` -- in a filter drawer, unapplied changes are dropped,
|
|
2812
|
+
* as with Cancel. Focus moves to the first field (else the first footer
|
|
2813
|
+
* button) on open, Tab stays inside, and focus goes back to whatever opened it
|
|
2814
|
+
* on close. The page behind stops scrolling while it's open.
|
|
2815
|
+
* @a11y role="dialog" with aria-modal, named by its title and described by
|
|
2816
|
+
* `description`. The close button is labelled "Close".
|
|
2817
|
+
* @use for work alongside the page that the page's own context explains:
|
|
2818
|
+
* filters, saved views, a detail panel for a row.
|
|
2819
|
+
* @use `sm` for filters, `md` for lists, `lg` for a detail panel -- pick by
|
|
2820
|
+
* content, never a custom width.
|
|
2821
|
+
* @use the footer for the drawer's actions, primary last: "Clear all" then
|
|
2822
|
+
* "Apply".
|
|
2823
|
+
* @avoid a drawer for a decision that needs the user's full attention -- a
|
|
2824
|
+
* confirm or a short form is a Modal.
|
|
2825
|
+
* @avoid a drawer opened from another drawer. A Modal opened from a drawer is
|
|
2826
|
+
* fine and sits on top.
|
|
2827
|
+
* @avoid a `className` width override, or a blur behind it.
|
|
2828
|
+
* @usage
|
|
2829
|
+
* ```tsx
|
|
2830
|
+
* <Drawer
|
|
2831
|
+
* open={open}
|
|
2832
|
+
* onClose={() => setOpen(false)}
|
|
2833
|
+
* title="Filters"
|
|
2834
|
+
* footer={<><Button variant="secondary" onClick={clear}>Clear all</Button><Button onClick={apply}>Apply</Button></>}
|
|
2835
|
+
* >
|
|
2836
|
+
* …filter groups…
|
|
2837
|
+
* </Drawer>
|
|
2838
|
+
* ```
|
|
2839
|
+
*/
|
|
2840
|
+
declare function Drawer({ open, onClose, title, description, size, footer, children, className }: DrawerProps): react.ReactPortal | null;
|
|
2841
|
+
|
|
2760
2842
|
type DataTableColumnWidth = "fill" | "sm" | "md" | "lg";
|
|
2761
2843
|
type DataTableDensity = "default" | "compact";
|
|
2762
2844
|
interface DataTableColumn<T, K extends string = string> {
|
|
@@ -3070,4 +3152,4 @@ interface InlineMessageProps {
|
|
|
3070
3152
|
*/
|
|
3071
3153
|
declare function InlineMessage({ tone, title, children, actions, onDismiss, className }: InlineMessageProps): react.JSX.Element;
|
|
3072
3154
|
|
|
3073
|
-
export { AISpark, type AISparkProps, AdvertiserNoResults, type AdvertiserNoResultsProps, AdvertiserQuickFilter, type AdvertiserQuickFilterProps, AdvertiserSearchPrompt, type AdvertiserSearchPromptProps, 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, 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, EmptyState, type EmptyStateProps, type EmptyStateSize, FilterChipBar, type FilterChipBarProps, FilterDropdownFooter, type FilterDropdownFooterProps, Freshness, type FreshnessLevel, type FreshnessProps, InfoTip, type InfoTipProps, InlineMessage, type InlineMessageProps, type InlineMessageTone, LineChartPlaceholder, type LineChartPlaceholderProps, MediaLabel, type MediaLabelProps, type MediaType, 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, 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 };
|
|
3155
|
+
export { AISpark, type AISparkProps, AdvertiserNoResults, type AdvertiserNoResultsProps, AdvertiserQuickFilter, type AdvertiserQuickFilterProps, AdvertiserSearchPrompt, type AdvertiserSearchPromptProps, 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, 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, FilterDropdownFooter, type FilterDropdownFooterProps, Freshness, type FreshnessLevel, type FreshnessProps, InfoTip, type InfoTipProps, InlineMessage, type InlineMessageProps, type InlineMessageTone, LineChartPlaceholder, type LineChartPlaceholderProps, MediaLabel, type MediaLabelProps, type MediaType, 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, 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 };
|