@symbo.ls/preview 2.7.20 → 2.7.23

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.
Files changed (149) hide show
  1. package/.eslintrc.js +2 -8
  2. package/.vscode/settings.json +4 -1
  3. package/README.md +1 -0
  4. package/config.js +6 -0
  5. package/define.js +10 -0
  6. package/index.html +5 -5
  7. package/index.js +6 -9
  8. package/package.json +9 -28
  9. package/src/app.js +26 -40
  10. package/state.js +14 -0
  11. package/svgSprite.config.js +2 -2
  12. package/.babelrc.js +0 -5
  13. package/.coveralls.yml +0 -1
  14. package/.eslintignore +0 -1
  15. package/.legacy/_tools_old.js +0 -49
  16. package/.legacy/boxModel.js +0 -3
  17. package/.legacy/index copy.js +0 -45
  18. package/.legacy/preview.js +0 -133
  19. package/.legacy/sequence.js +0 -3
  20. package/.legacy/style.js +0 -30
  21. package/.prettierrc +0 -4
  22. package/.vscode/extensions.json +0 -5
  23. package/src/assets/dark.png +0 -0
  24. package/src/assets/fonts/FiraGO/FiraGO-Bold.woff2 +0 -0
  25. package/src/assets/fonts/FiraGO/FiraGO-Light.woff2 +0 -0
  26. package/src/assets/fonts/FiraGO/FiraGO-Medium.woff2 +0 -0
  27. package/src/assets/fonts/FiraGO/FiraGO-Regular.woff2 +0 -0
  28. package/src/assets/fonts/europa-bold-webfont.woff2 +0 -0
  29. package/src/assets/fonts/europa-bolditalic-webfont.woff2 +0 -0
  30. package/src/assets/fonts/europa-light-webfont.woff2 +0 -0
  31. package/src/assets/fonts/europa-lightitalic-webfont.woff2 +0 -0
  32. package/src/assets/fonts/europa-regular-webfont.woff2 +0 -0
  33. package/src/assets/fonts/europa-regularitalic-webfont.woff2 +0 -0
  34. package/src/assets/mask1.png +0 -0
  35. package/src/assets/mask2.png +0 -0
  36. package/src/assets/ovalCircle.svg +0 -9
  37. package/src/assets/shapes.png +0 -0
  38. package/src/assets/space.png +0 -0
  39. package/src/assets/type.png +0 -0
  40. package/src/components/Aside.js +0 -101
  41. package/src/components/Banner.js +0 -58
  42. package/src/components/ColorText.js +0 -29
  43. package/src/components/ColorsPalette.js +0 -69
  44. package/src/components/ColumnParagrphs.js +0 -22
  45. package/src/components/ContinueButton.js +0 -14
  46. package/src/components/DesignComponent.js +0 -81
  47. package/src/components/FontText.js +0 -193
  48. package/src/components/Header.js +0 -53
  49. package/src/components/HeaderHeading.js +0 -23
  50. package/src/components/IconsGroup.js +0 -64
  51. package/src/components/Page.js +0 -135
  52. package/src/components/ResponsivePreview.js +0 -44
  53. package/src/components/Route.js +0 -1
  54. package/src/components/ShapePreview.js +0 -63
  55. package/src/components/ShapeSet.js +0 -85
  56. package/src/components/SlidersWithResponsive.js +0 -23
  57. package/src/components/SpacingButton/actionButtons.js +0 -41
  58. package/src/components/SpacingButton/dropdown.js +0 -114
  59. package/src/components/SpacingButton/index.js +0 -248
  60. package/src/components/SpacingButton/props.js +0 -45
  61. package/src/components/SpacingPreview.js +0 -154
  62. package/src/components/SpacingTable.js +0 -210
  63. package/src/components/ThemeButtons.js +0 -41
  64. package/src/components/UploadImage.js +0 -31
  65. package/src/components/Widget.js +0 -1
  66. package/src/components/index.js +0 -25
  67. package/src/pages/Account/Personal.js +0 -59
  68. package/src/pages/Account/Project.js +0 -40
  69. package/src/pages/Account/fields.js +0 -74
  70. package/src/pages/Account/fieldsGridProps.js +0 -15
  71. package/src/pages/Account/index.js +0 -117
  72. package/src/pages/Color/globalThemes.js +0 -32
  73. package/src/pages/Color/index.js +0 -18
  74. package/src/pages/Color/palette.js +0 -37
  75. package/src/pages/Color/themes.js +0 -38
  76. package/src/pages/Components/grid.js +0 -99
  77. package/src/pages/Components/index.js +0 -37
  78. package/src/pages/Components/sidebar.js +0 -28
  79. package/src/pages/Components/style.js +0 -16
  80. package/src/pages/DesignSystem/Dashboard/banners.js +0 -38
  81. package/src/pages/DesignSystem/Dashboard/designElements.js +0 -124
  82. package/src/pages/DesignSystem/Dashboard/index.js +0 -22
  83. package/src/pages/DesignSystem/Dashboard/quickstart.js +0 -84
  84. package/src/pages/DesignSystem/Dashboard/state.js +0 -142
  85. package/src/pages/DesignSystem/Dashboard/summary.js +0 -52
  86. package/src/pages/DesignSystem/index.js +0 -187
  87. package/src/pages/Editor/index.js +0 -46
  88. package/src/pages/Editor/layers.js +0 -126
  89. package/src/pages/Editor/scene.js +0 -95
  90. package/src/pages/Editor/style.js +0 -13
  91. package/src/pages/Editor/tools.js +0 -360
  92. package/src/pages/Export/const.js +0 -19
  93. package/src/pages/Export/description.js +0 -88
  94. package/src/pages/Export/gist.js +0 -23
  95. package/src/pages/Export/index.js +0 -82
  96. package/src/pages/Export/scene.js +0 -59
  97. package/src/pages/Export/state.js +0 -23
  98. package/src/pages/Export/tools.js +0 -101
  99. package/src/pages/Fonts/fontFaces.js +0 -50
  100. package/src/pages/Fonts/fontFamilies.js +0 -47
  101. package/src/pages/Fonts/index.js +0 -15
  102. package/src/pages/Fonts/state.js +0 -5
  103. package/src/pages/Icons/index.js +0 -92
  104. package/src/pages/Icons/style.js +0 -1
  105. package/src/pages/Init/ChooseEnvironment.js +0 -146
  106. package/src/pages/Init/ChooseProject.js +0 -61
  107. package/src/pages/Init/CreateDocumentTheme.js +0 -173
  108. package/src/pages/Init/CreatePalette.js +0 -94
  109. package/src/pages/Init/FontText.js +0 -33
  110. package/src/pages/Init/Personalize/fields.js +0 -120
  111. package/src/pages/Init/Personalize/icon.js +0 -76
  112. package/src/pages/Init/Personalize/index.js +0 -120
  113. package/src/pages/Init/index.js +0 -39
  114. package/src/pages/Library/disabled.js +0 -38
  115. package/src/pages/Library/index.js +0 -33
  116. package/src/pages/MediaQuery/index.js +0 -46
  117. package/src/pages/MediaQuery/lists.js +0 -299
  118. package/src/pages/MediaQuery/state.js +0 -149
  119. package/src/pages/MediaQuery/typeScale.js +0 -69
  120. package/src/pages/Shapes/index.js +0 -75
  121. package/src/pages/Shapes/shapeSet.js +0 -133
  122. package/src/pages/Shapes/style.js +0 -11
  123. package/src/pages/Spaces/index.js +0 -32
  124. package/src/pages/Spaces/sequence.js +0 -32
  125. package/src/pages/Spaces/state.js +0 -20
  126. package/src/pages/State/index.js +0 -87
  127. package/src/pages/Theme/buttonTitlesGrid.js +0 -47
  128. package/src/pages/Theme/buttonsHeader.js +0 -33
  129. package/src/pages/Theme/friendTheme.js +0 -30
  130. package/src/pages/Theme/index.js +0 -273
  131. package/src/pages/Theme/interactivity.js +0 -115
  132. package/src/pages/Theme/ntc.js +0 -1689
  133. package/src/pages/Theme/preview.js +0 -153
  134. package/src/pages/Theme/selectsGrid.js +0 -73
  135. package/src/pages/Theme/style.js +0 -38
  136. package/src/pages/Theme/themingTools.js +0 -106
  137. package/src/pages/Typography/collection.js +0 -115
  138. package/src/pages/Typography/documentStyles.js +0 -113
  139. package/src/pages/Typography/index.js +0 -69
  140. package/src/pages/Typography/rangeButtons.js +0 -58
  141. package/src/pages/Typography/shared.js +0 -9
  142. package/src/pages/Typography/stylesHelpers.js +0 -30
  143. package/src/pages/Typography/typeScale.js +0 -86
  144. package/src/pages/__Account/__/index.js +0 -241
  145. package/src/pages/__Account/__/setUpProject.js +0 -142
  146. package/src/pages/__Account/index.js +0 -111
  147. package/src/pages/index.js +0 -17
  148. package/src/state.js +0 -20
  149. package/src/style.js +0 -20
