@william-callao/antonella-ui 1.0.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/dist/index.d.ts +1067 -0
- package/dist/index.js +7694 -0
- package/package.json +33 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,1067 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { StyleProp, ViewStyle, PressableProps, ViewProps, TextStyle, TextInputProps, KeyboardTypeOptions, TextProps as TextProps$1, ScrollViewProps } from 'react-native';
|
|
3
|
+
import React, { ComponentType, ReactNode, ReactElement } from 'react';
|
|
4
|
+
import { DashboardShellTokens, LayoutRowSize, LayoutColumnSize, TextType } from '@william-callao/antonella-theme';
|
|
5
|
+
export { LayoutColumnSize, LayoutRowSize } from '@william-callao/antonella-theme';
|
|
6
|
+
import { SharedValue } from 'react-native-reanimated';
|
|
7
|
+
|
|
8
|
+
type AvatarSize = "sm" | "md" | "lg";
|
|
9
|
+
type AvatarProps = {
|
|
10
|
+
name: string;
|
|
11
|
+
email?: string;
|
|
12
|
+
size?: AvatarSize;
|
|
13
|
+
style?: StyleProp<ViewStyle>;
|
|
14
|
+
};
|
|
15
|
+
declare function Avatar({ name, email, size, style }: AvatarProps): react_jsx_runtime.JSX.Element;
|
|
16
|
+
|
|
17
|
+
type ButtonVariant = "primary" | "secondary" | "ghost" | "danger";
|
|
18
|
+
type ButtonSize = "sm" | "md" | "lg";
|
|
19
|
+
interface ButtonProps extends Omit<PressableProps, "style"> {
|
|
20
|
+
label: string;
|
|
21
|
+
variant?: ButtonVariant;
|
|
22
|
+
size?: ButtonSize;
|
|
23
|
+
style?: StyleProp<ViewStyle>;
|
|
24
|
+
}
|
|
25
|
+
declare function Button({ label, variant, size, style, disabled, android_ripple, ...rest }: ButtonProps): react_jsx_runtime.JSX.Element;
|
|
26
|
+
|
|
27
|
+
interface CalendarProps extends ViewProps {
|
|
28
|
+
date?: Date;
|
|
29
|
+
}
|
|
30
|
+
declare function Calendar({ date, style, ...rest }: CalendarProps): react_jsx_runtime.JSX.Element;
|
|
31
|
+
|
|
32
|
+
type CardVariant = "default" | "line";
|
|
33
|
+
interface CardProps extends ViewProps {
|
|
34
|
+
/** Fondo custom que tiene prioridad sobre la variante. */
|
|
35
|
+
background?: string;
|
|
36
|
+
/** `default` pinta `card.background`; `line` deja el fondo transparente y dibuja el borde gris. */
|
|
37
|
+
variant?: CardVariant;
|
|
38
|
+
loading?: boolean;
|
|
39
|
+
skeletonHeight?: number;
|
|
40
|
+
}
|
|
41
|
+
declare function Card({ background: bgOverride, loading, skeletonHeight, variant, style, children, ...rest }: CardProps): react_jsx_runtime.JSX.Element;
|
|
42
|
+
|
|
43
|
+
interface CardTitleProps {
|
|
44
|
+
title: string;
|
|
45
|
+
subtitle?: string;
|
|
46
|
+
style?: ViewStyle;
|
|
47
|
+
}
|
|
48
|
+
declare function CardTitle({ title, subtitle, style }: CardTitleProps): react_jsx_runtime.JSX.Element;
|
|
49
|
+
|
|
50
|
+
type IconName = "home" | "home-filled" | "mail" | "mail-filled" | "calendar" | "calendar-filled" | "bar-chart" | "bar-chart-filled" | "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";
|
|
51
|
+
declare const iconMap: Record<IconName, ComponentType<{
|
|
52
|
+
size?: number;
|
|
53
|
+
color?: string;
|
|
54
|
+
strokeWidth?: number;
|
|
55
|
+
}>>;
|
|
56
|
+
type IconProps = {
|
|
57
|
+
name: IconName;
|
|
58
|
+
size?: number;
|
|
59
|
+
color?: string;
|
|
60
|
+
style?: object;
|
|
61
|
+
testID?: string;
|
|
62
|
+
};
|
|
63
|
+
declare function Icon({ name, size, color, style, testID }: IconProps): react_jsx_runtime.JSX.Element;
|
|
64
|
+
|
|
65
|
+
type ChipVariant = "subtle" | "solid" | "outlined";
|
|
66
|
+
type ChipSize = "sm" | "md";
|
|
67
|
+
type ChipProps = {
|
|
68
|
+
label: string;
|
|
69
|
+
color?: string;
|
|
70
|
+
backgroundColor?: string;
|
|
71
|
+
variant?: ChipVariant;
|
|
72
|
+
size?: ChipSize;
|
|
73
|
+
icon?: IconName;
|
|
74
|
+
uppercase?: boolean;
|
|
75
|
+
style?: StyleProp<ViewStyle>;
|
|
76
|
+
textStyle?: StyleProp<TextStyle>;
|
|
77
|
+
onPress?: () => void;
|
|
78
|
+
};
|
|
79
|
+
declare function Chip({ label, color, backgroundColor, variant, size, icon, uppercase, style, textStyle, onPress, }: ChipProps): react_jsx_runtime.JSX.Element;
|
|
80
|
+
|
|
81
|
+
declare enum ItemStyle {
|
|
82
|
+
DEFAULT = "DEFAULT",
|
|
83
|
+
LIGHT = "LIGHT",
|
|
84
|
+
DARKNESS = "DARKNESS"
|
|
85
|
+
}
|
|
86
|
+
type ItemProps = {
|
|
87
|
+
icon?: IconName;
|
|
88
|
+
label: string;
|
|
89
|
+
onPress: () => void;
|
|
90
|
+
selected?: boolean;
|
|
91
|
+
style?: ItemStyle;
|
|
92
|
+
colors?: {
|
|
93
|
+
rowBg: string;
|
|
94
|
+
rowPressedBg: string;
|
|
95
|
+
iconCircleBg: string;
|
|
96
|
+
iconColor: string;
|
|
97
|
+
iconSelectedColor: string;
|
|
98
|
+
textColor: string;
|
|
99
|
+
textSelectedColor: string;
|
|
100
|
+
selectedBg: string;
|
|
101
|
+
};
|
|
102
|
+
};
|
|
103
|
+
declare function Item({ icon, label, onPress, selected, style, colors: overrideColors, }: ItemProps): react_jsx_runtime.JSX.Element;
|
|
104
|
+
|
|
105
|
+
type ChipRowOption = {
|
|
106
|
+
icon: IconName;
|
|
107
|
+
label: string;
|
|
108
|
+
value: string;
|
|
109
|
+
};
|
|
110
|
+
type ChipRowProps = {
|
|
111
|
+
options: ChipRowOption[];
|
|
112
|
+
selected?: string;
|
|
113
|
+
onSelect?: (value: string) => void;
|
|
114
|
+
style?: ItemStyle;
|
|
115
|
+
/** Cuando es true, los items se reparten el ancho completo (flex: 1) sin scroll horizontal. */
|
|
116
|
+
fullWidth?: boolean;
|
|
117
|
+
};
|
|
118
|
+
declare function ChipRow({ options, selected: controlledSelected, onSelect, style, fullWidth, }: ChipRowProps): react_jsx_runtime.JSX.Element;
|
|
119
|
+
|
|
120
|
+
declare enum SearchBarStyle {
|
|
121
|
+
DEFAULT = "DEFAULT",
|
|
122
|
+
LIGHT = "LIGHT",
|
|
123
|
+
DARKNESS = "DARKNESS"
|
|
124
|
+
}
|
|
125
|
+
type SearchBarProps = {
|
|
126
|
+
placeholder?: string;
|
|
127
|
+
value?: string;
|
|
128
|
+
onChangeText?: (text: string) => void;
|
|
129
|
+
style?: SearchBarStyle;
|
|
130
|
+
icon?: IconName;
|
|
131
|
+
bgColor?: string;
|
|
132
|
+
onFocus?: () => void;
|
|
133
|
+
onBlur?: () => void;
|
|
134
|
+
};
|
|
135
|
+
declare function SearchBar({ placeholder, value, onChangeText, style, icon, bgColor, onFocus, onBlur, }: SearchBarProps): react_jsx_runtime.JSX.Element;
|
|
136
|
+
|
|
137
|
+
declare enum HeaderBarStyle {
|
|
138
|
+
DEFAULT = "DEFAULT",
|
|
139
|
+
DARKNESS = "DARKNESS"
|
|
140
|
+
}
|
|
141
|
+
type HeaderBarProps = {
|
|
142
|
+
title: string;
|
|
143
|
+
/** Texto secundario debajo del título (opcional). */
|
|
144
|
+
description?: string;
|
|
145
|
+
style?: HeaderBarStyle;
|
|
146
|
+
/** Acción del botón de menú (hamburguesa, lado izquierdo). */
|
|
147
|
+
onMenuPress?: () => void;
|
|
148
|
+
menuIcon?: IconName;
|
|
149
|
+
};
|
|
150
|
+
declare function HeaderBar({ title, description, style, onMenuPress, menuIcon, }: HeaderBarProps): react_jsx_runtime.JSX.Element;
|
|
151
|
+
|
|
152
|
+
declare enum StateMessageType {
|
|
153
|
+
LOADING = "LOADING",
|
|
154
|
+
EMPTY = "EMPTY",
|
|
155
|
+
ERROR = "ERROR"
|
|
156
|
+
}
|
|
157
|
+
declare enum StateMessageStyle {
|
|
158
|
+
DEFAULT = "DEFAULT",
|
|
159
|
+
DARKNESS = "DARKNESS"
|
|
160
|
+
}
|
|
161
|
+
type StateMessageProps = {
|
|
162
|
+
/** Qué estado representa el mensaje. */
|
|
163
|
+
state: StateMessageType;
|
|
164
|
+
/** Icono del mensaje (AppIcon). Default por estado: loader / inbox / alerta. */
|
|
165
|
+
icon?: IconName;
|
|
166
|
+
/** Texto principal. Default por estado si se omite. */
|
|
167
|
+
title?: string;
|
|
168
|
+
/** Texto secundario bajo el título (opcional). */
|
|
169
|
+
message?: string;
|
|
170
|
+
/** Label del botón de acción (ej. "Reintentar"). Si se omite, no hay botón. */
|
|
171
|
+
actionLabel?: string;
|
|
172
|
+
onAction?: () => void;
|
|
173
|
+
style?: StateMessageStyle;
|
|
174
|
+
};
|
|
175
|
+
declare function StateMessage({ state, icon, title, message, actionLabel, onAction, style, }: StateMessageProps): react_jsx_runtime.JSX.Element;
|
|
176
|
+
|
|
177
|
+
declare enum DrawerMenuItemStyle {
|
|
178
|
+
DEFAULT = "DEFAULT",
|
|
179
|
+
DARKNESS = "DARKNESS"
|
|
180
|
+
}
|
|
181
|
+
type DrawerMenuItemProps = {
|
|
182
|
+
icon?: IconName;
|
|
183
|
+
label: string;
|
|
184
|
+
onPress?: () => void;
|
|
185
|
+
selected?: boolean;
|
|
186
|
+
style?: DrawerMenuItemStyle;
|
|
187
|
+
};
|
|
188
|
+
declare function DrawerMenuItem({ icon, label, onPress, selected, style, }: DrawerMenuItemProps): react_jsx_runtime.JSX.Element;
|
|
189
|
+
|
|
190
|
+
declare enum CategoryTextStyle {
|
|
191
|
+
DEFAULT = "DEFAULT",
|
|
192
|
+
LIGHT = "LIGHT",
|
|
193
|
+
DARKNESS = "DARKNESS"
|
|
194
|
+
}
|
|
195
|
+
type CategoryTextProps = {
|
|
196
|
+
title: string;
|
|
197
|
+
action?: string;
|
|
198
|
+
onAction?: () => void;
|
|
199
|
+
style?: CategoryTextStyle;
|
|
200
|
+
};
|
|
201
|
+
declare function CategoryText({ title, action, onAction, style, }: CategoryTextProps): react_jsx_runtime.JSX.Element;
|
|
202
|
+
|
|
203
|
+
type BottomSheetProps = {
|
|
204
|
+
visible: boolean;
|
|
205
|
+
onClose: () => void;
|
|
206
|
+
dismissible?: boolean;
|
|
207
|
+
showCloseButton?: boolean;
|
|
208
|
+
icon?: IconName;
|
|
209
|
+
title?: string;
|
|
210
|
+
caption?: string;
|
|
211
|
+
children: React.ReactNode;
|
|
212
|
+
contentStyle?: StyleProp<ViewStyle>;
|
|
213
|
+
snapPoints?: Array<string | number>;
|
|
214
|
+
};
|
|
215
|
+
declare function BottomSheet({ visible, onClose, dismissible, showCloseButton, icon, title, caption, children, contentStyle, snapPoints, }: BottomSheetProps): react_jsx_runtime.JSX.Element;
|
|
216
|
+
|
|
217
|
+
type CardStackSheetProps = {
|
|
218
|
+
visible: boolean;
|
|
219
|
+
onClose: () => void;
|
|
220
|
+
dismissible?: boolean;
|
|
221
|
+
children: React.ReactNode;
|
|
222
|
+
contentStyle?: StyleProp<ViewStyle>;
|
|
223
|
+
snapPoints?: Array<string | number>;
|
|
224
|
+
};
|
|
225
|
+
declare function CardStackSheet({ visible, onClose, dismissible, children, contentStyle, snapPoints, }: CardStackSheetProps): react_jsx_runtime.JSX.Element;
|
|
226
|
+
|
|
227
|
+
declare enum OptionListItemVariant {
|
|
228
|
+
Default = "default",
|
|
229
|
+
Destructive = "destructive"
|
|
230
|
+
}
|
|
231
|
+
type OptionListItemProps = {
|
|
232
|
+
icon: IconName;
|
|
233
|
+
title: string;
|
|
234
|
+
description?: string;
|
|
235
|
+
onPress: () => void;
|
|
236
|
+
variant?: OptionListItemVariant;
|
|
237
|
+
trailing?: IconName;
|
|
238
|
+
/** Color del ícono. Por defecto el color de texto; en Destructive rojo. */
|
|
239
|
+
iconColor?: string;
|
|
240
|
+
showSeparator?: boolean;
|
|
241
|
+
style?: StyleProp<ViewStyle>;
|
|
242
|
+
};
|
|
243
|
+
declare function OptionListItem({ icon, title, description, onPress, variant, trailing, iconColor, showSeparator, style, }: OptionListItemProps): react_jsx_runtime.JSX.Element;
|
|
244
|
+
|
|
245
|
+
declare enum ToastTone {
|
|
246
|
+
Success = "success",
|
|
247
|
+
Error = "error",
|
|
248
|
+
Warning = "warning",
|
|
249
|
+
Info = "info"
|
|
250
|
+
}
|
|
251
|
+
declare enum ToastStyle {
|
|
252
|
+
DEFAULT = "DEFAULT",
|
|
253
|
+
DARKNESS = "DARKNESS"
|
|
254
|
+
}
|
|
255
|
+
type ToastProps = {
|
|
256
|
+
message: string;
|
|
257
|
+
tone?: ToastTone;
|
|
258
|
+
style?: ToastStyle;
|
|
259
|
+
/** Si se define, muestra botón de cerrar (toast manual). */
|
|
260
|
+
onClose?: () => void;
|
|
261
|
+
containerStyle?: StyleProp<ViewStyle>;
|
|
262
|
+
/** Padding superior (p. ej. insets.top) para que el fondo se extienda por detrás de la status bar. */
|
|
263
|
+
topInset?: number;
|
|
264
|
+
};
|
|
265
|
+
declare function Toast({ message, tone, style, onClose, containerStyle, topInset, }: ToastProps): react_jsx_runtime.JSX.Element;
|
|
266
|
+
|
|
267
|
+
declare const TOAST_DEFAULT_DURATION_MS = 3000;
|
|
268
|
+
type ToastOptions = {
|
|
269
|
+
message: string;
|
|
270
|
+
tone?: ToastTone;
|
|
271
|
+
/** Milisegundos hasta el auto-cierre. Default: 3000. Con 0 no se autocierra y muestra botón de cerrar. */
|
|
272
|
+
duration?: number;
|
|
273
|
+
};
|
|
274
|
+
type ToastContextValue = {
|
|
275
|
+
showToast: (options: ToastOptions) => void;
|
|
276
|
+
};
|
|
277
|
+
declare function useToast(): ToastContextValue;
|
|
278
|
+
declare function ToastProvider({ children }: {
|
|
279
|
+
children: ReactNode;
|
|
280
|
+
}): react_jsx_runtime.JSX.Element;
|
|
281
|
+
|
|
282
|
+
type ModalProps = {
|
|
283
|
+
visible: boolean;
|
|
284
|
+
onClose: () => void;
|
|
285
|
+
dismissible?: boolean;
|
|
286
|
+
showCloseButton?: boolean;
|
|
287
|
+
icon?: IconName;
|
|
288
|
+
title?: string;
|
|
289
|
+
caption?: string;
|
|
290
|
+
children: React.ReactNode;
|
|
291
|
+
contentStyle?: StyleProp<ViewStyle>;
|
|
292
|
+
};
|
|
293
|
+
declare function Modal({ visible, onClose, dismissible, showCloseButton, icon, title, caption, children, contentStyle, }: ModalProps): react_jsx_runtime.JSX.Element;
|
|
294
|
+
|
|
295
|
+
declare enum AppDialogMode {
|
|
296
|
+
Dismissable = "dismissable",
|
|
297
|
+
Required = "required"
|
|
298
|
+
}
|
|
299
|
+
type AppResponsiveDialogProps = {
|
|
300
|
+
visible: boolean;
|
|
301
|
+
onClose: () => void;
|
|
302
|
+
mode?: AppDialogMode;
|
|
303
|
+
icon?: IconName;
|
|
304
|
+
title?: string;
|
|
305
|
+
caption?: string;
|
|
306
|
+
children: React.ReactNode;
|
|
307
|
+
contentStyle?: React.ComponentProps<typeof BottomSheet>["contentStyle"];
|
|
308
|
+
snapPoints?: React.ComponentProps<typeof BottomSheet>["snapPoints"];
|
|
309
|
+
};
|
|
310
|
+
declare function AppResponsiveDialog({ visible, onClose, mode, icon, title, caption, children, contentStyle, snapPoints, }: AppResponsiveDialogProps): react_jsx_runtime.JSX.Element;
|
|
311
|
+
|
|
312
|
+
type AppFilterChipOption = {
|
|
313
|
+
label: string;
|
|
314
|
+
value: string;
|
|
315
|
+
};
|
|
316
|
+
type AppFilterChipsProps = {
|
|
317
|
+
options: AppFilterChipOption[];
|
|
318
|
+
value?: string;
|
|
319
|
+
onChange?: (value: string) => void;
|
|
320
|
+
style?: StyleProp<ViewStyle>;
|
|
321
|
+
};
|
|
322
|
+
declare function AppFilterChips({ options, value, onChange, style }: AppFilterChipsProps): react_jsx_runtime.JSX.Element;
|
|
323
|
+
|
|
324
|
+
type PinKeypadProps = {
|
|
325
|
+
value: string;
|
|
326
|
+
onChange: (value: string) => void;
|
|
327
|
+
onComplete?: (pin: string) => void;
|
|
328
|
+
pinLength?: number;
|
|
329
|
+
style?: StyleProp<ViewStyle>;
|
|
330
|
+
};
|
|
331
|
+
declare function PinKeypad({ value, onChange, onComplete, pinLength, style }: PinKeypadProps): react_jsx_runtime.JSX.Element;
|
|
332
|
+
|
|
333
|
+
type AppCheckItemStatus = "pending" | "ok" | "not-ok";
|
|
334
|
+
type AppCheckItemProps = {
|
|
335
|
+
label: string;
|
|
336
|
+
description?: string;
|
|
337
|
+
value?: AppCheckItemStatus;
|
|
338
|
+
comment?: string;
|
|
339
|
+
hasMessages?: boolean;
|
|
340
|
+
noActions?: boolean;
|
|
341
|
+
readOnly?: boolean;
|
|
342
|
+
onOpenMessages?: () => void;
|
|
343
|
+
onPress?: () => void;
|
|
344
|
+
onChange?: (status: AppCheckItemStatus) => void;
|
|
345
|
+
onCommentChange?: (comment: string) => void;
|
|
346
|
+
style?: StyleProp<ViewStyle>;
|
|
347
|
+
};
|
|
348
|
+
declare function AppCheckItem({ label, description, value, comment, hasMessages, noActions, readOnly, onOpenMessages, onPress, onChange, onCommentChange, style, }: AppCheckItemProps): react_jsx_runtime.JSX.Element;
|
|
349
|
+
|
|
350
|
+
type DonutSegment = {
|
|
351
|
+
/** Fracción del anillo (0-1) que ocupa el segmento. */
|
|
352
|
+
value: number;
|
|
353
|
+
color: string;
|
|
354
|
+
};
|
|
355
|
+
interface DonutChartProps extends ViewProps {
|
|
356
|
+
size?: number;
|
|
357
|
+
thickness?: number;
|
|
358
|
+
segments: DonutSegment[];
|
|
359
|
+
trackColor?: string;
|
|
360
|
+
startAngle?: number;
|
|
361
|
+
children?: React.ReactNode;
|
|
362
|
+
}
|
|
363
|
+
declare function DonutChart({ size, thickness, segments, trackColor, startAngle, style, children, ...rest }: DonutChartProps): react_jsx_runtime.JSX.Element;
|
|
364
|
+
|
|
365
|
+
type SidebarItem = {
|
|
366
|
+
id: string;
|
|
367
|
+
label: string;
|
|
368
|
+
icon?: IconName;
|
|
369
|
+
badge?: string | number;
|
|
370
|
+
active?: boolean;
|
|
371
|
+
disabled?: boolean;
|
|
372
|
+
onPress?: () => void;
|
|
373
|
+
accessibilityLabel?: string;
|
|
374
|
+
testID?: string;
|
|
375
|
+
};
|
|
376
|
+
type SidebarSection = {
|
|
377
|
+
id: string;
|
|
378
|
+
title?: string;
|
|
379
|
+
items: SidebarItem[];
|
|
380
|
+
};
|
|
381
|
+
type SidebarType = "responsive" | "full" | "icon";
|
|
382
|
+
type DashboardShellProps = {
|
|
383
|
+
sections: SidebarSection[];
|
|
384
|
+
sidebarHeader?: React.ReactNode;
|
|
385
|
+
sidebarFooter?: React.ReactNode;
|
|
386
|
+
topBar?: React.ReactNode;
|
|
387
|
+
title?: string;
|
|
388
|
+
brand?: string;
|
|
389
|
+
logoutLabel?: string;
|
|
390
|
+
onLogout?: () => void;
|
|
391
|
+
type?: SidebarType;
|
|
392
|
+
themeMode?: "light" | "dark";
|
|
393
|
+
tokens?: Partial<DashboardShellTokens>;
|
|
394
|
+
selectedItemId?: string;
|
|
395
|
+
children: React.ReactNode;
|
|
396
|
+
};
|
|
397
|
+
|
|
398
|
+
declare function DashboardShell({ sections, sidebarHeader, sidebarFooter, topBar, title, brand, logoutLabel, onLogout, type, themeMode, tokens, selectedItemId, children, }: DashboardShellProps): react_jsx_runtime.JSX.Element;
|
|
399
|
+
|
|
400
|
+
type DockItem = {
|
|
401
|
+
icon: IconName;
|
|
402
|
+
label: string;
|
|
403
|
+
};
|
|
404
|
+
type DockProps = {
|
|
405
|
+
items: DockItem[];
|
|
406
|
+
selectedIndex: number;
|
|
407
|
+
onSelect: (index: number) => void;
|
|
408
|
+
visible: boolean;
|
|
409
|
+
/**
|
|
410
|
+
* Activa el "modo agente": muestra el orb de composición a la derecha de
|
|
411
|
+
* la barra. Se pausa solo cuando el dock no es visible.
|
|
412
|
+
* El componente se provee desde afuera via `renderAgentOrb`.
|
|
413
|
+
*/
|
|
414
|
+
agentMode?: boolean;
|
|
415
|
+
renderAgentOrb?: React.ComponentType<{
|
|
416
|
+
size: number;
|
|
417
|
+
paused: boolean;
|
|
418
|
+
}>;
|
|
419
|
+
style?: StyleProp<ViewStyle>;
|
|
420
|
+
};
|
|
421
|
+
declare function Dock({ items, selectedIndex, onSelect, visible, agentMode, renderAgentOrb, style }: DockProps): react_jsx_runtime.JSX.Element;
|
|
422
|
+
|
|
423
|
+
type DrawerMenuItemType = {
|
|
424
|
+
icon?: IconName;
|
|
425
|
+
label: string;
|
|
426
|
+
onPress: () => void;
|
|
427
|
+
selected?: boolean;
|
|
428
|
+
};
|
|
429
|
+
type DrawerMenuProps = {
|
|
430
|
+
visible: boolean;
|
|
431
|
+
onClose: () => void;
|
|
432
|
+
side?: "left" | "right";
|
|
433
|
+
width?: number;
|
|
434
|
+
items?: DrawerMenuItemType[];
|
|
435
|
+
header?: React.ReactNode;
|
|
436
|
+
footer?: React.ReactNode;
|
|
437
|
+
dismissible?: boolean;
|
|
438
|
+
customizable?: boolean;
|
|
439
|
+
itemStyle?: DrawerMenuItemStyle;
|
|
440
|
+
};
|
|
441
|
+
declare function DrawerMenu({ visible, onClose, side, width: widthProp, items, header, footer, dismissible, customizable, itemStyle, }: DrawerMenuProps): react_jsx_runtime.JSX.Element;
|
|
442
|
+
|
|
443
|
+
type ColorWheelProps = {
|
|
444
|
+
onPress: () => void;
|
|
445
|
+
size?: number;
|
|
446
|
+
};
|
|
447
|
+
declare function ColorWheel({ onPress, size }: ColorWheelProps): react_jsx_runtime.JSX.Element;
|
|
448
|
+
|
|
449
|
+
type ColorToken = {
|
|
450
|
+
/** Nombre legible del token (ej: "Fondo panel") */
|
|
451
|
+
name: string;
|
|
452
|
+
/** Token key interno (ej: "panelBg") */
|
|
453
|
+
key: string;
|
|
454
|
+
/** Valor hex actual (ej: "#020617") */
|
|
455
|
+
value: string;
|
|
456
|
+
/** Nombre del token de paleta si coincide (ej: "N950", "M600") */
|
|
457
|
+
tokenName?: string;
|
|
458
|
+
};
|
|
459
|
+
|
|
460
|
+
type ColorCustomizerDialogProps = {
|
|
461
|
+
visible: boolean;
|
|
462
|
+
onClose: () => void;
|
|
463
|
+
componentName: string;
|
|
464
|
+
tokens: ColorToken[];
|
|
465
|
+
onTokenChange: (key: string, value: string) => void;
|
|
466
|
+
};
|
|
467
|
+
declare function ColorCustomizerDialog({ visible, onClose, componentName, tokens, onTokenChange, }: ColorCustomizerDialogProps): react_jsx_runtime.JSX.Element;
|
|
468
|
+
|
|
469
|
+
interface ComposingOrbProps {
|
|
470
|
+
/** Rendered size in points. Default 64. */
|
|
471
|
+
size?: number;
|
|
472
|
+
/** Freeze the animation (stops the frame callback). */
|
|
473
|
+
paused?: boolean;
|
|
474
|
+
/** Multiplier over the tuned clock speed. Default 1. */
|
|
475
|
+
speed?: number;
|
|
476
|
+
/**
|
|
477
|
+
* Dot color as any RN/Skia color string (e.g. `"#000000"`). Defaults to
|
|
478
|
+
* white — ideal on dark surfaces; use black on light ones.
|
|
479
|
+
*/
|
|
480
|
+
color?: string;
|
|
481
|
+
/** Extra rotation in radians, added to the mode's own motion. */
|
|
482
|
+
tilt?: {
|
|
483
|
+
yaw?: number;
|
|
484
|
+
pitch?: number;
|
|
485
|
+
roll?: number;
|
|
486
|
+
};
|
|
487
|
+
style?: StyleProp<ViewStyle>;
|
|
488
|
+
accessibilityLabel?: string;
|
|
489
|
+
/** Optional out-slot that receives the per-frame build cost (ms). */
|
|
490
|
+
debugFrameMs?: {
|
|
491
|
+
set(value: number): void;
|
|
492
|
+
};
|
|
493
|
+
}
|
|
494
|
+
declare function ComposingOrb({ size, style, accessibilityLabel, ...rest }: ComposingOrbProps): react_jsx_runtime.JSX.Element;
|
|
495
|
+
|
|
496
|
+
type DropdownOption = {
|
|
497
|
+
label: string;
|
|
498
|
+
value: string;
|
|
499
|
+
icon?: IconName;
|
|
500
|
+
disabled?: boolean;
|
|
501
|
+
};
|
|
502
|
+
type DropdownState = {
|
|
503
|
+
value: string;
|
|
504
|
+
open: boolean;
|
|
505
|
+
};
|
|
506
|
+
type DropdownProps = {
|
|
507
|
+
value?: string;
|
|
508
|
+
placeholder?: string;
|
|
509
|
+
options: DropdownOption[];
|
|
510
|
+
onChange: (option: DropdownOption) => void;
|
|
511
|
+
style?: ViewStyle;
|
|
512
|
+
maxHeight?: number;
|
|
513
|
+
disabled?: boolean;
|
|
514
|
+
};
|
|
515
|
+
declare function Dropdown({ value, placeholder, options, onChange, style, maxHeight, disabled, }: DropdownProps): react_jsx_runtime.JSX.Element;
|
|
516
|
+
|
|
517
|
+
type FloatingActionButtonPosition = "bottom-right" | "bottom-left";
|
|
518
|
+
interface FloatingActionButtonProps {
|
|
519
|
+
icon?: IconName;
|
|
520
|
+
onPress: () => void;
|
|
521
|
+
/** Esquina donde se ancla el FAB. Default `bottom-right`. */
|
|
522
|
+
position?: FloatingActionButtonPosition;
|
|
523
|
+
style?: StyleProp<ViewStyle>;
|
|
524
|
+
}
|
|
525
|
+
declare function FloatingActionButton({ icon, onPress, position, style, }: FloatingActionButtonProps): react_jsx_runtime.JSX.Element;
|
|
526
|
+
|
|
527
|
+
type HeaderCardLayoutProps = {
|
|
528
|
+
headerBackgroundColor?: string;
|
|
529
|
+
bodyBackgroundColor?: string;
|
|
530
|
+
header: React.ReactNode;
|
|
531
|
+
children: React.ReactNode;
|
|
532
|
+
style?: StyleProp<ViewStyle>;
|
|
533
|
+
};
|
|
534
|
+
declare function HeaderCardLayout({ headerBackgroundColor, bodyBackgroundColor, header, children, style, }: HeaderCardLayoutProps): react_jsx_runtime.JSX.Element;
|
|
535
|
+
|
|
536
|
+
type ReverseHeaderCardLayoutProps = {
|
|
537
|
+
headerBackgroundColor?: string;
|
|
538
|
+
bodyBackgroundColor?: string;
|
|
539
|
+
header: React.ReactNode;
|
|
540
|
+
children: React.ReactNode;
|
|
541
|
+
style?: StyleProp<ViewStyle>;
|
|
542
|
+
};
|
|
543
|
+
declare function ReverseHeaderCardLayout({ headerBackgroundColor, bodyBackgroundColor, header, children, style, }: ReverseHeaderCardLayoutProps): react_jsx_runtime.JSX.Element;
|
|
544
|
+
|
|
545
|
+
interface InputProps extends TextInputProps {
|
|
546
|
+
icon?: IconName;
|
|
547
|
+
}
|
|
548
|
+
declare function Input({ style, placeholderTextColor, icon, ...rest }: InputProps): react_jsx_runtime.JSX.Element;
|
|
549
|
+
|
|
550
|
+
type LayoutRowChildProps = {
|
|
551
|
+
size?: LayoutRowSize;
|
|
552
|
+
scroll?: boolean;
|
|
553
|
+
children: ReactNode;
|
|
554
|
+
};
|
|
555
|
+
type LayoutRowProps = {
|
|
556
|
+
debug?: boolean;
|
|
557
|
+
fill?: boolean;
|
|
558
|
+
gap?: number;
|
|
559
|
+
padding?: number;
|
|
560
|
+
} & ViewProps;
|
|
561
|
+
declare function LayoutRowFirst({ size, scroll, children }: LayoutRowChildProps): react_jsx_runtime.JSX.Element;
|
|
562
|
+
declare function LayoutRowSecond({ size, scroll, children }: LayoutRowChildProps): react_jsx_runtime.JSX.Element;
|
|
563
|
+
declare function LayoutRow({ debug, fill, gap, padding, style, children, ...rest }: LayoutRowProps): react_jsx_runtime.JSX.Element;
|
|
564
|
+
declare namespace LayoutRow {
|
|
565
|
+
var First: typeof LayoutRowFirst;
|
|
566
|
+
var Second: typeof LayoutRowSecond;
|
|
567
|
+
}
|
|
568
|
+
|
|
569
|
+
type LayoutColumnChildProps = {
|
|
570
|
+
size?: LayoutColumnSize;
|
|
571
|
+
scroll?: boolean;
|
|
572
|
+
children: ReactNode;
|
|
573
|
+
};
|
|
574
|
+
type LayoutColumnProps = {
|
|
575
|
+
debug?: boolean;
|
|
576
|
+
fill?: boolean;
|
|
577
|
+
gap?: number;
|
|
578
|
+
padding?: number;
|
|
579
|
+
} & ViewProps;
|
|
580
|
+
declare function LayoutColumnFirst({ size, scroll, children }: LayoutColumnChildProps): react_jsx_runtime.JSX.Element;
|
|
581
|
+
declare function LayoutColumnSecond({ size, scroll, children }: LayoutColumnChildProps): react_jsx_runtime.JSX.Element;
|
|
582
|
+
declare function LayoutColumn({ debug, fill, gap, padding, style, children, ...rest }: LayoutColumnProps): react_jsx_runtime.JSX.Element;
|
|
583
|
+
declare namespace LayoutColumn {
|
|
584
|
+
var First: typeof LayoutColumnFirst;
|
|
585
|
+
var Second: typeof LayoutColumnSecond;
|
|
586
|
+
}
|
|
587
|
+
|
|
588
|
+
type SkeletonShape = "rect" | "circle";
|
|
589
|
+
interface SkeletonProps {
|
|
590
|
+
/** Ancho del bloque: número (px) o string (ej. "100%", "60%"). */
|
|
591
|
+
width?: number | string;
|
|
592
|
+
/** Alto del bloque en px. Para `shape="circle"` debe ser numérico. */
|
|
593
|
+
height?: number | string;
|
|
594
|
+
/** Radio de esquinas (solo para `shape="rect"`). Default `radius.sm`. */
|
|
595
|
+
borderRadius?: number;
|
|
596
|
+
/** `rect` por defecto; `circle` dibuja un círculo perfecto. */
|
|
597
|
+
shape?: SkeletonShape;
|
|
598
|
+
style?: StyleProp<ViewStyle>;
|
|
599
|
+
}
|
|
600
|
+
declare function Skeleton({ width, height, borderRadius, shape, style, }: SkeletonProps): react_jsx_runtime.JSX.Element;
|
|
601
|
+
|
|
602
|
+
interface SkeletonTextProps {
|
|
603
|
+
/** Ancho de la línea: número (px) o string (ej. "100%", "60%"). */
|
|
604
|
+
width?: number | string;
|
|
605
|
+
/** Alto de la línea en px (default 14, imita un `Caption`/`Body`). */
|
|
606
|
+
height?: number;
|
|
607
|
+
style?: StyleProp<ViewStyle>;
|
|
608
|
+
}
|
|
609
|
+
declare function SkeletonText({ width, height, style, }: SkeletonTextProps): react_jsx_runtime.JSX.Element;
|
|
610
|
+
|
|
611
|
+
interface SkeletonCircleProps {
|
|
612
|
+
/** Diámetro del círculo en px (default 32, imita iconos/avatares). */
|
|
613
|
+
size?: number;
|
|
614
|
+
style?: StyleProp<ViewStyle>;
|
|
615
|
+
}
|
|
616
|
+
declare function SkeletonCircle({ size, style }: SkeletonCircleProps): react_jsx_runtime.JSX.Element;
|
|
617
|
+
|
|
618
|
+
interface SkeletonCardProps extends ViewProps {
|
|
619
|
+
/** Altura mínima del frame (útil cuando el esqueleto aún no define contenido). */
|
|
620
|
+
height?: number | string;
|
|
621
|
+
}
|
|
622
|
+
/**
|
|
623
|
+
* Frame que imita el layout de una `Card` para alojar bloques de esqueleto
|
|
624
|
+
* (`SkeletonText`, `SkeletonCircle`) como hijos. El frame NO anima: los
|
|
625
|
+
* bloques internos son los que pulsan.
|
|
626
|
+
*/
|
|
627
|
+
declare function SkeletonCard({ height, style, children, ...rest }: SkeletonCardProps): react_jsx_runtime.JSX.Element;
|
|
628
|
+
|
|
629
|
+
interface ToolItem {
|
|
630
|
+
id: string;
|
|
631
|
+
icon: IconName;
|
|
632
|
+
label: string;
|
|
633
|
+
onPress?: () => void;
|
|
634
|
+
}
|
|
635
|
+
interface ToolsCardProps {
|
|
636
|
+
tools: ToolItem[];
|
|
637
|
+
style?: ViewStyle;
|
|
638
|
+
}
|
|
639
|
+
declare function ToolsCard({ tools, style }: ToolsCardProps): react_jsx_runtime.JSX.Element;
|
|
640
|
+
|
|
641
|
+
type TreeNode = {
|
|
642
|
+
id: string;
|
|
643
|
+
code: string;
|
|
644
|
+
name: string;
|
|
645
|
+
children: TreeNode[];
|
|
646
|
+
};
|
|
647
|
+
type TreeEditorMode = "view" | "edit";
|
|
648
|
+
type TreeEditorVariant = "default" | "darkness";
|
|
649
|
+
type TreeEditorProps = {
|
|
650
|
+
value: TreeNode[];
|
|
651
|
+
onChange: (value: TreeNode[]) => void;
|
|
652
|
+
/** Default: "view" (solo visualización). Con "edit" se muestran las acciones. */
|
|
653
|
+
mode?: TreeEditorMode;
|
|
654
|
+
/** Variant visual del árbol. Default: "default". "darkness" usa cards oscuras individuales. */
|
|
655
|
+
variant?: TreeEditorVariant;
|
|
656
|
+
/** Estado controlado de nodos colapsados. Si se provee, sobreescribe el estado interno. */
|
|
657
|
+
collapsed?: Record<string, boolean>;
|
|
658
|
+
/** Callback cuando cambia el estado de colapso de un nodo. Requiere `collapsed` controlado. */
|
|
659
|
+
onCollapsedChange?: (collapsed: Record<string, boolean>) => void;
|
|
660
|
+
/** Etiqueta del botón de agregar raíz (solo modo edición). Default: "Agregar raíz". */
|
|
661
|
+
rootLabel?: string;
|
|
662
|
+
/** Render custom para el contenido de cada nodo. Recibe el nodo y el render por defecto. */
|
|
663
|
+
renderNode?: (node: TreeNode, defaultContent: React.ReactNode) => React.ReactNode;
|
|
664
|
+
/** Called when user taps any add button/row. When provided, the built-in add dialog is bypassed. */
|
|
665
|
+
onRequestAdd?: (parentId: string | null) => void;
|
|
666
|
+
/** Called when user taps "Editar" from the node menu. When provided, the built-in edit dialog is bypassed. */
|
|
667
|
+
onRequestEdit?: (node: TreeNode) => void;
|
|
668
|
+
/** Called when the user confirms deletion of a node. When provided, the built-in removal is bypassed (the node is NOT deleted). */
|
|
669
|
+
onRequestDelete?: (node: TreeNode) => void;
|
|
670
|
+
style?: StyleProp<ViewStyle>;
|
|
671
|
+
};
|
|
672
|
+
declare function createNode(code: string, name: string, children?: TreeNode[]): TreeNode;
|
|
673
|
+
declare function addChild(nodes: TreeNode[], parentId: string, node: TreeNode): TreeNode[];
|
|
674
|
+
declare function addSibling(nodes: TreeNode[], nodeId: string, node: TreeNode): TreeNode[];
|
|
675
|
+
declare function updateNode(nodes: TreeNode[], nodeId: string, patch: Partial<Pick<TreeNode, "code" | "name">>): TreeNode[];
|
|
676
|
+
declare function removeNode(nodes: TreeNode[], nodeId: string): TreeNode[];
|
|
677
|
+
declare function findNode(nodes: TreeNode[], nodeId: string): TreeNode | undefined;
|
|
678
|
+
declare function hasCode(nodes: TreeNode[], code: string, excludeId?: string): boolean;
|
|
679
|
+
declare function countNodes(nodes: TreeNode[]): number;
|
|
680
|
+
/**
|
|
681
|
+
* Estado colapso inicial: todo contraído salvo la primera raíz, que se muestra
|
|
682
|
+
* expandida con su primer nivel visible.
|
|
683
|
+
*/
|
|
684
|
+
declare function buildInitialCollapsed(nodes: TreeNode[]): Record<string, boolean>;
|
|
685
|
+
declare function TreeEditor({ value, onChange, mode, variant, collapsed: collapsedProp, onCollapsedChange, rootLabel, renderNode, onRequestAdd, onRequestEdit, onRequestDelete, style }: TreeEditorProps): react_jsx_runtime.JSX.Element;
|
|
686
|
+
|
|
687
|
+
interface TextFieldProps {
|
|
688
|
+
label: string;
|
|
689
|
+
value: string;
|
|
690
|
+
onChangeText: (value: string) => void;
|
|
691
|
+
placeholder?: string;
|
|
692
|
+
/** Default `true`. */
|
|
693
|
+
editable?: boolean;
|
|
694
|
+
/** Default `false`. */
|
|
695
|
+
secureTextEntry?: boolean;
|
|
696
|
+
keyboardType?: KeyboardTypeOptions;
|
|
697
|
+
autoCapitalize?: "none" | "sentences" | "words" | "characters";
|
|
698
|
+
maxLength?: number;
|
|
699
|
+
/** Default `false`. */
|
|
700
|
+
multiline?: boolean;
|
|
701
|
+
/** Texto de error opcional, se muestra debajo del campo en rojo. */
|
|
702
|
+
error?: string;
|
|
703
|
+
/** Estilo del contenedor (label + campo). */
|
|
704
|
+
style?: StyleProp<ViewStyle>;
|
|
705
|
+
}
|
|
706
|
+
declare function TextField({ label, value, onChangeText, placeholder, editable, secureTextEntry, keyboardType, autoCapitalize, maxLength, multiline, error, style, }: TextFieldProps): react_jsx_runtime.JSX.Element;
|
|
707
|
+
|
|
708
|
+
type SplitColorCardProps = {
|
|
709
|
+
label: string;
|
|
710
|
+
lightHex: string;
|
|
711
|
+
darkHex: string;
|
|
712
|
+
lightTokenName: string;
|
|
713
|
+
darkTokenName: string;
|
|
714
|
+
onPress?: () => void;
|
|
715
|
+
};
|
|
716
|
+
declare function SplitColorCard({ label, lightHex, darkHex, lightTokenName, darkTokenName, onPress, }: SplitColorCardProps): react_jsx_runtime.JSX.Element;
|
|
717
|
+
type SplitTextCardProps = {
|
|
718
|
+
label: string;
|
|
719
|
+
lightHex: string;
|
|
720
|
+
darkHex: string;
|
|
721
|
+
lightBgHex: string;
|
|
722
|
+
darkBgHex: string;
|
|
723
|
+
lightTokenName: string;
|
|
724
|
+
darkTokenName: string;
|
|
725
|
+
textContent?: string;
|
|
726
|
+
onPress?: () => void;
|
|
727
|
+
};
|
|
728
|
+
declare function SplitTextCard({ label, lightHex, darkHex, lightBgHex, darkBgHex, lightTokenName, darkTokenName, textContent, onPress, }: SplitTextCardProps): react_jsx_runtime.JSX.Element;
|
|
729
|
+
type SplitDarknessCardProps = {
|
|
730
|
+
label: string;
|
|
731
|
+
lightHex: string;
|
|
732
|
+
darkHex: string;
|
|
733
|
+
lightTokenName: string;
|
|
734
|
+
darkTokenName: string;
|
|
735
|
+
lightKey: string;
|
|
736
|
+
darkKey: string;
|
|
737
|
+
onPress?: () => void;
|
|
738
|
+
};
|
|
739
|
+
declare function SplitDarknessCard({ label, lightHex, darkHex, lightTokenName, darkTokenName, lightKey, darkKey, onPress, }: SplitDarknessCardProps): react_jsx_runtime.JSX.Element;
|
|
740
|
+
|
|
741
|
+
type TextVariant = TextType;
|
|
742
|
+
interface TextProps extends TextProps$1 {
|
|
743
|
+
variant?: TextVariant;
|
|
744
|
+
color?: string;
|
|
745
|
+
}
|
|
746
|
+
declare function Text({ variant, color, style, ...rest }: TextProps): react_jsx_runtime.JSX.Element;
|
|
747
|
+
|
|
748
|
+
interface AppTextHeaderProps {
|
|
749
|
+
heading: string;
|
|
750
|
+
caption?: string;
|
|
751
|
+
style?: ViewStyle;
|
|
752
|
+
}
|
|
753
|
+
declare function AppTextHeader({ heading, caption, style }: AppTextHeaderProps): react_jsx_runtime.JSX.Element;
|
|
754
|
+
|
|
755
|
+
interface EmptyStateProps {
|
|
756
|
+
icon?: IconName;
|
|
757
|
+
iconSize?: number;
|
|
758
|
+
title: string;
|
|
759
|
+
caption?: string;
|
|
760
|
+
style?: ViewStyle;
|
|
761
|
+
}
|
|
762
|
+
declare function EmptyState({ icon, iconSize, title, caption, style }: EmptyStateProps): react_jsx_runtime.JSX.Element;
|
|
763
|
+
|
|
764
|
+
type AppInputProps = {
|
|
765
|
+
label: string;
|
|
766
|
+
labelWidth?: number;
|
|
767
|
+
};
|
|
768
|
+
type AppInputElement = ReactElement<AppInputProps>;
|
|
769
|
+
|
|
770
|
+
type AppFormCardProps = {
|
|
771
|
+
children: AppInputElement | AppInputElement[];
|
|
772
|
+
labelWidth?: number;
|
|
773
|
+
style?: ViewStyle;
|
|
774
|
+
};
|
|
775
|
+
declare function AppFormCard({ children, labelWidth, style }: AppFormCardProps): react_jsx_runtime.JSX.Element;
|
|
776
|
+
|
|
777
|
+
type AppTextInputProps = AppInputProps & {
|
|
778
|
+
type?: "text";
|
|
779
|
+
value: string;
|
|
780
|
+
onChangeText: (value: string) => void;
|
|
781
|
+
placeholder?: string;
|
|
782
|
+
autoCapitalize?: "none" | "sentences" | "words" | "characters";
|
|
783
|
+
keyboardType?: KeyboardTypeOptions;
|
|
784
|
+
maxLength?: number;
|
|
785
|
+
editable?: boolean;
|
|
786
|
+
};
|
|
787
|
+
declare function AppTextInput({ label, labelWidth, value, onChangeText, placeholder, autoCapitalize, keyboardType, maxLength, editable, }: AppTextInputProps): react_jsx_runtime.JSX.Element;
|
|
788
|
+
|
|
789
|
+
type AppTextAreaProps = AppInputProps & {
|
|
790
|
+
value: string;
|
|
791
|
+
onChangeText: (value: string) => void;
|
|
792
|
+
placeholder?: string;
|
|
793
|
+
autoCapitalize?: "none" | "sentences" | "words" | "characters";
|
|
794
|
+
keyboardType?: KeyboardTypeOptions;
|
|
795
|
+
maxLength?: number;
|
|
796
|
+
editable?: boolean;
|
|
797
|
+
};
|
|
798
|
+
declare function AppTextArea({ label, value, onChangeText, placeholder, autoCapitalize, keyboardType, maxLength, editable, }: AppTextAreaProps): react_jsx_runtime.JSX.Element;
|
|
799
|
+
|
|
800
|
+
type AppSelectorOption = {
|
|
801
|
+
label: string;
|
|
802
|
+
value: string;
|
|
803
|
+
};
|
|
804
|
+
type AppSelectorProps = AppInputProps & {
|
|
805
|
+
type?: "select";
|
|
806
|
+
value: string;
|
|
807
|
+
onChange: (value: string) => void;
|
|
808
|
+
options: AppSelectorOption[];
|
|
809
|
+
placeholder?: string;
|
|
810
|
+
disabled?: boolean;
|
|
811
|
+
};
|
|
812
|
+
declare function AppSelector({ label, labelWidth, value, onChange, options, placeholder, disabled, }: AppSelectorProps): react_jsx_runtime.JSX.Element;
|
|
813
|
+
|
|
814
|
+
type AppToggleProps = AppInputProps & {
|
|
815
|
+
value: boolean;
|
|
816
|
+
onValueChange: (value: boolean) => void;
|
|
817
|
+
disabled?: boolean;
|
|
818
|
+
};
|
|
819
|
+
declare function AppToggle({ label, labelWidth, value, onValueChange, disabled, }: AppToggleProps): react_jsx_runtime.JSX.Element;
|
|
820
|
+
|
|
821
|
+
type AppButtonVariant = "solid" | "outline" | "ghost";
|
|
822
|
+
type AppButtonProps = {
|
|
823
|
+
label: string;
|
|
824
|
+
onPress?: () => void;
|
|
825
|
+
disabled?: boolean;
|
|
826
|
+
variant?: AppButtonVariant;
|
|
827
|
+
backgroundColor?: string;
|
|
828
|
+
textColor?: string;
|
|
829
|
+
borderColor?: string;
|
|
830
|
+
style?: ViewStyle;
|
|
831
|
+
};
|
|
832
|
+
declare function AppButton({ label, onPress, disabled, variant, backgroundColor, textColor, borderColor, style, }: AppButtonProps): react_jsx_runtime.JSX.Element;
|
|
833
|
+
|
|
834
|
+
type KeyboardSafeScreenProps = {
|
|
835
|
+
children: React.ReactNode;
|
|
836
|
+
style?: StyleProp<ViewStyle>;
|
|
837
|
+
contentContainerStyle?: StyleProp<ViewStyle>;
|
|
838
|
+
scrollViewProps?: ScrollViewProps;
|
|
839
|
+
};
|
|
840
|
+
/**
|
|
841
|
+
* Pantalla scrollable que mantiene el contenido siempre por encima del
|
|
842
|
+
* teclado. Usa la misma técnica que Modal/BottomSheet (shared value de
|
|
843
|
+
* react-native-keyboard-controller, negativa con teclado visible) para
|
|
844
|
+
* empujar el contenido sin re-renders de JS. En web mide el visualViewport.
|
|
845
|
+
*/
|
|
846
|
+
declare function KeyboardSafeScreen({ children, style, contentContainerStyle, scrollViewProps, }: KeyboardSafeScreenProps): react_jsx_runtime.JSX.Element;
|
|
847
|
+
|
|
848
|
+
type SheetKind = "topSheet" | "bottomSheet" | "fullHeader" | "fullBody";
|
|
849
|
+
interface RouteOptions {
|
|
850
|
+
/** Para bottomSheet: colapsa el header al hacer scroll. Default true. */
|
|
851
|
+
collapseOnScroll?: boolean;
|
|
852
|
+
/** Radio de la hoja (esquinas). Default 32. */
|
|
853
|
+
radius?: number;
|
|
854
|
+
/** Ignora el alto medido del header y fija este alto (px). */
|
|
855
|
+
fixedHeaderHeight?: number;
|
|
856
|
+
}
|
|
857
|
+
interface Route {
|
|
858
|
+
key: string;
|
|
859
|
+
kind: SheetKind;
|
|
860
|
+
header?: ReactNode;
|
|
861
|
+
body?: ReactNode;
|
|
862
|
+
headerBackgroundColor?: string;
|
|
863
|
+
bodyBackgroundColor?: string;
|
|
864
|
+
options?: RouteOptions;
|
|
865
|
+
}
|
|
866
|
+
interface SheetLayoutProps {
|
|
867
|
+
routes: Route[];
|
|
868
|
+
activeKey: string;
|
|
869
|
+
/** Se dispara cuando una capa interna pide cambiar de ruta. */
|
|
870
|
+
onRequestChange?: (key: string) => void;
|
|
871
|
+
style?: StyleProp<ViewStyle>;
|
|
872
|
+
}
|
|
873
|
+
type LayerRole = "active" | "entering" | "exiting";
|
|
874
|
+
|
|
875
|
+
type SheetLayoutContextValue = {
|
|
876
|
+
change: (key: string) => void;
|
|
877
|
+
};
|
|
878
|
+
/** Permite que el contenido de una capa pida cambiar de ruta sin navigator. */
|
|
879
|
+
declare function useSheetLayout(): SheetLayoutContextValue;
|
|
880
|
+
declare function SheetLayout({ routes, activeKey, onRequestChange, style, }: SheetLayoutProps): react_jsx_runtime.JSX.Element;
|
|
881
|
+
|
|
882
|
+
/**
|
|
883
|
+
* Cada "kind" de ruta se resuelve en una composición de capas (hosts):
|
|
884
|
+
* - host: qué capa porta el contenido de la ruta (base / top / bottom)
|
|
885
|
+
* - baseColor: color del fondo persistente ("header" | "body")
|
|
886
|
+
*
|
|
887
|
+
* Es la pieza extensible: para agregar un nuevo SheetKind solo se añade
|
|
888
|
+
* un caso acá. El SheetLayout mantiene SIEMPRE las 3 capas montadas y solo
|
|
889
|
+
* anima cuál está visible y el color del fondo.
|
|
890
|
+
*/
|
|
891
|
+
type HostKey = "base" | "top" | "bottom";
|
|
892
|
+
type BaseColorKey = "header" | "body";
|
|
893
|
+
interface Composition {
|
|
894
|
+
host: HostKey;
|
|
895
|
+
baseColor: BaseColorKey;
|
|
896
|
+
}
|
|
897
|
+
declare function resolveComposition(kind: SheetKind): Composition;
|
|
898
|
+
/** Dirección de entrada/salida de cada host al animar su visibilidad. */
|
|
899
|
+
declare function hostDirection(side: HostKey): "fromTop" | "fromBottom" | "fade";
|
|
900
|
+
|
|
901
|
+
type SheetSlotProps = {
|
|
902
|
+
side: HostKey;
|
|
903
|
+
/** 0 = oculto (fuera de pantalla), 1 = totalmente visible. */
|
|
904
|
+
visible: SharedValue<number>;
|
|
905
|
+
/** Contenido a mostrar. null = este host no se usa nunca. */
|
|
906
|
+
route: Route | null;
|
|
907
|
+
/** Si la capa debe capturar toques (solo la activa). */
|
|
908
|
+
interactive: boolean;
|
|
909
|
+
baseColor: "header" | "body";
|
|
910
|
+
};
|
|
911
|
+
declare function SheetSlot({ side, visible, route, interactive, baseColor, }: SheetSlotProps): react_jsx_runtime.JSX.Element | null;
|
|
912
|
+
|
|
913
|
+
type MainLayoutProps = {
|
|
914
|
+
children?: React.ReactNode;
|
|
915
|
+
backgroundColor?: string;
|
|
916
|
+
/** Si el body debe poder scrollear. Default true. */
|
|
917
|
+
scroll?: boolean;
|
|
918
|
+
contentContainerStyle?: StyleProp<ViewStyle>;
|
|
919
|
+
style?: StyleProp<ViewStyle>;
|
|
920
|
+
};
|
|
921
|
+
/**
|
|
922
|
+
* Pantalla simple y normal: ocupa toda la altura, respeta el safe area y
|
|
923
|
+
* muestra un body (scrolleable por defecto). Punto de partida mínimo para
|
|
924
|
+
* ir construyendo encima según se necesite.
|
|
925
|
+
*/
|
|
926
|
+
declare function MainLayout({ children, backgroundColor, scroll, contentContainerStyle, style, }: MainLayoutProps): react_jsx_runtime.JSX.Element;
|
|
927
|
+
|
|
928
|
+
type SectionKey = "top" | "mid" | "bottom";
|
|
929
|
+
type HeightSpec = "content" | "fill" | "fillRest" | "third" | number;
|
|
930
|
+
type SlotName = "header" | "body" | "footer";
|
|
931
|
+
type SectionBehavior = {
|
|
932
|
+
/** Si la sección se renderiza. Default true. */
|
|
933
|
+
visible?: boolean;
|
|
934
|
+
/** Cómo se determina su alto: contenido medido, llenar (H), rellenar resto, un tercio, o px fijos. Default "content". */
|
|
935
|
+
height?: HeightSpec;
|
|
936
|
+
/** La sección scrollea internamente (ScrollView propio). */
|
|
937
|
+
scroll?: boolean;
|
|
938
|
+
/** Se mantiene fija (no participa del scroll de página). */
|
|
939
|
+
sticky?: boolean;
|
|
940
|
+
/** Se desvanece al hacer scroll de página (requiere pageScroll). */
|
|
941
|
+
fadeOnScroll?: boolean;
|
|
942
|
+
/** A qué slot de contenido está asociada (header/body/footer). */
|
|
943
|
+
slot?: SlotName;
|
|
944
|
+
/** Para height "fillRest": de qué sección (su alto natural) se descuenta H. */
|
|
945
|
+
restsOn?: SectionKey;
|
|
946
|
+
/** Color de fondo de la sección. */
|
|
947
|
+
backgroundColor?: string;
|
|
948
|
+
};
|
|
949
|
+
type LayoutState = {
|
|
950
|
+
/** La página scrollea (scroll externo) en vez de secciones internas. */
|
|
951
|
+
pageScroll?: boolean;
|
|
952
|
+
sections: Record<SectionKey, SectionBehavior>;
|
|
953
|
+
};
|
|
954
|
+
type LayoutStateName = "stacked" | "bottom" | "fullBottom" | "onlyCenter" | "top";
|
|
955
|
+
type AppRoute = {
|
|
956
|
+
/** Identificador único de la pantalla (usado como clave de navegación). */
|
|
957
|
+
name: string;
|
|
958
|
+
/** Estado del layout: preset por nombre o configuración custom. */
|
|
959
|
+
state: LayoutState | LayoutStateName;
|
|
960
|
+
/** Contenido por slot. Cada slot se renderiza en su sección mapeada. */
|
|
961
|
+
slots?: Partial<Record<SlotName, ReactNode>>;
|
|
962
|
+
};
|
|
963
|
+
type AppNavigation = {
|
|
964
|
+
navigate: (route: AppRoute) => void;
|
|
965
|
+
back: () => void;
|
|
966
|
+
canGoBack: boolean;
|
|
967
|
+
currentRoute: AppRoute;
|
|
968
|
+
stack: AppRoute[];
|
|
969
|
+
replace: (route: AppRoute) => void;
|
|
970
|
+
};
|
|
971
|
+
/** Presets = las 5 variantes del motor, reutilizables por nombre. */
|
|
972
|
+
declare const layoutStates: Record<LayoutStateName, LayoutState>;
|
|
973
|
+
declare function useAppNavigation(): AppNavigation;
|
|
974
|
+
type AppLayoutProps = {
|
|
975
|
+
initialRoute: AppRoute;
|
|
976
|
+
/** Muestra un botón de volver global cuando canGoBack. Default true. */
|
|
977
|
+
showBackButton?: boolean;
|
|
978
|
+
/** Logs de debug en consola. Default false. */
|
|
979
|
+
debug?: boolean;
|
|
980
|
+
};
|
|
981
|
+
declare function AppLayout({ initialRoute, showBackButton, debug, }: AppLayoutProps): react_jsx_runtime.JSX.Element;
|
|
982
|
+
|
|
983
|
+
type DivisorPosition = "top" | "bottom";
|
|
984
|
+
type DivisorProps = {
|
|
985
|
+
/** "top": esquinas inferiores redondeadas (debajo de una sección). "bottom": esquinas superiores redondeadas (encima de una sección). */
|
|
986
|
+
position: DivisorPosition;
|
|
987
|
+
/** Color del rectángulo superior redondeado (la hoja). Default: bg.darkness.default. */
|
|
988
|
+
color?: string;
|
|
989
|
+
/** Color del rectángulo base (detrás del redondeado). Default: bg.default.default. */
|
|
990
|
+
baseColor?: string;
|
|
991
|
+
/** Alto del divisor en px. Default 20. */
|
|
992
|
+
height?: number;
|
|
993
|
+
/** Muestra el "grabber" (pill) estilo iOS centrado en el borde de la hoja. */
|
|
994
|
+
handle?: boolean;
|
|
995
|
+
/** Color del grabber. Default: blanco translúcido. */
|
|
996
|
+
handleColor?: string;
|
|
997
|
+
style?: ViewStyle;
|
|
998
|
+
};
|
|
999
|
+
declare function Divisor({ position, color, baseColor, height, handle, handleColor, style, }: DivisorProps): react_jsx_runtime.JSX.Element;
|
|
1000
|
+
|
|
1001
|
+
/**
|
|
1002
|
+
* Dirección de entrada/salida de una capa durante una transición.
|
|
1003
|
+
* Es la pieza extensible del sistema: agregar un nuevo SheetKind solo
|
|
1004
|
+
* requiere registrar su dirección en ENTER_DIR / EXIT_DIR.
|
|
1005
|
+
*/
|
|
1006
|
+
type LayerDirection = "fromTop" | "fromBottom" | "fade" | "toTop" | "toBottom" | "stay";
|
|
1007
|
+
interface TransitionSpec {
|
|
1008
|
+
/** De dónde entra la capa nueva. */
|
|
1009
|
+
enter: LayerDirection;
|
|
1010
|
+
/** Hacia dónde sale la capa vieja. */
|
|
1011
|
+
exit: LayerDirection;
|
|
1012
|
+
/** true cuando from===to: no se translada la capa, se hace cross-fade de contenido. */
|
|
1013
|
+
crossFadeContent: boolean;
|
|
1014
|
+
}
|
|
1015
|
+
declare function resolveTransition(from: SheetKind, to: SheetKind): TransitionSpec;
|
|
1016
|
+
/** Signo del desplazamiento vertical para una dirección de translate. */
|
|
1017
|
+
declare function directionSign(dir: LayerDirection): number;
|
|
1018
|
+
|
|
1019
|
+
declare const AppIcon: {
|
|
1020
|
+
readonly Home: IconName;
|
|
1021
|
+
readonly HomeFilled: IconName;
|
|
1022
|
+
readonly Procesos: IconName;
|
|
1023
|
+
readonly ProcesosFilled: IconName;
|
|
1024
|
+
readonly Ot: IconName;
|
|
1025
|
+
readonly OtFilled: IconName;
|
|
1026
|
+
readonly Calendario: IconName;
|
|
1027
|
+
readonly CalendarioFilled: IconName;
|
|
1028
|
+
readonly Reportes: IconName;
|
|
1029
|
+
readonly ReportesFilled: IconName;
|
|
1030
|
+
readonly Configuracion: IconName;
|
|
1031
|
+
readonly ConfiguracionFilled: IconName;
|
|
1032
|
+
readonly Inspeccion: IconName;
|
|
1033
|
+
readonly InspeccionFilled: IconName;
|
|
1034
|
+
readonly Checklist: IconName;
|
|
1035
|
+
readonly ChecklistFilled: IconName;
|
|
1036
|
+
readonly Farm: IconName;
|
|
1037
|
+
readonly Barn: IconName;
|
|
1038
|
+
readonly Users: IconName;
|
|
1039
|
+
readonly UsersFilled: IconName;
|
|
1040
|
+
readonly Templates: IconName;
|
|
1041
|
+
readonly TemplatesFilled: IconName;
|
|
1042
|
+
readonly Logout: IconName;
|
|
1043
|
+
readonly Add: IconName;
|
|
1044
|
+
readonly Pencil: IconName;
|
|
1045
|
+
readonly Trash: IconName;
|
|
1046
|
+
readonly Search: IconName;
|
|
1047
|
+
readonly Menu: IconName;
|
|
1048
|
+
readonly Close: IconName;
|
|
1049
|
+
readonly Check: IconName;
|
|
1050
|
+
readonly Bell: IconName;
|
|
1051
|
+
readonly Info: IconName;
|
|
1052
|
+
readonly Alert: IconName;
|
|
1053
|
+
readonly Warning: IconName;
|
|
1054
|
+
readonly Chat: IconName;
|
|
1055
|
+
readonly Camera: IconName;
|
|
1056
|
+
readonly Time: IconName;
|
|
1057
|
+
readonly Analytics: IconName;
|
|
1058
|
+
readonly Palette: IconName;
|
|
1059
|
+
readonly ChevronForward: IconName;
|
|
1060
|
+
readonly Folder: IconName;
|
|
1061
|
+
readonly FolderOpen: IconName;
|
|
1062
|
+
readonly File: IconName;
|
|
1063
|
+
readonly Loader: IconName;
|
|
1064
|
+
readonly Inbox: IconName;
|
|
1065
|
+
};
|
|
1066
|
+
|
|
1067
|
+
export { 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, AppResponsiveDialog, type AppResponsiveDialogProps, type AppRoute, AppSelector, type AppSelectorOption, type AppSelectorProps, AppTextArea, type AppTextAreaProps, AppTextHeader, type AppTextHeaderProps, AppTextInput, type AppTextInputProps, AppToggle, type AppToggleProps, Avatar, type AvatarProps, type AvatarSize, type BaseColorKey, BottomSheet, type BottomSheetProps, Button, type ButtonProps, type ButtonSize, type ButtonVariant, Calendar, type CalendarProps, Card, type CardProps, CardStackSheet, type CardStackSheetProps, CardTitle, type CardTitleProps, type CardVariant, CategoryText, type CategoryTextProps, CategoryTextStyle, Chip, type ChipProps, ChipRow, type ChipRowOption, type ChipRowProps, type ChipSize, 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, EmptyState, type EmptyStateProps, FloatingActionButton, type FloatingActionButtonPosition, type FloatingActionButtonProps, HeaderBar, type HeaderBarProps, HeaderBarStyle, HeaderCardLayout, type HeaderCardLayoutProps, type HeightSpec, type HostKey, Icon, type IconName, type IconProps, Input, type InputProps, Item, type ItemProps, ItemStyle, KeyboardSafeScreen, type KeyboardSafeScreenProps, type LayerDirection, type LayerRole, LayoutColumn, LayoutRow, type LayoutState, type LayoutStateName, MainLayout, type MainLayoutProps, Modal, type ModalProps, OptionListItem, type OptionListItemProps, OptionListItemVariant, PinKeypad, type PinKeypadProps, ReverseHeaderCardLayout, type ReverseHeaderCardLayoutProps, type Route, type RouteOptions, SearchBar, type SearchBarProps, SearchBarStyle, type SectionBehavior, type SectionKey, type SheetKind, SheetLayout, type SheetLayoutProps, SheetSlot, type SheetSlotProps, 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, StateMessage, type StateMessageProps, StateMessageStyle, StateMessageType, TOAST_DEFAULT_DURATION_MS, Text, TextField, type TextFieldProps, type TextProps, type TextVariant, Toast, type ToastOptions, type ToastProps, ToastProvider, ToastStyle, ToastTone, type ToolItem, ToolsCard, type ToolsCardProps, type TransitionSpec, TreeEditor, type TreeEditorMode, type TreeEditorProps, type TreeEditorVariant, type TreeNode, addChild, addSibling, buildInitialCollapsed, countNodes, createNode, directionSign, findNode, hasCode, hostDirection, iconMap, layoutStates, removeNode, resolveComposition, resolveTransition, updateNode, useAppNavigation, useSheetLayout, useToast };
|