@symbo.ls/preview 0.0.50 → 0.0.52
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/label/index.js +1 -1
- package/package.json +1 -1
- package/src/assets/dark.png +0 -0
- package/src/assets/space.png +0 -0
- package/src/assets/type.png +0 -0
- package/src/components/Banner.js +57 -0
- package/src/components/SpacingPreview.js +5 -2
- package/src/components/index.js +1 -0
- package/src/pages/DesignSystem/Dashboard/index.js +82 -0
- package/src/pages/DesignSystem/index.js +2 -2
- package/src/pages/Icons/index.js +52 -28
- package/src/pages/Spaces/SpacingScale.js +10 -9
- package/src/assets/dots.png +0 -0
- package/src/assets/dotsDark.png +0 -0
- package/src/pages/DesignSystem/Main.js +0 -110
- package/src/pages/DesignSystem/style.js +0 -1
- /package/src/pages/DesignSystem/{designElements.js → Dashboard/designElements.js} +0 -0
package/.symbols/label/index.js
CHANGED
package/package.json
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
'use strict'
|
|
2
|
+
|
|
3
|
+
import { Flex, Link, Hoverable, Pseudo, ArticleMedium } from '@symbo.ls/components'
|
|
4
|
+
|
|
5
|
+
export const TutorialBanner = {
|
|
6
|
+
extend: [Link, Flex, ArticleMedium, Pseudo, Hoverable],
|
|
7
|
+
|
|
8
|
+
props: ({ state }) => ({
|
|
9
|
+
flow: 'column',
|
|
10
|
+
round: 'A',
|
|
11
|
+
flex: '1',
|
|
12
|
+
height: 'F',
|
|
13
|
+
padding: 'A2 B',
|
|
14
|
+
background: 'gray2',
|
|
15
|
+
href: state.href,
|
|
16
|
+
gap: '0',
|
|
17
|
+
overflow: 'hidden',
|
|
18
|
+
position: 'relative',
|
|
19
|
+
color: 'white',
|
|
20
|
+
|
|
21
|
+
title: { margin: 'auto 0 0', text: state.title },
|
|
22
|
+
p: { text: state.p },
|
|
23
|
+
|
|
24
|
+
style: {
|
|
25
|
+
userSelect: 'none',
|
|
26
|
+
'h2, p': { zIndex: 2 }
|
|
27
|
+
},
|
|
28
|
+
|
|
29
|
+
':after, &:before': {
|
|
30
|
+
content: '""',
|
|
31
|
+
position: 'absolute',
|
|
32
|
+
zIndex: 0,
|
|
33
|
+
inset: '-5px -5px -5px -5px'
|
|
34
|
+
},
|
|
35
|
+
|
|
36
|
+
':before': {
|
|
37
|
+
transition: 'B default-bezier',
|
|
38
|
+
transitionProperty: 'opacity',
|
|
39
|
+
backgroundImage: `url(${state.background})`,
|
|
40
|
+
backgroundSize: 'cover',
|
|
41
|
+
opacity: '0.5'
|
|
42
|
+
},
|
|
43
|
+
|
|
44
|
+
':after': {
|
|
45
|
+
transition: 'B default-bezier',
|
|
46
|
+
transitionProperty: 'opacity',
|
|
47
|
+
background: 'imageOverlay',
|
|
48
|
+
opacity: '0.9'
|
|
49
|
+
},
|
|
50
|
+
|
|
51
|
+
':hover': {
|
|
52
|
+
padding: 'B B1',
|
|
53
|
+
':before': { opacity: '1' },
|
|
54
|
+
':after': { opacity: '1' }
|
|
55
|
+
}
|
|
56
|
+
})
|
|
57
|
+
}
|
|
@@ -101,7 +101,7 @@ const scene = {
|
|
|
101
101
|
minWidth: state.props['gap']
|
|
102
102
|
})
|
|
103
103
|
},
|
|
104
|
-
base: (el, s) => s.base
|
|
104
|
+
base: { text: (el, s) => s.base }
|
|
105
105
|
}
|
|
106
106
|
}
|
|
107
107
|
}, {
|
|
@@ -144,7 +144,10 @@ export const SpacingPreview = {
|
|
|
144
144
|
title: null,
|
|
145
145
|
code: {
|
|
146
146
|
props: {
|
|
147
|
-
text: ({ state }) =>
|
|
147
|
+
text: ({ state }) => {
|
|
148
|
+
const code = 'const props = ' + JSON.stringify(state.props, null, 2)
|
|
149
|
+
return code
|
|
150
|
+
}
|
|
148
151
|
}
|
|
149
152
|
}
|
|
150
153
|
}
|
package/src/components/index.js
CHANGED
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
'use strict'
|
|
2
|
+
|
|
3
|
+
import { Flex, ArticleMedium, QuickStart } from '@symbo.ls/components'
|
|
4
|
+
import { TutorialBanner } from '../../../components'
|
|
5
|
+
|
|
6
|
+
import DARK_PNG from '../../../assets/dark.png'
|
|
7
|
+
import TYPE_PNG from '../../../assets/type.png'
|
|
8
|
+
import SPACE_PNG from '../../../assets/space.png'
|
|
9
|
+
|
|
10
|
+
const banners = {
|
|
11
|
+
extend: Flex,
|
|
12
|
+
props: {
|
|
13
|
+
align: 'stretch space-between',
|
|
14
|
+
margin: 'C1 -Z1',
|
|
15
|
+
gap: 'B1'
|
|
16
|
+
},
|
|
17
|
+
|
|
18
|
+
childExtend: TutorialBanner,
|
|
19
|
+
|
|
20
|
+
$setStateCollection: ({ state }) => [{
|
|
21
|
+
title: 'Setting up a dark theme',
|
|
22
|
+
p: '1 min tutorial',
|
|
23
|
+
background: DARK_PNG,
|
|
24
|
+
href: ''
|
|
25
|
+
}, {
|
|
26
|
+
title: 'Learn typography scaling',
|
|
27
|
+
p: '2 mins tutorial',
|
|
28
|
+
background: TYPE_PNG,
|
|
29
|
+
href: ''
|
|
30
|
+
}, {
|
|
31
|
+
title: 'How scaling of space works',
|
|
32
|
+
p: '5 mins tutorial',
|
|
33
|
+
background: SPACE_PNG,
|
|
34
|
+
href: ''
|
|
35
|
+
}]
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
const header = {
|
|
39
|
+
extend: ArticleMedium,
|
|
40
|
+
props: {
|
|
41
|
+
'@mobileS': { padding: '- - - A' },
|
|
42
|
+
title: {
|
|
43
|
+
fontWeight: '600',
|
|
44
|
+
text: 'Design System takeaways'
|
|
45
|
+
},
|
|
46
|
+
|
|
47
|
+
p: { text: `Your tokens in the system`
|
|
48
|
+
},
|
|
49
|
+
|
|
50
|
+
p2: {
|
|
51
|
+
display: 'none',
|
|
52
|
+
color: 'gray6',
|
|
53
|
+
margin: '0'
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
|
|
57
|
+
title: {},
|
|
58
|
+
p: {},
|
|
59
|
+
p2: {
|
|
60
|
+
tag: 'p',
|
|
61
|
+
...[
|
|
62
|
+
'Welcome to the Symbols documentation page.',
|
|
63
|
+
{ text: `Here you'll learn everything…` }
|
|
64
|
+
]
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
const summary = {
|
|
69
|
+
header
|
|
70
|
+
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export const DesignSystemDashboard = {
|
|
74
|
+
ArticleBig: {
|
|
75
|
+
title: { text: 'Design System' },
|
|
76
|
+
p: { text: 'Create your Design System guidelines' }
|
|
77
|
+
},
|
|
78
|
+
|
|
79
|
+
banners,
|
|
80
|
+
quickStart: { extend: QuickStart },
|
|
81
|
+
summary
|
|
82
|
+
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import { router } from '@domql/router'
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import { DesignSystemDashboard } from './Dashboard'
|
|
6
6
|
import {
|
|
7
7
|
ClickableItem,
|
|
8
8
|
Flex,
|
|
@@ -125,7 +125,7 @@ export const DesignSystem = {
|
|
|
125
125
|
|
|
126
126
|
define: { routes: param => param },
|
|
127
127
|
routes: {
|
|
128
|
-
'/design-system':
|
|
128
|
+
'/design-system': DesignSystemDashboard,
|
|
129
129
|
'/colors': Color,
|
|
130
130
|
'/theme': Theme,
|
|
131
131
|
'/typography': Typography,
|
package/src/pages/Icons/index.js
CHANGED
|
@@ -24,16 +24,16 @@ const IconItem = {
|
|
|
24
24
|
scrollToTop: false,
|
|
25
25
|
aspectRatio: '1 / 1',
|
|
26
26
|
flexAlign: 'center center',
|
|
27
|
-
href: '/icons/edit-icon/' + state.
|
|
27
|
+
href: '/icons/edit-icon/' + state.value,
|
|
28
28
|
theme: 'tertiary',
|
|
29
29
|
icon: {
|
|
30
30
|
fontSize: 'C2',
|
|
31
|
-
name: state.
|
|
31
|
+
name: state.value
|
|
32
32
|
}
|
|
33
33
|
}),
|
|
34
34
|
on: {
|
|
35
35
|
click: (event, element, state) => {
|
|
36
|
-
copyStringToClipboard(state.
|
|
36
|
+
copyStringToClipboard(state.value)
|
|
37
37
|
Link.on.click(event, element, state)
|
|
38
38
|
}
|
|
39
39
|
}
|
|
@@ -41,6 +41,7 @@ const IconItem = {
|
|
|
41
41
|
|
|
42
42
|
const IconsGroup = {
|
|
43
43
|
state: { toggleShow: true },
|
|
44
|
+
props: ({ state }) => ({ hide: !Object.keys(state.list).length }),
|
|
44
45
|
|
|
45
46
|
header: { extend: SectionHeader },
|
|
46
47
|
|
|
@@ -50,11 +51,7 @@ const IconsGroup = {
|
|
|
50
51
|
hide: !state.toggleShow,
|
|
51
52
|
columns: 'repeat(12, 1fr)',
|
|
52
53
|
gap: 'Z',
|
|
53
|
-
margin: '- -Z2'
|
|
54
|
-
|
|
55
|
-
$hide: {
|
|
56
|
-
display: 'none'
|
|
57
|
-
}
|
|
54
|
+
margin: '- -Z2'
|
|
58
55
|
}),
|
|
59
56
|
|
|
60
57
|
childExtend: IconItem,
|
|
@@ -62,7 +59,13 @@ const IconsGroup = {
|
|
|
62
59
|
}
|
|
63
60
|
}
|
|
64
61
|
|
|
65
|
-
const
|
|
62
|
+
const ArraizeIconsCategory = (library, state) => {
|
|
63
|
+
const list = Object.keys(library)
|
|
64
|
+
if (state.searched) return list.filter(value => console.log(value, state.searched, value.includes(state.searched)) || value.includes(state.searched))
|
|
65
|
+
return list
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
const ICON_GROUPS = state => [{
|
|
66
69
|
title: 'Document Icons',
|
|
67
70
|
p: 'All ungrouped document icons',
|
|
68
71
|
|
|
@@ -71,49 +74,70 @@ const ICON_GROUPS = [{
|
|
|
71
74
|
href: '/icons/add-icon'
|
|
72
75
|
}],
|
|
73
76
|
|
|
74
|
-
list:
|
|
77
|
+
list: ArraizeIconsCategory(SVG, state)
|
|
75
78
|
}, {
|
|
76
79
|
title: 'Accessibility',
|
|
77
|
-
list:
|
|
78
|
-
p: ''
|
|
80
|
+
list: ArraizeIconsCategory(ACCESSIBILITY, state)
|
|
79
81
|
}, {
|
|
80
82
|
title: 'Box Model',
|
|
81
|
-
list:
|
|
83
|
+
list: ArraizeIconsCategory(BOXMODEL, state)
|
|
82
84
|
}, {
|
|
83
85
|
title: 'Display',
|
|
84
|
-
list:
|
|
86
|
+
list: ArraizeIconsCategory(DISPLAY, state)
|
|
85
87
|
}, {
|
|
86
88
|
title: 'Interactive',
|
|
87
|
-
list:
|
|
89
|
+
list: ArraizeIconsCategory(INTERACTIVE, state)
|
|
88
90
|
}, {
|
|
89
91
|
title: 'Logos',
|
|
90
|
-
list:
|
|
92
|
+
list: ArraizeIconsCategory(LOGOS, state)
|
|
91
93
|
}, {
|
|
92
94
|
title: 'Signs',
|
|
93
|
-
list:
|
|
95
|
+
list: ArraizeIconsCategory(SIGNS, state)
|
|
94
96
|
}, {
|
|
95
97
|
title: 'Style',
|
|
96
|
-
list:
|
|
98
|
+
list: ArraizeIconsCategory(STYLE, state)
|
|
97
99
|
}, {
|
|
98
100
|
title: 'Keys',
|
|
99
|
-
list:
|
|
101
|
+
list: ArraizeIconsCategory(KEYBOARD, state)
|
|
100
102
|
}, {
|
|
101
103
|
title: 'Tech',
|
|
102
|
-
list:
|
|
104
|
+
list: ArraizeIconsCategory(TECH, state)
|
|
103
105
|
}, {
|
|
104
106
|
title: 'Text',
|
|
105
|
-
list:
|
|
107
|
+
list: ArraizeIconsCategory(TEXT, state)
|
|
106
108
|
}]
|
|
107
109
|
|
|
108
110
|
export const Icons = {
|
|
109
|
-
|
|
110
|
-
|
|
111
|
+
state: {},
|
|
112
|
+
|
|
113
|
+
header: {
|
|
114
|
+
extend: SectionHeader,
|
|
115
|
+
heading: {
|
|
116
|
+
title: 'Icons',
|
|
117
|
+
p: 'Unlike typography, component may has the properties of padding, gap, width and rest.'
|
|
118
|
+
},
|
|
119
|
+
|
|
120
|
+
Search: {
|
|
121
|
+
margin: '- -Z2 - -',
|
|
122
|
+
placeholder: 'Search Icons'
|
|
123
|
+
},
|
|
111
124
|
|
|
112
|
-
|
|
113
|
-
flow: 'column',
|
|
114
|
-
gap: 'D1'
|
|
125
|
+
nav: null
|
|
115
126
|
},
|
|
116
127
|
|
|
117
|
-
|
|
118
|
-
|
|
128
|
+
Line: {},
|
|
129
|
+
|
|
130
|
+
cnt: {
|
|
131
|
+
extend: Flex,
|
|
132
|
+
props: {
|
|
133
|
+
flow: 'column',
|
|
134
|
+
gap: 'D1'
|
|
135
|
+
},
|
|
136
|
+
|
|
137
|
+
childExtend: IconsGroup,
|
|
138
|
+
$setStateCollection: (el, state) => {
|
|
139
|
+
el.removeContent()
|
|
140
|
+
return ICON_GROUPS(state)
|
|
141
|
+
}
|
|
142
|
+
}
|
|
119
143
|
}
|
|
@@ -7,6 +7,7 @@ export const SpacingScale = {
|
|
|
7
7
|
extend: [Flex],
|
|
8
8
|
|
|
9
9
|
props: {
|
|
10
|
+
lazyLoad: true,
|
|
10
11
|
flow: 'column',
|
|
11
12
|
gap: 'C1'
|
|
12
13
|
},
|
|
@@ -18,15 +19,15 @@ export const SpacingScale = {
|
|
|
18
19
|
},
|
|
19
20
|
|
|
20
21
|
SequenceSliders: {
|
|
21
|
-
position: 'sticky',
|
|
22
|
-
top: 'C2',
|
|
23
|
-
background: 'black .5',
|
|
24
|
-
zIndex: '9999',
|
|
25
|
-
margin: '-B2 -B -B',
|
|
26
|
-
padding: 'B2 B B',
|
|
27
|
-
style: {
|
|
28
|
-
|
|
29
|
-
}
|
|
22
|
+
// position: 'sticky',
|
|
23
|
+
// top: 'C2',
|
|
24
|
+
// background: 'black .5',
|
|
25
|
+
// zIndex: '9999',
|
|
26
|
+
// margin: '-B2 -B -B',
|
|
27
|
+
// padding: 'B2 B B',
|
|
28
|
+
// style: {
|
|
29
|
+
// backdropFilter: 'blur(15px)'
|
|
30
|
+
// }
|
|
30
31
|
},
|
|
31
32
|
|
|
32
33
|
scale: {
|
package/src/assets/dots.png
DELETED
|
Binary file
|
package/src/assets/dotsDark.png
DELETED
|
Binary file
|
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
|
|
3
|
-
import { Flex, Link, ArticleMedium, QuickStart } from '@symbo.ls/components'
|
|
4
|
-
|
|
5
|
-
const Banner = {
|
|
6
|
-
extend: [Link, Flex, ArticleMedium],
|
|
7
|
-
props: ({ state }) => ({
|
|
8
|
-
flow: 'column',
|
|
9
|
-
round: 'A',
|
|
10
|
-
flex: '1',
|
|
11
|
-
height: 'F',
|
|
12
|
-
padding: 'A2 B',
|
|
13
|
-
backgroundImage: `url(${state.background})`,
|
|
14
|
-
backgroundSize: 'cover',
|
|
15
|
-
href: state.href,
|
|
16
|
-
gap: '0',
|
|
17
|
-
|
|
18
|
-
title: { margin: 'auto 0 0', text: state.title },
|
|
19
|
-
p: { text: state.p }
|
|
20
|
-
})
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
const banners = {
|
|
24
|
-
extend: Flex,
|
|
25
|
-
props: {
|
|
26
|
-
align: 'stretch space-between',
|
|
27
|
-
margin: 'C1 -Z2',
|
|
28
|
-
gap: 'B1'
|
|
29
|
-
},
|
|
30
|
-
|
|
31
|
-
childExtend: Banner,
|
|
32
|
-
|
|
33
|
-
$setStateCollection: ({ state }) => [{
|
|
34
|
-
title: 'Setting up a dark theme',
|
|
35
|
-
p: '5 mins tutorial',
|
|
36
|
-
background: 'https://p194.p3.n0.cdn.getcloudapp.com/items/eDu7le4P/ef9249a0-c522-49a7-8a0e-d7152b2e73a1.png?v=c4c8cd49408f26a6046b11f35d7b0656',
|
|
37
|
-
href: ''
|
|
38
|
-
}, {
|
|
39
|
-
title: 'Learn typography scaling',
|
|
40
|
-
p: '5 mins tutorial',
|
|
41
|
-
background: '',
|
|
42
|
-
href: ''
|
|
43
|
-
}]
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
const header = {
|
|
47
|
-
extend: ArticleMedium,
|
|
48
|
-
props: {
|
|
49
|
-
'@mobileS': { padding: '- - - A' },
|
|
50
|
-
title: {
|
|
51
|
-
fontWeight: '600',
|
|
52
|
-
text: 'Design System takeaways'
|
|
53
|
-
},
|
|
54
|
-
|
|
55
|
-
p: { text: `Your tokens in the system`
|
|
56
|
-
},
|
|
57
|
-
|
|
58
|
-
p2: {
|
|
59
|
-
display: 'none',
|
|
60
|
-
color: 'gray6',
|
|
61
|
-
margin: '0'
|
|
62
|
-
}
|
|
63
|
-
},
|
|
64
|
-
|
|
65
|
-
title: {},
|
|
66
|
-
p: {},
|
|
67
|
-
p2: {
|
|
68
|
-
tag: 'p',
|
|
69
|
-
...[
|
|
70
|
-
'Welcome to the Symbols documentation page.',
|
|
71
|
-
{ text: `Here you'll learn everything…` }
|
|
72
|
-
]
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
const summary = {
|
|
77
|
-
header,
|
|
78
|
-
|
|
79
|
-
grid: {
|
|
80
|
-
extend: Flex,
|
|
81
|
-
props: {
|
|
82
|
-
align: 'stretch space-between',
|
|
83
|
-
margin: 'C1 -Z2',
|
|
84
|
-
gap: 'B1'
|
|
85
|
-
},
|
|
86
|
-
|
|
87
|
-
$setStateCollection: ({ state }) => [{
|
|
88
|
-
title: 'Setting up a dark theme',
|
|
89
|
-
p: '5 mins tutorial',
|
|
90
|
-
background: 'https://p194.p3.n0.cdn.getcloudapp.com/items/eDu7le4P/ef9249a0-c522-49a7-8a0e-d7152b2e73a1.png?v=c4c8cd49408f26a6046b11f35d7b0656',
|
|
91
|
-
href: ''
|
|
92
|
-
}, {
|
|
93
|
-
title: 'Learn typography scaling',
|
|
94
|
-
p: '5 mins tutorial',
|
|
95
|
-
background: '',
|
|
96
|
-
href: ''
|
|
97
|
-
}]
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
export const Main = {
|
|
102
|
-
ArticleBig: {
|
|
103
|
-
title: { text: 'Design System' },
|
|
104
|
-
p: { text: 'Create your Design System guidelines' }
|
|
105
|
-
},
|
|
106
|
-
|
|
107
|
-
banners,
|
|
108
|
-
quickStart: { extend: QuickStart },
|
|
109
|
-
summary
|
|
110
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
'use strict'
|
|
File without changes
|