@sincpro/mobile-ui 3.0.0 → 3.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (308) hide show
  1. package/dist/Actions/Actions.Button.d.ts +6 -6
  2. package/dist/Actions/Actions.Button.js +650 -180
  3. package/dist/Actions/Actions.Dock.d.ts +1 -1
  4. package/dist/Actions/Actions.Dock.js +297 -18
  5. package/dist/Actions/Actions.FAB.js +100 -12
  6. package/dist/Actions/Actions.FilterButton.d.ts +17 -0
  7. package/dist/Actions/Actions.FilterButton.js +263 -33
  8. package/dist/Actions/Actions.IconButton.d.ts +1 -0
  9. package/dist/Actions/Actions.IconButton.js +196 -33
  10. package/dist/Actions/index.js +13 -13
  11. package/dist/Dialog/Confirmation.context.js +82 -16
  12. package/dist/Dialog/Dialog.ActionSheet.js +200 -41
  13. package/dist/Dialog/Dialog.Confirmation.js +168 -31
  14. package/dist/Dialog/Dialog.EditValue.js +449 -61
  15. package/dist/Dialog/Dialog.Sheet.d.ts +7 -3
  16. package/dist/Dialog/Dialog.Sheet.js +231 -15
  17. package/dist/Dialog/OverlayHost.d.ts +23 -0
  18. package/dist/Dialog/OverlayHost.js +196 -0
  19. package/dist/Dialog/SheetSurface.d.ts +24 -0
  20. package/dist/Dialog/SheetSurface.js +441 -0
  21. package/dist/Dialog/dialog-actions.d.ts +17 -0
  22. package/dist/Dialog/dialog-actions.js +59 -0
  23. package/dist/Dialog/index.d.ts +4 -1
  24. package/dist/Dialog/index.js +8 -7
  25. package/dist/Dialog/overlay.store.d.ts +24 -0
  26. package/dist/Dialog/overlay.store.js +59 -0
  27. package/dist/Dialog/requestConfirmation.js +20 -10
  28. package/dist/Display/Display.Accordion.js +185 -13
  29. package/dist/Display/Display.AmountSummary.js +206 -15
  30. package/dist/Display/Display.Avatar.js +93 -31
  31. package/dist/Display/Display.AvatarGroup.js +132 -17
  32. package/dist/Display/Display.Badge.d.ts +18 -2
  33. package/dist/Display/Display.Badge.js +117 -49
  34. package/dist/Display/Display.Card.js +163 -26
  35. package/dist/Display/Display.Carousel.js +459 -105
  36. package/dist/Display/Display.Chip.d.ts +4 -1
  37. package/dist/Display/Display.Chip.js +165 -31
  38. package/dist/Display/Display.CircleButton.d.ts +1 -0
  39. package/dist/Display/Display.CircleButton.js +86 -27
  40. package/dist/Display/Display.CopyableText.js +289 -66
  41. package/dist/Display/Display.CountRecords.js +60 -3
  42. package/dist/Display/Display.DataTable.js +123 -13
  43. package/dist/Display/Display.Date.js +243 -33
  44. package/dist/Display/Display.Divider.d.ts +10 -10
  45. package/dist/Display/Display.Divider.js +67 -20
  46. package/dist/Display/Display.ExpoImage.js +97 -8
  47. package/dist/Display/Display.GradientSurface.d.ts +9 -4
  48. package/dist/Display/Display.GradientSurface.js +196 -46
  49. package/dist/Display/Display.Icon.js +129 -15
  50. package/dist/Display/Display.IconBadge.js +95 -25
  51. package/dist/Display/Display.Image.d.ts +7 -1
  52. package/dist/Display/Display.Image.js +344 -39
  53. package/dist/Display/Display.KeyValue.js +90 -5
  54. package/dist/Display/Display.ListGroup.js +181 -9
  55. package/dist/Display/Display.ListItem.js +324 -28
  56. package/dist/Display/Display.Logo.js +84 -29
  57. package/dist/Display/Display.MediaCard.js +125 -4
  58. package/dist/Display/Display.MediaEmbed.d.ts +0 -5
  59. package/dist/Display/Display.MediaEmbed.js +170 -26
  60. package/dist/Display/Display.MenuButton.d.ts +2 -2
  61. package/dist/Display/Display.MenuButton.js +380 -94
  62. package/dist/Display/Display.MenuCard.js +122 -18
  63. package/dist/Display/Display.MenuGrid.js +43 -3
  64. package/dist/Display/Display.Monetary.js +90 -5
  65. package/dist/Display/Display.Pattern.js +306 -47
  66. package/dist/Display/Display.PriceTag.js +117 -14
  67. package/dist/Display/Display.ProductCard.js +154 -4
  68. package/dist/Display/Display.Rating.js +92 -11
  69. package/dist/Display/Display.SearchHistory.js +132 -6
  70. package/dist/Display/Display.SectionHeader.d.ts +5 -1
  71. package/dist/Display/Display.SectionHeader.js +125 -12
  72. package/dist/Display/Display.Stat.js +62 -3
  73. package/dist/Display/Display.StatCard.js +131 -7
  74. package/dist/Display/Display.StatusBadge.d.ts +29 -0
  75. package/dist/Display/Display.StatusBadge.js +68 -0
  76. package/dist/Display/Display.StatusDot.js +93 -18
  77. package/dist/Display/Display.Story.js +285 -35
  78. package/dist/Display/Display.StoryTray.js +354 -34
  79. package/dist/Display/Display.StoryViewer.js +571 -72
  80. package/dist/Display/Display.SwipeableRow.js +141 -20
  81. package/dist/Display/Display.Tag.d.ts +4 -1
  82. package/dist/Display/Display.Tag.js +66 -4
  83. package/dist/Display/Display.Timeline.js +102 -13
  84. package/dist/Display/Display.Tooltip.js +122 -26
  85. package/dist/Display/chevron.d.ts +6 -0
  86. package/dist/Display/chevron.js +32 -0
  87. package/dist/Display/count-badge.d.ts +21 -0
  88. package/dist/Display/count-badge.js +124 -0
  89. package/dist/Display/group-title.d.ts +10 -0
  90. package/dist/Display/group-title.js +53 -0
  91. package/dist/Display/icon-font.d.ts +3 -0
  92. package/dist/Display/icon-font.ios.d.ts +3 -0
  93. package/dist/Display/icon-font.ios.js +4 -0
  94. package/dist/Display/icon-font.js +7 -0
  95. package/dist/Display/icon-glyphs.d.ts +2 -0
  96. package/dist/Display/icon-glyphs.js +87 -0
  97. package/dist/Display/icon-map.d.ts +5 -1
  98. package/dist/Display/icon-map.js +340 -84
  99. package/dist/Display/icon-registry.d.ts +21 -0
  100. package/dist/Display/icon-registry.js +21 -0
  101. package/dist/Display/index.d.ts +6 -1
  102. package/dist/Display/index.js +53 -48
  103. package/dist/Display/pill.d.ts +16 -0
  104. package/dist/Display/pill.js +47 -0
  105. package/dist/Feedback/ErrorBoundary.js +35 -23
  106. package/dist/Feedback/Feedback.Banner.js +202 -24
  107. package/dist/Feedback/Feedback.DomainSplashScreen.js +246 -70
  108. package/dist/Feedback/Feedback.Empty.js +54 -3
  109. package/dist/Feedback/Feedback.EmptyState.js +114 -5
  110. package/dist/Feedback/Feedback.Error.d.ts +1 -1
  111. package/dist/Feedback/Feedback.Error.js +130 -5
  112. package/dist/Feedback/Feedback.Loading.d.ts +1 -1
  113. package/dist/Feedback/Feedback.Loading.js +70 -3
  114. package/dist/Feedback/Feedback.PermissionCard.js +161 -5
  115. package/dist/Feedback/Feedback.Progress.js +199 -41
  116. package/dist/Feedback/Feedback.ProgressCircle.js +184 -12
  117. package/dist/Feedback/Feedback.Skeleton.js +149 -36
  118. package/dist/Feedback/Feedback.Spinner.js +407 -79
  119. package/dist/Feedback/Feedback.Splash.js +240 -33
  120. package/dist/Feedback/Feedback.State.d.ts +17 -0
  121. package/dist/Feedback/Feedback.State.js +104 -0
  122. package/dist/Feedback/Toast.context.js +883 -167
  123. package/dist/Feedback/index.d.ts +3 -0
  124. package/dist/Feedback/index.js +15 -13
  125. package/dist/Form/Form.Checkbox.js +212 -22
  126. package/dist/Form/Form.ControlledCheckbox.d.ts +1 -1
  127. package/dist/Form/Form.ControlledCheckbox.js +46 -4
  128. package/dist/Form/Form.ControlledDropdown.d.ts +1 -1
  129. package/dist/Form/Form.ControlledDropdown.js +62 -4
  130. package/dist/Form/Form.ControlledInput.d.ts +4 -3
  131. package/dist/Form/Form.ControlledInput.js +72 -4
  132. package/dist/Form/Form.ControlledMonetaryInput.d.ts +6 -3
  133. package/dist/Form/Form.ControlledMonetaryInput.js +50 -4
  134. package/dist/Form/Form.ControlledRadioButton.d.ts +2 -2
  135. package/dist/Form/Form.ControlledRadioButton.js +45 -4
  136. package/dist/Form/Form.DatePicker.js +505 -107
  137. package/dist/Form/Form.Dropdown.js +303 -52
  138. package/dist/Form/Form.ErrorSummary.js +236 -44
  139. package/dist/Form/Form.Field.d.ts +24 -0
  140. package/dist/Form/Form.Field.js +55 -0
  141. package/dist/Form/Form.FractionalQuantityInput.js +508 -96
  142. package/dist/Form/Form.Input.d.ts +17 -3
  143. package/dist/Form/Form.Input.js +478 -29
  144. package/dist/Form/Form.KeyboardForm.d.ts +22 -8
  145. package/dist/Form/Form.KeyboardForm.js +83 -8
  146. package/dist/Form/Form.KeyboardToolbarHost.d.ts +14 -0
  147. package/dist/Form/Form.KeyboardToolbarHost.js +182 -0
  148. package/dist/Form/Form.MonetaryInput.js +164 -17
  149. package/dist/Form/Form.PickerField.d.ts +31 -0
  150. package/dist/Form/Form.PickerField.js +562 -0
  151. package/dist/Form/Form.PinInput.js +150 -15
  152. package/dist/Form/Form.QuantitySelector.js +229 -25
  153. package/dist/Form/Form.RadioButton.js +132 -24
  154. package/dist/Form/Form.Select.js +487 -56
  155. package/dist/Form/Form.Slider.js +133 -10
  156. package/dist/Form/Form.Switch.js +99 -4
  157. package/dist/Form/index.d.ts +11 -6
  158. package/dist/Form/index.js +26 -27
  159. package/dist/Form/input-text.d.ts +7 -0
  160. package/dist/Form/input-text.js +18 -0
  161. package/dist/Navigation/Navigation.AppBar.d.ts +3 -4
  162. package/dist/Navigation/Navigation.AppBar.js +535 -99
  163. package/dist/Navigation/Navigation.BottomNav.js +363 -98
  164. package/dist/Navigation/Navigation.CollapsingHeader.d.ts +28 -13
  165. package/dist/Navigation/Navigation.CollapsingHeader.js +369 -36
  166. package/dist/Navigation/Navigation.FloatingBar.js +71 -11
  167. package/dist/Navigation/Navigation.Menu.js +309 -95
  168. package/dist/Navigation/Navigation.MenuSection.js +80 -11
  169. package/dist/Navigation/Navigation.RowItem.d.ts +4 -2
  170. package/dist/Navigation/Navigation.RowItem.js +93 -8
  171. package/dist/Navigation/Navigation.Search.js +241 -27
  172. package/dist/Navigation/Navigation.SearchBar.d.ts +7 -1
  173. package/dist/Navigation/Navigation.SearchBar.js +218 -29
  174. package/dist/Navigation/Navigation.SearchSuggestions.js +77 -3
  175. package/dist/Navigation/Navigation.SegmentedControl.js +152 -14
  176. package/dist/Navigation/Navigation.Steps.js +105 -11
  177. package/dist/Navigation/Navigation.Tabs.js +449 -41
  178. package/dist/Navigation/index.d.ts +9 -4
  179. package/dist/Navigation/index.js +13 -13
  180. package/dist/Typography/Typography.Heading.js +33 -3
  181. package/dist/Typography/Typography.SelectableText.js +95 -7
  182. package/dist/Typography/Typography.Text.d.ts +4 -2
  183. package/dist/Typography/Typography.Text.js +217 -7
  184. package/dist/Typography/index.js +3 -3
  185. package/dist/branding.js +29 -13
  186. package/dist/icons/AddItemIcon.js +76 -2
  187. package/dist/icons/ArrangeCircle.js +82 -2
  188. package/dist/icons/ArrowDownIcon.js +63 -3
  189. package/dist/icons/ArrowUpIcon.js +63 -3
  190. package/dist/icons/BoxIcon.js +64 -2
  191. package/dist/icons/BoxTimeIcon.js +63 -2
  192. package/dist/icons/CalendarIcon.js +145 -2
  193. package/dist/icons/CardIcon.js +80 -2
  194. package/dist/icons/CashierIcon.js +39 -2
  195. package/dist/icons/CreditIcon.js +76 -3
  196. package/dist/icons/DuoIcon.js +75 -2
  197. package/dist/icons/HomeIcon.js +39 -2
  198. package/dist/icons/HomeIconOutlined.js +53 -2
  199. package/dist/icons/LogoIcon.js +87 -2
  200. package/dist/icons/MoneyReceiveIcon.js +86 -2
  201. package/dist/icons/PinIcon.js +39 -2
  202. package/dist/icons/ProfileIcon.js +47 -2
  203. package/dist/icons/SettingsIcon.js +114 -2
  204. package/dist/icons/SinpeIcon.js +60 -2
  205. package/dist/icons/ToggleOffIcon.js +53 -2
  206. package/dist/icons/WalletMoneyIcon.js +81 -2
  207. package/dist/index.d.ts +1 -0
  208. package/dist/index.js +8 -2
  209. package/dist/layouts/AuthContainer.d.ts +4 -5
  210. package/dist/layouts/AuthContainer.js +231 -7
  211. package/dist/layouts/BottomInset.js +4 -1
  212. package/dist/layouts/Container.d.ts +2 -2
  213. package/dist/layouts/Container.js +45 -3
  214. package/dist/layouts/GradientContainer.js +37 -5
  215. package/dist/layouts/PlainLayout.js +19 -3
  216. package/dist/layouts/ScrollContainer.d.ts +14 -9
  217. package/dist/layouts/ScrollContainer.js +125 -4
  218. package/dist/layouts/edges.d.ts +2 -0
  219. package/dist/layouts/edges.js +1 -0
  220. package/dist/primitives/AspectRatio.js +75 -3
  221. package/dist/primitives/Box.js +45 -3
  222. package/dist/primitives/Pressable.js +95 -5
  223. package/dist/primitives/Row.js +84 -13
  224. package/dist/primitives/Spacer.js +42 -5
  225. package/dist/primitives/Stack.js +66 -7
  226. package/dist/primitives/index.js +1 -1
  227. package/dist/theme/active.js +20 -18
  228. package/dist/theme/build.js +118 -87
  229. package/dist/theme/color.js +87 -87
  230. package/dist/theme/components/ThemedActivityIndicator.d.ts +2 -15
  231. package/dist/theme/components/ThemedActivityIndicator.js +35 -3
  232. package/dist/theme/components/index.js +1 -0
  233. package/dist/theme/contrast.js +32 -33
  234. package/dist/theme/css-vars.js +71 -75
  235. package/dist/theme/dark.js +116 -97
  236. package/dist/theme/default.js +116 -97
  237. package/dist/theme/define.js +16 -12
  238. package/dist/theme/index.d.ts +1 -0
  239. package/dist/theme/index.js +7 -6
  240. package/dist/theme/on-dark-surface.d.ts +12 -0
  241. package/dist/theme/on-dark-surface.js +13 -0
  242. package/dist/theme/theme.js +1 -0
  243. package/dist/theme/tw.js +3 -1
  244. package/dist/theme/types.js +0 -18
  245. package/dist/theme/typography.d.ts +1 -1
  246. package/dist/theme/typography.js +337 -303
  247. package/dist/theme/useTheme.js +12 -3
  248. package/dist/theme/useThemeVars.d.ts +9 -0
  249. package/dist/theme/useThemeVars.js +23 -0
  250. package/dist/theme/validate.js +175 -166
  251. package/dist/tokens/index.js +1 -1
  252. package/dist/tokens/motion.js +30 -13
  253. package/dist/utils/async.d.ts +14 -0
  254. package/dist/utils/async.js +22 -0
  255. package/dist/utils/criteria.js +66 -85
  256. package/dist/utils/date.d.ts +8 -2
  257. package/dist/utils/date.js +63 -50
  258. package/dist/utils/image.js +8 -8
  259. package/dist/utils/intl.d.ts +1 -0
  260. package/dist/utils/intl.js +13 -0
  261. package/dist/utils/keys.js +3 -5
  262. package/dist/utils/monetary.d.ts +1 -0
  263. package/dist/utils/monetary.js +28 -24
  264. package/dist/utils/progress.js +2 -3
  265. package/dist/utils/quantity.js +25 -26
  266. package/dist/utils/reorder.js +11 -20
  267. package/dist/utils/search.d.ts +4 -0
  268. package/dist/utils/search.js +12 -0
  269. package/dist/utils/serializer.js +38 -38
  270. package/dist/utils/useReducedMotion.js +32 -30
  271. package/dist/views/AppSplashView.js +117 -3
  272. package/dist/views/AuthFormView.d.ts +4 -5
  273. package/dist/views/AuthFormView.js +119 -11
  274. package/dist/views/FormViewV2.context.js +75 -23
  275. package/dist/views/FormViewV2.d.ts +4 -5
  276. package/dist/views/FormViewV2.js +658 -92
  277. package/dist/views/ListViewV2.context.js +91 -47
  278. package/dist/views/ListViewV2.d.ts +84 -43
  279. package/dist/views/ListViewV2.js +1350 -200
  280. package/dist/views/Wizard/Wizard.context.js +248 -84
  281. package/dist/views/Wizard/Wizard.js +260 -67
  282. package/dist/views/types/IListView.js +34 -31
  283. package/dist/widgets/CollectionOptions.js +557 -138
  284. package/dist/widgets/FilterBar.js +159 -7
  285. package/dist/widgets/FilterBuilder.js +375 -102
  286. package/dist/widgets/JSONViewer.js +275 -129
  287. package/dist/widgets/PromoBanner.js +336 -42
  288. package/dist/widgets/PromoModal.d.ts +2 -2
  289. package/dist/widgets/PromoModal.js +389 -62
  290. package/dist/widgets/QueryChoice.js +150 -8
  291. package/dist/widgets/QuickActions.js +120 -31
  292. package/dist/widgets/ReorderableList.js +399 -128
  293. package/dist/widgets/TimeZoneSelectorModal.js +458 -51
  294. package/dist/widgets/index.js +3 -3
  295. package/package.json +7 -2
  296. package/tailwind.preset.js +7 -5
  297. package/dist/Form/Form.InputField.d.ts +0 -10
  298. package/dist/Form/Form.InputField.js +0 -38
  299. package/dist/Form/Form.KeyboardToolbar.d.ts +0 -22
  300. package/dist/Form/Form.KeyboardToolbar.js +0 -66
  301. package/dist/Form/Form.PasswordInput.d.ts +0 -9
  302. package/dist/Form/Form.PasswordInput.js +0 -17
  303. package/dist/Form/Form.TextInput.d.ts +0 -8
  304. package/dist/Form/Form.TextInput.js +0 -8
  305. package/dist/primitives/BaseButton.d.ts +0 -150
  306. package/dist/primitives/BaseButton.js +0 -229
  307. package/dist/utils/useSheetTranslation.d.ts +0 -5
  308. package/dist/utils/useSheetTranslation.js +0 -23
