@symbo.ls/atoms
Advanced tools
Comparing version 2.11.453 to 2.11.455
@@ -16,26 +16,30 @@ 'use strict' | ||
const props = { | ||
animation: (el) => el.props.animation && { | ||
animationName: el.deps.applyAnimationProps(el.props.animation, el), | ||
animationDuration: el.deps.getTimingByKey(el.props.animationDuration || 'A').timing, | ||
animationDelay: el.deps.getTimingByKey(el.props.animationDelay || '0s').timing, | ||
animationTimingFunction: el.deps.getTimingFunction(el.props.animationTimingFunction || 'ease'), | ||
animationFillMode: el.props.animationFillMode || 'both', | ||
animationPlayState: el.props.animationPlayState, | ||
animationDirection: el.props.animationDirection | ||
}, | ||
animationName: (el) => el.props.animationName && { | ||
animationName: el.deps.applyAnimationProps(el.props.animationName, el) | ||
}, | ||
animationDuration: ({ props, deps }) => props.animationDuration && ({ | ||
animationDuration: deps.getTimingByKey(props.animationDuration).timing | ||
}), | ||
animationDelay: ({ props, deps }) => props.animationDelay && ({ | ||
animationDelay: deps.getTimingByKey(props.animationDelay).timing | ||
}), | ||
animationTimingFunction: ({ props, deps }) => props.animationTimingFunction && ({ | ||
animationTimingFunction: deps.getTimingFunction(props.animationTimingFunction) | ||
}) | ||
} | ||
export const Animation = { | ||
deps: { isObject, getTimingByKey, getTimingFunction, applyAnimationProps }, | ||
class: { | ||
animation: (el) => el.props.animation && { | ||
animationName: el.deps.applyAnimationProps(el.props.animation, el), | ||
animationDuration: el.deps.getTimingByKey(el.props.animationDuration || 'A').timing, | ||
animationDelay: el.deps.getTimingByKey(el.props.animationDelay || '0s').timing, | ||
animationTimingFunction: el.deps.getTimingFunction(el.props.animationTimingFunction || 'ease'), | ||
animationFillMode: el.props.animationFillMode || 'both', | ||
animationPlayState: el.props.animationPlayState, | ||
animationDirection: el.props.animationDirection | ||
}, | ||
animationName: (el) => el.props.animationName && { | ||
animationName: el.deps.applyAnimationProps(el.props.animationName, el) | ||
}, | ||
animationDuration: ({ props, deps }) => props.animationDuration && ({ | ||
animationDuration: deps.getTimingByKey(props.animationDuration).timing | ||
}), | ||
animationDelay: ({ props, deps }) => props.animationDelay && ({ | ||
animationDelay: deps.getTimingByKey(props.animationDelay).timing | ||
}), | ||
animationTimingFunction: ({ props, deps }) => props.animationTimingFunction && ({ | ||
animationTimingFunction: deps.getTimingFunction(props.animationTimingFunction) | ||
}), | ||
...props, | ||
animationFillMode: ({ props }) => props.animationFillMode && ({ | ||
@@ -42,0 +46,0 @@ animationFillMode: props.animationFillMode |
340
Block.js
@@ -13,2 +13,166 @@ 'use strict' | ||
const props = { | ||
show: (el, s, ctx) => !!(ctx.utils.exec(el.props.show, el, s) === false) && ({ | ||
display: 'none !important' | ||
}), | ||
hide: (el, s, ctx) => !!ctx.utils.exec(el.props.hide, el, s) && ({ | ||
display: 'none !important' | ||
}), | ||
height: ({ props, deps }) => deps.transformSizeRatio('height', props), | ||
width: ({ props, deps }) => deps.transformSizeRatio('width', props), | ||
boxSizing: ({ props, deps }) => !deps.isUndefined(props.boxSizing) | ||
? ({ boxSizing: props.boxSizing }) | ||
: { boxSizing: 'border-box' }, | ||
boxSize: ({ props, deps }) => { | ||
if (!deps.isString(props.boxSize)) return | ||
const [height, width] = props.boxSize.split(' ') | ||
return { | ||
...deps.transformSize('height', height), | ||
...deps.transformSize('width', width || height) | ||
} | ||
}, | ||
inlineSize: ({ props, deps }) => deps.transformSizeRatio('inlineSize', props), | ||
blockSize: ({ props, deps }) => deps.transformSizeRatio('blockSize', props), | ||
minWidth: ({ props, deps }) => deps.transformSizeRatio('minWidth', props), | ||
maxWidth: ({ props, deps }) => deps.transformSizeRatio('maxWidth', props), | ||
widthRange: ({ props, deps }) => { | ||
if (!deps.isString(props.widthRange)) return | ||
const [minWidth, maxWidth] = props.widthRange.split(' ') | ||
return { | ||
...deps.transformSize('minWidth', minWidth), | ||
...deps.transformSize('maxWidth', maxWidth || minWidth) | ||
} | ||
}, | ||
minHeight: ({ props, deps }) => deps.transformSizeRatio('minHeight', props), | ||
maxHeight: ({ props, deps }) => deps.transformSizeRatio('maxHeight', props), | ||
heightRange: ({ props, deps }) => { | ||
if (!deps.isString(props.heightRange)) return | ||
const [minHeight, maxHeight] = props.heightRange.split(' ') | ||
return { | ||
...deps.transformSize('minHeight', minHeight), | ||
...deps.transformSize('maxHeight', maxHeight || minHeight) | ||
} | ||
}, | ||
size: ({ props, deps }) => { | ||
if (!deps.isString(props.size)) return | ||
const [inlineSize, blockSize] = props.size.split(' ') | ||
return { | ||
...deps.transformSizeRatio('inlineSize', inlineSize), | ||
...deps.transformSizeRatio('blockSize', blockSize || inlineSize) | ||
} | ||
}, | ||
minBlockSize: ({ props, deps }) => deps.transformSizeRatio('minBlockSize', props), | ||
minInlineSize: ({ props, deps }) => deps.transformSizeRatio('minInlineSize', props), | ||
maxBlockSize: ({ props, deps }) => deps.transformSizeRatio('maxBlockSize', props), | ||
maxInlineSize: ({ props, deps }) => deps.transformSizeRatio('maxInlineSize', props), | ||
minSize: ({ props, deps }) => { | ||
if (!deps.isString(props.minSize)) return | ||
const [minInlineSize, minBlockSize] = props.minSize.split(' ') | ||
return { | ||
...deps.transformSize('minInlineSize', minInlineSize), | ||
...deps.transformSize('minBlockSize', minBlockSize || minInlineSize) | ||
} | ||
}, | ||
maxSize: ({ props, deps }) => { | ||
if (!deps.isString(props.maxSize)) return | ||
const [maxInlineSize, maxBlockSize] = props.maxSize.split(' ') | ||
return { | ||
...deps.transformSize('maxInlineSize', maxInlineSize), | ||
...deps.transformSize('maxBlockSize', maxBlockSize || maxInlineSize) | ||
} | ||
}, | ||
borderWidth: ({ props, deps }) => deps.transformSizeRatio('borderWidth', props), | ||
padding: ({ props, deps }) => deps.transformSizeRatio('padding', props), | ||
scrollPadding: ({ props, deps }) => deps.transformSizeRatio('scrollPadding', props), | ||
paddingInline: ({ props, deps }) => { | ||
if (!deps.isString(props.paddingInline)) return | ||
const [paddingInlineStart, paddingInlineEnd] = props.paddingInline.split(' ') | ||
return { | ||
...deps.transformSize('paddingInlineStart', paddingInlineStart), | ||
...deps.transformSize('paddingInlineEnd', paddingInlineEnd || paddingInlineStart) | ||
} | ||
}, | ||
paddingBlock: ({ props, deps }) => { | ||
if (!deps.isString(props.paddingBlock)) return | ||
const [paddingBlockStart, paddingBlockEnd] = props.paddingBlock.split(' ') | ||
return { | ||
...deps.transformSize('paddingBlockStart', paddingBlockStart), | ||
...deps.transformSize('paddingBlockEnd', paddingBlockEnd || paddingBlockStart) | ||
} | ||
}, | ||
paddingInlineStart: ({ props, deps }) => deps.transformSizeRatio('paddingInlineStart', props), | ||
paddingInlineEnd: ({ props, deps }) => deps.transformSizeRatio('paddingInlineEnd', props), | ||
paddingBlockStart: ({ props, deps }) => deps.transformSizeRatio('paddingBlockStart', props), | ||
paddingBlockEnd: ({ props, deps }) => deps.transformSizeRatio('paddingBlockEnd', props), | ||
margin: ({ props, deps }) => deps.transformSizeRatio('margin', props), | ||
marginInline: ({ props, deps }) => { | ||
if (!deps.isString(props.marginInline)) return | ||
const [marginInlineStart, marginInlineEnd] = props.marginInline.split(' ') | ||
return { | ||
...deps.transformSize('marginInlineStart', marginInlineStart), | ||
...deps.transformSize('marginInlineEnd', marginInlineEnd || marginInlineStart) | ||
} | ||
}, | ||
marginBlock: ({ props, deps }) => { | ||
if (!deps.isString(props.marginBlock)) return | ||
const [marginBlockStart, marginBlockEnd] = props.marginBlock.split(' ') | ||
return { | ||
...deps.transformSize('marginBlockStart', marginBlockStart), | ||
...deps.transformSize('marginBlockEnd', marginBlockEnd || marginBlockStart) | ||
} | ||
}, | ||
marginInlineStart: ({ props, deps }) => deps.transformSizeRatio('marginInlineStart', props), | ||
marginInlineEnd: ({ props, deps }) => deps.transformSizeRatio('marginInlineEnd', props), | ||
marginBlockStart: ({ props, deps }) => deps.transformSizeRatio('marginBlockStart', props), | ||
marginBlockEnd: ({ props, deps }) => deps.transformSizeRatio('marginBlockEnd', props), | ||
gap: ({ props, deps }) => !deps.isUndefined(props.gap) && ({ | ||
gap: transfromGap(props.gap) | ||
}), | ||
columnGap: ({ props, deps }) => !deps.isUndefined(props.columnGap) ? deps.getSpacingBasedOnRatio(props, 'columnGap') : null, | ||
rowGap: ({ props, deps }) => !deps.isUndefined(props.rowGap) ? deps.getSpacingBasedOnRatio(props, 'rowGap') : null, | ||
flexWrap: ({ props, deps }) => !deps.isUndefined(props.flexWrap) && ({ | ||
display: 'flex', | ||
flexFlow: (props.flexFlow || 'row').split(' ')[0] + ' ' + props.flexWrap | ||
}), | ||
flexFlow: ({ props, deps }) => { | ||
const { flexFlow, reverse } = props | ||
if (!deps.isString(flexFlow)) return | ||
let [direction, wrap] = (flexFlow || 'row').split(' ') | ||
if (flexFlow.startsWith('x') || flexFlow === 'row') direction = 'row' | ||
if (flexFlow.startsWith('y') || flexFlow === 'column') direction = 'column' | ||
return { | ||
display: 'flex', | ||
flexFlow: (direction || '') + (!direction.includes('-reverse') && reverse ? '-reverse' : '') + ' ' + (wrap || '') | ||
} | ||
}, | ||
flexAlign: ({ props, deps }) => { | ||
if (!deps.isString(props.flexAlign)) return | ||
const [alignItems, justifyContent] = props.flexAlign.split(' ') | ||
return { | ||
display: 'flex', | ||
alignItems, | ||
justifyContent | ||
} | ||
} | ||
} | ||
export const Block = { | ||
@@ -26,5 +190,3 @@ deps: { | ||
class: { | ||
boxSizing: ({ props, deps }) => !deps.isUndefined(props.boxSizing) | ||
? ({ boxSizing: props.boxSizing }) | ||
: { boxSizing: 'border-box' }, | ||
...props, | ||
@@ -35,80 +197,2 @@ display: ({ props, deps }) => !deps.isUndefined(props.display) && ({ | ||
show: (el, s, ctx) => !!(ctx.utils.exec(el.props.show, el, s) === false) && ({ | ||
display: 'none !important' | ||
}), | ||
hide: (el, s, ctx) => !!ctx.utils.exec(el.props.hide, el, s) && ({ | ||
display: 'none !important' | ||
}), | ||
height: ({ props, deps }) => deps.transformSizeRatio('height', props), | ||
width: ({ props, deps }) => deps.transformSizeRatio('width', props), | ||
boxSize: ({ props, deps }) => { | ||
if (!deps.isString(props.boxSize)) return | ||
const [height, width] = props.boxSize.split(' ') | ||
return { | ||
...deps.transformSize('height', height), | ||
...deps.transformSize('width', width || height) | ||
} | ||
}, | ||
inlineSize: ({ props, deps }) => deps.transformSizeRatio('inlineSize', props), | ||
blockSize: ({ props, deps }) => deps.transformSizeRatio('blockSize', props), | ||
minWidth: ({ props, deps }) => deps.transformSizeRatio('minWidth', props), | ||
maxWidth: ({ props, deps }) => deps.transformSizeRatio('maxWidth', props), | ||
widthRange: ({ props, deps }) => { | ||
if (!deps.isString(props.widthRange)) return | ||
const [minWidth, maxWidth] = props.widthRange.split(' ') | ||
return { | ||
...deps.transformSize('minWidth', minWidth), | ||
...deps.transformSize('maxWidth', maxWidth || minWidth) | ||
} | ||
}, | ||
minHeight: ({ props, deps }) => deps.transformSizeRatio('minHeight', props), | ||
maxHeight: ({ props, deps }) => deps.transformSizeRatio('maxHeight', props), | ||
heightRange: ({ props, deps }) => { | ||
if (!deps.isString(props.heightRange)) return | ||
const [minHeight, maxHeight] = props.heightRange.split(' ') | ||
return { | ||
...deps.transformSize('minHeight', minHeight), | ||
...deps.transformSize('maxHeight', maxHeight || minHeight) | ||
} | ||
}, | ||
size: ({ props, deps }) => { | ||
if (!deps.isString(props.size)) return | ||
const [inlineSize, blockSize] = props.size.split(' ') | ||
return { | ||
...deps.transformSizeRatio('inlineSize', inlineSize), | ||
...deps.transformSizeRatio('blockSize', blockSize || inlineSize) | ||
} | ||
}, | ||
minBlockSize: ({ props, deps }) => deps.transformSizeRatio('minBlockSize', props), | ||
minInlineSize: ({ props, deps }) => deps.transformSizeRatio('minInlineSize', props), | ||
maxBlockSize: ({ props, deps }) => deps.transformSizeRatio('maxBlockSize', props), | ||
maxInlineSize: ({ props, deps }) => deps.transformSizeRatio('maxInlineSize', props), | ||
minSize: ({ props, deps }) => { | ||
if (!deps.isString(props.minSize)) return | ||
const [minInlineSize, minBlockSize] = props.minSize.split(' ') | ||
return { | ||
...deps.transformSize('minInlineSize', minInlineSize), | ||
...deps.transformSize('minBlockSize', minBlockSize || minInlineSize) | ||
} | ||
}, | ||
maxSize: ({ props, deps }) => { | ||
if (!deps.isString(props.maxSize)) return | ||
const [maxInlineSize, maxBlockSize] = props.maxSize.split(' ') | ||
return { | ||
...deps.transformSize('maxInlineSize', maxInlineSize), | ||
...deps.transformSize('maxBlockSize', maxBlockSize || maxInlineSize) | ||
} | ||
}, | ||
direction: ({ props, deps }) => !deps.isUndefined(props.direction) && ({ | ||
@@ -126,56 +210,2 @@ direction: props.direction | ||
borderWidth: ({ props, deps }) => deps.transformSizeRatio('borderWidth', props), | ||
padding: ({ props, deps }) => deps.transformSizeRatio('padding', props), | ||
scrollPadding: ({ props, deps }) => deps.transformSizeRatio('scrollPadding', props), | ||
paddingInline: ({ props, deps }) => { | ||
if (!deps.isString(props.paddingInline)) return | ||
const [paddingInlineStart, paddingInlineEnd] = props.paddingInline.split(' ') | ||
return { | ||
...deps.transformSize('paddingInlineStart', paddingInlineStart), | ||
...deps.transformSize('paddingInlineEnd', paddingInlineEnd || paddingInlineStart) | ||
} | ||
}, | ||
paddingBlock: ({ props, deps }) => { | ||
if (!deps.isString(props.paddingBlock)) return | ||
const [paddingBlockStart, paddingBlockEnd] = props.paddingBlock.split(' ') | ||
return { | ||
...deps.transformSize('paddingBlockStart', paddingBlockStart), | ||
...deps.transformSize('paddingBlockEnd', paddingBlockEnd || paddingBlockStart) | ||
} | ||
}, | ||
paddingInlineStart: ({ props, deps }) => deps.transformSizeRatio('paddingInlineStart', props), | ||
paddingInlineEnd: ({ props, deps }) => deps.transformSizeRatio('paddingInlineEnd', props), | ||
paddingBlockStart: ({ props, deps }) => deps.transformSizeRatio('paddingBlockStart', props), | ||
paddingBlockEnd: ({ props, deps }) => deps.transformSizeRatio('paddingBlockEnd', props), | ||
margin: ({ props, deps }) => deps.transformSizeRatio('margin', props), | ||
marginInline: ({ props, deps }) => { | ||
if (!deps.isString(props.marginInline)) return | ||
const [marginInlineStart, marginInlineEnd] = props.marginInline.split(' ') | ||
return { | ||
...deps.transformSize('marginInlineStart', marginInlineStart), | ||
...deps.transformSize('marginInlineEnd', marginInlineEnd || marginInlineStart) | ||
} | ||
}, | ||
marginBlock: ({ props, deps }) => { | ||
if (!deps.isString(props.marginBlock)) return | ||
const [marginBlockStart, marginBlockEnd] = props.marginBlock.split(' ') | ||
return { | ||
...deps.transformSize('marginBlockStart', marginBlockStart), | ||
...deps.transformSize('marginBlockEnd', marginBlockEnd || marginBlockStart) | ||
} | ||
}, | ||
marginInlineStart: ({ props, deps }) => deps.transformSizeRatio('marginInlineStart', props), | ||
marginInlineEnd: ({ props, deps }) => deps.transformSizeRatio('marginInlineEnd', props), | ||
marginBlockStart: ({ props, deps }) => deps.transformSizeRatio('marginBlockStart', props), | ||
marginBlockEnd: ({ props, deps }) => deps.transformSizeRatio('marginBlockEnd', props), | ||
gap: ({ props, deps }) => !deps.isUndefined(props.gap) && ({ | ||
gap: transfromGap(props.gap) | ||
}), | ||
columnGap: ({ props, deps }) => props.columnGap ? deps.getSpacingBasedOnRatio(props, 'columnGap') : null, | ||
rowGap: ({ props, deps }) => props.rowGap ? deps.getSpacingBasedOnRatio(props, 'rowGap') : null, | ||
gridArea: ({ props, deps }) => props.gridArea && ({ gridArea: props.gridArea }), | ||
@@ -212,27 +242,2 @@ | ||
flexWrap: ({ props, deps }) => !deps.isUndefined(props.flexWrap) && ({ | ||
display: 'flex', | ||
flexFlow: (props.flexFlow || 'row').split(' ')[0] + ' ' + props.flexWrap | ||
}), | ||
flexFlow: ({ props, deps }) => { | ||
const { flexFlow, reverse } = props | ||
if (!deps.isString(flexFlow)) return | ||
let [direction, wrap] = (flexFlow || 'row').split(' ') | ||
if (flexFlow.startsWith('x') || flexFlow === 'row') direction = 'row' | ||
if (flexFlow.startsWith('y') || flexFlow === 'column') direction = 'column' | ||
return { | ||
display: 'flex', | ||
flexFlow: (direction || '') + (!direction.includes('-reverse') && reverse ? '-reverse' : '') + ' ' + (wrap || '') | ||
} | ||
}, | ||
flexAlign: ({ props, deps }) => { | ||
if (!deps.isString(props.flexAlign)) return | ||
const [alignItems, justifyContent] = props.flexAlign.split(' ') | ||
return { | ||
display: 'flex', | ||
alignItems, | ||
justifyContent | ||
} | ||
}, | ||
gridColumn: ({ props, deps }) => !deps.isUndefined(props.gridColumn) && ({ | ||
@@ -255,3 +260,5 @@ gridColumn: props.gridColumn | ||
verticalAlign: ({ props, deps }) => !deps.isUndefined(props.verticalAlign) && ({ verticalAlign: props.verticalAlign }), | ||
verticalAlign: ({ props, deps }) => !deps.isUndefined(props.verticalAlign) && ({ | ||
verticalAlign: props.verticalAlign | ||
}), | ||
@@ -298,15 +305,4 @@ columns: ({ props, deps }) => !deps.isUndefined(props.columns) && ({ | ||
export const Gutter = { | ||
deps: { getSpacingByKey }, | ||
props: { | ||
size: 'C1' | ||
}, | ||
class: { | ||
size: ({ props, deps }) => { | ||
if (!deps.isString(props.size)) return | ||
const [height, width] = props.size.split(' ') | ||
return { | ||
...deps.getSpacingByKey('height', height), | ||
...deps.getSpacingByKey('width', width || height) | ||
} | ||
} | ||
} | ||
@@ -313,0 +309,0 @@ } |
@@ -10,3 +10,3 @@ 'use strict' | ||
const { __ref: ref } = el | ||
const { children, childrenAs, childrenExtends } = (el.props || {}) | ||
const { children, childrenAs, childExtends } = (el.props || {}) | ||
const childrenExec = children && exec(children, el, state) | ||
@@ -16,3 +16,3 @@ | ||
param = deepCloneWithExtend(childrenExec) | ||
if (childrenAs) param = param.map(v => ({ extend: childrenExtends, [childrenAs]: v })) | ||
if (childrenAs) param = param.map(v => ({ extend: childExtends, [childrenAs]: v })) | ||
} else if (isObject(childrenExec)) { | ||
@@ -24,3 +24,3 @@ param = deepCloneWithExtend(childrenExec) | ||
}) | ||
if (childrenAs) param = param.map(v => ({ extend: childrenExtends, [childrenAs]: v })) | ||
if (childrenAs) param = param.map(v => ({ extend: childExtends, [childrenAs]: v })) | ||
} | ||
@@ -27,0 +27,0 @@ |
{ | ||
"name": "@symbo.ls/atoms", | ||
"version": "2.11.453", | ||
"version": "2.11.455", | ||
"main": "index.js", | ||
"license": "MIT", | ||
"gitHead": "8e5458a957b9d2c75944023e2c31bab157034314", | ||
"gitHead": "2ec12ac36ba08a2d424a3806dba7ccb6f7bddfba", | ||
"dependencies": { | ||
@@ -8,0 +8,0 @@ "@domql/state": "^2.5.0", |
14
Svg.js
@@ -11,4 +11,6 @@ 'use strict' | ||
}, | ||
html: ({ key, props, context, ...el }) => { | ||
html: (el) => { | ||
const { props, context } = el | ||
if (props.semantic_symbols) return | ||
if (props.html) return el.call('exec', props.html, el) | ||
@@ -19,4 +21,4 @@ const { designSystem, utils } = context | ||
if (props.html) return props.html | ||
if (!useSvgSprite && props.src) return props.src | ||
const src = el.call('exec', props.src, el) | ||
if (!useSvgSprite && src) return src | ||
@@ -28,3 +30,3 @@ const useSVGSymbol = icon => `<use xlink:href="#${icon}" />` | ||
const symbolId = Symbol.for(props.src) | ||
const symbolId = Symbol.for(src) | ||
let SVGKey = SVG[symbolId] | ||
@@ -34,5 +36,5 @@ if (SVGKey && SVG[SVGKey]) return useSVGSymbol(SVGKey) | ||
SVGKey = SVG[symbolId] = Math.random() | ||
if (props.src) { | ||
if (src) { | ||
utils.init({ | ||
svg: { [SVGKey]: props.src } | ||
svg: { [SVGKey]: src } | ||
}, { | ||
@@ -39,0 +41,0 @@ document: context.document, |
27
Text.js
@@ -6,2 +6,16 @@ 'use strict' | ||
const props = { | ||
fontSize: (el) => { | ||
const { props, deps } = el | ||
return props.fontSize ? deps.getFontSizeByKey(props.fontSize) : null | ||
}, | ||
fontFamily: ({ props, deps }) => ({ | ||
fontFamily: deps.getFontFamily(props.fontFamily) || props.fontFamily | ||
}), | ||
fontWeight: ({ props }) => ({ | ||
fontWeight: props.fontWeight, | ||
fontVariationSettings: '"wght" ' + props.fontWeight | ||
}) | ||
} | ||
export const Text = { | ||
@@ -13,2 +27,3 @@ deps: { exec, getFontSizeByKey, getFontFamily }, | ||
if (props.text === true) return (state && state[key]) || (props && props[key]) | ||
// return console.log(el) || deps.exec(props.text, el) | ||
return deps.exec(props.text, el) | ||
@@ -18,10 +33,3 @@ }, | ||
class: { | ||
fontSize: (el) => { | ||
const { props, deps } = el | ||
return props.fontSize ? deps.getFontSizeByKey(props.fontSize) : null | ||
}, | ||
font: ({ props }) => !isUndefined(props.font) && ({ font: props.font }), | ||
fontFamily: ({ props, deps }) => !isUndefined(props.fontFamily) && ({ | ||
fontFamily: deps.getFontFamily(props.fontFamily) || props.fontFamily | ||
}), | ||
lineHeight: ({ props }) => !isUndefined(props.lineHeight) && ({ lineHeight: props.lineHeight }), | ||
@@ -40,6 +48,3 @@ // lineHeight: ({ props }) => !isUndefined(props.lineHeight) && getSpacingBasedOnRatio(props, 'lineHeight', null, ''), | ||
textIndent: ({ props }) => !isUndefined(props.textIndent) && ({ textIndent: props.textIndent }), | ||
fontWeight: ({ props }) => !isUndefined(props.fontWeight) && ({ | ||
fontWeight: props.fontWeight, | ||
fontVariationSettings: '"wght" ' + props.fontWeight | ||
}) | ||
...props | ||
} | ||
@@ -46,0 +51,0 @@ } |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
66430
28
1779