@k2b/ui 0.49.0 → 0.50.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 (265) hide show
  1. package/dist/base.css +40 -2
  2. package/dist/browser/actions/ContextMenu.js +3 -0
  3. package/dist/browser/actions/ContextMenu.js.map +1 -1
  4. package/dist/browser/charts/core/area.js +190 -0
  5. package/dist/browser/charts/core/area.js.map +1 -0
  6. package/dist/browser/charts/core/calendar.js +186 -0
  7. package/dist/browser/charts/core/calendar.js.map +1 -0
  8. package/dist/browser/charts/core/chart-map-data.js +9 -0
  9. package/dist/browser/charts/core/chart-map-data.js.map +1 -0
  10. package/dist/browser/charts/core/index.js +12 -0
  11. package/dist/browser/charts/core/index.js.map +1 -0
  12. package/dist/browser/charts/core/inspection.js +9 -0
  13. package/dist/browser/charts/core/inspection.js.map +1 -0
  14. package/dist/browser/charts/core/registry.js +28 -0
  15. package/dist/browser/charts/core/registry.js.map +1 -0
  16. package/dist/browser/charts/core/render.js +103 -0
  17. package/dist/browser/charts/core/render.js.map +1 -0
  18. package/dist/browser/charts/core/snapshot.js +65 -0
  19. package/dist/browser/charts/core/snapshot.js.map +1 -0
  20. package/dist/browser/charts/core/svg.js +2542 -0
  21. package/dist/browser/charts/core/svg.js.map +1 -0
  22. package/dist/browser/charts/core/termination.test-fixture.js +162 -0
  23. package/dist/browser/charts/core/termination.test-fixture.js.map +1 -0
  24. package/dist/browser/charts/core/text.js +13 -0
  25. package/dist/browser/charts/core/text.js.map +1 -0
  26. package/dist/browser/charts/core/types.js +8 -0
  27. package/dist/browser/charts/core/types.js.map +1 -0
  28. package/dist/browser/charts.js +4 -2
  29. package/dist/browser/charts.js.map +1 -1
  30. package/dist/browser/content/BalanceSummary.js +106 -0
  31. package/dist/browser/content/BalanceSummary.js.map +1 -0
  32. package/dist/browser/content/Chart.js +134 -115
  33. package/dist/browser/content/Chart.js.map +1 -1
  34. package/dist/browser/content/ChartExplorer.js +366 -122
  35. package/dist/browser/content/ChartExplorer.js.map +1 -1
  36. package/dist/browser/content/ChartSnapshotView.js +16 -9
  37. package/dist/browser/content/ChartSnapshotView.js.map +1 -1
  38. package/dist/browser/content/DataTable.js +676 -293
  39. package/dist/browser/content/DataTable.js.map +1 -1
  40. package/dist/browser/content/DataTableTools.js +119 -0
  41. package/dist/browser/content/DataTableTools.js.map +1 -0
  42. package/dist/browser/content/FlowAmount.js +82 -0
  43. package/dist/browser/content/FlowAmount.js.map +1 -0
  44. package/dist/browser/content/balance-summary-messages.js +26 -0
  45. package/dist/browser/content/balance-summary-messages.js.map +1 -0
  46. package/dist/browser/content/chart-bar.js +6 -6
  47. package/dist/browser/content/chart-bar.js.map +1 -1
  48. package/dist/browser/content/chart-calendar.js +43 -0
  49. package/dist/browser/content/chart-calendar.js.map +1 -0
  50. package/dist/browser/content/chart-inspection-core.js +164 -37
  51. package/dist/browser/content/chart-inspection-core.js.map +1 -1
  52. package/dist/browser/content/chart-inspection.js.map +1 -1
  53. package/dist/browser/content/chart-line-gaps.js +2 -2
  54. package/dist/browser/content/chart-line-gaps.js.map +1 -1
  55. package/dist/browser/content/chart-map-viewport.js.map +1 -1
  56. package/dist/browser/content/chart-message-catalog.js +164 -0
  57. package/dist/browser/content/chart-message-catalog.js.map +1 -0
  58. package/dist/browser/content/chart-messages.js +2 -138
  59. package/dist/browser/content/chart-messages.js.map +1 -1
  60. package/dist/browser/content/chart-snapshot.js +1 -62
  61. package/dist/browser/content/chart-snapshot.js.map +1 -1
  62. package/dist/browser/content/chart-state-timeline.js +1 -1
  63. package/dist/browser/content/chart-state-timeline.js.map +1 -1
  64. package/dist/browser/content/chart-svg.js +2 -1
  65. package/dist/browser/content/chart-svg.js.map +1 -1
  66. package/dist/browser/content/chart-time-axis.js +139 -0
  67. package/dist/browser/content/chart-time-axis.js.map +1 -0
  68. package/dist/browser/content/data-table-columns.js +160 -0
  69. package/dist/browser/content/data-table-columns.js.map +1 -0
  70. package/dist/browser/content/data-table-messages.js +38 -2
  71. package/dist/browser/content/data-table-messages.js.map +1 -1
  72. package/dist/browser/content/flow-amount-messages.js +26 -0
  73. package/dist/browser/content/flow-amount-messages.js.map +1 -0
  74. package/dist/browser/content/index.js +4 -0
  75. package/dist/browser/content/index.js.map +1 -1
  76. package/dist/browser/inputs/DatePicker.js +5 -4
  77. package/dist/browser/inputs/DatePicker.js.map +1 -1
  78. package/dist/browser/inputs/SelectChip.js +50 -17
  79. package/dist/browser/inputs/SelectChip.js.map +1 -1
  80. package/dist/browser/inputs/date-picker.js +13 -0
  81. package/dist/browser/inputs/date-picker.js.map +1 -1
  82. package/dist/browser/intl/Format.js +31 -8
  83. package/dist/browser/intl/Format.js.map +1 -1
  84. package/dist/browser/layout/AppWorkspace.js +7 -1
  85. package/dist/browser/layout/AppWorkspace.js.map +1 -1
  86. package/dist/browser/surfaces/BudgetList.js +281 -0
  87. package/dist/browser/surfaces/BudgetList.js.map +1 -0
  88. package/dist/browser/surfaces/ProgressBar.js +134 -21
  89. package/dist/browser/surfaces/ProgressBar.js.map +1 -1
  90. package/dist/browser/surfaces/StatCell.js +320 -144
  91. package/dist/browser/surfaces/StatCell.js.map +1 -1
  92. package/dist/browser/surfaces/StatGrid.js +75 -57
  93. package/dist/browser/surfaces/StatGrid.js.map +1 -1
  94. package/dist/browser/surfaces/budget-messages.js +64 -0
  95. package/dist/browser/surfaces/budget-messages.js.map +1 -0
  96. package/dist/browser/surfaces/delta-badge.js +65 -0
  97. package/dist/browser/surfaces/delta-badge.js.map +1 -0
  98. package/dist/browser/surfaces/index.js +2 -1
  99. package/dist/browser/surfaces/index.js.map +1 -1
  100. package/dist/browser/surfaces/person-color.js +2 -2
  101. package/dist/browser/surfaces/person-color.js.map +1 -1
  102. package/dist/browser/surfaces/stat-cell-messages.js +41 -0
  103. package/dist/browser/surfaces/stat-cell-messages.js.map +1 -0
  104. package/dist/browser/widgets/Dashboard.js +137 -0
  105. package/dist/browser/widgets/Dashboard.js.map +1 -0
  106. package/dist/browser/widgets/index.js +1 -0
  107. package/dist/browser/widgets/index.js.map +1 -1
  108. package/dist/ssr/actions/ContextMenu.js +3 -0
  109. package/dist/ssr/actions/ContextMenu.js.map +1 -1
  110. package/dist/ssr/charts/core/area.js +190 -0
  111. package/dist/ssr/charts/core/area.js.map +1 -0
  112. package/dist/ssr/charts/core/calendar.js +186 -0
  113. package/dist/ssr/charts/core/calendar.js.map +1 -0
  114. package/dist/ssr/charts/core/chart-map-data.js +9 -0
  115. package/dist/ssr/charts/core/chart-map-data.js.map +1 -0
  116. package/dist/ssr/charts/core/index.js +12 -0
  117. package/dist/ssr/charts/core/index.js.map +1 -0
  118. package/dist/ssr/charts/core/inspection.js +9 -0
  119. package/dist/ssr/charts/core/inspection.js.map +1 -0
  120. package/dist/ssr/charts/core/registry.js +28 -0
  121. package/dist/ssr/charts/core/registry.js.map +1 -0
  122. package/dist/ssr/charts/core/render.js +103 -0
  123. package/dist/ssr/charts/core/render.js.map +1 -0
  124. package/dist/ssr/charts/core/snapshot.js +65 -0
  125. package/dist/ssr/charts/core/snapshot.js.map +1 -0
  126. package/dist/ssr/charts/core/svg.js +2542 -0
  127. package/dist/ssr/charts/core/svg.js.map +1 -0
  128. package/dist/ssr/charts/core/termination.test-fixture.js +162 -0
  129. package/dist/ssr/charts/core/termination.test-fixture.js.map +1 -0
  130. package/dist/ssr/charts/core/text.js +13 -0
  131. package/dist/ssr/charts/core/text.js.map +1 -0
  132. package/dist/ssr/charts/core/types.js +8 -0
  133. package/dist/ssr/charts/core/types.js.map +1 -0
  134. package/dist/ssr/charts.js +4 -2
  135. package/dist/ssr/charts.js.map +1 -1
  136. package/dist/ssr/content/BalanceSummary.js +75 -0
  137. package/dist/ssr/content/BalanceSummary.js.map +1 -0
  138. package/dist/ssr/content/Chart.js +90 -95
  139. package/dist/ssr/content/Chart.js.map +1 -1
  140. package/dist/ssr/content/ChartExplorer.js +190 -46
  141. package/dist/ssr/content/ChartExplorer.js.map +1 -1
  142. package/dist/ssr/content/ChartSnapshotView.js +5 -1
  143. package/dist/ssr/content/ChartSnapshotView.js.map +1 -1
  144. package/dist/ssr/content/DataTable.js +287 -78
  145. package/dist/ssr/content/DataTable.js.map +1 -1
  146. package/dist/ssr/content/DataTableTools.js +106 -0
  147. package/dist/ssr/content/DataTableTools.js.map +1 -0
  148. package/dist/ssr/content/FlowAmount.js +58 -0
  149. package/dist/ssr/content/FlowAmount.js.map +1 -0
  150. package/dist/ssr/content/balance-summary-messages.js +26 -0
  151. package/dist/ssr/content/balance-summary-messages.js.map +1 -0
  152. package/dist/ssr/content/chart-bar.js +6 -6
  153. package/dist/ssr/content/chart-bar.js.map +1 -1
  154. package/dist/ssr/content/chart-calendar.js +43 -0
  155. package/dist/ssr/content/chart-calendar.js.map +1 -0
  156. package/dist/ssr/content/chart-inspection-core.js +164 -37
  157. package/dist/ssr/content/chart-inspection-core.js.map +1 -1
  158. package/dist/ssr/content/chart-inspection.js.map +1 -1
  159. package/dist/ssr/content/chart-line-gaps.js +2 -2
  160. package/dist/ssr/content/chart-line-gaps.js.map +1 -1
  161. package/dist/ssr/content/chart-map-viewport.js.map +1 -1
  162. package/dist/ssr/content/chart-message-catalog.js +164 -0
  163. package/dist/ssr/content/chart-message-catalog.js.map +1 -0
  164. package/dist/ssr/content/chart-messages.js +2 -138
  165. package/dist/ssr/content/chart-messages.js.map +1 -1
  166. package/dist/ssr/content/chart-snapshot.js +1 -62
  167. package/dist/ssr/content/chart-snapshot.js.map +1 -1
  168. package/dist/ssr/content/chart-state-timeline.js +1 -1
  169. package/dist/ssr/content/chart-state-timeline.js.map +1 -1
  170. package/dist/ssr/content/chart-svg.js +2 -1
  171. package/dist/ssr/content/chart-svg.js.map +1 -1
  172. package/dist/ssr/content/chart-time-axis.js +139 -0
  173. package/dist/ssr/content/chart-time-axis.js.map +1 -0
  174. package/dist/ssr/content/data-table-columns.js +160 -0
  175. package/dist/ssr/content/data-table-columns.js.map +1 -0
  176. package/dist/ssr/content/data-table-messages.js +38 -2
  177. package/dist/ssr/content/data-table-messages.js.map +1 -1
  178. package/dist/ssr/content/flow-amount-messages.js +26 -0
  179. package/dist/ssr/content/flow-amount-messages.js.map +1 -0
  180. package/dist/ssr/content/index.js +4 -0
  181. package/dist/ssr/content/index.js.map +1 -1
  182. package/dist/ssr/inputs/DatePicker.js +5 -4
  183. package/dist/ssr/inputs/DatePicker.js.map +1 -1
  184. package/dist/ssr/inputs/SelectChip.js +26 -9
  185. package/dist/ssr/inputs/SelectChip.js.map +1 -1
  186. package/dist/ssr/inputs/date-picker.js +13 -0
  187. package/dist/ssr/inputs/date-picker.js.map +1 -1
  188. package/dist/ssr/intl/Format.js +22 -2
  189. package/dist/ssr/intl/Format.js.map +1 -1
  190. package/dist/ssr/layout/AppWorkspace.js +7 -1
  191. package/dist/ssr/layout/AppWorkspace.js.map +1 -1
  192. package/dist/ssr/surfaces/BudgetList.js +170 -0
  193. package/dist/ssr/surfaces/BudgetList.js.map +1 -0
  194. package/dist/ssr/surfaces/ProgressBar.js +96 -5
  195. package/dist/ssr/surfaces/ProgressBar.js.map +1 -1
  196. package/dist/ssr/surfaces/StatCell.js +157 -51
  197. package/dist/ssr/surfaces/StatCell.js.map +1 -1
  198. package/dist/ssr/surfaces/StatGrid.js +24 -35
  199. package/dist/ssr/surfaces/StatGrid.js.map +1 -1
  200. package/dist/ssr/surfaces/budget-messages.js +64 -0
  201. package/dist/ssr/surfaces/budget-messages.js.map +1 -0
  202. package/dist/ssr/surfaces/delta-badge.js +41 -0
  203. package/dist/ssr/surfaces/delta-badge.js.map +1 -0
  204. package/dist/ssr/surfaces/index.js +2 -1
  205. package/dist/ssr/surfaces/index.js.map +1 -1
  206. package/dist/ssr/surfaces/person-color.js +2 -2
  207. package/dist/ssr/surfaces/person-color.js.map +1 -1
  208. package/dist/ssr/surfaces/stat-cell-messages.js +41 -0
  209. package/dist/ssr/surfaces/stat-cell-messages.js.map +1 -0
  210. package/dist/ssr/widgets/Dashboard.js +84 -0
  211. package/dist/ssr/widgets/Dashboard.js.map +1 -0
  212. package/dist/ssr/widgets/index.js +1 -0
  213. package/dist/ssr/widgets/index.js.map +1 -1
  214. package/dist/styles.css +1 -1
  215. package/dist/types/charts/core/area.d.ts +62 -0
  216. package/dist/types/charts/core/calendar.d.ts +57 -0
  217. package/dist/types/charts/core/chart-map-data.d.ts +3 -0
  218. package/dist/types/charts/core/index.d.ts +11 -0
  219. package/dist/types/charts/core/inspection.d.ts +16 -0
  220. package/dist/types/charts/core/registry.d.ts +27 -0
  221. package/dist/types/charts/core/render.d.ts +40 -0
  222. package/dist/types/charts/core/snapshot.d.ts +27 -0
  223. package/dist/types/charts/core/svg.d.ts +714 -0
  224. package/dist/types/charts/core/termination.test-fixture.d.ts +1 -0
  225. package/dist/types/charts/core/text.d.ts +5 -0
  226. package/dist/types/charts/core/types.d.ts +31 -0
  227. package/dist/types/charts.d.ts +4 -2
  228. package/dist/types/content/BalanceSummary.d.ts +29 -0
  229. package/dist/types/content/Chart.d.ts +26 -36
  230. package/dist/types/content/ChartExplorer.d.ts +43 -2
  231. package/dist/types/content/ChartSnapshotView.d.ts +1 -0
  232. package/dist/types/content/DataTable.d.ts +28 -0
  233. package/dist/types/content/DataTableTools.d.ts +44 -0
  234. package/dist/types/content/FlowAmount.d.ts +28 -0
  235. package/dist/types/content/balance-summary-messages.d.ts +11 -0
  236. package/dist/types/content/chart-bar.d.ts +1 -1
  237. package/dist/types/content/chart-calendar.d.ts +4 -0
  238. package/dist/types/content/chart-inspection-core.d.ts +21 -16
  239. package/dist/types/content/chart-inspection.d.ts +5 -1
  240. package/dist/types/content/chart-map-viewport.d.ts +1 -1
  241. package/dist/types/content/chart-message-catalog.d.ts +84 -0
  242. package/dist/types/content/chart-messages.d.ts +2 -33
  243. package/dist/types/content/chart-snapshot.d.ts +1 -26
  244. package/dist/types/content/chart-svg.d.ts +1 -1
  245. package/dist/types/content/chart-time-axis.d.ts +26 -0
  246. package/dist/types/content/data-table-columns.d.ts +72 -0
  247. package/dist/types/content/data-table-messages.d.ts +18 -0
  248. package/dist/types/content/flow-amount-messages.d.ts +11 -0
  249. package/dist/types/content/index.d.ts +10 -2
  250. package/dist/types/inputs/SelectChip.d.ts +2 -0
  251. package/dist/types/inputs/date-picker.d.ts +6 -0
  252. package/dist/types/intl/Format.d.ts +5 -0
  253. package/dist/types/layout/AppWorkspace.d.ts +5 -0
  254. package/dist/types/surfaces/BudgetList.d.ts +42 -0
  255. package/dist/types/surfaces/ProgressBar.d.ts +38 -2
  256. package/dist/types/surfaces/StatCell.d.ts +35 -2
  257. package/dist/types/surfaces/StatGrid.d.ts +3 -1
  258. package/dist/types/surfaces/budget-messages.d.ts +30 -0
  259. package/dist/types/surfaces/delta-badge.d.ts +10 -0
  260. package/dist/types/surfaces/index.d.ts +4 -3
  261. package/dist/types/surfaces/person-color.d.ts +2 -2
  262. package/dist/types/surfaces/stat-cell-messages.d.ts +19 -0
  263. package/dist/types/widgets/Dashboard.d.ts +42 -0
  264. package/dist/types/widgets/index.d.ts +1 -0
  265. package/package.json +7 -1
