@symbo.ls/preview 0.0.15 → 0.0.17
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/button-download/index.js +4 -2
- package/.symbols/button-pro/index.js +7 -14
- package/.symbols/button-pro/style.js +0 -15
- package/.symbols/button-theme-switcher/index.js +12 -15
- package/.symbols/button-user/index.js +0 -1
- package/.symbols/datepicker/index.js +13 -2
- package/.symbols/dropdown-list/index.js +0 -2
- package/.symbols/field/index.js +0 -1
- package/.symbols/label/index.js +0 -1
- package/package.json +1 -1
- package/src/config/index.js +1 -1
- package/src/config/theme.js +1 -71
- package/src/pages/DesignSystem/index.js +1 -1
- package/src/pages/Editor/scene.js +0 -2
- package/src/pages/Export/scene.js +3 -0
- package/src/pages/Export/state.js +2 -2
- package/src/pages/Icons/index.js +55 -14
- package/src/pages/Typography/rangeButtons.js +59 -0
- package/src/pages/Typography/typeScale.js +73 -66
- package/svgSprite.config.js +2 -1
|
@@ -14,9 +14,11 @@ const component = {
|
|
|
14
14
|
props: {
|
|
15
15
|
icon: 'arrowDown',
|
|
16
16
|
gap: 'X2',
|
|
17
|
-
theme: '
|
|
17
|
+
theme: 'quinary',
|
|
18
18
|
text: 'Download',
|
|
19
|
-
padding: 'Z2 B2',
|
|
19
|
+
// padding: 'Z2 B2',
|
|
20
|
+
border: '.2em, solid, blue .2',
|
|
21
|
+
padding: 'A B2',
|
|
20
22
|
round: 'C'
|
|
21
23
|
}
|
|
22
24
|
}
|
|
@@ -15,11 +15,12 @@ const component = {
|
|
|
15
15
|
extend: KangorooButton,
|
|
16
16
|
|
|
17
17
|
props: {
|
|
18
|
-
|
|
18
|
+
|
|
19
19
|
round: 'Z2',
|
|
20
20
|
padding: ['X1', 'X1', 'X1', 'A'],
|
|
21
21
|
size: 'A',
|
|
22
22
|
gap: 'Z',
|
|
23
|
+
fontWeight: 'bold',
|
|
23
24
|
|
|
24
25
|
iconText: {
|
|
25
26
|
gap: 'X1',
|
|
@@ -28,29 +29,22 @@ const component = {
|
|
|
28
29
|
alignItems: 'center'
|
|
29
30
|
},
|
|
30
31
|
|
|
31
|
-
|
|
32
|
+
child: {
|
|
32
33
|
round: 12,
|
|
33
|
-
theme: ['lightDark', 'inverse'],
|
|
34
34
|
size: 'Z',
|
|
35
35
|
padding: 'Z A2',
|
|
36
36
|
text: '1 month free'
|
|
37
37
|
}
|
|
38
38
|
},
|
|
39
39
|
|
|
40
|
-
iconText: {
|
|
41
|
-
|
|
42
|
-
props: el => el.parent.props.iconText
|
|
43
|
-
},
|
|
44
|
-
|
|
45
|
-
child: {
|
|
46
|
-
props: el => el.parent.props.label
|
|
47
|
-
}
|
|
40
|
+
iconText: {},
|
|
41
|
+
child: {}
|
|
48
42
|
}
|
|
49
43
|
|
|
50
44
|
const code = `{
|
|
51
45
|
extend: Button,
|
|
52
46
|
props: {
|
|
53
|
-
|
|
47
|
+
|
|
54
48
|
round: 12,
|
|
55
49
|
padding: ['X1', 'X1', 'X1', 'A'],
|
|
56
50
|
size: 'A',
|
|
@@ -59,7 +53,6 @@ const code = `{
|
|
|
59
53
|
|
|
60
54
|
label: {
|
|
61
55
|
round: 12,
|
|
62
|
-
theme: ['lightDark', 'inverse'],
|
|
63
56
|
size: 'Z',
|
|
64
57
|
gap: 'A',
|
|
65
58
|
padding: 'Z A2',
|
|
@@ -70,7 +63,7 @@ const code = `{
|
|
|
70
63
|
|
|
71
64
|
const defaultState = {}
|
|
72
65
|
const props = {
|
|
73
|
-
|
|
66
|
+
|
|
74
67
|
round: 12,
|
|
75
68
|
padding: ['X1', 'X1', 'X1', 'A'],
|
|
76
69
|
size: 'A',
|
|
@@ -1,19 +1,4 @@
|
|
|
1
1
|
'use strict'
|
|
2
2
|
|
|
3
3
|
export default {
|
|
4
|
-
color: '#241C39',
|
|
5
|
-
fontWeight: 'bold',
|
|
6
|
-
|
|
7
|
-
'> svg': {
|
|
8
|
-
borderRadius: '100%',
|
|
9
|
-
padding: '.2em',
|
|
10
|
-
background: '#241C39',
|
|
11
|
-
color: 'white',
|
|
12
|
-
marginRight: `${6 / 16}em`
|
|
13
|
-
},
|
|
14
|
-
|
|
15
|
-
span: {
|
|
16
|
-
alignItems: 'center',
|
|
17
|
-
marginLeft: '8px'
|
|
18
|
-
}
|
|
19
4
|
}
|
|
@@ -4,6 +4,7 @@ import { CATEGORIES } from '../categories'
|
|
|
4
4
|
|
|
5
5
|
import style from './style'
|
|
6
6
|
import { KangorooButton } from '@symbo.ls/components'
|
|
7
|
+
import { isObject } from 'domql/src/utils'
|
|
7
8
|
|
|
8
9
|
const key = 'button-theme-switcher'
|
|
9
10
|
const title = 'Theme Switcher'
|
|
@@ -16,7 +17,6 @@ const component = {
|
|
|
16
17
|
|
|
17
18
|
props: {
|
|
18
19
|
round: 'C',
|
|
19
|
-
theme: 'lightDark',
|
|
20
20
|
size: 'A',
|
|
21
21
|
padding: 'X1 Y X1 A1',
|
|
22
22
|
gap: 'Z1',
|
|
@@ -27,8 +27,7 @@ const component = {
|
|
|
27
27
|
text: 'Light Mode'
|
|
28
28
|
},
|
|
29
29
|
|
|
30
|
-
|
|
31
|
-
theme: ['lightDark', 'inverse'],
|
|
30
|
+
child: {
|
|
32
31
|
round: 'C',
|
|
33
32
|
icon: 'moon',
|
|
34
33
|
padding: 'Z Z1',
|
|
@@ -36,20 +35,21 @@ const component = {
|
|
|
36
35
|
}
|
|
37
36
|
},
|
|
38
37
|
|
|
39
|
-
iconText: {
|
|
40
|
-
|
|
41
|
-
|
|
38
|
+
iconText: {},
|
|
39
|
+
child: {}
|
|
40
|
+
}
|
|
42
41
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
42
|
+
function strfy (obj) {
|
|
43
|
+
return Object.entries(obj).reduce((str, [p, val]) => {
|
|
44
|
+
return `${str}${p}::${isObject(val) ? strfy(val) : val}\n`;
|
|
45
|
+
}, '');
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
-
const code =
|
|
48
|
+
const code = strfy(component)
|
|
49
|
+
const code2 = `{
|
|
49
50
|
extend: KangorooButton,
|
|
50
51
|
props: {
|
|
51
52
|
round: 'C',
|
|
52
|
-
theme: 'lightDark',
|
|
53
53
|
size: 'Z',
|
|
54
54
|
|
|
55
55
|
light: {
|
|
@@ -58,7 +58,6 @@ const code = `{
|
|
|
58
58
|
},
|
|
59
59
|
|
|
60
60
|
dark: {
|
|
61
|
-
theme: ['lightDark', 'inverse'],
|
|
62
61
|
round: 'C',
|
|
63
62
|
icon: 'moon',
|
|
64
63
|
text: 'Dark Mode'
|
|
@@ -69,7 +68,6 @@ const code = `{
|
|
|
69
68
|
const defaultState = {}
|
|
70
69
|
const props = {
|
|
71
70
|
round: 'C',
|
|
72
|
-
theme: 'lightDark',
|
|
73
71
|
size: 'Z',
|
|
74
72
|
|
|
75
73
|
light: {
|
|
@@ -77,8 +75,7 @@ const props = {
|
|
|
77
75
|
text: 'Light Mode'
|
|
78
76
|
},
|
|
79
77
|
|
|
80
|
-
|
|
81
|
-
theme: ['lightDark', 'inverse'],
|
|
78
|
+
child: {
|
|
82
79
|
round: 'C',
|
|
83
80
|
icon: 'moon',
|
|
84
81
|
text: 'Dark Mode'
|
|
@@ -13,13 +13,24 @@ const category = CATEGORIES[7]
|
|
|
13
13
|
|
|
14
14
|
const component = {
|
|
15
15
|
style,
|
|
16
|
-
extend: DatePicker
|
|
16
|
+
extend: DatePicker,
|
|
17
|
+
props: {
|
|
18
|
+
theme: null,
|
|
19
|
+
background: '--theme-quinary-dark-background',
|
|
20
|
+
style: {
|
|
21
|
+
backdropFilter: 'blur(3px)',
|
|
22
|
+
}
|
|
23
|
+
}
|
|
17
24
|
}
|
|
18
25
|
|
|
19
26
|
const code = `{}`
|
|
20
27
|
|
|
21
28
|
const defaultState = {}
|
|
22
|
-
const props = {
|
|
29
|
+
const props = {
|
|
30
|
+
style: {
|
|
31
|
+
backdropFilter: 'blur(3px)',
|
|
32
|
+
}
|
|
33
|
+
}
|
|
23
34
|
|
|
24
35
|
const settings = {
|
|
25
36
|
gridOptions: { colspan: 7, rowspan: 5 }
|
package/.symbols/field/index.js
CHANGED
package/.symbols/label/index.js
CHANGED
package/package.json
CHANGED
package/src/config/index.js
CHANGED
package/src/config/theme.js
CHANGED
|
@@ -1,83 +1,13 @@
|
|
|
1
1
|
'use strict'
|
|
2
2
|
|
|
3
|
-
import dots from '../assets/dots.png'
|
|
4
|
-
import dotsDark from '../assets/dotsDark.png'
|
|
5
|
-
|
|
6
|
-
const MODAL = {
|
|
7
|
-
modalFade: {
|
|
8
|
-
color: 'white',
|
|
9
|
-
backdropFilter: 'blur(3px)',
|
|
10
|
-
backgroundColor: 'modalFade 0.75'
|
|
11
|
-
},
|
|
12
|
-
modalBackground: {
|
|
13
|
-
color: 'white',
|
|
14
|
-
backgroundColor: 'modalBackground'
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
const SCENE = {
|
|
19
|
-
darkScene: {
|
|
20
|
-
backgroundColor: 'white 0.02',
|
|
21
|
-
'> div': { backgroundImage: `url(${dots})` }
|
|
22
|
-
},
|
|
23
|
-
lightScene: {
|
|
24
|
-
backgroundColor: 'white',
|
|
25
|
-
'> div': { backgroundImage: `url(${dotsDark})` }
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
const DROPDOWN = {
|
|
30
|
-
dropdownItem: {
|
|
31
|
-
color: 'white 0.65',
|
|
32
|
-
state: {
|
|
33
|
-
hover: {
|
|
34
|
-
color: 'white',
|
|
35
|
-
background: 'gradient-light-active'
|
|
36
|
-
},
|
|
37
|
-
active: {
|
|
38
|
-
color: 'white',
|
|
39
|
-
background: 'gradient-light-active'
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
},
|
|
43
|
-
dropdownItemActive: {
|
|
44
|
-
color: 'white',
|
|
45
|
-
background: 'gradient-light-active'
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
|
|
49
3
|
export const EDITOR_THEMES = {
|
|
50
|
-
header: {
|
|
51
|
-
color: 'white',
|
|
52
|
-
backgroundColor: 'black 0.85',
|
|
53
|
-
borderColor: 'white 0.09',
|
|
54
|
-
backdropFilter: 'blur(3px)'
|
|
55
|
-
},
|
|
56
|
-
|
|
57
4
|
shape: {
|
|
58
5
|
background: 'shapeColor',
|
|
59
6
|
border: 'none'
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
...MODAL,
|
|
63
|
-
...SCENE,
|
|
64
|
-
...DROPDOWN
|
|
7
|
+
}
|
|
65
8
|
}
|
|
66
9
|
|
|
67
10
|
export const COMPONENT_THEMES = {
|
|
68
|
-
lightDark: {
|
|
69
|
-
background: 'white',
|
|
70
|
-
color: 'darkPurple',
|
|
71
|
-
variants: {
|
|
72
|
-
inverse: true
|
|
73
|
-
}
|
|
74
|
-
},
|
|
75
|
-
|
|
76
|
-
alert: {
|
|
77
|
-
background: 'yellow',
|
|
78
|
-
color: 'black'
|
|
79
|
-
},
|
|
80
|
-
|
|
81
11
|
label: {
|
|
82
12
|
background: 'brown',
|
|
83
13
|
color: 'white'
|
|
@@ -33,7 +33,6 @@ const buttonThemeSwitcher = {
|
|
|
33
33
|
|
|
34
34
|
props: {
|
|
35
35
|
round: 'C',
|
|
36
|
-
theme: 'lightDark',
|
|
37
36
|
size: 'A',
|
|
38
37
|
padding: 'X1 Y X1 A1',
|
|
39
38
|
gap: 'Z1',
|
|
@@ -45,7 +44,6 @@ const buttonThemeSwitcher = {
|
|
|
45
44
|
},
|
|
46
45
|
|
|
47
46
|
dark: {
|
|
48
|
-
theme: ['lightDark', 'inverse'],
|
|
49
47
|
round: 'C',
|
|
50
48
|
icon: 'moon',
|
|
51
49
|
padding: 'Z Z1',
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import { BREAKPOINTS } from '@symbo.ls/scratch'
|
|
4
4
|
import { Scene } from '@symbo.ls/components'
|
|
5
|
+
import { updateReset } from '@symbo.ls/init'
|
|
5
6
|
|
|
6
7
|
export default {
|
|
7
8
|
extend: Scene,
|
|
@@ -41,6 +42,7 @@ export default {
|
|
|
41
42
|
},
|
|
42
43
|
comp: (el, s) => ({
|
|
43
44
|
extend: [s.component],
|
|
45
|
+
props: { inheritSpacingRatio: true }
|
|
44
46
|
}),
|
|
45
47
|
|
|
46
48
|
on: {
|
|
@@ -50,6 +52,7 @@ export default {
|
|
|
50
52
|
fontSize: s.base + 'px',
|
|
51
53
|
spacingRatio: s.ratio
|
|
52
54
|
}, { preventUpdate: true })
|
|
55
|
+
updateReset()
|
|
53
56
|
}
|
|
54
57
|
}
|
|
55
58
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict'
|
|
2
2
|
|
|
3
|
-
import { TYPOGRAPHY } from '@symbo.ls/scratch'
|
|
3
|
+
import { SPACING, TYPOGRAPHY } from '@symbo.ls/scratch'
|
|
4
4
|
|
|
5
5
|
export default {
|
|
6
6
|
descriptionTheme: 'dark',
|
|
@@ -11,7 +11,7 @@ export default {
|
|
|
11
11
|
currentFontSizeIndex: 3,
|
|
12
12
|
|
|
13
13
|
base: TYPOGRAPHY.base,
|
|
14
|
-
ratio:
|
|
14
|
+
ratio: SPACING.ratio,
|
|
15
15
|
range: [-1, +4],
|
|
16
16
|
scales: {},
|
|
17
17
|
sequence: {},
|
package/src/pages/Icons/index.js
CHANGED
|
@@ -2,16 +2,28 @@
|
|
|
2
2
|
|
|
3
3
|
import { copyStringToClipboard } from '@symbo.ls/utils'
|
|
4
4
|
|
|
5
|
-
import
|
|
6
|
-
|
|
5
|
+
import { IconText, Flex, Link, ClickableItem, SectionHeader, Grid } from '@symbo.ls/components'
|
|
6
|
+
|
|
7
|
+
import * as ACCESSIBILITY from '@symbo.ls/icons/src/accessibility'
|
|
8
|
+
import * as BOXMODEL from '@symbo.ls/icons/src/boxModel'
|
|
9
|
+
import * as DISPLAY from '@symbo.ls/icons/src/display'
|
|
10
|
+
import * as INTERACTIVE from '@symbo.ls/icons/src/interactive'
|
|
11
|
+
import * as LOGOS from '@symbo.ls/icons/src/logos'
|
|
12
|
+
import * as SIGNS from '@symbo.ls/icons/src/signs'
|
|
13
|
+
import * as STYLE from '@symbo.ls/icons/src/style'
|
|
14
|
+
import * as SVG from '@symbo.ls/icons/src/svg'
|
|
15
|
+
import * as TECH from '@symbo.ls/icons/src/tech'
|
|
16
|
+
import * as TEXT from '@symbo.ls/icons/src/text'
|
|
7
17
|
|
|
8
18
|
const IconItem = {
|
|
9
|
-
extend: [ClickableItem, IconText],
|
|
19
|
+
extend: [ClickableItem, Link, IconText],
|
|
10
20
|
props: ({ state }) => ({
|
|
11
21
|
round: 'A',
|
|
12
|
-
size: '
|
|
22
|
+
size: 'C1',
|
|
13
23
|
aspectRatio: '1 / 1',
|
|
14
24
|
flexAlign: 'center center',
|
|
25
|
+
href: '/icons/edit-icon/' + state.name,
|
|
26
|
+
theme: 'tertiary',
|
|
15
27
|
icon: {
|
|
16
28
|
fontSize: 'C2',
|
|
17
29
|
name: state.name
|
|
@@ -25,17 +37,12 @@ const IconItem = {
|
|
|
25
37
|
}
|
|
26
38
|
|
|
27
39
|
const IconsGroup = {
|
|
28
|
-
state: {
|
|
29
|
-
toggleShow: true
|
|
30
|
-
},
|
|
40
|
+
state: { toggleShow: true },
|
|
31
41
|
|
|
32
|
-
header: {
|
|
33
|
-
extend: SectionHeader
|
|
34
|
-
},
|
|
42
|
+
header: { extend: SectionHeader },
|
|
35
43
|
|
|
36
44
|
iconSet: {
|
|
37
45
|
extend: Grid,
|
|
38
|
-
|
|
39
46
|
props: ({ state }) => ({
|
|
40
47
|
hide: !state.toggleShow,
|
|
41
48
|
columns: 'repeat(12, 1fr)',
|
|
@@ -57,15 +64,49 @@ const ICON_GROUPS = [{
|
|
|
57
64
|
p: 'All ungrouped document icons',
|
|
58
65
|
|
|
59
66
|
nav: [{
|
|
60
|
-
icon: '
|
|
61
|
-
href: '/icons/
|
|
67
|
+
icon: 'plus',
|
|
68
|
+
href: '/icons/add-icon'
|
|
62
69
|
}],
|
|
63
70
|
|
|
64
|
-
list: Object.keys(
|
|
71
|
+
list: Object.keys(SVG).map(name => ({ name }))
|
|
72
|
+
}, {
|
|
73
|
+
title: 'Accessibility',
|
|
74
|
+
list: Object.keys(ACCESSIBILITY).map(name => ({ name })),
|
|
75
|
+
p: ''
|
|
76
|
+
}, {
|
|
77
|
+
title: 'Box Model',
|
|
78
|
+
list: Object.keys(BOXMODEL).map(name => ({ name }))
|
|
79
|
+
}, {
|
|
80
|
+
title: 'Display',
|
|
81
|
+
list: Object.keys(DISPLAY).map(name => ({ name }))
|
|
82
|
+
}, {
|
|
83
|
+
title: 'Interactive',
|
|
84
|
+
list: Object.keys(INTERACTIVE).map(name => ({ name }))
|
|
85
|
+
}, {
|
|
86
|
+
title: 'Logos',
|
|
87
|
+
list: Object.keys(LOGOS).map(name => ({ name }))
|
|
88
|
+
}, {
|
|
89
|
+
title: 'Signs',
|
|
90
|
+
list: Object.keys(SIGNS).map(name => ({ name }))
|
|
91
|
+
}, {
|
|
92
|
+
title: 'Style',
|
|
93
|
+
list: Object.keys(STYLE).map(name => ({ name }))
|
|
94
|
+
}, {
|
|
95
|
+
title: 'Tech',
|
|
96
|
+
list: Object.keys(TECH).map(name => ({ name }))
|
|
97
|
+
}, {
|
|
98
|
+
title: 'Text',
|
|
99
|
+
list: Object.keys(TEXT).map(name => ({ name }))
|
|
65
100
|
}]
|
|
66
101
|
|
|
67
102
|
export const Icons = {
|
|
68
103
|
tag: 'section',
|
|
104
|
+
extend: Flex,
|
|
105
|
+
|
|
106
|
+
props: {
|
|
107
|
+
flow: 'column',
|
|
108
|
+
gap: 'D1'
|
|
109
|
+
},
|
|
69
110
|
|
|
70
111
|
childExtend: IconsGroup,
|
|
71
112
|
$setCollection: () => ICON_GROUPS
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
'use strict'
|
|
2
|
+
|
|
3
|
+
import { IncDecButtons } from '@symbo.ls/components'
|
|
4
|
+
|
|
5
|
+
export const Range0Buttons = {
|
|
6
|
+
extend: IncDecButtons,
|
|
7
|
+
|
|
8
|
+
...[{
|
|
9
|
+
on: {
|
|
10
|
+
click: (ev, el) => {
|
|
11
|
+
const { state } = el
|
|
12
|
+
const { range } = state
|
|
13
|
+
if (range[0] + 1 < 0) {
|
|
14
|
+
++range[0]
|
|
15
|
+
state.update()
|
|
16
|
+
}
|
|
17
|
+
console.log(range)
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}, {
|
|
21
|
+
on: {
|
|
22
|
+
click: (ev, el) => {
|
|
23
|
+
const { state } = el
|
|
24
|
+
const { range } = state
|
|
25
|
+
if (range[0] - 1 > -6) {
|
|
26
|
+
--range[0]
|
|
27
|
+
state.update()
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}]
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export const Range1Buttons = {
|
|
35
|
+
extend: IncDecButtons,
|
|
36
|
+
...[{
|
|
37
|
+
on: {
|
|
38
|
+
click: (ev, el) => {
|
|
39
|
+
const { state } = el
|
|
40
|
+
const { range } = state
|
|
41
|
+
if (range[1] - 1 > 5) {
|
|
42
|
+
--range[1]
|
|
43
|
+
state.update()
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}, {
|
|
48
|
+
on: {
|
|
49
|
+
click: (ev, el) => {
|
|
50
|
+
const { state } = el
|
|
51
|
+
const { range } = state
|
|
52
|
+
if (range[1] + 1 < 21) {
|
|
53
|
+
++range[1]
|
|
54
|
+
state.update()
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}]
|
|
59
|
+
}
|
|
@@ -2,11 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
import {
|
|
4
4
|
TypeScaleSequence,
|
|
5
|
-
SequenceSliders
|
|
5
|
+
SequenceSliders,
|
|
6
|
+
Grid,
|
|
7
|
+
Flex,
|
|
8
|
+
TestText
|
|
6
9
|
} from '@symbo.ls/components'
|
|
10
|
+
|
|
7
11
|
import { mapSequence, sortSequence } from '@symbo.ls/utils'
|
|
8
12
|
|
|
9
13
|
import { TypeSection } from './shared'
|
|
14
|
+
import { Range0Buttons, Range1Buttons } from './rangeButtons'
|
|
10
15
|
|
|
11
16
|
export const TypeScale = {
|
|
12
17
|
extend: TypeSection,
|
|
@@ -18,73 +23,75 @@ export const TypeScale = {
|
|
|
18
23
|
}
|
|
19
24
|
},
|
|
20
25
|
|
|
21
|
-
|
|
26
|
+
grid: {
|
|
27
|
+
extend: Grid,
|
|
22
28
|
|
|
23
|
-
p: {
|
|
24
|
-
extend: 'Paragraph',
|
|
25
29
|
props: {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
30
|
+
gap: 'D',
|
|
31
|
+
columns: '16em auto',
|
|
32
|
+
align: 'flex-start flex-start',
|
|
33
|
+
|
|
34
|
+
sidebar: {
|
|
35
|
+
padding: 'B 0 0',
|
|
36
|
+
position: 'sticky',
|
|
37
|
+
top: 'E2'
|
|
38
|
+
},
|
|
39
|
+
|
|
40
|
+
content: {
|
|
41
|
+
overflow: 'hidden',
|
|
42
|
+
flow: 'column',
|
|
43
|
+
gap: 'C',
|
|
44
|
+
|
|
45
|
+
header: {
|
|
46
|
+
align: 'flex-end space-between',
|
|
47
|
+
padding: '0 0 0 C',
|
|
48
|
+
gap: 'C1'
|
|
49
|
+
},
|
|
50
|
+
|
|
51
|
+
footer: {
|
|
52
|
+
padding: '0 0 0 C'
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
|
|
57
|
+
sidebar: {
|
|
58
|
+
sliders: {
|
|
59
|
+
extend: SequenceSliders,
|
|
60
|
+
props: { flow: 'column' }
|
|
61
|
+
},
|
|
62
|
+
|
|
63
|
+
p: {
|
|
64
|
+
extend: 'Paragraph',
|
|
65
|
+
props: {
|
|
66
|
+
margin: '0',
|
|
67
|
+
fontSize: 'Z2',
|
|
68
|
+
padding: 'B2 0',
|
|
69
|
+
text: `Base size and ratio sequentially generate set by multiplying each next calculated unit by the ratio.`
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
|
|
74
|
+
content: {
|
|
75
|
+
extend: Flex,
|
|
76
|
+
|
|
77
|
+
header: {
|
|
78
|
+
extend: Flex,
|
|
79
|
+
Range0Buttons,
|
|
80
|
+
TestText
|
|
81
|
+
},
|
|
82
|
+
|
|
83
|
+
sequence: {
|
|
84
|
+
extend: TypeScaleSequence,
|
|
85
|
+
$setCollection: (el) => {
|
|
86
|
+
const { state } = el
|
|
87
|
+
el.removeContent()
|
|
88
|
+
return mapSequence(state, sortSequence)
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
|
|
92
|
+
footer: {
|
|
93
|
+
Range1Buttons
|
|
94
|
+
}
|
|
29
95
|
}
|
|
30
|
-
},
|
|
31
|
-
|
|
32
|
-
sequence: {
|
|
33
|
-
extend: TypeScaleSequence,
|
|
34
|
-
$setCollection: ({ state }) => mapSequence(state, sortSequence)
|
|
35
96
|
}
|
|
36
97
|
}
|
|
37
|
-
|
|
38
|
-
// export default {
|
|
39
|
-
// extend: TypeSection,
|
|
40
|
-
|
|
41
|
-
// header: {
|
|
42
|
-
// heading: {
|
|
43
|
-
// p: { props: { text: 'Generate text sequence by a base size and ratio' } }
|
|
44
|
-
// },
|
|
45
|
-
// nav: {
|
|
46
|
-
// add: { props: { icon: 'plus' } }
|
|
47
|
-
// }
|
|
48
|
-
// },
|
|
49
|
-
|
|
50
|
-
// wrapper: {
|
|
51
|
-
// textTest: '',
|
|
52
|
-
// fonts: '',
|
|
53
|
-
|
|
54
|
-
// cnt: {
|
|
55
|
-
// extend: [Block, Grid],
|
|
56
|
-
|
|
57
|
-
// props: {
|
|
58
|
-
// gap: 'D',
|
|
59
|
-
// columns: '16em auto'
|
|
60
|
-
// },
|
|
61
|
-
|
|
62
|
-
// aside: ScalingTools,
|
|
63
|
-
|
|
64
|
-
// wrapper: {
|
|
65
|
-
// settings: {
|
|
66
|
-
// extend: PreviewSettings,
|
|
67
|
-
// props: { margin: '0 0 B' }
|
|
68
|
-
// },
|
|
69
|
-
|
|
70
|
-
// fonts: ScalesSequence
|
|
71
|
-
// },
|
|
72
|
-
|
|
73
|
-
// sequenceSet: {
|
|
74
|
-
// extend: CommonField,
|
|
75
|
-
// props: { margin: 'C2 0' },
|
|
76
|
-
// caption: {
|
|
77
|
-
// extend: [Block, Text],
|
|
78
|
-
// props: {
|
|
79
|
-
// text: 'Sizing generated by this setting',
|
|
80
|
-
// padding: '0 0 A 0'
|
|
81
|
-
// }
|
|
82
|
-
// },
|
|
83
|
-
// element: {
|
|
84
|
-
// extend: [SequenceGraph, Block, Text],
|
|
85
|
-
// style: { '> span': { display: 'none' } }
|
|
86
|
-
// }
|
|
87
|
-
// }
|
|
88
|
-
// }
|
|
89
|
-
// }
|
|
90
|
-
// }
|