@kapiuara/ui 0.10.0 → 0.11.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 (81) hide show
  1. package/README.md +10 -5
  2. package/dist/components/data/KapiBarChart.d.ts +84 -0
  3. package/dist/components/data/KapiBarChart.js +87 -0
  4. package/dist/components/data/KapiEventCalendar.d.ts +70 -0
  5. package/dist/components/data/KapiEventCalendar.js +225 -0
  6. package/dist/components/data/KapiHeatmap.d.ts +62 -0
  7. package/dist/components/data/KapiHeatmap.js +120 -0
  8. package/dist/components/data/KapiLineChart.d.ts +50 -0
  9. package/dist/components/data/KapiLineChart.js +105 -0
  10. package/dist/components/data/KapiPaginationFooter.js +1 -0
  11. package/dist/components/data/KapiSparkline.d.ts +41 -0
  12. package/dist/components/data/KapiSparkline.js +55 -0
  13. package/dist/components/data/KapiTable.js +371 -359
  14. package/dist/components/data/barChartLogic.d.ts +59 -0
  15. package/dist/components/data/barChartLogic.js +53 -0
  16. package/dist/components/data/chartFrame.d.ts +96 -0
  17. package/dist/components/data/chartFrame.js +89 -0
  18. package/dist/components/data/eventCalendarLogic.d.ts +70 -0
  19. package/dist/components/data/eventCalendarLogic.js +45 -0
  20. package/dist/components/data/heatmapLogic.d.ts +15 -0
  21. package/dist/components/data/heatmapLogic.js +15 -0
  22. package/dist/components/data/index.d.ts +19 -0
  23. package/dist/components/data/lineChartLogic.d.ts +30 -0
  24. package/dist/components/data/lineChartLogic.js +21 -0
  25. package/dist/components/data/sparklineLogic.d.ts +28 -0
  26. package/dist/components/data/sparklineLogic.js +18 -0
  27. package/dist/components/display/KapiStat.d.ts +1 -1
  28. package/dist/components/inputs/KapiDatePicker.d.ts +8 -2
  29. package/dist/components/inputs/KapiDatePicker.js +120 -106
  30. package/dist/components/inputs/KapiDateRangePicker.d.ts +26 -5
  31. package/dist/components/inputs/KapiDateRangePicker.js +146 -111
  32. package/dist/components/inputs/datePickerLogic.d.ts +9 -0
  33. package/dist/components/inputs/datePickerLogic.js +25 -25
  34. package/dist/components/inputs/dateRangeLogic.d.ts +23 -4
  35. package/dist/components/inputs/dateRangeLogic.js +48 -22
  36. package/dist/components/inputs/facetedSearchLogic.d.ts +1 -1
  37. package/dist/components/layout/KapiContextSlot.js +108 -88
  38. package/dist/components/layout/KapiMasonry.d.ts +30 -0
  39. package/dist/components/layout/KapiMasonry.js +33 -0
  40. package/dist/components/layout/KapiPageHeader.js +89 -71
  41. package/dist/components/layout/KapiRail.d.ts +8 -2
  42. package/dist/components/layout/KapiRail.js +118 -67
  43. package/dist/components/layout/KapiShell.js +67 -37
  44. package/dist/components/layout/index.d.ts +2 -0
  45. package/dist/components/layout/masonryLogic.d.ts +40 -0
  46. package/dist/components/layout/masonryLogic.js +8 -0
  47. package/dist/components/layout/railLogic.d.ts +41 -1
  48. package/dist/components/layout/railLogic.js +36 -4
  49. package/dist/components/layout/reopenBus.d.ts +53 -0
  50. package/dist/components/layout/reopenBus.js +6 -0
  51. package/dist/components/layout/useMasonrySpans.d.ts +32 -0
  52. package/dist/components/layout/useMasonrySpans.js +44 -0
  53. package/dist/components/layout/useRailOverflow.d.ts +17 -0
  54. package/dist/components/layout/useRailOverflow.js +41 -0
  55. package/dist/components/locale/labelRegistry.d.ts +10 -1
  56. package/dist/components/navigation/KapiFilterChips.js +1 -1
  57. package/dist/components/navigation/filterChipsLogic.d.ts +7 -1
  58. package/dist/components/navigation/filterChipsLogic.js +3 -3
  59. package/dist/components/overlays/KapiContextMenu.d.ts +3 -0
  60. package/dist/components/overlays/KapiContextMenu.js +2 -1
  61. package/dist/components/overlays/KapiDropdown.d.ts +3 -1
  62. package/dist/components/overlays/KapiDropdown.js +29 -26
  63. package/dist/components/overlays/KapiMenuButton.js +1 -0
  64. package/dist/components/overlays/KapiOffcanvasStack.d.ts +2 -2
  65. package/dist/hooks/breakpointOpenLogic.d.ts +20 -5
  66. package/dist/hooks/breakpointOpenLogic.js +2 -2
  67. package/dist/hooks/dataColorLogic.d.ts +23 -0
  68. package/dist/hooks/index.d.ts +1 -1
  69. package/dist/hooks/numberFormatLogic.d.ts +7 -0
  70. package/dist/hooks/numberFormatLogic.js +5 -2
  71. package/dist/hooks/seriesPaletteLogic.d.ts +24 -0
  72. package/dist/hooks/themeContrastLogic.js +1 -0
  73. package/dist/hooks/themeDeriveLogic.d.ts +8 -0
  74. package/dist/hooks/themeDeriveLogic.js +4 -2
  75. package/dist/hooks/useKapiTheme.js +27 -27
  76. package/dist/hooks/useMediaQuery.d.ts +7 -0
  77. package/dist/hooks/useMediaQuery.js +4 -4
  78. package/dist/index.js +125 -114
  79. package/dist/kapi.css +1 -1
  80. package/dist/kapi.layered.css +1 -1
  81. package/package.json +2 -6
