@symbo.ls/preview 0.0.65 → 0.0.67
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 +1 -1
- package/src/app.js +9 -3
- package/src/components/ColorsPalette.js +60 -55
- package/src/components/ContinueButton.js +8 -6
- package/src/components/Header.js +8 -12
- package/src/components/HeaderHeading.js +8 -11
- package/src/components/Page.js +15 -1
- package/src/components/UploadImage.js +3 -3
- package/src/index.js +18 -2
- package/src/pages/Color/index.js +2 -14
- package/src/pages/DesignSystem/Dashboard/state.js +1 -1
- package/src/pages/Init/ChooseEnvironment.js +108 -0
- package/src/pages/{Color/themeLightDark.js → Init/CreateDocumentTheme.js} +45 -48
- package/src/pages/{Color → Init}/CreatePalette.js +24 -21
- package/src/pages/Init/FontText.js +21 -0
- package/src/pages/Init/index.js +35 -0
- package/src/pages/index.js +1 -0
- package/src/style.js +5 -1
- package/src/pages/Color/FontText.js +0 -13
- package/src/pages/Color/chooseEnvironment.js +0 -132
package/package.json
CHANGED
package/src/app.js
CHANGED
|
@@ -8,6 +8,7 @@ import { openModal } from '@symbo.ls/components'
|
|
|
8
8
|
|
|
9
9
|
import { state } from './state'
|
|
10
10
|
import {
|
|
11
|
+
Init,
|
|
11
12
|
Components,
|
|
12
13
|
DesignSystem,
|
|
13
14
|
Export,
|
|
@@ -47,6 +48,7 @@ const App = {
|
|
|
47
48
|
|
|
48
49
|
define: { routes: param => param },
|
|
49
50
|
routes: {
|
|
51
|
+
'/init': Init,
|
|
50
52
|
'/library': Library,
|
|
51
53
|
'/design-system': DesignSystem,
|
|
52
54
|
'/components': Components,
|
|
@@ -61,12 +63,16 @@ const App = {
|
|
|
61
63
|
Modal: {},
|
|
62
64
|
|
|
63
65
|
on: {
|
|
64
|
-
render:
|
|
66
|
+
render: (el, s) => {
|
|
65
67
|
const { pathname, hash } = window.location
|
|
66
68
|
const url = pathname + hash
|
|
67
|
-
router(
|
|
69
|
+
router(el, url, {})
|
|
70
|
+
},
|
|
71
|
+
update: (el, s) => {
|
|
72
|
+
const { pathname } = window.location
|
|
73
|
+
if (pathname === '/' && !state.initialized) return router(el, '/init/', {})
|
|
74
|
+
openModal(el, s)
|
|
68
75
|
},
|
|
69
|
-
update: (el, s) => { openModal(el, s) },
|
|
70
76
|
scroll: (ev, el) => {
|
|
71
77
|
const { scrollTop } = el.node
|
|
72
78
|
const isFloating = scrollTop > 0
|
|
@@ -1,64 +1,69 @@
|
|
|
1
1
|
'use strict'
|
|
2
2
|
|
|
3
|
-
import { Flex, Grid } from '@symbo.ls/components'
|
|
4
|
-
|
|
5
|
-
const props = {
|
|
6
|
-
flow: 'column',
|
|
7
|
-
gap: 'A',
|
|
8
|
-
opacity: '.35'
|
|
9
|
-
}
|
|
3
|
+
import { ClickableItem, CommonField, Flex, Grid } from '@symbo.ls/components'
|
|
10
4
|
|
|
11
5
|
export const ColorsPalette = {
|
|
12
|
-
|
|
6
|
+
extend: CommonField,
|
|
7
|
+
|
|
8
|
+
props: {
|
|
9
|
+
gap: 'Z',
|
|
10
|
+
element: {
|
|
11
|
+
margin: '0 -X',
|
|
12
|
+
flow: 'column',
|
|
13
|
+
gap: 'Z2'
|
|
14
|
+
}
|
|
15
|
+
},
|
|
13
16
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
extend:
|
|
17
|
-
|
|
17
|
+
title: { text: 'Suggestions' },
|
|
18
|
+
element: {
|
|
19
|
+
extend: Flex,
|
|
20
|
+
childExtend: {
|
|
21
|
+
extend: [ClickableItem, Grid],
|
|
18
22
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
height: 'B2'
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
background: state
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
23
|
+
props: ({ state }) => ({
|
|
24
|
+
minWidth: '190px',
|
|
25
|
+
round: 'Z2',
|
|
26
|
+
columns: 'repeat(3, 1fr)',
|
|
27
|
+
overflow: 'hidden',
|
|
28
|
+
opacity: '.35',
|
|
29
|
+
childProps: { height: 'B2' },
|
|
30
|
+
|
|
31
|
+
color1: { background: state[0] },
|
|
32
|
+
color2: { background: state[1] },
|
|
33
|
+
color3: { background: state[2] }
|
|
34
|
+
}),
|
|
35
|
+
|
|
36
|
+
color1: {},
|
|
37
|
+
color2: {},
|
|
38
|
+
color3: {},
|
|
39
|
+
|
|
40
|
+
on: {
|
|
41
|
+
click: (event, element, state) => {
|
|
42
|
+
state.parent.update(state.parse())
|
|
43
|
+
}
|
|
36
44
|
}
|
|
37
|
-
}
|
|
45
|
+
},
|
|
38
46
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
color2: '#013047',
|
|
62
|
-
color3: '#FFB703'
|
|
63
|
-
}]
|
|
47
|
+
$setStateCollection: () => [[
|
|
48
|
+
'#5F6C37',
|
|
49
|
+
'#F1E0BC',
|
|
50
|
+
'#FFFFFF'
|
|
51
|
+
], [
|
|
52
|
+
'#CCD5AE',
|
|
53
|
+
'#FEF9E1',
|
|
54
|
+
'#D3A374'
|
|
55
|
+
], [
|
|
56
|
+
'#CDB4DB',
|
|
57
|
+
'#FEAFCC',
|
|
58
|
+
'#A2D2FF'
|
|
59
|
+
], [
|
|
60
|
+
'#274553',
|
|
61
|
+
'#E9C46A',
|
|
62
|
+
'#E76F51'
|
|
63
|
+
], [
|
|
64
|
+
'#8EC9E6',
|
|
65
|
+
'#013047',
|
|
66
|
+
'#FFB703'
|
|
67
|
+
]]
|
|
68
|
+
}
|
|
64
69
|
}
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
'use strict'
|
|
2
|
-
|
|
2
|
+
|
|
3
|
+
import { Button, ClickableItem, Link } from '@symbo.ls/components'
|
|
4
|
+
|
|
3
5
|
export const ContinueButton = {
|
|
4
|
-
extend: Button,
|
|
6
|
+
extend: [ClickableItem, Button, Link],
|
|
5
7
|
props: {
|
|
6
8
|
text: 'Continue',
|
|
7
|
-
fontSize: '
|
|
8
|
-
padding: 'Z1
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
fontSize: 'A2',
|
|
10
|
+
padding: 'Z1 C2',
|
|
11
|
+
theme: 'secondary',
|
|
12
|
+
margin: 'auto - - -Z',
|
|
11
13
|
fontWeight: '500'
|
|
12
14
|
}
|
|
13
15
|
}
|
package/src/components/Header.js
CHANGED
|
@@ -1,21 +1,17 @@
|
|
|
1
1
|
'use strict'
|
|
2
2
|
|
|
3
|
-
import { HeaderOfMember } from '@symbo.ls/components'
|
|
4
|
-
|
|
5
3
|
export const Header = {
|
|
6
|
-
|
|
4
|
+
props: {
|
|
7
5
|
position: 'sticky',
|
|
8
6
|
width: '100%',
|
|
9
|
-
top: 0,
|
|
10
|
-
zIndex: 99999
|
|
11
|
-
},
|
|
12
|
-
|
|
13
|
-
define: { isFloating: param => param },
|
|
7
|
+
top: '0',
|
|
8
|
+
zIndex: 99999,
|
|
14
9
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
maxWidth: '100%'
|
|
10
|
+
content: {
|
|
11
|
+
maxWidth: '100%',
|
|
12
|
+
width: '100%'
|
|
19
13
|
}
|
|
20
14
|
}
|
|
15
|
+
|
|
16
|
+
// define: { isFloating: param => param }
|
|
21
17
|
}
|
|
@@ -1,13 +1,18 @@
|
|
|
1
1
|
'use strict'
|
|
2
2
|
|
|
3
|
-
const
|
|
4
|
-
|
|
3
|
+
export const HeaderHeading = {
|
|
4
|
+
tag: 'header',
|
|
5
|
+
|
|
6
|
+
props: { margin: '- - C2 -' },
|
|
7
|
+
|
|
8
|
+
Caption: {
|
|
5
9
|
text: `Let's get started`,
|
|
6
10
|
whiteSpace: 'nowrap',
|
|
7
11
|
margin: '0',
|
|
8
12
|
color: 'gray6'
|
|
9
13
|
},
|
|
10
|
-
|
|
14
|
+
|
|
15
|
+
H1: {
|
|
11
16
|
color: 'white',
|
|
12
17
|
text: 'First was the light',
|
|
13
18
|
fontSize: 'H2',
|
|
@@ -16,11 +21,3 @@ const props = {
|
|
|
16
21
|
height: 'fit-content'
|
|
17
22
|
}
|
|
18
23
|
}
|
|
19
|
-
|
|
20
|
-
export const HeaderHeading = {
|
|
21
|
-
tag: 'header',
|
|
22
|
-
props,
|
|
23
|
-
|
|
24
|
-
caption: {},
|
|
25
|
-
h1: {}
|
|
26
|
-
}
|
package/src/components/Page.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict'
|
|
2
2
|
|
|
3
|
-
import { PageTemplate } from '@symbo.ls/components'
|
|
3
|
+
import { PageTemplate, Flex } from '@symbo.ls/components'
|
|
4
4
|
|
|
5
5
|
import MASK1 from '../assets/mask1.png'
|
|
6
6
|
import MASK2 from '../assets/mask2.png' // eslint-disable-line
|
|
@@ -14,6 +14,20 @@ export const Page = {
|
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
+
export const InitPage = {
|
|
18
|
+
tag: 'main',
|
|
19
|
+
extend: Flex,
|
|
20
|
+
|
|
21
|
+
props: {
|
|
22
|
+
width: '100%',
|
|
23
|
+
maxWidth: 'J',
|
|
24
|
+
flow: 'column',
|
|
25
|
+
align: 'flex-start',
|
|
26
|
+
|
|
27
|
+
content: { width: '100%' }
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
17
31
|
export const DisabledPage = {
|
|
18
32
|
props: {
|
|
19
33
|
maxHeight: 'calc(100vh - 7em)',
|
|
@@ -3,14 +3,14 @@
|
|
|
3
3
|
import { Flex, CommonField, Upload, ClickableItem } from '@symbo.ls/components'
|
|
4
4
|
|
|
5
5
|
export const UploadImage = {
|
|
6
|
-
extend: [CommonField],
|
|
7
|
-
|
|
6
|
+
extend: [CommonField, Flex],
|
|
7
|
+
|
|
8
8
|
props: {
|
|
9
9
|
title: { text: 'Pick from the picture' },
|
|
10
10
|
element: {
|
|
11
11
|
border: 'none',
|
|
12
12
|
background: 'gray1',
|
|
13
|
-
padding: '
|
|
13
|
+
padding: 'Z2 A2 Z2 Z2',
|
|
14
14
|
gap: 'Z',
|
|
15
15
|
flow: 'row',
|
|
16
16
|
icon: { style: { fontSize: '52px' } },
|
package/src/index.js
CHANGED
|
@@ -28,9 +28,25 @@ const app = DOM.create({
|
|
|
28
28
|
extend: App,
|
|
29
29
|
style,
|
|
30
30
|
|
|
31
|
-
|
|
31
|
+
Header: {
|
|
32
|
+
props: {},
|
|
33
|
+
|
|
34
|
+
define: { routes: param => param },
|
|
35
|
+
routes: {
|
|
36
|
+
'/': smbls.HeaderInitial,
|
|
37
|
+
'/*': smbls.HeaderOfMember
|
|
38
|
+
},
|
|
39
|
+
|
|
40
|
+
on: {
|
|
41
|
+
render: element => {
|
|
42
|
+
const { pathname, hash } = window.location
|
|
43
|
+
const url = pathname + hash
|
|
44
|
+
router(element, url, {}, { updateState: false })
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
},
|
|
32
48
|
routes: {
|
|
33
|
-
// '/':
|
|
49
|
+
// '/': Library
|
|
34
50
|
}
|
|
35
51
|
}, undefined, 'app', {
|
|
36
52
|
extend: [smbls.Box],
|
package/src/pages/Color/index.js
CHANGED
|
@@ -1,16 +1,9 @@
|
|
|
1
1
|
'use strict'
|
|
2
2
|
|
|
3
|
-
import { Line } from '@symbo.ls/components'
|
|
4
|
-
|
|
5
3
|
import globalThemes from './globalThemes'
|
|
6
4
|
import palette from './palette'
|
|
7
5
|
import themes from './themes'
|
|
8
6
|
|
|
9
|
-
import { themeLightDark } from './themeLightDark'
|
|
10
|
-
import { CreatePallete } from './CreatePalette'
|
|
11
|
-
import { fontText } from './FontText'
|
|
12
|
-
import { chooseEnvironment } from './chooseEnvironment'
|
|
13
|
-
|
|
14
7
|
export const Color = {
|
|
15
8
|
key: 'colors',
|
|
16
9
|
|
|
@@ -19,14 +12,9 @@ export const Color = {
|
|
|
19
12
|
// style: { border: '4px solid red' }
|
|
20
13
|
},
|
|
21
14
|
|
|
22
|
-
// createPallete: CreatePallete,
|
|
23
|
-
// themeLightDark,
|
|
24
|
-
// fontText,
|
|
25
|
-
// chooseEnvironment,
|
|
26
|
-
|
|
27
15
|
globalThemes,
|
|
28
|
-
|
|
16
|
+
Line: {},
|
|
29
17
|
palette,
|
|
30
|
-
|
|
18
|
+
Line_2: {},
|
|
31
19
|
themes
|
|
32
20
|
}
|
|
@@ -66,7 +66,7 @@ export default ({ parent: { state: { __system } } }) => ({
|
|
|
66
66
|
paragraph: 'Label a role of subject with glyphs',
|
|
67
67
|
properties: [{
|
|
68
68
|
property: 'All',
|
|
69
|
-
value:
|
|
69
|
+
value: Object.keys(__system.ICONS).length
|
|
70
70
|
}, {
|
|
71
71
|
property: 'Linear',
|
|
72
72
|
value: Object.keys(__system.ICONS).filter(v => v.includes('Outline')).length
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
'use strict'
|
|
2
|
+
|
|
3
|
+
import { Flex, CommonField, WiderButton } from '@symbo.ls/components'
|
|
4
|
+
|
|
5
|
+
import { InitPage } from '../../components'
|
|
6
|
+
|
|
7
|
+
const header = {
|
|
8
|
+
props: {
|
|
9
|
+
margin: '- - D -',
|
|
10
|
+
Caption: { text: 'And finally' },
|
|
11
|
+
H1: {
|
|
12
|
+
text: 'Choose your environment',
|
|
13
|
+
flow: 'row-reverse',
|
|
14
|
+
align: 'center flex-end',
|
|
15
|
+
':after': {
|
|
16
|
+
content: '", if any"',
|
|
17
|
+
fontWeight: '200',
|
|
18
|
+
color: 'gray9'
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
|
|
23
|
+
Caption: {},
|
|
24
|
+
H1: {
|
|
25
|
+
span: {},
|
|
26
|
+
span2: {}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
const commonField = {
|
|
31
|
+
extend: CommonField,
|
|
32
|
+
props: {
|
|
33
|
+
gap: 'Z2',
|
|
34
|
+
element: {
|
|
35
|
+
gap: 'A',
|
|
36
|
+
maxWidth: 'I',
|
|
37
|
+
alignItems: 'center',
|
|
38
|
+
childProps: {
|
|
39
|
+
background: 'gray2',
|
|
40
|
+
color: 'white .8',
|
|
41
|
+
round: 'Z1',
|
|
42
|
+
fontSize: 'A2'
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
|
|
47
|
+
title: {},
|
|
48
|
+
element: {
|
|
49
|
+
extend: Flex,
|
|
50
|
+
childExtend: {
|
|
51
|
+
extend: WiderButton
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
const yourEnvironment = {
|
|
57
|
+
extend: commonField,
|
|
58
|
+
props: {
|
|
59
|
+
margin: '- - C2 -',
|
|
60
|
+
title: { text: 'Your environment' },
|
|
61
|
+
element: {
|
|
62
|
+
childProps: {}
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
|
|
66
|
+
title: {},
|
|
67
|
+
element: [
|
|
68
|
+
{ props: { icon: 'inputOutline' } },
|
|
69
|
+
{ props: { icon: 'accessibilityOutline' } },
|
|
70
|
+
{
|
|
71
|
+
props: {
|
|
72
|
+
boxSizing: 'content-box',
|
|
73
|
+
padding: 'Z B',
|
|
74
|
+
width: 'auto',
|
|
75
|
+
borderRadius: 'B',
|
|
76
|
+
text: `I'm just playing`,
|
|
77
|
+
aspectRatio: 'auto'
|
|
78
|
+
},
|
|
79
|
+
icon: null
|
|
80
|
+
}
|
|
81
|
+
]
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
const yourFramework = {
|
|
85
|
+
extend: commonField,
|
|
86
|
+
props: {
|
|
87
|
+
margin: '- - F -',
|
|
88
|
+
title: { text: 'Your framework' },
|
|
89
|
+
element: { childProps: { icon: 'info' } }
|
|
90
|
+
},
|
|
91
|
+
title: {},
|
|
92
|
+
element: { ...[{}, {}, {}, {}, {}, {}] }
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
export const ChooseEnvironment = {
|
|
96
|
+
extend: InitPage,
|
|
97
|
+
|
|
98
|
+
HeaderHeading: header,
|
|
99
|
+
|
|
100
|
+
yourEnvironment,
|
|
101
|
+
yourFramework,
|
|
102
|
+
|
|
103
|
+
ContinueButton: {
|
|
104
|
+
text: 'Create Symbols',
|
|
105
|
+
theme: 'primary',
|
|
106
|
+
href: '/design-system'
|
|
107
|
+
}
|
|
108
|
+
}
|
|
@@ -1,25 +1,20 @@
|
|
|
1
1
|
'use strict'
|
|
2
2
|
|
|
3
3
|
import { Flex, GlobalThemeTemplate, Hoverable } from '@symbo.ls/components'
|
|
4
|
-
|
|
5
|
-
import { ContinueButton, HeaderHeading } from '../../components'
|
|
6
|
-
|
|
7
|
-
const header = {
|
|
8
|
-
extend: HeaderHeading
|
|
9
|
-
}
|
|
4
|
+
import { InitPage } from '../../components'
|
|
10
5
|
|
|
11
6
|
const paragraphs = {
|
|
12
7
|
extend: Flex,
|
|
13
8
|
childExtend: { tag: 'p' },
|
|
14
|
-
...[
|
|
15
|
-
|
|
9
|
+
...['To personalize your Symbols experience, we need to get started with themes',
|
|
10
|
+
'Please fill in the document dark and light themes']
|
|
16
11
|
}
|
|
17
12
|
|
|
18
13
|
const modes = {
|
|
19
14
|
extend: Flex,
|
|
20
15
|
props: {
|
|
21
16
|
gap: 'C',
|
|
22
|
-
margin: '- - E2
|
|
17
|
+
margin: '- -Z E2'
|
|
23
18
|
},
|
|
24
19
|
childExtend: {
|
|
25
20
|
extend: [Hoverable, GlobalThemeTemplate],
|
|
@@ -27,7 +22,7 @@ const modes = {
|
|
|
27
22
|
minWidth: 'G3',
|
|
28
23
|
maxWidth: '406px',
|
|
29
24
|
position: 'relative',
|
|
30
|
-
maxHeight: '
|
|
25
|
+
maxHeight: 'E2',
|
|
31
26
|
boxSizing: 'content-box',
|
|
32
27
|
align: 'flex-start flex-start',
|
|
33
28
|
padding: 'A2 A X X1',
|
|
@@ -35,23 +30,23 @@ const modes = {
|
|
|
35
30
|
round: 'A1',
|
|
36
31
|
background: state.background,
|
|
37
32
|
wrap: 'wrap',
|
|
33
|
+
|
|
38
34
|
icon: {
|
|
39
|
-
padding: '0',
|
|
40
35
|
boxSize: 'C C',
|
|
41
36
|
margin: '- - - Z2',
|
|
42
37
|
background: 'yellow .3',
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
'> svg': { fontSize: `${22 / 16}em` }
|
|
46
|
-
}
|
|
38
|
+
pointerEvents: 'none',
|
|
39
|
+
fontSize: `B`
|
|
47
40
|
},
|
|
41
|
+
|
|
48
42
|
article: {
|
|
49
43
|
padding: 'X2 - - -',
|
|
50
|
-
title: { fontSize: 'D2' }
|
|
44
|
+
title: { fontSize: 'D2', fontWeight: 'bold' }
|
|
51
45
|
},
|
|
52
|
-
span: { text: 'hover to change' },
|
|
53
46
|
|
|
54
47
|
':hover': {
|
|
48
|
+
opacity: '1',
|
|
49
|
+
|
|
55
50
|
style: {
|
|
56
51
|
'[buttons]': {
|
|
57
52
|
opacity: '1',
|
|
@@ -69,53 +64,55 @@ const modes = {
|
|
|
69
64
|
transition: 'B default-bezier',
|
|
70
65
|
transitionProperty: 'transform, opacity',
|
|
71
66
|
opacity: '0',
|
|
72
|
-
margin: '
|
|
67
|
+
margin: 'B2 0 0 0',
|
|
73
68
|
alignSelf: 'flex-end'
|
|
74
69
|
},
|
|
75
70
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
}
|
|
71
|
+
Span: {
|
|
72
|
+
position: 'absolute',
|
|
73
|
+
bottom: 'A2',
|
|
74
|
+
left: 'B',
|
|
75
|
+
fontSize: 'Z',
|
|
76
|
+
color: 'gray7',
|
|
77
|
+
fontStyle: 'italic',
|
|
78
|
+
text: 'hover to change'
|
|
85
79
|
}
|
|
86
80
|
},
|
|
87
81
|
|
|
88
82
|
$setStateCollection: () => [{
|
|
83
|
+
title: 'Day',
|
|
84
|
+
key: 'light',
|
|
85
|
+
icon: 'sun',
|
|
86
|
+
background: 'white'
|
|
87
|
+
}, {
|
|
89
88
|
title: 'Night',
|
|
90
89
|
key: 'dark',
|
|
91
90
|
icon: 'moon',
|
|
92
91
|
background: 'gray3'
|
|
93
|
-
}, {
|
|
94
|
-
title: 'Dark',
|
|
95
|
-
key: 'light',
|
|
96
|
-
icon: 'sun',
|
|
97
|
-
background: 'white'
|
|
98
92
|
}]
|
|
99
93
|
}
|
|
100
94
|
|
|
101
|
-
const
|
|
102
|
-
|
|
103
|
-
paragraphs: {
|
|
104
|
-
gap: 'E',
|
|
105
|
-
margin: '- - D1 -',
|
|
106
|
-
childProps: {
|
|
107
|
-
fontSize: 'Z1',
|
|
108
|
-
color: 'gray6',
|
|
109
|
-
maxWidth: `${272 / 14}em`
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
}
|
|
95
|
+
export const CreateDocumentTheme = {
|
|
96
|
+
extend: InitPage,
|
|
113
97
|
|
|
114
|
-
|
|
115
|
-
|
|
98
|
+
props: {
|
|
99
|
+
flow: 'column',
|
|
100
|
+
align: 'flex-start',
|
|
101
|
+
paragraphs: {
|
|
102
|
+
gap: 'E',
|
|
103
|
+
margin: '- - D1 -',
|
|
104
|
+
childProps: {
|
|
105
|
+
color: 'gray6',
|
|
106
|
+
maxWidth: `G1`
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
},
|
|
116
110
|
|
|
117
|
-
|
|
111
|
+
HeaderHeading: {},
|
|
118
112
|
paragraphs,
|
|
119
113
|
modes,
|
|
120
|
-
|
|
114
|
+
|
|
115
|
+
ContinueButton: {
|
|
116
|
+
href: '/init/pallete'
|
|
117
|
+
}
|
|
121
118
|
}
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
'use strict'
|
|
2
2
|
|
|
3
|
-
import { Flex, ColorSelectWithTitle } from '@symbo.ls/components'
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
import { ContinueButton, UploadImage, ColorsPalette } from '../../components'
|
|
3
|
+
import { Flex, ColorSelectWithTitle, Input } from '@symbo.ls/components'
|
|
4
|
+
import { InitPage } from '../../components'
|
|
7
5
|
|
|
8
6
|
const colors = {
|
|
9
7
|
extend: Flex,
|
|
@@ -19,10 +17,10 @@ const colors = {
|
|
|
19
17
|
width: '100%',
|
|
20
18
|
title: { text: state.title },
|
|
21
19
|
element: {
|
|
22
|
-
padding: '
|
|
20
|
+
padding: 'Z',
|
|
23
21
|
title: {
|
|
24
22
|
box: {
|
|
25
|
-
boxSize: '
|
|
23
|
+
boxSize: 'B B',
|
|
26
24
|
position: 'relative',
|
|
27
25
|
zIndex: 2,
|
|
28
26
|
background: 'white .05',
|
|
@@ -38,7 +36,7 @@ const colors = {
|
|
|
38
36
|
round: 'Z',
|
|
39
37
|
position: 'absolute',
|
|
40
38
|
inset: '0 0 0 0',
|
|
41
|
-
padding: '- - - B2+
|
|
39
|
+
padding: '- - - B2+W1',
|
|
42
40
|
textAlign: 'start',
|
|
43
41
|
lineHeight: '100%',
|
|
44
42
|
placeholder: 'Color value',
|
|
@@ -57,7 +55,7 @@ const colors = {
|
|
|
57
55
|
tag: 'input',
|
|
58
56
|
attr: {
|
|
59
57
|
type: 'color',
|
|
60
|
-
value: ({ state }) =>
|
|
58
|
+
value: ({ state }) => state.value
|
|
61
59
|
},
|
|
62
60
|
props: {
|
|
63
61
|
border: '0',
|
|
@@ -91,12 +89,15 @@ const colors = {
|
|
|
91
89
|
}
|
|
92
90
|
},
|
|
93
91
|
|
|
94
|
-
$setStateCollection: () => [{
|
|
95
|
-
title: 'Accent color'
|
|
92
|
+
$setStateCollection: ({ state }) => [{
|
|
93
|
+
title: 'Accent color',
|
|
94
|
+
value: state[0]
|
|
96
95
|
}, {
|
|
97
|
-
title: 'Secondary Color'
|
|
96
|
+
title: 'Secondary Color',
|
|
97
|
+
value: state[1]
|
|
98
98
|
}, {
|
|
99
|
-
title: 'Inactive Color'
|
|
99
|
+
title: 'Inactive Color',
|
|
100
|
+
value: state[2]
|
|
100
101
|
}]
|
|
101
102
|
}
|
|
102
103
|
|
|
@@ -112,23 +113,25 @@ const content = {
|
|
|
112
113
|
},
|
|
113
114
|
|
|
114
115
|
colors,
|
|
115
|
-
UploadImage,
|
|
116
|
-
ColorsPalette
|
|
117
|
-
}
|
|
118
116
|
|
|
119
|
-
|
|
120
|
-
|
|
117
|
+
UploadImage: {},
|
|
118
|
+
ColorsPalette: {
|
|
119
|
+
margin: '- - auto'
|
|
120
|
+
}
|
|
121
121
|
}
|
|
122
122
|
|
|
123
123
|
export const CreatePallete = {
|
|
124
|
-
|
|
124
|
+
extend: InitPage,
|
|
125
125
|
|
|
126
126
|
HeaderHeading: {
|
|
127
127
|
margin: '- - D -',
|
|
128
|
-
|
|
129
|
-
|
|
128
|
+
Caption: { text: `Let's get started` },
|
|
129
|
+
H1: { text: 'Create your palette' }
|
|
130
130
|
},
|
|
131
131
|
|
|
132
132
|
content,
|
|
133
|
-
|
|
133
|
+
|
|
134
|
+
ContinueButton: {
|
|
135
|
+
href: '/init/font'
|
|
136
|
+
}
|
|
134
137
|
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
'use strict'
|
|
2
|
+
|
|
3
|
+
import { InitPage } from '../../components'
|
|
4
|
+
|
|
5
|
+
export const FontText = {
|
|
6
|
+
extend: InitPage,
|
|
7
|
+
|
|
8
|
+
HeaderHeading: {
|
|
9
|
+
props: { margin: '- - D2 -' },
|
|
10
|
+
Caption: { text: `Let's make sure` },
|
|
11
|
+
H1: { text: 'Texts look good?' }
|
|
12
|
+
},
|
|
13
|
+
|
|
14
|
+
FontText: {
|
|
15
|
+
margin: '- -Z'
|
|
16
|
+
},
|
|
17
|
+
|
|
18
|
+
ContinueButton: {
|
|
19
|
+
href: '/init/env'
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
'use strict'
|
|
2
|
+
|
|
3
|
+
import { Flex } from '@symbo.ls/components'
|
|
4
|
+
import { CreateDocumentTheme } from './CreateDocumentTheme'
|
|
5
|
+
import { CreatePallete } from './CreatePalette'
|
|
6
|
+
import { FontText } from './FontText'
|
|
7
|
+
import { ChooseEnvironment } from './ChooseEnvironment'
|
|
8
|
+
import { router } from '@domql/router'
|
|
9
|
+
|
|
10
|
+
export const Init = {
|
|
11
|
+
extend: Flex,
|
|
12
|
+
|
|
13
|
+
props: {
|
|
14
|
+
boxSize: '100% 100%',
|
|
15
|
+
gap: 'A',
|
|
16
|
+
padding: '7.5% E1 D1 12.5%'
|
|
17
|
+
},
|
|
18
|
+
|
|
19
|
+
define: { routes: param => param },
|
|
20
|
+
routes: {
|
|
21
|
+
'/': CreateDocumentTheme,
|
|
22
|
+
'/theme': CreateDocumentTheme,
|
|
23
|
+
'/pallete': CreatePallete,
|
|
24
|
+
'/font': FontText,
|
|
25
|
+
'/env': ChooseEnvironment
|
|
26
|
+
},
|
|
27
|
+
|
|
28
|
+
on: {
|
|
29
|
+
render: element => {
|
|
30
|
+
const { pathname, hash } = window.location
|
|
31
|
+
const url = pathname + hash
|
|
32
|
+
router(element, url, {}, { level: 1 })
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
package/src/pages/index.js
CHANGED
package/src/style.js
CHANGED
|
@@ -1,132 +0,0 @@
|
|
|
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
|
-
}
|