@symbo.ls/atoms 2.10.258 → 2.10.263
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/Block.js +19 -13
- package/Collection.js +5 -3
- package/Shape/index.js +1 -1
- package/Shape/style.js +7 -7
- package/Theme.js +20 -12
- package/package.json +2 -2
package/Block.js
CHANGED
|
@@ -4,9 +4,11 @@ import { getSpacingBasedOnRatio, getSpacingByKey, transfromGap } from '@symbo.ls
|
|
|
4
4
|
|
|
5
5
|
export const Block = {
|
|
6
6
|
class: {
|
|
7
|
-
boxSizing: ({ props }) => props.boxSizing
|
|
8
|
-
boxSizing:
|
|
9
|
-
|
|
7
|
+
boxSizing: ({ props }) => props.boxSizing
|
|
8
|
+
? ({ boxSizing: props.boxSizing })
|
|
9
|
+
: {
|
|
10
|
+
boxSizing: 'border-box'
|
|
11
|
+
},
|
|
10
12
|
|
|
11
13
|
display: ({ props }) => props.display && ({ display: props.display }),
|
|
12
14
|
|
|
@@ -95,9 +97,11 @@ export const Block = {
|
|
|
95
97
|
marginBlockStart: ({ props }) => props.marginBlockStart ? getSpacingBasedOnRatio(props, 'marginBlockStart') : null,
|
|
96
98
|
marginBlockEnd: ({ props }) => props.marginBlockEnd ? getSpacingBasedOnRatio(props, 'marginBlockEnd') : null,
|
|
97
99
|
|
|
98
|
-
gap: ({ props }) => props.gap
|
|
99
|
-
|
|
100
|
-
|
|
100
|
+
gap: ({ props }) => props.gap
|
|
101
|
+
? ({
|
|
102
|
+
gap: transfromGap(props.gap)
|
|
103
|
+
})
|
|
104
|
+
: null,
|
|
101
105
|
gridArea: ({ props }) => props.gridArea && ({ gridArea: props.gridArea }),
|
|
102
106
|
|
|
103
107
|
flex: ({ props }) => props.flex && ({ flex: props.flex }),
|
|
@@ -122,15 +126,17 @@ export const Block = {
|
|
|
122
126
|
const [alignItems, justifyContent] = props.flexAlign.split(' ')
|
|
123
127
|
return {
|
|
124
128
|
display: 'flex',
|
|
125
|
-
alignItems
|
|
126
|
-
justifyContent
|
|
129
|
+
alignItems,
|
|
130
|
+
justifyContent
|
|
127
131
|
}
|
|
128
132
|
},
|
|
129
133
|
|
|
130
134
|
gridColumn: ({ props }) => props.gridColumn && ({ gridColumn: props.gridColumn }),
|
|
131
|
-
gridColumnStart: ({ props }) => props.columnStart
|
|
132
|
-
|
|
133
|
-
|
|
135
|
+
gridColumnStart: ({ props }) => props.columnStart
|
|
136
|
+
? ({
|
|
137
|
+
gridColumnStart: props.columnStart
|
|
138
|
+
})
|
|
139
|
+
: null,
|
|
134
140
|
gridRow: ({ props }) => props.gridRow && ({ gridRow: props.gridRow }),
|
|
135
141
|
gridRowStart: ({ props }) => props.rowStart ? ({ gridRowStart: props.rowStart }) : null,
|
|
136
142
|
|
|
@@ -152,8 +158,8 @@ export const Block = {
|
|
|
152
158
|
}
|
|
153
159
|
|
|
154
160
|
export const Span = { tag: 'span' }
|
|
155
|
-
export const List = {
|
|
156
|
-
tag: 'ul'
|
|
161
|
+
export const List = {
|
|
162
|
+
tag: 'ul',
|
|
157
163
|
childExtend: { tag: 'li' }
|
|
158
164
|
}
|
|
159
165
|
// export const Article = { tag: 'article' }
|
package/Collection.js
CHANGED
|
@@ -13,9 +13,11 @@ export const Collection = {
|
|
|
13
13
|
for (const obj in param) { data.push(param[obj]) }
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
data = data.map(item => !isObjectLike(item)
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
data = data.map(item => !isObjectLike(item)
|
|
17
|
+
? {
|
|
18
|
+
props: { value: item }
|
|
19
|
+
}
|
|
20
|
+
: item)
|
|
19
21
|
|
|
20
22
|
if (data.length) {
|
|
21
23
|
const t = setTimeout(() => {
|
package/Shape/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict'
|
|
2
2
|
|
|
3
|
-
import { exec, isString
|
|
3
|
+
import { exec, isString } from '@domql/utils'
|
|
4
4
|
import { SHAPES } from './style'
|
|
5
5
|
import { getSpacingBasedOnRatio, getMediaColor } from '@symbo.ls/scratch'
|
|
6
6
|
import { Pseudo } from '../Pseudo'
|
package/Shape/style.js
CHANGED
|
@@ -13,15 +13,15 @@ export const depth = {
|
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
const getComputedBackgroundColor = ({ props }) => {
|
|
16
|
-
return getColor(props.shapeDirectionColor) ||
|
|
17
|
-
getColor(props.borderColor) ||
|
|
18
|
-
getColor(props.backgroundColor) ||
|
|
16
|
+
return getColor(props.shapeDirectionColor) ||
|
|
17
|
+
getColor(props.borderColor) ||
|
|
18
|
+
getColor(props.backgroundColor) ||
|
|
19
19
|
getColor(props.background)
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
const inheritTransition = ({ props }) => {
|
|
23
23
|
const exec = Timing.class.transition({ props })
|
|
24
|
-
return exec && exec
|
|
24
|
+
return exec && exec.transition
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
export const SHAPES = {
|
|
@@ -39,7 +39,7 @@ export const SHAPES = {
|
|
|
39
39
|
display: 'block',
|
|
40
40
|
width: '0px',
|
|
41
41
|
height: '0px',
|
|
42
|
-
border:
|
|
42
|
+
border: '.35em solid',
|
|
43
43
|
borderColor: getComputedBackgroundColor({ props }),
|
|
44
44
|
transition: inheritTransition({ props }),
|
|
45
45
|
transitionProperty: 'border-color',
|
|
@@ -128,7 +128,7 @@ export const SHAPES = {
|
|
|
128
128
|
}
|
|
129
129
|
},
|
|
130
130
|
|
|
131
|
-
hexagon:
|
|
131
|
+
hexagon: ({ props }) => ({
|
|
132
132
|
position: 'relative',
|
|
133
133
|
'&:before, &:after': {
|
|
134
134
|
content: '""',
|
|
@@ -154,7 +154,7 @@ export const SHAPES = {
|
|
|
154
154
|
}
|
|
155
155
|
}),
|
|
156
156
|
|
|
157
|
-
chevron:
|
|
157
|
+
chevron: ({ props }) => ({
|
|
158
158
|
position: 'relative',
|
|
159
159
|
// overflow: 'hidden',
|
|
160
160
|
'&:before, &:after': {
|
package/Theme.js
CHANGED
|
@@ -4,7 +4,9 @@ import {
|
|
|
4
4
|
getMediaTheme,
|
|
5
5
|
getMediaColor,
|
|
6
6
|
transformTextStroke,
|
|
7
|
-
transformShadow
|
|
7
|
+
transformShadow,
|
|
8
|
+
transformBorder,
|
|
9
|
+
transformBackgroundImage
|
|
8
10
|
} from '@symbo.ls/scratch'
|
|
9
11
|
|
|
10
12
|
import { depth } from './Shape/style'
|
|
@@ -57,19 +59,25 @@ export const Theme = {
|
|
|
57
59
|
const globalTheme = getSystemTheme(element)
|
|
58
60
|
if (!props.backgroundImage) return
|
|
59
61
|
return ({
|
|
60
|
-
|
|
62
|
+
backgroundImage: transformBackgroundImage(props.backgroundImage, globalTheme)
|
|
61
63
|
})
|
|
62
64
|
},
|
|
63
|
-
backgroundSize: ({ props }) => props.backgroundSize
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
})
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
65
|
+
backgroundSize: ({ props }) => props.backgroundSize
|
|
66
|
+
? ({
|
|
67
|
+
backgroundSize: props.backgroundSize
|
|
68
|
+
})
|
|
69
|
+
: null,
|
|
70
|
+
backgroundPosition: ({ props }) => props.backgroundPosition
|
|
71
|
+
? ({
|
|
72
|
+
backgroundPosition: props.backgroundPosition
|
|
73
|
+
})
|
|
74
|
+
: null,
|
|
75
|
+
|
|
76
|
+
textStroke: ({ props }) => props.textStroke
|
|
77
|
+
? ({
|
|
78
|
+
WebkitTextStroke: transformTextStroke(props.textStroke)
|
|
79
|
+
})
|
|
80
|
+
: null,
|
|
73
81
|
|
|
74
82
|
outline: ({ props }) => props.outline && ({
|
|
75
83
|
outline: transformBorder(props.outline)
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@symbo.ls/atoms",
|
|
3
|
-
"version": "2.10.
|
|
3
|
+
"version": "2.10.263",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"license": "MIT",
|
|
6
|
-
"gitHead": "
|
|
6
|
+
"gitHead": "4f775c652016ffa5e35f6f374b1c902a7716d5b3",
|
|
7
7
|
"dependencies": {
|
|
8
8
|
"@domql/utils": "latest",
|
|
9
9
|
"@symbo.ls/create-emotion": "latest",
|