@metamask-previews/design-system-react-native 0.13.0-preview.dbe1fac → 0.14.0-preview.4ce710b

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 (156) hide show
  1. package/CHANGELOG.md +28 -1
  2. package/dist/components/AvatarAccount/AvatarAccount.cjs +6 -6
  3. package/dist/components/AvatarAccount/AvatarAccount.cjs.map +1 -1
  4. package/dist/components/AvatarAccount/AvatarAccount.constants.cjs +6 -6
  5. package/dist/components/AvatarAccount/AvatarAccount.constants.cjs.map +1 -1
  6. package/dist/components/AvatarAccount/AvatarAccount.constants.d.cts +1 -1
  7. package/dist/components/AvatarAccount/AvatarAccount.constants.d.cts.map +1 -1
  8. package/dist/components/AvatarAccount/AvatarAccount.constants.d.mts +1 -1
  9. package/dist/components/AvatarAccount/AvatarAccount.constants.d.mts.map +1 -1
  10. package/dist/components/AvatarAccount/AvatarAccount.constants.mjs +1 -1
  11. package/dist/components/AvatarAccount/AvatarAccount.constants.mjs.map +1 -1
  12. package/dist/components/AvatarAccount/AvatarAccount.d.cts.map +1 -1
  13. package/dist/components/AvatarAccount/AvatarAccount.d.mts.map +1 -1
  14. package/dist/components/AvatarAccount/AvatarAccount.mjs +1 -1
  15. package/dist/components/AvatarAccount/AvatarAccount.mjs.map +1 -1
  16. package/dist/components/AvatarAccount/AvatarAccount.types.cjs.map +1 -1
  17. package/dist/components/AvatarAccount/AvatarAccount.types.d.cts +2 -12
  18. package/dist/components/AvatarAccount/AvatarAccount.types.d.cts.map +1 -1
  19. package/dist/components/AvatarAccount/AvatarAccount.types.d.mts +2 -12
  20. package/dist/components/AvatarAccount/AvatarAccount.types.d.mts.map +1 -1
  21. package/dist/components/AvatarAccount/AvatarAccount.types.mjs.map +1 -1
  22. package/dist/components/AvatarAccount/index.cjs +3 -3
  23. package/dist/components/AvatarAccount/index.cjs.map +1 -1
  24. package/dist/components/AvatarAccount/index.d.cts +1 -1
  25. package/dist/components/AvatarAccount/index.d.cts.map +1 -1
  26. package/dist/components/AvatarAccount/index.d.mts +1 -1
  27. package/dist/components/AvatarAccount/index.d.mts.map +1 -1
  28. package/dist/components/AvatarAccount/index.mjs +1 -1
  29. package/dist/components/AvatarAccount/index.mjs.map +1 -1
  30. package/dist/components/AvatarBase/index.cjs.map +1 -1
  31. package/dist/components/AvatarBase/index.d.cts.map +1 -1
  32. package/dist/components/AvatarBase/index.d.mts.map +1 -1
  33. package/dist/components/AvatarBase/index.mjs.map +1 -1
  34. package/dist/components/AvatarFavicon/AvatarFavicon.cjs +2 -1
  35. package/dist/components/AvatarFavicon/AvatarFavicon.cjs.map +1 -1
  36. package/dist/components/AvatarFavicon/AvatarFavicon.d.cts.map +1 -1
  37. package/dist/components/AvatarFavicon/AvatarFavicon.d.mts.map +1 -1
  38. package/dist/components/AvatarFavicon/AvatarFavicon.mjs +2 -1
  39. package/dist/components/AvatarFavicon/AvatarFavicon.mjs.map +1 -1
  40. package/dist/components/AvatarNetwork/AvatarNetwork.cjs +2 -1
  41. package/dist/components/AvatarNetwork/AvatarNetwork.cjs.map +1 -1
  42. package/dist/components/AvatarNetwork/AvatarNetwork.d.cts.map +1 -1
  43. package/dist/components/AvatarNetwork/AvatarNetwork.d.mts.map +1 -1
  44. package/dist/components/AvatarNetwork/AvatarNetwork.mjs +2 -1
  45. package/dist/components/AvatarNetwork/AvatarNetwork.mjs.map +1 -1
  46. package/dist/components/AvatarToken/AvatarToken.cjs +3 -3
  47. package/dist/components/AvatarToken/AvatarToken.cjs.map +1 -1
  48. package/dist/components/AvatarToken/AvatarToken.d.cts.map +1 -1
  49. package/dist/components/AvatarToken/AvatarToken.d.mts.map +1 -1
  50. package/dist/components/AvatarToken/AvatarToken.mjs +1 -1
  51. package/dist/components/AvatarToken/AvatarToken.mjs.map +1 -1
  52. package/dist/components/AvatarToken/AvatarToken.types.cjs.map +1 -1
  53. package/dist/components/AvatarToken/AvatarToken.types.d.cts +5 -7
  54. package/dist/components/AvatarToken/AvatarToken.types.d.cts.map +1 -1
  55. package/dist/components/AvatarToken/AvatarToken.types.d.mts +5 -7
  56. package/dist/components/AvatarToken/AvatarToken.types.d.mts.map +1 -1
  57. package/dist/components/AvatarToken/AvatarToken.types.mjs.map +1 -1
  58. package/dist/components/AvatarToken/index.cjs +2 -2
  59. package/dist/components/AvatarToken/index.cjs.map +1 -1
  60. package/dist/components/AvatarToken/index.d.cts +1 -1
  61. package/dist/components/AvatarToken/index.d.cts.map +1 -1
  62. package/dist/components/AvatarToken/index.d.mts +1 -1
  63. package/dist/components/AvatarToken/index.d.mts.map +1 -1
  64. package/dist/components/AvatarToken/index.mjs +1 -1
  65. package/dist/components/AvatarToken/index.mjs.map +1 -1
  66. package/dist/components/BannerBase/BannerBase.cjs +4 -3
  67. package/dist/components/BannerBase/BannerBase.cjs.map +1 -1
  68. package/dist/components/BannerBase/BannerBase.d.cts.map +1 -1
  69. package/dist/components/BannerBase/BannerBase.d.mts.map +1 -1
  70. package/dist/components/BannerBase/BannerBase.mjs +2 -1
  71. package/dist/components/BannerBase/BannerBase.mjs.map +1 -1
  72. package/dist/components/Icon/Icon.cjs +2 -1
  73. package/dist/components/Icon/Icon.cjs.map +1 -1
  74. package/dist/components/Icon/Icon.constants.cjs +12 -0
  75. package/dist/components/Icon/Icon.constants.cjs.map +1 -0
  76. package/dist/components/Icon/Icon.constants.d.cts +3 -0
  77. package/dist/components/Icon/Icon.constants.d.cts.map +1 -0
  78. package/dist/components/Icon/Icon.constants.d.mts +3 -0
  79. package/dist/components/Icon/Icon.constants.d.mts.map +1 -0
  80. package/dist/components/Icon/Icon.constants.mjs +9 -0
  81. package/dist/components/Icon/Icon.constants.mjs.map +1 -0
  82. package/dist/components/Icon/Icon.d.cts.map +1 -1
  83. package/dist/components/Icon/Icon.d.mts.map +1 -1
  84. package/dist/components/Icon/Icon.mjs +2 -1
  85. package/dist/components/Icon/Icon.mjs.map +1 -1
  86. package/dist/components/Input/Input.cjs +3 -3
  87. package/dist/components/Input/Input.cjs.map +1 -1
  88. package/dist/components/Input/Input.constants.cjs +15 -15
  89. package/dist/components/Input/Input.constants.cjs.map +1 -1
  90. package/dist/components/Input/Input.constants.d.cts +1 -1
  91. package/dist/components/Input/Input.constants.d.cts.map +1 -1
  92. package/dist/components/Input/Input.constants.d.mts +1 -1
  93. package/dist/components/Input/Input.constants.d.mts.map +1 -1
  94. package/dist/components/Input/Input.constants.mjs +1 -1
  95. package/dist/components/Input/Input.constants.mjs.map +1 -1
  96. package/dist/components/Input/Input.d.cts +1 -1
  97. package/dist/components/Input/Input.d.cts.map +1 -1
  98. package/dist/components/Input/Input.d.mts +1 -1
  99. package/dist/components/Input/Input.d.mts.map +1 -1
  100. package/dist/components/Input/Input.mjs +1 -1
  101. package/dist/components/Input/Input.mjs.map +1 -1
  102. package/dist/components/Input/Input.types.cjs.map +1 -1
  103. package/dist/components/Input/Input.types.d.cts +1 -1
  104. package/dist/components/Input/Input.types.d.cts.map +1 -1
  105. package/dist/components/Input/Input.types.d.mts +1 -1
  106. package/dist/components/Input/Input.types.d.mts.map +1 -1
  107. package/dist/components/Input/Input.types.mjs.map +1 -1
  108. package/dist/components/Text/Text.cjs +4 -4
  109. package/dist/components/Text/Text.cjs.map +1 -1
  110. package/dist/components/Text/Text.constants.cjs +18 -23
  111. package/dist/components/Text/Text.constants.cjs.map +1 -1
  112. package/dist/components/Text/Text.constants.d.cts +1 -1
  113. package/dist/components/Text/Text.constants.d.cts.map +1 -1
  114. package/dist/components/Text/Text.constants.d.mts +1 -1
  115. package/dist/components/Text/Text.constants.d.mts.map +1 -1
  116. package/dist/components/Text/Text.constants.mjs +15 -20
  117. package/dist/components/Text/Text.constants.mjs.map +1 -1
  118. package/dist/components/Text/Text.d.cts.map +1 -1
  119. package/dist/components/Text/Text.d.mts.map +1 -1
  120. package/dist/components/Text/Text.mjs +1 -1
  121. package/dist/components/Text/Text.mjs.map +1 -1
  122. package/dist/components/Text/Text.types.cjs.map +1 -1
  123. package/dist/components/Text/Text.types.d.cts +3 -35
  124. package/dist/components/Text/Text.types.d.cts.map +1 -1
  125. package/dist/components/Text/Text.types.d.mts +3 -35
  126. package/dist/components/Text/Text.types.d.mts.map +1 -1
  127. package/dist/components/Text/Text.types.mjs.map +1 -1
  128. package/dist/components/Text/index.cjs +7 -7
  129. package/dist/components/Text/index.cjs.map +1 -1
  130. package/dist/components/Text/index.d.cts +1 -1
  131. package/dist/components/Text/index.d.cts.map +1 -1
  132. package/dist/components/Text/index.d.mts +1 -1
  133. package/dist/components/Text/index.d.mts.map +1 -1
  134. package/dist/components/Text/index.mjs +1 -1
  135. package/dist/components/Text/index.mjs.map +1 -1
  136. package/dist/components/TextButton/TextButton.cjs +3 -3
  137. package/dist/components/TextButton/TextButton.cjs.map +1 -1
  138. package/dist/components/TextButton/TextButton.d.cts.map +1 -1
  139. package/dist/components/TextButton/TextButton.d.mts.map +1 -1
  140. package/dist/components/TextButton/TextButton.mjs +1 -1
  141. package/dist/components/TextButton/TextButton.mjs.map +1 -1
  142. package/dist/components/TextField/TextField.cjs +2 -2
  143. package/dist/components/TextField/TextField.cjs.map +1 -1
  144. package/dist/components/TextField/TextField.d.cts.map +1 -1
  145. package/dist/components/TextField/TextField.d.mts.map +1 -1
  146. package/dist/components/TextField/TextField.mjs +1 -1
  147. package/dist/components/TextField/TextField.mjs.map +1 -1
  148. package/dist/types/index.cjs +11 -131
  149. package/dist/types/index.cjs.map +1 -1
  150. package/dist/types/index.d.cts +5 -113
  151. package/dist/types/index.d.cts.map +1 -1
  152. package/dist/types/index.d.mts +5 -113
  153. package/dist/types/index.d.mts.map +1 -1
  154. package/dist/types/index.mjs +5 -123
  155. package/dist/types/index.mjs.map +1 -1
  156. package/package.json +4 -4
@@ -1,67 +1,67 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.MAP_TEXT_VARIANT_INPUT_METRICS = void 0;
4
+ const design_system_shared_1 = require("@metamask-previews/design-system-shared");
4
5
  const design_tokens_1 = require("@metamask-previews/design-tokens");
5
- const types_1 = require("../../types/index.cjs");
6
6
  /**
7
7
  * Typographic metrics for Input: same tokens as `text-*` utilities but **without** `lineHeight`.
8
8
  * React Native `TextInput` aligns single-line text more predictably when line height is not set
9
9
  * from the design-system paragraph specs (matches legacy / temp Input.styles behavior).
10
10
  */
