@contentful/experiences-core 1.11.0-dev-20240717T2108-54a1570.0 → 1.11.0-dev-20240718T1445-7c1c865.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -972,7 +972,21 @@ let designTokensRegistry = {};
972
972
  // Therefore only border and in the future text related design tokens are/will be checked in this funciton.
973
973
  // Ensuring values for simple key-value design tokens are not neccessary since they are required via typescript.
974
974
  const ensureValidCompositeValues = (designTokenDefinition) => {
975
- // TODO: add validation logic when text related design tokens are added
975
+ // Text token validation
976
+ if (designTokenDefinition.text) {
977
+ for (const textKey in designTokenDefinition.text) {
978
+ const textValue = designTokenDefinition.text[textKey];
979
+ designTokenDefinition.text[textKey] = {
980
+ emphasis: textValue.emphasis || 'none',
981
+ fontSize: textValue.fontSize || '16px',
982
+ case: textValue.case || 'normal',
983
+ fontWeight: textValue.fontWeight || '400',
984
+ lineHeight: textValue.lineHeight || '20px',
985
+ letterSpacing: textValue.letterSpacing || '0px',
986
+ color: textValue.color || '#000000',
987
+ };
988
+ }
989
+ }
976
990
  // Border validation
977
991
  if (designTokenDefinition.border) {
978
992
  for (const borderKey in designTokenDefinition.border) {