@sincpro/mobile-ui 0.2.1 → 0.3.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.
Files changed (232) hide show
  1. package/README.md +75 -20
  2. package/dist/Dialog/BottomSheet/BottomSheet.Root.d.ts +11 -7
  3. package/dist/Dialog/BottomSheet/BottomSheet.Root.js +4 -0
  4. package/dist/Dialog/Confirmation.context.d.ts +1 -1
  5. package/dist/Dialog/Dialog.ActionSheet.d.ts +17 -0
  6. package/dist/Dialog/Dialog.ActionSheet.js +16 -0
  7. package/dist/Dialog/Dialog.EditValue.d.ts +1 -1
  8. package/dist/Dialog/Dialog.Sheet.d.ts +26 -0
  9. package/dist/Dialog/Dialog.Sheet.js +55 -0
  10. package/dist/Dialog/index.d.ts +9 -7
  11. package/dist/Dialog/index.js +2 -0
  12. package/dist/Display/Display.Accordion.d.ts +18 -0
  13. package/dist/Display/Display.Accordion.js +22 -0
  14. package/dist/Display/Display.AvatarGroup.d.ts +12 -0
  15. package/dist/Display/Display.AvatarGroup.js +23 -0
  16. package/dist/Display/Display.Badge.d.ts +1 -1
  17. package/dist/Display/Display.Card.d.ts +46 -0
  18. package/dist/Display/Display.Card.js +36 -0
  19. package/dist/Display/Display.Carousel.d.ts +13 -0
  20. package/dist/Display/Display.Carousel.js +19 -0
  21. package/dist/Display/Display.Chip.d.ts +105 -0
  22. package/dist/Display/Display.Chip.js +45 -0
  23. package/dist/Display/Display.CopyableText.d.ts +1 -1
  24. package/dist/Display/Display.CountRecords.d.ts +1 -1
  25. package/dist/Display/Display.DataTable.d.ts +19 -0
  26. package/dist/Display/Display.DataTable.js +22 -0
  27. package/dist/Display/Display.Date.d.ts +15 -2
  28. package/dist/Display/Display.Date.js +34 -4
  29. package/dist/Display/Display.Divider.d.ts +1 -1
  30. package/dist/Display/Display.IconBadge.d.ts +13 -0
  31. package/dist/Display/Display.IconBadge.js +30 -0
  32. package/dist/Display/Display.Image.d.ts +15 -0
  33. package/dist/Display/Display.Image.js +17 -0
  34. package/dist/Display/Display.KeyValue.d.ts +10 -0
  35. package/dist/Display/Display.KeyValue.js +9 -0
  36. package/dist/Display/Display.ListItem.d.ts +13 -0
  37. package/dist/Display/Display.ListItem.js +14 -0
  38. package/dist/Display/Display.Logo.js +3 -1
  39. package/dist/Display/Display.MediaCard.d.ts +17 -0
  40. package/dist/Display/Display.MediaCard.js +12 -0
  41. package/dist/Display/Display.MediaEmbed.d.ts +19 -0
  42. package/dist/Display/Display.MediaEmbed.js +39 -0
  43. package/dist/Display/Display.MenuButton.d.ts +1 -1
  44. package/dist/Display/Display.Monetary.d.ts +1 -1
  45. package/dist/Display/Display.PriceTag.d.ts +10 -0
  46. package/dist/Display/Display.PriceTag.js +23 -0
  47. package/dist/Display/Display.ProductCard.d.ts +17 -0
  48. package/dist/Display/Display.ProductCard.js +13 -0
  49. package/dist/Display/Display.Rating.d.ts +11 -0
  50. package/dist/Display/Display.Rating.js +16 -0
  51. package/dist/Display/Display.SearchHistory.d.ts +12 -0
  52. package/dist/Display/Display.SearchHistory.js +13 -0
  53. package/dist/Display/Display.SectionHeader.d.ts +13 -0
  54. package/dist/Display/Display.SectionHeader.js +9 -0
  55. package/dist/Display/Display.Stat.d.ts +10 -0
  56. package/dist/Display/Display.Stat.js +9 -0
  57. package/dist/Display/Display.StatCard.d.ts +14 -0
  58. package/dist/Display/Display.StatCard.js +13 -0
  59. package/dist/Display/Display.StatusDot.d.ts +11 -0
  60. package/dist/Display/Display.StatusDot.js +28 -0
  61. package/dist/Display/Display.Story.d.ts +15 -0
  62. package/dist/Display/Display.Story.js +43 -0
  63. package/dist/Display/Display.StoryTray.d.ts +26 -0
  64. package/dist/Display/Display.StoryTray.js +43 -0
  65. package/dist/Display/Display.StoryViewer.d.ts +26 -0
  66. package/dist/Display/Display.StoryViewer.js +79 -0
  67. package/dist/Display/Display.SwipeableRow.d.ts +15 -0
  68. package/dist/Display/Display.SwipeableRow.js +28 -0
  69. package/dist/Display/Display.Tag.d.ts +11 -0
  70. package/dist/Display/Display.Tag.js +9 -0
  71. package/dist/Display/Display.Timeline.d.ts +13 -0
  72. package/dist/Display/Display.Timeline.js +19 -0
  73. package/dist/Display/Display.Tooltip.d.ts +10 -0
  74. package/dist/Display/Display.Tooltip.js +24 -0
  75. package/dist/Display/index.d.ts +66 -0
  76. package/dist/Display/index.js +54 -0
  77. package/dist/Feedback/ErrorBoundary.d.ts +1 -1
  78. package/dist/Feedback/Feedback.Banner.d.ts +82 -0
  79. package/dist/Feedback/Feedback.Banner.js +35 -0
  80. package/dist/Feedback/Feedback.DomainSplashScreen.d.ts +2 -1
  81. package/dist/Feedback/Feedback.DomainSplashScreen.js +1 -1
  82. package/dist/Feedback/Feedback.Empty.d.ts +1 -1
  83. package/dist/Feedback/Feedback.EmptyState.d.ts +15 -0
  84. package/dist/Feedback/Feedback.EmptyState.js +11 -0
  85. package/dist/Feedback/Feedback.Error.d.ts +1 -1
  86. package/dist/Feedback/Feedback.Loading.d.ts +2 -1
  87. package/dist/Feedback/Feedback.PermissionCard.d.ts +15 -0
  88. package/dist/Feedback/Feedback.PermissionCard.js +11 -0
  89. package/dist/Feedback/Feedback.Progress.d.ts +9 -0
  90. package/dist/Feedback/Feedback.Progress.js +35 -0
  91. package/dist/Feedback/Feedback.ProgressCircle.d.ts +12 -0
  92. package/dist/Feedback/Feedback.ProgressCircle.js +15 -0
  93. package/dist/Feedback/Feedback.Skeleton.d.ts +11 -0
  94. package/dist/Feedback/Feedback.Skeleton.js +29 -0
  95. package/dist/Feedback/Feedback.Splash.d.ts +1 -1
  96. package/dist/Feedback/Toast.context.d.ts +35 -0
  97. package/dist/Feedback/Toast.context.js +119 -0
  98. package/dist/Feedback/index.d.ts +15 -0
  99. package/dist/Feedback/index.js +15 -0
  100. package/dist/Form/Form.Button.d.ts +6 -0
  101. package/dist/Form/Form.Button.js +12 -1
  102. package/dist/Form/Form.Checkbox.d.ts +1 -1
  103. package/dist/Form/Form.ControlledCheckbox.d.ts +1 -1
  104. package/dist/Form/Form.ControlledInput.d.ts +1 -1
  105. package/dist/Form/Form.ControlledMonetaryInput.d.ts +1 -1
  106. package/dist/Form/Form.ControlledRadioButton.d.ts +1 -1
  107. package/dist/Form/Form.DatePicker.d.ts +20 -0
  108. package/dist/Form/Form.DatePicker.js +38 -0
  109. package/dist/Form/Form.Dropdown.d.ts +1 -1
  110. package/dist/Form/Form.FAB.d.ts +10 -0
  111. package/dist/Form/Form.FAB.js +17 -0
  112. package/dist/Form/Form.FilterButton.d.ts +1 -1
  113. package/dist/Form/Form.FractionalQuantityInput.d.ts +1 -1
  114. package/dist/Form/Form.IconButton.d.ts +1 -1
  115. package/dist/Form/Form.Input.d.ts +2 -1
  116. package/dist/Form/Form.MonetaryInput.d.ts +1 -1
  117. package/dist/Form/Form.PinInput.d.ts +12 -0
  118. package/dist/Form/Form.PinInput.js +23 -0
  119. package/dist/Form/Form.QuantitySelector.d.ts +2 -1
  120. package/dist/Form/Form.QuantitySelector.js +1 -1
  121. package/dist/Form/Form.RadioButton.d.ts +1 -1
  122. package/dist/Form/Form.SearchBar.d.ts +6 -1
  123. package/dist/Form/Form.SearchBar.js +4 -0
  124. package/dist/Form/Form.Select.d.ts +17 -0
  125. package/dist/Form/Form.Select.js +26 -0
  126. package/dist/Form/Form.Slider.d.ts +20 -0
  127. package/dist/Form/Form.Slider.js +16 -0
  128. package/dist/Form/Form.Switch.d.ts +10 -0
  129. package/dist/Form/Form.Switch.js +9 -0
  130. package/dist/Form/index.d.ts +12 -0
  131. package/dist/Form/index.js +12 -0
  132. package/dist/Navigation/Navigation.AppBar.d.ts +41 -0
  133. package/dist/Navigation/Navigation.AppBar.js +33 -0
  134. package/dist/Navigation/Navigation.BottomNav.d.ts +29 -0
  135. package/dist/Navigation/Navigation.BottomNav.js +35 -0
  136. package/dist/Navigation/Navigation.CollapsingHeader.d.ts +34 -0
  137. package/dist/Navigation/Navigation.CollapsingHeader.js +47 -0
  138. package/dist/Navigation/Navigation.FloatingBar.d.ts +15 -0
  139. package/dist/Navigation/Navigation.FloatingBar.js +21 -0
  140. package/dist/Navigation/Navigation.Header.d.ts +6 -2
  141. package/dist/Navigation/Navigation.Header.js +4 -0
  142. package/dist/Navigation/Navigation.HeaderToolbar.d.ts +1 -1
  143. package/dist/Navigation/Navigation.Menu.d.ts +21 -0
  144. package/dist/Navigation/Navigation.Menu.js +42 -0
  145. package/dist/Navigation/Navigation.RowItem.d.ts +1 -1
  146. package/dist/Navigation/Navigation.SearchBar.d.ts +18 -0
  147. package/dist/Navigation/Navigation.SearchBar.js +22 -0
  148. package/dist/Navigation/Navigation.SegmentedControl.d.ts +14 -0
  149. package/dist/Navigation/Navigation.SegmentedControl.js +13 -0
  150. package/dist/Navigation/Navigation.Steps.d.ts +8 -0
  151. package/dist/Navigation/Navigation.Steps.js +17 -0
  152. package/dist/Navigation/Navigation.TabIcon.d.ts +1 -1
  153. package/dist/Navigation/Navigation.Tabs.d.ts +28 -0
  154. package/dist/Navigation/Navigation.Tabs.js +45 -0
  155. package/dist/Navigation/index.d.ts +32 -1
  156. package/dist/Navigation/index.js +18 -0
  157. package/dist/Typography/Typography.Text.d.ts +2 -1
  158. package/dist/branding.d.ts +6 -0
  159. package/dist/branding.js +7 -0
  160. package/dist/icons/ArrowDownIcon.d.ts +2 -1
  161. package/dist/icons/ArrowUpIcon.d.ts +2 -1
  162. package/dist/icons/CreditIcon.d.ts +1 -1
  163. package/dist/icons/OdooIcon.d.ts +1 -1
  164. package/dist/index.d.ts +1 -0
  165. package/dist/index.js +2 -0
  166. package/dist/layouts/AuthContainer.d.ts +1 -1
  167. package/dist/layouts/Container.d.ts +1 -0
  168. package/dist/layouts/Container.js +2 -3
  169. package/dist/layouts/GradientContainer.d.ts +1 -1
  170. package/dist/layouts/PlainLayout.d.ts +1 -1
  171. package/dist/layouts/ScrollContainer.d.ts +2 -2
  172. package/dist/layouts/ScrollContainer.js +1 -1
  173. package/dist/layouts/TabNavigatorLayout.d.ts +2 -2
  174. package/dist/layouts/TabNavigatorLayout.js +4 -0
  175. package/dist/primitives/AspectRatio.d.ts +10 -0
  176. package/dist/primitives/AspectRatio.js +8 -0
  177. package/dist/primitives/Box.d.ts +1 -1
  178. package/dist/primitives/Pressable.d.ts +10 -0
  179. package/dist/primitives/Pressable.js +9 -0
  180. package/dist/primitives/Row.d.ts +1 -1
  181. package/dist/primitives/Spacer.d.ts +8 -0
  182. package/dist/primitives/Spacer.js +9 -0
  183. package/dist/primitives/Stack.d.ts +1 -1
  184. package/dist/primitives/index.d.ts +3 -0
  185. package/dist/primitives/index.js +3 -0
  186. package/dist/theme/active.d.ts +2 -0
  187. package/dist/theme/active.js +13 -0
  188. package/dist/theme/components/ThemedActivityIndicator.d.ts +1 -1
  189. package/dist/theme/components/index.d.ts +1 -1
  190. package/dist/theme/components/index.js +1 -1
  191. package/dist/theme/dark.d.ts +7 -0
  192. package/dist/theme/dark.js +84 -0
  193. package/dist/theme/define.d.ts +5 -5
  194. package/dist/theme/define.js +5 -5
  195. package/dist/theme/index.d.ts +3 -1
  196. package/dist/theme/index.js +3 -1
  197. package/dist/theme/theme.d.ts +1 -1
  198. package/dist/theme/theme.js +1 -1
  199. package/dist/theme/types.d.ts +14 -14
  200. package/dist/theme/types.js +2 -2
  201. package/dist/theme/useTheme.d.ts +3 -1
  202. package/dist/theme/useTheme.js +6 -1
  203. package/dist/tokens/index.d.ts +2 -0
  204. package/dist/tokens/index.js +2 -0
  205. package/dist/tokens/motion.d.ts +71 -0
  206. package/dist/tokens/motion.js +25 -0
  207. package/dist/utils/date.d.ts +33 -33
  208. package/dist/utils/date.js +39 -39
  209. package/dist/views/AuthFormView.d.ts +1 -1
  210. package/dist/views/FormViewV2.context.d.ts +1 -1
  211. package/dist/views/FormViewV2.d.ts +10 -10
  212. package/dist/views/ListViewV2.context.d.ts +1 -1
  213. package/dist/views/ListViewV2.d.ts +20 -20
  214. package/dist/views/Wizard/Wizard.context.d.ts +1 -1
  215. package/dist/widgets/CircleButton.d.ts +6 -2
  216. package/dist/widgets/CircleButton.js +4 -0
  217. package/dist/widgets/GeoPermissionCard.d.ts +1 -1
  218. package/dist/widgets/HomeHeader.d.ts +4 -0
  219. package/dist/widgets/HomeHeader.js +4 -0
  220. package/dist/widgets/JSONViewer.d.ts +2 -1
  221. package/dist/widgets/JSONViewer.js +6 -6
  222. package/dist/widgets/MenuCard.d.ts +1 -1
  223. package/dist/widgets/ScreenHeader.d.ts +5 -1
  224. package/dist/widgets/ScreenHeader.js +4 -0
  225. package/dist/widgets/TimeZoneSelector.d.ts +1 -1
  226. package/dist/widgets/TimeZoneSelectorModal.d.ts +1 -1
  227. package/package.json +38 -25
  228. package/tailwind.preset.js +14 -0
  229. package/dist/notifications/index.d.ts +0 -1
  230. package/dist/notifications/index.js +0 -1
  231. package/dist/providers/index.d.ts +0 -1
  232. package/dist/providers/index.js +0 -2