11
11
  exports.MAP_TEXT_VARIANT_INPUT_METRICS = {
12
- [types_1.TextVariant.DisplayLg]: {
12
+ [design_system_shared_1.TextVariant.DisplayLg]: {
13
13
  fontSize: design_tokens_1.typography.sDisplayLG.fontSize,
14
14
  letterSpacing: design_tokens_1.typography.sDisplayLG.letterSpacing,
15
15
  },
16
- [types_1.TextVariant.DisplayMd]: {
16
+ [design_system_shared_1.TextVariant.DisplayMd]: {
17
17
  fontSize: design_tokens_1.typography.sDisplayMD.fontSize,
18
18
  letterSpacing: design_tokens_1.typography.sDisplayMD.letterSpacing,
19
19
  },
20
- [types_1.TextVariant.HeadingLg]: {
20
+ [design_system_shared_1.TextVariant.HeadingLg]: {
21
21
  fontSize: design_tokens_1.typography.sHeadingLG.fontSize,
22
22
  letterSpacing: design_tokens_1.typography.sHeadingLG.letterSpacing,
23
23
  },
24
- [types_1.TextVariant.HeadingMd]: {
24
+ [design_system_shared_1.TextVariant.HeadingMd]: {
25
25
  fontSize: design_tokens_1.typography.sHeadingMD.fontSize,
26
26
  letterSpacing: design_tokens_1.typography.sHeadingMD.letterSpacing,
27
27
  },
28
- [types_1.TextVariant.HeadingSm]: {
28
+ [design_system_shared_1.TextVariant.HeadingSm]: {
29
29
  fontSize: design_tokens_1.typography.sHeadingSM.fontSize,
30
30
  letterSpacing: design_tokens_1.typography.sHeadingSM.letterSpacing,
31
31
  },
32
- [types_1.TextVariant.BodyLg]: {
32
+ [design_system_shared_1.TextVariant.BodyLg]: {
33
33
  fontSize: design_tokens_1.typography.sBodyLGMedium.fontSize,
34
34
  letterSpacing: design_tokens_1.typography.sBodyLGMedium.letterSpacing,
35
35
  },
36
- [types_1.TextVariant.BodyMd]: {
36
+ [design_system_shared_1.TextVariant.BodyMd]: {
37
37
  fontSize: design_tokens_1.typography.sBodyMD.fontSize,
38
38
  letterSpacing: design_tokens_1.typography.sBodyMD.letterSpacing,
39
39
  },
40
- [types_1.TextVariant.BodySm]: {
40
+ [design_system_shared_1.TextVariant.BodySm]: {
41
41
  fontSize: design_tokens_1.typography.sBodySM.fontSize,
42
42
  letterSpacing: design_tokens_1.typography.sBodySM.letterSpacing,
43
43
  },
44
- [types_1.TextVariant.BodyXs]: {
44
+ [design_system_shared_1.TextVariant.BodyXs]: {
45
45
  fontSize: design_tokens_1.typography.sBodyXS.fontSize,
46
46
  letterSpacing: design_tokens_1.typography.sBodyXS.letterSpacing,
47
47
  },
48
- [types_1.TextVariant.PageHeading]: {
48
+ [design_system_shared_1.TextVariant.PageHeading]: {
49
49
  fontSize: design_tokens_1.typography.sPageHeading.fontSize,
50
50
  letterSpacing: design_tokens_1.typography.sPageHeading.letterSpacing,
51
51
  },
52
- [types_1.TextVariant.SectionHeading]: {
52
+ [design_system_shared_1.TextVariant.SectionHeading]: {
53
53
  fontSize: design_tokens_1.typography.sSectionHeading.fontSize,
54
54
  letterSpacing: design_tokens_1.typography.sSectionHeading.letterSpacing,
55
55
  },
56
- [types_1.TextVariant.ButtonLabelMd]: {
56
+ [design_system_shared_1.TextVariant.ButtonLabelMd]: {
57
57
  fontSize: design_tokens_1.typography.sButtonLabelMd.fontSize,
58
58
  letterSpacing: design_tokens_1.typography.sButtonLabelMd.letterSpacing,
59
59
  },
60
- [types_1.TextVariant.ButtonLabelLg]: {
60
+ [design_system_shared_1.TextVariant.ButtonLabelLg]: {
61
61
  fontSize: design_tokens_1.typography.sButtonLabelLg.fontSize,
62
62
  letterSpacing: design_tokens_1.typography.sButtonLabelLg.letterSpacing,
63
63
  },
64
- [types_1.TextVariant.AmountDisplayLg]: {
64
+ [design_system_shared_1.TextVariant.AmountDisplayLg]: {
65
65
  fontSize: design_tokens_1.typography.sAmountDisplayLg.fontSize,
66
66
  letterSpacing: design_tokens_1.typography.sAmountDisplayLg.letterSpacing,
67
67
  },
@@ -1 +1 @@
1
- {"version":3,"file":"Input.constants.cjs","sourceRoot":"","sources":["../../../src/components/Input/Input.constants.ts"],"names":[],"mappings":";;;AAAA,oEAA8D;AAE9D,iDAA0C;AAE1C;;;;GAIG;AACU,QAAA,8BAA8B,GAGvC;IACF,CAAC,mBAAW,CAAC,SAAS,CAAC,EAAE;QACvB,QAAQ,EAAE,0BAAU,CAAC,UAAU,CAAC,QAAQ;QACxC,aAAa,EAAE,0BAAU,CAAC,UAAU,CAAC,aAAa;KACnD;IACD,CAAC,mBAAW,CAAC,SAAS,CAAC,EAAE;QACvB,QAAQ,EAAE,0BAAU,CAAC,UAAU,CAAC,QAAQ;QACxC,aAAa,EAAE,0BAAU,CAAC,UAAU,CAAC,aAAa;KACnD;IACD,CAAC,mBAAW,CAAC,SAAS,CAAC,EAAE;QACvB,QAAQ,EAAE,0BAAU,CAAC,UAAU,CAAC,QAAQ;QACxC,aAAa,EAAE,0BAAU,CAAC,UAAU,CAAC,aAAa;KACnD;IACD,CAAC,mBAAW,CAAC,SAAS,CAAC,EAAE;QACvB,QAAQ,EAAE,0BAAU,CAAC,UAAU,CAAC,QAAQ;QACxC,aAAa,EAAE,0BAAU,CAAC,UAAU,CAAC,aAAa;KACnD;IACD,CAAC,mBAAW,CAAC,SAAS,CAAC,EAAE;QACvB,QAAQ,EAAE,0BAAU,CAAC,UAAU,CAAC,QAAQ;QACxC,aAAa,EAAE,0BAAU,CAAC,UAAU,CAAC,aAAa;KACnD;IACD,CAAC,mBAAW,CAAC,MAAM,CAAC,EAAE;QACpB,QAAQ,EAAE,0BAAU,CAAC,aAAa,CAAC,QAAQ;QAC3C,aAAa,EAAE,0BAAU,CAAC,aAAa,CAAC,aAAa;KACtD;IACD,CAAC,mBAAW,CAAC,MAAM,CAAC,EAAE;QACpB,QAAQ,EAAE,0BAAU,CAAC,OAAO,CAAC,QAAQ;QACrC,aAAa,EAAE,0BAAU,CAAC,OAAO,CAAC,aAAa;KAChD;IACD,CAAC,mBAAW,CAAC,MAAM,CAAC,EAAE;QACpB,QAAQ,EAAE,0BAAU,CAAC,OAAO,CAAC,QAAQ;QACrC,aAAa,EAAE,0BAAU,CAAC,OAAO,CAAC,aAAa;KAChD;IACD,CAAC,mBAAW,CAAC,MAAM,CAAC,EAAE;QACpB,QAAQ,EAAE,0BAAU,CAAC,OAAO,CAAC,QAAQ;QACrC,aAAa,EAAE,0BAAU,CAAC,OAAO,CAAC,aAAa;KAChD;IACD,CAAC,mBAAW,CAAC,WAAW,CAAC,EAAE;QACzB,QAAQ,EAAE,0BAAU,CAAC,YAAY,CAAC,QAAQ;QAC1C,aAAa,EAAE,0BAAU,CAAC,YAAY,CAAC,aAAa;KACrD;IACD,CAAC,mBAAW,CAAC,cAAc,CAAC,EAAE;QAC5B,QAAQ,EAAE,0BAAU,CAAC,eAAe,CAAC,QAAQ;QAC7C,aAAa,EAAE,0BAAU,CAAC,eAAe,CAAC,aAAa;KACxD;IACD,CAAC,mBAAW,CAAC,aAAa,CAAC,EAAE;QAC3B,QAAQ,EAAE,0BAAU,CAAC,cAAc,CAAC,QAAQ;QAC5C,aAAa,EAAE,0BAAU,CAAC,cAAc,CAAC,aAAa;KACvD;IACD,CAAC,mBAAW,CAAC,aAAa,CAAC,EAAE;QAC3B,QAAQ,EAAE,0BAAU,CAAC,cAAc,CAAC,QAAQ;QAC5C,aAAa,EAAE,0BAAU,CAAC,cAAc,CAAC,aAAa;KACvD;IACD,CAAC,mBAAW,CAAC,eAAe,CAAC,EAAE;QAC7B,QAAQ,EAAE,0BAAU,CAAC,gBAAgB,CAAC,QAAQ;QAC9C,aAAa,EAAE,0BAAU,CAAC,gBAAgB,CAAC,aAAa;KACzD;CACF,CAAC","sourcesContent":["import { typography } from '@metamask-previews/design-tokens';\n\nimport { TextVariant } from '../../types';\n\n/**\n * Typographic metrics for Input: same tokens as `text-*` utilities but **without** `lineHeight`.\n * React Native `TextInput` aligns single-line text more predictably when line height is not set\n * from the design-system paragraph specs (matches legacy / temp Input.styles behavior).\n */\nexport const MAP_TEXT_VARIANT_INPUT_METRICS: Record<\n TextVariant,\n { fontSize: number; letterSpacing: number }\n> = {\n [TextVariant.DisplayLg]: {\n fontSize: typography.sDisplayLG.fontSize,\n letterSpacing: typography.sDisplayLG.letterSpacing,\n },\n [TextVariant.DisplayMd]: {\n fontSize: typography.sDisplayMD.fontSize,\n letterSpacing: typography.sDisplayMD.letterSpacing,\n },\n [TextVariant.HeadingLg]: {\n fontSize: typography.sHeadingLG.fontSize,\n letterSpacing: typography.sHeadingLG.letterSpacing,\n },\n [TextVariant.HeadingMd]: {\n fontSize: typography.sHeadingMD.fontSize,\n letterSpacing: typography.sHeadingMD.letterSpacing,\n },\n [TextVariant.HeadingSm]: {\n fontSize: typography.sHeadingSM.fontSize,\n letterSpacing: typography.sHeadingSM.letterSpacing,\n },\n [TextVariant.BodyLg]: {\n fontSize: typography.sBodyLGMedium.fontSize,\n letterSpacing: typography.sBodyLGMedium.letterSpacing,\n },\n [TextVariant.BodyMd]: {\n fontSize: typography.sBodyMD.fontSize,\n letterSpacing: typography.sBodyMD.letterSpacing,\n },\n [TextVariant.BodySm]: {\n fontSize: typography.sBodySM.fontSize,\n letterSpacing: typography.sBodySM.letterSpacing,\n },\n [TextVariant.BodyXs]: {\n fontSize: typography.sBodyXS.fontSize,\n letterSpacing: typography.sBodyXS.letterSpacing,\n },\n [TextVariant.PageHeading]: {\n fontSize: typography.sPageHeading.fontSize,\n letterSpacing: typography.sPageHeading.letterSpacing,\n },\n [TextVariant.SectionHeading]: {\n fontSize: typography.sSectionHeading.fontSize,\n letterSpacing: typography.sSectionHeading.letterSpacing,\n },\n [TextVariant.ButtonLabelMd]: {\n fontSize: typography.sButtonLabelMd.fontSize,\n letterSpacing: typography.sButtonLabelMd.letterSpacing,\n },\n [TextVariant.ButtonLabelLg]: {\n fontSize: typography.sButtonLabelLg.fontSize,\n letterSpacing: typography.sButtonLabelLg.letterSpacing,\n },\n [TextVariant.AmountDisplayLg]: {\n fontSize: typography.sAmountDisplayLg.fontSize,\n letterSpacing: typography.sAmountDisplayLg.letterSpacing,\n },\n};\n"]}
1
+ {"version":3,"file":"Input.constants.cjs","sourceRoot":"","sources":["../../../src/components/Input/Input.constants.ts"],"names":[],"mappings":";;;AAAA,kFAAsE;AACtE,oEAA8D;AAE9D;;;;GAIG;AACU,QAAA,8BAA8B,GAGvC;IACF,CAAC,kCAAW,CAAC,SAAS,CAAC,EAAE;QACvB,QAAQ,EAAE,0BAAU,CAAC,UAAU,CAAC,QAAQ;QACxC,aAAa,EAAE,0BAAU,CAAC,UAAU,CAAC,aAAa;KACnD;IACD,CAAC,kCAAW,CAAC,SAAS,CAAC,EAAE;QACvB,QAAQ,EAAE,0BAAU,CAAC,UAAU,CAAC,QAAQ;QACxC,aAAa,EAAE,0BAAU,CAAC,UAAU,CAAC,aAAa;KACnD;IACD,CAAC,kCAAW,CAAC,SAAS,CAAC,EAAE;QACvB,QAAQ,EAAE,0BAAU,CAAC,UAAU,CAAC,QAAQ;QACxC,aAAa,EAAE,0BAAU,CAAC,UAAU,CAAC,aAAa;KACnD;IACD,CAAC,kCAAW,CAAC,SAAS,CAAC,EAAE;QACvB,QAAQ,EAAE,0BAAU,CAAC,UAAU,CAAC,QAAQ;QACxC,aAAa,EAAE,0BAAU,CAAC,UAAU,CAAC,aAAa;KACnD;IACD,CAAC,kCAAW,CAAC,SAAS,CAAC,EAAE;QACvB,QAAQ,EAAE,0BAAU,CAAC,UAAU,CAAC,QAAQ;QACxC,aAAa,EAAE,0BAAU,CAAC,UAAU,CAAC,aAAa;KACnD;IACD,CAAC,kCAAW,CAAC,MAAM,CAAC,EAAE;QACpB,QAAQ,EAAE,0BAAU,CAAC,aAAa,CAAC,QAAQ;QAC3C,aAAa,EAAE,0BAAU,CAAC,aAAa,CAAC,aAAa;KACtD;IACD,CAAC,kCAAW,CAAC,MAAM,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import { typography } from '@metamask-previews/design-tokens';\n\n/**\n * Typographic metrics for Input: same tokens as `text-*` utilities but **without** `lineHeight`.\n * React Native `TextInput` aligns single-line text more predictably when line height is not set\n * from the design-system paragraph specs (matches legacy / temp Input.styles behavior).\n */\nexport const MAP_TEXT_VARIANT_INPUT_METRICS: Record<\n TextVariant,\n { fontSize: number; letterSpacing: number }\n> = {\n [TextVariant.DisplayLg]: {\n fontSize: typography.sDisplayLG.fontSize,\n letterSpacing: typography.sDisplayLG.letterSpacing,\n },\n [TextVariant.DisplayMd]: {\n fontSize: typography.sDisplayMD.fontSize,\n letterSpacing: typography.sDisplayMD.letterSpacing,\n },\n [TextVariant.HeadingLg]: {\n fontSize: typography.sHeadingLG.fontSize,\n letterSpacing: typography.sHeadingLG.letterSpacing,\n },\n [TextVariant.HeadingMd]: {\n fontSize: typography.sHeadingMD.fontSize,\n letterSpacing: typography.sHeadingMD.letterSpacing,\n },\n [TextVariant.HeadingSm]: {\n fontSize: typography.sHeadingSM.fontSize,\n letterSpacing: typography.sHeadingSM.letterSpacing,\n },\n [TextVariant.BodyLg]: {\n fontSize: typography.sBodyLGMedium.fontSize,\n letterSpacing: typography.sBodyLGMedium.letterSpacing,\n },\n [TextVariant.BodyMd]: {\n fontSize: typography.sBodyMD.fontSize,\n letterSpacing: typography.sBodyMD.letterSpacing,\n },\n [TextVariant.BodySm]: {\n fontSize: typography.sBodySM.fontSize,\n letterSpacing: typography.sBodySM.letterSpacing,\n },\n [TextVariant.BodyXs]: {\n fontSize: typography.sBodyXS.fontSize,\n letterSpacing: typography.sBodyXS.letterSpacing,\n },\n [TextVariant.PageHeading]: {\n fontSize: typography.sPageHeading.fontSize,\n letterSpacing: typography.sPageHeading.letterSpacing,\n },\n [TextVariant.SectionHeading]: {\n fontSize: typography.sSectionHeading.fontSize,\n letterSpacing: typography.sSectionHeading.letterSpacing,\n },\n [TextVariant.ButtonLabelMd]: {\n fontSize: typography.sButtonLabelMd.fontSize,\n letterSpacing: typography.sButtonLabelMd.letterSpacing,\n },\n [TextVariant.ButtonLabelLg]: {\n fontSize: typography.sButtonLabelLg.fontSize,\n letterSpacing: typography.sButtonLabelLg.letterSpacing,\n },\n [TextVariant.AmountDisplayLg]: {\n fontSize: typography.sAmountDisplayLg.fontSize,\n letterSpacing: typography.sAmountDisplayLg.letterSpacing,\n },\n};\n"]}
@@ -1,4 +1,4 @@
1
- import { TextVariant } from "../../types/index.cjs";
1
+ import { TextVariant } from "@metamask-previews/design-system-shared";
2
2
  /**
3
3
  * Typographic metrics for Input: same tokens as `text-*` utilities but **without** `lineHeight`.
4
4
  * React Native `TextInput` aligns single-line text more predictably when line height is not set
@@ -1 +1 @@
1
- {"version":3,"file":"Input.constants.d.cts","sourceRoot":"","sources":["../../../src/components/Input/Input.constants.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,8BAAoB;AAE1C;;;;GAIG;AACH,eAAO,MAAM,8BAA8B,EAAE,MAAM,CACjD,WAAW,EACX;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,aAAa,EAAE,MAAM,CAAA;CAAE,CA0D5C,CAAC"}
1
+ {"version":3,"file":"Input.constants.d.cts","sourceRoot":"","sources":["../../../src/components/Input/Input.constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,gDAAgD;AAGtE;;;;GAIG;AACH,eAAO,MAAM,8BAA8B,EAAE,MAAM,CACjD,WAAW,EACX;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,aAAa,EAAE,MAAM,CAAA;CAAE,CA0D5C,CAAC"}
@@ -1,4 +1,4 @@
1
- import { TextVariant } from "../../types/index.mjs";
1
+ import { TextVariant } from "@metamask-previews/design-system-shared";
2
2
  /**
3
3
  * Typographic metrics for Input: same tokens as `text-*` utilities but **without** `lineHeight`.
4
4
  * React Native `TextInput` aligns single-line text more predictably when line height is not set
@@ -1 +1 @@
1
- {"version":3,"file":"Input.constants.d.mts","sourceRoot":"","sources":["../../../src/components/Input/Input.constants.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,8BAAoB;AAE1C;;;;GAIG;AACH,eAAO,MAAM,8BAA8B,EAAE,MAAM,CACjD,WAAW,EACX;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,aAAa,EAAE,MAAM,CAAA;CAAE,CA0D5C,CAAC"}
1
+ {"version":3,"file":"Input.constants.d.mts","sourceRoot":"","sources":["../../../src/components/Input/Input.constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,gDAAgD;AAGtE;;;;GAIG;AACH,eAAO,MAAM,8BAA8B,EAAE,MAAM,CACjD,WAAW,EACX;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,aAAa,EAAE,MAAM,CAAA;CAAE,CA0D5C,CAAC"}
@@ -1,5 +1,5 @@
1
+ import { TextVariant } from "@metamask-previews/design-system-shared";
1
2
  import { typography } from "@metamask-previews/design-tokens";
2
- import { TextVariant } from "../../types/index.mjs";
3
3
  /**
4
4
  * Typographic metrics for Input: same tokens as `text-*` utilities but **without** `lineHeight`.
5
5
  * React Native `TextInput` aligns single-line text more predictably when line height is not set
@@ -1 +1 @@
1
- {"version":3,"file":"Input.constants.mjs","sourceRoot":"","sources":["../../../src/components/Input/Input.constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,yCAAyC;AAE9D,OAAO,EAAE,WAAW,EAAE,8BAAoB;AAE1C;;;;GAIG;AACH,MAAM,CAAC,MAAM,8BAA8B,GAGvC;IACF,CAAC,WAAW,CAAC,SAAS,CAAC,EAAE;QACvB,QAAQ,EAAE,UAAU,CAAC,UAAU,CAAC,QAAQ;QACxC,aAAa,EAAE,UAAU,CAAC,UAAU,CAAC,aAAa;KACnD;IACD,CAAC,WAAW,CAAC,SAAS,CAAC,EAAE;QACvB,QAAQ,EAAE,UAAU,CAAC,UAAU,CAAC,QAAQ;QACxC,aAAa,EAAE,UAAU,CAAC,UAAU,CAAC,aAAa;KACnD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AU,CAAC,eAAe,CAAC,QAAQ;QAC7C,aAAa,EAAE,UAAU,CAAC,eAAe,CAAC,aAAa;KACxD;IACD,CAAC,WAAW,CAAC,aAAa,CAAC,EAAE;QAC3B,QAAQ,EAAE,UAAU,CAAC,cAAc,CAAC,QAAQ;QAC5C,aAAa,EAAE,UAAU,CAAC,cAAc,CAAC,aAAa;KACvD;IACD,CAAC,WAAW,CAAC,aAAa,CAAC,EAAE;QAC3B,QAAQ,EAAE,UAAU,CAAC,cAAc,CAAC,QAAQ;QAC5C,aAAa,EAAE,UAAU,CAAC,cAAc,CAAC,aAAa;KACvD;IACD,CAAC,WAAW,CAAC,eAAe,CAAC,EAAE;QAC7B,QAAQ,EAAE,UAAU,CAAC,gBAAgB,CAAC,QAAQ;QAC9C,aAAa,EAAE,UAAU,CAAC,gBAAgB,CAAC,aAAa;KACzD;CACF,CAAC","sourcesContent":["import { typography } from '@metamask-previews/design-tokens';\n\nimport { TextVariant } from '../../types';\n\n/**\n * Typographic metrics for Input: same tokens as `text-*` utilities but **without** `lineHeight`.\n * React Native `TextInput` aligns single-line text more predictably when line height is not set\n * from the design-system paragraph specs (matches legacy / temp Input.styles behavior).\n */\nexport const MAP_TEXT_VARIANT_INPUT_METRICS: Record<\n TextVariant,\n { fontSize: number; letterSpacing: number }\n> = {\n [TextVariant.DisplayLg]: {\n fontSize: typography.sDisplayLG.fontSize,\n letterSpacing: typography.sDisplayLG.letterSpacing,\n },\n [TextVariant.DisplayMd]: {\n fontSize: typography.sDisplayMD.fontSize,\n letterSpacing: typography.sDisplayMD.letterSpacing,\n },\n [TextVariant.HeadingLg]: {\n fontSize: typography.sHeadingLG.fontSize,\n letterSpacing: typography.sHeadingLG.letterSpacing,\n },\n [TextVariant.HeadingMd]: {\n fontSize: typography.sHeadingMD.fontSize,\n letterSpacing: typography.sHeadingMD.letterSpacing,\n },\n [TextVariant.HeadingSm]: {\n fontSize: typography.sHeadingSM.fontSize,\n letterSpacing: typography.sHeadingSM.letterSpacing,\n },\n [TextVariant.BodyLg]: {\n fontSize: typography.sBodyLGMedium.fontSize,\n letterSpacing: typography.sBodyLGMedium.letterSpacing,\n },\n [TextVariant.BodyMd]: {\n fontSize: typography.sBodyMD.fontSize,\n letterSpacing: typography.sBodyMD.letterSpacing,\n },\n [TextVariant.BodySm]: {\n fontSize: typography.sBodySM.fontSize,\n letterSpacing: typography.sBodySM.letterSpacing,\n },\n [TextVariant.BodyXs]: {\n fontSize: typography.sBodyXS.fontSize,\n letterSpacing: typography.sBodyXS.letterSpacing,\n },\n [TextVariant.PageHeading]: {\n fontSize: typography.sPageHeading.fontSize,\n letterSpacing: typography.sPageHeading.letterSpacing,\n },\n [TextVariant.SectionHeading]: {\n fontSize: typography.sSectionHeading.fontSize,\n letterSpacing: typography.sSectionHeading.letterSpacing,\n },\n [TextVariant.ButtonLabelMd]: {\n fontSize: typography.sButtonLabelMd.fontSize,\n letterSpacing: typography.sButtonLabelMd.letterSpacing,\n },\n [TextVariant.ButtonLabelLg]: {\n fontSize: typography.sButtonLabelLg.fontSize,\n letterSpacing: typography.sButtonLabelLg.letterSpacing,\n },\n [TextVariant.AmountDisplayLg]: {\n fontSize: typography.sAmountDisplayLg.fontSize,\n letterSpacing: typography.sAmountDisplayLg.letterSpacing,\n },\n};\n"]}
1
+ {"version":3,"file":"Input.constants.mjs","sourceRoot":"","sources":["../../../src/components/Input/Input.constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,gDAAgD;AACtE,OAAO,EAAE,UAAU,EAAE,yCAAyC;AAE9D;;;;GAIG;AACH,MAAM,CAAC,MAAM,8BAA8B,GAGvC;IACF,CAAC,WAAW,CAAC,SAAS,CAAC,EAAE;QACvB,QAAQ,EAAE,UAAU,CAAC,UAAU,CAAC,QAAQ;QACxC,aAAa,EAAE,UAAU,CAAC,UAAU,CAAC,aAAa;KACnD;IACD,CAAC,WAAW,CAAC,SAAS,CAAC,EAAE;QACvB,QAAQ,EAAE,UAAU,CAAC,U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;KACrD;IACD,CAAC,WAAW,CAAC,cAAc,CAAC,EAAE;QAC5B,QAAQ,EAAE,UAAU,CAAC,eAAe,CAAC,QAAQ;QAC7C,aAAa,EAAE,UAAU,CAAC,eAAe,CAAC,aAAa;KACxD;IACD,CAAC,WAAW,CAAC,aAAa,CAAC,EAAE;QAC3B,QAAQ,EAAE,UAAU,CAAC,cAAc,CAAC,QAAQ;QAC5C,aAAa,EAAE,UAAU,CAAC,cAAc,CAAC,aAAa;KACvD;IACD,CAAC,WAAW,CAAC,aAAa,CAAC,EAAE;QAC3B,QAAQ,EAAE,UAAU,CAAC,cAAc,CAAC,QAAQ;QAC5C,aAAa,EAAE,UAAU,CAAC,cAAc,CAAC,aAAa;KACvD;IACD,CAAC,WAAW,CAAC,eAAe,CAAC,EAAE;QAC7B,QAAQ,EAAE,UAAU,CAAC,gBAAgB,CAAC,QAAQ;QAC9C,aAAa,EAAE,UAAU,CAAC,gBAAgB,CAAC,aAAa;KACzD;CACF,CAAC","sourcesContent":["import { TextVariant } from '@metamask-previews/design-system-shared';\nimport { typography } from '@metamask-previews/design-tokens';\n\n/**\n * Typographic metrics for Input: same tokens as `text-*` utilities but **without** `lineHeight`.\n * React Native `TextInput` aligns single-line text more predictably when line height is not set\n * from the design-system paragraph specs (matches legacy / temp Input.styles behavior).\n */\nexport const MAP_TEXT_VARIANT_INPUT_METRICS: Record<\n TextVariant,\n { fontSize: number; letterSpacing: number }\n> = {\n [TextVariant.DisplayLg]: {\n fontSize: typography.sDisplayLG.fontSize,\n letterSpacing: typography.sDisplayLG.letterSpacing,\n },\n [TextVariant.DisplayMd]: {\n fontSize: typography.sDisplayMD.fontSize,\n letterSpacing: typography.sDisplayMD.letterSpacing,\n },\n [TextVariant.HeadingLg]: {\n fontSize: typography.sHeadingLG.fontSize,\n letterSpacing: typography.sHeadingLG.letterSpacing,\n },\n [TextVariant.HeadingMd]: {\n fontSize: typography.sHeadingMD.fontSize,\n letterSpacing: typography.sHeadingMD.letterSpacing,\n },\n [TextVariant.HeadingSm]: {\n fontSize: typography.sHeadingSM.fontSize,\n letterSpacing: typography.sHeadingSM.letterSpacing,\n },\n [TextVariant.BodyLg]: {\n fontSize: typography.sBodyLGMedium.fontSize,\n letterSpacing: typography.sBodyLGMedium.letterSpacing,\n },\n [TextVariant.BodyMd]: {\n fontSize: typography.sBodyMD.fontSize,\n letterSpacing: typography.sBodyMD.letterSpacing,\n },\n [TextVariant.BodySm]: {\n fontSize: typography.sBodySM.fontSize,\n letterSpacing: typography.sBodySM.letterSpacing,\n },\n [TextVariant.BodyXs]: {\n fontSize: typography.sBodyXS.fontSize,\n letterSpacing: typography.sBodyXS.letterSpacing,\n },\n [TextVariant.PageHeading]: {\n fontSize: typography.sPageHeading.fontSize,\n letterSpacing: typography.sPageHeading.letterSpacing,\n },\n [TextVariant.SectionHeading]: {\n fontSize: typography.sSectionHeading.fontSize,\n letterSpacing: typography.sSectionHeading.letterSpacing,\n },\n [TextVariant.ButtonLabelMd]: {\n fontSize: typography.sButtonLabelMd.fontSize,\n letterSpacing: typography.sButtonLabelMd.letterSpacing,\n },\n [TextVariant.ButtonLabelLg]: {\n fontSize: typography.sButtonLabelLg.fontSize,\n letterSpacing: typography.sButtonLabelLg.letterSpacing,\n },\n [TextVariant.AmountDisplayLg]: {\n fontSize: typography.sAmountDisplayLg.fontSize,\n letterSpacing: typography.sAmountDisplayLg.letterSpacing,\n },\n};\n"]}
@@ -1,5 +1,5 @@
1
+ import { TextVariant } from "@metamask-previews/design-system-shared";
1
2
  import { TextInput } from "react-native/index.js";
2
- import { TextVariant } from "../../types/index.cjs";
3
3
  export declare const Input: import("react").ForwardRefExoticComponent<Omit<import("react-native").TextInputProps, "editable" | "value" | "defaultValue"> & {
4
4
  value: string;
5
5
  textVariant?: TextVariant | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"Input.d.cts","sourceRoot":"","sources":["../../../src/components/Input/Input.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAY,SAAS,EAAE,8BAAqB;AAEnD,OAAO,EAAc,WAAW,EAAE,8BAAoB;AAStD,eAAO,MAAM,KAAK;;;;;;;6CAqHjB,CAAC"}
1
+ {"version":3,"file":"Input.d.cts","sourceRoot":"","sources":["../../../src/components/Input/Input.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,WAAW,EAAE,gDAAgD;AAQlF,OAAO,EAAY,SAAS,EAAE,8BAAqB;AAUnD,eAAO,MAAM,KAAK;;;;;;;6CAqHjB,CAAC"}
@@ -1,5 +1,5 @@
1
+ import { TextVariant } from "@metamask-previews/design-system-shared";
1
2
  import { TextInput } from "react-native/index.js";
2
- import { TextVariant } from "../../types/index.mjs";
3
3
  export declare const Input: import("react").ForwardRefExoticComponent<Omit<import("react-native").TextInputProps, "editable" | "value" | "defaultValue"> & {
4
4
  value: string;
5
5
  textVariant?: TextVariant | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"Input.d.mts","sourceRoot":"","sources":["../../../src/components/Input/Input.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAY,SAAS,EAAE,8BAAqB;AAEnD,OAAO,EAAc,WAAW,EAAE,8BAAoB;AAStD,eAAO,MAAM,KAAK;;;;;;;6CAqHjB,CAAC"}
1
+ {"version":3,"file":"Input.d.mts","sourceRoot":"","sources":["../../../src/components/Input/Input.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,WAAW,EAAE,gDAAgD;AAQlF,OAAO,EAAY,SAAS,EAAE,8BAAqB;AAUnD,eAAO,MAAM,KAAK;;;;;;;6CAqHjB,CAAC"}
@@ -1,8 +1,8 @@
1
+ import { FontFamily, TextVariant } from "@metamask-previews/design-system-shared";
1
2
  import { Theme, useTailwind, useTheme } from "@metamask-previews/design-system-twrnc-preset";
2
3
  import { darkTheme, lightTheme } from "@metamask-previews/design-tokens";
3
4
  import { forwardRef, useCallback, useMemo, useState } from "react";
4
5
  import { Platform, TextInput } from "react-native/index.js";
5
- import { FontFamily, TextVariant } from "../../types/index.mjs";
6
6
  import { MAP_TEXT_VARIANT_FONTWEIGHT, TWCLASSMAP_TEXT_FONTWEIGHT } from "../Text/Text.constants.mjs";
7
7
  import { MAP_TEXT_VARIANT_INPUT_METRICS } from "./Input.constants.mjs";
8
8
  export const Input = forwardRef(({ style, textVariant = TextVariant.BodyMd, isStateStylesDisabled, isDisabled = false, isReadonly = false, value, placeholder, twClassName, onBlur, onFocus, autoFocus = false, ...props }, ref) => {
@@ -1 +1 @@
1
- {"version":3,"file":"Input.mjs","sourceRoot":"","sources":["../../../src/components/Input/Input.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,EACL,WAAW,EACX,QAAQ,EACT,sDAAsD;AACvD,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,yCAAyC;AACzE,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,OAAO,EAAE,QAAQ,EAAE,cAAc;AACnE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,8BAAqB;AAEnD,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,8BAAoB;AACtD,OAAO,EACL,2BAA2B,EAC3B,0BAA0B,EAC3B,mCAA+B;AAEhC,OAAO,EAAE,8BAA8B,EAAE,8BAA0B;AAGnE,MAAM,CAAC,MAAM,KAAK,GAAG,UAAU,CAC7B,CACE,EACE,KAAK,EACL,WAAW,GAAG,WAAW,CAAC,MAAM,EAChC,qBAAqB,EACrB,UAAU,GAAG,KAAK,EAClB,UAAU,GAAG,KAAK,EAClB,KAAK,EACL,WAAW,EACX,WAAW,EACX,MAAM,EACN,OAAO,EACP,SAAS,GAAG,KAAK,EACjB,GAAG,KAAK,EACT,EACD,GAAG,EACH,EAAE;IACF,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,QAAQ,CAAC,SAAS,CAAC,CAAC;IACtD,MAAM,EAAE,GAAG,WAAW,EAAE,CAAC;IACzB,MAAM,KAAK,GAAG,QAAQ,EAAE,CAAC;IAEzB,MAAM,oBAAoB,GAAG,OAAO,CAClC,GAAG,EA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AAC;SACb;IACH,CAAC,EACD,CAAC,UAAU,EAAE,MAAM,CAAC,CACrB,CAAC;IAEF,oEAAoE;IACpE,MAAM,cAAc,GAAG,WAAW,CAChC,CAAC,CAAoD,EAAE,EAAE;QACvD,IAAI,CAAC,UAAU,EAAE;YACf,YAAY,CAAC,IAAI,CAAC,CAAC;YACnB,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC;SACd;IACH,CAAC,EACD,CAAC,UAAU,EAAE,OAAO,CAAC,CACtB,CAAC;IACF,MAAM,aAAa,GAAG;QACpB,UAAU;QACV,gBAAgB;QAChB,iEAAiE;QACjE,2DAA2D;QAC3D,yEAAyE;QACzE,QAAQ,CAAC,EAAE,KAAK,KAAK;YACnB,oBAAoB,IAAI,EAAE,UAAU,EAAE,CAAU,EAAE;QACpD,KAAK;KACN,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IAElB,OAAO,CACL,CAAC,SAAS,CACR,GAAG,CAAC,CAAC,GAAG,CAAC,CACT,oBAAoB,CAAC,CAAC,oBAAoB,CAAC,CAC3C,IAAI,KAAK,CAAC,CACV,WAAW,CAAC,CAAC,WAAW,CAAC,CACzB,KAAK,CAAC,CAAC,KAAK,CAAC,CACb,KAAK,CAAC,CAAC,aAAa,CAAC,CACrB,QAAQ,CAAC,CAAC,CAAC,UAAU,IAAI,CAAC,UAAU,CAAC,CACrC,SAAS,CAAC,CAAC,SAAS,CAAC,CACrB,MAAM,CAAC,CAAC,aAAa,CAAC,CACtB,OAAO,CAAC,CAAC,cAAc,CAAC,EACxB,CACH,CAAC;AACJ,CAAC,CACF,CAAC","sourcesContent":["import {\n Theme,\n useTailwind,\n useTheme,\n} from '@metamask-previews/design-system-twrnc-preset';\nimport { darkTheme, lightTheme } from '@metamask-previews/design-tokens';\nimport { forwardRef, useCallback, useMemo, useState } from 'react';\nimport { Platform, TextInput } from 'react-native';\n\nimport { FontFamily, TextVariant } from '../../types';\nimport {\n MAP_TEXT_VARIANT_FONTWEIGHT,\n TWCLASSMAP_TEXT_FONTWEIGHT,\n} from '../Text/Text.constants';\n\nimport { MAP_TEXT_VARIANT_INPUT_METRICS } from './Input.constants';\nimport type { InputProps } from './Input.types';\n\nexport const Input = forwardRef<TextInput, InputProps>(\n (\n {\n style,\n textVariant = TextVariant.BodyMd,\n isStateStylesDisabled,\n isDisabled = false,\n isReadonly = false,\n value,\n placeholder,\n twClassName,\n onBlur,\n onFocus,\n autoFocus = false,\n ...props\n },\n ref,\n ) => {\n const [isFocused, setIsFocused] = useState(autoFocus);\n const tw = useTailwind();\n const theme = useTheme();\n\n const placeholderTextColor = useMemo(\n () =>\n theme === Theme.Light\n ? lightTheme.colors.text.alternative\n : darkTheme.colors.text.alternative,\n [theme],\n );\n\n const finalFontWeight = MAP_TEXT_VARIANT_FONTWEIGHT[textVariant];\n const fontSuffix = TWCLASSMAP_TEXT_FONTWEIGHT[finalFontWeight];\n const fontClass = `font-${FontFamily.Default}${fontSuffix}`;\n const hasPlaceholder =\n placeholder !== undefined && placeholder !== null && placeholder !== '';\n // Only apply placeholder-mode styling when a placeholder is present and\n // the controlled value is empty. This keeps the iOS lineHeight workaround\n // scoped to the placeholder-visible state without affecting typed text.\n const isPlaceholderVisible = hasPlaceholder && value === '';\n\n const inputStyle = useMemo(\n () =>\n tw.style(\n fontClass,\n 'text-default',\n 'bg-default',\n 'border',\n 'border-transparent',\n !isStateStylesDisabled && isDisabled && 'opacity-50',\n !isStateStylesDisabled &&\n !isDisabled &&\n isFocused &&\n 'border-primary-default',\n twClassName,\n ),\n [\n fontClass,\n isStateStylesDisabled,\n isDisabled,\n isFocused,\n twClassName,\n tw,\n ],\n );\n\n const variantTextStyle = useMemo(\n () => MAP_TEXT_VARIANT_INPUT_METRICS[textVariant],\n [textVariant],\n );\n\n /* istanbul ignore next: handler body covered by focus/blur tests */\n const onBlurHandler = useCallback(\n (e: Parameters<NonNullable<InputProps['onBlur']>>[0]) => {\n if (!isDisabled) {\n setIsFocused(false);\n onBlur?.(e);\n }\n },\n [isDisabled, onBlur],\n );\n\n /* istanbul ignore next: handler body covered by focus/blur tests */\n const onFocusHandler = useCallback(\n (e: Parameters<NonNullable<InputProps['onFocus']>>[0]) => {\n if (!isDisabled) {\n setIsFocused(true);\n onFocus?.(e);\n }\n },\n [isDisabled, onFocus],\n );\n const resolvedStyle = [\n inputStyle,\n variantTextStyle,\n // iOS-only workaround: when a placeholder is visible, native iOS\n // TextInput can render placeholder text vertically offset.\n // Keep this iOS-only because lineHeight: 0 can collapse text on Android.\n Platform.OS === 'ios' &&\n isPlaceholderVisible && { lineHeight: 0 as const },\n style,\n ].filter(Boolean);\n\n return (\n <TextInput\n ref={ref}\n placeholderTextColor={placeholderTextColor}\n {...props}\n placeholder={placeholder}\n value={value}\n style={resolvedStyle}\n editable={!isDisabled && !isReadonly}\n autoFocus={autoFocus}\n onBlur={onBlurHandler}\n onFocus={onFocusHandler}\n />\n );\n },\n);\n"]}
1
+ {"version":3,"file":"Input.mjs","sourceRoot":"","sources":["../../../src/components/Input/Input.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,gDAAgD;AAClF,OAAO,EACL,KAAK,EACL,WAAW,EACX,QAAQ,EACT,sDAAsD;AACvD,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,yCAAyC;AACzE,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,OAAO,EAAE,QAAQ,EAAE,cAAc;AACnE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,8BAAqB;AAEnD,OAAO,EACL,2BAA2B,EAC3B,0BAA0B,EAC3B,mCAA+B;AAEhC,OAAO,EAAE,8BAA8B,EAAE,8BAA0B;AAGnE,MAAM,CAAC,MAAM,KAAK,GAAG,UAAU,CAC7B,CACE,EACE,KAAK,EACL,WAAW,GAAG,WAAW,CAAC,MAAM,EAChC,qBAAqB,EACrB,UAAU,GAAG,KAAK,EAClB,UAAU,GAAG,KAAK,EAClB,KAAK,EACL,WAAW,EACX,WAAW,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,CAAC,cAAc,CAAC,EACxB,CACH,CAAC;AACJ,CAAC,CACF,CAAC","sourcesContent":["import { FontFamily, TextVariant } from '@metamask-previews/design-system-shared';\nimport {\n Theme,\n useTailwind,\n useTheme,\n} from '@metamask-previews/design-system-twrnc-preset';\nimport { darkTheme, lightTheme } from '@metamask-previews/design-tokens';\nimport { forwardRef, useCallback, useMemo, useState } from 'react';\nimport { Platform, TextInput } from 'react-native';\n\nimport {\n MAP_TEXT_VARIANT_FONTWEIGHT,\n TWCLASSMAP_TEXT_FONTWEIGHT,\n} from '../Text/Text.constants';\n\nimport { MAP_TEXT_VARIANT_INPUT_METRICS } from './Input.constants';\nimport type { InputProps } from './Input.types';\n\nexport const Input = forwardRef<TextInput, InputProps>(\n (\n {\n style,\n textVariant = TextVariant.BodyMd,\n isStateStylesDisabled,\n isDisabled = false,\n isReadonly = false,\n value,\n placeholder,\n twClassName,\n onBlur,\n onFocus,\n autoFocus = false,\n ...props\n },\n ref,\n ) => {\n const [isFocused, setIsFocused] = useState(autoFocus);\n const tw = useTailwind();\n const theme = useTheme();\n\n const placeholderTextColor = useMemo(\n () =>\n theme === Theme.Light\n ? lightTheme.colors.text.alternative\n : darkTheme.colors.text.alternative,\n [theme],\n );\n\n const finalFontWeight = MAP_TEXT_VARIANT_FONTWEIGHT[textVariant];\n const fontSuffix = TWCLASSMAP_TEXT_FONTWEIGHT[finalFontWeight];\n const fontClass = `font-${FontFamily.Default}${fontSuffix}`;\n const hasPlaceholder =\n placeholder !== undefined && placeholder !== null && placeholder !== '';\n // Only apply placeholder-mode styling when a placeholder is present and\n // the controlled value is empty. This keeps the iOS lineHeight workaround\n // scoped to the placeholder-visible state without affecting typed text.\n const isPlaceholderVisible = hasPlaceholder && value === '';\n\n const inputStyle = useMemo(\n () =>\n tw.style(\n fontClass,\n 'text-default',\n 'bg-default',\n 'border',\n 'border-transparent',\n !isStateStylesDisabled && isDisabled && 'opacity-50',\n !isStateStylesDisabled &&\n !isDisabled &&\n isFocused &&\n 'border-primary-default',\n twClassName,\n ),\n [\n fontClass,\n isStateStylesDisabled,\n isDisabled,\n isFocused,\n twClassName,\n tw,\n ],\n );\n\n const variantTextStyle = useMemo(\n () => MAP_TEXT_VARIANT_INPUT_METRICS[textVariant],\n [textVariant],\n );\n\n /* istanbul ignore next: handler body covered by focus/blur tests */\n const onBlurHandler = useCallback(\n (e: Parameters<NonNullable<InputProps['onBlur']>>[0]) => {\n if (!isDisabled) {\n setIsFocused(false);\n onBlur?.(e);\n }\n },\n [isDisabled, onBlur],\n );\n\n /* istanbul ignore next: handler body covered by focus/blur tests */\n const onFocusHandler = useCallback(\n (e: Parameters<NonNullable<InputProps['onFocus']>>[0]) => {\n if (!isDisabled) {\n setIsFocused(true);\n onFocus?.(e);\n }\n },\n [isDisabled, onFocus],\n );\n const resolvedStyle = [\n inputStyle,\n variantTextStyle,\n // iOS-only workaround: when a placeholder is visible, native iOS\n // TextInput can render placeholder text vertically offset.\n // Keep this iOS-only because lineHeight: 0 can collapse text on Android.\n Platform.OS === 'ios' &&\n isPlaceholderVisible && { lineHeight: 0 as const },\n style,\n ].filter(Boolean);\n\n return (\n <TextInput\n ref={ref}\n placeholderTextColor={placeholderTextColor}\n {...props}\n placeholder={placeholder}\n value={value}\n style={resolvedStyle}\n editable={!isDisabled && !isReadonly}\n autoFocus={autoFocus}\n onBlur={onBlurHandler}\n onFocus={onFocusHandler}\n />\n );\n },\n);\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"Input.types.cjs","sourceRoot":"","sources":["../../../src/components/Input/Input.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { TextInputProps } from 'react-native';\n\nimport type { TextVariant } from '../../types';\n\nexport type InputProps = Omit<\n TextInputProps,\n 'editable' | 'value' | 'defaultValue'\n> & {\n /**\n * Controlled value for Input.\n */\n value: string;\n /**\n * Optional enum to select between Typography variants.\n *\n * @default BodyMd\n */\n textVariant?: TextVariant;\n /**\n * Optional boolean to disable Input.\n *\n * @default false\n */\n isDisabled?: boolean;\n /**\n * Optional boolean to show readonly input.\n *\n * @default false\n */\n isReadonly?: boolean;\n /**\n * Optional boolean to disable state styles.\n *\n * @default false\n */\n isStateStylesDisabled?: boolean;\n /**\n * Optional prop to add twrnc overriding classNames.\n */\n twClassName?: string;\n};\n"]}
1
+ {"version":3,"file":"Input.types.cjs","sourceRoot":"","sources":["../../../src/components/Input/Input.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { TextVariant } from '@metamask-previews/design-system-shared';\nimport type { TextInputProps } from 'react-native';\n\nexport type InputProps = Omit<\n TextInputProps,\n 'editable' | 'value' | 'defaultValue'\n> & {\n /**\n * Controlled value for Input.\n */\n value: string;\n /**\n * Optional enum to select between Typography variants.\n *\n * @default BodyMd\n */\n textVariant?: TextVariant;\n /**\n * Optional boolean to disable Input.\n *\n * @default false\n */\n isDisabled?: boolean;\n /**\n * Optional boolean to show readonly input.\n *\n * @default false\n */\n isReadonly?: boolean;\n /**\n * Optional boolean to disable state styles.\n *\n * @default false\n */\n isStateStylesDisabled?: boolean;\n /**\n * Optional prop to add twrnc overriding classNames.\n */\n twClassName?: string;\n};\n"]}
@@ -1,5 +1,5 @@
1
+ import type { TextVariant } from "@metamask-previews/design-system-shared";
1
2
  import type { TextInputProps } from "react-native/index.js";
2
- import type { TextVariant } from "../../types/index.cjs";
3
3
  export type InputProps = Omit<TextInputProps, 'editable' | 'value' | 'defaultValue'> & {
4
4
  /**
5
5
  * Controlled value for Input.
@@ -1 +1 @@
1
- {"version":3,"file":"Input.types.d.cts","sourceRoot":"","sources":["../../../src/components/Input/Input.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,8BAAqB;AAEnD,OAAO,KAAK,EAAE,WAAW,EAAE,8BAAoB;AAE/C,MAAM,MAAM,UAAU,GAAG,IAAI,CAC3B,cAAc,EACd,UAAU,GAAG,OAAO,GAAG,cAAc,CACtC,GAAG;IACF;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;;OAIG;IACH,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC"}
1
+ {"version":3,"file":"Input.types.d.cts","sourceRoot":"","sources":["../../../src/components/Input/Input.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,gDAAgD;AAC3E,OAAO,KAAK,EAAE,cAAc,EAAE,8BAAqB;AAEnD,MAAM,MAAM,UAAU,GAAG,IAAI,CAC3B,cAAc,EACd,UAAU,GAAG,OAAO,GAAG,cAAc,CACtC,GAAG;IACF;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;;OAIG;IACH,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC"}
@@ -1,5 +1,5 @@
1
+ import type { TextVariant } from "@metamask-previews/design-system-shared";
1
2
  import type { TextInputProps } from "react-native/index.js";
2
- import type { TextVariant } from "../../types/index.mjs";
3
3
  export type InputProps = Omit<TextInputProps, 'editable' | 'value' | 'defaultValue'> & {
4
4
  /**
5
5
  * Controlled value for Input.
@@ -1 +1 @@
1
- {"version":3,"file":"Input.types.d.mts","sourceRoot":"","sources":["../../../src/components/Input/Input.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,8BAAqB;AAEnD,OAAO,KAAK,EAAE,WAAW,EAAE,8BAAoB;AAE/C,MAAM,MAAM,UAAU,GAAG,IAAI,CAC3B,cAAc,EACd,UAAU,GAAG,OAAO,GAAG,cAAc,CACtC,GAAG;IACF;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;;OAIG;IACH,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC"}
1
+ {"version":3,"file":"Input.types.d.mts","sourceRoot":"","sources":["../../../src/components/Input/Input.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,gDAAgD;AAC3E,OAAO,KAAK,EAAE,cAAc,EAAE,8BAAqB;AAEnD,MAAM,MAAM,UAAU,GAAG,IAAI,CAC3B,cAAc,EACd,UAAU,GAAG,OAAO,GAAG,cAAc,CACtC,GAAG;IACF;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;;OAIG;IACH,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"Input.types.mjs","sourceRoot":"","sources":["../../../src/components/Input/Input.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { TextInputProps } from 'react-native';\n\nimport type { TextVariant } from '../../types';\n\nexport type InputProps = Omit<\n TextInputProps,\n 'editable' | 'value' | 'defaultValue'\n> & {\n /**\n * Controlled value for Input.\n */\n value: string;\n /**\n * Optional enum to select between Typography variants.\n *\n * @default BodyMd\n */\n textVariant?: TextVariant;\n /**\n * Optional boolean to disable Input.\n *\n * @default false\n */\n isDisabled?: boolean;\n /**\n * Optional boolean to show readonly input.\n *\n * @default false\n */\n isReadonly?: boolean;\n /**\n * Optional boolean to disable state styles.\n *\n * @default false\n */\n isStateStylesDisabled?: boolean;\n /**\n * Optional prop to add twrnc overriding classNames.\n */\n twClassName?: string;\n};\n"]}
1
+ {"version":3,"file":"Input.types.mjs","sourceRoot":"","sources":["../../../src/components/Input/Input.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { TextVariant } from '@metamask-previews/design-system-shared';\nimport type { TextInputProps } from 'react-native';\n\nexport type InputProps = Omit<\n TextInputProps,\n 'editable' | 'value' | 'defaultValue'\n> & {\n /**\n * Controlled value for Input.\n */\n value: string;\n /**\n * Optional enum to select between Typography variants.\n *\n * @default BodyMd\n */\n textVariant?: TextVariant;\n /**\n * Optional boolean to disable Input.\n *\n * @default false\n */\n isDisabled?: boolean;\n /**\n * Optional boolean to show readonly input.\n *\n * @default false\n */\n isReadonly?: boolean;\n /**\n * Optional boolean to disable state styles.\n *\n * @default false\n */\n isStateStylesDisabled?: boolean;\n /**\n * Optional prop to add twrnc overriding classNames.\n */\n twClassName?: string;\n};\n"]}
@@ -24,17 +24,17 @@ var __importStar = (this && this.__importStar) || function (mod) {
24
24
  };
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
26
  exports.Text = void 0;
27
+ const design_system_shared_1 = require("@metamask-previews/design-system-shared");
27
28
  const design_system_twrnc_preset_1 = require("@metamask-previews/design-system-twrnc-preset");
28
29
  const react_1 = __importStar(require("react"));
29
30
  const react_native_1 = require("react-native/index.js");
30
- const types_1 = require("../../types/index.cjs");
31
31
  const Text_constants_1 = require("./Text.constants.cjs");
32
- const Text = ({ variant = types_1.TextVariant.BodyMd, color = types_1.TextColor.TextDefault, style, children, fontWeight, fontFamily = types_1.FontFamily.Default, fontStyle = types_1.FontStyle.Normal, twClassName, ...props }) => {
32
+ const Text = ({ variant = design_system_shared_1.TextVariant.BodyMd, color = design_system_shared_1.TextColor.TextDefault, style, children, fontWeight, fontFamily = design_system_shared_1.FontFamily.Default, fontStyle = design_system_shared_1.FontStyle.Normal, twClassName, ...props }) => {
33
33
  const tw = (0, design_system_twrnc_preset_1.useTailwind)();
34
34
  const finalFontWeight = fontWeight ?? Text_constants_1.MAP_TEXT_VARIANT_FONTWEIGHT[variant];
35
35
  const textStyle = (0, react_1.useMemo)(() => {
36
- const isItalic = fontStyle === types_1.FontStyle.Italic;
37
- const fontSuffix = `${Text_constants_1.TWCLASSMAP_TEXT_FONTWEIGHT[finalFontWeight]}${isItalic && fontFamily === types_1.FontFamily.Default ? '-italic' : ''}`;
36
+ const isItalic = fontStyle === design_system_shared_1.FontStyle.Italic;
37
+ const fontSuffix = `${Text_constants_1.TWCLASSMAP_TEXT_FONTWEIGHT[finalFontWeight]}${isItalic && fontFamily === design_system_shared_1.FontFamily.Default ? '-italic' : ''}`;
38
38
  const fontClass = `font-${fontFamily}${fontSuffix}`;
39
39
  return tw.style(`text-${variant}`, fontClass, color, twClassName);
40
40
  }, [variant, color, finalFontWeight, fontFamily, fontStyle, twClassName, tw]);
@@ -1 +1 @@
1
- {"version":3,"file":"Text.cjs","sourceRoot":"","sources":["../../../src/components/Text/Text.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,8FAA4E;AAC5E,+CAAuC;AACvC,wDAA8C;AAE9C,iDAA4E;AAE5E,yDAG0B;AAGnB,MAAM,IAAI,GAAwB,CAAC,EACxC,OAAO,GAAG,mBAAW,CAAC,MAAM,EAC5B,KAAK,GAAG,iBAAS,CAAC,WAAW,EAC7B,KAAK,EACL,QAAQ,EACR,UAAU,EACV,UAAU,GAAG,kBAAU,CAAC,OAAO,EAC/B,SAAS,GAAG,iBAAS,CAAC,MAAM,EAC5B,WAAW,EACX,GAAG,KAAK,EACT,EAAE,EAAE;IACH,MAAM,EAAE,GAAG,IAAA,wCAAW,GAAE,CAAC;IACzB,MAAM,eAAe,GAAG,UAAU,IAAI,4CAA2B,CAAC,OAAO,CAAC,CAAC;IAE3E,MAAM,SAAS,GAAG,IAAA,eAAO,EAAC,GAAG,EAAE;QAC7B,MAAM,QAAQ,GAAG,SAAS,KAAK,iBAAS,CAAC,MAAM,CAAC;QAChD,MAAM,UAAU,GAAG,GAAG,2CAA0B,CAAC,eAAe,CAAC,GAC/D,QAAQ,IAAI,UAAU,KAAK,kBAAU,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAC9D,EAAE,CAAC;QACH,MAAM,SAAS,GAAG,QAAQ,UAAU,GAAG,UAAU,EAAE,CAAC;QACpD,OAAO,EAAE,CAAC,KAAK,CAAC,QAAQ,OAAO,EAAE,EAAE,SAAS,EAAE,KAAK,EAAE,WAAW,CAAC,CAAC;IACpE,CAAC,EAAE,CAAC,OAAO,EAAE,KAAK,EAAE,eAAe,EAAE,UAAU,EAAE,SAAS,EAAE,WAAW,EAAE,EAAE,CAAC,CAAC,CAAC;IAE9E,OAAO,CACL,CAAC,mBAAM,CAAC,iBAAiB,CAAC,MAAM,CAAC,IAAI,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC,CACpE;MAAA,CAAC,QAAQ,CACX;IAAA,EAAE,mBAAM,CAAC,CACV,CAAC;AACJ,CAAC,CAAC;AA5BW,QAAA,IAAI,QA4Bf","sourcesContent":["import { useTailwind } from '@metamask-previews/design-system-twrnc-preset';\nimport React, { useMemo } from 'react';\nimport { Text as RNText } from 'react-native';\n\nimport { FontFamily, FontStyle, TextVariant, TextColor } from '../../types';\n\nimport {\n MAP_TEXT_VARIANT_FONTWEIGHT,\n TWCLASSMAP_TEXT_FONTWEIGHT,\n} from './Text.constants';\nimport type { TextProps } from './Text.types';\n\nexport const Text: React.FC<TextProps> = ({\n variant = TextVariant.BodyMd,\n color = TextColor.TextDefault,\n style,\n children,\n fontWeight,\n fontFamily = FontFamily.Default,\n fontStyle = FontStyle.Normal,\n twClassName,\n ...props\n}) => {\n const tw = useTailwind();\n const finalFontWeight = fontWeight ?? MAP_TEXT_VARIANT_FONTWEIGHT[variant];\n\n const textStyle = useMemo(() => {\n const isItalic = fontStyle === FontStyle.Italic;\n const fontSuffix = `${TWCLASSMAP_TEXT_FONTWEIGHT[finalFontWeight]}${\n isItalic && fontFamily === FontFamily.Default ? '-italic' : ''\n }`;\n const fontClass = `font-${fontFamily}${fontSuffix}`;\n return tw.style(`text-${variant}`, fontClass, color, twClassName);\n }, [variant, color, finalFontWeight, fontFamily, fontStyle, twClassName, tw]);\n\n return (\n <RNText accessibilityRole=\"text\" {...props} style={[textStyle, style]}>\n {children}\n </RNText>\n );\n};\n"]}
1
+ {"version":3,"file":"Text.cjs","sourceRoot":"","sources":["../../../src/components/Text/Text.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kFAKiD;AACjD,8FAA4E;AAC5E,+CAAuC;AACvC,wDAA8C;AAE9C,yDAG0B;AAGnB,MAAM,IAAI,GAAwB,CAAC,EACxC,OAAO,GAAG,kCAAW,CAAC,MAAM,EAC5B,KAAK,GAAG,gCAAS,CAAC,WAAW,EAC7B,KAAK,EACL,QAAQ,EACR,UAAU,EACV,UAAU,GAAG,iCAAU,CAAC,OAAO,EAC/B,SAAS,GAAG,gCAAS,CAAC,MAAM,EAC5B,WAAW,EACX,GAAG,KAAK,EACT,EAAE,EAAE;IACH,MAAM,EAAE,GAAG,IAAA,wCAAW,GAAE,CAAC;IACzB,MAAM,eAAe,GAAG,UAAU,IAAI,4CAA2B,CAAC,OAAO,CAAC,CAAC;IAE3E,MAAM,SAAS,GAAG,IAAA,eAAO,EAAC,GAAG,EAAE;QAC7B,MAAM,QAAQ,GAAG,SAAS,KAAK,gCAAS,CAAC,MAAM,CAAC;QAChD,MAAM,UAAU,GAAG,GAAG,2CAA0B,CAAC,eAAe,CAAC,GAC/D,QAAQ,IAAI,UAAU,KAAK,iCAAU,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAC9D,EAAE,CAAC;QACH,MAAM,SAAS,GAAG,QAAQ,UAAU,GAAG,UAAU,EAAE,CAAC;QACpD,OAAO,EAAE,CAAC,KAAK,CAAC,QAAQ,OAAO,EAAE,EAAE,SAAS,EAAE,KAAK,EAAE,WAAW,CAAC,CAAC;IACpE,CAAC,EAAE,CAAC,OAAO,EAAE,KAAK,EAAE,eAAe,EAAE,UAAU,EAAE,SAAS,EAAE,WAAW,EAAE,EAAE,CAAC,CAAC,CAAC;IAE9E,OAAO,CACL,CAAC,mBAAM,CAAC,iBAAiB,CAAC,MAAM,CAAC,IAAI,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC,CACpE;MAAA,CAAC,QAAQ,CACX;IAAA,EAAE,mBAAM,CAAC,CACV,CAAC;AACJ,CAAC,CAAC;AA5BW,QAAA,IAAI,QA4Bf","sourcesContent":["import {\n FontFamily,\n FontStyle,\n TextColor,\n TextVariant,\n} from '@metamask-previews/design-system-shared';\nimport { useTailwind } from '@metamask-previews/design-system-twrnc-preset';\nimport React, { useMemo } from 'react';\nimport { Text as RNText } from 'react-native';\n\nimport {\n MAP_TEXT_VARIANT_FONTWEIGHT,\n TWCLASSMAP_TEXT_FONTWEIGHT,\n} from './Text.constants';\nimport type { TextProps } from './Text.types';\n\nexport const Text: React.FC<TextProps> = ({\n variant = TextVariant.BodyMd,\n color = TextColor.TextDefault,\n style,\n children,\n fontWeight,\n fontFamily = FontFamily.Default,\n fontStyle = FontStyle.Normal,\n twClassName,\n ...props\n}) => {\n const tw = useTailwind();\n const finalFontWeight = fontWeight ?? MAP_TEXT_VARIANT_FONTWEIGHT[variant];\n\n const textStyle = useMemo(() => {\n const isItalic = fontStyle === FontStyle.Italic;\n const fontSuffix = `${TWCLASSMAP_TEXT_FONTWEIGHT[finalFontWeight]}${\n isItalic && fontFamily === FontFamily.Default ? '-italic' : ''\n }`;\n const fontClass = `font-${fontFamily}${fontSuffix}`;\n return tw.style(`text-${variant}`, fontClass, color, twClassName);\n }, [variant, color, finalFontWeight, fontFamily, fontStyle, twClassName, tw]);\n\n return (\n <RNText accessibilityRole=\"text\" {...props} style={[textStyle, style]}>\n {children}\n </RNText>\n );\n};\n"]}
@@ -1,32 +1,27 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.MAP_TEXT_VARIANT_FONTWEIGHT = exports.TWCLASSMAP_TEXT_FONTWEIGHT = void 0;
4
- const design_tokens_1 = require("@metamask-previews/design-tokens");
5
- const types_1 = require("../../types/index.cjs");
4
+ const design_system_shared_1 = require("@metamask-previews/design-system-shared");
6
5
  // Mappings
7
6
  exports.TWCLASSMAP_TEXT_FONTWEIGHT = {
8
- [types_1.FontWeight.Regular]: '-regular',
9
- [types_1.FontWeight.Medium]: '-medium',
10
- [types_1.FontWeight.Bold]: '-bold',
7
+ [design_system_shared_1.FontWeight.Regular]: '-regular',
8
+ [design_system_shared_1.FontWeight.Medium]: '-medium',
9
+ [design_system_shared_1.FontWeight.Bold]: '-bold',
11
10
  };
12
11
  exports.MAP_TEXT_VARIANT_FONTWEIGHT = {
13
- [types_1.TextVariant.DisplayLg]: design_tokens_1.typography.sDisplayLG.fontWeight,
14
- [types_1.TextVariant.DisplayMd]: design_tokens_1.typography.sDisplayMD.fontWeight,
15
- [types_1.TextVariant.HeadingLg]: design_tokens_1.typography.sHeadingLG.fontWeight,
16
- [types_1.TextVariant.HeadingMd]: design_tokens_1.typography.sHeadingMD.fontWeight,
17
- [types_1.TextVariant.HeadingSm]: design_tokens_1.typography.sHeadingSM.fontWeight,
18
- [types_1.TextVariant.BodyLg]: design_tokens_1.typography.sBodyLGMedium.fontWeight,
19
- [types_1.TextVariant.BodyMd]: design_tokens_1.typography.sBodyMD.fontWeight,
20
- [types_1.TextVariant.BodySm]: design_tokens_1.typography.sBodySM.fontWeight,
21
- [types_1.TextVariant.BodyXs]: design_tokens_1.typography.sBodyXS.fontWeight,
22
- [types_1.TextVariant.PageHeading]: design_tokens_1.typography.sPageHeading.fontWeight,
23
- [types_1.TextVariant.SectionHeading]: design_tokens_1.typography.sSectionHeading
24
- .fontWeight,
25
- [types_1.TextVariant.ButtonLabelMd]: design_tokens_1.typography.sButtonLabelMd
26
- .fontWeight,
27
- [types_1.TextVariant.ButtonLabelLg]: design_tokens_1.typography.sButtonLabelLg
28
- .fontWeight,
29
- [types_1.TextVariant.AmountDisplayLg]: design_tokens_1.typography.sAmountDisplayLg
30
- .fontWeight,
12
+ [design_system_shared_1.TextVariant.DisplayLg]: design_system_shared_1.FontWeight.Bold,
13
+ [design_system_shared_1.TextVariant.DisplayMd]: design_system_shared_1.FontWeight.Bold,
14
+ [design_system_shared_1.TextVariant.HeadingLg]: design_system_shared_1.FontWeight.Bold,
15
+ [design_system_shared_1.TextVariant.HeadingMd]: design_system_shared_1.FontWeight.Bold,
16
+ [design_system_shared_1.TextVariant.HeadingSm]: design_system_shared_1.FontWeight.Bold,
17
+ [design_system_shared_1.TextVariant.BodyLg]: design_system_shared_1.FontWeight.Medium,
18
+ [design_system_shared_1.TextVariant.BodyMd]: design_system_shared_1.FontWeight.Regular,
19
+ [design_system_shared_1.TextVariant.BodySm]: design_system_shared_1.FontWeight.Regular,
20
+ [design_system_shared_1.TextVariant.BodyXs]: design_system_shared_1.FontWeight.Regular,
21
+ [design_system_shared_1.TextVariant.PageHeading]: design_system_shared_1.FontWeight.Bold,
22
+ [design_system_shared_1.TextVariant.SectionHeading]: design_system_shared_1.FontWeight.Bold,
23
+ [design_system_shared_1.TextVariant.ButtonLabelMd]: design_system_shared_1.FontWeight.Medium,
24
+ [design_system_shared_1.TextVariant.ButtonLabelLg]: design_system_shared_1.FontWeight.Medium,
25
+ [design_system_shared_1.TextVariant.AmountDisplayLg]: design_system_shared_1.FontWeight.Bold,
31
26
  };
32
27
  //# sourceMappingURL=Text.constants.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"Text.constants.cjs","sourceRoot":"","sources":["../../../src/components/Text/Text.constants.ts"],"names":[],"mappings":";;;AAAA,oEAA8D;AAE9D,iDAAsD;AAEtD,WAAW;AACE,QAAA,0BAA0B,GAEnC;IACF,CAAC,kBAAU,CAAC,OAAO,CAAC,EAAE,UAAU;IAChC,CAAC,kBAAU,CAAC,MAAM,CAAC,EAAE,SAAS;IAC9B,CAAC,kBAAU,CAAC,IAAI,CAAC,EAAE,OAAO;CAC3B,CAAC;AAEW,QAAA,2BAA2B,GAEpC;IACF,CAAC,mBAAW,CAAC,SAAS,CAAC,EAAE,0BAAU,CAAC,UAAU,CAAC,UAAwB;IACvE,CAAC,mBAAW,CAAC,SAAS,CAAC,EAAE,0BAAU,CAAC,UAAU,CAAC,UAAwB;IACvE,CAAC,mBAAW,CAAC,SAAS,CAAC,EAAE,0BAAU,CAAC,UAAU,CAAC,UAAwB;IACvE,CAAC,mBAAW,CAAC,SAAS,CAAC,EAAE,0BAAU,CAAC,UAAU,CAAC,UAAwB;IACvE,CAAC,mBAAW,CAAC,SAAS,CAAC,EAAE,0BAAU,CAAC,UAAU,CAAC,UAAwB;IACvE,CAAC,mBAAW,CAAC,MAAM,CAAC,EAAE,0BAAU,CAAC,aAAa,CAAC,UAAwB;IACvE,CAAC,mBAAW,CAAC,MAAM,CAAC,EAAE,0BAAU,CAAC,OAAO,CAAC,UAAwB;IACjE,CAAC,mBAAW,CAAC,MAAM,CAAC,EAAE,0BAAU,CAAC,OAAO,CAAC,UAAwB;IACjE,CAAC,mBAAW,CAAC,MAAM,CAAC,EAAE,0BAAU,CAAC,OAAO,CAAC,UAAwB;IACjE,CAAC,mBAAW,CAAC,WAAW,CAAC,EAAE,0BAAU,CAAC,YAAY,CAAC,UAAwB;IAC3E,CAAC,mBAAW,CAAC,cAAc,CAAC,EAAE,0BAAU,CAAC,eAAe;SACrD,UAAwB;IAC3B,CAAC,mBAAW,CAAC,aAAa,CAAC,EAAE,0BAAU,CAAC,cAAc;SACnD,UAAwB;IAC3B,CAAC,mBAAW,CAAC,aAAa,CAAC,EAAE,0BAAU,CAAC,cAAc;SACnD,UAAwB;IAC3B,CAAC,mBAAW,CAAC,eAAe,CAAC,EAAE,0BAAU,CAAC,gBAAgB;SACvD,UAAwB;CAC5B,CAAC","sourcesContent":["import { typography } from '@metamask-previews/design-tokens';\n\nimport { FontWeight, TextVariant } from '../../types';\n\n// Mappings\nexport const TWCLASSMAP_TEXT_FONTWEIGHT: {\n [key in FontWeight]: string;\n} = {\n [FontWeight.Regular]: '-regular',\n [FontWeight.Medium]: '-medium',\n [FontWeight.Bold]: '-bold',\n};\n\nexport const MAP_TEXT_VARIANT_FONTWEIGHT: {\n [key in TextVariant]: FontWeight;\n} = {\n [TextVariant.DisplayLg]: typography.sDisplayLG.fontWeight as FontWeight,\n [TextVariant.DisplayMd]: typography.sDisplayMD.fontWeight as FontWeight,\n [TextVariant.HeadingLg]: typography.sHeadingLG.fontWeight as FontWeight,\n [TextVariant.HeadingMd]: typography.sHeadingMD.fontWeight as FontWeight,\n [TextVariant.HeadingSm]: typography.sHeadingSM.fontWeight as FontWeight,\n [TextVariant.BodyLg]: typography.sBodyLGMedium.fontWeight as FontWeight,\n [TextVariant.BodyMd]: typography.sBodyMD.fontWeight as FontWeight,\n [TextVariant.BodySm]: typography.sBodySM.fontWeight as FontWeight,\n [TextVariant.BodyXs]: typography.sBodyXS.fontWeight as FontWeight,\n [TextVariant.PageHeading]: typography.sPageHeading.fontWeight as FontWeight,\n [TextVariant.SectionHeading]: typography.sSectionHeading\n .fontWeight as FontWeight,\n [TextVariant.ButtonLabelMd]: typography.sButtonLabelMd\n .fontWeight as FontWeight,\n [TextVariant.ButtonLabelLg]: typography.sButtonLabelLg\n .fontWeight as FontWeight,\n [TextVariant.AmountDisplayLg]: typography.sAmountDisplayLg\n .fontWeight as FontWeight,\n};\n"]}
1
+ {"version":3,"file":"Text.constants.cjs","sourceRoot":"","sources":["../../../src/components/Text/Text.constants.ts"],"names":[],"mappings":";;;AAAA,kFAAkF;AAElF,WAAW;AACE,QAAA,0BAA0B,GAEnC;IACF,CAAC,iCAAU,CAAC,OAAO,CAAC,EAAE,UAAU;IAChC,CAAC,iCAAU,CAAC,MAAM,CAAC,EAAE,SAAS;IAC9B,CAAC,iCAAU,CAAC,IAAI,CAAC,EAAE,OAAO;CAC3B,CAAC;AAEW,QAAA,2BAA2B,GAEpC;IACF,CAAC,kCAAW,CAAC,SAAS,CAAC,EAAE,iCAAU,CAAC,IAAI;IACxC,CAAC,kCAAW,CAAC,SAAS,CAAC,EAAE,iCAAU,CAAC,IAAI;IACxC,CAAC,kCAAW,CAAC,SAAS,CAAC,EAAE,iCAAU,CAAC,IAAI;IACxC,CAAC,kCAAW,CAAC,SAAS,CAAC,EAAE,iCAAU,CAAC,IAAI;IACxC,CAAC,kCAAW,CAAC,SAAS,CAAC,EAAE,iCAAU,CAAC,IAAI;IACxC,CAAC,kCAAW,CAAC,MAAM,CAAC,EAAE,iCAAU,CAAC,MAAM;IACvC,CAAC,kCAAW,CAAC,MAAM,CAAC,EAAE,iCAAU,CAAC,OAAO;IACxC,CAAC,kCAAW,CAAC,MAAM,CAAC,EAAE,iCAAU,CAAC,OAAO;IACxC,CAAC,kCAAW,CAAC,MAAM,CAAC,EAAE,iCAAU,CAAC,OAAO;IACxC,CAAC,kCAAW,CAAC,WAAW,CAAC,EAAE,iCAAU,CAAC,IAAI;IAC1C,CAAC,kCAAW,CAAC,cAAc,CAAC,EAAE,iCAAU,CAAC,IAAI;IAC7C,CAAC,kCAAW,CAAC,aAAa,CAAC,EAAE,iCAAU,CAAC,MAAM;IAC9C,CAAC,kCAAW,CAAC,aAAa,CAAC,EAAE,iCAAU,CAAC,MAAM;IAC9C,CAAC,kCAAW,CAAC,eAAe,CAAC,EAAE,iCAAU,CAAC,IAAI;CAC/C,CAAC","sourcesContent":["import { FontWeight, TextVariant } from '@metamask-previews/design-system-shared';\n\n// Mappings\nexport const TWCLASSMAP_TEXT_FONTWEIGHT: {\n [key in FontWeight]: string;\n} = {\n [FontWeight.Regular]: '-regular',\n [FontWeight.Medium]: '-medium',\n [FontWeight.Bold]: '-bold',\n};\n\nexport const MAP_TEXT_VARIANT_FONTWEIGHT: {\n [key in TextVariant]: FontWeight;\n} = {\n [TextVariant.DisplayLg]: FontWeight.Bold,\n [TextVariant.DisplayMd]: FontWeight.Bold,\n [TextVariant.HeadingLg]: FontWeight.Bold,\n [TextVariant.HeadingMd]: FontWeight.Bold,\n [TextVariant.HeadingSm]: FontWeight.Bold,\n [TextVariant.BodyLg]: FontWeight.Medium,\n [TextVariant.BodyMd]: FontWeight.Regular,\n [TextVariant.BodySm]: FontWeight.Regular,\n [TextVariant.BodyXs]: FontWeight.Regular,\n [TextVariant.PageHeading]: FontWeight.Bold,\n [TextVariant.SectionHeading]: FontWeight.Bold,\n [TextVariant.ButtonLabelMd]: FontWeight.Medium,\n [TextVariant.ButtonLabelLg]: FontWeight.Medium,\n [TextVariant.AmountDisplayLg]: FontWeight.Bold,\n};\n"]}
@@ -1,4 +1,4 @@
1
- import { FontWeight, TextVariant } from "../../types/index.cjs";
1
+ import { FontWeight, TextVariant } from "@metamask-previews/design-system-shared";
2
2
  export declare const TWCLASSMAP_TEXT_FONTWEIGHT: {
3
3
  [key in FontWeight]: string;
4
4
  };
@@ -1 +1 @@
1
- {"version":3,"file":"Text.constants.d.cts","sourceRoot":"","sources":["../../../src/components/Text/Text.constants.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,8BAAoB;AAGtD,eAAO,MAAM,0BAA0B,EAAE;KACtC,GAAG,IAAI,UAAU,GAAG,MAAM;CAK5B,CAAC;AAEF,eAAO,MAAM,2BAA2B,EAAE;KACvC,GAAG,IAAI,WAAW,GAAG,UAAU;CAoBjC,CAAC"}
1
+ {"version":3,"file":"Text.constants.d.cts","sourceRoot":"","sources":["../../../src/components/Text/Text.constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,gDAAgD;AAGlF,eAAO,MAAM,0BAA0B,EAAE;KACtC,GAAG,IAAI,UAAU,GAAG,MAAM;CAK5B,CAAC;AAEF,eAAO,MAAM,2BAA2B,EAAE;KACvC,GAAG,IAAI,WAAW,GAAG,UAAU;CAgBjC,CAAC"}
@@ -1,4 +1,4 @@
1
- import { FontWeight, TextVariant } from "../../types/index.mjs";
1
+ import { FontWeight, TextVariant } from "@metamask-previews/design-system-shared";
2
2
  export declare const TWCLASSMAP_TEXT_FONTWEIGHT: {
3
3
  [key in FontWeight]: string;
4
4
  };
@@ -1 +1 @@
1
- {"version":3,"file":"Text.constants.d.mts","sourceRoot":"","sources":["../../../src/components/Text/Text.constants.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,8BAAoB;AAGtD,eAAO,MAAM,0BAA0B,EAAE;KACtC,GAAG,IAAI,UAAU,GAAG,MAAM;CAK5B,CAAC;AAEF,eAAO,MAAM,2BAA2B,EAAE;KACvC,GAAG,IAAI,WAAW,GAAG,UAAU;CAoBjC,CAAC"}
1
+ {"version":3,"file":"Text.constants.d.mts","sourceRoot":"","sources":["../../../src/components/Text/Text.constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,gDAAgD;AAGlF,eAAO,MAAM,0BAA0B,EAAE;KACtC,GAAG,IAAI,UAAU,GAAG,MAAM;CAK5B,CAAC;AAEF,eAAO,MAAM,2BAA2B,EAAE;KACvC,GAAG,IAAI,WAAW,GAAG,UAAU;CAgBjC,CAAC"}
@@ -1,5 +1,4 @@
1
- import { typography } from "@metamask-previews/design-tokens";
2
- import { FontWeight, TextVariant } from "../../types/index.mjs";
1
+ import { FontWeight, TextVariant } from "@metamask-previews/design-system-shared";
3
2
  // Mappings
4
3
  export const TWCLASSMAP_TEXT_FONTWEIGHT = {
5
4
  [FontWeight.Regular]: '-regular',
@@ -7,23 +6,19 @@ export const TWCLASSMAP_TEXT_FONTWEIGHT = {
7
6
  [FontWeight.Bold]: '-bold',
8
7
  };
9
8
  export const MAP_TEXT_VARIANT_FONTWEIGHT = {
10
- [TextVariant.DisplayLg]: typography.sDisplayLG.fontWeight,
11
- [TextVariant.DisplayMd]: typography.sDisplayMD.fontWeight,
12
- [TextVariant.HeadingLg]: typography.sHeadingLG.fontWeight,
13
- [TextVariant.HeadingMd]: typography.sHeadingMD.fontWeight,
14
- [TextVariant.HeadingSm]: typography.sHeadingSM.fontWeight,
15
- [TextVariant.BodyLg]: typography.sBodyLGMedium.fontWeight,
16
- [TextVariant.BodyMd]: typography.sBodyMD.fontWeight,
17
- [TextVariant.BodySm]: typography.sBodySM.fontWeight,
18
- [TextVariant.BodyXs]: typography.sBodyXS.fontWeight,
19
- [TextVariant.PageHeading]: typography.sPageHeading.fontWeight,
20
- [TextVariant.SectionHeading]: typography.sSectionHeading
21
- .fontWeight,
22
- [TextVariant.ButtonLabelMd]: typography.sButtonLabelMd
23
- .fontWeight,
24
- [TextVariant.ButtonLabelLg]: typography.sButtonLabelLg
25
- .fontWeight,
26
- [TextVariant.AmountDisplayLg]: typography.sAmountDisplayLg
27
- .fontWeight,
9
+ [TextVariant.DisplayLg]: FontWeight.Bold,
10
+ [TextVariant.DisplayMd]: FontWeight.Bold,
11
+ [TextVariant.HeadingLg]: FontWeight.Bold,
12
+ [TextVariant.HeadingMd]: FontWeight.Bold,
13
+ [TextVariant.HeadingSm]: FontWeight.Bold,
14
+ [TextVariant.BodyLg]: FontWeight.Medium,
15
+ [TextVariant.BodyMd]: FontWeight.Regular,
16
+ [TextVariant.BodySm]: FontWeight.Regular,
17
+ [TextVariant.BodyXs]: FontWeight.Regular,
18
+ [TextVariant.PageHeading]: FontWeight.Bold,
19
+ [TextVariant.SectionHeading]: FontWeight.Bold,
20
+ [TextVariant.ButtonLabelMd]: FontWeight.Medium,
21
+ [TextVariant.ButtonLabelLg]: FontWeight.Medium,
22
+ [TextVariant.AmountDisplayLg]: FontWeight.Bold,
28
23
  };
29
24
  //# sourceMappingURL=Text.constants.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"Text.constants.mjs","sourceRoot":"","sources":["../../../src/components/Text/Text.constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,yCAAyC;AAE9D,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,8BAAoB;AAEtD,WAAW;AACX,MAAM,CAAC,MAAM,0BAA0B,GAEnC;IACF,CAAC,UAAU,CAAC,OAAO,CAAC,EAAE,UAAU;IAChC,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE,SAAS;IAC9B,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,OAAO;CAC3B,CAAC;AAEF,MAAM,CAAC,MAAM,2BAA2B,GAEpC;IACF,CAAC,WAAW,CAAC,SAAS,CAAC,EAAE,UAAU,CAAC,UAAU,CAAC,UAAwB;IACvE,CAAC,WAAW,CAAC,SAAS,CAAC,EAAE,UAAU,CAAC,UAAU,CAAC,UAAwB;IACvE,CAAC,WAAW,CAAC,SAAS,CAAC,EAAE,UAAU,CAAC,UAAU,CAAC,UAAwB;IACvE,CAAC,WAAW,CAAC,SAAS,CAAC,EAAE,UAAU,CAAC,UAAU,CAAC,UAAwB;IACvE,CAAC,WAAW,CAAC,SAAS,CAAC,EAAE,UAAU,CAAC,UAAU,CAAC,UAAwB;IACvE,CAAC,WAAW,CAAC,MAAM,CAAC,EAAE,UAAU,CAAC,aAAa,CAAC,UAAwB;IACvE,CAAC,WAAW,CAAC,MAAM,CAAC,EAAE,UAAU,CAAC,OAAO,CAAC,UAAwB;IACjE,CAAC,WAAW,CAAC,MAAM,CAAC,EAAE,UAAU,CAAC,OAAO,CAAC,UAAwB;IACjE,CAAC,WAAW,CAAC,MAAM,CAAC,EAAE,UAAU,CAAC,OAAO,CAAC,UAAwB;IACjE,CAAC,WAAW,CAAC,WAAW,CAAC,EAAE,UAAU,CAAC,YAAY,CAAC,UAAwB;IAC3E,CAAC,WAAW,CAAC,cAAc,CAAC,EAAE,UAAU,CAAC,eAAe;SACrD,UAAwB;IAC3B,CAAC,WAAW,CAAC,aAAa,CAAC,EAAE,UAAU,CAAC,cAAc;SACnD,UAAwB;IAC3B,CAAC,WAAW,CAAC,aAAa,CAAC,EAAE,UAAU,CAAC,cAAc;SACnD,UAAwB;IAC3B,CAAC,WAAW,CAAC,eAAe,CAAC,EAAE,UAAU,CAAC,gBAAgB;SACvD,UAAwB;CAC5B,CAAC","sourcesContent":["import { typography } from '@metamask-previews/design-tokens';\n\nimport { FontWeight, TextVariant } from '../../types';\n\n// Mappings\nexport const TWCLASSMAP_TEXT_FONTWEIGHT: {\n [key in FontWeight]: string;\n} = {\n [FontWeight.Regular]: '-regular',\n [FontWeight.Medium]: '-medium',\n [FontWeight.Bold]: '-bold',\n};\n\nexport const MAP_TEXT_VARIANT_FONTWEIGHT: {\n [key in TextVariant]: FontWeight;\n} = {\n [TextVariant.DisplayLg]: typography.sDisplayLG.fontWeight as FontWeight,\n [TextVariant.DisplayMd]: typography.sDisplayMD.fontWeight as FontWeight,\n [TextVariant.HeadingLg]: typography.sHeadingLG.fontWeight as FontWeight,\n [TextVariant.HeadingMd]: typography.sHeadingMD.fontWeight as FontWeight,\n [TextVariant.HeadingSm]: typography.sHeadingSM.fontWeight as FontWeight,\n [TextVariant.BodyLg]: typography.sBodyLGMedium.fontWeight as FontWeight,\n [TextVariant.BodyMd]: typography.sBodyMD.fontWeight as FontWeight,\n [TextVariant.BodySm]: typography.sBodySM.fontWeight as FontWeight,\n [TextVariant.BodyXs]: typography.sBodyXS.fontWeight as FontWeight,\n [TextVariant.PageHeading]: typography.sPageHeading.fontWeight as FontWeight,\n [TextVariant.SectionHeading]: typography.sSectionHeading\n .fontWeight as FontWeight,\n [TextVariant.ButtonLabelMd]: typography.sButtonLabelMd\n .fontWeight as FontWeight,\n [TextVariant.ButtonLabelLg]: typography.sButtonLabelLg\n .fontWeight as FontWeight,\n [TextVariant.AmountDisplayLg]: typography.sAmountDisplayLg\n .fontWeight as FontWeight,\n};\n"]}
1
+ {"version":3,"file":"Text.constants.mjs","sourceRoot":"","sources":["../../../src/components/Text/Text.constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,gDAAgD;AAElF,WAAW;AACX,MAAM,CAAC,MAAM,0BAA0B,GAEnC;IACF,CAAC,UAAU,CAAC,OAAO,CAAC,EAAE,UAAU;IAChC,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE,SAAS;IAC9B,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,OAAO;CAC3B,CAAC;AAEF,MAAM,CAAC,MAAM,2BAA2B,GAEpC;IACF,CAAC,WAAW,CAAC,SAAS,CAAC,EAAE,UAAU,CAAC,IAAI;IACxC,CAAC,WAAW,CAAC,SAAS,CAAC,EAAE,UAAU,CAAC,IAAI;IACxC,CAAC,WAAW,CAAC,SAAS,CAAC,EAAE,UAAU,CAAC,IAAI;IACxC,CAAC,WAAW,CAAC,SAAS,CAAC,EAAE,UAAU,CAAC,IAAI;IACxC,CAAC,WAAW,CAAC,SAAS,CAAC,EAAE,UAAU,CAAC,IAAI;IACxC,CAAC,WAAW,CAAC,MAAM,CAAC,EAAE,UAAU,CAAC,MAAM;IACvC,CAAC,WAAW,CAAC,MAAM,CAAC,EAAE,UAAU,CAAC,OAAO;IACxC,CAAC,WAAW,CAAC,MAAM,CAAC,EAAE,UAAU,CAAC,OAAO;IACxC,CAAC,WAAW,CAAC,MAAM,CAAC,EAAE,UAAU,CAAC,OAAO;IACxC,CAAC,WAAW,CAAC,WAAW,CAAC,EAAE,UAAU,CAAC,IAAI;IAC1C,CAAC,WAAW,CAAC,cAAc,CAAC,EAAE,UAAU,CAAC,IAAI;IAC7C,CAAC,WAAW,CAAC,aAAa,CAAC,EAAE,UAAU,CAAC,MAAM;IAC9C,CAAC,WAAW,CAAC,aAAa,CAAC,EAAE,UAAU,CAAC,MAAM;IAC9C,CAAC,WAAW,CAAC,eAAe,CAAC,EAAE,UAAU,CAAC,IAAI;CAC/C,CAAC","sourcesContent":["import { FontWeight, TextVariant } from '@metamask-previews/design-system-shared';\n\n// Mappings\nexport const TWCLASSMAP_TEXT_FONTWEIGHT: {\n [key in FontWeight]: string;\n} = {\n [FontWeight.Regular]: '-regular',\n [FontWeight.Medium]: '-medium',\n [FontWeight.Bold]: '-bold',\n};\n\nexport const MAP_TEXT_VARIANT_FONTWEIGHT: {\n [key in TextVariant]: FontWeight;\n} = {\n [TextVariant.DisplayLg]: FontWeight.Bold,\n [TextVariant.DisplayMd]: FontWeight.Bold,\n [TextVariant.HeadingLg]: FontWeight.Bold,\n [TextVariant.HeadingMd]: FontWeight.Bold,\n [TextVariant.HeadingSm]: FontWeight.Bold,\n [TextVariant.BodyLg]: FontWeight.Medium,\n [TextVariant.BodyMd]: FontWeight.Regular,\n [TextVariant.BodySm]: FontWeight.Regular,\n [TextVariant.BodyXs]: FontWeight.Regular,\n [TextVariant.PageHeading]: FontWeight.Bold,\n [TextVariant.SectionHeading]: FontWeight.Bold,\n [TextVariant.ButtonLabelMd]: FontWeight.Medium,\n [TextVariant.ButtonLabelLg]: FontWeight.Medium,\n [TextVariant.AmountDisplayLg]: FontWeight.Bold,\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"Text.d.cts","sourceRoot":"","sources":["../../../src/components/Text/Text.tsx"],"names":[],"mappings":"AACA,OAAO,KAAkB,cAAc;AASvC,OAAO,KAAK,EAAE,SAAS,EAAE,yBAAqB;AAE9C,eAAO,MAAM,IAAI,EAAE,KAAK,CAAC,EAAE,CAAC,SAAS,CA4BpC,CAAC"}
1
+ {"version":3,"file":"Text.d.cts","sourceRoot":"","sources":["../../../src/components/Text/Text.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAkB,cAAc;AAOvC,OAAO,KAAK,EAAE,SAAS,EAAE,yBAAqB;AAE9C,eAAO,MAAM,IAAI,EAAE,KAAK,CAAC,EAAE,CAAC,SAAS,CA4BpC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"Text.d.mts","sourceRoot":"","sources":["../../../src/components/Text/Text.tsx"],"names":[],"mappings":"AACA,OAAO,KAAkB,cAAc;AASvC,OAAO,KAAK,EAAE,SAAS,EAAE,yBAAqB;AAE9C,eAAO,MAAM,IAAI,EAAE,KAAK,CAAC,EAAE,CAAC,SAAS,CA4BpC,CAAC"}
1
+ {"version":3,"file":"Text.d.mts","sourceRoot":"","sources":["../../../src/components/Text/Text.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAkB,cAAc;AAOvC,OAAO,KAAK,EAAE,SAAS,EAAE,yBAAqB;AAE9C,eAAO,MAAM,IAAI,EAAE,KAAK,CAAC,EAAE,CAAC,SAAS,CA4BpC,CAAC"}
@@ -4,11 +4,11 @@ function $importDefault(module) {
4
4
  }
5
5
  return module;
6
6
  }
7
+ import { FontFamily, FontStyle, TextColor, TextVariant } from "@metamask-previews/design-system-shared";
7
8
  import { useTailwind } from "@metamask-previews/design-system-twrnc-preset";
8
9
  import $React, { useMemo } from "react";
9
10
  const React = $importDefault($React);
10
11
  import { Text as RNText } from "react-native/index.js";
11
- import { FontFamily, FontStyle, TextVariant, TextColor } from "../../types/index.mjs";
12
12
  import { MAP_TEXT_VARIANT_FONTWEIGHT, TWCLASSMAP_TEXT_FONTWEIGHT } from "./Text.constants.mjs";
13
13
  export const Text = ({ variant = TextVariant.BodyMd, color = TextColor.TextDefault, style, children, fontWeight, fontFamily = FontFamily.Default, fontStyle = FontStyle.Normal, twClassName, ...props }) => {
14
14
  const tw = useTailwind();
@@ -1 +1 @@
1
- {"version":3,"file":"Text.mjs","sourceRoot":"","sources":["../../../src/components/Text/Text.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,sDAAsD;AAC5E,OAAO,QAAO,EAAE,OAAO,EAAE,cAAc;;AACvC,OAAO,EAAE,IAAI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AAK,CAAC,CAAC,CACpE;MAAA,CAAC,QAAQ,CACX;IAAA,EAAE,MAAM,CAAC,CACV,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { useTailwind } from '@metamask-previews/design-system-twrnc-preset';\nimport React, { useMemo } from 'react';\nimport { Text as RNText } from 'react-native';\n\nimport { FontFamily, FontStyle, TextVariant, TextColor } from '../../types';\n\nimport {\n MAP_TEXT_VARIANT_FONTWEIGHT,\n TWCLASSMAP_TEXT_FONTWEIGHT,\n} from './Text.constants';\nimport type { TextProps } from './Text.types';\n\nexport const Text: React.FC<TextProps> = ({\n variant = TextVariant.BodyMd,\n color = TextColor.TextDefault,\n style,\n children,\n fontWeight,\n fontFamily = FontFamily.Default,\n fontStyle = FontStyle.Normal,\n twClassName,\n ...props\n}) => {\n const tw = useTailwind();\n const finalFontWeight = fontWeight ?? MAP_TEXT_VARIANT_FONTWEIGHT[variant];\n\n const textStyle = useMemo(() => {\n const isItalic = fontStyle === FontStyle.Italic;\n const fontSuffix = `${TWCLASSMAP_TEXT_FONTWEIGHT[finalFontWeight]}${\n isItalic && fontFamily === FontFamily.Default ? '-italic' : ''\n }`;\n const fontClass = `font-${fontFamily}${fontSuffix}`;\n return tw.style(`text-${variant}`, fontClass, color, twClassName);\n }, [variant, color, finalFontWeight, fontFamily, fontStyle, twClassName, tw]);\n\n return (\n <RNText accessibilityRole=\"text\" {...props} style={[textStyle, style]}>\n {children}\n </RNText>\n );\n};\n"]}
1
+ {"version":3,"file":"Text.mjs","sourceRoot":"","sources":["../../../src/components/Text/Text.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,EACL,UAAU,EACV,SAAS,EACT,SAAS,EACT,WAAW,EACZ,gDAAgD;AACjD,OAAO,EAAE,WAAW,EAAE,sDAAsD;AAC5E,OAAO,QAAO,EAAE,OAAO,EAAE,cAAc;;AACvC,OAAO,EAAE,IAAI,IAAI,MAAM,EAAE,8BAAqB;AAE9C,OAAO,EACL,2BAA2B,EAC3B,0BAA0B,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ariant,\n} from '@metamask-previews/design-system-shared';\nimport { useTailwind } from '@metamask-previews/design-system-twrnc-preset';\nimport React, { useMemo } from 'react';\nimport { Text as RNText } from 'react-native';\n\nimport {\n MAP_TEXT_VARIANT_FONTWEIGHT,\n TWCLASSMAP_TEXT_FONTWEIGHT,\n} from './Text.constants';\nimport type { TextProps } from './Text.types';\n\nexport const Text: React.FC<TextProps> = ({\n variant = TextVariant.BodyMd,\n color = TextColor.TextDefault,\n style,\n children,\n fontWeight,\n fontFamily = FontFamily.Default,\n fontStyle = FontStyle.Normal,\n twClassName,\n ...props\n}) => {\n const tw = useTailwind();\n const finalFontWeight = fontWeight ?? MAP_TEXT_VARIANT_FONTWEIGHT[variant];\n\n const textStyle = useMemo(() => {\n const isItalic = fontStyle === FontStyle.Italic;\n const fontSuffix = `${TWCLASSMAP_TEXT_FONTWEIGHT[finalFontWeight]}${\n isItalic && fontFamily === FontFamily.Default ? '-italic' : ''\n }`;\n const fontClass = `font-${fontFamily}${fontSuffix}`;\n return tw.style(`text-${variant}`, fontClass, color, twClassName);\n }, [variant, color, finalFontWeight, fontFamily, fontStyle, twClassName, tw]);\n\n return (\n <RNText accessibilityRole=\"text\" {...props} style={[textStyle, style]}>\n {children}\n </RNText>\n );\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"Text.types.cjs","sourceRoot":"","sources":["../../../src/components/Text/Text.types.ts"],"names":[],"mappings":"","sourcesContent":["// Third party dependencies.\nimport type { TextProps as RNTextProps } from 'react-native';\n\nimport type {\n TextVariant,\n TextColor,\n FontWeight,\n FontFamily,\n FontStyle,\n} from '../../types';\n\n/**\n * Text component props.\n */\nexport type TextProps = {\n /**\n * Optional enum to select between Typography variants.\n *\n * @default BodyMD\n */\n variant?: TextVariant;\n /**\n * Text to be displayed.\n */\n children: React.ReactNode;\n /**\n * Optional prop to add color to text.\n */\n color?: TextColor;\n /**\n * Optional prop to control the font weight of the text.\n * Normal: 400\n * Medium: 500\n * Bold: 600\n */\n fontWeight?: FontWeight;\n /**\n * Optional prop to adjust the font family.\n * Default: Geist\n * Accent: MM Sans\n * Hero: MM Poly\n */\n fontFamily?: FontFamily;\n /**\n * Optional prop to adjust the style of the font.\n */\n fontStyle?: FontStyle;\n /**\n * Optional prop to add twrnc overriding classNames.\n */\n twClassName?: string;\n} & RNTextProps;\n"]}
1
+ {"version":3,"file":"Text.types.cjs","sourceRoot":"","sources":["../../../src/components/Text/Text.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { TextPropsShared } from '@metamask-previews/design-system-shared';\nimport type { TextProps as RNTextProps } from 'react-native';\n\n/**\n * Text component props.\n */\nexport type TextProps = TextPropsShared &\n RNTextProps & {\n /**\n * Optional prop to add twrnc overriding classNames.\n */\n twClassName?: string;\n };\n"]}