@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,231 +1,230 @@
1
1
  "use client";
2
2
  import "#kapi-css/components/overlays/KapiOffcanvas.css";
3
- import { joinClasses as e } from "../rootProps.js";
4
- import { useMergedRefs as t } from "../../hooks/mergeRefs.js";
5
- import { useKapiDir as n, useLabels as r } from "../locale/KapiLocaleProvider.js";
6
- import { computedStyleOf as i, winOf as a } from "../../hooks/ownerDocument.js";
7
- import { resolveDirection as o } from "../../hooks/directionLogic.js";
8
- import { maxTransitionMs as ee, resolveDismiss as s } from "./dialogUtils.js";
9
- import { useExitPresence as c } from "./useExitPresence.js";
10
- import { useBackdropClose as l, useNativeDialog as u, usePortalRoot as d, useTrappedDialogWarning as f } from "./useNativeDialog.js";
11
- import { DEFAULT_PUSH_RATIO as te, depthOf as ne, levelOf as re, offcanvasStackStore as p, phaseReducer as m, pushTransform as ie } from "./offcanvasStack.js";
12
- import { normalizeSide as ae, pushForSide as oe, resolveOffcanvasSide as h, sideDataAttr as se, sizeVar as ce } from "./offcanvasSide.js";
13
- import { companionDockClasses as le, isCompanionActive as ue, resolveCompanionOrder as de, resolveCompanionWidth as fe, supportsCompanion as pe } from "./offcanvasCompanion.js";
14
- import { resolveInitialWidth as me, resolveMaxWidth as g, stepOffcanvasWidth as he, widthFromDrag as ge } from "./offcanvasResize.js";
3
+ import { maxTransitionMs as e, resolveDismiss as t } from "./dialogUtils.js";
4
+ import { DEFAULT_PUSH_RATIO as n, depthOf as r, levelOf as i, offcanvasStackStore as a, phaseReducer as o, pushTransform as s } from "./offcanvasStack.js";
5
+ import { companionDockClasses as c, isCompanionActive as l, resolveCompanionOrder as u, resolveCompanionWidth as d, supportsCompanion as f } from "./offcanvasCompanion.js";
6
+ import { resolveInitialWidth as ee, resolveMaxWidth as p, stepOffcanvasWidth as te, widthFromDrag as ne } from "./offcanvasResize.js";
7
+ import { normalizeSide as re, pushForSide as ie, resolveOffcanvasSide as m, sideDataAttr as ae, sizeVar as oe } from "./offcanvasSide.js";
8
+ import { useBackdropClose as se, useNativeDialog as ce, usePortalRoot as h, useTrappedDialogWarning as le } from "./useNativeDialog.js";
9
+ import { useExitPresence as ue } from "./useExitPresence.js";
15
10
  /* empty css */
