orn-ui 0.2.5 → 0.2.7

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.
Files changed (112) hide show
  1. package/AGENTS.md +354 -0
  2. package/README.md +43 -13
  3. package/lib/commonjs/organisms/DateField.js +1 -1
  4. package/lib/commonjs/organisms/DateField.js.map +1 -1
  5. package/lib/module/organisms/DateField.js +1 -1
  6. package/lib/module/organisms/DateField.js.map +1 -1
  7. package/lib/typescript/atoms/Badge.d.ts +1 -1
  8. package/lib/typescript/atoms/Badge.d.ts.map +1 -1
  9. package/lib/typescript/atoms/Image.d.ts +6 -6
  10. package/lib/typescript/atoms/Image.d.ts.map +1 -1
  11. package/lib/typescript/atoms/Input.d.ts +1 -1
  12. package/lib/typescript/atoms/Input.d.ts.map +1 -1
  13. package/lib/typescript/atoms/PressableScale.d.ts +1 -1
  14. package/lib/typescript/atoms/PressableScale.d.ts.map +1 -1
  15. package/lib/typescript/atoms/Skeleton.d.ts +5 -5
  16. package/lib/typescript/atoms/Skeleton.d.ts.map +1 -1
  17. package/lib/typescript/atoms/Spinner.d.ts +4 -4
  18. package/lib/typescript/atoms/Spinner.d.ts.map +1 -1
  19. package/lib/typescript/atoms/Transition.d.ts +10 -10
  20. package/lib/typescript/atoms/Transition.d.ts.map +1 -1
  21. package/lib/typescript/molecules/AvatarHeader.d.ts +2 -2
  22. package/lib/typescript/molecules/AvatarHeader.d.ts.map +1 -1
  23. package/lib/typescript/molecules/FormActions.d.ts +1 -1
  24. package/lib/typescript/molecules/FormActions.d.ts.map +1 -1
  25. package/lib/typescript/molecules/OptionCard.d.ts +2 -2
  26. package/lib/typescript/molecules/OptionCard.d.ts.map +1 -1
  27. package/lib/typescript/molecules/Stepper.d.ts +8 -8
  28. package/lib/typescript/molecules/Stepper.d.ts.map +1 -1
  29. package/lib/typescript/molecules/Steps.d.ts +3 -3
  30. package/lib/typescript/molecules/Steps.d.ts.map +1 -1
  31. package/lib/typescript/molecules/SymmetricGrid.d.ts +4 -4
  32. package/lib/typescript/molecules/SymmetricGrid.d.ts.map +1 -1
  33. package/lib/typescript/organisms/BottomSheet.d.ts +8 -8
  34. package/lib/typescript/organisms/BottomSheet.d.ts.map +1 -1
  35. package/lib/typescript/organisms/DateField.d.ts +10 -10
  36. package/lib/typescript/organisms/DateField.d.ts.map +1 -1
  37. package/lib/typescript/organisms/DatePicker.d.ts +10 -10
  38. package/lib/typescript/organisms/DatePicker.d.ts.map +1 -1
  39. package/lib/typescript/organisms/List.d.ts +6 -6
  40. package/lib/typescript/organisms/List.d.ts.map +1 -1
  41. package/lib/typescript/organisms/NavigationBar.d.ts +2 -2
  42. package/lib/typescript/organisms/NavigationBar.d.ts.map +1 -1
  43. package/lib/typescript/organisms/ReorderableList.d.ts +7 -7
  44. package/lib/typescript/organisms/ReorderableList.d.ts.map +1 -1
  45. package/lib/typescript/organisms/Screen.d.ts +6 -6
  46. package/lib/typescript/organisms/SearchList.d.ts +8 -8
  47. package/lib/typescript/organisms/SearchList.d.ts.map +1 -1
  48. package/lib/typescript/organisms/Select.d.ts +2 -2
  49. package/lib/typescript/organisms/Select.d.ts.map +1 -1
  50. package/lib/typescript/organisms/Toast.d.ts +2 -2
  51. package/lib/typescript/organisms/Toast.d.ts.map +1 -1
  52. package/lib/typescript/organisms/ToastProvider.d.ts +2 -2
  53. package/lib/typescript/organisms/ToastProvider.d.ts.map +1 -1
  54. package/lib/typescript/organisms/Wizard.d.ts +7 -7
  55. package/lib/typescript/organisms/Wizard.d.ts.map +1 -1
  56. package/lib/typescript/theme/UIProvider.d.ts +9 -9
  57. package/lib/typescript/theme/UIProvider.d.ts.map +1 -1
  58. package/llms.txt +33 -0
  59. package/package.json +24 -6
  60. package/registry/avatar-header.json +1 -1
  61. package/registry/badge.json +1 -1
  62. package/registry/bottom-sheet.json +1 -1
  63. package/registry/core.json +1 -1
  64. package/registry/date-field.json +1 -1
  65. package/registry/date-picker.json +1 -1
  66. package/registry/form-actions.json +1 -1
  67. package/registry/image.json +1 -1
  68. package/registry/index.json +26 -26
  69. package/registry/input.json +1 -1
  70. package/registry/list.json +1 -1
  71. package/registry/navigation-bar.json +1 -1
  72. package/registry/option-card.json +1 -1
  73. package/registry/pressable-scale.json +1 -1
  74. package/registry/reorderable-list.json +1 -1
  75. package/registry/screen.json +1 -1
  76. package/registry/search-list.json +1 -1
  77. package/registry/select.json +1 -1
  78. package/registry/skeleton.json +1 -1
  79. package/registry/spinner.json +1 -1
  80. package/registry/stepper.json +1 -1
  81. package/registry/steps.json +1 -1
  82. package/registry/symmetric-grid.json +1 -1
  83. package/registry/toast-provider.json +1 -1
  84. package/registry/toast.json +1 -1
  85. package/registry/transition.json +1 -1
  86. package/registry/wizard.json +1 -1
  87. package/src/atoms/Badge.tsx +1 -1
  88. package/src/atoms/Image.tsx +6 -6
  89. package/src/atoms/Input.tsx +1 -1
  90. package/src/atoms/PressableScale.tsx +1 -1
  91. package/src/atoms/Skeleton.tsx +5 -5
  92. package/src/atoms/Spinner.tsx +4 -4
  93. package/src/atoms/Transition.tsx +10 -10
  94. package/src/molecules/AvatarHeader.tsx +2 -2
  95. package/src/molecules/FormActions.tsx +1 -1
  96. package/src/molecules/OptionCard.tsx +2 -2
  97. package/src/molecules/Stepper.tsx +8 -8
  98. package/src/molecules/Steps.tsx +3 -3
  99. package/src/molecules/SymmetricGrid.tsx +4 -4
  100. package/src/organisms/BottomSheet.tsx +8 -8
  101. package/src/organisms/DateField.tsx +11 -11
  102. package/src/organisms/DatePicker.tsx +10 -10
  103. package/src/organisms/List.tsx +6 -6
  104. package/src/organisms/NavigationBar.tsx +2 -2
  105. package/src/organisms/ReorderableList.tsx +7 -7
  106. package/src/organisms/Screen.tsx +6 -6
  107. package/src/organisms/SearchList.tsx +8 -8
  108. package/src/organisms/Select.tsx +2 -2
  109. package/src/organisms/Toast.tsx +2 -2
  110. package/src/organisms/ToastProvider.tsx +2 -2
  111. package/src/organisms/Wizard.tsx +7 -7
  112. package/src/theme/UIProvider.tsx +9 -9
