@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.
Files changed (170) hide show
  1. package/CHANGELOG.md +34 -455
  2. package/dist/{Legend.js → IllustratedMessage.js} +1247 -1204
  3. package/dist/app-shell.js +32 -32
  4. package/dist/assets/index.d.ts +1 -1
  5. package/dist/charts.js +3267 -3144
  6. package/dist/components/AI/QueryInput.d.ts +3 -3
  7. package/dist/components/AIDigestCard/AIDigestCard.d.ts +29 -0
  8. package/dist/components/AIDigestCard/AIDigestCard.d.ts.map +1 -0
  9. package/dist/components/AIDigestCard/index.d.ts +9 -0
  10. package/dist/components/AIDigestCard/index.d.ts.map +1 -0
  11. package/dist/components/AIDigestCard/types.d.ts +70 -0
  12. package/dist/components/AIDigestCard/types.d.ts.map +1 -0
  13. package/dist/components/AppLayout/AIFabLayout.deprecated.d.ts +1 -1
  14. package/dist/components/AssessmentDrawer/AssessmentDrawer.d.ts +23 -0
  15. package/dist/components/AssessmentDrawer/AssessmentDrawer.d.ts.map +1 -0
  16. package/dist/components/AssessmentDrawer/index.d.ts +9 -0
  17. package/dist/components/AssessmentDrawer/index.d.ts.map +1 -0
  18. package/dist/components/AssessmentDrawer/types.d.ts +88 -0
  19. package/dist/components/AssessmentDrawer/types.d.ts.map +1 -0
  20. package/dist/components/AuditDrawer/AuditDrawer.d.ts +37 -0
  21. package/dist/components/AuditDrawer/AuditDrawer.d.ts.map +1 -0
  22. package/dist/components/AuditDrawer/index.d.ts +9 -0
  23. package/dist/components/AuditDrawer/index.d.ts.map +1 -0
  24. package/dist/components/AuditDrawer/types.d.ts +116 -0
  25. package/dist/components/AuditDrawer/types.d.ts.map +1 -0
  26. package/dist/components/BulkActionDock/BulkActionDock.d.ts +30 -0
  27. package/dist/components/BulkActionDock/BulkActionDock.d.ts.map +1 -0
  28. package/dist/components/BulkActionDock/index.d.ts +9 -0
  29. package/dist/components/BulkActionDock/index.d.ts.map +1 -0
  30. package/dist/components/BulkActionDock/types.d.ts +71 -0
  31. package/dist/components/BulkActionDock/types.d.ts.map +1 -0
  32. package/dist/components/DateRangePicker/DateRangePicker.d.ts +20 -0
  33. package/dist/components/DateRangePicker/DateRangePicker.d.ts.map +1 -0
  34. package/dist/components/DateRangePicker/index.d.ts +9 -0
  35. package/dist/components/DateRangePicker/index.d.ts.map +1 -0
  36. package/dist/components/DateRangePicker/types.d.ts +72 -0
  37. package/dist/components/DateRangePicker/types.d.ts.map +1 -0
  38. package/dist/components/EntityDetailPanel/EntityDetailPanel.d.ts +17 -0
  39. package/dist/components/EntityDetailPanel/EntityDetailPanel.d.ts.map +1 -0
  40. package/dist/components/EntityDetailPanel/index.d.ts +9 -0
  41. package/dist/components/EntityDetailPanel/index.d.ts.map +1 -0
  42. package/dist/components/EntityDetailPanel/types.d.ts +108 -0
  43. package/dist/components/EntityDetailPanel/types.d.ts.map +1 -0
  44. package/dist/components/GanttView/GanttView.d.ts +25 -0
  45. package/dist/components/GanttView/GanttView.d.ts.map +1 -0
  46. package/dist/components/GanttView/index.d.ts +9 -0
  47. package/dist/components/GanttView/index.d.ts.map +1 -0
  48. package/dist/components/GanttView/types.d.ts +110 -0
  49. package/dist/components/GanttView/types.d.ts.map +1 -0
  50. package/dist/components/GaugeCard/GaugeCard.d.ts +34 -0
  51. package/dist/components/GaugeCard/GaugeCard.d.ts.map +1 -0
  52. package/dist/components/GaugeCard/index.d.ts +9 -0
  53. package/dist/components/GaugeCard/index.d.ts.map +1 -0
  54. package/dist/components/GaugeCard/types.d.ts +85 -0
  55. package/dist/components/GaugeCard/types.d.ts.map +1 -0
  56. package/dist/components/GeoStatusMap/GeoStatusMap.d.ts +17 -0
  57. package/dist/components/GeoStatusMap/GeoStatusMap.d.ts.map +1 -0
  58. package/dist/components/GeoStatusMap/index.d.ts +9 -0
  59. package/dist/components/GeoStatusMap/index.d.ts.map +1 -0
  60. package/dist/components/GeoStatusMap/types.d.ts +117 -0
  61. package/dist/components/GeoStatusMap/types.d.ts.map +1 -0
  62. package/dist/components/HierarchicalDrillDown/HierarchicalDrillDown.d.ts +22 -0
  63. package/dist/components/HierarchicalDrillDown/HierarchicalDrillDown.d.ts.map +1 -0
  64. package/dist/components/HierarchicalDrillDown/index.d.ts +9 -0
  65. package/dist/components/HierarchicalDrillDown/index.d.ts.map +1 -0
  66. package/dist/components/HierarchicalDrillDown/types.d.ts +81 -0
  67. package/dist/components/HierarchicalDrillDown/types.d.ts.map +1 -0
  68. package/dist/components/HistoricalDataIndicator/HistoricalDataIndicator.d.ts +21 -0
  69. package/dist/components/HistoricalDataIndicator/HistoricalDataIndicator.d.ts.map +1 -0
  70. package/dist/components/HistoricalDataIndicator/index.d.ts +9 -0
  71. package/dist/components/HistoricalDataIndicator/index.d.ts.map +1 -0
  72. package/dist/components/HistoricalDataIndicator/types.d.ts +58 -0
  73. package/dist/components/HistoricalDataIndicator/types.d.ts.map +1 -0
  74. package/dist/components/InsightCard/InsightCard.d.ts +27 -0
  75. package/dist/components/InsightCard/InsightCard.d.ts.map +1 -0
  76. package/dist/components/InsightCard/index.d.ts +9 -0
  77. package/dist/components/InsightCard/index.d.ts.map +1 -0
  78. package/dist/components/InsightCard/types.d.ts +62 -0
  79. package/dist/components/InsightCard/types.d.ts.map +1 -0
  80. package/dist/components/NotificationCenter/NotificationCenter.d.ts +31 -0
  81. package/dist/components/NotificationCenter/NotificationCenter.d.ts.map +1 -0
  82. package/dist/components/NotificationCenter/index.d.ts +9 -0
  83. package/dist/components/NotificationCenter/index.d.ts.map +1 -0
  84. package/dist/components/NotificationCenter/types.d.ts +91 -0
  85. package/dist/components/NotificationCenter/types.d.ts.map +1 -0
  86. package/dist/components/OrgChart/OrgChart.d.ts +23 -0
  87. package/dist/components/OrgChart/OrgChart.d.ts.map +1 -0
  88. package/dist/components/OrgChart/index.d.ts +9 -0
  89. package/dist/components/OrgChart/index.d.ts.map +1 -0
  90. package/dist/components/OrgChart/types.d.ts +81 -0
  91. package/dist/components/OrgChart/types.d.ts.map +1 -0
  92. package/dist/components/PageTOC/PageTOC.d.ts +33 -0
  93. package/dist/components/PageTOC/PageTOC.d.ts.map +1 -0
  94. package/dist/components/PageTOC/index.d.ts +9 -0
  95. package/dist/components/PageTOC/index.d.ts.map +1 -0
  96. package/dist/components/PageTOC/types.d.ts +58 -0
  97. package/dist/components/PageTOC/types.d.ts.map +1 -0
  98. package/dist/components/StatusHero/StatusHero.d.ts +31 -0
  99. package/dist/components/StatusHero/StatusHero.d.ts.map +1 -0
  100. package/dist/components/StatusHero/index.d.ts +9 -0
  101. package/dist/components/StatusHero/index.d.ts.map +1 -0
  102. package/dist/components/StatusHero/types.d.ts +57 -0
  103. package/dist/components/StatusHero/types.d.ts.map +1 -0
  104. package/dist/components/SystemBanner/SystemBanner.d.ts +28 -0
  105. package/dist/components/SystemBanner/SystemBanner.d.ts.map +1 -0
  106. package/dist/components/SystemBanner/index.d.ts +9 -0
  107. package/dist/components/SystemBanner/index.d.ts.map +1 -0
  108. package/dist/components/SystemBanner/types.d.ts +58 -0
  109. package/dist/components/SystemBanner/types.d.ts.map +1 -0
  110. package/dist/components/TopRisksStrip/TopRisksStrip.d.ts +26 -0
  111. package/dist/components/TopRisksStrip/TopRisksStrip.d.ts.map +1 -0
  112. package/dist/components/TopRisksStrip/index.d.ts +9 -0
  113. package/dist/components/TopRisksStrip/index.d.ts.map +1 -0
  114. package/dist/components/TopRisksStrip/types.d.ts +61 -0
  115. package/dist/components/TopRisksStrip/types.d.ts.map +1 -0
  116. package/dist/components/templates/Auth/AuthTemplate.d.ts +28 -0
  117. package/dist/components/templates/Auth/AuthTemplate.d.ts.map +1 -0
  118. package/dist/components/templates/Auth/index.d.ts +3 -0
  119. package/dist/components/templates/Auth/index.d.ts.map +1 -0
  120. package/dist/components/templates/Auth/types.d.ts +67 -0
  121. package/dist/components/templates/Auth/types.d.ts.map +1 -0
  122. package/dist/components/templates/Catalog/CatalogTemplate.d.ts +19 -0
  123. package/dist/components/templates/Catalog/CatalogTemplate.d.ts.map +1 -0
  124. package/dist/components/templates/Catalog/index.d.ts +3 -0
  125. package/dist/components/templates/Catalog/index.d.ts.map +1 -0
  126. package/dist/components/templates/Catalog/types.d.ts +85 -0
  127. package/dist/components/templates/Catalog/types.d.ts.map +1 -0
  128. package/dist/components/templates/ConnectorWizard/ConnectorWizardTemplate.d.ts +83 -0
  129. package/dist/components/templates/ConnectorWizard/ConnectorWizardTemplate.d.ts.map +1 -0
  130. package/dist/components/templates/ConnectorWizard/index.d.ts +2 -0
  131. package/dist/components/templates/ConnectorWizard/index.d.ts.map +1 -0
  132. package/dist/components/templates/ErrorPage/ErrorPageTemplate.d.ts +53 -0
  133. package/dist/components/templates/ErrorPage/ErrorPageTemplate.d.ts.map +1 -0
  134. package/dist/components/templates/ErrorPage/index.d.ts +2 -0
  135. package/dist/components/templates/ErrorPage/index.d.ts.map +1 -0
  136. package/dist/components/templates/InsightsCenter/InsightsCenterTemplate.d.ts +64 -0
  137. package/dist/components/templates/InsightsCenter/InsightsCenterTemplate.d.ts.map +1 -0
  138. package/dist/components/templates/InsightsCenter/index.d.ts +2 -0
  139. package/dist/components/templates/InsightsCenter/index.d.ts.map +1 -0
  140. package/dist/components/templates/IntegrationDetail/IntegrationDetailTemplate.d.ts +60 -0
  141. package/dist/components/templates/IntegrationDetail/IntegrationDetailTemplate.d.ts.map +1 -0
  142. package/dist/components/templates/IntegrationDetail/index.d.ts +2 -0
  143. package/dist/components/templates/IntegrationDetail/index.d.ts.map +1 -0
  144. package/dist/components/templates/Onboarding/OnboardingTemplate.d.ts +63 -0
  145. package/dist/components/templates/Onboarding/OnboardingTemplate.d.ts.map +1 -0
  146. package/dist/components/templates/Onboarding/index.d.ts +2 -0
  147. package/dist/components/templates/Onboarding/index.d.ts.map +1 -0
  148. package/dist/components/templates/PlanHero/PlanHero.d.ts +20 -0
  149. package/dist/components/templates/PlanHero/PlanHero.d.ts.map +1 -0
  150. package/dist/components/templates/PlanHero/index.d.ts +3 -0
  151. package/dist/components/templates/PlanHero/index.d.ts.map +1 -0
  152. package/dist/components/templates/PlanHero/types.d.ts +69 -0
  153. package/dist/components/templates/PlanHero/types.d.ts.map +1 -0
  154. package/dist/components/templates/Report/ReportTemplate.d.ts +74 -0
  155. package/dist/components/templates/Report/ReportTemplate.d.ts.map +1 -0
  156. package/dist/components/templates/Report/index.d.ts +2 -0
  157. package/dist/components/templates/Report/index.d.ts.map +1 -0
  158. package/dist/components/templates/Wizard/WizardTemplate.d.ts +81 -0
  159. package/dist/components/templates/Wizard/WizardTemplate.d.ts.map +1 -0
  160. package/dist/components/templates/Wizard/index.d.ts +2 -0
  161. package/dist/components/templates/Wizard/index.d.ts.map +1 -0
  162. package/dist/components/templates/index.d.ts +10 -0
  163. package/dist/components/templates/index.d.ts.map +1 -1
  164. package/dist/data-table2.js +41131 -37299
  165. package/dist/essentials.js +1 -1
  166. package/dist/index.d.ts +37 -0
  167. package/dist/index.d.ts.map +1 -1
  168. package/dist/index.js +49347 -41359
  169. package/dist/trinity.css +1 -1
  170. package/package.json +42 -34
