@symbo.ls/preview 2.7.14 → 2.7.15

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.
package/index.js CHANGED
@@ -13,6 +13,7 @@ import { router, lastLevel } from '@domql/router'
13
13
  import { Main } from './src/pages'
14
14
 
15
15
  const designSystem = init(system)
16
+ state.PROJECT_SYSTEM = designSystem
16
17
 
17
18
  const app = DOM.create({
18
19
  extend: App,
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@symbo.ls/preview",
3
3
  "description": "",
4
4
  "author": "symbo.ls",
5
- "version": "2.7.14",
5
+ "version": "2.7.15",
6
6
  "main": "src/app.js",
7
7
  "scripts": {
8
8
  "link:all": "yarn link smbls domql css-in-props @symbo.ls/icons @symbo.ls/config @symbo.ls/components @symbo.ls/scratch @symbo.ls/playground @symbo.ls/utils @symbo.ls/init @symbo.ls/config-default @domql/router @domql/utils @domql/router",
@@ -24,19 +24,21 @@
24
24
  "dependencies": {
25
25
  "@domql/router": "latest",
26
26
  "@domql/tags": "latest",
27
+ "@symbo.ls/based": "^2.6.16",
27
28
  "@symbo.ls/components": "latest",
29
+ "@symbo.ls/fetch": "^2.7.10",
28
30
  "@symbo.ls/icons": "latest",
29
31
  "@symbo.ls/scratch": "latest",
30
32
  "@symbo.ls/temp-db": "latest",
31
33
  "@symbo.ls/utils": "latest"
32
34
  },
33
35
  "devDependencies": {
34
- "@symbo.ls/platform-init": "latest",
36
+ "@babel/core": "^7.11.5",
35
37
  "@symbo.ls/platform-define": "latest",
38
+ "@symbo.ls/platform-init": "latest",
36
39
  "@symbo.ls/platform-state": "latest",
37
- "domql": "^1.5.35",
38
- "@babel/core": "^7.11.5",
39
40
  "babel-eslint": "^10.0.3",
41
+ "domql": "^1.5.35",
40
42
  "eslint": "^6.1.0",
41
43
  "parcel-bundler": "^1.12.4",
42
44
  "parcel-plugin-svg-sprite": "^1.4.1",
@@ -34,7 +34,7 @@ export const ChooseProject = {
34
34
  cnt: {
35
35
  extend: Grid,
36
36
  props: {
37
- columns: 'repeat(6, 1fr)',
37
+ columns: 'repeat(7, 1fr)',
38
38
  gap: 'D1',
39
39
  margin: '10% -Z auto'
40
40
  },
@@ -0,0 +1,40 @@
1
+ 'use strict'
2
+
3
+ import { ButtonTitle, Flex } from '@symbo.ls/components'
4
+
5
+ export const columnTitleButton = {
6
+ extend: ButtonTitle,
7
+ props: {
8
+ flow: 'column',
9
+ align: 'flex-start flex-start',
10
+ gap: 'Z2',
11
+ title: {
12
+ color: 'gray8',
13
+ textTransform: 'capitalize'
14
+ },
15
+ iconBox: {
16
+ background: 'gray2',
17
+ icon: { icon: 'plus' }
18
+ }
19
+ }
20
+ }
21
+
22
+ export const buttonTitlesGrid = {
23
+ extend: Flex,
24
+ props: {
25
+ justifyContent: 'space-between',
26
+ padding: 'B2 E1 - -'
27
+ },
28
+
29
+ childExtend: {
30
+ extend: columnTitleButton,
31
+ title: {},
32
+ iconBox: {}
33
+ },
34
+ ...[
35
+ { props: { title: { text: 'shadow' } } },
36
+ { props: { title: { text: 'Opacity' } } },
37
+ { props: { title: { text: 'Background Blur' } } },
38
+ { props: { title: { text: 'Blend mode' } } }
39
+ ]
40
+ }
@@ -0,0 +1,33 @@
1
+ 'use strict'
2
+
3
+ import { Flex, IconButton } from '@symbo.ls/components'
4
+
5
+ const props = {
6
+ gap: 'A2',
7
+ margin: '- - - auto',
8
+ childProps: {
9
+ theme: 'none',
10
+ background: 'transparent',
11
+ color: 'gray7',
12
+ ':hover': {
13
+ background: 'gray3',
14
+ color: 'white'
15
+ }
16
+ }
17
+ }
18
+
19
+ export const buttonsHeader = {
20
+ extend: Flex,
21
+ props,
22
+
23
+ childExtend: { extend: IconButton },
24
+ ...[
25
+ { props: { icon: 'cursorOutline' } },
26
+ { props: { icon: 'clickOutline' } },
27
+ { props: { icon: 'clickOutline' } },
28
+ { props: { icon: 'focusOutline' } },
29
+ { props: { icon: 'selection' } },
30
+ { props: { icon: 'colorInvert' } },
31
+ { props: { icon: 'accessibilityOutline' } }
32
+ ]
33
+ }
@@ -12,6 +12,10 @@ import {
12
12
  } from '@symbo.ls/components'
13
13
 
14
14
  import preview from './preview'
15
+
16
+ import { buttonsHeader } from './buttonsHeader'
17
+ import { selectsGrid } from './selectsGrid'
18
+ import { buttonTitlesGrid, columnTitleButton } from './buttonTitlesGrid'
15
19
  // import { themingTools } from './themingTools'
16
20
  // import { interactivity } from './interactivity'
17
21
  // import { friendTheme } from './friendTheme'
@@ -27,7 +31,8 @@ const ThemeNameField = {
27
31
  gap: '0',
28
32
 
29
33
  title: {
30
- text: 'Name the theme'
34
+ text: 'Name the theme',
35
+ fontSize: 'Z'
31
36
  },
32
37
 
33
38
  element: {
@@ -35,7 +40,9 @@ const ThemeNameField = {
35
40
  minWidth: 'C1',
36
41
  maxWidth: 'fit-content',
37
42
  outline: 'none',
38
- fontSize: 'E',
43
+ fontSize: 'C2',
44
+ round: '0',
45
+ textTransform: 'capitalize',
39
46
 
40
47
  border: 'dashed, gray5',
41
48
  borderWidth: '0 0 1px',
@@ -165,11 +172,13 @@ export const Theme = {
165
172
  header: {
166
173
  extend: SectionHeader,
167
174
  props: {
168
- margin: '0 0 B2'
175
+ margin: '0 0 B2',
176
+ justifyContent: 'space-between'
169
177
  },
170
178
  heading: null,
171
179
  ThemeNameField,
172
- nav: { extend: SceneThemingBar }
180
+ nav: null,
181
+ buttons: { extend: buttonsHeader }
173
182
  },
174
183
 
175
184
  cnt: {
@@ -179,8 +188,68 @@ export const Theme = {
179
188
  preview,
180
189
 
181
190
  colorEdit: {
182
- props: { gap: 'C2', flexFlow: 'column' }
183
- // themingTools,
191
+ props: {
192
+ gap: '',
193
+ flexFlow: 'column'
194
+ },
195
+
196
+ colors: {
197
+ props: {
198
+ padding: '- - C1 -',
199
+ style: { borderBottom: '.5px solid rgba(255, 255, 255, .3)' }
200
+ },
201
+ selectsGrid,
202
+ buttonTitlesGrid
203
+ },
204
+
205
+ onHover: {
206
+ extend: CommonField,
207
+ props: {
208
+ style: { borderBottom: '.5px solid rgba(255, 255, 255, .3)' },
209
+ gap: 'B2',
210
+ padding: 'B - C1 -',
211
+ title: {
212
+ text: ':hover',
213
+ color: 'white'
214
+ }
215
+ },
216
+ title: {},
217
+ element: {
218
+ extend: selectsGrid
219
+ }
220
+ },
221
+
222
+ onHover2: {
223
+ extend: CommonField,
224
+ props: {
225
+ gap: 'B2',
226
+ padding: 'B - - -',
227
+ title: {
228
+ text: ':hover',
229
+ color: 'white'
230
+ }
231
+ },
232
+ title: {},
233
+ element: {
234
+ extend: selectsGrid
235
+ }
236
+ },
237
+
238
+ friendThemes: {
239
+ extend: columnTitleButton,
240
+ props: {
241
+ padding: 'C2 - - -',
242
+ title: {
243
+ text: 'Friend themes',
244
+ fontSize: 'A1',
245
+ color: 'gray9'
246
+ }
247
+ },
248
+ title: {},
249
+ iconBox: {}
250
+ }
251
+
252
+ // themingTools
184
253
  // interactivity,
185
254
  // friendTheme
186
255
  }
@@ -0,0 +1,59 @@
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, 1fr)',
9
+ gap: 'C'
10
+ },
11
+
12
+ childExtend: {
13
+ extend: CommonField,
14
+ props: (el, s) => ({
15
+ width: 'fit-content',
16
+ title: {
17
+ text: s.title,
18
+ fontSize: 'Z'
19
+ },
20
+ element: {
21
+ width: 'F+Z1',
22
+ title: {
23
+ box: {
24
+ background: s.color,
25
+ display: s.colorDisplay
26
+ },
27
+ value: {
28
+ text: s.name,
29
+ fontSize: 'Z1'
30
+ }
31
+ }
32
+ }
33
+ }),
34
+
35
+ title: {},
36
+ element: {
37
+ extend: ColorSelect
38
+ }
39
+ },
40
+
41
+ $setStateCollection: () => [{
42
+ title: 'Background color',
43
+ color: 'red',
44
+ name: 'red'
45
+
46
+ }, {
47
+ title: 'Border color',
48
+ name: 'none',
49
+ colorDisplay: 'none'
50
+ }, {
51
+ title: 'Border color',
52
+ name: 'none',
53
+ colorDisplay: 'none'
54
+ }, {
55
+ title: 'Text color',
56
+ color: 'white',
57
+ name: 'white'
58
+ }]
59
+ }
@@ -32,7 +32,6 @@ export default {
32
32
 
33
33
  '> section': {
34
34
  display: 'flex',
35
- gap: '6.6em',
36
- border: '2px solid red'
35
+ gap: '6.6em'
37
36
  }
38
37
  }
@@ -2,7 +2,6 @@
2
2
 
3
3
  import { Grid, ColorSwitcher, CommonField, SelectField, ButtonSet, ClickableItem } from '@symbo.ls/components'
4
4
 
5
-
6
5
  ColorSwitcher.props = (el, s) => {
7
6
  if (!s.value) return
8
7
  const value = s.value[el.props.type] || s.value[el.props.type + 'Color']