@metamask-previews/design-system-react-native 0.16.0-preview.d854123 → 0.18.0-preview.9d477a9

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 (172) hide show
  1. package/CHANGELOG.md +21 -1
  2. package/dist/components/AvatarFavicon/AvatarFavicon.cjs +1 -2
  3. package/dist/components/AvatarFavicon/AvatarFavicon.cjs.map +1 -1
  4. package/dist/components/AvatarFavicon/AvatarFavicon.d.cts.map +1 -1
  5. package/dist/components/AvatarFavicon/AvatarFavicon.d.mts.map +1 -1
  6. package/dist/components/AvatarFavicon/AvatarFavicon.mjs +1 -2
  7. package/dist/components/AvatarFavicon/AvatarFavicon.mjs.map +1 -1
  8. package/dist/components/AvatarFavicon/AvatarFavicon.types.cjs.map +1 -1
  9. package/dist/components/AvatarFavicon/AvatarFavicon.types.d.cts +5 -7
  10. package/dist/components/AvatarFavicon/AvatarFavicon.types.d.cts.map +1 -1
  11. package/dist/components/AvatarFavicon/AvatarFavicon.types.d.mts +5 -7
  12. package/dist/components/AvatarFavicon/AvatarFavicon.types.d.mts.map +1 -1
  13. package/dist/components/AvatarFavicon/AvatarFavicon.types.mjs.map +1 -1
  14. package/dist/components/AvatarFavicon/index.cjs +2 -2
  15. package/dist/components/AvatarFavicon/index.cjs.map +1 -1
  16. package/dist/components/AvatarFavicon/index.d.cts +1 -1
  17. package/dist/components/AvatarFavicon/index.d.cts.map +1 -1
  18. package/dist/components/AvatarFavicon/index.d.mts +1 -1
  19. package/dist/components/AvatarFavicon/index.d.mts.map +1 -1
  20. package/dist/components/AvatarFavicon/index.mjs +1 -1
  21. package/dist/components/AvatarFavicon/index.mjs.map +1 -1
  22. package/dist/components/BannerBase/BannerBase.cjs +3 -3
  23. package/dist/components/BannerBase/BannerBase.cjs.map +1 -1
  24. package/dist/components/BannerBase/BannerBase.d.cts.map +1 -1
  25. package/dist/components/BannerBase/BannerBase.d.mts.map +1 -1
  26. package/dist/components/BannerBase/BannerBase.mjs +2 -2
  27. package/dist/components/BannerBase/BannerBase.mjs.map +1 -1
  28. package/dist/components/Checkbox/Checkbox.d.cts +1 -6
  29. package/dist/components/Checkbox/Checkbox.d.cts.map +1 -1
  30. package/dist/components/Checkbox/Checkbox.d.mts +1 -6
  31. package/dist/components/Checkbox/Checkbox.d.mts.map +1 -1
  32. package/dist/components/Checkbox/Checkbox.types.cjs.map +1 -1
  33. package/dist/components/Checkbox/Checkbox.types.d.cts +2 -28
  34. package/dist/components/Checkbox/Checkbox.types.d.cts.map +1 -1
  35. package/dist/components/Checkbox/Checkbox.types.d.mts +2 -28
  36. package/dist/components/Checkbox/Checkbox.types.d.mts.map +1 -1
  37. package/dist/components/Checkbox/Checkbox.types.mjs.map +1 -1
  38. package/dist/components/Icon/Icon.assets.cjs +281 -282
  39. package/dist/components/Icon/Icon.assets.cjs.map +1 -1
  40. package/dist/components/Icon/Icon.assets.d.cts.map +1 -1
  41. package/dist/components/Icon/Icon.assets.d.mts.map +1 -1
  42. package/dist/components/Icon/Icon.assets.mjs +281 -282
  43. package/dist/components/Icon/Icon.assets.mjs.map +1 -1
  44. package/dist/components/Icon/Icon.types.cjs.map +1 -1
  45. package/dist/components/Icon/Icon.types.d.cts +1 -18
  46. package/dist/components/Icon/Icon.types.d.cts.map +1 -1
  47. package/dist/components/Icon/Icon.types.d.mts +1 -18
  48. package/dist/components/Icon/Icon.types.d.mts.map +1 -1
  49. package/dist/components/Icon/Icon.types.mjs.map +1 -1
  50. package/dist/components/IconAlert/IconAlert.cjs +16 -0
  51. package/dist/components/IconAlert/IconAlert.cjs.map +1 -0
  52. package/dist/components/IconAlert/IconAlert.constants.cjs +23 -0
  53. package/dist/components/IconAlert/IconAlert.constants.cjs.map +1 -0
  54. package/dist/components/IconAlert/IconAlert.constants.d.cts +6 -0
  55. package/dist/components/IconAlert/IconAlert.constants.d.cts.map +1 -0
  56. package/dist/components/IconAlert/IconAlert.constants.d.mts +6 -0
  57. package/dist/components/IconAlert/IconAlert.constants.d.mts.map +1 -0
  58. package/dist/components/IconAlert/IconAlert.constants.mjs +20 -0
  59. package/dist/components/IconAlert/IconAlert.constants.mjs.map +1 -0
  60. package/dist/components/IconAlert/IconAlert.d.cts +7 -0
  61. package/dist/components/IconAlert/IconAlert.d.cts.map +1 -0
  62. package/dist/components/IconAlert/IconAlert.d.mts +7 -0
  63. package/dist/components/IconAlert/IconAlert.d.mts.map +1 -0
  64. package/dist/components/IconAlert/IconAlert.mjs +16 -0
  65. package/dist/components/IconAlert/IconAlert.mjs.map +1 -0
  66. package/dist/components/IconAlert/IconAlert.types.cjs +3 -0
  67. package/dist/components/IconAlert/IconAlert.types.cjs.map +1 -0
  68. package/dist/components/IconAlert/IconAlert.types.d.cts +4 -0
  69. package/dist/components/IconAlert/IconAlert.types.d.cts.map +1 -0
  70. package/dist/components/IconAlert/IconAlert.types.d.mts +4 -0
  71. package/dist/components/IconAlert/IconAlert.types.d.mts.map +1 -0
  72. package/dist/components/IconAlert/IconAlert.types.mjs +2 -0
  73. package/dist/components/IconAlert/IconAlert.types.mjs.map +1 -0
  74. package/dist/components/IconAlert/index.cjs +8 -0
  75. package/dist/components/IconAlert/index.cjs.map +1 -0
  76. package/dist/components/IconAlert/index.d.cts +4 -0
  77. package/dist/components/IconAlert/index.d.cts.map +1 -0
  78. package/dist/components/IconAlert/index.d.mts +4 -0
  79. package/dist/components/IconAlert/index.d.mts.map +1 -0
  80. package/dist/components/IconAlert/index.mjs +3 -0
  81. package/dist/components/IconAlert/index.mjs.map +1 -0
  82. package/dist/components/Input/Input.cjs +4 -4
  83. package/dist/components/Input/Input.cjs.map +1 -1
  84. package/dist/components/Input/Input.constants.cjs +15 -15
  85. package/dist/components/Input/Input.constants.cjs.map +1 -1
  86. package/dist/components/Input/Input.constants.d.cts +1 -1
  87. package/dist/components/Input/Input.constants.d.cts.map +1 -1
  88. package/dist/components/Input/Input.constants.d.mts +1 -1
  89. package/dist/components/Input/Input.constants.d.mts.map +1 -1
  90. package/dist/components/Input/Input.constants.mjs +1 -1
  91. package/dist/components/Input/Input.constants.mjs.map +1 -1
  92. package/dist/components/Input/Input.d.cts +1 -1
  93. package/dist/components/Input/Input.d.cts.map +1 -1
  94. package/dist/components/Input/Input.d.mts +1 -1
  95. package/dist/components/Input/Input.d.mts.map +1 -1
  96. package/dist/components/Input/Input.mjs +3 -3
  97. package/dist/components/Input/Input.mjs.map +1 -1
  98. package/dist/components/Input/Input.types.cjs.map +1 -1
  99. package/dist/components/Input/Input.types.d.cts +1 -1
  100. package/dist/components/Input/Input.types.d.cts.map +1 -1
  101. package/dist/components/Input/Input.types.d.mts +1 -1
  102. package/dist/components/Input/Input.types.d.mts.map +1 -1
  103. package/dist/components/Input/Input.types.mjs.map +1 -1
  104. package/dist/components/KeyValueColumn/KeyValueColumn.cjs +9 -8
  105. package/dist/components/KeyValueColumn/KeyValueColumn.cjs.map +1 -1
  106. package/dist/components/KeyValueColumn/KeyValueColumn.d.cts.map +1 -1
  107. package/dist/components/KeyValueColumn/KeyValueColumn.d.mts.map +1 -1
  108. package/dist/components/KeyValueColumn/KeyValueColumn.mjs +2 -1
  109. package/dist/components/KeyValueColumn/KeyValueColumn.mjs.map +1 -1
  110. package/dist/components/KeyValueRow/KeyValueRow.cjs +8 -8
  111. package/dist/components/KeyValueRow/KeyValueRow.cjs.map +1 -1
  112. package/dist/components/KeyValueRow/KeyValueRow.d.cts.map +1 -1
  113. package/dist/components/KeyValueRow/KeyValueRow.d.mts.map +1 -1
  114. package/dist/components/KeyValueRow/KeyValueRow.mjs +2 -2
  115. package/dist/components/KeyValueRow/KeyValueRow.mjs.map +1 -1
  116. package/dist/components/Text/Text.cjs +5 -5
  117. package/dist/components/Text/Text.cjs.map +1 -1
  118. package/dist/components/Text/Text.constants.cjs +20 -25
  119. package/dist/components/Text/Text.constants.cjs.map +1 -1
  120. package/dist/components/Text/Text.constants.d.cts +2 -2
  121. package/dist/components/Text/Text.constants.d.cts.map +1 -1
  122. package/dist/components/Text/Text.constants.d.mts +2 -2
  123. package/dist/components/Text/Text.constants.d.mts.map +1 -1
  124. package/dist/components/Text/Text.constants.mjs +16 -21
  125. package/dist/components/Text/Text.constants.mjs.map +1 -1
  126. package/dist/components/Text/Text.d.cts.map +1 -1
  127. package/dist/components/Text/Text.d.mts.map +1 -1
  128. package/dist/components/Text/Text.mjs +3 -3
  129. package/dist/components/Text/Text.mjs.map +1 -1
  130. package/dist/components/Text/Text.types.cjs.map +1 -1
  131. package/dist/components/Text/Text.types.d.cts +3 -35
  132. package/dist/components/Text/Text.types.d.cts.map +1 -1
  133. package/dist/components/Text/Text.types.d.mts +3 -35
  134. package/dist/components/Text/Text.types.d.mts.map +1 -1
  135. package/dist/components/Text/Text.types.mjs.map +1 -1
  136. package/dist/components/Text/index.cjs +7 -7
  137. package/dist/components/Text/index.cjs.map +1 -1
  138. package/dist/components/Text/index.d.cts +1 -1
  139. package/dist/components/Text/index.d.cts.map +1 -1
  140. package/dist/components/Text/index.d.mts +1 -1
  141. package/dist/components/Text/index.d.mts.map +1 -1
  142. package/dist/components/Text/index.mjs +1 -1
  143. package/dist/components/Text/index.mjs.map +1 -1
  144. package/dist/components/TextButton/TextButton.cjs +3 -3
  145. package/dist/components/TextButton/TextButton.cjs.map +1 -1
  146. package/dist/components/TextButton/TextButton.d.cts.map +1 -1
  147. package/dist/components/TextButton/TextButton.d.mts.map +1 -1
  148. package/dist/components/TextButton/TextButton.mjs +1 -1
  149. package/dist/components/TextButton/TextButton.mjs.map +1 -1
  150. package/dist/components/TextField/TextField.cjs +2 -2
  151. package/dist/components/TextField/TextField.cjs.map +1 -1
  152. package/dist/components/TextField/TextField.d.cts.map +1 -1
  153. package/dist/components/TextField/TextField.d.mts.map +1 -1
  154. package/dist/components/TextField/TextField.mjs +1 -1
  155. package/dist/components/TextField/TextField.mjs.map +1 -1
  156. package/dist/components/index.cjs +5 -2
  157. package/dist/components/index.cjs.map +1 -1
  158. package/dist/components/index.d.cts +2 -0
  159. package/dist/components/index.d.cts.map +1 -1
  160. package/dist/components/index.d.mts +2 -0
  161. package/dist/components/index.d.mts.map +1 -1
  162. package/dist/components/index.mjs +1 -0
  163. package/dist/components/index.mjs.map +1 -1
  164. package/dist/types/index.cjs +5 -118
  165. package/dist/types/index.cjs.map +1 -1
  166. package/dist/types/index.d.cts +0 -100
  167. package/dist/types/index.d.cts.map +1 -1
  168. package/dist/types/index.d.mts +0 -100
  169. package/dist/types/index.d.mts.map +1 -1
  170. package/dist/types/index.mjs +0 -109
  171. package/dist/types/index.mjs.map +1 -1
  172. package/package.json +5 -5
