@kapiuara/ui 0.15.3 → 0.17.0

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 (288) hide show
  1. package/LICENSE +19 -15
  2. package/README.md +505 -13
  3. package/dist/components/chat/KapiChatThread.js +4 -4
  4. package/dist/components/chat/KapiComposer.js +8 -8
  5. package/dist/components/data/KapiDataTable.d.ts +1 -1
  6. package/dist/components/data/KapiDataTable.js +25 -25
  7. package/dist/components/data/KapiPaginationFooter.js +1 -1
  8. package/dist/components/data/KapiSheet.d.ts +105 -0
  9. package/dist/components/data/KapiSheet.js +75 -0
  10. package/dist/components/data/KapiSparkline.d.ts +2 -1
  11. package/dist/components/data/KapiSparkline.js +29 -26
  12. package/dist/components/data/KapiTable.d.ts +2 -2
  13. package/dist/components/data/KapiTable.js +347 -329
  14. package/dist/components/data/KapiTableFilter.js +6 -6
  15. package/dist/components/data/KapiTableFooter.d.ts +22 -0
  16. package/dist/components/data/KapiTableFooter.js +55 -0
  17. package/dist/components/data/KapiTableRow.js +53 -52
  18. package/dist/components/data/KapiTableToolbar.d.ts +4 -2
  19. package/dist/components/data/KapiTableToolbar.js +71 -69
  20. package/dist/components/data/index.d.ts +3 -1
  21. package/dist/components/data/tableCells.d.ts +17 -5
  22. package/dist/components/data/tableCells.js +52 -53
  23. package/dist/components/data/tableLogic.d.ts +2 -0
  24. package/dist/components/data/tableLogic.js +66 -66
  25. package/dist/components/data/tableSlots.d.ts +9 -0
  26. package/dist/components/data/tableSlots.js +12 -0
  27. package/dist/components/data/tableSpanLogic.d.ts +35 -0
  28. package/dist/components/data/tableSpanLogic.js +47 -0
  29. package/dist/components/data/tableTypes.d.ts +54 -1
  30. package/dist/components/data/useTableSelection.d.ts +4 -2
  31. package/dist/components/data/useTableSelection.js +29 -25
  32. package/dist/components/display/KapiAnchor.d.ts +36 -0
  33. package/dist/components/display/KapiAnchor.js +36 -0
  34. package/dist/components/display/KapiAnnotation.js +68 -63
  35. package/dist/components/display/KapiAvatar.d.ts +6 -4
  36. package/dist/components/display/KapiAvatar.js +33 -28
  37. package/dist/components/display/KapiBadge.d.ts +6 -5
  38. package/dist/components/display/KapiBadge.js +25 -19
  39. package/dist/components/display/KapiCodeBlock.d.ts +48 -0
  40. package/dist/components/display/KapiCodeBlock.js +44 -0
  41. package/dist/components/display/KapiCommentComposer.js +6 -6
  42. package/dist/components/display/KapiDiff.d.ts +62 -0
  43. package/dist/components/display/KapiDiff.js +118 -0
  44. package/dist/components/display/KapiHighlight.d.ts +27 -0
  45. package/dist/components/display/KapiHighlight.js +21 -0
  46. package/dist/components/display/KapiIconTile.d.ts +2 -1
  47. package/dist/components/display/KapiIconTile.js +23 -21
  48. package/dist/components/display/KapiStat.d.ts +3 -2
  49. package/dist/components/display/KapiStat.js +32 -26
  50. package/dist/components/display/KapiTag.d.ts +4 -3
  51. package/dist/components/display/KapiTag.js +29 -24
  52. package/dist/components/display/KapiText.d.ts +43 -0
  53. package/dist/components/display/KapiText.js +33 -0
  54. package/dist/components/display/KapiTimeline.d.ts +5 -2
  55. package/dist/components/display/KapiTimeline.js +31 -23
  56. package/dist/components/display/KapiTitle.d.ts +33 -0
  57. package/dist/components/display/KapiTitle.js +29 -0
  58. package/dist/components/display/annotationLogic.d.ts +2 -1
  59. package/dist/components/display/annotationLogic.js +7 -6
  60. package/dist/components/display/codeBlockSlots.d.ts +10 -0
  61. package/dist/components/display/codeBlockSlots.js +13 -0
  62. package/dist/components/display/diffLogic.d.ts +58 -0
  63. package/dist/components/display/diffLogic.js +96 -0
  64. package/dist/components/display/diffSlots.d.ts +14 -0
  65. package/dist/components/display/diffSlots.js +17 -0
  66. package/dist/components/display/highlightLogic.d.ts +18 -0
  67. package/dist/components/display/highlightLogic.js +26 -0
  68. package/dist/components/display/highlightSlots.d.ts +5 -0
  69. package/dist/components/display/highlightSlots.js +8 -0
  70. package/dist/components/display/iconTileLogic.d.ts +2 -2
  71. package/dist/components/display/iconTileLogic.js +7 -6
  72. package/dist/components/display/index.d.ts +15 -0
  73. package/dist/components/display/statLogic.d.ts +2 -1
  74. package/dist/components/display/statLogic.js +7 -6
  75. package/dist/components/display/tagLogic.d.ts +2 -1
  76. package/dist/components/display/tagLogic.js +7 -6
  77. package/dist/components/display/textLogic.d.ts +32 -0
  78. package/dist/components/display/textLogic.js +19 -0
  79. package/dist/components/display/timelineLogic.d.ts +20 -2
  80. package/dist/components/display/timelineLogic.js +10 -2
  81. package/dist/components/feedback/KapiAlert.d.ts +8 -4
  82. package/dist/components/feedback/KapiAlert.js +39 -34
  83. package/dist/components/feedback/KapiFab.js +108 -108
  84. package/dist/components/feedback/KapiProgress.js +63 -54
  85. package/dist/components/feedback/KapiToastContainer.js +9 -9
  86. package/dist/components/feedback/KapiTour.js +12 -12
  87. package/dist/components/feedback/progressLogic.d.ts +2 -1
  88. package/dist/components/feedback/progressLogic.js +9 -8
  89. package/dist/components/inputs/KapiAutocomplete.d.ts +6 -0
  90. package/dist/components/inputs/KapiAutocomplete.js +86 -85
  91. package/dist/components/inputs/KapiButton.d.ts +7 -4
  92. package/dist/components/inputs/KapiButton.js +47 -42
  93. package/dist/components/inputs/KapiChecklist.d.ts +7 -1
  94. package/dist/components/inputs/KapiChecklist.js +53 -52
  95. package/dist/components/inputs/KapiCopyButton.d.ts +40 -0
  96. package/dist/components/inputs/KapiCopyButton.js +35 -0
  97. package/dist/components/inputs/KapiDatePicker.d.ts +7 -1
  98. package/dist/components/inputs/KapiDatePicker.js +118 -116
  99. package/dist/components/inputs/KapiDateRangePicker.d.ts +7 -1
  100. package/dist/components/inputs/KapiDateRangePicker.js +136 -135
  101. package/dist/components/inputs/KapiFacetedSearch.js +5 -5
  102. package/dist/components/inputs/KapiField.d.ts +9 -1
  103. package/dist/components/inputs/KapiField.js +43 -42
  104. package/dist/components/inputs/KapiFileUpload.js +6 -6
  105. package/dist/components/inputs/KapiInput.d.ts +29 -1
  106. package/dist/components/inputs/KapiInput.js +74 -51
  107. package/dist/components/inputs/KapiMaskedInput.js +26 -26
  108. package/dist/components/inputs/KapiNumberStepper.d.ts +7 -1
  109. package/dist/components/inputs/KapiNumberStepper.js +24 -23
  110. package/dist/components/inputs/KapiPinInput.d.ts +72 -0
  111. package/dist/components/inputs/KapiPinInput.js +75 -0
  112. package/dist/components/inputs/KapiPropsForm.d.ts +34 -0
  113. package/dist/components/inputs/KapiPropsForm.js +78 -0
  114. package/dist/components/inputs/KapiRating.d.ts +7 -1
  115. package/dist/components/inputs/KapiRating.js +39 -38
  116. package/dist/components/inputs/KapiSearchChip.js +5 -5
  117. package/dist/components/inputs/KapiSegmented.d.ts +13 -5
  118. package/dist/components/inputs/KapiSegmented.js +81 -77
  119. package/dist/components/inputs/KapiSelect.d.ts +21 -1
  120. package/dist/components/inputs/KapiSelect.js +251 -245
  121. package/dist/components/inputs/KapiSelectMenu.d.ts +4 -2
  122. package/dist/components/inputs/KapiSelectMenu.js +131 -133
  123. package/dist/components/inputs/KapiSlider.d.ts +10 -3
  124. package/dist/components/inputs/KapiSlider.js +67 -63
  125. package/dist/components/inputs/KapiTagInput.d.ts +7 -1
  126. package/dist/components/inputs/KapiTagInput.js +70 -69
  127. package/dist/components/inputs/KapiTextarea.d.ts +7 -1
  128. package/dist/components/inputs/KapiTextarea.js +51 -50
  129. package/dist/components/inputs/copyLogic.d.ts +1 -0
  130. package/dist/components/inputs/copyLogic.js +12 -0
  131. package/dist/components/inputs/fieldLogic.d.ts +21 -1
  132. package/dist/components/inputs/fieldLogic.js +18 -11
  133. package/dist/components/inputs/index.d.ts +9 -1
  134. package/dist/components/inputs/inputLogic.d.ts +16 -1
  135. package/dist/components/inputs/inputLogic.js +3 -3
  136. package/dist/components/inputs/ownField.d.ts +3 -1
  137. package/dist/components/inputs/ownField.js +28 -27
  138. package/dist/components/inputs/pinInputLogic.d.ts +34 -0
  139. package/dist/components/inputs/pinInputLogic.js +37 -0
  140. package/dist/components/inputs/propsFormLogic.d.ts +53 -0
  141. package/dist/components/inputs/propsFormLogic.js +11 -0
  142. package/dist/components/inputs/segmentedLogic.d.ts +7 -0
  143. package/dist/components/inputs/segmentedLogic.js +2 -2
  144. package/dist/components/inputs/selectSlots.d.ts +24 -0
  145. package/dist/components/inputs/selectSlots.js +27 -0
  146. package/dist/components/layout/KapiAccessCard.d.ts +5 -1
  147. package/dist/components/layout/KapiAccessCard.js +43 -39
  148. package/dist/components/layout/KapiAccountMenu.js +7 -7
  149. package/dist/components/layout/KapiBox.d.ts +31 -0
  150. package/dist/components/layout/KapiBox.js +26 -0
  151. package/dist/components/layout/KapiCard.d.ts +16 -4
  152. package/dist/components/layout/KapiCard.js +46 -34
  153. package/dist/components/layout/KapiCenter.d.ts +13 -0
  154. package/dist/components/layout/KapiCenter.js +23 -0
  155. package/dist/components/layout/KapiCol.d.ts +22 -0
  156. package/dist/components/layout/KapiCol.js +23 -0
  157. package/dist/components/layout/KapiCollapse.d.ts +39 -0
  158. package/dist/components/layout/KapiCollapse.js +20 -0
  159. package/dist/components/layout/KapiContextSlot.js +4 -4
  160. package/dist/components/layout/KapiDivider.d.ts +11 -2
  161. package/dist/components/layout/KapiDivider.js +30 -24
  162. package/dist/components/layout/KapiGrid.d.ts +29 -3
  163. package/dist/components/layout/KapiGrid.js +39 -17
  164. package/dist/components/layout/KapiNotificationBell.js +10 -10
  165. package/dist/components/layout/KapiPageHeader.d.ts +10 -1
  166. package/dist/components/layout/KapiPageHeader.js +94 -92
  167. package/dist/components/layout/KapiPanelParts.d.ts +11 -2
  168. package/dist/components/layout/KapiPanelParts.js +73 -56
  169. package/dist/components/layout/KapiRail.d.ts +10 -1
  170. package/dist/components/layout/KapiRail.js +125 -122
  171. package/dist/components/layout/KapiRoot.d.ts +55 -5
  172. package/dist/components/layout/KapiRoot.js +57 -38
  173. package/dist/components/layout/KapiShell.d.ts +44 -3
  174. package/dist/components/layout/KapiShell.js +54 -50
  175. package/dist/components/layout/accessCardLogic.d.ts +8 -1
  176. package/dist/components/layout/accessCardLogic.js +11 -7
  177. package/dist/components/layout/cardSlots.d.ts +9 -0
  178. package/dist/components/layout/cardSlots.js +12 -0
  179. package/dist/components/layout/gridSpanLogic.d.ts +46 -0
  180. package/dist/components/layout/gridSpanLogic.js +39 -0
  181. package/dist/components/layout/index.d.ts +13 -4
  182. package/dist/components/layout/layoutPrimitives.d.ts +11 -0
  183. package/dist/components/layout/layoutPrimitives.js +12 -1
  184. package/dist/components/layout/pageHeaderSlots.d.ts +12 -0
  185. package/dist/components/layout/pageHeaderSlots.js +15 -0
  186. package/dist/components/layout/railLogic.d.ts +16 -3
  187. package/dist/components/layout/railSlots.d.ts +12 -0
  188. package/dist/components/layout/railSlots.js +15 -0
  189. package/dist/components/layout/shellSlots.d.ts +6 -0
  190. package/dist/components/layout/shellSlots.js +9 -0
  191. package/dist/components/layout/useGridBreakpoint.d.ts +12 -0
  192. package/dist/components/layout/useGridBreakpoint.js +35 -0
  193. package/dist/components/locale/labelRegistry.d.ts +10 -0
  194. package/dist/components/navigation/KapiAccordion.js +9 -9
  195. package/dist/components/navigation/KapiBreadcrumb.d.ts +18 -2
  196. package/dist/components/navigation/KapiBreadcrumb.js +23 -16
  197. package/dist/components/navigation/KapiContextPanel.d.ts +17 -4
  198. package/dist/components/navigation/KapiContextPanel.js +152 -136
  199. package/dist/components/navigation/KapiNavBadge.d.ts +6 -3
  200. package/dist/components/navigation/KapiNavBadge.js +26 -22
  201. package/dist/components/navigation/KapiPanelGroup.d.ts +16 -4
  202. package/dist/components/navigation/KapiPanelGroup.js +66 -65
  203. package/dist/components/navigation/KapiTabs.d.ts +12 -0
  204. package/dist/components/navigation/KapiTabs.js +87 -71
  205. package/dist/components/navigation/KapiToc.d.ts +48 -0
  206. package/dist/components/navigation/KapiToc.js +66 -0
  207. package/dist/components/navigation/KapiTree.js +10 -10
  208. package/dist/components/navigation/MiniNavItem.d.ts +7 -2
  209. package/dist/components/navigation/MiniNavItem.js +41 -36
  210. package/dist/components/navigation/breadcrumbLogic.d.ts +4 -2
  211. package/dist/components/navigation/breadcrumbLogic.js +1 -1
  212. package/dist/components/navigation/index.d.ts +3 -0
  213. package/dist/components/navigation/navLink.d.ts +21 -0
  214. package/dist/components/navigation/navLink.js +26 -0
  215. package/dist/components/navigation/navLinkLogic.d.ts +18 -0
  216. package/dist/components/navigation/navLinkLogic.js +22 -0
  217. package/dist/components/navigation/tocLogic.d.ts +35 -0
  218. package/dist/components/navigation/tocLogic.js +11 -0
  219. package/dist/components/navigation/tocSlots.d.ts +8 -0
  220. package/dist/components/navigation/tocSlots.js +11 -0
  221. package/dist/components/overlays/KapiCommandPalette.js +6 -6
  222. package/dist/components/overlays/KapiContextMenu.d.ts +8 -0
  223. package/dist/components/overlays/KapiContextMenu.js +5 -5
  224. package/dist/components/overlays/KapiMenuButton.js +7 -7
  225. package/dist/components/overlays/KapiModal.d.ts +9 -0
  226. package/dist/components/overlays/KapiModal.js +79 -77
  227. package/dist/components/overlays/KapiOffcanvas.js +24 -24
  228. package/dist/components/overlays/KapiPhotoView.js +10 -10
  229. package/dist/components/overlays/KapiPopover.js +6 -6
  230. package/dist/components/overlays/KapiShapeSheet.js +4 -4
  231. package/dist/components/overlays/KapiTooltip.js +18 -18
  232. package/dist/components/overlays/index.d.ts +1 -1
  233. package/dist/components/overlays/menuList.js +127 -117
  234. package/dist/components/overlays/modalSlots.d.ts +11 -0
  235. package/dist/components/overlays/modalSlots.js +14 -0
  236. package/dist/components/slotCatalog.d.ts +123 -0
  237. package/dist/components/slotCatalog.js +27 -0
  238. package/dist/components/slotsLogic.d.ts +34 -0
  239. package/dist/components/slotsLogic.js +18 -0
  240. package/dist/components/tone.d.ts +26 -0
  241. package/dist/components/tone.js +15 -14
  242. package/dist/css/base.css +1 -1
  243. package/dist/css/components/data/KapiEventCalendar.css +1 -1
  244. package/dist/css/components/data/KapiTable.css +1 -1
  245. package/dist/css/components/display/KapiAnnotation.css +1 -1
  246. package/dist/css/components/display/KapiCodeBlock.css +1 -0
  247. package/dist/css/components/display/KapiDiff.css +1 -0
  248. package/dist/css/components/display/display.css +1 -1
  249. package/dist/css/components/display/typography.css +1 -0
  250. package/dist/css/components/feedback/feedback.css +1 -1
  251. package/dist/css/components/inputs/KapiButton.css +1 -1
  252. package/dist/css/components/inputs/KapiDatePicker.css +1 -1
  253. package/dist/css/components/inputs/KapiPinInput.css +1 -0
  254. package/dist/css/components/inputs/KapiSelect.css +1 -1
  255. package/dist/css/components/inputs/inputsExtra.css +1 -1
  256. package/dist/css/components/layout/KapiAccessCard.css +1 -1
  257. package/dist/css/components/layout/KapiBox.css +1 -0
  258. package/dist/css/components/layout/KapiCollapse.css +1 -0
  259. package/dist/css/components/layout/KapiDivider.css +1 -1
  260. package/dist/css/components/layout/KapiRail.css +1 -1
  261. package/dist/css/components/layout/gridSpan.css +1 -0
  262. package/dist/css/components/navigation/KapiToc.css +1 -0
  263. package/dist/css/components/navigation/navigation.css +1 -1
  264. package/dist/hooks/asyncResourceLogic.d.ts +11 -0
  265. package/dist/hooks/asyncResourceLogic.js +4 -0
  266. package/dist/hooks/densityLogic.d.ts +15 -0
  267. package/dist/hooks/densityLogic.js +4 -0
  268. package/dist/hooks/index.d.ts +7 -0
  269. package/dist/hooks/themeColorsLogic.d.ts +19 -0
  270. package/dist/hooks/themeColorsLogic.js +4 -2
  271. package/dist/hooks/themeDeriveLogic.d.ts +16 -0
  272. package/dist/hooks/themeDeriveLogic.js +27 -17
  273. package/dist/hooks/toneFamilyLogic.d.ts +146 -0
  274. package/dist/hooks/toneFamilyLogic.js +164 -0
  275. package/dist/hooks/useAsyncResource.d.ts +45 -0
  276. package/dist/hooks/useAsyncResource.js +24 -0
  277. package/dist/hooks/useKapiTheme.d.ts +16 -3
  278. package/dist/hooks/useKapiTheme.js +130 -117
  279. package/dist/hooks/useToneFamilies.d.ts +40 -0
  280. package/dist/hooks/useToneFamilies.js +50 -0
  281. package/dist/index.d.ts +3 -1
  282. package/dist/index.js +227 -204
  283. package/dist/kapi.css +1 -1
  284. package/dist/kapi.layered.css +1 -1
  285. package/dist/logic.d.ts +41 -0
  286. package/dist/logic.js +42 -0
  287. package/dist/styles/rawHeights.d.ts +8 -0
  288. package/package.json +14 -3
