@kapiuara/ui 0.16.0 → 0.18.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 (243) hide show
  1. package/README.md +430 -20
  2. package/dist/components/chat/KapiChatThread.js +4 -4
  3. package/dist/components/chat/KapiComposer.js +8 -8
  4. package/dist/components/data/KapiDataTable.js +4 -4
  5. package/dist/components/data/KapiScatterChart.d.ts +56 -0
  6. package/dist/components/data/KapiScatterChart.js +90 -0
  7. package/dist/components/data/KapiSparkline.d.ts +2 -1
  8. package/dist/components/data/KapiSparkline.js +29 -26
  9. package/dist/components/data/KapiTableFilter.js +6 -6
  10. package/dist/components/data/chartFrame.d.ts +20 -2
  11. package/dist/components/data/chartFrame.js +33 -24
  12. package/dist/components/data/index.d.ts +4 -0
  13. package/dist/components/data/scatterLogic.d.ts +56 -0
  14. package/dist/components/data/scatterLogic.js +43 -0
  15. package/dist/components/data/tableCells.d.ts +12 -1
  16. package/dist/components/data/tableCells.js +49 -51
  17. package/dist/components/data/useTableSelection.js +3 -3
  18. package/dist/components/display/KapiAnnotation.js +68 -63
  19. package/dist/components/display/KapiAvatar.d.ts +6 -4
  20. package/dist/components/display/KapiAvatar.js +33 -28
  21. package/dist/components/display/KapiAvatarGroup.d.ts +14 -2
  22. package/dist/components/display/KapiAvatarGroup.js +25 -23
  23. package/dist/components/display/KapiCodeBlock.d.ts +48 -0
  24. package/dist/components/display/KapiCodeBlock.js +44 -0
  25. package/dist/components/display/KapiCommentComposer.js +6 -6
  26. package/dist/components/display/KapiDiff.d.ts +62 -0
  27. package/dist/components/display/KapiDiff.js +118 -0
  28. package/dist/components/display/KapiHighlight.d.ts +27 -0
  29. package/dist/components/display/KapiHighlight.js +21 -0
  30. package/dist/components/display/KapiIconTile.d.ts +2 -1
  31. package/dist/components/display/KapiIconTile.js +23 -21
  32. package/dist/components/display/KapiStat.d.ts +3 -2
  33. package/dist/components/display/KapiStat.js +32 -26
  34. package/dist/components/display/KapiTag.d.ts +4 -3
  35. package/dist/components/display/KapiTag.js +29 -24
  36. package/dist/components/display/KapiTimeline.d.ts +19 -2
  37. package/dist/components/display/KapiTimeline.js +38 -23
  38. package/dist/components/display/annotationLogic.d.ts +2 -1
  39. package/dist/components/display/annotationLogic.js +7 -6
  40. package/dist/components/display/avatarGroupSlots.d.ts +6 -0
  41. package/dist/components/display/avatarGroupSlots.js +9 -0
  42. package/dist/components/display/codeBlockSlots.d.ts +10 -0
  43. package/dist/components/display/codeBlockSlots.js +13 -0
  44. package/dist/components/display/diffLogic.d.ts +58 -0
  45. package/dist/components/display/diffLogic.js +96 -0
  46. package/dist/components/display/diffSlots.d.ts +14 -0
  47. package/dist/components/display/diffSlots.js +17 -0
  48. package/dist/components/display/highlightLogic.d.ts +18 -0
  49. package/dist/components/display/highlightLogic.js +26 -0
  50. package/dist/components/display/highlightSlots.d.ts +5 -0
  51. package/dist/components/display/highlightSlots.js +8 -0
  52. package/dist/components/display/iconTileLogic.d.ts +2 -2
  53. package/dist/components/display/iconTileLogic.js +7 -6
  54. package/dist/components/display/index.d.ts +9 -1
  55. package/dist/components/display/statLogic.d.ts +2 -1
  56. package/dist/components/display/statLogic.js +7 -6
  57. package/dist/components/display/tagLogic.d.ts +2 -1
  58. package/dist/components/display/tagLogic.js +7 -6
  59. package/dist/components/display/timelineLogic.d.ts +20 -2
  60. package/dist/components/display/timelineLogic.js +10 -2
  61. package/dist/components/feedback/KapiAlert.d.ts +6 -1
  62. package/dist/components/feedback/KapiAlert.js +45 -44
  63. package/dist/components/feedback/KapiCountdown.d.ts +12 -1
  64. package/dist/components/feedback/KapiCountdown.js +34 -31
  65. package/dist/components/feedback/KapiEmpty.d.ts +6 -1
  66. package/dist/components/feedback/KapiEmpty.js +20 -18
  67. package/dist/components/feedback/KapiFab.js +108 -108
  68. package/dist/components/feedback/KapiProgress.js +63 -54
  69. package/dist/components/feedback/KapiSpinner.d.ts +48 -0
  70. package/dist/components/feedback/KapiSpinner.js +27 -0
  71. package/dist/components/feedback/KapiToastContainer.js +10 -10
  72. package/dist/components/feedback/KapiTour.js +13 -13
  73. package/dist/components/feedback/alertSlots.d.ts +9 -0
  74. package/dist/components/feedback/alertSlots.js +12 -0
  75. package/dist/components/feedback/countdownSlots.d.ts +6 -0
  76. package/dist/components/feedback/countdownSlots.js +9 -0
  77. package/dist/components/feedback/emptySlots.d.ts +8 -0
  78. package/dist/components/feedback/emptySlots.js +11 -0
  79. package/dist/components/feedback/index.d.ts +5 -3
  80. package/dist/components/feedback/progressLogic.d.ts +2 -1
  81. package/dist/components/feedback/progressLogic.js +9 -8
  82. package/dist/components/inputs/KapiAutocomplete.d.ts +6 -0
  83. package/dist/components/inputs/KapiAutocomplete.js +86 -85
  84. package/dist/components/inputs/KapiChecklist.d.ts +7 -1
  85. package/dist/components/inputs/KapiChecklist.js +53 -52
  86. package/dist/components/inputs/KapiCopyButton.d.ts +40 -0
  87. package/dist/components/inputs/KapiCopyButton.js +35 -0
  88. package/dist/components/inputs/KapiDatePicker.d.ts +7 -1
  89. package/dist/components/inputs/KapiDatePicker.js +118 -116
  90. package/dist/components/inputs/KapiDateRangePicker.d.ts +7 -1
  91. package/dist/components/inputs/KapiDateRangePicker.js +136 -135
  92. package/dist/components/inputs/KapiFacetedSearch.js +5 -5
  93. package/dist/components/inputs/KapiField.d.ts +9 -1
  94. package/dist/components/inputs/KapiField.js +43 -42
  95. package/dist/components/inputs/KapiFileUpload.d.ts +14 -1
  96. package/dist/components/inputs/KapiFileUpload.js +83 -70
  97. package/dist/components/inputs/KapiInput.d.ts +29 -1
  98. package/dist/components/inputs/KapiInput.js +74 -51
  99. package/dist/components/inputs/KapiMaskedInput.js +26 -26
  100. package/dist/components/inputs/KapiNumberStepper.d.ts +7 -1
  101. package/dist/components/inputs/KapiNumberStepper.js +24 -23
  102. package/dist/components/inputs/KapiPinInput.d.ts +72 -0
  103. package/dist/components/inputs/KapiPinInput.js +75 -0
  104. package/dist/components/inputs/KapiPropsForm.d.ts +34 -0
  105. package/dist/components/inputs/KapiPropsForm.js +78 -0
  106. package/dist/components/inputs/KapiRating.d.ts +7 -1
  107. package/dist/components/inputs/KapiRating.js +39 -38
  108. package/dist/components/inputs/KapiSearchChip.js +5 -5
  109. package/dist/components/inputs/KapiSegmented.d.ts +13 -5
  110. package/dist/components/inputs/KapiSegmented.js +81 -77
  111. package/dist/components/inputs/KapiSelect.d.ts +9 -1
  112. package/dist/components/inputs/KapiSelect.js +236 -233
  113. package/dist/components/inputs/KapiSlider.d.ts +10 -3
  114. package/dist/components/inputs/KapiSlider.js +67 -63
  115. package/dist/components/inputs/KapiTagInput.d.ts +7 -1
  116. package/dist/components/inputs/KapiTagInput.js +70 -69
  117. package/dist/components/inputs/KapiTextarea.d.ts +7 -1
  118. package/dist/components/inputs/KapiTextarea.js +51 -50
  119. package/dist/components/inputs/copyLogic.d.ts +1 -0
  120. package/dist/components/inputs/copyLogic.js +12 -0
  121. package/dist/components/inputs/fieldLogic.d.ts +23 -3
  122. package/dist/components/inputs/fieldLogic.js +18 -11
  123. package/dist/components/inputs/formBridgeLogic.d.ts +104 -0
  124. package/dist/components/inputs/formBridgeLogic.js +25 -0
  125. package/dist/components/inputs/index.d.ts +10 -0
  126. package/dist/components/inputs/inputLogic.d.ts +16 -1
  127. package/dist/components/inputs/inputLogic.js +3 -3
  128. package/dist/components/inputs/ownField.d.ts +3 -1
  129. package/dist/components/inputs/ownField.js +28 -27
  130. package/dist/components/inputs/pinInputLogic.d.ts +34 -0
  131. package/dist/components/inputs/pinInputLogic.js +37 -0
  132. package/dist/components/inputs/propsFormLogic.d.ts +53 -0
  133. package/dist/components/inputs/propsFormLogic.js +11 -0
  134. package/dist/components/inputs/segmentedLogic.d.ts +7 -0
  135. package/dist/components/inputs/segmentedLogic.js +2 -2
  136. package/dist/components/layout/KapiAccessCard.d.ts +5 -1
  137. package/dist/components/layout/KapiAccessCard.js +43 -39
  138. package/dist/components/layout/KapiAccountMenu.js +7 -7
  139. package/dist/components/layout/KapiCollapse.d.ts +39 -0
  140. package/dist/components/layout/KapiCollapse.js +20 -0
  141. package/dist/components/layout/KapiContextSlot.js +4 -4
  142. package/dist/components/layout/KapiDivider.d.ts +11 -2
  143. package/dist/components/layout/KapiDivider.js +30 -24
  144. package/dist/components/layout/KapiGrid.js +2 -2
  145. package/dist/components/layout/KapiNotificationBell.js +10 -10
  146. package/dist/components/layout/KapiPageHeader.js +22 -22
  147. package/dist/components/layout/KapiRail.js +4 -4
  148. package/dist/components/layout/KapiRoot.d.ts +22 -2
  149. package/dist/components/layout/KapiRoot.js +33 -29
  150. package/dist/components/layout/KapiShell.d.ts +9 -1
  151. package/dist/components/layout/KapiShell.js +28 -27
  152. package/dist/components/layout/accessCardLogic.d.ts +8 -1
  153. package/dist/components/layout/accessCardLogic.js +11 -7
  154. package/dist/components/layout/index.d.ts +2 -0
  155. package/dist/components/locale/labelRegistry.d.ts +18 -0
  156. package/dist/components/navigation/KapiAccordion.js +9 -9
  157. package/dist/components/navigation/KapiContextPanel.js +12 -12
  158. package/dist/components/navigation/KapiNavBadge.d.ts +6 -3
  159. package/dist/components/navigation/KapiNavBadge.js +26 -22
  160. package/dist/components/navigation/KapiSteps.d.ts +26 -5
  161. package/dist/components/navigation/KapiSteps.js +55 -43
  162. package/dist/components/navigation/KapiTabs.js +9 -9
  163. package/dist/components/navigation/KapiToc.d.ts +48 -0
  164. package/dist/components/navigation/KapiToc.js +66 -0
  165. package/dist/components/navigation/KapiTree.js +10 -10
  166. package/dist/components/navigation/index.d.ts +3 -0
  167. package/dist/components/navigation/tocLogic.d.ts +35 -0
  168. package/dist/components/navigation/tocLogic.js +11 -0
  169. package/dist/components/navigation/tocSlots.d.ts +8 -0
  170. package/dist/components/navigation/tocSlots.js +11 -0
  171. package/dist/components/overlays/KapiCommandPalette.js +6 -6
  172. package/dist/components/overlays/KapiContextMenu.js +5 -5
  173. package/dist/components/overlays/KapiImageViewer.d.ts +63 -0
  174. package/dist/components/overlays/KapiImageViewer.js +106 -0
  175. package/dist/components/overlays/KapiMenuButton.js +7 -7
  176. package/dist/components/overlays/KapiModal.js +3 -3
  177. package/dist/components/overlays/KapiOffcanvas.js +24 -24
  178. package/dist/components/overlays/KapiPhotoView.js +10 -10
  179. package/dist/components/overlays/KapiPopover.js +6 -6
  180. package/dist/components/overlays/KapiShapeSheet.js +4 -4
  181. package/dist/components/overlays/KapiShortcutsHelp.d.ts +53 -0
  182. package/dist/components/overlays/KapiShortcutsHelp.js +55 -0
  183. package/dist/components/overlays/KapiTooltip.d.ts +49 -10
  184. package/dist/components/overlays/KapiTooltip.js +120 -68
  185. package/dist/components/overlays/KapiViewport.d.ts +63 -0
  186. package/dist/components/overlays/KapiViewport.js +195 -0
  187. package/dist/components/overlays/index.d.ts +8 -0
  188. package/dist/components/overlays/menuList.js +22 -22
  189. package/dist/components/overlays/shortcutsHelpSlots.d.ts +9 -0
  190. package/dist/components/overlays/shortcutsHelpSlots.js +12 -0
  191. package/dist/components/overlays/viewportLogic.d.ts +73 -0
  192. package/dist/components/overlays/viewportLogic.js +54 -0
  193. package/dist/components/slotCatalog.d.ts +66 -0
  194. package/dist/components/slotCatalog.js +30 -12
  195. package/dist/css/base.css +1 -1
  196. package/dist/css/components/data/KapiScatterChart.css +1 -0
  197. package/dist/css/components/display/KapiAnnotation.css +1 -1
  198. package/dist/css/components/display/KapiCodeBlock.css +1 -0
  199. package/dist/css/components/display/KapiDiff.css +1 -0
  200. package/dist/css/components/display/display.css +1 -1
  201. package/dist/css/components/feedback/feedback.css +1 -1
  202. package/dist/css/components/inputs/KapiFileUpload.css +1 -1
  203. package/dist/css/components/inputs/KapiPinInput.css +1 -0
  204. package/dist/css/components/inputs/KapiSelect.css +1 -1
  205. package/dist/css/components/inputs/inputsExtra.css +1 -1
  206. package/dist/css/components/layout/KapiAccessCard.css +1 -1
  207. package/dist/css/components/layout/KapiCollapse.css +1 -0
  208. package/dist/css/components/layout/KapiDivider.css +1 -1
  209. package/dist/css/components/navigation/KapiSteps.css +1 -1
  210. package/dist/css/components/navigation/KapiToc.css +1 -0
  211. package/dist/css/components/overlays/KapiViewport.css +1 -0
  212. package/dist/css/components/overlays/overlays.css +1 -1
  213. package/dist/hooks/asyncResourceLogic.d.ts +11 -0
  214. package/dist/hooks/asyncResourceLogic.js +4 -0
  215. package/dist/hooks/elementSizeLogic.d.ts +15 -0
  216. package/dist/hooks/elementSizeLogic.js +7 -0
  217. package/dist/hooks/hotkeyLogic.d.ts +9 -0
  218. package/dist/hooks/hotkeyLogic.js +16 -15
  219. package/dist/hooks/hotkeyRegistry.d.ts +44 -0
  220. package/dist/hooks/hotkeyRegistry.js +32 -0
  221. package/dist/hooks/index.d.ts +13 -0
  222. package/dist/hooks/toneFamilyLogic.d.ts +26 -2
  223. package/dist/hooks/toneFamilyLogic.js +19 -6
  224. package/dist/hooks/useAsyncResource.d.ts +45 -0
  225. package/dist/hooks/useAsyncResource.js +24 -0
  226. package/dist/hooks/useDebouncedValue.d.ts +30 -0
  227. package/dist/hooks/useDebouncedValue.js +26 -0
  228. package/dist/hooks/useDisclosure.d.ts +39 -0
  229. package/dist/hooks/useDisclosure.js +35 -0
  230. package/dist/hooks/useElementSize.d.ts +27 -0
  231. package/dist/hooks/useElementSize.js +29 -0
  232. package/dist/hooks/useHotkey.d.ts +8 -0
  233. package/dist/hooks/useHotkey.js +27 -15
  234. package/dist/hooks/useKapiTheme.d.ts +8 -1
  235. package/dist/hooks/useKapiTheme.js +57 -57
  236. package/dist/hooks/useToneFamilies.d.ts +14 -4
  237. package/dist/hooks/useToneFamilies.js +27 -23
  238. package/dist/index.js +234 -207
  239. package/dist/kapi.css +1 -1
  240. package/dist/kapi.layered.css +1 -1
  241. package/dist/logic.d.ts +45 -0
  242. package/dist/logic.js +46 -0
  243. package/package.json +13 -2