@@ -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
- const finalFontWeight = fontWeight ?? Text_constants_1.MAP_TEXT_VARIANT_FONTWEIGHT[variant];
34
+ const finalFontWeight = fontWeight ?? Text_constants_1.TWCLASSMAP_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,GACnB,UAAU,IAAI,mDAAkC,CAAC,OAAO,CAAC,CAAC;IAE5D,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;AA7BW,QAAA,IAAI,QA6Bf","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 TWCLASSMAP_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 =\n fontWeight ?? TWCLASSMAP_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
- 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");
3
+ exports.TWCLASSMAP_TEXT_VARIANT_FONTWEIGHT = exports.TWCLASSMAP_TEXT_FONTWEIGHT = void 0;
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
- 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,
11
+ exports.TWCLASSMAP_TEXT_VARIANT_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,kCAAkC,GAE3C;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 TWCLASSMAP_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,8 +1,8 @@
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
  };
5
- export declare const MAP_TEXT_VARIANT_FONTWEIGHT: {
5
+ export declare const TWCLASSMAP_TEXT_VARIANT_FONTWEIGHT: {
6
6
  [key in TextVariant]: FontWeight;
7
7
  };
8
8
  //# sourceMappingURL=Text.constants.d.cts.map
@@ -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,kCAAkC,EAAE;KAC9C,GAAG,IAAI,WAAW,GAAG,UAAU;CAgBjC,CAAC"}
@@ -1,8 +1,8 @@
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
  };
