@kapiuara/ui 0.22.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/base.css +1 -1
- package/dist/css/components/navigation/navigation.css +1 -1
- 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 +35 -36
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { defineSlots as e } from "../slotsLogic.js";
|
|
2
|
-
|
|
2
|
+
// src/components/display/avatarGroupSlots.ts
|
|
3
3
|
var t = e("avatarGroup", {
|
|
4
4
|
root: "kapi-avatargroup",
|
|
5
5
|
item: "kapi-avatargroup__item",
|
|
6
6
|
more: null
|
|
7
7
|
});
|
|
8
|
-
//#endregion
|
|
9
8
|
export { t as AVATAR_GROUP_SLOTS };
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
// src/components/display/avatarLogic.ts
|
|
2
2
|
var e = (e) => e.trim().split(/\s+/).filter(Boolean).slice(0, 2).map((e) => Array.from(e)[0] ?? "").join("").toLocaleUpperCase(), t = (e, t) => {
|
|
3
3
|
if (t <= 0) return 0;
|
|
4
4
|
let n = 5381;
|
|
5
5
|
for (let t = 0; t < e.length; t++) n = (n << 5) + n + e.charCodeAt(t) >>> 0;
|
|
6
6
|
return n % t;
|
|
7
7
|
};
|
|
8
|
-
//#endregion
|
|
9
8
|
export { t as colorIndexFrom, e as initialsFrom };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineSlots as e } from "../slotsLogic.js";
|
|
2
|
-
|
|
2
|
+
// src/components/display/codeBlockSlots.ts
|
|
3
3
|
var t = e("codeBlock", {
|
|
4
4
|
root: "kapi-codeblock",
|
|
5
5
|
bar: "kapi-codeblock__bar",
|
|
@@ -9,5 +9,4 @@ var t = e("codeBlock", {
|
|
|
9
9
|
numbers: "kapi-codeblock__nums",
|
|
10
10
|
code: "kapi-codeblock__code"
|
|
11
11
|
});
|
|
12
|
-
//#endregion
|
|
13
12
|
export { t as CODE_BLOCK_SLOTS };
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
// src/components/display/commentLogic.ts
|
|
2
2
|
var e = (e, { disabled: t = !1, loading: n = !1 } = {}) => !t && !n && e.trim().length > 0, t = (e, t = "modifier") => e.key !== "Enter" || e.isComposing ? !1 : t === "enter" ? !e.ctrlKey && !e.metaKey && !e.shiftKey : e.ctrlKey || e.metaKey, n = (e, t) => {
|
|
3
3
|
let n = e.trimStart(), r = n.slice(t.length);
|
|
4
4
|
return !n.startsWith(t) || /^[\p{L}\p{N}]/u.test(r) ? e : r.trimStart();
|
|
5
5
|
};
|
|
6
|
-
//#endregion
|
|
7
6
|
export { e as canSubmitComment, n as draftAfterSubmit, t as isSubmitShortcut };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/components/display/diffLogic.ts
|
|
2
2
|
var e = (e) => e === "" ? [] : e.split(/\r?\n/), t = (e, t, n) => t === -n || t !== n && (e.get(t - 1) ?? 0) < (e.get(t + 1) ?? 0), n = (e, n) => {
|
|
3
3
|
let i = e.length, a = n.length, o = i + a, s = /* @__PURE__ */ new Map([[1, 0]]), c = [], l = Math.min(o, 1e3);
|
|
4
4
|
for (let o = 0; o <= l; o++) {
|
|
@@ -92,5 +92,4 @@ var e = (e) => e === "" ? [] : e.split(/\r?\n/), t = (e, t, n) => t === -n || t
|
|
|
92
92
|
}
|
|
93
93
|
return t;
|
|
94
94
|
};
|
|
95
|
-
//#endregion
|
|
96
95
|
export { o as diffHunks, i as diffLines, s as diffRows };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineSlots as e } from "../slotsLogic.js";
|
|
2
|
-
|
|
2
|
+
// src/components/display/diffSlots.ts
|
|
3
3
|
var t = e("diff", {
|
|
4
4
|
root: "kapi-diff",
|
|
5
5
|
bar: "kapi-diff__bar",
|
|
@@ -13,5 +13,4 @@ var t = e("diff", {
|
|
|
13
13
|
sign: "kapi-diff__sign",
|
|
14
14
|
text: "kapi-diff__text"
|
|
15
15
|
});
|
|
16
|
-
//#endregion
|
|
17
16
|
export { t as DIFF_SLOTS };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { fileKind as e } from "../../hooks/downloadLogic.js";
|
|
2
|
-
|
|
2
|
+
// src/components/display/fileItemLogic.ts
|
|
3
3
|
var t = (t, n) => {
|
|
4
4
|
let r = e(t);
|
|
5
5
|
return r === "other" ? e(n) : r;
|
|
@@ -8,5 +8,4 @@ var t = (t, n) => {
|
|
|
8
8
|
t,
|
|
9
9
|
n
|
|
10
10
|
].filter((e) => e != null && e !== !1 && e !== "");
|
|
11
|
-
//#endregion
|
|
12
11
|
export { t as fileItemKind, n as fileMetaParts };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/components/display/highlightLogic.ts
|
|
2
2
|
var e = (e, t, n = !1) => {
|
|
3
3
|
if (e === "") return [];
|
|
4
4
|
if (t === "") return [{
|
|
@@ -22,5 +22,4 @@ var e = (e, t, n = !1) => {
|
|
|
22
22
|
match: !1
|
|
23
23
|
}), a;
|
|
24
24
|
};
|
|
25
|
-
//#endregion
|
|
26
25
|
export { e as splitByQuery };
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { defineSlots as e } from "../slotsLogic.js";
|
|
2
|
-
|
|
2
|
+
// src/components/display/highlightSlots.ts
|
|
3
3
|
var t = e("highlight", {
|
|
4
4
|
root: null,
|
|
5
5
|
hit: "kapi-highlight__hit"
|
|
6
6
|
});
|
|
7
|
-
//#endregion
|
|
8
7
|
export { t as HIGHLIGHT_SLOTS };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { isFamilyTone as e } from "../tone.js";
|
|
2
|
-
|
|
2
|
+
// src/components/display/iconTileLogic.ts
|
|
3
3
|
var t = {
|
|
4
4
|
sm: 36,
|
|
5
5
|
md: 48,
|
|
@@ -10,5 +10,4 @@ var t = {
|
|
|
10
10
|
n && "kapi-icontile--soft",
|
|
11
11
|
r
|
|
12
12
|
].filter(Boolean).join(" ");
|
|
13
|
-
//#endregion
|
|
14
13
|
export { i as iconTileClasses, r as iconTileRadiusPx, n as iconTileSizePx };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { isFamilyTone as e } from "../tone.js";
|
|
2
|
-
|
|
2
|
+
// src/components/display/statLogic.ts
|
|
3
3
|
var t = ({ tone: t = "neutral", hasIcon: n = !1, className: r = "" } = {}) => [
|
|
4
4
|
"kapi-card",
|
|
5
5
|
"kapi-statcard",
|
|
@@ -7,5 +7,4 @@ var t = ({ tone: t = "neutral", hasIcon: n = !1, className: r = "" } = {}) => [
|
|
|
7
7
|
n && "kapi-statcard--icon",
|
|
8
8
|
r
|
|
9
9
|
].filter(Boolean).join(" "), n = (e = "neutral", t) => t ?? (e === "neutral" ? "primary" : e);
|
|
10
|
-
//#endregion
|
|
11
10
|
export { t as statClasses, n as statIconTone };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { isFamilyTone as e } from "../tone.js";
|
|
2
|
-
|
|
2
|
+
// src/components/display/tagLogic.ts
|
|
3
3
|
var t = ({ tone: t = "neutral", size: n = "md", removable: r = !1, className: i = "" } = {}) => [
|
|
4
4
|
"kapi-tag",
|
|
5
5
|
e(t) ? "kapi-tag--family" : `kapi-tag--${t}`,
|
|
@@ -7,5 +7,4 @@ var t = ({ tone: t = "neutral", size: n = "md", removable: r = !1, className: i
|
|
|
7
7
|
r && "kapi-tag--removable",
|
|
8
8
|
i
|
|
9
9
|
].filter(Boolean).join(" ");
|
|
10
|
-
//#endregion
|
|
11
10
|
export { t as tagClasses };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { isFamilyTone as e } from "../tone.js";
|
|
2
|
-
|
|
2
|
+
// src/components/display/textLogic.ts
|
|
3
3
|
var t = {
|
|
4
4
|
1: "4xl",
|
|
5
5
|
2: "3xl",
|
|
@@ -15,5 +15,4 @@ var t = {
|
|
|
15
15
|
o !== void 0 && `kapi-text--align-${o}`,
|
|
16
16
|
n(s) === void 0 ? s !== void 0 && s !== !1 && s !== 0 && "kapi-text--truncate" : "kapi-text--clamp"
|
|
17
17
|
].filter((e) => typeof e == "string");
|
|
18
|
-
//#endregion
|
|
19
18
|
export { t as TITLE_DEFAULT_SIZE, r as textClasses, n as truncateLines };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { isFamilyTone as e } from "../tone.js";
|
|
2
|
-
|
|
2
|
+
// src/components/display/timelineLogic.ts
|
|
3
3
|
var t = /* @__PURE__ */ new Set([
|
|
4
4
|
"primary",
|
|
5
5
|
"success",
|
|
@@ -8,5 +8,4 @@ var t = /* @__PURE__ */ new Set([
|
|
|
8
8
|
"danger",
|
|
9
9
|
"muted"
|
|
10
10
|
]), n = (e) => typeof e == "string" && t.has(e), r = (e, t = !1) => `kapi-tl-dot kapi-timeline__dot--${t ? "family" : e ?? "primary"}`, i = (t) => t !== void 0 && !n(t) && e(t), a = (e, t) => e < t - 1;
|
|
11
|
-
//#endregion
|
|
12
11
|
export { n as isTimelineTone, i as needsToneResolver, a as showConnector, r as timelineDotClass };
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
import "#kapi-css/components/feedback/feedback.css";
|
|
3
3
|
import { useToneLook as e } from "../../hooks/useToneFamilies.js";
|
|
4
4
|
import { resolveTone as t } from "../tone.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
5
|
+
import { useLabels as n } from "../locale/KapiLocaleProvider.js";
|
|
6
|
+
import { KapiButton as r } from "../inputs/KapiButton.js";
|
|
7
7
|
import { slot as i } from "../slotsLogic.js";
|
|
8
|
-
/* empty css */
|
|
9
8
|
import { ALERT_SLOTS as a } from "./alertSlots.js";
|
|
9
|
+
/* empty css */
|
|
10
10
|
import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
11
11
|
import { AlertTriangle as c, CheckCircle2 as l, Info as u, X as d, XCircle as f } from "lucide-react";
|
|
12
|
-
|
|
12
|
+
// src/components/feedback/KapiAlert.tsx
|
|
13
13
|
var p = { close: "Cerrar aviso" }, m = (e, t) => {
|
|
14
14
|
let n = t ?? (e === "danger" ? "alert" : "status");
|
|
15
15
|
return n === "none" ? void 0 : n;
|
|
@@ -31,7 +31,7 @@ var p = { close: "Cerrar aviso" }, m = (e, t) => {
|
|
|
31
31
|
color: "var(--kapi-danger)"
|
|
32
32
|
}
|
|
33
33
|
}, g = ({ tone: c, variant: l, title: u, children: f, action: g, icon: _, onClose: v, labels: y, className: b, classNames: x, role: S, style: C, ...w }) => {
|
|
34
|
-
let T =
|
|
34
|
+
let T = n("alert", p, y), E = e("KapiAlert", c), D = t(E.tone, l, "info"), O = D in h ? D : "info", { Icon: k } = h[O], A = E.style ? "var(--kapi-tone)" : h[O].color;
|
|
35
35
|
return /* @__PURE__ */ s("div", {
|
|
36
36
|
...w,
|
|
37
37
|
style: E.style ? {
|
|
@@ -63,7 +63,7 @@ var p = { close: "Cerrar aviso" }, m = (e, t) => {
|
|
|
63
63
|
})]
|
|
64
64
|
}),
|
|
65
65
|
g,
|
|
66
|
-
v && /* @__PURE__ */ o(
|
|
66
|
+
v && /* @__PURE__ */ o(r, {
|
|
67
67
|
...i(a, "close", x),
|
|
68
68
|
variant: "ghost",
|
|
69
69
|
size: "sm",
|
|
@@ -79,5 +79,4 @@ var p = { close: "Cerrar aviso" }, m = (e, t) => {
|
|
|
79
79
|
]
|
|
80
80
|
});
|
|
81
81
|
};
|
|
82
|
-
//#endregion
|
|
83
82
|
export { p as DEFAULT_ALERT_LABELS, g as KapiAlert, m as alertRole };
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import "#kapi-css/components/feedback/KapiBulkBar.css";
|
|
3
3
|
import { KapiButton as e } from "../inputs/KapiButton.js";
|
|
4
|
-
import {
|
|
5
|
-
import { selectedCountLabel as n } from "./bulkBarLogic.js";
|
|
4
|
+
import { selectedCountLabel as t } from "./bulkBarLogic.js";
|
|
6
5
|
/* empty css */
|
|
6
|
+
import { useLabels as n } from "../locale/KapiLocaleProvider.js";
|
|
7
7
|
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
8
|
-
|
|
8
|
+
// src/components/feedback/KapiBulkBar.tsx
|
|
9
9
|
var a = {
|
|
10
10
|
region: "Acciones de selección",
|
|
11
11
|
clear: "Limpiar",
|
|
12
12
|
selectedOne: "{n} seleccionada",
|
|
13
13
|
selectedMany: "{n} seleccionadas"
|
|
14
14
|
}, o = ({ count: o, onClear: s, children: c, clearLabel: l, countLabel: u, className: d, placement: f = "bottom", labels: p, ...m }) => {
|
|
15
|
-
let h =
|
|
15
|
+
let h = n("bulkBar", a, p);
|
|
16
16
|
return /* @__PURE__ */ i("div", {
|
|
17
17
|
...m,
|
|
18
18
|
className: `kapi-bulk-bar${f === "top" ? " kapi-bulk-bar--top" : ""}${d ? ` ${d}` : ""}`,
|
|
@@ -21,7 +21,7 @@ var a = {
|
|
|
21
21
|
children: [/* @__PURE__ */ r("span", {
|
|
22
22
|
className: "kapi-bulk-bar__label",
|
|
23
23
|
"aria-live": "polite",
|
|
24
|
-
children: u ? u(o) :
|
|
24
|
+
children: u ? u(o) : t(o, h)
|
|
25
25
|
}), /* @__PURE__ */ i("div", {
|
|
26
26
|
className: "kapi-bulk-bar__actions",
|
|
27
27
|
children: [c, /* @__PURE__ */ r(e, {
|
|
@@ -33,5 +33,4 @@ var a = {
|
|
|
33
33
|
})]
|
|
34
34
|
});
|
|
35
35
|
};
|
|
36
|
-
//#endregion
|
|
37
36
|
export { a as DEFAULT_BULK_BAR_LABELS, o as KapiBulkBar };
|
|
@@ -1,47 +1,46 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import "#kapi-css/components/feedback/feedback.css";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { KapiBadge as e } from "../display/KapiBadge.js";
|
|
4
|
+
import { KapiTooltip as t } from "../overlays/KapiTooltip.js";
|
|
5
|
+
import { useKapiLocale as n, useLabels as r } from "../locale/KapiLocaleProvider.js";
|
|
6
|
+
import { DEFAULT_COUNTDOWN_LABELS as i, DEFAULT_NEAR_MS as a, bucketFor as o, chipText as s, describe as c, parseTarget as l, resolveTones as u } from "./countdownLogic.js";
|
|
5
7
|
/* empty css */
|
|
6
|
-
import {
|
|
7
|
-
import { KapiBadge as i } from "../display/KapiBadge.js";
|
|
8
|
-
import { DEFAULT_COUNTDOWN_LABELS as a, DEFAULT_NEAR_MS as o, bucketFor as s, chipText as c, describe as l, parseTarget as u, resolveTones as d } from "./countdownLogic.js";
|
|
8
|
+
import { slot as d } from "../slotsLogic.js";
|
|
9
9
|
import { COUNTDOWN_SLOTS as f } from "./countdownSlots.js";
|
|
10
10
|
import { useEffect as p, useState as m } from "react";
|
|
11
11
|
import { jsx as h, jsxs as g } from "react/jsx-runtime";
|
|
12
|
-
|
|
13
|
-
function _({ to: _, prefix: v, tones: y, nearThresholdMs: b =
|
|
14
|
-
let [A, j] = m(() => Date.now()), M = S ?? A, N =
|
|
12
|
+
// src/components/feedback/KapiCountdown.tsx
|
|
13
|
+
function _({ to: _, prefix: v, tones: y, nearThresholdMs: b = a, detail: x, now: S, labels: C, size: w = "md", badgeVariant: T, badgeTone: E, className: D, classNames: O, ...k }) {
|
|
14
|
+
let [A, j] = m(() => Date.now()), M = S ?? A, N = r("countdown", i, C), P = n() ?? "es";
|
|
15
15
|
p(() => {
|
|
16
16
|
if (S !== void 0) return;
|
|
17
17
|
j(Date.now());
|
|
18
18
|
let e = setInterval(() => j(Date.now()), 1e3);
|
|
19
19
|
return () => clearInterval(e);
|
|
20
20
|
}, [_, S]);
|
|
21
|
-
let F =
|
|
21
|
+
let F = l(_);
|
|
22
22
|
if (!Number.isFinite(F)) return null;
|
|
23
|
-
let I = F - M, L =
|
|
24
|
-
return /* @__PURE__ */ h(
|
|
23
|
+
let I = F - M, L = o(I, b), R = u(y)[L], z = x ?? c(I, N, P), B = v && L !== "overdue";
|
|
24
|
+
return /* @__PURE__ */ h(t, {
|
|
25
25
|
label: z,
|
|
26
|
-
children: /* @__PURE__ */ g(
|
|
26
|
+
children: /* @__PURE__ */ g(e, {
|
|
27
27
|
...k,
|
|
28
28
|
tone: R,
|
|
29
29
|
variant: T ?? E ?? "subtle",
|
|
30
30
|
size: w,
|
|
31
|
-
...
|
|
31
|
+
...d(f, "root", O, D),
|
|
32
32
|
"data-state": L,
|
|
33
33
|
role: "timer",
|
|
34
34
|
"aria-label": z,
|
|
35
35
|
suppressHydrationWarning: !0,
|
|
36
36
|
children: [B && /* @__PURE__ */ h("span", {
|
|
37
|
-
...
|
|
37
|
+
...d(f, "prefix", O),
|
|
38
38
|
children: v
|
|
39
39
|
}), /* @__PURE__ */ h("span", {
|
|
40
|
-
...
|
|
41
|
-
children:
|
|
40
|
+
...d(f, "time", O),
|
|
41
|
+
children: s(I, N)
|
|
42
42
|
})]
|
|
43
43
|
})
|
|
44
44
|
});
|
|
45
45
|
}
|
|
46
|
-
//#endregion
|
|
47
46
|
export { _ as KapiCountdown };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import "#kapi-css/components/feedback/feedback.css";
|
|
3
3
|
import { slot as e } from "../slotsLogic.js";
|
|
4
|
-
/* empty css */
|
|
5
4
|
import { EMPTY_SLOTS as t } from "./emptySlots.js";
|
|
5
|
+
/* empty css */
|
|
6
6
|
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
7
|
-
|
|
7
|
+
// src/components/feedback/KapiEmpty.tsx
|
|
8
8
|
function i({ icon: i, title: a, description: o, action: s, className: c, classNames: l, ...u }) {
|
|
9
9
|
return /* @__PURE__ */ r("div", {
|
|
10
10
|
...u,
|
|
@@ -30,5 +30,4 @@ function i({ icon: i, title: a, description: o, action: s, className: c, classNa
|
|
|
30
30
|
]
|
|
31
31
|
});
|
|
32
32
|
}
|
|
33
|
-
//#endregion
|
|
34
33
|
export { i as KapiEmpty };
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import "#kapi-css/components/feedback/feedback.css";
|
|
3
|
-
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
3
|
+
/* empty css */
|
|
4
|
+
import { clampFabPosition as e, fabPanelPlacement as t, isDragMove as n, resolveFabCorner as r } from "./fabLogic.js";
|
|
5
|
+
import { useKapiRoot as i } from "../../hooks/kapiRoot.js";
|
|
6
|
+
import { useDismiss as a } from "../../hooks/useDismiss.js";
|
|
7
7
|
import { onViewportChange as o } from "../../hooks/rafThrottle.js";
|
|
8
8
|
import { placementViewport as s } from "../../hooks/viewportInsetLogic.js";
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
|
|
12
|
-
import {
|
|
13
|
-
import { useCallback as
|
|
9
|
+
import { useKapiDir as c, useLabels as l } from "../locale/KapiLocaleProvider.js";
|
|
10
|
+
import { resolveDirection as u } from "../../hooks/directionLogic.js";
|
|
11
|
+
import { useMergedRefs as ee } from "../../hooks/mergeRefs.js";
|
|
12
|
+
import { activeElementOf as te, winOf as d } from "../../hooks/ownerDocument.js";
|
|
13
|
+
import { useCallback as f, useEffect as p, useId as ne, useLayoutEffect as m, useRef as h, useState as g } from "react";
|
|
14
14
|
import { jsx as _, jsxs as v } from "react/jsx-runtime";
|
|
15
15
|
import { Plus as re, X as ie } from "lucide-react";
|
|
16
16
|
import { createPortal as ae } from "react-dom";
|
|
17
|
-
|
|
17
|
+
// src/components/feedback/KapiFab.tsx
|
|
18
18
|
var y = {
|
|
19
19
|
action: "Acción",
|
|
20
20
|
close: "Cerrar"
|
|
@@ -23,126 +23,126 @@ var y = {
|
|
|
23
23
|
bl: "up-start",
|
|
24
24
|
tr: "down-end",
|
|
25
25
|
tl: "down-start"
|
|
26
|
-
}, b = ({ actions: b = [], icon: se, label:
|
|
27
|
-
let
|
|
28
|
-
|
|
29
|
-
let
|
|
30
|
-
let t = typeof e == "function" ? e(
|
|
31
|
-
t !==
|
|
32
|
-
}, [
|
|
33
|
-
let
|
|
34
|
-
if (!
|
|
35
|
-
let
|
|
36
|
-
return
|
|
37
|
-
width:
|
|
38
|
-
height:
|
|
39
|
-
}, s(
|
|
40
|
-
}, []),
|
|
41
|
-
zones: [
|
|
42
|
-
outside: !(
|
|
26
|
+
}, b = ({ actions: b = [], icon: se, label: ce, labels: le, onClick: ue, position: de = "bottom-end", draggable: x = !1, panel: S, panelTitle: C, open: w, defaultOpen: T = !1, onOpenChange: E, keepOpen: fe = !1, className: pe, style: D, id: me, ref: he }) => {
|
|
27
|
+
let O = l("fab", y, le), k = ce ?? O.action, A = w !== void 0, [ge, _e] = g(T), j = A ? w : ge, M = h(j);
|
|
28
|
+
M.current = j;
|
|
29
|
+
let N = f((e) => {
|
|
30
|
+
let t = typeof e == "function" ? e(M.current) : e;
|
|
31
|
+
t !== M.current && (A || _e(t), E?.(t));
|
|
32
|
+
}, [A, E]), P = S != null && S !== !1, F = h(null), I = h(null), L = ne(), [R, z] = g(null), [ve, B] = g(!1), V = h(null), ye = ee(V, he), H = h(!1), U = i(), be = c(), W = !P && b.length > 0, G = f((t) => {
|
|
33
|
+
let n = V.current;
|
|
34
|
+
if (!n) return t;
|
|
35
|
+
let r = n.getBoundingClientRect();
|
|
36
|
+
return e(t, {
|
|
37
|
+
width: r.width,
|
|
38
|
+
height: r.height
|
|
39
|
+
}, s(n));
|
|
40
|
+
}, []), xe = a(j, {
|
|
41
|
+
zones: [V],
|
|
42
|
+
outside: !(P && fe),
|
|
43
43
|
onDismiss: (e) => {
|
|
44
|
-
let t = e === "escape" && (
|
|
45
|
-
|
|
44
|
+
let t = e === "escape" && (V.current?.contains(te(V.current)) ?? !1);
|
|
45
|
+
N(!1), t && F.current?.focus();
|
|
46
46
|
}
|
|
47
47
|
});
|
|
48
|
-
|
|
49
|
-
if (!
|
|
50
|
-
let e =
|
|
48
|
+
p(() => {
|
|
49
|
+
if (!j || !P) return;
|
|
50
|
+
let e = I.current;
|
|
51
51
|
(e?.querySelector(".kapi-fab-panel__body :is(input, select, textarea, button, [href], [tabindex]:not([tabindex='-1']))") ?? e)?.focus();
|
|
52
|
-
}, [
|
|
53
|
-
let [
|
|
54
|
-
let
|
|
55
|
-
|
|
52
|
+
}, [j, P]);
|
|
53
|
+
let [Se, Ce] = g(null), K = f((e) => {
|
|
54
|
+
let n = V.current, r = e && n ? t(n.getBoundingClientRect(), s(n)) : null;
|
|
55
|
+
Ce(r);
|
|
56
56
|
}, []);
|
|
57
57
|
m(() => {
|
|
58
|
-
|
|
58
|
+
K(R !== null);
|
|
59
59
|
}, [
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
60
|
+
R,
|
|
61
|
+
j,
|
|
62
|
+
U,
|
|
63
|
+
K
|
|
64
64
|
]);
|
|
65
|
-
let
|
|
66
|
-
|
|
67
|
-
if (!
|
|
68
|
-
let e =
|
|
65
|
+
let q = R !== null;
|
|
66
|
+
p(() => {
|
|
67
|
+
if (!q) return;
|
|
68
|
+
let e = d(V.current);
|
|
69
69
|
return o(() => {
|
|
70
|
-
|
|
70
|
+
z((e) => {
|
|
71
71
|
if (!e) return e;
|
|
72
|
-
let t =
|
|
72
|
+
let t = G(e);
|
|
73
73
|
return t.x === e.x && t.y === e.y ? e : t;
|
|
74
|
-
}),
|
|
74
|
+
}), K(!0);
|
|
75
75
|
}, e ? { target: e } : {});
|
|
76
76
|
}, [
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
77
|
+
q,
|
|
78
|
+
G,
|
|
79
|
+
K
|
|
80
80
|
]);
|
|
81
|
-
let
|
|
82
|
-
if (!
|
|
83
|
-
let t =
|
|
81
|
+
let J = (e) => {
|
|
82
|
+
if (!x || e.button !== 0 || !V.current) return;
|
|
83
|
+
let t = V.current.getBoundingClientRect(), r = {
|
|
84
84
|
mx: e.clientX,
|
|
85
85
|
my: e.clientY,
|
|
86
86
|
x: t.left,
|
|
87
87
|
y: t.top,
|
|
88
88
|
moved: !1
|
|
89
|
-
},
|
|
90
|
-
let t = e.clientX -
|
|
91
|
-
|
|
92
|
-
x:
|
|
93
|
-
y:
|
|
89
|
+
}, i = (e) => {
|
|
90
|
+
let t = e.clientX - r.mx, i = e.clientY - r.my;
|
|
91
|
+
n(t, i) && (r.moved = !0), r.moved && (B(!0), z(G({
|
|
92
|
+
x: r.x + t,
|
|
93
|
+
y: r.y + i
|
|
94
94
|
})));
|
|
95
|
-
}, a =
|
|
96
|
-
a.removeEventListener("pointermove",
|
|
97
|
-
|
|
95
|
+
}, a = d(V.current) ?? window, o = () => {
|
|
96
|
+
a.removeEventListener("pointermove", i), a.removeEventListener("pointerup", o), a.removeEventListener("pointercancel", o), H.current = r.moved, B(!1), setTimeout(() => {
|
|
97
|
+
H.current = !1;
|
|
98
98
|
}, 0);
|
|
99
99
|
};
|
|
100
|
-
a.addEventListener("pointermove",
|
|
100
|
+
a.addEventListener("pointermove", i), a.addEventListener("pointerup", o), a.addEventListener("pointercancel", o);
|
|
101
101
|
}, we = () => {
|
|
102
|
-
|
|
102
|
+
H.current || (W || P ? N((e) => !e) : ue?.());
|
|
103
103
|
}, Y = () => {
|
|
104
|
-
|
|
104
|
+
N(!1), F.current?.focus();
|
|
105
105
|
};
|
|
106
|
-
if (!
|
|
107
|
-
let X =
|
|
108
|
-
...
|
|
109
|
-
left:
|
|
110
|
-
top:
|
|
106
|
+
if (!U) return null;
|
|
107
|
+
let X = u(U, be), Z = r(de, X), Q = X === "rtl" && Z.frame === "ltr", $ = Q ? { dir: "rtl" } : {}, Te = R && Se || oe[Z.physical], Ee = R ? {
|
|
108
|
+
...D,
|
|
109
|
+
left: R.x,
|
|
110
|
+
top: R.y,
|
|
111
111
|
right: "auto",
|
|
112
112
|
bottom: "auto"
|
|
113
|
-
} :
|
|
113
|
+
} : D, De = [
|
|
114
114
|
"kapi-fab-wrap",
|
|
115
115
|
`kapi-fab-wrap--${Z.logical}`,
|
|
116
116
|
`kapi-fab-wrap--${Z.physical}`,
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
117
|
+
x && "is-draggable",
|
|
118
|
+
ve && "is-dragging",
|
|
119
|
+
pe
|
|
120
120
|
].filter(Boolean).join(" ");
|
|
121
121
|
return ae(/* @__PURE__ */ v("div", {
|
|
122
|
-
ref:
|
|
123
|
-
id:
|
|
122
|
+
ref: ye,
|
|
123
|
+
id: me,
|
|
124
124
|
className: De,
|
|
125
125
|
style: Ee,
|
|
126
126
|
...Q ? { dir: "ltr" } : {},
|
|
127
|
-
onKeyDown:
|
|
127
|
+
onKeyDown: xe,
|
|
128
128
|
children: [
|
|
129
|
-
|
|
130
|
-
ref:
|
|
129
|
+
P && j && /* @__PURE__ */ v("div", {
|
|
130
|
+
ref: I,
|
|
131
131
|
role: "dialog",
|
|
132
132
|
tabIndex: -1,
|
|
133
133
|
className: `kapi-fab-panel kapi-fab-panel--${Te}`,
|
|
134
134
|
...$,
|
|
135
|
-
...
|
|
136
|
-
children: [
|
|
135
|
+
...C == null ? { "aria-label": k } : { "aria-labelledby": L },
|
|
136
|
+
children: [C != null && /* @__PURE__ */ v("div", {
|
|
137
137
|
className: "kapi-fab-panel__head",
|
|
138
138
|
children: [/* @__PURE__ */ _("span", {
|
|
139
|
-
id:
|
|
139
|
+
id: L,
|
|
140
140
|
className: "kapi-fab-panel__title",
|
|
141
|
-
children:
|
|
141
|
+
children: C
|
|
142
142
|
}), /* @__PURE__ */ _("button", {
|
|
143
143
|
type: "button",
|
|
144
144
|
className: "kapi-fab-panel__close",
|
|
145
|
-
"aria-label":
|
|
145
|
+
"aria-label": O.close,
|
|
146
146
|
onClick: Y,
|
|
147
147
|
children: /* @__PURE__ */ _(ie, {
|
|
148
148
|
size: 16,
|
|
@@ -151,17 +151,17 @@ var y = {
|
|
|
151
151
|
})]
|
|
152
152
|
}), /* @__PURE__ */ _("div", {
|
|
153
153
|
className: "kapi-fab-panel__body",
|
|
154
|
-
children: typeof
|
|
154
|
+
children: typeof S == "function" ? S({ close: Y }) : S
|
|
155
155
|
})]
|
|
156
156
|
}),
|
|
157
|
-
|
|
158
|
-
className: `kapi-fab-actions${
|
|
157
|
+
W && /* @__PURE__ */ _("div", {
|
|
158
|
+
className: `kapi-fab-actions${j ? " is-open" : ""}`,
|
|
159
159
|
children: b.map((e) => /* @__PURE__ */ v("button", {
|
|
160
160
|
type: "button",
|
|
161
161
|
className: "kapi-fab-act",
|
|
162
|
-
tabIndex:
|
|
162
|
+
tabIndex: j ? 0 : -1,
|
|
163
163
|
onClick: () => {
|
|
164
|
-
e.onClick?.(),
|
|
164
|
+
e.onClick?.(), N(!1);
|
|
165
165
|
},
|
|
166
166
|
children: [/* @__PURE__ */ _("span", {
|
|
167
167
|
className: "kapi-fab-act__label",
|
|
@@ -174,16 +174,16 @@ var y = {
|
|
|
174
174
|
}, e.label))
|
|
175
175
|
}),
|
|
176
176
|
/* @__PURE__ */ _("button", {
|
|
177
|
-
ref:
|
|
177
|
+
ref: F,
|
|
178
178
|
type: "button",
|
|
179
179
|
className: "kapi-fab-main",
|
|
180
|
-
onPointerDown:
|
|
180
|
+
onPointerDown: J,
|
|
181
181
|
onClick: we,
|
|
182
|
-
"aria-label":
|
|
183
|
-
"aria-haspopup":
|
|
184
|
-
"aria-expanded":
|
|
182
|
+
"aria-label": k,
|
|
183
|
+
"aria-haspopup": P ? "dialog" : void 0,
|
|
184
|
+
"aria-expanded": W || P ? j : void 0,
|
|
185
185
|
children: /* @__PURE__ */ _("span", {
|
|
186
|
-
className: `kapi-fab-main__ico${
|
|
186
|
+
className: `kapi-fab-main__ico${W && j ? " is-open" : ""}`,
|
|
187
187
|
children: se ?? /* @__PURE__ */ _(re, {
|
|
188
188
|
size: 24,
|
|
189
189
|
strokeWidth: 2.4
|
|
@@ -191,7 +191,6 @@ var y = {
|
|
|
191
191
|
})
|
|
192
192
|
})
|
|
193
193
|
]
|
|
194
|
-
}),
|
|
194
|
+
}), U);
|
|
195
195
|
};
|
|
196
|
-
//#endregion
|
|
197
196
|
export { y as DEFAULT_FAB_LABELS, b as KapiFab };
|