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