@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,16 +1,16 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { actColClass as e, bodyCell as t } from "./tableCells.js";
|
|
3
|
+
import { isRowActivationKey as n, mergeRowProps as r, shouldFireRowClick as i } from "./rowClickLogic.js";
|
|
4
|
+
import { winOf as a } from "../../hooks/ownerDocument.js";
|
|
5
5
|
import { rowColSpans as o } from "./tableSpanLogic.js";
|
|
6
6
|
import { memo as s } from "react";
|
|
7
7
|
import { Fragment as c, jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
8
8
|
import { ChevronDown as d, ChevronRight as f, MoreHorizontal as p } from "lucide-react";
|
|
9
|
-
|
|
9
|
+
// src/components/data/KapiTableRow.tsx
|
|
10
10
|
var m = "button, a, input, select, textarea, label, [role=button]";
|
|
11
11
|
function h({ row: s, id: h, index: g, selected: _, selectLabel: v, open: y, canSelect: b, clickSelect: x, clickable: S, getRowProps: C, rangeSelect: w, selectable: T, expandable: E, rowHeight: D, virtualIndex: O, columns: k, layout: A, widths: j, text: M, hasActions: N, actions: P, hasRowMenu: F, renderSubComponent: I, colSpan: L, handlers: R }) {
|
|
12
|
-
let z = x && !S, B = k.some((e) => e.colSpan) ? o(k, s) : void 0, V = S ? (
|
|
13
|
-
|
|
12
|
+
let z = x && !S, B = k.some((e) => e.colSpan) ? o(k, s) : void 0, V = S ? (e) => {
|
|
13
|
+
i(e.target, e.currentTarget, a(e.currentTarget)?.getSelection() ?? null) && R.rowClick(s, e);
|
|
14
14
|
} : z ? (e) => {
|
|
15
15
|
e.target.closest(m) || R.activate(h, e.shiftKey);
|
|
16
16
|
} : void 0, H = S ? (e) => {
|
|
@@ -19,13 +19,13 @@ function h({ row: s, id: h, index: g, selected: _, selectLabel: v, open: y, canS
|
|
|
19
19
|
target: e.target,
|
|
20
20
|
currentTarget: e.currentTarget
|
|
21
21
|
};
|
|
22
|
-
|
|
22
|
+
n({
|
|
23
23
|
...t,
|
|
24
24
|
isComposing: e.nativeEvent.isComposing
|
|
25
25
|
}) && (e.preventDefault(), R.rowClick(s, e));
|
|
26
26
|
} : void 0, U = z ? (e) => {
|
|
27
27
|
w && e.shiftKey && e.preventDefault();
|
|
28
|
-
} : void 0, W =
|
|
28
|
+
} : void 0, W = r(C?.(s, g), {
|
|
29
29
|
className: `${_ ? "is-selected" : ""}${z ? " is-rowsel" : ""}${S ? " is-clickable" : ""}`.trim(),
|
|
30
30
|
style: D === void 0 ? void 0 : { height: D },
|
|
31
31
|
tabIndex: S ? 0 : void 0,
|
|
@@ -72,9 +72,9 @@ function h({ row: s, id: h, index: g, selected: _, selectLabel: v, open: y, canS
|
|
|
72
72
|
})
|
|
73
73
|
})
|
|
74
74
|
}),
|
|
75
|
-
k.map((e,
|
|
75
|
+
k.map((e, n) => B?.[n] === 0 ? null : t(e, n, s, A, j, M, R.copy, B?.[n])),
|
|
76
76
|
N && /* @__PURE__ */ l("td", {
|
|
77
|
-
className:
|
|
77
|
+
className: e(A),
|
|
78
78
|
children: /* @__PURE__ */ u("div", {
|
|
79
79
|
className: "kapi-actcol__in",
|
|
80
80
|
children: [P ? P(s) : null, F && /* @__PURE__ */ l("button", {
|
|
@@ -100,5 +100,4 @@ function h({ row: s, id: h, index: g, selected: _, selectLabel: v, open: y, canS
|
|
|
100
100
|
})] });
|
|
101
101
|
}
|
|
102
102
|
var g = s(h);
|
|
103
|
-
//#endregion
|
|
104
103
|
export { g as TableRow };
|
|
@@ -1,58 +1,58 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { usePlacement as e } from "../../hooks/usePlacement.js";
|
|
3
|
+
import { useDismiss as t } from "../../hooks/useDismiss.js";
|
|
4
|
+
import { useFocusReturn as n } from "../../hooks/useFocusReturn.js";
|
|
5
5
|
import { placementViewport as r } from "../../hooks/viewportInsetLogic.js";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import { useEffect as
|
|
15
|
-
import { Fragment as
|
|
16
|
-
import { ChevronDown as
|
|
17
|
-
|
|
18
|
-
var
|
|
19
|
-
function
|
|
20
|
-
let [V, H] =
|
|
6
|
+
import { KapiChecklist as i } from "../inputs/KapiChecklist.js";
|
|
7
|
+
import { KapiInput as a } from "../inputs/KapiInput.js";
|
|
8
|
+
import { KapiContextMenu as o } from "../overlays/KapiContextMenu.js";
|
|
9
|
+
import { KapiTableFilter as s } from "./KapiTableFilter.js";
|
|
10
|
+
import { resolveMenuItemTone as c } from "../tone.js";
|
|
11
|
+
import { COLUMNS_PANEL_ESTIMATE as l, COLUMNS_PANEL_PLACEMENT as u, columnsPanelMaxHeight as d, csvHeaderOf as f, setSidePins as p, visibleColumnsOf as m } from "./tableLogic.js";
|
|
12
|
+
import { slot as ee } from "../slotsLogic.js";
|
|
13
|
+
import { TABLE_SLOTS as te } from "./tableSlots.js";
|
|
14
|
+
import { useEffect as ne, useLayoutEffect as re, useRef as h, useState as g } from "react";
|
|
15
|
+
import { Fragment as _, jsx as v, jsxs as y } from "react/jsx-runtime";
|
|
16
|
+
import { ChevronDown as b, Columns3 as x, Download as S, Loader2 as C, RefreshCw as w, Search as T } from "lucide-react";
|
|
17
|
+
// src/components/data/KapiTableToolbar.tsx
|
|
18
|
+
var E = (e) => e != null && typeof e != "boolean";
|
|
19
|
+
function D({ text: o, filterable: c, filter: D, onFilterChange: ae, visibleColumns: oe, manualFilter: O, filterDebounce: se, shownCount: ce, totalCount: le, content: k, toolbarActions: A, isPending: ue, context: de, onRun: fe, refresh: j, refreshing: M, onExportCsv: N, columns: P, columnToggle: F, columnPinning: I, visibility: L, onShownColumnsChange: R, pinned: z, onPinnedChange: B, classNames: pe }) {
|
|
20
|
+
let [V, H] = g(!1), [U, W] = g(""), G = h(null), K = h(null), q = h(null), { restore: me } = n(V, {
|
|
21
21
|
container: K,
|
|
22
22
|
target: G
|
|
23
23
|
}), J = (e) => {
|
|
24
24
|
H(!1), W(""), e && me();
|
|
25
|
-
}, he =
|
|
25
|
+
}, he = t(V, {
|
|
26
26
|
zones: [q],
|
|
27
27
|
outside: !1,
|
|
28
28
|
onDismiss: () => J(!0)
|
|
29
|
-
}), { placement: Y } =
|
|
29
|
+
}), { placement: Y } = e({
|
|
30
30
|
open: V,
|
|
31
31
|
anchor: G,
|
|
32
32
|
floatingRef: K,
|
|
33
33
|
measure: !1,
|
|
34
|
-
estimate:
|
|
35
|
-
...
|
|
34
|
+
estimate: l,
|
|
35
|
+
...u,
|
|
36
36
|
hideUntilPlaced: !1
|
|
37
|
-
}), ge = Y?.side === "top" ? "top" : "bottom", [_e, ve] =
|
|
38
|
-
|
|
37
|
+
}), ge = Y?.side === "top" ? "top" : "bottom", [_e, ve] = g(560);
|
|
38
|
+
re(() => {
|
|
39
39
|
let e = Y?.side, t = e ? G.current?.getBoundingClientRect() : void 0;
|
|
40
|
-
e && t && ve(
|
|
40
|
+
e && t && ve(d(e, t, r(G.current).height));
|
|
41
41
|
}, [Y]);
|
|
42
42
|
let ye = () => H(!0);
|
|
43
|
-
|
|
43
|
+
ne(() => {
|
|
44
44
|
V && K.current?.querySelector("input, [role=\"listbox\"]")?.focus();
|
|
45
45
|
}, [V]);
|
|
46
46
|
let X = P.filter((e) => e.hideable !== !1), Z = P.length > 6, Q = (e) => ({
|
|
47
47
|
id: e.key,
|
|
48
48
|
label: e.label,
|
|
49
|
-
text:
|
|
49
|
+
text: f(e)
|
|
50
50
|
}), $ = F && X.length > 0 || I, be = (A?.length ?? 0) > 0;
|
|
51
|
-
return !
|
|
52
|
-
...
|
|
51
|
+
return !c && !E(k) && !be && !j && !N && !$ ? null : /* @__PURE__ */ y("div", {
|
|
52
|
+
...ee(te, "toolbar", pe),
|
|
53
53
|
children: [
|
|
54
|
-
|
|
55
|
-
value:
|
|
54
|
+
c && /* @__PURE__ */ v(s, {
|
|
55
|
+
value: D,
|
|
56
56
|
onChange: ae,
|
|
57
57
|
columns: oe,
|
|
58
58
|
count: O ? void 0 : {
|
|
@@ -60,50 +60,50 @@ function E({ text: e, filterable: p, filter: E, onFilterChange: ae, visibleColum
|
|
|
60
60
|
total: le
|
|
61
61
|
},
|
|
62
62
|
loadDelay: O ? se : 0,
|
|
63
|
-
labels:
|
|
63
|
+
labels: o
|
|
64
64
|
}),
|
|
65
65
|
k,
|
|
66
|
-
A?.map((e) => /* @__PURE__ */
|
|
66
|
+
A?.map((e) => /* @__PURE__ */ v(ie, {
|
|
67
67
|
action: e,
|
|
68
68
|
busy: ue(e.id),
|
|
69
69
|
disabled: typeof e.disabled == "function" ? e.disabled(de()) : e.disabled === !0,
|
|
70
70
|
onRun: (t) => fe(e.id, t)
|
|
71
71
|
}, e.id)),
|
|
72
|
-
j && /* @__PURE__ */
|
|
72
|
+
j && /* @__PURE__ */ y("button", {
|
|
73
73
|
type: "button",
|
|
74
74
|
className: "kapi-filterchip kapi-tabletools__chip--icon",
|
|
75
75
|
"aria-busy": M || void 0,
|
|
76
76
|
onClick: j,
|
|
77
|
-
children: [M ? /* @__PURE__ */
|
|
77
|
+
children: [M ? /* @__PURE__ */ v(C, {
|
|
78
78
|
size: 14,
|
|
79
79
|
strokeWidth: 2.2,
|
|
80
80
|
className: "kapi-table-spin",
|
|
81
81
|
"aria-hidden": !0
|
|
82
|
-
}) : /* @__PURE__ */
|
|
82
|
+
}) : /* @__PURE__ */ v(w, {
|
|
83
83
|
size: 14,
|
|
84
84
|
strokeWidth: 2.2
|
|
85
|
-
}), /* @__PURE__ */
|
|
85
|
+
}), /* @__PURE__ */ v("span", {
|
|
86
86
|
className: "kapi-strong kapi-tabletools__label",
|
|
87
|
-
children:
|
|
87
|
+
children: o.refresh
|
|
88
88
|
})]
|
|
89
89
|
}),
|
|
90
|
-
N && /* @__PURE__ */
|
|
90
|
+
N && /* @__PURE__ */ y("button", {
|
|
91
91
|
type: "button",
|
|
92
92
|
className: "kapi-filterchip kapi-tabletools__chip--icon",
|
|
93
93
|
onClick: N,
|
|
94
|
-
children: [/* @__PURE__ */
|
|
94
|
+
children: [/* @__PURE__ */ v(S, {
|
|
95
95
|
size: 14,
|
|
96
96
|
strokeWidth: 2.2
|
|
97
|
-
}), /* @__PURE__ */
|
|
97
|
+
}), /* @__PURE__ */ v("span", {
|
|
98
98
|
className: "kapi-strong kapi-tabletools__label",
|
|
99
|
-
children:
|
|
99
|
+
children: o.exportCsv
|
|
100
100
|
})]
|
|
101
101
|
}),
|
|
102
|
-
$ && /* @__PURE__ */
|
|
102
|
+
$ && /* @__PURE__ */ y("div", {
|
|
103
103
|
ref: q,
|
|
104
104
|
className: "kapi-dropdown",
|
|
105
105
|
onKeyDown: he,
|
|
106
|
-
children: [/* @__PURE__ */
|
|
106
|
+
children: [/* @__PURE__ */ y("button", {
|
|
107
107
|
ref: G,
|
|
108
108
|
type: "button",
|
|
109
109
|
className: "kapi-filterchip kapi-tabletools__chip--icon",
|
|
@@ -111,38 +111,38 @@ function E({ text: e, filterable: p, filter: E, onFilterChange: ae, visibleColum
|
|
|
111
111
|
"aria-haspopup": "dialog",
|
|
112
112
|
"aria-expanded": V,
|
|
113
113
|
children: [
|
|
114
|
-
/* @__PURE__ */
|
|
114
|
+
/* @__PURE__ */ v(x, {
|
|
115
115
|
size: 14,
|
|
116
116
|
strokeWidth: 2.2
|
|
117
117
|
}),
|
|
118
|
-
/* @__PURE__ */
|
|
118
|
+
/* @__PURE__ */ v("span", {
|
|
119
119
|
className: "kapi-strong kapi-tabletools__label",
|
|
120
|
-
children:
|
|
120
|
+
children: o.columns
|
|
121
121
|
}),
|
|
122
|
-
/* @__PURE__ */
|
|
122
|
+
/* @__PURE__ */ v(b, {
|
|
123
123
|
size: 14,
|
|
124
124
|
strokeWidth: 2.2,
|
|
125
125
|
color: "var(--kapi-muted-2)",
|
|
126
126
|
className: "kapi-tabletools__chevron"
|
|
127
127
|
})
|
|
128
128
|
]
|
|
129
|
-
}), V && /* @__PURE__ */
|
|
129
|
+
}), V && /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ v("div", {
|
|
130
130
|
className: "kapi-dropdown__backdrop",
|
|
131
131
|
onClick: () => J(!1)
|
|
132
|
-
}), /* @__PURE__ */
|
|
132
|
+
}), /* @__PURE__ */ y("div", {
|
|
133
133
|
ref: K,
|
|
134
134
|
className: `kapi-menu kapi-dropdown__menu kapi-dropdown__menu--${ge === "top" ? "up" : "down"} kapi-tabletools__menu kapi-tabletools__columns`,
|
|
135
135
|
style: { maxHeight: _e },
|
|
136
136
|
role: "dialog",
|
|
137
|
-
"aria-label":
|
|
137
|
+
"aria-label": o.columns,
|
|
138
138
|
children: [
|
|
139
|
-
Z && /* @__PURE__ */
|
|
139
|
+
Z && /* @__PURE__ */ v(a, {
|
|
140
140
|
type: "search",
|
|
141
141
|
className: "kapi-tabletools__colsearch",
|
|
142
|
-
"aria-label":
|
|
143
|
-
placeholder:
|
|
142
|
+
"aria-label": o.searchColumns,
|
|
143
|
+
placeholder: o.searchColumns,
|
|
144
144
|
spellCheck: !1,
|
|
145
|
-
startIcon: /* @__PURE__ */
|
|
145
|
+
startIcon: /* @__PURE__ */ v(T, {}),
|
|
146
146
|
clearable: !0,
|
|
147
147
|
value: U,
|
|
148
148
|
onChange: (e) => W(e.target.value),
|
|
@@ -150,90 +150,89 @@ function E({ text: e, filterable: p, filter: E, onFilterChange: ae, visibleColum
|
|
|
150
150
|
(e.key === "ArrowDown" || e.key === "Enter") && (e.preventDefault(), K.current?.querySelector("[role=\"listbox\"]")?.focus());
|
|
151
151
|
}
|
|
152
152
|
}),
|
|
153
|
-
F && /* @__PURE__ */
|
|
153
|
+
F && /* @__PURE__ */ v(i, {
|
|
154
154
|
items: X.map(Q),
|
|
155
155
|
value: X.filter((e) => L[e.key] !== !1).map((e) => e.key),
|
|
156
156
|
onChange: R,
|
|
157
157
|
query: U,
|
|
158
158
|
searchable: !1,
|
|
159
|
-
...I ? { label:
|
|
159
|
+
...I ? { label: o.showColumns } : { "aria-label": o.columns }
|
|
160
160
|
}),
|
|
161
|
-
I && ["left", "right"].map((
|
|
162
|
-
label:
|
|
163
|
-
items:
|
|
164
|
-
value: z[
|
|
165
|
-
onChange: (
|
|
161
|
+
I && ["left", "right"].map((e) => /* @__PURE__ */ v(i, {
|
|
162
|
+
label: e === "left" ? o.pinColumns : o.pinColumnsRight,
|
|
163
|
+
items: m(P, L).map(Q),
|
|
164
|
+
value: z[e],
|
|
165
|
+
onChange: (t) => B(p(z, e, t)),
|
|
166
166
|
query: U,
|
|
167
167
|
searchable: !1
|
|
168
|
-
},
|
|
168
|
+
}, e))
|
|
169
169
|
]
|
|
170
170
|
})] })]
|
|
171
171
|
})
|
|
172
172
|
]
|
|
173
173
|
});
|
|
174
174
|
}
|
|
175
|
-
function
|
|
176
|
-
let [
|
|
175
|
+
function ie({ action: e, busy: t, disabled: n, onRun: r }) {
|
|
176
|
+
let [i, a] = g(null), s = t ? /* @__PURE__ */ v(C, {
|
|
177
177
|
size: 14,
|
|
178
178
|
strokeWidth: 2.2,
|
|
179
179
|
className: "kapi-table-spin",
|
|
180
180
|
"aria-hidden": !0
|
|
181
|
-
}) :
|
|
182
|
-
if (
|
|
181
|
+
}) : e.icon, { items: l, onAction: u } = e, d = e.icon === void 0 ? "kapi-filterchip" : "kapi-filterchip kapi-tabletools__chip--icon";
|
|
182
|
+
if (l === void 0) return /* @__PURE__ */ y("button", {
|
|
183
183
|
type: "button",
|
|
184
|
-
className:
|
|
185
|
-
disabled:
|
|
186
|
-
"aria-busy":
|
|
184
|
+
className: d,
|
|
185
|
+
disabled: n,
|
|
186
|
+
"aria-busy": t || void 0,
|
|
187
187
|
onClick: () => {
|
|
188
|
-
|
|
188
|
+
u && r(u);
|
|
189
189
|
},
|
|
190
|
-
children: [s, /* @__PURE__ */
|
|
190
|
+
children: [s, /* @__PURE__ */ v("span", {
|
|
191
191
|
className: "kapi-strong kapi-tabletools__label",
|
|
192
|
-
children:
|
|
192
|
+
children: e.label
|
|
193
193
|
})]
|
|
194
194
|
});
|
|
195
|
-
let
|
|
196
|
-
label:
|
|
197
|
-
...
|
|
198
|
-
...e
|
|
199
|
-
disabled:
|
|
200
|
-
onClick: () =>
|
|
195
|
+
let f = l.map((e) => "sep" in e || "header" in e ? e : {
|
|
196
|
+
label: e.label,
|
|
197
|
+
...e.icon !== void 0 && { icon: e.icon },
|
|
198
|
+
...c(e.tone, e.danger) === "danger" && { tone: "danger" },
|
|
199
|
+
disabled: t || e.disabled === !0,
|
|
200
|
+
onClick: () => r(e.onAction)
|
|
201
201
|
});
|
|
202
|
-
return /* @__PURE__ */
|
|
202
|
+
return /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ y("button", {
|
|
203
203
|
type: "button",
|
|
204
|
-
className:
|
|
205
|
-
disabled:
|
|
206
|
-
"aria-busy":
|
|
204
|
+
className: d,
|
|
205
|
+
disabled: n,
|
|
206
|
+
"aria-busy": t || void 0,
|
|
207
207
|
"aria-haspopup": "menu",
|
|
208
|
-
"aria-expanded":
|
|
208
|
+
"aria-expanded": i !== null,
|
|
209
209
|
onClick: (e) => {
|
|
210
210
|
let t = e.currentTarget.getBoundingClientRect();
|
|
211
|
-
|
|
211
|
+
a(i ? null : {
|
|
212
212
|
x: t.left,
|
|
213
213
|
y: t.bottom + 4
|
|
214
214
|
});
|
|
215
215
|
},
|
|
216
216
|
children: [
|
|
217
217
|
s,
|
|
218
|
-
/* @__PURE__ */
|
|
218
|
+
/* @__PURE__ */ v("span", {
|
|
219
219
|
className: "kapi-strong kapi-tabletools__label",
|
|
220
|
-
children:
|
|
220
|
+
children: e.label
|
|
221
221
|
}),
|
|
222
|
-
/* @__PURE__ */
|
|
222
|
+
/* @__PURE__ */ v(b, {
|
|
223
223
|
size: 14,
|
|
224
224
|
strokeWidth: 2.2,
|
|
225
225
|
color: "var(--kapi-muted-2)",
|
|
226
226
|
className: "kapi-tabletools__chevron"
|
|
227
227
|
})
|
|
228
228
|
]
|
|
229
|
-
}),
|
|
229
|
+
}), i && /* @__PURE__ */ v(o, {
|
|
230
230
|
open: !0,
|
|
231
|
-
x:
|
|
232
|
-
y:
|
|
233
|
-
items:
|
|
234
|
-
"aria-label":
|
|
235
|
-
onClose: () =>
|
|
231
|
+
x: i.x,
|
|
232
|
+
y: i.y,
|
|
233
|
+
items: f,
|
|
234
|
+
"aria-label": e.label,
|
|
235
|
+
onClose: () => a(null)
|
|
236
236
|
})] });
|
|
237
237
|
}
|
|
238
|
-
|
|
239
|
-
export { E as KapiTableToolbar };
|
|
238
|
+
export { D as KapiTableToolbar };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/components/data/barChartLogic.ts
|
|
2
2
|
var e = [
|
|
3
3
|
1,
|
|
4
4
|
2,
|
|
@@ -49,5 +49,4 @@ var e = [
|
|
|
49
49
|
return r === 0 ? e - t : n === "desc" ? r : -r;
|
|
50
50
|
});
|
|
51
51
|
};
|
|
52
|
-
//#endregion
|
|
53
52
|
export { a as DIRECT_LABEL_MAX_BARS, c as barCategoryOrder, r as barHeight, n as barScale, s as barStackTotals, i as barTickLabel, o as barValueLabelPredicate };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
2
|
+
import { useControllableState as e } from "../../hooks/useControllableState.js";
|
|
3
|
+
import { useKapiFormatLocale as t, useLabels as n } from "../locale/KapiLocaleProvider.js";
|
|
4
|
+
import { KapiSegmented as r } from "../inputs/KapiSegmented.js";
|
|
5
|
+
import { formatDataValue as i } from "../../hooks/numberFormatLogic.js";
|
|
6
6
|
import { useId as a } from "react";
|
|
7
7
|
import { Fragment as o, jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
8
|
-
|
|
8
|
+
// src/components/data/chartFrame.tsx
|
|
9
9
|
var l = {
|
|
10
10
|
chartView: "Gráfico",
|
|
11
11
|
tableView: "Tabla",
|
|
@@ -16,8 +16,8 @@ var l = {
|
|
|
16
16
|
kindBars: "Gráfico de barras",
|
|
17
17
|
kindStackedBars: "Gráfico de barras apiladas",
|
|
18
18
|
kindLine: "Gráfico de líneas"
|
|
19
|
-
}, u = (e, t, n, r) => `${e}. ${t.summary.replace("{series}", String(n)).replace("{categories}", String(r))}`, d = (e, t) => t ? t(e) : e, f = (e) =>
|
|
20
|
-
let [i, a] =
|
|
19
|
+
}, u = (e, t, n, r) => `${e}. ${t.summary.replace("{series}", String(n)).replace("{categories}", String(r))}`, d = (e, t) => t ? t(e) : e, f = (e) => n("chart", l, e), p = (t, n, r) => {
|
|
20
|
+
let [i, a] = e(t, n, r);
|
|
21
21
|
return {
|
|
22
22
|
current: i,
|
|
23
23
|
setView: a
|
|
@@ -29,15 +29,15 @@ var l = {
|
|
|
29
29
|
}), h = ({ block: e, slot: t }) => /* @__PURE__ */ s("span", {
|
|
30
30
|
className: `${e}__swatch`,
|
|
31
31
|
style: m({ slot: t })
|
|
32
|
-
}), g = ({ title:
|
|
33
|
-
let b =
|
|
32
|
+
}), g = ({ title: e, titleId: n, series: a, categories: l, valueAt: u, tableRows: f, unit: p, view: m, onViewChange: g, text: _, block: v, children: y }) => {
|
|
33
|
+
let b = t(), x = a.length === 0 || l.length === 0;
|
|
34
34
|
return /* @__PURE__ */ c(o, { children: [/* @__PURE__ */ c("div", {
|
|
35
35
|
className: `${v}__head`,
|
|
36
|
-
children: [
|
|
36
|
+
children: [e ? /* @__PURE__ */ s("div", {
|
|
37
37
|
className: `${v}__title`,
|
|
38
38
|
id: n,
|
|
39
|
-
children:
|
|
40
|
-
}) : null, /* @__PURE__ */ s(
|
|
39
|
+
children: e
|
|
40
|
+
}) : null, /* @__PURE__ */ s(r, {
|
|
41
41
|
"aria-label": _.view,
|
|
42
42
|
items: [{
|
|
43
43
|
id: "chart",
|
|
@@ -80,7 +80,7 @@ var l = {
|
|
|
80
80
|
slot: t
|
|
81
81
|
}), e.label]
|
|
82
82
|
})
|
|
83
|
-
}), l.map((e, n) => /* @__PURE__ */ s("td", { children: d(
|
|
83
|
+
}), l.map((e, n) => /* @__PURE__ */ s("td", { children: d(i(u(t, n), b), p) }, `${e}-${n}`))] }, e.id)) })]
|
|
84
84
|
})
|
|
85
85
|
}) : /* @__PURE__ */ c(o, { children: [a.length > 1 ? /* @__PURE__ */ s("ul", {
|
|
86
86
|
className: `${v}__legend`,
|
|
@@ -93,5 +93,4 @@ var l = {
|
|
|
93
93
|
}, e.id))
|
|
94
94
|
}) : null, y] })] });
|
|
95
95
|
}, _ = () => a();
|
|
96
|
-
//#endregion
|
|
97
96
|
export { h as ChartSwatch, l as DEFAULT_CHART_LABELS, g as KapiChartFrame, u as chartSummary, m as chartVars, f as useChartLabels, _ as useChartTitleId, p as useChartView, d as withChartUnit };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { formatCount as e } from "../../hooks/numberFormatLogic.js";
|
|
2
2
|
import { DEFAULT_TABLE_LABELS as t } from "./tableLabels.js";
|
|
3
|
-
|
|
3
|
+
// src/components/data/datasetSelectionLogic.ts
|
|
4
4
|
var n = (t, n, r) => t.replace("{n}", e(n, r)), r = (e) => e.selected ? "selected" : e.headerState === "all" && e.shown > 0 && e.total > e.shown ? "offer" : "none", i = (e, r, i = t, a) => e === 1 ? i.datasetHintOne : n(i.datasetHint, e, a), a = (e, r = t, i) => n(r.datasetAction, e, i), o = (e, r = t, i) => e === 1 ? r.datasetSelectedOne : n(r.datasetSelected, e, i);
|
|
5
|
-
//#endregion
|
|
6
5
|
export { a as datasetActionLabel, i as datasetHintLabel, r as datasetNoticeState, o as datasetSelectedLabel };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import "../locale/localeLogic.js";
|
|
2
1
|
import { buildDays as e } from "../inputs/datePickerLogic.js";
|
|
3
|
-
|
|
2
|
+
import "../locale/localeLogic.js";
|
|
3
|
+
// src/components/data/eventCalendarLogic.ts
|
|
4
4
|
var t = (e) => new Date(e.getFullYear(), e.getMonth(), e.getDate()).getTime(), n = (e, n) => {
|
|
5
5
|
let r = t(n), i = t(e.start), a = t(e.end ?? e.start);
|
|
6
6
|
return a < i ? r === i : r >= i && r <= a;
|
|
@@ -42,5 +42,4 @@ var t = (e) => new Date(e.getFullYear(), e.getMonth(), e.getDate()).getTime(), n
|
|
|
42
42
|
}
|
|
43
43
|
return r;
|
|
44
44
|
};
|
|
45
|
-
//#endregion
|
|
46
45
|
export { t as aDia, c as correrMes, l as diasConEventos, r as duracionEnDias, i as eventosDelDia, s as eventosDelMes, n as ocupaElDia, o as semanasDelMes, a as visiblesYResto };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/components/data/heatmapLogic.ts
|
|
2
2
|
var e = 5, t = (e, t, n = 5) => {
|
|
3
3
|
let r = Math.max(1, Math.floor(n));
|
|
4
4
|
if (!Number.isFinite(e) || !(t > 0)) return 0;
|
|
@@ -11,5 +11,4 @@ var e = 5, t = (e, t, n = 5) => {
|
|
|
11
11
|
let r = e / n;
|
|
12
12
|
return Array.from({ length: n }, (e, t) => [t * r, (t + 1) * r]);
|
|
13
13
|
};
|
|
14
|
-
//#endregion
|
|
15
14
|
export { e as SEQ_STEPS, r as heatLegendRanges, n as heatMax, t as heatStep };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { barHeight as e } from "./barChartLogic.js";
|
|
2
|
-
|
|
2
|
+
// src/components/data/lineChartLogic.ts
|
|
3
3
|
var t = (t, n, r = t.length) => {
|
|
4
4
|
let i = Math.max(0, Math.floor(r));
|
|
5
5
|
if (i === 0) return [];
|
|
@@ -17,5 +17,4 @@ var t = (t, n, r = t.length) => {
|
|
|
17
17
|
let t = e[0], i = e[e.length - 1];
|
|
18
18
|
return `${r(e)} L${i.x} ${n(0)} L${t.x} ${n(0)} Z`;
|
|
19
19
|
}, a = (e) => e.length === 0 ? null : e[e.length - 1];
|
|
20
|
-
//#endregion
|
|
21
20
|
export { i as areaPath, a as lineEndpoint, r as linePath, t as linePoints, n as svgY };
|
|
@@ -1,20 +1,6 @@
|
|
|
1
1
|
import { joinClasses as e } from "../rootProps.js";
|
|
2
|
-
|
|
3
|
-
var t = [
|
|
4
|
-
"button",
|
|
5
|
-
"a",
|
|
6
|
-
"input",
|
|
7
|
-
"select",
|
|
8
|
-
"textarea",
|
|
9
|
-
"label",
|
|
10
|
-
"summary",
|
|
11
|
-
"[role=checkbox]",
|
|
12
|
-
"[role=button]",
|
|
13
|
-
"[role=link]",
|
|
14
|
-
"[role=menuitem]",
|
|
15
|
-
"[role=switch]",
|
|
16
|
-
"[contenteditable]:not([contenteditable=false])"
|
|
17
|
-
].join(", "), n = (e) => typeof e == "object" && !!e && typeof e.closest == "function";
|
|
2
|
+
// src/components/data/rowClickLogic.ts
|
|
3
|
+
var t = "button, a, input, select, textarea, label, summary, [role=checkbox], [role=button], [role=link], [role=menuitem], [role=switch], [contenteditable]:not([contenteditable=false])", n = (e) => typeof e == "object" && !!e && typeof e.closest == "function";
|
|
18
4
|
function r(e, r, i) {
|
|
19
5
|
if (e == null) return !1;
|
|
20
6
|
let a = r.contains;
|
|
@@ -52,5 +38,4 @@ function o(t, n) {
|
|
|
52
38
|
}
|
|
53
39
|
return s;
|
|
54
40
|
}
|
|
55
|
-
//#endregion
|
|
56
41
|
export { t as ROW_INTERACTIVE_SELECTOR, i as isRowActivationKey, o as mergeRowProps, r as shouldFireRowClick };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/components/data/scatterLogic.ts
|
|
2
2
|
var e = (e, t = 0) => Number.isFinite(e) ? e : t, t = (e, t) => {
|
|
3
3
|
let n = e / Math.max(1, t), r = 10 ** Math.floor(Math.log10(n)), i = n / r;
|
|
4
4
|
return (i <= 1 ? 1 : i <= 2 ? 2 : i <= 5 ? 5 : 10) * r;
|
|
@@ -39,5 +39,4 @@ var e = (e, t = 0) => Number.isFinite(e) ? e : t, t = (e, t) => {
|
|
|
39
39
|
let t = Math.abs(e);
|
|
40
40
|
return e.toFixed(t < 1 ? 2 : 1);
|
|
41
41
|
};
|
|
42
|
-
//#endregion
|
|
43
42
|
export { n as scatterAxis, i as scatterInside, r as scatterPosition, a as scatterTickLabel };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { barScale as e } from "./barChartLogic.js";
|
|
2
|
-
|
|
2
|
+
// src/components/data/sparklineLogic.ts
|
|
3
3
|
var t = (e) => e.filter((e) => Number.isFinite(e)), n = (e) => {
|
|
4
4
|
let n = t(e);
|
|
5
5
|
if (n.length < 2) return "flat";
|
|
@@ -14,5 +14,4 @@ var t = (e) => e.filter((e) => Number.isFinite(e)), n = (e) => {
|
|
|
14
14
|
let o = n(e), s = o === "up" ? r.up : o === "down" ? r.down : r.flat, c = i(a[0]), l = i(a[a.length - 1]);
|
|
15
15
|
return a.length === 1 ? `${r.trend}: ${c}` : `${r.trend}: ${s}, ${r.from} ${c} ${r.to} ${l}`;
|
|
16
16
|
};
|
|
17
|
-
//#endregion
|
|
18
17
|
export { i as sparklineLabel, r as sparklineMax, n as sparklineTrend };
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { KapiSkeleton as e } from "../feedback/KapiSkeleton.js";
|
|
3
|
+
import { joinClasses as t } from "../rootProps.js";
|
|
4
4
|
import { columnAlign as n, readCell as r, stickySideOf as i } from "./tableLogic.js";
|
|
5
|
-
import {
|
|
5
|
+
import { copyText as a } from "../inputs/copyLogic.js";
|
|
6
6
|
import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
7
7
|
import { ChevronDown as c, ChevronUp as l, ChevronsUpDown as u, Copy as d, Loader2 as f } from "lucide-react";
|
|
8
|
-
|
|
9
|
-
var p = async (e,
|
|
10
|
-
await
|
|
8
|
+
// src/components/data/tableCells.tsx
|
|
9
|
+
var p = async (e, t, n) => {
|
|
10
|
+
await a(String(e), n) && t?.(e);
|
|
11
11
|
}, m = (e, t, n) => {
|
|
12
12
|
let r = n[e.key];
|
|
13
13
|
return r === void 0 ? t === "th" ? {
|
|
@@ -25,9 +25,9 @@ var p = async (e, n, r) => {
|
|
|
25
25
|
}, h = (e) => {
|
|
26
26
|
let t = n(e);
|
|
27
27
|
if (t) return `is-align-${t}${t === "start" ? " is-align-left" : t === "end" ? " is-align-right" : ""}`;
|
|
28
|
-
}, g = (
|
|
29
|
-
let a = i(
|
|
30
|
-
return
|
|
28
|
+
}, g = (e, n, r) => {
|
|
29
|
+
let a = i(e.sticky);
|
|
30
|
+
return t(a && "is-sticky", a === "right" && "is-sticky-right", a === "left" && n === r.lastLeft && "is-sticky-last", a === "right" && n === r.firstRight && "is-sticky-first-right", e.flex && "is-flex", h(e.align));
|
|
31
31
|
}, _ = (e, t) => ({
|
|
32
32
|
insetInlineStart: t.lefts[e],
|
|
33
33
|
insetInlineEnd: t.rights[e]
|
|
@@ -97,14 +97,14 @@ var p = async (e, n, r) => {
|
|
|
97
97
|
72,
|
|
98
98
|
84,
|
|
99
99
|
60
|
|
100
|
-
], E = (
|
|
101
|
-
let
|
|
100
|
+
], E = (t, n, r) => {
|
|
101
|
+
let i = t.flex ? `${[
|
|
102
102
|
70,
|
|
103
103
|
55,
|
|
104
104
|
80
|
|
105
|
-
][
|
|
106
|
-
return /* @__PURE__ */ o(
|
|
107
|
-
width:
|
|
105
|
+
][r % 3]}%` : Math.max(32, Math.min(T[(n + r) % T.length] ?? 72, (t.width ?? 120) - 36));
|
|
106
|
+
return /* @__PURE__ */ o(e, {
|
|
107
|
+
width: i,
|
|
108
108
|
height: 14,
|
|
109
109
|
radius: 6
|
|
110
110
|
});
|
|
@@ -120,5 +120,4 @@ var p = async (e, n, r) => {
|
|
|
120
120
|
"data-label": typeof e.label == "string" || typeof e.label == "number" ? String(e.label) : void 0,
|
|
121
121
|
children: y(e, r, s, c)
|
|
122
122
|
}, e.key);
|
|
123
|
-
//#endregion
|
|
124
123
|
export { v as actColClass, S as ariaSortOf, D as bodyCell, g as cellClass, n as columnAlign, m as columnBoxStyle, p as copyToClipboard, C as headerContent, y as renderCell, E as skeletonBar, x as sortDirectionOf, b as sortIcon, w as stateRow, _ as stickyInset };
|