@sincpro/mobile-ui 2.0.0 → 3.0.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 (204) hide show
  1. package/README.md +7 -2
  2. package/assets/brand-mesh.png +0 -0
  3. package/assets/fonts/FFL.txt +57 -0
  4. package/assets/fonts/Satoshi-Black.otf +0 -0
  5. package/assets/fonts/Satoshi-Bold.otf +0 -0
  6. package/assets/fonts/Satoshi-Medium.otf +0 -0
  7. package/assets/fonts/Satoshi-Regular.otf +0 -0
  8. package/dist/Actions/Actions.Button.d.ts +2 -1
  9. package/dist/Actions/Actions.Button.js +31 -37
  10. package/dist/Actions/Actions.Dock.d.ts +6 -6
  11. package/dist/Actions/Actions.Dock.js +14 -72
  12. package/dist/Actions/Actions.FAB.d.ts +2 -1
  13. package/dist/Actions/Actions.FilterButton.js +1 -1
  14. package/dist/Actions/Actions.IconButton.d.ts +3 -4
  15. package/dist/Actions/Actions.IconButton.js +2 -2
  16. package/dist/Dialog/Confirmation.context.d.ts +5 -14
  17. package/dist/Dialog/Confirmation.context.js +11 -51
  18. package/dist/Dialog/Dialog.ActionSheet.d.ts +8 -7
  19. package/dist/Dialog/Dialog.ActionSheet.js +45 -19
  20. package/dist/Dialog/Dialog.Confirmation.d.ts +14 -11
  21. package/dist/Dialog/Dialog.Confirmation.js +38 -14
  22. package/dist/Dialog/Dialog.EditValue.d.ts +21 -16
  23. package/dist/Dialog/Dialog.EditValue.js +73 -14
  24. package/dist/Dialog/Dialog.Sheet.d.ts +8 -24
  25. package/dist/Dialog/Dialog.Sheet.js +15 -60
  26. package/dist/Dialog/index.d.ts +14 -14
  27. package/dist/Dialog/index.js +5 -3
  28. package/dist/Dialog/requestConfirmation.d.ts +3 -0
  29. package/dist/Dialog/requestConfirmation.js +13 -0
  30. package/dist/Display/Display.Accordion.js +1 -1
  31. package/dist/Display/Display.Avatar.d.ts +6 -6
  32. package/dist/Display/Display.Avatar.js +2 -2
  33. package/dist/Display/Display.Badge.js +4 -4
  34. package/dist/Display/Display.Card.js +5 -2
  35. package/dist/Display/Display.Carousel.js +1 -1
  36. package/dist/Display/Display.CircleButton.d.ts +3 -8
  37. package/dist/Display/Display.CircleButton.js +2 -2
  38. package/dist/Display/Display.CopyableText.js +1 -5
  39. package/dist/Display/Display.Date.d.ts +3 -2
  40. package/dist/Display/Display.Date.js +3 -3
  41. package/dist/Display/Display.GradientSurface.d.ts +52 -9
  42. package/dist/Display/Display.GradientSurface.js +9 -14
  43. package/dist/Display/Display.Icon.d.ts +7 -11
  44. package/dist/Display/Display.Icon.js +15 -30
  45. package/dist/Display/Display.Image.d.ts +2 -1
  46. package/dist/Display/Display.Image.js +1 -1
  47. package/dist/Display/Display.KeyValue.js +1 -1
  48. package/dist/Display/Display.ListItem.js +1 -1
  49. package/dist/Display/Display.MenuButton.js +4 -4
  50. package/dist/Display/Display.MenuCard.d.ts +3 -8
  51. package/dist/Display/Display.MenuCard.js +2 -2
  52. package/dist/Display/Display.MenuGrid.d.ts +2 -7
  53. package/dist/Display/Display.MenuGrid.js +1 -1
  54. package/dist/Display/Display.Monetary.d.ts +2 -6
  55. package/dist/Display/Display.Monetary.js +2 -2
  56. package/dist/Display/Display.PriceTag.js +1 -1
  57. package/dist/Display/Display.Rating.js +1 -1
  58. package/dist/Display/Display.SearchHistory.d.ts +2 -1
  59. package/dist/Display/Display.SearchHistory.js +1 -1
  60. package/dist/Display/Display.StatCard.d.ts +2 -1
  61. package/dist/Display/Display.StatCard.js +1 -1
  62. package/dist/Display/Display.StoryViewer.js +10 -6
  63. package/dist/Display/Display.SwipeableRow.d.ts +2 -1
  64. package/dist/Display/Display.Timeline.js +1 -1
  65. package/dist/Display/icon-map.d.ts +344 -0
  66. package/dist/Display/icon-map.js +86 -0
  67. package/dist/Display/index.d.ts +2 -0
  68. package/dist/Display/index.js +1 -0
  69. package/dist/Feedback/Feedback.Banner.js +13 -12
  70. package/dist/Feedback/Feedback.Empty.js +1 -1
  71. package/dist/Feedback/Feedback.EmptyState.d.ts +2 -1
  72. package/dist/Feedback/Feedback.EmptyState.js +1 -1
  73. package/dist/Feedback/Feedback.Error.js +1 -1
  74. package/dist/Feedback/Feedback.PermissionCard.d.ts +2 -1
  75. package/dist/Feedback/Feedback.PermissionCard.js +2 -2
  76. package/dist/Feedback/Toast.context.js +3 -3
  77. package/dist/Form/Form.ControlledDropdown.d.ts +5 -11
  78. package/dist/Form/Form.ControlledDropdown.js +5 -2
  79. package/dist/Form/Form.DatePicker.d.ts +5 -9
  80. package/dist/Form/Form.DatePicker.js +116 -21
  81. package/dist/Form/Form.Dropdown.d.ts +11 -16
  82. package/dist/Form/Form.Dropdown.js +54 -90
  83. package/dist/Form/Form.FractionalQuantityInput.js +4 -11
  84. package/dist/Form/Form.Input.d.ts +3 -3
  85. package/dist/Form/Form.KeyboardForm.d.ts +2 -2
  86. package/dist/Form/Form.KeyboardForm.js +2 -2
  87. package/dist/Form/Form.KeyboardToolbar.d.ts +2 -1
  88. package/dist/Form/Form.KeyboardToolbar.js +3 -7
  89. package/dist/Form/Form.PasswordInput.js +1 -1
  90. package/dist/Form/Form.QuantitySelector.js +1 -1
  91. package/dist/Form/Form.Select.d.ts +12 -8
  92. package/dist/Form/Form.Select.js +64 -31
  93. package/dist/Form/Form.Slider.d.ts +4 -7
  94. package/dist/Form/Form.Slider.js +11 -10
  95. package/dist/Form/Form.Switch.js +2 -1
  96. package/dist/Form/index.d.ts +6 -14
  97. package/dist/Form/index.js +0 -11
  98. package/dist/Navigation/Navigation.AppBar.d.ts +2 -1
  99. package/dist/Navigation/Navigation.AppBar.js +2 -2
  100. package/dist/Navigation/Navigation.BottomNav.d.ts +4 -8
  101. package/dist/Navigation/Navigation.BottomNav.js +2 -2
  102. package/dist/Navigation/Navigation.CollapsingHeader.js +3 -2
  103. package/dist/Navigation/Navigation.Menu.d.ts +16 -11
  104. package/dist/Navigation/Navigation.Menu.js +97 -42
  105. package/dist/Navigation/Navigation.Search.js +2 -2
  106. package/dist/Navigation/Navigation.SearchBar.js +3 -4
  107. package/dist/Navigation/Navigation.SegmentedControl.d.ts +7 -25
  108. package/dist/Navigation/Navigation.SegmentedControl.js +18 -39
  109. package/dist/Navigation/Navigation.Steps.js +1 -1
  110. package/dist/Navigation/Navigation.Tabs.d.ts +2 -1
  111. package/dist/Navigation/index.d.ts +0 -6
  112. package/dist/Navigation/index.js +0 -8
  113. package/dist/Typography/Typography.SelectableText.js +3 -7
  114. package/dist/Typography/Typography.Text.d.ts +1 -6
  115. package/dist/Typography/Typography.Text.js +3 -6
  116. package/dist/index.d.ts +1 -4
  117. package/dist/index.js +1 -4
  118. package/dist/layouts/AuthContainer.d.ts +4 -2
  119. package/dist/layouts/AuthContainer.js +3 -4
  120. package/dist/layouts/Container.d.ts +0 -4
  121. package/dist/layouts/Container.js +3 -4
  122. package/dist/layouts/ScrollContainer.d.ts +7 -3
  123. package/dist/layouts/ScrollContainer.js +5 -4
  124. package/dist/primitives/BaseButton.d.ts +2 -1
  125. package/dist/theme/build.js +0 -4
  126. package/dist/theme/css-vars.js +0 -4
  127. package/dist/theme/dark.js +2 -6
  128. package/dist/theme/default.js +1 -5
  129. package/dist/theme/index.d.ts +1 -1
  130. package/dist/theme/index.js +1 -1
  131. package/dist/theme/types.d.ts +0 -11
  132. package/dist/theme/typography.d.ts +8 -7
  133. package/dist/theme/typography.js +25 -4
  134. package/dist/utils/timezone.d.ts +0 -5
  135. package/dist/views/AuthFormView.d.ts +3 -1
  136. package/dist/views/AuthFormView.js +2 -2
  137. package/dist/views/FormViewV2.d.ts +6 -13
  138. package/dist/views/FormViewV2.js +29 -25
  139. package/dist/views/ListViewV2.context.d.ts +5 -5
  140. package/dist/views/ListViewV2.d.ts +23 -18
  141. package/dist/views/ListViewV2.js +45 -48
  142. package/dist/views/types/IListView.d.ts +5 -4
  143. package/dist/views/types/IListView.js +18 -15
  144. package/dist/widgets/CollectionOptions.d.ts +2 -2
  145. package/dist/widgets/CollectionOptions.js +92 -65
  146. package/dist/widgets/FilterBar.js +1 -1
  147. package/dist/widgets/PromoModal.js +10 -4
  148. package/dist/widgets/QuickActions.d.ts +2 -7
  149. package/dist/widgets/QuickActions.js +1 -1
  150. package/dist/widgets/ReorderableList.js +3 -3
  151. package/dist/widgets/TimeZoneSelectorModal.d.ts +1 -6
  152. package/dist/widgets/TimeZoneSelectorModal.js +17 -12
  153. package/dist/widgets/index.d.ts +0 -11
  154. package/dist/widgets/index.js +0 -7
  155. package/package.json +36 -38
  156. package/tailwind.preset.js +0 -4
  157. package/dist/Dialog/BottomSheet/BottomSheet.Root.d.ts +0 -324
  158. package/dist/Dialog/BottomSheet/BottomSheet.Root.js +0 -373
  159. package/dist/Dialog/BottomSheet/index.d.ts +0 -1
  160. package/dist/Dialog/BottomSheet/index.js +0 -1
  161. package/dist/Dialog/Dialog.NativeSheet.d.ts +0 -10
  162. package/dist/Dialog/Dialog.NativeSheet.js +0 -21
  163. package/dist/Form/Form.Button.d.ts +0 -3
  164. package/dist/Form/Form.Button.js +0 -1
  165. package/dist/Form/Form.FAB.d.ts +0 -3
  166. package/dist/Form/Form.FAB.js +0 -1
  167. package/dist/Form/Form.FilterButton.d.ts +0 -3
  168. package/dist/Form/Form.FilterButton.js +0 -1
  169. package/dist/Form/Form.IconButton.d.ts +0 -3
  170. package/dist/Form/Form.IconButton.js +0 -1
  171. package/dist/Form/Form.SearchBar.d.ts +0 -13
  172. package/dist/Form/Form.SearchBar.js +0 -26
  173. package/dist/Navigation/Navigation.Header.d.ts +0 -16
  174. package/dist/Navigation/Navigation.Header.js +0 -17
  175. package/dist/Navigation/Navigation.HeaderToolbar.d.ts +0 -15
  176. package/dist/Navigation/Navigation.HeaderToolbar.js +0 -18
  177. package/dist/Navigation/Navigation.TabIcon.d.ts +0 -18
  178. package/dist/Navigation/Navigation.TabIcon.js +0 -12
  179. package/dist/Navigation/Navigation.TabItem.d.ts +0 -19
  180. package/dist/Navigation/Navigation.TabItem.js +0 -13
  181. package/dist/icons/OdooIcon.d.ts +0 -11
  182. package/dist/icons/OdooIcon.js +0 -11
  183. package/dist/icons/PrinterIcon.d.ts +0 -9
  184. package/dist/icons/PrinterIcon.js +0 -9
  185. package/dist/layouts/TabNavigatorLayout.d.ts +0 -26
  186. package/dist/layouts/TabNavigatorLayout.js +0 -60
  187. package/dist/utils/icon.d.ts +0 -1
  188. package/dist/utils/icon.js +0 -1
  189. package/dist/widgets/CircleButton.d.ts +0 -3
  190. package/dist/widgets/CircleButton.js +0 -1
  191. package/dist/widgets/GeoPermissionCard.d.ts +0 -13
  192. package/dist/widgets/GeoPermissionCard.js +0 -24
  193. package/dist/widgets/HomeHeader.d.ts +0 -15
  194. package/dist/widgets/HomeHeader.js +0 -13
  195. package/dist/widgets/MenuCard.d.ts +0 -3
  196. package/dist/widgets/MenuCard.js +0 -1
  197. package/dist/widgets/MenuGrid.d.ts +0 -5
  198. package/dist/widgets/MenuGrid.js +0 -1
  199. package/dist/widgets/MenuSection.d.ts +0 -3
  200. package/dist/widgets/MenuSection.js +0 -1
  201. package/dist/widgets/ScreenHeader.d.ts +0 -25
  202. package/dist/widgets/ScreenHeader.js +0 -32
  203. package/dist/widgets/TimeZoneSelector.d.ts +0 -12
  204. package/dist/widgets/TimeZoneSelector.js +0 -24
