@symbo.ls/preview 2.7.20 → 2.7.23
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/.eslintrc.js +2 -8
- package/.vscode/settings.json +4 -1
- package/README.md +1 -0
- package/config.js +6 -0
- package/define.js +10 -0
- package/index.html +5 -5
- package/index.js +6 -9
- package/package.json +9 -28
- package/src/app.js +26 -40
- package/state.js +14 -0
- package/svgSprite.config.js +2 -2
- package/.babelrc.js +0 -5
- package/.coveralls.yml +0 -1
- package/.eslintignore +0 -1
- package/.legacy/_tools_old.js +0 -49
- package/.legacy/boxModel.js +0 -3
- package/.legacy/index copy.js +0 -45
- package/.legacy/preview.js +0 -133
- package/.legacy/sequence.js +0 -3
- package/.legacy/style.js +0 -30
- package/.prettierrc +0 -4
- package/.vscode/extensions.json +0 -5
- package/src/assets/dark.png +0 -0
- package/src/assets/fonts/FiraGO/FiraGO-Bold.woff2 +0 -0
- package/src/assets/fonts/FiraGO/FiraGO-Light.woff2 +0 -0
- package/src/assets/fonts/FiraGO/FiraGO-Medium.woff2 +0 -0
- package/src/assets/fonts/FiraGO/FiraGO-Regular.woff2 +0 -0
- package/src/assets/fonts/europa-bold-webfont.woff2 +0 -0
- package/src/assets/fonts/europa-bolditalic-webfont.woff2 +0 -0
- package/src/assets/fonts/europa-light-webfont.woff2 +0 -0
- package/src/assets/fonts/europa-lightitalic-webfont.woff2 +0 -0
- package/src/assets/fonts/europa-regular-webfont.woff2 +0 -0
- package/src/assets/fonts/europa-regularitalic-webfont.woff2 +0 -0
- package/src/assets/mask1.png +0 -0
- package/src/assets/mask2.png +0 -0
- package/src/assets/ovalCircle.svg +0 -9
- package/src/assets/shapes.png +0 -0
- package/src/assets/space.png +0 -0
- package/src/assets/type.png +0 -0
- package/src/components/Aside.js +0 -101
- package/src/components/Banner.js +0 -58
- package/src/components/ColorText.js +0 -29
- package/src/components/ColorsPalette.js +0 -69
- package/src/components/ColumnParagrphs.js +0 -22
- package/src/components/ContinueButton.js +0 -14
- package/src/components/DesignComponent.js +0 -81
- package/src/components/FontText.js +0 -193
- package/src/components/Header.js +0 -53
- package/src/components/HeaderHeading.js +0 -23
- package/src/components/IconsGroup.js +0 -64
- package/src/components/Page.js +0 -135
- package/src/components/ResponsivePreview.js +0 -44
- package/src/components/Route.js +0 -1
- package/src/components/ShapePreview.js +0 -63
- package/src/components/ShapeSet.js +0 -85
- package/src/components/SlidersWithResponsive.js +0 -23
- package/src/components/SpacingButton/actionButtons.js +0 -41
- package/src/components/SpacingButton/dropdown.js +0 -114
- package/src/components/SpacingButton/index.js +0 -248
- package/src/components/SpacingButton/props.js +0 -45
- package/src/components/SpacingPreview.js +0 -154
- package/src/components/SpacingTable.js +0 -210
- package/src/components/ThemeButtons.js +0 -41
- package/src/components/UploadImage.js +0 -31
- package/src/components/Widget.js +0 -1
- package/src/components/index.js +0 -25
- package/src/pages/Account/Personal.js +0 -59
- package/src/pages/Account/Project.js +0 -40
- package/src/pages/Account/fields.js +0 -74
- package/src/pages/Account/fieldsGridProps.js +0 -15
- package/src/pages/Account/index.js +0 -117
- package/src/pages/Color/globalThemes.js +0 -32
- package/src/pages/Color/index.js +0 -18
- package/src/pages/Color/palette.js +0 -37
- package/src/pages/Color/themes.js +0 -38
- package/src/pages/Components/grid.js +0 -99
- package/src/pages/Components/index.js +0 -37
- package/src/pages/Components/sidebar.js +0 -28
- package/src/pages/Components/style.js +0 -16
- package/src/pages/DesignSystem/Dashboard/banners.js +0 -38
- package/src/pages/DesignSystem/Dashboard/designElements.js +0 -124
- package/src/pages/DesignSystem/Dashboard/index.js +0 -22
- package/src/pages/DesignSystem/Dashboard/quickstart.js +0 -84
- package/src/pages/DesignSystem/Dashboard/state.js +0 -142
- package/src/pages/DesignSystem/Dashboard/summary.js +0 -52
- package/src/pages/DesignSystem/index.js +0 -187
- package/src/pages/Editor/index.js +0 -46
- package/src/pages/Editor/layers.js +0 -126
- package/src/pages/Editor/scene.js +0 -95
- package/src/pages/Editor/style.js +0 -13
- package/src/pages/Editor/tools.js +0 -360
- package/src/pages/Export/const.js +0 -19
- package/src/pages/Export/description.js +0 -88
- package/src/pages/Export/gist.js +0 -23
- package/src/pages/Export/index.js +0 -82
- package/src/pages/Export/scene.js +0 -59
- package/src/pages/Export/state.js +0 -23
- package/src/pages/Export/tools.js +0 -101
- package/src/pages/Fonts/fontFaces.js +0 -50
- package/src/pages/Fonts/fontFamilies.js +0 -47
- package/src/pages/Fonts/index.js +0 -15
- package/src/pages/Fonts/state.js +0 -5
- package/src/pages/Icons/index.js +0 -92
- package/src/pages/Icons/style.js +0 -1
- package/src/pages/Init/ChooseEnvironment.js +0 -146
- package/src/pages/Init/ChooseProject.js +0 -61
- package/src/pages/Init/CreateDocumentTheme.js +0 -173
- package/src/pages/Init/CreatePalette.js +0 -94
- package/src/pages/Init/FontText.js +0 -33
- package/src/pages/Init/Personalize/fields.js +0 -120
- package/src/pages/Init/Personalize/icon.js +0 -76
- package/src/pages/Init/Personalize/index.js +0 -120
- package/src/pages/Init/index.js +0 -39
- package/src/pages/Library/disabled.js +0 -38
- package/src/pages/Library/index.js +0 -33
- package/src/pages/MediaQuery/index.js +0 -46
- package/src/pages/MediaQuery/lists.js +0 -299
- package/src/pages/MediaQuery/state.js +0 -149
- package/src/pages/MediaQuery/typeScale.js +0 -69
- package/src/pages/Shapes/index.js +0 -75
- package/src/pages/Shapes/shapeSet.js +0 -133
- package/src/pages/Shapes/style.js +0 -11
- package/src/pages/Spaces/index.js +0 -32
- package/src/pages/Spaces/sequence.js +0 -32
- package/src/pages/Spaces/state.js +0 -20
- package/src/pages/State/index.js +0 -87
- package/src/pages/Theme/buttonTitlesGrid.js +0 -47
- package/src/pages/Theme/buttonsHeader.js +0 -33
- package/src/pages/Theme/friendTheme.js +0 -30
- package/src/pages/Theme/index.js +0 -273
- package/src/pages/Theme/interactivity.js +0 -115
- package/src/pages/Theme/ntc.js +0 -1689
- package/src/pages/Theme/preview.js +0 -153
- package/src/pages/Theme/selectsGrid.js +0 -73
- package/src/pages/Theme/style.js +0 -38
- package/src/pages/Theme/themingTools.js +0 -106
- package/src/pages/Typography/collection.js +0 -115
- package/src/pages/Typography/documentStyles.js +0 -113
- package/src/pages/Typography/index.js +0 -69
- package/src/pages/Typography/rangeButtons.js +0 -58
- package/src/pages/Typography/shared.js +0 -9
- package/src/pages/Typography/stylesHelpers.js +0 -30
- package/src/pages/Typography/typeScale.js +0 -86
- package/src/pages/__Account/__/index.js +0 -241
- package/src/pages/__Account/__/setUpProject.js +0 -142
- package/src/pages/__Account/index.js +0 -111
- package/src/pages/index.js +0 -17
- package/src/state.js +0 -20
- package/src/style.js +0 -20
|
@@ -1,173 +0,0 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
|
|
3
|
-
import { Clickable, Flex, GlobalThemeTemplate } from '@symbo.ls/components'
|
|
4
|
-
import { InitPage } from '../../components'
|
|
5
|
-
|
|
6
|
-
const paragraphs = {
|
|
7
|
-
extend: Flex,
|
|
8
|
-
childExtend: { tag: 'p' },
|
|
9
|
-
...['To personalize your Symbols experience, we need to get started with themes',
|
|
10
|
-
'Please fill in the document dark and light themes']
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
const modes = {
|
|
14
|
-
extend: Flex,
|
|
15
|
-
props: {
|
|
16
|
-
gap: 'C',
|
|
17
|
-
margin: '- -Z E2'
|
|
18
|
-
},
|
|
19
|
-
|
|
20
|
-
childExtend: {
|
|
21
|
-
extend: [Clickable, GlobalThemeTemplate],
|
|
22
|
-
|
|
23
|
-
props: ({ state }) => ({
|
|
24
|
-
minWidth: 'G3',
|
|
25
|
-
maxWidth: '406px',
|
|
26
|
-
position: 'relative',
|
|
27
|
-
maxHeight: 'E2',
|
|
28
|
-
boxSizing: 'content-box',
|
|
29
|
-
align: 'flex-start flex-start',
|
|
30
|
-
padding: 'A A Z',
|
|
31
|
-
overflow: 'hidden',
|
|
32
|
-
round: 'A1',
|
|
33
|
-
color: state.color,
|
|
34
|
-
background: state.background,
|
|
35
|
-
wrap: 'wrap',
|
|
36
|
-
transitionProperty: 'transform, opacity, border-radius',
|
|
37
|
-
|
|
38
|
-
icon: {
|
|
39
|
-
boxSize: 'C C',
|
|
40
|
-
color: 'yellow 1 +5',
|
|
41
|
-
background: 'yellow .2',
|
|
42
|
-
pointerEvents: 'none',
|
|
43
|
-
fontSize: `B`
|
|
44
|
-
},
|
|
45
|
-
|
|
46
|
-
article: {
|
|
47
|
-
padding: 'X2 - - -',
|
|
48
|
-
title: { fontSize: 'D2', fontWeight: 'bold' }
|
|
49
|
-
},
|
|
50
|
-
|
|
51
|
-
'.active': {
|
|
52
|
-
opacity: '1',
|
|
53
|
-
round: 'A1 A1 Y2 Y2',
|
|
54
|
-
|
|
55
|
-
style: {
|
|
56
|
-
'[buttons]': {
|
|
57
|
-
opacity: '1',
|
|
58
|
-
transform: 'translate3d(0, 0, 0)'
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
}),
|
|
63
|
-
|
|
64
|
-
icon: {},
|
|
65
|
-
article: {},
|
|
66
|
-
|
|
67
|
-
ThemeButtons: {
|
|
68
|
-
position: 'absolute',
|
|
69
|
-
left: 'W',
|
|
70
|
-
right: 'W',
|
|
71
|
-
bottom: 'W',
|
|
72
|
-
opacity: '0',
|
|
73
|
-
transition: 'B defaultBezier',
|
|
74
|
-
transitionProperty: 'transform, opacity',
|
|
75
|
-
transform: 'translate3d(0, 100%, 0)',
|
|
76
|
-
columnGap: 'W'
|
|
77
|
-
},
|
|
78
|
-
|
|
79
|
-
Span: {
|
|
80
|
-
width: '100%',
|
|
81
|
-
fontSize: 'Z',
|
|
82
|
-
color: 'gray7',
|
|
83
|
-
fontStyle: 'italic',
|
|
84
|
-
margin: 'C 0 0 X2',
|
|
85
|
-
text: 'click to change'
|
|
86
|
-
},
|
|
87
|
-
|
|
88
|
-
on: {
|
|
89
|
-
click: (ev, el, s) => {
|
|
90
|
-
if (ev.target === el.node) {
|
|
91
|
-
el.setProps({ active: !el.props.active })
|
|
92
|
-
}
|
|
93
|
-
},
|
|
94
|
-
stateUpdated: (el, s, changes) => {
|
|
95
|
-
const { color, background } = s
|
|
96
|
-
s.projectSystemUpdate({
|
|
97
|
-
THEME: {
|
|
98
|
-
document: {
|
|
99
|
-
['@' + s.key]: { color, background }
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
}, { preventUpdate: true })
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
},
|
|
106
|
-
|
|
107
|
-
$setStateCollection: ({ state }) => state.values
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
export const CreateDocumentTheme = {
|
|
111
|
-
extend: InitPage,
|
|
112
|
-
|
|
113
|
-
props: {
|
|
114
|
-
flow: 'column',
|
|
115
|
-
align: 'flex-start',
|
|
116
|
-
|
|
117
|
-
paragraphs: {
|
|
118
|
-
gap: 'E',
|
|
119
|
-
margin: '- - D1 -',
|
|
120
|
-
childProps: {
|
|
121
|
-
color: 'gray6',
|
|
122
|
-
maxWidth: `G1`
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
},
|
|
126
|
-
|
|
127
|
-
back: { props: { href: '/init/personalize' } },
|
|
128
|
-
|
|
129
|
-
HeaderHeading: {},
|
|
130
|
-
paragraphs,
|
|
131
|
-
modes,
|
|
132
|
-
|
|
133
|
-
ContinueButton: {
|
|
134
|
-
href: '/init/pallete'
|
|
135
|
-
},
|
|
136
|
-
|
|
137
|
-
on: {
|
|
138
|
-
init: ({ state }) => {
|
|
139
|
-
const { THEME, COLOR } = state.__projectSystem
|
|
140
|
-
console.log(state.__projectSystem)
|
|
141
|
-
if (!THEME || !THEME.document) return
|
|
142
|
-
const { document } = THEME
|
|
143
|
-
const dark = document['@dark']
|
|
144
|
-
const light = document['@light']
|
|
145
|
-
|
|
146
|
-
const colorRef = {}
|
|
147
|
-
|
|
148
|
-
if (dark) {
|
|
149
|
-
colorRef.dark = {
|
|
150
|
-
key: 'dark',
|
|
151
|
-
title: 'Night',
|
|
152
|
-
icon: 'moon',
|
|
153
|
-
color: COLOR[dark.color] || dark.color || '#FFFFFF',
|
|
154
|
-
background: COLOR[dark.background] || dark.background || '#000000'
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
if (light) {
|
|
159
|
-
colorRef.light = {
|
|
160
|
-
key: 'light',
|
|
161
|
-
title: 'Day',
|
|
162
|
-
icon: 'sun',
|
|
163
|
-
color: COLOR[light.color] || light.color || '#000000',
|
|
164
|
-
background: COLOR[light.background] || light.background || '#FFFFFF'
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
state.update({
|
|
169
|
-
values: colorRef
|
|
170
|
-
}, { preventUpdate: true, ignoreInitUpdate: true })
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
}
|
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
|
|
3
|
-
import { observe, upload } from '@symbo.ls/based'
|
|
4
|
-
import { Flex, ColorPickerWithTitle } from '@symbo.ls/components'
|
|
5
|
-
import { InitPage } from '../../components'
|
|
6
|
-
|
|
7
|
-
const colors = {
|
|
8
|
-
extend: Flex,
|
|
9
|
-
props: {
|
|
10
|
-
width: 'F3',
|
|
11
|
-
flow: 'column',
|
|
12
|
-
gap: 'B1',
|
|
13
|
-
opacity: '.75'
|
|
14
|
-
},
|
|
15
|
-
|
|
16
|
-
childExtend: {
|
|
17
|
-
extend: ColorPickerWithTitle,
|
|
18
|
-
props: ({ state }) => ({
|
|
19
|
-
title: { text: state.title }
|
|
20
|
-
})
|
|
21
|
-
},
|
|
22
|
-
|
|
23
|
-
$setStateCollection: ({ state }) => [{
|
|
24
|
-
title: 'Accent color',
|
|
25
|
-
value: state[0]
|
|
26
|
-
}, {
|
|
27
|
-
title: 'Secondary Color',
|
|
28
|
-
value: state[1]
|
|
29
|
-
}, {
|
|
30
|
-
title: 'Inactive Color',
|
|
31
|
-
value: state[2]
|
|
32
|
-
}]
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
const content = {
|
|
36
|
-
extend: Flex,
|
|
37
|
-
props: {
|
|
38
|
-
margin: '- - F -',
|
|
39
|
-
align: 'flex-start',
|
|
40
|
-
gap: 'E2',
|
|
41
|
-
ColorsPalette: {
|
|
42
|
-
margin: '- - - auto'
|
|
43
|
-
}
|
|
44
|
-
},
|
|
45
|
-
|
|
46
|
-
colors,
|
|
47
|
-
|
|
48
|
-
ImageColorPicker: {
|
|
49
|
-
props: {},
|
|
50
|
-
title: {},
|
|
51
|
-
element: {
|
|
52
|
-
upload: {
|
|
53
|
-
input: {
|
|
54
|
-
on: {
|
|
55
|
-
change: (ev, el, s) => {
|
|
56
|
-
upload(ev.target.files[0], d => {
|
|
57
|
-
observe({
|
|
58
|
-
$id: d.id,
|
|
59
|
-
$all: true
|
|
60
|
-
}, pic => {
|
|
61
|
-
if (pic.progress) s.update({ imageUrl: pic.src })
|
|
62
|
-
})
|
|
63
|
-
})
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
},
|
|
70
|
-
ColorsPalette: {
|
|
71
|
-
props: ({ state }) => ({
|
|
72
|
-
hide: state.imageUrl,
|
|
73
|
-
margin: '- - auto'
|
|
74
|
-
})
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
export const CreatePallete = {
|
|
79
|
-
extend: InitPage,
|
|
80
|
-
|
|
81
|
-
back: { props: { href: '/init/theme' } },
|
|
82
|
-
|
|
83
|
-
HeaderHeading: {
|
|
84
|
-
margin: '- - D -',
|
|
85
|
-
Caption: { text: `Let's get started` },
|
|
86
|
-
H1: { text: 'Create your palette' }
|
|
87
|
-
},
|
|
88
|
-
|
|
89
|
-
content,
|
|
90
|
-
|
|
91
|
-
ContinueButton: {
|
|
92
|
-
href: '/init/font'
|
|
93
|
-
}
|
|
94
|
-
}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
|
|
3
|
-
import { InitPage } from '../../components'
|
|
4
|
-
|
|
5
|
-
import tools from '../Export/tools'
|
|
6
|
-
|
|
7
|
-
export const FontText = {
|
|
8
|
-
extend: InitPage,
|
|
9
|
-
|
|
10
|
-
back: { props: { href: '/init/pallete' } },
|
|
11
|
-
|
|
12
|
-
state: {
|
|
13
|
-
base: 16,
|
|
14
|
-
ratio: 1.618
|
|
15
|
-
},
|
|
16
|
-
|
|
17
|
-
HeaderHeading: {
|
|
18
|
-
props: { margin: '- - D2 -' },
|
|
19
|
-
Caption: { text: `Let's customize` },
|
|
20
|
-
H1: { text: 'Typography' }
|
|
21
|
-
},
|
|
22
|
-
|
|
23
|
-
FontText: {
|
|
24
|
-
margin: '- -Z A'
|
|
25
|
-
},
|
|
26
|
-
tools: {
|
|
27
|
-
extend: tools.tools
|
|
28
|
-
},
|
|
29
|
-
|
|
30
|
-
ContinueButton: {
|
|
31
|
-
href: '/init/env'
|
|
32
|
-
}
|
|
33
|
-
}
|
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
|
|
3
|
-
import { CommonField, Input, Grid, SelectField } from '@symbo.ls/components'
|
|
4
|
-
|
|
5
|
-
export default {
|
|
6
|
-
extend: Grid,
|
|
7
|
-
props: {
|
|
8
|
-
columns: 'repeat(2, 270px)',
|
|
9
|
-
columnGap: 'C',
|
|
10
|
-
rowGap: 'C2'
|
|
11
|
-
},
|
|
12
|
-
|
|
13
|
-
childExtend: {
|
|
14
|
-
extend: CommonField,
|
|
15
|
-
props: {
|
|
16
|
-
position: 'relative',
|
|
17
|
-
align: 'stretch flex-start',
|
|
18
|
-
element: {
|
|
19
|
-
margin: '- -Z',
|
|
20
|
-
width: 'auto',
|
|
21
|
-
padding: 'Z1 A2'
|
|
22
|
-
}
|
|
23
|
-
},
|
|
24
|
-
title: {},
|
|
25
|
-
element: {
|
|
26
|
-
on: {
|
|
27
|
-
change: (ev, el, s) => {
|
|
28
|
-
s.update({ [el.parent.key]: ev.target.value })
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
},
|
|
33
|
-
|
|
34
|
-
projectName: {
|
|
35
|
-
title: { text: 'Name the project' },
|
|
36
|
-
element: {
|
|
37
|
-
extend: Input,
|
|
38
|
-
props: ({ state }) => ({
|
|
39
|
-
placeholder: 'You name it',
|
|
40
|
-
value: state.projectName,
|
|
41
|
-
required: true
|
|
42
|
-
})
|
|
43
|
-
}
|
|
44
|
-
},
|
|
45
|
-
|
|
46
|
-
appKey: {
|
|
47
|
-
title: { text: 'Key' },
|
|
48
|
-
element: {
|
|
49
|
-
extend: Input,
|
|
50
|
-
props: ({ state }) => ({
|
|
51
|
-
placeholder: 'a-zA-Z0-9',
|
|
52
|
-
value: state.appKey && state.appKey.split('.')[0],
|
|
53
|
-
required: true
|
|
54
|
-
}),
|
|
55
|
-
on: {
|
|
56
|
-
change: (ev, el, s) => {
|
|
57
|
-
s.update({ [el.parent.key]: ev.target.value + '.symbo.ls' })
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
},
|
|
61
|
-
Span: {
|
|
62
|
-
position: 'absolute',
|
|
63
|
-
opacity: '.65',
|
|
64
|
-
text: '.symbo.ls',
|
|
65
|
-
right: 'Z2',
|
|
66
|
-
bottom: 'Z',
|
|
67
|
-
pointerEvents: 'none'
|
|
68
|
-
}
|
|
69
|
-
},
|
|
70
|
-
|
|
71
|
-
urlVisibility: {
|
|
72
|
-
title: { text: 'URL Access' },
|
|
73
|
-
element: {
|
|
74
|
-
extend: [SelectField],
|
|
75
|
-
props: {
|
|
76
|
-
style: { padding: '0' },
|
|
77
|
-
round: 'C1'
|
|
78
|
-
},
|
|
79
|
-
title: null,
|
|
80
|
-
buttons: {
|
|
81
|
-
props: {
|
|
82
|
-
position: 'absolute',
|
|
83
|
-
right: 'Z',
|
|
84
|
-
pointerEvents: 'none'
|
|
85
|
-
}
|
|
86
|
-
},
|
|
87
|
-
|
|
88
|
-
Select: {
|
|
89
|
-
props: {
|
|
90
|
-
outline: 'none',
|
|
91
|
-
border: 'none',
|
|
92
|
-
background: 'transparent',
|
|
93
|
-
color: 'currentColor',
|
|
94
|
-
padding: 'Z1 A2',
|
|
95
|
-
round: 'C1',
|
|
96
|
-
width: '100%',
|
|
97
|
-
|
|
98
|
-
style: {
|
|
99
|
-
cursor: 'default',
|
|
100
|
-
appearance: 'none'
|
|
101
|
-
},
|
|
102
|
-
|
|
103
|
-
name: 'user',
|
|
104
|
-
id: 'user'
|
|
105
|
-
},
|
|
106
|
-
|
|
107
|
-
childExtend: { tag: 'option', text: ({ state }) => state.text },
|
|
108
|
-
$setCollection: () => [
|
|
109
|
-
{ text: 'Private' },
|
|
110
|
-
{ text: 'Public' }
|
|
111
|
-
],
|
|
112
|
-
on: {
|
|
113
|
-
change: (ev, { parent }) => {
|
|
114
|
-
// parent.user.update({ key: ev.target.value })
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
}
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
|
|
3
|
-
import { observe, set, upload } from '@symbo.ls/based'
|
|
4
|
-
import { User } from '@symbo.ls/components'
|
|
5
|
-
import { UploadImage } from '../../../components'
|
|
6
|
-
|
|
7
|
-
export default {
|
|
8
|
-
extend: UploadImage,
|
|
9
|
-
props: ({ state }) => ({
|
|
10
|
-
position: 'relative',
|
|
11
|
-
|
|
12
|
-
title: { text: 'Project icon' },
|
|
13
|
-
|
|
14
|
-
element: {
|
|
15
|
-
flow: 'column',
|
|
16
|
-
position: 'relative',
|
|
17
|
-
width: 'fit-content',
|
|
18
|
-
padding: 'A',
|
|
19
|
-
gap: '0',
|
|
20
|
-
opacity: !!state.icon,
|
|
21
|
-
|
|
22
|
-
p: {
|
|
23
|
-
text: 'Drag and drop or click',
|
|
24
|
-
maxWidth: 'E',
|
|
25
|
-
textAlign: 'center'
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
}),
|
|
29
|
-
|
|
30
|
-
title: {},
|
|
31
|
-
element: {
|
|
32
|
-
input: {
|
|
33
|
-
on: {
|
|
34
|
-
change: (ev, el, s) => {
|
|
35
|
-
s.update({ icon: { pending: true } })
|
|
36
|
-
|
|
37
|
-
try {
|
|
38
|
-
upload(ev.target.files[0], d => {
|
|
39
|
-
observe({
|
|
40
|
-
$id: d.id,
|
|
41
|
-
$all: true
|
|
42
|
-
}, icon => {
|
|
43
|
-
if (icon.progress) {
|
|
44
|
-
delete s.icon.pending
|
|
45
|
-
set({
|
|
46
|
-
$id: s.projectId,
|
|
47
|
-
type: 'project',
|
|
48
|
-
icon
|
|
49
|
-
})
|
|
50
|
-
s.update({ icon })
|
|
51
|
-
}
|
|
52
|
-
})
|
|
53
|
-
})
|
|
54
|
-
} catch (e) {
|
|
55
|
-
console.log(e)
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
},
|
|
61
|
-
|
|
62
|
-
User: {
|
|
63
|
-
extend: User,
|
|
64
|
-
props: ({ state }) => ({
|
|
65
|
-
position: 'absolute',
|
|
66
|
-
fontSize: 'H',
|
|
67
|
-
bottom: 'Y',
|
|
68
|
-
left: 'Y1',
|
|
69
|
-
src: state.icon && state.icon.src,
|
|
70
|
-
key: state.projectName,
|
|
71
|
-
transition: 'C defaultBezier opacity',
|
|
72
|
-
opacity: (state.icon && state.icon.src) ? '1' : '0',
|
|
73
|
-
pointerEvents: 'none'
|
|
74
|
-
})
|
|
75
|
-
}
|
|
76
|
-
}
|
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
|
|
3
|
-
import { InitPage } from '../../../components'
|
|
4
|
-
|
|
5
|
-
import { Flex, Form } from '@symbo.ls/components'
|
|
6
|
-
import { router } from '@domql/router'
|
|
7
|
-
import { isArray } from '@domql/utils'
|
|
8
|
-
|
|
9
|
-
import icon from './icon'
|
|
10
|
-
import fields from './fields'
|
|
11
|
-
import { set } from '@symbo.ls/based'
|
|
12
|
-
|
|
13
|
-
export const Personalize = {
|
|
14
|
-
extend: InitPage,
|
|
15
|
-
props: {
|
|
16
|
-
height: '100%'
|
|
17
|
-
},
|
|
18
|
-
|
|
19
|
-
back: { props: { href: '/init/' } },
|
|
20
|
-
|
|
21
|
-
HeaderHeading: {
|
|
22
|
-
props: { margin: '- - D1 -' },
|
|
23
|
-
Caption: { text: `Let's personalize your Symbols` },
|
|
24
|
-
H1: { text: ({ state }) => `Hi ${(state.userName && state.userName.split(' ')[0]) || ''}` }
|
|
25
|
-
},
|
|
26
|
-
|
|
27
|
-
ColumnParagraphs: {
|
|
28
|
-
extend: true,
|
|
29
|
-
...[
|
|
30
|
-
{ props: { text: `In this example we'll initialize a Symbols Design System for you.` } },
|
|
31
|
-
{ props: { text: `You can connect Symbols to your app and style it online.` } }
|
|
32
|
-
]
|
|
33
|
-
},
|
|
34
|
-
|
|
35
|
-
Form: {
|
|
36
|
-
extend: [Form, Flex],
|
|
37
|
-
props: {
|
|
38
|
-
flex: 1,
|
|
39
|
-
flow: 'column',
|
|
40
|
-
align: 'flex-start space-between'
|
|
41
|
-
},
|
|
42
|
-
|
|
43
|
-
Flex: {
|
|
44
|
-
props: { gap: 'D1' },
|
|
45
|
-
|
|
46
|
-
icon,
|
|
47
|
-
fields
|
|
48
|
-
},
|
|
49
|
-
|
|
50
|
-
ContinueButton: {
|
|
51
|
-
href: null,
|
|
52
|
-
type: 'submit'
|
|
53
|
-
},
|
|
54
|
-
|
|
55
|
-
on: {
|
|
56
|
-
submit: (ev, el, s) => {
|
|
57
|
-
ev.preventDefault()
|
|
58
|
-
console.log(1, s.parse())
|
|
59
|
-
router(el.__root, '/init/theme', {})
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
export const CreateProject = {
|
|
66
|
-
extend: Personalize,
|
|
67
|
-
|
|
68
|
-
back: null,
|
|
69
|
-
|
|
70
|
-
HeaderHeading: {
|
|
71
|
-
props: { margin: '- - D1 -' },
|
|
72
|
-
Caption: { text: ({ state }) => `Hi ${state.userName}, let's start` },
|
|
73
|
-
H1: { text: `Creating a Project` }
|
|
74
|
-
},
|
|
75
|
-
|
|
76
|
-
ColumnParagraphs: {
|
|
77
|
-
extend: true,
|
|
78
|
-
...[
|
|
79
|
-
{ props: { text: `In this example we'll initialize a Symbols Design System for you.` } },
|
|
80
|
-
{ props: { text: `You can connect Symbols to your app and style it online.` } }
|
|
81
|
-
]
|
|
82
|
-
},
|
|
83
|
-
|
|
84
|
-
Form: {
|
|
85
|
-
state: {},
|
|
86
|
-
Flex: {},
|
|
87
|
-
|
|
88
|
-
ContinueButton: {
|
|
89
|
-
href: null,
|
|
90
|
-
type: 'submit'
|
|
91
|
-
},
|
|
92
|
-
|
|
93
|
-
on: {
|
|
94
|
-
submit: (ev, el, s) => {
|
|
95
|
-
ev.preventDefault()
|
|
96
|
-
console.log(2, s.parse())
|
|
97
|
-
const parentState = s.parent
|
|
98
|
-
const { projects, userId, username } = parentState
|
|
99
|
-
const setProject = {
|
|
100
|
-
type: 'project',
|
|
101
|
-
key: s.appKey,
|
|
102
|
-
name: s.projectName,
|
|
103
|
-
icon: s.icon,
|
|
104
|
-
visibility: s.visibility || 'private',
|
|
105
|
-
users: userId
|
|
106
|
-
}
|
|
107
|
-
console.log(setProject)
|
|
108
|
-
set(setProject, async d => {
|
|
109
|
-
await el.context.fetchProject(el, s.parent, {
|
|
110
|
-
username,
|
|
111
|
-
projectId: d.id,
|
|
112
|
-
activeProject: isArray(projects) ? projects.length : 0
|
|
113
|
-
})
|
|
114
|
-
router(el.__root, '/init/theme', {})
|
|
115
|
-
})
|
|
116
|
-
// router(el.__root, '/init/theme', {})
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
}
|
package/src/pages/Init/index.js
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
|
|
3
|
-
import { Flex } from '@symbo.ls/components'
|
|
4
|
-
import { CreateProject, Personalize } from './Personalize'
|
|
5
|
-
import { ChooseProject } from './ChooseProject'
|
|
6
|
-
import { CreateDocumentTheme } from './CreateDocumentTheme'
|
|
7
|
-
import { CreatePallete } from './CreatePalette'
|
|
8
|
-
import { FontText } from './FontText'
|
|
9
|
-
import { ChooseEnvironment } from './ChooseEnvironment'
|
|
10
|
-
import { router } from '@domql/router'
|
|
11
|
-
|
|
12
|
-
export const Init = {
|
|
13
|
-
extend: Flex,
|
|
14
|
-
|
|
15
|
-
props: {
|
|
16
|
-
boxSize: '100% 100%',
|
|
17
|
-
gap: 'A',
|
|
18
|
-
padding: '8.5% E1 E1 12.5%'
|
|
19
|
-
},
|
|
20
|
-
|
|
21
|
-
define: { routes: param => param },
|
|
22
|
-
routes: {
|
|
23
|
-
'/*': ChooseProject,
|
|
24
|
-
'/create': CreateProject,
|
|
25
|
-
'/personalize': Personalize,
|
|
26
|
-
'/theme': CreateDocumentTheme,
|
|
27
|
-
'/pallete': CreatePallete,
|
|
28
|
-
'/font': FontText,
|
|
29
|
-
'/env': ChooseEnvironment
|
|
30
|
-
},
|
|
31
|
-
|
|
32
|
-
on: {
|
|
33
|
-
render: element => {
|
|
34
|
-
const { pathname, hash } = window.location
|
|
35
|
-
const url = pathname + hash
|
|
36
|
-
router(element, url, {}, { level: 1 })
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
|
|
3
|
-
import { ComponentTemplate } from '@symbo.ls/components'
|
|
4
|
-
import { Page, DisabledPage } from '../../components'
|
|
5
|
-
|
|
6
|
-
import { COMPONENTS } from '../../../.symbols' // eslint-disable-line
|
|
7
|
-
|
|
8
|
-
export const Library = {
|
|
9
|
-
extend: [Page, DisabledPage],
|
|
10
|
-
|
|
11
|
-
SectionHeader: {
|
|
12
|
-
title: 'My Symbols',
|
|
13
|
-
p: 'This is the first collection of your components'
|
|
14
|
-
},
|
|
15
|
-
|
|
16
|
-
Grid: {
|
|
17
|
-
props: {
|
|
18
|
-
flex: 1,
|
|
19
|
-
templateColumns: 'repeat(12, 1fr)',
|
|
20
|
-
autoFlow: 'dense',
|
|
21
|
-
autoColumns: 'auto',
|
|
22
|
-
autoRows: 'auto',
|
|
23
|
-
justifyItems: 'stretch',
|
|
24
|
-
|
|
25
|
-
margin: '- -Z2 B1',
|
|
26
|
-
gap: 'A'
|
|
27
|
-
},
|
|
28
|
-
|
|
29
|
-
childExtend: ComponentTemplate,
|
|
30
|
-
$setStateCollection: () => {
|
|
31
|
-
return new Array(15).fill(void 0).map(v => ({
|
|
32
|
-
settings: {
|
|
33
|
-
gridOptions: { colspan: 3, rowspan: 1 }
|
|
34
|
-
}
|
|
35
|
-
}))
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
}
|