@factorialco/f0-react-native 0.28.1 → 0.30.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 (133) hide show
  1. package/lib/module/components/Avatars/IconAvatar/index.js +1 -1
  2. package/lib/module/components/Avatars/IconAvatar/index.js.map +1 -1
  3. package/lib/module/components/Avatars/ModuleAvatar/index.js +1 -1
  4. package/lib/module/components/Avatars/ModuleAvatar/index.js.map +1 -1
  5. package/lib/module/components/Badge/index.js +1 -1
  6. package/lib/module/components/Badge/index.js.map +1 -1
  7. package/lib/module/components/Button/index.js +1 -1
  8. package/lib/module/components/Button/index.js.map +1 -1
  9. package/lib/module/components/Button/index.spec.js +1 -1
  10. package/lib/module/components/Button/index.spec.js.map +1 -1
  11. package/lib/module/components/Icon/index.js +1 -1
  12. package/lib/module/components/Icon/index.js.map +1 -1
  13. package/lib/module/components/OneChip/index.js +1 -1
  14. package/lib/module/components/OneChip/index.js.map +1 -1
  15. package/lib/module/components/Tags/AlertTab/index.js +1 -1
  16. package/lib/module/components/Tags/AlertTab/index.js.map +1 -1
  17. package/lib/module/components/Tags/RawTag/index.js +1 -1
  18. package/lib/module/components/Tags/RawTag/index.js.map +1 -1
  19. package/lib/module/components/experimental/Lists/DataList/ItemContainer.js +1 -1
  20. package/lib/module/components/experimental/Lists/DataList/ItemContainer.js.map +1 -1
  21. package/lib/module/components/experimental/Lists/DataList/actions/CopyAction.js +1 -1
  22. package/lib/module/components/experimental/Lists/DataList/actions/CopyAction.js.map +1 -1
  23. package/lib/module/components/experimental/Lists/DataList/actions/GenericAction.js +1 -1
  24. package/lib/module/components/experimental/Lists/DataList/actions/GenericAction.js.map +1 -1
  25. package/lib/module/components/exports.js +1 -1
  26. package/lib/module/components/exports.js.map +1 -1
  27. package/lib/module/components/primitives/F0Icon/F0Icon.js +2 -0
  28. package/lib/module/components/primitives/F0Icon/F0Icon.js.map +1 -0
  29. package/lib/module/components/primitives/F0Icon/F0Icon.md +187 -0
  30. package/lib/module/components/primitives/F0Icon/F0Icon.styles.js +2 -0
  31. package/lib/module/components/primitives/F0Icon/F0Icon.styles.js.map +1 -0
  32. package/lib/module/components/primitives/F0Icon/F0Icon.types.js +2 -0
  33. package/lib/module/components/primitives/F0Icon/F0Icon.types.js.map +1 -0
  34. package/lib/module/components/primitives/F0Icon/index.js +2 -0
  35. package/lib/module/components/primitives/F0Icon/index.js.map +1 -0
  36. package/lib/module/components/primitives/F0Text/AnimatedF0Text/AnimatedF0Text.js +1 -1
  37. package/lib/module/components/primitives/F0Text/AnimatedF0Text/AnimatedF0Text.js.map +1 -1
  38. package/lib/module/components/primitives/F0Text/AnimatedF0Text/AnimatedF0Text.md +45 -8
  39. package/lib/module/components/primitives/F0Text/F0Text/F0Text.js +1 -1
  40. package/lib/module/components/primitives/F0Text/F0Text/F0Text.js.map +1 -1
  41. package/lib/module/components/primitives/F0Text/F0Text/F0Text.md +42 -31
  42. package/lib/module/components/primitives/F0Text/F0Text/F0Text.styles.js +1 -1
  43. package/lib/module/components/primitives/F0Text/F0Text/F0Text.styles.js.map +1 -1
  44. package/lib/module/components/primitives/F0Text/F0Text/F0Text.types.js +1 -1
  45. package/lib/module/components/primitives/F0Text/F0Text/F0Text.types.js.map +1 -1
  46. package/lib/module/icons/index.js +1 -1
  47. package/lib/module/icons/index.js.map +1 -1
  48. package/lib/module/lib/utils.js.map +1 -1
  49. package/lib/typescript/components/Activity/ActivityItem/index.d.ts +1 -1
  50. package/lib/typescript/components/Activity/ActivityItem/index.d.ts.map +1 -1
  51. package/lib/typescript/components/Avatars/IconAvatar/index.d.ts +1 -1
  52. package/lib/typescript/components/Avatars/IconAvatar/index.d.ts.map +1 -1
  53. package/lib/typescript/components/Avatars/ModuleAvatar/index.d.ts +1 -1
  54. package/lib/typescript/components/Avatars/ModuleAvatar/index.d.ts.map +1 -1
  55. package/lib/typescript/components/Badge/index.d.ts +1 -1
  56. package/lib/typescript/components/Badge/index.d.ts.map +1 -1
  57. package/lib/typescript/components/Button/index.d.ts +1 -1
  58. package/lib/typescript/components/Button/index.d.ts.map +1 -1
  59. package/lib/typescript/components/Icon/index.d.ts +7 -14
  60. package/lib/typescript/components/Icon/index.d.ts.map +1 -1
  61. package/lib/typescript/components/OneChip/index.d.ts +1 -1
  62. package/lib/typescript/components/OneChip/index.d.ts.map +1 -1
  63. package/lib/typescript/components/Tags/RawTag/index.d.ts +1 -1
  64. package/lib/typescript/components/Tags/RawTag/index.d.ts.map +1 -1
  65. package/lib/typescript/components/experimental/Lists/DataList/ItemContainer.d.ts +1 -1
  66. package/lib/typescript/components/experimental/Lists/DataList/ItemContainer.d.ts.map +1 -1
  67. package/lib/typescript/components/experimental/Lists/DataList/actions/CopyAction.d.ts.map +1 -1
  68. package/lib/typescript/components/experimental/Lists/DataList/index.d.ts +1 -1
  69. package/lib/typescript/components/experimental/Lists/DataList/index.d.ts.map +1 -1
  70. package/lib/typescript/components/exports.d.ts +2 -1
  71. package/lib/typescript/components/exports.d.ts.map +1 -1
  72. package/lib/typescript/components/primitives/F0Icon/F0Icon.d.ts +25 -0
  73. package/lib/typescript/components/primitives/F0Icon/F0Icon.d.ts.map +1 -0
  74. package/lib/typescript/components/primitives/F0Icon/F0Icon.styles.d.ts +90 -0
  75. package/lib/typescript/components/primitives/F0Icon/F0Icon.styles.d.ts.map +1 -0
  76. package/lib/typescript/components/primitives/F0Icon/F0Icon.types.d.ts +47 -0
  77. package/lib/typescript/components/primitives/F0Icon/F0Icon.types.d.ts.map +1 -0
  78. package/lib/typescript/components/primitives/F0Icon/index.d.ts +10 -0
  79. package/lib/typescript/components/primitives/F0Icon/index.d.ts.map +1 -0
  80. package/lib/typescript/components/primitives/F0Text/AnimatedF0Text/AnimatedF0Text.d.ts.map +1 -1
  81. package/lib/typescript/components/primitives/F0Text/AnimatedF0Text/AnimatedF0Text.types.d.ts +14 -0
  82. package/lib/typescript/components/primitives/F0Text/AnimatedF0Text/AnimatedF0Text.types.d.ts.map +1 -1
  83. package/lib/typescript/components/primitives/F0Text/F0Text/F0Text.d.ts.map +1 -1
  84. package/lib/typescript/components/primitives/F0Text/F0Text/F0Text.styles.d.ts +2 -2
  85. package/lib/typescript/components/primitives/F0Text/F0Text/F0Text.styles.d.ts.map +1 -1
  86. package/lib/typescript/components/primitives/F0Text/F0Text/F0Text.types.d.ts +22 -18
  87. package/lib/typescript/components/primitives/F0Text/F0Text/F0Text.types.d.ts.map +1 -1
  88. package/lib/typescript/icons/index.d.ts +0 -1
  89. package/lib/typescript/icons/index.d.ts.map +1 -1
  90. package/lib/typescript/lib/utils.d.ts +1 -2
  91. package/lib/typescript/lib/utils.d.ts.map +1 -1
  92. package/package.json +1 -1
  93. package/src/components/Activity/ActivityItem/index.spec.tsx +1 -1
  94. package/src/components/Activity/ActivityItem/index.tsx +1 -1
  95. package/src/components/Avatars/IconAvatar/index.tsx +6 -2
  96. package/src/components/Avatars/ModuleAvatar/index.tsx +1 -1
  97. package/src/components/Badge/index.tsx +2 -2
  98. package/src/components/Button/index.spec.tsx +3 -4
  99. package/src/components/Button/index.tsx +19 -13
  100. package/src/components/Icon/__tests__/Icon.spec.tsx +0 -4
  101. package/src/components/Icon/index.tsx +7 -26
  102. package/src/components/OneChip/index.tsx +3 -3
  103. package/src/components/Tags/AlertTab/index.tsx +2 -2
  104. package/src/components/Tags/RawTag/index.tsx +2 -2
  105. package/src/components/experimental/Lists/DataList/ItemContainer.tsx +2 -2
  106. package/src/components/experimental/Lists/DataList/actions/CopyAction.tsx +7 -10
  107. package/src/components/experimental/Lists/DataList/actions/GenericAction.tsx +2 -2
  108. package/src/components/experimental/Lists/DataList/index.tsx +1 -1
  109. package/src/components/experimental/Lists/DetailsItem/__snapshots__/index.spec.tsx.snap +4 -4
  110. package/src/components/experimental/Lists/DetailsItemsList/__snapshots__/index.spec.tsx.snap +1 -1
  111. package/src/components/exports.ts +2 -1
  112. package/src/components/primitives/F0Icon/F0Icon.md +187 -0
  113. package/src/components/primitives/F0Icon/F0Icon.styles.ts +43 -0
  114. package/src/components/primitives/F0Icon/F0Icon.tsx +73 -0
  115. package/src/components/primitives/F0Icon/F0Icon.types.ts +77 -0
  116. package/src/components/primitives/F0Icon/__tests__/F0Icon.spec.tsx +131 -0
  117. package/src/components/primitives/F0Icon/__tests__/F0Icon.tokens.spec.ts +39 -0
  118. package/src/components/primitives/F0Icon/index.ts +10 -0
  119. package/src/components/primitives/F0Text/AnimatedF0Text/AnimatedF0Text.md +45 -8
  120. package/src/components/primitives/F0Text/AnimatedF0Text/AnimatedF0Text.tsx +20 -8
  121. package/src/components/primitives/F0Text/AnimatedF0Text/AnimatedF0Text.types.ts +15 -0
  122. package/src/components/primitives/F0Text/AnimatedF0Text/__tests__/AnimatedF0Text.spec.tsx +220 -0
  123. package/src/components/primitives/F0Text/AnimatedF0Text/__tests__/__snapshots__/AnimatedF0Text.spec.tsx.snap +16 -16
  124. package/src/components/primitives/F0Text/F0Text/F0Text.md +42 -31
  125. package/src/components/primitives/F0Text/F0Text/F0Text.styles.ts +1 -1
  126. package/src/components/primitives/F0Text/F0Text/F0Text.tsx +17 -10
  127. package/src/components/primitives/F0Text/F0Text/F0Text.types.ts +22 -18
  128. package/src/components/primitives/F0Text/F0Text/__tests__/F0Text.spec.tsx +340 -16
  129. package/src/components/primitives/F0Text/F0Text/__tests__/__snapshots__/F0Text.spec.tsx.snap +36 -36
  130. package/src/icons/index.ts +0 -1
  131. package/src/lib/utils.ts +1 -2
  132. package/lib/module/components/Icon/README.md +0 -63
  133. package/src/components/Icon/README.md +0 -63
