diff --git a/package.json b/package.json index 1e02078..cd87686 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,6 @@ }, "dependencies": { "@capsizecss/core": "^3.1.1", - "@capsizecss/metrics": "^1.2.0", "@emotion/cache": "^11.7.1", "@emotion/react": "^11.7.1", "@emotion/serialize": "^1.0.2", diff --git a/packages/co-design-core/package.json b/packages/co-design-core/package.json index 7fd441e..4dde000 100644 --- a/packages/co-design-core/package.json +++ b/packages/co-design-core/package.json @@ -19,11 +19,12 @@ "directory": "packages/co-design-core" }, "peerDependencies": { - "@co-design/hooks": "^0.6.1", + "@co-design/hooks": "^0.9.1", "react": ">=16.8.0", "react-dom": ">=16.8.0" }, "dependencies": { - "@co-design/styles": "^0.10.0" + "@co-design/styles": "^0.10.0", + "@capsizecss/core": "^3.1.1" } } diff --git a/packages/co-design-core/src/components/Typography/Typography.style.ts b/packages/co-design-core/src/components/Typography/Typography.style.ts index de5c3c7..39b66b9 100644 --- a/packages/co-design-core/src/components/Typography/Typography.style.ts +++ b/packages/co-design-core/src/components/Typography/Typography.style.ts @@ -1,6 +1,18 @@ import { createStyleObject } from '@capsizecss/core'; import { createStyles, CSSObject, defaultFontStyles, CoTypography, CoTypographyValue, getColor, CoColor } from '@co-design/styles'; -import fontMetrics from '@capsizecss/metrics/arial'; + +// @capsizecss/metrics/arial +const fontMetrics = { + familyName: 'Arial', + category: 'sans-serif', + capHeight: 1467, + ascent: 1854, + descent: -434, + lineGap: 67, + unitsPerEm: 2048, + xHeight: 1062, + xWidthAvg: 904, +}; interface TypographyStyles { color: CoColor; diff --git a/yarn.lock b/yarn.lock index adefa0f..9fa2742 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1242,11 +1242,6 @@ dependencies: csstype "^3.1.1" -"@capsizecss/metrics@^1.2.0": - version "1.2.0" - resolved "https://registry.yarnpkg.com/@capsizecss/metrics/-/metrics-1.2.0.tgz#7c6f8817efa910eb1b0257a785300ab4e033ad26" - integrity sha512-zUYcqaR0rv4TYXyY97G1vRMMOyz+3EteXqLsM1XO/N8LnThwR1wYSE5cU15CUx3KPAiAEIbUZ13B7+plxYjHUA== - "@colors/colors@1.5.0": version "1.5.0" resolved "https://registry.yarnpkg.com/@colors/colors/-/colors-1.5.0.tgz#bb504579c1cae923e6576a4f5da43d25f97bdbd9"