@kapiuara/ui 0.23.0 → 0.23.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/dist/components/chat/KapiChatDivider.js +1 -2
- package/dist/components/chat/KapiChatList.js +15 -16
- package/dist/components/chat/KapiChatThread.js +21 -22
- package/dist/components/chat/KapiComposer.js +23 -24
- package/dist/components/chat/KapiMessageBubble.js +5 -6
- package/dist/components/chat/KapiTypingIndicator.js +5 -6
- package/dist/components/chat/chatLogic.js +1 -2
- package/dist/components/data/KapiBarChart.js +22 -23
- package/dist/components/data/KapiDataTable.js +92 -93
- package/dist/components/data/KapiEventCalendar.js +96 -97
- package/dist/components/data/KapiHeatmap.js +21 -22
- package/dist/components/data/KapiLineChart.js +23 -24
- package/dist/components/data/KapiPagination.js +1 -2
- package/dist/components/data/KapiPaginationFooter.js +5 -6
- package/dist/components/data/KapiScatterChart.js +18 -19
- package/dist/components/data/KapiSheet.js +2 -3
- package/dist/components/data/KapiSparkline.js +1 -2
- package/dist/components/data/KapiTable.js +107 -108
- package/dist/components/data/KapiTableFilter.js +13 -14
- package/dist/components/data/KapiTableFooter.js +21 -22
- package/dist/components/data/KapiTableRow.js +10 -11
- package/dist/components/data/KapiTableToolbar.js +95 -96
- package/dist/components/data/barChartLogic.js +1 -2
- package/dist/components/data/chartFrame.js +13 -14
- package/dist/components/data/datasetSelectionLogic.js +1 -2
- package/dist/components/data/eventCalendarLogic.js +2 -3
- package/dist/components/data/heatmapLogic.js +1 -2
- package/dist/components/data/lineChartLogic.js +1 -2
- package/dist/components/data/rowClickLogic.js +2 -17
- package/dist/components/data/scatterLogic.js +1 -2
- package/dist/components/data/sparklineLogic.js +1 -2
- package/dist/components/data/tableCells.js +14 -15
- package/dist/components/data/tableHeaderMenu.js +1 -2
- package/dist/components/data/tableLabels.js +1 -2
- package/dist/components/data/tableLogic.js +0 -1
- package/dist/components/data/tablePaginationLogic.js +1 -2
- package/dist/components/data/tableResizeLogic.js +1 -2
- package/dist/components/data/tableSlots.js +1 -2
- package/dist/components/data/tableSpanLogic.js +1 -2
- package/dist/components/data/useColumnResize.js +23 -24
- package/dist/components/data/useRowKeyWarning.js +1 -2
- package/dist/components/data/useTableEdges.js +1 -2
- package/dist/components/data/useTableSelection.js +25 -26
- package/dist/components/display/KapiAnchor.js +7 -8
- package/dist/components/display/KapiAnnotation.js +15 -16
- package/dist/components/display/KapiAvatar.js +6 -7
- package/dist/components/display/KapiAvatarGroup.js +15 -16
- package/dist/components/display/KapiBadge.js +1 -2
- package/dist/components/display/KapiCodeBlock.js +14 -15
- package/dist/components/display/KapiComment.js +10 -11
- package/dist/components/display/KapiCommentComposer.js +13 -14
- package/dist/components/display/KapiDescriptionList.js +1 -2
- package/dist/components/display/KapiDiff.js +23 -24
- package/dist/components/display/KapiFileItem.js +13 -14
- package/dist/components/display/KapiFileViewer.js +17 -18
- package/dist/components/display/KapiHighlight.js +2 -3
- package/dist/components/display/KapiIconTile.js +2 -3
- package/dist/components/display/KapiStat.js +8 -9
- package/dist/components/display/KapiTag.js +6 -7
- package/dist/components/display/KapiText.js +5 -6
- package/dist/components/display/KapiTimeline.js +2 -3
- package/dist/components/display/KapiTitle.js +1 -2
- package/dist/components/display/KapiTruncate.js +5 -6
- package/dist/components/display/annotationLogic.js +1 -2
- package/dist/components/display/avatarGroupLogic.js +1 -2
- package/dist/components/display/avatarGroupSlots.js +1 -2
- package/dist/components/display/avatarLogic.js +1 -2
- package/dist/components/display/codeBlockSlots.js +1 -2
- package/dist/components/display/commentLogic.js +1 -2
- package/dist/components/display/diffLogic.js +1 -2
- package/dist/components/display/diffSlots.js +1 -2
- package/dist/components/display/fileItemLogic.js +1 -2
- package/dist/components/display/highlightLogic.js +1 -2
- package/dist/components/display/highlightSlots.js +1 -2
- package/dist/components/display/iconTileLogic.js +1 -2
- package/dist/components/display/statLogic.js +1 -2
- package/dist/components/display/tagLogic.js +1 -2
- package/dist/components/display/textLogic.js +1 -2
- package/dist/components/display/timelineLogic.js +1 -2
- package/dist/components/display/truncateLogic.js +1 -2
- package/dist/components/feedback/KapiAlert.js +6 -7
- package/dist/components/feedback/KapiBulkBar.js +5 -6
- package/dist/components/feedback/KapiCountdown.js +16 -17
- package/dist/components/feedback/KapiEmpty.js +2 -3
- package/dist/components/feedback/KapiFab.js +96 -97
- package/dist/components/feedback/KapiOfflineBanner.js +4 -5
- package/dist/components/feedback/KapiProgress.js +1 -2
- package/dist/components/feedback/KapiSkeleton.js +1 -2
- package/dist/components/feedback/KapiSpinner.js +5 -6
- package/dist/components/feedback/KapiToastContainer.js +28 -29
- package/dist/components/feedback/KapiTour.js +24 -25
- package/dist/components/feedback/KapiUnsavedBar.js +5 -6
- package/dist/components/feedback/alertSlots.js +1 -2
- package/dist/components/feedback/bulkBarLogic.js +1 -2
- package/dist/components/feedback/countdownLogic.js +1 -2
- package/dist/components/feedback/countdownSlots.js +1 -2
- package/dist/components/feedback/emptySlots.js +1 -2
- package/dist/components/feedback/fabLogic.js +1 -2
- package/dist/components/feedback/offlineBannerLogic.js +1 -2
- package/dist/components/feedback/progressLogic.js +1 -2
- package/dist/components/feedback/toastLayer.js +1 -2
- package/dist/components/feedback/toastStore.js +2 -3
- package/dist/components/feedback/tourLogic.js +1 -2
- package/dist/components/feedback/unsavedBarLogic.js +1 -2
- package/dist/components/inputs/KapiAutocomplete.js +23 -24
- package/dist/components/inputs/KapiButton.js +1 -2
- package/dist/components/inputs/KapiCalendar.js +12 -13
- package/dist/components/inputs/KapiCalendarGrid.js +15 -16
- package/dist/components/inputs/KapiCheckCard.js +4 -5
- package/dist/components/inputs/KapiCheckbox.js +1 -2
- package/dist/components/inputs/KapiChecklist.js +62 -63
- package/dist/components/inputs/KapiCopyButton.js +6 -7
- package/dist/components/inputs/KapiDatePicker.js +33 -34
- package/dist/components/inputs/KapiDateRangePicker.js +145 -146
- package/dist/components/inputs/KapiFacetedSearch.js +55 -56
- package/dist/components/inputs/KapiField.js +5 -6
- package/dist/components/inputs/KapiFileUpload.js +26 -27
- package/dist/components/inputs/KapiIconButton.js +1 -2
- package/dist/components/inputs/KapiInput.js +46 -47
- package/dist/components/inputs/KapiInputGroup.js +1 -2
- package/dist/components/inputs/KapiMaskedInput.js +50 -51
- package/dist/components/inputs/KapiNumberStepper.js +49 -50
- package/dist/components/inputs/KapiPinInput.js +9 -10
- package/dist/components/inputs/KapiPropsForm.js +43 -44
- package/dist/components/inputs/KapiRadio.js +1 -2
- package/dist/components/inputs/KapiRating.js +38 -39
- package/dist/components/inputs/KapiSearchChip.js +10 -11
- package/dist/components/inputs/KapiSegmented.js +65 -66
- package/dist/components/inputs/KapiSelect.js +198 -199
- package/dist/components/inputs/KapiSelectMenu.js +1 -2
- package/dist/components/inputs/KapiSlider.js +11 -12
- package/dist/components/inputs/KapiSwitch.js +6 -7
- package/dist/components/inputs/KapiTagInput.js +32 -33
- package/dist/components/inputs/KapiTextarea.js +22 -23
- package/dist/components/inputs/asyncSelectLogic.js +22 -23
- package/dist/components/inputs/autocompleteLogic.js +1 -2
- package/dist/components/inputs/checkControl.js +4 -5
- package/dist/components/inputs/checklistLogic.js +1 -2
- package/dist/components/inputs/copyLogic.js +1 -2
- package/dist/components/inputs/datePickerLogic.js +1 -2
- package/dist/components/inputs/dateRangeLogic.js +1 -2
- package/dist/components/inputs/facetedSearchLogic.js +1 -2
- package/dist/components/inputs/fieldLogic.js +1 -2
- package/dist/components/inputs/fileUploadLogic.js +1 -2
- package/dist/components/inputs/formBridgeLogic.js +1 -2
- package/dist/components/inputs/inputGroupLogic.js +1 -2
- package/dist/components/inputs/inputLogic.js +1 -2
- package/dist/components/inputs/maskLogic.js +0 -1
- package/dist/components/inputs/misuseWarnings.js +1 -2
- package/dist/components/inputs/numberStepLogic.js +1 -2
- package/dist/components/inputs/ownField.js +9 -10
- package/dist/components/inputs/pinInputLogic.js +1 -2
- package/dist/components/inputs/propsFormLogic.js +1 -2
- package/dist/components/inputs/ratingLogic.js +1 -2
- package/dist/components/inputs/searchChipLogic.js +1 -2
- package/dist/components/inputs/segmentedLogic.js +1 -2
- package/dist/components/inputs/selectKeyLogic.js +1 -2
- package/dist/components/inputs/selectLogic.js +1 -2
- package/dist/components/inputs/selectSlots.js +1 -2
- package/dist/components/inputs/sliderLogic.js +1 -2
- package/dist/components/inputs/tagInputLogic.js +1 -2
- package/dist/components/inputs/textareaLogic.js +1 -2
- package/dist/components/inputs/useCalendarFocus.js +1 -2
- package/dist/components/inputs/useDatePopSide.js +1 -2
- package/dist/components/inputs/useSelectCreate.js +1 -2
- package/dist/components/inputs/useSelectSource.js +11 -12
- package/dist/components/labelsLogic.js +1 -2
- package/dist/components/layout/KapiAccessCard.js +10 -11
- package/dist/components/layout/KapiAccountMenu.js +24 -25
- package/dist/components/layout/KapiBox.js +5 -6
- package/dist/components/layout/KapiCard.js +18 -19
- package/dist/components/layout/KapiCenter.js +1 -2
- package/dist/components/layout/KapiCluster.js +1 -2
- package/dist/components/layout/KapiCol.js +1 -2
- package/dist/components/layout/KapiCollapse.js +1 -2
- package/dist/components/layout/KapiContextSlot.js +98 -99
- package/dist/components/layout/KapiDivider.js +1 -2
- package/dist/components/layout/KapiGrid.js +9 -10
- package/dist/components/layout/KapiMasonry.js +1 -2
- package/dist/components/layout/KapiNotificationBell.js +53 -54
- package/dist/components/layout/KapiPageHeader.js +42 -43
- package/dist/components/layout/KapiPanelParts.js +43 -44
- package/dist/components/layout/KapiRail.js +103 -104
- package/dist/components/layout/KapiRailAccount.js +11 -12
- package/dist/components/layout/KapiRoot.js +33 -34
- package/dist/components/layout/KapiScrollArea.js +7 -8
- package/dist/components/layout/KapiShell.js +8 -9
- package/dist/components/layout/KapiStack.js +1 -2
- package/dist/components/layout/KapiThemeScript.js +1 -2
- package/dist/components/layout/accessCardLogic.js +1 -2
- package/dist/components/layout/cardLogic.js +1 -2
- package/dist/components/layout/cardSlots.js +1 -2
- package/dist/components/layout/gridSpanLogic.js +1 -2
- package/dist/components/layout/layoutPrimitives.js +1 -2
- package/dist/components/layout/masonryLogic.js +1 -2
- package/dist/components/layout/notificationBellLogic.js +1 -2
- package/dist/components/layout/pageHeaderLogic.js +1 -2
- package/dist/components/layout/pageHeaderSlots.js +1 -2
- package/dist/components/layout/railContext.js +1 -2
- package/dist/components/layout/railLogic.js +1 -2
- package/dist/components/layout/railSlots.js +1 -2
- package/dist/components/layout/reopenBus.js +1 -2
- package/dist/components/layout/shellSlots.js +1 -2
- package/dist/components/layout/useGridBreakpoint.js +1 -2
- package/dist/components/layout/useMasonrySpans.js +6 -7
- package/dist/components/layout/useRailOverflow.js +7 -8
- package/dist/components/locale/KapiLocaleProvider.js +1 -2
- package/dist/components/locale/linkLabels.js +1 -2
- package/dist/components/locale/localeLogic.js +1 -2
- package/dist/components/navigation/CtxSlidingList.js +7 -8
- package/dist/components/navigation/KapiAccordion.js +11 -12
- package/dist/components/navigation/KapiBreadcrumb.js +11 -12
- package/dist/components/navigation/KapiCollapsiblePanel.js +13 -14
- package/dist/components/navigation/KapiContextPanel.js +138 -139
- package/dist/components/navigation/KapiFilterChips.js +25 -22
- package/dist/components/navigation/KapiNavBadge.js +6 -7
- package/dist/components/navigation/KapiPanelGroup.js +34 -35
- package/dist/components/navigation/KapiSteps.js +41 -36
- package/dist/components/navigation/KapiTabs.js +40 -41
- package/dist/components/navigation/KapiToc.js +15 -16
- package/dist/components/navigation/KapiTree.js +126 -124
- package/dist/components/navigation/KapiWizard.js +12 -13
- package/dist/components/navigation/MiniNavItem.js +11 -12
- package/dist/components/navigation/accordionLogic.js +1 -2
- package/dist/components/navigation/activeItemLogic.js +1 -2
- package/dist/components/navigation/breadcrumbLogic.js +1 -2
- package/dist/components/navigation/contextPanelLogic.js +1 -2
- package/dist/components/navigation/filterChipsLogic.d.ts +9 -1
- package/dist/components/navigation/filterChipsLogic.js +2 -3
- package/dist/components/navigation/navBadgeLogic.js +1 -2
- package/dist/components/navigation/navLink.js +1 -2
- package/dist/components/navigation/navLinkLogic.js +1 -2
- package/dist/components/navigation/panelGroupLogic.js +1 -2
- package/dist/components/navigation/panelMini.js +0 -1
- package/dist/components/navigation/panelMiniLogic.js +1 -2
- package/dist/components/navigation/stepsLogic.js +1 -2
- package/dist/components/navigation/tabsLogic.js +1 -2
- package/dist/components/navigation/tocLogic.js +1 -2
- package/dist/components/navigation/tocSlots.js +1 -2
- package/dist/components/navigation/treeLogic.js +1 -2
- package/dist/components/navigation/wizardLogic.js +1 -2
- package/dist/components/overlays/KapiCanvasForm.js +5 -6
- package/dist/components/overlays/KapiCommandPalette.js +45 -45
- package/dist/components/overlays/KapiConfirm.js +9 -10
- package/dist/components/overlays/KapiContextMenu.js +16 -17
- package/dist/components/overlays/KapiDialogHost.js +50 -51
- package/dist/components/overlays/KapiDropdown.js +2 -3
- package/dist/components/overlays/KapiImageViewer.js +8 -9
- package/dist/components/overlays/KapiLoading.js +7 -8
- package/dist/components/overlays/KapiMenuButton.js +19 -20
- package/dist/components/overlays/KapiModal.js +58 -59
- package/dist/components/overlays/KapiOffcanvas.js +146 -147
- package/dist/components/overlays/KapiOffcanvasStack.js +18 -19
- package/dist/components/overlays/KapiPhotoView.js +21 -22
- package/dist/components/overlays/KapiPopover.js +12 -13
- package/dist/components/overlays/KapiShapeSheet.js +11 -12
- package/dist/components/overlays/KapiShortcutsHelp.js +18 -19
- package/dist/components/overlays/KapiSplitModal.js +20 -21
- package/dist/components/overlays/KapiTooltip.js +46 -47
- package/dist/components/overlays/KapiViewport.js +17 -18
- package/dist/components/overlays/canvasFormLogic.js +1 -2
- package/dist/components/overlays/commandPaletteLogic.js +1 -2
- package/dist/components/overlays/dialogStore.js +3 -4
- package/dist/components/overlays/dialogUtils.js +1 -2
- package/dist/components/overlays/exitPresenceLogic.js +1 -2
- package/dist/components/overlays/menuButtonLogic.js +1 -2
- package/dist/components/overlays/menuKeyboardLogic.js +1 -2
- package/dist/components/overlays/menuList.js +94 -95
- package/dist/components/overlays/modalSlots.js +1 -2
- package/dist/components/overlays/modalStack.js +1 -2
- package/dist/components/overlays/offcanvasCompanion.js +1 -2
- package/dist/components/overlays/offcanvasResize.js +0 -1
- package/dist/components/overlays/offcanvasSide.js +1 -2
- package/dist/components/overlays/offcanvasStack.js +1 -2
- package/dist/components/overlays/overlayPortal.js +1 -2
- package/dist/components/overlays/popoverLogic.js +1 -2
- package/dist/components/overlays/shortcutsHelpSlots.js +1 -2
- package/dist/components/overlays/splitModalLayout.js +1 -2
- package/dist/components/overlays/useExitPresence.js +11 -12
- package/dist/components/overlays/useNativeDialog.js +21 -22
- package/dist/components/overlays/viewportLogic.js +1 -2
- package/dist/components/renderSlot.js +1 -2
- package/dist/components/rootProps.js +1 -2
- package/dist/components/slotCatalog.js +33 -34
- package/dist/components/slotsLogic.js +1 -2
- package/dist/components/tone.js +1 -2
- package/dist/css/components/overlays/KapiViewport.css +1 -1
- package/dist/hooks/asyncResourceLogic.js +1 -2
- package/dist/hooks/breakpointOpenLogic.js +1 -2
- package/dist/hooks/colorLogic.js +1 -2
- package/dist/hooks/dateFormat.js +1 -2
- package/dist/hooks/densityLogic.js +1 -2
- package/dist/hooks/directionLogic.js +1 -2
- package/dist/hooks/downloadLogic.js +1 -2
- package/dist/hooks/elementSizeLogic.js +1 -2
- package/dist/hooks/fieldErrorsLogic.js +1 -2
- package/dist/hooks/focusLogic.js +2 -11
- package/dist/hooks/growOriginLogic.js +1 -2
- package/dist/hooks/hotkeyLogic.js +1 -2
- package/dist/hooks/hotkeyRegistry.js +1 -2
- package/dist/hooks/kapiRoot.js +2 -3
- package/dist/hooks/mergeRefs.js +1 -2
- package/dist/hooks/numberFormatLogic.js +1 -2
- package/dist/hooks/onlineStatusLogic.js +1 -2
- package/dist/hooks/ownerDocument.js +1 -2
- package/dist/hooks/persistentStateLogic.js +1 -2
- package/dist/hooks/portalRoot.js +1 -2
- package/dist/hooks/rafThrottle.js +1 -2
- package/dist/hooks/rangeSelectLogic.js +1 -2
- package/dist/hooks/recentLogic.js +1 -2
- package/dist/hooks/reducedMotion.js +8 -9
- package/dist/hooks/rightClick.js +10 -11
- package/dist/hooks/scrollCollapseLogic.js +1 -2
- package/dist/hooks/scrollEdgesLogic.js +1 -2
- package/dist/hooks/shallowStable.js +1 -2
- package/dist/hooks/slidingIndicatorLogic.js +1 -2
- package/dist/hooks/storageLogic.js +1 -2
- package/dist/hooks/themeColorsLogic.js +1 -2
- package/dist/hooks/themeContrastLogic.js +1 -2
- package/dist/hooks/themeDeriveLogic.js +0 -1
- package/dist/hooks/themeRadiiLogic.js +1 -2
- package/dist/hooks/themeScript.js +1 -2
- package/dist/hooks/toneFamilyLogic.js +1 -2
- package/dist/hooks/unsavedGuardLogic.js +1 -2
- package/dist/hooks/useAsyncLoader.js +1 -2
- package/dist/hooks/useAsyncResource.js +5 -6
- package/dist/hooks/useAsyncTasks.js +1 -2
- package/dist/hooks/useBottomBarInset.js +9 -10
- package/dist/hooks/useControllableState.js +1 -2
- package/dist/hooks/useDebouncedValue.js +1 -2
- package/dist/hooks/useDisclosure.js +1 -2
- package/dist/hooks/useDismiss.js +10 -11
- package/dist/hooks/useDragScroll.js +12 -13
- package/dist/hooks/useElementSize.js +1 -2
- package/dist/hooks/useFieldErrors.js +1 -2
- package/dist/hooks/useFocusReturn.js +1 -2
- package/dist/hooks/useFormReset.js +1 -2
- package/dist/hooks/useGlobalRightClick.js +1 -2
- package/dist/hooks/useGrowOrigin.js +1 -2
- package/dist/hooks/useHotkey.js +1 -2
- package/dist/hooks/useHydrated.js +1 -2
- package/dist/hooks/useKapiTheme.js +55 -56
- package/dist/hooks/useMediaQuery.js +1 -2
- package/dist/hooks/useObjectUrl.js +1 -2
- package/dist/hooks/useOnlineStatus.js +1 -2
- package/dist/hooks/useOutsidePress.js +1 -2
- package/dist/hooks/usePersistentState.js +9 -10
- package/dist/hooks/usePlacement.js +15 -16
- package/dist/hooks/useRangeSelect.js +2 -3
- package/dist/hooks/useRecent.js +6 -7
- package/dist/hooks/useScrollCollapse.js +1 -2
- package/dist/hooks/useScrollEdges.js +25 -26
- package/dist/hooks/useSlidingIndicator.js +19 -20
- package/dist/hooks/useSubmitDraft.js +1 -2
- package/dist/hooks/useToneFamilies.js +0 -1
- package/dist/hooks/useTypeahead.js +1 -2
- package/dist/hooks/useUnsavedGuard.js +5 -6
- package/dist/hooks/useVirtualList.js +1 -2
- package/dist/hooks/useWheelZoom.js +1 -2
- package/dist/hooks/viewportInsetLogic.js +1 -2
- package/dist/hooks/virtualListLogic.js +0 -1
- package/dist/hooks/wheelZoomLogic.js +1 -2
- package/dist/kapi.css +1 -1
- package/dist/kapi.layered.css +1 -1
- package/dist/logic.js +45 -45
- package/package.json +16 -16
|
@@ -1,45 +1,45 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import "#kapi-css/components/navigation/navigation.css";
|
|
3
|
-
import {
|
|
4
|
-
import { useMergedRefs as t } from "../../hooks/mergeRefs.js";
|
|
5
|
-
import { useLabels as n } from "../locale/KapiLocaleProvider.js";
|
|
6
|
-
import { useControllableState as r } from "../../hooks/useControllableState.js";
|
|
7
|
-
import { isTypeaheadKey as i } from "../overlays/menuKeyboardLogic.js";
|
|
8
|
-
import { logicalKeyOf as a } from "../../hooks/directionLogic.js";
|
|
9
|
-
import { useTypeahead as o } from "../../hooks/useTypeahead.js";
|
|
10
|
-
import { useVirtualList as s } from "../../hooks/useVirtualList.js";
|
|
3
|
+
import { TREE_KEYS as e, flattenVisible as t, isExpandable as n, matchTypeahead as r, needsChildren as i, resolveTabStop as a, toggleSelectedId as o, treeKeyAction as s } from "./treeLogic.js";
|
|
11
4
|
/* empty css */
|
|
12
|
-
import {
|
|
5
|
+
import { joinClasses as c } from "../rootProps.js";
|
|
6
|
+
import { useTypeahead as l } from "../../hooks/useTypeahead.js";
|
|
7
|
+
import { isTypeaheadKey as u } from "../overlays/menuKeyboardLogic.js";
|
|
8
|
+
import { useControllableState as d } from "../../hooks/useControllableState.js";
|
|
9
|
+
import { useVirtualList as ee } from "../../hooks/useVirtualList.js";
|
|
10
|
+
import { useMergedRefs as te } from "../../hooks/mergeRefs.js";
|
|
11
|
+
import { useLabels as ne } from "../locale/KapiLocaleProvider.js";
|
|
12
|
+
import { logicalKeyOf as re } from "../../hooks/directionLogic.js";
|
|
13
13
|
import { useId as ie, useLayoutEffect as ae, useMemo as f, useRef as p, useState as oe } from "react";
|
|
14
14
|
import { Fragment as m, jsx as h, jsxs as g } from "react/jsx-runtime";
|
|
15
|
-
import { ChevronRight as
|
|
16
|
-
|
|
17
|
-
var
|
|
18
|
-
function
|
|
19
|
-
let
|
|
15
|
+
import { ChevronRight as se } from "lucide-react";
|
|
16
|
+
// src/components/navigation/KapiTree.tsx
|
|
17
|
+
var _ = { loading: "Cargando…" }, ce = 37, v = 400;
|
|
18
|
+
function y({ nodes: y, expandedIds: le, defaultExpandedIds: ue, onExpandedIdsChange: de, expanded: b, defaultExpanded: x, onExpandedChange: S, onExpand: fe, selectedIds: pe, defaultSelectedIds: me, onSelectedIdsChange: he, selected: ge, defaultSelected: _e, onSelectedChange: ve, multiple: C = !1, renderLabel: w, labels: ye, virtual: T = !1, maxHeight: E = v, className: D, style: O, ref: k, onKeyDown: A, onFocus: j, ...M }) {
|
|
19
|
+
let N = ne("tree", _, ye), P = ie(), [F, I] = d(le ?? b, () => ue ?? x ?? [], de ?? S), [L, be] = d(pe ?? ge, () => me ?? _e ?? []), xe = he ?? ve, [Se, R] = oe(null), z = p(/* @__PURE__ */ new Map()), Ce = l(500), B = f(() => t(y, F), [y, F]), V = a(y, B, Se, L), H = f(() => new Map(B.map((e, t) => [e.node.id, {
|
|
20
20
|
...e,
|
|
21
21
|
node: e.node,
|
|
22
22
|
index: t
|
|
23
23
|
}])), [B]), U = (e, t) => {
|
|
24
|
-
|
|
25
|
-
}, W = (e) => !e.disabled &&
|
|
26
|
-
W(e) && !
|
|
24
|
+
I(e), t.filter(i).forEach((e) => fe?.(e));
|
|
25
|
+
}, W = (e) => !e.disabled && n(e), G = (e) => {
|
|
26
|
+
W(e) && !F.includes(e.id) && U([...F, e.id], [e]);
|
|
27
27
|
}, K = (e) => {
|
|
28
|
-
W(e) &&
|
|
28
|
+
W(e) && F.includes(e.id) && U(F.filter((t) => t !== e.id), []);
|
|
29
29
|
}, we = (e) => {
|
|
30
|
-
|
|
30
|
+
F.includes(e.id) ? K(e) : G(e);
|
|
31
31
|
}, q = (e) => {
|
|
32
32
|
if (e.disabled) return;
|
|
33
|
-
let t =
|
|
33
|
+
let t = o(L, e.id, C);
|
|
34
34
|
be(t), xe?.(t, e);
|
|
35
|
-
}, J = p(null), Te =
|
|
36
|
-
enabled:
|
|
35
|
+
}, J = p(null), Te = te(k, J), Ee = f(() => T ? B.map((e) => e.node.id) : void 0, [T, B]), Y = ee({
|
|
36
|
+
enabled: T,
|
|
37
37
|
count: B.length,
|
|
38
38
|
scrollRef: J,
|
|
39
|
-
estimate:
|
|
39
|
+
estimate: ce,
|
|
40
40
|
measure: !0,
|
|
41
41
|
keys: Ee,
|
|
42
|
-
fallbackViewHeight:
|
|
42
|
+
fallbackViewHeight: v
|
|
43
43
|
}), X = p(null);
|
|
44
44
|
ae(() => {
|
|
45
45
|
let e = X.current, t = e === null ? void 0 : z.current.get(e);
|
|
@@ -48,128 +48,131 @@ function b({ nodes: b, expandedIds: ce, defaultExpandedIds: le, onExpandedIdsCha
|
|
|
48
48
|
let Z = (e) => {
|
|
49
49
|
R(e);
|
|
50
50
|
let t = z.current.get(e);
|
|
51
|
-
if (
|
|
51
|
+
if (T) {
|
|
52
52
|
let t = H.get(e)?.index;
|
|
53
53
|
t !== void 0 && Y.scrollToIndex(t);
|
|
54
54
|
}
|
|
55
55
|
t ? t.focus() : X.current = e;
|
|
56
|
-
}, De = (
|
|
57
|
-
if (
|
|
58
|
-
let
|
|
59
|
-
if (
|
|
60
|
-
let
|
|
61
|
-
if (!
|
|
62
|
-
if (
|
|
63
|
-
|
|
64
|
-
let
|
|
65
|
-
key:
|
|
66
|
-
nodes:
|
|
56
|
+
}, De = (t) => {
|
|
57
|
+
if (A?.(t), t.defaultPrevented || t.altKey || t.ctrlKey || t.metaKey) return;
|
|
58
|
+
let n = V;
|
|
59
|
+
if (n === null) return;
|
|
60
|
+
let i = t.target.getAttribute("role") === "treeitem", a = t.key === "Enter" || t.key === " ";
|
|
61
|
+
if (!i && (a || u(t.key))) return;
|
|
62
|
+
if (e.has(t.key)) {
|
|
63
|
+
t.preventDefault();
|
|
64
|
+
let e = s({
|
|
65
|
+
key: re(t),
|
|
66
|
+
nodes: y,
|
|
67
67
|
visible: B,
|
|
68
|
-
focusId:
|
|
69
|
-
expanded:
|
|
68
|
+
focusId: n,
|
|
69
|
+
expanded: F
|
|
70
70
|
});
|
|
71
|
-
if (!
|
|
72
|
-
switch (
|
|
71
|
+
if (!e) return;
|
|
72
|
+
switch (e.type) {
|
|
73
73
|
case "focus":
|
|
74
|
-
Z(
|
|
74
|
+
Z(e.id);
|
|
75
75
|
break;
|
|
76
76
|
case "select": {
|
|
77
|
-
let
|
|
78
|
-
|
|
77
|
+
let t = H.get(e.id)?.node;
|
|
78
|
+
t && q(t);
|
|
79
79
|
break;
|
|
80
80
|
}
|
|
81
81
|
case "expand": {
|
|
82
|
-
let
|
|
83
|
-
|
|
82
|
+
let t = H.get(e.id)?.node;
|
|
83
|
+
t && G(t);
|
|
84
84
|
break;
|
|
85
85
|
}
|
|
86
86
|
case "collapse": {
|
|
87
|
-
let
|
|
88
|
-
|
|
87
|
+
let t = H.get(e.id)?.node;
|
|
88
|
+
t && K(t);
|
|
89
89
|
break;
|
|
90
90
|
}
|
|
91
91
|
case "expandMany": {
|
|
92
|
-
let
|
|
93
|
-
U([...
|
|
92
|
+
let t = e.ids.filter((e) => !F.includes(e)), n = t.flatMap((e) => H.get(e)?.node ?? []);
|
|
93
|
+
U([...F, ...t], n);
|
|
94
94
|
break;
|
|
95
95
|
}
|
|
96
96
|
}
|
|
97
97
|
return;
|
|
98
98
|
}
|
|
99
|
-
if (!
|
|
100
|
-
let o = H.get(
|
|
99
|
+
if (!u(t.key)) return;
|
|
100
|
+
let o = H.get(n)?.index;
|
|
101
101
|
if (o === void 0) return;
|
|
102
|
-
let
|
|
103
|
-
|
|
102
|
+
let c = r(B, o, Ce(t.key));
|
|
103
|
+
c && (t.preventDefault(), Z(c));
|
|
104
104
|
}, Oe = (e) => {
|
|
105
|
-
if (
|
|
105
|
+
if (j?.(e), T && e.target === e.currentTarget && V !== null) {
|
|
106
106
|
Z(V);
|
|
107
107
|
return;
|
|
108
108
|
}
|
|
109
109
|
let t = e.target.dataset.treeId;
|
|
110
110
|
t !== void 0 && R(t);
|
|
111
|
-
}, Q = (
|
|
112
|
-
let r = H.get(
|
|
111
|
+
}, Q = (e, t) => {
|
|
112
|
+
let r = H.get(e.id);
|
|
113
113
|
if (!r) return null;
|
|
114
|
-
let i =
|
|
114
|
+
let i = n(e), a = i && F.includes(e.id), o = L.includes(e.id), s = i && e.loading === !0, l = `${P}-l-${r.index}`, u = `${P}-w-${r.index}`;
|
|
115
115
|
return /* @__PURE__ */ g("li", {
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
116
|
+
role: "none",
|
|
117
|
+
children: [/* @__PURE__ */ h("div", {
|
|
118
|
+
ref: (t) => {
|
|
119
|
+
t ? z.current.set(e.id, t) : z.current.delete(e.id);
|
|
120
|
+
},
|
|
121
|
+
role: "treeitem",
|
|
122
|
+
"data-tree-id": e.id,
|
|
123
|
+
"data-vindex": t,
|
|
124
|
+
className: c("kapi-tree__item", o && "kapi-tree__item--selected", a && "kapi-tree__item--open"),
|
|
125
|
+
"aria-labelledby": l,
|
|
126
|
+
"aria-describedby": s ? u : void 0,
|
|
127
|
+
"aria-level": r.level,
|
|
128
|
+
"aria-setsize": r.setSize,
|
|
129
|
+
"aria-posinset": r.posInSet,
|
|
130
|
+
"aria-expanded": i ? a : void 0,
|
|
131
|
+
"aria-selected": o,
|
|
132
|
+
"aria-disabled": e.disabled || void 0,
|
|
133
|
+
"aria-busy": s || void 0,
|
|
134
|
+
tabIndex: V === e.id ? 0 : -1,
|
|
135
|
+
children: /* @__PURE__ */ g("div", {
|
|
136
|
+
className: "kapi-tree__row",
|
|
137
|
+
style: { "--kapi-tree-level": r.level },
|
|
138
|
+
onClick: () => q(e),
|
|
139
|
+
children: [
|
|
140
|
+
i ? /* @__PURE__ */ h("span", {
|
|
141
|
+
className: "kapi-tree__toggle",
|
|
142
|
+
"aria-hidden": "true",
|
|
143
|
+
onClick: (t) => {
|
|
144
|
+
t.stopPropagation(), we(e);
|
|
145
|
+
},
|
|
146
|
+
children: /* @__PURE__ */ h(se, {
|
|
147
|
+
className: "kapi-tree__chevron kapi-flip-rtl",
|
|
148
|
+
size: 16,
|
|
149
|
+
strokeWidth: 2.2
|
|
150
|
+
})
|
|
151
|
+
}) : /* @__PURE__ */ h("span", {
|
|
152
|
+
className: "kapi-tree__toggle kapi-tree__toggle--leaf",
|
|
153
|
+
"aria-hidden": "true"
|
|
154
|
+
}),
|
|
155
|
+
/* @__PURE__ */ h("span", {
|
|
156
|
+
id: l,
|
|
157
|
+
className: "kapi-tree__label",
|
|
158
|
+
children: w ? w(e) : e.label
|
|
159
|
+
}),
|
|
160
|
+
s && /* @__PURE__ */ g(m, { children: [/* @__PURE__ */ h("span", {
|
|
161
|
+
className: "kapi-tree__spinner kapi-spinner kapi-spinner--sm",
|
|
162
|
+
"aria-hidden": "true"
|
|
163
|
+
}), /* @__PURE__ */ h("span", {
|
|
164
|
+
id: u,
|
|
165
|
+
className: "kapi-tree__sr",
|
|
166
|
+
children: N.loading
|
|
167
|
+
})] })
|
|
168
|
+
]
|
|
169
|
+
})
|
|
170
|
+
}), t === void 0 && a && e.children?.length ? /* @__PURE__ */ h("ul", {
|
|
168
171
|
role: "group",
|
|
169
172
|
className: "kapi-tree__group",
|
|
170
|
-
children: $(
|
|
173
|
+
children: $(e.children)
|
|
171
174
|
}) : null]
|
|
172
|
-
},
|
|
175
|
+
}, e.id);
|
|
173
176
|
}, $ = (e) => e.map((e) => Q(e)), ke = () => /* @__PURE__ */ g(m, { children: [
|
|
174
177
|
Y.padTop > 0 && /* @__PURE__ */ h("li", {
|
|
175
178
|
role: "none",
|
|
@@ -184,26 +187,25 @@ function b({ nodes: b, expandedIds: ce, defaultExpandedIds: le, onExpandedIdsCha
|
|
|
184
187
|
className: "kapi-tree__pad",
|
|
185
188
|
style: { height: Y.padBottom }
|
|
186
189
|
})
|
|
187
|
-
] }), Ae = !
|
|
190
|
+
] }), Ae = !T || (() => {
|
|
188
191
|
let e = V === null ? void 0 : H.get(V)?.index;
|
|
189
192
|
return e === void 0 || e >= Y.start && e < Y.end;
|
|
190
193
|
})();
|
|
191
194
|
return /* @__PURE__ */ h("ul", {
|
|
192
|
-
...
|
|
195
|
+
...M,
|
|
193
196
|
role: "tree",
|
|
194
|
-
"aria-multiselectable":
|
|
195
|
-
ref:
|
|
196
|
-
className:
|
|
197
|
-
style:
|
|
198
|
-
maxHeight:
|
|
199
|
-
...
|
|
200
|
-
} :
|
|
197
|
+
"aria-multiselectable": C || void 0,
|
|
198
|
+
ref: T ? Te : k,
|
|
199
|
+
className: c("kapi-tree", T && "kapi-tree--virtual", D),
|
|
200
|
+
style: T ? {
|
|
201
|
+
maxHeight: E,
|
|
202
|
+
...O
|
|
203
|
+
} : O,
|
|
201
204
|
...Ae ? {} : { tabIndex: 0 },
|
|
202
205
|
onKeyDown: De,
|
|
203
206
|
onFocus: Oe,
|
|
204
|
-
onScroll:
|
|
205
|
-
children:
|
|
207
|
+
onScroll: T ? Y.onScroll : void 0,
|
|
208
|
+
children: T ? ke() : $(y)
|
|
206
209
|
});
|
|
207
210
|
}
|
|
208
|
-
|
|
209
|
-
export { v as DEFAULT_TREE_LABELS, b as KapiTree };
|
|
211
|
+
export { _ as DEFAULT_TREE_LABELS, y as KapiTree };
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
2
|
+
import { useControllableState as e } from "../../hooks/useControllableState.js";
|
|
3
3
|
import { KapiButton as t } from "../inputs/KapiButton.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
4
|
+
import { canJumpTo as n, clampStep as r, isThenable as i, resolveAdvance as a } from "./wizardLogic.js";
|
|
5
|
+
import { joinClasses as o } from "../rootProps.js";
|
|
6
|
+
import { useLabels as s } from "../locale/KapiLocaleProvider.js";
|
|
7
7
|
import { useRef as c, useState as l } from "react";
|
|
8
8
|
import { Fragment as u, jsx as d, jsxs as f } from "react/jsx-runtime";
|
|
9
9
|
import { Check as p, ChevronLeft as m, ChevronRight as h } from "lucide-react";
|
|
10
|
-
|
|
10
|
+
// src/components/navigation/KapiWizard.tsx
|
|
11
11
|
var g = {
|
|
12
12
|
finish: "Finalizar",
|
|
13
13
|
cancel: "Cancelar",
|
|
@@ -18,24 +18,24 @@ var g = {
|
|
|
18
18
|
size: 15,
|
|
19
19
|
strokeWidth: 2.2
|
|
20
20
|
}, v = (e, t) => e === void 0 ? t : e, y = ({ steps: y, orientation: b = "horizontal", onFinish: x, onClose: S, onCancel: C, finishLabel: w, cancelLabel: T, backLabel: E, nextLabel: D, labels: O, step: k, defaultStep: A = 0, onStepChange: j, className: M, ...N }) => {
|
|
21
|
-
let P =
|
|
21
|
+
let P = s("wizard", g, O), [F, I] = e(k, A, j), [L, R] = l(!1), z = c(0), B = c(0), V = r(F, y.length);
|
|
22
22
|
B.current = V;
|
|
23
23
|
let H = y[V];
|
|
24
24
|
if (!H) return null;
|
|
25
25
|
let U = V === y.length - 1, W = (e) => {
|
|
26
|
-
let t =
|
|
26
|
+
let t = r(e, y.length);
|
|
27
27
|
t !== V && I(t);
|
|
28
28
|
}, G = (e) => {
|
|
29
|
-
|
|
29
|
+
n(e, V) && W(e);
|
|
30
30
|
}, K = (e, t) => {
|
|
31
|
-
let n =
|
|
31
|
+
let n = a(y, e, t);
|
|
32
32
|
n === "next" ? W(e + 1) : n === "finish" && x?.();
|
|
33
33
|
}, q = (e, t, n) => {
|
|
34
34
|
e === z.current && (R(!1), t === B.current && K(t, n));
|
|
35
35
|
}, J = () => {
|
|
36
36
|
if (L) return;
|
|
37
37
|
let e = !H.validate || H.validate();
|
|
38
|
-
if (!
|
|
38
|
+
if (!i(e)) {
|
|
39
39
|
K(V, !!e);
|
|
40
40
|
return;
|
|
41
41
|
}
|
|
@@ -66,7 +66,7 @@ var g = {
|
|
|
66
66
|
}, V);
|
|
67
67
|
return b === "vertical" ? /* @__PURE__ */ f("div", {
|
|
68
68
|
...N,
|
|
69
|
-
className:
|
|
69
|
+
className: o("kapi-wz kapi-wz--v", M),
|
|
70
70
|
children: [/* @__PURE__ */ d("div", {
|
|
71
71
|
className: "kapi-wz__rail",
|
|
72
72
|
children: y.map((e, t) => /* @__PURE__ */ f("button", {
|
|
@@ -91,7 +91,7 @@ var g = {
|
|
|
91
91
|
})]
|
|
92
92
|
}) : /* @__PURE__ */ f("div", {
|
|
93
93
|
...N,
|
|
94
|
-
className:
|
|
94
|
+
className: o("kapi-wz", M),
|
|
95
95
|
children: [
|
|
96
96
|
/* @__PURE__ */ d("div", {
|
|
97
97
|
className: "kapi-wz__steps",
|
|
@@ -124,5 +124,4 @@ var g = {
|
|
|
124
124
|
]
|
|
125
125
|
});
|
|
126
126
|
};
|
|
127
|
-
//#endregion
|
|
128
127
|
export { g as DEFAULT_WIZARD_LABELS, y as KapiWizard };
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import "#kapi-css/components/navigation/navigation.css";
|
|
3
|
-
import { joinClasses as e } from "../rootProps.js";
|
|
4
|
-
import { KapiTooltip as t } from "../overlays/KapiTooltip.js";
|
|
5
|
-
import { navBadgeA11yText as n } from "./navBadgeLogic.js";
|
|
6
|
-
import { KapiNavBadge as r } from "./KapiNavBadge.js";
|
|
7
3
|
/* empty css */
|
|
8
|
-
import {
|
|
4
|
+
import { KapiTooltip as e } from "../overlays/KapiTooltip.js";
|
|
5
|
+
import { joinClasses as t } from "../rootProps.js";
|
|
6
|
+
import { KapiNavBadge as n } from "./KapiNavBadge.js";
|
|
7
|
+
import { renderNavLink as r } from "./navLink.js";
|
|
8
|
+
import { navBadgeA11yText as i } from "./navBadgeLogic.js";
|
|
9
9
|
import { useKapiPanelMini as a } from "./panelMini.js";
|
|
10
10
|
import { miniInitial as o, miniTooltipLabel as s, nodeText as c } from "./panelMiniLogic.js";
|
|
11
11
|
import { Fragment as l, jsx as u, jsxs as d } from "react/jsx-runtime";
|
|
12
|
-
|
|
12
|
+
// src/components/navigation/MiniNavItem.tsx
|
|
13
13
|
var f = ({ label: f, icon: p, initials: m, active: h = !1, badge: g, badgeTone: _, badgeLabel: v, href: y, render: b, newTab: x, newTabLabel: S, className: C, disabled: w, onClick: T, ref: E, type: D = "button", ...O }) => {
|
|
14
|
-
let { tooltipSide: k } = a(), A = c(f), j = s(A,
|
|
14
|
+
let { tooltipSide: k } = a(), A = c(f), j = s(A, i(g, v)), M = t("kapi-ctxitem", "kapi-ctxitem--mini", h && "kapi-ctxitem--on", C), N = p == null || p === !1 ? /* @__PURE__ */ u("span", {
|
|
15
15
|
className: "kapi-ctxitem__initial",
|
|
16
16
|
children: m ?? o(A)
|
|
17
17
|
}) : p, P = /* @__PURE__ */ d(l, { children: [
|
|
@@ -24,23 +24,23 @@ var f = ({ label: f, icon: p, initials: m, active: h = !1, badge: g, badgeTone:
|
|
|
24
24
|
className: "kapi-ctxitem__sr",
|
|
25
25
|
children: f
|
|
26
26
|
}),
|
|
27
|
-
/* @__PURE__ */ u(
|
|
27
|
+
/* @__PURE__ */ u(n, {
|
|
28
28
|
value: g,
|
|
29
29
|
tone: _,
|
|
30
30
|
label: v,
|
|
31
31
|
placement: "corner"
|
|
32
32
|
})
|
|
33
33
|
] });
|
|
34
|
-
return /* @__PURE__ */ u(
|
|
34
|
+
return /* @__PURE__ */ u(e, {
|
|
35
35
|
label: j,
|
|
36
36
|
prefer: k,
|
|
37
|
-
children: y !== void 0 || b !== void 0 ?
|
|
37
|
+
children: y !== void 0 || b !== void 0 ? r({
|
|
38
38
|
render: b,
|
|
39
39
|
href: y,
|
|
40
40
|
newTab: x,
|
|
41
41
|
disabled: w,
|
|
42
42
|
active: h,
|
|
43
|
-
className:
|
|
43
|
+
className: t(M, "kapi-ctxitem--link"),
|
|
44
44
|
onClick: b === void 0 ? void 0 : T,
|
|
45
45
|
ref: E,
|
|
46
46
|
children: /* @__PURE__ */ d(l, { children: [P, x && /* @__PURE__ */ d(l, { children: [" ", /* @__PURE__ */ u("span", {
|
|
@@ -59,5 +59,4 @@ var f = ({ label: f, icon: p, initials: m, active: h = !1, badge: g, badgeTone:
|
|
|
59
59
|
})
|
|
60
60
|
});
|
|
61
61
|
};
|
|
62
|
-
//#endregion
|
|
63
62
|
export { f as MiniNavItem };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
// src/components/navigation/accordionLogic.ts
|
|
2
2
|
var e = (e, t) => t ? e.slice(0, 1) : Array.from(new Set(e)), t = (e, t, n) => e.includes(t) ? e.filter((e) => e !== t) : n ? [t] : [...e, t];
|
|
3
|
-
//#endregion
|
|
4
3
|
export { e as normalizeOpenIds, t as toggleOpenId };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
// src/components/navigation/breadcrumbLogic.ts
|
|
2
2
|
var e = (e) => e.map((t, n) => n === e.length - 1 ? "current" : t.onClick || t.href !== void 0 || t.render !== void 0 ? "link" : "text");
|
|
3
|
-
//#endregion
|
|
4
3
|
export { e as breadcrumbKinds };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { clampOffcanvasWidth as e, widthFromDrag as t } from "../overlays/offcanvasResize.js";
|
|
2
|
-
|
|
2
|
+
// src/components/navigation/contextPanelLogic.ts
|
|
3
3
|
var n = (e, t) => e ?? t, r = ({ side: e = "left", collapsed: t = !1, resizing: n = !1, className: r }) => [
|
|
4
4
|
"kapi-ctxpanel",
|
|
5
5
|
e === "right" ? "kapi-ctxpanel--right" : "",
|
|
@@ -7,5 +7,4 @@ var n = (e, t) => e ?? t, r = ({ side: e = "left", collapsed: t = !1, resizing:
|
|
|
7
7
|
n ? "is-resizing" : "",
|
|
8
8
|
r ?? ""
|
|
9
9
|
].filter(Boolean).join(" "), i = ({ collapsed: e, defaultCollapsed: t, onCollapsedChange: n }) => e !== void 0 || t !== void 0 || n !== void 0, a = (t, n, r) => e(t, n, r), o = (e, n, r, i, a, o) => t(e, n, r, i, a, o), s = (e, t, n, r, i, o = 16) => n === (e === "right" ? "ArrowLeft" : "ArrowRight") ? a(t + o, r, i) : n === (e === "right" ? "ArrowRight" : "ArrowLeft") ? a(t - o, r, i) : null;
|
|
10
|
-
//#endregion
|
|
11
10
|
export { i as canCollapse, a as clampCtxPanelWidth, r as ctxPanelClasses, o as ctxPanelWidthFromDrag, n as resolveCollapsed, s as stepCtxPanelWidth };
|
|
@@ -31,5 +31,13 @@ export declare const activeChipIndex: (items: readonly {
|
|
|
31
31
|
* Devuelve `null` si la tecla no navega o no hay a dónde ir.
|
|
32
32
|
*/
|
|
33
33
|
export declare const nextChipIndex: (current: number, length: number, key: string, isDisabled?: (index: number) => boolean) => number | null;
|
|
34
|
-
/**
|
|
34
|
+
/**
|
|
35
|
+
* Texto accesible del chip: "Aprobados 7".
|
|
36
|
+
*
|
|
37
|
+
* El separador es un ESPACIO y no una coma, aunque la coma lea mejor. El chip muestra la etiqueta y
|
|
38
|
+
* el contador uno al lado del otro, así que su texto visible es "Aprobados 7"; con la coma, ese
|
|
39
|
+
* texto deja de ser una sub-cadena del nombre accesible y se incumple «Label in Name» (WCAG 2.5.3,
|
|
40
|
+
* `label-content-name-mismatch` de axe, severidad serious). En concreto: alguien que maneja la
|
|
41
|
+
* interfaz por voz dice lo que ve —"Aprobados 7"— y el comando no engancha con el control.
|
|
42
|
+
*/
|
|
35
43
|
export declare const chipAriaLabel: (item: KapiFilterChipItem) => string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { enabledIndexes as e, navKeyOf as t, nextEnabledIndex as n } from "../overlays/menuKeyboardLogic.js";
|
|
2
|
-
|
|
2
|
+
// src/components/navigation/filterChipsLogic.ts
|
|
3
3
|
var r = (e, t, n = "md") => [
|
|
4
4
|
"kapi-filterpill",
|
|
5
5
|
`kapi-filterpill--${e.tone ?? "neutral"}`,
|
|
@@ -13,6 +13,5 @@ var r = (e, t, n = "md") => [
|
|
|
13
13
|
if (!s || i <= 0) return null;
|
|
14
14
|
let c = n(r, s, e(i, o));
|
|
15
15
|
return c < 0 ? null : c;
|
|
16
|
-
}, o = (e) => e.count == null ? e.label : `${e.label}
|
|
17
|
-
//#endregion
|
|
16
|
+
}, o = (e) => e.count == null ? e.label : `${e.label} ${e.count}`;
|
|
18
17
|
export { i as activeChipIndex, o as chipAriaLabel, r as filterChipClasses, a as nextChipIndex };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/components/navigation/navBadgeLogic.ts
|
|
2
2
|
var e = 99, t = 999, n = (e, t) => {
|
|
3
3
|
if (Number.isNaN(e)) return null;
|
|
4
4
|
let n = Math.max(0, Math.trunc(e));
|
|
@@ -12,5 +12,4 @@ var e = 99, t = 999, n = (e, t) => {
|
|
|
12
12
|
text: i > t ? `${t}+` : String(i)
|
|
13
13
|
};
|
|
14
14
|
}, i = (e, t, { showZero: i = !1 } = {}) => r(e, { showZero: i }) === null ? null : t !== void 0 && t.trim() !== "" ? t : e === "dot" || e == null ? null : String(n(e, i));
|
|
15
|
-
//#endregion
|
|
16
15
|
export { e as NAV_BADGE_MAX, t as NAV_BADGE_PANEL_MAX, i as navBadgeA11yText, r as navBadgeView };
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { renderSlot as e } from "../renderSlot.js";
|
|
3
3
|
import { navLinkProps as t } from "./navLinkLogic.js";
|
|
4
4
|
import { jsx as n } from "react/jsx-runtime";
|
|
5
|
-
|
|
5
|
+
// src/components/navigation/navLink.tsx
|
|
6
6
|
var r = ({ render: r, href: i, newTab: a, disabled: o, active: s, className: c, onClick: l, extra: u, ref: d, children: f }) => {
|
|
7
7
|
let { propias: p, fijas: m } = t({
|
|
8
8
|
render: r,
|
|
@@ -22,5 +22,4 @@ var r = ({ render: r, href: i, newTab: a, disabled: o, active: s, className: c,
|
|
|
22
22
|
children: f
|
|
23
23
|
}, (e) => /* @__PURE__ */ n("a", { ...e }));
|
|
24
24
|
};
|
|
25
|
-
//#endregion
|
|
26
25
|
export { r as renderNavLink };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/components/navigation/navLinkLogic.ts
|
|
2
2
|
var e = (e) => e.preventDefault(), t = ({ render: t, href: n, newTab: r = !1, disabled: i = !1, active: a = !1 }) => {
|
|
3
3
|
let o = t !== void 0;
|
|
4
4
|
return {
|
|
@@ -18,5 +18,4 @@ var e = (e) => e.preventDefault(), t = ({ render: t, href: n, newTab: r = !1, di
|
|
|
18
18
|
}
|
|
19
19
|
};
|
|
20
20
|
};
|
|
21
|
-
//#endregion
|
|
22
21
|
export { t as navLinkProps };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/components/navigation/panelGroupLogic.ts
|
|
2
2
|
var e = 999, t = (e, t) => e ?? t, n = ({ open: e, disabled: t, className: n }) => [
|
|
3
3
|
"kapi-panelgroup",
|
|
4
4
|
e && "kapi-panelgroup--open",
|
|
@@ -9,5 +9,4 @@ var e = 999, t = (e, t) => e ?? t, n = ({ open: e, disabled: t, className: n })
|
|
|
9
9
|
let n = Math.max(0, Math.trunc(e));
|
|
10
10
|
return n > t ? `${t}+` : String(n);
|
|
11
11
|
};
|
|
12
|
-
//#endregion
|
|
13
12
|
export { e as PANEL_GROUP_COUNT_MAX, r as formatCount, n as panelGroupClasses, t as resolveOpen };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { isValidElement as e } from "react";
|
|
3
|
-
|
|
3
|
+
// src/components/navigation/panelMiniLogic.ts
|
|
4
4
|
var t = ({ collapsedMode: e = "hidden", open: t, mobile: n }) => e === "mini" && !t && !n, n = ({ collapsedMode: e = "hidden", open: t, mobile: n }) => e === "none" && !t && !n, r = (t) => t == null || typeof t == "boolean" ? "" : typeof t == "string" || typeof t == "number" ? String(t) : Array.isArray(t) ? t.map(r).join("") : e(t) ? r(t.props.children) : "", i = (e) => e.match(/[\p{L}\p{N}]/u)?.[0]?.toUpperCase() ?? "", a = (e, t) => t === null ? e : `${e} · ${t}`;
|
|
5
|
-
//#endregion
|
|
6
5
|
export { i as miniInitial, a as miniTooltipLabel, r as nodeText, n as resolveGone, t as resolveMini };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/components/navigation/stepsLogic.ts
|
|
2
2
|
var e = (e, t) => {
|
|
3
3
|
let n = t === void 0 ? -1 : e.findIndex((e) => e.id === t), r = e.map((e, t) => e.status && !(e.status === "current" && n >= 0 && t !== n) ? e.status : n < 0 ? "upcoming" : t < n ? "complete" : t === n ? "current" : "upcoming");
|
|
4
4
|
return {
|
|
@@ -6,5 +6,4 @@ var e = (e, t) => {
|
|
|
6
6
|
currentIndex: n >= 0 ? n : r.indexOf("current")
|
|
7
7
|
};
|
|
8
8
|
}, t = (e, t) => `kapi-steps kapi-steps--${e}${t === "sm" ? " kapi-steps--sm" : ""}`;
|
|
9
|
-
//#endregion
|
|
10
9
|
export { e as resolveSteps, t as stepsClasses };
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { enabledIndexes as e, navKeyOf as t, nextEnabledIndex as n } from "../overlays/menuKeyboardLogic.js";
|
|
2
|
-
|
|
2
|
+
// src/components/navigation/tabsLogic.ts
|
|
3
3
|
var r = (r, i, a, o) => {
|
|
4
4
|
let s = t(a, "horizontal");
|
|
5
5
|
if (!s || r.length === 0) return;
|
|
6
6
|
let c = e(r.length, (e) => o?.(r[e]) === !0);
|
|
7
7
|
return r[n(r.indexOf(i), s, c)];
|
|
8
8
|
}, i = (e) => e ? "kapi-tab kapi-tab--on" : "kapi-tab", a = (e, t) => `${e}-tab-${t}`, o = (e, t) => `${e}-panel-${t}`;
|
|
9
|
-
//#endregion
|
|
10
9
|
export { r as nextTabId, i as tabClasses, a as tabId, o as tabPanelId };
|