@mediaradar/design-components 0.18.0 → 0.18.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +3 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +15 -4
- package/dist/index.d.ts +15 -4
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/package.json +3 -2
package/dist/index.d.cts
CHANGED
|
@@ -398,6 +398,7 @@ declare function CheckBoxBox({ checked, indeterminate, disabled, className }: Ch
|
|
|
398
398
|
|
|
399
399
|
/**
|
|
400
400
|
* @pattern DateRangeFilter
|
|
401
|
+
* @status stable
|
|
401
402
|
* @description Date-range control -- the two-line chip (caption + value) with
|
|
402
403
|
* a chevron that opens a two-pane picker: preset shortcuts on the left, a
|
|
403
404
|
* dual-month calendar with range highlighting on the right, Start/End fields,
|
|
@@ -675,6 +676,7 @@ declare function SelectFilter({ caption, value, options, onChange, align, fullWi
|
|
|
675
676
|
|
|
676
677
|
/**
|
|
677
678
|
* @pattern Card
|
|
679
|
+
* @status stable
|
|
678
680
|
* @description Layout primitive for grouping content in a bordered, elevated
|
|
679
681
|
* surface. Width is controlled by the parent container, not the Card itself,
|
|
680
682
|
* so it works unchanged as a fixed-width rail item or a grid cell. Applies an
|
|
@@ -851,6 +853,7 @@ interface SummaryGroup {
|
|
|
851
853
|
}
|
|
852
854
|
/**
|
|
853
855
|
* @pattern WorkspaceSelectedCard
|
|
856
|
+
* @status stable
|
|
854
857
|
* @description Sticky recap card listing what each section's picker has
|
|
855
858
|
* added, as collapsible groups with per-item remove and "Remove all" --
|
|
856
859
|
* generic over the `SummaryGroup` shape, no domain coupling. Reconciled from
|
|
@@ -912,6 +915,7 @@ declare function WorkspaceSelectedCard({ groups, testIdPrefix }: WorkspaceSelect
|
|
|
912
915
|
|
|
913
916
|
/**
|
|
914
917
|
* @pattern BarChartPlaceholder
|
|
918
|
+
* @status stable
|
|
915
919
|
* @description Neutral, dataless stand-in for a ranked-bar chart --
|
|
916
920
|
* descending bar profile under a blank-labelled axis frame (dashed
|
|
917
921
|
* gridlines, blank y/x-tick boxes), so an unsatisfiable filter still reads
|
|
@@ -941,6 +945,7 @@ declare function BarChartPlaceholder({ height }: BarChartPlaceholderProps): reac
|
|
|
941
945
|
|
|
942
946
|
/**
|
|
943
947
|
* @pattern LineChartPlaceholder
|
|
948
|
+
* @status stable
|
|
944
949
|
* @description Neutral, dataless stand-in for a multi-series trend chart --
|
|
945
950
|
* four grey paths over the shared axis frame, each with a solid-then-dashed
|
|
946
951
|
* handoff for the live chart's forecast tail, and a point at every sample.
|
|
@@ -971,6 +976,7 @@ declare function LineChartPlaceholder({ height }: LineChartPlaceholderProps): re
|
|
|
971
976
|
|
|
972
977
|
/**
|
|
973
978
|
* @pattern PieChartPlaceholder
|
|
979
|
+
* @status stable
|
|
974
980
|
* @description Neutral, dataless stand-in for a pie chart -- a grey disc
|
|
975
981
|
* seamed where slices would fall, beside a blank legend. No axis, matching
|
|
976
982
|
* the live pie it stands in for. Same no-results use as
|
|
@@ -1172,6 +1178,7 @@ declare function AdvertiserNoResults({ query, hint, }: AdvertiserNoResultsProps)
|
|
|
1172
1178
|
|
|
1173
1179
|
/**
|
|
1174
1180
|
* @pattern SelectAllVisible
|
|
1181
|
+
* @status stable
|
|
1175
1182
|
* @description "Select all visible" row for a search-first picker's result
|
|
1176
1183
|
* list -- only render it once the caller decides the visible result set is
|
|
1177
1184
|
* long enough to warrant it (`insights-studio-prototype`'s three advertiser-
|
|
@@ -1205,6 +1212,7 @@ declare function SelectAllVisible({ count, allSelected, onToggle, testIdPrefix }
|
|
|
1205
1212
|
|
|
1206
1213
|
/**
|
|
1207
1214
|
* @pattern SelectedSection
|
|
1215
|
+
* @status stable
|
|
1208
1216
|
* @description Collapsible "Selected (n)" container for a search-first
|
|
1209
1217
|
* picker. Selections can pile up and crowd out the live search results, so
|
|
1210
1218
|
* the user can fold them away to refocus on the search. Controlled so the
|
|
@@ -1349,6 +1357,7 @@ interface SelectionPickerProps<T extends PickerRow> {
|
|
|
1349
1357
|
}
|
|
1350
1358
|
/**
|
|
1351
1359
|
* @pattern SelectionPicker
|
|
1360
|
+
* @status stable
|
|
1352
1361
|
* @description Generic search-and-filter picker for building a selection out
|
|
1353
1362
|
* of a larger catalog -- a search box plus filter dropdowns above a checkbox
|
|
1354
1363
|
* table, with an optional "Search / Account lists" source toggle for pulling
|
|
@@ -1376,10 +1385,12 @@ interface SelectionPickerProps<T extends PickerRow> {
|
|
|
1376
1385
|
* with both an `onChange` and the row's own `onClick` -- `CheckBox` stops
|
|
1377
1386
|
* click propagation before firing `onChange`, which is exactly what lets it
|
|
1378
1387
|
* sit inside a row that toggles on its own click without double-firing.
|
|
1379
|
-
* @a11y Search is an <input>; result rows
|
|
1380
|
-
* (
|
|
1381
|
-
*
|
|
1382
|
-
*
|
|
1388
|
+
* @a11y Search is an <input>; result rows are buttons. Each filter dropdown
|
|
1389
|
+
* is a disclosure (aria-expanded) opening a labelled group of checkboxes,
|
|
1390
|
+
* not a menu: it holds a search box and checkboxes, which a menu may not.
|
|
1391
|
+
* Escape closes it. Loading, empty and error states announce through
|
|
1392
|
+
* role="status", so a consumer should NOT wrap this in its own live region
|
|
1393
|
+
* -- that would double-announce.
|
|
1383
1394
|
* @usage
|
|
1384
1395
|
* ```tsx
|
|
1385
1396
|
* <SelectionPicker
|
package/dist/index.d.ts
CHANGED
|
@@ -398,6 +398,7 @@ declare function CheckBoxBox({ checked, indeterminate, disabled, className }: Ch
|
|
|
398
398
|
|
|
399
399
|
/**
|
|
400
400
|
* @pattern DateRangeFilter
|
|
401
|
+
* @status stable
|
|
401
402
|
* @description Date-range control -- the two-line chip (caption + value) with
|
|
402
403
|
* a chevron that opens a two-pane picker: preset shortcuts on the left, a
|
|
403
404
|
* dual-month calendar with range highlighting on the right, Start/End fields,
|
|
@@ -675,6 +676,7 @@ declare function SelectFilter({ caption, value, options, onChange, align, fullWi
|
|
|
675
676
|
|
|
676
677
|
/**
|
|
677
678
|
* @pattern Card
|
|
679
|
+
* @status stable
|
|
678
680
|
* @description Layout primitive for grouping content in a bordered, elevated
|
|
679
681
|
* surface. Width is controlled by the parent container, not the Card itself,
|
|
680
682
|
* so it works unchanged as a fixed-width rail item or a grid cell. Applies an
|
|
@@ -851,6 +853,7 @@ interface SummaryGroup {
|
|
|
851
853
|
}
|
|
852
854
|
/**
|
|
853
855
|
* @pattern WorkspaceSelectedCard
|
|
856
|
+
* @status stable
|
|
854
857
|
* @description Sticky recap card listing what each section's picker has
|
|
855
858
|
* added, as collapsible groups with per-item remove and "Remove all" --
|
|
856
859
|
* generic over the `SummaryGroup` shape, no domain coupling. Reconciled from
|
|
@@ -912,6 +915,7 @@ declare function WorkspaceSelectedCard({ groups, testIdPrefix }: WorkspaceSelect
|
|
|
912
915
|
|
|
913
916
|
/**
|
|
914
917
|
* @pattern BarChartPlaceholder
|
|
918
|
+
* @status stable
|
|
915
919
|
* @description Neutral, dataless stand-in for a ranked-bar chart --
|
|
916
920
|
* descending bar profile under a blank-labelled axis frame (dashed
|
|
917
921
|
* gridlines, blank y/x-tick boxes), so an unsatisfiable filter still reads
|
|
@@ -941,6 +945,7 @@ declare function BarChartPlaceholder({ height }: BarChartPlaceholderProps): reac
|
|
|
941
945
|
|
|
942
946
|
/**
|
|
943
947
|
* @pattern LineChartPlaceholder
|
|
948
|
+
* @status stable
|
|
944
949
|
* @description Neutral, dataless stand-in for a multi-series trend chart --
|
|
945
950
|
* four grey paths over the shared axis frame, each with a solid-then-dashed
|
|
946
951
|
* handoff for the live chart's forecast tail, and a point at every sample.
|
|
@@ -971,6 +976,7 @@ declare function LineChartPlaceholder({ height }: LineChartPlaceholderProps): re
|
|
|
971
976
|
|
|
972
977
|
/**
|
|
973
978
|
* @pattern PieChartPlaceholder
|
|
979
|
+
* @status stable
|
|
974
980
|
* @description Neutral, dataless stand-in for a pie chart -- a grey disc
|
|
975
981
|
* seamed where slices would fall, beside a blank legend. No axis, matching
|
|
976
982
|
* the live pie it stands in for. Same no-results use as
|
|
@@ -1172,6 +1178,7 @@ declare function AdvertiserNoResults({ query, hint, }: AdvertiserNoResultsProps)
|
|
|
1172
1178
|
|
|
1173
1179
|
/**
|
|
1174
1180
|
* @pattern SelectAllVisible
|
|
1181
|
+
* @status stable
|
|
1175
1182
|
* @description "Select all visible" row for a search-first picker's result
|
|
1176
1183
|
* list -- only render it once the caller decides the visible result set is
|
|
1177
1184
|
* long enough to warrant it (`insights-studio-prototype`'s three advertiser-
|
|
@@ -1205,6 +1212,7 @@ declare function SelectAllVisible({ count, allSelected, onToggle, testIdPrefix }
|
|
|
1205
1212
|
|
|
1206
1213
|
/**
|
|
1207
1214
|
* @pattern SelectedSection
|
|
1215
|
+
* @status stable
|
|
1208
1216
|
* @description Collapsible "Selected (n)" container for a search-first
|
|
1209
1217
|
* picker. Selections can pile up and crowd out the live search results, so
|
|
1210
1218
|
* the user can fold them away to refocus on the search. Controlled so the
|
|
@@ -1349,6 +1357,7 @@ interface SelectionPickerProps<T extends PickerRow> {
|
|
|
1349
1357
|
}
|
|
1350
1358
|
/**
|
|
1351
1359
|
* @pattern SelectionPicker
|
|
1360
|
+
* @status stable
|
|
1352
1361
|
* @description Generic search-and-filter picker for building a selection out
|
|
1353
1362
|
* of a larger catalog -- a search box plus filter dropdowns above a checkbox
|
|
1354
1363
|
* table, with an optional "Search / Account lists" source toggle for pulling
|
|
@@ -1376,10 +1385,12 @@ interface SelectionPickerProps<T extends PickerRow> {
|
|
|
1376
1385
|
* with both an `onChange` and the row's own `onClick` -- `CheckBox` stops
|
|
1377
1386
|
* click propagation before firing `onChange`, which is exactly what lets it
|
|
1378
1387
|
* sit inside a row that toggles on its own click without double-firing.
|
|
1379
|
-
* @a11y Search is an <input>; result rows
|
|
1380
|
-
* (
|
|
1381
|
-
*
|
|
1382
|
-
*
|
|
1388
|
+
* @a11y Search is an <input>; result rows are buttons. Each filter dropdown
|
|
1389
|
+
* is a disclosure (aria-expanded) opening a labelled group of checkboxes,
|
|
1390
|
+
* not a menu: it holds a search box and checkboxes, which a menu may not.
|
|
1391
|
+
* Escape closes it. Loading, empty and error states announce through
|
|
1392
|
+
* role="status", so a consumer should NOT wrap this in its own live region
|
|
1393
|
+
* -- that would double-announce.
|
|
1383
1394
|
* @usage
|
|
1384
1395
|
* ```tsx
|
|
1385
1396
|
* <SelectionPicker
|
package/dist/index.js
CHANGED
|
@@ -2344,7 +2344,8 @@ function SelectionPicker({
|
|
|
2344
2344
|
"grid items-center gap-2 px-3 py-2.5",
|
|
2345
2345
|
rowGridCols,
|
|
2346
2346
|
isLocked ? "cursor-default opacity-50" : "cursor-pointer hover:bg-subtle",
|
|
2347
|
-
|
|
2347
|
+
// 70%, not lower: selected rows' text must keep 4.5:1 contrast.
|
|
2348
|
+
!isLocked && isSel && "opacity-70"
|
|
2348
2349
|
),
|
|
2349
2350
|
children: [
|
|
2350
2351
|
isLocked ? /* @__PURE__ */ jsx24("span", { "aria-hidden": "true" }) : /* @__PURE__ */ jsx24(
|
|
@@ -2579,7 +2580,6 @@ function FilterDropdown({
|
|
|
2579
2580
|
ref: btnRef,
|
|
2580
2581
|
type: "button",
|
|
2581
2582
|
onClick: () => setOpen((v) => !v),
|
|
2582
|
-
"aria-haspopup": "menu",
|
|
2583
2583
|
"aria-expanded": open,
|
|
2584
2584
|
"data-testid": testIdPrefix && `${testIdPrefix}-filter-${filterSlug}`,
|
|
2585
2585
|
className: "inline-flex h-9 items-center gap-1.5 whitespace-nowrap rounded-control border border-border-default bg-input px-3 text-[13px] font-medium text-text-secondary transition-colors hover:bg-subtle",
|
|
@@ -2594,7 +2594,7 @@ function FilterDropdown({
|
|
|
2594
2594
|
"div",
|
|
2595
2595
|
{
|
|
2596
2596
|
ref: menuRef,
|
|
2597
|
-
role: "
|
|
2597
|
+
role: "group",
|
|
2598
2598
|
"aria-label": filter.label,
|
|
2599
2599
|
style: { top: pos.top, left: pos.left },
|
|
2600
2600
|
className: "fixed z-[80] min-w-[220px] rounded-card border border-border-default bg-surface p-2 shadow-overlay",
|