@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,37 +1,36 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
|
|
1
|
+
import { CARD_SLOTS as e } from "./layout/cardSlots.js";
|
|
2
|
+
import { CODE_BLOCK_SLOTS as t } from "./display/codeBlockSlots.js";
|
|
3
|
+
import { DIFF_SLOTS as n } from "./display/diffSlots.js";
|
|
4
|
+
import { HIGHLIGHT_SLOTS as r } from "./display/highlightSlots.js";
|
|
5
|
+
import { TOC_SLOTS as i } from "./navigation/tocSlots.js";
|
|
6
|
+
import { MODAL_SLOTS as a } from "./overlays/modalSlots.js";
|
|
7
|
+
import { TABLE_SLOTS as o } from "./data/tableSlots.js";
|
|
8
|
+
import { SELECT_SLOTS as s } from "./inputs/selectSlots.js";
|
|
9
|
+
import { SHELL_SLOTS as c } from "./layout/shellSlots.js";
|
|
10
|
+
import { RAIL_SLOTS as l } from "./layout/railSlots.js";
|
|
11
|
+
import { PAGEHEADER_SLOTS as u } from "./layout/pageHeaderSlots.js";
|
|
12
|
+
import { ALERT_SLOTS as d } from "./feedback/alertSlots.js";
|
|
13
|
+
import { COUNTDOWN_SLOTS as f } from "./feedback/countdownSlots.js";
|
|
14
|
+
import { EMPTY_SLOTS as p } from "./feedback/emptySlots.js";
|
|
15
|
+
import { SHORTCUTS_HELP_SLOTS as m } from "./overlays/shortcutsHelpSlots.js";
|
|
16
|
+
import { AVATAR_GROUP_SLOTS as h } from "./display/avatarGroupSlots.js";
|
|
17
|
+
// src/components/slotCatalog.ts
|
|
18
18
|
var g = {
|
|
19
|
-
card:
|
|
20
|
-
codeBlock:
|
|
21
|
-
diff:
|
|
22
|
-
highlight:
|
|
23
|
-
toc:
|
|
24
|
-
modal:
|
|
25
|
-
table:
|
|
26
|
-
select:
|
|
27
|
-
shell:
|
|
28
|
-
rail:
|
|
29
|
-
pageheader:
|
|
30
|
-
alert:
|
|
31
|
-
countdown:
|
|
32
|
-
empty:
|
|
33
|
-
shortcutsHelp:
|
|
34
|
-
avatarGroup:
|
|
19
|
+
card: e.parts,
|
|
20
|
+
codeBlock: t.parts,
|
|
21
|
+
diff: n.parts,
|
|
22
|
+
highlight: r.parts,
|
|
23
|
+
toc: i.parts,
|
|
24
|
+
modal: a.parts,
|
|
25
|
+
table: o.parts,
|
|
26
|
+
select: s.parts,
|
|
27
|
+
shell: c.parts,
|
|
28
|
+
rail: l.parts,
|
|
29
|
+
pageheader: u.parts,
|
|
30
|
+
alert: d.parts,
|
|
31
|
+
countdown: f.parts,
|
|
32
|
+
empty: p.parts,
|
|
33
|
+
shortcutsHelp: m.parts,
|
|
34
|
+
avatarGroup: h.parts
|
|
35
35
|
};
|
|
36
|
-
//#endregion
|
|
37
36
|
export { g as KAPI_SLOTS };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/components/slotsLogic.ts
|
|
2
2
|
var e = (e) => e.replace(/[A-Z]/g, (e) => `-${e.toLowerCase()}`), t = (t, n) => n === "root" ? t : `${t}-${e(n)}`, n = (...e) => {
|
|
3
3
|
let t = /* @__PURE__ */ new Set();
|
|
4
4
|
for (let n of e) if (n) for (let e of n.split(/\s+/)) e && t.add(e);
|
|
@@ -14,5 +14,4 @@ var e = (e) => e.replace(/[A-Z]/g, (e) => `-${e.toLowerCase()}`), t = (t, n) =>
|
|
|
14
14
|
"data-slot": t(e.component, r)
|
|
15
15
|
};
|
|
16
16
|
};
|
|
17
|
-
//#endregion
|
|
18
17
|
export { r as defineSlots, n as mergeClasses, i as slot, t as slotName };
|
package/dist/components/tone.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { RESERVED_TONE_NAMES as e } from "../hooks/toneFamilyLogic.js";
|
|
2
|
-
|
|
2
|
+
// src/components/tone.ts
|
|
3
3
|
var t = /* @__PURE__ */ new Set([
|
|
4
4
|
"neutral",
|
|
5
5
|
"primary",
|
|
@@ -89,5 +89,4 @@ var t = /* @__PURE__ */ new Set([
|
|
|
89
89
|
appearance: n?.appearance ?? "solid"
|
|
90
90
|
};
|
|
91
91
|
}, f = ({ tone: e, appearance: t }) => e === "neutral" ? t === "tonal" ? "tonal-neutral" : t === "ghost" ? "ghost" : null : t === "solid" ? e : `${t}-${e}`, p = (e, t) => e ?? (t === !0 ? "danger" : void 0);
|
|
92
|
-
//#endregion
|
|
93
92
|
export { f as buttonLookModifier, n as isFamilyTone, i as isKapiTone, a as normalizeTone, s as resolveBadgeLook, d as resolveButtonLook, p as resolveMenuItemTone, o as resolveTone };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.kapi .kapi-viewport{background:var(--kapi-surface-2);border-radius:var(--kapi-radius-sm);touch-action:none;-webkit-user-select:none;user-select:none;justify-content:center;align-items:center;display:flex;position:relative;overflow:hidden}.kapi .kapi-viewport.is-pannable .kapi-viewport__stage{cursor:grab}.kapi .kapi-viewport.is-pannable .kapi-viewport__stage:active{cursor:grabbing}.kapi .kapi-viewport__stage{transform-origin:50%;will-change:transform;flex:none}.kapi .kapi-viewport__controls{gap:var(--kapi-space-2);padding:var(--kapi-space-2);border-radius:var(--kapi-radius-sm);background:var(--kapi-card);box-shadow:var(--kapi-shadow-tip);display:flex;position:absolute;inset-block-end:var(--kapi-space-5);inset-inline-end:var(--kapi-space-5)}.kapi .kapi-imgviewer{z-index:var(--kapi-z-modal);background:var(--kapi-scrim-strong,var(--kapi-scrim));grid-template-rows:auto 1fr auto;display:grid;position:fixed;inset:0}.kapi .kapi-imgviewer__bar{align-items:center;gap:var(--kapi-space-5);padding:var(--kapi-space-4) var(--kapi-space-6);color:var(--kapi-on-primary);display:flex}.kapi .kapi-imgviewer__title{font-weight:700;font-size:var(--kapi-fs-sm);text-overflow:ellipsis;white-space:nowrap;flex:1;min-width:0;overflow:hidden}.kapi .kapi-imgviewer__count{font-weight:700;font-size:var(--kapi-fs-xs);font-variant-numeric:tabular-nums;opacity:.85}.kapi .kapi-imgviewer__stage{background:0 0;min-height:0}.kapi .kapi-imgviewer__img{object-fit:contain;width:100%;height:100%;display:block}.kapi .kapi-imgviewer__caption{padding:var(--kapi-space-5) var(--kapi-space-6);color:var(--kapi-on-primary);font-size:var(--kapi-fs-xs);text-align:center}.kapi .kapi-imgviewer__prev,.kapi .kapi-imgviewer__next{position:absolute;top:50%;transform:translateY(-50%)}.kapi .kapi-imgviewer__prev{inset-inline-start:var(--kapi-space-5)}.kapi .kapi-imgviewer__next{inset-inline-end:var(--kapi-space-5)}
|
|
1
|
+
.kapi .kapi-viewport{background:var(--kapi-surface-2);border-radius:var(--kapi-radius-sm);touch-action:none;-webkit-user-select:none;user-select:none;justify-content:center;align-items:center;block-size:100%;display:flex;position:relative;overflow:hidden}.kapi .kapi-viewport.is-pannable .kapi-viewport__stage{cursor:grab}.kapi .kapi-viewport.is-pannable .kapi-viewport__stage:active{cursor:grabbing}.kapi .kapi-viewport__stage{transform-origin:50%;will-change:transform;flex:none}.kapi .kapi-viewport__controls{gap:var(--kapi-space-2);padding:var(--kapi-space-2);border-radius:var(--kapi-radius-sm);background:var(--kapi-card);box-shadow:var(--kapi-shadow-tip);display:flex;position:absolute;inset-block-end:var(--kapi-space-5);inset-inline-end:var(--kapi-space-5)}.kapi .kapi-imgviewer{z-index:var(--kapi-z-modal);background:var(--kapi-scrim-strong,var(--kapi-scrim));grid-template-rows:auto 1fr auto;display:grid;position:fixed;inset:0}.kapi .kapi-imgviewer__bar{align-items:center;gap:var(--kapi-space-5);padding:var(--kapi-space-4) var(--kapi-space-6);color:var(--kapi-on-primary);display:flex}.kapi .kapi-imgviewer__title{font-weight:700;font-size:var(--kapi-fs-sm);text-overflow:ellipsis;white-space:nowrap;flex:1;min-width:0;overflow:hidden}.kapi .kapi-imgviewer__count{font-weight:700;font-size:var(--kapi-fs-xs);font-variant-numeric:tabular-nums;opacity:.85}.kapi .kapi-imgviewer__stage{background:0 0;min-height:0}.kapi .kapi-imgviewer__img{object-fit:contain;width:100%;height:100%;display:block}.kapi .kapi-imgviewer__caption{padding:var(--kapi-space-5) var(--kapi-space-6);color:var(--kapi-on-primary);font-size:var(--kapi-fs-xs);text-align:center}.kapi .kapi-imgviewer__prev,.kapi .kapi-imgviewer__next{position:absolute;top:50%;transform:translateY(-50%)}.kapi .kapi-imgviewer__prev{inset-inline-start:var(--kapi-space-5)}.kapi .kapi-imgviewer__next{inset-inline-end:var(--kapi-space-5)}
|
package/dist/hooks/colorLogic.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/hooks/colorLogic.ts
|
|
2
2
|
var e = (e, t, n) => Math.min(n, Math.max(t, e)), t = /^#([0-9a-f]{3}|[0-9a-f]{6}|[0-9a-f]{8})$/i, n = String.raw`[+-]?(?:\d+\.?\d*|\.\d+)`, r = new RegExp(String.raw`^rgba?\(\s*(${n})(?:\s*,\s*|\s+)(${n})(?:\s*,\s*|\s+)(${n})` + String.raw`(?:\s*[,/]\s*(${n})(%?))?\s*\)$`, "i"), i = (e) => {
|
|
3
3
|
let t = e.length === 3 ? e.split("").map((e) => e + e).join("") : e, n = (e) => parseInt(t.slice(e, e + 2), 16);
|
|
4
4
|
return {
|
|
@@ -49,5 +49,4 @@ var e = (e, t, n) => Math.min(n, Math.max(t, e)), t = /^#([0-9a-f]{3}|[0-9a-f]{6
|
|
|
49
49
|
t.g,
|
|
50
50
|
t.b
|
|
51
51
|
].map((t) => Math.round(e(t, 0, 255)).toString(16).padStart(2, "0")).join("");
|
|
52
|
-
//#endregion
|
|
53
52
|
export { c as contrastRatio, d as formatHex, l as mixColors, a as parseColor, u as readableForeground, s as relativeLuminance };
|
package/dist/hooks/dateFormat.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/hooks/dateFormat.ts
|
|
2
2
|
var e = 6e4, t = 60 * e, n = 24 * t, r = 7 * n, i = 30 * n, a = 365 * n, o = /* @__PURE__ */ new Map(), s = (e) => {
|
|
3
3
|
let t = o.get(e);
|
|
4
4
|
return t || (t = new Intl.RelativeTimeFormat(e, { numeric: "auto" }), o.set(e, t)), t;
|
|
@@ -25,5 +25,4 @@ var e = 6e4, t = 60 * e, n = 24 * t, r = 7 * n, i = 30 * n, a = 365 * n, o = /*
|
|
|
25
25
|
let r = u(e);
|
|
26
26
|
return Number.isFinite(r) ? l(t, n).format(r) : "";
|
|
27
27
|
};
|
|
28
|
-
//#endregion
|
|
29
28
|
export { g as formatDate, h as formatDayLabel, p as formatRelativeTime, f as isoDateTime };
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
// src/hooks/directionLogic.ts
|
|
2
2
|
var e = (e, t) => {
|
|
3
3
|
let n = typeof e?.closest == "function" ? e.closest("[dir]") : null;
|
|
4
4
|
return n ? n.getAttribute("dir")?.toLowerCase() === "rtl" ? "rtl" : "ltr" : t ?? "ltr";
|
|
5
5
|
}, t = (t) => e(t), n = (e, t) => t === "rtl" ? e === "ArrowLeft" ? "ArrowRight" : e === "ArrowRight" ? "ArrowLeft" : e : e, r = (e) => n(e.key, t(e.currentTarget)), i = (e, t) => t === "rtl" ? e === "left" ? "right" : "left" : e;
|
|
6
|
-
//#endregion
|
|
7
6
|
export { t as directionOf, n as logicalArrowKey, r as logicalKeyOf, i as physicalSide, e as resolveDirection };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/hooks/downloadLogic.ts
|
|
2
2
|
var e = (e) => e.split(/[\\/]/).pop() ?? "", t = (e) => {
|
|
3
3
|
let t = /* @__PURE__ */ new Map();
|
|
4
4
|
for (let n of `;${e}`.matchAll(/;\s*([^\s=;]+)\s*=\s*("(?:[^"\\]|\\.)*"|[^;]*)/g)) {
|
|
@@ -81,5 +81,4 @@ var e = (e) => e.split(/[\\/]/).pop() ?? "", t = (e) => {
|
|
|
81
81
|
let n = URL.createObjectURL(e), r = document.createElement("a");
|
|
82
82
|
r.href = n, r.download = t, r.style.display = "none", document.body.appendChild(r), r.click(), r.remove(), setTimeout(() => URL.revokeObjectURL(n), 0);
|
|
83
83
|
};
|
|
84
|
-
//#endregion
|
|
85
84
|
export { g as downloadBlob, l as fileKind, r as fileNameFromContentDisposition, i as fileNameFromUrl, p as formatFileSize, h as isSafeFileUrl };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/hooks/fieldErrorsLogic.ts
|
|
2
2
|
var e = (e) => e != null && e !== !1 && e !== "", t = (t) => Object.values(t).some(e), n = (t, n) => e(t) && (n.touched || n.submitted) ? t : void 0, r = (e, t) => e[t] ? e : {
|
|
3
3
|
...e,
|
|
4
4
|
[t]: !0
|
|
@@ -9,5 +9,4 @@ var e = (e) => e != null && e !== !1 && e !== "", t = (t) => Object.values(t).so
|
|
|
9
9
|
invalid: !1,
|
|
10
10
|
help: n
|
|
11
11
|
}, a = (e, t) => t === null || typeof t.nodeType != "number" || !e.contains(t);
|
|
12
|
-
//#endregion
|
|
13
12
|
export { a as blurLeavesField, i as fieldErrorProps, e as hasFieldError, t as hasFieldErrors, r as touchField, n as visibleFieldError };
|
package/dist/hooks/focusLogic.js
CHANGED
|
@@ -1,18 +1,9 @@
|
|
|
1
1
|
import { activeElementOf as e } from "./ownerDocument.js";
|
|
2
|
-
|
|
3
|
-
var t = [
|
|
4
|
-
"a[href]",
|
|
5
|
-
"button:not([disabled])",
|
|
6
|
-
"input:not([disabled]):not([type='hidden'])",
|
|
7
|
-
"select:not([disabled])",
|
|
8
|
-
"textarea:not([disabled])",
|
|
9
|
-
"[tabindex]:not([tabindex='-1'])",
|
|
10
|
-
"[contenteditable='true']"
|
|
11
|
-
].join(","), n = (e) => e ? Array.from(e.querySelectorAll(t)).filter((e) => !e.closest("[inert]") && e.tabIndex >= 0) : [], r = (e, t, n) => e === 0 ? -1 : t < 0 ? n ? e - 1 : 0 : n ? (t - 1 + e) % e : (t + 1) % e, i = (t, i) => {
|
|
2
|
+
// src/hooks/focusLogic.ts
|
|
3
|
+
var t = "a[href],button:not([disabled]),input:not([disabled]):not([type='hidden']),select:not([disabled]),textarea:not([disabled]),[tabindex]:not([tabindex='-1']),[contenteditable='true']", n = (e) => e ? Array.from(e.querySelectorAll(t)).filter((e) => !e.closest("[inert]") && e.tabIndex >= 0) : [], r = (e, t, n) => e === 0 ? -1 : t < 0 ? n ? e - 1 : 0 : n ? (t - 1 + e) % e : (t + 1) % e, i = (t, i) => {
|
|
12
4
|
if (t.key !== "Tab" || !i) return !1;
|
|
13
5
|
t.preventDefault();
|
|
14
6
|
let a = n(i), o = a.indexOf(e(i)), s = r(a.length, o, t.shiftKey);
|
|
15
7
|
return (s < 0 ? i : a[s])?.focus(), !0;
|
|
16
8
|
};
|
|
17
|
-
//#endregion
|
|
18
9
|
export { t as FOCUSABLE_SELECTOR, n as focusableWithin, r as nextTrapIndex, i as trapTabKey };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/hooks/growOriginLogic.ts
|
|
2
2
|
var e = (e) => ({
|
|
3
3
|
x: e.left + e.width / 2,
|
|
4
4
|
y: e.top + e.height / 2
|
|
@@ -6,5 +6,4 @@ var e = (e) => ({
|
|
|
6
6
|
x: t(e.x - n.left, n.width),
|
|
7
7
|
y: t(e.y - n.top, n.height)
|
|
8
8
|
});
|
|
9
|
-
//#endregion
|
|
10
9
|
export { n as originWithinCard, e as rectCenter };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/hooks/hotkeyLogic.ts
|
|
2
2
|
var e = {
|
|
3
3
|
esc: "escape",
|
|
4
4
|
space: " ",
|
|
@@ -29,5 +29,4 @@ var e = {
|
|
|
29
29
|
else return null;
|
|
30
30
|
return a;
|
|
31
31
|
}, r = (e) => e.length === 1 && e !== " " && e.toLowerCase() === e.toUpperCase(), i = (e, t) => e.key.toLowerCase() !== t.key || e.altKey !== t.alt || (t.shift || !r(t.key)) && e.shiftKey !== t.shift ? !1 : t.mod ? e.ctrlKey !== e.metaKey : e.ctrlKey === t.ctrl && e.metaKey === t.meta;
|
|
32
|
-
//#endregion
|
|
33
32
|
export { t as hotkeyTokens, i as matchesHotkey, n as parseHotkey };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { hotkeyTokens as e } from "./hotkeyLogic.js";
|
|
2
|
-
|
|
2
|
+
// src/hooks/hotkeyRegistry.ts
|
|
3
3
|
var t = /* @__PURE__ */ new Set(), n = [], r = {
|
|
4
4
|
subscribe(e) {
|
|
5
5
|
return t.add(e), () => void t.delete(e);
|
|
@@ -28,5 +28,4 @@ var t = /* @__PURE__ */ new Set(), n = [], r = {
|
|
|
28
28
|
items: r.get(e)
|
|
29
29
|
}));
|
|
30
30
|
}, a = (t, n) => e(t).map((e) => e.toLowerCase()).filter(Boolean).map((e) => e === "mod" ? n ? "⌘" : "Ctrl" : e === "meta" || e === "cmd" ? n ? "⌘" : "Win" : e === "ctrl" ? "Ctrl" : e === "alt" ? n ? "⌥" : "Alt" : e === "shift" ? n ? "⇧" : "Shift" : e === "escape" || e === "esc" ? "Esc" : e === "arrowup" ? "↑" : e === "arrowdown" ? "↓" : e === "arrowleft" ? "←" : e === "arrowright" ? "→" : e === "enter" ? "Enter" : e === "space" ? "Espacio" : e.length === 1 ? e.toUpperCase() : e.charAt(0).toUpperCase() + e.slice(1));
|
|
31
|
-
//#endregion
|
|
32
31
|
export { i as groupHotkeys, a as hotkeyKeys, r as hotkeyRegistry };
|
package/dist/hooks/kapiRoot.js
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
import { docOf as e, rootNodeOf as t } from "./ownerDocument.js";
|
|
3
3
|
import { usePortalRootOverride as n } from "./portalRoot.js";
|
|
4
4
|
import { useEffect as r, useState as i } from "react";
|
|
5
|
-
|
|
5
|
+
// src/hooks/kapiRoot.ts
|
|
6
6
|
var a = ".kapi", o = "resolveKapiRoot: no hay ninguna raíz .kapi en el documento, así que los overlays (menús, diálogos, toasts) se montan en <body> sin los tokens del tema. Envuelve la app en <KapiShell> o <KapiRoot>.", s = !1, c = !1, l = (e) => {
|
|
7
7
|
s || c || (s = !0, setTimeout(() => {
|
|
8
|
-
s = !1,
|
|
8
|
+
s = !1, c || e.querySelector(".kapi") || (c = !0, console.warn(o));
|
|
9
9
|
}, 0));
|
|
10
10
|
}, u = (n) => {
|
|
11
11
|
let r = e(n);
|
|
@@ -18,5 +18,4 @@ var a = ".kapi", o = "resolveKapiRoot: no hay ninguna raíz .kapi en el document
|
|
|
18
18
|
let [t, a] = i(null), o = n();
|
|
19
19
|
return r(() => a(u(e?.current)), [e]), e ? t : o ?? t;
|
|
20
20
|
};
|
|
21
|
-
//#endregion
|
|
22
21
|
export { a as KAPI_ROOT_SELECTOR, u as resolveKapiRoot, d as useKapiRoot };
|
package/dist/hooks/mergeRefs.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { useMemo as e } from "react";
|
|
3
|
-
|
|
3
|
+
// src/hooks/mergeRefs.ts
|
|
4
4
|
var t = (...e) => (t) => {
|
|
5
5
|
let n = e.map((e) => {
|
|
6
6
|
if (typeof e == "function") {
|
|
@@ -11,5 +11,4 @@ var t = (...e) => (t) => {
|
|
|
11
11
|
});
|
|
12
12
|
return () => n.forEach((e) => e?.());
|
|
13
13
|
}, n = (...n) => e(() => t(...n), n);
|
|
14
|
-
//#endregion
|
|
15
14
|
export { t as mergeRefs, n as useMergedRefs };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/hooks/numberFormatLogic.ts
|
|
2
2
|
var e = /* @__PURE__ */ new Map(), t = (t) => {
|
|
3
3
|
let n = e.get(t);
|
|
4
4
|
return n || (n = new Intl.NumberFormat(t, { maximumFractionDigits: 0 }), e.set(t, n)), n;
|
|
@@ -6,5 +6,4 @@ var e = /* @__PURE__ */ new Map(), t = (t) => {
|
|
|
6
6
|
let t = r.get(e);
|
|
7
7
|
return t || (t = new Intl.NumberFormat(e, { maximumFractionDigits: 3 }), r.set(e, t)), t;
|
|
8
8
|
}, a = (e, t = "es") => Number.isFinite(e) ? i(t).format(e) : "";
|
|
9
|
-
//#endregion
|
|
10
9
|
export { n as formatCount, a as formatDataValue };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/hooks/onlineStatusLogic.ts
|
|
2
2
|
var e = Object.freeze({
|
|
3
3
|
online: !0,
|
|
4
4
|
since: null
|
|
@@ -24,5 +24,4 @@ var r = ({ target: e = typeof window > "u" ? null : window, read: n = () => t(),
|
|
|
24
24
|
}
|
|
25
25
|
};
|
|
26
26
|
};
|
|
27
|
-
//#endregion
|
|
28
27
|
export { e as SERVER_ONLINE_STATUS, r as createOnlineStore, t as readOnline };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/hooks/ownerDocument.ts
|
|
2
2
|
var e = (e) => e ? e.nodeType === 9 ? e : e.ownerDocument : typeof document > "u" ? null : document, t = (t) => {
|
|
3
3
|
let n = t ? e(t) : null;
|
|
4
4
|
return n ? n.defaultView : typeof window > "u" ? null : window;
|
|
@@ -20,5 +20,4 @@ var e = (e) => e ? e.nodeType === 9 ? e : e.ownerDocument : typeof document > "u
|
|
|
20
20
|
let r = e.target;
|
|
21
21
|
return !!r && typeof r.nodeType == "number" && t.contains(r);
|
|
22
22
|
}, o = (e) => (t(e) ?? window).getComputedStyle(e);
|
|
23
|
-
//#endregion
|
|
24
23
|
export { r as activeElementOf, i as activeHTMLElementOf, o as computedStyleOf, e as docOf, a as eventWithin, n as rootNodeOf, t as winOf };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/hooks/persistentStateLogic.ts
|
|
2
2
|
var e = (e, t) => JSON.stringify({
|
|
3
3
|
v: t,
|
|
4
4
|
data: e
|
|
@@ -13,5 +13,4 @@ var e = (e, t) => JSON.stringify({
|
|
|
13
13
|
return n;
|
|
14
14
|
}
|
|
15
15
|
};
|
|
16
|
-
//#endregion
|
|
17
16
|
export { t as parseStored, e as serializeStored };
|
package/dist/hooks/portalRoot.js
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { createContext as e, useContext as t } from "react";
|
|
3
3
|
import { jsx as n } from "react/jsx-runtime";
|
|
4
|
-
|
|
4
|
+
// src/hooks/portalRoot.tsx
|
|
5
5
|
var r = e(null), i = ({ root: e, children: t }) => /* @__PURE__ */ n(r.Provider, {
|
|
6
6
|
value: e,
|
|
7
7
|
children: t
|
|
8
8
|
}), a = () => t(r);
|
|
9
|
-
//#endregion
|
|
10
9
|
export { i as KapiPortalRootProvider, a as usePortalRootOverride };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/hooks/rafThrottle.ts
|
|
2
2
|
var e = () => typeof requestAnimationFrame == "function" ? {
|
|
3
3
|
request: (e) => requestAnimationFrame(e),
|
|
4
4
|
cancel: (e) => cancelAnimationFrame(e)
|
|
@@ -62,5 +62,4 @@ var e = () => typeof requestAnimationFrame == "function" ? {
|
|
|
62
62
|
e !== -1 && u.splice(e, 1);
|
|
63
63
|
};
|
|
64
64
|
};
|
|
65
|
-
//#endregion
|
|
66
65
|
export { o as onViewportChange, t as rafThrottle };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/hooks/rangeSelectLogic.ts
|
|
2
2
|
var e = (e, t, n) => {
|
|
3
3
|
let r = e.indexOf(t), i = e.indexOf(n);
|
|
4
4
|
return r === -1 || i === -1 ? [] : e.slice(Math.min(r, i), Math.max(r, i) + 1);
|
|
@@ -25,5 +25,4 @@ var e = (e, t, n) => {
|
|
|
25
25
|
let s = e(r, i, a);
|
|
26
26
|
return t(n, o ? s.filter(o) : s, !0);
|
|
27
27
|
};
|
|
28
|
-
//#endregion
|
|
29
28
|
export { t as applyRangeSelection, r as extendRange, e as rangeBetween, n as toggleWithRange };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/hooks/recentLogic.ts
|
|
2
2
|
var e = (e, t, n, r) => {
|
|
3
3
|
let i = e.filter((e) => e.id !== t.id);
|
|
4
4
|
return [{
|
|
@@ -6,5 +6,4 @@ var e = (e, t, n, r) => {
|
|
|
6
6
|
at: r
|
|
7
7
|
}, ...i].slice(0, Math.max(0, n));
|
|
8
8
|
}, t = (e, t) => e.filter((e) => e.id !== t);
|
|
9
|
-
//#endregion
|
|
10
9
|
export { e as addRecentEntry, t as removeRecentEntry };
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
1
|
+
import { KAPI_ROOT_SELECTOR as e } from "./kapiRoot.js";
|
|
2
|
+
import { docOf as t, winOf as n } from "./ownerDocument.js";
|
|
3
|
+
// src/hooks/reducedMotion.ts
|
|
4
4
|
var r = "(prefers-reduced-motion: reduce)", i = (e) => {
|
|
5
|
-
let
|
|
6
|
-
return
|
|
7
|
-
}, a = (
|
|
5
|
+
let t = n(e);
|
|
6
|
+
return t && typeof t.matchMedia == "function" ? (e) => t.matchMedia(e) : null;
|
|
7
|
+
}, a = (n, r = i(n)) => {
|
|
8
8
|
if (r?.("(prefers-reduced-motion: reduce)").matches) return !0;
|
|
9
|
-
let a =
|
|
10
|
-
return a ? (
|
|
9
|
+
let a = t(n);
|
|
10
|
+
return a ? (n ? n.closest(e) : a.querySelector(e))?.getAttribute("data-motion") === "reduced" : !1;
|
|
11
11
|
};
|
|
12
|
-
//#endregion
|
|
13
12
|
export { r as REDUCED_MOTION_QUERY, a as prefersReducedMotion };
|
package/dist/hooks/rightClick.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
1
|
+
import { placePopover as e } from "../components/overlays/popoverLogic.js";
|
|
2
|
+
import { computedStyleOf as t } from "./ownerDocument.js";
|
|
3
|
+
// src/hooks/rightClick.ts
|
|
4
4
|
var n = "button, a, input, select, textarea, label, [role=button], [data-no-drag]", r = (e, t) => Math.abs(e) + Math.abs(t) > 4, i = (e, t) => t > 0 && e - t < 450, a = {
|
|
5
5
|
side: "bottom",
|
|
6
6
|
align: "start",
|
|
7
7
|
offset: 0,
|
|
8
8
|
flip: !1,
|
|
9
9
|
shift: "both"
|
|
10
|
-
}, o = (
|
|
11
|
-
let { left: s, top: c } =
|
|
12
|
-
x:
|
|
10
|
+
}, o = (t, n, r, i, o = 8) => {
|
|
11
|
+
let { left: s, top: c } = e({
|
|
12
|
+
x: t,
|
|
13
13
|
y: n
|
|
14
14
|
}, r, i, {
|
|
15
15
|
...a,
|
|
@@ -19,11 +19,11 @@ var n = "button, a, input, select, textarea, label, [role=button], [data-no-drag
|
|
|
19
19
|
left: s,
|
|
20
20
|
top: c
|
|
21
21
|
};
|
|
22
|
-
}, s = (
|
|
23
|
-
let n = e
|
|
22
|
+
}, s = (e) => {
|
|
23
|
+
let n = t(e);
|
|
24
24
|
return {
|
|
25
|
-
x: /(auto|scroll)/.test(n.overflowX) &&
|
|
26
|
-
y: /(auto|scroll)/.test(n.overflowY) &&
|
|
25
|
+
x: /(auto|scroll)/.test(n.overflowX) && e.scrollWidth > e.clientWidth,
|
|
26
|
+
y: /(auto|scroll)/.test(n.overflowY) && e.scrollHeight > e.clientHeight
|
|
27
27
|
};
|
|
28
28
|
}, c = (e) => {
|
|
29
29
|
for (let t = e; t && t !== document.body; t = t.parentElement) {
|
|
@@ -33,5 +33,4 @@ var n = "button, a, input, select, textarea, label, [role=button], [data-no-drag
|
|
|
33
33
|
}
|
|
34
34
|
return null;
|
|
35
35
|
}, l = (e) => e instanceof Element && e.closest("button, a, input, select, textarea, label, [role=button], [data-no-drag]") !== null, u = (e, t) => (e || t) !== "touch";
|
|
36
|
-
//#endregion
|
|
37
36
|
export { n as INTERACTIVE_SELECTOR, a as POINT_MENU_PLACEMENT, o as clampMenuPosition, r as exceedsDragThreshold, c as findScrollableAncestor, i as isDoubleRightClick, l as isInteractiveTarget, s as scrollableAxes, u as shouldInterceptContextMenu };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/hooks/scrollEdgesLogic.ts
|
|
2
2
|
var e = 1, t = .85, n = ({ clientSize: e, scrollSize: t }) => Math.max(0, t - e), r = (e, t = 1) => {
|
|
3
3
|
let r = n(e);
|
|
4
4
|
return r <= t ? {
|
|
@@ -15,5 +15,4 @@ var e = 1, t = .85, n = ({ clientSize: e, scrollSize: t }) => Math.max(0, t - e)
|
|
|
15
15
|
let i = n(e), a = 0;
|
|
16
16
|
return t.start < r ? a = t.start - r : t.end > e.clientSize - r && (a = Math.min(t.end - (e.clientSize - r), t.start - r)), Math.min(i, Math.max(0, e.position + a));
|
|
17
17
|
};
|
|
18
|
-
//#endregion
|
|
19
18
|
export { t as DEFAULT_PAGE_FRACTION, e as DEFAULT_SCROLL_EDGE_TOLERANCE, n as maxScroll, a as pageSize, o as pageTarget, s as revealTarget, i as sameScrollEdges, r as scrollEdges };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { useRef as e } from "react";
|
|
3
|
-
|
|
3
|
+
// src/hooks/shallowStable.ts
|
|
4
4
|
var t = (e, t) => {
|
|
5
5
|
if (Object.is(e, t)) return !0;
|
|
6
6
|
if (typeof e != "object" || typeof t != "object" || e === null || t === null) return !1;
|
|
@@ -13,5 +13,4 @@ var t = (e, t) => {
|
|
|
13
13
|
let r = e(n);
|
|
14
14
|
return t(r.current, n) || (r.current = n), r.current;
|
|
15
15
|
};
|
|
16
|
-
//#endregion
|
|
17
16
|
export { t as shallowEqual, n as useShallowStable };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/hooks/slidingIndicatorLogic.ts
|
|
2
2
|
var e = (e, t, n = {
|
|
3
3
|
left: 0,
|
|
4
4
|
top: 0
|
|
@@ -11,5 +11,4 @@ var e = (e, t, n = {
|
|
|
11
11
|
width: Math.round(e.width),
|
|
12
12
|
height: Math.round(e.height)
|
|
13
13
|
});
|
|
14
|
-
//#endregion
|
|
15
14
|
export { e as slidingIndicatorBox };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/hooks/storageLogic.ts
|
|
2
2
|
var e = "kapi", t = (e, t) => `${e || "kapi"}:${t}`, n = () => {
|
|
3
3
|
try {
|
|
4
4
|
return typeof localStorage > "u" ? null : localStorage;
|
|
@@ -20,5 +20,4 @@ var e = "kapi", t = (e, t) => `${e || "kapi"}:${t}`, n = () => {
|
|
|
20
20
|
return null;
|
|
21
21
|
}
|
|
22
22
|
};
|
|
23
|
-
//#endregion
|
|
24
23
|
export { e as DEFAULT_STORAGE_NAMESPACE, n as defaultStorage, r as migrateLegacy, i as readWithLegacy, t as storageKey };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/hooks/themeColorsLogic.ts
|
|
2
2
|
var e = [
|
|
3
3
|
"bg",
|
|
4
4
|
"card",
|
|
@@ -36,5 +36,4 @@ var e = [
|
|
|
36
36
|
}
|
|
37
37
|
return n;
|
|
38
38
|
};
|
|
39
|
-
//#endregion
|
|
40
39
|
export { t as NO_THEME_COLORS, s as mergeThemeColors, r as parseStoredThemeColors, a as resolveBrandRadii, o as resolveBrandTheme, n as sanitizeThemeColors, i as serializeThemeColors };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { contrastRatio as e, parseColor as t } from "./colorLogic.js";
|
|
2
|
-
|
|
2
|
+
// src/hooks/themeContrastLogic.ts
|
|
3
3
|
var n = 4.5, r = [
|
|
4
4
|
"--kapi-bg",
|
|
5
5
|
"--kapi-card",
|
|
@@ -43,5 +43,4 @@ var n = 4.5, r = [
|
|
|
43
43
|
}
|
|
44
44
|
return s.sort((e, t) => e.ratio - t.ratio);
|
|
45
45
|
};
|
|
46
|
-
//#endregion
|
|
47
46
|
export { s as checkThemeContrast };
|
|
@@ -142,5 +142,4 @@ var a = /^\d+(\.\d+)?px$/, o = /^\d+(\.\d+)?(px|%)$/, s = {
|
|
|
142
142
|
i && (s[`--kapi-series-${n + 1}`] = t(i));
|
|
143
143
|
}), s;
|
|
144
144
|
};
|
|
145
|
-
//#endregion
|
|
146
145
|
export { a as RADIUS_PX_PATTERN, o as RADIUS_SHAPE_PATTERN, x as baseSurfaces, S as deriveStateRamp, T as deriveTheme };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { RADIUS_PX_PATTERN as e, RADIUS_SHAPE_PATTERN as t } from "./themeDeriveLogic.js";
|
|
2
|
-
|
|
2
|
+
// src/hooks/themeRadiiLogic.ts
|
|
3
3
|
var n = {
|
|
4
4
|
control: e,
|
|
5
5
|
box: e,
|
|
@@ -28,5 +28,4 @@ var n = {
|
|
|
28
28
|
}
|
|
29
29
|
return t;
|
|
30
30
|
};
|
|
31
|
-
//#endregion
|
|
32
31
|
export { r as NO_THEME_RADII, s as mergeThemeRadii, a as parseStoredThemeRadii, i as sanitizeThemeRadii, o as serializeThemeRadii };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import "./storageLogic.js";
|
|
2
|
-
|
|
2
|
+
// src/hooks/themeScript.ts
|
|
3
3
|
var e = (e) => JSON.stringify(e).replace(/</g, "\\u003c").replace(/\u2028/g, "\\u2028").replace(/\u2029/g, "\\u2029"), t = ({ namespace: t } = {}) => "(function(){try{var d=document,s=window.localStorage,n=" + e(t || "kapi") + ",q=\".kapi[data-theme]\",g=function(k,l){var v=s.getItem(n+\":\"+k);return v===null?s.getItem(l):v},p=g(\"theme\",\"v2_theme\"),m=g(\"motion\",\"v2_motion\"),t=p===\"dark\"||(p===\"system\"&&window.matchMedia&&matchMedia(\"(prefers-color-scheme: dark)\").matches)?\"dark\":\"light\",a=function(e){e.setAttribute(\"data-theme\",t);if(m===\"reduced\")e.setAttribute(\"data-motion\",\"reduced\")},w=function(e){if(e.nodeType!==1)return;if(e.matches(q))a(e);var r=e.querySelectorAll(q);for(var i=0;i<r.length;i++)a(r[i])};w(d.documentElement);if(d.readyState!==\"loading\"||!window.MutationObserver)return;var o=new MutationObserver(function(l){for(var i=0;i<l.length;i++)for(var j=0;j<l[i].addedNodes.length;j++)w(l[i].addedNodes[j])});o.observe(d.documentElement,{childList:true,subtree:true});d.addEventListener(\"DOMContentLoaded\",function(){o.disconnect()})}catch(e){}})();";
|
|
4
|
-
//#endregion
|
|
5
4
|
export { t as kapiThemeScript };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { contrastRatio as e, formatHex as t, mixColors as n, parseColor as r } from "./colorLogic.js";
|
|
2
2
|
import { checkThemeContrast as i } from "./themeContrastLogic.js";
|
|
3
3
|
import { baseSurfaces as a, deriveStateRamp as o } from "./themeDeriveLogic.js";
|
|
4
|
-
|
|
4
|
+
// src/hooks/toneFamilyLogic.ts
|
|
5
5
|
var s = (e) => e, c = /* @__PURE__ */ new Set([
|
|
6
6
|
"neutral",
|
|
7
7
|
"primary",
|
|
@@ -160,5 +160,4 @@ var s = (e) => e, c = /* @__PURE__ */ new Set([
|
|
|
160
160
|
}
|
|
161
161
|
return s.sort((e, t) => e.ratio - t.ratio);
|
|
162
162
|
};
|
|
163
|
-
//#endregion
|
|
164
163
|
export { c as RESERVED_TONE_NAMES, l as TONE_FAMILY_NAME_PATTERN, m as TONE_FAMILY_PREFIX, E as checkToneFamilyContrast, s as defineToneFamilies, x as resolveToneFamilies, C as resolveToneLook, S as toneFamilyStyle };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/hooks/unsavedGuardLogic.ts
|
|
2
2
|
var e = (e) => {
|
|
3
3
|
let t = null, n = null;
|
|
4
4
|
return {
|
|
@@ -13,5 +13,4 @@ var e = (e) => {
|
|
|
13
13
|
isPending: () => t !== null
|
|
14
14
|
};
|
|
15
15
|
};
|
|
16
|
-
//#endregion
|
|
17
16
|
export { e as createLeaveGate };
|