@symbo.ls/atoms 2.11.438 → 2.11.440

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/Collection.js CHANGED
@@ -7,18 +7,19 @@ export const Collection = {
7
7
  define: {
8
8
  $collection: (param, el, state) => {
9
9
  const { __ref: ref } = el
10
- const { children, childrenAs, childrenExtend } = (el.props || {})
10
+ const { children, childrenAs, childrenExtends } = (el.props || {})
11
11
  const childrenExec = children && exec(children, el, state)
12
12
 
13
13
  if (isArray(childrenExec)) {
14
14
  param = deepCloneWithExtend(childrenExec)
15
- if (childrenAs) param = param.map(v => ({ extend: childrenExtend, [childrenAs]: v }))
15
+ if (childrenAs) param = param.map(v => ({ extend: childrenExtends, [childrenAs]: v }))
16
16
  } else if (isObject(childrenExec)) {
17
17
  param = deepCloneWithExtend(childrenExec)
18
18
  param = Object.keys(param).map(v => {
19
19
  const val = param[v]
20
20
  return addAdditionalExtend(v, val)
21
21
  })
22
+ if (childrenAs) param = param.map(v => ({ extend: childrenExtends, [childrenAs]: v }))
22
23
  }
23
24
 
24
25
  if (!param) return
package/Theme.js CHANGED
@@ -148,12 +148,29 @@ export const Theme = {
148
148
  })
149
149
  },
150
150
 
151
- boxShadow: ({ props, deps }) => isString(props.boxShadow) && ({
152
- boxShadow: deps.transformBoxShadow(props.boxShadow)
153
- }),
151
+ // boxShadow: ({ props, deps }) => isString(props.boxShadow) && ({
152
+ // boxShadow: deps.transformBoxShadow(props.boxShadow)
153
+ // }),
154
+
155
+ boxShadow: (element, state, context) => {
156
+ const { props, deps } = element
157
+ if (!isString(props.boxShadow)) return
158
+ const [val, hasImportant] = props.boxShadow.split('!importan')
159
+ const globalTheme = getSystemGlobalTheme(element)
160
+ const important = hasImportant ? ' !important' : ''
161
+ if (important) {
162
+ console.log(val.trim())
163
+ console.log(deps.transformBoxShadow(val.trim(), globalTheme))
164
+ console.log(getMediaColor('canvas-card', globalTheme), globalTheme)
165
+ }
166
+
167
+ return {
168
+ boxShadow: deps.transformBoxShadow(val.trim(), globalTheme) + important
169
+ }
170
+ },
154
171
 
155
- textShadow: ({ props, deps }) => !isUndefined(props.textShadow) && ({
156
- textShadow: deps.transformBoxShadow(props.textShadow)
172
+ textShadow: ({ props, deps, context }) => !isUndefined(props.textShadow) && ({
173
+ textShadow: deps.transformBoxShadow(props.textShadow, context.designSystem.globalTheme)
157
174
  }),
158
175
 
159
176
  backdropFilter: ({ props, deps }) => !isUndefined(props.backdropFilter) && ({
package/Transform.js CHANGED
@@ -6,6 +6,7 @@ export const Transform = {
6
6
  class: {
7
7
  zoom: ({ props }) => !isUndefined(props.zoom) && ({ zoom: props.zoom }),
8
8
  transform: ({ props }) => !isUndefined(props.transform) && ({ transform: props.transform }),
9
- transformOrigin: ({ props }) => !isUndefined(props.transformOrigin) && ({ transformOrigin: props.transformOrigin })
9
+ transformOrigin: ({ props }) => !isUndefined(props.transformOrigin) && ({ transformOrigin: props.transformOrigin }),
10
+ backfaceVisibility: ({ props }) => !isUndefined(props.backfaceVisibility) && ({ backfaceVisibility: props.backfaceVisibility })
10
11
  }
11
12
  }
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@symbo.ls/atoms",
3
- "version": "2.11.438",
3
+ "version": "2.11.440",
4
4
  "main": "index.js",
5
5
  "license": "MIT",
6
- "gitHead": "57bac07f08cd6a88591767f41a408e0915815237",
6
+ "gitHead": "2c0cfa861152d979e4c49d0fe945b4671710ac63",
7
7
  "dependencies": {
8
8
  "@domql/state": "latest",
9
9
  "@domql/utils": "latest",