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