@symbo.ls/preview 0.0.52 → 0.0.53
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 +3 -4
- package/src/components/Aside.js +53 -0
- package/src/{pages/PageExtend.js → components/Page.js} +1 -1
- package/src/components/Route.js +1 -0
- package/src/components/Widget.js +1 -0
- package/src/components/index.js +5 -0
- package/src/index.js +3 -3
- package/src/pages/Account/index.js +2 -2
- package/src/pages/DesignSystem/index.js +39 -92
- package/src/pages/Export/index.js +2 -2
- package/src/pages/Library/index.js +15 -15
- package/src/pages/index.js +0 -2
- package/src/pages/Library/style.js +0 -36
- /package/{src/pages/Export → .legacy}/_tools_old.js +0 -0
- /package/{src/__ → .legacy}/boxModel.js +0 -0
- /package/{src/__ → .legacy}/index copy.js +0 -0
- /package/{src/__ → .legacy}/preview.js +0 -0
- /package/{src/__ → .legacy}/sequence.js +0 -0
- /package/{src/__ → .legacy}/style.js +0 -0
package/package.json
CHANGED
package/src/app.js
CHANGED
|
@@ -19,12 +19,11 @@ Object.keys(DesignSystem.routes).map(route => {
|
|
|
19
19
|
SUB_ROUTES[route] = {
|
|
20
20
|
extend: DesignSystem,
|
|
21
21
|
page: {
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
DesignSystemNavbar: {},
|
|
23
|
+
Page: {
|
|
24
24
|
extend: DesignSystem.routes[route]
|
|
25
25
|
}
|
|
26
|
-
}
|
|
27
|
-
__filepath: 'pages/index.js'
|
|
26
|
+
}
|
|
28
27
|
}
|
|
29
28
|
})
|
|
30
29
|
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
'use strict'
|
|
2
|
+
|
|
3
|
+
import { Link, ClickableItem, TooltipParent } from '@symbo.ls/components'
|
|
4
|
+
import { Flex, SquareButton } from 'smbls'
|
|
5
|
+
|
|
6
|
+
export const NavbarButton = {
|
|
7
|
+
extend: [ClickableItem, Link, SquareButton, TooltipParent],
|
|
8
|
+
|
|
9
|
+
props: ({ state }) => ({
|
|
10
|
+
href: state.href,
|
|
11
|
+
active: window.location.pathname.includes(state.href),
|
|
12
|
+
theme: null,
|
|
13
|
+
position: 'relative',
|
|
14
|
+
style: {
|
|
15
|
+
'&:hover, &:focus-visible': {
|
|
16
|
+
'& [tooltip]': {
|
|
17
|
+
transform: 'translate3d(0%,-50%,0)'
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}),
|
|
22
|
+
|
|
23
|
+
Tooltip: ({ state }) => ({
|
|
24
|
+
background: 'black .95',
|
|
25
|
+
position: 'absolute',
|
|
26
|
+
pointerEvents: 'none',
|
|
27
|
+
top: '50%',
|
|
28
|
+
left: '100%',
|
|
29
|
+
shape: 'rectangle',
|
|
30
|
+
shapeDirection: null,
|
|
31
|
+
padding: 'X2 Z1',
|
|
32
|
+
transform: 'translate3d(5%, -50%, 0)',
|
|
33
|
+
opacity: '0',
|
|
34
|
+
visibility: 'hidden',
|
|
35
|
+
transition: 'B default-bezier',
|
|
36
|
+
transitionProperty: 'opacity, transform',
|
|
37
|
+
textAlign: 'start',
|
|
38
|
+
zIndex: 9999,
|
|
39
|
+
lineHeight: 1,
|
|
40
|
+
title: {
|
|
41
|
+
fontSize: 'Z',
|
|
42
|
+
text: state.tooltip
|
|
43
|
+
},
|
|
44
|
+
p: { text: null }
|
|
45
|
+
})
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export const DesignSystemNavbar = {
|
|
49
|
+
tag: 'nav',
|
|
50
|
+
extend: Flex,
|
|
51
|
+
|
|
52
|
+
childExtend: NavbarButton
|
|
53
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict'
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict'
|
package/src/components/index.js
CHANGED
package/src/index.js
CHANGED
|
@@ -7,9 +7,9 @@ import style from './style'
|
|
|
7
7
|
|
|
8
8
|
import 'smbls'
|
|
9
9
|
import * as smbls from '@symbo.ls/components'
|
|
10
|
+
import * as components from './components'
|
|
10
11
|
|
|
11
12
|
import App from './app'
|
|
12
|
-
import { Header } from './components'
|
|
13
13
|
import { Library } from './pages'
|
|
14
14
|
import { router, lastLevel } from '@domql/router'
|
|
15
15
|
|
|
@@ -28,13 +28,13 @@ const app = DOM.create({
|
|
|
28
28
|
extend: App,
|
|
29
29
|
style,
|
|
30
30
|
|
|
31
|
-
header: Header,
|
|
31
|
+
header: components.Header,
|
|
32
32
|
routes: {
|
|
33
33
|
'/': Library
|
|
34
34
|
}
|
|
35
35
|
}, undefined, 'app', {
|
|
36
36
|
extend: [smbls.Box],
|
|
37
|
-
components: { ...smbls },
|
|
37
|
+
components: { ...smbls, ...components },
|
|
38
38
|
context
|
|
39
39
|
})
|
|
40
40
|
|
|
@@ -5,7 +5,7 @@ import { Text, Block, Link, SquareButton, Img, ClickableItem, SelectFieldWithCap
|
|
|
5
5
|
|
|
6
6
|
import setUpProject from './setUpProject'
|
|
7
7
|
|
|
8
|
-
import
|
|
8
|
+
import Page from '../Page'
|
|
9
9
|
import { logout } from '@symbo.ls/auth'
|
|
10
10
|
|
|
11
11
|
const sideBar = {
|
|
@@ -217,7 +217,7 @@ const personalAccount = {
|
|
|
217
217
|
}
|
|
218
218
|
|
|
219
219
|
export default {
|
|
220
|
-
extend:
|
|
220
|
+
extend: Page,
|
|
221
221
|
props: {
|
|
222
222
|
flexAlign: 'flex-start flex-start',
|
|
223
223
|
padding: 'C1 0 D1 0',
|
|
@@ -2,23 +2,17 @@
|
|
|
2
2
|
|
|
3
3
|
import { router } from '@domql/router'
|
|
4
4
|
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
ClickableItem,
|
|
8
|
-
Flex,
|
|
9
|
-
Link,
|
|
10
|
-
SquareButton,
|
|
11
|
-
TooltipParent
|
|
12
|
-
} from '@symbo.ls/components'
|
|
5
|
+
import { Flex } from '@symbo.ls/components'
|
|
13
6
|
|
|
14
7
|
import {
|
|
8
|
+
Page,
|
|
15
9
|
ShapePreview,
|
|
16
10
|
ResponsivePreview,
|
|
17
11
|
SpacingPreview
|
|
18
12
|
} from '../../components'
|
|
19
13
|
|
|
14
|
+
import { DesignSystemDashboard } from './Dashboard'
|
|
20
15
|
import {
|
|
21
|
-
PageExtend,
|
|
22
16
|
Color,
|
|
23
17
|
Theme,
|
|
24
18
|
Shapes,
|
|
@@ -120,28 +114,9 @@ export const DesignSystem = {
|
|
|
120
114
|
maxWidth: '100%',
|
|
121
115
|
width: '100%',
|
|
122
116
|
flow: 'column',
|
|
123
|
-
gap: 'B1'
|
|
124
|
-
},
|
|
117
|
+
gap: 'B1',
|
|
125
118
|
|
|
126
|
-
|
|
127
|
-
routes: {
|
|
128
|
-
'/design-system': DesignSystemDashboard,
|
|
129
|
-
'/colors': Color,
|
|
130
|
-
'/theme': Theme,
|
|
131
|
-
'/typography': Typography,
|
|
132
|
-
'/space': Spaces,
|
|
133
|
-
'/shape': Shapes,
|
|
134
|
-
'/fonts': Fonts,
|
|
135
|
-
'/icons': Icons,
|
|
136
|
-
'/media-query': MediaQuery
|
|
137
|
-
// '/sequence': Sequence,
|
|
138
|
-
// '/timing': Timing,
|
|
139
|
-
},
|
|
140
|
-
|
|
141
|
-
page: {
|
|
142
|
-
extend: PageExtend,
|
|
143
|
-
|
|
144
|
-
props: {
|
|
119
|
+
page: {
|
|
145
120
|
maxWidth: '100%',
|
|
146
121
|
width: '100%',
|
|
147
122
|
flow: 'row',
|
|
@@ -150,7 +125,7 @@ export const DesignSystem = {
|
|
|
150
125
|
gap: 'B1',
|
|
151
126
|
padding: 'D2 A C1',
|
|
152
127
|
|
|
153
|
-
|
|
128
|
+
DesignSystemNavbar: {
|
|
154
129
|
gap: 'B1',
|
|
155
130
|
flow: 'column',
|
|
156
131
|
background: 'transparent',
|
|
@@ -160,77 +135,49 @@ export const DesignSystem = {
|
|
|
160
135
|
top: 'E'
|
|
161
136
|
},
|
|
162
137
|
|
|
163
|
-
|
|
138
|
+
Page: {
|
|
139
|
+
padding: 'X2 C1 B1',
|
|
164
140
|
flex: 1
|
|
141
|
+
},
|
|
142
|
+
|
|
143
|
+
widget: {
|
|
144
|
+
padding: 'A',
|
|
145
|
+
position: 'sticky',
|
|
146
|
+
width: '100%',
|
|
147
|
+
zIndex: 9999,
|
|
148
|
+
bottom: '0'
|
|
165
149
|
}
|
|
166
|
-
}
|
|
150
|
+
}
|
|
151
|
+
},
|
|
167
152
|
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
}
|
|
186
|
-
}),
|
|
187
|
-
Tooltip: ({ state }) => ({
|
|
188
|
-
background: 'black .95',
|
|
189
|
-
position: 'absolute',
|
|
190
|
-
pointerEvents: 'none',
|
|
191
|
-
top: '50%',
|
|
192
|
-
left: '100%',
|
|
193
|
-
shape: 'rectangle',
|
|
194
|
-
shapeDirection: null,
|
|
195
|
-
padding: 'X2 Z1',
|
|
196
|
-
transform: 'translate3d(10%, -50%, 0)',
|
|
197
|
-
opacity: '0',
|
|
198
|
-
visibility: 'hidden',
|
|
199
|
-
transition: 'B default-bezier',
|
|
200
|
-
transitionProperty: 'opacity, transform',
|
|
201
|
-
textAlign: 'start',
|
|
202
|
-
zIndex: 9999,
|
|
203
|
-
lineHeight: 1,
|
|
204
|
-
title: {
|
|
205
|
-
fontSize: 'Z',
|
|
206
|
-
text: state.tooltip
|
|
207
|
-
},
|
|
208
|
-
p: { text: null }
|
|
209
|
-
})
|
|
210
|
-
},
|
|
153
|
+
define: { routes: param => param },
|
|
154
|
+
routes: {
|
|
155
|
+
'/design-system': DesignSystemDashboard,
|
|
156
|
+
'/colors': Color,
|
|
157
|
+
'/theme': Theme,
|
|
158
|
+
'/typography': Typography,
|
|
159
|
+
'/space': Spaces,
|
|
160
|
+
'/shape': Shapes,
|
|
161
|
+
'/fonts': Fonts,
|
|
162
|
+
'/icons': Icons,
|
|
163
|
+
'/media-query': MediaQuery
|
|
164
|
+
// '/sequence': Sequence,
|
|
165
|
+
// '/timing': Timing,
|
|
166
|
+
},
|
|
167
|
+
|
|
168
|
+
page: {
|
|
169
|
+
extend: Page,
|
|
211
170
|
|
|
171
|
+
DesignSystemNavbar: {
|
|
172
|
+
props: {},
|
|
212
173
|
...NAV
|
|
213
174
|
},
|
|
214
175
|
|
|
215
|
-
|
|
216
|
-
tag: 'section',
|
|
217
|
-
extend: PageExtend,
|
|
218
|
-
props: {
|
|
219
|
-
padding: 'X2 C1 B1'
|
|
220
|
-
}
|
|
221
|
-
}
|
|
176
|
+
Page: {}
|
|
222
177
|
},
|
|
223
178
|
|
|
224
179
|
widget: {
|
|
225
|
-
|
|
226
|
-
padding: 'A',
|
|
227
|
-
position: 'sticky',
|
|
228
|
-
width: '100%',
|
|
229
|
-
zIndex: 9999,
|
|
230
|
-
bottom: '0'
|
|
231
|
-
},
|
|
232
|
-
|
|
233
|
-
state: ({ parent }) => ({ __ref: parent.page.main.state }),
|
|
180
|
+
state: ({ parent }) => ({ __ref: parent.page.Page.state }),
|
|
234
181
|
|
|
235
182
|
define: { routes: param => param },
|
|
236
183
|
routes: {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import { router, lastLevel } from '@domql/router' // eslint-disable-line no-unused-vars
|
|
4
4
|
|
|
5
5
|
import { Flex } from '@symbo.ls/components'
|
|
6
|
-
import {
|
|
6
|
+
import { Page } from '../../components'
|
|
7
7
|
|
|
8
8
|
import state from './state'
|
|
9
9
|
import scene from './scene'
|
|
@@ -61,7 +61,7 @@ export const Export = {
|
|
|
61
61
|
},
|
|
62
62
|
|
|
63
63
|
cnt: {
|
|
64
|
-
extend: [
|
|
64
|
+
extend: [Page],
|
|
65
65
|
|
|
66
66
|
props: {
|
|
67
67
|
padding: 'Z2 C1 A',
|
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
'use strict'
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { ComponentTemplate } from '@symbo.ls/components'
|
|
4
|
+
import { Page } from '../../components'
|
|
4
5
|
|
|
5
|
-
import { SectionHeader, ComponentTemplate, Grid } from '@symbo.ls/components'
|
|
6
|
-
|
|
7
|
-
import { PageExtend } from '..'
|
|
8
6
|
import { LIBRARY } from '../../../.symbols'
|
|
9
7
|
|
|
10
8
|
export const Library = {
|
|
11
|
-
extend:
|
|
9
|
+
extend: Page,
|
|
12
10
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
title: 'My Symbols',
|
|
17
|
-
p: 'This is the first collection of your components'
|
|
18
|
-
}
|
|
11
|
+
SectionHeader: {
|
|
12
|
+
title: 'My Symbols',
|
|
13
|
+
p: 'This is the first collection of your components'
|
|
19
14
|
},
|
|
20
15
|
|
|
21
|
-
|
|
22
|
-
extend: Grid,
|
|
16
|
+
Grid: {
|
|
23
17
|
props: {
|
|
24
18
|
flex: 1,
|
|
25
|
-
|
|
26
|
-
|
|
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
27
|
},
|
|
28
28
|
|
|
29
29
|
childExtend: ComponentTemplate,
|
package/src/pages/index.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
'use strict'
|
|
2
2
|
|
|
3
|
-
export * from './PageExtend'
|
|
4
3
|
export * from './Components'
|
|
5
4
|
export * from './Export'
|
|
6
5
|
export * from './Fonts'
|
|
@@ -12,5 +11,4 @@ export * from './Shapes'
|
|
|
12
11
|
export * from './Spaces'
|
|
13
12
|
export * from './Typography'
|
|
14
13
|
export * from './MediaQuery'
|
|
15
|
-
|
|
16
14
|
export * from './DesignSystem'
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
|
|
3
|
-
export const grid = {
|
|
4
|
-
gridTemplateColumns: 'repeat(12, 1fr)',
|
|
5
|
-
gridAutoFlow: 'dense',
|
|
6
|
-
justifyItems: 'stretch',
|
|
7
|
-
boxSizing: 'border-box',
|
|
8
|
-
marginBottom: '2em',
|
|
9
|
-
gap: '1em',
|
|
10
|
-
gridAutoColumns: 'auto',
|
|
11
|
-
gridAutoRows: 'auto',
|
|
12
|
-
|
|
13
|
-
'@media only screen and (min-width: 1680px)': {
|
|
14
|
-
gridTemplateColumns: 'repeat(12, 1fr)'
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export const styleFamilyBundle = {
|
|
19
|
-
display: 'flex',
|
|
20
|
-
alignItems: 'center',
|
|
21
|
-
justifyContent: 'space-between',
|
|
22
|
-
width: '50em',
|
|
23
|
-
'> div': {
|
|
24
|
-
display: 'flex',
|
|
25
|
-
alignItems: 'center'
|
|
26
|
-
},
|
|
27
|
-
img: {
|
|
28
|
-
width: '32px',
|
|
29
|
-
height: '32px'
|
|
30
|
-
},
|
|
31
|
-
button: {
|
|
32
|
-
'&:first-child': {
|
|
33
|
-
marginRight: '8px'
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|