@kapiuara/ui 0.22.0 → 0.23.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (368) hide show
  1. package/dist/components/chat/KapiChatDivider.js +1 -2
  2. package/dist/components/chat/KapiChatList.js +15 -16
  3. package/dist/components/chat/KapiChatThread.js +21 -22
  4. package/dist/components/chat/KapiComposer.js +23 -24
  5. package/dist/components/chat/KapiMessageBubble.js +5 -6
  6. package/dist/components/chat/KapiTypingIndicator.js +5 -6
  7. package/dist/components/chat/chatLogic.js +1 -2
  8. package/dist/components/data/KapiBarChart.js +22 -23
  9. package/dist/components/data/KapiDataTable.js +92 -93
  10. package/dist/components/data/KapiEventCalendar.js +96 -97
  11. package/dist/components/data/KapiHeatmap.js +21 -22
  12. package/dist/components/data/KapiLineChart.js +23 -24
  13. package/dist/components/data/KapiPagination.js +1 -2
  14. package/dist/components/data/KapiPaginationFooter.js +5 -6
  15. package/dist/components/data/KapiScatterChart.js +18 -19
  16. package/dist/components/data/KapiSheet.js +2 -3
  17. package/dist/components/data/KapiSparkline.js +1 -2
  18. package/dist/components/data/KapiTable.js +107 -108
  19. package/dist/components/data/KapiTableFilter.js +13 -14
  20. package/dist/components/data/KapiTableFooter.js +21 -22
  21. package/dist/components/data/KapiTableRow.js +10 -11
  22. package/dist/components/data/KapiTableToolbar.js +95 -96
  23. package/dist/components/data/barChartLogic.js +1 -2
  24. package/dist/components/data/chartFrame.js +13 -14
  25. package/dist/components/data/datasetSelectionLogic.js +1 -2
  26. package/dist/components/data/eventCalendarLogic.js +2 -3
  27. package/dist/components/data/heatmapLogic.js +1 -2
  28. package/dist/components/data/lineChartLogic.js +1 -2
  29. package/dist/components/data/rowClickLogic.js +2 -17
  30. package/dist/components/data/scatterLogic.js +1 -2
  31. package/dist/components/data/sparklineLogic.js +1 -2
  32. package/dist/components/data/tableCells.js +14 -15
  33. package/dist/components/data/tableHeaderMenu.js +1 -2
  34. package/dist/components/data/tableLabels.js +1 -2
  35. package/dist/components/data/tableLogic.js +0 -1
  36. package/dist/components/data/tablePaginationLogic.js +1 -2
  37. package/dist/components/data/tableResizeLogic.js +1 -2
  38. package/dist/components/data/tableSlots.js +1 -2
  39. package/dist/components/data/tableSpanLogic.js +1 -2
  40. package/dist/components/data/useColumnResize.js +23 -24
  41. package/dist/components/data/useRowKeyWarning.js +1 -2
  42. package/dist/components/data/useTableEdges.js +1 -2
  43. package/dist/components/data/useTableSelection.js +25 -26
  44. package/dist/components/display/KapiAnchor.js +7 -8
  45. package/dist/components/display/KapiAnnotation.js +15 -16
  46. package/dist/components/display/KapiAvatar.js +6 -7
  47. package/dist/components/display/KapiAvatarGroup.js +15 -16
  48. package/dist/components/display/KapiBadge.js +1 -2
  49. package/dist/components/display/KapiCodeBlock.js +14 -15
  50. package/dist/components/display/KapiComment.js +10 -11
  51. package/dist/components/display/KapiCommentComposer.js +13 -14
  52. package/dist/components/display/KapiDescriptionList.js +1 -2
  53. package/dist/components/display/KapiDiff.js +23 -24
  54. package/dist/components/display/KapiFileItem.js +13 -14
  55. package/dist/components/display/KapiFileViewer.js +17 -18
  56. package/dist/components/display/KapiHighlight.js +2 -3
  57. package/dist/components/display/KapiIconTile.js +2 -3
  58. package/dist/components/display/KapiStat.js +8 -9
  59. package/dist/components/display/KapiTag.js +6 -7
  60. package/dist/components/display/KapiText.js +5 -6
  61. package/dist/components/display/KapiTimeline.js +2 -3
  62. package/dist/components/display/KapiTitle.js +1 -2
  63. package/dist/components/display/KapiTruncate.js +5 -6
  64. package/dist/components/display/annotationLogic.js +1 -2
  65. package/dist/components/display/avatarGroupLogic.js +1 -2
  66. package/dist/components/display/avatarGroupSlots.js +1 -2
  67. package/dist/components/display/avatarLogic.js +1 -2
  68. package/dist/components/display/codeBlockSlots.js +1 -2
  69. package/dist/components/display/commentLogic.js +1 -2
  70. package/dist/components/display/diffLogic.js +1 -2
  71. package/dist/components/display/diffSlots.js +1 -2
  72. package/dist/components/display/fileItemLogic.js +1 -2
  73. package/dist/components/display/highlightLogic.js +1 -2
  74. package/dist/components/display/highlightSlots.js +1 -2
  75. package/dist/components/display/iconTileLogic.js +1 -2
  76. package/dist/components/display/statLogic.js +1 -2
  77. package/dist/components/display/tagLogic.js +1 -2
  78. package/dist/components/display/textLogic.js +1 -2
  79. package/dist/components/display/timelineLogic.js +1 -2
  80. package/dist/components/display/truncateLogic.js +1 -2
  81. package/dist/components/feedback/KapiAlert.js +6 -7
  82. package/dist/components/feedback/KapiBulkBar.js +5 -6
  83. package/dist/components/feedback/KapiCountdown.js +16 -17
  84. package/dist/components/feedback/KapiEmpty.js +2 -3
  85. package/dist/components/feedback/KapiFab.js +96 -97
  86. package/dist/components/feedback/KapiOfflineBanner.js +4 -5
  87. package/dist/components/feedback/KapiProgress.js +1 -2
  88. package/dist/components/feedback/KapiSkeleton.js +1 -2
  89. package/dist/components/feedback/KapiSpinner.js +5 -6
  90. package/dist/components/feedback/KapiToastContainer.js +28 -29
  91. package/dist/components/feedback/KapiTour.js +24 -25
  92. package/dist/components/feedback/KapiUnsavedBar.js +5 -6
  93. package/dist/components/feedback/alertSlots.js +1 -2
  94. package/dist/components/feedback/bulkBarLogic.js +1 -2
  95. package/dist/components/feedback/countdownLogic.js +1 -2
  96. package/dist/components/feedback/countdownSlots.js +1 -2
  97. package/dist/components/feedback/emptySlots.js +1 -2
  98. package/dist/components/feedback/fabLogic.js +1 -2
  99. package/dist/components/feedback/offlineBannerLogic.js +1 -2
  100. package/dist/components/feedback/progressLogic.js +1 -2
  101. package/dist/components/feedback/toastLayer.js +1 -2
  102. package/dist/components/feedback/toastStore.js +2 -3
  103. package/dist/components/feedback/tourLogic.js +1 -2
  104. package/dist/components/feedback/unsavedBarLogic.js +1 -2
  105. package/dist/components/inputs/KapiAutocomplete.js +23 -24
  106. package/dist/components/inputs/KapiButton.js +1 -2
  107. package/dist/components/inputs/KapiCalendar.js +12 -13
  108. package/dist/components/inputs/KapiCalendarGrid.js +15 -16
  109. package/dist/components/inputs/KapiCheckCard.js +4 -5
  110. package/dist/components/inputs/KapiCheckbox.js +1 -2
  111. package/dist/components/inputs/KapiChecklist.js +62 -63
  112. package/dist/components/inputs/KapiCopyButton.js +6 -7
  113. package/dist/components/inputs/KapiDatePicker.js +33 -34
  114. package/dist/components/inputs/KapiDateRangePicker.js +145 -146
  115. package/dist/components/inputs/KapiFacetedSearch.js +55 -56
  116. package/dist/components/inputs/KapiField.js +5 -6
  117. package/dist/components/inputs/KapiFileUpload.js +26 -27
  118. package/dist/components/inputs/KapiIconButton.js +1 -2
  119. package/dist/components/inputs/KapiInput.js +46 -47
  120. package/dist/components/inputs/KapiInputGroup.js +1 -2
  121. package/dist/components/inputs/KapiMaskedInput.js +50 -51
  122. package/dist/components/inputs/KapiNumberStepper.js +49 -50
  123. package/dist/components/inputs/KapiPinInput.js +9 -10
  124. package/dist/components/inputs/KapiPropsForm.js +43 -44
  125. package/dist/components/inputs/KapiRadio.js +1 -2
  126. package/dist/components/inputs/KapiRating.js +38 -39
  127. package/dist/components/inputs/KapiSearchChip.js +10 -11
  128. package/dist/components/inputs/KapiSegmented.js +65 -66
  129. package/dist/components/inputs/KapiSelect.js +198 -199
  130. package/dist/components/inputs/KapiSelectMenu.js +1 -2
  131. package/dist/components/inputs/KapiSlider.js +11 -12
  132. package/dist/components/inputs/KapiSwitch.js +6 -7
  133. package/dist/components/inputs/KapiTagInput.js +32 -33
  134. package/dist/components/inputs/KapiTextarea.js +22 -23
  135. package/dist/components/inputs/asyncSelectLogic.js +22 -23
  136. package/dist/components/inputs/autocompleteLogic.js +1 -2
  137. package/dist/components/inputs/checkControl.js +4 -5
  138. package/dist/components/inputs/checklistLogic.js +1 -2
  139. package/dist/components/inputs/copyLogic.js +1 -2
  140. package/dist/components/inputs/datePickerLogic.js +1 -2
  141. package/dist/components/inputs/dateRangeLogic.js +1 -2
  142. package/dist/components/inputs/facetedSearchLogic.js +1 -2
  143. package/dist/components/inputs/fieldLogic.js +1 -2
  144. package/dist/components/inputs/fileUploadLogic.js +1 -2
  145. package/dist/components/inputs/formBridgeLogic.js +1 -2
  146. package/dist/components/inputs/inputGroupLogic.js +1 -2
  147. package/dist/components/inputs/inputLogic.js +1 -2
  148. package/dist/components/inputs/maskLogic.js +0 -1
  149. package/dist/components/inputs/misuseWarnings.js +1 -2
  150. package/dist/components/inputs/numberStepLogic.js +1 -2
  151. package/dist/components/inputs/ownField.js +9 -10
  152. package/dist/components/inputs/pinInputLogic.js +1 -2
  153. package/dist/components/inputs/propsFormLogic.js +1 -2
  154. package/dist/components/inputs/ratingLogic.js +1 -2
  155. package/dist/components/inputs/searchChipLogic.js +1 -2
  156. package/dist/components/inputs/segmentedLogic.js +1 -2
  157. package/dist/components/inputs/selectKeyLogic.js +1 -2
  158. package/dist/components/inputs/selectLogic.js +1 -2
  159. package/dist/components/inputs/selectSlots.js +1 -2
  160. package/dist/components/inputs/sliderLogic.js +1 -2
  161. package/dist/components/inputs/tagInputLogic.js +1 -2
  162. package/dist/components/inputs/textareaLogic.js +1 -2
  163. package/dist/components/inputs/useCalendarFocus.js +1 -2
  164. package/dist/components/inputs/useDatePopSide.js +1 -2
  165. package/dist/components/inputs/useSelectCreate.js +1 -2
  166. package/dist/components/inputs/useSelectSource.js +11 -12
  167. package/dist/components/labelsLogic.js +1 -2
  168. package/dist/components/layout/KapiAccessCard.js +10 -11
  169. package/dist/components/layout/KapiAccountMenu.js +24 -25
  170. package/dist/components/layout/KapiBox.js +5 -6
  171. package/dist/components/layout/KapiCard.js +18 -19
  172. package/dist/components/layout/KapiCenter.js +1 -2
  173. package/dist/components/layout/KapiCluster.js +1 -2
  174. package/dist/components/layout/KapiCol.js +1 -2
  175. package/dist/components/layout/KapiCollapse.js +1 -2
  176. package/dist/components/layout/KapiContextSlot.js +98 -99
  177. package/dist/components/layout/KapiDivider.js +1 -2
  178. package/dist/components/layout/KapiGrid.js +9 -10
  179. package/dist/components/layout/KapiMasonry.js +1 -2
  180. package/dist/components/layout/KapiNotificationBell.js +53 -54
  181. package/dist/components/layout/KapiPageHeader.js +42 -43
  182. package/dist/components/layout/KapiPanelParts.js +43 -44
  183. package/dist/components/layout/KapiRail.js +103 -104
  184. package/dist/components/layout/KapiRailAccount.js +11 -12
  185. package/dist/components/layout/KapiRoot.js +33 -34
  186. package/dist/components/layout/KapiScrollArea.js +7 -8
  187. package/dist/components/layout/KapiShell.js +8 -9
  188. package/dist/components/layout/KapiStack.js +1 -2
  189. package/dist/components/layout/KapiThemeScript.js +1 -2
  190. package/dist/components/layout/accessCardLogic.js +1 -2
  191. package/dist/components/layout/cardLogic.js +1 -2
  192. package/dist/components/layout/cardSlots.js +1 -2
  193. package/dist/components/layout/gridSpanLogic.js +1 -2
  194. package/dist/components/layout/layoutPrimitives.js +1 -2
  195. package/dist/components/layout/masonryLogic.js +1 -2
  196. package/dist/components/layout/notificationBellLogic.js +1 -2
  197. package/dist/components/layout/pageHeaderLogic.js +1 -2
  198. package/dist/components/layout/pageHeaderSlots.js +1 -2
  199. package/dist/components/layout/railContext.js +1 -2
  200. package/dist/components/layout/railLogic.js +1 -2
  201. package/dist/components/layout/railSlots.js +1 -2
  202. package/dist/components/layout/reopenBus.js +1 -2
  203. package/dist/components/layout/shellSlots.js +1 -2
  204. package/dist/components/layout/useGridBreakpoint.js +1 -2
  205. package/dist/components/layout/useMasonrySpans.js +6 -7
  206. package/dist/components/layout/useRailOverflow.js +7 -8
  207. package/dist/components/locale/KapiLocaleProvider.js +1 -2
  208. package/dist/components/locale/linkLabels.js +1 -2
  209. package/dist/components/locale/localeLogic.js +1 -2
  210. package/dist/components/navigation/CtxSlidingList.js +7 -8
  211. package/dist/components/navigation/KapiAccordion.js +11 -12
  212. package/dist/components/navigation/KapiBreadcrumb.js +11 -12
  213. package/dist/components/navigation/KapiCollapsiblePanel.js +13 -14
  214. package/dist/components/navigation/KapiContextPanel.js +138 -139
  215. package/dist/components/navigation/KapiFilterChips.js +25 -22
  216. package/dist/components/navigation/KapiNavBadge.js +6 -7
  217. package/dist/components/navigation/KapiPanelGroup.js +34 -35
  218. package/dist/components/navigation/KapiSteps.js +41 -36
  219. package/dist/components/navigation/KapiTabs.js +40 -41
  220. package/dist/components/navigation/KapiToc.js +15 -16
  221. package/dist/components/navigation/KapiTree.js +126 -124
  222. package/dist/components/navigation/KapiWizard.js +12 -13
  223. package/dist/components/navigation/MiniNavItem.js +11 -12
  224. package/dist/components/navigation/accordionLogic.js +1 -2
  225. package/dist/components/navigation/activeItemLogic.js +1 -2
  226. package/dist/components/navigation/breadcrumbLogic.js +1 -2
  227. package/dist/components/navigation/contextPanelLogic.js +1 -2
  228. package/dist/components/navigation/filterChipsLogic.d.ts +9 -1
  229. package/dist/components/navigation/filterChipsLogic.js +2 -3
  230. package/dist/components/navigation/navBadgeLogic.js +1 -2
  231. package/dist/components/navigation/navLink.js +1 -2
  232. package/dist/components/navigation/navLinkLogic.js +1 -2
  233. package/dist/components/navigation/panelGroupLogic.js +1 -2
  234. package/dist/components/navigation/panelMini.js +0 -1
  235. package/dist/components/navigation/panelMiniLogic.js +1 -2
  236. package/dist/components/navigation/stepsLogic.js +1 -2
  237. package/dist/components/navigation/tabsLogic.js +1 -2
  238. package/dist/components/navigation/tocLogic.js +1 -2
  239. package/dist/components/navigation/tocSlots.js +1 -2
  240. package/dist/components/navigation/treeLogic.js +1 -2
  241. package/dist/components/navigation/wizardLogic.js +1 -2
  242. package/dist/components/overlays/KapiCanvasForm.js +5 -6
  243. package/dist/components/overlays/KapiCommandPalette.js +45 -45
  244. package/dist/components/overlays/KapiConfirm.js +9 -10
  245. package/dist/components/overlays/KapiContextMenu.js +16 -17
  246. package/dist/components/overlays/KapiDialogHost.js +50 -51
  247. package/dist/components/overlays/KapiDropdown.js +2 -3
  248. package/dist/components/overlays/KapiImageViewer.js +8 -9
  249. package/dist/components/overlays/KapiLoading.js +7 -8
  250. package/dist/components/overlays/KapiMenuButton.js +19 -20
  251. package/dist/components/overlays/KapiModal.js +58 -59
  252. package/dist/components/overlays/KapiOffcanvas.js +146 -147
  253. package/dist/components/overlays/KapiOffcanvasStack.js +18 -19
  254. package/dist/components/overlays/KapiPhotoView.js +21 -22
  255. package/dist/components/overlays/KapiPopover.js +12 -13
  256. package/dist/components/overlays/KapiShapeSheet.js +11 -12
  257. package/dist/components/overlays/KapiShortcutsHelp.js +18 -19
  258. package/dist/components/overlays/KapiSplitModal.js +20 -21
  259. package/dist/components/overlays/KapiTooltip.js +46 -47
  260. package/dist/components/overlays/KapiViewport.js +17 -18
  261. package/dist/components/overlays/canvasFormLogic.js +1 -2
  262. package/dist/components/overlays/commandPaletteLogic.js +1 -2
  263. package/dist/components/overlays/dialogStore.js +3 -4
  264. package/dist/components/overlays/dialogUtils.js +1 -2
  265. package/dist/components/overlays/exitPresenceLogic.js +1 -2
  266. package/dist/components/overlays/menuButtonLogic.js +1 -2
  267. package/dist/components/overlays/menuKeyboardLogic.js +1 -2
  268. package/dist/components/overlays/menuList.js +94 -95
  269. package/dist/components/overlays/modalSlots.js +1 -2
  270. package/dist/components/overlays/modalStack.js +1 -2
  271. package/dist/components/overlays/offcanvasCompanion.js +1 -2
  272. package/dist/components/overlays/offcanvasResize.js +0 -1
  273. package/dist/components/overlays/offcanvasSide.js +1 -2
  274. package/dist/components/overlays/offcanvasStack.js +1 -2
  275. package/dist/components/overlays/overlayPortal.js +1 -2
  276. package/dist/components/overlays/popoverLogic.js +1 -2
  277. package/dist/components/overlays/shortcutsHelpSlots.js +1 -2
  278. package/dist/components/overlays/splitModalLayout.js +1 -2
  279. package/dist/components/overlays/useExitPresence.js +11 -12
  280. package/dist/components/overlays/useNativeDialog.js +21 -22
  281. package/dist/components/overlays/viewportLogic.js +1 -2
  282. package/dist/components/renderSlot.js +1 -2
  283. package/dist/components/rootProps.js +1 -2
  284. package/dist/components/slotCatalog.js +33 -34
  285. package/dist/components/slotsLogic.js +1 -2
  286. package/dist/components/tone.js +1 -2
  287. package/dist/css/base.css +1 -1
  288. package/dist/css/components/navigation/navigation.css +1 -1
  289. package/dist/css/components/overlays/KapiViewport.css +1 -1
  290. package/dist/hooks/asyncResourceLogic.js +1 -2
  291. package/dist/hooks/breakpointOpenLogic.js +1 -2
  292. package/dist/hooks/colorLogic.js +1 -2
  293. package/dist/hooks/dateFormat.js +1 -2
  294. package/dist/hooks/densityLogic.js +1 -2
  295. package/dist/hooks/directionLogic.js +1 -2
  296. package/dist/hooks/downloadLogic.js +1 -2
  297. package/dist/hooks/elementSizeLogic.js +1 -2
  298. package/dist/hooks/fieldErrorsLogic.js +1 -2
  299. package/dist/hooks/focusLogic.js +2 -11
  300. package/dist/hooks/growOriginLogic.js +1 -2
  301. package/dist/hooks/hotkeyLogic.js +1 -2
  302. package/dist/hooks/hotkeyRegistry.js +1 -2
  303. package/dist/hooks/kapiRoot.js +2 -3
  304. package/dist/hooks/mergeRefs.js +1 -2
  305. package/dist/hooks/numberFormatLogic.js +1 -2
  306. package/dist/hooks/onlineStatusLogic.js +1 -2
  307. package/dist/hooks/ownerDocument.js +1 -2
  308. package/dist/hooks/persistentStateLogic.js +1 -2
  309. package/dist/hooks/portalRoot.js +1 -2
  310. package/dist/hooks/rafThrottle.js +1 -2
  311. package/dist/hooks/rangeSelectLogic.js +1 -2
  312. package/dist/hooks/recentLogic.js +1 -2
  313. package/dist/hooks/reducedMotion.js +8 -9
  314. package/dist/hooks/rightClick.js +10 -11
  315. package/dist/hooks/scrollCollapseLogic.js +1 -2
  316. package/dist/hooks/scrollEdgesLogic.js +1 -2
  317. package/dist/hooks/shallowStable.js +1 -2
  318. package/dist/hooks/slidingIndicatorLogic.js +1 -2
  319. package/dist/hooks/storageLogic.js +1 -2
  320. package/dist/hooks/themeColorsLogic.js +1 -2
  321. package/dist/hooks/themeContrastLogic.js +1 -2
  322. package/dist/hooks/themeDeriveLogic.js +0 -1
  323. package/dist/hooks/themeRadiiLogic.js +1 -2
  324. package/dist/hooks/themeScript.js +1 -2
  325. package/dist/hooks/toneFamilyLogic.js +1 -2
  326. package/dist/hooks/unsavedGuardLogic.js +1 -2
  327. package/dist/hooks/useAsyncLoader.js +1 -2
  328. package/dist/hooks/useAsyncResource.js +5 -6
  329. package/dist/hooks/useAsyncTasks.js +1 -2
  330. package/dist/hooks/useBottomBarInset.js +9 -10
  331. package/dist/hooks/useControllableState.js +1 -2
  332. package/dist/hooks/useDebouncedValue.js +1 -2
  333. package/dist/hooks/useDisclosure.js +1 -2
  334. package/dist/hooks/useDismiss.js +10 -11
  335. package/dist/hooks/useDragScroll.js +12 -13
  336. package/dist/hooks/useElementSize.js +1 -2
  337. package/dist/hooks/useFieldErrors.js +1 -2
  338. package/dist/hooks/useFocusReturn.js +1 -2
  339. package/dist/hooks/useFormReset.js +1 -2
  340. package/dist/hooks/useGlobalRightClick.js +1 -2
  341. package/dist/hooks/useGrowOrigin.js +1 -2
  342. package/dist/hooks/useHotkey.js +1 -2
  343. package/dist/hooks/useHydrated.js +1 -2
  344. package/dist/hooks/useKapiTheme.js +55 -56
  345. package/dist/hooks/useMediaQuery.js +1 -2
  346. package/dist/hooks/useObjectUrl.js +1 -2
  347. package/dist/hooks/useOnlineStatus.js +1 -2
  348. package/dist/hooks/useOutsidePress.js +1 -2
  349. package/dist/hooks/usePersistentState.js +9 -10
  350. package/dist/hooks/usePlacement.js +15 -16
  351. package/dist/hooks/useRangeSelect.js +2 -3
  352. package/dist/hooks/useRecent.js +6 -7
  353. package/dist/hooks/useScrollCollapse.js +1 -2
  354. package/dist/hooks/useScrollEdges.js +25 -26
  355. package/dist/hooks/useSlidingIndicator.js +19 -20
  356. package/dist/hooks/useSubmitDraft.js +1 -2
  357. package/dist/hooks/useToneFamilies.js +0 -1
  358. package/dist/hooks/useTypeahead.js +1 -2
  359. package/dist/hooks/useUnsavedGuard.js +5 -6
  360. package/dist/hooks/useVirtualList.js +1 -2
  361. package/dist/hooks/useWheelZoom.js +1 -2
  362. package/dist/hooks/viewportInsetLogic.js +1 -2
  363. package/dist/hooks/virtualListLogic.js +0 -1
  364. package/dist/hooks/wheelZoomLogic.js +1 -2
  365. package/dist/kapi.css +1 -1
  366. package/dist/kapi.layered.css +1 -1
  367. package/dist/logic.js +45 -45
  368. package/package.json +35 -36