@@ -1,26 +1 @@
1
- import { type ChartDatum } from "@k2b/stdlib";
2
- import { type ChartKind, type ChartRenderOptions } from "./Chart";
3
- import { type ChartSelection, type ChartTooltip, type ChartTooltipFormatter } from "./chart-inspection-core";
4
- /** Trusted output of prepareChartSnapshot; never accept arbitrary user SVG. */
5
- export type ChartSnapshot = {
6
- kind: ChartKind;
7
- svg: string;
8
- width: number;
9
- height: number;
10
- stretch: boolean;
11
- marks: readonly {
12
- key: string;
13
- rowKey: string;
14
- datum: ChartDatum;
15
- tooltip: ChartTooltip;
16
- reference?: boolean;
17
- }[];
18
- };
19
- /** Pure SVG preparation for server or browser. Transfer only this output across SSR boundaries. */
20
- export declare function prepareChartSnapshot(options: ChartRenderOptions, inspection: {
21
- key: (selection: ChartSelection) => string;
22
- /** Defaults to the mark key for one-to-one charts. */
23
- rowKey?: (selection: ChartSelection) => string;
24
- tooltip: ChartTooltipFormatter;
25
- reference?: (selection: ChartSelection) => boolean;
26
- }): ChartSnapshot;
1
+ export { type ChartSnapshot, prepareChartSnapshot } from "../charts/core/snapshot";
@@ -1,4 +1,4 @@
1
- import type { MapViewport } from "@k2b/stdlib";
1
+ import type { MapViewport } from "../charts/core/svg";
2
2
  /** Give maps a CSS-sized viewport while retaining the renderer's projection.
3
3
  * The outer SVG uses pixels for headers/legend; the nested geographic viewport
4
4
  * keeps one fitted scale across zoom levels and clips only at the plot edges.
@@ -0,0 +1,26 @@
1
+ /**
2
+ * A line chart whose X values are instants (Unix milliseconds). Its axis ticks land on round times in `timeZone`:
3
+ * minutes, hours, days, weeks, months, or years, whichever step keeps the requested number of ticks.
4
+ */
5
+ export type ChartTimeAxis = {
6
+ /** IANA zone whose wall clock the ticks follow, such as the zone the data's buckets use. */
7
+ timeZone: string;
8
+ /** Locale of the default tick labels; `xAxis.format` replaces them. Defaults to `en`. */
9
+ locale?: string;
10
+ };
11
+ export type ChartTimeUnit = "minute" | "hour" | "day" | "week" | "month" | "year";
12
+ export type ChartTimeStep = {
13
+ unit: ChartTimeUnit;
14
+ size: number;
15
+ };
16
+ /** The round step for a time span: the finest one that keeps at most `maxTicks` ticks. */
17
+ export declare const chartTimeStep: (span: number, maxTicks: number) => ChartTimeStep;
18
+ /** Tick instants inside `domain` that fall on round wall times of `step` in `timeZone`. */
19
+ export declare const chartTimeTicks: (domain: readonly [number, number], timeZone: string, step: ChartTimeStep) => number[];
20
+ /** Default label of a tick: the clock time, the day at local midnight, the month or the year. */
21
+ export declare const chartTimeLabel: (tick: number, step: ChartTimeStep, axis: ChartTimeAxis) => string;
22
+ /**
23
+ * Replaces the renderer's X tick labels, which sit on decimal millisecond steps, with labels on round times. The
24
+ * renderer drew the X axis over the explicit `domain`, so its horizontal axis line gives the pixel scale.
25
+ */
26
+ export declare function timeAxisSvg(svg: string, domain: readonly [number, number], axis: ChartTimeAxis, maxTicks: number, format?: (value: number) => string): string;
@@ -0,0 +1,72 @@
1
+ import type { StatusTone } from "../surfaces/StatusBadge";
2
+ /**
3
+ * What a column holds. It decides alignment, wrapping, the shown text, search and sort:
4
+ * text wraps; number, amount, bar, flow and delta read right-aligned with equal-width digits; date reads in the
5
+ * reader's language; status shows a badge from `states`.
6
+ */
7
+ export type DataTableColumnType = "text" | "number" | "date" | "status" | "bar" | "amount" | "flow" | "delta";
8
+ /** A number format by name, as a portable description stores it. `decimals` fixes the fraction digits. */
9
+ export type DataTableNumberFormat = {
10
+ style?: "number" | "percent" | "currency";
11
+ /** ISO 4217 code; required for `style: "currency"`, `amount` and `flow`. */
12
+ currency?: string;
13
+ decimals?: number;
14
+ compact?: boolean;
15
+ };
16
+ /** The label and tone of one stored status value. */
17
+ export type DataTableStatusState = {
18
+ label: string;
19
+ tone: StatusTone;
20
+ };
21
+ /** The typed part of a column, independent of how the row stores its values. */
22
+ export type DataTableTypedColumn = {
23
+ type?: DataTableColumnType;
24
+ format?: DataTableNumberFormat;
25
+ /** Labels and tones of a status column, by stored value. */
26
+ states?: Readonly<Record<string, DataTableStatusState>>;
27
+ /** The value a bar column fills its track at; defaults to the largest value in the rows. */
28
+ max?: number;
29
+ /** The IANA zone a date column with a time reads in, such as the zone of the data's owner; defaults to the reader's. */
30
+ timeZone?: string;
31
+ /** How a delta column reads its change: `ratio` (default) `0.082` as `+8.2 %`, `points` `0.031` as `+3.1 pts`; `better` rates it. */
32
+ delta?: {
33
+ unit?: "ratio" | "points";
34
+ better?: "up" | "down";
35
+ };
36
+ };
37
+ export declare const isNumericColumnType: (type?: DataTableColumnType) => boolean;
38
+ /** Formats a number the way a typed column shows it: in the reader's language, by the column's format. */
39
+ export declare const formatTableNumber: (value: number, column: DataTableTypedColumn, locale: string) => string;
40
+ /** A date column reads ISO text, a timestamp or a Date; a day without a time stays that day in every zone. */
41
+ export declare const formatTableDate: (value: unknown, locale: string, timeZone?: string) => string | null;
42
+ /** True when the value is missing: such a cell shows a dash, sorts last and never counts as zero. */
43
+ export declare const isEmptyCell: (value: unknown) => boolean;
44
+ /**
45
+ * The text a typed cell shows, for search, grouping and copied rows. A flow is the amount without its sign, as the
46
+ * arrow says the direction; a delta is its signed change.
47
+ */
48
+ export declare const tableCellText: (value: unknown, column: DataTableTypedColumn, locale: string) => string;
49
+ /** The value a typed column sorts by: numbers by value, dates by time, a status by its label, the rest as text. */
50
+ export declare const tableSortValue: (value: unknown, column: DataTableTypedColumn, locale: string) => number | string | null;
51
+ type Readable<T> = DataTableTypedColumn & {
52
+ id: string;
53
+ value?: keyof T | ((row: T) => unknown);
54
+ };
55
+ export declare const readTableValue: <T>(row: T, column: Readable<T>) => unknown;
56
+ /**
57
+ * The rows any of whose shown values contains the query, ignoring case and accents. An empty query keeps every row.
58
+ * Matches the text a reader sees, so a status matches by its label and an amount as it is formatted.
59
+ */
60
+ export declare const filterRows: <T>(rows: readonly T[], columns: readonly Readable<T>[], query: string, locale: string) => T[];
61
+ /** Rows in the order of one column: values first, missing values last in both directions. */
62
+ export declare const sortRows: <T>(rows: readonly T[], columns: readonly Readable<T>[], sort: {
63
+ key: string;
64
+ direction: "asc" | "desc";
65
+ } | null | undefined, locale: string) => T[];
66
+ /** Rows split by one column, in the order each group first appears; the label is the group's shown value. */
67
+ export declare const groupRows: <T>(rows: readonly T[], column: Readable<T>, locale: string) => {
68
+ key: string;
69
+ label: string;
70
+ rows: T[];
71
+ }[];
72
+ export {};
@@ -3,6 +3,24 @@ declare const dataTableMessages: import("@k2b/stdlib").Catalog<{
3
3
  noColumns: string;
4
4
  noRecords: string;
5
5
  loadingRows: string;
6
+ noMatch: ({ query }: {
7
+ query: string;
8
+ }) => string;
9
+ clearSearch: string;
10
+ details: string;
11
+ showDetails: string;
12
+ rowCount: ({ count }: {
13
+ count: number;
14
+ }) => string;
15
+ search: string;
16
+ searchTable: ({ label }: {
17
+ label: string;
18
+ }) => string;
19
+ groupRows: string;
20
+ notGrouped: string;
21
+ groupedBy: ({ label }: {
22
+ label: string;
23
+ }) => string;
6
24
  }>;
