@contentful/experiences-core 1.11.0-dev-20240716T1557-9d4b02e.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 +15 -1
- package/dist/index.js.map +1 -1
- package/dist/types.d.ts +16 -1
- package/package.json +3 -3
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
|
-
//
|
|
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) {
|