@@ -1,182 +1,196 @@
1
1
  "use client";
2
2
  import { assignRef as e, fieldControlProps as t, focusLeaves as n } from "./fieldLogic.js";
3
- import { useKapiField as r } from "./KapiField.js";
4
- import { useKapiLocale as i, useLabels as a } from "../locale/KapiLocaleProvider.js";
5
- import { formDateValue as o, formatValue as s, hasCalendar as ee, hasTime as te, localizedCalendarLabels as ne, maskInput as re, minuteOptions as ie, monthTitle as c, pad as l, parseText as u, sameDay as d } from "./datePickerLogic.js";
6
- import { KapiCalendarGrid as f } from "./KapiCalendarGrid.js";
7
- import { useCalendarFocus as p } from "./useCalendarFocus.js";
8
- import { useDatePopSide as m } from "./useDatePopSide.js";
3
+ import { useKapiField as ee } from "./KapiField.js";
4
+ import { useKapiLocale as te, useLabels as r } from "../locale/KapiLocaleProvider.js";
5
+ import { chipFieldSize as i, formDateValue as ne, formatValue as a, hasCalendar as re, hasTime as ie, localizedCalendarLabels as ae, maskInput as oe, minuteOptions as se, monthTitle as ce, pad as o, parseText as s, sameDay as c } from "./datePickerLogic.js";
6
+ import { KapiCalendarGrid as l } from "./KapiCalendarGrid.js";
7
+ import { useCalendarFocus as u } from "./useCalendarFocus.js";
8
+ import { useDatePopSide as d } from "./useDatePopSide.js";
9
9
  /* empty css */
10
- import { jsx as h, jsxs as g } from "react/jsx-runtime";
11
- import { useEffect as ae, useRef as _, useState as v } from "react";
12
- import { Calendar as oe, ChevronLeft as se, ChevronRight as ce, Clock as le } from "lucide-react";
10
+ import { jsx as f, jsxs as p } from "react/jsx-runtime";
11
+ import { useEffect as le, useId as ue, useRef as m, useState as h } from "react";
12
+ import { Calendar as de, ChevronLeft as fe, ChevronRight as pe, Clock as me } from "lucide-react";
13
13
  //#region src/components/inputs/KapiDatePicker.tsx