@@ -0,0 +1,90 @@
1
+ /**
2
+ * F0Icon tailwind-variants configuration
3
+ * Size and color variants from the F0 design system
4
+ */
5
+ export declare const iconVariants: import("tailwind-variants").TVReturnType<{
6
+ size: {
7
+ xl: string;
8
+ lg: string;
9
+ md: string;
10
+ sm: string;
11
+ xs: string;
12
+ };
13
+ color: {
14
+ default: string;
15
+ secondary: string;
16
+ inverse: string;
17
+ bold: string;
18
+ critical: string;
19
+ "critical-bold": string;
20
+ accent: string;
21
+ info: string;
22
+ warning: string;
23
+ positive: string;
24
+ promote: string;
25
+ selected: string;
26
+ "selected-hover": string;
27
+ "mood-super-negative": string;
28
+ "mood-negative": string;
29
+ "mood-neutral": string;
30
+ "mood-positive": string;
31
+ "mood-super-positive": string;
32
+ };
33
+ }, undefined, "shrink-0", {
34
+ size: {
35
+ xl: string;
36
+ lg: string;
37
+ md: string;
38
+ sm: string;
39
+ xs: string;
40
+ };
41
+ color: {
42
+ default: string;
43
+ secondary: string;
44
+ inverse: string;
45
+ bold: string;
46
+ critical: string;
47
+ "critical-bold": string;
48
+ accent: string;
49
+ info: string;
50
+ warning: string;
51
+ positive: string;
52
+ promote: string;
53
+ selected: string;
54
+ "selected-hover": string;
55
+ "mood-super-negative": string;
56
+ "mood-negative": string;
57
+ "mood-neutral": string;
58
+ "mood-positive": string;
59
+ "mood-super-positive": string;
60
+ };
61
+ }, undefined, import("tailwind-variants").TVReturnType<{
62
+ size: {
63
+ xl: string;
64
+ lg: string;
65
+ md: string;
66
+ sm: string;
67
+ xs: string;
68
+ };
69
+ color: {
70
+ default: string;
71
+ secondary: string;
72
+ inverse: string;
73
+ bold: string;
74
+ critical: string;
75
+ "critical-bold": string;
76
+ accent: string;
77
+ info: string;
78
+ warning: string;
79
+ positive: string;
80
+ promote: string;
81
+ selected: string;
82
+ "selected-hover": string;
83
+ "mood-super-negative": string;
84
+ "mood-negative": string;
85
+ "mood-neutral": string;
86
+ "mood-positive": string;
87
+ "mood-super-positive": string;
88
+ };
89
+ }, undefined, "shrink-0", unknown, unknown, undefined>>;
90
+ //# sourceMappingURL=F0Icon.styles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"F0Icon.styles.d.ts","sourceRoot":"","sources":["../../../../../src/components/primitives/F0Icon/F0Icon.styles.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uDAoCvB,CAAA"}
@@ -0,0 +1,47 @@
1
+ import type { ForwardRefExoticComponent, RefAttributes } from "react";
2
+ import type { SvgProps } from "react-native-svg";
3
+ import type { Svg } from "react-native-svg";
4
+ import type { VariantProps } from "tailwind-variants";
5
+ import type { iconVariants } from "./F0Icon.styles";
6
+ /**
7
+ * Icon component type - forward ref to SVG component with className support
8
+ */
9
+ export type IconType = ForwardRefExoticComponent<SvgProps & RefAttributes<Svg> & {
10
+ className?: string;
11
+ }>;
12
+ /**
13
+ * Icon color variants derived from f0-icon-* tokens in src/styles/theme.css
14
+ * Sync is enforced by F0Icon.tokens.spec.ts
15
+ */
16
+ export declare const ICON_COLORS: readonly ["default", "secondary", "inverse", "bold", "critical", "critical-bold", "accent", "info", "warning", "positive", "promote", "selected", "selected-hover", "mood-super-negative", "mood-negative", "mood-neutral", "mood-positive", "mood-super-positive"];
17
+ export type IconColor = (typeof ICON_COLORS)[number];
18
+ /**
19
+ * Public F0Icon props
20
+ * Supports semantic color via `color` prop, with `className` as escape hatch.
21
+ */
22
+ export interface F0IconProps extends Omit<SvgProps, "style"> {
23
+ /**
24
+ * Tailwind className for custom styling or color overrides.
25
+ * Prefer the `color` prop for semantic icon colors.
26
+ */
27
+ className?: string;
28
+ /**
29
+ * Semantic icon color from the F0 design system
30
+ * Maps to f0-icon-* tokens (e.g. color="critical" -> text-f0-icon-critical)
31
+ */
32
+ color?: IconColor;
33
+ /**
34
+ * Icon component to render (from icons directory)
35
+ */
36
+ icon: IconType;
37
+ /**
38
+ * Icon size variant
39
+ * @default 'md'
40
+ */
41
+ size?: VariantProps<typeof iconVariants>["size"];
42
+ /**
43
+ * Test ID for testing
44
+ */
45
+ testID?: string;
46
+ }
47
+ //# sourceMappingURL=F0Icon.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"F0Icon.types.d.ts","sourceRoot":"","sources":["../../../../../src/components/primitives/F0Icon/F0Icon.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,aAAa,EAAE,MAAM,OAAO,CAAA;AACrE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAChD,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAA;AAC3C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAErD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAEnD;;GAEG;AACH,MAAM,MAAM,QAAQ,GAAG,yBAAyB,CAC9C,QAAQ,GACN,aAAa,CAAC,GAAG,CAAC,GAAG;IACnB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CACJ,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,WAAW,qQAmBd,CAAA;AAEV,MAAM,MAAM,SAAS,GAAG,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,CAAC,CAAA;AAEpD;;;GAGG;AACH,MAAM,WAAW,WAAY,SAAQ,IAAI,CAAC,QAAQ,EAAE,OAAO,CAAC;IAC1D;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;IAElB;;;OAGG;IACH,KAAK,CAAC,EAAE,SAAS,CAAA;IAEjB;;OAEG;IACH,IAAI,EAAE,QAAQ,CAAA;IAEd;;;OAGG;IACH,IAAI,CAAC,EAAE,YAAY,CAAC,OAAO,YAAY,CAAC,CAAC,MAAM,CAAC,CAAA;IAEhD;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * F0Icon - Icon primitive component
3
+ *
4
+ * @see F0Icon.md for documentation
5
+ */
6
+ export { default as F0Icon } from "./F0Icon";
7
+ export type { F0IconProps, IconType, IconColor } from "./F0Icon.types";
8
+ export { ICON_COLORS } from "./F0Icon.types";
9
+ export { applyIconInterop } from "./F0Icon";
10
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/primitives/F0Icon/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,UAAU,CAAA;AAC5C,YAAY,EAAE,WAAW,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AACtE,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AAC5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"AnimatedF0Text.d.ts","sourceRoot":"","sources":["../../../../../../src/components/primitives/F0Text/AnimatedF0Text/AnimatedF0Text.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAMzB,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAA;AA+DjE,eAAO,MAAM,cAAc,qNAAsC,CAAA;AAEjE,YAAY,EAAE,mBAAmB,EAAE,CAAA"}
1
+ {"version":3,"file":"AnimatedF0Text.d.ts","sourceRoot":"","sources":["../../../../../../src/components/primitives/F0Text/AnimatedF0Text/AnimatedF0Text.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAOzB,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAA;AA0EjE,eAAO,MAAM,cAAc,qNAAsC,CAAA;AAEjE,YAAY,EAAE,mBAAmB,EAAE,CAAA"}
@@ -41,5 +41,19 @@ export interface AnimatedF0TextProps extends Omit<AnimatedProps<RNTextProps>, "c
41
41
  * Children content
42
42
  */
43
43
  children?: React.ReactNode;
44
+ /**
45
+ * Tailwind classes for layout and positioning.
46
+ *
47
+ * Allowed: margin, padding, flex, position, width, height, opacity, z-index, etc.
48
+ * Ignored: font-size, font-weight, line-height, letter-spacing, color, text-align,
49
+ * text-decoration, text-transform — these are controlled by semantic props and
50
+ * always take precedence via twMerge.
51
+ *
52
+ * @example
53
+ * className="mt-4 flex-1"
54
+ * className="mb-2 self-center"
55
+ * className="absolute top-0 left-0"
56
+ */
57
+ className?: string;
44
58
  }
