@retray-dev/ui-kit 5.1.0 → 5.4.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
@@ -2,8 +2,8 @@
2
2
 
3
3
  A personal React Native / Expo UI component library with a built-in design system, dark mode support, haptic feedback, and smooth animations.
4
4
 
5
- - 36 components across 7 categories
6
- - Light/dark theme with 23 color tokens and full customization
5
+ - 37 components across 7 categories
6
+ - Light/dark theme with 12 public tokens (24 resolved) and full customization
7
7
  - Apple HIG–compliant touch targets and haptic feedback
8
8
  - Animated interactions: spring press, sliding tabs, accordion easing, animated progress
9
9
  - Built with TypeScript — full type declarations included
@@ -113,25 +113,28 @@ import { useTheme } from '@retray-dev/ui-kit'
113
113
  const { colors, colorScheme } = useTheme()
114
114
  ```
115
115
 
116
- **Available tokens:** `background`, `foreground`, `card`, `cardForeground`, `primary`, `primaryForeground`, `secondary`, `secondaryForeground`, `muted`, `mutedForeground`, `accent`, `accentForeground`, `destructive`, `destructiveForeground`, `destructiveTint`, `destructiveBorder`, `border`, `input`, `ring`, `success`, `successForeground`, `successTint`, `successBorder`
116
+ **Public tokens (12 — override these):** `background`, `foreground`, `card`, `primary`, `primaryForeground`, `border`, `destructive`, `destructiveForeground`, `success`, `successForeground`, `warning`, `warningForeground`
117
+
118
+ **Derived tokens (read-only via `useTheme()`):** `foregroundSubtle`, `foregroundMuted`, `surface`, `surfaceStrong`, `destructiveTint`, `destructiveBorder`, `successTint`, `successBorder`, `warningTint`, `warningBorder`, `ring`, `input`
117
119
 
118
120
  ## Design Tokens
119
121
 
120
122
  Static structural constants — no provider required:
121
123
 
122
124
  ```ts
123
- import { SPACING, ICON_SIZES, RADIUS, SHADOWS, BREAKPOINTS } from '@retray-dev/ui-kit'
125
+ import { SPACING, ICON_SIZES, RADIUS, SHADOWS, BREAKPOINTS, TYPOGRAPHY } from '@retray-dev/ui-kit'
124
126
 
