@plenustech/design-system 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (151) hide show
  1. package/README.md +209 -0
  2. package/dist/design-system.css +1 -0
  3. package/dist/folha.d.ts +7 -0
  4. package/dist/plenus-design-system.cjs +2 -0
  5. package/dist/plenus-design-system.cjs.map +1 -0
  6. package/dist/plenus-design-system.es.js +5853 -0
  7. package/dist/plenus-design-system.es.js.map +1 -0
  8. package/dist/reset.css +79 -0
  9. package/dist/types/components/actions/Button/Button.d.ts +9 -0
  10. package/dist/types/components/actions/Button/index.d.ts +2 -0
  11. package/dist/types/components/charts/ChartArea/ChartArea.d.ts +35 -0
  12. package/dist/types/components/charts/ChartArea/index.d.ts +2 -0
  13. package/dist/types/components/charts/ChartBar/ChartBar.d.ts +31 -0
  14. package/dist/types/components/charts/ChartBar/index.d.ts +2 -0
  15. package/dist/types/components/charts/ChartCombo/ChartCombo.d.ts +44 -0
  16. package/dist/types/components/charts/ChartCombo/index.d.ts +2 -0
  17. package/dist/types/components/charts/ChartDonut/ChartDonut.d.ts +31 -0
  18. package/dist/types/components/charts/ChartDonut/index.d.ts +2 -0
  19. package/dist/types/components/charts/ChartLine/ChartLine.d.ts +34 -0
  20. package/dist/types/components/charts/ChartLine/index.d.ts +2 -0
  21. package/dist/types/components/charts/ChartPie/ChartPie.d.ts +27 -0
  22. package/dist/types/components/charts/ChartPie/index.d.ts +2 -0
  23. package/dist/types/components/charts/ChartRadial/ChartRadial.d.ts +32 -0
  24. package/dist/types/components/charts/ChartRadial/index.d.ts +2 -0
  25. package/dist/types/components/charts/ChartSankey/ChartSankey.d.ts +41 -0
  26. package/dist/types/components/charts/ChartSankey/index.d.ts +2 -0
  27. package/dist/types/components/charts/ChartScatter/ChartScatter.d.ts +37 -0
  28. package/dist/types/components/charts/ChartScatter/index.d.ts +2 -0
  29. package/dist/types/components/charts/ChartSunburst/ChartSunburst.d.ts +27 -0
  30. package/dist/types/components/charts/ChartSunburst/index.d.ts +2 -0
  31. package/dist/types/components/charts/ChartTooltip/ChartTooltip.d.ts +41 -0
  32. package/dist/types/components/charts/ChartTooltip/index.d.ts +2 -0
  33. package/dist/types/components/charts/ChartTreemap/ChartTreemap.d.ts +30 -0
  34. package/dist/types/components/charts/ChartTreemap/index.d.ts +2 -0
  35. package/dist/types/components/charts/ChartWaterfall/ChartWaterfall.d.ts +24 -0
  36. package/dist/types/components/charts/ChartWaterfall/index.d.ts +2 -0
  37. package/dist/types/components/charts/core/Axis.d.ts +18 -0
  38. package/dist/types/components/charts/core/BandCursor.d.ts +15 -0
  39. package/dist/types/components/charts/core/CartesianFrame.d.ts +41 -0
  40. package/dist/types/components/charts/core/ChartFrame.d.ts +31 -0
  41. package/dist/types/components/charts/core/ChartLegend.d.ts +24 -0
  42. package/dist/types/components/charts/core/Grid.d.ts +12 -0
  43. package/dist/types/components/charts/core/arcs.d.ts +27 -0
  44. package/dist/types/components/charts/core/cartesianLayout.d.ts +70 -0
  45. package/dist/types/components/charts/core/centerText.d.ts +14 -0
  46. package/dist/types/components/charts/core/index.d.ts +36 -0
  47. package/dist/types/components/charts/core/measureText.d.ts +25 -0
  48. package/dist/types/components/charts/core/shapes.d.ts +26 -0
  49. package/dist/types/components/charts/core/slices.d.ts +18 -0
  50. package/dist/types/components/charts/core/spacing.d.ts +39 -0
  51. package/dist/types/components/charts/core/useChartMetrics.d.ts +19 -0
  52. package/dist/types/components/charts/core/useHoveredBand.d.ts +9 -0
  53. package/dist/types/components/charts/core/useSeriesToggle.d.ts +16 -0
  54. package/dist/types/components/charts/core/useSliceRing.d.ts +31 -0
  55. package/dist/types/components/charts/core/useTweenedNumbers.d.ts +14 -0
  56. package/dist/types/components/charts/palette/index.d.ts +3 -0
  57. package/dist/types/components/charts/palette/palette.d.ts +17 -0
  58. package/dist/types/components/charts/palette/seriesColor.d.ts +24 -0
  59. package/dist/types/components/charts/scales/index.d.ts +2 -0
  60. package/dist/types/components/charts/scales/scales.d.ts +57 -0
  61. package/dist/types/components/data-display/Accordion/Accordion.d.ts +20 -0
  62. package/dist/types/components/data-display/Accordion/index.d.ts +2 -0
  63. package/dist/types/components/data-display/Avatar/Avatar.d.ts +8 -0
  64. package/dist/types/components/data-display/Avatar/index.d.ts +2 -0
  65. package/dist/types/components/data-display/Badge/Badge.d.ts +8 -0
  66. package/dist/types/components/data-display/Badge/index.d.ts +2 -0
  67. package/dist/types/components/data-display/Card/Card.d.ts +29 -0
  68. package/dist/types/components/data-display/Card/index.d.ts +2 -0
  69. package/dist/types/components/data-display/List/List.d.ts +40 -0
  70. package/dist/types/components/data-display/List/ListingOptions.d.ts +20 -0
  71. package/dist/types/components/data-display/List/index.d.ts +2 -0
  72. package/dist/types/components/data-display/List/useListing.d.ts +35 -0
  73. package/dist/types/components/data-display/List/useVirtualWindow.d.ts +25 -0
  74. package/dist/types/components/data-display/Table/Table.d.ts +78 -0
  75. package/dist/types/components/data-display/Table/index.d.ts +2 -0
  76. package/dist/types/components/feedback/Alert/Alert.d.ts +8 -0
  77. package/dist/types/components/feedback/Alert/index.d.ts +2 -0
  78. package/dist/types/components/feedback/Progress/Progress.d.ts +10 -0
  79. package/dist/types/components/feedback/Progress/index.d.ts +2 -0
  80. package/dist/types/components/feedback/Spinner/Spinner.d.ts +7 -0
  81. package/dist/types/components/feedback/Spinner/index.d.ts +2 -0
  82. package/dist/types/components/forms/Checkbox/Checkbox.d.ts +8 -0
  83. package/dist/types/components/forms/Checkbox/index.d.ts +2 -0
  84. package/dist/types/components/forms/ComboBox/ComboBox.d.ts +29 -0
  85. package/dist/types/components/forms/ComboBox/index.d.ts +2 -0
  86. package/dist/types/components/forms/DatePicker/Calendar.d.ts +9 -0
  87. package/dist/types/components/forms/DatePicker/DatePicker.d.ts +29 -0
  88. package/dist/types/components/forms/DatePicker/index.d.ts +2 -0
  89. package/dist/types/components/forms/DateTimePicker/DateTimePicker.d.ts +33 -0
  90. package/dist/types/components/forms/DateTimePicker/index.d.ts +2 -0
  91. package/dist/types/components/forms/Field/Field.d.ts +19 -0
  92. package/dist/types/components/forms/Field/index.d.ts +2 -0
  93. package/dist/types/components/forms/InputCurrency/InputCurrency.d.ts +9 -0
  94. package/dist/types/components/forms/InputCurrency/index.d.ts +2 -0
  95. package/dist/types/components/forms/InputNumber/InputNumber.d.ts +8 -0
  96. package/dist/types/components/forms/InputNumber/index.d.ts +2 -0
  97. package/dist/types/components/forms/InputPassword/InputPassword.d.ts +13 -0
  98. package/dist/types/components/forms/InputPassword/index.d.ts +2 -0
  99. package/dist/types/components/forms/InputText/InputText.d.ts +10 -0
  100. package/dist/types/components/forms/InputText/index.d.ts +2 -0
  101. package/dist/types/components/forms/Label/Label.d.ts +5 -0
  102. package/dist/types/components/forms/Label/index.d.ts +2 -0
  103. package/dist/types/components/forms/RadioGroup/Radio.d.ts +6 -0
  104. package/dist/types/components/forms/RadioGroup/RadioGroup.d.ts +25 -0
  105. package/dist/types/components/forms/RadioGroup/index.d.ts +4 -0
  106. package/dist/types/components/forms/Select/Select.d.ts +26 -0
  107. package/dist/types/components/forms/Select/index.d.ts +2 -0
  108. package/dist/types/components/forms/Switch/Switch.d.ts +7 -0
  109. package/dist/types/components/forms/Switch/index.d.ts +2 -0
  110. package/dist/types/components/forms/Textarea/Textarea.d.ts +10 -0
  111. package/dist/types/components/forms/Textarea/index.d.ts +2 -0
  112. package/dist/types/components/forms/TimePicker/TimePicker.d.ts +28 -0
  113. package/dist/types/components/forms/TimePicker/TimeSlots.d.ts +22 -0
  114. package/dist/types/components/forms/TimePicker/index.d.ts +2 -0
  115. package/dist/types/components/icons/Icon.d.ts +23 -0
  116. package/dist/types/components/icons/icons.d.ts +12 -0
  117. package/dist/types/components/icons/index.d.ts +2 -0
  118. package/dist/types/components/navigation/Breadcrumb/Breadcrumb.d.ts +17 -0
  119. package/dist/types/components/navigation/Breadcrumb/index.d.ts +2 -0
  120. package/dist/types/components/navigation/Pagination/Pagination.d.ts +11 -0
  121. package/dist/types/components/navigation/Pagination/index.d.ts +2 -0
  122. package/dist/types/components/navigation/Tabs/Tabs.d.ts +17 -0
  123. package/dist/types/components/navigation/Tabs/index.d.ts +2 -0
  124. package/dist/types/components/overlays/Dialog/Dialog.d.ts +13 -0
  125. package/dist/types/components/overlays/Dialog/index.d.ts +2 -0
  126. package/dist/types/components/overlays/Menu/Menu.d.ts +13 -0
  127. package/dist/types/components/overlays/Menu/index.d.ts +2 -0
  128. package/dist/types/components/overlays/Popover/Popover.d.ts +13 -0
  129. package/dist/types/components/overlays/Popover/index.d.ts +2 -0
  130. package/dist/types/components/overlays/Tooltip/Tooltip.d.ts +9 -0
  131. package/dist/types/components/overlays/Tooltip/index.d.ts +2 -0
  132. package/dist/types/hooks/useCalendar/calendar.d.ts +16 -0
  133. package/dist/types/hooks/useCalendar/index.d.ts +3 -0
  134. package/dist/types/hooks/useCalendar/useCalendar.d.ts +21 -0
  135. package/dist/types/hooks/useCharacterCount/index.d.ts +1 -0
  136. package/dist/types/hooks/useCharacterCount/useCharacterCount.d.ts +7 -0
  137. package/dist/types/hooks/useFormReset.d.ts +6 -0
  138. package/dist/types/hooks/useSelection/index.d.ts +3 -0
  139. package/dist/types/hooks/useSelection/selection.d.ts +25 -0
  140. package/dist/types/hooks/useSelection/useSelection.d.ts +26 -0
  141. package/dist/types/index.d.ts +97 -0
  142. package/dist/types/utils/formatters/formatarData.d.ts +10 -0
  143. package/dist/types/utils/formatters/formatarEntradaData.d.ts +5 -0
  144. package/dist/types/utils/formatters/formatarEntradaDecimal.d.ts +1 -0
  145. package/dist/types/utils/formatters/formatarEntradaMonetaria.d.ts +1 -0
  146. package/dist/types/utils/formatters/formatarNumero.d.ts +27 -0
  147. package/dist/types/utils/formatters/index.d.ts +7 -0
  148. package/dist/types/utils/mergeRefs.d.ts +7 -0
  149. package/dist/types/utils/textSearch/index.d.ts +1 -0
  150. package/dist/types/utils/textSearch/textSearch.d.ts +2 -0
  151. package/package.json +86 -0
