@retray-dev/ui-kit 10.0.0 → 10.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 (128) hide show
  1. package/COMPONENTS.md +150 -17
  2. package/CONSUMER.md +1 -1
  3. package/README.md +4 -4
  4. package/dist/Accordion.d.mts +1 -1
  5. package/dist/Accordion.d.ts +1 -1
  6. package/dist/Accordion.js +3 -3
  7. package/dist/Accordion.mjs +2 -2
  8. package/dist/AlertBanner.js +1 -1
  9. package/dist/AlertBanner.mjs +2 -2
  10. package/dist/AppHeader.js +1 -1
  11. package/dist/AppHeader.mjs +3 -3
  12. package/dist/Badge.js +1 -1
  13. package/dist/Badge.mjs +2 -2
  14. package/dist/Button.js +1 -1
  15. package/dist/Button.mjs +2 -2
  16. package/dist/CategoryStrip.js +1 -1
  17. package/dist/CategoryStrip.mjs +2 -2
  18. package/dist/Chip.js +1 -1
  19. package/dist/Chip.mjs +2 -2
  20. package/dist/ConfirmDialog.d.mts +6 -1
  21. package/dist/ConfirmDialog.d.ts +6 -1
  22. package/dist/ConfirmDialog.js +45 -15
  23. package/dist/ConfirmDialog.mjs +3 -3
  24. package/dist/CurrencyInput.js +1 -1
  25. package/dist/CurrencyInput.mjs +3 -3
  26. package/dist/DetailRow.d.mts +1 -1
  27. package/dist/DetailRow.d.ts +1 -1
  28. package/dist/DetailRow.js +1 -1
  29. package/dist/DetailRow.mjs +2 -2
  30. package/dist/EmptyState.js +1 -1
  31. package/dist/EmptyState.mjs +3 -3
  32. package/dist/ErrorBoundary.js +1 -1
  33. package/dist/ErrorBoundary.mjs +2 -2
  34. package/dist/IconButton.js +1 -1
  35. package/dist/IconButton.mjs +2 -2
  36. package/dist/IconPicker.d.mts +17 -0
  37. package/dist/IconPicker.d.ts +17 -0
  38. package/dist/IconPicker.js +997 -0
  39. package/dist/IconPicker.mjs +7 -0
  40. package/dist/ImageUpload.d.mts +3 -1
  41. package/dist/ImageUpload.d.ts +3 -1
  42. package/dist/ImageUpload.js +28 -10
  43. package/dist/ImageUpload.mjs +1 -1
  44. package/dist/ImageViewer.js +282 -141
  45. package/dist/ImageViewer.mjs +5 -3
  46. package/dist/Input.js +1 -1
  47. package/dist/Input.mjs +2 -2
  48. package/dist/LabelValue.js +1 -1
  49. package/dist/LabelValue.mjs +2 -2
  50. package/dist/ListItem.js +1 -1
  51. package/dist/ListItem.mjs +2 -2
  52. package/dist/MediaCard.js +1 -1
  53. package/dist/MediaCard.mjs +2 -2
  54. package/dist/MenuItem.js +1 -1
  55. package/dist/MenuItem.mjs +2 -2
  56. package/dist/NumberStepper.d.mts +19 -0
  57. package/dist/NumberStepper.d.ts +19 -0
  58. package/dist/NumberStepper.js +410 -0
  59. package/dist/NumberStepper.mjs +9 -0
  60. package/dist/PagerDots.js +1 -1
  61. package/dist/PagerDots.mjs +2 -2
  62. package/dist/PricingCard.js +1 -1
  63. package/dist/PricingCard.mjs +4 -4
  64. package/dist/SelectableGrid.js +1 -1
  65. package/dist/SelectableGrid.mjs +2 -2
  66. package/dist/Sheet.js +16 -13
  67. package/dist/Sheet.mjs +1 -1
  68. package/dist/SheetSelect.js +1 -1
  69. package/dist/SheetSelect.mjs +2 -2
  70. package/dist/Switch.js +40 -17
  71. package/dist/Switch.mjs +1 -1
  72. package/dist/TabBar.js +1 -1
  73. package/dist/TabBar.mjs +2 -2
  74. package/dist/Textarea.js +1 -1
  75. package/dist/Textarea.mjs +2 -2
  76. package/dist/Toggle.js +1 -1
  77. package/dist/Toggle.mjs +2 -2
  78. package/dist/chunk-53Z3NYGE.mjs +742 -0
  79. package/dist/{chunk-VQ57HWPL.mjs → chunk-6L4G6PBT.mjs} +1 -1
  80. package/dist/{chunk-6OAZJ577.mjs → chunk-6SECQ2ZF.mjs} +2 -2
  81. package/dist/{chunk-KIHCWCWL.mjs → chunk-7LWRKMF5.mjs} +1 -1
  82. package/dist/{chunk-4I7D47FH.mjs → chunk-AJRVDP2H.mjs} +3 -3
  83. package/dist/{chunk-6MKGPAR2.mjs → chunk-BEMIQXXU.mjs} +1 -1
  84. package/dist/chunk-BUMAMSTZ.mjs +126 -0
  85. package/dist/{chunk-UREA2GYY.mjs → chunk-DYT7BG5I.mjs} +1 -1
  86. package/dist/{chunk-Z4BVUWW6.mjs → chunk-ELXBDILQ.mjs} +20 -32
  87. package/dist/{chunk-A4MDAP7G.mjs → chunk-FCSSQK3L.mjs} +1 -1
  88. package/dist/{chunk-2TFTAWVJ.mjs → chunk-HTHGSXFG.mjs} +1 -1
  89. package/dist/{chunk-VGTDN7SW.mjs → chunk-IX3NYLYQ.mjs} +1 -1
  90. package/dist/{chunk-T7XZ7H7Y.mjs → chunk-KA7LTET3.mjs} +17 -3
  91. package/dist/{chunk-URI2WBIV.mjs → chunk-KOO4WITD.mjs} +1 -1
  92. package/dist/{chunk-JUXSWN54.mjs → chunk-NMU5FMQJ.mjs} +1 -1
  93. package/dist/{chunk-LXJIIOYQ.mjs → chunk-RYZC432S.mjs} +1 -1
  94. package/dist/{chunk-JB67UOB5.mjs → chunk-S2R7UVOE.mjs} +1 -1
  95. package/dist/{chunk-ZUR7AU5R.mjs → chunk-SXLKNTA4.mjs} +1 -1
  96. package/dist/{chunk-3U4SSNWP.mjs → chunk-T2KCAHOS.mjs} +1 -1
  97. package/dist/{chunk-ZJKGQMYH.mjs → chunk-TB6SD2FT.mjs} +1 -1
  98. package/dist/{chunk-AZJF2BLK.mjs → chunk-TBNZHU6C.mjs} +1 -1
  99. package/dist/{chunk-Y4GL2MHX.mjs → chunk-TZDGAP5N.mjs} +28 -10
  100. package/dist/{chunk-CZCQZHG6.mjs → chunk-U2XJFYED.mjs} +1 -1
  101. package/dist/{chunk-TERDKCLE.mjs → chunk-VF2ATYN3.mjs} +1 -1
  102. package/dist/{chunk-OHBNABL5.mjs → chunk-VKID2D2I.mjs} +1 -1
  103. package/dist/{chunk-QKH5ZOD5.mjs → chunk-WF2XDFRK.mjs} +40 -17
  104. package/dist/{chunk-FZZLPJ6B.mjs → chunk-WYEUNUTP.mjs} +44 -15
  105. package/dist/{chunk-PFZTM6D5.mjs → chunk-Y2NS74WS.mjs} +9 -7
  106. package/dist/{chunk-O3HA6TYM.mjs → chunk-YJ7I257J.mjs} +3 -3
  107. package/dist/{chunk-NA7PARID.mjs → chunk-Z4VHZ7B5.mjs} +1 -1
  108. package/dist/{chunk-MLF3EZFW.mjs → chunk-Z6SFHN6T.mjs} +1 -1
  109. package/dist/{chunk-4K625MVM.mjs → chunk-ZZ2R6KZ3.mjs} +1 -1
  110. package/dist/index.d.mts +4 -1
  111. package/dist/index.d.ts +4 -1
  112. package/dist/index.js +1011 -88
  113. package/dist/index.mjs +34 -32
  114. package/package.json +1 -1
  115. package/src/components/Accordion/Accordion.tsx +7 -3
  116. package/src/components/ConfirmDialog/ConfirmDialog.tsx +61 -23
  117. package/src/components/DetailRow/DetailRow.tsx +1 -1
  118. package/src/components/IconPicker/IconPicker.tsx +383 -0
  119. package/src/components/IconPicker/index.ts +1 -0
  120. package/src/components/ImageUpload/ImageUpload.tsx +34 -12
  121. package/src/components/ImageViewer/ImageViewer.tsx +25 -30
  122. package/src/components/NumberStepper/NumberStepper.tsx +147 -0
  123. package/src/components/NumberStepper/index.ts +1 -0
  124. package/src/components/Sheet/Sheet.tsx +10 -9
  125. package/src/components/Switch/Switch.tsx +30 -17
  126. package/src/index.ts +3 -1
  127. package/src/utils/curatedIcons.ts +286 -0
  128. package/src/utils/icons.ts +20 -2
