@symbo.ls/preview 2.0.7 → 2.6.0
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/{src/pages/Export → .legacy}/_tools_old.js +7 -6
- package/.legacy/index copy.js +45 -0
- package/{src/pages/Spaces → .legacy}/preview.js +14 -14
- package/{src/pages/Spaces → .legacy}/style.js +0 -3
- package/.vscode/extensions.json +5 -0
- package/index.html +4 -14
- package/index.js +44 -0
- package/package.json +32 -32
- package/src/app.js +30 -68
- package/src/assets/dark.png +0 -0
- package/src/assets/mask1.png +0 -0
- package/src/assets/mask2.png +0 -0
- 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 +101 -0
- package/src/components/Banner.js +58 -0
- package/src/components/ColorText.js +29 -0
- package/src/components/ColorsPalette.js +69 -0
- package/src/components/ColumnParagrphs.js +23 -0
- package/src/components/ContinueButton.js +14 -0
- package/src/components/DesignComponent.js +80 -0
- package/src/components/FontText.js +193 -0
- package/src/components/Header.js +50 -0
- package/src/components/HeaderHeading.js +23 -0
- package/src/components/IconsGroup.js +60 -0
- package/src/components/Page.js +135 -0
- package/src/components/ResponsivePreview.js +44 -0
- package/src/components/Route.js +1 -0
- package/src/components/ShapePreview.js +63 -0
- package/src/components/ShapeSet.js +85 -0
- package/src/components/SlidersWithResponsive.js +23 -0
- package/src/components/SpacingButton/actionButtons.js +41 -0
- package/src/components/SpacingButton/dropdown.js +114 -0
- package/src/components/SpacingButton/index.js +248 -0
- package/src/components/SpacingButton/props.js +45 -0
- package/src/components/SpacingPreview.js +154 -0
- package/src/components/SpacingTable.js +210 -0
- package/src/components/ThemeButtons.js +42 -0
- package/src/components/UploadImage.js +61 -0
- package/src/components/Widget.js +1 -0
- package/src/components/index.js +25 -0
- package/src/config/index.js +12 -31
- package/src/config/theme.js +1 -71
- package/src/pages/Account/__/index.js +241 -0
- package/src/pages/Account/{setUpProject.js → __/setUpProject.js} +10 -10
- package/src/pages/Account/index.js +17 -147
- package/src/pages/Color/globalThemes.js +30 -0
- package/src/pages/Color/index.js +7 -10
- package/src/pages/Color/palette.js +35 -0
- package/src/pages/Color/themes.js +23 -117
- package/src/pages/Components/grid.js +99 -0
- package/src/pages/Components/index.js +37 -0
- package/src/pages/Components/sidebar.js +28 -0
- package/src/pages/Components/style.js +16 -0
- package/src/pages/DesignSystem/Dashboard/banners.js +38 -0
- package/src/pages/DesignSystem/Dashboard/designElements.js +124 -0
- package/src/pages/DesignSystem/Dashboard/index.js +22 -0
- package/src/pages/DesignSystem/Dashboard/quickstart.js +86 -0
- package/src/pages/DesignSystem/Dashboard/state.js +118 -0
- package/src/pages/DesignSystem/Dashboard/summary.js +40 -0
- package/src/pages/DesignSystem/index.js +187 -0
- package/src/pages/Editor/index.js +7 -9
- package/src/pages/Editor/layers.js +14 -14
- package/src/pages/Editor/scene.js +7 -9
- package/src/pages/Editor/tools.js +22 -22
- package/src/pages/Export/const.js +3 -4
- package/src/pages/Export/description.js +58 -87
- package/src/pages/Export/gist.js +23 -0
- package/src/pages/Export/index.js +48 -39
- package/src/pages/Export/scene.js +98 -61
- package/src/pages/Export/state.js +11 -5
- package/src/pages/Export/tools.js +41 -86
- package/src/pages/Fonts/fontFaces.js +50 -0
- package/src/pages/Fonts/fontFamilies.js +47 -0
- package/src/pages/Fonts/index.js +15 -0
- package/src/pages/Fonts/state.js +5 -0
- package/src/pages/Icons/index.js +73 -69
- package/src/pages/Icons/style.js +0 -18
- package/src/pages/Init/ChooseEnvironment.js +104 -0
- package/src/pages/Init/CreateDocumentTheme.js +166 -0
- package/src/pages/Init/CreatePalette.js +72 -0
- package/src/pages/Init/FontText.js +23 -0
- package/src/pages/Init/Personalize/fields.js +109 -0
- package/src/pages/Init/Personalize/icon.js +42 -0
- package/src/pages/Init/Personalize/index.js +37 -0
- package/src/pages/Init/index.js +36 -0
- package/src/pages/Library/disabled.js +38 -0
- package/src/pages/Library/index.js +24 -47
- package/src/pages/MediaQuery/index.js +46 -0
- package/src/pages/MediaQuery/lists.js +285 -0
- package/src/pages/MediaQuery/state.js +150 -0
- package/src/pages/MediaQuery/typeScale.js +69 -0
- package/src/pages/Shapes/index.js +54 -204
- package/src/pages/Shapes/shapeSet.js +133 -0
- package/src/pages/Shapes/style.js +0 -28
- package/src/pages/Spaces/index.js +23 -47
- package/src/pages/Spaces/sequence.js +30 -1
- package/src/pages/Spaces/state.js +12 -14
- package/src/pages/State/index.js +86 -0
- package/src/pages/{ColorEditor → Theme}/friendTheme.js +3 -3
- package/src/pages/Theme/index.js +197 -0
- package/src/pages/{ColorEditor → Theme}/interactivity.js +6 -7
- package/src/pages/Theme/preview.js +153 -0
- package/src/pages/{ColorEditor → Theme}/style.js +1 -12
- package/src/pages/{ColorEditor → Theme}/themingTools.js +12 -12
- package/src/pages/Typography/collection.js +110 -0
- package/src/pages/Typography/documentStyles.js +125 -0
- package/src/pages/Typography/index.js +28 -36
- package/src/pages/Typography/rangeButtons.js +58 -0
- package/src/pages/Typography/shared.js +2 -3
- package/src/pages/Typography/state.js +9 -8
- package/src/pages/Typography/stylesHelpers.js +30 -0
- package/src/pages/Typography/typeScale.js +63 -82
- package/src/pages/index.js +15 -23
- package/src/style.js +15 -12
- package/svgSprite.config.js +2 -1
- package/README.md +0 -19
- package/app.webmanifest +0 -4
- package/netlify.toml +0 -19
- package/protect-pwd.js +0 -65
- package/src/animations.js +0 -71
- package/src/assets/dots.png +0 -0
- package/src/assets/dotsDark.png +0 -0
- package/src/data/Symbols.sketch +0 -0
- package/src/data/_Symbols.sketch/document.json +0 -1
- package/src/data/_Symbols.sketch/fonts/6c9956fc8970ec3d8268c3f286afe19d954fc40b +0 -0
- package/src/data/_Symbols.sketch/fonts/750e9b005158d57108ebbcf288e2582f078d6735 +0 -0
- package/src/data/_Symbols.sketch/fonts/86c45cb69ad4ba2a8e6d0b81f20964b33f4eca6c +0 -0
- package/src/data/_Symbols.sketch/fonts/f97cec7aed309ec77b4fd3005d1a3e0d86c2a7b9 +0 -0
- package/src/data/_Symbols.sketch/images/0427bc225ee7dc33db78252defd5b2e4cd5b7467.png +0 -0
- package/src/data/_Symbols.sketch/images/0c4846cdd2f11ffb23c9ce063380fc934f7a11ea.png +0 -0
- package/src/data/_Symbols.sketch/images/55d3f5e93869fbd70e8dfbca1ce3dfa0cc9f2dbe.png +0 -0
- package/src/data/_Symbols.sketch/images/67ae1583a9d77eec7106f5016f48b5594a02b3f6.png +0 -0
- package/src/data/_Symbols.sketch/images/7152b3ea22388d53052d0212995a1805527ea862.png +0 -0
- package/src/data/_Symbols.sketch/images/72f1896a8462385fd596bc35f240382ba15814fc.png +0 -0
- package/src/data/_Symbols.sketch/images/73e4245b1f867343001657193ff2318c9cf2ef53.png +0 -0
- package/src/data/_Symbols.sketch/images/7b89dae77676fb4cfd072e0830cff9c27afd11c6.png +0 -0
- package/src/data/_Symbols.sketch/images/811e2b516575d3b4e7709dfef6369bce7dae0a26.png +0 -0
- package/src/data/_Symbols.sketch/images/82d006789579f2ee1fa45c9116f7cd7dd1bcbe37.png +0 -0
- package/src/data/_Symbols.sketch/images/8a896270aa4da8e2401d0ea76e46dc9b9125e59a.png +0 -0
- package/src/data/_Symbols.sketch/images/966688c4a579283836f15ab69c8b76e11b236ff5.png +0 -0
- package/src/data/_Symbols.sketch/images/b903a498e1d438e8bb12de5422f732c717b79eff.png +0 -0
- package/src/data/_Symbols.sketch/images/b9f3cae81a855e21ae75185dcb6ae6551c5447f1.png +0 -0
- package/src/data/_Symbols.sketch/images/cd0f908410abf4cad7a4501539eb0711c41a182f.png +0 -0
- package/src/data/_Symbols.sketch/images/d54f15f130ba4f1d4ad56f03c01ac06fe0ab4f56.png +0 -0
- package/src/data/_Symbols.sketch/images/df5a20029363f95abc58b2c8972e1417d84c8aa7.png +0 -0
- package/src/data/_Symbols.sketch/images/e889546970c931244400c2f70412c39123029cb3.png +0 -0
- package/src/data/_Symbols.sketch/images/f420a7a2beb15bee5d2ecbba8f296c6d4b22dfa3.png +0 -0
- package/src/data/_Symbols.sketch/meta.json +0 -1
- package/src/data/_Symbols.sketch/pages/31D11772-FB33-42EC-A3CC-79F63922E04D.json +0 -1
- package/src/data/_Symbols.sketch/pages/35BD91AD-F0ED-4002-891D-F1B3250E88C1.json +0 -1
- package/src/data/_Symbols.sketch/pages/4831AF31-ECB8-4DA6-B4D0-C1095D42146C.json +0 -1
- package/src/data/_Symbols.sketch/pages/6FCC0155-B3F4-4792-892E-523D45315AFD.json +0 -1
- package/src/data/_Symbols.sketch/pages/7996D5DD-C5B2-4EE7-9DE8-2C05E2ACA9F3.json +0 -1
- package/src/data/_Symbols.sketch/pages/B314C0F3-0038-473F-A127-536AF28E5272.json +0 -1
- package/src/data/_Symbols.sketch/pages/B6798E64-F7E9-40F5-9BD0-88A548478438.json +0 -1
- package/src/data/_Symbols.sketch/pages/B9B28DF3-EDC2-4D5B-A412-12B3B2E7DE58.json +0 -1
- package/src/data/_Symbols.sketch/pages/CA6E47E4-DAF7-4D1D-8DDC-D5A60508D9A0.json +0 -1
- package/src/data/_Symbols.sketch/pages/D6F5EB10-9D31-47AC-9077-1CE8CB2C2448.json +0 -1
- package/src/data/_Symbols.sketch/previews/preview.png +0 -0
- package/src/data/_Symbols.sketch/user.json +0 -1
- package/src/data/categories.js +0 -44
- package/src/data/components/button-archived/index.js +0 -63
- package/src/data/components/button-archived/style.js +0 -5
- package/src/data/components/button-circle/index.js +0 -54
- package/src/data/components/button-contacts/index.js +0 -56
- package/src/data/components/button-contacts/style.js +0 -13
- package/src/data/components/button-download/index.js +0 -63
- package/src/data/components/button-pro/index.js +0 -98
- package/src/data/components/button-pro/style.js +0 -19
- package/src/data/components/button-theme-switcher/index.js +0 -104
- package/src/data/components/button-theme-switcher/style.js +0 -16
- package/src/data/components/button-user/index.js +0 -82
- package/src/data/components/button-user/style.js +0 -25
- package/src/data/components/datepicker/index.js +0 -40
- package/src/data/components/datepicker/style.js +0 -4
- package/src/data/components/dropdown-list/index.js +0 -56
- package/src/data/components/field/index.js +0 -40
- package/src/data/components/index.js +0 -34
- package/src/data/components/label/index.js +0 -40
- package/src/data/components/notification/index.js +0 -55
- package/src/data/components/notification/style.js +0 -20
- package/src/data/components/pills/index.js +0 -37
- package/src/data/components/tooltip/index.js +0 -38
- package/src/data/filters.js +0 -3
- package/src/data/index.js +0 -3
- package/src/data/library/button-circle/index.js +0 -52
- package/src/data/library/button-join/index.js +0 -61
- package/src/data/library/family-bundle/index.js +0 -99
- package/src/data/library/family-bundle/style.js +0 -27
- package/src/data/library/index.js +0 -15
- package/src/data/library/join-class/index.js +0 -45
- package/src/data/library/parent-mode/index.js +0 -69
- package/src/data/library/parent-mode/style.js +0 -25
- package/src/index.html +0 -57
- package/src/index.js +0 -7
- package/src/pages/Color/colors.js +0 -58
- package/src/pages/Color/documentThemes.js +0 -101
- package/src/pages/Color/style.js +0 -7
- package/src/pages/ColorEditor/colorTone.js +0 -163
- package/src/pages/ColorEditor/index.js +0 -178
- package/src/pages/Export/header.js +0 -37
- package/src/pages/Export/style.js +0 -28
- package/src/pages/Library/style.js +0 -43
- package/src/pages/PageProto.js +0 -26
- package/src/pages/Typography/docFonts.js +0 -128
- package/src/pages/Typography/docStyles.js +0 -97
- package/src/pages/Typography/style.js +0 -11
- package/src/protect.js +0 -114
- package/src/state.js +0 -3
- package/src/test.js +0 -30
- package/test/index.test.js +0 -5
- /package/{src/pages/Spaces → .legacy}/boxModel.js +0 -0
- /package/{src/data/favorites.js → .legacy/sequence.js} +0 -0
- /package/src/pages/{ColorEditor → Theme}/ntc.js +0 -0
|
@@ -1,130 +1,36 @@
|
|
|
1
1
|
'use strict'
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { ThemeTemplate, SectionHeader, Grid } from '@symbo.ls/components'
|
|
4
4
|
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
color: 'white',
|
|
11
|
-
textDecoration: 'none',
|
|
12
|
-
boxSizing: 'border-box',
|
|
13
|
-
caption: {
|
|
14
|
-
marginTop: `${12 / 13}em`
|
|
15
|
-
},
|
|
16
|
-
|
|
17
|
-
'> *': {
|
|
18
|
-
transition: '350ms',
|
|
19
|
-
transitionProperty: 'opacity, transform',
|
|
20
|
-
opacity: 0.35
|
|
21
|
-
},
|
|
22
|
-
|
|
23
|
-
'&:hover > *': {
|
|
24
|
-
opacity: 1,
|
|
25
|
-
transform: 'scale(1.015)'
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export const ThemeTemplate = {
|
|
30
|
-
proto: [Link, Block],
|
|
31
|
-
style,
|
|
32
|
-
|
|
33
|
-
props: (el) => ({
|
|
34
|
-
href: `/theme/${el.key}`,
|
|
35
|
-
padding: 'A Z1'
|
|
36
|
-
}),
|
|
37
|
-
|
|
38
|
-
theme: {
|
|
39
|
-
colors: {
|
|
40
|
-
proto: [Block, Text, Shape, Flex],
|
|
41
|
-
props: {
|
|
42
|
-
round: 'Z1'
|
|
43
|
-
},
|
|
44
|
-
|
|
45
|
-
style: {
|
|
46
|
-
boxShadow: `${COLOR.blue && opacify(COLOR.blue.value, 0.2)} 0 2px 35px`,
|
|
47
|
-
overflow: 'hidden',
|
|
48
|
-
div: {
|
|
49
|
-
flex: 1,
|
|
50
|
-
display: 'flex',
|
|
51
|
-
alignItems: 'center'
|
|
52
|
-
}
|
|
53
|
-
},
|
|
54
|
-
_icon: '',
|
|
55
|
-
sun: {
|
|
56
|
-
proto: [Shape, Block, IconText, Flex],
|
|
57
|
-
props: {
|
|
58
|
-
icon: 'sun',
|
|
59
|
-
size: 'Z',
|
|
60
|
-
padding: 'Z1 0 Z1 A',
|
|
61
|
-
round: 'Z1 0 0 Z1'
|
|
62
|
-
},
|
|
63
|
-
style: (element, state) => ({
|
|
64
|
-
background: state.background,
|
|
65
|
-
color: state.color,
|
|
66
|
-
borderBottomLeftRadius: '12px',
|
|
67
|
-
'&:only-child': {
|
|
68
|
-
borderRadius: 12
|
|
69
|
-
}
|
|
70
|
-
})
|
|
71
|
-
},
|
|
72
|
-
moon: {
|
|
73
|
-
if: (el, state) => state.themes,
|
|
74
|
-
proto: [Shape, Block, IconText, Flex],
|
|
75
|
-
props: {
|
|
76
|
-
theme: 'secondary',
|
|
77
|
-
padding: 'Z1 0 Z1 A',
|
|
78
|
-
icon: 'moon',
|
|
79
|
-
round: '0 Z1 Z1 0'
|
|
80
|
-
},
|
|
81
|
-
style: (element, state) => ({
|
|
82
|
-
background: '', // state.themes.dark.backgroundColor,
|
|
83
|
-
color: '' // state.themes.dark.color
|
|
84
|
-
})
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
},
|
|
88
|
-
caption: {
|
|
89
|
-
proto: [Block, Text],
|
|
90
|
-
props: {
|
|
91
|
-
size: 'Y',
|
|
92
|
-
padding: 'Z 0 0 0'
|
|
93
|
-
},
|
|
94
|
-
text: (el, state) => el.parent.key
|
|
95
|
-
}
|
|
5
|
+
const mapThemes = (el, s) => {
|
|
6
|
+
if (!s.__system) return
|
|
7
|
+
const { THEME } = s.__system
|
|
8
|
+
const themeKeys = Object.keys(THEME)
|
|
9
|
+
return themeKeys.map(v => ({ ...THEME[v], key: v }))
|
|
96
10
|
}
|
|
97
11
|
|
|
98
12
|
export default {
|
|
99
|
-
tag: 'section',
|
|
100
13
|
header: {
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
14
|
+
extend: SectionHeader,
|
|
15
|
+
state: {
|
|
16
|
+
title: 'Themes',
|
|
17
|
+
p: 'Themes are used to prepare color setting abstractly and apply it to any component',
|
|
18
|
+
nav: [{
|
|
19
|
+
icon: 'plus',
|
|
20
|
+
href: '/colors/add-color'
|
|
21
|
+
}]
|
|
106
22
|
}
|
|
107
23
|
},
|
|
108
|
-
colors: {
|
|
109
|
-
style: {
|
|
110
|
-
display: 'flex',
|
|
111
|
-
flexWrap: 'wrap',
|
|
112
|
-
margin: '0 -16px'
|
|
113
|
-
},
|
|
114
24
|
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
return {
|
|
123
|
-
childProto: ThemeTemplate,
|
|
124
|
-
tag: 'fragment',
|
|
25
|
+
content: {
|
|
26
|
+
extend: Grid,
|
|
27
|
+
props: {
|
|
28
|
+
columns: 'repeat(5, 1fr)',
|
|
29
|
+
gap: 'C2',
|
|
30
|
+
margin: '0 -Z'
|
|
31
|
+
},
|
|
125
32
|
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
}
|
|
33
|
+
childExtend: ThemeTemplate,
|
|
34
|
+
$setStateCollection: (el, s) => mapThemes(el, s)
|
|
129
35
|
}
|
|
130
36
|
}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
'use strict'
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
ComponentTemplate,
|
|
5
|
+
Grid,
|
|
6
|
+
SectionHeader
|
|
7
|
+
} from '@symbo.ls/components'
|
|
8
|
+
import { COMPONENTS } from '@symbo.ls/temp-db/symbols'
|
|
9
|
+
import { gridStyle, rowStyle } from './style'
|
|
10
|
+
|
|
11
|
+
export default {
|
|
12
|
+
props: {
|
|
13
|
+
padding: '0 Y2',
|
|
14
|
+
flex: 1
|
|
15
|
+
},
|
|
16
|
+
|
|
17
|
+
header: {
|
|
18
|
+
extend: SectionHeader,
|
|
19
|
+
|
|
20
|
+
props: {
|
|
21
|
+
margin: '0 0 X2',
|
|
22
|
+
title: null,
|
|
23
|
+
heading: {
|
|
24
|
+
p: {
|
|
25
|
+
opacity: '0',
|
|
26
|
+
text: 'All Categories'
|
|
27
|
+
},
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
|
|
31
|
+
heading: {},
|
|
32
|
+
|
|
33
|
+
nav: {
|
|
34
|
+
childExtend: {
|
|
35
|
+
props: {
|
|
36
|
+
theme: 'transparent',
|
|
37
|
+
background: 'transparent 0'
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
|
|
41
|
+
...[{
|
|
42
|
+
props: (el, s) => ({
|
|
43
|
+
icon: { name: s.favorites ? 'star' : 'star outline' },
|
|
44
|
+
href: null
|
|
45
|
+
}),
|
|
46
|
+
on: {
|
|
47
|
+
click: (ev, el, s) => {
|
|
48
|
+
s.update({ favorites: !s.favorites })
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}, {
|
|
52
|
+
props: (el, s) => {
|
|
53
|
+
const active = s.view === 'grid'
|
|
54
|
+
return {
|
|
55
|
+
active,
|
|
56
|
+
href: null,
|
|
57
|
+
icon: { name: active ? 'grid' : 'grid outline' }
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
on: {
|
|
61
|
+
click: (ev, el, s) => {
|
|
62
|
+
s.update({ view: 'grid' })
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}, {
|
|
66
|
+
props: (el, s) => {
|
|
67
|
+
const active = s.view === 'list'
|
|
68
|
+
return {
|
|
69
|
+
active,
|
|
70
|
+
href: null,
|
|
71
|
+
icon: { name: active ? 'rows' : 'rows outline' }
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
on: {
|
|
75
|
+
click: (ev, el, s) => {
|
|
76
|
+
s.update({ view: 'list' })
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}]
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
|
|
83
|
+
components: {
|
|
84
|
+
extend: Grid,
|
|
85
|
+
|
|
86
|
+
props: ({ state }) => ({
|
|
87
|
+
flex: 1,
|
|
88
|
+
gap: 'A',
|
|
89
|
+
margin: '- -Y2',
|
|
90
|
+
style: state.view === 'grid' ? gridStyle : rowStyle
|
|
91
|
+
}),
|
|
92
|
+
|
|
93
|
+
childExtend: ComponentTemplate,
|
|
94
|
+
$setStateCollection: ({ state }) => COMPONENTS.filter(v => {
|
|
95
|
+
if (!state.category) return true
|
|
96
|
+
return state.category === v.category.key
|
|
97
|
+
})
|
|
98
|
+
}
|
|
99
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
'use strict'
|
|
2
|
+
|
|
3
|
+
import { splitRoute } from 'domql/packages/router'
|
|
4
|
+
|
|
5
|
+
import sidebar from './sidebar'
|
|
6
|
+
import grid from './grid'
|
|
7
|
+
|
|
8
|
+
import { CATEGORIES } from '@symbo.ls/temp-db/symbols/categories'
|
|
9
|
+
// import FAVORITES from '../../data/favorites'
|
|
10
|
+
// import COMPONENTS from '../../data/components'
|
|
11
|
+
|
|
12
|
+
export const Components = {
|
|
13
|
+
props: {
|
|
14
|
+
maxWidth: '100%',
|
|
15
|
+
width: '100%',
|
|
16
|
+
flexFlow: 'row',
|
|
17
|
+
flow: 'row',
|
|
18
|
+
gap: 'B1',
|
|
19
|
+
padding: 'A'
|
|
20
|
+
},
|
|
21
|
+
|
|
22
|
+
state: {
|
|
23
|
+
filters: {},
|
|
24
|
+
view: 'grid'
|
|
25
|
+
},
|
|
26
|
+
|
|
27
|
+
sidebar,
|
|
28
|
+
grid,
|
|
29
|
+
|
|
30
|
+
on: {
|
|
31
|
+
init: (el, s) => {
|
|
32
|
+
var route = splitRoute()[1]
|
|
33
|
+
var content = CATEGORIES.filter(v => v.key === route)[0]
|
|
34
|
+
s.category = content ? content.key : ''
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
'use strict'
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
FilterCategories,
|
|
5
|
+
FilterInteractivity,
|
|
6
|
+
FilterDataTypes
|
|
7
|
+
} from '@symbo.ls/components'
|
|
8
|
+
import { CATEGORIES } from '@symbo.ls/temp-db/symbols/categories'
|
|
9
|
+
|
|
10
|
+
export default {
|
|
11
|
+
sticky: {
|
|
12
|
+
props: {
|
|
13
|
+
position: 'sticky',
|
|
14
|
+
top: 'D2',
|
|
15
|
+
padding: '- - - X2'
|
|
16
|
+
},
|
|
17
|
+
|
|
18
|
+
categories: {
|
|
19
|
+
extend: FilterCategories,
|
|
20
|
+
header: {},
|
|
21
|
+
nav: {
|
|
22
|
+
...CATEGORIES
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
FilterInteractivity,
|
|
26
|
+
FilterDataTypes
|
|
27
|
+
}
|
|
28
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
'use strict'
|
|
2
|
+
|
|
3
|
+
export const gridStyle = {
|
|
4
|
+
gridTemplateColumns: 'repeat(12, 1fr)',
|
|
5
|
+
gridAutoFlow: 'dense',
|
|
6
|
+
justifyItems: 'stretch',
|
|
7
|
+
boxSizing: 'border-box',
|
|
8
|
+
marginBottom: '2em',
|
|
9
|
+
gridAutoColumns: 'auto',
|
|
10
|
+
gridAutoRows: 'auto'
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export const rowStyle = {
|
|
14
|
+
display: 'flex',
|
|
15
|
+
flexFlow: 'row wrap'
|
|
16
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
'use strict'
|
|
2
|
+
|
|
3
|
+
import { Flex } from '@symbo.ls/components'
|
|
4
|
+
import { TutorialBanner } from '../../../components'
|
|
5
|
+
|
|
6
|
+
import DARK_PNG from '../../../assets/dark.png'
|
|
7
|
+
import TYPE_PNG from '../../../assets/type.png'
|
|
8
|
+
import SPACE_PNG from '../../../assets/space.png' // eslint-disable-line
|
|
9
|
+
import SHAPES_PNG from '../../../assets/shapes.png'
|
|
10
|
+
|
|
11
|
+
export default {
|
|
12
|
+
extend: Flex,
|
|
13
|
+
|
|
14
|
+
props: {
|
|
15
|
+
align: 'stretch space-between',
|
|
16
|
+
margin: 'C1 -Z1',
|
|
17
|
+
gap: 'B1'
|
|
18
|
+
},
|
|
19
|
+
|
|
20
|
+
childExtend: TutorialBanner,
|
|
21
|
+
|
|
22
|
+
$setStateCollection: ({ state }) => [{
|
|
23
|
+
title: 'Setting up a dark theme',
|
|
24
|
+
p: '15 sec tutorial',
|
|
25
|
+
background: DARK_PNG,
|
|
26
|
+
href: ''
|
|
27
|
+
}, {
|
|
28
|
+
title: 'How to composite',
|
|
29
|
+
p: '3 mins tutorial',
|
|
30
|
+
background: TYPE_PNG,
|
|
31
|
+
href: ''
|
|
32
|
+
}, {
|
|
33
|
+
title: 'Master Shapes',
|
|
34
|
+
p: '45 sec tutorial',
|
|
35
|
+
background: SHAPES_PNG,
|
|
36
|
+
href: ''
|
|
37
|
+
}]
|
|
38
|
+
}
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
'use strict'
|
|
2
|
+
|
|
3
|
+
import { Flex, DesignElement } from '@symbo.ls/components'
|
|
4
|
+
|
|
5
|
+
export default {
|
|
6
|
+
extend: Flex,
|
|
7
|
+
|
|
8
|
+
props: {
|
|
9
|
+
flow: 'row wrap',
|
|
10
|
+
align: 'flex-start flex-start',
|
|
11
|
+
gap: 'C B2',
|
|
12
|
+
padding: 'B1 0 B2',
|
|
13
|
+
margin: '0 -Z2'
|
|
14
|
+
},
|
|
15
|
+
|
|
16
|
+
childExtend: {
|
|
17
|
+
extend: DesignElement,
|
|
18
|
+
props: {
|
|
19
|
+
flex: '1',
|
|
20
|
+
widthRange: 'F F'
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
|
|
24
|
+
...[{
|
|
25
|
+
href: '/color',
|
|
26
|
+
button: {
|
|
27
|
+
theme: 'color',
|
|
28
|
+
icon: { name: 'color' }
|
|
29
|
+
},
|
|
30
|
+
heading: {
|
|
31
|
+
maxWidth: 'E1-default',
|
|
32
|
+
title: { text: 'Colors' },
|
|
33
|
+
p: { text: 'Colorize styles manually' }
|
|
34
|
+
}
|
|
35
|
+
}, {
|
|
36
|
+
href: '/theme',
|
|
37
|
+
button: {
|
|
38
|
+
theme: 'theme',
|
|
39
|
+
icon: { name: 'theme' }
|
|
40
|
+
},
|
|
41
|
+
heading: {
|
|
42
|
+
maxWidth: 'E1-default',
|
|
43
|
+
title: { text: 'Theming' },
|
|
44
|
+
p: { text: 'Color groups and states' }
|
|
45
|
+
}
|
|
46
|
+
}, {
|
|
47
|
+
href: '/typography',
|
|
48
|
+
button: {
|
|
49
|
+
theme: 'typography',
|
|
50
|
+
icon: { name: 'typography' }
|
|
51
|
+
},
|
|
52
|
+
heading: {
|
|
53
|
+
maxWidth: 'E-default',
|
|
54
|
+
title: { text: 'Typography' },
|
|
55
|
+
p: { text: 'Style a typed material' }
|
|
56
|
+
}
|
|
57
|
+
}, {
|
|
58
|
+
href: '/space',
|
|
59
|
+
button: {
|
|
60
|
+
theme: 'space',
|
|
61
|
+
icon: { name: 'space' }
|
|
62
|
+
},
|
|
63
|
+
heading: {
|
|
64
|
+
maxWidth: 'E1-default',
|
|
65
|
+
title: { text: 'Spacing' },
|
|
66
|
+
p: { text: 'Manage properties of a size' }
|
|
67
|
+
}
|
|
68
|
+
}, {
|
|
69
|
+
href: '/shape',
|
|
70
|
+
button: {
|
|
71
|
+
theme: 'shape',
|
|
72
|
+
icon: { name: 'shape' }
|
|
73
|
+
},
|
|
74
|
+
heading: {
|
|
75
|
+
maxWidth: 'E2-default',
|
|
76
|
+
title: { text: 'Shapes' },
|
|
77
|
+
p: { text: 'Design an outline to a component' }
|
|
78
|
+
}
|
|
79
|
+
}, {
|
|
80
|
+
href: '/icons',
|
|
81
|
+
button: {
|
|
82
|
+
theme: 'icons',
|
|
83
|
+
icon: { name: 'icons' }
|
|
84
|
+
},
|
|
85
|
+
heading: {
|
|
86
|
+
maxWidth: 'F-default',
|
|
87
|
+
title: { text: 'Icons' },
|
|
88
|
+
p: { text: 'Label a role of subject with glyphs' }
|
|
89
|
+
}
|
|
90
|
+
}, {
|
|
91
|
+
href: '/sequence',
|
|
92
|
+
button: {
|
|
93
|
+
theme: 'default',
|
|
94
|
+
icon: { name: 'state' }
|
|
95
|
+
},
|
|
96
|
+
heading: {
|
|
97
|
+
maxWidth: 'F-default',
|
|
98
|
+
title: { text: 'Sequence' },
|
|
99
|
+
p: { text: 'Generating set for measurable units' }
|
|
100
|
+
}
|
|
101
|
+
}, {
|
|
102
|
+
href: '/timing',
|
|
103
|
+
button: {
|
|
104
|
+
theme: 'default',
|
|
105
|
+
icon: { name: 'clock outline' }
|
|
106
|
+
},
|
|
107
|
+
heading: {
|
|
108
|
+
maxWidth: 'F-default',
|
|
109
|
+
title: { text: 'Timing' },
|
|
110
|
+
p: { text: 'Tokens for transitions and animations' }
|
|
111
|
+
}
|
|
112
|
+
}, {
|
|
113
|
+
href: '/media-query',
|
|
114
|
+
button: {
|
|
115
|
+
// theme: 'screen',
|
|
116
|
+
icon: { name: 'deviceSmallScreenOutline' }
|
|
117
|
+
},
|
|
118
|
+
heading: {
|
|
119
|
+
maxWidth: 'F-default',
|
|
120
|
+
title: { text: 'Media Query' },
|
|
121
|
+
p: { text: 'Frequently used media queries as variables' }
|
|
122
|
+
}
|
|
123
|
+
}].map(v => ({ props: v }))
|
|
124
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
'use strict'
|
|
2
|
+
|
|
3
|
+
import { Flex } from '@symbo.ls/components'
|
|
4
|
+
|
|
5
|
+
import banners from './banners' // eslint-disable-line no-unused-vars
|
|
6
|
+
import summary from './summary'
|
|
7
|
+
import quickstart from './quickstart'
|
|
8
|
+
|
|
9
|
+
export const DesignSystemDashboard = {
|
|
10
|
+
extend: Flex,
|
|
11
|
+
|
|
12
|
+
props: { flow: 'column', gap: 'C1' },
|
|
13
|
+
|
|
14
|
+
ArticleBig: {
|
|
15
|
+
title: { text: 'Design System' },
|
|
16
|
+
p: { text: 'Create your Design System guidelines' }
|
|
17
|
+
},
|
|
18
|
+
|
|
19
|
+
// banners,
|
|
20
|
+
summary,
|
|
21
|
+
quickstart
|
|
22
|
+
}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
'use strict'
|
|
2
|
+
|
|
3
|
+
const startElementProps = {
|
|
4
|
+
position: 'relative',
|
|
5
|
+
minWidth: 'G',
|
|
6
|
+
maxWidth: 'G2',
|
|
7
|
+
width: '100%',
|
|
8
|
+
note: {
|
|
9
|
+
fontSize: 'Z1',
|
|
10
|
+
color: 'gray6',
|
|
11
|
+
position: 'absolute',
|
|
12
|
+
maxWidth: '100%',
|
|
13
|
+
whiteSpace: 'initial',
|
|
14
|
+
top: '115%',
|
|
15
|
+
left: 'Z',
|
|
16
|
+
fontFamily: 'smbls'
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export default {
|
|
21
|
+
SectionHeader: {
|
|
22
|
+
margin: '- - B2',
|
|
23
|
+
title: 'Setting up locally',
|
|
24
|
+
p: 'This is how you initialize Symbols Design System to your local app.'
|
|
25
|
+
},
|
|
26
|
+
|
|
27
|
+
Flex: {
|
|
28
|
+
props: {
|
|
29
|
+
// display: 'inline-flex',
|
|
30
|
+
gap: 'D1',
|
|
31
|
+
align: 'flex-start space-between',
|
|
32
|
+
childProps: {
|
|
33
|
+
flex: '1',
|
|
34
|
+
|
|
35
|
+
Terminal: startElementProps,
|
|
36
|
+
Code: startElementProps
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
|
|
40
|
+
step1: {
|
|
41
|
+
extend: 'QuickStartTerminal',
|
|
42
|
+
QuickStartNumber: { width: '.87ch', text: '1' },
|
|
43
|
+
Terminal: {
|
|
44
|
+
note: { text: 'Install Symbols to your project' },
|
|
45
|
+
props: {
|
|
46
|
+
command: { text: 'npm i smbls -g' }
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
|
|
51
|
+
step2: {
|
|
52
|
+
extend: 'QuickStartTerminal',
|
|
53
|
+
QuickStartNumber: { text: '2' },
|
|
54
|
+
Terminal: {
|
|
55
|
+
note: { text: 'Login to Symbols from command line' },
|
|
56
|
+
props: {
|
|
57
|
+
command: { text: 'smbls login' }
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
|
|
62
|
+
step3: {
|
|
63
|
+
extend: 'QuickStartCode',
|
|
64
|
+
QuickStartNumber: { text: '3' },
|
|
65
|
+
Code: {
|
|
66
|
+
note: { text: 'Create .symbolsrc.js file in your project and insert your Symbols key' },
|
|
67
|
+
props: ({ state }) => ({
|
|
68
|
+
code: {
|
|
69
|
+
text: `{ "key": "${state.appKey}" }`
|
|
70
|
+
}
|
|
71
|
+
})
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
|
|
75
|
+
step4: {
|
|
76
|
+
extend: 'QuickStartTerminal',
|
|
77
|
+
QuickStartNumber: { text: '4' },
|
|
78
|
+
Terminal: {
|
|
79
|
+
note: { text: 'Sync live changes' },
|
|
80
|
+
props: {
|
|
81
|
+
command: { text: 'smbls sync --live' }
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|