@symbo.ls/preview 0.0.30 → 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.
@@ -0,0 +1,47 @@
1
+ 'use strict'
2
+
3
+ import { CATEGORIES } from '../categories'
4
+
5
+ import { Button } from 'smbls'
6
+
7
+ const key = 'button'
8
+ const title = 'Call to Action Button'
9
+ const description = ''
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
+ }
21
+
22
+ const component = {
23
+ extend: Button,
24
+ props
25
+ }
26
+
27
+ const code = ``
28
+
29
+ const settings = {
30
+ gridOptions: { colspan: 4, rowspan: 2 }
31
+ }
32
+
33
+ export default {
34
+ key,
35
+ title,
36
+ description,
37
+ extend,
38
+ category,
39
+ component,
40
+ code,
41
+ state,
42
+
43
+ props,
44
+ settings,
45
+ interactivity: ['click'],
46
+ dataTypes: ['object']
47
+ }
@@ -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 defaultState = {}
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
- defaultState,
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 defaultState = {}
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,8 +37,9 @@ export default {
54
37
  description,
55
38
  category,
56
39
  component,
40
+ extend,
57
41
  code,
58
- defaultState,
42
+ state,
59
43
  props,
60
44
  settings,
61
45
  interactivity: ['click'],
@@ -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 defaultState = {}
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
- defaultState,
95
-
69
+ state,
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 defaultState = {}
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,8 +63,10 @@ export default {
98
63
  description,
99
64
  category,
100
65
  component,
66
+ extend,
67
+
101
68
  code,
102
- defaultState,
69
+ state,
103
70
  props,
104
71
  settings,
105
72
  interactivity: [],
@@ -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 defaultState = {}
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,9 +44,10 @@ export default {
48
44
  title,
49
45
  description,
50
46
  category,
47
+ extend,
51
48
  component,
52
49
  code,
53
- defaultState,
50
+ state,
54
51
  props,
55
52
  settings,
56
53
  interactivity: ['click', 'choose'],
@@ -0,0 +1,63 @@
1
+ 'use strict'
2
+
3
+ import { CATEGORIES } from '../categories'
4
+
5
+ import { DropdownList } from 'smbls'
6
+
7
+ const key = 'dropdown'
8
+ const title = 'Dropdown List'
9
+ const description = ''
10
+ const category = CATEGORIES[5]
11
+ const extend = 'DropdownList'
12
+
13
+ const state = {
14
+ active: '1'
15
+ }
16
+
17
+ const props = {
18
+ theme: 'quaternary',
19
+ round: 'A'
20
+ }
21
+
22
+ const component = {
23
+ extend: DropdownList,
24
+ state,
25
+ props,
26
+
27
+ $setCollection: () => [
28
+ { span: { text: 'Today' } } ,
29
+ { span: { text: 'Yesterday' } } ,
30
+ { span: { text: 'A week age' } } ,
31
+ { span: { text: 'A month ago' } }
32
+ ],
33
+
34
+ childExtend: {
35
+ on: {
36
+ click: (event, element, state) => {
37
+ state.update({ active: element.key })
38
+ }
39
+ }
40
+ }
41
+ }
42
+
43
+ const code = `{}`
44
+ const settings = {
45
+ gridOptions: { colspan: 5, rowspan: 5 }
46
+ }
47
+
48
+ export default {
49
+ key,
50
+ title,
51
+ description,
52
+ category,
53
+ extend,
54
+
55
+ component,
56
+ code,
57
+ state,
58
+ props,
59
+
60
+ settings,
61
+ interactivity: [],
62
+ dataTypes: []
63
+ }
@@ -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 defaultState = {}
22
- const props = {}
23
+ const code = ``
23
24
 
24
25
  const settings = {
25
26
  gridOptions: { colspan: 4, rowspan: 2 }
@@ -31,8 +32,10 @@ export default {
31
32
  description,
32
33
  category,
33
34
  component,
35
+ extend,
36
+
34
37
  code,
35
- defaultState,
38
+ state,
36
39
  props,
37
40
  settings,
38
41
  interactivity: ['input'],