@@ -0,0 +1,286 @@
1
+ /**
2
+ * Curated icon set — ~320 most useful icons organized by category.
3
+ * Ordered by usage probability: most-common categories first, niche last.
4
+ * All names resolve across 6 @expo/vector-icons families via renderIcon().
5
+ */
6
+
7
+ export interface IconCategory {
8
+ name: string
9
+ label: string
10
+ labelEs: string
11
+ /** Icon that represents this category in the tab bar. */
12
+ categoryIcon: string
13
+ icons: string[]
14
+ }
15
+
16
+ export const CURATED_ICONS: IconCategory[] = [
17
+ {
18
+ name: 'food',
19
+ label: 'Food',
20
+ labelEs: 'Comida',
21
+ categoryIcon: 'coffee',
22
+ icons: [
23
+ // Bebidas
24
+ 'coffee',
25
+ 'wine-glass',
26
+ 'beer',
27
+ 'cocktail',
28
+ 'mug-hot',
29
+ 'glass-cheers',
30
+ 'wine',
31
+ // Comidas
32
+ 'restaurant',
33
+ 'hamburger',
34
+ 'pizza-slice',
35
+ 'ice-cream',
36
+ 'cake',
37
+ 'egg',
38
+ 'fish',
39
+ 'bread-slice',
40
+ 'cookie',
41
+ 'cheese',
42
+ 'carrot',
43
+ 'hotdog',
44
+ // Cocina / utilidades
45
+ 'utensils',
46
+ // Delivery / pedidos
47
+ 'shopping-bag',
48
+ 'clock',
49
+ 'star',
50
+ 'heart',
51
+ 'map-pin',
52
+ 'phone',
53
+ ],
54
+ },
55
+ {
56
+ name: 'sports',
57
+ label: 'Sports',
58
+ labelEs: 'Deportes',
59
+ categoryIcon: 'activity',
60
+ icons: [
61
+ // Deportes específicos
62
+ 'futbol',
63
+ 'dumbbell',
64
+ 'running',
65
+ 'bicycle',
66
+ 'heartbeat',
67
+ 'fitness-center',
68
+ // Competencia / logros
69
+ 'target',
70
+ 'award',
71
+ 'flag',
72
+ 'star',
73
+ 'zap',
74
+ // Bienestar
75
+ 'heart',
76
+ 'clock',
77
+ 'activity',
78
+ 'sun',
79
+ 'user',
80
+ 'users',
81
+ ],
82
+ },
83
+ {
84
+ name: 'business',
85
+ label: 'Business',
86
+ labelEs: 'Negocios',
87
+ categoryIcon: 'briefcase',
88
+ icons: [
89
+ 'shopping-cart', 'shopping-bag',
90
+ 'credit-card',
91
+ 'dollar-sign', 'percent',
92
+ 'briefcase',
93
+ 'truck', 'package',
94
+ 'gift',
95
+ 'bar-chart', 'bar-chart-2', 'pie-chart',
96
+ 'trending-up', 'trending-down',
97
+ 'activity',
98
+ 'tag',
99
+ 'bookmark',
100
+ 'pocket',
101
+ ],
102
+ },
103
+ {
104
+ name: 'objects',
105
+ label: 'Objects',
106
+ labelEs: 'Objetos',
107
+ categoryIcon: 'folder',
108
+ icons: [
109
+ 'file', 'file-text', 'file-plus', 'file-minus',
110
+ 'folder', 'folder-plus', 'folder-minus',
111
+ 'lock', 'unlock', 'key',
112
+ 'shield', 'shield-off',
113
+ 'settings',
114
+ 'sliders', 'toggle-left', 'toggle-right',
115
+ 'tool',
116
+ 'printer',
117
+ 'database', 'server', 'hard-drive',
118
+ 'cpu',
119
+ 'paperclip',
120
+ 'aperture', 'box',
121
+ 'radio',
122
+ ],
123
+ },
124
+ {
125
+ name: 'status',
126
+ label: 'Status',
127
+ labelEs: 'Estado',
128
+ categoryIcon: 'alert-circle',
129
+ icons: [
130
+ 'alert-circle', 'alert-triangle', 'alert-octagon',
131
+ 'info', 'help-circle',
132
+ 'bell', 'bell-off',
133
+ 'eye', 'eye-off',
134
+ 'flag',
135
+ 'zap', 'zap-off',
136
+ 'loader', 'clock', 'watch',
137
+ ],
138
+ },
139
+ {
140
+ name: 'actions',
141
+ label: 'Actions',
142
+ labelEs: 'Acciones',
143
+ categoryIcon: 'edit-3',
144
+ icons: [
145
+ 'plus', 'plus-circle', 'plus-square',
146
+ 'minus', 'minus-circle', 'minus-square',
147
+ 'x', 'x-circle', 'x-square', 'x-octagon',
148
+ 'check', 'check-circle', 'check-square',
149
+ 'edit', 'edit-2', 'edit-3',
150
+ 'trash', 'trash-2',
151
+ 'copy', 'clipboard', 'scissors',
152
+ 'download', 'download-cloud', 'upload', 'upload-cloud',
153
+ 'share', 'share-2', 'link', 'link-2',
154
+ 'search', 'zoom-in', 'zoom-out',
155
+ 'save', 'archive',
156
+ 'log-in', 'log-out', 'power',
157
+ 'refresh-cw', 'rotate-cw',
158
+ 'slash',
159
+ ],
160
+ },
161
+ {
162
+ name: 'communication',
163
+ label: 'Communication',
164
+ labelEs: 'Comunicación',
165
+ categoryIcon: 'message-circle',
166
+ icons: [
167
+ 'mail',
168
+ 'message-circle', 'message-square',
169
+ 'send',
170
+ 'phone', 'phone-call', 'phone-incoming', 'phone-outgoing',
171
+ 'phone-missed', 'phone-off', 'phone-forwarded',
172
+ 'at-sign', 'inbox',
173
+ 'user', 'user-plus', 'user-minus', 'user-check', 'user-x',
174
+ 'users',
175
+ 'smile', 'frown', 'meh',
176
+ 'heart', 'thumbs-up', 'thumbs-down',
177
+ 'star',
178
+ 'award',
179
+ ],
180
+ },
181
+ {
182
+ name: 'navigation',
183
+ label: 'Navigation',
184
+ labelEs: 'Navegación',
185
+ categoryIcon: 'compass',
186
+ icons: [
187
+ 'arrow-up', 'arrow-down', 'arrow-left', 'arrow-right',
188
+ 'arrow-up-left', 'arrow-up-right', 'arrow-down-left', 'arrow-down-right',
189
+ 'chevron-up', 'chevron-down', 'chevron-left', 'chevron-right',
190
+ 'chevrons-up', 'chevrons-down', 'chevrons-left', 'chevrons-right',
191
+ 'corner-up-left', 'corner-up-right', 'corner-down-left', 'corner-down-right',
192
+ 'corner-left-up', 'corner-left-down', 'corner-right-up', 'corner-right-down',
193
+ 'refresh-cw', 'refresh-ccw', 'rotate-cw', 'rotate-ccw',
194
+ 'navigation', 'navigation-2', 'compass', 'map', 'map-pin', 'target', 'crosshair',
195
+ 'home', 'maximize', 'maximize-2', 'minimize', 'minimize-2',
196
+ 'external-link', 'move', 'anchor',
197
+ ],
198
+ },
199
+ {
200
+ name: 'media',
201
+ label: 'Media',
202
+ labelEs: 'Medios',
203
+ categoryIcon: 'image',
204
+ icons: [
205
+ 'image', 'film', 'video', 'video-off',
206
+ 'play', 'play-circle', 'pause', 'pause-circle',
207
+ 'square', 'stop-circle',
208
+ 'music', 'headphones', 'speaker',
209
+ 'camera', 'camera-off',
210
+ 'mic', 'mic-off',
211
+ 'volume', 'volume-1', 'volume-2', 'volume-x',
212
+ 'fast-forward', 'rewind', 'skip-forward', 'skip-back',
213
+ 'repeat', 'shuffle',
214
+ 'disc',
215
+ ],
216
+ },
217
+ {
218
+ name: 'layout',
219
+ label: 'Layout',
220
+ labelEs: 'Diseño',
221
+ categoryIcon: 'grid',
222
+ icons: [
223
+ 'menu', 'more-horizontal', 'more-vertical',
224
+ 'grid', 'columns', 'sidebar', 'layout',
225
+ 'list',
226
+ 'align-left', 'align-center', 'align-right', 'align-justify',
227
+ 'bold', 'italic', 'underline',
228
+ 'type',
229
+ 'filter',
230
+ 'crop',
231
+ 'layers',
232
+ 'hash',
233
+ 'table', 'trello',
234
+ 'circle', 'square', 'triangle', 'hexagon', 'octagon',
235
+ 'feather', 'pen-tool',
236
+ ],
237
+ },
238
+ {
239
+ name: 'nature',
240
+ label: 'Nature',
241
+ labelEs: 'Naturaleza',
242
+ categoryIcon: 'sun',
243
+ icons: [
244
+ 'sun', 'sunrise', 'sunset', 'moon',
245
+ 'cloud', 'cloud-drizzle', 'cloud-lightning',
246
+ 'cloud-off', 'cloud-rain', 'cloud-snow',
247
+ 'wind', 'umbrella', 'thermometer',
248
+ 'droplet',
249
+ 'life-buoy',
250
+ ],
251
+ },
252
+ {
253
+ name: 'brands',
254
+ label: 'Brands',
255
+ labelEs: 'Marcas',
256
+ categoryIcon: 'globe',
257
+ icons: [
258
+ 'github', 'gitlab',
259
+ 'twitter',
260
+ 'facebook', 'instagram',
261
+ 'linkedin',
262
+ 'youtube',
263
+ 'dribbble',
264
+ 'twitch', 'slack', 'figma', 'framer',
265
+ 'chrome', 'codepen', 'codesandbox',
266
+ 'globe', 'rss',
267
+ 'airplay', 'cast',
268
+ 'bluetooth', 'wifi', 'wifi-off',
269
+ 'battery', 'battery-charging',
270
+ 'monitor', 'tablet', 'smartphone', 'tv',
271
+ ],
272
+ },
273
+ ]
274
+
275
+ /** Flat deduplicated array of all curated icon names (for "Todos" / search). */
276
+ export const ALL_CURATED_ICONS: string[] = [
277
+ ...new Set(CURATED_ICONS.flatMap((c) => c.icons)),
278
+ ]
279
+
280
+ /** Resolve icon to its category label, or undefined if not found. */
281
+ export function getIconCategory(name: string): string | undefined {
282
+ for (const cat of CURATED_ICONS) {
283
+ if (cat.icons.includes(name)) return cat.label
284
+ }
285
+ return undefined
286
+ }
@@ -62,9 +62,9 @@ export function configureIconFamilies(families: IconFamily[]): void {
62
62
  resolvedCache = null // invalidate — rebuilt lazily on next resolve
63
63
  }
