@symbo.ls/atoms 2.11.333 → 2.11.335
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 +3 -1
- package/Media.js +10 -9
- package/package.json +2 -2
package/Flex.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict'
|
|
2
2
|
|
|
3
|
-
import { isString } from '@domql/utils'
|
|
3
|
+
import { isString, isUndefined } from '@domql/utils'
|
|
4
4
|
|
|
5
5
|
export const Flex = {
|
|
6
6
|
props: {
|
|
@@ -19,6 +19,8 @@ export const Flex = {
|
|
|
19
19
|
}
|
|
20
20
|
},
|
|
21
21
|
|
|
22
|
+
verticalAlign: ({ props }) => !isUndefined(props.verticalAlign) && ({ flexWrap: props.verticalAlign }),
|
|
23
|
+
|
|
22
24
|
wrap: ({ props }) => props.wrap && ({ flexWrap: props.wrap }),
|
|
23
25
|
align: ({ props }) => {
|
|
24
26
|
if (!isString(props.align)) return
|
package/Media.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict'
|
|
2
2
|
|
|
3
|
-
import { merge, isArray, overwriteShallow } from '@domql/utils'
|
|
3
|
+
import { merge, isArray, overwriteDeep, overwriteShallow } from '@domql/utils'
|
|
4
4
|
import { getSystemTheme } from './Theme'
|
|
5
5
|
|
|
6
6
|
export const keySetters = {
|
|
@@ -130,13 +130,13 @@ const applyConditionalCaseProps = (key, props, result, element) => {
|
|
|
130
130
|
const caseKey = key.slice(1)
|
|
131
131
|
const isPropTrue = element.props[caseKey] || element.state[caseKey]
|
|
132
132
|
if (!isPropTrue) return // remove classname if not here
|
|
133
|
-
return
|
|
133
|
+
return overwriteDeep(result, convertPropsToClass(props, result, element))
|
|
134
134
|
}
|
|
135
135
|
|
|
136
136
|
const applyConditionalFalsyProps = (key, props, result, element) => {
|
|
137
137
|
const caseKey = key.slice(1)
|
|
138
138
|
const isPropTrue = element.props[caseKey] || element.state[caseKey] === true
|
|
139
|
-
if (!isPropTrue) return
|
|
139
|
+
if (!isPropTrue) return overwriteDeep(result, convertPropsToClass(props, result, element))
|
|
140
140
|
}
|
|
141
141
|
|
|
142
142
|
const applyTrueProps = (props, result, element) => merge(result, convertPropsToClass(props, result, element))
|
|
@@ -166,17 +166,18 @@ const beforeClassAssign = (element, s) => {
|
|
|
166
166
|
isForced: true,
|
|
167
167
|
preventDefineUpdate: true
|
|
168
168
|
})
|
|
169
|
-
}
|
|
169
|
+
}
|
|
170
170
|
}
|
|
171
171
|
if (setter) setter(key, props[key], CLASS_NAMES, element)
|
|
172
|
+
else if (key === 'true') applyTrueProps(props[key], CLASS_NAMES, element)
|
|
172
173
|
}
|
|
173
174
|
|
|
174
175
|
// override props
|
|
175
|
-
if (props['^']) {
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
}
|
|
176
|
+
// if (props['^']) {
|
|
177
|
+
// for (const key in props['^']) {
|
|
178
|
+
// execClass(key, props, CLASS_NAMES, element)
|
|
179
|
+
// }
|
|
180
|
+
// }
|
|
180
181
|
|
|
181
182
|
const parentProps = element.parent && element.parent.props
|
|
182
183
|
if (parentProps && parentProps.spacingRatio && parentProps.inheritSpacingRatio) {
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@symbo.ls/atoms",
|
|
3
|
-
"version": "2.11.
|
|
3
|
+
"version": "2.11.335",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"license": "MIT",
|
|
6
|
-
"gitHead": "
|
|
6
|
+
"gitHead": "d50ff66f06943052be9d1af69767ed9d12387936",
|
|
7
7
|
"dependencies": {
|
|
8
8
|
"@domql/state": "latest",
|
|
9
9
|
"@domql/utils": "latest",
|