@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
|
@@ -1,61 +1,37 @@
|
|
|
1
1
|
'use strict'
|
|
2
2
|
|
|
3
|
-
import style from './style'
|
|
4
|
-
|
|
5
|
-
import { Link, TabHeader } from '@symbo.ls/all'
|
|
6
|
-
import { PageProto } from '..'
|
|
7
|
-
|
|
8
|
-
import preview from './preview'
|
|
9
3
|
import sequence from './sequence'
|
|
10
|
-
import
|
|
11
|
-
|
|
12
|
-
export default {
|
|
13
|
-
style,
|
|
14
|
-
key: 'spaces',
|
|
4
|
+
import { state } from './state'
|
|
15
5
|
|
|
16
|
-
|
|
6
|
+
export const Spaces = {
|
|
7
|
+
state,
|
|
17
8
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
9
|
+
SectionHeader: {
|
|
10
|
+
margin: '0 0 C',
|
|
11
|
+
title: 'Spacing',
|
|
12
|
+
p: 'Unlike typography, component may has the properties of padding, gap, width and rest.'
|
|
21
13
|
},
|
|
22
14
|
|
|
23
|
-
|
|
15
|
+
SlidersWithResponsive: {},
|
|
24
16
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
boxModel
|
|
29
|
-
},
|
|
17
|
+
Line: {},
|
|
18
|
+
|
|
19
|
+
sequence,
|
|
30
20
|
|
|
31
21
|
on: {
|
|
32
22
|
init: (el, s) => {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
header: {
|
|
40
|
-
proto: TabHeader,
|
|
41
|
-
style: {
|
|
42
|
-
margin: `${42 / 16}em -2em 2em -2em`,
|
|
43
|
-
paddingLeft: '2em'
|
|
23
|
+
if (!s.__system.SPACING) {
|
|
24
|
+
s.systemUpdate({
|
|
25
|
+
SPACING: { base: s.base, ratio: s.ratio }
|
|
26
|
+
}, { preventUpdate: true })
|
|
27
|
+
}
|
|
44
28
|
},
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
},
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
// sequence: { props: { text: 'Sequence' } },
|
|
52
|
-
// boxModel: { props: { text: 'Box Model' } }
|
|
29
|
+
stateUpdated: (el, s, changes) => {
|
|
30
|
+
s.systemUpdate({
|
|
31
|
+
SPACING: { base: s.base, ratio: s.ratio }
|
|
32
|
+
}, {
|
|
33
|
+
preventUpdate: true
|
|
34
|
+
})
|
|
53
35
|
}
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
preview
|
|
57
|
-
|
|
58
|
-
// page: {
|
|
59
|
-
// content: (el, s) => ({ proto: el.parent.routes[s.activeTab] })
|
|
60
|
-
// }
|
|
36
|
+
}
|
|
61
37
|
}
|
|
@@ -1,3 +1,32 @@
|
|
|
1
1
|
'use strict'
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
import { Flex } from '@symbo.ls/components'
|
|
4
|
+
|
|
5
|
+
export default {
|
|
6
|
+
extend: [Flex],
|
|
7
|
+
|
|
8
|
+
props: {
|
|
9
|
+
lazyLoad: true,
|
|
10
|
+
flow: 'column',
|
|
11
|
+
gap: 'C1'
|
|
12
|
+
},
|
|
13
|
+
|
|
14
|
+
SectionHeader: {
|
|
15
|
+
title: 'Sequence',
|
|
16
|
+
p: 'Spacing scale is a set of values that are used to define the padding, margin, gap and width of components.',
|
|
17
|
+
margin: '0'
|
|
18
|
+
},
|
|
19
|
+
|
|
20
|
+
Flex: {
|
|
21
|
+
props: {
|
|
22
|
+
lazyLoad: true,
|
|
23
|
+
flow: 'column',
|
|
24
|
+
gap: 'B1',
|
|
25
|
+
|
|
26
|
+
table: { flex: 1 },
|
|
27
|
+
preview: { flex: 1 }
|
|
28
|
+
},
|
|
29
|
+
|
|
30
|
+
SpacingTable: {}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
@@ -1,18 +1,16 @@
|
|
|
1
1
|
'use strict'
|
|
2
2
|
|
|
3
|
-
import { SPACING } from '@symbo.ls/
|
|
4
|
-
import { TYPOGRAPHY_SEQUENCE } from '../Export/const'
|
|
3
|
+
import { SPACING } from '@symbo.ls/scratch'
|
|
5
4
|
|
|
6
|
-
export
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
currentFontSizeIndex: 3
|
|
5
|
+
export const state = {
|
|
6
|
+
base: SPACING.base,
|
|
7
|
+
ratio: SPACING.ratio,
|
|
8
|
+
subSequence: true,
|
|
9
|
+
range: [-5, +12],
|
|
10
|
+
scales: {},
|
|
11
|
+
sequence: {},
|
|
12
|
+
vars: {},
|
|
13
|
+
type: 'spacing-scale',
|
|
14
|
+
|
|
15
|
+
props: {}
|
|
18
16
|
}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
'use strict'
|
|
2
|
+
|
|
3
|
+
import { Input, Flex, CommonField } from '@symbo.ls/components'
|
|
4
|
+
|
|
5
|
+
const sideBar = {
|
|
6
|
+
tag: 'aside'
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export const State = {
|
|
10
|
+
sideBar,
|
|
11
|
+
|
|
12
|
+
form: {
|
|
13
|
+
extend: Flex,
|
|
14
|
+
|
|
15
|
+
props: {
|
|
16
|
+
flow: 'column',
|
|
17
|
+
gap: 'A2',
|
|
18
|
+
margin: 'C1 - -',
|
|
19
|
+
width: 'G2'
|
|
20
|
+
},
|
|
21
|
+
|
|
22
|
+
childExtend: {
|
|
23
|
+
extend: CommonField,
|
|
24
|
+
|
|
25
|
+
element: {
|
|
26
|
+
on: {
|
|
27
|
+
input: (ev, el, s) => {
|
|
28
|
+
const rootState = el.__root.state
|
|
29
|
+
const obj = {
|
|
30
|
+
STATE: { [el.parent.key]: el.node.value }
|
|
31
|
+
}
|
|
32
|
+
rootState.update({ SYSTEM: obj })
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
|
|
38
|
+
websiteTitle: {
|
|
39
|
+
title: 'Title',
|
|
40
|
+
element: {
|
|
41
|
+
extend: Input
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
|
|
45
|
+
websiteDesc: {
|
|
46
|
+
title: 'Description',
|
|
47
|
+
element: {
|
|
48
|
+
extend: Input
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
|
|
52
|
+
websiteTags: {
|
|
53
|
+
title: 'Tags',
|
|
54
|
+
element: {
|
|
55
|
+
extend: Input
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
|
|
59
|
+
headline: {
|
|
60
|
+
title: 'Headline',
|
|
61
|
+
element: {
|
|
62
|
+
extend: Input
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
|
|
66
|
+
paragraph: {
|
|
67
|
+
title: 'Paragraph',
|
|
68
|
+
element: {
|
|
69
|
+
extend: Input
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
|
|
73
|
+
bookNowUrl: {
|
|
74
|
+
title: 'Book now URL:',
|
|
75
|
+
element: {
|
|
76
|
+
extend: Input
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
|
|
81
|
+
on: {
|
|
82
|
+
stateUpdated: (el, s) => {
|
|
83
|
+
s.systemUpdate({ STATE: s.parse })
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use strict'
|
|
2
2
|
|
|
3
|
-
import { CommonField,
|
|
3
|
+
import { CommonField, SelectField } from '@symbo.ls/components'
|
|
4
4
|
|
|
5
5
|
export const friendTheme = {
|
|
6
|
-
|
|
6
|
+
extend: CommonField,
|
|
7
7
|
style: { paddingBlock: 0 },
|
|
8
8
|
caption: {
|
|
9
9
|
tag: 'h6',
|
|
@@ -11,7 +11,7 @@ export const friendTheme = {
|
|
|
11
11
|
style: { opacity: 1, fontWeight: 'normal', margin: 0 }
|
|
12
12
|
},
|
|
13
13
|
element: {
|
|
14
|
-
|
|
14
|
+
extend: SelectField,
|
|
15
15
|
style: {
|
|
16
16
|
background: 'transparent',
|
|
17
17
|
paddingLeft: 0,
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
'use strict'
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
PageTemplate,
|
|
5
|
+
Button,
|
|
6
|
+
Flex,
|
|
7
|
+
SectionHeader,
|
|
8
|
+
AccessibilityCheck,
|
|
9
|
+
SceneThemingBar,
|
|
10
|
+
Pseudo,
|
|
11
|
+
CommonField
|
|
12
|
+
} from '@symbo.ls/components'
|
|
13
|
+
|
|
14
|
+
import preview from './preview'
|
|
15
|
+
// import { themingTools } from './themingTools'
|
|
16
|
+
// import { interactivity } from './interactivity'
|
|
17
|
+
// import { friendTheme } from './friendTheme'
|
|
18
|
+
|
|
19
|
+
import style from './style'
|
|
20
|
+
|
|
21
|
+
const ThemeNameField = {
|
|
22
|
+
tag: 'label',
|
|
23
|
+
attr: { for: 'name-it' },
|
|
24
|
+
extend: CommonField,
|
|
25
|
+
|
|
26
|
+
props: ({ state }) => ({
|
|
27
|
+
gap: '0',
|
|
28
|
+
|
|
29
|
+
title: {
|
|
30
|
+
text: 'Name the theme'
|
|
31
|
+
},
|
|
32
|
+
|
|
33
|
+
element: {
|
|
34
|
+
whiteSpace: 'nowrap',
|
|
35
|
+
minWidth: 'C1',
|
|
36
|
+
maxWidth: 'fit-content',
|
|
37
|
+
outline: 'none',
|
|
38
|
+
fontSize: 'E',
|
|
39
|
+
|
|
40
|
+
border: 'dashed, gray5',
|
|
41
|
+
borderWidth: '0 0 1px',
|
|
42
|
+
|
|
43
|
+
text: (el, s) => s.themeName,
|
|
44
|
+
|
|
45
|
+
':empty::before': {
|
|
46
|
+
content: '"You name it"',
|
|
47
|
+
color: 'gray5'
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}),
|
|
51
|
+
|
|
52
|
+
title: {},
|
|
53
|
+
element: {
|
|
54
|
+
extend: Pseudo,
|
|
55
|
+
attr: { contentEditable: true, id: 'name-it' }
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
const footer = { //eslint-disable-line
|
|
60
|
+
extend: [Flex],
|
|
61
|
+
props: {
|
|
62
|
+
height: 'C2',
|
|
63
|
+
padding: '0 A'
|
|
64
|
+
},
|
|
65
|
+
style: {
|
|
66
|
+
margin: 'auto -80px 0',
|
|
67
|
+
justifyContent: 'space-between',
|
|
68
|
+
alignItems: 'center'
|
|
69
|
+
},
|
|
70
|
+
nav: {
|
|
71
|
+
extend: [Flex],
|
|
72
|
+
props: { gap: 'A' },
|
|
73
|
+
childExtend: {
|
|
74
|
+
extend: [Button],
|
|
75
|
+
props: {
|
|
76
|
+
size: 'Z',
|
|
77
|
+
width: 'B2',
|
|
78
|
+
height: 'B2',
|
|
79
|
+
theme: 'transparent'
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
...[
|
|
83
|
+
{ props: { icon: 'starOutline' } },
|
|
84
|
+
{ props: { icon: 'copyOutline' } },
|
|
85
|
+
{ props: { icon: 'share' } }
|
|
86
|
+
]
|
|
87
|
+
},
|
|
88
|
+
span: {
|
|
89
|
+
props: {
|
|
90
|
+
text: 'Autosaved 1 second ago',
|
|
91
|
+
size: 'Y'
|
|
92
|
+
},
|
|
93
|
+
style: { opacity: '.35' }
|
|
94
|
+
},
|
|
95
|
+
|
|
96
|
+
export: {
|
|
97
|
+
extend: Flex,
|
|
98
|
+
style: {
|
|
99
|
+
alignItems: 'center'
|
|
100
|
+
},
|
|
101
|
+
span: {
|
|
102
|
+
props: {
|
|
103
|
+
text: 'Export:',
|
|
104
|
+
size: 'Y',
|
|
105
|
+
padding: '0 B1 0 0'
|
|
106
|
+
},
|
|
107
|
+
style: { opacity: '.35' }
|
|
108
|
+
},
|
|
109
|
+
nav: {
|
|
110
|
+
extend: [Flex],
|
|
111
|
+
props: { gap: 'Y2' },
|
|
112
|
+
childExtend: {
|
|
113
|
+
extend: [Button],
|
|
114
|
+
props: {
|
|
115
|
+
size: 'Z',
|
|
116
|
+
width: 'B2',
|
|
117
|
+
height: 'B2',
|
|
118
|
+
theme: 'transparent'
|
|
119
|
+
},
|
|
120
|
+
style: {
|
|
121
|
+
color: 'white'
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
...[
|
|
125
|
+
{ props: { icon: 'themeOutline' } },
|
|
126
|
+
{ props: { icon: 'sketch' } },
|
|
127
|
+
{ props: { icon: 'arrowAngleMirroringHorizontal' } }
|
|
128
|
+
]
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
export const Theme = {
|
|
134
|
+
key: 'ColorEditor',
|
|
135
|
+
|
|
136
|
+
extend: PageTemplate,
|
|
137
|
+
|
|
138
|
+
style,
|
|
139
|
+
|
|
140
|
+
state: {
|
|
141
|
+
sceneTheme: 'dark',
|
|
142
|
+
title: 'Typography',
|
|
143
|
+
p: 'A general configuration of type properties on the document.'
|
|
144
|
+
},
|
|
145
|
+
|
|
146
|
+
on: {
|
|
147
|
+
init: (el, s) => {
|
|
148
|
+
if (!s.__system) return
|
|
149
|
+
const path = window.location.pathname
|
|
150
|
+
const pathArray = path.split('theme/')
|
|
151
|
+
if (!s.__system) return
|
|
152
|
+
const { THEME } = s.__system
|
|
153
|
+
const themeName = pathArray[1]
|
|
154
|
+
var value = THEME[themeName]
|
|
155
|
+
|
|
156
|
+
if (themeName && value) {
|
|
157
|
+
s.update({
|
|
158
|
+
themeName,
|
|
159
|
+
value
|
|
160
|
+
}, { preventUpdate: true })
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
},
|
|
164
|
+
|
|
165
|
+
header: {
|
|
166
|
+
extend: SectionHeader,
|
|
167
|
+
props: {
|
|
168
|
+
margin: '0 0 B2'
|
|
169
|
+
},
|
|
170
|
+
heading: null,
|
|
171
|
+
ThemeNameField,
|
|
172
|
+
nav: { extend: SceneThemingBar }
|
|
173
|
+
},
|
|
174
|
+
|
|
175
|
+
cnt: {
|
|
176
|
+
extend: Flex,
|
|
177
|
+
props: { gap: 'D' },
|
|
178
|
+
|
|
179
|
+
preview,
|
|
180
|
+
|
|
181
|
+
colorEdit: {
|
|
182
|
+
props: { gap: 'C2', flexFlow: 'column' }
|
|
183
|
+
// themingTools,
|
|
184
|
+
// interactivity,
|
|
185
|
+
// friendTheme
|
|
186
|
+
}
|
|
187
|
+
},
|
|
188
|
+
|
|
189
|
+
check: {
|
|
190
|
+
extend: AccessibilityCheck,
|
|
191
|
+
props: {
|
|
192
|
+
padding: 'E 0 F'
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
// footer
|
|
197
|
+
}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
'use strict'
|
|
2
2
|
|
|
3
|
-
import { Block, Grid, Text,
|
|
3
|
+
import { Block, Grid, Text, SelectField, CommonField } from '@symbo.ls/components'
|
|
4
4
|
|
|
5
5
|
export const interactivity = {
|
|
6
6
|
h6: {
|
|
7
|
-
|
|
7
|
+
extend: [Text, Block],
|
|
8
8
|
props: { text: 'Interactivity', padding: '0 0 Z2 0', size: 'B' },
|
|
9
9
|
style: { fontWeight: 'normal', margin: 0 }
|
|
10
10
|
},
|
|
11
11
|
interactivitySet: {
|
|
12
|
-
|
|
12
|
+
extend: Grid,
|
|
13
13
|
props: {
|
|
14
14
|
columns: 'repeat(4, 1fr)',
|
|
15
15
|
rows: 'repear(2, 1fr)',
|
|
@@ -17,11 +17,11 @@ export const interactivity = {
|
|
|
17
17
|
rowGap: 'A2'
|
|
18
18
|
},
|
|
19
19
|
style: { width: 'fit-content' },
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
childExtend: {
|
|
21
|
+
extend: CommonField,
|
|
22
22
|
props: { padding: 0 },
|
|
23
23
|
element: {
|
|
24
|
-
|
|
24
|
+
extend: SelectField,
|
|
25
25
|
buttons: { ...[{ props: { icon: 'plus' } }] }
|
|
26
26
|
}
|
|
27
27
|
},
|
|
@@ -112,5 +112,4 @@ export const interactivity = {
|
|
|
112
112
|
}
|
|
113
113
|
]
|
|
114
114
|
}
|
|
115
|
-
|
|
116
115
|
}
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
'use strict'
|
|
2
|
+
|
|
3
|
+
import { opacify } from '@symbo.ls/scratch'
|
|
4
|
+
import { Flex, Grid } from '@symbo.ls/components'
|
|
5
|
+
|
|
6
|
+
const classOpacify = (value, opacity) => {
|
|
7
|
+
const { background, backgroundColor, color } = value
|
|
8
|
+
const bg = background || backgroundColor || color
|
|
9
|
+
if (!bg) return
|
|
10
|
+
return { background: opacify(bg, opacity) }
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
const TONES_AMOUNT = 13
|
|
14
|
+
const TONES_ARR = new Array(TONES_AMOUNT).fill(0).map((_, i) => i)
|
|
15
|
+
|
|
16
|
+
const getThemeProperty = (property, value, mod) => {
|
|
17
|
+
const modifier = `@${mod}`
|
|
18
|
+
return value[modifier] && value[modifier][property] ? value[modifier][property] : value[property]
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export const Tones = {
|
|
22
|
+
extend: Grid,
|
|
23
|
+
props: {
|
|
24
|
+
columns: `repeat(${TONES_AMOUNT}, 1fr)`,
|
|
25
|
+
height: 'B',
|
|
26
|
+
round: 'Z',
|
|
27
|
+
overflow: 'hidden'
|
|
28
|
+
},
|
|
29
|
+
childExtend: {
|
|
30
|
+
tag: 'span',
|
|
31
|
+
text: null,
|
|
32
|
+
props: ({ key, state }) => ({
|
|
33
|
+
round: '0',
|
|
34
|
+
transition: 'B defaultBezier',
|
|
35
|
+
transitionProperty: 'color, background',
|
|
36
|
+
background: getThemeProperty('background', state.value, state.sceneTheme),
|
|
37
|
+
opacity: '' + (100 / TONES_AMOUNT * parseInt(key)) / 100
|
|
38
|
+
})
|
|
39
|
+
},
|
|
40
|
+
$setCollection: () => TONES_ARR
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export default {
|
|
44
|
+
tag: 'aside',
|
|
45
|
+
extend: Flex,
|
|
46
|
+
props: {
|
|
47
|
+
flow: 'column'
|
|
48
|
+
},
|
|
49
|
+
|
|
50
|
+
preview: {
|
|
51
|
+
props: (el, s) => ({
|
|
52
|
+
padding: 'X1',
|
|
53
|
+
round: 'Z2',
|
|
54
|
+
theme: `scene @${s.sceneTheme}`,
|
|
55
|
+
style: {
|
|
56
|
+
'&, & *': {
|
|
57
|
+
transition: '165ms cubic-bezier(.29,.67,.51,.97)',
|
|
58
|
+
transitionProperty: 'color, background'
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}),
|
|
62
|
+
scene: {
|
|
63
|
+
props: {
|
|
64
|
+
padding: 'A',
|
|
65
|
+
backgroundPosition: `center`,
|
|
66
|
+
backgroundRepeat: `repeat`,
|
|
67
|
+
backgroundSize: '100px 100px'
|
|
68
|
+
},
|
|
69
|
+
circle: {
|
|
70
|
+
props: (el, s) => ({
|
|
71
|
+
theme: `${s.themeName} @${s.sceneTheme}`,
|
|
72
|
+
flexFlow: 'column',
|
|
73
|
+
flexAlign: 'center center',
|
|
74
|
+
width: 'G',
|
|
75
|
+
aspectRatio: '1 / 1',
|
|
76
|
+
round: '100%',
|
|
77
|
+
position: 'relative',
|
|
78
|
+
borderWidth: '1px',
|
|
79
|
+
borderStyle: 'solid',
|
|
80
|
+
borderColor: 'transparent',
|
|
81
|
+
|
|
82
|
+
h6: {
|
|
83
|
+
fontSize: 'D',
|
|
84
|
+
fontWeight: 'bold',
|
|
85
|
+
gap: 'X'
|
|
86
|
+
}
|
|
87
|
+
}),
|
|
88
|
+
h6: {
|
|
89
|
+
extend: Flex,
|
|
90
|
+
Span: {
|
|
91
|
+
text: 'The',
|
|
92
|
+
fontWeight: 'normal',
|
|
93
|
+
marginRight: '6px'
|
|
94
|
+
},
|
|
95
|
+
text: 'Text Color'
|
|
96
|
+
},
|
|
97
|
+
Span: {
|
|
98
|
+
text: (el, s) => s.themeName,
|
|
99
|
+
position: 'absolute',
|
|
100
|
+
top: '86%',
|
|
101
|
+
left: '50%',
|
|
102
|
+
transform: 'translate(-50%, -50%)',
|
|
103
|
+
fontWeight: '600'
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
|
|
109
|
+
opacity: {
|
|
110
|
+
props: {
|
|
111
|
+
padding: 'B1 0 0 0'
|
|
112
|
+
},
|
|
113
|
+
caption: {
|
|
114
|
+
props: {
|
|
115
|
+
text: 'Opacity',
|
|
116
|
+
size: 'Z',
|
|
117
|
+
padding: '0 0 Z1 0',
|
|
118
|
+
opacity: '.65'
|
|
119
|
+
}
|
|
120
|
+
},
|
|
121
|
+
tones: { extend: Tones }
|
|
122
|
+
},
|
|
123
|
+
|
|
124
|
+
shades: {
|
|
125
|
+
if: () => false,
|
|
126
|
+
props: { padding: 'B 0 0 0' },
|
|
127
|
+
caption: {
|
|
128
|
+
props: {
|
|
129
|
+
text: 'Shades',
|
|
130
|
+
size: 'Z',
|
|
131
|
+
padding: '0 0 Z1 0'
|
|
132
|
+
},
|
|
133
|
+
style: { opacity: '.65' }
|
|
134
|
+
},
|
|
135
|
+
|
|
136
|
+
generate: {
|
|
137
|
+
props: { flexFlow: 'column', round: 'Z', gap: '2px' },
|
|
138
|
+
|
|
139
|
+
childExtend: {
|
|
140
|
+
extend: [Tones],
|
|
141
|
+
props: { round: 'X' },
|
|
142
|
+
...TONES_ARR.map(v => ({
|
|
143
|
+
class: { background: el => classOpacify(el, (100 / TONES_AMOUNT * v) / 100) }
|
|
144
|
+
}))
|
|
145
|
+
},
|
|
146
|
+
|
|
147
|
+
dark: {},
|
|
148
|
+
light: {
|
|
149
|
+
props: { theme: 'lightScene' }
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
}
|
|
@@ -1,22 +1,11 @@
|
|
|
1
1
|
'use strict'
|
|
2
2
|
|
|
3
|
-
export const styleLabel = {
|
|
4
|
-
caption: { whiteSpace: 'nowrap', opacity: 0.65 },
|
|
5
|
-
span: {
|
|
6
|
-
display: 'block',
|
|
7
|
-
whiteSpace: 'nowrap',
|
|
8
|
-
minWidth: `1.618em`,
|
|
9
|
-
maxWidth: 'fit-content',
|
|
10
|
-
borderBottom: '1px dashed rgba(255, 255, 255, .35)',
|
|
11
|
-
outline: 'none'
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
|
|
15
3
|
export const styleTool = {
|
|
16
4
|
caption: { opacity: '.65' },
|
|
17
5
|
'> div span': { opacity: '.5' },
|
|
18
6
|
'> div > div': { gap: '1px' }
|
|
19
7
|
}
|
|
8
|
+
|
|
20
9
|
export const styleColorTones = {
|
|
21
10
|
width: '22em',
|
|
22
11
|
display: 'flex',
|