@symbo.ls/preview 2.7.25 → 2.11.269

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.
@@ -0,0 +1,91 @@
1
+ 'use strict'
2
+
3
+ import { Grid } from '@symbo.ls/atoms'
4
+ import { DefaultBlock } from './section'
5
+
6
+ export const shadow = {
7
+ extend: DefaultBlock,
8
+ props: {
9
+ padding: 'D2 D',
10
+ '@mobileL': { padding: 'E C' },
11
+ '@mobileS': { padding: 'E B' }
12
+ },
13
+
14
+ Title: null,
15
+
16
+ Paragraph: {
17
+ extend: Grid,
18
+ props: {
19
+ columns: 'repeat(8, 1fr)',
20
+ gap: 'C2',
21
+ '@tabletM': { gap: 'B2' },
22
+ '@tabletS': { columns: 'repeat(4, 1fr)' },
23
+ '@mobileL': { gap: 'B1' },
24
+ '@mobileS': { gap: 'B' },
25
+ '@mobileXS': { gap: 'A1' },
26
+ childProps: {
27
+ theme: 'dialog',
28
+ aspectRatio: '1 / 1',
29
+ round: 'Z'
30
+ }
31
+ },
32
+ ...[
33
+ {
34
+ props: {
35
+ style: {
36
+ boxShadow: 'rgb(38, 57, 77) 0px 20px 30px -10px'
37
+ }
38
+ }
39
+ },
40
+ {
41
+ props: {
42
+ style: {
43
+ boxShadow: 'rgba(38, 57, 77, 0.56) 0px 22px 70px 4px'
44
+ }
45
+ }
46
+ },
47
+ {
48
+ props: {
49
+ style: {
50
+ boxShadow: 'rgba(38, 57, 77, 0.19) 0px 10px 20px, rgba(38, 57, 77, 0.23) 0px 6px 6px'
51
+ }
52
+ }
53
+ },
54
+ {
55
+ props: {
56
+ style: {
57
+ boxShadow: 'rgba(38, 57, 77, 0.12) 0px 2px 4px 0px, rgba(38, 57, 77, 0.32) 0px 2px 16px 0px'
58
+ }
59
+ }
60
+ },
61
+ {
62
+ props: {
63
+ style: {
64
+ boxShadow: 'rgba(38, 57, 77, 0.3) 0px 19px 38px, rgba(38, 57, 77, 0.22) 0px 15px 12px'
65
+ }
66
+ }
67
+ },
68
+ {
69
+ props: {
70
+ style: {
71
+ boxShadow: 'rgba(38, 57, 77, 0.35) 0px 5px 15px'
72
+ }
73
+ }
74
+ },
75
+ {
76
+ props: {
77
+ style: {
78
+ boxShadow: 'rgba(38, 57, 77, 0.25) 0px 13px 27px -5px, rgba(38, 57, 77, 0.35) 0px 8px 16px -8px'
79
+ }
80
+ }
81
+ },
82
+ {
83
+ props: {
84
+ style: {
85
+ boxShadow: 'rgba(38, 57, 77, 0.25) 0px 30px 60px -12px, rgba(38, 57, 77, 0.25) 0px 18px 36px -18px'
86
+ }
87
+ }
88
+ }
89
+ ]
90
+ }
91
+ }
@@ -0,0 +1,34 @@
1
+ 'use strict'
2
+
3
+ import { shadow } from './shadow'
4
+
5
+ export const shape = {
6
+ extend: shadow,
7
+ Title: null,
8
+ Paragraph: {
9
+ props: {
10
+ // gap: 'E',
11
+ columns: 'repeat(8, 1fr)',
12
+ childProps: {
13
+ border: 'solid, white .05',
14
+ borderWidth: '2px',
15
+ style: {
16
+ boxShadow: 'rgba(38, 57, 77, 0.12) 0px 2px 4px 0px, rgba(38, 57, 77, 0.32) 0px 2px 16px 0px'
17
+ },
18
+ ':first-child': { round: 'A 0 0 0' },
19
+ ':nth-child(2)': { round: 'E A 0 0' },
20
+ ':nth-child(3)': {
21
+ round: '100%',
22
+ aspectRatio: '1/1'
23
+ },
24
+ ':nth-child(4)': { round: '0 D 0 A' },
25
+ ':nth-child(5)': { round: '0 0 G 0' },
26
+ ':nth-child(7)': { round: '0 0 E1 E1' },
27
+ ':nth-child(8)': { round: 'G 0 0 0' }
28
+ }
29
+ },
30
+ ...[
31
+ {}, {}, {}, {}, {}, {}, {}, {}
32
+ ]
33
+ }
34
+ }
@@ -0,0 +1,3 @@
1
+ export default {
2
+
3
+ }
@@ -0,0 +1,3 @@
1
+ export default {
2
+
3
+ }
@@ -0,0 +1,13 @@
1
+ 'use strict'
2
+
3
+ import color from './color'
4
+ import icon from './icon'
5
+ import shadow from './shadow'
6
+ import typography from './typography'
7
+
8
+ export default {
9
+ color,
10
+ icon,
11
+ shadow,
12
+ typography
13
+ }
@@ -0,0 +1,3 @@
1
+ export default {
2
+
3
+ }
@@ -0,0 +1,15 @@
1
+ export default {
2
+ title: 'Colors',
3
+ paragraph: 'Our color palette is led by a bold, distinct primary color and rounded out by a select set of secondary colors that give depth and diversity to our designs.',
4
+
5
+ list: {
6
+ title: 'What you’ll find',
7
+ data: [
8
+ 'Primary colors',
9
+ 'Secondary colors',
10
+ 'Greyscale',
11
+ 'System colors',
12
+ 'Background colors'
13
+ ]
14
+ }
15
+ }
package/index.js CHANGED
@@ -1,50 +1,4 @@
1
1
  'use strict'
