@symbo.ls/preview 0.0.48 → 0.0.49
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 +40 -18
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: {
|
|
@@ -55,6 +55,7 @@ const diffIconTypes = (parentKey, key) => {
|
|
|
55
55
|
|
|
56
56
|
const BUTTONS = {
|
|
57
57
|
margin: {
|
|
58
|
+
maxValue: 3000,
|
|
58
59
|
blockStart: {},
|
|
59
60
|
inlineEnd: {},
|
|
60
61
|
blockEnd: {},
|
|
@@ -69,22 +70,26 @@ const BUTTONS = {
|
|
|
69
70
|
maxWidth: {}
|
|
70
71
|
},
|
|
71
72
|
borderWidth: {
|
|
73
|
+
maxValue: 1280,
|
|
72
74
|
blockStartWidth: {},
|
|
73
75
|
inlineEndWidth: {},
|
|
74
76
|
blockEndWidth: {},
|
|
75
77
|
inlineStartWidth: {}
|
|
76
78
|
},
|
|
77
79
|
padding: {
|
|
80
|
+
maxValue: 3000,
|
|
78
81
|
blockStart: {},
|
|
79
82
|
inlineEnd: {},
|
|
80
83
|
blockEnd: {},
|
|
81
84
|
inlineStart: {}
|
|
82
85
|
},
|
|
83
86
|
gap: {
|
|
87
|
+
maxValue: 3000,
|
|
84
88
|
Horizontal: {},
|
|
85
89
|
Vertical: {}
|
|
86
90
|
},
|
|
87
91
|
borderRadius: {
|
|
92
|
+
maxValue: 1280,
|
|
88
93
|
endStart: {},
|
|
89
94
|
startEnd: {},
|
|
90
95
|
endEnd: {},
|
|
@@ -92,6 +97,12 @@ const BUTTONS = {
|
|
|
92
97
|
}
|
|
93
98
|
}
|
|
94
99
|
|
|
100
|
+
let keys
|
|
101
|
+
const cachedKeys = state => {
|
|
102
|
+
if (!keys) keys = Object.keys(BUTTONS[state.value]).filter(v => v !== 'maxValue')
|
|
103
|
+
return keys
|
|
104
|
+
}
|
|
105
|
+
|
|
95
106
|
export default {
|
|
96
107
|
props: {
|
|
97
108
|
lazyLoad: true,
|
|
@@ -105,6 +116,8 @@ export default {
|
|
|
105
116
|
props: ({ key, state, parent }) => ({
|
|
106
117
|
active: state.parent.parent.props[state.value] === state.parent.key,
|
|
107
118
|
icon: { name: state.value },
|
|
119
|
+
lazyLoad: true,
|
|
120
|
+
|
|
108
121
|
'.active': {
|
|
109
122
|
color: 'blue',
|
|
110
123
|
':hover': {
|
|
@@ -117,6 +130,7 @@ export default {
|
|
|
117
130
|
extend: Dropdown,
|
|
118
131
|
|
|
119
132
|
props: {
|
|
133
|
+
lazyLoad: true,
|
|
120
134
|
minWidth: 'none',
|
|
121
135
|
grid: { gap: '0' }
|
|
122
136
|
},
|
|
@@ -126,9 +140,10 @@ export default {
|
|
|
126
140
|
grid: {
|
|
127
141
|
extend: GridInDropdown,
|
|
128
142
|
props: ({ state }) => {
|
|
129
|
-
const keys =
|
|
143
|
+
const keys = cachedKeys(state)
|
|
130
144
|
if (keys.length < 4) {
|
|
131
145
|
return {
|
|
146
|
+
lazyLoad: true,
|
|
132
147
|
columns: 'repeat(4, 1fr)'
|
|
133
148
|
}
|
|
134
149
|
}
|
|
@@ -152,6 +167,7 @@ export default {
|
|
|
152
167
|
const iconKey = diffIconTypes(propState.value, state.value)
|
|
153
168
|
const active = tableState.props[propKey] === rowState.key
|
|
154
169
|
return {
|
|
170
|
+
lazyLoad: true,
|
|
155
171
|
active,
|
|
156
172
|
icon: {
|
|
157
173
|
name: iconKey
|
|
@@ -185,7 +201,7 @@ export default {
|
|
|
185
201
|
}
|
|
186
202
|
},
|
|
187
203
|
|
|
188
|
-
$setStateCollection: ({ state }) =>
|
|
204
|
+
$setStateCollection: ({ state, props }) => cachedKeys(state)
|
|
189
205
|
}
|
|
190
206
|
},
|
|
191
207
|
|
|
@@ -202,20 +218,20 @@ export default {
|
|
|
202
218
|
const tableState = rowState.parent
|
|
203
219
|
const propKey = state.value
|
|
204
220
|
const active = tableState.props[propKey] === rowState.key
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
}
|
|
221
|
+
if (active) {
|
|
222
|
+
console.log('clicked')
|
|
223
|
+
delete tableState.props[propKey] && tableState.update()
|
|
224
|
+
} else {
|
|
225
|
+
const allKeys = Object.keys(tableState.props)
|
|
226
|
+
allKeys.filter(v => {
|
|
227
|
+
const splitInWords = propKey.split(/(?=[A-Z])/)
|
|
228
|
+
return v.includes(splitInWords[0]) && v.includes(splitInWords[1])
|
|
229
|
+
})
|
|
230
|
+
.forEach(v => delete tableState.props[v])
|
|
231
|
+
console.log('clicked2')
|
|
232
|
+
|
|
233
|
+
tableState.update({ props: { [propKey]: rowState.key } })
|
|
234
|
+
}
|
|
219
235
|
}
|
|
220
236
|
},
|
|
221
237
|
|
|
@@ -245,9 +261,15 @@ export default {
|
|
|
245
261
|
}
|
|
246
262
|
},
|
|
247
263
|
|
|
248
|
-
$setStateCollection: ({ state }) =>
|
|
264
|
+
$setStateCollection: ({ state }) => {
|
|
265
|
+
const buttonsByProperty = cachedKeys(state)
|
|
266
|
+
return buttonsByProperty
|
|
267
|
+
}
|
|
249
268
|
}
|
|
250
269
|
},
|
|
251
270
|
|
|
252
|
-
$setStateCollection: ({ state }) => Object.keys(BUTTONS)
|
|
271
|
+
$setStateCollection: ({ state }) => Object.keys(BUTTONS).filter(v => {
|
|
272
|
+
const { maxValue } = BUTTONS[v]
|
|
273
|
+
return maxValue ? maxValue > state.val : true
|
|
274
|
+
})
|
|
253
275
|
}
|