@symbo.ls/preview 0.0.31 → 0.0.32

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.
@@ -2,38 +2,29 @@
2
2
 
3
3
  import { CATEGORIES } from '../categories'
4
4
 
5
- import { Button } from '@symbo.ls/components'
5
+ import { Button } from 'smbls'
6
6
 
7
- const key = 'button-download'
7
+ const key = 'button'
8
8
  const title = 'Call to Action Button'
9
9
  const description = ''
10
10
  const category = CATEGORIES[1]
11
+ const extend = 'Button'
12
+ const state = {}
13
+ const props = {
14
+ icon: 'arrow angle up',
15
+ gap: 'X2',
16
+ theme: 'primary',
17
+ text: 'Call to Action',
18
+ padding: 'Z2 B2',
19
+ round: 'C'
20
+ }
11
21
 
12
22
  const component = {
13
23
  extend: Button,
14
- props: {
15
- icon: 'arrow angle up',
16
- gap: 'X2',
17
- theme: 'primary',
18
- text: 'Call to Action',
19
- padding: 'Z2 B2',
20
- round: 'C'
21
- }
24
+ props
22
25
  }
23
26
 
24
- const code = `{
25
- extend: Button,
26
- props: {
27
- icon: 'arrow angle up',
28
- theme: 'primary',
29
- text: 'Call to Action',
30
- round: 'C'
31
- }
32
- }`
33
-
34
- const state = {}
35
- const props = {
36
- }
27
+ const code = ``
37
28
 
