@mediaradar/design-components 0.34.0 → 0.35.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 +24 -48
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +24 -11
- package/dist/index.d.ts +24 -11
- package/dist/index.js +29 -53
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.d.cts
CHANGED
|
@@ -301,13 +301,14 @@ declare function Delta({ value, suffix, arrow, period, className }: DeltaProps):
|
|
|
301
301
|
|
|
302
302
|
/**
|
|
303
303
|
* @pattern CheckBox
|
|
304
|
+
* @audited 2026-11-12
|
|
304
305
|
* @description Tri-state checkbox rendered as a `<button>` (not a native
|
|
305
306
|
* `<input type="checkbox">`), so it can carry an indeterminate "some but not
|
|
306
307
|
* all" state without the native element's limited styling hooks. Designed to
|
|
307
308
|
* be dropped into a row that already has its own click-to-toggle handler
|
|
308
309
|
* (a common list/table pattern) without double-firing. Where the row itself
|
|
309
310
|
* is the control, use `CheckBoxBox` instead.
|
|
310
|
-
* @tokens bg-brand-primaryAction, text-brand-onprimary, border-border-interactive, bg-input,
|
|
311
|
+
* @tokens rounded-small, bg-brand-primaryAction, text-brand-onprimary, border-border-interactive, bg-input,
|
|
311
312
|
* hover:border-brand-primaryAction, focus-visible:outline-border-focus
|
|
312
313
|
* @dependencies lucide-react
|
|
313
314
|
* @behavior `aria-checked` is `"mixed"` when indeterminate, otherwise the
|
|
@@ -389,7 +390,7 @@ declare function CheckBox({ checked, indeterminate, onChange, ariaLabel, disable
|
|
|
389
390
|
* the same control is worse for keyboard users, not better. The owning
|
|
390
391
|
* element supplies `role="checkbox"` and `aria-checked`; this is
|
|
391
392
|
* `aria-hidden` so the state isn't announced twice.
|
|
392
|
-
* @tokens bg-brand-primaryAction, text-brand-onprimary, border-border-interactive, bg-input
|
|
393
|
+
* @tokens rounded-small, bg-brand-primaryAction, text-brand-onprimary, border-border-interactive, bg-input
|
|
393
394
|
* @dependencies lucide-react
|
|
394
395
|
* @behavior Renders through the same `boxClass` as `CheckBox`, so geometry
|
|
395
396
|
* and fill can't drift. Takes neither the focus ring nor the hover border,
|
|
@@ -644,6 +645,7 @@ declare function SearchBar({ placeholder, value, onChange, variant, size, matchV
|
|
|
644
645
|
|
|
645
646
|
/**
|
|
646
647
|
* @pattern SectionRail
|
|
648
|
+
* @audited 2026-11-12
|
|
647
649
|
* @description Generic titled section wrapper for a row of cards — a
|
|
648
650
|
* horizontal scroll rail on mobile/tablet (snap, bleeds to edges), a
|
|
649
651
|
* left-aligned 4-column grid on desktop. Card width is handled here, not on
|
|
@@ -1011,6 +1013,7 @@ interface SummaryGroup {
|
|
|
1011
1013
|
}
|
|
1012
1014
|
/**
|
|
1013
1015
|
* @pattern WorkspaceSelectedCard
|
|
1016
|
+
* @audited 2026-11-12
|
|
1014
1017
|
* @status stable
|
|
1015
1018
|
* @description Sticky recap card listing what each section's picker has
|
|
1016
1019
|
* added, as collapsible groups with per-item remove and "Remove all" --
|
|
@@ -1027,7 +1030,7 @@ interface SummaryGroup {
|
|
|
1027
1030
|
* naming maps to this package's `shadow-raised`/`shadow-overlay` respectively
|
|
1028
1031
|
* (raised: a static card like this one; overlay: a floating popover/menu),
|
|
1029
1032
|
* not a 1:1 name swap.
|
|
1030
|
-
* @tokens rounded-card, border-border-default, bg-surface, shadow-raised,
|
|
1033
|
+
* @tokens text-micro, text-dense, rounded-card, border-border-default, bg-surface, shadow-raised,
|
|
1031
1034
|
* text-text-secondary, text-text-primary, rounded-full, bg-subtle,
|
|
1032
1035
|
* rounded-control, bg-canvas, hover:bg-subtle, hover:text-text-danger,
|
|
1033
1036
|
* text-text-link, divide-border-default
|
|
@@ -1073,6 +1076,7 @@ declare function WorkspaceSelectedCard({ groups, testIdPrefix }: WorkspaceSelect
|
|
|
1073
1076
|
|
|
1074
1077
|
/**
|
|
1075
1078
|
* @pattern BarChartPlaceholder
|
|
1079
|
+
* @audited 2026-11-12
|
|
1076
1080
|
* @status stable
|
|
1077
1081
|
* @description Neutral, dataless stand-in for a ranked-bar chart --
|
|
1078
1082
|
* descending bar profile under a blank-labelled axis frame (dashed
|
|
@@ -1081,7 +1085,7 @@ declare function WorkspaceSelectedCard({ groups, testIdPrefix }: WorkspaceSelect
|
|
|
1081
1085
|
* appears (no channel/league names, media types, dollar amounts,
|
|
1082
1086
|
* percentages, or series colors), and the shape holds the card's layout
|
|
1083
1087
|
* steady so nothing jumps when real data arrives.
|
|
1084
|
-
* @tokens bg-subtle, border-border-default, rounded-
|
|
1088
|
+
* @tokens bg-subtle, border-border-default, rounded-t-small
|
|
1085
1089
|
* @behavior Purely presentational -- `role="presentation"` and
|
|
1086
1090
|
* `aria-hidden="true"` throughout, since none of the boxes carry real
|
|
1087
1091
|
* content for assistive tech to announce. The bar count and profile are a
|
|
@@ -1103,6 +1107,7 @@ declare function BarChartPlaceholder({ height }: BarChartPlaceholderProps): reac
|
|
|
1103
1107
|
|
|
1104
1108
|
/**
|
|
1105
1109
|
* @pattern LineChartPlaceholder
|
|
1110
|
+
* @audited 2026-11-12
|
|
1106
1111
|
* @status stable
|
|
1107
1112
|
* @description Neutral, dataless stand-in for a multi-series trend chart --
|
|
1108
1113
|
* four grey paths over the shared axis frame, each with a solid-then-dashed
|
|
@@ -1134,6 +1139,7 @@ declare function LineChartPlaceholder({ height }: LineChartPlaceholderProps): re
|
|
|
1134
1139
|
|
|
1135
1140
|
/**
|
|
1136
1141
|
* @pattern PieChartPlaceholder
|
|
1142
|
+
* @audited 2026-11-12
|
|
1137
1143
|
* @status stable
|
|
1138
1144
|
* @description Neutral, dataless stand-in for a pie chart -- a grey disc
|
|
1139
1145
|
* seamed where slices would fall, beside a blank legend. No axis, matching
|
|
@@ -1165,6 +1171,7 @@ declare function PieChartPlaceholder({ height, legendRows }: PieChartPlaceholder
|
|
|
1165
1171
|
|
|
1166
1172
|
/**
|
|
1167
1173
|
* @pattern StackedColumnPlaceholder
|
|
1174
|
+
* @audited 2026-11-12
|
|
1168
1175
|
* @description Neutral, dataless stand-in for a 100% stacked column -- a
|
|
1169
1176
|
* single banded column beside a blank legend. `axis` follows the live card
|
|
1170
1177
|
* it stands in for: a share-of-total chart plotting on a 0-100% axis passes
|
|
@@ -1952,6 +1959,7 @@ interface SortButtonProps<K extends string> {
|
|
|
1952
1959
|
}
|
|
1953
1960
|
/**
|
|
1954
1961
|
* @pattern SortButton
|
|
1962
|
+
* @audited 2026-11-12
|
|
1955
1963
|
* @description Design-system rule: every sortable table column header uses
|
|
1956
1964
|
* this exact icon/color treatment. Sortable-but-inactive columns show a
|
|
1957
1965
|
* neutral ArrowUpDown in text-tertiary at half opacity, coming up to full on
|
|
@@ -2025,11 +2033,12 @@ declare function Pager({ page, totalPages, onPage, disabled, label }: PagerProps
|
|
|
2025
2033
|
|
|
2026
2034
|
declare const SIZES$1: {
|
|
2027
2035
|
/** Matches a 15px lucide icon exactly, so a workspace name in a menu row
|
|
2028
|
-
* left-aligns with labels in icon-led rows above and below it.
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
|
|
2036
|
+
* left-aligns with labels in icon-led rows above and below it. Shows one
|
|
2037
|
+
* initial: two at the smallest type step (10px) don't fit in 15px. */
|
|
2038
|
+
readonly xs: "size-3.75 rounded-small text-badge";
|
|
2039
|
+
/** text-badge (10px), not text-control-caption: that step is for dropdown
|
|
2040
|
+
* captions. Two initials need to sit inside the 24px tile, a step below md. */
|
|
2041
|
+
readonly sm: "h-6 w-6 text-badge";
|
|
2033
2042
|
readonly md: "h-7 w-7 text-micro";
|
|
2034
2043
|
readonly lg: "h-11 w-11 text-panel-title";
|
|
2035
2044
|
};
|
|
@@ -2040,11 +2049,13 @@ interface WorkspaceAvatarProps {
|
|
|
2040
2049
|
}
|
|
2041
2050
|
/**
|
|
2042
2051
|
* @pattern WorkspaceAvatar
|
|
2052
|
+
* @audited 2026-11-12
|
|
2043
2053
|
* @description The square tile that identifies a workspace in a switch
|
|
2044
2054
|
* list — first 1–2 word initials of the workspace name. Pass no name for
|
|
2045
2055
|
* the unscoped "All data workspace", which renders "AD" through the same
|
|
2046
2056
|
* rule so the unscoped default reads as a peer of named workspaces rather
|
|
2047
|
-
* than a special case.
|
|
2057
|
+
* than a special case. The xs size (15px, for menu rows) shows the first
|
|
2058
|
+
* initial only.
|
|
2048
2059
|
* @tokens rounded-control, bg-subtle, text-text-secondary
|
|
2049
2060
|
* @usage
|
|
2050
2061
|
* ```tsx
|
|
@@ -2167,6 +2178,7 @@ declare function Tag({ children, className }: TagProps): react.JSX.Element;
|
|
|
2167
2178
|
|
|
2168
2179
|
/**
|
|
2169
2180
|
* @pattern TablePagination
|
|
2181
|
+
* @audited 2026-11-12
|
|
2170
2182
|
* @description Full table-footer pagination bar: a rows-per-page select, a
|
|
2171
2183
|
* first/prev/pages/next/last pager, and the resolved "1 – 25 of N results"
|
|
2172
2184
|
* range. Owns no state — the host page holds `page` and `perPage` so the
|
|
@@ -2178,7 +2190,7 @@ declare function Tag({ children, className }: TagProps): react.JSX.Element;
|
|
|
2178
2190
|
* works through, where the total and the page size matter.
|
|
2179
2191
|
* @avoid in a card or a compact list -- use Pager, which is only the page
|
|
2180
2192
|
* controls and fits the narrower space.
|
|
2181
|
-
* @tokens rounded-control, text-text-primary, text-text-secondary, text-text-tertiary, bg-subtle, hover:bg-subtle, hover:text-text-primary
|
|
2193
|
+
* @tokens text-dense, rounded-control, text-text-primary, text-text-secondary, text-text-tertiary, bg-subtle, hover:bg-subtle, hover:text-text-primary
|
|
2182
2194
|
* @behavior The current page is a quiet grey fill with a dark bold number,
|
|
2183
2195
|
* keeping blue for actions. The rows-per-page control is the compact
|
|
2184
2196
|
* SelectFilter (`size="sm"`), our own menu, not the browser's. First/prev disable on page 1, next/last on the last
|
|
@@ -2446,6 +2458,7 @@ interface FreshnessProps {
|
|
|
2446
2458
|
}
|
|
2447
2459
|
/**
|
|
2448
2460
|
* @pattern Freshness
|
|
2461
|
+
* @audited 2026-11-12
|
|
2449
2462
|
* @description Freshness dot — prefixed to card meta rows so a row of 4
|
|
2450
2463
|
* timestamps stops reading as a wall of identical text. Color carries the
|
|
2451
2464
|
* urgency signal at a glance.
|
package/dist/index.d.ts
CHANGED
|
@@ -301,13 +301,14 @@ declare function Delta({ value, suffix, arrow, period, className }: DeltaProps):
|
|
|
301
301
|
|
|
302
302
|
/**
|
|
303
303
|
* @pattern CheckBox
|
|
304
|
+
* @audited 2026-11-12
|
|
304
305
|
* @description Tri-state checkbox rendered as a `<button>` (not a native
|
|
305
306
|
* `<input type="checkbox">`), so it can carry an indeterminate "some but not
|
|
306
307
|
* all" state without the native element's limited styling hooks. Designed to
|
|
307
308
|
* be dropped into a row that already has its own click-to-toggle handler
|
|
308
309
|
* (a common list/table pattern) without double-firing. Where the row itself
|
|
309
310
|
* is the control, use `CheckBoxBox` instead.
|
|
310
|
-
* @tokens bg-brand-primaryAction, text-brand-onprimary, border-border-interactive, bg-input,
|
|
311
|
+
* @tokens rounded-small, bg-brand-primaryAction, text-brand-onprimary, border-border-interactive, bg-input,
|
|
311
312
|
* hover:border-brand-primaryAction, focus-visible:outline-border-focus
|
|
312
313
|
* @dependencies lucide-react
|
|
313
314
|
* @behavior `aria-checked` is `"mixed"` when indeterminate, otherwise the
|
|
@@ -389,7 +390,7 @@ declare function CheckBox({ checked, indeterminate, onChange, ariaLabel, disable
|
|
|
389
390
|
* the same control is worse for keyboard users, not better. The owning
|
|
390
391
|
* element supplies `role="checkbox"` and `aria-checked`; this is
|
|
391
392
|
* `aria-hidden` so the state isn't announced twice.
|
|
392
|
-
* @tokens bg-brand-primaryAction, text-brand-onprimary, border-border-interactive, bg-input
|
|
393
|
+
* @tokens rounded-small, bg-brand-primaryAction, text-brand-onprimary, border-border-interactive, bg-input
|
|
393
394
|
* @dependencies lucide-react
|
|
394
395
|
* @behavior Renders through the same `boxClass` as `CheckBox`, so geometry
|
|
395
396
|
* and fill can't drift. Takes neither the focus ring nor the hover border,
|
|
@@ -644,6 +645,7 @@ declare function SearchBar({ placeholder, value, onChange, variant, size, matchV
|
|
|
644
645
|
|
|
645
646
|
/**
|
|
646
647
|
* @pattern SectionRail
|
|
648
|
+
* @audited 2026-11-12
|
|
647
649
|
* @description Generic titled section wrapper for a row of cards — a
|
|
648
650
|
* horizontal scroll rail on mobile/tablet (snap, bleeds to edges), a
|
|
649
651
|
* left-aligned 4-column grid on desktop. Card width is handled here, not on
|
|
@@ -1011,6 +1013,7 @@ interface SummaryGroup {
|
|
|
1011
1013
|
}
|
|
1012
1014
|
/**
|
|
1013
1015
|
* @pattern WorkspaceSelectedCard
|
|
1016
|
+
* @audited 2026-11-12
|
|
1014
1017
|
* @status stable
|
|
1015
1018
|
* @description Sticky recap card listing what each section's picker has
|
|
1016
1019
|
* added, as collapsible groups with per-item remove and "Remove all" --
|
|
@@ -1027,7 +1030,7 @@ interface SummaryGroup {
|
|
|
1027
1030
|
* naming maps to this package's `shadow-raised`/`shadow-overlay` respectively
|
|
1028
1031
|
* (raised: a static card like this one; overlay: a floating popover/menu),
|
|
1029
1032
|
* not a 1:1 name swap.
|
|
1030
|
-
* @tokens rounded-card, border-border-default, bg-surface, shadow-raised,
|
|
1033
|
+
* @tokens text-micro, text-dense, rounded-card, border-border-default, bg-surface, shadow-raised,
|
|
1031
1034
|
* text-text-secondary, text-text-primary, rounded-full, bg-subtle,
|
|
1032
1035
|
* rounded-control, bg-canvas, hover:bg-subtle, hover:text-text-danger,
|
|
1033
1036
|
* text-text-link, divide-border-default
|
|
@@ -1073,6 +1076,7 @@ declare function WorkspaceSelectedCard({ groups, testIdPrefix }: WorkspaceSelect
|
|
|
1073
1076
|
|
|
1074
1077
|
/**
|
|
1075
1078
|
* @pattern BarChartPlaceholder
|
|
1079
|
+
* @audited 2026-11-12
|
|
1076
1080
|
* @status stable
|
|
1077
1081
|
* @description Neutral, dataless stand-in for a ranked-bar chart --
|
|
1078
1082
|
* descending bar profile under a blank-labelled axis frame (dashed
|
|
@@ -1081,7 +1085,7 @@ declare function WorkspaceSelectedCard({ groups, testIdPrefix }: WorkspaceSelect
|
|
|
1081
1085
|
* appears (no channel/league names, media types, dollar amounts,
|
|
1082
1086
|
* percentages, or series colors), and the shape holds the card's layout
|
|
1083
1087
|
* steady so nothing jumps when real data arrives.
|
|
1084
|
-
* @tokens bg-subtle, border-border-default, rounded-
|
|
1088
|
+
* @tokens bg-subtle, border-border-default, rounded-t-small
|
|
1085
1089
|
* @behavior Purely presentational -- `role="presentation"` and
|
|
1086
1090
|
* `aria-hidden="true"` throughout, since none of the boxes carry real
|
|
1087
1091
|
* content for assistive tech to announce. The bar count and profile are a
|
|
@@ -1103,6 +1107,7 @@ declare function BarChartPlaceholder({ height }: BarChartPlaceholderProps): reac
|
|
|
1103
1107
|
|
|
1104
1108
|
/**
|
|
1105
1109
|
* @pattern LineChartPlaceholder
|
|
1110
|
+
* @audited 2026-11-12
|
|
1106
1111
|
* @status stable
|
|
1107
1112
|
* @description Neutral, dataless stand-in for a multi-series trend chart --
|
|
1108
1113
|
* four grey paths over the shared axis frame, each with a solid-then-dashed
|
|
@@ -1134,6 +1139,7 @@ declare function LineChartPlaceholder({ height }: LineChartPlaceholderProps): re
|
|
|
1134
1139
|
|
|
1135
1140
|
/**
|
|
1136
1141
|
* @pattern PieChartPlaceholder
|
|
1142
|
+
* @audited 2026-11-12
|
|
1137
1143
|
* @status stable
|
|
1138
1144
|
* @description Neutral, dataless stand-in for a pie chart -- a grey disc
|
|
1139
1145
|
* seamed where slices would fall, beside a blank legend. No axis, matching
|
|
@@ -1165,6 +1171,7 @@ declare function PieChartPlaceholder({ height, legendRows }: PieChartPlaceholder
|
|
|
1165
1171
|
|
|
1166
1172
|
/**
|
|
1167
1173
|
* @pattern StackedColumnPlaceholder
|
|
1174
|
+
* @audited 2026-11-12
|
|
1168
1175
|
* @description Neutral, dataless stand-in for a 100% stacked column -- a
|
|
1169
1176
|
* single banded column beside a blank legend. `axis` follows the live card
|
|
1170
1177
|
* it stands in for: a share-of-total chart plotting on a 0-100% axis passes
|
|
@@ -1952,6 +1959,7 @@ interface SortButtonProps<K extends string> {
|
|
|
1952
1959
|
}
|
|
1953
1960
|
/**
|
|
1954
1961
|
* @pattern SortButton
|
|
1962
|
+
* @audited 2026-11-12
|
|
1955
1963
|
* @description Design-system rule: every sortable table column header uses
|
|
1956
1964
|
* this exact icon/color treatment. Sortable-but-inactive columns show a
|
|
1957
1965
|
* neutral ArrowUpDown in text-tertiary at half opacity, coming up to full on
|
|
@@ -2025,11 +2033,12 @@ declare function Pager({ page, totalPages, onPage, disabled, label }: PagerProps
|
|
|
2025
2033
|
|
|
2026
2034
|
declare const SIZES$1: {
|
|
2027
2035
|
/** Matches a 15px lucide icon exactly, so a workspace name in a menu row
|
|
2028
|
-
* left-aligns with labels in icon-led rows above and below it.
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
|
|
2036
|
+
* left-aligns with labels in icon-led rows above and below it. Shows one
|
|
2037
|
+
* initial: two at the smallest type step (10px) don't fit in 15px. */
|
|
2038
|
+
readonly xs: "size-3.75 rounded-small text-badge";
|
|
2039
|
+
/** text-badge (10px), not text-control-caption: that step is for dropdown
|
|
2040
|
+
* captions. Two initials need to sit inside the 24px tile, a step below md. */
|
|
2041
|
+
readonly sm: "h-6 w-6 text-badge";
|
|
2033
2042
|
readonly md: "h-7 w-7 text-micro";
|
|
2034
2043
|
readonly lg: "h-11 w-11 text-panel-title";
|
|
2035
2044
|
};
|
|
@@ -2040,11 +2049,13 @@ interface WorkspaceAvatarProps {
|
|
|
2040
2049
|
}
|
|
2041
2050
|
/**
|
|
2042
2051
|
* @pattern WorkspaceAvatar
|
|
2052
|
+
* @audited 2026-11-12
|
|
2043
2053
|
* @description The square tile that identifies a workspace in a switch
|
|
2044
2054
|
* list — first 1–2 word initials of the workspace name. Pass no name for
|
|
2045
2055
|
* the unscoped "All data workspace", which renders "AD" through the same
|
|
2046
2056
|
* rule so the unscoped default reads as a peer of named workspaces rather
|
|
2047
|
-
* than a special case.
|
|
2057
|
+
* than a special case. The xs size (15px, for menu rows) shows the first
|
|
2058
|
+
* initial only.
|
|
2048
2059
|
* @tokens rounded-control, bg-subtle, text-text-secondary
|
|
2049
2060
|
* @usage
|
|
2050
2061
|
* ```tsx
|
|
@@ -2167,6 +2178,7 @@ declare function Tag({ children, className }: TagProps): react.JSX.Element;
|
|
|
2167
2178
|
|
|
2168
2179
|
/**
|
|
2169
2180
|
* @pattern TablePagination
|
|
2181
|
+
* @audited 2026-11-12
|
|
2170
2182
|
* @description Full table-footer pagination bar: a rows-per-page select, a
|
|
2171
2183
|
* first/prev/pages/next/last pager, and the resolved "1 – 25 of N results"
|
|
2172
2184
|
* range. Owns no state — the host page holds `page` and `perPage` so the
|
|
@@ -2178,7 +2190,7 @@ declare function Tag({ children, className }: TagProps): react.JSX.Element;
|
|
|
2178
2190
|
* works through, where the total and the page size matter.
|
|
2179
2191
|
* @avoid in a card or a compact list -- use Pager, which is only the page
|
|
2180
2192
|
* controls and fits the narrower space.
|
|
2181
|
-
* @tokens rounded-control, text-text-primary, text-text-secondary, text-text-tertiary, bg-subtle, hover:bg-subtle, hover:text-text-primary
|
|
2193
|
+
* @tokens text-dense, rounded-control, text-text-primary, text-text-secondary, text-text-tertiary, bg-subtle, hover:bg-subtle, hover:text-text-primary
|
|
2182
2194
|
* @behavior The current page is a quiet grey fill with a dark bold number,
|
|
2183
2195
|
* keeping blue for actions. The rows-per-page control is the compact
|
|
2184
2196
|
* SelectFilter (`size="sm"`), our own menu, not the browser's. First/prev disable on page 1, next/last on the last
|
|
@@ -2446,6 +2458,7 @@ interface FreshnessProps {
|
|
|
2446
2458
|
}
|
|
2447
2459
|
/**
|
|
2448
2460
|
* @pattern Freshness
|
|
2461
|
+
* @audited 2026-11-12
|
|
2449
2462
|
* @description Freshness dot — prefixed to card meta rows so a row of 4
|
|
2450
2463
|
* timestamps stops reading as a wall of identical text. Color carries the
|
|
2451
2464
|
* urgency signal at a glance.
|
package/dist/index.js
CHANGED
|
@@ -554,7 +554,7 @@ import { Check as Check2, Minus } from "lucide-react";
|
|
|
554
554
|
import { jsx as jsx7 } from "react/jsx-runtime";
|
|
555
555
|
function boxClass(on, disabled) {
|
|
556
556
|
return cn(
|
|
557
|
-
"flex
|
|
557
|
+
"flex size-4.5 shrink-0 items-center justify-center rounded-small border transition-colors",
|
|
558
558
|
on ? "border-transparent bg-brand-primaryAction text-brand-onprimary" : "border-border-interactive bg-input",
|
|
559
559
|
disabled && "cursor-not-allowed opacity-50"
|
|
560
560
|
);
|
|
@@ -1362,7 +1362,7 @@ function SectionRail({
|
|
|
1362
1362
|
/* @__PURE__ */ jsx10(
|
|
1363
1363
|
"h2",
|
|
1364
1364
|
{
|
|
1365
|
-
className: titleSerif ? "font-serif text-
|
|
1365
|
+
className: titleSerif ? "font-serif text-xl font-normal tracking-tight text-text-primary" : "text-xl font-medium tracking-tight text-text-primary",
|
|
1366
1366
|
children: title
|
|
1367
1367
|
}
|
|
1368
1368
|
),
|
|
@@ -1406,7 +1406,7 @@ function SectionRail({
|
|
|
1406
1406
|
"div",
|
|
1407
1407
|
{
|
|
1408
1408
|
ref: scrollRef,
|
|
1409
|
-
className: "flex gap-4 overflow-x-auto scroll-smooth pb-2 snap-x snap-mandatory scrollbar-none [&::-webkit-scrollbar]:hidden -mx-4 px-4 sm:mx-0 sm:px-0 *:w-
|
|
1409
|
+
className: "flex gap-4 overflow-x-auto scroll-smooth pb-2 snap-x snap-mandatory scrollbar-none [&::-webkit-scrollbar]:hidden -mx-4 px-4 sm:mx-0 sm:px-0 *:w-67 *:shrink-0 *:snap-start lg:grid lg:grid-cols-[repeat(4,minmax(0,320px))] lg:gap-5 lg:overflow-visible lg:justify-start lg:*:w-auto lg:*:shrink lg:*:snap-none",
|
|
1410
1410
|
children
|
|
1411
1411
|
}
|
|
1412
1412
|
)
|
|
@@ -1824,12 +1824,12 @@ function SummaryGroupItem({
|
|
|
1824
1824
|
className: cx5("shrink-0 text-text-secondary transition-transform", !open && "-rotate-90")
|
|
1825
1825
|
}
|
|
1826
1826
|
),
|
|
1827
|
-
/* @__PURE__ */ jsx16("span", { className: cx5("truncate font-semibold text-text-primary", nested ? "text-
|
|
1828
|
-
/* @__PURE__ */ jsx16("span", { className: "shrink-0 rounded-full bg-subtle px-1.5 py-0.5 text-
|
|
1827
|
+
/* @__PURE__ */ jsx16("span", { className: cx5("truncate font-semibold text-text-primary", nested ? "text-xs" : "text-dense"), children: group.label }),
|
|
1828
|
+
/* @__PURE__ */ jsx16("span", { className: "shrink-0 rounded-full bg-subtle px-1.5 py-0.5 text-micro font-semibold text-text-secondary", children: ownCount })
|
|
1829
1829
|
]
|
|
1830
1830
|
}
|
|
1831
1831
|
),
|
|
1832
|
-
open && /* @__PURE__ */ jsx16("div", { className: "pt-2.5", children: ownCount === 0 && subCount === 0 ? /* @__PURE__ */ jsx16("p", { className: "text-
|
|
1832
|
+
open && /* @__PURE__ */ jsx16("div", { className: "pt-2.5", children: ownCount === 0 && subCount === 0 ? /* @__PURE__ */ jsx16("p", { className: "text-xs text-text-secondary", children: "Nothing selected." }) : /* @__PURE__ */ jsxs15("div", { className: "flex flex-col gap-2.5", children: [
|
|
1833
1833
|
ownCount > 0 && /* @__PURE__ */ jsxs15("div", { className: "flex flex-col gap-1.5", children: [
|
|
1834
1834
|
group.items.map((item) => /* @__PURE__ */ jsxs15(
|
|
1835
1835
|
"div",
|
|
@@ -1837,8 +1837,8 @@ function SummaryGroupItem({
|
|
|
1837
1837
|
className: "flex items-center justify-between gap-2 rounded-control border border-border-default bg-canvas px-2 py-1",
|
|
1838
1838
|
children: [
|
|
1839
1839
|
/* @__PURE__ */ jsxs15("span", { className: "min-w-0 flex-1", children: [
|
|
1840
|
-
/* @__PURE__ */ jsx16("span", { className: "block truncate text-
|
|
1841
|
-
item.meta && /* @__PURE__ */ jsx16("span", { className: "block truncate text-
|
|
1840
|
+
/* @__PURE__ */ jsx16("span", { className: "block truncate text-xs text-text-primary", children: item.name }),
|
|
1841
|
+
item.meta && /* @__PURE__ */ jsx16("span", { className: "block truncate text-micro text-text-secondary", children: item.meta })
|
|
1842
1842
|
] }),
|
|
1843
1843
|
/* @__PURE__ */ jsx16(
|
|
1844
1844
|
"button",
|
|
@@ -1860,7 +1860,7 @@ function SummaryGroupItem({
|
|
|
1860
1860
|
type: "button",
|
|
1861
1861
|
onClick: group.onRemoveAll,
|
|
1862
1862
|
"data-testid": testIdPrefix && `${testIdPrefix}-remove-all-${group.id}`,
|
|
1863
|
-
className: "mt-0.5 self-start text-
|
|
1863
|
+
className: "mt-0.5 self-start text-micro font-medium text-text-link hover:underline",
|
|
1864
1864
|
children: "Remove all"
|
|
1865
1865
|
}
|
|
1866
1866
|
)
|
|
@@ -1941,7 +1941,7 @@ function BlankLegend({ rows, reverse = false }) {
|
|
|
1941
1941
|
import { jsx as jsx18 } from "react/jsx-runtime";
|
|
1942
1942
|
var BAR_PROFILE = [92, 86, 76, 65, 57, 40, 30, 24, 18, 13];
|
|
1943
1943
|
function BarChartPlaceholder({ height = 220 }) {
|
|
1944
|
-
return /* @__PURE__ */ jsx18(AxisFrame, { height, xTicks: BAR_PROFILE.length, children: /* @__PURE__ */ jsx18("div", { className: "flex h-full w-full items-end gap-2", children: BAR_PROFILE.map((pct, i) => /* @__PURE__ */ jsx18("div", { className: "flex-1 rounded-t-
|
|
1944
|
+
return /* @__PURE__ */ jsx18(AxisFrame, { height, xTicks: BAR_PROFILE.length, children: /* @__PURE__ */ jsx18("div", { className: "flex h-full w-full items-end gap-2", children: BAR_PROFILE.map((pct, i) => /* @__PURE__ */ jsx18("div", { className: "flex-1 rounded-t-small bg-subtle", style: { height: `${pct}%` } }, i)) }) });
|
|
1945
1945
|
}
|
|
1946
1946
|
|
|
1947
1947
|
// src/LineChartPlaceholder.tsx
|
|
@@ -3403,11 +3403,12 @@ function workspaceInitials(name) {
|
|
|
3403
3403
|
}
|
|
3404
3404
|
var SIZES = {
|
|
3405
3405
|
/** Matches a 15px lucide icon exactly, so a workspace name in a menu row
|
|
3406
|
-
* left-aligns with labels in icon-led rows above and below it.
|
|
3407
|
-
|
|
3408
|
-
|
|
3409
|
-
|
|
3410
|
-
|
|
3406
|
+
* left-aligns with labels in icon-led rows above and below it. Shows one
|
|
3407
|
+
* initial: two at the smallest type step (10px) don't fit in 15px. */
|
|
3408
|
+
xs: "size-3.75 rounded-small text-badge",
|
|
3409
|
+
/** text-badge (10px), not text-control-caption: that step is for dropdown
|
|
3410
|
+
* captions. Two initials need to sit inside the 24px tile, a step below md. */
|
|
3411
|
+
sm: "h-6 w-6 text-badge",
|
|
3411
3412
|
md: "h-7 w-7 text-micro",
|
|
3412
3413
|
lg: "h-11 w-11 text-panel-title"
|
|
3413
3414
|
};
|
|
@@ -3420,7 +3421,7 @@ function WorkspaceAvatar({ name, size = "md" }) {
|
|
|
3420
3421
|
"flex shrink-0 items-center justify-center rounded-control bg-subtle font-semibold leading-none text-text-secondary",
|
|
3421
3422
|
SIZES[size]
|
|
3422
3423
|
),
|
|
3423
|
-
children: workspaceInitials(name ?? "All data")
|
|
3424
|
+
children: size === "xs" ? workspaceInitials(name ?? "All data").slice(0, 1) : workspaceInitials(name ?? "All data")
|
|
3424
3425
|
}
|
|
3425
3426
|
);
|
|
3426
3427
|
}
|
|
@@ -3523,10 +3524,10 @@ function TablePagination({
|
|
|
3523
3524
|
const current = Math.min(page, totalPages);
|
|
3524
3525
|
const rangeStart = totalItems === 0 ? 0 : (current - 1) * perPage + 1;
|
|
3525
3526
|
const rangeEnd = Math.min(current * perPage, totalItems);
|
|
3526
|
-
const btn = "flex h-8 min-w-8 items-center justify-center rounded-control px-2 text-
|
|
3527
|
+
const btn = "flex h-8 min-w-8 items-center justify-center rounded-control px-2 text-dense transition-colors";
|
|
3527
3528
|
const off = "disabled:pointer-events-none disabled:opacity-30";
|
|
3528
3529
|
const stepBtn = cn(btn, "text-text-secondary hover:bg-subtle hover:text-text-primary", off);
|
|
3529
|
-
const range = /* @__PURE__ */ jsxs33("span", { className: "text-
|
|
3530
|
+
const range = /* @__PURE__ */ jsxs33("span", { className: "text-dense text-text-tertiary tabular-nums", children: [
|
|
3530
3531
|
rangeStart.toLocaleString(),
|
|
3531
3532
|
" \u2013 ",
|
|
3532
3533
|
rangeEnd.toLocaleString(),
|
|
@@ -3539,7 +3540,7 @@ function TablePagination({
|
|
|
3539
3540
|
/* @__PURE__ */ jsxs33(
|
|
3540
3541
|
"div",
|
|
3541
3542
|
{
|
|
3542
|
-
className: cn("flex items-center gap-2 text-
|
|
3543
|
+
className: cn("flex items-center gap-2 text-dense text-text-secondary", !onPerPageChange && "invisible"),
|
|
3543
3544
|
children: [
|
|
3544
3545
|
/* @__PURE__ */ jsx37(
|
|
3545
3546
|
SelectFilter,
|
|
@@ -3583,7 +3584,7 @@ function TablePagination({
|
|
|
3583
3584
|
}
|
|
3584
3585
|
),
|
|
3585
3586
|
pageWindow(current, totalPages).map(
|
|
3586
|
-
(p) => typeof p === "string" ? /* @__PURE__ */ jsx37("span", { className: "px-1 text-
|
|
3587
|
+
(p) => typeof p === "string" ? /* @__PURE__ */ jsx37("span", { className: "px-1 text-dense text-text-tertiary", children: "\u2026" }, p) : /* @__PURE__ */ jsx37(
|
|
3587
3588
|
"button",
|
|
3588
3589
|
{
|
|
3589
3590
|
type: "button",
|
|
@@ -3806,7 +3807,7 @@ function DateRangePicker({
|
|
|
3806
3807
|
|
|
3807
3808
|
// src/MultiSelectFilter.tsx
|
|
3808
3809
|
import { useCallback as useCallback4, useEffect as useEffect13, useRef as useRef14, useState as useState14 } from "react";
|
|
3809
|
-
import { ChevronDown as ChevronDown10,
|
|
3810
|
+
import { ChevronDown as ChevronDown10, Search as Search5, X as X5 } from "lucide-react";
|
|
3810
3811
|
import { Fragment as Fragment5, jsx as jsx39, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
3811
3812
|
function MultiSelectFilter({
|
|
3812
3813
|
caption,
|
|
@@ -3958,7 +3959,7 @@ function MultiSelectFilter({
|
|
|
3958
3959
|
onClick: () => toggleGroup(g),
|
|
3959
3960
|
className: "flex w-full items-center gap-2.5 rounded-control px-2 py-2 text-left transition-colors hover:bg-subtle",
|
|
3960
3961
|
children: [
|
|
3961
|
-
/* @__PURE__ */ jsx39(
|
|
3962
|
+
/* @__PURE__ */ jsx39(CheckBoxBox, { checked: state === "all", indeterminate: state === "some" }),
|
|
3962
3963
|
/* @__PURE__ */ jsx39("span", { className: cn("flex-1 text-[14px] text-text-primary", !plainParent && "font-semibold"), children: g.label }),
|
|
3963
3964
|
counts && /* @__PURE__ */ jsx39(OptionCount, { n: countFor(g.id) })
|
|
3964
3965
|
]
|
|
@@ -3973,7 +3974,7 @@ function MultiSelectFilter({
|
|
|
3973
3974
|
onClick: () => toggle(c.id),
|
|
3974
3975
|
className: "flex w-full items-center gap-2.5 rounded-control py-2 pl-9 pr-2 text-left transition-colors hover:bg-subtle",
|
|
3975
3976
|
children: [
|
|
3976
|
-
/* @__PURE__ */ jsx39(
|
|
3977
|
+
/* @__PURE__ */ jsx39(CheckBoxBox, { checked }),
|
|
3977
3978
|
/* @__PURE__ */ jsx39("span", { className: "flex-1 text-[14px] text-text-primary", children: c.label }),
|
|
3978
3979
|
counts && /* @__PURE__ */ jsx39(OptionCount, { n: countFor(c.id) })
|
|
3979
3980
|
]
|
|
@@ -3991,16 +3992,7 @@ function MultiSelectFilter({
|
|
|
3991
3992
|
onClick: () => toggle(o.id),
|
|
3992
3993
|
className: "flex w-full items-center gap-2.5 rounded-control px-2 py-2 text-left transition-colors hover:bg-subtle",
|
|
3993
3994
|
children: [
|
|
3994
|
-
/* @__PURE__ */ jsx39(
|
|
3995
|
-
"span",
|
|
3996
|
-
{
|
|
3997
|
-
className: cn(
|
|
3998
|
-
"flex h-[18px] w-[18px] shrink-0 items-center justify-center rounded-[5px] border transition-colors",
|
|
3999
|
-
checked ? "border-transparent bg-brand-primaryAction text-brand-onprimary" : "border-border-interactive bg-input"
|
|
4000
|
-
),
|
|
4001
|
-
children: checked && /* @__PURE__ */ jsx39(Check8, { size: 13, strokeWidth: 3 })
|
|
4002
|
-
}
|
|
4003
|
-
),
|
|
3995
|
+
/* @__PURE__ */ jsx39(CheckBoxBox, { checked }),
|
|
4004
3996
|
/* @__PURE__ */ jsx39("span", { className: "flex-1 text-[14px] text-text-primary", children: o.label }),
|
|
4005
3997
|
counts && /* @__PURE__ */ jsx39(OptionCount, { n: countFor(o.id) })
|
|
4006
3998
|
]
|
|
@@ -4027,22 +4019,6 @@ function MultiSelectFilter({
|
|
|
4027
4019
|
)
|
|
4028
4020
|
] });
|
|
4029
4021
|
}
|
|
4030
|
-
function TriCheck({ state }) {
|
|
4031
|
-
const filled = state !== "none";
|
|
4032
|
-
return /* @__PURE__ */ jsxs35(
|
|
4033
|
-
"span",
|
|
4034
|
-
{
|
|
4035
|
-
className: cn(
|
|
4036
|
-
"flex h-[18px] w-[18px] shrink-0 items-center justify-center rounded-[5px] border transition-colors",
|
|
4037
|
-
filled ? "border-transparent bg-brand-primaryAction text-brand-onprimary" : "border-border-interactive bg-input"
|
|
4038
|
-
),
|
|
4039
|
-
children: [
|
|
4040
|
-
state === "all" && /* @__PURE__ */ jsx39(Check8, { size: 13, strokeWidth: 3 }),
|
|
4041
|
-
state === "some" && /* @__PURE__ */ jsx39(Minus2, { size: 13, strokeWidth: 3 })
|
|
4042
|
-
]
|
|
4043
|
-
}
|
|
4044
|
-
);
|
|
4045
|
-
}
|
|
4046
4022
|
function OptionCount({ n }) {
|
|
4047
4023
|
return /* @__PURE__ */ jsxs35("span", { className: "shrink-0 text-[12px] tabular-nums text-text-tertiary", children: [
|
|
4048
4024
|
"(",
|
|
@@ -4693,7 +4669,7 @@ function SuggestionChip({ children, className, type = "button", ...props }) {
|
|
|
4693
4669
|
}
|
|
4694
4670
|
|
|
4695
4671
|
// src/ToggleChip.tsx
|
|
4696
|
-
import { Check as
|
|
4672
|
+
import { Check as Check8 } from "lucide-react";
|
|
4697
4673
|
import { jsx as jsx53, jsxs as jsxs45 } from "react/jsx-runtime";
|
|
4698
4674
|
function ToggleChip({ selected, onChange, children, className, type = "button", onClick, ...props }) {
|
|
4699
4675
|
return /* @__PURE__ */ jsxs45(
|
|
@@ -4712,7 +4688,7 @@ function ToggleChip({ selected, onChange, children, className, type = "button",
|
|
|
4712
4688
|
className
|
|
4713
4689
|
),
|
|
4714
4690
|
children: [
|
|
4715
|
-
selected && /* @__PURE__ */ jsx53(
|
|
4691
|
+
selected && /* @__PURE__ */ jsx53(Check8, { size: 14, "aria-hidden": "true", className: "-ml-0.5 shrink-0" }),
|
|
4716
4692
|
children
|
|
4717
4693
|
]
|
|
4718
4694
|
}
|
|
@@ -4721,7 +4697,7 @@ function ToggleChip({ selected, onChange, children, className, type = "button",
|
|
|
4721
4697
|
|
|
4722
4698
|
// src/CopyButton.tsx
|
|
4723
4699
|
import { useEffect as useEffect16, useRef as useRef18, useState as useState16 } from "react";
|
|
4724
|
-
import { Check as
|
|
4700
|
+
import { Check as Check9, Copy } from "lucide-react";
|
|
4725
4701
|
import { jsx as jsx54, jsxs as jsxs46 } from "react/jsx-runtime";
|
|
4726
4702
|
var CONFIRM_MS = 2e3;
|
|
4727
4703
|
function CopyButton({ value, label, "aria-label": ariaLabel, size = "xs", className }) {
|
|
@@ -4739,7 +4715,7 @@ function CopyButton({ value, label, "aria-label": ariaLabel, size = "xs", classN
|
|
|
4739
4715
|
timer.current = setTimeout(() => setCopied(false), CONFIRM_MS);
|
|
4740
4716
|
};
|
|
4741
4717
|
const iconSize = size === "xs" ? 13 : 15;
|
|
4742
|
-
const icon = copied ? /* @__PURE__ */ jsx54(
|
|
4718
|
+
const icon = copied ? /* @__PURE__ */ jsx54(Check9, { size: iconSize, "aria-hidden": "true", className: "shrink-0 text-text-success" }) : /* @__PURE__ */ jsx54(Copy, { size: iconSize, "aria-hidden": "true", className: "shrink-0" });
|
|
4743
4719
|
return /* @__PURE__ */ jsxs46(
|
|
4744
4720
|
Button,
|
|
4745
4721
|
{
|