@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,742 @@
1
+ import { selectionAsync, impactMedium } from './chunk-EJ7ZPXOH.mjs';
2
+ import { RADIUS } from './chunk-QY3X2UYR.mjs';
3
+ import { renderIcon } from './chunk-KA7LTET3.mjs';
4
+ import { useTheme } from './chunk-SOYNZDVY.mjs';
5
+ import { s, vs, ms } from './chunk-2CE3TQVY.mjs';
6
+ import React, { useRef, useState, useId, useMemo, useEffect, useCallback } from 'react';
7
+ import { Dimensions, StyleSheet, TouchableOpacity, View, Text } from 'react-native';
8
+ import { ScrollView } from 'react-native-gesture-handler';
9
+ import { BottomSheetBackdrop, BottomSheetModal, BottomSheetScrollView } from '@gorhom/bottom-sheet';
10
+ import { useSafeAreaInsets } from 'react-native-safe-area-context';
11
+
12
+ // src/utils/curatedIcons.ts
13
+ var CURATED_ICONS = [
14
+ {
15
+ name: "food",
16
+ label: "Food",
17
+ labelEs: "Comida",
18
+ categoryIcon: "coffee",
19
+ icons: [
20
+ // Bebidas
21
+ "coffee",
22
+ "wine-glass",
23
+ "beer",
24
+ "cocktail",
25
+ "mug-hot",
26
+ "glass-cheers",
27
+ "wine",
28
+ // Comidas
29
+ "restaurant",
30
+ "hamburger",
31
+ "pizza-slice",
32
+ "ice-cream",
33
+ "cake",
34
+ "egg",
35
+ "fish",
36
+ "bread-slice",
37
+ "cookie",
38
+ "cheese",
39
+ "carrot",
40
+ "hotdog",
41
+ // Cocina / utilidades
42
+ "utensils",
43
+ // Delivery / pedidos
44
+ "shopping-bag",
45
+ "clock",
46
+ "star",
47
+ "heart",
48
+ "map-pin",
49
+ "phone"
50
+ ]
51
+ },
52
+ {
53
+ name: "sports",
54
+ label: "Sports",
55
+ labelEs: "Deportes",
56
+ categoryIcon: "activity",
57
+ icons: [
58
+ // Deportes específicos
59
+ "futbol",
60
+ "dumbbell",
61
+ "running",
62
+ "bicycle",
63
+ "heartbeat",
64
+ "fitness-center",
65
+ // Competencia / logros
66
+ "target",
67
+ "award",
68
+ "flag",
69
+ "star",
70
+ "zap",
71
+ // Bienestar
72
+ "heart",
73
+ "clock",
74
+ "activity",
75
+ "sun",
76
+ "user",
77
+ "users"
78
+ ]
79
+ },
80
+ {
81
+ name: "business",
82
+ label: "Business",
83
+ labelEs: "Negocios",
84
+ categoryIcon: "briefcase",
85
+ icons: [
86
+ "shopping-cart",
87
+ "shopping-bag",
88
+ "credit-card",
89
+ "dollar-sign",
90
+ "percent",
91
+ "briefcase",
92
+ "truck",
93
+ "package",
94
+ "gift",
95
+ "bar-chart",
96
+ "bar-chart-2",
97
+ "pie-chart",
98
+ "trending-up",
99
+ "trending-down",
100
+ "activity",
101
+ "tag",
102
+ "bookmark",
103
+ "pocket"
104
+ ]
105
+ },
106
+ {
107
+ name: "objects",
108
+ label: "Objects",
109
+ labelEs: "Objetos",
110
+ categoryIcon: "folder",
111
+ icons: [
112
+ "file",
113
+ "file-text",
114
+ "file-plus",
115
+ "file-minus",
116
+ "folder",
117
+ "folder-plus",
118
+ "folder-minus",
119
+ "lock",
120
+ "unlock",
121
+ "key",
122
+ "shield",
123
+ "shield-off",
124
+ "settings",
125
+ "sliders",
126
+ "toggle-left",
127
+ "toggle-right",
128
+ "tool",
129
+ "printer",
130
+ "database",
131
+ "server",
132
+ "hard-drive",
133
+ "cpu",
134
+ "paperclip",
135
+ "aperture",
136
+ "box",
137
+ "radio"
138
+ ]
139
+ },
140
+ {
141
+ name: "status",
142
+ label: "Status",
143
+ labelEs: "Estado",
144
+ categoryIcon: "alert-circle",
145
+ icons: [
146
+ "alert-circle",
147
+ "alert-triangle",
148
+ "alert-octagon",
149
+ "info",
150
+ "help-circle",
151
+ "bell",
152
+ "bell-off",
153
+ "eye",
154
+ "eye-off",
155
+ "flag",
156
+ "zap",
157
+ "zap-off",
158
+ "loader",
159
+ "clock",
160
+ "watch"
161
+ ]
162
+ },
163
+ {
164
+ name: "actions",
165
+ label: "Actions",
166
+ labelEs: "Acciones",
167
+ categoryIcon: "edit-3",
168
+ icons: [
169
+ "plus",
170
+ "plus-circle",
171
+ "plus-square",
172
+ "minus",
173
+ "minus-circle",
174
+ "minus-square",
175
+ "x",
176
+ "x-circle",
177
+ "x-square",
178
+ "x-octagon",
179
+ "check",
180
+ "check-circle",
181
+ "check-square",
182
+ "edit",
183
+ "edit-2",
184
+ "edit-3",
185
+ "trash",
186
+ "trash-2",
187
+ "copy",
188
+ "clipboard",
189
+ "scissors",
190
+ "download",
191
+ "download-cloud",
192
+ "upload",
193
+ "upload-cloud",
194
+ "share",
195
+ "share-2",
196
+ "link",
197
+ "link-2",
198
+ "search",
199
+ "zoom-in",
200
+ "zoom-out",
201
+ "save",
202
+ "archive",
203
+ "log-in",
204
+ "log-out",
205
+ "power",
206
+ "refresh-cw",
207
+ "rotate-cw",
208
+ "slash"
209
+ ]
210
+ },
211
+ {
212
+ name: "communication",
213
+ label: "Communication",
214
+ labelEs: "Comunicaci\xF3n",
215
+ categoryIcon: "message-circle",
216
+ icons: [
217
+ "mail",
218
+ "message-circle",
219
+ "message-square",
220
+ "send",
221
+ "phone",
222
+ "phone-call",
223
+ "phone-incoming",
224
+ "phone-outgoing",
225
+ "phone-missed",
226
+ "phone-off",
227
+ "phone-forwarded",
228
+ "at-sign",
229
+ "inbox",
230
+ "user",
231
+ "user-plus",
232
+ "user-minus",
233
+ "user-check",
234
+ "user-x",
235
+ "users",
236
+ "smile",
237
+ "frown",
238
+ "meh",
239
+ "heart",
240
+ "thumbs-up",
241
+ "thumbs-down",
242
+ "star",
243
+ "award"
244
+ ]
245
+ },
246
+ {
247
+ name: "navigation",
248
+ label: "Navigation",
249
+ labelEs: "Navegaci\xF3n",
250
+ categoryIcon: "compass",
251
+ icons: [
252
+ "arrow-up",
253
+ "arrow-down",
254
+ "arrow-left",
255
+ "arrow-right",
256
+ "arrow-up-left",
257
+ "arrow-up-right",
258
+ "arrow-down-left",
259
+ "arrow-down-right",
260
+ "chevron-up",
261
+ "chevron-down",
262
+ "chevron-left",
263
+ "chevron-right",
264
+ "chevrons-up",
265
+ "chevrons-down",
266
+ "chevrons-left",
267
+ "chevrons-right",
268
+ "corner-up-left",
269
+ "corner-up-right",
270
+ "corner-down-left",
271
+ "corner-down-right",
272
+ "corner-left-up",
273
+ "corner-left-down",
274
+ "corner-right-up",
275
+ "corner-right-down",
276
+ "refresh-cw",
277
+ "refresh-ccw",
278
+ "rotate-cw",
279
+ "rotate-ccw",
280
+ "navigation",
281
+ "navigation-2",
282
+ "compass",
283
+ "map",
284
+ "map-pin",
285
+ "target",
286
+ "crosshair",
287
+ "home",
288
+ "maximize",
289
+ "maximize-2",
290
+ "minimize",
291
+ "minimize-2",
292
+ "external-link",
293
+ "move",
294
+ "anchor"
295
+ ]
296
+ },
297
+ {
298
+ name: "media",
299
+ label: "Media",
300
+ labelEs: "Medios",
301
+ categoryIcon: "image",
302
+ icons: [
303
+ "image",
304
+ "film",
305
+ "video",
306
+ "video-off",
307
+ "play",
308
+ "play-circle",
309
+ "pause",
310
+ "pause-circle",
311
+ "square",
312
+ "stop-circle",
313
+ "music",
314
+ "headphones",
315
+ "speaker",
316
+ "camera",
317
+ "camera-off",
318
+ "mic",
319
+ "mic-off",
320
+ "volume",
321
+ "volume-1",
322
+ "volume-2",
323
+ "volume-x",
324
+ "fast-forward",
325
+ "rewind",
326
+ "skip-forward",
327
+ "skip-back",
328
+ "repeat",
329
+ "shuffle",
330
+ "disc"
331
+ ]
332
+ },
333
+ {
334
+ name: "layout",
335
+ label: "Layout",
336
+ labelEs: "Dise\xF1o",
337
+ categoryIcon: "grid",
338
+ icons: [
339
+ "menu",
340
+ "more-horizontal",
341
+ "more-vertical",
342
+ "grid",
343
+ "columns",
344
+ "sidebar",
345
+ "layout",
346
+ "list",
347
+ "align-left",
348
+ "align-center",
349
+ "align-right",
350
+ "align-justify",
351
+ "bold",
352
+ "italic",
353
+ "underline",
354
+ "type",
355
+ "filter",
356
+ "crop",
357
+ "layers",
358
+ "hash",
359
+ "table",
360
+ "trello",
361
+ "circle",
362
+ "square",
363
+ "triangle",
364
+ "hexagon",
365
+ "octagon",
366
+ "feather",
367
+ "pen-tool"
368
+ ]
369
+ },
370
+ {
371
+ name: "nature",
372
+ label: "Nature",
373
+ labelEs: "Naturaleza",
374
+ categoryIcon: "sun",
375
+ icons: [
376
+ "sun",
377
+ "sunrise",
378
+ "sunset",
379
+ "moon",
380
+ "cloud",
381
+ "cloud-drizzle",
382
+ "cloud-lightning",
383
+ "cloud-off",
384
+ "cloud-rain",
385
+ "cloud-snow",
386
+ "wind",
387
+ "umbrella",
388
+ "thermometer",
389
+ "droplet",
390
+ "life-buoy"
391
+ ]
392
+ },
393
+ {
394
+ name: "brands",
395
+ label: "Brands",
396
+ labelEs: "Marcas",
397
+ categoryIcon: "globe",
398
+ icons: [
399
+ "github",
400
+ "gitlab",
401
+ "twitter",
402
+ "facebook",
403
+ "instagram",
404
+ "linkedin",
405
+ "youtube",
406
+ "dribbble",
407
+ "twitch",
408
+ "slack",
409
+ "figma",
410
+ "framer",
411
+ "chrome",
412
+ "codepen",
413
+ "codesandbox",
414
+ "globe",
415
+ "rss",
416
+ "airplay",
417
+ "cast",
418
+ "bluetooth",
419
+ "wifi",
420
+ "wifi-off",
421
+ "battery",
422
+ "battery-charging",
423
+ "monitor",
424
+ "tablet",
425
+ "smartphone",
426
+ "tv"
427
+ ]
428
+ }
429
+ ];
430
+ var ALL_CURATED_ICONS = [
431
+ ...new Set(CURATED_ICONS.flatMap((c) => c.icons))
432
+ ];
433
+
434
+ // src/components/IconPicker/IconPicker.tsx
435
+ var NUM_COLUMNS = 6;
436
+ var GAP = 6;
437
+ var TRIGGER_SIZE = s(56);
438
+ var SCREEN_HEIGHT = Dimensions.get("window").height;
439
+ function IconCell({ name, selected, size, onPress }) {
440
+ const { colors } = useTheme();
441
+ const handlePress = () => {
442
+ selectionAsync();
443
+ onPress();
444
+ };
445
+ const iconColor = selected ? colors.primaryForeground : colors.foreground;
446
+ const bg = selected ? colors.primary : "transparent";
447
+ return /* @__PURE__ */ React.createElement(
448
+ TouchableOpacity,
449
+ {
450
+ onPress: handlePress,
451
+ activeOpacity: 0.6,
452
+ touchSoundDisabled: true,
453
+ accessibilityRole: "button",
454
+ accessibilityState: { selected },
455
+ accessibilityLabel: name,
456
+ style: [styles.cell, { width: size, height: size, backgroundColor: bg }]
457
+ },
458
+ renderIcon(name, ms(20), iconColor)
459
+ );
460
+ }
461
+ var IconCellMemo = React.memo(IconCell);
462
+ function IconPicker({
463
+ value,
464
+ onChange,
465
+ label,
466
+ error,
467
+ hint,
468
+ disabled = false,
469
+ numColumns = NUM_COLUMNS,
470
+ gap = GAP,
471
+ style
472
+ }) {
473
+ const { colors } = useTheme();
474
+ const insets = useSafeAreaInsets();
475
+ const sheetRef = useRef(null);
476
+ const catScrollRef = useRef(null);
477
+ const [open, setOpen] = useState(false);
478
+ const [activeCategory, setActiveCategory] = useState(null);
479
+ const [containerWidth, setContainerWidth] = useState(() => Dimensions.get("window").width - s(16) * 2);
480
+ const sheetName = useId();
481
+ const activeIcons = useMemo(() => {
482
+ if (activeCategory) {
483
+ return CURATED_ICONS.find((c) => c.name === activeCategory)?.icons ?? ALL_CURATED_ICONS;
484
+ }
485
+ return ALL_CURATED_ICONS;
486
+ }, [activeCategory]);
487
+ const gapPx = s(gap);
488
+ const cellSize = containerWidth > 0 ? Math.floor((containerWidth - gapPx * (numColumns - 1)) / numColumns) : 0;
489
+ const rows = useMemo(() => {
490
+ const result = [];
491
+ for (let i = 0; i < activeIcons.length; i += numColumns) {
492
+ result.push(activeIcons.slice(i, i + numColumns));
493
+ }
494
+ return result;
495
+ }, [activeIcons, numColumns]);
496
+ useEffect(() => {
497
+ if (open) {
498
+ impactMedium();
499
+ sheetRef.current?.present();
500
+ } else {
501
+ sheetRef.current?.dismiss();
502
+ }
503
+ }, [open]);
504
+ const handleSelect = useCallback(
505
+ (iconName) => {
506
+ onChange(iconName);
507
+ setOpen(false);
508
+ setActiveCategory(null);
509
+ },
510
+ [onChange]
511
+ );
512
+ const handleOpen = useCallback(() => {
513
+ if (disabled) return;
514
+ setActiveCategory(null);
515
+ setOpen(true);
516
+ }, [disabled]);
517
+ const handleClose = useCallback(() => {
518
+ setOpen(false);
519
+ setActiveCategory(null);
520
+ }, []);
521
+ const renderBackdrop = useCallback(
522
+ (props) => /* @__PURE__ */ React.createElement(BottomSheetBackdrop, { ...props, disappearsOnIndex: -1, appearsOnIndex: 0, pressBehavior: "close" }),
523
+ []
524
+ );
525
+ const selectedIcon = value ? renderIcon(value, ms(28), colors.foreground) : null;
526
+ 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(
527
+ TouchableOpacity,
528
+ {
529
+ onPress: handleOpen,
530
+ disabled,
531
+ activeOpacity: 0.7,
532
+ touchSoundDisabled: true,
533
+ accessibilityRole: "button",
534
+ accessibilityLabel: label ?? "Seleccionar icono",
535
+ accessibilityState: { disabled },
536
+ style: [
537
+ styles.trigger,
538
+ {
539
+ backgroundColor: disabled ? colors.surface : colors.background,
540
+ width: TRIGGER_SIZE,
541
+ height: TRIGGER_SIZE,
542
+ borderColor: error ? colors.destructive : value ? colors.primary : colors.border
543
+ },
544
+ disabled && styles.triggerDisabled
545
+ ]
546
+ },
547
+ selectedIcon ?? renderIcon("plus", ms(24), colors.foregroundMuted)
548
+ ), error ? /* @__PURE__ */ React.createElement(
549
+ Text,
550
+ {
551
+ style: [styles.helperText, { color: colors.destructive }],
552
+ allowFontScaling: true,
553
+ accessibilityLiveRegion: "polite"
554
+ },
555
+ error
556
+ ) : null, !error && hint ? /* @__PURE__ */ React.createElement(Text, { style: [styles.helperText, { color: colors.foregroundMuted }], allowFontScaling: true }, hint) : null, /* @__PURE__ */ React.createElement(
557
+ BottomSheetModal,
558
+ {
559
+ ref: sheetRef,
560
+ name: sheetName,
561
+ onDismiss: handleClose,
562
+ enableDynamicSizing: true,
563
+ maxDynamicContentSize: SCREEN_HEIGHT * 0.7,
564
+ backdropComponent: renderBackdrop,
565
+ backgroundStyle: [styles.sheetBackground, { backgroundColor: colors.card }],
566
+ handleIndicatorStyle: [styles.handle, { backgroundColor: colors.border }],
567
+ enablePanDownToClose: true,
568
+ topInset: insets.top,
569
+ android_keyboardInputMode: "adjustPan"
570
+ },
571
+ /* @__PURE__ */ React.createElement(
572
+ BottomSheetScrollView,
573
+ {
574
+ contentContainerStyle: styles.sheetContent,
575
+ showsVerticalScrollIndicator: true
576
+ },
577
+ /* @__PURE__ */ React.createElement(Text, { style: [styles.sectionLabel, { color: colors.foregroundSubtle }], allowFontScaling: true }, "Categor\xEDas"),
578
+ /* @__PURE__ */ React.createElement(
579
+ ScrollView,
580
+ {
581
+ ref: catScrollRef,
582
+ horizontal: true,
583
+ showsHorizontalScrollIndicator: false,
584
+ contentContainerStyle: styles.categoryStrip,
585
+ style: styles.categoryScroll
586
+ },
587
+ /* @__PURE__ */ React.createElement(
588
+ TouchableOpacity,
589
+ {
590
+ onPress: () => setActiveCategory(null),
591
+ activeOpacity: 0.7,
592
+ touchSoundDisabled: true,
593
+ accessibilityRole: "button",
594
+ accessibilityLabel: "Todos",
595
+ accessibilityState: { selected: activeCategory === null },
596
+ style: [
597
+ styles.categoryChip,
598
+ {
599
+ backgroundColor: activeCategory === null ? colors.primary : colors.surface,
600
+ borderColor: activeCategory === null ? colors.primary : colors.border
601
+ }
602
+ ]
603
+ },
604
+ /* @__PURE__ */ React.createElement(View, { style: styles.categoryChipInner }, renderIcon("grid", ms(14), activeCategory === null ? colors.primaryForeground : colors.foregroundSubtle), /* @__PURE__ */ React.createElement(
605
+ Text,
606
+ {
607
+ style: [
608
+ styles.categoryChipText,
609
+ { color: activeCategory === null ? colors.primaryForeground : colors.foreground }
610
+ ],
611
+ allowFontScaling: true,
612
+ numberOfLines: 1
613
+ },
614
+ "Todos"
615
+ ))
616
+ ),
617
+ CURATED_ICONS.map((cat) => /* @__PURE__ */ React.createElement(
618
+ TouchableOpacity,
619
+ {
620
+ key: cat.name,
621
+ onPress: () => setActiveCategory(cat.name),
622
+ activeOpacity: 0.7,
623
+ touchSoundDisabled: true,
624
+ accessibilityRole: "button",
625
+ accessibilityLabel: cat.labelEs,
626
+ accessibilityState: { selected: activeCategory === cat.name },
627
+ style: [
628
+ styles.categoryChip,
629
+ {
630
+ backgroundColor: activeCategory === cat.name ? colors.primary : colors.surface,
631
+ borderColor: activeCategory === cat.name ? colors.primary : colors.border
632
+ }
633
+ ]
634
+ },
635
+ /* @__PURE__ */ React.createElement(View, { style: styles.categoryChipInner }, renderIcon(cat.categoryIcon, ms(14), activeCategory === cat.name ? colors.primaryForeground : colors.foregroundSubtle), /* @__PURE__ */ React.createElement(
636
+ Text,
637
+ {
638
+ style: [
639
+ styles.categoryChipText,
640
+ { color: activeCategory === cat.name ? colors.primaryForeground : colors.foreground }
641
+ ],
642
+ allowFontScaling: true,
643
+ numberOfLines: 1
644
+ },
645
+ cat.labelEs
646
+ ))
647
+ ))
648
+ ),
649
+ /* @__PURE__ */ React.createElement(View, { style: [styles.separator, { backgroundColor: colors.border }] }),
650
+ /* @__PURE__ */ React.createElement(View, { style: styles.gridContainer, onLayout: (e) => setContainerWidth(e.nativeEvent.layout.width) }, 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(
651
+ IconCellMemo,
652
+ {
653
+ key: name,
654
+ name,
655
+ selected: value === name,
656
+ size: cellSize,
657
+ onPress: () => handleSelect(name)
658
+ }
659
+ )), Array.from({ length: numColumns - row.length }).map((_, j) => /* @__PURE__ */ React.createElement(View, { key: `spacer-${j}`, style: { width: cellSize, height: cellSize } })))) : null)
660
+ )
661
+ ));
662
+ }
663
+ var styles = StyleSheet.create({
664
+ triggerContainer: {
665
+ gap: vs(8)
666
+ },
667
+ triggerLabel: {
668
+ fontFamily: "Sohne-Medium",
669
+ fontSize: ms(14)
670
+ },
671
+ trigger: {
672
+ borderRadius: RADIUS.md,
673
+ borderWidth: 1,
674
+ alignItems: "center",
675
+ justifyContent: "center"
676
+ },
677
+ triggerDisabled: {
678
+ opacity: 0.6
679
+ },
680
+ helperText: {
681
+ fontFamily: "Sohne-Regular",
682
+ fontSize: ms(13)
683
+ },
684
+ sheetBackground: {
685
+ borderTopLeftRadius: ms(16),
686
+ borderTopRightRadius: ms(16)
687
+ },
688
+ handle: {
689
+ width: s(36),
690
+ height: vs(4),
691
+ borderRadius: ms(2)
692
+ },
693
+ sheetContent: {
694
+ paddingHorizontal: s(16),
695
+ paddingBottom: vs(24)
696
+ },
697
+ sectionLabel: {
698
+ fontFamily: "Sohne-Medium",
699
+ fontSize: ms(12),
700
+ marginBottom: vs(8),
701
+ textTransform: "uppercase",
702
+ letterSpacing: 0.5
703
+ },
704
+ categoryScroll: {
705
+ flexGrow: 0,
706
+ flexShrink: 0
707
+ },
708
+ categoryStrip: {
709
+ gap: s(8)
710
+ },
711
+ categoryChip: {
712
+ borderRadius: RADIUS.full,
713
+ borderWidth: 1,
714
+ paddingVertical: vs(6),
715
+ paddingHorizontal: s(12)
716
+ },
717
+ categoryChipInner: {
718
+ flexDirection: "row",
719
+ alignItems: "center",
720
+ gap: s(6)
721
+ },
722
+ categoryChipText: {
723
+ fontFamily: "Sohne-Medium",
724
+ fontSize: ms(12)
725
+ },
726
+ separator: {
727
+ height: StyleSheet.hairlineWidth,
728
+ marginVertical: vs(12)
729
+ },
730
+ gridContainer: {},
731
+ row: {
732
+ flexDirection: "row",
733
+ gap: GAP
734
+ },
735
+ cell: {
736
+ borderRadius: RADIUS.md,
737
+ alignItems: "center",
738
+ justifyContent: "center"
739
+ }
740
+ });
741
+
742
+ export { IconPicker };