@plenustech/design-system 0.2.2 → 0.2.4
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.
- package/dist/components/actions/ButtonTile/ButtonTile.cjs +2 -0
- package/dist/components/actions/ButtonTile/ButtonTile.cjs.map +1 -0
- package/dist/components/actions/ButtonTile/ButtonTile.js +23 -0
- package/dist/components/actions/ButtonTile/ButtonTile.js.map +1 -0
- package/dist/components/actions/ButtonTile/ButtonTile.module.css.cjs +2 -0
- package/dist/components/actions/ButtonTile/ButtonTile.module.css.cjs.map +1 -0
- package/dist/components/actions/ButtonTile/ButtonTile.module.css.js +16 -0
- package/dist/components/actions/ButtonTile/ButtonTile.module.css.js.map +1 -0
- package/dist/components/actions/Toolbar/Toolbar.cjs +2 -0
- package/dist/components/actions/Toolbar/Toolbar.cjs.map +1 -0
- package/dist/components/actions/Toolbar/Toolbar.js +118 -0
- package/dist/components/actions/Toolbar/Toolbar.js.map +1 -0
- package/dist/components/actions/Toolbar/Toolbar.module.css.cjs +2 -0
- package/dist/components/actions/Toolbar/Toolbar.module.css.cjs.map +1 -0
- package/dist/components/actions/Toolbar/Toolbar.module.css.js +20 -0
- package/dist/components/actions/Toolbar/Toolbar.module.css.js.map +1 -0
- package/dist/components/charts/ChartArea/ChartArea.cjs +1 -1
- package/dist/components/charts/ChartArea/ChartArea.cjs.map +1 -1
- package/dist/components/charts/ChartArea/ChartArea.js +196 -148
- package/dist/components/charts/ChartArea/ChartArea.js.map +1 -1
- package/dist/components/charts/ChartArea/ChartArea.module.css.cjs +1 -1
- package/dist/components/charts/ChartArea/ChartArea.module.css.js +12 -10
- package/dist/components/charts/ChartArea/ChartArea.module.css.js.map +1 -1
- package/dist/components/charts/ChartBar/ChartBar.cjs +1 -1
- package/dist/components/charts/ChartBar/ChartBar.cjs.map +1 -1
- package/dist/components/charts/ChartBar/ChartBar.js +168 -145
- package/dist/components/charts/ChartBar/ChartBar.js.map +1 -1
- package/dist/components/charts/ChartBar/ChartBar.module.css.cjs +1 -1
- package/dist/components/charts/ChartBar/ChartBar.module.css.js +12 -10
- package/dist/components/charts/ChartBar/ChartBar.module.css.js.map +1 -1
- package/dist/components/charts/ChartCombo/ChartCombo.cjs +1 -1
- package/dist/components/charts/ChartCombo/ChartCombo.cjs.map +1 -1
- package/dist/components/charts/ChartCombo/ChartCombo.js +179 -154
- package/dist/components/charts/ChartCombo/ChartCombo.js.map +1 -1
- package/dist/components/charts/ChartCombo/ChartCombo.module.css.cjs +1 -1
- package/dist/components/charts/ChartCombo/ChartCombo.module.css.js +16 -14
- package/dist/components/charts/ChartCombo/ChartCombo.module.css.js.map +1 -1
- package/dist/components/charts/ChartDonut/ChartDonut.cjs +1 -1
- package/dist/components/charts/ChartDonut/ChartDonut.cjs.map +1 -1
- package/dist/components/charts/ChartDonut/ChartDonut.js +72 -61
- package/dist/components/charts/ChartDonut/ChartDonut.js.map +1 -1
- package/dist/components/charts/ChartGauge/ChartGauge.cjs +2 -0
- package/dist/components/charts/ChartGauge/ChartGauge.cjs.map +1 -0
- package/dist/components/charts/ChartGauge/ChartGauge.js +307 -0
- package/dist/components/charts/ChartGauge/ChartGauge.js.map +1 -0
- package/dist/components/charts/ChartGauge/ChartGauge.module.css.cjs +2 -0
- package/dist/components/charts/ChartGauge/ChartGauge.module.css.cjs.map +1 -0
- package/dist/components/charts/ChartGauge/ChartGauge.module.css.js +76 -0
- package/dist/components/charts/ChartGauge/ChartGauge.module.css.js.map +1 -0
- package/dist/components/charts/ChartGauge/gaugeLayout.cjs +2 -0
- package/dist/components/charts/ChartGauge/gaugeLayout.cjs.map +1 -0
- package/dist/components/charts/ChartGauge/gaugeLayout.js +107 -0
- package/dist/components/charts/ChartGauge/gaugeLayout.js.map +1 -0
- package/dist/components/charts/ChartGauge/gaugeReading.cjs +2 -0
- package/dist/components/charts/ChartGauge/gaugeReading.cjs.map +1 -0
- package/dist/components/charts/ChartGauge/gaugeReading.js +112 -0
- package/dist/components/charts/ChartGauge/gaugeReading.js.map +1 -0
- package/dist/components/charts/ChartGauge/gaugeScale.cjs +2 -0
- package/dist/components/charts/ChartGauge/gaugeScale.cjs.map +1 -0
- package/dist/components/charts/ChartGauge/gaugeScale.js +57 -0
- package/dist/components/charts/ChartGauge/gaugeScale.js.map +1 -0
- package/dist/components/charts/ChartLine/ChartLine.cjs +1 -1
- package/dist/components/charts/ChartLine/ChartLine.cjs.map +1 -1
- package/dist/components/charts/ChartLine/ChartLine.js +196 -143
- package/dist/components/charts/ChartLine/ChartLine.js.map +1 -1
- package/dist/components/charts/ChartLine/ChartLine.module.css.cjs +1 -1
- package/dist/components/charts/ChartLine/ChartLine.module.css.js +16 -14
- package/dist/components/charts/ChartLine/ChartLine.module.css.js.map +1 -1
- package/dist/components/charts/ChartMap/ChartMap.cjs +2 -0
- package/dist/components/charts/ChartMap/ChartMap.cjs.map +1 -0
- package/dist/components/charts/ChartMap/ChartMap.js +523 -0
- package/dist/components/charts/ChartMap/ChartMap.js.map +1 -0
- package/dist/components/charts/ChartMap/ChartMap.module.css.cjs +2 -0
- package/dist/components/charts/ChartMap/ChartMap.module.css.cjs.map +1 -0
- package/dist/components/charts/ChartMap/ChartMap.module.css.js +124 -0
- package/dist/components/charts/ChartMap/ChartMap.module.css.js.map +1 -0
- package/dist/components/charts/ChartMap/ChartMapLegend.cjs +2 -0
- package/dist/components/charts/ChartMap/ChartMapLegend.cjs.map +1 -0
- package/dist/components/charts/ChartMap/ChartMapLegend.js +102 -0
- package/dist/components/charts/ChartMap/ChartMapLegend.js.map +1 -0
- package/dist/components/charts/ChartMap/ChartMapTable.cjs +2 -0
- package/dist/components/charts/ChartMap/ChartMapTable.cjs.map +1 -0
- package/dist/components/charts/ChartMap/ChartMapTable.js +118 -0
- package/dist/components/charts/ChartMap/ChartMapTable.js.map +1 -0
- package/dist/components/charts/ChartMap/mapGeometry.cjs +2 -0
- package/dist/components/charts/ChartMap/mapGeometry.cjs.map +1 -0
- package/dist/components/charts/ChartMap/mapGeometry.js +113 -0
- package/dist/components/charts/ChartMap/mapGeometry.js.map +1 -0
- package/dist/components/charts/ChartMap/mapLabels.cjs +2 -0
- package/dist/components/charts/ChartMap/mapLabels.cjs.map +1 -0
- package/dist/components/charts/ChartMap/mapLabels.js +80 -0
- package/dist/components/charts/ChartMap/mapLabels.js.map +1 -0
- package/dist/components/charts/ChartMap/mapScales.cjs +2 -0
- package/dist/components/charts/ChartMap/mapScales.cjs.map +1 -0
- package/dist/components/charts/ChartMap/mapScales.js +131 -0
- package/dist/components/charts/ChartMap/mapScales.js.map +1 -0
- package/dist/components/charts/ChartMap/polylabel.cjs +2 -0
- package/dist/components/charts/ChartMap/polylabel.cjs.map +1 -0
- package/dist/components/charts/ChartMap/polylabel.js +50 -0
- package/dist/components/charts/ChartMap/polylabel.js.map +1 -0
- package/dist/components/charts/ChartPie/ChartPie.cjs +1 -1
- package/dist/components/charts/ChartPie/ChartPie.cjs.map +1 -1
- package/dist/components/charts/ChartPie/ChartPie.js +71 -60
- package/dist/components/charts/ChartPie/ChartPie.js.map +1 -1
- package/dist/components/charts/ChartRadial/ChartRadial.cjs +1 -1
- package/dist/components/charts/ChartRadial/ChartRadial.cjs.map +1 -1
- package/dist/components/charts/ChartRadial/ChartRadial.js +101 -84
- package/dist/components/charts/ChartRadial/ChartRadial.js.map +1 -1
- package/dist/components/charts/ChartSankey/ChartSankey.cjs +1 -1
- package/dist/components/charts/ChartSankey/ChartSankey.cjs.map +1 -1
- package/dist/components/charts/ChartSankey/ChartSankey.js +148 -125
- package/dist/components/charts/ChartSankey/ChartSankey.js.map +1 -1
- package/dist/components/charts/ChartScatter/ChartScatter.cjs +1 -1
- package/dist/components/charts/ChartScatter/ChartScatter.cjs.map +1 -1
- package/dist/components/charts/ChartScatter/ChartScatter.js +138 -106
- package/dist/components/charts/ChartScatter/ChartScatter.js.map +1 -1
- package/dist/components/charts/ChartScatter/ChartScatter.module.css.cjs +1 -1
- package/dist/components/charts/ChartScatter/ChartScatter.module.css.js +3 -3
- package/dist/components/charts/ChartSunburst/ChartSunburst.cjs +1 -1
- package/dist/components/charts/ChartSunburst/ChartSunburst.cjs.map +1 -1
- package/dist/components/charts/ChartSunburst/ChartSunburst.js +115 -100
- package/dist/components/charts/ChartSunburst/ChartSunburst.js.map +1 -1
- package/dist/components/charts/ChartTimeline/ChartTimeline.cjs +2 -0
- package/dist/components/charts/ChartTimeline/ChartTimeline.cjs.map +1 -0
- package/dist/components/charts/ChartTimeline/ChartTimeline.js +703 -0
- package/dist/components/charts/ChartTimeline/ChartTimeline.js.map +1 -0
- package/dist/components/charts/ChartTimeline/ChartTimeline.module.css.cjs +2 -0
- package/dist/components/charts/ChartTimeline/ChartTimeline.module.css.cjs.map +1 -0
- package/dist/components/charts/ChartTimeline/ChartTimeline.module.css.js +124 -0
- package/dist/components/charts/ChartTimeline/ChartTimeline.module.css.js.map +1 -0
- package/dist/components/charts/ChartTimeline/ChartTimelineTable.cjs +2 -0
- package/dist/components/charts/ChartTimeline/ChartTimelineTable.cjs.map +1 -0
- package/dist/components/charts/ChartTimeline/ChartTimelineTable.js +42 -0
- package/dist/components/charts/ChartTimeline/ChartTimelineTable.js.map +1 -0
- package/dist/components/charts/ChartTimeline/timelineLayout.cjs +2 -0
- package/dist/components/charts/ChartTimeline/timelineLayout.cjs.map +1 -0
- package/dist/components/charts/ChartTimeline/timelineLayout.js +109 -0
- package/dist/components/charts/ChartTimeline/timelineLayout.js.map +1 -0
- package/dist/components/charts/ChartTimeline/timelineTime.cjs +2 -0
- package/dist/components/charts/ChartTimeline/timelineTime.cjs.map +1 -0
- package/dist/components/charts/ChartTimeline/timelineTime.js +91 -0
- package/dist/components/charts/ChartTimeline/timelineTime.js.map +1 -0
- package/dist/components/charts/ChartTimeline/timelineTooltip.cjs +2 -0
- package/dist/components/charts/ChartTimeline/timelineTooltip.cjs.map +1 -0
- package/dist/components/charts/ChartTimeline/timelineTooltip.js +77 -0
- package/dist/components/charts/ChartTimeline/timelineTooltip.js.map +1 -0
- package/dist/components/charts/ChartTooltip/ChartTooltip.cjs +1 -1
- package/dist/components/charts/ChartTooltip/ChartTooltip.cjs.map +1 -1
- package/dist/components/charts/ChartTooltip/ChartTooltip.js +1 -1
- package/dist/components/charts/ChartTooltip/ChartTooltip.js.map +1 -1
- package/dist/components/charts/ChartTreemap/ChartTreemap.cjs +1 -1
- package/dist/components/charts/ChartTreemap/ChartTreemap.cjs.map +1 -1
- package/dist/components/charts/ChartTreemap/ChartTreemap.js +100 -89
- package/dist/components/charts/ChartTreemap/ChartTreemap.js.map +1 -1
- package/dist/components/charts/ChartWaterfall/ChartWaterfall.cjs +1 -1
- package/dist/components/charts/ChartWaterfall/ChartWaterfall.cjs.map +1 -1
- package/dist/components/charts/ChartWaterfall/ChartWaterfall.js +125 -105
- package/dist/components/charts/ChartWaterfall/ChartWaterfall.js.map +1 -1
- package/dist/components/charts/ChartWaterfall/ChartWaterfall.module.css.cjs +1 -1
- package/dist/components/charts/ChartWaterfall/ChartWaterfall.module.css.js +8 -6
- package/dist/components/charts/ChartWaterfall/ChartWaterfall.module.css.js.map +1 -1
- package/dist/components/charts/core/CartesianFrame.cjs +1 -1
- package/dist/components/charts/core/CartesianFrame.cjs.map +1 -1
- package/dist/components/charts/core/CartesianFrame.js +61 -96
- package/dist/components/charts/core/CartesianFrame.js.map +1 -1
- package/dist/components/charts/core/Chart.module.css.cjs +1 -1
- package/dist/components/charts/core/Chart.module.css.js +52 -54
- package/dist/components/charts/core/Chart.module.css.js.map +1 -1
- package/dist/components/charts/core/ChartFrame.cjs +1 -1
- package/dist/components/charts/core/ChartFrame.cjs.map +1 -1
- package/dist/components/charts/core/ChartFrame.js +53 -47
- package/dist/components/charts/core/ChartFrame.js.map +1 -1
- package/dist/components/charts/core/ChartLegend.cjs +1 -1
- package/dist/components/charts/core/ChartLegend.cjs.map +1 -1
- package/dist/components/charts/core/ChartLegend.js +37 -25
- package/dist/components/charts/core/ChartLegend.js.map +1 -1
- package/dist/components/charts/core/PointBands.cjs +2 -0
- package/dist/components/charts/core/PointBands.cjs.map +1 -0
- package/dist/components/charts/core/PointBands.js +41 -0
- package/dist/components/charts/core/PointBands.js.map +1 -0
- package/dist/components/charts/core/cartesianLayout.cjs +1 -1
- package/dist/components/charts/core/cartesianLayout.cjs.map +1 -1
- package/dist/components/charts/core/cartesianLayout.js +49 -41
- package/dist/components/charts/core/cartesianLayout.js.map +1 -1
- package/dist/components/charts/core/hoverPath.cjs +2 -0
- package/dist/components/charts/core/hoverPath.cjs.map +1 -0
- package/dist/components/charts/core/hoverPath.js +7 -0
- package/dist/components/charts/core/hoverPath.js.map +1 -0
- package/dist/components/charts/core/pointLabels.cjs +2 -0
- package/dist/components/charts/core/pointLabels.cjs.map +1 -0
- package/dist/components/charts/core/pointLabels.js +12 -0
- package/dist/components/charts/core/pointLabels.js.map +1 -0
- package/dist/components/charts/core/tooltips.cjs +2 -0
- package/dist/components/charts/core/tooltips.cjs.map +1 -0
- package/dist/components/charts/core/tooltips.js +48 -0
- package/dist/components/charts/core/tooltips.js.map +1 -0
- package/dist/components/charts/core/useCartesianLayout.cjs +2 -0
- package/dist/components/charts/core/useCartesianLayout.cjs.map +1 -0
- package/dist/components/charts/core/useCartesianLayout.js +38 -0
- package/dist/components/charts/core/useCartesianLayout.js.map +1 -0
- package/dist/components/charts/core/useChartMetrics.cjs +1 -1
- package/dist/components/charts/core/useChartMetrics.cjs.map +1 -1
- package/dist/components/charts/core/useChartMetrics.js +20 -25
- package/dist/components/charts/core/useChartMetrics.js.map +1 -1
- package/dist/components/charts/core/useSeriesToggle.cjs +1 -1
- package/dist/components/charts/core/useSeriesToggle.cjs.map +1 -1
- package/dist/components/charts/core/useSeriesToggle.js +19 -12
- package/dist/components/charts/core/useSeriesToggle.js.map +1 -1
- package/dist/components/data-display/Accordion/Accordion.cjs +1 -1
- package/dist/components/data-display/Accordion/Accordion.cjs.map +1 -1
- package/dist/components/data-display/Accordion/Accordion.js +56 -46
- package/dist/components/data-display/Accordion/Accordion.js.map +1 -1
- package/dist/components/data-display/Accordion/Accordion.module.css.cjs +1 -1
- package/dist/components/data-display/Accordion/Accordion.module.css.js +16 -16
- package/dist/components/data-display/List/List.cjs.map +1 -1
- package/dist/components/data-display/List/List.js.map +1 -1
- package/dist/components/data-display/List/List.module.css.cjs +1 -1
- package/dist/components/data-display/List/List.module.css.js +34 -24
- package/dist/components/data-display/List/List.module.css.js.map +1 -1
- package/dist/components/data-display/List/ListingOptions.cjs +1 -1
- package/dist/components/data-display/List/ListingOptions.cjs.map +1 -1
- package/dist/components/data-display/List/ListingOptions.js +98 -74
- package/dist/components/data-display/List/ListingOptions.js.map +1 -1
- package/dist/components/data-display/List/useListing.cjs.map +1 -1
- package/dist/components/data-display/List/useListing.js.map +1 -1
- package/dist/components/data-display/SortableList/SortableList.cjs +2 -0
- package/dist/components/data-display/SortableList/SortableList.cjs.map +1 -0
- package/dist/components/data-display/SortableList/SortableList.js +168 -0
- package/dist/components/data-display/SortableList/SortableList.js.map +1 -0
- package/dist/components/data-display/SortableList/SortableList.module.css.cjs +2 -0
- package/dist/components/data-display/SortableList/SortableList.module.css.cjs.map +1 -0
- package/dist/components/data-display/SortableList/SortableList.module.css.js +34 -0
- package/dist/components/data-display/SortableList/SortableList.module.css.js.map +1 -0
- package/dist/components/data-display/Table/Table.cjs +1 -1
- package/dist/components/data-display/Table/Table.cjs.map +1 -1
- package/dist/components/data-display/Table/Table.js +86 -85
- package/dist/components/data-display/Table/Table.js.map +1 -1
- package/dist/components/data-display/Table/Table.module.css.cjs +1 -1
- package/dist/components/data-display/Table/Table.module.css.js +50 -51
- package/dist/components/data-display/Table/Table.module.css.js.map +1 -1
- package/dist/components/data-display/Tag/Tag.cjs +2 -0
- package/dist/components/data-display/Tag/Tag.cjs.map +1 -0
- package/dist/components/data-display/Tag/Tag.js +50 -0
- package/dist/components/data-display/Tag/Tag.js.map +1 -0
- package/dist/components/data-display/Tag/Tag.module.css.cjs +2 -0
- package/dist/components/data-display/Tag/Tag.module.css.cjs.map +1 -0
- package/dist/components/data-display/Tag/Tag.module.css.js +22 -0
- package/dist/components/data-display/Tag/Tag.module.css.js.map +1 -0
- package/dist/components/data-display/Timeline/Timeline.cjs +2 -0
- package/dist/components/data-display/Timeline/Timeline.cjs.map +1 -0
- package/dist/components/data-display/Timeline/Timeline.js +31 -0
- package/dist/components/data-display/Timeline/Timeline.js.map +1 -0
- package/dist/components/data-display/Timeline/Timeline.module.css.cjs +2 -0
- package/dist/components/data-display/Timeline/Timeline.module.css.cjs.map +1 -0
- package/dist/components/data-display/Timeline/Timeline.module.css.js +30 -0
- package/dist/components/data-display/Timeline/Timeline.module.css.js.map +1 -0
- package/dist/components/feedback/Skeleton/Skeleton.cjs +2 -0
- package/dist/components/feedback/Skeleton/Skeleton.cjs.map +1 -0
- package/dist/components/feedback/Skeleton/Skeleton.js +17 -0
- package/dist/components/feedback/Skeleton/Skeleton.js.map +1 -0
- package/dist/components/feedback/Skeleton/Skeleton.module.css.cjs +2 -0
- package/dist/components/feedback/Skeleton/Skeleton.module.css.cjs.map +1 -0
- package/dist/components/feedback/Skeleton/Skeleton.module.css.js +15 -0
- package/dist/components/feedback/Skeleton/Skeleton.module.css.js.map +1 -0
- package/dist/components/feedback/Toast/Toast.module.css.cjs +2 -0
- package/dist/components/feedback/Toast/Toast.module.css.cjs.map +1 -0
- package/dist/components/feedback/Toast/Toast.module.css.js +31 -0
- package/dist/components/feedback/Toast/Toast.module.css.js.map +1 -0
- package/dist/components/feedback/Toast/ToastRegion.cjs +2 -0
- package/dist/components/feedback/Toast/ToastRegion.cjs.map +1 -0
- package/dist/components/feedback/Toast/ToastRegion.js +62 -0
- package/dist/components/feedback/Toast/ToastRegion.js.map +1 -0
- package/dist/components/feedback/Toast/toastStore.cjs +2 -0
- package/dist/components/feedback/Toast/toastStore.cjs.map +1 -0
- package/dist/components/feedback/Toast/toastStore.js +33 -0
- package/dist/components/feedback/Toast/toastStore.js.map +1 -0
- package/dist/components/forms/Checkbox/Checkbox.cjs +1 -1
- package/dist/components/forms/Checkbox/Checkbox.cjs.map +1 -1
- package/dist/components/forms/Checkbox/Checkbox.js +43 -31
- package/dist/components/forms/Checkbox/Checkbox.js.map +1 -1
- package/dist/components/forms/Checkbox/Checkbox.module.css.cjs +1 -1
- package/dist/components/forms/Checkbox/Checkbox.module.css.js +1 -1
- package/dist/components/forms/CheckboxGroup/CheckboxGroup.cjs +2 -0
- package/dist/components/forms/CheckboxGroup/CheckboxGroup.cjs.map +1 -0
- package/dist/components/forms/CheckboxGroup/CheckboxGroup.js +54 -0
- package/dist/components/forms/CheckboxGroup/CheckboxGroup.js.map +1 -0
- package/dist/components/forms/CheckboxGroup/CheckboxGroup.module.css.cjs +2 -0
- package/dist/components/forms/CheckboxGroup/CheckboxGroup.module.css.cjs.map +1 -0
- package/dist/components/forms/CheckboxGroup/CheckboxGroup.module.css.js +22 -0
- package/dist/components/forms/CheckboxGroup/CheckboxGroup.module.css.js.map +1 -0
- package/dist/components/forms/ColorPicker/ColorPicker.cjs +2 -0
- package/dist/components/forms/ColorPicker/ColorPicker.cjs.map +1 -0
- package/dist/components/forms/ColorPicker/ColorPicker.js +57 -0
- package/dist/components/forms/ColorPicker/ColorPicker.js.map +1 -0
- package/dist/components/forms/ColorPicker/ColorPicker.module.css.cjs +2 -0
- package/dist/components/forms/ColorPicker/ColorPicker.module.css.cjs.map +1 -0
- package/dist/components/forms/ColorPicker/ColorPicker.module.css.js +22 -0
- package/dist/components/forms/ColorPicker/ColorPicker.module.css.js.map +1 -0
- package/dist/components/forms/ComboBox/ComboBox.cjs.map +1 -1
- package/dist/components/forms/ComboBox/ComboBox.js.map +1 -1
- package/dist/components/forms/ComboBox/ComboBox.module.css.cjs +1 -1
- package/dist/components/forms/ComboBox/ComboBox.module.css.js +20 -20
- package/dist/components/forms/Field/Field.cjs +1 -1
- package/dist/components/forms/Field/Field.cjs.map +1 -1
- package/dist/components/forms/Field/Field.js +21 -20
- package/dist/components/forms/Field/Field.js.map +1 -1
- package/dist/components/forms/Field/Field.module.css.cjs +1 -1
- package/dist/components/forms/Field/Field.module.css.js +18 -12
- package/dist/components/forms/Field/Field.module.css.js.map +1 -1
- package/dist/components/forms/FileUpload/FileUpload.cjs +2 -0
- package/dist/components/forms/FileUpload/FileUpload.cjs.map +1 -0
- package/dist/components/forms/FileUpload/FileUpload.js +142 -0
- package/dist/components/forms/FileUpload/FileUpload.js.map +1 -0
- package/dist/components/forms/FileUpload/FileUpload.module.css.cjs +2 -0
- package/dist/components/forms/FileUpload/FileUpload.module.css.cjs.map +1 -0
- package/dist/components/forms/FileUpload/FileUpload.module.css.js +46 -0
- package/dist/components/forms/FileUpload/FileUpload.module.css.js.map +1 -0
- package/dist/components/forms/InputPassword/InputPassword.module.css.cjs +1 -1
- package/dist/components/forms/InputPassword/InputPassword.module.css.js +12 -12
- package/dist/components/forms/InputText/InputText.cjs +1 -1
- package/dist/components/forms/InputText/InputText.cjs.map +1 -1
- package/dist/components/forms/InputText/InputText.js +55 -47
- package/dist/components/forms/InputText/InputText.js.map +1 -1
- package/dist/components/forms/InputText/InputText.module.css.cjs +1 -1
- package/dist/components/forms/InputText/InputText.module.css.js +10 -10
- package/dist/components/forms/RadioGroup/RadioGroup.module.css.cjs +1 -1
- package/dist/components/forms/RadioGroup/RadioGroup.module.css.js +4 -4
- package/dist/components/forms/SegmentedControl/SegmentedControl.cjs +2 -0
- package/dist/components/forms/SegmentedControl/SegmentedControl.cjs.map +1 -0
- package/dist/components/forms/SegmentedControl/SegmentedControl.js +52 -0
- package/dist/components/forms/SegmentedControl/SegmentedControl.js.map +1 -0
- package/dist/components/forms/SegmentedControl/SegmentedControl.module.css.cjs +2 -0
- package/dist/components/forms/SegmentedControl/SegmentedControl.module.css.cjs.map +1 -0
- package/dist/components/forms/SegmentedControl/SegmentedControl.module.css.js +22 -0
- package/dist/components/forms/SegmentedControl/SegmentedControl.module.css.js.map +1 -0
- package/dist/components/forms/Select/Select.module.css.cjs +1 -1
- package/dist/components/forms/Select/Select.module.css.js +13 -13
- package/dist/components/forms/Switch/Switch.module.css.cjs +1 -1
- package/dist/components/forms/Switch/Switch.module.css.js +2 -2
- package/dist/components/icons/icons.cjs +1 -1
- package/dist/components/icons/icons.cjs.map +1 -1
- package/dist/components/icons/icons.js +198 -40
- package/dist/components/icons/icons.js.map +1 -1
- package/dist/components/navigation/SkipLink/SkipLink.cjs +2 -0
- package/dist/components/navigation/SkipLink/SkipLink.cjs.map +1 -0
- package/dist/components/navigation/SkipLink/SkipLink.js +9 -0
- package/dist/components/navigation/SkipLink/SkipLink.js.map +1 -0
- package/dist/components/navigation/SkipLink/SkipLink.module.css.cjs +2 -0
- package/dist/components/navigation/SkipLink/SkipLink.module.css.cjs.map +1 -0
- package/dist/components/navigation/SkipLink/SkipLink.module.css.js +8 -0
- package/dist/components/navigation/SkipLink/SkipLink.module.css.js.map +1 -0
- package/dist/components/navigation/Steps/Steps.cjs +2 -0
- package/dist/components/navigation/Steps/Steps.cjs.map +1 -0
- package/dist/components/navigation/Steps/Steps.js +30 -0
- package/dist/components/navigation/Steps/Steps.js.map +1 -0
- package/dist/components/navigation/Steps/Steps.module.css.cjs +2 -0
- package/dist/components/navigation/Steps/Steps.module.css.cjs.map +1 -0
- package/dist/components/navigation/Steps/Steps.module.css.js +26 -0
- package/dist/components/navigation/Steps/Steps.module.css.js.map +1 -0
- package/dist/components/navigation/Tabs/Tabs.cjs +1 -1
- package/dist/components/navigation/Tabs/Tabs.cjs.map +1 -1
- package/dist/components/navigation/Tabs/Tabs.js +88 -79
- package/dist/components/navigation/Tabs/Tabs.js.map +1 -1
- package/dist/components/navigation/Tabs/Tabs.module.css.cjs +1 -1
- package/dist/components/navigation/Tabs/Tabs.module.css.js +18 -14
- package/dist/components/navigation/Tabs/Tabs.module.css.js.map +1 -1
- package/dist/components/navigation/TabsNav/TabsNav.cjs +2 -0
- package/dist/components/navigation/TabsNav/TabsNav.cjs.map +1 -0
- package/dist/components/navigation/TabsNav/TabsNav.js +21 -0
- package/dist/components/navigation/TabsNav/TabsNav.js.map +1 -0
- package/dist/components/navigation/TabsNav/TabsNav.module.css.cjs +2 -0
- package/dist/components/navigation/TabsNav/TabsNav.module.css.cjs.map +1 -0
- package/dist/components/navigation/TabsNav/TabsNav.module.css.js +18 -0
- package/dist/components/navigation/TabsNav/TabsNav.module.css.js.map +1 -0
- package/dist/components/overlays/Dialog/Dialog.cjs +1 -1
- package/dist/components/overlays/Dialog/Dialog.cjs.map +1 -1
- package/dist/components/overlays/Dialog/Dialog.js +11 -58
- package/dist/components/overlays/Dialog/Dialog.js.map +1 -1
- package/dist/components/overlays/Dialog/DialogFrame.cjs +2 -0
- package/dist/components/overlays/Dialog/DialogFrame.cjs.map +1 -0
- package/dist/components/overlays/Dialog/DialogFrame.js +65 -0
- package/dist/components/overlays/Dialog/DialogFrame.js.map +1 -0
- package/dist/components/overlays/Drawer/Drawer.cjs +2 -0
- package/dist/components/overlays/Drawer/Drawer.cjs.map +1 -0
- package/dist/components/overlays/Drawer/Drawer.js +17 -0
- package/dist/components/overlays/Drawer/Drawer.js.map +1 -0
- package/dist/components/overlays/Drawer/Drawer.module.css.cjs +2 -0
- package/dist/components/overlays/Drawer/Drawer.module.css.cjs.map +1 -0
- package/dist/components/overlays/Drawer/Drawer.module.css.js +23 -0
- package/dist/components/overlays/Drawer/Drawer.module.css.js.map +1 -0
- package/dist/components/overlays/Menu/Menu.cjs +1 -1
- package/dist/components/overlays/Menu/Menu.cjs.map +1 -1
- package/dist/components/overlays/Menu/Menu.js +105 -86
- package/dist/components/overlays/Menu/Menu.js.map +1 -1
- package/dist/components/overlays/Menu/Menu.module.css.cjs +1 -1
- package/dist/components/overlays/Menu/Menu.module.css.js +24 -6
- package/dist/components/overlays/Menu/Menu.module.css.js.map +1 -1
- package/dist/design-system.css +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +190 -118
- package/dist/index.js.map +1 -1
- package/dist/types/components/actions/ButtonTile/ButtonTile.d.ts +14 -0
- package/dist/types/components/actions/ButtonTile/index.d.ts +2 -0
- package/dist/types/components/actions/Toolbar/Toolbar.d.ts +27 -0
- package/dist/types/components/actions/Toolbar/index.d.ts +2 -0
- package/dist/types/components/charts/ChartArea/ChartArea.d.ts +15 -4
- package/dist/types/components/charts/ChartBar/ChartBar.d.ts +11 -4
- package/dist/types/components/charts/ChartCombo/ChartCombo.d.ts +16 -4
- package/dist/types/components/charts/ChartDonut/ChartDonut.d.ts +5 -1
- package/dist/types/components/charts/ChartGauge/ChartGauge.d.ts +83 -0
- package/dist/types/components/charts/ChartGauge/gaugeLayout.d.ts +64 -0
- package/dist/types/components/charts/ChartGauge/gaugeReading.d.ts +97 -0
- package/dist/types/components/charts/ChartGauge/gaugeScale.d.ts +38 -0
- package/dist/types/components/charts/ChartGauge/index.d.ts +2 -0
- package/dist/types/components/charts/ChartLine/ChartLine.d.ts +15 -4
- package/dist/types/components/charts/ChartMap/ChartMap.d.ts +104 -0
- package/dist/types/components/charts/ChartMap/ChartMapLegend.d.ts +44 -0
- package/dist/types/components/charts/ChartMap/ChartMapTable.d.ts +38 -0
- package/dist/types/components/charts/ChartMap/index.d.ts +4 -0
- package/dist/types/components/charts/ChartMap/mapGeometry.d.ts +56 -0
- package/dist/types/components/charts/ChartMap/mapLabels.d.ts +51 -0
- package/dist/types/components/charts/ChartMap/mapScales.d.ts +76 -0
- package/dist/types/components/charts/ChartMap/polylabel.d.ts +9 -0
- package/dist/types/components/charts/ChartPie/ChartPie.d.ts +5 -1
- package/dist/types/components/charts/ChartRadial/ChartRadial.d.ts +5 -1
- package/dist/types/components/charts/ChartSankey/ChartSankey.d.ts +5 -1
- package/dist/types/components/charts/ChartScatter/ChartScatter.d.ts +7 -1
- package/dist/types/components/charts/ChartSunburst/ChartSunburst.d.ts +11 -2
- package/dist/types/components/charts/ChartTimeline/ChartTimeline.d.ts +137 -0
- package/dist/types/components/charts/ChartTimeline/ChartTimelineTable.d.ts +25 -0
- package/dist/types/components/charts/ChartTimeline/index.d.ts +2 -0
- package/dist/types/components/charts/ChartTimeline/timelineLayout.d.ts +70 -0
- package/dist/types/components/charts/ChartTimeline/timelineTime.d.ts +16 -0
- package/dist/types/components/charts/ChartTimeline/timelineTooltip.d.ts +45 -0
- package/dist/types/components/charts/ChartTooltip/ChartTooltip.d.ts +2 -0
- package/dist/types/components/charts/ChartTreemap/ChartTreemap.d.ts +11 -2
- package/dist/types/components/charts/ChartWaterfall/ChartWaterfall.d.ts +8 -3
- package/dist/types/components/charts/core/CartesianFrame.d.ts +6 -1
- package/dist/types/components/charts/core/ChartFrame.d.ts +7 -1
- package/dist/types/components/charts/core/ChartLegend.d.ts +3 -1
- package/dist/types/components/charts/core/PointBands.d.ts +22 -0
- package/dist/types/components/charts/core/cartesianLayout.d.ts +10 -4
- package/dist/types/components/charts/core/hoverPath.d.ts +10 -0
- package/dist/types/components/charts/core/index.d.ts +13 -3
- package/dist/types/components/charts/core/pointLabels.d.ts +13 -0
- package/dist/types/components/charts/core/tooltips.d.ts +49 -0
- package/dist/types/components/charts/core/useCartesianLayout.d.ts +20 -0
- package/dist/types/components/charts/core/useSeriesToggle.d.ts +15 -1
- package/dist/types/components/data-display/Accordion/Accordion.d.ts +6 -1
- package/dist/types/components/data-display/Accordion/index.d.ts +1 -1
- package/dist/types/components/data-display/List/List.d.ts +1 -1
- package/dist/types/components/data-display/List/useListing.d.ts +7 -1
- package/dist/types/components/data-display/SortableList/SortableList.d.ts +22 -0
- package/dist/types/components/data-display/SortableList/index.d.ts +2 -0
- package/dist/types/components/data-display/Tag/Tag.d.ts +13 -0
- package/dist/types/components/data-display/Tag/index.d.ts +2 -0
- package/dist/types/components/data-display/Timeline/Timeline.d.ts +15 -0
- package/dist/types/components/data-display/Timeline/index.d.ts +2 -0
- package/dist/types/components/feedback/Skeleton/Skeleton.d.ts +13 -0
- package/dist/types/components/feedback/Skeleton/index.d.ts +2 -0
- package/dist/types/components/feedback/Toast/ToastRegion.d.ts +2 -0
- package/dist/types/components/feedback/Toast/index.d.ts +3 -0
- package/dist/types/components/feedback/Toast/toastStore.d.ts +24 -0
- package/dist/types/components/forms/CheckboxGroup/CheckboxGroup.d.ts +28 -0
- package/dist/types/components/forms/CheckboxGroup/index.d.ts +2 -0
- package/dist/types/components/forms/ColorPicker/ColorPicker.d.ts +26 -0
- package/dist/types/components/forms/ColorPicker/index.d.ts +2 -0
- package/dist/types/components/forms/ComboBox/ComboBox.d.ts +7 -1
- package/dist/types/components/forms/Field/Field.d.ts +6 -2
- package/dist/types/components/forms/Field/index.d.ts +1 -1
- package/dist/types/components/forms/FileUpload/FileUpload.d.ts +37 -0
- package/dist/types/components/forms/FileUpload/index.d.ts +2 -0
- package/dist/types/components/forms/InputText/InputText.d.ts +4 -2
- package/dist/types/components/forms/SegmentedControl/SegmentedControl.d.ts +23 -0
- package/dist/types/components/forms/SegmentedControl/index.d.ts +2 -0
- package/dist/types/components/icons/icons.d.ts +29 -0
- package/dist/types/components/icons/index.d.ts +1 -1
- package/dist/types/components/navigation/SkipLink/SkipLink.d.ts +7 -0
- package/dist/types/components/navigation/SkipLink/index.d.ts +2 -0
- package/dist/types/components/navigation/Steps/Steps.d.ts +16 -0
- package/dist/types/components/navigation/Steps/index.d.ts +2 -0
- package/dist/types/components/navigation/Tabs/Tabs.d.ts +5 -1
- package/dist/types/components/navigation/TabsNav/TabsNav.d.ts +20 -0
- package/dist/types/components/navigation/TabsNav/index.d.ts +2 -0
- package/dist/types/components/overlays/Dialog/Dialog.d.ts +21 -9
- package/dist/types/components/overlays/Dialog/DialogFrame.d.ts +13 -0
- package/dist/types/components/overlays/Drawer/Drawer.d.ts +9 -0
- package/dist/types/components/overlays/Drawer/index.d.ts +2 -0
- package/dist/types/components/overlays/Menu/Menu.d.ts +16 -2
- package/dist/types/components/overlays/Menu/index.d.ts +1 -1
- package/dist/types/index.d.ts +43 -7
- package/dist/types/utils/formatters/formatarDuracao.d.ts +5 -0
- package/dist/types/utils/formatters/formatarNumero.d.ts +6 -1
- package/dist/types/utils/formatters/formatarTamanhoDeArquivo.d.ts +7 -0
- package/dist/types/utils/formatters/index.d.ts +4 -1
- package/dist/utils/formatters/formatarDuracao.cjs +2 -0
- package/dist/utils/formatters/formatarDuracao.cjs.map +1 -0
- package/dist/utils/formatters/formatarDuracao.js +10 -0
- package/dist/utils/formatters/formatarDuracao.js.map +1 -0
- package/dist/utils/formatters/formatarNumero.cjs +1 -1
- package/dist/utils/formatters/formatarNumero.cjs.map +1 -1
- package/dist/utils/formatters/formatarNumero.js +42 -17
- package/dist/utils/formatters/formatarNumero.js.map +1 -1
- package/dist/utils/formatters/formatarTamanhoDeArquivo.cjs +2 -0
- package/dist/utils/formatters/formatarTamanhoDeArquivo.cjs.map +1 -0
- package/dist/utils/formatters/formatarTamanhoDeArquivo.js +17 -0
- package/dist/utils/formatters/formatarTamanhoDeArquivo.js.map +1 -0
- package/package.json +3 -1
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { type LabelFont } from '../core/index.js';
|
|
2
|
+
import type { ChartGaugeScaleLabels, ChartGaugeTicks } from './ChartGauge.js';
|
|
3
|
+
import type { CenterLine, GaugeCenter } from './gaugeReading.js';
|
|
4
|
+
export type TextAnchor = 'start' | 'middle' | 'end';
|
|
5
|
+
export interface AngledLabel {
|
|
6
|
+
angle: number;
|
|
7
|
+
text: string;
|
|
8
|
+
}
|
|
9
|
+
export interface OutsideLabel extends AngledLabel {
|
|
10
|
+
kind: 'segment' | 'target';
|
|
11
|
+
}
|
|
12
|
+
export interface PlacedLabel<T extends AngledLabel = AngledLabel> {
|
|
13
|
+
anchor: TextAnchor;
|
|
14
|
+
label: T;
|
|
15
|
+
x: number;
|
|
16
|
+
y: number;
|
|
17
|
+
}
|
|
18
|
+
export interface GaugeLayoutInput {
|
|
19
|
+
center: GaugeCenter;
|
|
20
|
+
compact: boolean;
|
|
21
|
+
/** Radianos a partir do topo, no sentido horário. */
|
|
22
|
+
endAngle: number;
|
|
23
|
+
font: LabelFont;
|
|
24
|
+
height: number;
|
|
25
|
+
/** Rótulos de ponta, mínimo e máximo, quando `scaleLabels` é `minMax`. */
|
|
26
|
+
minMaxLabels: readonly [AngledLabel, AngledLabel];
|
|
27
|
+
needle: boolean;
|
|
28
|
+
/** Régua e marca da meta, além do raio externo do arco. */
|
|
29
|
+
outerBand: number;
|
|
30
|
+
outsideLabels: readonly OutsideLabel[];
|
|
31
|
+
scaleLabels: ChartGaugeScaleLabels;
|
|
32
|
+
startAngle: number;
|
|
33
|
+
thickness: number;
|
|
34
|
+
/** Rótulos das marcas principais, na ordem em que disputam espaço. */
|
|
35
|
+
tickLabels: readonly AngledLabel[];
|
|
36
|
+
ticks: ChartGaugeTicks;
|
|
37
|
+
width: number;
|
|
38
|
+
}
|
|
39
|
+
export interface GaugeCenterLayout {
|
|
40
|
+
height: number;
|
|
41
|
+
lineHeight: number;
|
|
42
|
+
lines: readonly CenterLine[];
|
|
43
|
+
top: number;
|
|
44
|
+
value?: {
|
|
45
|
+
family: string;
|
|
46
|
+
size: number;
|
|
47
|
+
text: string;
|
|
48
|
+
};
|
|
49
|
+
width: number;
|
|
50
|
+
}
|
|
51
|
+
export interface GaugeLayout {
|
|
52
|
+
center: GaugeCenterLayout;
|
|
53
|
+
cx: number;
|
|
54
|
+
cy: number;
|
|
55
|
+
innerRadius: number;
|
|
56
|
+
outsideLabels: readonly PlacedLabel<OutsideLabel>[];
|
|
57
|
+
pinRadius: number;
|
|
58
|
+
radius: number;
|
|
59
|
+
scaleLabels: readonly PlacedLabel[];
|
|
60
|
+
thickness: number;
|
|
61
|
+
}
|
|
62
|
+
export declare function pointAt(angle: number, radius: number): [number, number];
|
|
63
|
+
/** Maior raio em que arco, rótulos e centro cabem na área, e a posição de cada rótulo nele. */
|
|
64
|
+
export declare function layoutGauge(input: GaugeLayoutInput): GaugeLayout;
|
|
@@ -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';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type AxisLabelAngle, type AxisVisibility, type ChartCurve, type ChartHeight, type ChartLegendAlign, type ChartLegendPosition } from '../core/index.js';
|
|
1
|
+
import { type AxisLabelAngle, type AxisVisibility, type ChartCurve, type ChartHeight, type ChartLegendAlign, type ChartLegendPosition, type MarkVisibility } from '../core/index.js';
|
|
2
2
|
import { type SeriesAppearance } from '../palette/index.js';
|
|
3
3
|
export interface ChartLineSeries extends SeriesAppearance {
|
|
4
4
|
label: string;
|
|
@@ -10,6 +10,8 @@ export interface ChartLineProps {
|
|
|
10
10
|
curve?: ChartCurve;
|
|
11
11
|
defaultHiddenSeries?: readonly string[];
|
|
12
12
|
emptyMessage?: string;
|
|
13
|
+
/** Formato dos valores no balao. Sem ele, vale o `formatValue`: o eixo pode sair compacto e o balao, exato. */
|
|
14
|
+
formatTooltipValue?: (value: number) => string;
|
|
13
15
|
formatValue?: (value: number) => string;
|
|
14
16
|
/**
|
|
15
17
|
* Inclui o zero no dominio do eixo de valor. Ligado por padrao, porque marca
|
|
@@ -23,12 +25,21 @@ export interface ChartLineProps {
|
|
|
23
25
|
legend?: ChartLegendPosition;
|
|
24
26
|
legendAlign?: ChartLegendAlign;
|
|
25
27
|
onHiddenSeriesChange?: (hidden: readonly string[]) => void;
|
|
28
|
+
/** Indice da categoria mais proxima do ponteiro, ou `null` ao sair. */
|
|
29
|
+
onHoverCategory?: (index: number | null) => void;
|
|
26
30
|
series: readonly ChartLineSeries[];
|
|
27
|
-
|
|
28
|
-
|
|
31
|
+
/** Valor acima de cada ponto: sempre, nunca, ou so os da serie mais proxima do ponteiro. */
|
|
32
|
+
showDataLabels?: MarkVisibility;
|
|
33
|
+
/** Pontos de cada valor: sempre, nunca, ou so os da serie mais proxima do ponteiro. */
|
|
34
|
+
showDots?: MarkVisibility;
|
|
35
|
+
/**
|
|
36
|
+
* Balao com as series da categoria mais proxima do ponteiro. Desligue para montar o proprio
|
|
37
|
+
* `ChartTooltip` pela costura; sem balao nem costura, o ponto volta a ter o `<title>`.
|
|
38
|
+
*/
|
|
39
|
+
showTooltip?: boolean;
|
|
29
40
|
title: string;
|
|
30
41
|
xAxis?: AxisVisibility;
|
|
31
42
|
yAxis?: AxisVisibility;
|
|
32
43
|
yAxisRight?: AxisVisibility;
|
|
33
44
|
}
|
|
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;
|
|
45
|
+
export declare function ChartLine({ accent, categories, curve, defaultHiddenSeries, emptyMessage, formatTooltipValue, formatValue, height, includeZero, hiddenSeries, labelAngle, legend, legendAlign, onHiddenSeriesChange, onHoverCategory, series, showDataLabels, showDots, showTooltip, title, xAxis, yAxis, yAxisRight, }: ChartLineProps): import("react").JSX.Element;
|
|
@@ -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;
|
|
@@ -5,6 +5,8 @@ export interface ChartPieProps {
|
|
|
5
5
|
defaultHiddenSlices?: readonly string[];
|
|
6
6
|
emptyMessage?: string;
|
|
7
7
|
formatPercent?: (ratio: number) => string;
|
|
8
|
+
/** Formato dos valores no balao. Sem ele, vale o `formatValue`: o eixo pode sair compacto e o balao, exato. */
|
|
9
|
+
formatTooltipValue?: (value: number) => string;
|
|
8
10
|
formatValue?: (value: number) => string;
|
|
9
11
|
height?: ChartHeight;
|
|
10
12
|
hiddenSlices?: readonly string[];
|
|
@@ -17,6 +19,8 @@ export interface ChartPieProps {
|
|
|
17
19
|
otherLabel?: string;
|
|
18
20
|
showDataLabels?: boolean;
|
|
19
21
|
showLegendValues?: boolean;
|
|
22
|
+
/** Balao com a fatia sob o ponteiro, o valor e a parte do total. Desligue para montar o proprio `ChartTooltip`. */
|
|
23
|
+
showTooltip?: boolean;
|
|
20
24
|
/** Raio dos cantos de cada fatia. Sem valor, o token de raio pequeno. */
|
|
21
25
|
sliceRadius?: number;
|
|
22
26
|
slices: readonly ChartSlice[];
|
|
@@ -24,4 +28,4 @@ export interface ChartPieProps {
|
|
|
24
28
|
smallSliceThreshold?: number;
|
|
25
29
|
title: string;
|
|
26
30
|
}
|
|
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;
|
|
31
|
+
export declare function ChartPie({ accent, defaultHiddenSlices, emptyMessage, formatPercent, formatTooltipValue, formatValue, height, hiddenSlices, legend, legendAlign, onHiddenSlicesChange, onHoverSlice, otherLabel, showDataLabels, showLegendValues, showTooltip, sliceRadius, slices, smallSliceThreshold, title, }: ChartPieProps): import("react").JSX.Element;
|