diff --git a/.changeset/spicy-rats-sing.md b/.changeset/spicy-rats-sing.md new file mode 100644 index 000000000..981b5cf4d --- /dev/null +++ b/.changeset/spicy-rats-sing.md @@ -0,0 +1,5 @@ +--- +'@primer/primitives': patch +--- + +Updates the figma build process to add and use new typographic scopes diff --git a/package-lock.json b/package-lock.json index dba983d2e..e2c3fa2d4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@primer/primitives", - "version": "8.0.0", + "version": "8.2.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@primer/primitives", - "version": "8.0.0", + "version": "8.2.0", "license": "MIT", "devDependencies": { "@actions/github": "^6.0.0", diff --git a/src/transformers/figmaAttributes.ts b/src/transformers/figmaAttributes.ts index db120a7aa..af2da4c38 100644 --- a/src/transformers/figmaAttributes.ts +++ b/src/transformers/figmaAttributes.ts @@ -11,6 +11,15 @@ type FigmaVariableScope = | 'SHAPE_FILL' | 'TEXT_FILL' | 'STROKE_COLOR' + | 'OPACITY' + | 'FONT_FAMILY' + | 'FONT_STYLE' + | 'FONT_WEIGHT' + | 'FONT_SIZE' + | 'LINE_HEIGHT' + | 'LETTER_SPACING' + | 'PARAGRAPH_SPACING' + | 'PARAGRAPH_INDENT' const figmaScopes: Record = { all: ['ALL_SCOPES'], @@ -20,6 +29,14 @@ const figmaScopes: Record = { bgColor: ['FRAME_FILL', 'SHAPE_FILL'], fgColor: ['TEXT_FILL', 'SHAPE_FILL'], borderColor: ['STROKE_COLOR'], + fontFamily: ['FONT_FAMILY'], + fontStyle: ['FONT_STYLE'], + fontWeight: ['FONT_WEIGHT'], + fontSize: ['FONT_SIZE'], + lineHeight: ['LINE_HEIGHT'], + letterSpacing: ['LETTER_SPACING'], + paragraphSpacing: ['PARAGRAPH_SPACING'], + paragraphIndent: ['PARAGRAPH_INDENT'], } const getScopes = (scopes: string[] | string | undefined): FigmaVariableScope[] => {