@garantiabr/ui-kit 0.0.0-stage → 0.5.12
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/AGENTS.md +89 -0
- package/README.md +266 -2
- package/bin/init.mjs +238 -0
- package/dist/assets/produtos/agente-de-auditoria-icone.svg.js +6 -0
- package/dist/assets/produtos/agente-de-auditoria-icone.svg.js.map +1 -0
- package/dist/assets/produtos/avaliacao-de-bens-icone.svg.js +6 -0
- package/dist/assets/produtos/avaliacao-de-bens-icone.svg.js.map +1 -0
- package/dist/assets/produtos/central-de-conteudo-icone.svg.js +6 -0
- package/dist/assets/produtos/central-de-conteudo-icone.svg.js.map +1 -0
- package/dist/assets/produtos/registro-cartorario-icone.svg.js +6 -0
- package/dist/assets/produtos/registro-cartorario-icone.svg.js.map +1 -0
- package/dist/brand/apple-touch-icon.png +0 -0
- package/dist/brand/favicon-32.png +0 -0
- package/dist/brand/favicon.svg +11 -0
- package/dist/brand/icon-192.png +0 -0
- package/dist/brand/icon-512.png +0 -0
- package/dist/components/auth/OtpInput.d.ts +8 -0
- package/dist/components/auth/OtpInput.js +49 -0
- package/dist/components/auth/OtpInput.js.map +1 -0
- package/dist/components/chat/ChatConversationsDrawer.d.ts +29 -0
- package/dist/components/chat/ChatConversationsDrawer.js +156 -0
- package/dist/components/chat/ChatConversationsDrawer.js.map +1 -0
- package/dist/components/chat/chatFormatting.d.ts +2 -0
- package/dist/components/chat/chatFormatting.js +16 -0
- package/dist/components/chat/chatFormatting.js.map +1 -0
- package/dist/components/chat/types.d.ts +2 -0
- package/dist/components/chat/types.js +2 -0
- package/dist/components/chat/types.js.map +1 -0
- package/dist/components/chat/useChatWindowFrame.d.ts +23 -0
- package/dist/components/chat/useChatWindowFrame.js +42 -0
- package/dist/components/chat/useChatWindowFrame.js.map +1 -0
- package/dist/components/dashboard/DonutInsightCard.d.ts +11 -0
- package/dist/components/dashboard/DonutInsightCard.js +51 -0
- package/dist/components/dashboard/DonutInsightCard.js.map +1 -0
- package/dist/components/dashboard/FunilJornadaInsightCard.d.ts +22 -0
- package/dist/components/dashboard/FunilJornadaInsightCard.js +113 -0
- package/dist/components/dashboard/FunilJornadaInsightCard.js.map +1 -0
- package/dist/components/dashboard/InsightCard.d.ts +14 -0
- package/dist/components/dashboard/InsightCard.js +44 -0
- package/dist/components/dashboard/InsightCard.js.map +1 -0
- package/dist/components/dashboard/RankingList.d.ts +11 -0
- package/dist/components/dashboard/RankingList.js +28 -0
- package/dist/components/dashboard/RankingList.js.map +1 -0
- package/dist/components/documentos/AnaliseIaDialog.d.ts +114 -0
- package/dist/components/documentos/AnaliseIaDialog.js +923 -0
- package/dist/components/documentos/AnaliseIaDialog.js.map +1 -0
- package/dist/components/documentos/BatchPdfViewerDialog.d.ts +83 -0
- package/dist/components/documentos/BatchPdfViewerDialog.js +752 -0
- package/dist/components/documentos/BatchPdfViewerDialog.js.map +1 -0
- package/dist/components/documentos/DetalhesDocumentoConteudo.d.ts +31 -0
- package/dist/components/documentos/DetalhesDocumentoConteudo.js +301 -0
- package/dist/components/documentos/DetalhesDocumentoConteudo.js.map +1 -0
- package/dist/components/documentos/DocumentoErroIcon.d.ts +5 -0
- package/dist/components/documentos/DocumentoErroIcon.js +64 -0
- package/dist/components/documentos/DocumentoErroIcon.js.map +1 -0
- package/dist/components/documentos/PdfViewerDialog.d.ts +109 -0
- package/dist/components/documentos/PdfViewerDialog.js +704 -0
- package/dist/components/documentos/PdfViewerDialog.js.map +1 -0
- package/dist/components/documentos/TipoNaoConfirmadoBadge.d.ts +13 -0
- package/dist/components/documentos/TipoNaoConfirmadoBadge.js +30 -0
- package/dist/components/documentos/TipoNaoConfirmadoBadge.js.map +1 -0
- package/dist/components/documentos/notify.d.ts +6 -0
- package/dist/components/documentos/notify.js +9 -0
- package/dist/components/documentos/notify.js.map +1 -0
- package/dist/components/documentos/pdfDownload.d.ts +6 -0
- package/dist/components/documentos/pdfDownload.js +13 -0
- package/dist/components/documentos/pdfDownload.js.map +1 -0
- package/dist/components/documentos/pdfPageRenderers.d.ts +30 -0
- package/dist/components/documentos/pdfPageRenderers.js +38 -0
- package/dist/components/documentos/pdfPageRenderers.js.map +1 -0
- package/dist/components/documentos/pdfWorkerSetup.d.ts +1 -0
- package/dist/components/documentos/pdfWorkerSetup.js +4 -0
- package/dist/components/documentos/pdfWorkerSetup.js.map +1 -0
- package/dist/components/documentos/useDialogLayoutMode.d.ts +16 -0
- package/dist/components/documentos/useDialogLayoutMode.js +14 -0
- package/dist/components/documentos/useDialogLayoutMode.js.map +1 -0
- package/dist/components/documentos/useDockableDialogWindow.d.ts +66 -0
- package/dist/components/documentos/useDockableDialogWindow.js +105 -0
- package/dist/components/documentos/useDockableDialogWindow.js.map +1 -0
- package/dist/components/gia/GiaAudioPlayer.d.ts +9 -0
- package/dist/components/gia/GiaAudioPlayer.js +70 -0
- package/dist/components/gia/GiaAudioPlayer.js.map +1 -0
- package/dist/components/gia/GiaChatWindow.d.ts +44 -0
- package/dist/components/gia/GiaChatWindow.js +912 -0
- package/dist/components/gia/GiaChatWindow.js.map +1 -0
- package/dist/components/gia/GiaEmptyStateIllustration.d.ts +5 -0
- package/dist/components/gia/GiaEmptyStateIllustration.js +84 -0
- package/dist/components/gia/GiaEmptyStateIllustration.js.map +1 -0
- package/dist/components/gia/GiaMentionAutocomplete.d.ts +31 -0
- package/dist/components/gia/GiaMentionAutocomplete.js +115 -0
- package/dist/components/gia/GiaMentionAutocomplete.js.map +1 -0
- package/dist/components/gia/GiaMentionText.d.ts +10 -0
- package/dist/components/gia/GiaMentionText.js +66 -0
- package/dist/components/gia/GiaMentionText.js.map +1 -0
- package/dist/components/gia/mentionParsing.d.ts +79 -0
- package/dist/components/gia/mentionParsing.js +44 -0
- package/dist/components/gia/mentionParsing.js.map +1 -0
- package/dist/components/ui/accordion.d.ts +7 -0
- package/dist/components/ui/accordion.js +66 -0
- package/dist/components/ui/accordion.js.map +1 -0
- package/dist/components/ui/alert.d.ts +9 -0
- package/dist/components/ui/alert.js +68 -0
- package/dist/components/ui/alert.js.map +1 -0
- package/dist/components/ui/badge.d.ts +9 -0
- package/dist/components/ui/badge.js +45 -0
- package/dist/components/ui/badge.js.map +1 -0
- package/dist/components/ui/breadcrumb.d.ts +11 -0
- package/dist/components/ui/breadcrumb.js +105 -0
- package/dist/components/ui/breadcrumb.js.map +1 -0
- package/dist/components/ui/button.d.ts +10 -0
- package/dist/components/ui/button.js +58 -0
- package/dist/components/ui/button.js.map +1 -0
- package/dist/components/ui/calendar.d.ts +8 -0
- package/dist/components/ui/calendar.js +175 -0
- package/dist/components/ui/calendar.js.map +1 -0
- package/dist/components/ui/checkbox.d.ts +4 -0
- package/dist/components/ui/checkbox.js +33 -0
- package/dist/components/ui/checkbox.js.map +1 -0
- package/dist/components/ui/dialog.d.ts +17 -0
- package/dist/components/ui/dialog.js +148 -0
- package/dist/components/ui/dialog.js.map +1 -0
- package/dist/components/ui/dropdown-menu.d.ts +25 -0
- package/dist/components/ui/dropdown-menu.js +233 -0
- package/dist/components/ui/dropdown-menu.js.map +1 -0
- package/dist/components/ui/input.d.ts +3 -0
- package/dist/components/ui/input.js +23 -0
- package/dist/components/ui/input.js.map +1 -0
- package/dist/components/ui/label.d.ts +4 -0
- package/dist/components/ui/label.js +24 -0
- package/dist/components/ui/label.js.map +1 -0
- package/dist/components/ui/pagination.d.ts +13 -0
- package/dist/components/ui/pagination.js +120 -0
- package/dist/components/ui/pagination.js.map +1 -0
- package/dist/components/ui/popover.d.ts +10 -0
- package/dist/components/ui/popover.js +82 -0
- package/dist/components/ui/popover.js.map +1 -0
- package/dist/components/ui/progress.d.ts +4 -0
- package/dist/components/ui/progress.js +33 -0
- package/dist/components/ui/progress.js.map +1 -0
- package/dist/components/ui/scroll-area.d.ts +5 -0
- package/dist/components/ui/scroll-area.js +62 -0
- package/dist/components/ui/scroll-area.js.map +1 -0
- package/dist/components/ui/separator.d.ts +4 -0
- package/dist/components/ui/separator.js +28 -0
- package/dist/components/ui/separator.js.map +1 -0
- package/dist/components/ui/sheet.d.ts +14 -0
- package/dist/components/ui/sheet.js +129 -0
- package/dist/components/ui/sheet.js.map +1 -0
- package/dist/components/ui/table.d.ts +10 -0
- package/dist/components/ui/table.js +116 -0
- package/dist/components/ui/table.js.map +1 -0
- package/dist/components/ui/tabs.d.ts +11 -0
- package/dist/components/ui/tabs.js +93 -0
- package/dist/components/ui/tabs.js.map +1 -0
- package/dist/components/ui/textarea.d.ts +3 -0
- package/dist/components/ui/textarea.js +20 -0
- package/dist/components/ui/textarea.js.map +1 -0
- package/dist/components/ui/tooltip.d.ts +7 -0
- package/dist/components/ui/tooltip.js +57 -0
- package/dist/components/ui/tooltip.js.map +1 -0
- package/dist/components/ui-garantiabr/Alert.d.ts +17 -0
- package/dist/components/ui-garantiabr/Alert.js +77 -0
- package/dist/components/ui-garantiabr/Alert.js.map +1 -0
- package/dist/components/ui-garantiabr/accordion.d.ts +46 -0
- package/dist/components/ui-garantiabr/accordion.js +114 -0
- package/dist/components/ui-garantiabr/accordion.js.map +1 -0
- package/dist/components/ui-garantiabr/alertBanner.d.ts +14 -0
- package/dist/components/ui-garantiabr/alertBanner.js +49 -0
- package/dist/components/ui-garantiabr/alertBanner.js.map +1 -0
- package/dist/components/ui-garantiabr/altTabs.d.ts +19 -0
- package/dist/components/ui-garantiabr/altTabs.js +33 -0
- package/dist/components/ui-garantiabr/altTabs.js.map +1 -0
- package/dist/components/ui-garantiabr/appLayout.d.ts +56 -0
- package/dist/components/ui-garantiabr/appLayout.js +177 -0
- package/dist/components/ui-garantiabr/appLayout.js.map +1 -0
- package/dist/components/ui-garantiabr/avatar.d.ts +15 -0
- package/dist/components/ui-garantiabr/avatar.js +38 -0
- package/dist/components/ui-garantiabr/avatar.js.map +1 -0
- package/dist/components/ui-garantiabr/badge.d.ts +17 -0
- package/dist/components/ui-garantiabr/badge.js +54 -0
- package/dist/components/ui-garantiabr/badge.js.map +1 -0
- package/dist/components/ui-garantiabr/badgeNotification.d.ts +10 -0
- package/dist/components/ui-garantiabr/badgeNotification.js +41 -0
- package/dist/components/ui-garantiabr/badgeNotification.js.map +1 -0
- package/dist/components/ui-garantiabr/breadcrumb.d.ts +10 -0
- package/dist/components/ui-garantiabr/breadcrumb.js +61 -0
- package/dist/components/ui-garantiabr/breadcrumb.js.map +1 -0
- package/dist/components/ui-garantiabr/button.d.ts +23 -0
- package/dist/components/ui-garantiabr/button.js +71 -0
- package/dist/components/ui-garantiabr/button.js.map +1 -0
- package/dist/components/ui-garantiabr/buttonIcon.d.ts +15 -0
- package/dist/components/ui-garantiabr/buttonIcon.js +48 -0
- package/dist/components/ui-garantiabr/buttonIcon.js.map +1 -0
- package/dist/components/ui-garantiabr/calendar.d.ts +20 -0
- package/dist/components/ui-garantiabr/calendar.js +73 -0
- package/dist/components/ui-garantiabr/calendar.js.map +1 -0
- package/dist/components/ui-garantiabr/card.d.ts +12 -0
- package/dist/components/ui-garantiabr/card.js +31 -0
- package/dist/components/ui-garantiabr/card.js.map +1 -0
- package/dist/components/ui-garantiabr/chart_area.d.ts +29 -0
- package/dist/components/ui-garantiabr/chart_area.js +62 -0
- package/dist/components/ui-garantiabr/chart_area.js.map +1 -0
- package/dist/components/ui-garantiabr/chart_bar.d.ts +35 -0
- package/dist/components/ui-garantiabr/chart_bar.js +46 -0
- package/dist/components/ui-garantiabr/chart_bar.js.map +1 -0
- package/dist/components/ui-garantiabr/chart_bar_disponibilidade.d.ts +28 -0
- package/dist/components/ui-garantiabr/chart_bar_disponibilidade.js +57 -0
- package/dist/components/ui-garantiabr/chart_bar_disponibilidade.js.map +1 -0
- package/dist/components/ui-garantiabr/chart_bar_horizontal.d.ts +26 -0
- package/dist/components/ui-garantiabr/chart_bar_horizontal.js +44 -0
- package/dist/components/ui-garantiabr/chart_bar_horizontal.js.map +1 -0
- package/dist/components/ui-garantiabr/chart_composed.d.ts +36 -0
- package/dist/components/ui-garantiabr/chart_composed.js +70 -0
- package/dist/components/ui-garantiabr/chart_composed.js.map +1 -0
- package/dist/components/ui-garantiabr/chart_funnel.d.ts +13 -0
- package/dist/components/ui-garantiabr/chart_funnel.js +25 -0
- package/dist/components/ui-garantiabr/chart_funnel.js.map +1 -0
- package/dist/components/ui-garantiabr/chart_line.d.ts +27 -0
- package/dist/components/ui-garantiabr/chart_line.js +43 -0
- package/dist/components/ui-garantiabr/chart_line.js.map +1 -0
- package/dist/components/ui-garantiabr/chart_pie.d.ts +26 -0
- package/dist/components/ui-garantiabr/chart_pie.js +62 -0
- package/dist/components/ui-garantiabr/chart_pie.js.map +1 -0
- package/dist/components/ui-garantiabr/chart_statcard.d.ts +22 -0
- package/dist/components/ui-garantiabr/chart_statcard.js +175 -0
- package/dist/components/ui-garantiabr/chart_statcard.js.map +1 -0
- package/dist/components/ui-garantiabr/checkbox.d.ts +10 -0
- package/dist/components/ui-garantiabr/checkbox.js +31 -0
- package/dist/components/ui-garantiabr/checkbox.js.map +1 -0
- package/dist/components/ui-garantiabr/checkboxGroupField.d.ts +12 -0
- package/dist/components/ui-garantiabr/checkboxGroupField.js +40 -0
- package/dist/components/ui-garantiabr/checkboxGroupField.js.map +1 -0
- package/dist/components/ui-garantiabr/chip.d.ts +12 -0
- package/dist/components/ui-garantiabr/chip.js +49 -0
- package/dist/components/ui-garantiabr/chip.js.map +1 -0
- package/dist/components/ui-garantiabr/codeBlock.d.ts +27 -0
- package/dist/components/ui-garantiabr/codeBlock.js +100 -0
- package/dist/components/ui-garantiabr/codeBlock.js.map +1 -0
- package/dist/components/ui-garantiabr/commandPalette.d.ts +67 -0
- package/dist/components/ui-garantiabr/commandPalette.js +278 -0
- package/dist/components/ui-garantiabr/commandPalette.js.map +1 -0
- package/dist/components/ui-garantiabr/commandPaletteOrdem.d.ts +10 -0
- package/dist/components/ui-garantiabr/commandPaletteOrdem.js +13 -0
- package/dist/components/ui-garantiabr/commandPaletteOrdem.js.map +1 -0
- package/dist/components/ui-garantiabr/dashCard.d.ts +16 -0
- package/dist/components/ui-garantiabr/dashCard.js +51 -0
- package/dist/components/ui-garantiabr/dashCard.js.map +1 -0
- package/dist/components/ui-garantiabr/datePicker.d.ts +23 -0
- package/dist/components/ui-garantiabr/datePicker.js +143 -0
- package/dist/components/ui-garantiabr/datePicker.js.map +1 -0
- package/dist/components/ui-garantiabr/dialog.d.ts +14 -0
- package/dist/components/ui-garantiabr/dialog.js +69 -0
- package/dist/components/ui-garantiabr/dialog.js.map +1 -0
- package/dist/components/ui-garantiabr/divider.d.ts +7 -0
- package/dist/components/ui-garantiabr/divider.js +27 -0
- package/dist/components/ui-garantiabr/divider.js.map +1 -0
- package/dist/components/ui-garantiabr/dropdownMenu.d.ts +47 -0
- package/dist/components/ui-garantiabr/dropdownMenu.js +89 -0
- package/dist/components/ui-garantiabr/dropdownMenu.js.map +1 -0
- package/dist/components/ui-garantiabr/dropdownTrigger.d.ts +18 -0
- package/dist/components/ui-garantiabr/dropdownTrigger.js +66 -0
- package/dist/components/ui-garantiabr/dropdownTrigger.js.map +1 -0
- package/dist/components/ui-garantiabr/emptyState.d.ts +12 -0
- package/dist/components/ui-garantiabr/emptyState.js +68 -0
- package/dist/components/ui-garantiabr/emptyState.js.map +1 -0
- package/dist/components/ui-garantiabr/fileUpload.d.ts +78 -0
- package/dist/components/ui-garantiabr/fileUpload.js +552 -0
- package/dist/components/ui-garantiabr/fileUpload.js.map +1 -0
- package/dist/components/ui-garantiabr/floutNavetagionStep.d.ts +9 -0
- package/dist/components/ui-garantiabr/floutNavetagionStep.js +50 -0
- package/dist/components/ui-garantiabr/floutNavetagionStep.js.map +1 -0
- package/dist/components/ui-garantiabr/footer.d.ts +11 -0
- package/dist/components/ui-garantiabr/footer.js +31 -0
- package/dist/components/ui-garantiabr/footer.js.map +1 -0
- package/dist/components/ui-garantiabr/giaButton.d.ts +6 -0
- package/dist/components/ui-garantiabr/giaButton.js +22 -0
- package/dist/components/ui-garantiabr/giaButton.js.map +1 -0
- package/dist/components/ui-garantiabr/giaIcon.d.ts +6 -0
- package/dist/components/ui-garantiabr/giaIcon.js +49 -0
- package/dist/components/ui-garantiabr/giaIcon.js.map +1 -0
- package/dist/components/ui-garantiabr/helperText.d.ts +6 -0
- package/dist/components/ui-garantiabr/helperText.js +25 -0
- package/dist/components/ui-garantiabr/helperText.js.map +1 -0
- package/dist/components/ui-garantiabr/hoverCard.d.ts +12 -0
- package/dist/components/ui-garantiabr/hoverCard.js +33 -0
- package/dist/components/ui-garantiabr/hoverCard.js.map +1 -0
- package/dist/components/ui-garantiabr/iconesAvaliacao.d.ts +4 -0
- package/dist/components/ui-garantiabr/iconesAvaliacao.js +19 -0
- package/dist/components/ui-garantiabr/iconesAvaliacao.js.map +1 -0
- package/dist/components/ui-garantiabr/input.d.ts +4 -0
- package/dist/components/ui-garantiabr/input.js +21 -0
- package/dist/components/ui-garantiabr/input.js.map +1 -0
- package/dist/components/ui-garantiabr/inputCounter.d.ts +14 -0
- package/dist/components/ui-garantiabr/inputCounter.js +117 -0
- package/dist/components/ui-garantiabr/inputCounter.js.map +1 -0
- package/dist/components/ui-garantiabr/inputFormField.d.ts +22 -0
- package/dist/components/ui-garantiabr/inputFormField.js +129 -0
- package/dist/components/ui-garantiabr/inputFormField.js.map +1 -0
- package/dist/components/ui-garantiabr/inputMasked.d.ts +12 -0
- package/dist/components/ui-garantiabr/inputMasked.js +130 -0
- package/dist/components/ui-garantiabr/inputMasked.js.map +1 -0
- package/dist/components/ui-garantiabr/inputSearch.d.ts +16 -0
- package/dist/components/ui-garantiabr/inputSearch.js +104 -0
- package/dist/components/ui-garantiabr/inputSearch.js.map +1 -0
- package/dist/components/ui-garantiabr/listaColunasOrdenavel.d.ts +30 -0
- package/dist/components/ui-garantiabr/listaColunasOrdenavel.js +72 -0
- package/dist/components/ui-garantiabr/listaColunasOrdenavel.js.map +1 -0
- package/dist/components/ui-garantiabr/loadingSpinner.d.ts +9 -0
- package/dist/components/ui-garantiabr/loadingSpinner.js +57 -0
- package/dist/components/ui-garantiabr/loadingSpinner.js.map +1 -0
- package/dist/components/ui-garantiabr/messageComposer.d.ts +62 -0
- package/dist/components/ui-garantiabr/messageComposer.js +296 -0
- package/dist/components/ui-garantiabr/messageComposer.js.map +1 -0
- package/dist/components/ui-garantiabr/mobileDrawer.d.ts +11 -0
- package/dist/components/ui-garantiabr/mobileDrawer.js +102 -0
- package/dist/components/ui-garantiabr/mobileDrawer.js.map +1 -0
- package/dist/components/ui-garantiabr/multiSelectField.d.ts +27 -0
- package/dist/components/ui-garantiabr/multiSelectField.js +140 -0
- package/dist/components/ui-garantiabr/multiSelectField.js.map +1 -0
- package/dist/components/ui-garantiabr/navbar.d.ts +82 -0
- package/dist/components/ui-garantiabr/navbar.js +417 -0
- package/dist/components/ui-garantiabr/navbar.js.map +1 -0
- package/dist/components/ui-garantiabr/navbarMobileDrawer.d.ts +15 -0
- package/dist/components/ui-garantiabr/navbarMobileDrawer.js +146 -0
- package/dist/components/ui-garantiabr/navbarMobileDrawer.js.map +1 -0
- package/dist/components/ui-garantiabr/notificationCard.d.ts +35 -0
- package/dist/components/ui-garantiabr/notificationCard.js +70 -0
- package/dist/components/ui-garantiabr/notificationCard.js.map +1 -0
- package/dist/components/ui-garantiabr/optionSelect.d.ts +64 -0
- package/dist/components/ui-garantiabr/optionSelect.js +117 -0
- package/dist/components/ui-garantiabr/optionSelect.js.map +1 -0
- package/dist/components/ui-garantiabr/pagination.d.ts +13 -0
- package/dist/components/ui-garantiabr/pagination.js +141 -0
- package/dist/components/ui-garantiabr/pagination.js.map +1 -0
- package/dist/components/ui-garantiabr/popover.d.ts +18 -0
- package/dist/components/ui-garantiabr/popover.js +57 -0
- package/dist/components/ui-garantiabr/popover.js.map +1 -0
- package/dist/components/ui-garantiabr/productLogotype.d.ts +14 -0
- package/dist/components/ui-garantiabr/productLogotype.js +40 -0
- package/dist/components/ui-garantiabr/productLogotype.js.map +1 -0
- package/dist/components/ui-garantiabr/productSwitcher.d.ts +20 -0
- package/dist/components/ui-garantiabr/productSwitcher.js +62 -0
- package/dist/components/ui-garantiabr/productSwitcher.js.map +1 -0
- package/dist/components/ui-garantiabr/progressBar.d.ts +12 -0
- package/dist/components/ui-garantiabr/progressBar.js +32 -0
- package/dist/components/ui-garantiabr/progressBar.js.map +1 -0
- package/dist/components/ui-garantiabr/radioGroup.d.ts +14 -0
- package/dist/components/ui-garantiabr/radioGroup.js +47 -0
- package/dist/components/ui-garantiabr/radioGroup.js.map +1 -0
- package/dist/components/ui-garantiabr/segmentedControl.d.ts +28 -0
- package/dist/components/ui-garantiabr/segmentedControl.js +62 -0
- package/dist/components/ui-garantiabr/segmentedControl.js.map +1 -0
- package/dist/components/ui-garantiabr/select.d.ts +27 -0
- package/dist/components/ui-garantiabr/select.js +166 -0
- package/dist/components/ui-garantiabr/select.js.map +1 -0
- package/dist/components/ui-garantiabr/selectField.d.ts +12 -0
- package/dist/components/ui-garantiabr/selectField.js +38 -0
- package/dist/components/ui-garantiabr/selectField.js.map +1 -0
- package/dist/components/ui-garantiabr/sheet.d.ts +16 -0
- package/dist/components/ui-garantiabr/sheet.js +74 -0
- package/dist/components/ui-garantiabr/sheet.js.map +1 -0
- package/dist/components/ui-garantiabr/shinyButton.d.ts +24 -0
- package/dist/components/ui-garantiabr/shinyButton.js +34 -0
- package/dist/components/ui-garantiabr/shinyButton.js.map +1 -0
- package/dist/components/ui-garantiabr/shinyIconButton.d.ts +16 -0
- package/dist/components/ui-garantiabr/shinyIconButton.js +32 -0
- package/dist/components/ui-garantiabr/shinyIconButton.js.map +1 -0
- package/dist/components/ui-garantiabr/sideTrayNotification.d.ts +31 -0
- package/dist/components/ui-garantiabr/sideTrayNotification.js +87 -0
- package/dist/components/ui-garantiabr/sideTrayNotification.js.map +1 -0
- package/dist/components/ui-garantiabr/sidebar.d.ts +36 -0
- package/dist/components/ui-garantiabr/sidebar.js +231 -0
- package/dist/components/ui-garantiabr/sidebar.js.map +1 -0
- package/dist/components/ui-garantiabr/splitButton.d.ts +33 -0
- package/dist/components/ui-garantiabr/splitButton.js +67 -0
- package/dist/components/ui-garantiabr/splitButton.js.map +1 -0
- package/dist/components/ui-garantiabr/stepper.d.ts +9 -0
- package/dist/components/ui-garantiabr/stepper.js +31 -0
- package/dist/components/ui-garantiabr/stepper.js.map +1 -0
- package/dist/components/ui-garantiabr/switch.d.ts +9 -0
- package/dist/components/ui-garantiabr/switch.js +50 -0
- package/dist/components/ui-garantiabr/switch.js.map +1 -0
- package/dist/components/ui-garantiabr/table.d.ts +133 -0
- package/dist/components/ui-garantiabr/table.js +544 -0
- package/dist/components/ui-garantiabr/table.js.map +1 -0
- package/dist/components/ui-garantiabr/tabs.d.ts +27 -0
- package/dist/components/ui-garantiabr/tabs.js +53 -0
- package/dist/components/ui-garantiabr/tabs.js.map +1 -0
- package/dist/components/ui-garantiabr/tagInput.d.ts +13 -0
- package/dist/components/ui-garantiabr/tagInput.js +55 -0
- package/dist/components/ui-garantiabr/tagInput.js.map +1 -0
- package/dist/components/ui-garantiabr/textarea.d.ts +11 -0
- package/dist/components/ui-garantiabr/textarea.js +62 -0
- package/dist/components/ui-garantiabr/textarea.js.map +1 -0
- package/dist/components/ui-garantiabr/timeline.d.ts +29 -0
- package/dist/components/ui-garantiabr/timeline.js +38 -0
- package/dist/components/ui-garantiabr/timeline.js.map +1 -0
- package/dist/components/ui-garantiabr/toastDownload.d.ts +13 -0
- package/dist/components/ui-garantiabr/toastDownload.js +55 -0
- package/dist/components/ui-garantiabr/toastDownload.js.map +1 -0
- package/dist/components/ui-garantiabr/tooltip.d.ts +18 -0
- package/dist/components/ui-garantiabr/tooltip.js +34 -0
- package/dist/components/ui-garantiabr/tooltip.js.map +1 -0
- package/dist/components/ui-garantiabr/topNavegation.d.ts +32 -0
- package/dist/components/ui-garantiabr/topNavegation.js +267 -0
- package/dist/components/ui-garantiabr/topNavegation.js.map +1 -0
- package/dist/components/ui-garantiabr/truncatedText.d.ts +14 -0
- package/dist/components/ui-garantiabr/truncatedText.js +27 -0
- package/dist/components/ui-garantiabr/truncatedText.js.map +1 -0
- package/dist/components/ui-garantiabr/useTemRolagem.d.ts +4 -0
- package/dist/components/ui-garantiabr/useTemRolagem.js +17 -0
- package/dist/components/ui-garantiabr/useTemRolagem.js.map +1 -0
- package/dist/hooks/useTheme.d.ts +7 -0
- package/dist/hooks/useTheme.js +31 -0
- package/dist/hooks/useTheme.js.map +1 -0
- package/dist/lib/confianca.d.ts +4 -0
- package/dist/lib/confianca.js +16 -0
- package/dist/lib/confianca.js.map +1 -0
- package/dist/lib/protocolosSuporte.d.ts +29 -0
- package/dist/lib/protocolosSuporte.js +44 -0
- package/dist/lib/protocolosSuporte.js.map +1 -0
- package/dist/lib/utils.d.ts +2 -0
- package/dist/lib/utils.js +9 -0
- package/dist/lib/utils.js.map +1 -0
- package/dist/theme.css +1072 -0
- package/dist/types/svg.d.js +2 -0
- package/dist/types/svg.d.js.map +1 -0
- package/dist/utils/inputMasks.d.ts +5 -0
- package/dist/utils/inputMasks.js +16 -0
- package/dist/utils/inputMasks.js.map +1 -0
- package/dist/utils/useMediaQuery.d.ts +6 -0
- package/dist/utils/useMediaQuery.js +14 -0
- package/dist/utils/useMediaQuery.js.map +1 -0
- package/package.json +94 -4
- package/tools/agent-config.mjs +51 -0
- package/tools/check.mjs +110 -0
- package/tools/eslint-plugin.mjs +115 -0
- package/tools/hooks.mjs +133 -0
- package/tools/mcp.mjs +132 -0
- package/tools/version.mjs +43 -0
- package/tools/workspace.mjs +51 -0
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
import { type DropdownMenuOption } from "./dropdownMenu";
|
|
3
|
+
type TableRowId = string | number;
|
|
4
|
+
type TableActionIconName = NonNullable<DropdownMenuOption["icon"]>;
|
|
5
|
+
export interface TableColumn<TData extends object, TSortValue extends string = Extract<keyof TData, string>> {
|
|
6
|
+
key: Extract<keyof TData, string>;
|
|
7
|
+
label: string;
|
|
8
|
+
tooltip?: string;
|
|
9
|
+
sortable?: boolean;
|
|
10
|
+
filterable?: boolean;
|
|
11
|
+
type?: string;
|
|
12
|
+
headerClassName?: string;
|
|
13
|
+
cellClassName?: string;
|
|
14
|
+
sortValue?: TSortValue;
|
|
15
|
+
/** Renderização customizada da célula (ex.: avatar + tooltip). Tem prioridade sobre `type`. */
|
|
16
|
+
render?: (row: TData) => ReactNode;
|
|
17
|
+
/** Fixa a coluna à direita: ela continua visível quando a tabela rola na horizontal (ex.: "Análise IA" com o leitor de documento aberto).
|
|
18
|
+
* Exige `width`. Várias colunas fixas ficam lado a lado, na ordem em que aparecem, à esquerda das ações da linha. */
|
|
19
|
+
pinned?: "right";
|
|
20
|
+
/** Largura da coluna em px. Obrigatória com `pinned`, para as colunas fixas se encaixarem sem sobrepor. */
|
|
21
|
+
width?: number;
|
|
22
|
+
}
|
|
23
|
+
export interface TablePaginationMeta {
|
|
24
|
+
page: number;
|
|
25
|
+
pageSize: number;
|
|
26
|
+
totalItems: number;
|
|
27
|
+
totalPages: number;
|
|
28
|
+
hasPreviousPage: boolean;
|
|
29
|
+
hasNextPage: boolean;
|
|
30
|
+
}
|
|
31
|
+
export interface TableSortingMeta<TSortValue extends string = string> {
|
|
32
|
+
sortBy?: TSortValue;
|
|
33
|
+
sortOrder?: "asc" | "desc";
|
|
34
|
+
}
|
|
35
|
+
export interface TableMeta<TSortValue extends string = string> {
|
|
36
|
+
pagination?: TablePaginationMeta;
|
|
37
|
+
sorting?: TableSortingMeta<TSortValue>;
|
|
38
|
+
filters?: Record<string, unknown>;
|
|
39
|
+
search?: {
|
|
40
|
+
term?: string;
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
export interface DataTableResponse<TData extends object, TSortValue extends string = Extract<keyof TData, string>> {
|
|
44
|
+
data: TData[];
|
|
45
|
+
columns: TableColumn<TData, TSortValue>[];
|
|
46
|
+
meta?: TableMeta<TSortValue>;
|
|
47
|
+
rowActions?: TableRowActionsConfig<TData>;
|
|
48
|
+
}
|
|
49
|
+
export interface TableBulkMenuItem<TData extends object> {
|
|
50
|
+
id: string;
|
|
51
|
+
label: string;
|
|
52
|
+
icon?: TableActionIconName;
|
|
53
|
+
/** Ícone próprio, no lugar do `icon` da biblioteca. */
|
|
54
|
+
customIcon?: ReactNode;
|
|
55
|
+
/** Segunda linha, abaixo do rótulo. */
|
|
56
|
+
subtitle?: string;
|
|
57
|
+
disabled?: boolean;
|
|
58
|
+
onClick: (selectedRows: TData[]) => void;
|
|
59
|
+
}
|
|
60
|
+
export interface TableBulkAction<TData extends object> {
|
|
61
|
+
id: string;
|
|
62
|
+
label: string;
|
|
63
|
+
icon: TableActionIconName;
|
|
64
|
+
/** Sem `items`, é um botão. Com `items`, abre um menu com várias ações para as linhas selecionadas. */
|
|
65
|
+
onClick?: (selectedRows: TData[]) => void;
|
|
66
|
+
items?: TableBulkMenuItem<TData>[];
|
|
67
|
+
}
|
|
68
|
+
export interface TableRowAction<TData extends object> {
|
|
69
|
+
id: string;
|
|
70
|
+
label: string;
|
|
71
|
+
styleType?: string;
|
|
72
|
+
icon: TableActionIconName;
|
|
73
|
+
onClick?: (row: TData) => void;
|
|
74
|
+
disabled?: boolean | ((row: TData) => boolean);
|
|
75
|
+
hidden?: boolean | ((row: TData) => boolean);
|
|
76
|
+
}
|
|
77
|
+
export type TableRowActionsResolver<TData extends object> = TableRowAction<TData>[] | ((row: TData) => TableRowAction<TData>[]);
|
|
78
|
+
export interface TableRowActionsConfig<TData extends object> {
|
|
79
|
+
items: TableRowActionsResolver<TData>;
|
|
80
|
+
headerLabel?: string;
|
|
81
|
+
maxVisibleActions?: number;
|
|
82
|
+
headerClassName?: string;
|
|
83
|
+
cellClassName?: string;
|
|
84
|
+
/** Fixa as ações da linha na borda direita, sempre visíveis quando a tabela rola na horizontal. Fixas, as ações ficam num só "Mais ações" (⋮)
|
|
85
|
+
* quando há mais de uma, para a coluna ter largura constante (56 px). */
|
|
86
|
+
pinned?: boolean;
|
|
87
|
+
}
|
|
88
|
+
export interface TableProps<TData extends object, TSortValue extends string = Extract<keyof TData, string>> {
|
|
89
|
+
title?: string;
|
|
90
|
+
response: DataTableResponse<TData, TSortValue>;
|
|
91
|
+
onSort?: (sortValue: TSortValue) => void;
|
|
92
|
+
onDeleteSelected?: (selectedItems: TData[]) => void;
|
|
93
|
+
/** Botões extras exibidos na barra de seleção, ao lado de "Excluir itens" (ex.: "Abrir todos"). */
|
|
94
|
+
bulkActions?: TableBulkAction<TData>[];
|
|
95
|
+
/** Esconde "Excluir itens" da barra de seleção, quando as linhas só podem ser selecionadas para outras ações. */
|
|
96
|
+
hideDeleteAction?: boolean;
|
|
97
|
+
onPageChange?: (page: number) => void;
|
|
98
|
+
onItemsPerPageChange?: (itemsPerPage: number) => void;
|
|
99
|
+
showFilterButton?: boolean;
|
|
100
|
+
showSearchInput?: boolean;
|
|
101
|
+
onFilterClick?: () => void;
|
|
102
|
+
handleSearchValueChange?: (value: string) => void;
|
|
103
|
+
getRowId?: (row: TData, index: number) => TableRowId;
|
|
104
|
+
showPagination?: boolean;
|
|
105
|
+
itemsPerPageOptions?: number[];
|
|
106
|
+
rowActions?: TableRowActionsConfig<TData>;
|
|
107
|
+
customFilterTrigger?: ReactNode;
|
|
108
|
+
/** Conteúdo exibido entre a toolbar (busca/filtro) e a tabela — ex.: o card de filtros que
|
|
109
|
+
* "desce" ao clicar em "Filtrar" (mesmo padrão do catálogo em Nova Solicitação). Controle a
|
|
110
|
+
* visibilidade/animação no próprio conteúdo passado aqui; o Table só reserva o espaço. */
|
|
111
|
+
filterPanel?: ReactNode;
|
|
112
|
+
onRowClick?: (row: TData) => void;
|
|
113
|
+
/** Classes extras aplicadas na linha (ex.: destacar uma linha com pendências). */
|
|
114
|
+
getRowClassName?: (row: TData) => string | undefined;
|
|
115
|
+
/** Quando retorna um nó, a linha inteira vira o trigger de um tooltip com esse conteúdo. */
|
|
116
|
+
getRowTooltip?: (row: TData) => ReactNode | null | undefined;
|
|
117
|
+
/** Conteúdo exibido no lugar das linhas quando não há dados (ex.: <EmptyState />). Toolbar (busca/filtro) continua visível. */
|
|
118
|
+
emptyState?: ReactNode;
|
|
119
|
+
/** Classes extras no Card branco externo — por padrão não tem padding (a maioria dos usos já
|
|
120
|
+
* fica dentro de outro card branco). Passe `p-xl` só nas páginas onde a tabela "flutua" sozinha
|
|
121
|
+
* sobre o fundo cinza da página (Gestão de pastas, Solicitações, Acervo). */
|
|
122
|
+
className?: string;
|
|
123
|
+
/** (pacote) Célula rica pela tabela inteira; `undefined` cai no padrão (render da coluna, texto, Badge). */
|
|
124
|
+
renderCell?: (row: TData, column: TableColumn<TData, TSortValue>) => ReactNode | undefined;
|
|
125
|
+
/** (pacote) Seleção controlada: liga os checkboxes sem exigir onDeleteSelected. */
|
|
126
|
+
selectedRowIds?: string[];
|
|
127
|
+
onSelectedRowIdsChange?: (ids: string[]) => void;
|
|
128
|
+
/** (pacote) data-testid da tabela e de cada linha, para testes e2e. */
|
|
129
|
+
testId?: string;
|
|
130
|
+
rowTestId?: (row: TData) => string;
|
|
131
|
+
}
|
|
132
|
+
export declare function Table<TData extends object, TSortValue extends string = Extract<keyof TData, string>>({ title, response, onSort, onDeleteSelected, bulkActions, hideDeleteAction, onPageChange, onItemsPerPageChange, showFilterButton, showSearchInput, onFilterClick, handleSearchValueChange, getRowId, showPagination, itemsPerPageOptions, rowActions, customFilterTrigger, filterPanel, onRowClick, getRowClassName, getRowTooltip, emptyState, className, renderCell, selectedRowIds: controlledSelectedRowIds, onSelectedRowIdsChange, testId, rowTestId, }: Readonly<TableProps<TData, TSortValue>>): import("react/jsx-runtime").JSX.Element;
|
|
133
|
+
export {};
|
|
@@ -0,0 +1,544 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as s, jsxs as d } from "react/jsx-runtime";
|
|
3
|
+
import { useId as Ve, useState as _e, Fragment as ze } from "react";
|
|
4
|
+
import { ArrowDownUp as Be, Info as je } from "lucide-react";
|
|
5
|
+
import { cn as p } from "../../lib/utils.js";
|
|
6
|
+
import { Table as He, TableHeader as Oe, TableRow as Ke, TableHead as j, TableBody as Ue, TableCell as T } from "../ui/table.js";
|
|
7
|
+
import { Card as $e } from "./card.js";
|
|
8
|
+
import { Checkbox as ie } from "./checkbox.js";
|
|
9
|
+
import { Pagination as Fe } from "./pagination.js";
|
|
10
|
+
import { Badge as Ge } from "./badge.js";
|
|
11
|
+
import { Avatar as We } from "./avatar.js";
|
|
12
|
+
import { InputSearch as Je } from "./inputSearch.js";
|
|
13
|
+
import { DropdownMenu as re } from "./dropdownMenu.js";
|
|
14
|
+
import { Button as P } from "./button.js";
|
|
15
|
+
import { ButtonIcon as ne } from "./buttonIcon.js";
|
|
16
|
+
import { Tooltip as H } from "./tooltip.js";
|
|
17
|
+
import { TruncatedText as qe } from "./truncatedText.js";
|
|
18
|
+
import { Separator as Qe } from "../ui/separator.js";
|
|
19
|
+
const Xe = "flex w-full items-center gap-2 whitespace-nowrap rounded-sm font-inherit text-inherit focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring", Ye = 56, O = (e, t) => p(
|
|
20
|
+
// A célula fixa tem fundo próprio, que cobre a borda da linha (tr): por isso ela mesma desenha a borda de baixo,
|
|
21
|
+
// senão o cabeçalho das colunas fixas parece "cortado" (sem a linha) em relação ao resto da tabela.
|
|
22
|
+
"sticky z-[1] border-b",
|
|
23
|
+
e ? "bg-surface-muted border-line" : "bg-inherit border-b-line",
|
|
24
|
+
t && "border-l border-line shadow-[-8px_0_8px_-8px_rgba(0,0,0,0.12)]"
|
|
25
|
+
);
|
|
26
|
+
function Ze(e, t) {
|
|
27
|
+
const n = e.filter((i) => i.pinned === "right"), a = /* @__PURE__ */ new Map();
|
|
28
|
+
let r = t ? Ye : 0;
|
|
29
|
+
for (let i = n.length - 1; i >= 0; i -= 1)
|
|
30
|
+
a.set(n[i].key, r), r += n[i].width ?? 0;
|
|
31
|
+
return { rightByKey: a, firstPinnedKey: n[0]?.key ?? null, actionsPinned: t };
|
|
32
|
+
}
|
|
33
|
+
const K = (e, t) => typeof e == "function" ? e(t) : e === !0, et = (e, t) => t ? (typeof t.items == "function" ? t.items(e) : t.items).filter((a) => !K(a.hidden, e)) : [], tt = (e) => e.toLowerCase().split(/[_\s-]+/).filter(Boolean).map((t) => t.charAt(0).toUpperCase() + t.slice(1)).join(" "), lt = (e) => {
|
|
34
|
+
switch (e.toUpperCase()) {
|
|
35
|
+
case "ATIVO":
|
|
36
|
+
case "ACTIVE":
|
|
37
|
+
case "PAID":
|
|
38
|
+
return "success";
|
|
39
|
+
case "EM_ANALISE":
|
|
40
|
+
case "PENDING":
|
|
41
|
+
case "PENDENTE":
|
|
42
|
+
return "warning";
|
|
43
|
+
case "EM_ANDAMENTO":
|
|
44
|
+
case "PROCESSING":
|
|
45
|
+
case "IN_PROGRESS":
|
|
46
|
+
return "informative";
|
|
47
|
+
case "INATIVO":
|
|
48
|
+
case "INACTIVE":
|
|
49
|
+
return "neutral";
|
|
50
|
+
case "UNPAID":
|
|
51
|
+
case "REJECTED":
|
|
52
|
+
case "CANCELLED":
|
|
53
|
+
case "CANCELED":
|
|
54
|
+
return "error";
|
|
55
|
+
default:
|
|
56
|
+
return "neutral";
|
|
57
|
+
}
|
|
58
|
+
}, st = (e, t, n) => {
|
|
59
|
+
const a = `${t}Label`, r = e[a];
|
|
60
|
+
return typeof r == "string" ? r : tt(n);
|
|
61
|
+
}, nt = (e) => {
|
|
62
|
+
const t = e.picture;
|
|
63
|
+
return t?.trim() ? t : void 0;
|
|
64
|
+
}, at = (e, t) => {
|
|
65
|
+
const { nomeFantasia: n, razaoSocial: a } = e;
|
|
66
|
+
return typeof n == "string" && n.trim() ? n : typeof a == "string" && a.trim() ? a : t;
|
|
67
|
+
}, it = (e, t) => {
|
|
68
|
+
if (t.render)
|
|
69
|
+
return t.render(e);
|
|
70
|
+
const n = e[t.key];
|
|
71
|
+
if (t.type === "status") {
|
|
72
|
+
const a = typeof n == "string" ? n : String(n ?? "");
|
|
73
|
+
return /* @__PURE__ */ s(
|
|
74
|
+
Ge,
|
|
75
|
+
{
|
|
76
|
+
label: st(e, t.key, a),
|
|
77
|
+
variant: lt(a)
|
|
78
|
+
}
|
|
79
|
+
);
|
|
80
|
+
}
|
|
81
|
+
return n;
|
|
82
|
+
}, rt = (e, t, n, a) => {
|
|
83
|
+
const r = a?.(e, t), i = r === void 0 ? it(e, t) : r;
|
|
84
|
+
if (!n)
|
|
85
|
+
return i;
|
|
86
|
+
const f = nt(e);
|
|
87
|
+
return f ? /* @__PURE__ */ d("div", { className: "flex items-center gap-3", children: [
|
|
88
|
+
/* @__PURE__ */ s(
|
|
89
|
+
We,
|
|
90
|
+
{
|
|
91
|
+
imageUrl: f,
|
|
92
|
+
alt: at(e, String(e[t.key] ?? "Avatar")),
|
|
93
|
+
size: "md"
|
|
94
|
+
}
|
|
95
|
+
),
|
|
96
|
+
/* @__PURE__ */ s("div", { className: "min-w-0", children: i })
|
|
97
|
+
] }) : i;
|
|
98
|
+
};
|
|
99
|
+
function ot({
|
|
100
|
+
title: e,
|
|
101
|
+
showSelectionActions: t,
|
|
102
|
+
selectedRowCount: n,
|
|
103
|
+
onClearSelected: a,
|
|
104
|
+
onDeleteSelected: r,
|
|
105
|
+
bulkActions: i = [],
|
|
106
|
+
hideDeleteAction: f = !1,
|
|
107
|
+
showFilterButton: c = !1,
|
|
108
|
+
showSearchInput: k = !1,
|
|
109
|
+
onFilterClick: w,
|
|
110
|
+
handleSearchValueChange: v,
|
|
111
|
+
customFilterTrigger: N
|
|
112
|
+
}) {
|
|
113
|
+
return !!e || t || k || c || v !== void 0 || w !== void 0 || N !== void 0 ? /* @__PURE__ */ d("div", { className: "flex flex-col gap-md", children: [
|
|
114
|
+
/* @__PURE__ */ d("div", { className: "flex lg:items-center justify-between gap-md flex-col lg:flex-row items-start", children: [
|
|
115
|
+
/* @__PURE__ */ s(
|
|
116
|
+
qe,
|
|
117
|
+
{
|
|
118
|
+
text: e ?? "",
|
|
119
|
+
className: "min-w-0 flex-1 truncate text-base text-start leading-md font-semibold"
|
|
120
|
+
}
|
|
121
|
+
),
|
|
122
|
+
/* @__PURE__ */ d("div", { className: "flex flex-col lg:flex-row shrink-0 items-center gap-md lg:w-fit w-full", children: [
|
|
123
|
+
t ? /* @__PURE__ */ d("div", { className: "flex items-center gap-md lg:justify-end justify-between lg:w-fit w-full", children: [
|
|
124
|
+
/* @__PURE__ */ d("div", { className: "flex md:gap-1 gap-0 sm:flex-row flex-col sm:items-center items-start justify-center", children: [
|
|
125
|
+
/* @__PURE__ */ d("p", { className: "text-xs leading-xs text-fg", children: [
|
|
126
|
+
n,
|
|
127
|
+
" itens selecionados /"
|
|
128
|
+
] }),
|
|
129
|
+
/* @__PURE__ */ s(
|
|
130
|
+
"button",
|
|
131
|
+
{
|
|
132
|
+
type: "button",
|
|
133
|
+
className: "text-blue-700! cursor-pointer text-xs leading-xs font-medium",
|
|
134
|
+
onClick: a,
|
|
135
|
+
children: "Desfazer seleção"
|
|
136
|
+
}
|
|
137
|
+
)
|
|
138
|
+
] }),
|
|
139
|
+
i.map(
|
|
140
|
+
(m) => m.items ? /* @__PURE__ */ s(
|
|
141
|
+
re,
|
|
142
|
+
{
|
|
143
|
+
align: "end",
|
|
144
|
+
items: m.items,
|
|
145
|
+
trigger: /* @__PURE__ */ s(P, { type: "button", variant: "secondary", size: "md", leftIcon: m.icon, rightIcon: "ChevronDown", label: m.label })
|
|
146
|
+
},
|
|
147
|
+
m.id
|
|
148
|
+
) : /* @__PURE__ */ s(
|
|
149
|
+
P,
|
|
150
|
+
{
|
|
151
|
+
type: "button",
|
|
152
|
+
variant: "secondary",
|
|
153
|
+
size: "md",
|
|
154
|
+
leftIcon: m.icon,
|
|
155
|
+
label: m.label,
|
|
156
|
+
onClick: m.onClick
|
|
157
|
+
},
|
|
158
|
+
m.id
|
|
159
|
+
)
|
|
160
|
+
),
|
|
161
|
+
f ? null : /* @__PURE__ */ s(
|
|
162
|
+
P,
|
|
163
|
+
{
|
|
164
|
+
type: "button",
|
|
165
|
+
variant: "destructive",
|
|
166
|
+
size: "md",
|
|
167
|
+
leftIcon: "Trash",
|
|
168
|
+
label: "Excluir itens",
|
|
169
|
+
onClick: r
|
|
170
|
+
}
|
|
171
|
+
)
|
|
172
|
+
] }) : null,
|
|
173
|
+
/* @__PURE__ */ d("div", { className: "flex flex-wrap items-center gap-3xs lg:w-fit lg:flex-nowrap w-full", children: [
|
|
174
|
+
N || (c || w ? /* @__PURE__ */ s(
|
|
175
|
+
P,
|
|
176
|
+
{
|
|
177
|
+
leftIcon: "ListFilter",
|
|
178
|
+
variant: "ghost",
|
|
179
|
+
onClick: w,
|
|
180
|
+
label: "Filtrar"
|
|
181
|
+
}
|
|
182
|
+
) : null),
|
|
183
|
+
k || v ? /* @__PURE__ */ s(
|
|
184
|
+
Je,
|
|
185
|
+
{
|
|
186
|
+
inputSize: "md",
|
|
187
|
+
className: "lg:max-w-64 w-full",
|
|
188
|
+
handleSearchValue: v
|
|
189
|
+
}
|
|
190
|
+
) : null
|
|
191
|
+
] })
|
|
192
|
+
] })
|
|
193
|
+
] }),
|
|
194
|
+
/* @__PURE__ */ s(Qe, {})
|
|
195
|
+
] }) : null;
|
|
196
|
+
}
|
|
197
|
+
function ct({
|
|
198
|
+
isSelectable: e,
|
|
199
|
+
tableId: t,
|
|
200
|
+
checked: n,
|
|
201
|
+
hasRows: a,
|
|
202
|
+
onToggleAllRows: r
|
|
203
|
+
}) {
|
|
204
|
+
return e ? /* @__PURE__ */ s(j, { className: "w-[56px] min-w-[56px] max-w-[56px] px-0!", children: /* @__PURE__ */ s("div", { className: "flex justify-center", children: /* @__PURE__ */ s(
|
|
205
|
+
ie,
|
|
206
|
+
{
|
|
207
|
+
id: `${t}-select-all`,
|
|
208
|
+
"aria-label": "Select all rows",
|
|
209
|
+
checked: n,
|
|
210
|
+
disabled: !a,
|
|
211
|
+
onCheckedChange: (i) => {
|
|
212
|
+
r(i === !0);
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
) }) }) : null;
|
|
216
|
+
}
|
|
217
|
+
function dt({
|
|
218
|
+
isSelectable: e,
|
|
219
|
+
tableId: t,
|
|
220
|
+
rowId: n,
|
|
221
|
+
isSelected: a,
|
|
222
|
+
onToggleRow: r
|
|
223
|
+
}) {
|
|
224
|
+
return e ? /* @__PURE__ */ s(T, { className: "w-[56px] min-w-[56px] max-w-[56px] px-0!", onClick: (i) => i.stopPropagation(), children: /* @__PURE__ */ s("div", { className: "flex justify-center", children: /* @__PURE__ */ s(
|
|
225
|
+
ie,
|
|
226
|
+
{
|
|
227
|
+
id: `${t}-row-${n}`,
|
|
228
|
+
"aria-label": `Select row ${n}`,
|
|
229
|
+
checked: a,
|
|
230
|
+
onCheckedChange: (i) => {
|
|
231
|
+
r(n, i === !0);
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
) }) }) : null;
|
|
235
|
+
}
|
|
236
|
+
const ae = (e) => e ? /* @__PURE__ */ s(
|
|
237
|
+
H,
|
|
238
|
+
{
|
|
239
|
+
content: e,
|
|
240
|
+
trigger: /* @__PURE__ */ s("span", { className: "inline-flex items-center", "aria-label": "Mais informações", children: /* @__PURE__ */ s(je, { className: "size-3.5 text-fg-subtle", "aria-hidden": "true" }) })
|
|
241
|
+
}
|
|
242
|
+
) : null, ft = (e, t) => {
|
|
243
|
+
if (e.sortable !== !0 || t === void 0)
|
|
244
|
+
return /* @__PURE__ */ d("span", { className: "inline-flex items-center gap-4xs", children: [
|
|
245
|
+
e.label,
|
|
246
|
+
ae(e.tooltip)
|
|
247
|
+
] });
|
|
248
|
+
const n = e.sortValue ?? e.key;
|
|
249
|
+
return /* @__PURE__ */ d(
|
|
250
|
+
"button",
|
|
251
|
+
{
|
|
252
|
+
type: "button",
|
|
253
|
+
className: p(Xe),
|
|
254
|
+
onClick: () => {
|
|
255
|
+
t(n);
|
|
256
|
+
},
|
|
257
|
+
children: [
|
|
258
|
+
/* @__PURE__ */ s("span", { children: e.label }),
|
|
259
|
+
/* @__PURE__ */ s(Be, { className: "h-4 w-4 shrink-0" }),
|
|
260
|
+
ae(e.tooltip)
|
|
261
|
+
]
|
|
262
|
+
}
|
|
263
|
+
);
|
|
264
|
+
};
|
|
265
|
+
function mt({
|
|
266
|
+
rowActionsConfig: e,
|
|
267
|
+
isFirstPinned: t = !1
|
|
268
|
+
}) {
|
|
269
|
+
return e ? /* @__PURE__ */ s(
|
|
270
|
+
j,
|
|
271
|
+
{
|
|
272
|
+
className: p(
|
|
273
|
+
"w-[1%] whitespace-nowrap text-right",
|
|
274
|
+
e.pinned && p(O(!0, t), "right-0 w-[56px] min-w-[56px] max-w-[56px]"),
|
|
275
|
+
e.headerClassName
|
|
276
|
+
),
|
|
277
|
+
children: e.headerLabel
|
|
278
|
+
}
|
|
279
|
+
) : null;
|
|
280
|
+
}
|
|
281
|
+
const ut = (e, t) => t.map((n) => ({
|
|
282
|
+
label: n.label,
|
|
283
|
+
icon: n.icon,
|
|
284
|
+
disabled: K(n.disabled, e),
|
|
285
|
+
onClick: () => {
|
|
286
|
+
n.onClick?.(e);
|
|
287
|
+
}
|
|
288
|
+
}));
|
|
289
|
+
function pt({
|
|
290
|
+
row: e,
|
|
291
|
+
rowActionsConfig: t,
|
|
292
|
+
maxVisibleActions: n,
|
|
293
|
+
isFirstPinned: a = !1
|
|
294
|
+
}) {
|
|
295
|
+
if (!t)
|
|
296
|
+
return null;
|
|
297
|
+
const r = et(e, t), i = t.pinned ? 1 : n, f = p(
|
|
298
|
+
"w-[1%] whitespace-nowrap text-right",
|
|
299
|
+
t.pinned && p(O(!1, a), "right-0 w-[56px] min-w-[56px] max-w-[56px]"),
|
|
300
|
+
t.cellClassName
|
|
301
|
+
);
|
|
302
|
+
return r.length === 0 ? /* @__PURE__ */ s(T, { className: f }) : r.length > i ? /* @__PURE__ */ s(T, { className: f, onClick: (c) => c.stopPropagation(), children: /* @__PURE__ */ s(
|
|
303
|
+
re,
|
|
304
|
+
{
|
|
305
|
+
align: "end",
|
|
306
|
+
size: "md",
|
|
307
|
+
trigger: /* @__PURE__ */ s(
|
|
308
|
+
ne,
|
|
309
|
+
{
|
|
310
|
+
icon: "EllipsisVertical",
|
|
311
|
+
variant: "ghost",
|
|
312
|
+
size: "sm",
|
|
313
|
+
"aria-label": "Mais ações"
|
|
314
|
+
}
|
|
315
|
+
),
|
|
316
|
+
items: ut(e, r)
|
|
317
|
+
}
|
|
318
|
+
) }) : /* @__PURE__ */ s(T, { className: f, onClick: (c) => c.stopPropagation(), children: /* @__PURE__ */ s("div", { className: "flex justify-end gap-1", children: r.map((c) => /* @__PURE__ */ s(
|
|
319
|
+
H,
|
|
320
|
+
{
|
|
321
|
+
content: c.label,
|
|
322
|
+
trigger: /* @__PURE__ */ s(
|
|
323
|
+
ne,
|
|
324
|
+
{
|
|
325
|
+
icon: c.icon,
|
|
326
|
+
variant: c.styleType === "destructive" ? "ghostDestructive" : "ghost",
|
|
327
|
+
size: "sm",
|
|
328
|
+
"aria-label": c.label,
|
|
329
|
+
disabled: K(c.disabled, e),
|
|
330
|
+
onClick: () => {
|
|
331
|
+
c.onClick?.(e);
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
)
|
|
335
|
+
},
|
|
336
|
+
c.id
|
|
337
|
+
)) }) });
|
|
338
|
+
}
|
|
339
|
+
function ht({
|
|
340
|
+
showPagination: e,
|
|
341
|
+
totalItems: t,
|
|
342
|
+
currentPage: n,
|
|
343
|
+
itemsPerPage: a,
|
|
344
|
+
itemsPerPageOptions: r,
|
|
345
|
+
totalPages: i,
|
|
346
|
+
onPageChange: f,
|
|
347
|
+
onItemsPerPageChange: c
|
|
348
|
+
}) {
|
|
349
|
+
return e ? /* @__PURE__ */ s("div", { className: "w-full flex justify-end", children: /* @__PURE__ */ s(
|
|
350
|
+
Fe,
|
|
351
|
+
{
|
|
352
|
+
totalItems: t,
|
|
353
|
+
page: n,
|
|
354
|
+
itemsPerPage: a,
|
|
355
|
+
itemsPerPageOptions: r,
|
|
356
|
+
onPageChange: f,
|
|
357
|
+
onItemsPerPageChange: c,
|
|
358
|
+
showControls: i > 1
|
|
359
|
+
}
|
|
360
|
+
) }) : null;
|
|
361
|
+
}
|
|
362
|
+
function Lt({
|
|
363
|
+
title: e,
|
|
364
|
+
response: t,
|
|
365
|
+
onSort: n,
|
|
366
|
+
onDeleteSelected: a,
|
|
367
|
+
bulkActions: r,
|
|
368
|
+
hideDeleteAction: i,
|
|
369
|
+
onPageChange: f,
|
|
370
|
+
onItemsPerPageChange: c,
|
|
371
|
+
showFilterButton: k = !1,
|
|
372
|
+
showSearchInput: w = !1,
|
|
373
|
+
onFilterClick: v,
|
|
374
|
+
handleSearchValueChange: N,
|
|
375
|
+
getRowId: U,
|
|
376
|
+
showPagination: m = !0,
|
|
377
|
+
itemsPerPageOptions: oe,
|
|
378
|
+
rowActions: ce,
|
|
379
|
+
customFilterTrigger: de,
|
|
380
|
+
filterPanel: fe,
|
|
381
|
+
onRowClick: D,
|
|
382
|
+
getRowClassName: me,
|
|
383
|
+
getRowTooltip: ue,
|
|
384
|
+
emptyState: $,
|
|
385
|
+
className: pe,
|
|
386
|
+
renderCell: he,
|
|
387
|
+
selectedRowIds: F,
|
|
388
|
+
onSelectedRowIdsChange: be,
|
|
389
|
+
testId: ge,
|
|
390
|
+
rowTestId: xe
|
|
391
|
+
}) {
|
|
392
|
+
const G = Ve(), [we, ve] = _e([]), L = F !== void 0, W = L ? F : we, I = (l) => {
|
|
393
|
+
const o = typeof l == "function" ? l(W) : l;
|
|
394
|
+
L || ve(o), be?.(o);
|
|
395
|
+
}, { data: Ne, columns: J, meta: ye } = t, R = ce ?? t.rowActions, A = Ze(t.columns, !!R?.pinned), q = A.actionsPinned && A.firstPinnedKey === null, Q = (l) => l.pinned === "right" ? { right: A.rightByKey.get(l.key), width: l.width, minWidth: l.width, maxWidth: l.width } : void 0, X = (l, o) => l.pinned === "right" ? O(o, A.firstPinnedKey === l.key) : void 0, M = a !== void 0 || L, Ce = Math.max(1, R?.maxVisibleActions ?? 3), h = Ne.map((l, o) => ({
|
|
396
|
+
row: l,
|
|
397
|
+
rowId: String(U?.(l, o) ?? o)
|
|
398
|
+
})), y = ye?.pagination, V = y?.totalItems ?? h.length, E = Math.max(
|
|
399
|
+
1,
|
|
400
|
+
y?.pageSize ?? (h.length === 0 ? 1 : h.length)
|
|
401
|
+
), Y = Math.max(
|
|
402
|
+
1,
|
|
403
|
+
y?.totalPages ?? Math.ceil(V / E)
|
|
404
|
+
), Z = Math.min(Math.max(1, y?.page ?? 1), Y), Se = y !== void 0 && V > h.length, ee = (Z - 1) * E, g = m && !Se ? h.slice(ee, ee + E) : h, te = g.map(({ rowId: l }) => l), _ = new Set(h.map(({ rowId: l }) => l)), Te = W.filter(
|
|
405
|
+
(l) => _.has(l)
|
|
406
|
+
), z = new Set(Te), C = h.filter(({ rowId: l }) => z.has(l)).map(({ row: l }) => l), ke = new Set(te), le = C.length > 0, Ie = M && le, se = g.filter(
|
|
407
|
+
({ rowId: l }) => z.has(l)
|
|
408
|
+
).length, Re = g.length > 0 && se === g.length, Ae = se > 0;
|
|
409
|
+
let B = !1;
|
|
410
|
+
Re ? B = !0 : Ae && (B = "indeterminate");
|
|
411
|
+
const Ee = (l) => {
|
|
412
|
+
I((o) => {
|
|
413
|
+
const b = o.filter((u) => _.has(u));
|
|
414
|
+
return l ? Array.from(/* @__PURE__ */ new Set([...b, ...te])) : b.filter((u) => !ke.has(u));
|
|
415
|
+
});
|
|
416
|
+
}, Pe = (l, o) => {
|
|
417
|
+
I((b) => {
|
|
418
|
+
const u = b.filter(
|
|
419
|
+
(x) => _.has(x)
|
|
420
|
+
);
|
|
421
|
+
return o ? u.includes(l) ? u : [...u, l] : u.filter((x) => x !== l);
|
|
422
|
+
});
|
|
423
|
+
}, De = () => {
|
|
424
|
+
le && (a?.(C), I([]));
|
|
425
|
+
}, Le = () => {
|
|
426
|
+
I([]);
|
|
427
|
+
};
|
|
428
|
+
return /* @__PURE__ */ s($e, { background: "white", hasBorder: !1, className: p("p-0 rounded-lg w-full self-stretch", pe), children: /* @__PURE__ */ d("div", { "data-testid": ge, className: "bg-surface-muted border border-line-subtle p-xl rounded-lg flex flex-col gap-xl w-full self-stretch", children: [
|
|
429
|
+
/* @__PURE__ */ s(
|
|
430
|
+
ot,
|
|
431
|
+
{
|
|
432
|
+
title: e,
|
|
433
|
+
showSelectionActions: Ie,
|
|
434
|
+
selectedRowCount: C.length,
|
|
435
|
+
onClearSelected: Le,
|
|
436
|
+
onDeleteSelected: De,
|
|
437
|
+
hideDeleteAction: i,
|
|
438
|
+
bulkActions: r?.map((l) => ({
|
|
439
|
+
id: l.id,
|
|
440
|
+
label: l.label,
|
|
441
|
+
icon: l.icon,
|
|
442
|
+
onClick: l.onClick ? () => l.onClick?.(C) : void 0,
|
|
443
|
+
items: l.items?.map((o) => ({
|
|
444
|
+
label: o.label,
|
|
445
|
+
subtitle: o.subtitle,
|
|
446
|
+
icon: o.icon,
|
|
447
|
+
customIcon: o.customIcon,
|
|
448
|
+
disabled: o.disabled,
|
|
449
|
+
onClick: () => o.onClick(C)
|
|
450
|
+
}))
|
|
451
|
+
})),
|
|
452
|
+
showFilterButton: k,
|
|
453
|
+
showSearchInput: w,
|
|
454
|
+
onFilterClick: v,
|
|
455
|
+
handleSearchValueChange: N,
|
|
456
|
+
customFilterTrigger: de
|
|
457
|
+
}
|
|
458
|
+
),
|
|
459
|
+
fe,
|
|
460
|
+
/* @__PURE__ */ d(He, { children: [
|
|
461
|
+
/* @__PURE__ */ s(Oe, { children: /* @__PURE__ */ d(Ke, { children: [
|
|
462
|
+
/* @__PURE__ */ s(
|
|
463
|
+
ct,
|
|
464
|
+
{
|
|
465
|
+
isSelectable: M,
|
|
466
|
+
tableId: G,
|
|
467
|
+
checked: B,
|
|
468
|
+
hasRows: g.length > 0,
|
|
469
|
+
onToggleAllRows: Ee
|
|
470
|
+
}
|
|
471
|
+
),
|
|
472
|
+
J.map((l) => /* @__PURE__ */ s(j, { className: p(X(l, !0), l.headerClassName), style: Q(l), children: ft(l, n) }, l.key)),
|
|
473
|
+
/* @__PURE__ */ s(mt, { rowActionsConfig: R, isFirstPinned: q })
|
|
474
|
+
] }) }),
|
|
475
|
+
/* @__PURE__ */ s(Ue, { className: "border-b border-line", children: g.map(({ row: l, rowId: o }) => {
|
|
476
|
+
const b = z.has(o), u = ue?.(l), x = /* @__PURE__ */ d(
|
|
477
|
+
"tr",
|
|
478
|
+
{
|
|
479
|
+
"data-slot": "table-row",
|
|
480
|
+
"data-testid": xe?.(l),
|
|
481
|
+
"data-state": b ? "selected" : void 0,
|
|
482
|
+
onClick: D ? () => D(l) : void 0,
|
|
483
|
+
className: p(
|
|
484
|
+
"border-b transition-colors data-[state=selected]:bg-muted",
|
|
485
|
+
"h-[56px] border-b-line text-fg text-xs leading-xs",
|
|
486
|
+
b ? "bg-surface-disabled!" : "bg-surface hover:bg-surface-hover! active:bg-surface-pressed!",
|
|
487
|
+
D && "cursor-pointer",
|
|
488
|
+
me?.(l)
|
|
489
|
+
),
|
|
490
|
+
children: [
|
|
491
|
+
/* @__PURE__ */ s(
|
|
492
|
+
dt,
|
|
493
|
+
{
|
|
494
|
+
isSelectable: M,
|
|
495
|
+
tableId: G,
|
|
496
|
+
rowId: o,
|
|
497
|
+
isSelected: b,
|
|
498
|
+
onToggleRow: Pe
|
|
499
|
+
}
|
|
500
|
+
),
|
|
501
|
+
J.map((S, Me) => /* @__PURE__ */ s(
|
|
502
|
+
T,
|
|
503
|
+
{
|
|
504
|
+
className: p("text-left", X(S, !1), S.cellClassName),
|
|
505
|
+
style: Q(S),
|
|
506
|
+
children: rt(l, S, Me === 0, he)
|
|
507
|
+
},
|
|
508
|
+
S.key
|
|
509
|
+
)),
|
|
510
|
+
/* @__PURE__ */ s(
|
|
511
|
+
pt,
|
|
512
|
+
{
|
|
513
|
+
row: l,
|
|
514
|
+
rowActionsConfig: R,
|
|
515
|
+
maxVisibleActions: Ce,
|
|
516
|
+
isFirstPinned: q
|
|
517
|
+
}
|
|
518
|
+
)
|
|
519
|
+
]
|
|
520
|
+
}
|
|
521
|
+
);
|
|
522
|
+
return u ? /* @__PURE__ */ s(H, { content: u, trigger: x }, o) : /* @__PURE__ */ s(ze, { children: x }, o);
|
|
523
|
+
}) })
|
|
524
|
+
] }),
|
|
525
|
+
g.length === 0 && $ ? /* @__PURE__ */ s("div", { className: "border-b border-line px-xs py-md text-center", children: $ }) : null,
|
|
526
|
+
/* @__PURE__ */ s(
|
|
527
|
+
ht,
|
|
528
|
+
{
|
|
529
|
+
showPagination: m,
|
|
530
|
+
totalItems: V,
|
|
531
|
+
currentPage: Z,
|
|
532
|
+
itemsPerPage: E,
|
|
533
|
+
itemsPerPageOptions: oe,
|
|
534
|
+
totalPages: Y,
|
|
535
|
+
onPageChange: f,
|
|
536
|
+
onItemsPerPageChange: c
|
|
537
|
+
}
|
|
538
|
+
)
|
|
539
|
+
] }) });
|
|
540
|
+
}
|
|
541
|
+
export {
|
|
542
|
+
Lt as Table
|
|
543
|
+
};
|
|
544
|
+
//# sourceMappingURL=table.js.map
|