@symbo.ls/preview 0.0.98 → 2.0.7

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 (216) hide show
  1. package/README.md +19 -0
  2. package/app.webmanifest +4 -0
  3. package/index.html +14 -4
  4. package/netlify.toml +19 -0
  5. package/package.json +32 -32
  6. package/protect-pwd.js +65 -0
  7. package/src/animations.js +71 -0
  8. package/src/app.js +68 -30
  9. package/src/assets/dots.png +0 -0
  10. package/src/assets/dotsDark.png +0 -0
  11. package/src/config/index.js +31 -12
  12. package/src/config/theme.js +71 -1
  13. package/src/data/Symbols.sketch +0 -0
  14. package/src/data/_Symbols.sketch/document.json +1 -0
  15. package/src/data/_Symbols.sketch/fonts/6c9956fc8970ec3d8268c3f286afe19d954fc40b +0 -0
  16. package/src/data/_Symbols.sketch/fonts/750e9b005158d57108ebbcf288e2582f078d6735 +0 -0
  17. package/src/data/_Symbols.sketch/fonts/86c45cb69ad4ba2a8e6d0b81f20964b33f4eca6c +0 -0
  18. package/src/data/_Symbols.sketch/fonts/f97cec7aed309ec77b4fd3005d1a3e0d86c2a7b9 +0 -0
  19. package/src/data/_Symbols.sketch/images/0427bc225ee7dc33db78252defd5b2e4cd5b7467.png +0 -0
  20. package/src/data/_Symbols.sketch/images/0c4846cdd2f11ffb23c9ce063380fc934f7a11ea.png +0 -0
  21. package/src/data/_Symbols.sketch/images/55d3f5e93869fbd70e8dfbca1ce3dfa0cc9f2dbe.png +0 -0
  22. package/src/data/_Symbols.sketch/images/67ae1583a9d77eec7106f5016f48b5594a02b3f6.png +0 -0
  23. package/src/data/_Symbols.sketch/images/7152b3ea22388d53052d0212995a1805527ea862.png +0 -0
  24. package/src/data/_Symbols.sketch/images/72f1896a8462385fd596bc35f240382ba15814fc.png +0 -0
  25. package/src/data/_Symbols.sketch/images/73e4245b1f867343001657193ff2318c9cf2ef53.png +0 -0
  26. package/src/data/_Symbols.sketch/images/7b89dae77676fb4cfd072e0830cff9c27afd11c6.png +0 -0
  27. package/src/data/_Symbols.sketch/images/811e2b516575d3b4e7709dfef6369bce7dae0a26.png +0 -0
  28. package/src/data/_Symbols.sketch/images/82d006789579f2ee1fa45c9116f7cd7dd1bcbe37.png +0 -0
  29. package/src/data/_Symbols.sketch/images/8a896270aa4da8e2401d0ea76e46dc9b9125e59a.png +0 -0
  30. package/src/data/_Symbols.sketch/images/966688c4a579283836f15ab69c8b76e11b236ff5.png +0 -0
  31. package/src/data/_Symbols.sketch/images/b903a498e1d438e8bb12de5422f732c717b79eff.png +0 -0
  32. package/src/data/_Symbols.sketch/images/b9f3cae81a855e21ae75185dcb6ae6551c5447f1.png +0 -0
  33. package/src/data/_Symbols.sketch/images/cd0f908410abf4cad7a4501539eb0711c41a182f.png +0 -0
  34. package/src/data/_Symbols.sketch/images/d54f15f130ba4f1d4ad56f03c01ac06fe0ab4f56.png +0 -0
  35. package/src/data/_Symbols.sketch/images/df5a20029363f95abc58b2c8972e1417d84c8aa7.png +0 -0
  36. package/src/data/_Symbols.sketch/images/e889546970c931244400c2f70412c39123029cb3.png +0 -0
  37. package/src/data/_Symbols.sketch/images/f420a7a2beb15bee5d2ecbba8f296c6d4b22dfa3.png +0 -0
  38. package/src/data/_Symbols.sketch/meta.json +1 -0
  39. package/src/data/_Symbols.sketch/pages/31D11772-FB33-42EC-A3CC-79F63922E04D.json +1 -0
  40. package/src/data/_Symbols.sketch/pages/35BD91AD-F0ED-4002-891D-F1B3250E88C1.json +1 -0
  41. package/src/data/_Symbols.sketch/pages/4831AF31-ECB8-4DA6-B4D0-C1095D42146C.json +1 -0
  42. package/src/data/_Symbols.sketch/pages/6FCC0155-B3F4-4792-892E-523D45315AFD.json +1 -0
  43. package/src/data/_Symbols.sketch/pages/7996D5DD-C5B2-4EE7-9DE8-2C05E2ACA9F3.json +1 -0
  44. package/src/data/_Symbols.sketch/pages/B314C0F3-0038-473F-A127-536AF28E5272.json +1 -0
  45. package/src/data/_Symbols.sketch/pages/B6798E64-F7E9-40F5-9BD0-88A548478438.json +1 -0
  46. package/src/data/_Symbols.sketch/pages/B9B28DF3-EDC2-4D5B-A412-12B3B2E7DE58.json +1 -0
  47. package/src/data/_Symbols.sketch/pages/CA6E47E4-DAF7-4D1D-8DDC-D5A60508D9A0.json +1 -0
  48. package/src/data/_Symbols.sketch/pages/D6F5EB10-9D31-47AC-9077-1CE8CB2C2448.json +1 -0
  49. package/src/data/_Symbols.sketch/previews/preview.png +0 -0
  50. package/src/data/_Symbols.sketch/user.json +1 -0
  51. package/src/data/categories.js +44 -0
  52. package/src/data/components/button-archived/index.js +63 -0
  53. package/src/data/components/button-archived/style.js +5 -0
  54. package/src/data/components/button-circle/index.js +54 -0
  55. package/src/data/components/button-contacts/index.js +56 -0
  56. package/src/data/components/button-contacts/style.js +13 -0
  57. package/src/data/components/button-download/index.js +63 -0
  58. package/src/data/components/button-pro/index.js +98 -0
  59. package/src/data/components/button-pro/style.js +19 -0
  60. package/src/data/components/button-theme-switcher/index.js +104 -0
  61. package/src/data/components/button-theme-switcher/style.js +16 -0
  62. package/src/data/components/button-user/index.js +82 -0
  63. package/src/data/components/button-user/style.js +25 -0
  64. package/src/data/components/datepicker/index.js +40 -0
  65. package/src/data/components/datepicker/style.js +4 -0
  66. package/src/data/components/dropdown-list/index.js +56 -0
  67. package/src/data/components/field/index.js +40 -0
  68. package/src/data/components/index.js +34 -0
  69. package/src/data/components/label/index.js +40 -0
  70. package/src/data/components/notification/index.js +55 -0
  71. package/src/data/components/notification/style.js +20 -0
  72. package/src/data/components/pills/index.js +37 -0
  73. package/src/data/components/tooltip/index.js +38 -0
  74. package/src/data/index.js +3 -0
  75. package/src/data/library/button-circle/index.js +52 -0
  76. package/src/data/library/button-join/index.js +61 -0
  77. package/src/data/library/family-bundle/index.js +99 -0
  78. package/src/data/library/family-bundle/style.js +27 -0
  79. package/src/data/library/index.js +15 -0
  80. package/src/data/library/join-class/index.js +45 -0
  81. package/src/data/library/parent-mode/index.js +69 -0
  82. package/src/data/library/parent-mode/style.js +25 -0
  83. package/src/index.html +57 -0
  84. package/src/index.js +7 -0
  85. package/src/pages/Account/index.js +147 -17
  86. package/src/pages/Account/{__/setUpProject.js → setUpProject.js} +10 -10
  87. package/src/pages/Color/colors.js +58 -0
  88. package/src/pages/Color/documentThemes.js +101 -0
  89. package/src/pages/Color/index.js +10 -7
  90. package/src/pages/Color/style.js +7 -0
  91. package/src/pages/Color/themes.js +117 -23
  92. package/src/pages/ColorEditor/colorTone.js +163 -0
  93. package/src/pages/{Theme → ColorEditor}/friendTheme.js +3 -3
  94. package/src/pages/ColorEditor/index.js +178 -0
  95. package/src/pages/{Theme → ColorEditor}/interactivity.js +7 -6
  96. package/src/pages/{Theme → ColorEditor}/style.js +12 -1
  97. package/src/pages/{Theme → ColorEditor}/themingTools.js +12 -12
  98. package/src/pages/Editor/index.js +9 -7
  99. package/src/pages/Editor/layers.js +14 -14
  100. package/src/pages/Editor/scene.js +9 -7
  101. package/src/pages/Editor/tools.js +22 -22
  102. package/{.legacy → src/pages/Export}/_tools_old.js +6 -7
  103. package/src/pages/Export/const.js +4 -3
  104. package/src/pages/Export/description.js +87 -58
  105. package/src/pages/Export/header.js +37 -0
  106. package/src/pages/Export/index.js +39 -48
  107. package/src/pages/Export/scene.js +61 -98
  108. package/src/pages/Export/state.js +5 -11
  109. package/src/pages/Export/style.js +28 -0
  110. package/src/pages/Export/tools.js +86 -41
  111. package/src/pages/Icons/index.js +69 -73
  112. package/src/pages/Icons/style.js +18 -0
  113. package/src/pages/Library/index.js +47 -24
  114. package/src/pages/Library/style.js +43 -0
  115. package/src/pages/PageProto.js +26 -0
  116. package/src/pages/Shapes/index.js +204 -54
  117. package/src/pages/Shapes/style.js +28 -0
  118. package/src/pages/Spaces/boxModel.js +3 -0
  119. package/src/pages/Spaces/index.js +47 -23
  120. package/{.legacy → src/pages/Spaces}/preview.js +14 -14
  121. package/src/pages/Spaces/sequence.js +1 -30
  122. package/src/pages/Spaces/state.js +14 -12
  123. package/{.legacy → src/pages/Spaces}/style.js +3 -0
  124. package/src/pages/Typography/docFonts.js +128 -0
  125. package/src/pages/Typography/docStyles.js +97 -0
  126. package/src/pages/Typography/index.js +36 -28
  127. package/src/pages/Typography/shared.js +3 -2
  128. package/src/pages/Typography/state.js +8 -9
  129. package/src/pages/Typography/style.js +11 -0
  130. package/src/pages/Typography/typeScale.js +82 -63
  131. package/src/pages/index.js +23 -15
  132. package/src/protect.js +114 -0
  133. package/src/state.js +3 -0
  134. package/src/style.js +12 -15
  135. package/src/test.js +30 -0
  136. package/svgSprite.config.js +1 -2
  137. package/test/index.test.js +5 -0
  138. package/.legacy/index copy.js +0 -45
  139. package/.vscode/extensions.json +0 -5
  140. package/index.js +0 -44
  141. package/src/assets/dark.png +0 -0
  142. package/src/assets/mask1.png +0 -0
  143. package/src/assets/mask2.png +0 -0
  144. package/src/assets/shapes.png +0 -0
  145. package/src/assets/space.png +0 -0
  146. package/src/assets/type.png +0 -0
  147. package/src/components/Aside.js +0 -101
  148. package/src/components/Banner.js +0 -58
  149. package/src/components/ColorText.js +0 -29
  150. package/src/components/ColorsPalette.js +0 -69
  151. package/src/components/ColumnParagrphs.js +0 -23
  152. package/src/components/ContinueButton.js +0 -14
  153. package/src/components/DesignComponent.js +0 -80
  154. package/src/components/FontText.js +0 -193
  155. package/src/components/Header.js +0 -50
  156. package/src/components/HeaderHeading.js +0 -23
  157. package/src/components/IconsGroup.js +0 -60
  158. package/src/components/Page.js +0 -135
  159. package/src/components/ResponsivePreview.js +0 -44
  160. package/src/components/Route.js +0 -1
  161. package/src/components/ShapePreview.js +0 -63
  162. package/src/components/ShapeSet.js +0 -85
  163. package/src/components/SlidersWithResponsive.js +0 -23
  164. package/src/components/SpacingButton/actionButtons.js +0 -41
  165. package/src/components/SpacingButton/dropdown.js +0 -114
  166. package/src/components/SpacingButton/index.js +0 -248
  167. package/src/components/SpacingButton/props.js +0 -45
  168. package/src/components/SpacingPreview.js +0 -154
  169. package/src/components/SpacingTable.js +0 -210
  170. package/src/components/ThemeButtons.js +0 -42
  171. package/src/components/UploadImage.js +0 -61
  172. package/src/components/Widget.js +0 -1
  173. package/src/components/index.js +0 -25
  174. package/src/pages/Account/__/index.js +0 -241
  175. package/src/pages/Color/globalThemes.js +0 -30
  176. package/src/pages/Color/palette.js +0 -35
  177. package/src/pages/Components/grid.js +0 -99
  178. package/src/pages/Components/index.js +0 -37
  179. package/src/pages/Components/sidebar.js +0 -28
  180. package/src/pages/Components/style.js +0 -16
  181. package/src/pages/DesignSystem/Dashboard/banners.js +0 -38
  182. package/src/pages/DesignSystem/Dashboard/designElements.js +0 -124
  183. package/src/pages/DesignSystem/Dashboard/index.js +0 -22
  184. package/src/pages/DesignSystem/Dashboard/quickstart.js +0 -86
  185. package/src/pages/DesignSystem/Dashboard/state.js +0 -118
  186. package/src/pages/DesignSystem/Dashboard/summary.js +0 -40
  187. package/src/pages/DesignSystem/index.js +0 -187
  188. package/src/pages/Export/gist.js +0 -23
  189. package/src/pages/Fonts/fontFaces.js +0 -50
  190. package/src/pages/Fonts/fontFamilies.js +0 -47
  191. package/src/pages/Fonts/index.js +0 -15
  192. package/src/pages/Fonts/state.js +0 -5
  193. package/src/pages/Init/ChooseEnvironment.js +0 -104
  194. package/src/pages/Init/CreateDocumentTheme.js +0 -166
  195. package/src/pages/Init/CreatePalette.js +0 -72
  196. package/src/pages/Init/FontText.js +0 -23
  197. package/src/pages/Init/Personalize/fields.js +0 -109
  198. package/src/pages/Init/Personalize/icon.js +0 -42
  199. package/src/pages/Init/Personalize/index.js +0 -37
  200. package/src/pages/Init/index.js +0 -36
  201. package/src/pages/Library/disabled.js +0 -38
  202. package/src/pages/MediaQuery/index.js +0 -46
  203. package/src/pages/MediaQuery/lists.js +0 -285
  204. package/src/pages/MediaQuery/state.js +0 -150
  205. package/src/pages/MediaQuery/typeScale.js +0 -69
  206. package/src/pages/Shapes/shapeSet.js +0 -133
  207. package/src/pages/State/index.js +0 -86
  208. package/src/pages/Theme/index.js +0 -197
  209. package/src/pages/Theme/preview.js +0 -153
  210. package/src/pages/Typography/collection.js +0 -110
  211. package/src/pages/Typography/documentStyles.js +0 -125
  212. package/src/pages/Typography/rangeButtons.js +0 -58
  213. package/src/pages/Typography/stylesHelpers.js +0 -30
  214. /package/{.legacy/boxModel.js → src/data/favorites.js} +0 -0
  215. /package/{.legacy/sequence.js → src/data/filters.js} +0 -0
  216. /package/src/pages/{Theme → ColorEditor}/ntc.js +0 -0
