@kapiuara/ui 0.11.0 → 0.13.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/README.md +1197 -49
- package/dist/components/chat/KapiChatDivider.d.ts +1 -2
- package/dist/components/chat/KapiChatDivider.js +1 -0
- package/dist/components/chat/KapiChatList.d.ts +10 -6
- package/dist/components/chat/KapiChatList.js +12 -11
- package/dist/components/chat/KapiChatThread.d.ts +2 -3
- package/dist/components/chat/KapiChatThread.js +73 -52
- package/dist/components/chat/KapiComposer.d.ts +3 -4
- package/dist/components/chat/KapiComposer.js +2 -1
- package/dist/components/chat/KapiMessageBubble.d.ts +3 -4
- package/dist/components/chat/KapiMessageBubble.js +1 -0
- package/dist/components/chat/KapiTypingIndicator.d.ts +2 -3
- package/dist/components/chat/KapiTypingIndicator.js +1 -0
- package/dist/components/chat/chatLogic.d.ts +6 -0
- package/dist/components/chat/chatLogic.js +2 -2
- package/dist/components/chat/index.d.ts +18 -14
- package/dist/components/data/KapiBarChart.d.ts +23 -15
- package/dist/components/data/KapiBarChart.js +54 -51
- package/dist/components/data/KapiDataTable.d.ts +56 -0
- package/dist/components/data/KapiDataTable.js +143 -0
- package/dist/components/data/KapiEventCalendar.d.ts +9 -4
- package/dist/components/data/KapiEventCalendar.js +100 -96
- package/dist/components/data/KapiHeatmap.d.ts +8 -9
- package/dist/components/data/KapiHeatmap.js +64 -63
- package/dist/components/data/KapiLineChart.d.ts +19 -11
- package/dist/components/data/KapiLineChart.js +59 -55
- package/dist/components/data/KapiPagination.d.ts +6 -4
- package/dist/components/data/KapiPagination.js +2 -1
- package/dist/components/data/KapiPaginationFooter.d.ts +2 -3
- package/dist/components/data/KapiPaginationFooter.js +7 -4
- package/dist/components/data/KapiSparkline.d.ts +8 -9
- package/dist/components/data/KapiSparkline.js +1 -0
- package/dist/components/data/KapiTable.d.ts +7 -337
- package/dist/components/data/KapiTable.js +417 -692
- package/dist/components/data/KapiTableFilter.d.ts +16 -10
- package/dist/components/data/KapiTableFilter.js +50 -48
- package/dist/components/data/KapiTableRow.d.ts +55 -0
- package/dist/components/data/KapiTableRow.js +103 -0
- package/dist/components/data/KapiTableToolbar.d.ts +37 -0
- package/dist/components/data/KapiTableToolbar.js +237 -0
- package/dist/components/data/chartFrame.d.ts +18 -2
- package/dist/components/data/chartFrame.js +54 -55
- package/dist/components/data/datasetSelectionLogic.d.ts +7 -4
- package/dist/components/data/datasetSelectionLogic.js +3 -2
- package/dist/components/data/eventCalendarLogic.d.ts +7 -3
- package/dist/components/data/eventCalendarLogic.js +5 -4
- package/dist/components/data/index.d.ts +108 -30
- package/dist/components/data/rowClickLogic.d.ts +51 -0
- package/dist/components/data/rowClickLogic.js +56 -0
- package/dist/components/data/tableCells.d.ts +38 -0
- package/dist/components/data/tableCells.js +121 -0
- package/dist/components/data/tableHeaderMenu.d.ts +21 -0
- package/dist/components/data/tableHeaderMenu.js +45 -0
- package/dist/components/data/tableLabels.d.ts +76 -0
- package/dist/components/data/tableLabels.js +48 -0
- package/dist/components/data/tableLogic.d.ts +119 -21
- package/dist/components/data/tableLogic.js +121 -84
- package/dist/components/data/tablePaginationLogic.d.ts +15 -0
- package/dist/components/data/tablePaginationLogic.js +15 -0
- package/dist/components/data/tableResizeLogic.d.ts +12 -4
- package/dist/components/data/tableResizeLogic.js +14 -10
- package/dist/components/data/tableTypes.d.ts +509 -0
- package/dist/components/data/useColumnResize.d.ts +28 -0
- package/dist/components/data/useColumnResize.js +116 -0
- package/dist/components/data/useRowKeyWarning.d.ts +10 -0
- package/dist/components/data/useRowKeyWarning.js +29 -0
- package/dist/components/data/useTableEdges.d.ts +15 -0
- package/dist/components/data/useTableEdges.js +26 -0
- package/dist/components/data/useTableSelection.d.ts +51 -0
- package/dist/components/data/useTableSelection.js +80 -0
- package/dist/components/display/KapiAnnotation.d.ts +10 -9
- package/dist/components/display/KapiAnnotation.js +98 -101
- package/dist/components/display/KapiAvatar.d.ts +19 -13
- package/dist/components/display/KapiAvatar.js +26 -24
- package/dist/components/display/KapiAvatarGroup.d.ts +26 -10
- package/dist/components/display/KapiAvatarGroup.js +26 -24
- package/dist/components/display/KapiBadge.d.ts +23 -12
- package/dist/components/display/KapiBadge.js +20 -15
- package/dist/components/display/KapiComment.d.ts +1 -2
- package/dist/components/display/KapiComment.js +3 -2
- package/dist/components/display/KapiCommentComposer.d.ts +2 -3
- package/dist/components/display/KapiCommentComposer.js +3 -2
- package/dist/components/display/KapiDescriptionList.d.ts +6 -5
- package/dist/components/display/KapiDescriptionList.js +1 -0
- package/dist/components/display/KapiFileItem.d.ts +2 -3
- package/dist/components/display/KapiFileItem.js +3 -2
- package/dist/components/display/KapiFileViewer.d.ts +8 -9
- package/dist/components/display/KapiFileViewer.js +1 -0
- package/dist/components/display/KapiIconTile.d.ts +7 -6
- package/dist/components/display/KapiIconTile.js +1 -0
- package/dist/components/display/KapiStat.d.ts +9 -8
- package/dist/components/display/KapiStat.js +1 -0
- package/dist/components/display/KapiTag.d.ts +5 -4
- package/dist/components/display/KapiTag.js +1 -0
- package/dist/components/display/KapiTimeline.d.ts +6 -5
- package/dist/components/display/KapiTimeline.js +1 -0
- package/dist/components/display/KapiTruncate.d.ts +1 -2
- package/dist/components/display/KapiTruncate.js +1 -0
- package/dist/components/display/fileItemLogic.d.ts +1 -1
- package/dist/components/display/iconTileLogic.d.ts +2 -2
- package/dist/components/display/index.d.ts +86 -44
- package/dist/components/display/statLogic.d.ts +1 -1
- package/dist/components/feedback/KapiAlert.d.ts +30 -7
- package/dist/components/feedback/KapiAlert.js +47 -23
- package/dist/components/feedback/KapiBulkBar.d.ts +11 -6
- package/dist/components/feedback/KapiBulkBar.js +6 -3
- package/dist/components/feedback/KapiCountdown.d.ts +15 -12
- package/dist/components/feedback/KapiCountdown.js +17 -16
- package/dist/components/feedback/KapiEmpty.d.ts +3 -2
- package/dist/components/feedback/KapiEmpty.js +1 -0
- package/dist/components/feedback/KapiFab.d.ts +39 -9
- package/dist/components/feedback/KapiFab.js +172 -91
- package/dist/components/feedback/KapiOfflineBanner.d.ts +7 -6
- package/dist/components/feedback/KapiOfflineBanner.js +1 -0
- package/dist/components/feedback/KapiProgress.d.ts +8 -7
- package/dist/components/feedback/KapiProgress.js +1 -0
- package/dist/components/feedback/KapiSkeleton.d.ts +6 -4
- package/dist/components/feedback/KapiToastContainer.d.ts +16 -8
- package/dist/components/feedback/KapiToastContainer.js +118 -63
- package/dist/components/feedback/KapiTour.d.ts +6 -7
- package/dist/components/feedback/KapiTour.js +91 -86
- package/dist/components/feedback/KapiUnsavedBar.d.ts +15 -8
- package/dist/components/feedback/KapiUnsavedBar.js +8 -4
- package/dist/components/feedback/bulkBarLogic.d.ts +6 -1
- package/dist/components/feedback/bulkBarLogic.js +7 -4
- package/dist/components/feedback/countdownLogic.d.ts +19 -11
- package/dist/components/feedback/fabLogic.d.ts +28 -0
- package/dist/components/feedback/fabLogic.js +18 -2
- package/dist/components/feedback/index.d.ts +65 -33
- package/dist/components/feedback/toastLayer.d.ts +18 -0
- package/dist/components/feedback/toastLayer.js +22 -0
- package/dist/components/feedback/toastStore.d.ts +97 -9
- package/dist/components/feedback/toastStore.js +132 -29
- package/dist/components/feedback/tourLogic.d.ts +4 -16
- package/dist/components/feedback/unsavedBarLogic.d.ts +7 -1
- package/dist/components/feedback/unsavedBarLogic.js +9 -5
- package/dist/components/inputs/KapiAutocomplete.d.ts +73 -48
- package/dist/components/inputs/KapiAutocomplete.js +128 -146
- package/dist/components/inputs/KapiButton.d.ts +30 -11
- package/dist/components/inputs/KapiButton.js +34 -27
- package/dist/components/inputs/KapiCalendar.d.ts +14 -8
- package/dist/components/inputs/KapiCalendar.js +36 -34
- package/dist/components/inputs/KapiCalendarGrid.d.ts +11 -6
- package/dist/components/inputs/KapiCalendarGrid.js +44 -38
- package/dist/components/inputs/KapiCheckCard.d.ts +2 -3
- package/dist/components/inputs/KapiCheckCard.js +1 -0
- package/dist/components/inputs/KapiCheckbox.d.ts +1 -1
- package/dist/components/inputs/KapiChecklist.d.ts +77 -0
- package/dist/components/inputs/KapiChecklist.js +175 -0
- package/dist/components/inputs/KapiDatePicker.d.ts +60 -22
- package/dist/components/inputs/KapiDatePicker.js +122 -100
- package/dist/components/inputs/KapiDateRangePicker.d.ts +44 -10
- package/dist/components/inputs/KapiDateRangePicker.js +148 -120
- package/dist/components/inputs/KapiFacetedSearch.d.ts +16 -8
- package/dist/components/inputs/KapiFacetedSearch.js +131 -168
- package/dist/components/inputs/KapiField.d.ts +16 -8
- package/dist/components/inputs/KapiField.js +44 -43
- package/dist/components/inputs/KapiFileUpload.d.ts +15 -16
- package/dist/components/inputs/KapiFileUpload.js +1 -0
- package/dist/components/inputs/KapiIconButton.d.ts +1 -1
- package/dist/components/inputs/KapiInput.d.ts +13 -12
- package/dist/components/inputs/KapiInput.js +70 -70
- package/dist/components/inputs/KapiInputGroup.d.ts +13 -10
- package/dist/components/inputs/KapiInputGroup.js +21 -19
- package/dist/components/inputs/KapiMaskedInput.d.ts +15 -15
- package/dist/components/inputs/KapiMaskedInput.js +51 -48
- package/dist/components/inputs/KapiNumberStepper.d.ts +30 -18
- package/dist/components/inputs/KapiNumberStepper.js +80 -65
- package/dist/components/inputs/KapiRadio.d.ts +1 -1
- package/dist/components/inputs/KapiRating.d.ts +40 -23
- package/dist/components/inputs/KapiRating.js +80 -65
- package/dist/components/inputs/KapiSearchChip.d.ts +80 -0
- package/dist/components/inputs/KapiSearchChip.js +77 -0
- package/dist/components/inputs/KapiSegmented.d.ts +49 -16
- package/dist/components/inputs/KapiSegmented.js +72 -51
- package/dist/components/inputs/KapiSelect.d.ts +120 -39
- package/dist/components/inputs/KapiSelect.js +309 -379
- package/dist/components/inputs/KapiSelectMenu.d.ts +38 -0
- package/dist/components/inputs/KapiSelectMenu.js +173 -0
- package/dist/components/inputs/KapiSlider.d.ts +37 -19
- package/dist/components/inputs/KapiSlider.js +67 -54
- package/dist/components/inputs/KapiSwitch.d.ts +13 -7
- package/dist/components/inputs/KapiSwitch.js +30 -21
- package/dist/components/inputs/KapiTagInput.d.ts +35 -24
- package/dist/components/inputs/KapiTagInput.js +77 -66
- package/dist/components/inputs/KapiTextarea.d.ts +12 -11
- package/dist/components/inputs/KapiTextarea.js +71 -49
- package/dist/components/inputs/asyncSelectLogic.d.ts +8 -4
- package/dist/components/inputs/asyncSelectLogic.js +13 -12
- package/dist/components/inputs/autocompleteLogic.d.ts +2 -29
- package/dist/components/inputs/autocompleteLogic.js +6 -6
- package/dist/components/inputs/checkControl.d.ts +3 -3
- package/dist/components/inputs/checkControl.js +2 -0
- package/dist/components/inputs/checklistLogic.d.ts +33 -0
- package/dist/components/inputs/checklistLogic.js +16 -0
- package/dist/components/inputs/datePickerLogic.d.ts +63 -13
- package/dist/components/inputs/datePickerLogic.js +119 -50
- package/dist/components/inputs/dateRangeLogic.d.ts +8 -3
- package/dist/components/inputs/dateRangeLogic.js +49 -43
- package/dist/components/inputs/facetedSearchLogic.d.ts +1 -3
- package/dist/components/inputs/facetedSearchLogic.js +4 -5
- package/dist/components/inputs/fieldLogic.d.ts +37 -1
- package/dist/components/inputs/fieldLogic.js +36 -19
- package/dist/components/inputs/index.d.ts +118 -55
- package/dist/components/inputs/inputGroupLogic.d.ts +1 -1
- package/dist/components/inputs/inputLogic.d.ts +1 -1
- package/dist/components/inputs/maskLogic.d.ts +3 -2
- package/dist/components/inputs/maskLogic.js +12 -10
- package/dist/components/inputs/ownField.d.ts +37 -0
- package/dist/components/inputs/ownField.js +37 -0
- package/dist/components/inputs/searchChipLogic.d.ts +33 -0
- package/dist/components/inputs/searchChipLogic.js +13 -0
- package/dist/components/inputs/segmentedLogic.d.ts +4 -3
- package/dist/components/inputs/segmentedLogic.js +7 -11
- package/dist/components/inputs/selectKeyLogic.d.ts +45 -0
- package/dist/components/inputs/selectKeyLogic.js +52 -0
- package/dist/components/inputs/selectLogic.d.ts +79 -22
- package/dist/components/inputs/selectLogic.js +87 -51
- package/dist/components/inputs/useCalendarFocus.js +13 -12
- package/dist/components/inputs/useSelectCreate.d.ts +22 -0
- package/dist/components/inputs/useSelectCreate.js +35 -0
- package/dist/components/inputs/useSelectSource.d.ts +39 -0
- package/dist/components/inputs/useSelectSource.js +42 -0
- package/dist/components/labelsLogic.d.ts +11 -1
- package/dist/components/layout/KapiAccessCard.d.ts +11 -12
- package/dist/components/layout/KapiAccessCard.js +41 -37
- package/dist/components/layout/KapiAccountMenu.d.ts +23 -8
- package/dist/components/layout/KapiAccountMenu.js +124 -104
- package/dist/components/layout/KapiCard.d.ts +14 -7
- package/dist/components/layout/KapiCard.js +1 -0
- package/dist/components/layout/KapiCluster.d.ts +8 -7
- package/dist/components/layout/KapiCluster.js +1 -0
- package/dist/components/layout/KapiContextSlot.d.ts +10 -11
- package/dist/components/layout/KapiContextSlot.js +97 -92
- package/dist/components/layout/KapiDivider.d.ts +3 -2
- package/dist/components/layout/KapiDivider.js +1 -0
- package/dist/components/layout/KapiGrid.d.ts +8 -7
- package/dist/components/layout/KapiGrid.js +1 -0
- package/dist/components/layout/KapiMasonry.d.ts +1 -2
- package/dist/components/layout/KapiMasonry.js +1 -0
- package/dist/components/layout/KapiNotificationBell.d.ts +14 -15
- package/dist/components/layout/KapiNotificationBell.js +113 -116
- package/dist/components/layout/KapiPageHeader.d.ts +14 -6
- package/dist/components/layout/KapiPageHeader.js +99 -87
- package/dist/components/layout/KapiPanelParts.d.ts +11 -7
- package/dist/components/layout/KapiPanelParts.js +1 -0
- package/dist/components/layout/KapiRail.d.ts +17 -11
- package/dist/components/layout/KapiRail.js +96 -83
- package/dist/components/layout/KapiRailAccount.d.ts +26 -0
- package/dist/components/layout/KapiRailAccount.js +37 -0
- package/dist/components/layout/KapiRoot.d.ts +85 -0
- package/dist/components/layout/KapiRoot.js +58 -0
- package/dist/components/layout/KapiScrollArea.d.ts +2 -3
- package/dist/components/layout/KapiScrollArea.js +1 -0
- package/dist/components/layout/KapiShell.d.ts +15 -10
- package/dist/components/layout/KapiShell.js +51 -46
- package/dist/components/layout/KapiStack.d.ts +6 -5
- package/dist/components/layout/KapiStack.js +1 -0
- package/dist/components/layout/KapiThemeScript.d.ts +23 -0
- package/dist/components/layout/KapiThemeScript.js +13 -0
- package/dist/components/layout/accessCardLogic.d.ts +2 -2
- package/dist/components/layout/index.d.ts +55 -35
- package/dist/components/layout/notificationBellLogic.d.ts +1 -1
- package/dist/components/layout/railContext.d.ts +6 -0
- package/dist/components/layout/railContext.js +6 -0
- package/dist/components/layout/railLogic.d.ts +14 -14
- package/dist/components/layout/useMasonrySpans.js +31 -30
- package/dist/components/layout/useRailOverflow.js +30 -29
- package/dist/components/locale/KapiLocaleProvider.d.ts +33 -4
- package/dist/components/locale/KapiLocaleProvider.js +28 -17
- package/dist/components/locale/index.d.ts +7 -5
- package/dist/components/locale/labelRegistry.d.ts +68 -58
- package/dist/components/locale/localeLogic.d.ts +20 -0
- package/dist/components/locale/localeLogic.js +30 -0
- package/dist/components/navigation/CtxSlidingList.d.ts +5 -3
- package/dist/components/navigation/CtxSlidingList.js +15 -14
- package/dist/components/navigation/KapiAccordion.d.ts +9 -8
- package/dist/components/navigation/KapiAccordion.js +29 -29
- package/dist/components/navigation/KapiBreadcrumb.d.ts +4 -5
- package/dist/components/navigation/KapiBreadcrumb.js +1 -0
- package/dist/components/navigation/KapiCollapsiblePanel.d.ts +22 -16
- package/dist/components/navigation/KapiCollapsiblePanel.js +46 -43
- package/dist/components/navigation/KapiContextPanel.d.ts +31 -32
- package/dist/components/navigation/KapiContextPanel.js +119 -108
- package/dist/components/navigation/KapiFilterChips.d.ts +15 -10
- package/dist/components/navigation/KapiFilterChips.js +27 -22
- package/dist/components/navigation/KapiNavBadge.d.ts +7 -5
- package/dist/components/navigation/KapiNavBadge.js +12 -10
- package/dist/components/navigation/KapiPanelGroup.d.ts +22 -23
- package/dist/components/navigation/KapiPanelGroup.js +62 -60
- package/dist/components/navigation/KapiSteps.d.ts +4 -5
- package/dist/components/navigation/KapiSteps.js +1 -0
- package/dist/components/navigation/KapiTabs.d.ts +34 -16
- package/dist/components/navigation/KapiTabs.js +58 -49
- package/dist/components/navigation/KapiTree.d.ts +58 -18
- package/dist/components/navigation/KapiTree.js +135 -83
- package/dist/components/navigation/KapiWizard.d.ts +21 -11
- package/dist/components/navigation/KapiWizard.js +79 -72
- package/dist/components/navigation/MiniNavItem.d.ts +3 -4
- package/dist/components/navigation/MiniNavItem.js +1 -0
- package/dist/components/navigation/breadcrumbLogic.d.ts +1 -1
- package/dist/components/navigation/contextPanelLogic.d.ts +9 -5
- package/dist/components/navigation/filterChipsLogic.d.ts +13 -7
- package/dist/components/navigation/filterChipsLogic.js +12 -14
- package/dist/components/navigation/index.d.ts +75 -39
- package/dist/components/navigation/panelGroupLogic.d.ts +5 -1
- package/dist/components/navigation/panelMini.d.ts +1 -1
- package/dist/components/navigation/panelMini.js +1 -1
- package/dist/components/navigation/tabsLogic.d.ts +3 -2
- package/dist/components/navigation/tabsLogic.js +8 -12
- package/dist/components/navigation/treeLogic.d.ts +5 -5
- package/dist/components/navigation/treeLogic.js +3 -9
- package/dist/components/overlays/KapiCanvasForm.d.ts +8 -8
- package/dist/components/overlays/KapiCanvasForm.js +1 -1
- package/dist/components/overlays/KapiCommandPalette.d.ts +14 -10
- package/dist/components/overlays/KapiCommandPalette.js +70 -67
- package/dist/components/overlays/KapiConfirm.d.ts +28 -11
- package/dist/components/overlays/KapiConfirm.js +47 -44
- package/dist/components/overlays/KapiContextMenu.d.ts +77 -16
- package/dist/components/overlays/KapiContextMenu.js +55 -70
- package/dist/components/overlays/KapiDialogHost.d.ts +5 -7
- package/dist/components/overlays/KapiDialogHost.js +67 -64
- package/dist/components/overlays/KapiDropdown.d.ts +43 -21
- package/dist/components/overlays/KapiDropdown.js +31 -80
- package/dist/components/overlays/KapiLoading.d.ts +10 -5
- package/dist/components/overlays/KapiLoading.js +28 -25
- package/dist/components/overlays/KapiMenuButton.d.ts +48 -17
- package/dist/components/overlays/KapiMenuButton.js +73 -95
- package/dist/components/overlays/KapiModal.d.ts +16 -8
- package/dist/components/overlays/KapiModal.js +72 -65
- package/dist/components/overlays/KapiOffcanvas.d.ts +23 -13
- package/dist/components/overlays/KapiOffcanvas.js +159 -143
- package/dist/components/overlays/KapiOffcanvasStack.d.ts +4 -4
- package/dist/components/overlays/KapiOffcanvasStack.js +63 -52
- package/dist/components/overlays/KapiPhotoView.d.ts +7 -8
- package/dist/components/overlays/KapiPhotoView.js +67 -64
- package/dist/components/overlays/KapiPopover.d.ts +18 -17
- package/dist/components/overlays/KapiPopover.js +32 -42
- package/dist/components/overlays/KapiShapeSheet.d.ts +18 -12
- package/dist/components/overlays/KapiShapeSheet.js +51 -45
- package/dist/components/overlays/KapiSplitModal.d.ts +12 -11
- package/dist/components/overlays/KapiSplitModal.js +78 -68
- package/dist/components/overlays/KapiTooltip.d.ts +20 -10
- package/dist/components/overlays/KapiTooltip.js +91 -68
- package/dist/components/overlays/commandPaletteLogic.d.ts +2 -4
- package/dist/components/overlays/commandPaletteLogic.js +2 -2
- package/dist/components/overlays/dialogStore.d.ts +41 -20
- package/dist/components/overlays/dialogStore.js +4 -4
- package/dist/components/overlays/dialogUtils.d.ts +22 -0
- package/dist/components/overlays/dialogUtils.js +6 -2
- package/dist/components/overlays/index.d.ts +48 -38
- package/dist/components/overlays/menuButtonLogic.d.ts +33 -31
- package/dist/components/overlays/menuButtonLogic.js +9 -3
- package/dist/components/overlays/menuKeyboardLogic.d.ts +42 -8
- package/dist/components/overlays/menuKeyboardLogic.js +46 -15
- package/dist/components/overlays/menuList.d.ts +91 -0
- package/dist/components/overlays/menuList.js +223 -0
- package/dist/components/overlays/modalStack.d.ts +21 -0
- package/dist/components/overlays/modalStack.js +23 -0
- package/dist/components/overlays/offcanvasCompanion.d.ts +1 -1
- package/dist/components/overlays/offcanvasResize.d.ts +1 -1
- package/dist/components/overlays/offcanvasSide.d.ts +12 -1
- package/dist/components/overlays/offcanvasSide.js +4 -4
- package/dist/components/overlays/popoverLogic.d.ts +12 -12
- package/dist/components/overlays/useExitPresence.js +23 -22
- package/dist/components/overlays/useNativeDialog.d.ts +15 -4
- package/dist/components/overlays/useNativeDialog.js +52 -33
- package/dist/components/rootProps.d.ts +6 -4
- package/dist/components/tone.d.ts +55 -0
- package/dist/components/tone.js +92 -0
- package/dist/css/base.css +1 -0
- package/dist/css/components/chat/chat.css +1 -0
- package/dist/css/components/data/KapiBarChart.css +1 -0
- package/dist/css/components/data/KapiEventCalendar.css +1 -0
- package/dist/css/components/data/KapiHeatmap.css +1 -0
- package/dist/css/components/data/KapiLineChart.css +1 -0
- package/dist/css/components/data/KapiSparkline.css +1 -0
- package/dist/css/components/data/KapiTable.css +1 -0
- package/dist/css/components/data/KapiTableFilter.css +1 -0
- package/dist/css/components/display/KapiAnnotation.css +1 -0
- package/dist/css/components/display/KapiComment.css +1 -0
- package/dist/css/components/display/KapiFileItem.css +1 -0
- package/dist/css/components/display/KapiFileViewer.css +1 -0
- package/dist/css/components/display/KapiTruncate.css +1 -0
- package/dist/css/components/display/display.css +1 -0
- package/dist/css/components/feedback/KapiBulkBar.css +1 -0
- package/dist/css/components/feedback/KapiOfflineBanner.css +1 -0
- package/dist/css/components/feedback/KapiUnsavedBar.css +1 -0
- package/dist/css/components/feedback/feedback.css +1 -0
- package/dist/css/components/inputs/KapiAutocomplete.css +1 -0
- package/dist/css/components/inputs/KapiButton.css +1 -0
- package/dist/css/components/inputs/KapiChecklist.css +1 -0
- package/dist/css/components/inputs/KapiDatePicker.css +1 -0
- package/dist/css/components/inputs/KapiFacetedSearch.css +1 -0
- package/dist/css/components/inputs/KapiFileUpload.css +1 -0
- package/dist/css/components/inputs/KapiInputGroup.css +1 -0
- package/dist/css/components/inputs/KapiSearchChip.css +1 -0
- package/dist/css/components/inputs/KapiSelect.css +1 -0
- package/dist/css/components/inputs/KapiTagInput.css +1 -0
- package/dist/css/components/inputs/checkControl.css +1 -0
- package/dist/css/components/inputs/inputsExtra.css +1 -0
- package/dist/css/components/layout/KapiAccessCard.css +1 -0
- package/dist/css/components/layout/KapiAccountMenu.css +1 -0
- package/dist/css/components/layout/KapiCard.css +1 -0
- package/dist/css/components/layout/KapiDivider.css +1 -0
- package/dist/css/components/layout/KapiMasonry.css +1 -0
- package/dist/css/components/layout/KapiNotificationBell.css +1 -0
- package/dist/css/components/layout/KapiPageHeader.css +1 -0
- package/dist/css/components/layout/KapiPanelParts.css +1 -0
- package/dist/css/components/layout/KapiRail.css +1 -0
- package/dist/css/components/layout/KapiRoot.css +1 -0
- package/dist/css/components/layout/KapiScrollArea.css +1 -0
- package/dist/css/components/layout/layout-primitives.css +1 -0
- package/dist/css/components/navigation/KapiFilterChips.css +1 -0
- package/dist/css/components/navigation/KapiNavBadge.css +1 -0
- package/dist/css/components/navigation/KapiSteps.css +1 -0
- package/dist/css/components/navigation/navigation.css +1 -0
- package/dist/css/components/overlays/KapiCommandPalette.css +1 -0
- package/dist/css/components/overlays/KapiConfirm.css +1 -0
- package/dist/css/components/overlays/KapiModal.css +1 -0
- package/dist/css/components/overlays/KapiOffcanvas.css +1 -0
- package/dist/css/components/overlays/KapiPopover.css +1 -0
- package/dist/css/components/overlays/KapiSplitModal.css +1 -0
- package/dist/css/components/overlays/overlays.css +1 -0
- package/dist/css/none.js +1 -0
- package/dist/hooks/dataColorLogic.d.ts +1 -1
- package/dist/hooks/dateFormat.js +13 -13
- package/dist/hooks/directionLogic.d.ts +32 -0
- package/dist/hooks/directionLogic.js +7 -0
- package/dist/hooks/fieldErrorsLogic.d.ts +35 -0
- package/dist/hooks/fieldErrorsLogic.js +13 -0
- package/dist/hooks/focusLogic.js +8 -7
- package/dist/hooks/hotkeyLogic.d.ts +5 -1
- package/dist/hooks/hotkeyLogic.js +2 -2
- package/dist/hooks/index.d.ts +122 -57
- package/dist/hooks/kapiRoot.d.ts +11 -4
- package/dist/hooks/kapiRoot.js +18 -5
- package/dist/hooks/mergeRefs.d.ts +9 -0
- package/dist/hooks/mergeRefs.js +15 -0
- package/dist/hooks/onlineStatusLogic.d.ts +4 -4
- package/dist/hooks/ownerDocument.d.ts +26 -0
- package/dist/hooks/ownerDocument.js +24 -0
- package/dist/hooks/portalRoot.d.ts +19 -0
- package/dist/hooks/portalRoot.js +10 -0
- package/dist/hooks/rafThrottle.d.ts +12 -4
- package/dist/hooks/rafThrottle.js +43 -10
- package/dist/hooks/rangeSelectLogic.d.ts +47 -0
- package/dist/hooks/rangeSelectLogic.js +29 -0
- package/dist/hooks/recentLogic.d.ts +3 -3
- package/dist/hooks/reducedMotion.js +11 -3
- package/dist/hooks/rightClick.d.ts +5 -1
- package/dist/hooks/rightClick.js +16 -15
- package/dist/hooks/scrollCollapseLogic.d.ts +2 -2
- package/dist/hooks/seriesPaletteLogic.d.ts +1 -1
- package/dist/hooks/shallowStable.d.ts +12 -0
- package/dist/hooks/shallowStable.js +17 -0
- package/dist/hooks/slidingIndicatorLogic.d.ts +4 -0
- package/dist/hooks/themeColorsLogic.d.ts +1 -1
- package/dist/hooks/themeDeriveLogic.d.ts +1 -2
- package/dist/hooks/themeRadiiLogic.d.ts +1 -1
- package/dist/hooks/themeScript.d.ts +10 -0
- package/dist/hooks/themeScript.js +5 -0
- package/dist/hooks/useAsyncLoader.d.ts +51 -0
- package/dist/hooks/useAsyncLoader.js +77 -0
- package/dist/hooks/useAsyncTasks.d.ts +19 -0
- package/dist/hooks/useAsyncTasks.js +37 -0
- package/dist/hooks/useBottomBarInset.d.ts +7 -0
- package/dist/hooks/useBottomBarInset.js +25 -0
- package/dist/hooks/useControllableState.d.ts +21 -0
- package/dist/hooks/useControllableState.js +17 -0
- package/dist/hooks/useDismiss.d.ts +40 -0
- package/dist/hooks/useDismiss.js +42 -0
- package/dist/hooks/useDragScroll.d.ts +10 -0
- package/dist/hooks/useDragScroll.js +36 -25
- package/dist/hooks/useFieldErrors.d.ts +39 -0
- package/dist/hooks/useFieldErrors.js +29 -0
- package/dist/hooks/useFocusReturn.d.ts +25 -0
- package/dist/hooks/useFocusReturn.js +31 -0
- package/dist/hooks/useGrowOrigin.d.ts +2 -2
- package/dist/hooks/useHotkey.d.ts +3 -3
- package/dist/hooks/useHydrated.d.ts +2 -0
- package/dist/hooks/useHydrated.js +6 -0
- package/dist/hooks/useKapiTheme.d.ts +3 -2
- package/dist/hooks/useKapiTheme.js +111 -68
- package/dist/hooks/useMediaQuery.d.ts +5 -1
- package/dist/hooks/useMediaQuery.js +5 -9
- package/dist/hooks/useOnlineStatus.d.ts +1 -1
- package/dist/hooks/useOutsidePress.d.ts +9 -0
- package/dist/hooks/useOutsidePress.js +11 -0
- package/dist/hooks/usePersistentState.d.ts +2 -2
- package/dist/hooks/usePersistentState.js +21 -21
- package/dist/hooks/usePlacement.d.ts +6 -5
- package/dist/hooks/usePlacement.js +68 -65
- package/dist/hooks/useRangeSelect.d.ts +24 -0
- package/dist/hooks/useRangeSelect.js +26 -0
- package/dist/hooks/useRecent.d.ts +3 -3
- package/dist/hooks/useScrollCollapse.d.ts +1 -1
- package/dist/hooks/useScrollEdges.d.ts +9 -8
- package/dist/hooks/useScrollEdges.js +62 -57
- package/dist/hooks/useSlidingIndicator.d.ts +1 -1
- package/dist/hooks/useSlidingIndicator.js +38 -33
- package/dist/hooks/useSubmitDraft.js +18 -19
- package/dist/hooks/useTypeahead.d.ts +9 -0
- package/dist/hooks/useTypeahead.js +20 -0
- package/dist/hooks/useUnsavedGuard.d.ts +7 -4
- package/dist/hooks/useUnsavedGuard.js +1 -0
- package/dist/hooks/useVirtualList.d.ts +36 -0
- package/dist/hooks/useVirtualList.js +126 -0
- package/dist/hooks/viewportInsetLogic.d.ts +37 -0
- package/dist/hooks/viewportInsetLogic.js +20 -0
- package/dist/hooks/virtualListLogic.d.ts +88 -0
- package/dist/hooks/virtualListLogic.js +80 -0
- package/dist/index.d.ts +13 -13
- package/dist/index.js +196 -178
- package/dist/kapi.css +1 -1
- package/dist/kapi.layered.css +1 -1
- package/package.json +14 -6
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { HTMLAttributes, ReactNode, Ref } from "react";
|
|
2
|
-
import "./chat.css";
|
|
3
2
|
/** Qué separa un `KapiChatDivider`: un día del hilo o el corte de mensajes no leídos. */
|
|
4
3
|
export type KapiChatDividerTone = "day" | "unread";
|
|
5
4
|
/** Atributos nativos (`className`, `style`, `id`, `data-*`…) van al `<div>` del separador. */
|
|
@@ -9,7 +8,7 @@ export type KapiChatDividerProps = Omit<HTMLAttributes<HTMLDivElement>, "childre
|
|
|
9
8
|
/** Texto del separador (p. ej. la etiqueta de `formatDayLabel`). */
|
|
10
9
|
children: ReactNode;
|
|
11
10
|
/** Ref al `<div>`. */
|
|
12
|
-
ref?: Ref<HTMLDivElement
|
|
11
|
+
ref?: Ref<HTMLDivElement> | undefined;
|
|
13
12
|
};
|
|
14
13
|
/** Separador de un hilo de chat: una línea con el texto centrado en una cápsula (día o "no leídos"). */
|
|
15
14
|
export declare const KapiChatDivider: ({ tone, children, ref, className, ...rest }: KapiChatDividerProps) => import("react").JSX.Element;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { HTMLAttributes, ReactNode, Ref } from "react";
|
|
2
|
-
import type {
|
|
3
|
-
import type { KapiLabelsOverride } from "../labelsLogic";
|
|
4
|
-
import "./chat.css";
|
|
2
|
+
import type { KapiTone } from "../tone.js";
|
|
3
|
+
import type { KapiLabelsOverride } from "../labelsLogic.js";
|
|
5
4
|
/** Textos de la lista de conversaciones. */
|
|
6
5
|
export type KapiChatListLabels = {
|
|
7
6
|
/** Nombre accesible de la lista. */
|
|
@@ -25,7 +24,7 @@ export type KapiChatConversation<Id extends string = string> = {
|
|
|
25
24
|
/** Mensajes sin leer; 0 o ausente no dibuja el contador (tope visual "99+"). */
|
|
26
25
|
unread?: number | undefined;
|
|
27
26
|
/** Color del contador, como `KapiBadge`. @default "primary" */
|
|
28
|
-
unreadTone?:
|
|
27
|
+
unreadTone?: KapiTone | undefined;
|
|
29
28
|
/** URL de la imagen del avatar; sin ella se dibujan las iniciales. */
|
|
30
29
|
avatarSrc?: string | undefined;
|
|
31
30
|
/** Pisa las iniciales calculadas desde `name`. */
|
|
@@ -42,11 +41,16 @@ export type KapiChatListProps<Id extends string = string> = Omit<HTMLAttributes<
|
|
|
42
41
|
/** Se llama con el id al elegir una conversación; la app es dueña de `activeId`. */
|
|
43
42
|
onSelect?: ((id: Id) => void) | undefined;
|
|
44
43
|
/** Qué mostrar sin conversaciones; sin esto, un `KapiEmpty` con `labels.empty`. */
|
|
44
|
+
emptyMessage?: ReactNode;
|
|
45
|
+
/**
|
|
46
|
+
* Qué mostrar sin conversaciones.
|
|
47
|
+
* @deprecated Usa `emptyMessage`.
|
|
48
|
+
*/
|
|
45
49
|
empty?: ReactNode;
|
|
46
50
|
/** Textos de la lista (clave `chatList`). */
|
|
47
51
|
labels?: KapiLabelsOverride<KapiChatListLabels> | undefined;
|
|
48
52
|
/** Ref al contenedor de la lista. */
|
|
49
|
-
ref?: Ref<HTMLDivElement
|
|
53
|
+
ref?: Ref<HTMLDivElement> | undefined;
|
|
50
54
|
};
|
|
51
55
|
/**
|
|
52
56
|
* Lista de conversaciones de dos líneas (nombre y hora arriba; preview y no leídos abajo) con avatar.
|
|
@@ -54,4 +58,4 @@ export type KapiChatListProps<Id extends string = string> = Omit<HTMLAttributes<
|
|
|
54
58
|
* es `KapiNavBadge` y el avatar `KapiAvatar`. El nombre accesible del ítem sale de su contenido (nombre,
|
|
55
59
|
* hora, preview y "N sin leer"); el avatar va oculto para no repetir el nombre.
|
|
56
60
|
*/
|
|
57
|
-
export declare const KapiChatList: <Id extends string = string>({ items, activeId, onSelect, empty, labels, ref, className, ...rest }: KapiChatListProps<Id>) => import("react").JSX.Element;
|
|
61
|
+
export declare const KapiChatList: <Id extends string = string>({ items, activeId, onSelect, emptyMessage, empty: emptyAlias, labels, ref, className, ...rest }: KapiChatListProps<Id>) => import("react").JSX.Element;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
+
import "#kapi-css/components/chat/chat.css";
|
|
2
3
|
import { useLabels as e } from "../locale/KapiLocaleProvider.js";
|
|
3
4
|
import { joinClasses as t } from "../rootProps.js";
|
|
4
5
|
import { KapiAvatar as n } from "../display/KapiAvatar.js";
|
|
@@ -11,19 +12,19 @@ var s = {
|
|
|
11
12
|
list: "Conversaciones",
|
|
12
13
|
empty: "No hay conversaciones",
|
|
13
14
|
unread: "sin leer"
|
|
14
|
-
}, c = ({ items: c, activeId: l, onSelect: u,
|
|
15
|
-
let
|
|
15
|
+
}, c = ({ items: c, activeId: l, onSelect: u, emptyMessage: d, empty: f, labels: p, ref: m, className: h, ...g }) => {
|
|
16
|
+
let _ = e("chatList", s, p), v = d === void 0 ? f : d;
|
|
16
17
|
return c.length === 0 ? /* @__PURE__ */ a("div", {
|
|
17
|
-
...
|
|
18
|
-
ref:
|
|
19
|
-
className: t("kapi-chatlist",
|
|
20
|
-
children:
|
|
18
|
+
...g,
|
|
19
|
+
ref: m,
|
|
20
|
+
className: t("kapi-chatlist", h),
|
|
21
|
+
children: v === void 0 ? /* @__PURE__ */ a(r, { title: _.empty }) : v
|
|
21
22
|
}) : /* @__PURE__ */ a("div", {
|
|
22
|
-
"aria-label":
|
|
23
|
-
...
|
|
24
|
-
ref:
|
|
23
|
+
"aria-label": _.list,
|
|
24
|
+
...g,
|
|
25
|
+
ref: m,
|
|
25
26
|
role: "group",
|
|
26
|
-
className: t("kapi-chatlist",
|
|
27
|
+
className: t("kapi-chatlist", h),
|
|
27
28
|
children: c.map((e) => {
|
|
28
29
|
let r = l != null && l === e.id, s = e.unread ?? 0;
|
|
29
30
|
return /* @__PURE__ */ o("button", {
|
|
@@ -59,7 +60,7 @@ var s = {
|
|
|
59
60
|
}), /* @__PURE__ */ a(i, {
|
|
60
61
|
value: s,
|
|
61
62
|
tone: e.unreadTone,
|
|
62
|
-
label: `${s} ${
|
|
63
|
+
label: `${s} ${_.unread}`
|
|
63
64
|
})]
|
|
64
65
|
})]
|
|
65
66
|
})]
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { type HTMLAttributes, type ReactNode, type Ref } from "react";
|
|
2
|
-
import type { KapiLabelsOverride } from "../labelsLogic";
|
|
3
|
-
import "./chat.css";
|
|
2
|
+
import type { KapiLabelsOverride } from "../labelsLogic.js";
|
|
4
3
|
/** Textos de la píldora de mensajes nuevos. */
|
|
5
4
|
export type KapiChatThreadLabels = {
|
|
6
5
|
/** Texto de la píldora (el número de nuevos va aparte, en el badge). */
|
|
@@ -25,7 +24,7 @@ export type KapiChatThreadProps = Omit<HTMLAttributes<HTMLDivElement>, "children
|
|
|
25
24
|
/** Textos de la píldora de mensajes nuevos (clave `chatThread`). */
|
|
26
25
|
labels?: KapiLabelsOverride<KapiChatThreadLabels> | undefined;
|
|
27
26
|
/** Ref al elemento que scrollea. */
|
|
28
|
-
ref?: Ref<HTMLDivElement
|
|
27
|
+
ref?: Ref<HTMLDivElement> | undefined;
|
|
29
28
|
};
|
|
30
29
|
/**
|
|
31
30
|
* Hilo de chat que scrollea: sigue al fondo cuando entra contenido (salvo que el usuario haya subido a
|
|
@@ -1,85 +1,106 @@
|
|
|
1
1
|
"use client";
|
|
2
|
+
import "#kapi-css/components/chat/chat.css";
|
|
2
3
|
import { assignRef as e } from "../inputs/fieldLogic.js";
|
|
3
4
|
import { useLabels as t } from "../locale/KapiLocaleProvider.js";
|
|
4
5
|
import { joinClasses as n } from "../rootProps.js";
|
|
5
6
|
import { prefersReducedMotion as r } from "../../hooks/reducedMotion.js";
|
|
6
|
-
import {
|
|
7
|
+
import { isAtScrollEnd as i, shouldFollowBottom as a } from "./chatLogic.js";
|
|
7
8
|
/* empty css */
|
|
8
|
-
import { KapiNavBadge as
|
|
9
|
-
import { useScrollEdges as
|
|
10
|
-
import { jsx as
|
|
11
|
-
import { useCallback as
|
|
9
|
+
import { KapiNavBadge as o } from "../navigation/KapiNavBadge.js";
|
|
10
|
+
import { useScrollEdges as s } from "../../hooks/useScrollEdges.js";
|
|
11
|
+
import { jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
12
|
+
import { useCallback as u, useLayoutEffect as d, useRef as f } from "react";
|
|
12
13
|
//#region src/components/chat/KapiChatThread.tsx
|
|
13
|
-
var
|
|
14
|
+
var p = {
|
|
14
15
|
unseen: "Mensajes nuevos",
|
|
15
16
|
toBottom: "Ir al final del hilo"
|
|
16
|
-
},
|
|
17
|
-
let
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
let D = l((t) => {
|
|
22
|
-
S.current = t, e(v, t);
|
|
23
|
-
}, [S, v]), O = l((e) => {
|
|
24
|
-
let t = S.current;
|
|
17
|
+
}, m = ({ children: m, unseen: h = 0, followKey: g, onAtBottomChange: _, labels: v, ref: y, className: b, ...x }) => {
|
|
18
|
+
let S = t("chatThread", p, v), { ref: C, edges: w } = s({ axis: "y" }), T = f(null), E = !w.end, D = f(!0), O = f(!1), k = u((t) => {
|
|
19
|
+
C.current = t, e(y, t);
|
|
20
|
+
}, [C, y]), A = u((e) => {
|
|
21
|
+
let t = C.current;
|
|
25
22
|
if (!t) return;
|
|
26
23
|
let n = e || r(t) ? "auto" : "smooth";
|
|
27
|
-
typeof t.scrollTo == "function" ? t.scrollTo({
|
|
24
|
+
D.current = !0, O.current = !i(t), typeof t.scrollTo == "function" ? t.scrollTo({
|
|
28
25
|
top: t.scrollHeight,
|
|
29
26
|
behavior: n
|
|
30
27
|
}) : t.scrollTop = t.scrollHeight;
|
|
31
|
-
}, [
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
let
|
|
28
|
+
}, [C]);
|
|
29
|
+
d(() => {
|
|
30
|
+
let e = C.current;
|
|
31
|
+
if (!e) return;
|
|
32
|
+
let t = () => {
|
|
33
|
+
let t = i(e);
|
|
34
|
+
O.current ? t && (O.current = !1) : D.current = t;
|
|
35
|
+
}, n = () => {
|
|
36
|
+
O.current = !1;
|
|
37
|
+
}, r = [
|
|
38
|
+
"wheel",
|
|
39
|
+
"touchstart",
|
|
40
|
+
"pointerdown",
|
|
41
|
+
"keydown"
|
|
42
|
+
];
|
|
43
|
+
return e.addEventListener("scroll", t, { passive: !0 }), r.forEach((t) => e.addEventListener(t, n, { passive: !0 })), () => {
|
|
44
|
+
e.removeEventListener("scroll", t), r.forEach((t) => e.removeEventListener(t, n));
|
|
45
|
+
};
|
|
46
|
+
}, [C]), d(() => {
|
|
47
|
+
A(!0);
|
|
48
|
+
}, [A]), d(() => {
|
|
49
|
+
let e = T.current;
|
|
36
50
|
if (!e || typeof ResizeObserver > "u") return;
|
|
37
51
|
let t = new ResizeObserver(() => {
|
|
38
|
-
|
|
39
|
-
atBottom:
|
|
52
|
+
a({
|
|
53
|
+
atBottom: D.current,
|
|
40
54
|
outgoing: !1
|
|
41
|
-
}) &&
|
|
55
|
+
}) && A(!1);
|
|
42
56
|
});
|
|
43
57
|
return t.observe(e), () => t.disconnect();
|
|
44
|
-
}, [
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
58
|
+
}, [A]), d(() => {
|
|
59
|
+
let e = C.current;
|
|
60
|
+
if (!e || typeof ResizeObserver > "u") return;
|
|
61
|
+
let t = new ResizeObserver(() => {
|
|
62
|
+
D.current && A(!0);
|
|
63
|
+
});
|
|
64
|
+
return t.observe(e), () => t.disconnect();
|
|
65
|
+
}, [C, A]);
|
|
66
|
+
let j = f(g);
|
|
67
|
+
d(() => {
|
|
68
|
+
Object.is(j.current, g) || (j.current = g, a({
|
|
69
|
+
atBottom: D.current,
|
|
49
70
|
outgoing: !0
|
|
50
|
-
}) &&
|
|
51
|
-
}, [
|
|
52
|
-
let
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
}, [
|
|
56
|
-
let
|
|
57
|
-
return /* @__PURE__ */
|
|
58
|
-
...
|
|
59
|
-
className: n("kapi-chatthread",
|
|
60
|
-
children: [/* @__PURE__ */
|
|
61
|
-
ref:
|
|
71
|
+
}) && A(!1));
|
|
72
|
+
}, [g, A]);
|
|
73
|
+
let M = f(!0);
|
|
74
|
+
d(() => {
|
|
75
|
+
M.current !== E && (M.current = E, _?.(E));
|
|
76
|
+
}, [E, _]);
|
|
77
|
+
let N = !E && h > 0;
|
|
78
|
+
return /* @__PURE__ */ l("div", {
|
|
79
|
+
...x,
|
|
80
|
+
className: n("kapi-chatthread", b),
|
|
81
|
+
children: [/* @__PURE__ */ c("div", {
|
|
82
|
+
ref: k,
|
|
62
83
|
className: "kapi-chatthread__scroll",
|
|
63
84
|
tabIndex: 0,
|
|
64
|
-
children: /* @__PURE__ */
|
|
65
|
-
ref:
|
|
85
|
+
children: /* @__PURE__ */ c("div", {
|
|
86
|
+
ref: T,
|
|
66
87
|
className: "kapi-chatthread__content",
|
|
67
|
-
children:
|
|
88
|
+
children: m
|
|
68
89
|
})
|
|
69
|
-
}),
|
|
90
|
+
}), N && /* @__PURE__ */ l("button", {
|
|
70
91
|
type: "button",
|
|
71
92
|
className: "kapi-chatthread__pill",
|
|
72
|
-
"aria-label": `${
|
|
73
|
-
onClick: () =>
|
|
74
|
-
children: [/* @__PURE__ */
|
|
93
|
+
"aria-label": `${S.unseen}: ${h}. ${S.toBottom}`,
|
|
94
|
+
onClick: () => A(!1),
|
|
95
|
+
children: [/* @__PURE__ */ c("span", {
|
|
75
96
|
"aria-hidden": "true",
|
|
76
|
-
children:
|
|
77
|
-
}), /* @__PURE__ */
|
|
78
|
-
value:
|
|
97
|
+
children: S.unseen
|
|
98
|
+
}), /* @__PURE__ */ c(o, {
|
|
99
|
+
value: h,
|
|
79
100
|
announce: !1
|
|
80
101
|
})]
|
|
81
102
|
})]
|
|
82
103
|
});
|
|
83
104
|
};
|
|
84
105
|
//#endregion
|
|
85
|
-
export {
|
|
106
|
+
export { p as DEFAULT_CHAT_THREAD_LABELS, m as KapiChatThread };
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { type CSSProperties, type ReactNode, type Ref, type TextareaHTMLAttributes } from "react";
|
|
2
|
-
import { type KapiSubmitShortcut } from "../display/commentLogic";
|
|
3
|
-
import type { KapiLabelsOverride } from "../labelsLogic";
|
|
4
|
-
import "./chat.css";
|
|
2
|
+
import { type KapiSubmitShortcut } from "../display/commentLogic.js";
|
|
3
|
+
import type { KapiLabelsOverride } from "../labelsLogic.js";
|
|
5
4
|
export type KapiComposerLabels = {
|
|
6
5
|
/** Nombre accesible del textarea si no hay `KapiField`, `aria-label` ni `aria-labelledby`. */
|
|
7
6
|
label: string;
|
|
@@ -49,7 +48,7 @@ export type KapiComposerProps = Omit<TextareaHTMLAttributes<HTMLTextAreaElement>
|
|
|
49
48
|
/** Textos fijos (clave `composer`). */
|
|
50
49
|
labels?: KapiLabelsOverride<KapiComposerLabels> | undefined;
|
|
51
50
|
/** Ref al `<textarea>`. */
|
|
52
|
-
ref?: Ref<HTMLTextAreaElement
|
|
51
|
+
ref?: Ref<HTMLTextAreaElement> | undefined;
|
|
53
52
|
};
|
|
54
53
|
/**
|
|
55
54
|
* Campo de escritura de un chat: una barra al pie del hilo con una superficie (textarea que crece y acciones a
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
+
import "#kapi-css/components/chat/chat.css";
|
|
2
3
|
import { KapiIconButton as e } from "../inputs/KapiIconButton.js";
|
|
3
4
|
import { assignRef as t, joinIds as n } from "../inputs/fieldLogic.js";
|
|
4
5
|
import { useKapiField as r } from "../inputs/KapiField.js";
|
|
@@ -60,7 +61,7 @@ var p = {
|
|
|
60
61
|
"aria-labelledby": P,
|
|
61
62
|
"aria-describedby": n(F, z),
|
|
62
63
|
...x === void 0 ? {} : { required: x },
|
|
63
|
-
...b ? {
|
|
64
|
+
...b ? { invalid: !0 } : {},
|
|
64
65
|
onChange: (e) => V(e.target.value),
|
|
65
66
|
onKeyDown: K
|
|
66
67
|
}),
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { HTMLAttributes, ReactNode, Ref } from "react";
|
|
2
|
-
import type { KapiLabelsOverride } from "../labelsLogic";
|
|
3
|
-
import type { KapiChatGrouping, KapiChatStatus } from "./chatLogic";
|
|
4
|
-
import "./chat.css";
|
|
2
|
+
import type { KapiLabelsOverride } from "../labelsLogic.js";
|
|
3
|
+
import type { KapiChatGrouping, KapiChatStatus } from "./chatLogic.js";
|
|
5
4
|
/** Textos del estado de entrega (los lee el lector de pantalla junto al ícono). */
|
|
6
5
|
export type KapiMessageBubbleLabels = {
|
|
7
6
|
/** Estado `sending`: el mensaje todavía no salió. */
|
|
@@ -37,7 +36,7 @@ export type KapiMessageBubbleProps = Omit<HTMLAttributes<HTMLDivElement>, "child
|
|
|
37
36
|
/** Textos del estado de entrega. */
|
|
38
37
|
labels?: KapiLabelsOverride<KapiMessageBubbleLabels> | undefined;
|
|
39
38
|
/** Ref al `<div>` de la burbuja. */
|
|
40
|
-
ref?: Ref<HTMLDivElement
|
|
39
|
+
ref?: Ref<HTMLDivElement> | undefined;
|
|
41
40
|
};
|
|
42
41
|
/** Burbuja de un mensaje de chat: entrante o saliente, agrupable en corridas, con hora, estado, cita y adjunto. */
|
|
43
42
|
export declare const KapiMessageBubble: ({ outgoing, grouping, author, time, status, reply, media, children, labels, ref, className, ...rest }: KapiMessageBubbleProps) => import("react").JSX.Element;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { HTMLAttributes, Ref } from "react";
|
|
2
|
-
import type { KapiLabelsOverride } from "../labelsLogic";
|
|
3
|
-
import "./chat.css";
|
|
2
|
+
import type { KapiLabelsOverride } from "../labelsLogic.js";
|
|
4
3
|
/** Textos del indicador de escritura. */
|
|
5
4
|
export type KapiTypingIndicatorLabels = {
|
|
6
5
|
/** Una persona escribiendo: `{name}` se reemplaza por el nombre. */
|
|
@@ -18,7 +17,7 @@ export type KapiTypingIndicatorProps = Omit<HTMLAttributes<HTMLDivElement>, "chi
|
|
|
18
17
|
/** Textos (clave `typingIndicator`). */
|
|
19
18
|
labels?: KapiLabelsOverride<KapiTypingIndicatorLabels> | undefined;
|
|
20
19
|
/** Ref al `<div>`. */
|
|
21
|
-
ref?: Ref<HTMLDivElement
|
|
20
|
+
ref?: Ref<HTMLDivElement> | undefined;
|
|
22
21
|
};
|
|
23
22
|
/**
|
|
24
23
|
* Aviso de "está escribiendo…": tres puntos que laten y el texto. El `<div>` es una región `aria-live`
|
|
@@ -61,6 +61,12 @@ export declare const shouldFollowBottom: (state: {
|
|
|
61
61
|
atBottom: boolean;
|
|
62
62
|
outgoing: boolean;
|
|
63
63
|
}) => boolean;
|
|
64
|
+
/** ¿El scroll está al final? `tolerance` absorbe los medios píxeles del zoom. */
|
|
65
|
+
export declare const isAtScrollEnd: (m: {
|
|
66
|
+
scrollTop: number;
|
|
67
|
+
scrollHeight: number;
|
|
68
|
+
clientHeight: number;
|
|
69
|
+
}, tolerance?: number) => boolean;
|
|
64
70
|
/** Textos que necesita `typingText`; estructuralmente son los de `KapiTypingIndicatorLabels`. */
|
|
65
71
|
type TypingTextLabels = {
|
|
66
72
|
one: string;
|
|
@@ -24,11 +24,11 @@ var e = (e) => String(e).padStart(2, "0"), t = (t) => `${t.getFullYear()}-${e(t.
|
|
|
24
24
|
grouping: "single"
|
|
25
25
|
}), d = e;
|
|
26
26
|
}), u(), o;
|
|
27
|
-
}, r = (e) => e.atBottom || e.outgoing, i = (e, t) => {
|
|
27
|
+
}, r = (e) => e.atBottom || e.outgoing, i = (e, t = 2) => e.scrollHeight - e.clientHeight - e.scrollTop <= t, a = (e, t) => {
|
|
28
28
|
if (e === void 0 || e.length === 0) return null;
|
|
29
29
|
if (e.length > 1) return t.many.replaceAll("{count}", () => String(e.length));
|
|
30
30
|
let n = (e[0] ?? "").trim();
|
|
31
31
|
return n === "" ? t.someone : t.one.replaceAll("{name}", () => n);
|
|
32
32
|
};
|
|
33
33
|
//#endregion
|
|
34
|
-
export { n as groupChatMessages, r as shouldFollowBottom,
|
|
34
|
+
export { n as groupChatMessages, i as isAtScrollEnd, r as shouldFollowBottom, a as typingText };
|
|
@@ -1,14 +1,18 @@
|
|
|
1
|
-
export { groupChatMessages,
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
export {
|
|
7
|
-
export {
|
|
8
|
-
export
|
|
9
|
-
export
|
|
10
|
-
export
|
|
11
|
-
export
|
|
12
|
-
export type {
|
|
13
|
-
export type {
|
|
14
|
-
export type {
|
|
1
|
+
export { groupChatMessages,
|
|
2
|
+
/** @deprecated Interno; usa `KapiChatThread` en su lugar. Se quita en 1.0. */
|
|
3
|
+
shouldFollowBottom,
|
|
4
|
+
/** @deprecated Interno; usa `KapiTypingIndicator` en su lugar. Se quita en 1.0. */
|
|
5
|
+
typingText } from "./chatLogic.js";
|
|
6
|
+
export { KapiChatDivider } from "./KapiChatDivider.js";
|
|
7
|
+
export { DEFAULT_CHAT_LIST_LABELS, KapiChatList } from "./KapiChatList.js";
|
|
8
|
+
export { DEFAULT_COMPOSER_LABELS, KapiComposer } from "./KapiComposer.js";
|
|
9
|
+
export { DEFAULT_CHAT_THREAD_LABELS, KapiChatThread } from "./KapiChatThread.js";
|
|
10
|
+
export { DEFAULT_MESSAGE_BUBBLE_LABELS, KapiMessageBubble } from "./KapiMessageBubble.js";
|
|
11
|
+
export { DEFAULT_TYPING_INDICATOR_LABELS, KapiTypingIndicator } from "./KapiTypingIndicator.js";
|
|
12
|
+
export type { KapiChatEntry, KapiChatGroupOptions, KapiChatGrouping, KapiChatMessage, KapiChatStatus } from "./chatLogic.js";
|
|
13
|
+
export type { KapiChatDividerProps, KapiChatDividerTone } from "./KapiChatDivider.js";
|
|
14
|
+
export type { KapiChatConversation, KapiChatListLabels, KapiChatListProps } from "./KapiChatList.js";
|
|
15
|
+
export type { KapiChatThreadLabels, KapiChatThreadProps } from "./KapiChatThread.js";
|
|
16
|
+
export type { KapiComposerLabels, KapiComposerProps } from "./KapiComposer.js";
|
|
17
|
+
export type { KapiMessageBubbleLabels, KapiMessageBubbleProps } from "./KapiMessageBubble.js";
|
|
18
|
+
export type { KapiTypingIndicatorLabels, KapiTypingIndicatorProps } from "./KapiTypingIndicator.js";
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { type HTMLAttributes, type ReactNode, type Ref } from "react";
|
|
2
|
-
import type { KapiLabelsOverride } from "../labelsLogic";
|
|
3
|
-
import { type KapiChartLabels, type KapiChartView } from "./chartFrame";
|
|
4
|
-
import { type KapiBarSort, type KapiBarValueLabels } from "./barChartLogic";
|
|
5
|
-
import "./KapiBarChart.css";
|
|
2
|
+
import type { KapiLabelsOverride } from "../labelsLogic.js";
|
|
3
|
+
import { type KapiChartLabels, type KapiChartUnit, type KapiChartView } from "./chartFrame.js";
|
|
4
|
+
import { type KapiBarSort, type KapiBarValueLabels } from "./barChartLogic.js";
|
|
6
5
|
/** Una serie del gráfico: un valor por categoría, en el mismo orden que `categories`. */
|
|
7
6
|
export type KapiBarChartSeries = {
|
|
8
7
|
/** Id estable de la serie; es la clave de React y el id de la fila en la tabla. */
|
|
@@ -27,13 +26,13 @@ export type KapiBarChartProps = Omit<HTMLAttributes<HTMLDivElement>, "title" | "
|
|
|
27
26
|
*/
|
|
28
27
|
title?: ReactNode;
|
|
29
28
|
/** Pasos del eje vertical sobre el cero. @default 4 */
|
|
30
|
-
tickCount?: number;
|
|
29
|
+
tickCount?: number | undefined;
|
|
31
30
|
/**
|
|
32
31
|
* Dibuja las barras acostadas, de izquierda a derecha, con las categorías en el eje vertical.
|
|
33
32
|
* Es la forma de comparar partes cuando los nombres son largos o hay muchas: en vertical las
|
|
34
33
|
* etiquetas se amontonan o se rotan, y una etiqueta rotada no se lee. @default false
|
|
35
34
|
*/
|
|
36
|
-
horizontal?: boolean;
|
|
35
|
+
horizontal?: boolean | undefined;
|
|
37
36
|
/**
|
|
38
37
|
* Ordena las categorías por su total antes de dibujarlas. Ordenado de mayor a menor es lo que
|
|
39
38
|
* hace legible una comparación: el ojo lee el ranking sin contar.
|
|
@@ -41,7 +40,7 @@ export type KapiBarChartProps = Omit<HTMLAttributes<HTMLDivElement>, "title" | "
|
|
|
41
40
|
* El default es no tocar el orden, y es a propósito: cuando el eje significa algo —meses, pasos
|
|
42
41
|
* de un proceso— reordenar destruye la información. @default "none"
|
|
43
42
|
*/
|
|
44
|
-
sort?: KapiBarSort;
|
|
43
|
+
sort?: KapiBarSort | undefined;
|
|
45
44
|
/**
|
|
46
45
|
* Apila las series dentro de cada categoría en vez de ponerlas una al lado de la otra. Es para
|
|
47
46
|
* ver cómo se reparte un total; para comparar las series entre sí, agrupadas se comparan mejor,
|
|
@@ -51,24 +50,33 @@ export type KapiBarChartProps = Omit<HTMLAttributes<HTMLDivElement>, "title" | "
|
|
|
51
50
|
* escribirse por defecto: una etiqueta por segmento se pisa con la de arriba y no hay forma de
|
|
52
51
|
* saber si entra sin medir. El número queda en el tooltip y en la tabla. @default false
|
|
53
52
|
*/
|
|
54
|
-
stacked?: boolean;
|
|
53
|
+
stacked?: boolean | undefined;
|
|
55
54
|
/**
|
|
56
55
|
* Qué barras llevan su valor escrito encima. `auto` las escribe todas mientras sean pocas y
|
|
57
56
|
* arriba de ahí sólo la más alta; `max` siempre sólo la más alta; `none` ninguna, y el número
|
|
58
57
|
* queda en el eje, el tooltip y la tabla. `all` las escribe todas: úsalo con muy pocas barras,
|
|
59
58
|
* porque una etiqueta al lado de cada marca deja de leerse. @default "auto"
|
|
60
59
|
*/
|
|
61
|
-
values?: KapiBarValueLabels;
|
|
60
|
+
values?: KapiBarValueLabels | undefined;
|
|
61
|
+
/**
|
|
62
|
+
* La unidad del valor: `(n) => `$ ${n}`` para una moneda, `(n) => `${n} %`` para un porcentaje.
|
|
63
|
+
*
|
|
64
|
+
* Se aplica en los CUATRO lugares donde el gráfico escribe un número —eje, etiqueta sobre la
|
|
65
|
+
* marca, tooltip y tabla— para que digan todos lo mismo. Recibe el texto ya formateado y no el
|
|
66
|
+
* número, porque el eje abrevia y la tabla no, y esa diferencia es del gráfico: ver
|
|
67
|
+
* `KapiChartUnit`. Sin esta prop el número sale pelado, que es lo correcto para una cantidad.
|
|
68
|
+
*/
|
|
69
|
+
unit?: KapiChartUnit | undefined;
|
|
62
70
|
/** Vista mostrada, si la controla el consumidor. */
|
|
63
|
-
view?: KapiChartView;
|
|
71
|
+
view?: KapiChartView | undefined;
|
|
64
72
|
/** Vista inicial cuando el componente la maneja solo. @default "chart" */
|
|
65
|
-
defaultView?: KapiChartView;
|
|
73
|
+
defaultView?: KapiChartView | undefined;
|
|
66
74
|
/** Avisa que se cambió de vista. */
|
|
67
|
-
onViewChange?: (view: KapiChartView) => void;
|
|
75
|
+
onViewChange?: ((view: KapiChartView) => void) | undefined;
|
|
68
76
|
/** Textos propios; pisan al provider y a los defaults. */
|
|
69
|
-
labels?: KapiLabelsOverride<KapiChartLabels
|
|
77
|
+
labels?: KapiLabelsOverride<KapiChartLabels> | undefined;
|
|
70
78
|
/** Ref al contenedor. */
|
|
71
|
-
ref?: Ref<HTMLDivElement
|
|
79
|
+
ref?: Ref<HTMLDivElement> | undefined;
|
|
72
80
|
};
|
|
73
81
|
/**
|
|
74
82
|
* Gráfico de barras agrupadas.
|
|
@@ -81,4 +89,4 @@ export type KapiBarChartProps = Omit<HTMLAttributes<HTMLDivElement>, "title" | "
|
|
|
81
89
|
* que es lo que un lector de pantalla recorre. El tooltip de cada barra es para quien ve el
|
|
82
90
|
* gráfico y usa el mouse.
|
|
83
91
|
*/
|
|
84
|
-
export declare function KapiBarChart({ categories, series, title, tickCount, horizontal, sort, stacked, values, view, defaultView, onViewChange, labels, className, ref, ...rest }: KapiBarChartProps): import("react").JSX.Element;
|
|
92
|
+
export declare function KapiBarChart({ categories, series, title, tickCount, horizontal, sort, stacked, values, unit, view, defaultView, onViewChange, labels, className, ref, ...rest }: KapiBarChartProps): import("react").JSX.Element;
|