38
29
  const settings = {
39
30
  gridOptions: { colspan: 4, rowspan: 2 }
@@ -43,6 +34,7 @@ export default {
43
34
  key,
44
35
  title,
45
36
  description,
37
+ extend,
46
38
  category,
47
39
  component,
48
40
  code,
@@ -2,43 +2,32 @@
2
2
 
3
3
  import { CATEGORIES } from '../categories'
4
4
 
5
- import style from './style'
6
- import { Button } from '@symbo.ls/components'
5
+ import { Button } from 'smbls'
7
6
 
8
7
  const key = 'all-star'
9
8
  const title = 'All Star'
10
9
  const description = ''
11
10
  const category = CATEGORIES[1]
11
+ const extend = 'Button'
12
12
 
13
- const component = {
14
- extend: Button,
15
- style,
16
-
17
- props: {
18
- icon: 'star',
19
- text: 'All Star',
20
- theme: 'label',
21
- padding: 'X1 Z2',
22
- gap: 'X',
23
- round: 'A'
24
- }
13
+ const state = {}
14
+ const props = {
15
+ icon: 'star',
16
+ text: 'All Star',
17
+ theme: 'label',
18
+ padding: 'X1 Z2',
19
+ gap: 'X',
20
+ round: 'A',
21
+ fontWeight: 'bold'
25
22
  }
26
23
 
27
- const code = `{
24
+ const component = {
28
25
  extend: Button,
29
- props: {
30
- round: 'A',
31
- padding: 'Z A',
32
- icon: 'star',
33
- text: 'Archived',
34
- theme: 'label'
35
- }
36
- }`
37
-
38
- const state = {}
39
- const props = {
26
+ props
40
27
  }
41
28
 
29
+ const code = ``
30
+
42
31
  const settings = {
43
32
  gridOptions: { colspan: 3, rowspan: 2 }
44
33
  }
@@ -48,10 +37,13 @@ export default {
48
37
  title,
49
38
  description,
50
39
  category,
40
+ extend,
41
+
51
42
  component,
52
43
  code,
53
44
  state,
54
45
  props,
46
+
55
47
  settings,
56
48
  interactivity: [],
57
49
  dataTypes: []
@@ -2,48 +2,31 @@
2
2
 
3
3
  import { CATEGORIES } from '../categories'
4
4
 
5
- import { CircleButton } from '@symbo.ls/components'
5
+ import { CircleButton } from 'smbls'
6
6
 
7
7
  const key = 'button-circle'
8
8
  const title = 'Circle Button'
9
+ const extend = 'CircleButton'
9
10
  const description = ''
10
11
  const category = CATEGORIES[1]
11
12
 
12
- const component = {
13
- extend: CircleButton,
14
- props: {
15
- theme: 'secondary',
16
- background: 'blue .2',
17
- fontSize: 'A2',
18
- color: 'white',
19
- padding: 'Y2',
20
- icon: null,
21
- text: '3'
22
- }
23
- }
24
-
25
- const code = {
26
- react: `<CircleButton
27
- ...{
13
+ const state = {}
14
+ const props = {
28
15
  theme: 'secondary',
16
+ background: 'blue .2',
17
+ fontSize: 'A2',
18
+ color: 'white',
29
19
  padding: 'Y2',
30
20
  text: '3'
31
- } />`,
32
- domql: `{
33
- extend: CircleButton,
34
- props: {
35
- theme: 'secondary',
36
- padding: 'Y2',
37
- text: '3'
38
- }
39
- }`
40
21
  }
41
22
 
42
- const state = {}
43
- const props = {
44
- text: '3'
23
+ const component = {
24
+ extend: CircleButton,
25
+ props
45
26
  }
46
27
 
28
+ const code = ``
29
+
47
30
  const settings = {
48
31
  gridOptions: { colspan: 2, rowspan: 2 }
49
32
  }
@@ -54,6 +37,7 @@ export default {
54
37
  description,
55
38
  category,
56
39
  component,
40
+ extend,
57
41
  code,
58
42
  state,
59
43
  props,
@@ -2,86 +2,59 @@
2
2
 
3
3
  import { CATEGORIES } from '../categories'
4
4
 
5
- import { KangorooButton } from '@symbo.ls/components'
5
+ import { KangorooButton } from 'smbls'
6
6
 
7
- const key = 'button-pro'
7
+ const key = 'ButtonPro'
8
8
  const title = 'Pro Button'
9
9
  const description = ''
10
10
  const category = CATEGORIES[1]
11
+ const extend = 'KangorooButton'
11
12
 
12
- const component = {
13
- extend: KangorooButton,
13
+ const state = {}
14
+ const props = {
15
+ theme: 'quinary',
16
+ round: 'Z2',
17
+ padding: 'X1 X1 X1 A2',
18
+ size: 'A',
19
+ gap: 'A',
20
+ transition: 'A defaultBezier',
21
+ transitionProperty: 'background, color, opacity',
22
+ color: 'white',
14
23
 
15
- props: {
16
- theme: 'quinary',
17
- round: 'Z2',
18
- padding: 'X1 X1 X1 A2',
19
- size: 'A',
20
- gap: 'A',
21
- transition: 'A defaultBezier',
22
- transitionProperty: 'background, color, opacity',
24
+ label: {
25
+ gap: 'X1',
26
+ text: 'Become PRO',
27
+ alignItems: 'center',
23
28
  color: 'white',
24
-
25
- label: {
26
- gap: 'X1',
27
- text: 'Become PRO',
28
- alignItems: 'center',
29
- color: 'white',
30
- fontWeight: '500',
31
- icon: {
32
- name: 'star',
33
- color: 'yellow'
34
- }
35
- },
36
- child: {
37
- background: 'black .65',
38
- round: 'Z',
39
- size: 'Z',
40
- padding: 'Z A2',
41
- text: '1 month free',
42
- opacity: '.85'
29
+ fontWeight: '500',
30
+ icon: {
31
+ name: 'star',
32
+ color: 'yellow'
43
33
  }
44
34
  },
45
-
46
- label: {},
47
- child: {}
48
- }
49
-
50
- const code = {
51
- react: `<KangorooButton ...{
52
- // ...
53
-
54
- label: {
55
- // ...
56
- },
57
-
58
35
  child: {
59
- // ...
36
+ background: 'black .65',
37
+ round: 'Z',
38
+ size: 'Z',
39
+ padding: 'Z A2',
40
+ text: '1 month free',
41
+ opacity: '.85'
60
42
  }
61
- } />`,
62
- domql: `{
63
- extend: KangorooButton,
43
+ }
64
44
 
65
- props: {
66
- // ...
45
+ const component = {
46
+ extend: KangorooButton,
67
47
 
68
- label: {
69
- // ...
70
- },
48
+ props,
71
49
 
72
- child: {
73
- // ...
74
- }
75
- }
76
- }`
50
+ label: {},
51
+ child: {}
77
52
  }
78
53
 
79
- const state = {}
80
- const props = {
81
- }
54
+ const code = ``
82
55
 
83
56
  const settings = {
84
- gridOptions: { colspan: 6, rowspan: 2 }
57
+ gridOptions: { colspan: 5, rowspan: 2 }
85
58
  }
86
59
 
87
60
  export default {
@@ -89,11 +62,13 @@ export default {
89
62
  title,
90
63
  description,
91
64
  category,
65
+ extend,
66
+
92
67
  component,
93
68
  code,
94
69
  state,
95
-
96
70
  props,
71
+
97
72
  settings,
98
73
  interactivity: ['click'],
99
74
  dataTypes: ['object']
@@ -2,92 +2,57 @@
2
2
 
3
3
  import { CATEGORIES } from '../categories'
4
4
 
5
- import { KangorooButton } from '@symbo.ls/components'
6
- import { isObject } from 'domql/src/utils'
5
+ import { KangorooButton } from 'smbls'
7
6
 
8
7
  const key = 'button-theme-switcher'
9
8
  const title = 'Theme Switcher'
10
9
  const description = ''
11
10
  const category = CATEGORIES[1]
11
+ const extend = 'KangorooButton'
12
12
 
13
- const component = {
14
- extend: KangorooButton,
15
-
16
- childExtend: {
17
-
18
- },
19
-
20
- props: {
21
- round: 'C',
22
- padding: 'V2 V2 V2 A1',
23
- gap: 'Z1',
24
- depth: 16,
25
- fontWeight: '500',
26
-
27
- label: {
28
- gap: 'X1',
29
- text: 'Light Mode',
30
- padding: 'Z2 X',
31
- icon: {
32
- color: 'yellow',
33
- name: 'sun'
34
- }
35
- },
36
-
37
- child: {
38
- gap: 'X1',
39
- round: 'C',
40
- text: 'Dark Mode',
41
- background: 'black .95',
42
- color: 'white',
43
- padding: 'Z2 A2',
44
- icon: {
45
- color: 'yellow',
46
- name: 'moon'
47
- }
13
+ const state = {}
14
+ const props = {
15
+ round: 'C',
16
+ padding: 'V2 V2 V2 A1',
17
+ gap: 'Z1',
18
+ depth: 16,
19
+ fontWeight: '500',
20
+
21
+ label: {
22
+ gap: 'X1',
23
+ text: 'Light Mode',
24
+ padding: 'Z2 X',
25
+ icon: {
26
+ color: 'yellow',
27
+ name: 'sun'
48
28
  }
49
29
  },
50
30
 
51
- label: {},
52
- child: {}
53
- }
54
-
55
- const code = `{
56
- extend: KangorooButton,
57
- props: {
31
+ child: {
32
+ gap: 'X1',
58
33
  round: 'C',
59
- size: 'Z',
60
-
61
- light: {
62
- icon: 'sun',
63
- text: 'Light Mode'
64
- },
65
-
66
- dark: {
67
- round: 'C',
68
- icon: 'moon',
69
- text: 'Dark Mode'
34
+ text: 'Dark Mode',
35
+ background: 'black .95',
36
+ color: 'white',
37
+ padding: 'Z2 A2',
38
+ icon: {
39
+ color: 'yellow',
40
+ name: 'moon'
70
41
  }
71
42
  }
72
- }`
43
+ }
73
44
 
74
- const state = {}
75
- const props = {
76
- round: 'C',
77
- size: 'Z',
45
+ const component = {
46
+ extend: KangorooButton,
78
47
 
79
- light: {
80
- icon: 'sun',
81
- text: 'Light Mode'
82
- },
48
+ props,
83
49
 
84
- child: {
85
- round: 'C',
86
- icon: 'moon',
87
- text: 'Dark Mode'
88
- }
50
+ label: {},
51
+ child: {}
89
52
  }
90
53
 
54
+ const code = ``
55
+
91
56
  const settings = {
92
57
  gridOptions: { colspan: 5, rowspan: 2 }
93
58
  }
@@ -98,6 +63,8 @@ export default {
98
63
  description,
99
64
  category,
100
65
  component,
66
+ extend,
67
+
101
68
  code,
102
69
  state,
103
70
  props,
@@ -0,0 +1,42 @@
1
+ 'use strict'
2
+
3
+ import { codify } from '@symbo.ls/utils'
4
+
5
+ import Button from './button'
6
+ import CircleButton from './button-circle'
7
+ import ButtonPro from './button-pro'
8
+ import ButtonAllStar from './button-all-star'
9
+ import User from './user'
10
+ import UserBundle from './user-bundle'
11
+ import ButtonThemeSwitcher from './button-theme-switcher'
12
+ import Notification from './notification'
13
+ import DropdownList from './dropdown'
14
+ import Label from './label'
15
+ import Datepicker from './datepicker'
16
+ import Field from './field'
17
+ import Tooltip from './tooltip'
18
+ import Pills from './pills'
19
+
20
+ const components = {
21
+ Button,
22
+ CircleButton,
23
+ UserBundle,
24
+ ButtonPro,
25
+ ButtonAllStar,
26
+ User,
27
+ ButtonThemeSwitcher,
28
+ Notification,
29
+ DropdownList,
30
+ Label,
31
+ Datepicker,
32
+ Field,
33
+ Tooltip,
34
+ Pills
35
+ }
36
+
37
+ export const COMPONENTS = Object.keys(components).map(key => {
38
+ const item = components[key]
39
+ const { props } = item
40
+ const code = codify(item.extend, props)
41
+ return { ...item, code }
42
+ })
@@ -10,17 +10,20 @@ const key = 'datepicker'
10
10
  const title = 'DatePicker'
11
11
  const description = ''
12
12
  const category = CATEGORIES[7]
13
+ const extend = 'DatePicker'
14
+
15
+ const state = {}
16
+ const props = {
17
+ background: '--theme-quinary-dark-background',
18
+ style: {
19
+ backdropFilter: 'blur(3px)',
20
+ }
21
+ }
13
22
 
14
23
  const component = {
15
24
  style,
16
25
  extend: DatePicker,
17
- props: {
18
- theme: null,
19
- background: '--theme-quinary-dark-background',
20
- style: {
21
- backdropFilter: 'blur(3px)',
22
- }
23
- },
26
+ props,
24
27
  aside: {
25
28
  cnt: {
26
29
  $setStateCollection: () => {
@@ -32,13 +35,6 @@ const component = {
32
35
 
33
36
  const code = `{}`
34
37
 
35
- const state = {}
36
- const props = {
37
- style: {
38
- backdropFilter: 'blur(3px)',
39
- }
40
- }
41
-
42
38
  const settings = {
43
39
  gridOptions: { colspan: 7, rowspan: 5 }
44
40
  }
@@ -48,6 +44,7 @@ export default {
48
44
  title,
49
45
  description,
50
46
  category,
47
+ extend,
51
48
  component,
52
49
  code,
53
50
  state,
@@ -2,14 +2,18 @@
2
2
 
3
3
  import { CATEGORIES } from '../categories'
4
4
 
5
- import { DropdownList } from '@symbo.ls/components'
5
+ import { DropdownList } from 'smbls'
6
6
 
7
- const key = 'dropdown-list'
7
+ const key = 'dropdown'
8
8
  const title = 'Dropdown List'
9
9
  const description = ''
10
10
  const category = CATEGORIES[5]
11
+ const extend = 'DropdownList'
12
+
13
+ const state = {
14
+ active: '1'
15
+ }
11
16
 
12
- const state = {}
13
17
  const props = {
14
18
  theme: 'quaternary',
15
19
  round: 'A'
@@ -25,7 +29,15 @@ const component = {
25
29
  { span: { text: 'Yesterday' } } ,
26
30
  { span: { text: 'A week age' } } ,
27
31
  { span: { text: 'A month ago' } }
28
- ]
32
+ ],
33
+
34
+ childExtend: {
35
+ on: {
36
+ click: (event, element, state) => {
37
+ state.update({ active: element.key })
38
+ }
39
+ }
40
+ }
29
41
  }
30
42
 
31
43
  const code = `{}`
@@ -38,10 +50,13 @@ export default {
38
50
  title,
39
51
  description,
40
52
  category,
53
+ extend,
54
+
41
55
  component,
42
56
  code,
43
57
  state,
44
58
  props,
59
+
45
60
  settings,
46
61
  interactivity: [],
47
62
  dataTypes: []
@@ -8,18 +8,19 @@ const key = 'field'
8
8
  const title = 'Field'
9
9
  const description = ''
10
10
  const category = CATEGORIES[2]
11
+ const extend = 'Input'
12
+
13
+ const state = {}
14
+ const props = {
15
+ placeholder: 'Text in me'
16
+ }
11
17
 
12
18
  const component = {
13
19
  extend: Input,
14
- props: (el, s) => ({
15
- placeholder: 'Text in me'
16
- })
20
+ props
17
21
  }
18
22
 
19
- const code = `{}`
20
-
21
- const state = {}
22
- const props = {}
23
+ const code = ``
23
24
 
24
25
  const settings = {
25
26
  gridOptions: { colspan: 4, rowspan: 2 }
@@ -31,6 +32,8 @@ export default {
31
32
  description,
32
33
  category,
33
34
  component,
35
+ extend,
36
+
34
37
  code,
35
38
  state,
36
39
  props,
package/.symbols/index.js CHANGED
@@ -1,121 +1,4 @@
1
1
  'use strict'
2
2
 
3
- import { deepMerge } from '@domql/utils'
4
-
5
- import circleButton from './button-circle'
6
- import buttonContacts from './button-contacts'
7
- import buttonDownload from './button-download'
8
- import buttonPro from './button-pro'
9
- import buttonArchived from './button-archived'
10
- import buttonUser from './button-user'
11
- import buttonThemeSwitcher from './button-theme-switcher'
12
- import notification from './notification'
13
- import dropdownList from './dropdown-list'
14
- import label from './label'
15
- import datepicker from './datepicker'
16
- import field from './field'
17
- import tooltip from './tooltip'
18
- import pills from './pills'
19
-
20
- import * as smbls from '@symbo.ls/components/src/allImports'
21
-
22
- const define = {
23
- default: {
24
- settings: {
25
- gridOptions: { colspan: 3, rowspan: 2 }
26
- }
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
- },
49
- AccessibilityCheck: {
50
- settings: {
51
- gridOptions: { colspan: 8, rowspan: 2 }
52
- }
53
- },
54
- Upload: {
55
- settings: {
56
- gridOptions: { colspan: 5, rowspan: 2 }
57
- }
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
- },
69
- DeviceButtonSet: {
70
- settings: {
71
- gridOptions: { colspan: 6, rowspan: 2 }
72
- }
73
- },
74
- SearchHeader: {
75
- settings: {
76
- gridOptions: { colspan: 6, rowspan: 2 }
77
- }
78
- },
79
- Search: {
80
- settings: {
81
- gridOptions: { colspan: 4 }
82
- }
83
- },
84
- CodePreview: {
85
- settings: {
86
- gridOptions: { colspan: 4, rowspan: 4 }
87
- }
88
- },
89
- StateDesignElement: {
90
- settings: {
91
- gridOptions: { colspan: 3, rowspan: 2 }
92
- }
93
- }
94
- }
95
-
96
- export const LIBRARY = Object.keys(smbls).map(key => {
97
- const component = smbls[key]
98
- const base = define[key] || define.default
99
- return deepMerge({
100
- key,
101
- component: { extend: component },
102
- code: 'private',
103
- }, base)
104
- })
105
-
106
- export const COMPONENTS = [
107
- circleButton,
108
- buttonDownload,
109
- buttonPro,
110
- buttonArchived,
111
- buttonContacts,
112
- buttonUser,
113
- label,
114
- buttonThemeSwitcher,
115
- notification,
116
- dropdownList,
117
- datepicker,
118
- field,
119
- tooltip,
120
- pills
121
- ]
3
+ export * from './library'
4
+ export * from './components'
@@ -8,13 +8,17 @@ const key = 'label'
8
8
  const title = 'Label'
9
9
  const description = ''
10
10
  const category = CATEGORIES[0]
11
+ const extend = 'Label'
12
+
13
+ const state = {}
14
+ const props = {
15
+ text: state.value
16
+ }
11
17
 
12
18
  const component = {
13
19
  extend: Label,
14
20
  state: { value: 2 },
15
- props: ({ state }) => ({
16
- text: state.value
17
- }),
21
+ props,
18
22
  on: {
19
23
  click: (ev, { state }) => {
20
24
  state.update({ value: state.value + 1 })
@@ -22,10 +26,7 @@ const component = {
22
26
  }
23
27
  }
24
28
 
25
- const code = `{}`
26
-
27
- const state = {}
28
- const props = {}
29
+ const code = ``
29
30
 
30
31
  const settings = {
31
32
  gridOptions: { colspan: 3, rowspan: 2 }
@@ -0,0 +1,90 @@
1
+ 'use strict'
2
+
3
+ import * as lib from '@symbo.ls/components/src/allImports'
4
+
5
+ import { deepMerge } from '@domql/utils'
6
+
7
+ const define = {
8
+ default: {
9
+ settings: {
10
+ gridOptions: { colspan: 3, rowspan: 2 }
11
+ }
12
+ },
13
+ ButtonTitle: {
14
+ props: {
15
+ iconBox: {
16
+ icon: { name: 'checkmark' }
17
+ },
18
+ title: {
19
+ text: 'screen'
20
+ }
21
+ },
22
+ settings: {
23
+ gridOptions: { colspan: 3, rowspan: 2 }
24
+ }
25
+ },
26
+ WiderButton: {
27
+ props: {
28
+ icon: { name: 'color outline' }
29
+ },
30
+ settings: {
31
+ gridOptions: { colspan: 3, rowspan: 2 }
32
+ }
33
+ },
34
+ AccessibilityCheck: {
35
+ settings: {
36
+ gridOptions: { colspan: 8, rowspan: 2 }
37
+ }
38
+ },
39
+ Upload: {
40
+ settings: {
41
+ gridOptions: { colspan: 5, rowspan: 2 }
42
+ }
43
+ },
44
+ TestText: {
45
+ settings: {
46
+ gridOptions: { colspan: 6, rowspan: 2 }
47
+ }
48
+ },
49
+ Platforms: {
50
+ settings: {
51
+ gridOptions: { colspan: 5, rowspan: 2 }
52
+ }
53
+ },
54
+ DeviceButtonSet: {
55
+ settings: {
56
+ gridOptions: { colspan: 6, rowspan: 2 }
57
+ }
58
+ },
59
+ SearchHeader: {
60
+ settings: {
61
+ gridOptions: { colspan: 6, rowspan: 2 }
62
+ }
63
+ },
64
+ Search: {
65
+ settings: {
66
+ gridOptions: { colspan: 4 }
67
+ }
68
+ },
69
+ CodePreview: {
70
+ settings: {
71
+ gridOptions: { colspan: 4, rowspan: 4 }
72
+ }
73
+ },
74
+ StateDesignElement: {
75
+ settings: {
76
+ gridOptions: { colspan: 3, rowspan: 2 }
77
+ }
78
+ }
79
+ }
80
+
81
+ export const LIBRARY = Object.keys(lib).map(key => {
82
+ const component = lib[key]
83
+ const base = define[key] || define.default
84
+ return deepMerge({
85
+ key,
86
+ component: { extend: component },
87
+ props: {},
88
+ code: { react: 'private', domql: 'private' }
89
+ }, base)
90
+ })
@@ -8,24 +8,20 @@ const key = 'notification'
8
8
  const title = 'Notification'
9
9
  const description = ''
10
10
  const category = CATEGORIES[4]
11
-
12
- const component = {
13
- extend: Notification,
14
- props: { theme: 'alert' }
15
- }
16
-
17
- const code = `{
18
- extend: Notification,
19
- props: {
20
- theme: 'alert'
21
- }
22
- }`
11
+ const extend = 'Notification'
23
12
 
24
13
  const state = {}
25
14
  const props = {
26
15
  theme: 'alert'
27
16
  }
28
17
 
18
+ const component = {
19
+ extend: Notification,
20
+ props
21
+ }
22
+
23
+ const code = ``
24
+
29
25
  const settings = {
30
26
  gridOptions: { colspan: 4, rowspan: 2 }
31
27
  }
@@ -35,7 +31,9 @@ export default {
35
31
  title,
36
32
  description,
37
33
  category,
34
+ extend,
38
35
  component,
36
+
39
37
  code,
40
38
  state,
41
39
  props,
@@ -2,24 +2,25 @@
2
2
 
3
3
  import { CATEGORIES } from '../categories'
4
4
 
5
- import { Pills } from '@symbo.ls/components'
5
+ import { Pills } from 'smbls'
6
6
 
7
7
  const key = 'pills'
8
8
  const title = 'Pills'
9
9
  const description = ''
10
10
  const category = CATEGORIES[CATEGORIES.length - 1]
11
+ const extend = 'Pills'
12
+
13
+ const state = { active: 1 }
14
+ const props = {}
11
15
 
12
16
  const component = {
13
17
  extend: Pills,
14
- state: { active: 1 },
18
+ state,
15
19
  ...[{}, {}, {}, {}, {}]
16
20
  }
17
21
 
18
22
  const code = `{}`
19
23
 
20
- const state = {}
21
- const props = {}
22
-
23
24
  const settings = {
24
25
  gridOptions: { colspan: 3, rowspan: 2 }
25
26
  }
@@ -30,6 +31,8 @@ export default {
30
31
  description,
31
32
  category,
32
33
  component,
34
+ extend,
35
+
33
36
  code,
34
37
  state,
35
38
  props,
@@ -8,15 +8,16 @@ const key = 'tooltip'
8
8
  const title = 'Tooltip'
9
9
  const description = ''
10
10
  const category = CATEGORIES[8]
11
+ const extend = 'Tooltip'
12
+
13
+ const state = {}
14
+ const props = {}
11
15
 
12
16
  const component = {
13
17
  extend: Tooltip
14
18
  }
15
19
 
16
- const code = `{}`
17
-
18
- const state = {}
19
- const props = {}
20
+ const code = ``
20
21
 
21
22
  const settings = {
22
23
  gridOptions: { colspan: 4, rowspan: 2 }
@@ -27,11 +28,13 @@ export default {
27
28
  title,
28
29
  description,
29
30
  category,
31
+ extend,
32
+
30
33
  component,
31
34
  code,
32
35
  state,
36
+ props,
33
37
 
34
- props,
35
38
  settings,
36
39
  interactivity: [],
37
40
  dataTypes: []
@@ -4,46 +4,50 @@ import { CATEGORIES } from '../categories'
4
4
 
5
5
  import { Button, User } from 'smbls'
6
6
 
7
- const key = 'button-user'
7
+ const key = 'user'
8
8
  const title = 'User Button'
9
9
  const description = ''
10
10
  const category = CATEGORIES[1]
11
+ const extend = 'User'
11
12
 
12
- const component = {
13
- extend: Button,
14
- tag: 'label',
13
+ const state = {}
14
+ const props = {
15
+ size: 'A',
16
+ round: 'C',
17
+ depth: 16,
18
+ gap: 'Y',
19
+ padding: 'W2 A W2 W2',
20
+ theme: 'quaternary',
15
21
 
16
- props: (el, s) => ({
17
- size: 'A',
18
- round: 'C',
19
- depth: 16,
20
- gap: 'Y',
21
- padding: 'W2 A W2 W2',
22
- theme: 'quaternary',
22
+ position: 'relative',
23
+ cursor: 'pointer',
23
24
 
24
- position: 'relative',
25
- cursor: 'pointer',
25
+ user: {
26
+ boxSize: 'B1 B1',
27
+ pointerEvents: 'none'
28
+ },
29
+
30
+ select: {
31
+ outline: 'none',
32
+ pointerEvents: 'all',
33
+ appearance: 'none',
34
+ border: 'none',
35
+ width: '100%',
36
+ height: '100%',
37
+ background: 'none',
38
+ color: 'currentColor',
39
+ fontSize: 'A',
40
+ lineHeight: 1,
41
+ margin: '0 0 0 -B1+X',
42
+ padding: '0 A 0 B1+X'
43
+ }
44
+ }
26
45
 
27
- user: {
28
- boxSize: 'B1 B1',
29
- pointerEvents: 'none'
30
- },
46
+ const component = {
47
+ extend: Button,
48
+ tag: 'label',
31
49
 
32
- select: {
33
- outline: 'none',
34
- pointerEvents: 'all',
35
- appearance: 'none',
36
- border: 'none',
37
- width: '100%',
38
- height: '100%',
39
- background: 'none',
40
- color: 'currentColor',
41
- fontSize: 'A',
42
- lineHeight: 1,
43
- margin: '0 0 0 -B1+X',
44
- padding: '0 A 0 B1+X'
45
- },
46
- }),
50
+ props,
47
51
 
48
52
  user: { extend: User },
49
53
  select: {
@@ -61,11 +65,7 @@ const component = {
61
65
  }
62
66
  }
63
67
 
64
- const code = `{
65
- }`
66
-
67
- const state = {}
68
- const props = {}
68
+ const code = ``
69
69
 
70
70
  const settings = {
71
71
  gridOptions: { colspan: 4, rowspan: 2 }
@@ -76,10 +76,13 @@ export default {
76
76
  title,
77
77
  description,
78
78
  category,
79
+ extend,
80
+
79
81
  component,
80
82
  code,
81
83
  state,
82
84
  props,
85
+
83
86
  settings,
84
87
  interactivity: [],
85
88
  dataTypes: []
@@ -3,33 +3,26 @@
3
3
  import { CATEGORIES } from '../categories'
4
4
  import style from './style'
5
5
 
6
- import { Button, UserBundle } from '@symbo.ls/components'
6
+ import { UserBundle } from 'smbls'
7
7
 
8
- const key = 'button-contacts'
8
+ const key = 'user-bundle'
9
9
  const title = 'Contacts Button'
10
10
  const description = ''
11
11
  const category = CATEGORIES[1]
12
+ const extend = 'UserBundle'
13
+
14
+ const state = {}
15
+ const props = {}
12
16
 
13
17
  const component = {
14
- extend: [UserBundle],
18
+ extend: UserBundle,
15
19
  ...[{}, {}, {}]
16
20
  }
17
21
 
18
- const code = `{
19
- round: 42,
20
- users: [{}, {}, {}],
21
- caption: 'View all Contacts'
22
- }`
23
-
24
- const state = {}
25
- const props = {
26
- round: 42,
27
- users: [{}, {}, {}],
28
- caption: 'View all Contacts'
29
- }
22
+ const code = ``
30
23
 
31
24
  const settings = {
32
- gridOptions: { colspan: 5, rowspan: 2 }
25
+ gridOptions: { colspan: 3, rowspan: 2 }
33
26
  }
34
27
 
35
28
  export default {
@@ -37,11 +30,13 @@ export default {
37
30
  title,
38
31
  description,
39
32
  category,
33
+ extend,
34
+
40
35
  component,
41
36
  code,
42
37
  state,
43
-
44
38
  props,
39
+
45
40
  settings,
46
41
  interactivity: [],
47
42
  dataTypes: []
package/README.md CHANGED
@@ -5,7 +5,7 @@ Example dev setup (boilerplate) to use [DOMQL](https://github.com/rackai/domql).
5
5
 
6
6
  1. Clone the repo
7
7
  ```
8
- git clone git@github.com:rackai/editor.git
8
+ git clone git@github.com:symbo-ls/preview.git
9
9
  ```
10
10
 
11
11
  2. Install scripts
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@symbo.ls/preview",
3
3
  "description": "",
4
4
  "author": "",
5
- "version": "0.0.31",
5
+ "version": "0.0.32",
6
6
  "repository": "https://github.com/rackai/editor",
7
7
  "main": "src/index.js",
8
8
  "scripts": {
@@ -74,7 +74,10 @@ export default {
74
74
 
75
75
  code: {
76
76
  extend: 'Code',
77
- props: { margin: '0', flex: '0 0 320px' },
77
+ props: {
78
+ flex: '0 0 320px',
79
+ margin: '0'
80
+ },
78
81
  if: ({ state }) => state.code,
79
82
  title: {},
80
83
  code: {
@@ -1,5 +0,0 @@
1
- 'use strict'
2
-
3
- export default {
4
- fontWeight: 'bold'
5
- }
File without changes