@retray-dev/ui-kit 12.2.0 → 13.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 (296) hide show
  1. package/CONSUMER.md +26 -11
  2. package/DESIGN.md +2 -2
  3. package/README.md +15 -11
  4. package/{COMPONENTS.md → SKILL.md} +374 -996
  5. package/dist/Accordion.d.mts +2 -0
  6. package/dist/Accordion.d.ts +2 -0
  7. package/dist/Accordion.js +49 -210
  8. package/dist/Accordion.mjs +6 -6
  9. package/dist/AlertBanner.js +29 -153
  10. package/dist/AlertBanner.mjs +3 -4
  11. package/dist/AppHeader.d.mts +5 -2
  12. package/dist/AppHeader.d.ts +5 -2
  13. package/dist/AppHeader.js +45 -239
  14. package/dist/AppHeader.mjs +6 -8
  15. package/dist/Avatar.d.mts +17 -1
  16. package/dist/Avatar.d.ts +17 -1
  17. package/dist/Avatar.js +80 -115
  18. package/dist/Avatar.mjs +2 -3
  19. package/dist/Badge.js +24 -149
  20. package/dist/Badge.mjs +3 -4
  21. package/dist/Button.js +79 -267
  22. package/dist/Button.mjs +6 -7
  23. package/dist/ButtonGroup.mjs +0 -1
  24. package/dist/Card.js +15 -200
  25. package/dist/Card.mjs +4 -6
  26. package/dist/CategoryStrip.d.mts +0 -5
  27. package/dist/CategoryStrip.d.ts +0 -5
  28. package/dist/CategoryStrip.js +47 -265
  29. package/dist/CategoryStrip.mjs +6 -7
  30. package/dist/Checkbox.d.mts +2 -1
  31. package/dist/Checkbox.d.ts +2 -1
  32. package/dist/Checkbox.js +18 -201
  33. package/dist/Checkbox.mjs +5 -6
  34. package/dist/Chip.js +44 -236
  35. package/dist/Chip.mjs +7 -7
  36. package/dist/ConfirmDialog.d.mts +2 -1
  37. package/dist/ConfirmDialog.d.ts +2 -1
  38. package/dist/ConfirmDialog.js +110 -300
  39. package/dist/ConfirmDialog.mjs +7 -8
  40. package/dist/CurrencyDisplay.js +1 -114
  41. package/dist/CurrencyDisplay.mjs +2 -3
  42. package/dist/CurrencyInput.js +35 -162
  43. package/dist/CurrencyInput.mjs +5 -6
  44. package/dist/DetailRow.js +25 -150
  45. package/dist/DetailRow.mjs +3 -4
  46. package/dist/EmptyState.js +80 -268
  47. package/dist/EmptyState.mjs +7 -8
  48. package/dist/ErrorBoundary.js +32 -199
  49. package/dist/ErrorBoundary.mjs +4 -5
  50. package/dist/Form.js +1 -114
  51. package/dist/Form.mjs +2 -3
  52. package/dist/HolographicCard.d.mts +0 -28
  53. package/dist/HolographicCard.d.ts +0 -28
  54. package/dist/HolographicCard.js +20 -130
  55. package/dist/HolographicCard.mjs +9 -33
  56. package/dist/IconButton.js +36 -234
  57. package/dist/IconButton.mjs +5 -7
  58. package/dist/IconPicker.js +222 -929
  59. package/dist/IconPicker.mjs +5 -6
  60. package/dist/ImageUpload.d.mts +3 -3
  61. package/dist/ImageUpload.d.ts +3 -3
  62. package/dist/ImageUpload.js +49 -238
  63. package/dist/ImageUpload.mjs +5 -7
  64. package/dist/ImageViewer.js +75 -266
  65. package/dist/ImageViewer.mjs +8 -9
  66. package/dist/Input.d.mts +1 -1
  67. package/dist/Input.d.ts +1 -1
  68. package/dist/Input.js +35 -162
  69. package/dist/Input.mjs +4 -5
  70. package/dist/LabelValue.js +24 -149
  71. package/dist/LabelValue.mjs +3 -4
  72. package/dist/ListGroup.js +1 -114
  73. package/dist/ListGroup.mjs +2 -3
  74. package/dist/ListItem.d.mts +2 -1
  75. package/dist/ListItem.d.ts +2 -1
  76. package/dist/ListItem.js +41 -236
  77. package/dist/ListItem.mjs +5 -7
  78. package/dist/MediaCard.d.mts +0 -14
  79. package/dist/MediaCard.d.ts +0 -14
  80. package/dist/MediaCard.js +69 -315
  81. package/dist/MediaCard.mjs +5 -7
  82. package/dist/MenuGroup.js +1 -114
  83. package/dist/MenuGroup.mjs +2 -3
  84. package/dist/MenuItem.d.mts +2 -1
  85. package/dist/MenuItem.d.ts +2 -1
  86. package/dist/MenuItem.js +39 -235
  87. package/dist/MenuItem.mjs +5 -7
  88. package/dist/MonthPicker.js +8 -163
  89. package/dist/MonthPicker.mjs +3 -4
  90. package/dist/NumberStepper.d.mts +2 -1
  91. package/dist/NumberStepper.d.ts +2 -1
  92. package/dist/NumberStepper.js +44 -239
  93. package/dist/NumberStepper.mjs +5 -7
  94. package/dist/PagerDots.d.mts +1 -1
  95. package/dist/PagerDots.d.ts +1 -1
  96. package/dist/PagerDots.js +69 -224
  97. package/dist/PagerDots.mjs +6 -6
  98. package/dist/Pressable.js +14 -85
  99. package/dist/Pressable.mjs +4 -5
  100. package/dist/PricingCard.js +87 -272
  101. package/dist/PricingCard.mjs +8 -9
  102. package/dist/Progress.js +3 -123
  103. package/dist/Progress.mjs +3 -4
  104. package/dist/RadioGroup.js +52 -265
  105. package/dist/RadioGroup.mjs +5 -6
  106. package/dist/RetrayProvider.js +3 -6
  107. package/dist/RetrayProvider.mjs +3 -4
  108. package/dist/Select.d.mts +3 -1
  109. package/dist/Select.d.ts +3 -1
  110. package/dist/Select.js +27 -233
  111. package/dist/Select.mjs +4 -6
  112. package/dist/SelectableCard.js +33 -209
  113. package/dist/SelectableCard.mjs +5 -6
  114. package/dist/SelectableGrid.d.mts +0 -21
  115. package/dist/SelectableGrid.d.ts +0 -21
  116. package/dist/SelectableGrid.js +49 -272
  117. package/dist/SelectableGrid.mjs +5 -7
  118. package/dist/Separator.js +1 -114
  119. package/dist/Separator.mjs +2 -3
  120. package/dist/Sheet.d.mts +1 -1
  121. package/dist/Sheet.d.ts +1 -1
  122. package/dist/Sheet.js +33 -175
  123. package/dist/Sheet.mjs +3 -4
  124. package/dist/SheetSelect.js +39 -236
  125. package/dist/SheetSelect.mjs +6 -7
  126. package/dist/Skeleton.js +4 -124
  127. package/dist/Skeleton.mjs +3 -4
  128. package/dist/Slider.d.mts +2 -1
  129. package/dist/Slider.d.ts +2 -1
  130. package/dist/Slider.js +8 -161
  131. package/dist/Slider.mjs +3 -4
  132. package/dist/Spinner.js +3 -116
  133. package/dist/Spinner.mjs +2 -3
  134. package/dist/Stats.js +36 -234
  135. package/dist/Stats.mjs +5 -7
  136. package/dist/Switch.d.mts +2 -1
  137. package/dist/Switch.d.ts +2 -1
  138. package/dist/Switch.js +26 -176
  139. package/dist/Switch.mjs +5 -5
  140. package/dist/TabBar.js +43 -200
  141. package/dist/TabBar.mjs +5 -5
  142. package/dist/Tabs.js +15 -199
  143. package/dist/Tabs.mjs +5 -6
  144. package/dist/Text.js +9 -130
  145. package/dist/Text.mjs +2 -3
  146. package/dist/Textarea.d.mts +2 -1
  147. package/dist/Textarea.d.ts +2 -1
  148. package/dist/Textarea.js +71 -219
  149. package/dist/Textarea.mjs +4 -5
  150. package/dist/Toast.d.mts +12 -10
  151. package/dist/Toast.d.ts +12 -10
  152. package/dist/Toast.js +1 -114
  153. package/dist/Toast.mjs +2 -3
  154. package/dist/Toggle.js +39 -236
  155. package/dist/Toggle.mjs +6 -7
  156. package/dist/{chunk-ELGEOM7I.mjs → chunk-2QXJDRVU.mjs} +13 -10
  157. package/dist/{chunk-LIS6I5UP.mjs → chunk-2VIDP72N.mjs} +3 -3
  158. package/dist/{chunk-NHDI3VQB.mjs → chunk-422IVD3H.mjs} +16 -12
  159. package/dist/{chunk-DF7JA72E.mjs → chunk-4NQFTHN3.mjs} +13 -7
  160. package/dist/{chunk-3XCFYSX4.mjs → chunk-5MYNAAFE.mjs} +13 -17
  161. package/dist/{chunk-E7NEHHXV.mjs → chunk-62BBSSUF.mjs} +3 -3
  162. package/dist/{chunk-UBUXUMER.mjs → chunk-77UOVFIS.mjs} +7 -5
  163. package/dist/{chunk-M3C7XM2M.mjs → chunk-7BZJRB77.mjs} +28 -18
  164. package/dist/chunk-ARONDO7M.mjs +40 -0
  165. package/dist/{chunk-GH67YXG6.mjs → chunk-AZV7KNJI.mjs} +3 -3
  166. package/dist/{chunk-2P2CB235.mjs → chunk-BULKGOIZ.mjs} +7 -8
  167. package/dist/{chunk-RJNLAH76.mjs → chunk-C5ZRMR2E.mjs} +4 -2
  168. package/dist/chunk-CM2DG4MR.mjs +142 -0
  169. package/dist/{chunk-UQ4742ET.mjs → chunk-COA2YZOX.mjs} +8 -6
  170. package/dist/{chunk-EDLCGYIO.mjs → chunk-CZN6L2QU.mjs} +11 -8
  171. package/dist/{chunk-TS7DGUIR.mjs → chunk-DBHSUUKU.mjs} +2 -2
  172. package/dist/{chunk-57V2LXCK.mjs → chunk-DE25XTVQ.mjs} +3 -3
  173. package/dist/{chunk-RMRS44MQ.mjs → chunk-E2PONRJG.mjs} +13 -9
  174. package/dist/{chunk-GUTDFUNF.mjs → chunk-EHGBHFMH.mjs} +9 -17
  175. package/dist/{chunk-ZIMY2QUM.mjs → chunk-ERWJPVX7.mjs} +2 -2
  176. package/dist/{chunk-NLZY4TXU.mjs → chunk-ESQDPO5E.mjs} +7 -7
  177. package/dist/{chunk-VJBUCITV.mjs → chunk-EW2FIDSM.mjs} +1 -1
  178. package/dist/{chunk-HC4VVCWY.mjs → chunk-FTTI6T5Q.mjs} +4 -4
  179. package/dist/{chunk-MVMGPZN6.mjs → chunk-H6MQL7PS.mjs} +12 -7
  180. package/dist/{chunk-CF27NBXO.mjs → chunk-HHOOFDBA.mjs} +38 -41
  181. package/dist/{chunk-2HFD4IHU.mjs → chunk-HUSSF6TF.mjs} +1 -1
  182. package/dist/{chunk-HEDQPK4I.mjs → chunk-IDVUZIVY.mjs} +16 -22
  183. package/dist/chunk-IFYMBOEN.mjs +14 -0
  184. package/dist/{chunk-QOLWA2PW.mjs → chunk-IGU223UM.mjs} +80 -4
  185. package/dist/chunk-IJCMPVW5.mjs +121 -0
  186. package/dist/{chunk-AENAVIKT.mjs → chunk-ITG4JQM3.mjs} +4 -4
  187. package/dist/{chunk-E5UKLSJZ.mjs → chunk-K3QX2M26.mjs} +11 -8
  188. package/dist/{chunk-4OORJ2DY.mjs → chunk-K7TKID3V.mjs} +8 -7
  189. package/dist/{chunk-2LG326TT.mjs → chunk-KAGADD2O.mjs} +4 -4
  190. package/dist/{chunk-IVSRW4HS.mjs → chunk-KC5QDYGZ.mjs} +4 -4
  191. package/dist/{chunk-7AFZWSCI.mjs → chunk-KPTY7UYQ.mjs} +1 -1
  192. package/dist/{chunk-YTXRIXNZ.mjs → chunk-KSSVIFYR.mjs} +9 -12
  193. package/dist/chunk-L3YKPTJQ.mjs +119 -0
  194. package/dist/chunk-M53LC4Q7.mjs +35 -0
  195. package/dist/chunk-MZ6WRTD2.mjs +40 -0
  196. package/dist/chunk-NGEN2EES.mjs +581 -0
  197. package/dist/{chunk-ZR6HSEAB.mjs → chunk-NPCBNGNE.mjs} +17 -26
  198. package/dist/{chunk-C43HRKXH.mjs → chunk-OBV72JD4.mjs} +1 -1
  199. package/dist/{chunk-LPV4NJJK.mjs → chunk-PGQ6FMXS.mjs} +6 -5
  200. package/dist/{chunk-MEPSKGBO.mjs → chunk-PI6RULJX.mjs} +1 -1
  201. package/dist/{chunk-F3YTWO3T.mjs → chunk-RA6SAAFE.mjs} +9 -8
  202. package/dist/{chunk-UNNRUJTM.mjs → chunk-RRKM4MKB.mjs} +7 -7
  203. package/dist/{chunk-ULGNQPNE.mjs → chunk-S2VGME7X.mjs} +1 -1
  204. package/dist/{chunk-OLVJFKXS.mjs → chunk-S44XWTTC.mjs} +35 -25
  205. package/dist/{chunk-YMYIEVZP.mjs → chunk-SZEKQAOY.mjs} +1 -1
  206. package/dist/{chunk-BXF4AMHY.mjs → chunk-TMH263OK.mjs} +5 -4
  207. package/dist/{chunk-NJG7DHVF.mjs → chunk-U6DEBYU5.mjs} +10 -9
  208. package/dist/{chunk-QXDGGOLC.mjs → chunk-UMZTPUB3.mjs} +33 -21
  209. package/dist/{chunk-KSUWPU2F.mjs → chunk-WIPEDNSD.mjs} +7 -7
  210. package/dist/{chunk-QDAZGZUF.mjs → chunk-XCIG6HT2.mjs} +3 -3
  211. package/dist/{chunk-4J2PXL36.mjs → chunk-Y6YS33GM.mjs} +40 -38
  212. package/dist/{chunk-4XOB5TTD.mjs → chunk-ZKDKKQCE.mjs} +5 -5
  213. package/dist/{chunk-LOBLCFMN.mjs → chunk-ZTPYUU5C.mjs} +5 -5
  214. package/dist/fonts.mjs +0 -2
  215. package/dist/index.d.mts +13 -73
  216. package/dist/index.d.ts +13 -73
  217. package/dist/index.js +1149 -1892
  218. package/dist/index.mjs +81 -86
  219. package/package.json +20 -20
  220. package/src/components/Accordion/Accordion.tsx +15 -9
  221. package/src/components/AlertBanner/AlertBanner.tsx +7 -6
  222. package/src/components/AppHeader/AppHeader.tsx +25 -10
  223. package/src/components/Avatar/Avatar.tsx +92 -1
  224. package/src/components/Avatar/index.ts +2 -2
  225. package/src/components/Badge/Badge.tsx +2 -2
  226. package/src/components/Button/Button.tsx +50 -46
  227. package/src/components/Card/Card.tsx +1 -0
  228. package/src/components/CategoryStrip/CategoryStrip.tsx +36 -49
  229. package/src/components/Checkbox/Checkbox.tsx +3 -0
  230. package/src/components/Chip/Chip.tsx +5 -4
  231. package/src/components/ConfirmDialog/ConfirmDialog.tsx +33 -17
  232. package/src/components/DetailRow/DetailRow.tsx +3 -3
  233. package/src/components/EmptyState/EmptyState.tsx +2 -2
  234. package/src/components/ErrorBoundary/ErrorBoundary.tsx +6 -6
  235. package/src/components/HolographicCard/HolographicCard.tsx +14 -95
  236. package/src/components/IconButton/IconButton.tsx +2 -2
  237. package/src/components/IconPicker/IconPicker.tsx +13 -12
  238. package/src/components/ImageUpload/ImageUpload.tsx +43 -46
  239. package/src/components/ImageViewer/ImageViewer.tsx +3 -3
  240. package/src/components/Input/Input.tsx +11 -5
  241. package/src/components/LabelValue/LabelValue.tsx +2 -2
  242. package/src/components/ListItem/ListItem.tsx +7 -4
  243. package/src/components/MediaCard/MediaCard.tsx +21 -59
  244. package/src/components/MenuItem/MenuItem.tsx +5 -2
  245. package/src/components/MonthPicker/MonthPicker.tsx +2 -2
  246. package/src/components/NumberStepper/NumberStepper.tsx +10 -6
  247. package/src/components/PagerDots/PagerDots.tsx +38 -28
  248. package/src/components/PricingCard/PricingCard.tsx +6 -6
  249. package/src/components/RadioGroup/RadioGroup.tsx +18 -31
  250. package/src/components/Select/Select.tsx +35 -39
  251. package/src/components/SelectableCard/SelectableCard.tsx +4 -6
  252. package/src/components/SelectableGrid/SelectableGrid.tsx +37 -72
  253. package/src/components/Sheet/Sheet.tsx +28 -15
  254. package/src/components/Sheet/index.ts +2 -2
  255. package/src/components/SheetSelect/SheetSelect.tsx +3 -3
  256. package/src/components/Skeleton/Skeleton.tsx +1 -1
  257. package/src/components/Slider/Slider.tsx +3 -0
  258. package/src/components/Spinner/Spinner.tsx +2 -2
  259. package/src/components/Stats/Stats.tsx +2 -2
  260. package/src/components/Switch/Switch.tsx +12 -7
  261. package/src/components/TabBar/TabBar.tsx +9 -8
  262. package/src/components/Text/Text.tsx +13 -1
  263. package/src/components/Textarea/Textarea.tsx +18 -32
  264. package/src/components/Toggle/Toggle.tsx +3 -3
  265. package/src/hooks/useConfirmDialog.ts +31 -42
  266. package/src/index.ts +3 -4
  267. package/src/theme/ThemeProvider.tsx +1 -4
  268. package/src/theme/colorUtils.ts +1 -72
  269. package/src/theme/colors.ts +40 -1
  270. package/src/theme/types.ts +2 -2
  271. package/src/utils/animations.ts +0 -47
  272. package/src/utils/curatedIcons.ts +93 -801
  273. package/src/utils/haptics.ts +13 -208
  274. package/src/utils/icons.ts +27 -91
  275. package/src/utils/pressable.ts +10 -61
  276. package/dist/VirtualList.d.mts +0 -19
  277. package/dist/VirtualList.d.ts +0 -19
  278. package/dist/VirtualList.js +0 -38
  279. package/dist/VirtualList.mjs +0 -2
  280. package/dist/chunk-2BA3JMKK.mjs +0 -136
  281. package/dist/chunk-3DKJ2GIC.mjs +0 -30
  282. package/dist/chunk-7ELGZ66G.mjs +0 -164
  283. package/dist/chunk-DVK4G2GT.mjs +0 -59
  284. package/dist/chunk-EJ7ZPXOH.mjs +0 -163
  285. package/dist/chunk-KA7LTET3.mjs +0 -71
  286. package/dist/chunk-LNPKGWBG.mjs +0 -134
  287. package/dist/chunk-NC5ZTR2Y.mjs +0 -32
  288. package/dist/chunk-SAWUXP3A.mjs +0 -1114
  289. package/dist/chunk-Y6FXYEAI.mjs +0 -8
  290. package/dist/chunk-YNROWHQJ.mjs +0 -46
  291. package/src/components/VirtualList/VirtualList.tsx +0 -60
  292. package/src/components/VirtualList/index.ts +0 -1
  293. package/src/utils/fontGuard.ts +0 -35
  294. package/src/utils/hover.ts +0 -25
  295. package/src/utils/useColorTransition.ts +0 -40
  296. package/src/utils/usePressScale.ts +0 -75