@@ -0,0 +1,41 @@
1
+ import type { ReactNode } from "react";
2
+ export interface AppBarActionProps {
3
+ icon: string;
4
+ onPress: () => void;
5
+ badge?: string | number;
6
+ accessibilityLabel?: string;
7
+ /** `tinted` highlights (primary action); `plain` is the neutral contained default. */
8
+ tone?: "plain" | "tinted";
9
+ testID?: string;
10
+ }
11
+ /**
12
+ * "Contained" icon-button for the AppBar: circular touch area with a subtle surface
13
+ * (merge of Material 3 state-layer + iOS 26 contained button). Optional badge.
14
+ */
15
+ declare function AppBarAction({ icon, onPress, badge, accessibilityLabel, tone, testID, }: AppBarActionProps): import("react").JSX.Element;
16
+ export interface AppBarProps {
17
+ title?: string;
18
+ subtitle?: string;
19
+ onBack?: () => void;
20
+ leading?: ReactNode;
21
+ actions?: ReactNode;
22
+ subheader?: ReactNode;
23
+ variant?: "default" | "large" | "center";
24
+ border?: boolean;
25
+ /** Reserves the status-bar space (insets.top). `false` to embed/demo. */
26
+ safeArea?: boolean;
27
+ className?: string;
28
+ testID?: string;
29
+ }
30
+ /**
31
+ * Flat, modern top bar (merge of Material 3 + iOS 26): tokenized surface, left-aligned
32
+ * title + subtitle, **contained** icon-buttons (back and actions with a circular area),
33
+ * a `subheader` slot (for SearchBar/Segmented below the title), and a `large` variant.
34
+ * Replaces the gradient look of `Navigation.Header`/`ScreenHeader`.
35
+ */
36
+ declare function AppBar({ title, subtitle, onBack, leading, actions, subheader, variant, border, safeArea, className, testID, }: AppBarProps): import("react").JSX.Element;
37
+ declare const AppBarWithAction: typeof AppBar & {
38
+ Action: typeof AppBarAction;
39
+ };
40
+ export default AppBarWithAction;
41
+ export { AppBarWithAction as AppBar };
@@ -0,0 +1,33 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "nativewind/jsx-runtime";
2
+ import Icon from "../Display/Display.Icon";
3
+ import Pressable from "../primitives/Pressable";
4
+ import { theme } from "../theme";
5
+ import { cn } from "../theme/tw";
6
+ import { Typography } from "../Typography";
7
+ import { View } from "react-native";
8
+ import { useSafeAreaInsets } from "react-native-safe-area-context";
9
+ /**
10
+ * "Contained" icon-button for the AppBar: circular touch area with a subtle surface
11
+ * (merge of Material 3 state-layer + iOS 26 contained button). Optional badge.
12
+ */
13
+ function AppBarAction({ icon, onPress, badge, accessibilityLabel, tone = "plain", testID, }) {
14
+ return (_jsxs(Pressable, { accessibilityLabel: accessibilityLabel, accessibilityRole: "button", className: "items-center justify-center rounded-full", hitSlop: 6, onPress: onPress, style: {
15
+ width: 38,
16
+ height: 38,
17
+ backgroundColor: tone === "tinted" ? theme.bg.accent : theme.bg.muted,
18
+ }, testID: testID, children: [_jsx(Icon, { color: tone === "tinted" ? theme.primary : theme.icon.primary, name: icon, size: 20 }), badge != null ? (_jsx(View, { className: "absolute bg-danger rounded-full min-w-[16px] h-4 px-1 items-center justify-center", style: { top: -2, right: -2, borderWidth: 2, borderColor: theme.bg.card }, children: _jsx(Typography.Text, { style: { color: theme.text.inverse, fontSize: 9, lineHeight: 11 }, children: badge }) })) : null] }));
19
+ }
20
+ /**
21
+ * Flat, modern top bar (merge of Material 3 + iOS 26): tokenized surface, left-aligned
22
+ * title + subtitle, **contained** icon-buttons (back and actions with a circular area),
23
+ * a `subheader` slot (for SearchBar/Segmented below the title), and a `large` variant.
24
+ * Replaces the gradient look of `Navigation.Header`/`ScreenHeader`.
25
+ */
26
+ function AppBar({ title, subtitle, onBack, leading, actions, subheader, variant = "default", border = true, safeArea = true, className, testID, }) {
27
+ const insets = useSafeAreaInsets();
28
+ const centered = variant === "center";
29
+ return (_jsxs(View, { className: cn("bg-bg-card", border && "border-b border-border-light", className), style: { paddingTop: safeArea ? insets.top : 0 }, testID: testID, children: [_jsxs(View, { className: "flex-row items-center px-3 gap-2 min-h-[56px]", children: [_jsxs(View, { className: "flex-row items-center gap-2", style: { minWidth: 38 }, children: [onBack ? (_jsx(AppBarAction, { accessibilityLabel: "Volver", icon: "chevron-back", onPress: onBack })) : null, leading] }), variant !== "large" ? (_jsxs(View, { className: cn("flex-1", centered && "items-center"), children: [title ? (_jsx(Typography.Text, { className: "text-text-primary", numberOfLines: 1, semibold: true, variant: "subtitle", children: title })) : null, subtitle ? (_jsx(Typography.Text, { className: "text-text-secondary", numberOfLines: 1, variant: "caption", children: subtitle })) : null] })) : (_jsx(View, { className: "flex-1" })), _jsx(View, { className: "flex-row items-center justify-end gap-2", style: { minWidth: 38 }, children: actions })] }), variant === "large" && title ? (_jsxs(View, { className: "px-4 pb-2 pt-0.5", children: [_jsx(Typography.Text, { className: "text-text-primary", variant: "h2", children: title }), subtitle ? (_jsx(Typography.Text, { className: "text-text-secondary", variant: "bodySmall", children: subtitle })) : null] })) : null, subheader ? _jsx(View, { className: "px-3 pb-3 pt-0.5", children: subheader }) : null] }));
30
+ }
31
+ const AppBarWithAction = Object.assign(AppBar, { Action: AppBarAction });
32
+ export default AppBarWithAction;
33
+ export { AppBarWithAction as AppBar };
@@ -0,0 +1,29 @@
1
+ export interface BottomNavItem {
2
+ key: string;
3
+ label?: string;
4
+ icon: string;
5
+ activeIcon?: string;
6
+ badge?: string | number;
7
+ }
8
+ export interface BottomNavCenterAction {
9
+ icon: string;
10
+ onPress: () => void;
11
+ accessibilityLabel?: string;
12
+ }
13
+ export interface BottomNavProps {
14
+ items: BottomNavItem[];
15
+ value: string;
16
+ onChange: (key: string) => void;
17
+ showLabels?: boolean;
18
+ centerAction?: BottomNavCenterAction;
19
+ /** Reserva el espacio inferior (insets.bottom). `false` al embeber en FloatingBar. */
20
+ safeArea?: boolean;
21
+ className?: string;
22
+ testID?: string;
23
+ }
24
+ /**
25
+ * Bottom navigation flat y moderna: superficie tokenizada + hairline superior, activo en
26
+ * `primary`. `centerAction` agrega un FAB central elevado (estilo apps de delivery/social).
27
+ */
28
+ declare function BottomNav({ items, value, onChange, showLabels, centerAction, safeArea, className, testID, }: BottomNavProps): import("react").JSX.Element;
29
+ export default BottomNav;
@@ -0,0 +1,35 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "nativewind/jsx-runtime";
2
+ import Icon from "../Display/Display.Icon";
3
+ import Pressable from "../primitives/Pressable";
4
+ import { theme } from "../theme";
5
+ import { cn } from "../theme/tw";
6
+ import { Typography } from "../Typography";
7
+ import { View } from "react-native";
8
+ import { useSafeAreaInsets } from "react-native-safe-area-context";
9
+ /**
10
+ * Bottom navigation flat y moderna: superficie tokenizada + hairline superior, activo en
11
+ * `primary`. `centerAction` agrega un FAB central elevado (estilo apps de delivery/social).
12
+ */
13
+ function BottomNav({ items, value, onChange, showLabels = true, centerAction, safeArea = true, className, testID, }) {
14
+ const insets = useSafeAreaInsets();
15
+ const bottomPad = safeArea ? insets.bottom : 0;
16
+ const renderItem = (item) => {
17
+ const active = item.key === value;
18
+ const color = active ? theme.primary : theme.icon.secondary;
19
+ return (_jsxs(Pressable, { accessibilityLabel: item.label ?? item.key, accessibilityRole: "tab", accessibilityState: { selected: active }, className: "flex-1 items-center justify-center py-1.5", onPress: () => onChange(item.key), children: [_jsxs(View, { children: [_jsx(Icon, { color: color, name: active ? (item.activeIcon ?? item.icon) : item.icon, size: 24 }), item.badge != null ? (_jsx(View, { className: "absolute bg-danger rounded-full min-w-[16px] h-4 px-1 items-center justify-center", style: { top: -4, right: -10, borderWidth: 2, borderColor: theme.bg.card }, children: _jsx(Typography.Text, { style: { color: theme.text.inverse, fontSize: 9, lineHeight: 11 }, children: item.badge }) })) : null] }), showLabels && item.label ? (_jsx(Typography.Text, { numberOfLines: 1, style: { color, fontSize: 11, marginTop: 3 }, children: item.label })) : null] }, item.key));
20
+ };
21
+ if (centerAction) {
22
+ const mid = Math.ceil(items.length / 2);
23
+ const left = items.slice(0, mid);
24
+ const right = items.slice(mid);
25
+ return (_jsxs(View, { className: cn("flex-row items-center bg-bg-card border-t border-border-light", className), style: { paddingBottom: bottomPad, minHeight: 56 }, testID: testID, children: [left.map(renderItem), _jsx(Pressable, { accessibilityLabel: centerAction.accessibilityLabel ?? "Acción", accessibilityRole: "button", className: "items-center justify-center bg-primary rounded-full", onPress: centerAction.onPress, style: {
26
+ width: 52,
27
+ height: 52,
28
+ marginTop: -20,
29
+ marginHorizontal: 6,
30
+ ...theme.shadow.md,
31
+ }, children: _jsx(Icon, { color: theme.icon.inverse, name: centerAction.icon, size: 26 }) }), right.map(renderItem)] }));
32
+ }
33
+ return (_jsx(View, { className: cn("flex-row bg-bg-card border-t border-border-light", className), style: { paddingBottom: bottomPad, minHeight: 56 }, testID: testID, children: items.map(renderItem) }));
34
+ }
35
+ export default BottomNav;
@@ -0,0 +1,34 @@
1
+ import { type AppBarActionProps } from "../Navigation/Navigation.AppBar";
2
+ import type { ReactNode } from "react";
3
+ import { Animated } from "react-native";
4
+ export interface CollapsingHeaderProps {
5
+ title: string;
6
+ subtitle?: string;
7
+ scrollY: Animated.Value;
8
+ onBack?: () => void;
9
+ actions?: ReactNode;
10
+ /** Extra height of the collapsing large-title (px). Default 56, or 72 with subtitle. */
11
+ largeHeight?: number;
12
+ /** Reserves the status-bar space (insets.top). `false` to embed/demo. */
13
+ safeArea?: boolean;
14
+ testID?: string;
15
+ }
16
+ /**
17
+ * Header with a large-title that **collapses on scroll** (merge of iOS 26 large title +
18
+ * Material 3 large top app bar). The compact bar stays fixed and its title fades in while
19
+ * scrolling; the large-title fades out and slides up. Controlled by an `Animated.Value`.
20
+ *
21
+ * Usage: pass `scrollY` from your `Animated.ScrollView`. Since the large-title collapses its
22
+ * `height` (not supported by the native driver), use `useNativeDriver: false`:
23
+ * ```tsx
24
+ * const scrollY = useRef(new Animated.Value(0)).current;
25
+ * <CollapsingHeader title="Inicio" scrollY={scrollY} />
26
+ * <Animated.ScrollView
27
+ * onScroll={Animated.event([{ nativeEvent: { contentOffset: { y: scrollY } } }], { useNativeDriver: false })}
28
+ * scrollEventThrottle={16}
29
+ * />
30
+ * ```
31
+ */
32
+ declare function CollapsingHeader({ title, subtitle, scrollY, onBack, actions, largeHeight, safeArea, testID, }: CollapsingHeaderProps): import("react").JSX.Element;
33
+ export type { AppBarActionProps };
34
+ export default CollapsingHeader;
@@ -0,0 +1,47 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "nativewind/jsx-runtime";
2
+ import AppBar from "../Navigation/Navigation.AppBar";
3
+ import { theme } from "../theme";
4
+ import { Typography } from "../Typography";
5
+ import { Animated, View } from "react-native";
6
+ import { useSafeAreaInsets } from "react-native-safe-area-context";
7
+ /**
8
+ * Header with a large-title that **collapses on scroll** (merge of iOS 26 large title +
9
+ * Material 3 large top app bar). The compact bar stays fixed and its title fades in while
10
+ * scrolling; the large-title fades out and slides up. Controlled by an `Animated.Value`.
11
+ *
12
+ * Usage: pass `scrollY` from your `Animated.ScrollView`. Since the large-title collapses its
13
+ * `height` (not supported by the native driver), use `useNativeDriver: false`:
14
+ * ```tsx
15
+ * const scrollY = useRef(new Animated.Value(0)).current;
16
+ * <CollapsingHeader title="Inicio" scrollY={scrollY} />
17
+ * <Animated.ScrollView
18
+ * onScroll={Animated.event([{ nativeEvent: { contentOffset: { y: scrollY } } }], { useNativeDriver: false })}
19
+ * scrollEventThrottle={16}
20
+ * />
21
+ * ```
22
+ */
23
+ function CollapsingHeader({ title, subtitle, scrollY, onBack, actions, largeHeight = subtitle ? 72 : 56, safeArea = true, testID, }) {
24
+ const insets = useSafeAreaInsets();
25
+ const largeOpacity = scrollY.interpolate({
26
+ inputRange: [0, largeHeight * 0.6],
27
+ outputRange: [1, 0],
28
+ extrapolate: "clamp",
29
+ });
30
+ const largeTranslate = scrollY.interpolate({
31
+ inputRange: [0, largeHeight],
32
+ outputRange: [0, -largeHeight / 2],
33
+ extrapolate: "clamp",
34
+ });
35
+ const largeContainerHeight = scrollY.interpolate({
36
+ inputRange: [0, largeHeight],
37
+ outputRange: [largeHeight, 0],
38
+ extrapolate: "clamp",
39
+ });
40
+ const compactTitleOpacity = scrollY.interpolate({
41
+ inputRange: [largeHeight * 0.6, largeHeight],
42
+ outputRange: [0, 1],
43
+ extrapolate: "clamp",
44
+ });
45
+ return (_jsxs(View, { style: { backgroundColor: theme.bg.card }, testID: testID, children: [_jsx(View, { style: { paddingTop: safeArea ? insets.top : 0 }, children: _jsxs(View, { className: "flex-row items-center px-3 gap-2 min-h-[52px]", children: [_jsx(View, { style: { minWidth: 38 }, children: onBack ? (_jsx(AppBar.Action, { accessibilityLabel: "Volver", icon: "chevron-back", onPress: onBack })) : null }), _jsx(Animated.View, { className: "flex-1", style: { opacity: compactTitleOpacity }, children: _jsx(Typography.Text, { className: "text-text-primary", numberOfLines: 1, semibold: true, variant: "subtitle", children: title }) }), _jsx(View, { className: "flex-row items-center justify-end gap-2", style: { minWidth: 38 }, children: actions })] }) }), _jsx(Animated.View, { style: { height: largeContainerHeight, overflow: "hidden" }, children: _jsxs(Animated.View, { className: "px-4 pb-2", style: { opacity: largeOpacity, transform: [{ translateY: largeTranslate }] }, children: [_jsx(Typography.Text, { className: "text-text-primary", variant: "h2", children: title }), subtitle ? (_jsx(Typography.Text, { className: "text-text-secondary", variant: "bodySmall", children: subtitle })) : null] }) }), _jsx(View, { className: "border-b border-border-light" })] }));
46
+ }
47
+ export default CollapsingHeader;
@@ -0,0 +1,15 @@
1
+ import type { ReactNode } from "react";
2
+ export interface FloatingBarProps {
3
+ children: ReactNode;
4
+ position?: "top" | "bottom";
5
+ inset?: number;
6
+ className?: string;
7
+ testID?: string;
8
+ }
9
+ /**
10
+ * **Rounded floating container** for nav/action bars that float above the content
11
+ * (Snapchat/TikTok/McDonald's 2026 style). Shadowed pill, safe-area aware.
12
+ * Presentational: drop a `BottomNav`, actions, or anything inside.
13
+ */
14
+ declare function FloatingBar({ children, position, inset, className, testID, }: FloatingBarProps): import("react").JSX.Element;
15
+ export default FloatingBar;
@@ -0,0 +1,21 @@
1
+ import { jsx as _jsx } from "nativewind/jsx-runtime";
2
+ import { theme } from "../theme";
3
+ import { cn } from "../theme/tw";
4
+ import { View } from "react-native";
5
+ import { useSafeAreaInsets } from "react-native-safe-area-context";
6
+ /**
7
+ * **Rounded floating container** for nav/action bars that float above the content
8
+ * (Snapchat/TikTok/McDonald's 2026 style). Shadowed pill, safe-area aware.
9
+ * Presentational: drop a `BottomNav`, actions, or anything inside.
10
+ */
11
+ function FloatingBar({ children, position = "bottom", inset = 16, className, testID, }) {
12
+ const insets = useSafeAreaInsets();
13
+ const safe = position === "bottom" ? insets.bottom : insets.top;
14
+ return (_jsx(View, { pointerEvents: "box-none", style: {
15
+ position: "absolute",
16
+ left: inset,
17
+ right: inset,
18
+ [position]: safe + inset,
19
+ }, testID: testID, children: _jsx(View, { className: cn("rounded-full bg-bg-card px-2 py-1.5 border border-border-light", className), style: theme.shadow.lg, children: children }) }));
20
+ }
21
+ export default FloatingBar;
@@ -1,4 +1,4 @@
1
- import { ReactNode } from "react";
1
+ import React, { ReactNode } from "react";
2
2
  import { type ImageSourcePropType } from "react-native";
