@symbo.ls/atoms 2.11.426 → 2.11.428
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 +29 -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,36 @@ 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
|
+
|
|
87
|
+
minBlockSize: ({ props, deps }) => deps.transformSizeRatio('minBlockSize', props),
|
|
88
|
+
minInlineSize: ({ props, deps }) => deps.transformSizeRatio('minInlineSize', props),
|
|
89
|
+
|
|
90
|
+
maxBlockSize: ({ props, deps }) => deps.transformSizeRatio('maxBlockSize', props),
|
|
91
|
+
maxInlineSize: ({ props, deps }) => deps.transformSizeRatio('maxInlineSize', props),
|
|
92
|
+
|
|
75
93
|
minSize: ({ props, deps }) => {
|
|
76
94
|
if (!deps.isString(props.minSize)) return
|
|
77
|
-
const [
|
|
95
|
+
const [minInlineSize, minBlockSize] = props.minSize.split(' ')
|
|
78
96
|
return {
|
|
79
|
-
...deps.transformSize('
|
|
80
|
-
...deps.transformSize('
|
|
97
|
+
...deps.transformSize('minInlineSize', minInlineSize),
|
|
98
|
+
...deps.transformSize('minBlockSize', minBlockSize || minInlineSize)
|
|
81
99
|
}
|
|
82
100
|
},
|
|
83
101
|
|
|
84
102
|
maxSize: ({ props, deps }) => {
|
|
85
103
|
if (!deps.isString(props.maxSize)) return
|
|
86
|
-
const [
|
|
104
|
+
const [maxInlineSize, maxBlockSize] = props.maxSize.split(' ')
|
|
87
105
|
return {
|
|
88
|
-
...deps.transformSize('
|
|
89
|
-
...deps.transformSize('
|
|
106
|
+
...deps.transformSize('maxInlineSize', maxInlineSize),
|
|
107
|
+
...deps.transformSize('maxBlockSize', maxBlockSize || maxInlineSize)
|
|
90
108
|
}
|
|
91
109
|
},
|
|
92
110
|
|
|
@@ -152,6 +170,10 @@ export const Block = {
|
|
|
152
170
|
gap: ({ props, deps }) => !deps.isUndefined(props.gap) && ({
|
|
153
171
|
gap: transfromGap(props.gap)
|
|
154
172
|
}),
|
|
173
|
+
|
|
174
|
+
columnGap: ({ props, deps }) => props.columnGap ? deps.getSpacingBasedOnRatio(props, 'columnGap') : null,
|
|
175
|
+
rowGap: ({ props, deps }) => props.rowGap ? deps.getSpacingBasedOnRatio(props, 'rowGap') : null,
|
|
176
|
+
|
|
155
177
|
gridArea: ({ props, deps }) => props.gridArea && ({ gridArea: props.gridArea }),
|
|
156
178
|
|
|
157
179
|
float: ({ props, deps }) => !deps.isUndefined(props.float) && ({
|
|
@@ -221,15 +243,6 @@ export const Block = {
|
|
|
221
243
|
gridRowStart: props.gridRowStart
|
|
222
244
|
}),
|
|
223
245
|
|
|
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
246
|
resize: ({ props, deps }) => !deps.isUndefined(props.resize) && ({
|
|
234
247
|
resize: props.resize
|
|
235
248
|
}),
|
|
@@ -245,7 +258,6 @@ export const Block = {
|
|
|
245
258
|
columnWidth: ({ props, deps }) => !deps.isUndefined(props.columnWidth) && ({
|
|
246
259
|
columnWidth: props.columnWidth
|
|
247
260
|
}),
|
|
248
|
-
columnGap: ({ props, deps }) => deps.transformSizeRatio('columnGap', props),
|
|
249
261
|
columnSpan: ({ props, deps }) => !deps.isUndefined(props.columnSpan) && ({
|
|
250
262
|
columnSpan: props.columnSpan
|
|
251
263
|
}),
|
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.428",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"license": "MIT",
|
|
6
|
-
"gitHead": "
|
|
6
|
+
"gitHead": "8f69088ccb7bd0b239a5b637595d34fbee5f76b1",
|
|
7
7
|
"dependencies": {
|
|
8
8
|
"@domql/state": "latest",
|
|
9
9
|
"@domql/utils": "latest",
|