@kapiuara/ui 0.14.0 → 0.15.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 (116) hide show
  1. package/README.md +234 -1
  2. package/dist/components/chat/KapiChatList.js +19 -19
  3. package/dist/components/chat/KapiChatThread.js +23 -23
  4. package/dist/components/chat/KapiComposer.js +19 -19
  5. package/dist/components/chat/KapiMessageBubble.js +4 -4
  6. package/dist/components/chat/KapiTypingIndicator.js +4 -4
  7. package/dist/components/closeReason.d.ts +34 -0
  8. package/dist/components/data/KapiBarChart.js +1 -1
  9. package/dist/components/data/KapiDataTable.js +31 -31
  10. package/dist/components/data/KapiEventCalendar.js +78 -78
  11. package/dist/components/data/KapiHeatmap.js +23 -23
  12. package/dist/components/data/KapiLineChart.js +1 -1
  13. package/dist/components/data/KapiPagination.js +4 -4
  14. package/dist/components/data/KapiSparkline.js +1 -1
  15. package/dist/components/data/KapiTable.js +122 -122
  16. package/dist/components/data/KapiTableFilter.js +18 -18
  17. package/dist/components/data/KapiTableRow.js +24 -24
  18. package/dist/components/data/KapiTableToolbar.js +49 -49
  19. package/dist/components/data/chartFrame.js +21 -21
  20. package/dist/components/data/useColumnResize.js +8 -8
  21. package/dist/components/data/useTableSelection.js +8 -8
  22. package/dist/components/display/KapiAnnotation.js +53 -53
  23. package/dist/components/display/KapiComment.js +4 -4
  24. package/dist/components/display/KapiCommentComposer.js +16 -16
  25. package/dist/components/display/KapiFileItem.js +6 -6
  26. package/dist/components/display/KapiFileViewer.js +9 -9
  27. package/dist/components/display/KapiTruncate.js +7 -7
  28. package/dist/components/feedback/KapiAlert.d.ts +2 -1
  29. package/dist/components/feedback/KapiAlert.js +8 -8
  30. package/dist/components/feedback/KapiCountdown.js +8 -8
  31. package/dist/components/feedback/KapiFab.js +31 -31
  32. package/dist/components/feedback/KapiOfflineBanner.js +8 -8
  33. package/dist/components/feedback/KapiToastContainer.js +21 -21
  34. package/dist/components/feedback/KapiTour.d.ts +2 -1
  35. package/dist/components/feedback/KapiTour.js +32 -32
  36. package/dist/components/inputs/KapiAutocomplete.js +14 -14
  37. package/dist/components/inputs/KapiButton.d.ts +17 -1
  38. package/dist/components/inputs/KapiButton.js +41 -25
  39. package/dist/components/inputs/KapiCalendar.js +5 -5
  40. package/dist/components/inputs/KapiCalendarGrid.js +10 -10
  41. package/dist/components/inputs/KapiChecklist.js +71 -71
  42. package/dist/components/inputs/KapiDatePicker.js +28 -28
  43. package/dist/components/inputs/KapiDateRangePicker.js +27 -27
  44. package/dist/components/inputs/KapiFacetedSearch.js +24 -24
  45. package/dist/components/inputs/KapiField.js +14 -14
  46. package/dist/components/inputs/KapiFileUpload.js +27 -27
  47. package/dist/components/inputs/KapiIconButton.d.ts +9 -1
  48. package/dist/components/inputs/KapiIconButton.js +27 -10
  49. package/dist/components/inputs/KapiInput.js +21 -21
  50. package/dist/components/inputs/KapiInputGroup.js +8 -8
  51. package/dist/components/inputs/KapiMaskedInput.js +22 -22
  52. package/dist/components/inputs/KapiNumberStepper.js +12 -12
  53. package/dist/components/inputs/KapiRating.js +1 -1
  54. package/dist/components/inputs/KapiSearchChip.js +8 -8
  55. package/dist/components/inputs/KapiSegmented.js +27 -27
  56. package/dist/components/inputs/KapiSelect.js +166 -166
  57. package/dist/components/inputs/KapiSelectMenu.js +60 -60
  58. package/dist/components/inputs/KapiSlider.js +1 -1
  59. package/dist/components/inputs/KapiSwitch.js +6 -6
  60. package/dist/components/inputs/KapiTagInput.js +22 -22
  61. package/dist/components/inputs/KapiTextarea.js +8 -8
  62. package/dist/components/inputs/ownField.js +4 -4
  63. package/dist/components/layout/KapiAccountMenu.d.ts +2 -1
  64. package/dist/components/layout/KapiAccountMenu.js +51 -51
  65. package/dist/components/layout/KapiContextSlot.js +35 -35
  66. package/dist/components/layout/KapiMasonry.js +6 -6
  67. package/dist/components/layout/KapiNotificationBell.js +60 -60
  68. package/dist/components/layout/KapiPageHeader.js +19 -19
  69. package/dist/components/layout/KapiRail.js +60 -60
  70. package/dist/components/layout/KapiRailAccount.js +9 -9
  71. package/dist/components/layout/KapiRoot.js +21 -21
  72. package/dist/components/layout/KapiScrollArea.js +11 -11
  73. package/dist/components/layout/KapiShell.js +12 -12
  74. package/dist/components/locale/KapiLocaleProvider.js +13 -13
  75. package/dist/components/navigation/KapiAccordion.js +12 -12
  76. package/dist/components/navigation/KapiBreadcrumb.js +11 -11
  77. package/dist/components/navigation/KapiCollapsiblePanel.js +23 -23
  78. package/dist/components/navigation/KapiContextPanel.js +76 -76
  79. package/dist/components/navigation/KapiFilterChips.js +9 -9
  80. package/dist/components/navigation/KapiNavBadge.d.ts +4 -2
  81. package/dist/components/navigation/KapiNavBadge.js +11 -10
  82. package/dist/components/navigation/KapiPanelGroup.js +25 -25
  83. package/dist/components/navigation/KapiSteps.js +4 -4
  84. package/dist/components/navigation/KapiTabs.d.ts +4 -1
  85. package/dist/components/navigation/KapiTabs.js +18 -17
  86. package/dist/components/navigation/KapiTree.js +72 -72
  87. package/dist/components/navigation/KapiWizard.d.ts +2 -1
  88. package/dist/components/navigation/KapiWizard.js +30 -30
  89. package/dist/components/overlays/KapiCanvasForm.d.ts +6 -2
  90. package/dist/components/overlays/KapiCanvasForm.js +12 -12
  91. package/dist/components/overlays/KapiCommandPalette.d.ts +2 -1
  92. package/dist/components/overlays/KapiCommandPalette.js +23 -23
  93. package/dist/components/overlays/KapiConfirm.d.ts +2 -1
  94. package/dist/components/overlays/KapiConfirm.js +12 -12
  95. package/dist/components/overlays/KapiContextMenu.d.ts +2 -1
  96. package/dist/components/overlays/KapiContextMenu.js +15 -15
  97. package/dist/components/overlays/KapiDialogHost.js +22 -22
  98. package/dist/components/overlays/KapiLoading.js +16 -16
  99. package/dist/components/overlays/KapiMenuButton.js +12 -12
  100. package/dist/components/overlays/KapiModal.d.ts +2 -1
  101. package/dist/components/overlays/KapiModal.js +28 -28
  102. package/dist/components/overlays/KapiOffcanvas.d.ts +3 -2
  103. package/dist/components/overlays/KapiOffcanvas.js +63 -63
  104. package/dist/components/overlays/KapiOffcanvasStack.js +38 -38
  105. package/dist/components/overlays/KapiPhotoView.js +14 -14
  106. package/dist/components/overlays/KapiPopover.d.ts +2 -1
  107. package/dist/components/overlays/KapiPopover.js +7 -7
  108. package/dist/components/overlays/KapiShapeSheet.js +17 -17
  109. package/dist/components/overlays/KapiSplitModal.js +29 -29
  110. package/dist/components/overlays/KapiTooltip.js +20 -20
  111. package/dist/components/overlays/menuList.js +60 -60
  112. package/dist/components/renderSlot.d.ts +27 -0
  113. package/dist/components/renderSlot.js +23 -0
  114. package/dist/hooks/portalRoot.js +6 -6
  115. package/dist/index.d.ts +2 -0
  116. package/package.json +1 -1
