@symbo.ls/preview 0.0.48 → 0.0.50
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/library.js +3 -1
- package/package.json +1 -1
- package/src/components/ShapeSet.js +1 -1
- package/src/components/SpacingPreview.js +1 -0
- package/src/pages/MediaQuery/index.js +14 -20
- package/src/pages/MediaQuery/lists.js +3 -3
- package/src/pages/Spaces/SpacingScale.js +1 -0
- package/src/pages/Spaces/Table.js +2 -1
- package/src/pages/Spaces/buttons.js +68 -31
- package/src/pages/Spaces/index.js +0 -4
- /package/src/{pages/Spaces/__ → __}/boxModel.js +0 -0
- /package/src/{pages/Spaces/__ → __}/index copy.js +0 -0
- /package/src/{pages/Spaces/__ → __}/preview.js +0 -0
- /package/src/{pages/Spaces/__ → __}/sequence.js +0 -0
- /package/src/{pages/Spaces/__ → __}/style.js +0 -0
package/.symbols/library.js
CHANGED
|
@@ -78,7 +78,9 @@ const define = {
|
|
|
78
78
|
}
|
|
79
79
|
}
|
|
80
80
|
|
|
81
|
-
export const LIBRARY =
|
|
81
|
+
export const LIBRARY = []
|
|
82
|
+
|
|
83
|
+
export const SYMBOLS_LIBRARY = Object.keys(lib).map(key => {
|
|
82
84
|
const component = lib[key]
|
|
83
85
|
const base = define[key] || define.default
|
|
84
86
|
return deepMerge({
|
package/package.json
CHANGED
|
@@ -2,24 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
import { Flex } from '@symbo.ls/components'
|
|
4
4
|
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
const props = {
|
|
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
|
-
|
|
13
|
-
content: {
|
|
14
|
-
justifyContent: 'space-between',
|
|
15
|
-
gap: 'A2'
|
|
16
|
-
}
|
|
17
|
-
}
|
|
5
|
+
import { mediaQueryList, screenSizingList } from './lists'
|
|
18
6
|
|
|
19
7
|
const content = {
|
|
20
8
|
extend: Flex,
|
|
21
9
|
|
|
22
10
|
props: {
|
|
11
|
+
justifyContent: 'space-between',
|
|
12
|
+
margin: '0 -Z',
|
|
13
|
+
gap: 'C1',
|
|
14
|
+
|
|
23
15
|
childProps: {
|
|
24
16
|
heading: {
|
|
25
17
|
color: 'white',
|
|
@@ -28,25 +20,27 @@ const content = {
|
|
|
28
20
|
}
|
|
29
21
|
},
|
|
30
22
|
|
|
31
|
-
|
|
23
|
+
mediaQueries: {
|
|
32
24
|
flex: 1
|
|
33
25
|
}
|
|
34
26
|
},
|
|
35
27
|
|
|
36
|
-
|
|
37
|
-
heading: { text: 'Media
|
|
38
|
-
|
|
28
|
+
mediaQueries: {
|
|
29
|
+
heading: { text: 'Media Queries' },
|
|
30
|
+
mediaQueryList
|
|
39
31
|
},
|
|
40
32
|
|
|
41
|
-
|
|
33
|
+
screensSheet: {
|
|
42
34
|
heading: { text: 'Screen Sizing Sheet' },
|
|
43
35
|
screenSizingList
|
|
44
36
|
}
|
|
45
37
|
}
|
|
46
38
|
|
|
47
39
|
export const MediaQuery = {
|
|
48
|
-
|
|
40
|
+
SectionHeader: {
|
|
41
|
+
title: 'Responsive',
|
|
42
|
+
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.'
|
|
43
|
+
},
|
|
49
44
|
|
|
50
|
-
SectionHeader: {},
|
|
51
45
|
content
|
|
52
46
|
}
|
|
@@ -116,7 +116,7 @@ const screenIconText = {
|
|
|
116
116
|
})
|
|
117
117
|
}
|
|
118
118
|
|
|
119
|
-
const
|
|
119
|
+
const MediaQueryRow = {
|
|
120
120
|
extend: Flex,
|
|
121
121
|
props: {
|
|
122
122
|
gap: 'D',
|
|
@@ -198,11 +198,11 @@ const MediaValuesRow = {
|
|
|
198
198
|
}
|
|
199
199
|
}
|
|
200
200
|
|
|
201
|
-
export const
|
|
201
|
+
export const mediaQueryList = {
|
|
202
202
|
state: BREAKPOINTS_DATA,
|
|
203
203
|
props: listProps,
|
|
204
204
|
|
|
205
|
-
childExtend:
|
|
205
|
+
childExtend: MediaQueryRow,
|
|
206
206
|
$setStateCollection: ({ state }) => state.data
|
|
207
207
|
}
|
|
208
208
|
|
|
@@ -72,7 +72,7 @@ const Row = {
|
|
|
72
72
|
display: 'flex',
|
|
73
73
|
gap: '.2em',
|
|
74
74
|
opacity: '1',
|
|
75
|
-
|
|
75
|
+
boxSizing: 'content-box'
|
|
76
76
|
},
|
|
77
77
|
graph: {
|
|
78
78
|
margin: '0 0 0 -B2',
|
|
@@ -123,6 +123,7 @@ export const Table = {
|
|
|
123
123
|
tag: 'section',
|
|
124
124
|
|
|
125
125
|
props: {
|
|
126
|
+
lazyLoad: true,
|
|
126
127
|
overflow: 'hidden',
|
|
127
128
|
position: 'relative',
|
|
128
129
|
header: {
|
|
@@ -24,7 +24,8 @@ const ChoosableButton = {
|
|
|
24
24
|
color: 'gray7'
|
|
25
25
|
},
|
|
26
26
|
':hover': {
|
|
27
|
-
theme: 'quaternary'
|
|
27
|
+
theme: 'quaternary',
|
|
28
|
+
'.active': { color: 'blue' }
|
|
28
29
|
},
|
|
29
30
|
'.active': {
|
|
30
31
|
theme: null
|
|
@@ -55,6 +56,7 @@ const diffIconTypes = (parentKey, key) => {
|
|
|
55
56
|
|
|
56
57
|
const BUTTONS = {
|
|
57
58
|
margin: {
|
|
59
|
+
maxValue: 3000,
|
|
58
60
|
blockStart: {},
|
|
59
61
|
inlineEnd: {},
|
|
60
62
|
blockEnd: {},
|
|
@@ -69,22 +71,26 @@ const BUTTONS = {
|
|
|
69
71
|
maxWidth: {}
|
|
70
72
|
},
|
|
71
73
|
borderWidth: {
|
|
74
|
+
maxValue: 1280,
|
|
72
75
|
blockStartWidth: {},
|
|
73
76
|
inlineEndWidth: {},
|
|
74
77
|
blockEndWidth: {},
|
|
75
78
|
inlineStartWidth: {}
|
|
76
79
|
},
|
|
77
80
|
padding: {
|
|
81
|
+
maxValue: 3000,
|
|
78
82
|
blockStart: {},
|
|
79
83
|
inlineEnd: {},
|
|
80
84
|
blockEnd: {},
|
|
81
85
|
inlineStart: {}
|
|
82
86
|
},
|
|
83
87
|
gap: {
|
|
88
|
+
maxValue: 3000,
|
|
84
89
|
Horizontal: {},
|
|
85
90
|
Vertical: {}
|
|
86
91
|
},
|
|
87
92
|
borderRadius: {
|
|
93
|
+
maxValue: 1280,
|
|
88
94
|
endStart: {},
|
|
89
95
|
startEnd: {},
|
|
90
96
|
endEnd: {},
|
|
@@ -92,6 +98,10 @@ const BUTTONS = {
|
|
|
92
98
|
}
|
|
93
99
|
}
|
|
94
100
|
|
|
101
|
+
const cachedKeys = state => {
|
|
102
|
+
return Object.keys(BUTTONS[state.value]).filter(v => v !== 'maxValue')
|
|
103
|
+
}
|
|
104
|
+
|
|
95
105
|
export default {
|
|
96
106
|
props: {
|
|
97
107
|
lazyLoad: true,
|
|
@@ -103,8 +113,10 @@ export default {
|
|
|
103
113
|
extend: [ChoosableButton, DropdownParent, WiderButton],
|
|
104
114
|
|
|
105
115
|
props: ({ key, state, parent }) => ({
|
|
116
|
+
lazyLoad: true,
|
|
106
117
|
active: state.parent.parent.props[state.value] === state.parent.key,
|
|
107
118
|
icon: { name: state.value },
|
|
119
|
+
|
|
108
120
|
'.active': {
|
|
109
121
|
color: 'blue',
|
|
110
122
|
':hover': {
|
|
@@ -117,6 +129,7 @@ export default {
|
|
|
117
129
|
extend: Dropdown,
|
|
118
130
|
|
|
119
131
|
props: {
|
|
132
|
+
lazyLoad: true,
|
|
120
133
|
minWidth: 'none',
|
|
121
134
|
grid: { gap: '0' }
|
|
122
135
|
},
|
|
@@ -126,9 +139,10 @@ export default {
|
|
|
126
139
|
grid: {
|
|
127
140
|
extend: GridInDropdown,
|
|
128
141
|
props: ({ state }) => {
|
|
129
|
-
const keys =
|
|
142
|
+
const keys = cachedKeys(state)
|
|
130
143
|
if (keys.length < 4) {
|
|
131
144
|
return {
|
|
145
|
+
lazyLoad: true,
|
|
132
146
|
columns: 'repeat(4, 1fr)'
|
|
133
147
|
}
|
|
134
148
|
}
|
|
@@ -152,19 +166,23 @@ export default {
|
|
|
152
166
|
const iconKey = diffIconTypes(propState.value, state.value)
|
|
153
167
|
const active = tableState.props[propKey] === rowState.key
|
|
154
168
|
return {
|
|
169
|
+
lazyLoad: true,
|
|
155
170
|
active,
|
|
156
|
-
icon: {
|
|
157
|
-
name: iconKey
|
|
158
|
-
},
|
|
171
|
+
icon: { name: iconKey },
|
|
159
172
|
gridArea: keys.length > 3 && diffPropPosition(propState.value, state.value),
|
|
160
173
|
theme: null,
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
color: 'blue',
|
|
174
|
+
'@dark': {
|
|
175
|
+
background: 'transparent 0',
|
|
176
|
+
color: 'gray7',
|
|
165
177
|
':hover': {
|
|
166
|
-
|
|
178
|
+
theme: 'quinary',
|
|
179
|
+
color: 'gray8'
|
|
167
180
|
}
|
|
181
|
+
},
|
|
182
|
+
':hover': null,
|
|
183
|
+
'.active': {
|
|
184
|
+
theme: null,
|
|
185
|
+
color: 'blue'
|
|
168
186
|
}
|
|
169
187
|
}
|
|
170
188
|
},
|
|
@@ -185,7 +203,7 @@ export default {
|
|
|
185
203
|
}
|
|
186
204
|
},
|
|
187
205
|
|
|
188
|
-
$setStateCollection: ({ state }) =>
|
|
206
|
+
$setStateCollection: ({ state, props }) => cachedKeys(state)
|
|
189
207
|
}
|
|
190
208
|
},
|
|
191
209
|
|
|
@@ -202,20 +220,20 @@ export default {
|
|
|
202
220
|
const tableState = rowState.parent
|
|
203
221
|
const propKey = state.value
|
|
204
222
|
const active = tableState.props[propKey] === rowState.key
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
}
|
|
223
|
+
if (active) {
|
|
224
|
+
console.log('clicked')
|
|
225
|
+
delete tableState.props[propKey] && tableState.update()
|
|
226
|
+
} else {
|
|
227
|
+
const allKeys = Object.keys(tableState.props)
|
|
228
|
+
allKeys.filter(v => {
|
|
229
|
+
const splitInWords = propKey.split(/(?=[A-Z])/)
|
|
230
|
+
return v.includes(splitInWords[0]) && v.includes(splitInWords[1])
|
|
231
|
+
})
|
|
232
|
+
.forEach(v => delete tableState.props[v])
|
|
233
|
+
console.log('clicked2')
|
|
234
|
+
|
|
235
|
+
tableState.update({ props: { [propKey]: rowState.key } })
|
|
236
|
+
}
|
|
219
237
|
}
|
|
220
238
|
},
|
|
221
239
|
|
|
@@ -228,6 +246,9 @@ export default {
|
|
|
228
246
|
const tableState = rowState.parent
|
|
229
247
|
const propKey = diffPropValue(propState.value, state.value)
|
|
230
248
|
const active = tableState.props[propKey] === rowState.key
|
|
249
|
+
|
|
250
|
+
const isRadius = propState.value === 'borderRadius'
|
|
251
|
+
|
|
231
252
|
return {
|
|
232
253
|
position: 'absolute',
|
|
233
254
|
round: '100%',
|
|
@@ -236,18 +257,34 @@ export default {
|
|
|
236
257
|
lazyLoad: true,
|
|
237
258
|
|
|
238
259
|
hide: !active,
|
|
260
|
+
isRadius,
|
|
239
261
|
|
|
240
|
-
'
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
262
|
+
'!isRadius': {
|
|
263
|
+
':nth-child(1)': { left: '50%', top: 'W' },
|
|
264
|
+
':nth-child(2)': { right: 'W', top: '50%' },
|
|
265
|
+
':nth-child(3)': { left: '50%', bottom: 'W' },
|
|
266
|
+
':nth-child(4)': { left: 'W', top: '50%' }
|
|
267
|
+
},
|
|
268
|
+
|
|
269
|
+
'.isRadius': {
|
|
270
|
+
':nth-child(1)': { left: 'X2', top: 'X2' },
|
|
271
|
+
':nth-child(2)': { right: 'X2', top: 'X2' },
|
|
272
|
+
':nth-child(3)': { right: 'X2', bottom: 'X2' },
|
|
273
|
+
':nth-child(4)': { left: 'X2', bottom: 'X2' }
|
|
274
|
+
}
|
|
244
275
|
}
|
|
245
276
|
}
|
|
246
277
|
},
|
|
247
278
|
|
|
248
|
-
$setStateCollection: ({ state }) =>
|
|
279
|
+
$setStateCollection: ({ state }) => {
|
|
280
|
+
const buttonsByProperty = cachedKeys(state)
|
|
281
|
+
return buttonsByProperty
|
|
282
|
+
}
|
|
249
283
|
}
|
|
250
284
|
},
|
|
251
285
|
|
|
252
|
-
$setStateCollection: ({ state }) => Object.keys(BUTTONS)
|
|
286
|
+
$setStateCollection: ({ state }) => Object.keys(BUTTONS).filter(v => {
|
|
287
|
+
const { maxValue } = BUTTONS[v]
|
|
288
|
+
return maxValue ? maxValue > state.val : true
|
|
289
|
+
})
|
|
253
290
|
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|