@symbo.ls/preview 0.0.60 → 0.0.61

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/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@symbo.ls/preview",
3
3
  "description": "",
4
4
  "author": "",
5
- "version": "0.0.60",
5
+ "version": "0.0.61",
6
6
  "repository": "https://github.com/rackai/editor",
7
7
  "main": "src/index.js",
8
8
  "scripts": {
Binary file
@@ -8,7 +8,6 @@ export const TutorialBanner = {
8
8
  props: ({ state }) => ({
9
9
  flow: 'column',
10
10
  round: 'A',
11
- flex: '1',
12
11
  height: 'F',
13
12
  padding: 'A2 B',
14
13
  background: 'gray2',
@@ -17,6 +16,7 @@ export const TutorialBanner = {
17
16
  overflow: 'hidden',
18
17
  position: 'relative',
19
18
  color: 'white',
19
+ flex: 1,
20
20
 
21
21
  title: { margin: 'auto 0 0', text: state.title },
22
22
  p: { text: state.p },
@@ -0,0 +1,78 @@
1
+ 'use strict'
2
+
3
+ import { DesignElement, Flex, Grid } from '@symbo.ls/components'
4
+
5
+ const componentHeader = {
6
+ tag: 'header',
7
+ extend: [DesignElement, Flex],
8
+
9
+ props: ({ state }) => ({
10
+ minWidth: '100%',
11
+ padding: 'Z1 - Z1 Z2',
12
+ flow: 'row',
13
+ round: '0',
14
+ alignItems: 'flex-start',
15
+ pointerEvents: 'none',
16
+ background: 'gray2',
17
+
18
+ button: {
19
+ padding: 'Y2',
20
+ icon: state.icon,
21
+ theme: state.iconTheme
22
+ },
23
+ heading: {
24
+ gap: '0',
25
+ title: {
26
+ text: state.title,
27
+ textTransform: 'capitalize'
28
+ },
29
+ p: {
30
+ text: state.paragraph,
31
+ maxWidth: 'F1'
32
+ }
33
+ }
34
+ })
35
+ }
36
+
37
+ const propertyNumber = {
38
+ extend: Grid,
39
+ props: ({ state }) => ({
40
+ columns: 'repeat(2, 1fr)',
41
+ property: {
42
+ text: state.property,
43
+ color: 'gray6'
44
+ },
45
+ value: {
46
+ text: state.value,
47
+ fontWeight: '500'
48
+ }
49
+ }),
50
+ property: {},
51
+ value: {}
52
+ }
53
+
54
+ const componentProperties = {
55
+ extend: Flex,
56
+ props: {
57
+ padding: 'Z2 A',
58
+ flow: 'column',
59
+ gap: 'Z2',
60
+ background: 'gray1'
61
+ },
62
+ childExtend: propertyNumber,
63
+ $setStateCollection: ({ state }) => state.properties
64
+ }
65
+
66
+ export const DesignComponent = {
67
+ extend: Flex,
68
+ props: {
69
+ flow: 'column',
70
+ maxWidth: 'F2',
71
+ round: 'A',
72
+ height: 'fit-content',
73
+ overflow: 'hidden'
74
+ },
75
+
76
+ componentHeader,
77
+ componentProperties
78
+ }
@@ -23,7 +23,7 @@ const fontWeights = {
23
23
  top: '0',
24
24
  fontSize: '20px'
25
25
  },
26
- childProps: { fontSize: 'F3' }
26
+ childProps: { fontSize: 'F2' }
27
27
  },
28
28
  childExtend: {
29
29
  extend: { text: 'A' }
@@ -39,20 +39,19 @@ const letterTransform = {
39
39
  extend: Flex,
40
40
  props: {
41
41
  alignItems: 'center',
42
- // border: '2px solid red',
42
+ height: 'fit-content',
43
43
  gap: 'X2',
44
44
  childProps: {
45
45
  minHeight: 'fit-content'
46
- // border: '2px solid black'
47
46
  }
48
47
  },
49
48
  childExtend: {},
50
49
  ...[
51
- { props: { text: 'a', textTransform: 'uppercase', fontSize: 'F', fontWeight: '700' } },
52
- { props: { text: 'b', fontWeight: '700', fontSize: 'E' } },
53
- { props: { text: 'c', fontWeight: '500', fontSize: 'D1' } },
54
- { props: { text: 'd', fontSize: 'C1' } },
55
- { props: { text: 'e', fontWeight: '300', fontSize: 'B1' } },
50
+ { props: { text: 'a', textTransform: 'uppercase', fontSize: 'F2', fontWeight: '700' } },
51
+ { props: { text: 'b', fontWeight: '700', fontSize: 'F' } },
52
+ { props: { text: 'c', fontWeight: '500', fontSize: 'D2' } },
53
+ { props: { text: 'd', fontSize: 'C2' } },
54
+ { props: { text: 'e', fontSize: 'C' } },
56
55
  { props: { text: 'f', fontSize: 'B' } }
57
56
  ]
58
57
  }
@@ -64,7 +63,7 @@ const fontStyle = {
64
63
  },
65
64
  childExtend: {
66
65
  props: {
67
- fontSize: 'F',
66
+ fontSize: 'F2',
68
67
  textTransform: 'uppercase',
69
68
  fontWeight: '300',
70
69
  margin: '0',
@@ -167,14 +166,17 @@ export const FontText = {
167
166
  props,
168
167
 
169
168
  fontName,
169
+
170
170
  content: {
171
171
  extend: Flex,
172
172
  fonts: {
173
173
  extend: Flex,
174
+
174
175
  fontWeights,
175
176
  letterTransform,
176
177
  fontStyle
177
178
  },
179
+
178
180
  paragraph
179
181
  },
180
182
 
@@ -20,3 +20,4 @@ export * from './SpacingPreview'
20
20
  export * from './ResponsivePreview'
21
21
  export * from './IconsGroup'
22
22
  export * from './FontText'
23
+ export * from './DesignComponent'
@@ -1,11 +1,13 @@
1
1
  'use strict'
2
2
 
3
3
  export const fontText = {
4
+
4
5
  HeaderHeading: {
5
- caption: { text: 'Let’s make sure' },
6
+ props: { margin: '- - D2 -' },
7
+ caption: { text: `Let's make sure` },
6
8
  h1: { text: 'Texts look good?' }
7
9
  },
8
10
 
9
11
  FontText: {},
10
- ContinueButton: {}
12
+ ContinueButton: { props: { margin: 'F - - -' } }
11
13
  }
@@ -0,0 +1,132 @@
1
+ 'use strict'
2
+
3
+ import { Flex, CommonField, WiderButton, Button } from '@symbo.ls/components'
4
+
5
+ import { HeaderHeading } from '../../components'
6
+
7
+ const header = {
8
+ extend: HeaderHeading,
9
+ props: {
10
+ margin: '- - D -',
11
+ caption: { text: 'And finally' },
12
+ h1: {
13
+ text: 'Choose your environment',
14
+ flow: 'row-reverse',
15
+ align: 'center flex-end',
16
+ span: {
17
+ text: 'if any',
18
+ fontWeight: '300',
19
+ opacity: '.85',
20
+ padding: '- - - X'
21
+ },
22
+ span2: {
23
+ text: ',',
24
+ fontWeight: '300',
25
+ opacity: '.85'
26
+ }
27
+ }
28
+ },
29
+
30
+ caption: {},
31
+ h1: {
32
+ extend: Flex,
33
+ span: {},
34
+ span2: { }
35
+ }
36
+ }
37
+
38
+ const commonField = {
39
+ extend: CommonField,
40
+ props: {
41
+ gap: 'Z2',
42
+ element: {
43
+ gap: 'A',
44
+ maxWidth: 'I',
45
+ alignItems: 'center',
46
+ childProps: {
47
+ // boxSize: 'B2 C',
48
+ // padding: '0',
49
+ background: 'gray2',
50
+ color: 'white .8',
51
+ round: 'Z1'
52
+ }
53
+ }
54
+ },
55
+
56
+ title: {},
57
+ element: {
58
+ extend: Flex,
59
+ childExtend: {
60
+ extend: WiderButton
61
+ }
62
+ }
63
+ }
64
+ const yourEnvironment = {
65
+ extend: commonField,
66
+ props: {
67
+ margin: '- - C2 -',
68
+ title: { text: 'Your environment' },
69
+ element: {
70
+ childProps: {}
71
+ }
72
+ },
73
+
74
+ title: {},
75
+ element: {
76
+ ...[
77
+ { props: { icon: 'inputOutline' } },
78
+ { props: { icon: 'accessibilityOutline' } },
79
+ {
80
+ props: {
81
+ boxSizing: 'content-box',
82
+ padding: 'Z C3',
83
+ border: '2px solid red',
84
+ style: { borderRadius: '50px' },
85
+ span: {
86
+ text: `I'm just playing`,
87
+ fontSize: 'Z'
88
+ }
89
+ },
90
+ icon: null,
91
+ span: {}
92
+ },
93
+
94
+ {
95
+ props: {
96
+ icon: 'inputOutline',
97
+ margin: '- - - auto'
98
+ }
99
+ }
100
+ ]
101
+ }
102
+ }
103
+
104
+ const yourFramework = {
105
+ extend: commonField,
106
+ props: {
107
+ margin: '- - F -',
108
+ title: { text: 'Your framework' },
109
+ element: { childProps: { icon: 'info' } }
110
+ },
111
+ title: {},
112
+ element: { ...[{}, {}, {}, {}, {}, {}] }
113
+ }
114
+
115
+ const createSymbolsButton = {
116
+ extend: Button,
117
+ props: {
118
+ text: 'create symbols',
119
+ fontSize: 'Z2',
120
+ padding: 'Z1 C',
121
+ textTransform: 'capitalize',
122
+ round: 'C',
123
+ theme: 'primary'
124
+ }
125
+ }
126
+
127
+ export const chooseEnvironment = {
128
+ header,
129
+ yourEnvironment,
130
+ yourFramework,
131
+ createSymbolsButton
132
+ }
@@ -6,10 +6,10 @@ import globalThemes from './globalThemes'
6
6
  import palette from './palette'
7
7
  import themes from './themes'
8
8
 
9
- // import { ThemeButtons } from '../../components'
10
- // import { themeLightDark } from './themeLightDark'
11
- // import { CreatePallete } from './CreatePalette'
12
- // import { fontText } from './FontText'
9
+ import { themeLightDark } from './themeLightDark'
10
+ import { CreatePallete } from './CreatePalette'
11
+ import { fontText } from './FontText'
12
+ import { chooseEnvironment } from './chooseEnvironment'
13
13
 
14
14
  export const Color = {
15
15
  key: 'colors',
@@ -21,7 +21,8 @@ export const Color = {
21
21
 
22
22
  // createPallete: CreatePallete,
23
23
  // themeLightDark,
24
- // fontText
24
+ // fontText,
25
+ // chooseEnvironment,
25
26
 
26
27
  globalThemes,
27
28
  line: { extend: Line },
@@ -6,6 +6,7 @@ import { TutorialBanner } from '../../../components'
6
6
  import DARK_PNG from '../../../assets/dark.png'
7
7
  import TYPE_PNG from '../../../assets/type.png'
8
8
  import SPACE_PNG from '../../../assets/space.png'
9
+ import SHAPES_PNG from '../../../assets/shapes.png'
9
10
 
10
11
  export default {
11
12
  extend: Flex,
@@ -20,18 +21,18 @@ export default {
20
21
 
21
22
  $setStateCollection: ({ state }) => [{
22
23
  title: 'Setting up a dark theme',
23
- p: '1 min tutorial',
24
+ p: '15 sec tutorial',
24
25
  background: DARK_PNG,
25
26
  href: ''
26
27
  }, {
27
- title: 'Learn typography scaling',
28
- p: '2 mins tutorial',
28
+ title: 'How to composite',
29
+ p: '3 mins tutorial',
29
30
  background: TYPE_PNG,
30
31
  href: ''
31
32
  }, {
32
- title: 'How scaling of space works',
33
- p: '5 mins tutorial',
34
- background: SPACE_PNG,
33
+ title: 'Master Shapes',
34
+ p: '45 sec tutorial',
35
+ background: SHAPES_PNG,
35
36
  href: ''
36
37
  }]
37
38
  }
@@ -1,8 +1,8 @@
1
1
  'use strict'
2
2
 
3
- import summary from './summary'
4
- import quickstart from './quickstart'
5
3
  import banners from './banners'
4
+ import quickstart from './quickstart'
5
+ import summary from './summary'
6
6
 
7
7
  export const DesignSystemDashboard = {
8
8
  ArticleBig: {
@@ -1,5 +1,21 @@
1
1
  'use strict'
2
2
 
3
+ const startElementProps = {
4
+ position: 'relative',
5
+ maxWidth: 'G',
6
+ width: '100%',
7
+ note: {
8
+ fontSize: 'Z1',
9
+ color: 'gray6',
10
+ position: 'absolute',
11
+ maxWidth: '100%',
12
+ whiteSpace: 'initial',
13
+ top: '115%',
14
+ left: 'Z',
15
+ fontFamily: 'smbls'
16
+ }
17
+ }
18
+
3
19
  export default {
4
20
  props: {
5
21
  margin: 'C1 - E1'
@@ -17,8 +33,9 @@ export default {
17
33
  align: 'flex-start space-between',
18
34
  childProps: {
19
35
  flex: '1',
20
- maxWidth: 'H'
21
- // width: '100%'
36
+
37
+ Terminal: startElementProps,
38
+ Code: startElementProps
22
39
  }
23
40
  },
24
41
 
@@ -26,21 +43,20 @@ export default {
26
43
  extend: 'QuickStartTerminal',
27
44
  QuickStartNumber: { width: '.87ch', text: '1' },
28
45
  Terminal: {
29
- command: { text: 'yarn add smbls' }
46
+ note: { text: 'Install Symbols to your project' },
47
+ props: {
48
+ command: { text: 'npm i smbls -g' }
49
+ }
30
50
  }
31
51
  },
32
52
 
33
53
  step2: {
34
- extend: 'QuickStartCode',
54
+ extend: 'QuickStartTerminal',
35
55
  QuickStartNumber: { text: '2' },
36
- Code: {
37
- code: {
38
- text: {
39
- react: `import { SymbolsProvider } from 'smbls/react'
40
- <SymbolsProvider config={{ color… }} />`,
41
- domql: `import { init } from 'smbls'
42
- init({ color, theme, typography… })`
43
- }
56
+ Terminal: {
57
+ note: { text: 'Login to Symbols from command line' },
58
+ props: {
59
+ command: { text: 'smbls login' }
44
60
  }
45
61
  }
46
62
  },
@@ -49,14 +65,24 @@ init({ color, theme, typography… })`
49
65
  extend: 'QuickStartCode',
50
66
  QuickStartNumber: { text: '3' },
51
67
  Code: {
52
- code: {
53
- text: {
54
- react: `import { Box } from 'smbls/react'
55
- <Box color='primary' />`,
56
- domql: `{ props: { color: 'primary' } }`
68
+ note: { text: 'Create .symbolsrc.js file in your project and insert your Symbols key' },
69
+ props: {
70
+ code: {
71
+ text: '{ "key": "key.symbo.ls" }'
57
72
  }
58
73
  }
59
74
  }
75
+ },
76
+
77
+ step4: {
78
+ extend: 'QuickStartTerminal',
79
+ QuickStartNumber: { text: '4' },
80
+ Terminal: {
81
+ note: { text: 'Sync live changes' },
82
+ props: {
83
+ command: { text: 'smbls sync' }
84
+ }
85
+ }
60
86
  }
61
87
  }
62
88
  }
@@ -1,9 +1,141 @@
1
1
  'use strict'
2
+ import { Grid } from '@symbo.ls/components'
3
+
4
+ import { DesignComponent } from '../../../components'
5
+
6
+ const DESIGN_SYSTEM_ITEMS = [{
7
+ icon: 'colorOutline',
8
+ iconTheme: 'theme',
9
+ title: 'colors',
10
+ paragraph: 'Colorize styles manually',
11
+ iconBackground: 'red',
12
+ properties: [{
13
+ property: 'Colors',
14
+ value: '35'
15
+ }, {
16
+ property: 'Themes',
17
+ value: '15'
18
+ }]
19
+ }, {
20
+ icon: 'typographyOutline',
21
+ iconTheme: 'typography',
22
+ title: 'typography',
23
+ paragraph: 'style a typed material',
24
+ properties: [{
25
+ property: 'Base size',
26
+ value: '16px'
27
+ }, {
28
+ property: 'Ratio',
29
+ value: '1.2'
30
+ }, {
31
+ property: 'Style',
32
+ value: '8'
33
+ }, {
34
+ property: 'Fonts',
35
+ value: '2'
36
+ }, {
37
+ property: 'Breakpoints',
38
+ value: '3'
39
+ }]
40
+ }, {
41
+ icon: 'spaceOutline',
42
+ iconTheme: 'space',
43
+ title: 'Spacing',
44
+ paragraph: 'Manage properties of a size',
45
+ properties: [{
46
+ property: 'Ratio',
47
+ value: '1.618'
48
+ }, {
49
+ property: 'Style',
50
+ value: '8'
51
+ }, {
52
+ property: 'Breakpoints',
53
+ value: '3'
54
+ }]
55
+ }, {
56
+ icon: 'shape',
57
+ iconTheme: 'shape',
58
+ title: 'shapes',
59
+ paragraph: 'Design an outline to a chosen component',
60
+ properties: [{
61
+ property: 'HTML',
62
+ value: '32'
63
+ }, {
64
+ property: 'SVG',
65
+ value: '1'
66
+ }]
67
+ }, {
68
+ icon: 'iconsOutline',
69
+ iconTheme: 'color',
70
+ title: 'Icons',
71
+ paragraph: 'Label a role of subject with glyphs',
72
+ properties: [{
73
+ property: 'Linear',
74
+ value: '788'
75
+ }, {
76
+ property: 'Colored',
77
+ value: '64'
78
+ }]
79
+ }, {
80
+ icon: 'clock',
81
+ iconTheme: 'icons',
82
+ title: 'Timing',
83
+ paragraph: 'Tokens for transitions and animations',
84
+ properties: [{
85
+ property: 'Timing base',
86
+ value: '150ms'
87
+ }, {
88
+ property: 'Ratio',
89
+ value: '1.618'
90
+ }, {
91
+ property: 'Transitions',
92
+ value: '15'
93
+ }, {
94
+ property: 'Animations',
95
+ value: '11'
96
+ }]
97
+ }, {
98
+ icon: 'deviceMobileOutline',
99
+ title: 'Breakpoints',
100
+ paragraph: 'Label a role of subject with glyphs',
101
+ properties: [{
102
+ property: 'Breakpoints',
103
+ value: '8'
104
+ }, {
105
+ property: 'Screens',
106
+ value: '3'
107
+ }]
108
+ }, {
109
+ icon: 'threeDots',
110
+ title: 'Sequence',
111
+ paragraph: 'The mapping system of generative sizing units',
112
+ properties: [{
113
+ property: 'Breakpoints',
114
+ value: '8'
115
+ }, {
116
+ property: 'Screens',
117
+ value: '3'
118
+ }]
119
+ }]
120
+
121
+ export const designComponents = {
122
+ extend: Grid,
123
+ props: {
124
+ columns: 'repeat(5, 1fr)',
125
+ rows: 'repeat(3, 1fr)'
126
+ },
127
+
128
+ childExtend: { extend: DesignComponent },
129
+
130
+ $setStateCollection: () => DESIGN_SYSTEM_ITEMS
131
+ }
2
132
 
3
133
  export default {
4
134
  SectionHeader: {
5
135
  margin: '- - C1',
6
136
  title: 'Design System takeaways',
7
137
  p: 'Your tokens in the system at a glance'
8
- }
138
+ },
139
+
140
+ designComponents
9
141
  }
package/src/state.js CHANGED
@@ -6,7 +6,8 @@ import BYLD from '../user_data/byld' // eslint-disable-line no-unused-vars
6
6
 
7
7
  export const state = {
8
8
  globalTheme: 'dark',
9
- SYSTEM: {}
9
+ SYSTEM
10
+ // SYSTEM: {}
10
11
  }
11
12
 
12
13
  export const context = {