@sincpro/mobile-ui 3.0.1 → 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 +6 -1
  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
@@ -1,67 +1,474 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "nativewind/jsx-runtime";
1
+ import { c as _c } from "react/compiler-runtime";
2
2
  import { FlashList } from "@shopify/flash-list";
3
- import Button from "../Actions/Actions.Button.js";
4
3
  import Sheet from "../Dialog/Dialog.Sheet.js";
4
+ import { DialogActions } from "../Dialog/dialog-actions.js";
5
5
  import Icon from "../Display/Display.Icon.js";
6
+ import { inputTextStyle } from "../Form/input-text.js";
6
7
  import Pressable from "../primitives/Pressable.js";
7
8
  import { useTheme } from "../theme/index.js";
8
9
  import { Typography } from "../Typography/index.js";
10
+ import { matchesSearch } from "../utils/search.js";
9
11
  import { useMemo, useState } from "react";
10
12
  import { TextInput, View } from "react-native";
13
+ import { jsx as _jsx, jsxs as _jsxs } from "nativewind/jsx-runtime";
11
14
  const TIMEZONES_LOCALES = {
12
- bolivia: { timezone: "America/La_Paz", locale: "es-BO" },
13
- costaRica: { timezone: "America/Costa_Rica", locale: "es-CR" },
14
- guatemala: { timezone: "America/Guatemala", locale: "es-GT" },
15
- argentina: { timezone: "America/Argentina/Buenos_Aires", locale: "es-AR" },
16
- peru: { timezone: "America/Lima", locale: "es-PE" },
17
- newYork: { timezone: "America/New_York", locale: "en-US" },
18
- japon: { timezone: "Asia/Tokyo", locale: "ja-JP" },
15
+ bolivia: {
16
+ timezone: "America/La_Paz",
17
+ locale: "es-BO"
18
+ },
19
+ costaRica: {
20
+ timezone: "America/Costa_Rica",
21
+ locale: "es-CR"
22
+ },
23
+ guatemala: {
24
+ timezone: "America/Guatemala",
25
+ locale: "es-GT"
26
+ },
27
+ argentina: {
28
+ timezone: "America/Argentina/Buenos_Aires",
29
+ locale: "es-AR"
30
+ },
31
+ peru: {
32
+ timezone: "America/Lima",
33
+ locale: "es-PE"
34
+ },
35
+ newYork: {
36
+ timezone: "America/New_York",
37
+ locale: "en-US"
38
+ },
39
+ japon: {
40
+ timezone: "Asia/Tokyo",
41
+ locale: "ja-JP"
42
+ }
19
43
  };
