@symbo.ls/atoms 2.11.289 → 2.11.304
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/Flex.js +13 -1
- package/Svg.js +3 -6
- package/Timing.js +7 -6
- package/Transform.js +5 -3
- package/XYZ.js +3 -1
- package/package.json +2 -3
package/Flex.js
CHANGED
|
@@ -1,12 +1,24 @@
|
|
|
1
1
|
'use strict'
|
|
2
2
|
|
|
3
|
+
import { isUndefined } from '@domql/utils'
|
|
4
|
+
|
|
3
5
|
export const Flex = {
|
|
4
6
|
props: {
|
|
5
7
|
display: 'flex'
|
|
6
8
|
},
|
|
7
9
|
|
|
8
10
|
class: {
|
|
9
|
-
flow: ({ props }) =>
|
|
11
|
+
flow: ({ props }) => {
|
|
12
|
+
const { flow } = props
|
|
13
|
+
if (isUndefined(flow)) return
|
|
14
|
+
let [direction, wrap] = flow.split(' ')
|
|
15
|
+
if (flow.startsWith('x') || flow.startsWith('row')) direction = 'row'
|
|
16
|
+
if (flow.startsWith('y') || flow.startsWith('column')) direction = 'column'
|
|
17
|
+
return {
|
|
18
|
+
flexFlow: (direction || '') + (props.reverse ? '-reverse' : '') + ' ' + (wrap || '')
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
|
|
10
22
|
wrap: ({ props }) => props.wrap && ({ flexWrap: props.wrap }),
|
|
11
23
|
align: ({ props }) => {
|
|
12
24
|
if (typeof props.align !== 'string') return
|
package/Svg.js
CHANGED
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
'use strict'
|
|
2
2
|
|
|
3
|
-
import { init } from '@symbo.ls/init'
|
|
4
|
-
|
|
5
3
|
// create SVG symbol
|
|
6
4
|
export const Svg = {
|
|
7
5
|
tag: 'svg',
|
|
8
|
-
deps: { init },
|
|
9
6
|
props: {
|
|
10
7
|
style: { '*': { fill: 'currentColor' } }
|
|
11
8
|
},
|
|
@@ -13,8 +10,8 @@ export const Svg = {
|
|
|
13
10
|
xmlns: 'http://www.w3.org/2000/svg',
|
|
14
11
|
'xmlns:xlink': 'http://www.w3.org/1999/xlink'
|
|
15
12
|
},
|
|
16
|
-
html: ({ key, props, context,
|
|
17
|
-
const { designSystem } = context
|
|
13
|
+
html: ({ key, props, context, ...el }) => {
|
|
14
|
+
const { designSystem, utils } = context
|
|
18
15
|
const SVG = designSystem && designSystem.SVG
|
|
19
16
|
const useSvgSprite = props.spriteId || (context.designSystem && context.designSystem.useSvgSprite)
|
|
20
17
|
|
|
@@ -31,7 +28,7 @@ export const Svg = {
|
|
|
31
28
|
|
|
32
29
|
SVGKey = SVG[symbolId] = Math.random()
|
|
33
30
|
if (props.src) {
|
|
34
|
-
|
|
31
|
+
utils.init({
|
|
35
32
|
svg: { [SVGKey]: props.src }
|
|
36
33
|
}, {
|
|
37
34
|
document: context.document,
|
package/Timing.js
CHANGED
|
@@ -5,6 +5,7 @@ import {
|
|
|
5
5
|
splitTransition,
|
|
6
6
|
transformDuration
|
|
7
7
|
} from '@symbo.ls/scratch'
|
|
8
|
+
import { isUndefined } from 'smbls'
|
|
8
9
|
|
|
9
10
|
export const Timing = {
|
|
10
11
|
deps: {
|
|
@@ -14,22 +15,22 @@ export const Timing = {
|
|
|
14
15
|
},
|
|
15
16
|
|
|
16
17
|
class: {
|
|
17
|
-
transition: ({ props, deps }) => props.transition && ({
|
|
18
|
+
transition: ({ props, deps }) => !isUndefined(props.transition) && ({
|
|
18
19
|
transition: deps.splitTransition(props.transition)
|
|
19
20
|
}),
|
|
20
|
-
willChange: ({ props }) => props.willChange && ({
|
|
21
|
+
willChange: ({ props }) => !isUndefined(props.willChange) && ({
|
|
21
22
|
willChange: props.willChange
|
|
22
23
|
}),
|
|
23
|
-
transitionDuration: ({ props, deps }) => props.transitionDuration && ({
|
|
24
|
+
transitionDuration: ({ props, deps }) => !isUndefined(props.transitionDuration) && ({
|
|
24
25
|
transitionDuration: deps.transformDuration(props.transitionDuration)
|
|
25
26
|
}),
|
|
26
|
-
transitionDelay: ({ props, deps }) => props.transitionDelay && ({
|
|
27
|
+
transitionDelay: ({ props, deps }) => !isUndefined(props.transitionDelay) && ({
|
|
27
28
|
transitionDelay: deps.transformDuration(props.transitionDelay)
|
|
28
29
|
}),
|
|
29
|
-
transitionTimingFunction: ({ props, deps }) => props.transitionTimingFunction && ({
|
|
30
|
+
transitionTimingFunction: ({ props, deps }) => !isUndefined(props.transitionTimingFunction) && ({
|
|
30
31
|
transitionTimingFunction: deps.getTimingFunction(props.transitionTimingFunction)
|
|
31
32
|
}),
|
|
32
|
-
transitionProperty: ({ props }) => props.transitionProperty && ({
|
|
33
|
+
transitionProperty: ({ props }) => !isUndefined(props.transitionProperty) && ({
|
|
33
34
|
transitionProperty: props.transitionProperty,
|
|
34
35
|
willChange: props.transitionProperty
|
|
35
36
|
})
|
package/Transform.js
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
'use strict'
|
|
2
2
|
|
|
3
|
+
import { isUndefined } from 'smbls'
|
|
4
|
+
|
|
3
5
|
export const Transform = {
|
|
4
6
|
class: {
|
|
5
|
-
zoom: ({ props }) => props.zoom && ({ zoom: props.zoom }),
|
|
6
|
-
transform: ({ props }) => props.transform && ({ transform: props.transform }),
|
|
7
|
-
transformOrigin: ({ props }) => props.transformOrigin && ({ transformOrigin: props.transformOrigin })
|
|
7
|
+
zoom: ({ props }) => !isUndefined(props.zoom) && ({ zoom: props.zoom }),
|
|
8
|
+
transform: ({ props }) => !isUndefined(props.transform) && ({ transform: props.transform }),
|
|
9
|
+
transformOrigin: ({ props }) => !isUndefined(props.transformOrigin) && ({ transformOrigin: props.transformOrigin })
|
|
8
10
|
}
|
|
9
11
|
}
|
package/XYZ.js
CHANGED
package/package.json
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@symbo.ls/atoms",
|
|
3
|
-
"version": "2.11.
|
|
3
|
+
"version": "2.11.304",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"license": "MIT",
|
|
6
|
-
"gitHead": "
|
|
6
|
+
"gitHead": "7844f8284253f6a9b992109e1af842910c20e806",
|
|
7
7
|
"dependencies": {
|
|
8
8
|
"@domql/state": "latest",
|
|
9
9
|
"@domql/utils": "latest",
|
|
10
10
|
"@symbo.ls/emotion": "latest",
|
|
11
|
-
"@symbo.ls/init": "latest",
|
|
12
11
|
"@symbo.ls/scratch": "latest"
|
|
13
12
|
},
|
|
14
13
|
"source": "src/index.js",
|