@symbo.ls/preview 2.7.21 → 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 -250
  60. package/src/components/SpacingButton/props.js +0 -45
  61. package/src/components/SpacingPreview.js +0 -156
  62. package/src/components/SpacingTable.js +0 -213
  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 -36
  75. package/src/pages/Color/themes.js +0 -37
  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 -48
  101. package/src/pages/Fonts/index.js +0 -16
  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 -149
  106. package/src/pages/Init/ChooseProject.js +0 -61
  107. package/src/pages/Init/CreateDocumentTheme.js +0 -176
  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 -65
  124. package/src/pages/Spaces/sequence.js +0 -34
  125. package/src/pages/Spaces/templates.js +0 -37
  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 -226
  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 -152
  134. package/src/pages/Theme/selectsGrid.js +0 -74
  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 -71
  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 -83
  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,135 +0,0 @@
1
- 'use strict'
2
-
3
- import { PageTemplate, Overlay, Flex, IconButton } from '@symbo.ls/components'
4
- import { Link } from '@symbo.ls/components/src/Link'
5
-
6
- import MASK1 from '../assets/mask1.png'
7
- import MASK2 from '../assets/mask2.png' // eslint-disable-line
8
-
9
- export const Page = {
10
- tag: 'main',
11
- extend: PageTemplate,
12
-
13
- props: {
14
- maxWidth: 'K-default'
15
- }
16
- }
17
-
18
- export const InitPage = {
19
- tag: 'main',
20
- extend: Flex,
21
-
22
- props: {
23
- width: '100%',
24
- maxWidth: 'J',
25
- flow: 'column',
26
- position: 'relative',
27
- align: 'flex-start',
28
-
29
- content: { width: '100%' }
30
- },
31
-
32
- back: {
33
- extend: [Link, IconButton],
34
- props: {
35
- position: 'absolute',
36
- fontSize: 'A1',
37
- top: '0',
38
- right: '102.5%',
39
- icon: 'arrow angle left'
40
- }
41
- }
42
- }
43
-
44
- const ifWeHaveComponents = (state) => {
45
- const keys = Object.keys(state.__projectLibrary)
46
- return !!keys.length
47
- }
48
-
49
- export const DisabledPage = {
50
- props: ({ state }) => ({
51
- active: ifWeHaveComponents(state),
52
- maxHeight: 'none',
53
- overflow: 'visible',
54
-
55
- '!active': {
56
- maxHeight: 'calc(100vh - 7em)',
57
- overflow: 'hidden'
58
- },
59
-
60
- '.active': {
61
- maxHeight: 'none',
62
- overflow: 'visible'
63
- }
64
- }),
65
-
66
- on: {
67
- initUpdate: (element, state) => {
68
- element.setProps({ active: ifWeHaveComponents(state) }, { preventUpdate: true, ignoreInitUpdate: true })
69
- }
70
- },
71
-
72
- disablingOverlay: {
73
- extend: [Overlay, Flex],
74
-
75
- props: ({ state }) => ({
76
- active: ifWeHaveComponents(state),
77
- overflow: 'hidden',
78
- background: 'shadow-overlay',
79
- '.active': {
80
- animation: 'fadeOutDown',
81
- animationDuration: 'G',
82
- transition: 'G defaultBezier',
83
- transitionProperty: 'opacity, transform, visibility',
84
- opacity: '0',
85
- visibility: 'hidden',
86
- transform: 'translate3d(0, 12.5%, 1px)',
87
- pointerEvents: 'none'
88
- },
89
- '!active': {
90
- animation: 'fadeInUp',
91
- animationDuration: 'G'
92
- }
93
- }),
94
-
95
- Overlay: {
96
- background: 'gradient-colorful',
97
- inset: '0 0 0 0',
98
- opacity: '.9',
99
- style: {
100
- WebkitMaskImage: 'url(' + MASK1 + ')',
101
- WebkitMaskSize: '100% 100%'
102
- }
103
- },
104
-
105
- message: {
106
- props: ({ state }) => ({
107
- animation: 'fadeInUpShort',
108
- animationDuration: 'G',
109
- animationDelay: 'G',
110
- margin: 'auto auto 0',
111
- padding: 'C1 E C',
112
- width: '100%',
113
- maxWidth: 'K-default',
114
- ArticleBig: {
115
- p: {
116
- text: 'Open up ' + state.appKey + ' in a new window to start working with components'
117
- }
118
- }
119
- }),
120
-
121
- ArticleBig: {
122
- title: {
123
- text: 'Connect to your website'
124
- },
125
- p: {
126
- color: 'white .8',
127
- margin: 'X 0 0',
128
- animation: 'fadeInUpShort',
129
- animationDuration: 'G',
130
- animationDelay: 'G1'
131
- }
132
- }
133
- }
134
- }
135
- }
@@ -1,44 +0,0 @@
1
- 'use strict'
2
-
3
- import { Flex, ResponsiveSreensPreview } from '@symbo.ls/components'
4
-
5
- const footer = {
6
- extend: Flex,
7
- props: {
8
- gap: 'A1',
9
- align: 'center space-between'
10
- },
11
-
12
- Paragraph: {
13
- text: 'For the best experience, check it out from screens larger than 1980px',
14
- color: 'gray6',
15
- margin: '0'
16
- },
17
-
18
- ResponsiveToolBar: {
19
- extend: true,
20
- devices: {
21
- childExtend: {
22
- on: {
23
- click: (ev, el, s) => {
24
- const previewSize = s.parent.previewSize !== s.key ? s.key : 'mobileS'
25
- s.parent.update({ previewSize })
26
- }
27
- }
28
- }
29
- }
30
- }
31
- }
32
-
33
- export const ResponsivePreview = {
34
- extend: ResponsiveSreensPreview,
35
-
36
- props: {
37
- position: 'absolute',
38
- left: 'B',
39
- right: 'B',
40
- padding: '0 0 Z2'
41
- },
42
-
43
- footer
44
- }
@@ -1 +0,0 @@
1
- 'use strict'
@@ -1,63 +0,0 @@
1
- 'use strict'
2
-
3
- import { Scene, Flex, Code } from '@symbo.ls/components'
4
-
5
- const scene = {
6
- extend: Scene,
7
-
8
- scene: {
9
- props: {
10
- content: {
11
- background: 'shape 1',
12
- color: 'gray11',
13
- padding: 'Z A1',
14
- text: 'Shape Preview'
15
- }
16
- },
17
-
18
- on: {
19
- update: (el, s) => {
20
- el.set({
21
- props: s.props
22
- })
23
- }
24
- }
25
- }
26
- }
27
-
28
- export const ShapePreview = {
29
- extend: Flex,
30
- props: {
31
- height: 'E3',
32
- zIndex: '9999',
33
- gap: 'A',
34
- alignItems: 'stretch ',
35
-
36
- scene: { flex: 1 },
37
-
38
- style: {
39
- backdropFilter: 'blur(15px)'
40
- }
41
- },
42
-
43
- scene,
44
- code: {
45
- extend: Code,
46
- props: ({ state }) => ({
47
- hide: Object.keys(state.props).length === 0,
48
- flex: '0 0 360px',
49
- margin: '0',
50
- code: {
51
- height: '100%',
52
- margin: '0'
53
- },
54
- buttons: { marginInline: 'X2' }
55
- }),
56
- title: null,
57
- code: {
58
- props: {
59
- text: ({ state }) => 'const props = ' + JSON.stringify(state.props, null, 2)
60
- }
61
- }
62
- }
63
- }
@@ -1,85 +0,0 @@
1
- 'use strict'
2
-
3
- import { ClickableItem, Flex } from '@symbo.ls/components'
4
-
5
- const isActive = (el, s) => s.parent.active === `${el.parent.parent.parent.key}-${el.key}`
6
-
7
- const ShapeItem = {
8
- extend: [ClickableItem, Flex],
9
-
10
- props: (el, s) => ({
11
- padding: 'B',
12
- round: 'Z',
13
- alignItems: 'center',
14
- justifyContent: 'center',
15
- outline: '0, shape, solid',
16
- background: 'gray1',
17
- theme: null,
18
- cursor: 'pointer',
19
-
20
- active: isActive(el, s),
21
-
22
- '.active': {
23
- outline: 'X, shape, solid',
24
- opacity: '1',
25
- background: 'gray2'
26
- },
27
-
28
- _shape: {
29
- transition: 'A defaultBezier',
30
- transitionProperty: 'background',
31
- width: 'C1',
32
- height: 'C1',
33
- background: 'gray3'
34
- }
35
- }),
36
-
37
- _shape: {},
38
-
39
- on: {
40
- click: (ev, el, s) => {
41
- const active = `${el.parent.parent.parent.key}-${el.key}`
42
- s.parent.props = s.parse()
43
- s.parent.update({ active })
44
- },
45
- mouseover: (ev, el, s) => {
46
- el._shape.setProps({ background: 'gray5' })
47
- },
48
- mouseleave: (ev, el, s) => {
49
- const active = isActive(el, s)
50
- if (!active) el._shape.setProps({ background: 'gray3' })
51
- },
52
- update: (el, s) => {
53
- const active = isActive(el, s)
54
- el._shape.setProps({ background: active ? 'gray5' : 'gray3' })
55
- }
56
- }
57
- }
58
-
59
- export const ShapeSet = {
60
- props: {
61
- label: {
62
- display: 'block',
63
- opacity: '.65',
64
- padding: '0 0 Z 0',
65
- span: {
66
- opacity: '.65'
67
- }
68
- }
69
- },
70
-
71
- label: {},
72
- list: {
73
- extend: Flex,
74
- props: {
75
- gap: 'A2',
76
- wrap: 'wrap'
77
- },
78
- childExtend: {
79
- extend: ShapeItem,
80
- _shape: {
81
- props: ({ state }) => state
82
- }
83
- }
84
- }
85
- }
@@ -1,23 +0,0 @@
1
- 'use strict'
2
-
3
- import { Flex } from '@symbo.ls/components'
4
-
5
- export const SlidersWithResponsive = {
6
- extend: Flex,
7
-
8
- props: {
9
- align: 'flex-end space-between',
10
- position: 'sticky',
11
- top: 'C2',
12
- theme: 'header',
13
- zIndex: '1000',
14
- margin: '-B2 -B -B',
15
- padding: 'B2 B B',
16
- style: {
17
- backdropFilter: 'blur(15px)'
18
- }
19
- },
20
-
21
- SequenceSliders: {},
22
- ResponsiveToolBar: {}
23
- }
@@ -1,41 +0,0 @@
1
- 'use strict'
2
-
3
- import { Flex } from '@symbo.ls/components'
4
- import { SpacingButton } from '..' // eslint-disable-line
5
- import { SPACING_BUTTONS } from './props'
6
-
7
- export const setTableButtons = ({ state }) =>
8
- Object.keys(SPACING_BUTTONS).filter(v => {
9
- const rowState = state[state.selectedIndex]
10
- const { maxValue } = SPACING_BUTTONS[v]
11
- return maxValue ? maxValue > (rowState && rowState.val) : true
12
- })
13
-
14
- export const setRowButtons = ({ state }) =>
15
- Object.keys(SPACING_BUTTONS).filter(v => {
16
- const { maxValue } = SPACING_BUTTONS[v]
17
- return maxValue ? maxValue > state.val : true
18
- })
19
-
20
- export default {
21
- extend: Flex,
22
-
23
- props: {
24
- position: 'absolute',
25
- left: 'G3',
26
- gap: 'X',
27
- top: 'Y',
28
- height: 'B2',
29
- zIndex: 99,
30
- boxSizing: 'content-box',
31
- padding: '- - E',
32
- transition: 'C ease-out',
33
- transitionProperty: 'transform, opacity',
34
- opacity: '0',
35
-
36
- ':hover': { opacity: '1' }
37
- }
38
-
39
- // childExtend: SpacingButton,
40
- // $setStateCollection: setTableButtons
41
- }
@@ -1,114 +0,0 @@
1
- 'use strict'
2
-
3
- import {
4
- Dropdown,
5
- GridInDropdown
6
- } from '@symbo.ls/components'
7
-
8
- import {
9
- ChoosableButton,
10
- diffIconTypes,
11
- diffPropPosition,
12
- diffPropValue,
13
- getStateTree,
14
- keysOf
15
- } from '.'
16
- import { SPACING_BUTTONS } from './props'
17
-
18
- const ButtonInDropdown = {
19
- extend: [ChoosableButton],
20
- props: (element) => {
21
- const { table, row, property: direction } = getStateTree(element)
22
- const property = direction.parent
23
-
24
- const propValue = property.value
25
- const directionValue = direction.value
26
-
27
- const activeProperty = SPACING_BUTTONS[property.value]
28
- const keyLength = Object.keys(activeProperty).length
29
- const iconKey = diffIconTypes(propValue, directionValue)
30
-
31
- const active = table.props[propValue] === (row && row.key)
32
-
33
- const gridArea = keyLength > 3 && diffPropPosition(propValue, directionValue)
34
-
35
- return {
36
- active,
37
- gridArea,
38
- lazyLoad: true,
39
- icon: { name: iconKey },
40
- theme: null,
41
- '@dark': {
42
- background: 'transparent 0',
43
- color: 'gray7',
44
- ':hover': {
45
- theme: 'quinary',
46
- color: 'gray8'
47
- }
48
- },
49
- ':hover': null,
50
- '.active': {
51
- theme: null,
52
- color: 'blue'
53
- }
54
- }
55
- },
56
- attr: { title: ({ state }) => state.value },
57
- on: {
58
- click: (ev, element) => {
59
- const { table, row, property: direction } = getStateTree(element)
60
- const property = direction.parent
61
-
62
- const propKey = diffPropValue(property.value, direction.value)
63
- const active = table.props[propKey] === row.key
64
-
65
- if (active) {
66
- delete table.props[propKey] && table.update()
67
- } else {
68
- table.update({ props: { [propKey]: row.key } })
69
- }
70
- }
71
- }
72
- }
73
-
74
- export default {
75
- extend: Dropdown,
76
-
77
- props: {
78
- lazyLoad: true,
79
- minWidth: 'none',
80
- left: 'auto',
81
- grid: { gap: '0' }
82
- },
83
-
84
- header: { text: ({ state }) => state.value },
85
-
86
- grid: {
87
- extend: GridInDropdown,
88
-
89
- props: ({ state }) => {
90
- const keys = keysOf(state)
91
- if (keys.length < 4) {
92
- return {
93
- lazyLoad: true,
94
- columns: 'repeat(4, 1fr)'
95
- }
96
- }
97
- return {
98
- lazyLoad: true,
99
- columns: 'auto 32px auto',
100
- rows: 'auto 32px auto',
101
- templateAreas: `"endStart blockStart startEnd"
102
- "inlineStart content inlineEnd"
103
- "startStart blockEnd endEnd"`
104
- }
105
- },
106
-
107
- childExtend: ButtonInDropdown,
108
-
109
- $setStateCollection: (element) => {
110
- const { property } = getStateTree(element)
111
- return keysOf(property)
112
- }
113
- }
114
- }