@plenustech/design-system 0.2.3 → 0.2.5

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 (233) hide show
  1. package/README.md +8 -0
  2. package/dist/components/actions/ButtonTile/ButtonTile.module.css.cjs +1 -1
  3. package/dist/components/actions/ButtonTile/ButtonTile.module.css.js +10 -10
  4. package/dist/components/actions/Toolbar/Toolbar.cjs +1 -1
  5. package/dist/components/actions/Toolbar/Toolbar.cjs.map +1 -1
  6. package/dist/components/actions/Toolbar/Toolbar.js +64 -53
  7. package/dist/components/actions/Toolbar/Toolbar.js.map +1 -1
  8. package/dist/components/charts/ChartGauge/ChartGauge.cjs +2 -0
  9. package/dist/components/charts/ChartGauge/ChartGauge.cjs.map +1 -0
  10. package/dist/components/charts/ChartGauge/ChartGauge.js +307 -0
  11. package/dist/components/charts/ChartGauge/ChartGauge.js.map +1 -0
  12. package/dist/components/charts/ChartGauge/ChartGauge.module.css.cjs +2 -0
  13. package/dist/components/charts/ChartGauge/ChartGauge.module.css.cjs.map +1 -0
  14. package/dist/components/charts/ChartGauge/ChartGauge.module.css.js +76 -0
  15. package/dist/components/charts/ChartGauge/ChartGauge.module.css.js.map +1 -0
  16. package/dist/components/charts/ChartGauge/gaugeLayout.cjs +2 -0
  17. package/dist/components/charts/ChartGauge/gaugeLayout.cjs.map +1 -0
  18. package/dist/components/charts/ChartGauge/gaugeLayout.js +107 -0
  19. package/dist/components/charts/ChartGauge/gaugeLayout.js.map +1 -0
  20. package/dist/components/charts/ChartGauge/gaugeReading.cjs +2 -0
  21. package/dist/components/charts/ChartGauge/gaugeReading.cjs.map +1 -0
  22. package/dist/components/charts/ChartGauge/gaugeReading.js +112 -0
  23. package/dist/components/charts/ChartGauge/gaugeReading.js.map +1 -0
  24. package/dist/components/charts/ChartGauge/gaugeScale.cjs +2 -0
  25. package/dist/components/charts/ChartGauge/gaugeScale.cjs.map +1 -0
  26. package/dist/components/charts/ChartGauge/gaugeScale.js +57 -0
  27. package/dist/components/charts/ChartGauge/gaugeScale.js.map +1 -0
  28. package/dist/components/charts/ChartMap/ChartMap.cjs +2 -0
  29. package/dist/components/charts/ChartMap/ChartMap.cjs.map +1 -0
  30. package/dist/components/charts/ChartMap/ChartMap.js +523 -0
  31. package/dist/components/charts/ChartMap/ChartMap.js.map +1 -0
  32. package/dist/components/charts/ChartMap/ChartMap.module.css.cjs +2 -0
  33. package/dist/components/charts/ChartMap/ChartMap.module.css.cjs.map +1 -0
  34. package/dist/components/charts/ChartMap/ChartMap.module.css.js +124 -0
  35. package/dist/components/charts/ChartMap/ChartMap.module.css.js.map +1 -0
  36. package/dist/components/charts/ChartMap/ChartMapLegend.cjs +2 -0
  37. package/dist/components/charts/ChartMap/ChartMapLegend.cjs.map +1 -0
  38. package/dist/components/charts/ChartMap/ChartMapLegend.js +102 -0
  39. package/dist/components/charts/ChartMap/ChartMapLegend.js.map +1 -0
  40. package/dist/components/charts/ChartMap/ChartMapTable.cjs +2 -0
  41. package/dist/components/charts/ChartMap/ChartMapTable.cjs.map +1 -0
  42. package/dist/components/charts/ChartMap/ChartMapTable.js +118 -0
  43. package/dist/components/charts/ChartMap/ChartMapTable.js.map +1 -0
  44. package/dist/components/charts/ChartMap/mapGeometry.cjs +2 -0
  45. package/dist/components/charts/ChartMap/mapGeometry.cjs.map +1 -0
  46. package/dist/components/charts/ChartMap/mapGeometry.js +113 -0
  47. package/dist/components/charts/ChartMap/mapGeometry.js.map +1 -0
  48. package/dist/components/charts/ChartMap/mapLabels.cjs +2 -0
  49. package/dist/components/charts/ChartMap/mapLabels.cjs.map +1 -0
  50. package/dist/components/charts/ChartMap/mapLabels.js +80 -0
  51. package/dist/components/charts/ChartMap/mapLabels.js.map +1 -0
  52. package/dist/components/charts/ChartMap/mapScales.cjs +2 -0
  53. package/dist/components/charts/ChartMap/mapScales.cjs.map +1 -0
  54. package/dist/components/charts/ChartMap/mapScales.js +131 -0
  55. package/dist/components/charts/ChartMap/mapScales.js.map +1 -0
  56. package/dist/components/charts/ChartMap/polylabel.cjs +2 -0
  57. package/dist/components/charts/ChartMap/polylabel.cjs.map +1 -0
  58. package/dist/components/charts/ChartMap/polylabel.js +50 -0
  59. package/dist/components/charts/ChartMap/polylabel.js.map +1 -0
  60. package/dist/components/charts/ChartTimeline/ChartTimeline.cjs +2 -0
  61. package/dist/components/charts/ChartTimeline/ChartTimeline.cjs.map +1 -0
  62. package/dist/components/charts/ChartTimeline/ChartTimeline.js +703 -0
  63. package/dist/components/charts/ChartTimeline/ChartTimeline.js.map +1 -0
  64. package/dist/components/charts/ChartTimeline/ChartTimeline.module.css.cjs +2 -0
  65. package/dist/components/charts/ChartTimeline/ChartTimeline.module.css.cjs.map +1 -0
  66. package/dist/components/charts/ChartTimeline/ChartTimeline.module.css.js +124 -0
  67. package/dist/components/charts/ChartTimeline/ChartTimeline.module.css.js.map +1 -0
  68. package/dist/components/charts/ChartTimeline/ChartTimelineTable.cjs +2 -0
  69. package/dist/components/charts/ChartTimeline/ChartTimelineTable.cjs.map +1 -0
  70. package/dist/components/charts/ChartTimeline/ChartTimelineTable.js +42 -0
  71. package/dist/components/charts/ChartTimeline/ChartTimelineTable.js.map +1 -0
  72. package/dist/components/charts/ChartTimeline/timelineLayout.cjs +2 -0
  73. package/dist/components/charts/ChartTimeline/timelineLayout.cjs.map +1 -0
  74. package/dist/components/charts/ChartTimeline/timelineLayout.js +109 -0
  75. package/dist/components/charts/ChartTimeline/timelineLayout.js.map +1 -0
  76. package/dist/components/charts/ChartTimeline/timelineTime.cjs +2 -0
  77. package/dist/components/charts/ChartTimeline/timelineTime.cjs.map +1 -0
  78. package/dist/components/charts/ChartTimeline/timelineTime.js +91 -0
  79. package/dist/components/charts/ChartTimeline/timelineTime.js.map +1 -0
  80. package/dist/components/charts/ChartTimeline/timelineTooltip.cjs +2 -0
  81. package/dist/components/charts/ChartTimeline/timelineTooltip.cjs.map +1 -0
  82. package/dist/components/charts/ChartTimeline/timelineTooltip.js +77 -0
  83. package/dist/components/charts/ChartTimeline/timelineTooltip.js.map +1 -0
  84. package/dist/components/charts/core/ChartLegend.cjs +1 -1
  85. package/dist/components/charts/core/ChartLegend.cjs.map +1 -1
  86. package/dist/components/charts/core/ChartLegend.js +37 -25
  87. package/dist/components/charts/core/ChartLegend.js.map +1 -1
  88. package/dist/components/charts/core/useChartMetrics.cjs +1 -1
  89. package/dist/components/charts/core/useChartMetrics.cjs.map +1 -1
  90. package/dist/components/charts/core/useChartMetrics.js +20 -25
  91. package/dist/components/charts/core/useChartMetrics.js.map +1 -1
  92. package/dist/components/data-display/CodeBlock/syntax.cjs +10 -3
  93. package/dist/components/data-display/CodeBlock/syntax.cjs.map +1 -1
  94. package/dist/components/data-display/CodeBlock/syntax.js +68 -48
  95. package/dist/components/data-display/CodeBlock/syntax.js.map +1 -1
  96. package/dist/components/data-display/List/List.cjs.map +1 -1
  97. package/dist/components/data-display/List/List.js.map +1 -1
  98. package/dist/components/data-display/List/List.module.css.cjs +1 -1
  99. package/dist/components/data-display/List/List.module.css.js +34 -24
  100. package/dist/components/data-display/List/List.module.css.js.map +1 -1
  101. package/dist/components/data-display/List/ListingOptions.cjs +1 -1
  102. package/dist/components/data-display/List/ListingOptions.cjs.map +1 -1
  103. package/dist/components/data-display/List/ListingOptions.js +98 -74
  104. package/dist/components/data-display/List/ListingOptions.js.map +1 -1
  105. package/dist/components/data-display/List/useListing.cjs.map +1 -1
  106. package/dist/components/data-display/List/useListing.js.map +1 -1
  107. package/dist/components/data-display/Timeline/Timeline.cjs +1 -1
  108. package/dist/components/data-display/Timeline/Timeline.cjs.map +1 -1
  109. package/dist/components/data-display/Timeline/Timeline.js +6 -6
  110. package/dist/components/data-display/Timeline/Timeline.js.map +1 -1
  111. package/dist/components/data-display/Timeline/Timeline.module.css.cjs +1 -1
  112. package/dist/components/data-display/Timeline/Timeline.module.css.js +18 -16
  113. package/dist/components/data-display/Timeline/Timeline.module.css.js.map +1 -1
  114. package/dist/components/forms/Checkbox/Checkbox.module.css.cjs +1 -1
  115. package/dist/components/forms/Checkbox/Checkbox.module.css.js +5 -5
  116. package/dist/components/forms/CheckboxGroup/CheckboxGroup.module.css.cjs +1 -1
  117. package/dist/components/forms/CheckboxGroup/CheckboxGroup.module.css.js +1 -1
  118. package/dist/components/forms/ComboBox/ComboBox.cjs.map +1 -1
  119. package/dist/components/forms/ComboBox/ComboBox.js.map +1 -1
  120. package/dist/components/forms/Field/Field.cjs +1 -1
  121. package/dist/components/forms/Field/Field.cjs.map +1 -1
  122. package/dist/components/forms/Field/Field.js +22 -22
  123. package/dist/components/forms/Field/Field.js.map +1 -1
  124. package/dist/components/forms/Field/Field.module.css.cjs +1 -1
  125. package/dist/components/forms/Field/Field.module.css.js +19 -17
  126. package/dist/components/forms/Field/Field.module.css.js.map +1 -1
  127. package/dist/components/forms/InputText/InputText.cjs +1 -1
  128. package/dist/components/forms/InputText/InputText.cjs.map +1 -1
  129. package/dist/components/forms/InputText/InputText.js +24 -24
  130. package/dist/components/forms/InputText/InputText.js.map +1 -1
  131. package/dist/components/forms/InputText/InputText.module.css.cjs +1 -1
  132. package/dist/components/forms/InputText/InputText.module.css.js +9 -7
  133. package/dist/components/forms/InputText/InputText.module.css.js.map +1 -1
  134. package/dist/components/forms/RadioGroup/RadioGroup.module.css.cjs +1 -1
  135. package/dist/components/forms/RadioGroup/RadioGroup.module.css.js +4 -4
  136. package/dist/components/forms/Select/Select.cjs.map +1 -1
  137. package/dist/components/forms/Select/Select.js.map +1 -1
  138. package/dist/components/forms/Switch/Switch.module.css.cjs +1 -1
  139. package/dist/components/forms/Switch/Switch.module.css.js +6 -6
  140. package/dist/components/icons/suite.cjs +1 -0
  141. package/dist/components/icons/suite.js +10894 -0
  142. package/dist/components/navigation/Pagination/Pagination.cjs +1 -1
  143. package/dist/components/navigation/Pagination/Pagination.cjs.map +1 -1
  144. package/dist/components/navigation/Pagination/Pagination.js +71 -44
  145. package/dist/components/navigation/Pagination/Pagination.js.map +1 -1
  146. package/dist/components/navigation/Pagination/Pagination.module.css.cjs +1 -1
  147. package/dist/components/navigation/Pagination/Pagination.module.css.js +18 -14
  148. package/dist/components/navigation/Pagination/Pagination.module.css.js.map +1 -1
  149. package/dist/components/navigation/TabsNav/TabsNav.cjs +2 -0
  150. package/dist/components/navigation/TabsNav/TabsNav.cjs.map +1 -0
  151. package/dist/components/navigation/TabsNav/TabsNav.js +21 -0
  152. package/dist/components/navigation/TabsNav/TabsNav.js.map +1 -0
  153. package/dist/components/navigation/TabsNav/TabsNav.module.css.cjs +2 -0
  154. package/dist/components/navigation/TabsNav/TabsNav.module.css.cjs.map +1 -0
  155. package/dist/components/navigation/TabsNav/TabsNav.module.css.js +18 -0
  156. package/dist/components/navigation/TabsNav/TabsNav.module.css.js.map +1 -0
  157. package/dist/components/overlays/Dialog/Dialog.cjs.map +1 -1
  158. package/dist/components/overlays/Dialog/Dialog.js.map +1 -1
  159. package/dist/components/overlays/Dialog/DialogFrame.cjs +1 -1
  160. package/dist/components/overlays/Dialog/DialogFrame.cjs.map +1 -1
  161. package/dist/components/overlays/Dialog/DialogFrame.js +30 -30
  162. package/dist/components/overlays/Dialog/DialogFrame.js.map +1 -1
  163. package/dist/components/overlays/Drawer/Drawer.cjs.map +1 -1
  164. package/dist/components/overlays/Drawer/Drawer.js.map +1 -1
  165. package/dist/components/overlays/Menu/Menu.cjs +1 -1
  166. package/dist/components/overlays/Menu/Menu.cjs.map +1 -1
  167. package/dist/components/overlays/Menu/Menu.js +37 -36
  168. package/dist/components/overlays/Menu/Menu.js.map +1 -1
  169. package/dist/components/overlays/Menu/keyShortcuts.cjs +2 -0
  170. package/dist/components/overlays/Menu/keyShortcuts.cjs.map +1 -0
  171. package/dist/components/overlays/Menu/keyShortcuts.js +55 -0
  172. package/dist/components/overlays/Menu/keyShortcuts.js.map +1 -0
  173. package/dist/components/overlays/Tooltip/Tooltip.cjs +1 -1
  174. package/dist/components/overlays/Tooltip/Tooltip.cjs.map +1 -1
  175. package/dist/components/overlays/Tooltip/Tooltip.js +81 -56
  176. package/dist/components/overlays/Tooltip/Tooltip.js.map +1 -1
  177. package/dist/design-system.css +1 -1
  178. package/dist/icons.cjs +2 -0
  179. package/dist/icons.cjs.map +1 -0
  180. package/dist/icons.js +2054 -0
  181. package/dist/icons.js.map +1 -0
  182. package/dist/index.cjs +1 -1
  183. package/dist/index.js +184 -174
  184. package/dist/index.js.map +1 -1
  185. package/dist/types/components/charts/ChartGauge/ChartGauge.d.ts +83 -0
  186. package/dist/types/components/charts/ChartGauge/gaugeLayout.d.ts +64 -0
  187. package/dist/types/components/charts/ChartGauge/gaugeReading.d.ts +97 -0
  188. package/dist/types/components/charts/ChartGauge/gaugeScale.d.ts +38 -0
  189. package/dist/types/components/charts/ChartGauge/index.d.ts +2 -0
  190. package/dist/types/components/charts/ChartMap/ChartMap.d.ts +104 -0
  191. package/dist/types/components/charts/ChartMap/ChartMapLegend.d.ts +44 -0
  192. package/dist/types/components/charts/ChartMap/ChartMapTable.d.ts +38 -0
  193. package/dist/types/components/charts/ChartMap/index.d.ts +4 -0
  194. package/dist/types/components/charts/ChartMap/mapGeometry.d.ts +56 -0
  195. package/dist/types/components/charts/ChartMap/mapLabels.d.ts +51 -0
  196. package/dist/types/components/charts/ChartMap/mapScales.d.ts +76 -0
  197. package/dist/types/components/charts/ChartMap/polylabel.d.ts +9 -0
  198. package/dist/types/components/charts/ChartTimeline/ChartTimeline.d.ts +137 -0
  199. package/dist/types/components/charts/ChartTimeline/ChartTimelineTable.d.ts +25 -0
  200. package/dist/types/components/charts/ChartTimeline/index.d.ts +2 -0
  201. package/dist/types/components/charts/ChartTimeline/timelineLayout.d.ts +70 -0
  202. package/dist/types/components/charts/ChartTimeline/timelineTime.d.ts +16 -0
  203. package/dist/types/components/charts/ChartTimeline/timelineTooltip.d.ts +45 -0
  204. package/dist/types/components/charts/core/ChartLegend.d.ts +3 -1
  205. package/dist/types/components/data-display/CodeBlock/syntax.d.ts +1 -1
  206. package/dist/types/components/data-display/List/List.d.ts +1 -1
  207. package/dist/types/components/data-display/List/useListing.d.ts +7 -1
  208. package/dist/types/components/data-display/Timeline/Timeline.d.ts +4 -1
  209. package/dist/types/components/data-display/Timeline/index.d.ts +1 -1
  210. package/dist/types/components/forms/ComboBox/ComboBox.d.ts +7 -1
  211. package/dist/types/components/forms/Field/Field.d.ts +1 -1
  212. package/dist/types/components/forms/InputText/InputText.d.ts +1 -1
  213. package/dist/types/components/forms/Select/Select.d.ts +5 -1
  214. package/dist/types/components/icons/suite.d.ts +2051 -0
  215. package/dist/types/components/navigation/Pagination/Pagination.d.ts +13 -1
  216. package/dist/types/components/navigation/Pagination/index.d.ts +1 -1
  217. package/dist/types/components/navigation/TabsNav/TabsNav.d.ts +20 -0
  218. package/dist/types/components/navigation/TabsNav/index.d.ts +2 -0
  219. package/dist/types/components/overlays/Dialog/Dialog.d.ts +19 -7
  220. package/dist/types/components/overlays/Dialog/DialogFrame.d.ts +8 -2
  221. package/dist/types/components/overlays/Drawer/Drawer.d.ts +2 -2
  222. package/dist/types/components/overlays/Menu/Menu.d.ts +3 -1
  223. package/dist/types/components/overlays/Menu/keyShortcuts.d.ts +2 -0
  224. package/dist/types/components/overlays/Tooltip/Tooltip.d.ts +26 -5
  225. package/dist/types/icons.d.ts +6 -0
  226. package/dist/types/index.d.ts +11 -3
  227. package/dist/types/utils/formatters/formatarDuracao.d.ts +5 -0
  228. package/dist/types/utils/formatters/index.d.ts +1 -0
  229. package/dist/utils/formatters/formatarDuracao.cjs +2 -0
  230. package/dist/utils/formatters/formatarDuracao.cjs.map +1 -0
  231. package/dist/utils/formatters/formatarDuracao.js +10 -0
  232. package/dist/utils/formatters/formatarDuracao.js.map +1 -0
  233. package/package.json +10 -1
