@symbo.ls/preview 0.0.17 → 0.0.19
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/.symbols/button-download/index.js +1 -1
- package/.symbols/dropdown-list/index.js +0 -6
- package/package.json +2 -5
- package/src/components/ShapeSet.js +2 -1
- package/src/index.js +1 -0
- package/src/pages/Shapes/shapeSet.js +27 -27
- package/src/pages/Spaces/Preview.js +62 -0
- package/src/pages/Spaces/SpacingScale.js +53 -0
- package/src/pages/Spaces/Table.js +206 -0
- package/src/pages/Spaces/__/index copy.js +45 -0
- package/src/pages/Spaces/index.js +14 -36
- package/src/pages/Spaces/state.js +11 -7
- package/index.html +0 -22
- package/protect-pwd.js +0 -65
- /package/src/pages/Spaces/{boxModel.js → __/boxModel.js} +0 -0
- /package/src/pages/Spaces/{preview.js → __/preview.js} +0 -0
- /package/src/pages/Spaces/{sequence.js → __/sequence.js} +0 -0
- /package/src/pages/Spaces/{style.js → __/style.js} +0 -0
package/package.json
CHANGED
|
@@ -2,18 +2,15 @@
|
|
|
2
2
|
"name": "@symbo.ls/preview",
|
|
3
3
|
"description": "",
|
|
4
4
|
"author": "",
|
|
5
|
-
"version": "0.0.
|
|
5
|
+
"version": "0.0.19",
|
|
6
6
|
"repository": "https://github.com/rackai/editor",
|
|
7
7
|
"main": "src/index.js",
|
|
8
8
|
"scripts": {
|
|
9
|
-
"map:copy": "mkdir dist && find dist/ \\( -name \"*.map\" \\) -exec cp {} ./map.json \\;",
|
|
10
9
|
"link:all": "yarn link smbls domql css-in-props @symbo.ls/icons @symbo.ls/config @symbo.ls/components @symbo.ls/scratch @symbo.ls/playground @symbo.ls/utils @symbo.ls/init @symbo.ls/config-default @domql/router @domql/utils @domql/router",
|
|
11
10
|
"prestart": "rm -rf .cache dist",
|
|
12
11
|
"start": "parcel src/dev.html --port 1200 --no-cache",
|
|
13
|
-
"
|
|
14
|
-
"prebuild": "rm -rf dist",
|
|
12
|
+
"prebuild": "rm -rf .cache dist",
|
|
15
13
|
"build": "parcel build index.html",
|
|
16
|
-
"build:protected": "parcel build index.html --no-source-maps --no-content-hash",
|
|
17
14
|
"reinstall": "rm -rf node_modules/@symbo.ls node_modules/@domql node_modules/domql node_modules/smbls dist yarn.lock .cache && yarn"
|
|
18
15
|
},
|
|
19
16
|
"targets": {
|
package/src/index.js
CHANGED
|
@@ -9,14 +9,14 @@ export const rectangle = {
|
|
|
9
9
|
span: 'with rounds'
|
|
10
10
|
},
|
|
11
11
|
nav: [
|
|
12
|
-
{},
|
|
13
|
-
{ _shape: {
|
|
14
|
-
{ _shape: {
|
|
15
|
-
{ _shape: {
|
|
16
|
-
{ _shape: {
|
|
17
|
-
{ _shape: {
|
|
18
|
-
{ _shape: {
|
|
19
|
-
]
|
|
12
|
+
{ _shape: { round: '0' } },
|
|
13
|
+
{ _shape: { round: 'X' } },
|
|
14
|
+
{ _shape: { round: 'Y' } },
|
|
15
|
+
{ _shape: { round: 'Z' } },
|
|
16
|
+
{ _shape: { round: 'A' } },
|
|
17
|
+
{ _shape: { round: 'B' } },
|
|
18
|
+
{ _shape: { round: 'C' } }
|
|
19
|
+
].map(props => ({ props }))
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
export const circle = {
|
|
@@ -36,11 +36,11 @@ export const toolTip = {
|
|
|
36
36
|
},
|
|
37
37
|
|
|
38
38
|
...[
|
|
39
|
-
{ _shape: {
|
|
40
|
-
{ _shape: {
|
|
41
|
-
{ _shape: {
|
|
42
|
-
{ _shape: {
|
|
43
|
-
]
|
|
39
|
+
{ _shape: { shape: 'tooltip', shapeDirection: 'top' } },
|
|
40
|
+
{ _shape: { shape: 'tooltip', shapeDirection: 'right' } },
|
|
41
|
+
{ _shape: { shape: 'tooltip', shapeDirection: 'bottom' } },
|
|
42
|
+
{ _shape: { shape: 'tooltip', shapeDirection: 'left' } }
|
|
43
|
+
].map(props => ({ props }))
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
46
|
|
|
@@ -52,11 +52,11 @@ export const tagShape = {
|
|
|
52
52
|
childExtend: { props: { round: 6 } }
|
|
53
53
|
},
|
|
54
54
|
...[
|
|
55
|
-
{ _shape: {
|
|
56
|
-
{ _shape: {
|
|
57
|
-
{ _shape: {
|
|
58
|
-
{ _shape: {
|
|
59
|
-
]
|
|
55
|
+
{ _shape: { shape: 'tag', shapeDirection: 'left' } },
|
|
56
|
+
{ _shape: { shape: 'tag', shapeDirection: 'top' } },
|
|
57
|
+
{ _shape: { shape: 'tag', shapeDirection: 'right' } },
|
|
58
|
+
{ _shape: { shape: 'tag', shapeDirection: 'bottom' } }
|
|
59
|
+
].map(props => ({ props }))
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
62
|
|
|
@@ -64,13 +64,13 @@ export const bubble = {
|
|
|
64
64
|
extend: ShapeSet,
|
|
65
65
|
label: { text: 'Bubble' },
|
|
66
66
|
nav: [
|
|
67
|
-
{ _shape: {
|
|
68
|
-
{ _shape: {
|
|
69
|
-
{ _shape: {
|
|
70
|
-
{ _shape: {
|
|
71
|
-
{ _shape: {
|
|
72
|
-
{ _shape: {
|
|
73
|
-
{ _shape: {
|
|
74
|
-
{ _shape: {
|
|
75
|
-
]
|
|
67
|
+
{ _shape: { round: 'X B B X' } },
|
|
68
|
+
{ _shape: { round: 'B X X B' } },
|
|
69
|
+
{ _shape: { round: 'X X B B' } },
|
|
70
|
+
{ _shape: { round: 'B B X X' } },
|
|
71
|
+
{ _shape: { round: 'B X X X' } },
|
|
72
|
+
{ _shape: { round: 'X B X X' } },
|
|
73
|
+
{ _shape: { round: 'X X B X' } },
|
|
74
|
+
{ _shape: { round: 'X X X B' } }
|
|
75
|
+
].map(props => ({ props }))
|
|
76
76
|
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
'use strict'
|
|
2
|
+
|
|
3
|
+
import { Grid, Scene } from '@symbo.ls/components'
|
|
4
|
+
|
|
5
|
+
const returnScale = (state, key) => {
|
|
6
|
+
const { scales } = state
|
|
7
|
+
return (scales[state[key]] || 0) + 'em'
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export const Preview = {
|
|
11
|
+
extend: Scene,
|
|
12
|
+
|
|
13
|
+
props: {
|
|
14
|
+
margin: '0 -Z1'
|
|
15
|
+
},
|
|
16
|
+
|
|
17
|
+
scene: {
|
|
18
|
+
boxModel: {
|
|
19
|
+
extend: Grid,
|
|
20
|
+
props: {
|
|
21
|
+
color: 'gray5',
|
|
22
|
+
fontSize: 'Z',
|
|
23
|
+
columns: '30px auto 30px',
|
|
24
|
+
rows: '30px auto 30px',
|
|
25
|
+
templateAreas: `"x1 t x2"
|
|
26
|
+
"l content r"
|
|
27
|
+
"x3 b x4"`,
|
|
28
|
+
alignItems: 'center',
|
|
29
|
+
textAlign: 'center'
|
|
30
|
+
},
|
|
31
|
+
|
|
32
|
+
...[
|
|
33
|
+
...['', { text: (el, s) => s.paddingTop || '', style: { gridArea: 't' } }, ''],
|
|
34
|
+
...[
|
|
35
|
+
{ text: (el, s) => s.paddingLeft || '', style: { gridArea: 'l' } },
|
|
36
|
+
{
|
|
37
|
+
props: ({ state }) => ({
|
|
38
|
+
fontSize: `${state.base}px`,
|
|
39
|
+
borderRadius: state['borderRadius'],
|
|
40
|
+
lineHeight: 1,
|
|
41
|
+
gridArea: 'content',
|
|
42
|
+
borderStyle: 'solid',
|
|
43
|
+
theme: 'quaternary',
|
|
44
|
+
padding: 'X2',
|
|
45
|
+
borderColor: 'grassgreen 0.25',
|
|
46
|
+
borderWidth: [
|
|
47
|
+
returnScale(state, 'paddingTop'),
|
|
48
|
+
returnScale(state, 'paddingRight'),
|
|
49
|
+
returnScale(state, 'paddingBottom'),
|
|
50
|
+
returnScale(state, 'paddingLeft')
|
|
51
|
+
],
|
|
52
|
+
style: { whiteSpace: 'nowrap' }
|
|
53
|
+
}),
|
|
54
|
+
text: (el, s) => `Base ${s.base}`
|
|
55
|
+
}, {
|
|
56
|
+
text: (el, s) => s.paddingRight || '', style: { gridArea: 'r' }
|
|
57
|
+
}],
|
|
58
|
+
...['', { text: (el, s) => s.paddingBottom || '', style: { gridArea: 'b' } }, '']
|
|
59
|
+
]
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
'use strict'
|
|
2
|
+
|
|
3
|
+
import { SequenceSliders, Flex } from '@symbo.ls/components'
|
|
4
|
+
import { Preview } from './Preview'
|
|
5
|
+
import { Table } from './Table'
|
|
6
|
+
|
|
7
|
+
export const SpacingScale = {
|
|
8
|
+
extend: Flex,
|
|
9
|
+
|
|
10
|
+
props: {
|
|
11
|
+
flow: 'column',
|
|
12
|
+
gap: 'C1'
|
|
13
|
+
},
|
|
14
|
+
|
|
15
|
+
sliders: {
|
|
16
|
+
extend: SequenceSliders,
|
|
17
|
+
props: {
|
|
18
|
+
position: 'sticky',
|
|
19
|
+
top: 'D',
|
|
20
|
+
background: 'black .5',
|
|
21
|
+
zIndex: '2',
|
|
22
|
+
margin: '-C -B -B',
|
|
23
|
+
padding: 'C B B',
|
|
24
|
+
style: {
|
|
25
|
+
backdropFilter: 'blur(15px)'
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
|
|
30
|
+
scale: {
|
|
31
|
+
extend: Flex,
|
|
32
|
+
props: {
|
|
33
|
+
flow: 'column',
|
|
34
|
+
gap: 'B1',
|
|
35
|
+
margin: '0 0 C2',
|
|
36
|
+
|
|
37
|
+
table: { flex: 1 },
|
|
38
|
+
preview: { flex: 1 }
|
|
39
|
+
},
|
|
40
|
+
|
|
41
|
+
table: { extend: Table },
|
|
42
|
+
preview: {
|
|
43
|
+
extend: Preview,
|
|
44
|
+
props: {
|
|
45
|
+
position: 'sticky',
|
|
46
|
+
bottom: 'Z',
|
|
47
|
+
style: {
|
|
48
|
+
backdropFilter: 'blur(15px)'
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
'use strict'
|
|
2
|
+
|
|
3
|
+
import { ClickableItem, Grid, Pseudo, WiderButton } from '@symbo.ls/components'
|
|
4
|
+
|
|
5
|
+
import { mapSequence, sortSequence } from '@symbo.ls/utils'
|
|
6
|
+
|
|
7
|
+
const Buttons = {
|
|
8
|
+
childExtend: {
|
|
9
|
+
extend: [ClickableItem, WiderButton],
|
|
10
|
+
props: ({ key, state, parent }) => ({
|
|
11
|
+
isActive: parent.parent.parent.state[key] === state.key,
|
|
12
|
+
padding: 'Z',
|
|
13
|
+
icon: key,
|
|
14
|
+
theme: null,
|
|
15
|
+
'@dark': {
|
|
16
|
+
background: 'gray1',
|
|
17
|
+
color: 'gray5'
|
|
18
|
+
},
|
|
19
|
+
'@light': {
|
|
20
|
+
background: 'white .5',
|
|
21
|
+
color: 'gray7'
|
|
22
|
+
},
|
|
23
|
+
':hover': {
|
|
24
|
+
theme: 'quaternary'
|
|
25
|
+
},
|
|
26
|
+
'.isActive': {
|
|
27
|
+
color: 'blue',
|
|
28
|
+
':hover': {
|
|
29
|
+
color: 'blue'
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}),
|
|
33
|
+
|
|
34
|
+
attr: { title: el => el.key },
|
|
35
|
+
|
|
36
|
+
on: {
|
|
37
|
+
click: (ev, { key, state, parent }) => {
|
|
38
|
+
const parentState = parent.parent.parent.state
|
|
39
|
+
const active = parentState[key] === state.key
|
|
40
|
+
if (active) {
|
|
41
|
+
delete parentState[key] && parentState.update()
|
|
42
|
+
} else {
|
|
43
|
+
parentState.update({ [key]: state.key })
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
|
|
49
|
+
paddingTop: {},
|
|
50
|
+
paddingRight: {},
|
|
51
|
+
paddingBottom: {},
|
|
52
|
+
paddingLeft: {},
|
|
53
|
+
borderRadius: {}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
const Cell = {
|
|
57
|
+
tag: 'div',
|
|
58
|
+
props: {
|
|
59
|
+
padding: 'X2 C2 X2 0'
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
const Row = {
|
|
64
|
+
extend: Grid,
|
|
65
|
+
key: state => state.key,
|
|
66
|
+
|
|
67
|
+
props: ({ state }) => ({
|
|
68
|
+
columns: '10ch 14ch 13ch 10ch 18em 1fr',
|
|
69
|
+
alignItems: 'center',
|
|
70
|
+
isBase: state.index === 0,
|
|
71
|
+
isNotActive: (state.key && state.key.length) !== 1,
|
|
72
|
+
|
|
73
|
+
margin: '0 -A',
|
|
74
|
+
padding: '0 B',
|
|
75
|
+
|
|
76
|
+
'.isNotActive': {
|
|
77
|
+
opacity: 0.8
|
|
78
|
+
},
|
|
79
|
+
'.isBase': {
|
|
80
|
+
opacity: 1,
|
|
81
|
+
background: 'gray1 .5'
|
|
82
|
+
},
|
|
83
|
+
|
|
84
|
+
':hover': {
|
|
85
|
+
background: 'gray1 .65'
|
|
86
|
+
},
|
|
87
|
+
|
|
88
|
+
i: {
|
|
89
|
+
text: state.key,
|
|
90
|
+
isActive: (state.key && state.key.length) === 1,
|
|
91
|
+
isNotActive: (state.key && state.key.length) !== 1,
|
|
92
|
+
|
|
93
|
+
'.isActive': {
|
|
94
|
+
fontWeight: '600',
|
|
95
|
+
'@dark': { color: 'gray9' },
|
|
96
|
+
'@light': { color: 'gray3' }
|
|
97
|
+
},
|
|
98
|
+
'.isNotActive': {
|
|
99
|
+
fontWeight: '400',
|
|
100
|
+
'@dark': { color: 'gray6' },
|
|
101
|
+
'@light': { color: 'gray7' }
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
decimal: {
|
|
105
|
+
text: state.decimal,
|
|
106
|
+
color: 'gray6',
|
|
107
|
+
fontWeight: '300'
|
|
108
|
+
},
|
|
109
|
+
px: {
|
|
110
|
+
text: state.val,
|
|
111
|
+
'@dark': { color: 'gray9' },
|
|
112
|
+
'@light': { color: 'gray3' }
|
|
113
|
+
},
|
|
114
|
+
em: {
|
|
115
|
+
color: 'gray6',
|
|
116
|
+
text: state.scaling + 'em'
|
|
117
|
+
},
|
|
118
|
+
buttons: {
|
|
119
|
+
display: 'flex',
|
|
120
|
+
gap: '.2em',
|
|
121
|
+
opacity: '1',
|
|
122
|
+
':empty': { padding: '0' }
|
|
123
|
+
},
|
|
124
|
+
graph: {
|
|
125
|
+
margin: '0 0 0 -B2',
|
|
126
|
+
line: {
|
|
127
|
+
widthRange: `${state.val}px` || 0,
|
|
128
|
+
height: '2px',
|
|
129
|
+
background: 'blue',
|
|
130
|
+
borderRadius: '2px'
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
}),
|
|
134
|
+
|
|
135
|
+
childExtend: Cell,
|
|
136
|
+
|
|
137
|
+
i: {},
|
|
138
|
+
em: {},
|
|
139
|
+
decimal: {},
|
|
140
|
+
px: {},
|
|
141
|
+
buttons: Buttons,
|
|
142
|
+
|
|
143
|
+
graph: { line: {} }
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
const HeaderRow = {
|
|
147
|
+
extend: Row,
|
|
148
|
+
|
|
149
|
+
childExtend: {
|
|
150
|
+
props: {
|
|
151
|
+
color: 'gray7',
|
|
152
|
+
style: { paddingBlock: '0 .618em' }
|
|
153
|
+
}
|
|
154
|
+
},
|
|
155
|
+
|
|
156
|
+
i: '#',
|
|
157
|
+
em: 'em',
|
|
158
|
+
decimal: 'decimal',
|
|
159
|
+
px: 'px',
|
|
160
|
+
buttons: null,
|
|
161
|
+
graph: null
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
export const Table = {
|
|
165
|
+
extend: Pseudo,
|
|
166
|
+
tag: 'section',
|
|
167
|
+
|
|
168
|
+
props: {
|
|
169
|
+
overflow: 'hidden',
|
|
170
|
+
position: 'relative',
|
|
171
|
+
header: {
|
|
172
|
+
'@dark': { color: 'gray6' },
|
|
173
|
+
'@light': { color: 'gray7' }
|
|
174
|
+
},
|
|
175
|
+
|
|
176
|
+
'::after': {
|
|
177
|
+
content: '""',
|
|
178
|
+
position: 'absolute',
|
|
179
|
+
width: '100%',
|
|
180
|
+
height: '100%',
|
|
181
|
+
top: '0',
|
|
182
|
+
left: '100%'
|
|
183
|
+
},
|
|
184
|
+
'@dark': {
|
|
185
|
+
color: 'gray8',
|
|
186
|
+
'::after': {
|
|
187
|
+
background: 'black',
|
|
188
|
+
boxShadow: 'black, 0 0px 50px 50px'
|
|
189
|
+
}
|
|
190
|
+
},
|
|
191
|
+
'@light': {
|
|
192
|
+
color: 'gray3',
|
|
193
|
+
'::after': {
|
|
194
|
+
background: 'gray12',
|
|
195
|
+
boxShadow: 'gray12, 0 0px 50px 50px'
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
},
|
|
199
|
+
|
|
200
|
+
header: HeaderRow,
|
|
201
|
+
|
|
202
|
+
cnt: {
|
|
203
|
+
childExtend: Row,
|
|
204
|
+
$setCollection: (el) => mapSequence(el.state, sortSequence)
|
|
205
|
+
}
|
|
206
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
'use strict'
|
|
2
|
+
|
|
3
|
+
import { SectionHeader } from '@symbo.ls/components'
|
|
4
|
+
|
|
5
|
+
import preview from './preview'
|
|
6
|
+
import sequence from './sequence'
|
|
7
|
+
import boxModel from './boxModel'
|
|
8
|
+
|
|
9
|
+
export const Spaces = {
|
|
10
|
+
key: 'spaces',
|
|
11
|
+
|
|
12
|
+
state: {
|
|
13
|
+
activePage: 'spaces',
|
|
14
|
+
activeTab: 'preview',
|
|
15
|
+
|
|
16
|
+
title: 'Spacing',
|
|
17
|
+
p: 'Unlike typography, component may has the properties of padding, gap, width and rest.'
|
|
18
|
+
},
|
|
19
|
+
|
|
20
|
+
define: { routes: param => param },
|
|
21
|
+
|
|
22
|
+
routes: {
|
|
23
|
+
preview,
|
|
24
|
+
sequence,
|
|
25
|
+
boxModel
|
|
26
|
+
},
|
|
27
|
+
|
|
28
|
+
on: {
|
|
29
|
+
init: (el, s) => {
|
|
30
|
+
var route = window.location.pathname
|
|
31
|
+
var routes = route.slice(1).split('/')
|
|
32
|
+
s.activeTab = routes[1] || s.activeTab
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
|
|
36
|
+
header: {
|
|
37
|
+
extend: SectionHeader
|
|
38
|
+
},
|
|
39
|
+
|
|
40
|
+
preview
|
|
41
|
+
|
|
42
|
+
// page: {
|
|
43
|
+
// content: (el, s) => ({ extend: el.parent.routes[s.activeTab] })
|
|
44
|
+
// }
|
|
45
|
+
}
|
|
@@ -1,45 +1,23 @@
|
|
|
1
1
|
'use strict'
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
import
|
|
6
|
-
import sequence from './sequence'
|
|
7
|
-
import boxModel from './boxModel'
|
|
3
|
+
import { TypeSection } from '../Typography/shared'
|
|
4
|
+
import { SpacingScale } from './SpacingScale'
|
|
5
|
+
import { state } from './state'
|
|
8
6
|
|
|
9
7
|
export const Spaces = {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
state: {
|
|
13
|
-
activePage: 'spaces',
|
|
14
|
-
activeTab: 'preview',
|
|
15
|
-
|
|
16
|
-
title: 'Spacing',
|
|
17
|
-
p: 'Unlike typography, component may has the properties of padding, gap, width and rest.'
|
|
18
|
-
},
|
|
19
|
-
|
|
20
|
-
define: { routes: param => param },
|
|
21
|
-
|
|
22
|
-
routes: {
|
|
23
|
-
preview,
|
|
24
|
-
sequence,
|
|
25
|
-
boxModel
|
|
26
|
-
},
|
|
27
|
-
|
|
28
|
-
on: {
|
|
29
|
-
init: (el, s) => {
|
|
30
|
-
var route = window.location.pathname
|
|
31
|
-
var routes = route.slice(1).split('/')
|
|
32
|
-
s.activeTab = routes[1] || s.activeTab
|
|
33
|
-
}
|
|
34
|
-
},
|
|
8
|
+
extend: TypeSection,
|
|
9
|
+
state,
|
|
35
10
|
|
|
36
11
|
header: {
|
|
37
|
-
|
|
12
|
+
state: {
|
|
13
|
+
title: 'Spacing',
|
|
14
|
+
p: 'Unlike typography, component may has the properties of padding, gap, width and rest.'
|
|
15
|
+
}
|
|
38
16
|
},
|
|
39
17
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
// page: {
|
|
43
|
-
// content: (el, s) => ({ extend: el.parent.routes[s.activeTab] })
|
|
44
|
-
// }
|
|
18
|
+
SpacingScale
|
|
45
19
|
}
|
|
20
|
+
|
|
21
|
+
// preview,
|
|
22
|
+
// sequence,
|
|
23
|
+
// boxModel
|
|
@@ -1,9 +1,8 @@
|
|
|
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
|
|
5
|
+
export const state = {
|
|
7
6
|
tabs: [{
|
|
8
7
|
key: 0,
|
|
9
8
|
name: 'Default'
|
|
@@ -11,8 +10,13 @@ export default {
|
|
|
11
10
|
key: 1,
|
|
12
11
|
name: 'Font Size'
|
|
13
12
|
}],
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
13
|
+
|
|
14
|
+
base: SPACING.base,
|
|
15
|
+
ratio: SPACING.ratio,
|
|
16
|
+
subSequence: true,
|
|
17
|
+
range: [-5, +12],
|
|
18
|
+
scales: {},
|
|
19
|
+
sequence: {},
|
|
20
|
+
vars: {},
|
|
21
|
+
type: 'spacing-scale'
|
|
18
22
|
}
|
package/index.html
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
<html background="#000">
|
|
2
|
-
<head>
|
|
3
|
-
<title>Symbols Editor</title>
|
|
4
|
-
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no">
|
|
5
|
-
<meta name="apple-mobile-web-app-capable" content="yes">
|
|
6
|
-
|
|
7
|
-
<meta charset="UTF-8">
|
|
8
|
-
|
|
9
|
-
<meta name="author" content="SymbolsApp">
|
|
10
|
-
<meta name="keywords" content="UIkit, Design System, Platform, Javascript, CSS, Less, Sass, Component, React, Angular, Vue, Svelte, HTML, Haml, Jade, Bootstrap, Semantic UI, Material, ">
|
|
11
|
-
<meta name="description" content="Introducing a highly customizable UI kit to decorate your app from scratch. Our space shares all the tools and supplies to design desired components. ">
|
|
12
|
-
|
|
13
|
-
<meta name="apple-mobile-web-app-title" content="Symbols">
|
|
14
|
-
<meta name="apple-mobile-web-app-capable" content="yes">
|
|
15
|
-
<meta name="apple-mobile-web-app-status-bar-style" content="default">
|
|
16
|
-
|
|
17
|
-
<link rel="manifest" href="./app.webmanifest" crossorigin="use-credentials">
|
|
18
|
-
</head>
|
|
19
|
-
<body>
|
|
20
|
-
<script src="./protect-pwd.js"></script>
|
|
21
|
-
</body>
|
|
22
|
-
</html>
|
package/protect-pwd.js
DELETED
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
|
|
3
|
-
import './src/config'
|
|
4
|
-
|
|
5
|
-
import DOM from 'domql'
|
|
6
|
-
import App from './src/app'
|
|
7
|
-
import { getCookie, setCookie } from 'domql/packages/cookie'
|
|
8
|
-
|
|
9
|
-
const KEY = '9EC6CB2A5122F61B0A5E4211B6C1F8E5F3708E0276DA2F23159AE7987EE74298'
|
|
10
|
-
const KEY2 = 'F6CC5B085B61387AC2C125BD1289137D02BC58A07AF9A766FA0DE45E0E5066F8'
|
|
11
|
-
|
|
12
|
-
async function sha256 (message) {
|
|
13
|
-
const msgBuffer = new TextEncoder('utf-8').encode(message)
|
|
14
|
-
const hashBuffer = await window.crypto.subtle.digest('SHA-256', msgBuffer)
|
|
15
|
-
const hashArray = Array.from(new Uint8Array(hashBuffer))
|
|
16
|
-
const hashHex = hashArray.map(b => ('00' + b.toString(16)).slice(-2)).join('')
|
|
17
|
-
return hashHex
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
const protect = {
|
|
21
|
-
style: {
|
|
22
|
-
position: 'absolute',
|
|
23
|
-
left: '50%',
|
|
24
|
-
top: '50%',
|
|
25
|
-
width: '45%',
|
|
26
|
-
minWidth: 300,
|
|
27
|
-
transform: 'translate3d(-50%, -50%, 1px)',
|
|
28
|
-
fontSize: 18,
|
|
29
|
-
color: 'black',
|
|
30
|
-
background: 'white',
|
|
31
|
-
padding: 26
|
|
32
|
-
},
|
|
33
|
-
|
|
34
|
-
label: {
|
|
35
|
-
tag: 'label',
|
|
36
|
-
div: 'Password Protected',
|
|
37
|
-
input: {
|
|
38
|
-
tag: 'input',
|
|
39
|
-
attr: { type: 'password', autofocus: true },
|
|
40
|
-
style: {
|
|
41
|
-
padding: 10,
|
|
42
|
-
marginTop: 10,
|
|
43
|
-
width: '100%'
|
|
44
|
-
},
|
|
45
|
-
on: {
|
|
46
|
-
keyup: (event, element) => {
|
|
47
|
-
var { node } = element
|
|
48
|
-
var { value } = node
|
|
49
|
-
sha256(value).then(hash => {
|
|
50
|
-
var passph = hash.toUpperCase()
|
|
51
|
-
if (passph === KEY || passph === KEY2) {
|
|
52
|
-
setCookie('hash', passph, 3)
|
|
53
|
-
protect.remove()
|
|
54
|
-
DOM.create(App)
|
|
55
|
-
}
|
|
56
|
-
})
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
const hash = getCookie('hash')
|
|
64
|
-
if (hash === KEY || hash === KEY2) DOM.create(App)
|
|
65
|
-
else DOM.create(protect)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|