@@ -1,9 +1,26 @@
1
1
  import type { HTMLAttributes, ReactNode, Ref } from "react";
2
- import { type KapiTimelineTone } from "./timelineLogic.js";
2
+ import type { KapiRender } from "../renderSlot.js";
3
+ import { type KapiTimelineToneName } from "./timelineLogic.js";
3
4
  export type KapiTimelineItem = {
5
+ /** Qué pasó. */
4
6
  text: ReactNode;
7
+ /** Cuándo pasó; se dibuja apagado debajo del texto. */
5
8
  date?: ReactNode;
6
- tone?: KapiTimelineTone | undefined;
9
+ /** Color del punto: un tono de la línea de tiempo o una familia propia de la app. @default "primary" */
10
+ tone?: KapiTimelineToneName | undefined;
11
+ /**
12
+ * Convierte el texto en un link al destino. La **fecha queda afuera** a propósito: es contexto,
13
+ * no destino, y adentro haría que el lector anuncie «texto fecha, enlace».
14
+ */
15
+ href?: string | undefined;
16
+ /** Abre el link en una pestaña nueva, con el aviso compartido del locale. Sólo con `href`. */
17
+ newTab?: boolean | undefined;
18
+ /** Dibuja otro elemento con el aspecto del link (el `<Link>` de tu router). Sólo con `href`. */
19
+ render?: KapiRender | undefined;
20
+ /** Ícono adentro del punto. Decorativo: el riel entero es `aria-hidden`, así que el significado va en el texto. */
21
+ icon?: ReactNode;
22
+ /** Reemplaza el punto entero por un nodo propio. Gana sobre `icon` y sobre `tone`. */
23
+ marker?: ReactNode;
7
24
  };