@@ -1,153 +0,0 @@
1
- 'use strict'
2
-
3
- import { opacify } from '@symbo.ls/scratch'
4
- import { Flex, Grid } from '@symbo.ls/components'
5
-
6
- const classOpacify = (value, opacity) => {
7
- const { background, backgroundColor, color } = value
8
- const bg = background || backgroundColor || color
9
- if (!bg) return
10
- return { background: opacify(bg, opacity) }
11
- }
12
-
13
- const TONES_AMOUNT = 13
14
- const TONES_ARR = new Array(TONES_AMOUNT).fill(0).map((_, i) => i)
15
-
16
- const getThemeProperty = (property, value, mod) => {
17
- const modifier = `@${mod}`
18
- return value[modifier] && value[modifier][property] ? value[modifier][property] : value[property]
19
- }
20
-
21
- export const Tones = {
22
- extend: Grid,
23
- props: {
24
- columns: `repeat(${TONES_AMOUNT}, 1fr)`,
25
- height: 'B',
26
- round: 'Z',
27
- overflow: 'hidden'
28
- },
29
- childExtend: {
30
- tag: 'span',
31
- text: null,
32
- props: ({ key, state }) => ({
33
- round: '0',
34
- transition: 'B defaultBezier',
35
- transitionProperty: 'color, background',
36
- background: getThemeProperty('background', state.value, state.sceneTheme),
37
- opacity: '' + (100 / TONES_AMOUNT * parseInt(key)) / 100
38
- })
39
- },
40
- $setCollection: () => TONES_ARR
41
- }
42
-
43
- export default {
44
- tag: 'aside',
45
- extend: Flex,
46
- props: {
47
- flow: 'column'
48
- },
49
-
50
- preview: {
51
- props: (el, s) => ({
52
- padding: 'X1',
53
- round: 'Z2',
54
- theme: `scene @${s.sceneTheme}`,
55
- style: {
56
- '&, & *': {
57
- transition: '165ms cubic-bezier(.29,.67,.51,.97)',
58
- transitionProperty: 'color, background'
59
- }
60
- }
61
- }),
62
- scene: {
63
- props: {
64
- padding: 'A',
65
- backgroundPosition: `center`,
66
- backgroundRepeat: `repeat`,
67
- backgroundSize: '100px 100px'
68
- },
69
- circle: {
70
- props: (el, s) => ({
71
- theme: `${s.themeName} @${s.sceneTheme}`,
72
- flexFlow: 'column',
73
- flexAlign: 'center center',
74
- width: 'G',
75
- aspectRatio: '1 / 1',
76
- round: '100%',
77
- position: 'relative',
78
- borderWidth: '1px',
79
- borderStyle: 'solid',
80
- borderColor: 'transparent',
81
-
82
- h6: {
83
- fontSize: 'D',
84
- fontWeight: 'bold',
85
- gap: 'X'
86
- }
87
- }),
88
- h6: {
89
- extend: Flex,
90
- Span: {
91
- text: 'The',
92
- fontWeight: 'normal',
93
- marginRight: '6px'
94
- },
95
- text: 'Text Color'
96
- },
97
- Span: {
98
- text: (el, s) => s.themeName,
99
- position: 'absolute',
100
- top: '86%',
101
- left: '50%',
102
- transform: 'translate(-50%, -50%)',
103
- fontWeight: '600'
104
- }
105
- }
106
- }
107
- },
108
-
109
- opacity: {
110
- props: {
111
- padding: 'B1 0 0 0'
112
- },
113
- caption: {
114
- props: {
115
- text: 'Opacity',
116
- size: 'Z',
117
- padding: '0 0 Z1 0',
118
- opacity: '.65'
119
- }
120
- },
121
- tones: { extend: Tones }
122
- },
123
-
124
- shades: {
125
- if: () => false,
126
- props: { padding: 'B 0 0 0' },
127
- caption: {
128
- props: {
129
- text: 'Shades',
130
- size: 'Z',
131
- padding: '0 0 Z1 0'
132
- },
133
- style: { opacity: '.65' }
134
- },
135
-
136
- generate: {
137
- props: { flexFlow: 'column', round: 'Z', gap: '2px' },
138
-
139
- childExtend: {
140
- extend: [Tones],
141
- props: { round: 'X' },
142
- ...TONES_ARR.map(v => ({
143
- class: { background: el => classOpacify(el, (100 / TONES_AMOUNT * v) / 100) }
144
- }))
145
- },
146
-
147
- dark: {},
148
- light: {
149
- props: { theme: 'lightScene' }
150
- }
151
- }
152
- }
153
- }
@@ -1,73 +0,0 @@
1
- 'use strict'
2
-
3
- import { CommonField, ColorSelect, Grid } from '@symbo.ls/components'
4
-
5
- export const selectsGrid = {
6
- extend: Grid,
7
- props: {
8
- columns: 'repeat(4, auto)',
9
- style: { width: 'fit-content' },
10
- gap: 'B2+W1',
11
- justifyItems: 'start',
12
- '@tabletL': { columns: 'repeat(3, auto)' },
13
- '@tabletM': { columns: 'repeat(2, auto)' }
14
- },
15
-
16
- childExtend: {
17
- extend: CommonField,
18
- tag: 'div',
19
- props: (el, s) => ({
20
- width: 'F+Z',
21
- title: {
22
- text: s.title,
23
- fontSize: 'Z'
24
- },
25
- element: {
26
- width: '100%',
27
- height: 'B2+W',
28
- padding: '0 W1 0 Z1',
29
- title: {
30
- box: {
31
- background: s.color,
32
- display: s.colorDisplay
33
- },
34
- value: {
35
- text: s.name,
36
- fontSize: 'Z1'
37
- }
38
- },
39
- buttons: {
40
- gap: 'W',
41
- childProps: {
42
- boxSize: 'fit-content',
43
- padding: 'W1+W1'
44
- }
45
- }
46
- }
47
- }),
48
-
49
- title: {},
50
- element: {
51
- extend: ColorSelect
52
- }
53
- },
54
-
55
- $setStateCollection: () => [{
56
- title: 'Background color',
57
- color: 'red',
58
- name: 'red'
59
-
60
- }, {
61
- title: 'Border color',
62
- name: 'none',
63
- colorDisplay: 'none'
64
- }, {
65
- title: 'Border color',
66
- name: 'none',
67
- colorDisplay: 'none'
68
- }, {
69
- title: 'Text color',
70
- color: 'white',
71
- name: 'white'
72
- }]
73
- }
@@ -1,38 +0,0 @@
1
- 'use strict'
2
-
3
- export const styleTool = {
4
- caption: { opacity: '.65' },
5
- '> div span': { opacity: '.5' },
6
- '> div > div': { gap: '1px' }
7
- }
8
-
9
- export const styleColorTones = {
10
- width: '22em',
11
- display: 'flex',
12
- flexDirection: 'column',
13
- '> div > button': {
14
- padding: `${123 / 16}em`,
15
- position: 'absolute'
16
- },
17
- caption: {
18
- textTransform: 'capitalize',
19
- opacity: '.65',
20
- marginBottom: `${10 / 13}em`
21
- }
22
- }
23
-
24
- export default {
25
- display: 'flex',
26
- flexFlow: 'column',
27
-
28
- 'header > nav a:hover': {
29
- background: 'rgba(255, 255, 255, .08)',
30
- opacity: 1,
31
- color: '#EDCB38'
32
- },
33
-
34
- '> section': {
35
- display: 'flex',
36
- gap: '6.6em'
37
- }
38
- }
@@ -1,106 +0,0 @@
1
- 'use strict'
2
-
3
- import { Grid, ColorSwitcher, CommonField, SelectField, ButtonSet, ClickableItem } from '@symbo.ls/components'
4
-
5
- ColorSwitcher.props = (el, s) => {
6
- if (!s.value) return
7
- const value = s.value[el.props.type] || s.value[el.props.type + 'Color']
8
- const key = filterByValue(value).key || value
9
- return {
10
- key: key,
11
- value: value
12
- }
13
- }
14
-
15
- export const themingTools = {
16
- extend: Grid,
17
- style: {
18
- width: 'fit-content'
19
- },
20
- props: {
21
- columns: 'repeat(4, 1fr)',
22
- columnGap: 'C',
23
- rowGap: 'C'
24
- },
25
- childExtend: {
26
- extend: CommonField,
27
- props: { padding: 0 },
28
- caption: { text: el => el.parent.props.caption },
29
- element: {}
30
- },
31
- ...[{
32
- props: { caption: 'Background color' },
33
- caption: {},
34
- element: {
35
- extend: ColorSwitcher,
36
- props: { type: 'background' },
37
-
38
- title: {},
39
- buttons: { ...[
40
- { props: { icon: 'plus' } },
41
- { props: { icon: 'arrowAngleMirroringVertical', theme: 'transparent' } }
42
- ] }
43
- }
44
- }, {
45
- props: { caption: 'Text color' },
46
- caption: {},
47
- element: {
48
- extend: ColorSwitcher,
49
- props: { type: 'color' },
50
-
51
- title: {},
52
- buttons: { ...[
53
- { props: { icon: 'colorInvert' } },
54
- { props: { icon: 'arrowAngleMirroringVertical', theme: 'transparent' } }
55
- ] }
56
- }
57
- }, {
58
- props: { caption: 'Border color' },
59
- caption: {},
60
- element: {
61
- extend: ColorSwitcher,
62
- props: { type: 'border' },
63
-
64
- title: {},
65
- buttons: { ...[
66
- { props: { icon: 'colorInvert' } },
67
- { props: { icon: 'arrowAngleMirroringVertical', theme: 'transparent' } }
68
- ] }
69
- }
70
- }, {
71
- props: { caption: 'Use as' },
72
- caption: {},
73
- element: {
74
- extend: SelectField,
75
- title: { props: { text: 'Background color' } },
76
- buttons: { ...[{ props: { icon: 'arrowAngleMirroringVertical', theme: 'transparent' } }] }
77
- }
78
- },
79
-
80
- {
81
- props: { caption: 'Border' },
82
- caption: {},
83
- element: {
84
- extend: ButtonSet,
85
- childExtend: { extend: [ClickableItem] },
86
- props: { gap: 'Z' },
87
- ...[
88
- { props: { icon: 'colorsColored' } },
89
- { props: { icon: 'borderOpacity' } },
90
- { props: { icon: 'borderWeight' } },
91
- { props: { icon: 'borderProps' } }
92
- ]
93
- }
94
- },
95
-
96
- {
97
- props: { caption: 'Shadow' },
98
- caption: {},
99
- element: {
100
- extend: ButtonSet,
101
- childExtend: { extend: [ClickableItem] },
102
- ...[{ props: { icon: 'plus' } }]
103
- }
104
- }
105
- ]
106
- }
@@ -1,115 +0,0 @@
1
- 'use strict'
2
-
3
- import {
4
- findHeadingLetter,
5
- getFontFamily
6
- } from '@symbo.ls/scratch'
7
- import { HTML_TAGS } from '@domql/tags'
8
-
9
- const propertyDefaults = {
10
- fontSize: 'A',
11
- fontWeight: '400',
12
- lineHeight: '1.4',
13
- letterSpacing: '0',
14
- italic: '0',
15
- letterWidth: '0'
16
- }
17
-
18
- const iconMap = {
19
- font: 'fontFace',
20
- fontWeight: 'fontVariable',
21
- lineHeight: 'textLineHeight',
22
- letterSpacing: 'textLetterSpacing',
23
- italic: 'fontStyleItalic',
24
- letterWidth: 'textLetterWidth'
25
- }
26
-
27
- const getTypeProp = (key, prop, library, defaultValue) => {
28
- const { TYPOGRAPHY } = library
29
- if (!TYPOGRAPHY) return
30
- let styles = TYPOGRAPHY.styles
31
- if (!styles) styles = TYPOGRAPHY.styles = {}
32
- if (!styles[key]) styles[key] = {}
33
- return styles[key][prop] ||
34
- styles[prop] ||
35
- TYPOGRAPHY[prop] ||
36
- defaultValue ||
37
- propertyDefaults[prop]
38
- }
39
-
40
- const getTypeStyle = (key, library) => ({
41
- font: getFontFamily(key, library.FONT_FAMILY)[0],
42
- fontSize: getTypeProp(key, 'fontSize', library),
43
- fontWeight: getTypeProp(key, 'fontWeight', library),
44
- lineHeight: getTypeProp(key, 'lineHeight', library),
45
- letterSpacing: getTypeProp(key, 'letterSpacing', library),
46
- italic: getTypeProp(key, 'italic', library),
47
- letterWidth: getTypeProp(key, 'letterWidth', library)
48
- })
49
-
50
- const isHeading = v => v.length === 2 && v[0] === 'h'
51
- const isTag = v => HTML_TAGS.root.indexOf(v) > -1 || HTML_TAGS.body.indexOf(v) > -1
52
- const isHelper = v => v.slice(0, 1) === '.'
53
-
54
- const getCollectionFromArray = (arr, s) => {
55
- const TYPOGRAPHY = s.parse()
56
- const styles = TYPOGRAPHY.styles || {}
57
-
58
- if (!s.sequence) return {}
59
-
60
- return arr.map((v, k) => {
61
- const result = getTypeStyle(v, s.parent.parse())
62
- return {
63
- key: v,
64
- value: {
65
- ...result,
66
- ...styles[v]
67
- },
68
- labels: Object.keys(result)
69
- .filter(key => key !== 'fontSize' && result[key] && result[key] !== '0')
70
- .map(key => ({
71
- icon: iconMap[key],
72
- text: result[key]
73
- })
74
- ),
75
- sequenceValue: s.sequence[
76
- isHeading(v) ? findHeadingLetter(s.h1Matches, k) : result.fontSize
77
- ]
78
- }
79
- })
80
- }
81
-
82
- export const headingsCollection = (el, s) => {
83
- el.removeContent()
84
- const HEADINGS = new Array(6).fill(null).map((_, i) => 'h' + (i + 1))
85
- return getCollectionFromArray(HEADINGS, s)
86
- }
87
-
88
- export const tagsCollection = (el, s) => {
89
- const { __projectSystem } = s
90
- const { TYPOGRAPHY } = __projectSystem
91
- if (!TYPOGRAPHY) return
92
- let styles = TYPOGRAPHY.styles
93
- if (!styles) styles = TYPOGRAPHY.styles = {}
94
- if (!styles.body) styles.body = {}
95
- el.removeContent()
96
-
97
- const TAGS = Object.keys(styles)
98
- .filter(v => {
99
- return isTag(v) && !isHeading(v) && !isHelper(v)
100
- })
101
-
102
- return getCollectionFromArray(TAGS, s)
103
- }
104
-
105
- export const helpersCollection = (el, s) => {
106
- const TYPOGRAPHY = s.parse()
107
- const styles = TYPOGRAPHY.styles || {}
108
-
109
- const HELPERS = Object.keys(styles)
110
- .filter(v => v.slice(0, 1) === '.')
111
-
112
- el.removeContent()
113
-
114
- return getCollectionFromArray(HELPERS, s)
115
- }
@@ -1,113 +0,0 @@
1
- 'use strict'
2
-
3
- import {
4
- DocumentStylesSequence,
5
- Flex,
6
- SelectField,
7
- HTMLTagTypeObject
8
- } from '@symbo.ls/components'
9
-
10
- import { headingsCollection, tagsCollection } from './collection'
11
-
12
- export default {
13
- SectionHeader: {
14
- title: 'Document Styles',
15
- p: 'Document styling and theming provides global themes of the entire app, imagine it as a :root styling'
16
- },
17
-
18
- styles: {
19
- extend: Flex,
20
-
21
- props: {
22
- flow: 'column',
23
- gap: 'C',
24
- align: 'flex-start flex-start',
25
- header: {
26
- width: '100%',
27
- align: 'center space-between'
28
- },
29
- headings: {
30
- width: '100%'
31
- },
32
- doc: {
33
- width: '100%'
34
- }
35
- },
36
-
37
- headings: {
38
- extend: DocumentStylesSequence,
39
- $setStateCollection: headingsCollection
40
- },
41
-
42
- doc: {
43
- extend: DocumentStylesSequence,
44
- $setStateCollection: tagsCollection
45
- },
46
-
47
- footer: {}
48
- },
49
-
50
- fields: {
51
- extend: Flex,
52
- props: {
53
- gap: 'A',
54
- margin: '0 0 0 E2+B',
55
- align: 'center flex-start'
56
- },
57
-
58
- tags: {
59
- extend: Flex,
60
- props: { gap: 'A' },
61
- childExtend: HTMLTagTypeObject,
62
-
63
- p: {
64
- props: {
65
- title: {
66
- text: '<p>'
67
- }
68
- }
69
- },
70
- code: {
71
- props: {
72
- title: {
73
- text: '<code>'
74
- }
75
- }
76
- },
77
- pre: {
78
- props: {
79
- title: {
80
- text: '<pre>'
81
- }
82
- }
83
- }
84
- },
85
-
86
- VerticalLine: {
87
- height: 'B',
88
- margin: '0 Z1'
89
- },
90
-
91
- IconButton: {
92
- theme: 'quinary',
93
- position: 'relative',
94
- icon: 'plus'
95
- },
96
-
97
- addsomething: {
98
- extend: SelectField,
99
- props: {
100
- position: 'relative',
101
- title: {
102
- text: 'Choose element'
103
- }
104
- },
105
- title: {},
106
- buttons: [{
107
- props: { icon: 'plus' }
108
- }, {
109
- props: { icon: 'arrowAngleMirroringVertical' }
110
- }]
111
- }
112
- }
113
- }
@@ -1,69 +0,0 @@
1
- 'use strict'
2
-
3
- import typeScale from './typeScale'
4
- import documentStyles from './documentStyles'
5
- import stylesHelpers from './stylesHelpers'
6
- import { mapSequence, sortSequence } from '@symbo.ls/components'
7
-
8
- export const Typography = {
9
- state: 'PROJECT_SYSTEM',
10
-
11
- SectionHeader: {
12
- margin: '0 0 C',
13
- title: 'Typography',
14
- p: 'A general configuration of type properties on the document.'
15
- },
16
-
17
- cnt: {
18
- state: 'TYPOGRAPHY',
19
-
20
- SlidersWithResponsive: {},
21
-
22
- line: { extend: 'Line' },
23
-
24
- documentStyles,
25
- line1: { extend: 'Line' },
26
-
27
- stylesHelpers,
28
- line2: { extend: 'Line' },
29
-
30
- typeScale,
31
-
32
- on: {
33
- stateCreated: (el, s) => {
34
- s.update({
35
- base: s.base || 16,
36
- ratio: s.ratio || 1.125,
37
- range: s.range || [-3, +8],
38
- subsequence: s.subsequence || true,
39
- styles: s.styles || {},
40
- h1Matches: s.h1Matches || +6,
41
- scales: {},
42
- sequence: {},
43
- vars: {},
44
- type: 'demo-font-size',
45
- sampleText: 'Today is a big day for our tribe. The year ends.'
46
- }, {
47
- preventUpdate: true,
48
- preventUpdateListener: true
49
- })
50
-
51
- if (s.base && s.range) mapSequence(s, sortSequence)
52
- },
53
- stateUpdated: (el, s, changes) => {
54
- const { base, ratio, range, subsequence, h1Matches } = changes
55
-
56
- s.update({
57
- base,
58
- ratio,
59
- range,
60
- subsequence,
61
- h1Matches
62
- }, {
63
- preventUpdate: true,
64
- preventUpdateListener: true
65
- })
66
- }
67
- }
68
- }
69
- }