@symbo.ls/avatar 2.11.160 → 2.11.164

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/Avatar.js ADDED
@@ -0,0 +1,17 @@
1
+ 'use strict'
2
+
3
+ import { Img } from '@symbo.ls/atoms'
4
+
5
+ export const Avatar = {
6
+ extend: Img,
7
+ props: {
8
+ display: 'block',
9
+ avatarType: 'initials',
10
+ borderRadius: '100%',
11
+ boxSize: 'C+X C+X',
12
+ cursor: 'pointer'
13
+ },
14
+ attr: {
15
+ src: ({ key, props }) => props.src || `https://avatars.dicebear.com/api/${props.avatarType || 'adventurer-neutral'}/${props.key || key}.svg`
16
+ }
17
+ }
@@ -0,0 +1,18 @@
1
+ 'use strict'
2
+
3
+ import { Flex } from '@symbo.ls/atoms'
4
+ import { Avatar } from './Avatar'
5
+
6
+ export const AvatarBundle = {
7
+ extend: Flex,
8
+ childExtend: {
9
+ extend: Avatar,
10
+ props: {
11
+ border: '0.1312em, black .85, solid',
12
+ ':not(:last-child)': {
13
+ margin: '0 -Y2 0 0'
14
+ }
15
+ }
16
+ },
17
+ ...[{}, {}, {}, {}]
18
+ }
@@ -0,0 +1,15 @@
1
+ 'use strict'
2
+
3
+ export const AvatarIndicator = {
4
+ props: {
5
+ boxSize: 'fit-content',
6
+ position: 'relative',
7
+ round: '100%'
8
+ },
9
+ Avatar: {},
10
+ StatusIndicator: {
11
+ position: 'absolute',
12
+ bottom: 'V',
13
+ right: '0'
14
+ }
15
+ }
package/index.js CHANGED
@@ -1,274 +1,5 @@
1
1
  'use strict'
2
2
 