5
- export declare const MAP_TEXT_VARIANT_FONTWEIGHT: {
5
+ export declare const TWCLASSMAP_TEXT_VARIANT_FONTWEIGHT: {
6
6
  [key in TextVariant]: FontWeight;
7
7
  };
8
8
  //# sourceMappingURL=Text.constants.d.mts.map
@@ -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,kCAAkC,EAAE;KAC9C,GAAG,IAAI,WAAW,GAAG,UAAU;CAgBjC,CAAC"}
@@ -1,29 +1,24 @@
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',
6
5
  [FontWeight.Medium]: '-medium',
7
6
  [FontWeight.Bold]: '-bold',
8
7
  };
9
- 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,
8
+ export const TWCLASSMAP_TEXT_VARIANT_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,kCAAkC,GAE3C;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 TWCLASSMAP_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,CA6BpC,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,CA6BpC,CAAC"}
@@ -4,15 +4,15 @@ 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
- import { MAP_TEXT_VARIANT_FONTWEIGHT, TWCLASSMAP_TEXT_FONTWEIGHT } from "./Text.constants.mjs";
12
+ import { TWCLASSMAP_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();
15
- const finalFontWeight = fontWeight ?? MAP_TEXT_VARIANT_FONTWEIGHT[variant];
15
+ const finalFontWeight = fontWeight ?? TWCLASSMAP_TEXT_VARIANT_FONTWEIGHT[variant];
16
16
  const textStyle = useMemo(() => {
17
17
  const isItalic = fontStyle === FontStyle.Italic;
18
18
  const fontSuffix = `${TWCLASSMAP_TEXT_FONTWEIGHT[finalFontWeight]}${isItalic && fontFamily === FontFamily.Default ? '-italic' : ''}`;
@@ -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,IAAI,MAAM,EAAE,8BAAqB;AAE9C,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,WAAW,EAAE,SAAS,EAAE,8BAAoB;AAE5E,OAAO,EACL,2BAA2B,EAC3B,0BAA0B,EAC3B,6BAAyB;AAG1B,MAAM,CAAC,MAAM,IAAI,GAAwB,CAAC,EACxC,OAAO,GAAG,WAAW,CAAC,MAAM,EAC5B,KAAK,GAAG,SAAS,CAAC,WAAW,EAC7B,KAAK,EACL,QAAQ,EACR,UAAU,EACV,UAAU,GAAG,UAAU,CAAC,OAAO,EAC/B,SAAS,GAAG,SAAS,CAAC,MAAM,EAC5B,WAAW,EACX,GAAG,KAAK,EACT,EAAE,EAAE;IACH,MAAM,EAAE,GAAG,WAAW,EAAE,CAAC;IACzB,MAAM,eAAe,GAAG,UAAU,IAAI,2BAA2B,CAAC,OAAO,CAAC,CAAC;IAE3E,MAAM,SAAS,GAAG,OAAO,CAAC,GAAG,EAAE;QAC7B,MAAM,QAAQ,GAAG,SAAS,KAAK,SAAS,CAAC,MAAM,CAAC;QAChD,MAAM,UAAU,GAAG,GAAG,0BAA0B,CAAC,eAAe,CAAC,GAC/D,QAAQ,IAAI,UAAU,KAAK,UAAU,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,MAAM,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,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,kCAAkC,EAClC,0BAA0B,EAC3B,6BAAyB;AAG1B,MAAM,CAAC,MAAM,IAAI,GAAwB,CAAC,EACxC,OAAO,GAAG,WAAW,CAAC,MAAM,EAC5B,KAAK,GAAG,SAAS,CAAC,WAAW,EAC7B,KAAK,EACL,QAAQ,EACR,UAAU,EACV,UAAU,GAAG,UAAU,CAAC,OAAO,EAC/B,SAAS,GAAG,SAAS,CAAC,MAAM,EAC5B,WAAW,EACX,GAAG,KAAK,EACT,EAAE,EAAE;IACH,MAAM,EAAE,GAAG,WAAW,EAAE,CAAC;IACzB,MAAM,eAAe,GACnB,UAAU,IAAI,kCAAkC,CAAC,OAAO,CAAC,CAAC;IAE5D,MAAM,SAAS,GAAG,OAAO,CAAC,GAAG,EAAE;QAC7B,MAAM,QAAQ,GAAG,SAAS,KAAK,SAAS,CAAC,MAAM,CAAC;QAChD,MAAM,UAAU,GAAG,GAAG,0BAA0B,CAAC,eAAe,CAAC,GAC/D,QAAQ,IAAI,UAAU,KAAK,UAAU,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,MAAM,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,MAAM,CAAC,CACV,CAAC;AACJ,CAAC,CAAC","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 TWCLASSMAP_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 =\n fontWeight ?? TWCLASSMAP_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"]}
@@ -1,44 +1,12 @@
1
+ import type { TextPropsShared } from "@metamask-previews/design-system-shared";
1
2
  import type { TextProps as RNTextProps } from "react-native/index.js";
2
- import type { TextVariant, TextColor, FontWeight, FontFamily, FontStyle } from "../../types/index.cjs";
3
3
  /**
4
4
  * Text component props.
5
5
  */
6
- export type TextProps = {
7
- /**
8
- * Optional enum to select between Typography variants.
9
- *
10
- * @default BodyMD
11
- */
12
- variant?: TextVariant;
13
- /**
14
- * Text to be displayed.
15
- */
16
- children: React.ReactNode;
17
- /**
18
- * Optional prop to add color to text.
19
- */
20
- color?: TextColor;
21
- /**
22
- * Optional prop to control the font weight of the text.
23
- * Normal: 400
24
- * Medium: 500
25
- * Bold: 600
26
- */
27
- fontWeight?: FontWeight;
28
- /**
29
- * Optional prop to adjust the font family.
30
- * Default: Geist
31
- * Accent: MM Sans
32
- * Hero: MM Poly
33
- */
34
- fontFamily?: FontFamily;
35
- /**
36
- * Optional prop to adjust the style of the font.
37
- */
38
- fontStyle?: FontStyle;
6
+ export type TextProps = TextPropsShared & RNTextProps & {
39
7
  /**
40
8
  * Optional prop to add twrnc overriding classNames.
41
9
  */
42
10
  twClassName?: string;
43
- } & RNTextProps;
11
+ };
44
12
  //# sourceMappingURL=Text.types.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Text.types.d.cts","sourceRoot":"","sources":["../../../src/components/Text/Text.types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,IAAI,WAAW,EAAE,8BAAqB;AAE7D,OAAO,KAAK,EACV,WAAW,EACX,SAAS,EACT,UAAU,EACV,UAAU,EACV,SAAS,EACV,8BAAoB;AAErB;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG;IACtB;;;;OAIG;IACH,OAAO,CAAC,EAAE,WAAW,CAAC;IACtB;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;;;;OAKG;IACH,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB;;;;;OAKG;IACH,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB;;OAEG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,GAAG,WAAW,CAAC"}
1
+ {"version":3,"file":"Text.types.d.cts","sourceRoot":"","sources":["../../../src/components/Text/Text.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,gDAAgD;AAC/E,OAAO,KAAK,EAAE,SAAS,IAAI,WAAW,EAAE,8BAAqB;AAE7D;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG,eAAe,GACrC,WAAW,GAAG;IACZ;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC"}
@@ -1,44 +1,12 @@
1
+ import type { TextPropsShared } from "@metamask-previews/design-system-shared";
1
2
  import type { TextProps as RNTextProps } from "react-native/index.js";
2
- import type { TextVariant, TextColor, FontWeight, FontFamily, FontStyle } from "../../types/index.mjs";
3
3
  /**
4
4
  * Text component props.
5
5
  */
6
- export type TextProps = {
7
- /**
8
- * Optional enum to select between Typography variants.
9
- *
10
- * @default BodyMD
11
- */
12
- variant?: TextVariant;
13
- /**
14
- * Text to be displayed.
15
- */
16
- children: React.ReactNode;
17
- /**
18
- * Optional prop to add color to text.
19
- */
20
- color?: TextColor;
21
- /**
22
- * Optional prop to control the font weight of the text.
23
- * Normal: 400
24
- * Medium: 500
25
- * Bold: 600
26
- */
27
- fontWeight?: FontWeight;
28
- /**
29
- * Optional prop to adjust the font family.
30
- * Default: Geist
31
- * Accent: MM Sans
32
- * Hero: MM Poly
33
- */
34
- fontFamily?: FontFamily;
35
- /**
36
- * Optional prop to adjust the style of the font.
37
- */
38
- fontStyle?: FontStyle;
6
+ export type TextProps = TextPropsShared & RNTextProps & {
39
7
  /**
40
8
  * Optional prop to add twrnc overriding classNames.
41
9
  */
42
10
  twClassName?: string;
43
- } & RNTextProps;
11
+ };
44
12
  //# sourceMappingURL=Text.types.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Text.types.d.mts","sourceRoot":"","sources":["../../../src/components/Text/Text.types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,IAAI,WAAW,EAAE,8BAAqB;AAE7D,OAAO,KAAK,EACV,WAAW,EACX,SAAS,EACT,UAAU,EACV,UAAU,EACV,SAAS,EACV,8BAAoB;AAErB;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG;IACtB;;;;OAIG;IACH,OAAO,CAAC,EAAE,WAAW,CAAC;IACtB;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;;;;OAKG;IACH,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB;;;;;OAKG;IACH,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB;;OAEG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,GAAG,WAAW,CAAC"}
1
+ {"version":3,"file":"Text.types.d.mts","sourceRoot":"","sources":["../../../src/components/Text/Text.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,gDAAgD;AAC/E,OAAO,KAAK,EAAE,SAAS,IAAI,WAAW,EAAE,8BAAqB;AAE7D;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG,eAAe,GACrC,WAAW,GAAG;IACZ;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"Text.types.mjs","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.mjs","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"]}
@@ -1,12 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Text = exports.FontStyle = exports.FontFamily = exports.FontWeight = exports.TextColor = exports.TextVariant = void 0;
4
- var types_1 = require("../../types/index.cjs");
5
- Object.defineProperty(exports, "TextVariant", { enumerable: true, get: function () { return types_1.TextVariant; } });
6
- Object.defineProperty(exports, "TextColor", { enumerable: true, get: function () { return types_1.TextColor; } });
7
- Object.defineProperty(exports, "FontWeight", { enumerable: true, get: function () { return types_1.FontWeight; } });
8
- Object.defineProperty(exports, "FontFamily", { enumerable: true, get: function () { return types_1.FontFamily; } });
9
- Object.defineProperty(exports, "FontStyle", { enumerable: true, get: function () { return types_1.FontStyle; } });
3
+ exports.Text = exports.FontStyle = exports.FontFamily = exports.FontWeight = exports.TextVariant = exports.TextColor = void 0;
4
+ var design_system_shared_1 = require("@metamask-previews/design-system-shared");
5
+ Object.defineProperty(exports, "TextColor", { enumerable: true, get: function () { return design_system_shared_1.TextColor; } });
6
+ Object.defineProperty(exports, "TextVariant", { enumerable: true, get: function () { return design_system_shared_1.TextVariant; } });
7
+ Object.defineProperty(exports, "FontWeight", { enumerable: true, get: function () { return design_system_shared_1.FontWeight; } });
8
+ Object.defineProperty(exports, "FontFamily", { enumerable: true, get: function () { return design_system_shared_1.FontFamily; } });
9
+ Object.defineProperty(exports, "FontStyle", { enumerable: true, get: function () { return design_system_shared_1.FontStyle; } });
10
10
  var Text_1 = require("./Text.cjs");
11
11
  Object.defineProperty(exports, "Text", { enumerable: true, get: function () { return Text_1.Text; } });
12
12
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sourceRoot":"","sources":["../../../src/components/Text/index.ts"],"names":[],"mappings":";;;AAAA,+CAMqB;AALnB,oGAAA,WAAW,OAAA;AACX,kGAAA,SAAS,OAAA;AACT,mGAAA,UAAU,OAAA;AACV,mGAAA,UAAU,OAAA;AACV,kGAAA,SAAS,OAAA;AAEX,mCAA8B;AAArB,4FAAA,IAAI,OAAA","sourcesContent":["export {\n TextVariant,\n TextColor,\n FontWeight,\n FontFamily,\n FontStyle,\n} from '../../types';\nexport { Text } from './Text';\nexport type { TextProps } from './Text.types';\n"]}
1
+ {"version":3,"file":"index.cjs","sourceRoot":"","sources":["../../../src/components/Text/index.ts"],"names":[],"mappings":";;;AAAA,gFAOiD;AAN/C,iHAAA,SAAS,OAAA;AACT,mHAAA,WAAW,OAAA;AACX,kHAAA,UAAU,OAAA;AACV,kHAAA,UAAU,OAAA;AACV,iHAAA,SAAS,OAAA;AAGX,mCAA8B;AAArB,4FAAA,IAAI,OAAA","sourcesContent":["export {\n TextColor,\n TextVariant,\n FontWeight,\n FontFamily,\n FontStyle,\n type TextPropsShared,\n} from '@metamask-previews/design-system-shared';\nexport { Text } from './Text';\nexport type { TextProps } from './Text.types';\n"]}
@@ -1,4 +1,4 @@
1
- export { TextVariant, TextColor, FontWeight, FontFamily, FontStyle, } from "../../types/index.cjs";
1
+ export { TextColor, TextVariant, FontWeight, FontFamily, FontStyle, type TextPropsShared, } from "@metamask-previews/design-system-shared";
2
2
  export { Text } from "./Text.cjs";
3
3
  export type { TextProps } from "./Text.types.cjs";
4
4
  //# sourceMappingURL=index.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../../src/components/Text/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EACX,SAAS,EACT,UAAU,EACV,UAAU,EACV,SAAS,GACV,8BAAoB;AACrB,OAAO,EAAE,IAAI,EAAE,mBAAe;AAC9B,YAAY,EAAE,SAAS,EAAE,yBAAqB"}
1
+ {"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../../src/components/Text/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,WAAW,EACX,UAAU,EACV,UAAU,EACV,SAAS,EACT,KAAK,eAAe,GACrB,gDAAgD;AACjD,OAAO,EAAE,IAAI,EAAE,mBAAe;AAC9B,YAAY,EAAE,SAAS,EAAE,yBAAqB"}
@@ -1,4 +1,4 @@
1
- export { TextVariant, TextColor, FontWeight, FontFamily, FontStyle, } from "../../types/index.mjs";
1
+ export { TextColor, TextVariant, FontWeight, FontFamily, FontStyle, type TextPropsShared, } from "@metamask-previews/design-system-shared";
2
2
  export { Text } from "./Text.mjs";
3
3
  export type { TextProps } from "./Text.types.mjs";
4
4
  //# sourceMappingURL=index.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../src/components/Text/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EACX,SAAS,EACT,UAAU,EACV,UAAU,EACV,SAAS,GACV,8BAAoB;AACrB,OAAO,EAAE,IAAI,EAAE,mBAAe;AAC9B,YAAY,EAAE,SAAS,EAAE,yBAAqB"}
1
+ {"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../src/components/Text/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,WAAW,EACX,UAAU,EACV,UAAU,EACV,SAAS,EACT,KAAK,eAAe,GACrB,gDAAgD;AACjD,OAAO,EAAE,IAAI,EAAE,mBAAe;AAC9B,YAAY,EAAE,SAAS,EAAE,yBAAqB"}
@@ -1,3 +1,3 @@
1
- export { TextVariant, TextColor, FontWeight, FontFamily, FontStyle } from "../../types/index.mjs";
1
+ export { TextColor, TextVariant, FontWeight, FontFamily, FontStyle } from "@metamask-previews/design-system-shared";
2
2
  export { Text } from "./Text.mjs";
3
3
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../src/components/Text/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EACX,SAAS,EACT,UAAU,EACV,UAAU,EACV,SAAS,EACV,8BAAoB;AACrB,OAAO,EAAE,IAAI,EAAE,mBAAe","sourcesContent":["export {\n TextVariant,\n TextColor,\n FontWeight,\n FontFamily,\n FontStyle,\n} from '../../types';\nexport { Text } from './Text';\nexport type { TextProps } from './Text.types';\n"]}
1
+ {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../src/components/Text/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,WAAW,EACX,UAAU,EACV,UAAU,EACV,SAAS,EAEV,gDAAgD;AACjD,OAAO,EAAE,IAAI,EAAE,mBAAe","sourcesContent":["export {\n TextColor,\n TextVariant,\n FontWeight,\n FontFamily,\n FontStyle,\n type TextPropsShared,\n} from '@metamask-previews/design-system-shared';\nexport { Text } from './Text';\nexport type { TextProps } from './Text.types';\n"]}
@@ -24,10 +24,10 @@ var __importStar = (this && this.__importStar) || function (mod) {
24
24
  };
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
26
  exports.TextButton = void 0;
27
+ const design_system_shared_1 = require("@metamask-previews/design-system-shared");
27
28
  const react_1 = __importStar(require("react"));
28
- const types_1 = require("../../types/index.cjs");
29
29
  const Text_1 = require("../Text/index.cjs");
30
- const TextButton = ({ children, variant = types_1.TextVariant.BodyMd, fontWeight = Text_1.FontWeight.Medium, twClassName, accessibilityRole = 'link', onPress, onPressIn, onPressOut, suppressHighlighting = true, ...rest }) => {
30
+ const TextButton = ({ children, variant = design_system_shared_1.TextVariant.BodyMd, fontWeight = Text_1.FontWeight.Medium, twClassName, accessibilityRole = 'link', onPress, onPressIn, onPressOut, suppressHighlighting = true, ...rest }) => {
31
31
  const [pressed, setPressed] = (0, react_1.useState)(false);
32
32
  const handlePressIn = (e) => {
33
33
  setPressed(true);
@@ -37,7 +37,7 @@ const TextButton = ({ children, variant = types_1.TextVariant.BodyMd, fontWeight
37
37
  setPressed(false);
38
38
  onPressOut?.(e);
39
39
  };
40
- return (<Text_1.Text {...rest} accessibilityRole={accessibilityRole} variant={variant} fontWeight={fontWeight} color={pressed ? types_1.TextColor.PrimaryDefaultPressed : types_1.TextColor.PrimaryDefault} twClassName={twClassName} onPress={onPress} onPressIn={handlePressIn} onPressOut={handlePressOut} suppressHighlighting={suppressHighlighting}>
40
+ return (<Text_1.Text {...rest} accessibilityRole={accessibilityRole} variant={variant} fontWeight={fontWeight} color={pressed ? design_system_shared_1.TextColor.PrimaryDefaultPressed : design_system_shared_1.TextColor.PrimaryDefault} twClassName={twClassName} onPress={onPress} onPressIn={handlePressIn} onPressOut={handlePressOut} suppressHighlighting={suppressHighlighting}>
41
41
  {children}
42
42
  </Text_1.Text>);
43
43
  };
@@ -1 +1 @@
1
- {"version":3,"file":"TextButton.cjs","sourceRoot":"","sources":["../../../src/components/TextButton/TextButton.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAwC;AAExC,iDAAqD;AACrD,4CAA2C;AAIpC,MAAM,UAAU,GAA8B,CAAC,EACpD,QAAQ,EACR,OAAO,GAAG,mBAAW,CAAC,MAAM,EAC5B,UAAU,GAAG,iBAAU,CAAC,MAAM,EAC9B,WAAW,EACX,iBAAiB,GAAG,MAAM,EAC1B,OAAO,EACP,SAAS,EACT,UAAU,EACV,oBAAoB,GAAG,IAAI,EAC3B,GAAG,IAAI,EACR,EAAE,EAAE;IACH,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,IAAA,gBAAQ,EAAC,KAAK,CAAC,CAAC;IAE9C,MAAM,aAAa,GAA8C,CAAC,CAAC,EAAE,EAAE;QACrE,UAAU,CAAC,IAAI,CAAC,CAAC;QACjB,SAAS,EAAE,CAAC,CAAC,CAAC,CAAC;IACjB,CAAC,CAAC;IAEF,MAAM,cAAc,GAA+C,CAAC,CAAC,EAAE,EAAE;QACvE,UAAU,CAAC,KAAK,CAAC,CAAC;QAClB,UAAU,EAAE,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC,CAAC;IAEF,OAAO,CACL,CAAC,WAAI,CACH,IAAI,IAAI,CAAC,CACT,iBAAiB,CAAC,CAAC,iBAAiB,CAAC,CACrC,OAAO,CAAC,CAAC,OAAO,CAAC,CACjB,UAAU,CAAC,CAAC,UAAU,CAAC,CACvB,KAAK,CAAC,CACJ,OAAO,CAAC,CAAC,CAAC,iBAAS,CAAC,qBAAqB,CAAC,CAAC,CAAC,iBAAS,CAAC,cAAc,CACrE,CACD,WAAW,CAAC,CAAC,WAAW,CAAC,CACzB,OAAO,CAAC,CAAC,OAAO,CAAC,CACjB,SAAS,CAAC,CAAC,aAAa,CAAC,CACzB,UAAU,CAAC,CAAC,cAAc,CAAC,CAC3B,oBAAoB,CAAC,CAAC,oBAAoB,CAAC,CAE3C;MAAA,CAAC,QAAQ,CACX;IAAA,EAAE,WAAI,CAAC,CACR,CAAC;AACJ,CAAC,CAAC;AA1CW,QAAA,UAAU,cA0CrB","sourcesContent":["import React, { useState } from 'react';\n\nimport { TextVariant, TextColor } from '../../types';\nimport { Text, FontWeight } from '../Text';\n\nimport type { TextButtonProps } from './TextButton.types';\n\nexport const TextButton: React.FC<TextButtonProps> = ({\n children,\n variant = TextVariant.BodyMd,\n fontWeight = FontWeight.Medium,\n twClassName,\n accessibilityRole = 'link',\n onPress,\n onPressIn,\n onPressOut,\n suppressHighlighting = true,\n ...rest\n}) => {\n const [pressed, setPressed] = useState(false);\n\n const handlePressIn: NonNullable<TextButtonProps['onPressIn']> = (e) => {\n setPressed(true);\n onPressIn?.(e);\n };\n\n const handlePressOut: NonNullable<TextButtonProps['onPressOut']> = (e) => {\n setPressed(false);\n onPressOut?.(e);\n };\n\n return (\n <Text\n {...rest}\n accessibilityRole={accessibilityRole}\n variant={variant}\n fontWeight={fontWeight}\n color={\n pressed ? TextColor.PrimaryDefaultPressed : TextColor.PrimaryDefault\n }\n twClassName={twClassName}\n onPress={onPress}\n onPressIn={handlePressIn}\n onPressOut={handlePressOut}\n suppressHighlighting={suppressHighlighting}\n >\n {children}\n </Text>\n );\n};\n"]}
1
+ {"version":3,"file":"TextButton.cjs","sourceRoot":"","sources":["../../../src/components/TextButton/TextButton.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kFAAiF;AACjF,+CAAwC;AAExC,4CAA2C;AAIpC,MAAM,UAAU,GAA8B,CAAC,EACpD,QAAQ,EACR,OAAO,GAAG,kCAAW,CAAC,MAAM,EAC5B,UAAU,GAAG,iBAAU,CAAC,MAAM,EAC9B,WAAW,EACX,iBAAiB,GAAG,MAAM,EAC1B,OAAO,EACP,SAAS,EACT,UAAU,EACV,oBAAoB,GAAG,IAAI,EAC3B,GAAG,IAAI,EACR,EAAE,EAAE;IACH,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,IAAA,gBAAQ,EAAC,KAAK,CAAC,CAAC;IAE9C,MAAM,aAAa,GAA8C,CAAC,CAAC,EAAE,EAAE;QACrE,UAAU,CAAC,IAAI,CAAC,CAAC;QACjB,SAAS,EAAE,CAAC,CAAC,CAAC,CAAC;IACjB,CAAC,CAAC;IAEF,MAAM,cAAc,GAA+C,CAAC,CAAC,EAAE,EAAE;QACvE,UAAU,CAAC,KAAK,CAAC,CAAC;QAClB,UAAU,EAAE,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC,CAAC;IAEF,OAAO,CACL,CAAC,WAAI,CACH,IAAI,IAAI,CAAC,CACT,iBAAiB,CAAC,CAAC,iBAAiB,CAAC,CACrC,OAAO,CAAC,CAAC,OAAO,CAAC,CACjB,UAAU,CAAC,CAAC,UAAU,CAAC,CACvB,KAAK,CAAC,CACJ,OAAO,CAAC,CAAC,CAAC,gCAAS,CAAC,qBAAqB,CAAC,CAAC,CAAC,gCAAS,CAAC,cAAc,CACrE,CACD,WAAW,CAAC,CAAC,WAAW,CAAC,CACzB,OAAO,CAAC,CAAC,OAAO,CAAC,CACjB,SAAS,CAAC,CAAC,aAAa,CAAC,CACzB,UAAU,CAAC,CAAC,cAAc,CAAC,CAC3B,oBAAoB,CAAC,CAAC,oBAAoB,CAAC,CAE3C;MAAA,CAAC,QAAQ,CACX;IAAA,EAAE,WAAI,CAAC,CACR,CAAC;AACJ,CAAC,CAAC;AA1CW,QAAA,UAAU,cA0CrB","sourcesContent":["import { TextColor, TextVariant } from '@metamask-previews/design-system-shared';\nimport React, { useState } from 'react';\n\nimport { Text, FontWeight } from '../Text';\n\nimport type { TextButtonProps } from './TextButton.types';\n\nexport const TextButton: React.FC<TextButtonProps> = ({\n children,\n variant = TextVariant.BodyMd,\n fontWeight = FontWeight.Medium,\n twClassName,\n accessibilityRole = 'link',\n onPress,\n onPressIn,\n onPressOut,\n suppressHighlighting = true,\n ...rest\n}) => {\n const [pressed, setPressed] = useState(false);\n\n const handlePressIn: NonNullable<TextButtonProps['onPressIn']> = (e) => {\n setPressed(true);\n onPressIn?.(e);\n };\n\n const handlePressOut: NonNullable<TextButtonProps['onPressOut']> = (e) => {\n setPressed(false);\n onPressOut?.(e);\n };\n\n return (\n <Text\n {...rest}\n accessibilityRole={accessibilityRole}\n variant={variant}\n fontWeight={fontWeight}\n color={\n pressed ? TextColor.PrimaryDefaultPressed : TextColor.PrimaryDefault\n }\n twClassName={twClassName}\n onPress={onPress}\n onPressIn={handlePressIn}\n onPressOut={handlePressOut}\n suppressHighlighting={suppressHighlighting}\n >\n {children}\n </Text>\n );\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"TextButton.d.cts","sourceRoot":"","sources":["../../../src/components/TextButton/TextButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,cAAc;AAKxC,OAAO,KAAK,EAAE,eAAe,EAAE,+BAA2B;AAE1D,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CA0ChD,CAAC"}
1
+ {"version":3,"file":"TextButton.d.cts","sourceRoot":"","sources":["../../../src/components/TextButton/TextButton.tsx"],"names":[],"mappings":"AACA,OAAO,KAAmB,cAAc;AAIxC,OAAO,KAAK,EAAE,eAAe,EAAE,+BAA2B;AAE1D,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CA0ChD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"TextButton.d.mts","sourceRoot":"","sources":["../../../src/components/TextButton/TextButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,cAAc;AAKxC,OAAO,KAAK,EAAE,eAAe,EAAE,+BAA2B;AAE1D,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CA0ChD,CAAC"}
1
+ {"version":3,"file":"TextButton.d.mts","sourceRoot":"","sources":["../../../src/components/TextButton/TextButton.tsx"],"names":[],"mappings":"AACA,OAAO,KAAmB,cAAc;AAIxC,OAAO,KAAK,EAAE,eAAe,EAAE,+BAA2B;AAE1D,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CA0ChD,CAAC"}
@@ -4,9 +4,9 @@ function $importDefault(module) {
4
4
  }
5
5
  return module;
6
6
  }
7
+ import { TextColor, TextVariant } from "@metamask-previews/design-system-shared";
7
8
  import $React, { useState } from "react";
8
9
  const React = $importDefault($React);
9
- import { TextVariant, TextColor } from "../../types/index.mjs";
10
10
  import { Text, FontWeight } from "../Text/index.mjs";
11
11
  export const TextButton = ({ children, variant = TextVariant.BodyMd, fontWeight = FontWeight.Medium, twClassName, accessibilityRole = 'link', onPress, onPressIn, onPressOut, suppressHighlighting = true, ...rest }) => {
12
12
  const [pressed, setPressed] = useState(false);
@@ -1 +1 @@
1
- {"version":3,"file":"TextButton.mjs","sourceRoot":"","sources":["../../../src/components/TextButton/TextButton.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,QAAO,EAAE,QAAQ,EAAE,cAAc;;AAExC,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,8BAAoB;AACrD,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,0BAAgB;AAI3C,MAAM,CAAC,MAAM,UAAU,GAA8B,CAAC,EACpD,QAAQ,EACR,OAAO,GAAG,WAAW,CAAC,MAAM,EAC5B,UAAU,GAAG,UAAU,CAAC,MAAM,EAC9B,WAAW,EACX,iBAAiB,GAAG,MAAM,EAC1B,OAAO,EACP,SAAS,EACT,UAAU,EACV,oBAAoB,GAAG,IAAI,EAC3B,GAAG,IAAI,EACR,EAAE,EAAE;IACH,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAE9C,MAAM,aAAa,GAA8C,CAAC,CAAC,EAAE,EAAE;QACrE,UAAU,CAAC,IAAI,CAAC,CAAC;QACjB,SAAS,EAAE,CAAC,CAAC,CAAC,CAAC;IACjB,CAAC,CAAC;IAEF,MAAM,cAAc,GAA+C,CAAC,CAAC,EAAE,EAAE;QACvE,UAAU,CAAC,KAAK,CAAC,CAAC;QAClB,UAAU,EAAE,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC,CAAC;IAEF,OAAO,CACL,CAAC,IAAI,CACH,IAAI,IAAI,CAAC,CACT,iBAAiB,CAAC,CAAC,iBAAiB,CAAC,CACrC,OAAO,CAAC,CAAC,OAAO,CAAC,CACjB,UAAU,CAAC,CAAC,UAAU,CAAC,CACvB,KAAK,CAAC,CACJ,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,qBAAqB,CAAC,CAAC,CAAC,SAAS,CAAC,cAAc,CACrE,CACD,WAAW,CAAC,CAAC,WAAW,CAAC,CACzB,OAAO,CAAC,CAAC,OAAO,CAAC,CACjB,SAAS,CAAC,CAAC,aAAa,CAAC,CACzB,UAAU,CAAC,CAAC,cAAc,CAAC,CAC3B,oBAAoB,CAAC,CAAC,oBAAoB,CAAC,CAE3C;MAAA,CAAC,QAAQ,CACX;IAAA,EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import React, { useState } from 'react';\n\nimport { TextVariant, TextColor } from '../../types';\nimport { Text, FontWeight } from '../Text';\n\nimport type { TextButtonProps } from './TextButton.types';\n\nexport const TextButton: React.FC<TextButtonProps> = ({\n children,\n variant = TextVariant.BodyMd,\n fontWeight = FontWeight.Medium,\n twClassName,\n accessibilityRole = 'link',\n onPress,\n onPressIn,\n onPressOut,\n suppressHighlighting = true,\n ...rest\n}) => {\n const [pressed, setPressed] = useState(false);\n\n const handlePressIn: NonNullable<TextButtonProps['onPressIn']> = (e) => {\n setPressed(true);\n onPressIn?.(e);\n };\n\n const handlePressOut: NonNullable<TextButtonProps['onPressOut']> = (e) => {\n setPressed(false);\n onPressOut?.(e);\n };\n\n return (\n <Text\n {...rest}\n accessibilityRole={accessibilityRole}\n variant={variant}\n fontWeight={fontWeight}\n color={\n pressed ? TextColor.PrimaryDefaultPressed : TextColor.PrimaryDefault\n }\n twClassName={twClassName}\n onPress={onPress}\n onPressIn={handlePressIn}\n onPressOut={handlePressOut}\n suppressHighlighting={suppressHighlighting}\n >\n {children}\n </Text>\n );\n};\n"]}
1
+ {"version":3,"file":"TextButton.mjs","sourceRoot":"","sources":["../../../src/components/TextButton/TextButton.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,gDAAgD;AACjF,OAAO,QAAO,EAAE,QAAQ,EAAE,cAAc;;AAExC,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,0BAAgB;AAI3C,MAAM,CAAC,MAAM,UAAU,GAA8B,CAAC,EACpD,QAAQ,EACR,OAAO,GAAG,WAAW,CAAC,MAAM,EAC5B,UAAU,GAAG,UAAU,CAAC,MAAM,EAC9B,WAAW,EACX,iBAAiB,GAAG,MAAM,EAC1B,OAAO,EACP,SAAS,EACT,UAAU,EACV,oBAAoB,GAAG,IAAI,EAC3B,GAAG,IAAI,EACR,EAAE,EAAE;IACH,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAE9C,MAAM,aAAa,GAA8C,CAAC,CAAC,EAAE,EAAE;QACrE,UAAU,CAAC,IAAI,CAAC,CAAC;QACjB,SAAS,EAAE,CAAC,CAAC,CAAC,CAAC;IACjB,CAAC,CAAC;IAEF,MAAM,cAAc,GAA+C,CAAC,CAAC,EAAE,EAAE;QACvE,UAAU,CAAC,KAAK,CAAC,CAAC;QAClB,UAAU,EAAE,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC,CAAC;IAEF,OAAO,CACL,CAAC,IAAI,CACH,IAAI,IAAI,CAAC,CACT,iBAAiB,CAAC,CAAC,iBAAiB,CAAC,CACrC,OAAO,CAAC,CAAC,OAAO,CAAC,CACjB,UAAU,CAAC,CAAC,UAAU,CAAC,CACvB,KAAK,CAAC,CACJ,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,qBAAqB,CAAC,CAAC,CAAC,SAAS,CAAC,cAAc,CACrE,CACD,WAAW,CAAC,CAAC,WAAW,CAAC,CACzB,OAAO,CAAC,CAAC,OAAO,CAAC,CACjB,SAAS,CAAC,CAAC,aAAa,CAAC,CACzB,UAAU,CAAC,CAAC,cAAc,CAAC,CAC3B,oBAAoB,CAAC,CAAC,oBAAoB,CAAC,CAE3C;MAAA,CAAC,QAAQ,CACX;IAAA,EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { TextColor, TextVariant } from '@metamask-previews/design-system-shared';\nimport React, { useState } from 'react';\n\nimport { Text, FontWeight } from '../Text';\n\nimport type { TextButtonProps } from './TextButton.types';\n\nexport const TextButton: React.FC<TextButtonProps> = ({\n children,\n variant = TextVariant.BodyMd,\n fontWeight = FontWeight.Medium,\n twClassName,\n accessibilityRole = 'link',\n onPress,\n onPressIn,\n onPressOut,\n suppressHighlighting = true,\n ...rest\n}) => {\n const [pressed, setPressed] = useState(false);\n\n const handlePressIn: NonNullable<TextButtonProps['onPressIn']> = (e) => {\n setPressed(true);\n onPressIn?.(e);\n };\n\n const handlePressOut: NonNullable<TextButtonProps['onPressOut']> = (e) => {\n setPressed(false);\n onPressOut?.(e);\n };\n\n return (\n <Text\n {...rest}\n accessibilityRole={accessibilityRole}\n variant={variant}\n fontWeight={fontWeight}\n color={\n pressed ? TextColor.PrimaryDefaultPressed : TextColor.PrimaryDefault\n }\n twClassName={twClassName}\n onPress={onPress}\n onPressIn={handlePressIn}\n onPressOut={handlePressOut}\n suppressHighlighting={suppressHighlighting}\n >\n {children}\n </Text>\n );\n};\n"]}
@@ -1,10 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.TextField = void 0;
4
+ const design_system_shared_1 = require("@metamask-previews/design-system-shared");
4
5
  const design_system_twrnc_preset_1 = require("@metamask-previews/design-system-twrnc-preset");
5
6
  const react_1 = require("react");
6
7
  const react_native_1 = require("react-native/index.js");
7
- const types_1 = require("../../types/index.cjs");
8
8
  const Input_1 = require("../Input/index.cjs");
9
9
  function getContainerBorderColorClass(isDisabled, isFocused, isError) {
10
10
  if (isDisabled) {
@@ -45,7 +45,7 @@ exports.TextField = (0, react_1.forwardRef)(({ style, startAccessory, endAccesso
45
45
  return (<react_native_1.Pressable testID={testID} style={[containerStyle, style]} onPress={onPressHandler} accessible={false}>
46
46
  {startAccessory}
47
47
  <react_native_1.View style={tw.style('min-h-0 flex-1 justify-center')}>
48
- {inputElement ?? (<Input_1.Input {...props} ref={inputRef} textVariant={types_1.TextVariant.BodyMd} isDisabled={isDisabled} autoFocus={autoFocus} onBlur={onBlurHandler} onFocus={onFocusHandler} isStateStylesDisabled
48
+ {inputElement ?? (<Input_1.Input {...props} ref={inputRef} textVariant={design_system_shared_1.TextVariant.BodyMd} isDisabled={isDisabled} autoFocus={autoFocus} onBlur={onBlurHandler} onFocus={onFocusHandler} isStateStylesDisabled
49
49
  // Row is `h-12` (48px) with `border` on the Pressable (1px top + bottom). Inner TextInput
50
50
  // uses 46px height so the field matches a 48px-tall control without vertical overflow.
51
51
  twClassName="h-[46px] bg-transparent border-0" numberOfLines={1} multiline={false}/>)}