20
- function TimezoneRow({ item, isSelected, onSelect, }) {
21
- const theme = useTheme();
22
- return (_jsxs(Pressable, { accessibilityHint: item.locale, accessibilityLabel: item.label, accessibilityRole: "radio", accessibilityState: { checked: isSelected, selected: isSelected }, className: "flex-row items-center p-4 border-b border-border-light", onPress: onSelect, style: {
23
- minHeight: 64,
24
- backgroundColor: isSelected ? theme.container.info : theme.bg.card,
25
- }, testID: `timezone-${item.timezone}`, children: [_jsx(Icon, { color: isSelected ? theme.info : theme.text.secondary, name: "time", size: 24 }), _jsxs(View, { className: "ml-3 flex-1", children: [_jsx(Typography.Text, { semibold: true, children: item.label }), _jsx(Typography.Text, { className: "text-text-tertiary text-xs", children: item.locale })] }), isSelected && (_jsx(View, { className: "w-6 h-6 rounded-full bg-info items-center justify-center", children: _jsx(Icon, { color: theme.text.inverse, name: "check", size: 16 }) }))] }));
44
+ function TimezoneRow(t0) {
45
+ const $ = _c(26);
46
+ const {
47
+ item,
48
+ isSelected,
49
+ onSelect
50
+ } = t0;
51
+ const theme = useTheme();
52
+ let t1;
53
+ if ($[0] !== isSelected) {
54
+ t1 = {
55
+ checked: isSelected,
56
+ selected: isSelected
57
+ };
58
+ $[0] = isSelected;
59
+ $[1] = t1;
60
+ } else {
61
+ t1 = $[1];
62
+ }
63
+ const t2 = isSelected ? theme.container.info : theme.bg.card;
64
+ let t3;
65
+ if ($[2] !== t2) {
66
+ t3 = {
67
+ minHeight: 64,
68
+ backgroundColor: t2
69
+ };
70
+ $[2] = t2;
71
+ $[3] = t3;
72
+ } else {
73
+ t3 = $[3];
74
+ }
75
+ const t4 = `timezone-${item.timezone}`;
76
+ const t5 = isSelected ? theme.info : theme.text.secondary;
77
+ let t6;
78
+ if ($[4] !== t5) {
79
+ t6 = _jsx(Icon, {
80
+ color: t5,
81
+ name: "time",
82
+ size: 24
83
+ });
84
+ $[4] = t5;
85
+ $[5] = t6;
86
+ } else {
87
+ t6 = $[5];
88
+ }
89
+ let t7;
90
+ if ($[6] !== item.label) {
91
+ t7 = _jsx(Typography.Text, {
92
+ semibold: true,
93
+ children: item.label
94
+ });
95
+ $[6] = item.label;
96
+ $[7] = t7;
97
+ } else {
98
+ t7 = $[7];
99
+ }
100
+ let t8;
101
+ if ($[8] !== item.locale) {
102
+ t8 = _jsx(Typography.Text, {
103
+ className: "text-text-tertiary",
104
+ children: item.locale
105
+ });
106
+ $[8] = item.locale;
107
+ $[9] = t8;
108
+ } else {
109
+ t8 = $[9];
110
+ }
111
+ let t9;
112
+ if ($[10] !== t7 || $[11] !== t8) {
113
+ t9 = _jsxs(View, {
114
+ className: "ml-3 flex-1",
115
+ children: [t7, t8]
116
+ });
117
+ $[10] = t7;
118
+ $[11] = t8;
119
+ $[12] = t9;
120
+ } else {
121
+ t9 = $[12];
122
+ }
123
+ let t10;
124
+ if ($[13] !== isSelected || $[14] !== theme.text) {
125
+ t10 = isSelected && _jsx(View, {
126
+ className: "w-6 h-6 rounded-full bg-info items-center justify-center",
127
+ children: _jsx(Icon, {
128
+ color: theme.text.inverse,
129
+ name: "check",
130
+ size: 16
131
+ })
132
+ });
133
+ $[13] = isSelected;
134
+ $[14] = theme.text;
135
+ $[15] = t10;
136
+ } else {
137
+ t10 = $[15];
138
+ }
139
+ let t11;
140
+ if ($[16] !== item.label || $[17] !== item.locale || $[18] !== onSelect || $[19] !== t1 || $[20] !== t10 || $[21] !== t3 || $[22] !== t4 || $[23] !== t6 || $[24] !== t9) {
141
+ t11 = _jsxs(Pressable, {
142
+ accessibilityHint: item.locale,
143
+ accessibilityLabel: item.label,
144
+ accessibilityRole: "radio",
145
+ accessibilityState: t1,
146
+ className: "flex-row items-center p-4 border-b border-border-light",
147
+ onPress: onSelect,
148
+ style: t3,
149
+ testID: t4,
150
+ children: [t6, t9, t10]
151
+ });
152
+ $[16] = item.label;
153
+ $[17] = item.locale;
154
+ $[18] = onSelect;
155
+ $[19] = t1;
156
+ $[20] = t10;
157
+ $[21] = t3;
158
+ $[22] = t4;
159
+ $[23] = t6;
160
+ $[24] = t9;
161
+ $[25] = t11;
162
+ } else {
163
+ t11 = $[25];
164
+ }
165
+ return t11;
26
166
  }
27
167
  function EmptyState() {
28
- const theme = useTheme();
29
- return (_jsxs(View, { className: "p-8 items-center justify-center", style: { minHeight: 200 }, children: [_jsx(Icon, { color: theme.text.tertiary, name: "search-empty", size: 48 }), _jsx(Typography.Text, { className: "text-text-secondary text-center mt-4", children: "No se encontraron zonas horarias" })] }));
168
+ const $ = _c(6);
169
+ const theme = useTheme();
170
+ let t0;
171
+ if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
172
+ t0 = {
173
+ minHeight: 200
174
+ };
175
+ $[0] = t0;
176
+ } else {
177
+ t0 = $[0];
178
+ }
179
+ let t1;
180
+ if ($[1] !== theme.text.tertiary) {
181
+ t1 = _jsx(Icon, {
182
+ color: theme.text.tertiary,
183
+ name: "search-empty",
184
+ size: 48
185
+ });
186
+ $[1] = theme.text.tertiary;
187
+ $[2] = t1;
188
+ } else {
189
+ t1 = $[2];
190
+ }
191
+ let t2;
192
+ if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
193
+ t2 = _jsx(Typography.Text, {
194
+ className: "text-text-secondary text-center mt-4",
195
+ children: "No se encontraron zonas horarias"
196
+ });
197
+ $[3] = t2;
198
+ } else {
199
+ t2 = $[3];
200
+ }
201
+ let t3;
202
+ if ($[4] !== t1) {
203
+ t3 = _jsxs(View, {
204
+ className: "p-8 items-center justify-center",
205
+ style: t0,
206
+ children: [t1, t2]
207
+ });
208
+ $[4] = t1;
209
+ $[5] = t3;
210
+ } else {
211
+ t3 = $[5];
212
+ }
213
+ return t3;
30
214
  }
