@symbo.ls/preview 0.0.13 → 0.0.14
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/package.json
CHANGED
package/src/app.js
CHANGED
|
@@ -13,6 +13,7 @@ import {
|
|
|
13
13
|
Export,
|
|
14
14
|
Library
|
|
15
15
|
} from './pages'
|
|
16
|
+
import { Modal, openModal } from '@symbo.ls/components'
|
|
16
17
|
|
|
17
18
|
const SUB_ROUTES = {}
|
|
18
19
|
Object.keys(DesignSystem.routes).map(route => {
|
|
@@ -54,12 +55,15 @@ const App = {
|
|
|
54
55
|
style: { position: 'relative' }
|
|
55
56
|
},
|
|
56
57
|
|
|
58
|
+
Modal,
|
|
59
|
+
|
|
57
60
|
on: {
|
|
58
61
|
render: element => {
|
|
59
62
|
const { pathname, hash } = window.location
|
|
60
63
|
const url = pathname + hash
|
|
61
64
|
router(element, url, {})
|
|
62
65
|
},
|
|
66
|
+
update: (el, s) => openModal(el, s),
|
|
63
67
|
scroll: (ev, el) => {
|
|
64
68
|
const { scrollTop } = el.node
|
|
65
69
|
const isFloating = scrollTop > 0
|
|
@@ -24,7 +24,8 @@ const NAV = [{
|
|
|
24
24
|
}, {
|
|
25
25
|
props: {
|
|
26
26
|
icon: 'space outline',
|
|
27
|
-
href: '/space'
|
|
27
|
+
href: '/space',
|
|
28
|
+
opacity: '.55'
|
|
28
29
|
}
|
|
29
30
|
}, {
|
|
30
31
|
props: {
|
|
@@ -47,7 +48,8 @@ const NAV = [{
|
|
|
47
48
|
}, {
|
|
48
49
|
props: {
|
|
49
50
|
icon: 'device mobile half fill',
|
|
50
|
-
href: '/responsive'
|
|
51
|
+
href: '/responsive',
|
|
52
|
+
opacity: '.55'
|
|
51
53
|
}
|
|
52
54
|
}, {
|
|
53
55
|
props: {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
'use strict'
|
|
2
2
|
|
|
3
|
-
import { SectionHeader } from '@symbo.ls/components'
|
|
3
|
+
import { SectionHeader } from '@symbo.ls/components' // eslint-disable-line no-unused-vars
|
|
4
4
|
|
|
5
5
|
import state from './state'
|
|
6
6
|
|
|
7
7
|
import documentStyle from './docStyles'
|
|
8
|
-
import
|
|
8
|
+
import { TypeScale } from './typeScale'
|
|
9
9
|
|
|
10
10
|
export const Typography = {
|
|
11
11
|
define: { routes: param => param },
|
|
@@ -13,26 +13,15 @@ export const Typography = {
|
|
|
13
13
|
state,
|
|
14
14
|
|
|
15
15
|
routes: {
|
|
16
|
-
'/':
|
|
16
|
+
'/': TypeScale,
|
|
17
17
|
'/document-styles': documentStyle
|
|
18
18
|
},
|
|
19
19
|
|
|
20
|
-
header: {
|
|
21
|
-
|
|
22
|
-
},
|
|
20
|
+
// header: {
|
|
21
|
+
// extend: SectionHeader
|
|
22
|
+
// },
|
|
23
23
|
|
|
24
24
|
page: {
|
|
25
|
-
|
|
26
|
-
const content = el.parent?.routes['/' + s.activeTab]
|
|
27
|
-
return { extend: content }
|
|
28
|
-
}
|
|
29
|
-
},
|
|
30
|
-
|
|
31
|
-
on: {
|
|
32
|
-
init: (el, s) => {
|
|
33
|
-
const route = window.location.pathname
|
|
34
|
-
const routes = route.slice(1).split('/')
|
|
35
|
-
s.activeTab = routes[1] || state.activeTab
|
|
36
|
-
}
|
|
25
|
+
TypeScale
|
|
37
26
|
}
|
|
38
27
|
}
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
'use strict'
|
|
2
2
|
|
|
3
3
|
export default {
|
|
4
|
-
base:
|
|
5
|
-
ratio: 1.
|
|
6
|
-
|
|
7
|
-
range: [-3, +10],
|
|
4
|
+
base: 16,
|
|
5
|
+
ratio: 1.2,
|
|
6
|
+
range: [-3, +8],
|
|
8
7
|
h1Matches: +6,
|
|
8
|
+
scales: {},
|
|
9
9
|
sequence: {},
|
|
10
|
-
|
|
10
|
+
vars: {},
|
|
11
|
+
// subSequence: true,
|
|
12
|
+
type: 'demo-font-size',
|
|
11
13
|
|
|
12
14
|
title: 'Typography',
|
|
13
15
|
p: 'A general configuration of type properties on the document.',
|
|
@@ -1,101 +1,90 @@
|
|
|
1
1
|
'use strict'
|
|
2
2
|
|
|
3
3
|
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
SliderToolWithCaption,
|
|
7
|
-
StaticSpacing,
|
|
8
|
-
PreviewSettings,
|
|
9
|
-
ScalesSequence,
|
|
10
|
-
CommonField
|
|
4
|
+
TypeScaleSequence,
|
|
5
|
+
SequenceSliders
|
|
11
6
|
} from '@symbo.ls/components'
|
|
7
|
+
import { mapSequence, sortSequence } from '@symbo.ls/utils'
|
|
12
8
|
|
|
13
9
|
import { TypeSection } from './shared'
|
|
14
10
|
|
|
15
|
-
const
|
|
16
|
-
extend:
|
|
11
|
+
export const TypeScale = {
|
|
12
|
+
extend: TypeSection,
|
|
17
13
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
14
|
+
header: {
|
|
15
|
+
state: {
|
|
16
|
+
title: 'TypeScale',
|
|
17
|
+
p: 'Generate text sequence by a base size and ratio'
|
|
18
|
+
}
|
|
21
19
|
},
|
|
22
20
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
21
|
+
sliders: { extend: SequenceSliders },
|
|
22
|
+
|
|
23
|
+
p: {
|
|
24
|
+
extend: 'Paragraph',
|
|
25
|
+
props: {
|
|
26
|
+
margin: '0',
|
|
27
|
+
padding: 'B2 0',
|
|
28
|
+
text: `Base size and ratio will sequentially generate set by multiplying each next unit by the ratio.`
|
|
30
29
|
}
|
|
31
30
|
},
|
|
32
31
|
|
|
33
32
|
sequence: {
|
|
34
|
-
extend:
|
|
35
|
-
|
|
36
|
-
element: {
|
|
37
|
-
extend: StaticSpacing,
|
|
38
|
-
spacings: {
|
|
39
|
-
childExtend: {
|
|
40
|
-
on: {
|
|
41
|
-
click: (ev, el, s) => s.update({ ratio: el.value.text })
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
}
|
|
33
|
+
extend: TypeScaleSequence,
|
|
34
|
+
$setCollection: ({ state }) => mapSequence(state, sortSequence)
|
|
46
35
|
}
|
|
47
36
|
}
|
|
48
37
|
|
|
49
|
-
export default {
|
|
50
|
-
|
|
38
|
+
// export default {
|
|
39
|
+
// extend: TypeSection,
|
|
51
40
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
41
|
+
// header: {
|
|
42
|
+
// heading: {
|
|
43
|
+
// p: { props: { text: 'Generate text sequence by a base size and ratio' } }
|
|
44
|
+
// },
|
|
45
|
+
// nav: {
|
|
46
|
+
// add: { props: { icon: 'plus' } }
|
|
47
|
+
// }
|
|
48
|
+
// },
|
|
60
49
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
}
|
|
50
|
+
// wrapper: {
|
|
51
|
+
// textTest: '',
|
|
52
|
+
// fonts: '',
|
|
53
|
+
|
|
54
|
+
// cnt: {
|
|
55
|
+
// extend: [Block, Grid],
|
|
56
|
+
|
|
57
|
+
// props: {
|
|
58
|
+
// gap: 'D',
|
|
59
|
+
// columns: '16em auto'
|
|
60
|
+
// },
|
|
61
|
+
|
|
62
|
+
// aside: ScalingTools,
|
|
63
|
+
|
|
64
|
+
// wrapper: {
|
|
65
|
+
// settings: {
|
|
66
|
+
// extend: PreviewSettings,
|
|
67
|
+
// props: { margin: '0 0 B' }
|
|
68
|
+
// },
|
|
69
|
+
|
|
70
|
+
// fonts: ScalesSequence
|
|
71
|
+
// },
|
|
72
|
+
|
|
73
|
+
// sequenceSet: {
|
|
74
|
+
// extend: CommonField,
|
|
75
|
+
// props: { margin: 'C2 0' },
|
|
76
|
+
// caption: {
|
|
77
|
+
// extend: [Block, Text],
|
|
78
|
+
// props: {
|
|
79
|
+
// text: 'Sizing generated by this setting',
|
|
80
|
+
// padding: '0 0 A 0'
|
|
81
|
+
// }
|
|
82
|
+
// },
|
|
83
|
+
// element: {
|
|
84
|
+
// extend: [SequenceGraph, Block, Text],
|
|
85
|
+
// style: { '> span': { display: 'none' } }
|
|
86
|
+
// }
|
|
87
|
+
// }
|
|
88
|
+
// }
|
|
89
|
+
// }
|
|
90
|
+
// }
|