@symbo.ls/preview 0.0.88 → 0.0.89
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/Spaces/buttons.js → components/SpacingButton/actionButtons.js} +3 -3
- package/src/components/{SpacingPropButton → SpacingButton}/dropdown.js +2 -2
- package/src/components/{SpacingPropButton → SpacingButton}/index.js +69 -46
- package/src/components/SpacingButton/props.js +45 -0
- package/src/components/SpacingTable.js +4 -71
- package/src/components/index.js +1 -1
- package/src/pages/MediaQuery/lists.js +0 -1
package/package.json
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
'use strict'
|
|
2
2
|
|
|
3
3
|
import { Flex } from '@symbo.ls/components'
|
|
4
|
-
import {
|
|
4
|
+
import { SpacingButton } from '..'
|
|
5
|
+
import { SPACING_BUTTONS } from './props'
|
|
5
6
|
|
|
6
7
|
export const setTableButtons = ({ state }) =>
|
|
7
8
|
Object.keys(SPACING_BUTTONS).filter(v => {
|
|
@@ -35,7 +36,6 @@ export default {
|
|
|
35
36
|
':hover': { opacity: '1' }
|
|
36
37
|
},
|
|
37
38
|
|
|
38
|
-
childExtend:
|
|
39
|
-
|
|
39
|
+
childExtend: SpacingButton,
|
|
40
40
|
$setStateCollection: setTableButtons
|
|
41
41
|
}
|
|
@@ -1,53 +1,10 @@
|
|
|
1
1
|
'use strict'
|
|
2
2
|
|
|
3
|
-
import { WiderButton, DropdownParent } from '@symbo.ls/components'
|
|
3
|
+
import { WiderButton, DropdownParent, Icon } from '@symbo.ls/components'
|
|
4
4
|
|
|
5
|
+
import { SPACING_BUTTONS } from './props'
|
|
5
6
|
import dropdown from './dropdown'
|
|
6
7
|
|
|
7
|
-
export const SPACING_BUTTONS = {
|
|
8
|
-
margin: {
|
|
9
|
-
maxValue: 3000,
|
|
10
|
-
blockStart: {},
|
|
11
|
-
inlineEnd: {},
|
|
12
|
-
blockEnd: {},
|
|
13
|
-
inlineStart: {}
|
|
14
|
-
},
|
|
15
|
-
height: {
|
|
16
|
-
minWidth: {},
|
|
17
|
-
maxWidth: {}
|
|
18
|
-
},
|
|
19
|
-
width: {
|
|
20
|
-
minWidth: {},
|
|
21
|
-
maxWidth: {}
|
|
22
|
-
},
|
|
23
|
-
borderWidth: {
|
|
24
|
-
maxValue: 1280,
|
|
25
|
-
blockStartWidth: {},
|
|
26
|
-
inlineEndWidth: {},
|
|
27
|
-
blockEndWidth: {},
|
|
28
|
-
inlineStartWidth: {}
|
|
29
|
-
},
|
|
30
|
-
padding: {
|
|
31
|
-
maxValue: 3000,
|
|
32
|
-
blockStart: {},
|
|
33
|
-
inlineEnd: {},
|
|
34
|
-
blockEnd: {},
|
|
35
|
-
inlineStart: {}
|
|
36
|
-
},
|
|
37
|
-
gap: {
|
|
38
|
-
maxValue: 3000,
|
|
39
|
-
Horizontal: {},
|
|
40
|
-
Vertical: {}
|
|
41
|
-
},
|
|
42
|
-
borderRadius: {
|
|
43
|
-
maxValue: 1280,
|
|
44
|
-
endStart: {},
|
|
45
|
-
startEnd: {},
|
|
46
|
-
endEnd: {},
|
|
47
|
-
startStart: {}
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
|
|
51
8
|
export const ChoosableButton = {
|
|
52
9
|
props: ({ key }) => ({
|
|
53
10
|
padding: 'Z',
|
|
@@ -128,7 +85,7 @@ export const DotForRowButton = {
|
|
|
128
85
|
}
|
|
129
86
|
}
|
|
130
87
|
|
|
131
|
-
export const
|
|
88
|
+
export const SpacingButton = {
|
|
132
89
|
extend: [ChoosableButton, DropdownParent, WiderButton],
|
|
133
90
|
|
|
134
91
|
props: (element) => {
|
|
@@ -192,6 +149,72 @@ export const SpacingPropButton = {
|
|
|
192
149
|
dropdown
|
|
193
150
|
}
|
|
194
151
|
|
|
152
|
+
const DotsInButton = SpacingButton.dots
|
|
153
|
+
|
|
154
|
+
export const SpacingRowButton = {
|
|
155
|
+
props: ({ state }) => {
|
|
156
|
+
const property = state
|
|
157
|
+
const row = property.parent
|
|
158
|
+
const table = row.parent
|
|
159
|
+
|
|
160
|
+
const propKey = property.value
|
|
161
|
+
|
|
162
|
+
const active = Object.keys(table.props).filter(prop => {
|
|
163
|
+
const hasProp = prop.toLowerCase().includes(propKey.toLowerCase())
|
|
164
|
+
const keyMathes = table.props[prop] === row.key
|
|
165
|
+
return hasProp && keyMathes
|
|
166
|
+
}).length
|
|
167
|
+
|
|
168
|
+
return {
|
|
169
|
+
active: !!active,
|
|
170
|
+
position: 'relative',
|
|
171
|
+
round: 'Z',
|
|
172
|
+
display: 'flex',
|
|
173
|
+
|
|
174
|
+
icon: {
|
|
175
|
+
name: propKey,
|
|
176
|
+
opacity: '0',
|
|
177
|
+
color: 'gray5',
|
|
178
|
+
margin: 'auto'
|
|
179
|
+
},
|
|
180
|
+
|
|
181
|
+
'.active': {
|
|
182
|
+
boxShadow: '0, 0, 0, 3px, gray1, inset'
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
},
|
|
186
|
+
|
|
187
|
+
icon: {
|
|
188
|
+
extend: Icon,
|
|
189
|
+
props: ({ state }) => {
|
|
190
|
+
const property = state
|
|
191
|
+
const row = property.parent
|
|
192
|
+
const table = row.parent
|
|
193
|
+
|
|
194
|
+
const propKey = property.value
|
|
195
|
+
const middleActive = table.props[propKey] === row.key
|
|
196
|
+
|
|
197
|
+
const active = Object.keys(table.props).filter(prop => {
|
|
198
|
+
const hasProp = prop.toLowerCase().includes(propKey.toLowerCase())
|
|
199
|
+
const keyMathes = table.props[prop] === row.key
|
|
200
|
+
return hasProp && keyMathes
|
|
201
|
+
}).length
|
|
202
|
+
|
|
203
|
+
return {
|
|
204
|
+
active,
|
|
205
|
+
middleActive,
|
|
206
|
+
'.active': { opacity: '1' },
|
|
207
|
+
'.middleActive': { color: 'blue' }
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
},
|
|
211
|
+
|
|
212
|
+
dots: {
|
|
213
|
+
childExtend: DotForRowButton,
|
|
214
|
+
$setStateCollection: DotsInButton.$setStateCollection
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
|
|
195
218
|
export const getStateTree = element => {
|
|
196
219
|
const table = element.lookup('Page').state
|
|
197
220
|
const row = table.sequence[table.selectedKey]
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
'use strict'
|
|
2
|
+
|
|
3
|
+
export const SPACING_BUTTONS = {
|
|
4
|
+
margin: {
|
|
5
|
+
maxValue: 3000,
|
|
6
|
+
blockStart: {},
|
|
7
|
+
inlineEnd: {},
|
|
8
|
+
blockEnd: {},
|
|
9
|
+
inlineStart: {}
|
|
10
|
+
},
|
|
11
|
+
height: {
|
|
12
|
+
minWidth: {},
|
|
13
|
+
maxWidth: {}
|
|
14
|
+
},
|
|
15
|
+
width: {
|
|
16
|
+
minWidth: {},
|
|
17
|
+
maxWidth: {}
|
|
18
|
+
},
|
|
19
|
+
borderWidth: {
|
|
20
|
+
maxValue: 1280,
|
|
21
|
+
blockStartWidth: {},
|
|
22
|
+
inlineEndWidth: {},
|
|
23
|
+
blockEndWidth: {},
|
|
24
|
+
inlineStartWidth: {}
|
|
25
|
+
},
|
|
26
|
+
padding: {
|
|
27
|
+
maxValue: 3000,
|
|
28
|
+
blockStart: {},
|
|
29
|
+
inlineEnd: {},
|
|
30
|
+
blockEnd: {},
|
|
31
|
+
inlineStart: {}
|
|
32
|
+
},
|
|
33
|
+
gap: {
|
|
34
|
+
maxValue: 3000,
|
|
35
|
+
Horizontal: {},
|
|
36
|
+
Vertical: {}
|
|
37
|
+
},
|
|
38
|
+
borderRadius: {
|
|
39
|
+
maxValue: 1280,
|
|
40
|
+
endStart: {},
|
|
41
|
+
startEnd: {},
|
|
42
|
+
endEnd: {},
|
|
43
|
+
startStart: {}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
@@ -1,17 +1,14 @@
|
|
|
1
1
|
'use strict'
|
|
2
2
|
|
|
3
3
|
import {
|
|
4
|
-
Icon,
|
|
5
4
|
Grid,
|
|
6
5
|
Pseudo,
|
|
7
6
|
mapSequence,
|
|
8
7
|
sortSequence
|
|
9
8
|
} from '@symbo.ls/components'
|
|
10
9
|
|
|
11
|
-
import
|
|
12
|
-
import {
|
|
13
|
-
|
|
14
|
-
const DotsInButton = SpacingPropButton.dots
|
|
10
|
+
import { SpacingRowButton } from '.'
|
|
11
|
+
import actionButtons, { setRowButtons } from './SpacingButton/actionButtons'
|
|
15
12
|
|
|
16
13
|
const Cell = {
|
|
17
14
|
tag: 'div',
|
|
@@ -107,71 +104,7 @@ const Row = {
|
|
|
107
104
|
px: {},
|
|
108
105
|
buttons: {
|
|
109
106
|
extend: Grid,
|
|
110
|
-
|
|
111
|
-
childExtend: {
|
|
112
|
-
props: ({ state }) => {
|
|
113
|
-
const property = state
|
|
114
|
-
const row = property.parent
|
|
115
|
-
const table = row.parent
|
|
116
|
-
|
|
117
|
-
const propKey = property.value
|
|
118
|
-
|
|
119
|
-
const active = Object.keys(table.props).filter(prop => {
|
|
120
|
-
const hasProp = prop.toLowerCase().includes(propKey.toLowerCase())
|
|
121
|
-
const keyMathes = table.props[prop] === row.key
|
|
122
|
-
return hasProp && keyMathes
|
|
123
|
-
}).length
|
|
124
|
-
|
|
125
|
-
return {
|
|
126
|
-
active: !!active,
|
|
127
|
-
position: 'relative',
|
|
128
|
-
round: 'Z',
|
|
129
|
-
display: 'flex',
|
|
130
|
-
|
|
131
|
-
icon: {
|
|
132
|
-
name: propKey,
|
|
133
|
-
opacity: '0',
|
|
134
|
-
color: 'gray5',
|
|
135
|
-
margin: 'auto'
|
|
136
|
-
},
|
|
137
|
-
|
|
138
|
-
'.active': {
|
|
139
|
-
boxShadow: '0, 0, 0, 3px, gray1, inset'
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
},
|
|
143
|
-
|
|
144
|
-
icon: {
|
|
145
|
-
extend: Icon,
|
|
146
|
-
props: ({ state }) => {
|
|
147
|
-
const property = state
|
|
148
|
-
const row = property.parent
|
|
149
|
-
const table = row.parent
|
|
150
|
-
|
|
151
|
-
const propKey = property.value
|
|
152
|
-
const middleActive = table.props[propKey] === row.key
|
|
153
|
-
|
|
154
|
-
const active = Object.keys(table.props).filter(prop => {
|
|
155
|
-
const hasProp = prop.toLowerCase().includes(propKey.toLowerCase())
|
|
156
|
-
const keyMathes = table.props[prop] === row.key
|
|
157
|
-
return hasProp && keyMathes
|
|
158
|
-
}).length
|
|
159
|
-
|
|
160
|
-
return {
|
|
161
|
-
active,
|
|
162
|
-
middleActive,
|
|
163
|
-
'.active': { opacity: '1' },
|
|
164
|
-
'.middleActive': { color: 'blue' }
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
},
|
|
168
|
-
|
|
169
|
-
dots: {
|
|
170
|
-
childExtend: DotForRowButton,
|
|
171
|
-
$setStateCollection: DotsInButton.$setStateCollection
|
|
172
|
-
}
|
|
173
|
-
},
|
|
174
|
-
|
|
107
|
+
childExtend: SpacingRowButton,
|
|
175
108
|
$setStateCollection: setRowButtons
|
|
176
109
|
},
|
|
177
110
|
graph: { line: {} },
|
|
@@ -273,5 +206,5 @@ export const SpacingTable = {
|
|
|
273
206
|
$setStateCollection: ({ state }) => mapSequence(state, sortSequence)
|
|
274
207
|
},
|
|
275
208
|
|
|
276
|
-
actionButtons
|
|
209
|
+
actionButtons
|
|
277
210
|
}
|
package/src/components/index.js
CHANGED
|
@@ -20,6 +20,6 @@ export * from './IconsGroup'
|
|
|
20
20
|
export * from './FontText'
|
|
21
21
|
export * from './DesignComponent'
|
|
22
22
|
export * from './ColumnParagrphs'
|
|
23
|
-
export * from './
|
|
23
|
+
export * from './SpacingButton'
|
|
24
24
|
export * from './UploadImage'
|
|
25
25
|
export * from './SpacingTable'
|