@satellatickets/ui 0.0.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -70,11 +70,13 @@ Los hooks `useTheme()`, `useColorScheme()` y `useBrand()` dan acceso al tema res
70
70
 
71
71
  ## Componentes
72
72
 
73
- | Grupo | Componentes |
74
- | ----------- | ------------------------------ |
75
- | Fundamentos | `Box`, `Stack`, `Text`, `Icon` |
76
- | Acciones | `Button` |
77
- | Feedback | `Badge`, `Spinner` |
73
+ | Grupo | Componentes |
74
+ | ----------- | --------------------------------------------------------------------- |
75
+ | Fundamentos | `Box`, `Stack`, `Text`, `Icon` |
76
+ | Acciones | `Button`, `IconButton`, `Link` |
77
+ | Formularios | `Input`, `TextArea`, `Checkbox`, `Switch`, `Select`, `FormField` |
78
+ | Feedback | `Alert`, `Badge`, `Skeleton`, `Spinner` y los toasts con `useToast()` |
79
+ | Superficies | `Card`, `Divider`, `Modal`, `Sheet`, `Tabs` |
78
80
 
79
81
  Cada componente declara su madurez en el catálogo. Todos son todavía `experimental`: su API puede cambiar en cualquier `minor` mientras la librería esté en `0.x`. Fija la versión exacta y lee el `CHANGELOG` al actualizar.
80
82
 
@@ -1,6 +1,16 @@
1
- import { BadgeProps, BadgeProps as BadgeProps$1, BoxProps, BoxProps as BoxProps$1, ButtonProps as ButtonProps$1, ColorScheme, IconProps as IconProps$1, SpinnerProps, SpinnerProps as SpinnerProps$1, StackProps, StackProps as StackProps$1, TextProps, TextProps as TextProps$1, ThemeMode, UIProviderProps, UIProviderProps as UIProviderProps$1, useBrand, useColorScheme, useTheme } from "@satellatickets/core";
2
- import { StyleProp, TextStyle, View, ViewStyle } from "react-native";
1
+ import { AlertProps, AlertProps as AlertProps$1, BadgeProps, BadgeProps as BadgeProps$1, BoxProps, BoxProps as BoxProps$1, ButtonProps as ButtonProps$1, CardProps, CardProps as CardProps$1, CheckboxProps, CheckboxProps as CheckboxProps$1, ColorScheme, DividerProps, DividerProps as DividerProps$1, FormFieldProps, FormFieldProps as FormFieldProps$1, IconButtonProps as IconButtonProps$1, IconProps as IconProps$1, InputProps as InputProps$1, LinkPressEvent, LinkProps, LinkProps as LinkProps$1, ModalProps, ModalProps as ModalProps$1, SelectOption, SelectProps, SelectProps as SelectProps$1, SheetProps, SkeletonProps, SkeletonProps as SkeletonProps$1, SpinnerProps, SpinnerProps as SpinnerProps$1, StackProps, StackProps as StackProps$1, SwitchProps, SwitchProps as SwitchProps$1, TabItem as TabItem$1, TabsProps as TabsProps$1, TextAreaProps, TextAreaProps as TextAreaProps$1, TextProps, TextProps as TextProps$1, ThemeMode, ToastAction, ToastApi, ToastOptions, UIProviderProps, UIProviderProps as UIProviderProps$1, useBrand, useColorScheme, useTheme, useToast } from "@satellatickets/core";
2
+ import { StyleProp, Text as Text$1, TextInput, TextStyle, View, ViewStyle } from "react-native";
3
3
  import { Ref } from "react";
4
+ import { Theme } from "@satellatickets/tokens";
5
+ //#region src/alert/Alert.types.d.ts
6
+ /** Extensión solo nativa del contrato. */
7
+ type AlertNativeProps = AlertProps$1 & {
8
+ style?: StyleProp<ViewStyle> | undefined;
9
+ };
10
+ //#endregion
11
+ //#region src/alert/Alert.native.d.ts
12
+ export declare function Alert({ tone, title, onClose, closeLabel, style, testID, children }: AlertNativeProps): import("react").JSX.Element;
13
+ //#endregion
4
14
  //#region src/badge/Badge.types.d.ts
