@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,50 @@
|
|
|
1
|
+
import { jsxs as n, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { useId as p } from "react";
|
|
3
|
+
import o from "./Tag.module.css.js";
|
|
4
|
+
import { IconCheck as k, IconClose as x } from "../../icons/icons.js";
|
|
5
|
+
function v({
|
|
6
|
+
children: m,
|
|
7
|
+
className: b,
|
|
8
|
+
disabled: t = !1,
|
|
9
|
+
onRemove: l,
|
|
10
|
+
onSelectedChange: a,
|
|
11
|
+
selected: s,
|
|
12
|
+
size: f = "md",
|
|
13
|
+
...u
|
|
14
|
+
}) {
|
|
15
|
+
const i = p(), c = p(), e = s !== void 0, I = [o.tag, o[f], s && o.selected, t && o.disabled, b].filter(Boolean).join(" ");
|
|
16
|
+
return /* @__PURE__ */ n("span", { ...u, className: I, children: [
|
|
17
|
+
e ? /* @__PURE__ */ n(
|
|
18
|
+
"button",
|
|
19
|
+
{
|
|
20
|
+
"aria-pressed": s,
|
|
21
|
+
className: o.toggle,
|
|
22
|
+
disabled: t,
|
|
23
|
+
id: i,
|
|
24
|
+
onClick: () => a == null ? void 0 : a(!s),
|
|
25
|
+
type: "button",
|
|
26
|
+
children: [
|
|
27
|
+
s && /* @__PURE__ */ r(k, { className: o.check }),
|
|
28
|
+
m
|
|
29
|
+
]
|
|
30
|
+
}
|
|
31
|
+
) : /* @__PURE__ */ r("span", { id: i, children: m }),
|
|
32
|
+
l && /* @__PURE__ */ r(
|
|
33
|
+
"button",
|
|
34
|
+
{
|
|
35
|
+
"aria-label": "Remover",
|
|
36
|
+
"aria-labelledby": `${c} ${i}`,
|
|
37
|
+
className: o.remove,
|
|
38
|
+
disabled: t,
|
|
39
|
+
id: c,
|
|
40
|
+
onClick: l,
|
|
41
|
+
type: "button",
|
|
42
|
+
children: /* @__PURE__ */ r(x, {})
|
|
43
|
+
}
|
|
44
|
+
)
|
|
45
|
+
] });
|
|
46
|
+
}
|
|
47
|
+
export {
|
|
48
|
+
v as Tag
|
|
49
|
+
};
|
|
50
|
+
//# sourceMappingURL=Tag.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Tag.js","sources":["../../../../src/components/data-display/Tag/Tag.tsx"],"sourcesContent":["import { useId, type HTMLAttributes, type ReactNode } from 'react';\nimport { IconCheck, IconClose } from '../../icons';\nimport styles from './Tag.module.css';\n\nexport type TagSize = 'sm' | 'md';\n\nexport interface TagProps extends Omit<HTMLAttributes<HTMLSpanElement>, 'children'> {\n children: ReactNode;\n disabled?: boolean;\n /** Mostra o botao de remover, nomeado como \"Remover\" seguido do texto da etiqueta. */\n onRemove?: () => void;\n /** Com `selected`, a etiqueta vira um botao de alternar, como o filtro que se liga e desliga. */\n onSelectedChange?: (selected: boolean) => void;\n selected?: boolean;\n size?: TagSize;\n}\n\nexport function Tag({\n children,\n className,\n disabled = false,\n onRemove,\n onSelectedChange,\n selected,\n size = 'md',\n ...props\n}: TagProps) {\n const textId = useId();\n const removeId = useId();\n const toggleable = selected !== undefined;\n const classes = [styles.tag, styles[size], selected && styles.selected, disabled && styles.disabled, className]\n .filter(Boolean)\n .join(' ');\n\n return (\n <span {...props} className={classes}>\n {toggleable ? (\n <button\n aria-pressed={selected}\n className={styles.toggle}\n disabled={disabled}\n id={textId}\n onClick={() => onSelectedChange?.(!selected)}\n type=\"button\"\n >\n {selected && <IconCheck className={styles.check} />}\n {children}\n </button>\n ) : (\n <span id={textId}>{children}</span>\n )}\n {onRemove && (\n <button\n aria-label=\"Remover\"\n aria-labelledby={`${removeId} ${textId}`}\n className={styles.remove}\n disabled={disabled}\n id={removeId}\n onClick={onRemove}\n type=\"button\"\n >\n <IconClose />\n </button>\n )}\n </span>\n );\n}\n"],"names":["Tag","children","className","disabled","onRemove","onSelectedChange","selected","size","props","textId","useId","removeId","toggleable","classes","styles","jsxs","jsx","IconCheck","IconClose"],"mappings":";;;;AAiBO,SAASA,EAAI;AAAA,EAClB,UAAAC;AAAA,EACA,WAAAC;AAAA,EACA,UAAAC,IAAW;AAAA,EACX,UAAAC;AAAA,EACA,kBAAAC;AAAA,EACA,UAAAC;AAAA,EACA,MAAAC,IAAO;AAAA,EACP,GAAGC;AACL,GAAa;AACX,QAAMC,IAASC,EAAA,GACTC,IAAWD,EAAA,GACXE,IAAaN,MAAa,QAC1BO,IAAU,CAACC,EAAO,KAAKA,EAAOP,CAAI,GAAGD,KAAYQ,EAAO,UAAUX,KAAYW,EAAO,UAAUZ,CAAS,EAC3G,OAAO,OAAO,EACd,KAAK,GAAG;AAEX,SACE,gBAAAa,EAAC,QAAA,EAAM,GAAGP,GAAO,WAAWK,GACzB,UAAA;AAAA,IAAAD,IACC,gBAAAG;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,gBAAcT;AAAA,QACd,WAAWQ,EAAO;AAAA,QAClB,UAAAX;AAAA,QACA,IAAIM;AAAA,QACJ,SAAS,MAAMJ,KAAA,gBAAAA,EAAmB,CAACC;AAAA,QACnC,MAAK;AAAA,QAEJ,UAAA;AAAA,UAAAA,KAAY,gBAAAU,EAACC,GAAA,EAAU,WAAWH,EAAO,OAAO;AAAA,UAChDb;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA,IAGH,gBAAAe,EAAC,QAAA,EAAK,IAAIP,GAAS,UAAAR,EAAA,CAAS;AAAA,IAE7BG,KACC,gBAAAY;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,cAAW;AAAA,QACX,mBAAiB,GAAGL,CAAQ,IAAIF,CAAM;AAAA,QACtC,WAAWK,EAAO;AAAA,QAClB,UAAAX;AAAA,QACA,IAAIQ;AAAA,QACJ,SAASP;AAAA,QACT,MAAK;AAAA,QAEL,4BAACc,GAAA,CAAA,CAAU;AAAA,MAAA;AAAA,IAAA;AAAA,EACb,GAEJ;AAEJ;"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="_tag_gvmly_2",t="_sm_gvmly_20",l="_md_gvmly_26",s="_remove_gvmly_32",_="_toggle_gvmly_36",c="_check_gvmly_66",g="_selected_gvmly_70",o="_disabled_gvmly_94",m={tag:e,sm:t,md:l,remove:s,toggle:_,check:c,selected:g,disabled:o};exports.check=c;exports.default=m;exports.disabled=o;exports.md=l;exports.remove=s;exports.selected=g;exports.sm=t;exports.tag=e;exports.toggle=_;
|
|
2
|
+
//# sourceMappingURL=Tag.module.css.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Tag.module.css.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
const e = "_tag_gvmly_2", _ = "_sm_gvmly_20", s = "_md_gvmly_26", t = "_remove_gvmly_32", l = "_toggle_gvmly_36", c = "_check_gvmly_66", g = "_selected_gvmly_70", m = "_disabled_gvmly_94", o = {
|
|
2
|
+
tag: e,
|
|
3
|
+
sm: _,
|
|
4
|
+
md: s,
|
|
5
|
+
remove: t,
|
|
6
|
+
toggle: l,
|
|
7
|
+
check: c,
|
|
8
|
+
selected: g,
|
|
9
|
+
disabled: m
|
|
10
|
+
};
|
|
11
|
+
export {
|
|
12
|
+
c as check,
|
|
13
|
+
o as default,
|
|
14
|
+
m as disabled,
|
|
15
|
+
s as md,
|
|
16
|
+
t as remove,
|
|
17
|
+
g as selected,
|
|
18
|
+
_ as sm,
|
|
19
|
+
e as tag,
|
|
20
|
+
l as toggle
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=Tag.module.css.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Tag.module.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),a=require("./Timeline.module.css.cjs"),o=require("../../icons/icons.cjs");function m({className:r,current:d,items:n,label:i,...u}){const t=n.findIndex(s=>s.key===d);return e.jsx("ol",{...u,"aria-label":i,className:[a.default.timeline,r].filter(Boolean).join(" "),children:n.map((s,c)=>{const l=c<t?"complete":c===t?"current":"upcoming";return e.jsxs("li",{"aria-current":l==="current"?"step":void 0,className:[a.default.item,a.default[l]].join(" "),children:[e.jsx("span",{"aria-hidden":"true",className:a.default.marker,children:l==="complete"?e.jsx(o.IconCheck,{}):e.jsx("span",{className:a.default.dot})}),e.jsxs("span",{className:a.default.text,children:[e.jsx("span",{className:a.default.label,children:s.label}),l==="complete"&&e.jsx("span",{className:a.default.hiddenText,children:", concluído"}),l==="current"&&e.jsx("span",{className:a.default.hiddenText,children:", atual"}),s.description&&e.jsx("span",{className:a.default.description,children:s.description}),s.date&&e.jsx("span",{className:a.default.date,children:s.date})]})]},s.key)})})}exports.Timeline=m;
|
|
2
|
+
//# sourceMappingURL=Timeline.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Timeline.cjs","sources":["../../../../src/components/data-display/Timeline/Timeline.tsx"],"sourcesContent":["import type { ComponentPropsWithRef } from 'react';\nimport { IconCheck } from '../../icons';\nimport styles from './Timeline.module.css';\n\nexport interface TimelineItem {\n date?: string;\n description?: string;\n key: string;\n label: string;\n}\n\nexport interface TimelineProps extends Omit<ComponentPropsWithRef<'ol'>, 'children'> {\n /** Chave do estado atual. Os anteriores contam como concluídos, os seguintes como por vir. */\n current: string;\n items: readonly TimelineItem[];\n /** Nome da lista, para o leitor de tela. */\n label: string;\n}\n\nexport function Timeline({ className, current, items, label, ...props }: TimelineProps) {\n const currentIndex = items.findIndex((item) => item.key === current);\n\n return (\n <ol {...props} aria-label={label} className={[styles.timeline, className].filter(Boolean).join(' ')}>\n {items.map((item, index) => {\n const state = index < currentIndex ? 'complete' : index === currentIndex ? 'current' : 'upcoming';\n\n return (\n <li\n aria-current={state === 'current' ? 'step' : undefined}\n className={[styles.item, styles[state]].join(' ')}\n key={item.key}\n >\n <span aria-hidden=\"true\" className={styles.marker}>\n {state === 'complete' ? <IconCheck /> : <span className={styles.dot} />}\n </span>\n <span className={styles.text}>\n <span className={styles.label}>{item.label}</span>\n {state === 'complete' && <span className={styles.hiddenText}>, concluído</span>}\n {state === 'current' && <span className={styles.hiddenText}>, atual</span>}\n {item.description && <span className={styles.description}>{item.description}</span>}\n {item.date && <span className={styles.date}>{item.date}</span>}\n </span>\n </li>\n );\n })}\n </ol>\n );\n}\n"],"names":["Timeline","className","current","items","label","props","currentIndex","item","jsx","styles","index","state","jsxs","IconCheck"],"mappings":"+LAmBO,SAASA,EAAS,CAAE,UAAAC,EAAW,QAAAC,EAAS,MAAAC,EAAO,MAAAC,EAAO,GAAGC,GAAwB,CACtF,MAAMC,EAAeH,EAAM,UAAWI,GAASA,EAAK,MAAQL,CAAO,EAEnE,OACEM,EAAAA,IAAC,MAAI,GAAGH,EAAO,aAAYD,EAAO,UAAW,CAACK,EAAAA,QAAO,SAAUR,CAAS,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG,EAC/F,SAAAE,EAAM,IAAI,CAACI,EAAMG,IAAU,CAC1B,MAAMC,EAAQD,EAAQJ,EAAe,WAAaI,IAAUJ,EAAe,UAAY,WAEvF,OACEM,EAAAA,KAAC,KAAA,CACC,eAAcD,IAAU,UAAY,OAAS,OAC7C,UAAW,CAACF,EAAAA,QAAO,KAAMA,EAAAA,QAAOE,CAAK,CAAC,EAAE,KAAK,GAAG,EAGhD,SAAA,CAAAH,MAAC,QAAK,cAAY,OAAO,UAAWC,UAAO,OACxC,SAAAE,IAAU,WAAaH,EAAAA,IAACK,EAAAA,UAAA,EAAU,EAAKL,MAAC,OAAA,CAAK,UAAWC,EAAAA,QAAO,IAAK,EACvE,EACAG,EAAAA,KAAC,OAAA,CAAK,UAAWH,EAAAA,QAAO,KACtB,SAAA,CAAAD,MAAC,OAAA,CAAK,UAAWC,EAAAA,QAAO,MAAQ,WAAK,MAAM,EAC1CE,IAAU,YAAcH,EAAAA,IAAC,QAAK,UAAWC,EAAAA,QAAO,WAAY,SAAA,cAAW,EACvEE,IAAU,WAAaH,EAAAA,IAAC,QAAK,UAAWC,EAAAA,QAAO,WAAY,SAAA,UAAO,EAClEF,EAAK,aAAeC,MAAC,OAAA,CAAK,UAAWC,EAAAA,QAAO,YAAc,WAAK,WAAA,CAAY,EAC3EF,EAAK,MAAQC,MAAC,OAAA,CAAK,UAAWC,EAAAA,QAAO,KAAO,WAAK,IAAA,CAAK,CAAA,CAAA,CACzD,CAAA,CAAA,EAXKF,EAAK,GAAA,CAchB,CAAC,CAAA,CACH,CAEJ"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { jsx as a, jsxs as t } from "react/jsx-runtime";
|
|
2
|
+
import e from "./Timeline.module.css.js";
|
|
3
|
+
import { IconCheck as m } from "../../icons/icons.js";
|
|
4
|
+
function x({ className: i, current: o, items: s, label: d, ...p }) {
|
|
5
|
+
const c = s.findIndex((n) => n.key === o);
|
|
6
|
+
return /* @__PURE__ */ a("ol", { ...p, "aria-label": d, className: [e.timeline, i].filter(Boolean).join(" "), children: s.map((n, l) => {
|
|
7
|
+
const r = l < c ? "complete" : l === c ? "current" : "upcoming";
|
|
8
|
+
return /* @__PURE__ */ t(
|
|
9
|
+
"li",
|
|
10
|
+
{
|
|
11
|
+
"aria-current": r === "current" ? "step" : void 0,
|
|
12
|
+
className: [e.item, e[r]].join(" "),
|
|
13
|
+
children: [
|
|
14
|
+
/* @__PURE__ */ a("span", { "aria-hidden": "true", className: e.marker, children: r === "complete" ? /* @__PURE__ */ a(m, {}) : /* @__PURE__ */ a("span", { className: e.dot }) }),
|
|
15
|
+
/* @__PURE__ */ t("span", { className: e.text, children: [
|
|
16
|
+
/* @__PURE__ */ a("span", { className: e.label, children: n.label }),
|
|
17
|
+
r === "complete" && /* @__PURE__ */ a("span", { className: e.hiddenText, children: ", concluído" }),
|
|
18
|
+
r === "current" && /* @__PURE__ */ a("span", { className: e.hiddenText, children: ", atual" }),
|
|
19
|
+
n.description && /* @__PURE__ */ a("span", { className: e.description, children: n.description }),
|
|
20
|
+
n.date && /* @__PURE__ */ a("span", { className: e.date, children: n.date })
|
|
21
|
+
] })
|
|
22
|
+
]
|
|
23
|
+
},
|
|
24
|
+
n.key
|
|
25
|
+
);
|
|
26
|
+
}) });
|
|
27
|
+
}
|
|
28
|
+
export {
|
|
29
|
+
x as Timeline
|
|
30
|
+
};
|
|
31
|
+
//# sourceMappingURL=Timeline.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Timeline.js","sources":["../../../../src/components/data-display/Timeline/Timeline.tsx"],"sourcesContent":["import type { ComponentPropsWithRef } from 'react';\nimport { IconCheck } from '../../icons';\nimport styles from './Timeline.module.css';\n\nexport interface TimelineItem {\n date?: string;\n description?: string;\n key: string;\n label: string;\n}\n\nexport interface TimelineProps extends Omit<ComponentPropsWithRef<'ol'>, 'children'> {\n /** Chave do estado atual. Os anteriores contam como concluídos, os seguintes como por vir. */\n current: string;\n items: readonly TimelineItem[];\n /** Nome da lista, para o leitor de tela. */\n label: string;\n}\n\nexport function Timeline({ className, current, items, label, ...props }: TimelineProps) {\n const currentIndex = items.findIndex((item) => item.key === current);\n\n return (\n <ol {...props} aria-label={label} className={[styles.timeline, className].filter(Boolean).join(' ')}>\n {items.map((item, index) => {\n const state = index < currentIndex ? 'complete' : index === currentIndex ? 'current' : 'upcoming';\n\n return (\n <li\n aria-current={state === 'current' ? 'step' : undefined}\n className={[styles.item, styles[state]].join(' ')}\n key={item.key}\n >\n <span aria-hidden=\"true\" className={styles.marker}>\n {state === 'complete' ? <IconCheck /> : <span className={styles.dot} />}\n </span>\n <span className={styles.text}>\n <span className={styles.label}>{item.label}</span>\n {state === 'complete' && <span className={styles.hiddenText}>, concluído</span>}\n {state === 'current' && <span className={styles.hiddenText}>, atual</span>}\n {item.description && <span className={styles.description}>{item.description}</span>}\n {item.date && <span className={styles.date}>{item.date}</span>}\n </span>\n </li>\n );\n })}\n </ol>\n );\n}\n"],"names":["Timeline","className","current","items","label","props","currentIndex","item","jsx","styles","index","state","jsxs","IconCheck"],"mappings":";;;AAmBO,SAASA,EAAS,EAAE,WAAAC,GAAW,SAAAC,GAAS,OAAAC,GAAO,OAAAC,GAAO,GAAGC,KAAwB;AACtF,QAAMC,IAAeH,EAAM,UAAU,CAACI,MAASA,EAAK,QAAQL,CAAO;AAEnE,SACE,gBAAAM,EAAC,QAAI,GAAGH,GAAO,cAAYD,GAAO,WAAW,CAACK,EAAO,UAAUR,CAAS,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG,GAC/F,UAAAE,EAAM,IAAI,CAACI,GAAMG,MAAU;AAC1B,UAAMC,IAAQD,IAAQJ,IAAe,aAAaI,MAAUJ,IAAe,YAAY;AAEvF,WACE,gBAAAM;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,gBAAcD,MAAU,YAAY,SAAS;AAAA,QAC7C,WAAW,CAACF,EAAO,MAAMA,EAAOE,CAAK,CAAC,EAAE,KAAK,GAAG;AAAA,QAGhD,UAAA;AAAA,UAAA,gBAAAH,EAAC,UAAK,eAAY,QAAO,WAAWC,EAAO,QACxC,UAAAE,MAAU,aAAa,gBAAAH,EAACK,GAAA,EAAU,IAAK,gBAAAL,EAAC,QAAA,EAAK,WAAWC,EAAO,KAAK,GACvE;AAAA,UACA,gBAAAG,EAAC,QAAA,EAAK,WAAWH,EAAO,MACtB,UAAA;AAAA,YAAA,gBAAAD,EAAC,QAAA,EAAK,WAAWC,EAAO,OAAQ,YAAK,OAAM;AAAA,YAC1CE,MAAU,cAAc,gBAAAH,EAAC,UAAK,WAAWC,EAAO,YAAY,UAAA,eAAW;AAAA,YACvEE,MAAU,aAAa,gBAAAH,EAAC,UAAK,WAAWC,EAAO,YAAY,UAAA,WAAO;AAAA,YAClEF,EAAK,eAAe,gBAAAC,EAAC,QAAA,EAAK,WAAWC,EAAO,aAAc,YAAK,YAAA,CAAY;AAAA,YAC3EF,EAAK,QAAQ,gBAAAC,EAAC,QAAA,EAAK,WAAWC,EAAO,MAAO,YAAK,KAAA,CAAK;AAAA,UAAA,EAAA,CACzD;AAAA,QAAA;AAAA,MAAA;AAAA,MAXKF,EAAK;AAAA,IAAA;AAAA,EAchB,CAAC,EAAA,CACH;AAEJ;"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="_timeline_o3v8q_2",t="_item_o3v8q_12",_="_complete_o3v8q_35 _complete_7tv83_37",o="_current_o3v8q_43 _current_7tv83_63",n="_marker_o3v8q_47 _marker_7tv83_41",i="_dot_o3v8q_51",c="_text_o3v8q_62",r="_label_o3v8q_70 _label_7tv83_92",d="_upcoming_o3v8q_74",l="_description_o3v8q_78 _description_7tv83_107",s="_date_o3v8q_82",m="_hiddenText_o3v8q_89 _hiddenText_7tv83_113",v={timeline:e,item:t,complete:_,current:o,marker:n,dot:i,text:c,label:r,upcoming:d,description:l,date:s,hiddenText:m};exports.complete=_;exports.current=o;exports.date=s;exports.default=v;exports.description=l;exports.dot=i;exports.hiddenText=m;exports.item=t;exports.label=r;exports.marker=n;exports.text=c;exports.timeline=e;exports.upcoming=d;
|
|
2
|
+
//# sourceMappingURL=Timeline.module.css.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Timeline.module.css.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
const t = "_timeline_o3v8q_2", _ = "_item_o3v8q_12", e = "_complete_o3v8q_35 _complete_7tv83_37", o = "_current_o3v8q_43 _current_7tv83_63", n = "_marker_o3v8q_47 _marker_7tv83_41", c = "_dot_o3v8q_51", i = "_text_o3v8q_62", r = "_label_o3v8q_70 _label_7tv83_92", s = "_upcoming_o3v8q_74", d = "_description_o3v8q_78 _description_7tv83_107", v = "_date_o3v8q_82", l = "_hiddenText_o3v8q_89 _hiddenText_7tv83_113", m = {
|
|
2
|
+
timeline: t,
|
|
3
|
+
item: _,
|
|
4
|
+
complete: e,
|
|
5
|
+
current: o,
|
|
6
|
+
marker: n,
|
|
7
|
+
dot: c,
|
|
8
|
+
text: i,
|
|
9
|
+
label: r,
|
|
10
|
+
upcoming: s,
|
|
11
|
+
description: d,
|
|
12
|
+
date: v,
|
|
13
|
+
hiddenText: l
|
|
14
|
+
};
|
|
15
|
+
export {
|
|
16
|
+
e as complete,
|
|
17
|
+
o as current,
|
|
18
|
+
v as date,
|
|
19
|
+
m as default,
|
|
20
|
+
d as description,
|
|
21
|
+
c as dot,
|
|
22
|
+
l as hiddenText,
|
|
23
|
+
_ as item,
|
|
24
|
+
r as label,
|
|
25
|
+
n as marker,
|
|
26
|
+
i as text,
|
|
27
|
+
t as timeline,
|
|
28
|
+
s as upcoming
|
|
29
|
+
};
|
|
30
|
+
//# sourceMappingURL=Timeline.module.css.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Timeline.module.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("react/jsx-runtime"),e=require("./Skeleton.module.css.cjs");function s({className:t,height:n,shape:l="line",style:o,width:r,...i}){return u.jsx("span",{...i,"aria-hidden":"true",className:[e.default.skeleton,e.default[l],t].filter(Boolean).join(" "),style:{height:n,width:r,...o}})}exports.Skeleton=s;
|
|
2
|
+
//# sourceMappingURL=Skeleton.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Skeleton.cjs","sources":["../../../../src/components/feedback/Skeleton/Skeleton.tsx"],"sourcesContent":["import type { HTMLAttributes } from 'react';\nimport styles from './Skeleton.module.css';\n\nexport type SkeletonShape = 'line' | 'circle' | 'block';\n\nexport interface SkeletonProps extends HTMLAttributes<HTMLSpanElement> {\n /** Numero em pixels ou qualquer medida CSS. Sem altura, cada forma tem a sua: linha de texto, avatar ou bloco. */\n height?: number | string;\n shape?: SkeletonShape;\n width?: number | string;\n}\n\n/**\n * Lugar de um conteudo que ainda carrega. E decorativo e fica fora da leitura:\n * quem envolve os esqueletos anuncia o carregamento, com `aria-busy` ou uma mensagem de status.\n */\nexport function Skeleton({ className, height, shape = 'line', style, width, ...props }: SkeletonProps) {\n return (\n <span\n {...props}\n aria-hidden=\"true\"\n className={[styles.skeleton, styles[shape], className].filter(Boolean).join(' ')}\n style={{ height, width, ...style }}\n />\n );\n}\n"],"names":["Skeleton","className","height","shape","style","width","props","jsx","styles"],"mappings":"4JAgBO,SAASA,EAAS,CAAE,UAAAC,EAAW,OAAAC,EAAQ,MAAAC,EAAQ,OAAQ,MAAAC,EAAO,MAAAC,EAAO,GAAGC,GAAwB,CACrG,OACEC,EAAAA,IAAC,OAAA,CACE,GAAGD,EACJ,cAAY,OACZ,UAAW,CAACE,EAAAA,QAAO,SAAUA,EAAAA,QAAOL,CAAK,EAAGF,CAAS,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG,EAC/E,MAAO,CAAE,OAAAC,EAAQ,MAAAG,EAAO,GAAGD,CAAA,CAAM,CAAA,CAGvC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import e from "./Skeleton.module.css.js";
|
|
3
|
+
function f({ className: o, height: t, shape: n = "line", style: r, width: i, ...l }) {
|
|
4
|
+
return /* @__PURE__ */ s(
|
|
5
|
+
"span",
|
|
6
|
+
{
|
|
7
|
+
...l,
|
|
8
|
+
"aria-hidden": "true",
|
|
9
|
+
className: [e.skeleton, e[n], o].filter(Boolean).join(" "),
|
|
10
|
+
style: { height: t, width: i, ...r }
|
|
11
|
+
}
|
|
12
|
+
);
|
|
13
|
+
}
|
|
14
|
+
export {
|
|
15
|
+
f as Skeleton
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=Skeleton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Skeleton.js","sources":["../../../../src/components/feedback/Skeleton/Skeleton.tsx"],"sourcesContent":["import type { HTMLAttributes } from 'react';\nimport styles from './Skeleton.module.css';\n\nexport type SkeletonShape = 'line' | 'circle' | 'block';\n\nexport interface SkeletonProps extends HTMLAttributes<HTMLSpanElement> {\n /** Numero em pixels ou qualquer medida CSS. Sem altura, cada forma tem a sua: linha de texto, avatar ou bloco. */\n height?: number | string;\n shape?: SkeletonShape;\n width?: number | string;\n}\n\n/**\n * Lugar de um conteudo que ainda carrega. E decorativo e fica fora da leitura:\n * quem envolve os esqueletos anuncia o carregamento, com `aria-busy` ou uma mensagem de status.\n */\nexport function Skeleton({ className, height, shape = 'line', style, width, ...props }: SkeletonProps) {\n return (\n <span\n {...props}\n aria-hidden=\"true\"\n className={[styles.skeleton, styles[shape], className].filter(Boolean).join(' ')}\n style={{ height, width, ...style }}\n />\n );\n}\n"],"names":["Skeleton","className","height","shape","style","width","props","jsx","styles"],"mappings":";;AAgBO,SAASA,EAAS,EAAE,WAAAC,GAAW,QAAAC,GAAQ,OAAAC,IAAQ,QAAQ,OAAAC,GAAO,OAAAC,GAAO,GAAGC,KAAwB;AACrG,SACE,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACE,GAAGD;AAAA,MACJ,eAAY;AAAA,MACZ,WAAW,CAACE,EAAO,UAAUA,EAAOL,CAAK,GAAGF,CAAS,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG;AAAA,MAC/E,OAAO,EAAE,QAAAC,GAAQ,OAAAG,GAAO,GAAGD,EAAA;AAAA,IAAM;AAAA,EAAA;AAGvC;"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="_skeleton_121wr_1",l="_line_121wr_14",o="_circle_121wr_19",t="_block_121wr_25",c={skeleton:e,"skeleton-shimmer":"_skeleton-shimmer_121wr_1",line:l,circle:o,block:t};exports.block=t;exports.circle=o;exports.default=c;exports.line=l;exports.skeleton=e;
|
|
2
|
+
//# sourceMappingURL=Skeleton.module.css.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Skeleton.module.css.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
const e = "_skeleton_121wr_1", l = "_line_121wr_14", s = "_circle_121wr_19", _ = "_block_121wr_25", c = {
|
|
2
|
+
skeleton: e,
|
|
3
|
+
"skeleton-shimmer": "_skeleton-shimmer_121wr_1",
|
|
4
|
+
line: l,
|
|
5
|
+
circle: s,
|
|
6
|
+
block: _
|
|
7
|
+
};
|
|
8
|
+
export {
|
|
9
|
+
_ as block,
|
|
10
|
+
s as circle,
|
|
11
|
+
c as default,
|
|
12
|
+
l as line,
|
|
13
|
+
e as skeleton
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=Skeleton.module.css.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Skeleton.module.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const s="_region_1hw9s_2",t="_toast_1hw9s_22",n="_icon_1hw9s_36",o="_info_1hw9s_43",e="_success_1hw9s_47",c="_warning_1hw9s_51",_="_danger_1hw9s_55",i="_content_1hw9s_59",r="_title_1hw9s_67",a="_description_1hw9s_73",w="_actions_1hw9s_80",l="_close_1hw9s_86",g={region:s,toast:t,"toast-enter":"_toast-enter_1hw9s_1",icon:n,info:o,success:e,warning:c,danger:_,content:i,title:r,description:a,actions:w,close:l};exports.actions=w;exports.close=l;exports.content=i;exports.danger=_;exports.default=g;exports.description=a;exports.icon=n;exports.info=o;exports.region=s;exports.success=e;exports.title=r;exports.toast=t;exports.warning=c;
|
|
2
|
+
//# sourceMappingURL=Toast.module.css.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Toast.module.css.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
const s = "_region_1hw9s_2", t = "_toast_1hw9s_22", n = "_icon_1hw9s_36", o = "_info_1hw9s_43", _ = "_success_1hw9s_47", c = "_warning_1hw9s_51", e = "_danger_1hw9s_55", i = "_content_1hw9s_59", a = "_title_1hw9s_67", w = "_description_1hw9s_73", r = "_actions_1hw9s_80", h = "_close_1hw9s_86", g = {
|
|
2
|
+
region: s,
|
|
3
|
+
toast: t,
|
|
4
|
+
"toast-enter": "_toast-enter_1hw9s_1",
|
|
5
|
+
icon: n,
|
|
6
|
+
info: o,
|
|
7
|
+
success: _,
|
|
8
|
+
warning: c,
|
|
9
|
+
danger: e,
|
|
10
|
+
content: i,
|
|
11
|
+
title: a,
|
|
12
|
+
description: w,
|
|
13
|
+
actions: r,
|
|
14
|
+
close: h
|
|
15
|
+
};
|
|
16
|
+
export {
|
|
17
|
+
r as actions,
|
|
18
|
+
h as close,
|
|
19
|
+
i as content,
|
|
20
|
+
e as danger,
|
|
21
|
+
g as default,
|
|
22
|
+
w as description,
|
|
23
|
+
n as icon,
|
|
24
|
+
o as info,
|
|
25
|
+
s as region,
|
|
26
|
+
_ as success,
|
|
27
|
+
a as title,
|
|
28
|
+
t as toast,
|
|
29
|
+
c as warning
|
|
30
|
+
};
|
|
31
|
+
//# sourceMappingURL=Toast.module.css.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Toast.module.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),l=require("react"),n=require("./toastStore.cjs"),s=require("./Toast.module.css.cjs"),i=require("../../icons/icons.cjs"),v=require("../../actions/Button/Button.cjs"),N=6e3,C={danger:i.IconExclamationCircle,info:i.IconInfoCircle,success:i.IconCheckCircle,warning:i.IconExclamationTriangle};function I(){const o=l.useSyncExternalStore(n.subscribeToasts,n.getToasts,n.getServerToasts);return e.jsx("div",{className:s.default.region,children:o.slice(-3).map(t=>e.jsx(S,{toast:t},t.id))})}function S({toast:o}){const{action:t,description:d,id:r,title:x,tone:a="info"}=o,u=o.duration===void 0?a==="danger"?null:N:o.duration,[f,m]=l.useState(!1),[T,g]=l.useState(!1),j=C[a];l.useEffect(()=>{if(u===null||f||T)return;const c=setTimeout(()=>n.dismissToast(r),u);return()=>clearTimeout(c)},[u,T,f,r]);function h(c){c.currentTarget.contains(c.relatedTarget)||g(!1)}return e.jsxs("div",{className:[s.default.toast,s.default[a]].join(" "),onBlur:h,onFocus:()=>g(!0),onMouseEnter:()=>m(!0),onMouseLeave:()=>m(!1),role:a==="danger"||a==="warning"?"alert":"status",children:[e.jsx(j,{className:s.default.icon}),e.jsxs("div",{className:s.default.content,children:[e.jsx("strong",{className:s.default.title,children:x}),d&&e.jsx("p",{className:s.default.description,children:d}),t&&e.jsx("div",{className:s.default.actions,children:e.jsx(v.Button,{onClick:()=>{t.onClick(),n.dismissToast(r)},size:"sm",variant:"secondary",children:t.label})})]}),e.jsx("button",{"aria-label":"Fechar aviso",className:s.default.close,onClick:()=>n.dismissToast(r),type:"button",children:e.jsx(i.IconClose,{})})]})}exports.ToastRegion=I;
|
|
2
|
+
//# sourceMappingURL=ToastRegion.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ToastRegion.cjs","sources":["../../../../src/components/feedback/Toast/ToastRegion.tsx"],"sourcesContent":["import { useEffect, useState, useSyncExternalStore, type FocusEvent } from 'react';\nimport { Button } from '../../actions/Button';\nimport { IconCheckCircle, IconClose, IconExclamationCircle, IconExclamationTriangle, IconInfoCircle } from '../../icons';\nimport { dismissToast, getServerToasts, getToasts, subscribeToasts, type ToastEntry } from './toastStore';\nimport styles from './Toast.module.css';\n\nconst VISIBLE_LIMIT = 3;\nconst DEFAULT_DURATION = 6000;\n\nconst TONE_ICONS = {\n danger: IconExclamationCircle,\n info: IconInfoCircle,\n success: IconCheckCircle,\n warning: IconExclamationTriangle,\n};\n\n/** Canto onde os avisos de `showToast` aparecem. Montado uma vez, na raiz da aplicacao. */\nexport function ToastRegion() {\n const toasts = useSyncExternalStore(subscribeToasts, getToasts, getServerToasts);\n\n return (\n <div className={styles.region}>\n {toasts.slice(-VISIBLE_LIMIT).map((toast) => (\n <Toast key={toast.id} toast={toast} />\n ))}\n </div>\n );\n}\n\nfunction Toast({ toast }: { toast: ToastEntry }) {\n const { action, description, id, title, tone = 'info' } = toast;\n const duration = toast.duration === undefined ? (tone === 'danger' ? null : DEFAULT_DURATION) : toast.duration;\n const [hovered, setHovered] = useState(false);\n const [focused, setFocused] = useState(false);\n const ToneIcon = TONE_ICONS[tone];\n\n // Quem esta lendo ou operando o aviso nao o perde: ponteiro ou foco dentro param o tempo, que recomeca ao sair.\n useEffect(() => {\n if (duration === null || hovered || focused) {\n return;\n }\n\n const timer = setTimeout(() => dismissToast(id), duration);\n return () => clearTimeout(timer);\n }, [duration, focused, hovered, id]);\n\n function handleBlur(event: FocusEvent<HTMLDivElement>) {\n if (!event.currentTarget.contains(event.relatedTarget)) {\n setFocused(false);\n }\n }\n\n return (\n <div\n className={[styles.toast, styles[tone]].join(' ')}\n onBlur={handleBlur}\n onFocus={() => setFocused(true)}\n onMouseEnter={() => setHovered(true)}\n onMouseLeave={() => setHovered(false)}\n role={tone === 'danger' || tone === 'warning' ? 'alert' : 'status'}\n >\n <ToneIcon className={styles.icon} />\n <div className={styles.content}>\n <strong className={styles.title}>{title}</strong>\n {description && <p className={styles.description}>{description}</p>}\n {action && (\n <div className={styles.actions}>\n <Button\n onClick={() => {\n action.onClick();\n dismissToast(id);\n }}\n size=\"sm\"\n variant=\"secondary\"\n >\n {action.label}\n </Button>\n </div>\n )}\n </div>\n <button aria-label=\"Fechar aviso\" className={styles.close} onClick={() => dismissToast(id)} type=\"button\">\n <IconClose />\n </button>\n </div>\n );\n}\n"],"names":["DEFAULT_DURATION","TONE_ICONS","IconExclamationCircle","IconInfoCircle","IconCheckCircle","IconExclamationTriangle","ToastRegion","toasts","useSyncExternalStore","subscribeToasts","getToasts","getServerToasts","styles","toast","jsx","Toast","action","description","id","title","tone","duration","hovered","setHovered","useState","focused","setFocused","ToneIcon","useEffect","timer","dismissToast","handleBlur","event","jsxs","Button","IconClose"],"mappings":"0RAOMA,EAAmB,IAEnBC,EAAa,CACjB,OAAQC,EAAAA,sBACR,KAAMC,EAAAA,eACN,QAASC,EAAAA,gBACT,QAASC,EAAAA,uBACX,EAGO,SAASC,GAAc,CAC5B,MAAMC,EAASC,EAAAA,qBAAqBC,kBAAiBC,EAAAA,UAAWC,EAAAA,eAAe,EAE/E,aACG,MAAA,CAAI,UAAWC,EAAAA,QAAO,OACpB,SAAAL,EAAO,MAAM,EAAc,EAAE,IAAKM,GACjCC,EAAAA,IAACC,EAAA,CAAqB,MAAAF,GAAVA,EAAM,EAAkB,CACrC,EACH,CAEJ,CAEA,SAASE,EAAM,CAAE,MAAAF,GAAgC,CAC/C,KAAM,CAAE,OAAAG,EAAQ,YAAAC,EAAa,GAAAC,EAAI,MAAAC,EAAO,KAAAC,EAAO,QAAWP,EACpDQ,EAAWR,EAAM,WAAa,OAAaO,IAAS,SAAW,KAAOpB,EAAoBa,EAAM,SAChG,CAACS,EAASC,CAAU,EAAIC,EAAAA,SAAS,EAAK,EACtC,CAACC,EAASC,CAAU,EAAIF,EAAAA,SAAS,EAAK,EACtCG,EAAW1B,EAAWmB,CAAI,EAGhCQ,EAAAA,UAAU,IAAM,CACd,GAAIP,IAAa,MAAQC,GAAWG,EAClC,OAGF,MAAMI,EAAQ,WAAW,IAAMC,EAAAA,aAAaZ,CAAE,EAAGG,CAAQ,EACzD,MAAO,IAAM,aAAaQ,CAAK,CACjC,EAAG,CAACR,EAAUI,EAASH,EAASJ,CAAE,CAAC,EAEnC,SAASa,EAAWC,EAAmC,CAChDA,EAAM,cAAc,SAASA,EAAM,aAAa,GACnDN,EAAW,EAAK,CAEpB,CAEA,OACEO,EAAAA,KAAC,MAAA,CACC,UAAW,CAACrB,EAAAA,QAAO,MAAOA,EAAAA,QAAOQ,CAAI,CAAC,EAAE,KAAK,GAAG,EAChD,OAAQW,EACR,QAAS,IAAML,EAAW,EAAI,EAC9B,aAAc,IAAMH,EAAW,EAAI,EACnC,aAAc,IAAMA,EAAW,EAAK,EACpC,KAAMH,IAAS,UAAYA,IAAS,UAAY,QAAU,SAE1D,SAAA,CAAAN,EAAAA,IAACa,EAAA,CAAS,UAAWf,EAAAA,QAAO,IAAA,CAAM,EAClCqB,EAAAA,KAAC,MAAA,CAAI,UAAWrB,EAAAA,QAAO,QACrB,SAAA,CAAAE,EAAAA,IAAC,SAAA,CAAO,UAAWF,EAAAA,QAAO,MAAQ,SAAAO,EAAM,EACvCF,GAAeH,EAAAA,IAAC,IAAA,CAAE,UAAWF,EAAAA,QAAO,YAAc,SAAAK,EAAY,EAC9DD,GACCF,EAAAA,IAAC,MAAA,CAAI,UAAWF,UAAO,QACrB,SAAAE,EAAAA,IAACoB,EAAAA,OAAA,CACC,QAAS,IAAM,CACblB,EAAO,QAAA,EACPc,EAAAA,aAAaZ,CAAE,CACjB,EACA,KAAK,KACL,QAAQ,YAEP,SAAAF,EAAO,KAAA,CAAA,CACV,CACF,CAAA,EAEJ,QACC,SAAA,CAAO,aAAW,eAAe,UAAWJ,EAAAA,QAAO,MAAO,QAAS,IAAMkB,EAAAA,aAAaZ,CAAE,EAAG,KAAK,SAC/F,SAAAJ,MAACqB,EAAAA,YAAU,CAAA,CACb,CAAA,CAAA,CAAA,CAGN"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { jsx as o, jsxs as T } from "react/jsx-runtime";
|
|
2
|
+
import { useSyncExternalStore as v, useState as g, useEffect as C } from "react";
|
|
3
|
+
import { subscribeToasts as I, getToasts as E, getServerToasts as b, dismissToast as a } from "./toastStore.js";
|
|
4
|
+
import e from "./Toast.module.css.js";
|
|
5
|
+
import { IconExclamationTriangle as x, IconCheckCircle as S, IconInfoCircle as k, IconExclamationCircle as y, IconClose as F } from "../../icons/icons.js";
|
|
6
|
+
import { Button as j } from "../../actions/Button/Button.js";
|
|
7
|
+
const B = 6e3, O = {
|
|
8
|
+
danger: y,
|
|
9
|
+
info: k,
|
|
10
|
+
success: S,
|
|
11
|
+
warning: x
|
|
12
|
+
};
|
|
13
|
+
function _() {
|
|
14
|
+
const s = v(I, E, b);
|
|
15
|
+
return /* @__PURE__ */ o("div", { className: e.region, children: s.slice(-3).map((n) => /* @__PURE__ */ o(w, { toast: n }, n.id)) });
|
|
16
|
+
}
|
|
17
|
+
function w({ toast: s }) {
|
|
18
|
+
const { action: n, description: l, id: r, title: h, tone: t = "info" } = s, c = s.duration === void 0 ? t === "danger" ? null : B : s.duration, [u, d] = g(!1), [m, f] = g(!1), p = O[t];
|
|
19
|
+
C(() => {
|
|
20
|
+
if (c === null || u || m)
|
|
21
|
+
return;
|
|
22
|
+
const i = setTimeout(() => a(r), c);
|
|
23
|
+
return () => clearTimeout(i);
|
|
24
|
+
}, [c, m, u, r]);
|
|
25
|
+
function N(i) {
|
|
26
|
+
i.currentTarget.contains(i.relatedTarget) || f(!1);
|
|
27
|
+
}
|
|
28
|
+
return /* @__PURE__ */ T(
|
|
29
|
+
"div",
|
|
30
|
+
{
|
|
31
|
+
className: [e.toast, e[t]].join(" "),
|
|
32
|
+
onBlur: N,
|
|
33
|
+
onFocus: () => f(!0),
|
|
34
|
+
onMouseEnter: () => d(!0),
|
|
35
|
+
onMouseLeave: () => d(!1),
|
|
36
|
+
role: t === "danger" || t === "warning" ? "alert" : "status",
|
|
37
|
+
children: [
|
|
38
|
+
/* @__PURE__ */ o(p, { className: e.icon }),
|
|
39
|
+
/* @__PURE__ */ T("div", { className: e.content, children: [
|
|
40
|
+
/* @__PURE__ */ o("strong", { className: e.title, children: h }),
|
|
41
|
+
l && /* @__PURE__ */ o("p", { className: e.description, children: l }),
|
|
42
|
+
n && /* @__PURE__ */ o("div", { className: e.actions, children: /* @__PURE__ */ o(
|
|
43
|
+
j,
|
|
44
|
+
{
|
|
45
|
+
onClick: () => {
|
|
46
|
+
n.onClick(), a(r);
|
|
47
|
+
},
|
|
48
|
+
size: "sm",
|
|
49
|
+
variant: "secondary",
|
|
50
|
+
children: n.label
|
|
51
|
+
}
|
|
52
|
+
) })
|
|
53
|
+
] }),
|
|
54
|
+
/* @__PURE__ */ o("button", { "aria-label": "Fechar aviso", className: e.close, onClick: () => a(r), type: "button", children: /* @__PURE__ */ o(F, {}) })
|
|
55
|
+
]
|
|
56
|
+
}
|
|
57
|
+
);
|
|
58
|
+
}
|
|
59
|
+
export {
|
|
60
|
+
_ as ToastRegion
|
|
61
|
+
};
|
|
62
|
+
//# sourceMappingURL=ToastRegion.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ToastRegion.js","sources":["../../../../src/components/feedback/Toast/ToastRegion.tsx"],"sourcesContent":["import { useEffect, useState, useSyncExternalStore, type FocusEvent } from 'react';\nimport { Button } from '../../actions/Button';\nimport { IconCheckCircle, IconClose, IconExclamationCircle, IconExclamationTriangle, IconInfoCircle } from '../../icons';\nimport { dismissToast, getServerToasts, getToasts, subscribeToasts, type ToastEntry } from './toastStore';\nimport styles from './Toast.module.css';\n\nconst VISIBLE_LIMIT = 3;\nconst DEFAULT_DURATION = 6000;\n\nconst TONE_ICONS = {\n danger: IconExclamationCircle,\n info: IconInfoCircle,\n success: IconCheckCircle,\n warning: IconExclamationTriangle,\n};\n\n/** Canto onde os avisos de `showToast` aparecem. Montado uma vez, na raiz da aplicacao. */\nexport function ToastRegion() {\n const toasts = useSyncExternalStore(subscribeToasts, getToasts, getServerToasts);\n\n return (\n <div className={styles.region}>\n {toasts.slice(-VISIBLE_LIMIT).map((toast) => (\n <Toast key={toast.id} toast={toast} />\n ))}\n </div>\n );\n}\n\nfunction Toast({ toast }: { toast: ToastEntry }) {\n const { action, description, id, title, tone = 'info' } = toast;\n const duration = toast.duration === undefined ? (tone === 'danger' ? null : DEFAULT_DURATION) : toast.duration;\n const [hovered, setHovered] = useState(false);\n const [focused, setFocused] = useState(false);\n const ToneIcon = TONE_ICONS[tone];\n\n // Quem esta lendo ou operando o aviso nao o perde: ponteiro ou foco dentro param o tempo, que recomeca ao sair.\n useEffect(() => {\n if (duration === null || hovered || focused) {\n return;\n }\n\n const timer = setTimeout(() => dismissToast(id), duration);\n return () => clearTimeout(timer);\n }, [duration, focused, hovered, id]);\n\n function handleBlur(event: FocusEvent<HTMLDivElement>) {\n if (!event.currentTarget.contains(event.relatedTarget)) {\n setFocused(false);\n }\n }\n\n return (\n <div\n className={[styles.toast, styles[tone]].join(' ')}\n onBlur={handleBlur}\n onFocus={() => setFocused(true)}\n onMouseEnter={() => setHovered(true)}\n onMouseLeave={() => setHovered(false)}\n role={tone === 'danger' || tone === 'warning' ? 'alert' : 'status'}\n >\n <ToneIcon className={styles.icon} />\n <div className={styles.content}>\n <strong className={styles.title}>{title}</strong>\n {description && <p className={styles.description}>{description}</p>}\n {action && (\n <div className={styles.actions}>\n <Button\n onClick={() => {\n action.onClick();\n dismissToast(id);\n }}\n size=\"sm\"\n variant=\"secondary\"\n >\n {action.label}\n </Button>\n </div>\n )}\n </div>\n <button aria-label=\"Fechar aviso\" className={styles.close} onClick={() => dismissToast(id)} type=\"button\">\n <IconClose />\n </button>\n </div>\n );\n}\n"],"names":["DEFAULT_DURATION","TONE_ICONS","IconExclamationCircle","IconInfoCircle","IconCheckCircle","IconExclamationTriangle","ToastRegion","toasts","useSyncExternalStore","subscribeToasts","getToasts","getServerToasts","styles","toast","jsx","Toast","action","description","id","title","tone","duration","hovered","setHovered","useState","focused","setFocused","ToneIcon","useEffect","timer","dismissToast","handleBlur","event","jsxs","Button","IconClose"],"mappings":";;;;;;AAOA,MAAMA,IAAmB,KAEnBC,IAAa;AAAA,EACjB,QAAQC;AAAA,EACR,MAAMC;AAAA,EACN,SAASC;AAAA,EACT,SAASC;AACX;AAGO,SAASC,IAAc;AAC5B,QAAMC,IAASC,EAAqBC,GAAiBC,GAAWC,CAAe;AAE/E,2BACG,OAAA,EAAI,WAAWC,EAAO,QACpB,UAAAL,EAAO,MAAM,EAAc,EAAE,IAAI,CAACM,MACjC,gBAAAC,EAACC,GAAA,EAAqB,OAAAF,KAAVA,EAAM,EAAkB,CACrC,GACH;AAEJ;AAEA,SAASE,EAAM,EAAE,OAAAF,KAAgC;AAC/C,QAAM,EAAE,QAAAG,GAAQ,aAAAC,GAAa,IAAAC,GAAI,OAAAC,GAAO,MAAAC,IAAO,WAAWP,GACpDQ,IAAWR,EAAM,aAAa,SAAaO,MAAS,WAAW,OAAOpB,IAAoBa,EAAM,UAChG,CAACS,GAASC,CAAU,IAAIC,EAAS,EAAK,GACtC,CAACC,GAASC,CAAU,IAAIF,EAAS,EAAK,GACtCG,IAAW1B,EAAWmB,CAAI;AAGhC,EAAAQ,EAAU,MAAM;AACd,QAAIP,MAAa,QAAQC,KAAWG;AAClC;AAGF,UAAMI,IAAQ,WAAW,MAAMC,EAAaZ,CAAE,GAAGG,CAAQ;AACzD,WAAO,MAAM,aAAaQ,CAAK;AAAA,EACjC,GAAG,CAACR,GAAUI,GAASH,GAASJ,CAAE,CAAC;AAEnC,WAASa,EAAWC,GAAmC;AACrD,IAAKA,EAAM,cAAc,SAASA,EAAM,aAAa,KACnDN,EAAW,EAAK;AAAA,EAEpB;AAEA,SACE,gBAAAO;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAW,CAACrB,EAAO,OAAOA,EAAOQ,CAAI,CAAC,EAAE,KAAK,GAAG;AAAA,MAChD,QAAQW;AAAA,MACR,SAAS,MAAML,EAAW,EAAI;AAAA,MAC9B,cAAc,MAAMH,EAAW,EAAI;AAAA,MACnC,cAAc,MAAMA,EAAW,EAAK;AAAA,MACpC,MAAMH,MAAS,YAAYA,MAAS,YAAY,UAAU;AAAA,MAE1D,UAAA;AAAA,QAAA,gBAAAN,EAACa,GAAA,EAAS,WAAWf,EAAO,KAAA,CAAM;AAAA,QAClC,gBAAAqB,EAAC,OAAA,EAAI,WAAWrB,EAAO,SACrB,UAAA;AAAA,UAAA,gBAAAE,EAAC,UAAA,EAAO,WAAWF,EAAO,OAAQ,UAAAO,GAAM;AAAA,UACvCF,KAAe,gBAAAH,EAAC,KAAA,EAAE,WAAWF,EAAO,aAAc,UAAAK,GAAY;AAAA,UAC9DD,KACC,gBAAAF,EAAC,OAAA,EAAI,WAAWF,EAAO,SACrB,UAAA,gBAAAE;AAAA,YAACoB;AAAA,YAAA;AAAA,cACC,SAAS,MAAM;AACb,gBAAAlB,EAAO,QAAA,GACPc,EAAaZ,CAAE;AAAA,cACjB;AAAA,cACA,MAAK;AAAA,cACL,SAAQ;AAAA,cAEP,UAAAF,EAAO;AAAA,YAAA;AAAA,UAAA,EACV,CACF;AAAA,QAAA,GAEJ;AAAA,0BACC,UAAA,EAAO,cAAW,gBAAe,WAAWJ,EAAO,OAAO,SAAS,MAAMkB,EAAaZ,CAAE,GAAG,MAAK,UAC/F,UAAA,gBAAAJ,EAACqB,KAAU,EAAA,CACb;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGN;"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=[];let e=r,n=0;const o=new Set;function i(t){e=t,o.forEach(s=>s())}function a(t){n+=1;const s=`toast-${n}`;return i([...e,{...t,id:s}]),s}function u(t){i(e.filter(s=>s.id!==t))}function c(t){return o.add(t),()=>{o.delete(t)}}function T(){return e}function d(){return r}exports.dismissToast=u;exports.getServerToasts=d;exports.getToasts=T;exports.showToast=a;exports.subscribeToasts=c;
|
|
2
|
+
//# sourceMappingURL=toastStore.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toastStore.cjs","sources":["../../../../src/components/feedback/Toast/toastStore.ts"],"sourcesContent":["import type { AlertTone } from '../Alert';\n\nexport type ToastTone = AlertTone;\n\nexport interface ToastAction {\n label: string;\n onClick: () => void;\n}\n\nexport interface ToastOptions {\n /** Botao unico de acao, como tentar de novo. Acionar fecha o aviso. */\n action?: ToastAction;\n description?: string;\n /** Milissegundos ate sumir. `null` mantem ate a pessoa fechar; o padrao e 6s, e o erro fica. */\n duration?: number | null;\n title: string;\n tone?: ToastTone;\n}\n\nexport interface ToastEntry extends ToastOptions {\n id: string;\n}\n\nconst EMPTY: ToastEntry[] = [];\nlet toasts: ToastEntry[] = EMPTY;\nlet nextId = 0;\nconst listeners = new Set<() => void>();\n\nfunction publish(next: ToastEntry[]) {\n toasts = next;\n listeners.forEach((listener) => listener());\n}\n\n/** Mostra um aviso no `ToastRegion` da pagina e devolve o id para fecha-lo antes do tempo. */\nexport function showToast(options: ToastOptions) {\n nextId += 1;\n const id = `toast-${nextId}`;\n publish([...toasts, { ...options, id }]);\n return id;\n}\n\nexport function dismissToast(id: string) {\n publish(toasts.filter((toast) => toast.id !== id));\n}\n\nexport function subscribeToasts(listener: () => void) {\n listeners.add(listener);\n return () => {\n listeners.delete(listener);\n };\n}\n\nexport function getToasts() {\n return toasts;\n}\n\nexport function getServerToasts() {\n return EMPTY;\n}\n"],"names":["EMPTY","toasts","nextId","listeners","publish","next","listener","showToast","options","id","dismissToast","toast","subscribeToasts","getToasts","getServerToasts"],"mappings":"gFAuBA,MAAMA,EAAsB,CAAA,EAC5B,IAAIC,EAAuBD,EACvBE,EAAS,EACb,MAAMC,MAAgB,IAEtB,SAASC,EAAQC,EAAoB,CACnCJ,EAASI,EACTF,EAAU,QAASG,GAAaA,EAAA,CAAU,CAC5C,CAGO,SAASC,EAAUC,EAAuB,CAC/CN,GAAU,EACV,MAAMO,EAAK,SAASP,CAAM,GAC1B,OAAAE,EAAQ,CAAC,GAAGH,EAAQ,CAAE,GAAGO,EAAS,GAAAC,CAAA,CAAI,CAAC,EAChCA,CACT,CAEO,SAASC,EAAaD,EAAY,CACvCL,EAAQH,EAAO,OAAQU,GAAUA,EAAM,KAAOF,CAAE,CAAC,CACnD,CAEO,SAASG,EAAgBN,EAAsB,CACpD,OAAAH,EAAU,IAAIG,CAAQ,EACf,IAAM,CACXH,EAAU,OAAOG,CAAQ,CAC3B,CACF,CAEO,SAASO,GAAY,CAC1B,OAAOZ,CACT,CAEO,SAASa,GAAkB,CAChC,OAAOd,CACT"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
const r = [];
|
|
2
|
+
let n = r, o = 0;
|
|
3
|
+
const e = /* @__PURE__ */ new Set();
|
|
4
|
+
function i(t) {
|
|
5
|
+
n = t, e.forEach((s) => s());
|
|
6
|
+
}
|
|
7
|
+
function u(t) {
|
|
8
|
+
o += 1;
|
|
9
|
+
const s = `toast-${o}`;
|
|
10
|
+
return i([...n, { ...t, id: s }]), s;
|
|
11
|
+
}
|
|
12
|
+
function c(t) {
|
|
13
|
+
i(n.filter((s) => s.id !== t));
|
|
14
|
+
}
|
|
15
|
+
function a(t) {
|
|
16
|
+
return e.add(t), () => {
|
|
17
|
+
e.delete(t);
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
function f() {
|
|
21
|
+
return n;
|
|
22
|
+
}
|
|
23
|
+
function d() {
|
|
24
|
+
return r;
|
|
25
|
+
}
|
|
26
|
+
export {
|
|
27
|
+
c as dismissToast,
|
|
28
|
+
d as getServerToasts,
|
|
29
|
+
f as getToasts,
|
|
30
|
+
u as showToast,
|
|
31
|
+
a as subscribeToasts
|
|
32
|
+
};
|
|
33
|
+
//# sourceMappingURL=toastStore.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toastStore.js","sources":["../../../../src/components/feedback/Toast/toastStore.ts"],"sourcesContent":["import type { AlertTone } from '../Alert';\n\nexport type ToastTone = AlertTone;\n\nexport interface ToastAction {\n label: string;\n onClick: () => void;\n}\n\nexport interface ToastOptions {\n /** Botao unico de acao, como tentar de novo. Acionar fecha o aviso. */\n action?: ToastAction;\n description?: string;\n /** Milissegundos ate sumir. `null` mantem ate a pessoa fechar; o padrao e 6s, e o erro fica. */\n duration?: number | null;\n title: string;\n tone?: ToastTone;\n}\n\nexport interface ToastEntry extends ToastOptions {\n id: string;\n}\n\nconst EMPTY: ToastEntry[] = [];\nlet toasts: ToastEntry[] = EMPTY;\nlet nextId = 0;\nconst listeners = new Set<() => void>();\n\nfunction publish(next: ToastEntry[]) {\n toasts = next;\n listeners.forEach((listener) => listener());\n}\n\n/** Mostra um aviso no `ToastRegion` da pagina e devolve o id para fecha-lo antes do tempo. */\nexport function showToast(options: ToastOptions) {\n nextId += 1;\n const id = `toast-${nextId}`;\n publish([...toasts, { ...options, id }]);\n return id;\n}\n\nexport function dismissToast(id: string) {\n publish(toasts.filter((toast) => toast.id !== id));\n}\n\nexport function subscribeToasts(listener: () => void) {\n listeners.add(listener);\n return () => {\n listeners.delete(listener);\n };\n}\n\nexport function getToasts() {\n return toasts;\n}\n\nexport function getServerToasts() {\n return EMPTY;\n}\n"],"names":["EMPTY","toasts","nextId","listeners","publish","next","listener","showToast","options","id","dismissToast","toast","subscribeToasts","getToasts","getServerToasts"],"mappings":"AAuBA,MAAMA,IAAsB,CAAA;AAC5B,IAAIC,IAAuBD,GACvBE,IAAS;AACb,MAAMC,wBAAgB,IAAA;AAEtB,SAASC,EAAQC,GAAoB;AACnC,EAAAJ,IAASI,GACTF,EAAU,QAAQ,CAACG,MAAaA,EAAA,CAAU;AAC5C;AAGO,SAASC,EAAUC,GAAuB;AAC/C,EAAAN,KAAU;AACV,QAAMO,IAAK,SAASP,CAAM;AAC1B,SAAAE,EAAQ,CAAC,GAAGH,GAAQ,EAAE,GAAGO,GAAS,IAAAC,EAAA,CAAI,CAAC,GAChCA;AACT;AAEO,SAASC,EAAaD,GAAY;AACvC,EAAAL,EAAQH,EAAO,OAAO,CAACU,MAAUA,EAAM,OAAOF,CAAE,CAAC;AACnD;AAEO,SAASG,EAAgBN,GAAsB;AACpD,SAAAH,EAAU,IAAIG,CAAQ,GACf,MAAM;AACX,IAAAH,EAAU,OAAOG,CAAQ;AAAA,EAC3B;AACF;AAEO,SAASO,IAAY;AAC1B,SAAOZ;AACT;AAEO,SAASa,IAAkB;AAChC,SAAOd;AACT;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),h=require("react"),I=require("../../../hooks/useMergedRefs.cjs"),M=require("../CheckboxGroup/CheckboxGroup.cjs"),s=require("./Checkbox.module.css.cjs");function R({"aria-describedby":m,"aria-invalid":v,className:x,error:i,hint:n,id:k,indeterminate:o=!1,label:u,ref:j,...a}){const e=M.useCheckboxGroup(),c=e&&typeof a.value=="string"?a.value:void 0,r=e!==null&&c!==void 0,f=!!i||r&&e.invalid,C=h.useId(),t=k??`checkbox-${C}`,b=`${t}-message`,q=[m,i||n?b:void 0].filter(Boolean).join(" ")||void 0,y=[s.default.input,f&&s.default.error,x].filter(Boolean).join(" "),N=h.useCallback(d=>{d&&(d.indeterminate=o)},[o]),B=I.useMergedRefs(N,j);return l.jsxs("div",{className:s.default.field,children:[l.jsxs("label",{className:s.default.control,htmlFor:t,children:[l.jsx("input",{...a,ref:B,className:y,id:t,...r&&{checked:e.values.includes(c),disabled:a.disabled??e.disabled,name:e.name,required:e.required&&e.values.length===0,onChange:d=>{var g;e.toggle(c,d.target.checked),(g=a.onChange)==null||g.call(a,d)}},"aria-describedby":q,"aria-invalid":f?!0:v,type:"checkbox"}),u&&l.jsx("span",{className:s.default.text,children:u})]}),(i||n)&&l.jsx("span",{className:i?s.default.errorMessage:s.default.hint,id:b,role:i?"alert":void 0,children:i||n})]})}exports.Checkbox=R;
|
|
2
2
|
//# sourceMappingURL=Checkbox.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Checkbox.cjs","sources":["../../../../src/components/forms/Checkbox/Checkbox.tsx"],"sourcesContent":["import { useCallback, useId, type ComponentPropsWithRef, type ReactNode } from 'react';\nimport { useMergedRefs } from '../../../hooks/useMergedRefs';\nimport styles from './Checkbox.module.css';\n\nexport interface CheckboxProps extends Omit<ComponentPropsWithRef<'input'>, 'type' | 'size'> {\n error?: string;\n hint?: string;\n indeterminate?: boolean;\n /** Sem rotulo visivel, o nome vem de `aria-label` ou `aria-labelledby`. */\n label?: ReactNode;\n}\n\nexport function Checkbox({\n 'aria-describedby': ariaDescribedBy,\n 'aria-invalid': ariaInvalid,\n className,\n error,\n hint,\n id: providedId,\n indeterminate = false,\n label,\n ref,\n ...props\n}: CheckboxProps) {\n const generatedId = useId();\n const id = providedId ?? `checkbox-${generatedId}`;\n const messageId = `${id}-message`;\n const describedBy = [ariaDescribedBy, error || hint ? messageId : undefined]\n .filter(Boolean)\n .join(' ') || undefined;\n const classes = [styles.input,
|
|
1
|
+
{"version":3,"file":"Checkbox.cjs","sources":["../../../../src/components/forms/Checkbox/Checkbox.tsx"],"sourcesContent":["import { useCallback, useId, type ChangeEvent, type ComponentPropsWithRef, type ReactNode } from 'react';\nimport { useMergedRefs } from '../../../hooks/useMergedRefs';\nimport { useCheckboxGroup } from '../CheckboxGroup/CheckboxGroup';\nimport styles from './Checkbox.module.css';\n\nexport interface CheckboxProps extends Omit<ComponentPropsWithRef<'input'>, 'type' | 'size'> {\n error?: string;\n hint?: string;\n indeterminate?: boolean;\n /** Sem rotulo visivel, o nome vem de `aria-label` ou `aria-labelledby`. */\n label?: ReactNode;\n}\n\nexport function Checkbox({\n 'aria-describedby': ariaDescribedBy,\n 'aria-invalid': ariaInvalid,\n className,\n error,\n hint,\n id: providedId,\n indeterminate = false,\n label,\n ref,\n ...props\n}: CheckboxProps) {\n const group = useCheckboxGroup();\n const groupValue = group && typeof props.value === 'string' ? props.value : undefined;\n const inGroup = group !== null && groupValue !== undefined;\n const invalid = Boolean(error) || (inGroup && group.invalid);\n const generatedId = useId();\n const id = providedId ?? `checkbox-${generatedId}`;\n const messageId = `${id}-message`;\n const describedBy = [ariaDescribedBy, error || hint ? messageId : undefined]\n .filter(Boolean)\n .join(' ') || undefined;\n const classes = [styles.input, invalid && styles.error, className].filter(Boolean).join(' ');\n\n const aplicarIndeterminado = useCallback(\n (node: HTMLInputElement | null) => {\n if (node) {\n node.indeterminate = indeterminate;\n }\n },\n [indeterminate],\n );\n const mergedRef = useMergedRefs(aplicarIndeterminado, ref);\n\n return (\n <div className={styles.field}>\n <label className={styles.control} htmlFor={id}>\n <input\n {...props}\n ref={mergedRef}\n className={classes}\n id={id}\n {...(inGroup && {\n checked: group.values.includes(groupValue),\n disabled: props.disabled ?? group.disabled,\n name: group.name,\n // Obrigatório é marcar ao menos uma: o `required` nativo só vale enquanto o grupo está vazio.\n required: group.required && group.values.length === 0,\n onChange: (event: ChangeEvent<HTMLInputElement>) => {\n group.toggle(groupValue, event.target.checked);\n props.onChange?.(event);\n },\n })}\n aria-describedby={describedBy}\n aria-invalid={invalid ? true : ariaInvalid}\n type=\"checkbox\"\n />\n {label && <span className={styles.text}>{label}</span>}\n </label>\n {(error || hint) && (\n <span className={error ? styles.errorMessage : styles.hint} id={messageId} role={error ? 'alert' : undefined}>\n {error || hint}\n </span>\n )}\n </div>\n );\n}\n"],"names":["Checkbox","ariaDescribedBy","ariaInvalid","className","error","hint","providedId","indeterminate","label","ref","props","group","useCheckboxGroup","groupValue","inGroup","invalid","generatedId","useId","id","messageId","describedBy","classes","styles","aplicarIndeterminado","useCallback","node","mergedRef","useMergedRefs","jsxs","jsx","event","_a"],"mappings":"6QAaO,SAASA,EAAS,CACvB,mBAAoBC,EACpB,eAAgBC,EAChB,UAAAC,EACA,MAAAC,EACA,KAAAC,EACA,GAAIC,EACJ,cAAAC,EAAgB,GAChB,MAAAC,EACA,IAAAC,EACA,GAAGC,CACL,EAAkB,CAChB,MAAMC,EAAQC,EAAAA,iBAAA,EACRC,EAAaF,GAAS,OAAOD,EAAM,OAAU,SAAWA,EAAM,MAAQ,OACtEI,EAAUH,IAAU,MAAQE,IAAe,OAC3CE,EAAU,EAAQX,GAAWU,GAAWH,EAAM,QAC9CK,EAAcC,EAAAA,MAAA,EACdC,EAAKZ,GAAc,YAAYU,CAAW,GAC1CG,EAAY,GAAGD,CAAE,WACjBE,EAAc,CAACnB,EAAiBG,GAASC,EAAOc,EAAY,MAAS,EACxE,OAAO,OAAO,EACd,KAAK,GAAG,GAAK,OACVE,EAAU,CAACC,EAAAA,QAAO,MAAOP,GAAWO,EAAAA,QAAO,MAAOnB,CAAS,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG,EAErFoB,EAAuBC,EAAAA,YAC1BC,GAAkC,CAC7BA,IACFA,EAAK,cAAgBlB,EAEzB,EACA,CAACA,CAAa,CAAA,EAEVmB,EAAYC,EAAAA,cAAcJ,EAAsBd,CAAG,EAEzD,OACEmB,EAAAA,KAAC,MAAA,CAAI,UAAWN,EAAAA,QAAO,MACrB,SAAA,CAAAM,OAAC,QAAA,CAAM,UAAWN,EAAAA,QAAO,QAAS,QAASJ,EACzC,SAAA,CAAAW,EAAAA,IAAC,QAAA,CACE,GAAGnB,EACJ,IAAKgB,EACL,UAAWL,EACX,GAAAH,EACC,GAAIJ,GAAW,CACd,QAASH,EAAM,OAAO,SAASE,CAAU,EACzC,SAAUH,EAAM,UAAYC,EAAM,SAClC,KAAMA,EAAM,KAEZ,SAAUA,EAAM,UAAYA,EAAM,OAAO,SAAW,EACpD,SAAWmB,GAAyC,OAClDnB,EAAM,OAAOE,EAAYiB,EAAM,OAAO,OAAO,GAC7CC,EAAArB,EAAM,WAAN,MAAAqB,EAAA,KAAArB,EAAiBoB,EACnB,CAAA,EAEF,mBAAkBV,EAClB,eAAcL,EAAU,GAAOb,EAC/B,KAAK,UAAA,CAAA,EAENM,GAASqB,EAAAA,IAAC,OAAA,CAAK,UAAWP,EAAAA,QAAO,KAAO,SAAAd,CAAA,CAAM,CAAA,EACjD,GACEJ,GAASC,IACTwB,MAAC,OAAA,CAAK,UAAWzB,EAAQkB,EAAAA,QAAO,aAAeA,EAAAA,QAAO,KAAM,GAAIH,EAAW,KAAMf,EAAQ,QAAU,OAChG,YAASC,CAAA,CACZ,CAAA,EAEJ,CAEJ"}
|
|
@@ -1,45 +1,57 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useId as
|
|
3
|
-
import { useMergedRefs as
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
"aria-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
1
|
+
import { jsxs as b, jsx as c } from "react/jsx-runtime";
|
|
2
|
+
import { useId as q, useCallback as G } from "react";
|
|
3
|
+
import { useMergedRefs as M } from "../../../hooks/useMergedRefs.js";
|
|
4
|
+
import { useCheckboxGroup as R } from "../CheckboxGroup/CheckboxGroup.js";
|
|
5
|
+
import i from "./Checkbox.module.css.js";
|
|
6
|
+
function z({
|
|
7
|
+
"aria-describedby": h,
|
|
8
|
+
"aria-invalid": v,
|
|
9
|
+
className: x,
|
|
10
|
+
error: s,
|
|
11
|
+
hint: d,
|
|
12
|
+
id: k,
|
|
13
|
+
indeterminate: t = !1,
|
|
14
|
+
label: r,
|
|
15
|
+
ref: y,
|
|
16
|
+
...a
|
|
16
17
|
}) {
|
|
17
|
-
const
|
|
18
|
-
(
|
|
19
|
-
|
|
18
|
+
const e = R(), l = e && typeof a.value == "string" ? a.value : void 0, m = e !== null && l !== void 0, u = !!s || m && e.invalid, C = q(), o = k ?? `checkbox-${C}`, f = `${o}-message`, N = [h, s || d ? f : void 0].filter(Boolean).join(" ") || void 0, j = [i.input, u && i.error, x].filter(Boolean).join(" "), B = G(
|
|
19
|
+
(n) => {
|
|
20
|
+
n && (n.indeterminate = t);
|
|
20
21
|
},
|
|
21
|
-
[
|
|
22
|
-
),
|
|
23
|
-
return /* @__PURE__ */
|
|
24
|
-
/* @__PURE__ */
|
|
22
|
+
[t]
|
|
23
|
+
), I = M(B, y);
|
|
24
|
+
return /* @__PURE__ */ b("div", { className: i.field, children: [
|
|
25
|
+
/* @__PURE__ */ b("label", { className: i.control, htmlFor: o, children: [
|
|
25
26
|
/* @__PURE__ */ c(
|
|
26
27
|
"input",
|
|
27
28
|
{
|
|
28
|
-
...
|
|
29
|
-
ref:
|
|
30
|
-
className:
|
|
31
|
-
id:
|
|
32
|
-
|
|
33
|
-
|
|
29
|
+
...a,
|
|
30
|
+
ref: I,
|
|
31
|
+
className: j,
|
|
32
|
+
id: o,
|
|
33
|
+
...m && {
|
|
34
|
+
checked: e.values.includes(l),
|
|
35
|
+
disabled: a.disabled ?? e.disabled,
|
|
36
|
+
name: e.name,
|
|
37
|
+
// Obrigatório é marcar ao menos uma: o `required` nativo só vale enquanto o grupo está vazio.
|
|
38
|
+
required: e.required && e.values.length === 0,
|
|
39
|
+
onChange: (n) => {
|
|
40
|
+
var g;
|
|
41
|
+
e.toggle(l, n.target.checked), (g = a.onChange) == null || g.call(a, n);
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
"aria-describedby": N,
|
|
45
|
+
"aria-invalid": u ? !0 : v,
|
|
34
46
|
type: "checkbox"
|
|
35
47
|
}
|
|
36
48
|
),
|
|
37
|
-
|
|
49
|
+
r && /* @__PURE__ */ c("span", { className: i.text, children: r })
|
|
38
50
|
] }),
|
|
39
|
-
(
|
|
51
|
+
(s || d) && /* @__PURE__ */ c("span", { className: s ? i.errorMessage : i.hint, id: f, role: s ? "alert" : void 0, children: s || d })
|
|
40
52
|
] });
|
|
41
53
|
}
|
|
42
54
|
export {
|
|
43
|
-
|
|
55
|
+
z as Checkbox
|
|
44
56
|
};
|
|
45
57
|
//# sourceMappingURL=Checkbox.js.map
|