45
59
  //# sourceMappingURL=AnimatedF0Text.types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"AnimatedF0Text.types.d.ts","sourceRoot":"","sources":["../../../../../../src/components/primitives/F0Text/AnimatedF0Text/AnimatedF0Text.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,IAAI,WAAW,EAAE,MAAM,cAAc,CAAA;AAC5D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAA;AAE5D,OAAO,KAAK,EACV,SAAS,EACT,SAAS,EACT,cAAc,EACd,aAAa,EACb,iBAAiB,EAClB,MAAM,wBAAwB,CAAA;AAE/B;;;;;GAKG;AACH,MAAM,WAAW,mBAAoB,SAAQ,IAAI,CAC/C,aAAa,CAAC,WAAW,CAAC,EAC1B,WAAW,CACZ;IACC;;;OAGG;IACH,OAAO,CAAC,EAAE,iBAAiB,CAAA;IAE3B;;;OAGG;IACH,KAAK,CAAC,EAAE,SAAS,CAAA;IAEjB;;;OAGG;IACH,KAAK,CAAC,EAAE,SAAS,CAAA;IAEjB;;;OAGG;IACH,UAAU,CAAC,EAAE,cAAc,CAAA;IAE3B;;;OAGG;IACH,SAAS,CAAC,EAAE,aAAa,CAAA;IAEzB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAA;IAEtB;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CAC3B"}
