An open source design system that's fully customizable and agent ready
TypeScript
fix(core): use semantic type scale tokens in CodeBlock, add data-autofocus to CommandPaletteInput (#2322)
Cindy Zhangbf5eeb3113d1
diff --git a/packages/core/src/CodeBlock/XDSCodeBlock.tsx b/packages/core/src/CodeBlock/XDSCodeBlock.tsxindex 4b758b70bb..a9a70057f3 100644--- a/packages/core/src/CodeBlock/XDSCodeBlock.tsx+++ b/packages/core/src/CodeBlock/XDSCodeBlock.tsx@@ -24,7 +24,6 @@ import {colorVars,spacingVars,radiusVars,- textSizeVars,typographyVars,fontWeightVars,typeScaleVars,@@ -104,7 +103,7 @@ const styles = stylex.create({display: 'flex',alignItems: 'center',gap: spacingVars['--spacing-1'],- fontSize: textSizeVars['--font-size-sm'],+ fontSize: typeScaleVars['--text-supporting-size'],fontFamily: typographyVars['--font-family-code'],fontWeight: fontWeightVars['--font-weight-medium'],color: 'var(--color-syntax-comment)',@@ -201,13 +200,13 @@ const styles = stylex.create({paddingInline: spacingVars['--spacing-4'],},sizeSm: {- fontSize: textSizeVars['--font-size-sm'],+ fontSize: typeScaleVars['--text-supporting-size'],},sizeMd: {fontSize: typeScaleVars['--text-code-size'],},gutterSm: {- fontSize: textSizeVars['--font-size-sm'],+ fontSize: typeScaleVars['--text-supporting-size'],},gutterMd: {fontSize: typeScaleVars['--text-code-size'],diff --git a/packages/core/src/CommandPalette/XDSCommandPaletteInput.tsx b/packages/core/src/CommandPalette/XDSCommandPaletteInput.tsxindex 78063a6dcd..edeee851ce 100644--- a/packages/core/src/CommandPalette/XDSCommandPaletteInput.tsx+++ b/packages/core/src/CommandPalette/XDSCommandPaletteInput.tsx@@ -210,6 +210,7 @@ export function XDSCommandPaletteInput({}placeholder={placeholder}value={value}+ data-autofocus={effectiveAutoFocus || undefined}onChange={e => {handleValueChange?.(e.target.value);onChange?.(e);