125
- <View style={{ gap: SPACING.md, padding: SPACING.lg, borderRadius: RADIUS.lg, ...SHADOWS.sm }} />
127
+ <View style={{ gap: SPACING.md, padding: SPACING.base, borderRadius: RADIUS.md, ...SHADOWS.sm }} />
126
128
  ```
127
129
 
128
130
  | Token | Keys |
129
131
  |-------|------|
130
- | `SPACING` | `xs` (4), `sm` (8), `md` (12), `lg` (16), `xl` (24), `2xl` (32), `3xl` (48) |
132
+ | `SPACING` | `xxs` (2), `xs` (4), `sm` (8), `md` (12), `base` (16), `lg` (24), `xl` (32), `xxl` (48), `section` (64) |
131
133
  | `ICON_SIZES` | `sm` (14), `md` (18), `lg` (22), `xl` (28), `2xl` (32) |
132
- | `RADIUS` | `sm` (4), `md` (8), `lg` (12), `xl` (16), `full` (9999) |
134
+ | `RADIUS` | `none` (0), `xs` (4), `sm` (8), `md` (14), `lg` (20), `xl` (32), `full` (9999) |
133
135
  | `SHADOWS` | `sm`, `md`, `lg`, `xl` — cross-platform shadow presets |
134
136
  | `BREAKPOINTS` | `wide` (700) |
137
+ | `TYPOGRAPHY` | 16 variants: `display-hero`, `display-xl`, `display-lg`, `display-md`, `display-sm`, `title-md`, `title-sm`, `body-md`, `body-sm`, `caption`, `caption-sm`, `badge-text`, `micro-label`, `uppercase-tag`, `button-lg`, `button-sm` |
135
138
 
136
139
  ## Components
137
140
 
@@ -139,11 +142,11 @@ import { SPACING, ICON_SIZES, RADIUS, SHADOWS, BREAKPOINTS } from '@retray-dev/u
139
142
  | ----------- | ----------------------------------------------------------------------------------------------- |
140
143
  | Display | `Text`, `Badge`, `Avatar`, `Separator`, `Spinner`, `Skeleton`, `Progress`, `CurrencyDisplay` |
141
144
  | Surfaces | `Card`, `AlertBanner`, `EmptyState`, `MediaCard` |
142
- | Form | `Button`, `IconButton`, `Input`, `CurrencyInput`, `CurrencyInputLarge`, `Textarea`, `Checkbox`, `Switch`, `Toggle`, `RadioGroup`, `Select`, `Slider` |
145
+ | Form | `Button`, `ButtonGroup`, `IconButton`, `Input`, `CurrencyInput`, `Textarea`, `Checkbox`, `Switch`, `Toggle`, `RadioGroup`, `Select`, `Slider` |
143
146
  | Composition | `Tabs`, `Accordion` |
144
147
  | Overlays | `Sheet`, `ConfirmDialog` |
145
148
  | Feedback | `Toast` / `ToastProvider` / `useToast` |
146
- | Data | `ListItem`, `Chip` / `ChipGroup`, `LabelValue`, `MonthPicker`, `CategoryStrip` |
149
+ | Data | `ListItem`, `Chip` / `ChipGroup`, `LabelValue`, `MonthPicker`, `CategoryStrip`, `DetailRow` |
147
150
  | Utilities | `Pressable` |
148
151
 
149
152
  ### Quick examples
package/dist/index.d.mts CHANGED
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { TouchableOpacityProps, TextProps as TextProps$1, TextInputProps, TextStyle, ViewStyle, ActivityIndicatorProps, ImageSourcePropType } from 'react-native';
2
+ import { TouchableOpacityProps, ViewStyle, TextProps as TextProps$1, TextInputProps, TextStyle, ActivityIndicatorProps, ImageSourcePropType } from 'react-native';
3
3
  export { BottomSheetModalProvider } from '@gorhom/bottom-sheet';
4
4
 
5
5
  type ThemeColors = {
@@ -74,6 +74,7 @@ interface ButtonProps extends TouchableOpacityProps {
74
74
  label: string;
75
75
  size: ButtonSize;
76
76
  variant: ButtonVariant;
77
+ color: string;
77
78
  }) => React.ReactNode);
78
79
  iconName?: string;
79
80
  iconColor?: string;
@@ -81,6 +82,28 @@ interface ButtonProps extends TouchableOpacityProps {
81
82
  }
82
83
  declare function Button({ label, variant, size, loading, fullWidth, icon, iconName, iconColor, iconPosition, disabled, style, onPress, ...props }: ButtonProps): React.JSX.Element;
83
84
 
85
+ interface ButtonGroupProps {
86
+ children: React.ReactNode;
87
+ /** Spacing between buttons. Defaults to 12px. */
88
+ gap?: number;
89
+ /** Stack buttons vertically instead of horizontally. */
90
+ vertical?: boolean;
91
+ style?: ViewStyle;
92
+ }
93
+ /**
94
+ * Container that auto-distributes space equally among Button children.
95
+ * Each child gets `flex: 1` — perfect for side-by-side CTAs.
96
+ *
97
+ * @example
98
+ * ```tsx
99
+ * <ButtonGroup>
100
+ * <Button label="Cancel" variant="secondary" onPress={...} />
101
+ * <Button label="Confirm" onPress={...} />
102
+ * </ButtonGroup>
103
+ * ```
104
+ */
105
+ declare function ButtonGroup({ children, gap, vertical, style }: ButtonGroupProps): React.JSX.Element;
106
+
84
107
  type IconButtonVariant = 'primary' | 'secondary' | 'outline' | 'text' | 'destructive';
85
108
  type IconButtonSize = 'sm' | 'md' | 'lg';
86
109
  interface IconButtonProps extends TouchableOpacityProps {
@@ -229,14 +252,17 @@ declare function Skeleton({ width, height, borderRadius, preset, diameter, style
229
252
  type AvatarSize = 'sm' | 'md' | 'lg' | 'xl';
230
253
  type AvatarStatus = 'online' | 'offline' | 'busy' | 'away';
231
254
  interface AvatarProps {
232
- src?: string;
255
+ src?: string | null;
256
+ /** Manual initials (max 2 chars). */
233
257
  fallback?: string;
234
- size?: AvatarSize;
258
+ /** Full name — extracts up to 2 initials (e.g. "Julian Cruz" → "JC"). */
259
+ fallbackText?: string;
260
+ size?: AvatarSize | number;
235
261
  /** Optional status indicator dot — bottom-right corner. */
236
262
  status?: AvatarStatus;
237
263
  style?: ViewStyle;
238
264
  }
239
- declare function Avatar({ src, fallback, size, status, style }: AvatarProps): React.JSX.Element;
265
+ declare function Avatar({ src, fallback, fallbackText, size, status, style }: AvatarProps): React.JSX.Element;
240
266
 
241
267
  type AlertBannerVariant = 'default' | 'destructive' | 'success' | 'warning';
242
268
  interface AlertBannerProps {
@@ -285,10 +311,16 @@ interface TextareaProps extends TextInputProps {
285
311
  hint?: string;
286
312
  /** Number of visible text rows. Defaults to `4`. Controls `numberOfLines` and `minHeight`. */
287
313
  rows?: number;
314
+ /** Icon name from @expo/vector-icons rendered inside top-left corner. */
315
+ prefixIcon?: string;
316
+ /** Custom icon node rendered top-left. */
317
+ prefixIconNode?: React.ReactNode;
318
+ /** Override prefix icon color. Defaults to foregroundMuted. */
319
+ prefixIconColor?: string;
288
320
  /** Style for the outer container `View`. Use `style` (from `TextInputProps`) to style the `TextInput` itself. */
289
321
  containerStyle?: ViewStyle;
290
322
  }
291
- declare function Textarea({ label, error, hint, rows, containerStyle, style, onFocus, onBlur, ...props }: TextareaProps): React.JSX.Element;
323
+ declare function Textarea({ label, error, hint, rows, prefixIcon, prefixIconNode, prefixIconColor, containerStyle, style, onFocus, onBlur, ...props }: TextareaProps): React.JSX.Element;
292
324
 
293
325
  interface CheckboxProps {
294
326
  checked?: boolean;
@@ -377,6 +409,12 @@ interface AccordionItem {
377
409
  value: string;
378
410
  trigger: string;
379
411
  content: React.ReactNode;
412
+ /** Icon name from @expo/vector-icons rendered left of trigger. */
413
+ iconName?: string;
414
+ /** Custom icon node rendered left of trigger. */
415
+ icon?: React.ReactNode;
416
+ /** Override icon color. Defaults to foregroundMuted. */
417
+ iconColor?: string;
380
418
  }
381
419
  interface AccordionProps {
382
420
  items: AccordionItem[];
@@ -413,10 +451,18 @@ interface SheetProps {
413
451
  title?: string;
414
452
  description?: string;
415
453
  children?: React.ReactNode;
416
- /** Style for the inner `BottomSheetView` content container. */
454
+ /** Style for the inner content container. */
417
455
  style?: ViewStyle;
456
+ /** Render children inside BottomSheetScrollView so gestures are handled correctly on both platforms. */
457
+ scrollable?: boolean;
458
+ /** Cap sheet height (dp). Children scroll when content exceeds this value. */
459
+ maxHeight?: number;
460
+ /** Wrap content in KeyboardAvoidingView. Defaults to platform-appropriate behavior when set. */
461
+ keyboardBehavior?: 'padding' | 'height' | 'position' | 'none';
462
+ /** Extra vertical offset for the keyboard avoiding view. */
463
+ keyboardOffset?: number;
418
464
  }
419
- declare function Sheet({ open, onClose, title, description, children, style, }: SheetProps): React.JSX.Element;
465
+ declare function Sheet({ open, onClose, title, description, children, style, scrollable, maxHeight, keyboardBehavior, keyboardOffset, }: SheetProps): React.JSX.Element;
420
466
 
421
467
  interface SelectOption {
422
468
  label: string;
@@ -490,6 +536,7 @@ interface CurrencyInputProps {
490
536
  }
491
537
  declare function CurrencyInput({ value, onChangeText, onChangeValue, prefix, thousandsSeparator, size, label, error, hint, placeholder, editable, containerStyle, style, }: CurrencyInputProps): React.JSX.Element;
492
538
 
539
+ type CurrencyDisplayVariant = 'hero' | 'large' | 'medium' | 'small';
493
540
  interface CurrencyDisplayProps {
494
541
  value: number | string;
495
542
  /** Symbol prepended to the formatted value. Defaults to `'$'`. */
@@ -498,9 +545,15 @@ interface CurrencyDisplayProps {
498
545
  showDecimals?: boolean;
499
546
  /** Override the color of the formatted text. Defaults to the `foreground` theme token. */
500
547
  textColor?: string;
548
+ /** Predefined size variant. Overrides the default 56px size. */
549
+ variant?: CurrencyDisplayVariant;
550
+ /** Enable adjustsFontSizeToFit so long values shrink to fit in one line. */
551
+ autoScale?: boolean;
552
+ /** Maximum font size when autoScale is true (defaults to variant size or 56px). */
553
+ maxFontSize?: number;
501
554
  style?: ViewStyle;
502
555
  }
503
- declare function CurrencyDisplay({ value, prefix, showDecimals, textColor, style }: CurrencyDisplayProps): React.JSX.Element;
556
+ declare function CurrencyDisplay({ value, prefix, showDecimals, textColor, variant, autoScale, maxFontSize, style }: CurrencyDisplayProps): React.JSX.Element;
504
557
 
505
558
  type ListItemVariant = 'plain' | 'card';
506
559
  interface ListItemProps {
@@ -572,6 +625,11 @@ interface ChipProps {
572
625
  interface ChipOption {
573
626
  label: string;
574
627
  value: string | number;
628
+ /** Icon name resolved via renderIcon (Feather, AntDesign, etc.). */
629
+ iconName?: string;
630
+ /** Icon tint color override. */
631
+ iconColor?: string;
632
+ disabled?: boolean;
575
633
  }
576
634
  interface ChipGroupProps {
577
635
  options: ChipOption[];
@@ -599,9 +657,13 @@ declare function ConfirmDialog({ visible, title, description, confirmLabel, canc
599
657
  interface LabelValueProps {
600
658
  label: string;
601
659
  value: string | React.ReactNode;
660
+ /** Icon name from @expo/vector-icons rendered left of label. */
661
+ iconName?: string;
662
+ /** Override icon color. Defaults to foregroundMuted. */
663
+ iconColor?: string;
602
664
  style?: ViewStyle;
603
665
  }
604
- declare function LabelValue({ label, value, style }: LabelValueProps): React.JSX.Element;
666
+ declare function LabelValue({ label, value, iconName, iconColor, style }: LabelValueProps): React.JSX.Element;
605
667
 
606
668
  interface MonthPickerValue {
607
669
  /** Month number 1–12 */
@@ -611,9 +673,13 @@ interface MonthPickerValue {
611
673
  interface MonthPickerProps {
612
674
  value: MonthPickerValue;
613
675
  onChange: (value: MonthPickerValue) => void;
676
+ /** BCP 47 locale tag. Built-in: 'en' | 'es' | 'pt' | 'fr'. For other locales supply formatLabel. */
677
+ locale?: string;
678
+ /** Custom label formatter. Takes precedence over locale. */
679
+ formatLabel?: (value: MonthPickerValue) => string;
614
680
  style?: ViewStyle;
615
681
  }
616
- declare function MonthPicker({ value, onChange, style }: MonthPickerProps): React.JSX.Element;
682
+ declare function MonthPicker({ value, onChange, locale, formatLabel, style }: MonthPickerProps): React.JSX.Element;
617
683
 
618
684
  type MediaCardAspectRatio = '1:1' | '4:3' | '16:9' | '4:5' | '3:2';
619
685
  interface MediaCardProps {
@@ -692,6 +758,32 @@ interface PressableProps extends Omit<TouchableOpacityProps, 'activeOpacity'> {
692
758
  */
693
759
  declare function Pressable({ children, onPress, pressScale, bounciness, haptics, style, disabled, hoverScale, ...touchableProps }: PressableProps): React.JSX.Element;
694
760
 
761
+ type DetailRowSeparator = 'dotted' | 'solid' | 'dashed' | 'none';
762
+ type DetailRowLabelWeight = 'normal' | 'medium' | 'semibold' | 'bold';
763
+ interface DetailRowProps {
764
+ label: React.ReactNode;
765
+ value: string;
766
+ /** Dotted/dashed/solid line between label and value. Defaults to 'dotted'. */
767
+ separator?: DetailRowSeparator;
768
+ labelWeight?: DetailRowLabelWeight;
769
+ /** Semantic color key or hex string for value text. */
770
+ valueColor?: string;
771
+ /** Node rendered left of the label (e.g. Avatar, Icon). */
772
+ leftIcon?: React.ReactNode;
773
+ /** Icon name from @expo/vector-icons rendered left of label. Takes precedence over leftIcon. */
774
+ leftIconName?: string;
775
+ /** Override left icon color. Defaults to foregroundMuted. */
776
+ leftIconColor?: string;
777
+ /** Icon name from @expo/vector-icons rendered right of value. */
778
+ rightIconName?: string;
779
+ /** Override right icon color. Defaults to foregroundMuted. */
780
+ rightIconColor?: string;
781
+ style?: ViewStyle;
782
+ labelStyle?: TextStyle;
783
+ valueStyle?: TextStyle;
784
+ }
785
+ declare function DetailRow({ label, value, separator, labelWeight, valueColor, leftIcon, leftIconName, leftIconColor, rightIconName, rightIconColor, style, labelStyle, valueStyle, }: DetailRowProps): React.JSX.Element;
786
+
695
787
  type IconFamily = 'Feather' | 'AntDesign' | 'Entypo' | 'FontAwesome5' | 'MaterialIcons' | 'Ionicons';
696
788
  interface IconProps {
697
789
  /** Icon name from any supported @expo/vector-icons family. See https://icons.expo.fyi */
@@ -704,6 +796,19 @@ interface IconProps {
704
796
  declare function Icon({ name, size, color, family }: IconProps): React.ReactElement | null;
705
797
  declare function renderIcon(name: string, size: number, color: string): React.ReactElement | null;
706
798
 
799
+ /**
800
+ * Returns a font size that steps down as formatted text grows longer.
801
+ * Designed for currency/numeric displays where long values overflow.
802
+ *
803
+ * @param text - The formatted string (e.g. "$1.250.000")
804
+ * @param maxSize - Base (maximum) font size in points
805
+ * @param steps - Custom step config [{ maxLen, subtract }] — sorted ascending by maxLen
806
+ */
807
+ declare function getResponsiveFontSize(text: string, maxSize: number, steps?: {
808
+ maxLen: number;
809
+ subtract: number;
810
+ }[]): number;
811
+
707
812
  declare const SPACING: {
708
813
  readonly xxs: 2;
709
814
  readonly xs: 4;
@@ -880,7 +985,7 @@ declare const TYPOGRAPHY: {
880
985
  readonly fontFamily: "Poppins-Medium";
881
986
  readonly fontSize: 16;
882
987
  readonly fontWeight: "500";
883
- readonly lineHeight: 20;
988
+ readonly lineHeight: 22;
884
989
  readonly letterSpacing: 0;
885
990
  };
886
991
  readonly 'button-sm': {
@@ -900,4 +1005,4 @@ type RadiusKey = keyof Radius;
900
1005
  type Typography = typeof TYPOGRAPHY;
901
1006
  type TypographyKey = keyof Typography;
902
1007
 
903
- export { Accordion, type AccordionItem, type AccordionProps, AlertBanner, type AlertBannerProps, type AlertBannerVariant, Avatar, type AvatarProps, type AvatarSize, BREAKPOINTS, Badge, type BadgeProps, type BadgeVariant, Button, type ButtonProps, type ButtonSize, type ButtonVariant, Card, CardContent, type CardContentProps, CardDescription, type CardDescriptionProps, CardFooter, type CardFooterProps, CardHeader, type CardHeaderProps, type CardProps, CardTitle, type CardTitleProps, type CategoryItem, CategoryStrip, type CategoryStripProps, Checkbox, type CheckboxProps, Chip, ChipGroup, type ChipGroupProps, type ChipOption, type ChipProps, type ColorScheme, ConfirmDialog, type ConfirmDialogProps, CurrencyDisplay, type CurrencyDisplayProps, CurrencyInput, CurrencyInput as CurrencyInputLarge, type CurrencyInputProps, EmptyState, type EmptyStateProps, ICON_SIZES, Icon, IconButton, type IconButtonProps, type IconButtonSize, type IconButtonVariant, type IconFamily, type IconProps, type IconSize, type IconSizeKey, Input, type InputProps, LabelValue, type LabelValueProps, ListItem, type ListItemProps, MediaCard, type MediaCardAspectRatio, type MediaCardProps, MonthPicker, type MonthPickerProps, type MonthPickerValue, Pressable, type PressableProps, Progress, type ProgressProps, RADIUS, RadioGroup, type RadioGroupProps, type RadioOption, type Radius, type RadiusKey, type ResolvedColors, SHADOWS, SPACING, Select, type SelectOption, type SelectProps, Separator, type SeparatorProps, Sheet, type SheetProps, Skeleton, type SkeletonProps, Slider, type SliderProps, type Spacing, type SpacingKey, Spinner, type SpinnerProps, type SpinnerSize, Switch, type SwitchProps, TYPOGRAPHY, type TabItem, Tabs, TabsContent, type TabsContentProps, type TabsProps, Text, type TextProps, type TextVariant, Textarea, type TextareaProps, type Theme, type ThemeColors, ThemeProvider, type ThemeProviderProps, type ToastItem, ToastProvider, type ToastProviderProps, type ToastVariant, Toggle, type ToggleProps, type ToggleSize, type ToggleVariant, type Typography, type TypographyKey, defaultDark, defaultLight, deriveColors, renderIcon, useTheme, useToast };
1008
+ export { Accordion, type AccordionItem, type AccordionProps, AlertBanner, type AlertBannerProps, type AlertBannerVariant, Avatar, type AvatarProps, type AvatarSize, BREAKPOINTS, Badge, type BadgeProps, type BadgeVariant, Button, ButtonGroup, type ButtonGroupProps, type ButtonProps, type ButtonSize, type ButtonVariant, Card, CardContent, type CardContentProps, CardDescription, type CardDescriptionProps, CardFooter, type CardFooterProps, CardHeader, type CardHeaderProps, type CardProps, CardTitle, type CardTitleProps, type CategoryItem, CategoryStrip, type CategoryStripProps, Checkbox, type CheckboxProps, Chip, ChipGroup, type ChipGroupProps, type ChipOption, type ChipProps, type ColorScheme, ConfirmDialog, type ConfirmDialogProps, CurrencyDisplay, type CurrencyDisplayProps, type CurrencyDisplayVariant, CurrencyInput, CurrencyInput as CurrencyInputLarge, type CurrencyInputProps, DetailRow, type DetailRowLabelWeight, type DetailRowProps, type DetailRowSeparator, EmptyState, type EmptyStateProps, ICON_SIZES, Icon, IconButton, type IconButtonProps, type IconButtonSize, type IconButtonVariant, type IconFamily, type IconProps, type IconSize, type IconSizeKey, Input, type InputProps, LabelValue, type LabelValueProps, ListItem, type ListItemProps, MediaCard, type MediaCardAspectRatio, type MediaCardProps, MonthPicker, type MonthPickerProps, type MonthPickerValue, Pressable, type PressableProps, Progress, type ProgressProps, RADIUS, RadioGroup, type RadioGroupProps, type RadioOption, type Radius, type RadiusKey, type ResolvedColors, SHADOWS, SPACING, Select, type SelectOption, type SelectProps, Separator, type SeparatorProps, Sheet, type SheetProps, Skeleton, type SkeletonProps, Slider, type SliderProps, type Spacing, type SpacingKey, Spinner, type SpinnerProps, type SpinnerSize, Switch, type SwitchProps, TYPOGRAPHY, type TabItem, Tabs, TabsContent, type TabsContentProps, type TabsProps, Text, type TextProps, type TextVariant, Textarea, type TextareaProps, type Theme, type ThemeColors, ThemeProvider, type ThemeProviderProps, type ToastItem, ToastProvider, type ToastProviderProps, type ToastVariant, Toggle, type ToggleProps, type ToggleSize, type ToggleVariant, type Typography, type TypographyKey, defaultDark, defaultLight, deriveColors, getResponsiveFontSize, renderIcon, useTheme, useToast };
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { TouchableOpacityProps, TextProps as TextProps$1, TextInputProps, TextStyle, ViewStyle, ActivityIndicatorProps, ImageSourcePropType } from 'react-native';
2
+ import { TouchableOpacityProps, ViewStyle, TextProps as TextProps$1, TextInputProps, TextStyle, ActivityIndicatorProps, ImageSourcePropType } from 'react-native';
3
3
  export { BottomSheetModalProvider } from '@gorhom/bottom-sheet';
4
4
 
5
5
  type ThemeColors = {
@@ -74,6 +74,7 @@ interface ButtonProps extends TouchableOpacityProps {
74
74
  label: string;
75
75
  size: ButtonSize;
76
76
  variant: ButtonVariant;
77
+ color: string;
77
78
  }) => React.ReactNode);
78
79
  iconName?: string;
79
80
  iconColor?: string;
@@ -81,6 +82,28 @@ interface ButtonProps extends TouchableOpacityProps {
81
82
  }
82
83
  declare function Button({ label, variant, size, loading, fullWidth, icon, iconName, iconColor, iconPosition, disabled, style, onPress, ...props }: ButtonProps): React.JSX.Element;
83
84
 
85
+ interface ButtonGroupProps {
86
+ children: React.ReactNode;
87
+ /** Spacing between buttons. Defaults to 12px. */
88
+ gap?: number;
89
+ /** Stack buttons vertically instead of horizontally. */
90
+ vertical?: boolean;
91
+ style?: ViewStyle;
92
+ }
93
+ /**
94
+ * Container that auto-distributes space equally among Button children.
95
+ * Each child gets `flex: 1` — perfect for side-by-side CTAs.
96
+ *
97
+ * @example
98
+ * ```tsx
99
+ * <ButtonGroup>
100
+ * <Button label="Cancel" variant="secondary" onPress={...} />
101
+ * <Button label="Confirm" onPress={...} />
102
+ * </ButtonGroup>
103
+ * ```
104
+ */
105
+ declare function ButtonGroup({ children, gap, vertical, style }: ButtonGroupProps): React.JSX.Element;
106
+
84
107
  type IconButtonVariant = 'primary' | 'secondary' | 'outline' | 'text' | 'destructive';
85
108
  type IconButtonSize = 'sm' | 'md' | 'lg';
86
109
  interface IconButtonProps extends TouchableOpacityProps {
@@ -229,14 +252,17 @@ declare function Skeleton({ width, height, borderRadius, preset, diameter, style
229
252
  type AvatarSize = 'sm' | 'md' | 'lg' | 'xl';
230
253
  type AvatarStatus = 'online' | 'offline' | 'busy' | 'away';
231
254
  interface AvatarProps {
232
- src?: string;
255
+ src?: string | null;
256
+ /** Manual initials (max 2 chars). */
233
257
  fallback?: string;
234
- size?: AvatarSize;
258
+ /** Full name — extracts up to 2 initials (e.g. "Julian Cruz" → "JC"). */
259
+ fallbackText?: string;
260
+ size?: AvatarSize | number;
235
261
  /** Optional status indicator dot — bottom-right corner. */
236
262
  status?: AvatarStatus;
237
263
  style?: ViewStyle;
238
264
  }
239
- declare function Avatar({ src, fallback, size, status, style }: AvatarProps): React.JSX.Element;
265
+ declare function Avatar({ src, fallback, fallbackText, size, status, style }: AvatarProps): React.JSX.Element;
240
266
 
241
267
  type AlertBannerVariant = 'default' | 'destructive' | 'success' | 'warning';
242
268
  interface AlertBannerProps {
@@ -285,10 +311,16 @@ interface TextareaProps extends TextInputProps {
285
311
  hint?: string;
286
312
  /** Number of visible text rows. Defaults to `4`. Controls `numberOfLines` and `minHeight`. */
287
313
  rows?: number;
314
+ /** Icon name from @expo/vector-icons rendered inside top-left corner. */
315
+ prefixIcon?: string;
316
+ /** Custom icon node rendered top-left. */
317
+ prefixIconNode?: React.ReactNode;
318
+ /** Override prefix icon color. Defaults to foregroundMuted. */
319
+ prefixIconColor?: string;
288
320
  /** Style for the outer container `View`. Use `style` (from `TextInputProps`) to style the `TextInput` itself. */
289
321
  containerStyle?: ViewStyle;
290
322
  }
291
- declare function Textarea({ label, error, hint, rows, containerStyle, style, onFocus, onBlur, ...props }: TextareaProps): React.JSX.Element;
323
+ declare function Textarea({ label, error, hint, rows, prefixIcon, prefixIconNode, prefixIconColor, containerStyle, style, onFocus, onBlur, ...props }: TextareaProps): React.JSX.Element;
292
324
 
293
325
  interface CheckboxProps {
294
326
  checked?: boolean;
@@ -377,6 +409,12 @@ interface AccordionItem {
377
409
  value: string;
378
410
  trigger: string;
379
411
  content: React.ReactNode;
412
+ /** Icon name from @expo/vector-icons rendered left of trigger. */
413
+ iconName?: string;
414
+ /** Custom icon node rendered left of trigger. */
415
+ icon?: React.ReactNode;
416
+ /** Override icon color. Defaults to foregroundMuted. */
417
+ iconColor?: string;
380
418
  }
381
419
  interface AccordionProps {
382
420
  items: AccordionItem[];
@@ -413,10 +451,18 @@ interface SheetProps {
413
451
  title?: string;
414
452
  description?: string;
415
453
  children?: React.ReactNode;
416
- /** Style for the inner `BottomSheetView` content container. */
454
+ /** Style for the inner content container. */
417
455
  style?: ViewStyle;
456
+ /** Render children inside BottomSheetScrollView so gestures are handled correctly on both platforms. */
457
+ scrollable?: boolean;
458
+ /** Cap sheet height (dp). Children scroll when content exceeds this value. */
459
+ maxHeight?: number;
460
+ /** Wrap content in KeyboardAvoidingView. Defaults to platform-appropriate behavior when set. */
461
+ keyboardBehavior?: 'padding' | 'height' | 'position' | 'none';
462
+ /** Extra vertical offset for the keyboard avoiding view. */
463
+ keyboardOffset?: number;
418
464
  }
419
- declare function Sheet({ open, onClose, title, description, children, style, }: SheetProps): React.JSX.Element;
465
+ declare function Sheet({ open, onClose, title, description, children, style, scrollable, maxHeight, keyboardBehavior, keyboardOffset, }: SheetProps): React.JSX.Element;
420
466
 
421
467
  interface SelectOption {
422
468
  label: string;
@@ -490,6 +536,7 @@ interface CurrencyInputProps {
490
536
  }
491
537
  declare function CurrencyInput({ value, onChangeText, onChangeValue, prefix, thousandsSeparator, size, label, error, hint, placeholder, editable, containerStyle, style, }: CurrencyInputProps): React.JSX.Element;
492
538
 
539
+ type CurrencyDisplayVariant = 'hero' | 'large' | 'medium' | 'small';
493
540
  interface CurrencyDisplayProps {
494
541
  value: number | string;
495
542
  /** Symbol prepended to the formatted value. Defaults to `'$'`. */
@@ -498,9 +545,15 @@ interface CurrencyDisplayProps {
498
545
  showDecimals?: boolean;
499
546
  /** Override the color of the formatted text. Defaults to the `foreground` theme token. */
500
547
  textColor?: string;
548
+ /** Predefined size variant. Overrides the default 56px size. */
549
+ variant?: CurrencyDisplayVariant;
550
+ /** Enable adjustsFontSizeToFit so long values shrink to fit in one line. */
551
+ autoScale?: boolean;
552
+ /** Maximum font size when autoScale is true (defaults to variant size or 56px). */
553
+ maxFontSize?: number;
501
554
  style?: ViewStyle;
502
555
  }
503
- declare function CurrencyDisplay({ value, prefix, showDecimals, textColor, style }: CurrencyDisplayProps): React.JSX.Element;
556
+ declare function CurrencyDisplay({ value, prefix, showDecimals, textColor, variant, autoScale, maxFontSize, style }: CurrencyDisplayProps): React.JSX.Element;
504
557
 
505
558
  type ListItemVariant = 'plain' | 'card';
506
559
  interface ListItemProps {
@@ -572,6 +625,11 @@ interface ChipProps {
572
625
  interface ChipOption {
573
626
  label: string;
574
627
  value: string | number;
628
+ /** Icon name resolved via renderIcon (Feather, AntDesign, etc.). */
629
+ iconName?: string;
630
+ /** Icon tint color override. */
631
+ iconColor?: string;
632
+ disabled?: boolean;
575
633
  }
576
634
  interface ChipGroupProps {
577
635
  options: ChipOption[];
@@ -599,9 +657,13 @@ declare function ConfirmDialog({ visible, title, description, confirmLabel, canc
599
657
  interface LabelValueProps {
600
658
  label: string;
601
659
  value: string | React.ReactNode;
660
+ /** Icon name from @expo/vector-icons rendered left of label. */
661
+ iconName?: string;
662
+ /** Override icon color. Defaults to foregroundMuted. */
663
+ iconColor?: string;
602
664
  style?: ViewStyle;
603
665
  }
604
- declare function LabelValue({ label, value, style }: LabelValueProps): React.JSX.Element;
666
+ declare function LabelValue({ label, value, iconName, iconColor, style }: LabelValueProps): React.JSX.Element;
605
667
 
606
668
  interface MonthPickerValue {
607
669
  /** Month number 1–12 */
@@ -611,9 +673,13 @@ interface MonthPickerValue {
611
673
  interface MonthPickerProps {
612
674
  value: MonthPickerValue;
613
675
  onChange: (value: MonthPickerValue) => void;
676
+ /** BCP 47 locale tag. Built-in: 'en' | 'es' | 'pt' | 'fr'. For other locales supply formatLabel. */
677
+ locale?: string;
678
+ /** Custom label formatter. Takes precedence over locale. */
679
+ formatLabel?: (value: MonthPickerValue) => string;
614
680
  style?: ViewStyle;
615
681
  }
616
- declare function MonthPicker({ value, onChange, style }: MonthPickerProps): React.JSX.Element;
682
+ declare function MonthPicker({ value, onChange, locale, formatLabel, style }: MonthPickerProps): React.JSX.Element;
617
683
 
618
684
  type MediaCardAspectRatio = '1:1' | '4:3' | '16:9' | '4:5' | '3:2';
619
685
  interface MediaCardProps {
@@ -692,6 +758,32 @@ interface PressableProps extends Omit<TouchableOpacityProps, 'activeOpacity'> {
692
758
  */
693
759
  declare function Pressable({ children, onPress, pressScale, bounciness, haptics, style, disabled, hoverScale, ...touchableProps }: PressableProps): React.JSX.Element;
694
760
 
761
+ type DetailRowSeparator = 'dotted' | 'solid' | 'dashed' | 'none';
762
+ type DetailRowLabelWeight = 'normal' | 'medium' | 'semibold' | 'bold';
763
+ interface DetailRowProps {
764
+ label: React.ReactNode;
765
+ value: string;
766
+ /** Dotted/dashed/solid line between label and value. Defaults to 'dotted'. */
767
+ separator?: DetailRowSeparator;
768
+ labelWeight?: DetailRowLabelWeight;
769
+ /** Semantic color key or hex string for value text. */
770
+ valueColor?: string;
771
+ /** Node rendered left of the label (e.g. Avatar, Icon). */
772
+ leftIcon?: React.ReactNode;
773
+ /** Icon name from @expo/vector-icons rendered left of label. Takes precedence over leftIcon. */
774
+ leftIconName?: string;
775
+ /** Override left icon color. Defaults to foregroundMuted. */
776
+ leftIconColor?: string;
777
+ /** Icon name from @expo/vector-icons rendered right of value. */
778
+ rightIconName?: string;
779
+ /** Override right icon color. Defaults to foregroundMuted. */
780
+ rightIconColor?: string;
781
+ style?: ViewStyle;
782
+ labelStyle?: TextStyle;
783
+ valueStyle?: TextStyle;
784
+ }
785
+ declare function DetailRow({ label, value, separator, labelWeight, valueColor, leftIcon, leftIconName, leftIconColor, rightIconName, rightIconColor, style, labelStyle, valueStyle, }: DetailRowProps): React.JSX.Element;
786
+
695
787
  type IconFamily = 'Feather' | 'AntDesign' | 'Entypo' | 'FontAwesome5' | 'MaterialIcons' | 'Ionicons';
696
788
  interface IconProps {
697
789
  /** Icon name from any supported @expo/vector-icons family. See https://icons.expo.fyi */
@@ -704,6 +796,19 @@ interface IconProps {
704
796
  declare function Icon({ name, size, color, family }: IconProps): React.ReactElement | null;
705
797
  declare function renderIcon(name: string, size: number, color: string): React.ReactElement | null;
706
798
 
799
+ /**
800
+ * Returns a font size that steps down as formatted text grows longer.
801
+ * Designed for currency/numeric displays where long values overflow.
802
+ *
803
+ * @param text - The formatted string (e.g. "$1.250.000")
804
+ * @param maxSize - Base (maximum) font size in points
805
+ * @param steps - Custom step config [{ maxLen, subtract }] — sorted ascending by maxLen
806
+ */
807
+ declare function getResponsiveFontSize(text: string, maxSize: number, steps?: {
808
+ maxLen: number;
809
+ subtract: number;
810
+ }[]): number;
811
+
707
812
  declare const SPACING: {
708
813
  readonly xxs: 2;
709
814
  readonly xs: 4;
@@ -880,7 +985,7 @@ declare const TYPOGRAPHY: {
880
985
  readonly fontFamily: "Poppins-Medium";
881
986
  readonly fontSize: 16;
882
987
  readonly fontWeight: "500";
883
- readonly lineHeight: 20;
988
+ readonly lineHeight: 22;
884
989
  readonly letterSpacing: 0;
885
990
  };
886
991
  readonly 'button-sm': {
@@ -900,4 +1005,4 @@ type RadiusKey = keyof Radius;
900
1005
  type Typography = typeof TYPOGRAPHY;
901
1006
  type TypographyKey = keyof Typography;
902
1007
 
903
- export { Accordion, type AccordionItem, type AccordionProps, AlertBanner, type AlertBannerProps, type AlertBannerVariant, Avatar, type AvatarProps, type AvatarSize, BREAKPOINTS, Badge, type BadgeProps, type BadgeVariant, Button, type ButtonProps, type ButtonSize, type ButtonVariant, Card, CardContent, type CardContentProps, CardDescription, type CardDescriptionProps, CardFooter, type CardFooterProps, CardHeader, type CardHeaderProps, type CardProps, CardTitle, type CardTitleProps, type CategoryItem, CategoryStrip, type CategoryStripProps, Checkbox, type CheckboxProps, Chip, ChipGroup, type ChipGroupProps, type ChipOption, type ChipProps, type ColorScheme, ConfirmDialog, type ConfirmDialogProps, CurrencyDisplay, type CurrencyDisplayProps, CurrencyInput, CurrencyInput as CurrencyInputLarge, type CurrencyInputProps, EmptyState, type EmptyStateProps, ICON_SIZES, Icon, IconButton, type IconButtonProps, type IconButtonSize, type IconButtonVariant, type IconFamily, type IconProps, type IconSize, type IconSizeKey, Input, type InputProps, LabelValue, type LabelValueProps, ListItem, type ListItemProps, MediaCard, type MediaCardAspectRatio, type MediaCardProps, MonthPicker, type MonthPickerProps, type MonthPickerValue, Pressable, type PressableProps, Progress, type ProgressProps, RADIUS, RadioGroup, type RadioGroupProps, type RadioOption, type Radius, type RadiusKey, type ResolvedColors, SHADOWS, SPACING, Select, type SelectOption, type SelectProps, Separator, type SeparatorProps, Sheet, type SheetProps, Skeleton, type SkeletonProps, Slider, type SliderProps, type Spacing, type SpacingKey, Spinner, type SpinnerProps, type SpinnerSize, Switch, type SwitchProps, TYPOGRAPHY, type TabItem, Tabs, TabsContent, type TabsContentProps, type TabsProps, Text, type TextProps, type TextVariant, Textarea, type TextareaProps, type Theme, type ThemeColors, ThemeProvider, type ThemeProviderProps, type ToastItem, ToastProvider, type ToastProviderProps, type ToastVariant, Toggle, type ToggleProps, type ToggleSize, type ToggleVariant, type Typography, type TypographyKey, defaultDark, defaultLight, deriveColors, renderIcon, useTheme, useToast };
1008
+ export { Accordion, type AccordionItem, type AccordionProps, AlertBanner, type AlertBannerProps, type AlertBannerVariant, Avatar, type AvatarProps, type AvatarSize, BREAKPOINTS, Badge, type BadgeProps, type BadgeVariant, Button, ButtonGroup, type ButtonGroupProps, type ButtonProps, type ButtonSize, type ButtonVariant, Card, CardContent, type CardContentProps, CardDescription, type CardDescriptionProps, CardFooter, type CardFooterProps, CardHeader, type CardHeaderProps, type CardProps, CardTitle, type CardTitleProps, type CategoryItem, CategoryStrip, type CategoryStripProps, Checkbox, type CheckboxProps, Chip, ChipGroup, type ChipGroupProps, type ChipOption, type ChipProps, type ColorScheme, ConfirmDialog, type ConfirmDialogProps, CurrencyDisplay, type CurrencyDisplayProps, type CurrencyDisplayVariant, CurrencyInput, CurrencyInput as CurrencyInputLarge, type CurrencyInputProps, DetailRow, type DetailRowLabelWeight, type DetailRowProps, type DetailRowSeparator, EmptyState, type EmptyStateProps, ICON_SIZES, Icon, IconButton, type IconButtonProps, type IconButtonSize, type IconButtonVariant, type IconFamily, type IconProps, type IconSize, type IconSizeKey, Input, type InputProps, LabelValue, type LabelValueProps, ListItem, type ListItemProps, MediaCard, type MediaCardAspectRatio, type MediaCardProps, MonthPicker, type MonthPickerProps, type MonthPickerValue, Pressable, type PressableProps, Progress, type ProgressProps, RADIUS, RadioGroup, type RadioGroupProps, type RadioOption, type Radius, type RadiusKey, type ResolvedColors, SHADOWS, SPACING, Select, type SelectOption, type SelectProps, Separator, type SeparatorProps, Sheet, type SheetProps, Skeleton, type SkeletonProps, Slider, type SliderProps, type Spacing, type SpacingKey, Spinner, type SpinnerProps, type SpinnerSize, Switch, type SwitchProps, TYPOGRAPHY, type TabItem, Tabs, TabsContent, type TabsContentProps, type TabsProps, Text, type TextProps, type TextVariant, Textarea, type TextareaProps, type Theme, type ThemeColors, ThemeProvider, type ThemeProviderProps, type ToastItem, ToastProvider, type ToastProviderProps, type ToastVariant, Toggle, type ToggleProps, type ToggleSize, type ToggleVariant, type Typography, type TypographyKey, defaultDark, defaultLight, deriveColors, getResponsiveFontSize, renderIcon, useTheme, useToast };