package/dist/index.js CHANGED
@@ -6,24 +6,30 @@ export { Feedback } from "./Feedback/index.js";
6
6
  export { Form } from "./Form/index.js";
7
7
  export { Navigation } from "./Navigation/index.js";
8
8
  export { Typography } from "./Typography/index.js";
9
+
9
10
  // Primitives (NativeWind-based - Layout utilities)
10
11
  export { Box, Row, Stack } from "./primitives/index.js";
12
+
11
13
  // Branding (logo + brand mesh symbol, configurado una vez; Display.Logo y
12
14
  // Display.Pattern leen de acá como fallback)
13
- export { getBrandingLogo, getBrandingMesh, getBrandingMeshSize, setBranding, } from "./branding.js";
15
+ export { getBrandingLogo, getBrandingMesh, getBrandingMeshSize, setBranding } from "./branding.js";
16
+
14
17
  // Theme
15
18
  export { cn, tv } from "./theme/tw.js";
16
- export { appliedTextStyle, fontFamilies, fontSizes, fontWeights, letterSpacing, lineHeights, typographyVariants, } from "./theme/typography.js";
19
+ export { appliedTextStyle, fontFamilies, fontSizes, fontWeights, letterSpacing, lineHeights, typographyVariants } from "./theme/typography.js";
20
+
17
21
  // Layouts