2
2
 
3
- import '@symbo.ls/platform-define'
4
- import { init, system } from '@symbo.ls/platform-init'
5
- import { state } from '@symbo.ls/platform-state'
6
-
7
- import DOM from 'domql'
8
- import * as smbls from '@symbo.ls/components'
9
- import * as components from './src/components'
10
-
11
- import App from './src/app'
12
- import { router, lastLevel } from '@domql/router'
13
- import { Main } from './src/pages'
14
-
15
- const designSystem = init(system)
16
-
17
- const app = DOM.create({
18
- extend: App,
19
- state,
20
- header: { extend: components.Header },
21
-
22
- define: { routes: param => param },
23
- routes: {
24
- '/': Main
25
- },
26
-
27
- on: {
28
- render: (el) => {
29
- const { pathname, hash } = window.location
30
- const url = pathname + hash
31
- router(el, url, {}, {
32
- level: lastLevel,
33
- pushState: false
34
- })
35
- }
36
- }
37
- }, undefined, 'app', {
38
- extend: [smbls.Box],
39
- components: { ...smbls, ...components },
40
- context: { system: designSystem }
41
- })
42
-
43
- window.onpopstate = e => {
44
- const { pathname, hash } = window.location
45
- const url = pathname + hash
46
- router(app, url, {}, {
47
- level: lastLevel,
48
- pushState: false
49
- })
50
- }
3
+ export * from './pages/Components'
4
+ export * from './pages/Styleguide'
package/package.json CHANGED
@@ -1,31 +1,12 @@
1
1
  {
2
2
  "name": "@symbo.ls/preview",
3
- "description": "Symbols editor",
4
- "author": "symbo.ls",
5
- "version": "2.7.25",
6
- "repository": "https://github.com/symbo-ls/editor",
7
- "main": "src/app.js",
8
- "scripts": {
9
- "prestart": "rm -rf .cache dist",
10
- "start": "parcel index.html --port 1300 --no-cache",
11
- "prebuild": "rm -rf dist",
12
- "build": "parcel build index.html",
13
- "reinstall": "rm -rf node_modules/@symbo.ls node_modules/@domql node_modules/domql node_modules/smbls dist yarn.lock .cache && yarn"
14
- },
3
+ "version": "2.11.269",
4
+ "main": "index.js",
5
+ "license": "MIT",
6
+ "gitHead": "9539c62d29cc279dbe7e149aa96bb8ee019c7119",
15
7
  "dependencies": {
16
- "@symbo.ls/components": "latest"
17
- },
18
- "devDependencies": {
19
- "@domql/router": "latest",
20
- "domql": "^1.5.2",
21
- "@babel/core": "^7.11.5",
22
- "babel-eslint": "^10.0.3",
23
- "eslint": "^6.1.0",
24
- "parcel-bundler": "^1.12.4",
25
- "parcel-plugin-svg-sprite": "^1.4.1",
26
- "standard": "^13.1.0"
8
+ "@symbo.ls/atoms": "latest",
9
+ "@symbo.ls/button": "latest"
27
10
  },
28
- "standard": {
29
- "parser": "babel-eslint"
30
- }
11
+ "source": "src/index.js"
31
12
  }
