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