@symbo.ls/preview 2.0.7 → 2.5.5
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
|
@@ -0,0 +1,109 @@
|
|
|
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
|
+
},
|
|
25
|
+
|
|
26
|
+
name: {
|
|
27
|
+
props: {
|
|
28
|
+
title: { text: 'Name the project' },
|
|
29
|
+
element: { placeholder: 'You name it' }
|
|
30
|
+
},
|
|
31
|
+
|
|
32
|
+
title: {},
|
|
33
|
+
element: {
|
|
34
|
+
extend: Input,
|
|
35
|
+
attr: { value: ({ state }) => state.projectName }
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
|
|
39
|
+
k: {
|
|
40
|
+
props: {
|
|
41
|
+
title: { text: 'Key' }
|
|
42
|
+
},
|
|
43
|
+
title: {},
|
|
44
|
+
element: {
|
|
45
|
+
extend: Input,
|
|
46
|
+
attr: { value: ({ state }) => state.appKey && state.appKey.split('.')[0] },
|
|
47
|
+
props: { placeholder: 'a-zA-Z0-9' }
|
|
48
|
+
},
|
|
49
|
+
Span: {
|
|
50
|
+
position: 'absolute',
|
|
51
|
+
opacity: '.65',
|
|
52
|
+
text: '.symbo.ls',
|
|
53
|
+
right: 'Z2',
|
|
54
|
+
bottom: 'Z',
|
|
55
|
+
pointerEvents: 'none'
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
|
|
59
|
+
visibility: {
|
|
60
|
+
props: { title: { text: 'URL Access' } },
|
|
61
|
+
title: {},
|
|
62
|
+
element: {
|
|
63
|
+
extend: [SelectField],
|
|
64
|
+
props: {
|
|
65
|
+
style: { padding: '0' },
|
|
66
|
+
round: 'C1'
|
|
67
|
+
},
|
|
68
|
+
title: null,
|
|
69
|
+
buttons: {
|
|
70
|
+
props: {
|
|
71
|
+
position: 'absolute',
|
|
72
|
+
right: 'Z',
|
|
73
|
+
pointerEvents: 'none'
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
|
|
77
|
+
Select: {
|
|
78
|
+
props: {
|
|
79
|
+
outline: 'none',
|
|
80
|
+
border: 'none',
|
|
81
|
+
background: 'transparent',
|
|
82
|
+
color: 'currentColor',
|
|
83
|
+
padding: 'Z1 A2',
|
|
84
|
+
round: 'C1',
|
|
85
|
+
width: '100%',
|
|
86
|
+
|
|
87
|
+
style: {
|
|
88
|
+
cursor: 'default',
|
|
89
|
+
appearance: 'none'
|
|
90
|
+
},
|
|
91
|
+
|
|
92
|
+
name: 'user',
|
|
93
|
+
id: 'user'
|
|
94
|
+
},
|
|
95
|
+
|
|
96
|
+
childExtend: { tag: 'option', text: ({ state }) => state.text },
|
|
97
|
+
$setCollection: () => [
|
|
98
|
+
{ text: 'Private' },
|
|
99
|
+
{ text: 'Public' }
|
|
100
|
+
],
|
|
101
|
+
on: {
|
|
102
|
+
change: (ev, { parent }) => {
|
|
103
|
+
parent.user.update({ key: ev.target.value })
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
'use strict'
|
|
2
|
+
|
|
3
|
+
import { User } from '@symbo.ls/components'
|
|
4
|
+
import { UploadImage } from '../../../components'
|
|
5
|
+
|
|
6
|
+
export default {
|
|
7
|
+
extend: UploadImage,
|
|
8
|
+
props: {
|
|
9
|
+
title: { text: 'Project icon' },
|
|
10
|
+
element: {
|
|
11
|
+
flow: 'column',
|
|
12
|
+
position: 'relative',
|
|
13
|
+
width: 'fit-content',
|
|
14
|
+
padding: 'A',
|
|
15
|
+
gap: '0',
|
|
16
|
+
|
|
17
|
+
p: {
|
|
18
|
+
text: 'Drag and drop or click',
|
|
19
|
+
maxWidth: 'E',
|
|
20
|
+
textAlign: 'center'
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
title: {},
|
|
25
|
+
element: {
|
|
26
|
+
User: {
|
|
27
|
+
extend: User,
|
|
28
|
+
props: ({ state }) => ({
|
|
29
|
+
position: 'absolute',
|
|
30
|
+
fontSize: 'H',
|
|
31
|
+
top: '50%',
|
|
32
|
+
left: '50%',
|
|
33
|
+
transform: 'translate3d(-50%, -50%, 1px)',
|
|
34
|
+
src: state.icon && state.icon.src,
|
|
35
|
+
key: state.projectName,
|
|
36
|
+
transition: 'C defaultBezier opacity',
|
|
37
|
+
opacity: (state.icon && state.icon.src) ? '1' : '0',
|
|
38
|
+
pointerEvents: 'none'
|
|
39
|
+
})
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
'use strict'
|
|
2
|
+
|
|
3
|
+
import { InitPage } from '../../../components'
|
|
4
|
+
|
|
5
|
+
import icon from './icon'
|
|
6
|
+
import fields from './fields'
|
|
7
|
+
|
|
8
|
+
export const Personalize = {
|
|
9
|
+
extend: InitPage,
|
|
10
|
+
|
|
11
|
+
back: null,
|
|
12
|
+
|
|
13
|
+
HeaderHeading: {
|
|
14
|
+
props: { margin: '- - D2 -' },
|
|
15
|
+
Caption: { text: `Let's personalize your Symbols` },
|
|
16
|
+
H1: { text: ({ state }) => `Hi ${state.userName}` }
|
|
17
|
+
},
|
|
18
|
+
|
|
19
|
+
ColumnParagraphs: {
|
|
20
|
+
extend: true,
|
|
21
|
+
...[
|
|
22
|
+
{ props: { text: `In this example we'll initialize a Symbols Design System for you.` } },
|
|
23
|
+
{ props: { text: `You can connect Symbols to your app and style it online.` } }
|
|
24
|
+
]
|
|
25
|
+
},
|
|
26
|
+
|
|
27
|
+
Flex: {
|
|
28
|
+
props: { gap: 'D1' },
|
|
29
|
+
|
|
30
|
+
icon,
|
|
31
|
+
fields
|
|
32
|
+
},
|
|
33
|
+
|
|
34
|
+
ContinueButton: {
|
|
35
|
+
href: '/init/theme'
|
|
36
|
+
}
|
|
37
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
'use strict'
|
|
2
|
+
|
|
3
|
+
import { Flex } from '@symbo.ls/components'
|
|
4
|
+
import { Personalize } from './Personalize'
|
|
5
|
+
import { CreateDocumentTheme } from './CreateDocumentTheme'
|
|
6
|
+
import { CreatePallete } from './CreatePalette'
|
|
7
|
+
import { FontText } from './FontText'
|
|
8
|
+
import { ChooseEnvironment } from './ChooseEnvironment'
|
|
9
|
+
import { router } from '@domql/router'
|
|
10
|
+
|
|
11
|
+
export const Init = {
|
|
12
|
+
extend: Flex,
|
|
13
|
+
|
|
14
|
+
props: {
|
|
15
|
+
boxSize: '100% 100%',
|
|
16
|
+
gap: 'A',
|
|
17
|
+
padding: '8.5% E1 E1 12.5%'
|
|
18
|
+
},
|
|
19
|
+
|
|
20
|
+
define: { routes: param => param },
|
|
21
|
+
routes: {
|
|
22
|
+
'/': Personalize,
|
|
23
|
+
'/theme': CreateDocumentTheme,
|
|
24
|
+
'/pallete': CreatePallete,
|
|
25
|
+
'/font': FontText,
|
|
26
|
+
'/env': ChooseEnvironment
|
|
27
|
+
},
|
|
28
|
+
|
|
29
|
+
on: {
|
|
30
|
+
render: element => {
|
|
31
|
+
const { pathname, hash } = window.location
|
|
32
|
+
const url = pathname + hash
|
|
33
|
+
router(element, url, {}, { level: 1 })
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
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
|
+
}
|
|
@@ -1,56 +1,33 @@
|
|
|
1
1
|
'use strict'
|
|
2
2
|
|
|
3
|
-
import
|
|
3
|
+
import { ComponentTemplate } from '@symbo.ls/components'
|
|
4
|
+
import { DisabledPage, Page } from '../../components'
|
|
4
5
|
|
|
5
|
-
|
|
6
|
+
export const Library = {
|
|
7
|
+
extend: [DisabledPage, Page],
|
|
6
8
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
style,
|
|
11
|
-
|
|
12
|
-
proto: PageProto,
|
|
13
|
-
|
|
14
|
-
header: {
|
|
15
|
-
proto: [SectionHeader, Block],
|
|
16
|
-
props: { padding: 'C 0 0 0' },
|
|
17
|
-
heading: {},
|
|
18
|
-
nav: {
|
|
19
|
-
...[
|
|
20
|
-
// { props: { icon: 'arrowAngleDown' } }
|
|
21
|
-
]
|
|
22
|
-
}
|
|
9
|
+
SectionHeader: {
|
|
10
|
+
title: 'My Symbols',
|
|
11
|
+
p: 'This is the first collection of your components'
|
|
23
12
|
},
|
|
24
13
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
dataTypes: v.dataTypes,
|
|
43
|
-
code: v.code,
|
|
44
|
-
params: v.params,
|
|
45
|
-
settings: v.settings
|
|
46
|
-
}
|
|
47
|
-
})
|
|
48
|
-
return {
|
|
49
|
-
tag: 'fragment',
|
|
50
|
-
childProto: ComponentTemplate,
|
|
51
|
-
|
|
52
|
-
...Symbols
|
|
53
|
-
}
|
|
14
|
+
Grid: {
|
|
15
|
+
props: {
|
|
16
|
+
flex: 1,
|
|
17
|
+
templateColumns: 'repeat(12, 1fr)',
|
|
18
|
+
autoFlow: 'dense',
|
|
19
|
+
autoColumns: 'auto',
|
|
20
|
+
autoRows: 'auto',
|
|
21
|
+
justifyItems: 'stretch',
|
|
22
|
+
|
|
23
|
+
margin: '- -Z2 B1',
|
|
24
|
+
gap: 'A'
|
|
25
|
+
},
|
|
26
|
+
|
|
27
|
+
childExtend: ComponentTemplate,
|
|
28
|
+
$setStateCollection: ({ state }) => {
|
|
29
|
+
const { COMPONENTS } = state.__system
|
|
30
|
+
return Object.values(COMPONENTS)
|
|
54
31
|
}
|
|
55
32
|
}
|
|
56
33
|
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
'use strict'
|
|
2
|
+
|
|
3
|
+
import { Flex } from '@symbo.ls/components'
|
|
4
|
+
|
|
5
|
+
import { mediaQueryList, screenSizingList } from './lists'
|
|
6
|
+
|
|
7
|
+
const content = {
|
|
8
|
+
extend: Flex,
|
|
9
|
+
|
|
10
|
+
props: {
|
|
11
|
+
justifyContent: 'space-between',
|
|
12
|
+
margin: '0 -Z',
|
|
13
|
+
gap: 'C1',
|
|
14
|
+
|
|
15
|
+
childProps: {
|
|
16
|
+
heading: {
|
|
17
|
+
color: 'white',
|
|
18
|
+
padding: '0 0 A1 Z1',
|
|
19
|
+
fontWeight: '700'
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
|
|
23
|
+
mediaQueries: {
|
|
24
|
+
flex: 1
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
|
|
28
|
+
mediaQueries: {
|
|
29
|
+
heading: { text: 'Media Queries' },
|
|
30
|
+
mediaQueryList
|
|
31
|
+
},
|
|
32
|
+
|
|
33
|
+
screensSheet: {
|
|
34
|
+
heading: { text: 'Screen Sizing Sheet' },
|
|
35
|
+
screenSizingList
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export const MediaQuery = {
|
|
40
|
+
SectionHeader: {
|
|
41
|
+
title: 'Responsive',
|
|
42
|
+
p: 'A Design System is the single source of truth that defines all design elements and allows the crews to assemble components and compose them into more complex apps.'
|
|
43
|
+
},
|
|
44
|
+
|
|
45
|
+
content
|
|
46
|
+
}
|
|
@@ -0,0 +1,285 @@
|
|
|
1
|
+
'use strict'
|
|
2
|
+
|
|
3
|
+
import { IconText, Flex, SquareButton, Select, Input, ClickableItem } from '@symbo.ls/components'
|
|
4
|
+
import { BREAKPOINTS_DATA, DEVICE_SIZE_DATA } from './state'
|
|
5
|
+
|
|
6
|
+
const stateCom = {
|
|
7
|
+
activeScreen: false
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
const listProps = {
|
|
11
|
+
background: 'gray1',
|
|
12
|
+
round: 'A',
|
|
13
|
+
fontSize: 'Z1',
|
|
14
|
+
style: { overflow: 'hidden' }
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
const valueItemProps = {
|
|
18
|
+
height: 'B',
|
|
19
|
+
theme: 'quaternary',
|
|
20
|
+
round: 'Y',
|
|
21
|
+
align: 'center center',
|
|
22
|
+
minWidth: 'C2'
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
const MEDIA_TYPES = [{
|
|
26
|
+
text: 'min-width',
|
|
27
|
+
value: 'minWidth'
|
|
28
|
+
}, {
|
|
29
|
+
text: 'max-width',
|
|
30
|
+
value: 'maxWidth'
|
|
31
|
+
}, {
|
|
32
|
+
text: 'min-height',
|
|
33
|
+
value: 'minHeight'
|
|
34
|
+
}, {
|
|
35
|
+
text: 'max-height',
|
|
36
|
+
value: 'maxHeight'
|
|
37
|
+
}, {
|
|
38
|
+
text: 'exact',
|
|
39
|
+
value: 'exact'
|
|
40
|
+
}]
|
|
41
|
+
|
|
42
|
+
const BreakpointItem = {
|
|
43
|
+
extend: Flex,
|
|
44
|
+
state: stateCom,
|
|
45
|
+
props: {
|
|
46
|
+
gap: 'X',
|
|
47
|
+
alignItems: 'center'
|
|
48
|
+
},
|
|
49
|
+
|
|
50
|
+
childExtend: {
|
|
51
|
+
extend: Flex,
|
|
52
|
+
props: valueItemProps
|
|
53
|
+
},
|
|
54
|
+
|
|
55
|
+
select: {
|
|
56
|
+
extend: Select,
|
|
57
|
+
props: ({ state }) => ({
|
|
58
|
+
color: 'white'
|
|
59
|
+
}),
|
|
60
|
+
|
|
61
|
+
on: {
|
|
62
|
+
change: (ev, el, s) => {
|
|
63
|
+
const { value } = el.node
|
|
64
|
+
const exact = value === 'exact'
|
|
65
|
+
s.update({ type: value }, { preventUpdate: true })
|
|
66
|
+
s.parent.update({
|
|
67
|
+
exact,
|
|
68
|
+
breakpoints: {
|
|
69
|
+
[s.__element.key]: { type: value }
|
|
70
|
+
}
|
|
71
|
+
})
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
|
|
75
|
+
$setCollection: () => MEDIA_TYPES.map(props => ({ props }))
|
|
76
|
+
},
|
|
77
|
+
|
|
78
|
+
value: {
|
|
79
|
+
extend: Input,
|
|
80
|
+
props: ({ state }) => ({
|
|
81
|
+
placeholder: state.placeholder,
|
|
82
|
+
value: state.value,
|
|
83
|
+
round: 'Y',
|
|
84
|
+
maxWidth: 'C2',
|
|
85
|
+
padding: '0',
|
|
86
|
+
style: { textAlign: 'center' }
|
|
87
|
+
})
|
|
88
|
+
},
|
|
89
|
+
|
|
90
|
+
value2: {
|
|
91
|
+
extend: Input,
|
|
92
|
+
props: ({ state }) => ({
|
|
93
|
+
hide: state.type !== 'exact',
|
|
94
|
+
placeholder: '728px',
|
|
95
|
+
round: 'Y',
|
|
96
|
+
maxWidth: 'C1',
|
|
97
|
+
padding: '0',
|
|
98
|
+
textAlign: 'center'
|
|
99
|
+
})
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
const screenIconText = {
|
|
104
|
+
extend: [IconText, Flex],
|
|
105
|
+
props: ({ state }) => ({
|
|
106
|
+
text: state.name,
|
|
107
|
+
gap: 'Z1',
|
|
108
|
+
align: 'center flex-start',
|
|
109
|
+
whiteSpace: 'nowrap',
|
|
110
|
+
icon: {
|
|
111
|
+
name: state.icon,
|
|
112
|
+
opacity: '.5'
|
|
113
|
+
}
|
|
114
|
+
})
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
const MediaQueryRow = {
|
|
118
|
+
extend: Flex,
|
|
119
|
+
props: {
|
|
120
|
+
gap: 'D',
|
|
121
|
+
align: 'center',
|
|
122
|
+
minHeight: 'D',
|
|
123
|
+
padding: '- A - B',
|
|
124
|
+
childProps: { minWidth: 'E' },
|
|
125
|
+
':not(:last-child)': {
|
|
126
|
+
border: 'dashed, white 0.05',
|
|
127
|
+
borderWidth: '0 0 1px'
|
|
128
|
+
},
|
|
129
|
+
':hover': {
|
|
130
|
+
background: 'gray2'
|
|
131
|
+
},
|
|
132
|
+
':hover > div > button': { opacity: 1 }
|
|
133
|
+
},
|
|
134
|
+
|
|
135
|
+
screen: { extend: screenIconText },
|
|
136
|
+
|
|
137
|
+
columnBreakPoints: {
|
|
138
|
+
extend: Flex,
|
|
139
|
+
props: { gap: 'D' },
|
|
140
|
+
|
|
141
|
+
childExtend: BreakpointItem,
|
|
142
|
+
$setStateCollection: ({ state }) => state.breakpoints
|
|
143
|
+
},
|
|
144
|
+
|
|
145
|
+
plusButton: {
|
|
146
|
+
button: {
|
|
147
|
+
extend: SquareButton,
|
|
148
|
+
|
|
149
|
+
props: ({ state }) => ({
|
|
150
|
+
hide: Object.keys(state.breakpoints).length > 2,
|
|
151
|
+
icon: { name: 'plus' },
|
|
152
|
+
padding: 'X2',
|
|
153
|
+
round: '100%',
|
|
154
|
+
border: 'solid, gray4',
|
|
155
|
+
borderWidth: '1px',
|
|
156
|
+
color: 'gray6',
|
|
157
|
+
background: 'transparent'
|
|
158
|
+
}),
|
|
159
|
+
|
|
160
|
+
on: {
|
|
161
|
+
click: (ev, el, s) => {
|
|
162
|
+
const length = Object.keys(s.breakpoints).length
|
|
163
|
+
if (!s.breakpoints || length > 2) return
|
|
164
|
+
s.update({
|
|
165
|
+
breakpoints: { [length]: {} }
|
|
166
|
+
})
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
},
|
|
171
|
+
|
|
172
|
+
hoverButtons: {
|
|
173
|
+
extend: Flex,
|
|
174
|
+
props: {
|
|
175
|
+
margin: '- - - auto'
|
|
176
|
+
},
|
|
177
|
+
childExtend: {
|
|
178
|
+
extend: [ClickableItem, SquareButton],
|
|
179
|
+
props: {
|
|
180
|
+
style: { opacity: '0' }
|
|
181
|
+
}
|
|
182
|
+
},
|
|
183
|
+
...[
|
|
184
|
+
{ props: { icon: 'eyeOpen' } },
|
|
185
|
+
{ props: { icon: 'arrowAngleMirroringHorizontal' } },
|
|
186
|
+
{ props: { icon: 'trashAlt' },
|
|
187
|
+
on: {
|
|
188
|
+
click: (event, element, state) => {
|
|
189
|
+
const { key } = element.parent.parent
|
|
190
|
+
delete state.parent.data[key]
|
|
191
|
+
state.parent.update()
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
]
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
export const mediaQueryList = {
|
|
200
|
+
state: BREAKPOINTS_DATA,
|
|
201
|
+
props: listProps,
|
|
202
|
+
|
|
203
|
+
childExtend: MediaQueryRow,
|
|
204
|
+
$setStateCollection: ({ state }) => state.data
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
const DefaultScreensRow = {
|
|
208
|
+
extend: Flex,
|
|
209
|
+
state: stateCom,
|
|
210
|
+
// state: MEDIA_TYPES,
|
|
211
|
+
class: {
|
|
212
|
+
show: (element, state) => state.activeScreen
|
|
213
|
+
? { opacity: 1 } : { opacity: 0.45 }
|
|
214
|
+
},
|
|
215
|
+
props: ({ el, state }) => ({
|
|
216
|
+
// if () {},
|
|
217
|
+
// hide: state.value !== 'exact' ? el.update({ style: { opacity: '.3' } }) : 'center',
|
|
218
|
+
// hide: state.value !== 'exact',
|
|
219
|
+
// text.
|
|
220
|
+
|
|
221
|
+
minHeight: 'C2',
|
|
222
|
+
padding: '- A - A',
|
|
223
|
+
gap: 'C',
|
|
224
|
+
':not(:last-child)': {
|
|
225
|
+
border: 'solid, white .05',
|
|
226
|
+
borderWidth: '0 0 1px'
|
|
227
|
+
}
|
|
228
|
+
}),
|
|
229
|
+
// class: {
|
|
230
|
+
// show: (element, state) => MEDIA_TYPES.value === 'match'
|
|
231
|
+
// ? { opacity: 0 } : { opacity: 1 }
|
|
232
|
+
// },
|
|
233
|
+
// props: {
|
|
234
|
+
|
|
235
|
+
// // on: {
|
|
236
|
+
// // click: (event, element, state) => {
|
|
237
|
+
// // state.offers
|
|
238
|
+
// // ? state.update({ offers: false })
|
|
239
|
+
// // : state.update({ offers: true })
|
|
240
|
+
// // }
|
|
241
|
+
// // }
|
|
242
|
+
// },
|
|
243
|
+
// on: {
|
|
244
|
+
// change: (ev, el, s) => {
|
|
245
|
+
// s.update({ value: el.node.value })
|
|
246
|
+
// s.stateCom.update({ activeScreen: true })
|
|
247
|
+
// }
|
|
248
|
+
// // click: (ev, el, s) => {
|
|
249
|
+
// // s.update({ activeScreen: true })
|
|
250
|
+
// // }
|
|
251
|
+
// },
|
|
252
|
+
|
|
253
|
+
screen: { extend: screenIconText, style: { minWidth: '150px' } },
|
|
254
|
+
values: {
|
|
255
|
+
extend: Flex,
|
|
256
|
+
props: {
|
|
257
|
+
alignItems: 'center',
|
|
258
|
+
gap: 'X1'
|
|
259
|
+
},
|
|
260
|
+
|
|
261
|
+
valueX: {
|
|
262
|
+
extend: Flex,
|
|
263
|
+
props: valueItemProps,
|
|
264
|
+
text: ({ state }) => state.xValue
|
|
265
|
+
},
|
|
266
|
+
x: { props: { text: 'x' } },
|
|
267
|
+
valueY: {
|
|
268
|
+
extend: Flex,
|
|
269
|
+
props: valueItemProps,
|
|
270
|
+
text: ({ state }) => state.yValue
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
export const screenSizingList = {
|
|
276
|
+
state: DEVICE_SIZE_DATA,
|
|
277
|
+
props: {
|
|
278
|
+
...listProps,
|
|
279
|
+
minWidth: '300px'
|
|
280
|
+
},
|
|
281
|
+
|
|
282
|
+
childExtend: DefaultScreensRow,
|
|
283
|
+
|
|
284
|
+
$setStateCollection: ({ state }) => state.data
|
|
285
|
+
}
|