@symbo.ls/preview 0.0.53 → 0.0.55
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/components/IconsGroup.js +60 -0
- package/src/components/ResponsivePreview.js +9 -13
- package/src/components/index.js +1 -0
- package/src/pages/DesignSystem/index.js +14 -14
- package/src/pages/Export/tools.js +0 -1
- package/src/pages/Icons/index.js +6 -57
- package/src/pages/MediaQuery/lists.js +0 -1
- package/src/pages/Spaces/buttons.js +0 -3
package/package.json
CHANGED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
'use strict'
|
|
2
|
+
|
|
3
|
+
import { copyStringToClipboard } from '@symbo.ls/utils'
|
|
4
|
+
import { ClickableItem, Link, IconText } from '@symbo.ls/components'
|
|
5
|
+
|
|
6
|
+
const IconItem = {
|
|
7
|
+
extend: [ClickableItem, Link, IconText],
|
|
8
|
+
|
|
9
|
+
props: ({ state }) => ({
|
|
10
|
+
round: 'A',
|
|
11
|
+
size: 'C1',
|
|
12
|
+
scrollToTop: false,
|
|
13
|
+
aspectRatio: '1 / 1',
|
|
14
|
+
flexAlign: 'center center',
|
|
15
|
+
href: '/icons/edit-icon/' + state.value,
|
|
16
|
+
theme: 'tertiary',
|
|
17
|
+
icon: {
|
|
18
|
+
fontSize: 'C2',
|
|
19
|
+
name: state.value
|
|
20
|
+
}
|
|
21
|
+
}),
|
|
22
|
+
|
|
23
|
+
on: {
|
|
24
|
+
click: (event, element, state) => {
|
|
25
|
+
copyStringToClipboard(state.value)
|
|
26
|
+
Link.on.click(event, element, state)
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export const IconsGroup = {
|
|
32
|
+
state: { toggleShow: true },
|
|
33
|
+
props: ({ state }) => ({
|
|
34
|
+
hide: !Object.keys(state.list).length
|
|
35
|
+
}),
|
|
36
|
+
|
|
37
|
+
SectionHeader: {
|
|
38
|
+
extend: true,
|
|
39
|
+
heading: {},
|
|
40
|
+
nav: {
|
|
41
|
+
add: {
|
|
42
|
+
props: {
|
|
43
|
+
icon: 'plus',
|
|
44
|
+
href: '/icons/add-icon'
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
|
|
50
|
+
Grid: {
|
|
51
|
+
props: ({ state }) => ({
|
|
52
|
+
hide: !state.toggleShow,
|
|
53
|
+
columns: 'repeat(12, 1fr)',
|
|
54
|
+
gap: 'Z',
|
|
55
|
+
margin: '- -Z2'
|
|
56
|
+
}),
|
|
57
|
+
childExtend: IconItem,
|
|
58
|
+
$setStateCollection: ({ state }) => state.list
|
|
59
|
+
}
|
|
60
|
+
}
|
|
@@ -1,26 +1,22 @@
|
|
|
1
1
|
'use strict'
|
|
2
2
|
|
|
3
|
-
import { Flex,
|
|
3
|
+
import { Flex, ResponsiveSreensPreview } from '@symbo.ls/components'
|
|
4
4
|
|
|
5
5
|
const footer = {
|
|
6
6
|
extend: Flex,
|
|
7
7
|
props: {
|
|
8
8
|
gap: 'A1',
|
|
9
|
-
align: 'center space-between'
|
|
10
|
-
|
|
11
|
-
title: {
|
|
12
|
-
text: 'For the best experience, check it out from screens larger than 1980px',
|
|
13
|
-
color: 'gray6'
|
|
14
|
-
}
|
|
9
|
+
align: 'center space-between'
|
|
15
10
|
},
|
|
16
11
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
12
|
+
Paragraph: {
|
|
13
|
+
text: 'For the best experience, check it out from screens larger than 1980px',
|
|
14
|
+
color: 'gray6',
|
|
15
|
+
margin: '0'
|
|
20
16
|
},
|
|
21
17
|
|
|
22
|
-
|
|
23
|
-
extend:
|
|
18
|
+
ResponsiveToolBar: {
|
|
19
|
+
extend: true,
|
|
24
20
|
devices: {
|
|
25
21
|
childExtend: {
|
|
26
22
|
on: {
|
|
@@ -41,7 +37,7 @@ export const ResponsivePreview = {
|
|
|
41
37
|
position: 'absolute',
|
|
42
38
|
left: 'B',
|
|
43
39
|
right: 'B',
|
|
44
|
-
padding: '0 0
|
|
40
|
+
padding: '0 0 Z2'
|
|
45
41
|
},
|
|
46
42
|
|
|
47
43
|
footer
|
package/src/components/index.js
CHANGED
|
@@ -5,10 +5,10 @@ import { router } from '@domql/router'
|
|
|
5
5
|
import { Flex } from '@symbo.ls/components'
|
|
6
6
|
|
|
7
7
|
import {
|
|
8
|
-
Page,
|
|
9
8
|
ShapePreview,
|
|
10
9
|
ResponsivePreview,
|
|
11
|
-
SpacingPreview
|
|
10
|
+
SpacingPreview,
|
|
11
|
+
Page
|
|
12
12
|
} from '../../components'
|
|
13
13
|
|
|
14
14
|
import { DesignSystemDashboard } from './Dashboard'
|
|
@@ -117,7 +117,6 @@ export const DesignSystem = {
|
|
|
117
117
|
gap: 'B1',
|
|
118
118
|
|
|
119
119
|
page: {
|
|
120
|
-
maxWidth: '100%',
|
|
121
120
|
width: '100%',
|
|
122
121
|
flow: 'row',
|
|
123
122
|
flex: 1,
|
|
@@ -136,17 +135,18 @@ export const DesignSystem = {
|
|
|
136
135
|
},
|
|
137
136
|
|
|
138
137
|
Page: {
|
|
138
|
+
transform: 'translate3d(-3.5%, 0, 0)',
|
|
139
139
|
padding: 'X2 C1 B1',
|
|
140
140
|
flex: 1
|
|
141
|
-
},
|
|
142
|
-
|
|
143
|
-
widget: {
|
|
144
|
-
padding: 'A',
|
|
145
|
-
position: 'sticky',
|
|
146
|
-
width: '100%',
|
|
147
|
-
zIndex: 9999,
|
|
148
|
-
bottom: '0'
|
|
149
141
|
}
|
|
142
|
+
},
|
|
143
|
+
|
|
144
|
+
widget: {
|
|
145
|
+
padding: 'A',
|
|
146
|
+
position: 'sticky',
|
|
147
|
+
width: '100%',
|
|
148
|
+
zIndex: 9999,
|
|
149
|
+
bottom: '0'
|
|
150
150
|
}
|
|
151
151
|
},
|
|
152
152
|
|
|
@@ -166,14 +166,14 @@ export const DesignSystem = {
|
|
|
166
166
|
},
|
|
167
167
|
|
|
168
168
|
page: {
|
|
169
|
-
extend:
|
|
169
|
+
extend: Flex,
|
|
170
170
|
|
|
171
171
|
DesignSystemNavbar: {
|
|
172
|
-
|
|
172
|
+
extend: true,
|
|
173
173
|
...NAV
|
|
174
174
|
},
|
|
175
175
|
|
|
176
|
-
Page: {}
|
|
176
|
+
Page: { extend: Page }
|
|
177
177
|
},
|
|
178
178
|
|
|
179
179
|
widget: {
|
package/src/pages/Icons/index.js
CHANGED
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
'use strict'
|
|
2
2
|
|
|
3
|
-
import { copyStringToClipboard } from '@symbo.ls/utils'
|
|
4
|
-
|
|
5
|
-
import { IconText, Flex, Link, ClickableItem, SectionHeader, Grid } from '@symbo.ls/components'
|
|
6
|
-
|
|
7
3
|
import * as ACCESSIBILITY from '@symbo.ls/icons/src/accessibility'
|
|
8
4
|
import * as BOXMODEL from '@symbo.ls/icons/src/boxModel'
|
|
9
5
|
import * as DISPLAY from '@symbo.ls/icons/src/display'
|
|
@@ -16,64 +12,17 @@ import * as SVG from '@symbo.ls/icons/src/svg'
|
|
|
16
12
|
import * as TECH from '@symbo.ls/icons/src/tech'
|
|
17
13
|
import * as TEXT from '@symbo.ls/icons/src/text'
|
|
18
14
|
|
|
19
|
-
|
|
20
|
-
extend: [ClickableItem, Link, IconText],
|
|
21
|
-
props: ({ state }) => ({
|
|
22
|
-
round: 'A',
|
|
23
|
-
size: 'C1',
|
|
24
|
-
scrollToTop: false,
|
|
25
|
-
aspectRatio: '1 / 1',
|
|
26
|
-
flexAlign: 'center center',
|
|
27
|
-
href: '/icons/edit-icon/' + state.value,
|
|
28
|
-
theme: 'tertiary',
|
|
29
|
-
icon: {
|
|
30
|
-
fontSize: 'C2',
|
|
31
|
-
name: state.value
|
|
32
|
-
}
|
|
33
|
-
}),
|
|
34
|
-
on: {
|
|
35
|
-
click: (event, element, state) => {
|
|
36
|
-
copyStringToClipboard(state.value)
|
|
37
|
-
Link.on.click(event, element, state)
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
const IconsGroup = {
|
|
43
|
-
state: { toggleShow: true },
|
|
44
|
-
props: ({ state }) => ({ hide: !Object.keys(state.list).length }),
|
|
45
|
-
|
|
46
|
-
header: { extend: SectionHeader },
|
|
47
|
-
|
|
48
|
-
iconSet: {
|
|
49
|
-
extend: Grid,
|
|
50
|
-
props: ({ state }) => ({
|
|
51
|
-
hide: !state.toggleShow,
|
|
52
|
-
columns: 'repeat(12, 1fr)',
|
|
53
|
-
gap: 'Z',
|
|
54
|
-
margin: '- -Z2'
|
|
55
|
-
}),
|
|
56
|
-
|
|
57
|
-
childExtend: IconItem,
|
|
58
|
-
$setStateCollection: ({ state }) => state.list
|
|
59
|
-
}
|
|
60
|
-
}
|
|
15
|
+
import { IconsGroup } from '../../components'
|
|
61
16
|
|
|
62
17
|
const ArraizeIconsCategory = (library, state) => {
|
|
63
18
|
const list = Object.keys(library)
|
|
64
|
-
if (state.searched) return list.filter(value =>
|
|
19
|
+
if (state.searched) return list.filter(value => value.includes(state.searched))
|
|
65
20
|
return list
|
|
66
21
|
}
|
|
67
22
|
|
|
68
23
|
const ICON_GROUPS = state => [{
|
|
69
24
|
title: 'Document Icons',
|
|
70
25
|
p: 'All ungrouped document icons',
|
|
71
|
-
|
|
72
|
-
nav: [{
|
|
73
|
-
icon: 'plus',
|
|
74
|
-
href: '/icons/add-icon'
|
|
75
|
-
}],
|
|
76
|
-
|
|
77
26
|
list: ArraizeIconsCategory(SVG, state)
|
|
78
27
|
}, {
|
|
79
28
|
title: 'Accessibility',
|
|
@@ -110,8 +59,9 @@ const ICON_GROUPS = state => [{
|
|
|
110
59
|
export const Icons = {
|
|
111
60
|
state: {},
|
|
112
61
|
|
|
113
|
-
|
|
114
|
-
extend:
|
|
62
|
+
SectionHeader: {
|
|
63
|
+
extend: true,
|
|
64
|
+
|
|
115
65
|
heading: {
|
|
116
66
|
title: 'Icons',
|
|
117
67
|
p: 'Unlike typography, component may has the properties of padding, gap, width and rest.'
|
|
@@ -127,8 +77,7 @@ export const Icons = {
|
|
|
127
77
|
|
|
128
78
|
Line: {},
|
|
129
79
|
|
|
130
|
-
|
|
131
|
-
extend: Flex,
|
|
80
|
+
Flex: {
|
|
132
81
|
props: {
|
|
133
82
|
flow: 'column',
|
|
134
83
|
gap: 'D1'
|
|
@@ -221,7 +221,6 @@ export default {
|
|
|
221
221
|
const propKey = state.value
|
|
222
222
|
const active = tableState.props[propKey] === rowState.key
|
|
223
223
|
if (active) {
|
|
224
|
-
console.log('clicked')
|
|
225
224
|
delete tableState.props[propKey] && tableState.update()
|
|
226
225
|
} else {
|
|
227
226
|
const allKeys = Object.keys(tableState.props)
|
|
@@ -230,8 +229,6 @@ export default {
|
|
|
230
229
|
return v.includes(splitInWords[0]) && v.includes(splitInWords[1])
|
|
231
230
|
})
|
|
232
231
|
.forEach(v => delete tableState.props[v])
|
|
233
|
-
console.log('clicked2')
|
|
234
|
-
|
|
235
232
|
tableState.update({ props: { [propKey]: rowState.key } })
|
|
236
233
|
}
|
|
237
234
|
}
|