@symbo.ls/atoms 2.11.495 → 2.11.500

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/Media.js CHANGED
@@ -142,7 +142,7 @@ const applyConditionalFalsyProps = (key, props, result, element) => {
142
142
 
143
143
  const applyTrueProps = (props, result, element) => merge(result, convertPropsToClass(props, result, element))
144
144
 
145
- const beforeClassAssign = (element, s) => {
145
+ const beforeClassAssign = (element, s, ctx) => {
146
146
  const { props, class: className, context } = element
147
147
 
148
148
  const CLASS_NAMES = {
@@ -170,7 +170,16 @@ const beforeClassAssign = (element, s) => {
170
170
  }
171
171
  }
172
172
  if (setter) setter(key, props[key], CLASS_NAMES, element)
173
- else if (key === 'true') applyTrueProps(props[key], CLASS_NAMES, element)
173
+ else if (key === 'class') {
174
+ const value = element.props.class
175
+ if (!element.call('isString', value)) return
176
+ const classArr = value.split(' ')
177
+ const scratchClasses = ctx.designSystem.CLASS
178
+ CLASS_NAMES.class = classArr.reduce((accumulator, current) => {
179
+ const scratchClass = scratchClasses[current]
180
+ return merge(accumulator, scratchClass)
181
+ }, {})
182
+ } else if (key === 'true') applyTrueProps(props[key], CLASS_NAMES, element)
174
183
  }
175
184
 
176
185
  // override props
package/Shape/index.js CHANGED
@@ -3,7 +3,6 @@
3
3
  import { exec, isString } from '@domql/utils'
4
4
  import { SHAPES } from './style'
5
5
  import { getSpacingBasedOnRatio, getMediaColor } from '@symbo.ls/scratch'
6
- import { Pseudo } from '../Pseudo'
7
6
 
8
7
  const transformBorderRadius = (radius, props, propertyName) => {
9
8
  if (!isString(radius)) return
@@ -13,7 +12,7 @@ const transformBorderRadius = (radius, props, propertyName) => {
13
12
  }
14
13
 
15
14
  export const Shape = {
16
- extend: Pseudo,
15
+ extend: 'Pseudo',
17
16
 
18
17
  deps: { exec, getSpacingBasedOnRatio, getMediaColor, transformBorderRadius },
19
18
 
package/package.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "@symbo.ls/atoms",
3
- "version": "2.11.495",
3
+ "version": "2.11.500",
4
4
  "main": "index.js",
5
5
  "license": "MIT",
6
- "gitHead": "9147c1769d75544e2927237b4c34376fe18bcdfc",
6
+ "gitHead": "26be30022a9bbce9288b98f013bb1c3381767960",
7
7
  "dependencies": {
8
8
  "@domql/state": "^2.5.0",
9
9
  "@domql/utils": "^2.5.0",
10
10
  "@symbo.ls/emotion": "^2.11.470",
11
- "@symbo.ls/scratch": "^2.11.475"
11
+ "@symbo.ls/scratch": "^2.11.500"
12
12
  },
13
13
  "source": "src/index.js",
14
14
  "devDependencies": {