@william-callao/antonella-ui 1.3.0 → 2.0.1
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/dist/index.d.ts +278 -16
- package/dist/index.js +3809 -2401
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import React__default, { ComponentType, ReactNode, ReactElement } from 'react';
|
|
3
|
-
import { StyleProp, ViewStyle, PressableProps, ViewProps, TextStyle, TextInputProps, KeyboardTypeOptions, TextProps as TextProps$1, ScrollViewProps } from 'react-native';
|
|
3
|
+
import { StyleProp, ViewStyle, PressableProps, ViewProps, TextStyle, TextInputProps, View, KeyboardTypeOptions, TextProps as TextProps$1, ScrollViewProps } from 'react-native';
|
|
4
4
|
import { DashboardShellTokens, LayoutRowSize, LayoutColumnSize, TextType } from '@william-callao/antonella-theme';
|
|
5
5
|
export { LayoutColumnSize, LayoutRowSize } from '@william-callao/antonella-theme';
|
|
6
6
|
import { SharedValue } from 'react-native-reanimated';
|
|
@@ -50,7 +50,7 @@ interface CardTitleProps {
|
|
|
50
50
|
}
|
|
51
51
|
declare function CardTitle({ title, subtitle, style }: CardTitleProps): React__default.JSX.Element;
|
|
52
52
|
|
|
53
|
-
type IconName = "home" | "home-filled" | "mail" | "mail-filled" | "calendar" | "calendar-filled" | "bar-chart" | "bar-chart-filled" | "cart" | "settings" | "settings-filled" | "user" | "user-filled" | "search" | "clipboard" | "clipboard-filled" | "checklist" | "checklist-filled" | "menu" | "close" | "chevron-down" | "chevron-forward" | "chevron-back" | "arrow-back" | "arrow-forward" | "arrow-down" | "arrow-up" | "arrow-up-filled" | "add" | "checkmark" | "pencil" | "trash" | "chevron-up" | "alert-circle" | "checkmark-circle" | "information-circle" | "notifications" | "notifications-filled" | "more-horizontal" | "more-vertical" | "log-in" | "log-out" | "git-network" | "construct" | "chatbubble" | "camera" | "time" | "analytics" | "barn" | "barn-filled" | "farm" | "farm-filled" | "people" | "people-filled" | "document-text" | "document-text-filled" | "backspace" | "palette" | "folder" | "folder-open" | "file" | "loader" | "inbox" | "triangle-alert" | "eye" | "eye-off" | "flash" | "flash-off" | "torch" | "torch-off" | "flip-camera" | "scan" | "tag" | "tag-filled";
|
|
53
|
+
type IconName = "home" | "home-filled" | "mail" | "mail-filled" | "calendar" | "calendar-filled" | "bar-chart" | "bar-chart-filled" | "cart" | "settings" | "settings-filled" | "user" | "user-filled" | "search" | "clipboard" | "clipboard-filled" | "checklist" | "checklist-filled" | "menu" | "close" | "chevron-down" | "chevron-forward" | "chevron-back" | "arrow-back" | "arrow-forward" | "arrow-down" | "arrow-up" | "arrow-up-filled" | "add" | "checkmark" | "pencil" | "trash" | "chevron-up" | "alert-circle" | "checkmark-circle" | "information-circle" | "notifications" | "notifications-filled" | "more-horizontal" | "more-vertical" | "log-in" | "log-out" | "git-network" | "construct" | "chatbubble" | "camera" | "time" | "analytics" | "barn" | "barn-filled" | "farm" | "farm-filled" | "people" | "people-filled" | "document-text" | "document-text-filled" | "backspace" | "palette" | "folder" | "folder-open" | "file" | "loader" | "lock" | "inbox" | "triangle-alert" | "eye" | "eye-off" | "flash" | "flash-off" | "torch" | "torch-off" | "flip-camera" | "scan" | "tag" | "tag-filled";
|
|
54
54
|
declare const iconMap: Record<IconName, ComponentType<{
|
|
55
55
|
size?: number;
|
|
56
56
|
color?: string;
|
|
@@ -75,11 +75,14 @@ type ChipProps = {
|
|
|
75
75
|
size?: ChipSize;
|
|
76
76
|
icon?: IconName;
|
|
77
77
|
uppercase?: boolean;
|
|
78
|
+
/** Marca el chip como seleccionado para el lector de pantalla (filtros,
|
|
79
|
+
* selectores). El estilo visual lo define el caller con `variant`/`color`. */
|
|
80
|
+
selected?: boolean;
|
|
78
81
|
style?: StyleProp<ViewStyle>;
|
|
79
82
|
textStyle?: StyleProp<TextStyle>;
|
|
80
83
|
onPress?: () => void;
|
|
81
84
|
};
|
|
82
|
-
declare function Chip({ label, color, backgroundColor, variant, size, icon, uppercase, style, textStyle, onPress, }: ChipProps): React__default.JSX.Element;
|
|
85
|
+
declare function Chip({ label, color, backgroundColor, variant, size, icon, uppercase, selected, style, textStyle, onPress, }: ChipProps): React__default.JSX.Element;
|
|
83
86
|
|
|
84
87
|
declare enum ItemStyle {
|
|
85
88
|
DEFAULT = "DEFAULT",
|
|
@@ -120,10 +123,29 @@ type ChipTabsProps = {
|
|
|
120
123
|
};
|
|
121
124
|
declare function ChipTabs({ options, selected: controlledSelected, onSelect, style, fullWidth, }: ChipTabsProps): React__default.JSX.Element;
|
|
122
125
|
|
|
126
|
+
type AppStepIndicatorProps = {
|
|
127
|
+
/** Paso actual, 1-based. */
|
|
128
|
+
current: number;
|
|
129
|
+
/** Cantidad total de pasos. */
|
|
130
|
+
total: number;
|
|
131
|
+
/** Texto del chip, p. ej. "Paso 2 de 3". */
|
|
132
|
+
label: string;
|
|
133
|
+
/** Nombre corto del paso actual, p. ej. "Descripción". */
|
|
134
|
+
caption?: string;
|
|
135
|
+
style?: StyleProp<ViewStyle>;
|
|
136
|
+
};
|
|
137
|
+
/**
|
|
138
|
+
* Indicador compacto de un flujo por pasos. El chip comunica el avance y el
|
|
139
|
+
* caption opcional dice en qué paso está el usuario sin ocupar una fila extra.
|
|
140
|
+
*/
|
|
141
|
+
declare function AppStepIndicator({ current, total, label, caption, style, }: AppStepIndicatorProps): React__default.JSX.Element;
|
|
142
|
+
|
|
123
143
|
declare enum LabelStyle {
|
|
124
144
|
DEFAULT = "DEFAULT",
|
|
125
145
|
LIGHT = "LIGHT",
|
|
126
|
-
DARKNESS = "DARKNESS"
|
|
146
|
+
DARKNESS = "DARKNESS",
|
|
147
|
+
/** Acción de alto contraste sobre superficies oscuras. */
|
|
148
|
+
DARKNESS_ACTION = "DARKNESS_ACTION"
|
|
127
149
|
}
|
|
128
150
|
type LabelProps = {
|
|
129
151
|
label: string;
|
|
@@ -268,6 +290,58 @@ type SectionHeaderProps = {
|
|
|
268
290
|
};
|
|
269
291
|
declare function SectionHeader({ title, subtitle, hideDescription, action, onAction, actionIcon, onActionIcon, style, horizontalPadding, containerStyle, }: SectionHeaderProps): React__default.JSX.Element;
|
|
270
292
|
|
|
293
|
+
type SelectableTableColumn = {
|
|
294
|
+
key: string;
|
|
295
|
+
label: string;
|
|
296
|
+
/** Ancho fijo de la columna. */
|
|
297
|
+
width?: number;
|
|
298
|
+
/** Factor de reparto para columnas flexibles. */
|
|
299
|
+
flex?: number;
|
|
300
|
+
};
|
|
301
|
+
type SelectableTableItem = {
|
|
302
|
+
id: string;
|
|
303
|
+
values: Record<string, string>;
|
|
304
|
+
};
|
|
305
|
+
type SelectableTableRowAction = {
|
|
306
|
+
icon: IconName;
|
|
307
|
+
color?: string;
|
|
308
|
+
onPress: (item: SelectableTableItem) => void;
|
|
309
|
+
accessibilityLabel?: (item: SelectableTableItem) => string;
|
|
310
|
+
};
|
|
311
|
+
type SelectableTableProps = {
|
|
312
|
+
columns: SelectableTableColumn[];
|
|
313
|
+
items: SelectableTableItem[];
|
|
314
|
+
/** Fila opcional para "ninguno"; se selecciona con id `""`. */
|
|
315
|
+
noneItem?: SelectableTableItem;
|
|
316
|
+
selectedId?: string;
|
|
317
|
+
/** Si se pasa, las filas son seleccionables. */
|
|
318
|
+
onSelect?: (id: string) => void;
|
|
319
|
+
/** Acción al final de cada fila (ej. eliminar en gestión). */
|
|
320
|
+
rowAction?: SelectableTableRowAction;
|
|
321
|
+
emptyLabel?: string;
|
|
322
|
+
style?: StyleProp<ViewStyle>;
|
|
323
|
+
};
|
|
324
|
+
/**
|
|
325
|
+
* Tabla compacta de filas seleccionables: cabecera, separadores y estado de
|
|
326
|
+
* selección. La usan los selectores de unidades/cuentas y las pantallas de
|
|
327
|
+
* gestión.
|
|
328
|
+
*/
|
|
329
|
+
declare function SelectableTable({ columns, items, noneItem, selectedId, onSelect, rowAction, emptyLabel, style, }: SelectableTableProps): React__default.JSX.Element;
|
|
330
|
+
|
|
331
|
+
type ScreenOverlayProps = {
|
|
332
|
+
visible: boolean;
|
|
333
|
+
title: string;
|
|
334
|
+
onClose: () => void;
|
|
335
|
+
children: React__default.ReactNode;
|
|
336
|
+
accessibilityLabel?: string;
|
|
337
|
+
};
|
|
338
|
+
/**
|
|
339
|
+
* Pantalla completa que se monta por delante de la pantalla actual sin
|
|
340
|
+
* navegación de router. Sirve para flujos secundarios que deben preservar el
|
|
341
|
+
* estado de la pantalla de abajo (formularios, pickers, etc.).
|
|
342
|
+
*/
|
|
343
|
+
declare function ScreenOverlay({ visible, title, onClose, children, accessibilityLabel, }: ScreenOverlayProps): React__default.JSX.Element;
|
|
344
|
+
|
|
271
345
|
type SheetProps = {
|
|
272
346
|
visible: boolean;
|
|
273
347
|
onClose: () => void;
|
|
@@ -276,6 +350,8 @@ type SheetProps = {
|
|
|
276
350
|
icon?: IconName;
|
|
277
351
|
title?: string;
|
|
278
352
|
caption?: string;
|
|
353
|
+
/** Contenido opcional centrado sobre el header (p. ej. indicador de pasos). */
|
|
354
|
+
headerAccessory?: React__default.ReactNode;
|
|
279
355
|
children: React__default.ReactNode;
|
|
280
356
|
contentStyle?: StyleProp<ViewStyle>;
|
|
281
357
|
snapPoints?: Array<string | number>;
|
|
@@ -288,7 +364,7 @@ type SheetProps = {
|
|
|
288
364
|
*/
|
|
289
365
|
embedded?: boolean;
|
|
290
366
|
};
|
|
291
|
-
declare function Sheet({ visible, onClose, dismissible, showCloseButton, icon, title, caption, children, contentStyle, snapPoints, actions, embedded, }: SheetProps): React__default.JSX.Element;
|
|
367
|
+
declare function Sheet({ visible, onClose, dismissible, showCloseButton, icon, title, caption, headerAccessory, children, contentStyle, snapPoints, actions, embedded, }: SheetProps): React__default.JSX.Element;
|
|
292
368
|
|
|
293
369
|
declare enum AppDialogMode {
|
|
294
370
|
Dismissable = "dismissable",
|
|
@@ -298,9 +374,13 @@ type BottomSheetProps = {
|
|
|
298
374
|
visible: boolean;
|
|
299
375
|
onClose: () => void;
|
|
300
376
|
mode?: AppDialogMode;
|
|
377
|
+
/** Muestra la X aunque `mode` sea Required (cierre solo por botón). */
|
|
378
|
+
showCloseButton?: boolean;
|
|
301
379
|
icon?: IconName;
|
|
302
380
|
title?: string;
|
|
303
381
|
caption?: string;
|
|
382
|
+
/** Contenido opcional centrado sobre el header (p. ej. indicador de pasos). */
|
|
383
|
+
headerAccessory?: React__default.ReactNode;
|
|
304
384
|
children: React__default.ReactNode;
|
|
305
385
|
contentStyle?: React__default.ComponentProps<typeof Sheet>["contentStyle"];
|
|
306
386
|
snapPoints?: React__default.ComponentProps<typeof Sheet>["snapPoints"];
|
|
@@ -309,7 +389,28 @@ type BottomSheetProps = {
|
|
|
309
389
|
/** Monta el diálogo sin RN Modal (para hosts modales nativos tipo expo-router). */
|
|
310
390
|
embedded?: boolean;
|
|
311
391
|
};
|
|
312
|
-
declare function BottomSheet({ visible, onClose, mode, icon, title, caption, children, contentStyle, snapPoints, actions, embedded, }: BottomSheetProps): React__default.JSX.Element;
|
|
392
|
+
declare function BottomSheet({ visible, onClose, mode, showCloseButton, icon, title, caption, headerAccessory, children, contentStyle, snapPoints, actions, embedded, }: BottomSheetProps): React__default.JSX.Element;
|
|
393
|
+
|
|
394
|
+
type BottomDialogProps = {
|
|
395
|
+
visible: boolean;
|
|
396
|
+
onClose: () => void;
|
|
397
|
+
title: string;
|
|
398
|
+
description?: string;
|
|
399
|
+
children?: React__default.ReactNode;
|
|
400
|
+
/** Botones del pie. El diálogo los acomoda en una fila con separación. */
|
|
401
|
+
actions?: React__default.ReactNode;
|
|
402
|
+
dismissible?: boolean;
|
|
403
|
+
contentStyle?: StyleProp<ViewStyle>;
|
|
404
|
+
/** Monta el diálogo sin RN Modal (host modal nativo tipo expo-router). */
|
|
405
|
+
embedded?: boolean;
|
|
406
|
+
};
|
|
407
|
+
/**
|
|
408
|
+
* Diálogo compacto anclado al pie de la pantalla. A diferencia de
|
|
409
|
+
* `BottomSheet`, no toca los bordes: flota con margen, tiene esquinas
|
|
410
|
+
* redondeadas y un título corto (`BodyBold`) en vez del header grande del
|
|
411
|
+
* sheet. Pensado para confirmaciones breves.
|
|
412
|
+
*/
|
|
413
|
+
declare function BottomDialog({ visible, onClose, title, description, children, actions, dismissible, contentStyle, embedded, }: BottomDialogProps): React__default.JSX.Element;
|
|
313
414
|
|
|
314
415
|
type AppBottomSheetProps = {
|
|
315
416
|
visible: boolean;
|
|
@@ -392,6 +493,8 @@ type ModalProps = {
|
|
|
392
493
|
icon?: IconName;
|
|
393
494
|
title?: string;
|
|
394
495
|
caption?: string;
|
|
496
|
+
/** Contenido opcional centrado sobre el header (p. ej. indicador de pasos). */
|
|
497
|
+
headerAccessory?: React__default.ReactNode;
|
|
395
498
|
children: React__default.ReactNode;
|
|
396
499
|
contentStyle?: StyleProp<ViewStyle>;
|
|
397
500
|
/** Zona de acciones fija al pie del modal. */
|
|
@@ -403,7 +506,7 @@ type ModalProps = {
|
|
|
403
506
|
*/
|
|
404
507
|
embedded?: boolean;
|
|
405
508
|
};
|
|
406
|
-
declare function Modal({ visible, onClose, dismissible, showCloseButton, icon, title, caption, children, contentStyle, actions, embedded, }: ModalProps): React__default.JSX.Element;
|
|
509
|
+
declare function Modal({ visible, onClose, dismissible, showCloseButton, icon, title, caption, headerAccessory, children, contentStyle, actions, embedded, }: ModalProps): React__default.JSX.Element;
|
|
407
510
|
|
|
408
511
|
type AppFilterChipOption = {
|
|
409
512
|
label: string;
|
|
@@ -578,6 +681,64 @@ type ProductCardProps = {
|
|
|
578
681
|
};
|
|
579
682
|
declare function ProductCard({ name, price, code, cart, maxQuantity, onQuantityChange, imageIcon, style, containerStyle, }: ProductCardProps): React__default.JSX.Element;
|
|
580
683
|
|
|
684
|
+
type PropertySummaryItem = {
|
|
685
|
+
label: string;
|
|
686
|
+
value?: string;
|
|
687
|
+
/** Texto cuando no hay valor. Por defecto, `-`. */
|
|
688
|
+
emptyLabel?: string;
|
|
689
|
+
};
|
|
690
|
+
type PropertySummaryProps = {
|
|
691
|
+
title?: string;
|
|
692
|
+
items: PropertySummaryItem[];
|
|
693
|
+
emptyLabel?: string;
|
|
694
|
+
style?: StyleProp<ViewStyle>;
|
|
695
|
+
};
|
|
696
|
+
/**
|
|
697
|
+
* Resumen compacto de propiedades para el paso de revisión: label a la
|
|
698
|
+
* izquierda y valor a la derecha, con un ritmo más bajo que una fila de input.
|
|
699
|
+
*/
|
|
700
|
+
declare function PropertySummary({ title, items, emptyLabel, style, }: PropertySummaryProps): React__default.JSX.Element | null;
|
|
701
|
+
|
|
702
|
+
type PressKind = "button" | "card" | "item" | "tab" | "chip" | "fab" | "header" | "other";
|
|
703
|
+
/**
|
|
704
|
+
* Evento semántico de interacción. NO hay coordenadas: un tap en una zona vacía no
|
|
705
|
+
* interesa a nadie y llenaría la DB de ruido.
|
|
706
|
+
*/
|
|
707
|
+
type PressEvent = {
|
|
708
|
+
component: string;
|
|
709
|
+
label?: string;
|
|
710
|
+
kind: PressKind;
|
|
711
|
+
data?: Record<string, unknown>;
|
|
712
|
+
ts: number;
|
|
713
|
+
};
|
|
714
|
+
type PressObserver = (event: PressEvent) => void;
|
|
715
|
+
/**
|
|
716
|
+
* La app registra un único observer (que escribe a logwood). El DS no sabe nada de
|
|
717
|
+
* logging: solo avisa que un componente semántico recibió un tap.
|
|
718
|
+
*/
|
|
719
|
+
declare function setPressObserver(next: PressObserver | null): void;
|
|
720
|
+
declare function getPressObserver(): PressObserver | null;
|
|
721
|
+
declare function emitPress(event: Omit<PressEvent, "ts">): void;
|
|
722
|
+
type PressTracking = {
|
|
723
|
+
component: string;
|
|
724
|
+
label?: string;
|
|
725
|
+
kind: PressKind;
|
|
726
|
+
data?: Record<string, unknown>;
|
|
727
|
+
};
|
|
728
|
+
type TrackedPressableProps = PressableProps & {
|
|
729
|
+
/** Si se omite, el componente se comporta como un Pressable normal y no emite nada. */
|
|
730
|
+
tracking?: PressTracking;
|
|
731
|
+
};
|
|
732
|
+
/**
|
|
733
|
+
* Reemplazo de `Pressable` para componentes con significado (un botón "Guardar", un card
|
|
734
|
+
* de acción, un ítem de lista, una tab). Cada caso pasa su `tracking`; el observer global
|
|
735
|
+
* convierte eso en un evento de log.
|
|
736
|
+
*/
|
|
737
|
+
declare const TrackedPressable: React__default.ForwardRefExoticComponent<PressableProps & {
|
|
738
|
+
/** Si se omite, el componente se comporta como un Pressable normal y no emite nada. */
|
|
739
|
+
tracking?: PressTracking;
|
|
740
|
+
} & React__default.RefAttributes<View>>;
|
|
741
|
+
|
|
581
742
|
declare enum ElementCardStyle {
|
|
582
743
|
DEFAULT = "DEFAULT",
|
|
583
744
|
LIGHT = "LIGHT",
|
|
@@ -872,6 +1033,40 @@ type ReverseHeaderCardLayoutProps = {
|
|
|
872
1033
|
};
|
|
873
1034
|
declare function ReverseHeaderCardLayout({ headerBackgroundColor, bodyBackgroundColor, header, children, style, }: ReverseHeaderCardLayoutProps): React__default.JSX.Element;
|
|
874
1035
|
|
|
1036
|
+
declare function isEmbeddedOverlayLocked(): boolean;
|
|
1037
|
+
|
|
1038
|
+
type InfoNoteTone = "light" | "dark";
|
|
1039
|
+
declare enum InfoNoteStatus {
|
|
1040
|
+
INFO = "INFO",
|
|
1041
|
+
WARNING = "WARNING",
|
|
1042
|
+
SUCCESS = "SUCCESS"
|
|
1043
|
+
}
|
|
1044
|
+
type InfoNoteAction = {
|
|
1045
|
+
label: string;
|
|
1046
|
+
icon?: IconName;
|
|
1047
|
+
onPress: () => void;
|
|
1048
|
+
accessibilityLabel?: string;
|
|
1049
|
+
};
|
|
1050
|
+
type InfoNoteProps = {
|
|
1051
|
+
title?: string;
|
|
1052
|
+
message: string;
|
|
1053
|
+
icon?: IconName;
|
|
1054
|
+
/** Estado semántico de la nota. Default: `INFO`. */
|
|
1055
|
+
status?: InfoNoteStatus;
|
|
1056
|
+
/** Acciones que se muestran debajo de la nota, alineadas a la izquierda. */
|
|
1057
|
+
actions?: InfoNoteAction[];
|
|
1058
|
+
/** Superficie sobre la que se pinta la nota. */
|
|
1059
|
+
tone?: InfoNoteTone;
|
|
1060
|
+
style?: StyleProp<ViewStyle>;
|
|
1061
|
+
};
|
|
1062
|
+
/**
|
|
1063
|
+
* Nota informativa compacta para formularios y selectores. El estado (`INFO`,
|
|
1064
|
+
* `WARNING`, `SUCCESS`) define el color de fondo, borde e icono; las acciones
|
|
1065
|
+
* usan el botón de alto contraste cuando la nota vive sobre una superficie
|
|
1066
|
+
* oscura.
|
|
1067
|
+
*/
|
|
1068
|
+
declare function InfoNote({ title, message, icon, status, actions, tone, style, }: InfoNoteProps): React__default.JSX.Element;
|
|
1069
|
+
|
|
875
1070
|
interface InputProps extends TextInputProps {
|
|
876
1071
|
icon?: IconName;
|
|
877
1072
|
/** Estilos aplicados al campo de texto interno (también cuando hay icono/ojito). */
|
|
@@ -975,10 +1170,13 @@ interface ToolsCardProps {
|
|
|
975
1170
|
}
|
|
976
1171
|
declare function ToolsCard({ tools, style }: ToolsCardProps): React__default.JSX.Element;
|
|
977
1172
|
|
|
1173
|
+
type TreeNodeKind = "group" | "item";
|
|
978
1174
|
type TreeNode = {
|
|
979
1175
|
id: string;
|
|
980
1176
|
code: string;
|
|
981
1177
|
name: string;
|
|
1178
|
+
/** Contenedor (grupo/cuenta título) o contenido (artículo/cuenta movimiento). */
|
|
1179
|
+
kind: TreeNodeKind;
|
|
982
1180
|
children: TreeNode[];
|
|
983
1181
|
};
|
|
984
1182
|
type TreeEditorMode = "view" | "edit";
|
|
@@ -1014,7 +1212,7 @@ type TreeEditorProps = {
|
|
|
1014
1212
|
onPressNode?: (node: TreeNode) => void;
|
|
1015
1213
|
style?: StyleProp<ViewStyle>;
|
|
1016
1214
|
};
|
|
1017
|
-
declare function createNode(code: string, name: string, children?: TreeNode[]): TreeNode;
|
|
1215
|
+
declare function createNode(code: string, name: string, children?: TreeNode[], kind?: TreeNodeKind): TreeNode;
|
|
1018
1216
|
declare function addChild(nodes: TreeNode[], parentId: string, node: TreeNode): TreeNode[];
|
|
1019
1217
|
declare function addSibling(nodes: TreeNode[], nodeId: string, node: TreeNode): TreeNode[];
|
|
1020
1218
|
declare function updateNode(nodes: TreeNode[], nodeId: string, patch: Partial<Pick<TreeNode, "code" | "name">>): TreeNode[];
|
|
@@ -1106,6 +1304,16 @@ interface EmptyStateProps {
|
|
|
1106
1304
|
}
|
|
1107
1305
|
declare function EmptyState({ icon, iconSize, title, caption, style }: EmptyStateProps): React__default.JSX.Element;
|
|
1108
1306
|
|
|
1307
|
+
type AppFormProps = {
|
|
1308
|
+
children: React__default.ReactNode;
|
|
1309
|
+
style?: StyleProp<ViewStyle>;
|
|
1310
|
+
};
|
|
1311
|
+
/**
|
|
1312
|
+
* Contenedor de un formulario dentro de un `BottomSheet`: el ritmo estándar
|
|
1313
|
+
* entre el card de campos y las notas que van debajo (gap 8, margen superior 8).
|
|
1314
|
+
*/
|
|
1315
|
+
declare function AppForm({ children, style }: AppFormProps): React__default.JSX.Element;
|
|
1316
|
+
|
|
1109
1317
|
type AppInputProps = {
|
|
1110
1318
|
label: string;
|
|
1111
1319
|
labelWidth?: number;
|
|
@@ -1115,18 +1323,37 @@ type AppInputProps = {
|
|
|
1115
1323
|
};
|
|
1116
1324
|
type AppInputElement = ReactElement<AppInputProps>;
|
|
1117
1325
|
|
|
1326
|
+
type AppFormCardVariant = "filled" | "outlined" | "readOnly";
|
|
1327
|
+
type AppFormCardTone = "light" | "dark";
|
|
1118
1328
|
type AppFormCardProps = {
|
|
1119
1329
|
children: AppInputElement | AppInputElement[];
|
|
1120
1330
|
labelWidth?: number;
|
|
1331
|
+
/**
|
|
1332
|
+
* `readOnly` convierte el card en una lista de datos: sin superficie, borde
|
|
1333
|
+
* ni padding horizontal, con divisores a sangre. Se declara explícitamente
|
|
1334
|
+
* porque el estilo no debe depender de cómo se compongan los hijos
|
|
1335
|
+
* (wrappers, fragmentos o condicionales).
|
|
1336
|
+
*/
|
|
1337
|
+
variant?: AppFormCardVariant;
|
|
1338
|
+
/** Superficie del grupo. `dark` es para fichas de solo lectura sobre fondo oscuro. */
|
|
1339
|
+
tone?: AppFormCardTone;
|
|
1121
1340
|
style?: ViewStyle;
|
|
1122
1341
|
};
|
|
1123
|
-
declare function AppFormCard({ children, labelWidth, style }: AppFormCardProps): React__default.JSX.Element;
|
|
1342
|
+
declare function AppFormCard({ children, labelWidth, variant, tone, style, }: AppFormCardProps): React__default.JSX.Element;
|
|
1124
1343
|
|
|
1125
1344
|
type AppTextInputProps = AppInputProps & {
|
|
1126
1345
|
type?: "text";
|
|
1127
1346
|
value: string;
|
|
1128
|
-
/**
|
|
1129
|
-
*
|
|
1347
|
+
/**
|
|
1348
|
+
* Componente único para filas de input de `card-form`:
|
|
1349
|
+
* - editable (default): abre teclado.
|
|
1350
|
+
* - `readOnly`: no abre teclado; combinar con `onPress` (selector) o
|
|
1351
|
+
* `trailingAction` (escáner).
|
|
1352
|
+
* - `selectable`: fila de selección; cualquier toque dispara `onPress` y el
|
|
1353
|
+
* input no captura texto ni foco.
|
|
1354
|
+
* - `editable={false}`: fila deshabilitada; usar `trailingIcon` (p. ej. lock).
|
|
1355
|
+
* - `error`: pinta label y mensaje en rojo.
|
|
1356
|
+
*/
|
|
1130
1357
|
onChangeText?: (value: string) => void;
|
|
1131
1358
|
placeholder?: string;
|
|
1132
1359
|
autoCapitalize?: "none" | "sentences" | "words" | "characters";
|
|
@@ -1146,8 +1373,15 @@ type AppTextInputProps = AppInputProps & {
|
|
|
1146
1373
|
onPress: () => void;
|
|
1147
1374
|
accessibilityLabel?: string;
|
|
1148
1375
|
};
|
|
1376
|
+
/** Icono decorativo a la derecha (ej. `lock` en un campo bloqueado). */
|
|
1377
|
+
trailingIcon?: IconName;
|
|
1378
|
+
/**
|
|
1379
|
+
* Fila de selección: cualquier toque dispara `onPress` y el input no captura
|
|
1380
|
+
* texto ni foco. Requiere `onPress`.
|
|
1381
|
+
*/
|
|
1382
|
+
selectable?: boolean;
|
|
1149
1383
|
};
|
|
1150
|
-
declare function AppTextInput({ label, labelWidth, error, value, onChangeText, placeholder, autoCapitalize, keyboardType, maxLength, editable, readOnly, trailingAction, onPress: onPressOverride, }: AppTextInputProps): React__default.JSX.Element;
|
|
1384
|
+
declare function AppTextInput({ label, labelWidth, error, value, onChangeText, placeholder, autoCapitalize, keyboardType, maxLength, editable, readOnly, selectable, trailingAction, trailingIcon, onPress: onPressOverride, }: AppTextInputProps): React__default.JSX.Element;
|
|
1151
1385
|
|
|
1152
1386
|
type AppTextAreaProps = AppInputProps & {
|
|
1153
1387
|
value: string;
|
|
@@ -1174,6 +1408,33 @@ type AppSelectorProps = AppInputProps & {
|
|
|
1174
1408
|
};
|
|
1175
1409
|
declare function AppSelector({ label, labelWidth, error, value, onChange, options, placeholder, disabled, }: AppSelectorProps): React__default.JSX.Element;
|
|
1176
1410
|
|
|
1411
|
+
type AppReadOnlyFieldTone = "light" | "dark";
|
|
1412
|
+
type AppReadOnlyFieldProps = {
|
|
1413
|
+
label: string;
|
|
1414
|
+
labelWidth?: number;
|
|
1415
|
+
value?: string | null;
|
|
1416
|
+
/** Texto cuando no hay valor (la app pasa su copy i18n; por defecto "—"). */
|
|
1417
|
+
emptyLabel?: string;
|
|
1418
|
+
onPress?: () => void;
|
|
1419
|
+
/** Campo bloqueado: el valor se pinta como dato fijo, no como placeholder, y
|
|
1420
|
+
* la fila anuncia el estado `disabled` al lector de pantalla. */
|
|
1421
|
+
disabled?: boolean;
|
|
1422
|
+
/** Icono decorativo al final de la fila (p. ej. `lock` en campos bloqueados). */
|
|
1423
|
+
trailingIcon?: IconName;
|
|
1424
|
+
/** Error de validación mostrado debajo de la fila, como en `AppTextInput`. */
|
|
1425
|
+
error?: string;
|
|
1426
|
+
/** Superficie sobre la que se pinta la fila. */
|
|
1427
|
+
tone?: AppReadOnlyFieldTone;
|
|
1428
|
+
accessibilityHint?: string;
|
|
1429
|
+
};
|
|
1430
|
+
/**
|
|
1431
|
+
* Fila de solo lectura con el mismo ritmo que `AppTextInput`: etiqueta a la
|
|
1432
|
+
* izquierda y valor a la derecha, sin apariencia de input. El label va en
|
|
1433
|
+
* negro y el valor en gris (dato fijo); si no hay valor, el `emptyLabel` baja
|
|
1434
|
+
* a Caption para que nunca se confunda con un valor escrito.
|
|
1435
|
+
*/
|
|
1436
|
+
declare function AppReadOnlyField({ label, labelWidth, value, emptyLabel, onPress, disabled, trailingIcon, error, tone, accessibilityHint, }: AppReadOnlyFieldProps): React__default.JSX.Element;
|
|
1437
|
+
|
|
1177
1438
|
type AppToggleProps = AppInputProps & {
|
|
1178
1439
|
value: boolean;
|
|
1179
1440
|
onValueChange: (value: boolean) => void;
|
|
@@ -1407,9 +1668,10 @@ type AppLayoutProps = {
|
|
|
1407
1668
|
* - El scroll de página e interno se resetea al tope SOLO cuando cambia el
|
|
1408
1669
|
* nombre de ruta; los cambios de contenido dentro de la misma ruta preservan
|
|
1409
1670
|
* la posición.
|
|
1410
|
-
* - El fondo del page toma el color del cuerpo/mid (`selectPageBackground`)
|
|
1411
|
-
*
|
|
1412
|
-
*
|
|
1671
|
+
* - El fondo del page toma el color del cuerpo/mid (`selectPageBackground`) y
|
|
1672
|
+
* se interpola durante la transición: el lienzo no salta a negro antes de que
|
|
1673
|
+
* el header claro termine de contraerse, y no hace falta sobredimensionar el
|
|
1674
|
+
* body con colas.
|
|
1413
1675
|
*
|
|
1414
1676
|
* Contrato de slots dinámicos: el contenido de una sección `content`/
|
|
1415
1677
|
* `minFillRest` se monta DOS veces (proxy + visible). Debe ser puro e
|
|
@@ -1699,4 +1961,4 @@ declare const AppIcon: {
|
|
|
1699
1961
|
readonly Inbox: IconName;
|
|
1700
1962
|
};
|
|
1701
1963
|
|
|
1702
|
-
export { ActionCard, type ActionCardProps, ActionCardStyle, type ActionTile, ActionTiles, type ActionTilesProps, ActionTilesStyle, AppBottomSheet, type AppBottomSheetProps, AppButton, type AppButtonProps, type AppButtonVariant, AppCheckItem, type AppCheckItemProps, type AppCheckItemStatus, AppDialogMode, type AppFilterChipOption, AppFilterChips, type AppFilterChipsProps, AppFormCard, type AppFormCardProps, AppIcon, type AppInputElement, type AppInputProps, AppLayout, type AppLayoutProps, type AppNavigation, type AppRoute, AppSelector, type AppSelectorOption, type AppSelectorProps, AppShell, type AppShellNavigation, type AppShellProps, AppTextArea, type AppTextAreaProps, AppTextHeader, type AppTextHeaderProps, AppTextInput, type AppTextInputProps, AppToggle, type AppToggleProps, Avatar, type AvatarProps, type AvatarSize, BarcodeScannerScreen, type BarcodeScannerScreenProps, type BaseColorKey, BottomSheet, type BottomSheetProps, Button, type ButtonProps, type ButtonSize, type ButtonVariant, Calendar, type CalendarProps, CameraCaptureScreen, type CameraCaptureScreenProps, type CameraFacing, type CameraFlashMode, CameraHud, type CameraHudProps, CameraPermissionGate, type CameraPermissionGateProps, CameraScreenContainer, type CameraScreenContainerProps, type CapturePhoto, Card, type CardProps, CardTitle, type CardTitleProps, type CardVariant, Chip, type ChipProps, type ChipSize, ChipTabs, type ChipTabsOption, type ChipTabsProps, type ChipVariant, ColorCustomizerDialog, type ColorToken, ColorWheel, ComposingOrb, type Composition, DashboardShell, type DashboardShellProps, Divisor, type DivisorPosition, type DivisorProps, Dock, type DockItem, type DockProps, DonutChart, type DonutChartProps, type DonutSegment, DrawerMenu, DrawerMenuItem, type DrawerMenuItemProps, DrawerMenuItemStyle, type DrawerMenuItemType, type DrawerMenuProps, Dropdown, type DropdownOption, type DropdownProps, type DropdownState, ElementCard, type ElementCardProps, ElementCardStyle, EmptyState, type EmptyStateProps, FloatingActionButton, type FloatingActionButtonPosition, type FloatingActionButtonProps, HeaderCardLayout, type HeaderCardLayoutProps, type HeightSpec, type HostKey, HudIconButton, type HudIconButtonProps, Icon, type IconName, type IconProps, Input, type InputProps, Item, type ItemProps, ItemStyle, type KeyValueItem, KeyValueList, type KeyValueListProps, KeyValueListStyle, KeyboardSafeScreen, type KeyboardSafeScreenProps, Label, type LabelProps, LabelStyle, type LayerDirection, type LayerRole, LayoutColumn, type LayoutDebugEvent, LayoutRow, type LayoutState, type LayoutStateName, ListItem, type ListItemProps, ListItemStyle, MainLayout, type MainLayoutProps, Modal, type ModalProps, OptionListItem, type OptionListItemProps, OptionListItemVariant, PinKeypad, type PinKeypadProps, ProductCard, type ProductCardCart, type ProductCardProps, ProductCardStyle, ReverseHeaderCardLayout, type ReverseHeaderCardLayoutProps, type Route, type RouteOptions, type ScanResult, SearchBar, type SearchBarProps, SearchBarStyle, type SectionBehavior, SectionHeader, type SectionHeaderProps, SectionHeaderStyle, type SectionKey, SectionTitle, type SectionTitleProps, Sheet, type SheetKind, SheetLayout, type SheetLayoutProps, type SheetProps, SheetSlot, type SheetSlotProps, ShortcutCard, type ShortcutCardProps, ShortcutCardStyle, type ShortcutItem, ShutterButton, type SidebarItem, type SidebarSection, type SidebarType, Skeleton, SkeletonCard, type SkeletonCardProps, SkeletonCircle, type SkeletonCircleProps, type SkeletonProps, type SkeletonShape, SkeletonText, type SkeletonTextProps, type SlotName, SplitColorCard, SplitDarknessCard, SplitTextCard, StackDetails, type StackDetailsAction, type StackDetailsProps, type StackDetailsRow, StackDetailsStyle, StateMessage, type StateMessageProps, StateMessageStyle, StateMessageType, TOAST_DEFAULT_DURATION_MS, TabNavigation, type TabNavigationOption, type TabNavigationProps, TabNavigationStyle, Text, TextField, type TextFieldProps, type TextProps, type TextVariant, Toast, type ToastOptions, type ToastProps, ToastProvider, ToastStyle, ToastTone, type ToolItem, ToolsCard, type ToolsCardProps, TopAction, type TopActionProps, TopActionStyle, TopBar, type TopBarProps, type TransitionSpec, TreeEditor, type TreeEditorMode, type TreeEditorProps, type TreeEditorVariant, type TreeNode, addChild, addSibling, buildInitialCollapsed, countNodes, createNode, directionSign, findNode, hasCode, hostDirection, iconMap, isLayoutDebug, layoutDebug, layoutStates, removeNode, resolveComposition, resolveTransition, setLayoutDebug, updateNode, useAppNavigation, useAppShell, useSheetLayout, useToast };
|
|
1964
|
+
export { ActionCard, type ActionCardProps, ActionCardStyle, type ActionTile, ActionTiles, type ActionTilesProps, ActionTilesStyle, AppBottomSheet, type AppBottomSheetProps, AppButton, type AppButtonProps, type AppButtonVariant, AppCheckItem, type AppCheckItemProps, type AppCheckItemStatus, AppDialogMode, type AppFilterChipOption, AppFilterChips, type AppFilterChipsProps, AppForm, AppFormCard, type AppFormCardProps, type AppFormCardTone, type AppFormCardVariant, type AppFormProps, AppIcon, type AppInputElement, type AppInputProps, AppLayout, type AppLayoutProps, type AppNavigation, AppReadOnlyField, type AppReadOnlyFieldProps, type AppReadOnlyFieldTone, type AppRoute, AppSelector, type AppSelectorOption, type AppSelectorProps, AppShell, type AppShellNavigation, type AppShellProps, AppStepIndicator, type AppStepIndicatorProps, AppTextArea, type AppTextAreaProps, AppTextHeader, type AppTextHeaderProps, AppTextInput, type AppTextInputProps, AppToggle, type AppToggleProps, Avatar, type AvatarProps, type AvatarSize, BarcodeScannerScreen, type BarcodeScannerScreenProps, type BaseColorKey, BottomDialog, type BottomDialogProps, BottomSheet, type BottomSheetProps, Button, type ButtonProps, type ButtonSize, type ButtonVariant, Calendar, type CalendarProps, CameraCaptureScreen, type CameraCaptureScreenProps, type CameraFacing, type CameraFlashMode, CameraHud, type CameraHudProps, CameraPermissionGate, type CameraPermissionGateProps, CameraScreenContainer, type CameraScreenContainerProps, type CapturePhoto, Card, type CardProps, CardTitle, type CardTitleProps, type CardVariant, Chip, type ChipProps, type ChipSize, ChipTabs, type ChipTabsOption, type ChipTabsProps, type ChipVariant, ColorCustomizerDialog, type ColorToken, ColorWheel, ComposingOrb, type Composition, DashboardShell, type DashboardShellProps, Divisor, type DivisorPosition, type DivisorProps, Dock, type DockItem, type DockProps, DonutChart, type DonutChartProps, type DonutSegment, DrawerMenu, DrawerMenuItem, type DrawerMenuItemProps, DrawerMenuItemStyle, type DrawerMenuItemType, type DrawerMenuProps, Dropdown, type DropdownOption, type DropdownProps, type DropdownState, ElementCard, type ElementCardProps, ElementCardStyle, EmptyState, type EmptyStateProps, FloatingActionButton, type FloatingActionButtonPosition, type FloatingActionButtonProps, HeaderCardLayout, type HeaderCardLayoutProps, type HeightSpec, type HostKey, HudIconButton, type HudIconButtonProps, Icon, type IconName, type IconProps, InfoNote, type InfoNoteAction, type InfoNoteProps, InfoNoteStatus, type InfoNoteTone, Input, type InputProps, Item, type ItemProps, ItemStyle, type KeyValueItem, KeyValueList, type KeyValueListProps, KeyValueListStyle, KeyboardSafeScreen, type KeyboardSafeScreenProps, Label, type LabelProps, LabelStyle, type LayerDirection, type LayerRole, LayoutColumn, type LayoutDebugEvent, LayoutRow, type LayoutState, type LayoutStateName, ListItem, type ListItemProps, ListItemStyle, MainLayout, type MainLayoutProps, Modal, type ModalProps, OptionListItem, type OptionListItemProps, OptionListItemVariant, PinKeypad, type PinKeypadProps, type PressEvent, type PressKind, type PressObserver, type PressTracking, ProductCard, type ProductCardCart, type ProductCardProps, ProductCardStyle, PropertySummary, type PropertySummaryItem, type PropertySummaryProps, ReverseHeaderCardLayout, type ReverseHeaderCardLayoutProps, type Route, type RouteOptions, type ScanResult, ScreenOverlay, type ScreenOverlayProps, SearchBar, type SearchBarProps, SearchBarStyle, type SectionBehavior, SectionHeader, type SectionHeaderProps, SectionHeaderStyle, type SectionKey, SectionTitle, type SectionTitleProps, SelectableTable, type SelectableTableColumn, type SelectableTableItem, type SelectableTableProps, type SelectableTableRowAction, Sheet, type SheetKind, SheetLayout, type SheetLayoutProps, type SheetProps, SheetSlot, type SheetSlotProps, ShortcutCard, type ShortcutCardProps, ShortcutCardStyle, type ShortcutItem, ShutterButton, type SidebarItem, type SidebarSection, type SidebarType, Skeleton, SkeletonCard, type SkeletonCardProps, SkeletonCircle, type SkeletonCircleProps, type SkeletonProps, type SkeletonShape, SkeletonText, type SkeletonTextProps, type SlotName, SplitColorCard, SplitDarknessCard, SplitTextCard, StackDetails, type StackDetailsAction, type StackDetailsProps, type StackDetailsRow, StackDetailsStyle, StateMessage, type StateMessageProps, StateMessageStyle, StateMessageType, TOAST_DEFAULT_DURATION_MS, TabNavigation, type TabNavigationOption, type TabNavigationProps, TabNavigationStyle, Text, TextField, type TextFieldProps, type TextProps, type TextVariant, Toast, type ToastOptions, type ToastProps, ToastProvider, ToastStyle, ToastTone, type ToolItem, ToolsCard, type ToolsCardProps, TopAction, type TopActionProps, TopActionStyle, TopBar, type TopBarProps, TrackedPressable, type TrackedPressableProps, type TransitionSpec, TreeEditor, type TreeEditorMode, type TreeEditorProps, type TreeEditorVariant, type TreeNode, type TreeNodeKind, addChild, addSibling, buildInitialCollapsed, countNodes, createNode, directionSign, emitPress, findNode, getPressObserver, hasCode, hostDirection, iconMap, isEmbeddedOverlayLocked, isLayoutDebug, layoutDebug, layoutStates, removeNode, resolveComposition, resolveTransition, setLayoutDebug, setPressObserver, updateNode, useAppNavigation, useAppShell, useSheetLayout, useToast };
|