31
- function TimeZoneSelectorModal({ visible, onClose, onSelect, currentTimezone, }) {
32
- const theme = useTheme();
33
- const [query, setQuery] = useState("");
34
- const [selectedTimezone, setSelectedTimezone] = useState(currentTimezone || null);
35
- const timezoneList = useMemo(() => {
36
- return Object.values(TIMEZONES_LOCALES).map((tz) => ({
37
- ...tz,
38
- label: tz.timezone.replace(/_/g, " ").replace("America/", ""),
39
- }));
40
- }, []);
41
- const filteredTimezones = useMemo(() => {
42
- if (!query.trim())
43
- return timezoneList;
44
- const normalizedQuery = query
45
- .trim()
46
- .toLowerCase()
47
- .normalize("NFD")
48
- .replace(/[\u0300-\u036f]/g, "");
49
- return timezoneList.filter(({ label, timezone }) => {
50
- const normalizedLabel = label
51
- .toLowerCase()
52
- .normalize("NFD")
53
- .replace(/[\u0300-\u036f]/g, "");
54
- const normalizedTz = timezone.toLowerCase();
55
- return (normalizedLabel.includes(normalizedQuery) || normalizedTz.includes(normalizedQuery));
215
+ function TimeZoneSelectorModal(t0) {
216
+ const $ = _c(42);
217
+ const {
218
+ visible,
219
+ onClose,
220
+ onSelect,
221
+ currentTimezone
222
+ } = t0;
223
+ const theme = useTheme();
224
+ const [query, setQuery] = useState("");
225
+ const [selectedTimezone, setSelectedTimezone] = useState(currentTimezone || null);
226
+ let t1;
227
+ if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
228
+ t1 = Object.values(TIMEZONES_LOCALES).map(_temp);
229
+ $[0] = t1;
230
+ } else {
231
+ t1 = $[0];
232
+ }
233
+ const timezoneList = t1;
234
+ let t2;
235
+ if ($[1] !== query) {
236
+ t2 = timezoneList.filter(t3 => {
237
+ const {
238
+ label,
239
+ timezone
240
+ } = t3;
241
+ return matchesSearch(query, label, timezone);
242
+ });
243
+ $[1] = query;
244
+ $[2] = t2;
245
+ } else {
246
+ t2 = $[2];
247
+ }
248
+ const filteredTimezones = t2;
249
+ let t3;
250
+ if ($[3] !== onClose || $[4] !== onSelect || $[5] !== selectedTimezone) {
251
+ t3 = function handleConfirm() {
252
+ const selected = timezoneList.find(tz_0 => tz_0.timezone === selectedTimezone);
253
+ if (selected) {
254
+ onSelect({
255
+ timezone: selected.timezone,
256
+ locale: selected.locale
56
257
  });
57
- }, [query, timezoneList]);
58
- function handleConfirm() {
59
- const selected = timezoneList.find((tz) => tz.timezone === selectedTimezone);
60
- if (selected) {
61
- onSelect({ timezone: selected.timezone, locale: selected.locale });
62
- onClose();
63
- }
64
- }
65
- return (_jsx(Sheet, { footer: _jsxs(View, { className: "flex-row gap-3", children: [_jsx(View, { className: "flex-1", children: _jsx(Button, { onPress: onClose, title: "Cancelar", variant: "outline" }) }), selectedTimezone && (_jsx(View, { className: "flex-1", children: _jsx(Button, { onPress: handleConfirm, title: "Confirmar", variant: "primary" }) }))] }), onClose: onClose, scrollable: false, snapPoints: ["90%"], testID: "timezone-sheet", title: "Zona Horaria", visible: visible, children: _jsxs(View, { className: "flex-1", children: [_jsxs(View, { className: "px-5 pb-3", children: [_jsx(Typography.Text, { className: "text-text-secondary text-xs mb-3", children: "Selecciona tu zona horaria" }), _jsx(TextInput, { accessibilityLabel: "Buscar zona horaria", className: "bg-bg-muted px-4 py-3 rounded-xl", onChangeText: setQuery, placeholder: "Buscar zona horaria...", placeholderTextColor: theme.text.tertiary, selectionColor: theme.primary, style: { color: theme.text.primary }, testID: "timezone-search", underlineColorAndroid: "transparent", value: query })] }), _jsx(FlashList, { contentContainerStyle: { flexGrow: 1 }, data: filteredTimezones, extraData: selectedTimezone, keyboardDismissMode: "on-drag", keyboardShouldPersistTaps: "handled", keyExtractor: (item) => item.timezone, ListEmptyComponent: EmptyState, maintainVisibleContentPosition: { disabled: true }, renderItem: ({ item }) => (_jsx(TimezoneRow, { isSelected: selectedTimezone === item.timezone, item: item, onSelect: () => setSelectedTimezone(item.timezone) })), style: { flex: 1 }, testID: "timezone-list" })] }) }));
258
+ onClose();
259
+ }
260
+ };
261
+ $[3] = onClose;
262
+ $[4] = onSelect;
263
+ $[5] = selectedTimezone;
264
+ $[6] = t3;
265
+ } else {
266
+ t3 = $[6];
267
+ }
268
+ const handleConfirm = t3;
269
+ let t4;
270
+ if ($[7] !== onClose) {
271
+ t4 = {
272
+ onPress: onClose,
273
+ title: "Cancelar"
274
+ };
275
+ $[7] = onClose;
276
+ $[8] = t4;
277
+ } else {
278
+ t4 = $[8];
279
+ }
280
+ let t5;
281
+ if ($[9] !== handleConfirm || $[10] !== selectedTimezone) {
282
+ t5 = selectedTimezone ? {
283
+ onPress: handleConfirm,
284
+ title: "Confirmar"
285
+ } : undefined;
286
+ $[9] = handleConfirm;
287
+ $[10] = selectedTimezone;
288
+ $[11] = t5;
289
+ } else {
290
+ t5 = $[11];
291
+ }
292
+ let t6;
293
+ if ($[12] !== t4 || $[13] !== t5) {
294
+ t6 = _jsx(DialogActions, {
295
+ cancel: t4,
296
+ confirm: t5
297
+ });
298
+ $[12] = t4;
299
+ $[13] = t5;
300
+ $[14] = t6;
301
+ } else {
302
+ t6 = $[14];
303
+ }
304
+ let t7;
305
+ if ($[15] === Symbol.for("react.memo_cache_sentinel")) {
306
+ t7 = ["90%"];
307
+ $[15] = t7;
308
+ } else {
309
+ t7 = $[15];
310
+ }
311
+ let t8;
312
+ if ($[16] === Symbol.for("react.memo_cache_sentinel")) {
313
+ t8 = _jsx(Typography.Text, {
314
+ className: "text-text-secondary mb-3",
315
+ children: "Selecciona tu zona horaria"
316
+ });
317
+ $[16] = t8;
318
+ } else {
319
+ t8 = $[16];
320
+ }
321
+ const t9 = theme.text.tertiary;
322
+ const t10 = theme.primary;
323
+ let t11;
324
+ if ($[17] === Symbol.for("react.memo_cache_sentinel")) {
325
+ t11 = inputTextStyle();
326
+ $[17] = t11;
327
+ } else {
328
+ t11 = $[17];
329
+ }
330
+ let t12;
331
+ if ($[18] !== theme.text.primary) {
332
+ t12 = [t11, {
333
+ color: theme.text.primary
334
+ }];
335
+ $[18] = theme.text.primary;
336
+ $[19] = t12;
337
+ } else {
338
+ t12 = $[19];
339
+ }
340
+ let t13;
341
+ if ($[20] !== query || $[21] !== t12 || $[22] !== theme.primary || $[23] !== theme.text.tertiary) {
342
+ t13 = _jsxs(View, {
343
+ className: "px-5 pb-3",
344
+ children: [t8, _jsx(TextInput, {
345
+ accessibilityLabel: "Buscar zona horaria",
346
+ className: "bg-bg-muted px-4 py-3 rounded-xl",
347
+ onChangeText: setQuery,
348
+ placeholder: "Buscar zona horaria...",
349
+ placeholderTextColor: t9,
350
+ selectionColor: t10,
351
+ style: t12,
352
+ testID: "timezone-search",
353
+ underlineColorAndroid: "transparent",
354
+ value: query
355
+ })]
356
+ });
357
+ $[20] = query;
358
+ $[21] = t12;
359
+ $[22] = theme.primary;
360
+ $[23] = theme.text.tertiary;
361
+ $[24] = t13;
362
+ } else {
363
+ t13 = $[24];
364
+ }
365
+ let t14;
366
+ if ($[25] === Symbol.for("react.memo_cache_sentinel")) {
367
+ t14 = {
368
+ flexGrow: 1
369
+ };
370
+ $[25] = t14;
371
+ } else {
372
+ t14 = $[25];
373
+ }
374
+ let t15;
375
+ if ($[26] === Symbol.for("react.memo_cache_sentinel")) {
376
+ t15 = {
377
+ disabled: true
378
+ };
379
+ $[26] = t15;
380
+ } else {
381
+ t15 = $[26];
382
+ }
383
+ let t16;
384
+ if ($[27] !== selectedTimezone) {
385
+ t16 = t17 => {
386
+ const {
387
+ item: item_0
388
+ } = t17;
389
+ return _jsx(TimezoneRow, {
390
+ isSelected: selectedTimezone === item_0.timezone,
391
+ item: item_0,
392
+ onSelect: () => setSelectedTimezone(item_0.timezone)
393
+ });
394
+ };
395
+ $[27] = selectedTimezone;
396
+ $[28] = t16;
397
+ } else {
398
+ t16 = $[28];
399
+ }
400
+ let t17;
401
+ if ($[29] === Symbol.for("react.memo_cache_sentinel")) {
402
+ t17 = {
403
+ flex: 1
404
+ };
405
+ $[29] = t17;
406
+ } else {
407
+ t17 = $[29];
408
+ }
409
+ let t18;
410
+ if ($[30] !== filteredTimezones || $[31] !== selectedTimezone || $[32] !== t16) {
411
+ t18 = _jsx(FlashList, {
412
+ contentContainerStyle: t14,
413
+ data: filteredTimezones,
414
+ extraData: selectedTimezone,
415
+ keyboardDismissMode: "on-drag",
416
+ keyboardShouldPersistTaps: "handled",
417
+ keyExtractor: _temp2,
418
+ ListEmptyComponent: EmptyState,
419
+ maintainVisibleContentPosition: t15,
420
+ renderItem: t16,
421
+ style: t17,
422
+ testID: "timezone-list"
423
+ });
424
+ $[30] = filteredTimezones;
425
+ $[31] = selectedTimezone;
426
+ $[32] = t16;
427
+ $[33] = t18;
428
+ } else {
429
+ t18 = $[33];
430
+ }
431
+ let t19;
432
+ if ($[34] !== t13 || $[35] !== t18) {
433
+ t19 = _jsxs(View, {
434
+ className: "flex-1",
435
+ children: [t13, t18]
436
+ });
437
+ $[34] = t13;
438
+ $[35] = t18;
439
+ $[36] = t19;
440
+ } else {
441
+ t19 = $[36];
442
+ }
443
+ let t20;
444
+ if ($[37] !== onClose || $[38] !== t19 || $[39] !== t6 || $[40] !== visible) {
445
+ t20 = _jsx(Sheet, {
446
+ footer: t6,
447
+ onClose: onClose,
448
+ scrollable: false,
449
+ snapPoints: t7,
450
+ testID: "timezone-sheet",
451
+ title: "Zona Horaria",
452
+ visible: visible,
453
+ children: t19
454
+ });
455
+ $[37] = onClose;
456
+ $[38] = t19;
457
+ $[39] = t6;
458
+ $[40] = visible;
459
+ $[41] = t20;
460
+ } else {
461
+ t20 = $[41];
462
+ }
463
+ return t20;
464
+ }
465
+ function _temp2(item) {
466
+ return item.timezone;
467
+ }
468
+ function _temp(tz) {
469
+ return {
470
+ ...tz,
471
+ label: tz.timezone.replace(/_/g, " ").replace("America/", "")
472
+ };
66
473
  }
67
474
  export { TimeZoneSelectorModal };
@@ -1,6 +1,6 @@
1
- export { default as CollectionOptions, } from "./CollectionOptions.js";
2
- export { FilterBar, } from "./FilterBar.js";
3
- export { default as FilterBuilder, } from "./FilterBuilder.js";
1
+ export { default as CollectionOptions } from "./CollectionOptions.js";
2
+ export { FilterBar } from "./FilterBar.js";
3
+ export { default as FilterBuilder } from "./FilterBuilder.js";
4
4
  export { PromoBanner } from "./PromoBanner.js";
5
5
  export { PromoModal } from "./PromoModal.js";
6
6
  export { QuickActions } from "./QuickActions.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sincpro/mobile-ui",
3
- "version": "3.0.1",
3
+ "version": "3.1.0",
4
4
  "description": "Sincpro Mobile design system: generic, presentational React Native components (no domain logic)",
5
5
  "main": "expo/AppEntry.js",
6
6
  "types": "./dist/index.d.ts",
@@ -56,6 +56,7 @@
56
56
  "peerDependencies": {
57
57
  "@expo-google-fonts/ibm-plex-mono": ">=0.4.1 <1",
58
58
  "@expo-google-fonts/ibm-plex-sans": ">=0.4.1 <1",
59
+ "@expo-google-fonts/material-symbols": ">=0.4.1 <1",
59
60
  "@expo/ui": ">=58.0.27 <59",
60
61
  "@shopify/flash-list": ">=2.3.2 <3",
61
62
  "expo-checkbox": ">=58.0.2 <59",
@@ -92,6 +93,8 @@
92
93
  },
93
94
  "devDependencies": {
94
95
  "@babel/core": "^7.29.13",
96
+ "@babel/plugin-transform-react-jsx": "^7.29.7",
97
+ "@babel/preset-typescript": "^7.28.5",
95
98
  "@expo-google-fonts/ibm-plex-mono": "^0.4.1",
96
99
  "@expo-google-fonts/ibm-plex-sans": "^0.4.1",
97
100
  "@expo/ui": "~58.0.27",
@@ -107,6 +110,7 @@
107
110
  "@types/node": "^26.6.6",
108
111
  "@types/react": "~19.3.0",
109
112
  "babel-plugin-module-resolver": "^5.0.3",
113
+ "babel-plugin-react-compiler": "^1.0.0",
110
114
  "eslint": "^9.35.0",
111
115
  "eslint-config-expo": "~58.0.4",
112
116
  "eslint-config-prettier": "^10.1.8",
@@ -140,6 +144,7 @@
140
144
  "react-native-sortables": "^1.10.1",
141
145
  "react-native-svg": "15.16.0",
142
146
  "react-native-worklets": "0.13.0",
147
+ "reassure": "^1.6.1",
143
148
  "storybook": "10.6.6",
144
149
  "tailwindcss": "3.4.19",
145
150
  "test-renderer": "^1.0.0",
@@ -88,12 +88,14 @@ module.exports = {
88
88
  ring: "rgb(var(--ring) / <alpha-value>)",
89
89
  input: "rgb(var(--input) / <alpha-value>)",
90
90
  },
91
+ // The faces the DS loads (IBM Plex Sans). Components take fonts from Typography,
92
+ // which follows configureFonts; these classes only serve raw Text in host apps.
91
93
  fontFamily: {
92
- light: ["Montserrat_300Light"],
93
- regular: ["Montserrat_400Regular"],
94
- medium: ["Montserrat_500Medium"],
95
- semibold: ["Montserrat_600SemiBold"],
96
- extrabold: ["Montserrat_800ExtraBold"],
94
+ light: ["IBMPlexSans_300Light"],
95
+ regular: ["IBMPlexSans_400Regular"],
96
+ medium: ["IBMPlexSans_500Medium"],
97
+ semibold: ["IBMPlexSans_600SemiBold"],
98
+ extrabold: ["IBMPlexSans_700Bold"],
97
99
  },
98
100
  fontSize: {
99
101
  xs: ["10px", { lineHeight: "16px" }],
@@ -1,10 +0,0 @@
1
- import TextInputF from "./Form.TextInput.js";
2
- import React, { FC } from "react";
3
- import { TextInputProps } from "react-native";
4
- export interface InputFieldProps extends TextInputProps {
5
- label: string;
6
- inputProps: React.ComponentProps<typeof TextInputF>;
7
- error?: string;
8
- }
9
- declare const InputField: FC<InputFieldProps>;
10
- export default InputField;
@@ -1,38 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "nativewind/jsx-runtime";
2
- import TextInputF from "./Form.TextInput.js";
3
- import { tv } from "../theme/tw.js";
4
- import { Typography } from "../Typography/index.js";
5
- import { useState } from "react";
6
- import { View } from "react-native";
7
- const inputFieldBorder = tv({
8
- base: "rounded p-2",
9
- variants: {
10
- state: {
11
- error: "border-2 border-danger",
12
- focused: "border-2 border-border-focus",
13
- default: "border border-input",
14
- },
15
- },
16
- defaultVariants: { state: "default" },
17
- });
18
- const InputField = ({ label, inputProps, error }) => {
19
- const [isFocused, setIsFocused] = useState(false);
20
- const hasError = Boolean(error);
21
- const handleFocus = (e) => {
22
- setIsFocused(true);
23
- inputProps?.onFocus?.(e);
24
- };
25
- const handleBlur = (e) => {
26
- setIsFocused(false);
27
- inputProps?.onBlur?.(e);
28
- };
29
- const getState = () => {
30
- if (hasError)
31
- return "error";
32
- if (isFocused)
33
- return "focused";
34
- return "default";
35
- };
36
- return (_jsxs(View, { className: "mb-4", children: [_jsx(Typography.Text, { className: "mb-1", variant: "bodyLarge", children: label }), _jsx(TextInputF, { className: inputFieldBorder({ state: getState() }), ...inputProps, onBlur: handleBlur, onFocus: handleFocus }), error && (_jsx(Typography.Text, { className: "mt-1 text-danger", variant: "bodySmall", children: error }))] }));
37
- };
38
- export default InputField;
@@ -1,22 +0,0 @@
1
- import { type ReactNode } from "react";
2
- import { type StyleProp, type TextStyle, type ViewStyle } from "react-native";
3
- export type KeyboardToolbarAction = "previous" | "next" | "done";
4
- export interface KeyboardToolbarProps {
5
- previousLabel?: string;
6
- nextLabel?: string;
7
- doneLabel?: string;
8
- showDoneLabel?: boolean;
9
- onHeightChange?: (height: number) => void;
10
- className?: string;
11
- style?: StyleProp<ViewStyle>;
12
- actionStyle?: StyleProp<ViewStyle>;
13
- labelStyle?: StyleProp<TextStyle>;
14
- iconSize?: number;
15
- bottomGapOffset?: number;
16
- testID?: string;
17
- renderActionContent?: (action: KeyboardToolbarAction, state: {
18
- label: string;
19
- disabled: boolean;
20
- }) => ReactNode;
21
- }
22
- export default function KeyboardToolbar({ previousLabel, nextLabel, doneLabel, showDoneLabel, onHeightChange, className, style, actionStyle, labelStyle, iconSize, bottomGapOffset, testID, renderActionContent, }: KeyboardToolbarProps): import("react").JSX.Element;