@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,5 +1,5 @@
|
|
|
1
1
|
import { headerMenuActions as e } from "./tableLogic.js";
|
|
2
|
-
|
|
2
|
+
// src/components/data/tableHeaderMenu.ts
|
|
3
3
|
var t = (t, { text: n, onSort: r, onPin: i, onHide: a, ...o }) => {
|
|
4
4
|
let s = t.key, c = (e) => {
|
|
5
5
|
switch (e) {
|
|
@@ -41,5 +41,4 @@ var t = (t, { text: n, onSort: r, onPin: i, onHide: a, ...o }) => {
|
|
|
41
41
|
};
|
|
42
42
|
return e(t, o).flatMap((e, t) => [...t > 0 ? [{ sep: !0 }] : [], ...e.map(c)]);
|
|
43
43
|
};
|
|
44
|
-
//#endregion
|
|
45
44
|
export { t as headerMenuItems };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/components/data/tableLabels.ts
|
|
2
2
|
var e = "Filtro de la tabla", t = {
|
|
3
3
|
region: e,
|
|
4
4
|
empty: "Sin resultados",
|
|
@@ -44,5 +44,4 @@ var e = "Filtro de la tabla", t = {
|
|
|
44
44
|
datasetSelected: "Están seleccionadas las {n} del total.",
|
|
45
45
|
datasetSelectedOne: "Está seleccionada la única del total."
|
|
46
46
|
};
|
|
47
|
-
//#endregion
|
|
48
47
|
export { t as DEFAULT_TABLE_LABELS, e as TABLE_FILTER_REGION };
|
|
@@ -183,5 +183,4 @@ var e = (e) => e === "left" ? "start" : e === "right" ? "end" : e, t = (e) => e
|
|
|
183
183
|
}
|
|
184
184
|
return a?.trim() ? `${r.selectRowNamed} ${a.trim()}` : `${r.selectRow} ${n}`;
|
|
185
185
|
};
|
|
186
|
-
//#endregion
|
|
187
186
|
export { j as COLUMNS_PANEL_ESTIMATE, A as COLUMNS_PANEL_PLACEMENT, J as buildCsv, F as clampColumnWidth, e as columnAlign, M as columnsPanelMaxHeight, p as compareSortValues, o as computePagination, n as computeStickyOffsets, r as computeStickyRightOffsets, q as csvCell, X as csvFileName, Y as csvHeaderOf, I as effectiveColumnWidth, Z as filterColumnOptions, H as filterRows, W as filterSearchColumns, z as filterTerms, a as firstRightStickyIndex, N as headerMenuActions, U as isFilterActive, i as lastStickyIndex, v as nextSortState, R as normalizeFilterText, _ as paginateRows, E as pinColumns, h as readCell, L as resizeColumn, V as rowMatchesFilter, Q as rowSelectLabel, u as safeLocale, S as selectOnlyWithin, y as selectionState, D as setColumnPin, O as setSidePins, m as sortRows, g as sortRowsByColumn, T as stickyKeysOf, t as stickySideOf, P as tableWrapClass, x as toggleAllIds, w as toggleColumnVisibility, b as toggleId, C as visibleColumnsOf };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { computePagination as e } from "./tableLogic.js";
|
|
2
|
-
|
|
2
|
+
// src/components/data/tablePaginationLogic.ts
|
|
3
3
|
var t = (e) => e?.mode === "client", n = (t, n, r) => {
|
|
4
4
|
let i = e({
|
|
5
5
|
page: n,
|
|
@@ -11,5 +11,4 @@ var t = (e) => e?.mode === "client", n = (t, n, r) => {
|
|
|
11
11
|
info: i
|
|
12
12
|
};
|
|
13
13
|
};
|
|
14
|
-
//#endregion
|
|
15
14
|
export { n as clientPage, t as isClientPagination };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { clampColumnWidth as e, computeStickyOffsets as t, computeStickyRightOffsets as n, effectiveColumnWidth as r, resizeColumn as i } from "./tableLogic.js";
|
|
2
|
-
|
|
2
|
+
// src/components/data/tableResizeLogic.ts
|
|
3
3
|
var a = (t, n, r, i, a = !1) => ({
|
|
4
4
|
key: t,
|
|
5
5
|
startX: n,
|
|
@@ -20,5 +20,4 @@ var a = (t, n, r, i, a = !1) => ({
|
|
|
20
20
|
sticky: e.sticky,
|
|
21
21
|
width: e.key === i ? a : r(e, t)
|
|
22
22
|
})), o);
|
|
23
|
-
//#endregion
|
|
24
23
|
export { l as draftStickyLefts, u as draftStickyRights, s as endResizeDrag, o as moveResizeDrag, c as needsDraftLeftPaint, a as startResizeDrag };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineSlots as e } from "../slotsLogic.js";
|
|
2
|
-
|
|
2
|
+
// src/components/data/tableSlots.ts
|
|
3
3
|
var t = e("table", {
|
|
4
4
|
root: "kapi-table-shell",
|
|
5
5
|
toolbar: "kapi-tabletools",
|
|
@@ -8,5 +8,4 @@ var t = e("table", {
|
|
|
8
8
|
datasetNotice: "kapi-table__dataset",
|
|
9
9
|
pagination: "kapi-tablefoot"
|
|
10
10
|
});
|
|
11
|
-
//#endregion
|
|
12
11
|
export { t as TABLE_SLOTS };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { stickySideOf as e } from "./tableLogic.js";
|
|
2
|
-
|
|
2
|
+
// src/components/data/tableSpanLogic.ts
|
|
3
3
|
var t = (e) => e !== void 0 && Number.isFinite(e) && e >= 1 ? Math.floor(e) : 1, n = (n, r) => {
|
|
4
4
|
let i = n.map(() => 1);
|
|
5
5
|
for (let a = 0; a < n.length;) {
|
|
@@ -43,5 +43,4 @@ var t = (e) => e !== void 0 && Number.isFinite(e) && e >= 1 ? Math.floor(e) : 1,
|
|
|
43
43
|
cell: null
|
|
44
44
|
}), i;
|
|
45
45
|
};
|
|
46
|
-
//#endregion
|
|
47
46
|
export { r as layoutFooterRow, n as rowColSpans };
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { rafThrottle as e } from "../../hooks/rafThrottle.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
3
|
+
import { clampColumnWidth as t, resizeColumn as n } from "./tableLogic.js";
|
|
4
|
+
import { draftStickyLefts as r, draftStickyRights as i, endResizeDrag as a, moveResizeDrag as o, needsDraftLeftPaint as s, startResizeDrag as c } from "./tableResizeLogic.js";
|
|
5
|
+
import { directionOf as l, logicalKeyOf as u } from "../../hooks/directionLogic.js";
|
|
6
6
|
import { useCallback as d, useEffect as f, useLayoutEffect as p, useRef as m, useState as h } from "react";
|
|
7
7
|
import { jsx as g } from "react/jsx-runtime";
|
|
8
|
-
|
|
8
|
+
// src/components/data/useColumnResize.tsx
|
|
9
9
|
var _ = (e) => typeof CSS < "u" && typeof CSS.escape == "function" ? CSS.escape(e) : e.replace(/["\\]/g, "\\$&"), v = ({ tableRef: v, columns: y, widths: b, onCommit: x, lefts: S, rights: C, offset: w, rightEnd: T, resizableColumns: E, resizeLabel: D }) => {
|
|
10
|
-
let O = m(null), k = (e) => e.resizable ?? E, A = (e) => e.minWidth ?? 60, [j, M] = h({}), N = (e) =>
|
|
10
|
+
let O = m(null), k = (e) => e.resizable ?? E, A = (e) => e.minWidth ?? 60, [j, M] = h({}), N = (e) => t(b[e.key] ?? e.width ?? j[e.key] ?? A(e), A(e)), P = d(() => {
|
|
11
11
|
let e = v.current;
|
|
12
12
|
if (!e) return;
|
|
13
13
|
let t = {};
|
|
@@ -44,21 +44,21 @@ var _ = (e) => typeof CSS < "u" && typeof CSS.escape == "function" ? CSS.escape(
|
|
|
44
44
|
let I = m(/* @__PURE__ */ new Map()), L = m(/* @__PURE__ */ new Map()), R = m(/* @__PURE__ */ new Map()), [z] = h(() => e((e) => {
|
|
45
45
|
let t = v.current;
|
|
46
46
|
if (!t) return;
|
|
47
|
-
let n = F.current,
|
|
48
|
-
n.columns.forEach((
|
|
49
|
-
let
|
|
50
|
-
if (!
|
|
51
|
-
L.current.set(
|
|
52
|
-
let d = `[data-col="${_(
|
|
47
|
+
let n = F.current, a = r(n.columns, n.widths, e.key, e.width, n.offset), o = i(n.columns, n.widths, e.key, e.width, n.rightEnd);
|
|
48
|
+
n.columns.forEach((r, i) => {
|
|
49
|
+
let c = r.key === e.key, l = s(a[i], n.lefts[i], L.current.get(r.key)), u = s(o[i], n.rights[i], R.current.get(r.key));
|
|
50
|
+
if (!c && !l && !u) return;
|
|
51
|
+
L.current.set(r.key, a[i]), R.current.set(r.key, o[i]);
|
|
52
|
+
let d = `[data-col="${_(r.key)}"]`;
|
|
53
53
|
t.querySelectorAll(`:scope > thead > tr > ${d}, :scope > tbody > tr > ${d}`).forEach((t) => {
|
|
54
|
-
if (I.current.has(t) || I.current.set(t, t.style.cssText),
|
|
54
|
+
if (I.current.has(t) || I.current.set(t, t.style.cssText), c) {
|
|
55
55
|
let n = `${e.width}px`;
|
|
56
56
|
t.style.width = n, t.style.minWidth = n, t.style.maxWidth = n;
|
|
57
57
|
}
|
|
58
|
-
let n =
|
|
58
|
+
let n = a[i];
|
|
59
59
|
n !== void 0 && (t.style.insetInlineStart = `${n}px`);
|
|
60
|
-
let
|
|
61
|
-
|
|
60
|
+
let r = o[i];
|
|
61
|
+
r !== void 0 && (t.style.insetInlineEnd = `${r}px`);
|
|
62
62
|
});
|
|
63
63
|
});
|
|
64
64
|
})), B = () => {
|
|
@@ -67,28 +67,28 @@ var _ = (e) => typeof CSS < "u" && typeof CSS.escape == "function" ? CSS.escape(
|
|
|
67
67
|
}), I.current.clear(), L.current.clear(), R.current.clear();
|
|
68
68
|
};
|
|
69
69
|
f(() => () => z.cancel(), [z]);
|
|
70
|
-
let V = (e,
|
|
70
|
+
let V = (e, t) => {
|
|
71
71
|
if (e.button !== 0) return;
|
|
72
72
|
e.preventDefault(), e.stopPropagation();
|
|
73
|
-
let
|
|
74
|
-
O.current =
|
|
73
|
+
let n = e.currentTarget.parentElement, r = n ? n.getBoundingClientRect().width : t.width ?? 120;
|
|
74
|
+
O.current = c(t.key, e.clientX, r, A(t), l(e.currentTarget) === "rtl"), e.currentTarget.setPointerCapture(e.pointerId);
|
|
75
75
|
}, H = (e) => {
|
|
76
76
|
let t = O.current;
|
|
77
77
|
if (!t) return;
|
|
78
|
-
let n =
|
|
78
|
+
let n = o(t, e.clientX);
|
|
79
79
|
n && (O.current = n, z(n));
|
|
80
80
|
}, U = (e) => {
|
|
81
81
|
let t = O.current;
|
|
82
82
|
if (O.current = null, e.currentTarget.hasPointerCapture(e.pointerId) && e.currentTarget.releasePointerCapture(e.pointerId), !t) return;
|
|
83
83
|
B();
|
|
84
|
-
let n = e.type === "pointercancel" ? t :
|
|
84
|
+
let n = e.type === "pointercancel" ? t : o(t, e.clientX) ?? t, r = a(n, b, e.type === "pointercancel" ? "cancel" : "commit");
|
|
85
85
|
r && x(r);
|
|
86
86
|
}, W = (e, t) => {
|
|
87
|
-
let r =
|
|
87
|
+
let r = u(e);
|
|
88
88
|
if (r !== "ArrowLeft" && r !== "ArrowRight") return;
|
|
89
89
|
e.preventDefault();
|
|
90
|
-
let
|
|
91
|
-
x(
|
|
90
|
+
let i = e.currentTarget.parentElement, a = b[t.key] ?? (i ? i.getBoundingClientRect().width : t.width ?? 120), o = r === "ArrowRight" ? 16 : -16;
|
|
91
|
+
x(n(b, t.key, a, o, A(t)));
|
|
92
92
|
};
|
|
93
93
|
return { resizeHandle: (e) => {
|
|
94
94
|
if (!k(e)) return null;
|
|
@@ -112,5 +112,4 @@ var _ = (e) => typeof CSS < "u" && typeof CSS.escape == "function" ? CSS.escape(
|
|
|
112
112
|
});
|
|
113
113
|
} };
|
|
114
114
|
};
|
|
115
|
-
//#endregion
|
|
116
115
|
export { v as useColumnResize };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { useEffect as e, useRef as t } from "react";
|
|
3
|
-
|
|
3
|
+
// src/components/data/useRowKeyWarning.ts
|
|
4
4
|
var n = (e, t) => {
|
|
5
5
|
let n = /* @__PURE__ */ new Set();
|
|
6
6
|
for (let r of e) {
|
|
@@ -25,5 +25,4 @@ var n = (e, t) => {
|
|
|
25
25
|
s
|
|
26
26
|
]);
|
|
27
27
|
};
|
|
28
|
-
//#endregion
|
|
29
28
|
export { n as rowKeyProblem, i as useRowKeyWarning };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { directionOf as e } from "../../hooks/directionLogic.js";
|
|
3
3
|
import { useCallback as t, useEffect as n, useState as r } from "react";
|
|
4
|
-
|
|
4
|
+
// src/components/data/useTableEdges.ts
|
|
5
5
|
var i = (i, a) => {
|
|
6
6
|
let [o, s] = r(!1), [c, l] = r(!1), u = t((t) => {
|
|
7
7
|
let n = t.scrollWidth - t.getBoundingClientRect().width, r = e(t) === "rtl" ? -t.scrollLeft : t.scrollLeft;
|
|
@@ -22,5 +22,4 @@ var i = (i, a) => {
|
|
|
22
22
|
medirBordes: u
|
|
23
23
|
};
|
|
24
24
|
};
|
|
25
|
-
//#endregion
|
|
26
25
|
export { i as useTableEdges };
|
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { useControllableState as e } from "../../hooks/useControllableState.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { selectOnlyWithin as
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
3
|
+
import { formatCount as t } from "../../hooks/numberFormatLogic.js";
|
|
4
|
+
import { useRangeSelect as n } from "../../hooks/useRangeSelect.js";
|
|
5
|
+
import { datasetActionLabel as r, datasetHintLabel as i, datasetNoticeState as a, datasetSelectedLabel as o } from "./datasetSelectionLogic.js";
|
|
6
|
+
import { selectOnlyWithin as s, selectionState as c } from "./tableLogic.js";
|
|
7
|
+
import { slot as l } from "../slotsLogic.js";
|
|
8
|
+
import { TABLE_SLOTS as u } from "./tableSlots.js";
|
|
9
9
|
import { useMemo as d } from "react";
|
|
10
10
|
import { Fragment as f, jsx as p, jsxs as m } from "react/jsx-runtime";
|
|
11
11
|
import { Loader2 as h } from "lucide-react";
|
|
12
|
-
|
|
13
|
-
var g = [], _ = ({ rows:
|
|
14
|
-
let [w, T] = e(
|
|
12
|
+
// src/components/data/useTableSelection.tsx
|
|
13
|
+
var g = [], _ = ({ rows: r, claveDe: i, selectable: o, selectedIds: l, defaultSelectedIds: u, onSelectedIdsChange: _, isRowSelectable: v, selectionPresets: y, rangeSelect: b, dataset: x, loadingLabel: S, locale: C }) => {
|
|
14
|
+
let [w, T] = e(l, u ?? g, _ && ((e) => _([...e]))), E = d(() => new Set(w), [w]), D = (e) => T([...e]), O = () => D(/* @__PURE__ */ new Set()), k = [...E], A = n(), j = o && y !== void 0 && y.length > 0, M = d(() => r.filter((e) => !v || v(e)), [r, v]), N = d(() => M.map((e) => i(e)), [M, i]), P = d(() => j && y ? y.map((e) => ({
|
|
15
15
|
preset: e,
|
|
16
|
-
matching: e.match === void 0 ? [] : M.filter(e.match).map((e) =>
|
|
16
|
+
matching: e.match === void 0 ? [] : M.filter(e.match).map((e) => i(e))
|
|
17
17
|
})) : [], [
|
|
18
18
|
j,
|
|
19
19
|
y,
|
|
20
20
|
M,
|
|
21
|
-
|
|
22
|
-
]).map(({ preset: e, matching:
|
|
23
|
-
let
|
|
21
|
+
i
|
|
22
|
+
]).map(({ preset: e, matching: n }) => {
|
|
23
|
+
let r = e.onSelect === void 0 ? n.length : e.count, i = e.pending === !0, a = i ? /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p(h, {
|
|
24
24
|
size: 14,
|
|
25
25
|
strokeWidth: 2.2,
|
|
26
26
|
className: "kapi-table-spin",
|
|
@@ -30,12 +30,12 @@ var g = [], _ = ({ rows: n, claveDe: o, selectable: s, selectedIds: c, defaultSe
|
|
|
30
30
|
children: S
|
|
31
31
|
})] }) : e.icon;
|
|
32
32
|
return {
|
|
33
|
-
label:
|
|
34
|
-
...
|
|
35
|
-
disabled:
|
|
36
|
-
onClick: e.onSelect ?? (() => D(
|
|
33
|
+
label: i ? e.label : `${e.label} (${t(r, C)})`,
|
|
34
|
+
...a !== void 0 && { icon: a },
|
|
35
|
+
disabled: i || r === 0,
|
|
36
|
+
onClick: e.onSelect ?? (() => D(s(E, N, n)))
|
|
37
37
|
};
|
|
38
|
-
}), F =
|
|
38
|
+
}), F = c(N, E);
|
|
39
39
|
return {
|
|
40
40
|
sel: E,
|
|
41
41
|
commitSelection: D,
|
|
@@ -45,7 +45,7 @@ var g = [], _ = ({ rows: n, claveDe: o, selectable: s, selectedIds: c, defaultSe
|
|
|
45
45
|
hasPresets: j,
|
|
46
46
|
presetItems: P,
|
|
47
47
|
headerState: F,
|
|
48
|
-
datasetNotice: x !== void 0 &&
|
|
48
|
+
datasetNotice: x !== void 0 && o ? a({
|
|
49
49
|
headerState: F,
|
|
50
50
|
shown: N.length,
|
|
51
51
|
total: x.total,
|
|
@@ -61,24 +61,23 @@ var g = [], _ = ({ rows: n, claveDe: o, selectable: s, selectedIds: c, defaultSe
|
|
|
61
61
|
}
|
|
62
62
|
};
|
|
63
63
|
};
|
|
64
|
-
function v({ dataset: e, notice: t, shown:
|
|
65
|
-
let h =
|
|
64
|
+
function v({ dataset: e, notice: t, shown: n, clearLabel: a, labels: s, locale: c, classNames: d }) {
|
|
65
|
+
let h = l(u, "datasetNotice", d);
|
|
66
66
|
return /* @__PURE__ */ m("div", {
|
|
67
67
|
...h,
|
|
68
68
|
className: t === "none" ? void 0 : h.className,
|
|
69
69
|
role: "status",
|
|
70
|
-
children: [t === "offer" && /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p("span", { children: e.hintLabel ? e.hintLabel(
|
|
70
|
+
children: [t === "offer" && /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p("span", { children: e.hintLabel ? e.hintLabel(n, e.total) : i(n, e.total, s, c) }), /* @__PURE__ */ p("button", {
|
|
71
71
|
type: "button",
|
|
72
72
|
className: "kapi-link",
|
|
73
73
|
onClick: e.onSelect,
|
|
74
|
-
children: e.actionLabel ? e.actionLabel(e.total) :
|
|
75
|
-
})] }), t === "selected" && /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p("span", { children: e.selectedLabel ? e.selectedLabel(e.total) :
|
|
74
|
+
children: e.actionLabel ? e.actionLabel(e.total) : r(e.total, s, c)
|
|
75
|
+
})] }), t === "selected" && /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p("span", { children: e.selectedLabel ? e.selectedLabel(e.total) : o(e.total, s, c) }), e.onClear && /* @__PURE__ */ p("button", {
|
|
76
76
|
type: "button",
|
|
77
77
|
className: "kapi-link",
|
|
78
78
|
onClick: e.onClear,
|
|
79
|
-
children:
|
|
79
|
+
children: a
|
|
80
80
|
})] })]
|
|
81
81
|
});
|
|
82
82
|
}
|
|
83
|
-
//#endregion
|
|
84
83
|
export { v as TableDatasetNotice, _ as useTableSelection };
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import "#kapi-css/components/display/typography.css";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { renderSlot as e } from "../renderSlot.js";
|
|
4
|
+
import { DEFAULT_LINK_LABELS as t } from "../locale/linkLabels.js";
|
|
5
5
|
import { useLabels as n } from "../locale/KapiLocaleProvider.js";
|
|
6
|
-
import {
|
|
6
|
+
import { joinClasses as r } from "../rootProps.js";
|
|
7
7
|
import { textClasses as i } from "./textLogic.js";
|
|
8
8
|
/* empty css */
|
|
9
9
|
import { Fragment as a, jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
10
|
-
|
|
10
|
+
// src/components/display/KapiAnchor.tsx
|
|
11
11
|
var c = ({ size: c, weight: l, underline: u = "hover", newTab: d = !1, labels: f, render: p, className: m, target: h, rel: g, style: _, ref: v, children: y, ...b }) => {
|
|
12
|
-
let x = n("link",
|
|
13
|
-
className:
|
|
12
|
+
let x = n("link", t, f), S = d || h === "_blank", C = {
|
|
13
|
+
className: r("kapi-link", "kapi-anchor", ...i({
|
|
14
14
|
size: c,
|
|
15
15
|
weight: l
|
|
16
16
|
}), u !== "hover" && `kapi-anchor--underline-${u}`, m),
|
|
@@ -30,7 +30,6 @@ var c = ({ size: c, weight: l, underline: u = "hover", newTab: d = !1, labels: f
|
|
|
30
30
|
ref: v,
|
|
31
31
|
children: w
|
|
32
32
|
};
|
|
33
|
-
return
|
|
33
|
+
return e(p, C, T, (e) => /* @__PURE__ */ o("a", { ...e }));
|
|
34
34
|
};
|
|
35
|
-
//#endregion
|
|
36
35
|
export { c as KapiAnchor };
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import "#kapi-css/components/display/KapiAnnotation.css";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { usePlacement as r } from "../../hooks/usePlacement.js";
|
|
8
|
-
import { useDismiss as i } from "../../hooks/useDismiss.js";
|
|
9
|
-
import { KapiTooltip as a } from "../overlays/KapiTooltip.js";
|
|
10
|
-
import { annotationClasses as o, annotationRole as s } from "./annotationLogic.js";
|
|
3
|
+
import { resolveKapiRoot as e } from "../../hooks/kapiRoot.js";
|
|
4
|
+
import { useDismiss as t } from "../../hooks/useDismiss.js";
|
|
5
|
+
import { KapiTooltip as ee } from "../overlays/KapiTooltip.js";
|
|
6
|
+
import { annotationClasses as n, annotationRole as r } from "./annotationLogic.js";
|
|
11
7
|
/* empty css */
|
|
8
|
+
import { usePlacement as i } from "../../hooks/usePlacement.js";
|
|
9
|
+
import { joinIds as a } from "../inputs/fieldLogic.js";
|
|
10
|
+
import { useMergedRefs as o } from "../../hooks/mergeRefs.js";
|
|
11
|
+
import { useToneLook as s } from "../../hooks/useToneFamilies.js";
|
|
12
12
|
import { useEffect as c, useId as te, useRef as l, useState as u } from "react";
|
|
13
13
|
import { jsx as d, jsxs as f } from "react/jsx-runtime";
|
|
14
14
|
import { createPortal as p } from "react-dom";
|
|
15
|
-
|
|
15
|
+
// src/components/display/KapiAnnotation.tsx
|
|
16
16
|
var m = 8, h = 8, g = 150;
|
|
17
17
|
function _({ children: _, info: v, underline: y = "dotted", tone: ne = "primary", onClick: b, popover: x, interactive: S = !1, className: C, "aria-label": w, ref: T, ...E }) {
|
|
18
|
-
let D = te(), O = l(null), k =
|
|
18
|
+
let D = te(), O = l(null), k = o(O, T), [A, j] = u(!1), [M, N] = u(!1), P = l(null), F = l(void 0), { element: I, tabIndex: L, mode: R } = r(b, x, v), z = s("KapiAnnotation", ne), B = n({
|
|
19
19
|
underline: y,
|
|
20
20
|
tone: z.tone,
|
|
21
21
|
clickable: !!b,
|
|
@@ -32,7 +32,7 @@ function _({ children: _, info: v, underline: y = "dotted", tone: ne = "primary"
|
|
|
32
32
|
}, K = (e) => {
|
|
33
33
|
let t = e.relatedTarget;
|
|
34
34
|
S && t && P.current?.contains(t) || W();
|
|
35
|
-
}, { placement: q } =
|
|
35
|
+
}, { placement: q } = i({
|
|
36
36
|
open: A,
|
|
37
37
|
anchor: O,
|
|
38
38
|
floatingRef: P,
|
|
@@ -44,7 +44,7 @@ function _({ children: _, info: v, underline: y = "dotted", tone: ne = "primary"
|
|
|
44
44
|
top: q.top,
|
|
45
45
|
left: q.centerX,
|
|
46
46
|
side: q.side === "top" ? "top" : "bottom"
|
|
47
|
-
} : null, Y =
|
|
47
|
+
} : null, Y = t(A && S, {
|
|
48
48
|
zones: [O, P],
|
|
49
49
|
onDismiss: (e) => {
|
|
50
50
|
if (e === "outside") return W();
|
|
@@ -77,7 +77,7 @@ function _({ children: _, info: v, underline: y = "dotted", tone: ne = "primary"
|
|
|
77
77
|
onBlur: W,
|
|
78
78
|
children: _
|
|
79
79
|
});
|
|
80
|
-
return /* @__PURE__ */ d(
|
|
80
|
+
return /* @__PURE__ */ d(ee, {
|
|
81
81
|
label: e,
|
|
82
82
|
prefer: "top",
|
|
83
83
|
children: t
|
|
@@ -85,10 +85,10 @@ function _({ children: _, info: v, underline: y = "dotted", tone: ne = "primary"
|
|
|
85
85
|
}
|
|
86
86
|
let Z = x ?? { body: v }, Q = {
|
|
87
87
|
...X,
|
|
88
|
-
"aria-describedby":
|
|
88
|
+
"aria-describedby": a(E["aria-describedby"], A && D),
|
|
89
89
|
onFocus: U,
|
|
90
90
|
onBlur: K
|
|
91
|
-
}, $ = A ?
|
|
91
|
+
}, $ = A ? e(O.current) : null;
|
|
92
92
|
return /* @__PURE__ */ f("span", {
|
|
93
93
|
className: "kapi-annotation-wrap",
|
|
94
94
|
onMouseEnter: U,
|
|
@@ -128,5 +128,4 @@ function _({ children: _, info: v, underline: y = "dotted", tone: ne = "primary"
|
|
|
128
128
|
}), $)]
|
|
129
129
|
});
|
|
130
130
|
}
|
|
131
|
-
//#endregion
|
|
132
131
|
export { _ as KapiAnnotation };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import "#kapi-css/components/display/display.css";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { colorIndexFrom as e, initialsFrom as t } from "./avatarLogic.js";
|
|
4
|
+
import { useToneLook as n } from "../../hooks/useToneFamilies.js";
|
|
5
|
+
import { isFamilyTone as r, resolveTone as i } from "../tone.js";
|
|
5
6
|
/* empty css */
|
|
6
|
-
import { colorIndexFrom as r, initialsFrom as i } from "./avatarLogic.js";
|
|
7
7
|
import { jsx as a } from "react/jsx-runtime";
|
|
8
|
-
|
|
8
|
+
// src/components/display/KapiAvatar.tsx
|
|
9
9
|
var o = [
|
|
10
10
|
"primary",
|
|
11
11
|
"success",
|
|
@@ -20,7 +20,7 @@ var o = [
|
|
|
20
20
|
r
|
|
21
21
|
].filter(Boolean).join(" ");
|
|
22
22
|
function c({ name: c = "", initials: l, src: u, size: d = "md", tone: f, color: p, className: m, style: h, ...g }) {
|
|
23
|
-
let _ =
|
|
23
|
+
let _ = i(f, p, "auto"), v = r(_), y = n("KapiAvatar", v ? _ : void 0), b = v || _ === "auto" ? o[e(c, o.length)] ?? "neutral" : _, x = c || l || "", S = typeof d == "number" ? d : void 0, C = S === void 0 ? h : {
|
|
24
24
|
width: S,
|
|
25
25
|
height: S,
|
|
26
26
|
fontSize: Math.round(S * .38),
|
|
@@ -43,8 +43,7 @@ function c({ name: c = "", initials: l, src: u, size: d = "md", tone: f, color:
|
|
|
43
43
|
children: u ? /* @__PURE__ */ a("img", {
|
|
44
44
|
src: u,
|
|
45
45
|
alt: c
|
|
46
|
-
}) : l ??
|
|
46
|
+
}) : l ?? t(c)
|
|
47
47
|
});
|
|
48
48
|
}
|
|
49
|
-
//#endregion
|
|
50
49
|
export { o as AVATAR_ROLES, c as KapiAvatar, s as avatarClasses };
|
|
@@ -1,42 +1,41 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import "#kapi-css/components/display/display.css";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { KapiAvatar as e } from "./KapiAvatar.js";
|
|
4
|
+
import { avatarOverlapPx as t, overflowLabel as n, splitAvatarGroup as r } from "./avatarGroupLogic.js";
|
|
5
5
|
/* empty css */
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
6
|
+
import { useLabels as i } from "../locale/KapiLocaleProvider.js";
|
|
7
|
+
import { slot as a } from "../slotsLogic.js";
|
|
8
8
|
import { AVATAR_GROUP_SLOTS as o } from "./avatarGroupSlots.js";
|
|
9
9
|
import { jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
10
|
-
|
|
10
|
+
// src/components/display/KapiAvatarGroup.tsx
|
|
11
11
|
var l = { overflow: "{n} más" }, u = {
|
|
12
12
|
sm: 28,
|
|
13
13
|
md: 36,
|
|
14
14
|
lg: 48
|
|
15
15
|
};
|
|
16
16
|
function d({ items: d, max: f = 4, size: p = "md", labels: m, className: h, classNames: g, style: _, ...v }) {
|
|
17
|
-
let y =
|
|
18
|
-
"--kapi-avatargroup-overlap": `${
|
|
17
|
+
let y = i("avatarGroup", l, m), { visible: b, overflow: x } = r(d, f), S = typeof p == "number" ? p : u[p], C = {
|
|
18
|
+
"--kapi-avatargroup-overlap": `${t(S)}px`,
|
|
19
19
|
..._
|
|
20
20
|
}, w = d.slice(b.length).map((e) => e.name).filter(Boolean).join(", ");
|
|
21
21
|
return /* @__PURE__ */ c("div", {
|
|
22
22
|
...v,
|
|
23
|
-
...
|
|
23
|
+
...a(o, "root", g, h),
|
|
24
24
|
style: C,
|
|
25
25
|
role: "group",
|
|
26
|
-
children: [b.map((
|
|
27
|
-
...
|
|
28
|
-
title:
|
|
26
|
+
children: [b.map((t, n) => /* @__PURE__ */ s(e, {
|
|
27
|
+
...a(o, "item", g),
|
|
28
|
+
title: t.name,
|
|
29
29
|
size: p,
|
|
30
|
-
...
|
|
31
|
-
}, `${
|
|
32
|
-
...
|
|
30
|
+
...t
|
|
31
|
+
}, `${t.name ?? t.initials ?? ""}-${n}`)), x > 0 && /* @__PURE__ */ s(e, {
|
|
32
|
+
...a(o, "more", g, o.parts.item, "kapi-avatargroup__more", g?.item),
|
|
33
33
|
tone: "neutral",
|
|
34
34
|
size: p,
|
|
35
|
-
initials:
|
|
35
|
+
initials: n(x),
|
|
36
36
|
title: w || void 0,
|
|
37
37
|
"aria-label": y.overflow.replace("{n}", String(x))
|
|
38
38
|
})]
|
|
39
39
|
});
|
|
40
40
|
}
|
|
41
|
-
//#endregion
|
|
42
41
|
export { l as DEFAULT_AVATAR_GROUP_LABELS, d as KapiAvatarGroup };
|
|
@@ -4,7 +4,7 @@ import { useToneLook as e } from "../../hooks/useToneFamilies.js";
|
|
|
4
4
|
import { isFamilyTone as t, resolveBadgeLook as n } from "../tone.js";
|
|
5
5
|
/* empty css */
|
|
6
6
|
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
7
|
-
|
|
7
|
+
// src/components/display/KapiBadge.tsx
|
|
8
8
|
var a = ({ tone: e, variant: r, size: i = "md", className: a = "" } = {}) => {
|
|
9
9
|
let o = t(e), s = n(o ? void 0 : e, r);
|
|
10
10
|
return [
|
|
@@ -35,5 +35,4 @@ function o({ tone: t, variant: n, size: o = "md", dot: s = !1, className: c, sty
|
|
|
35
35
|
}), u]
|
|
36
36
|
});
|
|
37
37
|
}
|
|
38
|
-
//#endregion
|
|
39
38
|
export { o as KapiBadge, a as badgeClasses };
|
|
@@ -1,44 +1,43 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import "#kapi-css/components/display/KapiCodeBlock.css";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
3
|
+
import { KapiCopyButton as e } from "../inputs/KapiCopyButton.js";
|
|
4
|
+
import { slot as t } from "../slotsLogic.js";
|
|
5
|
+
import { CODE_BLOCK_SLOTS as n } from "./codeBlockSlots.js";
|
|
6
|
+
import { useLabels as r } from "../locale/KapiLocaleProvider.js";
|
|
7
7
|
/* empty css */
|
|
8
8
|
import { jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
9
|
-
|
|
9
|
+
// src/components/display/KapiCodeBlock.tsx
|
|
10
10
|
var o = { region: "Bloque de código {lang}" };
|
|
11
11
|
function s({ code: s, children: c, lang: l, title: u, noCopy: d = !1, onCopy: f, lineNumbers: p = !1, labels: m, classNames: h, className: g, ..._ }) {
|
|
12
|
-
let v =
|
|
12
|
+
let v = r("codeBlock", o, m), y = p ? s.split("\n") : null;
|
|
13
13
|
return /* @__PURE__ */ a("figure", {
|
|
14
14
|
..._,
|
|
15
|
-
...n
|
|
15
|
+
...t(n, "root", h, g),
|
|
16
16
|
"data-lang": l,
|
|
17
17
|
"aria-label": v.region.replace("{lang}", l ?? "").trim(),
|
|
18
18
|
children: [(u !== void 0 || !d) && /* @__PURE__ */ a("figcaption", {
|
|
19
|
-
...n
|
|
19
|
+
...t(n, "bar", h),
|
|
20
20
|
children: [/* @__PURE__ */ i("span", {
|
|
21
|
-
...n
|
|
21
|
+
...t(n, "title", h),
|
|
22
22
|
children: u
|
|
23
|
-
}), !d && /* @__PURE__ */ i(
|
|
23
|
+
}), !d && /* @__PURE__ */ i(e, {
|
|
24
24
|
value: s,
|
|
25
25
|
size: "sm",
|
|
26
26
|
variant: "ghost",
|
|
27
27
|
...f ? { onCopy: f } : {},
|
|
28
|
-
...n
|
|
28
|
+
...t(n, "copy", h)
|
|
29
29
|
})]
|
|
30
30
|
}), /* @__PURE__ */ a("pre", {
|
|
31
|
-
...n
|
|
31
|
+
...t(n, "pre", h),
|
|
32
32
|
children: [y && /* @__PURE__ */ i("span", {
|
|
33
|
-
...n
|
|
33
|
+
...t(n, "numbers", h),
|
|
34
34
|
"aria-hidden": "true",
|
|
35
35
|
children: y.map((e, t) => /* @__PURE__ */ i("span", { children: t + 1 }, t))
|
|
36
36
|
}), /* @__PURE__ */ i("code", {
|
|
37
|
-
...n
|
|
37
|
+
...t(n, "code", h),
|
|
38
38
|
children: c ?? s
|
|
39
39
|
})]
|
|
40
40
|
})]
|
|
41
41
|
});
|
|
42
42
|
}
|
|
43
|
-
//#endregion
|
|
44
43
|
export { o as DEFAULT_CODE_BLOCK_LABELS, s as KapiCodeBlock };
|