3
- import { Img, Flex } from '@symbo.ls/atoms'
4
- import { Button } from '@symbo.ls/button'
5
- import { IndicatorDot } from '@symbo.ls/indicatordot'
6
- import { InfoSet } from '@symbo.ls/infoset'
7
- import { CardLabel } from '@symbo.ls/label'
8
-
9
- export const Avatar = {
10
- extend: Img,
11
- props: {
12
- display: 'block',
13
- avatarType: 'initials',
14
- borderRadius: '100%',
15
- boxSize: 'A+A',
16
- cursor: 'pointer'
17
- },
18
- attr: {
19
- src: ({ key, props }) => props.src || `https://avatars.dicebear.com/api/${props.avatarType || 'adventurer-neutral'}/${props.key || key}.svg`
20
- }
21
- }
22
-
23
- export const DropDownWithAvatar = {
24
- extend: Flex,
25
- avatar: { extend: Avatar },
26
- list: {
27
- childExtend: { tag: 'H6' },
28
- ...[{ props: { text: 'eth' } }]
29
- },
30
- downArrow: {
31
- extend: Button,
32
- props: { icon: 'chevronDown' }
33
- },
34
-
35
- props: {
36
- boxSize: 'fit-content fit-content',
37
- align: 'center flex-start',
38
- padding: 'Y Z',
39
- gap: 'Z',
40
- round: 'Z',
41
- background: 'rgba(28, 28, 31, 1)',
42
- avatar: { boxSize: 'A+Y' },
43
- list: {
44
- childProps: {
45
- fontSize: 'Z',
46
- textTransform: 'uppercase'
47
- }
48
- },
49
- downArrow: {
50
- padding: '0',
51
- background: 'transparent',
52
- color: 'white',
53
- fontSize: 'Y'
54
- }
55
- }
56
- }
57
-
58
- export const AvatarWithIndicator = {
59
- avatar: { extend: Avatar },
60
- indicator: { extend: IndicatorDot },
61
-
62
- props: {
63
- boxSize: 'fit-content fit-content',
64
- round: '100%',
65
- position: 'relative',
66
- indicator: {
67
- position: 'absolute',
68
- bottom: '0',
69
- right: '0'
70
- }
71
- }
72
- }
73
-
74
- export const AvatarBundle = {
75
- extend: Flex,
76
- childExtend: {
77
- extend: Avatar,
78
- props: {
79
- boxSize: 'B1',
80
- border: '0.1312em, black .85, solid',
81
- ':not(:last-child)': {
82
- margin: '0 -Y2 0 0'
83
- }
84
- }
85
- },
86
- ...[{}, {}]
87
- }
88
-
89
- export const AvatarChooser = {
90
- extend: Button,
91
- tag: 'label',
92
-
93
- props: {
94
- round: 'C',
95
- gap: 'Y',
96
- padding: 'W2 A W2 W2',
97
- theme: 'tertiary',
98
- position: 'relative',
99
- cursor: 'pointer'
100
- },
101
-
102
- Avatar: {
103
- boxSize: 'B1',
104
- pointerEvents: 'none'
105
- },
106
-
107
- select: {
108
- props: {
109
- id: 'avatar-chooser',
110
- outline: 'none',
111
- pointerEvents: 'all',
112
- appearance: 'none',
113
- border: 'none',
114
- width: '100%',
115
- height: '100%',
116
- background: 'none',
117
- color: 'currentColor',
118
- fontSize: 'A',
119
- lineHeight: 1,
120
- margin: '0 0 0 -B1+X',
121
- padding: '0 A 0 B1+X'
122
- },
123
-
124
- attr: { name: 'avatar-chooser' },
125
-
126
- childExtend: { tag: 'option' },
127
- $setPropsCollection: ({ parent }) => parent.props.options,
128
- on: {
129
- change: (ev, { parent }) => {
130
- parent.Avatar.update({ key: ev.target.value })
131
- }
132
- }
133
- }
134
- }
135
-
136
- export const AvatarWithInfoSet = {
137
- extend: Flex,
138
- avatar: { extend: AvatarWithIndicator },
139
- infos: {
140
- extend: InfoSet,
141
- ...[
142
- {
143
- title: { props: { text: 'Erin Schleifer' } },
144
- subTitle: { caption: { props: { text: 'email@symbols.com' } } }
145
- }
146
- ]
147
- },
148
-
149
- props: {
150
- boxSize: 'fit-content',
151
- align: 'center flex-start',
152
- gap: 'A',
153
- infos: {
154
- childProps: {
155
- flow: 'column',
156
- subTitle: { caption: { whiteSpace: 'nowrap' } }
157
- }
158
- }
159
- }
160
- }
161
-
162
- export const AvatarInfoSetWithLabel = {
163
- extend: AvatarWithInfoSet,
164
- avatar: { extend: Avatar },
165
- infos: {
166
- ...[
167
- {
168
- title: { props: { text: 'ETHDOWN' } },
169
- label: { extend: CardLabel },
170
- subTitle: null,
171
- props: { gap: 'Z' }
172
- },
173
- {
174
- subTitle: { props: { text: 'Short ADA with up to 4x Leverage' } }
175
- }
176
- ]
177
- },
178
-
179
- props: {
180
- avatar: { boxSize: 'B' },
181
- infos: {
182
- gap: 'X',
183
- childProps: {
184
- flow: 'row'
185
- }
186
- }
187
- }
188
- }
189
-
190
- export const AvatarInfoSetWithButton = {
191
- extend: AvatarWithInfoSet,
192
- avatar: { extend: Avatar },
193
- infos: {
194
- ...[
195
- {
196
- title: { props: { text: 'Wallet ID' } },
197
- subTitle: { caption: { props: { text: '0xfb59...d862' } } }
198
- },
199
- {
200
- extend: Button,
201
- props: { icon: 'copyOutline' }
202
- }
203
- ]
204
- },
205
-
206
- props: {
207
- padding: 'Y A Y Y',
208
- border: '1px solid #57575C',
209
- round: 'Z',
210
- gap: 'Z',
211
- avatar: {
212
- boxSize: 'A+B',
213
- round: 'Y'
214
- },
215
- infos: {
216
- flow: 'row',
217
- align: 'center flex-start',
218
- gap: 'A+X',
219
- childProps: {
220
- title: { fontSize: 'Y' },
221
- ':nth-child(2)': {
222
- padding: '0',
223
- color: 'white',
224
- fontSize: 'C',
225
- background: 'transparent'
226
- }
227
- }
228
- }
229
- }
230
- }
231
-
232
- export const AvatarBundleInfoSet = {
233
- extend: AvatarWithInfoSet,
234
- avatar: { extend: AvatarBundle },
235
- infos: {
236
- ...[
237
- {
238
- title: { props: { text: 'ETH/BNB' } },
239
- CardLabel: {
240
- text: '1 ETH = 240.7 BNB'
241
- },
242
- subTitle: null
243
- }
244
- ]
245
- },
246
-
247
- props: {
248
- gap: 'Z',
249
- background: '#1C1C1F',
250
- padding: 'A A',
251
- round: 'Z',
252
- avatar: {
253
- childProps: {
254
- boxSize: 'A+A',
255
- ':not(:first-child)': {
256
- border: 'solid, black 0',
257
- borderWidth: '1px'
258
- }
259
- }
260
- },
261
- infos: {
262
- childProps: {
263
- flow: 'row',
264
- gap: 'Z',
265
- align: 'center flex-start',
266
- title: { fontWeight: '700' },
267
- label: {
268
- background: 'black',
269
- padding: 'Y Z'
270
- }
271
- }
272
- }
273
- }
274
- }
3
+ export * from './Avatar'
4
+ export * from './AvatarIndicator'
5
+ export * from './AvatarBundle'
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@symbo.ls/avatar",
3
- "version": "2.11.160",
3
+ "version": "2.11.164",
4
4
  "main": "index.js",
