@symbo.ls/preview 2.7.24 → 2.11.265

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/components.js ADDED
@@ -0,0 +1,289 @@
1
+ 'use strict'
2
+
3
+ import { Flex } from '@symbo.ls/atoms'
4
+ import { Avatar, SearchWithButton } from '@symbo.ls/uikit'
5
+
6
+ export const ComponentsPage = {
7
+ extend: Flex,
8
+
9
+ state: {
10
+ globalTheme: 'dark',
11
+ value: ''
12
+ },
13
+
14
+ props: {
15
+ fontFamily: 'avenir',
16
+ ':before': {
17
+ content: '""',
18
+ boxSize: 'E 100%',
19
+ position: 'fixed',
20
+ top: '0',
21
+ left: '0',
22
+ zIndex: '10',
23
+ background: ' linear-gradient(to bottom, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 100%)',
24
+ pointerEvents: 'none'
25
+ },
26
+ ':after': {
27
+ content: '""',
28
+ boxSize: 'E 100%',
29
+ position: 'fixed',
30
+ bottom: '0',
31
+ left: '0',
32
+ zIndex: '10',
33
+ background: ' linear-gradient(to top, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 100%)',
34
+ pointerEvents: 'none'
35
+ },
36
+
37
+ footer: {
38
+ position: 'fixed',
39
+ width: 'calc(100% - 70px)',
40
+ zIndex: '100',
41
+ bottom: '0',
42
+ right: '0',
43
+ align: 'center flex-end',
44
+ padding: '- B B -',
45
+ '@media only screen and (max-width: 480px)': {
46
+ justifyContent: 'center',
47
+ padding: '- 20px 30px 20px'
48
+ },
49
+ search: {
50
+ fontFamily: 'avenir',
51
+ fontWeight: '400',
52
+ round: 'D',
53
+ flow: 'row',
54
+ border: 'solid, #252527',
55
+ borderWidth: '1px',
56
+ width: 'G+D',
57
+ padding: 'Z A Z B',
58
+ position: 'relative',
59
+ Icon: {
60
+ boxSize: 'A+V A+V',
61
+ color: '#3F3F43'
62
+ },
63
+ input: {
64
+ fontFamily: 'avenir',
65
+ placeholder: 'find component . . .',
66
+ fontSize: 'A',
67
+ ':focus ~ svg': { opacity: '0' }
68
+ },
69
+ x: {
70
+ color: 'white',
71
+ position: 'absolute',
72
+ right: 'A'
73
+ }
74
+ }
75
+ }
76
+ },
77
+
78
+ cnt: {
79
+ extend: Flex,
80
+
81
+ props: {
82
+ flow: 'column',
83
+ padding: 'F E E D',
84
+ gap: 'E+C',
85
+ minWidth: 'calc(100% - 70px)',
86
+ height: '100dvh',
87
+ margin: '- - - auto',
88
+ style: {
89
+ overflowY: 'auto',
90
+ scrollBehavior: 'smooth'
91
+ }
92
+ },
93
+
94
+ childExtend: {
95
+ props: ({ key, state }) => ({
96
+ hide: !key.toLowerCase().includes(state.value),
97
+ position: 'relative'
98
+ }),
99
+ __title: {
100
+ props: {
101
+ ignoreChildExtend: true,
102
+ position: 'absolute',
103
+ left: '0',
104
+ top: '-C',
105
+ fontSize: '14px',
106
+ color: 'white .35'
107
+ },
108
+ text: ({ parent }) => parent.key
109
+ }
110
+ },
111
+
112
+ H1: {
113
+ props: { hide: false },
114
+ __title: { text: 'Searched value:' },
115
+ text: ({ state }) => state.value
116
+ },
117
+
118
+ StatusIndicator: {},
119
+ Avatar: {},
120
+ AvatarIndicator: {},
121
+ AvatarBundle: {
122
+ childExtend: Avatar,
123
+ ...[{}, {}, {}]
124
+ },
125
+ AvatarChooser: {
126
+ options: [{
127
+ text: 'Kevin'
128
+ }, {
129
+ text: 'John'
130
+ }]
131
+ },
132
+ Hgroup: {
133
+ Title: { text: 'Title' },
134
+ Paragraph: { text: 'Paragraph' }
135
+ },
136
+ User: {
137
+ Avatar: {},
138
+ Notes: {
139
+ Title: { text: 'Erin Schleifer' },
140
+ Paragraph: { text: 'email@symbols.com' }
141
+ }
142
+ },
143
+ Label: {},
144
+ UserWithLabel: {},
145
+ CountIndicator: {},
146
+ ChatUser: {},
147
+ UserButtonSet: {},
148
+ UserButtonSetCircle: {},
149
+ UserMessage: {},
150
+ UserWithButton: {},
151
+
152
+ FlexButton: {},
153
+ CancelConfirmButtons: {},
154
+ SquareButton: {},
155
+
156
+ Tab: {},
157
+ IconTab: {},
158
+ Modal: {},
159
+ Message: {},
160
+ SuccessIndicator: {},
161
+ CompleteProcess: {},
162
+ UploadButton: {},
163
+ UploadLabel: {},
164
+ UploadFooter: {},
165
+ UploadModal: {},
166
+ UploadButtonWithBackground: {},
167
+ UploadLabel2: {},
168
+ UploadModal2: {},
169
+ UploadModal3: {},
170
+ UploadImage: {},
171
+ DoubleUnitValue: {},
172
+ ProgressLine: {},
173
+ UploadingProcess: {},
174
+ UploadedProcess: {},
175
+ UnitValue: {
176
+ Value: { text: '72' },
177
+ Unit: { text: '%' }
178
+ },
179
+ ProgressLineWithUnitValue: {},
180
+ UploadingProcess2: {},
181
+ UploadedProcess2: {},
182
+ ProgressCircleWithSideUnitValue: {},
183
+ UploadingProcess3: {},
184
+ UploadedProcess3: {},
185
+ ProgressCircle: {},
186
+ ProgressCircleWithIcon: {},
187
+ ProgressCircleWithUnitValue: {},
188
+ UploadingProcess4: {},
189
+ UploadedProcess4: {},
190
+ UploadModal4: {},
191
+
192
+ Checkbox: {},
193
+ Radio: {},
194
+ Toggle: {},
195
+ NumberInput: {},
196
+
197
+ Field: {},
198
+ FieldTemplate: {},
199
+ FieldWithTitle: {},
200
+ FieldWithTitleTemplate: {},
201
+ TextAreaField: {},
202
+
203
+ ParagraphButton: {},
204
+ VerificationCode: {},
205
+ ResetPassword: {},
206
+ ParagraphButtonWithCheckbox: {},
207
+ ContactForm: {},
208
+ SignUp: {},
209
+ DoubleHr: {},
210
+ SocialLink: {},
211
+ LogIn: {},
212
+
213
+ Search: {},
214
+ SearchWithButton: {},
215
+ DropDownButton: {},
216
+ SearchWithDropDownButton: {},
217
+ ListTemplate: {},
218
+ ListWithTitleTemplate: {},
219
+ GroupListTemplate: {},
220
+ GroupListWithSearchTemplate: {},
221
+
222
+ CheckIndicator: {},
223
+ CheckIndicatorWithLabel: {},
224
+ CheckStep: {},
225
+ CheckSteps: {},
226
+ RadioIndicator: {},
227
+ RadioIndicatorWithLabel: {},
228
+ RadioStep: {},
229
+ RadioSteps: {},
230
+ LineSteps: {},
231
+ LineStepsWithHgroup: {},
232
+
233
+ StepCard: {},
234
+ UnitValueWithLabel: {},
235
+ BalanceCard: {},
236
+ UnitValueWithTitle: {},
237
+ DropDownButtonWithAvatar: {},
238
+ ConvertCard: {},
239
+ CurrencyConvert: {},
240
+ PlusMinusButtons: {},
241
+ Pricing: {},
242
+
243
+ DatePicker: {},
244
+ TimePicker: {}
245
+ },
246
+
247
+ footer: {
248
+ extend: Flex,
249
+ Search: {
250
+ extend: SearchWithButton,
251
+ props: {
252
+ minWidth: 'G+C',
253
+ minHeight: 'C+X',
254
+ maxHeight: 'C+Z',
255
+ round: 'C',
256
+ padding: '- A+W - A+Y',
257
+ border: '1px solid #3F3F43',
258
+ background: 'transparent'
259
+ },
260
+ Input: {
261
+ props: {
262
+ fontSize: 'Z1',
263
+ placeholder: 'Find component ...',
264
+ ':focus ~ svg': { opacity: '0' }
265
+ },
266
+ on: {
267
+ keyup: (event, el, s) => {
268
+ const value = el.node.value.toLowerCase()
269
+ s.update({ value })
270
+ }
271
+ }
272
+ },
273
+ Icon: {
274
+ props: {
275
+ fontSize: 'C',
276
+ color: '#3F3F43'
277
+ }
278
+ },
279
+ Button: {
280
+ props: {
281
+ position: 'absolute',
282
+ margin: 'auto',
283
+ right: 'Z',
284
+ color: '#3F3F43'
285
+ }
286
+ }
287
+ }
288
+ }
289
+ }
package/index.js CHANGED
@@ -1,50 +1,35 @@
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
- })
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
+ }
35
26
  }