@@ -1,5 +1,5 @@
1
1
  import { headerMenuActions as e } from "./tableLogic.js";
2
- //#region src/components/data/tableHeaderMenu.ts
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
- //#region src/components/data/tableLabels.ts
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
- //#region src/components/data/tablePaginationLogic.ts
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
- //#region src/components/data/tableResizeLogic.ts
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
- //#region src/components/data/tableSlots.ts
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
- //#region src/components/data/tableSpanLogic.ts
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 { directionOf as t, logicalKeyOf as n } from "../../hooks/directionLogic.js";
4
- import { clampColumnWidth as r, resizeColumn as i } from "./tableLogic.js";
5
- import { draftStickyLefts as a, draftStickyRights as o, endResizeDrag as s, moveResizeDrag as c, needsDraftLeftPaint as l, startResizeDrag as u } from "./tableResizeLogic.js";
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
- //#region src/components/data/useColumnResize.tsx
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) => r(b[e.key] ?? e.width ?? j[e.key] ?? A(e), A(e)), P = d(() => {
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, r = a(n.columns, n.widths, e.key, e.width, n.offset), i = o(n.columns, n.widths, e.key, e.width, n.rightEnd);
48
- n.columns.forEach((a, o) => {
49
- let s = a.key === e.key, c = l(r[o], n.lefts[o], L.current.get(a.key)), u = l(i[o], n.rights[o], R.current.get(a.key));
50
- if (!s && !c && !u) return;
51
- L.current.set(a.key, r[o]), R.current.set(a.key, i[o]);
52
- let d = `[data-col="${_(a.key)}"]`;
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), s) {
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 = r[o];
58
+ let n = a[i];
59
59
  n !== void 0 && (t.style.insetInlineStart = `${n}px`);
60
- let a = i[o];
61
- a !== void 0 && (t.style.insetInlineEnd = `${a}px`);
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, n) => {
70
+ let V = (e, t) => {
71
71
  if (e.button !== 0) return;
72
72
  e.preventDefault(), e.stopPropagation();
73
- let r = e.currentTarget.parentElement, i = r ? r.getBoundingClientRect().width : n.width ?? 120;
74
- O.current = u(n.key, e.clientX, i, A(n), t(e.currentTarget) === "rtl"), e.currentTarget.setPointerCapture(e.pointerId);
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 = c(t, e.clientX);
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 : c(t, e.clientX) ?? t, r = s(n, b, e.type === "pointercancel" ? "cancel" : "commit");
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 = n(e);
87
+ let r = u(e);
88
88
  if (r !== "ArrowLeft" && r !== "ArrowRight") return;
89
89
  e.preventDefault();
90
- let a = e.currentTarget.parentElement, o = b[t.key] ?? (a ? a.getBoundingClientRect().width : t.width ?? 120), s = r === "ArrowRight" ? 16 : -16;
91
- x(i(b, t.key, o, s, A(t)));
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
- //#region src/components/data/useRowKeyWarning.ts
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
- //#region src/components/data/useTableEdges.ts
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 { useRangeSelect as t } from "../../hooks/useRangeSelect.js";
4
- import { slot as n } from "../slotsLogic.js";
5
- import { formatCount as r } from "../../hooks/numberFormatLogic.js";
6
- import { selectOnlyWithin as i, selectionState as a } from "./tableLogic.js";
7
- import { TABLE_SLOTS as o } from "./tableSlots.js";
8
- import { datasetActionLabel as s, datasetHintLabel as c, datasetNoticeState as l, datasetSelectedLabel as u } from "./datasetSelectionLogic.js";
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
- //#region src/components/data/useTableSelection.tsx
13
- var g = [], _ = ({ rows: n, claveDe: o, selectable: s, selectedIds: c, defaultSelectedIds: u, onSelectedIdsChange: _, isRowSelectable: v, selectionPresets: y, rangeSelect: b, dataset: x, loadingLabel: S, locale: C }) => {
14
- let [w, T] = e(c, u ?? g, _ && ((e) => _([...e]))), E = d(() => new Set(w), [w]), D = (e) => T([...e]), O = () => D(/* @__PURE__ */ new Set()), k = [...E], A = t(), j = s && y !== void 0 && y.length > 0, M = d(() => n.filter((e) => !v || v(e)), [n, v]), N = d(() => M.map((e) => o(e)), [M, o]), P = d(() => j && y ? y.map((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) => o(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
- o
22
- ]).map(({ preset: e, matching: t }) => {
23
- let n = e.onSelect === void 0 ? t.length : e.count, a = e.pending === !0, o = a ? /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p(h, {
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: a ? e.label : `${e.label} (${r(n, C)})`,
34
- ...o !== void 0 && { icon: o },
35
- disabled: a || n === 0,
36
- onClick: e.onSelect ?? (() => D(i(E, N, t)))
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 = a(N, E);
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 && s ? l({
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: r, clearLabel: i, labels: a, locale: l, classNames: d }) {
65
- let h = n(o, "datasetNotice", d);
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(r, e.total) : c(r, e.total, a, l) }), /* @__PURE__ */ p("button", {
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) : s(e.total, a, l)
75
- })] }), t === "selected" && /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p("span", { children: e.selectedLabel ? e.selectedLabel(e.total) : u(e.total, a, l) }), e.onClear && /* @__PURE__ */ p("button", {
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: i
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 { joinClasses as e } from "../rootProps.js";
4
- import { renderSlot as t } from "../renderSlot.js";
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 { DEFAULT_LINK_LABELS as r } from "../locale/linkLabels.js";
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
- //#region src/components/display/KapiAnchor.tsx
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", r, f), S = d || h === "_blank", C = {
13
- className: e("kapi-link", "kapi-anchor", ...i({
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 t(p, C, T, (e) => /* @__PURE__ */ o("a", { ...e }));
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 { useToneLook as e } from "../../hooks/useToneFamilies.js";
4
- import { useMergedRefs as t } from "../../hooks/mergeRefs.js";
5
- import { joinIds as ee } from "../inputs/fieldLogic.js";
6
- import { resolveKapiRoot as n } from "../../hooks/kapiRoot.js";
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
- //#region src/components/display/KapiAnnotation.tsx
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 = t(O, T), [A, j] = u(!1), [M, N] = u(!1), P = l(null), F = l(void 0), { element: I, tabIndex: L, mode: R } = s(b, x, v), z = e("KapiAnnotation", ne), B = o({
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 } = r({
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 = i(A && S, {
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(a, {
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": ee(E["aria-describedby"], A && D),
88
+ "aria-describedby": a(E["aria-describedby"], A && D),
89
89
  onFocus: U,
90
90
  onBlur: K
91
- }, $ = A ? n(O.current) : null;
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 { useToneLook as e } from "../../hooks/useToneFamilies.js";
4
- import { isFamilyTone as t, resolveTone as n } from "../tone.js";
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
- //#region src/components/display/KapiAvatar.tsx
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 _ = n(f, p, "auto"), v = t(_), y = e("KapiAvatar", v ? _ : void 0), b = v || _ === "auto" ? o[r(c, o.length)] ?? "neutral" : _, x = c || l || "", S = typeof d == "number" ? d : void 0, C = S === void 0 ? h : {
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 ?? i(c)
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 { useLabels as e } from "../locale/KapiLocaleProvider.js";
4
- import { slot as t } from "../slotsLogic.js";
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 { KapiAvatar as n } from "./KapiAvatar.js";
7
- import { avatarOverlapPx as r, overflowLabel as i, splitAvatarGroup as a } from "./avatarGroupLogic.js";
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
- //#region src/components/display/KapiAvatarGroup.tsx
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 = e("avatarGroup", l, m), { visible: b, overflow: x } = a(d, f), S = typeof p == "number" ? p : u[p], C = {
18
- "--kapi-avatargroup-overlap": `${r(S)}px`,
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
- ...t(o, "root", g, h),
23
+ ...a(o, "root", g, h),
24
24
  style: C,
25
25
  role: "group",
26
- children: [b.map((e, r) => /* @__PURE__ */ s(n, {
27
- ...t(o, "item", g),
28
- title: e.name,
26
+ children: [b.map((t, n) => /* @__PURE__ */ s(e, {
27
+ ...a(o, "item", g),
28
+ title: t.name,
29
29
  size: p,
30
- ...e
31
- }, `${e.name ?? e.initials ?? ""}-${r}`)), x > 0 && /* @__PURE__ */ s(n, {
32
- ...t(o, "more", g, o.parts.item, "kapi-avatargroup__more", g?.item),
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: i(x),
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
- //#region src/components/display/KapiBadge.tsx
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 { useLabels as e } from "../locale/KapiLocaleProvider.js";
4
- import { KapiCopyButton as t } from "../inputs/KapiCopyButton.js";
5
- import { slot as n } from "../slotsLogic.js";
6
- import { CODE_BLOCK_SLOTS as r } from "./codeBlockSlots.js";
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
- //#region src/components/display/KapiCodeBlock.tsx
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 = e("codeBlock", o, m), y = p ? s.split("\n") : null;
12
+ let v = r("codeBlock", o, m), y = p ? s.split("\n") : null;
13
13
  return /* @__PURE__ */ a("figure", {
14
14
  ..._,
15
- ...n(r, "root", h, g),
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(r, "bar", h),
19
+ ...t(n, "bar", h),
20
20
  children: [/* @__PURE__ */ i("span", {
21
- ...n(r, "title", h),
21
+ ...t(n, "title", h),
22
22
  children: u
23
- }), !d && /* @__PURE__ */ i(t, {
23
+ }), !d && /* @__PURE__ */ i(e, {
24
24
  value: s,
25
25
  size: "sm",
26
26
  variant: "ghost",
27
27
  ...f ? { onCopy: f } : {},
28
- ...n(r, "copy", h)
28
+ ...t(n, "copy", h)
29
29
  })]
30
30
  }), /* @__PURE__ */ a("pre", {
31
- ...n(r, "pre", h),
31
+ ...t(n, "pre", h),
32
32
  children: [y && /* @__PURE__ */ i("span", {
33
- ...n(r, "numbers", h),
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(r, "code", h),
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 };