@@ -0,0 +1,581 @@
1
+ import { Spinner } from './chunk-2VIDP72N.mjs';
2
+ import { selectionAsync, impactMedium } from './chunk-ARONDO7M.mjs';
3
+ import { RADIUS } from './chunk-QY3X2UYR.mjs';
4
+ import { Icon } from './chunk-MZ6WRTD2.mjs';
5
+ import { useTheme } from './chunk-KSSVIFYR.mjs';
6
+ import { s, vs, ms } from './chunk-2CE3TQVY.mjs';
7
+ import React, { useRef, useState, useId, useMemo, useCallback } from 'react';
8
+ import { Dimensions, StyleSheet, TouchableOpacity, View, Text } from 'react-native';
9
+ import { ScrollView } from 'react-native-gesture-handler';
10
+ import { BottomSheetBackdrop, BottomSheetModal, BottomSheetScrollView } from '@gorhom/bottom-sheet';
11
+ import { useSafeAreaInsets } from 'react-native-safe-area-context';
12
+
13
+ // src/utils/curatedIcons.ts
14
+ var CATEGORIES = [
15
+ {
16
+ name: "acciones",
17
+ label: "Actions",
18
+ labelEs: "Acciones",
19
+ categoryIcon: "zap",
20
+ icons: [
21
+ "plus",
22
+ "x",
23
+ "check",
24
+ "edit-2",
25
+ "search",
26
+ "settings",
27
+ "filter",
28
+ "trash-2",
29
+ "copy",
30
+ "save",
31
+ "share-2",
32
+ "download",
33
+ "upload",
34
+ "refresh-cw",
35
+ "lock",
36
+ "bookmark",
37
+ "heart",
38
+ "star",
39
+ "flag",
40
+ "link-2"
41
+ ]
42
+ },
43
+ {
44
+ name: "comunicacion",
45
+ label: "Communication",
46
+ labelEs: "Comunicaci\xF3n",
47
+ categoryIcon: "mail",
48
+ icons: [
49
+ "mail",
50
+ "message-circle",
51
+ "message-square",
52
+ "phone",
53
+ "phone-call",
54
+ "phone-forwarded",
55
+ "phone-incoming",
56
+ "phone-missed",
57
+ "phone-off",
58
+ "phone-outgoing",
59
+ "send",
60
+ "at-sign",
61
+ "paperclip",
62
+ "inbox",
63
+ "volume",
64
+ "volume-1",
65
+ "volume-2",
66
+ "volume-x",
67
+ "mic",
68
+ "mic-off"
69
+ ]
70
+ },
71
+ {
72
+ name: "navegacion",
73
+ label: "Navigation",
74
+ labelEs: "Navegaci\xF3n",
75
+ categoryIcon: "map-pin",
76
+ icons: [
77
+ "arrow-up",
78
+ "arrow-down",
79
+ "arrow-left",
80
+ "arrow-right",
81
+ "chevron-up",
82
+ "chevron-down",
83
+ "chevron-left",
84
+ "chevron-right",
85
+ "chevrons-up",
86
+ "chevrons-down",
87
+ "chevrons-left",
88
+ "chevrons-right",
89
+ "arrow-up-circle",
90
+ "arrow-down-circle",
91
+ "arrow-left-circle",
92
+ "arrow-right-circle",
93
+ "corner-up-left",
94
+ "corner-up-right",
95
+ "corner-down-left",
96
+ "corner-down-right"
97
+ ]
98
+ },
99
+ {
100
+ name: "comida",
101
+ label: "Food",
102
+ labelEs: "Comida",
103
+ categoryIcon: "coffee",
104
+ icons: [
105
+ "coffee",
106
+ "shopping-bag",
107
+ "shopping-cart",
108
+ "package",
109
+ "box",
110
+ "tag",
111
+ "truck",
112
+ "gift",
113
+ "award",
114
+ "star",
115
+ "heart",
116
+ "zap",
117
+ "sun",
118
+ "moon",
119
+ "cloud",
120
+ "droplet",
121
+ "thermometer",
122
+ "wind",
123
+ "map-pin",
124
+ "home"
125
+ ]
126
+ },
127
+ {
128
+ name: "negocios",
129
+ label: "Business",
130
+ labelEs: "Negocios",
131
+ categoryIcon: "briefcase",
132
+ icons: [
133
+ "briefcase",
134
+ "dollar-sign",
135
+ "credit-card",
136
+ "bar-chart",
137
+ "bar-chart-2",
138
+ "pie-chart",
139
+ "trending-up",
140
+ "trending-down",
141
+ "activity",
142
+ "target",
143
+ "hash",
144
+ "percent",
145
+ "file-text",
146
+ "folder",
147
+ "clipboard",
148
+ "calendar",
149
+ "clock",
150
+ "database",
151
+ "archive",
152
+ "terminal"
153
+ ]
154
+ },
155
+ {
156
+ name: "perfil",
157
+ label: "Profile",
158
+ labelEs: "Perfil",
159
+ categoryIcon: "user",
160
+ icons: [
161
+ "user",
162
+ "users",
163
+ "user-check",
164
+ "user-x",
165
+ "user-plus",
166
+ "user-minus",
167
+ "key",
168
+ "shield",
169
+ "shield-off",
170
+ "lock",
171
+ "unlock",
172
+ "log-in",
173
+ "log-out",
174
+ "eye",
175
+ "eye-off",
176
+ "bell",
177
+ "bell-off",
178
+ "settings",
179
+ "tool",
180
+ "sliders"
181
+ ]
182
+ },
183
+ {
184
+ name: "multimedia",
185
+ label: "Media",
186
+ labelEs: "Multimedia",
187
+ categoryIcon: "camera",
188
+ icons: [
189
+ "camera",
190
+ "camera-off",
191
+ "video",
192
+ "video-off",
193
+ "film",
194
+ "music",
195
+ "music-off",
196
+ "headphones",
197
+ "speaker",
198
+ "radio",
199
+ "image",
200
+ "images",
201
+ "play",
202
+ "pause",
203
+ "stop",
204
+ "skip-back",
205
+ "skip-forward",
206
+ "monitor",
207
+ "smart-phone",
208
+ "tablet"
209
+ ]
210
+ },
211
+ {
212
+ name: "texto",
213
+ label: "Text",
214
+ labelEs: "Texto",
215
+ categoryIcon: "type",
216
+ icons: [
217
+ "type",
218
+ "bold",
219
+ "italic",
220
+ "underline",
221
+ "align-left",
222
+ "align-center",
223
+ "align-right",
224
+ "align-justify",
225
+ "list",
226
+ "columns",
227
+ "sidebar",
228
+ "minimize-2",
229
+ "maximize-2",
230
+ "edit-3",
231
+ "feather",
232
+ "circle",
233
+ "square",
234
+ "plus-circle",
235
+ "minus-circle",
236
+ "x-circle"
237
+ ]
238
+ }
239
+ ];
240
+ var _allIcons = null;
241
+ var _categorized = null;
242
+ function getAllCuratedIcons() {
243
+ if (!_allIcons) {
244
+ const seen = /* @__PURE__ */ new Set();
245
+ const result = [];
246
+ for (const cat of CATEGORIES) {
247
+ for (const name of cat.icons) {
248
+ if (!seen.has(name)) {
249
+ seen.add(name);
250
+ result.push(name);
251
+ }
252
+ }
253
+ }
254
+ _allIcons = result;
255
+ }
256
+ return _allIcons;
257
+ }
258
+ function getCuratedCategories() {
259
+ if (!_categorized) {
260
+ _categorized = CATEGORIES.map((cat) => ({ ...cat, icons: [...cat.icons] }));
261
+ }
262
+ return _categorized;
263
+ }
264
+
265
+ // src/components/IconPicker/IconPicker.tsx
266
+ var NUM_COLUMNS = 6;
267
+ var GAP = 6;
268
+ var TRIGGER_SIZE = s(56);
269
+ var SCREEN_HEIGHT = Dimensions.get("window").height;
270
+ function IconCell({ name, selected, size, onPress }) {
271
+ const { colors } = useTheme();
272
+ const handlePress = () => {
273
+ selectionAsync();
274
+ onPress();
275
+ };
276
+ const iconColor = selected ? colors.primaryForeground : colors.foreground;
277
+ const bg = selected ? colors.primary : "transparent";
278
+ return /* @__PURE__ */ React.createElement(
279
+ TouchableOpacity,
280
+ {
281
+ onPress: handlePress,
282
+ activeOpacity: 0.6,
283
+ touchSoundDisabled: true,
284
+ accessibilityRole: "button",
285
+ accessibilityState: { selected },
286
+ accessibilityLabel: name,
287
+ style: [styles.cell, { width: size, height: size, backgroundColor: bg }]
288
+ },
289
+ /* @__PURE__ */ React.createElement(Icon, { name, size: ms(20), color: iconColor })
290
+ );
291
+ }
292
+ var IconCellMemo = React.memo(IconCell);
293
+ function IconPicker({
294
+ value,
295
+ onChange,
296
+ label,
297
+ error,
298
+ hint,
299
+ disabled = false,
300
+ numColumns = NUM_COLUMNS,
301
+ gap = GAP,
302
+ style
303
+ }) {
304
+ const { colors } = useTheme();
305
+ const insets = useSafeAreaInsets();
306
+ const sheetRef = useRef(null);
307
+ const catScrollRef = useRef(null);
308
+ const [activeCategory, setActiveCategory] = useState(null);
309
+ const [containerWidth, setContainerWidth] = useState(() => Dimensions.get("window").width - s(16) * 2);
310
+ const [ready, setReady] = useState(false);
311
+ const sheetName = useId();
312
+ const activeIcons = useMemo(() => {
313
+ const allIcons = getAllCuratedIcons();
314
+ if (activeCategory) {
315
+ return getCuratedCategories().find((c) => c.name === activeCategory)?.icons ?? allIcons;
316
+ }
317
+ return allIcons;
318
+ }, [activeCategory]);
319
+ const gapPx = s(gap);
320
+ const cellSize = containerWidth > 0 ? Math.floor((containerWidth - gapPx * (numColumns - 1)) / numColumns) : 0;
321
+ const rows = useMemo(() => {
322
+ const result = [];
323
+ for (let i = 0; i < activeIcons.length; i += numColumns) {
324
+ result.push(activeIcons.slice(i, i + numColumns));
325
+ }
326
+ return result;
327
+ }, [activeIcons, numColumns]);
328
+ const handleDismiss = useCallback(() => {
329
+ setActiveCategory(null);
330
+ setReady(false);
331
+ }, []);
332
+ const handleSelect = useCallback(
333
+ (iconName) => {
334
+ onChange(iconName);
335
+ },
336
+ [onChange]
337
+ );
338
+ const handleOpen = useCallback(() => {
339
+ if (disabled) return;
340
+ impactMedium();
341
+ setActiveCategory(null);
342
+ setReady(false);
343
+ sheetRef.current?.present();
344
+ }, [disabled]);
345
+ const renderBackdrop = useCallback(
346
+ (props) => /* @__PURE__ */ React.createElement(BottomSheetBackdrop, { ...props, disappearsOnIndex: -1, appearsOnIndex: 0, pressBehavior: "close" }),
347
+ []
348
+ );
349
+ const selectedIcon = value ? /* @__PURE__ */ React.createElement(Icon, { name: value, size: ms(28), color: colors.foreground }) : null;
350
+ return /* @__PURE__ */ React.createElement(View, { style: [styles.triggerContainer, style] }, label ? /* @__PURE__ */ React.createElement(Text, { style: [styles.triggerLabel, { color: colors.foreground }], allowFontScaling: true }, label) : null, /* @__PURE__ */ React.createElement(
351
+ TouchableOpacity,
352
+ {
353
+ onPress: handleOpen,
354
+ disabled,
355
+ activeOpacity: 0.7,
356
+ touchSoundDisabled: true,
357
+ accessibilityRole: "button",
358
+ accessibilityLabel: label ?? "Seleccionar icono",
359
+ accessibilityState: { disabled },
360
+ style: [
361
+ styles.trigger,
362
+ {
363
+ backgroundColor: disabled ? colors.surface : colors.background,
364
+ width: TRIGGER_SIZE,
365
+ height: TRIGGER_SIZE,
366
+ borderColor: error ? colors.destructive : value ? colors.primary : colors.border
367
+ },
368
+ disabled && styles.triggerDisabled
369
+ ]
370
+ },
371
+ selectedIcon ?? /* @__PURE__ */ React.createElement(Icon, { name: "plus", size: ms(24), color: colors.foregroundMuted })
372
+ ), error ? /* @__PURE__ */ React.createElement(
373
+ Text,
374
+ {
375
+ style: [styles.helperText, { color: colors.destructive }],
376
+ allowFontScaling: true,
377
+ accessibilityLiveRegion: "polite"
378
+ },
379
+ error
380
+ ) : null, !error && hint ? /* @__PURE__ */ React.createElement(Text, { style: [styles.helperText, { color: colors.foregroundMuted }], allowFontScaling: true }, hint) : null, /* @__PURE__ */ React.createElement(
381
+ BottomSheetModal,
382
+ {
383
+ ref: sheetRef,
384
+ name: sheetName,
385
+ onDismiss: handleDismiss,
386
+ enableDynamicSizing: true,
387
+ maxDynamicContentSize: SCREEN_HEIGHT * 0.7,
388
+ backdropComponent: renderBackdrop,
389
+ backgroundStyle: { ...styles.sheetBackground, backgroundColor: colors.card },
390
+ handleIndicatorStyle: { ...styles.handle, backgroundColor: colors.border },
391
+ enablePanDownToClose: true,
392
+ topInset: insets.top,
393
+ android_keyboardInputMode: "adjustPan"
394
+ },
395
+ /* @__PURE__ */ React.createElement(
396
+ BottomSheetScrollView,
397
+ {
398
+ contentContainerStyle: styles.sheetContent,
399
+ showsVerticalScrollIndicator: true
400
+ },
401
+ /* @__PURE__ */ React.createElement(
402
+ View,
403
+ {
404
+ style: styles.gridContainer,
405
+ onLayout: (e) => {
406
+ setContainerWidth(e.nativeEvent.layout.width);
407
+ setReady(true);
408
+ }
409
+ },
410
+ !ready ? /* @__PURE__ */ React.createElement(View, { style: styles.loader }, /* @__PURE__ */ React.createElement(Spinner, { size: "md", color: colors.primary, label: "Cargando iconos..." })) : /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(Text, { style: [styles.sectionLabel, { color: colors.foregroundSubtle }], allowFontScaling: true }, "Categor\xEDas"), /* @__PURE__ */ React.createElement(
411
+ ScrollView,
412
+ {
413
+ ref: catScrollRef,
414
+ horizontal: true,
415
+ showsHorizontalScrollIndicator: false,
416
+ contentContainerStyle: styles.categoryStrip,
417
+ style: styles.categoryScroll
418
+ },
419
+ /* @__PURE__ */ React.createElement(
420
+ TouchableOpacity,
421
+ {
422
+ onPress: () => setActiveCategory(null),
423
+ activeOpacity: 0.7,
424
+ touchSoundDisabled: true,
425
+ accessibilityRole: "button",
426
+ accessibilityLabel: "Todas",
427
+ accessibilityState: { selected: activeCategory === null },
428
+ style: [
429
+ styles.categoryChip,
430
+ {
431
+ backgroundColor: activeCategory === null ? colors.primary : colors.surface,
432
+ borderColor: activeCategory === null ? colors.primary : colors.border
433
+ }
434
+ ]
435
+ },
436
+ /* @__PURE__ */ React.createElement(View, { style: styles.categoryChipInner }, /* @__PURE__ */ React.createElement(Icon, { name: "grid", size: ms(14), color: activeCategory === null ? colors.primaryForeground : colors.foregroundSubtle }), /* @__PURE__ */ React.createElement(
437
+ Text,
438
+ {
439
+ style: [
440
+ styles.categoryChipText,
441
+ { color: activeCategory === null ? colors.primaryForeground : colors.foreground }
442
+ ],
443
+ allowFontScaling: true,
444
+ numberOfLines: 1
445
+ },
446
+ "Todas"
447
+ ))
448
+ ),
449
+ getCuratedCategories().map((cat) => /* @__PURE__ */ React.createElement(
450
+ TouchableOpacity,
451
+ {
452
+ key: cat.name,
453
+ onPress: () => setActiveCategory(cat.name),
454
+ activeOpacity: 0.7,
455
+ touchSoundDisabled: true,
456
+ accessibilityRole: "button",
457
+ accessibilityLabel: cat.labelEs,
458
+ accessibilityState: { selected: activeCategory === cat.name },
459
+ style: [
460
+ styles.categoryChip,
461
+ {
462
+ backgroundColor: activeCategory === cat.name ? colors.primary : colors.surface,
463
+ borderColor: activeCategory === cat.name ? colors.primary : colors.border
464
+ }
465
+ ]
466
+ },
467
+ /* @__PURE__ */ React.createElement(View, { style: styles.categoryChipInner }, /* @__PURE__ */ React.createElement(Icon, { name: cat.categoryIcon, size: ms(14), color: activeCategory === cat.name ? colors.primaryForeground : colors.foregroundSubtle }), /* @__PURE__ */ React.createElement(
468
+ Text,
469
+ {
470
+ style: [
471
+ styles.categoryChipText,
472
+ { color: activeCategory === cat.name ? colors.primaryForeground : colors.foreground }
473
+ ],
474
+ allowFontScaling: true,
475
+ numberOfLines: 1
476
+ },
477
+ cat.labelEs
478
+ ))
479
+ ))
480
+ ), /* @__PURE__ */ React.createElement(View, { style: [styles.separator, { backgroundColor: colors.border }] }), cellSize > 0 ? rows.map((row, i) => /* @__PURE__ */ React.createElement(View, { key: row[0] ?? `row-${i}`, style: [styles.row, { marginBottom: gapPx }] }, row.map((name) => /* @__PURE__ */ React.createElement(
481
+ IconCellMemo,
482
+ {
483
+ key: name,
484
+ name,
485
+ selected: value === name,
486
+ size: cellSize,
487
+ onPress: () => {
488
+ handleSelect(name);
489
+ sheetRef.current?.dismiss();
490
+ }
491
+ }
492
+ )), Array.from({ length: numColumns - row.length }).map((_, j) => /* @__PURE__ */ React.createElement(View, { key: `spacer-${j}`, style: { width: cellSize, height: cellSize } })))) : null)
493
+ )
494
+ )
495
+ ));
496
+ }
497
+ var styles = StyleSheet.create({
498
+ triggerContainer: {
499
+ gap: vs(8)
500
+ },
501
+ triggerLabel: {
502
+ fontFamily: "Sohne-Medium",
503
+ fontSize: ms(14)
504
+ },
505
+ trigger: {
506
+ borderRadius: RADIUS.md,
507
+ borderWidth: 1,
508
+ alignItems: "center",
509
+ justifyContent: "center"
510
+ },
511
+ triggerDisabled: {
512
+ opacity: 0.6
513
+ },
514
+ helperText: {
515
+ fontFamily: "Sohne-Regular",
516
+ fontSize: ms(13)
517
+ },
518
+ sheetBackground: {
519
+ borderTopLeftRadius: ms(16),
520
+ borderTopRightRadius: ms(16)
521
+ },
522
+ handle: {
523
+ width: s(36),
524
+ height: vs(4),
525
+ borderRadius: ms(2)
526
+ },
527
+ sheetContent: {
528
+ paddingHorizontal: s(16),
529
+ paddingBottom: vs(24)
530
+ },
531
+ sectionLabel: {
532
+ fontFamily: "Sohne-Medium",
533
+ fontSize: ms(12),
534
+ marginBottom: vs(8),
535
+ textTransform: "uppercase",
536
+ letterSpacing: 0.5
537
+ },
538
+ categoryScroll: {
539
+ flexGrow: 0,
540
+ flexShrink: 0
541
+ },
542
+ categoryStrip: {
543
+ gap: s(8)
544
+ },
545
+ categoryChip: {
546
+ borderRadius: RADIUS.full,
547
+ borderWidth: 1,
548
+ paddingVertical: vs(6),
549
+ paddingHorizontal: s(12)
550
+ },
551
+ categoryChipInner: {
552
+ flexDirection: "row",
553
+ alignItems: "center",
554
+ gap: s(6)
555
+ },
556
+ categoryChipText: {
557
+ fontFamily: "Sohne-Medium",
558
+ fontSize: ms(12)
559
+ },
560
+ separator: {
561
+ height: StyleSheet.hairlineWidth,
562
+ marginVertical: vs(12)
563
+ },
564
+ gridContainer: {},
565
+ row: {
566
+ flexDirection: "row",
567
+ gap: GAP
568
+ },
569
+ cell: {
570
+ borderRadius: RADIUS.md,
571
+ alignItems: "center",
572
+ justifyContent: "center"
573
+ },
574
+ loader: {
575
+ minHeight: vs(200),
576
+ alignItems: "center",
577
+ justifyContent: "center"
578
+ }
579
+ });
580
+
581
+ export { IconPicker };
@@ -1,13 +1,11 @@
1
- import { usePressScale } from './chunk-YNROWHQJ.mjs';
2
- import { selectionAsync } from './chunk-EJ7ZPXOH.mjs';
3
- import { PRESS_SCALE } from './chunk-DVK4G2GT.mjs';
1
+ import { PressableChip } from './chunk-IFYMBOEN.mjs';
2
+ import { selectionAsync } from './chunk-ARONDO7M.mjs';
4
3
  import { RADIUS } from './chunk-QY3X2UYR.mjs';