36
- }
37
- }, undefined, 'app', {
38
- extend: [smbls.Box],
39
- components: { ...smbls, ...components },
40
- context: { system: designSystem }
41
- })
27
+ },
42
28
 
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
- })
29
+ Colors,
30
+ Typography,
31
+ Shadows,
32
+ Shapes,
33
+ Icons,
34
+ Spacing
50
35
  }
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.24",
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.265",
4
+ "main": "index.js",
5
+ "license": "MIT",
6
+ "gitHead": "e256f5a24de103ca563abb7cf95fdc8723a2b1ab",
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,52 @@
1
+ 'use strict'
2
+
3
+ import { Grid } from '@symbo.ls/atoms'
4
+ import { DemoSection } from './section'
5
+
6
+ const ColorTemplate = {
7
+ extend: 'Flex',
8
+ props: {
9
+ gap: 'A'
10
+ },
11
+
12
+ Color: {
13
+ boxSize: 'D1',
14
+ aspectRatio: '1 / 1',
15
+ theme: 'dialog',
16
+ round: 'W'
17
+ },
18
+
19
+ Description: {
20
+ extend: 'Flex',
21
+ props: { gap: 'X', flow: 'column' },
22
+ Title: { color: 'title' },
23
+ Value: { margin: 'X - -', color: 'paragraph' },
24
+ Var: { color: 'paragraph' }
25
+ }
26
+ }
27
+
28
+ export const ColorSection = {
29
+ extend: DemoSection,
30
+
31
+ Title: {
32
+ props: {
33
+ text: 'Primary color',
34
+ padding: 'C1 - B1 -'
35
+ }
36
+ },
37
+
38
+ Paragraph: {
39
+ extend: Grid,
40
+
41
+ props: {
42
+ columns: 'repeat(4, 1fr)',
43
+ gap: 'D',
44
+ '@tabletS': { columns: 'repeat(3, 1fr)' },
45
+ '@mobileL': { columns: 'repeat(2, 1fr)' },
46
+ '@mobileS': { columns: 'repeat(1, 1fr)' },
47
+ '@mobileXS': { gap: 'A2' }
48
+ },
49
+
50
+ childExtend: ColorTemplate
51
+ }
52
+ }
@@ -0,0 +1,60 @@
1
+ 'use stric'
2
+
3
+ import { DemoSection } from './section'
4
+
5
+ export const font = {
6
+ extend: DemoSection,
7
+ props: {
8
+ flex: '1',
9
+ padding: 'D D D1 D',
10
+ '@mobileL': { padding: 'C C' },
11
+ '@mobileS': { padding: 'C B' }
12
+ },
13
+
14
+ Title: {
15
+ props: { text: 'Sans-Serif' }
16
+ },
17
+ Paragraph: {
18
+ tag: 'p',
19
+ props: {
20
+ theme: 'dialog',
21
+ fontSize: 'G2',
22
+ maxWidth: '100%',
23
+ boxSizing: 'border-box',
24
+ padding: 'A',
25
+ flow: 'column',
26
+ gap: '0',
27
+ round: 'V2',
28
+ lineHeight: '1.1em',
29
+ '@mobileL': {
30
+ fontSize: 'G',
31
+ padding: 'Z1 Z1'
32
+ },
33
+ '@mobileS': {
34
+ fontSize: 'F2',
35
+ padding: 'Z1 Z'
36
+ },
37
+
38
+ childProps: {
39
+ textOverflow: 'ellipsis',
40
+ overflow: 'hidden',
41
+ maxWidth: '100%',
42
+ whiteSpace: 'nowrap',
43
+ minWidth: '0',
44
+ text: 'Today is a big day for our tribe. The year ends.',
45
+ ':first-child': { fontWeight: '900' },
46
+ ':nth-child(2)': { fontWeight: '700' },
47
+ ':nth-child(3)': { fontWeight: '500' },
48
+ ':nth-child(4)': { fontWeight: '400' },
49
+ ':last-child': { fontWeight: '100' }
50
+ }
51
+ },
52
+ ...[
53
+ { },
54
+ {},
55
+ {},
56
+ {},
57
+ {}
58
+ ]
59
+ }
60
+ }
@@ -0,0 +1,54 @@
1
+ 'use strict'
2
+
3
+ import { Grid } from '@symbo.ls/atoms'
4
+ import { DemoSection } from './section'
5
+
6
+ export const icon = {
7
+ extend: DemoSection,
8
+ props: {
9
+ padding: 'E D E1 D',
10
+ '@mobileL': { padding: 'D C' },
11
+ '@mobileS': { padding: 'D B' }
12
+ },
13
+
14
+ Title: null,
15
+ Paragraph: {
16
+ extend: Grid,
17
+ props: {
18
+ columns: 'repeat(7, 1fr)',
19
+ gap: 'C',
20
+ '@tabletS': { gap: 'B1' },
21
+ '@mobileL': { gap: 'A2' },
22
+ '@mobileM': { gap: 'A' },
23
+ '@mobileS': { gap: 'Z' }
24
+ // padding: 'E D E2 D'
25
+ },
26
+ childExtend: {
27
+ extend: 'Flex',
28
+ props: {
29
+ align: 'center',
30
+ aspectRatio: '1/1',
31
+ theme: 'dialog',
32
+ round: 'Z'
33
+ // padding: 'D B'
34
+ },
35
+ Icon: {
36
+ margin: 'auto',
37
+ fontSize: 'D',
38
+ '@mobileM': { fontSize: 'C' },
39
+ '@mobileS': {
40
+ fontSize: 'B1',
41
+ round: 'X'
42
+ }
43
+ }
44
+ },
45
+
46
+ $collection: ({ context }) => {
47
+ const { ICONS } = context.designSystem
48
+ return Object.keys(ICONS).map(name => ({
49
+ Icon: { name }
50
+ }))
51
+ }
52
+
53
+ }
54
+ }
@@ -0,0 +1,7 @@
1
+ 'use strict'
2
+
3
+ export * from './font'
4
+ export * from './color'
5
+ export * from './shadow'
6
+ export * from './icon'
7
+ export * from './shape'
@@ -0,0 +1,23 @@
1
+ 'use strict'
2
+
3
+ import { Hgroup } from '@symbo.ls/hgroup'
4
+
5
+ export const DemoSection = {
6
+ tag: 'section',
7
+ extend: Hgroup,
8
+ props: {
9
+ gap: 'A'
10
+ },
11
+
12
+ Title: {
13
+ tag: 'h5',
14
+ props: {
15
+ fontSize: 'A',
16
+ fontWeight: '500',
17
+ '@tabletS<': { alignItems: 'flex-end' },
18
+ letterSpacing: '.2em',
19
+ padding: '- Z1',
20
+ textTransform: 'uppercase'
21
+ }
22
+ }
23
+ }
@@ -0,0 +1,91 @@
1
+ 'use strict'
2
+
3
+ import { Grid } from '@symbo.ls/atoms'
4
+ import { DemoSection } from './section'
5
+
6
+ export const shadow = {
7
+ extend: DemoSection,
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
+ }