@sincpro/mobile-ui 3.0.1 → 3.2.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 (314) 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 +437 -62
  15. package/dist/Dialog/Dialog.Sheet.d.ts +7 -3
  16. package/dist/Dialog/Dialog.Sheet.js +267 -15
  17. package/dist/Dialog/OverlayHost.d.ts +24 -0
  18. package/dist/Dialog/OverlayHost.js +230 -0
  19. package/dist/Dialog/SheetSurface.d.ts +43 -0
  20. package/dist/Dialog/SheetSurface.js +495 -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 +148 -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 +15 -11
  98. package/dist/Display/icon-map.js +344 -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 +507 -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 +497 -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 +223 -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 +539 -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.d.ts +1 -0
  154. package/dist/Form/Form.RadioButton.js +26 -29
  155. package/dist/Form/Form.Select.d.ts +2 -1
  156. package/dist/Form/Form.Select.js +388 -60
  157. package/dist/Form/Form.Slider.js +133 -10
  158. package/dist/Form/Form.Switch.js +99 -4
  159. package/dist/Form/choice-row.d.ts +15 -0
  160. package/dist/Form/choice-row.js +236 -0
  161. package/dist/Form/index.d.ts +11 -6
  162. package/dist/Form/index.js +26 -27
  163. package/dist/Form/input-text.d.ts +7 -0
  164. package/dist/Form/input-text.js +18 -0
  165. package/dist/Navigation/Navigation.AppBar.d.ts +3 -4
  166. package/dist/Navigation/Navigation.AppBar.js +535 -99
  167. package/dist/Navigation/Navigation.BottomNav.js +363 -98
  168. package/dist/Navigation/Navigation.CollapsingHeader.d.ts +28 -13
  169. package/dist/Navigation/Navigation.CollapsingHeader.js +369 -36
  170. package/dist/Navigation/Navigation.FloatingBar.js +71 -11
  171. package/dist/Navigation/Navigation.Menu.js +309 -95
  172. package/dist/Navigation/Navigation.MenuSection.js +80 -11
  173. package/dist/Navigation/Navigation.RowItem.d.ts +4 -2
  174. package/dist/Navigation/Navigation.RowItem.js +93 -8
  175. package/dist/Navigation/Navigation.Search.js +241 -27
  176. package/dist/Navigation/Navigation.SearchBar.d.ts +7 -1
  177. package/dist/Navigation/Navigation.SearchBar.js +218 -29
  178. package/dist/Navigation/Navigation.SearchSuggestions.js +77 -3
  179. package/dist/Navigation/Navigation.SegmentedControl.js +152 -14
  180. package/dist/Navigation/Navigation.Steps.js +105 -11
  181. package/dist/Navigation/Navigation.Tabs.js +449 -41
  182. package/dist/Navigation/index.d.ts +9 -4
  183. package/dist/Navigation/index.js +13 -13
  184. package/dist/Typography/Typography.Heading.js +33 -3
  185. package/dist/Typography/Typography.SelectableText.js +95 -7
  186. package/dist/Typography/Typography.Text.d.ts +4 -2
  187. package/dist/Typography/Typography.Text.js +217 -7
  188. package/dist/Typography/index.js +3 -3
  189. package/dist/branding.js +29 -13
  190. package/dist/icons/AddItemIcon.js +76 -2
  191. package/dist/icons/ArrangeCircle.js +82 -2
  192. package/dist/icons/ArrowDownIcon.js +63 -3
  193. package/dist/icons/ArrowUpIcon.js +63 -3
  194. package/dist/icons/BoxIcon.js +64 -2
  195. package/dist/icons/BoxTimeIcon.js +63 -2
  196. package/dist/icons/CalendarIcon.js +145 -2
  197. package/dist/icons/CardIcon.js +80 -2
  198. package/dist/icons/CashierIcon.js +39 -2
  199. package/dist/icons/CreditIcon.js +76 -3
  200. package/dist/icons/DuoIcon.js +75 -2
  201. package/dist/icons/HomeIcon.js +39 -2
  202. package/dist/icons/HomeIconOutlined.js +53 -2
  203. package/dist/icons/LogoIcon.js +87 -2
  204. package/dist/icons/MoneyReceiveIcon.js +86 -2
  205. package/dist/icons/PinIcon.js +39 -2
  206. package/dist/icons/ProfileIcon.js +47 -2
  207. package/dist/icons/SettingsIcon.js +114 -2
  208. package/dist/icons/SinpeIcon.js +60 -2
  209. package/dist/icons/ToggleOffIcon.js +53 -2
  210. package/dist/icons/WalletMoneyIcon.js +81 -2
  211. package/dist/index.d.ts +1 -0
  212. package/dist/index.js +8 -2
  213. package/dist/layouts/AuthContainer.d.ts +4 -5
  214. package/dist/layouts/AuthContainer.js +231 -7
  215. package/dist/layouts/BottomInset.js +4 -1
  216. package/dist/layouts/Container.d.ts +2 -2
  217. package/dist/layouts/Container.js +45 -3
  218. package/dist/layouts/GradientContainer.js +37 -5
  219. package/dist/layouts/PlainLayout.js +19 -3
  220. package/dist/layouts/ScrollContainer.d.ts +14 -9
  221. package/dist/layouts/ScrollContainer.js +125 -4
  222. package/dist/layouts/edges.d.ts +2 -0
  223. package/dist/layouts/edges.js +1 -0
  224. package/dist/primitives/AspectRatio.js +75 -3
  225. package/dist/primitives/Box.js +45 -3
  226. package/dist/primitives/Pressable.js +95 -5
  227. package/dist/primitives/Row.js +84 -13
  228. package/dist/primitives/Spacer.js +42 -5
  229. package/dist/primitives/Stack.js +66 -7
  230. package/dist/primitives/index.js +1 -1
  231. package/dist/theme/active.d.ts +2 -0
  232. package/dist/theme/active.js +33 -18
  233. package/dist/theme/build.js +118 -87
  234. package/dist/theme/color.js +87 -87
  235. package/dist/theme/components/ThemedActivityIndicator.d.ts +2 -15
  236. package/dist/theme/components/ThemedActivityIndicator.js +35 -3
  237. package/dist/theme/components/index.js +1 -0
  238. package/dist/theme/contrast.js +32 -33
  239. package/dist/theme/css-vars.js +71 -75
  240. package/dist/theme/dark.js +116 -97
  241. package/dist/theme/default.js +116 -97
  242. package/dist/theme/define.js +16 -12
  243. package/dist/theme/index.d.ts +1 -0
  244. package/dist/theme/index.js +7 -6
  245. package/dist/theme/on-dark-surface.d.ts +12 -0
  246. package/dist/theme/on-dark-surface.js +13 -0
  247. package/dist/theme/theme.js +1 -0
  248. package/dist/theme/tw.js +3 -1
  249. package/dist/theme/types.js +0 -18
  250. package/dist/theme/typography.d.ts +1 -1
  251. package/dist/theme/typography.js +337 -303
  252. package/dist/theme/useTheme.d.ts +4 -0
  253. package/dist/theme/useTheme.js +7 -3
  254. package/dist/theme/useThemeVars.d.ts +9 -0
  255. package/dist/theme/useThemeVars.js +23 -0
  256. package/dist/theme/validate.js +175 -166
  257. package/dist/tokens/index.js +1 -1
  258. package/dist/tokens/motion.js +30 -13
  259. package/dist/utils/async.d.ts +14 -0
  260. package/dist/utils/async.js +22 -0
  261. package/dist/utils/criteria.js +66 -85
  262. package/dist/utils/date.d.ts +8 -2
  263. package/dist/utils/date.js +63 -50
  264. package/dist/utils/image.js +8 -8
  265. package/dist/utils/intl.d.ts +1 -0
  266. package/dist/utils/intl.js +13 -0
  267. package/dist/utils/keys.js +3 -5
  268. package/dist/utils/monetary.d.ts +1 -0
  269. package/dist/utils/monetary.js +28 -24
  270. package/dist/utils/progress.js +2 -3
  271. package/dist/utils/quantity.js +25 -26
  272. package/dist/utils/reorder.js +11 -20
  273. package/dist/utils/search.d.ts +4 -0
  274. package/dist/utils/search.js +12 -0
  275. package/dist/utils/serializer.js +38 -38
  276. package/dist/utils/useReducedMotion.js +32 -30
  277. package/dist/views/AppSplashView.js +117 -3
  278. package/dist/views/AuthFormView.d.ts +4 -5
  279. package/dist/views/AuthFormView.js +119 -11
  280. package/dist/views/FormViewV2.context.js +75 -23
  281. package/dist/views/FormViewV2.d.ts +4 -5
  282. package/dist/views/FormViewV2.js +658 -92
  283. package/dist/views/ListViewV2.context.js +91 -47
  284. package/dist/views/ListViewV2.d.ts +84 -43
  285. package/dist/views/ListViewV2.js +1350 -200
  286. package/dist/views/Wizard/Wizard.context.js +248 -84
  287. package/dist/views/Wizard/Wizard.js +260 -67
  288. package/dist/views/types/IListView.js +34 -31
  289. package/dist/widgets/CollectionOptions.js +557 -138
  290. package/dist/widgets/FilterBar.js +159 -7
  291. package/dist/widgets/FilterBuilder.js +375 -102
  292. package/dist/widgets/JSONViewer.js +275 -129
  293. package/dist/widgets/PromoBanner.js +336 -42
  294. package/dist/widgets/PromoModal.d.ts +2 -2
  295. package/dist/widgets/PromoModal.js +389 -62
  296. package/dist/widgets/QueryChoice.js +150 -8
  297. package/dist/widgets/QuickActions.js +120 -31
  298. package/dist/widgets/ReorderableList.js +399 -128
  299. package/dist/widgets/TimeZoneSelectorModal.js +458 -51
  300. package/dist/widgets/index.js +3 -3
  301. package/package.json +6 -1
  302. package/tailwind.preset.js +7 -5
  303. package/dist/Form/Form.InputField.d.ts +0 -10
  304. package/dist/Form/Form.InputField.js +0 -38
  305. package/dist/Form/Form.KeyboardToolbar.d.ts +0 -22
  306. package/dist/Form/Form.KeyboardToolbar.js +0 -66
  307. package/dist/Form/Form.PasswordInput.d.ts +0 -9
  308. package/dist/Form/Form.PasswordInput.js +0 -17
  309. package/dist/Form/Form.TextInput.d.ts +0 -8
  310. package/dist/Form/Form.TextInput.js +0 -8
  311. package/dist/primitives/BaseButton.d.ts +0 -150
  312. package/dist/primitives/BaseButton.js +0 -229
  313. package/dist/utils/useSheetTranslation.d.ts +0 -5
  314. package/dist/utils/useSheetTranslation.js +0 -23