@@ -11,7 +11,7 @@ function Timeline({ steps, current, className, testID }) {
11
11
  const reached = done || active;
12
12
  const isLast = index === steps.length - 1;
13
13
  const dotColor = reached ? theme.primary : theme.bg.muted;
14
- return (_jsxs(View, { className: "flex-row", children: [_jsxs(View, { className: "items-center", style: { width: 28 }, children: [_jsx(View, { className: "w-6 h-6 rounded-full items-center justify-center", style: { backgroundColor: dotColor }, children: done ? (_jsx(Icon, { color: theme.text.inverse, name: "checkmark", size: 14 })) : (_jsx(View, { className: "w-2 h-2 rounded-full", style: {
14
+ return (_jsxs(View, { className: "flex-row", children: [_jsxs(View, { className: "items-center", style: { width: 28 }, children: [_jsx(View, { className: "w-6 h-6 rounded-full items-center justify-center", style: { backgroundColor: dotColor }, children: done ? (_jsx(Icon, { color: theme.text.inverse, name: "check", size: 14 })) : (_jsx(View, { className: "w-2 h-2 rounded-full", style: {
15
15
  backgroundColor: active ? theme.text.inverse : theme.border.strong,
16
16
  } })) }), !isLast ? (_jsx(View, { className: "flex-1 w-0.5 my-1", style: { backgroundColor: done ? theme.primary : theme.border.default } })) : null] }), _jsxs(View, { className: cn("flex-1 pb-5", isLast && "pb-0"), children: [_jsxs(View, { className: "flex-row items-center justify-between", children: [_jsx(Typography.Text, { className: reached ? "text-text-primary" : "text-text-tertiary", semibold: active, variant: "body", children: step.title }), step.time ? (_jsx(Typography.Text, { className: "text-text-tertiary", variant: "caption", children: step.time })) : null] }), step.description ? (_jsx(Typography.Text, { className: "text-text-secondary", variant: "bodySmall", children: step.description })) : null] })] }, step.title));
17
17
  }) }));
@@ -0,0 +1,344 @@
1
+ import type { AndroidSymbol, SFSymbol } from "expo-symbols";
2
+ export type IconDefinition = Readonly<{
3
+ sf: SFSymbol;
4
+ md: AndroidSymbol;
5
+ }>;
6
+ export declare const ICON_MAP: {
7
+ readonly add: {
8
+ readonly sf: "plus";
9
+ readonly md: "add";
10
+ };
11
+ readonly "add-circle": {
12
+ readonly sf: "plus.circle.fill";
13
+ readonly md: "add_circle";
14
+ };
15
+ readonly archive: {
16
+ readonly sf: "archivebox";
17
+ readonly md: "archive";
18
+ };
19
+ readonly back: {
20
+ readonly sf: "chevron.left";
21
+ readonly md: "arrow_back";
22
+ };
23
+ readonly bicycle: {
24
+ readonly sf: "bicycle";
25
+ readonly md: "directions_bike";
26
+ };
27
+ readonly book: {
28
+ readonly sf: "book";
29
+ readonly md: "book";
30
+ };
31
+ readonly bookmark: {
32
+ readonly sf: "bookmark.fill";
33
+ readonly md: "bookmark";
34
+ };
35
+ readonly "bookmark-empty": {
36
+ readonly sf: "bookmark";
37
+ readonly md: "bookmark_border";
38
+ };
39
+ readonly calendar: {
40
+ readonly sf: "calendar";
41
+ readonly md: "calendar_month";
42
+ };
43
+ readonly camera: {
44
+ readonly sf: "camera";
45
+ readonly md: "camera_alt";
46
+ };
47
+ readonly card: {
48
+ readonly sf: "creditcard";
49
+ readonly md: "credit_card";
50
+ };
51
+ readonly cart: {
52
+ readonly sf: "cart";
53
+ readonly md: "shopping_cart";
54
+ };
55
+ readonly cash: {
56
+ readonly sf: "banknote";
57
+ readonly md: "payments";
58
+ };
59
+ readonly check: {
60
+ readonly sf: "checkmark";
61
+ readonly md: "check";
62
+ };
63
+ readonly circle: {
64
+ readonly sf: "circle";
65
+ readonly md: "radio_button_unchecked";
66
+ };
67
+ readonly close: {
68
+ readonly sf: "xmark";
69
+ readonly md: "close";
70
+ };
71
+ readonly collapse: {
72
+ readonly sf: "chevron.up";
73
+ readonly md: "expand_less";
74
+ };
75
+ readonly copy: {
76
+ readonly sf: "doc.on.doc";
77
+ readonly md: "content_copy";
78
+ };
79
+ readonly "dark-mode": {
80
+ readonly sf: "moon";
81
+ readonly md: "dark_mode";
82
+ };
83
+ readonly database: {
84
+ readonly sf: "externaldrive";
85
+ readonly md: "database";
86
+ };
87
+ readonly delete: {
88
+ readonly sf: "trash";
89
+ readonly md: "delete";
90
+ };
91
+ readonly dismiss: {
92
+ readonly sf: "xmark.circle.fill";
93
+ readonly md: "cancel";
94
+ };
95
+ readonly document: {
96
+ readonly sf: "doc.text";
97
+ readonly md: "description";
98
+ };
99
+ readonly down: {
100
+ readonly sf: "arrow.down";
101
+ readonly md: "arrow_downward";
102
+ };
103
+ readonly download: {
104
+ readonly sf: "arrow.down.to.line";
105
+ readonly md: "download";
106
+ };
107
+ readonly "download-cloud": {
108
+ readonly sf: "icloud.and.arrow.down";
109
+ readonly md: "cloud_download";
110
+ };
111
+ readonly edit: {
112
+ readonly sf: "pencil";
113
+ readonly md: "edit";
114
+ };
115
+ readonly empty: {
116
+ readonly sf: "tray";
117
+ readonly md: "inbox";
118
+ };
119
+ readonly error: {
120
+ readonly sf: "exclamationmark.circle.fill";
121
+ readonly md: "error";
122
+ };
123
+ readonly expand: {
124
+ readonly sf: "chevron.down";
125
+ readonly md: "expand_more";
126
+ };
127
+ readonly filter: {
128
+ readonly sf: "slider.horizontal.3";
129
+ readonly md: "tune";
130
+ };
131
+ readonly folder: {
132
+ readonly sf: "folder";
133
+ readonly md: "folder";
134
+ };
135
+ readonly grid: {
136
+ readonly sf: "square.grid.2x2";
137
+ readonly md: "grid_view";
138
+ };
139
+ readonly help: {
140
+ readonly sf: "questionmark.circle";
141
+ readonly md: "help";
142
+ };
143
+ readonly hidden: {
144
+ readonly sf: "eye.slash";
145
+ readonly md: "visibility_off";
146
+ };
147
+ readonly home: {
148
+ readonly sf: "house.fill";
149
+ readonly md: "home";
150
+ };
151
+ readonly image: {
152
+ readonly sf: "photo";
153
+ readonly md: "image";
154
+ };
155
+ readonly inbox: {
156
+ readonly sf: "tray";
157
+ readonly md: "inbox";
158
+ };
159
+ readonly info: {
160
+ readonly sf: "info.circle.fill";
161
+ readonly md: "info";
162
+ };
163
+ readonly link: {
164
+ readonly sf: "link";
165
+ readonly md: "link";
166
+ };
167
+ readonly list: {
168
+ readonly sf: "list.bullet";
169
+ readonly md: "list";
170
+ };
171
+ readonly location: {
172
+ readonly sf: "mappin";
173
+ readonly md: "location_on";
174
+ };
175
+ readonly "location-disabled": {
176
+ readonly sf: "location.slash";
177
+ readonly md: "location_off";
178
+ };
179
+ readonly lock: {
180
+ readonly sf: "lock";
181
+ readonly md: "lock";
182
+ };
183
+ readonly logout: {
184
+ readonly sf: "rectangle.portrait.and.arrow.right";
185
+ readonly md: "logout";
186
+ };
187
+ readonly mail: {
188
+ readonly sf: "envelope";
189
+ readonly md: "mail";
190
+ };
191
+ readonly map: {
192
+ readonly sf: "map";
193
+ readonly md: "map";
194
+ };
195
+ readonly menu: {
196
+ readonly sf: "line.3.horizontal";
197
+ readonly md: "menu";
198
+ };
199
+ readonly more: {
200
+ readonly sf: "ellipsis";
201
+ readonly md: "more_horiz";
202
+ };
203
+ readonly "more-vertical": {
204
+ readonly sf: "ellipsis";
205
+ readonly md: "more_vert";
206
+ };
207
+ readonly mute: {
208
+ readonly sf: "speaker.slash.fill";
209
+ readonly md: "volume_off";
210
+ };
211
+ readonly next: {
212
+ readonly sf: "chevron.right";
213
+ readonly md: "chevron_right";
214
+ };
215
+ readonly notifications: {
216
+ readonly sf: "bell";
217
+ readonly md: "notifications";
218
+ };
219
+ readonly package: {
220
+ readonly sf: "shippingbox";
221
+ readonly md: "inventory_2";
222
+ };
223
+ readonly pause: {
224
+ readonly sf: "pause.fill";
225
+ readonly md: "pause";
226
+ };
227
+ readonly people: {
228
+ readonly sf: "person.2";
229
+ readonly md: "group";
230
+ };
231
+ readonly play: {
232
+ readonly sf: "play.fill";
233
+ readonly md: "play_arrow";
234
+ };
235
+ readonly printer: {
236
+ readonly sf: "printer";
237
+ readonly md: "print";
238
+ };
239
+ readonly profile: {
240
+ readonly sf: "person";
241
+ readonly md: "person";
242
+ };
243
+ readonly "profile-circle": {
244
+ readonly sf: "person.crop.circle";
245
+ readonly md: "account_circle";
246
+ };
247
+ readonly rating: {
248
+ readonly sf: "star.fill";
249
+ readonly md: "star";
250
+ };
251
+ readonly "rating-empty": {
252
+ readonly sf: "star";
253
+ readonly md: "star_border";
254
+ };
255
+ readonly receipt: {
256
+ readonly sf: "receipt";
257
+ readonly md: "receipt_long";
258
+ };
259
+ readonly remove: {
260
+ readonly sf: "minus";
261
+ readonly md: "remove";
262
+ };
263
+ readonly reorder: {
264
+ readonly sf: "line.3.horizontal";
265
+ readonly md: "drag_handle";
266
+ };
267
+ readonly save: {
268
+ readonly sf: "square.and.arrow.down";
269
+ readonly md: "save";
270
+ };
271
+ readonly search: {
272
+ readonly sf: "magnifyingglass";
273
+ readonly md: "search";
274
+ };
275
+ readonly "search-empty": {
276
+ readonly sf: "doc.text.magnifyingglass";
277
+ readonly md: "search_off";
278
+ };
279
+ readonly server: {
280
+ readonly sf: "server.rack";
281
+ readonly md: "dns";
282
+ };
283
+ readonly settings: {
284
+ readonly sf: "gearshape";
285
+ readonly md: "settings";
286
+ };
287
+ readonly share: {
288
+ readonly sf: "square.and.arrow.up";
289
+ readonly md: "share";
290
+ };
291
+ readonly stop: {
292
+ readonly sf: "hand.raised.fill";
293
+ readonly md: "front_hand";
294
+ };
295
+ readonly success: {
296
+ readonly sf: "checkmark.circle.fill";
297
+ readonly md: "check_circle";
298
+ };
299
+ readonly sync: {
300
+ readonly sf: "arrow.triangle.2.circlepath";
301
+ readonly md: "sync";
302
+ };
303
+ readonly time: {
304
+ readonly sf: "clock";
305
+ readonly md: "schedule";
306
+ };
307
+ readonly unlink: {
308
+ readonly sf: "link";
309
+ readonly md: "link_off";
310
+ };
311
+ readonly up: {
312
+ readonly sf: "arrow.up";
313
+ readonly md: "arrow_upward";
314
+ };
315
+ readonly upload: {
316
+ readonly sf: "arrow.up.to.line";
317
+ readonly md: "upload";
318
+ };
319
+ readonly "upload-cloud": {
320
+ readonly sf: "icloud.and.arrow.up";
321
+ readonly md: "cloud_upload";
322
+ };
323
+ readonly visibility: {
324
+ readonly sf: "eye";
325
+ readonly md: "visibility";
326
+ };
327
+ readonly volume: {
328
+ readonly sf: "speaker.wave.2.fill";
329
+ readonly md: "volume_up";
330
+ };
331
+ readonly wallet: {
332
+ readonly sf: "wallet.bifold";
333
+ readonly md: "wallet";
334
+ };
335
+ readonly warning: {
336
+ readonly sf: "exclamationmark.triangle.fill";
337
+ readonly md: "warning";
338
+ };
339
+ readonly wifi: {
340
+ readonly sf: "wifi";
341
+ readonly md: "wifi";
342
+ };
343
+ };
344
+ export type IconName = keyof typeof ICON_MAP;
@@ -0,0 +1,86 @@
1
+ export const ICON_MAP = {
2
+ add: { sf: "plus", md: "add" },
3
+ "add-circle": { sf: "plus.circle.fill", md: "add_circle" },
4
+ archive: { sf: "archivebox", md: "archive" },
5
+ back: { sf: "chevron.left", md: "arrow_back" },
6
+ bicycle: { sf: "bicycle", md: "directions_bike" },
7
+ book: { sf: "book", md: "book" },
8
+ bookmark: { sf: "bookmark.fill", md: "bookmark" },
9
+ "bookmark-empty": { sf: "bookmark", md: "bookmark_border" },
10
+ calendar: { sf: "calendar", md: "calendar_month" },
11
+ camera: { sf: "camera", md: "camera_alt" },
12
+ card: { sf: "creditcard", md: "credit_card" },
13
+ cart: { sf: "cart", md: "shopping_cart" },
14
+ cash: { sf: "banknote", md: "payments" },
15
+ check: { sf: "checkmark", md: "check" },
16
+ circle: { sf: "circle", md: "radio_button_unchecked" },
17
+ close: { sf: "xmark", md: "close" },
18
+ collapse: { sf: "chevron.up", md: "expand_less" },
19
+ copy: { sf: "doc.on.doc", md: "content_copy" },
20
+ "dark-mode": { sf: "moon", md: "dark_mode" },
21
+ database: { sf: "externaldrive", md: "database" },
22
+ delete: { sf: "trash", md: "delete" },
23
+ dismiss: { sf: "xmark.circle.fill", md: "cancel" },
24
+ document: { sf: "doc.text", md: "description" },
25
+ down: { sf: "arrow.down", md: "arrow_downward" },
26
+ download: { sf: "arrow.down.to.line", md: "download" },
27
+ "download-cloud": { sf: "icloud.and.arrow.down", md: "cloud_download" },
28
+ edit: { sf: "pencil", md: "edit" },
29
+ empty: { sf: "tray", md: "inbox" },
30
+ error: { sf: "exclamationmark.circle.fill", md: "error" },
31
+ expand: { sf: "chevron.down", md: "expand_more" },
32
+ filter: { sf: "slider.horizontal.3", md: "tune" },
33
+ folder: { sf: "folder", md: "folder" },
34
+ grid: { sf: "square.grid.2x2", md: "grid_view" },
35
+ help: { sf: "questionmark.circle", md: "help" },
36
+ hidden: { sf: "eye.slash", md: "visibility_off" },
37
+ home: { sf: "house.fill", md: "home" },
38
+ image: { sf: "photo", md: "image" },
39
+ inbox: { sf: "tray", md: "inbox" },
40
+ info: { sf: "info.circle.fill", md: "info" },
41
+ link: { sf: "link", md: "link" },
42
+ list: { sf: "list.bullet", md: "list" },
43
+ location: { sf: "mappin", md: "location_on" },
44
+ "location-disabled": { sf: "location.slash", md: "location_off" },
45
+ lock: { sf: "lock", md: "lock" },
46
+ logout: { sf: "rectangle.portrait.and.arrow.right", md: "logout" },
47
+ mail: { sf: "envelope", md: "mail" },
48
+ map: { sf: "map", md: "map" },
49
+ menu: { sf: "line.3.horizontal", md: "menu" },
50
+ more: { sf: "ellipsis", md: "more_horiz" },
51
+ "more-vertical": { sf: "ellipsis", md: "more_vert" },
52
+ mute: { sf: "speaker.slash.fill", md: "volume_off" },
53
+ next: { sf: "chevron.right", md: "chevron_right" },
54
+ notifications: { sf: "bell", md: "notifications" },
55
+ package: { sf: "shippingbox", md: "inventory_2" },
56
+ pause: { sf: "pause.fill", md: "pause" },
57
+ people: { sf: "person.2", md: "group" },
58
+ play: { sf: "play.fill", md: "play_arrow" },
59
+ printer: { sf: "printer", md: "print" },
60
+ profile: { sf: "person", md: "person" },
61
+ "profile-circle": { sf: "person.crop.circle", md: "account_circle" },
62
+ rating: { sf: "star.fill", md: "star" },
63
+ "rating-empty": { sf: "star", md: "star_border" },
64
+ receipt: { sf: "receipt", md: "receipt_long" },
65
+ remove: { sf: "minus", md: "remove" },
66
+ reorder: { sf: "line.3.horizontal", md: "drag_handle" },
67
+ save: { sf: "square.and.arrow.down", md: "save" },
68
+ search: { sf: "magnifyingglass", md: "search" },
69
+ "search-empty": { sf: "doc.text.magnifyingglass", md: "search_off" },
70
+ server: { sf: "server.rack", md: "dns" },
71
+ settings: { sf: "gearshape", md: "settings" },
72
+ share: { sf: "square.and.arrow.up", md: "share" },
73
+ stop: { sf: "hand.raised.fill", md: "front_hand" },
74
+ success: { sf: "checkmark.circle.fill", md: "check_circle" },
75
+ sync: { sf: "arrow.triangle.2.circlepath", md: "sync" },
76
+ time: { sf: "clock", md: "schedule" },
77
+ unlink: { sf: "link", md: "link_off" },
78
+ up: { sf: "arrow.up", md: "arrow_upward" },
79
+ upload: { sf: "arrow.up.to.line", md: "upload" },
80
+ "upload-cloud": { sf: "icloud.and.arrow.up", md: "cloud_upload" },
81
+ visibility: { sf: "eye", md: "visibility" },
82
+ volume: { sf: "speaker.wave.2.fill", md: "volume_up" },
83
+ wallet: { sf: "wallet.bifold", md: "wallet" },
84
+ warning: { sf: "exclamationmark.triangle.fill", md: "warning" },
85
+ wifi: { sf: "wifi", md: "wifi" },
86
+ };
@@ -107,8 +107,10 @@ export { type BadgeProps, BadgeVariants };
107
107
  export type { AmountSummaryRootProps, AmountSummaryRowProps, AmountSummaryTotalProps, } from "./Display.AmountSummary.js";
108
108
  export type { CarouselControlsProps, CarouselProps, } from "./Display.Carousel.js";
109
109
  export type { CircleButtonProps } from "./Display.CircleButton.js";
110
+ export type { IconProps } from "./Display.Icon.js";
110
111
  export type { ListGroupProps } from "./Display.ListGroup.js";
111
112
  export type { ListItemProps } from "./Display.ListItem.js";
112
113
  export type { MenuCardProps } from "./Display.MenuCard.js";
113
114
  export type { MenuGridItem } from "./Display.MenuGrid.js";
115
+ export { ICON_MAP, type IconDefinition, type IconName, } from "./icon-map.js";
114
116
  export default Display;
@@ -92,4 +92,5 @@ export const Display = {
92
92
  Pattern,
93
93
  };
94
94
  export { BadgeVariants };
95
+ export { ICON_MAP, } from "./icon-map.js";
95
96
  export default Display;
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "nativewind/jsx-runtime";
2
2
  import Icon from "../Display/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 { tv } from "../theme/tw.js";
6
6
  import { Typography } from "../Typography/index.js";
7
7
  import { View } from "react-native";
@@ -13,23 +13,24 @@ const banner = tv({
13
13
  },
14
14
  variants: {
15
15
  tone: {
16
- info: { root: "bg-info-light border-info/30", title: "text-info" },
17
- success: { root: "bg-success-light border-success/30", title: "text-success" },
18
- warning: { root: "bg-warning-light border-warning/30", title: "text-warning" },
19
- danger: { root: "bg-danger-light border-danger/30", title: "text-danger" },
16
+ info: { root: "bg-container-info border-info/30", title: "text-info" },
17
+ success: { root: "bg-container-success border-success/30", title: "text-success" },
18
+ warning: { root: "bg-container-warning border-warning/30", title: "text-warning" },
19
+ danger: { root: "bg-container-danger border-danger/30", title: "text-danger" },
20
20
  },
21
21
  },
22
22
  defaultVariants: { tone: "info" },
23
23
  });
24
24
  const iconByTone = {
25
- info: { name: "information-circle", color: theme.info },
26
- success: { name: "checkmark-circle", color: theme.success },
27
- warning: { name: "warning", color: theme.warning },
28
- danger: { name: "alert-circle", color: theme.danger },
25
+ info: "info",
26
+ success: "success",
27
+ warning: "warning",
28
+ danger: "error",
29
29
  };
30
30
  function Banner({ message, title, tone = "info", onClose, action, className, testID, }) {
31
- const styles = banner({ tone });
32
- const icon = iconByTone[tone ?? "info"];
33
- return (_jsxs(View, { accessibilityLiveRegion: tone === "danger" ? "assertive" : "polite", accessibilityRole: tone === "danger" ? "alert" : undefined, className: styles.root({ className }), testID: testID, children: [_jsx(Icon, { color: icon.color, name: icon.name, size: 20 }), _jsxs(View, { className: "flex-1 gap-0.5", children: [title ? _jsx(Typography.Text, { className: styles.title(), children: title }) : null, _jsx(Typography.Text, { className: styles.message(), children: message }), action ? _jsx(View, { className: "mt-2", children: action }) : null] }), onClose ? (_jsx(Pressable, { accessibilityLabel: "Cerrar", accessibilityRole: "button", hitSlop: 8, onPress: onClose, children: _jsx(Icon, { color: theme.icon.secondary, name: "close", size: 18 }) })) : null] }));
31
+ const theme = useTheme();
32
+ const resolvedTone = tone ?? "info";
33
+ const styles = banner({ tone: resolvedTone });
34
+ return (_jsxs(View, { accessibilityLiveRegion: tone === "danger" ? "assertive" : "polite", accessibilityRole: tone === "danger" ? "alert" : undefined, className: styles.root({ className }), testID: testID, children: [_jsx(Icon, { color: theme[resolvedTone], name: iconByTone[resolvedTone], size: 20 }), _jsxs(View, { className: "flex-1 gap-0.5", children: [title ? _jsx(Typography.Text, { className: styles.title(), children: title }) : null, _jsx(Typography.Text, { className: styles.message(), children: message }), action ? _jsx(View, { className: "mt-2", children: action }) : null] }), onClose ? (_jsx(Pressable, { accessibilityLabel: "Cerrar", accessibilityRole: "button", hitSlop: 8, onPress: onClose, children: _jsx(Icon, { color: theme.icon.secondary, name: "close", size: 18 }) })) : null] }));
34
35
  }
35
36
  export default Banner;
@@ -4,6 +4,6 @@ import { cn } from "../theme/tw.js";
4
4
  import { Typography } from "../Typography/index.js";
5
5
  import { View } from "react-native";
6
6
  function Empty({ handleGoHome, className }) {
7
- return (_jsxs(View, { className: cn("flex-1 items-center justify-center px-4", className), children: [_jsx(Icon, { name: "sad-cry", size: 80, type: "fontawesome5" }), _jsx(Typography.Text, { className: "pt-4 text-text-primary", semibold: true, variant: "h3", children: "\u00A1Oops!" }), _jsx(Typography.Text, { className: "pt-2 text-center text-base leading-5.5 text-text-secondary", variant: "h5", children: "No se encontraron registros disponibles." })] }));
7
+ return (_jsxs(View, { className: cn("flex-1 items-center justify-center px-4", className), children: [_jsx(Icon, { name: "empty", size: 80 }), _jsx(Typography.Text, { className: "pt-4 text-text-primary", semibold: true, variant: "h3", children: "\u00A1Oops!" }), _jsx(Typography.Text, { className: "pt-2 text-center text-base leading-5.5 text-text-secondary", variant: "h5", children: "No se encontraron registros disponibles." })] }));
8
8
  }
9
9
  export default Empty;
@@ -1,9 +1,10 @@
1
+ import type { IconName } from "../Display/index.js";
1
2
  import type { ImageSource } from "../utils/image.js";
2
3
  import type { ReactNode } from "react";
3
4
  export interface EmptyStateProps {
4
5
  title: string;
5
6
  description?: string;
6
- icon?: string;
7
+ icon?: IconName;
7
8
  image?: ImageSource;
8
9
  actionLabel?: string;
9
10
  onAction?: () => void;
@@ -6,7 +6,7 @@ import { theme } from "../theme/index.js";
6
6
  import { cn } from "../theme/tw.js";
7
7
  import { Typography } from "../Typography/index.js";
8
8
  import { View } from "react-native";
9
- function EmptyState({ title, description, icon = "file-tray-outline", image, actionLabel, onAction, children, className, testID, }) {
9
+ function EmptyState({ title, description, icon = "inbox", image, actionLabel, onAction, children, className, testID, }) {
10
10
  return (_jsxs(View, { className: cn("flex-1 items-center justify-center px-8 gap-3", className), testID: testID, children: [image ? (_jsx(ExpoImage, { contentFit: "contain", source: image, style: { width: 140, height: 140 } })) : (_jsx(View, { className: "w-20 h-20 rounded-full bg-bg-muted items-center justify-center", children: _jsx(Icon, { color: theme.icon.tertiary, name: icon, size: 40 }) })), _jsx(Typography.Text, { accessibilityRole: "header", align: "center", className: "text-text-primary", semibold: true, variant: "subtitle", children: title }), description ? (_jsx(Typography.Text, { align: "center", className: "text-text-secondary", variant: "body", children: description })) : null, actionLabel && onAction ? (_jsx(View, { className: "mt-2", children: _jsx(BaseButton, { onPress: onAction, title: actionLabel, variant: "primary" }) })) : null, children] }));
11
11
  }
12
12
  export default EmptyState;
@@ -6,6 +6,6 @@ import { cn } from "../theme/tw.js";
6
6
  import { Typography } from "../Typography/index.js";
7
7
  import { View } from "react-native";
8
8
  function Error({ message, onRetry, onBack, onHome, className, testID }) {
9
- return (_jsxs(View, { className: cn("flex-1 items-center justify-center px-4", className), testID: testID, children: [_jsx(Icon, { color: theme.danger, name: "exclamation-circle", size: 80, type: "fontawesome5" }), _jsx(Typography.Text, { accessibilityRole: "header", className: "pt-4 text-text-primary", semibold: true, variant: "h3", children: "\u00A1Error!" }), _jsx(Typography.Text, { accessibilityLiveRegion: "polite", className: "pt-2 text-center text-base leading-5.5 text-text-secondary", variant: "h5", children: message || "Ocurrió un error al cargar la información" }), _jsxs(View, { className: "mt-8 w-full gap-3", children: [onRetry && _jsx(Button, { className: "w-full", onPress: onRetry, title: "Reintentar" }), onBack && (_jsx(Button, { className: "w-full", onPress: onBack, title: "Volver", variant: "secondary" })), onHome && (_jsx(Button, { className: "w-full", onPress: onHome, title: "Ir al inicio", variant: "outline" }))] })] }));
9
+ return (_jsxs(View, { className: cn("flex-1 items-center justify-center px-4", className), testID: testID, children: [_jsx(Icon, { color: theme.danger, name: "error", size: 80 }), _jsx(Typography.Text, { accessibilityRole: "header", className: "pt-4 text-text-primary", semibold: true, variant: "h3", children: "\u00A1Error!" }), _jsx(Typography.Text, { accessibilityLiveRegion: "polite", className: "pt-2 text-center text-base leading-5.5 text-text-secondary", variant: "h5", children: message || "Ocurrió un error al cargar la información" }), _jsxs(View, { className: "mt-8 w-full gap-3", children: [onRetry && _jsx(Button, { className: "w-full", onPress: onRetry, title: "Reintentar" }), onBack && (_jsx(Button, { className: "w-full", onPress: onBack, title: "Volver", variant: "secondary" })), onHome && (_jsx(Button, { className: "w-full", onPress: onHome, title: "Ir al inicio", variant: "outline" }))] })] }));
10
10
  }
11
11
  export default Error;
@@ -1,8 +1,9 @@
1
+ import type { IconName } from "../Display/index.js";
1
2
  export interface PermissionCardProps {
2
3
  title: string;
3
4
  description?: string;
4
5
  granted?: boolean;
5
- icon?: string;
6
+ icon?: IconName;
6
7
  grantedLabel?: string;
7
8
  deniedLabel?: string;
8
9
  actionLabel?: string;
@@ -5,7 +5,7 @@ import { theme } 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 PermissionCard({ title, description, granted = false, icon = "lock-closed", grantedLabel = "Permiso activo", deniedLabel = "Permiso inactivo", actionLabel = "Permitir", loading = false, onRequest, className, testID, }) {
9
- return (_jsx(View, { className: cn("bg-bg-card rounded-xl p-4 border border-border-light", className), style: theme.shadow.sm, testID: testID, children: _jsxs(View, { className: "flex-row items-start gap-3", children: [_jsx(Icon, { color: granted ? theme.success : theme.danger, name: granted ? "checkmark-circle" : icon, size: 32 }), _jsxs(View, { className: "flex-1 gap-1", children: [_jsx(Typography.Text, { className: "text-text-primary", semibold: true, variant: "body", children: title }), description ? (_jsx(Typography.Text, { className: "text-text-secondary", variant: "bodySmall", children: description })) : null, _jsx(Typography.Text, { style: { color: granted ? theme.success : theme.danger }, variant: "bodySmall", children: granted ? grantedLabel : deniedLabel }), !granted && onRequest ? (_jsx(View, { className: "mt-2 self-start", children: _jsx(BaseButton, { loading: loading, onPress: onRequest, size: "small", title: actionLabel }) })) : null] })] }) }));
8
+ function PermissionCard({ title, description, granted = false, icon = "lock", grantedLabel = "Permiso activo", deniedLabel = "Permiso inactivo", actionLabel = "Permitir", loading = false, onRequest, className, testID, }) {
9
+ return (_jsx(View, { className: cn("bg-bg-card rounded-xl p-4 border border-border-light", className), style: theme.shadow.sm, testID: testID, children: _jsxs(View, { className: "flex-row items-start gap-3", children: [_jsx(Icon, { color: granted ? theme.success : theme.danger, name: granted ? "success" : icon, size: 32 }), _jsxs(View, { className: "flex-1 gap-1", children: [_jsx(Typography.Text, { className: "text-text-primary", semibold: true, variant: "body", children: title }), description ? (_jsx(Typography.Text, { className: "text-text-secondary", variant: "bodySmall", children: description })) : null, _jsx(Typography.Text, { style: { color: granted ? theme.success : theme.danger }, variant: "bodySmall", children: granted ? grantedLabel : deniedLabel }), !granted && onRequest ? (_jsx(View, { className: "mt-2 self-start", children: _jsx(BaseButton, { loading: loading, onPress: onRequest, size: "small", title: actionLabel }) })) : null] })] }) }));
10
10
  }
11
11
  export default PermissionCard;
@@ -70,10 +70,10 @@ const toast = tv({
70
70
  },
71
71
  });
72
72
  const iconByVariant = {
73
- info: "information-circle",
74
- success: "checkmark-circle",
73
+ info: "info",
74
+ success: "success",
75
75
  warning: "warning",
76
- danger: "close-circle",
76
+ danger: "dismiss",
77
77
  };
78
78
  function ToastItem({ entry, onHide, onUpdate, position, }) {
79
79
  const variant = entry.variant ?? "info";
@@ -1,14 +1,8 @@
1
- import { Control, FieldValues, Path } from "react-hook-form";
2
- export interface DropdownOption {
3
- value: string;
4
- label: string;
5
- }
6
- interface ControlledDropdownProps<T extends FieldValues> {
1
+ import { type SelectProps } from "./Form.Select.js";
2
+ import { type Control, type FieldValues, type Path } from "react-hook-form";
3
+ export type ControlledDropdownProps<T extends FieldValues> = Omit<SelectProps<string>, "value" | "onChange" | "onBlur" | "error"> & {
7
4
  control: Control<T>;
8
5
  name: Path<T>;
9
- label: string;
10
- options: DropdownOption[];
11
- placeholder?: string;
12
- }
13
- declare function ControlledDropdown<T extends FieldValues>(_props: ControlledDropdownProps<T>): void;
6
+ };
7
+ declare function ControlledDropdown<T extends FieldValues>({ control, name, ...props }: ControlledDropdownProps<T>): import("react").JSX.Element;
14
8
  export default ControlledDropdown;
@@ -1,4 +1,7 @@
1
- function ControlledDropdown(_props) {
2
- throw new Error("ControlledDropdown is not implemented yet. Use Form.Dropdown with manual Controller instead.");
1
+ import { jsx as _jsx } from "nativewind/jsx-runtime";
2
+ import Select from "./Form.Select.js";
3
+ import { Controller } from "react-hook-form";
4
+ function ControlledDropdown({ control, name, ...props }) {
5
+ return (_jsx(Controller, { control: control, name: name, render: ({ field, fieldState }) => (_jsx(Select, { ...props, disabled: props.disabled || field.disabled, error: fieldState.error?.message, onBlur: field.onBlur, onChange: field.onChange, value: typeof field.value === "string" ? field.value : null })) }));
3
6
  }
4
7
  export default ControlledDropdown;
@@ -1,6 +1,6 @@
1
- export interface DatePickerProps {
1
+ export type DatePickerProps = {
2
2
  value: Date | null;
3
- onChange: (value: Date) => void;
3
+ onChange: (value: Date) => void | Promise<void>;
4
4
  mode?: "date" | "time" | "datetime";
5
5
  label?: string;
6
6
  placeholder?: string;
@@ -8,13 +8,9 @@ export interface DatePickerProps {
8
8
  minimumDate?: Date;
9
9
  maximumDate?: Date;
10
10
  disabled?: boolean;
11
+ readOnly?: boolean;
11
12
  className?: string;
12
13
  testID?: string;
13
- }
14
- /**
15
- * **Hybrid** date/time field: tokenized trigger (NativeWind) + **native picker**
16
- * (`@react-native-community/datetimepicker`) — a case where native wins (expected UX).
17
- * Subpath `Form/DatePicker`; **optional** peer dep.
18
- */
19
- declare function DatePicker({ value, onChange, mode, label, placeholder, format, minimumDate, maximumDate, disabled, className, testID, }: DatePickerProps): import("react").JSX.Element;
14
+ };
15
+ declare function DatePicker({ value, onChange, mode, label, placeholder, format, minimumDate, maximumDate, disabled, readOnly, className, testID, }: DatePickerProps): import("react").JSX.Element;
20
16
  export default DatePicker;