Skip to content

Commit

Permalink
refactor: cpation to subordinate
Browse files Browse the repository at this point in the history
  • Loading branch information
edburyenegren-okta committed Jul 21, 2023
1 parent ffc33e8 commit c21931d
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 28 deletions.
4 changes: 2 additions & 2 deletions packages/odyssey-design-tokens/src/typography.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"support": {
"value": "{hue.neutral.700.value}"
},
"caption": {
"subordinate": {
"comment": "Text color for subordinate text like captions",
"value": "{hue.neutral.600.value}"
},
Expand Down Expand Up @@ -67,7 +67,7 @@
},
"size": {
"base": { "value": "87.5%" },
"caption": { "value": "{typography.scale.0.value}" },
"subordinate": { "value": "{typography.scale.0.value}" },
"body": { "value": "{typography.scale.1.value}" },
"heading6": { "value": "{typography.scale.2.value}" },
"heading5": { "value": "{typography.scale.3.value}" },
Expand Down
48 changes: 24 additions & 24 deletions packages/odyssey-react-mui/src/theme/components.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ export const components = (
maxHeight: "unset",
alignItems: "center",
whiteSpace: "nowrap",
color: odysseyTokens.TypographyColorCaption,
color: odysseyTokens.TypographyColorSubordinate,

...(ownerState.disabled === true && {
display: "none",
Expand Down Expand Up @@ -694,8 +694,8 @@ export const components = (
fontWeight: odysseyTokens.TypographyWeightHeadingBold,
lineHeight: odysseyTokens.TypographyLineHeightOverline,
backgroundColor: odysseyTokens.HueNeutral50,
color: odysseyTokens.TypographyColorCaption,
fontSize: odysseyTokens.TypographySizeCaption,
color: odysseyTokens.TypographyColorSubordinate,
fontSize: odysseyTokens.TypographySizeSubordinate,

"&::before": {
content: "''",
Expand Down Expand Up @@ -835,14 +835,14 @@ export const components = (
code: {
fontFamily: odysseyTokens.TypographyFamilyMono,
display: "inline-block",
minWidth: `calc(${odysseyTokens.TypographySizeCaption} * ${odysseyTokens.TypographyLineHeightHeading5})`,
minWidth: `calc(${odysseyTokens.TypographySizeSubordinate} * ${odysseyTokens.TypographyLineHeightHeading5})`,
borderStyle: odysseyTokens.BorderStyleMain,
borderWidth: odysseyTokens.BorderWidthMain,
borderRadius: odysseyTokens.BorderRadiusTight,
borderColor: odysseyTokens.BorderColorDisplay,
backgroundColor: odysseyTokens.HueNeutral50,
padding: `calc(${odysseyTokens.Spacing1} / 2) ${odysseyTokens.Spacing1}`,
fontSize: odysseyTokens.TypographySizeCaption,
fontSize: odysseyTokens.TypographySizeSubordinate,
lineHeight: odysseyTokens.TypographyLineHeightHeading5,
},

Expand Down Expand Up @@ -927,8 +927,8 @@ export const components = (
},

"figcaption:not([class])": {
color: odysseyTokens.TypographyColorCaption,
fontSize: odysseyTokens.TypographySizeCaption,
color: odysseyTokens.TypographyColorSubordinate,
fontSize: odysseyTokens.TypographySizeSubordinate,
},

hr: {
Expand Down Expand Up @@ -964,7 +964,7 @@ export const components = (

kbd: {
display: "inline-block",
minWidth: `calc(${odysseyTokens.TypographySizeCaption} * ${odysseyTokens.TypographyLineHeightHeading5})`,
minWidth: `calc(${odysseyTokens.TypographySizeSubordinate} * ${odysseyTokens.TypographyLineHeightHeading5})`,
borderStyle: odysseyTokens.BorderStyleMain,
borderWidth: odysseyTokens.BorderWidthMain,
borderRadius: odysseyTokens.BorderRadiusMain,
Expand All @@ -973,7 +973,7 @@ export const components = (
padding: `calc(${odysseyTokens.Spacing1} / 2) ${odysseyTokens.Spacing1}`,
fontFamily:
"'Inconsolata', 'SFMono-Regular', 'Consolas', 'Liberation Mono', 'Menlo', 'Courier', monospace",
fontSize: odysseyTokens.TypographySizeCaption,
fontSize: odysseyTokens.TypographySizeSubordinate,
fontWeight: odysseyTokens.Spacing5,
lineHeight: odysseyTokens.TypographyLineHeightHeading5,
boxShadow: `0 1px 1px 0 hsla(240, 6%, 12%, 0.05)`,
Expand Down Expand Up @@ -1089,15 +1089,15 @@ export const components = (
},

small: {
fontSize: odysseyTokens.TypographySizeCaption,
fontSize: odysseyTokens.TypographySizeSubordinate,
},

strong: {
fontWeight: odysseyTokens.TypographyWeightBodyBold,
},

sub: {
fontSize: odysseyTokens.TypographySizeCaption,
fontSize: odysseyTokens.TypographySizeSubordinate,
lineHeight: 1,
verticalAlign: "sub",
},
Expand All @@ -1117,7 +1117,7 @@ export const components = (
},

sup: {
fontSize: odysseyTokens.TypographySizeCaption,
fontSize: odysseyTokens.TypographySizeSubordinate,
lineHeight: 1,
verticalAlign: "super",
},
Expand Down Expand Up @@ -1291,12 +1291,12 @@ export const components = (
},
styleOverrides: {
root: {
fontSize: odysseyTokens.TypographySizeCaption,
fontSize: odysseyTokens.TypographySizeSubordinate,
lineHeight: odysseyTokens.TypographyLineHeightBody,
marginBlockStart: odysseyTokens.Spacing2,
[`.${formLabelClasses.root} + &`]: {
marginBlockStart: `-${odysseyTokens.Spacing1}`,
color: odysseyTokens.TypographyColorCaption,
color: odysseyTokens.TypographyColorSubordinate,
},
marginBlockEnd: odysseyTokens.Spacing2,
"&:last-child": {
Expand Down Expand Up @@ -1347,7 +1347,7 @@ export const components = (
margin: 0,
alignItems: "center",
whiteSpace: "nowrap",
color: odysseyTokens.TypographyColorCaption,
color: odysseyTokens.TypographyColorSubordinate,
...(ownerState.position === "start" && {
marginInlineStart: odysseyTokens.Spacing2,
}),
Expand Down Expand Up @@ -1444,7 +1444,7 @@ export const components = (

[`label[data-shrink=false] + .${inputBaseClasses.formControl} &`]: {
"&::placeholder": {
color: odysseyTokens.TypographyColorCaption,
color: odysseyTokens.TypographyColorSubordinate,
opacity: "1 !important",
},
},
Expand Down Expand Up @@ -1556,7 +1556,7 @@ export const components = (
},

"&:hover": {
color: odysseyTokens.TypographyColorCaption,
color: odysseyTokens.TypographyColorSubordinate,
},
},
},
Expand All @@ -1574,10 +1574,10 @@ export const components = (
root: {
paddingBlock: odysseyTokens.Spacing2,
paddingInline: odysseyTokens.Spacing4,
fontSize: odysseyTokens.TypographySizeCaption,
fontSize: odysseyTokens.TypographySizeSubordinate,
fontWeight: odysseyTokens.TypographyWeightBodyBold,
lineHeight: odysseyTokens.TypographyLineHeightUi,
color: odysseyTokens.TypographyColorCaption,
color: odysseyTokens.TypographyColorSubordinate,
textTransform: "uppercase",
},
},
Expand Down Expand Up @@ -1868,7 +1868,7 @@ export const components = (
}),

...(ownerState.wrapped && {
fontSize: odysseyTokens.TypographySizeCaption,
fontSize: odysseyTokens.TypographySizeSubordinate,
lineHeight: odysseyTokens.TypographyLineHeightBody,
}),

Expand Down Expand Up @@ -1978,7 +1978,7 @@ export const components = (
}),

...(ownerState.variant === "footer" && {
color: odysseyTokens.TypographyColorCaption,
color: odysseyTokens.TypographyColorSubordinate,
lineHeight: odysseyTokens.TypographyLineHeightBody,
fontSize: odysseyTokens.TypographySizeBody,
}),
Expand Down Expand Up @@ -2089,7 +2089,7 @@ export const components = (
},
},
[`&.${tableSortLabelClasses.active}`]: {
color: odysseyTokens.TypographyColorCaption,
color: odysseyTokens.TypographyColorSubordinate,
[`& .${tableSortLabelClasses.icon}`]: {
opacity: 1,
color: "inherit",
Expand Down Expand Up @@ -2154,12 +2154,12 @@ export const components = (
paddingInline: odysseyTokens.Spacing3,
backgroundColor: odysseyTokens.HueNeutral900,
color: odysseyTokens.HueNeutralWhite,
fontSize: odysseyTokens.TypographySizeCaption,
fontSize: odysseyTokens.TypographySizeSubordinate,
lineHeight: odysseyTokens.TypographyLineHeightBody,
...(ownerState.touch === true && {
paddingBlock: odysseyTokens.Spacing2,
paddingInline: odysseyTokens.Spacing3,
fontSize: odysseyTokens.TypographySizeCaption,
fontSize: odysseyTokens.TypographySizeSubordinate,
lineHeight: odysseyTokens.TypographyLineHeightBody,
fontWeight: odysseyTokens.TypographyWeightBody,
}),
Expand Down
4 changes: 2 additions & 2 deletions packages/odyssey-react-mui/src/theme/typography.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,9 @@ export const typography = (
},
subtitle1: {
// "caption"
color: odysseyTokens.TypographyColorCaption,
color: odysseyTokens.TypographyColorSubordinate,
fontWeight: Number(odysseyTokens.TypographyWeightBody),
fontSize: odysseyTokens.TypographySizeCaption,
fontSize: odysseyTokens.TypographySizeSubordinate,
lineHeight: odysseyTokens.TypographyLineHeightBody,
},
subtitle2: {
Expand Down

0 comments on commit c21931d

Please sign in to comment.