@etus/ui 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunk-HRNDJU7D.js +11 -0
- package/dist/chunk-HRNDJU7D.js.map +1 -0
- package/dist/index.d.ts +21250 -0
- package/dist/index.js +44886 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/utils.d.ts +5 -0
- package/dist/lib/utils.js +7 -0
- package/dist/lib/utils.js.map +1 -0
- package/package.json +145 -0
- package/src/components/CLAUDE.md +66 -0
- package/src/components/advanced/AssetManager/AssetManager.test.tsx +624 -0
- package/src/components/advanced/AssetManager/AssetManager.tsx +928 -0
- package/src/components/advanced/AssetManager/AssetManager.types.ts +248 -0
- package/src/components/advanced/AssetManager/AssetManager.variants.ts +284 -0
- package/src/components/advanced/AssetManager/README.md +246 -0
- package/src/components/advanced/AssetManager/index.ts +4 -0
- package/src/components/advanced/CLAUDE.md +77 -0
- package/src/components/advanced/Calendar/Calendar.test.tsx +718 -0
- package/src/components/advanced/Calendar/Calendar.tsx +264 -0
- package/src/components/advanced/Calendar/Calendar.types.ts +62 -0
- package/src/components/advanced/Calendar/Calendar.variants.ts +154 -0
- package/src/components/advanced/Calendar/README.md +389 -0
- package/src/components/advanced/Calendar/index.ts +3 -0
- package/src/components/advanced/Command/Command.test.tsx +1014 -0
- package/src/components/advanced/Command/Command.tsx +330 -0
- package/src/components/advanced/Command/Command.types.ts +238 -0
- package/src/components/advanced/Command/Command.variants.ts +300 -0
- package/src/components/advanced/Command/README.md +1259 -0
- package/src/components/advanced/Command/index.ts +45 -0
- package/src/components/advanced/DragAndDrop/DragAndDrop.test.tsx +573 -0
- package/src/components/advanced/DragAndDrop/DragAndDrop.tsx +495 -0
- package/src/components/advanced/DragAndDrop/DragAndDrop.types.ts +237 -0
- package/src/components/advanced/DragAndDrop/DragAndDrop.variants.ts +156 -0
- package/src/components/advanced/DragAndDrop/README.md +284 -0
- package/src/components/advanced/DragAndDrop/index.ts +4 -0
- package/src/components/advanced/ErrorBoundary/ErrorBoundary.test.tsx +372 -0
- package/src/components/advanced/ErrorBoundary/ErrorBoundary.tsx +184 -0
- package/src/components/advanced/ErrorBoundary/ErrorBoundary.types.ts +73 -0
- package/src/components/advanced/ErrorBoundary/ErrorBoundary.variants.ts +153 -0
- package/src/components/advanced/ErrorBoundary/README.md +296 -0
- package/src/components/advanced/ErrorBoundary/index.ts +18 -0
- package/src/components/advanced/EventCalendar/EventCalendar.test.tsx +535 -0
- package/src/components/advanced/EventCalendar/EventCalendar.tsx +1066 -0
- package/src/components/advanced/EventCalendar/EventCalendar.types.ts +232 -0
- package/src/components/advanced/EventCalendar/EventCalendar.variants.ts +222 -0
- package/src/components/advanced/EventCalendar/README.md +330 -0
- package/src/components/advanced/EventCalendar/index.ts +35 -0
- package/src/components/advanced/FileDropzone/FileDropzone.test.tsx +344 -0
- package/src/components/advanced/FileDropzone/FileDropzone.tsx +188 -0
- package/src/components/advanced/FileDropzone/FileDropzone.types.ts +47 -0
- package/src/components/advanced/FileDropzone/FileDropzone.variants.ts +46 -0
- package/src/components/advanced/FileDropzone/README.md +359 -0
- package/src/components/advanced/FileDropzone/index.ts +7 -0
- package/src/components/advanced/FilePreview/FilePreview.test.tsx +503 -0
- package/src/components/advanced/FilePreview/FilePreview.tsx +385 -0
- package/src/components/advanced/FilePreview/FilePreview.types.ts +90 -0
- package/src/components/advanced/FilePreview/FilePreview.variants.ts +234 -0
- package/src/components/advanced/FilePreview/README.md +318 -0
- package/src/components/advanced/FilePreview/index.ts +25 -0
- package/src/components/advanced/FileUpload/FileUpload.test.tsx +676 -0
- package/src/components/advanced/FileUpload/FileUpload.tsx +845 -0
- package/src/components/advanced/FileUpload/FileUpload.types.ts +270 -0
- package/src/components/advanced/FileUpload/FileUpload.variants.ts +216 -0
- package/src/components/advanced/FileUpload/README.md +380 -0
- package/src/components/advanced/FileUpload/index.ts +39 -0
- package/src/components/advanced/FilterBuilder/FilterBuilder.test.tsx +644 -0
- package/src/components/advanced/FilterBuilder/FilterBuilder.tsx +881 -0
- package/src/components/advanced/FilterBuilder/FilterBuilder.types.ts +249 -0
- package/src/components/advanced/FilterBuilder/FilterBuilder.variants.ts +307 -0
- package/src/components/advanced/FilterBuilder/README.md +383 -0
- package/src/components/advanced/FilterBuilder/index.ts +48 -0
- package/src/components/advanced/MarkdownEditor/MarkdownEditor.test.tsx +468 -0
- package/src/components/advanced/MarkdownEditor/MarkdownEditor.tsx +556 -0
- package/src/components/advanced/MarkdownEditor/MarkdownEditor.types.ts +108 -0
- package/src/components/advanced/MarkdownEditor/MarkdownEditor.variants.ts +62 -0
- package/src/components/advanced/MarkdownEditor/README.md +352 -0
- package/src/components/advanced/MarkdownEditor/index.ts +15 -0
- package/src/components/advanced/Portal/Portal.test.tsx +406 -0
- package/src/components/advanced/Portal/Portal.tsx +77 -0
- package/src/components/advanced/Portal/Portal.types.ts +28 -0
- package/src/components/advanced/Portal/Portal.variants.ts +95 -0
- package/src/components/advanced/Portal/README.md +326 -0
- package/src/components/advanced/Portal/index.ts +9 -0
- package/src/components/advanced/RichTextEditor/README.md +383 -0
- package/src/components/advanced/RichTextEditor/RichTextEditor.test.tsx +394 -0
- package/src/components/advanced/RichTextEditor/RichTextEditor.tsx +651 -0
- package/src/components/advanced/RichTextEditor/RichTextEditor.types.ts +77 -0
- package/src/components/advanced/RichTextEditor/RichTextEditor.variants.ts +151 -0
- package/src/components/advanced/RichTextEditor/index.ts +24 -0
- package/src/components/advanced/Search/README.md +391 -0
- package/src/components/advanced/Search/Search.test.tsx +567 -0
- package/src/components/advanced/Search/Search.tsx +829 -0
- package/src/components/advanced/Search/Search.types.ts +243 -0
- package/src/components/advanced/Search/Search.variants.ts +358 -0
- package/src/components/advanced/Search/index.ts +52 -0
- package/src/components/advanced/SortableList/README.md +448 -0
- package/src/components/advanced/SortableList/SortableList.test.tsx +317 -0
- package/src/components/advanced/SortableList/SortableList.tsx +392 -0
- package/src/components/advanced/SortableList/SortableList.types.ts +122 -0
- package/src/components/advanced/SortableList/SortableList.variants.ts +141 -0
- package/src/components/advanced/SortableList/index.ts +33 -0
- package/src/components/advanced/VersionControl/README.md +440 -0
- package/src/components/advanced/VersionControl/VersionControl.test.tsx +517 -0
- package/src/components/advanced/VersionControl/VersionControl.tsx +758 -0
- package/src/components/advanced/VersionControl/VersionControl.types.ts +176 -0
- package/src/components/advanced/VersionControl/VersionControl.variants.ts +203 -0
- package/src/components/advanced/VersionControl/index.ts +33 -0
- package/src/components/advanced/index.ts +17 -0
- package/src/components/data-display/Accordion/Accordion.test.tsx +519 -0
- package/src/components/data-display/Accordion/Accordion.tsx +164 -0
- package/src/components/data-display/Accordion/Accordion.types.ts +37 -0
- package/src/components/data-display/Accordion/Accordion.variants.ts +112 -0
- package/src/components/data-display/Accordion/README.md +976 -0
- package/src/components/data-display/Accordion/index.ts +31 -0
- package/src/components/data-display/AreaChart/AreaChart.test.tsx +529 -0
- package/src/components/data-display/AreaChart/AreaChart.tsx +318 -0
- package/src/components/data-display/AreaChart/AreaChart.types.ts +169 -0
- package/src/components/data-display/AreaChart/AreaChart.variants.ts +45 -0
- package/src/components/data-display/AreaChart/README.md +229 -0
- package/src/components/data-display/AreaChart/index.ts +2 -0
- package/src/components/data-display/Banner/Banner.test.tsx +648 -0
- package/src/components/data-display/Banner/Banner.tsx +111 -0
- package/src/components/data-display/Banner/Banner.types.ts +51 -0
- package/src/components/data-display/Banner/Banner.variants.ts +37 -0
- package/src/components/data-display/Banner/README.md +351 -0
- package/src/components/data-display/Banner/index.ts +2 -0
- package/src/components/data-display/BarChart/BarChart.test.tsx +536 -0
- package/src/components/data-display/BarChart/BarChart.tsx +305 -0
- package/src/components/data-display/BarChart/BarChart.types.ts +145 -0
- package/src/components/data-display/BarChart/BarChart.variants.ts +61 -0
- package/src/components/data-display/BarChart/README.md +205 -0
- package/src/components/data-display/BarChart/index.ts +2 -0
- package/src/components/data-display/BarList/BarList.tsx +172 -0
- package/src/components/data-display/BarList/BarList.types.ts +69 -0
- package/src/components/data-display/BarList/BarList.variants.ts +63 -0
- package/src/components/data-display/BarList/index.ts +2 -0
- package/src/components/data-display/CLAUDE.md +90 -0
- package/src/components/data-display/Callout/Callout.test.tsx +516 -0
- package/src/components/data-display/Callout/Callout.tsx +112 -0
- package/src/components/data-display/Callout/Callout.types.ts +37 -0
- package/src/components/data-display/Callout/Callout.variants.ts +48 -0
- package/src/components/data-display/Callout/README.md +341 -0
- package/src/components/data-display/Callout/index.ts +2 -0
- package/src/components/data-display/Carousel/Carousel.test.tsx +386 -0
- package/src/components/data-display/Carousel/Carousel.tsx +241 -0
- package/src/components/data-display/Carousel/Carousel.types.ts +20 -0
- package/src/components/data-display/Carousel/Carousel.variants.ts +125 -0
- package/src/components/data-display/Carousel/README.md +711 -0
- package/src/components/data-display/Carousel/index.ts +1 -0
- package/src/components/data-display/CategoryBar/CategoryBar.tsx +220 -0
- package/src/components/data-display/CategoryBar/CategoryBar.types.ts +80 -0
- package/src/components/data-display/CategoryBar/CategoryBar.variants.ts +85 -0
- package/src/components/data-display/CategoryBar/index.ts +2 -0
- package/src/components/data-display/Chart/Chart.test.tsx +432 -0
- package/src/components/data-display/Chart/Chart.tsx +476 -0
- package/src/components/data-display/Chart/Chart.types.ts +24 -0
- package/src/components/data-display/Chart/Chart.variants.ts +106 -0
- package/src/components/data-display/Chart/README.md +674 -0
- package/src/components/data-display/Chart/index.ts +1 -0
- package/src/components/data-display/ChartCard/ChartCard.test.tsx +327 -0
- package/src/components/data-display/ChartCard/ChartCard.tsx +201 -0
- package/src/components/data-display/ChartCard/ChartCard.types.ts +68 -0
- package/src/components/data-display/ChartCard/ChartCard.variants.ts +63 -0
- package/src/components/data-display/ChartCard/index.ts +17 -0
- package/src/components/data-display/ChartLegend/ChartLegend.test.tsx +165 -0
- package/src/components/data-display/ChartLegend/ChartLegend.types.ts +88 -0
- package/src/components/data-display/ChartLegend/README.md +317 -0
- package/src/components/data-display/ChartLegend/index.ts +22 -0
- package/src/components/data-display/ComboChart/ComboChart.tsx +380 -0
- package/src/components/data-display/ComboChart/ComboChart.types.ts +224 -0
- package/src/components/data-display/ComboChart/index.ts +2 -0
- package/src/components/data-display/DashboardCard/DashboardCard.test.tsx +289 -0
- package/src/components/data-display/DashboardCard/DashboardCard.tsx +285 -0
- package/src/components/data-display/DashboardCard/DashboardCard.types.ts +74 -0
- package/src/components/data-display/DashboardCard/DashboardCard.variants.ts +67 -0
- package/src/components/data-display/DashboardCard/index.ts +25 -0
- package/src/components/data-display/DashboardFilterbar/DashboardFilterbar.tsx +151 -0
- package/src/components/data-display/DashboardFilterbar/DashboardFilterbar.types.ts +39 -0
- package/src/components/data-display/DashboardFilterbar/DashboardFilterbar.variants.ts +30 -0
- package/src/components/data-display/DashboardFilterbar/index.ts +10 -0
- package/src/components/data-display/DataTable/DataTable.test.tsx +654 -0
- package/src/components/data-display/DataTable/DataTable.tsx +529 -0
- package/src/components/data-display/DataTable/DataTable.types.ts +190 -0
- package/src/components/data-display/DataTable/DataTable.variants.ts +79 -0
- package/src/components/data-display/DataTable/README.md +447 -0
- package/src/components/data-display/DataTable/index.ts +2 -0
- package/src/components/data-display/DeltaBar/DeltaBar.tsx +100 -0
- package/src/components/data-display/DeltaBar/DeltaBar.types.ts +57 -0
- package/src/components/data-display/DeltaBar/DeltaBar.variants.ts +40 -0
- package/src/components/data-display/DeltaBar/index.ts +2 -0
- package/src/components/data-display/EmptyState/EmptyState.test.tsx +368 -0
- package/src/components/data-display/EmptyState/EmptyState.tsx +91 -0
- package/src/components/data-display/EmptyState/EmptyState.types.ts +9 -0
- package/src/components/data-display/EmptyState/EmptyState.variants.ts +28 -0
- package/src/components/data-display/EmptyState/README.md +746 -0
- package/src/components/data-display/EmptyState/index.ts +1 -0
- package/src/components/data-display/Feed/Feed.test.tsx +668 -0
- package/src/components/data-display/Feed/Feed.tsx +290 -0
- package/src/components/data-display/Feed/Feed.types.ts +104 -0
- package/src/components/data-display/Feed/Feed.variants.ts +64 -0
- package/src/components/data-display/Feed/README.md +326 -0
- package/src/components/data-display/Feed/index.ts +17 -0
- package/src/components/data-display/FunnelChart/FunnelChart.tsx +177 -0
- package/src/components/data-display/FunnelChart/FunnelChart.types.ts +145 -0
- package/src/components/data-display/FunnelChart/index.ts +2 -0
- package/src/components/data-display/GaugeChart/GaugeChart.test.tsx +129 -0
- package/src/components/data-display/GaugeChart/GaugeChart.tsx +332 -0
- package/src/components/data-display/GaugeChart/GaugeChart.types.ts +53 -0
- package/src/components/data-display/GaugeChart/GaugeChart.variants.ts +56 -0
- package/src/components/data-display/GaugeChart/README.md +305 -0
- package/src/components/data-display/GaugeChart/index.ts +3 -0
- package/src/components/data-display/Heatmap/Heatmap.test.tsx +630 -0
- package/src/components/data-display/Heatmap/Heatmap.tsx +569 -0
- package/src/components/data-display/Heatmap/Heatmap.types.ts +120 -0
- package/src/components/data-display/Heatmap/Heatmap.variants.ts +72 -0
- package/src/components/data-display/Heatmap/README.md +321 -0
- package/src/components/data-display/Heatmap/index.ts +2 -0
- package/src/components/data-display/HoverCard/HoverCard.test.tsx +314 -0
- package/src/components/data-display/HoverCard/HoverCard.tsx +40 -0
- package/src/components/data-display/HoverCard/HoverCard.types.ts +21 -0
- package/src/components/data-display/HoverCard/HoverCard.variants.ts +29 -0
- package/src/components/data-display/HoverCard/README.md +624 -0
- package/src/components/data-display/HoverCard/index.ts +1 -0
- package/src/components/data-display/ImageGallery/ImageGallery.test.tsx +519 -0
- package/src/components/data-display/ImageGallery/ImageGallery.tsx +733 -0
- package/src/components/data-display/ImageGallery/ImageGallery.types.ts +109 -0
- package/src/components/data-display/ImageGallery/ImageGallery.variants.ts +58 -0
- package/src/components/data-display/ImageGallery/README.md +352 -0
- package/src/components/data-display/ImageGallery/index.ts +9 -0
- package/src/components/data-display/Item/Item.test.tsx +476 -0
- package/src/components/data-display/Item/Item.tsx +195 -0
- package/src/components/data-display/Item/Item.types.ts +23 -0
- package/src/components/data-display/Item/Item.variants.ts +51 -0
- package/src/components/data-display/Item/README.md +759 -0
- package/src/components/data-display/Item/index.ts +1 -0
- package/src/components/data-display/KPICard/KPICard.test.tsx +445 -0
- package/src/components/data-display/KPICard/KPICard.tsx +203 -0
- package/src/components/data-display/KPICard/KPICard.types.ts +32 -0
- package/src/components/data-display/KPICard/KPICard.variants.ts +64 -0
- package/src/components/data-display/KPICard/README.md +380 -0
- package/src/components/data-display/KPICard/index.ts +7 -0
- package/src/components/data-display/Lightbox/Lightbox.test.tsx +574 -0
- package/src/components/data-display/Lightbox/Lightbox.tsx +466 -0
- package/src/components/data-display/Lightbox/Lightbox.types.ts +53 -0
- package/src/components/data-display/Lightbox/Lightbox.variants.ts +99 -0
- package/src/components/data-display/Lightbox/README.md +397 -0
- package/src/components/data-display/Lightbox/index.ts +2 -0
- package/src/components/data-display/LineChart/LineChart.test.tsx +654 -0
- package/src/components/data-display/LineChart/LineChart.tsx +295 -0
- package/src/components/data-display/LineChart/LineChart.types.ts +168 -0
- package/src/components/data-display/LineChart/LineChart.variants.ts +52 -0
- package/src/components/data-display/LineChart/README.md +242 -0
- package/src/components/data-display/LineChart/index.ts +8 -0
- package/src/components/data-display/List/List.test.tsx +756 -0
- package/src/components/data-display/List/List.tsx +455 -0
- package/src/components/data-display/List/List.types.ts +67 -0
- package/src/components/data-display/List/List.variants.ts +69 -0
- package/src/components/data-display/List/README.md +374 -0
- package/src/components/data-display/List/index.ts +9 -0
- package/src/components/data-display/MarkerBar/MarkerBar.tsx +130 -0
- package/src/components/data-display/MarkerBar/MarkerBar.types.ts +67 -0
- package/src/components/data-display/MarkerBar/MarkerBar.variants.ts +75 -0
- package/src/components/data-display/MarkerBar/index.ts +3 -0
- package/src/components/data-display/PieChart/PieChart.test.tsx +655 -0
- package/src/components/data-display/PieChart/PieChart.tsx +327 -0
- package/src/components/data-display/PieChart/PieChart.types.ts +134 -0
- package/src/components/data-display/PieChart/PieChart.variants.ts +49 -0
- package/src/components/data-display/PieChart/README.md +261 -0
- package/src/components/data-display/PieChart/index.ts +2 -0
- package/src/components/data-display/ScatterChart/ScatterChart.tsx +310 -0
- package/src/components/data-display/ScatterChart/ScatterChart.types.ts +272 -0
- package/src/components/data-display/ScatterChart/index.ts +2 -0
- package/src/components/data-display/SingleStat/README.md +363 -0
- package/src/components/data-display/SingleStat/SingleStat.test.tsx +223 -0
- package/src/components/data-display/SingleStat/SingleStat.tsx +251 -0
- package/src/components/data-display/SingleStat/SingleStat.types.ts +71 -0
- package/src/components/data-display/SingleStat/SingleStat.variants.ts +51 -0
- package/src/components/data-display/SingleStat/index.ts +6 -0
- package/src/components/data-display/Sparkline/README.md +321 -0
- package/src/components/data-display/Sparkline/Sparkline.test.tsx +276 -0
- package/src/components/data-display/Sparkline/Sparkline.tsx +971 -0
- package/src/components/data-display/Sparkline/Sparkline.types.ts +147 -0
- package/src/components/data-display/Sparkline/Sparkline.variants.ts +52 -0
- package/src/components/data-display/Sparkline/index.ts +9 -0
- package/src/components/data-display/Table/README.md +821 -0
- package/src/components/data-display/Table/Table.test.tsx +732 -0
- package/src/components/data-display/Table/Table.tsx +123 -0
- package/src/components/data-display/Table/Table.types.ts +20 -0
- package/src/components/data-display/Table/Table.variants.ts +123 -0
- package/src/components/data-display/Table/index.ts +1 -0
- package/src/components/data-display/Timeline/README.md +366 -0
- package/src/components/data-display/Timeline/Timeline.test.tsx +701 -0
- package/src/components/data-display/Timeline/Timeline.tsx +328 -0
- package/src/components/data-display/Timeline/Timeline.types.ts +59 -0
- package/src/components/data-display/Timeline/Timeline.variants.ts +152 -0
- package/src/components/data-display/Timeline/index.ts +15 -0
- package/src/components/data-display/Tracker/Tracker.tsx +105 -0
- package/src/components/data-display/Tracker/Tracker.types.ts +45 -0
- package/src/components/data-display/Tracker/Tracker.variants.ts +24 -0
- package/src/components/data-display/Tracker/index.ts +2 -0
- package/src/components/data-display/VirtualTable/README.md +383 -0
- package/src/components/data-display/VirtualTable/VirtualTable.test.tsx +295 -0
- package/src/components/data-display/VirtualTable/VirtualTable.tsx +354 -0
- package/src/components/data-display/VirtualTable/VirtualTable.types.ts +62 -0
- package/src/components/data-display/VirtualTable/VirtualTable.variants.ts +61 -0
- package/src/components/data-display/VirtualTable/index.ts +2 -0
- package/src/components/data-display/index.ts +35 -0
- package/src/components/feedback/Alert/Alert.test.tsx +614 -0
- package/src/components/feedback/Alert/Alert.tsx +48 -0
- package/src/components/feedback/Alert/Alert.types.ts +42 -0
- package/src/components/feedback/Alert/Alert.variants.ts +20 -0
- package/src/components/feedback/Alert/README.md +522 -0
- package/src/components/feedback/Alert/index.ts +3 -0
- package/src/components/feedback/AlertDialog/AlertDialog.test.tsx +1237 -0
- package/src/components/feedback/AlertDialog/AlertDialog.tsx +160 -0
- package/src/components/feedback/AlertDialog/AlertDialog.types.ts +139 -0
- package/src/components/feedback/AlertDialog/README.md +723 -0
- package/src/components/feedback/AlertDialog/index.ts +2 -0
- package/src/components/feedback/CLAUDE.md +87 -0
- package/src/components/feedback/ConfirmModal/ConfirmModal.test.tsx +404 -0
- package/src/components/feedback/ConfirmModal/ConfirmModal.tsx +139 -0
- package/src/components/feedback/ConfirmModal/ConfirmModal.types.ts +117 -0
- package/src/components/feedback/ConfirmModal/README.md +546 -0
- package/src/components/feedback/ConfirmModal/index.ts +2 -0
- package/src/components/feedback/Dialog/Dialog.test.tsx +1070 -0
- package/src/components/feedback/Dialog/Dialog.tsx +137 -0
- package/src/components/feedback/Dialog/Dialog.types.ts +119 -0
- package/src/components/feedback/Dialog/README.md +770 -0
- package/src/components/feedback/Dialog/index.ts +2 -0
- package/src/components/feedback/ErrorPage/ErrorPage.test.tsx +338 -0
- package/src/components/feedback/ErrorPage/ErrorPage.tsx +232 -0
- package/src/components/feedback/ErrorPage/ErrorPage.types.ts +95 -0
- package/src/components/feedback/ErrorPage/README.md +573 -0
- package/src/components/feedback/ErrorPage/index.ts +6 -0
- package/src/components/feedback/FocusTrap/FocusTrap.test.tsx +378 -0
- package/src/components/feedback/FocusTrap/FocusTrap.tsx +115 -0
- package/src/components/feedback/FocusTrap/FocusTrap.types.ts +119 -0
- package/src/components/feedback/FocusTrap/README.md +571 -0
- package/src/components/feedback/FocusTrap/index.ts +2 -0
- package/src/components/feedback/Message/Message.test.tsx +143 -0
- package/src/components/feedback/Message/Message.tsx +66 -0
- package/src/components/feedback/Message/Message.types.ts +44 -0
- package/src/components/feedback/Message/Message.variants.ts +24 -0
- package/src/components/feedback/Message/README.md +522 -0
- package/src/components/feedback/Message/index.ts +2 -0
- package/src/components/feedback/Modal/Modal.test.tsx +475 -0
- package/src/components/feedback/Modal/Modal.tsx +168 -0
- package/src/components/feedback/Modal/Modal.types.ts +91 -0
- package/src/components/feedback/Modal/README.md +517 -0
- package/src/components/feedback/Modal/index.ts +2 -0
- package/src/components/feedback/Notification/Notification.test.tsx +908 -0
- package/src/components/feedback/Notification/Notification.tsx +222 -0
- package/src/components/feedback/Notification/Notification.types.ts +90 -0
- package/src/components/feedback/Notification/Notification.variants.ts +54 -0
- package/src/components/feedback/Notification/README.md +602 -0
- package/src/components/feedback/Notification/index.ts +11 -0
- package/src/components/feedback/Popover/Popover.test.tsx +901 -0
- package/src/components/feedback/Popover/Popover.tsx +60 -0
- package/src/components/feedback/Popover/Popover.types.ts +158 -0
- package/src/components/feedback/Popover/Popover.variants.ts +27 -0
- package/src/components/feedback/Popover/README.md +700 -0
- package/src/components/feedback/Popover/index.ts +2 -0
- package/src/components/feedback/Toast/README.md +613 -0
- package/src/components/feedback/Toast/Toast.test.tsx +1116 -0
- package/src/components/feedback/Toast/Toast.tsx +44 -0
- package/src/components/feedback/Toast/Toast.types.ts +156 -0
- package/src/components/feedback/Toast/index.ts +1 -0
- package/src/components/feedback/Tooltip/README.md +671 -0
- package/src/components/feedback/Tooltip/Tooltip.test.tsx +413 -0
- package/src/components/feedback/Tooltip/Tooltip.tsx +110 -0
- package/src/components/feedback/Tooltip/Tooltip.types.ts +138 -0
- package/src/components/feedback/Tooltip/Tooltip.variants.ts +54 -0
- package/src/components/feedback/Tooltip/index.ts +3 -0
- package/src/components/feedback/index.ts +13 -0
- package/src/components/forms/Autocomplete/Autocomplete.test.tsx +2351 -0
- package/src/components/forms/Autocomplete/Autocomplete.tsx +696 -0
- package/src/components/forms/Autocomplete/Autocomplete.types.ts +211 -0
- package/src/components/forms/Autocomplete/Autocomplete.variants.ts +154 -0
- package/src/components/forms/Autocomplete/README.md +919 -0
- package/src/components/forms/Autocomplete/index.ts +7 -0
- package/src/components/forms/CLAUDE.md +124 -0
- package/src/components/forms/Checkbox/Checkbox.test.tsx +475 -0
- package/src/components/forms/Checkbox/Checkbox.tsx +35 -0
- package/src/components/forms/Checkbox/Checkbox.types.ts +24 -0
- package/src/components/forms/Checkbox/Checkbox.variants.ts +46 -0
- package/src/components/forms/Checkbox/README.md +861 -0
- package/src/components/forms/Checkbox/index.ts +3 -0
- package/src/components/forms/CheckboxGroup/CheckboxGroup.test.tsx +338 -0
- package/src/components/forms/CheckboxGroup/CheckboxGroup.tsx +212 -0
- package/src/components/forms/CheckboxGroup/CheckboxGroup.types.ts +150 -0
- package/src/components/forms/CheckboxGroup/CheckboxGroup.variants.ts +85 -0
- package/src/components/forms/CheckboxGroup/README.md +124 -0
- package/src/components/forms/CheckboxGroup/index.ts +21 -0
- package/src/components/forms/ColorPicker/ColorPicker.test.tsx +916 -0
- package/src/components/forms/ColorPicker/ColorPicker.tsx +282 -0
- package/src/components/forms/ColorPicker/ColorPicker.types.ts +99 -0
- package/src/components/forms/ColorPicker/ColorPicker.variants.ts +84 -0
- package/src/components/forms/ColorPicker/README.md +809 -0
- package/src/components/forms/ColorPicker/index.ts +14 -0
- package/src/components/forms/Combobox/Combobox.test.tsx +975 -0
- package/src/components/forms/Combobox/Combobox.tsx +194 -0
- package/src/components/forms/Combobox/Combobox.types.ts +113 -0
- package/src/components/forms/Combobox/Combobox.variants.ts +108 -0
- package/src/components/forms/Combobox/README.md +923 -0
- package/src/components/forms/Combobox/index.ts +7 -0
- package/src/components/forms/DatePicker/DatePicker.test.tsx +1181 -0
- package/src/components/forms/DatePicker/DatePicker.tsx +503 -0
- package/src/components/forms/DatePicker/DatePicker.types.ts +196 -0
- package/src/components/forms/DatePicker/DatePicker.variants.ts +38 -0
- package/src/components/forms/DatePicker/README.md +821 -0
- package/src/components/forms/DatePicker/index.ts +8 -0
- package/src/components/forms/DateRangePicker/DateRangeInput.tsx +139 -0
- package/src/components/forms/DateRangePicker/DateRangePicker.test.tsx +1684 -0
- package/src/components/forms/DateRangePicker/DateRangePicker.tsx +375 -0
- package/src/components/forms/DateRangePicker/DateRangePicker.types.ts +145 -0
- package/src/components/forms/DateRangePicker/DateRangePicker.variants.ts +133 -0
- package/src/components/forms/DateRangePicker/DateRangePresets.tsx +44 -0
- package/src/components/forms/DateRangePicker/index.ts +25 -0
- package/src/components/forms/DateRangePicker/presets.ts +104 -0
- package/src/components/forms/EmailInput/EmailInput.test.tsx +562 -0
- package/src/components/forms/EmailInput/EmailInput.tsx +59 -0
- package/src/components/forms/EmailInput/EmailInput.types.ts +46 -0
- package/src/components/forms/EmailInput/EmailInput.variants.ts +30 -0
- package/src/components/forms/EmailInput/README.md +708 -0
- package/src/components/forms/EmailInput/index.ts +6 -0
- package/src/components/forms/ErrorMessage/ErrorMessage.test.tsx +457 -0
- package/src/components/forms/ErrorMessage/ErrorMessage.tsx +128 -0
- package/src/components/forms/ErrorMessage/ErrorMessage.types.ts +54 -0
- package/src/components/forms/ErrorMessage/ErrorMessage.variants.ts +78 -0
- package/src/components/forms/ErrorMessage/README.md +855 -0
- package/src/components/forms/ErrorMessage/index.ts +4 -0
- package/src/components/forms/Field/Field.test.tsx +811 -0
- package/src/components/forms/Field/Field.tsx +195 -0
- package/src/components/forms/Field/Field.types.ts +94 -0
- package/src/components/forms/Field/Field.variants.ts +114 -0
- package/src/components/forms/Field/README.md +931 -0
- package/src/components/forms/Field/index.ts +3 -0
- package/src/components/forms/FloatLabel/FloatLabel.test.tsx +248 -0
- package/src/components/forms/FloatLabel/FloatLabel.tsx +110 -0
- package/src/components/forms/FloatLabel/FloatLabel.types.ts +37 -0
- package/src/components/forms/FloatLabel/index.ts +2 -0
- package/src/components/forms/Form/Form.test.tsx +1167 -0
- package/src/components/forms/Form/Form.tsx +170 -0
- package/src/components/forms/Form/Form.types.ts +126 -0
- package/src/components/forms/Form/Form.variants.ts +81 -0
- package/src/components/forms/Form/README.md +787 -0
- package/src/components/forms/Form/index.ts +3 -0
- package/src/components/forms/FormValidation/FormValidation.test.tsx +376 -0
- package/src/components/forms/FormValidation/FormValidation.tsx +99 -0
- package/src/components/forms/FormValidation/FormValidation.types.ts +37 -0
- package/src/components/forms/FormValidation/FormValidation.variants.ts +24 -0
- package/src/components/forms/FormValidation/README.md +592 -0
- package/src/components/forms/FormValidation/index.ts +4 -0
- package/src/components/forms/HelpText/HelpText.test.tsx +558 -0
- package/src/components/forms/HelpText/HelpText.tsx +111 -0
- package/src/components/forms/HelpText/HelpText.types.ts +51 -0
- package/src/components/forms/HelpText/HelpText.variants.ts +54 -0
- package/src/components/forms/HelpText/README.md +739 -0
- package/src/components/forms/HelpText/index.ts +4 -0
- package/src/components/forms/IftaLabel/IftaLabel.test.tsx +193 -0
- package/src/components/forms/IftaLabel/IftaLabel.tsx +72 -0
- package/src/components/forms/IftaLabel/IftaLabel.types.ts +18 -0
- package/src/components/forms/IftaLabel/index.ts +2 -0
- package/src/components/forms/InputGroup/InputGroup.test.tsx +782 -0
- package/src/components/forms/InputGroup/InputGroup.tsx +128 -0
- package/src/components/forms/InputGroup/InputGroup.types.ts +66 -0
- package/src/components/forms/InputGroup/InputGroup.variants.ts +102 -0
- package/src/components/forms/InputGroup/README.md +845 -0
- package/src/components/forms/InputGroup/index.ts +24 -0
- package/src/components/forms/InputOTP/InputOTP.test.tsx +793 -0
- package/src/components/forms/InputOTP/InputOTP.tsx +90 -0
- package/src/components/forms/InputOTP/InputOTP.types.ts +74 -0
- package/src/components/forms/InputOTP/InputOTP.variants.ts +64 -0
- package/src/components/forms/InputOTP/README.md +1149 -0
- package/src/components/forms/InputOTP/index.ts +18 -0
- package/src/components/forms/InputOTPField/InputOTPField.test.tsx +220 -0
- package/src/components/forms/InputOTPField/InputOTPField.tsx +148 -0
- package/src/components/forms/InputOTPField/InputOTPField.types.ts +91 -0
- package/src/components/forms/InputOTPField/InputOTPField.variants.ts +83 -0
- package/src/components/forms/InputOTPField/README.md +195 -0
- package/src/components/forms/InputOTPField/index.ts +12 -0
- package/src/components/forms/MultiSelect/MultiSelect.test.tsx +1036 -0
- package/src/components/forms/MultiSelect/MultiSelect.tsx +291 -0
- package/src/components/forms/MultiSelect/MultiSelect.types.ts +147 -0
- package/src/components/forms/MultiSelect/MultiSelect.variants.ts +132 -0
- package/src/components/forms/MultiSelect/README.md +897 -0
- package/src/components/forms/MultiSelect/index.ts +7 -0
- package/src/components/forms/NativeSelect/NativeSelect.test.tsx +856 -0
- package/src/components/forms/NativeSelect/NativeSelect.tsx +75 -0
- package/src/components/forms/NativeSelect/NativeSelect.types.ts +17 -0
- package/src/components/forms/NativeSelect/NativeSelect.variants.ts +106 -0
- package/src/components/forms/NativeSelect/README.md +1033 -0
- package/src/components/forms/NativeSelect/index.ts +3 -0
- package/src/components/forms/NumberInput/NumberInput.test.tsx +636 -0
- package/src/components/forms/NumberInput/NumberInput.tsx +131 -0
- package/src/components/forms/NumberInput/NumberInput.types.ts +45 -0
- package/src/components/forms/NumberInput/NumberInput.variants.ts +85 -0
- package/src/components/forms/NumberInput/README.md +766 -0
- package/src/components/forms/NumberInput/index.ts +9 -0
- package/src/components/forms/PasswordInput/PasswordInput.test.tsx +525 -0
- package/src/components/forms/PasswordInput/PasswordInput.tsx +67 -0
- package/src/components/forms/PasswordInput/PasswordInput.types.ts +35 -0
- package/src/components/forms/PasswordInput/PasswordInput.variants.ts +34 -0
- package/src/components/forms/PasswordInput/README.md +698 -0
- package/src/components/forms/PasswordInput/index.ts +6 -0
- package/src/components/forms/PaymentInput/PaymentInput.test.tsx +252 -0
- package/src/components/forms/PaymentInput/PaymentInput.tsx +178 -0
- package/src/components/forms/PaymentInput/PaymentInput.types.ts +69 -0
- package/src/components/forms/PaymentInput/PaymentInput.variants.ts +81 -0
- package/src/components/forms/PaymentInput/README.md +263 -0
- package/src/components/forms/PaymentInput/card-utils.ts +219 -0
- package/src/components/forms/PaymentInput/index.ts +23 -0
- package/src/components/forms/PhoneInput/PhoneInput.test.tsx +270 -0
- package/src/components/forms/PhoneInput/PhoneInput.tsx +215 -0
- package/src/components/forms/PhoneInput/PhoneInput.types.ts +74 -0
- package/src/components/forms/PhoneInput/PhoneInput.variants.ts +103 -0
- package/src/components/forms/PhoneInput/README.md +258 -0
- package/src/components/forms/PhoneInput/countries.ts +134 -0
- package/src/components/forms/PhoneInput/index.ts +22 -0
- package/src/components/forms/RadioButton/README.md +832 -0
- package/src/components/forms/RadioButton/RadioButton.test.tsx +583 -0
- package/src/components/forms/RadioButton/RadioButton.tsx +82 -0
- package/src/components/forms/RadioButton/RadioButton.types.ts +23 -0
- package/src/components/forms/RadioButton/RadioButton.variants.ts +80 -0
- package/src/components/forms/RadioButton/index.ts +15 -0
- package/src/components/forms/RadioCardGroup/RadioCardGroup.tsx +130 -0
- package/src/components/forms/RadioCardGroup/RadioCardGroup.types.ts +66 -0
- package/src/components/forms/RadioCardGroup/RadioCardGroup.variants.ts +131 -0
- package/src/components/forms/RadioCardGroup/index.ts +3 -0
- package/src/components/forms/RadioGroup/README.md +908 -0
- package/src/components/forms/RadioGroup/RadioGroup.test.tsx +764 -0
- package/src/components/forms/RadioGroup/RadioGroup.tsx +75 -0
- package/src/components/forms/RadioGroup/RadioGroup.types.ts +36 -0
- package/src/components/forms/RadioGroup/RadioGroup.variants.ts +58 -0
- package/src/components/forms/RadioGroup/index.ts +15 -0
- package/src/components/forms/Rating/README.md +729 -0
- package/src/components/forms/Rating/Rating.test.tsx +729 -0
- package/src/components/forms/Rating/Rating.tsx +258 -0
- package/src/components/forms/Rating/Rating.types.ts +89 -0
- package/src/components/forms/Rating/Rating.variants.ts +56 -0
- package/src/components/forms/Rating/index.ts +8 -0
- package/src/components/forms/SearchInput/README.md +729 -0
- package/src/components/forms/SearchInput/SearchInput.test.tsx +579 -0
- package/src/components/forms/SearchInput/SearchInput.tsx +103 -0
- package/src/components/forms/SearchInput/SearchInput.types.ts +40 -0
- package/src/components/forms/SearchInput/SearchInput.variants.ts +51 -0
- package/src/components/forms/SearchInput/index.ts +8 -0
- package/src/components/forms/Select/README.md +1286 -0
- package/src/components/forms/Select/Select.test.tsx +1136 -0
- package/src/components/forms/Select/Select.tsx +170 -0
- package/src/components/forms/Select/Select.types.ts +75 -0
- package/src/components/forms/Select/Select.variants.ts +133 -0
- package/src/components/forms/Select/index.ts +3 -0
- package/src/components/forms/Slider/README.md +1246 -0
- package/src/components/forms/Slider/Slider.test.tsx +731 -0
- package/src/components/forms/Slider/Slider.tsx +235 -0
- package/src/components/forms/Slider/Slider.types.ts +90 -0
- package/src/components/forms/Slider/Slider.variants.ts +239 -0
- package/src/components/forms/Slider/index.ts +34 -0
- package/src/components/forms/SuccessMessage/README.md +534 -0
- package/src/components/forms/SuccessMessage/SuccessMessage.test.tsx +257 -0
- package/src/components/forms/SuccessMessage/SuccessMessage.tsx +43 -0
- package/src/components/forms/SuccessMessage/SuccessMessage.types.ts +11 -0
- package/src/components/forms/SuccessMessage/SuccessMessage.variants.ts +15 -0
- package/src/components/forms/SuccessMessage/index.ts +4 -0
- package/src/components/forms/Switch/README.md +785 -0
- package/src/components/forms/Switch/Switch.test.tsx +636 -0
- package/src/components/forms/Switch/Switch.tsx +28 -0
- package/src/components/forms/Switch/Switch.types.ts +24 -0
- package/src/components/forms/Switch/Switch.variants.ts +49 -0
- package/src/components/forms/Switch/index.ts +3 -0
- package/src/components/forms/TagsInput/README.md +216 -0
- package/src/components/forms/TagsInput/TagsInput.test.tsx +308 -0
- package/src/components/forms/TagsInput/TagsInput.tsx +189 -0
- package/src/components/forms/TagsInput/TagsInput.types.ts +85 -0
- package/src/components/forms/TagsInput/TagsInput.variants.ts +58 -0
- package/src/components/forms/TagsInput/index.ts +12 -0
- package/src/components/forms/TextInput/README.md +871 -0
- package/src/components/forms/TextInput/TextInput.test.tsx +484 -0
- package/src/components/forms/TextInput/TextInput.tsx +76 -0
- package/src/components/forms/TextInput/TextInput.types.ts +61 -0
- package/src/components/forms/TextInput/TextInput.variants.ts +117 -0
- package/src/components/forms/TextInput/index.ts +14 -0
- package/src/components/forms/Textarea/README.md +905 -0
- package/src/components/forms/Textarea/Textarea.test.tsx +482 -0
- package/src/components/forms/Textarea/Textarea.tsx +24 -0
- package/src/components/forms/Textarea/Textarea.types.ts +39 -0
- package/src/components/forms/Textarea/Textarea.variants.ts +48 -0
- package/src/components/forms/Textarea/index.ts +3 -0
- package/src/components/forms/TextareaField/README.md +172 -0
- package/src/components/forms/TextareaField/TextareaField.test.tsx +260 -0
- package/src/components/forms/TextareaField/TextareaField.tsx +73 -0
- package/src/components/forms/TextareaField/TextareaField.types.ts +37 -0
- package/src/components/forms/TextareaField/TextareaField.variants.ts +83 -0
- package/src/components/forms/TextareaField/index.ts +12 -0
- package/src/components/forms/TimePicker/README.md +750 -0
- package/src/components/forms/TimePicker/TimePicker.test.tsx +780 -0
- package/src/components/forms/TimePicker/TimePicker.tsx +383 -0
- package/src/components/forms/TimePicker/TimePicker.types.ts +94 -0
- package/src/components/forms/TimePicker/TimePicker.variants.ts +83 -0
- package/src/components/forms/TimePicker/index.ts +14 -0
- package/src/components/forms/ToggleGroup/README.md +870 -0
- package/src/components/forms/ToggleGroup/ToggleGroup.test.tsx +941 -0
- package/src/components/forms/ToggleGroup/ToggleGroup.tsx +5 -0
- package/src/components/forms/ToggleGroup/ToggleGroup.types.ts +17 -0
- package/src/components/forms/ToggleGroup/ToggleGroup.variants.ts +42 -0
- package/src/components/forms/ToggleGroup/index.ts +9 -0
- package/src/components/forms/URLInput/README.md +701 -0
- package/src/components/forms/URLInput/URLInput.test.tsx +602 -0
- package/src/components/forms/URLInput/URLInput.tsx +71 -0
- package/src/components/forms/URLInput/URLInput.types.ts +51 -0
- package/src/components/forms/URLInput/URLInput.variants.ts +52 -0
- package/src/components/forms/URLInput/index.ts +8 -0
- package/src/components/forms/index.ts +44 -0
- package/src/components/index.ts +26 -0
- package/src/components/layout/AppContent/AppContent.test.tsx +34 -0
- package/src/components/layout/AppContent/AppContent.tsx +23 -0
- package/src/components/layout/AppContent/AppContent.variants.ts +23 -0
- package/src/components/layout/AppContent/index.ts +2 -0
- package/src/components/layout/AppHeader/AppHeader.test.tsx +26 -0
- package/src/components/layout/AppHeader/AppHeader.tsx +17 -0
- package/src/components/layout/AppHeader/AppHeader.variants.ts +21 -0
- package/src/components/layout/AppHeader/AppHeaderActions.tsx +13 -0
- package/src/components/layout/AppHeader/AppHeaderNav.tsx +13 -0
- package/src/components/layout/AppHeader/AppHeaderTitle.tsx +13 -0
- package/src/components/layout/AppHeader/index.ts +5 -0
- package/src/components/layout/AppRail/AppRail.test.tsx +50 -0
- package/src/components/layout/AppRail/AppRail.tsx +24 -0
- package/src/components/layout/AppRail/AppRail.variants.ts +31 -0
- package/src/components/layout/AppRail/AppRailFooter.tsx +13 -0
- package/src/components/layout/AppRail/AppRailGroup.tsx +13 -0
- package/src/components/layout/AppRail/AppRailHeader.tsx +13 -0
- package/src/components/layout/AppRail/AppRailItem.tsx +57 -0
- package/src/components/layout/AppRail/index.ts +5 -0
- package/src/components/layout/AppShell/AppShell.context.tsx +34 -0
- package/src/components/layout/AppShell/AppShell.test.tsx +61 -0
- package/src/components/layout/AppShell/AppShell.tsx +91 -0
- package/src/components/layout/AppShell/AppShell.variants.ts +21 -0
- package/src/components/layout/AppShell/index.ts +2 -0
- package/src/components/layout/AppSidebar/AppSidebar.test.tsx +69 -0
- package/src/components/layout/AppSidebar/AppSidebar.tsx +58 -0
- package/src/components/layout/AppSidebar/AppSidebar.variants.ts +41 -0
- package/src/components/layout/AppSidebar/AppSidebarContent.tsx +18 -0
- package/src/components/layout/AppSidebar/AppSidebarFooter.tsx +13 -0
- package/src/components/layout/AppSidebar/AppSidebarGroup.tsx +22 -0
- package/src/components/layout/AppSidebar/AppSidebarHeader.tsx +13 -0
- package/src/components/layout/AppSidebar/AppSidebarItem.tsx +54 -0
- package/src/components/layout/AppSidebar/AppSidebarTrigger.tsx +25 -0
- package/src/components/layout/AppSidebar/index.ts +7 -0
- package/src/components/layout/CLAUDE.md +112 -0
- package/src/components/layout/Card/Card.test.tsx +339 -0
- package/src/components/layout/Card/Card.tsx +102 -0
- package/src/components/layout/Card/Card.types.ts +52 -0
- package/src/components/layout/Card/Card.variants.ts +85 -0
- package/src/components/layout/Card/README.md +994 -0
- package/src/components/layout/Card/index.ts +3 -0
- package/src/components/layout/Collapsible/Collapsible.test.tsx +491 -0
- package/src/components/layout/Collapsible/Collapsible.tsx +50 -0
- package/src/components/layout/Collapsible/Collapsible.types.ts +26 -0
- package/src/components/layout/Collapsible/Collapsible.variants.ts +52 -0
- package/src/components/layout/Collapsible/README.md +885 -0
- package/src/components/layout/Collapsible/index.ts +3 -0
- package/src/components/layout/Container/Container.test.tsx +283 -0
- package/src/components/layout/Container/Container.tsx +25 -0
- package/src/components/layout/Container/Container.types.ts +36 -0
- package/src/components/layout/Container/Container.variants.ts +59 -0
- package/src/components/layout/Container/README.md +700 -0
- package/src/components/layout/Container/index.ts +3 -0
- package/src/components/layout/Flex/Flex.test.tsx +545 -0
- package/src/components/layout/Flex/Flex.tsx +52 -0
- package/src/components/layout/Flex/Flex.types.ts +61 -0
- package/src/components/layout/Flex/Flex.variants.ts +98 -0
- package/src/components/layout/Flex/README.md +812 -0
- package/src/components/layout/Flex/index.ts +3 -0
- package/src/components/layout/Grid/Grid.test.tsx +601 -0
- package/src/components/layout/Grid/Grid.tsx +61 -0
- package/src/components/layout/Grid/Grid.types.ts +47 -0
- package/src/components/layout/Grid/Grid.variants.ts +100 -0
- package/src/components/layout/Grid/README.md +762 -0
- package/src/components/layout/Grid/index.ts +3 -0
- package/src/components/layout/PageContent/PageContent.tsx +13 -0
- package/src/components/layout/PageContent/index.ts +1 -0
- package/src/components/layout/PageHeader/PageHeader.tsx +43 -0
- package/src/components/layout/PageHeader/index.ts +1 -0
- package/src/components/layout/PageSection/PageSection.tsx +28 -0
- package/src/components/layout/PageSection/index.ts +1 -0
- package/src/components/layout/Panel/Panel.test.tsx +427 -0
- package/src/components/layout/Panel/Panel.tsx +75 -0
- package/src/components/layout/Panel/Panel.types.ts +59 -0
- package/src/components/layout/Panel/Panel.variants.ts +94 -0
- package/src/components/layout/Panel/README.md +861 -0
- package/src/components/layout/Panel/index.ts +3 -0
- package/src/components/layout/ResizablePanels/README.md +369 -0
- package/src/components/layout/ResizablePanels/ResizablePanels.test.tsx +506 -0
- package/src/components/layout/ResizablePanels/ResizablePanels.tsx +64 -0
- package/src/components/layout/ResizablePanels/ResizablePanels.types.ts +41 -0
- package/src/components/layout/ResizablePanels/ResizablePanels.variants.ts +67 -0
- package/src/components/layout/ResizablePanels/index.ts +3 -0
- package/src/components/layout/ResponsiveContainer/README.md +267 -0
- package/src/components/layout/ResponsiveContainer/ResponsiveContainer.test.tsx +386 -0
- package/src/components/layout/ResponsiveContainer/ResponsiveContainer.tsx +54 -0
- package/src/components/layout/ResponsiveContainer/ResponsiveContainer.types.ts +43 -0
- package/src/components/layout/ResponsiveContainer/ResponsiveContainer.variants.ts +106 -0
- package/src/components/layout/ResponsiveContainer/index.ts +3 -0
- package/src/components/layout/ScrollArea/README.md +278 -0
- package/src/components/layout/ScrollArea/ScrollArea.test.tsx +352 -0
- package/src/components/layout/ScrollArea/ScrollArea.tsx +61 -0
- package/src/components/layout/ScrollArea/ScrollArea.types.ts +36 -0
- package/src/components/layout/ScrollArea/ScrollArea.variants.ts +85 -0
- package/src/components/layout/ScrollArea/index.ts +3 -0
- package/src/components/layout/Section/README.md +315 -0
- package/src/components/layout/Section/Section.test.tsx +293 -0
- package/src/components/layout/Section/Section.tsx +60 -0
- package/src/components/layout/Section/Section.types.ts +38 -0
- package/src/components/layout/Section/Section.variants.ts +45 -0
- package/src/components/layout/Section/index.ts +3 -0
- package/src/components/layout/Sheet/README.md +533 -0
- package/src/components/layout/Sheet/Sheet.test.tsx +702 -0
- package/src/components/layout/Sheet/Sheet.tsx +142 -0
- package/src/components/layout/Sheet/Sheet.types.ts +92 -0
- package/src/components/layout/Sheet/Sheet.variants.ts +98 -0
- package/src/components/layout/Sheet/index.ts +3 -0
- package/src/components/layout/Stack/README.md +346 -0
- package/src/components/layout/Stack/Stack.test.tsx +492 -0
- package/src/components/layout/Stack/Stack.tsx +58 -0
- package/src/components/layout/Stack/Stack.types.ts +58 -0
- package/src/components/layout/Stack/Stack.variants.ts +77 -0
- package/src/components/layout/Stack/index.ts +3 -0
- package/src/components/layout/index.ts +21 -0
- package/src/components/navigation/Breadcrumb/Breadcrumb.test.tsx +875 -0
- package/src/components/navigation/Breadcrumb/Breadcrumb.tsx +183 -0
- package/src/components/navigation/Breadcrumb/Breadcrumb.types.ts +49 -0
- package/src/components/navigation/Breadcrumb/Breadcrumb.variants.ts +63 -0
- package/src/components/navigation/Breadcrumb/README.md +608 -0
- package/src/components/navigation/Breadcrumb/index.ts +24 -0
- package/src/components/navigation/CLAUDE.md +118 -0
- package/src/components/navigation/ContextMenu/ContextMenu.test.tsx +881 -0
- package/src/components/navigation/ContextMenu/ContextMenu.tsx +304 -0
- package/src/components/navigation/ContextMenu/ContextMenu.types.ts +119 -0
- package/src/components/navigation/ContextMenu/ContextMenu.variants.ts +167 -0
- package/src/components/navigation/ContextMenu/README.md +660 -0
- package/src/components/navigation/ContextMenu/index.ts +34 -0
- package/src/components/navigation/Drawer/Drawer.test.tsx +721 -0
- package/src/components/navigation/Drawer/Drawer.tsx +178 -0
- package/src/components/navigation/Drawer/Drawer.types.ts +66 -0
- package/src/components/navigation/Drawer/Drawer.variants.ts +121 -0
- package/src/components/navigation/Drawer/README.md +723 -0
- package/src/components/navigation/Drawer/index.ts +24 -0
- package/src/components/navigation/DropdownMenu/DropdownMenu.test.tsx +881 -0
- package/src/components/navigation/DropdownMenu/DropdownMenu.tsx +305 -0
- package/src/components/navigation/DropdownMenu/DropdownMenu.types.ts +98 -0
- package/src/components/navigation/DropdownMenu/DropdownMenu.variants.ts +168 -0
- package/src/components/navigation/DropdownMenu/README.md +676 -0
- package/src/components/navigation/DropdownMenu/index.ts +33 -0
- package/src/components/navigation/Header/Header.test.tsx +418 -0
- package/src/components/navigation/Header/Header.tsx +133 -0
- package/src/components/navigation/Header/Header.types.ts +41 -0
- package/src/components/navigation/Header/Header.variants.ts +91 -0
- package/src/components/navigation/Header/README.md +567 -0
- package/src/components/navigation/Header/index.ts +14 -0
- package/src/components/navigation/Menu/Menu.test.tsx +658 -0
- package/src/components/navigation/Menu/Menu.tsx +247 -0
- package/src/components/navigation/Menu/Menu.types.ts +51 -0
- package/src/components/navigation/Menu/Menu.variants.ts +105 -0
- package/src/components/navigation/Menu/README.md +599 -0
- package/src/components/navigation/Menu/index.ts +17 -0
- package/src/components/navigation/Menubar/Menubar.test.tsx +1028 -0
- package/src/components/navigation/Menubar/Menubar.tsx +308 -0
- package/src/components/navigation/Menubar/Menubar.types.ts +104 -0
- package/src/components/navigation/Menubar/Menubar.variants.ts +182 -0
- package/src/components/navigation/Menubar/README.md +641 -0
- package/src/components/navigation/Menubar/index.ts +36 -0
- package/src/components/navigation/MobileSidebar/MobileSidebar.test.tsx +255 -0
- package/src/components/navigation/MobileSidebar/MobileSidebar.tsx +187 -0
- package/src/components/navigation/MobileSidebar/MobileSidebar.types.ts +62 -0
- package/src/components/navigation/MobileSidebar/MobileSidebar.variants.ts +79 -0
- package/src/components/navigation/MobileSidebar/index.ts +17 -0
- package/src/components/navigation/Navbar/Navbar.test.tsx +621 -0
- package/src/components/navigation/Navbar/Navbar.tsx +238 -0
- package/src/components/navigation/Navbar/Navbar.types.ts +69 -0
- package/src/components/navigation/Navbar/Navbar.variants.ts +176 -0
- package/src/components/navigation/Navbar/README.md +670 -0
- package/src/components/navigation/Navbar/index.ts +20 -0
- package/src/components/navigation/NavigationMenu/NavigationMenu.test.tsx +701 -0
- package/src/components/navigation/NavigationMenu/NavigationMenu.tsx +211 -0
- package/src/components/navigation/NavigationMenu/NavigationMenu.types.ts +52 -0
- package/src/components/navigation/NavigationMenu/NavigationMenu.variants.ts +122 -0
- package/src/components/navigation/NavigationMenu/README.md +697 -0
- package/src/components/navigation/NavigationMenu/index.ts +23 -0
- package/src/components/navigation/Pagination/Pagination.test.tsx +619 -0
- package/src/components/navigation/Pagination/Pagination.tsx +185 -0
- package/src/components/navigation/Pagination/Pagination.types.ts +42 -0
- package/src/components/navigation/Pagination/Pagination.variants.ts +36 -0
- package/src/components/navigation/Pagination/README.md +635 -0
- package/src/components/navigation/Pagination/index.ts +17 -0
- package/src/components/navigation/Sidebar/README.md +628 -0
- package/src/components/navigation/Sidebar/Sidebar.test.tsx +1169 -0
- package/src/components/navigation/Sidebar/Sidebar.tsx +761 -0
- package/src/components/navigation/Sidebar/Sidebar.types.ts +168 -0
- package/src/components/navigation/Sidebar/Sidebar.variants.ts +302 -0
- package/src/components/navigation/Sidebar/index.ts +59 -0
- package/src/components/navigation/SkipLinks/README.md +512 -0
- package/src/components/navigation/SkipLinks/SkipLinks.test.tsx +445 -0
- package/src/components/navigation/SkipLinks/SkipLinks.tsx +103 -0
- package/src/components/navigation/SkipLinks/SkipLinks.types.ts +39 -0
- package/src/components/navigation/SkipLinks/SkipLinks.variants.ts +102 -0
- package/src/components/navigation/SkipLinks/index.ts +12 -0
- package/src/components/navigation/TabNavigation/TabNavigation.tsx +196 -0
- package/src/components/navigation/TabNavigation/TabNavigation.types.ts +85 -0
- package/src/components/navigation/TabNavigation/TabNavigation.variants.ts +95 -0
- package/src/components/navigation/TabNavigation/index.ts +10 -0
- package/src/components/navigation/TabPanel/README.md +437 -0
- package/src/components/navigation/TabPanel/TabPanel.test.tsx +566 -0
- package/src/components/navigation/TabPanel/TabPanel.tsx +95 -0
- package/src/components/navigation/TabPanel/TabPanel.types.ts +29 -0
- package/src/components/navigation/TabPanel/TabPanel.variants.ts +61 -0
- package/src/components/navigation/TabPanel/index.ts +13 -0
- package/src/components/navigation/Tabs/README.md +669 -0
- package/src/components/navigation/Tabs/Tabs.test.tsx +500 -0
- package/src/components/navigation/Tabs/Tabs.tsx +112 -0
- package/src/components/navigation/Tabs/Tabs.types.ts +38 -0
- package/src/components/navigation/Tabs/Tabs.variants.ts +80 -0
- package/src/components/navigation/Tabs/index.ts +14 -0
- package/src/components/navigation/Toolbar/README.md +650 -0
- package/src/components/navigation/Toolbar/Toolbar.test.tsx +620 -0
- package/src/components/navigation/Toolbar/Toolbar.tsx +133 -0
- package/src/components/navigation/Toolbar/Toolbar.types.ts +42 -0
- package/src/components/navigation/Toolbar/Toolbar.variants.ts +95 -0
- package/src/components/navigation/Toolbar/index.ts +17 -0
- package/src/components/navigation/UserProfileDropdown/UserProfileDropdown.test.tsx +257 -0
- package/src/components/navigation/UserProfileDropdown/UserProfileDropdown.tsx +267 -0
- package/src/components/navigation/UserProfileDropdown/UserProfileDropdown.types.ts +84 -0
- package/src/components/navigation/UserProfileDropdown/UserProfileDropdown.variants.ts +77 -0
- package/src/components/navigation/UserProfileDropdown/index.ts +17 -0
- package/src/components/navigation/WorkspaceDropdown/WorkspaceDropdown.tsx +190 -0
- package/src/components/navigation/WorkspaceDropdown/WorkspaceDropdown.types.ts +56 -0
- package/src/components/navigation/WorkspaceDropdown/WorkspaceDropdown.variants.ts +82 -0
- package/src/components/navigation/WorkspaceDropdown/index.ts +20 -0
- package/src/components/navigation/index.ts +17 -0
- package/src/components/primitives/ArrowAnimated/ArrowAnimated.test.tsx +240 -0
- package/src/components/primitives/ArrowAnimated/ArrowAnimated.tsx +96 -0
- package/src/components/primitives/ArrowAnimated/ArrowAnimated.types.ts +16 -0
- package/src/components/primitives/ArrowAnimated/ArrowAnimated.variants.ts +43 -0
- package/src/components/primitives/ArrowAnimated/index.ts +9 -0
- package/src/components/primitives/AspectRatio/AspectRatio.test.tsx +306 -0
- package/src/components/primitives/AspectRatio/AspectRatio.tsx +11 -0
- package/src/components/primitives/AspectRatio/AspectRatio.types.ts +57 -0
- package/src/components/primitives/AspectRatio/AspectRatio.variants.ts +110 -0
- package/src/components/primitives/AspectRatio/README.md +914 -0
- package/src/components/primitives/AspectRatio/index.ts +7 -0
- package/src/components/primitives/Avatar/Avatar.test.tsx +1311 -0
- package/src/components/primitives/Avatar/Avatar.tsx +159 -0
- package/src/components/primitives/Avatar/Avatar.types.ts +70 -0
- package/src/components/primitives/Avatar/AvatarAddButton.tsx +59 -0
- package/src/components/primitives/Avatar/AvatarBadge.tsx +84 -0
- package/src/components/primitives/Avatar/AvatarGroup.test.tsx +1377 -0
- package/src/components/primitives/Avatar/AvatarGroup.tsx +101 -0
- package/src/components/primitives/Avatar/AvatarLabelGroup.tsx +160 -0
- package/src/components/primitives/Avatar/AvatarSkeleton.tsx +76 -0
- package/src/components/primitives/Avatar/AvatarStatus.tsx +71 -0
- package/src/components/primitives/Avatar/README.md +1174 -0
- package/src/components/primitives/Avatar/index.ts +8 -0
- package/src/components/primitives/Badge/Badge.test.tsx +1146 -0
- package/src/components/primitives/Badge/Badge.tsx +389 -0
- package/src/components/primitives/Badge/Badge.types.ts +102 -0
- package/src/components/primitives/Badge/README.md +814 -0
- package/src/components/primitives/Badge/index.ts +2 -0
- package/src/components/primitives/Button/Button.test.tsx +626 -0
- package/src/components/primitives/Button/Button.tsx +299 -0
- package/src/components/primitives/Button/Button.types.ts +137 -0
- package/src/components/primitives/Button/README.md +1112 -0
- package/src/components/primitives/Button/index.ts +8 -0
- package/src/components/primitives/ButtonGroup/ButtonGroup.test.tsx +945 -0
- package/src/components/primitives/ButtonGroup/ButtonGroup.tsx +224 -0
- package/src/components/primitives/ButtonGroup/ButtonGroup.types.ts +133 -0
- package/src/components/primitives/ButtonGroup/README.md +945 -0
- package/src/components/primitives/ButtonGroup/index.ts +12 -0
- package/src/components/primitives/CLAUDE.md +108 -0
- package/src/components/primitives/ConfirmButton/ConfirmButton.test.tsx +929 -0
- package/src/components/primitives/ConfirmButton/ConfirmButton.tsx +298 -0
- package/src/components/primitives/ConfirmButton/ConfirmButton.types.ts +116 -0
- package/src/components/primitives/ConfirmButton/README.md +1059 -0
- package/src/components/primitives/ConfirmButton/index.ts +6 -0
- package/src/components/primitives/Divider/Divider.test.tsx +304 -0
- package/src/components/primitives/Divider/Divider.tsx +209 -0
- package/src/components/primitives/Divider/Divider.types.ts +74 -0
- package/src/components/primitives/Divider/README.md +839 -0
- package/src/components/primitives/Divider/index.ts +8 -0
- package/src/components/primitives/Heading/Heading.test.tsx +611 -0
- package/src/components/primitives/Heading/Heading.tsx +120 -0
- package/src/components/primitives/Heading/Heading.types.ts +61 -0
- package/src/components/primitives/Heading/README.md +820 -0
- package/src/components/primitives/Heading/index.ts +2 -0
- package/src/components/primitives/Icon/Icon.test.tsx +466 -0
- package/src/components/primitives/Icon/Icon.tsx +74 -0
- package/src/components/primitives/Icon/Icon.types.ts +61 -0
- package/src/components/primitives/Icon/README.md +759 -0
- package/src/components/primitives/Icon/index.ts +8 -0
- package/src/components/primitives/Image/Image.test.tsx +734 -0
- package/src/components/primitives/Image/Image.tsx +239 -0
- package/src/components/primitives/Image/Image.types.ts +75 -0
- package/src/components/primitives/Image/README.md +863 -0
- package/src/components/primitives/Image/index.ts +8 -0
- package/src/components/primitives/Kbd/Kbd.test.tsx +432 -0
- package/src/components/primitives/Kbd/Kbd.tsx +53 -0
- package/src/components/primitives/Kbd/Kbd.types.ts +55 -0
- package/src/components/primitives/Kbd/Kbd.variants.ts +33 -0
- package/src/components/primitives/Kbd/README.md +659 -0
- package/src/components/primitives/Kbd/index.ts +3 -0
- package/src/components/primitives/Label/Label.test.tsx +311 -0
- package/src/components/primitives/Label/Label.tsx +46 -0
- package/src/components/primitives/Label/Label.types.ts +28 -0
- package/src/components/primitives/Label/README.md +816 -0
- package/src/components/primitives/Label/index.ts +2 -0
- package/src/components/primitives/Link/Link.test.tsx +764 -0
- package/src/components/primitives/Link/Link.tsx +143 -0
- package/src/components/primitives/Link/Link.types.ts +85 -0
- package/src/components/primitives/Link/README.md +954 -0
- package/src/components/primitives/Link/index.ts +8 -0
- package/src/components/primitives/Paragraph/Paragraph.test.tsx +463 -0
- package/src/components/primitives/Paragraph/Paragraph.tsx +119 -0
- package/src/components/primitives/Paragraph/Paragraph.types.ts +81 -0
- package/src/components/primitives/Paragraph/README.md +812 -0
- package/src/components/primitives/Paragraph/index.ts +2 -0
- package/src/components/primitives/ProgressBar/ProgressBar.test.tsx +598 -0
- package/src/components/primitives/ProgressBar/ProgressBar.tsx +268 -0
- package/src/components/primitives/ProgressBar/ProgressBar.types.ts +127 -0
- package/src/components/primitives/ProgressBar/ProgressBar.variants.ts +111 -0
- package/src/components/primitives/ProgressBar/README.md +772 -0
- package/src/components/primitives/ProgressBar/index.ts +3 -0
- package/src/components/primitives/ProgressCircle/ProgressCircle.test.tsx +219 -0
- package/src/components/primitives/ProgressCircle/ProgressCircle.tsx +264 -0
- package/src/components/primitives/ProgressCircle/ProgressCircle.types.ts +152 -0
- package/src/components/primitives/ProgressCircle/ProgressCircle.variants.ts +140 -0
- package/src/components/primitives/ProgressCircle/README.md +763 -0
- package/src/components/primitives/ProgressCircle/index.ts +3 -0
- package/src/components/primitives/SkeletonLoader/README.md +792 -0
- package/src/components/primitives/SkeletonLoader/SkeletonLoader.test.tsx +382 -0
- package/src/components/primitives/SkeletonLoader/SkeletonLoader.tsx +45 -0
- package/src/components/primitives/SkeletonLoader/SkeletonLoader.types.ts +56 -0
- package/src/components/primitives/SkeletonLoader/SkeletonLoader.variants.ts +87 -0
- package/src/components/primitives/SkeletonLoader/index.ts +3 -0
- package/src/components/primitives/Spacer/README.md +804 -0
- package/src/components/primitives/Spacer/Spacer.test.tsx +363 -0
- package/src/components/primitives/Spacer/Spacer.tsx +147 -0
- package/src/components/primitives/Spacer/Spacer.types.ts +72 -0
- package/src/components/primitives/Spacer/index.ts +9 -0
- package/src/components/primitives/Spinner/README.md +767 -0
- package/src/components/primitives/Spinner/Spinner.test.tsx +289 -0
- package/src/components/primitives/Spinner/Spinner.tsx +101 -0
- package/src/components/primitives/Spinner/Spinner.types.ts +62 -0
- package/src/components/primitives/Spinner/Spinner.variants.ts +50 -0
- package/src/components/primitives/Spinner/index.ts +3 -0
- package/src/components/primitives/SplitButton/README.md +1142 -0
- package/src/components/primitives/SplitButton/SplitButton.test.tsx +1020 -0
- package/src/components/primitives/SplitButton/SplitButton.tsx +215 -0
- package/src/components/primitives/SplitButton/SplitButton.types.ts +114 -0
- package/src/components/primitives/SplitButton/index.ts +8 -0
- package/src/components/primitives/StatusIndicator/README.md +730 -0
- package/src/components/primitives/StatusIndicator/StatusIndicator.test.tsx +446 -0
- package/src/components/primitives/StatusIndicator/StatusIndicator.tsx +100 -0
- package/src/components/primitives/StatusIndicator/StatusIndicator.types.ts +39 -0
- package/src/components/primitives/StatusIndicator/index.ts +2 -0
- package/src/components/primitives/Tag/README.md +793 -0
- package/src/components/primitives/Tag/Tag.test.tsx +410 -0
- package/src/components/primitives/Tag/Tag.tsx +302 -0
- package/src/components/primitives/Tag/Tag.types.ts +112 -0
- package/src/components/primitives/Tag/Tag.variants.ts +144 -0
- package/src/components/primitives/Tag/TagGroup.tsx +89 -0
- package/src/components/primitives/Tag/index.ts +15 -0
- package/src/components/primitives/Text/README.md +849 -0
- package/src/components/primitives/Text/Text.test.tsx +371 -0
- package/src/components/primitives/Text/Text.tsx +89 -0
- package/src/components/primitives/Text/Text.types.ts +21 -0
- package/src/components/primitives/Text/index.ts +2 -0
- package/src/components/primitives/Thumbnail/README.md +800 -0
- package/src/components/primitives/Thumbnail/Thumbnail.test.tsx +657 -0
- package/src/components/primitives/Thumbnail/Thumbnail.tsx +141 -0
- package/src/components/primitives/Thumbnail/Thumbnail.types.ts +102 -0
- package/src/components/primitives/Thumbnail/index.ts +9 -0
- package/src/components/primitives/Toggle/README.md +232 -0
- package/src/components/primitives/Toggle/Toggle.test.tsx +630 -0
- package/src/components/primitives/Toggle/Toggle.tsx +174 -0
- package/src/components/primitives/Toggle/Toggle.types.ts +161 -0
- package/src/components/primitives/Toggle/index.ts +2 -0
- package/src/components/primitives/index.ts +26 -0
- package/src/components/workflow/ApprovalFlow/ApprovalFlow.test.tsx +607 -0
- package/src/components/workflow/ApprovalFlow/ApprovalFlow.tsx +522 -0
- package/src/components/workflow/ApprovalFlow/ApprovalFlow.types.ts +233 -0
- package/src/components/workflow/ApprovalFlow/ApprovalFlow.variants.ts +207 -0
- package/src/components/workflow/ApprovalFlow/README.md +450 -0
- package/src/components/workflow/ApprovalFlow/index.ts +38 -0
- package/src/components/workflow/ApprovalStatus/ApprovalStatus.test.tsx +316 -0
- package/src/components/workflow/ApprovalStatus/ApprovalStatus.tsx +342 -0
- package/src/components/workflow/ApprovalStatus/ApprovalStatus.types.ts +68 -0
- package/src/components/workflow/ApprovalStatus/ApprovalStatus.variants.ts +60 -0
- package/src/components/workflow/ApprovalStatus/README.md +359 -0
- package/src/components/workflow/ApprovalStatus/index.ts +7 -0
- package/src/components/workflow/CLAUDE.md +118 -0
- package/src/components/workflow/CommentSystem/CommentSystem.test.tsx +901 -0
- package/src/components/workflow/CommentSystem/CommentSystem.tsx +1014 -0
- package/src/components/workflow/CommentSystem/CommentSystem.types.ts +290 -0
- package/src/components/workflow/CommentSystem/CommentSystem.variants.ts +307 -0
- package/src/components/workflow/CommentSystem/README.md +478 -0
- package/src/components/workflow/CommentSystem/index.ts +37 -0
- package/src/components/workflow/Dashboard/Dashboard.test.tsx +586 -0
- package/src/components/workflow/Dashboard/Dashboard.tsx +447 -0
- package/src/components/workflow/Dashboard/Dashboard.types.ts +232 -0
- package/src/components/workflow/Dashboard/Dashboard.variants.ts +241 -0
- package/src/components/workflow/Dashboard/README.md +445 -0
- package/src/components/workflow/Dashboard/index.ts +39 -0
- package/src/components/workflow/DashboardBuilder/DashboardBuilder.test.tsx +460 -0
- package/src/components/workflow/DashboardBuilder/DashboardBuilder.tsx +944 -0
- package/src/components/workflow/DashboardBuilder/DashboardBuilder.types.ts +389 -0
- package/src/components/workflow/DashboardBuilder/DashboardBuilder.variants.ts +264 -0
- package/src/components/workflow/DashboardBuilder/README.md +489 -0
- package/src/components/workflow/DashboardBuilder/index.ts +61 -0
- package/src/components/workflow/KanbanBoard/KanbanBoard.test.tsx +445 -0
- package/src/components/workflow/KanbanBoard/KanbanBoard.tsx +806 -0
- package/src/components/workflow/KanbanBoard/KanbanBoard.types.ts +183 -0
- package/src/components/workflow/KanbanBoard/KanbanBoard.variants.ts +311 -0
- package/src/components/workflow/KanbanBoard/README.md +495 -0
- package/src/components/workflow/KanbanBoard/index.ts +40 -0
- package/src/components/workflow/ProgressSteps/ProgressSteps.test.tsx +318 -0
- package/src/components/workflow/ProgressSteps/ProgressSteps.tsx +350 -0
- package/src/components/workflow/ProgressSteps/ProgressSteps.types.ts +84 -0
- package/src/components/workflow/ProgressSteps/ProgressSteps.variants.ts +315 -0
- package/src/components/workflow/ProgressSteps/README.md +412 -0
- package/src/components/workflow/ProgressSteps/index.ts +20 -0
- package/src/components/workflow/ReportGenerator/README.md +530 -0
- package/src/components/workflow/ReportGenerator/ReportGenerator.test.tsx +723 -0
- package/src/components/workflow/ReportGenerator/ReportGenerator.tsx +889 -0
- package/src/components/workflow/ReportGenerator/ReportGenerator.types.ts +321 -0
- package/src/components/workflow/ReportGenerator/ReportGenerator.variants.ts +378 -0
- package/src/components/workflow/ReportGenerator/index.ts +44 -0
- package/src/components/workflow/Stepper/README.md +390 -0
- package/src/components/workflow/Stepper/Stepper.test.tsx +376 -0
- package/src/components/workflow/Stepper/Stepper.tsx +301 -0
- package/src/components/workflow/Stepper/Stepper.types.ts +73 -0
- package/src/components/workflow/Stepper/Stepper.variants.ts +194 -0
- package/src/components/workflow/Stepper/index.ts +16 -0
- package/src/components/workflow/TaskCard/README.md +343 -0
- package/src/components/workflow/TaskCard/TaskCard.test.tsx +375 -0
- package/src/components/workflow/TaskCard/TaskCard.tsx +312 -0
- package/src/components/workflow/TaskCard/TaskCard.types.ts +55 -0
- package/src/components/workflow/TaskCard/TaskCard.variants.ts +64 -0
- package/src/components/workflow/TaskCard/index.ts +14 -0
- package/src/components/workflow/TaskList/README.md +317 -0
- package/src/components/workflow/TaskList/TaskList.test.tsx +318 -0
- package/src/components/workflow/TaskList/TaskList.tsx +556 -0
- package/src/components/workflow/TaskList/TaskList.types.ts +78 -0
- package/src/components/workflow/TaskList/TaskList.variants.ts +143 -0
- package/src/components/workflow/TaskList/index.ts +19 -0
- package/src/components/workflow/TaskStatus/README.md +358 -0
- package/src/components/workflow/TaskStatus/TaskStatus.test.tsx +299 -0
- package/src/components/workflow/TaskStatus/TaskStatus.tsx +246 -0
- package/src/components/workflow/TaskStatus/TaskStatus.types.ts +65 -0
- package/src/components/workflow/TaskStatus/TaskStatus.variants.ts +145 -0
- package/src/components/workflow/TaskStatus/index.ts +24 -0
- package/src/components/workflow/Wizard/README.md +440 -0
- package/src/components/workflow/Wizard/Wizard.test.tsx +432 -0
- package/src/components/workflow/Wizard/Wizard.tsx +279 -0
- package/src/components/workflow/Wizard/Wizard.types.ts +61 -0
- package/src/components/workflow/Wizard/Wizard.variants.ts +105 -0
- package/src/components/workflow/Wizard/index.ts +9 -0
- package/src/components/workflow/index.ts +14 -0
- package/src/hooks/index.ts +4 -0
- package/src/hooks/use-media-query.ts +24 -0
- package/src/hooks/use-mobile.ts +30 -0
- package/src/hooks/use-on-window-resize.ts +27 -0
- package/src/index.ts +22 -0
- package/src/lib/chart-colors.ts +195 -0
- package/src/lib/utils.ts +6 -0
- package/src/test/setup.ts +125 -0
- package/src/test/vitest.d.ts +13 -0
|
@@ -0,0 +1,1112 @@
|
|
|
1
|
+
# Button
|
|
2
|
+
|
|
3
|
+
## Visão Geral
|
|
4
|
+
|
|
5
|
+
O **Button** é o componente fundamental de interação do Design System ETUS, usado para disparar ações e submeter formulários. Como elemento atômico, serve de base para composições mais complexas como `IconButton`, `ButtonGroup` e `ToggleButton`.
|
|
6
|
+
|
|
7
|
+
### Casos de Uso
|
|
8
|
+
|
|
9
|
+
- Submissão de formulários
|
|
10
|
+
- Ações primárias e secundárias em interfaces
|
|
11
|
+
- Navegação quando usado com `asChild` + Link
|
|
12
|
+
- Ações destrutivas (deletar, remover)
|
|
13
|
+
- Links estilizados como botões
|
|
14
|
+
|
|
15
|
+
### Classificação
|
|
16
|
+
|
|
17
|
+
**Categoria:** Atom
|
|
18
|
+
**Dependências:** `@radix-ui/react-slot`, `class-variance-authority`
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## Design Specs
|
|
23
|
+
|
|
24
|
+
### Variantes (`variant`)
|
|
25
|
+
|
|
26
|
+
| Variante | Uso | Tokens |
|
|
27
|
+
| ----------------- | ------------------------- | ----------------------------------------------- |
|
|
28
|
+
| `default` | Ação primária (legacy) | `bg-primary`, `text-primary-foreground` |
|
|
29
|
+
| `primary` | Ação primária (Figma) | `bg-button-primary-*` |
|
|
30
|
+
| `secondary` | Ação secundária (legacy) | `bg-secondary`, `text-secondary-foreground` |
|
|
31
|
+
| `secondary-gray` | Secundário neutro | `bg-button-secondary-gray-*` |
|
|
32
|
+
| `secondary-color` | Secundário colorido | `bg-button-secondary-color-*` |
|
|
33
|
+
| `tertiary-gray` | Terciário neutro | `text-button-tertiary-gray-*` |
|
|
34
|
+
| `tertiary-color` | Terciário colorido | `text-button-tertiary-color-*` |
|
|
35
|
+
| `destructive` | Ações perigosas | `bg-destructive`, `text-destructive-foreground` |
|
|
36
|
+
| `outline` | Baixa ênfase | `border`, `bg-background` |
|
|
37
|
+
| `dashed` | Adicionar item / Builder | `border-dashed` |
|
|
38
|
+
| `ghost` | Mínima ênfase | Transparente, hover `bg-accent` |
|
|
39
|
+
| `link` | Navegação inline (legacy) | `text-shadow-button`, underline |
|
|
40
|
+
| `link-gray` | Link neutro | `text-button-link-gray-*` |
|
|
41
|
+
| `link-color` | Link colorido | `text-button-link-color-*` |
|
|
42
|
+
| `unstyled` | Comportamento sem estilo | `bg-transparent`, `p-0` |
|
|
43
|
+
| `success` | Estado positivo | `bg-green-*`, `text-white` |
|
|
44
|
+
| `warning` | Estado de atenção | `bg-yellow-*`, `text-white` |
|
|
45
|
+
|
|
46
|
+
> Atalho: use `tone="gray" | "color"` com `variant="secondary" | "tertiary" | "link"` para mapear automaticamente para `*-gray` ou `*-color`.
|
|
47
|
+
|
|
48
|
+
### Tamanhos (`size`)
|
|
49
|
+
|
|
50
|
+
| Tamanho | Altura | Padding | Uso |
|
|
51
|
+
| ---------- | -------------------- | ------- | -------------------------- |
|
|
52
|
+
| `sm` | `h-8` (32px) | `px-3` | Espaços compactos, tabelas |
|
|
53
|
+
| `default` | `h-9` (36px) | `px-4` | Uso geral |
|
|
54
|
+
| `lg` | `h-10` (40px) | `px-6` | CTAs, ações principais |
|
|
55
|
+
| `xl` | `h-12` (48px) | `px-8` | Destaque com mais presença |
|
|
56
|
+
| `2xl` | `h-[60px]` (60px) | `px-10` | CTA extra grande |
|
|
57
|
+
| `icon` | `size-9` (36px) | - | Apenas ícone |
|
|
58
|
+
| `icon-sm` | `size-8` (32px) | - | Ícone compacto |
|
|
59
|
+
| `icon-lg` | `size-10` (40px) | - | Ícone grande |
|
|
60
|
+
| `icon-xl` | `size-12` (48px) | - | Ícone extra grande |
|
|
61
|
+
| `icon-2xl` | `size-[60px]` (60px) | - | Ícone mega |
|
|
62
|
+
|
|
63
|
+
### Estados
|
|
64
|
+
|
|
65
|
+
| Estado | Classes/Atributos | Comportamento |
|
|
66
|
+
| -------- | ---------------------------------- | ----------------------------------------------------------------------------------------------------------- |
|
|
67
|
+
| Default | - | Aparência base |
|
|
68
|
+
| Hover | `hover:bg-*/90` | Leve escurecimento |
|
|
69
|
+
| Focus | `focus-visible:ring-4` | Ring de 4px com `ring-button-ring-brand` (z-index: 10) |
|
|
70
|
+
| Loading | `data-loading`, `aria-busy="true"` | Spinner centralizado, preserva largura original (sem layout shift), `aria-label` automático se texto oculto |
|
|
71
|
+
| Disabled | `disabled:opacity-50` | 50% opacidade, sem pointer events (previne clique em links) |
|
|
72
|
+
| Invalid | `aria-invalid:ring-destructive/20` | Ring vermelho |
|
|
73
|
+
|
|
74
|
+
### Tokens Utilizados
|
|
75
|
+
|
|
76
|
+
O Button utiliza tokens de componente específicos definidos em `@etus/tokens`. Os tokens seguem a convenção:
|
|
77
|
+
|
|
78
|
+
```
|
|
79
|
+
--button-{variant}-{property}-{state}
|
|
80
|
+
--button-size-{size}-{property}
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
#### Tokens de Variante (Cores)
|
|
84
|
+
|
|
85
|
+
```css
|
|
86
|
+
/* Primary */
|
|
87
|
+
--button-primary-bg-DEFAULT /* Fundo padrão */
|
|
88
|
+
--button-primary-bg-hover /* Fundo no hover */
|
|
89
|
+
--button-primary-fg-DEFAULT /* Texto padrão */
|
|
90
|
+
--button-primary-border-DEFAULT /* Borda padrão */
|
|
91
|
+
--button-primary-border-hover /* Borda no hover */
|
|
92
|
+
|
|
93
|
+
/* Secondary Gray */
|
|
94
|
+
--button-secondary-gray-bg-DEFAULT
|
|
95
|
+
--button-secondary-gray-bg-hover
|
|
96
|
+
--button-secondary-gray-fg-DEFAULT
|
|
97
|
+
--button-secondary-gray-fg-hover
|
|
98
|
+
--button-secondary-gray-border-DEFAULT
|
|
99
|
+
--button-secondary-gray-border-hover
|
|
100
|
+
|
|
101
|
+
/* Secondary Color */
|
|
102
|
+
--button-secondary-color-bg-DEFAULT
|
|
103
|
+
--button-secondary-color-bg-hover
|
|
104
|
+
--button-secondary-color-fg-DEFAULT
|
|
105
|
+
--button-secondary-color-fg-hover
|
|
106
|
+
--button-secondary-color-border-DEFAULT
|
|
107
|
+
--button-secondary-color-border-hover
|
|
108
|
+
|
|
109
|
+
/* Tertiary Gray/Color */
|
|
110
|
+
--button-tertiary-gray-fg-DEFAULT
|
|
111
|
+
--button-tertiary-gray-fg-hover
|
|
112
|
+
--button-tertiary-gray-bg-hover
|
|
113
|
+
--button-tertiary-color-fg-DEFAULT
|
|
114
|
+
--button-tertiary-color-fg-hover
|
|
115
|
+
--button-tertiary-color-bg-hover
|
|
116
|
+
|
|
117
|
+
/* Link Gray/Color */
|
|
118
|
+
--button-link-gray-fg-DEFAULT
|
|
119
|
+
--button-link-gray-fg-hover
|
|
120
|
+
--button-link-color-fg-DEFAULT
|
|
121
|
+
--button-link-color-fg-hover
|
|
122
|
+
|
|
123
|
+
/* Disabled */
|
|
124
|
+
--button-disabled-bg
|
|
125
|
+
--button-disabled-fg
|
|
126
|
+
--button-disabled-border
|
|
127
|
+
|
|
128
|
+
/* Focus Ring */
|
|
129
|
+
--button-ring-brand
|
|
130
|
+
--button-ring-gray
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
#### Tokens de Tamanho (Dimensões)
|
|
134
|
+
|
|
135
|
+
```css
|
|
136
|
+
/* Default (36px) */
|
|
137
|
+
--button-size-default-h /* Altura */
|
|
138
|
+
--button-size-default-px /* Padding horizontal */
|
|
139
|
+
--button-size-default-py /* Padding vertical */
|
|
140
|
+
--button-size-default-text /* Font size */
|
|
141
|
+
--button-size-default-leading /* Line height */
|
|
142
|
+
--button-size-default-gap /* Gap entre elementos */
|
|
143
|
+
|
|
144
|
+
/* Small, Large, XL, 2XL seguem o mesmo padrão */
|
|
145
|
+
--button-size-sm-*
|
|
146
|
+
--button-size-lg-*
|
|
147
|
+
--button-size-xl-*
|
|
148
|
+
--button-size-2xl-*
|
|
149
|
+
|
|
150
|
+
/* Icon sizes */
|
|
151
|
+
--button-size-icon-size /* 36px */
|
|
152
|
+
--button-size-icon-sm-size /* 32px */
|
|
153
|
+
--button-size-icon-lg-size /* 40px */
|
|
154
|
+
--button-size-icon-xl-size /* 48px */
|
|
155
|
+
--button-size-icon-2xl-size /* 60px */
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
#### Outros Tokens
|
|
159
|
+
|
|
160
|
+
```css
|
|
161
|
+
/* Radius */
|
|
162
|
+
--button-radius-default
|
|
163
|
+
|
|
164
|
+
/* Sombras */
|
|
165
|
+
--button-box-shadow-default
|
|
166
|
+
--button-box-shadow-xs
|
|
167
|
+
|
|
168
|
+
/* Transições (globais) */
|
|
169
|
+
--duration-fast
|
|
170
|
+
--easing-default
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
---
|
|
174
|
+
|
|
175
|
+
## Padrão de Tokens com Tailwind v4
|
|
176
|
+
|
|
177
|
+
Esta seção documenta como usar tokens CSS com Tailwind CSS v4 e CVA (Class Variance Authority). Este padrão é fundamental para manter consistência no design system.
|
|
178
|
+
|
|
179
|
+
### Sintaxe de Valores Arbitrários
|
|
180
|
+
|
|
181
|
+
Tailwind v4 usa **arbitrary values** com **type hints** para interpretar corretamente os tokens CSS:
|
|
182
|
+
|
|
183
|
+
| Tipo de Token | Sintaxe Tailwind | Exemplo |
|
|
184
|
+
| ------------- | ---------------------------- | ----------------------------------------------- |
|
|
185
|
+
| **Cores** | `bg-[color:var(--token)]` | `bg-[color:var(--button-primary-bg-DEFAULT)]` |
|
|
186
|
+
| **Dimensões** | `h-[var(--token)]` | `h-[var(--button-size-default-h)]` |
|
|
187
|
+
| **Font Size** | `text-[length:var(--token)]` | `text-[length:var(--button-size-default-text)]` |
|
|
188
|
+
| **Sombras** | `shadow-[var(--token)]` | `shadow-[var(--button-box-shadow-default)]` |
|
|
189
|
+
| **Duração** | `duration-[var(--token)]` | `duration-[var(--duration-fast)]` |
|
|
190
|
+
| **Easing** | `ease-[var(--token)]` | `ease-[var(--easing-default)]` |
|
|
191
|
+
|
|
192
|
+
### Por que usar Type Hints?
|
|
193
|
+
|
|
194
|
+
Os tokens do ETUS usam **OKLCH** como espaço de cor. O Tailwind precisa do type hint `color:` para interpretar corretamente:
|
|
195
|
+
|
|
196
|
+
```tsx
|
|
197
|
+
// ✅ CORRETO - Tailwind interpreta como cor
|
|
198
|
+
bg-[color:var(--button-primary-bg-DEFAULT)]
|
|
199
|
+
|
|
200
|
+
// ❌ INCORRETO - Tailwind não sabe o tipo
|
|
201
|
+
bg-[var(--button-primary-bg-DEFAULT)]
|
|
202
|
+
|
|
203
|
+
// ❌ INCORRETO - Tokens OKLCH não são HSL
|
|
204
|
+
bg-[hsl(var(--button-primary-bg-DEFAULT))]
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
### Exemplo Completo de CVA
|
|
208
|
+
|
|
209
|
+
```tsx
|
|
210
|
+
const buttonVariants = cva(
|
|
211
|
+
// Base styles com tokens globais
|
|
212
|
+
"inline-flex items-center justify-center rounded-[var(--button-radius-default)] font-medium transition-all duration-[var(--duration-fast)] ease-[var(--easing-default)]",
|
|
213
|
+
{
|
|
214
|
+
variants: {
|
|
215
|
+
variant: {
|
|
216
|
+
// Cores: sempre usar color: para bg, text, border
|
|
217
|
+
primary:
|
|
218
|
+
"bg-[color:var(--button-primary-bg-DEFAULT)] text-[color:var(--button-primary-fg-DEFAULT)] border-[color:var(--button-primary-border-DEFAULT)] hover:bg-[color:var(--button-primary-bg-hover)]",
|
|
219
|
+
},
|
|
220
|
+
size: {
|
|
221
|
+
// Dimensões: h e px não precisam de type hint
|
|
222
|
+
// Font size: PRECISA de length: para evitar conflito com text-color
|
|
223
|
+
default:
|
|
224
|
+
"h-[var(--button-size-default-h)] px-[var(--button-size-default-px)] text-[length:var(--button-size-default-text)]",
|
|
225
|
+
},
|
|
226
|
+
},
|
|
227
|
+
},
|
|
228
|
+
);
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
### Regras Importantes
|
|
232
|
+
|
|
233
|
+
1. **Cores (`bg-`, `text-color`, `border-`)**: Sempre usar `color:var(--token)`
|
|
234
|
+
2. **Font Size (`text-size`)**: Sempre usar `length:var(--token)` para distinguir de cores
|
|
235
|
+
3. **Dimensões (`h-`, `w-`, `px-`, `py-`)**: Não precisa de type hint
|
|
236
|
+
4. **Sombras (`shadow-`)**: Não precisa de type hint
|
|
237
|
+
5. **NUNCA usar `hsl()`**: Os tokens OKLCH são valores completos
|
|
238
|
+
|
|
239
|
+
### Estados com Tokens
|
|
240
|
+
|
|
241
|
+
```tsx
|
|
242
|
+
// Hover
|
|
243
|
+
hover:bg-[color:var(--button-primary-bg-hover)]
|
|
244
|
+
hover:border-[color:var(--button-primary-border-hover)]
|
|
245
|
+
|
|
246
|
+
// Disabled
|
|
247
|
+
disabled:bg-[color:var(--button-disabled-bg)]
|
|
248
|
+
disabled:text-[color:var(--button-disabled-fg)]
|
|
249
|
+
|
|
250
|
+
// Focus
|
|
251
|
+
focus-visible:ring-[color:var(--button-ring-brand)]
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
### Configuração do Tailwind v4
|
|
255
|
+
|
|
256
|
+
Para que os tokens funcionem, o arquivo CSS do app deve incluir a diretiva `@source`:
|
|
257
|
+
|
|
258
|
+
```css
|
|
259
|
+
/* index.css */
|
|
260
|
+
@import "tailwindcss";
|
|
261
|
+
@import "@etus/tokens/styles/tokens.css";
|
|
262
|
+
|
|
263
|
+
/* IMPORTANTE: Incluir .ts para escanear definições de CVA */
|
|
264
|
+
@source "../../../packages/ui/src/**/*.{ts,tsx}";
|
|
265
|
+
```
|
|
266
|
+
|
|
267
|
+
### data-slot
|
|
268
|
+
|
|
269
|
+
```html
|
|
270
|
+
<button data-slot="button">...</button>
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
---
|
|
274
|
+
|
|
275
|
+
## API
|
|
276
|
+
|
|
277
|
+
### Props
|
|
278
|
+
|
|
279
|
+
| Prop | Tipo | Padrão | Descrição |
|
|
280
|
+
| ------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------- | --------------------------------------------------- |
|
|
281
|
+
| `variant` | `"default" \| "primary" \| "secondary" \| "secondary-gray" \| "secondary-color" \| "tertiary" \| "tertiary-gray" \| "tertiary-color" \| "destructive" \| "outline" \| "dashed" \| "ghost" \| "link" \| "link-gray" \| "link-color" \| "unstyled" \| "success" \| "warning"` | `"default"` | Estilo visual do botão |
|
|
282
|
+
| `tone` | `"gray" \| "color"` | - | Atalho para variantes `secondary`/`tertiary`/`link` |
|
|
283
|
+
| `size` | `"default" \| "sm" \| "lg" \| "xl" \| "2xl" \| "icon" \| "icon-sm" \| "icon-lg" \| "icon-xl" \| "icon-2xl"` | `"default"` | Tamanho do botão |
|
|
284
|
+
| `asChild` | `boolean` | `false` | Renderiza children como elemento (polimorfismo) |
|
|
285
|
+
| `loading` | `boolean` | `false` | Mostra spinner e desabilita interações |
|
|
286
|
+
| `loadingText` | `string` | - | Texto alternativo durante loading |
|
|
287
|
+
| `leftIcon` | `ReactNode` | - | Ícone à esquerda do texto |
|
|
288
|
+
| `rightIcon` | `ReactNode` | - | Ícone à direita do texto |
|
|
289
|
+
| `className` | `string` | - | Classes CSS adicionais |
|
|
290
|
+
| `disabled` | `boolean` | `false` | Desabilita o botão |
|
|
291
|
+
| `type` | `"button" \| "submit" \| "reset"` | `"submit"` | Tipo do botão HTML |
|
|
292
|
+
| `children` | `ReactNode` | - | Conteúdo do botão |
|
|
293
|
+
| `ref` | `Ref<HTMLButtonElement>` | - | Referência ao elemento DOM |
|
|
294
|
+
|
|
295
|
+
> Herda todas as props de `React.ComponentProps<"button">`
|
|
296
|
+
|
|
297
|
+
### Callbacks
|
|
298
|
+
|
|
299
|
+
Todos os callbacks recebem o evento nativo e um `ButtonEventPayload` com metadados úteis:
|
|
300
|
+
|
|
301
|
+
| Callback | Tipo | Descrição |
|
|
302
|
+
| ----------- | ------------------------------------------------------------- | ----------------------------- |
|
|
303
|
+
| `onClick` | `(event: MouseEvent, payload: ButtonEventPayload) => void` | Disparado ao clicar |
|
|
304
|
+
| `onFocus` | `(event: FocusEvent, payload: ButtonEventPayload) => void` | Disparado ao receber foco |
|
|
305
|
+
| `onBlur` | `(event: FocusEvent, payload: ButtonEventPayload) => void` | Disparado ao perder foco |
|
|
306
|
+
| `onKeyDown` | `(event: KeyboardEvent, payload: ButtonEventPayload) => void` | Disparado ao pressionar tecla |
|
|
307
|
+
|
|
308
|
+
#### ButtonEventPayload
|
|
309
|
+
|
|
310
|
+
```typescript
|
|
311
|
+
interface ButtonEventPayload {
|
|
312
|
+
id?: string; // Valor de data-id
|
|
313
|
+
timestamp: number; // Date.now() do momento do evento
|
|
314
|
+
isLoading?: boolean; // Estado de loading no momento do evento
|
|
315
|
+
}
|
|
316
|
+
```
|
|
317
|
+
|
|
318
|
+
### TypeScript
|
|
319
|
+
|
|
320
|
+
```typescript
|
|
321
|
+
import type {
|
|
322
|
+
ButtonProps,
|
|
323
|
+
ButtonVariant,
|
|
324
|
+
ButtonSize,
|
|
325
|
+
ButtonEventPayload,
|
|
326
|
+
} from "@etus/ui";
|
|
327
|
+
|
|
328
|
+
// ButtonProps inclui:
|
|
329
|
+
interface ButtonProps {
|
|
330
|
+
variant?: ButtonVariant;
|
|
331
|
+
tone?: "gray" | "color";
|
|
332
|
+
size?: ButtonSize;
|
|
333
|
+
asChild?: boolean;
|
|
334
|
+
loading?: boolean;
|
|
335
|
+
loadingText?: string;
|
|
336
|
+
leftIcon?: ReactNode;
|
|
337
|
+
rightIcon?: ReactNode;
|
|
338
|
+
"data-id"?: string;
|
|
339
|
+
// ... + todas as props de <button>
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
// Tipos derivados
|
|
343
|
+
type ButtonVariant =
|
|
344
|
+
| "default"
|
|
345
|
+
| "primary"
|
|
346
|
+
| "secondary"
|
|
347
|
+
| "secondary-gray"
|
|
348
|
+
| "secondary-color"
|
|
349
|
+
| "tertiary"
|
|
350
|
+
| "tertiary-gray"
|
|
351
|
+
| "tertiary-color"
|
|
352
|
+
| "destructive"
|
|
353
|
+
| "outline"
|
|
354
|
+
| "ghost"
|
|
355
|
+
| "link"
|
|
356
|
+
| "link-gray"
|
|
357
|
+
| "link-color"
|
|
358
|
+
| "success"
|
|
359
|
+
| "warning";
|
|
360
|
+
type ButtonSize =
|
|
361
|
+
| "default"
|
|
362
|
+
| "sm"
|
|
363
|
+
| "lg"
|
|
364
|
+
| "xl"
|
|
365
|
+
| "2xl"
|
|
366
|
+
| "icon"
|
|
367
|
+
| "icon-sm"
|
|
368
|
+
| "icon-lg"
|
|
369
|
+
| "icon-xl"
|
|
370
|
+
| "icon-2xl";
|
|
371
|
+
|
|
372
|
+
// Payload de eventos
|
|
373
|
+
interface ButtonEventPayload {
|
|
374
|
+
id?: string;
|
|
375
|
+
timestamp: number;
|
|
376
|
+
isLoading?: boolean;
|
|
377
|
+
}
|
|
378
|
+
```
|
|
379
|
+
|
|
380
|
+
### Comparativo com Design Systems de Referência
|
|
381
|
+
|
|
382
|
+
#### Matriz de Features (12 Design Systems)
|
|
383
|
+
|
|
384
|
+
| Feature | ETUS | Shadcn | Radix | Chakra | MUI | Mantine | AntD | NextUI | Headless | Ariakit | Fluent | Carbon |
|
|
385
|
+
| --------------------- | :--: | :----: | :---: | :----: | :-: | :-----: | :--: | :----: | :------: | :-----: | :----: | :----: |
|
|
386
|
+
| **Variantes** | 16 | 6 | - | 6 | 3 | 7 | 5 | 4 | - | - | 6 | 4 |
|
|
387
|
+
| **Tamanhos** | 10 | 4 | - | 4 | 3 | 5 | 4 | 4 | - | - | 4 | 4 |
|
|
388
|
+
| **CVA/cva** | ✓ | ✓ | - | - | - | - | - | ✓ | - | - | - | - |
|
|
389
|
+
| **asChild/Slot** | ✓ | ✓ | ✓ | - | - | - | - | ✓ | ✓ | ✓ | - | - |
|
|
390
|
+
| **loading** | ✓ | - | - | ✓ | ✓ | ✓ | ✓ | ✓ | - | - | ✓ | ✓ |
|
|
391
|
+
| **leftIcon** | ✓ | - | - | ✓ | ✓ | ✓ | ✓ | ✓ | - | - | ✓ | ✓ |
|
|
392
|
+
| **rightIcon** | ✓ | - | - | ✓ | ✓ | ✓ | ✓ | ✓ | - | - | ✓ | - |
|
|
393
|
+
| **fullWidth** | - | - | - | ✓ | ✓ | ✓ | ✓ | ✓ | - | - | - | - |
|
|
394
|
+
| **data-slot** | ✓ | ✓ | - | - | - | - | - | ✓ | - | - | - | - |
|
|
395
|
+
| **Compound variants** | ✓ | ✓ | - | - | - | - | - | ✓ | - | - | - | - |
|
|
396
|
+
| **ButtonGroup** | - | - | - | ✓ | ✓ | ✓ | ✓ | ✓ | - | - | ✓ | ✓ |
|
|
397
|
+
| **Tooltip built-in** | - | - | - | - | - | - | ✓ | ✓ | - | - | - | ✓ |
|
|
398
|
+
| **Ripple effect** | - | - | - | - | ✓ | - | - | ✓ | - | - | ✓ | - |
|
|
399
|
+
|
|
400
|
+
#### Comparativo de Variantes por Design System
|
|
401
|
+
|
|
402
|
+
| Design System | Variantes Disponíveis |
|
|
403
|
+
| -------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
404
|
+
| **ETUS** | `default`, `primary`, `secondary`, `secondary-gray/color`, `tertiary-gray/color`, `destructive`, `outline`, `ghost`, `link`, `link-gray/color`, `success`, `warning` |
|
|
405
|
+
| **Shadcn/ui** | `default`, `secondary`, `destructive`, `outline`, `ghost`, `link` |
|
|
406
|
+
| **Chakra UI** | `solid`, `outline`, `ghost`, `link`, `unstyled` + colorScheme |
|
|
407
|
+
| **MUI** | `contained`, `outlined`, `text` + color |
|
|
408
|
+
| **Mantine** | `filled`, `outline`, `light`, `subtle`, `default`, `transparent`, `white` |
|
|
409
|
+
| **Ant Design** | `primary`, `default`, `dashed`, `text`, `link` |
|
|
410
|
+
| **NextUI** | `solid`, `bordered`, `light`, `flat`, `faded`, `shadow`, `ghost` |
|
|
411
|
+
| **Fluent UI** | `primary`, `secondary`, `outline`, `subtle`, `transparent` |
|
|
412
|
+
| **Carbon** | `primary`, `secondary`, `tertiary`, `ghost`, `danger` |
|
|
413
|
+
|
|
414
|
+
#### Comparativo de Props por Design System
|
|
415
|
+
|
|
416
|
+
| Prop | ETUS | Chakra | MUI | Mantine | AntD | NextUI | Fluent |
|
|
417
|
+
| ------------------ | :--: | :----------: | :---------------: | :--------------: | :-------: | :----------------: | :----------: |
|
|
418
|
+
| `variant` | ✓ | ✓ | ✓ | ✓ | `type` | ✓ | `appearance` |
|
|
419
|
+
| `size` | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
|
420
|
+
| `disabled` | ✓ | `isDisabled` | ✓ | ✓ | ✓ | `isDisabled` | ✓ |
|
|
421
|
+
| `loading` | ✓ | `isLoading` | `loading` | `loading` | `loading` | `isLoading` | - |
|
|
422
|
+
| `loadingText` | ✓ | ✓ | - | `loaderProps` | - | - | - |
|
|
423
|
+
| `spinnerPlacement` | - | ✓ | `loadingPosition` | `loaderPosition` | - | `spinnerPlacement` | - |
|
|
424
|
+
| `leftIcon` | ✓ | ✓ | `startIcon` | `leftSection` | `icon` | `startContent` | `icon` |
|
|
425
|
+
| `rightIcon` | ✓ | ✓ | `endIcon` | `rightSection` | - | `endContent` | - |
|
|
426
|
+
| `fullWidth` | - | ✓ | `fullWidth` | `fullWidth` | `block` | `fullWidth` | - |
|
|
427
|
+
| `colorScheme` | - | ✓ | `color` | `color` | - | `color` | - |
|
|
428
|
+
| `radius` | - | - | - | ✓ | `shape` | ✓ | `shape` |
|
|
429
|
+
| `compact` | - | - | - | ✓ | - | - | - |
|
|
430
|
+
| `gradient` | - | - | - | ✓ | - | - | - |
|
|
431
|
+
| `asChild`/`as` | ✓ | `as` | `component` | `component` | - | `as` | `as` |
|
|
432
|
+
| `href` | - | - | `href` | - | `href` | `href` | `href` |
|
|
433
|
+
|
|
434
|
+
#### Análise por Categoria
|
|
435
|
+
|
|
436
|
+
**Headless/Primitivos (máxima flexibilidade):**
|
|
437
|
+
|
|
438
|
+
- **Radix UI** - Apenas Slot, sem estilos
|
|
439
|
+
- **Headless UI** - Renderless, focado em a11y
|
|
440
|
+
- **Ariakit** - Primitivos com hooks, máxima composabilidade
|
|
441
|
+
- **React Aria** - Hooks de comportamento, sem UI
|
|
442
|
+
|
|
443
|
+
**Styled/Opinionated (produtividade):**
|
|
444
|
+
|
|
445
|
+
- **Chakra UI** - Style props, colorScheme, muito ergonômico
|
|
446
|
+
- **MUI** - Sistema de theme completo, sx prop
|
|
447
|
+
- **Mantine** - Moderno, muitos utilitários, excelente DX
|
|
448
|
+
- **Ant Design** - Enterprise, muito completo, ConfigProvider
|
|
449
|
+
|
|
450
|
+
**Hybrid (meio-termo):**
|
|
451
|
+
|
|
452
|
+
- **Shadcn/ui** - CVA + Tailwind, copiável
|
|
453
|
+
- **NextUI** - Tailwind + Framer Motion
|
|
454
|
+
- **ETUS** - CVA + Tailwind, baseado em Shadcn
|
|
455
|
+
|
|
456
|
+
**Enterprise/Legacy:**
|
|
457
|
+
|
|
458
|
+
- **Fluent UI** - Microsoft, tokens complexos
|
|
459
|
+
- **Carbon** - IBM, foco em data visualization
|
|
460
|
+
- **Blueprint** - Palantir, data-dense UIs
|
|
461
|
+
|
|
462
|
+
---
|
|
463
|
+
|
|
464
|
+
## Acessibilidade (A11y)
|
|
465
|
+
|
|
466
|
+
### ARIA Attributes
|
|
467
|
+
|
|
468
|
+
| Atributo | Uso |
|
|
469
|
+
| --------------- | ------------------------------------------ |
|
|
470
|
+
| `aria-disabled` | Quando `disabled={true}` |
|
|
471
|
+
| `aria-pressed` | Para toggle buttons |
|
|
472
|
+
| `aria-expanded` | Quando controla elemento expansível |
|
|
473
|
+
| `aria-haspopup` | Quando abre menu/dialog |
|
|
474
|
+
| `aria-label` | Quando não há texto visível (icon buttons) |
|
|
475
|
+
| `aria-invalid` | Validação de formulário |
|
|
476
|
+
|
|
477
|
+
### Suporte a Teclado
|
|
478
|
+
|
|
479
|
+
| Tecla | Ação |
|
|
480
|
+
| ------- | ----------------------- |
|
|
481
|
+
| `Tab` | Move foco para/do botão |
|
|
482
|
+
| `Enter` | Ativa o botão |
|
|
483
|
+
| `Space` | Ativa o botão |
|
|
484
|
+
|
|
485
|
+
### Focus Management
|
|
486
|
+
|
|
487
|
+
```tsx
|
|
488
|
+
// Focus visible apenas para navegação por teclado
|
|
489
|
+
focus-visible:border-ring
|
|
490
|
+
focus-visible:ring-ring/50
|
|
491
|
+
focus-visible:ring-[3px]
|
|
492
|
+
```
|
|
493
|
+
|
|
494
|
+
### Contraste de Cores
|
|
495
|
+
|
|
496
|
+
Todos os pares de cores seguem WCAG 2.1 AA (mínimo 4.5:1):
|
|
497
|
+
|
|
498
|
+
| Variante | Foreground | Background | Ratio |
|
|
499
|
+
| ----------- | ------------------------ | --------------- | ------- |
|
|
500
|
+
| default | `--primary-foreground` | `--primary` | ≥ 4.5:1 |
|
|
501
|
+
| secondary | `--secondary-foreground` | `--secondary` | ≥ 4.5:1 |
|
|
502
|
+
| destructive | white | `--destructive` | ≥ 4.5:1 |
|
|
503
|
+
|
|
504
|
+
### Screen Readers
|
|
505
|
+
|
|
506
|
+
- Usar `aria-label` para icon buttons
|
|
507
|
+
- Evitar "Click here" - usar texto descritivo
|
|
508
|
+
- Anunciar estado de loading se implementado
|
|
509
|
+
|
|
510
|
+
### Reduced Motion
|
|
511
|
+
|
|
512
|
+
```tsx
|
|
513
|
+
// Respeitar preferência do usuário
|
|
514
|
+
@media (prefers-reduced-motion: reduce) {
|
|
515
|
+
transition: none;
|
|
516
|
+
}
|
|
517
|
+
```
|
|
518
|
+
|
|
519
|
+
### Comparativo A11y (12 Design Systems)
|
|
520
|
+
|
|
521
|
+
| Feature | ETUS | React Aria | Radix | Ariakit | Headless | Chakra | MUI | Mantine | AntD | NextUI | Fluent | Carbon |
|
|
522
|
+
| ------------------------ | :--: | :--------: | :---: | :-----: | :------: | :----: | :-: | :-----: | :--: | :----: | :----: | :----: |
|
|
523
|
+
| **ARIA automático** | - | ✓ | ✓ | ✓ | ✓ | ~ | ~ | ~ | ~ | ~ | ✓ | ✓ |
|
|
524
|
+
| **Focus visible** | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
|
525
|
+
| **Focus trap** | - | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | - | ✓ | ✓ | ✓ |
|
|
526
|
+
| **Keyboard nav** | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
|
527
|
+
| **aria-disabled** | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | - | ✓ | ✓ | ✓ |
|
|
528
|
+
| **aria-busy** | - | ✓ | - | ✓ | - | ✓ | - | ✓ | - | ✓ | ✓ | ✓ |
|
|
529
|
+
| **aria-pressed** | - | ✓ | - | ✓ | ✓ | - | - | - | - | - | ✓ | - |
|
|
530
|
+
| **Reduced motion** | ~ | ✓ | - | - | - | ✓ | ✓ | ✓ | - | ✓ | ✓ | ✓ |
|
|
531
|
+
| **High contrast** | - | ✓ | - | - | - | - | - | - | - | - | ✓ | ✓ |
|
|
532
|
+
| **RTL support** | - | ✓ | - | - | - | ✓ | ✓ | ✓ | ✓ | - | ✓ | ✓ |
|
|
533
|
+
| **Screen reader tested** | - | ✓ | ✓ | ✓ | ✓ | ~ | ✓ | ~ | ~ | ~ | ✓ | ✓ |
|
|
534
|
+
|
|
535
|
+
**Legenda:** ✓ = Suporte completo | ~ = Parcial/Manual | - = Não suportado
|
|
536
|
+
|
|
537
|
+
#### Abordagens de Acessibilidade
|
|
538
|
+
|
|
539
|
+
| Design System | Abordagem | Nível WCAG | Notas |
|
|
540
|
+
| --------------- | --------------------- | ---------- | ----------------------------------------------- |
|
|
541
|
+
| **React Aria** | Hooks comportamentais | AAA | Padrão ouro, testado com leitores de tela reais |
|
|
542
|
+
| **Radix UI** | Primitivos acessíveis | AA | WAI-ARIA compliant, composable |
|
|
543
|
+
| **Ariakit** | Hooks + componentes | AA | Muito flexível, ótima documentação a11y |
|
|
544
|
+
| **Headless UI** | Renderless a11y | AA | Foco em estados e ARIA |
|
|
545
|
+
| **Fluent UI** | Built-in | AAA | Microsoft a11y guidelines, high contrast |
|
|
546
|
+
| **Carbon** | Built-in | AA | IBM Equal Access Toolkit |
|
|
547
|
+
| **MUI** | Built-in | AA | Boa base, customização via props |
|
|
548
|
+
| **Chakra UI** | Semi-automático | AA | `isDisabled` etc. mapeiam para ARIA |
|
|
549
|
+
| **Mantine** | Semi-automático | AA | Bom suporte básico |
|
|
550
|
+
| **Ant Design** | Manual | A-AA | Requer configuração adicional |
|
|
551
|
+
| **NextUI** | Baseado em React Aria | AA | Herda de React Aria |
|
|
552
|
+
| **ETUS** | Manual | AA | Baseado em Shadcn patterns |
|
|
553
|
+
|
|
554
|
+
---
|
|
555
|
+
|
|
556
|
+
## Exemplos
|
|
557
|
+
|
|
558
|
+
### Uso Básico
|
|
559
|
+
|
|
560
|
+
```tsx
|
|
561
|
+
import { Button } from "@etus/ui";
|
|
562
|
+
|
|
563
|
+
function Example() {
|
|
564
|
+
return <Button>Click me</Button>;
|
|
565
|
+
}
|
|
566
|
+
```
|
|
567
|
+
|
|
568
|
+
### Variantes
|
|
569
|
+
|
|
570
|
+
```tsx
|
|
571
|
+
<Button variant="default">Primary</Button>
|
|
572
|
+
<Button variant="primary">Primary (Figma)</Button>
|
|
573
|
+
<Button variant="secondary">Secondary</Button>
|
|
574
|
+
<Button variant="secondary" tone="gray">Secondary Gray</Button>
|
|
575
|
+
<Button variant="secondary" tone="color">Secondary Color</Button>
|
|
576
|
+
<Button variant="destructive">Delete</Button>
|
|
577
|
+
<Button variant="outline">Outline</Button>
|
|
578
|
+
<Button variant="ghost">Ghost</Button>
|
|
579
|
+
<Button variant="link">Link</Button>
|
|
580
|
+
<Button variant="link" tone="gray">Link Gray</Button>
|
|
581
|
+
<Button variant="link" tone="color">Link Color</Button>
|
|
582
|
+
<Button variant="dashed">Add New Item</Button>
|
|
583
|
+
<Button variant="unstyled">Clickable Unstyled Area</Button>
|
|
584
|
+
```
|
|
585
|
+
|
|
586
|
+
### Tamanhos
|
|
587
|
+
|
|
588
|
+
```tsx
|
|
589
|
+
<Button size="sm">Small</Button>
|
|
590
|
+
<Button size="default">Default</Button>
|
|
591
|
+
<Button size="lg">Large</Button>
|
|
592
|
+
<Button size="xl">Extra Large</Button>
|
|
593
|
+
<Button size="2xl">2XL</Button>
|
|
594
|
+
```
|
|
595
|
+
|
|
596
|
+
### Com Ícones
|
|
597
|
+
|
|
598
|
+
```tsx
|
|
599
|
+
import { Mail, ChevronRight } from "lucide-react"
|
|
600
|
+
|
|
601
|
+
// Ícone à esquerda (prop dedicada)
|
|
602
|
+
<Button leftIcon={<Mail />}>Send Email</Button>
|
|
603
|
+
|
|
604
|
+
// Ícone à direita (prop dedicada)
|
|
605
|
+
<Button rightIcon={<ChevronRight />}>Next</Button>
|
|
606
|
+
|
|
607
|
+
// Ambos os ícones
|
|
608
|
+
<Button leftIcon={<Mail />} rightIcon={<ChevronRight />}>
|
|
609
|
+
Action
|
|
610
|
+
</Button>
|
|
611
|
+
|
|
612
|
+
// Apenas ícone
|
|
613
|
+
<Button size="icon" aria-label="Send email">
|
|
614
|
+
<Mail />
|
|
615
|
+
</Button>
|
|
616
|
+
|
|
617
|
+
// Apenas ícone (extra grande)
|
|
618
|
+
<Button size="icon-xl" aria-label="Send email">
|
|
619
|
+
<Mail />
|
|
620
|
+
</Button>
|
|
621
|
+
|
|
622
|
+
// Apenas ícone (2XL)
|
|
623
|
+
<Button size="icon-2xl" aria-label="Send email">
|
|
624
|
+
<Mail />
|
|
625
|
+
</Button>
|
|
626
|
+
|
|
627
|
+
// Composição manual ainda funciona
|
|
628
|
+
<Button>
|
|
629
|
+
<Mail />
|
|
630
|
+
Send Email
|
|
631
|
+
</Button>
|
|
632
|
+
```
|
|
633
|
+
|
|
634
|
+
### Polimorfismo com asChild
|
|
635
|
+
|
|
636
|
+
```tsx
|
|
637
|
+
import { Link } from "@tanstack/react-router"
|
|
638
|
+
|
|
639
|
+
// Renderiza como Link mantendo estilos do Button
|
|
640
|
+
<Button asChild>
|
|
641
|
+
<Link to="/dashboard">Go to Dashboard</Link>
|
|
642
|
+
</Button>
|
|
643
|
+
|
|
644
|
+
// Com elemento anchor
|
|
645
|
+
<Button asChild variant="link">
|
|
646
|
+
<a href="https://example.com" target="_blank" rel="noopener">
|
|
647
|
+
External Link
|
|
648
|
+
</a>
|
|
649
|
+
</Button>
|
|
650
|
+
```
|
|
651
|
+
|
|
652
|
+
### Estados
|
|
653
|
+
|
|
654
|
+
```tsx
|
|
655
|
+
// Disabled
|
|
656
|
+
<Button disabled>Disabled</Button>
|
|
657
|
+
|
|
658
|
+
// Form submit
|
|
659
|
+
<Button type="submit">Submit Form</Button>
|
|
660
|
+
|
|
661
|
+
// Loading state (built-in)
|
|
662
|
+
<Button loading>Saving...</Button>
|
|
663
|
+
|
|
664
|
+
// Loading com texto alternativo
|
|
665
|
+
<Button loading loadingText="Processing...">Submit</Button>
|
|
666
|
+
```
|
|
667
|
+
|
|
668
|
+
### Callbacks com Payload
|
|
669
|
+
|
|
670
|
+
```tsx
|
|
671
|
+
import type { ButtonEventPayload } from "@etus/ui";
|
|
672
|
+
|
|
673
|
+
function Example() {
|
|
674
|
+
const handleClick = (
|
|
675
|
+
e: React.MouseEvent<HTMLButtonElement>,
|
|
676
|
+
payload: ButtonEventPayload,
|
|
677
|
+
) => {
|
|
678
|
+
console.log("Clicked!", {
|
|
679
|
+
buttonId: payload.id,
|
|
680
|
+
at: new Date(payload.timestamp),
|
|
681
|
+
wasLoading: payload.isLoading,
|
|
682
|
+
});
|
|
683
|
+
};
|
|
684
|
+
|
|
685
|
+
return (
|
|
686
|
+
<Button
|
|
687
|
+
data-id="submit-btn"
|
|
688
|
+
onClick={handleClick}
|
|
689
|
+
onFocus={(e, payload) => console.log("Focused", payload.id)}
|
|
690
|
+
>
|
|
691
|
+
Interactive Button
|
|
692
|
+
</Button>
|
|
693
|
+
);
|
|
694
|
+
}
|
|
695
|
+
```
|
|
696
|
+
|
|
697
|
+
### Responsividade
|
|
698
|
+
|
|
699
|
+
```tsx
|
|
700
|
+
// Tamanho responsivo via className
|
|
701
|
+
<Button className="h-8 px-3 md:h-9 md:px-4 lg:h-10 lg:px-6">
|
|
702
|
+
Responsive
|
|
703
|
+
</Button>
|
|
704
|
+
|
|
705
|
+
// Full width em mobile
|
|
706
|
+
<Button className="w-full sm:w-auto">
|
|
707
|
+
Submit
|
|
708
|
+
</Button>
|
|
709
|
+
```
|
|
710
|
+
|
|
711
|
+
### Com Container Queries
|
|
712
|
+
|
|
713
|
+
```tsx
|
|
714
|
+
<div className="@container">
|
|
715
|
+
<Button className="@sm:size-lg @md:w-auto w-full">Container Aware</Button>
|
|
716
|
+
</div>
|
|
717
|
+
```
|
|
718
|
+
|
|
719
|
+
### Composição com Formulário
|
|
720
|
+
|
|
721
|
+
```tsx
|
|
722
|
+
import { useForm } from "react-hook-form";
|
|
723
|
+
|
|
724
|
+
function ContactForm() {
|
|
725
|
+
const { handleSubmit, formState } = useForm();
|
|
726
|
+
const { isSubmitting } = formState;
|
|
727
|
+
|
|
728
|
+
return (
|
|
729
|
+
<form onSubmit={handleSubmit(onSubmit)}>
|
|
730
|
+
{/* campos... */}
|
|
731
|
+
<Button type="submit" disabled={isSubmitting}>
|
|
732
|
+
{isSubmitting ? (
|
|
733
|
+
<>
|
|
734
|
+
<Loader2 className="animate-spin" />
|
|
735
|
+
Sending...
|
|
736
|
+
</>
|
|
737
|
+
) : (
|
|
738
|
+
"Send Message"
|
|
739
|
+
)}
|
|
740
|
+
</Button>
|
|
741
|
+
</form>
|
|
742
|
+
);
|
|
743
|
+
}
|
|
744
|
+
```
|
|
745
|
+
|
|
746
|
+
---
|
|
747
|
+
|
|
748
|
+
## Testes
|
|
749
|
+
|
|
750
|
+
### Testes Unitários
|
|
751
|
+
|
|
752
|
+
```tsx
|
|
753
|
+
// Button.test.tsx
|
|
754
|
+
import { render, screen } from "@testing-library/react";
|
|
755
|
+
import userEvent from "@testing-library/user-event";
|
|
756
|
+
import { describe, expect, it, vi } from "vitest";
|
|
757
|
+
import { Button } from "./Button";
|
|
758
|
+
|
|
759
|
+
describe("Button", () => {
|
|
760
|
+
it("renders children correctly", () => {
|
|
761
|
+
render(<Button>Click me</Button>);
|
|
762
|
+
expect(
|
|
763
|
+
screen.getByRole("button", { name: "Click me" }),
|
|
764
|
+
).toBeInTheDocument();
|
|
765
|
+
});
|
|
766
|
+
|
|
767
|
+
it("applies variant classes", () => {
|
|
768
|
+
render(<Button variant="destructive">Delete</Button>);
|
|
769
|
+
expect(screen.getByRole("button")).toHaveClass("bg-destructive");
|
|
770
|
+
});
|
|
771
|
+
|
|
772
|
+
it("applies size classes", () => {
|
|
773
|
+
render(<Button size="lg">Large</Button>);
|
|
774
|
+
expect(screen.getByRole("button")).toHaveClass("h-10");
|
|
775
|
+
});
|
|
776
|
+
|
|
777
|
+
it("merges custom className", () => {
|
|
778
|
+
render(<Button className="custom-class">Test</Button>);
|
|
779
|
+
expect(screen.getByRole("button")).toHaveClass("custom-class");
|
|
780
|
+
});
|
|
781
|
+
|
|
782
|
+
it("has data-slot attribute", () => {
|
|
783
|
+
render(<Button>Test</Button>);
|
|
784
|
+
expect(screen.getByRole("button")).toHaveAttribute("data-slot", "button");
|
|
785
|
+
});
|
|
786
|
+
});
|
|
787
|
+
```
|
|
788
|
+
|
|
789
|
+
### Testes de Interação
|
|
790
|
+
|
|
791
|
+
```tsx
|
|
792
|
+
describe("Button interactions", () => {
|
|
793
|
+
it("calls onClick with event and payload", async () => {
|
|
794
|
+
const user = userEvent.setup();
|
|
795
|
+
const handleClick = vi.fn();
|
|
796
|
+
|
|
797
|
+
render(
|
|
798
|
+
<Button onClick={handleClick} data-id="test-btn">
|
|
799
|
+
Click
|
|
800
|
+
</Button>,
|
|
801
|
+
);
|
|
802
|
+
await user.click(screen.getByRole("button"));
|
|
803
|
+
|
|
804
|
+
expect(handleClick).toHaveBeenCalledWith(
|
|
805
|
+
expect.any(Object), // MouseEvent
|
|
806
|
+
expect.objectContaining({
|
|
807
|
+
id: "test-btn",
|
|
808
|
+
timestamp: expect.any(Number),
|
|
809
|
+
isLoading: false,
|
|
810
|
+
}),
|
|
811
|
+
);
|
|
812
|
+
});
|
|
813
|
+
|
|
814
|
+
it("does not call onClick when disabled", async () => {
|
|
815
|
+
const user = userEvent.setup();
|
|
816
|
+
const handleClick = vi.fn();
|
|
817
|
+
|
|
818
|
+
render(
|
|
819
|
+
<Button onClick={handleClick} disabled>
|
|
820
|
+
Click
|
|
821
|
+
</Button>,
|
|
822
|
+
);
|
|
823
|
+
await user.click(screen.getByRole("button"));
|
|
824
|
+
|
|
825
|
+
expect(handleClick).not.toHaveBeenCalled();
|
|
826
|
+
});
|
|
827
|
+
|
|
828
|
+
it("can be activated with keyboard", async () => {
|
|
829
|
+
const user = userEvent.setup();
|
|
830
|
+
const handleClick = vi.fn();
|
|
831
|
+
|
|
832
|
+
render(<Button onClick={handleClick}>Click</Button>);
|
|
833
|
+
screen.getByRole("button").focus();
|
|
834
|
+
await user.keyboard("{Enter}");
|
|
835
|
+
|
|
836
|
+
expect(handleClick).toHaveBeenCalledTimes(1);
|
|
837
|
+
});
|
|
838
|
+
});
|
|
839
|
+
```
|
|
840
|
+
|
|
841
|
+
### Testes de Acessibilidade
|
|
842
|
+
|
|
843
|
+
```tsx
|
|
844
|
+
import { axe, toHaveNoViolations } from "jest-axe";
|
|
845
|
+
|
|
846
|
+
expect.extend(toHaveNoViolations);
|
|
847
|
+
|
|
848
|
+
describe("Button accessibility", () => {
|
|
849
|
+
it("has no accessibility violations", async () => {
|
|
850
|
+
const { container } = render(<Button>Accessible</Button>);
|
|
851
|
+
const results = await axe(container);
|
|
852
|
+
expect(results).toHaveNoViolations();
|
|
853
|
+
});
|
|
854
|
+
|
|
855
|
+
it("icon button requires aria-label", async () => {
|
|
856
|
+
const { container } = render(
|
|
857
|
+
<Button size="icon" aria-label="Close dialog">
|
|
858
|
+
<X />
|
|
859
|
+
</Button>,
|
|
860
|
+
);
|
|
861
|
+
const results = await axe(container);
|
|
862
|
+
expect(results).toHaveNoViolations();
|
|
863
|
+
});
|
|
864
|
+
|
|
865
|
+
it("is focusable", () => {
|
|
866
|
+
render(<Button>Focus me</Button>);
|
|
867
|
+
const button = screen.getByRole("button");
|
|
868
|
+
button.focus();
|
|
869
|
+
expect(button).toHaveFocus();
|
|
870
|
+
});
|
|
871
|
+
|
|
872
|
+
it("is not focusable when disabled", () => {
|
|
873
|
+
render(<Button disabled>Disabled</Button>);
|
|
874
|
+
expect(screen.getByRole("button")).toBeDisabled();
|
|
875
|
+
});
|
|
876
|
+
});
|
|
877
|
+
```
|
|
878
|
+
|
|
879
|
+
### Testes de Composição (asChild)
|
|
880
|
+
|
|
881
|
+
```tsx
|
|
882
|
+
describe("Button asChild", () => {
|
|
883
|
+
it("renders as child element", () => {
|
|
884
|
+
render(
|
|
885
|
+
<Button asChild>
|
|
886
|
+
<a href="/test">Link Button</a>
|
|
887
|
+
</Button>,
|
|
888
|
+
);
|
|
889
|
+
|
|
890
|
+
const link = screen.getByRole("link", { name: "Link Button" });
|
|
891
|
+
expect(link).toBeInTheDocument();
|
|
892
|
+
expect(link).toHaveAttribute("href", "/test");
|
|
893
|
+
expect(link).toHaveClass("bg-primary"); // Mantém estilos
|
|
894
|
+
});
|
|
895
|
+
|
|
896
|
+
it("forwards ref to child element", () => {
|
|
897
|
+
const ref = { current: null };
|
|
898
|
+
render(
|
|
899
|
+
<Button asChild ref={ref}>
|
|
900
|
+
<a href="/test">Link</a>
|
|
901
|
+
</Button>,
|
|
902
|
+
);
|
|
903
|
+
expect(ref.current).toBeInstanceOf(HTMLAnchorElement);
|
|
904
|
+
});
|
|
905
|
+
});
|
|
906
|
+
```
|
|
907
|
+
|
|
908
|
+
### Cenários Críticos
|
|
909
|
+
|
|
910
|
+
```tsx
|
|
911
|
+
describe("Button edge cases", () => {
|
|
912
|
+
it("handles rapid clicks correctly", async () => {
|
|
913
|
+
const user = userEvent.setup();
|
|
914
|
+
const handleClick = vi.fn();
|
|
915
|
+
|
|
916
|
+
render(<Button onClick={handleClick}>Click</Button>);
|
|
917
|
+
|
|
918
|
+
await user.tripleClick(screen.getByRole("button"));
|
|
919
|
+
expect(handleClick).toHaveBeenCalledTimes(3);
|
|
920
|
+
});
|
|
921
|
+
|
|
922
|
+
it("works with form submission", async () => {
|
|
923
|
+
const user = userEvent.setup();
|
|
924
|
+
const handleSubmit = vi.fn((e) => e.preventDefault());
|
|
925
|
+
|
|
926
|
+
render(
|
|
927
|
+
<form onSubmit={handleSubmit}>
|
|
928
|
+
<Button type="submit">Submit</Button>
|
|
929
|
+
</form>,
|
|
930
|
+
);
|
|
931
|
+
|
|
932
|
+
await user.click(screen.getByRole("button"));
|
|
933
|
+
expect(handleSubmit).toHaveBeenCalled();
|
|
934
|
+
});
|
|
935
|
+
|
|
936
|
+
it("preserves default type as submit in forms", () => {
|
|
937
|
+
render(
|
|
938
|
+
<form>
|
|
939
|
+
<Button>Submit</Button>
|
|
940
|
+
</form>,
|
|
941
|
+
);
|
|
942
|
+
// Default type is "submit" per HTML spec when in form
|
|
943
|
+
expect(screen.getByRole("button")).toHaveAttribute("type", undefined);
|
|
944
|
+
});
|
|
945
|
+
});
|
|
946
|
+
```
|
|
947
|
+
|
|
948
|
+
---
|
|
949
|
+
|
|
950
|
+
## Roadmap / Features Futuras
|
|
951
|
+
|
|
952
|
+
Baseado na análise comparativa com 14 design systems, as seguintes features são candidatas para implementação futura:
|
|
953
|
+
|
|
954
|
+
### ✅ Implementado
|
|
955
|
+
|
|
956
|
+
#### `loading` + `loadingText`
|
|
957
|
+
|
|
958
|
+
Estado de carregamento com spinner automático e preservação de layout (sem shift).
|
|
959
|
+
|
|
960
|
+
```tsx
|
|
961
|
+
// API implementada
|
|
962
|
+
<Button loading>Saving...</Button>
|
|
963
|
+
<Button loading loadingText="Salvando...">Save</Button>
|
|
964
|
+
```
|
|
965
|
+
|
|
966
|
+
#### `leftIcon` / `rightIcon`
|
|
967
|
+
|
|
968
|
+
Props dedicadas para ícones.
|
|
969
|
+
|
|
970
|
+
```tsx
|
|
971
|
+
// API implementada
|
|
972
|
+
<Button leftIcon={<Mail />}>Send Email</Button>
|
|
973
|
+
<Button rightIcon={<ChevronRight />}>Next</Button>
|
|
974
|
+
```
|
|
975
|
+
|
|
976
|
+
#### Melhorias de A11y
|
|
977
|
+
|
|
978
|
+
- `aria-busy="true"` automático quando `loading`.
|
|
979
|
+
- `aria-label="Loading"` automático quando texto é ocultado pelo loading.
|
|
980
|
+
- Prevenção de clique em links (`asChild`) quando `disabled`.
|
|
981
|
+
|
|
982
|
+
### Prioridade Média
|
|
983
|
+
|
|
984
|
+
#### `fullWidth`
|
|
985
|
+
|
|
986
|
+
Botão ocupa 100% da largura do container.
|
|
987
|
+
|
|
988
|
+
```tsx
|
|
989
|
+
// Proposta de API
|
|
990
|
+
interface ButtonProps {
|
|
991
|
+
fullWidth?: boolean
|
|
992
|
+
}
|
|
993
|
+
|
|
994
|
+
// Uso
|
|
995
|
+
<Button fullWidth>Submit</Button>
|
|
996
|
+
|
|
997
|
+
// Equivalente atual via className
|
|
998
|
+
<Button className="w-full">Submit</Button>
|
|
999
|
+
```
|
|
1000
|
+
|
|
1001
|
+
**Referências:** Chakra, MUI, Mantine (`fullWidth`), AntD (`block`)
|
|
1002
|
+
|
|
1003
|
+
#### Melhorias de A11y
|
|
1004
|
+
|
|
1005
|
+
```tsx
|
|
1006
|
+
// aria-busy automático quando loading
|
|
1007
|
+
<Button loading /> // → aria-busy="true" automático
|
|
1008
|
+
|
|
1009
|
+
// aria-disabled além de disabled
|
|
1010
|
+
<Button disabled /> // → aria-disabled="true" + disabled
|
|
1011
|
+
```
|
|
1012
|
+
|
|
1013
|
+
**Referências:** React Aria, Ariakit, Fluent UI
|
|
1014
|
+
|
|
1015
|
+
### Prioridade Baixa
|
|
1016
|
+
|
|
1017
|
+
#### `ButtonGroup`
|
|
1018
|
+
|
|
1019
|
+
Componente compound para agrupar botões.
|
|
1020
|
+
|
|
1021
|
+
```tsx
|
|
1022
|
+
// Proposta de API
|
|
1023
|
+
<ButtonGroup variant="outline" size="sm">
|
|
1024
|
+
<Button>Left</Button>
|
|
1025
|
+
<Button>Center</Button>
|
|
1026
|
+
<Button>Right</Button>
|
|
1027
|
+
</ButtonGroup>
|
|
1028
|
+
```
|
|
1029
|
+
|
|
1030
|
+
**Referências:** Chakra, MUI, Mantine, AntD, Fluent UI, Carbon
|
|
1031
|
+
|
|
1032
|
+
#### `radius`
|
|
1033
|
+
|
|
1034
|
+
Controle granular de border-radius.
|
|
1035
|
+
|
|
1036
|
+
```tsx
|
|
1037
|
+
// Proposta de API
|
|
1038
|
+
interface ButtonProps {
|
|
1039
|
+
radius?: "none" | "sm" | "md" | "lg" | "full";
|
|
1040
|
+
}
|
|
1041
|
+
|
|
1042
|
+
// Uso
|
|
1043
|
+
<Button radius="full">Pill Button</Button>;
|
|
1044
|
+
```
|
|
1045
|
+
|
|
1046
|
+
**Referências:** Mantine, NextUI
|
|
1047
|
+
|
|
1048
|
+
#### `color` / `colorScheme`
|
|
1049
|
+
|
|
1050
|
+
Variação de cor independente da variante.
|
|
1051
|
+
|
|
1052
|
+
```tsx
|
|
1053
|
+
// Proposta de API
|
|
1054
|
+
interface ButtonProps {
|
|
1055
|
+
colorScheme?: "primary" | "success" | "warning" | "error";
|
|
1056
|
+
}
|
|
1057
|
+
|
|
1058
|
+
// Uso
|
|
1059
|
+
<Button variant="outline" colorScheme="success">
|
|
1060
|
+
Approve
|
|
1061
|
+
</Button>;
|
|
1062
|
+
```
|
|
1063
|
+
|
|
1064
|
+
**Referências:** Chakra (`colorScheme`), MUI (`color`), Mantine (`color`)
|
|
1065
|
+
|
|
1066
|
+
### Decisões de Design
|
|
1067
|
+
|
|
1068
|
+
| Feature | Recomendação | Justificativa |
|
|
1069
|
+
| ---------------------- | -------------- | ----------------------------- |
|
|
1070
|
+
| `loading` | ✅ Implementar | Alta demanda, UX melhor |
|
|
1071
|
+
| `leftIcon`/`rightIcon` | ✅ Implementar | Ergonomia, type-safety |
|
|
1072
|
+
| `fullWidth` | ⚠️ Avaliar | `className="w-full"` funciona |
|
|
1073
|
+
| `ButtonGroup` | ✅ Implementar | Comum em UIs, boa composição |
|
|
1074
|
+
| `radius` | ❌ Evitar | Usar variants ou className |
|
|
1075
|
+
| `colorScheme` | ❌ Evitar | Complexidade, usar variants |
|
|
1076
|
+
|
|
1077
|
+
---
|
|
1078
|
+
|
|
1079
|
+
## Referências
|
|
1080
|
+
|
|
1081
|
+
### Design Systems Analisados
|
|
1082
|
+
|
|
1083
|
+
| Design System | Documentação Button | GitHub |
|
|
1084
|
+
| --------------- | ---------------------------------------------------------------------------------- | ----------------------------------------------------------------------------- |
|
|
1085
|
+
| **Shadcn/ui** | [Button](https://ui.shadcn.com/docs/components/button) | [shadcn-ui/ui](https://github.com/shadcn-ui/ui) |
|
|
1086
|
+
| **Radix UI** | [Slot](https://www.radix-ui.com/primitives/docs/utilities/slot) | [radix-ui/primitives](https://github.com/radix-ui/primitives) |
|
|
1087
|
+
| **React Aria** | [Button](https://react-spectrum.adobe.com/react-aria/Button.html) | [adobe/react-spectrum](https://github.com/adobe/react-spectrum) |
|
|
1088
|
+
| **Chakra UI** | [Button](https://chakra-ui.com/docs/components/button) | [chakra-ui/chakra-ui](https://github.com/chakra-ui/chakra-ui) |
|
|
1089
|
+
| **MUI** | [Button](https://mui.com/material-ui/react-button/) | [mui/material-ui](https://github.com/mui/material-ui) |
|
|
1090
|
+
| **Mantine** | [Button](https://mantine.dev/core/button/) | [mantinedev/mantine](https://github.com/mantinedev/mantine) |
|
|
1091
|
+
| **Ant Design** | [Button](https://ant.design/components/button) | [ant-design/ant-design](https://github.com/ant-design/ant-design) |
|
|
1092
|
+
| **NextUI** | [Button](https://nextui.org/docs/components/button) | [nextui-org/nextui](https://github.com/nextui-org/nextui) |
|
|
1093
|
+
| **Headless UI** | [Button](https://headlessui.com/react/button) | [tailwindlabs/headlessui](https://github.com/tailwindlabs/headlessui) |
|
|
1094
|
+
| **Ariakit** | [Button](https://ariakit.org/components/button) | [ariakit/ariakit](https://github.com/ariakit/ariakit) |
|
|
1095
|
+
| **Fluent UI** | [Button](https://react.fluentui.dev/?path=/docs/components-button-button--default) | [microsoft/fluentui](https://github.com/microsoft/fluentui) |
|
|
1096
|
+
| **Carbon** | [Button](https://carbondesignsystem.com/components/button/usage/) | [carbon-design-system/carbon](https://github.com/carbon-design-system/carbon) |
|
|
1097
|
+
| **Blueprint** | [Button](https://blueprintjs.com/docs/#core/components/button) | [palantir/blueprint](https://github.com/palantir/blueprint) |
|
|
1098
|
+
| **PrimeReact** | [Button](https://primereact.org/button/) | [primefaces/primereact](https://github.com/primefaces/primereact) |
|
|
1099
|
+
|
|
1100
|
+
### Especificações e Padrões
|
|
1101
|
+
|
|
1102
|
+
- [WAI-ARIA APG - Button Pattern](https://www.w3.org/WAI/ARIA/apg/patterns/button/)
|
|
1103
|
+
- [WCAG 2.1 Success Criteria](https://www.w3.org/WAI/WCAG21/quickref/)
|
|
1104
|
+
- [MDN - Button Element](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button)
|
|
1105
|
+
- [HTML Spec - Button](https://html.spec.whatwg.org/multipage/form-elements.html#the-button-element)
|
|
1106
|
+
|
|
1107
|
+
### Ferramentas Utilizadas
|
|
1108
|
+
|
|
1109
|
+
- [CVA - Class Variance Authority](https://cva.style/docs)
|
|
1110
|
+
- [Tailwind CSS](https://tailwindcss.com/docs)
|
|
1111
|
+
- [Radix Slot](https://www.radix-ui.com/primitives/docs/utilities/slot)
|
|
1112
|
+
- [Lucide Icons](https://lucide.dev/icons/)
|