@caffeinebounce/ui 0.62.3 → 0.63.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (96) hide show
  1. package/README.md +1 -1
  2. package/dist/blog.js +7 -6
  3. package/dist/blog.mjs +2 -1
  4. package/dist/charts.d.cts +1 -1
  5. package/dist/charts.d.ts +1 -1
  6. package/dist/{chunk-6DVWMJ3H.mjs → chunk-2EFVMX6V.mjs} +3 -3
  7. package/dist/{chunk-6ZJCK6KH.js → chunk-375DECW4.js} +31 -31
  8. package/dist/{chunk-PZRI43EZ.js → chunk-46JYKBRX.js} +0 -43
  9. package/dist/chunk-5D55OVD5.js +75 -0
  10. package/dist/{chunk-JORVSG52.js → chunk-663CFAHS.js} +211 -269
  11. package/dist/chunk-6HKJDV43.mjs +48 -0
  12. package/dist/chunk-6NCRGHV3.mjs +64 -0
  13. package/dist/{chunk-OLAAXLXY.mjs → chunk-6QAKQG57.mjs} +4 -4
  14. package/dist/{chunk-N6AFNFZR.mjs → chunk-7ERVZXIN.mjs} +214 -270
  15. package/dist/chunk-APFEP5B7.mjs +100 -0
  16. package/dist/chunk-C3OADNSG.js +348 -0
  17. package/dist/{chunk-GIJQE3JR.js → chunk-DH5Z3ETN.js} +66 -45
  18. package/dist/chunk-DYWZ23QT.mjs +90 -0
  19. package/dist/{chunk-DTVWRRFN.mjs → chunk-E67IR6HU.mjs} +30 -9
  20. package/dist/{chunk-OVNLC5RD.mjs → chunk-EXQSWHLD.mjs} +6 -6
  21. package/dist/{chunk-ZOA7B32D.js → chunk-F35KL6TX.js} +9 -9
  22. package/dist/{chunk-YSLD2HLP.mjs → chunk-FFJC66KO.mjs} +1 -1
  23. package/dist/{chunk-MPZFPU4X.js → chunk-GMBLPQ3I.js} +3 -3
  24. package/dist/chunk-IJFPPLQW.js +50 -0
  25. package/dist/{chunk-BMFQG6RA.mjs → chunk-KJIX6V32.mjs} +107 -1885
  26. package/dist/chunk-LABHD4PU.js +109 -0
  27. package/dist/{chunk-GAIQJCAZ.js → chunk-LT5VD4KR.js} +149 -1953
  28. package/dist/{chunk-7DHKQODW.mjs → chunk-LTLCIRZY.mjs} +256 -474
  29. package/dist/chunk-N5BHXWR3.mjs +34 -0
  30. package/dist/chunk-OCO3Z5YA.js +37 -0
  31. package/dist/chunk-OIJ7XMDV.mjs +71 -0
  32. package/dist/chunk-ORBH4IBC.mjs +316 -0
  33. package/dist/chunk-OWWOAYIY.js +2652 -0
  34. package/dist/chunk-PFHOXDSW.mjs +10 -0
  35. package/dist/chunk-QRS7DJGS.js +103 -0
  36. package/dist/{chunk-NXPEJ2UR.mjs → chunk-R3X4B4JJ.mjs} +53 -6
  37. package/dist/chunk-RM7ACPTM.mjs +2601 -0
  38. package/dist/chunk-RODSGPBB.mjs +75 -0
  39. package/dist/{chunk-T6ZBA6VJ.js → chunk-UHAV34YX.js} +8 -8
  40. package/dist/{chunk-GUSTCU2W.mjs → chunk-ULANYJ7Y.mjs} +1 -59
  41. package/dist/chunk-ULDE7QSN.js +70 -0
  42. package/dist/chunk-UT36VNVZ.mjs +47 -0
  43. package/dist/chunk-UY3H4PKB.js +71 -0
  44. package/dist/{chunk-KB7UXIQZ.mjs → chunk-VIVWFQG5.mjs} +2 -1
  45. package/dist/{chunk-ESZ7CBA2.js → chunk-VKBJ3SGT.js} +6 -5
  46. package/dist/{chunk-UM7WMXIU.js → chunk-W3YOQ5ZD.js} +264 -505
  47. package/dist/{chunk-GHOFYK2E.js → chunk-XGJL6DLV.js} +55 -5
  48. package/dist/chunk-YRIBFIQ5.js +116 -0
  49. package/dist/chunk-ZWWJ3RRA.js +15 -0
  50. package/dist/data-grid.d.cts +241 -0
  51. package/dist/data-grid.d.ts +241 -0
  52. package/dist/data-grid.js +6486 -0
  53. package/dist/data-grid.mjs +6459 -0
  54. package/dist/data-table-CDQBo-Ve.d.ts +818 -0
  55. package/dist/data-table-jLzt6plY.d.cts +818 -0
  56. package/dist/data-table.d.cts +8 -42
  57. package/dist/data-table.d.ts +8 -42
  58. package/dist/data-table.js +61 -187
  59. package/dist/data-table.mjs +11 -5
  60. package/dist/finance.d.cts +534 -0
  61. package/dist/finance.d.ts +534 -0
  62. package/dist/finance.js +188 -0
  63. package/dist/finance.mjs +15 -0
  64. package/dist/forms.js +9 -6
  65. package/dist/forms.mjs +7 -4
  66. package/dist/{hooks-B2jU1GVT.d.ts → hooks-A55E0fgf.d.ts} +3 -2
  67. package/dist/{hooks-8ORd7T1A.d.cts → hooks-Bys_AZPI.d.cts} +3 -2
  68. package/dist/hooks.d.cts +1 -1
  69. package/dist/hooks.d.ts +1 -1
  70. package/dist/hooks.js +26 -23
  71. package/dist/hooks.mjs +6 -3
  72. package/dist/index.d.cts +536 -665
  73. package/dist/index.d.ts +536 -665
  74. package/dist/index.js +3829 -3408
  75. package/dist/index.mjs +2067 -1767
  76. package/dist/layouts.js +25 -25
  77. package/dist/layouts.mjs +4 -4
  78. package/dist/marketing.js +74 -74
  79. package/dist/marketing.mjs +4 -4
  80. package/dist/navigation.js +28 -28
  81. package/dist/navigation.mjs +6 -6
  82. package/dist/primitives.d.cts +72 -109
  83. package/dist/primitives.d.ts +72 -109
  84. package/dist/primitives.js +78 -72
  85. package/dist/primitives.mjs +8 -6
  86. package/dist/settings.js +9 -9
  87. package/dist/settings.mjs +4 -4
  88. package/package.json +17 -1
  89. package/dist/UnifiedTableControls-CG299y9h.d.ts +0 -1233
  90. package/dist/UnifiedTableControls-CIjRpNhy.d.cts +0 -1233
  91. package/dist/chunk-GMBGWOCR.mjs +0 -49
  92. package/dist/chunk-HBLKVQIQ.mjs +0 -23
  93. package/dist/chunk-HMAMMC72.js +0 -26
  94. package/dist/chunk-MVYRNJA6.js +0 -75
  95. /package/dist/{chunk-RVEFPVZF.mjs → chunk-C57MX3BG.mjs} +0 -0
  96. /package/dist/{chunk-C4UT5V3P.js → chunk-OWHI5VGJ.js} +0 -0