@@ -1,13 +1,163 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "nativewind/jsx-runtime";
1
+ import { c as _c } from "react/compiler-runtime";
2
2
  import DisplayImage from "./Display.Image.js";
3
3
  import PriceTag from "./Display.PriceTag.js";
4
4
  import Rating from "./Display.Rating.js";
5
5
  import Pressable from "../primitives/Pressable.js";
6
- import { theme } from "../theme/index.js";
6
+ import { useTheme } from "../theme/index.js";
7
7
  import { cn } from "../theme/tw.js";
8
8
  import { Typography } from "../Typography/index.js";
9
9
  import { View } from "react-native";
10
- function ProductCard({ title, image, price, originalPrice, currency, subtitle, rating, badge, onPress, className, testID, }) {
11
- return (_jsxs(Pressable, { accessibilityLabel: title, className: cn("bg-bg-card rounded-xl overflow-hidden border border-border-light", className), onPress: onPress, style: theme.shadow.sm, testID: testID, children: [_jsxs(View, { children: [_jsx(DisplayImage, { aspectRatio: 1, radius: 0, source: image }), badge ? _jsx(View, { className: "absolute top-2 left-2", children: badge }) : null] }), _jsxs(View, { className: "p-3 gap-1", children: [_jsx(Typography.Text, { className: "text-text-primary", numberOfLines: 1, semibold: true, variant: "body", children: title }), subtitle ? (_jsx(Typography.Text, { className: "text-text-secondary", numberOfLines: 1, variant: "bodySmall", children: subtitle })) : null, typeof rating === "number" ? _jsx(Rating, { readOnly: true, size: 14, value: rating }) : null, _jsx(View, { className: "mt-1", children: _jsx(PriceTag, { amount: price, currency: currency, originalAmount: originalPrice, size: "sm" }) })] })] }));
10
+ import { jsx as _jsx, jsxs as _jsxs } from "nativewind/jsx-runtime";
11
+ function ProductCard(t0) {
12
+ const $ = _c(32);
13
+ const {
14
+ title,
15
+ image,
16
+ price,
17
+ originalPrice,
18
+ currency,
19
+ subtitle,
20
+ rating,
21
+ badge,
22
+ onPress,
23
+ className,
24
+ testID
25
+ } = t0;
26
+ const theme = useTheme();
27
+ let t1;
28
+ if ($[0] !== className) {
29
+ t1 = cn("bg-bg-card rounded-xl overflow-hidden border border-border-light", className);
30
+ $[0] = className;
31
+ $[1] = t1;
32
+ } else {
33
+ t1 = $[1];
34
+ }
35
+ let t2;
36
+ if ($[2] !== image) {
37
+ t2 = _jsx(DisplayImage, {
38
+ aspectRatio: 1,
39
+ radius: 0,
40
+ source: image
41
+ });
42
+ $[2] = image;
43
+ $[3] = t2;
44
+ } else {
45
+ t2 = $[3];
46
+ }
47
+ let t3;
48
+ if ($[4] !== badge) {
49
+ t3 = badge ? _jsx(View, {
50
+ className: "absolute top-2 left-2",
51
+ children: badge
52
+ }) : null;
53
+ $[4] = badge;
54
+ $[5] = t3;
55
+ } else {
56
+ t3 = $[5];
57
+ }
58
+ let t4;
59
+ if ($[6] !== t2 || $[7] !== t3) {
60
+ t4 = _jsxs(View, {
61
+ children: [t2, t3]
62
+ });
63
+ $[6] = t2;
64
+ $[7] = t3;
65
+ $[8] = t4;
66
+ } else {
67
+ t4 = $[8];
68
+ }
69
+ let t5;
70
+ if ($[9] !== title) {
71
+ t5 = _jsx(Typography.Text, {
72
+ className: "text-text-primary",
73
+ numberOfLines: 1,
74
+ semibold: true,
75
+ variant: "body",
76
+ children: title
77
+ });
78
+ $[9] = title;
79
+ $[10] = t5;
80
+ } else {
81
+ t5 = $[10];
82
+ }
83
+ let t6;
84
+ if ($[11] !== subtitle) {
85
+ t6 = subtitle ? _jsx(Typography.Text, {
86
+ className: "text-text-secondary",
87
+ numberOfLines: 1,
88
+ variant: "bodySmall",
89
+ children: subtitle
90
+ }) : null;
91
+ $[11] = subtitle;
92
+ $[12] = t6;
93
+ } else {
94
+ t6 = $[12];
95
+ }
96
+ let t7;
97
+ if ($[13] !== rating) {
98
+ t7 = typeof rating === "number" ? _jsx(Rating, {
99
+ readOnly: true,
100
+ size: 14,
101
+ value: rating
102
+ }) : null;
103
+ $[13] = rating;
104
+ $[14] = t7;
105
+ } else {
106
+ t7 = $[14];
107
+ }
108
+ let t8;
109
+ if ($[15] !== currency || $[16] !== originalPrice || $[17] !== price) {
110
+ t8 = _jsx(View, {
111
+ className: "mt-1",
112
+ children: _jsx(PriceTag, {
113
+ amount: price,
114
+ currency: currency,
115
+ originalAmount: originalPrice,
116
+ size: "sm"
117
+ })
118
+ });
119
+ $[15] = currency;
120
+ $[16] = originalPrice;
121
+ $[17] = price;
122
+ $[18] = t8;
123
+ } else {
124
+ t8 = $[18];
125
+ }
126
+ let t9;
127
+ if ($[19] !== t5 || $[20] !== t6 || $[21] !== t7 || $[22] !== t8) {
128
+ t9 = _jsxs(View, {
129
+ className: "p-3 gap-1",
130
+ children: [t5, t6, t7, t8]
131
+ });
132
+ $[19] = t5;
133
+ $[20] = t6;
134
+ $[21] = t7;
135
+ $[22] = t8;
136
+ $[23] = t9;
137
+ } else {
138
+ t9 = $[23];
139
+ }
140
+ let t10;
141
+ if ($[24] !== onPress || $[25] !== t1 || $[26] !== t4 || $[27] !== t9 || $[28] !== testID || $[29] !== theme.shadow.sm || $[30] !== title) {
142
+ t10 = _jsxs(Pressable, {
143
+ accessibilityLabel: title,
144
+ className: t1,
145
+ onPress: onPress,
146
+ style: theme.shadow.sm,
147
+ testID: testID,
148
+ children: [t4, t9]
149
+ });
150
+ $[24] = onPress;
151
+ $[25] = t1;
152
+ $[26] = t4;
153
+ $[27] = t9;
154
+ $[28] = testID;
155
+ $[29] = theme.shadow.sm;
156
+ $[30] = title;
157
+ $[31] = t10;
158
+ } else {
159
+ t10 = $[31];
160
+ }
161
+ return t10;
12
162
  }
13
163
  export default ProductCard;
@@ -1,16 +1,97 @@
1
- import { jsx as _jsx } from "nativewind/jsx-runtime";
1
+ import { c as _c } from "react/compiler-runtime";
2
2
  import Icon from "./Display.Icon.js";
3
3
  import Pressable from "../primitives/Pressable.js";
4
- import { theme } from "../theme/index.js";
4
+ import { useTheme } from "../theme/index.js";
5
5
  import { View } from "react-native";
6
- function Rating({ value, max = 5, size = 24, onChange, readOnly = false, className, testID, }) {
7
- const interactive = !readOnly && !!onChange;
8
- return (_jsx(View, { accessibilityLabel: `Calificación ${value} de ${max}`, accessibilityRole: interactive ? "adjustable" : "image", className: className, style: { flexDirection: "row", gap: 4 }, testID: testID, children: Array.from({ length: max }).map((_, index) => {
9
- const filled = index < Math.round(value);
10
- const star = (_jsx(Icon, { color: filled ? theme.warning : theme.icon.disabled, name: filled ? "rating" : "rating-empty", size: size }));
11
- if (!interactive)
12
- return _jsx(View, { children: star }, index);
13
- return (_jsx(Pressable, { accessibilityLabel: `${index + 1} estrellas`, hitSlop: 6, onPress: () => onChange?.(index + 1), children: star }, index));
14
- }) }));
6
+ import { jsx as _jsx } from "nativewind/jsx-runtime";
7
+ function Rating(t0) {
8
+ const $ = _c(16);
9
+ const {
10
+ value,
11
+ max: t1,
12
+ size: t2,
13
+ onChange,
14
+ readOnly: t3,
15
+ className,
16
+ testID
17
+ } = t0;
18
+ const max = t1 === undefined ? 5 : t1;
19
+ const size = t2 === undefined ? 24 : t2;
20
+ const readOnly = t3 === undefined ? false : t3;
21
+ const theme = useTheme();
22
+ const interactive = !readOnly && !!onChange;
23
+ const t4 = `Calificación ${value} de ${max}`;
24
+ const t5 = interactive ? "adjustable" : "image";
25
+ let t6;
26
+ if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
27
+ t6 = {
28
+ flexDirection: "row",
29
+ gap: 4
30
+ };
31
+ $[0] = t6;
32
+ } else {
33
+ t6 = $[0];
34
+ }
35
+ let t7;
36
+ if ($[1] !== max) {
37
+ t7 = Array.from({
38
+ length: max
39
+ });
40
+ $[1] = max;
41
+ $[2] = t7;
42
+ } else {
43
+ t7 = $[2];
44
+ }
45
+ let t8;
46
+ if ($[3] !== interactive || $[4] !== onChange || $[5] !== size || $[6] !== t7 || $[7] !== theme || $[8] !== value) {
47
+ t8 = t7.map((_, index) => {
48
+ const filled = index < Math.round(value);
49
+ const star = _jsx(Icon, {
50
+ color: filled ? theme.warning : theme.icon.disabled,
51
+ name: filled ? "rating" : "rating-empty",
52
+ size: size
53
+ });
54
+ if (!interactive) {
55
+ return _jsx(View, {
56
+ children: star
57
+ }, index);
58
+ }
59
+ return _jsx(Pressable, {
60
+ accessibilityLabel: `${index + 1} estrellas`,
61
+ hitSlop: 6,
62
+ onPress: () => onChange?.(index + 1),
63
+ children: star
64
+ }, index);
65
+ });
66
+ $[3] = interactive;
67
+ $[4] = onChange;
68
+ $[5] = size;
69
+ $[6] = t7;
70
+ $[7] = theme;
71
+ $[8] = value;
72
+ $[9] = t8;
73
+ } else {
74
+ t8 = $[9];
75
+ }
76
+ let t9;
77
+ if ($[10] !== className || $[11] !== t4 || $[12] !== t5 || $[13] !== t8 || $[14] !== testID) {
78
+ t9 = _jsx(View, {
79
+ accessibilityLabel: t4,
80
+ accessibilityRole: t5,
81
+ className: className,
82
+ style: t6,
83
+ testID: testID,
84
+ children: t8
85
+ });
86
+ $[10] = className;
87
+ $[11] = t4;
88
+ $[12] = t5;
89
+ $[13] = t8;
90
+ $[14] = testID;
91
+ $[15] = t9;
92
+ } else {
93
+ t9 = $[15];
94
+ }
95
+ return t9;
15
96
  }
16
97
  export default Rating;
@@ -1,13 +1,139 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "nativewind/jsx-runtime";
1
+ import { c as _c } from "react/compiler-runtime";
2
2
  import Icon from "./Display.Icon.js";
3
3
  import Pressable from "../primitives/Pressable.js";
4
- import { theme } from "../theme/index.js";
4
+ import { useTheme } from "../theme/index.js";
5
5
  import { cn } from "../theme/tw.js";
6
6
  import { Typography } from "../Typography/index.js";
7
7
  import { View } from "react-native";
8
- function SearchHistory({ items, onSelect, onRemove, onClearAll, title = "Búsquedas recientes", icon = "time", className, testID, }) {
9
- if (items.length === 0)
10
- return null;
11
- return (_jsxs(View, { className: cn("gap-1", className), testID: testID, children: [_jsxs(View, { className: "flex-row items-center justify-between px-4 py-1", children: [_jsx(Typography.Text, { className: "text-text-secondary", semibold: true, variant: "bodySmall", children: title }), onClearAll ? (_jsx(Pressable, { accessibilityLabel: "Borrar todo", hitSlop: 8, onPress: onClearAll, children: _jsx(Typography.Text, { className: "text-text-accent", variant: "bodySmall", children: "Borrar todo" }) })) : null] }), items.map((value) => (_jsxs(Pressable, { accessibilityLabel: value, className: "flex-row items-center gap-3 px-4 py-2.5", onPress: () => onSelect(value), children: [_jsx(Icon, { color: theme.icon.tertiary, name: icon, size: 18 }), _jsx(Typography.Text, { className: "flex-1 text-text-primary", numberOfLines: 1, children: value }), _jsx(Pressable, { accessibilityLabel: `Quitar ${value}`, hitSlop: 10, onPress: () => onRemove(value), children: _jsx(Icon, { color: theme.icon.tertiary, name: "close", size: 16 }) })] }, value)))] }));
8
+ import { jsx as _jsx, jsxs as _jsxs } from "nativewind/jsx-runtime";
9
+ function SearchHistory(t0) {
10
+ const $ = _c(25);
11
+ const {
12
+ items,
13
+ onSelect,
14
+ onRemove,
15
+ onClearAll,
16
+ title: t1,
17
+ icon: t2,
18
+ className,
19
+ testID
20
+ } = t0;
21
+ const title = t1 === undefined ? "B\xFAsquedas recientes" : t1;
22
+ const icon = t2 === undefined ? "time" : t2;
23
+ const theme = useTheme();
24
+ if (items.length === 0) {
25
+ return null;
26
+ }
27
+ let t3;
28
+ if ($[0] !== className) {
29
+ t3 = cn("gap-1", className);
30
+ $[0] = className;
31
+ $[1] = t3;
32
+ } else {
33
+ t3 = $[1];
34
+ }
35
+ let t4;
36
+ if ($[2] !== title) {
37
+ t4 = _jsx(Typography.Text, {
38
+ className: "text-text-secondary",
39
+ semibold: true,
40
+ variant: "bodySmall",
41
+ children: title
42
+ });
43
+ $[2] = title;
44
+ $[3] = t4;
45
+ } else {
46
+ t4 = $[3];
47
+ }
48
+ let t5;
49
+ if ($[4] !== onClearAll) {
50
+ t5 = onClearAll ? _jsx(Pressable, {
51
+ accessibilityLabel: "Borrar todo",
52
+ hitSlop: 8,
53
+ onPress: onClearAll,
54
+ children: _jsx(Typography.Text, {
55
+ className: "text-text-accent",
56
+ variant: "bodySmall",
57
+ children: "Borrar todo"
58
+ })
59
+ }) : null;
60
+ $[4] = onClearAll;
61
+ $[5] = t5;
62
+ } else {
63
+ t5 = $[5];
64
+ }
65
+ let t6;
66
+ if ($[6] !== t4 || $[7] !== t5) {
67
+ t6 = _jsxs(View, {
68
+ className: "flex-row items-center justify-between px-4 py-1",
69
+ children: [t4, t5]
70
+ });
71
+ $[6] = t4;
72
+ $[7] = t5;
73
+ $[8] = t6;
74
+ } else {
75
+ t6 = $[8];
76
+ }
77
+ let t7;
78
+ if ($[9] !== icon || $[10] !== items || $[11] !== onRemove || $[12] !== onSelect || $[13] !== theme) {
79
+ let t8;
80
+ if ($[15] !== icon || $[16] !== onRemove || $[17] !== onSelect || $[18] !== theme) {
81
+ t8 = value => _jsxs(Pressable, {
82
+ accessibilityLabel: value,
83
+ className: "flex-row items-center gap-3 px-4 py-2.5",
84
+ onPress: () => onSelect(value),
85
+ children: [_jsx(Icon, {
86
+ color: theme.icon.tertiary,
87
+ name: icon,
88
+ size: 18
89
+ }), _jsx(Typography.Text, {
90
+ className: "flex-1 text-text-primary",
91
+ numberOfLines: 1,
92
+ children: value
93
+ }), _jsx(Pressable, {
94
+ accessibilityLabel: `Quitar ${value}`,
95
+ hitSlop: 10,
96
+ onPress: () => onRemove(value),
97
+ children: _jsx(Icon, {
98
+ color: theme.icon.tertiary,
99
+ name: "close",
100
+ size: 16
101
+ })
102
+ })]
103
+ }, value);
104
+ $[15] = icon;
105
+ $[16] = onRemove;
106
+ $[17] = onSelect;
107
+ $[18] = theme;
108
+ $[19] = t8;
109
+ } else {
110
+ t8 = $[19];
111
+ }
112
+ t7 = items.map(t8);
113
+ $[9] = icon;
114
+ $[10] = items;
115
+ $[11] = onRemove;
116
+ $[12] = onSelect;
117
+ $[13] = theme;
118
+ $[14] = t7;
119
+ } else {
120
+ t7 = $[14];
121
+ }
122
+ let t8;
123
+ if ($[20] !== t3 || $[21] !== t6 || $[22] !== t7 || $[23] !== testID) {
124
+ t8 = _jsxs(View, {
125
+ className: t3,
126
+ testID: testID,
127
+ children: [t6, t7]
128
+ });
129
+ $[20] = t3;
130
+ $[21] = t6;
131
+ $[22] = t7;
132
+ $[23] = testID;
133
+ $[24] = t8;
134
+ } else {
135
+ t8 = $[24];
136
+ }
137
+ return t8;
12
138
  }
13
139
  export default SearchHistory;
@@ -11,7 +11,11 @@ export interface SectionHeaderProps {
11
11
  action?: SectionHeaderAction;
12
12
  className?: string;
13
13
  testID?: string;
14
- variant?: "default" | "mobile";
14
+ /**
15
+ * `default`/`mobile`: section heading (subtitle, semibold). `group`: the uppercase caption
16
+ * that titles a group of rows, the same as `MenuSection`.
17
+ */
18
+ variant?: "default" | "mobile" | "group";
15
19
  titleTextProps?: Omit<ComponentProps<typeof Typography.Text>, "children" | "accessibilityRole">;
16
20
  subtitleTextProps?: Omit<ComponentProps<typeof Typography.Text>, "children">;
17
21
  style?: StyleProp<ViewStyle>;
@@ -1,18 +1,131 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "nativewind/jsx-runtime";
1
+ import { c as _c } from "react/compiler-runtime";
2
2
  import Pressable from "../primitives/Pressable.js";
3
3
  import { cn } from "../theme/tw.js";
4
4
  import { Typography } from "../Typography/index.js";
5
5
  import { View } from "react-native";
6
- function SectionHeader({ title, subtitle, action, className, testID, variant = "default", titleTextProps, subtitleTextProps, style, contentStyle, actionStyle, actionTextProps, }) {
7
- return (_jsxs(View, { className: cn("flex-row items-center justify-between px-4 py-2", className), style: style, testID: testID, children: [_jsxs(View, { className: "flex-1", style: contentStyle, children: [_jsx(Typography.Text, { accessibilityRole: "header", className: "text-text-primary", semibold: true, variant: variant === "mobile" ? "bodyReadable" : "subtitle", ...titleTextProps, children: title }), subtitle ? (_jsx(Typography.Text, { className: "text-text-secondary", variant: variant === "mobile" ? "bodyLarge" : "bodySmall", ...subtitleTextProps, children: subtitle })) : null] }), action ? (_jsx(Pressable, { accessibilityLabel: action.label, accessibilityRole: "button", hitSlop: 8, onPress: action.onPress, style: [
8
- {
9
- minHeight: 48,
10
- minWidth: 48,
11
- justifyContent: "center",
12
- marginLeft: 12,
13
- flexShrink: 1,
14
- },
15
- actionStyle,
16
- ], children: _jsx(Typography.Text, { className: "text-text-accent text-sm font-semibold", ...actionTextProps, children: action.label }) })) : null] }));
6
+ import { jsx as _jsx, jsxs as _jsxs } from "nativewind/jsx-runtime";
7
+ function SectionHeader(t0) {
8
+ const $ = _c(25);
9
+ const {
10
+ title,
11
+ subtitle,
12
+ action,
13
+ className,
14
+ testID,
15
+ variant: t1,
16
+ titleTextProps,
17
+ subtitleTextProps,
18
+ style,
19
+ contentStyle,
20
+ actionStyle,
21
+ actionTextProps
22
+ } = t0;
23
+ const variant = t1 === undefined ? "default" : t1;
24
+ const group = variant === "group";
25
+ let t2;
26
+ if ($[0] !== className) {
27
+ t2 = cn("flex-row items-center justify-between px-4 py-2", className);
28
+ $[0] = className;
29
+ $[1] = t2;
30
+ } else {
31
+ t2 = $[1];
32
+ }
33
+ const t3 = group ? "text-text-secondary" : "text-text-primary";
34
+ const t4 = group ? "uppercase" : "none";
35
+ const t5 = group ? "caption" : "subtitle";
36
+ let t6;
37
+ if ($[2] !== t3 || $[3] !== t4 || $[4] !== t5 || $[5] !== title || $[6] !== titleTextProps) {
38
+ t6 = _jsx(Typography.Text, {
39
+ accessibilityRole: "header",
40
+ className: t3,
41
+ semibold: true,
42
+ transform: t4,
43
+ variant: t5,
44
+ ...titleTextProps,
45
+ children: title
46
+ });
47
+ $[2] = t3;
48
+ $[3] = t4;
49
+ $[4] = t5;
50
+ $[5] = title;
51
+ $[6] = titleTextProps;
52
+ $[7] = t6;
53
+ } else {
54
+ t6 = $[7];
55
+ }
56
+ let t7;
57
+ if ($[8] !== subtitle || $[9] !== subtitleTextProps) {
58
+ t7 = subtitle ? _jsx(Typography.Text, {
59
+ className: "text-text-secondary",
60
+ variant: "bodySmall",
61
+ ...subtitleTextProps,
62
+ children: subtitle
63
+ }) : null;
64
+ $[8] = subtitle;
65
+ $[9] = subtitleTextProps;
66
+ $[10] = t7;
67
+ } else {
68
+ t7 = $[10];
69
+ }
70
+ let t8;
71
+ if ($[11] !== contentStyle || $[12] !== t6 || $[13] !== t7) {
72
+ t8 = _jsxs(View, {
73
+ className: "flex-1",
74
+ style: contentStyle,
75
+ children: [t6, t7]
76
+ });
77
+ $[11] = contentStyle;
78
+ $[12] = t6;
79
+ $[13] = t7;
80
+ $[14] = t8;
81
+ } else {
82
+ t8 = $[14];
83
+ }
84
+ let t9;
85
+ if ($[15] !== action || $[16] !== actionStyle || $[17] !== actionTextProps) {
86
+ t9 = action ? _jsx(Pressable, {
87
+ accessibilityLabel: action.label,
88
+ accessibilityRole: "button",
89
+ hitSlop: 8,
90
+ onPress: action.onPress,
91
+ style: [{
92
+ minHeight: 48,
93
+ minWidth: 48,
94
+ justifyContent: "center",
95
+ marginLeft: 12,
96
+ flexShrink: 1
97
+ }, actionStyle],
98
+ children: _jsx(Typography.Text, {
99
+ className: "text-text-accent",
100
+ variant: "button",
101
+ ...actionTextProps,
102
+ children: action.label
103
+ })
104
+ }) : null;
105
+ $[15] = action;
106
+ $[16] = actionStyle;
107
+ $[17] = actionTextProps;
108
+ $[18] = t9;
109
+ } else {
110
+ t9 = $[18];
111
+ }
112
+ let t10;
113
+ if ($[19] !== style || $[20] !== t2 || $[21] !== t8 || $[22] !== t9 || $[23] !== testID) {
114
+ t10 = _jsxs(View, {
115
+ className: t2,
116
+ style: style,
117
+ testID: testID,
118
+ children: [t8, t9]
119
+ });
120
+ $[19] = style;
121
+ $[20] = t2;
122
+ $[21] = t8;
123
+ $[22] = t9;
124
+ $[23] = testID;
125
+ $[24] = t10;
126
+ } else {
127
+ t10 = $[24];
128
+ }
129
+ return t10;
17
130
  }
18
131
  export default SectionHeader;
@@ -1,9 +1,68 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "nativewind/jsx-runtime";
1
+ import { c as _c } from "react/compiler-runtime";
2
2
  import { cn } from "../theme/tw.js";
3
3
  import { Typography } from "../Typography/index.js";
4
4
  import { View } from "react-native";
5
- function Stat({ value, label, align = "center", className, testID }) {
6
- return (_jsxs(View, { className: cn(align === "center" ? "items-center" : "items-start", className), testID: testID, children: [_jsx(Typography.Text, { className: "text-text-primary", variant: "dataLarge", children: value }), _jsx(Typography.Text, { className: "text-text-secondary", variant: "caption", children: label })] }));
5
+ import { jsx as _jsx, jsxs as _jsxs } from "nativewind/jsx-runtime";
6
+ function Stat(t0) {
7
+ const $ = _c(12);
8
+ const {
9
+ value,
10
+ label,
11
+ align: t1,
12
+ className,
13
+ testID
14
+ } = t0;
15
+ const align = t1 === undefined ? "center" : t1;
16
+ const t2 = align === "center" ? "items-center" : "items-start";
17
+ let t3;
18
+ if ($[0] !== className || $[1] !== t2) {
19
+ t3 = cn(t2, className);
20
+ $[0] = className;
21
+ $[1] = t2;
22
+ $[2] = t3;
23
+ } else {
24
+ t3 = $[2];
25
+ }
26
+ let t4;
27
+ if ($[3] !== value) {
28
+ t4 = _jsx(Typography.Text, {
29
+ className: "text-text-primary",
30
+ variant: "dataLarge",
31
+ children: value
32
+ });
33
+ $[3] = value;
34
+ $[4] = t4;
35
+ } else {
36
+ t4 = $[4];
37
+ }
38
+ let t5;
39
+ if ($[5] !== label) {
40
+ t5 = _jsx(Typography.Text, {
41
+ className: "text-text-secondary",
42
+ variant: "caption",
43
+ children: label
44
+ });
45
+ $[5] = label;
46
+ $[6] = t5;
47
+ } else {
48
+ t5 = $[6];
49
+ }
50
+ let t6;
51
+ if ($[7] !== t3 || $[8] !== t4 || $[9] !== t5 || $[10] !== testID) {
52
+ t6 = _jsxs(View, {
53
+ className: t3,
54
+ testID: testID,
55
+ children: [t4, t5]
56
+ });
57
+ $[7] = t3;
58
+ $[8] = t4;
59
+ $[9] = t5;
60
+ $[10] = testID;
61
+ $[11] = t6;
62
+ } else {
63
+ t6 = $[11];
64
+ }
65
+ return t6;
7
66
  }
8
67
  export default Stat;
9
68
  export { Stat };