@kapiuara/ui 0.0.0-stage → 0.1.1
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/LICENSE +16 -0
- package/README.md +764 -2
- package/dist/components/data/KapiPagination.d.ts +36 -0
- package/dist/components/data/KapiPagination.js +102 -0
- package/dist/components/data/KapiTable.d.ts +245 -0
- package/dist/components/data/KapiTable.js +748 -0
- package/dist/components/data/KapiTableFilter.d.ts +48 -0
- package/dist/components/data/KapiTableFilter.js +81 -0
- package/dist/components/data/index.d.ts +10 -0
- package/dist/components/data/tableLogic.d.ts +197 -0
- package/dist/components/data/tableLogic.js +145 -0
- package/dist/components/data/tableResizeLogic.d.ts +28 -0
- package/dist/components/data/tableResizeLogic.js +20 -0
- package/dist/components/display/KapiAnnotation.d.ts +32 -0
- package/dist/components/display/KapiAnnotation.js +130 -0
- package/dist/components/display/KapiAvatar.d.ts +27 -0
- package/dist/components/display/KapiAvatar.js +43 -0
- package/dist/components/display/KapiAvatarGroup.d.ts +19 -0
- package/dist/components/display/KapiAvatarGroup.js +38 -0
- package/dist/components/display/KapiBadge.d.ts +21 -0
- package/dist/components/display/KapiBadge.js +28 -0
- package/dist/components/display/KapiComment.d.ts +27 -0
- package/dist/components/display/KapiComment.js +66 -0
- package/dist/components/display/KapiCommentComposer.d.ts +49 -0
- package/dist/components/display/KapiCommentComposer.js +76 -0
- package/dist/components/display/KapiDescriptionList.d.ts +19 -0
- package/dist/components/display/KapiDescriptionList.js +35 -0
- package/dist/components/display/KapiFileItem.d.ts +39 -0
- package/dist/components/display/KapiFileItem.js +74 -0
- package/dist/components/display/KapiFileViewer.d.ts +51 -0
- package/dist/components/display/KapiFileViewer.js +107 -0
- package/dist/components/display/KapiIconTile.d.ts +16 -0
- package/dist/components/display/KapiIconTile.js +29 -0
- package/dist/components/display/KapiStat.d.ts +24 -0
- package/dist/components/display/KapiStat.js +41 -0
- package/dist/components/display/KapiTag.d.ts +27 -0
- package/dist/components/display/KapiTag.js +44 -0
- package/dist/components/display/KapiTimeline.d.ts +15 -0
- package/dist/components/display/KapiTimeline.js +30 -0
- package/dist/components/display/annotationLogic.d.ts +26 -0
- package/dist/components/display/annotationLogic.js +17 -0
- package/dist/components/display/avatarGroupLogic.d.ts +14 -0
- package/dist/components/display/avatarGroupLogic.js +13 -0
- package/dist/components/display/avatarLogic.d.ts +5 -0
- package/dist/components/display/avatarLogic.js +9 -0
- package/dist/components/display/commentLogic.d.ts +18 -0
- package/dist/components/display/commentLogic.js +7 -0
- package/dist/components/display/fileItemLogic.d.ts +9 -0
- package/dist/components/display/fileItemLogic.js +12 -0
- package/dist/components/display/iconTileLogic.d.ts +13 -0
- package/dist/components/display/iconTileLogic.js +13 -0
- package/dist/components/display/index.d.ts +40 -0
- package/dist/components/display/statLogic.d.ts +10 -0
- package/dist/components/display/statLogic.js +10 -0
- package/dist/components/display/tagLogic.d.ts +11 -0
- package/dist/components/display/tagLogic.js +10 -0
- package/dist/components/display/timelineLogic.d.ts +5 -0
- package/dist/components/display/timelineLogic.js +4 -0
- package/dist/components/feedback/KapiAlert.d.ts +28 -0
- package/dist/components/feedback/KapiAlert.js +53 -0
- package/dist/components/feedback/KapiBulkBar.d.ts +30 -0
- package/dist/components/feedback/KapiBulkBar.js +34 -0
- package/dist/components/feedback/KapiCountdown.d.ts +26 -0
- package/dist/components/feedback/KapiCountdown.js +43 -0
- package/dist/components/feedback/KapiEmpty.d.ts +14 -0
- package/dist/components/feedback/KapiEmpty.js +31 -0
- package/dist/components/feedback/KapiFab.d.ts +34 -0
- package/dist/components/feedback/KapiFab.js +116 -0
- package/dist/components/feedback/KapiOfflineBanner.d.ts +25 -0
- package/dist/components/feedback/KapiOfflineBanner.js +40 -0
- package/dist/components/feedback/KapiProgress.d.ts +24 -0
- package/dist/components/feedback/KapiProgress.js +94 -0
- package/dist/components/feedback/KapiSkeleton.d.ts +12 -0
- package/dist/components/feedback/KapiSkeleton.js +16 -0
- package/dist/components/feedback/KapiToastContainer.d.ts +16 -0
- package/dist/components/feedback/KapiToastContainer.js +81 -0
- package/dist/components/feedback/KapiTour.d.ts +40 -0
- package/dist/components/feedback/KapiTour.js +157 -0
- package/dist/components/feedback/KapiUnsavedBar.d.ts +35 -0
- package/dist/components/feedback/KapiUnsavedBar.js +47 -0
- package/dist/components/feedback/bulkBarLogic.d.ts +2 -0
- package/dist/components/feedback/bulkBarLogic.js +7 -0
- package/dist/components/feedback/countdownLogic.d.ts +74 -0
- package/dist/components/feedback/countdownLogic.js +70 -0
- package/dist/components/feedback/fabLogic.d.ts +17 -0
- package/dist/components/feedback/fabLogic.js +10 -0
- package/dist/components/feedback/index.d.ts +33 -0
- package/dist/components/feedback/offlineBannerLogic.d.ts +10 -0
- package/dist/components/feedback/offlineBannerLogic.js +8 -0
- package/dist/components/feedback/progressLogic.d.ts +17 -0
- package/dist/components/feedback/progressLogic.js +16 -0
- package/dist/components/feedback/toastStore.d.ts +62 -0
- package/dist/components/feedback/toastStore.js +38 -0
- package/dist/components/feedback/tourLogic.d.ts +64 -0
- package/dist/components/feedback/tourLogic.js +31 -0
- package/dist/components/feedback/unsavedBarLogic.d.ts +2 -0
- package/dist/components/feedback/unsavedBarLogic.js +8 -0
- package/dist/components/inputs/KapiAutocomplete.d.ts +81 -0
- package/dist/components/inputs/KapiAutocomplete.js +205 -0
- package/dist/components/inputs/KapiButton.d.ts +23 -0
- package/dist/components/inputs/KapiButton.js +25 -0
- package/dist/components/inputs/KapiCalendar.d.ts +35 -0
- package/dist/components/inputs/KapiCalendar.js +60 -0
- package/dist/components/inputs/KapiCalendarGrid.d.ts +29 -0
- package/dist/components/inputs/KapiCalendarGrid.js +65 -0
- package/dist/components/inputs/KapiCheckCard.d.ts +28 -0
- package/dist/components/inputs/KapiCheckCard.js +41 -0
- package/dist/components/inputs/KapiCheckbox.d.ts +7 -0
- package/dist/components/inputs/KapiCheckbox.js +5 -0
- package/dist/components/inputs/KapiDatePicker.d.ts +46 -0
- package/dist/components/inputs/KapiDatePicker.js +189 -0
- package/dist/components/inputs/KapiDateRangePicker.d.ts +49 -0
- package/dist/components/inputs/KapiDateRangePicker.js +179 -0
- package/dist/components/inputs/KapiFacetedSearch.d.ts +45 -0
- package/dist/components/inputs/KapiFacetedSearch.js +188 -0
- package/dist/components/inputs/KapiField.d.ts +33 -0
- package/dist/components/inputs/KapiField.js +60 -0
- package/dist/components/inputs/KapiFileUpload.d.ts +58 -0
- package/dist/components/inputs/KapiFileUpload.js +134 -0
- package/dist/components/inputs/KapiIconButton.d.ts +13 -0
- package/dist/components/inputs/KapiIconButton.js +16 -0
- package/dist/components/inputs/KapiInput.d.ts +92 -0
- package/dist/components/inputs/KapiInput.js +123 -0
- package/dist/components/inputs/KapiInputGroup.d.ts +37 -0
- package/dist/components/inputs/KapiInputGroup.js +29 -0
- package/dist/components/inputs/KapiMaskedInput.d.ts +52 -0
- package/dist/components/inputs/KapiMaskedInput.js +78 -0
- package/dist/components/inputs/KapiNumberStepper.d.ts +44 -0
- package/dist/components/inputs/KapiNumberStepper.js +100 -0
- package/dist/components/inputs/KapiRadio.d.ts +7 -0
- package/dist/components/inputs/KapiRadio.js +5 -0
- package/dist/components/inputs/KapiRating.d.ts +55 -0
- package/dist/components/inputs/KapiRating.js +99 -0
- package/dist/components/inputs/KapiSegmented.d.ts +41 -0
- package/dist/components/inputs/KapiSegmented.js +83 -0
- package/dist/components/inputs/KapiSelect.d.ts +109 -0
- package/dist/components/inputs/KapiSelect.js +443 -0
- package/dist/components/inputs/KapiSlider.d.ts +42 -0
- package/dist/components/inputs/KapiSlider.js +70 -0
- package/dist/components/inputs/KapiSwitch.d.ts +13 -0
- package/dist/components/inputs/KapiSwitch.js +28 -0
- package/dist/components/inputs/KapiTagInput.d.ts +79 -0
- package/dist/components/inputs/KapiTagInput.js +115 -0
- package/dist/components/inputs/KapiTextarea.d.ts +32 -0
- package/dist/components/inputs/KapiTextarea.js +67 -0
- package/dist/components/inputs/asyncSelectLogic.d.ts +42 -0
- package/dist/components/inputs/asyncSelectLogic.js +46 -0
- package/dist/components/inputs/autocompleteLogic.d.ts +73 -0
- package/dist/components/inputs/autocompleteLogic.js +67 -0
- package/dist/components/inputs/checkControl.d.ts +20 -0
- package/dist/components/inputs/checkControl.js +31 -0
- package/dist/components/inputs/datePickerLogic.d.ts +92 -0
- package/dist/components/inputs/datePickerLogic.js +174 -0
- package/dist/components/inputs/dateRangeLogic.d.ts +31 -0
- package/dist/components/inputs/dateRangeLogic.js +44 -0
- package/dist/components/inputs/facetedSearchLogic.d.ts +69 -0
- package/dist/components/inputs/facetedSearchLogic.js +39 -0
- package/dist/components/inputs/fieldLogic.d.ts +67 -0
- package/dist/components/inputs/fieldLogic.js +35 -0
- package/dist/components/inputs/fileUploadLogic.d.ts +13 -0
- package/dist/components/inputs/fileUploadLogic.js +9 -0
- package/dist/components/inputs/index.d.ts +55 -0
- package/dist/components/inputs/inputGroupLogic.d.ts +22 -0
- package/dist/components/inputs/inputGroupLogic.js +9 -0
- package/dist/components/inputs/inputLogic.d.ts +25 -0
- package/dist/components/inputs/inputLogic.js +10 -0
- package/dist/components/inputs/maskLogic.d.ts +34 -0
- package/dist/components/inputs/maskLogic.js +57 -0
- package/dist/components/inputs/numberStepLogic.d.ts +14 -0
- package/dist/components/inputs/numberStepLogic.js +21 -0
- package/dist/components/inputs/ratingLogic.d.ts +9 -0
- package/dist/components/inputs/ratingLogic.js +22 -0
- package/dist/components/inputs/segmentedLogic.d.ts +6 -0
- package/dist/components/inputs/segmentedLogic.js +14 -0
- package/dist/components/inputs/selectLogic.d.ts +89 -0
- package/dist/components/inputs/selectLogic.js +82 -0
- package/dist/components/inputs/sliderLogic.d.ts +9 -0
- package/dist/components/inputs/sliderLogic.js +17 -0
- package/dist/components/inputs/tagInputLogic.d.ts +40 -0
- package/dist/components/inputs/tagInputLogic.js +40 -0
- package/dist/components/inputs/textareaLogic.d.ts +17 -0
- package/dist/components/inputs/textareaLogic.js +13 -0
- package/dist/components/inputs/useCalendarFocus.d.ts +13 -0
- package/dist/components/inputs/useCalendarFocus.js +25 -0
- package/dist/components/inputs/useDatePopSide.d.ts +15 -0
- package/dist/components/inputs/useDatePopSide.js +20 -0
- package/dist/components/labelsLogic.d.ts +6 -0
- package/dist/components/labelsLogic.js +11 -0
- package/dist/components/layout/KapiAccessCard.d.ts +40 -0
- package/dist/components/layout/KapiAccessCard.js +66 -0
- package/dist/components/layout/KapiAccountMenu.d.ts +61 -0
- package/dist/components/layout/KapiAccountMenu.js +212 -0
- package/dist/components/layout/KapiCard.d.ts +43 -0
- package/dist/components/layout/KapiCard.js +53 -0
- package/dist/components/layout/KapiCluster.d.ts +15 -0
- package/dist/components/layout/KapiCluster.js +21 -0
- package/dist/components/layout/KapiContextSlot.d.ts +45 -0
- package/dist/components/layout/KapiContextSlot.js +92 -0
- package/dist/components/layout/KapiDivider.d.ts +16 -0
- package/dist/components/layout/KapiDivider.js +41 -0
- package/dist/components/layout/KapiGrid.d.ts +19 -0
- package/dist/components/layout/KapiGrid.js +25 -0
- package/dist/components/layout/KapiNotificationBell.d.ts +75 -0
- package/dist/components/layout/KapiNotificationBell.js +196 -0
- package/dist/components/layout/KapiPageHeader.d.ts +28 -0
- package/dist/components/layout/KapiPageHeader.js +47 -0
- package/dist/components/layout/KapiPanelParts.d.ts +35 -0
- package/dist/components/layout/KapiPanelParts.js +63 -0
- package/dist/components/layout/KapiRail.d.ts +40 -0
- package/dist/components/layout/KapiRail.js +102 -0
- package/dist/components/layout/KapiScrollArea.d.ts +40 -0
- package/dist/components/layout/KapiScrollArea.js +49 -0
- package/dist/components/layout/KapiShell.d.ts +40 -0
- package/dist/components/layout/KapiShell.js +48 -0
- package/dist/components/layout/KapiStack.d.ts +11 -0
- package/dist/components/layout/KapiStack.js +19 -0
- package/dist/components/layout/accessCardLogic.d.ts +18 -0
- package/dist/components/layout/accessCardLogic.js +11 -0
- package/dist/components/layout/cardLogic.d.ts +9 -0
- package/dist/components/layout/cardLogic.js +11 -0
- package/dist/components/layout/index.d.ts +33 -0
- package/dist/components/layout/layoutPrimitives.d.ts +51 -0
- package/dist/components/layout/layoutPrimitives.js +58 -0
- package/dist/components/layout/notificationBellLogic.d.ts +20 -0
- package/dist/components/layout/notificationBellLogic.js +14 -0
- package/dist/components/layout/railLogic.d.ts +52 -0
- package/dist/components/layout/railLogic.js +16 -0
- package/dist/components/locale/KapiLocaleProvider.d.ts +29 -0
- package/dist/components/locale/KapiLocaleProvider.js +27 -0
- package/dist/components/locale/index.d.ts +5 -0
- package/dist/components/locale/labelRegistry.d.ts +110 -0
- package/dist/components/locale/linkLabels.d.ts +6 -0
- package/dist/components/locale/linkLabels.js +4 -0
- package/dist/components/navigation/CtxSlidingList.d.ts +11 -0
- package/dist/components/navigation/CtxSlidingList.js +24 -0
- package/dist/components/navigation/KapiAccordion.d.ts +24 -0
- package/dist/components/navigation/KapiAccordion.js +68 -0
- package/dist/components/navigation/KapiBreadcrumb.d.ts +23 -0
- package/dist/components/navigation/KapiBreadcrumb.js +32 -0
- package/dist/components/navigation/KapiCollapsiblePanel.d.ts +63 -0
- package/dist/components/navigation/KapiCollapsiblePanel.js +83 -0
- package/dist/components/navigation/KapiContextPanel.d.ts +117 -0
- package/dist/components/navigation/KapiContextPanel.js +265 -0
- package/dist/components/navigation/KapiFilterChips.d.ts +30 -0
- package/dist/components/navigation/KapiFilterChips.js +40 -0
- package/dist/components/navigation/KapiNavBadge.d.ts +26 -0
- package/dist/components/navigation/KapiNavBadge.js +33 -0
- package/dist/components/navigation/KapiPanelGroup.d.ts +69 -0
- package/dist/components/navigation/KapiPanelGroup.js +149 -0
- package/dist/components/navigation/KapiSteps.d.ts +43 -0
- package/dist/components/navigation/KapiSteps.js +63 -0
- package/dist/components/navigation/KapiTabs.d.ts +56 -0
- package/dist/components/navigation/KapiTabs.js +81 -0
- package/dist/components/navigation/KapiTree.d.ts +56 -0
- package/dist/components/navigation/KapiTree.js +157 -0
- package/dist/components/navigation/KapiWizard.d.ts +49 -0
- package/dist/components/navigation/KapiWizard.js +104 -0
- package/dist/components/navigation/MiniNavItem.d.ts +35 -0
- package/dist/components/navigation/MiniNavItem.js +57 -0
- package/dist/components/navigation/accordionLogic.d.ts +4 -0
- package/dist/components/navigation/accordionLogic.js +4 -0
- package/dist/components/navigation/activeItemLogic.d.ts +7 -0
- package/dist/components/navigation/activeItemLogic.js +4 -0
- package/dist/components/navigation/breadcrumbLogic.d.ts +8 -0
- package/dist/components/navigation/breadcrumbLogic.js +4 -0
- package/dist/components/navigation/contextPanelLogic.d.ts +27 -0
- package/dist/components/navigation/contextPanelLogic.js +11 -0
- package/dist/components/navigation/filterChipsLogic.d.ts +23 -0
- package/dist/components/navigation/filterChipsLogic.js +20 -0
- package/dist/components/navigation/index.d.ts +39 -0
- package/dist/components/navigation/navBadgeLogic.d.ts +26 -0
- package/dist/components/navigation/navBadgeLogic.js +16 -0
- package/dist/components/navigation/panelGroupLogic.d.ts +15 -0
- package/dist/components/navigation/panelGroupLogic.js +13 -0
- package/dist/components/navigation/panelMini.d.ts +13 -0
- package/dist/components/navigation/panelMini.js +9 -0
- package/dist/components/navigation/panelMiniLogic.d.ts +19 -0
- package/dist/components/navigation/panelMiniLogic.js +6 -0
- package/dist/components/navigation/stepsLogic.d.ts +25 -0
- package/dist/components/navigation/stepsLogic.js +10 -0
- package/dist/components/navigation/tabsLogic.d.ts +12 -0
- package/dist/components/navigation/tabsLogic.js +14 -0
- package/dist/components/navigation/treeLogic.d.ts +80 -0
- package/dist/components/navigation/treeLogic.js +91 -0
- package/dist/components/navigation/wizardLogic.d.ts +11 -0
- package/dist/components/navigation/wizardLogic.js +7 -0
- package/dist/components/overlays/KapiCanvasForm.d.ts +42 -0
- package/dist/components/overlays/KapiCanvasForm.js +60 -0
- package/dist/components/overlays/KapiCommandPalette.d.ts +58 -0
- package/dist/components/overlays/KapiCommandPalette.js +152 -0
- package/dist/components/overlays/KapiConfirm.d.ts +48 -0
- package/dist/components/overlays/KapiConfirm.js +94 -0
- package/dist/components/overlays/KapiContextMenu.d.ts +51 -0
- package/dist/components/overlays/KapiContextMenu.js +90 -0
- package/dist/components/overlays/KapiDialogHost.d.ts +23 -0
- package/dist/components/overlays/KapiDialogHost.js +129 -0
- package/dist/components/overlays/KapiDropdown.d.ts +30 -0
- package/dist/components/overlays/KapiDropdown.js +84 -0
- package/dist/components/overlays/KapiLoading.d.ts +14 -0
- package/dist/components/overlays/KapiLoading.js +43 -0
- package/dist/components/overlays/KapiMenuButton.d.ts +25 -0
- package/dist/components/overlays/KapiMenuButton.js +109 -0
- package/dist/components/overlays/KapiModal.d.ts +61 -0
- package/dist/components/overlays/KapiModal.js +106 -0
- package/dist/components/overlays/KapiOffcanvas.d.ts +96 -0
- package/dist/components/overlays/KapiOffcanvas.js +209 -0
- package/dist/components/overlays/KapiOffcanvasStack.d.ts +58 -0
- package/dist/components/overlays/KapiOffcanvasStack.js +84 -0
- package/dist/components/overlays/KapiPhotoView.d.ts +60 -0
- package/dist/components/overlays/KapiPhotoView.js +122 -0
- package/dist/components/overlays/KapiPopover.d.ts +46 -0
- package/dist/components/overlays/KapiPopover.js +68 -0
- package/dist/components/overlays/KapiShapeSheet.d.ts +34 -0
- package/dist/components/overlays/KapiShapeSheet.js +82 -0
- package/dist/components/overlays/KapiSplitModal.d.ts +41 -0
- package/dist/components/overlays/KapiSplitModal.js +125 -0
- package/dist/components/overlays/KapiTooltip.d.ts +38 -0
- package/dist/components/overlays/KapiTooltip.js +105 -0
- package/dist/components/overlays/canvasFormLogic.d.ts +18 -0
- package/dist/components/overlays/canvasFormLogic.js +16 -0
- package/dist/components/overlays/commandPaletteLogic.d.ts +29 -0
- package/dist/components/overlays/commandPaletteLogic.js +19 -0
- package/dist/components/overlays/dialogStore.d.ts +114 -0
- package/dist/components/overlays/dialogStore.js +76 -0
- package/dist/components/overlays/dialogUtils.d.ts +72 -0
- package/dist/components/overlays/dialogUtils.js +62 -0
- package/dist/components/overlays/exitPresenceLogic.d.ts +14 -0
- package/dist/components/overlays/exitPresenceLogic.js +5 -0
- package/dist/components/overlays/index.d.ts +38 -0
- package/dist/components/overlays/menuButtonLogic.d.ts +58 -0
- package/dist/components/overlays/menuButtonLogic.js +9 -0
- package/dist/components/overlays/menuKeyboardLogic.d.ts +25 -0
- package/dist/components/overlays/menuKeyboardLogic.js +30 -0
- package/dist/components/overlays/offcanvasCompanion.d.ts +16 -0
- package/dist/components/overlays/offcanvasCompanion.js +6 -0
- package/dist/components/overlays/offcanvasResize.d.ts +22 -0
- package/dist/components/overlays/offcanvasResize.js +10 -0
- package/dist/components/overlays/offcanvasSide.d.ts +30 -0
- package/dist/components/overlays/offcanvasSide.js +29 -0
- package/dist/components/overlays/offcanvasStack.d.ts +76 -0
- package/dist/components/overlays/offcanvasStack.js +72 -0
- package/dist/components/overlays/overlayPortal.d.ts +9 -0
- package/dist/components/overlays/overlayPortal.js +6 -0
- package/dist/components/overlays/popoverLogic.d.ts +94 -0
- package/dist/components/overlays/popoverLogic.js +47 -0
- package/dist/components/overlays/splitModalLayout.d.ts +8 -0
- package/dist/components/overlays/splitModalLayout.js +5 -0
- package/dist/components/overlays/useExitPresence.d.ts +14 -0
- package/dist/components/overlays/useExitPresence.js +34 -0
- package/dist/components/overlays/useNativeDialog.d.ts +30 -0
- package/dist/components/overlays/useNativeDialog.js +56 -0
- package/dist/components/rootProps.d.ts +17 -0
- package/dist/components/rootProps.js +4 -0
- package/dist/hooks/breakpointOpenLogic.d.ts +7 -0
- package/dist/hooks/breakpointOpenLogic.js +4 -0
- package/dist/hooks/dateFormat.d.ts +12 -0
- package/dist/hooks/dateFormat.js +15 -0
- package/dist/hooks/downloadLogic.d.ts +31 -0
- package/dist/hooks/downloadLogic.js +85 -0
- package/dist/hooks/focusLogic.d.ts +18 -0
- package/dist/hooks/focusLogic.js +17 -0
- package/dist/hooks/growOriginLogic.d.ts +22 -0
- package/dist/hooks/growOriginLogic.js +10 -0
- package/dist/hooks/hotkeyLogic.d.ts +22 -0
- package/dist/hooks/hotkeyLogic.js +32 -0
- package/dist/hooks/index.d.ts +49 -0
- package/dist/hooks/kapiRoot.d.ts +16 -0
- package/dist/hooks/kapiRoot.js +9 -0
- package/dist/hooks/onlineStatusLogic.d.ts +31 -0
- package/dist/hooks/onlineStatusLogic.js +28 -0
- package/dist/hooks/persistentStateLogic.d.ts +12 -0
- package/dist/hooks/persistentStateLogic.js +17 -0
- package/dist/hooks/rafThrottle.d.ts +33 -0
- package/dist/hooks/rafThrottle.js +33 -0
- package/dist/hooks/recentLogic.d.ts +9 -0
- package/dist/hooks/recentLogic.js +10 -0
- package/dist/hooks/reducedMotion.d.ts +13 -0
- package/dist/hooks/reducedMotion.js +5 -0
- package/dist/hooks/rightClick.d.ts +37 -0
- package/dist/hooks/rightClick.js +30 -0
- package/dist/hooks/scrollCollapseLogic.d.ts +12 -0
- package/dist/hooks/scrollCollapseLogic.js +4 -0
- package/dist/hooks/scrollEdgesLogic.d.ts +49 -0
- package/dist/hooks/scrollEdgesLogic.js +19 -0
- package/dist/hooks/slidingIndicatorLogic.d.ts +25 -0
- package/dist/hooks/slidingIndicatorLogic.js +15 -0
- package/dist/hooks/storageLogic.d.ts +15 -0
- package/dist/hooks/storageLogic.js +24 -0
- package/dist/hooks/unsavedGuardLogic.d.ts +17 -0
- package/dist/hooks/unsavedGuardLogic.js +17 -0
- package/dist/hooks/useDragScroll.d.ts +12 -0
- package/dist/hooks/useDragScroll.js +32 -0
- package/dist/hooks/useGlobalRightClick.d.ts +14 -0
- package/dist/hooks/useGlobalRightClick.js +35 -0
- package/dist/hooks/useGrowOrigin.d.ts +13 -0
- package/dist/hooks/useGrowOrigin.js +16 -0
- package/dist/hooks/useHotkey.d.ts +15 -0
- package/dist/hooks/useHotkey.js +31 -0
- package/dist/hooks/useKapiTheme.d.ts +69 -0
- package/dist/hooks/useKapiTheme.js +88 -0
- package/dist/hooks/useMediaQuery.d.ts +6 -0
- package/dist/hooks/useMediaQuery.js +13 -0
- package/dist/hooks/useObjectUrl.d.ts +6 -0
- package/dist/hooks/useObjectUrl.js +19 -0
- package/dist/hooks/useOnlineStatus.d.ts +7 -0
- package/dist/hooks/useOnlineStatus.js +7 -0
- package/dist/hooks/usePersistentState.d.ts +19 -0
- package/dist/hooks/usePersistentState.js +37 -0
- package/dist/hooks/usePlacement.d.ts +36 -0
- package/dist/hooks/usePlacement.js +84 -0
- package/dist/hooks/useRecent.d.ts +17 -0
- package/dist/hooks/useRecent.js +16 -0
- package/dist/hooks/useScrollCollapse.d.ts +10 -0
- package/dist/hooks/useScrollCollapse.js +27 -0
- package/dist/hooks/useScrollEdges.d.ts +32 -0
- package/dist/hooks/useScrollEdges.js +91 -0
- package/dist/hooks/useSlidingIndicator.d.ts +23 -0
- package/dist/hooks/useSlidingIndicator.js +51 -0
- package/dist/hooks/useUnsavedGuard.d.ts +70 -0
- package/dist/hooks/useUnsavedGuard.js +47 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.js +162 -0
- package/dist/kapi.css +2 -0
- package/dist/kapi.layered.css +4 -0
- package/package.json +87 -4
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { type RecentEntry } from "./recentLogic";
|
|
2
|
+
export type { RecentEntry } from "./recentLogic";
|
|
3
|
+
export type UseRecentOptions = {
|
|
4
|
+
/** Máximo de entradas guardadas. Default 8. */
|
|
5
|
+
max?: number;
|
|
6
|
+
};
|
|
7
|
+
export type UseRecentResult = {
|
|
8
|
+
recents: RecentEntry[];
|
|
9
|
+
push: (entry: Omit<RecentEntry, "at">) => void;
|
|
10
|
+
remove: (id: string) => void;
|
|
11
|
+
clear: () => void;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* "Recientes" persistidos. Es una comodidad de UX, NO autorización:
|
|
15
|
+
* el id guardado es un puntero y la app debe re-chequear permisos al abrir.
|
|
16
|
+
*/
|
|
17
|
+
export declare const useRecent: (key: string | null, options?: UseRecentOptions) => UseRecentResult;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { usePersistentState as e } from "./usePersistentState.js";
|
|
3
|
+
import { addRecentEntry as t, removeRecentEntry as n } from "./recentLogic.js";
|
|
4
|
+
import { useCallback as r } from "react";
|
|
5
|
+
//#region src/hooks/useRecent.ts
|
|
6
|
+
var i = (i, a) => {
|
|
7
|
+
let o = a?.max ?? 8, [s, c, { clear: l }] = e(i, []);
|
|
8
|
+
return {
|
|
9
|
+
recents: s,
|
|
10
|
+
push: r((e) => c((n) => t(n, e, o, Date.now())), [c, o]),
|
|
11
|
+
remove: r((e) => c((t) => n(t, e)), [c]),
|
|
12
|
+
clear: l
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
//#endregion
|
|
16
|
+
export { i as useRecent };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type ScrollCollapseOptions } from "./scrollCollapseLogic";
|
|
2
|
+
export type ScrollCollapseResult = {
|
|
3
|
+
collapsed: boolean;
|
|
4
|
+
sentinelRef: (node: HTMLElement | null) => void;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* Observa un centinela ubicado al tope del contenido: cuando sale de vista,
|
|
8
|
+
* `collapsed` pasa a true. `root` permite usar un contenedor con scroll.
|
|
9
|
+
*/
|
|
10
|
+
export declare const useScrollCollapse: ({ root, rootMargin }?: ScrollCollapseOptions) => ScrollCollapseResult;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { collapsedFromIntersection as e, normalizeRootMargin as t } from "./scrollCollapseLogic.js";
|
|
3
|
+
import { useCallback as n, useEffect as r, useState as i } from "react";
|
|
4
|
+
//#region src/hooks/useScrollCollapse.ts
|
|
5
|
+
var a = ({ root: a = null, rootMargin: o } = {}) => {
|
|
6
|
+
let [s, c] = i(null), [l, u] = i(!1), d = n((e) => c(e), []), f = t(o);
|
|
7
|
+
return r(() => {
|
|
8
|
+
if (!s || typeof window > "u" || typeof IntersectionObserver > "u") return;
|
|
9
|
+
let t = new IntersectionObserver((t) => {
|
|
10
|
+
let n = t[t.length - 1];
|
|
11
|
+
n && u(e(n.isIntersecting));
|
|
12
|
+
}, {
|
|
13
|
+
root: a,
|
|
14
|
+
rootMargin: f
|
|
15
|
+
});
|
|
16
|
+
return t.observe(s), () => t.disconnect();
|
|
17
|
+
}, [
|
|
18
|
+
s,
|
|
19
|
+
a,
|
|
20
|
+
f
|
|
21
|
+
]), {
|
|
22
|
+
collapsed: l,
|
|
23
|
+
sentinelRef: d
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
//#endregion
|
|
27
|
+
export { a as useScrollCollapse };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { type RefObject } from "react";
|
|
2
|
+
import { type KapiScrollAxis, type ScrollEdges } from "./scrollEdgesLogic";
|
|
3
|
+
export type UseScrollEdgesOptions = {
|
|
4
|
+
/** Eje que scrollea. Default `"x"`. */
|
|
5
|
+
axis?: KapiScrollAxis;
|
|
6
|
+
/** Tolerancia (px) para decidir si un borde "tiene más". Default 1. */
|
|
7
|
+
tolerance?: number;
|
|
8
|
+
/** Fracción de la zona visible que avanza un page. Default 0.85. */
|
|
9
|
+
pageFraction?: number;
|
|
10
|
+
};
|
|
11
|
+
export type UseScrollEdgesResult<E extends HTMLElement = HTMLElement> = {
|
|
12
|
+
/** Ref del elemento que scrollea (el que tiene `overflow`). */
|
|
13
|
+
ref: RefObject<E | null>;
|
|
14
|
+
/** Bordes con más contenido; ambos `false` mientras no hay medida o no hay desborde. */
|
|
15
|
+
edges: ScrollEdges;
|
|
16
|
+
/** Scrollea un page hacia atrás (`-1`) o adelante (`1`). Instantáneo con movimiento reducido. */
|
|
17
|
+
scrollByPage: (direction: -1 | 1) => void;
|
|
18
|
+
/** Deja `el` visible con un margen en px (default 0), moviendo lo mínimo. */
|
|
19
|
+
reveal: (el: HTMLElement, options?: {
|
|
20
|
+
padding?: number;
|
|
21
|
+
instant?: boolean;
|
|
22
|
+
}) => void;
|
|
23
|
+
/** Recalcula los bordes ya. */
|
|
24
|
+
update: () => void;
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* Detecta qué bordes de un scroller tienen más contenido (para el fade de `KapiScrollArea`) y
|
|
28
|
+
* ofrece paginar y revelar un ítem. Recalcula con scroll/resize vía `onViewportChange` (uno por
|
|
29
|
+
* frame) y con cambios de tamaño del contenedor y de sus hijos vía `ResizeObserver`; la primera
|
|
30
|
+
* medición es sincrónica en el layout effect. Sólo LTR.
|
|
31
|
+
*/
|
|
32
|
+
export declare function useScrollEdges<E extends HTMLElement = HTMLElement>({ axis, tolerance, pageFraction }?: UseScrollEdgesOptions): UseScrollEdgesResult<E>;
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { onViewportChange as e } from "./rafThrottle.js";
|
|
3
|
+
import { prefersReducedMotion as t } from "./reducedMotion.js";
|
|
4
|
+
import { DEFAULT_PAGE_FRACTION as n, pageTarget as r, revealTarget as i, sameScrollEdges as a, scrollEdges as o } from "./scrollEdgesLogic.js";
|
|
5
|
+
import { useCallback as s, useLayoutEffect as c, useRef as l, useState as u } from "react";
|
|
6
|
+
//#region src/hooks/useScrollEdges.ts
|
|
7
|
+
var d = (e, t) => t === "x" ? {
|
|
8
|
+
position: e.scrollLeft,
|
|
9
|
+
clientSize: e.clientWidth,
|
|
10
|
+
scrollSize: e.scrollWidth
|
|
11
|
+
} : {
|
|
12
|
+
position: e.scrollTop,
|
|
13
|
+
clientSize: e.clientHeight,
|
|
14
|
+
scrollSize: e.scrollHeight
|
|
15
|
+
}, f = {
|
|
16
|
+
start: !1,
|
|
17
|
+
end: !1
|
|
18
|
+
};
|
|
19
|
+
function p({ axis: p = "x", tolerance: m = 1, pageFraction: h = n } = {}) {
|
|
20
|
+
let g = l(null), [_, v] = u(f), y = l({
|
|
21
|
+
axis: p,
|
|
22
|
+
tolerance: m,
|
|
23
|
+
pageFraction: h
|
|
24
|
+
});
|
|
25
|
+
c(() => {
|
|
26
|
+
y.current = {
|
|
27
|
+
axis: p,
|
|
28
|
+
tolerance: m,
|
|
29
|
+
pageFraction: h
|
|
30
|
+
};
|
|
31
|
+
});
|
|
32
|
+
let b = s(() => {
|
|
33
|
+
let e = g.current;
|
|
34
|
+
if (!e) return;
|
|
35
|
+
let { axis: t, tolerance: n } = y.current, r = o(d(e, t), n);
|
|
36
|
+
v((e) => a(e, r) ? e : r);
|
|
37
|
+
}, []), x = l(null), S = l(/* @__PURE__ */ new Set()), C = s(() => {
|
|
38
|
+
let e = x.current, t = g.current;
|
|
39
|
+
if (!e || !t) return;
|
|
40
|
+
let n = /* @__PURE__ */ new Set([t, ...Array.from(t.children)]);
|
|
41
|
+
S.current.forEach((t) => {
|
|
42
|
+
n.has(t) || e.unobserve(t);
|
|
43
|
+
}), n.forEach((t) => {
|
|
44
|
+
S.current.has(t) || e.observe(t);
|
|
45
|
+
}), S.current = n;
|
|
46
|
+
}, []);
|
|
47
|
+
c(() => {
|
|
48
|
+
b();
|
|
49
|
+
let t = e(b);
|
|
50
|
+
return typeof ResizeObserver < "u" && (x.current = new ResizeObserver(() => b()), C()), () => {
|
|
51
|
+
t(), x.current?.disconnect(), x.current = null, S.current = /* @__PURE__ */ new Set();
|
|
52
|
+
};
|
|
53
|
+
}, [b, C]), c(() => {
|
|
54
|
+
C(), b();
|
|
55
|
+
});
|
|
56
|
+
let w = s((e, n, r) => {
|
|
57
|
+
let i = y.current.axis, a = r || t(e) ? "auto" : "smooth", o = i === "x" ? {
|
|
58
|
+
left: n,
|
|
59
|
+
behavior: a
|
|
60
|
+
} : {
|
|
61
|
+
top: n,
|
|
62
|
+
behavior: a
|
|
63
|
+
};
|
|
64
|
+
typeof e.scrollTo == "function" ? e.scrollTo(o) : i === "x" ? e.scrollLeft = n : e.scrollTop = n;
|
|
65
|
+
}, []);
|
|
66
|
+
return {
|
|
67
|
+
ref: g,
|
|
68
|
+
edges: _,
|
|
69
|
+
scrollByPage: s((e) => {
|
|
70
|
+
let t = g.current;
|
|
71
|
+
if (!t) return;
|
|
72
|
+
let { axis: n, pageFraction: i } = y.current;
|
|
73
|
+
w(t, r(d(t, n), e, i), !1);
|
|
74
|
+
}, [w]),
|
|
75
|
+
reveal: s((e, { padding: t = 0, instant: n = !1 } = {}) => {
|
|
76
|
+
let r = g.current;
|
|
77
|
+
if (!r) return;
|
|
78
|
+
let a = y.current.axis, o = r.getBoundingClientRect(), s = e.getBoundingClientRect(), c = a === "x" ? r.clientLeft : r.clientTop, l = (a === "x" ? o.left : o.top) + c, u = d(r, a), f = i(u, a === "x" ? {
|
|
79
|
+
start: s.left - l,
|
|
80
|
+
end: s.right - l
|
|
81
|
+
} : {
|
|
82
|
+
start: s.top - l,
|
|
83
|
+
end: s.bottom - l
|
|
84
|
+
}, t);
|
|
85
|
+
Math.abs(f - u.position) < .5 || w(r, f, n);
|
|
86
|
+
}, [w]),
|
|
87
|
+
update: b
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
//#endregion
|
|
91
|
+
export { p as useScrollEdges };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { type DependencyList, type RefObject } from "react";
|
|
2
|
+
export type UseSlidingIndicatorOptions = {
|
|
3
|
+
/** Clave del ítem activo; `null` oculta el indicador. */
|
|
4
|
+
active: string | number | null;
|
|
5
|
+
/** Dependencias extra que fuerzan re-medir (ítems, variante, pestañas…). */
|
|
6
|
+
deps?: DependencyList;
|
|
7
|
+
/** Devuelve el elemento activo dentro del contenedor (o `null` si no hay). */
|
|
8
|
+
findActive: (container: HTMLElement) => HTMLElement | null;
|
|
9
|
+
};
|
|
10
|
+
export type UseSlidingIndicatorResult<C extends HTMLElement = HTMLElement> = {
|
|
11
|
+
/** Ref del contenedor (el que tiene `position: relative` y aloja al indicador). */
|
|
12
|
+
containerRef: RefObject<C | null>;
|
|
13
|
+
/** Ref del `<span>` indicador (absoluto, con clases `is-visible` / `is-ready`). */
|
|
14
|
+
indicatorRef: RefObject<HTMLSpanElement | null>;
|
|
15
|
+
/** Fuerza una re-medición imperativa. */
|
|
16
|
+
remeasure: () => void;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* Motor único del indicador deslizante (rail, tabs…). Mide el ítem activo y mueve el indicador
|
|
20
|
+
* de forma imperativa: sólo toca el DOM, sin re-render. La animación y `prefers-reduced-motion`
|
|
21
|
+
* los resuelve el CSS (transición activada por `is-ready`).
|
|
22
|
+
*/
|
|
23
|
+
export declare function useSlidingIndicator<C extends HTMLElement = HTMLElement>({ active, deps, findActive }: UseSlidingIndicatorOptions): UseSlidingIndicatorResult<C>;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { slidingIndicatorBox as e } from "./slidingIndicatorLogic.js";
|
|
3
|
+
import { useCallback as t, useEffect as n, useLayoutEffect as r, useRef as i } from "react";
|
|
4
|
+
//#region src/hooks/useSlidingIndicator.ts
|
|
5
|
+
function a({ active: a, deps: o, findActive: s }) {
|
|
6
|
+
let c = i(null), l = i(null), u = i(null), d = i(s);
|
|
7
|
+
r(() => {
|
|
8
|
+
d.current = s;
|
|
9
|
+
});
|
|
10
|
+
let f = t(() => {
|
|
11
|
+
let t = c.current, n = l.current;
|
|
12
|
+
if (!t || !n) return;
|
|
13
|
+
let r = d.current(t);
|
|
14
|
+
if (!r) {
|
|
15
|
+
n.classList.remove("is-visible"), n.classList.remove("is-ready"), u.current = null;
|
|
16
|
+
return;
|
|
17
|
+
}
|
|
18
|
+
let i = u.current;
|
|
19
|
+
i && i !== r && !i.isConnected && n.classList.remove("is-ready");
|
|
20
|
+
let a = getComputedStyle(t), o = e(r.getBoundingClientRect(), t.getBoundingClientRect(), {
|
|
21
|
+
left: t.scrollLeft,
|
|
22
|
+
top: t.scrollTop
|
|
23
|
+
}, {
|
|
24
|
+
left: parseFloat(a.borderLeftWidth) || 0,
|
|
25
|
+
top: parseFloat(a.borderTopWidth) || 0
|
|
26
|
+
});
|
|
27
|
+
n.style.transform = `translate(${o.x}px, ${o.y}px)`, n.style.width = `${o.width}px`, n.style.height = `${o.height}px`, n.classList.add("is-visible"), n.classList.contains("is-ready") || requestAnimationFrame(() => n.classList.add("is-ready")), u.current = r;
|
|
28
|
+
}, []);
|
|
29
|
+
return r(f, [
|
|
30
|
+
f,
|
|
31
|
+
a,
|
|
32
|
+
...o ?? []
|
|
33
|
+
]), n(() => {
|
|
34
|
+
let e = c.current;
|
|
35
|
+
if (!e) return;
|
|
36
|
+
let t = typeof ResizeObserver > "u" ? void 0 : new ResizeObserver(f);
|
|
37
|
+
t?.observe(e), window.addEventListener("resize", f);
|
|
38
|
+
let n = typeof document > "u" ? void 0 : document.fonts, r = !0;
|
|
39
|
+
return n?.addEventListener?.("loadingdone", f), n?.ready?.then(() => {
|
|
40
|
+
r && f();
|
|
41
|
+
}), () => {
|
|
42
|
+
r = !1, t?.disconnect(), window.removeEventListener("resize", f), n?.removeEventListener?.("loadingdone", f);
|
|
43
|
+
};
|
|
44
|
+
}, [f]), {
|
|
45
|
+
containerRef: c,
|
|
46
|
+
indicatorRef: l,
|
|
47
|
+
remeasure: f
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
//#endregion
|
|
51
|
+
export { a as useSlidingIndicator };
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/** Copy del diálogo (clave `unsavedGuard` del provider); las `options` del hook ganan. */
|
|
2
|
+
export type UnsavedGuardLabels = {
|
|
3
|
+
title: string;
|
|
4
|
+
message: string;
|
|
5
|
+
leave: string;
|
|
6
|
+
stay: string;
|
|
7
|
+
};
|
|
8
|
+
export declare const DEFAULT_UNSAVED_GUARD_LABELS: UnsavedGuardLabels;
|
|
9
|
+
/** Mínimo del evento que necesita el handler (facilita testearlo sin DOM real). */
|
|
10
|
+
export type BeforeUnloadLike = {
|
|
11
|
+
preventDefault: () => void;
|
|
12
|
+
returnValue?: unknown;
|
|
13
|
+
};
|
|
14
|
+
/** Handler de `beforeunload`: pide el diálogo nativo del navegador. Puro y exportado para test. */
|
|
15
|
+
export declare const unsavedGuardHandler: (e: BeforeUnloadLike) => string;
|
|
16
|
+
/** Props listas para esparcir sobre `KapiConfirm` (`<KapiConfirm {...guard.dialogProps} />`). */
|
|
17
|
+
export type UnsavedGuardDialogProps = {
|
|
18
|
+
open: boolean;
|
|
19
|
+
variant: "warning";
|
|
20
|
+
title: string;
|
|
21
|
+
message: string;
|
|
22
|
+
confirmLabel: string;
|
|
23
|
+
cancelLabel: string;
|
|
24
|
+
/** "Descartar y salir". */
|
|
25
|
+
onConfirm: () => void;
|
|
26
|
+
/** "Quedarme" (también X, Escape y click en el fondo). */
|
|
27
|
+
onClose: () => void;
|
|
28
|
+
};
|
|
29
|
+
export type UnsavedGuard = {
|
|
30
|
+
/**
|
|
31
|
+
* `true` si es seguro continuar. Sin cambios resuelve `true` al instante; con cambios
|
|
32
|
+
* abre la confirmación y resuelve según la elección (`true` = descartar y salir).
|
|
33
|
+
*/
|
|
34
|
+
confirmLeave: () => Promise<boolean>;
|
|
35
|
+
/** ¿La confirmación está abierta? */
|
|
36
|
+
open: boolean;
|
|
37
|
+
/** El usuario elige quedarse: cierra y `confirmLeave()` resuelve `false`. */
|
|
38
|
+
onStay: () => void;
|
|
39
|
+
/** El usuario elige descartar y salir: cierra y `confirmLeave()` resuelve `true`. */
|
|
40
|
+
onLeave: () => void;
|
|
41
|
+
/** Props para `KapiConfirm` con el copy "Tienes cambios sin guardar / Quedarme / Descartar y salir". */
|
|
42
|
+
dialogProps: UnsavedGuardDialogProps;
|
|
43
|
+
};
|
|
44
|
+
export type UnsavedGuardOptions = {
|
|
45
|
+
title?: string;
|
|
46
|
+
message?: string;
|
|
47
|
+
stayLabel?: string;
|
|
48
|
+
leaveLabel?: string;
|
|
49
|
+
};
|
|
50
|
+
/**
|
|
51
|
+
* Guard de "cambios sin guardar".
|
|
52
|
+
*
|
|
53
|
+
* 1. Recarga/cierre de pestaña: mientras `dirty` sea true registra `beforeunload`
|
|
54
|
+
* (diálogo nativo del navegador).
|
|
55
|
+
* 2. Navegación interna y cierre de modales: la librería NO puede interceptar un router
|
|
56
|
+
* arbitrario, así que expone la maquinaria de decisión. La app llama
|
|
57
|
+
* `await confirmLeave()` en sus handlers de navegación / cierre y sólo avanza si
|
|
58
|
+
* resuelve `true`. Se renderiza el diálogo reusando `KapiConfirm`:
|
|
59
|
+
*
|
|
60
|
+
* ```tsx
|
|
61
|
+
* const guard = useUnsavedGuard(dirty);
|
|
62
|
+
* const close = async () => { if (await guard.confirmLeave()) onClose(); };
|
|
63
|
+
* // router: en tu onClick/navigate → if (await guard.confirmLeave()) navigate("/x");
|
|
64
|
+
* return (<>
|
|
65
|
+
* <KapiModal open={open} onClose={close}>…</KapiModal>
|
|
66
|
+
* <KapiConfirm {...guard.dialogProps} />
|
|
67
|
+
* </>);
|
|
68
|
+
* ```
|
|
69
|
+
*/
|
|
70
|
+
export declare const useUnsavedGuard: (dirty: boolean, options?: UnsavedGuardOptions) => UnsavedGuard;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useLabels as e } from "../components/locale/KapiLocaleProvider.js";
|
|
3
|
+
import { createLeaveGate as t } from "./unsavedGuardLogic.js";
|
|
4
|
+
import { useCallback as n, useEffect as r, useMemo as i, useRef as a, useState as o } from "react";
|
|
5
|
+
//#region src/hooks/useUnsavedGuard.ts
|
|
6
|
+
var s = {
|
|
7
|
+
title: "Tienes cambios sin guardar",
|
|
8
|
+
message: "Si sales ahora, se van a perder los cambios que no guardaste.",
|
|
9
|
+
leave: "Descartar y salir",
|
|
10
|
+
stay: "Quedarme"
|
|
11
|
+
}, c = (e) => (e.preventDefault(), e.returnValue = "", ""), l = (l, u = {}) => {
|
|
12
|
+
let [d, f] = o(!1), p = a(l);
|
|
13
|
+
p.current = l;
|
|
14
|
+
let m = a(null);
|
|
15
|
+
m.current ||= t(f);
|
|
16
|
+
let h = m.current;
|
|
17
|
+
r(() => {
|
|
18
|
+
if (l) return window.addEventListener("beforeunload", c), () => window.removeEventListener("beforeunload", c);
|
|
19
|
+
}, [l]), r(() => () => h.settle(!1), [h]);
|
|
20
|
+
let g = n(() => h.request(p.current), [h]), _ = n(() => h.settle(!1), [h]), v = n(() => h.settle(!0), [h]), y = e("unsavedGuard", s), b = u.title ?? y.title, x = u.message ?? y.message, S = u.leaveLabel ?? y.leave, C = u.stayLabel ?? y.stay;
|
|
21
|
+
return {
|
|
22
|
+
confirmLeave: g,
|
|
23
|
+
open: d,
|
|
24
|
+
onStay: _,
|
|
25
|
+
onLeave: v,
|
|
26
|
+
dialogProps: i(() => ({
|
|
27
|
+
open: d,
|
|
28
|
+
variant: "warning",
|
|
29
|
+
title: b,
|
|
30
|
+
message: x,
|
|
31
|
+
confirmLabel: S,
|
|
32
|
+
cancelLabel: C,
|
|
33
|
+
onConfirm: v,
|
|
34
|
+
onClose: _
|
|
35
|
+
}), [
|
|
36
|
+
d,
|
|
37
|
+
b,
|
|
38
|
+
x,
|
|
39
|
+
C,
|
|
40
|
+
S,
|
|
41
|
+
v,
|
|
42
|
+
_
|
|
43
|
+
])
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
//#endregion
|
|
47
|
+
export { s as DEFAULT_UNSAVED_GUARD_LABELS, c as unsavedGuardHandler, l as useUnsavedGuard };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import "./styles/index.css";
|
|
2
|
+
export * from "./components/inputs";
|
|
3
|
+
export * from "./components/overlays";
|
|
4
|
+
export * from "./components/data";
|
|
5
|
+
export * from "./components/display";
|
|
6
|
+
export * from "./components/feedback";
|
|
7
|
+
export * from "./components/navigation";
|
|
8
|
+
export * from "./components/layout";
|
|
9
|
+
export * from "./components/locale";
|
|
10
|
+
export * from "./hooks";
|
|
11
|
+
export { withLabels } from "./components/labelsLogic";
|
|
12
|
+
export type { KapiLabelsOverride } from "./components/labelsLogic";
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
/* empty css */
|
|
2
|
+
import { KapiButton as e, buttonClasses as t } from "./components/inputs/KapiButton.js";
|
|
3
|
+
import { KapiIconButton as n, iconButtonClasses as r } from "./components/inputs/KapiIconButton.js";
|
|
4
|
+
import { fieldControlProps as i } from "./components/inputs/fieldLogic.js";
|
|
5
|
+
import { KapiField as a, fieldClasses as o, helpClasses as s, useKapiField as c } from "./components/inputs/KapiField.js";
|
|
6
|
+
import { inputGroupAddonClasses as l, inputGroupClasses as u } from "./components/inputs/inputGroupLogic.js";
|
|
7
|
+
import { KapiInputGroup as d, useKapiInputGroup as f } from "./components/inputs/KapiInputGroup.js";
|
|
8
|
+
import { hasAdornments as p, inputBoxClasses as m } from "./components/inputs/inputLogic.js";
|
|
9
|
+
import { withLabels as h } from "./components/labelsLogic.js";
|
|
10
|
+
import { KapiLocaleProvider as g, useKapiLocale as _, useLabels as v } from "./components/locale/KapiLocaleProvider.js";
|
|
11
|
+
import { DEFAULT_INPUT_LABELS as y, KapiInput as b, inputClasses as x } from "./components/inputs/KapiInput.js";
|
|
12
|
+
import { KapiCheckbox as S } from "./components/inputs/KapiCheckbox.js";
|
|
13
|
+
import { KapiRadio as C } from "./components/inputs/KapiRadio.js";
|
|
14
|
+
import { KapiSwitch as w } from "./components/inputs/KapiSwitch.js";
|
|
15
|
+
import { KapiCheckCard as T, checkCardClasses as E } from "./components/inputs/KapiCheckCard.js";
|
|
16
|
+
import { KAPI_ROOT_SELECTOR as D, resolveKapiRoot as O, useKapiRoot as k } from "./hooks/kapiRoot.js";
|
|
17
|
+
import { isOutsidePopover as A, placePopover as j, samePlacement as M, shiftIntoView as N } from "./components/overlays/popoverLogic.js";
|
|
18
|
+
import { onViewportChange as P, rafThrottle as F } from "./hooks/rafThrottle.js";
|
|
19
|
+
import { usePlacement as I } from "./hooks/usePlacement.js";
|
|
20
|
+
import { DEFAULT_SELECT_LABELS as L, KapiSelect as R, selectClasses as z } from "./components/inputs/KapiSelect.js";
|
|
21
|
+
import { DEFAULT_CALENDAR_LABELS as B, calendarNames as V, localizedCalendarLabels as H, monthTitle as U } from "./components/inputs/datePickerLogic.js";
|
|
22
|
+
import { KapiCalendar as W } from "./components/inputs/KapiCalendar.js";
|
|
23
|
+
import { KapiDatePicker as G } from "./components/inputs/KapiDatePicker.js";
|
|
24
|
+
import { DEFAULT_DATE_RANGE_LABELS as K, KapiDateRangePicker as q } from "./components/inputs/KapiDateRangePicker.js";
|
|
25
|
+
import { cuitCheckDigit as J, formatCuit as Y, formatCurrency as X, formatDni as Z, isValidCuit as Q, parseCurrency as $ } from "./components/inputs/maskLogic.js";
|
|
26
|
+
import { DEFAULT_CUIT_INPUT_LABELS as ee, KapiCuitInput as te, KapiCurrencyInput as ne, KapiDniInput as re } from "./components/inputs/KapiMaskedInput.js";
|
|
27
|
+
import { DEFAULT_FILE_UPLOAD_LABELS as ie, KapiFileUpload as ae } from "./components/inputs/KapiFileUpload.js";
|
|
28
|
+
import { slidingIndicatorBox as oe } from "./hooks/slidingIndicatorLogic.js";
|
|
29
|
+
import { useSlidingIndicator as se } from "./hooks/useSlidingIndicator.js";
|
|
30
|
+
import { KapiTooltip as ce } from "./components/overlays/KapiTooltip.js";
|
|
31
|
+
import { KapiSegmented as le } from "./components/inputs/KapiSegmented.js";
|
|
32
|
+
import { KapiTextarea as ue, textareaClasses as de } from "./components/inputs/KapiTextarea.js";
|
|
33
|
+
import { KapiSlider as fe, sliderClasses as pe } from "./components/inputs/KapiSlider.js";
|
|
34
|
+
import { DEFAULT_NUMBER_STEPPER_LABELS as me, KapiNumberStepper as he, stepperClasses as ge } from "./components/inputs/KapiNumberStepper.js";
|
|
35
|
+
import { tagClasses as _e } from "./components/display/tagLogic.js";
|
|
36
|
+
import { DEFAULT_TAG_LABELS as ve, KapiTag as ye } from "./components/display/KapiTag.js";
|
|
37
|
+
import { DEFAULT_TAG_INPUT_LABELS as be, KapiTagInput as xe, tagInputClasses as Se } from "./components/inputs/KapiTagInput.js";
|
|
38
|
+
import { DEFAULT_RATING_LABELS as Ce, KapiRating as we, ratingClasses as Te } from "./components/inputs/KapiRating.js";
|
|
39
|
+
import { DEFAULT_AUTOCOMPLETE_LABELS as Ee, KapiAutocomplete as De } from "./components/inputs/KapiAutocomplete.js";
|
|
40
|
+
import { KapiOverlayPortal as Oe } from "./components/overlays/overlayPortal.js";
|
|
41
|
+
import { REDUCED_MOTION_QUERY as ke, prefersReducedMotion as Ae } from "./hooks/reducedMotion.js";
|
|
42
|
+
import { KapiPopover as je } from "./components/overlays/KapiPopover.js";
|
|
43
|
+
import { buildCsv as Me, clampColumnWidth as Ne, compareSortValues as Pe, computePagination as Fe, csvCell as Ie, effectiveColumnWidth as Le, filterColumnOptions as Re, filterRows as ze, filterSearchColumns as Be, filterTerms as Ve, isFilterActive as He, nextSortState as Ue, normalizeFilterText as We, paginateRows as Ge, resizeColumn as Ke, rowMatchesFilter as qe, sortRows as Je, sortRowsByColumn as Ye, toggleColumnVisibility as Xe, visibleColumnsOf as Ze } from "./components/data/tableLogic.js";
|
|
44
|
+
import { facetKeyAction as Qe, facetMenuItems as $e, parseDateRangeValue as et, toDateRangeValue as tt, toDateValue as nt } from "./components/inputs/facetedSearchLogic.js";
|
|
45
|
+
import { DEFAULT_FACETED_SEARCH_LABELS as rt, KapiFacetedSearch as it } from "./components/inputs/KapiFacetedSearch.js";
|
|
46
|
+
import { clampMenuPosition as at } from "./hooks/rightClick.js";
|
|
47
|
+
import { KapiContextMenu as ot } from "./components/overlays/KapiContextMenu.js";
|
|
48
|
+
import { KapiMenuButton as st } from "./components/overlays/KapiMenuButton.js";
|
|
49
|
+
import { KapiDropdown as ct } from "./components/overlays/KapiDropdown.js";
|
|
50
|
+
import { DEFAULT_PHOTO_VIEW_LABELS as lt, KapiPhotoView as ut } from "./components/overlays/KapiPhotoView.js";
|
|
51
|
+
import { DEFAULT_SHAPE_SHEET_LABELS as dt, KapiShapeSheet as ft } from "./components/overlays/KapiShapeSheet.js";
|
|
52
|
+
import { originWithinCard as pt, rectCenter as mt } from "./hooks/growOriginLogic.js";
|
|
53
|
+
import { DEFAULT_MODAL_LABELS as ht, KapiModal as gt } from "./components/overlays/KapiModal.js";
|
|
54
|
+
import { DEFAULT_SPLIT_MODAL_LABELS as _t, KapiSplitModal as vt } from "./components/overlays/KapiSplitModal.js";
|
|
55
|
+
import { DEFAULT_CONFIRM_LABELS as yt, KapiConfirm as bt } from "./components/overlays/KapiConfirm.js";
|
|
56
|
+
import { createDialogStore as xt, kapiAlert as St, kapiCloseDialogs as Ct, kapiConfirm as wt, kapiLoading as Tt } from "./components/overlays/dialogStore.js";
|
|
57
|
+
import { DEFAULT_DIALOG_LABELS as Et, KapiDialogHost as Dt } from "./components/overlays/KapiDialogHost.js";
|
|
58
|
+
import { KapiLoading as Ot } from "./components/overlays/KapiLoading.js";
|
|
59
|
+
import { DEFAULT_OFFCANVAS_LABELS as kt, KapiOffcanvas as At } from "./components/overlays/KapiOffcanvas.js";
|
|
60
|
+
import { KapiOffcanvasStack as jt, useKapiOffcanvasPanel as Mt, useKapiOffcanvasStack as Nt } from "./components/overlays/KapiOffcanvasStack.js";
|
|
61
|
+
import { DEFAULT_CANVAS_FORM_LABELS as Pt, KapiCanvasForm as Ft } from "./components/overlays/KapiCanvasForm.js";
|
|
62
|
+
import { DEFAULT_COMMAND_PALETTE_LABELS as It, KapiCommandPalette as Lt } from "./components/overlays/KapiCommandPalette.js";
|
|
63
|
+
import { downloadBlob as Rt, fileKind as zt, fileNameFromContentDisposition as Bt, fileNameFromUrl as Vt, formatFileSize as Ht } from "./hooks/downloadLogic.js";
|
|
64
|
+
import { useDragScroll as Ut } from "./hooks/useDragScroll.js";
|
|
65
|
+
import { KapiSkeleton as Wt } from "./components/feedback/KapiSkeleton.js";
|
|
66
|
+
import { selectedCountLabel as Gt } from "./components/feedback/bulkBarLogic.js";
|
|
67
|
+
import { DEFAULT_BULK_BAR_LABELS as Kt, KapiBulkBar as qt } from "./components/feedback/KapiBulkBar.js";
|
|
68
|
+
import { DEFAULT_TABLE_FILTER_LABELS as Jt, KapiTableFilter as Yt } from "./components/data/KapiTableFilter.js";
|
|
69
|
+
import { DEFAULT_TABLE_LABELS as Xt, KapiTable as Zt } from "./components/data/KapiTable.js";
|
|
70
|
+
import { KapiPagination as Qt } from "./components/data/KapiPagination.js";
|
|
71
|
+
import { KapiBadge as $t, badgeClasses as en } from "./components/display/KapiBadge.js";
|
|
72
|
+
import { colorIndexFrom as tn, initialsFrom as nn } from "./components/display/avatarLogic.js";
|
|
73
|
+
import { KapiAvatar as rn } from "./components/display/KapiAvatar.js";
|
|
74
|
+
import { iconTileClasses as an, iconTileRadiusPx as on, iconTileSizePx as sn } from "./components/display/iconTileLogic.js";
|
|
75
|
+
import { KapiIconTile as cn } from "./components/display/KapiIconTile.js";
|
|
76
|
+
import { statClasses as ln } from "./components/display/statLogic.js";
|
|
77
|
+
import { KapiStat as un } from "./components/display/KapiStat.js";
|
|
78
|
+
import { showConnector as dn, timelineDotClass as fn } from "./components/display/timelineLogic.js";
|
|
79
|
+
import { KapiTimeline as pn } from "./components/display/KapiTimeline.js";
|
|
80
|
+
import { KapiDescriptionList as mn, descriptionListClasses as hn } from "./components/display/KapiDescriptionList.js";
|
|
81
|
+
import { avatarOverlapPx as gn, overflowLabel as _n, splitAvatarGroup as vn } from "./components/display/avatarGroupLogic.js";
|
|
82
|
+
import { KapiAvatarGroup as yn } from "./components/display/KapiAvatarGroup.js";
|
|
83
|
+
import { annotationClasses as bn, annotationRole as xn } from "./components/display/annotationLogic.js";
|
|
84
|
+
import { KapiAnnotation as Sn } from "./components/display/KapiAnnotation.js";
|
|
85
|
+
import { useObjectUrl as Cn } from "./hooks/useObjectUrl.js";
|
|
86
|
+
import { DEFAULT_FILE_VIEWER_LABELS as wn, KapiFileViewer as Tn } from "./components/display/KapiFileViewer.js";
|
|
87
|
+
import { formatDate as En, formatRelativeTime as Dn, isoDateTime as On } from "./hooks/dateFormat.js";
|
|
88
|
+
import { fileItemKind as kn, fileMetaParts as An } from "./components/display/fileItemLogic.js";
|
|
89
|
+
import { KapiFileItem as jn, KapiFileList as Mn } from "./components/display/KapiFileItem.js";
|
|
90
|
+
import { KapiComment as Nn } from "./components/display/KapiComment.js";
|
|
91
|
+
import { canSubmitComment as Pn, isSubmitShortcut as Fn } from "./components/display/commentLogic.js";
|
|
92
|
+
import { DEFAULT_COMMENT_COMPOSER_LABELS as In, KapiCommentComposer as Ln } from "./components/display/KapiCommentComposer.js";
|
|
93
|
+
import { KapiAlert as Rn, alertRole as zn } from "./components/feedback/KapiAlert.js";
|
|
94
|
+
import { TOAST_ACTION_DURATION as Bn, TOAST_DEFAULT_DURATION as Vn, createToastStore as Hn, kapiToast as Un, toastStore as Wn } from "./components/feedback/toastStore.js";
|
|
95
|
+
import { DEFAULT_TOAST_LABELS as Gn, KapiToastContainer as Kn } from "./components/feedback/KapiToastContainer.js";
|
|
96
|
+
import { DEFAULT_FAB_LABELS as qn, KapiFab as Jn } from "./components/feedback/KapiFab.js";
|
|
97
|
+
import { DEFAULT_STORAGE_NAMESPACE as Yn, storageKey as Xn } from "./hooks/storageLogic.js";
|
|
98
|
+
import { TOUR_STORAGE_KEY as Zn, tourStorageKey as Qn } from "./components/feedback/tourLogic.js";
|
|
99
|
+
import { KapiTour as $n, useKapiTour as er } from "./components/feedback/KapiTour.js";
|
|
100
|
+
import { circleDash as tr, clampPercent as nr, formatPercent as rr, progressClasses as ir } from "./components/feedback/progressLogic.js";
|
|
101
|
+
import { KapiProgress as ar } from "./components/feedback/KapiProgress.js";
|
|
102
|
+
import { KapiEmpty as or } from "./components/feedback/KapiEmpty.js";
|
|
103
|
+
import { DEFAULT_COUNTDOWN_LABELS as sr, DEFAULT_COUNTDOWN_LOCALE as cr, breakdown as lr, bucketFor as ur, chipText as dr, describe as fr, formatClock as pr, formatDuration as mr, parseTarget as hr, remainingMs as gr, resolveTones as _r } from "./components/feedback/countdownLogic.js";
|
|
104
|
+
import { KapiCountdown as vr } from "./components/feedback/KapiCountdown.js";
|
|
105
|
+
import { DEFAULT_UNSAVED_BAR_LABELS as yr, KapiUnsavedBar as br } from "./components/feedback/KapiUnsavedBar.js";
|
|
106
|
+
import { SERVER_ONLINE_STATUS as xr, createOnlineStore as Sr, readOnline as Cr } from "./hooks/onlineStatusLogic.js";
|
|
107
|
+
import { useOnlineStatus as wr } from "./hooks/useOnlineStatus.js";
|
|
108
|
+
import { DEFAULT_RESTORED_DURATION as Tr, nextOfflineBannerPhase as Er, offlineBannerClasses as Dr } from "./components/feedback/offlineBannerLogic.js";
|
|
109
|
+
import { DEFAULT_OFFLINE_BANNER_LABELS as Or, KapiOfflineBanner as kr } from "./components/feedback/KapiOfflineBanner.js";
|
|
110
|
+
import { DEFAULT_WIZARD_LABELS as Ar, KapiWizard as jr } from "./components/navigation/KapiWizard.js";
|
|
111
|
+
import { resolveSteps as Mr, stepsClasses as Nr } from "./components/navigation/stepsLogic.js";
|
|
112
|
+
import { DEFAULT_STEPS_LABELS as Pr, KapiSteps as Fr } from "./components/navigation/KapiSteps.js";
|
|
113
|
+
import { canCollapse as Ir, ctxPanelClasses as Lr, resolveCollapsed as Rr } from "./components/navigation/contextPanelLogic.js";
|
|
114
|
+
import { DEFAULT_LINK_LABELS as zr } from "./components/locale/linkLabels.js";
|
|
115
|
+
import { NAV_BADGE_MAX as Br, NAV_BADGE_PANEL_MAX as Vr, navBadgeA11yText as Hr, navBadgeView as Ur } from "./components/navigation/navBadgeLogic.js";
|
|
116
|
+
import { KapiNavBadge as Wr } from "./components/navigation/KapiNavBadge.js";
|
|
117
|
+
import { useKapiPanelMini as Gr } from "./components/navigation/panelMini.js";
|
|
118
|
+
import { DEFAULT_CONTEXT_PANEL_LABELS as Kr, KapiContextPanel as qr, KapiContextSections as Jr } from "./components/navigation/KapiContextPanel.js";
|
|
119
|
+
import { DEFAULT_COLLAPSIBLE_PANEL_LABELS as Yr, KapiCollapsiblePanel as Xr, KapiCollapsiblePanelStripItem as Zr } from "./components/navigation/KapiCollapsiblePanel.js";
|
|
120
|
+
import { DEFAULT_PAGE_FRACTION as Qr, DEFAULT_SCROLL_EDGE_TOLERANCE as $r, maxScroll as ei, pageSize as ti, pageTarget as ni, revealTarget as ri, sameScrollEdges as ii, scrollEdges as ai } from "./hooks/scrollEdgesLogic.js";
|
|
121
|
+
import { useScrollEdges as oi } from "./hooks/useScrollEdges.js";
|
|
122
|
+
import { nextTabId as si, tabClasses as ci, tabId as li, tabPanelId as ui } from "./components/navigation/tabsLogic.js";
|
|
123
|
+
import { KapiTabPanel as di, KapiTabs as fi } from "./components/navigation/KapiTabs.js";
|
|
124
|
+
import { breadcrumbKinds as pi } from "./components/navigation/breadcrumbLogic.js";
|
|
125
|
+
import { DEFAULT_BREADCRUMB_LABELS as mi, KapiBreadcrumb as hi } from "./components/navigation/KapiBreadcrumb.js";
|
|
126
|
+
import { normalizeOpenIds as gi, toggleOpenId as _i } from "./components/navigation/accordionLogic.js";
|
|
127
|
+
import { KapiAccordion as vi } from "./components/navigation/KapiAccordion.js";
|
|
128
|
+
import { DEFAULT_TREE_LABELS as yi, KapiTree as bi } from "./components/navigation/KapiTree.js";
|
|
129
|
+
import { activeChipIndex as xi, chipAriaLabel as Si, filterChipClasses as Ci, nextChipIndex as wi } from "./components/navigation/filterChipsLogic.js";
|
|
130
|
+
import { DEFAULT_FILTER_CHIPS_LABELS as Ti, KapiFilterChips as Ei } from "./components/navigation/KapiFilterChips.js";
|
|
131
|
+
import { PANEL_GROUP_COUNT_MAX as Di, formatCount as Oi, panelGroupClasses as ki, resolveOpen as Ai } from "./components/navigation/panelGroupLogic.js";
|
|
132
|
+
import { KapiPanelGroup as ji } from "./components/navigation/KapiPanelGroup.js";
|
|
133
|
+
import { useGlobalRightClick as Mi } from "./hooks/useGlobalRightClick.js";
|
|
134
|
+
import { SHELL_MOBILE_QUERY as Ni, matchesQuery as Pi, useMediaQuery as Fi } from "./hooks/useMediaQuery.js";
|
|
135
|
+
import { DARK_SCHEME_QUERY as Ii, FONTS as Li, KapiThemeContext as Ri, resolveTheme as zi, themeRootStyle as Bi, themeStorageKeys as Vi, useKapiTheme as Hi, useKapiThemeState as Ui } from "./hooks/useKapiTheme.js";
|
|
136
|
+
import { KapiShell as Wi } from "./components/layout/KapiShell.js";
|
|
137
|
+
import { DEFAULT_RAIL_LABELS as Gi, KapiRail as Ki } from "./components/layout/KapiRail.js";
|
|
138
|
+
import { DEFAULT_CONTEXT_SLOT_LABELS as qi, KapiContextSlot as Ji } from "./components/layout/KapiContextSlot.js";
|
|
139
|
+
import { KapiPanelDivider as Yi, KapiPanelHint as Xi, KapiPanelItem as Zi, KapiPanelLabel as Qi, KapiPanelList as $i } from "./components/layout/KapiPanelParts.js";
|
|
140
|
+
import { cardClasses as ea, hasCardHeader as ta } from "./components/layout/cardLogic.js";
|
|
141
|
+
import { KapiCard as na, KapiCardBody as ra, KapiCardFooter as ia, KapiCardHeader as aa } from "./components/layout/KapiCard.js";
|
|
142
|
+
import { KapiDivider as oa, dividerClasses as sa } from "./components/layout/KapiDivider.js";
|
|
143
|
+
import { DEFAULT_ACCOUNT_MENU_LABELS as ca, KapiAccountMenu as la } from "./components/layout/KapiAccountMenu.js";
|
|
144
|
+
import { NOTIFICATION_BELL_PLACEMENT as ua, bellTriggerLabel as da } from "./components/layout/notificationBellLogic.js";
|
|
145
|
+
import { DEFAULT_NOTIFICATION_BELL_LABELS as fa, KapiNotificationBell as pa } from "./components/layout/KapiNotificationBell.js";
|
|
146
|
+
import { accessCardAffordance as ma, accessCardClasses as ha, isActivationKey as ga } from "./components/layout/accessCardLogic.js";
|
|
147
|
+
import { KapiAccessCard as _a } from "./components/layout/KapiAccessCard.js";
|
|
148
|
+
import { KapiStack as va } from "./components/layout/KapiStack.js";
|
|
149
|
+
import { KapiCluster as ya } from "./components/layout/KapiCluster.js";
|
|
150
|
+
import { KapiGrid as ba } from "./components/layout/KapiGrid.js";
|
|
151
|
+
import { DEFAULT_ROOT_MARGIN as xa, collapsedFromIntersection as Sa, normalizeRootMargin as Ca } from "./hooks/scrollCollapseLogic.js";
|
|
152
|
+
import { useScrollCollapse as wa } from "./hooks/useScrollCollapse.js";
|
|
153
|
+
import { KapiPageHeader as Ta } from "./components/layout/KapiPageHeader.js";
|
|
154
|
+
import { DEFAULT_SCROLL_AREA_LABELS as Ea, KapiScrollArea as Da } from "./components/layout/KapiScrollArea.js";
|
|
155
|
+
import { DEFAULT_UNSAVED_GUARD_LABELS as Oa, unsavedGuardHandler as ka, useUnsavedGuard as Aa } from "./hooks/useUnsavedGuard.js";
|
|
156
|
+
import { useHotkey as ja } from "./hooks/useHotkey.js";
|
|
157
|
+
import { parseStored as Ma, serializeStored as Na } from "./hooks/persistentStateLogic.js";
|
|
158
|
+
import { usePersistentState as Pa } from "./hooks/usePersistentState.js";
|
|
159
|
+
import { addRecentEntry as Fa, removeRecentEntry as Ia } from "./hooks/recentLogic.js";
|
|
160
|
+
import { useRecent as La } from "./hooks/useRecent.js";
|
|
161
|
+
import { useGrowOrigin as Ra } from "./hooks/useGrowOrigin.js";
|
|
162
|
+
export { Ii as DARK_SCHEME_QUERY, ca as DEFAULT_ACCOUNT_MENU_LABELS, Ee as DEFAULT_AUTOCOMPLETE_LABELS, mi as DEFAULT_BREADCRUMB_LABELS, Kt as DEFAULT_BULK_BAR_LABELS, B as DEFAULT_CALENDAR_LABELS, Pt as DEFAULT_CANVAS_FORM_LABELS, Yr as DEFAULT_COLLAPSIBLE_PANEL_LABELS, It as DEFAULT_COMMAND_PALETTE_LABELS, In as DEFAULT_COMMENT_COMPOSER_LABELS, yt as DEFAULT_CONFIRM_LABELS, Kr as DEFAULT_CONTEXT_PANEL_LABELS, qi as DEFAULT_CONTEXT_SLOT_LABELS, sr as DEFAULT_COUNTDOWN_LABELS, cr as DEFAULT_COUNTDOWN_LOCALE, ee as DEFAULT_CUIT_INPUT_LABELS, K as DEFAULT_DATE_RANGE_LABELS, Et as DEFAULT_DIALOG_LABELS, qn as DEFAULT_FAB_LABELS, rt as DEFAULT_FACETED_SEARCH_LABELS, ie as DEFAULT_FILE_UPLOAD_LABELS, wn as DEFAULT_FILE_VIEWER_LABELS, Ti as DEFAULT_FILTER_CHIPS_LABELS, y as DEFAULT_INPUT_LABELS, zr as DEFAULT_LINK_LABELS, ht as DEFAULT_MODAL_LABELS, fa as DEFAULT_NOTIFICATION_BELL_LABELS, me as DEFAULT_NUMBER_STEPPER_LABELS, kt as DEFAULT_OFFCANVAS_LABELS, Or as DEFAULT_OFFLINE_BANNER_LABELS, Qr as DEFAULT_PAGE_FRACTION, lt as DEFAULT_PHOTO_VIEW_LABELS, Gi as DEFAULT_RAIL_LABELS, Ce as DEFAULT_RATING_LABELS, Tr as DEFAULT_RESTORED_DURATION, xa as DEFAULT_ROOT_MARGIN, Ea as DEFAULT_SCROLL_AREA_LABELS, $r as DEFAULT_SCROLL_EDGE_TOLERANCE, L as DEFAULT_SELECT_LABELS, dt as DEFAULT_SHAPE_SHEET_LABELS, _t as DEFAULT_SPLIT_MODAL_LABELS, Pr as DEFAULT_STEPS_LABELS, Yn as DEFAULT_STORAGE_NAMESPACE, Jt as DEFAULT_TABLE_FILTER_LABELS, Xt as DEFAULT_TABLE_LABELS, be as DEFAULT_TAG_INPUT_LABELS, ve as DEFAULT_TAG_LABELS, Gn as DEFAULT_TOAST_LABELS, yi as DEFAULT_TREE_LABELS, yr as DEFAULT_UNSAVED_BAR_LABELS, Oa as DEFAULT_UNSAVED_GUARD_LABELS, Ar as DEFAULT_WIZARD_LABELS, Li as FONTS, D as KAPI_ROOT_SELECTOR, _a as KapiAccessCard, vi as KapiAccordion, la as KapiAccountMenu, Rn as KapiAlert, Sn as KapiAnnotation, De as KapiAutocomplete, rn as KapiAvatar, yn as KapiAvatarGroup, $t as KapiBadge, hi as KapiBreadcrumb, qt as KapiBulkBar, e as KapiButton, W as KapiCalendar, Ft as KapiCanvasForm, na as KapiCard, ra as KapiCardBody, ia as KapiCardFooter, aa as KapiCardHeader, T as KapiCheckCard, S as KapiCheckbox, ya as KapiCluster, Xr as KapiCollapsiblePanel, Zr as KapiCollapsiblePanelStripItem, Lt as KapiCommandPalette, Nn as KapiComment, Ln as KapiCommentComposer, bt as KapiConfirm, ot as KapiContextMenu, qr as KapiContextPanel, Jr as KapiContextSections, Ji as KapiContextSlot, vr as KapiCountdown, te as KapiCuitInput, ne as KapiCurrencyInput, G as KapiDatePicker, q as KapiDateRangePicker, mn as KapiDescriptionList, Dt as KapiDialogHost, oa as KapiDivider, re as KapiDniInput, ct as KapiDropdown, or as KapiEmpty, Jn as KapiFab, it as KapiFacetedSearch, a as KapiField, jn as KapiFileItem, Mn as KapiFileList, ae as KapiFileUpload, Tn as KapiFileViewer, Ei as KapiFilterChips, ba as KapiGrid, n as KapiIconButton, cn as KapiIconTile, b as KapiInput, d as KapiInputGroup, Ot as KapiLoading, g as KapiLocaleProvider, st as KapiMenuButton, gt as KapiModal, Wr as KapiNavBadge, pa as KapiNotificationBell, he as KapiNumberStepper, At as KapiOffcanvas, jt as KapiOffcanvasStack, kr as KapiOfflineBanner, Oe as KapiOverlayPortal, Ta as KapiPageHeader, Qt as KapiPagination, Yi as KapiPanelDivider, ji as KapiPanelGroup, Xi as KapiPanelHint, Zi as KapiPanelItem, Qi as KapiPanelLabel, $i as KapiPanelList, ut as KapiPhotoView, je as KapiPopover, ar as KapiProgress, C as KapiRadio, Ki as KapiRail, we as KapiRating, Da as KapiScrollArea, le as KapiSegmented, R as KapiSelect, ft as KapiShapeSheet, Wi as KapiShell, Wt as KapiSkeleton, fe as KapiSlider, vt as KapiSplitModal, va as KapiStack, un as KapiStat, Fr as KapiSteps, w as KapiSwitch, di as KapiTabPanel, Zt as KapiTable, Yt as KapiTableFilter, fi as KapiTabs, ye as KapiTag, xe as KapiTagInput, ue as KapiTextarea, Ri as KapiThemeContext, pn as KapiTimeline, Kn as KapiToastContainer, ce as KapiTooltip, $n as KapiTour, bi as KapiTree, br as KapiUnsavedBar, jr as KapiWizard, Br as NAV_BADGE_MAX, Vr as NAV_BADGE_PANEL_MAX, ua as NOTIFICATION_BELL_PLACEMENT, Di as PANEL_GROUP_COUNT_MAX, ke as REDUCED_MOTION_QUERY, xr as SERVER_ONLINE_STATUS, Ni as SHELL_MOBILE_QUERY, Bn as TOAST_ACTION_DURATION, Vn as TOAST_DEFAULT_DURATION, Zn as TOUR_STORAGE_KEY, ma as accessCardAffordance, ha as accessCardClasses, xi as activeChipIndex, Fa as addRecentEntry, zn as alertRole, bn as annotationClasses, xn as annotationRole, gn as avatarOverlapPx, en as badgeClasses, da as bellTriggerLabel, pi as breadcrumbKinds, lr as breakdown, ur as bucketFor, Me as buildCsv, t as buttonClasses, V as calendarNames, Ir as canCollapse, Pn as canSubmitComment, ea as cardClasses, E as checkCardClasses, Si as chipAriaLabel, dr as chipText, tr as circleDash, Ne as clampColumnWidth, at as clampMenuPosition, nr as clampPercent, Sa as collapsedFromIntersection, tn as colorIndexFrom, Pe as compareSortValues, Fe as computePagination, xt as createDialogStore, Sr as createOnlineStore, Hn as createToastStore, Ie as csvCell, Lr as ctxPanelClasses, J as cuitCheckDigit, fr as describe, hn as descriptionListClasses, sa as dividerClasses, Rt as downloadBlob, Le as effectiveColumnWidth, Qe as facetKeyAction, $e as facetMenuItems, o as fieldClasses, i as fieldControlProps, kn as fileItemKind, zt as fileKind, An as fileMetaParts, Bt as fileNameFromContentDisposition, Vt as fileNameFromUrl, Ci as filterChipClasses, Re as filterColumnOptions, ze as filterRows, Be as filterSearchColumns, Ve as filterTerms, pr as formatClock, Oi as formatCount, Y as formatCuit, X as formatCurrency, En as formatDate, Z as formatDni, mr as formatDuration, Ht as formatFileSize, rr as formatPercent, Dn as formatRelativeTime, p as hasAdornments, ta as hasCardHeader, s as helpClasses, r as iconButtonClasses, an as iconTileClasses, on as iconTileRadiusPx, sn as iconTileSizePx, nn as initialsFrom, m as inputBoxClasses, x as inputClasses, l as inputGroupAddonClasses, u as inputGroupClasses, ga as isActivationKey, He as isFilterActive, A as isOutsidePopover, Fn as isSubmitShortcut, Q as isValidCuit, On as isoDateTime, St as kapiAlert, Ct as kapiCloseDialogs, wt as kapiConfirm, Tt as kapiLoading, Un as kapiToast, H as localizedCalendarLabels, Pi as matchesQuery, ei as maxScroll, U as monthTitle, Hr as navBadgeA11yText, Ur as navBadgeView, wi as nextChipIndex, Er as nextOfflineBannerPhase, Ue as nextSortState, si as nextTabId, We as normalizeFilterText, gi as normalizeOpenIds, Ca as normalizeRootMargin, Dr as offlineBannerClasses, P as onViewportChange, pt as originWithinCard, _n as overflowLabel, ti as pageSize, ni as pageTarget, Ge as paginateRows, ki as panelGroupClasses, $ as parseCurrency, et as parseDateRangeValue, Ma as parseStored, hr as parseTarget, j as placePopover, Ae as prefersReducedMotion, ir as progressClasses, F as rafThrottle, Te as ratingClasses, Cr as readOnline, mt as rectCenter, gr as remainingMs, Ia as removeRecentEntry, Ke as resizeColumn, Rr as resolveCollapsed, O as resolveKapiRoot, Ai as resolveOpen, Mr as resolveSteps, zi as resolveTheme, _r as resolveTones, ri as revealTarget, qe as rowMatchesFilter, M as samePlacement, ii as sameScrollEdges, ai as scrollEdges, z as selectClasses, Gt as selectedCountLabel, Na as serializeStored, N as shiftIntoView, dn as showConnector, pe as sliderClasses, oe as slidingIndicatorBox, Je as sortRows, Ye as sortRowsByColumn, vn as splitAvatarGroup, ln as statClasses, ge as stepperClasses, Nr as stepsClasses, Xn as storageKey, ci as tabClasses, li as tabId, ui as tabPanelId, _e as tagClasses, Se as tagInputClasses, de as textareaClasses, Bi as themeRootStyle, Vi as themeStorageKeys, fn as timelineDotClass, tt as toDateRangeValue, nt as toDateValue, Wn as toastStore, Xe as toggleColumnVisibility, _i as toggleOpenId, Qn as tourStorageKey, ka as unsavedGuardHandler, Ut as useDragScroll, Mi as useGlobalRightClick, Ra as useGrowOrigin, ja as useHotkey, c as useKapiField, f as useKapiInputGroup, _ as useKapiLocale, Mt as useKapiOffcanvasPanel, Nt as useKapiOffcanvasStack, Gr as useKapiPanelMini, k as useKapiRoot, Hi as useKapiTheme, Ui as useKapiThemeState, er as useKapiTour, v as useLabels, Fi as useMediaQuery, Cn as useObjectUrl, wr as useOnlineStatus, Pa as usePersistentState, I as usePlacement, La as useRecent, wa as useScrollCollapse, oi as useScrollEdges, se as useSlidingIndicator, Aa as useUnsavedGuard, Ze as visibleColumnsOf, h as withLabels };
|