@symbo.ls/atoms 2.11.435 → 2.11.439

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
@@ -19,6 +19,7 @@ export const Collection = {
19
19
  const val = param[v]
20
20
  return addAdditionalExtend(v, val)
21
21
  })
22
+ if (childrenAs) param = param.map(v => ({ extend: childrenExtend, [childrenAs]: v }))
22
23
  }
23
24
 
24
25
  if (!param) return
package/Media.js CHANGED
@@ -97,7 +97,8 @@ const applyMediaProps = (key, props, result, element) => {
97
97
  return
98
98
  }
99
99
 
100
- const mediaKey = mediaValue ? `@media screen and ${mediaValue}` : key
100
+ const printValue = '@media ' + (mediaValue === 'print' ? `${mediaValue}` : `screen and ${mediaValue}`)
101
+ const mediaKey = mediaValue ? printValue : key
101
102
  result[mediaKey] = generatedClass
102
103
  return result[mediaKey]
103
104
  }
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/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@symbo.ls/atoms",
3
- "version": "2.11.435",
3
+ "version": "2.11.439",
4
4
  "main": "index.js",
5
5
  "license": "MIT",
6
- "gitHead": "734749f8a16b9e84374d68f203f153b87e4d01d2",
6
+ "gitHead": "b16ac3edce7fceb5e81d7cc7bbad51256e10b166",
7
7
  "dependencies": {
8
8
  "@domql/state": "latest",
9
9
  "@domql/utils": "latest",