14
- var ue = {
14
+ var he = {
15
15
  date: "dd/mm/aaaa",
16
16
  time: "hh:mm",
17
17
  datetime: "dd/mm/aaaa hh:mm"
18
- }, de = Array.from({ length: 24 }, (e, t) => t), y = ({ mode: y = "date", value: b = null, onChange: fe, placeholder: pe, disabled: x = !1, id: me, name: S, className: C, style: w, "aria-label": T, labels: E, minuteStep: D = 1, ref: O, onBlur: k }) => {
19
- let A = i(), j = a("calendar", ne(A), E), M = r(), N = ee(y), P = te(y), [F, I] = v(!1), [L, R] = v(b), [z, B] = v(() => s(b, y)), [V, H] = v(() => b ?? /* @__PURE__ */ new Date()), U = _(null), W = _(null), G = _(null), { inputRef: he, focusRequest: ge, openFromKeyboard: K, openFromFocus: _e, returnFocus: q } = p(I), J = b ? b.getTime() : null, [ve, ye] = v(J), [be, Y] = v(y);
20
- (ve !== J || be !== y) && (ye(J), Y(y), R(b), B(s(b, y)), b && H(b)), ae(() => {
18
+ }, ge = Array.from({ length: 24 }, (e, t) => t), g = ({ mode: g = "date", value: _ = null, onChange: _e, placeholder: ve, icon: v, label: y, disabled: b = !1, id: ye, name: x, className: be, style: S, "aria-label": C, labels: w, minuteStep: T = 1, ref: E, onBlur: D }) => {
19
+ let O = te(), k = r("calendar", ae(O), w), A = ee(), j = re(g), M = ie(g), N = !!v || !!y, P = ve ?? he[g], xe = ue(), F = ye ?? A?.controlId ?? (N ? xe : void 0), [I, L] = h(!1), [R, z] = h(_), [B, V] = h(() => a(_, g)), [H, U] = h(() => _ ?? /* @__PURE__ */ new Date()), W = m(null), G = m(null), K = m(null), { inputRef: Se, focusRequest: Ce, openFromKeyboard: q, openFromFocus: we, returnFocus: J } = u(L), Y = _ ? _.getTime() : null, [Te, Ee] = h(Y), [De, Oe] = h(g);
20
+ (Te !== Y || De !== g) && (Ee(Y), Oe(g), z(_), V(a(_, g)), _ && U(_)), le(() => {
21
21
  let e = (e) => {
22
- let t = U.current;
22
+ let t = W.current;
23
23
  if (!t || t.contains(e.target)) return;
24
24
  let n = document.activeElement;
25
- n instanceof HTMLElement && G.current?.contains(n) && n.blur(), I(!1);
25
+ n instanceof HTMLElement && K.current?.contains(n) && n.blur(), L(!1);
26
26
  };
27
27
  return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
28
28
  }, []);
29
29
  let X = (e) => {
30
- R(e), B(s(e, y)), fe?.(e);
31
- }, xe = () => {
32
- if (!z.trim()) {
33
- L && X(null);
30
+ z(e), V(a(e, g)), _e?.(e);
31
+ }, ke = () => {
32
+ if (!B.trim()) {
33
+ R && X(null);
34
34
  return;
35
35
  }
36
- let e = u(z, y, L);
37
- e === void 0 ? B(s(L, y)) : (e && L && e.getTime() === L.getTime() ? B(s(e, y)) : X(e), e && H(e));
36
+ let e = s(B, g, R);
37
+ e === void 0 ? V(a(R, g)) : (e && R && e.getTime() === R.getTime() ? V(a(e, g)) : X(e), e && U(e));
38
38
  }, Z = (e) => {
39
- let t = L ?? /* @__PURE__ */ new Date(), n = new Date(e);
40
- P && n.setHours(t.getHours(), t.getMinutes()), X(n), P || q();
39
+ let t = R ?? /* @__PURE__ */ new Date(), n = new Date(e);
40
+ M && n.setHours(t.getHours(), t.getMinutes()), X(n), M || J();
41
41
  }, Q = (e, t) => {
42
- let n = new Date(L ?? /* @__PURE__ */ new Date());
42
+ let n = new Date(R ?? /* @__PURE__ */ new Date());
43
43
  e != null && n.setHours(e), t != null && n.setMinutes(t), X(n);
44
- }, $ = (e) => H(new Date(V.getFullYear(), V.getMonth() + e, 1)), Se = m(F && !x, W, G);
45
- return /* @__PURE__ */ g("div", {
46
- className: ["kapi-dp", C].filter(Boolean).join(" "),
47
- style: w,
48
- ref: U,
44
+ }, $ = (e) => U(new Date(H.getFullYear(), H.getMonth() + e, 1)), Ae = d(I && !b, G, K);
45
+ return /* @__PURE__ */ p("div", {
46
+ className: [
47
+ "kapi-dp",
48
+ N && "kapi-dp--chip",
49
+ be
50
+ ].filter(Boolean).join(" "),
51
+ style: S,
52
+ ref: W,
49
53
  onBlur: (e) => {
50
- n(e.relatedTarget, e.currentTarget) && k?.(e);
54
+ n(e.relatedTarget, e.currentTarget) && D?.(e);
51
55
  },
52
56
  children: [
53
- /* @__PURE__ */ g("div", {
54
- className: "kapi-dp__field",
55
- ref: W,
56
- children: [/* @__PURE__ */ h("input", {
57
- ref: (t) => {
58
- he.current = t, e(O, t);
59
- },
60
- ...t(M, { id: me }),
61
- className: "kapi-input kapi-dp__input",
62
- value: z,
63
- placeholder: pe ?? ue[y],
64
- disabled: x,
65
- "aria-label": T,
66
- autoComplete: "off",
67
- inputMode: "numeric",
68
- onChange: (e) => B(re(e.target.value, y)),
69
- onFocus: _e,
70
- onBlur: xe,
71
- onKeyDown: (e) => {
72
- e.key === "Escape" && I(!1), e.key === "ArrowDown" && N && (e.preventDefault(), K());
73
- }
74
- }), /* @__PURE__ */ h("button", {
75
- type: "button",
76
- className: "kapi-dp__toggle",
77
- disabled: x,
78
- "aria-label": j.openPicker,
79
- "aria-expanded": F,
80
- onClick: () => F ? I(!1) : K(),
81
- children: h(N ? oe : le, {
82
- size: 16,
83
- strokeWidth: 1.9
57
+ /* @__PURE__ */ p("div", {
58
+ className: ["kapi-dp__field", N && "kapi-filterchip"].filter(Boolean).join(" "),
59
+ ref: G,
60
+ children: [
61
+ v,
62
+ y && /* @__PURE__ */ p("label", {
63
+ className: "kapi-dp__label",
64
+ htmlFor: F,
65
+ children: [y, ":"]
66
+ }),
67
+ /* @__PURE__ */ f("input", {
68
+ ref: (t) => {
69
+ Se.current = t, e(E, t);
70
+ },
71
+ ...t(A, { id: F }),
72
+ ...N ? { size: i(P) } : {},
73
+ className: "kapi-input kapi-dp__input",
74
+ value: B,
75
+ placeholder: P,
76
+ disabled: b,
77
+ "aria-label": C,
78
+ autoComplete: "off",
79
+ inputMode: "numeric",
80
+ onChange: (e) => V(oe(e.target.value, g)),
81
+ onFocus: we,
82
+ onBlur: ke,
83
+ onKeyDown: (e) => {
84
+ e.key === "Escape" && L(!1), e.key === "ArrowDown" && j && (e.preventDefault(), q());
85
+ }
86
+ }),
87
+ /* @__PURE__ */ f("button", {
88
+ type: "button",
89
+ className: "kapi-dp__toggle",
90
+ disabled: b,
91
+ "aria-label": k.openPicker,
92
+ "aria-expanded": I,
93
+ onClick: () => I ? L(!1) : q(),
94
+ children: f(j ? de : me, {
95
+ size: 16,
96
+ strokeWidth: 1.9
97
+ })
84
98
  })
85
- })]
99
+ ]
86
100
  }),
87
- S && /* @__PURE__ */ h("input", {
101
+ x && /* @__PURE__ */ f("input", {
88
102
  type: "hidden",
89
- name: S,
90
- value: o(L, y),
91
- disabled: x
103
+ name: x,
104
+ value: ne(R, g),
105
+ disabled: b
92
106
  }),
93
- F && !x && /* @__PURE__ */ g("div", {
94
- ref: G,
95
- className: `kapi-dp__pop${Se === "top" ? " kapi-dp__pop--up" : ""}`,
107
+ I && !b && /* @__PURE__ */ p("div", {
108
+ ref: K,
109
+ className: `kapi-dp__pop${Ae === "top" ? " kapi-dp__pop--up" : ""}`,
96
110
  onKeyDown: (e) => {
97
- e.key === "Escape" && (e.preventDefault(), q());
111
+ e.key === "Escape" && (e.preventDefault(), J());
98
112
  },
99
- children: [N && /* @__PURE__ */ g("div", {
113
+ children: [j && /* @__PURE__ */ p("div", {
100
114
  className: "kapi-dp__cal",
101
115
  children: [
102
- /* @__PURE__ */ g("div", {
116
+ /* @__PURE__ */ p("div", {
103
117
  className: "kapi-dp__head",
104
118
  children: [
105
- /* @__PURE__ */ h("button", {
119
+ /* @__PURE__ */ f("button", {
106
120
  type: "button",
107
121
  className: "kapi-dp__nav",
108
- "aria-label": j.prevMonth,
122
+ "aria-label": k.prevMonth,
109
123
  onClick: () => $(-1),
110
- children: /* @__PURE__ */ h(se, {
124
+ children: /* @__PURE__ */ f(fe, {
111
125
  size: 15,
112
126
  strokeWidth: 2.2
113
127
  })
114
128
  }),
115
- /* @__PURE__ */ h("span", {
129
+ /* @__PURE__ */ f("span", {
116
130
  className: "kapi-dp__title",
117
- children: c(V, j.months)
131
+ children: ce(H, k.months)
118
132
  }),
119
- /* @__PURE__ */ h("button", {
133
+ /* @__PURE__ */ f("button", {
120
134
  type: "button",
121
135
  className: "kapi-dp__nav",
122
- "aria-label": j.nextMonth,
136
+ "aria-label": k.nextMonth,
123
137
  onClick: () => $(1),
124
- children: /* @__PURE__ */ h(ce, {
138
+ children: /* @__PURE__ */ f(pe, {
125
139
  size: 15,
126
140
  strokeWidth: 2.2
127
141
  })
128
142
  })
129
143
  ]
130
144
  }),
131
- /* @__PURE__ */ h(f, {
132
- view: V,
133
- onViewChange: H,
134
- labels: j,
135
- focusTarget: L,
136
- focusRequest: ge,
137
- isSelected: (e) => d(e, L),
138
- dayClassName: (e) => d(e, L) && "kapi-dp__day--sel",
145
+ /* @__PURE__ */ f(l, {
146
+ view: H,
147
+ onViewChange: U,
148
+ labels: k,
149
+ focusTarget: R,
150
+ focusRequest: Ce,
151
+ isSelected: (e) => c(e, R),
152
+ dayClassName: (e) => c(e, R) && "kapi-dp__day--sel",
139
153
  onPick: Z
140
154
  }),
141
- /* @__PURE__ */ g("div", {
155
+ /* @__PURE__ */ p("div", {
142
156
  className: "kapi-dp__foot",
143
- children: [/* @__PURE__ */ h("button", {
157
+ children: [/* @__PURE__ */ f("button", {
144
158
  type: "button",
145
159
  className: "kapi-dp__link",
146
160
  onClick: () => {
147
- X(null), I(!1);
161
+ X(null), L(!1);
148
162
  },
149
- children: j.clear
150
- }), /* @__PURE__ */ h("button", {
163
+ children: k.clear
164
+ }), /* @__PURE__ */ f("button", {
151
165
  type: "button",
152
166
  className: "kapi-dp__link",
153
167
  onClick: () => {
154
168
  let e = /* @__PURE__ */ new Date();
155
- H(e), Z(e);
169
+ U(e), Z(e);
156
170
  },
157
- children: j.today
171
+ children: k.today
158
172
  })]
159
173
  })
160
174
  ]
161
- }), P && /* @__PURE__ */ h("div", {
175
+ }), M && /* @__PURE__ */ f("div", {
162
176
  className: "kapi-dp__time",
163
- children: /* @__PURE__ */ g("div", {
177
+ children: /* @__PURE__ */ p("div", {
164
178
  className: "kapi-dp__time-cols",
165
- children: [/* @__PURE__ */ h("div", {
179
+ children: [/* @__PURE__ */ f("div", {
166
180
  className: "kapi-dp__time-col",
167
- children: de.map((e) => /* @__PURE__ */ h("button", {
181
+ children: ge.map((e) => /* @__PURE__ */ f("button", {
168
182
  type: "button",
169
- className: `kapi-dp__time-opt${L?.getHours() === e ? " kapi-dp__time-opt--sel" : ""}`,
183
+ className: `kapi-dp__time-opt${R?.getHours() === e ? " kapi-dp__time-opt--sel" : ""}`,
170
184
  onClick: () => Q(e, null),
171
- children: l(e)
185
+ children: o(e)
172
186
  }, e))
173
- }), /* @__PURE__ */ h("div", {
187
+ }), /* @__PURE__ */ f("div", {
174
188
  className: "kapi-dp__time-col",
175
- children: ie(D, L?.getMinutes()).map((e) => /* @__PURE__ */ h("button", {
189
+ children: se(T, R?.getMinutes()).map((e) => /* @__PURE__ */ f("button", {
176
190
  type: "button",
177
- className: `kapi-dp__time-opt${L?.getMinutes() === e ? " kapi-dp__time-opt--sel" : ""}`,
191
+ className: `kapi-dp__time-opt${R?.getMinutes() === e ? " kapi-dp__time-opt--sel" : ""}`,
178
192
  onClick: () => Q(null, e),
179
- children: l(e)
193
+ children: o(e)
180
194
  }, e))
181
195
  })]
182
196
  })
@@ -186,4 +200,4 @@ var ue = {
186
200
  });
187
201
  };
188
202
  //#endregion
189
- export { y as KapiDatePicker };
203
+ export { g as KapiDatePicker };
@@ -1,4 +1,4 @@
1
- import { type CSSProperties, type FocusEvent, type Ref } from "react";
1
+ import { type CSSProperties, type FocusEvent, type ReactNode, type Ref } from "react";
2
2
  import { type KapiCalendarLabels } from "./datePickerLogic";
3
3
  import { type KapiDateRange } from "./dateRangeLogic";
4
4
  import "./KapiDatePicker.css";
@@ -6,17 +6,27 @@ import type { KapiLabelsOverride } from "../labelsLogic";
6
6
  export type { KapiDateRange };
7
7
  /** Textos del rango: los del calendario más la pista de qué punta se está eligiendo. */
8
8
  export type KapiDateRangePickerLabels = KapiCalendarLabels & {
9
+ /** Pista del pie mientras no hay ninguna punta elegida. */
9
10
  pickStart: string;
11
+ /** Pista del pie con una punta ya elegida. */
10
12
  pickEnd: string;
13
+ /** Botón del pie que deja el rango sin fecha de fin, desde el día elegido. */
14
+ openEnd: string;
15
+ /** Botón del pie que deja el rango sin fecha de inicio, hasta el día elegido. */
16
+ openStart: string;
11
17
  };
12
18
  export declare const DEFAULT_DATE_RANGE_LABELS: KapiDateRangePickerLabels;
13
19
  export type KapiDateRangePickerProps = {
14
20
  /** Rango actual (`from`/`to`). Se re-sincroniza cada vez que cambia (componente controlado). */
15
21
  value?: KapiDateRange | undefined;
16
- /** Se llama con el rango completo (al elegir la segunda fecha o al tipear) o vacío al borrar. */
22
+ /** Se llama con el rango completo, con una sola punta abierta, o vacío al borrar. */
17
23
  onChange?: ((value: KapiDateRange) => void) | undefined;
18
24
  /** Texto de ejemplo del campo. */
19
25
  placeholder?: string | undefined;
26
+ /** Ícono (lucide-react) a la izquierda del chip; con `icon` o `label` el campo se dibuja como chip de filtro. */
27
+ icon?: ReactNode | undefined;
28
+ /** Prefijo del chip ("Período: 01/10/2026 – 05/10/2026"); también nombra al campo si no hay `aria-label` ni `KapiField`. */
29
+ label?: string | undefined;
20
30
  /** Deshabilita el campo y el botón del calendario. */
21
31
  disabled?: boolean | undefined;
22
32
  /** `id` del campo de texto (para asociarlo a un `<label>`). */
@@ -42,8 +52,19 @@ export type KapiDateRangePickerProps = {
42
52
  /**
43
53
  * Rango de fechas propio (sin librería), con el mismo look que `KapiDatePicker`. En el calendario, el
44
54
  * primer click marca el inicio y el segundo el fin (en cualquier orden; el hover previsualiza). También
45
- * se puede tipear `dd/mm/aaaa – dd/mm/aaaa` (se parsea al salir del campo). Sólo emite rangos completos
46
- * o vacío: si se cierra con sólo el inicio elegido, vuelve al último rango. Teclado igual que
55
+ * se puede tipear `dd/mm/aaaa – dd/mm/aaaa` (se parsea al salir del campo).
56
+ *
57
+ * LAS DOS PUNTAS SON INDEPENDIENTES: emite el rango completo, una sola punta («desde el 10 en
58
+ * adelante», «hasta el 10») o vacío. Exigir las dos es VALIDACIÓN y la hace la app, que la anuncia
59
+ * con `required` y `status` de `KapiField`, igual que en cualquier otro campo; el control reporta
60
+ * lo que la persona expresó y nunca lo descarta por su cuenta.
61
+ *
62
+ * Una punta sola se emite siempre por una acción EXPLÍCITA —los dos botones del pie, o el separador
63
+ * tipeado—, porque un primer click no puede saber si querés una punta o dos. Por eso son dos
64
+ * botones y no uno, y por eso cerrar con un borrador a medias restaura el último rango: ahí la
65
+ * persona no dijo cuál de las dos puntas dejaba abierta. Teclado igual que
47
66
  * `KapiDatePicker` (grilla compartida `KapiCalendarGrid`): Enter/Espacio marcan cada punta.
67
+ * Con `label` o `icon` el campo se dibuja como el chip de `KapiDropdown` (la misma clase
68
+ * `.kapi-filterchip`), para una fila de filtros que mezcle los dos.
48
69
  */
49
- export declare const KapiDateRangePicker: ({ value, onChange, placeholder, disabled, id, name, className, style, "aria-label": ariaLabel, labels, ref, onBlur: onBlurProp }: KapiDateRangePickerProps) => import("react").JSX.Element;
70
+ export declare const KapiDateRangePicker: ({ value, onChange, placeholder, icon, label, disabled, id, name, className, style, "aria-label": ariaLabel, labels, ref, onBlur: onBlurProp }: KapiDateRangePickerProps) => import("react").JSX.Element;