@symbo.ls/atoms 2.11.426 → 2.11.427
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 +23 -17
- package/Collection.js +12 -3
- package/Grid.js +1 -4
- package/Svg.js +1 -3
- package/Text.js +1 -0
- package/Theme.js +4 -0
- package/XYZ.js +3 -1
- package/package.json +2 -2
package/Block.js
CHANGED
|
@@ -38,8 +38,8 @@ export const Block = {
|
|
|
38
38
|
display: 'none !important'
|
|
39
39
|
}),
|
|
40
40
|
|
|
41
|
-
width: ({ props, deps }) => deps.transformSizeRatio('width', props),
|
|
42
41
|
height: ({ props, deps }) => deps.transformSizeRatio('height', props),
|
|
42
|
+
width: ({ props, deps }) => deps.transformSizeRatio('width', props),
|
|
43
43
|
|
|
44
44
|
boxSize: ({ props, deps }) => {
|
|
45
45
|
if (!deps.isString(props.boxSize)) return
|
|
@@ -50,6 +50,9 @@ export const Block = {
|
|
|
50
50
|
}
|
|
51
51
|
},
|
|
52
52
|
|
|
53
|
+
inlineSize: ({ props, deps }) => deps.transformSizeRatio('inlineSize', props),
|
|
54
|
+
blockSize: ({ props, deps }) => deps.transformSizeRatio('blockSize', props),
|
|
55
|
+
|
|
53
56
|
minWidth: ({ props, deps }) => deps.transformSizeRatio('minWidth', props),
|
|
54
57
|
maxWidth: ({ props, deps }) => deps.transformSizeRatio('maxWidth', props),
|
|
55
58
|
widthRange: ({ props, deps }) => {
|
|
@@ -72,21 +75,30 @@ export const Block = {
|
|
|
72
75
|
}
|
|
73
76
|
},
|
|
74
77
|
|
|
78
|
+
size: ({ props, deps }) => {
|
|
79
|
+
if (!deps.isString(props.size)) return
|
|
80
|
+
const [inlineSize, blockSize] = props.size.split(' ')
|
|
81
|
+
return {
|
|
82
|
+
...deps.transformSizeRatio('inlineSize', inlineSize),
|
|
83
|
+
...deps.transformSizeRatio('blockSize', blockSize || inlineSize)
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
|
|
75
87
|
minSize: ({ props, deps }) => {
|
|
76
88
|
if (!deps.isString(props.minSize)) return
|
|
77
|
-
const [
|
|
89
|
+
const [minInlineSize, minBlockSize] = props.minSize.split(' ')
|
|
78
90
|
return {
|
|
79
|
-
...deps.transformSize('
|
|
80
|
-
...deps.transformSize('
|
|
91
|
+
...deps.transformSize('minInlineSize', minInlineSize),
|
|
92
|
+
...deps.transformSize('minBlockSize', minBlockSize || minInlineSize)
|
|
81
93
|
}
|
|
82
94
|
},
|
|
83
95
|
|
|
84
96
|
maxSize: ({ props, deps }) => {
|
|
85
97
|
if (!deps.isString(props.maxSize)) return
|
|
86
|
-
const [
|
|
98
|
+
const [maxInlineSize, maxBlockSize] = props.maxSize.split(' ')
|
|
87
99
|
return {
|
|
88
|
-
...deps.transformSize('
|
|
89
|
-
...deps.transformSize('
|
|
100
|
+
...deps.transformSize('maxInlineSize', maxInlineSize),
|
|
101
|
+
...deps.transformSize('maxBlockSize', maxBlockSize || maxInlineSize)
|
|
90
102
|
}
|
|
91
103
|
},
|
|
92
104
|
|
|
@@ -152,6 +164,10 @@ export const Block = {
|
|
|
152
164
|
gap: ({ props, deps }) => !deps.isUndefined(props.gap) && ({
|
|
153
165
|
gap: transfromGap(props.gap)
|
|
154
166
|
}),
|
|
167
|
+
|
|
168
|
+
columnGap: ({ props, deps }) => props.columnGap ? deps.getSpacingBasedOnRatio(props, 'columnGap') : null,
|
|
169
|
+
rowGap: ({ props, deps }) => props.rowGap ? deps.getSpacingBasedOnRatio(props, 'rowGap') : null,
|
|
170
|
+
|
|
155
171
|
gridArea: ({ props, deps }) => props.gridArea && ({ gridArea: props.gridArea }),
|
|
156
172
|
|
|
157
173
|
float: ({ props, deps }) => !deps.isUndefined(props.float) && ({
|
|
@@ -221,15 +237,6 @@ export const Block = {
|
|
|
221
237
|
gridRowStart: props.gridRowStart
|
|
222
238
|
}),
|
|
223
239
|
|
|
224
|
-
size: ({ props, deps }) => {
|
|
225
|
-
if (!deps.isString(props.heightRange)) return
|
|
226
|
-
const [minHeight, maxHeight] = props.heightRange.split(' ')
|
|
227
|
-
return {
|
|
228
|
-
...deps.transformSizeRatio('minHeight', minHeight),
|
|
229
|
-
...deps.transformSizeRatio('maxHeight', maxHeight || minHeight)
|
|
230
|
-
}
|
|
231
|
-
},
|
|
232
|
-
|
|
233
240
|
resize: ({ props, deps }) => !deps.isUndefined(props.resize) && ({
|
|
234
241
|
resize: props.resize
|
|
235
242
|
}),
|
|
@@ -245,7 +252,6 @@ export const Block = {
|
|
|
245
252
|
columnWidth: ({ props, deps }) => !deps.isUndefined(props.columnWidth) && ({
|
|
246
253
|
columnWidth: props.columnWidth
|
|
247
254
|
}),
|
|
248
|
-
columnGap: ({ props, deps }) => deps.transformSizeRatio('columnGap', props),
|
|
249
255
|
columnSpan: ({ props, deps }) => !deps.isUndefined(props.columnSpan) && ({
|
|
250
256
|
columnSpan: props.columnSpan
|
|
251
257
|
}),
|
package/Collection.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
'use strict'
|
|
2
2
|
|
|
3
3
|
import { isState, getChildStateInKey } from '@domql/state'
|
|
4
|
+
import { addAdditionalExtend } from '@domql/element/utils/component'
|
|
4
5
|
import { isString, isNot, isArray, isObject, isObjectLike, exec, deepCloneWithExtend } from '@domql/utils'
|
|
5
6
|
|
|
6
7
|
export const Collection = {
|
|
@@ -9,12 +10,19 @@ export const Collection = {
|
|
|
9
10
|
const { __ref: ref } = el
|
|
10
11
|
const { children, childrenAs, childrenExtend } = (el.props || {})
|
|
11
12
|
const childrenExec = children && exec(children, el, state)
|
|
12
|
-
const hasChildren = isArray(childrenExec)
|
|
13
13
|
|
|
14
|
-
if (
|
|
14
|
+
if (isArray(childrenExec)) {
|
|
15
15
|
param = deepCloneWithExtend(childrenExec)
|
|
16
16
|
if (childrenAs) param = param.map(v => ({ extend: childrenExtend, [childrenAs]: v }))
|
|
17
|
-
} else if (
|
|
17
|
+
} else if (isObject(childrenExec)) {
|
|
18
|
+
param = deepCloneWithExtend(childrenExec)
|
|
19
|
+
param = Object.keys(param).map(v => {
|
|
20
|
+
const val = param[v]
|
|
21
|
+
return addAdditionalExtend(v, val)
|
|
22
|
+
})
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
if (!param) return
|
|
18
26
|
|
|
19
27
|
if (isString(param)) {
|
|
20
28
|
if (param === 'state') param = state.parse()
|
|
@@ -109,6 +117,7 @@ export const Collection = {
|
|
|
109
117
|
const obj = {
|
|
110
118
|
tag: 'fragment',
|
|
111
119
|
props: {
|
|
120
|
+
children: el.props && el.props.children,
|
|
112
121
|
childProps: el.props && el.props.childProps
|
|
113
122
|
}
|
|
114
123
|
}
|
package/Grid.js
CHANGED
|
@@ -24,9 +24,6 @@ export const Grid = {
|
|
|
24
24
|
autoRows: ({ props }) => props.autoRows ? ({ gridAutoRows: props.autoRows }) : null,
|
|
25
25
|
rowStart: ({ props }) => props.rowStart ? ({ gridRowStart: props.rowStart }) : null,
|
|
26
26
|
|
|
27
|
-
autoFlow: ({ props }) => props.autoFlow ? ({ gridAutoFlow: props.autoFlow }) : null
|
|
28
|
-
|
|
29
|
-
columnGap: ({ props, deps }) => props.columnGap ? deps.getSpacingBasedOnRatio(props, 'columnGap') : null,
|
|
30
|
-
rowGap: ({ props, deps }) => props.rowGap ? deps.getSpacingBasedOnRatio(props, 'rowGap') : null
|
|
27
|
+
autoFlow: ({ props }) => props.autoFlow ? ({ gridAutoFlow: props.autoFlow }) : null
|
|
31
28
|
}
|
|
32
29
|
}
|
package/Svg.js
CHANGED
package/Text.js
CHANGED
|
@@ -32,6 +32,7 @@ export const Text = {
|
|
|
32
32
|
textAlign: ({ props }) => !isUndefined(props.textAlign) && ({ textAlign: props.textAlign }),
|
|
33
33
|
writingMode: ({ props }) => !isUndefined(props.writingMode) && ({ writingMode: props.writingMode }),
|
|
34
34
|
textOrientation: ({ props }) => !isUndefined(props.textOrientation) && ({ textOrientation: props.textOrientation }),
|
|
35
|
+
textIndent: ({ props }) => !isUndefined(props.textIndent) && ({ textIndent: props.textIndent }),
|
|
35
36
|
fontWeight: ({ props }) => !isUndefined(props.fontWeight) && ({
|
|
36
37
|
fontWeight: props.fontWeight,
|
|
37
38
|
fontVariationSettings: '"wght" ' + props.fontWeight
|
package/Theme.js
CHANGED
|
@@ -160,6 +160,10 @@ export const Theme = {
|
|
|
160
160
|
backdropFilter: props.backdropFilter
|
|
161
161
|
}),
|
|
162
162
|
|
|
163
|
+
caretColor: ({ props }) => !isUndefined(props.caretColor) && ({
|
|
164
|
+
caretColor: props.caretColor
|
|
165
|
+
}),
|
|
166
|
+
|
|
163
167
|
opacity: ({ props }) => !isUndefined(props.opacity) && ({
|
|
164
168
|
opacity: props.opacity
|
|
165
169
|
}),
|
package/XYZ.js
CHANGED
|
@@ -4,6 +4,8 @@ import { isUndefined } from '@domql/utils'
|
|
|
4
4
|
|
|
5
5
|
export const XYZ = {
|
|
6
6
|
class: {
|
|
7
|
-
zIndex: ({ props }) => !isUndefined(props.zIndex) && ({ zIndex: props.zIndex })
|
|
7
|
+
zIndex: ({ props }) => !isUndefined(props.zIndex) && ({ zIndex: props.zIndex }),
|
|
8
|
+
perspective: ({ props }) => !isUndefined(props.perspective) && ({ perspective: props.perspective }),
|
|
9
|
+
perspectiveOrigin: ({ props }) => !isUndefined(props.perspectiveOrigin) && ({ perspectiveOrigin: props.perspectiveOrigin })
|
|
8
10
|
}
|
|
9
11
|
}
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@symbo.ls/atoms",
|
|
3
|
-
"version": "2.11.
|
|
3
|
+
"version": "2.11.427",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"license": "MIT",
|
|
6
|
-
"gitHead": "
|
|
6
|
+
"gitHead": "60efc845b7989c7e8e631bacfdaa0dba0827b8cf",
|
|
7
7
|
"dependencies": {
|
|
8
8
|
"@domql/state": "latest",
|
|
9
9
|
"@domql/utils": "latest",
|