@@ -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 v2.0.0.
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 v2.0.0.
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 v2.0.0.
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"}
@@ -4,7 +4,7 @@
4
4
  * AIFabLayout - DEPRECATED
5
5
  *
6
6
  * @deprecated Use `AppLayout` with `navStyle="topnav"` and `aiTrigger="fab"` instead.
7
- * This component will be removed in v2.0.0.
7
+ * This component will be removed in v3.0.
8
8
  *
9
9
  * Migration:
10
10
  * ```tsx
@@ -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"}
@@ -0,0 +1,71 @@
1
+ /**
2
+ * @fileoverview Types for BulkActionDock — floating dock that appears when
3
+ * users select rows in a DataTable (or similar list).
4
+ */
5
+ import type { ReactNode } from 'react';
6
+ import type { SxProps, Theme } from '@mui/material';
7
+ /**
8
+ * A single action button shown in the dock.
9
+ *
10
+ * Variants:
11
+ * - default — primary action button
12
+ * - subtle — quieter outlined button (e.g. "Export")
13
+ * - destructive — error-tinted (e.g. "Delete")
14
+ */
15
+ export interface BulkAction {
16
+ /** Stable id for analytics + tests. */
17
+ id: string;
18
+ /** Button label. */
19
+ label: string;
20
+ /** Optional leading icon (react-feather component). */
21
+ icon?: ReactNode;
22
+ /** Called when the action button is clicked. Receives the selected ids. */
23
+ onClick: (selectedIds: ReadonlyArray<string>) => void;
24
+ /** Disabled state. */
25
+ disabled?: boolean;
26
+ /** Visual treatment. Default `default`. */
27
+ variant?: 'default' | 'subtle' | 'destructive';
28
+ }
29
+ /**
30
+ * Position of the dock relative to its container.
31
+ *
32
+ * - `bottom-center` (default) — common chrome pattern; floats above table
33
+ * - `bottom-right` — for layouts where the right side is more discoverable
34
+ * - `inline` — sits in document flow instead of fixed-positioning (use when the
35
+ * parent already manages absolute layout, e.g. inside a custom sheet)
36
+ */
37
+ export type BulkActionDockPosition = 'bottom-center' | 'bottom-right' | 'inline';
38
+ /**
39
+ * Props for BulkActionDock.
40
+ *
41
+ * Standard pattern: render this directly under a DataTable, controlled by the
42
+ * table's selection state. The dock auto-hides when `selectedIds.length === 0`
43
+ * unless `alwaysVisible` is set.
44
+ */
45
+ export interface BulkActionDockProps {
46
+ /** Currently selected row ids. Drives count display and is forwarded to each action handler. */
47
+ selectedIds: ReadonlyArray<string>;
48
+ /** Bulk actions exposed in the dock. Order = display order. Keep to 1-4 for readability. */
49
+ actions: ReadonlyArray<BulkAction>;
50
+ /** Custom label override. Default `"{count} selected"`. */
51
+ selectionLabel?: (count: number) => string;
52
+ /** Called when the X clear button is clicked. */
53
+ onClearSelection?: () => void;
54
+ /** Position of the dock. Default `bottom-center`. */
55
+ position?: BulkActionDockPosition;
56
+ /** Force dock visibility even when no rows are selected. Default `false`. */
57
+ alwaysVisible?: boolean;
58
+ /** Width of the dock (px). Default `auto` — sizes to content. */
59
+ width?: number | string;
60
+ /** Maximum dock width before content wraps / scrolls. Default `720`. */
61
+ maxWidth?: number | string;
62
+ /** Optional left slot — typically a status indicator or summary chip. */
63
+ leadingSlot?: ReactNode;
64
+ /** Optional trailing slot rendered before the clear button. */
65
+ trailingSlot?: ReactNode;
66
+ /** sx for the root dock container. */
67
+ sx?: SxProps<Theme>;
68
+ /** Accessible label override for the dock region. Falls back to "Bulk actions". */
69
+ ariaLabel?: string;
70
+ }
71
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/BulkActionDock/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;;;;;;;GAOG;AACH,MAAM,WAAW,UAAU;IACzB,uCAAuC;IACvC,EAAE,EAAE,MAAM,CAAC;IACX,oBAAoB;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,uDAAuD;IACvD,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,2EAA2E;IAC3E,OAAO,EAAE,CAAC,WAAW,EAAE,aAAa,CAAC,MAAM,CAAC,KAAK,IAAI,CAAC;IACtD,sBAAsB;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,2CAA2C;IAC3C,OAAO,CAAC,EAAE,SAAS,GAAG,QAAQ,GAAG,aAAa,CAAC;CAChD;AAED;;;;;;;GAOG;AACH,MAAM,MAAM,sBAAsB,GAAG,eAAe,GAAG,cAAc,GAAG,QAAQ,CAAC;AAEjF;;;;;;GAMG;AACH,MAAM,WAAW,mBAAmB;IAClC,gGAAgG;IAChG,WAAW,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;IACnC,4FAA4F;IAC5F,OAAO,EAAE,aAAa,CAAC,UAAU,CAAC,CAAC;IACnC,2DAA2D;IAC3D,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;IAC3C,iDAAiD;IACjD,gBAAgB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC9B,qDAAqD;IACrD,QAAQ,CAAC,EAAE,sBAAsB,CAAC;IAClC,6EAA6E;IAC7E,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,iEAAiE;IACjE,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,wEAAwE;IACxE,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC3B,yEAAyE;IACzE,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,+DAA+D;IAC/D,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB,sCAAsC;IACtC,EAAE,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;IACpB,mFAAmF;IACnF,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB"}
@@ -0,0 +1,20 @@
1
+ /**
2
+ * @fileoverview DateRangePicker — compact two-date range input with calendar popover.
3
+ *
4
+ * Built from MUI primitives (no @mui/x-date-pickers dependency). Designed for
5
+ * dashboard filter bars where space is tight and quick presets are essential.
6
+ *
7
+ * @module components/DateRangePicker
8
+ * @example
9
+ * ```tsx
10
+ * import { DateRangePicker, type DateRange } from '@trinityui/design-system';
11
+ * const [range, setRange] = useState<DateRange>({ start: null, end: null });
12
+ *
13
+ * <DateRangePicker value={range} onChange={setRange} label="Reporting period" />
14
+ * ```
15
+ */
16
+ import * as React from 'react';
17
+ import type { DateRangePickerProps } from './types';
18
+ export declare const DateRangePicker: React.ForwardRefExoticComponent<DateRangePickerProps & React.RefAttributes<HTMLDivElement>>;
19
+ export default DateRangePicker;
20
+ //# sourceMappingURL=DateRangePicker.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DateRangePicker.d.ts","sourceRoot":"","sources":["../../../src/components/DateRangePicker/DateRangePicker.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAqB/B,OAAO,KAAK,EAEV,oBAAoB,EAErB,MAAM,SAAS,CAAC;AAySjB,eAAO,MAAM,eAAe,6FA+T1B,CAAC;AAEH,eAAe,eAAe,CAAC"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @internal
3
+ * DateRangePicker barrel.
4
+ *
5
+ * PUBLIC API: Import from '@trinityui/design-system' instead.
6
+ */
7
+ export { DateRangePicker, default as DateRangePickerDefault, } from './DateRangePicker';
8
+ export type { DateRange, DateRangePickerProps, DateRangePickerSize, DateRangePreset, } from './types';
9
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/DateRangePicker/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EACL,eAAe,EACf,OAAO,IAAI,sBAAsB,GAClC,MAAM,mBAAmB,CAAC;AAE3B,YAAY,EACV,SAAS,EACT,oBAAoB,EACpB,mBAAmB,EACnB,eAAe,GAChB,MAAM,SAAS,CAAC"}