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