@@ -0,0 +1,534 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import * as React from 'react';
3
+ import { ReactNode } from 'react';
4
+ import { l as PeriodGranularity, C as ComparisonMode, c as FinancialStatementEntry, T as TimeUnit } from './FinancialStatementTable-BNUrdTU4.cjs';
5
+ export { B as BALANCE_SHEET_CONFIG, a as ComparisonSelector, b as ComparisonSelectorProps, F as FinancialStatementConfig, d as FinancialStatementKind, e as FinancialStatementRowImportance, f as FinancialStatementRowImportanceResolver, g as FinancialStatementSection, h as FinancialStatementTable, i as FinancialStatementTableProps, j as FinancialStatementTotal, k as FlatExportRow, I as INCOME_STATEMENT_CONFIG, P as PeriodColumnOrder, m as PeriodSelector, n as PeriodSelectorChangeParams, o as PeriodSelectorProps, S as StatementRow, p as SubtotalRule, q as SubtotalRulesConfig, r as buildFinancialStatementData, s as calculateDesktopFinancialColumnSizing, t as createFinancialStatementRowImportanceResolver, u as flattenStatementForExport, v as getFinancialStatementRowImportanceClassName, w as resolvePeriodColumns } from './FinancialStatementTable-BNUrdTU4.cjs';
6
+
7
+ interface ChartTooltipShellProps {
8
+ children: React.ReactNode;
9
+ className?: string;
10
+ }
11
+ /**
12
+ * Container shell for chart tooltips. Use as a wrapper for both recharts
13
+ * custom tooltip content and Radix tooltip content.
14
+ */
15
+ declare function ChartTooltipShell({ children, className, }: ChartTooltipShellProps): react_jsx_runtime.JSX.Element;
16
+ interface ChartTooltipTitleProps {
17
+ children: React.ReactNode;
18
+ }
19
+ /** Muted title line at the top of a tooltip. */
20
+ declare function ChartTooltipTitle({ children }: ChartTooltipTitleProps): react_jsx_runtime.JSX.Element;
21
+ interface ChartTooltipRowProps {
22
+ /** Dot color */
23
+ color: string;
24
+ /** Label text */
25
+ label: string;
26
+ /** Formatted value */
27
+ value: string;
28
+ /** Whether the value is negative (applies destructive color) */
29
+ isNegative?: boolean;
30
+ }
31
+ /** Single metric row: colored dot + label + right-aligned value. */
32
+ declare function ChartTooltipRow({ color, label, value, isNegative, }: ChartTooltipRowProps): react_jsx_runtime.JSX.Element;
33
+
34
+ type DisplayUnits = "actuals" | "thousands" | "millions";
35
+ type CurrencySignDisplay = "none" | "summary" | "all";
36
+ interface FinanceDisplayContextValue {
37
+ decimals: number;
38
+ displayUnits: DisplayUnits;
39
+ currencySignDisplay: CurrencySignDisplay;
40
+ }
41
+ /**
42
+ * Provider for global finance display settings (decimals + units).
43
+ *
44
+ * @example
45
+ * ```tsx
46
+ * <FinanceDisplayProvider decimals={0} displayUnits="thousands">
47
+ * <IncomeStatement />
48
+ * </FinanceDisplayProvider>
49
+ * ```
50
+ */
51
+ declare function FinanceDisplayProvider({ decimals, displayUnits, currencySignDisplay, children, }: {
52
+ decimals: number;
53
+ displayUnits?: DisplayUnits;
54
+ currencySignDisplay?: CurrencySignDisplay;
55
+ children: React.ReactNode;
56
+ }): react_jsx_runtime.JSX.Element;
57
+ /**
58
+ * @deprecated Use FinanceDisplayProvider instead
59
+ */
60
+ declare function FinanceDecimalsProvider({ decimals, children, }: {
61
+ decimals: number;
62
+ children: React.ReactNode;
63
+ }): react_jsx_runtime.JSX.Element;
64
+ /** Read the current finance decimal places setting (default: 0) */
65
+ declare function useFinanceDecimals(): number;
66
+ /** Read the full finance display context (decimals + units) */
67
+ declare function useFinanceDisplay(): FinanceDisplayContextValue;
68
+ /** Get the divisor for display units */
69
+ declare function getUnitDivisor(units: DisplayUnits): number;
70
+ /** Get the unit suffix label */
71
+ declare function getUnitLabel(units: DisplayUnits): string | null;
72
+ /** Get the short unit suffix */
73
+ declare function getUnitSuffix(units: DisplayUnits): string | null;
74
+ /**
75
+ * Hook to persist finance decimal places in localStorage.
76
+ * Returns [decimals, setDecimals].
77
+ */
78
+ declare function useFinanceDecimalsSetting(storageKey?: string, defaultValue?: number): [number, (v: number) => void];
79
+ interface DataTableCurrencyCellProps {
80
+ /** The numeric value to display */
81
+ value: number | null | undefined;
82
+ /** Currency code (default: "USD") */
83
+ currency?: string;
84
+ /** Locale (default: "en-US") */
85
+ locale?: string;
86
+ /** Show dash for zero values (default: false) */
87
+ dashZero?: boolean;
88
+ /** Number of decimal places (default: 2) */
89
+ decimals?: number;
90
+ /** Additional className */
91
+ className?: string;
92
+ }
93
+ /**
94
+ * Format a currency value for display in a DataTable cell.
95
+ *
96
+ * - Negative values rendered in accounting format: `($1,234.56)` in red
97
+ * - Zero values optionally rendered as `—`
98
+ * - Monospace tabular-nums for alignment
99
+ */
100
+ declare function formatCurrencyValue(value: number | null | undefined, options?: {
101
+ currency?: string;
102
+ locale?: string;
103
+ dashZero?: boolean;
104
+ decimals?: number;
105
+ displayUnits?: DisplayUnits;
106
+ showCurrencySign?: boolean;
107
+ }): {
108
+ text: string;
109
+ isNegative: boolean;
110
+ isZero: boolean;
111
+ };
112
+ /**
113
+ * Currency cell component for DataTable.
114
+ *
115
+ * - Negative values: red text in accounting format `($1,234.56)`
116
+ * - Zero values: optional dash display
117
+ * - Monospace tabular-nums for column alignment
118
+ */
119
+ declare function DataTableCurrencyCell({ value, currency: currencyCode, locale, dashZero, decimals, className,
120
+ /** Whether this cell is in a summary/total row */
121
+ isSummaryRow, }: DataTableCurrencyCellProps & {
122
+ isSummaryRow?: boolean;
123
+ }): react_jsx_runtime.JSX.Element;
124
+
125
+ /** A single configurable setting for the data table */
126
+ interface DataTableSettingDef {
127
+ /** Unique identifier */
128
+ id: string;
129
+ /** Display label */
130
+ label: string;
131
+ /** Setting type */
132
+ type: "boolean";
133
+ /** Default value */
134
+ defaultValue: boolean;
135
+ }
136
+ interface DataTableSettingsProps {
137
+ /** Setting definitions */
138
+ settings: DataTableSettingDef[];
139
+ /** Current values (managed externally via useDataTableSettings) */
140
+ values: Record<string, unknown>;
141
+ /** Callback when a setting changes */
142
+ onChange: (id: string, value: unknown) => void;
143
+ /** Optional className */
144
+ className?: string;
145
+ }
146
+ /**
147
+ * Hook that manages DataTable settings with localStorage persistence.
148
+ *
149
+ * @param tableId - Unique table identifier for storage key
150
+ * @param settings - Array of setting definitions with defaults
151
+ * @returns { values, onChange, getSetting } - Current values and change handler
152
+ */
153
+ declare function useDataTableSettings(tableId: string, settings: DataTableSettingDef[]): {
154
+ values: Record<string, unknown>;
155
+ onChange: (id: string, value: unknown) => void;
156
+ getSetting: <T = unknown>(id: string) => T;
157
+ };
158
+ /**
159
+ * Settings button (cog icon) with popover for configurable DataTable settings.
160
+ * Styled consistently with other DataTable topper buttons (ghost-icon).
161
+ */
162
+ declare function DataTableSettings({ settings, values, onChange, className, }: DataTableSettingsProps): react_jsx_runtime.JSX.Element | null;
163
+
164
+ interface FilterOption {
165
+ id: string;
166
+ name: string;
167
+ }
168
+ interface FinancialStatementControlsProps {
169
+ granularity: PeriodGranularity;
170
+ periodStart: string;
171
+ periodEnd: string;
172
+ fiscalYearEndMonth?: number;
173
+ comparisonMode: ComparisonMode;
174
+ comparisonPeriods: number;
175
+ comparisonCustomStart?: string;
176
+ comparisonCustomEnd?: string;
177
+ selectedClass: string;
178
+ selectedDepartment: string;
179
+ classes: FilterOption[];
180
+ departments: FilterOption[];
181
+ isLoading: boolean;
182
+ mobileFiltersOpen: boolean;
183
+ periodChipLabel: string;
184
+ comparisonChipLabel: string;
185
+ activeFilterCount: number;
186
+ hideZeroRows: boolean;
187
+ showRowTotals: boolean;
188
+ mobilePeriodLabel: string;
189
+ mobileCompareLabel?: string;
190
+ hasMobilePrev: boolean;
191
+ hasMobileNext: boolean;
192
+ mobileCompareEnabled: boolean;
193
+ hasMobileComparisonCandidate: boolean;
194
+ onPeriodChange: (params: {
195
+ granularity: PeriodGranularity;
196
+ periodStart: string;
197
+ periodEnd: string;
198
+ timeUnit: "month" | "quarter" | "year";
199
+ }) => void;
200
+ onComparisonChange: (params: {
201
+ mode: ComparisonMode;
202
+ periods: number;
203
+ customStart?: string;
204
+ customEnd?: string;
205
+ }) => void;
206
+ onClassChange: (value: string) => void;
207
+ onDepartmentChange: (value: string) => void;
208
+ onMobileFiltersOpenChange: (open: boolean) => void;
209
+ onResetFilters: () => void;
210
+ onApplyFilters: () => void;
211
+ onExport: (format: "csv" | "excel") => void;
212
+ onHideZeroRowsChange: (checked: boolean) => void;
213
+ onShowRowTotalsChange: (checked: boolean) => void;
214
+ onMobilePrev: () => void;
215
+ onMobileNext: () => void;
216
+ onMobileCompareChange: (enabled: boolean) => void;
217
+ classIcon?: ReactNode;
218
+ departmentIcon?: ReactNode;
219
+ exportIcon?: ReactNode;
220
+ settingsIcon?: ReactNode;
221
+ csvIcon?: ReactNode;
222
+ excelIcon?: ReactNode;
223
+ periodControl?: ReactNode;
224
+ mobilePeriodControl?: ReactNode;
225
+ showComparison?: boolean;
226
+ showSettings?: boolean;
227
+ showMobilePeriodStepper?: boolean;
228
+ }
229
+ declare function FinancialStatementControls({ granularity, periodStart, periodEnd, fiscalYearEndMonth, comparisonMode, comparisonPeriods, comparisonCustomStart, comparisonCustomEnd, selectedClass, selectedDepartment, classes, departments, isLoading: _isLoading, mobileFiltersOpen, periodChipLabel, comparisonChipLabel, activeFilterCount, hideZeroRows, showRowTotals, mobilePeriodLabel, mobileCompareLabel, hasMobilePrev, hasMobileNext, mobileCompareEnabled, hasMobileComparisonCandidate, onPeriodChange, onComparisonChange, onClassChange, onDepartmentChange, onMobileFiltersOpenChange, onResetFilters, onApplyFilters, onExport, onHideZeroRowsChange, onShowRowTotalsChange, onMobilePrev, onMobileNext, onMobileCompareChange, classIcon, departmentIcon, exportIcon, settingsIcon, csvIcon, excelIcon, periodControl, mobilePeriodControl, showComparison, showSettings, showMobilePeriodStepper, }: FinancialStatementControlsProps): react_jsx_runtime.JSX.Element;
230
+
231
+ type MetricValueDisplayFormat = "currency" | "number" | "percent" | "multiple" | "bps";
232
+ interface MetricValueDisplayOptions {
233
+ /** Base format type */
234
+ format?: MetricValueDisplayFormat;
235
+ /** Decimal places override */
236
+ decimalPlaces?: number;
237
+ /** Optional post-format pipe (e.g. add unit labels like " days") */
238
+ valuePipe?: (formatted: string, value: number) => string;
239
+ /** Optional rich post-format pipe for card display (e.g. muted unit suffix) */
240
+ valuePipeNode?: (formatted: string, value: number) => React.ReactNode;
241
+ }
242
+ interface FinancialMetric {
243
+ /** Unique key */
244
+ key: string;
245
+ /** Display label */
246
+ label: string;
247
+ /** Which account classes to sum (e.g. ["Revenue"]) */
248
+ accountClasses: string[];
249
+ /** Color for the chart (CSS variable or hex) */
250
+ color: string;
251
+ /** Sign multiplier (default 1) — use -1 to flip sign (e.g. expenses shown positive) */
252
+ sign?: number;
253
+ /** Display settings for stat card values */
254
+ valueDisplay?: MetricValueDisplayOptions;
255
+ }
256
+ interface ComputedMetric {
257
+ /** Unique key */
258
+ key: string;
259
+ /** Display label */
260
+ label: string;
261
+ /** Formula: array of metric keys, prefix with "-" to subtract */
262
+ formula: string[];
263
+ /** Color */
264
+ color: string;
265
+ /** Chart type override for this metric */
266
+ chartType?: "line" | "bar" | "area";
267
+ /** Whether to show as dashed line */
268
+ dashed?: boolean;
269
+ /** Display settings for stat card values */
270
+ valueDisplay?: MetricValueDisplayOptions;
271
+ }
272
+ type ChartVariant = "area" | "bar" | "line" | "pie";
273
+ interface FinancialSummaryChartSeries {
274
+ key: string;
275
+ label: string;
276
+ color: string;
277
+ chartType?: "line" | "bar" | "area";
278
+ dashed?: boolean;
279
+ valueDisplay?: MetricValueDisplayOptions;
280
+ }
281
+ interface FinancialSummaryChartDataOptions {
282
+ value: string;
283
+ onChange: (value: string) => void;
284
+ options: Array<{
285
+ value: string;
286
+ label: string;
287
+ }>;
288
+ }
289
+ interface FinancialSummaryChartConfig {
290
+ /** Chart display units independent of statement/table unit setting (default: "auto") */
291
+ chartDisplayUnits?: DisplayUnits | "auto";
292
+ /** Optional metric keys to include in pie slices (default: all summary cards) */
293
+ pieSliceKeys?: string[];
294
+ /** Optional metric keys to render as stat cards (default: all summary cards) */
295
+ statCardKeys?: string[];
296
+ /** Enable summary-card flip-to-sparkline interaction (default: true) */
297
+ enableCardFlip?: boolean;
298
+ /** Metrics derived directly from account data */
299
+ metrics: FinancialMetric[];
300
+ /** Computed metrics (e.g. net income = revenue - expenses) */
301
+ computedMetrics?: ComputedMetric[];
302
+ /** Chart type (default: "area") */
303
+ chartType?: ChartVariant;
304
+ /** Optional chart type choices shown in UI */
305
+ chartTypes?: ChartVariant[];
306
+ /** Height in pixels (default: 260) */
307
+ height?: number;
308
+ /** Whether to show the zero reference line */
309
+ showZeroLine?: boolean;
310
+ /** Whether chart starts expanded (default: desktop=true, mobile=false) */
311
+ defaultExpanded?: boolean;
312
+ /** Title for the chart section */
313
+ title?: string;
314
+ /** Standardized data selector shown on the right side of chart controls */
315
+ dataOptions?: FinancialSummaryChartDataOptions;
316
+ /** Extra controls rendered alongside chart controls (legacy/custom) */
317
+ chartControls?: React.ReactNode;
318
+ /** Render override for chart area; receives active chart type, chart data, derived series, and height */
319
+ renderChart?: (chartType: ChartVariant, data: Record<string, unknown>[], series: FinancialSummaryChartSeries[], height: number) => React.ReactNode;
320
+ /** How stat card values are computed: sum all periods (default) or latest period only */
321
+ statValueMode?: "sum" | "latest";
322
+ /** How period chip is shown on cards */
323
+ statPeriodMode?: "label" | "asOfLatest";
324
+ /** Optional prior-period label (e.g. 01/25) shown in summary card hover title */
325
+ priorPeriodLabel?: string;
326
+ }
327
+ declare const INCOME_STATEMENT_CHART_CONFIG: FinancialSummaryChartConfig;
328
+ declare const CASH_FLOW_CHART_CONFIG: FinancialSummaryChartConfig;
329
+ interface FinancialSummaryChartProps {
330
+ /** Raw financial data (same as table) */
331
+ data: FinancialStatementEntry[];
332
+ /** Time unit for period grouping */
333
+ timeUnit: TimeUnit;
334
+ /** Chart configuration */
335
+ config: FinancialSummaryChartConfig;
336
+ /** Prior period totals for trend comparison — keyed by metric key (e.g. { revenue: 100000, expenses: 80000, netIncome: 20000 }) */
337
+ priorTotals?: Record<string, number>;
338
+ /** Short label for the time period (e.g. "LTM", "YTD", "FY25") — shown on stat cards */
339
+ periodLabel?: string;
340
+ /** Additional class name */
341
+ className?: string;
342
+ }
343
+ declare function FinancialSummaryChart({ data, timeUnit, config, priorTotals: priorTotalsProp, periodLabel: periodLabelProp, className, }: FinancialSummaryChartProps): react_jsx_runtime.JSX.Element;
344
+
345
+ interface MobilePeriodStepperProps {
346
+ periodLabel: string;
347
+ onPrev: () => void;
348
+ onNext: () => void;
349
+ hasPrev: boolean;
350
+ hasNext: boolean;
351
+ compareEnabled: boolean;
352
+ onCompareChange: (enabled: boolean) => void;
353
+ compareLabel?: string;
354
+ compareAvailable?: boolean;
355
+ }
356
+ declare function MobilePeriodStepper({ periodLabel, onPrev, onNext, hasPrev, hasNext, compareEnabled, onCompareChange, compareLabel, compareAvailable, }: MobilePeriodStepperProps): react_jsx_runtime.JSX.Element;
357
+
358
+ interface MobileStatementActionExport {
359
+ label: string;
360
+ icon?: ReactNode;
361
+ onClick: () => void;
362
+ }
363
+ interface MobileStatementActionSetting {
364
+ label: string;
365
+ checked: boolean;
366
+ onCheckedChange: (checked: boolean) => void;
367
+ ariaLabel?: string;
368
+ }
369
+ interface MobileStatementActionsProps {
370
+ exports: MobileStatementActionExport[];
371
+ settings: MobileStatementActionSetting[];
372
+ }
373
+ declare function MobileStatementActions({ exports, settings, }: MobileStatementActionsProps): react_jsx_runtime.JSX.Element;
374
+
375
+ interface MobileStatementFiltersProps {
376
+ open: boolean;
377
+ onOpenChange: (open: boolean) => void;
378
+ periodLabel: string;
379
+ comparisonLabel: string;
380
+ filterCount: number;
381
+ children: ReactNode;
382
+ onReset: () => void;
383
+ onApply: () => void;
384
+ showSummaryChips?: boolean;
385
+ }
386
+ declare function MobileStatementFilters({ open, onOpenChange, periodLabel, comparisonLabel, filterCount, children, onReset, onApply, showSummaryChips, }: MobileStatementFiltersProps): react_jsx_runtime.JSX.Element;
387
+
388
+ interface SummaryMetric {
389
+ /** Unique key */
390
+ key: string;
391
+ /** Display label */
392
+ label: string;
393
+ /** Current total value */
394
+ value: number;
395
+ /** Color (CSS var or hex) */
396
+ color: string;
397
+ /** Trend percentage vs prior period (optional) */
398
+ trend?: number;
399
+ /** Trend description (e.g., "vs prior") */
400
+ trendLabel?: string;
401
+ /** Whether lower is better (flips trend color) */
402
+ invertTrend?: boolean;
403
+ /** Subtitle text */
404
+ subtitle?: string;
405
+ /** Custom display string (overrides default currency formatting) */
406
+ displayValue?: string;
407
+ }
408
+ interface SummaryChartDataPoint {
409
+ /** Period label (e.g., "Jan 25") */
410
+ label: string;
411
+ /** Values keyed by metric key */
412
+ [key: string]: string | number;
413
+ }
414
+ type SummaryChartType = "area" | "bar" | "line" | "pie";
415
+ interface SummaryChartSeries {
416
+ /** Metric key (matches data keys) */
417
+ key: string;
418
+ /** Display label */
419
+ label: string;
420
+ /** Color */
421
+ color: string;
422
+ /** Override chart type for this series */
423
+ chartType?: "line" | "bar" | "area";
424
+ /** Dashed line */
425
+ dashed?: boolean;
426
+ }
427
+ interface SummaryPanelProps {
428
+ /** Title for the panel header */
429
+ title?: string;
430
+ /** Summary metric cards to display */
431
+ metrics: SummaryMetric[];
432
+ /** Chart data points (optional — omit for metrics-only panel) */
433
+ chartData?: SummaryChartDataPoint[];
434
+ /** Chart series configuration */
435
+ chartSeries?: SummaryChartSeries[];
436
+ /** Default chart type */
437
+ chartType?: SummaryChartType;
438
+ /** Available chart types the user can toggle between */
439
+ chartTypes?: SummaryChartType[];
440
+ /** Chart height in px */
441
+ chartHeight?: number;
442
+ /** Show zero reference line */
443
+ showZeroLine?: boolean;
444
+ /** Start expanded */
445
+ defaultExpanded?: boolean;
446
+ /** Format function for Y axis / tooltip values */
447
+ formatValue?: (value: number) => string;
448
+ /** Additional className */
449
+ className?: string;
450
+ /** Render prop for chart — receives (activeChartType, data, series, height). Use when built-in charts don't work in your bundler. */
451
+ renderChart?: (chartType: SummaryChartType, data: SummaryChartDataPoint[], series: SummaryChartSeries[], height: number) => React.ReactNode;
452
+ /** Extra controls to render on the same line as chart type toggles (e.g., data mode dropdown) */
453
+ chartControls?: React.ReactNode;
454
+ }
455
+ declare function AreaLineChart({ data, series, height, showZeroLine, formatFn, }: {
456
+ data: SummaryChartDataPoint[];
457
+ series: SummaryChartSeries[];
458
+ height: number;
459
+ showZeroLine?: boolean;
460
+ formatFn: (v: number) => string;
461
+ }): react_jsx_runtime.JSX.Element;
462
+ declare function ColumnChart({ data, series, height, showZeroLine, formatFn, }: {
463
+ data: SummaryChartDataPoint[];
464
+ series: SummaryChartSeries[];
465
+ height: number;
466
+ showZeroLine?: boolean;
467
+ formatFn: (v: number) => string;
468
+ }): react_jsx_runtime.JSX.Element;
469
+ declare function PieChartView({ metrics, height, formatFn: _formatFn, }: {
470
+ metrics: SummaryMetric[];
471
+ height: number;
472
+ formatFn: (v: number) => string;
473
+ }): react_jsx_runtime.JSX.Element;
474
+
475
+ declare function SummaryPanel({ title, metrics, chartData, chartSeries, chartType: defaultChartType, chartTypes, chartHeight, showZeroLine, defaultExpanded, formatValue, className, renderChart, chartControls, }: SummaryPanelProps): react_jsx_runtime.JSX.Element;
476
+
477
+ declare const unifiedTableControlOrder: readonly ["period", "comparison", "filters", "search", "columns", "export", "settings"];
478
+ type UnifiedTableControlKind = (typeof unifiedTableControlOrder)[number];
479
+ interface UnifiedTableSettingsItem {
480
+ id: string;
481
+ label: string;
482
+ defaultValue: boolean;
483
+ description?: string;
484
+ }
485
+ interface UnifiedTableSettingsControl {
486
+ kind: "settings";
487
+ id?: string;
488
+ items: UnifiedTableSettingsItem[];
489
+ values: Record<string, unknown>;
490
+ onChange: (id: string, value: unknown) => void;
491
+ }
492
+ interface UnifiedTableNodeControlBase {
493
+ id?: string;
494
+ hidden?: boolean;
495
+ desktop: React.ReactNode;
496
+ mobile?: React.ReactNode;
497
+ }
498
+ interface UnifiedTablePeriodControl extends UnifiedTableNodeControlBase {
499
+ kind: "period";
500
+ }
501
+ interface UnifiedTableComparisonControl extends UnifiedTableNodeControlBase {
502
+ kind: "comparison";
503
+ }
504
+ interface UnifiedTableFiltersControl extends UnifiedTableNodeControlBase {
505
+ kind: "filters";
506
+ }
507
+ interface UnifiedTableSearchControl extends UnifiedTableNodeControlBase {
508
+ kind: "search";
509
+ }
510
+ interface UnifiedTableColumnsControl extends UnifiedTableNodeControlBase {
511
+ kind: "columns";
512
+ }
513
+ interface UnifiedTableExportControl extends UnifiedTableNodeControlBase {
514
+ kind: "export";
515
+ }
516
+ type UnifiedTableControl = UnifiedTablePeriodControl | UnifiedTableComparisonControl | UnifiedTableFiltersControl | UnifiedTableSearchControl | UnifiedTableColumnsControl | UnifiedTableExportControl | UnifiedTableSettingsControl;
517
+ declare function normalizeUnifiedTableControls(controls: UnifiedTableControl[]): UnifiedTableControl[];
518
+ declare function createFinanceTableSettingsItems({ hideZeroRowsDefault, showRowTotalsDefault, }?: {
519
+ hideZeroRowsDefault?: boolean;
520
+ showRowTotalsDefault?: boolean;
521
+ }): UnifiedTableSettingsItem[];
522
+ declare function useUnifiedTableSettings(tableId: string, settings: UnifiedTableSettingsItem[]): {
523
+ values: Record<string, unknown>;
524
+ onChange: (id: string, value: unknown) => void;
525
+ getSetting: <T = unknown>(id: string) => T;
526
+ };
527
+
528
+ interface UnifiedTableControlsProps extends React.ComponentProps<"div"> {
529
+ controls: UnifiedTableControl[];
530
+ mobileLabel?: string;
531
+ }
532
+ declare function UnifiedTableControls({ controls, mobileLabel, className, ...props }: UnifiedTableControlsProps): react_jsx_runtime.JSX.Element | null;
533
+
534
+ export { CASH_FLOW_CHART_CONFIG, ChartTooltipRow, ChartTooltipShell, ChartTooltipTitle, type ChartVariant, ComparisonMode, type ComputedMetric, type CurrencySignDisplay, DataTableCurrencyCell, type DataTableCurrencyCellProps, type DataTableSettingDef, DataTableSettings, type DataTableSettingsProps, type DisplayUnits, FinanceDecimalsProvider, FinanceDisplayProvider, type FinancialMetric, FinancialStatementControls, type FinancialStatementControlsProps, FinancialStatementEntry, FinancialSummaryChart, type FinancialSummaryChartConfig, type FinancialSummaryChartProps, type FinancialSummaryChartSeries, INCOME_STATEMENT_CHART_CONFIG, MobilePeriodStepper, type MobilePeriodStepperProps, type MobileStatementActionExport, type MobileStatementActionSetting, MobileStatementActions, type MobileStatementActionsProps, MobileStatementFilters, type MobileStatementFiltersProps, PeriodGranularity, AreaLineChart as SummaryAreaChart, ColumnChart as SummaryBarChart, type SummaryChartDataPoint, type SummaryChartSeries, type SummaryChartType, type SummaryMetric, SummaryPanel, type SummaryPanelProps, PieChartView as SummaryPieChart, TimeUnit, type UnifiedTableControl, type UnifiedTableControlKind, UnifiedTableControls, type UnifiedTableControlsProps, type UnifiedTableSettingsControl, type UnifiedTableSettingsItem, createFinanceTableSettingsItems, formatCurrencyValue, getUnitDivisor, getUnitLabel, getUnitSuffix, normalizeUnifiedTableControls, unifiedTableControlOrder, useDataTableSettings, useFinanceDecimals, useFinanceDecimalsSetting, useFinanceDisplay, useUnifiedTableSettings };