@@ -1,26 +1,26 @@
1
1
  "use client";
2
2
  import "#kapi-css/components/navigation/navigation.css";
3
- import { useLabels as e } from "../locale/KapiLocaleProvider.js";
4
- import { joinClasses as t } from "../rootProps.js";
3
+ import { joinClasses as e } from "../rootProps.js";
4
+ import { useLabels as t } from "../locale/KapiLocaleProvider.js";
5
5
  import { useControllableState as n } from "../../hooks/useControllableState.js";
6
6
  import { directionOf as r, physicalSide as i } from "../../hooks/directionLogic.js";
7
7
  import { useMergedRefs as a } from "../../hooks/mergeRefs.js";
8
8
  import { DEFAULT_LINK_LABELS as o } from "../locale/linkLabels.js";
9
9
  import "./navBadgeLogic.js";
10
10
  import { KapiNavBadge as s } from "./KapiNavBadge.js";
11
- import { canCollapse as c, clampCtxPanelWidth as ee, ctxPanelClasses as l, ctxPanelWidthFromDrag as te, stepCtxPanelWidth as ne } from "./contextPanelLogic.js";
12
- import { activeIdIn as u } from "./activeItemLogic.js";
13
- import { CtxSlidingList as d } from "./CtxSlidingList.js";
11
+ import { canCollapse as c, clampCtxPanelWidth as ee, ctxPanelClasses as l, ctxPanelWidthFromDrag as te, stepCtxPanelWidth as u } from "./contextPanelLogic.js";
12
+ import { activeIdIn as d } from "./activeItemLogic.js";
13
+ import { CtxSlidingList as f } from "./CtxSlidingList.js";
14
14
  /* empty css */
15
- import { KapiPanelMiniContext as re, useKapiPanelMini as f } from "./panelMini.js";
16
- import { MiniNavItem as p } from "./MiniNavItem.js";
17
- import { Fragment as m, jsx as h, jsxs as g } from "react/jsx-runtime";
18
- import { useLayoutEffect as _, useMemo as ie, useRef as v, useState as y } from "react";
19
- import { ChevronsLeft as b, ChevronsRight as x, ExternalLink as S } from "lucide-react";
15
+ import { KapiPanelMiniContext as ne, useKapiPanelMini as p } from "./panelMini.js";
16
+ import { MiniNavItem as m } from "./MiniNavItem.js";
17
+ import { useLayoutEffect as h, useMemo as re, useRef as g, useState as _ } from "react";
18
+ import { Fragment as v, jsx as y, jsxs as b } from "react/jsx-runtime";
19
+ import { ChevronsLeft as x, ChevronsRight as S, ExternalLink as C } from "lucide-react";
20
20
  //#region src/components/navigation/KapiContextPanel.tsx
