smbls 2.6.11 → 2.6.12

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.11",
6
+ "version": "2.6.12",
7
7
  "repository": "https://github.com/symbo-ls/smbls",
8
8
  "main": "src/index.js",
9
9
  "files": [
package/src/Input.js CHANGED
@@ -13,6 +13,7 @@ export const Input = {
13
13
  fontSize: 'A',
14
14
  round: 'C',
15
15
  lineHeight: 1,
16
+ fontFamily: 'smbls',
16
17
  padding: 'Z A'
17
18
  },
18
19
 
@@ -0,0 +1,15 @@
1
+ 'use strict'
2
+
3
+ import { Input, Focusable } from '.'
4
+
5
+ const props = {
6
+ height: 'E',
7
+ lineHeight: 1.4,
8
+ style: { resize: 'none' }
9
+ }
10
+
11
+ export const TextArea = {
12
+ extend: [Input, Focusable],
13
+ props,
14
+ tag: 'textarea'
15
+ }
package/src/atoms/Grid.js CHANGED
@@ -10,13 +10,17 @@ export const Grid = {
10
10
  template: ({ props }) => props.template ? ({ gridTemplate: props.template }) : null,
11
11
  templateAreas: ({ props }) => props.templateAreas ? ({ gridTemplateAreas: props.templateAreas }) : null,
12
12
 
13
+ column: ({ props }) => props.column ? ({ gridColumn: props.column }) : null,
13
14
  columns: ({ props }) => props.columns ? ({ gridTemplateColumns: props.columns }) : null,
14
15
  templateColumns: ({ props }) => props.templateColumns ? ({ gridTemplateColumns: props.templateColumns }) : null,
15
16
  autoColumns: ({ props }) => props.autoColumns ? ({ gridAutoColumns: props.autoColumns }) : null,
17
+ columnStart: ({ props }) => props.columnStart ? ({ gridColumnStart: props.columnStart }) : null,
16
18
 
19
+ row: ({ props }) => props.row ? ({ gridRow: props.row }) : null,
17
20
  rows: ({ props }) => props.rows ? ({ gridTemplateRows: props.rows }) : null,
18
21
  templateRows: ({ props }) => props.templateRows ? ({ gridTemplateRows: props.templateRows }) : null,
19
22
  autoRows: ({ props }) => props.autoRows ? ({ gridAutoRows: props.autoRows }) : null,
23
+ rowStart: ({ props }) => props.rowStart ? ({ gridRowStart: props.rowStart }) : null,
20
24
 
21
25
  autoFlow: ({ props }) => props.autoFlow ? ({ gridAutoFlow: props.autoFlow }) : null,
22
26
 
@@ -51,10 +51,6 @@ export const Focusable = {
51
51
  opacity: 1,
52
52
  outline: 'solid, X, blue .3'
53
53
  }
54
-
55
- // ':not(:focus-visible):invalid': {
56
- // outline: 'solid, X, red .3'
57
- // }
58
54
  },
59
55
 
60
56
  attr: {
@@ -146,7 +146,7 @@ export const initUpdate = element => {
146
146
  if (key === 'theme') {
147
147
  props.update({
148
148
  themeModifier: globalTheme
149
- }, { preventRecursive: true, ignoreInitUpdate: true })
149
+ }, { preventRecursive: true, ignoreInitUpdate: true, preventDefineUpdate: '$setStateCollection' })
150
150
  } else if (key === 'true') applyTrueProps(props[key], CLASS_NAMES, element)
151
151
  if (setter) setter(key, props[key], CLASS_NAMES, element)
152
152
  }
package/src/atoms/Text.js CHANGED
@@ -3,7 +3,10 @@
3
3
  import { getFontSizeByKey, getFontFamily } from '@symbo.ls/scratch'
4
4
 
5
5
  export const Text = {
6
- text: ({ props }) => props.text,
6
+ text: ({ key, props, state }) => {
7
+ if (props.text === true) return (state && state[key]) || (props && props[key])
8
+ return props.text
9
+ },
7
10
  class: {
8
11
  fontSize: ({ props }) => props.fontSize ? getFontSizeByKey(props.fontSize) : null,
9
12
  fontFamily: ({ props }) => props.fontFamily && ({ fontFamily: getFontFamily(props.fontFamily) || props.fontFamily }),
package/src/index.js CHANGED
@@ -12,6 +12,7 @@ export * from './Icon'
12
12
  export * from './Link'
13
13
  export * from './IconText'
14
14
  export * from './Input'
15
+ export * from './TextArea'
15
16
  export * from './Field'
16
17
  export * from './Button'
17
18