1
+ {"version":3,"file":"AnimatedF0Text.types.d.ts","sourceRoot":"","sources":["../../../../../../src/components/primitives/F0Text/AnimatedF0Text/AnimatedF0Text.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,IAAI,WAAW,EAAE,MAAM,cAAc,CAAA;AAC5D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAA;AAE5D,OAAO,KAAK,EACV,SAAS,EACT,SAAS,EACT,cAAc,EACd,aAAa,EACb,iBAAiB,EAClB,MAAM,wBAAwB,CAAA;AAE/B;;;;;GAKG;AACH,MAAM,WAAW,mBAAoB,SAAQ,IAAI,CAC/C,aAAa,CAAC,WAAW,CAAC,EAC1B,WAAW,CACZ;IACC;;;OAGG;IACH,OAAO,CAAC,EAAE,iBAAiB,CAAA;IAE3B;;;OAGG;IACH,KAAK,CAAC,EAAE,SAAS,CAAA;IAEjB;;;OAGG;IACH,KAAK,CAAC,EAAE,SAAS,CAAA;IAEjB;;;OAGG;IACH,UAAU,CAAC,EAAE,cAAc,CAAA;IAE3B;;;OAGG;IACH,SAAS,CAAC,EAAE,aAAa,CAAA;IAEzB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAA;IAEtB;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAE1B;;;;;;;;;;;;OAYG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB"}
@@ -1 +1 @@
1
- {"version":3,"file":"F0Text.d.ts","sourceRoot":"","sources":["../../../../../../src/components/primitives/F0Text/F0Text/F0Text.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,IAAI,IAAI,MAAM,EAAE,MAAM,cAAc,CAAA;AAK7C,OAAO,EAAwB,KAAK,WAAW,EAAE,MAAM,gBAAgB,CAAA;AAoDvE,eAAO,MAAM,MAAM,uGAA8B,CAAA;AAGjD,YAAY,EAAE,WAAW,EAAE,CAAA;AAC3B,OAAO,EACL,mBAAmB,EACnB,WAAW,EACX,UAAU,EACV,gBAAgB,EAChB,eAAe,GAChB,MAAM,gBAAgB,CAAA;AACvB,YAAY,EACV,iBAAiB,EACjB,SAAS,EACT,SAAS,EACT,cAAc,EACd,aAAa,GACd,MAAM,gBAAgB,CAAA"}
1
+ {"version":3,"file":"F0Text.d.ts","sourceRoot":"","sources":["../../../../../../src/components/primitives/F0Text/F0Text/F0Text.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,IAAI,IAAI,MAAM,EAAE,MAAM,cAAc,CAAA;AAK7C,OAAO,EAAwB,KAAK,WAAW,EAAE,MAAM,gBAAgB,CAAA;AA2DvE,eAAO,MAAM,MAAM,uGAA8B,CAAA;AAGjD,YAAY,EAAE,WAAW,EAAE,CAAA;AAC3B,OAAO,EACL,mBAAmB,EACnB,WAAW,EACX,UAAU,EACV,gBAAgB,EAChB,eAAe,GAChB,MAAM,gBAAgB,CAAA;AACvB,YAAY,EACV,iBAAiB,EACjB,SAAS,EACT,SAAS,EACT,cAAc,EACd,aAAa,GACd,MAAM,gBAAgB,CAAA"}
@@ -50,7 +50,7 @@ export declare const textVariants: import("tailwind-variants").TVReturnType<{
50
50
  lowercase: string;
51
51
  capitalize: string;
52
52
  };
53
- }, undefined, "", {
53
+ }, undefined, "no-underline normal-case tracking-normal", {
54
54
  variant: {
55
55
  "heading-xl": string;
56
56
  "heading-lg": string;
@@ -140,6 +140,6 @@ export declare const textVariants: import("tailwind-variants").TVReturnType<{
140
140
  lowercase: string;
141
141
  capitalize: string;
142
142
  };
143
- }, undefined, "", unknown, unknown, undefined>>;
143
+ }, undefined, "no-underline normal-case tracking-normal", unknown, unknown, undefined>>;
144
144
  export type TextVariants = VariantProps<typeof textVariants>;
145
145
  //# sourceMappingURL=F0Text.styles.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"F0Text.styles.d.ts","sourceRoot":"","sources":["../../../../../../src/components/primitives/F0Text/F0Text/F0Text.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAM,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAEzD;;;;;GAKG;AACH,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+CA6DvB,CAAA;AAEF,MAAM,MAAM,YAAY,GAAG,YAAY,CAAC,OAAO,YAAY,CAAC,CAAA"}
1
+ {"version":3,"file":"F0Text.styles.d.ts","sourceRoot":"","sources":["../../../../../../src/components/primitives/F0Text/F0Text/F0Text.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAM,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAEzD;;;;;GAKG;AACH,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uFA6DvB,CAAA;AAEF,MAAM,MAAM,YAAY,GAAG,YAAY,CAAC,OAAO,YAAY,CAAC,CAAA"}
@@ -1,10 +1,10 @@
1
1
  import type { TextProps as RNTextProps } from "react-native";
2
2
  /**
3
- * Props that must not be passed through to the underlying RN Text
4
- * (`style` and `className` are handled by F0 instead).
5
- * Used with omitProps for runtime safety.
3
+ * Props that must not be passed through to the underlying RN Text.
4
+ * `style` is blocked to enforce the semantic API; `className` is allowed
5
+ * for layout/positioning and merged with typography classes via twMerge.
6
6
  */
7
- export declare const F0_TEXT_BANNED_PROPS: readonly ["style", "className"];
7
+ export declare const F0_TEXT_BANNED_PROPS: readonly ["style"];
8
8
  /**
9
9
  * Typography variant types based on semantic design tokens
10
10
  */
@@ -31,10 +31,14 @@ export type TextDecoration = (typeof TEXT_DECORATIONS)[number];
31
31
  export declare const TEXT_TRANSFORMS: readonly ["none", "uppercase", "lowercase", "capitalize"];
32
32
  export type TextTransform = (typeof TEXT_TRANSFORMS)[number];
33
33
  /**
34
- * Internal props for the F0Text component.
35
- * @private
34
+ * Props for the F0Text component.
35
+ *
36
+ * `className` is available for layout/positioning (margin, padding, flex, etc.).
37
+ * Typography is controlled exclusively by semantic props (variant, color, align, etc.)
38
+ * and always takes precedence — any typography classes in `className` are overridden.
39
+ * `style` is NOT available (omitted from RNTextProps and filtered at runtime).
36
40
  */
37
- interface F0TextPropsInternal extends Omit<RNTextProps, "style"> {
41
+ export interface F0TextProps extends Omit<RNTextProps, "style"> {
38
42
  /**
39
43
  * Semantic typography variant
40
44
  * @default "body-sm-default"
@@ -69,18 +73,18 @@ interface F0TextPropsInternal extends Omit<RNTextProps, "style"> {
69
73
  */
70
74
  children?: React.ReactNode;
71
75
  /**
72
- * Excluded from public API via Omit<F0TextPropsInternal, "className">.
73
- * @private
76
+ * Tailwind classes for layout and positioning.
77
+ *
78
+ * Allowed: margin, padding, flex, position, width, height, opacity, z-index, etc.
79
+ * Ignored: font-size, font-weight, line-height, letter-spacing, color, text-align,
80
+ * text-decoration, text-transform — these are controlled by semantic props and
81
+ * always take precedence via twMerge.
82
+ *
83
+ * @example
84
+ * className="mt-4 flex-1"
85
+ * className="mb-2 self-center"
86
+ * className="absolute top-0 left-0"
74
87
  */
75
88
  className?: string;
76
89
  }
77
- /**
78
- * Public props for the F0Text component
79
- *
80
- * Note: `className` and `style` props are NOT available.
81
- * Use semantic props (variant, color, align, etc.) for typography.
82
- * For spacing/layout, wrap F0Text in a View with className.
83
- */
84
- export type F0TextProps = Omit<F0TextPropsInternal, "className">;
85
- export {};
86
90
  //# sourceMappingURL=F0Text.types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"F0Text.types.d.ts","sourceRoot":"","sources":["../../../../../../src/components/primitives/F0Text/F0Text/F0Text.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,IAAI,WAAW,EAAE,MAAM,cAAc,CAAA;AAE5D;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,iCAAkC,CAAA;AAEnE;;GAEG;AACH,eAAO,MAAM,mBAAmB,uMAYtB,CAAA;AAEV,MAAM,MAAM,iBAAiB,GAAG,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,CAAC,CAAA;AAEpE;;GAEG;AACH,eAAO,MAAM,WAAW,4JAad,CAAA;AAEV,MAAM,MAAM,SAAS,GAAG,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,CAAC,CAAA;AAEpD;;GAEG;AACH,eAAO,MAAM,UAAU,iDAAkD,CAAA;AAEzE,MAAM,MAAM,SAAS,GAAG,CAAC,OAAO,UAAU,CAAC,CAAC,MAAM,CAAC,CAAA;AAEnD;;GAEG;AACH,eAAO,MAAM,gBAAgB,gDAAiD,CAAA;AAE9E,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,CAAC,CAAA;AAE9D;;GAEG;AACH,eAAO,MAAM,eAAe,2DAKlB,CAAA;AAEV,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,eAAe,CAAC,CAAC,MAAM,CAAC,CAAA;AAE5D;;;GAGG;AACH,UAAU,mBAAoB,SAAQ,IAAI,CAAC,WAAW,EAAE,OAAO,CAAC;IAC9D;;;OAGG;IACH,OAAO,CAAC,EAAE,iBAAiB,CAAA;IAE3B;;;OAGG;IACH,KAAK,CAAC,EAAE,SAAS,CAAA;IAEjB;;;OAGG;IACH,KAAK,CAAC,EAAE,SAAS,CAAA;IAEjB;;;OAGG;IACH,UAAU,CAAC,EAAE,cAAc,CAAA;IAE3B;;;OAGG;IACH,SAAS,CAAC,EAAE,aAAa,CAAA;IAEzB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAA;IAEtB;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAE1B;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED;;;;;;GAMG;AACH,MAAM,MAAM,WAAW,GAAG,IAAI,CAAC,mBAAmB,EAAE,WAAW,CAAC,CAAA"}
1
+ {"version":3,"file":"F0Text.types.d.ts","sourceRoot":"","sources":["../../../../../../src/components/primitives/F0Text/F0Text/F0Text.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,IAAI,WAAW,EAAE,MAAM,cAAc,CAAA;AAE5D;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,oBAAqB,CAAA;AAEtD;;GAEG;AACH,eAAO,MAAM,mBAAmB,uMAYtB,CAAA;AAEV,MAAM,MAAM,iBAAiB,GAAG,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,CAAC,CAAA;AAEpE;;GAEG;AACH,eAAO,MAAM,WAAW,4JAad,CAAA;AAEV,MAAM,MAAM,SAAS,GAAG,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,CAAC,CAAA;AAEpD;;GAEG;AACH,eAAO,MAAM,UAAU,iDAAkD,CAAA;AAEzE,MAAM,MAAM,SAAS,GAAG,CAAC,OAAO,UAAU,CAAC,CAAC,MAAM,CAAC,CAAA;AAEnD;;GAEG;AACH,eAAO,MAAM,gBAAgB,gDAAiD,CAAA;AAE9E,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,CAAC,CAAA;AAE9D;;GAEG;AACH,eAAO,MAAM,eAAe,2DAKlB,CAAA;AAEV,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,eAAe,CAAC,CAAC,MAAM,CAAC,CAAA;AAE5D;;;;;;;GAOG;AACH,MAAM,WAAW,WAAY,SAAQ,IAAI,CAAC,WAAW,EAAE,OAAO,CAAC;IAC7D;;;OAGG;IACH,OAAO,CAAC,EAAE,iBAAiB,CAAA;IAE3B;;;OAGG;IACH,KAAK,CAAC,EAAE,SAAS,CAAA;IAEjB;;;OAGG;IACH,KAAK,CAAC,EAAE,SAAS,CAAA;IAEjB;;;OAGG;IACH,UAAU,CAAC,EAAE,cAAc,CAAA;IAE3B;;;OAGG;IACH,SAAS,CAAC,EAAE,aAAa,CAAA;IAEzB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAA;IAEtB;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAE1B;;;;;;;;;;;;OAYG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB"}
@@ -2,5 +2,4 @@ import * as AppIcons from "./app";
2
2
  import * as ModuleIcons from "./modules";
3
3
  export { AppIcons, ModuleIcons };
4
4
  export * from "./types";
5
- export { Icon } from "../components/Icon";
6
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/icons/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,QAAQ,MAAM,OAAO,CAAA;AACjC,OAAO,KAAK,WAAW,MAAM,WAAW,CAAA;AACxC,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,CAAA;AAChC,cAAc,SAAS,CAAA;AACvB,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/icons/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,QAAQ,MAAM,OAAO,CAAA;AACjC,OAAO,KAAK,WAAW,MAAM,WAAW,CAAA;AACxC,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,CAAA;AAChC,cAAc,SAAS,CAAA"}
@@ -2,11 +2,10 @@ import { type CnOptions } from "tailwind-variants";
2
2
  export declare function cn(...args: CnOptions): string;
3
3
  /**
4
4
  * Omits specified keys from an object at runtime.
5
- * Used to filter blocked props (e.g. style, className) before spreading to primitives.
5
+ * Used to filter blocked props (e.g. style) before spreading to primitives.
6
6
  *
7
7
  * @example
8
8
  * omitProps(rest, ["style"])
9
- * omitProps(rest, ["style", "className"])
10
9
  */
11
10
  export declare function omitProps<T extends Record<string, unknown>, K extends string>(obj: T, keys: readonly K[]): Omit<T, K>;
12
11
  //# sourceMappingURL=utils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/lib/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAW,KAAK,SAAS,EAAE,MAAM,mBAAmB,CAAA;AAE3D,wBAAgB,EAAE,CAAC,GAAG,IAAI,EAAE,SAAS,GAAG,MAAM,CAM7C;AAED;;;;;;;GAOG;AACH,wBAAgB,SAAS,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAC,SAAS,MAAM,EAC3E,GAAG,EAAE,CAAC,EACN,IAAI,EAAE,SAAS,CAAC,EAAE,GACjB,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,CAMZ"}
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/lib/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAW,KAAK,SAAS,EAAE,MAAM,mBAAmB,CAAA;AAE3D,wBAAgB,EAAE,CAAC,GAAG,IAAI,EAAE,SAAS,GAAG,MAAM,CAM7C;AAED;;;;;;GAMG;AACH,wBAAgB,SAAS,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAC,SAAS,MAAM,EAC3E,GAAG,EAAE,CAAC,EACN,IAAI,EAAE,SAAS,CAAC,EAAE,GACjB,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,CAMZ"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@factorialco/f0-react-native",
3
- "version": "0.28.1",
3
+ "version": "0.30.0",
4
4
  "type": "module",
5
5
  "description": "React Native components for F0 Design System",
6
6
  "main": "expo-router/entry",
@@ -2,7 +2,7 @@ import { render, fireEvent, screen } from "@testing-library/react-native"
2
2
  import React from "react"
3
3
 
4
4
  import { ActivityItem, ActivityItemSkeleton } from "../../Activity/ActivityItem"
5
- import { IconType } from "../../Icon"
5
+ import { type IconType } from "../../primitives/F0Icon"
6
6
 
7
7
  // Mock the IconAvatar component
8
8
  jest.mock("../../Avatars/IconAvatar", () => ({
@@ -2,7 +2,7 @@ import { useState } from "react"
2
2
  import { View, Text, Pressable } from "react-native"
3
3
 
4
4
  import { IconAvatar } from "../../Avatars/exports"
5
- import { IconType } from "../../Icon"
5
+ import { type IconType } from "../../primitives/F0Icon"
6
6
 
7
7
  export type ActivityItemProps = {
8
8
  id: string
@@ -1,7 +1,7 @@
1
1
  import { View } from "react-native"
2
2
 
3
3
  import { cn } from "../../../lib/utils"
4
- import { Icon, IconType } from "../../Icon"
4
+ import { F0Icon, type IconType } from "../../primitives/F0Icon"
5
5
 
6
6
  type Props = {
7
7
  icon: IconType
@@ -24,7 +24,11 @@ export const IconAvatar = ({ icon, size = "md", className }: Props) => {
24
24
  className
25
25
  )}
26
26
  >
27
- <Icon icon={icon} size={size} className="text-f0-foreground-secondary" />
27
+ <F0Icon
28
+ icon={icon}
29
+ size={size}
30
+ className="text-f0-foreground-secondary"
31
+ />
28
32
  </View>
29
33
  )
30
34
  }
@@ -2,7 +2,7 @@ import { View } from "react-native"
2
2
  import Svg, { Defs, LinearGradient, Stop, Path } from "react-native-svg"
3
3
  import { tv, type VariantProps } from "tailwind-variants"
4
4
 
5
- import { IconType, applyIconInterop } from "../../Icon"
5
+ import { type IconType, applyIconInterop } from "../../primitives/F0Icon"
6
6
 
7
7
  import { ModuleId, modules } from "./modules"
8
8
 
@@ -1,6 +1,6 @@
1
1
  import { tv, type VariantProps } from "tailwind-variants"
2
2
 
3
- import { Icon, type IconType } from "../Icon"
3
+ import { F0Icon, type IconType } from "../primitives/F0Icon"
4
4
 
5
5
  const badgeVariants = tv({
6
6
  base: "flex shrink-0 items-center justify-center rounded-full",
@@ -39,7 +39,7 @@ export interface BadgeProps extends VariantProps<typeof badgeVariants> {
39
39
 
40
40
  export const Badge = ({ type, size = "md", icon }: BadgeProps) => {
41
41
  return (
42
- <Icon
42
+ <F0Icon
43
43
  className={badgeVariants({ type, size })}
44
44
  icon={icon}
45
45
  size={iconSizes[size]}
@@ -1,13 +1,12 @@
1
1
  import { render, fireEvent, screen } from "@testing-library/react-native"
2
2
  import React from "react"
3
3
 
4
- import { IconType } from "../Icon"
4
+ import { type IconType } from "../primitives/F0Icon"
5
5
 
6
6
  import { Button } from "./"
7
7
 
8
- // Mock the Icon component
9
- jest.mock("../Icon", () => ({
10
- Icon: () => null,
8
+ jest.mock("../primitives/F0Icon", () => ({
9
+ F0Icon: () => null,
11
10
  }))
12
11
 
13
12
  // Mock dependencies
@@ -3,7 +3,7 @@ import { Pressable, Text, View } from "react-native"
3
3
  import { tv, type VariantProps } from "tailwind-variants"
4
4
 
5
5
  import { cn } from "../../lib/utils"
6
- import { Icon, type IconType } from "../Icon"
6
+ import { F0Icon, type IconType, type IconColor } from "../primitives/F0Icon"
7
7
 
8
8
  export const variants = [
9
9
  "default",
@@ -68,29 +68,35 @@ const pressedVariants = tv({
68
68
  },
69
69
  })
70
70
 
71
- const getIconColor = (variant: ButtonVariant, isPressed: boolean) => {
71
+ const getIconColor = (
72
+ variant: ButtonVariant,
73
+ isPressed: boolean
74
+ ): IconColor => {
72
75
  switch (variant) {
73
76
  case "default":
74
- return "text-f0-icon-inverse"
77
+ return "inverse"
75
78
  case "critical":
76
- return isPressed ? "text-f0-icon-inverse" : "text-f0-icon-critical-bold"
79
+ return isPressed ? "inverse" : "critical-bold"
77
80
  default:
78
- return "text-f0-icon"
81
+ return "default"
79
82
  }
80
83
  }
81
84
 
82
- const getIconOnlyColor = (variant: ButtonVariant, isPressed: boolean) => {
85
+ const getIconOnlyColor = (
86
+ variant: ButtonVariant,
87
+ isPressed: boolean
88
+ ): IconColor => {
83
89
  switch (variant) {
84
90
  case "critical":
85
- return isPressed ? "text-f0-icon-inverse" : "text-f0-icon-critical-bold"
91
+ return isPressed ? "inverse" : "critical-bold"
86
92
  case "default":
87
- return "text-f0-icon-inverse"
93
+ return "inverse"
88
94
  case "outline":
89
95
  case "neutral":
90
96
  case "ghost":
91
97
  case "promote":
92
98
  default:
93
- return "text-f0-icon-bold"
99
+ return "bold"
94
100
  }
95
101
  }
96
102
 
@@ -191,15 +197,15 @@ export const Button = forwardRef<View, ButtonProps>(function Button(
191
197
  accessibilityHint={accessibilityHint}
192
198
  >
193
199
  {icon && (
194
- <Icon
200
+ <F0Icon
195
201
  icon={icon}
196
202
  size={size === "sm" ? "sm" : "md"}
197
- className={cn(
198
- hideLabel && round ? undefined : "-ml-0.5",
203
+ color={
199
204
  hideLabel && round
200
205
  ? getIconOnlyColor(variant, shouldShowPressed)
201
206
  : getIconColor(variant, shouldShowPressed)
202
- )}
207
+ }
208
+ className={hideLabel && round ? undefined : "-ml-0.5"}
203
209
  />
204
210
  )}
205
211
  {emoji && (
@@ -20,8 +20,6 @@ describe("Icon", () => {
20
20
  const { getByTestId } = render(
21
21
  <Icon icon={Archive} size="lg" testID="icon" />
22
22
  )
23
- // In a real test environment, we could check the actual style props applied
24
- // but for now we just ensure it renders
25
23
  expect(getByTestId("icon")).toBeTruthy()
26
24
  })
27
25
 
@@ -29,8 +27,6 @@ describe("Icon", () => {
29
27
  const { getByTestId } = render(
30
28
  <Icon icon={Archive} className="text-red-500" testID="icon" />
31
29
  )
32
- // In a real test environment, we could check the actual style props applied
33
- // but for now we just ensure it renders
34
30
  expect(getByTestId("icon")).toBeTruthy()
35
31
  })
36
32
  })
@@ -1,13 +1,9 @@
1
- import React, {
2
- forwardRef,
3
- ForwardRefExoticComponent,
4
- RefAttributes,
5
- } from "react"
1
+ import React, { forwardRef } from "react"
6
2
  import { Svg, SvgProps } from "react-native-svg"
7
3
  import { tv, type VariantProps } from "tailwind-variants"
8
- import { withUniwind } from "uniwind"
9
4
 
10
5
  import { cn } from "../../lib/utils"
6
+ import { applyIconInterop, type IconType } from "../primitives/F0Icon"
11
7
 
12
8
  const iconVariants = tv({
13
9
  base: "shrink-0",
@@ -33,26 +29,11 @@ export interface IconProps extends SvgProps, VariantProps<typeof iconVariants> {
33
29
  isPressed?: boolean
34
30
  }
35
31
 
36
- export type IconType = ForwardRefExoticComponent<
37
- SvgProps &
38
- RefAttributes<Svg> & {
39
- className?: string
40
- }
41
- >
42
-
43
- // Keep track of icons that have already had withUniwind applied
44
- const interopAppliedIcons = new WeakSet()
45
-
46
- // Function to apply UniWind interop to an icon component
47
- export function applyIconInterop(icon: IconType) {
48
- if (!interopAppliedIcons.has(icon)) {
49
- const wrappedIcon = withUniwind(icon)
50
- interopAppliedIcons.add(wrappedIcon)
51
- return wrappedIcon
52
- }
53
- return icon
54
- }
55
-
32
+ /**
33
+ * @deprecated Use F0Icon instead. This component will be removed in a future version.
34
+ * Migration: Replace <Icon icon={X} /> with <F0Icon icon={X} />.
35
+ * F0Icon supports the same `icon`, `size`, `testID`, and `className` props, plus semantic `color` variants.
36
+ */
56
37
  export const Icon = forwardRef<Svg, IconProps>(function Icon(
57
38
  { size = "md", icon, className, testID, ...props },
58
39
  ref
@@ -3,8 +3,8 @@ import { tv, type VariantProps } from "tailwind-variants"
3
3
 
4
4
  import { CrossedCircle } from "../../icons/app"
5
5
  import { cn } from "../../lib/utils"
6
- import { Icon, type IconType } from "../Icon"
7
6
  import { PressableFeedback } from "../PressableFeedback"
7
+ import { F0Icon, type IconType } from "../primitives/F0Icon"
8
8
 
9
9
  export const chipContainerVariants = tv({
10
10
  base: "flex items-center gap-1 rounded-full border border-solid border-f0-border px-2 py-0.5 grow-0",
@@ -61,7 +61,7 @@ export const OneChip = ({
61
61
  >
62
62
  <View className="flex flex-row items-center gap-0.5">
63
63
  {icon && (
64
- <Icon
64
+ <F0Icon
65
65
  icon={icon}
66
66
  size="sm"
67
67
  className={chipTextVariants({ variant })}
@@ -78,7 +78,7 @@ export const OneChip = ({
78
78
  accessibilityRole="button"
79
79
  accessibilityLabel="Close"
80
80
  >
81
- <Icon
81
+ <F0Icon
82
82
  icon={CrossedCircle}
83
83
  className={chipTextVariants({ variant })}
84
84
  size="sm"
@@ -1,7 +1,7 @@
1
1
  import { AlertCircle, InfoCircle, Warning } from "../../../icons/app"
2
2
  import { useTextFormatEnforcer } from "../../../lib/text"
3
3
  import { cn } from "../../../lib/utils"
4
- import { Icon, IconType } from "../../Icon"
4
+ import { F0Icon, type IconType } from "../../primitives/F0Icon"
5
5
  import { BaseTag } from "../BaseTag"
6
6
 
7
7
  type Level = "info" | "warning" | "critical"
@@ -40,7 +40,7 @@ export const AlertTag = <T extends string>({ text, level }: Props<T>) => {
40
40
  }[level]
41
41
  )}
42
42
  left={
43
- <Icon
43
+ <F0Icon
44
44
  icon={iconMap[level]}
45
45
  className={cn(
46
46
  {
@@ -1,6 +1,6 @@
1
1
  import { useTextFormatEnforcer } from "../../../lib/text"
2
2
  import { cn } from "../../../lib/utils"
3
- import { Icon, IconType } from "../../Icon"
3
+ import { F0Icon, type IconType } from "../../primitives/F0Icon"
4
4
  import { BaseTag } from "../BaseTag"
5
5
 
6
6
  export type RawTagProps = {
@@ -29,7 +29,7 @@ export const RawTag = ({
29
29
  classNameText="text-f0-foreground"
30
30
  left={
31
31
  icon ? (
32
- <Icon icon={icon} size="sm" className="text-f0-icon" aria-hidden />
32
+ <F0Icon icon={icon} size="sm" color="default" aria-hidden />
33
33
  ) : null
34
34
  }
35
35
  text={text}