8
25
  /** Atributos nativos (`id`, `style`, `data-*`, `aria-*`…) van al `<ol>`. */
9
26
  export type KapiTimelineProps = Omit<HTMLAttributes<HTMLOListElement>, "children"> & {
@@ -1,31 +1,46 @@
1
1
  "use client";
2
2
  import "#kapi-css/components/display/display.css";
3
+ import { useToneLookResolver as e } from "../../hooks/useToneFamilies.js";
3
4
  /* empty css */
4
- import { showConnector as e, timelineDotClass as t } from "./timelineLogic.js";
5
- import { jsx as n, jsxs as r } from "react/jsx-runtime";
5
+ import { KapiAnchor as t } from "./KapiAnchor.js";
6
+ import { isTimelineTone as n, needsToneResolver as r, showConnector as i, timelineDotClass as a } from "./timelineLogic.js";
7
+ import { jsx as o, jsxs as s } from "react/jsx-runtime";
6
8
  //#region src/components/display/KapiTimeline.tsx
7
- function i({ items: i, className: a, ...o }) {
8
- return /* @__PURE__ */ n("ol", {
9
- ...o,
10
- className: ["kapi-timeline", a].filter(Boolean).join(" "),
11
- children: i.map((a, o) => /* @__PURE__ */ r("li", {
12
- className: "kapi-timeline__item",
13
- children: [/* @__PURE__ */ r("div", {
14
- className: "kapi-timeline__rail",
15
- "aria-hidden": !0,
16
- children: [/* @__PURE__ */ n("span", { className: t(a.tone) }), e(o, i.length) && /* @__PURE__ */ n("span", { className: "kapi-tl-line" })]
17
- }), /* @__PURE__ */ r("div", {
18
- className: "kapi-timeline__body",
19
- children: [/* @__PURE__ */ n("div", {
20
- className: "kapi-strong",
21
- children: a.text
22
- }), a.date != null && /* @__PURE__ */ n("div", {
23
- className: "kapi-muted",
24
- children: a.date
9
+ function c({ items: c, className: l, ...u }) {
10
+ let d = e("KapiTimeline");
11
+ return /* @__PURE__ */ o("ol", {
12
+ ...u,
13
+ className: ["kapi-timeline", l].filter(Boolean).join(" "),
14
+ children: c.map((e, l) => {
15
+ let u = r(e.tone) ? d(e.tone) : void 0;
16
+ return /* @__PURE__ */ s("li", {
17
+ className: "kapi-timeline__item",
18
+ children: [/* @__PURE__ */ s("div", {
19
+ className: "kapi-timeline__rail",
20
+ "aria-hidden": !0,
21
+ children: [e.marker ?? /* @__PURE__ */ o("span", {
22
+ className: a(n(e.tone) ? e.tone : void 0, u?.style !== void 0),
23
+ style: u?.style,
24
+ children: e.icon
25
+ }), i(l, c.length) && /* @__PURE__ */ o("span", { className: "kapi-tl-line" })]
26
+ }), /* @__PURE__ */ s("div", {
27
+ className: "kapi-timeline__body",
28
+ children: [/* @__PURE__ */ o("div", {
29
+ className: "kapi-strong",
30
+ children: e.href === void 0 ? e.text : /* @__PURE__ */ o(t, {
31
+ href: e.href,
32
+ ...e.newTab ? { newTab: !0 } : {},
33
+ ...e.render ? { render: e.render } : {},
34
+ children: e.text
35
+ })
36
+ }), e.date != null && /* @__PURE__ */ o("div", {
37
+ className: "kapi-muted",
38
+ children: e.date
39
+ })]
25
40
  })]
26
- })]
27
- }, o))
41
+ }, l);
42
+ })
28
43
  });
29
44
  }
30
45
  //#endregion
31
- export { i as KapiTimeline };
46
+ export { c as KapiTimeline };
@@ -1,10 +1,11 @@
1
1
  import type { ReactNode } from "react";
2
+ import { type KapiFamilyTone } from "../tone.js";
2
3
  export type KapiAnnotationUnderline = "dotted" | "solid" | "none";
3
4
  export type KapiAnnotationTone = "primary" | "info" | "warning" | "neutral";
4
5
  /** Clases del término anotado. Pura: es lo que se testea (no el markup). */
5
6
  export declare const annotationClasses: ({ underline, tone, clickable, className }?: {
6
7
  underline?: KapiAnnotationUnderline | undefined;
7
- tone?: KapiAnnotationTone | undefined;
8
+ tone?: KapiAnnotationTone | KapiFamilyTone | undefined;
8
9
  clickable?: boolean | undefined;
9
10
  className?: string | undefined;
10
11
  }) => string;
@@ -1,11 +1,12 @@
1
+ import { isFamilyTone as e } from "../tone.js";
1
2
  //#region src/components/display/annotationLogic.ts
2
- var e = ({ underline: e = "dotted", tone: t = "primary", clickable: n = !1, className: r = "" } = {}) => [
3
+ var t = ({ underline: t = "dotted", tone: n = "primary", clickable: r = !1, className: i = "" } = {}) => [
3
4
  "kapi-annotation",
5
+ e(n) ? "kapi-annotation--family" : `kapi-annotation--${n}`,
4
6
  `kapi-annotation--${t}`,
5
- `kapi-annotation--${e}`,
6
- n && "kapi-annotation--clickable",
7
- r
8
- ].filter(Boolean).join(" "), t = (e, t, n) => {
7
+ r && "kapi-annotation--clickable",
8
+ i
9
+ ].filter(Boolean).join(" "), n = (e, t, n) => {
9
10
  let r = typeof e == "function";
10
11
  return {
11
12
  element: r ? "button" : "span",
@@ -14,4 +15,4 @@ var e = ({ underline: e = "dotted", tone: t = "primary", clickable: n = !1, clas
14
15
  };
15
16
  };
16
17
  //#endregion
17
- export { e as annotationClasses, t as annotationRole };
18
+ export { t as annotationClasses, n as annotationRole };
@@ -0,0 +1,6 @@
1
+ /** Partes de `avatarGroup` (ver `slotCatalog.ts` para el contrato). Vive junto al componente para que su CSS lo siga. */
2
+ export declare const AVATAR_GROUP_SLOTS: import("../slotsLogic.js").SlotTable<"avatarGroup", {
3
+ readonly root: "kapi-avatargroup";
4
+ readonly item: "kapi-avatargroup__item";
5
+ readonly more: null;
6
+ }>;
@@ -0,0 +1,9 @@
1
+ import { defineSlots as e } from "../slotsLogic.js";
2
+ //#region src/components/display/avatarGroupSlots.ts
3
+ var t = e("avatarGroup", {
4
+ root: "kapi-avatargroup",
5
+ item: "kapi-avatargroup__item",
6
+ more: null
7
+ });
8
+ //#endregion
9
+ export { t as AVATAR_GROUP_SLOTS };
@@ -0,0 +1,10 @@
1
+ /** Partes de `codeBlock` (ver `slotCatalog.ts` para el contrato). Vive junto al componente. */
2
+ export declare const CODE_BLOCK_SLOTS: import("../slotsLogic.js").SlotTable<"codeBlock", {
3
+ readonly root: "kapi-codeblock";
4
+ readonly bar: "kapi-codeblock__bar";
5
+ readonly title: "kapi-codeblock__title";
6
+ readonly copy: null;
7
+ readonly pre: "kapi-codeblock__pre";
8
+ readonly numbers: "kapi-codeblock__nums";
9
+ readonly code: "kapi-codeblock__code";
10
+ }>;
@@ -0,0 +1,13 @@
1
+ import { defineSlots as e } from "../slotsLogic.js";
2
+ //#region src/components/display/codeBlockSlots.ts
3
+ var t = e("codeBlock", {
4
+ root: "kapi-codeblock",
5
+ bar: "kapi-codeblock__bar",
6
+ title: "kapi-codeblock__title",
7
+ copy: null,
8
+ pre: "kapi-codeblock__pre",
9
+ numbers: "kapi-codeblock__nums",
10
+ code: "kapi-codeblock__code"
11
+ });
12
+ //#endregion
13
+ export { t as CODE_BLOCK_SLOTS };
@@ -0,0 +1,58 @@
1
+ /** Qué le pasó a una línea entre `before` y `after`. */
2
+ export type KapiDiffKind = "equal" | "add" | "remove";
3
+ /** Una línea del resultado, con su número en cada lado (`null` si no existe de ese lado). */
4
+ export type KapiDiffLine = {
5
+ /** Si la línea se mantiene, se agrega o se quita. */
6
+ kind: KapiDiffKind;
7
+ /** Número de línea en `before`, desde 1. `null` en una línea agregada. */
8
+ before: number | null;
9
+ /** Número de línea en `after`, desde 1. `null` en una línea quitada. */
10
+ after: number | null;
11
+ /** El texto de la línea, sin el salto. */
12
+ text: string;
13
+ };
14
+ /** Un tramo del resultado: líneas seguidas, con el aviso de cuántas se saltearon antes. */
15
+ export type KapiDiffHunk = {
16
+ /** Las líneas del tramo, en orden. */
17
+ lines: KapiDiffLine[];
18
+ /** Cuántas líneas iguales quedaron ocultas ANTES de este tramo. 0 en el primero si no se cortó. */
19
+ skipped: number;
20
+ /**
21
+ * Cuántas líneas iguales quedaron ocultas DESPUÉS de este tramo. Sólo el último puede traerlo
22
+ * distinto de 0: sin esto, las ocultas del final se contaban y se tiraban, y la vista parecía
23
+ * terminar en el último cambio.
24
+ */
25
+ skippedAfter: number;
26
+ };
27
+ /**
28
+ * La diferencia línea por línea entre dos textos.
29
+ *
30
+ * El orden dentro de un bloque cambiado es **primero lo que se quita y después lo que se agrega**,
31
+ * que es como se lee un diff en todos lados. Myers emite las operaciones mezcladas según por dónde
32
+ * pasó el camino, así que cada bloque se reordena al armarlo.
33
+ */
34
+ export declare const diffLines: (before: string, after: string) => KapiDiffLine[];
35
+ /**
36
+ * Corta el resultado en tramos, dejando `context` líneas iguales alrededor de cada cambio.
37
+ *
38
+ * Sin esto, comparar dos versiones de un documento largo muestra el documento entero con tres
39
+ * líneas en rojo en el medio. `skipped` dice cuántas se ocultaron antes de cada tramo, para poder
40
+ * dibujar el "… 42 líneas sin cambios".
41
+ *
42
+ * Con `context: Infinity` devuelve un solo tramo con todo, que es lo que quiere una vista completa.
43
+ */
44
+ export declare const diffHunks: (lines: readonly KapiDiffLine[], context?: number) => KapiDiffHunk[];
45
+ /** Una fila de la vista lado a lado: puede faltar de un lado. */
46
+ export type KapiDiffRow = {
47
+ /** La línea de la izquierda (`before`), o `null` si de ese lado no hay. */
48
+ left: KapiDiffLine | null;
49
+ /** La línea de la derecha (`after`), o `null` si de ese lado no hay. */
50
+ right: KapiDiffLine | null;
51
+ };
52
+ /**
53
+ * Pasa un tramo a filas de dos columnas, emparejando lo quitado con lo agregado.
54
+ *
55
+ * Emparejar importa: con tres líneas quitadas y tres agregadas se quiere verlas enfrentadas, no
56
+ * seis filas con huecos. Cuando los conteos no coinciden, el lado corto queda en `null`.
57
+ */
58
+ export declare const diffRows: (lines: readonly KapiDiffLine[]) => KapiDiffRow[];
@@ -0,0 +1,96 @@
1
+ //#region src/components/display/diffLogic.ts
2
+ var e = (e) => e === "" ? [] : e.split(/\r?\n/), t = (e, t, n) => t === -n || t !== n && (e.get(t - 1) ?? 0) < (e.get(t + 1) ?? 0), n = (e, n) => {
3
+ let i = e.length, a = n.length, o = i + a, s = /* @__PURE__ */ new Map([[1, 0]]), c = [], l = Math.min(o, 1e3);
4
+ for (let o = 0; o <= l; o++) {
5
+ c.push(new Map(s));
6
+ for (let l = -o; l <= o; l += 2) {
7
+ let u = t(s, l, o) ? s.get(l + 1) ?? 0 : (s.get(l - 1) ?? 0) + 1, d = u - l;
8
+ for (; u < i && d < a && e[u] === n[d];) u++, d++;
9
+ if (s.set(l, u), u >= i && d >= a) return r(c, i, a, o);
10
+ }
11
+ }
12
+ return [...Array.from({ length: i }, () => "remove"), ...Array.from({ length: a }, () => "add")];
13
+ }, r = (e, n, r, i) => {
14
+ let a = [], o = n, s = r;
15
+ for (let n = i; n > 0; n--) {
16
+ let r = e[n], i = o - s, c = t(r, i, n), l = c ? i + 1 : i - 1, u = r.get(l) ?? 0, d = u - l;
17
+ for (; o > u && s > d;) a.push("equal"), o--, s--;
18
+ a.push(c ? "add" : "remove"), o = u, s = d;
19
+ }
20
+ for (; o > 0 && s > 0;) a.push("equal"), o--, s--;
21
+ return a.reverse();
22
+ }, i = (t, r) => {
23
+ let i = e(t), a = e(r), o = n(i, a), s = [], c = 0, l = 0, u = 0;
24
+ for (; u < o.length;) {
25
+ if (o[u] === "equal") {
26
+ s.push({
27
+ kind: "equal",
28
+ before: c + 1,
29
+ after: l + 1,
30
+ text: i[c]
31
+ }), c++, l++, u++;
32
+ continue;
33
+ }
34
+ let e = [], t = [];
35
+ for (; u < o.length && o[u] !== "equal";) o[u] === "remove" ? (e.push({
36
+ kind: "remove",
37
+ before: c + 1,
38
+ after: null,
39
+ text: i[c]
40
+ }), c++) : (t.push({
41
+ kind: "add",
42
+ before: null,
43
+ after: l + 1,
44
+ text: a[l]
45
+ }), l++), u++;
46
+ s.push(...e, ...t);
47
+ }
48
+ return s;
49
+ }, a = (e) => e === Infinity ? Infinity : Number.isFinite(e) ? Math.max(0, Math.trunc(e)) : 0, o = (e, t = 3) => {
50
+ if (e.length === 0) return [];
51
+ let n = a(t), r = /* @__PURE__ */ new Set(), i = 0;
52
+ for (let t = 0; t < e.length; t++) {
53
+ if (e[t]?.kind === "equal") continue;
54
+ let a = Math.max(i, t - n), o = Math.min(e.length - 1, t + n);
55
+ for (let e = a; e <= o; e++) r.add(e);
56
+ i = Math.max(i, o + 1);
57
+ }
58
+ if (r.size === 0) return [];
59
+ let o = [], s = [], c = 0, l = 0;
60
+ for (let t = 0; t < e.length; t++) r.has(t) ? (s.length === 0 && (c = l), l = 0, s.push(e[t])) : (s.length > 0 && (o.push({
61
+ lines: s,
62
+ skipped: c,
63
+ skippedAfter: 0
64
+ }), s = []), l++);
65
+ s.length > 0 && o.push({
66
+ lines: s,
67
+ skipped: c,
68
+ skippedAfter: 0
69
+ });
70
+ let u = o[o.length - 1];
71
+ return u !== void 0 && (u.skippedAfter = l), o;
72
+ }, s = (e) => {
73
+ let t = [], n = 0;
74
+ for (; n < e.length;) {
75
+ let r = e[n];
76
+ if (r.kind === "equal") {
77
+ t.push({
78
+ left: r,
79
+ right: r
80
+ }), n++;
81
+ continue;
82
+ }
83
+ let i = [], a = [];
84
+ for (; n < e.length && e[n]?.kind !== "equal";) {
85
+ let t = e[n];
86
+ (t.kind === "remove" ? i : a).push(t), n++;
87
+ }
88
+ for (let e = 0; e < Math.max(i.length, a.length); e++) t.push({
89
+ left: i[e] ?? null,
90
+ right: a[e] ?? null
91
+ });
92
+ }
93
+ return t;
94
+ };
95
+ //#endregion
96
+ export { o as diffHunks, i as diffLines, s as diffRows };
@@ -0,0 +1,14 @@
1
+ /** Partes de `diff` (ver `slotCatalog.ts` para el contrato). Vive junto al componente. */
2
+ export declare const DIFF_SLOTS: import("../slotsLogic.js").SlotTable<"diff", {
3
+ readonly root: "kapi-diff";
4
+ readonly bar: "kapi-diff__bar";
5
+ readonly empty: "kapi-diff__empty";
6
+ readonly body: "kapi-diff__body";
7
+ readonly hunk: null;
8
+ readonly skip: "kapi-diff__skip";
9
+ readonly row: "kapi-diff__row";
10
+ readonly cell: "kapi-diff__cell";
11
+ readonly number: "kapi-diff__num";
12
+ readonly sign: "kapi-diff__sign";
13
+ readonly text: "kapi-diff__text";
14
+ }>;
@@ -0,0 +1,17 @@
1
+ import { defineSlots as e } from "../slotsLogic.js";
2
+ //#region src/components/display/diffSlots.ts
3
+ var t = e("diff", {
4
+ root: "kapi-diff",
5
+ bar: "kapi-diff__bar",
6
+ empty: "kapi-diff__empty",
7
+ body: "kapi-diff__body",
8
+ hunk: null,
9
+ skip: "kapi-diff__skip",
10
+ row: "kapi-diff__row",
11
+ cell: "kapi-diff__cell",
12
+ number: "kapi-diff__num",
13
+ sign: "kapi-diff__sign",
14
+ text: "kapi-diff__text"
15
+ });
16
+ //#endregion
17
+ export { t as DIFF_SLOTS };
@@ -0,0 +1,18 @@
1
+ /** A piece of the text: either part of a match or the text between matches. */
2
+ export type KapiHighlightSegment = {
3
+ /** The piece of text. Never empty. */
4
+ text: string;
5
+ /** `true` when this piece is one of the occurrences of the query. */
6
+ match: boolean;
7
+ };
8
+ /**
9
+ * Splits `text` into the pieces that match `query` and the ones that do not, left to right.
10
+ *
11
+ * The query is matched LITERALLY, never as a regular expression. That is the whole reason this is
12
+ * a function and not an inline `split`: search boxes get `(`, `*` and `?` typed into them all the
13
+ * time, and building a `RegExp` from user input either throws or silently matches something else.
14
+ *
15
+ * Returns one non-matching segment for the whole text when the query is empty, and an empty list
16
+ * for an empty text, so the caller never has to special-case either.
17
+ */
18
+ export declare const splitByQuery: (text: string, query: string, caseSensitive?: boolean) => KapiHighlightSegment[];
@@ -0,0 +1,26 @@
1
+ //#region src/components/display/highlightLogic.ts
2
+ var e = (e, t, n = !1) => {
3
+ if (e === "") return [];
4
+ if (t === "") return [{
5
+ text: e,
6
+ match: !1
7
+ }];
8
+ let r = n ? t : t.toLowerCase(), i = n ? e : e.toLowerCase(), a = [], o = 0;
9
+ for (;;) {
10
+ let n = i.indexOf(r, o);
11
+ if (n === -1) break;
12
+ n > o && a.push({
13
+ text: e.slice(o, n),
14
+ match: !1
15
+ }), a.push({
16
+ text: e.slice(n, n + t.length),
17
+ match: !0
18
+ }), o = n + t.length;
19
+ }
20
+ return o < e.length && a.push({
21
+ text: e.slice(o),
22
+ match: !1
23
+ }), a;
24
+ };
25
+ //#endregion
26
+ export { e as splitByQuery };
@@ -0,0 +1,5 @@
1
+ /** Partes de `highlight` (ver `slotCatalog.ts`). La marca es lo único retocable: el resto es texto. */
2
+ export declare const HIGHLIGHT_SLOTS: import("../slotsLogic.js").SlotTable<"highlight", {
3
+ readonly root: null;
4
+ readonly hit: "kapi-highlight__hit";
5
+ }>;
@@ -0,0 +1,8 @@
1
+ import { defineSlots as e } from "../slotsLogic.js";
2
+ //#region src/components/display/highlightSlots.ts
3
+ var t = e("highlight", {
4
+ root: null,
5
+ hit: "kapi-highlight__hit"
6
+ });
7
+ //#endregion
8
+ export { t as HIGHLIGHT_SLOTS };
@@ -1,4 +1,4 @@
1
- import type { KapiTone } from "../tone.js";
1
+ import { type KapiFamilyTone, type KapiTone } from "../tone.js";
2
2
  export type KapiIconTileTone = KapiTone;
3
3
  export type KapiIconTileSize = "sm" | "md" | "lg" | number;
4
4
  /** Tile edge in px; named sizes map to a fixed scale, numbers are clamped to >= 16. */
@@ -7,7 +7,7 @@ export declare const iconTileSizePx: (size?: KapiIconTileSize) => number;
7
7
  export declare const iconTileRadiusPx: (px: number) => number;
8
8
  /** Classes of an icon tile. Pure and exported. */
9
9
  export declare const iconTileClasses: ({ tone, soft, className }?: {
10
- tone?: KapiIconTileTone | undefined;
10
+ tone?: KapiIconTileTone | KapiFamilyTone | undefined;
11
11
  soft?: boolean | undefined;
12
12
  className?: string | undefined;
13
13
  }) => string;
@@ -1,13 +1,14 @@
1
+ import { isFamilyTone as e } from "../tone.js";
1
2
  //#region src/components/display/iconTileLogic.ts
2
- var e = {
3
+ var t = {
3
4
  sm: 36,
4
5
  md: 48,
5
6
  lg: 56
6
- }, t = (t = "md") => typeof t == "number" ? Math.max(16, Math.round(t)) : e[t], n = (e) => Math.max(8, Math.round(e * .27)), r = ({ tone: e = "primary", soft: t = !1, className: n = "" } = {}) => [
7
+ }, n = (e = "md") => typeof e == "number" ? Math.max(16, Math.round(e)) : t[e], r = (e) => Math.max(8, Math.round(e * .27)), i = ({ tone: t = "primary", soft: n = !1, className: r = "" } = {}) => [
7
8
  "kapi-icontile",
8
- `kapi-icontile--${e}`,
9
- t && "kapi-icontile--soft",
10
- n
9
+ e(t) ? "kapi-icontile--family" : `kapi-icontile--${t}`,
10
+ n && "kapi-icontile--soft",
11
+ r
11
12
  ].filter(Boolean).join(" ");
12
13
  //#endregion
13
- export { r as iconTileClasses, n as iconTileRadiusPx, t as iconTileSizePx };
14
+ export { i as iconTileClasses, r as iconTileRadiusPx, n as iconTileSizePx };
@@ -44,7 +44,7 @@ iconTileSizePx,
44
44
  iconTileRadiusPx } from "./iconTileLogic.js";
45
45
  export type { KapiIconTileSize, KapiIconTileTone } from "./iconTileLogic.js";
46
46
  export { DEFAULT_AVATAR_GROUP_LABELS, KapiAvatarGroup } from "./KapiAvatarGroup.js";
47
- export type { KapiAvatarGroupItem, KapiAvatarGroupLabels, KapiAvatarGroupProps } from "./KapiAvatarGroup.js";
47
+ export type { KapiAvatarGroupClassNames, KapiAvatarGroupItem, KapiAvatarGroupLabels, KapiAvatarGroupProps } from "./KapiAvatarGroup.js";
48
48
  export {
49
49
  /** @deprecated Interno; usa `KapiAvatarGroup` en su lugar. Se quita en 1.0. */
50
50
  splitAvatarGroup,
@@ -91,3 +91,11 @@ export type { KapiTitleProps } from "./KapiTitle.js";
91
91
  export { KapiAnchor } from "./KapiAnchor.js";
92
92
  export type { KapiAnchorProps, KapiAnchorUnderline } from "./KapiAnchor.js";
93
93
  export type { KapiTextAlign, KapiTextSize, KapiTextTone, KapiTextWeight, KapiTitleLevel } from "./textLogic.js";
94
+ export { KapiHighlight } from "./KapiHighlight.js";
95
+ export type { KapiHighlightProps, KapiHighlightSegment } from "./KapiHighlight.js";
96
+ export { splitByQuery } from "./highlightLogic.js";
97
+ export { KapiCodeBlock, DEFAULT_CODE_BLOCK_LABELS } from "./KapiCodeBlock.js";
98
+ export type { KapiCodeBlockLabels, KapiCodeBlockProps } from "./KapiCodeBlock.js";
99
+ export { KapiDiff, DEFAULT_DIFF_LABELS } from "./KapiDiff.js";
100
+ export type { KapiDiffHunk, KapiDiffKind, KapiDiffLabels, KapiDiffLine, KapiDiffProps, KapiDiffRow, KapiDiffView } from "./KapiDiff.js";
101
+ export { diffHunks, diffLines, diffRows } from "./diffLogic.js";
@@ -1,8 +1,9 @@
1
1
  import type { KapiIconTileTone } from "./iconTileLogic.js";
2
+ import { type KapiFamilyTone } from "../tone.js";
2
3
  export type KapiStatTone = "neutral" | "primary" | "success" | "info" | "warning" | "danger";
3
4
  /** Clases de una tarjeta KPI: reutiliza `.kapi-card .kapi-statcard`; el tono sólo tiñe el valor/nota. */
4
5
  export declare const statClasses: ({ tone, hasIcon, className }?: {
5
- tone?: KapiStatTone | undefined;
6
+ tone?: KapiStatTone | KapiFamilyTone | undefined;
6
7
  hasIcon?: boolean | undefined;
7
8
  className?: string | undefined;
8
9
  }) => string;
@@ -1,10 +1,11 @@
1
+ import { isFamilyTone as e } from "../tone.js";
1
2
  //#region src/components/display/statLogic.ts
2
- var e = ({ tone: e = "neutral", hasIcon: t = !1, className: n = "" } = {}) => [
3
+ var t = ({ tone: t = "neutral", hasIcon: n = !1, className: r = "" } = {}) => [
3
4
  "kapi-card",
4
5
  "kapi-statcard",
5
- e !== "neutral" && `kapi-statcard--${e}`,
6
- t && "kapi-statcard--icon",
7
- n
8
- ].filter(Boolean).join(" "), t = (e = "neutral", t) => t ?? (e === "neutral" ? "primary" : e);
6
+ e(t) ? "kapi-statcard--family" : t !== "neutral" && `kapi-statcard--${t}`,
7
+ n && "kapi-statcard--icon",
8
+ r
9
+ ].filter(Boolean).join(" "), n = (e = "neutral", t) => t ?? (e === "neutral" ? "primary" : e);
9
10
  //#endregion
10
- export { e as statClasses, t as statIconTone };
11
+ export { t as statClasses, n as statIconTone };
@@ -1,7 +1,8 @@
1
+ import { type KapiFamilyTone } from "../tone.js";
1
2
  export type KapiTagTone = "neutral" | "primary" | "success" | "info" | "warning" | "danger";
2
3
  export type KapiTagSize = "sm" | "md";
3
4
  export type KapiTagClassesInput = {
4
- tone?: KapiTagTone | undefined;
5
+ tone?: KapiTagTone | KapiFamilyTone | undefined;
5
6
  size?: KapiTagSize | undefined;
6
7
  /** Tiene botón de quitar: reserva el espacio del borde derecho. */
7
8
  removable?: boolean | undefined;
@@ -1,10 +1,11 @@
1
+ import { isFamilyTone as e } from "../tone.js";
1
2
  //#region src/components/display/tagLogic.ts
2
- var e = ({ tone: e = "neutral", size: t = "md", removable: n = !1, className: r = "" } = {}) => [
3
+ var t = ({ tone: t = "neutral", size: n = "md", removable: r = !1, className: i = "" } = {}) => [
3
4
  "kapi-tag",
4
- `kapi-tag--${e}`,
5
- t !== "md" && `kapi-tag--${t}`,
6
- n && "kapi-tag--removable",
7
- r
5
+ e(t) ? "kapi-tag--family" : `kapi-tag--${t}`,
6
+ n !== "md" && `kapi-tag--${n}`,
7
+ r && "kapi-tag--removable",
8
+ i
8
9
  ].filter(Boolean).join(" ");
9
10
  //#endregion
10
- export { e as tagClasses };
11
+ export { t as tagClasses };
@@ -1,5 +1,23 @@
1
+ import { type KapiFamilyTone } from "../tone.js";
2
+ /** Tonos propios de la línea de tiempo. `muted` no es un `KapiTone`: es gris apagado, sólo de acá. */
1
3
  export type KapiTimelineTone = "primary" | "success" | "info" | "warning" | "danger" | "muted";
2
- /** Clase del punto según el tono (default `primary`). */
3
- export declare const timelineDotClass: (tone?: KapiTimelineTone) => string;
4
+ /** El tono de un ítem: uno propio de la línea de tiempo o una familia de la app (`toneFamilies`). */
5
+ export type KapiTimelineToneName = KapiTimelineTone | KapiFamilyTone;
6
+ /**
7
+ * `true` si el valor es un tono propio de la línea de tiempo. Hace falta además de `isFamilyTone`
8
+ * porque `muted` es de acá y NO está en los nombres reservados: sin este filtro, `tone="muted"` se
9
+ * leería como una familia sin registrar, caería al default y avisaría por consola.
10
+ */
11
+ export declare const isTimelineTone: (value: unknown) => value is KapiTimelineTone;
12
+ /**
13
+ * Clase del punto según el tono (default `primary`). `family` lo dibuja con los slots locales
14
+ * (`--kapi-tone`) que el componente pone inline, que es cómo entra una familia propia de la app.
15
+ */
16
+ export declare const timelineDotClass: (tone?: KapiTimelineTone | undefined, family?: boolean) => string;
17
+ /**
18
+ * Si el tono de un ítem lo resuelve la línea de tiempo (uno propio, o nada) o hay que preguntarle
19
+ * al resolver de familias. Separado del `.tsx` para poder testear la decisión sin montar nada.
20
+ */
21
+ export declare const needsToneResolver: (tone: KapiTimelineToneName | undefined) => boolean;
4
22
  /** El último ítem no dibuja el conector hacia abajo. */
5
23
  export declare const showConnector: (index: number, total: number) => boolean;
@@ -1,4 +1,12 @@
1
+ import { isFamilyTone as e } from "../tone.js";
1
2
  //#region src/components/display/timelineLogic.ts
2
- var e = (e = "primary") => `kapi-tl-dot kapi-timeline__dot--${e}`, t = (e, t) => e < t - 1;
3
+ var t = /* @__PURE__ */ new Set([
4
+ "primary",
5
+ "success",
6
+ "info",
7
+ "warning",
8
+ "danger",
9
+ "muted"
10
+ ]), n = (e) => typeof e == "string" && t.has(e), r = (e, t = !1) => `kapi-tl-dot kapi-timeline__dot--${t ? "family" : e ?? "primary"}`, i = (t) => t !== void 0 && !n(t) && e(t), a = (e, t) => e < t - 1;
3
11
  //#endregion
4
- export { t as showConnector, e as timelineDotClass };
12
+ export { n as isTimelineTone, i as needsToneResolver, a as showConnector, r as timelineDotClass };
@@ -2,6 +2,9 @@ import type { HTMLAttributes, ReactNode, Ref } from "react";
2
2
  import type { KapiCloseReason } from "../closeReason.js";
3
3
  import { type KapiFamilyTone, type KapiTone } from "../tone.js";
4
4
  import type { KapiLabelsOverride } from "../labelsLogic.js";
5
+ import type { KapiClassNames } from "../slotCatalog.js";
6
+ /** Partes de `KapiAlert` que acepta `classNames` (`root`, `icon`, `body`, `title`, `message`, `close`). */
7
+ export type KapiAlertClassNames = KapiClassNames<"alert">;
5
8
  export type KapiAlertLabels = {
6
9
  /** Nombre accesible del botón de cierre (con `onClose`). */
7
10
  close: string;
@@ -15,6 +18,8 @@ export type KapiAlertVariant = KapiAlertTone;
15
18
  export type KapiAlertProps = Omit<HTMLAttributes<HTMLDivElement>, "title" | "role" | "children"> & {
16
19
  /** Ref al `<div>` raíz del aviso. */
17
20
  ref?: Ref<HTMLDivElement> | undefined;
21
+ /** Clases por parte (`root`, `icon`, `body`, `title`, `message`, `close`). Se suman a las propias. */
22
+ classNames?: KapiAlertClassNames | undefined;
18
23
  /**
19
24
  * Rol semántico: define color, ícono y si se anuncia como `alert` o `status`. Una familia propia
20
25
  * de la app (`toneFamilies`) pinta el color y usa el ícono y el anuncio de `info`.
@@ -53,4 +58,4 @@ export declare const alertRole: (tone: KapiAlertTone, override?: KapiAlertRole)
53
58
  * Banner inline (info / success / warning / danger) para formularios, modales y pantallas.
54
59
  * `danger` se anuncia como `role="alert"`; el resto como `role="status"` (ver `role`).
55
60
  */
56
- export declare const KapiAlert: ({ tone: toneProp, variant, title, children, action, icon, onClose, labels, className, role, style, ...rest }: KapiAlertProps) => import("react").JSX.Element;
61
+ export declare const KapiAlert: ({ tone: toneProp, variant, title, children, action, icon, onClose, labels, className, classNames, role, style, ...rest }: KapiAlertProps) => import("react").JSX.Element;