@symbo.ls/preview 0.0.22 → 0.0.24
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/notification/index.js +2 -6
- package/.symbols/pills/index.js +3 -1
- package/package.json +4 -2
- package/src/app.js +3 -9
- package/src/index.js +12 -2
- package/src/pages/Components/grid.js +4 -4
- package/src/pages/DesignSystem/index.js +4 -5
- package/src/pages/Export/index.js +3 -4
- package/src/pages/Fonts/index.js +2 -2
- package/src/pages/Icons/index.js +1 -0
- package/src/pages/Shapes/index.js +7 -13
- package/src/pages/Spaces/SpacingScale.js +17 -14
- package/src/pages/Spaces/Table.js +5 -1
- package/src/pages/Spaces/index.js +5 -3
- package/src/pages/Theme/colorTone.js +163 -0
- package/src/pages/Theme/friendTheme.js +30 -0
- package/src/pages/Theme/index.js +185 -0
- package/src/pages/Theme/interactivity.js +115 -0
- package/src/pages/Theme/ntc.js +1689 -0
- package/src/pages/Theme/style.js +49 -0
- package/src/pages/Theme/themingTools.js +107 -0
- package/src/pages/Typography/documentStyles.js +90 -0
- package/src/pages/Typography/index.js +8 -16
- package/src/pages/Typography/rangeButtons.js +3 -4
- package/src/pages/Typography/state.js +0 -3
- package/src/pages/Typography/stylesHelpers.js +54 -0
- package/src/pages/Typography/typeScale.js +56 -71
- package/src/pages/index.js +1 -1
- package/.symbols/notification/style.js +0 -5
- package/src/pages/Typography/docStyles.js +0 -100
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
'use strict'
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
PageTemplate,
|
|
5
|
+
Button,
|
|
6
|
+
Flex,
|
|
7
|
+
SectionHeader,
|
|
8
|
+
AccessibilityCheck,
|
|
9
|
+
SceneThemingBar
|
|
10
|
+
} from '@symbo.ls/components'
|
|
11
|
+
|
|
12
|
+
import { colorTones } from './colorTone'
|
|
13
|
+
import { themingTools } from './themingTools'
|
|
14
|
+
import { interactivity } from './interactivity'
|
|
15
|
+
import { friendTheme } from './friendTheme'
|
|
16
|
+
|
|
17
|
+
import style, { styleLabel } from './style'
|
|
18
|
+
|
|
19
|
+
// import ntc from './ntc'
|
|
20
|
+
|
|
21
|
+
// const returnColor = element => element.lookup('ColorEditor').state.color
|
|
22
|
+
// const setBackground = (element, opacity = 1) => `background: ${opacify(returnColor(element), opacity)}`
|
|
23
|
+
|
|
24
|
+
const nameTheTheme = {
|
|
25
|
+
tag: 'label',
|
|
26
|
+
style: styleLabel,
|
|
27
|
+
attr: { for: 'name-it' },
|
|
28
|
+
caption: {
|
|
29
|
+
props: {
|
|
30
|
+
text: 'Name the theme',
|
|
31
|
+
padding: '0 0 Y1 0',
|
|
32
|
+
size: 'Z'
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
span: {
|
|
36
|
+
tag: 'span',
|
|
37
|
+
props: {
|
|
38
|
+
text: (el, s) => s.value,
|
|
39
|
+
size: 'E'
|
|
40
|
+
},
|
|
41
|
+
attr: { contentEditable: true, placeholder: 'you name it', id: 'name-it' }
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
const footer = { //eslint-disable-line
|
|
46
|
+
extend: [Flex],
|
|
47
|
+
props: {
|
|
48
|
+
height: 'C2',
|
|
49
|
+
padding: '0 A'
|
|
50
|
+
},
|
|
51
|
+
style: {
|
|
52
|
+
margin: 'auto -80px 0',
|
|
53
|
+
justifyContent: 'space-between',
|
|
54
|
+
alignItems: 'center'
|
|
55
|
+
},
|
|
56
|
+
nav: {
|
|
57
|
+
extend: [Flex],
|
|
58
|
+
props: { gap: 'A' },
|
|
59
|
+
childExtend: {
|
|
60
|
+
extend: [Button],
|
|
61
|
+
props: {
|
|
62
|
+
size: 'Z',
|
|
63
|
+
width: 'B2',
|
|
64
|
+
height: 'B2',
|
|
65
|
+
theme: 'transparent'
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
...[
|
|
69
|
+
{ props: { icon: 'starOutline' } },
|
|
70
|
+
{ props: { icon: 'copyOutline' } },
|
|
71
|
+
{ props: { icon: 'share' } }
|
|
72
|
+
]
|
|
73
|
+
},
|
|
74
|
+
span: {
|
|
75
|
+
props: {
|
|
76
|
+
text: 'Autosaved 1 second ago',
|
|
77
|
+
size: 'Y'
|
|
78
|
+
},
|
|
79
|
+
style: { opacity: '.35' }
|
|
80
|
+
},
|
|
81
|
+
|
|
82
|
+
export: {
|
|
83
|
+
extend: Flex,
|
|
84
|
+
style: {
|
|
85
|
+
alignItems: 'center'
|
|
86
|
+
},
|
|
87
|
+
span: {
|
|
88
|
+
props: {
|
|
89
|
+
text: 'Export:',
|
|
90
|
+
size: 'Y',
|
|
91
|
+
padding: '0 B1 0 0'
|
|
92
|
+
},
|
|
93
|
+
style: { opacity: '.35' }
|
|
94
|
+
},
|
|
95
|
+
nav: {
|
|
96
|
+
extend: [Flex],
|
|
97
|
+
props: { gap: 'Y2' },
|
|
98
|
+
childExtend: {
|
|
99
|
+
extend: [Button],
|
|
100
|
+
props: {
|
|
101
|
+
size: 'Z',
|
|
102
|
+
width: 'B2',
|
|
103
|
+
height: 'B2',
|
|
104
|
+
theme: 'transparent'
|
|
105
|
+
},
|
|
106
|
+
style: {
|
|
107
|
+
color: 'white'
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
...[
|
|
111
|
+
{ props: { icon: 'themeOutline' } },
|
|
112
|
+
{ props: { icon: 'sketch' } },
|
|
113
|
+
{ props: { icon: 'arrowAngleMirroringHorizontal' } }
|
|
114
|
+
]
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
export const Theme = {
|
|
120
|
+
key: 'ColorEditor',
|
|
121
|
+
|
|
122
|
+
extend: PageTemplate,
|
|
123
|
+
|
|
124
|
+
style,
|
|
125
|
+
|
|
126
|
+
state: {
|
|
127
|
+
sceneTheme: 'dark',
|
|
128
|
+
title: 'Typography',
|
|
129
|
+
p: 'A general configuration of type properties on the document.'
|
|
130
|
+
},
|
|
131
|
+
|
|
132
|
+
on: {
|
|
133
|
+
init: (el, s) => {
|
|
134
|
+
if (!el.context.SYSTEM) return
|
|
135
|
+
const path = window.location.pathname
|
|
136
|
+
const pathArray = path.split('edit-icon/')
|
|
137
|
+
if (!el.context.SYSTEM) return
|
|
138
|
+
const { THEME } = el.context.SYSTEM
|
|
139
|
+
const themeName = pathArray[1]
|
|
140
|
+
var theme = THEME[themeName]
|
|
141
|
+
|
|
142
|
+
if (themeName && theme) {
|
|
143
|
+
s.update({
|
|
144
|
+
themeName: themeName,
|
|
145
|
+
value: theme
|
|
146
|
+
}, { preventUpdate: true })
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
},
|
|
150
|
+
|
|
151
|
+
header: {
|
|
152
|
+
extend: SectionHeader,
|
|
153
|
+
props: {
|
|
154
|
+
padding: 'C 0 B2 0',
|
|
155
|
+
margin: '0'
|
|
156
|
+
},
|
|
157
|
+
heading: '',
|
|
158
|
+
label: nameTheTheme,
|
|
159
|
+
nav: { extend: SceneThemingBar }
|
|
160
|
+
},
|
|
161
|
+
|
|
162
|
+
cnt: {
|
|
163
|
+
extend: [Flex],
|
|
164
|
+
props: {
|
|
165
|
+
gap: 'D'
|
|
166
|
+
},
|
|
167
|
+
|
|
168
|
+
aside: colorTones,
|
|
169
|
+
colorEdit: {
|
|
170
|
+
props: { gap: 'C2', flexFlow: 'column' },
|
|
171
|
+
themingTools,
|
|
172
|
+
interactivity,
|
|
173
|
+
friendTheme
|
|
174
|
+
}
|
|
175
|
+
},
|
|
176
|
+
|
|
177
|
+
check: {
|
|
178
|
+
extend: AccessibilityCheck,
|
|
179
|
+
props: {
|
|
180
|
+
padding: 'E 0 F'
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
// footer
|
|
185
|
+
}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
'use strict'
|
|
2
|
+
|
|
3
|
+
import { Block, Grid, Text, SelectField, CommonField } from '@symbo.ls/components'
|
|
4
|
+
|
|
5
|
+
export const interactivity = {
|
|
6
|
+
h6: {
|
|
7
|
+
extend: [Text, Block],
|
|
8
|
+
props: { text: 'Interactivity', padding: '0 0 Z2 0', size: 'B' },
|
|
9
|
+
style: { fontWeight: 'normal', margin: 0 }
|
|
10
|
+
},
|
|
11
|
+
interactivitySet: {
|
|
12
|
+
extend: Grid,
|
|
13
|
+
props: {
|
|
14
|
+
columns: 'repeat(4, 1fr)',
|
|
15
|
+
rows: 'repear(2, 1fr)',
|
|
16
|
+
columnGap: 'C',
|
|
17
|
+
rowGap: 'A2'
|
|
18
|
+
},
|
|
19
|
+
style: { width: 'fit-content' },
|
|
20
|
+
childExtend: {
|
|
21
|
+
extend: CommonField,
|
|
22
|
+
props: { padding: 0 },
|
|
23
|
+
element: {
|
|
24
|
+
extend: SelectField,
|
|
25
|
+
buttons: { ...[{ props: { icon: 'plus' } }] }
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
...[
|
|
29
|
+
{
|
|
30
|
+
caption: { props: { text: ':hover' } },
|
|
31
|
+
element: {
|
|
32
|
+
title: {
|
|
33
|
+
props: { icon: 'hoverOutline', text: 'none' }
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
caption: { props: { text: ':focus' } },
|
|
39
|
+
element: {
|
|
40
|
+
title: {
|
|
41
|
+
props: { icon: 'focusOutline', text: 'none' }
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
caption: { props: { text: ':active' } },
|
|
47
|
+
element: {
|
|
48
|
+
title: {
|
|
49
|
+
props: { icon: 'clickOutline', text: 'none' }
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
caption: { props: { text: ':selection' } },
|
|
55
|
+
element: {
|
|
56
|
+
title: {
|
|
57
|
+
props: { icon: 'selection', text: 'none' }
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
caption: { props: { text: ':link' } },
|
|
63
|
+
element: {
|
|
64
|
+
title: {
|
|
65
|
+
props: { icon: 'clickOutline', text: 'none' }
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
caption: { props: { text: ':visited' } },
|
|
71
|
+
element: {
|
|
72
|
+
title: {
|
|
73
|
+
props: { icon: 'focusOutline', text: 'none' }
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
caption: { props: { text: ':disabled' } },
|
|
79
|
+
element: {
|
|
80
|
+
title: {
|
|
81
|
+
props: { icon: 'disabled', text: 'none' }
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
|
|
86
|
+
{
|
|
87
|
+
caption: null,
|
|
88
|
+
style: {
|
|
89
|
+
display: 'flex',
|
|
90
|
+
alignItems: 'flex-end'
|
|
91
|
+
},
|
|
92
|
+
element: {
|
|
93
|
+
title: {
|
|
94
|
+
props: { text: 'Add :pseudo' }
|
|
95
|
+
},
|
|
96
|
+
buttons: {
|
|
97
|
+
style: {
|
|
98
|
+
button: {
|
|
99
|
+
background: 'transparent',
|
|
100
|
+
borderRadius: 0,
|
|
101
|
+
'&:first-child': { borderRight: '.1px solid rgba(255, 255, 255, .1)' },
|
|
102
|
+
'&:hover': { background: 'transparent' }
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
...[
|
|
106
|
+
{ props: { icon: 'arrowAngleDown' } },
|
|
107
|
+
{ props: { icon: 'plus' } }
|
|
108
|
+
|
|
109
|
+
]
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
]
|
|
114
|
+
}
|
|
115
|
+
}
|