@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,27 +1,27 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import "#kapi-css/components/navigation/navigation.css";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { enabledIndexes as
|
|
3
|
+
import { useControllableState as e } from "../../hooks/useControllableState.js";
|
|
4
|
+
import { normalizeOpenIds as t, toggleOpenId as n } from "./accordionLogic.js";
|
|
5
|
+
import { enabledIndexes as r, navKeyOf as i, nextEnabledIndex as a } from "../overlays/menuKeyboardLogic.js";
|
|
6
6
|
/* empty css */
|
|
7
|
-
import {
|
|
7
|
+
import { joinClasses as o } from "../rootProps.js";
|
|
8
8
|
import { useId as s } from "react";
|
|
9
9
|
import { jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
10
10
|
import { ChevronDown as u } from "lucide-react";
|
|
11
|
-
|
|
11
|
+
// src/components/navigation/KapiAccordion.tsx
|
|
12
12
|
var d = ":scope > .kapi-accordion__item > .kapi-accordion__heading > .kapi-accordion__trigger:not(:disabled)", f = (e) => {
|
|
13
13
|
if (e.altKey || e.ctrlKey || e.metaKey || e.shiftKey) return;
|
|
14
14
|
let t = e.currentTarget.closest(".kapi-accordion");
|
|
15
15
|
if (!t) return;
|
|
16
|
-
let
|
|
17
|
-
!s || o < 0 || (e.preventDefault(), a
|
|
16
|
+
let n = Array.from(t.querySelectorAll(d)), o = n.indexOf(e.currentTarget), s = i(e.key, "vertical");
|
|
17
|
+
!s || o < 0 || (e.preventDefault(), n[a(o, s, r(n.length))]?.focus());
|
|
18
18
|
};
|
|
19
|
-
function p({ items:
|
|
20
|
-
let g = s(), [_, v] =
|
|
19
|
+
function p({ items: r, single: i = !0, openIds: a, defaultOpenIds: d = [], onOpenIdsChange: p, className: m, ...h }) {
|
|
20
|
+
let g = s(), [_, v] = e(a, () => t(d, i), p), y = t(_, i), b = (e) => v(n(y, e, i));
|
|
21
21
|
return /* @__PURE__ */ c("div", {
|
|
22
22
|
...h,
|
|
23
|
-
className:
|
|
24
|
-
children:
|
|
23
|
+
className: o("kapi-accordion", m),
|
|
24
|
+
children: r.map((e) => {
|
|
25
25
|
let t = y.includes(e.id), n = `${g}-b-${e.id}`, r = `${g}-p-${e.id}`;
|
|
26
26
|
return /* @__PURE__ */ l("div", {
|
|
27
27
|
className: t ? "kapi-accordion__item kapi-accordion__item--open" : "kapi-accordion__item",
|
|
@@ -64,5 +64,4 @@ function p({ items: n, single: r = !0, openIds: i, defaultOpenIds: d = [], onOpe
|
|
|
64
64
|
})
|
|
65
65
|
});
|
|
66
66
|
}
|
|
67
|
-
//#endregion
|
|
68
67
|
export { p as KapiAccordion };
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import "#kapi-css/components/navigation/navigation.css";
|
|
3
|
-
import { joinClasses as e } from "../rootProps.js";
|
|
4
|
-
import { useLabels as t } from "../locale/KapiLocaleProvider.js";
|
|
5
3
|
/* empty css */
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
4
|
+
import { breadcrumbKinds as e } from "./breadcrumbLogic.js";
|
|
5
|
+
import { renderNavLink as t } from "./navLink.js";
|
|
6
|
+
import { joinClasses as n } from "../rootProps.js";
|
|
7
|
+
import { useLabels as r } from "../locale/KapiLocaleProvider.js";
|
|
8
8
|
import { Fragment as i } from "react";
|
|
9
9
|
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
10
|
-
|
|
10
|
+
// src/components/navigation/KapiBreadcrumb.tsx
|
|
11
11
|
var s = { navigation: "Ubicación" };
|
|
12
12
|
function c({ items: c, "aria-label": l, labels: u, className: d, ref: f, ...p }) {
|
|
13
|
-
let m =
|
|
13
|
+
let m = r("breadcrumb", s, u), h = e(c);
|
|
14
14
|
return /* @__PURE__ */ a("nav", {
|
|
15
15
|
...p,
|
|
16
16
|
ref: f,
|
|
17
|
-
className:
|
|
17
|
+
className: n("kapi-breadcrumb", d),
|
|
18
18
|
"aria-label": l ?? m.navigation,
|
|
19
|
-
children: c.map((e,
|
|
19
|
+
children: c.map((e, n) => /* @__PURE__ */ o(i, { children: [n > 0 && /* @__PURE__ */ a("span", {
|
|
20
20
|
"aria-hidden": !0,
|
|
21
21
|
children: " · "
|
|
22
|
-
}), h[
|
|
22
|
+
}), h[n] === "link" ? e.render !== void 0 || e.href !== void 0 ? t({
|
|
23
23
|
render: e.render,
|
|
24
24
|
href: e.href,
|
|
25
25
|
className: "kapi-link",
|
|
@@ -30,11 +30,10 @@ function c({ items: c, "aria-label": l, labels: u, className: d, ref: f, ...p })
|
|
|
30
30
|
className: "kapi-link",
|
|
31
31
|
onClick: e.onClick,
|
|
32
32
|
children: e.label
|
|
33
|
-
}) : h[
|
|
33
|
+
}) : h[n] === "current" ? /* @__PURE__ */ a("b", {
|
|
34
34
|
"aria-current": "page",
|
|
35
35
|
children: e.label
|
|
36
|
-
}) : /* @__PURE__ */ a("span", { children: e.label })] },
|
|
36
|
+
}) : /* @__PURE__ */ a("span", { children: e.label })] }, n))
|
|
37
37
|
});
|
|
38
38
|
}
|
|
39
|
-
//#endregion
|
|
40
39
|
export { s as DEFAULT_BREADCRUMB_LABELS, c as KapiBreadcrumb };
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import "#kapi-css/components/navigation/navigation.css";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { useControllableState as n } from "../../hooks/useControllableState.js";
|
|
6
|
-
import { KapiTooltip as r } from "../overlays/KapiTooltip.js";
|
|
3
|
+
import { useControllableState as e } from "../../hooks/useControllableState.js";
|
|
4
|
+
import { KapiTooltip as t } from "../overlays/KapiTooltip.js";
|
|
7
5
|
/* empty css */
|
|
6
|
+
import { joinClasses as n } from "../rootProps.js";
|
|
7
|
+
import { useLabels as r } from "../locale/KapiLocaleProvider.js";
|
|
8
8
|
import { useLayoutEffect as i, useRef as a, useState as o } from "react";
|
|
9
9
|
import { Fragment as s, jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
10
10
|
import { ChevronsLeft as u, ChevronsRight as d } from "lucide-react";
|
|
11
|
-
|
|
11
|
+
// src/components/navigation/KapiCollapsiblePanel.tsx
|
|
12
12
|
var f = {
|
|
13
13
|
collapse: "Plegar panel",
|
|
14
14
|
expand: "Desplegar panel",
|
|
15
15
|
region: "Panel lateral"
|
|
16
16
|
}, p = (e) => typeof e == "number" ? `${e}px` : e, m = (e) => e === "right" ? "start" : "end", h = ({ children: h, strip: g, header: _, collapsed: v, defaultCollapsed: y = !1, onCollapsedChange: b, side: x = "right", expandedWidth: S = 320, collapsedWidth: C = 58, collapseLabel: w, expandLabel: T, "aria-label": E, labels: D, className: O, style: k, ...A }) => {
|
|
17
|
-
let j =
|
|
17
|
+
let j = r("collapsiblePanel", f, D), M = w ?? j.collapse, N = T ?? j.expand, P = E ?? j.region, [F, I] = e(v, y, b), L = a(null), [R, z] = o(null);
|
|
18
18
|
i(() => {
|
|
19
19
|
R && (F === R.next && L.current?.focus(), z(null));
|
|
20
20
|
}, [R, F]);
|
|
@@ -27,12 +27,12 @@ var f = {
|
|
|
27
27
|
};
|
|
28
28
|
return /* @__PURE__ */ c("aside", {
|
|
29
29
|
...A,
|
|
30
|
-
className:
|
|
30
|
+
className: n(`kapi-cpanel kapi-cpanel--${x}`, F && "is-collapsed", O),
|
|
31
31
|
style: U,
|
|
32
32
|
"aria-label": P,
|
|
33
33
|
children: F ? /* @__PURE__ */ l("div", {
|
|
34
34
|
className: "kapi-cpanel__strip",
|
|
35
|
-
children: [/* @__PURE__ */ c(
|
|
35
|
+
children: [/* @__PURE__ */ c(t, {
|
|
36
36
|
label: N,
|
|
37
37
|
prefer: m(x),
|
|
38
38
|
children: /* @__PURE__ */ c("button", {
|
|
@@ -69,18 +69,17 @@ var f = {
|
|
|
69
69
|
children: h
|
|
70
70
|
})] })
|
|
71
71
|
});
|
|
72
|
-
}, g = ({ icon:
|
|
73
|
-
label:
|
|
72
|
+
}, g = ({ icon: e, label: r, active: i = !1, onClick: a, side: o = "right", className: s, ...l }) => /* @__PURE__ */ c(t, {
|
|
73
|
+
label: r,
|
|
74
74
|
prefer: m(o),
|
|
75
75
|
children: /* @__PURE__ */ c("button", {
|
|
76
76
|
...l,
|
|
77
77
|
type: "button",
|
|
78
|
-
className:
|
|
79
|
-
"aria-label":
|
|
78
|
+
className: n("kapi-cpanel__stripbtn", i && "is-on", s),
|
|
79
|
+
"aria-label": r,
|
|
80
80
|
"aria-pressed": i,
|
|
81
81
|
onClick: a,
|
|
82
|
-
children:
|
|
82
|
+
children: e
|
|
83
83
|
})
|
|
84
84
|
});
|
|
85
|
-
//#endregion
|
|
86
85
|
export { f as DEFAULT_COLLAPSIBLE_PANEL_LABELS, h as KapiCollapsiblePanel, g as KapiCollapsiblePanelStripItem, m as tooltipSideFor };
|
|
@@ -1,126 +1,126 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import "#kapi-css/components/navigation/navigation.css";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import "./navBadgeLogic.js";
|
|
11
|
-
import { KapiNavBadge as c } from "./KapiNavBadge.js";
|
|
12
|
-
import { CtxSlidingList as l } from "./CtxSlidingList.js";
|
|
3
|
+
import { KapiPanelSearch as e } from "../layout/KapiPanelParts.js";
|
|
4
|
+
import { useControllableState as t } from "../../hooks/useControllableState.js";
|
|
5
|
+
import { canCollapse as n, clampCtxPanelWidth as r, ctxPanelClasses as i, ctxPanelWidthFromDrag as a, stepCtxPanelWidth as o } from "./contextPanelLogic.js";
|
|
6
|
+
import { activeIdIn as s } from "./activeItemLogic.js";
|
|
7
|
+
import { CtxSlidingList as c } from "./CtxSlidingList.js";
|
|
8
|
+
import { renderNavLink as l } from "./navLink.js";
|
|
9
|
+
import { renderSlot as u } from "../renderSlot.js";
|
|
13
10
|
/* empty css */
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
11
|
+
import { useLabels as d } from "../locale/KapiLocaleProvider.js";
|
|
12
|
+
import { DEFAULT_LINK_LABELS as f } from "../locale/linkLabels.js";
|
|
13
|
+
import { KapiNavBadge as p } from "./KapiNavBadge.js";
|
|
14
|
+
import { MiniNavItem as m } from "./MiniNavItem.js";
|
|
15
|
+
import { KapiPanelMiniContext as ee, useKapiPanelMini as h } from "./panelMini.js";
|
|
16
|
+
import "./navBadgeLogic.js";
|
|
17
|
+
import { joinClasses as g } from "../rootProps.js";
|
|
18
|
+
import { useMergedRefs as _ } from "../../hooks/mergeRefs.js";
|
|
19
|
+
import { directionOf as v, physicalSide as y } from "../../hooks/directionLogic.js";
|
|
20
|
+
import { useLayoutEffect as b, useMemo as te, useRef as x, useState as S } from "react";
|
|
21
|
+
import { Fragment as C, jsx as w, jsxs as T } from "react/jsx-runtime";
|
|
22
|
+
import { ChevronsLeft as E, ChevronsRight as D, ExternalLink as O } from "lucide-react";
|
|
23
|
+
// src/components/navigation/KapiContextPanel.tsx
|
|
24
|
+
var k = ({ item: e, active: t, onSelect: n, newTabLabel: r }) => {
|
|
25
|
+
let { mini: i } = h(), a = e.detail !== void 0 || e.initials !== void 0, o = () => n?.(e.id);
|
|
26
|
+
if (i) return /* @__PURE__ */ w(m, {
|
|
27
27
|
label: e.label,
|
|
28
28
|
icon: e.icon,
|
|
29
29
|
initials: e.initials,
|
|
30
|
-
active:
|
|
30
|
+
active: t,
|
|
31
31
|
badge: e.badge,
|
|
32
32
|
badgeTone: e.badgeTone,
|
|
33
33
|
badgeLabel: e.badgeLabel,
|
|
34
34
|
disabled: e.disabled,
|
|
35
|
-
...e.render === void 0 ? !
|
|
35
|
+
...e.render === void 0 ? !a && e.href !== void 0 ? {
|
|
36
36
|
href: e.href,
|
|
37
37
|
newTab: e.newTab,
|
|
38
|
-
newTabLabel:
|
|
39
|
-
} : { onClick:
|
|
38
|
+
newTabLabel: r
|
|
39
|
+
} : { onClick: o } : {
|
|
40
40
|
render: e.render,
|
|
41
41
|
newTab: e.newTab,
|
|
42
|
-
newTabLabel:
|
|
42
|
+
newTabLabel: r
|
|
43
43
|
}
|
|
44
44
|
});
|
|
45
|
-
if (
|
|
46
|
-
let
|
|
47
|
-
e.initials !== void 0 && /* @__PURE__ */
|
|
45
|
+
if (a) {
|
|
46
|
+
let n = /* @__PURE__ */ T(C, { children: [
|
|
47
|
+
e.initials !== void 0 && /* @__PURE__ */ w("span", {
|
|
48
48
|
className: "kapi-ctxrec__av kapi-ctxrec__av--tone",
|
|
49
49
|
children: e.initials
|
|
50
50
|
}),
|
|
51
|
-
/* @__PURE__ */
|
|
51
|
+
/* @__PURE__ */ T("span", {
|
|
52
52
|
className: "kapi-ctxrec__txt",
|
|
53
|
-
children: [/* @__PURE__ */
|
|
53
|
+
children: [/* @__PURE__ */ w("span", {
|
|
54
54
|
className: "kapi-ctxrec__name",
|
|
55
55
|
children: e.label
|
|
56
|
-
}), e.detail !== void 0 && /* @__PURE__ */
|
|
56
|
+
}), e.detail !== void 0 && /* @__PURE__ */ w("span", {
|
|
57
57
|
className: "kapi-ctxrec__sub",
|
|
58
58
|
children: e.detail
|
|
59
59
|
})]
|
|
60
60
|
}),
|
|
61
|
-
/* @__PURE__ */
|
|
61
|
+
/* @__PURE__ */ w(p, {
|
|
62
62
|
value: e.badge,
|
|
63
63
|
tone: e.badgeTone,
|
|
64
64
|
label: e.badgeLabel,
|
|
65
65
|
max: 999
|
|
66
66
|
}),
|
|
67
67
|
e.trailing
|
|
68
|
-
] }),
|
|
69
|
-
return e.render === void 0 ? /* @__PURE__ */
|
|
68
|
+
] }), r = `kapi-ctxrec${t ? " kapi-ctxrec--on" : ""}`;
|
|
69
|
+
return e.render === void 0 ? /* @__PURE__ */ w("button", {
|
|
70
70
|
type: "button",
|
|
71
|
-
className:
|
|
72
|
-
"aria-current":
|
|
71
|
+
className: r,
|
|
72
|
+
"aria-current": t ? "page" : void 0,
|
|
73
73
|
disabled: e.disabled,
|
|
74
|
-
onClick:
|
|
75
|
-
children:
|
|
76
|
-
}) :
|
|
77
|
-
"aria-current":
|
|
74
|
+
onClick: o,
|
|
75
|
+
children: n
|
|
76
|
+
}) : u(e.render, { className: r }, {
|
|
77
|
+
"aria-current": t ? "page" : void 0,
|
|
78
78
|
"aria-disabled": e.disabled || void 0,
|
|
79
79
|
...e.disabled ? { onClick: (e) => e.preventDefault() } : {},
|
|
80
|
-
children:
|
|
81
|
-
}, (e) => /* @__PURE__ */
|
|
80
|
+
children: n
|
|
81
|
+
}, (e) => /* @__PURE__ */ w("a", { ...e }));
|
|
82
82
|
}
|
|
83
|
-
return e.href !== void 0 || e.render !== void 0 ?
|
|
83
|
+
return e.href !== void 0 || e.render !== void 0 ? l({
|
|
84
84
|
render: e.render,
|
|
85
85
|
href: e.href,
|
|
86
86
|
newTab: e.newTab,
|
|
87
87
|
disabled: e.disabled,
|
|
88
|
-
active:
|
|
89
|
-
className: `kapi-ctxitem kapi-ctxitem--link${
|
|
90
|
-
children: /* @__PURE__ */
|
|
91
|
-
/* @__PURE__ */
|
|
88
|
+
active: t,
|
|
89
|
+
className: `kapi-ctxitem kapi-ctxitem--link${t ? " kapi-ctxitem--on" : ""}`,
|
|
90
|
+
children: /* @__PURE__ */ T(C, { children: [
|
|
91
|
+
/* @__PURE__ */ T("span", {
|
|
92
92
|
className: "kapi-ctxitem__main",
|
|
93
93
|
children: [e.icon, e.label]
|
|
94
94
|
}),
|
|
95
|
-
/* @__PURE__ */
|
|
95
|
+
/* @__PURE__ */ w(p, {
|
|
96
96
|
value: e.badge,
|
|
97
97
|
tone: e.badgeTone,
|
|
98
98
|
label: e.badgeLabel,
|
|
99
99
|
max: 999
|
|
100
100
|
}),
|
|
101
101
|
e.trailing,
|
|
102
|
-
e.external && /* @__PURE__ */
|
|
102
|
+
e.external && /* @__PURE__ */ w(O, {
|
|
103
103
|
className: "kapi-ctxitem__ext",
|
|
104
104
|
size: 14,
|
|
105
105
|
"aria-hidden": "true"
|
|
106
106
|
}),
|
|
107
|
-
e.newTab && /* @__PURE__ */
|
|
107
|
+
e.newTab && /* @__PURE__ */ w("span", {
|
|
108
108
|
className: "kapi-ctxitem__sr",
|
|
109
|
-
children:
|
|
109
|
+
children: r
|
|
110
110
|
})
|
|
111
111
|
] })
|
|
112
|
-
}) : /* @__PURE__ */
|
|
112
|
+
}) : /* @__PURE__ */ T("button", {
|
|
113
113
|
type: "button",
|
|
114
|
-
className: `kapi-ctxitem${
|
|
115
|
-
"aria-current":
|
|
114
|
+
className: `kapi-ctxitem${t ? " kapi-ctxitem--on" : ""}`,
|
|
115
|
+
"aria-current": t ? "page" : void 0,
|
|
116
116
|
disabled: e.disabled,
|
|
117
|
-
onClick:
|
|
117
|
+
onClick: o,
|
|
118
118
|
children: [
|
|
119
|
-
/* @__PURE__ */
|
|
119
|
+
/* @__PURE__ */ T("span", {
|
|
120
120
|
className: "kapi-ctxitem__main",
|
|
121
121
|
children: [e.icon, e.label]
|
|
122
122
|
}),
|
|
123
|
-
/* @__PURE__ */
|
|
123
|
+
/* @__PURE__ */ w(p, {
|
|
124
124
|
value: e.badge,
|
|
125
125
|
tone: e.badgeTone,
|
|
126
126
|
label: e.badgeLabel,
|
|
@@ -129,127 +129,127 @@ var O = ({ item: e, active: n, onSelect: r, newTabLabel: i }) => {
|
|
|
129
129
|
e.trailing
|
|
130
130
|
]
|
|
131
131
|
});
|
|
132
|
-
},
|
|
133
|
-
let
|
|
134
|
-
return /* @__PURE__ */
|
|
135
|
-
i && /* @__PURE__ */
|
|
132
|
+
}, A = ({ sections: t, activeId: n, onSelect: r, search: i, hint: a, labels: o }) => {
|
|
133
|
+
let l = d("link", f, o);
|
|
134
|
+
return /* @__PURE__ */ T(C, { children: [
|
|
135
|
+
i && /* @__PURE__ */ w(e, {
|
|
136
136
|
placeholder: i.placeholder,
|
|
137
137
|
value: i.value,
|
|
138
138
|
...i["aria-label"] === void 0 ? {} : { "aria-label": i["aria-label"] },
|
|
139
139
|
onChange: (e) => i.onChange?.(e.target.value)
|
|
140
140
|
}),
|
|
141
|
-
|
|
141
|
+
t.map((e, t) => /* @__PURE__ */ T("div", {
|
|
142
142
|
className: "kapi-ctxsection",
|
|
143
143
|
children: [
|
|
144
|
-
|
|
145
|
-
e.label && /* @__PURE__ */
|
|
144
|
+
t > 0 && /* @__PURE__ */ w("div", { className: "kapi-ctxdivider" }),
|
|
145
|
+
e.label && /* @__PURE__ */ w("div", {
|
|
146
146
|
className: "kapi-ct",
|
|
147
147
|
children: e.label
|
|
148
148
|
}),
|
|
149
|
-
/* @__PURE__ */
|
|
150
|
-
active:
|
|
151
|
-
children: e.items.map((e) => /* @__PURE__ */
|
|
149
|
+
/* @__PURE__ */ w(c, {
|
|
150
|
+
active: s(e.items, n),
|
|
151
|
+
children: e.items.map((e) => /* @__PURE__ */ w(k, {
|
|
152
152
|
item: e,
|
|
153
|
-
active: e.id ===
|
|
154
|
-
onSelect:
|
|
155
|
-
newTabLabel:
|
|
153
|
+
active: e.id === n,
|
|
154
|
+
onSelect: r,
|
|
155
|
+
newTabLabel: l.newTab
|
|
156
156
|
}, e.id))
|
|
157
157
|
})
|
|
158
158
|
]
|
|
159
159
|
}, e.id)),
|
|
160
|
-
a && /* @__PURE__ */
|
|
160
|
+
a && /* @__PURE__ */ w("div", {
|
|
161
161
|
className: "kapi-hint",
|
|
162
162
|
children: a
|
|
163
163
|
})
|
|
164
164
|
] });
|
|
165
|
-
},
|
|
165
|
+
}, j = {
|
|
166
166
|
resize: "Redimensionar panel",
|
|
167
167
|
collapse: "Plegar panel",
|
|
168
168
|
expand: "Desplegar panel",
|
|
169
169
|
region: "Panel contextual"
|
|
170
|
-
},
|
|
171
|
-
let
|
|
172
|
-
|
|
173
|
-
J && (
|
|
174
|
-
}, [J,
|
|
170
|
+
}, M = ({ title: e, actions: s, collapsed: c, defaultCollapsed: l, onCollapsedChange: u, collapseLabel: f, expandLabel: p, side: m = "left", collapsedMode: h = "hidden", resizable: C = !1, minWidth: O = 200, maxWidth: k = 420, "aria-label": M, labels: N, className: P, style: F, id: I, ref: L, ...R }) => {
|
|
171
|
+
let z = d("contextPanel", j, N), ne = f ?? z.collapse, re = p ?? z.expand, B = M ?? z.region, [V, ie] = t(c, l ?? !1, u), [H, U] = S(null), [ae, W] = S(!1), G = x(null), K = x(null), oe = _(K, L), q = x(null), [J, Y] = S(null);
|
|
172
|
+
b(() => {
|
|
173
|
+
J && (V === J.next && q.current?.focus(), Y(null));
|
|
174
|
+
}, [J, V]);
|
|
175
175
|
let X = (e) => {
|
|
176
|
-
Y({ next: e }),
|
|
177
|
-
}, Z =
|
|
178
|
-
|
|
176
|
+
Y({ next: e }), ie(e);
|
|
177
|
+
}, Z = x(X);
|
|
178
|
+
b(() => {
|
|
179
179
|
Z.current = X;
|
|
180
180
|
});
|
|
181
|
-
let se =
|
|
181
|
+
let se = te(() => ({
|
|
182
182
|
mini: !0,
|
|
183
183
|
expand: () => Z.current(!1),
|
|
184
|
-
tooltipSide:
|
|
185
|
-
}), [
|
|
186
|
-
e.button === 0 && (
|
|
184
|
+
tooltipSide: m === "right" ? "start" : "end"
|
|
185
|
+
}), [m]), ce = m === "right" ? D : E, le = m === "right" ? E : D, Q = () => H ?? K.current?.offsetWidth ?? 258, ue = (e) => {
|
|
186
|
+
e.button === 0 && (G.current = {
|
|
187
187
|
startX: e.clientX,
|
|
188
188
|
startWidth: Q()
|
|
189
|
-
}, e.currentTarget.setPointerCapture(e.pointerId),
|
|
189
|
+
}, e.currentTarget.setPointerCapture(e.pointerId), W(!0), e.preventDefault());
|
|
190
190
|
}, de = (e) => {
|
|
191
|
-
let t =
|
|
192
|
-
t &&
|
|
191
|
+
let t = G.current;
|
|
192
|
+
t && U(a(y(m, v(e.currentTarget)), t.startWidth, t.startX, e.clientX, O, k));
|
|
193
193
|
}, $ = (e) => {
|
|
194
|
-
|
|
194
|
+
G.current = null, e.currentTarget.hasPointerCapture(e.pointerId) && e.currentTarget.releasePointerCapture(e.pointerId), W(!1);
|
|
195
195
|
}, fe = (e) => {
|
|
196
|
-
let t =
|
|
197
|
-
t !== null && (e.preventDefault(),
|
|
196
|
+
let t = o(y(m, v(e.currentTarget)), Q(), e.key, O, k);
|
|
197
|
+
t !== null && (e.preventDefault(), U(t));
|
|
198
198
|
};
|
|
199
|
-
if (
|
|
200
|
-
let
|
|
201
|
-
return /* @__PURE__ */
|
|
202
|
-
ref:
|
|
203
|
-
id:
|
|
204
|
-
className:
|
|
205
|
-
side:
|
|
199
|
+
if (V) {
|
|
200
|
+
let e = h === "mini";
|
|
201
|
+
return /* @__PURE__ */ T("aside", {
|
|
202
|
+
ref: L,
|
|
203
|
+
id: I,
|
|
204
|
+
className: g(i({
|
|
205
|
+
side: m,
|
|
206
206
|
collapsed: !0
|
|
207
|
-
}),
|
|
208
|
-
style:
|
|
209
|
-
"aria-label":
|
|
210
|
-
children: [/* @__PURE__ */
|
|
207
|
+
}), e && "is-mini kapi-navmini", P),
|
|
208
|
+
style: F,
|
|
209
|
+
"aria-label": B,
|
|
210
|
+
children: [/* @__PURE__ */ w("button", {
|
|
211
211
|
ref: q,
|
|
212
212
|
type: "button",
|
|
213
213
|
className: "kapi-paneltoggle",
|
|
214
214
|
onClick: () => X(!1),
|
|
215
|
-
"aria-label":
|
|
216
|
-
children: /* @__PURE__ */
|
|
215
|
+
"aria-label": re,
|
|
216
|
+
children: /* @__PURE__ */ w(le, {
|
|
217
217
|
className: "kapi-flip-rtl",
|
|
218
218
|
size: 16,
|
|
219
219
|
strokeWidth: 2,
|
|
220
220
|
"aria-hidden": "true"
|
|
221
221
|
})
|
|
222
|
-
}),
|
|
222
|
+
}), e && /* @__PURE__ */ w(ee.Provider, {
|
|
223
223
|
value: se,
|
|
224
|
-
children: /* @__PURE__ */
|
|
225
|
-
...
|
|
226
|
-
labels:
|
|
224
|
+
children: /* @__PURE__ */ w(A, {
|
|
225
|
+
...R,
|
|
226
|
+
labels: N
|
|
227
227
|
})
|
|
228
228
|
})]
|
|
229
229
|
});
|
|
230
230
|
}
|
|
231
|
-
return /* @__PURE__ */
|
|
232
|
-
ref:
|
|
233
|
-
id:
|
|
234
|
-
className:
|
|
235
|
-
side:
|
|
236
|
-
resizing:
|
|
237
|
-
}),
|
|
238
|
-
"aria-label":
|
|
239
|
-
"data-resizable":
|
|
240
|
-
style:
|
|
241
|
-
...
|
|
242
|
-
width:
|
|
243
|
-
} :
|
|
231
|
+
return /* @__PURE__ */ T("aside", {
|
|
232
|
+
ref: oe,
|
|
233
|
+
id: I,
|
|
234
|
+
className: g(i({
|
|
235
|
+
side: m,
|
|
236
|
+
resizing: ae
|
|
237
|
+
}), P),
|
|
238
|
+
"aria-label": B,
|
|
239
|
+
"data-resizable": C || void 0,
|
|
240
|
+
style: C && H !== null ? {
|
|
241
|
+
...F,
|
|
242
|
+
width: H
|
|
243
|
+
} : F,
|
|
244
244
|
children: [
|
|
245
|
-
|
|
245
|
+
C && /* @__PURE__ */ w("div", {
|
|
246
246
|
className: "kapi-ctxpanel__resize",
|
|
247
247
|
role: "separator",
|
|
248
248
|
"aria-orientation": "vertical",
|
|
249
|
-
"aria-label":
|
|
250
|
-
"aria-valuemin":
|
|
251
|
-
"aria-valuemax":
|
|
252
|
-
"aria-valuenow":
|
|
249
|
+
"aria-label": z.resize,
|
|
250
|
+
"aria-valuemin": O,
|
|
251
|
+
"aria-valuemax": k,
|
|
252
|
+
"aria-valuenow": r(H ?? 258, O, k),
|
|
253
253
|
tabIndex: 0,
|
|
254
254
|
onPointerDown: ue,
|
|
255
255
|
onPointerMove: de,
|
|
@@ -257,21 +257,21 @@ var O = ({ item: e, active: n, onSelect: r, newTabLabel: i }) => {
|
|
|
257
257
|
onPointerCancel: $,
|
|
258
258
|
onKeyDown: fe
|
|
259
259
|
}),
|
|
260
|
-
/* @__PURE__ */
|
|
260
|
+
/* @__PURE__ */ T("div", {
|
|
261
261
|
className: "kapi-ctxpanel__head",
|
|
262
|
-
children: [/* @__PURE__ */
|
|
262
|
+
children: [/* @__PURE__ */ w("span", { children: e }), /* @__PURE__ */ T("div", {
|
|
263
263
|
className: "kapi-ctxpanel__actions",
|
|
264
|
-
children: [s,
|
|
264
|
+
children: [s, n({
|
|
265
265
|
collapsed: c,
|
|
266
266
|
defaultCollapsed: l,
|
|
267
267
|
onCollapsedChange: u
|
|
268
|
-
}) && /* @__PURE__ */
|
|
268
|
+
}) && /* @__PURE__ */ w("button", {
|
|
269
269
|
ref: q,
|
|
270
270
|
type: "button",
|
|
271
271
|
className: "kapi-paneltoggle",
|
|
272
272
|
onClick: () => X(!0),
|
|
273
|
-
"aria-label":
|
|
274
|
-
children: /* @__PURE__ */
|
|
273
|
+
"aria-label": ne,
|
|
274
|
+
children: /* @__PURE__ */ w(ce, {
|
|
275
275
|
className: "kapi-flip-rtl",
|
|
276
276
|
size: 16,
|
|
277
277
|
strokeWidth: 2,
|
|
@@ -280,12 +280,11 @@ var O = ({ item: e, active: n, onSelect: r, newTabLabel: i }) => {
|
|
|
280
280
|
})]
|
|
281
281
|
})]
|
|
282
282
|
}),
|
|
283
|
-
/* @__PURE__ */
|
|
284
|
-
...
|
|
285
|
-
labels:
|
|
283
|
+
/* @__PURE__ */ w(A, {
|
|
284
|
+
...R,
|
|
285
|
+
labels: N
|
|
286
286
|
})
|
|
287
287
|
]
|
|
288
288
|
});
|
|
289
289
|
};
|
|
290
|
-
|
|
291
|
-
export { A as DEFAULT_CONTEXT_PANEL_LABELS, j as KapiContextPanel, k as KapiContextSections };
|
|
290
|
+
export { j as DEFAULT_CONTEXT_PANEL_LABELS, M as KapiContextPanel, A as KapiContextSections };
|