@@ -13,25 +13,25 @@ export type TransitionPreset =
13
13
 
14
14
  export interface TransitionProps {
15
15
  children: React.ReactNode;
16
- /** Entra en true, sale (y desmonta) en false. @default true */
16
+ /** Enters when true, exits (and unmounts) when false. @default true */
17
17
  visible?: boolean;
18
- /** Uno o varios: 'fade scale' combina opacidad y escala. @default 'fade' */
18
+ /** One or more: 'fade scale' combines opacity and scale. @default 'fade' */
19
19
  preset?: TransitionPreset | TransitionPreset[];
20
- /** ms del timing. @default tokens.duration.base */
20
+ /** Timing duration in ms. @default tokens.duration.base */
21
21
  duration?: number;
22
- /** ms antes de arrancar. Un índice por delay escalona una lista. @default 0 */
22
+ /** ms before starting. A per-index delay staggers a list. @default 0 */
23
23
  delay?: number;
24
- /** Píxeles que recorren los presets de slide. @default 24 */
24
+ /** Pixels traveled by the slide presets. @default 24 */
25
25
  distance?: number;
26
- /** Spring en vez de timing (implícito en 'pop'). */
26
+ /** Spring instead of timing (implicit in 'pop'). */
27
27
  spring?: boolean;
28
- /** Anima también el primer render. En false arranca ya presente. @default true */
28
+ /** Also animates the first render. When false it starts already present. @default true */
29
29
  appear?: boolean;
30
- /** Deja el nodo montado al salir, sólo lo esconde. @default false */
30
+ /** Keeps the node mounted on exit, only hides it. @default false */
31
31
  keepMounted?: boolean;
32
32
  /**
33
- * Progreso 0→1 manejado desde afuera. Con esto el Transition sólo interpola:
34
- * quien lo pasa decide cuándo y cómo avanza (un PanResponder, por ejemplo).
33
+ * 0→1 progress driven from outside. With this, Transition only interpolates:
34
+ * whoever passes it decides when and how it advances (a PanResponder, for example).
35
35
  */
36
36
  value?: Animated.Value;
37
37
  onEntered?: () => void;
@@ -6,10 +6,10 @@ import { Icon } from '../icons/Icon';
6
6
  import type { IconName } from '../icons/types';
7
7
 
8
8
  export interface AvatarHeaderProps {
9
- /** Ícono a mostrar dentro del círculo. Si se omite, se usan `initials`. */
9
+ /** Icon to show inside the circle. If omitted, `initials` is used instead. */
10
10
  iconName?: IconName;
11
11
  iconColor?: string;
12
- /** Texto corto (ej. 2 letras) mostrado si no se pasa `iconName`. */
12
+ /** Short text (e.g. 2 letters) shown when `iconName` isn't provided. */
13
13
  initials?: string;
14
14
  title: string;
15
15
  subtitle?: React.ReactNode;
@@ -5,7 +5,7 @@ import type { IconName } from '../icons/types';
5
5
  import { useLabels } from '../theme/UIProvider';
6
6
 
7
7
  export interface FormActionsProps {
8
- /** Si se omite, solo se muestra el botón secundario. */
8
+ /** If omitted, only the secondary button is shown. */
9
9
  primaryLabel?: string;
10
10
  onPrimaryPress?: () => void;
11
11
  primaryDisabled?: boolean;
@@ -8,13 +8,13 @@ import type { IconName } from '../icons/types';
8
8
 
9
9
  export interface OptionCardProps {
10
10
  label: string;
11
- /** Línea secundaria: el detalle que decide la elección ("llega en 3 días"). */
11
+ /** Secondary line: the detail that decides the choice ("arrives in 3 days"). */
12
12
  description?: string;
13
13
  iconName?: IconName;
14
14
  isSelected: boolean;
15
15
  onPress: () => void;
16
16
  disabled?: boolean;
17
- /** 'vertical': ícono arriba, texto abajo centrado. 'horizontal': en fila. @default 'horizontal' */
17
+ /** 'vertical': icon on top, text centered below. 'horizontal': in a row. @default 'horizontal' */
18
18
  layout?: 'vertical' | 'horizontal';
19
19
  style?: StyleProp<ViewStyle>;
20
20
  testID?: string;
@@ -11,23 +11,23 @@ export interface StepperProps {
11
11
  onChangeText: (text: string) => void;
12
12
  onIncrement: () => void;
13
13
  onDecrement: () => void;
14
- /** Escala del control: alto, botones, ícono y tipografía. @default 'md' */
14
+ /** Scale of the control: height, buttons, icon and typography. @default 'md' */
15
15
  size?: StepperSize;
16
- /** Ocupa todo el ancho disponible y el input se lleva el sobrante. @default false */
16
+ /** Takes up all available width and the input absorbs the extra space. @default false */
17
17
  block?: boolean;
18
18
  /**
19
- * En false el valor sólo se cambia con los botones: el teclado no se abre y
20
- * el campo pierde el fondo que lo anuncia como editable. @default true
19
+ * When false the value can only be changed with the buttons: the keyboard doesn't open and
20
+ * the field loses the background that marks it as editable. @default true
21
21
  */
22
22
  editable?: boolean;
23
23
  /**
24
- * Mínimo permitido. Deshabilita "-" al alcanzarlo y acota lo tipeado al
25
- * salir del campo. Los negativos se aceptan sólo si `min` es negativo.
24
+ * Minimum allowed value. Disables "-" when reached and clamps the typed value on
25
+ * blur. Negative values are only accepted if `min` is negative.
26
26
  */
27
27
  min?: number;
28
- /** Máximo permitido. Deshabilita "+" al alcanzarlo y acota lo tipeado. */
28
+ /** Maximum allowed value. Disables "+" when reached and clamps the typed value. */
29
29
  max?: number;
30
- /** Acepta un separador decimal, normalizando la coma a punto. @default false */
30
+ /** Accepts a decimal separator, normalizing comma to dot. @default false */
31
31
  allowDecimals?: boolean;
32
32
  style?: StyleProp<ViewStyle>;
33
33
  incrementAccessibilityLabel?: string;
@@ -13,16 +13,16 @@ export type StepStatus = 'completed' | 'current' | 'pending';
13
13
 
14
14
  export interface StepsProps {
15
15
  steps: StepItem[];
16
- /** Índice del paso actual (0-based). Los anteriores quedan 'completed'. */
16
+ /** Index of the current step (0-based). Earlier steps become 'completed'. */
17
17
  current: number;
18
18
  /** @default 'horizontal' */
19
19
  orientation?: 'horizontal' | 'vertical';
20
20
  /**
21
- * Qué muestra el círculo de un paso ya completado: un check, o su número.
21
+ * What the circle of an already-completed step shows: a check, or its number.
22
22
  * @default 'check'
23
23
  */
24
24
  completedIndicator?: 'check' | 'number';
25
- /** Si se pasa, cada paso es tocable y reporta su índice. */
25
+ /** If provided, each step is tappable and reports its index. */
26
26
  onStepPress?: (index: number) => void;
27
27
  style?: StyleProp<ViewStyle>;
28
28
  }
@@ -6,13 +6,13 @@ export interface SymmetricGridProps<T> {
6
6
  data: T[];
7
7
  renderItem: (item: T, index: number) => React.ReactElement;
8
8
  keyExtractor: (item: T, index: number) => string;
9
- /** Columnas por fila. @default 2 */
9
+ /** Columns per row. @default 2 */
10
10
  columns?: number;
11
- /** Separación entre celdas, en ambos ejes. @default theme.tokens.spacing.md */
11
+ /** Spacing between cells, on both axes. @default theme.tokens.spacing.md */
12
12
  gap?: number;
13
13
  /**
14
- * Última fila incompleta: centrada (simétrica) en vez de pegada a la
15
- * izquierda con un hueco a la derecha. @default true
14
+ * Incomplete last row: centered (symmetric) instead of stuck to the
15
+ * left with a gap on the right. @default true
16
16
  */
17
17
  balanceLastRow?: boolean;
18
18
  style?: StyleProp<ViewStyle>;
@@ -27,21 +27,21 @@ export interface BottomSheetProps {
27
27
  visible: boolean;
28
28
  onClose: () => void;
29
29
  children: React.ReactNode;
30
- /** Con título aparece el header, con su botón de cerrar. */
30
+ /** With a title, the header appears, with its close button. */
31
31
  title?: string;
32
- /** Acciones de la hoja. Dónde vive lo decide `footerPlacement`. */
32
+ /** Sheet actions. Where they live is decided by `footerPlacement`. */
33
33
  footer?: React.ReactNode;
34
34
  /**
35
- * 'fixed' lo ancla al pie de la hoja; 'scroll' lo deja al final del
36
- * contenido; 'hide-with-keyboard' lo esconde mientras se escribe, que en un
37
- * formulario largo le devuelve esa franja al campo enfocado. @default 'fixed'
35
+ * 'fixed' anchors it to the bottom of the sheet; 'scroll' leaves it at the
36
+ * end of the content; 'hide-with-keyboard' hides it while typing, which in a
37
+ * long form gives that strip back to the focused field. @default 'fixed'
38
38
  */
39
39
  footerPlacement?: FooterPlacement;
40
- /** El contenido scrollea cuando no entra. @default true */
40
+ /** The content scrolls when it doesn't fit. @default true */
41
41
  scrollable?: boolean;
42
- /** Arrastrar la hoja hacia abajo la cierra. @default true */
42
+ /** Dragging the sheet down closes it. @default true */
43
43
  draggable?: boolean;
44
- /** Fracción de la pantalla (0-1) o píxeles. @default 0.9 */
44
+ /** Fraction of the screen (0-1) or pixels. @default 0.9 */
45
45
  maxHeight?: number;
46
46
  closeAccessibilityLabel?: string;
47
47
  containerStyle?: ViewStyle;
@@ -11,31 +11,31 @@ export interface DateFieldProps
11
11
  label?: string;
12
12
  required?: boolean;
13
13
  /**
14
- * 'single' elige una fecha; 'range' elige un intervalo con dos toques.
14
+ * 'single' picks one date; 'range' picks an interval with two taps.
15
15
  * @default 'single'
16
16
  */
17
17
  mode?: 'single' | 'range';
18
- /** Fecha elegida en mode="single". */
18
+ /** Selected date in mode="single". */
19
19
  value?: Date;
20
- /** Se llama en mode="single". */
20
+ /** Called in mode="single". */
21
21
  onChange?: (date: Date) => void;
22
- /** Rango elegido en mode="range". */
22
+ /** Selected range in mode="range". */
23
23
  range?: DateRange;
24
- /** Se llama en mode="range", tanto al fijar el inicio como al cerrar el rango. */
24
+ /** Called in mode="range", both when setting the start and when closing the range. */
25
25
  onRangeChange?: (range: DateRange) => void;
26
26
  placeholder?: string;
27
27
  error?: string;
28
28
  disabled?: boolean;
29
- /** Formatea la fecha en el campo. @default "Month D, YYYY" */
29
+ /** Formats the date in the field. @default "Month D, YYYY" */
30
30
  format?: (date: Date) => string;
31
- /** Título del modal del calendario. @default el `selectDate` de `useLabels()` */
31
+ /** Title of the calendar modal. @default the `selectDate` from `useLabels()` */
32
32
  modalTitle?: string;
33
33
  /**
34
- * Si se pasa, el modal muestra un botón que borra la selección y cierra.
35
- * Sin esto no hay botón: el "Clear" anterior sólo cerraba, sin limpiar nada.
34
+ * If provided, the modal shows a button that clears the selection and closes.
35
+ * Without this there's no button: the previous "Clear" only closed, without clearing anything.
36
36
  */
37
37
  onClear?: () => void;
38
- /** Texto de ese botón. @default el `clear` de `useLabels()` */
38
+ /** Text for that button. @default the `clear` from `useLabels()` */
39
39
  clearLabel?: string;
40
40
  containerStyle?: StyleProp<ViewStyle>;
41
41
  testID?: string;
@@ -150,7 +150,7 @@ export const DateField = memo(
150
150
  disabled={disabled}
151
151
  activeOpacity={0.7}
152
152
  accessibilityRole="button"
153
- accessibilityLabel={label ?? placeholder}
153
+ accessibilityLabel={hasValue ? `${label ?? placeholder}, ${display}` : (label ?? placeholder)}
154
154
  accessibilityState={{ disabled, expanded: open }}
155
155
  >
156
156
  <Text allowFontScaling={allowFontScaling} style={[styles.fieldText, !hasValue && styles.placeholder]}>
@@ -20,29 +20,29 @@ export interface DateRange {
20
20
 
21
21
  export interface DatePickerProps {
22
22
  /**
23
- * 'single' elige una fecha; 'range' elige un intervalo con dos toques.
23
+ * 'single' picks one date; 'range' picks an interval with two taps.
24
24
  * @default 'single'
25
25
  */
26
26
  mode?: 'single' | 'range';
27
- /** Fecha elegida en mode="single". */
27
+ /** Selected date in mode="single". */
28
28
  value?: Date;
29
- /** Se llama en mode="single". */
29
+ /** Called in mode="single". */
30
30
  onChange?: (date: Date) => void;
31
- /** Rango elegido en mode="range". */
31
+ /** Selected range in mode="range". */
32
32
  range?: DateRange;
33
- /** Se llama en mode="range", tanto al fijar el inicio como al cerrar el rango. */
33
+ /** Called in mode="range", both when setting the start and when closing the range. */
34
34
  onRangeChange?: (range: DateRange) => void;
35
35
  minDate?: Date;
36
36
  maxDate?: Date;
37
- /** Mes mostrado al abrir si no hay `value`. @default hoy */
37
+ /** Month shown on open if there's no `value`. @default today */
38
38
  defaultMonth?: Date;
39
- /** Nombres de los meses. @default los de `useLabels()` */
39
+ /** Month names. @default those from `useLabels()` */
40
40
  monthNames?: string[];
41
- /** Iniciales de los días, índice 0 = domingo. @default las de `useLabels()` */
41
+ /** Day initials, index 0 = Sunday. @default those from `useLabels()` */
42
42
  weekdayNames?: string[];
43
- /** 0 = domingo, 1 = lunes. @default 0 */
43
+ /** 0 = Sunday, 1 = Monday. @default 0 */
44
44
  firstDayOfWeek?: 0 | 1;
45
- /** Avisa qué mes quedó a la vista al navegar con las flechas. */
45
+ /** Reports which month became visible when navigating with the arrows. */
46
46
  onVisibleMonthChange?: (month: Date) => void;
47
47
  style?: StyleProp<ViewStyle>;
48
48
  testID?: string;
@@ -12,19 +12,19 @@ export interface ListProps<T> {
12
12
  keyExtractor: (item: T, index: number) => string;
13
13
  renderItem: FlatListProps<T>['renderItem'];
14
14
 
15
- /** Carga inicial: mientras sea true y no haya datos, se muestran placeholders. */
15
+ /** Initial load: while true and there's no data, placeholders are shown. */
16
16
  isLoading: boolean;
17
- /** Recarga con datos ya en pantalla (pull-to-refresh). @default false */
17
+ /** Reload with data already on screen (pull-to-refresh). @default false */
18
18
  isRefreshing?: boolean;
19
19
  isLoadingMore?: boolean;
20
- /** Controlado por el consumidor: mientras es false, se muestra un spinner de pantalla completa. @default true */
20
+ /** Controlled by the consumer: while false, a fullscreen spinner is shown. @default true */
21
21
  isReady?: boolean;
22
22
  loadingText?: string;
23
23
  loadingMoreText?: string;
24
24
 
25
- /** Filas fantasma de la carga inicial. @default 6 */
25
+ /** Ghost rows for the initial load. @default 6 */
26
26
  skeletonCount?: number;
27
- /** Placeholder propio, para que calce con la forma real del ítem. */
27
+ /** Custom placeholder, to match the real shape of the item. */
28
28
  renderSkeletonItem?: () => React.ReactElement;
29
29
 
30
30
  onEndReached?: () => void;
@@ -41,7 +41,7 @@ export interface ListProps<T> {
41
41
  contentContainerStyle?: ViewStyle;
42
42
  containerStyle?: ViewStyle;
43
43
 
44
- /** Componente de lista a usar (FlashList, etc). @default FlatList */
44
+ /** List component to use (FlashList, etc). @default FlatList */
45
45
  ListComponent?: React.ComponentType<any>;
46
46
  listProps?: Record<string, unknown>;
47
47
  }
@@ -26,11 +26,11 @@ export interface NavigationBarProps {
26
26
  items: NavigationBarItem[];
27
27
  activeKey: string;
28
28
  onChange: (key: string) => void;
29
- /** Borde de la pantalla donde vive la barra. @default 'bottom' */
29
+ /** Screen edge where the bar lives. @default 'bottom' */
30
30
  position?: 'bottom' | 'top';
31
31
  /** @default true */
32
32
  showLabels?: boolean;
33
- /** Suma el inset de safe area del borde donde vive la barra. @default true */
33
+ /** Adds the safe area inset for the edge where the bar lives. @default true */
34
34
  safeArea?: boolean;
35
35
  style?: StyleProp<ViewStyle>;
36
36
  testID?: string;
@@ -5,19 +5,19 @@ import { createStyles } from '../theme/createStyles';
5
5
  export interface ReorderableListProps<T> {
6
6
  data: T[];
7
7
  keyExtractor: (item: T, index: number) => string;
8
- /** Alto fijo de cada fila: necesario para calcular el índice destino sin medir layout async. */
8
+ /** Fixed height of each row: needed to calculate the target index without measuring layout async. */
9
9
  itemHeight: number;
10
10
  renderItem: (item: T, index: number, dragging: boolean) => React.ReactElement;
11
- /** Se llama al soltar, con el arreglo ya reordenado. No muta `data`. */
11
+ /** Called on release, with the array already reordered. Does not mutate `data`. */
12
12
  onReorder: (data: T[]) => void;
13
13
  /**
14
- * Empieza el arrastre de la fila `index`. Úsalo para apagar el scroll del
15
- * contenedor (`scrollEnabled={false}`) mientras dura: en iOS el
16
- * `UIScrollView` padre cancela los toques del contenido apenas su gesto
17
- * vertical arranca, y sin eso el arrastre muere a los pocos píxeles.
14
+ * Starts dragging row `index`. Use it to turn off the container's scroll
15
+ * (`scrollEnabled={false}`) while it lasts: on iOS the parent
16
+ * `UIScrollView` cancels touches on the content as soon as its
17
+ * vertical gesture starts, and without this the drag dies within a few pixels.
18
18
  */
19
19
  onDragStart?: (index: number) => void;
20
- /** Termina el arrastre — soltando o por cancelación. Siempre corre si corrió `onDragStart`. */
20
+ /** Ends the drag — on release or cancellation. Always runs if `onDragStart` ran. */
21
21
  onDragEnd?: () => void;
22
22
  disabled?: boolean;
23
23
  style?: StyleProp<ViewStyle>;
@@ -10,14 +10,14 @@ export interface ScreenProps {
10
10
  style?: ViewStyle;
11
11
  scrollable?: boolean;
12
12
  contentContainerStyle?: ViewStyle;
13
- /** Qué insets de safe area aplicar. @default ['top', 'bottom'] */
13
+ /** Which safe area insets to apply. @default ['top', 'bottom'] */
14
14
  edges?: ScreenEdge[];
15
15
  /**
16
- * Compensa el teclado: en iOS con scroll lo hace el propio ScrollView, en el
17
- * resto de los casos con un KeyboardAvoidingView. Ponelo en false cuando
18
- * el contenido ya trae su propio scroller que maneja el teclado (Wizard,
19
- * List, SearchList): las dos compensaciones se suman y el campo enfocado
20
- * termina empujado fuera de la pantalla.
16
+ * Compensates for the keyboard: on iOS with scroll the ScrollView itself does it, in
17
+ * other cases a KeyboardAvoidingView does. Set to false when
18
+ * the content already brings its own scroller that handles the keyboard (Wizard,
19
+ * List, SearchList): the two compensations add up and the focused field
20
+ * ends up pushed off screen.
21
21
  * @default true
22
22
  */
23
23
  keyboardAvoiding?: boolean;
@@ -19,7 +19,7 @@ import { IconButton } from '../atoms/IconButton';
19
19
  import type { IconName } from '../icons/types';
20
20
 
21
21
  export interface SearchListProps<T> {
22
- /** Chrome opcional arriba del buscador (ej. back button + título). */
22
+ /** Optional chrome above the search bar (e.g. back button + title). */
23
23
  header?: React.ReactNode;
24
24
 
25
25
  searchValue: string;
@@ -34,23 +34,23 @@ export interface SearchListProps<T> {
34
34
  keyExtractor: (item: T, index: number) => string;
35
35
  renderItem: FlatListProps<T>['renderItem'];
36
36
 
37
- /** Carga inicial: mientras sea true y no haya datos, se muestran placeholders. */
37
+ /** Initial load: while true and there's no data, placeholders are shown. */
38
38
  isLoading?: boolean;
39
- /** 'replace' cambia toda la lista por un spinner/skeleton; 'overlay' lo muestra encima manteniendo el layout. */
39
+ /** 'replace' swaps the whole list for a spinner/skeleton; 'overlay' shows it on top while keeping the layout. */
40
40
  loadingMode?: 'replace' | 'overlay';
41
- /** Recarga con datos ya en pantalla (pull-to-refresh). @default false */
41
+ /** Reload with data already on screen (pull-to-refresh). @default false */
42
42
  isRefreshing?: boolean;
43
43
  isLoadingMore?: boolean;
44
- /** Controlado por el consumidor: mientras es false, se muestra un spinner de pantalla completa. @default true */
44
+ /** Controlled by the consumer: while false, a fullscreen spinner is shown. @default true */
45
45
  isReady?: boolean;
46
46
  loadingText?: string;
47
47
  loadingMoreText?: string;
48
48
  hasMore?: boolean;
49
49
  noMoreText?: string;
50
50
 
51
- /** Filas fantasma de la carga inicial. @default 6 */
51
+ /** Ghost rows for the initial load. @default 6 */
52
52
  skeletonCount?: number;
53
- /** Placeholder propio, para que calce con la forma real del ítem. */
53
+ /** Custom placeholder, to match the real shape of the item. */
54
54
  renderSkeletonItem?: () => React.ReactElement;
55
55
 
56
56
  onLoadMore?: () => void;
@@ -68,7 +68,7 @@ export interface SearchListProps<T> {
68
68
  contentContainerStyle?: StyleProp<ViewStyle>;
69
69
  containerStyle?: ViewStyle;
70
70
 
71
- /** Componente de lista a usar (FlashList, etc). @default FlatList */
71
+ /** List component to use (FlashList, etc). @default FlatList */
72
72
  ListComponent?: React.ComponentType<any>;
73
73
  listProps?: Record<string, unknown>;
74
74
  }
@@ -38,10 +38,10 @@ export interface SelectProps<T> {
38
38
  error?: string;
39
39
  isLoading?: boolean;
40
40
  disabled?: boolean;
41
- /** Agrega un buscador dentro del desplegable. @default false */
41
+ /** Adds a search box inside the dropdown. @default false */
42
42
  searchable?: boolean;
43
43
  searchPlaceholder?: string;
44
- /** Alto máximo del desplegable, si el espacio disponible lo permite. @default 280 */
44
+ /** Maximum height of the dropdown, if the available space allows it. @default 280 */
45
45
  maxHeight?: number;
46
46
  onOpenChange?: (open: boolean) => void;
47
47
  containerStyle?: StyleProp<ViewStyle>;
@@ -12,10 +12,10 @@ export interface ToastProps {
12
12
  title: string;
13
13
  message?: string;
14
14
  variant?: ToastVariant;
15
- /** Se dispara al tocar el toast (además de cerrarlo). */
15
+ /** Fires when the toast is tapped (in addition to closing it). */
16
16
  onPress?: () => void;
17
17
  onDismiss?: () => void;
18
- /** Oculta la X de cerrar. El toast igual se auto-descarta por tiempo. */
18
+ /** Hides the close X. The toast still auto-dismisses by timeout. */
19
19
  hideCloseButton?: boolean;
20
20
  style?: StyleProp<ViewStyle>;
21
21
  testID?: string;
@@ -54,9 +54,9 @@ export interface ToastProviderProps {
54
54
  children: React.ReactNode;
55
55
  /** @default 'top' */
56
56
  position?: 'top' | 'bottom';
57
- /** Máximo de toasts simultáneos; los más viejos se descartan. @default 3 */
57
+ /** Maximum simultaneous toasts; the oldest ones are dropped. @default 3 */
58
58
  maxVisible?: number;
59
- /** Duración por defecto en ms. @default 4000 */
59
+ /** Default duration in ms. @default 4000 */
60
60
  defaultDuration?: number;
61
61
  }
62
62
 
@@ -13,28 +13,28 @@ export interface WizardStep extends StepItem {
13
13
 
14
14
  export interface WizardProps {
15
15
  steps: WizardStep[];
16
- /** Paso actual (controlado). Si se omite, el Wizard maneja su propio estado. */
16
+ /** Current step (controlled). If omitted, the Wizard manages its own state. */
17
17
  current?: number;
18
18
  onStepChange?: (index: number) => void;
19
19
  onFinish?: () => void;
20
20
  /** @default 'horizontal' */
21
21
  orientation?: 'horizontal' | 'vertical';
22
22
  completedIndicator?: 'check' | 'number';
23
- /** Permite volver a un paso ya completado tocándolo en el indicador. @default true */
23
+ /** Allows returning to an already-completed step by tapping it in the indicator. @default true */
24
24
  allowStepNavigation?: boolean;
25
25
  backLabel?: string;
26
26
  nextLabel?: string;
27
27
  finishLabel?: string;
28
28
  /**
29
- * El contenido del paso scrollea cuando no entra. Ponelo en false sólo si
30
- * un paso renderiza su propia lista virtualizada (anidar una
31
- * VirtualizedList dentro de un ScrollView rompe la virtualización).
29
+ * The step content scrolls when it doesn't fit. Set to false only if
30
+ * a step renders its own virtualized list (nesting a
31
+ * VirtualizedList inside a ScrollView breaks virtualization).
32
32
  * @default true
33
33
  */
34
34
  scrollableContent?: boolean;
35
35
  /**
36
- * El contenido del paso entra deslizándose en el sentido de la navegación.
37
- * Sólo opacity y transform, así que la animación corre en el hilo nativo.
36
+ * The step content slides in following the navigation direction.
37
+ * Only opacity and transform, so the animation runs on the native thread.
38
38
  * @default true
39
39
  */
40
40
  animated?: boolean;
@@ -42,24 +42,24 @@ const UIContext = createContext<UIContextValue | undefined>(undefined);
42
42
 
43
43
  export interface UIProviderProps {
44
44
  children: React.ReactNode;
45
- /** Par light/dark. Por defecto el theme de marca de la librería (créalo con createTheme()). */
45
+ /** Light/dark pair. Defaults to the library's brand theme (create one with createTheme()). */
46
46
  theme?: ThemePair;
47
- /** Modo inicial (no controlado) si no se pasa `mode`. @default 'system' */
47
+ /** Initial mode (uncontrolled) if `mode` isn't passed. @default 'system' */
48
48
  defaultMode?: ThemeMode;
49
- /** Modo controlado. Si se pasa junto a onModeChange, el provider no gestiona estado propio. */
49
+ /** Controlled mode. If passed together with onModeChange, the provider doesn't manage its own state. */
50
50
  mode?: ThemeMode;
51
51
  onModeChange?: (mode: ThemeMode) => void;
52
- /** Renderer de íconos. Por defecto usa los glifos zero-dep incluidos. */
52
+ /** Icon renderer. Defaults to the included zero-dep glyphs. */
53
53
  icons?: IconRenderer;
54
- /** Insets de safe area (de useSafeAreaInsets()). Por defecto {0,0,0,0}. */
54
+ /** Safe area insets (from useSafeAreaInsets()). Defaults to {0,0,0,0}. */
55
55
  insets?: EdgeInsets;
56
56
  labels?: Partial<Labels>;
57
- /** @default false, para paridad con el resto de la librería (accesibilidad primero). */
57
+ /** @default false, for parity with the rest of the library (accessibility first). */
58
58
  allowFontScaling?: boolean;
59
59
  /**
60
- * Fuente de insets que usan `Modal`/`BottomSheet` para su propia ventana
61
- * nativa. No la pases a mano — `SafeAreaUIProvider` la cablea sola.
62
- * @default repite los insets ambientes (comportamiento sin safe-area-context)
60
+ * Source of insets used by `Modal`/`BottomSheet` for their own native
61
+ * window. Don't pass this by hand — `SafeAreaUIProvider` wires it up itself.
62
+ * @default repeats the ambient insets (behavior without safe-area-context)
63
63
  */
64
64
  ModalSafeAreaBoundary?: ModalSafeAreaBoundaryComponent;
65
65
  }