7
25
  export type DataTableMessages = ReturnType<(typeof dataTableMessages)["resolve"]>["t"];
8
26
  /** Resolved from the inherited render locale. */
@@ -0,0 +1,11 @@
1
+ declare const flowAmountMessages: import("@k2b/stdlib").Catalog<{
2
+ in: string;
3
+ out: string;
4
+ none: string;
5
+ invalid: string;
6
+ }>;
7
+ export type FlowAmountMessages = ReturnType<(typeof flowAmountMessages)["resolve"]>["t"];
8
+ /** Resolved from an explicit locale override, else the inherited render locale. */
9
+ export declare const useFlowAmountMessages: (override?: () => string | undefined) => (() => FlowAmountMessages);
10
+ export declare const checkFlowAmountMessages: () => import("@k2b/stdlib").CatalogIssue[];
11
+ export {};
@@ -1,8 +1,10 @@
1
+ export type { ChartDateFormat, ChartDatum, ChartDatumRole, ChartFormat, ChartNumberFormat } from "../charts/core";
2
+ export { BalanceSummary, type BalanceSummaryProps } from "./BalanceSummary";
1
3
  export type { CalendarAttendee, CalendarCommand, CalendarController, CalendarCustomView, CalendarDayBadge, CalendarEvent, CalendarEventColor, CalendarEventLink, CalendarEventRenderContext, CalendarEventTimeChange, CalendarExternalDrag, CalendarLabels, CalendarProps, CalendarQuickCreateControls, CalendarRange, CalendarRecurrence, CalendarResource, CalendarSelectionControls, CalendarView, } from "./Calendar";
