@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,95 +1,104 @@
1
1
  "use client";
2
2
  import "#kapi-css/components/feedback/feedback.css";
3
+ import { useToneLook as e } from "../../hooks/useToneFamilies.js";
3
4
  /* empty css */
4
- import { circleDash as e, clampPercent as t, formatPercent as n, progressClasses as r } from "./progressLogic.js";
5
- import { jsx as i, jsxs as a } from "react/jsx-runtime";
5
+ import { circleDash as t, clampPercent as n, formatPercent as r, progressClasses as i } from "./progressLogic.js";
6
+ import { jsx as a, jsxs as o } from "react/jsx-runtime";
6
7
  //#region src/components/feedback/KapiProgress.tsx
7
- var o = {
8
+ var s = {
8
9
  sm: 36,
9
10
  md: 56,
10
11
  lg: 84
11
- }, s = {
12
+ }, c = {
12
13
  sm: 4,
13
14
  md: 6,
14
15
  lg: 8
15
16
  };
16
- function c({ value: c, variant: l = "bar", tone: u = "primary", size: d = "md", label: f, showValue: p = !1, "aria-label": m, className: h, ...g }) {
17
- let _ = t(c), v = r({
18
- tone: u,
19
- size: d,
20
- variant: l,
21
- className: h
22
- }), y = {
17
+ function l({ value: l, variant: u = "bar", tone: d = "primary", size: f = "md", label: p, showValue: m = !1, "aria-label": h, className: g, ..._ }) {
18
+ let v = e("KapiProgress", d), y = n(l), b = i({
19
+ tone: v.tone,
20
+ size: f,
21
+ variant: u,
22
+ className: g
23
+ }), x = {
23
24
  role: "progressbar",
24
25
  "aria-valuemin": 0,
25
26
  "aria-valuemax": 100,
26
- "aria-valuenow": Math.round(_),
27
- "aria-label": typeof f == "string" ? f : m
27
+ "aria-valuenow": Math.round(y),
28
+ "aria-label": typeof p == "string" ? p : h
28
29
  };
29
- if (l === "circle") {
30
- let t = o[d], r = s[d], c = (t - r) / 2, { circumference: l, offset: u } = e(_, c);
31
- return /* @__PURE__ */ a("div", {
32
- ...g,
33
- className: v,
34
- children: [/* @__PURE__ */ a("div", {
30
+ if (u === "circle") {
31
+ let e = s[f], n = c[f], i = (e - n) / 2, { circumference: l, offset: u } = t(y, i);
32
+ return /* @__PURE__ */ o("div", {
33
+ ..._,
34
+ className: b,
35
+ style: {
36
+ ...v.style,
37
+ ..._.style
38
+ },
39
+ children: [/* @__PURE__ */ o("div", {
35
40
  className: "kapi-progress__ring",
36
41
  style: {
37
- width: t,
38
- height: t
42
+ width: e,
43
+ height: e
39
44
  },
40
- ...y,
41
- children: [/* @__PURE__ */ a("svg", {
42
- width: t,
43
- height: t,
44
- viewBox: `0 0 ${t} ${t}`,
45
+ ...x,
46
+ children: [/* @__PURE__ */ o("svg", {
47
+ width: e,
48
+ height: e,
49
+ viewBox: `0 0 ${e} ${e}`,
45
50
  "aria-hidden": !0,
46
- children: [/* @__PURE__ */ i("circle", {
51
+ children: [/* @__PURE__ */ a("circle", {
47
52
  className: "kapi-progress__track",
48
- cx: t / 2,
49
- cy: t / 2,
50
- r: c,
51
- strokeWidth: r
52
- }), /* @__PURE__ */ i("circle", {
53
+ cx: e / 2,
54
+ cy: e / 2,
55
+ r: i,
56
+ strokeWidth: n
57
+ }), /* @__PURE__ */ a("circle", {
53
58
  className: "kapi-progress__arc",
54
- cx: t / 2,
55
- cy: t / 2,
56
- r: c,
57
- strokeWidth: r,
59
+ cx: e / 2,
60
+ cy: e / 2,
61
+ r: i,
62
+ strokeWidth: n,
58
63
  strokeDasharray: l,
59
64
  strokeDashoffset: u,
60
- transform: `rotate(-90 ${t / 2} ${t / 2})`
65
+ transform: `rotate(-90 ${e / 2} ${e / 2})`
61
66
  })]
62
- }), p && /* @__PURE__ */ i("span", {
67
+ }), m && /* @__PURE__ */ a("span", {
63
68
  className: "kapi-progress__center",
64
- children: n(_)
69
+ children: r(y)
65
70
  })]
66
- }), f && /* @__PURE__ */ i("span", {
71
+ }), p && /* @__PURE__ */ a("span", {
67
72
  className: "kapi-progress__label",
68
- children: f
73
+ children: p
69
74
  })]
70
75
  });
71
76
  }
72
- return /* @__PURE__ */ a("div", {
73
- ...g,
74
- className: v,
75
- children: [(f || p) && /* @__PURE__ */ a("div", {
77
+ return /* @__PURE__ */ o("div", {
78
+ ..._,
79
+ className: b,
80
+ style: {
81
+ ...v.style,
82
+ ..._.style
83
+ },
84
+ children: [(p || m) && /* @__PURE__ */ o("div", {
76
85
  className: "kapi-progress__head",
77
- children: [f && /* @__PURE__ */ i("span", {
86
+ children: [p && /* @__PURE__ */ a("span", {
78
87
  className: "kapi-progress__label",
79
- children: f
80
- }), p && /* @__PURE__ */ i("span", {
88
+ children: p
89
+ }), m && /* @__PURE__ */ a("span", {
81
90
  className: "kapi-progress__value",
82
- children: n(_)
91
+ children: r(y)
83
92
  })]
84
- }), /* @__PURE__ */ i("div", {
93
+ }), /* @__PURE__ */ a("div", {
85
94
  className: "kapi-progress__bar",
86
- ...y,
87
- children: /* @__PURE__ */ i("div", {
95
+ ...x,
96
+ children: /* @__PURE__ */ a("div", {
88
97
  className: "kapi-progress__fill",
89
- style: { width: `${_}%` }
98
+ style: { width: `${y}%` }
90
99
  })
91
100
  })]
92
101
  });
93
102
  }
94
103
  //#endregion
95
- export { c as KapiProgress };
104
+ export { l as KapiProgress };
@@ -1,10 +1,10 @@
1
1
  "use client";
2
2
  import "#kapi-css/components/feedback/feedback.css";
3
3
  import { joinClasses as e } from "../rootProps.js";
4
- import { useLabels as t } from "../locale/KapiLocaleProvider.js";
5
- import { activeElementOf as n, docOf as r } from "../../hooks/ownerDocument.js";
6
- import { usePortalRootOverride as i } from "../../hooks/portalRoot.js";
7
- 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 { activeElementOf as r, docOf as i } from "../../hooks/ownerDocument.js";
7
+ import { usePortalRootOverride as a } from "../../hooks/portalRoot.js";
8
8
  import { modalStack as o } from "../overlays/modalStack.js";
9
9
  import { getPortalRoot as s } from "../overlays/useNativeDialog.js";
10
10
  /* empty css */
@@ -33,9 +33,9 @@ var w = { close: "Cerrar" }, T = {
33
33
  color: "var(--kapi-warning)"
34
34
  }
35
35
  }, E = (e) => e ? u.pause() : u.resume(), D = () => typeof HTMLElement < "u" && typeof HTMLElement.prototype.showPopover == "function", O = ({ closeLabel: y, labels: b, className: x, style: S, id: O, ref: k }) => {
36
- let A = t("toast", w, b), j = y ?? A.close, M = h(u.subscribe, u.getSnapshot, u.getSnapshot), N = p(null), P = a(N, k), F = i(), [I, L] = m(null);
36
+ let A = n("toast", w, b), j = y ?? A.close, M = h(u.subscribe, u.getSnapshot, u.getSnapshot), N = p(null), P = t(N, k), F = a(), [I, L] = m(null);
37
37
  d(() => {
38
- let e = r(F);
38
+ let e = i(F);
39
39
  if (!e) return;
40
40
  let t = e.createElement("div");
41
41
  t.className = "kapi-toasts-host", t.style.display = "contents";
@@ -44,9 +44,9 @@ var w = { close: "Cerrar" }, T = {
44
44
  n && (c(t, n), N.current && l(N.current));
45
45
  };
46
46
  n(), L(t);
47
- let i = o.subscribe(n);
47
+ let r = o.subscribe(n);
48
48
  return () => {
49
- i(), t.remove();
49
+ r(), t.remove();
50
50
  };
51
51
  }, [F]);
52
52
  let R = M.length ? Math.max(...M.map((e) => e.id)) : 0;
@@ -56,7 +56,7 @@ var w = { close: "Cerrar" }, T = {
56
56
  let z = p(!1), B = p(!1), V = () => E(z.current || B.current);
57
57
  if (d(() => {
58
58
  let e = N.current;
59
- B.current && !(e && e.contains(n(e))) && (B.current = !1), M.length || (z.current = !1), E(z.current || B.current);
59
+ B.current && !(e && e.contains(r(e))) && (B.current = !1), M.length || (z.current = !1), E(z.current || B.current);
60
60
  }, [M]), d(() => () => u.resume(), []), !I) return null;
61
61
  let H = (e) => {
62
62
  let { Icon: t, color: n } = T[e.tone];
@@ -1,13 +1,13 @@
1
1
  "use client";
2
2
  import "#kapi-css/components/feedback/feedback.css";
3
3
  import { joinClasses as e } from "../rootProps.js";
4
- import { useLabels as t } from "../locale/KapiLocaleProvider.js";
5
- import { activeHTMLElementOf as n, rootNodeOf as r, winOf as i } from "../../hooks/ownerDocument.js";
6
- import { usePortalRootOverride as a } from "../../hooks/portalRoot.js";
7
- import { useKapiRoot as o } from "../../hooks/kapiRoot.js";
8
- import { onViewportChange as s } from "../../hooks/rafThrottle.js";
9
- import { usePlacement as c } from "../../hooks/usePlacement.js";
10
- import { useMergedRefs as l } from "../../hooks/mergeRefs.js";
4
+ import { useMergedRefs as t } from "../../hooks/mergeRefs.js";
5
+ import { useLabels as n } from "../locale/KapiLocaleProvider.js";
6
+ import { activeHTMLElementOf as r, rootNodeOf as i, winOf as a } from "../../hooks/ownerDocument.js";
7
+ import { usePortalRootOverride as o } from "../../hooks/portalRoot.js";
8
+ import { useKapiRoot as s } from "../../hooks/kapiRoot.js";
9
+ import { onViewportChange as c } from "../../hooks/rafThrottle.js";
10
+ import { usePlacement as l } from "../../hooks/usePlacement.js";
11
11
  import { useDismiss as u } from "../../hooks/useDismiss.js";
12
12
  import { trapTabKey as d } from "../../hooks/focusLogic.js";
13
13
  /* empty css */
@@ -23,7 +23,7 @@ var T = {
23
23
  close: "Cerrar",
24
24
  of: "de"
25
25
  }, E = ({ steps: E, open: D, onClose: O, markSeen: k, labels: A, className: ee, style: te, id: j, ref: M }) => {
26
- let N = t("tour", T, A), P = a(), F = o(), I = P ?? F, L = (e) => (r(I) ?? document).querySelector(e), [R, z] = x([]), [B, V] = x(0), [H, U] = x(null), W = b(null), G = l(W, M), K = v(), q = g((e) => {
26
+ let N = n("tour", T, A), P = o(), F = s(), I = P ?? F, L = (e) => (i(I) ?? document).querySelector(e), [R, z] = x([]), [B, V] = x(0), [H, U] = x(null), W = b(null), G = t(W, M), K = v(), q = g((e) => {
27
27
  k && h(typeof k == "string" ? k : void 0), O(e);
28
28
  }, [k, O]), J = E.map((e) => e.element).join("|"), Y = b(E);
29
29
  Y.current = E, _(() => {
@@ -37,7 +37,7 @@ var T = {
37
37
  let X = D ? R[B] : void 0;
38
38
  y(() => {
39
39
  if (!D) return;
40
- let e = n(P);
40
+ let e = r(P);
41
41
  return () => {
42
42
  e?.isConnected && e.focus();
43
43
  };
@@ -56,10 +56,10 @@ var T = {
56
56
  });
57
57
  let t = () => U(m(e.getBoundingClientRect()));
58
58
  t();
59
- let n = i(e);
60
- return s(t, n ? { target: n } : {});
59
+ let n = a(e);
60
+ return c(t, n ? { target: n } : {});
61
61
  }, [X]);
62
- let { style: Z, update: Q } = c({
62
+ let { style: Z, update: Q } = l({
63
63
  open: !!X && !!I,
64
64
  anchor: () => {
65
65
  let e = X ? L(X.element) : null;
@@ -1,3 +1,4 @@
1
+ import { type KapiFamilyTone } from "../tone.js";
1
2
  export type KapiProgressTone = "primary" | "success" | "warning" | "danger";
2
3
  /** Lleva `value` al rango 0–100. NaN/undefined/Infinity-negativo -> 0; +Infinity -> 100. */
3
4
  export declare const clampPercent: (value: number) => number;
@@ -10,7 +11,7 @@ export declare const circleDash: (value: number, radius: number) => {
10
11
  };
11
12
  /** Clases del contenedor de progreso. */
12
13
  export declare const progressClasses: ({ tone, size, variant, className }?: {
13
- tone?: KapiProgressTone | undefined;
14
+ tone?: KapiProgressTone | KapiFamilyTone | undefined;
14
15
  size?: "sm" | "md" | "lg" | undefined;
15
16
  variant?: "bar" | "circle" | undefined;
16
17
  className?: string | undefined;
@@ -1,16 +1,17 @@
1
+ import { isFamilyTone as e } from "../tone.js";
1
2
  //#region src/components/feedback/progressLogic.ts
2
- var e = (e) => Number.isNaN(e) ? 0 : Math.min(100, Math.max(0, e)), t = (t) => `${Math.round(e(t))}%`, n = (t, n) => {
3
+ var t = (e) => Number.isNaN(e) ? 0 : Math.min(100, Math.max(0, e)), n = (e) => `${Math.round(t(e))}%`, r = (e, n) => {
3
4
  let r = 2 * Math.PI * n;
4
5
  return {
5
6
  circumference: r,
6
- offset: r * (1 - e(t) / 100)
7
+ offset: r * (1 - t(e) / 100)
7
8
  };
8
- }, r = ({ tone: e = "primary", size: t = "md", variant: n = "bar", className: r = "" } = {}) => [
9
+ }, i = ({ tone: t = "primary", size: n = "md", variant: r = "bar", className: i = "" } = {}) => [
9
10
  "kapi-progress",
10
- n === "circle" && "kapi-progress--circle",
11
- `kapi-progress--${e}`,
12
- t !== "md" && `kapi-progress--${t}`,
13
- r
11
+ r === "circle" && "kapi-progress--circle",
12
+ e(t) ? "kapi-progress--family" : `kapi-progress--${t}`,
13
+ n !== "md" && `kapi-progress--${n}`,
14
+ i
14
15
  ].filter(Boolean).join(" ");
15
16
  //#endregion
16
- export { n as circleDash, e as clampPercent, t as formatPercent, r as progressClasses };
17
+ export { r as circleDash, t as clampPercent, n as formatPercent, i as progressClasses };
@@ -64,6 +64,12 @@ type KapiAutocompleteBaseProps<T> = {
64
64
  required?: boolean | undefined;
65
65
  /** Texto de ayuda o error bajo el campo. */
66
66
  help?: ReactNode;
67
+ /**
68
+ * El motivo por el que el campo está mal. Reemplaza a `help` y lo marca inválido (rojo, ícono y
69
+ * `role="alert"`). Es lo que entregan las librerías de formularios: un mensaje, no un booleano.
70
+ * Un error que React no pinta (`true`, `""`, `null`) no marca nada. Gana sobre `invalid` y `status`.
71
+ */
72
+ error?: ReactNode | undefined;
67
73
  /** Clase del `KapiField` propio (con `label` o `help`). `className` va al input. */
68
74
  fieldClassName?: string | undefined;
69
75
  /** Clase del `<input>` (la del envoltorio va en `fieldClassName`). */
@@ -1,11 +1,11 @@
1
1
  "use client";
2
2
  import "#kapi-css/components/inputs/KapiAutocomplete.css";
3
- import { assignRef as e, fieldControlProps as t, joinIds as n, resolveReadOnly as r, resolveValidation as ee } from "./fieldLogic.js";
4
- import { useOwnField as te } from "./ownField.js";
5
- import { useLabels as ne } from "../locale/KapiLocaleProvider.js";
3
+ import { useLabels as e } from "../locale/KapiLocaleProvider.js";
4
+ import { assignRef as t, fieldControlProps as n, joinIds as r, resolveFieldMessage as ee, resolveReadOnly as te } from "./fieldLogic.js";
5
+ import { useOwnField as ne } from "./ownField.js";
6
6
  import { inputClasses as re } from "./KapiInput.js";
7
- import { enabledIndexes as ie, nextEnabledIndex as ae } from "../overlays/menuKeyboardLogic.js";
8
- import { useControllableState as oe } from "../../hooks/useControllableState.js";
7
+ import { useControllableState as ie } from "../../hooks/useControllableState.js";
8
+ import { enabledIndexes as ae, nextEnabledIndex as oe } from "../overlays/menuKeyboardLogic.js";
9
9
  import { resolveKapiRoot as se } from "../../hooks/kapiRoot.js";
10
10
  import { AUTOCOMPLETE_MENU_PLACEMENT as ce, clampActiveIndex as le, defaultGetLabel as ue, filterOptions as de, highlightParts as fe, shouldOpen as pe } from "./autocompleteLogic.js";
11
11
  import { usePlacement as me } from "../../hooks/usePlacement.js";
@@ -23,165 +23,166 @@ var l = {
23
23
  data: [],
24
24
  error: !1
25
25
  }, d = (d) => {
26
- let { value: xe, defaultValue: Se, onChange: Ce, onSelect: f, getLabel: p, getKey: m, renderOption: h, fillOnSelect: g = !0, minChars: we = 0, maxResults: _ = 8, loadDelay: Te, debounceMs: Ee, emptyMessage: De, loadingMessage: Oe, noResultsText: ke, loadingText: Ae, labels: je, size: Me, invalid: v, status: y, label: Ne, required: b, help: Pe, fieldClassName: Fe, className: Ie, readOnly: x, ref: S, options: C, loadOptions: w, id: Le, onFocus: T, onBlur: Re, onKeyDown: ze, ...E } = d, D = ne("autocomplete", l, je), Be = De ?? ke ?? D.noResults, Ve = Oe ?? Ae ?? D.loading, He = Te ?? Ee ?? 250, [O, k] = oe(xe, Se ?? "", Ce), { invalid: Ue, status: We } = ee(v, y), A = te({
27
- id: Le,
26
+ let { value: xe, defaultValue: Se, onChange: Ce, onSelect: f, getLabel: p, getKey: m, renderOption: h, fillOnSelect: g = !0, minChars: we = 0, maxResults: _ = 8, loadDelay: Te, debounceMs: Ee, emptyMessage: De, loadingMessage: Oe, noResultsText: ke, loadingText: Ae, labels: je, size: Me, invalid: v, status: y, label: Ne, required: b, help: x, error: S, fieldClassName: Pe, className: Fe, readOnly: C, ref: w, options: T, loadOptions: E, id: Ie, onFocus: Le, onBlur: Re, onKeyDown: ze, ...D } = d, O = e("autocomplete", l, je), Be = De ?? ke ?? O.noResults, Ve = Oe ?? Ae ?? O.loading, He = Te ?? Ee ?? 250, [k, A] = ie(xe, Se ?? "", Ce), { invalid: Ue, status: We } = ee(S, x, v, y), j = ne({
27
+ id: Ie,
28
28
  label: Ne,
29
- help: Pe,
29
+ help: x,
30
+ error: S,
30
31
  required: b,
31
32
  invalid: v,
32
33
  status: y,
33
- readOnly: x,
34
- fieldClassName: Fe
35
- }), j = r(x, A.field), M = A.controlId ?? A.autoId, N = `${M}-listbox`, { helpId: Ge } = A, P = (e) => `${M}-opt-${e}`, F = p ?? ue, Ke = i((t) => {
36
- e(S, t);
37
- }, [S]), [qe, I] = o(!1), [Je, L] = o(!1), [Ye, R] = o(-1), z = a(null), B = a(null), V = a(null), H = w !== void 0, U = !j && pe({
34
+ readOnly: C,
35
+ fieldClassName: Pe
36
+ }), M = te(C, j.field), N = j.controlId ?? j.autoId, P = `${N}-listbox`, { helpId: Ge } = j, F = (e) => `${N}-opt-${e}`, I = p ?? ue, Ke = i((e) => {
37
+ t(w, e);
38
+ }, [w]), [qe, L] = o(!1), [Je, R] = o(!1), [Ye, z] = o(-1), B = a(null), V = a(null), H = a(null), U = E !== void 0, W = !M && pe({
38
39
  focused: qe,
39
40
  dismissed: Je,
40
- query: O,
41
+ query: k,
41
42
  minChars: we
42
- }), W = O.trim(), G = he({
43
- query: W,
44
- enabled: H && U,
45
- load: w,
43
+ }), G = k.trim(), K = he({
44
+ query: G,
45
+ enabled: U && W,
46
+ load: E,
46
47
  delay: He,
47
48
  revalidate: !0,
48
49
  initial: u
49
- }).last ?? u, K = H && U && G.key !== W, Xe = ve(() => H ? (G.data ?? []).slice(0, _ > 0 ? _ : void 0) : de(C ?? [], O, F, _), [
50
- H,
51
- G.data,
52
- C,
53
- O,
50
+ }).last ?? u, q = U && W && K.key !== G, Xe = ve(() => U ? (K.data ?? []).slice(0, _ > 0 ? _ : void 0) : de(T ?? [], k, I, _), [
51
+ U,
52
+ K.data,
53
+ T,
54
+ k,
54
55
  _
55
- ]), q = K ? [] : Xe, J = le(Ye, q.length);
56
+ ]), J = q ? [] : Xe, Y = le(Ye, J.length);
56
57
  ge(() => {
57
- if (!U || J < 0) return;
58
- let e = z.current?.children[J];
58
+ if (!W || Y < 0) return;
59
+ let e = B.current?.children[Y];
59
60
  e instanceof HTMLElement && typeof e.scrollIntoView == "function" && e.scrollIntoView({ block: "nearest" });
60
- }, [U, J]);
61
- let Y = U && !K && q.length === 0, X = U && (K || q.length > 0 || Y), { placement: Ze, style: Qe, update: Z } = me({
62
- open: X,
63
- anchor: B,
64
- floatingRef: V,
61
+ }, [W, Y]);
62
+ let X = W && !q && J.length === 0, Z = W && (q || J.length > 0 || X), { placement: Ze, style: Qe, update: Q } = me({
63
+ open: Z,
64
+ anchor: V,
65
+ floatingRef: H,
65
66
  ...ce,
66
67
  offset: be
67
68
  });
68
69
  _e(() => {
69
- X && Z();
70
+ Z && Q();
70
71
  }, [
71
- X,
72
- q.length,
73
- K,
74
- Z
72
+ Z,
73
+ J.length,
74
+ q,
75
+ Q
75
76
  ]);
76
- let Q = i((e) => {
77
- g && k(F(e)), f?.(e), L(!0), R(-1);
77
+ let $e = i((e) => {
78
+ g && A(I(e)), f?.(e), R(!0), z(-1);
78
79
  }, [
79
80
  g,
80
- k,
81
+ A,
81
82
  f,
82
83
  p
83
- ]), $e = (e) => {
84
- k(e.target.value), L(!1), R(-1);
85
- }, et = (e) => {
84
+ ]), et = (e) => {
85
+ A(e.target.value), R(!1), z(-1);
86
+ }, tt = (e) => {
86
87
  if (ze?.(e), !e.defaultPrevented) switch (e.key) {
87
88
  case "ArrowDown":
88
89
  case "ArrowUp":
89
- if (e.preventDefault(), !U) {
90
- L(!1);
90
+ if (e.preventDefault(), !W) {
91
+ R(!1);
91
92
  return;
92
93
  }
93
- R(ae(J, e.key === "ArrowDown" ? "next" : "prev", ie(q.length)));
94
+ z(oe(Y, e.key === "ArrowDown" ? "next" : "prev", ae(J.length)));
94
95
  break;
95
96
  case "Enter":
96
- if (U && J >= 0) {
97
+ if (W && Y >= 0) {
97
98
  e.preventDefault();
98
- let t = q[J];
99
- t !== void 0 && Q(t);
99
+ let t = J[Y];
100
+ t !== void 0 && $e(t);
100
101
  }
101
102
  break;
102
- case "Escape": U && (e.preventDefault(), e.stopPropagation(), L(!0), R(-1));
103
+ case "Escape": W && (e.preventDefault(), e.stopPropagation(), R(!0), z(-1));
103
104
  }
104
- }, tt = (e) => {
105
- I(!0), L(!1), T?.(e);
106
105
  }, nt = (e) => {
107
- I(!1), R(-1), Re?.(e);
108
- }, $ = X ? se(B.current) : null, rt = /* @__PURE__ */ c("div", {
109
- ref: B,
110
- className: ["kapi-ac", K && "kapi-ac--loading"].filter(Boolean).join(" "),
106
+ L(!0), R(!1), Le?.(e);
107
+ }, rt = (e) => {
108
+ L(!1), z(-1), Re?.(e);
109
+ }, $ = Z ? se(V.current) : null, it = /* @__PURE__ */ c("div", {
110
+ ref: V,
111
+ className: ["kapi-ac", q && "kapi-ac--loading"].filter(Boolean).join(" "),
111
112
  children: [
112
113
  /* @__PURE__ */ s("input", {
113
- ...E,
114
+ ...D,
114
115
  ref: Ke,
115
116
  type: "text",
116
117
  role: "combobox",
117
118
  autoComplete: "off",
118
119
  "aria-autocomplete": "list",
119
- "aria-expanded": X,
120
- "aria-controls": N,
121
- "aria-activedescendant": X && J >= 0 ? P(J) : void 0,
122
- ...t(A.outer, {
123
- id: M,
124
- describedBy: n(Ge, E["aria-describedby"]),
125
- busy: K || void 0,
120
+ "aria-expanded": Z,
121
+ "aria-controls": P,
122
+ "aria-activedescendant": Z && Y >= 0 ? F(Y) : void 0,
123
+ ...n(j.outer, {
124
+ id: N,
125
+ describedBy: r(Ge, D["aria-describedby"]),
126
+ busy: q || void 0,
126
127
  invalid: Ue
127
128
  }),
128
129
  required: b,
129
- readOnly: j || void 0,
130
+ readOnly: M || void 0,
130
131
  className: re({
131
132
  size: Me,
132
133
  status: We,
133
- className: Ie
134
+ className: Fe
134
135
  }),
135
- value: O,
136
- onChange: $e,
137
- onKeyDown: et,
138
- onFocus: tt,
139
- onBlur: nt
136
+ value: k,
137
+ onChange: et,
138
+ onKeyDown: tt,
139
+ onFocus: nt,
140
+ onBlur: rt
140
141
  }),
141
- K && /* @__PURE__ */ s("span", {
142
+ q && /* @__PURE__ */ s("span", {
142
143
  className: "kapi-ac__spinner kapi-spinner kapi-spinner--sm",
143
144
  "aria-hidden": "true"
144
145
  }),
145
146
  $ && ye(/* @__PURE__ */ c("div", {
146
- ref: V,
147
+ ref: H,
147
148
  className: "kapi-ac__menu",
148
149
  "data-side": Ze?.side ?? "bottom",
149
150
  style: Qe,
150
151
  onMouseDown: (e) => e.preventDefault(),
151
152
  children: [/* @__PURE__ */ s("ul", {
152
- ref: z,
153
- id: N,
153
+ ref: B,
154
+ id: P,
154
155
  role: "listbox",
155
156
  className: "kapi-ac__list",
156
- hidden: q.length === 0,
157
- children: q.map((e, t) => {
158
- let n = F(e), r = t === J;
157
+ hidden: J.length === 0,
158
+ children: J.map((e, t) => {
159
+ let n = I(e), r = t === Y;
159
160
  return /* @__PURE__ */ s("li", {
160
- id: P(t),
161
+ id: F(t),
161
162
  role: "option",
162
163
  "aria-selected": r,
163
164
  className: ["kapi-ac__opt", r && "kapi-ac__opt--active"].filter(Boolean).join(" "),
164
- onMouseEnter: () => R(t),
165
- onClick: () => Q(e),
165
+ onMouseEnter: () => z(t),
166
+ onClick: () => $e(e),
166
167
  children: h ? h(e, {
167
- query: O,
168
+ query: k,
168
169
  active: r
169
- }) : fe(n, O).map((e, t) => e.match ? /* @__PURE__ */ s("mark", {
170
+ }) : fe(n, k).map((e, t) => e.match ? /* @__PURE__ */ s("mark", {
170
171
  className: "kapi-ac__mark",
171
172
  children: e.text
172
173
  }, t) : /* @__PURE__ */ s("span", { children: e.text }, t))
173
174
  }, m ? m(e) : `${n}-${t}`);
174
175
  })
175
- }), (K || Y) && /* @__PURE__ */ s("div", {
176
+ }), (q || X) && /* @__PURE__ */ s("div", {
176
177
  className: "kapi-ac__status",
177
178
  role: "status",
178
179
  "aria-live": "polite",
179
- children: K ? Ve : Be
180
+ children: q ? Ve : Be
180
181
  })]
181
182
  }), $)
182
183
  ]
183
184
  });
184
- return A.wrap(rt);
185
+ return j.wrap(it);
185
186
  };
186
187
  //#endregion
187
188
  export { l as DEFAULT_AUTOCOMPLETE_LABELS, d as KapiAutocomplete };
@@ -1,9 +1,12 @@
1
1
  import type { ButtonHTMLAttributes, ReactNode, Ref } from "react";
2
2
  import { type KapiRender } from "../renderSlot.js";
3
- import { type KapiButtonAppearance, type KapiLegacyButtonVariant, type KapiTone } from "../tone.js";
3
+ import { type KapiButtonAppearance, type KapiLegacyButtonVariant, type KapiToneName } from "../tone.js";
4
4
  export type { KapiButtonAppearance } from "../tone.js";
5
- /** Color de un botón: cualquier `KapiTone` (`neutral` es el botón por defecto, borde + card). */
6
- export type KapiButtonTone = KapiTone;
5
+ /**
6
+ * Color de un botón: cualquier `KapiTone` o una familia propia de la app (`neutral` es el botón por
7
+ * defecto, borde + card).
8
+ */
9
+ export type KapiButtonTone = KapiToneName;
7
10
  /**
8
11
  * @deprecated Valores combinados de color y forma (`primary`, `outline-danger`, `tonal-success`…):
9
12
  * usar `tone` (`KapiButtonTone`) + `variant` (`KapiButtonAppearance`). Siguen andando hasta 1.0.
@@ -62,4 +65,4 @@ export type KapiButtonProps = Omit<ButtonHTMLAttributes<HTMLButtonElement>, "chi
62
65
  /** Clases de un botón. Pura y exportada: es lo que se testea (no el markup). */
63
66
  export declare const buttonClasses: ({ tone, variant, size, iconOnly, bordered, loading, className }?: Pick<KapiButtonProps, "tone" | "variant" | "size" | "iconOnly" | "bordered" | "loading" | "className">) => string;
64
67
  /** Botón base: color (`tone`), forma (`variant`), tamaños, sólo ícono y borde. Acepta los atributos nativos de `<button>`. */
65
- export declare const KapiButton: ({ tone, variant, size, iconOnly, bordered, icon, loading, disabled, className, type, children, ref, render, ...rest }: KapiButtonProps) => import("react").JSX.Element;
68
+ export declare const KapiButton: ({ tone, variant, size, iconOnly, bordered, icon, loading, disabled, className, style, type, children, ref, render, ...rest }: KapiButtonProps) => import("react").JSX.Element;