@@ -1,16 +1,16 @@
1
1
  ' use strict'
2
2
 
3
- import { Shape, Block, Flex, Text, Icon } from '@symbo.ls/components'
3
+ import { Shape, Block, Flex, Text, Icon } from '@symbo.ls/all'
4
4
 
5
5
  const objectLayer = {
6
- extend: [Block, Text, Shape],
6
+ proto: [Block, Text, Shape],
7
7
  props: {
8
8
  round: 'A',
9
9
  padding: '0 Y Y Y'
10
10
  },
11
11
 
12
12
  h4: {
13
- extend: [Block, Text],
13
+ proto: [Block, Text],
14
14
  props: {
15
15
  text: 'Button',
16
16
  padding: 'A 0 A1 A1'
@@ -19,7 +19,7 @@ const objectLayer = {
19
19
  },
20
20
 
21
21
  caption: {
22
- extend: [Block, Text],
22
+ proto: [Block, Text],
23
23
  props: {
24
24
  text: 'IconText',
25
25
  padding: '0 0 A B1'
@@ -27,10 +27,10 @@ const objectLayer = {
27
27
  },
28
28
 
29
29
  objectComponent: {
30
- extend: [Block, Flex],
30
+ proto: [Block, Flex],
31
31
  style: { flexDirection: 'column' },
32
- childExtend: {
33
- extend: [Block, Flex, Text, Shape],
32
+ childProto: {
33
+ proto: [Block, Flex, Text, Shape],
34
34
  props: {
35
35
  padding: 'Z2 0 Z2 B1',
36
36
  round: 'A'
@@ -38,13 +38,13 @@ const objectLayer = {
38
38
  style: {
39
39
  alignItems: 'center'
40
40
  },
41
- icon: { extend: Icon },
41
+ icon: { proto: Icon },
42
42
  caption: {
43
- extend: [Block, Text],
43
+ proto: [Block, Text],
44
44
  props: { padding: '0 X2 0 Y' }
45
45
  },
46
46
  span: {
47
- extend: Text,
47
+ proto: Text,
48
48
  style: { opacity: '.35' }
49
49
  }
50
50
  },
@@ -72,11 +72,11 @@ const objectLayer = {
72
72
 
73
73
  export default {
74
74
  tag: 'aside',
75
- extend: [Block, Text],
75
+ proto: [Block, Text],
76
76
  props: { size: 'Y' },
77
77
 
78
78
  caption: {
79
- extend: [Block, Text],
79
+ proto: [Block, Text],
80
80
  props: {
81
81
  text: 'Layer'
82
82
  },
@@ -92,7 +92,7 @@ export default {
92
92
  },
93
93
 
94
94
  layer: {
95
- extend: objectLayer,
95
+ proto: objectLayer,
96
96
  props: {
97
97
  theme: 'buttonPrimary'
98
98
  },
@@ -102,7 +102,7 @@ export default {
102
102
  objectComponent: {},
103
103
 
104
104
  layer2: {
105
- extend: objectLayer,
105
+ proto: objectLayer,
106
106
  style: {
107
107
  margin: '0 auto',
108
108
  background: 'rgba(255, 255, 255, .04)',
@@ -1,16 +1,16 @@
1
1
  'use strict'
2
2
 
3
- import { Block, Flex, Text, KangorooButton, Breadcrumb, SceneToolBar, Scene } from '@symbo.ls/components'
3
+ import { Block, Flex, Text, KangorooButton, Breadcrumb, SceneToolBar, Scene } from '@symbo.ls/all'
4
4
 
5
5
  const header = {
6
- extend: [Flex, Block],
6
+ proto: [Flex, Block],
7
7
  style: {
8
8
  justifyContent: 'space-between',
9
9
  marginTop: '12px',
10
10
  marginBottom: '4px'
11
11
  },
12
12
  nav: {
13
- extend: [Breadcrumb, Text],
13
+ proto: [Breadcrumb, Text],
14
14
  props: { size: 'A' },
15
15
  all: {
16
16
  props: {
@@ -29,10 +29,11 @@ const header = {
29
29
  }
30
30
 
31
31
  const buttonThemeSwitcher = {
32
- extend: KangorooButton,
32
+ proto: KangorooButton,
33
33
 
34
34
  props: {
35
35
  round: 'C',
36
+ theme: 'lightDark',
36
37
  size: 'A',
37
38
  padding: 'X1 Y X1 A1',
38
39
  gap: 'Z1',
@@ -44,6 +45,7 @@ const buttonThemeSwitcher = {
44
45
  },
45
46
 
46
47
  dark: {
48
+ theme: ['lightDark', 'inverse'],
47
49
  round: 'C',
48
50
  icon: 'moon',
49
51
  padding: 'Z Z1',
@@ -76,14 +78,14 @@ const buttonThemeSwitcher = {
76
78
 
77
79
  }
78
80
  export default {
79
- extend: Flex,
81
+ proto: Flex,
80
82
  style: {
81
83
  flex: 1,
82
84
  flexDirection: 'column'
83
85
  },
84
- header: { extend: header },
86
+ header: { proto: header },
85
87
  scene: {
86
- extend: Scene,
88
+ proto: Scene,
87
89
  style: {
88
90
  flex: 1,
89
91
  '> div': { height: '100%' }
@@ -1,11 +1,11 @@
1
1
  'use strict'
2
2
 
3
- import { Shape, Block, Flex, Text, SquareButton, ButtonSet, ClickableItem, ThemeSwitcher, ToolItem } from '@symbo.ls/components'
3
+ import { Shape, Block, Flex, Text, SquareButton, ButtonSet, ClickableItem, ThemeSwitcher, ToolItem } from '@symbo.ls/all'
4
4
 
5
5
  const commonComponent = {
6
- extend: Block,
6
+ proto: Block,
7
7
  caption: {
8
- extend: [Block, Text],
8
+ proto: [Block, Text],
9
9
  props: {
10
10
  padding: 'A X'
11
11
  },
@@ -15,7 +15,7 @@ const commonComponent = {
15
15
  }
16
16
  },
17
17
  toolsContainer: {
18
- extend: [Block, Shape, Flex],
18
+ proto: [Block, Shape, Flex],
19
19
  props: {
20
20
  gap: 'A',
21
21
  padding: 'A 0',
@@ -27,13 +27,13 @@ const commonComponent = {
27
27
  background: 'rgba(255, 255, 255, .06)'
28
28
  },
29
29
  tools: {
30
- extend: [Block, Flex],
30
+ proto: [Block, Flex],
31
31
  props: { gap: 'A' },
32
32
  style: {
33
33
  flexDirection: 'column'
34
34
  },
35
- childExtend: {
36
- extend: ToolItem,
35
+ childProto: {
36
+ proto: ToolItem,
37
37
  icon: { },
38
38
  tool: {
39
39
  props: { padding: 'X2' },
@@ -45,7 +45,7 @@ const commonComponent = {
45
45
  range: {},
46
46
  button1: { props: { size: 'B' } },
47
47
  button2: {
48
- extend: [SquareButton, ClickableItem],
48
+ proto: [SquareButton, ClickableItem],
49
49
  props: {
50
50
  icon: 'arrowAngleMirroringVertical',
51
51
  size: 'B',
@@ -60,7 +60,7 @@ const commonComponent = {
60
60
  }
61
61
 
62
62
  const themeSwitcher = {
63
- extend: ThemeSwitcher,
63
+ proto: ThemeSwitcher,
64
64
  props: {
65
65
  padding: 'Y2 X2 Y2 Z'
66
66
  },
@@ -83,7 +83,7 @@ const themeSwitcher = {
83
83
  },
84
84
 
85
85
  title: {
86
- extend: [Flex, Block],
86
+ proto: [Flex, Block],
87
87
  props: { gap: 'W' },
88
88
  style: { flexDirection: 'column' },
89
89
  text: 'Revolver',
@@ -105,7 +105,7 @@ const themeSwitcher = {
105
105
  }
106
106
 
107
107
  const style = {
108
- extend: commonComponent,
108
+ proto: commonComponent,
109
109
  caption: {
110
110
  props: { text: 'style' }
111
111
  },
@@ -142,7 +142,7 @@ const style = {
142
142
  }
143
143
 
144
144
  const spaces = {
145
- extend: commonComponent,
145
+ proto: commonComponent,
146
146
  caption: { props: { text: 'spaces' } },
147
147
  toolsContainer: {
148
148
  tools: {
@@ -185,7 +185,7 @@ const spaces = {
185
185
  }
186
186
 
187
187
  const border = {
188
- extend: commonComponent,
188
+ proto: commonComponent,
189
189
  caption: { props: { text: 'border' } },
190
190
  toolsContainer: {
191
191
  tools: {
@@ -219,7 +219,7 @@ const border = {
219
219
  }
220
220
 
221
221
  const form = {
222
- extend: commonComponent,
222
+ proto: commonComponent,
223
223
  caption: { props: { text: 'form' } },
224
224
  toolsContainer: {
225
225
  tools: {
@@ -230,7 +230,7 @@ const form = {
230
230
  tool: {
231
231
  button0: null,
232
232
  box: {
233
- extend: [Block, Shape],
233
+ proto: [Block, Shape],
234
234
  props: {
235
235
  round: 'X2'
236
236
  },
@@ -278,14 +278,14 @@ const form = {
278
278
  }
279
279
 
280
280
  export const accessibilityButoons = {
281
- extend: ButtonSet,
281
+ proto: ButtonSet,
282
282
  props: {
283
283
  gap: 'A1',
284
284
  padding: '0 0 Z 0'
285
285
  },
286
286
 
287
- childExtend: {
288
- extend: SquareButton,
287
+ childProto: {
288
+ proto: SquareButton,
289
289
  props: {
290
290
  theme: 'transparent',
291
291
  size: 'C'
@@ -301,7 +301,7 @@ export const accessibilityButoons = {
301
301
  }
302
302
 
303
303
  const accessibility = {
304
- extend: commonComponent,
304
+ proto: commonComponent,
305
305
  caption: { props: { text: 'accessibility' } },
306
306
  toolsContainer: {
307
307
  accessibilityButoons,
@@ -313,7 +313,7 @@ const accessibility = {
313
313
  tool: {
314
314
  button0: null,
315
315
  box: {
316
- extend: [Block, Shape],
316
+ proto: [Block, Shape],
317
317
  props: {
318
318
  round: 'X2'
319
319
  },
@@ -344,12 +344,12 @@ const accessibility = {
344
344
 
345
345
  export default {
346
346
  tag: 'aside',
347
- extend: [Block, Text],
347
+ proto: [Block, Text],
348
348
  props: { size: 'Y' },
349
349
  style: {
350
350
  paddingTop: '10px'
351
351
  },
352
- childExtend: commonComponent,
352
+ childProto: commonComponent,
353
353
  ...[
354
354
  style,
355
355
  spaces,
@@ -6,15 +6,15 @@ import {
6
6
  styleKangoroo
7
7
  } from './style'
8
8
 
9
- import { Button, Icon } from '@symbo.ls/components'
9
+ import { Button, Icon } from '@symbo.ls/all'
10
10
 
11
11
  export const KangorooButton = {
12
12
  style: styleKangoroo,
13
13
  tag: 'button',
14
- icon: { extend: Icon, name: 'sun' },
14
+ icon: { proto: Icon, name: 'sun' },
15
15
  text: 'light mode',
16
16
  button: {
17
- icon: { extend: Icon, name: 'moon' },
17
+ icon: { proto: Icon, name: 'moon' },
18
18
  text: 'go dark'
19
19
  }
20
20
  }
@@ -22,14 +22,13 @@ export const KangorooButton = {
22
22
  export const ResponsiveToolBar = {
23
23
  tag: 'nav',
24
24
 
25
- childExtend: {
26
- extend: Button,
25
+ childProto: {
26
+ proto: Button,
27
27
  style: screenButton,
28
28
  define: { active: param => param },
29
29
  class: {
30
30
  active: (el, s) => el.key === s.previewSize
31
- ? activeScreenButton
32
- : {}
31
+ ? activeScreenButton : {}
33
32
  },
34
33
  on: {
35
34
  click: (ev, el, s) => {
@@ -1,11 +1,12 @@
1
1
  'use strict'
2
2
 
3
- import { SEQUENCE, TYPOGRAPHY } from '@symbo.ls/scratch'
4
- import { LIBRARY, COMPONENTS } from '@symbo.ls/temp-db/symbols' // eslint-disable-line
3
+ import { SEQUENCE, TYPOGRAPHY } from '@symbo.ls/all'
4
+ import COMPONENTS from '../../data/components'
5
+ import LIBRARIES from '../../data/library'
5
6
 
6
7
  const COMPONENT_ROUTES = {}
7
- // LIBRARY.map(v => (COMPONENT_ROUTES[`/${v.key}`] = v))
8
8
  COMPONENTS.map(v => (COMPONENT_ROUTES[`/${v.key}`] = v))
9
+ LIBRARIES.map(v => (COMPONENT_ROUTES[`/${v.key}`] = v))
9
10
 
10
11
  // const SEQUENCE = [8, 9, 10, 11, 12, 13, 14, 15, 16, 18, 20, 22, 24, 26, 32, 36, 42, 48, 56, 62, 68, 76, 84, 92, 100, 110]
11
12
 
@@ -1,87 +1,116 @@
1
1
  'use strict'
2
2
 
3
- // import showdown from 'showdown'
4
- import { CommonField, Flex, PropertyList } from '@symbo.ls/components'
5
-
6
- const description = {
7
- extend: CommonField,
8
- if: ({ state }) => state.description,
9
- props: {
10
- padding: '0 0 B 0',
11
- caption: {
3
+ import { Block, Text, Flex, APITable, CodePreview } from '@symbo.ls/all'
4
+
5
+ import { styleArticle } from './style'
6
+
7
+ export const description = {
8
+ proto: Block,
9
+ props: { padding: '0 0 B 0' },
10
+ caption: {
11
+ proto: [Text, Block],
12
+ props: {
13
+ text: 'Description',
12
14
  size: 'Z',
13
- padding: '0 0 Y2 0',
14
- opacity: 0.5
15
- },
16
- p: {
17
- margin: '0'
15
+ padding: '0 0 Y2 0'
18
16
  }
19
17
  },
20
- caption: {
21
- text: 'Description'
22
- },
23
18
  p: {
24
- text: ({ state }) => state.description
19
+ proto: Text,
20
+ props: {
21
+ text: 'Kangoroo buttons are button compositions where the original button contain one or more child buttons.'
22
+ },
23
+ style: { margin: 0 }
25
24
  }
26
25
  }
27
26
 
28
- const readme = {
29
- extend: CommonField,
30
- if: ({ state }) => state.readme,
31
- props: ({ state }) => ({
32
- padding: '0 0 B 0',
33
- caption: {
34
- text: 'README.md',
35
- size: 'Z',
36
- opacity: 0.5,
37
- padding: '0 0 Y2 0'
38
- },
39
- p: {
40
- margin: '0'
41
- }
42
- }),
43
- caption: {},
44
- cnt: {
45
- html: ({ state }) => {
46
- // const converter = new showdown.Converter()
47
- // return converter.makeHtml(state.readme)
48
- }
49
- }
27
+ export const readme = {}
28
+
29
+ const ALL_PROPS = {
30
+ // Shape
31
+ shape: 'Name of the shape from the Shapes page',
32
+ shapeDirection: 'if the shape is either `tooltip` or `tag`, this field sets the direction of pointing the shape',
33
+ depth: 'The level of the shadow that adds depth to the element',
34
+ round: 'Rounding the shape - also so called border-radius',
35
+ theme: 'Name of the theme which is configured in the Color Themes page',
36
+ color: 'Setting the specific text color matching with one from the Color Palette page',
37
+ background: 'Setting the specific background color matching with one from the Color Palette page',
38
+
39
+ // Block
40
+ spacingRatio: 'Ratio of the spacing sequence',
41
+ width: 'Width of the element',
42
+ height: 'Height of the element',
43
+ padding: 'Inner space of the element',
44
+ margin: 'Outer space of the element',
45
+ gap: 'Space between children inside the element',
46
+
47
+ // Flex
48
+ flexDirection: '',
49
+ alignItems: '',
50
+ justifyContent: '',
51
+
52
+ // Text
53
+ text: 'Text value in the element',
54
+ size: 'Text size of the element',
55
+
56
+ // Img
57
+ src: 'Source path (eg Link) of the image',
58
+ alt: 'Alternative text in case image does not load',
59
+ title: 'Title when hovering the image',
60
+
61
+ // Icon
62
+ icon: 'Name of the icon from the Icons page',
63
+
64
+ // TextDirection
65
+ direction: 'Language direction of the component'
50
66
  }
51
67
 
52
68
  export default {
53
69
  tag: 'article',
70
+ style: styleArticle,
71
+ proto: Block,
54
72
  props: { padding: 'B2 0' },
55
73
 
56
74
  description,
57
75
 
58
- readme,
59
-
60
76
  usage: {
61
- extend: [Flex],
77
+ proto: [Block, Flex],
62
78
  props: { gap: 'C1' },
63
79
 
64
80
  table: {
65
- props: { flex: 1 },
66
- extend: PropertyList,
67
- if: ({ state }) => state.props,
81
+ proto: APITable,
82
+ style: { flex: 1 },
68
83
 
69
- title: {},
70
- list: {
71
- $setStateCollection: ({ state }) => state.props
84
+ header: {},
85
+ properties: {
86
+ content: el => {
87
+ const props = el.lookup('content').props.defaultProps
88
+ const obj = {}
89
+ Object.keys(props).map(prop => {
90
+ const value = props[prop]
91
+ const type = typeof value
92
+ const formattedValue = `${JSON.stringify(value)}`
93
+ const description = ALL_PROPS[prop]
94
+ obj[`_${prop}`] = {
95
+ props: { prop, type, formattedValue, description }
96
+ }
97
+ })
98
+ return obj
99
+ }
72
100
  }
73
101
  },
74
102
 
75
103
  code: {
76
- extend: 'Code',
77
- props: {
78
- flex: '0 0 320px',
79
- margin: '0'
80
- },
81
- if: ({ state }) => state.code,
82
- title: {},
83
- code: {
84
- text: ({ state }) => state.code
104
+ proto: CodePreview,
105
+ h4: {},
106
+ pre: {
107
+ style: {
108
+ width: `${270 / 16}em`
109
+ },
110
+ text: el => {
111
+ const props = el.lookup('content').props
112
+ return props.code
113
+ }
85
114
  }
86
115
  }
87
116
  }
@@ -0,0 +1,37 @@
1
+ 'use strict'
2
+
3
+ import { Flex, Block, Breadcrumb, SceneToolBar } from '@symbo.ls/all'
4
+ import { styleHeader } from './style'
5
+
6
+ export default {
7
+ tag: 'header',
8
+ proto: [Flex, Block],
9
+ props: { padding: 'Z 0 Z Y' },
10
+ style: styleHeader,
11
+
12
+ nav: {
13
+ proto: Breadcrumb,
14
+
15
+ all: {
16
+ props: {
17
+ href: '/components',
18
+ text: 'Components'
19
+ }
20
+ },
21
+ category: {
22
+ if: el => el.lookup('content').props.category.text,
23
+ props: (el) => {
24
+ const props = el.lookup('content').props
25
+ return {
26
+ href: `/components/${props.category.key}`,
27
+ text: props.category.text
28
+ }
29
+ }
30
+ },
31
+ title: {
32
+ text: el => el.lookup('content').props.title
33
+ }
34
+ },
35
+
36
+ sceneTools: { proto: SceneToolBar }
37
+ }
@@ -1,81 +1,72 @@
1
1
  'use strict'
2
2
 
3
- import { router, lastLevel } from '@domql/router' // eslint-disable-line no-unused-vars
3
+ import style from './style'
4
4
 
5
- import { Flex } from '@symbo.ls/components'
6
- import { Page } from '../../components'
5
+ import router from 'domql-preview/packages/router'
6
+ import { Block, Footer, ResponsiveToolBar } from '@symbo.ls/all'
7
+ import PageProto from '../PageProto'
7
8
 
8
9
  import state from './state'
10
+ import header from './header'
9
11
  import scene from './scene'
10
12
  import tools from './tools'
11
13
  import description from './description'
12
14
 
13
- import { fetchGist } from './gist'
14
-
15
- import { COMPONENT_ROUTES } from './const'
16
-
17
- const componentState = (context) => { // eslint-disable-line no-unused-vars
18
- const arr = [...context.LIBRARY, ...context.COMPONENTS]
19
- return arr.filter(v => {
20
- const key = window.location.pathname.split('component/')[1]
21
- return v.key === key
22
- })
23
- }
24
-
25
- export const Export = {
15
+ export default {
26
16
  key: 'export',
27
- extend: Flex,
17
+ proto: Block,
28
18
 
29
- props: {
30
- width: '100%',
31
- flow: 'column',
32
- padding: '0 Y2'
33
- },
19
+ style,
20
+
21
+ props: { padding: '0 A 0 A' },
34
22
 
35
23
  state,
36
24
 
37
25
  on: {
38
- stateCreated: (element, state) => {
26
+ init: (el, s) => {
27
+ const { LIBRARY } = el.parent.state
28
+
39
29
  const route = window.location.pathname
40
30
  const routes = route.slice(1).split('/')
41
- const componentKey = routes[1]
42
- const { COMPONENTS } = state.__system
43
31
 
44
- const libComponent = COMPONENT_ROUTES[`/${componentKey}`]
45
- const liveComponent = COMPONENTS[componentKey]
32
+ const ROUTES = {}
33
+ const keys = Object.keys(LIBRARY)
34
+ keys.map(v => (ROUTES[`/${LIBRARY[v].key}`] = LIBRARY[v]))
46
35
 
47
- const content = libComponent || liveComponent
48
-
49
- if (content) {
50
- state.update({
51
- live: !!liveComponent,
52
- ...content
53
- }, { preventUpdate: true })
54
- }
55
- if (componentKey.length === 32) { // this might be Gist
56
- fetchGist(componentKey, state)
57
- }
58
-
59
- // if (!content) return router(el.__root, '/components')
36
+ const content = ROUTES[`/${routes[1]}`]
37
+ if (!content) return router(el.lookup('app'), '/components')
38
+ el.props = content || {}
39
+ if (content.defaultProps.theme) s.theme = content.defaultProps.theme
60
40
  }
61
41
  },
62
42
 
63
43
  main: {
44
+ proto: PageProto,
64
45
  style: { maxWidth: 'none' },
46
+
47
+ header,
65
48
  scene
66
49
  },
67
50
 
68
- cnt: {
69
- extend: [Page],
51
+ div: {
52
+ proto: [PageProto],
53
+
54
+ style: { flex: '1' },
70
55
 
71
- props: {
72
- padding: 'Z2 C1 A',
73
- flex: '1'
56
+ tools: {
57
+ proto: Block,
58
+ props: {
59
+ padding: 'Z2 0 0 0',
60
+ flexAlign: 'center space-between'
61
+ },
62
+
63
+ tools,
64
+
65
+ responsive: { proto: ResponsiveToolBar }
74
66
  },
75
67
 
76
- tools,
77
68
  description
78
- }
69
+ },
79
70
 
80
- // footer: { extend: Footer }
71
+ footer: { proto: Footer }
81
72
  }