2
4
  export { default as Calendar } from "./Calendar";
3
- export type { ChartKind, ChartLabels, ChartProps, ChartRenderOptions } from "./Chart";
5
+ export type { ChartKind, ChartKindProps, ChartLabels, ChartProps, ChartRenderOptions } from "./Chart";
4
6
  export { default as Chart } from "./Chart";
5
- export type { ChartExplorerColumn, ChartExplorerProps, ChartLegendEntry } from "./ChartExplorer";
7
+ export type { ChartExplorerColumn, ChartExplorerProps, ChartFrameRequest, ChartLegendEntry } from "./ChartExplorer";
6
8
  export { ChartExplorer } from "./ChartExplorer";
7
9
  export type { ChartExplorerControlsProps } from "./ChartExplorerControls";
8
10
  export { ChartExplorerControls } from "./ChartExplorerControls";
@@ -17,17 +19,23 @@ export type { ChartDatumRef, ChartSelection, ChartTooltip, ChartTooltipFormatter
17
19
  export type { ChartSnapshot } from "./chart-snapshot";
18
20
  export { prepareChartSnapshot } from "./chart-snapshot";
19
21
  export type { StateTimelineChartOptions, StateTimelineDomain, StateTimelineInterval, StateTimelineRow, StateTimelineState, } from "./chart-state-timeline";
22
+ export type { ChartTimeAxis } from "./chart-time-axis";
20
23
  export { highlightSql } from "./code-highlight";
21
24
  export { type CollectionSelection, createCollectionSelection, type SelectionModifiers } from "./collection-selection";
22
25
  export type { DataTableColumn, DataTableControlsProps, DataTableFooter, DataTableHeaderProps, DataTablePanelFooterProps, DataTablePanelProps, DataTableProps, DataTableRenderCell, DataTableRenderHeader, DataTableSort, } from "./DataTable";
23
26
  export { default as DataTable } from "./DataTable";
27
+ export type { DataTableToolsProps, DataTableView, DataTableViewOptions } from "./DataTableTools";
28
+ export { createDataTableView, DataTableTools } from "./DataTableTools";
24
29
  export type { DocCodeHighlighter, DocCodeProps, DocConcept, DocNoteVariant, DocRow } from "./Docs";
25
30
  export { DocCode, DocConceptGrid, DocInlineCode, DocLead, DocNote, DocPage, DocRows, DocSection } from "./Docs";
31
+ export type { DataTableColumnType, DataTableNumberFormat, DataTableStatusState, DataTableTypedColumn, } from "./data-table-columns";
32
+ export { filterRows, sortRows } from "./data-table-columns";
26
33
  export { FileBrowserPanel, type FileBrowserPanelProps, type FileSource, openFileBrowser } from "./FileBrowser";
27
34
  export { FileGrid, type FileGridGroup, type FileGridOpenProps, type FileGridProps, type FileGridSelectableProps } from "./FileGrid";
28
35
  export { default as FileTree, type FileTreeActions, type FileTreeEntry, type FileTreeProps } from "./FileTree";
29
36
  export { type FileType, FileTypeIcon, type FileTypeIconProps, fileKindLabel, fileTypeOf } from "./FileTypeIcon";
30
37
  export { canPreviewFile, default as FileView, type FileViewContent, type FileViewFile, type FileViewPreviewKind, type FileViewProps, type FileViewRenderer, type FileViewRendererProps, formatFileViewSize, getFileViewPreviewKind, } from "./FileView";
38
+ export { FlowAmount, type FlowAmountDirection, type FlowAmountProps, flowDirection } from "./FlowAmount";
31
39
  export type { KbdProps } from "./Kbd";
32
40
  export { Kbd } from "./Kbd";
33
41
  export type { LabelChipProps } from "./LabelChip";
@@ -27,6 +27,8 @@ export type SelectChipProps<T extends string | number = string> = ValueFieldProp
27
27
  loading?: boolean;
28
28
  open?: boolean;
29
29
  onOpenChange?: (open: boolean) => void;
30
+ /** Keeps the width of the longest option label, so a new choice never moves what sits beside the chip. */
31
+ stableWidth?: boolean;
30
32
  };