3
3
  export interface HeaderProps {
4
4
  title?: string;
@@ -8,5 +8,9 @@ export interface HeaderProps {
8
8
  handleBackButton?: () => void;
9
9
  className?: string;
10
10
  }
11
- declare const Header: ({ title, logo, logoSource, backButton, handleBackButton, className, }: HeaderProps) => import("react/jsx-runtime").JSX.Element;
11
+ /**
12
+ * @deprecated Legacy style (forced gradient via `GradientContainer`). Use
13
+ * `Navigation.AppBar` (flat, modern, opt-in gradient). Kept for backwards compatibility.
14
+ */
15
+ declare const Header: ({ title, logo, logoSource, backButton, handleBackButton, className, }: HeaderProps) => React.JSX.Element;
12
16
  export default Header;
@@ -5,6 +5,10 @@ import { theme } from "../theme";
5
5
  import { cn } from "../theme/tw";
6
6
  import { Typography } from "../Typography";
7
7
  import { TouchableOpacity, View } from "react-native";
8
+ /**
9
+ * @deprecated Legacy style (forced gradient via `GradientContainer`). Use
10
+ * `Navigation.AppBar` (flat, modern, opt-in gradient). Kept for backwards compatibility.
11
+ */
8
12
  const Header = ({ title, logo, logoSource, backButton, handleBackButton, className, }) => {
9
13
  const onBackPress = handleBackButton ?? (() => { });
10
14
  return (_jsx(GradientContainer, { className: cn("pt-10 pb-3.5 px-4", className), children: _jsxs(View, { className: "relative items-center justify-center", children: [backButton && (_jsx(TouchableOpacity, { className: "absolute top-0 left-0 z-10 border border-white p-1.5 rounded", onPress: onBackPress, children: _jsx(Display.Icon, { color: theme.text.inverse, name: "chevron-back", size: 25, type: "ionicons" }) })), _jsxs(View, { className: "items-center justify-center", children: [logo || _jsx(Display.Logo, { size: "medium", source: logoSource }), title && (_jsx(Typography.Text, { className: "text-white", variant: "h4", children: title }))] })] }) }));
@@ -11,5 +11,5 @@ interface HeaderToolbarProps {
11
11
  withBackground?: boolean;
12
12
  className?: string;
13
13
  }
14
- declare function HeaderToolbar({ title, subtitle, onBack, rightComponent, centerTitle, flat, children, logo, withBackground, className, }: HeaderToolbarProps): import("react/jsx-runtime").JSX.Element;
14
+ declare function HeaderToolbar({ title, subtitle, onBack, rightComponent, centerTitle, flat, children, logo, withBackground, className, }: HeaderToolbarProps): React.JSX.Element;
15
15
  export default HeaderToolbar;
@@ -0,0 +1,21 @@
1
+ import { type ReactNode } from "react";
2
+ export interface MenuItem {
3
+ label: string;
4
+ icon?: string;
5
+ destructive?: boolean;
6
+ disabled?: boolean;
7
+ onPress: () => void;
8
+ }
9
+ export interface MenuSeparator {
10
+ separator: true;
11
+ }
12
+ export type MenuEntry = MenuItem | MenuSeparator;
13
+ export interface MenuProps {
14
+ items: MenuEntry[];
15
+ trigger?: ReactNode;
16
+ menuWidth?: number;
17
+ testID?: string;
18
+ }
19
+ declare function Menu({ items, trigger, menuWidth, testID }: MenuProps): import("react").JSX.Element;
20
+ export default Menu;
21
+ export { Menu };
@@ -0,0 +1,42 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "nativewind/jsx-runtime";
2
+ import Icon from "../Display/Display.Icon";
3
+ import Pressable from "../primitives/Pressable";
4
+ import { theme } from "../theme";
5
+ import { cn } from "../theme/tw";
6
+ import { Typography } from "../Typography";
7
+ import { useRef, useState } from "react";
8
+ import { Dimensions, Modal, Pressable as RNPressable, View } from "react-native";
9
+ function Menu({ items, trigger, menuWidth = 220, testID }) {
10
+ const triggerRef = useRef(null);
11
+ const [anchor, setAnchor] = useState(null);
12
+ const open = () => {
13
+ triggerRef.current?.measureInWindow((x, y, width, height) => {
14
+ setAnchor({ x, y, width, height });
15
+ });
16
+ };
17
+ const close = () => setAnchor(null);
18
+ const screen = Dimensions.get("window");
19
+ const right = anchor ? Math.max(8, screen.width - (anchor.x + anchor.width)) : 8;
20
+ const top = anchor ? anchor.y + anchor.height + 4 : 0;
21
+ return (_jsxs(View, { collapsable: false, ref: triggerRef, testID: testID, children: [_jsx(Pressable, { accessibilityLabel: "M\u00E1s opciones", accessibilityRole: "button", onPress: open, children: trigger ?? _jsx(Icon, { color: theme.icon.secondary, name: "ellipsis-vertical", size: 22 }) }), _jsx(Modal, { animationType: "fade", onRequestClose: close, transparent: true, visible: anchor !== null, children: _jsx(RNPressable, { onPress: close, style: { flex: 1 }, children: _jsx(View, { className: "rounded-lg py-1", style: {
22
+ position: "absolute",
23
+ top,
24
+ right,
25
+ width: menuWidth,
26
+ backgroundColor: theme.bg.popover,
27
+ borderWidth: 1,
28
+ borderColor: theme.border.light,
29
+ ...theme.shadow.lg,
30
+ }, children: items.map((entry, index) => {
31
+ if ("separator" in entry && entry.separator) {
32
+ return _jsx(View, { className: "my-1 h-px bg-border-default" }, `sep-${index}`);
33
+ }
34
+ const item = entry;
35
+ return (_jsxs(Pressable, { accessibilityRole: "menuitem", accessibilityState: { disabled: item.disabled }, className: "flex-row items-center gap-3 px-4 py-3", disabled: item.disabled, onPress: () => {
36
+ close();
37
+ item.onPress();
38
+ }, children: [item.icon ? (_jsx(Icon, { color: item.destructive ? theme.danger : theme.icon.secondary, name: item.icon, size: 18 })) : null, _jsx(Typography.Text, { className: cn("flex-1 text-sm", item.destructive ? "text-danger" : "text-text-primary", item.disabled && "text-text-disabled"), children: item.label })] }, item.label));
39
+ }) }) }) })] }));
40
+ }
41
+ export default Menu;
42
+ export { Menu };
@@ -1,5 +1,5 @@
1
1
  import { IRowItemProps } from "../views/types/IListView";
2
2
  declare function RowItem({ item, className }: IRowItemProps<any> & {
3
3
  className?: string;
4
- }): import("react/jsx-runtime").JSX.Element;
4
+ }): import("react").JSX.Element;
5
5
  export default RowItem;