16
- import { useEffect as _e, useId as _, useLayoutEffect as v, useReducer as ve, useRef as y, useState as b, useSyncExternalStore as ye } from "react";
17
- import { jsx as x, jsxs as S } from "react/jsx-runtime";
18
- import { X as C } from "lucide-react";
19
- import { createPortal as w } from "react-dom";
20
- var be = 120, T = {
11
+ import { useKapiDir as g, useLabels as de } from "../locale/KapiLocaleProvider.js";
12
+ import { resolveDirection as _ } from "../../hooks/directionLogic.js";
13
+ import { joinClasses as fe } from "../rootProps.js";
14
+ import { useMergedRefs as pe } from "../../hooks/mergeRefs.js";
15
+ import { computedStyleOf as me, winOf as v } from "../../hooks/ownerDocument.js";
16
+ import { useEffect as he, useId as y, useLayoutEffect as b, useReducer as x, useRef as S, useState as ge, useSyncExternalStore as _e } from "react";
17
+ import { jsx as C, jsxs as w } from "react/jsx-runtime";
18
+ import { X as ve } from "lucide-react";
19
+ import { createPortal as T } from "react-dom";
20
+ var ye = 120, E = {
21
21
  resize: "Redimensionar panel",
22
22
  close: "Cerrar",
23
23
  closePanel: "Cerrar panel"
24
- }, E = ({ textDir: n, stackId: o, phase: d, onEntered: m, onExited: h, onClose: ve, title: w, subtitle: E, children: D, footer: O, side: xe, width: k = 520, height: Se, pushRatio: Ce = te, pushOffset: we = 16, closeOnBackdrop: Te, closeOnEscape: Ee, closeButton: De, dismissible: Oe, closeLabel: ke, labels: Ae, className: je, style: Me, id: Ne, ref: Pe, companion: A, resizable: Fe = !1, minWidth: j = 320, maxWidth: M, onResize: Ie }) => {
25
- let N = r("offcanvas", T, Ae), Le = ke ?? N.close, P = _(), F = _(), I = ae(xe), L = y(null), R = ye(p.subscribe, p.getSnapshot, p.getServerSnapshot), z = ne(R, o), Re = Math.max(0, re(R, o)), { scale: ze, translateX: Be } = oe(I, ie(z, Ce, we)), [B, Ve] = b(() => me(k, 520)), [He, V] = b(!1), H = y(null), U = y(Ie);
26
- U.current = Ie;
27
- let W = (e) => {
28
- Ve(e), e !== B && U.current?.(e);
29
- }, Ue = (e) => {
24
+ }, D = ({ textDir: o, stackId: m, phase: h, onEntered: g, onExited: _, onClose: x, title: T, subtitle: D, children: O, footer: k, side: be, width: A = 520, height: xe, pushRatio: Se = n, pushOffset: Ce = 16, closeOnBackdrop: we, closeOnEscape: Te, closeButton: Ee, dismissible: De, closeLabel: Oe, labels: ke, className: Ae, style: je, id: Me, ref: Ne, companion: j, resizable: Pe = !1, minWidth: M = 320, maxWidth: N, onResize: Fe }) => {
25
+ let P = de("offcanvas", E, ke), Ie = Oe ?? P.close, F = y(), I = y(), L = re(be), R = S(null), z = _e(a.subscribe, a.getSnapshot, a.getServerSnapshot), B = r(z, m), Le = Math.max(0, i(z, m)), { scale: Re, translateX: ze } = ie(L, s(B, Se, Ce)), [V, Be] = ge(() => ee(A, 520)), [Ve, H] = ge(!1), U = S(null), W = S(Fe);
26
+ W.current = Fe;
27
+ let G = (e) => {
28
+ Be(e), e !== V && W.current?.(e);
29
+ }, He = (e) => {
30
30
  if (e.button !== 0) return;
31
- let t = L.current?.offsetWidth ?? B;
32
- H.current = {
31
+ let t = R.current?.offsetWidth ?? V;
32
+ U.current = {
33
33
  startX: e.clientX,
34
34
  startWidth: t
35
- }, e.currentTarget.setPointerCapture(e.pointerId), V(!0), e.preventDefault();
36
- }, We = (e) => {
37
- let t = H.current;
35
+ }, e.currentTarget.setPointerCapture(e.pointerId), H(!0), e.preventDefault();
36
+ }, Ue = (e) => {
37
+ let t = U.current;
38
38
  if (!t) return;
39
- let n = g(M, (a(L.current) ?? window).innerWidth);
40
- W(ge(I, t.startWidth, t.startX, e.clientX, j, n));
41
- }, G = (e) => {
42
- H.current = null, e.currentTarget.hasPointerCapture(e.pointerId) && e.currentTarget.releasePointerCapture(e.pointerId), V(!1);
43
- }, Ge = (e) => {
44
- let t = g(M, (a(L.current) ?? window).innerWidth), n = he(I, B, e.key, j, t);
45
- n !== null && (e.preventDefault(), e.stopPropagation(), W(n));
46
- }, K = d === "open" ? ve : void 0, q = s({
47
- dismissible: Oe,
48
- closeOnEscape: Ee,
49
- closeOnBackdrop: Te,
50
- closeButton: De
51
- }), { closeOnEscape: Ke, closeOnBackdrop: qe, closeButton: Je } = q, { ref: J, dialogProps: Ye } = u({ onRequestClose: Ke ? () => K?.("escape") : void 0 }), Xe = t(J, Pe), Ze = l(qe ? () => K?.("backdrop") : void 0);
52
- f("KapiOffcanvas", q, J), v(() => (p.dispatch({
39
+ let n = p(N, (v(R.current) ?? window).innerWidth);
40
+ G(ne(L, t.startWidth, t.startX, e.clientX, M, n));
41
+ }, K = (e) => {
42
+ U.current = null, e.currentTarget.hasPointerCapture(e.pointerId) && e.currentTarget.releasePointerCapture(e.pointerId), H(!1);
43
+ }, We = (e) => {
44
+ let t = p(N, (v(R.current) ?? window).innerWidth), n = te(L, V, e.key, M, t);
45
+ n !== null && (e.preventDefault(), e.stopPropagation(), G(n));
46
+ }, q = h === "open" ? x : void 0, J = t({
47
+ dismissible: De,
48
+ closeOnEscape: Te,
49
+ closeOnBackdrop: we,
50
+ closeButton: Ee
51
+ }), { closeOnEscape: Ge, closeOnBackdrop: Ke, closeButton: qe } = J, { ref: Y, dialogProps: Je } = ce({ onRequestClose: Ge ? () => q?.("escape") : void 0 }), Ye = pe(Y, Ne), Xe = se(Ke ? () => q?.("backdrop") : void 0);
52
+ le("KapiOffcanvas", J, Y), b(() => (a.dispatch({
53
53
  type: "add",
54
- id: o
55
- }), () => p.dispatch({
54
+ id: m
55
+ }), () => a.dispatch({
56
56
  type: "remove",
57
- id: o
58
- })), [o]);
59
- let Y = y(m);
60
- Y.current = m, v(() => {
61
- L.current?.getBoundingClientRect(), Y.current();
57
+ id: m
58
+ })), [m]);
59
+ let X = S(g);
60
+ X.current = g, b(() => {
61
+ R.current?.getBoundingClientRect(), X.current();
62
62
  }, []);
63
- let X = y(h);
64
- X.current = h, _e(() => {
65
- if (d !== "exit") return;
66
- let e = L.current;
67
- if (!e) {
68
- X.current();
63
+ let Z = S(_);
64
+ Z.current = _, he(() => {
65
+ if (h !== "exit") return;
66
+ let t = R.current;
67
+ if (!t) {
68
+ Z.current();
69
69
  return;
70
70
  }
71
- let t = i(e), n = ee(t.transitionDuration, t.transitionDelay);
72
- if (n <= 0) {
73
- X.current();
71
+ let n = me(t), r = e(n.transitionDuration, n.transitionDelay);
72
+ if (r <= 0) {
73
+ Z.current();
74
74
  return;
75
75
  }
76
- let r = !1, a = () => {
77
- r || (r = !0, X.current());
78
- }, o = (t) => {
79
- t.target === e && t.propertyName === "transform" && a();
76
+ let i = !1, a = () => {
77
+ i || (i = !0, Z.current());
78
+ }, o = (e) => {
79
+ e.target === t && e.propertyName === "transform" && a();
80
80
  };
81
- e.addEventListener("transitionend", o);
82
- let s = window.setTimeout(a, n + be);
81
+ t.addEventListener("transitionend", o);
82
+ let s = window.setTimeout(a, r + ye);
83
83
  return () => {
84
- r = !0, e.removeEventListener("transitionend", o), window.clearTimeout(s);
84
+ i = !0, t.removeEventListener("transitionend", o), window.clearTimeout(s);
85
85
  };
86
- }, [d]);
87
- let Z = Fe && (I === "left" || I === "right"), Q = ce(I, k, Se, "520px");
88
- Z && (Q.value = `${B}px`);
86
+ }, [h]);
87
+ let Ze = Pe && (L === "left" || L === "right"), Q = oe(L, A, xe, "520px");
88
+ Ze && (Q.value = `${V}px`);
89
89
  let Qe = {
90
- ...Me,
90
+ ...je,
91
91
  [Q.name]: Q.value,
92
- "--kapi-offc-push-x": `${Be}px`,
93
- "--kapi-offc-push-s": ze
94
- }, $e = ue(I, A), et = y(null), { present: tt, closing: nt } = c($e, et), rt = y(A);
95
- A && (rt.current = A);
96
- let $ = A ?? rt.current, it = tt && pe(I) && $ !== void 0, at = n === "rtl", ot = at ? { dir: "rtl" } : {}, st = /* @__PURE__ */ S("div", {
97
- ref: L,
92
+ "--kapi-offc-push-x": `${ze}px`,
93
+ "--kapi-offc-push-s": Re
94
+ }, $e = l(L, j), et = S(null), { present: tt, closing: nt } = ue($e, et), rt = S(j);
95
+ j && (rt.current = j);
96
+ let $ = j ?? rt.current, it = tt && f(L) && $ !== void 0, at = o === "rtl", ot = at ? { dir: "rtl" } : {}, st = /* @__PURE__ */ w("div", {
97
+ ref: R,
98
98
  className: "kapi-offc__panel",
99
99
  ...ot,
100
100
  children: [
101
- Z && /* @__PURE__ */ x("div", {
101
+ Ze && /* @__PURE__ */ C("div", {
102
102
  className: "kapi-offc__resize",
103
103
  role: "separator",
104
104
  "aria-orientation": "vertical",
105
- "aria-label": N.resize,
106
- "aria-valuemin": j,
107
- "aria-valuemax": g(M, typeof window > "u" ? void 0 : window.innerWidth),
108
- "aria-valuenow": B,
105
+ "aria-label": P.resize,
106
+ "aria-valuemin": M,
107
+ "aria-valuemax": p(N, typeof window > "u" ? void 0 : window.innerWidth),
108
+ "aria-valuenow": V,
109
109
  tabIndex: 0,
110
- onPointerDown: Ue,
111
- onPointerMove: We,
112
- onPointerUp: G,
113
- onPointerCancel: G,
114
- onKeyDown: Ge
110
+ onPointerDown: He,
111
+ onPointerMove: Ue,
112
+ onPointerUp: K,
113
+ onPointerCancel: K,
114
+ onKeyDown: We
115
115
  }),
116
- /* @__PURE__ */ S("div", {
116
+ /* @__PURE__ */ w("div", {
117
117
  className: "kapi-offc__head",
118
- children: [/* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("div", {
119
- id: P,
118
+ children: [/* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("div", {
119
+ id: F,
120
120
  className: "kapi-modal__title",
121
- children: w
122
- }), E && /* @__PURE__ */ x("div", {
121
+ children: T
122
+ }), D && /* @__PURE__ */ C("div", {
123
123
  className: "kapi-modal__sub",
124
- children: E
125
- })] }), Je && /* @__PURE__ */ x("button", {
124
+ children: D
125
+ })] }), qe && /* @__PURE__ */ C("button", {
126
126
  type: "button",
127
127
  className: "kapi-modal__x",
128
- onClick: () => K?.("close-button"),
129
- "aria-label": Le,
130
- children: /* @__PURE__ */ x(C, {
128
+ onClick: () => q?.("close-button"),
129
+ "aria-label": Ie,
130
+ children: /* @__PURE__ */ C(ve, {
131
131
  size: 17,
132
132
  strokeWidth: 2.2
133
133
  })
134
134
  })]
135
135
  }),
136
- /* @__PURE__ */ x("div", {
136
+ /* @__PURE__ */ C("div", {
137
137
  className: "kapi-offc__body",
138
- children: D
138
+ children: O
139
139
  }),
140
- O && /* @__PURE__ */ x("div", {
140
+ k && /* @__PURE__ */ C("div", {
141
141
  className: "kapi-offc__foot",
142
- children: O
142
+ children: k
143
143
  })
144
144
  ]
145
- }, "main"), ct = $ && it ? /* @__PURE__ */ S("div", {
145
+ }, "main"), ct = $ && it ? /* @__PURE__ */ w("div", {
146
146
  ref: et,
147
147
  "data-closing": nt || void 0,
148
148
  inert: nt || void 0,
149
149
  className: "kapi-offc__panel kapi-offc__companion",
150
150
  ...ot,
151
151
  role: "complementary",
152
- "aria-labelledby": $.title ? F : void 0,
153
- style: { "--kapi-offc-companion-w": fe($.width) },
152
+ "aria-labelledby": $.title ? I : void 0,
153
+ style: { "--kapi-offc-companion-w": d($.width) },
154
154
  children: [
155
- ($.title || $.onClose) && /* @__PURE__ */ S("div", {
155
+ ($.title || $.onClose) && /* @__PURE__ */ w("div", {
156
156
  className: "kapi-offc__head",
157
- children: [/* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("div", {
158
- id: F,
157
+ children: [/* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("div", {
158
+ id: I,
159
159
  className: "kapi-modal__title",
160
160
  children: $.title
161
- }), $.subtitle && /* @__PURE__ */ x("div", {
161
+ }), $.subtitle && /* @__PURE__ */ C("div", {
162
162
  className: "kapi-modal__sub",
163
163
  children: $.subtitle
164
- })] }), $.onClose && /* @__PURE__ */ x("button", {
164
+ })] }), $.onClose && /* @__PURE__ */ C("button", {
165
165
  type: "button",
166
166
  className: "kapi-modal__x",
167
167
  onClick: $.onClose,
168
- "aria-label": $.closeLabel ?? N.closePanel,
169
- children: /* @__PURE__ */ x(C, {
168
+ "aria-label": $.closeLabel ?? P.closePanel,
169
+ children: /* @__PURE__ */ C(ve, {
170
170
  size: 17,
171
171
  strokeWidth: 2.2
172
172
  })
173
173
  })]
174
174
  }),
175
- /* @__PURE__ */ x("div", {
175
+ /* @__PURE__ */ C("div", {
176
176
  className: "kapi-offc__body",
177
177
  children: $.children
178
178
  }),
179
- $.footer && /* @__PURE__ */ x("div", {
179
+ $.footer && /* @__PURE__ */ C("div", {
180
180
  className: "kapi-offc__foot",
181
181
  children: $.footer
182
182
  })
183
183
  ]
184
- }, "companion") : null, lt = de(I).map((e) => e === "main" ? st : ct).filter((e) => e !== null);
185
- return /* @__PURE__ */ x("dialog", {
186
- ref: Xe,
187
- id: Ne,
188
- className: e("kapi-offc", He && "is-resizing", je),
189
- "data-side": se(I),
190
- "data-state": d === "open" ? "open" : "closed",
191
- "data-level": Re,
192
- "data-pushed": z > 0 ? "" : void 0,
184
+ }, "companion") : null, lt = u(L).map((e) => e === "main" ? st : ct).filter((e) => e !== null);
185
+ return /* @__PURE__ */ C("dialog", {
186
+ ref: Ye,
187
+ id: Me,
188
+ className: fe("kapi-offc", Ve && "is-resizing", Ae),
189
+ "data-side": ae(L),
190
+ "data-state": h === "open" ? "open" : "closed",
191
+ "data-level": Le,
192
+ "data-pushed": B > 0 ? "" : void 0,
193
193
  ...at ? { dir: "ltr" } : {},
194
194
  "aria-modal": "true",
195
- "aria-labelledby": P,
195
+ "aria-labelledby": F,
196
196
  style: Qe,
197
- ...Ye,
198
- ...Ze,
199
- children: /* @__PURE__ */ x("div", {
200
- className: le(it),
197
+ ...Je,
198
+ ...Xe,
199
+ children: /* @__PURE__ */ C("div", {
200
+ className: c(it),
201
201
  children: lt
202
202
  })
203
203
  });
204
- }, D = ({ open: e, onExited: t, side: r, ...i }) => {
205
- let a = _(), ee = n(), [s, c] = ve(m, "unmounted"), l = y(t);
206
- l.current = t, v(() => {
207
- c(e ? "open" : "close");
208
- }, [e]), v(() => {
209
- (s === "exit" || s === "open") && p.dispatch({
204
+ }, O = ({ open: e, onExited: t, side: n, ...r }) => {
205
+ let i = y(), s = g(), [c, l] = x(o, "unmounted"), u = S(t);
206
+ u.current = t, b(() => {
207
+ l(e ? "open" : "close");
208
+ }, [e]), b(() => {
209
+ (c === "exit" || c === "open") && a.dispatch({
210
210
  type: "mark",
211
- id: a,
212
- state: s === "exit" ? "closing" : "open"
211
+ id: i,
212
+ state: c === "exit" ? "closing" : "open"
213
213
  });
214
- }, [s, a]);
215
- let u = d();
216
- if (s === "unmounted" || !u) return null;
217
- let f = o(u, ee);
218
- return w(/* @__PURE__ */ x(E, {
219
- ...i,
214
+ }, [c, i]);
215
+ let d = h();
216
+ if (c === "unmounted" || !d) return null;
217
+ let f = _(d, s);
218
+ return T(/* @__PURE__ */ C(D, {
219
+ ...r,
220
220
  textDir: f,
221
- side: h(r, f),
222
- stackId: a,
223
- phase: s,
224
- onEntered: () => c("entered"),
221
+ side: m(n, f),
222
+ stackId: i,
223
+ phase: c,
224
+ onEntered: () => l("entered"),
225
225
  onExited: () => {
226
- c("exited"), l.current?.();
226
+ l("exited"), u.current?.();
227
227
  }
228
- }), u);
228
+ }), d);
229
229
  };
230
- //#endregion
231
- export { T as DEFAULT_OFFCANVAS_LABELS, D as KapiOffcanvas };
230
+ export { E as DEFAULT_OFFCANVAS_LABELS, O as KapiOffcanvas };
@@ -1,26 +1,26 @@
1
1
  "use client";
2
- import { panelsReducer as e, topOpenId as t } from "./offcanvasStack.js";
3
- import { KapiOffcanvas as n } from "./KapiOffcanvas.js";
2
+ import { KapiOffcanvas as e } from "./KapiOffcanvas.js";
3
+ import { panelsReducer as t, topOpenId as n } from "./offcanvasStack.js";
4
4
  import { createContext as r, useCallback as i, useContext as a, useLayoutEffect as o, useMemo as s, useReducer as c, useRef as l } from "react";
5
5
  import { jsx as u, jsxs as d } from "react/jsx-runtime";
6
- //#region src/components/overlays/KapiOffcanvasStack.tsx
7
- var f = r(null), p = r(null), m = (t, n) => e(t, n), h = ({ entry: e, level: t, close: r, push: i, dispatch: a }) => {
8
- let { id: o } = e, c = s(() => ({
6
+ // src/components/overlays/KapiOffcanvasStack.tsx
7
+ var f = r(null), p = r(null), m = (e, n) => t(e, n), h = ({ entry: t, level: n, close: r, push: i, dispatch: a }) => {
8
+ let { id: o } = t, c = s(() => ({
9
9
  id: o,
10
- level: t,
10
+ level: n,
11
11
  close: () => r(o),
12
12
  push: i
13
13
  }), [
14
14
  o,
15
- t,
15
+ n,
16
16
  r,
17
17
  i
18
- ]), { content: l, beforeClose: d, onClose: f, onExited: m, ...h } = e.config;
18
+ ]), { content: l, beforeClose: d, onClose: f, onExited: m, ...h } = t.config;
19
19
  return /* @__PURE__ */ u(p.Provider, {
20
20
  value: c,
21
- children: /* @__PURE__ */ u(n, {
21
+ children: /* @__PURE__ */ u(e, {
22
22
  ...h,
23
- open: e.open,
23
+ open: t.open,
24
24
  onClose: c.close,
25
25
  onExited: () => {
26
26
  a({
@@ -32,9 +32,9 @@ var f = r(null), p = r(null), m = (t, n) => e(t, n), h = ({ entry: e, level: t,
32
32
  })
33
33
  });
34
34
  }, g = ({ children: e }) => {
35
- let [n, r] = c(m, []), a = l(n);
35
+ let [t, r] = c(m, []), a = l(t);
36
36
  o(() => {
37
- a.current = n;
37
+ a.current = t;
38
38
  });
39
39
  let p = l(0), g = i((e) => {
40
40
  p.current += 1;
@@ -45,13 +45,13 @@ var f = r(null), p = r(null), m = (t, n) => e(t, n), h = ({ entry: e, level: t,
45
45
  config: e
46
46
  }), t;
47
47
  }, []), _ = i((e) => {
48
- let n = a.current, i = e ?? t(n), o = n.findIndex((e) => e.id === i);
49
- if (o < 0 || !n[o]?.open) return;
50
- let s = n.filter((e, t) => t >= o && e.open);
48
+ let t = a.current, i = e ?? n(t), o = t.findIndex((e) => e.id === i);
49
+ if (o < 0 || !t[o]?.open) return;
50
+ let s = t.filter((e, t) => t >= o && e.open);
51
51
  for (let e = s.length - 1; e >= 0; --e) if (s[e]?.config.beforeClose?.() === !1) return;
52
52
  r({
53
53
  type: "close",
54
- id: n[o].id
54
+ id: t[o].id
55
55
  }), s.forEach((e) => e.config.onClose?.());
56
56
  }, []), v = i(() => {
57
57
  let e = a.current.filter((e) => e.open);
@@ -59,7 +59,7 @@ var f = r(null), p = r(null), m = (t, n) => e(t, n), h = ({ entry: e, level: t,
59
59
  for (let t = e.length - 1; t >= 0; --t) if (e[t]?.config.beforeClose?.() === !1) return;
60
60
  r({ type: "closeAll" }), e.forEach((e) => e.config.onClose?.());
61
61
  }
62
- }, []), y = i(() => _(), [_]), b = n.filter((e) => e.open).length, x = s(() => ({
62
+ }, []), y = i(() => _(), [_]), b = t.filter((e) => e.open).length, x = s(() => ({
63
63
  push: g,
64
64
  close: _,
65
65
  pop: y,
@@ -74,7 +74,7 @@ var f = r(null), p = r(null), m = (t, n) => e(t, n), h = ({ entry: e, level: t,
74
74
  ]);
75
75
  return /* @__PURE__ */ d(f.Provider, {
76
76
  value: x,
77
- children: [e, n.map((e, t) => /* @__PURE__ */ u(h, {
77
+ children: [e, t.map((e, t) => /* @__PURE__ */ u(h, {
78
78
  entry: e,
79
79
  level: t,
80
80
  close: _,
@@ -91,5 +91,4 @@ var f = r(null), p = r(null), m = (t, n) => e(t, n), h = ({ entry: e, level: t,
91
91
  if (!e) throw Error("useKapiOffcanvasPanel: sólo se puede usar dentro del contenido de un panel del stack.");
92
92
  return e;
93
93
  };
94
- //#endregion
95
94
  export { g as KapiOffcanvasStack, v as useKapiOffcanvasPanel, _ as useKapiOffcanvasStack };
@@ -1,18 +1,18 @@
1
1
  "use client";
2
2
  import "#kapi-css/components/overlays/overlays.css";
3
- import { joinClasses as e } from "../rootProps.js";
4
- import { useMergedRefs as t } from "../../hooks/mergeRefs.js";
5
- import { useLabels as n } from "../locale/KapiLocaleProvider.js";
6
- import { computedStyleOf as r } from "../../hooks/ownerDocument.js";
7
- import { resolveKapiRoot as i } from "../../hooks/kapiRoot.js";
8
- import { onViewportChange as a } from "../../hooks/rafThrottle.js";
3
+ import { prefersReducedMotion as e } from "../../hooks/reducedMotion.js";
4
+ import { onViewportChange as t } from "../../hooks/rafThrottle.js";
5
+ import { resolveKapiRoot as n } from "../../hooks/kapiRoot.js";
6
+ import { trapTabKey as r } from "../../hooks/focusLogic.js";
7
+ import { useLabels as i } from "../locale/KapiLocaleProvider.js";
8
+ import { KapiOverlayPortal as a } from "./overlayPortal.js";
9
9
  /* empty css */
10
- import { KapiOverlayPortal as o } from "./overlayPortal.js";
11
- import { prefersReducedMotion as s } from "../../hooks/reducedMotion.js";
12
- import { trapTabKey as c } from "../../hooks/focusLogic.js";
10
+ import { joinClasses as o } from "../rootProps.js";
11
+ import { useMergedRefs as s } from "../../hooks/mergeRefs.js";
12
+ import { computedStyleOf as c } from "../../hooks/ownerDocument.js";
13
13
  import { useEffect as l, useLayoutEffect as u, useReducer as d, useRef as f, useState as p } from "react";
14
14
  import { Fragment as m, jsx as h, jsxs as g } from "react/jsx-runtime";
15
- //#region src/components/overlays/KapiPhotoView.tsx
15
+ // src/components/overlays/KapiPhotoView.tsx
16
16
  var _ = { viewer: "Foto ampliada" }, v = 92, y = 24, b = .42, x = (e, t) => {
17
17
  switch (t) {
18
18
  case "open": return e === "closed" ? "opening" : e;
@@ -44,14 +44,14 @@ var _ = { viewer: "Foto ampliada" }, v = 92, y = 24, b = .42, x = (e, t) => {
44
44
  fontSize: t.height * b
45
45
  } : {};
46
46
  }, E = ({ children: v, content: y, bg: b = "var(--kapi-primary-soft)", ink: E = "var(--kapi-primary-ink)", label: D, labels: O, className: k, style: A, id: j, ref: M }) => {
47
- let N = n("photoView", _, O), P = f(null), F = t(P, M), I = f(null), L = f(!1), [R, z] = d(x, "closed"), [B, V] = p(null), [H, U] = p(999), [W, G] = p(null), K = (e) => {
47
+ let N = i("photoView", _, O), P = f(null), F = s(P, M), I = f(null), L = f(!1), [R, z] = d(x, "closed"), [B, V] = p(null), [H, U] = p(999), [W, G] = p(null), K = (e) => {
48
48
  e.stopPropagation();
49
49
  let t = P.current;
50
50
  if (!t) return;
51
- let n = t.getBoundingClientRect();
52
- V(n);
53
- let a = t.firstElementChild ?? t;
54
- U(C(r(a).borderRadius, n)), G(i(t)), z("open");
51
+ let r = t.getBoundingClientRect();
52
+ V(r);
53
+ let i = t.firstElementChild ?? t;
54
+ U(C(c(i).borderRadius, r)), G(n(t)), z("open");
55
55
  }, q = (e) => {
56
56
  e.stopPropagation(), z("close");
57
57
  };
@@ -62,7 +62,7 @@ var _ = { viewer: "Foto ampliada" }, v = 92, y = 24, b = .42, x = (e, t) => {
62
62
  }, [R]);
63
63
  let J = R === "closed";
64
64
  l(() => {
65
- if (!J) return a(() => {
65
+ if (!J) return t(() => {
66
66
  let e = P.current;
67
67
  if (!e) return;
68
68
  let t = e.getBoundingClientRect();
@@ -70,8 +70,8 @@ var _ = { viewer: "Foto ampliada" }, v = 92, y = 24, b = .42, x = (e, t) => {
70
70
  });
71
71
  }, [J]), l(() => {
72
72
  if (R !== "closing") return;
73
- let e = window.setTimeout(() => z("end"), S(s(P.current)));
74
- return () => window.clearTimeout(e);
73
+ let t = window.setTimeout(() => z("end"), S(e(P.current)));
74
+ return () => window.clearTimeout(t);
75
75
  }, [R]), u(() => {
76
76
  R === "closed" ? (V(null), G(null), L.current && P.current?.focus(), L.current = !1) : R === "opening" && (L.current = !0, I.current?.focus());
77
77
  }, [R]);
@@ -87,12 +87,12 @@ var _ = { viewer: "Foto ampliada" }, v = 92, y = 24, b = .42, x = (e, t) => {
87
87
  type: "button",
88
88
  onClick: K,
89
89
  id: j,
90
- className: e("kapi-photo-thumb", k),
90
+ className: o("kapi-photo-thumb", k),
91
91
  style: A,
92
92
  "aria-label": D,
93
93
  "aria-haspopup": "dialog",
94
94
  children: v
95
- }), R !== "closed" && /* @__PURE__ */ h(o, {
95
+ }), R !== "closed" && /* @__PURE__ */ h(a, {
96
96
  root: W,
97
97
  children: /* @__PURE__ */ h("div", {
98
98
  ref: I,
@@ -103,7 +103,7 @@ var _ = { viewer: "Foto ampliada" }, v = 92, y = 24, b = .42, x = (e, t) => {
103
103
  tabIndex: -1,
104
104
  onClick: q,
105
105
  onKeyDown: (e) => {
106
- e.key === "Escape" ? (e.preventDefault(), q(e)) : c(e, I.current);
106
+ e.key === "Escape" ? (e.preventDefault(), q(e)) : r(e, I.current);
107
107
  },
108
108
  children: /* @__PURE__ */ h("div", {
109
109
  className: "kapi-photo-fly",
@@ -121,5 +121,4 @@ var _ = { viewer: "Foto ampliada" }, v = 92, y = 24, b = .42, x = (e, t) => {
121
121
  })
122
122
  })] });
123
123
  };
124
- //#endregion
125
124
  export { _ as DEFAULT_PHOTO_VIEW_LABELS, E as KapiPhotoView, C as parseThumbRadius, S as photoCloseFallbackDelay, T as photoFlyStyle, x as photoViewReducer, w as sameRect };
@@ -1,21 +1,21 @@
1
1
  "use client";
2
2
  import "#kapi-css/components/overlays/KapiPopover.css";
3
- import { useMergedRefs as e } from "../../hooks/mergeRefs.js";
4
- import { resolveKapiRoot as t } from "../../hooks/kapiRoot.js";
5
- import { usePlacement as n } from "../../hooks/usePlacement.js";
6
- import { useDismiss as r } from "../../hooks/useDismiss.js";
7
- import { KapiOverlayPortal as i } from "./overlayPortal.js";
8
- import { useExitPresence as a } from "./useExitPresence.js";
3
+ import { resolveKapiRoot as e } from "../../hooks/kapiRoot.js";
4
+ import { usePlacement as t } from "../../hooks/usePlacement.js";
5
+ import { KapiOverlayPortal as n } from "./overlayPortal.js";
6
+ import { useExitPresence as r } from "./useExitPresence.js";
7
+ import { useMergedRefs as i } from "../../hooks/mergeRefs.js";
8
+ import { useDismiss as a } from "../../hooks/useDismiss.js";
9
9
  /* empty css */
10
10
  import { useLayoutEffect as o, useRef as s, useState as c } from "react";
11
11
  import { jsx as l } from "react/jsx-runtime";
12
- //#region src/components/overlays/KapiPopover.tsx
12
+ // src/components/overlays/KapiPopover.tsx
13
13
  function u({ open: u, anchorRef: d, onClose: f, side: p = "bottom", align: m = "start", offset: h = 6, margin: g = 8, matchAnchorWidth: _ = !1, role: v = "dialog", "aria-label": y, id: b, className: x = "", style: S, ref: C, closeOnEscape: w = !0, closeOnOutside: T = !0, restoreFocus: E = !0, children: D }) {
14
- let O = s(null), k = e(O, C), [A, j] = c(null), { present: M, closing: N } = a(u, O);
14
+ let O = s(null), k = i(O, C), [A, j] = c(null), { present: M, closing: N } = r(u, O);
15
15
  o(() => {
16
- j(M ? t(d.current) : null);
16
+ j(M ? e(d.current) : null);
17
17
  }, [M, d]);
18
- let { placement: P, style: F } = n({
18
+ let { placement: P, style: F } = t({
19
19
  open: M,
20
20
  enabled: !!A,
21
21
  anchor: d,
@@ -25,7 +25,7 @@ function u({ open: u, anchorRef: d, onClose: f, side: p = "bottom", align: m = "
25
25
  offset: h,
26
26
  margin: g,
27
27
  width: _ ? "min-anchor" : "content"
28
- }), I = r(u, {
28
+ }), I = a(u, {
29
29
  zones: [O, d],
30
30
  escape: w,
31
31
  outside: T,
@@ -33,7 +33,7 @@ function u({ open: u, anchorRef: d, onClose: f, side: p = "bottom", align: m = "
33
33
  f?.(e), e === "escape" && E && d.current?.focus();
34
34
  }
35
35
  });
36
- return M ? /* @__PURE__ */ l(i, {
36
+ return M ? /* @__PURE__ */ l(n, {
37
37
  root: A,
38
38
  children: /* @__PURE__ */ l("div", {
39
39
  ref: k,
@@ -54,5 +54,4 @@ function u({ open: u, anchorRef: d, onClose: f, side: p = "bottom", align: m = "
54
54
  })
55
55
  }) : null;
56
56
  }
57
- //#endregion
58
57
  export { u as KapiPopover };