31
33
  export declare function SelectChip<T extends string | number = string>(props: SelectChipProps<T>): JSX.Element;
32
34
  export default SelectChip;
@@ -42,6 +42,12 @@ export declare const splitDateTime: (value: string | null | undefined, context?:
42
42
  };
43
43
  export declare const isCompleteTime: (value: string) => boolean;
44
44
  export declare const toDateTimeValue: (date: string, time: string, context?: DateContext) => string | null;
45
+ /**
46
+ * The value an applied draft commits. An untouched draft keeps the exact value: the panel shows minutes in the
47
+ * picker's zone, and a wall time that a daylight-saving change repeats names two instants, so rebuilding it could
48
+ * move the value by an hour or drop its seconds.
49
+ */
50
+ export declare const draftDateTimeValue: (value: string | null | undefined, date: string, time: string, context?: DateContext) => string | null;
45
51
  export declare const formatDateTimeValue: (value: string | null | undefined, context?: DateContext) => string;
46
52
  export declare const normalizeTimeInput: (value: string) => string;
47
53
  export declare const filterTimeInput: (value: string) => string;
@@ -31,6 +31,11 @@ export type FormatCurrencyProps = SpanProps & LocaleProp & FallbackProp & {
31
31
  currency: string;
32
32
  /** Fixed fraction digits. Defaults to the currency's standard digits. */
33
33
  decimals?: number;
34
+ /**
35
+ * When the sign shows, as in `Intl.NumberFormat`: `"exceptZero"` writes `+1.234,50 €` and `-80,00 €` for a
36
+ * balance change or net amount, `"never"` drops it. Defaults to `"auto"` (only negative amounts carry a sign).
37
+ */
38
+ signDisplay?: Intl.NumberFormatOptions["signDisplay"];
34
39
  };
