@symbo.ls/atoms 2.11.239 → 2.11.240
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/Text.js +15 -10
- package/Theme.js +8 -0
- package/Transform.js +1 -0
- package/package.json +2 -2
package/Text.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
'use strict'
|
|
2
2
|
|
|
3
|
+
import { isUndefined } from '@domql/utils'
|
|
3
4
|
import { getFontSizeByKey, getFontFamily } from '@symbo.ls/scratch'
|
|
4
5
|
|
|
5
6
|
export const Text = {
|
|
@@ -15,18 +16,18 @@ export const Text = {
|
|
|
15
16
|
const { props, deps } = el
|
|
16
17
|
return props.fontSize ? deps.getFontSizeByKey(props.fontSize) : null
|
|
17
18
|
},
|
|
18
|
-
fontFamily: ({ props, deps }) => props.fontFamily && ({
|
|
19
|
+
fontFamily: ({ props, deps }) => !isUndefined(props.fontFamily) && ({
|
|
19
20
|
fontFamily: deps.getFontFamily(props.fontFamily) || props.fontFamily
|
|
20
21
|
}),
|
|
21
|
-
lineHeight: ({ props }) => props.lineHeight && ({ lineHeight: props.lineHeight }),
|
|
22
|
-
// lineHeight: ({ props }) => props.lineHeight && getSpacingBasedOnRatio(props, 'lineHeight', null, ''),
|
|
23
|
-
textDecoration: ({ props }) => props.textDecoration && ({ textDecoration: props.textDecoration }),
|
|
24
|
-
textTransform: ({ props }) => props.textTransform && ({ textTransform: props.textTransform }),
|
|
25
|
-
whiteSpace: ({ props }) => props.whiteSpace && ({ whiteSpace: props.whiteSpace }),
|
|
26
|
-
wordWrap: ({ props }) => props.wordWrap && ({ wordWrap: props.wordWrap }),
|
|
27
|
-
letterSpacing: ({ props }) => props.letterSpacing && ({ letterSpacing: props.letterSpacing }),
|
|
28
|
-
textAlign: ({ props }) => props.textAlign && ({ textAlign: props.textAlign }),
|
|
29
|
-
fontWeight: ({ props }) => props.fontWeight && ({
|
|
22
|
+
lineHeight: ({ props }) => !isUndefined(props.lineHeight) && ({ lineHeight: props.lineHeight }),
|
|
23
|
+
// lineHeight: ({ props }) => !isUndefined(props.lineHeight) && getSpacingBasedOnRatio(props, 'lineHeight', null, ''),
|
|
24
|
+
textDecoration: ({ props }) => !isUndefined(props.textDecoration) && ({ textDecoration: props.textDecoration }),
|
|
25
|
+
textTransform: ({ props }) => !isUndefined(props.textTransform) && ({ textTransform: props.textTransform }),
|
|
26
|
+
whiteSpace: ({ props }) => !isUndefined(props.whiteSpace) && ({ whiteSpace: props.whiteSpace }),
|
|
27
|
+
wordWrap: ({ props }) => !isUndefined(props.wordWrap) && ({ wordWrap: props.wordWrap }),
|
|
28
|
+
letterSpacing: ({ props }) => !isUndefined(props.letterSpacing) && ({ letterSpacing: props.letterSpacing }),
|
|
29
|
+
textAlign: ({ props }) => !isUndefined(props.textAlign) && ({ textAlign: props.textAlign }),
|
|
30
|
+
fontWeight: ({ props }) => !isUndefined(props.fontWeight) && ({
|
|
30
31
|
fontWeight: props.fontWeight,
|
|
31
32
|
fontVariationSettings: '"wght" ' + props.fontWeight
|
|
32
33
|
})
|
|
@@ -65,4 +66,8 @@ export const Footnote = {
|
|
|
65
66
|
props: { fontSize: 'Z' }
|
|
66
67
|
}
|
|
67
68
|
|
|
69
|
+
export const B = { tag: 'b' }
|
|
70
|
+
|
|
71
|
+
export const I = { tag: 'i' }
|
|
72
|
+
|
|
68
73
|
// export const Paragraph = { tag: 'p' }
|
package/Theme.js
CHANGED
|
@@ -159,6 +159,14 @@ export const Theme = {
|
|
|
159
159
|
columnRule: deps.transformBorder(props.columnRule)
|
|
160
160
|
}),
|
|
161
161
|
|
|
162
|
+
filter: ({ props, deps }) => !isUndefined(props.filter) && ({
|
|
163
|
+
filter: props.filter
|
|
164
|
+
}),
|
|
165
|
+
|
|
166
|
+
mixBlendMode: ({ props, deps }) => !isUndefined(props.mixBlendMode) && ({
|
|
167
|
+
mixBlendMode: props.mixBlendMode
|
|
168
|
+
}),
|
|
169
|
+
|
|
162
170
|
appearance: ({ props }) => !isUndefined(props.appearance) && ({
|
|
163
171
|
appearance: props.appearance
|
|
164
172
|
})
|
package/Transform.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
export const Transform = {
|
|
4
4
|
class: {
|
|
5
|
+
zoom: ({ props }) => props.zoom && ({ zoom: props.zoom }),
|
|
5
6
|
transform: ({ props }) => props.transform && ({ transform: props.transform }),
|
|
6
7
|
transformOrigin: ({ props }) => props.transformOrigin && ({ transformOrigin: props.transformOrigin })
|
|
7
8
|
}
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@symbo.ls/atoms",
|
|
3
|
-
"version": "2.11.
|
|
3
|
+
"version": "2.11.240",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"license": "MIT",
|
|
6
|
-
"gitHead": "
|
|
6
|
+
"gitHead": "0a7ee2088e6901cb8b1e8bf753cb6f1697806b27",
|
|
7
7
|
"dependencies": {
|
|
8
8
|
"@domql/state": "latest",
|
|
9
9
|
"@domql/utils": "latest",
|