@william-callao/antonella-ui 1.0.0 → 1.0.2
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 +31 -9
- package/dist/index.js +480 -383
- package/package.json +33 -33
package/dist/index.d.ts
CHANGED
|
@@ -21,8 +21,10 @@ interface ButtonProps extends Omit<PressableProps, "style"> {
|
|
|
21
21
|
variant?: ButtonVariant;
|
|
22
22
|
size?: ButtonSize;
|
|
23
23
|
style?: StyleProp<ViewStyle>;
|
|
24
|
+
/** Muestra un spinner centrado en lugar del label (y deshabilita el botón). */
|
|
25
|
+
loading?: boolean;
|
|
24
26
|
}
|
|
25
|
-
declare function Button({ label, variant, size, style, disabled, android_ripple, ...rest }: ButtonProps): react_jsx_runtime.JSX.Element;
|
|
27
|
+
declare function Button({ label, variant, size, style, disabled, loading, android_ripple, ...rest }: ButtonProps): react_jsx_runtime.JSX.Element;
|
|
26
28
|
|
|
27
29
|
interface CalendarProps extends ViewProps {
|
|
28
30
|
date?: Date;
|
|
@@ -47,7 +49,7 @@ interface CardTitleProps {
|
|
|
47
49
|
}
|
|
48
50
|
declare function CardTitle({ title, subtitle, style }: CardTitleProps): react_jsx_runtime.JSX.Element;
|
|
49
51
|
|
|
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";
|
|
52
|
+
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" | "eye" | "eye-off";
|
|
51
53
|
declare const iconMap: Record<IconName, ComponentType<{
|
|
52
54
|
size?: number;
|
|
53
55
|
color?: string;
|
|
@@ -146,8 +148,10 @@ type HeaderBarProps = {
|
|
|
146
148
|
/** Acción del botón de menú (hamburguesa, lado izquierdo). */
|
|
147
149
|
onMenuPress?: () => void;
|
|
148
150
|
menuIcon?: IconName;
|
|
151
|
+
/** Label de accesibilidad del botón izquierdo. */
|
|
152
|
+
accessibilityLabel?: string;
|
|
149
153
|
};
|
|
150
|
-
declare function HeaderBar({ title, description, style, onMenuPress, menuIcon, }: HeaderBarProps): react_jsx_runtime.JSX.Element;
|
|
154
|
+
declare function HeaderBar({ title, description, style, onMenuPress, menuIcon, accessibilityLabel, }: HeaderBarProps): react_jsx_runtime.JSX.Element;
|
|
151
155
|
|
|
152
156
|
declare enum StateMessageType {
|
|
153
157
|
LOADING = "LOADING",
|
|
@@ -221,8 +225,10 @@ type CardStackSheetProps = {
|
|
|
221
225
|
children: React.ReactNode;
|
|
222
226
|
contentStyle?: StyleProp<ViewStyle>;
|
|
223
227
|
snapPoints?: Array<string | number>;
|
|
228
|
+
/** Color del área semitransparente del sheet (fondo entre y bajo las cards). */
|
|
229
|
+
areaColor?: string;
|
|
224
230
|
};
|
|
225
|
-
declare function CardStackSheet({ visible, onClose, dismissible, children, contentStyle, snapPoints, }: CardStackSheetProps): react_jsx_runtime.JSX.Element;
|
|
231
|
+
declare function CardStackSheet({ visible, onClose, dismissible, children, contentStyle, snapPoints, areaColor, }: CardStackSheetProps): react_jsx_runtime.JSX.Element;
|
|
226
232
|
|
|
227
233
|
declare enum OptionListItemVariant {
|
|
228
234
|
Default = "default",
|
|
@@ -544,8 +550,15 @@ declare function ReverseHeaderCardLayout({ headerBackgroundColor, bodyBackground
|
|
|
544
550
|
|
|
545
551
|
interface InputProps extends TextInputProps {
|
|
546
552
|
icon?: IconName;
|
|
553
|
+
/** Estilos aplicados al campo de texto interno (también cuando hay icono/ojito). */
|
|
554
|
+
inputStyle?: StyleProp<TextStyle>;
|
|
555
|
+
/** Muestra el ojito para alternar ver/ocultar en campos `secureTextEntry`. */
|
|
556
|
+
showToggle?: boolean;
|
|
557
|
+
/** Si se define, marca el input con borde rojo y muestra el mensaje debajo
|
|
558
|
+
* (errores de validación previos a consultar el backend). */
|
|
559
|
+
error?: string;
|
|
547
560
|
}
|
|
548
|
-
declare function Input({ style, placeholderTextColor, icon, ...rest }: InputProps): react_jsx_runtime.JSX.Element;
|
|
561
|
+
declare function Input({ style, inputStyle, placeholderTextColor, icon, showToggle, error, secureTextEntry, onFocus, onBlur, ...rest }: InputProps): react_jsx_runtime.JSX.Element;
|
|
549
562
|
|
|
550
563
|
type LayoutRowChildProps = {
|
|
551
564
|
size?: LayoutRowSize;
|
|
@@ -971,14 +984,23 @@ type AppNavigation = {
|
|
|
971
984
|
/** Presets = las 5 variantes del motor, reutilizables por nombre. */
|
|
972
985
|
declare const layoutStates: Record<LayoutStateName, LayoutState>;
|
|
973
986
|
declare function useAppNavigation(): AppNavigation;
|
|
987
|
+
type AppLayoutDebugSnapshot = {
|
|
988
|
+
route: string;
|
|
989
|
+
anchors: string[];
|
|
990
|
+
anim: Record<string, number>;
|
|
991
|
+
naturals: Record<SectionKey, number>;
|
|
992
|
+
lastMeasured: Record<SectionKey, number>;
|
|
993
|
+
windowH: number;
|
|
994
|
+
};
|
|
995
|
+
declare function useAppLayoutDebug(): {
|
|
996
|
+
snapshot: () => AppLayoutDebugSnapshot;
|
|
997
|
+
};
|
|
974
998
|
type AppLayoutProps = {
|
|
975
999
|
initialRoute: AppRoute;
|
|
976
1000
|
/** Muestra un botón de volver global cuando canGoBack. Default true. */
|
|
977
1001
|
showBackButton?: boolean;
|
|
978
|
-
/** Logs de debug en consola. Default false. */
|
|
979
|
-
debug?: boolean;
|
|
980
1002
|
};
|
|
981
|
-
declare function AppLayout({ initialRoute, showBackButton,
|
|
1003
|
+
declare function AppLayout({ initialRoute, showBackButton, }: AppLayoutProps): react_jsx_runtime.JSX.Element;
|
|
982
1004
|
|
|
983
1005
|
type DivisorPosition = "top" | "bottom";
|
|
984
1006
|
type DivisorProps = {
|
|
@@ -1064,4 +1086,4 @@ declare const AppIcon: {
|
|
|
1064
1086
|
readonly Inbox: IconName;
|
|
1065
1087
|
};
|
|
1066
1088
|
|
|
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 };
|
|
1089
|
+
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 AppLayoutDebugSnapshot, 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, useAppLayoutDebug, useAppNavigation, useSheetLayout, useToast };
|