18
22
  export { BottomInsetContext } from "./layouts/BottomInset.js";
19
23
  export { default as Container } from "./layouts/Container.js";
20
24
  export { default as GradientContainer } from "./layouts/GradientContainer.js";
21
25
  export { default as PlainLayout } from "./layouts/PlainLayout.js";
22
26
  export { default as ScrollContainer } from "./layouts/ScrollContainer.js";
27
+
23
28
  // Views
24
29
  export { default as AppSplashView } from "./views/AppSplashView.js";
25
30
  export { default as AuthFormView } from "./views/AuthFormView.js";
26
31
  export { default as FormViewV2 } from "./views/FormViewV2.js";
27
32
  export { default as ListViewV2 } from "./views/ListViewV2.js";
33
+
28
34
  // Widgets
29
35
  export { default as JSONViewer } from "./widgets/JSONViewer.js";
@@ -1,20 +1,19 @@
1
1
  import { type KeyboardFormProps } from "../Form/Form.KeyboardForm.js";
2
+ import type { SafeAreaEdge } from "./edges.js";
2
3
  import type { AppBarBackground } from "../Navigation/Navigation.AppBar.js";
3
4
  import { ReactNode } from "react";
4
- import { type Edge } from "react-native-safe-area-context";
5
5
  interface AuthContainerProps {
6
6
  header: ReactNode;
7
7
  children: ReactNode;
8
8
  onBackPress?: () => void;
9
9
  className?: string;
10
- edges?: Edge[];
11
- keyboardToolbar?: boolean;
12
- keyboardFormProps?: Omit<KeyboardFormProps, "children" | "toolbar">;
10
+ edges?: SafeAreaEdge[];
11
+ keyboardFormProps?: Omit<KeyboardFormProps, "children">;
13
12
  /** Gradient + optional texture surface for the header area. Defaults to the `brand`
14
13
  * preset. Set `background.pattern` to opt-in a texture (`dots` / `grid` /
15
14
  * `diagonals`); compose `<Display.Pattern kind="mesh" />` outside if you want the
16
15
  * brand symbol. */
17
16
  background?: AppBarBackground;
18
17
  }