35
40
  export type FormatBytesProps = SpanProps & LocaleProp & FallbackProp & {
36
41
  value: number | null | undefined;
@@ -306,6 +306,11 @@ export type AppWorkspaceSidebarItemProps = {
306
306
  scroll?: NavigationScrollMode;
307
307
  onNavigate?: (event: LinkNavigateEvent) => void | Promise<void>;
308
308
  onClick?: (event: MouseEvent) => void;
309
+ /**
310
+ * Makes a row without `href` a disclosure: it shows or hides the rows after
311
+ * it, and assistive technology hears whether they are shown.
312
+ */
313
+ expanded?: boolean;
309
314
  /**
310
315
  * Marks the current page (`aria-current="page"`). On a page deeper than the
311
316
  * sidebar lists, pass `"ancestor"` for the item that contains it: it keeps
@@ -0,0 +1,42 @@
1
+ import { type JSX } from "solid-js";
2
+ /** One budget: `used` is booked, `expected` comes on top; over the budget is `used + expected - limit`. */
3
+ export type BudgetItem = {
4
+ id?: string;
5
+ label: string;
6
+ used: number;
7
+ expected?: number;
8
+ limit: number;
9
+ };
10
+ export type BudgetListProps = {
11
+ items: readonly BudgetItem[];
12
+ /** ISO 4217 currency code, e.g. `"EUR"`. */
13
+ currency: string;
14
+ /** Explicit locale override; defaults to the inherited render locale. */
15
+ locale?: string;
16
+ /** Fixed fraction digits. Defaults to 0. */
17
+ decimals?: number;
18
+ /** The sentence shown when there is no budget. */
19
+ empty?: string;
20
+ /** Hides the legend under the rows when the host explains the colours elsewhere. */
21
+ legend?: boolean;
22
+ class?: string;
23
+ };
24
+ /** "near" from 80 % of the budget, "over" beyond it. */
25
+ export type BudgetLevel = "ok" | "near" | "over";
26
+ /** The figures of one budget row; the share counts booked and expected together. */
27
+ export declare const budgetState: (item: Pick<BudgetItem, "used" | "expected" | "limit">) => {
28
+ used: number;
29
+ expected: number;
30
+ limit: number;
31
+ total: number;
32
+ over: number;
33
+ free: number;
34
+ ratio: number;
35
+ level: BudgetLevel;
36
+ };
37
+ /**
38
+ * Budgets as rows: label and "spent of budget", a bar with booked (solid), expected (hatched) and over the budget
39
+ * (red, with a mark at the limit), and a hint that turns amber from 80 % and red beyond the budget.
40
+ */
41
+ export declare function BudgetList(props: BudgetListProps): JSX.Element;
42
+ export default BudgetList;
@@ -1,13 +1,49 @@
1
- import type { JSX } from "solid-js";
1
+ import { type JSX } from "solid-js";
2
2
  import type { IntentTone } from "../semantics";
3
3
  export type ProgressBarTone = Extract<IntentTone, "info" | "success" | "warning" | "danger">;
4
- export type ProgressBarProps = {
4
+ /** One part of a segmented bar, in the unit of `limit`. `"hatched"` marks an expected, not yet booked part. */
5
+ export type ProgressBarSegment = {
5
6
  value: number;
7
+ pattern?: "solid" | "hatched";
8
+ };
9
+ export type ProgressBarProps = {
10
+ /** Percent from 0 to 100. With `segments`, the share of `limit` the segments fill. */
11
+ value?: number;
6
12
  size?: "xs" | "sm" | "md";
7
13
  tone?: ProgressBarTone;
8
14
  showValue?: boolean;
9
15
  label: string;
16
+ /** Parts drawn in order, such as booked and expected spending. Negative and non-finite values count as 0. */
17
+ segments?: readonly ProgressBarSegment[];
18
+ /** The budget the segments fill. What goes beyond it is drawn red, with a mark at the limit. */
19
+ limit?: number;
20
+ /** Spoken value, such as "1,240 € of 1,500 €"; defaults to the percent. */
21
+ valueText?: string;
10
22
  class?: string;
11
23
  };
24
+ export type ProgressBarPart = {
25
+ pattern: "solid" | "hatched" | "over";
26
+ width: number;
27
+ };
28
+ /**
29
+ * Sum minus limit, without float residue: `0.1 + 0.2` against `0.3` is not over. Amounts within a billionth of the
30
+ * larger of both count as equal.
31
+ */
32
+ export declare const budgetOverrun: (total: number, limit: number) => number;
33
+ /** Sum over limit; an empty budget with spending is infinitely full. */
34
+ export declare const budgetRatio: (total: number, limit: number) => number;
35
+ /**
36
+ * The drawn parts of a segmented bar, each as a percent of the track. The track spans the larger of the limit and the
37
+ * sum, so an overrun stays visible: segments fill up to the limit in order, the rest is one "over" part, and `mark`
38
+ * places the limit line (only when the sum goes beyond it). Without `limit` the segments fill the track; a limit of 0,
39
+ * below 0 or not finite is an empty budget, so any spending is over it.
40
+ */
41
+ export declare const progressBarParts: (segments: readonly ProgressBarSegment[], limit?: number) => {
42
+ parts: ProgressBarPart[];
43
+ total: number;
44
+ over: number;
45
+ mark: number | null;
46
+ ratio: number;
47
+ };
12
48
  export declare function ProgressBar(props: ProgressBarProps): JSX.Element;
13
49
  export default ProgressBar;
@@ -8,12 +8,35 @@ export type StatCellAccent = {
8
8
  icon: string;
9
9
  text?: string;
10
10
  };
11
+ /**
12
+ * The change against a comparison period. `unit: "ratio"` (default) reads `0.082` as `+8.2 %`; `"points"` is the
13
+ * difference of two shares in ratio units, so `0.031` reads `+3.1 pts`. Only with `better` does the badge carry a tone
14
+ * and say "better" or "worse"; without it the change stays unrated.
15
+ */
16
+ export type StatCellDelta = {
17
+ value: number;
18
+ unit?: "ratio" | "points";
19
+ better?: "up" | "down";
20
+ };
21
+ /** The value the change compares against, shown under the figure, such as "Last month 44,560". */
22
+ export type StatCellCompare = {
23
+ label: string;
24
+ value: string | number;
25
+ };
26
+ export type StatCellSize = StatGridSize;
11
27
  export type StatCellProps = {
12
28
  label: string;
13
- value: string | number | JSX.Element;
29
+ /** The figure. `null` shows the empty dash; `sub` then says why. */
30
+ value: string | number | JSX.Element | null;
14
31
  sub?: string;
15
32
  valueClass?: string;
33
+ /** An icon in a chip before the label, in `tone`. `"in"` and `"out"` are the money colours of `FlowAmount`. */
34
+ icon?: string;
35
+ /** The chip colour of `icon`. Defaults to zinc. */
36
+ tone?: StatCellTone | "in" | "out";
16
37
  accent?: StatCellAccent;
38
+ delta?: StatCellDelta;
39
+ compare?: StatCellCompare;
17
40
  href?: string;
18
41
  title?: string;
19
42
  trend?: readonly number[];
@@ -22,12 +45,22 @@ export type StatCellProps = {
22
45
  * `selection.datum.index` is the source index into `trend`.
23
46
  */
24
47
  trendTooltip?: ChartTooltipFormatter;
25
- size?: StatGridSize;
48
+ size?: StatCellSize;
26
49
  /**
27
50
  * Wraps the label, value and support line instead of truncating them. Use it for a cell whose height nothing
28
51
  * reserves, such as one figure on its own; cells compared in a row keep one line each.
29
52
  */
30
53
  wrap?: boolean;
54
+ /** `"loading"` keeps the tile's size with placeholders; `"error"` says the figure did not load. */
55
+ status?: "loading" | "error";
56
+ /** Offers "Try again" after an error and "Reload" beside `stale`. */
57
+ onRetry?: () => void;
58
+ /** The figure is not current: a short note such as "As of 09:12 · not current" replaces the support line. */
59
+ stale?: string;
31
60
  };
61
+ /**
62
+ * One key figure as a framed tile: icon and label, the figure with its change, and a support line with the comparison
63
+ * and the trend. Each state (loading, error, stale, empty) keeps the tile's place and size.
64
+ */
32
65
  export declare function StatCell(props: StatCellProps): JSX.Element;
33
66
  export default StatCell;
@@ -1,5 +1,5 @@
1
1
  import { type JSX } from "solid-js";
2
- export type StatGridSize = "md" | "sm";
2
+ export type StatGridSize = "lg" | "md" | "sm";
3
3
  export type StatGridSurface = "white" | "muted";
4
4
  export type StatGridColumns = 1 | 2 | 3 | 4 | 5 | 6;
5
5
  export type StatGridAction = {
@@ -10,6 +10,7 @@ export type StatGridProps = {
10
10
  children: JSX.Element;
11
11
  title?: string;
12
12
  action?: StatGridAction;
13
+ /** Tiles per row on a wide container. Defaults to 4; at 600 px or less two share a row, and five or six take three up to 900 px. */
13
14
  columns?: StatGridColumns;
14
15
  size?: StatGridSize;
15
16
  surface?: StatGridSurface;
@@ -17,5 +18,6 @@ export type StatGridProps = {
17
18
  };
18
19
  export declare const useStatGridSize: () => StatGridSize;
19
20
  export declare const useStatGridSurface: () => StatGridSurface;
21
+ /** A row of key figures, each a framed tile of its own; the optional title and action sit above the row. */
20
22
  export declare function StatGrid(props: StatGridProps): JSX.Element;
21
23
  export default StatGrid;
@@ -0,0 +1,30 @@
1
+ declare const budgetMessages: import("@k2b/stdlib").Catalog<{
2
+ of: ({ limit }: {
3
+ limit: string;
4
+ }) => string;
5
+ free: ({ amount }: {
6
+ amount: string;
7
+ }) => string;
8
+ near: ({ amount }: {
9
+ amount: string;
10
+ }) => string;
11
+ over: ({ amount }: {
12
+ amount: string;
13
+ }) => string;
14
+ used: string;
15
+ expected: string;
16
+ overLegend: string;
17
+ budget: string;
18
+ left: string;
19
+ overBy: string;
20
+ valueText: ({ used, expected, limit }: {
21
+ used: string;
22
+ expected?: string;
23
+ limit: string;
24
+ }) => string;
25
+ }>;
26
+ export type BudgetMessages = ReturnType<(typeof budgetMessages)["resolve"]>["t"];
27
+ /** Resolved from an explicit locale override, else the inherited render locale. */
28
+ export declare const useBudgetMessages: (override?: () => string | undefined) => (() => BudgetMessages);
29
+ export declare const checkBudgetMessages: () => import("@k2b/stdlib").CatalogIssue[];
30
+ export {};
@@ -0,0 +1,10 @@
1
+ import type { JSX } from "solid-js";
2
+ import type { StatCellCompare, StatCellDelta } from "./StatCell";
3
+ import { type StatCellMessages } from "./stat-cell-messages";
4
+ /** Signed with a true minus sign (U+2212), as figures are typeset. */
5
+ export declare const deltaText: (delta: StatCellDelta, locale: string, t: StatCellMessages) => string;
6
+ /** A change badge: arrow, signed text, and a spoken label that names the comparison and, with `better`, the rating. */
7
+ export declare function DeltaBadge(props: {
8
+ delta: StatCellDelta;
9
+ compare?: StatCellCompare;
10
+ }): JSX.Element;
@@ -2,6 +2,7 @@ export type { AvatarProps, AvatarRing, AvatarShape, AvatarSize, AvatarTone } fro
2
2
  export { Avatar } from "./Avatar";
3
3
  export type { AvatarFacesPerson, AvatarFacesProps, AvatarStackPerson, AvatarStackProps } from "./AvatarStack";
4
4
  export { AvatarFaces, AvatarStack } from "./AvatarStack";
5
+ export { type BudgetItem, type BudgetLevel, BudgetList, type BudgetListProps, budgetState } from "./BudgetList";
5
6
  export type { ChangeListItem, ChangeListProps, ChangeTone } from "./ChangeList";
6
7
  export { ChangeList } from "./ChangeList";
7
8
  export type { DescriptionListItem, DescriptionListProps } from "./DescriptionList";
@@ -18,15 +19,15 @@ export type { PaperProps, PaperTag } from "./Paper";
18
19
  export { Paper } from "./Paper";
19
20
  export type { PlaceholderAlign, PlaceholderProps, PlaceholderState, PlaceholderSurface, PlaceholderVariant, } from "./Placeholder";
20
21
  export { default as Placeholder } from "./Placeholder";
21
- export type { ProgressBarProps, ProgressBarTone } from "./ProgressBar";
22
- export { ProgressBar } from "./ProgressBar";
22
+ export type { ProgressBarPart, ProgressBarProps, ProgressBarSegment, ProgressBarTone } from "./ProgressBar";
23
+ export { ProgressBar, progressBarParts } from "./ProgressBar";
23
24
  export type { ProgressRingProps, ProgressRingTone } from "./ProgressRing";
24
25
  export { ProgressRing } from "./ProgressRing";
25
26
  export { PERSON_COLORS, personColor } from "./person-color";
26
27
  export type { ResourceCardColor, ResourceCardProps, ResourceCardState } from "./ResourceCard";
27
28
  export { ResourceCard } from "./ResourceCard";
28
29
  export { Skeleton, type SkeletonProps } from "./Skeleton";
29
- export type { StatCellAccent, StatCellProps, StatCellTone } from "./StatCell";
30
+ export type { StatCellAccent, StatCellCompare, StatCellDelta, StatCellProps, StatCellSize, StatCellTone } from "./StatCell";
30
31
  export { StatCell } from "./StatCell";
31
32
  export type { StatGridAction, StatGridColumns, StatGridProps, StatGridSize, StatGridSurface, } from "./StatGrid";
32
33
  export { StatGrid } from "./StatGrid";
@@ -1,9 +1,9 @@
1
1
  /**
2
2
  * The colors that stand for a person: the tint behind avatar initials, a collaborator's cursor, and the marks and
3
- * comments a person leaves. The palette leaves out cyan, which means AI, and yellow, which reads as a text highlight.
3
+ * comments a person leaves. The palette leaves out plum, which means AI, and yellow, which reads as a text highlight.
4
4
  * Several people can share a color, so a person's name always appears next to it.
5
5
  */
6
- export declare const PERSON_COLORS: readonly ["#3b82f6", "#6366f1", "#8b5cf6", "#c026d3", "#ec4899", "#e11d48", "#f97316", "#16a34a"];
6
+ export declare const PERSON_COLORS: readonly ["#3b82f6", "#6366f1", "#8b5cf6", "#0891b2", "#0d9488", "#e11d48", "#f97316", "#16a34a"];
7
7
  /** The palette index for a name, the order of the `.k2b-avatar[data-tint]` rules. Surrounding spaces do not count. */
8
8
  export declare const personTint: (name: string) => number;
9
9
  /** A person's color from their display name, the same wherever Cloud shows that person. */
@@ -0,0 +1,19 @@
1
+ declare const statCellMessages: import("@k2b/stdlib").Catalog<{
2
+ points: string;
3
+ better: string;
4
+ worse: string;
5
+ comparedWith: ({ label }: {
6
+ label: string;
7
+ }) => string;
8
+ notLoaded: string;
9
+ retry: string;
10
+ reload: string;
11
+ loading: string;
12
+ }>;
13
+ export type StatCellMessages = ReturnType<(typeof statCellMessages)["resolve"]>["t"];
14
+ /** Resolved from the inherited render locale. */
15
+ export declare const useStatCellMessages: () => (() => StatCellMessages);
16
+ /** For a caller that already holds the locale, such as table text for search and copy. */
17
+ export declare const resolveStatCellMessages: (locale: string) => StatCellMessages;
18
+ export declare const checkStatCellMessages: () => import("@k2b/stdlib").CatalogIssue[];
19
+ export {};
@@ -0,0 +1,42 @@
1
+ import { type JSX } from "solid-js";
2
+ /**
3
+ * A panel's share of the six dashboard columns: a third is two, a half three, two thirds four, full all six. At a
4
+ * dashboard width of 1000 px or less a third takes half the row and two thirds the whole row; at 600 px or less every
5
+ * panel takes the whole row.
6
+ */
7
+ export type DashboardWidth = "third" | "half" | "twoThirds" | "full";
8
+ export type DashboardGridProps = {
9
+ children: JSX.Element;
10
+ class?: string;
11
+ };
12
+ /** The dashboard's measuring container. Panel widths and the key-figure row follow its width, not the window's. */
13
+ export declare function DashboardGrid(props: DashboardGridProps): JSX.Element;
14
+ export type DashboardSectionProps = {
15
+ /** Visible heading; without it the section has no heading and is named by `ariaLabel`. */
16
+ title?: string;
17
+ /** Tabler icon class shown as a plain glyph before the title, never in a tile. */
18
+ icon?: string;
19
+ /** Colour of the icon glyph; it is mixed with the text colour so it stays readable in light and dark. */
20
+ iconColor?: string;
21
+ /** Source or cadence, quiet and next to the title. */
22
+ description?: string;
23
+ headingLevel?: 2 | 3 | 4;
24
+ ariaLabel?: string;
25
+ class?: string;
26
+ /** Panels and at most one key-figure row (`StatGrid`), in reading order; the row always spans all six columns. */
27
+ children?: JSX.Element;
28
+ };
29
+ /** A titled group of panels on the six-column grid. */
30
+ export declare function DashboardSection(props: DashboardSectionProps): JSX.Element;
31
+ type DashboardPanelTag = "article" | "section" | "div" | "li";
32
+ type DashboardPanelOwnProps<T extends DashboardPanelTag> = {
33
+ as?: T;
34
+ /** Defaults to a third. Ignored inside a key-figure row, where every tile takes one of its columns. */
35
+ width?: DashboardWidth;
36
+ class?: string;
37
+ children?: JSX.Element;
38
+ };
39
+ export type DashboardPanelProps<T extends DashboardPanelTag = "article"> = DashboardPanelOwnProps<T> & Omit<JSX.IntrinsicElements[T], keyof DashboardPanelOwnProps<T>>;
40
+ /** One framed cell of the grid. Panels in a row share the height of the tallest. */
41
+ export declare function DashboardPanel<T extends DashboardPanelTag = "article">(props: DashboardPanelProps<T>): JSX.Element;
42
+ export {};
@@ -1,3 +1,4 @@
1
+ export * from "./Dashboard";
1
2
  export * from "./Widget";
2
3
  export * from "./WidgetHero";
3
4
  export * from "./WidgetList";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@k2b/ui",
3
- "version": "0.49.0",
3
+ "version": "0.50.0",
4
4
  "description": "Production-ready components for SolidJS applications.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -54,6 +54,12 @@
54
54
  "types": "./dist/types/text-editor/markdown-table.d.ts",
55
55
  "import": "./dist/ssr/text-editor/markdown-table.js",
56
56
  "default": "./dist/ssr/text-editor/markdown-table.js"
57
+ },
58
+ "./charts/core": {
59
+ "types": "./dist/types/charts/core/index.d.ts",
60
+ "browser": "./dist/browser/charts/core/index.js",
61
+ "import": "./dist/ssr/charts/core/index.js",
62
+ "default": "./dist/ssr/charts/core/index.js"
57
63
  }
58
64
  },
59
65
  "files": [