@trinityui/design-system 2.4.0 → 2.10.2
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/CHANGELOG.md +34 -455
- package/dist/{Legend.js → IllustratedMessage.js} +1247 -1204
- package/dist/app-shell.js +32 -32
- package/dist/assets/index.d.ts +1 -1
- package/dist/charts.js +3267 -3144
- package/dist/components/AI/QueryInput.d.ts +3 -3
- package/dist/components/AIDigestCard/AIDigestCard.d.ts +29 -0
- package/dist/components/AIDigestCard/AIDigestCard.d.ts.map +1 -0
- package/dist/components/AIDigestCard/index.d.ts +9 -0
- package/dist/components/AIDigestCard/index.d.ts.map +1 -0
- package/dist/components/AIDigestCard/types.d.ts +70 -0
- package/dist/components/AIDigestCard/types.d.ts.map +1 -0
- package/dist/components/AppLayout/AIFabLayout.deprecated.d.ts +1 -1
- package/dist/components/AssessmentDrawer/AssessmentDrawer.d.ts +23 -0
- package/dist/components/AssessmentDrawer/AssessmentDrawer.d.ts.map +1 -0
- package/dist/components/AssessmentDrawer/index.d.ts +9 -0
- package/dist/components/AssessmentDrawer/index.d.ts.map +1 -0
- package/dist/components/AssessmentDrawer/types.d.ts +88 -0
- package/dist/components/AssessmentDrawer/types.d.ts.map +1 -0
- package/dist/components/AuditDrawer/AuditDrawer.d.ts +37 -0
- package/dist/components/AuditDrawer/AuditDrawer.d.ts.map +1 -0
- package/dist/components/AuditDrawer/index.d.ts +9 -0
- package/dist/components/AuditDrawer/index.d.ts.map +1 -0
- package/dist/components/AuditDrawer/types.d.ts +116 -0
- package/dist/components/AuditDrawer/types.d.ts.map +1 -0
- package/dist/components/BulkActionDock/BulkActionDock.d.ts +30 -0
- package/dist/components/BulkActionDock/BulkActionDock.d.ts.map +1 -0
- package/dist/components/BulkActionDock/index.d.ts +9 -0
- package/dist/components/BulkActionDock/index.d.ts.map +1 -0
- package/dist/components/BulkActionDock/types.d.ts +71 -0
- package/dist/components/BulkActionDock/types.d.ts.map +1 -0
- package/dist/components/DateRangePicker/DateRangePicker.d.ts +20 -0
- package/dist/components/DateRangePicker/DateRangePicker.d.ts.map +1 -0
- package/dist/components/DateRangePicker/index.d.ts +9 -0
- package/dist/components/DateRangePicker/index.d.ts.map +1 -0
- package/dist/components/DateRangePicker/types.d.ts +72 -0
- package/dist/components/DateRangePicker/types.d.ts.map +1 -0
- package/dist/components/EntityDetailPanel/EntityDetailPanel.d.ts +17 -0
- package/dist/components/EntityDetailPanel/EntityDetailPanel.d.ts.map +1 -0
- package/dist/components/EntityDetailPanel/index.d.ts +9 -0
- package/dist/components/EntityDetailPanel/index.d.ts.map +1 -0
- package/dist/components/EntityDetailPanel/types.d.ts +108 -0
- package/dist/components/EntityDetailPanel/types.d.ts.map +1 -0
- package/dist/components/GanttView/GanttView.d.ts +25 -0
- package/dist/components/GanttView/GanttView.d.ts.map +1 -0
- package/dist/components/GanttView/index.d.ts +9 -0
- package/dist/components/GanttView/index.d.ts.map +1 -0
- package/dist/components/GanttView/types.d.ts +110 -0
- package/dist/components/GanttView/types.d.ts.map +1 -0
- package/dist/components/GaugeCard/GaugeCard.d.ts +34 -0
- package/dist/components/GaugeCard/GaugeCard.d.ts.map +1 -0
- package/dist/components/GaugeCard/index.d.ts +9 -0
- package/dist/components/GaugeCard/index.d.ts.map +1 -0
- package/dist/components/GaugeCard/types.d.ts +85 -0
- package/dist/components/GaugeCard/types.d.ts.map +1 -0
- package/dist/components/GeoStatusMap/GeoStatusMap.d.ts +17 -0
- package/dist/components/GeoStatusMap/GeoStatusMap.d.ts.map +1 -0
- package/dist/components/GeoStatusMap/index.d.ts +9 -0
- package/dist/components/GeoStatusMap/index.d.ts.map +1 -0
- package/dist/components/GeoStatusMap/types.d.ts +117 -0
- package/dist/components/GeoStatusMap/types.d.ts.map +1 -0
- package/dist/components/HierarchicalDrillDown/HierarchicalDrillDown.d.ts +22 -0
- package/dist/components/HierarchicalDrillDown/HierarchicalDrillDown.d.ts.map +1 -0
- package/dist/components/HierarchicalDrillDown/index.d.ts +9 -0
- package/dist/components/HierarchicalDrillDown/index.d.ts.map +1 -0
- package/dist/components/HierarchicalDrillDown/types.d.ts +81 -0
- package/dist/components/HierarchicalDrillDown/types.d.ts.map +1 -0
- package/dist/components/HistoricalDataIndicator/HistoricalDataIndicator.d.ts +21 -0
- package/dist/components/HistoricalDataIndicator/HistoricalDataIndicator.d.ts.map +1 -0
- package/dist/components/HistoricalDataIndicator/index.d.ts +9 -0
- package/dist/components/HistoricalDataIndicator/index.d.ts.map +1 -0
- package/dist/components/HistoricalDataIndicator/types.d.ts +58 -0
- package/dist/components/HistoricalDataIndicator/types.d.ts.map +1 -0
- package/dist/components/InsightCard/InsightCard.d.ts +27 -0
- package/dist/components/InsightCard/InsightCard.d.ts.map +1 -0
- package/dist/components/InsightCard/index.d.ts +9 -0
- package/dist/components/InsightCard/index.d.ts.map +1 -0
- package/dist/components/InsightCard/types.d.ts +62 -0
- package/dist/components/InsightCard/types.d.ts.map +1 -0
- package/dist/components/NotificationCenter/NotificationCenter.d.ts +31 -0
- package/dist/components/NotificationCenter/NotificationCenter.d.ts.map +1 -0
- package/dist/components/NotificationCenter/index.d.ts +9 -0
- package/dist/components/NotificationCenter/index.d.ts.map +1 -0
- package/dist/components/NotificationCenter/types.d.ts +91 -0
- package/dist/components/NotificationCenter/types.d.ts.map +1 -0
- package/dist/components/OrgChart/OrgChart.d.ts +23 -0
- package/dist/components/OrgChart/OrgChart.d.ts.map +1 -0
- package/dist/components/OrgChart/index.d.ts +9 -0
- package/dist/components/OrgChart/index.d.ts.map +1 -0
- package/dist/components/OrgChart/types.d.ts +81 -0
- package/dist/components/OrgChart/types.d.ts.map +1 -0
- package/dist/components/PageTOC/PageTOC.d.ts +33 -0
- package/dist/components/PageTOC/PageTOC.d.ts.map +1 -0
- package/dist/components/PageTOC/index.d.ts +9 -0
- package/dist/components/PageTOC/index.d.ts.map +1 -0
- package/dist/components/PageTOC/types.d.ts +58 -0
- package/dist/components/PageTOC/types.d.ts.map +1 -0
- package/dist/components/StatusHero/StatusHero.d.ts +31 -0
- package/dist/components/StatusHero/StatusHero.d.ts.map +1 -0
- package/dist/components/StatusHero/index.d.ts +9 -0
- package/dist/components/StatusHero/index.d.ts.map +1 -0
- package/dist/components/StatusHero/types.d.ts +57 -0
- package/dist/components/StatusHero/types.d.ts.map +1 -0
- package/dist/components/SystemBanner/SystemBanner.d.ts +28 -0
- package/dist/components/SystemBanner/SystemBanner.d.ts.map +1 -0
- package/dist/components/SystemBanner/index.d.ts +9 -0
- package/dist/components/SystemBanner/index.d.ts.map +1 -0
- package/dist/components/SystemBanner/types.d.ts +58 -0
- package/dist/components/SystemBanner/types.d.ts.map +1 -0
- package/dist/components/TopRisksStrip/TopRisksStrip.d.ts +26 -0
- package/dist/components/TopRisksStrip/TopRisksStrip.d.ts.map +1 -0
- package/dist/components/TopRisksStrip/index.d.ts +9 -0
- package/dist/components/TopRisksStrip/index.d.ts.map +1 -0
- package/dist/components/TopRisksStrip/types.d.ts +61 -0
- package/dist/components/TopRisksStrip/types.d.ts.map +1 -0
- package/dist/components/templates/Auth/AuthTemplate.d.ts +28 -0
- package/dist/components/templates/Auth/AuthTemplate.d.ts.map +1 -0
- package/dist/components/templates/Auth/index.d.ts +3 -0
- package/dist/components/templates/Auth/index.d.ts.map +1 -0
- package/dist/components/templates/Auth/types.d.ts +67 -0
- package/dist/components/templates/Auth/types.d.ts.map +1 -0
- package/dist/components/templates/Catalog/CatalogTemplate.d.ts +19 -0
- package/dist/components/templates/Catalog/CatalogTemplate.d.ts.map +1 -0
- package/dist/components/templates/Catalog/index.d.ts +3 -0
- package/dist/components/templates/Catalog/index.d.ts.map +1 -0
- package/dist/components/templates/Catalog/types.d.ts +85 -0
- package/dist/components/templates/Catalog/types.d.ts.map +1 -0
- package/dist/components/templates/ConnectorWizard/ConnectorWizardTemplate.d.ts +83 -0
- package/dist/components/templates/ConnectorWizard/ConnectorWizardTemplate.d.ts.map +1 -0
- package/dist/components/templates/ConnectorWizard/index.d.ts +2 -0
- package/dist/components/templates/ConnectorWizard/index.d.ts.map +1 -0
- package/dist/components/templates/ErrorPage/ErrorPageTemplate.d.ts +53 -0
- package/dist/components/templates/ErrorPage/ErrorPageTemplate.d.ts.map +1 -0
- package/dist/components/templates/ErrorPage/index.d.ts +2 -0
- package/dist/components/templates/ErrorPage/index.d.ts.map +1 -0
- package/dist/components/templates/InsightsCenter/InsightsCenterTemplate.d.ts +64 -0
- package/dist/components/templates/InsightsCenter/InsightsCenterTemplate.d.ts.map +1 -0
- package/dist/components/templates/InsightsCenter/index.d.ts +2 -0
- package/dist/components/templates/InsightsCenter/index.d.ts.map +1 -0
- package/dist/components/templates/IntegrationDetail/IntegrationDetailTemplate.d.ts +60 -0
- package/dist/components/templates/IntegrationDetail/IntegrationDetailTemplate.d.ts.map +1 -0
- package/dist/components/templates/IntegrationDetail/index.d.ts +2 -0
- package/dist/components/templates/IntegrationDetail/index.d.ts.map +1 -0
- package/dist/components/templates/Onboarding/OnboardingTemplate.d.ts +63 -0
- package/dist/components/templates/Onboarding/OnboardingTemplate.d.ts.map +1 -0
- package/dist/components/templates/Onboarding/index.d.ts +2 -0
- package/dist/components/templates/Onboarding/index.d.ts.map +1 -0
- package/dist/components/templates/PlanHero/PlanHero.d.ts +20 -0
- package/dist/components/templates/PlanHero/PlanHero.d.ts.map +1 -0
- package/dist/components/templates/PlanHero/index.d.ts +3 -0
- package/dist/components/templates/PlanHero/index.d.ts.map +1 -0
- package/dist/components/templates/PlanHero/types.d.ts +69 -0
- package/dist/components/templates/PlanHero/types.d.ts.map +1 -0
- package/dist/components/templates/Report/ReportTemplate.d.ts +74 -0
- package/dist/components/templates/Report/ReportTemplate.d.ts.map +1 -0
- package/dist/components/templates/Report/index.d.ts +2 -0
- package/dist/components/templates/Report/index.d.ts.map +1 -0
- package/dist/components/templates/Wizard/WizardTemplate.d.ts +81 -0
- package/dist/components/templates/Wizard/WizardTemplate.d.ts.map +1 -0
- package/dist/components/templates/Wizard/index.d.ts +2 -0
- package/dist/components/templates/Wizard/index.d.ts.map +1 -0
- package/dist/components/templates/index.d.ts +10 -0
- package/dist/components/templates/index.d.ts.map +1 -1
- package/dist/data-table2.js +41131 -37299
- package/dist/essentials.js +1 -1
- package/dist/index.d.ts +37 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +49347 -41359
- package/dist/trinity.css +1 -1
- package/package.json +42 -34
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @internal
|
|
3
|
+
* OrgChart barrel.
|
|
4
|
+
*
|
|
5
|
+
* PUBLIC API: Import from '@trinityui/design-system' instead.
|
|
6
|
+
*/
|
|
7
|
+
export { OrgChart, default as OrgChartDefault } from './OrgChart';
|
|
8
|
+
export type { OrgChartProps, OrgChartOrientation, OrgNode, } from './types';
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/OrgChart/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,QAAQ,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,YAAY,CAAC;AAElE,YAAY,EACV,aAAa,EACb,mBAAmB,EACnB,OAAO,GACR,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Types for OrgChart — top-down tree visualization with boxes
|
|
3
|
+
* connected by lines.
|
|
4
|
+
*/
|
|
5
|
+
import type { ReactNode } from 'react';
|
|
6
|
+
import type { SxProps, Theme } from '@mui/material';
|
|
7
|
+
/**
|
|
8
|
+
* A single node in the org tree.
|
|
9
|
+
*
|
|
10
|
+
* Trinity convention: keep node payload minimal — only what's needed to
|
|
11
|
+
* render the box. Long-form data should be loaded separately when a node is
|
|
12
|
+
* selected (typically into an `EntityDetailPanel`).
|
|
13
|
+
*
|
|
14
|
+
* For deeper trees, set `collapsed: true` on intermediate nodes to render
|
|
15
|
+
* a "+N more" chevron rather than expanding the full subtree.
|
|
16
|
+
*/
|
|
17
|
+
export interface OrgNode<TMeta = unknown> {
|
|
18
|
+
/** Stable id for React keys + selection. */
|
|
19
|
+
id: string;
|
|
20
|
+
/** Primary label (e.g. person name). */
|
|
21
|
+
title: ReactNode;
|
|
22
|
+
/** Secondary label (e.g. role / title). */
|
|
23
|
+
subtitle?: ReactNode;
|
|
24
|
+
/** Optional avatar — image URL or rendered ReactNode. */
|
|
25
|
+
avatar?: ReactNode;
|
|
26
|
+
/** Optional severity dot in the top-right (drives theme palette color). */
|
|
27
|
+
severity?: 'success' | 'warning' | 'error' | 'info' | 'neutral';
|
|
28
|
+
/** Optional badge chip (e.g. department). */
|
|
29
|
+
badge?: ReactNode;
|
|
30
|
+
/** Optional sub-tree. */
|
|
31
|
+
children?: ReadonlyArray<OrgNode<TMeta>>;
|
|
32
|
+
/** When true, sub-tree is collapsed and rendered as a "+N more" expander. */
|
|
33
|
+
collapsed?: boolean;
|
|
34
|
+
/** Optional consumer-defined payload. */
|
|
35
|
+
meta?: TMeta;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Layout orientation.
|
|
39
|
+
*
|
|
40
|
+
* - `vertical` (default) — parent on top, children below
|
|
41
|
+
* - `horizontal` — parent on left, children to the right (good for deep trees)
|
|
42
|
+
*/
|
|
43
|
+
export type OrgChartOrientation = 'vertical' | 'horizontal';
|
|
44
|
+
/**
|
|
45
|
+
* Props for OrgChart.
|
|
46
|
+
*
|
|
47
|
+
* The component uses `d3-hierarchy.tree()` for tree layout. The result is
|
|
48
|
+
* rendered into a single SVG so connectors stay aligned during zoom/pan and
|
|
49
|
+
* during animations.
|
|
50
|
+
*/
|
|
51
|
+
export interface OrgChartProps<TMeta = unknown> {
|
|
52
|
+
/** Root node — the top of the tree. */
|
|
53
|
+
root: OrgNode<TMeta>;
|
|
54
|
+
/** Currently selected node id. */
|
|
55
|
+
selectedId?: string;
|
|
56
|
+
/** Called when a node is clicked. */
|
|
57
|
+
onSelect?: (node: OrgNode<TMeta>) => void;
|
|
58
|
+
/** Called when a collapsed expander is clicked. */
|
|
59
|
+
onExpand?: (node: OrgNode<TMeta>) => void;
|
|
60
|
+
/** Orientation. Default `vertical`. */
|
|
61
|
+
orientation?: OrgChartOrientation;
|
|
62
|
+
/** Width per node box. Default 200. */
|
|
63
|
+
nodeWidth?: number;
|
|
64
|
+
/** Height per node box. Default 96. */
|
|
65
|
+
nodeHeight?: number;
|
|
66
|
+
/** Horizontal gap between siblings. Default 24. */
|
|
67
|
+
siblingGap?: number;
|
|
68
|
+
/** Vertical gap between levels. Default 48. */
|
|
69
|
+
levelGap?: number;
|
|
70
|
+
/** Render a custom node body instead of the default avatar+title+subtitle. */
|
|
71
|
+
renderNode?: (node: OrgNode<TMeta>, isSelected: boolean) => ReactNode;
|
|
72
|
+
/** Optional background color for the canvas. Default semantic background.secondary. */
|
|
73
|
+
canvasBackground?: string;
|
|
74
|
+
/** Maximum visible height before vertical scroll engages. Default 600. */
|
|
75
|
+
maxHeight?: number | string;
|
|
76
|
+
/** sx for the root container. */
|
|
77
|
+
sx?: SxProps<Theme>;
|
|
78
|
+
/** Accessible label override. Default "Organization chart". */
|
|
79
|
+
ariaLabel?: string;
|
|
80
|
+
}
|
|
81
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/OrgChart/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAEpD;;;;;;;;;GASG;AACH,MAAM,WAAW,OAAO,CAAC,KAAK,GAAG,OAAO;IACtC,4CAA4C;IAC5C,EAAE,EAAE,MAAM,CAAC;IACX,wCAAwC;IACxC,KAAK,EAAE,SAAS,CAAC;IACjB,2CAA2C;IAC3C,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,yDAAyD;IACzD,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,2EAA2E;IAC3E,QAAQ,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,MAAM,GAAG,SAAS,CAAC;IAChE,6CAA6C;IAC7C,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,yBAAyB;IACzB,QAAQ,CAAC,EAAE,aAAa,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC;IACzC,6EAA6E;IAC7E,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,yCAAyC;IACzC,IAAI,CAAC,EAAE,KAAK,CAAC;CACd;AAED;;;;;GAKG;AACH,MAAM,MAAM,mBAAmB,GAAG,UAAU,GAAG,YAAY,CAAC;AAE5D;;;;;;GAMG;AACH,MAAM,WAAW,aAAa,CAAC,KAAK,GAAG,OAAO;IAC5C,uCAAuC;IACvC,IAAI,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;IACrB,kCAAkC;IAClC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,qCAAqC;IACrC,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,CAAC,KAAK,CAAC,KAAK,IAAI,CAAC;IAC1C,mDAAmD;IACnD,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,CAAC,KAAK,CAAC,KAAK,IAAI,CAAC;IAC1C,uCAAuC;IACvC,WAAW,CAAC,EAAE,mBAAmB,CAAC;IAClC,uCAAuC;IACvC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,uCAAuC;IACvC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,mDAAmD;IACnD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,+CAA+C;IAC/C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,8EAA8E;IAC9E,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,CAAC,KAAK,CAAC,EAAE,UAAU,EAAE,OAAO,KAAK,SAAS,CAAC;IACtE,uFAAuF;IACvF,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,0EAA0E;IAC1E,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC5B,iCAAiC;IACjC,EAAE,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;IACpB,+DAA+D;IAC/D,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview PageTOC — sticky right-rail table of contents with scroll-spy.
|
|
3
|
+
*
|
|
4
|
+
* Renders a vertical list of section anchors with progressive indent for
|
|
5
|
+
* nested levels. Automatically tracks the active section based on viewport
|
|
6
|
+
* intersection (overridable via `activeId`).
|
|
7
|
+
*
|
|
8
|
+
* Active indicator: 2px brand-color left border + bolder text. Smooth scroll
|
|
9
|
+
* to anchor on click, with `scroll-margin-top` honored via `scrollOffset`.
|
|
10
|
+
*
|
|
11
|
+
* @module components/PageTOC
|
|
12
|
+
* @example
|
|
13
|
+
* ```tsx
|
|
14
|
+
* import { PageTOC } from '@trinityui/design-system';
|
|
15
|
+
*
|
|
16
|
+
* <PageTOC
|
|
17
|
+
* entries={[
|
|
18
|
+
* { id: 'overview', label: 'Overview', href: '#overview' },
|
|
19
|
+
* { id: 'design', label: 'Study design', href: '#design',
|
|
20
|
+
* children: [
|
|
21
|
+
* { id: 'endpoints', label: 'Endpoints', href: '#endpoints' },
|
|
22
|
+
* { id: 'population', label: 'Population', href: '#population' },
|
|
23
|
+
* ],
|
|
24
|
+
* },
|
|
25
|
+
* ]}
|
|
26
|
+
* />
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
import * as React from 'react';
|
|
30
|
+
import type { PageTOCProps } from './types';
|
|
31
|
+
export declare const PageTOC: React.ForwardRefExoticComponent<PageTOCProps & React.RefAttributes<HTMLElement>>;
|
|
32
|
+
export default PageTOC;
|
|
33
|
+
//# sourceMappingURL=PageTOC.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PageTOC.d.ts","sourceRoot":"","sources":["../../../src/components/PageTOC/PageTOC.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAU/B,OAAO,KAAK,EAAE,YAAY,EAAgB,MAAM,SAAS,CAAC;AA4I1D,eAAO,MAAM,OAAO,kFA6InB,CAAC;AAeF,eAAe,OAAO,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @internal
|
|
3
|
+
* PageTOC barrel.
|
|
4
|
+
*
|
|
5
|
+
* PUBLIC API: Import from '@trinityui/design-system' instead.
|
|
6
|
+
*/
|
|
7
|
+
export { PageTOC, default as PageTOCDefault } from './PageTOC';
|
|
8
|
+
export type { PageTOCProps, PageTOCEntry } from './types';
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/PageTOC/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,WAAW,CAAC;AAE/D,YAAY,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Types for PageTOC — sticky right-rail table of contents with
|
|
3
|
+
* section anchors and scroll-spy active state.
|
|
4
|
+
*/
|
|
5
|
+
import type { ReactNode } from 'react';
|
|
6
|
+
import type { SxProps, Theme } from '@mui/material';
|
|
7
|
+
/**
|
|
8
|
+
* A single TOC entry.
|
|
9
|
+
*
|
|
10
|
+
* Entries can nest up to 3 levels via `children`. Deeper nesting starts to
|
|
11
|
+
* compete with the page itself for attention — prefer flattening.
|
|
12
|
+
*
|
|
13
|
+
* `href` should be a fragment id of the actual heading on the page (e.g.
|
|
14
|
+
* `#study-design`). The component does NOT auto-derive ids — supply them.
|
|
15
|
+
*/
|
|
16
|
+
export interface PageTOCEntry {
|
|
17
|
+
/** Stable id. Used as React key and as the scroll-target via querySelector. */
|
|
18
|
+
id: string;
|
|
19
|
+
/** Display label. Plain text or ReactNode (sparingly — keep these terse). */
|
|
20
|
+
label: ReactNode;
|
|
21
|
+
/** Fragment href, e.g. `#study-design`. */
|
|
22
|
+
href: string;
|
|
23
|
+
/** Optional severity dot indicator (e.g. surfacing draft / issue counts). */
|
|
24
|
+
badge?: ReactNode;
|
|
25
|
+
/** Nested entries. Render with progressive indent. */
|
|
26
|
+
children?: PageTOCEntry[];
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Props for PageTOC.
|
|
30
|
+
*
|
|
31
|
+
* Scroll-spy: when `activeId` is omitted, the component auto-derives the active
|
|
32
|
+
* entry from scroll position using IntersectionObserver. Supply `activeId`
|
|
33
|
+
* (and update it from your own scroll listener) when you need stronger control,
|
|
34
|
+
* e.g. for URL hash sync.
|
|
35
|
+
*/
|
|
36
|
+
export interface PageTOCProps {
|
|
37
|
+
/** TOC entries to render. Top-level array becomes flat list at level 0. */
|
|
38
|
+
entries: ReadonlyArray<PageTOCEntry>;
|
|
39
|
+
/** Optional title shown above the list. Default `"On this page"`. */
|
|
40
|
+
title?: string;
|
|
41
|
+
/** Controlled active id. Omit for auto scroll-spy. */
|
|
42
|
+
activeId?: string;
|
|
43
|
+
/** Called when the user clicks an entry. Default behavior scrolls to the anchor. */
|
|
44
|
+
onSelect?: (id: string, href: string) => void;
|
|
45
|
+
/** Footer slot — typically a "Back to top" link or last-modified caption. */
|
|
46
|
+
footer?: ReactNode;
|
|
47
|
+
/** When true, omits scroll-spy entirely (e.g. for static documentation pages). */
|
|
48
|
+
disableScrollSpy?: boolean;
|
|
49
|
+
/** Maximum visible height before the list scrolls internally. Default 70vh. */
|
|
50
|
+
maxHeight?: string | number;
|
|
51
|
+
/** Top offset for scroll-spy + scrollIntoView (account for sticky header). Default 80. */
|
|
52
|
+
scrollOffset?: number;
|
|
53
|
+
/** sx for the root container. */
|
|
54
|
+
sx?: SxProps<Theme>;
|
|
55
|
+
/** Accessible label override. Falls back to the title. */
|
|
56
|
+
ariaLabel?: string;
|
|
57
|
+
}
|
|
58
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/PageTOC/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAEpD;;;;;;;;GAQG;AACH,MAAM,WAAW,YAAY;IAC3B,+EAA+E;IAC/E,EAAE,EAAE,MAAM,CAAC;IACX,6EAA6E;IAC7E,KAAK,EAAE,SAAS,CAAC;IACjB,2CAA2C;IAC3C,IAAI,EAAE,MAAM,CAAC;IACb,6EAA6E;IAC7E,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,sDAAsD;IACtD,QAAQ,CAAC,EAAE,YAAY,EAAE,CAAC;CAC3B;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,YAAY;IAC3B,2EAA2E;IAC3E,OAAO,EAAE,aAAa,CAAC,YAAY,CAAC,CAAC;IACrC,qEAAqE;IACrE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,sDAAsD;IACtD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,oFAAoF;IACpF,QAAQ,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9C,6EAA6E;IAC7E,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,kFAAkF;IAClF,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,+EAA+E;IAC/E,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC5B,0FAA0F;IAC1F,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,iCAAiC;IACjC,EAAE,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;IACpB,0DAA0D;IAC1D,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview StatusHero — large dashboard hero showing aggregate system / program health.
|
|
3
|
+
*
|
|
4
|
+
* Pure composition over `IconIndicator` (from StatusIndicator), `getStatusConfig`
|
|
5
|
+
* (to derive the default label), and the active MUI theme. No parallel severity
|
|
6
|
+
* rendering — anything color-related comes from `theme.palette.*` so light/dark
|
|
7
|
+
* mode and Trinity overrides flow through.
|
|
8
|
+
*
|
|
9
|
+
* @module components/StatusHero
|
|
10
|
+
* @example
|
|
11
|
+
* ```tsx
|
|
12
|
+
* import { StatusHero } from '@trinityui/design-system';
|
|
13
|
+
*
|
|
14
|
+
* <StatusHero
|
|
15
|
+
* status="success"
|
|
16
|
+
* title="All systems operational"
|
|
17
|
+
* description="No degraded services in the last 24 hours."
|
|
18
|
+
* breakdown={[
|
|
19
|
+
* { status: 'success', count: 84, label: 'Healthy' },
|
|
20
|
+
* { status: 'warning', count: 2, label: 'Degraded' },
|
|
21
|
+
* { status: 'error', count: 0, label: 'Down' },
|
|
22
|
+
* ]}
|
|
23
|
+
* updatedLabel="Updated 2m ago"
|
|
24
|
+
* />
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
import * as React from 'react';
|
|
28
|
+
import type { StatusHeroProps } from './types';
|
|
29
|
+
export declare const StatusHero: React.ForwardRefExoticComponent<StatusHeroProps & React.RefAttributes<HTMLDivElement>>;
|
|
30
|
+
export default StatusHero;
|
|
31
|
+
//# sourceMappingURL=StatusHero.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StatusHero.d.ts","sourceRoot":"","sources":["../../../src/components/StatusHero/StatusHero.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAiB/B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAiB/C,eAAO,MAAM,UAAU,wFA6MtB,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @internal
|
|
3
|
+
* StatusHero barrel.
|
|
4
|
+
*
|
|
5
|
+
* PUBLIC API: Import from '@trinityui/design-system' instead.
|
|
6
|
+
*/
|
|
7
|
+
export { StatusHero, default as StatusHeroDefault } from './StatusHero';
|
|
8
|
+
export type { StatusHeroProps, StatusBreakdownItem, StatusHeroVariant, } from './types';
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/StatusHero/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,UAAU,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAExE,YAAY,EACV,eAAe,EACf,mBAAmB,EACnB,iBAAiB,GAClB,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Types for StatusHero — large dashboard hero showing aggregate health.
|
|
3
|
+
*/
|
|
4
|
+
import type { ReactNode } from 'react';
|
|
5
|
+
import type { SxProps, Theme } from '@mui/material';
|
|
6
|
+
import type { StatusType } from '../StatusIndicator';
|
|
7
|
+
/**
|
|
8
|
+
* A single status breakdown row shown in the hero.
|
|
9
|
+
*
|
|
10
|
+
* Example: `{ status: 'success', count: 84, label: 'Healthy sites' }`.
|
|
11
|
+
*/
|
|
12
|
+
export interface StatusBreakdownItem {
|
|
13
|
+
/** Reuses the canonical `StatusType` from StatusIndicator so colors + icons match. */
|
|
14
|
+
status: StatusType;
|
|
15
|
+
/** Display count or percentage. */
|
|
16
|
+
count: number | string;
|
|
17
|
+
/** Optional override label. Defaults to the StatusType's default label. */
|
|
18
|
+
label?: string;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Visual emphasis.
|
|
22
|
+
*
|
|
23
|
+
* - `solid` — uses the active palette tone as a filled hero background; best
|
|
24
|
+
* when the hero is the only large surface on the page
|
|
25
|
+
* - `subtle` (default) — a tinted card that sits inside an existing dashboard
|
|
26
|
+
* grid without overwhelming the rest of the page
|
|
27
|
+
*/
|
|
28
|
+
export type StatusHeroVariant = 'solid' | 'subtle';
|
|
29
|
+
/**
|
|
30
|
+
* Props for StatusHero.
|
|
31
|
+
*
|
|
32
|
+
* Composition over `IconIndicator`, `Typography`, and `StatusBreakdownItem`s —
|
|
33
|
+
* no parallel color rendering. Severity colors flow from the active MUI theme.
|
|
34
|
+
*/
|
|
35
|
+
export interface StatusHeroProps {
|
|
36
|
+
/** Overall aggregate status — drives the headline icon, color, and label. */
|
|
37
|
+
status: StatusType;
|
|
38
|
+
/** Short headline (e.g. "All systems operational"). */
|
|
39
|
+
title: string;
|
|
40
|
+
/** Optional supporting body text. */
|
|
41
|
+
description?: string;
|
|
42
|
+
/** Optional eyebrow above the title. */
|
|
43
|
+
eyebrow?: string;
|
|
44
|
+
/** Optional breakdown rows shown beside the headline. */
|
|
45
|
+
breakdown?: StatusBreakdownItem[];
|
|
46
|
+
/** Visual variant. Default `subtle`. */
|
|
47
|
+
variant?: StatusHeroVariant;
|
|
48
|
+
/** Right-side slot for primary actions. */
|
|
49
|
+
actions?: ReactNode;
|
|
50
|
+
/** Optional last-updated label rendered at the bottom right (e.g. "Updated 2m ago"). */
|
|
51
|
+
updatedLabel?: string;
|
|
52
|
+
/** sx overrides for the root surface. */
|
|
53
|
+
sx?: SxProps<Theme>;
|
|
54
|
+
/** Accessible label override for the hero. */
|
|
55
|
+
ariaLabel?: string;
|
|
56
|
+
}
|
|
57
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/StatusHero/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAErD;;;;GAIG;AACH,MAAM,WAAW,mBAAmB;IAClC,sFAAsF;IACtF,MAAM,EAAE,UAAU,CAAC;IACnB,mCAAmC;IACnC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB,2EAA2E;IAC3E,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;;;;;GAOG;AACH,MAAM,MAAM,iBAAiB,GAAG,OAAO,GAAG,QAAQ,CAAC;AAEnD;;;;;GAKG;AACH,MAAM,WAAW,eAAe;IAC9B,6EAA6E;IAC7E,MAAM,EAAE,UAAU,CAAC;IACnB,uDAAuD;IACvD,KAAK,EAAE,MAAM,CAAC;IACd,qCAAqC;IACrC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,wCAAwC;IACxC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,yDAAyD;IACzD,SAAS,CAAC,EAAE,mBAAmB,EAAE,CAAC;IAClC,wCAAwC;IACxC,OAAO,CAAC,EAAE,iBAAiB,CAAC;IAC5B,2CAA2C;IAC3C,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,wFAAwF;IACxF,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,yCAAyC;IACzC,EAAE,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;IACpB,8CAA8C;IAC9C,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview SystemBanner — page-top global announcement banner.
|
|
3
|
+
*
|
|
4
|
+
* Wraps MUI Alert with sticky / fixed positioning + optional dismissal
|
|
5
|
+
* persistence via `localStorage`. Severity colors come from `theme.palette`
|
|
6
|
+
* so the banner matches every other status surface (Alert, InsightCard,
|
|
7
|
+
* StatusIndicator).
|
|
8
|
+
*
|
|
9
|
+
* @module components/SystemBanner
|
|
10
|
+
* @example
|
|
11
|
+
* ```tsx
|
|
12
|
+
* import { SystemBanner } from '@trinityui/design-system';
|
|
13
|
+
*
|
|
14
|
+
* <SystemBanner
|
|
15
|
+
* severity="warning"
|
|
16
|
+
* title="Scheduled maintenance"
|
|
17
|
+
* action={<Button size="small">Learn more</Button>}
|
|
18
|
+
* storageKey="banner.maintenance-2026-q4"
|
|
19
|
+
* >
|
|
20
|
+
* Read-only mode for 15 minutes starting 23:00 UTC tonight.
|
|
21
|
+
* </SystemBanner>
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
import * as React from 'react';
|
|
25
|
+
import type { SystemBannerProps } from './types';
|
|
26
|
+
export declare const SystemBanner: React.ForwardRefExoticComponent<SystemBannerProps & React.RefAttributes<HTMLDivElement>>;
|
|
27
|
+
export default SystemBanner;
|
|
28
|
+
//# sourceMappingURL=SystemBanner.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SystemBanner.d.ts","sourceRoot":"","sources":["../../../src/components/SystemBanner/SystemBanner.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAW/B,OAAO,KAAK,EAAE,iBAAiB,EAAwB,MAAM,SAAS,CAAC;AAwDvE,eAAO,MAAM,YAAY,0FA+ExB,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @internal
|
|
3
|
+
* SystemBanner barrel.
|
|
4
|
+
*
|
|
5
|
+
* PUBLIC API: Import from '@trinityui/design-system' instead.
|
|
6
|
+
*/
|
|
7
|
+
export { SystemBanner, default as SystemBannerDefault } from './SystemBanner';
|
|
8
|
+
export type { SystemBannerProps, SystemBannerSeverity, SystemBannerPosition, } from './types';
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/SystemBanner/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,YAAY,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAE9E,YAAY,EACV,iBAAiB,EACjB,oBAAoB,EACpB,oBAAoB,GACrB,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Types for SystemBanner — page-top global announcement banner.
|
|
3
|
+
*/
|
|
4
|
+
import type { ReactNode } from 'react';
|
|
5
|
+
import type { AlertColor, SxProps, Theme } from '@mui/material';
|
|
6
|
+
/**
|
|
7
|
+
* Severity / intent of the banner.
|
|
8
|
+
*
|
|
9
|
+
* Maps directly to MUI Alert's `severity` so styling stays consistent with
|
|
10
|
+
* every other status surface (`Alert`, `InsightCard`, `StatusIndicator`).
|
|
11
|
+
*/
|
|
12
|
+
export type SystemBannerSeverity = AlertColor;
|
|
13
|
+
/**
|
|
14
|
+
* Where the banner is anchored.
|
|
15
|
+
*
|
|
16
|
+
* - `sticky` — scrolls with the page but pins to the top edge until dismissed
|
|
17
|
+
* - `fixed` — overlays the viewport top edge, doesn't scroll
|
|
18
|
+
* - `static` — sits inline in document flow (use inside non-chrome contexts)
|
|
19
|
+
*/
|
|
20
|
+
export type SystemBannerPosition = 'sticky' | 'fixed' | 'static';
|
|
21
|
+
/**
|
|
22
|
+
* Props for SystemBanner.
|
|
23
|
+
*
|
|
24
|
+
* Wraps MUI Alert with:
|
|
25
|
+
* - page-top positioning (sticky / fixed / static)
|
|
26
|
+
* - dismissal persistence via `localStorage` keyed by `storageKey`
|
|
27
|
+
* - explicit action slot (the Alert's `action` prop is repurposed for the
|
|
28
|
+
* close button so we expose a dedicated `action` slot here)
|
|
29
|
+
*/
|
|
30
|
+
export interface SystemBannerProps {
|
|
31
|
+
/** Severity. Drives Alert color + icon. Default `info`. */
|
|
32
|
+
severity?: SystemBannerSeverity;
|
|
33
|
+
/** Banner message body. Plain text or any ReactNode. */
|
|
34
|
+
children: ReactNode;
|
|
35
|
+
/** Optional bold title shown above the body. */
|
|
36
|
+
title?: string;
|
|
37
|
+
/** Action slot — typically a Link or short Button (e.g. "Learn more"). */
|
|
38
|
+
action?: ReactNode;
|
|
39
|
+
/** Where to anchor the banner. Default `sticky`. */
|
|
40
|
+
position?: SystemBannerPosition;
|
|
41
|
+
/**
|
|
42
|
+
* If provided, the dismissed state is persisted to `localStorage` under
|
|
43
|
+
* this key. Use a stable, version-suffixed key so re-announced incidents
|
|
44
|
+
* surface again (e.g. `'trinity.banner.maintenance-2026-q4'`).
|
|
45
|
+
*/
|
|
46
|
+
storageKey?: string;
|
|
47
|
+
/** Whether the banner can be dismissed. Default `true`. */
|
|
48
|
+
dismissible?: boolean;
|
|
49
|
+
/** Called when the dismiss button is clicked, after persistence. */
|
|
50
|
+
onDismiss?: () => void;
|
|
51
|
+
/** Controlled open state. When omitted, the banner self-manages. */
|
|
52
|
+
open?: boolean;
|
|
53
|
+
/** Optional sx overrides for the root container. */
|
|
54
|
+
sx?: SxProps<Theme>;
|
|
55
|
+
/** Accessible label override. Falls back to `${severity} announcement`. */
|
|
56
|
+
ariaLabel?: string;
|
|
57
|
+
}
|
|
58
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/SystemBanner/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,UAAU,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAEhE;;;;;GAKG;AACH,MAAM,MAAM,oBAAoB,GAAG,UAAU,CAAC;AAE9C;;;;;;GAMG;AACH,MAAM,MAAM,oBAAoB,GAAG,QAAQ,GAAG,OAAO,GAAG,QAAQ,CAAC;AAEjE;;;;;;;;GAQG;AACH,MAAM,WAAW,iBAAiB;IAChC,2DAA2D;IAC3D,QAAQ,CAAC,EAAE,oBAAoB,CAAC;IAChC,wDAAwD;IACxD,QAAQ,EAAE,SAAS,CAAC;IACpB,gDAAgD;IAChD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,0EAA0E;IAC1E,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,oDAAoD;IACpD,QAAQ,CAAC,EAAE,oBAAoB,CAAC;IAChC;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,2DAA2D;IAC3D,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,oEAAoE;IACpE,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,oEAAoE;IACpE,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,oDAAoD;IACpD,EAAE,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;IACpB,2EAA2E;IAC3E,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview TopRisksStrip — horizontal strip of priority `InsightCard`s.
|
|
3
|
+
*
|
|
4
|
+
* Pure composition over `InsightCard` — no parallel severity rendering. The
|
|
5
|
+
* strip just handles layout (scroll vs. grid), optional title, and an empty
|
|
6
|
+
* state slot.
|
|
7
|
+
*
|
|
8
|
+
* @module components/TopRisksStrip
|
|
9
|
+
* @example
|
|
10
|
+
* ```tsx
|
|
11
|
+
* import { TopRisksStrip } from '@trinityui/design-system';
|
|
12
|
+
*
|
|
13
|
+
* <TopRisksStrip
|
|
14
|
+
* title="Top risks this week"
|
|
15
|
+
* items={[
|
|
16
|
+
* { id: '1', severity: 'high', title: '3 sites missed SLA' },
|
|
17
|
+
* { id: '2', severity: 'medium', title: 'Onboarding dropped 7%' },
|
|
18
|
+
* ]}
|
|
19
|
+
* />
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
import * as React from 'react';
|
|
23
|
+
import type { TopRisksStripProps } from './types';
|
|
24
|
+
export declare const TopRisksStrip: React.ForwardRefExoticComponent<TopRisksStripProps & React.RefAttributes<HTMLDivElement>>;
|
|
25
|
+
export default TopRisksStrip;
|
|
26
|
+
//# sourceMappingURL=TopRisksStrip.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TopRisksStrip.d.ts","sourceRoot":"","sources":["../../../src/components/TopRisksStrip/TopRisksStrip.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAU/B,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAElD,eAAO,MAAM,aAAa,2FA0HzB,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @internal
|
|
3
|
+
* TopRisksStrip barrel.
|
|
4
|
+
*
|
|
5
|
+
* PUBLIC API: Import from '@trinityui/design-system' instead.
|
|
6
|
+
*/
|
|
7
|
+
export { TopRisksStrip, default as TopRisksStripDefault, } from './TopRisksStrip';
|
|
8
|
+
export type { TopRisksStripProps, TopRiskItem, TopRisksLayout, } from './types';
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/TopRisksStrip/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EACL,aAAa,EACb,OAAO,IAAI,oBAAoB,GAChC,MAAM,iBAAiB,CAAC;AAEzB,YAAY,EACV,kBAAkB,EAClB,WAAW,EACX,cAAc,GACf,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Types for TopRisksStrip — horizontal strip of priority insights.
|
|
3
|
+
*/
|
|
4
|
+
import type { ReactNode } from 'react';
|
|
5
|
+
import type { SxProps, Theme } from '@mui/material';
|
|
6
|
+
import type { InsightSeverity } from '../InsightCard';
|
|
7
|
+
/**
|
|
8
|
+
* One row in the strip. Mirrors the InsightCard props it'll render.
|
|
9
|
+
*/
|
|
10
|
+
export interface TopRiskItem {
|
|
11
|
+
/** Stable identifier used as React key. */
|
|
12
|
+
id: string;
|
|
13
|
+
/** Severity level — drives icon and tint via InsightCard. */
|
|
14
|
+
severity: InsightSeverity;
|
|
15
|
+
/** Card title. */
|
|
16
|
+
title: string;
|
|
17
|
+
/** Optional supporting body. */
|
|
18
|
+
description?: string;
|
|
19
|
+
/** Optional eyebrow text. */
|
|
20
|
+
eyebrow?: string;
|
|
21
|
+
/** Optional metric value. */
|
|
22
|
+
value?: string;
|
|
23
|
+
/** Optional delta component (e.g. HistoricalDataIndicator). */
|
|
24
|
+
delta?: ReactNode;
|
|
25
|
+
/** Optional click handler — marks the card as interactive. */
|
|
26
|
+
onClick?: () => void;
|
|
27
|
+
/** Optional dismiss handler. */
|
|
28
|
+
onDismiss?: () => void;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Layout mode.
|
|
32
|
+
*
|
|
33
|
+
* - `scroll` (default) — horizontal scroll, cards keep their natural width.
|
|
34
|
+
* Best for 5+ items or narrow viewports.
|
|
35
|
+
* - `grid` — equal-width columns. Best when the count is fixed and ≤ 4.
|
|
36
|
+
*/
|
|
37
|
+
export type TopRisksLayout = 'scroll' | 'grid';
|
|
38
|
+
/**
|
|
39
|
+
* Props for TopRisksStrip.
|
|
40
|
+
*/
|
|
41
|
+
export interface TopRisksStripProps {
|
|
42
|
+
/** Items to render. Empty array → render the empty-state slot. */
|
|
43
|
+
items: TopRiskItem[];
|
|
44
|
+
/** Optional strip header text. */
|
|
45
|
+
title?: string;
|
|
46
|
+
/** Optional description sitting under the title. */
|
|
47
|
+
description?: string;
|
|
48
|
+
/** Right-side action slot (e.g. "View all" link). */
|
|
49
|
+
trailingAction?: ReactNode;
|
|
50
|
+
/** Layout mode. Default `scroll`. */
|
|
51
|
+
layout?: TopRisksLayout;
|
|
52
|
+
/** Per-card width when in scroll mode. Default `320`. */
|
|
53
|
+
cardWidth?: number;
|
|
54
|
+
/** InsightCard variant to use. Default `tinted`. */
|
|
55
|
+
cardVariant?: 'tinted' | 'outlined';
|
|
56
|
+
/** Slot rendered when `items` is empty. */
|
|
57
|
+
emptyState?: ReactNode;
|
|
58
|
+
/** sx overrides for the root container. */
|
|
59
|
+
sx?: SxProps<Theme>;
|
|
60
|
+
}
|
|
61
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/TopRisksStrip/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEtD;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,2CAA2C;IAC3C,EAAE,EAAE,MAAM,CAAC;IACX,6DAA6D;IAC7D,QAAQ,EAAE,eAAe,CAAC;IAC1B,kBAAkB;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,gCAAgC;IAChC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,6BAA6B;IAC7B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,6BAA6B;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,+DAA+D;IAC/D,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,8DAA8D;IAC9D,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,gCAAgC;IAChC,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;CACxB;AAED;;;;;;GAMG;AACH,MAAM,MAAM,cAAc,GAAG,QAAQ,GAAG,MAAM,CAAC;AAE/C;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,kEAAkE;IAClE,KAAK,EAAE,WAAW,EAAE,CAAC;IACrB,kCAAkC;IAClC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,oDAAoD;IACpD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,qDAAqD;IACrD,cAAc,CAAC,EAAE,SAAS,CAAC;IAC3B,qCAAqC;IACrC,MAAM,CAAC,EAAE,cAAc,CAAC;IACxB,yDAAyD;IACzD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,oDAAoD;IACpD,WAAW,CAAC,EAAE,QAAQ,GAAG,UAAU,CAAC;IACpC,2CAA2C;IAC3C,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB,2CAA2C;IAC3C,EAAE,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;CACrB"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Auth Template — centered card for sign-in / sign-up / password reset
|
|
3
|
+
* @module components/templates/Auth
|
|
4
|
+
* @example
|
|
5
|
+
* ```tsx
|
|
6
|
+
* import { AuthTemplate } from '@trinityui/design-system';
|
|
7
|
+
*
|
|
8
|
+
* <AuthTemplate
|
|
9
|
+
* mode="signin"
|
|
10
|
+
* title="Welcome back"
|
|
11
|
+
* subtitle="Sign in to continue"
|
|
12
|
+
* primaryAction={{ label: 'Sign in', onClick: handleSubmit }}
|
|
13
|
+
* >
|
|
14
|
+
* <TextField label="Email" />
|
|
15
|
+
* <TextField label="Password" type="password" />
|
|
16
|
+
* </AuthTemplate>
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
import * as React from 'react';
|
|
20
|
+
import type { AuthTemplateProps } from './types';
|
|
21
|
+
export type { AuthTemplateProps, AuthMode, AuthAction, AuthFooterLink } from './types';
|
|
22
|
+
/**
|
|
23
|
+
* AuthTemplate — a centered card surface for any single-step authentication
|
|
24
|
+
* flow. Composes a logo, headline, optional subtitle, a form slot (you supply
|
|
25
|
+
* TextFields/etc.), primary CTA, optional secondary link, and a footer.
|
|
26
|
+
*/
|
|
27
|
+
export declare const AuthTemplate: React.ForwardRefExoticComponent<AuthTemplateProps & React.RefAttributes<HTMLDivElement>>;
|
|
28
|
+
//# sourceMappingURL=AuthTemplate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AuthTemplate.d.ts","sourceRoot":"","sources":["../../../../src/components/templates/Auth/AuthTemplate.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAa/B,OAAO,KAAK,EAAE,iBAAiB,EAAkB,MAAM,SAAS,CAAC;AAEjE,YAAY,EAAE,iBAAiB,EAAE,QAAQ,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAcvF;;;;GAIG;AACH,eAAO,MAAM,YAAY,0FA2MxB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/templates/Auth/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,YAAY,EACV,iBAAiB,EACjB,QAAQ,EACR,UAAU,EACV,cAAc,GACf,MAAM,SAAS,CAAC"}
|