@@ -0,0 +1,97 @@
1
+ import type { ChartTooltipRow } from '../ChartTooltip/index.js';
2
+ import type { SeriesIntent } from '../palette/index.js';
3
+ import type { ChartGaugeDelta, ChartGaugeTarget } from './ChartGauge.js';
4
+ import { type GaugeDomain, type GaugeSegment } from './gaugeScale.js';
5
+ /** Como o medidor lê o valor: no formato do consumidor ou contra a meta. */
6
+ export interface GaugeReading {
7
+ /** Leitura contra a meta: a outra leitura no centro, a linha Atingido no balão e as duas no `aria-valuetext`. */
8
+ againstTarget: boolean;
9
+ /** Meta positiva, base do atingimento. */
10
+ base: number | null;
11
+ formatExact: (value: number) => string;
12
+ formatValue: (value: number) => string;
13
+ /** Centro, escala e intervalos em percentual da meta. */
14
+ showsPercent: boolean;
15
+ }
16
+ export type CenterLine = {
17
+ kind: 'text';
18
+ text: string;
19
+ } | {
20
+ glyph: string;
21
+ kind: 'warn';
22
+ short: string;
23
+ text: string;
24
+ } | {
25
+ glyph: string;
26
+ intent: SeriesIntent;
27
+ kind: 'delta';
28
+ label?: string;
29
+ text: string;
30
+ };
31
+ export interface GaugeCenter {
32
+ lines: readonly CenterLine[];
33
+ value?: string;
34
+ }
35
+ export type GaugeStatus = 'loading' | 'empty' | 'value';
36
+ export interface GaugeTooltip {
37
+ rows: ChartTooltipRow[];
38
+ subtitle?: string;
39
+ title?: string;
40
+ }
41
+ /** Quem pede `percentOfTarget`, na exibição ou nas faixas, liga a leitura contra a meta; sem meta, vale o valor. */
42
+ export declare function gaugeReading(options: {
43
+ base: number | null;
44
+ formatTooltipValue?: (value: number) => string;
45
+ formatValue: (value: number) => string;
46
+ segmentUnit: string;
47
+ valueDisplay: string;
48
+ }): GaugeReading;
49
+ export declare function formatAttainment(reading: GaugeReading, value: number): string;
50
+ /** O número como a exibição escolhida o mostra. */
51
+ export declare function formatShown(reading: GaugeReading, value: number): string;
52
+ /** A leitura que a exibição não escolheu, como "92% de R$ 2 mi" ou "R$ 1,84 mi de R$ 2 mi". */
53
+ export declare function otherReading(reading: GaugeReading, value: number, format: (value: number) => string): string;
54
+ export declare function rangeText(reading: GaugeReading, segment: GaugeSegment): string;
55
+ export declare function segmentName(segment: GaugeSegment): string;
56
+ /** O sinal é do componente; o `format` recebe o módulo da variação. */
57
+ export declare function deltaText(delta: ChartGaugeDelta): string;
58
+ export declare function hasDelta(delta: ChartGaugeDelta | undefined): delta is ChartGaugeDelta;
59
+ export declare function gaugeCenter(options: {
60
+ centerLabel?: string;
61
+ compact: boolean;
62
+ delta?: ChartGaugeDelta;
63
+ domain: GaugeDomain;
64
+ emptyMessage: string;
65
+ reading: GaugeReading;
66
+ showCenter: boolean;
67
+ status: GaugeStatus;
68
+ value: number;
69
+ }): GaugeCenter;
70
+ /** A frase do `aria-valuetext`: o valor, o que excede a escala, a faixa, a meta e a variação. */
71
+ export declare function gaugeValueText(options: {
72
+ delta?: ChartGaugeDelta;
73
+ domain: GaugeDomain;
74
+ reading: GaugeReading;
75
+ segment?: GaugeSegment;
76
+ target?: ChartGaugeTarget;
77
+ value: number;
78
+ }): string;
79
+ /** Balão do centro ou do arco sem faixas: a faixa do valor, o valor, a meta, o atingido e a variação. */
80
+ export declare function valueTooltip(options: {
81
+ color: string;
82
+ delta?: ChartGaugeDelta;
83
+ domain: GaugeDomain;
84
+ reading: GaugeReading;
85
+ segment?: GaugeSegment;
86
+ target?: ChartGaugeTarget;
87
+ title: string;
88
+ value: number;
89
+ }): GaugeTooltip;
90
+ /** Balão de uma faixa: o intervalo dela, o valor atual e se ele está ali. */
91
+ export declare function segmentTooltip(options: {
92
+ current?: GaugeSegment;
93
+ reading: GaugeReading;
94
+ segment: GaugeSegment;
95
+ target?: ChartGaugeTarget;
96
+ value: number;
97
+ }): GaugeTooltip;
@@ -0,0 +1,38 @@
1
+ import type { ChartGaugeSegment, ChartGaugeTarget } from './ChartGauge.js';
2
+ export interface GaugeDomain {
3
+ max: number;
4
+ min: number;
5
+ }
6
+ export interface GaugeSegment {
7
+ color: string;
8
+ from: number;
9
+ label?: string;
10
+ to: number;
11
+ }
12
+ export declare function isNumber(value: unknown): value is number;
13
+ export declare function clampToDomain(value: number, { max, min }: GaugeDomain): number;
14
+ /** Meta que serve de base ao atingimento: só uma meta positiva divide. */
15
+ export declare function targetBase(target: ChartGaugeTarget | undefined): number | null;
16
+ /** Sem `max` e com meta, a escala vai a 120% dela. Intervalo vazio ganha uma unidade, como nos eixos. */
17
+ export declare function gaugeDomain(min: number | undefined, max: number | undefined, target: ChartGaugeTarget | undefined): {
18
+ max: number;
19
+ min: number;
20
+ };
21
+ /**
22
+ * Faixas em ordem crescente, cada uma do fim da anterior até o seu `to`, multiplicado por `unit` quando declarado em
23
+ * fração da meta. Faixa com limite inválido, ou que não avança sobre a anterior, é ignorada.
24
+ */
25
+ export declare function gaugeSegments(segments: readonly ChartGaugeSegment[], domain: GaugeDomain, { accent, unit }: {
26
+ accent?: string;
27
+ unit: number;
28
+ }): GaugeSegment[];
29
+ export declare function segmentAt(segments: readonly GaugeSegment[], value: number): GaugeSegment | undefined;
30
+ /** De onde o arco preenchido parte: o zero quando a escala o cruza; senão, o mínimo. */
31
+ export declare function gaugeOrigin(origin: number | undefined, domain: GaugeDomain): number;
32
+ /**
33
+ * Marcas principais. Em percentual da meta, a cada 50% dela (25% numa escala curta), com as pontas sempre incluídas;
34
+ * senão, `tickCount` divisões iguais.
35
+ */
36
+ export declare function majorTicks(domain: GaugeDomain, tickCount: number, percentBase: number | null): number[];
37
+ /** Ordem em que os rótulos da escala disputam espaço: as pontas, a meta e o resto. */
38
+ export declare function tickLabelPriority(ticks: readonly number[], target: number | null): number[];
@@ -0,0 +1,2 @@
1
+ export { ChartGauge } from './ChartGauge.js';
2
+ export type { ChartGaugeDelta, ChartGaugeIndicator, ChartGaugeProps, ChartGaugeScaleLabels, ChartGaugeSegment, ChartGaugeSegmentStyle, ChartGaugeSegmentUnit, ChartGaugeSize, ChartGaugeTarget, ChartGaugeTicks, ChartGaugeValueDisplay, } from './ChartGauge.js';
@@ -0,0 +1,104 @@
1
+ import { type ChartHeight, type ChartLegendAlign, type MarkVisibility } from '../core/index.js';
2
+ import { type SeriesAppearance } from '../palette/index.js';
3
+ import { type ChartMapFeature, type ChartMapFeatureCollection } from './mapGeometry.js';
4
+ import { type ChartMapColorScale } from './mapScales.js';
5
+ export interface ChartMapRegionDatum {
6
+ /** `id` da categoria, na escala categorica. */
7
+ category?: string;
8
+ /** Casa com o identificador da feicao, lido por `featureIdKey`. */
9
+ id: string;
10
+ value?: number | null;
11
+ }
12
+ export interface ChartMapMarker {
13
+ id: string;
14
+ label: string;
15
+ latitude: number;
16
+ longitude: number;
17
+ value: number;
18
+ }
19
+ export interface ChartMapMarkerSeries extends SeriesAppearance {
20
+ id: string;
21
+ label: string;
22
+ points: readonly ChartMapMarker[];
23
+ }
24
+ /** Argumento de `onRegionClick`. */
25
+ export interface ChartMapRegion {
26
+ category: string | null;
27
+ feature: ChartMapFeature;
28
+ id: string;
29
+ name: string;
30
+ value: number | null;
31
+ }
32
+ /** Argumento de `onMarkerClick`. */
33
+ export interface ChartMapMarkerEvent {
34
+ id: string;
35
+ /** `id` da serie. */
36
+ series: string;
37
+ value: number;
38
+ }
39
+ export type ChartMapLegendPosition = 'top' | 'bottom' | 'right' | 'none';
40
+ export interface ChartMapProps {
41
+ /** Cor de tema que abre a paleta das categorias e dos marcadores, como nos demais gráficos. */
42
+ accent?: string;
43
+ colorScale?: ChartMapColorScale;
44
+ data?: readonly ChartMapRegionDatum[];
45
+ /** Series ocultas de inicio, no modo nao controlado: categorias e series de marcadores, pelo `id`. */
46
+ defaultHiddenSeries?: readonly string[];
47
+ emptyMessage?: string;
48
+ /** Caminho do identificador na feicao, como `properties.sigla`. E por ele que o dado casa. */
49
+ featureIdKey?: string;
50
+ /** Caminho do texto curto do rotulo no desenho. Sem ele, o identificador, como a sigla da UF. */
51
+ featureLabelKey?: string;
52
+ /** Caminho do nome exibido no balao, na tabela e na descricao. */
53
+ featureNameKey?: string;
54
+ /** Ids que o enquadramento abraca. As demais regioes ficam em cinza, como contexto, sem interacao. */
55
+ focus?: readonly string[];
56
+ formatPercent?: (ratio: number) => string;
57
+ formatTooltipValue?: (value: number) => string;
58
+ formatValue?: (value: number) => string;
59
+ /** Fronteiras em GeoJSON, fornecidas pelo produto, que responde pela licenca delas. */
60
+ geometry: ChartMapFeatureCollection;
61
+ /** Altura maxima em px, ou `fill`. Na largura estreita, a altura encolhe ate a proporcao da geometria. */
62
+ height?: ChartHeight;
63
+ /** Faixas ocultas pelo indice, na escala por classes (controlado). */
64
+ hiddenClasses?: readonly number[];
65
+ /** Categorias e series de marcadores desligadas, pelo `id` (controlado). */
66
+ hiddenSeries?: readonly string[];
67
+ /** Abaixo de 640 px de largura, `right` cai para `bottom`. */
68
+ legend?: ChartMapLegendPosition;
69
+ legendAlign?: ChartLegendAlign;
70
+ /** Raio maximo do marcador, em px. O raio cresce pela raiz do valor, entao a area e proporcional. */
71
+ markerMaxSize?: number;
72
+ markerMinSize?: number;
73
+ markers?: readonly ChartMapMarkerSeries[];
74
+ markerValueLabel?: string;
75
+ noDataLabel?: string;
76
+ noDataStyle?: 'hatch' | 'neutral';
77
+ onHiddenClassesChange?: (hidden: readonly number[]) => void;
78
+ onHiddenSeriesChange?: (hidden: readonly string[]) => void;
79
+ /** Regiao sob o ponteiro ou o foco, para paineis vizinhos. */
80
+ onHoverRegion?: (id: string | null) => void;
81
+ /** Com ele, os marcadores viram botoes e entram no teclado. */
82
+ onMarkerClick?: (marker: ChartMapMarkerEvent) => void;
83
+ /** Com ele, as regioes viram botoes e entram no teclado. */
84
+ onRegionClick?: (region: ChartMapRegion) => void;
85
+ regionLabels?: MarkVisibility;
86
+ selectedRegion?: string | null;
87
+ showDataLabels?: MarkVisibility;
88
+ /** Parte do total no balao e na tabela. So faz sentido em grandeza somavel. */
89
+ showShare?: boolean;
90
+ showTableToggle?: boolean;
91
+ showTooltip?: boolean;
92
+ /** O rotulo que nao cabe na regiao vai para uma coluna junto ao desenho, com linha guia, ou some. */
93
+ smallRegionLabels?: 'callout' | 'hidden';
94
+ /** Linha sob o titulo, como o total do nivel. */
95
+ subtitle?: string;
96
+ title: string;
97
+ valueLabel?: string;
98
+ }
99
+ /**
100
+ * Regioes pintadas pelo valor e marcadores por coordenada, sobre a geometria GeoJSON que o produto fornece. O desenho
101
+ * e imagem nomeada pelo titulo; com `onRegionClick` ou `onMarkerClick`, um grupo cujas marcas sao botoes de tabulacao
102
+ * movel. A leitura completa, com busca, esta na visao em tabela.
103
+ */
104
+ export declare function ChartMap({ accent, colorScale, data, defaultHiddenSeries, emptyMessage, featureIdKey, featureLabelKey, featureNameKey, focus, formatPercent, formatTooltipValue, formatValue, geometry, height, hiddenClasses, hiddenSeries, legend, legendAlign, markerMaxSize, markerMinSize, markers, markerValueLabel, noDataLabel, noDataStyle, onHiddenClassesChange, onHiddenSeriesChange, onHoverRegion, onMarkerClick, onRegionClick, regionLabels, selectedRegion, showDataLabels, showShare, showTableToggle, showTooltip, smallRegionLabels, subtitle, title, valueLabel, }: ChartMapProps): import("react").JSX.Element;
@@ -0,0 +1,44 @@
1
+ import type { CSSProperties } from 'react';
2
+ import { type ChartLegendAlign } from '../core/index.js';
3
+ import type { MapGradient, MapScaleEntry } from './mapScales.js';
4
+ export interface MapLegendEntry extends MapScaleEntry {
5
+ count: number;
6
+ hidden: boolean;
7
+ }
8
+ export interface MapLegendSeries {
9
+ color: string;
10
+ hidden: boolean;
11
+ key: string;
12
+ label: string;
13
+ }
14
+ interface ChartMapLegendProps {
15
+ align: ChartLegendAlign;
16
+ entries: readonly MapLegendEntry[];
17
+ formatValue: (value: number) => string;
18
+ gradient?: MapGradient;
19
+ /** Posicao, na barra, do valor da regiao sob o ponteiro. */
20
+ indicator?: number;
21
+ markerSeries: readonly MapLegendSeries[];
22
+ markerSizes?: {
23
+ maximum: number;
24
+ radiusOf: (value: number) => number;
25
+ };
26
+ markerValueLabel: string;
27
+ noData?: {
28
+ color: string;
29
+ count: number;
30
+ label: string;
31
+ };
32
+ onHighlight: (key: string | null) => void;
33
+ onToggle: (key: string) => void;
34
+ onToggleMarkerSeries: (key: string) => void;
35
+ position: 'top' | 'bottom' | 'right';
36
+ style?: CSSProperties;
37
+ valueLabel: string;
38
+ }
39
+ /**
40
+ * Legenda do mapa: a barra da escala continua, com o valor sob o ponteiro marcado nela, ou as faixas e categorias, que
41
+ * destacam e desligam as regioes; a entrada de sem dado; e as series de marcadores com a chave de tamanho.
42
+ */
43
+ export declare function ChartMapLegend({ align, entries, formatValue, gradient, indicator, markerSeries, markerSizes, markerValueLabel, noData, onHighlight, onToggle, onToggleMarkerSeries, position, style, valueLabel, }: ChartMapLegendProps): import("react").JSX.Element | null;
44
+ export {};
@@ -0,0 +1,38 @@
1
+ export interface MapTableRegionRow {
2
+ classLabel?: string;
3
+ id: string;
4
+ name: string;
5
+ rank?: number;
6
+ selected: boolean;
7
+ /** Parte do total, de 0 a 1. */
8
+ share?: number;
9
+ value: number | null;
10
+ /** Valor formatado, ou a categoria; sem ele, a celula diz que nao ha dado. */
11
+ valueText?: string;
12
+ }
13
+ export interface MapTableMarkerRow {
14
+ key: string;
15
+ name: string;
16
+ series: string;
17
+ value: string;
18
+ }
19
+ interface ChartMapTableProps {
20
+ formatPercent: (ratio: number) => string;
21
+ markerRows: readonly MapTableMarkerRow[];
22
+ markerValueLabel: string;
23
+ maxHeight?: number;
24
+ noDataLabel: string;
25
+ regionRows: readonly MapTableRegionRow[];
26
+ showClasses: boolean;
27
+ showRank: boolean;
28
+ showShare: boolean;
29
+ showValue: boolean;
30
+ title: string;
31
+ valueLabel: string;
32
+ }
33
+ /**
34
+ * Leitura completa do mapa: uma linha por regiao, com busca pelo nome e cabecalhos que ordenam. E o caminho ate as
35
+ * regioes de poucos pixels, que o ponteiro e o dedo nao alcancam.
36
+ */
37
+ export declare function ChartMapTable({ formatPercent, markerRows, markerValueLabel, maxHeight, noDataLabel, regionRows, showClasses, showRank, showShare, showValue, title, valueLabel, }: ChartMapTableProps): import("react").JSX.Element;
38
+ export {};
@@ -0,0 +1,4 @@
1
+ export { ChartMap } from './ChartMap.js';
2
+ export type { ChartMapLegendPosition, ChartMapMarker, ChartMapMarkerEvent, ChartMapMarkerSeries, ChartMapProps, ChartMapRegion, ChartMapRegionDatum, } from './ChartMap.js';
3
+ export type { ChartMapFeature, ChartMapFeatureCollection } from './mapGeometry.js';
4
+ export type { ChartMapCategory, ChartMapColorScale } from './mapScales.js';
@@ -0,0 +1,56 @@
1
+ import { type GeoProjection } from 'd3-geo';
2
+ import type { Point, Ring } from './polylabel.js';
3
+ /** Feicao GeoJSON. So `Polygon` e `MultiPolygon` se desenham; os demais tipos ficam de fora. */
4
+ export interface ChartMapFeature {
5
+ geometry: {
6
+ coordinates?: unknown;
7
+ type: string;
8
+ } | null;
9
+ id?: string | number;
10
+ properties?: Record<string, unknown> | null;
11
+ }
12
+ export interface ChartMapFeatureCollection {
13
+ features: readonly ChartMapFeature[];
14
+ }
15
+ /** A feicao como o d3-geo a desenha: sempre multipoligono, com os aneis validos e no sentido dele. */
16
+ export interface MapShape {
17
+ geometry: {
18
+ coordinates: number[][][][];
19
+ type: 'MultiPolygon';
20
+ };
21
+ properties: null;
22
+ type: 'Feature';
23
+ }
24
+ export interface MapRegion {
25
+ /** Caixa em longitude e latitude: oeste-sul e leste-norte. */
26
+ bounds: readonly [Point, Point];
27
+ feature: ChartMapFeature;
28
+ id: string;
29
+ /** Texto curto do rotulo no desenho, como a sigla. */
30
+ label: string;
31
+ name: string;
32
+ shape: MapShape;
33
+ }
34
+ export interface MapKeys {
35
+ idKey: string;
36
+ labelKey?: string;
37
+ nameKey: string;
38
+ }
39
+ export declare const MAP_PADDING = 12;
40
+ /** Teto do enquadramento do recorte, em vezes o do mapa inteiro: sozinho, o DF ocupava o palco. */
41
+ export declare const MAX_FOCUS_ZOOM = 12;
42
+ /** Le um caminho como `properties.sigla` na feicao. */
43
+ export declare function valueAt(source: unknown, path: string): unknown;
44
+ /** Regioes desenhaveis da colecao, cada uma com o identificador, o nome e o rotulo lidos pelos caminhos. */
45
+ export declare function regionsOf(collection: ChartMapFeatureCollection, { idKey, labelKey, nameKey }: MapKeys): MapRegion[];
46
+ /** Caixa projetada da regiao: oeste-norte em cima a esquerda, leste-sul embaixo a direita. */
47
+ export declare function projectedBounds(region: MapRegion, projection: GeoProjection): readonly [Point, Point];
48
+ /** Altura que o desenho pede quando ocupa a largura toda: com ela, nao sobra faixa vazia acima e abaixo. */
49
+ export declare function naturalHeight(target: readonly MapRegion[], width: number): number;
50
+ /** Projecao que enquadra o recorte na area, com teto de aproximacao relativo ao mapa inteiro. */
51
+ export declare function fitProjection(target: readonly MapRegion[], all: readonly MapRegion[], width: number, height: number): GeoProjection;
52
+ /**
53
+ * Partes da regiao na tela, sem os vertices a menos de um pixel do anterior: a busca do rotulo percorre centenas de
54
+ * pontos, e nao os milhares da malha.
55
+ */
56
+ export declare function projectedParts(region: MapRegion, projection: GeoProjection): Ring[][];
@@ -0,0 +1,51 @@
1
+ import { type Point, type Ring } from './polylabel.js';
2
+ export interface LabelCandidate {
3
+ /** Caixa da regiao na tela; as maiores rotulam primeiro. */
4
+ bounds: readonly [Point, Point];
5
+ id: string;
6
+ /** Partes da regiao na tela, cada uma com o anel externo e os furos. So e lida quando a caixa comporta o rotulo. */
7
+ parts: readonly (readonly Ring[])[];
8
+ title: string;
9
+ value?: string;
10
+ }
11
+ export interface LabelPlanOptions {
12
+ /** Leva para a coluna junto ao desenho o rotulo que nao cabe na regiao. */
13
+ callouts: boolean;
14
+ /** Distancia entre dois rotulos seguidos na coluna. */
15
+ calloutStep: number;
16
+ /** Altura do desenho, que limita quantos rotulos a coluna comporta. */
17
+ height: number;
18
+ /** Altura de uma linha de texto do rotulo dentro da regiao. */
19
+ lineHeight: number;
20
+ measure: (text: string) => number;
21
+ /** Borda direita da area de desenho; a coluna nunca passa dela. */
22
+ right: number;
23
+ }
24
+ export interface InsideLabel {
25
+ id: string;
26
+ title: string;
27
+ value?: string;
28
+ x: number;
29
+ y: number;
30
+ }
31
+ export interface CalloutLabel extends InsideLabel {
32
+ anchor: Point;
33
+ }
34
+ export interface LabelPlan {
35
+ callouts: CalloutLabel[];
36
+ inside: InsideLabel[];
37
+ }
38
+ export declare const CALLOUT_GAP = 16;
39
+ /** Espaco entre a sigla e o valor na coluna. */
40
+ export declare const CALLOUT_VALUE_GAP = 5;
41
+ /** A maior parte da regiao, pela area do anel externo: ilhas, como Fernando de Noronha, nao deslocam o rotulo. */
42
+ export declare function largestPart(parts: readonly (readonly Ring[])[]): readonly Ring[];
43
+ /** Largura do rotulo na coluna: a sigla e, ao lado, o valor. */
44
+ export declare function calloutWidth(label: Pick<InsideLabel, 'title' | 'value'>, measure: (text: string) => number): number;
45
+ /**
46
+ * Onde vai cada rotulo. Da maior regiao para a menor, entra quem cabe inteiro dentro da propria regiao, pelos quatro
47
+ * cantos, sem tocar outro rotulo; sem espaco para o valor, fica so a sigla; sem espaco nem para ela, o rotulo vai para
48
+ * uma coluna junto ao desenho, com linha guia, se a regiao esta na metade junto a ela. Quando a coluna nao comporta
49
+ * todos, como nos municipios, nenhum vai.
50
+ */
51
+ export declare function planLabels(candidates: readonly LabelCandidate[], options: LabelPlanOptions): LabelPlan;
@@ -0,0 +1,76 @@
1
+ import { type SeriesAppearance } from '../palette/index.js';
2
+ export interface ChartMapCategory extends SeriesAppearance {
3
+ id: string;
4
+ label: string;
5
+ }
6
+ /** `color` troca o azul da rampa por outra cor, de que saem os sete tons: mais escuro é maior, nos dois temas. */
7
+ export type ChartMapColorScale = {
8
+ color?: string;
9
+ domain?: readonly [number, number];
10
+ log?: boolean;
11
+ type: 'sequential';
12
+ } | {
13
+ center?: number;
14
+ domain?: readonly [number, number];
15
+ type: 'diverging';
16
+ } | {
17
+ color?: string;
18
+ count?: number;
19
+ method: 'quantile' | 'equalInterval';
20
+ type: 'classes';
21
+ } | {
22
+ color?: string;
23
+ labels?: readonly string[];
24
+ thresholds: readonly number[];
25
+ type: 'classes';
26
+ } | {
27
+ categories: readonly ChartMapCategory[];
28
+ type: 'categorical';
29
+ } | {
30
+ type: 'none';
31
+ };
32
+ export interface MapDatum {
33
+ category: string | null;
34
+ value: number | null;
35
+ }
36
+ /** Uma faixa ou categoria da legenda, que liga e desliga as regioes dela pela chave. */
37
+ export interface MapScaleEntry {
38
+ color: string;
39
+ key: string;
40
+ label: string;
41
+ }
42
+ export interface MapGradient {
43
+ log: boolean;
44
+ /** Posicao do valor na barra, de 0 a 1. */
45
+ position: (value: number) => number;
46
+ stops: readonly string[];
47
+ ticks: readonly {
48
+ position: number;
49
+ value: number;
50
+ }[];
51
+ }
52
+ export interface MapScale {
53
+ entries: readonly MapScaleEntry[];
54
+ /** Cor da regiao; `undefined` quando ela fica sem dado. */
55
+ fillOf: (datum: MapDatum) => string | undefined;
56
+ gradient?: MapGradient;
57
+ /** Chave da faixa ou da categoria da regiao, quando a legenda as controla. */
58
+ keyOf: (datum: MapDatum) => string | undefined;
59
+ /** Nome da faixa ou da categoria, para o balao e a tabela. */
60
+ labelOf: (datum: MapDatum) => string | undefined;
61
+ /** A cor mede um valor; na categorica e na nenhuma, ela so nomeia ou nao diz nada. */
62
+ numeric: boolean;
63
+ }
64
+ export declare const SEQUENTIAL_TOKENS: string[];
65
+ export declare const DIVERGING_TOKENS: string[];
66
+ /** Os sete tons a partir de uma cor: clareada até ela, depois escurecida. A mistura acompanha a cor, token ou não. */
67
+ export declare function rampFrom(color: string): string[];
68
+ /** Cor na posicao da rampa de tokens; entre dois passos, a mistura deles, que segue o tema sozinha. */
69
+ export declare function rampColor(stops: readonly string[], position: number): string;
70
+ /** Limites das faixas calculadas. Com menos valores distintos que faixas, elas diminuem, em vez de sobrar vazias. */
71
+ export declare function classThresholds(method: 'quantile' | 'equalInterval', values: readonly number[], requested?: number): number[];
72
+ /**
73
+ * Escala de cor das regioes, sobre os valores validos das regioes em jogo. As cores sao tokens, ou a mistura de dois
74
+ * deles: a troca de tema repinta o mapa sem calculo algum.
75
+ */
76
+ export declare function buildMapScale(config: ChartMapColorScale, values: readonly number[], format: (value: number) => string, accent?: string): MapScale;
@@ -0,0 +1,9 @@
1
+ export type Point = readonly [number, number];
2
+ export type Ring = readonly Point[];
3
+ /** Distancia ate a borda mais proxima, com o sinal de dentro ou fora; furos contam como borda. */
4
+ export declare function signedDistance(x: number, y: number, rings: readonly Ring[]): number;
5
+ /**
6
+ * Centro visual do poligono: o ponto interno mais distante das bordas, achado por subdivisao, como o polylabel do
7
+ * Mapbox. Num "L" ou num litoral recortado, o centroide cai fora ou colado na borda; este ponto, nao.
8
+ */
9
+ export declare function polylabel(rings: readonly Ring[], precision?: number): Point;
@@ -0,0 +1,137 @@
1
+ import { type AxisVisibility, type ChartLegendAlign } from '../core/index.js';
2
+ import { type SeriesAppearance, type SeriesIntent } from '../palette/index.js';
3
+ /** Em `calendar`, `Date` ou milissegundos desde a epoca; em `dayHours`, `Date` pela hora do dia ou a hora decimal. */
4
+ export type ChartTimelineTime = Date | number;
5
+ export type ChartTimelineScale = 'calendar' | 'dayHours';
6
+ export type ChartTimelineOverlap = 'stack' | 'overlay';
7
+ export type ChartTimelineDensity = 'sm' | 'md';
8
+ export type ChartTimelineSegmentLabels = 'auto' | 'visible' | 'hidden';
9
+ export type ChartTimelineSegmentLabelContent = 'duration' | 'label';
10
+ export type ChartTimelineLabelAlign = 'start' | 'center' | 'end';
11
+ export type ChartTimelineMarkerShape = 'line' | 'dot' | 'diamond';
12
+ export interface ChartTimelineRow {
13
+ description?: string;
14
+ /** Chave do grupo a que a linha pertence. */
15
+ group?: string;
16
+ /** Identifica a linha; o `label` pode repetir. */
17
+ key: string;
18
+ label: string;
19
+ }
20
+ export interface ChartTimelineGroup {
21
+ key: string;
22
+ label: string;
23
+ }
24
+ export interface ChartTimelineSeries extends SeriesAppearance {
25
+ label: string;
26
+ }
27
+ export interface ChartTimelineSegment {
28
+ end: ChartTimelineTime;
29
+ /** Nome do intervalo, como a reuniao ou o responsavel. */
30
+ label?: string;
31
+ /** De 0 a 1. */
32
+ progress?: number;
33
+ /** `key` da linha. */
34
+ row: string;
35
+ /** `label` da serie. */
36
+ series: string;
37
+ start: ChartTimelineTime;
38
+ }
39
+ export interface ChartTimelineState {
40
+ row: string;
41
+ /** `label` da serie. */
42
+ state: string;
43
+ time: ChartTimelineTime;
44
+ }
45
+ export interface ChartTimelineRowBand {
46
+ end: ChartTimelineTime;
47
+ row: string;
48
+ series: string;
49
+ start: ChartTimelineTime;
50
+ }
51
+ export interface ChartTimelineBand {
52
+ end: ChartTimelineTime;
53
+ label?: string;
54
+ series: string;
55
+ start: ChartTimelineTime;
56
+ }
57
+ export interface ChartTimelineMarker {
58
+ label?: string;
59
+ row: string;
60
+ series: string;
61
+ shape?: ChartTimelineMarkerShape;
62
+ time: ChartTimelineTime;
63
+ }
64
+ export interface ChartTimelineReferenceLine {
65
+ intent?: SeriesIntent;
66
+ label: string;
67
+ time: ChartTimelineTime;
68
+ }
69
+ export interface ChartTimelineSummary {
70
+ subtitle?: string;
71
+ title: string;
72
+ }
73
+ export interface ChartTimelineProps {
74
+ /** Cor de tema que abre a paleta das séries sem cor nem intenção, como nos demais gráficos. */
75
+ accent?: string;
76
+ axisPosition?: 'top' | 'bottom';
77
+ /** Faixas globais, hachuradas em todas as linhas, como o adicional noturno ou o fim de semana. */
78
+ bands?: readonly ChartTimelineBand[];
79
+ collapsedGroups?: readonly string[];
80
+ collapsibleGroups?: boolean;
81
+ /** Em largura estreita, o resumo vai para baixo do rotulo ou sai. */
82
+ compactSummary?: 'below' | 'hidden';
83
+ defaultCollapsedGroups?: readonly string[];
84
+ defaultHiddenSeries?: readonly string[];
85
+ density?: ChartTimelineDensity;
86
+ /** Faixa fixa do eixo. Sem ela, do primeiro ao ultimo instante, arredondada a hora ou ao dia. */
87
+ domain?: readonly [ChartTimelineTime, ChartTimelineTime];
88
+ emptyMessage?: string;
89
+ emptyRowLabel?: string;
90
+ formatTick?: (time: Date) => string;
91
+ formatTime?: (time: Date) => string;
92
+ formatTooltipValue?: (durationMs: number) => string;
93
+ /** Formato das duracoes no rotulo da barra, na descricao e na tabela. */
94
+ formatValue?: (durationMs: number) => string;
95
+ groups?: readonly ChartTimelineGroup[];
96
+ hiddenSeries?: readonly string[];
97
+ highlightOnHover?: boolean;
98
+ legend?: 'top' | 'bottom' | 'none';
99
+ legendAlign?: ChartLegendAlign;
100
+ markers?: readonly ChartTimelineMarker[];
101
+ mergeConsecutive?: boolean;
102
+ /** Abaixo dessa largura, o desenho rola de lado dentro do conteiner, com rotulos e resumo fixos. */
103
+ minPlotWidth?: number;
104
+ onCollapsedGroupsChange?: (collapsed: readonly string[]) => void;
105
+ onHiddenSeriesChange?: (hidden: readonly string[]) => void;
106
+ /** Com ele, os intervalos viram botoes e entram no teclado. */
107
+ onSegmentClick?: (segment: ChartTimelineSegment, row: ChartTimelineRow) => void;
108
+ overlap?: ChartTimelineOverlap;
109
+ referenceLines?: readonly ChartTimelineReferenceLine[];
110
+ rowBands?: readonly ChartTimelineRowBand[];
111
+ rowGap?: number;
112
+ rowLabelWidth?: number | 'auto';
113
+ /** Coluna de resumo, calculada sobre os intervalos visiveis da linha: a legenda filtra a leitura inteira. */
114
+ rowSummary?: (row: ChartTimelineRow, segments: readonly ChartTimelineSegment[]) => ChartTimelineSummary | undefined;
115
+ rows: readonly ChartTimelineRow[];
116
+ segmentLabel?: ChartTimelineSegmentLabelContent;
117
+ segmentLabelAlign?: ChartTimelineLabelAlign;
118
+ segments?: readonly ChartTimelineSegment[];
119
+ series: readonly ChartTimelineSeries[];
120
+ showGrid?: boolean;
121
+ showProgress?: boolean;
122
+ showSegmentLabels?: ChartTimelineSegmentLabels;
123
+ showTooltip?: boolean;
124
+ /** Alternativa a `segments`: cada mudanca de estado vale ate a seguinte. */
125
+ states?: readonly ChartTimelineState[];
126
+ /** Fim do ultimo estado de cada linha, como o instante atual. Sem ele, o fim do eixo. */
127
+ statesEnd?: ChartTimelineTime;
128
+ timeScale?: ChartTimelineScale;
129
+ title: string;
130
+ xAxis?: AxisVisibility;
131
+ }
132
+ /**
133
+ * Barras de intervalo em linhas sobre um eixo de tempo continuo: quem fez o que, de quando ate quando. O desenho e
134
+ * imagem nomeada pelo titulo; com `onSegmentClick`, um grupo cujos intervalos sao botoes de tabulacao movel. A leitura
135
+ * medida a medida esta na visao em tabela.
136
+ */
137
+ export declare function ChartTimeline({ accent, axisPosition, bands, collapsedGroups, collapsibleGroups, compactSummary, defaultCollapsedGroups, defaultHiddenSeries, density, domain, emptyMessage, emptyRowLabel, formatTick, formatTime, formatTooltipValue, formatValue, groups, hiddenSeries, highlightOnHover, legend, legendAlign, markers, mergeConsecutive, minPlotWidth, onCollapsedGroupsChange, onHiddenSeriesChange, onSegmentClick, overlap, referenceLines, rowBands, rowGap, rowLabelWidth, rowSummary, rows, segmentLabel, segmentLabelAlign, segments, series, showGrid, showProgress, showSegmentLabels, showTooltip, states, statesEnd, timeScale, title, xAxis, }: ChartTimelineProps): import("react").JSX.Element;