smbls 2.6.6 → 2.6.8
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/package.json +1 -1
- package/src/Icon.js +1 -1
- package/src/__/Media copy.js +2 -2
- package/src/atoms/Animation.js +1 -1
- package/src/atoms/Media.js +3 -3
- package/src/atoms/Picture.js +1 -1
- package/src/atoms/Theme.js +2 -2
package/package.json
CHANGED
package/src/Icon.js
CHANGED
|
@@ -6,7 +6,7 @@ import { toCamelCase } from '@symbo.ls/utils'
|
|
|
6
6
|
export const Icon = {
|
|
7
7
|
extend: SVG,
|
|
8
8
|
props: ({ key, props, parent, context }) => {
|
|
9
|
-
const { ICONS } = context && context.
|
|
9
|
+
const { ICONS } = context && context.system
|
|
10
10
|
const iconName = props.inheritedString || props.name || props.icon || key
|
|
11
11
|
const camelCase = toCamelCase(iconName)
|
|
12
12
|
|
package/src/__/Media copy.js
CHANGED
|
@@ -83,7 +83,7 @@ const init = (element, s) => {
|
|
|
83
83
|
}
|
|
84
84
|
|
|
85
85
|
export const initUpdate = el => {
|
|
86
|
-
// FORCE
|
|
86
|
+
// FORCE PROJECT_STATE UPDATE:
|
|
87
87
|
const { props, class: className } = el
|
|
88
88
|
const rootState = el.__root ? el.__root.state : el.state
|
|
89
89
|
// if (el.key !== 'app') return
|
|
@@ -96,7 +96,7 @@ export const initUpdate = el => {
|
|
|
96
96
|
if (rootState.globalTheme === parse) {
|
|
97
97
|
props.theme = getTheme(theme[key])
|
|
98
98
|
} else props.theme = theme
|
|
99
|
-
className.
|
|
99
|
+
className.MEDIA_FORCED_BY_PROJECT_STATE = props.theme
|
|
100
100
|
}
|
|
101
101
|
}
|
|
102
102
|
}
|
package/src/atoms/Animation.js
CHANGED
|
@@ -8,7 +8,7 @@ const { keyframes } = emotion
|
|
|
8
8
|
|
|
9
9
|
const applyAnimationProps = (animation, element) => {
|
|
10
10
|
if (isObject(animation)) return { animationName: keyframes(animation) }
|
|
11
|
-
const { ANIMATION } = element.context && element.context.
|
|
11
|
+
const { ANIMATION } = element.context && element.context.system
|
|
12
12
|
const record = ANIMATION[animation]
|
|
13
13
|
return keyframes(record)
|
|
14
14
|
}
|
package/src/atoms/Media.js
CHANGED
|
@@ -53,9 +53,9 @@ const convertPropsToClass = (props, result, element) => {
|
|
|
53
53
|
|
|
54
54
|
const applyMediaProps = (key, props, result, element) => {
|
|
55
55
|
const { context } = element
|
|
56
|
-
if (!context.
|
|
56
|
+
if (!context.system || !context.system.MEDIA) return
|
|
57
57
|
const globalTheme = getSystemTheme(element)
|
|
58
|
-
const { MEDIA } = context.
|
|
58
|
+
const { MEDIA } = context.system
|
|
59
59
|
const mediaName = MEDIA[key.slice(1)]
|
|
60
60
|
const generatedClass = convertPropsToClass(props, result, element)
|
|
61
61
|
|
|
@@ -80,7 +80,7 @@ const applySelectorProps = (key, props, result, element) => {
|
|
|
80
80
|
}
|
|
81
81
|
|
|
82
82
|
const applyCaseProps = (key, props, result, element) => {
|
|
83
|
-
const { CASES } = element.context && element.context.
|
|
83
|
+
const { CASES } = element.context && element.context.system
|
|
84
84
|
const caseKey = key.slice(1)
|
|
85
85
|
const isPropTrue = element.props[caseKey]
|
|
86
86
|
if (!CASES[caseKey] && !isPropTrue) return
|
package/src/atoms/Picture.js
CHANGED
|
@@ -10,7 +10,7 @@ export const Picture = {
|
|
|
10
10
|
attr: {
|
|
11
11
|
media: element => {
|
|
12
12
|
const { props, key, context } = element
|
|
13
|
-
const { MEDIA } = context.
|
|
13
|
+
const { MEDIA } = context.system
|
|
14
14
|
const globalTheme = getSystemTheme(element)
|
|
15
15
|
const mediaName = (props.media || key).slice(1)
|
|
16
16
|
|
package/src/atoms/Theme.js
CHANGED
|
@@ -43,7 +43,7 @@ const transformBackgroundImage = (backgroundImage, ctx, globalTheme) => ({
|
|
|
43
43
|
backgroundImage: backgroundImage.split(', ').map(v => {
|
|
44
44
|
if (v.slice(0, 2) === '--') return `var(${v})`
|
|
45
45
|
if (v.includes('url') || v.includes('gradient')) return v
|
|
46
|
-
else if (ctx.
|
|
46
|
+
else if (ctx.system.GRADIENT[backgroundImage]) {
|
|
47
47
|
return getMediaColor(backgroundImage, 'backgroundImage', globalTheme)
|
|
48
48
|
}
|
|
49
49
|
return `url(${v})`
|
|
@@ -53,7 +53,7 @@ const transformBackgroundImage = (backgroundImage, ctx, globalTheme) => ({
|
|
|
53
53
|
export const getSystemTheme = (element, state) => {
|
|
54
54
|
const { context } = element
|
|
55
55
|
const rootState = element.__root ? element.__root.state : element.state
|
|
56
|
-
return rootState.globalTheme || context.
|
|
56
|
+
return rootState.globalTheme || context.system.globalTheme
|
|
57
57
|
}
|
|
58
58
|
|
|
59
59
|
export const Theme = {
|