@symbo.ls/preview 2.7.21 → 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 -250
- package/src/components/SpacingButton/props.js +0 -45
- package/src/components/SpacingPreview.js +0 -156
- package/src/components/SpacingTable.js +0 -213
- 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 -36
- package/src/pages/Color/themes.js +0 -37
- 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 -48
- package/src/pages/Fonts/index.js +0 -16
- 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 -149
- package/src/pages/Init/ChooseProject.js +0 -61
- package/src/pages/Init/CreateDocumentTheme.js +0 -176
- 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 -65
- package/src/pages/Spaces/sequence.js +0 -34
- package/src/pages/Spaces/templates.js +0 -37
- 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 -226
- package/src/pages/Theme/interactivity.js +0 -115
- package/src/pages/Theme/ntc.js +0 -1689
- package/src/pages/Theme/preview.js +0 -152
- package/src/pages/Theme/selectsGrid.js +0 -74
- 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 -71
- 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 -83
- 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,82 +0,0 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
|
|
3
|
-
import { router, lastLevel } from '@domql/router' // eslint-disable-line no-unused-vars
|
|
4
|
-
|
|
5
|
-
import { Flex } from '@symbo.ls/components'
|
|
6
|
-
import { Page } from '../../components'
|
|
7
|
-
|
|
8
|
-
import state from './state'
|
|
9
|
-
import scene from './scene'
|
|
10
|
-
import tools from './tools'
|
|
11
|
-
import description from './description' // eslint-disable-line no-unused-vars
|
|
12
|
-
|
|
13
|
-
import { fetchGist } from './gist'
|
|
14
|
-
|
|
15
|
-
import { COMPONENT_ROUTES } from './const'
|
|
16
|
-
|
|
17
|
-
const componentState = (context) => { // eslint-disable-line no-unused-vars
|
|
18
|
-
const arr = [...context.LIBRARY, ...context.COMPONENTS]
|
|
19
|
-
return arr.filter(v => {
|
|
20
|
-
const key = window.location.pathname.split('component/')[1]
|
|
21
|
-
return v.key === key
|
|
22
|
-
})
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
export const Export = {
|
|
26
|
-
key: 'export',
|
|
27
|
-
extend: Flex,
|
|
28
|
-
|
|
29
|
-
props: {
|
|
30
|
-
width: '100%',
|
|
31
|
-
flow: 'column',
|
|
32
|
-
padding: '0 Y2'
|
|
33
|
-
},
|
|
34
|
-
|
|
35
|
-
state,
|
|
36
|
-
|
|
37
|
-
on: {
|
|
38
|
-
stateCreated: (element, state) => {
|
|
39
|
-
const route = window.location.pathname
|
|
40
|
-
const routes = route.slice(1).split('/')
|
|
41
|
-
const componentKey = routes[1]
|
|
42
|
-
const COMPONENTS = state.__components
|
|
43
|
-
|
|
44
|
-
const libComponent = COMPONENT_ROUTES[`/${componentKey}`]
|
|
45
|
-
const liveComponent = COMPONENTS[componentKey]
|
|
46
|
-
|
|
47
|
-
const content = libComponent || liveComponent
|
|
48
|
-
|
|
49
|
-
if (content) {
|
|
50
|
-
state.update({
|
|
51
|
-
live: !!liveComponent,
|
|
52
|
-
...content
|
|
53
|
-
}, { preventUpdate: true })
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
if (componentKey.length === 32) { // this might be Gist
|
|
57
|
-
fetchGist(componentKey, state)
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
// if (!content) return router(el.__root, '/components')
|
|
61
|
-
}
|
|
62
|
-
},
|
|
63
|
-
|
|
64
|
-
main: {
|
|
65
|
-
style: { maxWidth: 'none' },
|
|
66
|
-
scene
|
|
67
|
-
},
|
|
68
|
-
|
|
69
|
-
cnt: {
|
|
70
|
-
extend: [Page],
|
|
71
|
-
|
|
72
|
-
props: {
|
|
73
|
-
padding: 'Z2 C1 A',
|
|
74
|
-
flex: '1'
|
|
75
|
-
},
|
|
76
|
-
|
|
77
|
-
tools,
|
|
78
|
-
description
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
// footer: { extend: Footer }
|
|
82
|
-
}
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
|
|
3
|
-
import { getActiveConfig } from '@symbo.ls/scratch'
|
|
4
|
-
import { Scene } from '@symbo.ls/components'
|
|
5
|
-
|
|
6
|
-
export default {
|
|
7
|
-
extend: Scene,
|
|
8
|
-
|
|
9
|
-
props: (el, s) => {
|
|
10
|
-
const CONFIG = getActiveConfig()
|
|
11
|
-
const { BREAKPOINTS } = CONFIG
|
|
12
|
-
const previewSize = BREAKPOINTS[s.previewSize]
|
|
13
|
-
return {
|
|
14
|
-
width: '100%',
|
|
15
|
-
maxWidth: previewSize ? previewSize + 'px' : '100%',
|
|
16
|
-
margin: '- auto'
|
|
17
|
-
}
|
|
18
|
-
},
|
|
19
|
-
|
|
20
|
-
scene: {
|
|
21
|
-
props: {
|
|
22
|
-
padding: 'B 0',
|
|
23
|
-
maxHeight: '40em',
|
|
24
|
-
position: 'relative',
|
|
25
|
-
minHeight: '65vh'
|
|
26
|
-
},
|
|
27
|
-
|
|
28
|
-
class: {
|
|
29
|
-
z: (el, s) => ({
|
|
30
|
-
'> *': {
|
|
31
|
-
transform: `scale(${parseFloat(s.zoomLevel, 2)})`
|
|
32
|
-
}
|
|
33
|
-
})
|
|
34
|
-
},
|
|
35
|
-
|
|
36
|
-
Iframe: {
|
|
37
|
-
props: (el, s) => ({
|
|
38
|
-
id: 'component',
|
|
39
|
-
src: `/scene/${s.key}`,
|
|
40
|
-
border: '0',
|
|
41
|
-
background: 'transparent',
|
|
42
|
-
position: 'absolute',
|
|
43
|
-
boxSize: '100% 100%',
|
|
44
|
-
inset: '0 0 0 0'
|
|
45
|
-
}),
|
|
46
|
-
on: {
|
|
47
|
-
initUpdate: (el, s) => {
|
|
48
|
-
return false
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
},
|
|
53
|
-
|
|
54
|
-
on: {
|
|
55
|
-
stateUpdated: (el, s) => {
|
|
56
|
-
el.__root.node.scrollTo({ top: 0, behavior: 'smooth' })
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
|
|
3
|
-
import { SPACING, TYPOGRAPHY } from '@symbo.ls/scratch'
|
|
4
|
-
|
|
5
|
-
export default {
|
|
6
|
-
descriptionTheme: 'dark',
|
|
7
|
-
previewSize: 'unset',
|
|
8
|
-
sceneTheme: 'dark',
|
|
9
|
-
theme: '',
|
|
10
|
-
zoomLevel: 1,
|
|
11
|
-
currentFontSizeIndex: 3,
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export const toolsState = {
|
|
15
|
-
base: TYPOGRAPHY.base,
|
|
16
|
-
ratio: SPACING.ratio,
|
|
17
|
-
range: [-1, +4],
|
|
18
|
-
scales: {},
|
|
19
|
-
sequence: {},
|
|
20
|
-
vars: {},
|
|
21
|
-
type: 'type-scale',
|
|
22
|
-
sampleText: 'Today is a big day for our tribe. The year ends.'
|
|
23
|
-
}
|
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
Flex,
|
|
5
|
-
SequenceSliders,
|
|
6
|
-
ClickableItem,
|
|
7
|
-
SquareButton,
|
|
8
|
-
ThemeSwitcher // eslint-disable-line no-unused-vars
|
|
9
|
-
} from '@symbo.ls/components'
|
|
10
|
-
import { Link } from '@symbo.ls/components/src/Link'
|
|
11
|
-
import { toolsState } from './state'
|
|
12
|
-
|
|
13
|
-
export default {
|
|
14
|
-
props: {
|
|
15
|
-
padding: 'Z2 0 0',
|
|
16
|
-
flexAlign: 'center space-between'
|
|
17
|
-
},
|
|
18
|
-
|
|
19
|
-
tools: {
|
|
20
|
-
extend: Flex,
|
|
21
|
-
props: { gap: 'B1' },
|
|
22
|
-
// theme: { extend: ThemeSwitcher },
|
|
23
|
-
state: toolsState,
|
|
24
|
-
|
|
25
|
-
on: {
|
|
26
|
-
stateUpdated: (el, s, changes) => {
|
|
27
|
-
// window.componentRoot.context.system = s.__projectSystem
|
|
28
|
-
window.componentState.update(changes)
|
|
29
|
-
}
|
|
30
|
-
},
|
|
31
|
-
|
|
32
|
-
editors: {
|
|
33
|
-
extend: Flex,
|
|
34
|
-
props: { gap: 'Z2' },
|
|
35
|
-
|
|
36
|
-
childExtend: {
|
|
37
|
-
extend: [ClickableItem, SquareButton],
|
|
38
|
-
props: {}
|
|
39
|
-
},
|
|
40
|
-
|
|
41
|
-
add: {
|
|
42
|
-
props: {
|
|
43
|
-
icon: 'plus'
|
|
44
|
-
}
|
|
45
|
-
},
|
|
46
|
-
remix: {
|
|
47
|
-
props: {
|
|
48
|
-
icon: 'magicstar outline'
|
|
49
|
-
},
|
|
50
|
-
on: {
|
|
51
|
-
click: (ev, el, s) => {
|
|
52
|
-
window.componentState.update({
|
|
53
|
-
system: s.__projectSystem
|
|
54
|
-
})
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
},
|
|
58
|
-
editor: {
|
|
59
|
-
extend: Link,
|
|
60
|
-
props: {
|
|
61
|
-
icon: 'edit',
|
|
62
|
-
href: '/editor/' + window.location.pathname.split('component/')[1]
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
},
|
|
66
|
-
|
|
67
|
-
VerticalLine: {
|
|
68
|
-
margin: 'auto 0',
|
|
69
|
-
height: 'A2'
|
|
70
|
-
},
|
|
71
|
-
|
|
72
|
-
sliders: {
|
|
73
|
-
extend: SequenceSliders,
|
|
74
|
-
childExtend: { title: null }
|
|
75
|
-
}
|
|
76
|
-
},
|
|
77
|
-
|
|
78
|
-
responsive: {
|
|
79
|
-
extend: Flex,
|
|
80
|
-
props: { gap: 'A2' },
|
|
81
|
-
|
|
82
|
-
direction: {
|
|
83
|
-
extend: [ClickableItem, SquareButton],
|
|
84
|
-
props: { icon: 'languageDirection' },
|
|
85
|
-
on: {
|
|
86
|
-
click: (ev, el, s) => {
|
|
87
|
-
window.componentState.update({
|
|
88
|
-
direction: window.componentState.direction === 'rtl' ? 'ltr' : 'rtl'
|
|
89
|
-
})
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
},
|
|
93
|
-
|
|
94
|
-
VerticalLine: {
|
|
95
|
-
margin: 'auto 0',
|
|
96
|
-
height: 'A2'
|
|
97
|
-
},
|
|
98
|
-
|
|
99
|
-
ResponsiveToolBar: {}
|
|
100
|
-
}
|
|
101
|
-
}
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
|
|
3
|
-
import { Grid, Hoverable, FontObject } from '@symbo.ls/components'
|
|
4
|
-
import { TypeSection } from '../Typography/shared'
|
|
5
|
-
|
|
6
|
-
const mapFonts = (el, s) => {
|
|
7
|
-
const FONT = s.parse()
|
|
8
|
-
const fontKeys = Object.keys(FONT)
|
|
9
|
-
|
|
10
|
-
return fontKeys.map(v => {
|
|
11
|
-
const font = FONT[v]
|
|
12
|
-
const weights = Object.keys(font)
|
|
13
|
-
const weightsLength = weights.length
|
|
14
|
-
const fontWeightCaption = weights[0] === 'variable' ? 'variable' : `${weightsLength} style${weightsLength > 1 ? 's' : ''}`
|
|
15
|
-
|
|
16
|
-
return {
|
|
17
|
-
title: v,
|
|
18
|
-
href: `/fonts/font-settings/${v}`,
|
|
19
|
-
labels: [
|
|
20
|
-
{ icon: 'fontVariable', text: fontWeightCaption }
|
|
21
|
-
]
|
|
22
|
-
}
|
|
23
|
-
})
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
export default {
|
|
27
|
-
extend: TypeSection,
|
|
28
|
-
state: 'FONT',
|
|
29
|
-
header: {
|
|
30
|
-
state: {
|
|
31
|
-
title: 'Document Fonts',
|
|
32
|
-
p: 'Document @font-face, default and backup fonts',
|
|
33
|
-
nav: [{
|
|
34
|
-
icon: 'plus',
|
|
35
|
-
href: '/fonts/upload-font'
|
|
36
|
-
}]
|
|
37
|
-
}
|
|
38
|
-
},
|
|
39
|
-
|
|
40
|
-
content: {
|
|
41
|
-
extend: Grid,
|
|
42
|
-
props: {
|
|
43
|
-
columns: 'repeat(2, 1fr)',
|
|
44
|
-
gap: 'A',
|
|
45
|
-
margin: '0 -Z'
|
|
46
|
-
},
|
|
47
|
-
childExtend: [FontObject, Hoverable],
|
|
48
|
-
$setStateCollection: mapFonts
|
|
49
|
-
}
|
|
50
|
-
}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
|
|
3
|
-
import { Grid, Hoverable, FontFamilyObject } from '@symbo.ls/components'
|
|
4
|
-
import { TypeSection } from '../Typography/shared'
|
|
5
|
-
|
|
6
|
-
const mapFontFamilies = (el, s) => {
|
|
7
|
-
const FONT_FAMILY = s.parse()
|
|
8
|
-
const fontFamilyKeys = Object.keys(FONT_FAMILY)
|
|
9
|
-
|
|
10
|
-
return fontFamilyKeys.map(v => {
|
|
11
|
-
const val = FONT_FAMILY[v]
|
|
12
|
-
if (v === 'default') return
|
|
13
|
-
return {
|
|
14
|
-
title: v,
|
|
15
|
-
href: `/fonts/font-family/${v}`,
|
|
16
|
-
val
|
|
17
|
-
}
|
|
18
|
-
}).filter(v => v)
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export default {
|
|
22
|
-
extend: TypeSection,
|
|
23
|
-
state: 'FONT_FAMILY',
|
|
24
|
-
|
|
25
|
-
header: {
|
|
26
|
-
state: {
|
|
27
|
-
title: 'Font Families',
|
|
28
|
-
p: 'Setup a set and fallback fonts as font families',
|
|
29
|
-
nav: [{
|
|
30
|
-
icon: 'plus',
|
|
31
|
-
href: '/fonts/add-font-family',
|
|
32
|
-
scrollToTop: false
|
|
33
|
-
}]
|
|
34
|
-
}
|
|
35
|
-
},
|
|
36
|
-
|
|
37
|
-
content: {
|
|
38
|
-
extend: Grid,
|
|
39
|
-
props: {
|
|
40
|
-
columns: 'repeat(4, 1fr)',
|
|
41
|
-
gap: 'A',
|
|
42
|
-
margin: '0 -Z'
|
|
43
|
-
},
|
|
44
|
-
|
|
45
|
-
childExtend: [FontFamilyObject, Hoverable],
|
|
46
|
-
$setStateCollection: mapFontFamilies
|
|
47
|
-
}
|
|
48
|
-
}
|
package/src/pages/Fonts/index.js
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
|
|
3
|
-
import fontFaces from './fontFaces'
|
|
4
|
-
import fontFamilies from './fontFamilies'
|
|
5
|
-
|
|
6
|
-
import { state } from './state'
|
|
7
|
-
|
|
8
|
-
export const Fonts = {
|
|
9
|
-
state: 'PROJECT_SYSTEM',
|
|
10
|
-
on: { stateCreated: (el, s) => s.update(state, { preventUpdate: true }) },
|
|
11
|
-
|
|
12
|
-
fontFaces,
|
|
13
|
-
line3: { extend: 'Line' },
|
|
14
|
-
|
|
15
|
-
fontFamilies
|
|
16
|
-
}
|
package/src/pages/Fonts/state.js
DELETED
package/src/pages/Icons/index.js
DELETED
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
|
|
3
|
-
import * as ACCESSIBILITY from '@symbo.ls/icons/src/accessibility'
|
|
4
|
-
import * as BOXMODEL from '@symbo.ls/icons/src/boxModel'
|
|
5
|
-
import * as DISPLAY from '@symbo.ls/icons/src/display'
|
|
6
|
-
import * as INTERACTIVE from '@symbo.ls/icons/src/interactive'
|
|
7
|
-
import * as LOGOS from '@symbo.ls/icons/src/logos'
|
|
8
|
-
import * as SIGNS from '@symbo.ls/icons/src/signs'
|
|
9
|
-
import * as STYLE from '@symbo.ls/icons/src/style'
|
|
10
|
-
import * as KEYBOARD from '@symbo.ls/icons/src/keyboard'
|
|
11
|
-
import * as SVG from '@symbo.ls/icons/src/miscellaneous'
|
|
12
|
-
import * as TECH from '@symbo.ls/icons/src/tech'
|
|
13
|
-
import * as TEXT from '@symbo.ls/icons/src/text'
|
|
14
|
-
|
|
15
|
-
import { IconsGroup } from '../../components'
|
|
16
|
-
|
|
17
|
-
const ArraizeIconsCategory = (library, state) => {
|
|
18
|
-
const list = Object.keys(library)
|
|
19
|
-
if (state.searched) return list.filter(value => value.includes(state.searched))
|
|
20
|
-
return list
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
const ICON_GROUPS = state => [{
|
|
24
|
-
title: 'Document Icons',
|
|
25
|
-
p: 'All ungrouped document icons',
|
|
26
|
-
list: ArraizeIconsCategory(SVG, state)
|
|
27
|
-
}, {
|
|
28
|
-
title: 'Accessibility',
|
|
29
|
-
list: ArraizeIconsCategory(ACCESSIBILITY, state)
|
|
30
|
-
}, {
|
|
31
|
-
title: 'Box Model',
|
|
32
|
-
list: ArraizeIconsCategory(BOXMODEL, state)
|
|
33
|
-
}, {
|
|
34
|
-
title: 'Display',
|
|
35
|
-
list: ArraizeIconsCategory(DISPLAY, state)
|
|
36
|
-
}, {
|
|
37
|
-
title: 'Interactive',
|
|
38
|
-
list: ArraizeIconsCategory(INTERACTIVE, state)
|
|
39
|
-
}, {
|
|
40
|
-
title: 'Logos',
|
|
41
|
-
list: ArraizeIconsCategory(LOGOS, state)
|
|
42
|
-
}, {
|
|
43
|
-
title: 'Signs',
|
|
44
|
-
list: ArraizeIconsCategory(SIGNS, state)
|
|
45
|
-
}, {
|
|
46
|
-
title: 'Style',
|
|
47
|
-
list: ArraizeIconsCategory(STYLE, state)
|
|
48
|
-
}, {
|
|
49
|
-
title: 'Keys',
|
|
50
|
-
list: ArraizeIconsCategory(KEYBOARD, state)
|
|
51
|
-
}, {
|
|
52
|
-
title: 'Tech',
|
|
53
|
-
list: ArraizeIconsCategory(TECH, state)
|
|
54
|
-
}, {
|
|
55
|
-
title: 'Text',
|
|
56
|
-
list: ArraizeIconsCategory(TEXT, state)
|
|
57
|
-
}]
|
|
58
|
-
|
|
59
|
-
export const Icons = {
|
|
60
|
-
state: {},
|
|
61
|
-
|
|
62
|
-
SectionHeader: {
|
|
63
|
-
extend: true,
|
|
64
|
-
|
|
65
|
-
heading: {
|
|
66
|
-
title: 'Icons',
|
|
67
|
-
p: 'Unlike typography, component may has the properties of padding, gap, width and rest.'
|
|
68
|
-
},
|
|
69
|
-
|
|
70
|
-
Search: {
|
|
71
|
-
margin: '- -Z2 - -',
|
|
72
|
-
placeholder: 'Search Icons'
|
|
73
|
-
},
|
|
74
|
-
|
|
75
|
-
nav: null
|
|
76
|
-
},
|
|
77
|
-
|
|
78
|
-
Line: {},
|
|
79
|
-
|
|
80
|
-
Flex: {
|
|
81
|
-
props: {
|
|
82
|
-
flow: 'column',
|
|
83
|
-
gap: 'D1'
|
|
84
|
-
},
|
|
85
|
-
|
|
86
|
-
childExtend: IconsGroup,
|
|
87
|
-
$setStateCollection: (el, state) => {
|
|
88
|
-
el.removeContent()
|
|
89
|
-
return ICON_GROUPS(state)
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
}
|
package/src/pages/Icons/style.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
'use strict'
|
|
@@ -1,149 +0,0 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
|
|
3
|
-
import { InitPage } from '../../components'
|
|
4
|
-
import {
|
|
5
|
-
Flex,
|
|
6
|
-
CommonField,
|
|
7
|
-
WiderButton,
|
|
8
|
-
ClickableItem,
|
|
9
|
-
TooltipParent
|
|
10
|
-
} from '@symbo.ls/components'
|
|
11
|
-
import { setCookie } from 'domql/packages/cookie'
|
|
12
|
-
|
|
13
|
-
const ButtonOptions = {
|
|
14
|
-
tag: 'section',
|
|
15
|
-
extend: CommonField,
|
|
16
|
-
|
|
17
|
-
props: {
|
|
18
|
-
margin: '- - C2 -',
|
|
19
|
-
gap: 'Z2',
|
|
20
|
-
element: {
|
|
21
|
-
gap: 'A',
|
|
22
|
-
maxWidth: 'I',
|
|
23
|
-
alignItems: 'center',
|
|
24
|
-
childProps: {
|
|
25
|
-
theme: 'quaternary',
|
|
26
|
-
color: 'white .8',
|
|
27
|
-
round: 'Z1',
|
|
28
|
-
fontSize: 'A2'
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
},
|
|
32
|
-
|
|
33
|
-
title: {},
|
|
34
|
-
element: {
|
|
35
|
-
extend: Flex,
|
|
36
|
-
childExtend: {
|
|
37
|
-
extend: [ClickableItem, WiderButton, TooltipParent],
|
|
38
|
-
props: ({ key, state, parent }) => ({
|
|
39
|
-
active: state[parent.parent.key] === key.toLowerCase(),
|
|
40
|
-
'.active': {
|
|
41
|
-
opacity: 1
|
|
42
|
-
},
|
|
43
|
-
|
|
44
|
-
style: {
|
|
45
|
-
'&:hover, &:focus-visible': {
|
|
46
|
-
zIndex: 1000,
|
|
47
|
-
'& [tooltip]': {
|
|
48
|
-
transform: 'translate3d(-50%,0,0)',
|
|
49
|
-
opacity: 1,
|
|
50
|
-
visibility: 'visible'
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
}),
|
|
55
|
-
|
|
56
|
-
Tooltip: {
|
|
57
|
-
props: {
|
|
58
|
-
background: 'gray2 .95',
|
|
59
|
-
position: 'absolute',
|
|
60
|
-
pointerEvents: 'none',
|
|
61
|
-
top: '115%',
|
|
62
|
-
left: '50%',
|
|
63
|
-
shape: 'tooltip',
|
|
64
|
-
shapeDirection: 'top',
|
|
65
|
-
fontSize: 'Z1',
|
|
66
|
-
padding: 'Y Z1',
|
|
67
|
-
transform: 'translate3d(-50%, 10%, 0)',
|
|
68
|
-
transition: 'C defaultBezier, C defaultBezier, B defaultBezier',
|
|
69
|
-
transitionProperty: 'opacity, visibility, transform',
|
|
70
|
-
textAlign: 'center',
|
|
71
|
-
opacity: '0',
|
|
72
|
-
visibility: 'hidden',
|
|
73
|
-
zIndex: 9,
|
|
74
|
-
lineHeight: 1
|
|
75
|
-
},
|
|
76
|
-
title: ({ parent }) => parent.key,
|
|
77
|
-
p: null
|
|
78
|
-
},
|
|
79
|
-
|
|
80
|
-
on: {
|
|
81
|
-
click: (ev, el, s) => {
|
|
82
|
-
const key = el.parent.parent.key
|
|
83
|
-
const value = el.key.toLowerCase()
|
|
84
|
-
setCookie(key, value)
|
|
85
|
-
s.update({ [key]: value })
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
const language = {
|
|
93
|
-
extend: ButtonOptions,
|
|
94
|
-
title: { text: 'Your environment' },
|
|
95
|
-
|
|
96
|
-
element: {
|
|
97
|
-
HTML: { props: { icon: 'html' } },
|
|
98
|
-
JavaScript: { props: { icon: 'js outline' } },
|
|
99
|
-
TypeScript: { props: { icon: 'ts outline' } },
|
|
100
|
-
PDF: { props: { icon: 'pdf' } },
|
|
101
|
-
none: {
|
|
102
|
-
props: {
|
|
103
|
-
boxSizing: 'content-box',
|
|
104
|
-
padding: 'Z B',
|
|
105
|
-
width: 'auto',
|
|
106
|
-
borderRadius: 'B',
|
|
107
|
-
text: `I'm just playing`,
|
|
108
|
-
aspectRatio: 'auto'
|
|
109
|
-
},
|
|
110
|
-
icon: null
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
const framework = {
|
|
116
|
-
extend: ButtonOptions,
|
|
117
|
-
title: { text: 'Your framework' },
|
|
118
|
-
|
|
119
|
-
element: {
|
|
120
|
-
DOMQL: { props: { icon: 'domql' } },
|
|
121
|
-
React: { props: { icon: 'react' } },
|
|
122
|
-
Vue: { props: { icon: 'vue' } },
|
|
123
|
-
Angular: { props: { icon: 'angular' } },
|
|
124
|
-
Svelte: { props: { icon: 'svelte' } },
|
|
125
|
-
WebComponents: { props: { icon: 'webComponents' } }
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
export const ChooseEnvironment = {
|
|
130
|
-
extend: InitPage,
|
|
131
|
-
|
|
132
|
-
back: { props: { href: '/init/font' } },
|
|
133
|
-
|
|
134
|
-
HeaderHeading: {
|
|
135
|
-
margin: '- - D -',
|
|
136
|
-
|
|
137
|
-
Caption: { text: 'And finally,' },
|
|
138
|
-
H1: { text: 'Your environment' }
|
|
139
|
-
},
|
|
140
|
-
|
|
141
|
-
language,
|
|
142
|
-
framework,
|
|
143
|
-
|
|
144
|
-
ContinueButton: {
|
|
145
|
-
text: 'Create Symbols',
|
|
146
|
-
theme: 'primary',
|
|
147
|
-
href: '/design-system'
|
|
148
|
-
}
|
|
149
|
-
}
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
|
|
3
|
-
import { Flex, ProjectTab, Grid } from '@symbo.ls/components'
|
|
4
|
-
|
|
5
|
-
import { InitPage } from '../../components'
|
|
6
|
-
|
|
7
|
-
const props = {
|
|
8
|
-
align: 'flex-start flex-start',
|
|
9
|
-
width: '100%',
|
|
10
|
-
|
|
11
|
-
footer: {
|
|
12
|
-
p: {
|
|
13
|
-
color: 'gray6',
|
|
14
|
-
maxWidth: `${272 / 14}em`,
|
|
15
|
-
margin: '0'
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
export const ChooseProject = {
|
|
21
|
-
extend: InitPage,
|
|
22
|
-
|
|
23
|
-
props,
|
|
24
|
-
|
|
25
|
-
back: null,
|
|
26
|
-
|
|
27
|
-
HeaderHeading: {
|
|
28
|
-
margin: '- - D -',
|
|
29
|
-
|
|
30
|
-
Caption: { text: 'Sign in to one of your projects' },
|
|
31
|
-
H1: { text: null }
|
|
32
|
-
},
|
|
33
|
-
|
|
34
|
-
cnt: {
|
|
35
|
-
extend: Grid,
|
|
36
|
-
props: {
|
|
37
|
-
columns: 'repeat(7, 1fr)',
|
|
38
|
-
gap: 'D1',
|
|
39
|
-
margin: '10% -Z auto'
|
|
40
|
-
},
|
|
41
|
-
|
|
42
|
-
childExtend: ProjectTab,
|
|
43
|
-
$setStateCollection: ({ state }) => state.projects
|
|
44
|
-
},
|
|
45
|
-
|
|
46
|
-
footer: {
|
|
47
|
-
extend: Flex,
|
|
48
|
-
props: {
|
|
49
|
-
align: 'flex-start flex-start',
|
|
50
|
-
gap: 'C',
|
|
51
|
-
margin: 'auto - -'
|
|
52
|
-
},
|
|
53
|
-
ContinueButton: {
|
|
54
|
-
text: 'Create',
|
|
55
|
-
href: '/init/create'
|
|
56
|
-
},
|
|
57
|
-
p: {
|
|
58
|
-
text: `In this example we'll initialize a Symbols Design System for you.`
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
}
|