@symbo.ls/preview 0.0.16 → 0.0.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -14,9 +14,11 @@ const component = {
14
14
  props: {
15
15
  icon: 'arrowDown',
16
16
  gap: 'X2',
17
- theme: 'quaternary',
17
+ theme: 'quinary',
18
18
  text: 'Download',
19
- padding: 'Z2 B2',
19
+ // padding: 'Z2 B2',
20
+ border: '.2em, solid, blue .2',
21
+ padding: 'A B2',
20
22
  round: 'C'
21
23
  }
22
24
  }
@@ -15,7 +15,7 @@ const component = {
15
15
  extend: KangorooButton,
16
16
 
17
17
  props: {
18
- theme: 'lightDark',
18
+
19
19
  round: 'Z2',
20
20
  padding: ['X1', 'X1', 'X1', 'A'],
21
21
  size: 'A',
@@ -31,7 +31,6 @@ const component = {
31
31
 
32
32
  child: {
33
33
  round: 12,
34
- theme: ['lightDark', 'inverse'],
35
34
  size: 'Z',
36
35
  padding: 'Z A2',
37
36
  text: '1 month free'
@@ -45,7 +44,7 @@ const component = {
45
44
  const code = `{
46
45
  extend: Button,
47
46
  props: {
48
- theme: 'lightDark',
47
+
49
48
  round: 12,
50
49
  padding: ['X1', 'X1', 'X1', 'A'],
51
50
  size: 'A',
@@ -54,7 +53,6 @@ const code = `{
54
53
 
55
54
  label: {
56
55
  round: 12,
57
- theme: ['lightDark', 'inverse'],
58
56
  size: 'Z',
59
57
  gap: 'A',
60
58
  padding: 'Z A2',
@@ -65,7 +63,7 @@ const code = `{
65
63
 
66
64
  const defaultState = {}
67
65
  const props = {
68
- theme: 'lightDark',
66
+
69
67
  round: 12,
70
68
  padding: ['X1', 'X1', 'X1', 'A'],
71
69
  size: 'A',
@@ -17,7 +17,6 @@ const component = {
17
17
 
18
18
  props: {
19
19
  round: 'C',
20
- theme: 'lightDark',
21
20
  size: 'A',
22
21
  padding: 'X1 Y X1 A1',
23
22
  gap: 'Z1',
@@ -29,7 +28,6 @@ const component = {
29
28
  },
30
29
 
31
30
  child: {
32
- theme: ['lightDark', 'inverse'],
33
31
  round: 'C',
34
32
  icon: 'moon',
35
33
  padding: 'Z Z1',
@@ -52,7 +50,6 @@ const code2 = `{
52
50
  extend: KangorooButton,
53
51
  props: {
54
52
  round: 'C',
55
- theme: 'lightDark',
56
53
  size: 'Z',
57
54
 
58
55
  light: {
@@ -61,7 +58,6 @@ const code2 = `{
61
58
  },
62
59
 
63
60
  dark: {
64
- theme: ['lightDark', 'inverse'],
65
61
  round: 'C',
66
62
  icon: 'moon',
67
63
  text: 'Dark Mode'
@@ -72,7 +68,6 @@ const code2 = `{
72
68
  const defaultState = {}
73
69
  const props = {
74
70
  round: 'C',
75
- theme: 'lightDark',
76
71
  size: 'Z',
77
72
 
78
73
  light: {
@@ -81,7 +76,6 @@ const props = {
81
76
  },
82
77
 
83
78
  child: {
84
- theme: ['lightDark', 'inverse'],
85
79
  round: 'C',
86
80
  icon: 'moon',
87
81
  text: 'Dark Mode'
@@ -22,7 +22,6 @@ const component = {
22
22
  gap: 'Y2',
23
23
  padding: 'W2 A W2 W2',
24
24
  icon: 'arrowAngleDown',
25
- theme: s.sceneTheme === 'light' ? 'lightDark' : 'quaternary'
26
25
  }),
27
26
 
28
27
  user: {
@@ -13,13 +13,24 @@ const category = CATEGORIES[7]
13
13
 
14
14
  const component = {
15
15
  style,
16
- extend: DatePicker
16
+ extend: DatePicker,
17
+ props: {
18
+ theme: null,
19
+ background: '--theme-quinary-dark-background',
20
+ style: {
21
+ backdropFilter: 'blur(3px)',
22
+ }
23
+ }
17
24
  }
18
25
 
19
26
  const code = `{}`
20
27
 
21
28
  const defaultState = {}
22
- const props = {}
29
+ const props = {
30
+ style: {
31
+ backdropFilter: 'blur(3px)',
32
+ }
33
+ }
23
34
 
24
35
  const settings = {
25
36
  gridOptions: { colspan: 7, rowspan: 5 }
@@ -18,8 +18,6 @@ const component = {
18
18
  // return {
19
19
  // round: 'Z',
20
20
  // depth: '16',
21
- // theme: s.sceneTheme === 'light' ? 'lightDark' : 'dark',
22
- // rowTheme: s.sceneTheme === 'light' ? 'lightDark' : 'quaternary'
23
21
  // }
24
22
  // },
25
23
 
@@ -12,7 +12,6 @@ const category = CATEGORIES[2]
12
12
  const component = {
13
13
  extend: Field,
14
14
  props: (el, s) => ({
15
- theme: s.sceneTheme === 'light' ? 'lightDark' : 'quaternary'
16
15
  })
17
16
  }
18
17
 
@@ -12,7 +12,6 @@ const category = CATEGORIES[0]
12
12
  const component = {
13
13
  extend: Label,
14
14
  props: {
15
- theme: 'lightDark'
16
15
  }
17
16
  }
18
17
 
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@symbo.ls/preview",
3
3
  "description": "",
4
4
  "author": "",
5
- "version": "0.0.16",
5
+ "version": "0.0.17",
6
6
  "repository": "https://github.com/rackai/editor",
7
7
  "main": "src/index.js",
8
8
  "scripts": {
@@ -16,4 +16,4 @@ const PREVIEW_CONF = {
16
16
  }
17
17
  }
18
18
 
19
- export default init({ verbose: false, ...PREVIEW_CONF })
19
+ export default init({ verbose: true, ...PREVIEW_CONF })
@@ -1,83 +1,13 @@
1
1
  'use strict'
2
2
 
3
- import dots from '../assets/dots.png'
4
- import dotsDark from '../assets/dotsDark.png'
5
-
6
- const MODAL = {
7
- modalFade: {
8
- color: 'white',
9
- backdropFilter: 'blur(3px)',
10
- backgroundColor: 'modalFade 0.75'
11
- },
12
- modalBackground: {
13
- color: 'white',
14
- backgroundColor: 'modalBackground'
15
- }
16
- }
17
-
18
- const SCENE = {
19
- darkScene: {
20
- backgroundColor: 'white 0.02',
21
- '> div': { backgroundImage: `url(${dots})` }
22
- },
23
- lightScene: {
24
- backgroundColor: 'white',
25
- '> div': { backgroundImage: `url(${dotsDark})` }
26
- }
27
- }
28
-
29
- const DROPDOWN = {
30
- dropdownItem: {
31
- color: 'white 0.65',
32
- state: {
33
- hover: {
34
- color: 'white',
35
- background: 'gradient-light-active'
36
- },
37
- active: {
38
- color: 'white',
39
- background: 'gradient-light-active'
40
- }
41
- }
42
- },
43
- dropdownItemActive: {
44
- color: 'white',
45
- background: 'gradient-light-active'
46
- }
47
- }
48
-
49
3
  export const EDITOR_THEMES = {
50
- header: {
51
- color: 'white',
52
- backgroundColor: 'black 0.85',
53
- borderColor: 'white 0.09',
54
- backdropFilter: 'blur(3px)'
55
- },
56
-
57
4
  shape: {
58
5
  background: 'shapeColor',
59
6
  border: 'none'
60
- },
61
-
62
- ...MODAL,
63
- ...SCENE,
64
- ...DROPDOWN
7
+ }
65
8
  }
66
9
 
67
10
  export const COMPONENT_THEMES = {
68
- lightDark: {
69
- background: 'white',
70
- color: 'darkPurple',
71
- variants: {
72
- inverse: true
73
- }
74
- },
75
-
76
- alert: {
77
- background: 'yellow',
78
- color: 'black'
79
- },
80
-
81
11
  label: {
82
12
  background: 'brown',
83
13
  color: 'white'
@@ -33,7 +33,6 @@ const buttonThemeSwitcher = {
33
33
 
34
34
  props: {
35
35
  round: 'C',
36
- theme: 'lightDark',
37
36
  size: 'A',
38
37
  padding: 'X1 Y X1 A1',
39
38
  gap: 'Z1',
@@ -45,7 +44,6 @@ const buttonThemeSwitcher = {
45
44
  },
46
45
 
47
46
  dark: {
48
- theme: ['lightDark', 'inverse'],
49
47
  round: 'C',
50
48
  icon: 'moon',
51
49
  padding: 'Z Z1',
@@ -2,6 +2,7 @@
2
2
 
3
3
  import { BREAKPOINTS } from '@symbo.ls/scratch'
4
4
  import { Scene } from '@symbo.ls/components'
5
+ import { updateReset } from '@symbo.ls/init'
5
6
 
6
7
  export default {
7
8
  extend: Scene,
@@ -41,6 +42,7 @@ export default {
41
42
  },
42
43
  comp: (el, s) => ({
43
44
  extend: [s.component],
45
+ props: { inheritSpacingRatio: true }
44
46
  }),
45
47
 
46
48
  on: {
@@ -50,6 +52,7 @@ export default {
50
52
  fontSize: s.base + 'px',
51
53
  spacingRatio: s.ratio
52
54
  }, { preventUpdate: true })
55
+ updateReset()
53
56
  }
54
57
  }
55
58
  }
@@ -1,6 +1,6 @@
1
1
  'use strict'
2
2
 
3
- import { TYPOGRAPHY } from '@symbo.ls/scratch'
3
+ import { SPACING, TYPOGRAPHY } from '@symbo.ls/scratch'
4
4
 
5
5
  export default {
6
6
  descriptionTheme: 'dark',
@@ -11,7 +11,7 @@ export default {
11
11
  currentFontSizeIndex: 3,
12
12
 
13
13
  base: TYPOGRAPHY.base,
14
- ratio: TYPOGRAPHY.ratio,
14
+ ratio: SPACING.ratio,
15
15
  range: [-1, +4],
16
16
  scales: {},
17
17
  sequence: {},
@@ -5,7 +5,7 @@ import { copyStringToClipboard } from '@symbo.ls/utils'
5
5
  import { IconText, Flex, Link, ClickableItem, SectionHeader, Grid } from '@symbo.ls/components'
6
6
 
7
7
  import * as ACCESSIBILITY from '@symbo.ls/icons/src/accessibility'
8
- import * as BOXSIZE from '@symbo.ls/icons/src/boxSize'
8
+ import * as BOXMODEL from '@symbo.ls/icons/src/boxModel'
9
9
  import * as DISPLAY from '@symbo.ls/icons/src/display'
10
10
  import * as INTERACTIVE from '@symbo.ls/icons/src/interactive'
11
11
  import * as LOGOS from '@symbo.ls/icons/src/logos'
@@ -19,10 +19,11 @@ const IconItem = {
19
19
  extend: [ClickableItem, Link, IconText],
20
20
  props: ({ state }) => ({
21
21
  round: 'A',
22
- size: 'D',
22
+ size: 'C1',
23
23
  aspectRatio: '1 / 1',
24
24
  flexAlign: 'center center',
25
25
  href: '/icons/edit-icon/' + state.name,
26
+ theme: 'tertiary',
26
27
  icon: {
27
28
  fontSize: 'C2',
28
29
  name: state.name
@@ -70,10 +71,11 @@ const ICON_GROUPS = [{
70
71
  list: Object.keys(SVG).map(name => ({ name }))
71
72
  }, {
72
73
  title: 'Accessibility',
73
- list: Object.keys(ACCESSIBILITY).map(name => ({ name }))
74
+ list: Object.keys(ACCESSIBILITY).map(name => ({ name })),
75
+ p: ''
74
76
  }, {
75
- title: 'Boxsize',
76
- list: Object.keys(BOXSIZE).map(name => ({ name }))
77
+ title: 'Box Model',
78
+ list: Object.keys(BOXMODEL).map(name => ({ name }))
77
79
  }, {
78
80
  title: 'Display',
79
81
  list: Object.keys(DISPLAY).map(name => ({ name }))