smbls 2.6.8 → 2.6.10

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 CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "UI Library built on Scratch and DOMQL",
4
4
  "private": false,
5
5
  "author": "symbo.ls",
6
- "version": "2.6.8",
6
+ "version": "2.6.10",
7
7
  "repository": "https://github.com/symbo-ls/smbls",
8
8
  "main": "src/index.js",
9
9
  "files": [
package/src/Box.js CHANGED
@@ -9,5 +9,8 @@ const PropsCSS = {
9
9
  }
10
10
 
11
11
  export const Box = {
12
- extend: [Shape, Position, Theme, Block, Text, Overflow, Timing, Transform, Media, PropsCSS, Interaction, XYZ, Animation]
12
+ extend: [Shape, Position, Theme, Block, Text, Overflow, Timing, Transform, Media, PropsCSS, Interaction, XYZ, Animation],
13
+ attr: {
14
+ id: ({ props }) => props.id
15
+ }
13
16
  }
@@ -1,6 +1,10 @@
1
1
  'use strict'
2
2
 
3
- import { getSpacingBasedOnRatio, getSpacingByKey } from '@symbo.ls/scratch'
3
+ import { getSpacingBasedOnRatio, getSpacingByKey, isString } from '@symbo.ls/scratch'
4
+
5
+ const transfromGap = gap => isString(gap) && ({
6
+ gap: gap.split(' ').map(v => getSpacingByKey(v, 'gap').gap).join(' ')
7
+ })
4
8
 
5
9
  export const Block = {
6
10
  class: {
@@ -95,7 +99,7 @@ export const Block = {
95
99
  marginBlockStart: ({ props }) => props.marginBlockStart ? getSpacingBasedOnRatio(props, 'marginBlockStart') : null,
96
100
  marginBlockEnd: ({ props }) => props.marginBlockEnd ? getSpacingBasedOnRatio(props, 'marginBlockEnd') : null,
97
101
 
98
- gap: ({ props }) => props.gap ? getSpacingBasedOnRatio(props, 'gap') : null,
102
+ gap: ({ props }) => props.gap ? transfromGap(props.gap) : null,
99
103
  gridArea: ({ props }) => props.gridArea && ({ gridArea: props.gridArea }),
100
104
 
101
105
  flex: ({ props }) => props.flex && ({ flex: props.flex }),