5
5
  "license": "MIT",
6
- "gitHead": "f36bc99a2d0c1b771e3d8e104d1b1005b2b0a33a",
6
+ "gitHead": "943a48800e5959b8c1f15d5d8d49224565038c23",
7
7
  "dependencies": {
8
8
  "@symbo.ls/atoms": "latest",
9
9
  "@symbo.ls/button": "latest",
10
- "@symbo.ls/indicatordot": "latest"
10
+ "@symbo.ls/indicator": "latest"
11
11
  },
12
12
  "source": "src/index.js"
13
13
  }
package/symbols.js ADDED
@@ -0,0 +1,42 @@
1
+ 'use strict'
2
+
3
+ import PACKAGE from './package.json'
4
+ import { Avatar } from './'
5
+
6
+ const key = 'Avatar'
7
+ const title = 'Avatar'
8
+ const description = ''
9
+ const category = ['Atoms']
10
+ const extend = 'Avatar'
11
+
12
+ const state = {}
13
+ const props = {}
14
+
15
+ const component = {
16
+ extend: Avatar
17
+ }
18
+
19
+ const code = ''
20
+
21
+ const settings = {
22
+ gridOptions: { colspan: 2, rowspan: 1 }
23
+ }
24
+
25
+ export default {
26
+ key,
27
+ title,
28
+ description,
29
+ category,
30
+ extend,
31
+
32
+ component,
33
+ code,
34
+ state,
35
+ props,
36
+
37
+ settings,
38
+ package: PACKAGE.name,
39
+ version: PACKAGE.version,
40
+ interactivity: [],
41
+ dataTypes: []
42
+ }
package/style.js DELETED
@@ -1,19 +0,0 @@
1
- 'use strict'
2
-
3
- export const styleUser = {
4
- cursor: 'pointer',
5
- borderRadius: '100%'
6
- }
7
-
8
- export const styleUserBundle = {
9
- display: 'flex',
10
- alignItems: 'center',
11
- textTransform: 'capitalize',
12
- '> div': {
13
- display: 'flex',
14
- marginRight: '1em',
15
- '> img': {
16
- marginRight: '-0.5em'
17
- }
18
- }
19
- }