Skip to content

Commit

Permalink
Inline Vanilla Extract styles exported by Capsize (#1423)
Browse files Browse the repository at this point in the history
  • Loading branch information
mrm007 authored Jan 16, 2024
1 parent c63374d commit 24f9844
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 16 deletions.
5 changes: 5 additions & 0 deletions .changeset/clean-coats-tie.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'braid-design-system': patch
---

Inline Vanilla Extract styles imported from Capsize
2 changes: 1 addition & 1 deletion packages/braid-design-system/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,6 @@
"dependencies": {
"@capsizecss/core": "^3.1.0",
"@capsizecss/metrics": "^1.1.1",
"@capsizecss/vanilla-extract": "^1.0.0",
"@types/autosuggest-highlight": "^3.1.1",
"@types/dedent": "^0.7.0",
"@types/lodash": "^4.14.168",
Expand Down Expand Up @@ -212,6 +211,7 @@
"@babel/core": "^7.18.0",
"@babel/plugin-transform-typescript": "^7.20.13",
"@braid-design-system/source.macro": "*",
"@capsizecss/vanilla-extract": "^1.0.1",
"@svgr/core": "^5.5.0",
"@svgr/plugin-jsx": "^5.5.0",
"@svgr/plugin-prettier": "^5.5.0",
Expand Down
4 changes: 4 additions & 0 deletions packages/braid-design-system/src/lib/css/capsize.css.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// ! Do not add exports that are not Vanilla Extract styles
// Until Capsize is packaged with Crackle, we need to use this file to correctly generate CSS in consuming apps.
// See this PR for detailed explanation: https://github.com/seek-oss/braid-design-system/pull/1423
export { createTextStyle } from '@capsizecss/vanilla-extract';
2 changes: 1 addition & 1 deletion packages/braid-design-system/src/lib/css/typography.css.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import {
styleVariants,
} from '@vanilla-extract/css';
import { calc } from '@vanilla-extract/css-utils';
import { createTextStyle } from '@capsizecss/vanilla-extract';

import { createTextStyle } from './capsize.css';
import { vars } from '../themes/vars.css';
import { breakpointQuery, responsiveStyle } from '../css/responsiveStyle';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import mapValues from 'lodash/mapValues';
import { getCapHeight } from '@capsizecss/core';
import { precomputeValues } from '@capsizecss/vanilla-extract';
import { getCapHeight, precomputeValues } from '@capsizecss/core';

import type { BraidTokens, TextDefinition } from './tokenType';

Expand Down
16 changes: 6 additions & 10 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion site/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
"@braid-design-system/docs-ui": "*",
"@braid-design-system/generate-component-docs": "*",
"@braid-design-system/source.macro": "*",
"@capsizecss/vanilla-extract": "^1.0.0",
"@types/dedent": "^0.7.0",
"@types/lodash": "^4.14.168",
"@types/react": "^18.0.21",
Expand Down
2 changes: 1 addition & 1 deletion site/src/App/Markdown/Markdown.css.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { style } from '@vanilla-extract/css';
import { createTextStyle } from '@capsizecss/vanilla-extract';
import { createTextStyle } from 'braid-src/lib/css/capsize.css';
import { vars } from 'braid-src/lib/themes/vars.css';

const toCapsizeValues = ({
Expand Down

0 comments on commit 24f9844

Please sign in to comment.