64
64
 
65
- function buildCache(): Map<string, IconFamilyEntry> {
65
+ function buildCache(families?: IconFamilyEntry[]): Map<string, IconFamilyEntry> {
66
66
  const cache = new Map<string, IconFamilyEntry>()
67
- for (const family of activeFamilies) {
67
+ for (const family of (families ?? activeFamilies)) {
68
68
  const glyphMap = family.getGlyphMap()
69
69
  for (const iconName of Object.keys(glyphMap)) {
70
70
  cache.set(iconName, family)
@@ -80,6 +80,24 @@ function resolveFamily(name: string): IconFamilyEntry | null {
80
80
  return resolvedCache.get(name) ?? null
81
81
  }
82
82
 
83
+ let cachedIconNames: string[] | null = null
84
+
85
+ export function getValidIconNames(families?: IconFamily[]): string[] {
86
+ if (families && families.length > 0) {
87
+ const tempFamilies = families
88
+ .map((n) => ALL_FAMILIES.find((f) => f.name === n))
89
+ .filter((f): f is IconFamilyEntry => f !== undefined)
90
+ if (tempFamilies.length === 0) return []
91
+ const cache = buildCache(tempFamilies)
92
+ return Array.from(cache.keys())
93
+ }
94
+ if (!cachedIconNames) {
95
+ const cache = buildCache()
96
+ cachedIconNames = Array.from(cache.keys())
97
+ }
98
+ return cachedIconNames
99
+ }
100
+
83
101
  export function Icon({ name, size, color, family }: IconProps): React.ReactElement | null {
84
102
  let resolved: IconFamilyEntry | null = null
85
103