@satellatickets/ui 0.0.0-stage → 0.1.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Roberto Rodriguez Carbonell
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/NOTICE.md ADDED
@@ -0,0 +1,9 @@
1
+ # Avisos de terceros
2
+
3
+ `@satellatickets/ui` incluye los trazos de los iconos de [Lucide](https://lucide.dev), publicados bajo licencia ISC:
4
+
5
+ > ISC License. Copyright (c) 2026 Lucide Icons and Contributors. Portions of the code are copyright (c) 2013-2022 Cole Bemis (Feather Icons).
6
+ >
7
+ > Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.
8
+ >
9
+ > THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
package/README.md CHANGED
@@ -1,4 +1,85 @@
1
- # Temporary Holding Version
1
+ # @satellatickets/ui
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
4
- If no other versions are published within 30 days, this package and version will be deleted.
3
+ Componentes de satella-ui con **una sola API para React (web) y React Native**. Las apps importan lo mismo en ambas plataformas y el bundler de cada una resuelve la vista correcta: HTML y CSS reales en web, componentes nativos en móvil.
4
+
5
+ ```tsx
6
+ import { Button, Stack, Text, UIProvider } from '@satellatickets/ui';
7
+
8
+ export function Compra() {
9
+ return (
10
+ <UIProvider theme="dark">
11
+ <Stack gap={4} align="start">
12
+ <Text variant="title">Noche Satella</Text>
13
+ <Button iconStart="ticket" onPress={comprar}>
14
+ Comprar entradas
15
+ </Button>
16
+ </Stack>
17
+ </UIProvider>
18
+ );
19
+ }
20
+ ```
21
+
22
+ ## Instalación
23
+
24
+ ```bash
25
+ npm install @satellatickets/ui
26
+ ```
27
+
28
+ `@satellatickets/core` y `@satellatickets/tokens` llegan como dependencias. `react` es un peer en ambas plataformas (`>=19.0`).
29
+
30
+ ### Web
31
+
32
+ Requiere `react-dom >=19.0`. Importa los estilos **una vez**, en la entrada de la app:
33
+
34
+ ```ts
35
+ import '@satellatickets/ui/styles.css';
36
+ ```
37
+
38
+ Es un CSS estático, sin runtime de estilos: funciona con SSR y Server Components, y cambiar de tema no re-renderiza nada.
39
+
40
+ ### React Native
41
+
42
+ Requiere `react-native >=0.81` con la Nueva Arquitectura y `react-native-svg >=15`, que dibuja los iconos. Se instalan juntos:
43
+
44
+ ```bash
45
+ npx expo install @satellatickets/ui react-native-svg
46
+ ```
47
+
48
+ `react-native-svg` no se instala solo a propósito. Es un módulo nativo: tiene que figurar en el `package.json` de la app para que se enlace, y `expo install` elige la versión que corresponde a tu SDK. Además, así las apps web no lo reciben.
49
+
50
+ No hay nada más que configurar: Metro resuelve la versión nativa del paquete.
51
+
52
+ ### Fuentes
53
+
54
+ La librería nombra las familias de Satella (Unbounded, Hanken Grotesk e IBM Plex Mono) pero no las empaqueta: las carga cada app, con `next/font` o un `<link>` en web y con `expo-font` en nativo. Si una fuente no está cargada, se usa la del sistema.
55
+
56
+ ## Tema y marca
57
+
58
+ `UIProvider` envuelve la app, o cualquier zona de ella, y aplica el tema y la marca:
59
+
60
+ ```tsx
61
+ <UIProvider theme="system" brand="organizer">
62
+ …
63
+ </UIProvider>
64
+ ```
65
+
66
+ - `theme`: `light`, `dark` o `system` (por defecto, el del sistema).
67
+ - `brand`: una marca definida en los tokens (`admin`, `organizer`). Sin ella se usa la identidad por defecto.
68
+
69
+ Los hooks `useTheme()`, `useColorScheme()` y `useBrand()` dan acceso al tema resuelto.
70
+
71
+ ## Componentes
72
+
73
+ | Grupo | Componentes |
74
+ | ----------- | ------------------------------ |
75
+ | Fundamentos | `Box`, `Stack`, `Text`, `Icon` |
76
+ | Acciones | `Button` |
77
+ | Feedback | `Badge`, `Spinner` |
78
+
79
+ 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
+
81
+ El catálogo, con todas las variantes, los estados y la documentación de cada componente, está en el [Storybook](https://robertorodriguezcarbonell.github.io/satella-ui/).
82
+
83
+ ## Tipos
84
+
85
+ Las props comunes a ambas plataformas se llaman `<Componente>Props` (`ButtonProps`). Cada plataforma exporta además las suyas: `ButtonWebProps` en web, con `className`, `style` y `type`, y `ButtonNativeProps` en React Native.
@@ -0,0 +1,91 @@
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";
3
+ import { Ref } from "react";
4
+ //#region src/badge/Badge.types.d.ts
5
+ /** Extensión solo nativa del contrato. */
6
+ interface BadgeNativeProps extends BadgeProps$1 {
7
+ style?: StyleProp<ViewStyle> | undefined;
8
+ }
9
+ //#endregion
10
+ //#region src/badge/Badge.native.d.ts
11
+ export declare function Badge({ variant, style, testID, children }: BadgeNativeProps): import("react").JSX.Element;
12
+ //#endregion
13
+ //#region src/box/Box.types.d.ts
14
+ /** Extensión solo nativa del contrato. */
15
+ interface BoxNativeProps extends BoxProps$1 {
16
+ style?: StyleProp<ViewStyle> | undefined;
17
+ }
18
+ //#endregion
19
+ //#region src/box/Box.native.d.ts
20
+ export declare function Box({ padding, paddingX, paddingY, background, radius, borderColor, shadow, flex, style, testID, children }: BoxNativeProps): import("react").JSX.Element;
21
+ //#endregion
22
+ //#region ../icons/dist/index.d.ts
23
+ declare const iconNames: readonly ["arrow-left", "arrow-right", "calendar", "check", "chevron-down", "chevron-left", "chevron-right", "chevron-up", "circle-alert", "circle-check", "circle-x", "eye-off", "eye", "globe", "info", "loader-circle", "map-pin", "menu", "minus", "plus", "search", "settings", "ticket", "triangle-alert", "user", "x"];
24
+ //#endregion
25
+ //#region src/icon/Icon.types.d.ts
26
+ /**
27
+ * Nombres de icono disponibles. Se deriva aquí de `iconNames` (y no se reexporta el
28
+ * tipo de `icons`) porque el empaquetador de declaraciones no resuelve reexports de
29
+ * tipo del paquete interno al inlinarlo en `ui`.
30
+ */
31
+ type IconName = (typeof iconNames)[number];
32
+ /** Contrato de `Icon` con el conjunto de nombres del paquete de iconos. */
33
+ type IconProps = IconProps$1<IconName>;
34
+ interface IconNativeProps extends IconProps {
35
+ style?: StyleProp<ViewStyle> | undefined;
36
+ }
37
+ //#endregion
38
+ //#region src/button/Button.types.d.ts
39
+ /** Contrato de `Button` con el conjunto de iconos de la librería. */
40
+ type ButtonProps = ButtonProps$1<IconName>;
41
+ /** Extensión solo nativa del contrato. */
42
+ interface ButtonNativeProps extends ButtonProps {
43
+ style?: StyleProp<ViewStyle> | undefined;
44
+ ref?: Ref<View> | undefined;
45
+ }
46
+ //#endregion
47
+ //#region src/button/Button.native.d.ts
48
+ export declare function Button({ variant, size, disabled, loading, iconStart, iconEnd, fullWidth, onPress, accessibilityLabel, style, testID, ref, children }: ButtonNativeProps): import("react").JSX.Element;
49
+ //#endregion
50
+ //#region src/icon/Icon.native.d.ts
51
+ export declare function Icon({ name, size, color, label, style, testID }: IconNativeProps): import("react").JSX.Element;
52
+ //#endregion
53
+ //#region src/spinner/Spinner.types.d.ts
54
+ interface SpinnerNativeProps extends SpinnerProps$1 {
55
+ style?: StyleProp<ViewStyle> | undefined;
56
+ }
57
+ //#endregion
58
+ //#region src/spinner/Spinner.native.d.ts
59
+ /**
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.
64
+ */
65
+ export declare function Spinner({ size, color, label, style, testID }: SpinnerNativeProps): import("react").JSX.Element;
66
+ //#endregion
67
+ //#region src/stack/Stack.types.d.ts
68
+ interface StackNativeProps extends StackProps$1 {
69
+ style?: StyleProp<ViewStyle> | undefined;
70
+ }
71
+ //#endregion
72
+ //#region src/stack/Stack.native.d.ts
73
+ export declare function Stack({ direction, gap, align, justify, wrap, style, ...boxProps }: StackNativeProps): import("react").JSX.Element;
74
+ //#endregion
75
+ //#region src/text/Text.types.d.ts
76
+ interface TextNativeProps extends TextProps$1 {
77
+ numberOfLines?: number | undefined;
78
+ style?: StyleProp<TextStyle> | undefined;
79
+ }
80
+ //#endregion
81
+ //#region src/text/Text.native.d.ts
82
+ export declare function Text({ variant, color, align, truncate, numberOfLines, style, testID, children }: TextNativeProps): import("react").JSX.Element;
83
+ //#endregion
84
+ //#region src/ui-provider/UIProvider.native.d.ts
85
+ /**
86
+ * Activa tema y marca para todo lo que envuelve (ADR-010). Entrega el tema
87
+ * resuelto por contexto; `system` sigue a `Appearance`.
88
+ */
89
+ export declare function UIProvider({ theme, brand, children }: UIProviderProps$1): import("react").JSX.Element;
90
+ //#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 };