package/dist/reset.css ADDED
@@ -0,0 +1,79 @@
1
+ /* ==========================================================================
2
+ Plenustech Design System — reset.css
3
+ Base de pagina, opcional. Importe em aplicacao nova, para herdar a
4
+ tipografia e o cromo do sistema:
5
+
6
+ import '@plenustech/design-system/reset.css';
7
+
8
+ Aplicacao existente pode dispensar: os componentes nao dependem daqui.
9
+ ========================================================================== */
10
+
11
+ html {
12
+ -webkit-text-size-adjust: 100%;
13
+ }
14
+
15
+ body {
16
+ margin: 0;
17
+ background: var(--pl-bg);
18
+ color: var(--pl-text);
19
+ font-family: var(--pl-font-body);
20
+ font-size: var(--pl-type-body-size);
21
+ line-height: var(--pl-leading);
22
+ -webkit-font-smoothing: antialiased;
23
+ text-rendering: optimizeLegibility;
24
+ }
25
+
26
+ h1, h2, h3, h4, h5, h6 {
27
+ margin: 0;
28
+ font-family: var(--pl-font-heading);
29
+ font-weight: var(--pl-weight-semibold);
30
+ line-height: var(--pl-leading-tight);
31
+ }
32
+
33
+ p, figure, blockquote { margin: 0; }
34
+ ul, ol { margin: 0; padding: 0; }
35
+ img, svg, video { display: block; max-width: 100%; }
36
+
37
+ a {
38
+ color: var(--pl-color-primary-active);
39
+ text-decoration: none;
40
+ }
41
+
42
+ a:hover { text-decoration: underline; }
43
+
44
+ /* Controles nativos herdam a tipografia do contexto. */
45
+ input, button, textarea, select {
46
+ font-family: inherit;
47
+ font-size: inherit;
48
+ color: inherit;
49
+ }
50
+
51
+ select {
52
+ appearance: none;
53
+ -webkit-appearance: none;
54
+ background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2395989B' stroke-width='2.4' stroke-linecap='round'><path d='M6 9l6 6 6-6'/></svg>");
55
+ background-repeat: no-repeat;
56
+ background-position: right 10px center;
57
+ padding-right: 30px;
58
+ }
59
+
60
+ ::selection {
61
+ background: var(--pl-primary);
62
+ color: var(--pl-on-primary);
63
+ }
64
+
65
+ /* Foco visivel para o que a pagina traz. Os componentes do sistema definem o
66
+ proprio anel e nao dependem desta regra. */
67
+ :focus-visible {
68
+ outline: 2px solid var(--pl-color-primary);
69
+ outline-offset: 2px;
70
+ }
71
+
72
+ ::-webkit-scrollbar { width: 10px; height: 10px; }
73
+
74
+ ::-webkit-scrollbar-thumb {
75
+ background: var(--pl-border-strong);
76
+ border-radius: var(--pl-radius-md);
77
+ border: 3px solid transparent;
78
+ background-clip: content-box;
79
+ }
@@ -0,0 +1,9 @@
1
+ import { type ButtonHTMLAttributes } from 'react';
2
+ export type ButtonVariant = 'primary' | 'secondary' | 'soft' | 'ghost' | 'danger';
3
+ export type ButtonSize = 'sm' | 'md' | 'lg';
4
+ export interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
5
+ variant?: ButtonVariant;
6
+ size?: ButtonSize;
7
+ loading?: boolean;
8
+ }
9
+ export declare const Button: import("react").ForwardRefExoticComponent<ButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
@@ -0,0 +1,2 @@
1
+ export { Button } from './Button.js';
2
+ export type { ButtonProps, ButtonSize, ButtonVariant } from './Button.js';
@@ -0,0 +1,35 @@
1
+ import { type AxisLabelAngle, type AxisVisibility, type ChartCurve, type ChartHeight, type ChartLegendAlign, type ChartLegendPosition } from '../core/index.js';
2
+ import { type SeriesAppearance } from '../palette/index.js';
3
+ export interface ChartAreaSeries extends SeriesAppearance {
4
+ label: string;
5
+ values: readonly (number | null)[];
6
+ }
7
+ export interface ChartAreaProps {
8
+ accent?: string;
9
+ categories: readonly string[];
10
+ curve?: ChartCurve;
11
+ defaultHiddenSeries?: readonly string[];
12
+ emptyMessage?: string;
13
+ formatValue?: (value: number) => string;
14
+ /**
15
+ * Inclui o zero no dominio do eixo de valor. Ligado por padrao, porque marca
16
+ * que nao parte do zero exagera a diferenca; para medidas que nao se comparam
17
+ * a ele — um ano, uma temperatura — desligue.
18
+ */
19
+ includeZero?: boolean;
20
+ height?: ChartHeight;
21
+ hiddenSeries?: readonly string[];
22
+ labelAngle?: AxisLabelAngle;
23
+ legend?: ChartLegendPosition;
24
+ legendAlign?: ChartLegendAlign;
25
+ onHiddenSeriesChange?: (hidden: readonly string[]) => void;
26
+ series: readonly ChartAreaSeries[];
27
+ showDataLabels?: boolean;
28
+ showDots?: boolean;
29
+ stacked?: boolean;
30
+ title: string;
31
+ xAxis?: AxisVisibility;
32
+ yAxis?: AxisVisibility;
33
+ yAxisRight?: AxisVisibility;
34
+ }
35
+ export declare function ChartArea({ accent, categories, curve, defaultHiddenSeries, emptyMessage, formatValue, height, includeZero, hiddenSeries, labelAngle, legend, legendAlign, onHiddenSeriesChange, series, showDataLabels, showDots, stacked, title, xAxis, yAxis, yAxisRight, }: ChartAreaProps): import("react").JSX.Element;
@@ -0,0 +1,2 @@
1
+ export { ChartArea } from './ChartArea.js';
2
+ export type { ChartAreaProps, ChartAreaSeries } from './ChartArea.js';
@@ -0,0 +1,31 @@
1
+ import { type AxisLabelAngle, type AxisVisibility, type ChartHeight, type ChartLegendAlign, type ChartLegendPosition } from '../core/index.js';
2
+ import { type SeriesAppearance } from '../palette/index.js';
3
+ export type ChartBarOrientation = 'vertical' | 'horizontal';
4
+ export interface ChartBarSeries extends SeriesAppearance {
5
+ label: string;
6
+ values: readonly number[];
7
+ }
8
+ export interface ChartBarProps {
9
+ accent?: string;
10
+ categories: readonly string[];
11
+ defaultHiddenSeries?: readonly string[];
12
+ emptyMessage?: string;
13
+ formatValue?: (value: number) => string;
14
+ height?: ChartHeight;
15
+ hiddenSeries?: readonly string[];
16
+ labelAngle?: AxisLabelAngle;
17
+ legend?: ChartLegendPosition;
18
+ legendAlign?: ChartLegendAlign;
19
+ onHiddenSeriesChange?: (hidden: readonly string[]) => void;
20
+ /** Indice da categoria sob o ponteiro, ou `null` ao sair dela. */
21
+ onHoverCategory?: (index: number | null) => void;
22
+ orientation?: ChartBarOrientation;
23
+ series: readonly ChartBarSeries[];
24
+ showDataLabels?: boolean;
25
+ stacked?: boolean;
26
+ title: string;
27
+ xAxis?: AxisVisibility;
28
+ yAxis?: AxisVisibility;
29
+ yAxisRight?: AxisVisibility;
30
+ }
31
+ export declare function ChartBar({ accent, categories, defaultHiddenSeries, emptyMessage, formatValue, height, hiddenSeries, labelAngle, legend, legendAlign, onHiddenSeriesChange, onHoverCategory, orientation, series, showDataLabels, stacked, title, xAxis, yAxis, yAxisRight, }: ChartBarProps): import("react").JSX.Element;
@@ -0,0 +1,2 @@
1
+ export { ChartBar } from './ChartBar.js';
2
+ export type { ChartBarOrientation, ChartBarProps, ChartBarSeries } from './ChartBar.js';
@@ -0,0 +1,44 @@
1
+ import { type AxisLabelAngle, type AxisVisibility, type ChartCurve, type ChartHeight, type ChartLegendAlign, type ChartLegendPosition } from '../core/index.js';
2
+ import { type SeriesAppearance } from '../palette/index.js';
3
+ export type ChartComboKind = 'bar' | 'line';
4
+ /**
5
+ * Eixo de valor a que a serie pertence. A escolha e sempre do produto: o
6
+ * grafico nunca parte a escala por conta propria.
7
+ */
8
+ export type ChartComboAxis = 'left' | 'right';
9
+ export interface ChartComboSeries extends SeriesAppearance {
10
+ axis?: ChartComboAxis;
11
+ kind: ChartComboKind;
12
+ label: string;
13
+ values: readonly (number | null)[];
14
+ }
15
+ export interface ChartComboProps {
16
+ accent?: string;
17
+ categories: readonly string[];
18
+ curve?: ChartCurve;
19
+ defaultHiddenSeries?: readonly string[];
20
+ emptyMessage?: string;
21
+ formatRightValue?: (value: number) => string;
22
+ formatValue?: (value: number) => string;
23
+ height?: ChartHeight;
24
+ hiddenSeries?: readonly string[];
25
+ labelAngle?: AxisLabelAngle;
26
+ legend?: ChartLegendPosition;
27
+ legendAlign?: ChartLegendAlign;
28
+ onHiddenSeriesChange?: (hidden: readonly string[]) => void;
29
+ /** Indice da categoria sob o ponteiro, ou `null` ao sair dela. */
30
+ onHoverCategory?: (index: number | null) => void;
31
+ series: readonly ChartComboSeries[];
32
+ showDataLabels?: boolean;
33
+ showDots?: boolean;
34
+ title: string;
35
+ xAxis?: AxisVisibility;
36
+ yAxis?: AxisVisibility;
37
+ yAxisRight?: AxisVisibility;
38
+ }
39
+ /**
40
+ * Barras e linhas sobre o mesmo eixo de categorias. Uma serie declara a que
41
+ * eixo de valor pertence; sem nenhuma a direita, o dominio e unico e o eixo
42
+ * direito espelha o esquerdo.
43
+ */
44
+ export declare function ChartCombo({ accent, categories, curve, defaultHiddenSeries, emptyMessage, formatRightValue, formatValue, height, hiddenSeries, labelAngle, legend, legendAlign, onHiddenSeriesChange, onHoverCategory, series, showDataLabels, showDots, title, xAxis, yAxis, yAxisRight, }: ChartComboProps): import("react").JSX.Element;
@@ -0,0 +1,2 @@
1
+ export { ChartCombo } from './ChartCombo.js';
2
+ export type { ChartComboAxis, ChartComboKind, ChartComboProps, ChartComboSeries } from './ChartCombo.js';
@@ -0,0 +1,31 @@
1
+ import { type ChartHeight, type ChartLegendAlign, type ChartLegendPosition, type ChartSlice } from '../core/index.js';
2
+ export type { ChartSlice as ChartDonutSlice };
3
+ export interface ChartDonutProps {
4
+ accent?: string;
5
+ /** Texto sob o valor do centro, trocado pelo rotulo da fatia sob o ponteiro. */
6
+ centerLabel?: string;
7
+ defaultHiddenSlices?: readonly string[];
8
+ emptyMessage?: string;
9
+ formatPercent?: (ratio: number) => string;
10
+ formatValue?: (value: number) => string;
11
+ height?: ChartHeight;
12
+ hiddenSlices?: readonly string[];
13
+ legend?: ChartLegendPosition;
14
+ legendAlign?: ChartLegendAlign;
15
+ onHiddenSlicesChange?: (hidden: readonly string[]) => void;
16
+ /** Fatia sob o ponteiro, ja agrupada, ou `null` ao sair dela. */
17
+ onHoverSlice?: (slice: ChartSlice | null) => void;
18
+ /** Rotulo da fatia que reune as pequenas. */
19
+ otherLabel?: string;
20
+ /** Raio dos cantos de cada fatia. Sem valor, o token de raio pequeno. */
21
+ sliceRadius?: number;
22
+ showCenter?: boolean;
23
+ showLegendValues?: boolean;
24
+ slices: readonly ChartSlice[];
25
+ /** Fracao do total abaixo da qual a fatia entra no agrupamento. */
26
+ smallSliceThreshold?: number;
27
+ /** Espessura do anel, como fracao do raio. */
28
+ thickness?: number;
29
+ title: string;
30
+ }
31
+ export declare function ChartDonut({ accent, centerLabel, defaultHiddenSlices, emptyMessage, formatPercent, formatValue, height, hiddenSlices, legend, legendAlign, onHiddenSlicesChange, onHoverSlice, otherLabel, showCenter, showLegendValues, sliceRadius, slices, smallSliceThreshold, thickness, title, }: ChartDonutProps): import("react").JSX.Element;
@@ -0,0 +1,2 @@
1
+ export { ChartDonut } from './ChartDonut.js';
2
+ export type { ChartDonutProps, ChartDonutSlice } from './ChartDonut.js';
@@ -0,0 +1,34 @@
1
+ import { type AxisLabelAngle, type AxisVisibility, type ChartCurve, type ChartHeight, type ChartLegendAlign, type ChartLegendPosition } from '../core/index.js';
2
+ import { type SeriesAppearance } from '../palette/index.js';
3
+ export interface ChartLineSeries extends SeriesAppearance {
4
+ label: string;
5
+ values: readonly (number | null)[];
6
+ }
7
+ export interface ChartLineProps {
8
+ accent?: string;
9
+ categories: readonly string[];
10
+ curve?: ChartCurve;
11
+ defaultHiddenSeries?: readonly string[];
12
+ emptyMessage?: string;
13
+ formatValue?: (value: number) => string;
14
+ /**
15
+ * Inclui o zero no dominio do eixo de valor. Ligado por padrao, porque marca
16
+ * que nao parte do zero exagera a diferenca; para medidas que nao se comparam
17
+ * a ele — um ano, uma temperatura — desligue.
18
+ */
19
+ includeZero?: boolean;
20
+ height?: ChartHeight;
21
+ hiddenSeries?: readonly string[];
22
+ labelAngle?: AxisLabelAngle;
23
+ legend?: ChartLegendPosition;
24
+ legendAlign?: ChartLegendAlign;
25
+ onHiddenSeriesChange?: (hidden: readonly string[]) => void;
26
+ series: readonly ChartLineSeries[];
27
+ showDataLabels?: boolean;
28
+ showDots?: boolean;
29
+ title: string;
30
+ xAxis?: AxisVisibility;
31
+ yAxis?: AxisVisibility;
32
+ yAxisRight?: AxisVisibility;
33
+ }
34
+ export declare function ChartLine({ accent, categories, curve, defaultHiddenSeries, emptyMessage, formatValue, height, includeZero, hiddenSeries, labelAngle, legend, legendAlign, onHiddenSeriesChange, series, showDataLabels, showDots, title, xAxis, yAxis, yAxisRight, }: ChartLineProps): import("react").JSX.Element;
@@ -0,0 +1,2 @@
1
+ export { ChartLine } from './ChartLine.js';
2
+ export type { ChartLineProps, ChartLineSeries } from './ChartLine.js';
@@ -0,0 +1,27 @@
1
+ import { type ChartHeight, type ChartLegendAlign, type ChartLegendPosition, type ChartSlice } from '../core/index.js';
2
+ export type { ChartSlice as ChartPieSlice };
3
+ export interface ChartPieProps {
4
+ accent?: string;
5
+ defaultHiddenSlices?: readonly string[];
6
+ emptyMessage?: string;
7
+ formatPercent?: (ratio: number) => string;
8
+ formatValue?: (value: number) => string;
9
+ height?: ChartHeight;
10
+ hiddenSlices?: readonly string[];
11
+ legend?: ChartLegendPosition;
12
+ legendAlign?: ChartLegendAlign;
13
+ onHiddenSlicesChange?: (hidden: readonly string[]) => void;
14
+ /** Fatia sob o ponteiro, ja agrupada, ou `null` ao sair dela. */
15
+ onHoverSlice?: (slice: ChartSlice | null) => void;
16
+ /** Rotulo da fatia que reune as pequenas. */
17
+ otherLabel?: string;
18
+ showDataLabels?: boolean;
19
+ showLegendValues?: boolean;
20
+ /** Raio dos cantos de cada fatia. Sem valor, o token de raio pequeno. */
21
+ sliceRadius?: number;
22
+ slices: readonly ChartSlice[];
23
+ /** Fracao do total abaixo da qual a fatia entra no agrupamento. */
24
+ smallSliceThreshold?: number;
25
+ title: string;
26
+ }
27
+ export declare function ChartPie({ accent, defaultHiddenSlices, emptyMessage, formatPercent, formatValue, height, hiddenSlices, legend, legendAlign, onHiddenSlicesChange, onHoverSlice, otherLabel, showDataLabels, showLegendValues, sliceRadius, slices, smallSliceThreshold, title, }: ChartPieProps): import("react").JSX.Element;
@@ -0,0 +1,2 @@
1
+ export { ChartPie } from './ChartPie.js';
2
+ export type { ChartPieProps, ChartPieSlice } from './ChartPie.js';
@@ -0,0 +1,32 @@
1
+ import { type ChartHeight, type ChartLegendAlign, type ChartLegendPosition } from '../core/index.js';
2
+ import { type SeriesAppearance } from '../palette/index.js';
3
+ export interface ChartRadialTrack extends SeriesAppearance {
4
+ label: string;
5
+ /** Meta da medida. Sem ela, a meta e o maior valor entre os aneis. */
6
+ max?: number;
7
+ value: number;
8
+ }
9
+ export interface ChartRadialProps {
10
+ accent?: string;
11
+ /** Texto sob o valor do centro. Sem ele, o rotulo do primeiro anel. */
12
+ centerLabel?: string;
13
+ defaultHiddenTracks?: readonly string[];
14
+ emptyMessage?: string;
15
+ /** Angulo final da volta, em graus a partir do topo. Meia-lua usa 180. */
16
+ endAngle?: number;
17
+ formatValue?: (value: number) => string;
18
+ height?: ChartHeight;
19
+ hiddenTracks?: readonly string[];
20
+ legend?: ChartLegendPosition;
21
+ legendAlign?: ChartLegendAlign;
22
+ onHiddenTracksChange?: (hidden: readonly string[]) => void;
23
+ showCenter?: boolean;
24
+ startAngle?: number;
25
+ /** Raio das pontas do arco. Sem valor, o token de raio pequeno. */
26
+ trackRadius?: number;
27
+ /** Espessura de cada anel, em pixels. */
28
+ thickness?: number;
29
+ title: string;
30
+ tracks: readonly ChartRadialTrack[];
31
+ }
32
+ export declare function ChartRadial({ accent, centerLabel, defaultHiddenTracks, emptyMessage, endAngle, formatValue, height, hiddenTracks, legend, legendAlign, onHiddenTracksChange, showCenter, startAngle, thickness, trackRadius, title, tracks, }: ChartRadialProps): import("react").JSX.Element;
@@ -0,0 +1,2 @@
1
+ export { ChartRadial } from './ChartRadial.js';
2
+ export type { ChartRadialProps, ChartRadialTrack } from './ChartRadial.js';
@@ -0,0 +1,41 @@
1
+ import { type ChartHeight } from '../core/index.js';
2
+ import { type SeriesAppearance } from '../palette/index.js';
3
+ export interface ChartSankeyNode extends SeriesAppearance {
4
+ label: string;
5
+ }
6
+ export interface ChartSankeyFlow {
7
+ source: string;
8
+ target: string;
9
+ value: number;
10
+ }
11
+ /** Onde os nos sem saida se encostam, conforme a referencia. */
12
+ export type ChartSankeyAlign = 'left' | 'right' | 'center' | 'justify';
13
+ /** De onde a ligacao tira a cor: do no de origem, do de destino, ou de nenhum. */
14
+ export type ChartSankeyFlowColor = 'source' | 'target' | 'neutral';
15
+ /**
16
+ * Onde o valor da ligacao e escrito. O rotulo do no ocupa a faixa logo a
17
+ * direita dele, entao `end` e o unico que nunca disputa espaco com o rotulo da
18
+ * propria origem.
19
+ */
20
+ export type ChartSankeyFlowValuePosition = 'start' | 'middle' | 'end';
21
+ export interface ChartSankeyProps {
22
+ accent?: string;
23
+ /** Mensagem quando o fluxo tem ciclo, que um diagrama de fluxo nao representa. */
24
+ cyclicMessage?: string;
25
+ emptyMessage?: string;
26
+ flowColor?: ChartSankeyFlowColor;
27
+ flowValuePosition?: ChartSankeyFlowValuePosition;
28
+ flows: readonly ChartSankeyFlow[];
29
+ formatValue?: (value: number) => string;
30
+ height?: ChartHeight;
31
+ nodeAlign?: ChartSankeyAlign;
32
+ /** Ordem e aparencia dos nos. Sem ela, os nos saem das proprias ligacoes. */
33
+ nodes?: readonly ChartSankeyNode[];
34
+ /** Folga vertical entre dois nos da mesma coluna. */
35
+ nodePadding?: number;
36
+ nodeWidth?: number;
37
+ showFlowValues?: boolean;
38
+ showLabels?: boolean;
39
+ title: string;
40
+ }
41
+ export declare function ChartSankey({ accent, cyclicMessage, emptyMessage, flowColor, flowValuePosition, flows, formatValue, height, nodeAlign, nodes, nodePadding, nodeWidth, showFlowValues, showLabels, title, }: ChartSankeyProps): import("react").JSX.Element;
@@ -0,0 +1,2 @@
1
+ export { ChartSankey } from './ChartSankey.js';
2
+ export type { ChartSankeyAlign, ChartSankeyFlow, ChartSankeyFlowColor, ChartSankeyFlowValuePosition, ChartSankeyNode, ChartSankeyProps, } from './ChartSankey.js';
@@ -0,0 +1,37 @@
1
+ import { type AxisVisibility, type ChartHeight, type ChartLegendAlign, type ChartLegendPosition } from '../core/index.js';
2
+ import { type SeriesAppearance } from '../palette/index.js';
3
+ export interface ChartScatterPoint {
4
+ label?: string;
5
+ x: number;
6
+ y: number;
7
+ z?: number;
8
+ }
9
+ export interface ChartScatterSeries extends SeriesAppearance {
10
+ label: string;
11
+ points: readonly ChartScatterPoint[];
12
+ }
13
+ export interface ChartScatterProps {
14
+ accent?: string;
15
+ defaultHiddenSeries?: readonly string[];
16
+ emptyMessage?: string;
17
+ formatX?: (value: number) => string;
18
+ formatY?: (value: number) => string;
19
+ formatZ?: (value: number) => string;
20
+ /**
21
+ * Inclui o zero no dominio dos eixos. Ligado por padrao, porque barra que nao
22
+ * parte do zero exagera a diferenca; para medidas que nao se comparam a ele —
23
+ * um ano, uma temperatura — desligue.
24
+ */
25
+ includeZero?: boolean;
26
+ height?: ChartHeight;
27
+ hiddenSeries?: readonly string[];
28
+ legend?: ChartLegendPosition;
29
+ legendAlign?: ChartLegendAlign;
30
+ onHiddenSeriesChange?: (hidden: readonly string[]) => void;
31
+ series: readonly ChartScatterSeries[];
32
+ title: string;
33
+ xAxis?: AxisVisibility;
34
+ yAxis?: AxisVisibility;
35
+ yAxisRight?: AxisVisibility;
36
+ }
37
+ export declare function ChartScatter({ accent, defaultHiddenSeries, emptyMessage, formatX, formatY, formatZ, height, includeZero, hiddenSeries, legend, legendAlign, onHiddenSeriesChange, series, title, xAxis, yAxis, yAxisRight, }: ChartScatterProps): import("react").JSX.Element;
@@ -0,0 +1,2 @@
1
+ export { ChartScatter } from './ChartScatter.js';
2
+ export type { ChartScatterPoint, ChartScatterProps, ChartScatterSeries } from './ChartScatter.js';
@@ -0,0 +1,27 @@
1
+ import { type ChartHeight, type ChartLegendAlign, type ChartLegendPosition } from '../core/index.js';
2
+ import { type SeriesAppearance } from '../palette/index.js';
3
+ export interface ChartSunburstNode extends SeriesAppearance {
4
+ children?: readonly ChartSunburstNode[];
5
+ label: string;
6
+ value?: number;
7
+ }
8
+ export interface ChartSunburstProps {
9
+ accent?: string;
10
+ defaultHiddenGroups?: readonly string[];
11
+ emptyMessage?: string;
12
+ formatPercent?: (ratio: number) => string;
13
+ formatValue?: (value: number) => string;
14
+ height?: ChartHeight;
15
+ hiddenGroups?: readonly string[];
16
+ legend?: ChartLegendPosition;
17
+ legendAlign?: ChartLegendAlign;
18
+ nodes: readonly ChartSunburstNode[];
19
+ onHiddenGroupsChange?: (hidden: readonly string[]) => void;
20
+ /** Folga entre dois aneis vizinhos. */
21
+ ringGap?: number;
22
+ /** Raio das pontas de cada arco. Sem valor, o token de raio pequeno. */
23
+ sliceRadius?: number;
24
+ showLabels?: boolean;
25
+ title: string;
26
+ }
27
+ export declare function ChartSunburst({ accent, defaultHiddenGroups, emptyMessage, formatPercent, formatValue, height, hiddenGroups, legend, legendAlign, nodes, onHiddenGroupsChange, ringGap, showLabels, sliceRadius, title, }: ChartSunburstProps): import("react").JSX.Element;
@@ -0,0 +1,2 @@
1
+ export { ChartSunburst } from './ChartSunburst.js';
2
+ export type { ChartSunburstNode, ChartSunburstProps } from './ChartSunburst.js';
@@ -0,0 +1,41 @@
1
+ import { type ReactNode } from 'react';
2
+ export interface ChartTooltipRow {
3
+ color?: string;
4
+ /** Realca a linha, como a serie sob o ponteiro entre as demais. */
5
+ emphasis?: boolean;
6
+ label: string;
7
+ values: readonly number[];
8
+ }
9
+ /** Como a linha de total resume uma coluna. A soma raramente serve a todas. */
10
+ export type ChartTooltipTotal = 'sum' | 'average' | 'none' | ((values: readonly number[]) => number);
11
+ export interface ChartTooltipColumn {
12
+ format?: (value: number) => string;
13
+ total?: ChartTooltipTotal;
14
+ }
15
+ export interface ChartTooltipComputed {
16
+ /** Coluna que serve de base. A ultima por padrao, que e a de valor. */
17
+ column?: number;
18
+ /** Valor da linha, a partir do valor dela e do total da coluna base. */
19
+ compute?: (value: number, total: number) => number;
20
+ format?: (value: number) => string;
21
+ }
22
+ export interface ChartTooltipProps {
23
+ children: ReactNode;
24
+ columns?: readonly ChartTooltipColumn[];
25
+ /** Coluna ao fim. Percentual sobre a base por padrao; `none` a dispensa. */
26
+ computed?: ChartTooltipComputed | 'none';
27
+ rows: readonly ChartTooltipRow[];
28
+ showTotal?: boolean;
29
+ subtitle?: string;
30
+ title?: string;
31
+ totalLabel?: string;
32
+ }
33
+ /**
34
+ * Leitura das medidas sob o ponteiro, em portal sobre a pagina. Ele acompanha o
35
+ * cursor enquanto este percorre a area e sai a qualquer outra interacao.
36
+ *
37
+ * Nao conhece grafico algum: recebe linhas e colunas, e quem as monta e quem o
38
+ * usa. E decorativo para leitor de tela: o desenho e `role="img"`, apresentado
39
+ * como imagem unica, e a leitura medida a medida cabe a visao em tabela.
40
+ */
41
+ export declare function ChartTooltip({ children, columns, computed, rows, showTotal, subtitle, title, totalLabel, }: ChartTooltipProps): import("react").JSX.Element;
@@ -0,0 +1,2 @@
1
+ export { ChartTooltip } from './ChartTooltip.js';
2
+ export type { ChartTooltipColumn, ChartTooltipComputed, ChartTooltipProps, ChartTooltipRow, ChartTooltipTotal, } from './ChartTooltip.js';
@@ -0,0 +1,30 @@
1
+ import { type ChartHeight, type ChartLegendAlign, type ChartLegendPosition } from '../core/index.js';
2
+ import { type SeriesAppearance, type SeriesIntent } from '../palette/index.js';
3
+ export interface ChartTreemapNode extends SeriesAppearance {
4
+ children?: readonly ChartTreemapNode[];
5
+ label: string;
6
+ value?: number;
7
+ }
8
+ export interface ChartTreemapProps {
9
+ accent?: string;
10
+ defaultHiddenGroups?: readonly string[];
11
+ emptyMessage?: string;
12
+ formatValue?: (value: number) => string;
13
+ /** Folga entre dois retangulos vizinhos. */
14
+ gap?: number;
15
+ height?: ChartHeight;
16
+ hiddenGroups?: readonly string[];
17
+ /**
18
+ * Nome de cada intencao na legenda. Informado, a legenda deixa de listar os
19
+ * grupos e passa a nomear as cores: e o caso do mapa colorido por status,
20
+ * onde o que a legenda explica e o significado da cor, nao a categoria.
21
+ */
22
+ intentLabels?: Partial<Record<SeriesIntent, string>>;
23
+ legend?: ChartLegendPosition;
24
+ legendAlign?: ChartLegendAlign;
25
+ nodes: readonly ChartTreemapNode[];
26
+ onHiddenGroupsChange?: (hidden: readonly string[]) => void;
27
+ showDataLabels?: boolean;
28
+ title: string;
29
+ }
30
+ export declare function ChartTreemap({ accent, defaultHiddenGroups, emptyMessage, formatValue, gap, height, hiddenGroups, intentLabels, legend, legendAlign, nodes, onHiddenGroupsChange, showDataLabels, title, }: ChartTreemapProps): import("react").JSX.Element;
@@ -0,0 +1,2 @@
1
+ export { ChartTreemap } from './ChartTreemap.js';
2
+ export type { ChartTreemapNode, ChartTreemapProps } from './ChartTreemap.js';
@@ -0,0 +1,24 @@
1
+ import { type AxisLabelAngle, type AxisVisibility, type ChartHeight } from '../core/index.js';
2
+ import { type SeriesIntent } from '../palette/index.js';
3
+ export interface ChartWaterfallStep {
4
+ color?: string;
5
+ intent?: SeriesIntent;
6
+ label: string;
7
+ total?: boolean;
8
+ value: number;
9
+ }
10
+ export interface ChartWaterfallProps {
11
+ emptyMessage?: string;
12
+ formatValue?: (value: number) => string;
13
+ height?: ChartHeight;
14
+ labelAngle?: AxisLabelAngle;
15
+ /** Indice do passo sob o ponteiro, ou `null` ao sair dele. */
16
+ onHoverStep?: (index: number | null) => void;
17
+ showDataLabels?: boolean;
18
+ steps: readonly ChartWaterfallStep[];
19
+ title: string;
20
+ xAxis?: AxisVisibility;
21
+ yAxis?: AxisVisibility;
22
+ yAxisRight?: AxisVisibility;
23
+ }
24
+ export declare function ChartWaterfall({ emptyMessage, formatValue, height, labelAngle, onHoverStep, showDataLabels, steps, title, xAxis, yAxis, yAxisRight, }: ChartWaterfallProps): import("react").JSX.Element;
@@ -0,0 +1,2 @@
1
+ export { ChartWaterfall } from './ChartWaterfall.js';
2
+ export type { ChartWaterfallProps, ChartWaterfallStep } from './ChartWaterfall.js';
@@ -0,0 +1,18 @@
1
+ import type { AxisLabelRotation } from './cartesianLayout.js';
2
+ export type AxisOrientation = 'bottom' | 'left' | 'right';
3
+ export interface AxisTick {
4
+ label: string;
5
+ position: number;
6
+ }
7
+ export interface AxisProps {
8
+ hideLine?: boolean;
9
+ labelRotation?: AxisLabelRotation;
10
+ length: number;
11
+ orientation: AxisOrientation;
12
+ ticks: readonly AxisTick[];
13
+ }
14
+ /**
15
+ * Eixo de um grafico cartesiano. Recebe as marcas ja posicionadas: a conversao
16
+ * de valor em pixel pertence a escala, nao ao desenho.
17
+ */
18
+ export declare function Axis({ hideLine, labelRotation, length, orientation, ticks }: AxisProps): import("react").JSX.Element;
@@ -0,0 +1,15 @@
1
+ import type { ChartPlot } from './cartesianLayout.js';
2
+ export type BandOrientation = 'vertical' | 'horizontal';
3
+ export interface BandCursorProps {
4
+ /** Comeco da faixa no eixo de categorias. */
5
+ offset: number;
6
+ orientation?: BandOrientation;
7
+ plot: ChartPlot;
8
+ /** Largura da faixa, que e a banda da escala de categorias. */
9
+ size: number;
10
+ }
11
+ /**
12
+ * Realce da faixa sob o ponteiro, atras das marcas. Na vertical ele e uma
13
+ * coluna e na horizontal uma linha: so o eixo troca.
14
+ */
15
+ export declare function BandCursor({ offset, orientation, plot, size }: BandCursorProps): import("react").JSX.Element;