@@ -0,0 +1,18 @@
1
+ export interface SearchBarProps {
2
+ value: string;
3
+ onChangeText: (value: string) => void;
4
+ placeholder?: string;
5
+ onSubmit?: (value: string) => void;
6
+ onClear?: () => void;
7
+ autoFocus?: boolean;
8
+ editable?: boolean;
9
+ onPress?: () => void;
10
+ className?: string;
11
+ testID?: string;
12
+ }
13
+ /**
14
+ * **Pill** search bar (rounded-full), 2026 style (merge of Material 3 + iOS 26).
15
+ * Use `editable={false}` + `onPress` for a trigger that navigates to the search screen.
16
+ */
17
+ declare function SearchBar({ value, onChangeText, placeholder, onSubmit, onClear, autoFocus, editable, onPress, className, testID, }: SearchBarProps): import("react").JSX.Element;
18
+ export default SearchBar;
@@ -0,0 +1,22 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "nativewind/jsx-runtime";
2
+ import Icon from "../Display/Display.Icon";
3
+ import Pressable from "../primitives/Pressable";
4
+ import { theme } from "../theme";
5
+ import { cn } from "../theme/tw";
6
+ import { Typography } from "../Typography";
7
+ import { TextInput, View } from "react-native";
8
+ /**
9
+ * **Pill** search bar (rounded-full), 2026 style (merge of Material 3 + iOS 26).
10
+ * Use `editable={false}` + `onPress` for a trigger that navigates to the search screen.
11
+ */
12
+ function SearchBar({ value, onChangeText, placeholder = "Buscar", onSubmit, onClear, autoFocus, editable = true, onPress, className, testID, }) {
13
+ const body = (_jsxs(View, { className: cn("flex-row items-center gap-2 rounded-full bg-bg-muted px-4", className), style: { height: 44 }, children: [_jsx(Icon, { color: theme.icon.tertiary, name: "search", size: 18 }), editable ? (_jsx(TextInput, { autoFocus: autoFocus, className: "flex-1 text-sm text-text-primary", onChangeText: onChangeText, onSubmitEditing: (e) => onSubmit?.(e.nativeEvent.text), placeholder: placeholder, placeholderTextColor: theme.text.tertiary, returnKeyType: "search", value: value })) : (_jsx(Typography.Text, { className: "flex-1 text-text-tertiary text-sm", numberOfLines: 1, children: value || placeholder })), editable && value.length > 0 ? (_jsx(Pressable, { accessibilityLabel: "Limpiar", hitSlop: 8, onPress: () => {
14
+ onChangeText("");
15
+ onClear?.();
16
+ }, children: _jsx(Icon, { color: theme.icon.tertiary, name: "close-circle", size: 18 }) })) : null] }));
17
+ if (!editable && onPress) {
18
+ return (_jsx(Pressable, { accessibilityLabel: placeholder, accessibilityRole: "search", onPress: onPress, testID: testID, children: body }));
19
+ }
20
+ return _jsx(View, { testID: testID, children: body });
21
+ }
22
+ export default SearchBar;
@@ -0,0 +1,14 @@
1
+ export interface SegmentedOption<T extends string> {
2
+ label: string;
3
+ value: T;
4
+ }
5
+ export interface SegmentedControlProps<T extends string> {
6
+ options: SegmentedOption<T>[];
7
+ value: T;
8
+ onChange: (value: T) => void;
9
+ className?: string;
10
+ testID?: string;
11
+ }
12
+ declare function SegmentedControl<T extends string>({ options, value, onChange, className, testID, }: SegmentedControlProps<T>): import("react").JSX.Element;
13
+ export default SegmentedControl;
14
+ export { SegmentedControl };
@@ -0,0 +1,13 @@
1
+ import { jsx as _jsx } from "nativewind/jsx-runtime";
2
+ import { theme } from "../theme";
3
+ import { cn } from "../theme/tw";
4
+ import { Typography } from "../Typography";
5
+ import { TouchableOpacity, View } from "react-native";
6
+ function SegmentedControl({ options, value, onChange, className, testID, }) {
7
+ return (_jsx(View, { accessibilityRole: "tablist", className: cn("flex-row bg-bg-muted rounded-lg p-1 gap-1", className), testID: testID, children: options.map((option) => {
8
+ const selected = option.value === value;
9
+ return (_jsx(TouchableOpacity, { accessibilityLabel: option.label, accessibilityRole: "tab", accessibilityState: { selected }, activeOpacity: 0.7, className: "flex-1 items-center justify-center py-2 rounded-md", onPress: () => onChange(option.value), style: selected ? { backgroundColor: theme.bg.card, ...theme.shadow.sm } : undefined, children: _jsx(Typography.Text, { numberOfLines: 1, semibold: selected, style: { color: selected ? theme.text.primary : theme.text.secondary }, children: option.label }) }, option.value));
10
+ }) }));
11
+ }
12
+ export default SegmentedControl;
13
+ export { SegmentedControl };
@@ -0,0 +1,8 @@
1
+ export interface StepsProps {
2
+ steps: string[];
3
+ current: number;
4
+ className?: string;
5
+ testID?: string;
6
+ }
7
+ declare function Steps({ steps, current, className, testID }: StepsProps): import("react").JSX.Element;
8
+ export default Steps;
@@ -0,0 +1,17 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "nativewind/jsx-runtime";
2
+ import Icon from "../Display/Display.Icon";
3
+ import { theme } from "../theme";
4
+ import { cn } from "../theme/tw";
5
+ import { Typography } from "../Typography";
6
+ import { View } from "react-native";
7
+ function Steps({ steps, current, className, testID }) {
8
+ return (_jsx(View, { accessibilityLabel: `Paso ${current + 1} de ${steps.length}`, className: cn("flex-row items-start", className), testID: testID, children: steps.map((label, index) => {
9
+ const done = index < current;
10
+ const active = index === current;
11
+ const circleColor = done || active ? theme.primary : theme.bg.muted;
12
+ const textColor = done || active ? theme.text.inverse : theme.text.tertiary;
13
+ const isLast = index === steps.length - 1;
14
+ return (_jsxs(View, { className: "flex-1 items-center", children: [_jsxs(View, { className: "flex-row items-center w-full", children: [_jsx(View, { className: "flex-1 h-0.5", style: { backgroundColor: "transparent" } }), _jsx(View, { className: "w-7 h-7 rounded-full items-center justify-center", style: { backgroundColor: circleColor }, children: done ? (_jsx(Icon, { color: theme.text.inverse, name: "checkmark", size: 16 })) : (_jsx(Typography.Text, { style: { color: textColor }, variant: "bodySmall", children: index + 1 })) }), _jsx(View, { className: "flex-1 h-0.5", style: { backgroundColor: isLast ? "transparent" : theme.border.default } })] }), _jsx(Typography.Text, { className: "mt-1 text-center", numberOfLines: 1, style: { color: active ? theme.primary : theme.text.tertiary }, variant: "caption", children: label })] }, label));
15
+ }) }));
16
+ }
17
+ export default Steps;
@@ -10,5 +10,5 @@ interface TabIconProps {
10
10
  name?: any;
11
11
  className?: string;
12
12
  }
