@wecareu/icons 1.0.2 → 1.0.3

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.
package/dist/index.js CHANGED
@@ -37,6 +37,632 @@ __export(index_exports, {
37
37
  });
38
38
  module.exports = __toCommonJS(index_exports);
39
39
 
40
+ // ../theme/lib/module/index.js
41
+ var React = __toESM(require("react"));
42
+
43
+ // ../tokens/lib/module/index.js
44
+ var themeColors = {
45
+ dark: {
46
+ accent: {
47
+ hover: "#5e318e",
48
+ pressed: "#3c1c6e",
49
+ primary: "#4d267e"
50
+ },
51
+ background: {
52
+ card: "#231639",
53
+ elevated: "#181829",
54
+ primary: "#0b0c13",
55
+ quaternary: "#100e1c",
56
+ secondary: "#1e1d34",
57
+ tertiary: "#13141b"
58
+ },
59
+ border: {
60
+ disabled: "#333445",
61
+ light: "#292a39",
62
+ secondary: "#292a39"
63
+ },
64
+ interactive: {
65
+ primary: "#803ed0",
66
+ primaryDisabled: "#333445",
67
+ primaryHover: "#9148e0",
68
+ primaryPressed: "#6f34b8",
69
+ secondary: "#494681",
70
+ secondaryHover: "#5a5691",
71
+ secondaryPressed: "#3a3669"
72
+ },
73
+ rating: {
74
+ primary: "#FFB000"
75
+ },
76
+ status: {
77
+ available: "#4d267e",
78
+ busy: "#FFB74D",
79
+ offline: "#6f6c70",
80
+ online: "#81C784"
81
+ },
82
+ surface: {
83
+ card: "#231639",
84
+ cardSecondary: "#1e1d34",
85
+ disabled: "#100e1c",
86
+ elevated: "#231639",
87
+ header: "#13141b",
88
+ input: "#1e1d34",
89
+ modal: "#181829",
90
+ primary: "#1e1d34",
91
+ secondary: "#13141b",
92
+ tabBar: "#100e1c",
93
+ tertiary: "#181829"
94
+ },
95
+ text: {
96
+ badge: "#0b0c13",
97
+ disabled: "#6f6c70",
98
+ placeholder: "#9b989c",
99
+ primary: "#e8e5e9",
100
+ secondary: "#c8c5c9",
101
+ tertiary: "#9b989c"
102
+ }
103
+ },
104
+ light: {
105
+ accent: {
106
+ hover: "#9670c7",
107
+ pressed: "#835fa5",
108
+ primary: "#a981d9"
109
+ },
110
+ background: {
111
+ card: "#d4c7ea",
112
+ elevated: "#cccbe2",
113
+ primary: "#ecedf4",
114
+ quaternary: "#d7d7e8",
115
+ secondary: "#e4e5ec",
116
+ tertiary: "#e6e3f2"
117
+ },
118
+ border: {
119
+ disabled: "#e4e5ec",
120
+ light: "#e6e3f2",
121
+ secondary: "#d7d7e8"
122
+ },
123
+ interactive: {
124
+ primary: "#712fc1",
125
+ primaryDisabled: "#b8b5bb",
126
+ primaryHover: "#5f2399",
127
+ primaryPressed: "#4d1a7a",
128
+ secondary: "#817eb9",
129
+ secondaryHover: "#6f6b9a",
130
+ secondaryPressed: "#5d597b"
131
+ },
132
+ rating: {
133
+ primary: "#FFD700"
134
+ },
135
+ status: {
136
+ available: "#a981d9",
137
+ busy: "#FF9800",
138
+ offline: "#adadb0",
139
+ online: "#4CAF50"
140
+ },
141
+ surface: {
142
+ card: "#d4c7ea",
143
+ cardSecondary: "#e6e3f2",
144
+ disabled: "#e4e5ec",
145
+ header: "#e4e5ec",
146
+ input: "#e6e3f2",
147
+ modal: "#cccbe2",
148
+ secondary: "#e6e3f2",
149
+ tabBar: "#d7d7e8",
150
+ tertiary: "#d7d7e8"
151
+ },
152
+ text: {
153
+ badge: "#ecedf4",
154
+ disabled: "#adadb0",
155
+ placeholder: "#8b888c",
156
+ primary: "#2a282b",
157
+ secondary: "#4b484c",
158
+ tertiary: "#6b686c"
159
+ }
160
+ }
161
+ };
162
+ var neutralColors = {
163
+ black: "#000000",
164
+ gray50: "#FAFAFA",
165
+ gray100: "#F5F4F5",
166
+ gray200: "#EDEAEE",
167
+ gray300: "#E0DCE1",
168
+ gray400: "#D0CDD1",
169
+ gray500: "#B6B3B7",
170
+ gray600: "#9B989C",
171
+ gray700: "#6F6C70",
172
+ gray800: "#4B484C",
173
+ gray900: "#2A282B",
174
+ transparent: "transparent",
175
+ white: "#FFFFFF"
176
+ };
177
+ var semanticColors = {
178
+ dark: {
179
+ error: "#EF5350",
180
+ info: "#64B5F6",
181
+ success: "#81C784",
182
+ warning: "#FFB74D"
183
+ },
184
+ light: {
185
+ error: "#F44336",
186
+ info: "#2196F3",
187
+ success: "#4CAF50",
188
+ warning: "#FF9800"
189
+ }
190
+ };
191
+ var gradientColors = {
192
+ dark: {
193
+ primary: [themeColors.dark.interactive.primary, themeColors.dark.accent.primary],
194
+ secondary: [themeColors.dark.interactive.secondary, themeColors.dark.interactive.primary],
195
+ button: ["#BC4CF7", "#7873EE"],
196
+ buttonDisabled: ["#BC4CF760", "#7873EE60"]
197
+ },
198
+ light: {
199
+ primary: [themeColors.light.interactive.primary, themeColors.light.accent.primary],
200
+ secondary: [themeColors.light.interactive.secondary, themeColors.light.interactive.primary],
201
+ button: ["#BC4CF7", "#7873EE"],
202
+ buttonDisabled: ["#BC4CF760", "#7873EE60"]
203
+ }
204
+ };
205
+ var alphaColors = {
206
+ dark: {
207
+ border: "rgba(182, 179, 183, 0.3)",
208
+ overlay: "rgba(0, 0, 0, 0.7)",
209
+ surface: "rgba(182, 179, 183, 0.1)"
210
+ },
211
+ light: {
212
+ border: "rgba(75, 72, 76, 0.2)",
213
+ overlay: "rgba(0, 0, 0, 0.5)",
214
+ surface: "rgba(255, 255, 255, 0.8)"
215
+ }
216
+ };
217
+ var shadowColors = {
218
+ dark: {
219
+ button: "rgba(128, 62, 208, 0.3)",
220
+ card: "rgba(0, 0, 0, 0.3)",
221
+ primary: themeColors.dark.interactive.primary,
222
+ primaryFull: `0 20px 80px -10px ${themeColors.dark.interactive.primary}`,
223
+ secondary: "rgba(0, 0, 0, 0.5)"
224
+ },
225
+ light: {
226
+ button: "rgba(113, 47, 193, 0.25)",
227
+ card: "rgba(75, 72, 76, 0.03)",
228
+ primary: themeColors.light.interactive.primary,
229
+ primaryFull: `0 20px 80px -10px ${themeColors.light.interactive.primary}`,
230
+ secondary: "rgba(75, 72, 76, 0.06)"
231
+ }
232
+ };
233
+ var shadowStyles = {
234
+ dark: {
235
+ card: {
236
+ elevation: 1,
237
+ shadowColor: shadowColors.dark.card,
238
+ shadowOffset: {
239
+ height: 1,
240
+ width: 0
241
+ },
242
+ shadowOpacity: 1,
243
+ shadowRadius: 3
244
+ },
245
+ primary: {
246
+ elevation: 20,
247
+ shadowColor: shadowColors.dark.primary,
248
+ shadowOffset: {
249
+ height: 20,
250
+ width: 0
251
+ },
252
+ shadowOpacity: 1,
253
+ shadowRadius: 35
254
+ },
255
+ secondary: {
256
+ elevation: 2,
257
+ shadowColor: shadowColors.dark.secondary,
258
+ shadowOffset: {
259
+ height: 2,
260
+ width: 0
261
+ },
262
+ shadowOpacity: 1,
263
+ shadowRadius: 4
264
+ }
265
+ },
266
+ light: {
267
+ card: {
268
+ elevation: 1,
269
+ shadowColor: shadowColors.light.card,
270
+ shadowOffset: {
271
+ height: 1,
272
+ width: 0
273
+ },
274
+ shadowOpacity: 1,
275
+ shadowRadius: 3
276
+ },
277
+ primary: {
278
+ elevation: 20,
279
+ shadowColor: shadowColors.light.primary,
280
+ shadowOffset: {
281
+ height: 20,
282
+ width: 0
283
+ },
284
+ shadowOpacity: 1,
285
+ shadowRadius: 35
286
+ },
287
+ secondary: {
288
+ elevation: 2,
289
+ shadowColor: shadowColors.light.secondary,
290
+ shadowOffset: {
291
+ height: 2,
292
+ width: 0
293
+ },
294
+ shadowOpacity: 1,
295
+ shadowRadius: 4
296
+ }
297
+ }
298
+ };
299
+ var fontFamilies = {
300
+ regular: "Livvic",
301
+ semibold: "LivvicSemiBold",
302
+ bold: "LivvicBold",
303
+ heading: "LivvicBold",
304
+ body: "Livvic",
305
+ caption: "Livvic",
306
+ button: "LivvicSemiBold"
307
+ };
308
+ var fontSizes = {
309
+ xs: 12,
310
+ sm: 14,
311
+ md: 16,
312
+ lg: 18,
313
+ xl: 20,
314
+ xxl: 24,
315
+ huge: 32,
316
+ caption: 12,
317
+ body: 16,
318
+ subtitle: 18,
319
+ title: 20,
320
+ heading: 24,
321
+ display: 32
322
+ };
323
+ var lineHeights = {
324
+ tight: 1.2,
325
+ normal: 1.4,
326
+ relaxed: 1.6,
327
+ loose: 1.8,
328
+ caption: 1.4,
329
+ body: 1.5,
330
+ heading: 1.2
331
+ };
332
+ var fontWeights = {
333
+ regular: "400",
334
+ medium: "500",
335
+ semibold: "600",
336
+ bold: "700"
337
+ };
338
+ var textStyles = {
339
+ displayLarge: {
340
+ fontFamily: fontFamilies.bold,
341
+ fontSize: fontSizes.huge,
342
+ lineHeight: lineHeights.tight,
343
+ fontWeight: fontWeights.bold
344
+ },
345
+ displayMedium: {
346
+ fontFamily: fontFamilies.bold,
347
+ fontSize: fontSizes.heading,
348
+ lineHeight: lineHeights.tight,
349
+ fontWeight: fontWeights.bold
350
+ },
351
+ headingLarge: {
352
+ fontFamily: fontFamilies.bold,
353
+ fontSize: fontSizes.title,
354
+ lineHeight: lineHeights.normal,
355
+ fontWeight: fontWeights.bold
356
+ },
357
+ headingMedium: {
358
+ fontFamily: fontFamilies.semibold,
359
+ fontSize: fontSizes.subtitle,
360
+ lineHeight: lineHeights.normal,
361
+ fontWeight: fontWeights.semibold
362
+ },
363
+ headingSmall: {
364
+ fontFamily: fontFamilies.semibold,
365
+ fontSize: fontSizes.md,
366
+ lineHeight: lineHeights.normal,
367
+ fontWeight: fontWeights.semibold
368
+ },
369
+ bodyLarge: {
370
+ fontFamily: fontFamilies.regular,
371
+ fontSize: fontSizes.lg,
372
+ lineHeight: lineHeights.relaxed,
373
+ fontWeight: fontWeights.regular
374
+ },
375
+ bodyMedium: {
376
+ fontFamily: fontFamilies.regular,
377
+ fontSize: fontSizes.body,
378
+ lineHeight: lineHeights.normal,
379
+ fontWeight: fontWeights.regular
380
+ },
381
+ bodySmall: {
382
+ fontFamily: fontFamilies.regular,
383
+ fontSize: fontSizes.sm,
384
+ lineHeight: lineHeights.normal,
385
+ fontWeight: fontWeights.regular
386
+ },
387
+ labelLarge: {
388
+ fontFamily: fontFamilies.semibold,
389
+ fontSize: fontSizes.md,
390
+ lineHeight: lineHeights.normal,
391
+ fontWeight: fontWeights.semibold
392
+ },
393
+ labelMedium: {
394
+ fontFamily: fontFamilies.semibold,
395
+ fontSize: fontSizes.sm,
396
+ lineHeight: lineHeights.normal,
397
+ fontWeight: fontWeights.semibold
398
+ },
399
+ labelSmall: {
400
+ fontFamily: fontFamilies.regular,
401
+ fontSize: fontSizes.xs,
402
+ lineHeight: lineHeights.normal,
403
+ fontWeight: fontWeights.regular
404
+ },
405
+ buttonLarge: {
406
+ fontFamily: fontFamilies.semibold,
407
+ fontSize: fontSizes.md,
408
+ lineHeight: lineHeights.normal,
409
+ fontWeight: fontWeights.semibold
410
+ },
411
+ buttonMedium: {
412
+ fontFamily: fontFamilies.semibold,
413
+ fontSize: fontSizes.sm,
414
+ lineHeight: lineHeights.normal,
415
+ fontWeight: fontWeights.semibold
416
+ },
417
+ caption: {
418
+ fontFamily: fontFamilies.regular,
419
+ fontSize: fontSizes.caption,
420
+ lineHeight: lineHeights.caption,
421
+ fontWeight: fontWeights.regular
422
+ }
423
+ };
424
+ var spacing = {
425
+ xs: 4,
426
+ sm: 8,
427
+ md: 12,
428
+ lg: 16,
429
+ xl: 24,
430
+ xxl: 32,
431
+ xxxl: 48,
432
+ headerHeight: 56,
433
+ tabBarHeight: 80
434
+ };
435
+ var radius = {
436
+ xs: 4,
437
+ sm: 6,
438
+ md: 8,
439
+ lg: 12,
440
+ xl: 16,
441
+ xxl: 24,
442
+ round: 9999
443
+ };
444
+ var tokens = {
445
+ dark: {
446
+ colors: {
447
+ background: themeColors.dark.background.primary,
448
+ error: semanticColors.dark.error,
449
+ onBackground: themeColors.dark.text.primary,
450
+ onError: neutralColors.white,
451
+ onPrimary: neutralColors.white,
452
+ onSecondary: neutralColors.black,
453
+ onSurface: themeColors.dark.text.primary,
454
+ primary: themeColors.dark.interactive.primary,
455
+ primaryVariant: themeColors.dark.accent.primary,
456
+ secondary: themeColors.dark.interactive.secondary,
457
+ surface: themeColors.dark.surface.primary
458
+ }
459
+ },
460
+ light: {
461
+ colors: {
462
+ background: themeColors.light.background.primary,
463
+ error: semanticColors.light.error,
464
+ onBackground: themeColors.light.text.primary,
465
+ onError: neutralColors.white,
466
+ onPrimary: neutralColors.white,
467
+ onSecondary: neutralColors.white,
468
+ onSurface: themeColors.light.text.primary,
469
+ primary: themeColors.light.interactive.primary,
470
+ primaryVariant: themeColors.light.accent.primary,
471
+ secondary: themeColors.light.interactive.secondary,
472
+ surface: themeColors.light.surface.card
473
+ }
474
+ },
475
+ radius,
476
+ spacing,
477
+ typography: {
478
+ fontSize: fontSizes,
479
+ fontWeightBold: fontWeights.bold,
480
+ fontWeightMedium: fontWeights.medium,
481
+ fontWeightRegular: fontWeights.regular,
482
+ fontWeightSemibold: fontWeights.semibold
483
+ }
484
+ };
485
+
486
+ // ../theme/lib/module/index.js
487
+ var createTheme = (scheme) => {
488
+ const colorTokens = scheme === "dark" ? themeColors.dark : themeColors.light;
489
+ const semanticTokens = scheme === "dark" ? semanticColors.dark : semanticColors.light;
490
+ const alphaTokens = scheme === "dark" ? alphaColors.dark : alphaColors.light;
491
+ const gradientTokens = scheme === "dark" ? gradientColors.dark : gradientColors.light;
492
+ const shadowColorTokens = scheme === "dark" ? shadowColors.dark : shadowColors.light;
493
+ const shadowStyleTokens = scheme === "dark" ? shadowStyles.dark : shadowStyles.light;
494
+ return {
495
+ scheme,
496
+ colors: {
497
+ background: {
498
+ card: colorTokens.background.card,
499
+ elevated: colorTokens.background.elevated,
500
+ modal: colorTokens.surface.modal,
501
+ overlay: alphaTokens.overlay,
502
+ primary: colorTokens.background.primary,
503
+ quaternary: colorTokens.background.quaternary,
504
+ secondary: colorTokens.background.secondary,
505
+ tertiary: colorTokens.background.tertiary
506
+ },
507
+ surface: {
508
+ card: colorTokens.surface.card,
509
+ cardSecondary: colorTokens.surface.cardSecondary,
510
+ disabled: colorTokens.surface.disabled,
511
+ elevated: colorTokens.background.elevated,
512
+ header: colorTokens.surface.header,
513
+ input: colorTokens.surface.input,
514
+ modal: colorTokens.surface.modal,
515
+ primary: colorTokens.surface.card,
516
+ secondary: colorTokens.surface.secondary,
517
+ tabBar: colorTokens.surface.tabBar,
518
+ tertiary: colorTokens.surface.tertiary
519
+ },
520
+ text: {
521
+ badge: colorTokens.text.badge,
522
+ black: neutralColors.black,
523
+ disabled: colorTokens.text.disabled,
524
+ inverse: scheme === "dark" ? neutralColors.black : neutralColors.white,
525
+ link: colorTokens.interactive.primary,
526
+ placeholder: colorTokens.text.placeholder,
527
+ primary: colorTokens.text.primary,
528
+ secondary: colorTokens.text.secondary,
529
+ tertiary: colorTokens.text.tertiary,
530
+ white: neutralColors.white
531
+ },
532
+ brand: {
533
+ accent: colorTokens.accent.primary,
534
+ primary: colorTokens.interactive.primary,
535
+ secondary: colorTokens.interactive.secondary
536
+ },
537
+ interactive: {
538
+ accent: colorTokens.accent.primary,
539
+ accentHover: colorTokens.accent.hover,
540
+ accentPressed: colorTokens.accent.pressed,
541
+ primary: colorTokens.interactive.primary,
542
+ primaryDisabled: colorTokens.interactive.primaryDisabled,
543
+ primaryHover: colorTokens.interactive.primaryHover,
544
+ primaryPressed: colorTokens.interactive.primaryPressed,
545
+ secondary: colorTokens.interactive.secondary,
546
+ secondaryHover: colorTokens.interactive.secondaryHover,
547
+ secondaryPressed: colorTokens.interactive.secondaryPressed
548
+ },
549
+ status: {
550
+ available: colorTokens.status.available,
551
+ busy: colorTokens.status.busy,
552
+ error: semanticTokens.error,
553
+ info: semanticTokens.info,
554
+ offline: colorTokens.status.offline,
555
+ online: colorTokens.status.online,
556
+ success: semanticTokens.success,
557
+ warning: semanticTokens.warning
558
+ },
559
+ rating: {
560
+ primary: colorTokens.rating.primary
561
+ },
562
+ border: {
563
+ disabled: colorTokens.border.disabled,
564
+ error: semanticTokens.error,
565
+ focus: colorTokens.interactive.primary,
566
+ ...scheme === "light" && {
567
+ light: colorTokens.border.light
568
+ },
569
+ primary: alphaTokens.border,
570
+ secondary: colorTokens.border.secondary
571
+ },
572
+ shadow: {
573
+ card: shadowColorTokens.card,
574
+ primary: shadowColorTokens.primary,
575
+ primaryFull: shadowColorTokens.primaryFull,
576
+ secondary: shadowColorTokens.secondary
577
+ },
578
+ shadowStyles: {
579
+ card: shadowStyleTokens.card,
580
+ primary: shadowStyleTokens.primary,
581
+ secondary: shadowStyleTokens.secondary
582
+ },
583
+ gradient: {
584
+ primary: gradientTokens.primary,
585
+ secondary: gradientTokens.secondary,
586
+ button: gradientTokens.button,
587
+ buttonDisabled: gradientTokens.buttonDisabled
588
+ },
589
+ alpha: {
590
+ border: alphaTokens.border,
591
+ overlay: alphaTokens.overlay,
592
+ surface: alphaTokens.surface
593
+ }
594
+ },
595
+ spacing,
596
+ typography: {
597
+ fontFamily: fontFamilies,
598
+ fontSize: fontSizes,
599
+ fontWeight: fontWeights,
600
+ lineHeight: lineHeights,
601
+ textStyles
602
+ },
603
+ radius,
604
+ components: {
605
+ button: {
606
+ borderRadius: radius.md,
607
+ paddingHorizontal: spacing.lg,
608
+ paddingVertical: spacing.sm,
609
+ ...shadowStyleTokens.primary
610
+ },
611
+ input: {
612
+ backgroundColor: colorTokens.surface.input,
613
+ borderColor: colorTokens.surface.input,
614
+ borderRadius: radius.md,
615
+ borderWidth: 1,
616
+ paddingHorizontal: spacing.md,
617
+ paddingVertical: spacing.sm
618
+ },
619
+ card: {
620
+ backgroundColor: colorTokens.surface.card,
621
+ borderRadius: radius.lg,
622
+ padding: spacing.md,
623
+ ...shadowStyleTokens.card
624
+ },
625
+ cardSecondary: {
626
+ backgroundColor: colorTokens.surface.cardSecondary,
627
+ borderRadius: radius.lg,
628
+ padding: spacing.md,
629
+ ...shadowStyleTokens.card
630
+ },
631
+ modal: {
632
+ backgroundColor: colorTokens.surface.modal,
633
+ borderRadius: radius.xl,
634
+ overlayColor: alphaTokens.overlay
635
+ },
636
+ header: {
637
+ backgroundColor: colorTokens.surface.header,
638
+ borderBottomColor: scheme === "light" ? colorTokens.border.light : colorTokens.border.secondary
639
+ },
640
+ tabBar: {
641
+ backgroundColor: colorTokens.surface.tabBar,
642
+ borderTopColor: scheme === "light" ? colorTokens.border.light : colorTokens.border.secondary
643
+ }
644
+ },
645
+ layout: {
646
+ headerHeight: spacing.headerHeight,
647
+ tabBarHeight: spacing.tabBarHeight,
648
+ safeAreaPadding: spacing.md,
649
+ screenPadding: spacing.lg
650
+ },
651
+ setScheme: () => {
652
+ },
653
+ toggleScheme: () => {
654
+ }
655
+ };
656
+ };
657
+ var ThemeContext = /* @__PURE__ */ React.createContext(createTheme("light"));
658
+ function useTheme() {
659
+ const context = React.useContext(ThemeContext);
660
+ if (!context) {
661
+ throw new Error("useTheme deve ser usado dentro de um ThemeProvider");
662
+ }
663
+ return context;
664
+ }
665
+
40
666
  // src/generated/ArrowDown.tsx
