@symbo.ls/preview 0.0.30 → 0.0.31

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.
@@ -35,7 +35,7 @@ const code = `{
35
35
  }
36
36
  }`
37
37
 
38
- const defaultState = {}
38
+ const state = {}
39
39
  const props = {
40
40
  }
41
41
 
@@ -50,7 +50,7 @@ export default {
50
50
  category,
51
51
  component,
52
52
  code,
53
- defaultState,
53
+ state,
54
54
  props,
55
55
  settings,
56
56
  interactivity: [],
@@ -39,7 +39,7 @@ const code = {
39
39
  }`
40
40
  }
41
41
 
42
- const defaultState = {}
42
+ const state = {}
43
43
  const props = {
44
44
  text: '3'
45
45
  }
@@ -55,7 +55,7 @@ export default {
55
55
  category,
56
56
  component,
57
57
  code,
58
- defaultState,
58
+ state,
59
59
  props,
60
60
  settings,
61
61
  interactivity: ['click'],
@@ -21,7 +21,7 @@ const code = `{
21
21
  caption: 'View all Contacts'
22
22
  }`
23
23
 
24
- const defaultState = {}
24
+ const state = {}
25
25
  const props = {
26
26
  round: 42,
27
27
  users: [{}, {}, {}],
@@ -39,7 +39,7 @@ export default {
39
39
  category,
40
40
  component,
41
41
  code,
42
- defaultState,
42
+ state,
43
43
 
44
44
  props,
45
45
  settings,
@@ -5,19 +5,18 @@ import { CATEGORIES } from '../categories'
5
5
  import { Button } from '@symbo.ls/components'
6
6
 
7
7
  const key = 'button-download'
8
- const title = 'Download Button'
8
+ const title = 'Call to Action Button'
9
9
  const description = ''
10
10
  const category = CATEGORIES[1]
11
11
 
12
12
  const component = {
13
13
  extend: Button,
14
14
  props: {
15
- icon: 'arrowDown',
15
+ icon: 'arrow angle up',
16
16
  gap: 'X2',
17
- theme: 'quinary',
18
- text: 'Download',
17
+ theme: 'primary',
18
+ text: 'Call to Action',
19
19
  padding: 'Z2 B2',
20
- border: '.2em, solid, blue .2',
21
20
  round: 'C'
22
21
  }
23
22
  }
@@ -25,14 +24,14 @@ const component = {
25
24
  const code = `{
26
25
  extend: Button,
27
26
  props: {
28
- icon: 'arrowDown',
29
- theme: 'quaternary',
30
- text: 'Download',
27
+ icon: 'arrow angle up',
28
+ theme: 'primary',
29
+ text: 'Call to Action',
31
30
  round: 'C'
32
31
  }
33
32
  }`
34
33
 
35
- const defaultState = {}
34
+ const state = {}
36
35
  const props = {
37
36
  }
38
37
 
@@ -47,7 +46,7 @@ export default {
47
46
  category,
48
47
  component,
49
48
  code,
50
- defaultState,
49
+ state,
51
50
 
52
51
  props,
53
52
  settings,
@@ -76,7 +76,7 @@ const code = {
76
76
  }`
77
77
  }
78
78
 
79
- const defaultState = {}
79
+ const state = {}
80
80
  const props = {
81
81
  }
82
82
 