@@ -1,113 +1,115 @@
1
1
  "use client";
2
2
  import "#kapi-css/components/overlays/KapiModal.css";
3
- import { useLabels as e } from "../locale/KapiLocaleProvider.js";
4
- import { useMergedRefs as t } from "../../hooks/mergeRefs.js";
5
- import { prefersReducedMotion as n } from "../../hooks/reducedMotion.js";
6
- import { dialogNameProps as r, modalClasses as i, resolveDismiss as a } from "./dialogUtils.js";
7
- import { useExitPresence as o } from "./useExitPresence.js";
8
- import { originWithinCard as s } from "../../hooks/growOriginLogic.js";
9
- import { useBackdropClose as ee, useNativeDialog as c, usePortalRoot as l, useTrappedDialogWarning as u } from "./useNativeDialog.js";
3
+ import { useMergedRefs as e } from "../../hooks/mergeRefs.js";
4
+ import { useLabels as t } from "../locale/KapiLocaleProvider.js";
5
+ import { slot as n } from "../slotsLogic.js";
6
+ import { prefersReducedMotion as r } from "../../hooks/reducedMotion.js";
7
+ import { dialogNameProps as i, modalClasses as a, resolveDismiss as o } from "./dialogUtils.js";
8
+ import { useExitPresence as s } from "./useExitPresence.js";
9
+ import { originWithinCard as ee } from "../../hooks/growOriginLogic.js";
10
+ import { useBackdropClose as te, useNativeDialog as c, usePortalRoot as l, useTrappedDialogWarning as u } from "./useNativeDialog.js";
10
11
  /* empty css */