13
- declare function TabIcon({ focused, size, customIcon, type, name, className, }: TabIconProps): import("react/jsx-runtime").JSX.Element;
13
+ declare function TabIcon({ focused, size, customIcon, type, name, className, }: TabIconProps): import("react").JSX.Element;
14
14
  export default TabIcon;
@@ -0,0 +1,28 @@
1
+ import { type ReactNode } from "react";
2
+ export interface TabsProps {
3
+ value?: string;
4
+ defaultValue?: string;
5
+ onValueChange?: (value: string) => void;
6
+ className?: string;
7
+ children: ReactNode;
8
+ }
9
+ declare function TabsRoot({ value, defaultValue, onValueChange, className, children }: TabsProps): import("react").JSX.Element;
10
+ declare function TabsList({ children, className }: {
11
+ children: ReactNode;
12
+ className?: string;
13
+ }): import("react").JSX.Element;
14
+ declare function TabsTrigger({ value, children }: {
15
+ value: string;
16
+ children: ReactNode;
17
+ }): import("react").JSX.Element;
18
+ declare function TabsContent({ value, children }: {
19
+ value: string;
20
+ children: ReactNode;
21
+ }): import("react").JSX.Element | null;
22
+ declare const Tabs: typeof TabsRoot & {
23
+ List: typeof TabsList;
24
+ Trigger: typeof TabsTrigger;
25
+ Content: typeof TabsContent;
26
+ };
27
+ export default Tabs;
28
+ export { Tabs };
@@ -0,0 +1,45 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "nativewind/jsx-runtime";
2
+ import { theme } from "../theme";
3
+ import { cn } from "../theme/tw";
4
+ import { Typography } from "../Typography";
5
+ import { createContext, useCallback, useContext, useState } from "react";
6
+ import { TouchableOpacity, View } from "react-native";
7
+ const TabsContext = createContext(null);
8
+ function useTabs() {
9
+ const ctx = useContext(TabsContext);
10
+ if (!ctx) {
11
+ throw new Error("Tabs.* debe usarse dentro de <Tabs>");
12
+ }
13
+ return ctx;
14
+ }
15
+ function TabsRoot({ value, defaultValue, onValueChange, className, children }) {
16
+ const [internal, setInternal] = useState(defaultValue ?? "");
17
+ const current = value ?? internal;
18
+ const setValue = useCallback((next) => {
19
+ if (value === undefined)
20
+ setInternal(next);
21
+ onValueChange?.(next);
22
+ }, [value, onValueChange]);
23
+ return (_jsx(TabsContext.Provider, { value: { value: current, setValue }, children: _jsx(View, { className: cn("flex-1", className), children: children }) }));
24
+ }
25
+ function TabsList({ children, className }) {
26
+ return (_jsx(View, { accessibilityRole: "tablist", className: cn("flex-row border-b border-border-default", className), children: children }));
27
+ }
28
+ function TabsTrigger({ value, children }) {
29
+ const { value: active, setValue } = useTabs();
30
+ const selected = active === value;
31
+ return (_jsxs(TouchableOpacity, { accessibilityRole: "tab", accessibilityState: { selected }, activeOpacity: 0.7, className: "flex-1 items-center", onPress: () => setValue(value), children: [_jsx(View, { className: "py-3", children: _jsx(Typography.Text, { semibold: selected, style: { color: selected ? theme.primary : theme.text.secondary }, children: children }) }), _jsx(View, { className: "h-0.5 w-full", style: { backgroundColor: selected ? theme.primary : "transparent" } })] }));
32
+ }
33
+ function TabsContent({ value, children }) {
34
+ const { value: active } = useTabs();
35
+ if (active !== value)
36
+ return null;
37
+ return _jsx(View, { className: "flex-1", children: children });
38
+ }
39
+ const Tabs = Object.assign(TabsRoot, {
40
+ List: TabsList,
41
+ Trigger: TabsTrigger,
42
+ Content: TabsContent,
43
+ });
44
+ export default Tabs;
45
+ export { Tabs };
@@ -1,11 +1,42 @@
1
+ import BottomNav from "../Navigation/Navigation.BottomNav";
2
+ import CollapsingHeader from "../Navigation/Navigation.CollapsingHeader";
3
+ import FloatingBar from "../Navigation/Navigation.FloatingBar";
1
4
  import HeaderToolbar from "../Navigation/Navigation.HeaderToolbar";
