@trinityui/design-system 2.4.0 → 2.10.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/CHANGELOG.md +24 -491
- 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/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/essentials.js +1 -1
- package/dist/index.d.ts +37 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +49113 -41408
- package/dist/trinity.css +1 -1
- package/package.json +11 -4
package/dist/app-shell.js
CHANGED
|
@@ -11258,40 +11258,40 @@ Video content is generating 2.8x more engagement than static posts. Consider inc
|
|
|
11258
11258
|
return dr("AIFabLayout", "v3.0", '`AppLayout` with `navStyle="topnav"` and `aiTrigger="fab"`'), /* @__PURE__ */ e(oc, { ref: i, aiTrigger: "fab", ...o });
|
|
11259
11259
|
});
|
|
11260
11260
|
export {
|
|
11261
|
-
|
|
11262
|
-
|
|
11263
|
-
|
|
11261
|
+
oh as $,
|
|
11262
|
+
ah as A,
|
|
11263
|
+
mh as B,
|
|
11264
11264
|
Kp as C,
|
|
11265
|
-
|
|
11266
|
-
|
|
11267
|
-
|
|
11268
|
-
|
|
11265
|
+
Rs as D,
|
|
11266
|
+
Is as E,
|
|
11267
|
+
Eo as F,
|
|
11268
|
+
rn as G,
|
|
11269
11269
|
qp as H,
|
|
11270
11270
|
v as I,
|
|
11271
|
-
|
|
11272
|
-
|
|
11273
|
-
|
|
11274
|
-
|
|
11275
|
-
|
|
11276
|
-
|
|
11277
|
-
|
|
11271
|
+
ps as J,
|
|
11272
|
+
hs as K,
|
|
11273
|
+
ts as L,
|
|
11274
|
+
nh as M,
|
|
11275
|
+
Ss as N,
|
|
11276
|
+
uh as O,
|
|
11277
|
+
ro as P,
|
|
11278
11278
|
rh as Q,
|
|
11279
11279
|
Zs as R,
|
|
11280
11280
|
_p as S,
|
|
11281
11281
|
$l as T,
|
|
11282
11282
|
Zp as U,
|
|
11283
|
-
|
|
11284
|
-
|
|
11285
|
-
|
|
11286
|
-
|
|
11287
|
-
|
|
11288
|
-
|
|
11283
|
+
As as V,
|
|
11284
|
+
Fs as W,
|
|
11285
|
+
Kl as X,
|
|
11286
|
+
cr as Y,
|
|
11287
|
+
Xp as Z,
|
|
11288
|
+
cs as _,
|
|
11289
11289
|
r as a,
|
|
11290
|
-
|
|
11291
|
-
|
|
11292
|
-
|
|
11293
|
-
|
|
11294
|
-
|
|
11290
|
+
so as a0,
|
|
11291
|
+
Mr as a1,
|
|
11292
|
+
co as a2,
|
|
11293
|
+
th as a3,
|
|
11294
|
+
ih as a4,
|
|
11295
11295
|
lh as a5,
|
|
11296
11296
|
sh as a6,
|
|
11297
11297
|
ch as a7,
|
|
@@ -11323,14 +11323,14 @@ export {
|
|
|
11323
11323
|
Lp as n,
|
|
11324
11324
|
Op as o,
|
|
11325
11325
|
Up as p,
|
|
11326
|
-
|
|
11327
|
-
|
|
11326
|
+
gs as q,
|
|
11327
|
+
Tl as r,
|
|
11328
11328
|
h as s,
|
|
11329
11329
|
Np as t,
|
|
11330
|
-
|
|
11331
|
-
|
|
11330
|
+
Gp as u,
|
|
11331
|
+
Qp as v,
|
|
11332
11332
|
dr as w,
|
|
11333
|
-
|
|
11334
|
-
|
|
11335
|
-
|
|
11333
|
+
oc as x,
|
|
11334
|
+
Qs as y,
|
|
11335
|
+
gh as z
|
|
11336
11336
|
};
|
package/dist/assets/index.d.ts
CHANGED
|
@@ -166,7 +166,7 @@ declare const _default: {
|
|
|
166
166
|
readonly together: string;
|
|
167
167
|
readonly voices: string;
|
|
168
168
|
};
|
|
169
|
-
gradientIconMeta: Record<"focus" | "benefits" | "bigQuoteMark" | "careersSmaller" | "combined" | "culture" | "growth" | "ai" | "brandDev" | "commsInsights" | "comms" | "custEngagement" | "customer" | "
|
|
169
|
+
gradientIconMeta: Record<"focus" | "insights" | "benefits" | "bigQuoteMark" | "careersSmaller" | "combined" | "culture" | "growth" | "ai" | "brandDev" | "commsInsights" | "comms" | "custEngagement" | "customer" | "intelligence" | "launch1" | "launch" | "loss" | "marketAccess" | "marketResearch" | "medical" | "patientHcp" | "perfTracking" | "perf" | "portfolio" | "pricing" | "realWorld" | "strategy" | "impactSmaller" | "inclusionSmaller" | "leadershipSmaller" | "mindset" | "puzzle" | "rightThing" | "supportive" | "together" | "voices", {
|
|
170
170
|
label: string;
|
|
171
171
|
category: string;
|
|
172
172
|
}>;
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* QueryInput Component
|
|
5
5
|
* Standalone, reusable text input with submit and dictation support
|
|
6
6
|
*
|
|
7
|
-
* @deprecated Use `InsightEngineInput` instead. QueryInput will be removed in
|
|
7
|
+
* @deprecated Use `InsightEngineInput` instead. QueryInput will be removed in v3.0.
|
|
8
8
|
*
|
|
9
9
|
* Migration:
|
|
10
10
|
* ```tsx
|
|
@@ -34,7 +34,7 @@ import React from 'react';
|
|
|
34
34
|
import { SxProps, Theme } from '@mui/material';
|
|
35
35
|
/**
|
|
36
36
|
* Props for the QueryInput component.
|
|
37
|
-
* @deprecated Use `InsightEngineInputProps` instead. QueryInputProps will be removed in
|
|
37
|
+
* @deprecated Use `InsightEngineInputProps` instead. QueryInputProps will be removed in v3.0.
|
|
38
38
|
*/
|
|
39
39
|
export interface QueryInputProps {
|
|
40
40
|
/** Current input value (controlled) */
|
|
@@ -100,7 +100,7 @@ declare global {
|
|
|
100
100
|
/**
|
|
101
101
|
* QueryInput - Standalone text input with submit and dictation
|
|
102
102
|
*
|
|
103
|
-
* @deprecated Use `InsightEngineInput` instead. QueryInput will be removed in
|
|
103
|
+
* @deprecated Use `InsightEngineInput` instead. QueryInput will be removed in v3.0.
|
|
104
104
|
*
|
|
105
105
|
* Features:
|
|
106
106
|
* - Controlled or uncontrolled value
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview AIDigestCard — AI-generated daily / weekly briefing card.
|
|
3
|
+
*
|
|
4
|
+
* Composes the existing AI primitives — `AIContainer` for the AI-branded
|
|
5
|
+
* surface, `AIAvatar` for the visual identity, `AITextBlock` for each
|
|
6
|
+
* highlight's markdown rendering. No new severity / color rendering paths.
|
|
7
|
+
*
|
|
8
|
+
* @module components/AIDigestCard
|
|
9
|
+
* @example
|
|
10
|
+
* ```tsx
|
|
11
|
+
* import { AIDigestCard } from '@trinityui/design-system';
|
|
12
|
+
*
|
|
13
|
+
* <AIDigestCard
|
|
14
|
+
* title="Your morning briefing"
|
|
15
|
+
* cadence="daily"
|
|
16
|
+
* summary="Three things moved overnight."
|
|
17
|
+
* highlights={[
|
|
18
|
+
* { id: '1', category: 'Revenue', text: 'EU Q3 conversion +3.2%' },
|
|
19
|
+
* { id: '2', category: 'Compliance', text: '2 sites missed the SLA' },
|
|
20
|
+
* { id: '3', category: 'Platform', text: 'New Snowflake connector live' },
|
|
21
|
+
* ]}
|
|
22
|
+
* />
|
|
23
|
+
* ```
|
|
24
|
+
*/
|
|
25
|
+
import * as React from 'react';
|
|
26
|
+
import type { AIDigestCardProps } from './types';
|
|
27
|
+
export declare const AIDigestCard: React.ForwardRefExoticComponent<AIDigestCardProps & React.RefAttributes<HTMLDivElement>>;
|
|
28
|
+
export default AIDigestCard;
|
|
29
|
+
//# sourceMappingURL=AIDigestCard.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AIDigestCard.d.ts","sourceRoot":"","sources":["../../../src/components/AIDigestCard/AIDigestCard.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAc/B,OAAO,KAAK,EAEV,iBAAiB,EAElB,MAAM,SAAS,CAAC;AAuEjB,eAAO,MAAM,YAAY,0FA6JxB,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @internal
|
|
3
|
+
* AIDigestCard barrel.
|
|
4
|
+
*
|
|
5
|
+
* PUBLIC API: Import from '@trinityui/design-system' instead.
|
|
6
|
+
*/
|
|
7
|
+
export { AIDigestCard, default as AIDigestCardDefault } from './AIDigestCard';
|
|
8
|
+
export type { AIDigestCardProps, AIDigestHighlight, AIDigestCadence, } from './types';
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/AIDigestCard/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,YAAY,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAE9E,YAAY,EACV,iBAAiB,EACjB,iBAAiB,EACjB,eAAe,GAChB,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Types for AIDigestCard — AI-generated daily/weekly briefing card.
|
|
3
|
+
*/
|
|
4
|
+
import type { ReactNode } from 'react';
|
|
5
|
+
import type { SxProps, Theme } from '@mui/material';
|
|
6
|
+
/**
|
|
7
|
+
* A single line item shown inside the digest. Each highlight is a short,
|
|
8
|
+
* scannable bullet — keep them under ~140 characters.
|
|
9
|
+
*/
|
|
10
|
+
export interface AIDigestHighlight {
|
|
11
|
+
/** Stable identifier used as the React key. */
|
|
12
|
+
id: string;
|
|
13
|
+
/** Optional eyebrow / category text (e.g. "Compliance", "Revenue"). */
|
|
14
|
+
category?: string;
|
|
15
|
+
/** The highlight text. Supports plain text or markdown. */
|
|
16
|
+
text: string;
|
|
17
|
+
/** When true, the highlight body is parsed as markdown. */
|
|
18
|
+
markdown?: boolean;
|
|
19
|
+
/** Optional click handler — turns the row into a button. */
|
|
20
|
+
onClick?: () => void;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Frequency hint shown alongside the title.
|
|
24
|
+
*
|
|
25
|
+
* Use it to set reader expectations for the briefing cadence:
|
|
26
|
+
* `"daily"` for end-of-day summaries, `"weekly"` for Monday morning, etc.
|
|
27
|
+
* Pass `"custom"` and override via `cadenceLabel` for non-standard windows.
|
|
28
|
+
*/
|
|
29
|
+
export type AIDigestCadence = 'daily' | 'weekly' | 'monthly' | 'quarterly' | 'custom';
|
|
30
|
+
/**
|
|
31
|
+
* Props for AIDigestCard.
|
|
32
|
+
*
|
|
33
|
+
* Composes the existing `AIContainer` (AI-branded surface) + `AIAvatar`
|
|
34
|
+
* (visual identity) + `AITextBlock` (per-highlight markdown). No new
|
|
35
|
+
* AI-styling primitives — colors and gradients flow through `AIContainer`.
|
|
36
|
+
*/
|
|
37
|
+
export interface AIDigestCardProps {
|
|
38
|
+
/** Title of the briefing. */
|
|
39
|
+
title: string;
|
|
40
|
+
/** Optional briefing subtitle, e.g. the date or window. */
|
|
41
|
+
subtitle?: string;
|
|
42
|
+
/** Pre-set cadence hint shown as an eyebrow. Default omitted. */
|
|
43
|
+
cadence?: AIDigestCadence;
|
|
44
|
+
/** Custom cadence label — overrides the `cadence` preset. */
|
|
45
|
+
cadenceLabel?: string;
|
|
46
|
+
/** ISO timestamp of generation, formatted by the consumer if shown. */
|
|
47
|
+
generatedAt?: string;
|
|
48
|
+
/** Per-line highlights. Render order is preserved. */
|
|
49
|
+
highlights: AIDigestHighlight[];
|
|
50
|
+
/** Optional summary text shown above the highlights. */
|
|
51
|
+
summary?: string;
|
|
52
|
+
/** Render `summary` as markdown. Default `false`. */
|
|
53
|
+
summaryMarkdown?: boolean;
|
|
54
|
+
/** Slot for action buttons at the bottom. */
|
|
55
|
+
actions?: ReactNode;
|
|
56
|
+
/** Optional dismiss handler — adds a close button to the header. */
|
|
57
|
+
onDismiss?: () => void;
|
|
58
|
+
/** Whether to render the AI avatar in the header. Default `true`. */
|
|
59
|
+
showAvatar?: boolean;
|
|
60
|
+
/**
|
|
61
|
+
* Maximum number of highlights to show before collapsing the rest behind a
|
|
62
|
+
* "Show all" affordance. `0` (default) shows everything.
|
|
63
|
+
*/
|
|
64
|
+
maxVisibleHighlights?: number;
|
|
65
|
+
/** sx overrides on the root container. */
|
|
66
|
+
sx?: SxProps<Theme>;
|
|
67
|
+
/** Accessible label override. Falls back to the title. */
|
|
68
|
+
ariaLabel?: string;
|
|
69
|
+
}
|
|
70
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/AIDigestCard/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;AAEpD;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAChC,+CAA+C;IAC/C,EAAE,EAAE,MAAM,CAAC;IACX,uEAAuE;IACvE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,2DAA2D;IAC3D,IAAI,EAAE,MAAM,CAAC;IACb,2DAA2D;IAC3D,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,4DAA4D;IAC5D,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AAED;;;;;;GAMG;AACH,MAAM,MAAM,eAAe,GACvB,OAAO,GACP,QAAQ,GACR,SAAS,GACT,WAAW,GACX,QAAQ,CAAC;AAEb;;;;;;GAMG;AACH,MAAM,WAAW,iBAAiB;IAChC,6BAA6B;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,2DAA2D;IAC3D,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,iEAAiE;IACjE,OAAO,CAAC,EAAE,eAAe,CAAC;IAC1B,6DAA6D;IAC7D,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,uEAAuE;IACvE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,sDAAsD;IACtD,UAAU,EAAE,iBAAiB,EAAE,CAAC;IAChC,wDAAwD;IACxD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,qDAAqD;IACrD,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,6CAA6C;IAC7C,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,oEAAoE;IACpE,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,qEAAqE;IACrE,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;OAGG;IACH,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,0CAA0C;IAC1C,EAAE,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;IACpB,0DAA0D;IAC1D,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview AssessmentDrawer — right-side drawer for guided multi-section
|
|
3
|
+
* assessments (compliance reviews, scoring rubrics, evaluations).
|
|
4
|
+
*
|
|
5
|
+
* Layout: sticky header + 2-column body (left sidebar with section nav,
|
|
6
|
+
* right scrollable content area) + sticky footer with Save Draft + Submit.
|
|
7
|
+
*
|
|
8
|
+
* The component owns:
|
|
9
|
+
* - sidebar navigation + scroll-to-section behavior
|
|
10
|
+
* - progress indicator (counts complete vs total sections)
|
|
11
|
+
* - footer button states (disabled when saving/submitting)
|
|
12
|
+
*
|
|
13
|
+
* The consumer owns:
|
|
14
|
+
* - all form state (the section `content` slot is fully rendered by them)
|
|
15
|
+
* - validation logic + save/submit side effects
|
|
16
|
+
*
|
|
17
|
+
* @module components/AssessmentDrawer
|
|
18
|
+
*/
|
|
19
|
+
import * as React from 'react';
|
|
20
|
+
import type { AssessmentDrawerProps } from './types';
|
|
21
|
+
export declare const AssessmentDrawer: React.ForwardRefExoticComponent<AssessmentDrawerProps & React.RefAttributes<HTMLDivElement>>;
|
|
22
|
+
export default AssessmentDrawer;
|
|
23
|
+
//# sourceMappingURL=AssessmentDrawer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AssessmentDrawer.d.ts","sourceRoot":"","sources":["../../../src/components/AssessmentDrawer/AssessmentDrawer.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAsB/B,OAAO,KAAK,EACV,qBAAqB,EAGtB,MAAM,SAAS,CAAC;AA0JjB,eAAO,MAAM,gBAAgB,8FAgX3B,CAAC;AAEH,eAAe,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @internal
|
|
3
|
+
* AssessmentDrawer barrel.
|
|
4
|
+
*
|
|
5
|
+
* PUBLIC API: Import from '@trinityui/design-system' instead.
|
|
6
|
+
*/
|
|
7
|
+
export { AssessmentDrawer, default as AssessmentDrawerDefault, } from './AssessmentDrawer';
|
|
8
|
+
export type { AssessmentDrawerProps, AssessmentSection, AssessmentSectionStatus, AssessmentDrawerMode, } from './types';
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/AssessmentDrawer/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EACL,gBAAgB,EAChB,OAAO,IAAI,uBAAuB,GACnC,MAAM,oBAAoB,CAAC;AAE5B,YAAY,EACV,qBAAqB,EACrB,iBAAiB,EACjB,uBAAuB,EACvB,oBAAoB,GACrB,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Types for AssessmentDrawer — right-side drawer for guided
|
|
3
|
+
* multi-section assessments (compliance, evaluation, scoring, etc.).
|
|
4
|
+
*/
|
|
5
|
+
import type { ReactNode } from 'react';
|
|
6
|
+
import type { SxProps, Theme } from '@mui/material';
|
|
7
|
+
/**
|
|
8
|
+
* Drawer mode.
|
|
9
|
+
*
|
|
10
|
+
* - `edit` — user is actively filling in answers; Save Draft + Submit visible
|
|
11
|
+
* - `view` — read-only display of completed assessment
|
|
12
|
+
* - `review` — read-only with reviewer commentary inputs surfaced
|
|
13
|
+
*/
|
|
14
|
+
export type AssessmentDrawerMode = 'edit' | 'view' | 'review';
|
|
15
|
+
/**
|
|
16
|
+
* Status of a single section, used to colorize the section indicator + step.
|
|
17
|
+
*/
|
|
18
|
+
export type AssessmentSectionStatus = 'pending' | 'in-progress' | 'complete' | 'flagged';
|
|
19
|
+
/**
|
|
20
|
+
* A single section of an assessment.
|
|
21
|
+
*
|
|
22
|
+
* Trinity convention: render the section body via the `content` slot. The
|
|
23
|
+
* component does NOT prescribe a question/answer schema — different products
|
|
24
|
+
* have very different question types (scoring rubrics, free text, multiselect,
|
|
25
|
+
* file upload, etc.) and forcing one model adds friction.
|
|
26
|
+
*/
|
|
27
|
+
export interface AssessmentSection {
|
|
28
|
+
/** Stable id used as React key and as the navigation/scroll target. */
|
|
29
|
+
id: string;
|
|
30
|
+
/** Section title shown in the sidebar + body header. */
|
|
31
|
+
title: ReactNode;
|
|
32
|
+
/** Optional short description shown below the title. */
|
|
33
|
+
description?: ReactNode;
|
|
34
|
+
/** Section status — drives sidebar color + active indicator. */
|
|
35
|
+
status?: AssessmentSectionStatus;
|
|
36
|
+
/** Optional numeric label override (default uses 1-based index). */
|
|
37
|
+
label?: string;
|
|
38
|
+
/** The actual form content — questions, inputs, file uploads, etc. */
|
|
39
|
+
content: ReactNode;
|
|
40
|
+
/** Optional per-section action slot (e.g. "Mark as flagged"). */
|
|
41
|
+
actions?: ReactNode;
|
|
42
|
+
/** Optional reviewer commentary block (only visible in `review` mode). */
|
|
43
|
+
reviewerNotes?: ReactNode;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Props for AssessmentDrawer.
|
|
47
|
+
*/
|
|
48
|
+
export interface AssessmentDrawerProps {
|
|
49
|
+
/** Open state. Controlled. */
|
|
50
|
+
open: boolean;
|
|
51
|
+
/** Close handler. Called on backdrop click, ESC, and the chrome close button. */
|
|
52
|
+
onClose: () => void;
|
|
53
|
+
/** Sections of the assessment. */
|
|
54
|
+
sections: ReadonlyArray<AssessmentSection>;
|
|
55
|
+
/** Drawer title. Default "Assessment". */
|
|
56
|
+
title?: ReactNode;
|
|
57
|
+
/** Subtitle below title — typically the entity context. */
|
|
58
|
+
subtitle?: ReactNode;
|
|
59
|
+
/** Current section id. Defaults to first section. Updates on user navigation. */
|
|
60
|
+
activeSectionId?: string;
|
|
61
|
+
/** Called when the user navigates to a different section. */
|
|
62
|
+
onSectionChange?: (id: string) => void;
|
|
63
|
+
/** Mode. Default `edit`. */
|
|
64
|
+
mode?: AssessmentDrawerMode;
|
|
65
|
+
/** Show the section progress indicator. Default `true`. */
|
|
66
|
+
showProgress?: boolean;
|
|
67
|
+
/** Custom save-draft handler. Hides the Save button if omitted. */
|
|
68
|
+
onSaveDraft?: () => void;
|
|
69
|
+
/** Custom submit handler. Hides the Submit button if omitted. */
|
|
70
|
+
onSubmit?: () => void;
|
|
71
|
+
/** Saving state — disables Save + shows spinner. */
|
|
72
|
+
saving?: boolean;
|
|
73
|
+
/** Submitting state — disables Submit + shows spinner. */
|
|
74
|
+
submitting?: boolean;
|
|
75
|
+
/** Custom label for the Submit button. Default "Submit". */
|
|
76
|
+
submitLabel?: string;
|
|
77
|
+
/** Custom label for the Save Draft button. Default "Save draft". */
|
|
78
|
+
saveDraftLabel?: string;
|
|
79
|
+
/** Drawer width. Default 720. */
|
|
80
|
+
width?: number | string;
|
|
81
|
+
/** Hide the left-side section navigation (single-section assessments). Default `false`. */
|
|
82
|
+
hideSidebar?: boolean;
|
|
83
|
+
/** sx for the drawer paper. */
|
|
84
|
+
paperSx?: SxProps<Theme>;
|
|
85
|
+
/** Accessible label override. */
|
|
86
|
+
ariaLabel?: string;
|
|
87
|
+
}
|
|
88
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/AssessmentDrawer/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;;;;;;GAMG;AACH,MAAM,MAAM,oBAAoB,GAAG,MAAM,GAAG,MAAM,GAAG,QAAQ,CAAC;AAE9D;;GAEG;AACH,MAAM,MAAM,uBAAuB,GAC/B,SAAS,GACT,aAAa,GACb,UAAU,GACV,SAAS,CAAC;AAEd;;;;;;;GAOG;AACH,MAAM,WAAW,iBAAiB;IAChC,uEAAuE;IACvE,EAAE,EAAE,MAAM,CAAC;IACX,wDAAwD;IACxD,KAAK,EAAE,SAAS,CAAC;IACjB,wDAAwD;IACxD,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,gEAAgE;IAChE,MAAM,CAAC,EAAE,uBAAuB,CAAC;IACjC,oEAAoE;IACpE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,sEAAsE;IACtE,OAAO,EAAE,SAAS,CAAC;IACnB,iEAAiE;IACjE,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,0EAA0E;IAC1E,aAAa,CAAC,EAAE,SAAS,CAAC;CAC3B;AAED;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,8BAA8B;IAC9B,IAAI,EAAE,OAAO,CAAC;IACd,iFAAiF;IACjF,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,kCAAkC;IAClC,QAAQ,EAAE,aAAa,CAAC,iBAAiB,CAAC,CAAC;IAC3C,0CAA0C;IAC1C,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,2DAA2D;IAC3D,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,iFAAiF;IACjF,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,6DAA6D;IAC7D,eAAe,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,4BAA4B;IAC5B,IAAI,CAAC,EAAE,oBAAoB,CAAC;IAC5B,2DAA2D;IAC3D,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,mEAAmE;IACnE,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;IACzB,iEAAiE;IACjE,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,oDAAoD;IACpD,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,0DAA0D;IAC1D,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,4DAA4D;IAC5D,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,oEAAoE;IACpE,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,iCAAiC;IACjC,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,2FAA2F;IAC3F,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,+BAA+B;IAC/B,OAAO,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;IACzB,iCAAiC;IACjC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview AuditDrawer — right-side drawer surfacing chronological
|
|
3
|
+
* audit/activity events for a record.
|
|
4
|
+
*
|
|
5
|
+
* Visual: MUI Drawer anchored right + sticky header with title/subtitle +
|
|
6
|
+
* optional filter chips + scrollable timeline of events + optional load-more
|
|
7
|
+
* sentinel. Each event renders a colored timeline dot, actor avatar + name,
|
|
8
|
+
* formatted timestamp, action description, optional field-level diffs,
|
|
9
|
+
* optional note, and optional action slot.
|
|
10
|
+
*
|
|
11
|
+
* Severity colors from `theme.palette.<severity>.main` so light/dark mode and
|
|
12
|
+
* theme overrides flow through. Timeline rail uses `semanticTokens.colors.border.subtle`.
|
|
13
|
+
*
|
|
14
|
+
* @module components/AuditDrawer
|
|
15
|
+
* @example
|
|
16
|
+
* ```tsx
|
|
17
|
+
* <AuditDrawer
|
|
18
|
+
* open={isOpen}
|
|
19
|
+
* onClose={() => setOpen(false)}
|
|
20
|
+
* title="Audit history"
|
|
21
|
+
* subtitle="Subject 042"
|
|
22
|
+
* events={auditEvents}
|
|
23
|
+
* filterChips={[
|
|
24
|
+
* { id: 'approval', label: 'Approvals', severity: 'success' },
|
|
25
|
+
* { id: 'edit', label: 'Edits' },
|
|
26
|
+
* { id: 'security', label: 'Security', severity: 'security' },
|
|
27
|
+
* ]}
|
|
28
|
+
* activeFilterIds={activeFilters}
|
|
29
|
+
* onFilterToggle={toggleFilter}
|
|
30
|
+
* />
|
|
31
|
+
* ```
|
|
32
|
+
*/
|
|
33
|
+
import * as React from 'react';
|
|
34
|
+
import type { AuditDrawerProps } from './types';
|
|
35
|
+
export declare const AuditDrawer: React.ForwardRefExoticComponent<AuditDrawerProps & React.RefAttributes<HTMLDivElement>>;
|
|
36
|
+
export default AuditDrawer;
|
|
37
|
+
//# sourceMappingURL=AuditDrawer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AuditDrawer.d.ts","sourceRoot":"","sources":["../../../src/components/AuditDrawer/AuditDrawer.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AA2B/B,OAAO,KAAK,EACV,gBAAgB,EAIjB,MAAM,SAAS,CAAC;AAwVjB,eAAO,MAAM,WAAW,yFA6LvB,CAAC;AAEF,eAAe,WAAW,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @internal
|
|
3
|
+
* AuditDrawer barrel.
|
|
4
|
+
*
|
|
5
|
+
* PUBLIC API: Import from '@trinityui/design-system' instead.
|
|
6
|
+
*/
|
|
7
|
+
export { AuditDrawer, default as AuditDrawerDefault } from './AuditDrawer';
|
|
8
|
+
export type { AuditDrawerProps, AuditEvent, AuditEventSeverity, AuditFieldChange, AuditFilterChip, } from './types';
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/AuditDrawer/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,WAAW,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAE3E,YAAY,EACV,gBAAgB,EAChB,UAAU,EACV,kBAAkB,EAClB,gBAAgB,EAChB,eAAe,GAChB,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Types for AuditDrawer — right-side drawer surfacing
|
|
3
|
+
* chronological audit/activity events for a record.
|
|
4
|
+
*/
|
|
5
|
+
import type { ReactNode } from 'react';
|
|
6
|
+
import type { SxProps, Theme } from '@mui/material';
|
|
7
|
+
/**
|
|
8
|
+
* Severity / category of an audit event. Drives the timeline dot color and
|
|
9
|
+
* the icon shown beside the action.
|
|
10
|
+
*
|
|
11
|
+
* Use:
|
|
12
|
+
* - `info` for routine system events (auto-save, status change)
|
|
13
|
+
* - `success` for completed approvals or signed milestones
|
|
14
|
+
* - `warning` for events needing attention (re-review, escalation)
|
|
15
|
+
* - `error` for failures or anomalies that closed/escalated
|
|
16
|
+
* - `security` for auth / permission changes (different icon)
|
|
17
|
+
*/
|
|
18
|
+
export type AuditEventSeverity = 'info' | 'success' | 'warning' | 'error' | 'security';
|
|
19
|
+
/**
|
|
20
|
+
* A single field-level change. Optional; when supplied, AuditDrawer renders
|
|
21
|
+
* a small "Field — before → after" line under the event description.
|
|
22
|
+
*
|
|
23
|
+
* Keep changes terse — long diffs should be opened in a dedicated diff view.
|
|
24
|
+
*/
|
|
25
|
+
export interface AuditFieldChange {
|
|
26
|
+
/** Human-readable field name. */
|
|
27
|
+
field: string;
|
|
28
|
+
/** Previous value as a short string or ReactNode (skip for "added"). */
|
|
29
|
+
before?: ReactNode;
|
|
30
|
+
/** New value as a short string or ReactNode (skip for "removed"). */
|
|
31
|
+
after?: ReactNode;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* A single audit event.
|
|
35
|
+
*
|
|
36
|
+
* Trinity convention: `id` should be globally unique within the surfacing
|
|
37
|
+
* window. `timestamp` is ISO string or Date — formatted via Intl on render.
|
|
38
|
+
* `actor` is rendered as an avatar + name beside the event.
|
|
39
|
+
*/
|
|
40
|
+
export interface AuditEvent {
|
|
41
|
+
/** Stable id for React keys + callbacks. */
|
|
42
|
+
id: string;
|
|
43
|
+
/** When the event happened. ISO string or Date. */
|
|
44
|
+
timestamp: string | Date;
|
|
45
|
+
/** Short, action-oriented description (e.g. "Status changed to Final"). */
|
|
46
|
+
action: ReactNode;
|
|
47
|
+
/** Who did it — display name. */
|
|
48
|
+
actorName: string;
|
|
49
|
+
/** Optional avatar (image URL or rendered avatar element). */
|
|
50
|
+
actorAvatar?: ReactNode;
|
|
51
|
+
/** Optional secondary identifier — role or team. */
|
|
52
|
+
actorRole?: string;
|
|
53
|
+
/** Severity / category. Default `info`. */
|
|
54
|
+
severity?: AuditEventSeverity;
|
|
55
|
+
/** Optional event-type label (e.g. "Approval", "Comment"). */
|
|
56
|
+
category?: string;
|
|
57
|
+
/** Optional field-level diffs to surface under the action. */
|
|
58
|
+
changes?: AuditFieldChange[];
|
|
59
|
+
/** Optional free-form note from the actor. */
|
|
60
|
+
note?: ReactNode;
|
|
61
|
+
/** Optional action slot — typically "View detail" link. */
|
|
62
|
+
actions?: ReactNode;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Filter options surfaced in the drawer chrome.
|
|
66
|
+
*
|
|
67
|
+
* When supplied, AuditDrawer renders chips at top. Selection management is
|
|
68
|
+
* up to the consumer via `value` + `onChange`.
|
|
69
|
+
*/
|
|
70
|
+
export interface AuditFilterChip {
|
|
71
|
+
/** Stable id. */
|
|
72
|
+
id: string;
|
|
73
|
+
/** Display label. */
|
|
74
|
+
label: ReactNode;
|
|
75
|
+
/** Optional severity to colorize the chip. */
|
|
76
|
+
severity?: AuditEventSeverity;
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Props for AuditDrawer.
|
|
80
|
+
*/
|
|
81
|
+
export interface AuditDrawerProps {
|
|
82
|
+
/** Open state. Controlled. */
|
|
83
|
+
open: boolean;
|
|
84
|
+
/** Close handler. Called on backdrop click, ESC, and the chrome close button. */
|
|
85
|
+
onClose: () => void;
|
|
86
|
+
/** Events to render, most-recent first. */
|
|
87
|
+
events: ReadonlyArray<AuditEvent>;
|
|
88
|
+
/** Drawer title. Default "Audit history". */
|
|
89
|
+
title?: ReactNode;
|
|
90
|
+
/** Subtitle below title — typically the entity name (e.g. "Subject 042"). */
|
|
91
|
+
subtitle?: ReactNode;
|
|
92
|
+
/** Optional filter chips. */
|
|
93
|
+
filterChips?: ReadonlyArray<AuditFilterChip>;
|
|
94
|
+
/** Currently active filter ids. */
|
|
95
|
+
activeFilterIds?: ReadonlyArray<string>;
|
|
96
|
+
/** Called when a filter chip is toggled. */
|
|
97
|
+
onFilterToggle?: (id: string) => void;
|
|
98
|
+
/** Optional search/text filter. */
|
|
99
|
+
searchValue?: string;
|
|
100
|
+
onSearchChange?: (value: string) => void;
|
|
101
|
+
/** Show loading indicator at the bottom of the list. */
|
|
102
|
+
loading?: boolean;
|
|
103
|
+
/** Called when the user scrolls to the bottom — typical pagination hook. */
|
|
104
|
+
onLoadMore?: () => void;
|
|
105
|
+
/** Replace the default "no audit events" state. */
|
|
106
|
+
emptyState?: ReactNode;
|
|
107
|
+
/** Drawer width. Default 480. */
|
|
108
|
+
width?: number | string;
|
|
109
|
+
/** Disable the timeline rail visualization (just renders a flat list). Default false. */
|
|
110
|
+
disableTimeline?: boolean;
|
|
111
|
+
/** sx for the drawer paper. */
|
|
112
|
+
paperSx?: SxProps<Theme>;
|
|
113
|
+
/** Accessible label override. Falls back to title. */
|
|
114
|
+
ariaLabel?: string;
|
|
115
|
+
}
|
|
116
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/AuditDrawer/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;;;;;;;;;;GAUG;AACH,MAAM,MAAM,kBAAkB,GAC1B,MAAM,GACN,SAAS,GACT,SAAS,GACT,OAAO,GACP,UAAU,CAAC;AAEf;;;;;GAKG;AACH,MAAM,WAAW,gBAAgB;IAC/B,iCAAiC;IACjC,KAAK,EAAE,MAAM,CAAC;IACd,wEAAwE;IACxE,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,qEAAqE;IACrE,KAAK,CAAC,EAAE,SAAS,CAAC;CACnB;AAED;;;;;;GAMG;AACH,MAAM,WAAW,UAAU;IACzB,4CAA4C;IAC5C,EAAE,EAAE,MAAM,CAAC;IACX,mDAAmD;IACnD,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,2EAA2E;IAC3E,MAAM,EAAE,SAAS,CAAC;IAClB,iCAAiC;IACjC,SAAS,EAAE,MAAM,CAAC;IAClB,8DAA8D;IAC9D,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,oDAAoD;IACpD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,2CAA2C;IAC3C,QAAQ,CAAC,EAAE,kBAAkB,CAAC;IAC9B,8DAA8D;IAC9D,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,8DAA8D;IAC9D,OAAO,CAAC,EAAE,gBAAgB,EAAE,CAAC;IAC7B,8CAA8C;IAC9C,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,2DAA2D;IAC3D,OAAO,CAAC,EAAE,SAAS,CAAC;CACrB;AAED;;;;;GAKG;AACH,MAAM,WAAW,eAAe;IAC9B,iBAAiB;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,qBAAqB;IACrB,KAAK,EAAE,SAAS,CAAC;IACjB,8CAA8C;IAC9C,QAAQ,CAAC,EAAE,kBAAkB,CAAC;CAC/B;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,8BAA8B;IAC9B,IAAI,EAAE,OAAO,CAAC;IACd,iFAAiF;IACjF,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,2CAA2C;IAC3C,MAAM,EAAE,aAAa,CAAC,UAAU,CAAC,CAAC;IAClC,6CAA6C;IAC7C,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,6EAA6E;IAC7E,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,6BAA6B;IAC7B,WAAW,CAAC,EAAE,aAAa,CAAC,eAAe,CAAC,CAAC;IAC7C,mCAAmC;IACnC,eAAe,CAAC,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;IACxC,4CAA4C;IAC5C,cAAc,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC,mCAAmC;IACnC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACzC,wDAAwD;IACxD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,4EAA4E;IAC5E,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB,mDAAmD;IACnD,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB,iCAAiC;IACjC,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,yFAAyF;IACzF,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,+BAA+B;IAC/B,OAAO,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;IACzB,sDAAsD;IACtD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview BulkActionDock — floating bottom dock for multi-select actions.
|
|
3
|
+
*
|
|
4
|
+
* Pattern: appears when the user selects rows in a DataTable, showing a count
|
|
5
|
+
* + 1-4 bulk actions + clear button. Auto-hides when selection clears.
|
|
6
|
+
*
|
|
7
|
+
* Visual: navy-tinted dark surface with high contrast, floating bottom-center
|
|
8
|
+
* by default. Uses `theme.palette.background.default` for the dock fill so it
|
|
9
|
+
* looks consistent in light/dark mode. Shadow comes from semantic shadow tokens.
|
|
10
|
+
*
|
|
11
|
+
* @module components/BulkActionDock
|
|
12
|
+
* @example
|
|
13
|
+
* ```tsx
|
|
14
|
+
* import { BulkActionDock } from '@trinityui/design-system';
|
|
15
|
+
*
|
|
16
|
+
* <BulkActionDock
|
|
17
|
+
* selectedIds={selectedRowIds}
|
|
18
|
+
* actions={[
|
|
19
|
+
* { id: 'export', label: 'Export', icon: <Download size={16} />, onClick: doExport },
|
|
20
|
+
* { id: 'delete', label: 'Delete', icon: <Trash size={16} />, variant: 'destructive', onClick: doDelete },
|
|
21
|
+
* ]}
|
|
22
|
+
* onClearSelection={() => setSelected([])}
|
|
23
|
+
* />
|
|
24
|
+
* ```
|
|
25
|
+
*/
|
|
26
|
+
import * as React from 'react';
|
|
27
|
+
import type { BulkActionDockProps } from './types';
|
|
28
|
+
export declare const BulkActionDock: React.ForwardRefExoticComponent<BulkActionDockProps & React.RefAttributes<HTMLDivElement>>;
|
|
29
|
+
export default BulkActionDock;
|
|
30
|
+
//# sourceMappingURL=BulkActionDock.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BulkActionDock.d.ts","sourceRoot":"","sources":["../../../src/components/BulkActionDock/BulkActionDock.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAa/B,OAAO,KAAK,EACV,mBAAmB,EAGpB,MAAM,SAAS,CAAC;AAgEjB,eAAO,MAAM,cAAc,4FAiKzB,CAAC;AAEH,eAAe,cAAc,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @internal
|
|
3
|
+
* BulkActionDock barrel.
|
|
4
|
+
*
|
|
5
|
+
* PUBLIC API: Import from '@trinityui/design-system' instead.
|
|
6
|
+
*/
|
|
7
|
+
export { BulkActionDock, default as BulkActionDockDefault } from './BulkActionDock';
|
|
8
|
+
export type { BulkActionDockProps, BulkAction, BulkActionDockPosition, } from './types';
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/BulkActionDock/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,cAAc,EAAE,OAAO,IAAI,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AAEpF,YAAY,EACV,mBAAmB,EACnB,UAAU,EACV,sBAAsB,GACvB,MAAM,SAAS,CAAC"}
|