smbls 0.14.5 → 0.14.6

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.14.5",
6
+ "version": "0.14.6",
7
7
  "repository": "https://github.com/symbo-ls/smbls",
8
8
  "main": "src/index.js",
9
9
  "files": [
package/src/Button.js CHANGED
@@ -18,6 +18,7 @@ export const Button = {
18
18
  props: {
19
19
  fontSize: 'A',
20
20
  type: 'button',
21
+ border: 'none',
21
22
  display: 'inline-flex',
22
23
  alignItems: 'center',
23
24
  justifyContent: 'center',
@@ -54,38 +55,7 @@ export const CircleButton = {
54
55
 
55
56
  export const KangorooButton = {
56
57
  extend: Button,
58
+ childExtend: IconText,
57
59
 
58
- props: {
59
- theme: 'quinary',
60
- round: 'Z2',
61
- padding: 'X1 X1 X1 A2',
62
- size: 'A',
63
- gap: 'A',
64
- transition: 'A defaultBezier',
65
- transitionProperty: 'background, color, opacity',
66
-
67
- label: {
68
- gap: 'X1',
69
- text: 'Become PRO',
70
- alignItems: 'center',
71
- fontWeight: 'bold',
72
- icon: {
73
- name: 'star',
74
- color: 'yellow'
75
- }
76
- },
77
- child: {
78
- theme: 'tertiary',
79
- round: 'Z',
80
- size: 'Z',
81
- padding: 'Z A2',
82
- text: '1 month free',
83
- opacity: '.85'
84
- },
85
-
86
- style
87
- },
88
-
89
- label: { extend: IconText },
90
- child: { extend: IconText }
60
+ props: { style }
91
61
  }
package/src/Field.js CHANGED
@@ -1,9 +1,10 @@
1
1
  'use strict'
2
2
 
3
- import { IconText, Input } from '.'
3
+ import { IconText, Input, Focusable } from '.'
4
4
 
5
5
  export const Field = {
6
- extend: IconText,
6
+ extend: [IconText],
7
+
7
8
  props: (el, s) => ({
8
9
  value: s[el.key],
9
10
 
@@ -36,5 +37,5 @@ export const Field = {
36
37
  }
37
38
  }),
38
39
 
39
- input: { extend: Input }
40
+ input: { extend: [Focusable, Input] }
40
41
  }
package/src/Input.js CHANGED
@@ -1,13 +1,15 @@
1
1
  'use strict'
2
2
 
3
- import { Focusable } from './Interaction'
3
+ import { Focusable } from './'
4
4
 
5
5
  export const Input = {
6
6
  extend: [Focusable],
7
7
  tag: 'input',
8
8
 
9
9
  props: {
10
+ border: 'none',
10
11
  type: 'input',
12
+ theme: 'quaternary',
11
13
  fontSize: 'A',
12
14
  round: 'C',
13
15
  lineHeight: 1,
package/src/Label.js CHANGED
@@ -6,7 +6,7 @@ export const Label = {
6
6
  extend: Button,
7
7
 
8
8
  props: {
9
- fontSize: 'Z',
9
+ fontSize: 'Z2',
10
10
  emoji: '👍',
11
11
  text: '3',
12
12
  padding: 'X2 Z',
@@ -11,6 +11,12 @@ export const Notification = {
11
11
  gap: 'X2',
12
12
  style: { cursor: 'pointer' },
13
13
 
14
+ icon: {
15
+ icon: {
16
+ name: 'info outline'
17
+ }
18
+ },
19
+
14
20
  article: {
15
21
  flow: 'column',
16
22
  align: 'flex-start',
@@ -29,13 +35,12 @@ export const Notification = {
29
35
  },
30
36
 
31
37
  icon: {
32
- extend: [IconText],
33
- props: {
34
- icon: {
35
- name: 'info outline'
36
- }
37
- }
38
+ extend: [IconText]
38
39
  },
39
40
 
40
- article: { extend: Flex }
41
+ article: {
42
+ extend: Flex,
43
+ title: {},
44
+ p: {}
45
+ }
41
46
  }
@@ -18,21 +18,22 @@ export const SHAPES = {
18
18
 
19
19
  tooltip: ({ props }) => ({
20
20
  position: props.position || 'relative',
21
- ':before': {
21
+ '&:before': {
22
22
  content: '""',
23
23
  display: 'block',
24
24
  width: '0px',
25
25
  height: '0px',
26
- border: `6px, solid`,
26
+ border: `.35em solid`,
27
+ borderColor: getColor(props.background) || getColor(props.backgroundColor),
27
28
  position: 'absolute',
28
- borderRadius: 'X2'
29
+ borderRadius: '.15em'
29
30
  }
30
31
  }),
31
32
 
32
33
  tooltipDirection: {
33
34
  top: {
34
35
  '&:before': {
35
- top: '2px',
36
+ top: '-.1em',
36
37
  left: '50%',
37
38
  transform: 'translate(-50%, -50%) rotate(45deg)'
38
39
  }
@@ -40,13 +41,13 @@ export const SHAPES = {
40
41
  right: {
41
42
  '&:before': {
42
43
  top: '50%',
43
- right: '-10px',
44
+ right: '-.1em',
44
45
  transform: 'translate(-50%, -50%) rotate(45deg)'
45
46
  }
46
47
  },
47
48
  bottom: {
48
49
  '&:before': {
49
- bottom: '-10px',
50
+ bottom: '-.1em',
50
51
  left: '50%',
51
52
  transform: 'translate(-50%, -50%) rotate(45deg)'
52
53
  }
@@ -54,7 +55,7 @@ export const SHAPES = {
54
55
  left: {
55
56
  '&:before': {
56
57
  top: '50%',
57
- left: '2px',
58
+ left: '-.1em',
58
59
  transform: 'translate(-50%, -50%) rotate(45deg)'
59
60
  }
60
61
  }
package/src/Tooltip.js ADDED
@@ -0,0 +1,33 @@
1
+ 'use strict'
2
+
3
+ import { Button, Flex } from './'
4
+
5
+ export const Tooltip = {
6
+ extend: [Button, Flex],
7
+ props: {
8
+ background: 'black',
9
+ color: 'white',
10
+ flow: 'column',
11
+ shape: 'tooltip',
12
+ shapeDirection: 'top',
13
+ padding: 'Z2',
14
+ round: 'X2',
15
+ minWidth: 'D2',
16
+ gap: 'X1',
17
+
18
+ title: {
19
+ color: 'gray12',
20
+ text: 'And tooltip is coming'
21
+ },
22
+ p: {
23
+ fontSize: 'Z2',
24
+ margin: '0',
25
+ color: 'gray6',
26
+ text: 'and winter too',
27
+ fontWeight: '400'
28
+ }
29
+ },
30
+
31
+ title: {},
32
+ p: {}
33
+ }
package/src/index.js CHANGED
@@ -6,6 +6,7 @@ export * from '@symbo.ls/init'
6
6
 
7
7
  export * from './styles'
8
8
 
9
+ // atoms
9
10
  export * from './Text'
10
11
  export * from './Block'
11
12
  export * from './Shape'
@@ -25,6 +26,7 @@ export * from './XYZ'
25
26
 
26
27
  export * from './Box'
27
28
 
29
+ // atoms
28
30
  export * from './SVG'
29
31
  export * from './Icon'
30
32
  export * from './Img'
@@ -34,6 +36,7 @@ export * from './Input'
34
36
  export * from './Field'
35
37
  export * from './Button'
36
38
 
39
+ // components
37
40
  export * from './ButtonSet'
38
41
  export * from './User'
39
42
  export * from './Banner'
@@ -1,13 +0,0 @@
1
- 'use strict'
2
-
3
- import Shape from '../Shape'
4
-
5
- import style from './style'
6
-
7
- export const Tooltip = {
8
- style,
9
- extend: Shape,
10
- props: { theme: 'purple2' },
11
- caption: 'And tooltip is coming',
12
- span: 'and winter too'
13
- }
@@ -1,12 +0,0 @@
1
- 'use strict'
2
-
3
- export default {
4
- textAlign: 'center',
5
- padding: '1.2em',
6
- caption: {
7
- whiteSpace: 'nowrap'
8
- },
9
- span: {
10
- opacity: '.5'
11
- }
12
- }