@@ -0,0 +1,288 @@
1
+ 'use strict'
2
+
3
+ import { Avatar, SearchWithButton } from '@symbo.ls/uikit'
4
+
5
+ export const ComponentsPage = {
6
+ extend: 'Flex',
7
+
8
+ state: {
9
+ globalTheme: 'dark',
10
+ value: ''
11
+ },
12
+
13
+ props: {
14
+ fontFamily: 'avenir',
15
+ ':before': {
16
+ content: '""',
17
+ boxSize: 'E 100%',
18
+ position: 'fixed',
19
+ top: '0',
20
+ left: '0',
21
+ zIndex: '10',
22
+ background: ' linear-gradient(to bottom, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 100%)',
23
+ pointerEvents: 'none'
24
+ },
25
+ ':after': {
26
+ content: '""',
27
+ boxSize: 'E 100%',
28
+ position: 'fixed',
29
+ bottom: '0',
30
+ left: '0',
31
+ zIndex: '10',
32
+ background: ' linear-gradient(to top, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 100%)',
33
+ pointerEvents: 'none'
34
+ },
35
+
36
+ footer: {
37
+ position: 'fixed',
38
+ width: 'calc(100% - 70px)',
39
+ zIndex: '100',
40
+ bottom: '0',
41
+ right: '0',
42
+ align: 'center flex-end',
43
+ padding: '- B B -',
44
+ '@media only screen and (max-width: 480px)': {
45
+ justifyContent: 'center',
46
+ padding: '- 20px 30px 20px'
47
+ },
48
+ search: {
49
+ fontFamily: 'avenir',
50
+ fontWeight: '400',
51
+ round: 'D',
52
+ flow: 'row',
53
+ border: 'solid, #252527',
54
+ borderWidth: '1px',
55
+ width: 'G+D',
56
+ padding: 'Z A Z B',
57
+ position: 'relative',
58
+ Icon: {
59
+ boxSize: 'A+V A+V',
60
+ color: '#3F3F43'
61
+ },
62
+ input: {
63
+ fontFamily: 'avenir',
64
+ placeholder: 'find component . . .',
65
+ fontSize: 'A',
66
+ ':focus ~ svg': { opacity: '0' }
67
+ },
68
+ x: {
69
+ color: 'white',
70
+ position: 'absolute',
71
+ right: 'A'
72
+ }
73
+ }
74
+ }
75
+ },
76
+
77
+ cnt: {
78
+ extend: 'Flex',
79
+
80
+ props: {
81
+ flow: 'column',
82
+ padding: 'F E E D',
83
+ gap: 'E+C',
84
+ minWidth: 'calc(100% - 70px)',
85
+ height: '100dvh',
86
+ margin: '- - - auto',
87
+ style: {
88
+ overflowY: 'auto',
89
+ scrollBehavior: 'smooth'
90
+ }
91
+ },
92
+
93
+ childExtend: {
94
+ props: ({ key, state }) => ({
95
+ hide: !key.toLowerCase().includes(state.value),
96
+ position: 'relative'
97
+ }),
98
+ __title: {
99
+ props: {
100
+ ignoreChildExtend: true,
101
+ position: 'absolute',
102
+ left: '0',
103
+ top: '-C',
104
+ fontSize: '14px',
105
+ color: 'white .35'
106
+ },
107
+ text: ({ parent }) => parent.key
108
+ }
109
+ },
110
+
111
+ H1: {
112
+ props: { hide: false },
113
+ __title: { text: 'Searched value:' },
114
+ text: ({ state }) => state.value
115
+ },
116
+
117
+ StatusIndicator: {},
118
+ Avatar: {},
119
+ AvatarIndicator: {},
120
+ AvatarBundle: {
121
+ childExtend: Avatar,
122
+ ...[{}, {}, {}]
123
+ },
124
+ AvatarChooser: {
125
+ options: [{
126
+ text: 'Kevin'
127
+ }, {
128
+ text: 'John'
129
+ }]
130
+ },
131
+ Hgroup: {
132
+ Title: { text: 'Title' },
133
+ Paragraph: { text: 'Paragraph' }
134
+ },
135
+ User: {
136
+ Avatar: {},
137
+ Notes: {
138
+ Title: { text: 'Erin Schleifer' },
139
+ Paragraph: { text: 'email@symbols.com' }
140
+ }
141
+ },
142
+ Label: {},
143
+ UserWithLabel: {},
144
+ CountIndicator: {},
145
+ ChatUser: {},
146
+ UserButtonSet: {},
147
+ UserButtonSetCircle: {},
148
+ UserMessage: {},
149
+ UserWithButton: {},
150
+
151
+ FlexButton: {},
152
+ CancelConfirmButtons: {},
153
+ SquareButton: {},
154
+
155
+ Tab: {},
156
+ IconTab: {},
157
+ Modal: {},
158
+ Message: {},
159
+ SuccessIndicator: {},
160
+ CompleteProcess: {},
161
+ UploadButton: {},
162
+ UploadLabel: {},
163
+ UploadFooter: {},
164
+ UploadModal: {},
165
+ UploadButtonWithBackground: {},
166
+ UploadLabel2: {},
167
+ UploadModal2: {},
168
+ UploadModal3: {},
169
+ UploadImage: {},
170
+ DoubleUnitValue: {},
171
+ ProgressLine: {},
172
+ UploadingProcess: {},
173
+ UploadedProcess: {},
174
+ UnitValue: {
175
+ Value: { text: '72' },
176
+ Unit: { text: '%' }
177
+ },
178
+ ProgressLineWithUnitValue: {},
179
+ UploadingProcess2: {},
180
+ UploadedProcess2: {},
181
+ ProgressCircleWithSideUnitValue: {},
182
+ UploadingProcess3: {},
183
+ UploadedProcess3: {},
184
+ ProgressCircle: {},
185
+ ProgressCircleWithIcon: {},
186
+ ProgressCircleWithUnitValue: {},
187
+ UploadingProcess4: {},
188
+ UploadedProcess4: {},
189
+ UploadModal4: {},
190
+
191
+ Checkbox: {},
192
+ Radio: {},
193
+ Toggle: {},
194
+ NumberInput: {},
195
+
196
+ Field: {},
197
+ FieldTemplate: {},
198
+ FieldWithTitle: {},
199
+ FieldWithTitleTemplate: {},
200
+ TextAreaField: {},
201
+
202
+ ParagraphButton: {},
203
+ VerificationCode: {},
204
+ ResetPassword: {},
205
+ ParagraphButtonWithCheckbox: {},
206
+ ContactForm: {},
207
+ SignUp: {},
208
+ DoubleHr: {},
209
+ SocialLink: {},
210
+ LogIn: {},
211
+
212
+ Search: {},
213
+ SearchWithButton: {},
214
+ DropDownButton: {},
215
+ SearchWithDropDownButton: {},
216
+ ListTemplate: {},
217
+ ListWithTitleTemplate: {},
218
+ GroupListTemplate: {},
219
+ GroupListWithSearchTemplate: {},
220
+
221
+ CheckIndicator: {},
222
+ CheckIndicatorWithLabel: {},
223
+ CheckStep: {},
224
+ CheckSteps: {},
225
+ RadioIndicator: {},
226
+ RadioIndicatorWithLabel: {},
227
+ RadioStep: {},
228
+ RadioSteps: {},
229
+ LineSteps: {},
230
+ LineStepsWithHgroup: {},
231
+
232
+ StepCard: {},
233
+ UnitValueWithLabel: {},
234
+ BalanceCard: {},
235
+ UnitValueWithTitle: {},
236
+ DropDownButtonWithAvatar: {},
237
+ ConvertCard: {},
238
+ CurrencyConvert: {},
239
+ PlusMinusButtons: {},
240
+ Pricing: {},
241
+
242
+ DatePicker: {},
243
+ TimePicker: {}
244
+ },
245
+
246
+ footer: {
247
+ extend: 'Flex',
248
+ Search: {
249
+ extend: SearchWithButton,
250
+ props: {
251
+ minWidth: 'G+C',
252
+ minHeight: 'C+X',
253
+ maxHeight: 'C+Z',
254
+ round: 'C',
255
+ padding: '- A+W - A+Y',
256
+ border: '1px solid #3F3F43',
257
+ background: 'transparent'
258
+ },
259
+ Input: {
260
+ props: {
261
+ fontSize: 'Z1',
262
+ placeholder: 'Find component ...',
263
+ ':focus ~ svg': { opacity: '0' }
264
+ },
265
+ on: {
266
+ keyup: (event, el, s) => {
267
+ const value = el.node.value.toLowerCase()
268
+ s.update({ value })
269
+ }
270
+ }
271
+ },
272
+ Icon: {
273
+ props: {
274
+ fontSize: 'C',
275
+ color: '#3F3F43'
276
+ }
277
+ },
278
+ Button: {
279
+ props: {
280
+ position: 'absolute',
281
+ margin: 'auto',
282
+ right: 'Z',
283
+ color: '#3F3F43'
284
+ }
285
+ }
286
+ }
287
+ }
288
+ }
@@ -0,0 +1,35 @@
1
+ 'use strict'
2
+
3
+ import { Flex } from '@symbo.ls/atoms'
4
+
5
+ import { Colors, Typography, Shadows, Icons, Spacing, Shapes } from '../articles'
6
+
7
+ export const StyleguidePage = {
8
+ extend: Flex,
9
+ tag: 'main',
10
+ props: {
11
+ theme: 'document',
12
+ position: 'relative',
13
+ flow: 'column',
14
+ overflow: 'hidden auto',
15
+ height: '100%',
16
+ width: '100%',
17
+ '@tabletM': {
18
+ fontSize: 'Z1'
19
+ },
20
+ '> article': {
21
+ flow: 'column',
22
+ '> header': {
23
+ border: 'solid, white .15',
24
+ borderWidth: '.5px 0 .5px 0'
25
+ }
26
+ }
27
+ },
28
+
29
+ Colors,
30
+ Typography,
31
+ Shadows,
32
+ Shapes,
33
+ Icons,
34
+ Spacing
35
+ }
package/.eslintrc.js DELETED
@@ -1,9 +0,0 @@
1
- module.exports = {
2
- "extend": "standard",
3
- "env": {
4
- "es6": true,
5
- "browser": true,
6
- "node": true,
7
- "jest": true
8
- }
9
- }
@@ -1,6 +0,0 @@
1
- {
2
- "search.exclude": {
3
- "**/*.code-search": false,
4
- "**/node_modules": false
5
- }
6
- }
package/README.md DELETED
@@ -1 +0,0 @@
1
- # Editor
package/config.js DELETED
@@ -1,6 +0,0 @@
1
- 'use strict'
2
-
3
- import { init } from '@symbo.ls/components'
4
- import SYMBOLS_CONF from '@symbo.ls/config'
5
-
6
- export default init({ verbose: false, ...SYMBOLS_CONF })
package/define.js DELETED
@@ -1,10 +0,0 @@
1
- 'use strict'
2
-
3
- import DOM from 'domql'
4
- import * as smbls from '@symbo.ls/components'
5
-
6
- DOM.define({
7
- __filepath: param => param,
8
- $setCollection: smbls.Collection.define.$setCollection,
9
- $setStateCollection: smbls.Collection.define.$setStateCollection
10
- })
package/index.html DELETED
@@ -1,12 +0,0 @@
1
- <!DOCTYPE html>
2
- <html background="#000">
3
- <title>Editor - Symbols</title>
4
- <meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no">
5
- <meta name="apple-mobile-web-app-capable" content="yes">
6
-
7
- <meta charset="UTF-8">
8
- </head>
9
- <body>
10
- </body>
11
- <script src="./index.js"></script>
12
- </html>
package/src/app.js DELETED
@@ -1,54 +0,0 @@
1
- 'use strict'
2
-
3
- import { Flex } from '@symbo.ls/components'
4
-
5
- const Preview = {
6
- key: 'app',
7
-
8
- props: {
9
- boxSize: '100% 100%',
10
- position: 'absolute',
11
- top: '0',
12
- left: '0',
13
- theme: 'document',
14
- flexFlow: 'column',
15
- flexAlign: 'center flex-start'
16
- },
17
-
18
- routes: {
19
- '/preview': {
20
- extend: Flex,
21
- props: ({ state }) => ({
22
- fullscreen: state.previewTab === 'fullscreen',
23
- transition: 'B defaultBezier',
24
- transitionProperty: 'padding',
25
- boxSize: '100% 100%',
26
- position: 'absolute',
27
- top: '0',
28
- left: '0',
29
- theme: 'document',
30
- flexFlow: 'column',
31
- flexAlign: 'center flex-start',
32
-
33
- '.fullscreen': {
34
- zIndex: '999999',
35
- padding: 'X'
36
- },
37
-
38
- '!fullscreen': {
39
- padding: 'D+Z Z Z Z'
40
- }
41
- }),
42
- Iframe: {
43
- props: (el, s) => ({
44
- boxSize: '100% 100%',
45
- round: 'Z',
46
- border: '0',
47
- src: `https://${s.appKey}/`
48
- })
49
- }
50
- }
51
- }
52
- }
53
-
54
- export default Preview