@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,101 +0,0 @@
1
- 'use strict'
2
-
3
- import { Link, ClickableItem, TooltipParent } from '@symbo.ls/components'
4
- import { Flex, SquareButton } from 'smbls'
5
-
6
- const setTooltipPosition = (el, s, options = {}) => {
7
- const key = parseInt(el.key)
8
- const rowHeight = `(var(--spacing-C) + var(--spacing-B1) + ${key}%)`
9
- const translateY = `calc(${rowHeight} * ${key} + var(--spacing-Y2))`
10
- const transform = `translate3d(0%, ${translateY}, 1px)`
11
- const Tooltip = el.lookup('Tooltip')
12
- if (Tooltip.setProps) {
13
- Tooltip.setProps({
14
- opacity: options.visible && '1',
15
- visibility: options.visible && 'visible',
16
- text: s.title,
17
- transform
18
- })
19
- }
20
- }
21
-
22
- export const NavbarButton = {
23
- extend: [ClickableItem, Link, SquareButton, TooltipParent],
24
-
25
- props: ({ state }) => ({
26
- href: state.href,
27
- active: window.location.pathname.includes(state.href),
28
- isActive: window.location.pathname.includes(state.href),
29
- theme: null,
30
- position: 'relative'
31
- }),
32
-
33
- on: {
34
- update: (el, s) => {
35
- const active = window.location.pathname.includes(s.href)
36
- if (active) setTooltipPosition(el, s)
37
- },
38
- mouseover: (ev, el, s) => {
39
- if (!s.hover) {
40
- s.hover = true
41
- setTooltipPosition(el, s, { visible: true })
42
- }
43
- },
44
- mouseleave: (ev, el, s) => {
45
- if (s.hover) {
46
- s.hover = false
47
- el.lookup('Tooltip').setProps({
48
- opacity: '0',
49
- visibility: 'hidden'
50
- })
51
- }
52
- }
53
- }
54
- }
55
-
56
- export const DesignSystemNavbar = {
57
- tag: 'aside',
58
-
59
- props: {
60
- position: 'sticky',
61
- top: 'E',
62
- zIndex: 1001,
63
-
64
- nav: {
65
- gap: 'B1',
66
- flow: 'column',
67
- background: 'transparent',
68
- color: 'gray7',
69
- fontSize: 'A2'
70
- }
71
- },
72
-
73
- nav: {
74
- extend: Flex,
75
- childExtend: NavbarButton
76
- },
77
-
78
- Tooltip: {
79
- props: {
80
- background: 'gray0 .95',
81
- position: 'absolute',
82
- pointerEvents: 'none',
83
- top: '0',
84
- left: '100%',
85
- shape: 'rectangle',
86
- shapeDirection: null,
87
- padding: 'X2 Z1',
88
- transform: 'translate3d(5%, -50%, 0)',
89
- opacity: '0',
90
- visibility: 'hidden',
91
- transition: 'C defaultBezier, C defaultBezier, B defaultBezier',
92
- transitionProperty: 'opacity, visibility, transform',
93
- textAlign: 'start',
94
- zIndex: 99999,
95
- lineHeight: 1,
96
- title: { fontSize: 'Z' }
97
- },
98
- title: null,
99
- p: null
100
- }
101
- }
@@ -1,58 +0,0 @@
1
- 'use strict'
2
-
3
- import { Flex, Link, Hoverable, Pseudo, ArticleMedium } from '@symbo.ls/components'
4
-
5
- export const TutorialBanner = {
6
- extend: [Link, Flex, ArticleMedium, Pseudo, Hoverable],
7
-
8
- props: ({ state }) => ({
9
- flow: 'column',
10
- round: 'A',
11
- height: 'F',
12
- padding: 'A2 B',
13
- background: 'gray2',
14
- href: state.href,
15
- gap: '0',
16
- overflow: 'hidden',
17
- position: 'relative',
18
- color: 'white',
19
- flex: 1,
20
- transitionProperty: 'transform, opacity, padding',
21
-
22
- title: { margin: 'auto 0 0', text: state.title },
23
- p: { text: state.p },
24
-
25
- style: {
26
- userSelect: 'none',
27
- 'h2, p': { zIndex: 2 }
28
- },
29
-
30
- ':after, &:before': {
31
- content: '""',
32
- position: 'absolute',
33
- zIndex: 0,
34
- inset: '-5px -5px -5px -5px'
35
- },
36
-
37
- ':before': {
38
- transition: 'B defaultBezier',
39
- transitionProperty: 'opacity',
40
- backgroundImage: `url(${state.background})`,
41
- backgroundSize: 'cover',
42
- opacity: '0.5'
43
- },
44
-
45
- ':after': {
46
- transition: 'B defaultBezier',
47
- transitionProperty: 'opacity',
48
- background: 'shadow-overlay',
49
- opacity: '0.9'
50
- },
51
-
52
- ':hover': {
53
- padding: '- C1 - -',
54
- ':before': { opacity: '1' },
55
- ':after': { opacity: '1' }
56
- }
57
- })
58
- }
@@ -1,29 +0,0 @@
1
- 'use strict'
2
-
3
- import { Flex } from '@symbo.ls/components'
4
-
5
- const props = {
6
- fontSize: 'Z',
7
- alignItems: 'center',
8
- gap: 'Y1',
9
- whiteSpace: 'nowrap',
10
-
11
- color: {
12
- boxSize: 'B B',
13
- background: 'red',
14
- round: 'Y2'
15
- },
16
-
17
- value: {
18
- text: 'Background',
19
- color: 'white'
20
- }
21
- }
22
- export const ColorText = {
23
- extend: Flex,
24
- props,
25
-
26
- color: {},
27
- value: {}
28
- // text: 'efef'
29
- }
@@ -1,69 +0,0 @@
1
- 'use strict'
2
-
3
- import { ClickableItem, CommonField, Flex, Grid } from '@symbo.ls/components'
4
-
5
- export const ColorsPalette = {
6
- extend: CommonField,
7
-
8
- props: {
9
- gap: 'Z',
10
- element: {
11
- margin: '0 -X',
12
- flow: 'column',
13
- gap: 'Z2'
14
- }
15
- },
16
-
17
- title: { text: 'Suggestions' },
18
- element: {
19
- extend: Flex,
20
- childExtend: {
21
- extend: [ClickableItem, Grid],
22
-
23
- props: ({ state }) => ({
24
- minWidth: '190px',
25
- round: 'Z2',
26
- columns: 'repeat(3, 1fr)',
27
- overflow: 'hidden',
28
- opacity: '.35',
29
- childProps: { height: 'B2' },
30
-
31
- color1: { background: state[0] },
32
- color2: { background: state[1] },
33
- color3: { background: state[2] }
34
- }),
35
-
36
- color1: {},
37
- color2: {},
38
- color3: {},
39
-
40
- on: {
41
- click: (event, element, state) => {
42
- state.parent.update(state.parse())
43
- }
44
- }
45
- },
46
-
47
- $setStateCollection: () => [[
48
- '#5F6C37',
49
- '#F1E0BC',
50
- '#FFFFFF'
51
- ], [
52
- '#CCD5AE',
53
- '#FEF9E1',
54
- '#D3A374'
55
- ], [
56
- '#CDB4DB',
57
- '#FEAFCC',
58
- '#A2D2FF'
59
- ], [
60
- '#274553',
61
- '#E9C46A',
62
- '#E76F51'
63
- ], [
64
- '#8EC9E6',
65
- '#013047',
66
- '#FFB703'
67
- ]]
68
- }
69
- }
@@ -1,22 +0,0 @@
1
- 'use strict'
2
-
3
- import { Flex } from '@symbo.ls/components'
4
-
5
- const props = {
6
- gap: 'E',
7
- margin: '- - D2 -',
8
- childProps: {
9
- color: 'gray6',
10
- maxWidth: `${272 / 14}em`
11
- }
12
- }
13
-
14
- export const ColumnParagraphs = {
15
- props,
16
- extend: Flex,
17
-
18
- childExtend: { tag: 'p' },
19
- ...[{ props: { text: 'To personalize your Symbols experience, we need to get started with themes' } },
20
- { props: { text: 'Please fill in the document dark and light themes' } }]
21
-
22
- }
@@ -1,14 +0,0 @@
1
- 'use strict'
2
- import { Button } from '@symbo.ls/components'
3
-
4
- export const ContinueButton = {
5
- extend: Button,
6
- props: {
7
- text: 'Continue',
8
- fontSize: 'Z2',
9
- padding: 'Z1 C',
10
- background: 'linear-gradient(to top, rgba(50, 114, 184, .2), rgba(0, 121, 253, .27), rgba(0, 121, 253, .27))',
11
- color: 'white',
12
- fontWeight: '500'
13
- }
14
- }
@@ -1,81 +0,0 @@
1
- 'use strict'
2
-
3
- import { DesignElement, Flex, Grid } from '@symbo.ls/components'
4
-
5
- const componentHeader = {
6
- tag: 'header',
7
- extend: [DesignElement, Flex],
8
-
9
- props: ({ state }) => ({
10
- minWidth: '100%',
11
- padding: 'Z1 - Z1 Z2',
12
- flow: 'row',
13
- round: '0',
14
- alignItems: 'flex-start',
15
- pointerEvents: 'none',
16
- background: 'gray2',
17
-
18
- button: {
19
- padding: 'Y2',
20
- icon: state.icon,
21
- theme: state.iconTheme
22
- },
23
- heading: {
24
- gap: '0',
25
- title: {
26
- text: state.title,
27
- textTransform: 'capitalize'
28
- },
29
- p: {
30
- text: state.paragraph,
31
- maxWidth: 'F1'
32
- }
33
- }
34
- })
35
- }
36
-
37
- const propertyNumber = {
38
- extend: Grid,
39
- props: ({ state }) => ({
40
- columns: 'repeat(2, 1fr)',
41
- property: {
42
- text: state.property,
43
- color: 'gray6'
44
- },
45
- value: {
46
- text: state.value,
47
- fontWeight: '500'
48
- }
49
- }),
50
- property: {},
51
- value: {}
52
- }
53
-
54
- const componentProperties = {
55
- extend: Flex,
56
- state: 'properties',
57
- props: {
58
- padding: 'Z2 A',
59
- flow: 'column',
60
- gap: 'Z2',
61
- background: 'gray1'
62
- },
63
- childExtend: propertyNumber,
64
- $setStateCollection: ({ state }) => state.parse()
65
- }
66
-
67
- export const DesignComponent = {
68
- extend: Flex,
69
- props: {
70
- flow: 'column',
71
- minWidth: 'F1',
72
- maxWidth: 'F2',
73
- round: 'A',
74
- height: 'fit-content',
75
- overflow: 'hidden',
76
- userSelect: 'none'
77
- },
78
-
79
- componentHeader,
80
- componentProperties
81
- }
@@ -1,193 +0,0 @@
1
- 'use strict'
2
-
3
- import { Flex, IconText } from '@symbo.ls/components'
4
-
5
- const fontName = {
6
- tag: 'caption',
7
- props: {
8
- text: 'avenir next',
9
- whiteSpace: 'nowrap',
10
- textTransform: 'capitalize'
11
- }
12
- }
13
-
14
- const fontWeights = {
15
- extend: Flex,
16
- props: {
17
- position: 'relative',
18
- width: 'fit-content',
19
- ':after': {
20
- content: '"+"',
21
- position: 'absolute',
22
- right: '-Z',
23
- top: '0',
24
- fontSize: '20px'
25
- },
26
- childProps: { fontSize: 'F2' }
27
- },
28
- childExtend: {
29
- extend: { text: 'A' }
30
- },
31
- ...[
32
- { props: { fontWeight: '700' } },
33
- { props: { fontWeight: '500' } },
34
- { props: { fontWeight: '400' } }
35
- ]
36
- }
37
-
38
- const letterTransform = {
39
- extend: Flex,
40
- props: {
41
- alignItems: 'center',
42
- height: 'fit-content',
43
- gap: 'X2',
44
- childProps: {
45
- minHeight: 'fit-content'
46
- }
47
- },
48
- childExtend: {},
49
- ...[
50
- { props: { text: 'a', textTransform: 'uppercase', fontSize: 'F2', fontWeight: '700' } },
51
- { props: { text: 'b', fontWeight: '700', fontSize: 'F' } },
52
- { props: { text: 'c', fontWeight: '500', fontSize: 'D2' } },
53
- { props: { text: 'd', fontSize: 'C2' } },
54
- { props: { text: 'e', fontSize: 'C' } },
55
- { props: { text: 'f', fontSize: 'B' } }
56
- ]
57
- }
58
-
59
- const fontStyle = {
60
- extend: Flex,
61
- props: {
62
- gap: 'V2'
63
- },
64
- childExtend: {
65
- props: {
66
- fontSize: 'F2',
67
- textTransform: 'uppercase',
68
- fontWeight: '300',
69
- margin: '0',
70
- padding: '0'
71
- }
72
- },
73
- ...[{
74
- props: { text: 'a' }
75
- }, {
76
- props: {
77
- text: 'b',
78
- style: {
79
- fontStyle: 'italic'
80
- }
81
- }
82
- }, {
83
- props: {
84
- text: 'c',
85
- position: 'relative',
86
- ':before': {
87
- content: '""',
88
- width: '100%',
89
- height: '2px',
90
- background: 'black .75',
91
- position: 'absolute',
92
- bottom: '10px'
93
- }
94
- }
95
- }]
96
- }
97
-
98
- const paragraph = {
99
- extend: Flex,
100
- props: {
101
- flow: 'column',
102
- gap: 'Y',
103
- title: {
104
- text: 'Sometimes high',
105
- fontSize: 'A2',
106
- margin: '0'
107
- },
108
- p: {
109
- text: `Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s.`,
110
- margin: '0',
111
- fontWeight: '400',
112
- maxWidth: 'G3',
113
- color: 'gray6'
114
- }
115
- },
116
- title: { tag: 'h3' },
117
- p: {}
118
- }
119
-
120
- const iconText = {
121
- extend: IconText,
122
- props: {
123
- fontSize: 'Z',
124
- gap: 'X1',
125
- icon: 'eyeOpen',
126
- text: 'ABCDEFGHIKLMNOPQRSTVWXYZabcdefghijklmnopqrstvwxyz0123456789!@#$%^&*()'
127
- }
128
- }
129
-
130
- const underlineSpan = {
131
- props: {
132
- text: 'Sometimes low',
133
- textDecoration: 'underline',
134
- style: { fontStyle: 'italic' }
135
- }
136
- }
137
-
138
- const props = {
139
- width: 'fit-content',
140
- color: 'black',
141
- background: 'white',
142
- position: 'relative',
143
- padding: 'A B',
144
- round: 'A1',
145
- flow: 'column',
146
- gap: 'B',
147
-
148
- fontName: {
149
- position: 'absolute'
150
-
151
- },
152
-
153
- content: {
154
- gap: 'D',
155
- fonts: {
156
- gap: 'C',
157
- align: 'flex-end center'
158
- },
159
- paragraph: {
160
- }
161
- },
162
-
163
- footer: {
164
- justifyContent: 'space-between',
165
- color: 'gray7'
166
- }
167
-
168
- }
169
- export const FontText = {
170
- extend: Flex,
171
- props,
172
-
173
- fontName,
174
-
175
- content: {
176
- extend: Flex,
177
- fonts: {
178
- extend: Flex,
179
-
180
- fontWeights,
181
- letterTransform,
182
- fontStyle
183
- },
184
-
185
- paragraph
186
- },
187
-
188
- footer: {
189
- extend: Flex,
190
- iconText,
191
- underlineSpan
192
- }
193
- }
@@ -1,53 +0,0 @@
1
- 'use strict'
2
-
3
- import { router } from '@domql/router'
4
- import { HeaderSignup, HeaderOfMember } from '@symbo.ls/components'
5
-
6
- export const Header = {
7
- props: {
8
- position: 'sticky',
9
- width: '100%',
10
- top: '0',
11
- zIndex: 99999,
12
-
13
- content: {
14
- maxWidth: '100%',
15
- width: '100%'
16
- }
17
- }
18
- }
19
-
20
- // '/': HeaderSignup, // HeaderInitial,
21
- // '/init': HeaderInitial, // HeaderInitial,
22
-
23
- let cacheToken
24
- export const HeaderOnRouter = {
25
- extend: Header,
26
- props: { width: '100%' },
27
-
28
- define: { routes: param => param },
29
- routes: {
30
- '/*': HeaderOfMember,
31
- '/': HeaderSignup
32
- },
33
-
34
- on: {
35
- render: (element, s) => {
36
- if (s.userToken) {
37
- router(element, '/*', {}, { updateState: false, pushState: false })
38
- } else {
39
- router(element, '/', {}, { updateState: false, pushState: false })
40
- }
41
- },
42
- initUpdate: (element, s, changes) => {
43
- if (cacheToken !== s.userToken) {
44
- cacheToken = s.userToken
45
- if (s.userToken) {
46
- router(element, '/*', {}, { updateState: false, pushState: false })
47
- } else {
48
- router(element, '/', {}, { updateState: false, pushState: false })
49
- }
50
- }
51
- }
52
- }
53
- }
@@ -1,23 +0,0 @@
1
- 'use strict'
2
-
3
- export const HeaderHeading = {
4
- tag: 'header',
5
-
6
- props: { margin: '- - C2 -' },
7
-
8
- Caption: {
9
- text: `Let's get started`,
10
- whiteSpace: 'nowrap',
11
- margin: '0',
12
- color: 'gray6'
13
- },
14
-
15
- H1: {
16
- color: 'white',
17
- text: 'First was the dark',
18
- fontSize: 'H2',
19
- fontWeight: '700',
20
- margin: '0',
21
- height: 'fit-content'
22
- }
23
- }
@@ -1,64 +0,0 @@
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
- transitionProperty: 'transform, opacity, border-radius',
18
- icon: {
19
- fontSize: 'C2',
20
- name: state.value
21
- },
22
- ':hover': {
23
- round: '0'
24
- }
25
- }),
26
-
27
- on: {
28
- click: (event, element, state) => {
29
- copyStringToClipboard(state.value)
30
- Link.on.click(event, element, state)
31
- }
32
- }
33
- }
34
-
35
- export const IconsGroup = {
36
- state: { toggleShow: true },
37
- props: ({ state }) => ({
38
- hide: !Object.keys(state.list).length
39
- }),
40
-
41
- SectionHeader: {
42
- extend: true,
43
- heading: {},
44
- nav: {
45
- add: {
46
- props: {
47
- icon: 'plus',
48
- href: '/icons/add-icon'
49
- }
50
- }
51
- }
52
- },
53
-
54
- Grid: {
55
- props: ({ state }) => ({
56
- hide: !state.toggleShow,
57
- columns: 'repeat(12, 1fr)',
58
- gap: 'Z',
59
- margin: '- -Z2'
60
- }),
61
- childExtend: IconItem,
62
- $setStateCollection: ({ state }) => state.list
63
- }
64
- }