@symbo.ls/preview 0.0.35 → 0.0.36
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 +1 -1
- package/src/app.js +5 -3
- package/src/pages/DesignSystem/index.js +65 -34
- package/src/pages/Export/scene.js +6 -0
- package/src/pages/MediaQuery/index.js +12 -0
- package/src/pages/MediaQuery/state.js +5 -0
- package/src/pages/MediaQuery/typeScale.js +69 -0
- package/src/pages/Spaces/Preview.js +2 -1
- package/src/pages/Typography/index.js +1 -1
- package/src/pages/index.js +2 -0
package/package.json
CHANGED
package/src/app.js
CHANGED
|
@@ -18,9 +18,11 @@ const SUB_ROUTES = {}
|
|
|
18
18
|
Object.keys(DesignSystem.routes).map(route => {
|
|
19
19
|
SUB_ROUTES[route] = {
|
|
20
20
|
extend: DesignSystem,
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
page: {
|
|
22
|
+
sidebar: {},
|
|
23
|
+
main: {
|
|
24
|
+
extend: DesignSystem.routes[route]
|
|
25
|
+
}
|
|
24
26
|
},
|
|
25
27
|
__filepath: 'pages/index.js'
|
|
26
28
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
'use strict'
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { router } from '@domql/router'
|
|
4
|
+
import { ClickableItem, Flex, Link, ResponsivePreview, SquareButton } from '@symbo.ls/components'
|
|
4
5
|
import { PageExtend,
|
|
5
6
|
Color,
|
|
6
7
|
Theme,
|
|
@@ -8,7 +9,8 @@ import { PageExtend,
|
|
|
8
9
|
Spaces,
|
|
9
10
|
Icons,
|
|
10
11
|
Typography,
|
|
11
|
-
Fonts
|
|
12
|
+
Fonts,
|
|
13
|
+
MediaQuery
|
|
12
14
|
} from '..'
|
|
13
15
|
|
|
14
16
|
const NAV = [{
|
|
@@ -49,7 +51,7 @@ const NAV = [{
|
|
|
49
51
|
}, {
|
|
50
52
|
props: {
|
|
51
53
|
icon: 'device mobile half fill',
|
|
52
|
-
href: '/
|
|
54
|
+
href: '/media-query',
|
|
53
55
|
opacity: '.7'
|
|
54
56
|
}
|
|
55
57
|
}, {
|
|
@@ -65,15 +67,12 @@ const NAV = [{
|
|
|
65
67
|
}]
|
|
66
68
|
|
|
67
69
|
export const DesignSystem = {
|
|
68
|
-
extend: PageExtend,
|
|
69
|
-
|
|
70
70
|
props: {
|
|
71
71
|
maxWidth: '100%',
|
|
72
72
|
width: '100%',
|
|
73
|
-
flow: '
|
|
74
|
-
|
|
75
|
-
gap: 'B1'
|
|
76
|
-
padding: 'D2 A B1'
|
|
73
|
+
flow: 'column',
|
|
74
|
+
padding: '- - C1',
|
|
75
|
+
gap: 'B1'
|
|
77
76
|
},
|
|
78
77
|
|
|
79
78
|
define: { routes: param => param },
|
|
@@ -85,43 +84,75 @@ export const DesignSystem = {
|
|
|
85
84
|
'/fonts': Fonts,
|
|
86
85
|
'/space': Spaces,
|
|
87
86
|
'/shape': Shapes,
|
|
88
|
-
'/icons': Icons
|
|
87
|
+
'/icons': Icons,
|
|
88
|
+
'/media-query': MediaQuery
|
|
89
89
|
// '/sequence': Sequence,
|
|
90
90
|
// '/timing': Timing,
|
|
91
|
-
// '/media-query': MediaQuery
|
|
92
91
|
},
|
|
93
92
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
extend: Flex,
|
|
97
|
-
childExtend: {
|
|
98
|
-
extend: [ClickableItem, Link, SquareButton],
|
|
99
|
-
props: ({ props }) => ({
|
|
100
|
-
active: props.href === window.location.pathname,
|
|
101
|
-
theme: null
|
|
102
|
-
})
|
|
103
|
-
},
|
|
93
|
+
page: {
|
|
94
|
+
extend: PageExtend,
|
|
104
95
|
|
|
105
96
|
props: {
|
|
97
|
+
maxWidth: '100%',
|
|
98
|
+
width: '100%',
|
|
99
|
+
flow: 'row',
|
|
100
|
+
align: 'flex-start flex-start',
|
|
106
101
|
gap: 'B1',
|
|
107
|
-
|
|
108
|
-
background: 'transparent',
|
|
109
|
-
color: 'gray7',
|
|
110
|
-
fontSize: 'A2',
|
|
111
|
-
position: 'sticky',
|
|
112
|
-
top: 'E'
|
|
102
|
+
padding: 'D2 A B1'
|
|
113
103
|
},
|
|
114
104
|
|
|
115
|
-
|
|
116
|
-
|
|
105
|
+
sidebar: {
|
|
106
|
+
tag: 'nav',
|
|
107
|
+
extend: Flex,
|
|
108
|
+
childExtend: {
|
|
109
|
+
extend: [ClickableItem, Link, SquareButton],
|
|
110
|
+
props: ({ props }) => ({
|
|
111
|
+
active: props.href === window.location.pathname,
|
|
112
|
+
theme: null
|
|
113
|
+
})
|
|
114
|
+
},
|
|
117
115
|
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
116
|
+
props: {
|
|
117
|
+
gap: 'B1',
|
|
118
|
+
flow: 'column',
|
|
119
|
+
background: 'transparent',
|
|
120
|
+
color: 'gray7',
|
|
121
|
+
fontSize: 'A2',
|
|
122
|
+
position: 'sticky',
|
|
123
|
+
top: 'E'
|
|
124
|
+
},
|
|
125
|
+
|
|
126
|
+
...NAV
|
|
127
|
+
},
|
|
128
|
+
|
|
129
|
+
main: {
|
|
130
|
+
tag: 'section',
|
|
131
|
+
extend: PageExtend,
|
|
121
132
|
|
|
133
|
+
props: {
|
|
134
|
+
flex: 1,
|
|
135
|
+
padding: '0 C1 B1'
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
},
|
|
139
|
+
|
|
140
|
+
widget: {
|
|
122
141
|
props: {
|
|
123
|
-
|
|
124
|
-
|
|
142
|
+
padding: 'C B1 - B1'
|
|
143
|
+
},
|
|
144
|
+
|
|
145
|
+
define: { routes: param => param },
|
|
146
|
+
routes: {
|
|
147
|
+
'/media-query': ResponsivePreview
|
|
148
|
+
},
|
|
149
|
+
|
|
150
|
+
on: {
|
|
151
|
+
render: element => {
|
|
152
|
+
const { pathname, hash } = window.location
|
|
153
|
+
const url = pathname + hash
|
|
154
|
+
router(element, url, {})
|
|
155
|
+
}
|
|
125
156
|
}
|
|
126
157
|
}
|
|
127
158
|
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
'use strict'
|
|
2
|
+
|
|
3
|
+
import state from './state'
|
|
4
|
+
|
|
5
|
+
export const MediaQuery = {
|
|
6
|
+
state,
|
|
7
|
+
|
|
8
|
+
SectionHeader: {
|
|
9
|
+
title: 'Responsive',
|
|
10
|
+
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.'
|
|
11
|
+
}
|
|
12
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
'use strict'
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
TestText,
|
|
5
|
+
Flex
|
|
6
|
+
} from '@symbo.ls/components'
|
|
7
|
+
|
|
8
|
+
export default {
|
|
9
|
+
extend: Flex,
|
|
10
|
+
|
|
11
|
+
props: {
|
|
12
|
+
gap: 'D',
|
|
13
|
+
align: 'flex-start flex-start',
|
|
14
|
+
|
|
15
|
+
sidebar: {
|
|
16
|
+
padding: 'B 0 0',
|
|
17
|
+
widthRange: 'F2',
|
|
18
|
+
position: 'sticky',
|
|
19
|
+
top: 'E'
|
|
20
|
+
},
|
|
21
|
+
|
|
22
|
+
content: {
|
|
23
|
+
overflow: 'hidden',
|
|
24
|
+
flex: '1',
|
|
25
|
+
flow: 'column',
|
|
26
|
+
gap: 'C',
|
|
27
|
+
|
|
28
|
+
header: {
|
|
29
|
+
align: 'flex-end space-between',
|
|
30
|
+
padding: '0 0 0 C',
|
|
31
|
+
gap: 'C1'
|
|
32
|
+
},
|
|
33
|
+
|
|
34
|
+
footer: {
|
|
35
|
+
padding: '0 0 0 C'
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
|
|
40
|
+
sidebar: {
|
|
41
|
+
SectionHeader: {
|
|
42
|
+
title: 'TypeScale',
|
|
43
|
+
p: 'Generate text sequence by a base size and ratio'
|
|
44
|
+
},
|
|
45
|
+
|
|
46
|
+
SequenceSliders: {
|
|
47
|
+
flow: 'column'
|
|
48
|
+
},
|
|
49
|
+
|
|
50
|
+
Paragraph: {
|
|
51
|
+
margin: '0',
|
|
52
|
+
fontSize: 'Z2',
|
|
53
|
+
padding: 'B2 0',
|
|
54
|
+
text: `Base size and ratio sequentially generate set by multiplying each next calculated unit by the ratio.`
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
|
|
58
|
+
content: {
|
|
59
|
+
extend: Flex,
|
|
60
|
+
|
|
61
|
+
header: {
|
|
62
|
+
extend: Flex,
|
|
63
|
+
TestText
|
|
64
|
+
},
|
|
65
|
+
|
|
66
|
+
sequence: {
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|