5
+ import Menu from "../Navigation/Navigation.Menu";
2
6
  import RowItem from "../Navigation/Navigation.RowItem";
7
+ import SearchBar from "../Navigation/Navigation.SearchBar";
8
+ import SegmentedControl from "../Navigation/Navigation.SegmentedControl";
9
+ import Steps from "../Navigation/Navigation.Steps";
3
10
  import TabIcon from "../Navigation/Navigation.TabIcon";
4
11
  export declare const Navigation: {
5
- Header: ({ title, logo, logoSource, backButton, handleBackButton, className, }: import("../Navigation/Navigation.Header").HeaderProps) => import("react/jsx-runtime").JSX.Element;
12
+ AppBar: (({ title, subtitle, onBack, leading, actions, subheader, variant, border, safeArea, className, testID, }: import("../Navigation/Navigation.AppBar").AppBarProps) => import("react").JSX.Element) & {
13
+ Action: ({ icon, onPress, badge, accessibilityLabel, tone, testID, }: import("../Navigation/Navigation.AppBar").AppBarActionProps) => import("react").JSX.Element;
14
+ };
15
+ BottomNav: typeof BottomNav;
16
+ CollapsingHeader: typeof CollapsingHeader;
17
+ FloatingBar: typeof FloatingBar;
18
+ SearchBar: typeof SearchBar;
19
+ Header: ({ title, logo, logoSource, backButton, handleBackButton, className, }: import("../Navigation/Navigation.Header").HeaderProps) => import("react").JSX.Element;
6
20
  HeaderToolbar: typeof HeaderToolbar;
7
21
  TabItem: import("react").FC<import("../Navigation/Navigation.TabItem").TabIconProps>;
8
22
  TabIcon: typeof TabIcon;
9
23
  RowItem: typeof RowItem;
24
+ SegmentedControl: typeof SegmentedControl;
25
+ Tabs: (({ value, defaultValue, onValueChange, className, children }: import("../Navigation/Navigation.Tabs").TabsProps) => import("react").JSX.Element) & {
26
+ List: ({ children, className }: {
27
+ children: import("react").ReactNode;
28
+ className?: string;
29
+ }) => import("react").JSX.Element;
30
+ Trigger: ({ value, children }: {
31
+ value: string;
32
+ children: import("react").ReactNode;
33
+ }) => import("react").JSX.Element;
34
+ Content: ({ value, children }: {
35
+ value: string;
36
+ children: import("react").ReactNode;
37
+ }) => import("react").JSX.Element | null;
38
+ };
39
+ Menu: typeof Menu;
40
+ Steps: typeof Steps;
10
41
  };
11
42
  export default Navigation;