smbls 0.9.14 → 0.10.0

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/README.md CHANGED
@@ -19,7 +19,7 @@ import { Box } from 'smbls'
19
19
  3. Use it inside your DOMQL code
20
20
  ```
21
21
  const Header = {
22
- proto: Box,
22
+ extend: Box,
23
23
  // ...Other Properties
24
24
  }
25
25
  ```
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.9.14",
6
+ "version": "0.10.0",
7
7
  "repository": "https://github.com/symbo-ls/smbls",
8
8
  "main": "src/index.js",
9
9
  "files": [
@@ -7,17 +7,17 @@ import { UserBundle } from '../User'
7
7
  import { styleParentMode } from './style'
8
8
 
9
9
  export const ParentMode = {
10
- proto: Shape,
10
+ extend: Shape,
11
11
  round: 10,
12
12
  theme: 'purple',
13
13
  style: styleParentMode,
14
14
  icon: {
15
- proto: Icon,
15
+ extend: Icon,
16
16
  props: { icon: 'checkMedium' }
17
17
  },
18
18
  h2: 'Welcome to parent Mode',
19
19
  description: {
20
- proto: UserBundle,
20
+ extend: UserBundle,
21
21
  users: { ...[{}, {}, {}] },
22
22
  span: 'You’ll now be able to chat with tutor privately. No other participants will see the messages.'
23
23
  }
package/src/Block.js CHANGED
@@ -43,7 +43,7 @@ export const Block = {
43
43
  const [height, width] = props.boxSize.split(' ')
44
44
  return {
45
45
  ...mapSpacing(height, 'height'),
46
- ...mapSpacing(width, 'width')
46
+ ...mapSpacing(width || height, 'width')
47
47
  }
48
48
  },
49
49
 
@@ -65,7 +65,7 @@ export const Block = {
65
65
  const [minHeight, maxHeight] = props.heightRange.split(' ')
66
66
  return {
67
67
  ...mapSpacing(minHeight, 'minHeight'),
68
- ...mapSpacing(maxHeight, 'maxHeight')
68
+ ...mapSpacing(maxHeight || minHeight, 'maxHeight')
69
69
  }
70
70
  },
71
71
 
@@ -84,6 +84,7 @@ export const Block = {
84
84
  alignContent: ({ props }) => props.alignContent && ({ alignContent: props.alignContent }),
85
85
  justifyContent: ({ props }) => props.justifyContent && ({ justifyContent: props.justifyContent }),
86
86
  flexDirection: ({ props }) => props.flexDirection && ({ flexDirection: props.flexDirection }),
87
+ alignSelf: ({ props }) => props.alignSelf && ({ alignSelf: props.alignSelf }),
87
88
 
88
89
  flexWrap: ({ props }) => props.flexWrap && ({
89
90
  display: 'flex',
@@ -111,7 +112,7 @@ export const Block = {
111
112
  const [minHeight, maxHeight] = props.heightRange.split(' ')
112
113
  return {
113
114
  ...mapSpacing(minHeight, 'minHeight'),
114
- ...mapSpacing(maxHeight, 'maxHeight')
115
+ ...mapSpacing(maxHeight || minHeight, 'maxHeight')
115
116
  }
116
117
  }
117
118
  }
package/src/Box.js CHANGED
@@ -9,5 +9,5 @@ const PropsCSS = {
9
9
  }
10
10
 
11
11
  export const Box = {
12
- proto: [Shape, Position, Theme, Block, Text, Overflow, Transition, Transform, Responsive, PropsCSS, Interaction]
12
+ extend: [Shape, Position, Theme, Block, Text, Overflow, Transition, Transform, Responsive, PropsCSS, Interaction]
13
13
  }
package/src/Button.js CHANGED
@@ -11,7 +11,7 @@ const style = {
11
11
  }
12
12
 
13
13
  export const Button = {
14
- proto: IconText,
14
+ extend: IconText,
15
15
  tag: 'button',
16
16
  props: {
17
17
  fontSize: 'A',
@@ -33,7 +33,7 @@ export const Button = {
33
33
  }
34
34
 
35
35
  export const SquareButton = {
36
- proto: Button,
36
+ extend: Button,
37
37
  props: {
38
38
  fontSize: 'A',
39
39
  width: 'A',
@@ -46,7 +46,7 @@ export const SquareButton = {
46
46
  }
47
47
 
48
48
  export const CircleButton = {
49
- proto: SquareButton,
49
+ extend: SquareButton,
50
50
  props: { round: 'C' }
51
51
  }
52
52
 
@@ -54,6 +54,6 @@ export const KangorooButton = {
54
54
  tag: 'button',
55
55
  props: { style },
56
56
 
57
- iconText: { proto: IconText },
58
- child: { proto: IconText }
57
+ iconText: { extend: IconText },
58
+ child: { extend: IconText }
59
59
  }
package/src/ButtonSet.js CHANGED
@@ -5,6 +5,6 @@ import { Flex } from './Flex'
5
5
 
6
6
  export const ButtonSet = {
7
7
  tag: 'nav',
8
- proto: Flex,
9
- childProto: SquareButton
8
+ extend: Flex,
9
+ childExtend: SquareButton
10
10
  }
@@ -15,7 +15,7 @@ export const DatePicker = {
15
15
  },
16
16
 
17
17
  aside: {
18
- childProto: { tag: 'button' },
18
+ childExtend: { tag: 'button' },
19
19
  ...[
20
20
  { text: '2020' },
21
21
  { text: '2021' },
@@ -32,11 +32,11 @@ export const DatePicker = {
32
32
  main: {
33
33
  header: {
34
34
  icon: {
35
- proto: Icon,
35
+ extend: Icon,
36
36
  props: { icon: 'arrowMediumLeft' }
37
37
  },
38
38
  month: {
39
- childProto: { tag: 'span' },
39
+ childExtend: { tag: 'span' },
40
40
  ...[
41
41
  { text: 'january' },
42
42
  { text: 'february' },
@@ -53,14 +53,14 @@ export const DatePicker = {
53
53
  ]
54
54
  },
55
55
  icon2: {
56
- proto: Icon,
56
+ extend: Icon,
57
57
  props: { icon: 'arrowMediumRight' }
58
58
  }
59
59
  },
60
60
  days: {
61
61
  tag: 'section',
62
62
  header: {
63
- childProto: { tag: 'span' },
63
+ childExtend: { tag: 'span' },
64
64
  ...[
65
65
  { text: 'Mo' },
66
66
  { text: 'Tu' },
@@ -72,7 +72,7 @@ export const DatePicker = {
72
72
  ]
73
73
  },
74
74
  content: {
75
- childProto: { tag: 'button' },
75
+ childExtend: { tag: 'button' },
76
76
  ...[
77
77
  { text: '1' },
78
78
  { text: '2' },
@@ -6,15 +6,15 @@ export const DropdownList = {
6
6
  style: styleDropDown,
7
7
  tag: 'ul',
8
8
 
9
- proto: Shape,
9
+ extend: Shape,
10
10
 
11
11
  state: {
12
12
  active: 0
13
13
  },
14
14
 
15
- childProto: {
15
+ childExtend: {
16
16
  tag: 'li',
17
- proto: [Shape],
17
+ extend: [Shape],
18
18
 
19
19
  style: styleRow,
20
20
  props: (el, s) => ({
@@ -24,7 +24,7 @@ export const DropdownList = {
24
24
  }),
25
25
 
26
26
  span: {
27
- proto: [IconText],
27
+ extend: [IconText],
28
28
  props: {
29
29
  icon: 'checkmark',
30
30
  text: ''
package/src/Field.js CHANGED
@@ -3,7 +3,7 @@
3
3
  import { IconText, Input } from '.'
4
4
 
5
5
  export const Field = {
6
- proto: IconText,
6
+ extend: IconText,
7
7
  props: (el, s) => ({
8
8
  value: s[el.key],
9
9
 
@@ -36,5 +36,5 @@ export const Field = {
36
36
  }
37
37
  }),
38
38
 
39
- input: { proto: Input }
39
+ input: { extend: Input }
40
40
  }
@@ -5,7 +5,7 @@ import { Button, Link } from '..'
5
5
  import { styleGrid, styleGrid2 } from './style'
6
6
 
7
7
  const componentLink = {
8
- proto: Link,
8
+ extend: Link,
9
9
  attr: {
10
10
  href: '#'
11
11
  }
package/src/Icon.js CHANGED
@@ -5,7 +5,7 @@ import { SVG } from '.'
5
5
  import { ICONS } from '@symbo.ls/scratch'
6
6
 
7
7
  export const Icon = {
8
- proto: SVG,
8
+ extend: SVG,
9
9
  props: ({ key, props, parent }) => {
10
10
  let iconName = props.inheritedString || props.name || props.icon || key
11
11
 
package/src/IconText.js CHANGED
@@ -3,7 +3,7 @@
3
3
  import { Flex, Icon } from '.'
4
4
 
5
5
  export const IconText = {
6
- proto: Flex,
6
+ extend: Flex,
7
7
 
8
8
  props: {
9
9
  align: 'center center',
@@ -11,7 +11,7 @@ export const IconText = {
11
11
  },
12
12
 
13
13
  icon: {
14
- proto: Icon,
14
+ extend: Icon,
15
15
  if: ({ parent }) => parent.props.icon,
16
16
  props: 'match'
17
17
  },
package/src/Input.js CHANGED
@@ -1,9 +1,6 @@
1
1
  'use strict'
2
2
 
3
- import { Box } from '.'
4
-
5
3
  export const Input = {
6
- proto: Box,
7
4
  tag: 'input',
8
5
 
9
6
  props: {
package/src/Label.js CHANGED
@@ -4,7 +4,7 @@ import { Shape } from './Shape'
4
4
  import { Text } from './Text'
5
5
 
6
6
  export const Label = {
7
- proto: [Shape, Block, Text],
7
+ extend: [Shape, Block, Text],
8
8
 
9
9
  style: { lineHeight: 1 },
10
10
 
@@ -4,9 +4,9 @@ import { Shape, Block, IconText, Direction, Flex, Text } from '.'
4
4
 
5
5
  export const Notification = {
6
6
  style: { cursor: 'pointer' },
7
- proto: [Shape, Block, Direction, Flex],
7
+ extend: [Shape, Block, Direction, Flex],
8
8
  icon: {
9
- proto: [IconText],
9
+ extend: [IconText],
10
10
  props: {
11
11
  icon: 'info'
12
12
  },
@@ -16,17 +16,17 @@ export const Notification = {
16
16
  }
17
17
  },
18
18
  article: {
19
- proto: [Flex],
19
+ extend: [Flex],
20
20
  style: {
21
21
  flexDirection: 'column',
22
22
  alignItems: 'flex-start'
23
23
  },
24
24
  caption: {
25
- proto: Text,
25
+ extend: Text,
26
26
  text: 'Notification'
27
27
  },
28
28
  p: {
29
- proto: Text,
29
+ extend: Text,
30
30
  props: {
31
31
  fontSize: 'Z',
32
32
  text: 'is not always a distraction'
package/src/Pills.js CHANGED
@@ -15,7 +15,7 @@ export const Pills = {
15
15
  'div:nth-child(2)': { opacity: '.3' },
16
16
  'div:nth-child(3)': { opacity: '.3' }
17
17
  },
18
- childProto: {
18
+ childExtend: {
19
19
  tag: 'div',
20
20
  props: {
21
21
  round: 42,
package/src/Select.js CHANGED
@@ -12,7 +12,7 @@ export const Select = {
12
12
  }
13
13
  },
14
14
 
15
- childProto: {
15
+ childExtend: {
16
16
  tag: 'option',
17
17
  props: {
18
18
  value: '',
package/src/Sidebar.js CHANGED
@@ -3,10 +3,10 @@
3
3
  import { Icon, Link } from '.'
4
4
 
5
5
  const MenuItem = {
6
- proto: Link,
6
+ extend: Link,
7
7
  props: { icon: '' },
8
8
  glyph: {
9
- proto: Icon,
9
+ extend: Icon,
10
10
  name: ({ props }) => props.icon
11
11
  }
12
12
  }
@@ -17,7 +17,7 @@ export const Sidebar = {
17
17
  style: {
18
18
  a: { cursor: 'pointer' }
19
19
  },
20
- childProto: MenuItem,
20
+ childExtend: MenuItem,
21
21
  ...[{}]
22
22
  }
23
23
  }
@@ -65,7 +65,7 @@ const listenProp = (el, prop, def) => {
65
65
 
66
66
  export const Slider = {
67
67
  minus: {
68
- proto: SquareButton,
68
+ extend: SquareButton,
69
69
  props: { icon: 'minus' },
70
70
  on: {
71
71
  click: (ev, el, s) => {
@@ -87,7 +87,7 @@ export const Slider = {
87
87
  }
88
88
  },
89
89
  input: {
90
- proto: RangeSlider,
90
+ extend: RangeSlider,
91
91
  attr: {
92
92
  value: (el, s) => listenProp(el, 'value', 50),
93
93
  min: (el, s) => listenProp(el, 'min', 0),
@@ -100,7 +100,7 @@ export const Slider = {
100
100
  }
101
101
  },
102
102
  plus: {
103
- proto: SquareButton,
103
+ extend: SquareButton,
104
104
  props: { icon: 'plus' },
105
105
  on: {
106
106
  click: (ev, el, s) => {
@@ -6,7 +6,7 @@ import style from './style'
6
6
 
7
7
  export const Tooltip = {
8
8
  style,
9
- proto: Shape,
9
+ extend: Shape,
10
10
  props: { theme: 'purple2' },
11
11
  caption: 'And tooltip is coming',
12
12
  span: 'and winter too'
package/src/User/index.js CHANGED
@@ -4,7 +4,7 @@ import { Shape, Block } from '..'
4
4
  import { styleUser, styleUserBundle } from './style'
5
5
 
6
6
  export const User = {
7
- proto: [Shape, Block],
7
+ extend: [Shape, Block],
8
8
  props: { boxSize: 'B B' },
9
9
  style: styleUser,
10
10
  tag: 'img',
@@ -16,7 +16,7 @@ export const User = {
16
16
  export const UserBundle = {
17
17
  style: styleUserBundle,
18
18
  users: {
19
- childProto: User,
19
+ childExtend: User,
20
20
  ...[{}]
21
21
  },
22
22
  span: 'join classroom'