@@ -91,7 +91,7 @@ export default {
91
91
  category,
92
92
  component,
93
93
  code,
94
- defaultState,
94
+ state,
95
95
 
96
96
  props,
97
97
  settings,
@@ -71,7 +71,7 @@ const code = `{
71
71
  }
72
72
  }`
73
73
 
74
- const defaultState = {}
74
+ const state = {}
75
75
  const props = {
76
76
  round: 'C',
77
77
  size: 'Z',
@@ -99,7 +99,7 @@ export default {
99
99
  category,
100
100
  component,
101
101
  code,
102
- defaultState,
102
+ state,
103
103
  props,
104
104
  settings,
105
105
  interactivity: [],
@@ -2,7 +2,7 @@
2
2
 
3
3
  import { CATEGORIES } from '../categories'
4
4
 
5
- import { Button, User } from '@symbo.ls/components'
5
+ import { Button, User } from 'smbls'
6
6
 
7
7
  const key = 'button-user'
8
8
  const title = 'User Button'
@@ -17,19 +17,21 @@ const component = {
17
17
  size: 'A',
18
18
  round: 'C',
19
19
  depth: 16,
20
- gap: 'Y2',
20
+ gap: 'Y',
21
21
  padding: 'W2 A W2 W2',
22
- theme: 'tertiary',
22
+ theme: 'quaternary',
23
23
 
24
24
  position: 'relative',
25
25
  cursor: 'pointer',
26
26
 
27
27
  user: {
28
28
  boxSize: 'B1 B1',
29
+ pointerEvents: 'none'
29
30
  },
30
31
 
31
32
  select: {
32
33
  outline: 'none',
34
+ pointerEvents: 'all',
33
35
  appearance: 'none',
34
36
  border: 'none',
35
37
  width: '100%',
@@ -38,33 +40,31 @@ const component = {
38
40
  color: 'currentColor',
39
41
  fontSize: 'A',
40
42
  lineHeight: 1,
41
- padding: '0 A 0 0'
43
+ margin: '0 0 0 -B1+X',
44
+ padding: '0 A 0 B1+X'
42
45
  },
43
46
  }),
44
47
 
45
48
  user: { extend: User },
46
49
  select: {
47
50
  attr: { name: 'user', id: 'user' },
48
- childExtend: { tag: 'option' },
49
- ...[
51
+ childExtend: { tag: 'option', text: ({ state }) => state.text },
52
+ $setCollection: () => [
50
53
  { text: 'Kevin' },
51
54
  { text: 'Jay' }
52
- ]
55
+ ],
56
+ on: {
57
+ change: (ev, { parent }) => {
58
+ parent.user.update({ key: ev.target.value })
59
+ }
60
+ }
53
61
  }
54
62
  }
55
63
 
56
64
  const code = `{
57
- round: 'C',
58
- icon: 'arrowAngleDown',
59
- name: 'user',
60
- id: 'user',
61
- options: [
62
- { text: 'adam' },
63
- { text: 'jora' }
64
- ]
65
65
  }`
66
66
 
67
- const defaultState = {}
67
+ const state = {}
68
68
  const props = {}
69
69
 
70
70
  const settings = {
@@ -78,7 +78,7 @@ export default {
78
78
  category,
79
79
  component,
80
80
  code,
81
- defaultState,
81
+ state,
82
82
  props,
83
83
  settings,
84
84
  interactivity: [],
@@ -32,7 +32,7 @@ const component = {
32
32
 
33
33
  const code = `{}`
34
34
 
35
- const defaultState = {}
35
+ const state = {}
36
36
  const props = {
37
37
  style: {
38
38
  backdropFilter: 'blur(3px)',
@@ -50,7 +50,7 @@ export default {
50
50
  category,
51
51
  component,
52
52
  code,
53
- defaultState,
53
+ state,
54
54
  props,
55
55
  settings,
56
56
  interactivity: ['click', 'choose'],
@@ -9,26 +9,26 @@ const title = 'Dropdown List'
9
9
  const description = ''
10
10
  const category = CATEGORIES[5]
11
11
 
12
+ const state = {}
13
+ const props = {
14
+ theme: 'quaternary',
15
+ round: 'A'
16
+ }
17
+
12
18
  const component = {
13
19
  extend: DropdownList,
14
- props: {
15
- theme: 'quaternary', round: 'A'
16
- },
17
-
18
- ...[
19
- { span: { props: { text: 'Today' } } },
20
- { span: { props: { text: 'Yesterday' } } },
21
- { span: { props: { text: 'A week age' } } },
22
- { span: { props: { text: 'A month ago' } } }
20
+ state,
21
+ props,
22
+
23
+ $setCollection: () => [
24
+ { span: { text: 'Today' } } ,
25
+ { span: { text: 'Yesterday' } } ,
26
+ { span: { text: 'A week age' } } ,
27
+ { span: { text: 'A month ago' } }
23
28
  ]
24
29
  }
25
30
 
26
31
  const code = `{}`
27
-
28
- const defaultState = {}
29
- const props = {
30
- theme: 'quaternary'
31
- }
32
32
  const settings = {
33
33
  gridOptions: { colspan: 5, rowspan: 5 }
34
34
  }
@@ -40,7 +40,7 @@ export default {
40
40
  category,
41
41
  component,
42
42
  code,
43
- defaultState,
43
+ state,
44
44
  props,
45
45
  settings,
46
46
  interactivity: [],
@@ -18,7 +18,7 @@ const component = {
18
18
 
19
19
  const code = `{}`
20
20
 
21
- const defaultState = {}
21
+ const state = {}
22
22
  const props = {}
23
23
 
24
24
  const settings = {
@@ -32,7 +32,7 @@ export default {
32
32
  category,
33
33
  component,
34
34
  code,
35
- defaultState,
35
+ state,
36
36
  props,
37
37
  settings,
38
38
  interactivity: ['input'],
package/.symbols/index.js CHANGED
@@ -25,6 +25,27 @@ const define = {
25
25
  gridOptions: { colspan: 3, rowspan: 2 }
26
26
  }
27
27
  },
28
+ ButtonTitle: {
29
+ props: {
30
+ iconBox: {
31
+ icon: { name: 'checkmark' }
32
+ },
33
+ title: {
34
+ text: 'screen'
35
+ }
36
+ },
37
+ settings: {
38
+ gridOptions: { colspan: 3, rowspan: 2 }
39
+ }
40
+ },
41
+ WiderButton: {
42
+ props: {
43
+ icon: { name: 'color outline' }
44
+ },
45
+ settings: {
46
+ gridOptions: { colspan: 3, rowspan: 2 }
47
+ }
48
+ },
28
49
  AccessibilityCheck: {
29
50
  settings: {
30
51
  gridOptions: { colspan: 8, rowspan: 2 }
@@ -35,6 +56,16 @@ const define = {
35
56
  gridOptions: { colspan: 5, rowspan: 2 }
36
57
  }
37
58
  },
59
+ TestText: {
60
+ settings: {
61
+ gridOptions: { colspan: 6, rowspan: 2 }
62
+ }
63
+ },
64
+ Platforms: {
65
+ settings: {
66
+ gridOptions: { colspan: 5, rowspan: 2 }
67
+ }
68
+ },
38
69
  DeviceButtonSet: {
39
70
  settings: {
40
71
  gridOptions: { colspan: 6, rowspan: 2 }
@@ -45,6 +76,11 @@ const define = {
45
76
  gridOptions: { colspan: 6, rowspan: 2 }
46
77
  }
47
78
  },
79
+ Search: {
80
+ settings: {
81
+ gridOptions: { colspan: 4 }
82
+ }
83
+ },
48
84
  CodePreview: {
49
85
  settings: {
50
86
  gridOptions: { colspan: 4, rowspan: 4 }
@@ -24,7 +24,7 @@ const component = {
24
24
 
25
25
  const code = `{}`
26
26
 
27
- const defaultState = {}
27
+ const state = {}
28
28
  const props = {}
29
29
 
30
30
  const settings = {
@@ -38,7 +38,7 @@ export default {
38
38
  category,
39
39
  component,
40
40
  code,
41
- defaultState,
41
+ state,
42
42
  props,
43
43
  settings,
44
44
  interactivity: [],
@@ -21,7 +21,7 @@ const code = `{
21
21
  }
22
22
  }`
23
23
 
24
- const defaultState = {}
24
+ const state = {}
25
25
  const props = {
26
26
  theme: 'alert'
27
27
  }
@@ -37,7 +37,7 @@ export default {
37
37
  category,
38
38
  component,
39
39
  code,
40
- defaultState,
40
+ state,
41
41
  props,
42
42
  settings,
43
43
  interactivity: [],
@@ -51,7 +51,7 @@ export default {
51
51
  // "category": ,
52
52
  // "component": ,
53
53
  // "code": ,
54
- // "defaultState": ,
54
+ // "state": ,
55
55
  // "props": ,
56
56
  // "settings": ,
57
57
  // "interactivity": [],
@@ -17,7 +17,7 @@ const component = {
17
17
 
18
18
  const code = `{}`
19
19
 
20
- const defaultState = {}
20
+ const state = {}
21
21
  const props = {}
22
22
 
23
23
  const settings = {
@@ -31,7 +31,7 @@ export default {
31
31
  category,
32
32
  component,
33
33
  code,
34
- defaultState,
34
+ state,
35
35
  props,
36
36
  settings,
37
37
  interactivity: [],
@@ -15,7 +15,7 @@ const component = {
15
15
 
16
16
  const code = `{}`
17
17
 
18
- const defaultState = {}
18
+ const state = {}
19
19
  const props = {}
20
20
 
21
21
  const settings = {
@@ -29,7 +29,7 @@ export default {
29
29
  category,
30
30
  component,
31
31
  code,
32
- defaultState,
32
+ state,
33
33
 
34
34
  props,
35
35
  settings,
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@symbo.ls/preview",
3
3
  "description": "",
4
4
  "author": "",
5
- "version": "0.0.30",
5
+ "version": "0.0.31",
6
6
  "repository": "https://github.com/rackai/editor",
7
7
  "main": "src/index.js",
8
8
  "scripts": {
@@ -16,4 +16,4 @@ const PREVIEW_CONF = {
16
16
  }
17
17
  }
18
18
 
19
- export default init({ verbose: true, ...PREVIEW_CONF })
19
+ export default init(PREVIEW_CONF)
@@ -1,7 +1,6 @@
1
1
  'use strict'
2
2
 
3
3
  export const fetchGist = (key, state) => {
4
- console.log(state)
5
4
  window.fetch(`https://api.github.com/gists/${key}`, {
6
5
  headers: {
7
6
  Authorization: `token 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`
@@ -11,8 +11,7 @@ import {
11
11
  } from '@symbo.ls/components'
12
12
  import stylesHelpers from './stylesHelpers'
13
13
 
14
- import { HTML_TAGS } from '@domql/tags'
15
- console.log(HTML_TAGS)
14
+ import { HTML_TAGS } from '@domql/tags' // eslint-disable-line no-unused-vars
16
15
 
17
16
  export default {
18
17
  header: {