@kapiuara/ui 0.16.0 → 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.
- package/README.md +171 -11
- package/dist/components/chat/KapiChatThread.js +4 -4
- package/dist/components/chat/KapiComposer.js +8 -8
- package/dist/components/data/KapiDataTable.js +4 -4
- package/dist/components/data/KapiSparkline.d.ts +2 -1
- package/dist/components/data/KapiSparkline.js +29 -26
- package/dist/components/data/KapiTableFilter.js +6 -6
- package/dist/components/data/tableCells.d.ts +12 -1
- package/dist/components/data/tableCells.js +49 -51
- package/dist/components/data/useTableSelection.js +3 -3
- package/dist/components/display/KapiAnnotation.js +68 -63
- package/dist/components/display/KapiAvatar.d.ts +6 -4
- package/dist/components/display/KapiAvatar.js +33 -28
- package/dist/components/display/KapiCodeBlock.d.ts +48 -0
- package/dist/components/display/KapiCodeBlock.js +44 -0
- package/dist/components/display/KapiCommentComposer.js +6 -6
- package/dist/components/display/KapiDiff.d.ts +62 -0
- package/dist/components/display/KapiDiff.js +118 -0
- package/dist/components/display/KapiHighlight.d.ts +27 -0
- package/dist/components/display/KapiHighlight.js +21 -0
- package/dist/components/display/KapiIconTile.d.ts +2 -1
- package/dist/components/display/KapiIconTile.js +23 -21
- package/dist/components/display/KapiStat.d.ts +3 -2
- package/dist/components/display/KapiStat.js +32 -26
- package/dist/components/display/KapiTag.d.ts +4 -3
- package/dist/components/display/KapiTag.js +29 -24
- package/dist/components/display/KapiTimeline.d.ts +5 -2
- package/dist/components/display/KapiTimeline.js +31 -23
- package/dist/components/display/annotationLogic.d.ts +2 -1
- package/dist/components/display/annotationLogic.js +7 -6
- package/dist/components/display/codeBlockSlots.d.ts +10 -0
- package/dist/components/display/codeBlockSlots.js +13 -0
- package/dist/components/display/diffLogic.d.ts +58 -0
- package/dist/components/display/diffLogic.js +96 -0
- package/dist/components/display/diffSlots.d.ts +14 -0
- package/dist/components/display/diffSlots.js +17 -0
- package/dist/components/display/highlightLogic.d.ts +18 -0
- package/dist/components/display/highlightLogic.js +26 -0
- package/dist/components/display/highlightSlots.d.ts +5 -0
- package/dist/components/display/highlightSlots.js +8 -0
- package/dist/components/display/iconTileLogic.d.ts +2 -2
- package/dist/components/display/iconTileLogic.js +7 -6
- package/dist/components/display/index.d.ts +8 -0
- package/dist/components/display/statLogic.d.ts +2 -1
- package/dist/components/display/statLogic.js +7 -6
- package/dist/components/display/tagLogic.d.ts +2 -1
- package/dist/components/display/tagLogic.js +7 -6
- package/dist/components/display/timelineLogic.d.ts +20 -2
- package/dist/components/display/timelineLogic.js +10 -2
- package/dist/components/feedback/KapiFab.js +108 -108
- package/dist/components/feedback/KapiProgress.js +63 -54
- package/dist/components/feedback/KapiToastContainer.js +9 -9
- package/dist/components/feedback/KapiTour.js +12 -12
- package/dist/components/feedback/progressLogic.d.ts +2 -1
- package/dist/components/feedback/progressLogic.js +9 -8
- package/dist/components/inputs/KapiAutocomplete.d.ts +6 -0
- package/dist/components/inputs/KapiAutocomplete.js +86 -85
- package/dist/components/inputs/KapiChecklist.d.ts +7 -1
- package/dist/components/inputs/KapiChecklist.js +53 -52
- package/dist/components/inputs/KapiCopyButton.d.ts +40 -0
- package/dist/components/inputs/KapiCopyButton.js +35 -0
- package/dist/components/inputs/KapiDatePicker.d.ts +7 -1
- package/dist/components/inputs/KapiDatePicker.js +118 -116
- package/dist/components/inputs/KapiDateRangePicker.d.ts +7 -1
- package/dist/components/inputs/KapiDateRangePicker.js +136 -135
- package/dist/components/inputs/KapiFacetedSearch.js +5 -5
- package/dist/components/inputs/KapiField.d.ts +9 -1
- package/dist/components/inputs/KapiField.js +43 -42
- package/dist/components/inputs/KapiFileUpload.js +6 -6
- package/dist/components/inputs/KapiInput.d.ts +29 -1
- package/dist/components/inputs/KapiInput.js +74 -51
- package/dist/components/inputs/KapiMaskedInput.js +26 -26
- package/dist/components/inputs/KapiNumberStepper.d.ts +7 -1
- package/dist/components/inputs/KapiNumberStepper.js +24 -23
- package/dist/components/inputs/KapiPinInput.d.ts +72 -0
- package/dist/components/inputs/KapiPinInput.js +75 -0
- package/dist/components/inputs/KapiPropsForm.d.ts +34 -0
- package/dist/components/inputs/KapiPropsForm.js +78 -0
- package/dist/components/inputs/KapiRating.d.ts +7 -1
- package/dist/components/inputs/KapiRating.js +39 -38
- package/dist/components/inputs/KapiSearchChip.js +5 -5
- package/dist/components/inputs/KapiSegmented.d.ts +13 -5
- package/dist/components/inputs/KapiSegmented.js +81 -77
- package/dist/components/inputs/KapiSelect.d.ts +9 -1
- package/dist/components/inputs/KapiSelect.js +236 -233
- package/dist/components/inputs/KapiSlider.d.ts +10 -3
- package/dist/components/inputs/KapiSlider.js +67 -63
- package/dist/components/inputs/KapiTagInput.d.ts +7 -1
- package/dist/components/inputs/KapiTagInput.js +70 -69
- package/dist/components/inputs/KapiTextarea.d.ts +7 -1
- package/dist/components/inputs/KapiTextarea.js +51 -50
- package/dist/components/inputs/copyLogic.d.ts +1 -0
- package/dist/components/inputs/copyLogic.js +12 -0
- package/dist/components/inputs/fieldLogic.d.ts +23 -3
- package/dist/components/inputs/fieldLogic.js +18 -11
- package/dist/components/inputs/index.d.ts +8 -0
- package/dist/components/inputs/inputLogic.d.ts +16 -1
- package/dist/components/inputs/inputLogic.js +3 -3
- package/dist/components/inputs/ownField.d.ts +3 -1
- package/dist/components/inputs/ownField.js +28 -27
- package/dist/components/inputs/pinInputLogic.d.ts +34 -0
- package/dist/components/inputs/pinInputLogic.js +37 -0
- package/dist/components/inputs/propsFormLogic.d.ts +53 -0
- package/dist/components/inputs/propsFormLogic.js +11 -0
- package/dist/components/inputs/segmentedLogic.d.ts +7 -0
- package/dist/components/inputs/segmentedLogic.js +2 -2
- package/dist/components/layout/KapiAccessCard.d.ts +5 -1
- package/dist/components/layout/KapiAccessCard.js +43 -39
- package/dist/components/layout/KapiAccountMenu.js +7 -7
- package/dist/components/layout/KapiCollapse.d.ts +39 -0
- package/dist/components/layout/KapiCollapse.js +20 -0
- package/dist/components/layout/KapiContextSlot.js +4 -4
- package/dist/components/layout/KapiDivider.d.ts +11 -2
- package/dist/components/layout/KapiDivider.js +30 -24
- package/dist/components/layout/KapiGrid.js +2 -2
- package/dist/components/layout/KapiNotificationBell.js +10 -10
- package/dist/components/layout/KapiPageHeader.js +22 -22
- package/dist/components/layout/KapiRail.js +4 -4
- package/dist/components/layout/KapiRoot.d.ts +22 -2
- package/dist/components/layout/KapiRoot.js +33 -29
- package/dist/components/layout/KapiShell.d.ts +9 -1
- package/dist/components/layout/KapiShell.js +28 -27
- package/dist/components/layout/accessCardLogic.d.ts +8 -1
- package/dist/components/layout/accessCardLogic.js +11 -7
- package/dist/components/layout/index.d.ts +2 -0
- package/dist/components/locale/labelRegistry.d.ts +10 -0
- package/dist/components/navigation/KapiAccordion.js +9 -9
- package/dist/components/navigation/KapiContextPanel.js +12 -12
- package/dist/components/navigation/KapiNavBadge.d.ts +6 -3
- package/dist/components/navigation/KapiNavBadge.js +26 -22
- package/dist/components/navigation/KapiTabs.js +9 -9
- package/dist/components/navigation/KapiToc.d.ts +48 -0
- package/dist/components/navigation/KapiToc.js +66 -0
- package/dist/components/navigation/KapiTree.js +10 -10
- package/dist/components/navigation/index.d.ts +3 -0
- package/dist/components/navigation/tocLogic.d.ts +35 -0
- package/dist/components/navigation/tocLogic.js +11 -0
- package/dist/components/navigation/tocSlots.d.ts +8 -0
- package/dist/components/navigation/tocSlots.js +11 -0
- package/dist/components/overlays/KapiCommandPalette.js +6 -6
- package/dist/components/overlays/KapiContextMenu.js +5 -5
- package/dist/components/overlays/KapiMenuButton.js +7 -7
- package/dist/components/overlays/KapiModal.js +3 -3
- package/dist/components/overlays/KapiOffcanvas.js +24 -24
- package/dist/components/overlays/KapiPhotoView.js +10 -10
- package/dist/components/overlays/KapiPopover.js +6 -6
- package/dist/components/overlays/KapiShapeSheet.js +4 -4
- package/dist/components/overlays/KapiTooltip.js +18 -18
- package/dist/components/overlays/menuList.js +22 -22
- package/dist/components/slotCatalog.d.ts +33 -0
- package/dist/components/slotCatalog.js +18 -10
- package/dist/css/base.css +1 -1
- package/dist/css/components/display/KapiAnnotation.css +1 -1
- package/dist/css/components/display/KapiCodeBlock.css +1 -0
- package/dist/css/components/display/KapiDiff.css +1 -0
- package/dist/css/components/display/display.css +1 -1
- package/dist/css/components/feedback/feedback.css +1 -1
- package/dist/css/components/inputs/KapiPinInput.css +1 -0
- package/dist/css/components/inputs/KapiSelect.css +1 -1
- package/dist/css/components/inputs/inputsExtra.css +1 -1
- package/dist/css/components/layout/KapiAccessCard.css +1 -1
- package/dist/css/components/layout/KapiCollapse.css +1 -0
- package/dist/css/components/layout/KapiDivider.css +1 -1
- package/dist/css/components/navigation/KapiToc.css +1 -0
- package/dist/hooks/asyncResourceLogic.d.ts +11 -0
- package/dist/hooks/asyncResourceLogic.js +4 -0
- package/dist/hooks/index.d.ts +3 -0
- package/dist/hooks/toneFamilyLogic.d.ts +26 -2
- package/dist/hooks/toneFamilyLogic.js +19 -6
- package/dist/hooks/useAsyncResource.d.ts +45 -0
- package/dist/hooks/useAsyncResource.js +24 -0
- package/dist/hooks/useKapiTheme.d.ts +8 -1
- package/dist/hooks/useKapiTheme.js +57 -57
- package/dist/hooks/useToneFamilies.d.ts +14 -4
- package/dist/hooks/useToneFamilies.js +27 -23
- package/dist/index.js +221 -207
- package/dist/kapi.css +1 -1
- package/dist/kapi.layered.css +1 -1
- package/dist/logic.d.ts +41 -0
- package/dist/logic.js +42 -0
- package/package.json +13 -2
|
@@ -1,180 +1,181 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import "#kapi-css/components/inputs/KapiDatePicker.css";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
3
|
+
import { useMergedRefs as e } from "../../hooks/mergeRefs.js";
|
|
4
|
+
import { useKapiLocale as t, useLabels as ee } from "../locale/KapiLocaleProvider.js";
|
|
5
|
+
import { activeHTMLElementOf as te } from "../../hooks/ownerDocument.js";
|
|
6
|
+
import { assignRef as ne, fieldControlProps as re, focusLeaves as ie, resolveReadOnly as ae } from "./fieldLogic.js";
|
|
7
|
+
import { useOwnField as oe } from "./ownField.js";
|
|
8
|
+
import { useControllableState as se } from "../../hooks/useControllableState.js";
|
|
9
|
+
import { resolveChipLabel as ce } from "./selectLogic.js";
|
|
10
|
+
import { useFormReset as le } from "../../hooks/useFormReset.js";
|
|
11
11
|
import { useOutsidePress as ue } from "../../hooks/useOutsidePress.js";
|
|
12
12
|
import { DEFAULT_CALENDAR_LABELS as n, calendarNames as de, chipFieldSize as fe, datePatternFor as pe, formDateValue as r, monthTitle as me, pickerIsChip as he } from "./datePickerLogic.js";
|
|
13
13
|
/* empty css */
|
|
14
14
|
import { KapiCalendarGrid as ge } from "./KapiCalendarGrid.js";
|
|
15
15
|
import { useCalendarFocus as _e } from "./useCalendarFocus.js";
|
|
16
16
|
import { useDatePopSide as ve } from "./useDatePopSide.js";
|
|
17
|
-
import { EMPTY_RANGE as i, formatRange as a, isCompleteRange as ye, maskRangeInput as be, openEndedDay as xe, parseRangeText as Se, pickRangeDay as Ce, rangeDayState as o, rangePlaceholder as we, sameRange as Te, validRange as
|
|
18
|
-
import { useId as
|
|
19
|
-
import { Fragment as
|
|
20
|
-
import { Calendar as
|
|
17
|
+
import { EMPTY_RANGE as i, formatRange as a, isCompleteRange as ye, maskRangeInput as be, openEndedDay as xe, parseRangeText as Se, pickRangeDay as Ce, rangeDayState as o, rangePlaceholder as we, sameRange as Te, validRange as s } from "./dateRangeLogic.js";
|
|
18
|
+
import { useId as Ee, useMemo as c, useRef as l, useState as u } from "react";
|
|
19
|
+
import { Fragment as De, jsx as d, jsxs as f } from "react/jsx-runtime";
|
|
20
|
+
import { Calendar as Oe, ChevronLeft as ke, ChevronRight as Ae } from "lucide-react";
|
|
21
21
|
//#region src/components/inputs/KapiDateRangePicker.tsx
|
|
22
|
-
var
|
|
22
|
+
var p = {
|
|
23
23
|
...n,
|
|
24
24
|
pickStart: "Elige la fecha de inicio",
|
|
25
25
|
pickEnd: "Elige la fecha de fin",
|
|
26
26
|
openEnd: "Desde esta fecha",
|
|
27
27
|
openStart: "Hasta esta fecha"
|
|
28
|
-
},
|
|
29
|
-
let
|
|
30
|
-
...
|
|
31
|
-
...de(
|
|
32
|
-
} :
|
|
33
|
-
variant:
|
|
34
|
-
icon:
|
|
35
|
-
chipLabel:
|
|
36
|
-
label:
|
|
37
|
-
}), { chipLabel:
|
|
38
|
-
chip:
|
|
39
|
-
chipLabel:
|
|
40
|
-
label:
|
|
41
|
-
}),
|
|
42
|
-
id:
|
|
43
|
-
label:
|
|
44
|
-
help:
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
28
|
+
}, je = (e) => `${e.from?.getTime() ?? ""}-${e.to?.getTime() ?? ""}`, m = ({ value: n, defaultValue: m, onChange: Me, placeholder: Ne, variant: Pe, icon: h, chipLabel: g, label: _, help: Fe, error: Ie, fieldClassName: Le, readOnly: v, disabled: y = !1, id: b, name: x, className: Re, style: ze, "aria-label": Be, labels: Ve, invalid: S, required: C, ref: He, onBlur: Ue, weekStartsOn: We }) => {
|
|
29
|
+
let w = t(), T = c(() => pe(w), [w]), E = Ne ?? we(T), Ge = c(() => w ? {
|
|
30
|
+
...p,
|
|
31
|
+
...de(w)
|
|
32
|
+
} : p, [w]), D = ee("calendar", Ge, Ve), O = he({
|
|
33
|
+
variant: Pe,
|
|
34
|
+
icon: h,
|
|
35
|
+
chipLabel: g,
|
|
36
|
+
label: _
|
|
37
|
+
}), { chipLabel: k, fieldLabel: Ke } = ce({
|
|
38
|
+
chip: O,
|
|
39
|
+
chipLabel: g,
|
|
40
|
+
label: _
|
|
41
|
+
}), A = oe({
|
|
42
|
+
id: b,
|
|
43
|
+
label: Ke,
|
|
44
|
+
help: Fe,
|
|
45
|
+
error: Ie,
|
|
46
|
+
required: C,
|
|
47
|
+
invalid: S,
|
|
48
|
+
readOnly: v,
|
|
48
49
|
fieldClassName: Le
|
|
49
|
-
}),
|
|
50
|
-
(
|
|
51
|
-
let
|
|
52
|
-
|
|
50
|
+
}), j = A.field, M = ae(v, j), qe = Ee(), N = b ?? j?.controlId ?? (O ? qe : void 0), [P, F] = u(!1), Je = n !== void 0, [I, Ye, , Xe] = se(n === void 0 ? void 0 : s(n), s(m ?? i), Me), [L, R] = u(I), [Ze, z] = u(null), [B, V] = u(() => a(I, T)), [H, U] = u(() => I.from ?? /* @__PURE__ */ new Date()), W = l(null), Qe = e(W, le(Xe)), G = l(null), K = l(null), { inputRef: $e, focusRequest: et, openFromKeyboard: q, openFromFocus: tt, returnFocus: J } = _e(F), Y = je(I), [nt, rt] = u(Y), [it, at] = u(T);
|
|
51
|
+
(nt !== Y || it !== T) && (rt(Y), at(T), R(I), V(a(I, T)), I.from && U(I.from));
|
|
52
|
+
let X = () => {
|
|
53
|
+
F(!1), R(I), z(null);
|
|
53
54
|
};
|
|
54
|
-
ue(
|
|
55
|
-
let e =
|
|
56
|
-
e &&
|
|
55
|
+
ue(P, [W], () => {
|
|
56
|
+
let e = te(W.current);
|
|
57
|
+
e && K.current?.contains(e) && e.blur(), X();
|
|
57
58
|
});
|
|
58
|
-
let
|
|
59
|
-
|
|
60
|
-
let t =
|
|
61
|
-
|
|
62
|
-
},
|
|
63
|
-
let e = Se(
|
|
64
|
-
e === null ? (
|
|
59
|
+
let Z = (e) => {
|
|
60
|
+
Ye(e);
|
|
61
|
+
let t = Je ? I : e;
|
|
62
|
+
R(t), V(a(t, T));
|
|
63
|
+
}, ot = () => {
|
|
64
|
+
let e = Se(B, T);
|
|
65
|
+
e === null ? (I.from || I.to) && Z(i) : e === void 0 ? V(a(I, T)) : (Te(e, I) ? V(a(e, T)) : Z(e), e.from && U(e.from));
|
|
66
|
+
}, st = (e) => {
|
|
67
|
+
let t = Ce(L, e);
|
|
68
|
+
z(null), ye(t) ? (Z(t), J()) : R(t);
|
|
65
69
|
}, ct = (e) => {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
L(null), Y(e), K();
|
|
70
|
-
}, Z = (e) => V(new Date(B.getFullYear(), B.getMonth() + e, 1)), Q = !!F.from && !F.to, $ = xe(F), lt = ve(M && !v && !A, U, W);
|
|
71
|
-
return O.wrap(/* @__PURE__ */ d("div", {
|
|
70
|
+
z(null), Z(e), J();
|
|
71
|
+
}, lt = (e) => U(new Date(H.getFullYear(), H.getMonth() + e, 1)), Q = !!L.from && !L.to, $ = xe(L), ut = ve(P && !y && !M, G, K);
|
|
72
|
+
return A.wrap(/* @__PURE__ */ f("div", {
|
|
72
73
|
className: [
|
|
73
74
|
"kapi-dp",
|
|
74
75
|
"kapi-dp--range",
|
|
75
|
-
|
|
76
|
-
|
|
76
|
+
O && "kapi-dp--chip",
|
|
77
|
+
M && "kapi-dp--readonly",
|
|
77
78
|
Re
|
|
78
79
|
].filter(Boolean).join(" "),
|
|
79
80
|
style: ze,
|
|
80
|
-
ref:
|
|
81
|
+
ref: Qe,
|
|
81
82
|
onBlur: (e) => {
|
|
82
|
-
|
|
83
|
+
ie(e.relatedTarget, e.currentTarget) && Ue?.(e);
|
|
83
84
|
},
|
|
84
85
|
children: [
|
|
85
|
-
/* @__PURE__ */
|
|
86
|
-
className: ["kapi-dp__field",
|
|
87
|
-
ref:
|
|
86
|
+
/* @__PURE__ */ f("div", {
|
|
87
|
+
className: ["kapi-dp__field", O && "kapi-filterchip"].filter(Boolean).join(" "),
|
|
88
|
+
ref: G,
|
|
88
89
|
children: [
|
|
89
|
-
|
|
90
|
-
|
|
90
|
+
O && h,
|
|
91
|
+
k && /* @__PURE__ */ f("label", {
|
|
91
92
|
className: "kapi-dp__label",
|
|
92
|
-
htmlFor:
|
|
93
|
-
children: [
|
|
93
|
+
htmlFor: N,
|
|
94
|
+
children: [k, ":"]
|
|
94
95
|
}),
|
|
95
|
-
/* @__PURE__ */
|
|
96
|
-
ref: (
|
|
97
|
-
|
|
96
|
+
/* @__PURE__ */ d("input", {
|
|
97
|
+
ref: (e) => {
|
|
98
|
+
$e.current = e, ne(He, e);
|
|
98
99
|
},
|
|
99
|
-
...
|
|
100
|
-
id:
|
|
101
|
-
invalid:
|
|
102
|
-
required:
|
|
100
|
+
...re(j, {
|
|
101
|
+
id: N,
|
|
102
|
+
invalid: S,
|
|
103
|
+
required: C
|
|
103
104
|
}),
|
|
104
|
-
...
|
|
105
|
+
...O ? { size: fe(E) } : {},
|
|
105
106
|
className: "kapi-input kapi-dp__input",
|
|
106
|
-
value:
|
|
107
|
-
placeholder:
|
|
108
|
-
disabled:
|
|
109
|
-
readOnly:
|
|
107
|
+
value: B,
|
|
108
|
+
placeholder: E,
|
|
109
|
+
disabled: y,
|
|
110
|
+
readOnly: M || void 0,
|
|
110
111
|
"aria-label": Be,
|
|
111
112
|
autoComplete: "off",
|
|
112
113
|
inputMode: "numeric",
|
|
113
|
-
onChange: (e) =>
|
|
114
|
-
onFocus:
|
|
115
|
-
onBlur:
|
|
114
|
+
onChange: (e) => V(be(e.target.value, T)),
|
|
115
|
+
onFocus: M ? void 0 : tt,
|
|
116
|
+
onBlur: ot,
|
|
116
117
|
onKeyDown: (e) => {
|
|
117
|
-
e.key === "Escape" &&
|
|
118
|
+
e.key === "Escape" && P && (e.preventDefault(), e.stopPropagation(), X()), e.key === "ArrowDown" && !M && (e.preventDefault(), q());
|
|
118
119
|
}
|
|
119
120
|
}),
|
|
120
|
-
/* @__PURE__ */
|
|
121
|
+
/* @__PURE__ */ d("button", {
|
|
121
122
|
type: "button",
|
|
122
123
|
className: "kapi-dp__toggle",
|
|
123
|
-
disabled:
|
|
124
|
-
"aria-label":
|
|
125
|
-
"aria-expanded":
|
|
126
|
-
onClick: () =>
|
|
127
|
-
children: /* @__PURE__ */
|
|
124
|
+
disabled: y || M,
|
|
125
|
+
"aria-label": D.openPicker,
|
|
126
|
+
"aria-expanded": P,
|
|
127
|
+
onClick: () => P ? X() : q(),
|
|
128
|
+
children: /* @__PURE__ */ d(Oe, {
|
|
128
129
|
size: 16,
|
|
129
130
|
strokeWidth: 1.9
|
|
130
131
|
})
|
|
131
132
|
})
|
|
132
133
|
]
|
|
133
134
|
}),
|
|
134
|
-
|
|
135
|
+
x && /* @__PURE__ */ f(De, { children: [/* @__PURE__ */ d("input", {
|
|
135
136
|
type: "hidden",
|
|
136
|
-
name: `${
|
|
137
|
-
value: r(
|
|
138
|
-
disabled:
|
|
139
|
-
}), /* @__PURE__ */
|
|
137
|
+
name: `${x}.from`,
|
|
138
|
+
value: r(I.from, "date"),
|
|
139
|
+
disabled: y
|
|
140
|
+
}), /* @__PURE__ */ d("input", {
|
|
140
141
|
type: "hidden",
|
|
141
|
-
name: `${
|
|
142
|
-
value: r(
|
|
143
|
-
disabled:
|
|
142
|
+
name: `${x}.to`,
|
|
143
|
+
value: r(I.to, "date"),
|
|
144
|
+
disabled: y
|
|
144
145
|
})] }),
|
|
145
|
-
|
|
146
|
-
ref:
|
|
147
|
-
className: `kapi-dp__pop${
|
|
146
|
+
P && !y && !M && /* @__PURE__ */ d("div", {
|
|
147
|
+
ref: K,
|
|
148
|
+
className: `kapi-dp__pop${ut === "top" ? " kapi-dp__pop--up" : ""}`,
|
|
148
149
|
onKeyDown: (e) => {
|
|
149
|
-
e.key === "Escape" && (e.preventDefault(),
|
|
150
|
+
e.key === "Escape" && (e.preventDefault(), X(), J());
|
|
150
151
|
},
|
|
151
|
-
children: /* @__PURE__ */
|
|
152
|
+
children: /* @__PURE__ */ f("div", {
|
|
152
153
|
className: "kapi-dp__cal",
|
|
153
154
|
children: [
|
|
154
|
-
/* @__PURE__ */
|
|
155
|
+
/* @__PURE__ */ f("div", {
|
|
155
156
|
className: "kapi-dp__head",
|
|
156
157
|
children: [
|
|
157
|
-
/* @__PURE__ */
|
|
158
|
+
/* @__PURE__ */ d("button", {
|
|
158
159
|
type: "button",
|
|
159
160
|
className: "kapi-dp__nav",
|
|
160
|
-
"aria-label":
|
|
161
|
-
onClick: () =>
|
|
162
|
-
children: /* @__PURE__ */
|
|
161
|
+
"aria-label": D.prevMonth,
|
|
162
|
+
onClick: () => lt(-1),
|
|
163
|
+
children: /* @__PURE__ */ d(ke, {
|
|
163
164
|
className: "kapi-flip-rtl",
|
|
164
165
|
size: 15,
|
|
165
166
|
strokeWidth: 2.2
|
|
166
167
|
})
|
|
167
168
|
}),
|
|
168
|
-
/* @__PURE__ */
|
|
169
|
+
/* @__PURE__ */ d("span", {
|
|
169
170
|
className: "kapi-dp__title",
|
|
170
|
-
children: me(
|
|
171
|
+
children: me(H, D.months)
|
|
171
172
|
}),
|
|
172
|
-
/* @__PURE__ */
|
|
173
|
+
/* @__PURE__ */ d("button", {
|
|
173
174
|
type: "button",
|
|
174
175
|
className: "kapi-dp__nav",
|
|
175
|
-
"aria-label":
|
|
176
|
-
onClick: () =>
|
|
177
|
-
children: /* @__PURE__ */
|
|
176
|
+
"aria-label": D.nextMonth,
|
|
177
|
+
onClick: () => lt(1),
|
|
178
|
+
children: /* @__PURE__ */ d(Ae, {
|
|
178
179
|
className: "kapi-flip-rtl",
|
|
179
180
|
size: 15,
|
|
180
181
|
strokeWidth: 2.2
|
|
@@ -182,56 +183,56 @@ var f = {
|
|
|
182
183
|
})
|
|
183
184
|
]
|
|
184
185
|
}),
|
|
185
|
-
/* @__PURE__ */
|
|
186
|
-
weekStartsOn:
|
|
187
|
-
view:
|
|
188
|
-
onViewChange:
|
|
189
|
-
labels:
|
|
190
|
-
focusTarget:
|
|
191
|
-
focusRequest:
|
|
192
|
-
isSelected: (e) => o(e,
|
|
186
|
+
/* @__PURE__ */ d(ge, {
|
|
187
|
+
weekStartsOn: We,
|
|
188
|
+
view: H,
|
|
189
|
+
onViewChange: U,
|
|
190
|
+
labels: D,
|
|
191
|
+
focusTarget: L.from,
|
|
192
|
+
focusRequest: et,
|
|
193
|
+
isSelected: (e) => o(e, L, null) !== null,
|
|
193
194
|
dayClassName: (e) => {
|
|
194
|
-
let t = o(e,
|
|
195
|
+
let t = o(e, L, Q ? Ze : null);
|
|
195
196
|
return [(t === "start" || t === "end" || t === "single") && "kapi-dp__day--sel", t && `kapi-dp__day--${t}`].filter(Boolean).join(" ");
|
|
196
197
|
},
|
|
197
|
-
onPick:
|
|
198
|
+
onPick: st,
|
|
198
199
|
onDayHover: (e) => {
|
|
199
|
-
e === null ?
|
|
200
|
+
e === null ? z(null) : Q && z(e);
|
|
200
201
|
}
|
|
201
202
|
}),
|
|
202
|
-
/* @__PURE__ */
|
|
203
|
+
/* @__PURE__ */ f("div", {
|
|
203
204
|
className: "kapi-dp__foot",
|
|
204
|
-
children: [/* @__PURE__ */
|
|
205
|
+
children: [/* @__PURE__ */ d("button", {
|
|
205
206
|
type: "button",
|
|
206
207
|
className: "kapi-dp__link",
|
|
207
208
|
onClick: () => {
|
|
208
|
-
|
|
209
|
+
Z(i), F(!1);
|
|
209
210
|
},
|
|
210
|
-
children:
|
|
211
|
-
}), /* @__PURE__ */
|
|
211
|
+
children: D.clear
|
|
212
|
+
}), /* @__PURE__ */ d("span", {
|
|
212
213
|
className: "kapi-dp__hint",
|
|
213
214
|
"aria-live": "polite",
|
|
214
|
-
children: Q ?
|
|
215
|
+
children: Q ? D.pickEnd : D.pickStart
|
|
215
216
|
})]
|
|
216
217
|
}),
|
|
217
|
-
$ && /* @__PURE__ */
|
|
218
|
+
$ && /* @__PURE__ */ f("div", {
|
|
218
219
|
className: "kapi-dp__open",
|
|
219
|
-
children: [/* @__PURE__ */
|
|
220
|
+
children: [/* @__PURE__ */ d("button", {
|
|
220
221
|
type: "button",
|
|
221
222
|
className: "kapi-dp__link",
|
|
222
|
-
onClick: () =>
|
|
223
|
+
onClick: () => ct({
|
|
223
224
|
from: $,
|
|
224
225
|
to: null
|
|
225
226
|
}),
|
|
226
|
-
children:
|
|
227
|
-
}), /* @__PURE__ */
|
|
227
|
+
children: D.openEnd
|
|
228
|
+
}), /* @__PURE__ */ d("button", {
|
|
228
229
|
type: "button",
|
|
229
230
|
className: "kapi-dp__link",
|
|
230
|
-
onClick: () =>
|
|
231
|
+
onClick: () => ct({
|
|
231
232
|
from: null,
|
|
232
233
|
to: $
|
|
233
234
|
}),
|
|
234
|
-
children:
|
|
235
|
+
children: D.openStart
|
|
235
236
|
})]
|
|
236
237
|
})
|
|
237
238
|
]
|
|
@@ -241,4 +242,4 @@ var f = {
|
|
|
241
242
|
}));
|
|
242
243
|
};
|
|
243
244
|
//#endregion
|
|
244
|
-
export {
|
|
245
|
+
export { p as DEFAULT_DATE_RANGE_LABELS, m as KapiDateRangePicker };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import "#kapi-css/components/inputs/KapiFacetedSearch.css";
|
|
3
3
|
import { joinClasses as e } from "../rootProps.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
4
|
+
import { useMergedRefs as t } from "../../hooks/mergeRefs.js";
|
|
5
|
+
import { useLabels as ee } from "../locale/KapiLocaleProvider.js";
|
|
6
|
+
import { enabledIndexes as n, nextEnabledIndex as r } from "../overlays/menuKeyboardLogic.js";
|
|
7
7
|
import { useAsyncLoader as te } from "../../hooks/useAsyncLoader.js";
|
|
8
8
|
import { KapiDatePicker as ne } from "./KapiDatePicker.js";
|
|
9
9
|
import { KapiDateRangePicker as re } from "./KapiDateRangePicker.js";
|
|
@@ -40,7 +40,7 @@ var p = {
|
|
|
40
40
|
operatorLte: "menor o igual que"
|
|
41
41
|
};
|
|
42
42
|
function m({ facets: m, chips: h, onText: fe, onClearAll: g, loadDelay: pe = 300, reloadKey: me, labels: he, className: ge, onMouseDown: _e, "aria-label": _, ref: ve, ...v }) {
|
|
43
|
-
let y =
|
|
43
|
+
let y = ee("facetedSearch", p, he), b = s(), x = `${b}-list`, S = c(null), ye = t(S, ve), C = c(null), w = c(null), [T, E] = l(""), [D, O] = l(null), [k, A] = l(null), [j, M] = l(!1), [N, P] = l(-1), F = T.trim(), I = !!D && a(D).length >= 2 && k === null, L = D?.kind === "text" && !I, R = typeof D?.loadOptions == "function" && D.kind !== "text" && !I, z = {
|
|
44
44
|
eq: y.operatorEq,
|
|
45
45
|
ne: y.operatorNe,
|
|
46
46
|
contains: y.operatorContains,
|
|
@@ -88,7 +88,7 @@ function m({ facets: m, chips: h, onText: fe, onClearAll: g, loadDelay: pe = 300
|
|
|
88
88
|
if (t) switch (e.preventDefault(), t) {
|
|
89
89
|
case "next":
|
|
90
90
|
case "prev":
|
|
91
|
-
M(!0), P((e) =>
|
|
91
|
+
M(!0), P((e) => r(G ? e : -1, t, n(W.length)));
|
|
92
92
|
break;
|
|
93
93
|
case "select": {
|
|
94
94
|
let e = W[N];
|
|
@@ -17,6 +17,14 @@ export type KapiFieldProps = Omit<HTMLAttributes<HTMLDivElement>, "children"> &
|
|
|
17
17
|
required?: boolean | undefined;
|
|
18
18
|
/** Texto de ayuda / error bajo el control. */
|
|
19
19
|
help?: ReactNode | undefined;
|
|
20
|
+
/**
|
|
21
|
+
* El motivo por el que el campo está mal. Reemplaza a `help` y marca el campo inválido: se pinta en
|
|
22
|
+
* rojo, con ícono y `role="alert"`. Es lo que entregan las librerías de formularios (un mensaje, no
|
|
23
|
+
* un booleano), así que evita escribir `invalid={Boolean(e)} help={e ?? "pista"}` en cada campo y
|
|
24
|
+
* que las dos props se desincronicen dejando un campo rojo sin motivo visible. Un error que React no
|
|
25
|
+
* pinta (`true`, `""`, `null`) no marca nada. Gana sobre `invalid` y `status`.
|
|
26
|
+
*/
|
|
27
|
+
error?: ReactNode | undefined;
|
|
20
28
|
/** `id` del texto de ayuda. Opcional: sin él se deriva del id del control. */
|
|
21
29
|
helpId?: string | undefined;
|
|
22
30
|
/**
|
|
@@ -46,4 +54,4 @@ export declare const helpClasses: (status?: KapiFieldStatus) => string;
|
|
|
46
54
|
* Los controles del design system que van adentro toman del contexto su id, la ayuda (`aria-describedby`),
|
|
47
55
|
* `aria-invalid` y `aria-required`; no hace falta cablear ids a mano.
|
|
48
56
|
*/
|
|
49
|
-
export declare const KapiField: ({ label, htmlFor, required, help, helpId: helpIdProp, invalid: invalidProp, status: statusProp, readOnly, className, children, ...rest }: KapiFieldProps) => import("react").JSX.Element;
|
|
57
|
+
export declare const KapiField: ({ label, htmlFor, required, help: helpProp, error, helpId: helpIdProp, invalid: invalidProp, status: statusProp, readOnly, className, children, ...rest }: KapiFieldProps) => import("react").JSX.Element;
|
|
@@ -1,63 +1,64 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
2
|
+
import { present as e } from "./inputLogic.js";
|
|
3
|
+
import { fieldContextValue as t, fieldIds as n, resolveFieldMessage as r } from "./fieldLogic.js";
|
|
4
|
+
import { createContext as i, useContext as a, useId as o, useMemo as s } from "react";
|
|
5
|
+
import { jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
6
|
+
import { AlertTriangle as u, CheckCircle2 as d, LoaderCircle as f } from "lucide-react";
|
|
6
7
|
//#region src/components/inputs/KapiField.tsx
|
|
7
|
-
var
|
|
8
|
-
let
|
|
9
|
-
htmlFor:
|
|
10
|
-
autoId:
|
|
11
|
-
helpId:
|
|
12
|
-
hasHelp:
|
|
13
|
-
}),
|
|
14
|
-
controlId:
|
|
15
|
-
labelId:
|
|
16
|
-
helpId:
|
|
17
|
-
required:
|
|
18
|
-
status:
|
|
19
|
-
readOnly:
|
|
8
|
+
var p = i(null), m = () => a(p), h = (e = "") => ["kapi-field", e].filter(Boolean).join(" "), g = (e) => ["kapi-help", e && `kapi-help--${e}`].filter(Boolean).join(" "), _ = ({ label: i, htmlFor: a, required: m = !1, help: _, error: v, helpId: y, invalid: b, status: x, readOnly: S, className: C, children: w, ...T }) => {
|
|
9
|
+
let E = o(), { message: D, status: O } = r(v, _, b, x), k = e(D), { controlId: A, labelId: j, helpId: M } = n({
|
|
10
|
+
htmlFor: a,
|
|
11
|
+
autoId: E,
|
|
12
|
+
helpId: y,
|
|
13
|
+
hasHelp: k
|
|
14
|
+
}), N = i != null, P = s(() => t({
|
|
15
|
+
controlId: A,
|
|
16
|
+
labelId: N ? j : void 0,
|
|
17
|
+
helpId: M,
|
|
18
|
+
required: m,
|
|
19
|
+
status: O,
|
|
20
|
+
readOnly: S
|
|
20
21
|
}), [
|
|
21
|
-
E,
|
|
22
|
-
D,
|
|
23
22
|
A,
|
|
23
|
+
j,
|
|
24
|
+
N,
|
|
25
|
+
M,
|
|
26
|
+
m,
|
|
24
27
|
O,
|
|
25
|
-
|
|
26
|
-
k,
|
|
27
|
-
b
|
|
28
|
+
S
|
|
28
29
|
]);
|
|
29
|
-
return /* @__PURE__ */
|
|
30
|
-
value:
|
|
31
|
-
children: /* @__PURE__ */
|
|
32
|
-
...
|
|
33
|
-
className:
|
|
30
|
+
return /* @__PURE__ */ c(p.Provider, {
|
|
31
|
+
value: P,
|
|
32
|
+
children: /* @__PURE__ */ l("div", {
|
|
33
|
+
...T,
|
|
34
|
+
className: h(C),
|
|
34
35
|
children: [
|
|
35
|
-
|
|
36
|
-
id:
|
|
37
|
-
htmlFor:
|
|
38
|
-
children: [
|
|
36
|
+
i != null && /* @__PURE__ */ l("label", {
|
|
37
|
+
id: j,
|
|
38
|
+
htmlFor: A,
|
|
39
|
+
children: [i, m && " *"]
|
|
39
40
|
}),
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
id:
|
|
43
|
-
className:
|
|
44
|
-
role:
|
|
45
|
-
"aria-live":
|
|
41
|
+
w,
|
|
42
|
+
k ? /* @__PURE__ */ l("span", {
|
|
43
|
+
id: M,
|
|
44
|
+
className: g(O),
|
|
45
|
+
role: O === "err" ? "alert" : void 0,
|
|
46
|
+
"aria-live": O === "pending" ? "polite" : void 0,
|
|
46
47
|
children: [
|
|
47
|
-
|
|
48
|
+
O === "ok" && /* @__PURE__ */ c(d, {
|
|
48
49
|
size: 13,
|
|
49
50
|
strokeWidth: 2.2
|
|
50
51
|
}),
|
|
51
|
-
|
|
52
|
+
O === "err" && /* @__PURE__ */ c(u, {
|
|
52
53
|
size: 13,
|
|
53
54
|
strokeWidth: 2.2
|
|
54
55
|
}),
|
|
55
|
-
|
|
56
|
+
O === "pending" && /* @__PURE__ */ c(f, {
|
|
56
57
|
size: 13,
|
|
57
58
|
strokeWidth: 2.2,
|
|
58
59
|
className: "kapi-spinner"
|
|
59
60
|
}),
|
|
60
|
-
|
|
61
|
+
D
|
|
61
62
|
]
|
|
62
63
|
}) : null
|
|
63
64
|
]
|
|
@@ -65,4 +66,4 @@ var f = r(null), p = () => i(f), m = (e = "") => ["kapi-field", e].filter(Boolea
|
|
|
65
66
|
});
|
|
66
67
|
};
|
|
67
68
|
//#endregion
|
|
68
|
-
export {
|
|
69
|
+
export { _ as KapiField, h as fieldClasses, g as helpClasses, m as useKapiField };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import "#kapi-css/components/inputs/KapiFileUpload.css";
|
|
3
3
|
import { joinClasses as e } from "../rootProps.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
4
|
+
import { useLabels as t } from "../locale/KapiLocaleProvider.js";
|
|
5
|
+
import { fieldControlProps as n, joinIds as r } from "./fieldLogic.js";
|
|
6
|
+
import { useKapiField as i } from "./KapiField.js";
|
|
7
7
|
import { formatFileSize as a, isActivationKey as o, matchesAccept as s, mergeFiles as c, removeFileAt as l } from "./fileUploadLogic.js";
|
|
8
8
|
/* empty css */
|
|
9
9
|
import { useEffect as u, useId as d, useRef as f, useState as p } from "react";
|
|
@@ -16,9 +16,9 @@ var y = {
|
|
|
16
16
|
remove: "Quitar",
|
|
17
17
|
hint: "PDF, JPG, PNG · hasta 10MB"
|
|
18
18
|
}, b = ({ multiple: b = !0, accept: x, hint: S, onChange: C, disabled: w = !1, className: T, style: E, labels: D, name: O, id: k, onBlur: A, invalid: j, "aria-describedby": M, ref: N }) => {
|
|
19
|
-
let P =
|
|
19
|
+
let P = t("fileUpload", y, D), F = S ?? P.hint, I = i(), [L, R] = p([]), [z, B] = p(!1), V = f(null), H = d(), U = `${H}-title`, W = `${H}-hint`, G = !!I?.labelId, K = n(I, {
|
|
20
20
|
id: k,
|
|
21
|
-
describedBy:
|
|
21
|
+
describedBy: r(G && W, M),
|
|
22
22
|
invalid: j
|
|
23
23
|
});
|
|
24
24
|
u(() => {
|
|
@@ -42,7 +42,7 @@ var y = {
|
|
|
42
42
|
id: K.id,
|
|
43
43
|
"aria-describedby": K["aria-describedby"],
|
|
44
44
|
"aria-invalid": K["aria-invalid"],
|
|
45
|
-
"aria-labelledby": G ?
|
|
45
|
+
"aria-labelledby": G ? r(I?.labelId, U) : void 0,
|
|
46
46
|
onBlur: A,
|
|
47
47
|
className: `kapi-upload${z ? " is-over" : ""}`,
|
|
48
48
|
onClick: Y,
|
|
@@ -10,7 +10,14 @@ type KapiInputOwnProps = {
|
|
|
10
10
|
invalid?: boolean | undefined;
|
|
11
11
|
/** Validación no erróneo: borde verde (`ok`) u ocupado (`pending`). El valor `err` está deprecado: usa `invalid`. */
|
|
12
12
|
status?: KapiFieldStatus | undefined;
|
|
13
|
-
/**
|
|
13
|
+
/**
|
|
14
|
+
* Angosto y centrado (notas, cantidades en celdas).
|
|
15
|
+
*
|
|
16
|
+
* **Es sólo la FORMA, no el comportamiento**: no valida, no limita, no pone flechas y no cambia
|
|
17
|
+
* el `type`. Para un campo numérico de verdad —con − / +, mínimo, máximo y ajuste al salir— va
|
|
18
|
+
* `KapiNumberStepper`. El nombre corto se presta a confusión y ya costó un error en una
|
|
19
|
+
* migración real.
|
|
20
|
+
*/
|
|
14
21
|
num?: boolean | undefined;
|
|
15
22
|
/** Etiqueta. Si hay `label` o `help`, el control se envuelve en un `KapiField`. */
|
|
16
23
|
label?: ReactNode | undefined;
|
|
@@ -18,6 +25,12 @@ type KapiInputOwnProps = {
|
|
|
18
25
|
required?: boolean | undefined;
|
|
19
26
|
/** Ayuda / mensaje de error bajo el control (toma el color de `invalid` o `status`). */
|
|
20
27
|
help?: ReactNode | undefined;
|
|
28
|
+
/**
|
|
29
|
+
* El motivo por el que el campo está mal. Reemplaza a `help` y lo marca inválido (rojo, ícono y
|
|
30
|
+
* `role="alert"`). Es lo que entregan las librerías de formularios: un mensaje, no un booleano.
|
|
31
|
+
* Un error que React no pinta (`true`, `""`, `null`) no marca nada. Gana sobre `invalid` y `status`.
|
|
32
|
+
*/
|
|
33
|
+
error?: ReactNode | undefined;
|
|
21
34
|
/** Clase del `KapiField` contenedor (si lo hay). `className` va al control. */
|
|
22
35
|
fieldClassName?: string | undefined;
|
|
23
36
|
};
|
|
@@ -25,6 +38,10 @@ type KapiInputOwnProps = {
|
|
|
25
38
|
export type KapiInputLabels = {
|
|
26
39
|
/** `aria-label` del botón de limpiar. */
|
|
27
40
|
clear: string;
|
|
41
|
+
/** Nombre del botón del ojo cuando la contraseña está oculta (ver `reveal`). */
|
|
42
|
+
show: string;
|
|
43
|
+
/** Nombre del botón del ojo cuando la contraseña está a la vista. */
|
|
44
|
+
hide: string;
|
|
28
45
|
};
|
|
29
46
|
export declare const DEFAULT_INPUT_LABELS: KapiInputLabels;
|
|
30
47
|
/**
|
|
@@ -42,6 +59,17 @@ type KapiInputAdornmentProps = {
|
|
|
42
59
|
suffix?: ReactNode;
|
|
43
60
|
/** Botón para vaciar el campo; aparece sólo con valor. Dispara `onChange` con `""` y deja el foco en el input. */
|
|
44
61
|
clearable?: boolean | undefined;
|
|
62
|
+
/**
|
|
63
|
+
* Ojo para ver y tapar la contraseña. Va con `type="password"`.
|
|
64
|
+
*
|
|
65
|
+
* **Se alcanza con Tab, a diferencia del botón de limpiar.** Ese se deja fuera del tabulador
|
|
66
|
+
* porque tiene alternativa —seleccionar todo y borrar—; el ojo no tiene ninguna, y quien escribe
|
|
67
|
+
* con el teclado y quiere revisar lo que tipeó se quedaría sin forma de hacerlo. Anuncia su
|
|
68
|
+
* estado con `aria-pressed` y cambia de nombre (`show` / `hide` del locale).
|
|
69
|
+
*
|
|
70
|
+
* No se guarda nada: al volver a montar el campo, la contraseña arranca tapada.
|
|
71
|
+
*/
|
|
72
|
+
reveal?: boolean | undefined;
|
|
45
73
|
/** Avisa que se limpió (además del `onChange`). */
|
|
46
74
|
onClear?: (() => void) | undefined;
|
|
47
75
|
/**
|