@metamask/design-system-twrnc-preset 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -7,6 +7,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.2.0]
11
+
12
+ ### Added
13
+
14
+ - Added classnames for 5 new text styles: page heading, section heading, button labels, and amount display ([#777](https://github.com/MetaMask/metamask-design-system/pull/777))
15
+ - Added functionality to improve developer experience with tailwind intellisense and linting for react native ([#783](https://github.com/MetaMask/metamask-design-system/pull/783))
16
+
10
17
  ## [0.1.0]
11
18
 
12
19
  ### Added
@@ -18,5 +25,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
18
25
  - MetaMask design token integration for React Native
19
26
  - TWRNC preset configuration with MetaMask styling utilities
20
27
 
21
- [Unreleased]: https://github.com/MetaMask/metamask-design-system/compare/@metamask/design-system-twrnc-preset@0.1.0...HEAD
28
+ [Unreleased]: https://github.com/MetaMask/metamask-design-system/compare/@metamask/design-system-twrnc-preset@0.2.0...HEAD
29
+ [0.2.0]: https://github.com/MetaMask/metamask-design-system/compare/@metamask/design-system-twrnc-preset@0.1.0...@metamask/design-system-twrnc-preset@0.2.0
22
30
  [0.1.0]: https://github.com/MetaMask/metamask-design-system/releases/tag/@metamask/design-system-twrnc-preset@0.1.0
package/README.md CHANGED
@@ -26,6 +26,101 @@ or
26
26
  npm install react@^18.2.0 react-native@0.72.15 twrnc@^4.5.1
27
27
  ```
28
28
 
29
+ ## Usage
30
+
31
+ ### Using the Theme Provider
32
+
33
+ ```tsx
34
+ import {
35
+ ThemeProvider,
36
+ Theme,
37
+ useTailwind,
38
+ } from '@metamask/design-system-twrnc-preset';
39
+
40
+ function App() {
41
+ return (
42
+ <ThemeProvider theme={Theme.Light}>
43
+ <MyComponent />
44
+ </ThemeProvider>
45
+ );
46
+ }
47
+
48
+ function MyComponent() {
49
+ const tw = useTailwind();
50
+
51
+ return (
52
+ <View style={tw`p-4 bg-background-default`}>
53
+ <Text style={tw`text-text-default text-heading-lg`}>
54
+ Hello MetaMask Design System!
55
+ </Text>
56
+ </View>
57
+ );
58
+ }
59
+ ```
60
+
61
+ ### Tailwind Config for IntelliSense
62
+
63
+ To get Tailwind IntelliSense and ESLint plugin support, use the config generator:
64
+
65
+ **TypeScript:**
66
+
67
+ ```typescript
68
+ // tailwind.config.ts
69
+ import {
70
+ generateTailwindConfig,
71
+ Theme,
72
+ } from '@metamask/design-system-twrnc-preset/tailwind.config';
73
+
74
+ export default {
75
+ content: ['./src/**/*.{js,jsx,ts,tsx}'],
76
+ ...generateTailwindConfig(Theme.Light),
77
+ };
78
+ ```
79
+
80
+ **JavaScript:**
81
+
82
+ ```javascript
83
+ // tailwind.config.js
84
+ const {
85
+ generateTailwindConfig,
86
+ Theme,
87
+ } = require('@metamask/design-system-twrnc-preset/tailwind.config');
88
+
89
+ module.exports = {
90
+ content: ['./src/**/*.{js,jsx,ts,tsx}'],
91
+ ...generateTailwindConfig(Theme.Light),
92
+ };
93
+ ```
94
+
95
+ **Custom content paths:**
96
+
97
+ ```typescript
98
+ // tailwind.config.ts
99
+ import {
100
+ generateTailwindConfig,
101
+ Theme,
102
+ } from '@metamask/design-system-twrnc-preset/tailwind.config';
103
+
104
+ export default {
105
+ content: [
106
+ './src/**/*.{js,jsx,ts,tsx}',
107
+ './app/**/*.{js,jsx,ts,tsx}',
108
+ './components/**/*.{js,jsx,ts,tsx}',
109
+ './screens/**/*.{js,jsx,ts,tsx}',
110
+ './lib/**/*.{js,jsx,ts,tsx}',
111
+ ],
112
+ ...generateTailwindConfig(Theme.Light),
113
+ };
114
+ ```
115
+
116
+ This provides:
117
+
118
+ - 🎨 **Full IntelliSense support** - Auto-completion for all design system classes
119
+ - 🔍 **ESLint integration** - Works with `eslint-plugin-tailwindcss`
120
+ - 🌙 **Theme agnostic** - Classnames work with both light and dark themes
121
+ - 📝 **Type safety** - TypeScript definitions for all design tokens
122
+ - ⚡ **Actual Design System Config** - Uses the same configuration as the TWRNC preset
123
+
29
124
  ## Contributing
30
125
 
31
126
  This package is part of a monorepo. Instructions for contributing can be found in the [monorepo README](https://github.com/MetaMask/metamask-design-system#readme).
package/dist/index.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.useTheme = exports.useTailwind = exports.Theme = exports.ThemeProvider = void 0;
3
+ exports.generateTailwindConfig = exports.useTheme = exports.useTailwind = exports.Theme = exports.ThemeProvider = void 0;
4
4
  // Provider and type
5
5
  var ThemeProvider_1 = require("./ThemeProvider.cjs");
6
6
  Object.defineProperty(exports, "ThemeProvider", { enumerable: true, get: function () { return ThemeProvider_1.ThemeProvider; } });
@@ -10,4 +10,7 @@ Object.defineProperty(exports, "Theme", { enumerable: true, get: function () { r
10
10
  var hooks_1 = require("./hooks.cjs");
11
11
  Object.defineProperty(exports, "useTailwind", { enumerable: true, get: function () { return hooks_1.useTailwind; } });
12
12
  Object.defineProperty(exports, "useTheme", { enumerable: true, get: function () { return hooks_1.useTheme; } });
13
+ // Config generation
14
+ var tailwind_config_1 = require("./tailwind.config.cjs");
15
+ Object.defineProperty(exports, "generateTailwindConfig", { enumerable: true, get: function () { return tailwind_config_1.generateTailwindConfig; } });
13
16
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,oBAAoB;AACpB,qDAAgD;AAAvC,8GAAA,aAAa,OAAA;AACtB,iDAAsC;AAA7B,oGAAA,KAAK,OAAA;AAEd,QAAQ;AACR,qCAAgD;AAAvC,oGAAA,WAAW,OAAA;AAAE,iGAAA,QAAQ,OAAA","sourcesContent":["// Provider and type\nexport { ThemeProvider } from './ThemeProvider';\nexport { Theme } from './Theme.types';\n\n// Hooks\nexport { useTailwind, useTheme } from './hooks';\n"]}
1
+ {"version":3,"file":"index.cjs","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,oBAAoB;AACpB,qDAAgD;AAAvC,8GAAA,aAAa,OAAA;AACtB,iDAAsC;AAA7B,oGAAA,KAAK,OAAA;AAEd,QAAQ;AACR,qCAAgD;AAAvC,oGAAA,WAAW,OAAA;AAAE,iGAAA,QAAQ,OAAA;AAE9B,oBAAoB;AACpB,yDAA2D;AAAlD,yHAAA,sBAAsB,OAAA","sourcesContent":["// Provider and type\nexport { ThemeProvider } from './ThemeProvider';\nexport { Theme } from './Theme.types';\n\n// Hooks\nexport { useTailwind, useTheme } from './hooks';\n\n// Config generation\nexport { generateTailwindConfig } from './tailwind.config';\n"]}
package/dist/index.d.cts CHANGED
@@ -1,4 +1,5 @@
1
1
  export { ThemeProvider } from "./ThemeProvider.cjs";
2
2
  export { Theme } from "./Theme.types.cjs";
3
3
  export { useTailwind, useTheme } from "./hooks.cjs";
4
+ export { generateTailwindConfig } from "./tailwind.config.cjs";
4
5
  //# sourceMappingURL=index.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,4BAAwB;AAChD,OAAO,EAAE,KAAK,EAAE,0BAAsB;AAGtC,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,oBAAgB"}
1
+ {"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,4BAAwB;AAChD,OAAO,EAAE,KAAK,EAAE,0BAAsB;AAGtC,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,oBAAgB;AAGhD,OAAO,EAAE,sBAAsB,EAAE,8BAA0B"}
package/dist/index.d.mts CHANGED
@@ -1,4 +1,5 @@
1
1
  export { ThemeProvider } from "./ThemeProvider.mjs";
2
2
  export { Theme } from "./Theme.types.mjs";
3
3
  export { useTailwind, useTheme } from "./hooks.mjs";
4
+ export { generateTailwindConfig } from "./tailwind.config.mjs";
4
5
  //# sourceMappingURL=index.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,4BAAwB;AAChD,OAAO,EAAE,KAAK,EAAE,0BAAsB;AAGtC,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,oBAAgB"}
1
+ {"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,4BAAwB;AAChD,OAAO,EAAE,KAAK,EAAE,0BAAsB;AAGtC,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,oBAAgB;AAGhD,OAAO,EAAE,sBAAsB,EAAE,8BAA0B"}
package/dist/index.mjs CHANGED
@@ -3,4 +3,6 @@ export { ThemeProvider } from "./ThemeProvider.mjs";
3
3
  export { Theme } from "./Theme.types.mjs";
4
4
  // Hooks
5
5
  export { useTailwind, useTheme } from "./hooks.mjs";
6
+ // Config generation
7
+ export { generateTailwindConfig } from "./tailwind.config.mjs";
6
8
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,oBAAoB;AACpB,OAAO,EAAE,aAAa,EAAE,4BAAwB;AAChD,OAAO,EAAE,KAAK,EAAE,0BAAsB;AAEtC,QAAQ;AACR,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,oBAAgB","sourcesContent":["// Provider and type\nexport { ThemeProvider } from './ThemeProvider';\nexport { Theme } from './Theme.types';\n\n// Hooks\nexport { useTailwind, useTheme } from './hooks';\n"]}
1
+ {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,oBAAoB;AACpB,OAAO,EAAE,aAAa,EAAE,4BAAwB;AAChD,OAAO,EAAE,KAAK,EAAE,0BAAsB;AAEtC,QAAQ;AACR,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,oBAAgB;AAEhD,oBAAoB;AACpB,OAAO,EAAE,sBAAsB,EAAE,8BAA0B","sourcesContent":["// Provider and type\nexport { ThemeProvider } from './ThemeProvider';\nexport { Theme } from './Theme.types';\n\n// Hooks\nexport { useTailwind, useTheme } from './hooks';\n\n// Config generation\nexport { generateTailwindConfig } from './tailwind.config';\n"]}
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.generateTailwindConfig = void 0;
3
+ exports.Theme = exports.generateTailwindConfig = void 0;
4
+ const design_tokens_1 = require("@metamask/design-tokens");
4
5
  const colors_1 = require("./colors.cjs");
5
6
  const typography_1 = require("./typography.cjs");
6
7
  /**
@@ -37,61 +38,65 @@ const extractColorsByPrefix = (colors, prefix) => {
37
38
  * @returns A Tailwind CSS configuration object with extended theme properties and plugins.
38
39
  */
39
40
  const generateTailwindConfig = (theme) => {
40
- const colors = colors_1.themeColors[theme];
41
- if (!colors) {
41
+ const designSystemColors = colors_1.themeColors[theme];
42
+ if (!designSystemColors) {
42
43
  console.error('Theme colors not found.');
43
44
  return {};
44
45
  }
46
+ // Essential colors that need to be available in all color properties
47
+ const essentialColors = {
48
+ inherit: 'inherit',
49
+ current: 'currentColor',
50
+ transparent: 'transparent',
51
+ black: design_tokens_1.brandColor.black,
52
+ white: design_tokens_1.brandColor.white,
53
+ };
54
+ // Combined colors object with essential colors and design system colors
55
+ const allColors = {
56
+ ...essentialColors,
57
+ ...designSystemColors,
58
+ };
45
59
  // Extract structured colors from the flattened colors
46
- const backgroundColors = extractColorsByPrefix(colors, 'background');
47
- const textColors = extractColorsByPrefix(colors, 'text');
48
- const borderColors = extractColorsByPrefix(colors, 'border');
60
+ const backgroundColors = extractColorsByPrefix(designSystemColors, 'background');
61
+ const textColors = extractColorsByPrefix(designSystemColors, 'text');
62
+ const borderColors = extractColorsByPrefix(designSystemColors, 'border');
49
63
  const config = {
50
64
  theme: {
51
- // Keep essential semantic colors, remove default palette colors to enforce use of design system components
52
- colors: {
53
- inherit: 'inherit',
54
- current: 'currentColor',
55
- transparent: 'transparent',
56
- black: '#000000',
57
- white: '#ffffff',
65
+ // Keep essential semantic colors, remove default palette colors.
66
+ // We want to rely on the colors provided by the design system preset
67
+ colors: allColors,
68
+ // This removes all default Tailwind font sizes and weights.
69
+ // We want to rely on the design system font sizes and enforce use of the Text component
70
+ textColor: {
71
+ ...allColors,
72
+ ...textColors, // e.g. text-default instead of text-text-default
73
+ },
74
+ backgroundColor: {
75
+ ...allColors,
76
+ ...backgroundColors, // e.g. bg-default instead of bg-background-default
77
+ },
78
+ borderColor: {
79
+ ...allColors,
80
+ ...borderColors, // e.g. border-default instead of border-border-default
58
81
  },
59
82
  fontSize: {
60
- // Empty to remove default Tailwind font sizes (text-sm, text-lg, etc.)
61
- // Design system font sizes added via extend
83
+ ...typography_1.typographyTailwindConfig.fontSize,
84
+ },
85
+ fontFamily: {
86
+ ...typography_1.typographyTailwindConfig.fontFamily,
87
+ },
88
+ letterSpacing: {
89
+ ...typography_1.typographyTailwindConfig.letterSpacing,
62
90
  },
63
- extend: {
64
- colors: {
65
- ...colors,
66
- },
67
- textColor: {
68
- ...colors,
69
- ...textColors, // e.g. text-default instead of text-text-default
70
- },
71
- backgroundColor: {
72
- ...colors,
73
- ...backgroundColors, // e.g. bg-default instead of bg-background-default
74
- },
75
- borderColor: {
76
- ...colors,
77
- ...borderColors, // e.g. border-default instead of border-border-default
78
- },
79
- fontSize: {
80
- ...typography_1.typographyTailwindConfig.fontSize,
81
- },
82
- fontFamily: {
83
- ...typography_1.typographyTailwindConfig.fontFamily,
84
- },
85
- letterSpacing: {
86
- ...typography_1.typographyTailwindConfig.letterSpacing,
87
- },
88
- lineHeight: {
89
- ...typography_1.typographyTailwindConfig.lineHeight,
90
- },
91
+ lineHeight: {
92
+ ...typography_1.typographyTailwindConfig.lineHeight,
91
93
  },
92
94
  },
93
95
  };
94
96
  return config;
95
97
  };
96
98
  exports.generateTailwindConfig = generateTailwindConfig;
99
+ // Export Theme enum for consumers
100
+ var Theme_types_1 = require("./Theme.types.cjs");
101
+ Object.defineProperty(exports, "Theme", { enumerable: true, get: function () { return Theme_types_1.Theme; } });
97
102
  //# sourceMappingURL=tailwind.config.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"tailwind.config.cjs","sourceRoot":"","sources":["../src/tailwind.config.ts"],"names":[],"mappings":";;;AAEA,yCAAuC;AAEvC,iDAAwD;AAExD;;;;;;;;;;;;;GAaG;AACH,MAAM,qBAAqB,GAAG,CAC5B,MAA8B,EAC9B,MAAc,EACd,EAAE;IACF,MAAM,SAAS,GAA2B,EAAE,CAAC;IAC7C,MAAM,cAAc,GAAG,GAAG,MAAM,GAAG,CAAC;IAEpC,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE;QAC9C,IAAI,GAAG,CAAC,UAAU,CAAC,cAAc,CAAC,EAAE;YAClC,MAAM,SAAS,GAAG,GAAG,CAAC,OAAO,CAAC,cAAc,EAAE,EAAE,CAAC,CAAC;YAClD,SAAS,CAAC,SAAS,CAAC,GAAG,KAAK,CAAC;SAC9B;IACH,CAAC,CAAC,CAAC;IAEH,OAAO,SAAS,CAAC;AACnB,CAAC,CAAC;AAEF;;;;;;;GAOG;AACI,MAAM,sBAAsB,GAAG,CAAC,KAAY,EAAY,EAAE;IAC/D,MAAM,MAAM,GAAG,oBAAW,CAAC,KAAK,CAAC,CAAC;IAElC,IAAI,CAAC,MAAM,EAAE;QACX,OAAO,CAAC,KAAK,CAAC,yBAAyB,CAAC,CAAC;QACzC,OAAO,EAAE,CAAC;KACX;IAED,sDAAsD;IACtD,MAAM,gBAAgB,GAAG,qBAAqB,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;IACrE,MAAM,UAAU,GAAG,qBAAqB,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACzD,MAAM,YAAY,GAAG,qBAAqB,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;IAE7D,MAAM,MAAM,GAAG;QACb,KAAK,EAAE;YACL,2GAA2G;YAC3G,MAAM,EAAE;gBACN,OAAO,EAAE,SAAS;gBAClB,OAAO,EAAE,cAAc;gBACvB,WAAW,EAAE,aAAa;gBAC1B,KAAK,EAAE,SAAS;gBAChB,KAAK,EAAE,SAAS;aACjB;YACD,QAAQ,EAAE;YACR,uEAAuE;YACvE,4CAA4C;aAC7C;YACD,MAAM,EAAE;gBACN,MAAM,EAAE;oBACN,GAAG,MAAM;iBACV;gBACD,SAAS,EAAE;oBACT,GAAG,MAAM;oBACT,GAAG,UAAU,EAAE,iDAAiD;iBACjE;gBACD,eAAe,EAAE;oBACf,GAAG,MAAM;oBACT,GAAG,gBAAgB,EAAE,mDAAmD;iBACzE;gBACD,WAAW,EAAE;oBACX,GAAG,MAAM;oBACT,GAAG,YAAY,EAAE,uDAAuD;iBACzE;gBACD,QAAQ,EAAE;oBACR,GAAG,qCAAwB,CAAC,QAAQ;iBACrC;gBACD,UAAU,EAAE;oBACV,GAAG,qCAAwB,CAAC,UAAU;iBACvC;gBACD,aAAa,EAAE;oBACb,GAAG,qCAAwB,CAAC,aAAa;iBAC1C;gBACD,UAAU,EAAE;oBACV,GAAG,qCAAwB,CAAC,UAAU;iBACvC;aACF;SACF;KACF,CAAC;IAEF,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC;AA5DW,QAAA,sBAAsB,0BA4DjC","sourcesContent":["import type { TwConfig } from 'twrnc';\n\nimport { themeColors } from './colors';\nimport type { Theme } from './Theme.types';\nimport { typographyTailwindConfig } from './typography';\n\n/**\n * Extracts colors by prefix from the flattened colors object and removes the prefix from keys.\n * This creates structured color objects that enable shorter Tailwind class names by removing\n * redundant prefixes (e.g., \"background-default\" becomes \"default\" for backgroundColor).\n *\n * @param colors - The flattened colors object containing all theme colors with kebab-case keys.\n * @param prefix - The prefix to extract colors for (e.g., 'background', 'text', 'border').\n * @returns A new object containing only colors matching the prefix, with the prefix removed from keys.\n *\n * @example\n * const colors = { 'background-default': '#fff', 'background-muted': '#eee', 'text-default': '#000' };\n * extractColorsByPrefix(colors, 'background');\n * // Returns: { 'default': '#fff', 'muted': '#eee' }\n */\nconst extractColorsByPrefix = (\n colors: Record<string, string>,\n prefix: string,\n) => {\n const extracted: Record<string, string> = {};\n const prefixWithDash = `${prefix}-`;\n\n Object.entries(colors).forEach(([key, value]) => {\n if (key.startsWith(prefixWithDash)) {\n const colorName = key.replace(prefixWithDash, '');\n extracted[colorName] = value;\n }\n });\n\n return extracted;\n};\n\n/**\n * Generates a Tailwind CSS configuration object based on the specified theme.\n * This configuration extends the base Tailwind settings with custom theme colors, typography settings,\n * and other style properties for use in React Native with `twrnc`.\n *\n * @param theme - The theme ('light' or 'dark'). Specifies whether to use light or dark mode styles.\n * @returns A Tailwind CSS configuration object with extended theme properties and plugins.\n */\nexport const generateTailwindConfig = (theme: Theme): TwConfig => {\n const colors = themeColors[theme];\n\n if (!colors) {\n console.error('Theme colors not found.');\n return {};\n }\n\n // Extract structured colors from the flattened colors\n const backgroundColors = extractColorsByPrefix(colors, 'background');\n const textColors = extractColorsByPrefix(colors, 'text');\n const borderColors = extractColorsByPrefix(colors, 'border');\n\n const config = {\n theme: {\n // Keep essential semantic colors, remove default palette colors to enforce use of design system components\n colors: {\n inherit: 'inherit',\n current: 'currentColor',\n transparent: 'transparent',\n black: '#000000',\n white: '#ffffff',\n },\n fontSize: {\n // Empty to remove default Tailwind font sizes (text-sm, text-lg, etc.)\n // Design system font sizes added via extend\n },\n extend: {\n colors: {\n ...colors,\n },\n textColor: {\n ...colors,\n ...textColors, // e.g. text-default instead of text-text-default\n },\n backgroundColor: {\n ...colors, // Incorporate existing color utilities like bg-primary-default\n ...backgroundColors, // e.g. bg-default instead of bg-background-default\n },\n borderColor: {\n ...colors, // Incorporate existing color utilities like border-primary-default\n ...borderColors, // e.g. border-default instead of border-border-default\n },\n fontSize: {\n ...typographyTailwindConfig.fontSize,\n },\n fontFamily: {\n ...typographyTailwindConfig.fontFamily,\n },\n letterSpacing: {\n ...typographyTailwindConfig.letterSpacing,\n },\n lineHeight: {\n ...typographyTailwindConfig.lineHeight,\n },\n },\n },\n };\n\n return config;\n};\n"]}
1
+ {"version":3,"file":"tailwind.config.cjs","sourceRoot":"","sources":["../src/tailwind.config.ts"],"names":[],"mappings":";;;AAAA,2DAAqD;AAGrD,yCAAuC;AAEvC,iDAAwD;AAExD;;;;;;;;;;;;;GAaG;AACH,MAAM,qBAAqB,GAAG,CAC5B,MAA8B,EAC9B,MAAc,EACd,EAAE;IACF,MAAM,SAAS,GAA2B,EAAE,CAAC;IAC7C,MAAM,cAAc,GAAG,GAAG,MAAM,GAAG,CAAC;IAEpC,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE;QAC9C,IAAI,GAAG,CAAC,UAAU,CAAC,cAAc,CAAC,EAAE;YAClC,MAAM,SAAS,GAAG,GAAG,CAAC,OAAO,CAAC,cAAc,EAAE,EAAE,CAAC,CAAC;YAClD,SAAS,CAAC,SAAS,CAAC,GAAG,KAAK,CAAC;SAC9B;IACH,CAAC,CAAC,CAAC;IAEH,OAAO,SAAS,CAAC;AACnB,CAAC,CAAC;AAEF;;;;;;;GAOG;AACI,MAAM,sBAAsB,GAAG,CAAC,KAAY,EAAY,EAAE;IAC/D,MAAM,kBAAkB,GAAG,oBAAW,CAAC,KAAK,CAAC,CAAC;IAE9C,IAAI,CAAC,kBAAkB,EAAE;QACvB,OAAO,CAAC,KAAK,CAAC,yBAAyB,CAAC,CAAC;QACzC,OAAO,EAAE,CAAC;KACX;IAED,qEAAqE;IACrE,MAAM,eAAe,GAAG;QACt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import type { TwConfig } from 'twrnc';\n\nimport { themeColors } from './colors';\nimport type { Theme } from './Theme.types';\nimport { typographyTailwindConfig } from './typography';\n\n/**\n * Extracts colors by prefix from the flattened colors object and removes the prefix from keys.\n * This creates structured color objects that enable shorter Tailwind class names by removing\n * redundant prefixes (e.g., \"background-default\" becomes \"default\" for backgroundColor).\n *\n * @param colors - The flattened colors object containing all theme colors with kebab-case keys.\n * @param prefix - The prefix to extract colors for (e.g., 'background', 'text', 'border').\n * @returns A new object containing only colors matching the prefix, with the prefix removed from keys.\n *\n * @example\n * const colors = { 'background-default': '#fff', 'background-muted': '#eee', 'text-default': '#000' };\n * extractColorsByPrefix(colors, 'background');\n * // Returns: { 'default': '#fff', 'muted': '#eee' }\n */\nconst extractColorsByPrefix = (\n colors: Record<string, string>,\n prefix: string,\n) => {\n const extracted: Record<string, string> = {};\n const prefixWithDash = `${prefix}-`;\n\n Object.entries(colors).forEach(([key, value]) => {\n if (key.startsWith(prefixWithDash)) {\n const colorName = key.replace(prefixWithDash, '');\n extracted[colorName] = value;\n }\n });\n\n return extracted;\n};\n\n/**\n * Generates a Tailwind CSS configuration object based on the specified theme.\n * This configuration extends the base Tailwind settings with custom theme colors, typography settings,\n * and other style properties for use in React Native with `twrnc`.\n *\n * @param theme - The theme ('light' or 'dark'). Specifies whether to use light or dark mode styles.\n * @returns A Tailwind CSS configuration object with extended theme properties and plugins.\n */\nexport const generateTailwindConfig = (theme: Theme): TwConfig => {\n const designSystemColors = themeColors[theme];\n\n if (!designSystemColors) {\n console.error('Theme colors not found.');\n return {};\n }\n\n // Essential colors that need to be available in all color properties\n const essentialColors = {\n inherit: 'inherit',\n current: 'currentColor',\n transparent: 'transparent',\n black: brandColor.black,\n white: brandColor.white,\n };\n\n // Combined colors object with essential colors and design system colors\n const allColors = {\n ...essentialColors,\n ...designSystemColors,\n };\n\n // Extract structured colors from the flattened colors\n const backgroundColors = extractColorsByPrefix(\n designSystemColors,\n 'background',\n );\n const textColors = extractColorsByPrefix(designSystemColors, 'text');\n const borderColors = extractColorsByPrefix(designSystemColors, 'border');\n\n const config = {\n theme: {\n // Keep essential semantic colors, remove default palette colors.\n // We want to rely on the colors provided by the design system preset\n colors: allColors,\n // This removes all default Tailwind font sizes and weights.\n // We want to rely on the design system font sizes and enforce use of the Text component\n textColor: {\n ...allColors,\n ...textColors, // e.g. text-default instead of text-text-default\n },\n backgroundColor: {\n ...allColors, // Incorporate essential colors + design system colors\n ...backgroundColors, // e.g. bg-default instead of bg-background-default\n },\n borderColor: {\n ...allColors, // Incorporate essential colors + design system colors\n ...borderColors, // e.g. border-default instead of border-border-default\n },\n fontSize: {\n ...typographyTailwindConfig.fontSize,\n },\n fontFamily: {\n ...typographyTailwindConfig.fontFamily,\n },\n letterSpacing: {\n ...typographyTailwindConfig.letterSpacing,\n },\n lineHeight: {\n ...typographyTailwindConfig.lineHeight,\n },\n },\n };\n\n return config;\n};\n\n// Export Theme enum for consumers\nexport { Theme } from './Theme.types';\n"]}
@@ -9,4 +9,5 @@ import type { Theme } from "./Theme.types.cjs";
9
9
  * @returns A Tailwind CSS configuration object with extended theme properties and plugins.
10
10
  */
11
11
  export declare const generateTailwindConfig: (theme: Theme) => TwConfig;
12
+ export { Theme } from "./Theme.types.cjs";
12
13
  //# sourceMappingURL=tailwind.config.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"tailwind.config.d.cts","sourceRoot":"","sources":["../src/tailwind.config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,cAAc;AAGtC,OAAO,KAAK,EAAE,KAAK,EAAE,0BAAsB;AAkC3C;;;;;;;GAOG;AACH,eAAO,MAAM,sBAAsB,UAAW,KAAK,KAAG,QA4DrD,CAAC"}
1
+ {"version":3,"file":"tailwind.config.d.cts","sourceRoot":"","sources":["../src/tailwind.config.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,cAAc;AAGtC,OAAO,KAAK,EAAE,KAAK,EAAE,0BAAsB;AAkC3C;;;;;;;GAOG;AACH,eAAO,MAAM,sBAAsB,UAAW,KAAK,KAAG,QAkErD,CAAC;AAGF,OAAO,EAAE,KAAK,EAAE,0BAAsB"}
@@ -9,4 +9,5 @@ import type { Theme } from "./Theme.types.mjs";
9
9
  * @returns A Tailwind CSS configuration object with extended theme properties and plugins.
10
10
  */
11
11
  export declare const generateTailwindConfig: (theme: Theme) => TwConfig;
12
+ export { Theme } from "./Theme.types.mjs";
12
13
  //# sourceMappingURL=tailwind.config.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"tailwind.config.d.mts","sourceRoot":"","sources":["../src/tailwind.config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,cAAc;AAGtC,OAAO,KAAK,EAAE,KAAK,EAAE,0BAAsB;AAkC3C;;;;;;;GAOG;AACH,eAAO,MAAM,sBAAsB,UAAW,KAAK,KAAG,QA4DrD,CAAC"}
1
+ {"version":3,"file":"tailwind.config.d.mts","sourceRoot":"","sources":["../src/tailwind.config.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,cAAc;AAGtC,OAAO,KAAK,EAAE,KAAK,EAAE,0BAAsB;AAkC3C;;;;;;;GAOG;AACH,eAAO,MAAM,sBAAsB,UAAW,KAAK,KAAG,QAkErD,CAAC;AAGF,OAAO,EAAE,KAAK,EAAE,0BAAsB"}
@@ -1,3 +1,4 @@
1
+ import { brandColor } from "@metamask/design-tokens";
1
2
  import { themeColors } from "./colors.mjs";
2
3
  import { typographyTailwindConfig } from "./typography.mjs";
3
4
  /**
@@ -34,60 +35,63 @@ const extractColorsByPrefix = (colors, prefix) => {
34
35
  * @returns A Tailwind CSS configuration object with extended theme properties and plugins.
35
36
  */
36
37
  export const generateTailwindConfig = (theme) => {
37
- const colors = themeColors[theme];
38
- if (!colors) {
38
+ const designSystemColors = themeColors[theme];
39
+ if (!designSystemColors) {
39
40
  console.error('Theme colors not found.');
40
41
  return {};
41
42
  }
43
+ // Essential colors that need to be available in all color properties
44
+ const essentialColors = {
45
+ inherit: 'inherit',
46
+ current: 'currentColor',
47
+ transparent: 'transparent',
48
+ black: brandColor.black,
49
+ white: brandColor.white,
50
+ };
51
+ // Combined colors object with essential colors and design system colors
52
+ const allColors = {
53
+ ...essentialColors,
54
+ ...designSystemColors,
55
+ };
42
56
  // Extract structured colors from the flattened colors
43
- const backgroundColors = extractColorsByPrefix(colors, 'background');
44
- const textColors = extractColorsByPrefix(colors, 'text');
45
- const borderColors = extractColorsByPrefix(colors, 'border');
57
+ const backgroundColors = extractColorsByPrefix(designSystemColors, 'background');
58
+ const textColors = extractColorsByPrefix(designSystemColors, 'text');
59
+ const borderColors = extractColorsByPrefix(designSystemColors, 'border');
46
60
  const config = {
47
61
  theme: {
48
- // Keep essential semantic colors, remove default palette colors to enforce use of design system components
49
- colors: {
50
- inherit: 'inherit',
51
- current: 'currentColor',
52
- transparent: 'transparent',
53
- black: '#000000',
54
- white: '#ffffff',
62
+ // Keep essential semantic colors, remove default palette colors.
63
+ // We want to rely on the colors provided by the design system preset
64
+ colors: allColors,
65
+ // This removes all default Tailwind font sizes and weights.
66
+ // We want to rely on the design system font sizes and enforce use of the Text component
67
+ textColor: {
68
+ ...allColors,
69
+ ...textColors, // e.g. text-default instead of text-text-default
70
+ },
71
+ backgroundColor: {
72
+ ...allColors,
73
+ ...backgroundColors, // e.g. bg-default instead of bg-background-default
74
+ },
75
+ borderColor: {
76
+ ...allColors,
77
+ ...borderColors, // e.g. border-default instead of border-border-default
55
78
  },
56
79
  fontSize: {
57
- // Empty to remove default Tailwind font sizes (text-sm, text-lg, etc.)
58
- // Design system font sizes added via extend
80
+ ...typographyTailwindConfig.fontSize,
81
+ },
82
+ fontFamily: {
83
+ ...typographyTailwindConfig.fontFamily,
84
+ },
85
+ letterSpacing: {
86
+ ...typographyTailwindConfig.letterSpacing,
59
87
  },
60
- extend: {
61
- colors: {
62
- ...colors,
63
- },
64
- textColor: {
65
- ...colors,
66
- ...textColors, // e.g. text-default instead of text-text-default
67
- },
68
- backgroundColor: {
69
- ...colors,
70
- ...backgroundColors, // e.g. bg-default instead of bg-background-default
71
- },
72
- borderColor: {
73
- ...colors,
74
- ...borderColors, // e.g. border-default instead of border-border-default
75
- },
76
- fontSize: {
77
- ...typographyTailwindConfig.fontSize,
78
- },
79
- fontFamily: {
80
- ...typographyTailwindConfig.fontFamily,
81
- },
82
- letterSpacing: {
83
- ...typographyTailwindConfig.letterSpacing,
84
- },
85
- lineHeight: {
86
- ...typographyTailwindConfig.lineHeight,
87
- },
88
+ lineHeight: {
89
+ ...typographyTailwindConfig.lineHeight,
88
90
  },
89
91
  },
90
92
  };
91
93
  return config;
92
94
  };
95
+ // Export Theme enum for consumers
96
+ export { Theme } from "./Theme.types.mjs";
93
97
  //# sourceMappingURL=tailwind.config.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"tailwind.config.mjs","sourceRoot":"","sources":["../src/tailwind.config.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,qBAAiB;AAEvC,OAAO,EAAE,wBAAwB,EAAE,yBAAqB;AAExD;;;;;;;;;;;;;GAaG;AACH,MAAM,qBAAqB,GAAG,CAC5B,MAA8B,EAC9B,MAAc,EACd,EAAE;IACF,MAAM,SAAS,GAA2B,EAAE,CAAC;IAC7C,MAAM,cAAc,GAAG,GAAG,MAAM,GAAG,CAAC;IAEpC,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE;QAC9C,IAAI,GAAG,CAAC,UAAU,CAAC,cAAc,CAAC,EAAE;YAClC,MAAM,SAAS,GAAG,GAAG,CAAC,OAAO,CAAC,cAAc,EAAE,EAAE,CAAC,CAAC;YAClD,SAAS,CAAC,SAAS,CAAC,GAAG,KAAK,CAAC;SAC9B;IACH,CAAC,CAAC,CAAC;IAEH,OAAO,SAAS,CAAC;AACnB,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G,wBAAwB,CAAC,UAAU;iBACvC;aACF;SACF;KACF,CAAC;IAEF,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC","sourcesContent":["import type { TwConfig } from 'twrnc';\n\nimport { themeColors } from './colors';\nimport type { Theme } from './Theme.types';\nimport { typographyTailwindConfig } from './typography';\n\n/**\n * Extracts colors by prefix from the flattened colors object and removes the prefix from keys.\n * This creates structured color objects that enable shorter Tailwind class names by removing\n * redundant prefixes (e.g., \"background-default\" becomes \"default\" for backgroundColor).\n *\n * @param colors - The flattened colors object containing all theme colors with kebab-case keys.\n * @param prefix - The prefix to extract colors for (e.g., 'background', 'text', 'border').\n * @returns A new object containing only colors matching the prefix, with the prefix removed from keys.\n *\n * @example\n * const colors = { 'background-default': '#fff', 'background-muted': '#eee', 'text-default': '#000' };\n * extractColorsByPrefix(colors, 'background');\n * // Returns: { 'default': '#fff', 'muted': '#eee' }\n */\nconst extractColorsByPrefix = (\n colors: Record<string, string>,\n prefix: string,\n) => {\n const extracted: Record<string, string> = {};\n const prefixWithDash = `${prefix}-`;\n\n Object.entries(colors).forEach(([key, value]) => {\n if (key.startsWith(prefixWithDash)) {\n const colorName = key.replace(prefixWithDash, '');\n extracted[colorName] = value;\n }\n });\n\n return extracted;\n};\n\n/**\n * Generates a Tailwind CSS configuration object based on the specified theme.\n * This configuration extends the base Tailwind settings with custom theme colors, typography settings,\n * and other style properties for use in React Native with `twrnc`.\n *\n * @param theme - The theme ('light' or 'dark'). Specifies whether to use light or dark mode styles.\n * @returns A Tailwind CSS configuration object with extended theme properties and plugins.\n */\nexport const generateTailwindConfig = (theme: Theme): TwConfig => {\n const colors = themeColors[theme];\n\n if (!colors) {\n console.error('Theme colors not found.');\n return {};\n }\n\n // Extract structured colors from the flattened colors\n const backgroundColors = extractColorsByPrefix(colors, 'background');\n const textColors = extractColorsByPrefix(colors, 'text');\n const borderColors = extractColorsByPrefix(colors, 'border');\n\n const config = {\n theme: {\n // Keep essential semantic colors, remove default palette colors to enforce use of design system components\n colors: {\n inherit: 'inherit',\n current: 'currentColor',\n transparent: 'transparent',\n black: '#000000',\n white: '#ffffff',\n },\n fontSize: {\n // Empty to remove default Tailwind font sizes (text-sm, text-lg, etc.)\n // Design system font sizes added via extend\n },\n extend: {\n colors: {\n ...colors,\n },\n textColor: {\n ...colors,\n ...textColors, // e.g. text-default instead of text-text-default\n },\n backgroundColor: {\n ...colors, // Incorporate existing color utilities like bg-primary-default\n ...backgroundColors, // e.g. bg-default instead of bg-background-default\n },\n borderColor: {\n ...colors, // Incorporate existing color utilities like border-primary-default\n ...borderColors, // e.g. border-default instead of border-border-default\n },\n fontSize: {\n ...typographyTailwindConfig.fontSize,\n },\n fontFamily: {\n ...typographyTailwindConfig.fontFamily,\n },\n letterSpacing: {\n ...typographyTailwindConfig.letterSpacing,\n },\n lineHeight: {\n ...typographyTailwindConfig.lineHeight,\n },\n },\n },\n };\n\n return config;\n};\n"]}
1
+ {"version":3,"file":"tailwind.config.mjs","sourceRoot":"","sources":["../src/tailwind.config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,gCAAgC;AAGrD,OAAO,EAAE,WAAW,EAAE,qBAAiB;AAEvC,OAAO,EAAE,wBAAwB,EAAE,yBAAqB;AAExD;;;;;;;;;;;;;GAaG;AACH,MAAM,qBAAqB,GAAG,CAC5B,MAA8B,EAC9B,MAAc,EACd,EAAE;IACF,MAAM,SAAS,GAA2B,EAAE,CAAC;IAC7C,MAAM,cAAc,GAAG,GAAG,MAAM,GAAG,CAAC;IAEpC,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE;QAC9C,IAAI,GAAG,CAAC,UAAU,CAAC,cAAc,CAAC,EAAE;YAClC,MAAM,SAAS,GAAG,GAAG,CAAC,OAAO,CAAC,cAAc,EAAE,EAAE,CAAC,CAAC;YAClD,SAAS,CAAC,SAAS,CAAC,GAAG,KAAK,CA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AAC,QAAQ;aACrC;YACD,UAAU,EAAE;gBACV,GAAG,wBAAwB,CAAC,UAAU;aACvC;YACD,aAAa,EAAE;gBACb,GAAG,wBAAwB,CAAC,aAAa;aAC1C;YACD,UAAU,EAAE;gBACV,GAAG,wBAAwB,CAAC,UAAU;aACvC;SACF;KACF,CAAC;IAEF,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC;AAEF,kCAAkC;AAClC,OAAO,EAAE,KAAK,EAAE,0BAAsB","sourcesContent":["import { brandColor } from '@metamask/design-tokens';\nimport type { TwConfig } from 'twrnc';\n\nimport { themeColors } from './colors';\nimport type { Theme } from './Theme.types';\nimport { typographyTailwindConfig } from './typography';\n\n/**\n * Extracts colors by prefix from the flattened colors object and removes the prefix from keys.\n * This creates structured color objects that enable shorter Tailwind class names by removing\n * redundant prefixes (e.g., \"background-default\" becomes \"default\" for backgroundColor).\n *\n * @param colors - The flattened colors object containing all theme colors with kebab-case keys.\n * @param prefix - The prefix to extract colors for (e.g., 'background', 'text', 'border').\n * @returns A new object containing only colors matching the prefix, with the prefix removed from keys.\n *\n * @example\n * const colors = { 'background-default': '#fff', 'background-muted': '#eee', 'text-default': '#000' };\n * extractColorsByPrefix(colors, 'background');\n * // Returns: { 'default': '#fff', 'muted': '#eee' }\n */\nconst extractColorsByPrefix = (\n colors: Record<string, string>,\n prefix: string,\n) => {\n const extracted: Record<string, string> = {};\n const prefixWithDash = `${prefix}-`;\n\n Object.entries(colors).forEach(([key, value]) => {\n if (key.startsWith(prefixWithDash)) {\n const colorName = key.replace(prefixWithDash, '');\n extracted[colorName] = value;\n }\n });\n\n return extracted;\n};\n\n/**\n * Generates a Tailwind CSS configuration object based on the specified theme.\n * This configuration extends the base Tailwind settings with custom theme colors, typography settings,\n * and other style properties for use in React Native with `twrnc`.\n *\n * @param theme - The theme ('light' or 'dark'). Specifies whether to use light or dark mode styles.\n * @returns A Tailwind CSS configuration object with extended theme properties and plugins.\n */\nexport const generateTailwindConfig = (theme: Theme): TwConfig => {\n const designSystemColors = themeColors[theme];\n\n if (!designSystemColors) {\n console.error('Theme colors not found.');\n return {};\n }\n\n // Essential colors that need to be available in all color properties\n const essentialColors = {\n inherit: 'inherit',\n current: 'currentColor',\n transparent: 'transparent',\n black: brandColor.black,\n white: brandColor.white,\n };\n\n // Combined colors object with essential colors and design system colors\n const allColors = {\n ...essentialColors,\n ...designSystemColors,\n };\n\n // Extract structured colors from the flattened colors\n const backgroundColors = extractColorsByPrefix(\n designSystemColors,\n 'background',\n );\n const textColors = extractColorsByPrefix(designSystemColors, 'text');\n const borderColors = extractColorsByPrefix(designSystemColors, 'border');\n\n const config = {\n theme: {\n // Keep essential semantic colors, remove default palette colors.\n // We want to rely on the colors provided by the design system preset\n colors: allColors,\n // This removes all default Tailwind font sizes and weights.\n // We want to rely on the design system font sizes and enforce use of the Text component\n textColor: {\n ...allColors,\n ...textColors, // e.g. text-default instead of text-text-default\n },\n backgroundColor: {\n ...allColors, // Incorporate essential colors + design system colors\n ...backgroundColors, // e.g. bg-default instead of bg-background-default\n },\n borderColor: {\n ...allColors, // Incorporate essential colors + design system colors\n ...borderColors, // e.g. border-default instead of border-border-default\n },\n fontSize: {\n ...typographyTailwindConfig.fontSize,\n },\n fontFamily: {\n ...typographyTailwindConfig.fontFamily,\n },\n letterSpacing: {\n ...typographyTailwindConfig.letterSpacing,\n },\n lineHeight: {\n ...typographyTailwindConfig.lineHeight,\n },\n },\n };\n\n return config;\n};\n\n// Export Theme enum for consumers\nexport { Theme } from './Theme.types';\n"]}
@@ -76,6 +76,46 @@ exports.typographyTailwindConfig = {
76
76
  fontWeight: design_tokens_1.typography.sBodyXS.fontWeight,
77
77
  },
78
78
  ],
79
+ 'page-heading': [
80
+ design_tokens_1.typography.sPageHeading.fontSize.toString(),
81
+ {
82
+ lineHeight: `${design_tokens_1.typography.sPageHeading.lineHeight}px`,
83
+ letterSpacing: `${design_tokens_1.typography.sPageHeading.letterSpacing}`,
84
+ fontWeight: design_tokens_1.typography.sPageHeading.fontWeight,
85
+ },
86
+ ],
87
+ 'section-heading': [
88
+ design_tokens_1.typography.sSectionHeading.fontSize.toString(),
89
+ {
90
+ lineHeight: `${design_tokens_1.typography.sSectionHeading.lineHeight}px`,
91
+ letterSpacing: `${design_tokens_1.typography.sSectionHeading.letterSpacing}`,
92
+ fontWeight: design_tokens_1.typography.sSectionHeading.fontWeight,
93
+ },
94
+ ],
95
+ 'button-label-md': [
96
+ design_tokens_1.typography.sButtonLabelMd.fontSize.toString(),
97
+ {
98
+ lineHeight: `${design_tokens_1.typography.sButtonLabelMd.lineHeight}px`,
99
+ letterSpacing: `${design_tokens_1.typography.sButtonLabelMd.letterSpacing}`,
100
+ fontWeight: design_tokens_1.typography.sButtonLabelMd.fontWeight,
101
+ },
102
+ ],
103
+ 'button-label-lg': [
104
+ design_tokens_1.typography.sButtonLabelLg.fontSize.toString(),
105
+ {
106
+ lineHeight: `${design_tokens_1.typography.sButtonLabelLg.lineHeight}px`,
107
+ letterSpacing: `${design_tokens_1.typography.sButtonLabelLg.letterSpacing}`,
108
+ fontWeight: design_tokens_1.typography.sButtonLabelLg.fontWeight,
109
+ },
110
+ ],
111
+ 'amount-display-lg': [
112
+ design_tokens_1.typography.sAmountDisplayLg.fontSize.toString(),
113
+ {
114
+ lineHeight: `${design_tokens_1.typography.sAmountDisplayLg.lineHeight}px`,
115
+ letterSpacing: `${design_tokens_1.typography.sAmountDisplayLg.letterSpacing}`,
116
+ fontWeight: design_tokens_1.typography.sAmountDisplayLg.fontWeight,
117
+ },
118
+ ],
79
119
  },
80
120
  fontFamily: {
81
121
  'default-regular': 'Geist-Regular',
@@ -99,6 +139,11 @@ exports.typographyTailwindConfig = {
99
139
  'body-md': `${design_tokens_1.typography.sBodyMD.letterSpacing}`,
100
140
  'body-sm': `${design_tokens_1.typography.sBodySM.letterSpacing}`,
101
141
  'body-xs': `${design_tokens_1.typography.sBodyXS.letterSpacing}`,
142
+ 'page-heading': `${design_tokens_1.typography.sPageHeading.letterSpacing}`,
143
+ 'section-heading': `${design_tokens_1.typography.sSectionHeading.letterSpacing}`,
144
+ 'button-label-md': `${design_tokens_1.typography.sButtonLabelMd.letterSpacing}`,
145
+ 'button-label-lg': `${design_tokens_1.typography.sButtonLabelLg.letterSpacing}`,
146
+ 'amount-display-lg': `${design_tokens_1.typography.sAmountDisplayLg.letterSpacing}`,
102
147
  },
103
148
  lineHeight: {
104
149
  'display-lg': `${design_tokens_1.typography.sDisplayLG.lineHeight}px`,
@@ -110,6 +155,11 @@ exports.typographyTailwindConfig = {
110
155
  'body-md': `${design_tokens_1.typography.sBodyMD.lineHeight}px`,
111
156
  'body-sm': `${design_tokens_1.typography.sBodySM.lineHeight}px`,
112
157
  'body-xs': `${design_tokens_1.typography.sBodyXS.lineHeight}px`,
158
+ 'page-heading': `${design_tokens_1.typography.sPageHeading.lineHeight}px`,
159
+ 'section-heading': `${design_tokens_1.typography.sSectionHeading.lineHeight}px`,
160
+ 'button-label-md': `${design_tokens_1.typography.sButtonLabelMd.lineHeight}px`,
161
+ 'button-label-lg': `${design_tokens_1.typography.sButtonLabelLg.lineHeight}px`,
162
+ 'amount-display-lg': `${design_tokens_1.typography.sAmountDisplayLg.lineHeight}px`,
113
163
  },
114
164
  };
115
165
  //# sourceMappingURL=typography.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"typography.cjs","sourceRoot":"","sources":["../src/typography.ts"],"names":[],"mappings":";;;AAAA,2DAAqD;AAIxC,QAAA,wBAAwB,GAAkC;IACrE,QAAQ,EAAE;QACR,YAAY,EAAE;YACZ,0BAAU,CAAC,UAAU,CAAC,QAAQ,CAAC,QAAQ,EAAE;YACzC;gBACE,UAAU,EAAE,GAAG,0BAAU,CAAC,UAAU,CAAC,UAAoB,IAAI;gBAC7D,aAAa,EAAE,GAAG,0BAAU,CAAC,UAAU,CAAC,aAAuB,EAAE;gBACjE,UAAU,EAAE,0BAAU,CAAC,UAAU,CAAC,UAAU;aAC7C;SACF;QACD,YAAY,EAAE;YAC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ography.types';\n\nexport const typographyTailwindConfig: TypographyTailwindConfigProps = {\n fontSize: {\n 'display-lg': [\n typography.sDisplayLG.fontSize.toString(),\n {\n lineHeight: `${typography.sDisplayLG.lineHeight as number}px`,\n letterSpacing: `${typography.sDisplayLG.letterSpacing as number}`,\n fontWeight: typography.sDisplayLG.fontWeight,\n },\n ],\n 'display-md': [\n typography.sDisplayMD.fontSize.toString(),\n {\n lineHeight: `${typography.sDisplayMD.lineHeight as number}px`,\n letterSpacing: `${typography.sDisplayMD.letterSpacing as number}`,\n fontWeight: typography.sDisplayMD.fontWeight,\n },\n ],\n 'heading-lg': [\n typography.sHeadingLG.fontSize.toString(),\n {\n lineHeight: `${typography.sHeadingLG.lineHeight as number}px`,\n letterSpacing: `${typography.sHeadingLG.letterSpacing as number}`,\n fontWeight: typography.sHeadingLG.fontWeight,\n },\n ],\n 'heading-md': [\n typography.sHeadingMD.fontSize.toString(),\n {\n lineHeight: `${typography.sHeadingMD.lineHeight as number}px`,\n letterSpacing: `${typography.sHeadingMD.letterSpacing as number}`,\n fontWeight: typography.sHeadingMD.fontWeight,\n },\n ],\n 'heading-sm': [\n typography.sHeadingSM.fontSize.toString(),\n {\n lineHeight: `${typography.sHeadingSM.lineHeight as number}px`,\n letterSpacing: `${typography.sHeadingSM.letterSpacing as number}`,\n fontWeight: typography.sHeadingSM.fontWeight,\n },\n ],\n 'body-lg': [\n typography.sBodyLGMedium.fontSize.toString(),\n {\n lineHeight: `${typography.sBodyLGMedium.lineHeight as number}px`,\n letterSpacing: `${typography.sBodyLGMedium.letterSpacing as number}`,\n fontWeight: typography.sBodyLGMedium.fontWeight,\n },\n ],\n 'body-md': [\n typography.sBodyMD.fontSize.toString(),\n {\n lineHeight: `${typography.sBodyMD.lineHeight as number}px`,\n letterSpacing: `${typography.sBodyMD.letterSpacing as number}`,\n fontWeight: typography.sBodyMD.fontWeight,\n },\n ],\n 'body-sm': [\n typography.sBodySM.fontSize.toString(),\n {\n lineHeight: `${typography.sBodySM.lineHeight as number}px`,\n letterSpacing: `${typography.sBodySM.letterSpacing as number}`,\n fontWeight: typography.sBodySM.fontWeight,\n },\n ],\n 'body-xs': [\n typography.sBodyXS.fontSize.toString(),\n {\n lineHeight: `${typography.sBodyXS.lineHeight as number}px`,\n letterSpacing: `${typography.sBodyXS.letterSpacing as number}`,\n fontWeight: typography.sBodyXS.fontWeight,\n },\n ],\n },\n fontFamily: {\n 'default-regular': 'Geist-Regular',\n 'default-regular-italic': 'Geist-RegularItalic',\n 'default-medium': 'Geist-Medium',\n 'default-medium-italic': 'Geist-MediumItalic',\n 'default-bold': 'Geist-Bold',\n 'default-bold-italic': 'Geist-BoldItalic',\n 'accent-regular': 'MMSans-Regular',\n 'accent-medium': 'MMSans-Medium',\n 'accent-bold': 'MMSans-Bold',\n 'hero-regular': 'MMPoly-Regular',\n },\n letterSpacing: {\n 'display-lg': `${typography.sDisplayLG.letterSpacing as number}`,\n 'display-md': `${typography.sDisplayMD.letterSpacing as number}`,\n 'heading-lg': `${typography.sHeadingLG.letterSpacing as number}`,\n 'heading-md': `${typography.sHeadingMD.letterSpacing as number}`,\n 'heading-sm': `${typography.sHeadingSM.letterSpacing as number}`,\n 'body-lg': `${typography.sBodyLGMedium.letterSpacing as number}`,\n 'body-md': `${typography.sBodyMD.letterSpacing as number}`,\n 'body-sm': `${typography.sBodySM.letterSpacing as number}`,\n 'body-xs': `${typography.sBodyXS.letterSpacing as number}`,\n },\n lineHeight: {\n 'display-lg': `${typography.sDisplayLG.lineHeight as number}px`,\n 'display-md': `${typography.sDisplayMD.lineHeight as number}px`,\n 'heading-lg': `${typography.sHeadingLG.lineHeight as number}px`,\n 'heading-md': `${typography.sHeadingMD.lineHeight as number}px`,\n 'heading-sm': `${typography.sHeadingSM.lineHeight as number}px`,\n 'body-lg': `${typography.sBodyLGMedium.lineHeight as number}px`,\n 'body-md': `${typography.sBodyMD.lineHeight as number}px`,\n 'body-sm': `${typography.sBodySM.lineHeight as number}px`,\n 'body-xs': `${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yTailwindConfigProps } from './typography.types';\n\nexport const typographyTailwindConfig: TypographyTailwindConfigProps = {\n fontSize: {\n 'display-lg': [\n typography.sDisplayLG.fontSize.toString(),\n {\n lineHeight: `${typography.sDisplayLG.lineHeight as number}px`,\n letterSpacing: `${typography.sDisplayLG.letterSpacing as number}`,\n fontWeight: typography.sDisplayLG.fontWeight,\n },\n ],\n 'display-md': [\n typography.sDisplayMD.fontSize.toString(),\n {\n lineHeight: `${typography.sDisplayMD.lineHeight as number}px`,\n letterSpacing: `${typography.sDisplayMD.letterSpacing as number}`,\n fontWeight: typography.sDisplayMD.fontWeight,\n },\n ],\n 'heading-lg': [\n typography.sHeadingLG.fontSize.toString(),\n {\n lineHeight: `${typography.sHeadingLG.lineHeight as number}px`,\n letterSpacing: `${typography.sHeadingLG.letterSpacing as number}`,\n fontWeight: typography.sHeadingLG.fontWeight,\n },\n ],\n 'heading-md': [\n typography.sHeadingMD.fontSize.toString(),\n {\n lineHeight: `${typography.sHeadingMD.lineHeight as number}px`,\n letterSpacing: `${typography.sHeadingMD.letterSpacing as number}`,\n fontWeight: typography.sHeadingMD.fontWeight,\n },\n ],\n 'heading-sm': [\n typography.sHeadingSM.fontSize.toString(),\n {\n lineHeight: `${typography.sHeadingSM.lineHeight as number}px`,\n letterSpacing: `${typography.sHeadingSM.letterSpacing as number}`,\n fontWeight: typography.sHeadingSM.fontWeight,\n },\n ],\n 'body-lg': [\n typography.sBodyLGMedium.fontSize.toString(),\n {\n lineHeight: `${typography.sBodyLGMedium.lineHeight as number}px`,\n letterSpacing: `${typography.sBodyLGMedium.letterSpacing as number}`,\n fontWeight: typography.sBodyLGMedium.fontWeight,\n },\n ],\n 'body-md': [\n typography.sBodyMD.fontSize.toString(),\n {\n lineHeight: `${typography.sBodyMD.lineHeight as number}px`,\n letterSpacing: `${typography.sBodyMD.letterSpacing as number}`,\n fontWeight: typography.sBodyMD.fontWeight,\n },\n ],\n 'body-sm': [\n typography.sBodySM.fontSize.toString(),\n {\n lineHeight: `${typography.sBodySM.lineHeight as number}px`,\n letterSpacing: `${typography.sBodySM.letterSpacing as number}`,\n fontWeight: typography.sBodySM.fontWeight,\n },\n ],\n 'body-xs': [\n typography.sBodyXS.fontSize.toString(),\n {\n lineHeight: `${typography.sBodyXS.lineHeight as number}px`,\n letterSpacing: `${typography.sBodyXS.letterSpacing as number}`,\n fontWeight: typography.sBodyXS.fontWeight,\n },\n ],\n 'page-heading': [\n typography.sPageHeading.fontSize.toString(),\n {\n lineHeight: `${typography.sPageHeading.lineHeight as number}px`,\n letterSpacing: `${typography.sPageHeading.letterSpacing as number}`,\n fontWeight: typography.sPageHeading.fontWeight,\n },\n ],\n 'section-heading': [\n typography.sSectionHeading.fontSize.toString(),\n {\n lineHeight: `${typography.sSectionHeading.lineHeight as number}px`,\n letterSpacing: `${typography.sSectionHeading.letterSpacing as number}`,\n fontWeight: typography.sSectionHeading.fontWeight,\n },\n ],\n 'button-label-md': [\n typography.sButtonLabelMd.fontSize.toString(),\n {\n lineHeight: `${typography.sButtonLabelMd.lineHeight as number}px`,\n letterSpacing: `${typography.sButtonLabelMd.letterSpacing as number}`,\n fontWeight: typography.sButtonLabelMd.fontWeight,\n },\n ],\n 'button-label-lg': [\n typography.sButtonLabelLg.fontSize.toString(),\n {\n lineHeight: `${typography.sButtonLabelLg.lineHeight as number}px`,\n letterSpacing: `${typography.sButtonLabelLg.letterSpacing as number}`,\n fontWeight: typography.sButtonLabelLg.fontWeight,\n },\n ],\n 'amount-display-lg': [\n typography.sAmountDisplayLg.fontSize.toString(),\n {\n lineHeight: `${typography.sAmountDisplayLg.lineHeight as number}px`,\n letterSpacing: `${typography.sAmountDisplayLg.letterSpacing as number}`,\n fontWeight: typography.sAmountDisplayLg.fontWeight,\n },\n ],\n },\n fontFamily: {\n 'default-regular': 'Geist-Regular',\n 'default-regular-italic': 'Geist-RegularItalic',\n 'default-medium': 'Geist-Medium',\n 'default-medium-italic': 'Geist-MediumItalic',\n 'default-bold': 'Geist-Bold',\n 'default-bold-italic': 'Geist-BoldItalic',\n 'accent-regular': 'MMSans-Regular',\n 'accent-medium': 'MMSans-Medium',\n 'accent-bold': 'MMSans-Bold',\n 'hero-regular': 'MMPoly-Regular',\n },\n letterSpacing: {\n 'display-lg': `${typography.sDisplayLG.letterSpacing as number}`,\n 'display-md': `${typography.sDisplayMD.letterSpacing as number}`,\n 'heading-lg': `${typography.sHeadingLG.letterSpacing as number}`,\n 'heading-md': `${typography.sHeadingMD.letterSpacing as number}`,\n 'heading-sm': `${typography.sHeadingSM.letterSpacing as number}`,\n 'body-lg': `${typography.sBodyLGMedium.letterSpacing as number}`,\n 'body-md': `${typography.sBodyMD.letterSpacing as number}`,\n 'body-sm': `${typography.sBodySM.letterSpacing as number}`,\n 'body-xs': `${typography.sBodyXS.letterSpacing as number}`,\n 'page-heading': `${typography.sPageHeading.letterSpacing as number}`,\n 'section-heading': `${typography.sSectionHeading.letterSpacing as number}`,\n 'button-label-md': `${typography.sButtonLabelMd.letterSpacing as number}`,\n 'button-label-lg': `${typography.sButtonLabelLg.letterSpacing as number}`,\n 'amount-display-lg': `${typography.sAmountDisplayLg.letterSpacing as number}`,\n },\n lineHeight: {\n 'display-lg': `${typography.sDisplayLG.lineHeight as number}px`,\n 'display-md': `${typography.sDisplayMD.lineHeight as number}px`,\n 'heading-lg': `${typography.sHeadingLG.lineHeight as number}px`,\n 'heading-md': `${typography.sHeadingMD.lineHeight as number}px`,\n 'heading-sm': `${typography.sHeadingSM.lineHeight as number}px`,\n 'body-lg': `${typography.sBodyLGMedium.lineHeight as number}px`,\n 'body-md': `${typography.sBodyMD.lineHeight as number}px`,\n 'body-sm': `${typography.sBodySM.lineHeight as number}px`,\n 'body-xs': `${typography.sBodyXS.lineHeight as number}px`,\n 'page-heading': `${typography.sPageHeading.lineHeight as number}px`,\n 'section-heading': `${typography.sSectionHeading.lineHeight as number}px`,\n 'button-label-md': `${typography.sButtonLabelMd.lineHeight as number}px`,\n 'button-label-lg': `${typography.sButtonLabelLg.lineHeight as number}px`,\n 'amount-display-lg': `${typography.sAmountDisplayLg.lineHeight as number}px`,\n },\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"typography.d.cts","sourceRoot":"","sources":["../src/typography.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,6BAA6B,EAAE,+BAA2B;AAExE,eAAO,MAAM,wBAAwB,EAAE,6BA6GtC,CAAC"}
1
+ {"version":3,"file":"typography.d.cts","sourceRoot":"","sources":["../src/typography.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,6BAA6B,EAAE,+BAA2B;AAExE,eAAO,MAAM,wBAAwB,EAAE,6BA+JtC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"typography.d.mts","sourceRoot":"","sources":["../src/typography.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,6BAA6B,EAAE,+BAA2B;AAExE,eAAO,MAAM,wBAAwB,EAAE,6BA6GtC,CAAC"}
1
+ {"version":3,"file":"typography.d.mts","sourceRoot":"","sources":["../src/typography.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,6BAA6B,EAAE,+BAA2B;AAExE,eAAO,MAAM,wBAAwB,EAAE,6BA+JtC,CAAC"}
@@ -73,6 +73,46 @@ export const typographyTailwindConfig = {
73
73
  fontWeight: typography.sBodyXS.fontWeight,
74
74
  },
75
75
  ],
76
+ 'page-heading': [
77
+ typography.sPageHeading.fontSize.toString(),
78
+ {
79
+ lineHeight: `${typography.sPageHeading.lineHeight}px`,
80
+ letterSpacing: `${typography.sPageHeading.letterSpacing}`,
81
+ fontWeight: typography.sPageHeading.fontWeight,
82
+ },
83
+ ],
84
+ 'section-heading': [
85
+ typography.sSectionHeading.fontSize.toString(),
86
+ {
87
+ lineHeight: `${typography.sSectionHeading.lineHeight}px`,
88
+ letterSpacing: `${typography.sSectionHeading.letterSpacing}`,
89
+ fontWeight: typography.sSectionHeading.fontWeight,
90
+ },
91
+ ],
92
+ 'button-label-md': [
93
+ typography.sButtonLabelMd.fontSize.toString(),
94
+ {
95
+ lineHeight: `${typography.sButtonLabelMd.lineHeight}px`,
96
+ letterSpacing: `${typography.sButtonLabelMd.letterSpacing}`,
97
+ fontWeight: typography.sButtonLabelMd.fontWeight,
98
+ },
99
+ ],
100
+ 'button-label-lg': [
101
+ typography.sButtonLabelLg.fontSize.toString(),
102
+ {
103
+ lineHeight: `${typography.sButtonLabelLg.lineHeight}px`,
104
+ letterSpacing: `${typography.sButtonLabelLg.letterSpacing}`,
105
+ fontWeight: typography.sButtonLabelLg.fontWeight,
106
+ },
107
+ ],
108
+ 'amount-display-lg': [
109
+ typography.sAmountDisplayLg.fontSize.toString(),
110
+ {
111
+ lineHeight: `${typography.sAmountDisplayLg.lineHeight}px`,
112
+ letterSpacing: `${typography.sAmountDisplayLg.letterSpacing}`,
113
+ fontWeight: typography.sAmountDisplayLg.fontWeight,
114
+ },
115
+ ],
76
116
  },
77
117
  fontFamily: {
78
118
  'default-regular': 'Geist-Regular',
@@ -96,6 +136,11 @@ export const typographyTailwindConfig = {
96
136
  'body-md': `${typography.sBodyMD.letterSpacing}`,
97
137
  'body-sm': `${typography.sBodySM.letterSpacing}`,
98
138
  'body-xs': `${typography.sBodyXS.letterSpacing}`,
139
+ 'page-heading': `${typography.sPageHeading.letterSpacing}`,
140
+ 'section-heading': `${typography.sSectionHeading.letterSpacing}`,
141
+ 'button-label-md': `${typography.sButtonLabelMd.letterSpacing}`,
142
+ 'button-label-lg': `${typography.sButtonLabelLg.letterSpacing}`,
143
+ 'amount-display-lg': `${typography.sAmountDisplayLg.letterSpacing}`,
99
144
  },
100
145
  lineHeight: {
101
146
  'display-lg': `${typography.sDisplayLG.lineHeight}px`,
@@ -107,6 +152,11 @@ export const typographyTailwindConfig = {
107
152
  'body-md': `${typography.sBodyMD.lineHeight}px`,
108
153
  'body-sm': `${typography.sBodySM.lineHeight}px`,
109
154
  'body-xs': `${typography.sBodyXS.lineHeight}px`,
155
+ 'page-heading': `${typography.sPageHeading.lineHeight}px`,
156
+ 'section-heading': `${typography.sSectionHeading.lineHeight}px`,
157
+ 'button-label-md': `${typography.sButtonLabelMd.lineHeight}px`,
158
+ 'button-label-lg': `${typography.sButtonLabelLg.lineHeight}px`,
159
+ 'amount-display-lg': `${typography.sAmountDisplayLg.lineHeight}px`,
110
160
  },
111
161
  };
112
162
  //# sourceMappingURL=typography.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"typography.mjs","sourceRoot":"","sources":["../src/typography.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,gCAAgC;AAIrD,MAAM,CAAC,MAAM,wBAAwB,GAAkC;IACrE,QAAQ,EAAE;QACR,YAAY,EAAE;YACZ,UAAU,CAAC,UAAU,CAAC,QAAQ,CAAC,QAAQ,EAAE;YACzC;gBACE,UAAU,EAAE,GAAG,UAAU,CAAC,UAAU,CAAC,UAAoB,IAAI;gBAC7D,aAAa,EAAE,GAAG,UAAU,CAAC,UAAU,CAAC,aAAuB,EAAE;gBACjE,UAAU,EAAE,UAAU,CAAC,UAAU,CAAC,UAAU;aAC7C;SACF;QACD,YAAY,EAAE;YACZ,UAAU,CAAC,UAAU,CAAC,QAAQ,CAAC,QAAQ,EAAE;YACzC;gBACE,UAAU,EAAE,GAAG,UAAU,CAAC,UAAU,CAAC,UAAoB,IAAI;gBAC7D,aAAa,EAAE,GAAG,UAAU,CAAC,UAAU,CAAC,aAAuB,EAAE;gBACjE,UAAU,EAAE,UAAU,CAAC,UAAU,CAAC,UAAU;aAC7C;SACF;QACD,YAAY,EAAE;YACZ,UAAU,CAAC,UAAU,CAAC,QAAQ,CAAC,QAAQ,EAAE;YACzC;gBACE,UAAU,EAAE,GAAG,UAAU,CAAC,UAAU,CAAC,UAAoB,IAAI;gBAC7D,aAAa,EAAE,GAAG,UAAU,CAAC,UAAU,CAAC,aAAuB,EAAE;gBACjE,UAAU,EAAE,UAAU,CAAC,UAAU,CAAC,UAAU;aAC7C;SACF;QACD,Y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ACD,UAAU,EAAE;QACV,YAAY,EAAE,GAAG,UAAU,CAAC,UAAU,CAAC,UAAoB,IAAI;QAC/D,YAAY,EAAE,GAAG,UAAU,CAAC,UAAU,CAAC,UAAoB,IAAI;QAC/D,YAAY,EAAE,GAAG,UAAU,CAAC,UAAU,CAAC,UAAoB,IAAI;QAC/D,YAAY,EAAE,GAAG,UAAU,CAAC,UAAU,CAAC,UAAoB,IAAI;QAC/D,YAAY,EAAE,GAAG,UAAU,CAAC,UAAU,CAAC,UAAoB,IAAI;QAC/D,SAAS,EAAE,GAAG,UAAU,CAAC,aAAa,CAAC,UAAoB,IAAI;QAC/D,SAAS,EAAE,GAAG,UAAU,CAAC,OAAO,CAAC,UAAoB,IAAI;QACzD,SAAS,EAAE,GAAG,UAAU,CAAC,OAAO,CAAC,UAAoB,IAAI;QACzD,SAAS,EAAE,GAAG,UAAU,CAAC,OAAO,CAAC,UAAoB,IAAI;KAC1D;CACF,CAAC","sourcesContent":["import { typography } from '@metamask/design-tokens';\n\nimport type { TypographyTailwindConfigProps } from './typography.types';\n\nexport const typographyTailwindConfig: TypographyTailwindConfigProps = {\n fontSize: {\n 'display-lg': [\n typography.sDisplayLG.fontSize.toString(),\n {\n lineHeight: `${typography.sDisplayLG.lineHeight as number}px`,\n letterSpacing: `${typography.sDisplayLG.letterSpacing as number}`,\n fontWeight: typography.sDisplayLG.fontWeight,\n },\n ],\n 'display-md': [\n typography.sDisplayMD.fontSize.toString(),\n {\n lineHeight: `${typography.sDisplayMD.lineHeight as number}px`,\n letterSpacing: `${typography.sDisplayMD.letterSpacing as number}`,\n fontWeight: typography.sDisplayMD.fontWeight,\n },\n ],\n 'heading-lg': [\n typography.sHeadingLG.fontSize.toString(),\n {\n lineHeight: `${typography.sHeadingLG.lineHeight as number}px`,\n letterSpacing: `${typography.sHeadingLG.letterSpacing as number}`,\n fontWeight: typography.sHeadingLG.fontWeight,\n },\n ],\n 'heading-md': [\n typography.sHeadingMD.fontSize.toString(),\n {\n lineHeight: `${typography.sHeadingMD.lineHeight as number}px`,\n letterSpacing: `${typography.sHeadingMD.letterSpacing as number}`,\n fontWeight: typography.sHeadingMD.fontWeight,\n },\n ],\n 'heading-sm': [\n typography.sHeadingSM.fontSize.toString(),\n {\n lineHeight: `${typography.sHeadingSM.lineHeight as number}px`,\n letterSpacing: `${typography.sHeadingSM.letterSpacing as number}`,\n fontWeight: typography.sHeadingSM.fontWeight,\n },\n ],\n 'body-lg': [\n typography.sBodyLGMedium.fontSize.toString(),\n {\n lineHeight: `${typography.sBodyLGMedium.lineHeight as number}px`,\n letterSpacing: `${typography.sBodyLGMedium.letterSpacing as number}`,\n fontWeight: typography.sBodyLGMedium.fontWeight,\n },\n ],\n 'body-md': [\n typography.sBodyMD.fontSize.toString(),\n {\n lineHeight: `${typography.sBodyMD.lineHeight as number}px`,\n letterSpacing: `${typography.sBodyMD.letterSpacing as number}`,\n fontWeight: typography.sBodyMD.fontWeight,\n },\n ],\n 'body-sm': [\n typography.sBodySM.fontSize.toString(),\n {\n lineHeight: `${typography.sBodySM.lineHeight as number}px`,\n letterSpacing: `${typography.sBodySM.letterSpacing as number}`,\n fontWeight: typography.sBodySM.fontWeight,\n },\n ],\n 'body-xs': [\n typography.sBodyXS.fontSize.toString(),\n {\n lineHeight: `${typography.sBodyXS.lineHeight as number}px`,\n letterSpacing: `${typography.sBodyXS.letterSpacing as number}`,\n fontWeight: typography.sBodyXS.fontWeight,\n },\n ],\n },\n fontFamily: {\n 'default-regular': 'Geist-Regular',\n 'default-regular-italic': 'Geist-RegularItalic',\n 'default-medium': 'Geist-Medium',\n 'default-medium-italic': 'Geist-MediumItalic',\n 'default-bold': 'Geist-Bold',\n 'default-bold-italic': 'Geist-BoldItalic',\n 'accent-regular': 'MMSans-Regular',\n 'accent-medium': 'MMSans-Medium',\n 'accent-bold': 'MMSans-Bold',\n 'hero-regular': 'MMPoly-Regular',\n },\n letterSpacing: {\n 'display-lg': `${typography.sDisplayLG.letterSpacing as number}`,\n 'display-md': `${typography.sDisplayMD.letterSpacing as number}`,\n 'heading-lg': `${typography.sHeadingLG.letterSpacing as number}`,\n 'heading-md': `${typography.sHeadingMD.letterSpacing as number}`,\n 'heading-sm': `${typography.sHeadingSM.letterSpacing as number}`,\n 'body-lg': `${typography.sBodyLGMedium.letterSpacing as number}`,\n 'body-md': `${typography.sBodyMD.letterSpacing as number}`,\n 'body-sm': `${typography.sBodySM.letterSpacing as number}`,\n 'body-xs': `${typography.sBodyXS.letterSpacing as number}`,\n },\n lineHeight: {\n 'display-lg': `${typography.sDisplayLG.lineHeight as number}px`,\n 'display-md': `${typography.sDisplayMD.lineHeight as number}px`,\n 'heading-lg': `${typography.sHeadingLG.lineHeight as number}px`,\n 'heading-md': `${typography.sHeadingMD.lineHeight as number}px`,\n 'heading-sm': `${typography.sHeadingSM.lineHeight as number}px`,\n 'body-lg': `${typography.sBodyLGMedium.lineHeight as number}px`,\n 'body-md': `${typography.sBodyMD.lineHeight as number}px`,\n 'body-sm': `${typography.sBodySM.lineHeight as number}px`,\n 'body-xs': `${typography.sBodyXS.lineHeight as number}px`,\n },\n};\n"]}
1
+ {"version":3,"file":"typography.mjs","sourceRoot":"","sources":["../src/typography.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,gCAAgC;AAIrD,MAAM,CAAC,MAAM,wBAAwB,GAAkC;IACrE,QAAQ,EAAE;QACR,YAAY,EAAE;YACZ,UAAU,CAAC,UAAU,CAAC,QAAQ,CAAC,QAAQ,EAAE;YACzC;gBACE,UAAU,EAAE,GAAG,UAAU,CAAC,UAAU,CAAC,UAAoB,IAAI;gBAC7D,aAAa,EAAE,GAAG,UAAU,CAAC,UAAU,CAAC,aAAuB,EAAE;gBACjE,UAAU,EAAE,UAAU,CAAC,UAAU,CAAC,UAAU;aAC7C;SACF;QACD,YAAY,EAAE;YACZ,UAAU,CAAC,UAAU,CAAC,QAAQ,CAAC,QAAQ,EAAE;YACzC;gBACE,UAAU,EAAE,GAAG,UAAU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CAAC,UAAoB,IAAI;QAC/D,SAAS,EAAE,GAAG,UAAU,CAAC,OAAO,CAAC,UAAoB,IAAI;QACzD,SAAS,EAAE,GAAG,UAAU,CAAC,OAAO,CAAC,UAAoB,IAAI;QACzD,SAAS,EAAE,GAAG,UAAU,CAAC,OAAO,CAAC,UAAoB,IAAI;QACzD,cAAc,EAAE,GAAG,UAAU,CAAC,YAAY,CAAC,UAAoB,IAAI;QACnE,iBAAiB,EAAE,GAAG,UAAU,CAAC,eAAe,CAAC,UAAoB,IAAI;QACzE,iBAAiB,EAAE,GAAG,UAAU,CAAC,cAAc,CAAC,UAAoB,IAAI;QACxE,iBAAiB,EAAE,GAAG,UAAU,CAAC,cAAc,CAAC,UAAoB,IAAI;QACxE,mBAAmB,EAAE,GAAG,UAAU,CAAC,gBAAgB,CAAC,UAAoB,IAAI;KAC7E;CACF,CAAC","sourcesContent":["import { typography } from '@metamask/design-tokens';\n\nimport type { TypographyTailwindConfigProps } from './typography.types';\n\nexport const typographyTailwindConfig: TypographyTailwindConfigProps = {\n fontSize: {\n 'display-lg': [\n typography.sDisplayLG.fontSize.toString(),\n {\n lineHeight: `${typography.sDisplayLG.lineHeight as number}px`,\n letterSpacing: `${typography.sDisplayLG.letterSpacing as number}`,\n fontWeight: typography.sDisplayLG.fontWeight,\n },\n ],\n 'display-md': [\n typography.sDisplayMD.fontSize.toString(),\n {\n lineHeight: `${typography.sDisplayMD.lineHeight as number}px`,\n letterSpacing: `${typography.sDisplayMD.letterSpacing as number}`,\n fontWeight: typography.sDisplayMD.fontWeight,\n },\n ],\n 'heading-lg': [\n typography.sHeadingLG.fontSize.toString(),\n {\n lineHeight: `${typography.sHeadingLG.lineHeight as number}px`,\n letterSpacing: `${typography.sHeadingLG.letterSpacing as number}`,\n fontWeight: typography.sHeadingLG.fontWeight,\n },\n ],\n 'heading-md': [\n typography.sHeadingMD.fontSize.toString(),\n {\n lineHeight: `${typography.sHeadingMD.lineHeight as number}px`,\n letterSpacing: `${typography.sHeadingMD.letterSpacing as number}`,\n fontWeight: typography.sHeadingMD.fontWeight,\n },\n ],\n 'heading-sm': [\n typography.sHeadingSM.fontSize.toString(),\n {\n lineHeight: `${typography.sHeadingSM.lineHeight as number}px`,\n letterSpacing: `${typography.sHeadingSM.letterSpacing as number}`,\n fontWeight: typography.sHeadingSM.fontWeight,\n },\n ],\n 'body-lg': [\n typography.sBodyLGMedium.fontSize.toString(),\n {\n lineHeight: `${typography.sBodyLGMedium.lineHeight as number}px`,\n letterSpacing: `${typography.sBodyLGMedium.letterSpacing as number}`,\n fontWeight: typography.sBodyLGMedium.fontWeight,\n },\n ],\n 'body-md': [\n typography.sBodyMD.fontSize.toString(),\n {\n lineHeight: `${typography.sBodyMD.lineHeight as number}px`,\n letterSpacing: `${typography.sBodyMD.letterSpacing as number}`,\n fontWeight: typography.sBodyMD.fontWeight,\n },\n ],\n 'body-sm': [\n typography.sBodySM.fontSize.toString(),\n {\n lineHeight: `${typography.sBodySM.lineHeight as number}px`,\n letterSpacing: `${typography.sBodySM.letterSpacing as number}`,\n fontWeight: typography.sBodySM.fontWeight,\n },\n ],\n 'body-xs': [\n typography.sBodyXS.fontSize.toString(),\n {\n lineHeight: `${typography.sBodyXS.lineHeight as number}px`,\n letterSpacing: `${typography.sBodyXS.letterSpacing as number}`,\n fontWeight: typography.sBodyXS.fontWeight,\n },\n ],\n 'page-heading': [\n typography.sPageHeading.fontSize.toString(),\n {\n lineHeight: `${typography.sPageHeading.lineHeight as number}px`,\n letterSpacing: `${typography.sPageHeading.letterSpacing as number}`,\n fontWeight: typography.sPageHeading.fontWeight,\n },\n ],\n 'section-heading': [\n typography.sSectionHeading.fontSize.toString(),\n {\n lineHeight: `${typography.sSectionHeading.lineHeight as number}px`,\n letterSpacing: `${typography.sSectionHeading.letterSpacing as number}`,\n fontWeight: typography.sSectionHeading.fontWeight,\n },\n ],\n 'button-label-md': [\n typography.sButtonLabelMd.fontSize.toString(),\n {\n lineHeight: `${typography.sButtonLabelMd.lineHeight as number}px`,\n letterSpacing: `${typography.sButtonLabelMd.letterSpacing as number}`,\n fontWeight: typography.sButtonLabelMd.fontWeight,\n },\n ],\n 'button-label-lg': [\n typography.sButtonLabelLg.fontSize.toString(),\n {\n lineHeight: `${typography.sButtonLabelLg.lineHeight as number}px`,\n letterSpacing: `${typography.sButtonLabelLg.letterSpacing as number}`,\n fontWeight: typography.sButtonLabelLg.fontWeight,\n },\n ],\n 'amount-display-lg': [\n typography.sAmountDisplayLg.fontSize.toString(),\n {\n lineHeight: `${typography.sAmountDisplayLg.lineHeight as number}px`,\n letterSpacing: `${typography.sAmountDisplayLg.letterSpacing as number}`,\n fontWeight: typography.sAmountDisplayLg.fontWeight,\n },\n ],\n },\n fontFamily: {\n 'default-regular': 'Geist-Regular',\n 'default-regular-italic': 'Geist-RegularItalic',\n 'default-medium': 'Geist-Medium',\n 'default-medium-italic': 'Geist-MediumItalic',\n 'default-bold': 'Geist-Bold',\n 'default-bold-italic': 'Geist-BoldItalic',\n 'accent-regular': 'MMSans-Regular',\n 'accent-medium': 'MMSans-Medium',\n 'accent-bold': 'MMSans-Bold',\n 'hero-regular': 'MMPoly-Regular',\n },\n letterSpacing: {\n 'display-lg': `${typography.sDisplayLG.letterSpacing as number}`,\n 'display-md': `${typography.sDisplayMD.letterSpacing as number}`,\n 'heading-lg': `${typography.sHeadingLG.letterSpacing as number}`,\n 'heading-md': `${typography.sHeadingMD.letterSpacing as number}`,\n 'heading-sm': `${typography.sHeadingSM.letterSpacing as number}`,\n 'body-lg': `${typography.sBodyLGMedium.letterSpacing as number}`,\n 'body-md': `${typography.sBodyMD.letterSpacing as number}`,\n 'body-sm': `${typography.sBodySM.letterSpacing as number}`,\n 'body-xs': `${typography.sBodyXS.letterSpacing as number}`,\n 'page-heading': `${typography.sPageHeading.letterSpacing as number}`,\n 'section-heading': `${typography.sSectionHeading.letterSpacing as number}`,\n 'button-label-md': `${typography.sButtonLabelMd.letterSpacing as number}`,\n 'button-label-lg': `${typography.sButtonLabelLg.letterSpacing as number}`,\n 'amount-display-lg': `${typography.sAmountDisplayLg.letterSpacing as number}`,\n },\n lineHeight: {\n 'display-lg': `${typography.sDisplayLG.lineHeight as number}px`,\n 'display-md': `${typography.sDisplayMD.lineHeight as number}px`,\n 'heading-lg': `${typography.sHeadingLG.lineHeight as number}px`,\n 'heading-md': `${typography.sHeadingMD.lineHeight as number}px`,\n 'heading-sm': `${typography.sHeadingSM.lineHeight as number}px`,\n 'body-lg': `${typography.sBodyLGMedium.lineHeight as number}px`,\n 'body-md': `${typography.sBodyMD.lineHeight as number}px`,\n 'body-sm': `${typography.sBodySM.lineHeight as number}px`,\n 'body-xs': `${typography.sBodyXS.lineHeight as number}px`,\n 'page-heading': `${typography.sPageHeading.lineHeight as number}px`,\n 'section-heading': `${typography.sSectionHeading.lineHeight as number}px`,\n 'button-label-md': `${typography.sButtonLabelMd.lineHeight as number}px`,\n 'button-label-lg': `${typography.sButtonLabelLg.lineHeight as number}px`,\n 'amount-display-lg': `${typography.sAmountDisplayLg.lineHeight as number}px`,\n },\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"typography.types.cjs","sourceRoot":"","sources":["../src/typography.types.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * Different Typography variants to be used as twrnc classNames\n */\nexport type TypographyVariant =\n | 'display-lg'\n | 'display-md'\n | 'heading-lg'\n | 'heading-md'\n | 'heading-sm'\n | 'body-lg'\n | 'body-md'\n | 'body-sm'\n | 'body-xs';\n\n/**\n * Different FontWeight and FontStyle to be used to calculate the FontFamily\n * in getFontFamilyFromWeightAndStyle\n */\nexport type FontWeight =\n | '100'\n | '200'\n | '300'\n | '400'\n | '500'\n | '600'\n | '700'\n | '800'\n | '900'\n | 'normal'\n | 'bold';\nexport type FontStyle = 'normal' | 'italic';\n\n/**\n * Props for TypographyTailwindConfig\n *\n * @example\n * {\n * fontSize: {\n * 'display-md': {\n * fontFamily: 'Geist-Bold',\n * fontSize: '32',\n * fontWeight: '700',\n * letterSpacing: '0',\n * lineHeight: '40px',\n * },\n * },\n * fontFamily: {\n * sans: [\n * 'Geist',\n * 'Helvetica Neue',\n * 'Helvetica',\n * 'Arial',\n * 'sans-serif',\n * ],\n * 'display-md': 'Geist',\n * },\n * letterSpacing: {\n * 'display-md': '0',\n * },\n * fontWeight: {\n * 'display-md': '400',\n * },\n * lineHeight: {\n * 'display-md': '40px',\n * },\n * }\n */\nexport type TypographyTailwindConfigProps = {\n fontSize: Record<\n TypographyVariant,\n [\n string,\n {\n lineHeight: string; // Make sure to include units - \"40px\" instead of \"40\"\n letterSpacing: string;\n fontWeight: string;\n },\n ]\n >;\n fontFamily: {\n 'default-regular': string;\n 'default-regular-italic': string;\n 'default-medium': string;\n 'default-medium-italic': string;\n 'default-bold': string;\n 'default-bold-italic': string;\n 'accent-regular': string;\n 'accent-medium': string;\n 'accent-bold': string;\n 'hero-regular': string;\n };\n letterSpacing: Record<TypographyVariant, string>;\n lineHeight: Record<TypographyVariant, string>; // Make sure to include units - \"40px\" instead of \"40\"\n};\n"]}
1
+ {"version":3,"file":"typography.types.cjs","sourceRoot":"","sources":["../src/typography.types.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * Different Typography variants to be used as twrnc classNames\n */\nexport type TypographyVariant =\n | 'display-lg'\n | 'display-md'\n | 'heading-lg'\n | 'heading-md'\n | 'heading-sm'\n | 'body-lg'\n | 'body-md'\n | 'body-sm'\n | 'body-xs'\n | 'page-heading'\n | 'section-heading'\n | 'button-label-md'\n | 'button-label-lg'\n | 'amount-display-lg';\n\n/**\n * Different FontWeight and FontStyle to be used to calculate the FontFamily\n * in getFontFamilyFromWeightAndStyle\n */\nexport type FontWeight =\n | '100'\n | '200'\n | '300'\n | '400'\n | '500'\n | '600'\n | '700'\n | '800'\n | '900'\n | 'normal'\n | 'bold';\nexport type FontStyle = 'normal' | 'italic';\n\n/**\n * Props for TypographyTailwindConfig\n *\n * @example\n * {\n * fontSize: {\n * 'display-md': {\n * fontFamily: 'Geist-Bold',\n * fontSize: '32',\n * fontWeight: '700',\n * letterSpacing: '0',\n * lineHeight: '40px',\n * },\n * },\n * fontFamily: {\n * sans: [\n * 'Geist',\n * 'Helvetica Neue',\n * 'Helvetica',\n * 'Arial',\n * 'sans-serif',\n * ],\n * 'display-md': 'Geist',\n * },\n * letterSpacing: {\n * 'display-md': '0',\n * },\n * fontWeight: {\n * 'display-md': '400',\n * },\n * lineHeight: {\n * 'display-md': '40px',\n * },\n * }\n */\nexport type TypographyTailwindConfigProps = {\n fontSize: Record<\n TypographyVariant,\n [\n string,\n {\n lineHeight: string; // Make sure to include units - \"40px\" instead of \"40\"\n letterSpacing: string;\n fontWeight: string;\n },\n ]\n >;\n fontFamily: {\n 'default-regular': string;\n 'default-regular-italic': string;\n 'default-medium': string;\n 'default-medium-italic': string;\n 'default-bold': string;\n 'default-bold-italic': string;\n 'accent-regular': string;\n 'accent-medium': string;\n 'accent-bold': string;\n 'hero-regular': string;\n };\n letterSpacing: Record<TypographyVariant, string>;\n lineHeight: Record<TypographyVariant, string>; // Make sure to include units - \"40px\" instead of \"40\"\n};\n"]}
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Different Typography variants to be used as twrnc classNames
3
3
  */
4
- export type TypographyVariant = 'display-lg' | 'display-md' | 'heading-lg' | 'heading-md' | 'heading-sm' | 'body-lg' | 'body-md' | 'body-sm' | 'body-xs';
4
+ export type TypographyVariant = 'display-lg' | 'display-md' | 'heading-lg' | 'heading-md' | 'heading-sm' | 'body-lg' | 'body-md' | 'body-sm' | 'body-xs' | 'page-heading' | 'section-heading' | 'button-label-md' | 'button-label-lg' | 'amount-display-lg';
5
5
  /**
6
6
  * Different FontWeight and FontStyle to be used to calculate the FontFamily
7
7
  * in getFontFamilyFromWeightAndStyle
@@ -1 +1 @@
1
- {"version":3,"file":"typography.types.d.cts","sourceRoot":"","sources":["../src/typography.types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,MAAM,iBAAiB,GACzB,YAAY,GACZ,YAAY,GACZ,YAAY,GACZ,YAAY,GACZ,YAAY,GACZ,SAAS,GACT,SAAS,GACT,SAAS,GACT,SAAS,CAAC;AAEd;;;GAGG;AACH,MAAM,MAAM,UAAU,GAClB,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,QAAQ,GACR,MAAM,CAAC;AACX,MAAM,MAAM,SAAS,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAE5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,MAAM,MAAM,6BAA6B,GAAG;IAC1C,QAAQ,EAAE,MAAM,CACd,iBAAiB,EACjB;QACE,MAAM;QACN;YACE,UAAU,EAAE,MAAM,CAAC;YACnB,aAAa,EAAE,MAAM,CAAC;YACtB,UAAU,EAAE,MAAM,CAAC;SACpB;KACF,CACF,CAAC;IACF,UAAU,EAAE;QACV,iBAAiB,EAAE,MAAM,CAAC;QAC1B,wBAAwB,EAAE,MAAM,CAAC;QACjC,gBAAgB,EAAE,MAAM,CAAC;QACzB,uBAAuB,EAAE,MAAM,CAAC;QAChC,cAAc,EAAE,MAAM,CAAC;QACvB,qBAAqB,EAAE,MAAM,CAAC;QAC9B,gBAAgB,EAAE,MAAM,CAAC;QACzB,eAAe,EAAE,MAAM,CAAC;QACxB,aAAa,EAAE,MAAM,CAAC;QACtB,cAAc,EAAE,MAAM,CAAC;KACxB,CAAC;IACF,aAAa,EAAE,MAAM,CAAC,iBAAiB,EAAE,MAAM,CAAC,CAAC;IACjD,UAAU,EAAE,MAAM,CAAC,iBAAiB,EAAE,MAAM,CAAC,CAAC;CAC/C,CAAC"}
1
+ {"version":3,"file":"typography.types.d.cts","sourceRoot":"","sources":["../src/typography.types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,MAAM,iBAAiB,GACzB,YAAY,GACZ,YAAY,GACZ,YAAY,GACZ,YAAY,GACZ,YAAY,GACZ,SAAS,GACT,SAAS,GACT,SAAS,GACT,SAAS,GACT,cAAc,GACd,iBAAiB,GACjB,iBAAiB,GACjB,iBAAiB,GACjB,mBAAmB,CAAC;AAExB;;;GAGG;AACH,MAAM,MAAM,UAAU,GAClB,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,QAAQ,GACR,MAAM,CAAC;AACX,MAAM,MAAM,SAAS,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAE5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,MAAM,MAAM,6BAA6B,GAAG;IAC1C,QAAQ,EAAE,MAAM,CACd,iBAAiB,EACjB;QACE,MAAM;QACN;YACE,UAAU,EAAE,MAAM,CAAC;YACnB,aAAa,EAAE,MAAM,CAAC;YACtB,UAAU,EAAE,MAAM,CAAC;SACpB;KACF,CACF,CAAC;IACF,UAAU,EAAE;QACV,iBAAiB,EAAE,MAAM,CAAC;QAC1B,wBAAwB,EAAE,MAAM,CAAC;QACjC,gBAAgB,EAAE,MAAM,CAAC;QACzB,uBAAuB,EAAE,MAAM,CAAC;QAChC,cAAc,EAAE,MAAM,CAAC;QACvB,qBAAqB,EAAE,MAAM,CAAC;QAC9B,gBAAgB,EAAE,MAAM,CAAC;QACzB,eAAe,EAAE,MAAM,CAAC;QACxB,aAAa,EAAE,MAAM,CAAC;QACtB,cAAc,EAAE,MAAM,CAAC;KACxB,CAAC;IACF,aAAa,EAAE,MAAM,CAAC,iBAAiB,EAAE,MAAM,CAAC,CAAC;IACjD,UAAU,EAAE,MAAM,CAAC,iBAAiB,EAAE,MAAM,CAAC,CAAC;CAC/C,CAAC"}
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Different Typography variants to be used as twrnc classNames
3
3
  */
4
- export type TypographyVariant = 'display-lg' | 'display-md' | 'heading-lg' | 'heading-md' | 'heading-sm' | 'body-lg' | 'body-md' | 'body-sm' | 'body-xs';
4
+ export type TypographyVariant = 'display-lg' | 'display-md' | 'heading-lg' | 'heading-md' | 'heading-sm' | 'body-lg' | 'body-md' | 'body-sm' | 'body-xs' | 'page-heading' | 'section-heading' | 'button-label-md' | 'button-label-lg' | 'amount-display-lg';
5
5
  /**
6
6
  * Different FontWeight and FontStyle to be used to calculate the FontFamily
7
7
  * in getFontFamilyFromWeightAndStyle
@@ -1 +1 @@
1
- {"version":3,"file":"typography.types.d.mts","sourceRoot":"","sources":["../src/typography.types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,MAAM,iBAAiB,GACzB,YAAY,GACZ,YAAY,GACZ,YAAY,GACZ,YAAY,GACZ,YAAY,GACZ,SAAS,GACT,SAAS,GACT,SAAS,GACT,SAAS,CAAC;AAEd;;;GAGG;AACH,MAAM,MAAM,UAAU,GAClB,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,QAAQ,GACR,MAAM,CAAC;AACX,MAAM,MAAM,SAAS,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAE5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,MAAM,MAAM,6BAA6B,GAAG;IAC1C,QAAQ,EAAE,MAAM,CACd,iBAAiB,EACjB;QACE,MAAM;QACN;YACE,UAAU,EAAE,MAAM,CAAC;YACnB,aAAa,EAAE,MAAM,CAAC;YACtB,UAAU,EAAE,MAAM,CAAC;SACpB;KACF,CACF,CAAC;IACF,UAAU,EAAE;QACV,iBAAiB,EAAE,MAAM,CAAC;QAC1B,wBAAwB,EAAE,MAAM,CAAC;QACjC,gBAAgB,EAAE,MAAM,CAAC;QACzB,uBAAuB,EAAE,MAAM,CAAC;QAChC,cAAc,EAAE,MAAM,CAAC;QACvB,qBAAqB,EAAE,MAAM,CAAC;QAC9B,gBAAgB,EAAE,MAAM,CAAC;QACzB,eAAe,EAAE,MAAM,CAAC;QACxB,aAAa,EAAE,MAAM,CAAC;QACtB,cAAc,EAAE,MAAM,CAAC;KACxB,CAAC;IACF,aAAa,EAAE,MAAM,CAAC,iBAAiB,EAAE,MAAM,CAAC,CAAC;IACjD,UAAU,EAAE,MAAM,CAAC,iBAAiB,EAAE,MAAM,CAAC,CAAC;CAC/C,CAAC"}
1
+ {"version":3,"file":"typography.types.d.mts","sourceRoot":"","sources":["../src/typography.types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,MAAM,iBAAiB,GACzB,YAAY,GACZ,YAAY,GACZ,YAAY,GACZ,YAAY,GACZ,YAAY,GACZ,SAAS,GACT,SAAS,GACT,SAAS,GACT,SAAS,GACT,cAAc,GACd,iBAAiB,GACjB,iBAAiB,GACjB,iBAAiB,GACjB,mBAAmB,CAAC;AAExB;;;GAGG;AACH,MAAM,MAAM,UAAU,GAClB,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,QAAQ,GACR,MAAM,CAAC;AACX,MAAM,MAAM,SAAS,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAE5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,MAAM,MAAM,6BAA6B,GAAG;IAC1C,QAAQ,EAAE,MAAM,CACd,iBAAiB,EACjB;QACE,MAAM;QACN;YACE,UAAU,EAAE,MAAM,CAAC;YACnB,aAAa,EAAE,MAAM,CAAC;YACtB,UAAU,EAAE,MAAM,CAAC;SACpB;KACF,CACF,CAAC;IACF,UAAU,EAAE;QACV,iBAAiB,EAAE,MAAM,CAAC;QAC1B,wBAAwB,EAAE,MAAM,CAAC;QACjC,gBAAgB,EAAE,MAAM,CAAC;QACzB,uBAAuB,EAAE,MAAM,CAAC;QAChC,cAAc,EAAE,MAAM,CAAC;QACvB,qBAAqB,EAAE,MAAM,CAAC;QAC9B,gBAAgB,EAAE,MAAM,CAAC;QACzB,eAAe,EAAE,MAAM,CAAC;QACxB,aAAa,EAAE,MAAM,CAAC;QACtB,cAAc,EAAE,MAAM,CAAC;KACxB,CAAC;IACF,aAAa,EAAE,MAAM,CAAC,iBAAiB,EAAE,MAAM,CAAC,CAAC;IACjD,UAAU,EAAE,MAAM,CAAC,iBAAiB,EAAE,MAAM,CAAC,CAAC;CAC/C,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"typography.types.mjs","sourceRoot":"","sources":["../src/typography.types.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * Different Typography variants to be used as twrnc classNames\n */\nexport type TypographyVariant =\n | 'display-lg'\n | 'display-md'\n | 'heading-lg'\n | 'heading-md'\n | 'heading-sm'\n | 'body-lg'\n | 'body-md'\n | 'body-sm'\n | 'body-xs';\n\n/**\n * Different FontWeight and FontStyle to be used to calculate the FontFamily\n * in getFontFamilyFromWeightAndStyle\n */\nexport type FontWeight =\n | '100'\n | '200'\n | '300'\n | '400'\n | '500'\n | '600'\n | '700'\n | '800'\n | '900'\n | 'normal'\n | 'bold';\nexport type FontStyle = 'normal' | 'italic';\n\n/**\n * Props for TypographyTailwindConfig\n *\n * @example\n * {\n * fontSize: {\n * 'display-md': {\n * fontFamily: 'Geist-Bold',\n * fontSize: '32',\n * fontWeight: '700',\n * letterSpacing: '0',\n * lineHeight: '40px',\n * },\n * },\n * fontFamily: {\n * sans: [\n * 'Geist',\n * 'Helvetica Neue',\n * 'Helvetica',\n * 'Arial',\n * 'sans-serif',\n * ],\n * 'display-md': 'Geist',\n * },\n * letterSpacing: {\n * 'display-md': '0',\n * },\n * fontWeight: {\n * 'display-md': '400',\n * },\n * lineHeight: {\n * 'display-md': '40px',\n * },\n * }\n */\nexport type TypographyTailwindConfigProps = {\n fontSize: Record<\n TypographyVariant,\n [\n string,\n {\n lineHeight: string; // Make sure to include units - \"40px\" instead of \"40\"\n letterSpacing: string;\n fontWeight: string;\n },\n ]\n >;\n fontFamily: {\n 'default-regular': string;\n 'default-regular-italic': string;\n 'default-medium': string;\n 'default-medium-italic': string;\n 'default-bold': string;\n 'default-bold-italic': string;\n 'accent-regular': string;\n 'accent-medium': string;\n 'accent-bold': string;\n 'hero-regular': string;\n };\n letterSpacing: Record<TypographyVariant, string>;\n lineHeight: Record<TypographyVariant, string>; // Make sure to include units - \"40px\" instead of \"40\"\n};\n"]}
1
+ {"version":3,"file":"typography.types.mjs","sourceRoot":"","sources":["../src/typography.types.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * Different Typography variants to be used as twrnc classNames\n */\nexport type TypographyVariant =\n | 'display-lg'\n | 'display-md'\n | 'heading-lg'\n | 'heading-md'\n | 'heading-sm'\n | 'body-lg'\n | 'body-md'\n | 'body-sm'\n | 'body-xs'\n | 'page-heading'\n | 'section-heading'\n | 'button-label-md'\n | 'button-label-lg'\n | 'amount-display-lg';\n\n/**\n * Different FontWeight and FontStyle to be used to calculate the FontFamily\n * in getFontFamilyFromWeightAndStyle\n */\nexport type FontWeight =\n | '100'\n | '200'\n | '300'\n | '400'\n | '500'\n | '600'\n | '700'\n | '800'\n | '900'\n | 'normal'\n | 'bold';\nexport type FontStyle = 'normal' | 'italic';\n\n/**\n * Props for TypographyTailwindConfig\n *\n * @example\n * {\n * fontSize: {\n * 'display-md': {\n * fontFamily: 'Geist-Bold',\n * fontSize: '32',\n * fontWeight: '700',\n * letterSpacing: '0',\n * lineHeight: '40px',\n * },\n * },\n * fontFamily: {\n * sans: [\n * 'Geist',\n * 'Helvetica Neue',\n * 'Helvetica',\n * 'Arial',\n * 'sans-serif',\n * ],\n * 'display-md': 'Geist',\n * },\n * letterSpacing: {\n * 'display-md': '0',\n * },\n * fontWeight: {\n * 'display-md': '400',\n * },\n * lineHeight: {\n * 'display-md': '40px',\n * },\n * }\n */\nexport type TypographyTailwindConfigProps = {\n fontSize: Record<\n TypographyVariant,\n [\n string,\n {\n lineHeight: string; // Make sure to include units - \"40px\" instead of \"40\"\n letterSpacing: string;\n fontWeight: string;\n },\n ]\n >;\n fontFamily: {\n 'default-regular': string;\n 'default-regular-italic': string;\n 'default-medium': string;\n 'default-medium-italic': string;\n 'default-bold': string;\n 'default-bold-italic': string;\n 'accent-regular': string;\n 'accent-medium': string;\n 'accent-bold': string;\n 'hero-regular': string;\n };\n letterSpacing: Record<TypographyVariant, string>;\n lineHeight: Record<TypographyVariant, string>; // Make sure to include units - \"40px\" instead of \"40\"\n};\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@metamask/design-system-twrnc-preset",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "description": "Design System twrnc Preset",
5
5
  "keywords": [
6
6
  "MetaMask",
@@ -27,6 +27,16 @@
27
27
  "default": "./dist/index.cjs"
28
28
  }
29
29
  },
30
+ "./tailwind.config": {
31
+ "import": {
32
+ "types": "./dist/tailwind.config.d.mts",
33
+ "default": "./dist/tailwind.config.mjs"
34
+ },
35
+ "require": {
36
+ "types": "./dist/tailwind.config.d.cts",
37
+ "default": "./dist/tailwind.config.cjs"
38
+ }
39
+ },
30
40
  "./package.json": "./package.json"
31
41
  },
32
42
  "main": "./dist/index.cjs",
@@ -54,7 +64,7 @@
54
64
  "@babel/preset-react": "^7.25.9",
55
65
  "@babel/preset-typescript": "^7.23.3",
56
66
  "@metamask/auto-changelog": "^5.0.2",
57
- "@metamask/design-tokens": "^8.0.0",
67
+ "@metamask/design-tokens": "^8.1.0",
58
68
  "@testing-library/react-native": "^12.8.1",
59
69
  "@ts-bridge/cli": "^0.6.3",
60
70
  "@types/babel__preset-env": "^7",