@symbo.ls/preview 2.7.25 → 2.11.265
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/Section.js +41 -0
- package/articles/Colors.js +75 -0
- package/articles/Icons.js +95 -0
- package/articles/Shadows.js +34 -0
- package/articles/Shapes.js +40 -0
- package/articles/Spacing.js +35 -0
- package/articles/Themes.js +92 -0
- package/articles/Typography.js +95 -0
- package/articles/index.js +9 -0
- package/components.js +289 -0
- package/index.js +30 -45
- package/package.json +7 -26
- package/sections/color.js +52 -0
- package/sections/font.js +60 -0
- package/sections/icon.js +54 -0
- package/sections/index.js +7 -0
- package/sections/section.js +23 -0
- package/sections/shadow.js +91 -0
- package/sections/shape.js +34 -0
- package/state/color.js +3 -0
- package/state/icon.js +3 -0
- package/state/index.js +13 -0
- package/state/shadow.js +3 -0
- package/state/typography.js +15 -0
- package/.eslintrc.js +0 -9
- package/.vscode/settings.json +0 -6
- package/README.md +0 -1
- package/config.js +0 -6
- package/define.js +0 -10
- package/index.html +0 -12
- package/src/app.js +0 -54
- package/state.js +0 -14
- package/svgSprite.config.js +0 -8
package/Section.js
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
'use strict'
|
|
2
|
+
|
|
3
|
+
import { Hgroup } from '@symbo.ls/hgroup'
|
|
4
|
+
|
|
5
|
+
export const DemoSection = {
|
|
6
|
+
tag: 'section',
|
|
7
|
+
extend: Hgroup,
|
|
8
|
+
props: {
|
|
9
|
+
flow: 'row',
|
|
10
|
+
boxSizing: 'border-box',
|
|
11
|
+
// padding: 'E D2 F1 D1',
|
|
12
|
+
gap: 'B'
|
|
13
|
+
// border: '2px solid red'
|
|
14
|
+
// minWidth: '100%'
|
|
15
|
+
},
|
|
16
|
+
|
|
17
|
+
Title: {
|
|
18
|
+
tag: 'h5',
|
|
19
|
+
props: {
|
|
20
|
+
fontSize: 'B2',
|
|
21
|
+
margin: '- - - B',
|
|
22
|
+
padding: 'X - - -',
|
|
23
|
+
// padding: '- - - X',
|
|
24
|
+
// letterSpacing: '-0.02em',
|
|
25
|
+
// padding: 'Z2 C X -',
|
|
26
|
+
// padding: 'A - A C1+X',
|
|
27
|
+
fontWeight: '900',
|
|
28
|
+
'@tabletS<': { alignItems: 'flex-end' },
|
|
29
|
+
letterSpacing: '0.07em',
|
|
30
|
+
style: {
|
|
31
|
+
writingMode: 'vertical-rl',
|
|
32
|
+
textOrientation: 'mixed',
|
|
33
|
+
transform: 'rotate(180deg)'
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
},
|
|
38
|
+
Paragraph: {
|
|
39
|
+
props: { flex: '1' }
|
|
40
|
+
}
|
|
41
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
'use strict'
|
|
2
|
+
|
|
3
|
+
import { Flex } from '@symbo.ls/atoms'
|
|
4
|
+
import { Banner } from '@symbo.ls/banner'
|
|
5
|
+
import { ColorSection } from '../_Sections'
|
|
6
|
+
|
|
7
|
+
export const Colors = {
|
|
8
|
+
tag: 'article',
|
|
9
|
+
extend: Flex,
|
|
10
|
+
props: {
|
|
11
|
+
margin: 'auto',
|
|
12
|
+
minWidth: '100%'
|
|
13
|
+
},
|
|
14
|
+
|
|
15
|
+
Header: {
|
|
16
|
+
tag: 'header',
|
|
17
|
+
extend: Banner,
|
|
18
|
+
Title: { text: 'Colors' },
|
|
19
|
+
Paragraph: {
|
|
20
|
+
P: {},
|
|
21
|
+
Flex: {
|
|
22
|
+
Title: {},
|
|
23
|
+
Paragraph: [{
|
|
24
|
+
props: { text: 'Brand color pallete' }
|
|
25
|
+
}, {
|
|
26
|
+
props: { text: 'Semantic colors' }
|
|
27
|
+
}, {
|
|
28
|
+
props: { text: 'Theming' }
|
|
29
|
+
}]
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
|
|
34
|
+
Flex: {
|
|
35
|
+
props: {
|
|
36
|
+
flow: 'column',
|
|
37
|
+
overflow: 'auto',
|
|
38
|
+
padding: '- D E D',
|
|
39
|
+
'@mobileM': { padding: '- C' },
|
|
40
|
+
'@mobileS': { padding: '- B' }
|
|
41
|
+
},
|
|
42
|
+
|
|
43
|
+
childExtend: ColorSection,
|
|
44
|
+
|
|
45
|
+
pallete: {
|
|
46
|
+
Title: { text: 'Color pallete' },
|
|
47
|
+
Paragraph: {
|
|
48
|
+
$collection: ({ context }) => {
|
|
49
|
+
const { COLOR } = context.designSystem
|
|
50
|
+
return Object.keys(COLOR).filter(v => COLOR[v].value)
|
|
51
|
+
.map(v => ({
|
|
52
|
+
Color: { background: v },
|
|
53
|
+
Description: {
|
|
54
|
+
Title: { text: v },
|
|
55
|
+
Value: { text: COLOR[v].value },
|
|
56
|
+
Var: { text: COLOR[v].var }
|
|
57
|
+
}
|
|
58
|
+
}))
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
|
|
63
|
+
semantics: {
|
|
64
|
+
Title: { props: { text: 'Themes' } },
|
|
65
|
+
Paragraph: {
|
|
66
|
+
props: {
|
|
67
|
+
childProps: { theme: 'dialog' }
|
|
68
|
+
},
|
|
69
|
+
...[
|
|
70
|
+
{}, {}, {}, {}, {}, {}, {}, {}
|
|
71
|
+
]
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
'use strict'
|
|
2
|
+
|
|
3
|
+
import { Flex } from '@symbo.ls/atoms'
|
|
4
|
+
|
|
5
|
+
import { Banner } from '@symbo.ls/banner'
|
|
6
|
+
|
|
7
|
+
import { icon } from '../_Sections'
|
|
8
|
+
|
|
9
|
+
export const Icons = {
|
|
10
|
+
tag: 'article',
|
|
11
|
+
extend: Flex,
|
|
12
|
+
|
|
13
|
+
Header: {
|
|
14
|
+
tag: 'header',
|
|
15
|
+
extend: Banner,
|
|
16
|
+
Title: { text: 'Icons' },
|
|
17
|
+
Paragraph: {
|
|
18
|
+
P: {},
|
|
19
|
+
Flex: {
|
|
20
|
+
Title: {},
|
|
21
|
+
Paragraph: {
|
|
22
|
+
...[{
|
|
23
|
+
props: { text: 'Brand font' }
|
|
24
|
+
}, {
|
|
25
|
+
props: { text: 'Functional font' }
|
|
26
|
+
}]
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
|
|
32
|
+
Section: {
|
|
33
|
+
extend: icon
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
// Flex: {
|
|
37
|
+
// props: {
|
|
38
|
+
// flow: 'column',
|
|
39
|
+
// padding: 'E C1 - C1',
|
|
40
|
+
// gap: 'A1'
|
|
41
|
+
// },
|
|
42
|
+
|
|
43
|
+
// Hgroup: {
|
|
44
|
+
// props: {
|
|
45
|
+
// flow: 'row'
|
|
46
|
+
// },
|
|
47
|
+
// Title: {
|
|
48
|
+
// props: {
|
|
49
|
+
// text: 'Library',
|
|
50
|
+
// fontSize: 'C',
|
|
51
|
+
// gap: 'Z2',
|
|
52
|
+
// padding: '- C - Y',
|
|
53
|
+
// fontWeight: '900',
|
|
54
|
+
// ':after': {
|
|
55
|
+
// content: '""',
|
|
56
|
+
// height: '1px',
|
|
57
|
+
// flex: '1',
|
|
58
|
+
// display: 'block',
|
|
59
|
+
// background: 'white .2',
|
|
60
|
+
// round: 'C'
|
|
61
|
+
// }
|
|
62
|
+
|
|
63
|
+
// }
|
|
64
|
+
// }
|
|
65
|
+
// },
|
|
66
|
+
|
|
67
|
+
// Grid: {
|
|
68
|
+
// props: {
|
|
69
|
+
// columns: 'repeat(12, 1fr)',
|
|
70
|
+
// gap: 'Z'
|
|
71
|
+
// },
|
|
72
|
+
|
|
73
|
+
// childExtend: {
|
|
74
|
+
// extend: 'Flex',
|
|
75
|
+
// props: {
|
|
76
|
+
// align: 'center',
|
|
77
|
+
// aspectRatio: '1/1',
|
|
78
|
+
// theme: 'dialog',
|
|
79
|
+
// round: 'Z'
|
|
80
|
+
// },
|
|
81
|
+
// Icon: {
|
|
82
|
+
// margin: 'auto',
|
|
83
|
+
// fontSize: 'D'
|
|
84
|
+
// }
|
|
85
|
+
// },
|
|
86
|
+
|
|
87
|
+
// $collection: ({ context }) => {
|
|
88
|
+
// const { ICONS } = context.designSystem
|
|
89
|
+
// return Object.keys(ICONS).map(name => ({
|
|
90
|
+
// Icon: { name }
|
|
91
|
+
// }))
|
|
92
|
+
// }
|
|
93
|
+
// }
|
|
94
|
+
// }
|
|
95
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
'use strict'
|
|
2
|
+
|
|
3
|
+
import { Flex } from '@symbo.ls/atoms'
|
|
4
|
+
import { Banner } from '@symbo.ls/banner'
|
|
5
|
+
import { shadow } from '../_Sections'
|
|
6
|
+
|
|
7
|
+
export const Shadows = {
|
|
8
|
+
tag: 'article',
|
|
9
|
+
extend: Flex,
|
|
10
|
+
|
|
11
|
+
Header: {
|
|
12
|
+
tag: 'header',
|
|
13
|
+
extend: Banner,
|
|
14
|
+
|
|
15
|
+
Title: { text: 'Shadow' },
|
|
16
|
+
Paragraph: {
|
|
17
|
+
P: {},
|
|
18
|
+
Flex: {
|
|
19
|
+
Title: {},
|
|
20
|
+
Paragraph: {
|
|
21
|
+
...[{
|
|
22
|
+
props: { text: 'Brand font' }
|
|
23
|
+
}, {
|
|
24
|
+
props: { text: 'Functional font' }
|
|
25
|
+
}]
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
|
|
31
|
+
Section: {
|
|
32
|
+
extend: shadow
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
'use strict'
|
|
2
|
+
|
|
3
|
+
import { Flex } from '@symbo.ls/atoms'
|
|
4
|
+
|
|
5
|
+
import { Banner } from '@symbo.ls/banner'
|
|
6
|
+
import { shape } from '../_Sections'
|
|
7
|
+
|
|
8
|
+
export const Shapes = {
|
|
9
|
+
tag: 'article',
|
|
10
|
+
extend: Flex,
|
|
11
|
+
|
|
12
|
+
Header: {
|
|
13
|
+
tag: 'header',
|
|
14
|
+
extend: Banner,
|
|
15
|
+
|
|
16
|
+
Title: {
|
|
17
|
+
props: {
|
|
18
|
+
text: 'Shapes',
|
|
19
|
+
lineHeight: '1.15em'
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
Paragraph: {
|
|
23
|
+
P: {},
|
|
24
|
+
Flex: {
|
|
25
|
+
Title: {},
|
|
26
|
+
Paragraph: {
|
|
27
|
+
...[{
|
|
28
|
+
props: { text: 'Brand font' }
|
|
29
|
+
}, {
|
|
30
|
+
props: { text: 'Functional font' }
|
|
31
|
+
}]
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
|
|
37
|
+
Section: {
|
|
38
|
+
extend: shape
|
|
39
|
+
}
|
|
40
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
'use strict'
|
|
2
|
+
|
|
3
|
+
import { Flex } from '@symbo.ls/atoms'
|
|
4
|
+
|
|
5
|
+
import { Banner } from '@symbo.ls/banner'
|
|
6
|
+
|
|
7
|
+
export const Spacing = {
|
|
8
|
+
tag: 'article',
|
|
9
|
+
extend: Flex,
|
|
10
|
+
|
|
11
|
+
Header: {
|
|
12
|
+
tag: 'header',
|
|
13
|
+
extend: Banner,
|
|
14
|
+
|
|
15
|
+
Title: {
|
|
16
|
+
props: {
|
|
17
|
+
text: 'Spacing',
|
|
18
|
+
lineHeight: '1.15em'
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
Paragraph: {
|
|
22
|
+
P: {},
|
|
23
|
+
Flex: {
|
|
24
|
+
Title: {},
|
|
25
|
+
Paragraph: {
|
|
26
|
+
...[{
|
|
27
|
+
props: { text: 'Brand font' }
|
|
28
|
+
}, {
|
|
29
|
+
props: { text: 'Functional font' }
|
|
30
|
+
}]
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
'use strict'
|
|
2
|
+
|
|
3
|
+
import { Flex } from '@symbo.ls/atoms'
|
|
4
|
+
import { Icon } from '@symbo.ls/icon'
|
|
5
|
+
import { ColorSection } from '../_Sections'
|
|
6
|
+
|
|
7
|
+
export const Themes = {
|
|
8
|
+
tag: 'article',
|
|
9
|
+
extend: Flex,
|
|
10
|
+
|
|
11
|
+
Banner: {
|
|
12
|
+
Title: { props: { text: 'Themes' } },
|
|
13
|
+
Paragraph: {
|
|
14
|
+
props: {
|
|
15
|
+
alignItems: 'flex-end'
|
|
16
|
+
},
|
|
17
|
+
list: {
|
|
18
|
+
Title: { text: 'What you’ll find' },
|
|
19
|
+
Paragraph: {
|
|
20
|
+
...[
|
|
21
|
+
{ text: 'Dark theme' },
|
|
22
|
+
{ text: 'Light theme' }
|
|
23
|
+
]
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
P: {
|
|
27
|
+
text: 'Our color palette is led by a bold, distinct primary color and rounded out by a select set of secondary colors that give depth and diversity to our designs.'
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
|
|
32
|
+
Flex: {
|
|
33
|
+
props: {
|
|
34
|
+
flow: 'column',
|
|
35
|
+
padding: 'E C1 - C1',
|
|
36
|
+
gap: 'E'
|
|
37
|
+
},
|
|
38
|
+
childExtend: {
|
|
39
|
+
extend: ColorSection,
|
|
40
|
+
Hgroup: {},
|
|
41
|
+
Grid: {
|
|
42
|
+
props: {
|
|
43
|
+
columns: 'repeat(5, 1fr)',
|
|
44
|
+
childProps: {
|
|
45
|
+
theme: 'primary',
|
|
46
|
+
border: 'none !important'
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
childExtend: {
|
|
50
|
+
extend: Flex,
|
|
51
|
+
props: {
|
|
52
|
+
flow: 'column',
|
|
53
|
+
align: 'flex-start space-between',
|
|
54
|
+
padding: 'Z1 Z2'
|
|
55
|
+
},
|
|
56
|
+
icons: {
|
|
57
|
+
extend: Flex,
|
|
58
|
+
props: {
|
|
59
|
+
gap: 'B',
|
|
60
|
+
align: 'center space-between',
|
|
61
|
+
minWidth: '100%'
|
|
62
|
+
},
|
|
63
|
+
childExtend: Icon,
|
|
64
|
+
...[
|
|
65
|
+
{ props: { icon: 'sun' } },
|
|
66
|
+
{ props: { icon: 'moon' } }
|
|
67
|
+
]
|
|
68
|
+
},
|
|
69
|
+
title: {
|
|
70
|
+
tag: 'h6',
|
|
71
|
+
props: {
|
|
72
|
+
text: 'primary',
|
|
73
|
+
textTransform: 'capitalize',
|
|
74
|
+
fontWeight: '500'
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
...[{}, {}, {}, {}, {}, {}, {}, {}, {}, {}]
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
},
|
|
82
|
+
...[
|
|
83
|
+
{
|
|
84
|
+
Hgroup: {
|
|
85
|
+
Title: { props: { text: 'Dark Theme' } }
|
|
86
|
+
},
|
|
87
|
+
Grid: {
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
]
|
|
91
|
+
}
|
|
92
|
+
}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
'use strict'
|
|
2
|
+
|
|
3
|
+
import { Flex } from '@symbo.ls/atoms'
|
|
4
|
+
// import { font } from '../Sections'
|
|
5
|
+
import { Banner } from '@symbo.ls/banner'
|
|
6
|
+
import { font } from '../_Sections'
|
|
7
|
+
|
|
8
|
+
export const Typography = {
|
|
9
|
+
tag: 'article',
|
|
10
|
+
extend: Flex,
|
|
11
|
+
|
|
12
|
+
Header: {
|
|
13
|
+
tag: 'header',
|
|
14
|
+
extend: Banner,
|
|
15
|
+
Title: {
|
|
16
|
+
props: {
|
|
17
|
+
text: 'type',
|
|
18
|
+
lineHeight: '1.15em'
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
Paragraph: {
|
|
22
|
+
P: {},
|
|
23
|
+
Flex: {
|
|
24
|
+
Title: {},
|
|
25
|
+
Paragraph: {
|
|
26
|
+
...[{
|
|
27
|
+
props: { text: 'Brand font' }
|
|
28
|
+
}, {
|
|
29
|
+
props: { text: 'Functional font' }
|
|
30
|
+
}]
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
|
|
36
|
+
Flex: {
|
|
37
|
+
props: {
|
|
38
|
+
flow: 'column',
|
|
39
|
+
padding: 'B - C -',
|
|
40
|
+
childProps: {
|
|
41
|
+
':not(:last-child)': {
|
|
42
|
+
border: 'solid, white .15',
|
|
43
|
+
borderWidth: '0 0 1px 0'
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
childExtend: font,
|
|
48
|
+
...[
|
|
49
|
+
{},
|
|
50
|
+
{}
|
|
51
|
+
]
|
|
52
|
+
}
|
|
53
|
+
// Section: {
|
|
54
|
+
|
|
55
|
+
// // Title: {},
|
|
56
|
+
// // Paragraph: {
|
|
57
|
+
// // props: ({ state }) => ({
|
|
58
|
+
// // font: `"${state.name}", sans-serif`,
|
|
59
|
+
// // theme: 'dialog',
|
|
60
|
+
// // padding: 'B2 -',
|
|
61
|
+
// // wordWrap: 'break-word',
|
|
62
|
+
// // flex: 5,
|
|
63
|
+
// // overflow: 'hidden',
|
|
64
|
+
// // color: 'white',
|
|
65
|
+
// // flow: 'column',
|
|
66
|
+
// // text: 'ABCDEFGHIJKLMNToday is a big day for our tribe. The year ends.abcdefghijklmnopqrstuvwxyz',
|
|
67
|
+
// // fontSize: 'G2',
|
|
68
|
+
// // fontWeight: '900',
|
|
69
|
+
// // lineHeight: '1em',
|
|
70
|
+
// // maxWidth: 'F2'
|
|
71
|
+
// // })
|
|
72
|
+
// // }
|
|
73
|
+
// }
|
|
74
|
+
|
|
75
|
+
// Section: {
|
|
76
|
+
// extend: font,
|
|
77
|
+
// Title: {
|
|
78
|
+
// props: { text: 'Sans Serif' }
|
|
79
|
+
// },
|
|
80
|
+
// Paragraph: {
|
|
81
|
+
// letters: {
|
|
82
|
+
// H1: { text: 'ABCDEFGHIJKLMNToday is a big day for our tribe. The year ends.' },
|
|
83
|
+
// H3: { text: 'abcdefghijklmopqrstuvwxyz' },
|
|
84
|
+
// P: { text: 'Quick brown fox jumps over lazy frog' }
|
|
85
|
+
// }
|
|
86
|
+
// }
|
|
87
|
+
// },
|
|
88
|
+
|
|
89
|
+
// $setStateCollection: ({ context }) => {
|
|
90
|
+
// const { FONT } = context.designSystem
|
|
91
|
+
// return Object.keys(FONT).map(v => ({
|
|
92
|
+
// name: v
|
|
93
|
+
// }))
|
|
94
|
+
// }
|
|
95
|
+
}
|