@symbo.ls/preview 2.7.25 → 2.11.269

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2023 symbo.ls
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,75 @@
1
+ 'use strict'
2
+
3
+ import { Flex } from '@symbo.ls/atoms'
4
+ import { Banner } from '@symbo.ls/banner'
5
+ import { ColorBlock } from '../blocks'
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: ColorBlock,
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,29 @@
1
+ 'use strict'
2
+
3
+ import { icon } from '../blocks'
4
+
5
+ export const Icons = {
6
+ tag: 'article',
7
+ extend: 'Flex',
8
+
9
+ Header: {
10
+ tag: 'header',
11
+ extend: 'Banner',
12
+ Title: { text: 'Icons' },
13
+ Paragraph: {
14
+ P: {},
15
+ Flex: {
16
+ Title: {},
17
+ Paragraph: {
18
+ ...[{
19
+ props: { text: 'Brand font' }
20
+ }, {
21
+ props: { text: 'Functional font' }
22
+ }]
23
+ }
24
+ }
25
+ }
26
+ },
27
+
28
+ Section: { extend: icon }
29
+ }
@@ -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 '../blocks'
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 '../blocks'
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 { ColorBlock } from '../blocks'
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: ColorBlock,
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,90 @@
1
+ 'use strict'
2
+
3
+ // import { font } from '../Sections'
4
+ import { FontsBlock } from '../blocks'
5
+
6
+ export const Typography = {
7
+ tag: 'article',
8
+ extend: 'Flex',
9
+
10
+ Header: {
11
+ tag: 'header',
12
+ extend: 'Banner',
13
+ Title: {
14
+ props: {
15
+ text: 'type',
16
+ lineHeight: '1.15em'
17
+ }
18
+ },
19
+ Paragraph: {
20
+ P: {},
21
+ Flex: {
22
+ Title: {},
23
+ Paragraph: {
24
+ ...[{
25
+ props: { text: 'Brand font' }
26
+ }, {
27
+ props: { text: 'Functional font' }
28
+ }]
29
+ }
30
+ }
31
+ }
32
+ },
33
+
34
+ Flex: {
35
+ props: {
36
+ flow: 'column',
37
+ padding: 'B - C -',
38
+ childProps: {
39
+ ':not(:last-child)': {
40
+ border: 'solid, white .15',
41
+ borderWidth: '0 0 1px 0'
42
+ }
43
+ }
44
+ },
45
+ childExtend: FontsBlock,
46
+ ...[{}, {}]
47
+ }
48
+ // Section: {
49
+
50
+ // // Title: {},
51
+ // // Paragraph: {
52
+ // // props: ({ state }) => ({
53
+ // // font: `"${state.name}", sans-serif`,
54
+ // // theme: 'dialog',
55
+ // // padding: 'B2 -',
56
+ // // wordWrap: 'break-word',
57
+ // // flex: 5,
58
+ // // overflow: 'hidden',
59
+ // // color: 'white',
60
+ // // flow: 'column',
61
+ // // text: 'ABCDEFGHIJKLMNToday is a big day for our tribe. The year ends.abcdefghijklmnopqrstuvwxyz',
62
+ // // fontSize: 'G2',
63
+ // // fontWeight: '900',
64
+ // // lineHeight: '1em',
65
+ // // maxWidth: 'F2'
66
+ // // })
67
+ // // }
68
+ // }
69
+
70
+ // Section: {
71
+ // extend: font,
72
+ // Title: {
73
+ // props: { text: 'Sans Serif' }
74
+ // },
75
+ // Paragraph: {
76
+ // letters: {
77
+ // H1: { text: 'ABCDEFGHIJKLMNToday is a big day for our tribe. The year ends.' },
78
+ // H3: { text: 'abcdefghijklmopqrstuvwxyz' },
79
+ // P: { text: 'Quick brown fox jumps over lazy frog' }
80
+ // }
81
+ // }
82
+ // },
83
+
84
+ // $setStateCollection: ({ context }) => {
85
+ // const { FONT } = context.designSystem
86
+ // return Object.keys(FONT).map(v => ({
87
+ // name: v
88
+ // }))
89
+ // }
90
+ }
@@ -0,0 +1,9 @@
1
+ 'use strict'
2
+
3
+ export * from './Typography'
4
+ export * from './Colors'
5
+ export * from './Icons'
6
+ export * from './Shapes'
7
+ export * from './Themes'
8
+ export * from './Shadows'
9
+ export * from './Spacing'
@@ -0,0 +1,41 @@
1
+ 'use strict'
2
+
3
+ import { Hgroup } from '@symbo.ls/hgroup'
4
+
5
+ export const DefaultBlock = {
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,52 @@
1
+ 'use strict'
2
+
3
+ import { Grid } from '@symbo.ls/atoms'
4
+ import { DefaultBlock } from './section'
5
+
6
+ const ColorTemplate = {
7
+ extend: 'Flex',
8
+ props: {
9
+ gap: 'A'
10
+ },
11
+
12
+ Color: {
13
+ boxSize: 'D1',
14
+ aspectRatio: '1 / 1',
15
+ theme: 'dialog',
16
+ round: 'W'
17
+ },
18
+
19
+ Description: {
20
+ extend: 'Flex',
21
+ props: { gap: 'X', flow: 'column' },
22
+ Title: { color: 'title' },
23
+ Value: { margin: 'X - -', color: 'paragraph' },
24
+ Var: { color: 'paragraph' }
25
+ }
26
+ }
27
+
28
+ export const ColorBlock = {
29
+ extend: DefaultBlock,
30
+
31
+ Title: {
32
+ props: {
33
+ text: 'Primary color',
34
+ padding: 'C1 - B1 -'
35
+ }
36
+ },
37
+
38
+ Paragraph: {
39
+ extend: Grid,
40
+
41
+ props: {
42
+ columns: 'repeat(4, 1fr)',
43
+ gap: 'D',
44
+ '@tabletS': { columns: 'repeat(3, 1fr)' },
45
+ '@mobileL': { columns: 'repeat(2, 1fr)' },
46
+ '@mobileS': { columns: 'repeat(1, 1fr)' },
47
+ '@mobileXS': { gap: 'A2' }
48
+ },
49
+
50
+ childExtend: ColorTemplate
51
+ }
52
+ }
package/blocks/font.js ADDED
@@ -0,0 +1,60 @@
1
+ 'use stric'
2
+
3
+ import { DefaultBlock } from './section'
4
+
5
+ export const FontsBlock = {
6
+ extend: DefaultBlock,
7
+ props: {
8
+ flex: '1',
9
+ padding: 'D D D1 D',
10
+ '@mobileL': { padding: 'C C' },
11
+ '@mobileS': { padding: 'C B' }
12
+ },
13
+
14
+ Title: {
15
+ props: { text: 'Sans-Serif' }
16
+ },
17
+ Paragraph: {
18
+ tag: 'p',
19
+ props: {
20
+ theme: 'dialog',
21
+ fontSize: 'G2',
22
+ maxWidth: '100%',
23
+ boxSizing: 'border-box',
24
+ padding: 'A',
25
+ flow: 'column',
26
+ gap: '0',
27
+ round: 'V2',
28
+ lineHeight: '1.1em',
29
+ '@mobileL': {
30
+ fontSize: 'G',
31
+ padding: 'Z1 Z1'
32
+ },
33
+ '@mobileS': {
34
+ fontSize: 'F2',
35
+ padding: 'Z1 Z'
36
+ },
37
+
38
+ childProps: {
39
+ textOverflow: 'ellipsis',
40
+ overflow: 'hidden',
41
+ maxWidth: '100%',
42
+ whiteSpace: 'nowrap',
43
+ minWidth: '0',
44
+ text: 'Today is a big day for our tribe. The year ends.',
45
+ ':first-child': { fontWeight: '900' },
46
+ ':nth-child(2)': { fontWeight: '700' },
47
+ ':nth-child(3)': { fontWeight: '500' },
48
+ ':nth-child(4)': { fontWeight: '400' },
49
+ ':last-child': { fontWeight: '100' }
50
+ }
51
+ },
52
+ ...[
53
+ { },
54
+ {},
55
+ {},
56
+ {},
57
+ {}
58
+ ]
59
+ }
60
+ }
package/blocks/icon.js ADDED
@@ -0,0 +1,54 @@
1
+ 'use strict'
2
+
3
+ import { Grid } from '@symbo.ls/atoms'
4
+ import { DefaultBlock } from './section'
5
+
6
+ export const icon = {
7
+ extend: DefaultBlock,
8
+ props: {
9
+ padding: 'E D E1 D',
10
+ '@mobileL': { padding: 'D C' },
11
+ '@mobileS': { padding: 'D B' }
12
+ },
13
+
14
+ Title: null,
15
+ Paragraph: {
16
+ extend: Grid,
17
+ props: {
18
+ columns: 'repeat(7, 1fr)',
19
+ gap: 'C',
20
+ '@tabletS': { gap: 'B1' },
21
+ '@mobileL': { gap: 'A2' },
22
+ '@mobileM': { gap: 'A' },
23
+ '@mobileS': { gap: 'Z' }
24
+ // padding: 'E D E2 D'
25
+ },
26
+ childExtend: {
27
+ extend: 'Flex',
28
+ props: {
29
+ align: 'center',
30
+ aspectRatio: '1/1',
31
+ theme: 'dialog',
32
+ round: 'Z'
33
+ // padding: 'D B'
34
+ },
35
+ Icon: {
36
+ margin: 'auto',
37
+ fontSize: 'D',
38
+ '@mobileM': { fontSize: 'C' },
39
+ '@mobileS': {
40
+ fontSize: 'B1',
41
+ round: 'X'
42
+ }
43
+ }
44
+ },
45
+
46
+ $collection: ({ context }) => {
47
+ const { ICONS } = context.designSystem
48
+ return Object.keys(ICONS).map(name => ({
49
+ Icon: { name }
50
+ }))
51
+ }
52
+
53
+ }
54
+ }
@@ -0,0 +1,7 @@
1
+ 'use strict'
2
+
3
+ export * from './font'
4
+ export * from './color'
5
+ export * from './shadow'
6
+ export * from './icon'
7
+ export * from './shape'
@@ -0,0 +1,22 @@
1
+ 'use strict'
2
+
3
+ import { Hgroup } from '@symbo.ls/hgroup'
4
+
5
+ export const DefaultBlock = {
6
+ tag: 'section',
7
+ extend: Hgroup,
8
+
9
+ props: { gap: 'A' },
10
+
11
+ Title: {
12
+ tag: 'h5',
13
+ props: {
14
+ fontSize: 'A',
15
+ fontWeight: '500',
16
+ '@tabletS<': { alignItems: 'flex-end' },
17
+ letterSpacing: '.2em',
18
+ padding: '- Z1',
19
+ textTransform: 'uppercase'
20
+ }
21
+ }
22
+ }