5
15
  /** Extensión solo nativa del contrato. */
6
16
  interface BadgeNativeProps extends BadgeProps$1 {
@@ -45,11 +55,166 @@ interface ButtonNativeProps extends ButtonProps {
45
55
  }
46
56
  //#endregion
47
57
  //#region src/button/Button.native.d.ts
58
+ declare const variantStyles: {
59
+ primary: (t: Theme) => {
60
+ background: string;
61
+ pressed: string;
62
+ disabled: string;
63
+ border: string;
64
+ content: "onPrimary";
65
+ };
66
+ secondary: (t: Theme) => {
67
+ background: string;
68
+ pressed: string;
69
+ disabled: string;
70
+ border: string;
71
+ content: "primary";
72
+ };
73
+ ghost: (t: Theme) => {
74
+ background: string;
75
+ pressed: string;
76
+ disabled: string;
77
+ border: string;
78
+ content: "primary";
79
+ };
80
+ danger: (t: Theme) => {
81
+ background: string;
82
+ pressed: string;
83
+ disabled: string;
84
+ border: string;
85
+ content: "onDanger";
86
+ };
87
+ };
48
88
  export declare function Button({ variant, size, disabled, loading, iconStart, iconEnd, fullWidth, onPress, accessibilityLabel, style, testID, ref, children }: ButtonNativeProps): import("react").JSX.Element;
49
89
  //#endregion
90
+ //#region src/card/Card.types.d.ts
91
+ /** Extensión solo nativa del contrato. */
92
+ interface CardNativeProps extends CardProps$1 {
93
+ style?: StyleProp<ViewStyle> | undefined;
94
+ ref?: Ref<View> | undefined;
95
+ }
96
+ //#endregion
97
+ //#region src/card/Card.native.d.ts
98
+ export declare function Card({ variant, padding, onPress, accessibilityLabel, style, testID, ref, children }: CardNativeProps): import("react").JSX.Element;
99
+ //#endregion
100
+ //#region src/checkbox/Checkbox.types.d.ts
101
+ /** Extensión solo nativa del contrato. */
102
+ interface CheckboxNativeProps extends CheckboxProps$1 {
103
+ style?: StyleProp<ViewStyle> | undefined;
104
+ ref?: Ref<View> | undefined;
105
+ }
106
+ //#endregion
107
+ //#region src/checkbox/Checkbox.native.d.ts
108
+ export declare function Checkbox({ checked, defaultChecked, indeterminate, onCheckedChange, disabled, invalid, accessibilityLabel, style, testID, ref, children }: CheckboxNativeProps): import("react").JSX.Element;
109
+ //#endregion
110
+ //#region src/divider/Divider.types.d.ts
111
+ /** Extensión solo nativa del contrato. */
112
+ interface DividerNativeProps extends DividerProps$1 {
113
+ style?: StyleProp<ViewStyle> | undefined;
114
+ }
115
+ //#endregion
116
+ //#region src/divider/Divider.native.d.ts
117
+ /** En nativo es decorativo: los lectores de pantalla no anuncian separadores. */
118
+ export declare function Divider({ orientation, style, testID }: DividerNativeProps): import("react").JSX.Element;
119
+ //#endregion
120
+ //#region src/form-field/FormField.types.d.ts
121
+ /** Extensión solo nativa del contrato. */
122
+ interface FormFieldNativeProps extends FormFieldProps$1 {
123
+ style?: StyleProp<ViewStyle> | undefined;
124
+ }
125
+ //#endregion
126
+ //#region src/form-field/FormField.native.d.ts
127
+ /**
128
+ * Etiqueta, ayuda y error de un control (ADR-037). En nativo no hay `htmlFor`: el
129
+ * control toma la etiqueta como nombre accesible y la ayuda y el error como pista.
130
+ */
131
+ export declare function FormField({ label, help, error, required, disabled, style, testID, children }: FormFieldNativeProps): import("react").JSX.Element;
132
+ //#endregion
50
133
  //#region src/icon/Icon.native.d.ts
51
134
  export declare function Icon({ name, size, color, label, style, testID }: IconNativeProps): import("react").JSX.Element;
52
135
  //#endregion
136
+ //#region src/icon-button/IconButton.types.d.ts
137
+ /** Contrato de `IconButton` con el conjunto de iconos de la librería. */
138
+ type IconButtonProps = IconButtonProps$1<IconName>;
139
+ /** Extensión solo nativa del contrato. */
140
+ interface IconButtonNativeProps extends IconButtonProps {
141
+ style?: StyleProp<ViewStyle> | undefined;
142
+ ref?: Ref<View> | undefined;
143
+ }
144
+ //#endregion
145
+ //#region src/icon-button/IconButton.native.d.ts
146
+ export declare function IconButton({ icon, label, variant, size, disabled, loading, onPress, style, testID, ref }: IconButtonNativeProps): import("react").JSX.Element;
147
+ //#endregion
148
+ //#region src/input/Input.types.d.ts
149
+ /** Contrato de `Input` con el conjunto de iconos de la librería. */
150
+ type InputProps = InputProps$1<IconName>;
151
+ /** Extensión solo nativa del contrato. */
152
+ interface InputNativeProps extends InputProps {
153
+ /** Se aplica a la caja del campo, no al `TextInput`. */
154
+ style?: StyleProp<ViewStyle> | undefined;
155
+ ref?: Ref<TextInput> | undefined;
156
+ }
157
+ //#endregion
158
+ //#region src/input/Input.native.d.ts
159
+ export declare function Input({ value, defaultValue, onChangeText, placeholder, type, size, disabled, readOnly, invalid, required, iconStart, iconEnd, maxLength, onFocus, onBlur, onSubmit, accessibilityLabel, style, testID, ref }: InputNativeProps): import("react").JSX.Element;
160
+ //#endregion
161
+ //#region src/link/Link.types.d.ts
162
+ /** Extensión solo nativa del contrato. */
163
+ interface LinkNativeProps extends LinkProps$1 {
164
+ style?: StyleProp<TextStyle> | undefined;
165
+ ref?: Ref<Text$1> | undefined;
166
+ }
167
+ //#endregion
168
+ //#region src/link/Link.native.d.ts
169
+ export declare function Link({ href, variant, color, underline, onPress, accessibilityLabel, style, testID, ref, children }: LinkNativeProps): import("react").JSX.Element;
170
+ //#endregion
171
+ //#region src/modal/Modal.types.d.ts
172
+ /** Extensión solo nativa del contrato. */
173
+ interface ModalNativeProps extends ModalProps$1 {
174
+ /** Se aplica a la superficie del diálogo, no al fondo. */
175
+ style?: StyleProp<ViewStyle> | undefined;
176
+ }
177
+ //#endregion
178
+ //#region src/modal/Modal.native.d.ts
179
+ /** Un diálogo centrado (ADR-040). */
180
+ export declare function Modal(props: ModalNativeProps): import("react").JSX.Element;
181
+ //#endregion
182
+ //#region src/select/Select.types.d.ts
183
+ /** Extensión solo nativa del contrato. */
184
+ interface SelectNativeProps extends SelectProps$1 {
185
+ /** Se aplica al disparador, la caja que muestra la opción elegida. */
186
+ style?: StyleProp<ViewStyle> | undefined;
187
+ ref?: Ref<View> | undefined;
188
+ }
189
+ //#endregion
190
+ //#region src/select/Select.native.d.ts
191
+ /**
192
+ * Un disparador con aspecto de `Input` que abre una lista modal (ADR-038). React
193
+ * Native no trae ningún selector, y así `Select` no añade dependencias.
194
+ */
195
+ export declare function Select({ options, value, defaultValue, onValueChange, placeholder, size, disabled, invalid, required, accessibilityLabel, style, testID, ref }: SelectNativeProps): import("react").JSX.Element;
196
+ //#endregion
197
+ //#region src/sheet/Sheet.types.d.ts
198
+ type SheetNativeProps = ModalNativeProps;
199
+ //#endregion
200
+ //#region src/sheet/Sheet.native.d.ts
201
+ /** Un diálogo anclado al borde inferior (ADR-040). Comparte todo con `Modal` salvo dónde se coloca. */
202
+ export declare function Sheet(props: SheetNativeProps): import("react").JSX.Element;
203
+ //#endregion
204
+ //#region src/skeleton/Skeleton.types.d.ts
205
+ /** Extensión solo nativa del contrato. */
206
+ interface SkeletonNativeProps extends SkeletonProps$1 {
207
+ style?: StyleProp<ViewStyle> | undefined;
208
+ }
209
+ //#endregion
210
+ //#region src/skeleton/Skeleton.native.d.ts
211
+ /**
212
+ * El hueco de un contenido que se está cargando. Late entre dos fondos del tema: una
213
+ * capa con `bg.muted` aparece y desaparece sobre `bg.subtle`, con el driver nativo. Con
214
+ * movimiento reducido se queda quieto.
215
+ */
216
+ export declare function Skeleton({ shape, width, height, variant, lines, style, testID }: SkeletonNativeProps): import("react").JSX.Element;
217
+ //#endregion
53
218
  //#region src/spinner/Spinner.types.d.ts
54
219
  interface SpinnerNativeProps extends SpinnerProps$1 {
55
220
  style?: StyleProp<ViewStyle> | undefined;
@@ -57,10 +222,10 @@ interface SpinnerNativeProps extends SpinnerProps$1 {
57
222
  //#endregion
58
223
  //#region src/spinner/Spinner.native.d.ts
59
224
  /**
60
- * Indicador de carga indeterminada. Versión mínima (ROADMAP Fase 3): el icono
61
- * `loader-circle` girando con `Animated` y el driver nativo, sin dependencias extra.
62
- * Con `label` es una barra de progreso indeterminada para los lectores de
63
- * pantalla; sin él, es decorativo.
225
+ * Indicador de carga indeterminada: el icono `loader-circle` girando con `Animated` y
226
+ * el driver nativo, sin dependencias extra. Con `label` es una barra de progreso
227
+ * indeterminada para los lectores de pantalla; sin él, es decorativo. Con movimiento
228
+ * reducido gira más despacio, pero no se detiene: parado no diría que algo está en curso.
64
229
  */
65
230
  export declare function Spinner({ size, color, label, style, testID }: SpinnerNativeProps): import("react").JSX.Element;
66
231
  //#endregion
@@ -72,6 +237,33 @@ interface StackNativeProps extends StackProps$1 {
72
237
  //#region src/stack/Stack.native.d.ts
73
238
  export declare function Stack({ direction, gap, align, justify, wrap, style, ...boxProps }: StackNativeProps): import("react").JSX.Element;
74
239
  //#endregion
240
+ //#region src/switch/Switch.types.d.ts
241
+ /** Extensión solo nativa del contrato. */
242
+ interface SwitchNativeProps extends SwitchProps$1 {
243
+ style?: StyleProp<ViewStyle> | undefined;
244
+ ref?: Ref<View> | undefined;
245
+ }
246
+ //#endregion
247
+ //#region src/switch/Switch.native.d.ts
248
+ export declare function Switch({ checked, defaultChecked, onCheckedChange, disabled, accessibilityLabel, style, testID, ref, children }: SwitchNativeProps): import("react").JSX.Element;
249
+ //#endregion
250
+ //#region src/tabs/Tabs.types.d.ts
251
+ /** Una pestaña, con el conjunto de iconos de la librería. */
252
+ type TabItem = TabItem$1<IconName>;
253
+ /** Contrato de `Tabs` con el conjunto de iconos de la librería. */
254
+ type TabsProps = TabsProps$1<IconName>;
255
+ /** Extensión solo nativa del contrato. */
256
+ interface TabsNativeProps extends TabsProps {
257
+ style?: StyleProp<ViewStyle> | undefined;
258
+ }
259
+ //#endregion
260
+ //#region src/tabs/Tabs.native.d.ts
261
+ /**
262
+ * Pestañas subrayadas. Si no caben, la lista se desplaza en horizontal. En nativo no hay
263
+ * teclado de flechas: cada pestaña se pulsa.
264
+ */
265
+ export declare function Tabs({ items, value, defaultValue, onValueChange, accessibilityLabel, style, testID }: TabsNativeProps): import("react").JSX.Element;
266
+ //#endregion
75
267
  //#region src/text/Text.types.d.ts
76
268
  interface TextNativeProps extends TextProps$1 {
77
269
  numberOfLines?: number | undefined;
@@ -81,11 +273,23 @@ interface TextNativeProps extends TextProps$1 {
81
273
  //#region src/text/Text.native.d.ts
82
274
  export declare function Text({ variant, color, align, truncate, numberOfLines, style, testID, children }: TextNativeProps): import("react").JSX.Element;
83
275
  //#endregion
276
+ //#region src/text-area/TextArea.types.d.ts
277
+ /** Extensión solo nativa del contrato. */
278
+ interface TextAreaNativeProps extends TextAreaProps$1 {
279
+ /** Se aplica a la caja del campo, no al `TextInput`. */
280
+ style?: StyleProp<ViewStyle> | undefined;
281
+ ref?: Ref<TextInput> | undefined;
282
+ }
283
+ //#endregion
284
+ //#region src/text-area/TextArea.native.d.ts
285
+ export declare function TextArea({ value, defaultValue, onChangeText, placeholder, rows, disabled, readOnly, invalid, required, maxLength, onFocus, onBlur, accessibilityLabel, style, testID, ref }: TextAreaNativeProps): import("react").JSX.Element;
286
+ //#endregion
84
287
  //#region src/ui-provider/UIProvider.native.d.ts
85
288
  /**
86
289
  * Activa tema y marca para todo lo que envuelve (ADR-010). Entrega el tema
87
- * resuelto por contexto; `system` sigue a `Appearance`.
290
+ * resuelto por contexto; `system` sigue a `Appearance`. También guarda la cola de
291
+ * toasts y los pinta sobre la vista que lo contiene (ADR-039).
88
292
  */
89
293
  export declare function UIProvider({ theme, brand, children }: UIProviderProps$1): import("react").JSX.Element;
90
294
  //#endregion
91
- export { type BadgeNativeProps, type BadgeProps, type BoxNativeProps, type BoxProps, type ButtonNativeProps, type ButtonProps, type ColorScheme, type IconName, type IconNativeProps, type IconProps, type SpinnerNativeProps, type SpinnerProps, type StackNativeProps, type StackProps, type TextNativeProps, type TextProps, type ThemeMode, type UIProviderProps, useBrand, useColorScheme, useTheme };
295
+ export { type AlertNativeProps, type AlertProps, type BadgeNativeProps, type BadgeProps, type BoxNativeProps, type BoxProps, type ButtonNativeProps, type ButtonProps, type CardNativeProps, type CardProps, type CheckboxNativeProps, type CheckboxProps, type ColorScheme, type DividerNativeProps, type DividerProps, type FormFieldNativeProps, type FormFieldProps, type IconButtonNativeProps, type IconButtonProps, type IconName, type IconNativeProps, type IconProps, type InputNativeProps, type InputProps, type LinkNativeProps, type LinkPressEvent, type LinkProps, type ModalNativeProps, type ModalProps, type SelectNativeProps, type SelectOption, type SelectProps, type SheetNativeProps, type SheetProps, type SkeletonNativeProps, type SkeletonProps, type SpinnerNativeProps, type SpinnerProps, type StackNativeProps, type StackProps, type SwitchNativeProps, type SwitchProps, type TabItem, type TabsNativeProps, type TabsProps, type TextAreaNativeProps, type TextAreaProps, type TextNativeProps, type TextProps, type ThemeMode, type ToastAction, type ToastApi, type ToastOptions, type UIProviderProps, useBrand, useColorScheme, useTheme, useToast, type variantStyles };