@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.
@@ -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";
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
2
  import { CSSProperties, Ref } from "react";
3
3
  import "react-native";
4
+ //#region src/alert/Alert.types.d.ts
5
+ /** Extensión solo web del contrato (ADR-009). */
6
+ type AlertWebProps = AlertProps$1 & {
7
+ className?: string | undefined;
8
+ style?: CSSProperties | undefined;
9
+ };
10
+ //#endregion
11
+ //#region src/alert/Alert.web.d.ts
12
+ export declare function Alert({ tone, title, onClose, closeLabel, className, style, testID, children }: AlertWebProps): import("react").JSX.Element;
13
+ //#endregion
4
14
  //#region src/badge/Badge.types.d.ts
5
15
  /** Extensión solo web del contrato (ADR-009). */
6
16
  interface BadgeWebProps extends BadgeProps$1 {
@@ -53,9 +63,160 @@ interface ButtonWebProps extends ButtonProps {
53
63
  //#region src/button/Button.web.d.ts
54
64
  export declare function Button({ variant, size, disabled, loading, iconStart, iconEnd, fullWidth, onPress, accessibilityLabel, type, className, style, testID, ref, children }: ButtonWebProps): import("react").JSX.Element;
55
65
  //#endregion
66
+ //#region src/card/Card.types.d.ts
67
+ /** Extensión solo web del contrato (ADR-009). */
68
+ interface CardWebProps extends CardProps$1 {
69
+ className?: string | undefined;
70
+ style?: CSSProperties | undefined;
71
+ ref?: Ref<HTMLDivElement> | undefined;
72
+ }
73
+ //#endregion
74
+ //#region src/card/Card.web.d.ts
75
+ export declare function Card({ variant, padding, onPress, accessibilityLabel, className, style, testID, ref, children }: CardWebProps): import("react").JSX.Element;
76
+ //#endregion
77
+ //#region src/checkbox/Checkbox.types.d.ts
78
+ /** Extensión solo web del contrato (ADR-009): atributos de formulario y escape hatches. */
79
+ interface CheckboxWebProps extends CheckboxProps$1 {
80
+ id?: string | undefined;
81
+ /** Nombre con el que viaja en un `<form>`. */
82
+ name?: string | undefined;
83
+ /** Valor que viaja en el `<form>` cuando está marcada (por defecto `on`). */
84
+ value?: string | undefined;
85
+ /** Se aplican a la etiqueta que envuelve la casilla y su texto. */
86
+ className?: string | undefined;
87
+ style?: CSSProperties | undefined;
88
+ ref?: Ref<HTMLInputElement> | undefined;
89
+ }
90
+ //#endregion
91
+ //#region src/checkbox/Checkbox.web.d.ts
92
+ export declare function Checkbox({ checked, defaultChecked, indeterminate, onCheckedChange, disabled, invalid, required, accessibilityLabel, id, name, value, className, style, testID, ref, children }: CheckboxWebProps): import("react").JSX.Element;
93
+ //#endregion
94
+ //#region src/divider/Divider.types.d.ts
95
+ /** Extensión solo web del contrato (ADR-009). */
96
+ interface DividerWebProps extends DividerProps$1 {
97
+ className?: string | undefined;
98
+ }
99
+ //#endregion
100
+ //#region src/divider/Divider.web.d.ts
101
+ export declare function Divider({ orientation, className, testID }: DividerWebProps): import("react").JSX.Element;
102
+ //#endregion
103
+ //#region src/form-field/FormField.types.d.ts
104
+ /** Extensión solo web del contrato (ADR-009). */
105
+ interface FormFieldWebProps extends FormFieldProps$1 {
106
+ className?: string | undefined;
107
+ }
108
+ //#endregion
109
+ //#region src/form-field/FormField.web.d.ts
110
+ /**
111
+ * Etiqueta, ayuda y error de un control (ADR-037). El `<label>` apunta al `id` que
112
+ * toma el control, y la ayuda y el error se enlazan con `aria-describedby`.
113
+ */
114
+ export declare function FormField({ label, help, error, required, disabled, className, testID, children }: FormFieldWebProps): import("react").JSX.Element;
115
+ //#endregion
56
116
  //#region src/icon/Icon.web.d.ts
57
117
  export declare function Icon({ name, size, color, label, className, testID }: IconWebProps): import("react").JSX.Element;
58
118
  //#endregion
119
+ //#region src/icon-button/IconButton.types.d.ts
120
+ /** Contrato de `IconButton` con el conjunto de iconos de la librería. */
121
+ type IconButtonProps = IconButtonProps$1<IconName>;
122
+ /** Extensión solo web del contrato (ADR-009): atributos de formulario y escape hatches. */
123
+ interface IconButtonWebProps extends IconButtonProps {
124
+ /** Tipo del `<button>`. Por defecto `button`, para no enviar formularios por accidente. */
125
+ type?: 'button' | 'submit' | 'reset' | undefined;
126
+ className?: string | undefined;
127
+ style?: CSSProperties | undefined;
128
+ ref?: Ref<HTMLButtonElement> | undefined;
129
+ }
130
+ //#endregion
131
+ //#region src/icon-button/IconButton.web.d.ts
132
+ export declare function IconButton({ icon, label, variant, size, disabled, loading, onPress, type, className, style, testID, ref }: IconButtonWebProps): import("react").JSX.Element;
133
+ //#endregion
134
+ //#region src/input/Input.types.d.ts
135
+ /** Contrato de `Input` con el conjunto de iconos de la librería. */
136
+ type InputProps = InputProps$1<IconName>;
137
+ /** Extensión solo web del contrato (ADR-009): atributos de formulario y escape hatches. */
138
+ interface InputWebProps extends InputProps {
139
+ /** `id` del `<input>`. Dentro de un `FormField` no hace falta: lo pone él. */
140
+ id?: string | undefined;
141
+ /** Nombre con el que viaja en un `<form>`. */
142
+ name?: string | undefined;
143
+ /** Pista de autocompletado del navegador (`email`, `current-password`, `one-time-code`…). */
144
+ autoComplete?: string | undefined;
145
+ /** Se aplican a la caja del campo, no al `<input>`. */
146
+ className?: string | undefined;
147
+ style?: CSSProperties | undefined;
148
+ ref?: Ref<HTMLInputElement> | undefined;
149
+ }
150
+ //#endregion
151
+ //#region src/input/Input.web.d.ts
152
+ export declare function Input({ value, defaultValue, onChangeText, placeholder, type, size, disabled, readOnly, invalid, required, iconStart, iconEnd, maxLength, onFocus, onBlur, onSubmit, accessibilityLabel, id, name, autoComplete, className, style, testID, ref }: InputWebProps): import("react").JSX.Element;
153
+ //#endregion
154
+ //#region src/link/Link.types.d.ts
155
+ /** Extensión solo web del contrato (ADR-009): atributos del `<a>` y escape hatches. */
156
+ interface LinkWebProps extends LinkProps$1 {
157
+ /** Dónde se abre. Con `_blank` se añade `rel="noopener noreferrer"` si no se indica otro. */
158
+ target?: '_self' | '_blank' | '_parent' | '_top' | undefined;
159
+ rel?: string | undefined;
160
+ className?: string | undefined;
161
+ style?: CSSProperties | undefined;
162
+ ref?: Ref<HTMLAnchorElement> | undefined;
163
+ }
164
+ //#endregion
165
+ //#region src/link/Link.web.d.ts
166
+ export declare function Link({ href, variant, color, underline, onPress, accessibilityLabel, target, rel, className, style, testID, ref, children }: LinkWebProps): import("react").JSX.Element;
167
+ //#endregion
168
+ //#region src/modal/Modal.types.d.ts
169
+ /** Extensión solo web del contrato (ADR-009). */
170
+ interface ModalWebProps extends ModalProps$1 {
171
+ /** Se aplican al `<dialog>`. */
172
+ className?: string | undefined;
173
+ style?: CSSProperties | undefined;
174
+ ref?: Ref<HTMLDialogElement> | undefined;
175
+ }
176
+ //#endregion
177
+ //#region src/modal/Modal.web.d.ts
178
+ /** Un diálogo centrado (ADR-040). */
179
+ export declare function Modal(props: ModalWebProps): import("react").JSX.Element;
180
+ //#endregion
181
+ //#region src/select/Select.types.d.ts
182
+ /** Extensión solo web del contrato (ADR-009): atributos de formulario y escape hatches. */
183
+ interface SelectWebProps extends SelectProps$1 {
184
+ /** `id` del `<select>`. Dentro de un `FormField` no hace falta: lo pone él. */
185
+ id?: string | undefined;
186
+ /** Nombre con el que viaja en un `<form>`. */
187
+ name?: string | undefined;
188
+ /** Se aplican a la caja del campo, no al `<select>`. */
189
+ className?: string | undefined;
190
+ style?: CSSProperties | undefined;
191
+ ref?: Ref<HTMLSelectElement> | undefined;
192
+ }
193
+ //#endregion
194
+ //#region src/select/Select.web.d.ts
195
+ /**
196
+ * Un `<select>` real (ADR-038): el teclado, los lectores de pantalla y el selector del
197
+ * sistema en móvil son los del navegador.
198
+ */
199
+ export declare function Select({ options, value, defaultValue, onValueChange, placeholder, size, disabled, invalid, required, accessibilityLabel, id, name, className, style, testID, ref }: SelectWebProps): import("react").JSX.Element;
200
+ //#endregion
201
+ //#region src/sheet/Sheet.types.d.ts
202
+ /** `Sheet` tiene las mismas props que `Modal` (ADR-040). */
203
+ type SheetWebProps = ModalWebProps;
204
+ //#endregion
205
+ //#region src/sheet/Sheet.web.d.ts
206
+ /** Un diálogo anclado al borde inferior (ADR-040). Comparte todo con `Modal` salvo dónde se coloca. */
207
+ export declare function Sheet(props: SheetWebProps): import("react").JSX.Element;
208
+ //#endregion
209
+ //#region src/skeleton/Skeleton.types.d.ts
210
+ /** Extensión solo web del contrato (ADR-009). */
211
+ interface SkeletonWebProps extends SkeletonProps$1 {
212
+ className?: string | undefined;
213
+ style?: CSSProperties | undefined;
214
+ }
215
+ //#endregion
216
+ //#region src/skeleton/Skeleton.web.d.ts
217
+ /** Decorativo: los lectores de pantalla lo ignoran. */
218
+ export declare function Skeleton({ shape, width, height, variant, lines, className, style, testID }: SkeletonWebProps): import("react").JSX.Element;
219
+ //#endregion
59
220
  //#region src/spinner/Spinner.types.d.ts
60
221
  interface SpinnerWebProps extends SpinnerProps$1 {
61
222
  className?: string | undefined;
@@ -63,9 +224,10 @@ interface SpinnerWebProps extends SpinnerProps$1 {
63
224
  //#endregion
64
225
  //#region src/spinner/Spinner.web.d.ts
65
226
  /**
66
- * Indicador de carga indeterminada. Versión mínima (ROADMAP Fase 3): el icono
67
- * `loader-circle` girando. Con `label` es una barra de progreso indeterminada
68
- * para los lectores de pantalla; sin él, es decorativo.
227
+ * Indicador de carga indeterminada: el icono `loader-circle` girando. Con `label` es
228
+ * una barra de progreso indeterminada para los lectores de pantalla; sin él, es
229
+ * decorativo. Con movimiento reducido gira más despacio, pero no se detiene: parado
230
+ * no diría que algo está en curso.
69
231
  */
70
232
  export declare function Spinner({ size, color, label, className, testID }: SpinnerWebProps): import("react").JSX.Element;
71
233
  //#endregion
@@ -75,6 +237,37 @@ interface StackWebProps extends StackProps$1, Pick<BoxWebProps, 'as' | 'classNam
75
237
  //#region src/stack/Stack.web.d.ts
76
238
  export declare function Stack({ direction, gap, align, justify, wrap, className, style, ...boxProps }: StackWebProps): import("react").JSX.Element;
77
239
  //#endregion
240
+ //#region src/switch/Switch.types.d.ts
241
+ /** Extensión solo web del contrato (ADR-009): atributos de formulario y escape hatches. */
242
+ interface SwitchWebProps extends SwitchProps$1 {
243
+ id?: string | undefined;
244
+ /** Nombre con el que viaja en un `<form>`. */
245
+ name?: string | undefined;
246
+ /** Valor que viaja en el `<form>` cuando está activado (por defecto `on`). */
247
+ value?: string | undefined;
248
+ /** Se aplican a la etiqueta que envuelve el interruptor y su texto. */
249
+ className?: string | undefined;
250
+ style?: CSSProperties | undefined;
251
+ ref?: Ref<HTMLInputElement> | undefined;
252
+ }
253
+ //#endregion
254
+ //#region src/switch/Switch.web.d.ts
255
+ export declare function Switch({ checked, defaultChecked, onCheckedChange, disabled, accessibilityLabel, id, name, value, className, style, testID, ref, children }: SwitchWebProps): import("react").JSX.Element;
256
+ //#endregion
257
+ //#region src/tabs/Tabs.types.d.ts
258
+ /** Una pestaña, con el conjunto de iconos de la librería. */
259
+ type TabItem = TabItem$1<IconName>;
260
+ /** Contrato de `Tabs` con el conjunto de iconos de la librería. */
261
+ type TabsProps = TabsProps$1<IconName>;
262
+ /** Extensión solo web del contrato (ADR-009). */
263
+ interface TabsWebProps extends TabsProps {
264
+ className?: string | undefined;
265
+ style?: CSSProperties | undefined;
266
+ }
267
+ //#endregion
268
+ //#region src/tabs/Tabs.web.d.ts
269
+ export declare function Tabs({ items, value, defaultValue, onValueChange, accessibilityLabel, className, style, testID }: TabsWebProps): import("react").JSX.Element;
270
+ //#endregion
78
271
  //#region src/text/Text.types.d.ts
79
272
  type TextElement = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'p' | 'span' | 'div' | 'label' | 'code';
80
273
  interface TextWebProps extends TextProps$1 {
@@ -87,11 +280,27 @@ interface TextWebProps extends TextProps$1 {
87
280
  //#region src/text/Text.web.d.ts
88
281
  export declare function Text({ variant, color, align, truncate, as, className, style, testID, children }: TextWebProps): import("react").JSX.Element;
89
282
  //#endregion
283
+ //#region src/text-area/TextArea.types.d.ts
284
+ /** Extensión solo web del contrato (ADR-009): atributos de formulario y escape hatches. */
285
+ interface TextAreaWebProps extends TextAreaProps$1 {
286
+ /** `id` del `<textarea>`. Dentro de un `FormField` no hace falta: lo pone él. */
287
+ id?: string | undefined;
288
+ /** Nombre con el que viaja en un `<form>`. */
289
+ name?: string | undefined;
290
+ className?: string | undefined;
291
+ style?: CSSProperties | undefined;
292
+ ref?: Ref<HTMLTextAreaElement> | undefined;
293
+ }
294
+ //#endregion
295
+ //#region src/text-area/TextArea.web.d.ts
296
+ export declare function TextArea({ value, defaultValue, onChangeText, placeholder, rows, disabled, readOnly, invalid, required, maxLength, onFocus, onBlur, accessibilityLabel, id, name, className, style, testID, ref }: TextAreaWebProps): import("react").JSX.Element;
297
+ //#endregion
90
298
  //#region src/ui-provider/UIProvider.web.d.ts
91
299
  /**
92
300
  * Activa tema y marca para todo lo que envuelve (ADR-010). Pone `data-theme` y
93
- * `data-brand` en un contenedor sin caja propia; `tokens.css` hace el resto.
301
+ * `data-brand` en un contenedor sin caja propia; `tokens.css` hace el resto. También
302
+ * guarda la cola de toasts y los pinta (ADR-039).
94
303
  */
95
304
  export declare function UIProvider({ theme, brand, children }: UIProviderProps$1): import("react").JSX.Element;
96
305
  //#endregion
97
- export { type BadgeProps, type BadgeWebProps, type BoxElement, type BoxProps, type BoxWebProps, type ButtonProps, type ButtonWebProps, type ColorScheme, type IconName, type IconProps, type IconWebProps, type SpinnerProps, type SpinnerWebProps, type StackProps, type StackWebProps, type TextElement, type TextProps, type TextWebProps, type ThemeMode, type UIProviderProps, useBrand, useColorScheme, useTheme };
306
+ export { type AlertProps, type AlertWebProps, type BadgeProps, type BadgeWebProps, type BoxElement, type BoxProps, type BoxWebProps, type ButtonProps, type ButtonWebProps, type CardProps, type CardWebProps, type CheckboxProps, type CheckboxWebProps, type ColorScheme, type DividerProps, type DividerWebProps, type FormFieldProps, type FormFieldWebProps, type IconButtonProps, type IconButtonWebProps, type IconName, type IconProps, type IconWebProps, type InputProps, type InputWebProps, type LinkPressEvent, type LinkProps, type LinkWebProps, type ModalProps, type ModalWebProps, type SelectOption, type SelectProps, type SelectWebProps, type SheetProps, type SheetWebProps, type SkeletonProps, type SkeletonWebProps, type SpinnerProps, type SpinnerWebProps, type StackProps, type StackWebProps, type SwitchProps, type SwitchWebProps, type TabItem, type TabsProps, type TabsWebProps, type TextAreaProps, type TextAreaWebProps, type TextElement, type TextProps, type TextWebProps, type ThemeMode, type ToastAction, type ToastApi, type ToastOptions, type UIProviderProps, useBrand, useColorScheme, useTheme, useToast };