21
- var C = ({ item: e, active: t, onSelect: n, newTabLabel: r }) => {
22
- let { mini: i } = f(), a = e.detail !== void 0 || e.initials !== void 0, o = () => n?.(e.id);
23
- return i ? /* @__PURE__ */ h(p, {
21
+ var w = ({ item: e, active: t, onSelect: n, newTabLabel: r }) => {
22
+ let { mini: i } = p(), a = e.detail !== void 0 || e.initials !== void 0, o = () => n?.(e.id);
23
+ return i ? /* @__PURE__ */ y(m, {
24
24
  label: e.label,
25
25
  icon: e.icon,
26
26
  initials: e.initials,
@@ -34,28 +34,28 @@ var C = ({ item: e, active: t, onSelect: n, newTabLabel: r }) => {
34
34
  newTab: e.newTab,
35
35
  newTabLabel: r
36
36
  } : { onClick: o }
37
- }) : a ? /* @__PURE__ */ g("button", {
37
+ }) : a ? /* @__PURE__ */ b("button", {
38
38
  type: "button",
39
39
  className: `kapi-ctxrec${t ? " kapi-ctxrec--on" : ""}`,
40
40
  "aria-current": t ? "page" : void 0,
41
41
  disabled: e.disabled,
42
42
  onClick: o,
43
43
  children: [
44
- e.initials !== void 0 && /* @__PURE__ */ h("span", {
44
+ e.initials !== void 0 && /* @__PURE__ */ y("span", {
45
45
  className: "kapi-ctxrec__av kapi-ctxrec__av--tone",
46
46
  children: e.initials
47
47
  }),
48
- /* @__PURE__ */ g("span", {
48
+ /* @__PURE__ */ b("span", {
49
49
  className: "kapi-ctxrec__txt",
50
- children: [/* @__PURE__ */ h("span", {
50
+ children: [/* @__PURE__ */ y("span", {
51
51
  className: "kapi-ctxrec__name",
52
52
  children: e.label
53
- }), e.detail !== void 0 && /* @__PURE__ */ h("span", {
53
+ }), e.detail !== void 0 && /* @__PURE__ */ y("span", {
54
54
  className: "kapi-ctxrec__sub",
55
55
  children: e.detail
56
56
  })]
57
57
  }),
58
- /* @__PURE__ */ h(s, {
58
+ /* @__PURE__ */ y(s, {
59
59
  value: e.badge,
60
60
  tone: e.badgeTone,
61
61
  label: e.badgeLabel,
@@ -63,18 +63,18 @@ var C = ({ item: e, active: t, onSelect: n, newTabLabel: r }) => {
63
63
  }),
64
64
  e.trailing
65
65
  ]
66
- }) : e.href === void 0 ? /* @__PURE__ */ g("button", {
66
+ }) : e.href === void 0 ? /* @__PURE__ */ b("button", {
67
67
  type: "button",
68
68
  className: `kapi-ctxitem${t ? " kapi-ctxitem--on" : ""}`,
69
69
  "aria-current": t ? "page" : void 0,
70
70
  disabled: e.disabled,
71
71
  onClick: o,
72
72
  children: [
73
- /* @__PURE__ */ g("span", {
73
+ /* @__PURE__ */ b("span", {
74
74
  className: "kapi-ctxitem__main",
75
75
  children: [e.icon, e.label]
76
76
  }),
77
- /* @__PURE__ */ h(s, {
77
+ /* @__PURE__ */ y(s, {
78
78
  value: e.badge,
79
79
  tone: e.badgeTone,
80
80
  label: e.badgeLabel,
@@ -82,7 +82,7 @@ var C = ({ item: e, active: t, onSelect: n, newTabLabel: r }) => {
82
82
  }),
83
83
  e.trailing
84
84
  ]
85
- }) : /* @__PURE__ */ g("a", {
85
+ }) : /* @__PURE__ */ b("a", {
86
86
  className: `kapi-ctxitem kapi-ctxitem--link${t ? " kapi-ctxitem--on" : ""}`,
87
87
  href: e.disabled ? void 0 : e.href,
88
88
  rel: "noopener noreferrer",
@@ -90,32 +90,32 @@ var C = ({ item: e, active: t, onSelect: n, newTabLabel: r }) => {
90
90
  "aria-current": t ? "page" : void 0,
91
91
  "aria-disabled": e.disabled || void 0,
92
92
  children: [
93
- /* @__PURE__ */ g("span", {
93
+ /* @__PURE__ */ b("span", {
94
94
  className: "kapi-ctxitem__main",
95
95
  children: [e.icon, e.label]
96
96
  }),
97
- /* @__PURE__ */ h(s, {
97
+ /* @__PURE__ */ y(s, {
98
98
  value: e.badge,
99
99
  tone: e.badgeTone,
100
100
  label: e.badgeLabel,
101
101
  max: 999
102
102
  }),
103
103
  e.trailing,
104
- e.external && /* @__PURE__ */ h(S, {
104
+ e.external && /* @__PURE__ */ y(C, {
105
105
  className: "kapi-ctxitem__ext",
106
106
  size: 14,
107
107
  "aria-hidden": "true"
108
108
  }),
109
- e.newTab && /* @__PURE__ */ h("span", {
109
+ e.newTab && /* @__PURE__ */ y("span", {
110
110
  className: "kapi-ctxitem__sr",
111
111
  children: r
112
112
  })
113
113
  ]
114
114
  });
115
- }, w = ({ sections: t, activeId: n, onSelect: r, search: i, hint: a, labels: s }) => {
116
- let c = e("link", o, s);
117
- return /* @__PURE__ */ g(m, { children: [
118
- i && /* @__PURE__ */ h("input", {
115
+ }, T = ({ sections: e, activeId: n, onSelect: r, search: i, hint: a, labels: s }) => {
116
+ let c = t("link", o, s);
117
+ return /* @__PURE__ */ b(v, { children: [
118
+ i && /* @__PURE__ */ y("input", {
119
119
  type: "search",
120
120
  className: "kapi-ctxsearch kapi-ctxsearch--input",
121
121
  placeholder: i.placeholder,
@@ -123,17 +123,17 @@ var C = ({ item: e, active: t, onSelect: n, newTabLabel: r }) => {
123
123
  "aria-label": i["aria-label"] ?? i.placeholder,
124
124
  onChange: (e) => i.onChange?.(e.target.value)
125
125
  }),
126
- t.map((e, t) => /* @__PURE__ */ g("div", {
126
+ e.map((e, t) => /* @__PURE__ */ b("div", {
127
127
  className: "kapi-ctxsection",
128
128
  children: [
129
- t > 0 && /* @__PURE__ */ h("div", { className: "kapi-ctxdivider" }),
130
- e.label && /* @__PURE__ */ h("div", {
129
+ t > 0 && /* @__PURE__ */ y("div", { className: "kapi-ctxdivider" }),
130
+ e.label && /* @__PURE__ */ y("div", {
131
131
  className: "kapi-ct",
132
132
  children: e.label
133
133
  }),
134
- /* @__PURE__ */ h(d, {
135
- active: u(e.items, n),
136
- children: e.items.map((e) => /* @__PURE__ */ h(C, {
134
+ /* @__PURE__ */ y(f, {
135
+ active: d(e.items, n),
136
+ children: e.items.map((e) => /* @__PURE__ */ y(w, {
137
137
  item: e,
138
138
  active: e.id === n,
139
139
  onSelect: r,
@@ -142,99 +142,99 @@ var C = ({ item: e, active: t, onSelect: n, newTabLabel: r }) => {
142
142
  })
143
143
  ]
144
144
  }, e.id)),
145
- a && /* @__PURE__ */ h("div", {
145
+ a && /* @__PURE__ */ y("div", {
146
146
  className: "kapi-hint",
147
147
  children: a
148
148
  })
149
149
  ] });
150
- }, T = {
150
+ }, E = {
151
151
  resize: "Redimensionar panel",
152
152
  collapse: "Plegar panel",
153
153
  expand: "Desplegar panel",
154
154
  region: "Panel contextual"
155
- }, E = ({ title: o, actions: s, collapsed: u, defaultCollapsed: d, onCollapsedChange: f, collapseLabel: p, expandLabel: m, side: S = "left", collapsedMode: C = "hidden", resizable: E = !1, minWidth: D = 200, maxWidth: O = 420, "aria-label": k, labels: A, className: j, style: M, id: N, ref: P, ...F }) => {
156
- let I = e("contextPanel", T, A), L = p ?? I.collapse, R = m ?? I.expand, z = k ?? I.region, [B, ae] = n(u, d ?? !1, f), [V, H] = y(null), [oe, U] = y(!1), W = v(null), G = v(null), K = a(G, P), q = v(null), [J, Y] = y(null);
157
- _(() => {
155
+ }, D = ({ title: o, actions: s, collapsed: d, defaultCollapsed: f, onCollapsedChange: p, collapseLabel: m, expandLabel: v, side: C = "left", collapsedMode: w = "hidden", resizable: D = !1, minWidth: O = 200, maxWidth: k = 420, "aria-label": ie, labels: A, className: j, style: M, id: N, ref: P, ...F }) => {
156
+ let I = t("contextPanel", E, A), L = m ?? I.collapse, R = v ?? I.expand, z = ie ?? I.region, [B, ae] = n(d, f ?? !1, p), [V, H] = _(null), [oe, U] = _(!1), W = g(null), G = g(null), K = a(G, P), q = g(null), [J, Y] = _(null);
157
+ h(() => {
158
158
  J && (B === J.next && q.current?.focus(), Y(null));
159
159
  }, [J, B]);
160
160
  let X = (e) => {
161
161
  Y({ next: e }), ae(e);
162
- }, Z = v(X);
163
- _(() => {
162
+ }, Z = g(X);
163
+ h(() => {
164
164
  Z.current = X;
165
165
  });
166
- let se = ie(() => ({
166
+ let se = re(() => ({
167
167
  mini: !0,
168
168
  expand: () => Z.current(!1),
169
- tooltipSide: S === "right" ? "start" : "end"
170
- }), [S]), ce = S === "right" ? x : b, le = S === "right" ? b : x, Q = () => V ?? G.current?.offsetWidth ?? 258, ue = (e) => {
169
+ tooltipSide: C === "right" ? "start" : "end"
170
+ }), [C]), ce = C === "right" ? S : x, le = C === "right" ? x : S, Q = () => V ?? G.current?.offsetWidth ?? 258, ue = (e) => {
171
171
  e.button === 0 && (W.current = {
172
172
  startX: e.clientX,
173
173
  startWidth: Q()
174
174
  }, e.currentTarget.setPointerCapture(e.pointerId), U(!0), e.preventDefault());
175
175
  }, de = (e) => {
176
176
  let t = W.current;
177
- t && H(te(i(S, r(e.currentTarget)), t.startWidth, t.startX, e.clientX, D, O));
177
+ t && H(te(i(C, r(e.currentTarget)), t.startWidth, t.startX, e.clientX, O, k));
178
178
  }, $ = (e) => {
179
179
  W.current = null, e.currentTarget.hasPointerCapture(e.pointerId) && e.currentTarget.releasePointerCapture(e.pointerId), U(!1);
180
180
  }, fe = (e) => {
181
- let t = ne(i(S, r(e.currentTarget)), Q(), e.key, D, O);
181
+ let t = u(i(C, r(e.currentTarget)), Q(), e.key, O, k);
182
182
  t !== null && (e.preventDefault(), H(t));
183
183
  };
184
184
  if (B) {
185
- let e = C === "mini";
186
- return /* @__PURE__ */ g("aside", {
185
+ let t = w === "mini";
186
+ return /* @__PURE__ */ b("aside", {
187
187
  ref: P,
188
188
  id: N,
189
- className: t(l({
190
- side: S,
189
+ className: e(l({
190
+ side: C,
191
191
  collapsed: !0
192
- }), e && "is-mini kapi-navmini", j),
192
+ }), t && "is-mini kapi-navmini", j),
193
193
  style: M,
194
194
  "aria-label": z,
195
- children: [/* @__PURE__ */ h("button", {
195
+ children: [/* @__PURE__ */ y("button", {
196
196
  ref: q,
197
197
  type: "button",
198
198
  className: "kapi-paneltoggle",
199
199
  onClick: () => X(!1),
200
200
  "aria-label": R,
201
- children: /* @__PURE__ */ h(le, {
201
+ children: /* @__PURE__ */ y(le, {
202
202
  className: "kapi-flip-rtl",
203
203
  size: 16,
204
204
  strokeWidth: 2,
205
205
  "aria-hidden": "true"
206
206
  })
207
- }), e && /* @__PURE__ */ h(re.Provider, {
207
+ }), t && /* @__PURE__ */ y(ne.Provider, {
208
208
  value: se,
209
- children: /* @__PURE__ */ h(w, {
209
+ children: /* @__PURE__ */ y(T, {
210
210
  ...F,
211
211
  labels: A
212
212
  })
213
213
  })]
214
214
  });
215
215
  }
216
- return /* @__PURE__ */ g("aside", {
216
+ return /* @__PURE__ */ b("aside", {
217
217
  ref: K,
218
218
  id: N,
219
- className: t(l({
220
- side: S,
219
+ className: e(l({
220
+ side: C,
221
221
  resizing: oe
222
222
  }), j),
223
223
  "aria-label": z,
224
- "data-resizable": E || void 0,
225
- style: E && V !== null ? {
224
+ "data-resizable": D || void 0,
225
+ style: D && V !== null ? {
226
226
  ...M,
227
227
  width: V
228
228
  } : M,
229
229
  children: [
230
- E && /* @__PURE__ */ h("div", {
230
+ D && /* @__PURE__ */ y("div", {
231
231
  className: "kapi-ctxpanel__resize",
232
232
  role: "separator",
233
233
  "aria-orientation": "vertical",
234
234
  "aria-label": I.resize,
235
- "aria-valuemin": D,
236
- "aria-valuemax": O,
237
- "aria-valuenow": ee(V ?? 258, D, O),
235
+ "aria-valuemin": O,
236
+ "aria-valuemax": k,
237
+ "aria-valuenow": ee(V ?? 258, O, k),
238
238
  tabIndex: 0,
239
239
  onPointerDown: ue,
240
240
  onPointerMove: de,
@@ -242,21 +242,21 @@ var C = ({ item: e, active: t, onSelect: n, newTabLabel: r }) => {
242
242
  onPointerCancel: $,
243
243
  onKeyDown: fe
244
244
  }),
245
- /* @__PURE__ */ g("div", {
245
+ /* @__PURE__ */ b("div", {
246
246
  className: "kapi-ctxpanel__head",
247
- children: [/* @__PURE__ */ h("span", { children: o }), /* @__PURE__ */ g("div", {
247
+ children: [/* @__PURE__ */ y("span", { children: o }), /* @__PURE__ */ b("div", {
248
248
  className: "kapi-ctxpanel__actions",
249
249
  children: [s, c({
250
- collapsed: u,
251
- defaultCollapsed: d,
252
- onCollapsedChange: f
253
- }) && /* @__PURE__ */ h("button", {
250
+ collapsed: d,
251
+ defaultCollapsed: f,
252
+ onCollapsedChange: p
253
+ }) && /* @__PURE__ */ y("button", {
254
254
  ref: q,
255
255
  type: "button",
256
256
  className: "kapi-paneltoggle",
257
257
  onClick: () => X(!0),
258
258
  "aria-label": L,
259
- children: /* @__PURE__ */ h(ce, {
259
+ children: /* @__PURE__ */ y(ce, {
260
260
  className: "kapi-flip-rtl",
261
261
  size: 16,
262
262
  strokeWidth: 2,
@@ -265,7 +265,7 @@ var C = ({ item: e, active: t, onSelect: n, newTabLabel: r }) => {
265
265
  })]
266
266
  })]
267
267
  }),
268
- /* @__PURE__ */ h(w, {
268
+ /* @__PURE__ */ y(T, {
269
269
  ...F,
270
270
  labels: A
271
271
  })
@@ -273,4 +273,4 @@ var C = ({ item: e, active: t, onSelect: n, newTabLabel: r }) => {
273
273
  });
274
274
  };
275
275
  //#endregion
276
- export { T as DEFAULT_CONTEXT_PANEL_LABELS, E as KapiContextPanel, w as KapiContextSections };
276
+ export { E as DEFAULT_CONTEXT_PANEL_LABELS, D as KapiContextPanel, T as KapiContextSections };
@@ -1,27 +1,27 @@
1
1
  "use client";
2
2
  import "#kapi-css/components/navigation/KapiFilterChips.css";
3
- import { useLabels as e } from "../locale/KapiLocaleProvider.js";
4
- import { joinClasses as t } from "../rootProps.js";
3
+ import { joinClasses as e } from "../rootProps.js";
4
+ import { useLabels as t } from "../locale/KapiLocaleProvider.js";
5
5
  import { useControllableState as n } from "../../hooks/useControllableState.js";
6
6
  import { logicalKeyOf as r } from "../../hooks/directionLogic.js";
7
7
  import { activeChipIndex as i, chipAriaLabel as a, filterChipClasses as o, nextChipIndex as s } from "./filterChipsLogic.js";
8
8
  /* empty css */
9
- import { jsx as c, jsxs as l } from "react/jsx-runtime";
10
- import { useRef as u } from "react";
9
+ import { useRef as c } from "react";
10
+ import { jsx as l, jsxs as u } from "react/jsx-runtime";
11
11
  //#region src/components/navigation/KapiFilterChips.tsx
12
12
  var d = { group: "Filtros" };
13
13
  function f({ items: f, value: p, defaultValue: m, onChange: h, size: g = "md", disabled: _ = !1, labels: v, className: y, "aria-label": b, ...x }) {
14
- let S = e("filterChips", d, v), C = u([]), [w, T] = n(p, () => m ?? f[0]?.id, h), E = (e) => _ || f[e]?.disabled === !0, D = i(f, w ?? "", E), O = (e, t) => {
14
+ let S = t("filterChips", d, v), C = c([]), [w, T] = n(p, () => m ?? f[0]?.id, h), E = (e) => _ || f[e]?.disabled === !0, D = i(f, w ?? "", E), O = (e, t) => {
15
15
  let n = s(t, f.length, r(e), E);
16
16
  n != null && (e.preventDefault(), C.current[n]?.focus());
17
17
  };
18
- return /* @__PURE__ */ c("div", {
18
+ return /* @__PURE__ */ l("div", {
19
19
  ...x,
20
20
  role: "group",
21
21
  "aria-label": b ?? S.group,
22
22
  "aria-disabled": _ || void 0,
23
- className: t("kapi-filterchips", y),
24
- children: f.map((e, t) => /* @__PURE__ */ l("button", {
23
+ className: e("kapi-filterchips", y),
24
+ children: f.map((e, t) => /* @__PURE__ */ u("button", {
25
25
  ref: (e) => {
26
26
  C.current[t] = e;
27
27
  },
@@ -33,7 +33,7 @@ function f({ items: f, value: p, defaultValue: m, onChange: h, size: g = "md", d
33
33
  disabled: E(t) || void 0,
34
34
  onClick: () => T(e.id),
35
35
  onKeyDown: (e) => O(e, t),
36
- children: [/* @__PURE__ */ c("span", { children: e.label }), e.count != null && /* @__PURE__ */ c("span", {
36
+ children: [/* @__PURE__ */ l("span", { children: e.label }), e.count != null && /* @__PURE__ */ l("span", {
37
37
  className: "kapi-filterpill__count",
38
38
  "aria-hidden": !0,
39
39
  children: e.count
@@ -1,4 +1,4 @@
1
- import type { Ref } from "react";
1
+ import type { CSSProperties, Ref } from "react";
2
2
  import type { KapiTone } from "../tone.js";
3
3
  import { type KapiNavBadgeValue } from "./navBadgeLogic.js";
4
4
  export type KapiNavBadgeProps = {
@@ -18,6 +18,8 @@ export type KapiNavBadgeProps = {
18
18
  announce?: boolean | undefined;
19
19
  /** Clase extra. */
20
20
  className?: string | undefined;
21
+ /** Estilo del `<span>` visible, al lado de `className`. */
22
+ style?: CSSProperties | undefined;
21
23
  /** Ref al `<span>` visible del badge (el que lleva `className`). */
22
24
  ref?: Ref<HTMLSpanElement> | undefined;
23
25
  };
@@ -25,4 +27,4 @@ export type KapiNavBadgeProps = {
25
27
  * Badge de atención para navegación (rail, ítems de panel, grupos). Lo visible es `aria-hidden` y el texto
26
28
  * accesible va aparte, así el nombre del ítem que lo contiene queda "Trámites 3 trámites vencidos".
27
29
  */
28
- export declare const KapiNavBadge: ({ value, tone, label, placement, max, showZero, announce, className, ref }: KapiNavBadgeProps) => import("react").JSX.Element | null;
30
+ export declare const KapiNavBadge: ({ value, tone, label, placement, max, showZero, announce, className, style, ref }: KapiNavBadgeProps) => import("react").JSX.Element | null;
@@ -6,27 +6,28 @@ import { navBadgeA11yText as n, navBadgeView as r } from "./navBadgeLogic.js";
6
6
  /* empty css */
7
7
  import { Fragment as i, jsx as a, jsxs as o } from "react/jsx-runtime";
8
8
  //#region src/components/navigation/KapiNavBadge.tsx
9
- var s = ({ value: s, tone: c = "primary", label: l, placement: u = "inline", max: d, showZero: f, announce: p = !0, className: m, ref: h }) => {
10
- let g = r(s, {
9
+ var s = ({ value: s, tone: c = "primary", label: l, placement: u = "inline", max: d, showZero: f, announce: p = !0, className: m, style: h, ref: g }) => {
10
+ let _ = r(s, {
11
11
  max: d,
12
12
  showZero: f
13
13
  });
14
- if (g === null) return null;
15
- let _ = p ? n(s, l, { showZero: f }) : null, v = g.kind === "dot";
14
+ if (_ === null) return null;
15
+ let v = p ? n(s, l, { showZero: f }) : null, y = _.kind === "dot";
16
16
  return /* @__PURE__ */ o(i, { children: [/* @__PURE__ */ a("span", {
17
- ref: h,
17
+ ref: g,
18
+ style: h,
18
19
  className: e(t({
19
20
  tone: c,
20
- variant: u === "corner" || v ? "solid" : "subtle",
21
+ variant: u === "corner" || y ? "solid" : "subtle",
21
22
  size: "sm"
22
- }), "kapi-navbadge", `kapi-navbadge--${u}`, v && "kapi-navbadge--dot", m),
23
+ }), "kapi-navbadge", `kapi-navbadge--${u}`, y && "kapi-navbadge--dot", m),
23
24
  "aria-hidden": "true",
24
- children: v ? null : g.text
25
- }), _ !== null && /* @__PURE__ */ o(i, { children: [
25
+ children: y ? null : _.text
26
+ }), v !== null && /* @__PURE__ */ o(i, { children: [
26
27
  " ",
27
28
  /* @__PURE__ */ a("span", {
28
29
  className: "kapi-navbadge__sr",
29
- children: _
30
+ children: v
30
31
  }),
31
32
  " "
32
33
  ] })] });
@@ -11,22 +11,22 @@ import { CtxSlidingList as a } from "./CtxSlidingList.js";
11
11
  import { useKapiPanelMini as o } from "./panelMini.js";
12
12
  import { MiniNavItem as s } from "./MiniNavItem.js";
13
13
  import { formatCount as c, panelGroupClasses as l } from "./panelGroupLogic.js";
14
- import { jsx as u, jsxs as d } from "react/jsx-runtime";
15
- import { useId as f } from "react";
14
+ import { useId as u } from "react";
15
+ import { jsx as d, jsxs as f } from "react/jsx-runtime";
16
16
  import { ChevronRight as p, ExternalLink as m } from "lucide-react";
17
17
  //#region src/components/navigation/KapiPanelGroup.tsx
18
18
  var h = ({ value: e }) => {
19
19
  let t = c(e);
20
- return t === null ? null : /* @__PURE__ */ u("span", {
20
+ return t === null ? null : /* @__PURE__ */ d("span", {
21
21
  className: "kapi-panelgroup__count",
22
22
  children: t
23
23
  });
24
24
  }, g = ({ item: e, active: t, onSelect: n, newTabLabel: i }) => {
25
- let a = `kapi-ctxitem${t ? " kapi-ctxitem--on" : ""}`, o = /* @__PURE__ */ d("span", {
25
+ let a = `kapi-ctxitem${t ? " kapi-ctxitem--on" : ""}`, o = /* @__PURE__ */ f("span", {
26
26
  className: "kapi-ctxitem__main",
27
27
  children: [e.icon, e.label]
28
28
  });
29
- return e.href === void 0 ? /* @__PURE__ */ d("button", {
29
+ return e.href === void 0 ? /* @__PURE__ */ f("button", {
30
30
  type: "button",
31
31
  className: a,
32
32
  "aria-current": t ? "page" : void 0,
@@ -34,15 +34,15 @@ var h = ({ value: e }) => {
34
34
  onClick: () => n?.(e.id),
35
35
  children: [
36
36
  o,
37
- /* @__PURE__ */ u(r, {
37
+ /* @__PURE__ */ d(r, {
38
38
  value: e.badge,
39
39
  tone: e.badgeTone,
40
40
  label: e.badgeLabel,
41
41
  max: 999
42
42
  }),
43
- /* @__PURE__ */ u(h, { value: e.count })
43
+ /* @__PURE__ */ d(h, { value: e.count })
44
44
  ]
45
- }) : /* @__PURE__ */ d("a", {
45
+ }) : /* @__PURE__ */ f("a", {
46
46
  className: `${a} kapi-ctxitem--link`,
47
47
  href: e.disabled ? void 0 : e.href,
48
48
  rel: "noopener noreferrer",
@@ -51,19 +51,19 @@ var h = ({ value: e }) => {
51
51
  "aria-disabled": e.disabled || void 0,
52
52
  children: [
53
53
  o,
54
- /* @__PURE__ */ u(r, {
54
+ /* @__PURE__ */ d(r, {
55
55
  value: e.badge,
56
56
  tone: e.badgeTone,
57
57
  label: e.badgeLabel,
58
58
  max: 999
59
59
  }),
60
- /* @__PURE__ */ u(h, { value: e.count }),
61
- e.external && /* @__PURE__ */ u(m, {
60
+ /* @__PURE__ */ d(h, { value: e.count }),
61
+ e.external && /* @__PURE__ */ d(m, {
62
62
  className: "kapi-ctxitem__ext",
63
63
  size: 14,
64
64
  "aria-hidden": "true"
65
65
  }),
66
- e.newTab && /* @__PURE__ */ u("span", {
66
+ e.newTab && /* @__PURE__ */ d("span", {
67
67
  className: "kapi-ctxitem__sr",
68
68
  children: i
69
69
  })
@@ -71,8 +71,8 @@ var h = ({ value: e }) => {
71
71
  });
72
72
  };
73
73
  function _({ label: c, count: m, badge: _, badgeTone: v, badgeLabel: y, icon: b, items: x, activeId: S, onSelect: C, open: w, defaultOpen: T = !1, onOpenChange: E, className: D, style: O, id: k, ref: A, "aria-label": j, labels: M }) {
74
- let N = e("link", n, M), P = f(), F = `${P}-body`, I = `${P}-head`, [L, R] = t(w, T, E), z = () => R(!L), { mini: B, expand: V } = o();
75
- return B ? /* @__PURE__ */ u("div", {
74
+ let N = e("link", n, M), P = u(), F = `${P}-body`, I = `${P}-head`, [L, R] = t(w, T, E), z = () => R(!L), { mini: B, expand: V } = o();
75
+ return B ? /* @__PURE__ */ d("div", {
76
76
  ref: A,
77
77
  className: l({
78
78
  open: !1,
@@ -80,7 +80,7 @@ function _({ label: c, count: m, badge: _, badgeTone: v, badgeLabel: y, icon: b,
80
80
  }),
81
81
  style: O,
82
82
  id: k,
83
- children: /* @__PURE__ */ u(s, {
83
+ children: /* @__PURE__ */ d(s, {
84
84
  label: c,
85
85
  icon: b,
86
86
  active: i(x, S) !== null,
@@ -91,7 +91,7 @@ function _({ label: c, count: m, badge: _, badgeTone: v, badgeLabel: y, icon: b,
91
91
  V(), L || R(!0);
92
92
  }
93
93
  })
94
- }) : /* @__PURE__ */ d("div", {
94
+ }) : /* @__PURE__ */ f("div", {
95
95
  ref: A,
96
96
  className: l({
97
97
  open: L,
@@ -99,7 +99,7 @@ function _({ label: c, count: m, badge: _, badgeTone: v, badgeLabel: y, icon: b,
99
99
  }),
100
100
  style: O,
101
101
  id: k,
102
- children: [/* @__PURE__ */ d("button", {
102
+ children: [/* @__PURE__ */ f("button", {
103
103
  type: "button",
104
104
  id: I,
105
105
  className: "kapi-panelgroup__head",
@@ -107,36 +107,36 @@ function _({ label: c, count: m, badge: _, badgeTone: v, badgeLabel: y, icon: b,
107
107
  "aria-controls": F,
108
108
  onClick: z,
109
109
  children: [
110
- /* @__PURE__ */ d("span", {
110
+ /* @__PURE__ */ f("span", {
111
111
  className: "kapi-panelgroup__label",
112
112
  children: [b, c]
113
113
  }),
114
- /* @__PURE__ */ u(r, {
114
+ /* @__PURE__ */ d(r, {
115
115
  value: _,
116
116
  tone: v,
117
117
  label: y,
118
118
  max: 999
119
119
  }),
120
- /* @__PURE__ */ u(h, { value: m }),
121
- /* @__PURE__ */ u(p, {
120
+ /* @__PURE__ */ d(h, { value: m }),
121
+ /* @__PURE__ */ d(p, {
122
122
  className: "kapi-panelgroup__chevron kapi-flip-rtl",
123
123
  size: 16,
124
124
  strokeWidth: 2,
125
125
  "aria-hidden": "true"
126
126
  })
127
127
  ]
128
- }), /* @__PURE__ */ u("div", {
128
+ }), /* @__PURE__ */ d("div", {
129
129
  id: F,
130
130
  role: "region",
131
131
  "aria-label": j,
132
132
  "aria-labelledby": j ? void 0 : I,
133
133
  className: "kapi-panelgroup__body",
134
134
  inert: !L,
135
- children: /* @__PURE__ */ u("div", {
135
+ children: /* @__PURE__ */ d("div", {
136
136
  className: "kapi-panelgroup__clip",
137
- children: /* @__PURE__ */ u(a, {
137
+ children: /* @__PURE__ */ d(a, {
138
138
  active: i(x, S),
139
- children: x.map((e) => /* @__PURE__ */ u(g, {
139
+ children: x.map((e) => /* @__PURE__ */ d(g, {
140
140
  item: e,
141
141
  active: e.id === S,
142
142
  onSelect: C,
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import "#kapi-css/components/navigation/KapiSteps.css";
3
- import { useLabels as e } from "../locale/KapiLocaleProvider.js";
4
- import { joinClasses as t } from "../rootProps.js";
3
+ import { joinClasses as e } from "../rootProps.js";
4
+ import { useLabels as t } from "../locale/KapiLocaleProvider.js";
5
5
  /* empty css */
6
6
  import { resolveSteps as n, stepsClasses as r } from "./stepsLogic.js";
7
7
  import { jsx as i, jsxs as a } from "react/jsx-runtime";
@@ -18,11 +18,11 @@ var c = {
18
18
  "aria-hidden": !0
19
19
  };
20
20
  function u({ steps: u, current: d, orientation: f = "vertical", size: p = "md", labels: m, className: h, ref: g, ..._ }) {
21
- let v = e("steps", c, m), { statuses: y, currentIndex: b } = n(u, d);
21
+ let v = t("steps", c, m), { statuses: y, currentIndex: b } = n(u, d);
22
22
  return /* @__PURE__ */ i("ol", {
23
23
  ..._,
24
24
  ref: g,
25
- className: t(r(f, p), h),
25
+ className: e(r(f, p), h),
26
26
  children: u.map((e, t) => {
27
27
  let n = y[t] ?? "upcoming";
28
28
  return /* @__PURE__ */ a("li", {
@@ -1,3 +1,4 @@
1
+ import type { CSSProperties } from "react";
1
2
  import { type HTMLAttributes, type ReactNode, type Ref } from "react";
2
3
  /** Pestaña de `KapiTabs`. `Id` acota los ids (p. ej. una unión de literales). */
3
4
  export type KapiTabItem<Id extends string = string> = {
@@ -63,6 +64,8 @@ export type KapiTabPanelProps = {
63
64
  keepMounted?: boolean | undefined;
64
65
  /** Clase del panel (`role="tabpanel"`). */
65
66
  className?: string | undefined;
67
+ /** Estilo del panel, al lado de `className`. */
68
+ style?: CSSProperties | undefined;
66
69
  /** Contenido del panel. */
67
70
  children?: ReactNode;
68
71
  /** Ref al `<div role="tabpanel">`. */
@@ -73,4 +76,4 @@ export type KapiTabPanelProps = {
73
76
  * (`tabIndex=0`) para llegar al contenido con Tab. Los inactivos se renderizan `hidden` para que las
74
77
  * referencias `aria-controls` sigan siendo válidas.
75
78
  */
76
- export declare function KapiTabPanel({ idBase, tabId: owner, active, keepMounted, className, children, ref }: KapiTabPanelProps): import("react").JSX.Element;
79
+ export declare function KapiTabPanel({ idBase, tabId: owner, active, keepMounted, className, style, children, ref }: KapiTabPanelProps): import("react").JSX.Element;