@symbo.ls/preview 0.0.41 → 0.0.42
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/pages/DesignSystem/index.js +82 -26
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict'
|
|
2
2
|
|
|
3
3
|
import { router } from '@domql/router'
|
|
4
|
-
import { ClickableItem, Flex, Link, ResponsivePreview, SquareButton } from '@symbo.ls/components'
|
|
4
|
+
import { ClickableItem, Flex, Link, ResponsivePreview, SquareButton, TooltipParent } from '@symbo.ls/components'
|
|
5
5
|
import { PageExtend,
|
|
6
6
|
Color,
|
|
7
7
|
Theme,
|
|
@@ -14,50 +14,74 @@ import { PageExtend,
|
|
|
14
14
|
} from '..'
|
|
15
15
|
|
|
16
16
|
const NAV = [{
|
|
17
|
+
state: {
|
|
18
|
+
href: '/colors',
|
|
19
|
+
tooltip: 'Colors'
|
|
20
|
+
},
|
|
17
21
|
props: {
|
|
18
|
-
icon: 'color outline colored'
|
|
19
|
-
href: '/colors'
|
|
22
|
+
icon: { name: 'color outline colored' }
|
|
20
23
|
}
|
|
21
24
|
}, {
|
|
22
|
-
|
|
23
|
-
icon: 'typography outline',
|
|
25
|
+
state: {
|
|
24
26
|
href: '/typography',
|
|
27
|
+
tooltip: 'Typography'
|
|
28
|
+
},
|
|
29
|
+
props: {
|
|
30
|
+
icon: { name: 'typography outline' },
|
|
25
31
|
opacity: '.7'
|
|
26
32
|
}
|
|
27
33
|
}, {
|
|
28
|
-
|
|
29
|
-
icon: 'space outline',
|
|
34
|
+
state: {
|
|
30
35
|
href: '/space',
|
|
36
|
+
tooltip: 'Spacing'
|
|
37
|
+
},
|
|
38
|
+
props: {
|
|
39
|
+
icon: { name: 'space outline' },
|
|
31
40
|
opacity: '.7'
|
|
32
41
|
}
|
|
33
42
|
}, {
|
|
43
|
+
state: {
|
|
44
|
+
href: '/shape',
|
|
45
|
+
tooltip: 'Shapes'
|
|
46
|
+
},
|
|
34
47
|
props: {
|
|
35
|
-
icon: 'shape outline colored'
|
|
36
|
-
href: '/shape'
|
|
48
|
+
icon: { name: 'shape outline colored' }
|
|
37
49
|
}
|
|
38
50
|
}, {
|
|
39
|
-
|
|
40
|
-
icon: 'icons outline colored',
|
|
51
|
+
state: {
|
|
41
52
|
href: '/icons',
|
|
42
|
-
|
|
43
|
-
|
|
53
|
+
tooltip: 'Icons'
|
|
54
|
+
},
|
|
55
|
+
props: {
|
|
56
|
+
icon: { name: 'icons outline colored' },
|
|
57
|
+
'.active': {
|
|
58
|
+
icon: { name: 'icons colored' }
|
|
44
59
|
}
|
|
45
60
|
}
|
|
46
61
|
}, {
|
|
47
|
-
|
|
48
|
-
icon: 'device mobile half fill',
|
|
62
|
+
state: {
|
|
49
63
|
href: '/media-query',
|
|
64
|
+
tooltip: 'Responsive'
|
|
65
|
+
},
|
|
66
|
+
props: {
|
|
67
|
+
icon: { name: 'device mobile half fill' },
|
|
50
68
|
opacity: '.7'
|
|
51
69
|
}
|
|
52
70
|
}, {
|
|
71
|
+
state: {
|
|
72
|
+
href: '/timing',
|
|
73
|
+
tooltip: 'Timing'
|
|
74
|
+
},
|
|
53
75
|
props: {
|
|
54
|
-
icon: 'clock colored'
|
|
55
|
-
href: '/timing'
|
|
76
|
+
icon: { name: 'clock colored' }
|
|
56
77
|
}
|
|
57
78
|
}, {
|
|
79
|
+
state: {
|
|
80
|
+
href: '/sequence',
|
|
81
|
+
tooltip: 'Sequence'
|
|
82
|
+
},
|
|
58
83
|
props: {
|
|
59
|
-
icon: 'sequence colored'
|
|
60
|
-
href: '/sequence'
|
|
84
|
+
icon: { name: 'sequence colored' }
|
|
61
85
|
}
|
|
62
86
|
}]
|
|
63
87
|
|
|
@@ -99,13 +123,6 @@ export const DesignSystem = {
|
|
|
99
123
|
sidebar: {
|
|
100
124
|
tag: 'nav',
|
|
101
125
|
extend: Flex,
|
|
102
|
-
childExtend: {
|
|
103
|
-
extend: [ClickableItem, Link, SquareButton],
|
|
104
|
-
props: ({ props }) => ({
|
|
105
|
-
active: props.href === window.location.pathname,
|
|
106
|
-
theme: null
|
|
107
|
-
})
|
|
108
|
-
},
|
|
109
126
|
|
|
110
127
|
props: {
|
|
111
128
|
gap: 'B1',
|
|
@@ -117,6 +134,45 @@ export const DesignSystem = {
|
|
|
117
134
|
top: 'E'
|
|
118
135
|
},
|
|
119
136
|
|
|
137
|
+
childExtend: {
|
|
138
|
+
extend: [ClickableItem, Link, SquareButton, TooltipParent],
|
|
139
|
+
props: ({ state }) => ({
|
|
140
|
+
href: state.href,
|
|
141
|
+
active: window.location.pathname.includes(state.href),
|
|
142
|
+
theme: null,
|
|
143
|
+
position: 'relative',
|
|
144
|
+
style: {
|
|
145
|
+
'&:hover, &:focus-visible': {
|
|
146
|
+
'& [tooltip]': {
|
|
147
|
+
transform: 'translate3d(0%,-50%,0)'
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
}),
|
|
152
|
+
Tooltip: ({ state }) => ({
|
|
153
|
+
background: 'black .95',
|
|
154
|
+
position: 'absolute',
|
|
155
|
+
pointerEvents: 'none',
|
|
156
|
+
top: '50%',
|
|
157
|
+
left: '90%',
|
|
158
|
+
shape: 'rectangle',
|
|
159
|
+
shapeDirection: null,
|
|
160
|
+
padding: 'X2 Z1',
|
|
161
|
+
transform: 'translate3d(10%, -50%, 0)',
|
|
162
|
+
opacity: '0',
|
|
163
|
+
visibility: 'hidden',
|
|
164
|
+
transition: 'B default-bezier',
|
|
165
|
+
transitionProperty: 'opacity, transform',
|
|
166
|
+
zIndex: 1000,
|
|
167
|
+
lineHeight: 1,
|
|
168
|
+
title: {
|
|
169
|
+
fontSize: 'Z',
|
|
170
|
+
text: state.tooltip
|
|
171
|
+
},
|
|
172
|
+
p: { text: null }
|
|
173
|
+
})
|
|
174
|
+
},
|
|
175
|
+
|
|
120
176
|
...NAV
|
|
121
177
|
},
|
|
122
178
|
|