19
- declare function AuthContainer({ header, children, onBackPress, background, className, edges, keyboardToolbar, keyboardFormProps, }: AuthContainerProps): import("react").JSX.Element;
18
+ declare function AuthContainer({ header, children, onBackPress, background, className, edges, keyboardFormProps, }: AuthContainerProps): import("react").JSX.Element;
20
19
  export default AuthContainer;
@@ -1,14 +1,238 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "nativewind/jsx-runtime";
2
- import { Display } from "../Display/index.js";
1
+ import { c as _c } from "react/compiler-runtime";
2
+ import IconButton from "../Actions/Actions.IconButton.js";
3
3
  import GradientSurface from "../Display/Display.GradientSurface.js";
4
4
  import { Pattern } from "../Display/Display.Pattern.js";
5
5
  import KeyboardForm from "../Form/Form.KeyboardForm.js";
6
6
  import { useTheme } from "../theme/index.js";
7
+ import { ON_DARK_SURFACE } from "../theme/on-dark-surface.js";
7
8
  import { cn } from "../theme/tw.js";
8
- import { Keyboard, TouchableOpacity, TouchableWithoutFeedback, View } from "react-native";
9
- import { SafeAreaView } from "react-native-safe-area-context";
10
- function AuthContainer({ header, children, onBackPress, background, className, edges = ["top", "bottom", "left", "right"], keyboardToolbar = true, keyboardFormProps, }) {
11
- const theme = useTheme();
12
- return (_jsxs(GradientSurface, { className: cn("flex-1", className), colors: background?.colors, end: background?.end ?? (background?.colors ? { x: 0, y: 1 } : undefined), preset: background?.surface ?? "brand", radius: "none", start: background?.start ?? (background?.colors ? { x: 0, y: 0 } : undefined), style: { flex: 1 }, children: [background?.pattern ? (_jsx(Pattern, { color: background.patternColor ?? "#FFFFFF", kind: background.pattern, opacity: background.patternOpacity ?? 0.18 })) : null, _jsx(SafeAreaView, { className: "flex-1", edges: edges, children: _jsxs(View, { className: "flex-1", children: [_jsx(TouchableWithoutFeedback, { onPress: Keyboard.dismiss, children: _jsxs(View, { className: "justify-center items-center relative", style: { height: "30%" }, children: [onBackPress && (_jsx(TouchableOpacity, { className: "absolute top-4 left-4 p-2 z-[1]", onPress: onBackPress, children: _jsx(Display.Icon, { color: background?.textColor ?? theme.text.inverse, name: "back", size: 24 }) })), header] }) }), _jsx(View, { className: "flex-1 bg-bg-card rounded-t-3xl shadow-lg", children: _jsx(KeyboardForm, { bottomOffset: keyboardToolbar ? undefined : 50, bounces: false, className: "flex-1", contentContainerClassName: "flex-grow pb-10", keyboardShouldPersistTaps: "handled", showsVerticalScrollIndicator: false, ...keyboardFormProps, toolbar: keyboardToolbar, children: _jsx(View, { className: "p-4", children: children }) }) })] }) })] }));
9
+ import { Keyboard, TouchableWithoutFeedback, View } from "react-native";
10
+ import { SafeAreaView, useSafeAreaInsets } from "react-native-safe-area-context";
11
+ import { jsx as _jsx, jsxs as _jsxs } from "nativewind/jsx-runtime";
12
+ function AuthContainer(t0) {
13
+ const $ = _c(45);
14
+ const {
15
+ header,
16
+ children,
17
+ onBackPress,
18
+ background,
19
+ className,
20
+ edges: t1,
21
+ keyboardFormProps
22
+ } = t0;
23
+ let t2;
24
+ if ($[0] !== t1) {
25
+ t2 = t1 === undefined ? ["top", "bottom", "left", "right"] : t1;
26
+ $[0] = t1;
27
+ $[1] = t2;
28
+ } else {
29
+ t2 = $[1];
30
+ }
31
+ const edges = t2;
32
+ const theme = useTheme();
33
+ const insets = useSafeAreaInsets();
34
+ const reservesBottom = edges.includes("bottom");
35
+ let t3;
36
+ if ($[2] !== edges) {
37
+ t3 = edges.filter(_temp);
38
+ $[2] = edges;
39
+ $[3] = t3;
40
+ } else {
41
+ t3 = $[3];
42
+ }
43
+ const outerEdges = t3;
44
+ let t4;
45
+ if ($[4] !== className) {
46
+ t4 = cn("flex-1", className);
47
+ $[4] = className;
48
+ $[5] = t4;
49
+ } else {
50
+ t4 = $[5];
51
+ }
52
+ const t5 = background?.colors;
53
+ let t6;
54
+ if ($[6] !== background?.colors || $[7] !== background?.end) {
55
+ t6 = background?.end ?? (background?.colors ? {
56
+ x: 0,
57
+ y: 1
58
+ } : undefined);
59
+ $[6] = background?.colors;
60
+ $[7] = background?.end;
61
+ $[8] = t6;
62
+ } else {
63
+ t6 = $[8];
64
+ }
65
+ const t7 = background?.surface ?? "brand";
66
+ let t8;
67
+ if ($[9] !== background?.colors || $[10] !== background?.start) {
68
+ t8 = background?.start ?? (background?.colors ? {
69
+ x: 0,
70
+ y: 0
71
+ } : undefined);
72
+ $[9] = background?.colors;
73
+ $[10] = background?.start;
74
+ $[11] = t8;
75
+ } else {
76
+ t8 = $[11];
77
+ }
78
+ let t9;
79
+ if ($[12] === Symbol.for("react.memo_cache_sentinel")) {
80
+ t9 = {
81
+ flex: 1
82
+ };
83
+ $[12] = t9;
84
+ } else {
85
+ t9 = $[12];
86
+ }
87
+ let t10;
88
+ if ($[13] !== background) {
89
+ t10 = background?.pattern ? _jsx(Pattern, {
90
+ color: background.patternColor ?? ON_DARK_SURFACE.ink,
91
+ kind: background.pattern,
92
+ opacity: background.patternOpacity ?? 0.18
93
+ }) : null;
94
+ $[13] = background;
95
+ $[14] = t10;
96
+ } else {
97
+ t10 = $[14];
98
+ }
99
+ let t11;
100
+ if ($[15] === Symbol.for("react.memo_cache_sentinel")) {
101
+ t11 = {
102
+ minHeight: "28%"
103
+ };
104
+ $[15] = t11;
105
+ } else {
106
+ t11 = $[15];
107
+ }
108
+ let t12;
109
+ if ($[16] !== background?.textColor || $[17] !== onBackPress || $[18] !== theme) {
110
+ t12 = onBackPress && _jsx(IconButton, {
111
+ accessibilityLabel: "Volver",
112
+ className: "absolute top-2 left-2 z-[1]",
113
+ icon: "back",
114
+ iconColor: background?.textColor ?? theme.text.inverse,
115
+ onPress: onBackPress,
116
+ size: "large"
117
+ });
118
+ $[16] = background?.textColor;
119
+ $[17] = onBackPress;
120
+ $[18] = theme;
121
+ $[19] = t12;
122
+ } else {
123
+ t12 = $[19];
124
+ }
125
+ let t13;
126
+ if ($[20] !== header || $[21] !== t12) {
127
+ t13 = _jsx(TouchableWithoutFeedback, {
128
+ accessible: false,
129
+ onPress: Keyboard.dismiss,
130
+ children: _jsxs(View, {
131
+ className: "items-center justify-end px-6 pt-12 pb-14 relative",
132
+ style: t11,
133
+ children: [t12, header]
134
+ })
135
+ });
136
+ $[20] = header;
137
+ $[21] = t12;
138
+ $[22] = t13;
139
+ } else {
140
+ t13 = $[22];
141
+ }
142
+ const t14 = (reservesBottom ? insets.bottom : 0) + 24;
143
+ let t15;
144
+ if ($[23] !== t14) {
145
+ t15 = {
146
+ flexGrow: 1,
147
+ paddingBottom: t14
148
+ };
149
+ $[23] = t14;
150
+ $[24] = t15;
151
+ } else {
152
+ t15 = $[24];
153
+ }
154
+ let t16;
155
+ if ($[25] !== children) {
156
+ t16 = _jsx(View, {
157
+ className: "px-6 pt-8",
158
+ children: children
159
+ });
160
+ $[25] = children;
161
+ $[26] = t16;
162
+ } else {
163
+ t16 = $[26];
164
+ }
165
+ let t17;
166
+ if ($[27] !== keyboardFormProps || $[28] !== t15 || $[29] !== t16) {
167
+ t17 = _jsx(View, {
168
+ className: "flex-1 -mt-8 bg-bg-card rounded-t-[32px] shadow-lg",
169
+ children: _jsx(KeyboardForm, {
170
+ bounces: false,
171
+ contentContainerStyle: t15,
172
+ keyboardShouldPersistTaps: "handled",
173
+ showsVerticalScrollIndicator: false,
174
+ ...keyboardFormProps,
175
+ children: t16
176
+ })
177
+ });
178
+ $[27] = keyboardFormProps;
179
+ $[28] = t15;
180
+ $[29] = t16;
181
+ $[30] = t17;
182
+ } else {
183
+ t17 = $[30];
184
+ }
185
+ let t18;
186
+ if ($[31] !== t13 || $[32] !== t17) {
187
+ t18 = _jsxs(View, {
188
+ className: "flex-1",
189
+ children: [t13, t17]
190
+ });
191
+ $[31] = t13;
192
+ $[32] = t17;
193
+ $[33] = t18;
194
+ } else {
195
+ t18 = $[33];
196
+ }
197
+ let t19;
198
+ if ($[34] !== outerEdges || $[35] !== t18) {
199
+ t19 = _jsx(SafeAreaView, {
200
+ className: "flex-1",
201
+ edges: outerEdges,
202
+ children: t18
203
+ });
204
+ $[34] = outerEdges;
205
+ $[35] = t18;
206
+ $[36] = t19;
207
+ } else {
208
+ t19 = $[36];
209
+ }
210
+ let t20;
211
+ if ($[37] !== t10 || $[38] !== t19 || $[39] !== t4 || $[40] !== t5 || $[41] !== t6 || $[42] !== t7 || $[43] !== t8) {
212
+ t20 = _jsxs(GradientSurface, {
213
+ className: t4,
214
+ colors: t5,
215
+ end: t6,
216
+ preset: t7,
217
+ radius: "none",
218
+ start: t8,
219
+ style: t9,
220
+ children: [t10, t19]
221
+ });
222
+ $[37] = t10;
223
+ $[38] = t19;
224
+ $[39] = t4;
225
+ $[40] = t5;
226
+ $[41] = t6;
227
+ $[42] = t7;
228
+ $[43] = t8;
229
+ $[44] = t20;
230
+ } else {
231
+ t20 = $[44];
232
+ }
233
+ return t20;
234
+ }
235
+ function _temp(edge) {
236
+ return edge !== "bottom";
13
237
  }
14
238
  export default AuthContainer;
@@ -1,4 +1,5 @@
1
1
  import { createContext, useContext } from "react";
2
+
2
3
  /**
3
4
  * Extra bottom inset for scroll views, provided by the host app when a floating
4
5
  * element (e.g. position:absolute tab bar) sits above the native safe area.
@@ -14,4 +15,6 @@ import { createContext, useContext } from "react";
14
15
  * The native safe-area inset is already handled by Container (SafeAreaView edges=["bottom"]).
15
16
  */
16
17
  export const BottomInsetContext = createContext(0);
17
- export const useBottomInset = () => useContext(BottomInsetContext);
18
+ export const useBottomInset = () => {
19
+ return useContext(BottomInsetContext);
20
+ };
@@ -1,10 +1,10 @@
1
+ import type { SafeAreaEdge } from "./edges.js";
1
2
  import { FC, ReactNode } from "react";
2
3
  import { ViewStyle } from "react-native";
3
- import { Edge } from "react-native-safe-area-context";
4
4
  type ContainerProps = {
5
5
  children: ReactNode;
6
6
  style?: ViewStyle;
7
- edges?: Edge[];
7
+ edges?: SafeAreaEdge[];
8
8
  className?: string;
9
9
  };
10
10
  declare const Container: FC<ContainerProps>;
@@ -1,7 +1,49 @@
1
- import { jsx as _jsx } from "nativewind/jsx-runtime";
1
+ import { c as _c } from "react/compiler-runtime";
2
2
  import { cn } from "../theme/tw.js";
3
+ import React from "react";
3
4
  import { SafeAreaView } from "react-native-safe-area-context";
4
- const Container = ({ children, style, edges = ["left", "right"], className, }) => {
5
- return (_jsx(SafeAreaView, { className: cn("flex-1 bg-bg-page", className), edges: edges, style: style, children: children }));
5
+ import { jsx as _jsx } from "nativewind/jsx-runtime";
6
+ const Container = t0 => {
7
+ const $ = _c(9);
8
+ const {
9
+ children,
10
+ style,
11
+ edges: t1,
12
+ className
13
+ } = t0;
14
+ let t2;
15
+ if ($[0] !== t1) {
16
+ t2 = t1 === undefined ? ["left", "right"] : t1;
17
+ $[0] = t1;
18
+ $[1] = t2;
19
+ } else {
20
+ t2 = $[1];
21
+ }
22
+ const edges = t2;
23
+ let t3;
24
+ if ($[2] !== className) {
25
+ t3 = cn("flex-1 bg-bg-page", className);
26
+ $[2] = className;
27
+ $[3] = t3;
28
+ } else {
29
+ t3 = $[3];
30
+ }
31
+ let t4;
32
+ if ($[4] !== children || $[5] !== edges || $[6] !== style || $[7] !== t3) {
33
+ t4 = _jsx(SafeAreaView, {
34
+ className: t3,
35
+ edges: edges,
36
+ style: style,
37
+ children: children
38
+ });
39
+ $[4] = children;
40
+ $[5] = edges;
41
+ $[6] = style;
42
+ $[7] = t3;
43
+ $[8] = t4;
44
+ } else {
45
+ t4 = $[8];
46
+ }
47
+ return t4;
6
48
  };
7
49
  export default Container;
@@ -1,8 +1,40 @@
1
- import { jsx as _jsx } from "nativewind/jsx-runtime";
2
- import { theme } from "../theme/index.js";
1
+ import { c as _c } from "react/compiler-runtime";
2
+ import { useTheme } from "../theme/index.js";
3
3
  import { LinearGradient } from "expo-linear-gradient";
4
- const GradientContainer = ({ children, style, className }) => {
5
- const gradientColors = theme.gradient.primary;
6
- return (_jsx(LinearGradient, { className: className, colors: [...gradientColors], style: style, children: children }));
4
+ import { jsx as _jsx } from "nativewind/jsx-runtime";
5
+ const GradientContainer = t0 => {
6
+ const $ = _c(7);
7
+ const {
8
+ children,
9
+ style,
10
+ className
11
+ } = t0;
12
+ const theme = useTheme();
13
+ const gradientColors = theme.gradient.primary;
14
+ let t1;
15
+ if ($[0] !== gradientColors) {
16
+ t1 = [...gradientColors];
17
+ $[0] = gradientColors;
18
+ $[1] = t1;
19
+ } else {
20
+ t1 = $[1];
21
+ }
22
+ let t2;
23
+ if ($[2] !== children || $[3] !== className || $[4] !== style || $[5] !== t1) {
24
+ t2 = _jsx(LinearGradient, {
25
+ className: className,
26
+ colors: t1,
27
+ style: style,
28
+ children: children
29
+ });
30
+ $[2] = children;
31
+ $[3] = className;
32
+ $[4] = style;
33
+ $[5] = t1;
34
+ $[6] = t2;
35
+ } else {
36
+ t2 = $[6];
37
+ }
38
+ return t2;
7
39
  };
8
40
  export default GradientContainer;
@@ -1,8 +1,24 @@
1
- import { jsx as _jsx } from "nativewind/jsx-runtime";
1
+ import { c as _c } from "react/compiler-runtime";
2
2
  import { memo } from "react";
3
3
  import { View } from "react-native";
4
- const PlainLayout = memo(({ children }) => {
5
- return _jsx(View, { className: "flex-1", children: children });
4
+ import { jsx as _jsx } from "nativewind/jsx-runtime";
5
+ const PlainLayout = memo(t0 => {
6
+ const $ = _c(2);
7
+ const {
8
+ children
9
+ } = t0;
10
+ let t1;
11
+ if ($[0] !== children) {
12
+ t1 = _jsx(View, {
13
+ className: "flex-1",
14
+ children: children
15
+ });
16
+ $[0] = children;
17
+ $[1] = t1;
18
+ } else {
19
+ t1 = $[1];
20
+ }
21
+ return t1;
6
22
  });
7
23
  PlainLayout.displayName = "PlainLayout";
8
24
  export default PlainLayout;
@@ -1,12 +1,17 @@
1
- import React, { ReactNode } from "react";
2
- import { type StyleProp, type ViewStyle } from "react-native";
3
- import { type KeyboardAwareScrollViewProps } from "react-native-keyboard-controller";
4
- import { type Edge } from "react-native-safe-area-context";
5
- type ScrollContainerProps = Omit<KeyboardAwareScrollViewProps, "children"> & {
1
+ import { type KeyboardFormProps } from "../Form/Form.KeyboardForm.js";
2
+ import type { SafeAreaEdge } from "./edges.js";
3
+ import type { ReactNode } from "react";
4
+ export interface ScrollContainerProps extends Omit<KeyboardFormProps, "children" | "className"> {
6
5
  children: ReactNode;
7
- contentContainerStyle?: StyleProp<ViewStyle>;
6
+ /** Classes of the safe-area surface. */
8
7
  className?: string;
9
- edges?: Edge[];
10
- };
11
- declare function ScrollContainer({ children, contentContainerStyle, className, edges, bottomOffset, style, ...props }: ScrollContainerProps): React.JSX.Element;
8
+ /** Edges this container reserves. Lateral by default: the header owns top. */
9
+ edges?: SafeAreaEdge[];
10
+ }
11
+ /**
12
+ * Scrollable page surface. The scroll is the DS `KeyboardForm`, so the space kept
13
+ * above the keyboard and the toolbar group are the same as in every form, and iOS
14
+ * keeps adjusting the content inset natively (large titles, NativeTabs).
15
+ */
16
+ declare function ScrollContainer({ children, className, edges, contentContainerStyle, contentInsetAdjustmentBehavior, showsVerticalScrollIndicator, ...form }: ScrollContainerProps): import("react").JSX.Element;
12
17
  export default ScrollContainer;
@@ -1,9 +1,130 @@
1
- import { jsx as _jsx } from "nativewind/jsx-runtime";
1
+ import { c as _c } from "react/compiler-runtime";
2
+ import KeyboardForm from "../Form/Form.KeyboardForm.js";
2
3
  import { cn } from "../theme/tw.js";
3
4
  import { View } from "react-native";
4
- import { KeyboardAwareScrollView, } from "react-native-keyboard-controller";
5
5
  import { SafeAreaView } from "react-native-safe-area-context";
6
- function ScrollContainer({ children, contentContainerStyle = {}, className, edges = ["left", "right"], bottomOffset = 72, style, ...props }) {
7
- return (_jsx(SafeAreaView, { className: cn("flex-1 bg-bg-card", className), edges: edges, children: _jsx(KeyboardAwareScrollView, { bottomOffset: bottomOffset, contentContainerStyle: [{ flexGrow: 1, padding: 16 }, contentContainerStyle], contentInsetAdjustmentBehavior: "automatic", keyboardShouldPersistTaps: "handled", showsVerticalScrollIndicator: false, style: [{ flex: 1 }, style], ...props, children: _jsx(View, { className: "flex-1", children: children }) }) }));
6
+ import { jsx as _jsx } from "nativewind/jsx-runtime";
7
+ /**
8
+ * Scrollable page surface. The scroll is the DS `KeyboardForm`, so the space kept
9
+ * above the keyboard and the toolbar group are the same as in every form, and iOS
10
+ * keeps adjusting the content inset natively (large titles, NativeTabs).
11
+ */
12
+ function ScrollContainer(t0) {
13
+ const $ = _c(27);
14
+ let children;
15
+ let className;
16
+ let contentContainerStyle;
17
+ let form;
18
+ let t1;
19
+ let t2;
20
+ let t3;
21
+ if ($[0] !== t0) {
22
+ ({
23
+ children,
24
+ className,
25
+ edges: t1,
26
+ contentContainerStyle,
27
+ contentInsetAdjustmentBehavior: t2,
28
+ showsVerticalScrollIndicator: t3,
29
+ ...form
30
+ } = t0);
31
+ $[0] = t0;
32
+ $[1] = children;
33
+ $[2] = className;
34
+ $[3] = contentContainerStyle;
35
+ $[4] = form;
36
+ $[5] = t1;
37
+ $[6] = t2;
38
+ $[7] = t3;
39
+ } else {
40
+ children = $[1];
41
+ className = $[2];
42
+ contentContainerStyle = $[3];
43
+ form = $[4];
44
+ t1 = $[5];
45
+ t2 = $[6];
46
+ t3 = $[7];
47
+ }
48
+ let t4;
49
+ if ($[8] !== t1) {
50
+ t4 = t1 === undefined ? ["left", "right"] : t1;
51
+ $[8] = t1;
52
+ $[9] = t4;
53
+ } else {
54
+ t4 = $[9];
55
+ }
56
+ const edges = t4;
57
+ const contentInsetAdjustmentBehavior = t2 === undefined ? "automatic" : t2;
58
+ const showsVerticalScrollIndicator = t3 === undefined ? false : t3;
59
+ let t5;
60
+ if ($[10] !== className) {
61
+ t5 = cn("flex-1 bg-bg-card", className);
62
+ $[10] = className;
63
+ $[11] = t5;
64
+ } else {
65
+ t5 = $[11];
66
+ }
67
+ let t6;
68
+ if ($[12] === Symbol.for("react.memo_cache_sentinel")) {
69
+ t6 = {
70
+ flexGrow: 1,
71
+ padding: 16
72
+ };
73
+ $[12] = t6;
74
+ } else {
75
+ t6 = $[12];
76
+ }
77
+ let t7;
78
+ if ($[13] !== contentContainerStyle) {
79
+ t7 = [t6, contentContainerStyle];
80
+ $[13] = contentContainerStyle;
81
+ $[14] = t7;
82
+ } else {
83
+ t7 = $[14];
84
+ }
85
+ let t8;
86
+ if ($[15] !== children) {
87
+ t8 = _jsx(View, {
88
+ className: "flex-1",
89
+ children: children
90
+ });
91
+ $[15] = children;
92
+ $[16] = t8;
93
+ } else {
94
+ t8 = $[16];
95
+ }
96
+ let t9;
97
+ if ($[17] !== contentInsetAdjustmentBehavior || $[18] !== form || $[19] !== showsVerticalScrollIndicator || $[20] !== t7 || $[21] !== t8) {
98
+ t9 = _jsx(KeyboardForm, {
99
+ contentContainerStyle: t7,
100
+ contentInsetAdjustmentBehavior: contentInsetAdjustmentBehavior,
101
+ showsVerticalScrollIndicator: showsVerticalScrollIndicator,
102
+ ...form,
103
+ children: t8
104
+ });
105
+ $[17] = contentInsetAdjustmentBehavior;
106
+ $[18] = form;
107
+ $[19] = showsVerticalScrollIndicator;
108
+ $[20] = t7;
109
+ $[21] = t8;
110
+ $[22] = t9;
111
+ } else {
112
+ t9 = $[22];
113
+ }
114
+ let t10;
115
+ if ($[23] !== edges || $[24] !== t5 || $[25] !== t9) {
116
+ t10 = _jsx(SafeAreaView, {
117
+ className: t5,
118
+ edges: edges,
119
+ children: t9
120
+ });
121
+ $[23] = edges;
122
+ $[24] = t5;
123
+ $[25] = t9;
124
+ $[26] = t10;
125
+ } else {
126
+ t10 = $[26];
127
+ }
128
+ return t10;
8
129
  }
9
130
  export default ScrollContainer;
@@ -0,0 +1,2 @@
1
+ /** A screen edge a container reserves for the safe area. */
2
+ export type SafeAreaEdge = "top" | "right" | "bottom" | "left";
@@ -0,0 +1 @@
1
+ export {};