5
- import { renderIcon } from './chunk-KA7LTET3.mjs';
6
- import { useTheme } from './chunk-YTXRIXNZ.mjs';
4
+ import { Icon } from './chunk-MZ6WRTD2.mjs';
5
+ import { useTheme } from './chunk-KSSVIFYR.mjs';
7
6
  import { mvs, ms, vs, s } from './chunk-2CE3TQVY.mjs';
8
7
  import React, { useState } from 'react';
9
- import { StyleSheet, ScrollView, View, TouchableOpacity, Text } from 'react-native';
10
- import Animated from 'react-native-reanimated';
8
+ import { StyleSheet, ScrollView, View, Text } from 'react-native';
11
9
 
12
10
  function isSelected(value, candidate) {
13
11
  if (value == null) return false;
@@ -15,29 +13,23 @@ function isSelected(value, candidate) {
15
13
  }
16
14
  function Cell({ item, selected, width, onPress }) {
17
15
  const { colors } = useTheme();
18
- const { animatedStyle, onPressIn, onPressOut, hoverHandlers } = usePressScale({
19
- pressScale: PRESS_SCALE.chip,
20
- disabled: item.disabled
21
- });
22
16
  const iconColor = selected ? colors.primary : colors.foregroundSubtle;
23
- const iconNode = item.icon ?? (item.iconName ? renderIcon(item.iconName, ms(24), iconColor) : null);
24
- return /* @__PURE__ */ React.createElement(Animated.View, { style: [{ width }, animatedStyle] }, /* @__PURE__ */ React.createElement(
25
- TouchableOpacity,
17
+ const iconNode = item.icon ?? (item.iconName ? /* @__PURE__ */ React.createElement(Icon, { name: item.iconName, size: ms(24), color: iconColor }) : null);
18
+ return /* @__PURE__ */ React.createElement(
19
+ PressableChip,
26
20
  {
27
21
  onPress,
28
- onPressIn,
29
- onPressOut,
30
- disabled: item.disabled,
31
- activeOpacity: 1,
22
+ enabled: !item.disabled,
23
+ rippleColor: "transparent",
32
24
  touchSoundDisabled: true,
25
+ activateOnHover: true,
33
26
  accessibilityRole: "button",
34
27
  accessibilityState: { selected, disabled: item.disabled },
35
28
  accessibilityLabel: item.label ?? String(item.value),
36
- ...hoverHandlers,
37
29
  style: [
30
+ { width },
38
31
  styles.cell,
39
32
  {
40
- backgroundColor: selected ? colors.primary + "14" : colors.surface,
41
33
  borderColor: selected ? colors.primary : "transparent"
42
34
  },
43
35
  item.disabled && styles.cellDisabled
@@ -53,7 +45,7 @@ function Cell({ item, selected, width, onPress }) {
53
45
  },
54
46
  item.label
55
47
  ) : null
56
- ));
48
+ );
57
49
  }
58
50
  function SelectableGrid({
59
51
  items,
@@ -124,22 +116,21 @@ var styles = StyleSheet.create({
124
116
  paddingHorizontal: s(4)
125
117
  },
126
118
  cell: {
127
- flex: 1,
128
119
  borderRadius: RADIUS.md,
129
120
  borderWidth: 2,
130
121
  alignItems: "center",
131
122
  justifyContent: "center",
132
123
  gap: vs(4),
133
- paddingHorizontal: s(12),
134
- paddingVertical: vs(12)
124
+ paddingHorizontal: s(8),
125
+ paddingVertical: vs(10)
135
126
  },
136
127
  cellDisabled: {
137
128
  opacity: 0.4
138
129
  },
139
130
  label: {
140
131
  fontFamily: "Sohne-Medium",
141
- fontSize: ms(12),
142
- lineHeight: mvs(15),
132
+ fontSize: ms(11),
133
+ lineHeight: mvs(14),
143
134
  textAlign: "center"
144
135
  }
145
136
  });
@@ -1,5 +1,5 @@
1
1
  import { RADIUS } from './chunk-QY3X2UYR.mjs';
2
- import { useTheme } from './chunk-YTXRIXNZ.mjs';
2
+ import { useTheme } from './chunk-KSSVIFYR.mjs';
3
3
  import { vs, s } from './chunk-2CE3TQVY.mjs';
4
4
  import React from 'react';
5
5
  import { StyleSheet, View, Text } from 'react-native';