11
- import { useId as d, useLayoutEffect as f, useRef as p, useState as m } from "react";
12
- import { jsx as h, jsxs as g } from "react/jsx-runtime";
13
- import { X as _ } from "lucide-react";
14
- import { createPortal as v } from "react-dom";
12
+ import { MODAL_SLOTS as d } from "./modalSlots.js";
13
+ import { useId as f, useLayoutEffect as p, useRef as m, useState as h } from "react";
14
+ import { jsx as g, jsxs as _ } from "react/jsx-runtime";
15
+ import { X as v } from "lucide-react";
16
+ import { createPortal as y } from "react-dom";
15
17
  //#region src/components/overlays/KapiModal.tsx
16
- var y = { close: "Cerrar" }, b = ({ open: e, ...t }) => {
17
- let n = p(null), { present: r, closing: i } = o(e, n);
18
- return r ? /* @__PURE__ */ h(S, {
18
+ var b = { close: "Cerrar" }, x = ({ open: e, ...t }) => {
19
+ let n = m(null), { present: r, closing: i } = s(e, n);
20
+ return r ? /* @__PURE__ */ g(C, {
19
21
  ...t,
20
22
  dialogRef: n,
21
23
  closing: i
22
24
  }) : null;
23
- }, x = () => {}, S = ({ title: o, subtitle: b, onClose: S, children: C, footer: w, size: T = "md", hideHeader: E = !1, className: te = "", style: D, id: O, ref: k, closeOnBackdrop: A, closeOnEscape: j, closeButton: M, dismissible: N, closeLabel: P, labels: F, "aria-label": I, "aria-labelledby": L, growFrom: R, dialogRef: z, closing: B }) => {
24
- let V = B ? x : S, H = d(), U = e("modal", y, F), W = P ?? U.close, G = p(null), K = t(G, k), [q, J] = m(null), Y = a({
25
- dismissible: N,
26
- closeOnEscape: j,
27
- closeOnBackdrop: A,
28
- closeButton: M
29
- }), { closeOnEscape: X, closeOnBackdrop: Z, closeButton: Q } = Y, { ref: ne, dialogProps: re } = c({ onRequestClose: X ? () => V("escape") : void 0 }), ie = ee(Z ? () => V("backdrop") : void 0);
30
- u("KapiModal", Y, G), f(() => {
31
- let e = G.current;
32
- if (!R || !e || n(e)) {
33
- J(null);
25
+ }, S = () => {}, C = ({ title: s, subtitle: x, onClose: C, children: w, footer: T, size: E = "md", hideHeader: D = !1, className: ne = "", classNames: O, style: k, id: A, ref: j, closeOnBackdrop: M, closeOnEscape: N, closeButton: P, dismissible: F, closeLabel: I, labels: L, "aria-label": R, "aria-labelledby": z, growFrom: B, dialogRef: V, closing: H }) => {
26
+ let U = H ? S : C, W = f(), G = t("modal", b, L), K = I ?? G.close, q = m(null), J = e(q, j), [Y, X] = h(null), Z = o({
27
+ dismissible: F,
28
+ closeOnEscape: N,
29
+ closeOnBackdrop: M,
30
+ closeButton: P
31
+ }), { closeOnEscape: re, closeOnBackdrop: ie, closeButton: Q } = Z, { ref: ae, dialogProps: oe } = c({ onRequestClose: re ? () => U("escape") : void 0 }), se = te(ie ? () => U("backdrop") : void 0);
32
+ u("KapiModal", Z, q), p(() => {
33
+ let e = q.current;
34
+ if (!B || !e || r(e)) {
35
+ X(null);
34
36
  return;
35
37
  }
36
- let t = e.getBoundingClientRect(), r = e.offsetWidth, i = e.offsetHeight, a = t.left + t.width / 2, o = t.top + t.height / 2;
37
- J(s(R, {
38
- left: a - r / 2,
38
+ let t = e.getBoundingClientRect(), n = e.offsetWidth, i = e.offsetHeight, a = t.left + t.width / 2, o = t.top + t.height / 2;
39
+ X(ee(B, {
40
+ left: a - n / 2,
39
41
  top: o - i / 2,
40
- width: r,
42
+ width: n,
41
43
  height: i
42
44
  }));
43
- }, [R]);
45
+ }, [B]);
44
46
  let $ = l();
45
- return $ ? v(/* @__PURE__ */ h("dialog", {
47
+ return $ ? y(/* @__PURE__ */ g("dialog", {
46
48
  ref: (e) => {
47
- ne.current = e, z.current = e;
49
+ ae.current = e, V.current = e;
48
50
  },
49
- className: "kapi-modal-overlay kapi-modal-dialog",
50
- "data-closing": B || void 0,
51
+ ...n(d, "overlay", O, "kapi-modal-dialog"),
52
+ "data-closing": H || void 0,
51
53
  "aria-modal": "true",
52
- ...r({
53
- titleId: H,
54
- title: o,
55
- hideHeader: E,
56
- "aria-label": I,
57
- "aria-labelledby": L
54
+ ...i({
55
+ titleId: W,
56
+ title: s,
57
+ hideHeader: D,
58
+ "aria-label": R,
59
+ "aria-labelledby": z
58
60
  }),
59
- ...re,
60
- ...ie,
61
- children: /* @__PURE__ */ g("div", {
62
- ref: K,
63
- id: O,
64
- className: `${i(T, te)}${q ? " kapi-modal--grow" : ""}`,
65
- style: q ? {
66
- ...D,
67
- "--kapi-grow-x": `${q.x}px`,
68
- "--kapi-grow-y": `${q.y}px`
69
- } : D,
61
+ ...oe,
62
+ ...se,
63
+ children: /* @__PURE__ */ _("div", {
64
+ ref: J,
65
+ id: A,
66
+ ...n(d, "root", O, `${a(E, ne)}${Y ? " kapi-modal--grow" : ""}`),
67
+ style: Y ? {
68
+ ...k,
69
+ "--kapi-grow-x": `${Y.x}px`,
70
+ "--kapi-grow-y": `${Y.y}px`
71
+ } : k,
70
72
  children: [
71
- E ? Q && /* @__PURE__ */ h("button", {
73
+ D ? Q && /* @__PURE__ */ g("button", {
72
74
  type: "button",
73
- className: "kapi-modal__x kapi-modal__x--float",
74
- onClick: () => V("close-button"),
75
- "aria-label": W,
76
- children: /* @__PURE__ */ h(_, {
75
+ ...n(d, "close", O, "kapi-modal__x--float"),
76
+ onClick: () => U("close-button"),
77
+ "aria-label": K,
78
+ children: /* @__PURE__ */ g(v, {
77
79
  size: 17,
78
80
  strokeWidth: 2.2
79
81
  })
80
- }) : /* @__PURE__ */ g("div", {
81
- className: "kapi-modal__head",
82
- children: [/* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("div", {
83
- id: H,
84
- className: "kapi-modal__title",
85
- children: o
86
- }), b && /* @__PURE__ */ h("div", {
87
- className: "kapi-modal__sub",
88
- children: b
89
- })] }), Q && /* @__PURE__ */ h("button", {
82
+ }) : /* @__PURE__ */ _("div", {
83
+ ...n(d, "header", O),
84
+ children: [/* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("div", {
85
+ id: W,
86
+ ...n(d, "title", O),
87
+ children: s
88
+ }), x && /* @__PURE__ */ g("div", {
89
+ ...n(d, "subtitle", O),
90
+ children: x
91
+ })] }), Q && /* @__PURE__ */ g("button", {
90
92
  type: "button",
91
- className: "kapi-modal__x",
92
- onClick: () => V("close-button"),
93
- "aria-label": W,
94
- children: /* @__PURE__ */ h(_, {
93
+ ...n(d, "close", O),
94
+ onClick: () => U("close-button"),
95
+ "aria-label": K,
96
+ children: /* @__PURE__ */ g(v, {
95
97
  size: 17,
96
98
  strokeWidth: 2.2
97
99
  })
98
100
  })]
99
101
  }),
100
- /* @__PURE__ */ h("div", {
101
- className: "kapi-modal__body",
102
- children: C
103
- }),
104
- w && /* @__PURE__ */ h("div", {
105
- className: "kapi-modal__foot",
102
+ /* @__PURE__ */ g("div", {
103
+ ...n(d, "body", O),
106
104
  children: w
105
+ }),
106
+ T && /* @__PURE__ */ g("div", {
107
+ ...n(d, "footer", O),
108
+ children: T
107
109
  })
108
110
  ]
109
111
  })
110
112
  }), $) : null;
111
113
  };
112
114
  //#endregion
113
- export { y as DEFAULT_MODAL_LABELS, b as KapiModal };
115
+ export { b as DEFAULT_MODAL_LABELS, x as KapiModal };
@@ -1,10 +1,10 @@
1
1
  "use client";
2
2
  import "#kapi-css/components/overlays/KapiOffcanvas.css";
3
3
  import { joinClasses as e } from "../rootProps.js";
4
- import { useKapiDir as t, useLabels as n } from "../locale/KapiLocaleProvider.js";
5
- import { computedStyleOf as r, winOf as i } from "../../hooks/ownerDocument.js";
6
- import { resolveDirection as a } from "../../hooks/directionLogic.js";
7
- import { useMergedRefs as o } from "../../hooks/mergeRefs.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
8
  import { maxTransitionMs as ee, resolveDismiss as s } from "./dialogUtils.js";
9
9
  import { useExitPresence as c } from "./useExitPresence.js";
10
10
  import { useBackdropClose as l, useNativeDialog as u, usePortalRoot as d, useTrappedDialogWarning as f } from "./useNativeDialog.js";
@@ -21,8 +21,8 @@ var be = 120, T = {
21
21
  resize: "Redimensionar panel",
22
22
  close: "Cerrar",
23
23
  closePanel: "Cerrar panel"
24
- }, E = ({ textDir: t, stackId: a, 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 = n("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, a), Re = Math.max(0, re(R, a)), { 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);
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
26
  U.current = Ie;
27
27
  let W = (e) => {
28
28
  Ve(e), e !== B && U.current?.(e);
@@ -36,26 +36,26 @@ var be = 120, T = {
36
36
  }, We = (e) => {
37
37
  let t = H.current;
38
38
  if (!t) return;
39
- let n = g(M, (i(L.current) ?? window).innerWidth);
39
+ let n = g(M, (a(L.current) ?? window).innerWidth);
40
40
  W(ge(I, t.startWidth, t.startX, e.clientX, j, n));
41
41
  }, G = (e) => {
42
42
  H.current = null, e.currentTarget.hasPointerCapture(e.pointerId) && e.currentTarget.releasePointerCapture(e.pointerId), V(!1);
43
43
  }, Ge = (e) => {
44
- let t = g(M, (i(L.current) ?? window).innerWidth), n = he(I, B, e.key, j, t);
44
+ let t = g(M, (a(L.current) ?? window).innerWidth), n = he(I, B, e.key, j, t);
45
45
  n !== null && (e.preventDefault(), e.stopPropagation(), W(n));
46
46
  }, K = d === "open" ? ve : void 0, q = s({
47
47
  dismissible: Oe,
48
48
  closeOnEscape: Ee,
49
49
  closeOnBackdrop: Te,
50
50
  closeButton: De
51
- }), { closeOnEscape: Ke, closeOnBackdrop: qe, closeButton: Je } = q, { ref: J, dialogProps: Ye } = u({ onRequestClose: Ke ? () => K?.("escape") : void 0 }), Xe = o(J, Pe), Ze = l(qe ? () => K?.("backdrop") : void 0);
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
52
  f("KapiOffcanvas", q, J), v(() => (p.dispatch({
53
53
  type: "add",
54
- id: a
54
+ id: o
55
55
  }), () => p.dispatch({
56
56
  type: "remove",
57
- id: a
58
- })), [a]);
57
+ id: o
58
+ })), [o]);
59
59
  let Y = y(m);
60
60
  Y.current = m, v(() => {
61
61
  L.current?.getBoundingClientRect(), Y.current();
@@ -68,20 +68,20 @@ var be = 120, T = {
68
68
  X.current();
69
69
  return;
70
70
  }
71
- let t = r(e), n = ee(t.transitionDuration, t.transitionDelay);
71
+ let t = i(e), n = ee(t.transitionDuration, t.transitionDelay);
72
72
  if (n <= 0) {
73
73
  X.current();
74
74
  return;
75
75
  }
76
- let i = !1, a = () => {
77
- i || (i = !0, X.current());
76
+ let r = !1, a = () => {
77
+ r || (r = !0, X.current());
78
78
  }, o = (t) => {
79
79
  t.target === e && t.propertyName === "transform" && a();
80
80
  };
81
81
  e.addEventListener("transitionend", o);
82
82
  let s = window.setTimeout(a, n + be);
83
83
  return () => {
84
- i = !0, e.removeEventListener("transitionend", o), window.clearTimeout(s);
84
+ r = !0, e.removeEventListener("transitionend", o), window.clearTimeout(s);
85
85
  };
86
86
  }, [d]);
87
87
  let Z = Fe && (I === "left" || I === "right"), Q = ce(I, k, Se, "520px");
@@ -93,7 +93,7 @@ var be = 120, T = {
93
93
  "--kapi-offc-push-s": ze
94
94
  }, $e = ue(I, A), et = y(null), { present: tt, closing: nt } = c($e, et), rt = y(A);
95
95
  A && (rt.current = A);
96
- let $ = A ?? rt.current, it = tt && pe(I) && $ !== void 0, at = t === "rtl", ot = at ? { dir: "rtl" } : {}, st = /* @__PURE__ */ S("div", {
96
+ let $ = A ?? rt.current, it = tt && pe(I) && $ !== void 0, at = n === "rtl", ot = at ? { dir: "rtl" } : {}, st = /* @__PURE__ */ S("div", {
97
97
  ref: L,
98
98
  className: "kapi-offc__panel",
99
99
  ...ot,
@@ -201,25 +201,25 @@ var be = 120, T = {
201
201
  children: lt
202
202
  })
203
203
  });
204
- }, D = ({ open: e, onExited: n, side: r, ...i }) => {
205
- let o = _(), ee = t(), [s, c] = ve(m, "unmounted"), l = y(n);
206
- l.current = n, v(() => {
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
207
  c(e ? "open" : "close");
208
208
  }, [e]), v(() => {
209
209
  (s === "exit" || s === "open") && p.dispatch({
210
210
  type: "mark",
211
- id: o,
211
+ id: a,
212
212
  state: s === "exit" ? "closing" : "open"
213
213
  });
214
- }, [s, o]);
214
+ }, [s, a]);
215
215
  let u = d();
216
216
  if (s === "unmounted" || !u) return null;
217
- let f = a(u, ee);
217
+ let f = o(u, ee);
218
218
  return w(/* @__PURE__ */ x(E, {
219
219
  ...i,
220
220
  textDir: f,
221
221
  side: h(r, f),
222
- stackId: o,
222
+ stackId: a,
223
223
  phase: s,
224
224
  onEntered: () => c("entered"),
225
225
  onExited: () => {
@@ -1,11 +1,11 @@
1
1
  "use client";
2
2
  import "#kapi-css/components/overlays/overlays.css";
3
3
  import { joinClasses as e } from "../rootProps.js";
4
- import { useLabels as t } from "../locale/KapiLocaleProvider.js";
5
- import { computedStyleOf as n } from "../../hooks/ownerDocument.js";
6
- import { resolveKapiRoot as r } from "../../hooks/kapiRoot.js";
7
- import { onViewportChange as i } from "../../hooks/rafThrottle.js";
8
- import { useMergedRefs as a } from "../../hooks/mergeRefs.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";
9
9
  /* empty css */
10
10
  import { KapiOverlayPortal as o } from "./overlayPortal.js";
11
11
  import { prefersReducedMotion as s } from "../../hooks/reducedMotion.js";
@@ -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 = t("photoView", _, O), P = f(null), F = a(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 = 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) => {
48
48
  e.stopPropagation();
49
49
  let t = P.current;
50
50
  if (!t) return;
51
- let i = t.getBoundingClientRect();
52
- V(i);
51
+ let n = t.getBoundingClientRect();
52
+ V(n);
53
53
  let a = t.firstElementChild ?? t;
54
- U(C(n(a).borderRadius, i)), G(r(t)), z("open");
54
+ U(C(r(a).borderRadius, n)), G(i(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 i(() => {
65
+ if (!J) return a(() => {
66
66
  let e = P.current;
67
67
  if (!e) return;
68
68
  let t = e.getBoundingClientRect();
@@ -1,8 +1,8 @@
1
1
  "use client";
2
2
  import "#kapi-css/components/overlays/KapiPopover.css";
3
- import { resolveKapiRoot as e } from "../../hooks/kapiRoot.js";
4
- import { usePlacement as t } from "../../hooks/usePlacement.js";
5
- import { useMergedRefs as n } from "../../hooks/mergeRefs.js";
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
6
  import { useDismiss as r } from "../../hooks/useDismiss.js";
7
7
  import { KapiOverlayPortal as i } from "./overlayPortal.js";
8
8
  import { useExitPresence as a } from "./useExitPresence.js";
@@ -11,11 +11,11 @@ import { useLayoutEffect as o, useRef as s, useState as c } from "react";
11
11
  import { jsx as l } from "react/jsx-runtime";
12
12
  //#region 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 = n(O, C), [A, j] = c(null), { present: M, closing: N } = a(u, O);
14
+ let O = s(null), k = e(O, C), [A, j] = c(null), { present: M, closing: N } = a(u, O);
15
15
  o(() => {
16
- j(M ? e(d.current) : null);
16
+ j(M ? t(d.current) : null);
17
17
  }, [M, d]);
18
- let { placement: P, style: F } = t({
18
+ let { placement: P, style: F } = n({
19
19
  open: M,
20
20
  enabled: !!A,
21
21
  anchor: d,
@@ -1,9 +1,9 @@
1
1
  "use client";
2
2
  import "#kapi-css/components/overlays/overlays.css";
3
3
  import { joinClasses as e } from "../rootProps.js";
4
- import { useLabels as t } from "../locale/KapiLocaleProvider.js";
5
- import { useControllableState as n } from "../../hooks/useControllableState.js";
6
- import { useMergedRefs as r } from "../../hooks/mergeRefs.js";
4
+ import { useMergedRefs as t } from "../../hooks/mergeRefs.js";
5
+ import { useLabels as n } from "../locale/KapiLocaleProvider.js";
6
+ import { useControllableState as r } from "../../hooks/useControllableState.js";
7
7
  import { useDismiss as i } from "../../hooks/useDismiss.js";
8
8
  /* empty css */
9
9
  import { focusableWithin as a } from "../../hooks/focusLogic.js";
@@ -15,7 +15,7 @@ var p = {
15
15
  close: "Cerrar",
16
16
  open: "Abrir"
17
17
  }, m = ({ title: m, children: h, width: g = 300, height: _ = 250, label: v, labels: y, className: b, style: x, id: S, ref: C, open: w, defaultOpen: T = !1, onOpenChange: E }) => {
18
- let D = t("shapeSheet", p, y), O = c(null), k = r(O, C), A = c(null), j = c(null), M = c(null), N = s(), [P, F] = n(w, T, E), I = c(P);
18
+ let D = n("shapeSheet", p, y), O = c(null), k = t(O, C), A = c(null), j = c(null), M = c(null), N = s(), [P, F] = r(w, T, E), I = c(P);
19
19
  I.current = P;
20
20
  let L = (e) => {
21
21
  e !== I.current && F(e);
@@ -1,19 +1,19 @@
1
1
  "use client";
2
2
  import "#kapi-css/components/overlays/overlays.css";
3
3
  import { joinClasses as e } from "../rootProps.js";
4
- import { joinIds as t } from "../inputs/fieldLogic.js";
4
+ import { useMergedRefs as t } from "../../hooks/mergeRefs.js";
5
5
  import { useKapiDir as n } from "../locale/KapiLocaleProvider.js";
6
6
  import { winOf as r } from "../../hooks/ownerDocument.js";
7
- import { placePopover as i } from "./popoverLogic.js";
8
- import { onViewportChange as a } from "../../hooks/rafThrottle.js";
9
- import { placementViewport as o } from "../../hooks/viewportInsetLogic.js";
10
- import { resolveDirection as s } from "../../hooks/directionLogic.js";
11
- import { useMergedRefs as c } from "../../hooks/mergeRefs.js";
7
+ import { joinIds as i } from "../inputs/fieldLogic.js";
8
+ import { placePopover as a } from "./popoverLogic.js";
9
+ import { onViewportChange as o } from "../../hooks/rafThrottle.js";
10
+ import { placementViewport as s } from "../../hooks/viewportInsetLogic.js";
11
+ import { resolveDirection as c } from "../../hooks/directionLogic.js";
12
12
  /* empty css */
13
13
  import { cloneElement as l, isValidElement as u, useEffect as d, useId as f, useLayoutEffect as p, useRef as m, useState as h } from "react";
14
14
  import { jsx as g, jsxs as _ } from "react/jsx-runtime";
15
15
  //#region src/components/overlays/KapiTooltip.tsx
16
- var v = 280, y = 7, b = 28, x = 12, S = 44, C = (e, t) => e === "end" ? t === "rtl" ? "left" : "right" : e === "start" ? t === "rtl" ? "right" : "left" : e, w = (e) => Math.min(v, String(e).length * y + b), T = (e, t, n, r, a = Infinity) => {
16
+ var v = 280, y = 7, b = 28, x = 12, S = 44, C = (e, t) => e === "end" ? t === "rtl" ? "left" : "right" : e === "start" ? t === "rtl" ? "right" : "left" : e, w = (e) => Math.min(v, String(e).length * y + b), T = (e, t, n, r, i = Infinity) => {
17
17
  let o = t.bottom ?? t.top, s = t.left ?? t.right, c = {
18
18
  top: t.top,
19
19
  bottom: o,
@@ -22,12 +22,12 @@ var v = 280, y = 7, b = 28, x = 12, S = 44, C = (e, t) => e === "end" ? t === "r
22
22
  width: t.right - s,
23
23
  height: o - t.top
24
24
  }, l = e === "top" || e === "bottom";
25
- return i(c, {
25
+ return a(c, {
26
26
  width: w(n),
27
27
  height: S
28
28
  }, {
29
29
  width: r,
30
- height: a
30
+ height: i
31
31
  }, {
32
32
  side: e,
33
33
  offset: l ? 0 : x,
@@ -40,7 +40,7 @@ var v = 280, y = 7, b = 28, x = 12, S = 44, C = (e, t) => e === "end" ? t === "r
40
40
  shift: !1,
41
41
  mainMin: -Infinity
42
42
  }, k = (e, t) => {
43
- let n = e === "top" || e === "bottom", { top: r, left: a } = i({
43
+ let n = e === "top" || e === "bottom", { top: r, left: i } = a({
44
44
  top: t.top,
45
45
  bottom: t.bottom,
46
46
  left: t.left,
@@ -59,7 +59,7 @@ var v = 280, y = 7, b = 28, x = 12, S = 44, C = (e, t) => e === "end" ? t === "r
59
59
  offset: n ? D : E
60
60
  });
61
61
  return {
62
- x: a,
62
+ x: i,
63
63
  y: r
64
64
  };
65
65
  }, A = (e, t) => {
@@ -68,15 +68,15 @@ var v = 280, y = 7, b = 28, x = 12, S = 44, C = (e, t) => e === "end" ? t === "r
68
68
  } catch {
69
69
  return null;
70
70
  }
71
- }, j = (e, n) => t(typeof e == "string" ? e : void 0, n), M = ({ label: t, children: i, prefer: v = "end", className: y, style: b, id: x, ref: S }) => {
72
- let w = f(), E = m(null), D = c(E, S), O = n(), [M, N] = h(() => C(v, s(null, O))), [P, F] = h(!1), [I, L] = h(!1), R = m({
71
+ }, j = (e, t) => i(typeof e == "string" ? e : void 0, t), M = ({ label: i, children: a, prefer: v = "end", className: y, style: b, id: x, ref: S }) => {
72
+ let w = f(), E = m(null), D = t(E, S), O = n(), [M, N] = h(() => C(v, c(null, O))), [P, F] = h(!1), [I, L] = h(!1), R = m({
73
73
  hover: !1,
74
74
  focus: !1
75
75
  }), z = () => {
76
76
  let e = E.current;
77
77
  if (!e) return;
78
- let n = e.getBoundingClientRect(), r = o(e), i = T(C(v, s(e, O)), n, t, r.width, r.height), { x: a, y: c } = k(i, n);
79
- e.style.setProperty("--kapi-tip-x", `${Math.round(a)}px`), e.style.setProperty("--kapi-tip-y", `${Math.round(c)}px`), N(i);
78
+ let t = e.getBoundingClientRect(), n = s(e), r = T(C(v, c(e, O)), t, i, n.width, n.height), { x: a, y: o } = k(r, t);
79
+ e.style.setProperty("--kapi-tip-x", `${Math.round(a)}px`), e.style.setProperty("--kapi-tip-y", `${Math.round(o)}px`), N(r);
80
80
  }, B = m(z);
81
81
  p(() => {
82
82
  B.current = z;
@@ -94,11 +94,11 @@ var v = 280, y = 7, b = 28, x = 12, S = 44, C = (e, t) => e === "end" ? t === "r
94
94
  d(() => {
95
95
  if (!I) return;
96
96
  let e = r(E.current);
97
- return a(() => B.current(), e ? { target: e } : {});
97
+ return o(() => B.current(), e ? { target: e } : {});
98
98
  }, [I]);
99
99
  let K = (e) => {
100
100
  e.key === "Escape" && !P && F(!0);
101
- }, q = u(i) ? i : null, J = q ? l(q, { "aria-describedby": j(q.props["aria-describedby"], w) }) : i;
101
+ }, q = u(a) ? a : null, J = q ? l(q, { "aria-describedby": j(q.props["aria-describedby"], w) }) : a;
102
102
  return /* @__PURE__ */ _("span", {
103
103
  id: x,
104
104
  className: e("kapi-tip", y),
@@ -120,7 +120,7 @@ var v = 280, y = 7, b = 28, x = 12, S = 44, C = (e, t) => e === "end" ? t === "r
120
120
  role: "tooltip",
121
121
  id: w,
122
122
  popover: "manual",
123
- children: t
123
+ children: i
124
124
  })]
125
125
  });
126
126
  };
@@ -12,7 +12,7 @@ export type { KapiPhotoViewLabels, KapiPhotoViewProps } from "./KapiPhotoView.js
12
12
  export { KapiShapeSheet, DEFAULT_SHAPE_SHEET_LABELS } from "./KapiShapeSheet.js";
13
13
  export type { KapiShapeSheetProps, KapiShapeSheetLabels } from "./KapiShapeSheet.js";
14
14
  export { KapiModal, DEFAULT_MODAL_LABELS } from "./KapiModal.js";
15
- export type { KapiModalLabels, KapiModalProps, KapiModalSize } from "./KapiModal.js";
15
+ export type { KapiModalClassNames, KapiModalLabels, KapiModalProps, KapiModalSize } from "./KapiModal.js";
16
16
  export { KapiSplitModal, DEFAULT_SPLIT_MODAL_LABELS } from "./KapiSplitModal.js";
17
17
  export type { KapiSplitModalAside, KapiSplitModalProps, KapiSplitModalLabels } from "./KapiSplitModal.js";
18
18
  export { KapiConfirm, DEFAULT_CONFIRM_LABELS } from "./KapiConfirm.js";