41
667
  var import_react_native_svg = __toESM(require("react-native-svg"));
42
668
  var import_jsx_runtime = require("react/jsx-runtime");
@@ -607,18 +1233,18 @@ var ICONS = {
607
1233
 
608
1234
  // src/Icon.tsx
609
1235
  var import_jsx_runtime70 = require("react/jsx-runtime");
610
- var Icon = ({ name, size, color, ...rest }) => {
1236
+ var Icon = ({ name, size, color, testID = "icon", ...rest }) => {
1237
+ const theme = useTheme();
611
1238
  const Cmp = ICONS[name];
612
1239
  const extra = {};
613
1240
  if (size != null) {
614
1241
  extra.width = size;
615
1242
  extra.height = size;
616
1243
  }
617
- if (color) {
618
- extra.fill = color;
619
- extra.color = color;
620
- }
621
- return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(Cmp, { ...extra, ...rest });
1244
+ const iconColor = color || theme.colors.text.primary || "#000000";
1245
+ extra.fill = iconColor;
1246
+ extra.color = iconColor;
1247
+ return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(Cmp, { ...extra, testID, ...rest });
622
1248
  };
623
1249
 
624
1250
  // src/index.tsx
package/dist/index.mjs CHANGED
@@ -1,3 +1,629 @@
1
+ // ../theme/lib/module/index.js
2
+ import * as React from "react";
3
+
4
+ // ../tokens/lib/module/index.js
5
+ var themeColors = {
6
+ dark: {
7
+ accent: {
8
+ hover: "#5e318e",
9
+ pressed: "#3c1c6e",
10
+ primary: "#4d267e"
11
+ },
12
+ background: {
13
+ card: "#231639",
14
+ elevated: "#181829",
15
+ primary: "#0b0c13",
16
+ quaternary: "#100e1c",
17
+ secondary: "#1e1d34",
18
+ tertiary: "#13141b"
19
+ },
20
+ border: {
21
+ disabled: "#333445",
22
+ light: "#292a39",
23
+ secondary: "#292a39"
24
+ },
25
+ interactive: {
26
+ primary: "#803ed0",
27
+ primaryDisabled: "#333445",
28
+ primaryHover: "#9148e0",
29
+ primaryPressed: "#6f34b8",
30
+ secondary: "#494681",
31
+ secondaryHover: "#5a5691",
32
+ secondaryPressed: "#3a3669"
33
+ },
34
+ rating: {
35
+ primary: "#FFB000"
36
+ },
37
+ status: {
38
+ available: "#4d267e",
39
+ busy: "#FFB74D",
40
+ offline: "#6f6c70",
41
+ online: "#81C784"
42
+ },
43
+ surface: {
44
+ card: "#231639",
45
+ cardSecondary: "#1e1d34",
46
+ disabled: "#100e1c",
47
+ elevated: "#231639",
48
+ header: "#13141b",
49
+ input: "#1e1d34",
50
+ modal: "#181829",
51
+ primary: "#1e1d34",
52
+ secondary: "#13141b",
53
+ tabBar: "#100e1c",
54
+ tertiary: "#181829"
55
+ },
56
+ text: {
57
+ badge: "#0b0c13",
58
+ disabled: "#6f6c70",
59
+ placeholder: "#9b989c",
60
+ primary: "#e8e5e9",
61
+ secondary: "#c8c5c9",
62
+ tertiary: "#9b989c"
63
+ }
64
+ },
65
+ light: {
66
+ accent: {
67
+ hover: "#9670c7",
68
+ pressed: "#835fa5",
69
+ primary: "#a981d9"
70
+ },
71
+ background: {
72
+ card: "#d4c7ea",
73
+ elevated: "#cccbe2",
74
+ primary: "#ecedf4",
75
+ quaternary: "#d7d7e8",
76
+ secondary: "#e4e5ec",
77
+ tertiary: "#e6e3f2"
78
+ },
79
+ border: {
80
+ disabled: "#e4e5ec",
81
+ light: "#e6e3f2",
82
+ secondary: "#d7d7e8"
83
+ },
84
+ interactive: {
85
+ primary: "#712fc1",
86
+ primaryDisabled: "#b8b5bb",
87
+ primaryHover: "#5f2399",
88
+ primaryPressed: "#4d1a7a",
89
+ secondary: "#817eb9",
90
+ secondaryHover: "#6f6b9a",
91
+ secondaryPressed: "#5d597b"
92
+ },
93
+ rating: {
94
+ primary: "#FFD700"
95
+ },
96
+ status: {
97
+ available: "#a981d9",
98
+ busy: "#FF9800",
99
+ offline: "#adadb0",
100
+ online: "#4CAF50"
101
+ },
102
+ surface: {
103
+ card: "#d4c7ea",
104
+ cardSecondary: "#e6e3f2",
105
+ disabled: "#e4e5ec",
106
+ header: "#e4e5ec",
107
+ input: "#e6e3f2",
108
+ modal: "#cccbe2",
109
+ secondary: "#e6e3f2",
110
+ tabBar: "#d7d7e8",
111
+ tertiary: "#d7d7e8"
112
+ },
113
+ text: {
114
+ badge: "#ecedf4",
115
+ disabled: "#adadb0",
116
+ placeholder: "#8b888c",
117
+ primary: "#2a282b",
118
+ secondary: "#4b484c",
119
+ tertiary: "#6b686c"
120
+ }
121
+ }
122
+ };
123
+ var neutralColors = {
124
+ black: "#000000",
125
+ gray50: "#FAFAFA",
126
+ gray100: "#F5F4F5",
127
+ gray200: "#EDEAEE",
128
+ gray300: "#E0DCE1",
129
+ gray400: "#D0CDD1",
130
+ gray500: "#B6B3B7",
131
+ gray600: "#9B989C",
132
+ gray700: "#6F6C70",
133
+ gray800: "#4B484C",
134
+ gray900: "#2A282B",
135
+ transparent: "transparent",
136
+ white: "#FFFFFF"
137
+ };
138
+ var semanticColors = {
139
+ dark: {
140
+ error: "#EF5350",
141
+ info: "#64B5F6",
142
+ success: "#81C784",
143
+ warning: "#FFB74D"
144
+ },
145
+ light: {
146
+ error: "#F44336",
147
+ info: "#2196F3",
148
+ success: "#4CAF50",
149
+ warning: "#FF9800"
150
+ }
151
+ };
152
+ var gradientColors = {
153
+ dark: {
154
+ primary: [themeColors.dark.interactive.primary, themeColors.dark.accent.primary],
155
+ secondary: [themeColors.dark.interactive.secondary, themeColors.dark.interactive.primary],
156
+ button: ["#BC4CF7", "#7873EE"],
157
+ buttonDisabled: ["#BC4CF760", "#7873EE60"]
158
+ },
159
+ light: {
160
+ primary: [themeColors.light.interactive.primary, themeColors.light.accent.primary],
161
+ secondary: [themeColors.light.interactive.secondary, themeColors.light.interactive.primary],
162
+ button: ["#BC4CF7", "#7873EE"],
163
+ buttonDisabled: ["#BC4CF760", "#7873EE60"]
164
+ }
165
+ };
166
+ var alphaColors = {
167
+ dark: {
168
+ border: "rgba(182, 179, 183, 0.3)",
169
+ overlay: "rgba(0, 0, 0, 0.7)",
170
+ surface: "rgba(182, 179, 183, 0.1)"
171
+ },
172
+ light: {
173
+ border: "rgba(75, 72, 76, 0.2)",
174
+ overlay: "rgba(0, 0, 0, 0.5)",
175
+ surface: "rgba(255, 255, 255, 0.8)"
176
+ }
177
+ };
178
+ var shadowColors = {
179
+ dark: {
180
+ button: "rgba(128, 62, 208, 0.3)",
181
+ card: "rgba(0, 0, 0, 0.3)",
182
+ primary: themeColors.dark.interactive.primary,
183
+ primaryFull: `0 20px 80px -10px ${themeColors.dark.interactive.primary}`,
184
+ secondary: "rgba(0, 0, 0, 0.5)"
185
+ },
186
+ light: {
187
+ button: "rgba(113, 47, 193, 0.25)",
188
+ card: "rgba(75, 72, 76, 0.03)",
189
+ primary: themeColors.light.interactive.primary,
190
+ primaryFull: `0 20px 80px -10px ${themeColors.light.interactive.primary}`,
191
+ secondary: "rgba(75, 72, 76, 0.06)"
192
+ }
193
+ };
194
+ var shadowStyles = {
195
+ dark: {
196
+ card: {
197
+ elevation: 1,
198
+ shadowColor: shadowColors.dark.card,
199
+ shadowOffset: {
200
+ height: 1,
201
+ width: 0
202
+ },
203
+ shadowOpacity: 1,
204
+ shadowRadius: 3
205
+ },
206
+ primary: {
207
+ elevation: 20,
208
+ shadowColor: shadowColors.dark.primary,
209
+ shadowOffset: {
210
+ height: 20,
211
+ width: 0
212
+ },
213
+ shadowOpacity: 1,
214
+ shadowRadius: 35
215
+ },
216
+ secondary: {
217
+ elevation: 2,
218
+ shadowColor: shadowColors.dark.secondary,
219
+ shadowOffset: {
220
+ height: 2,
221
+ width: 0
222
+ },
223
+ shadowOpacity: 1,
224
+ shadowRadius: 4
225
+ }
226
+ },
227
+ light: {
228
+ card: {
229
+ elevation: 1,
230
+ shadowColor: shadowColors.light.card,
231
+ shadowOffset: {
232
+ height: 1,
233
+ width: 0
234
+ },
235
+ shadowOpacity: 1,
236
+ shadowRadius: 3
237
+ },
238
+ primary: {
239
+ elevation: 20,
240
+ shadowColor: shadowColors.light.primary,
241
+ shadowOffset: {
242
+ height: 20,
243
+ width: 0
244
+ },
245
+ shadowOpacity: 1,
246
+ shadowRadius: 35
247
+ },
248
+ secondary: {
249
+ elevation: 2,
250
+ shadowColor: shadowColors.light.secondary,
251
+ shadowOffset: {
252
+ height: 2,
253
+ width: 0
254
+ },
255
+ shadowOpacity: 1,
256
+ shadowRadius: 4
257
+ }
258
+ }
259
+ };
260
+ var fontFamilies = {
261
+ regular: "Livvic",
262
+ semibold: "LivvicSemiBold",
263
+ bold: "LivvicBold",
264
+ heading: "LivvicBold",
265
+ body: "Livvic",
266
+ caption: "Livvic",
267
+ button: "LivvicSemiBold"
268
+ };
269
+ var fontSizes = {
270
+ xs: 12,
271
+ sm: 14,
272
+ md: 16,
273
+ lg: 18,
274
+ xl: 20,
275
+ xxl: 24,
276
+ huge: 32,
277
+ caption: 12,
278
+ body: 16,
279
+ subtitle: 18,
280
+ title: 20,
281
+ heading: 24,
282
+ display: 32
283
+ };
284
+ var lineHeights = {
285
+ tight: 1.2,
286
+ normal: 1.4,
287
+ relaxed: 1.6,
288
+ loose: 1.8,
289
+ caption: 1.4,
290
+ body: 1.5,
291
+ heading: 1.2
292
+ };
293
+ var fontWeights = {
294
+ regular: "400",
295
+ medium: "500",
296
+ semibold: "600",
297
+ bold: "700"
298
+ };
299
+ var textStyles = {
300
+ displayLarge: {
301
+ fontFamily: fontFamilies.bold,
302
+ fontSize: fontSizes.huge,
303
+ lineHeight: lineHeights.tight,
304
+ fontWeight: fontWeights.bold
305
+ },
306
+ displayMedium: {
307
+ fontFamily: fontFamilies.bold,
308
+ fontSize: fontSizes.heading,
309
+ lineHeight: lineHeights.tight,
310
+ fontWeight: fontWeights.bold
311
+ },
312
+ headingLarge: {
313
+ fontFamily: fontFamilies.bold,
314
+ fontSize: fontSizes.title,
315
+ lineHeight: lineHeights.normal,
316
+ fontWeight: fontWeights.bold
317
+ },
318
+ headingMedium: {
319
+ fontFamily: fontFamilies.semibold,
320
+ fontSize: fontSizes.subtitle,
321
+ lineHeight: lineHeights.normal,
322
+ fontWeight: fontWeights.semibold
323
+ },
324
+ headingSmall: {
325
+ fontFamily: fontFamilies.semibold,
326
+ fontSize: fontSizes.md,
327
+ lineHeight: lineHeights.normal,
328
+ fontWeight: fontWeights.semibold
329
+ },
330
+ bodyLarge: {
331
+ fontFamily: fontFamilies.regular,
332
+ fontSize: fontSizes.lg,
333
+ lineHeight: lineHeights.relaxed,
334
+ fontWeight: fontWeights.regular
335
+ },
336
+ bodyMedium: {
337
+ fontFamily: fontFamilies.regular,
338
+ fontSize: fontSizes.body,
339
+ lineHeight: lineHeights.normal,
340
+ fontWeight: fontWeights.regular
341
+ },
342
+ bodySmall: {
343
+ fontFamily: fontFamilies.regular,
344
+ fontSize: fontSizes.sm,
345
+ lineHeight: lineHeights.normal,
346
+ fontWeight: fontWeights.regular
347
+ },
348
+ labelLarge: {
349
+ fontFamily: fontFamilies.semibold,
350
+ fontSize: fontSizes.md,
351
+ lineHeight: lineHeights.normal,
352
+ fontWeight: fontWeights.semibold
353
+ },
354
+ labelMedium: {
355
+ fontFamily: fontFamilies.semibold,
356
+ fontSize: fontSizes.sm,
357
+ lineHeight: lineHeights.normal,
358
+ fontWeight: fontWeights.semibold
359
+ },
360
+ labelSmall: {
361
+ fontFamily: fontFamilies.regular,
362
+ fontSize: fontSizes.xs,
363
+ lineHeight: lineHeights.normal,
364
+ fontWeight: fontWeights.regular
365
+ },
366
+ buttonLarge: {
367
+ fontFamily: fontFamilies.semibold,
368
+ fontSize: fontSizes.md,
369
+ lineHeight: lineHeights.normal,
370
+ fontWeight: fontWeights.semibold
371
+ },
372
+ buttonMedium: {
373
+ fontFamily: fontFamilies.semibold,
374
+ fontSize: fontSizes.sm,
375
+ lineHeight: lineHeights.normal,
376
+ fontWeight: fontWeights.semibold
377
+ },
378
+ caption: {
379
+ fontFamily: fontFamilies.regular,
380
+ fontSize: fontSizes.caption,
381
+ lineHeight: lineHeights.caption,
382
+ fontWeight: fontWeights.regular
383
+ }
384
+ };
385
+ var spacing = {
386
+ xs: 4,
387
+ sm: 8,
388
+ md: 12,
389
+ lg: 16,
390
+ xl: 24,
391
+ xxl: 32,
392
+ xxxl: 48,
393
+ headerHeight: 56,
394
+ tabBarHeight: 80
395
+ };
396
+ var radius = {
397
+ xs: 4,
398
+ sm: 6,
399
+ md: 8,
400
+ lg: 12,
401
+ xl: 16,
402
+ xxl: 24,
403
+ round: 9999
404
+ };
405
+ var tokens = {
406
+ dark: {
407
+ colors: {
408
+ background: themeColors.dark.background.primary,
409
+ error: semanticColors.dark.error,
410
+ onBackground: themeColors.dark.text.primary,
411
+ onError: neutralColors.white,
412
+ onPrimary: neutralColors.white,
413
+ onSecondary: neutralColors.black,
414
+ onSurface: themeColors.dark.text.primary,
415
+ primary: themeColors.dark.interactive.primary,
416
+ primaryVariant: themeColors.dark.accent.primary,
417
+ secondary: themeColors.dark.interactive.secondary,
418
+ surface: themeColors.dark.surface.primary
419
+ }
420
+ },
421
+ light: {
422
+ colors: {
423
+ background: themeColors.light.background.primary,
424
+ error: semanticColors.light.error,
425
+ onBackground: themeColors.light.text.primary,
426
+ onError: neutralColors.white,
427
+ onPrimary: neutralColors.white,
428
+ onSecondary: neutralColors.white,
429
+ onSurface: themeColors.light.text.primary,
430
+ primary: themeColors.light.interactive.primary,
431
+ primaryVariant: themeColors.light.accent.primary,
432
+ secondary: themeColors.light.interactive.secondary,
433
+ surface: themeColors.light.surface.card
434
+ }
435
+ },
436
+ radius,
437
+ spacing,
438
+ typography: {
439
+ fontSize: fontSizes,
440
+ fontWeightBold: fontWeights.bold,
441
+ fontWeightMedium: fontWeights.medium,
442
+ fontWeightRegular: fontWeights.regular,
443
+ fontWeightSemibold: fontWeights.semibold
444
+ }
445
+ };
446
+
447
+ // ../theme/lib/module/index.js
448
+ var createTheme = (scheme) => {
449
+ const colorTokens = scheme === "dark" ? themeColors.dark : themeColors.light;
450
+ const semanticTokens = scheme === "dark" ? semanticColors.dark : semanticColors.light;
451
+ const alphaTokens = scheme === "dark" ? alphaColors.dark : alphaColors.light;
452
+ const gradientTokens = scheme === "dark" ? gradientColors.dark : gradientColors.light;
453
+ const shadowColorTokens = scheme === "dark" ? shadowColors.dark : shadowColors.light;
454
+ const shadowStyleTokens = scheme === "dark" ? shadowStyles.dark : shadowStyles.light;
455
+ return {
456
+ scheme,
457
+ colors: {
458
+ background: {
459
+ card: colorTokens.background.card,
460
+ elevated: colorTokens.background.elevated,
461
+ modal: colorTokens.surface.modal,
462
+ overlay: alphaTokens.overlay,
463
+ primary: colorTokens.background.primary,
464
+ quaternary: colorTokens.background.quaternary,
465
+ secondary: colorTokens.background.secondary,
466
+ tertiary: colorTokens.background.tertiary
467
+ },
468
+ surface: {
469
+ card: colorTokens.surface.card,
470
+ cardSecondary: colorTokens.surface.cardSecondary,
471
+ disabled: colorTokens.surface.disabled,
472
+ elevated: colorTokens.background.elevated,
473
+ header: colorTokens.surface.header,
474
+ input: colorTokens.surface.input,
475
+ modal: colorTokens.surface.modal,
476
+ primary: colorTokens.surface.card,
477
+ secondary: colorTokens.surface.secondary,
478
+ tabBar: colorTokens.surface.tabBar,
479
+ tertiary: colorTokens.surface.tertiary
480
+ },
481
+ text: {
482
+ badge: colorTokens.text.badge,
483
+ black: neutralColors.black,
484
+ disabled: colorTokens.text.disabled,
485
+ inverse: scheme === "dark" ? neutralColors.black : neutralColors.white,
486
+ link: colorTokens.interactive.primary,
487
+ placeholder: colorTokens.text.placeholder,
488
+ primary: colorTokens.text.primary,
489
+ secondary: colorTokens.text.secondary,
490
+ tertiary: colorTokens.text.tertiary,
491
+ white: neutralColors.white
492
+ },
493
+ brand: {
494
+ accent: colorTokens.accent.primary,
495
+ primary: colorTokens.interactive.primary,
496
+ secondary: colorTokens.interactive.secondary
497
+ },
498
+ interactive: {
499
+ accent: colorTokens.accent.primary,
500
+ accentHover: colorTokens.accent.hover,
501
+ accentPressed: colorTokens.accent.pressed,
502
+ primary: colorTokens.interactive.primary,
503
+ primaryDisabled: colorTokens.interactive.primaryDisabled,
504
+ primaryHover: colorTokens.interactive.primaryHover,
505
+ primaryPressed: colorTokens.interactive.primaryPressed,
506
+ secondary: colorTokens.interactive.secondary,
507
+ secondaryHover: colorTokens.interactive.secondaryHover,
508
+ secondaryPressed: colorTokens.interactive.secondaryPressed
509
+ },
510
+ status: {
511
+ available: colorTokens.status.available,
512
+ busy: colorTokens.status.busy,
513
+ error: semanticTokens.error,
514
+ info: semanticTokens.info,
515
+ offline: colorTokens.status.offline,
516
+ online: colorTokens.status.online,
517
+ success: semanticTokens.success,
518
+ warning: semanticTokens.warning
519
+ },
520
+ rating: {
521
+ primary: colorTokens.rating.primary
522
+ },
523
+ border: {
524
+ disabled: colorTokens.border.disabled,
525
+ error: semanticTokens.error,
526
+ focus: colorTokens.interactive.primary,
527
+ ...scheme === "light" && {
528
+ light: colorTokens.border.light
529
+ },
530
+ primary: alphaTokens.border,
531
+ secondary: colorTokens.border.secondary
532
+ },
533
+ shadow: {
534
+ card: shadowColorTokens.card,
535
+ primary: shadowColorTokens.primary,
536
+ primaryFull: shadowColorTokens.primaryFull,
537
+ secondary: shadowColorTokens.secondary
538
+ },
539
+ shadowStyles: {
540
+ card: shadowStyleTokens.card,
541
+ primary: shadowStyleTokens.primary,
542
+ secondary: shadowStyleTokens.secondary
543
+ },
544
+ gradient: {
545
+ primary: gradientTokens.primary,
546
+ secondary: gradientTokens.secondary,
547
+ button: gradientTokens.button,
548
+ buttonDisabled: gradientTokens.buttonDisabled
549
+ },
550
+ alpha: {
551
+ border: alphaTokens.border,
552
+ overlay: alphaTokens.overlay,
553
+ surface: alphaTokens.surface
554
+ }
555
+ },
556
+ spacing,
557
+ typography: {
558
+ fontFamily: fontFamilies,
559
+ fontSize: fontSizes,
560
+ fontWeight: fontWeights,
561
+ lineHeight: lineHeights,
562
+ textStyles
563
+ },
564
+ radius,
565
+ components: {
566
+ button: {
567
+ borderRadius: radius.md,
568
+ paddingHorizontal: spacing.lg,
569
+ paddingVertical: spacing.sm,
570
+ ...shadowStyleTokens.primary
571
+ },
572
+ input: {
573
+ backgroundColor: colorTokens.surface.input,
574
+ borderColor: colorTokens.surface.input,
575
+ borderRadius: radius.md,
576
+ borderWidth: 1,
577
+ paddingHorizontal: spacing.md,
578
+ paddingVertical: spacing.sm
579
+ },
580
+ card: {
581
+ backgroundColor: colorTokens.surface.card,
582
+ borderRadius: radius.lg,
583
+ padding: spacing.md,
584
+ ...shadowStyleTokens.card
585
+ },
586
+ cardSecondary: {
587
+ backgroundColor: colorTokens.surface.cardSecondary,
588
+ borderRadius: radius.lg,
589
+ padding: spacing.md,
590
+ ...shadowStyleTokens.card
591
+ },
592
+ modal: {
593
+ backgroundColor: colorTokens.surface.modal,
594
+ borderRadius: radius.xl,
595
+ overlayColor: alphaTokens.overlay
596
+ },
597
+ header: {
598
+ backgroundColor: colorTokens.surface.header,
599
+ borderBottomColor: scheme === "light" ? colorTokens.border.light : colorTokens.border.secondary
600
+ },
601
+ tabBar: {
602
+ backgroundColor: colorTokens.surface.tabBar,
603
+ borderTopColor: scheme === "light" ? colorTokens.border.light : colorTokens.border.secondary
604
+ }
605
+ },
606
+ layout: {
607
+ headerHeight: spacing.headerHeight,
608
+ tabBarHeight: spacing.tabBarHeight,
609
+ safeAreaPadding: spacing.md,
610
+ screenPadding: spacing.lg
611
+ },
612
+ setScheme: () => {
613
+ },
614
+ toggleScheme: () => {
615
+ }
616
+ };
617
+ };
618
+ var ThemeContext = /* @__PURE__ */ React.createContext(createTheme("light"));
619
+ function useTheme() {
620
+ const context = React.useContext(ThemeContext);
621
+ if (!context) {
622
+ throw new Error("useTheme deve ser usado dentro de um ThemeProvider");
623
+ }
624
+ return context;
625
+ }
626
+
1
627
  // src/generated/ArrowDown.tsx
2
628
  import Svg, { Path } from "react-native-svg";
3
629
  import { jsx } from "react/jsx-runtime";
@@ -568,18 +1194,18 @@ var ICONS = {
568
1194
 
569
1195
  // src/Icon.tsx
570
1196
  import { jsx as jsx70 } from "react/jsx-runtime";
571
- var Icon = ({ name, size, color, ...rest }) => {
1197
+ var Icon = ({ name, size, color, testID = "icon", ...rest }) => {
1198
+ const theme = useTheme();
572
1199
  const Cmp = ICONS[name];
573
1200
  const extra = {};
574
1201
  if (size != null) {
575
1202
  extra.width = size;
576
1203
  extra.height = size;
577
1204
  }
578
- if (color) {
579
- extra.fill = color;
580
- extra.color = color;
581
- }
582
- return /* @__PURE__ */ jsx70(Cmp, { ...extra, ...rest });
1205
+ const iconColor = color || theme.colors.text.primary || "#000000";
1206
+ extra.fill = iconColor;
1207
+ extra.color = iconColor;
1208
+ return /* @__PURE__ */ jsx70(Cmp, { ...extra, testID, ...rest });
583
1209
  };
584
1210
 
585
1211
  // src/index.tsx
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wecareu/icons",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "description": "Sistema de ícones SVG para WeCareU Design System",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
package/src/Icon.tsx CHANGED
@@ -1,5 +1,6 @@
1
1
  import React from 'react';
2
2
  import type { SvgProps } from 'react-native-svg';
3
+ import { useTheme } from '@wecareu/theme';
3
4
  import { ICONS, type IconName } from './icons-map';
4
5
 
5
6
  type Props = SvgProps & {
@@ -8,7 +9,8 @@ type Props = SvgProps & {
8
9
  color?: string;
9
10
  };
10
11
 
11
- export const Icon: React.FC<Props> = ({ name, size, color, ...rest }) => {
12
+ export const Icon: React.FC<Props> = ({ name, size, color, testID = 'icon', ...rest }) => {
13
+ const theme = useTheme();
12
14
  const Cmp = ICONS[name];
13
15
 
14
16
  const extra: SvgProps = {};
@@ -16,12 +18,12 @@ export const Icon: React.FC<Props> = ({ name, size, color, ...rest }) => {
16
18
  extra.width = size;
17
19
  extra.height = size;
18
20
  }
19
- if (color) {
20
- extra.fill = color;
21
- extra.color = color;
22
- }
23
21
 
24
- return <Cmp {...extra} {...rest} />;
22
+ const iconColor = color || theme.colors.text.primary || '#000000';
23
+ extra.fill = iconColor;
24
+ extra.color = iconColor;
25
+
26
+ return <Cmp {...extra} testID={testID} {...rest} />;
25
27
  };
26
28
 
27
29
  export type { IconName };