@symbo.ls/preview 0.0.20 → 0.0.22
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/.symbols/button-archived/index.js +0 -5
- package/.symbols/button-circle/index.js +4 -3
- package/.symbols/button-download/index.js +1 -6
- package/.symbols/button-pro/index.js +41 -32
- package/.symbols/button-theme-switcher/index.js +26 -20
- package/.symbols/button-user/index.js +24 -19
- package/.symbols/field/index.js +3 -2
- package/.symbols/label/index.js +9 -2
- package/.symbols/tooltip/index.js +1 -1
- package/package.json +1 -1
- package/src/app.js +1 -2
- package/src/pages/Color/index.js +1 -1
- package/src/pages/Components/index.js +0 -3
- package/src/pages/Export/scene.js +2 -4
- package/src/pages/Fonts/index.js +21 -21
- package/src/pages/Spaces/SpacingScale.js +2 -2
- package/.symbols/button-pro/style.js +0 -4
- package/.symbols/button-theme-switcher/style.js +0 -16
- package/.symbols/button-user/style.js +0 -25
|
@@ -13,6 +13,10 @@ const component = {
|
|
|
13
13
|
extend: CircleButton,
|
|
14
14
|
props: {
|
|
15
15
|
theme: 'secondary',
|
|
16
|
+
background: 'blue .2',
|
|
17
|
+
fontSize: 'A2',
|
|
18
|
+
color: 'white',
|
|
19
|
+
padding: 'Y2',
|
|
16
20
|
icon: null,
|
|
17
21
|
text: '3'
|
|
18
22
|
}
|
|
@@ -37,9 +41,6 @@ const code = {
|
|
|
37
41
|
|
|
38
42
|
const defaultState = {}
|
|
39
43
|
const props = {
|
|
40
|
-
theme: 'secondary',
|
|
41
|
-
padding: 'Y2',
|
|
42
|
-
spacingRatio: '1.618',
|
|
43
44
|
text: '3'
|
|
44
45
|
}
|
|
45
46
|
|
|
@@ -16,9 +16,8 @@ const component = {
|
|
|
16
16
|
gap: 'X2',
|
|
17
17
|
theme: 'quinary',
|
|
18
18
|
text: 'Download',
|
|
19
|
-
|
|
19
|
+
padding: 'Z2 B2',
|
|
20
20
|
border: '.2em, solid, blue .2',
|
|
21
|
-
padding: 'A1 B2',
|
|
22
21
|
round: 'C'
|
|
23
22
|
}
|
|
24
23
|
}
|
|
@@ -35,10 +34,6 @@ const code = `{
|
|
|
35
34
|
|
|
36
35
|
const defaultState = {}
|
|
37
36
|
const props = {
|
|
38
|
-
icon: 'arrowDown',
|
|
39
|
-
theme: 'quaternary',
|
|
40
|
-
text: 'Download',
|
|
41
|
-
round: 'C'
|
|
42
37
|
}
|
|
43
38
|
|
|
44
39
|
const settings = {
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
import { CATEGORIES } from '../categories'
|
|
4
4
|
|
|
5
|
-
import style from './style'
|
|
6
5
|
import { KangorooButton } from '@symbo.ls/components'
|
|
7
6
|
|
|
8
7
|
const key = 'button-pro'
|
|
@@ -11,64 +10,74 @@ const description = ''
|
|
|
11
10
|
const category = CATEGORIES[1]
|
|
12
11
|
|
|
13
12
|
const component = {
|
|
14
|
-
style,
|
|
15
13
|
extend: KangorooButton,
|
|
16
14
|
|
|
17
15
|
props: {
|
|
18
|
-
|
|
16
|
+
theme: 'quinary',
|
|
19
17
|
round: 'Z2',
|
|
20
|
-
padding:
|
|
18
|
+
padding: 'X1 X1 X1 A2',
|
|
21
19
|
size: 'A',
|
|
22
|
-
gap: '
|
|
23
|
-
|
|
20
|
+
gap: 'A',
|
|
21
|
+
transition: 'A defaultBezier',
|
|
22
|
+
transitionProperty: 'background, color, opacity',
|
|
23
|
+
color: 'white',
|
|
24
24
|
|
|
25
|
-
|
|
25
|
+
label: {
|
|
26
26
|
gap: 'X1',
|
|
27
|
-
icon: 'star',
|
|
28
27
|
text: 'Become PRO',
|
|
29
|
-
alignItems: 'center'
|
|
28
|
+
alignItems: 'center',
|
|
29
|
+
color: 'white',
|
|
30
|
+
fontWeight: '500',
|
|
31
|
+
icon: {
|
|
32
|
+
name: 'star',
|
|
33
|
+
color: 'yellow'
|
|
34
|
+
}
|
|
30
35
|
},
|
|
31
|
-
|
|
32
36
|
child: {
|
|
33
|
-
|
|
37
|
+
background: 'black .65',
|
|
38
|
+
round: 'Z',
|
|
34
39
|
size: 'Z',
|
|
35
40
|
padding: 'Z A2',
|
|
36
|
-
text: '1 month free'
|
|
41
|
+
text: '1 month free',
|
|
42
|
+
opacity: '.85'
|
|
37
43
|
}
|
|
38
44
|
},
|
|
39
45
|
|
|
40
|
-
|
|
46
|
+
label: {},
|
|
41
47
|
child: {}
|
|
42
48
|
}
|
|
43
49
|
|
|
44
|
-
const code =
|
|
45
|
-
|
|
46
|
-
|
|
50
|
+
const code = {
|
|
51
|
+
react: `<KangorooButton ...{
|
|
52
|
+
// ...
|
|
47
53
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
54
|
+
label: {
|
|
55
|
+
// ...
|
|
56
|
+
},
|
|
57
|
+
|
|
58
|
+
child: {
|
|
59
|
+
// ...
|
|
60
|
+
}
|
|
61
|
+
} />`,
|
|
62
|
+
domql: `{
|
|
63
|
+
extend: KangorooButton,
|
|
64
|
+
|
|
65
|
+
props: {
|
|
66
|
+
// ...
|
|
53
67
|
|
|
54
68
|
label: {
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
69
|
+
// ...
|
|
70
|
+
},
|
|
71
|
+
|
|
72
|
+
child: {
|
|
73
|
+
// ...
|
|
60
74
|
}
|
|
61
75
|
}
|
|
62
76
|
}`
|
|
77
|
+
}
|
|
63
78
|
|
|
64
79
|
const defaultState = {}
|
|
65
80
|
const props = {
|
|
66
|
-
|
|
67
|
-
round: 12,
|
|
68
|
-
padding: ['X1', 'X1', 'X1', 'A'],
|
|
69
|
-
size: 'A',
|
|
70
|
-
icon: 'info',
|
|
71
|
-
text: 'Become PRO'
|
|
72
81
|
}
|
|
73
82
|
|
|
74
83
|
const settings = {
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
import { CATEGORIES } from '../categories'
|
|
4
4
|
|
|
5
|
-
import style from './style'
|
|
6
5
|
import { KangorooButton } from '@symbo.ls/components'
|
|
7
6
|
import { isObject } from 'domql/src/utils'
|
|
8
7
|
|
|
@@ -12,41 +11,48 @@ const description = ''
|
|
|
12
11
|
const category = CATEGORIES[1]
|
|
13
12
|
|
|
14
13
|
const component = {
|
|
15
|
-
style: style,
|
|
16
14
|
extend: KangorooButton,
|
|
17
15
|
|
|
16
|
+
childExtend: {
|
|
17
|
+
|
|
18
|
+
},
|
|
19
|
+
|
|
18
20
|
props: {
|
|
19
21
|
round: 'C',
|
|
20
|
-
|
|
21
|
-
padding: 'X1 Y X1 A1',
|
|
22
|
+
padding: 'V2 V2 V2 A1',
|
|
22
23
|
gap: 'Z1',
|
|
23
24
|
depth: 16,
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
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
|
+
}
|
|
28
35
|
},
|
|
29
36
|
|
|
30
37
|
child: {
|
|
38
|
+
gap: 'X1',
|
|
31
39
|
round: 'C',
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
40
|
+
text: 'Dark Mode',
|
|
41
|
+
background: 'black .95',
|
|
42
|
+
color: 'white',
|
|
43
|
+
padding: 'Z2 A2',
|
|
44
|
+
icon: {
|
|
45
|
+
color: 'yellow',
|
|
46
|
+
name: 'moon'
|
|
47
|
+
}
|
|
35
48
|
}
|
|
36
49
|
},
|
|
37
50
|
|
|
38
|
-
|
|
51
|
+
label: {},
|
|
39
52
|
child: {}
|
|
40
53
|
}
|
|
41
54
|
|
|
42
|
-
|
|
43
|
-
return Object.entries(obj).reduce((str, [p, val]) => {
|
|
44
|
-
return `${str}${p}::${isObject(val) ? strfy(val) : val}\n`;
|
|
45
|
-
}, '');
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
const code = strfy(component)
|
|
49
|
-
const code2 = `{
|
|
55
|
+
const code = `{
|
|
50
56
|
extend: KangorooButton,
|
|
51
57
|
props: {
|
|
52
58
|
round: 'C',
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
import { CATEGORIES } from '../categories'
|
|
4
4
|
|
|
5
|
-
import style from './style'
|
|
6
5
|
import { Button, User } from '@symbo.ls/components'
|
|
7
6
|
|
|
8
7
|
const key = 'button-user'
|
|
@@ -13,7 +12,6 @@ const category = CATEGORIES[1]
|
|
|
13
12
|
const component = {
|
|
14
13
|
extend: Button,
|
|
15
14
|
tag: 'label',
|
|
16
|
-
style,
|
|
17
15
|
|
|
18
16
|
props: (el, s) => ({
|
|
19
17
|
size: 'A',
|
|
@@ -21,19 +19,32 @@ const component = {
|
|
|
21
19
|
depth: 16,
|
|
22
20
|
gap: 'Y2',
|
|
23
21
|
padding: 'W2 A W2 W2',
|
|
24
|
-
|
|
22
|
+
theme: 'tertiary',
|
|
23
|
+
|
|
24
|
+
position: 'relative',
|
|
25
|
+
cursor: 'pointer',
|
|
26
|
+
|
|
27
|
+
user: {
|
|
28
|
+
boxSize: 'B1 B1',
|
|
29
|
+
},
|
|
30
|
+
|
|
31
|
+
select: {
|
|
32
|
+
outline: 'none',
|
|
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
|
+
padding: '0 A 0 0'
|
|
42
|
+
},
|
|
25
43
|
}),
|
|
26
44
|
|
|
27
|
-
user: {
|
|
28
|
-
extend: User,
|
|
29
|
-
props: { boxSize: 'B1 B1' },
|
|
30
|
-
class: { dis: { pointerEvents: 'none' } }
|
|
31
|
-
},
|
|
45
|
+
user: { extend: User },
|
|
32
46
|
select: {
|
|
33
|
-
attr: {
|
|
34
|
-
name: 'user',
|
|
35
|
-
id: 'user'
|
|
36
|
-
},
|
|
47
|
+
attr: { name: 'user', id: 'user' },
|
|
37
48
|
childExtend: { tag: 'option' },
|
|
38
49
|
...[
|
|
39
50
|
{ text: 'Kevin' },
|
|
@@ -54,13 +65,7 @@ const code = `{
|
|
|
54
65
|
}`
|
|
55
66
|
|
|
56
67
|
const defaultState = {}
|
|
57
|
-
const props = {
|
|
58
|
-
size: 'A',
|
|
59
|
-
round: 'C',
|
|
60
|
-
depth: 16,
|
|
61
|
-
icon: 'arrowAngleDown',
|
|
62
|
-
theme: 'quaternary'
|
|
63
|
-
}
|
|
68
|
+
const props = {}
|
|
64
69
|
|
|
65
70
|
const settings = {
|
|
66
71
|
gridOptions: { colspan: 4, rowspan: 2 }
|
package/.symbols/field/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import { CATEGORIES } from '../categories'
|
|
4
4
|
|
|
5
|
-
import { Field } from '
|
|
5
|
+
import { Field, Input } from 'smbls'
|
|
6
6
|
|
|
7
7
|
const key = 'field'
|
|
8
8
|
const title = 'Field'
|
|
@@ -10,8 +10,9 @@ const description = ''
|
|
|
10
10
|
const category = CATEGORIES[2]
|
|
11
11
|
|
|
12
12
|
const component = {
|
|
13
|
-
extend:
|
|
13
|
+
extend: Input,
|
|
14
14
|
props: (el, s) => ({
|
|
15
|
+
placeholder: 'Text in me'
|
|
15
16
|
})
|
|
16
17
|
}
|
|
17
18
|
|
package/.symbols/label/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import { CATEGORIES } from '../categories'
|
|
4
4
|
|
|
5
|
-
import { Label } from '@symbo.ls/components'
|
|
5
|
+
import { Label, HoverEffect } from '@symbo.ls/components'
|
|
6
6
|
|
|
7
7
|
const key = 'label'
|
|
8
8
|
const title = 'Label'
|
|
@@ -11,7 +11,14 @@ const category = CATEGORIES[0]
|
|
|
11
11
|
|
|
12
12
|
const component = {
|
|
13
13
|
extend: Label,
|
|
14
|
-
|
|
14
|
+
state: { value: 2 },
|
|
15
|
+
props: ({ state }) => ({
|
|
16
|
+
text: state.value
|
|
17
|
+
}),
|
|
18
|
+
on: {
|
|
19
|
+
click: (ev, { state }) => {
|
|
20
|
+
state.update({ value: state.value + 1 })
|
|
21
|
+
}
|
|
15
22
|
}
|
|
16
23
|
}
|
|
17
24
|
|
package/package.json
CHANGED
package/src/app.js
CHANGED
|
@@ -7,7 +7,6 @@ import { router, lastLevel } from '@domql/router'
|
|
|
7
7
|
|
|
8
8
|
import { state } from './state'
|
|
9
9
|
import {
|
|
10
|
-
PageExtend,
|
|
11
10
|
Components,
|
|
12
11
|
DesignSystem,
|
|
13
12
|
Export,
|
|
@@ -21,7 +20,7 @@ Object.keys(DesignSystem.routes).map(route => {
|
|
|
21
20
|
extend: DesignSystem,
|
|
22
21
|
sidebar: {},
|
|
23
22
|
main: {
|
|
24
|
-
extend:
|
|
23
|
+
extend: DesignSystem.routes[route]
|
|
25
24
|
},
|
|
26
25
|
__filepath: 'pages/index.js'
|
|
27
26
|
}
|
package/src/pages/Color/index.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
'use strict'
|
|
2
2
|
|
|
3
|
-
import PageExtend from '../PageExtend'
|
|
4
3
|
import { splitRoute } from 'domql/packages/router'
|
|
5
4
|
|
|
6
5
|
import sidebar from './sidebar'
|
|
@@ -11,8 +10,6 @@ import { CATEGORIES } from '../../../.symbols/categories'
|
|
|
11
10
|
// import COMPONENTS from '../../data/components'
|
|
12
11
|
|
|
13
12
|
export const Components = {
|
|
14
|
-
extend: PageExtend,
|
|
15
|
-
|
|
16
13
|
props: {
|
|
17
14
|
maxWidth: '100%',
|
|
18
15
|
width: '100%',
|
|
@@ -33,11 +33,9 @@ export default {
|
|
|
33
33
|
|
|
34
34
|
content: {
|
|
35
35
|
props: {
|
|
36
|
-
transition: 'all, B,
|
|
36
|
+
transition: 'all, B, defaultBezier',
|
|
37
37
|
style: {
|
|
38
|
-
'*': {
|
|
39
|
-
transition: 'all 255ms cubic-bezier(.29,.67,.51,.97)'
|
|
40
|
-
}
|
|
38
|
+
'*': { transition: 'all 255ms cubic-bezier(.29,.67,.51,.97)' }
|
|
41
39
|
}
|
|
42
40
|
},
|
|
43
41
|
comp: (el, s) => ({
|
package/src/pages/Fonts/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict'
|
|
2
2
|
|
|
3
|
-
import { Grid, FontObject, FontFamilyObject, Line } from '@symbo.ls/components'
|
|
3
|
+
import { Grid, Hoverable, FontObject, FontFamilyObject, Line } from '@symbo.ls/components'
|
|
4
4
|
import { TypeSection } from '../Typography/shared'
|
|
5
5
|
|
|
6
6
|
import { state } from './state'
|
|
@@ -20,28 +20,12 @@ const mapFonts = (el, s) => {
|
|
|
20
20
|
title: v,
|
|
21
21
|
href: `/fonts/font-settings/${v}`,
|
|
22
22
|
labels: [
|
|
23
|
-
{ icon: '
|
|
23
|
+
{ icon: 'fontVariable', text: fontWeightCaption }
|
|
24
24
|
]
|
|
25
25
|
}
|
|
26
26
|
})
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
const mapFontFamilies = (el, s) => {
|
|
30
|
-
if (!el.context.SYSTEM) return
|
|
31
|
-
const { FONT_FAMILY } = el.context.SYSTEM
|
|
32
|
-
const fontFamilyKeys = Object.keys(FONT_FAMILY)
|
|
33
|
-
|
|
34
|
-
return fontFamilyKeys.map(v => {
|
|
35
|
-
const val = FONT_FAMILY[v]
|
|
36
|
-
if (v === 'default') return
|
|
37
|
-
return {
|
|
38
|
-
title: v,
|
|
39
|
-
href: `/fonts/font-family/${v}`,
|
|
40
|
-
val
|
|
41
|
-
}
|
|
42
|
-
}).filter(v => v)
|
|
43
|
-
}
|
|
44
|
-
|
|
45
29
|
const FontFaces = {
|
|
46
30
|
extend: TypeSection,
|
|
47
31
|
header: {
|
|
@@ -62,11 +46,27 @@ const FontFaces = {
|
|
|
62
46
|
gap: 'A',
|
|
63
47
|
margin: '0 -Z'
|
|
64
48
|
},
|
|
65
|
-
childExtend: FontObject,
|
|
49
|
+
childExtend: [FontObject, Hoverable],
|
|
66
50
|
$setCollection: mapFonts
|
|
67
51
|
}
|
|
68
52
|
}
|
|
69
53
|
|
|
54
|
+
const mapFontFamilies = (el, s) => {
|
|
55
|
+
if (!el.context.SYSTEM) return
|
|
56
|
+
const { FONT_FAMILY } = el.context.SYSTEM
|
|
57
|
+
const fontFamilyKeys = Object.keys(FONT_FAMILY)
|
|
58
|
+
|
|
59
|
+
return fontFamilyKeys.map(v => {
|
|
60
|
+
const val = FONT_FAMILY[v]
|
|
61
|
+
if (v === 'default') return
|
|
62
|
+
return {
|
|
63
|
+
title: v,
|
|
64
|
+
href: `/fonts/font-family/${v}`,
|
|
65
|
+
val
|
|
66
|
+
}
|
|
67
|
+
}).filter(v => v)
|
|
68
|
+
}
|
|
69
|
+
|
|
70
70
|
const FontFamilies = {
|
|
71
71
|
extend: TypeSection,
|
|
72
72
|
props: { padding: '0 0 E 0' },
|
|
@@ -83,12 +83,12 @@ const FontFamilies = {
|
|
|
83
83
|
content: {
|
|
84
84
|
extend: Grid,
|
|
85
85
|
props: {
|
|
86
|
-
columns: 'repeat(
|
|
86
|
+
columns: 'repeat(4, 1fr)',
|
|
87
87
|
gap: 'A',
|
|
88
88
|
margin: '0 -Z'
|
|
89
89
|
},
|
|
90
90
|
|
|
91
|
-
childExtend: FontFamilyObject,
|
|
91
|
+
childExtend: [FontFamilyObject, Hoverable],
|
|
92
92
|
$setCollection: mapFontFamilies
|
|
93
93
|
}
|
|
94
94
|
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
|
|
3
|
-
export default {
|
|
4
|
-
position: 'relative',
|
|
5
|
-
cursor: 'pointer',
|
|
6
|
-
svg: {
|
|
7
|
-
pointerEvents: 'none',
|
|
8
|
-
position: 'absolute',
|
|
9
|
-
right: `${13 / 16}em`
|
|
10
|
-
},
|
|
11
|
-
select: {
|
|
12
|
-
outline: 'none',
|
|
13
|
-
appearance: 'none',
|
|
14
|
-
border: 'none',
|
|
15
|
-
width: '100%',
|
|
16
|
-
height: '100%',
|
|
17
|
-
background: 'none',
|
|
18
|
-
boxSizing: 'border-box',
|
|
19
|
-
color: 'currentColor',
|
|
20
|
-
fontSize: '1em',
|
|
21
|
-
lineHeight: 1,
|
|
22
|
-
paddingRight: '1.618em'
|
|
23
|
-
// paddingRight: `${16 / 16}em`
|
|
24
|
-
}
|
|
25
|
-
}
|