smbls 0.13.5 → 0.13.7

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": "0.13.5",
6
+ "version": "0.13.7",
7
7
  "repository": "https://github.com/symbo-ls/smbls",
8
8
  "main": "src/index.js",
9
9
  "files": [
@@ -23,7 +23,8 @@
23
23
  "dependencies": {
24
24
  "@domql/utils": "latest",
25
25
  "@symbo.ls/init": "latest",
26
- "@symbo.ls/scratch": "latest"
26
+ "@symbo.ls/scratch": "latest",
27
+ "@symbo.ls/utils": "latest"
27
28
  },
28
29
  "devDependencies": {
29
30
  "@babel/core": "^7.11.5",
package/src/Box.js CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict'
2
2
 
3
- import { Shape, Position, Theme, Block, Text, Overflow, Transition, Transform, Responsive, Interaction } from '.'
3
+ import { Shape, Position, Theme, Block, Text, Overflow, Transition, Transform, Responsive, Interaction, XYZ } from '.'
4
4
 
5
5
  const PropsCSS = {
6
6
  class: {
@@ -9,5 +9,5 @@ const PropsCSS = {
9
9
  }
10
10
 
11
11
  export const Box = {
12
- extend: [Shape, Position, Theme, Block, Text, Overflow, Transition, Transform, Responsive, PropsCSS, Interaction]
12
+ extend: [Shape, Position, Theme, Block, Text, Overflow, Transition, Transform, Responsive, PropsCSS, Interaction, XYZ]
13
13
  }
package/src/Icon.js CHANGED
@@ -3,12 +3,7 @@
3
3
  import { SVG } from '.'
4
4
 
5
5
  import { ICONS } from '@symbo.ls/scratch'
6
-
7
- function camelize (str) {
8
- return str.replace(/(?:^\w|[A-Z]|\b\w)/g, function (word, index) {
9
- return index === 0 ? word.toLowerCase() : word.toUpperCase()
10
- }).replace(/\s+/g, '')
11
- }
6
+ import { camelize } from '@symbo.ls/utils'
12
7
 
13
8
  export const Icon = {
14
9
  extend: SVG,
package/src/Input.js CHANGED
@@ -7,8 +7,9 @@ export const Input = {
7
7
  type: 'input',
8
8
  // value: s[el.key],
9
9
  // placeholder: '',
10
+ fontSize: 'A',
10
11
  round: 'C',
11
- padding: 'A B',
12
+ padding: 'Z B',
12
13
  theme: 'transparent'
13
14
  },
14
15
 
@@ -2,6 +2,7 @@
2
2
 
3
3
  export const Interaction = {
4
4
  class: {
5
- cursor: ({ props }) => ({ cursor: props.cursor })
5
+ pointerEvents: ({ props }) => props.pointerEvents && ({ pointerEvents: props.pointerEvents }),
6
+ cursor: ({ props }) => props.cursor && ({ cursor: props.cursor })
6
7
  }
7
8
  }
package/src/Media.js CHANGED
@@ -119,7 +119,7 @@ export const initUpdate = element => {
119
119
  for (const key in props) {
120
120
  const setter = keySetters[key.slice(0, 1)]
121
121
  if (key === 'theme') {
122
- props.update({ themeModifier: globalTheme }, { preventRecursive: true, ignoreInitUpdate: true })
122
+ props.update({ themeModifier: `@${globalTheme}` }, { preventRecursive: true, ignoreInitUpdate: true })
123
123
  } else if (key === 'true') applyTrueProps(props[key], CLASS_NAMES, element)
124
124
 
125
125
  if (setter) setter(key, props[key], CLASS_NAMES, element)
package/src/XYZ.js ADDED
@@ -0,0 +1,7 @@
1
+ 'use strict'
2
+
3
+ export const XYZ = {
4
+ class: {
5
+ zIndex: ({ props }) => props.zIndex && ({ zIndex: props.zIndex })
6
+ }
7
+ }
package/src/index.js CHANGED
@@ -20,6 +20,7 @@ export * from './Transform'
20
20
  export * from './Transition'
21
21
  export * from './Media'
22
22
  export * from './Interaction'
23
+ export * from './XYZ'
23
24
 
24
25
  export * from './Box'
25
26