@ornikar/bumper 3.12.0 → 3.14.0
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/CHANGELOG.md +12 -140
- package/dist/definitions/index.d.ts +4 -0
- package/dist/definitions/index.d.ts.map +1 -1
- package/dist/definitions/system/core/themes/light/light.d.ts.map +1 -1
- package/dist/definitions/system/core/themes/types.d.ts +3 -1
- package/dist/definitions/system/core/themes/types.d.ts.map +1 -1
- package/dist/definitions/system/dataDisplays/Avatar/Avatar.d.ts +52 -0
- package/dist/definitions/system/dataDisplays/Avatar/Avatar.d.ts.map +1 -0
- package/dist/definitions/system/dataDisplays/Avatar/components/AvatarImage.d.ts +5 -0
- package/dist/definitions/system/dataDisplays/Avatar/components/AvatarImage.d.ts.map +1 -0
- package/dist/definitions/system/dataDisplays/Avatar/components/AvatarInitial.d.ts +6 -0
- package/dist/definitions/system/dataDisplays/Avatar/components/AvatarInitial.d.ts.map +1 -0
- package/dist/definitions/system/dataDisplays/Avatar/context.d.ts +3 -0
- package/dist/definitions/system/dataDisplays/Avatar/context.d.ts.map +1 -0
- package/dist/index-metro.es.android.js +190 -9
- package/dist/index-metro.es.android.js.map +1 -1
- package/dist/index-metro.es.ios.js +190 -9
- package/dist/index-metro.es.ios.js.map +1 -1
- package/dist/index-node-22.22.cjs.js +193 -7
- package/dist/index-node-22.22.cjs.js.map +1 -1
- package/dist/index-node-22.22.cjs.web.js +193 -7
- package/dist/index-node-22.22.cjs.web.js.map +1 -1
- package/dist/index-node-22.22.es.mjs +192 -9
- package/dist/index-node-22.22.es.mjs.map +1 -1
- package/dist/index-node-22.22.es.web.mjs +192 -9
- package/dist/index-node-22.22.es.web.mjs.map +1 -1
- package/dist/index.es.js +193 -9
- package/dist/index.es.js.map +1 -1
- package/dist/index.es.web.js +193 -9
- package/dist/index.es.web.js.map +1 -1
- package/dist/storybook-metro.es.android.js +3 -1
- package/dist/storybook-metro.es.android.js.map +1 -1
- package/dist/storybook-metro.es.ios.js +3 -1
- package/dist/storybook-metro.es.ios.js.map +1 -1
- package/dist/storybook-node-22.22.cjs.js +3 -1
- package/dist/storybook-node-22.22.cjs.js.map +1 -1
- package/dist/storybook-node-22.22.cjs.web.js +3 -1
- package/dist/storybook-node-22.22.cjs.web.js.map +1 -1
- package/dist/storybook-node-22.22.es.mjs +3 -1
- package/dist/storybook-node-22.22.es.mjs.map +1 -1
- package/dist/storybook-node-22.22.es.web.mjs +3 -1
- package/dist/storybook-node-22.22.es.web.mjs.map +1 -1
- package/dist/storybook.es.js +3 -1
- package/dist/storybook.es.js.map +1 -1
- package/dist/storybook.es.web.js +3 -1
- package/dist/storybook.es.web.js.map +1 -1
- package/dist/tsbuildinfo +1 -1
- package/docs/migration/Avatar.md +228 -0
- package/package.json +1 -1
- package/src/Bumper.mdx +1 -0
- package/src/index.ts +6 -0
- package/src/system/core/themes/light/__snapshots__/light.stories.tsx.snap +73 -0
- package/src/system/core/themes/light/__snapshots_web__/light.stories.tsx.snap +21 -0
- package/src/system/core/themes/light/light.ts +3 -0
- package/src/system/core/themes/types.ts +5 -1
- package/src/system/dataDisplays/Avatar/Avatar.features.stories.tsx +110 -0
- package/src/system/dataDisplays/Avatar/Avatar.mdx +73 -0
- package/src/system/dataDisplays/Avatar/Avatar.stories.tsx +47 -0
- package/src/system/dataDisplays/Avatar/Avatar.tsx +124 -0
- package/src/system/dataDisplays/Avatar/__snapshots__/Avatar.features.stories.tsx.snap +891 -0
- package/src/system/dataDisplays/Avatar/__snapshots__/Avatar.stories.tsx.snap +50 -0
- package/src/system/dataDisplays/Avatar/__snapshots_web__/Avatar.features.stories.tsx.snap +545 -0
- package/src/system/dataDisplays/Avatar/__snapshots_web__/Avatar.stories.tsx.snap +37 -0
- package/src/system/dataDisplays/Avatar/assets/avatar-placeholder-disabled.webp +0 -0
- package/src/system/dataDisplays/Avatar/assets/avatar-placeholder.webp +0 -0
- package/src/system/dataDisplays/Avatar/components/AvatarImage.tsx +34 -0
- package/src/system/dataDisplays/Avatar/components/AvatarInitial.tsx +30 -0
- package/src/system/dataDisplays/Avatar/context.ts +10 -0
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
|
|
2
|
+
|
|
3
|
+
exports[`Bumper/Data Displays/Avatar Default 1`] = `
|
|
4
|
+
<RNCSafeAreaProvider
|
|
5
|
+
onInsetsChange={[Function]}
|
|
6
|
+
style={
|
|
7
|
+
[
|
|
8
|
+
{
|
|
9
|
+
"flex": 1,
|
|
10
|
+
},
|
|
11
|
+
undefined,
|
|
12
|
+
]
|
|
13
|
+
}
|
|
14
|
+
>
|
|
15
|
+
<View
|
|
16
|
+
firstname="John"
|
|
17
|
+
lastname="Doe"
|
|
18
|
+
style={
|
|
19
|
+
{
|
|
20
|
+
"alignItems": "center",
|
|
21
|
+
"backgroundColor": "#EAE3D6",
|
|
22
|
+
"borderBottomLeftRadius": 4,
|
|
23
|
+
"borderBottomRightRadius": 4,
|
|
24
|
+
"borderTopLeftRadius": 4,
|
|
25
|
+
"borderTopRightRadius": 4,
|
|
26
|
+
"height": 48,
|
|
27
|
+
"justifyContent": "center",
|
|
28
|
+
"overflow": "hidden",
|
|
29
|
+
"width": 48,
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
>
|
|
33
|
+
<Text
|
|
34
|
+
style={
|
|
35
|
+
{
|
|
36
|
+
"color": "#563B56",
|
|
37
|
+
"fontFamily": "GTStandardSemibold",
|
|
38
|
+
"fontSize": 16,
|
|
39
|
+
"letterSpacing": 0,
|
|
40
|
+
"lineHeight": 20,
|
|
41
|
+
"textAlign": "left",
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
suppressHighlighting={true}
|
|
45
|
+
>
|
|
46
|
+
JD
|
|
47
|
+
</Text>
|
|
48
|
+
</View>
|
|
49
|
+
</RNCSafeAreaProvider>
|
|
50
|
+
`;
|
|
@@ -0,0 +1,545 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
|
|
2
|
+
|
|
3
|
+
exports[`Bumper/Data Displays/Avatar/Features CircleSizes 1`] = `
|
|
4
|
+
<DocumentFragment>
|
|
5
|
+
<div
|
|
6
|
+
class="css-view-g5y9jx r-flex-13awgt0"
|
|
7
|
+
>
|
|
8
|
+
<span
|
|
9
|
+
class=""
|
|
10
|
+
style="display: contents;"
|
|
11
|
+
>
|
|
12
|
+
<span
|
|
13
|
+
class=" "
|
|
14
|
+
style="display: contents;"
|
|
15
|
+
>
|
|
16
|
+
<span
|
|
17
|
+
class=" t_light is_Theme"
|
|
18
|
+
style="display: contents;"
|
|
19
|
+
>
|
|
20
|
+
<div
|
|
21
|
+
class="is_HStack _dsp-flex _fb-auto _bxs-border-box _pos-relative _minHeight-0px _minWidth-0px _flexShrink-0 _fd-row _gap-t-space-spa1366020313 _alignItems-center"
|
|
22
|
+
>
|
|
23
|
+
<div
|
|
24
|
+
class="is_Avatar _dsp-flex _fd-column _fb-auto _bxs-border-box _pos-relative _minHeight-0px _minWidth-0px _flexShrink-0 _justifyContent-center _alignItems-center _ox-hidden _oy-hidden _backgroundColor-avatar--bg _width-32px _height-32px _btlr-t-radius-ra1854241453 _btrr-t-radius-ra1854241453 _bbrr-t-radius-ra1854241453 _bblr-t-radius-ra1854241453"
|
|
25
|
+
data-disable-theme="true"
|
|
26
|
+
firstname="John"
|
|
27
|
+
lastname="Doe"
|
|
28
|
+
>
|
|
29
|
+
<span
|
|
30
|
+
class="font_GTStandard _WebkitFontSmoothing-_platformweb_antialiased _dsp-inline _bxs-border-box _ww-break-word _ws-pre-wrap _marginTop-0px _marginRight-0px _marginBottom-0px _marginLeft-0px _ff-f-family _fs-f-size-labe105292 _lh-f-lineHeigh1842530171 _ls-f-letterSpa379059034 _fw-f-weight-se1074390495 _col-content--ac3049896 _textAlign-left"
|
|
31
|
+
>
|
|
32
|
+
JD
|
|
33
|
+
</span>
|
|
34
|
+
</div>
|
|
35
|
+
<div
|
|
36
|
+
class="is_Avatar _dsp-flex _fd-column _fb-auto _bxs-border-box _pos-relative _minHeight-0px _minWidth-0px _flexShrink-0 _justifyContent-center _alignItems-center _ox-hidden _oy-hidden _backgroundColor-avatar--bg _width-40px _height-40px _btlr-t-radius-ra1854241453 _btrr-t-radius-ra1854241453 _bbrr-t-radius-ra1854241453 _bblr-t-radius-ra1854241453"
|
|
37
|
+
data-disable-theme="true"
|
|
38
|
+
firstname="John"
|
|
39
|
+
lastname="Doe"
|
|
40
|
+
>
|
|
41
|
+
<span
|
|
42
|
+
class="font_GTStandard _WebkitFontSmoothing-_platformweb_antialiased _dsp-inline _bxs-border-box _ww-break-word _ws-pre-wrap _marginTop-0px _marginRight-0px _marginBottom-0px _marginLeft-0px _ff-f-family _fs-f-size-labe105291 _lh-f-lineHeigh1842530170 _ls-f-letterSpa379059035 _fw-f-weight-se1074390495 _col-content--ac3049896 _textAlign-left"
|
|
43
|
+
>
|
|
44
|
+
JD
|
|
45
|
+
</span>
|
|
46
|
+
</div>
|
|
47
|
+
<div
|
|
48
|
+
class="is_Avatar _dsp-flex _fd-column _fb-auto _bxs-border-box _pos-relative _minHeight-0px _minWidth-0px _flexShrink-0 _justifyContent-center _alignItems-center _ox-hidden _oy-hidden _backgroundColor-avatar--bg _width-48px _height-48px _btlr-t-radius-ra1854241453 _btrr-t-radius-ra1854241453 _bbrr-t-radius-ra1854241453 _bblr-t-radius-ra1854241453"
|
|
49
|
+
data-disable-theme="true"
|
|
50
|
+
firstname="John"
|
|
51
|
+
lastname="Doe"
|
|
52
|
+
>
|
|
53
|
+
<span
|
|
54
|
+
class="font_GTStandard _WebkitFontSmoothing-_platformweb_antialiased _dsp-inline _bxs-border-box _ww-break-word _ws-pre-wrap _marginTop-0px _marginRight-0px _marginBottom-0px _marginLeft-0px _ff-f-family _fs-f-size-labe105291 _lh-f-lineHeigh1842530170 _ls-f-letterSpa379059035 _fw-f-weight-se1074390495 _col-content--ac3049896 _textAlign-left"
|
|
55
|
+
>
|
|
56
|
+
JD
|
|
57
|
+
</span>
|
|
58
|
+
</div>
|
|
59
|
+
<div
|
|
60
|
+
class="is_Avatar _dsp-flex _fd-column _fb-auto _bxs-border-box _pos-relative _minHeight-0px _minWidth-0px _flexShrink-0 _justifyContent-center _alignItems-center _ox-hidden _oy-hidden _backgroundColor-avatar--bg _width-64px _height-64px _btlr-t-radius-ra1854241453 _btrr-t-radius-ra1854241453 _bbrr-t-radius-ra1854241453 _bblr-t-radius-ra1854241453"
|
|
61
|
+
data-disable-theme="true"
|
|
62
|
+
firstname="John"
|
|
63
|
+
lastname="Doe"
|
|
64
|
+
>
|
|
65
|
+
<span
|
|
66
|
+
class="font_GTStandard _WebkitFontSmoothing-_platformweb_antialiased _dsp-inline _bxs-border-box _ww-break-word _ws-pre-wrap _marginTop-0px _marginRight-0px _marginBottom-0px _marginLeft-0px _ff-f-family _fs-f-size-labe105291 _lh-f-lineHeigh1842530170 _ls-f-letterSpa379059035 _fw-f-weight-se1074390495 _col-content--ac3049896 _textAlign-left"
|
|
67
|
+
>
|
|
68
|
+
JD
|
|
69
|
+
</span>
|
|
70
|
+
</div>
|
|
71
|
+
</div>
|
|
72
|
+
</span>
|
|
73
|
+
</span>
|
|
74
|
+
</span>
|
|
75
|
+
</div>
|
|
76
|
+
</DocumentFragment>
|
|
77
|
+
`;
|
|
78
|
+
|
|
79
|
+
exports[`Bumper/Data Displays/Avatar/Features Disabled 1`] = `
|
|
80
|
+
<DocumentFragment>
|
|
81
|
+
<div
|
|
82
|
+
class="css-view-g5y9jx r-flex-13awgt0"
|
|
83
|
+
>
|
|
84
|
+
<span
|
|
85
|
+
class=""
|
|
86
|
+
style="display: contents;"
|
|
87
|
+
>
|
|
88
|
+
<span
|
|
89
|
+
class=" "
|
|
90
|
+
style="display: contents;"
|
|
91
|
+
>
|
|
92
|
+
<span
|
|
93
|
+
class=" t_light is_Theme"
|
|
94
|
+
style="display: contents;"
|
|
95
|
+
>
|
|
96
|
+
<div
|
|
97
|
+
class="is_HStack _dsp-flex _fb-auto _bxs-border-box _pos-relative _minHeight-0px _minWidth-0px _flexShrink-0 _fd-row _gap-t-space-spa1366020313 _alignItems-center"
|
|
98
|
+
>
|
|
99
|
+
<div
|
|
100
|
+
aria-disabled="true"
|
|
101
|
+
class="is_Avatar _dsp-flex _fd-column _fb-auto _bxs-border-box _pos-relative _minHeight-0px _minWidth-0px _flexShrink-0 _justifyContent-center _alignItems-center _ox-hidden _oy-hidden _backgroundColor-bg--disable93739269 _width-48px _height-48px _btlr-t-radius-ra1673638410 _btrr-t-radius-ra1673638410 _bbrr-t-radius-ra1673638410 _bblr-t-radius-ra1673638410"
|
|
102
|
+
data-disable-theme="true"
|
|
103
|
+
>
|
|
104
|
+
<span
|
|
105
|
+
class="_dsp_contents"
|
|
106
|
+
>
|
|
107
|
+
<div
|
|
108
|
+
class="css-view-g5y9jx r-flexBasis-1mlwlqe r-overflow-1udh08x r-zIndex-417010 is_Image "
|
|
109
|
+
style="height: 100%; width: 100%;"
|
|
110
|
+
>
|
|
111
|
+
<div
|
|
112
|
+
class="css-view-g5y9jx r-backgroundColor-1niwhzg r-backgroundPosition-vvn4in r-backgroundRepeat-u6sd8q r-bottom-1p0dtai r-height-1pi2tsx r-left-1d2f490 r-position-u8s1d r-right-zchlnj r-top-ipm5af r-width-13qz1uu r-zIndex-1wyyakw r-backgroundSize-4gszlv"
|
|
113
|
+
style="background-image: url("test-file-stub");"
|
|
114
|
+
/>
|
|
115
|
+
<img
|
|
116
|
+
alt=""
|
|
117
|
+
class="css-accessibilityImage-9pa8cd"
|
|
118
|
+
draggable="false"
|
|
119
|
+
src="test-file-stub"
|
|
120
|
+
/>
|
|
121
|
+
</div>
|
|
122
|
+
</span>
|
|
123
|
+
<div
|
|
124
|
+
class="_dsp-flex _alignItems-stretch _fd-column _fb-auto _bxs-border-box _minHeight-0px _minWidth-0px _flexShrink-0 _pos-absolute _width-10037 _height-10037 _backgroundColor-bg--base--m757972454 _o-0--5"
|
|
125
|
+
/>
|
|
126
|
+
</div>
|
|
127
|
+
<div
|
|
128
|
+
aria-disabled="true"
|
|
129
|
+
class="is_Avatar _dsp-flex _fd-column _fb-auto _bxs-border-box _pos-relative _minHeight-0px _minWidth-0px _flexShrink-0 _justifyContent-center _alignItems-center _ox-hidden _oy-hidden _backgroundColor-bg--disable93739269 _width-48px _height-48px _btlr-t-radius-ra1673638410 _btrr-t-radius-ra1673638410 _bbrr-t-radius-ra1673638410 _bblr-t-radius-ra1673638410"
|
|
130
|
+
data-disable-theme="true"
|
|
131
|
+
firstname="John"
|
|
132
|
+
lastname="Doe"
|
|
133
|
+
>
|
|
134
|
+
<span
|
|
135
|
+
aria-disabled="true"
|
|
136
|
+
class="font_GTStandard _WebkitFontSmoothing-_platformweb_antialiased _dsp-inline _bxs-border-box _ww-break-word _ws-pre-wrap _marginTop-0px _marginRight-0px _marginBottom-0px _marginLeft-0px _ff-f-family _fs-f-size-labe105291 _lh-f-lineHeigh1842530170 _ls-f-letterSpa379059035 _fw-f-weight-se1074390495 _col-content--di396036745 _textAlign-left"
|
|
137
|
+
>
|
|
138
|
+
JD
|
|
139
|
+
</span>
|
|
140
|
+
</div>
|
|
141
|
+
<div
|
|
142
|
+
aria-disabled="true"
|
|
143
|
+
class="is_Avatar _dsp-flex _fd-column _fb-auto _bxs-border-box _pos-relative _minHeight-0px _minWidth-0px _flexShrink-0 _justifyContent-center _alignItems-center _ox-hidden _oy-hidden _backgroundColor-bg--disable93739269 _width-48px _height-48px _btlr-t-radius-ra1673638410 _btrr-t-radius-ra1673638410 _bbrr-t-radius-ra1673638410 _bblr-t-radius-ra1673638410"
|
|
144
|
+
data-disable-theme="true"
|
|
145
|
+
src="https://i.pravatar.cc/150?img=5"
|
|
146
|
+
>
|
|
147
|
+
<span
|
|
148
|
+
class="_dsp_contents"
|
|
149
|
+
>
|
|
150
|
+
<div
|
|
151
|
+
class="css-view-g5y9jx r-flexBasis-1mlwlqe r-overflow-1udh08x r-zIndex-417010 is_Image "
|
|
152
|
+
style="height: 100%; width: 100%;"
|
|
153
|
+
>
|
|
154
|
+
<div
|
|
155
|
+
class="css-view-g5y9jx r-backgroundColor-1niwhzg r-backgroundPosition-vvn4in r-backgroundRepeat-u6sd8q r-bottom-1p0dtai r-height-1pi2tsx r-left-1d2f490 r-position-u8s1d r-right-zchlnj r-top-ipm5af r-width-13qz1uu r-zIndex-1wyyakw r-backgroundSize-4gszlv"
|
|
156
|
+
style="background-image: url("https://i.pravatar.cc/150?img=5");"
|
|
157
|
+
/>
|
|
158
|
+
<img
|
|
159
|
+
alt=""
|
|
160
|
+
class="css-accessibilityImage-9pa8cd"
|
|
161
|
+
draggable="false"
|
|
162
|
+
src="https://i.pravatar.cc/150?img=5"
|
|
163
|
+
/>
|
|
164
|
+
</div>
|
|
165
|
+
</span>
|
|
166
|
+
<div
|
|
167
|
+
class="_dsp-flex _alignItems-stretch _fd-column _fb-auto _bxs-border-box _minHeight-0px _minWidth-0px _flexShrink-0 _pos-absolute _width-10037 _height-10037 _backgroundColor-bg--base--m757972454 _o-0--5"
|
|
168
|
+
/>
|
|
169
|
+
</div>
|
|
170
|
+
</div>
|
|
171
|
+
</span>
|
|
172
|
+
</span>
|
|
173
|
+
</span>
|
|
174
|
+
</div>
|
|
175
|
+
</DocumentFragment>
|
|
176
|
+
`;
|
|
177
|
+
|
|
178
|
+
exports[`Bumper/Data Displays/Avatar/Features DisabledShapes 1`] = `
|
|
179
|
+
<DocumentFragment>
|
|
180
|
+
<div
|
|
181
|
+
class="css-view-g5y9jx r-flex-13awgt0"
|
|
182
|
+
>
|
|
183
|
+
<span
|
|
184
|
+
class=""
|
|
185
|
+
style="display: contents;"
|
|
186
|
+
>
|
|
187
|
+
<span
|
|
188
|
+
class=" "
|
|
189
|
+
style="display: contents;"
|
|
190
|
+
>
|
|
191
|
+
<span
|
|
192
|
+
class=" t_light is_Theme"
|
|
193
|
+
style="display: contents;"
|
|
194
|
+
>
|
|
195
|
+
<div
|
|
196
|
+
class="is_HStack _dsp-flex _fb-auto _bxs-border-box _pos-relative _minHeight-0px _minWidth-0px _flexShrink-0 _fd-row _gap-t-space-spa1366020313 _alignItems-center"
|
|
197
|
+
>
|
|
198
|
+
<div
|
|
199
|
+
aria-disabled="true"
|
|
200
|
+
class="is_Avatar _dsp-flex _fd-column _fb-auto _bxs-border-box _pos-relative _minHeight-0px _minWidth-0px _flexShrink-0 _justifyContent-center _alignItems-center _ox-hidden _oy-hidden _backgroundColor-bg--disable93739269 _width-48px _height-48px _btlr-t-radius-ra1673638410 _btrr-t-radius-ra1673638410 _bbrr-t-radius-ra1673638410 _bblr-t-radius-ra1673638410"
|
|
201
|
+
data-disable-theme="true"
|
|
202
|
+
firstname="John"
|
|
203
|
+
lastname="Doe"
|
|
204
|
+
>
|
|
205
|
+
<span
|
|
206
|
+
aria-disabled="true"
|
|
207
|
+
class="font_GTStandard _WebkitFontSmoothing-_platformweb_antialiased _dsp-inline _bxs-border-box _ww-break-word _ws-pre-wrap _marginTop-0px _marginRight-0px _marginBottom-0px _marginLeft-0px _ff-f-family _fs-f-size-labe105291 _lh-f-lineHeigh1842530170 _ls-f-letterSpa379059035 _fw-f-weight-se1074390495 _col-content--di396036745 _textAlign-left"
|
|
208
|
+
>
|
|
209
|
+
JD
|
|
210
|
+
</span>
|
|
211
|
+
</div>
|
|
212
|
+
<div
|
|
213
|
+
aria-disabled="true"
|
|
214
|
+
class="is_Avatar _dsp-flex _fd-column _fb-auto _bxs-border-box _pos-relative _minHeight-0px _minWidth-0px _flexShrink-0 _justifyContent-center _alignItems-center _ox-hidden _oy-hidden _backgroundColor-bg--disable93739269 _width-48px _height-48px _btlr-t-radius-ra1854241453 _btrr-t-radius-ra1854241453 _bbrr-t-radius-ra1854241453 _bblr-t-radius-ra1854241453"
|
|
215
|
+
data-disable-theme="true"
|
|
216
|
+
firstname="John"
|
|
217
|
+
lastname="Doe"
|
|
218
|
+
>
|
|
219
|
+
<span
|
|
220
|
+
aria-disabled="true"
|
|
221
|
+
class="font_GTStandard _WebkitFontSmoothing-_platformweb_antialiased _dsp-inline _bxs-border-box _ww-break-word _ws-pre-wrap _marginTop-0px _marginRight-0px _marginBottom-0px _marginLeft-0px _ff-f-family _fs-f-size-labe105291 _lh-f-lineHeigh1842530170 _ls-f-letterSpa379059035 _fw-f-weight-se1074390495 _col-content--di396036745 _textAlign-left"
|
|
222
|
+
>
|
|
223
|
+
JD
|
|
224
|
+
</span>
|
|
225
|
+
</div>
|
|
226
|
+
</div>
|
|
227
|
+
</span>
|
|
228
|
+
</span>
|
|
229
|
+
</span>
|
|
230
|
+
</div>
|
|
231
|
+
</DocumentFragment>
|
|
232
|
+
`;
|
|
233
|
+
|
|
234
|
+
exports[`Bumper/Data Displays/Avatar/Features Placeholder 1`] = `
|
|
235
|
+
<DocumentFragment>
|
|
236
|
+
<div
|
|
237
|
+
class="css-view-g5y9jx r-flex-13awgt0"
|
|
238
|
+
>
|
|
239
|
+
<span
|
|
240
|
+
class=""
|
|
241
|
+
style="display: contents;"
|
|
242
|
+
>
|
|
243
|
+
<span
|
|
244
|
+
class=" "
|
|
245
|
+
style="display: contents;"
|
|
246
|
+
>
|
|
247
|
+
<span
|
|
248
|
+
class=" t_light is_Theme"
|
|
249
|
+
style="display: contents;"
|
|
250
|
+
>
|
|
251
|
+
<div
|
|
252
|
+
class="is_Avatar _dsp-flex _fd-column _fb-auto _bxs-border-box _pos-relative _minHeight-0px _minWidth-0px _flexShrink-0 _justifyContent-center _alignItems-center _ox-hidden _oy-hidden _backgroundColor-avatar--bg _width-48px _height-48px _btlr-t-radius-ra1673638410 _btrr-t-radius-ra1673638410 _bbrr-t-radius-ra1673638410 _bblr-t-radius-ra1673638410"
|
|
253
|
+
data-disable-theme="true"
|
|
254
|
+
>
|
|
255
|
+
<span
|
|
256
|
+
class="_dsp_contents"
|
|
257
|
+
>
|
|
258
|
+
<div
|
|
259
|
+
class="css-view-g5y9jx r-flexBasis-1mlwlqe r-overflow-1udh08x r-zIndex-417010 is_Image "
|
|
260
|
+
style="height: 100%; width: 100%;"
|
|
261
|
+
>
|
|
262
|
+
<div
|
|
263
|
+
class="css-view-g5y9jx r-backgroundColor-1niwhzg r-backgroundPosition-vvn4in r-backgroundRepeat-u6sd8q r-bottom-1p0dtai r-height-1pi2tsx r-left-1d2f490 r-position-u8s1d r-right-zchlnj r-top-ipm5af r-width-13qz1uu r-zIndex-1wyyakw r-backgroundSize-4gszlv"
|
|
264
|
+
style="background-image: url("test-file-stub");"
|
|
265
|
+
/>
|
|
266
|
+
<img
|
|
267
|
+
alt=""
|
|
268
|
+
class="css-accessibilityImage-9pa8cd"
|
|
269
|
+
draggable="false"
|
|
270
|
+
src="test-file-stub"
|
|
271
|
+
/>
|
|
272
|
+
</div>
|
|
273
|
+
</span>
|
|
274
|
+
</div>
|
|
275
|
+
</span>
|
|
276
|
+
</span>
|
|
277
|
+
</span>
|
|
278
|
+
</div>
|
|
279
|
+
</DocumentFragment>
|
|
280
|
+
`;
|
|
281
|
+
|
|
282
|
+
exports[`Bumper/Data Displays/Avatar/Features Responsive 1`] = `
|
|
283
|
+
<DocumentFragment>
|
|
284
|
+
<div
|
|
285
|
+
class="css-view-g5y9jx r-flex-13awgt0"
|
|
286
|
+
>
|
|
287
|
+
<span
|
|
288
|
+
class=""
|
|
289
|
+
style="display: contents;"
|
|
290
|
+
>
|
|
291
|
+
<span
|
|
292
|
+
class=" "
|
|
293
|
+
style="display: contents;"
|
|
294
|
+
>
|
|
295
|
+
<span
|
|
296
|
+
class=" t_light is_Theme"
|
|
297
|
+
style="display: contents;"
|
|
298
|
+
>
|
|
299
|
+
<div
|
|
300
|
+
class="is_VStack _dsp-flex _alignItems-stretch _fb-auto _bxs-border-box _pos-relative _minHeight-0px _minWidth-0px _flexShrink-0 _fd-column _gap-t-space-spa1366020313"
|
|
301
|
+
>
|
|
302
|
+
<div
|
|
303
|
+
class="is_Avatar _width-_medium_48px _height-_medium_48px _dsp-flex _fd-column _fb-auto _bxs-border-box _pos-relative _minHeight-0px _minWidth-0px _flexShrink-0 _justifyContent-center _alignItems-center _ox-hidden _oy-hidden _backgroundColor-avatar--bg _width-32px _height-32px _btlr-t-radius-ra1673638410 _btrr-t-radius-ra1673638410 _bbrr-t-radius-ra1673638410 _bblr-t-radius-ra1673638410"
|
|
304
|
+
data-disable-theme="true"
|
|
305
|
+
firstname="John"
|
|
306
|
+
lastname="Doe"
|
|
307
|
+
>
|
|
308
|
+
<span
|
|
309
|
+
class="font_GTStandard _WebkitFontSmoothing-_platformweb_antialiased _dsp-inline _bxs-border-box _ww-break-word _ws-pre-wrap _marginTop-0px _marginRight-0px _marginBottom-0px _marginLeft-0px _ff-f-family _fs-f-size-labe105292 _lh-f-lineHeigh1842530171 _ls-f-letterSpa379059034 _fw-f-weight-se1074390495 _col-content--ac3049896 _textAlign-left"
|
|
310
|
+
>
|
|
311
|
+
JD
|
|
312
|
+
</span>
|
|
313
|
+
</div>
|
|
314
|
+
<div
|
|
315
|
+
class="is_Avatar _btlr-_medium_t-radius-ra1854241453 _btrr-_medium_t-radius-ra1854241453 _bbrr-_medium_t-radius-ra1854241453 _bblr-_medium_t-radius-ra1854241453 _dsp-flex _fd-column _fb-auto _bxs-border-box _pos-relative _minHeight-0px _minWidth-0px _flexShrink-0 _justifyContent-center _alignItems-center _ox-hidden _oy-hidden _backgroundColor-avatar--bg _width-48px _height-48px _btlr-t-radius-ra1673638410 _btrr-t-radius-ra1673638410 _bbrr-t-radius-ra1673638410 _bblr-t-radius-ra1673638410"
|
|
316
|
+
data-disable-theme="true"
|
|
317
|
+
firstname="John"
|
|
318
|
+
lastname="Doe"
|
|
319
|
+
>
|
|
320
|
+
<span
|
|
321
|
+
class="font_GTStandard _WebkitFontSmoothing-_platformweb_antialiased _dsp-inline _bxs-border-box _ww-break-word _ws-pre-wrap _marginTop-0px _marginRight-0px _marginBottom-0px _marginLeft-0px _ff-f-family _fs-f-size-labe105291 _lh-f-lineHeigh1842530170 _ls-f-letterSpa379059035 _fw-f-weight-se1074390495 _col-content--ac3049896 _textAlign-left"
|
|
322
|
+
>
|
|
323
|
+
JD
|
|
324
|
+
</span>
|
|
325
|
+
</div>
|
|
326
|
+
</div>
|
|
327
|
+
</span>
|
|
328
|
+
</span>
|
|
329
|
+
</span>
|
|
330
|
+
</div>
|
|
331
|
+
</DocumentFragment>
|
|
332
|
+
`;
|
|
333
|
+
|
|
334
|
+
exports[`Bumper/Data Displays/Avatar/Features Shapes 1`] = `
|
|
335
|
+
<DocumentFragment>
|
|
336
|
+
<div
|
|
337
|
+
class="css-view-g5y9jx r-flex-13awgt0"
|
|
338
|
+
>
|
|
339
|
+
<span
|
|
340
|
+
class=""
|
|
341
|
+
style="display: contents;"
|
|
342
|
+
>
|
|
343
|
+
<span
|
|
344
|
+
class=" "
|
|
345
|
+
style="display: contents;"
|
|
346
|
+
>
|
|
347
|
+
<span
|
|
348
|
+
class=" t_light is_Theme"
|
|
349
|
+
style="display: contents;"
|
|
350
|
+
>
|
|
351
|
+
<div
|
|
352
|
+
class="is_HStack _dsp-flex _fb-auto _bxs-border-box _pos-relative _minHeight-0px _minWidth-0px _flexShrink-0 _fd-row _gap-t-space-spa1366020313 _alignItems-center"
|
|
353
|
+
>
|
|
354
|
+
<div
|
|
355
|
+
class="is_Avatar _dsp-flex _fd-column _fb-auto _bxs-border-box _pos-relative _minHeight-0px _minWidth-0px _flexShrink-0 _justifyContent-center _alignItems-center _ox-hidden _oy-hidden _backgroundColor-avatar--bg _width-48px _height-48px _btlr-t-radius-ra1673638410 _btrr-t-radius-ra1673638410 _bbrr-t-radius-ra1673638410 _bblr-t-radius-ra1673638410"
|
|
356
|
+
data-disable-theme="true"
|
|
357
|
+
firstname="John"
|
|
358
|
+
lastname="Doe"
|
|
359
|
+
>
|
|
360
|
+
<span
|
|
361
|
+
class="font_GTStandard _WebkitFontSmoothing-_platformweb_antialiased _dsp-inline _bxs-border-box _ww-break-word _ws-pre-wrap _marginTop-0px _marginRight-0px _marginBottom-0px _marginLeft-0px _ff-f-family _fs-f-size-labe105291 _lh-f-lineHeigh1842530170 _ls-f-letterSpa379059035 _fw-f-weight-se1074390495 _col-content--ac3049896 _textAlign-left"
|
|
362
|
+
>
|
|
363
|
+
JD
|
|
364
|
+
</span>
|
|
365
|
+
</div>
|
|
366
|
+
<div
|
|
367
|
+
class="is_Avatar _dsp-flex _fd-column _fb-auto _bxs-border-box _pos-relative _minHeight-0px _minWidth-0px _flexShrink-0 _justifyContent-center _alignItems-center _ox-hidden _oy-hidden _backgroundColor-avatar--bg _width-48px _height-48px _btlr-t-radius-ra1854241453 _btrr-t-radius-ra1854241453 _bbrr-t-radius-ra1854241453 _bblr-t-radius-ra1854241453"
|
|
368
|
+
data-disable-theme="true"
|
|
369
|
+
firstname="John"
|
|
370
|
+
lastname="Doe"
|
|
371
|
+
>
|
|
372
|
+
<span
|
|
373
|
+
class="font_GTStandard _WebkitFontSmoothing-_platformweb_antialiased _dsp-inline _bxs-border-box _ww-break-word _ws-pre-wrap _marginTop-0px _marginRight-0px _marginBottom-0px _marginLeft-0px _ff-f-family _fs-f-size-labe105291 _lh-f-lineHeigh1842530170 _ls-f-letterSpa379059035 _fw-f-weight-se1074390495 _col-content--ac3049896 _textAlign-left"
|
|
374
|
+
>
|
|
375
|
+
JD
|
|
376
|
+
</span>
|
|
377
|
+
</div>
|
|
378
|
+
</div>
|
|
379
|
+
</span>
|
|
380
|
+
</span>
|
|
381
|
+
</span>
|
|
382
|
+
</div>
|
|
383
|
+
</DocumentFragment>
|
|
384
|
+
`;
|
|
385
|
+
|
|
386
|
+
exports[`Bumper/Data Displays/Avatar/Features Sizes 1`] = `
|
|
387
|
+
<DocumentFragment>
|
|
388
|
+
<div
|
|
389
|
+
class="css-view-g5y9jx r-flex-13awgt0"
|
|
390
|
+
>
|
|
391
|
+
<span
|
|
392
|
+
class=""
|
|
393
|
+
style="display: contents;"
|
|
394
|
+
>
|
|
395
|
+
<span
|
|
396
|
+
class=" "
|
|
397
|
+
style="display: contents;"
|
|
398
|
+
>
|
|
399
|
+
<span
|
|
400
|
+
class=" t_light is_Theme"
|
|
401
|
+
style="display: contents;"
|
|
402
|
+
>
|
|
403
|
+
<div
|
|
404
|
+
class="is_HStack _dsp-flex _fb-auto _bxs-border-box _pos-relative _minHeight-0px _minWidth-0px _flexShrink-0 _fd-row _gap-t-space-spa1366020313 _alignItems-center"
|
|
405
|
+
>
|
|
406
|
+
<div
|
|
407
|
+
class="is_Avatar _dsp-flex _fd-column _fb-auto _bxs-border-box _pos-relative _minHeight-0px _minWidth-0px _flexShrink-0 _justifyContent-center _alignItems-center _ox-hidden _oy-hidden _backgroundColor-avatar--bg _width-32px _height-32px _btlr-t-radius-ra1673638410 _btrr-t-radius-ra1673638410 _bbrr-t-radius-ra1673638410 _bblr-t-radius-ra1673638410"
|
|
408
|
+
data-disable-theme="true"
|
|
409
|
+
firstname="John"
|
|
410
|
+
lastname="Doe"
|
|
411
|
+
>
|
|
412
|
+
<span
|
|
413
|
+
class="font_GTStandard _WebkitFontSmoothing-_platformweb_antialiased _dsp-inline _bxs-border-box _ww-break-word _ws-pre-wrap _marginTop-0px _marginRight-0px _marginBottom-0px _marginLeft-0px _ff-f-family _fs-f-size-labe105292 _lh-f-lineHeigh1842530171 _ls-f-letterSpa379059034 _fw-f-weight-se1074390495 _col-content--ac3049896 _textAlign-left"
|
|
414
|
+
>
|
|
415
|
+
JD
|
|
416
|
+
</span>
|
|
417
|
+
</div>
|
|
418
|
+
<div
|
|
419
|
+
class="is_Avatar _dsp-flex _fd-column _fb-auto _bxs-border-box _pos-relative _minHeight-0px _minWidth-0px _flexShrink-0 _justifyContent-center _alignItems-center _ox-hidden _oy-hidden _backgroundColor-avatar--bg _width-40px _height-40px _btlr-t-radius-ra1673638410 _btrr-t-radius-ra1673638410 _bbrr-t-radius-ra1673638410 _bblr-t-radius-ra1673638410"
|
|
420
|
+
data-disable-theme="true"
|
|
421
|
+
firstname="John"
|
|
422
|
+
lastname="Doe"
|
|
423
|
+
>
|
|
424
|
+
<span
|
|
425
|
+
class="font_GTStandard _WebkitFontSmoothing-_platformweb_antialiased _dsp-inline _bxs-border-box _ww-break-word _ws-pre-wrap _marginTop-0px _marginRight-0px _marginBottom-0px _marginLeft-0px _ff-f-family _fs-f-size-labe105291 _lh-f-lineHeigh1842530170 _ls-f-letterSpa379059035 _fw-f-weight-se1074390495 _col-content--ac3049896 _textAlign-left"
|
|
426
|
+
>
|
|
427
|
+
JD
|
|
428
|
+
</span>
|
|
429
|
+
</div>
|
|
430
|
+
<div
|
|
431
|
+
class="is_Avatar _dsp-flex _fd-column _fb-auto _bxs-border-box _pos-relative _minHeight-0px _minWidth-0px _flexShrink-0 _justifyContent-center _alignItems-center _ox-hidden _oy-hidden _backgroundColor-avatar--bg _width-48px _height-48px _btlr-t-radius-ra1673638410 _btrr-t-radius-ra1673638410 _bbrr-t-radius-ra1673638410 _bblr-t-radius-ra1673638410"
|
|
432
|
+
data-disable-theme="true"
|
|
433
|
+
firstname="John"
|
|
434
|
+
lastname="Doe"
|
|
435
|
+
>
|
|
436
|
+
<span
|
|
437
|
+
class="font_GTStandard _WebkitFontSmoothing-_platformweb_antialiased _dsp-inline _bxs-border-box _ww-break-word _ws-pre-wrap _marginTop-0px _marginRight-0px _marginBottom-0px _marginLeft-0px _ff-f-family _fs-f-size-labe105291 _lh-f-lineHeigh1842530170 _ls-f-letterSpa379059035 _fw-f-weight-se1074390495 _col-content--ac3049896 _textAlign-left"
|
|
438
|
+
>
|
|
439
|
+
JD
|
|
440
|
+
</span>
|
|
441
|
+
</div>
|
|
442
|
+
<div
|
|
443
|
+
class="is_Avatar _dsp-flex _fd-column _fb-auto _bxs-border-box _pos-relative _minHeight-0px _minWidth-0px _flexShrink-0 _justifyContent-center _alignItems-center _ox-hidden _oy-hidden _backgroundColor-avatar--bg _width-64px _height-64px _btlr-t-radius-ra1673638410 _btrr-t-radius-ra1673638410 _bbrr-t-radius-ra1673638410 _bblr-t-radius-ra1673638410"
|
|
444
|
+
data-disable-theme="true"
|
|
445
|
+
firstname="John"
|
|
446
|
+
lastname="Doe"
|
|
447
|
+
>
|
|
448
|
+
<span
|
|
449
|
+
class="font_GTStandard _WebkitFontSmoothing-_platformweb_antialiased _dsp-inline _bxs-border-box _ww-break-word _ws-pre-wrap _marginTop-0px _marginRight-0px _marginBottom-0px _marginLeft-0px _ff-f-family _fs-f-size-labe105291 _lh-f-lineHeigh1842530170 _ls-f-letterSpa379059035 _fw-f-weight-se1074390495 _col-content--ac3049896 _textAlign-left"
|
|
450
|
+
>
|
|
451
|
+
JD
|
|
452
|
+
</span>
|
|
453
|
+
</div>
|
|
454
|
+
</div>
|
|
455
|
+
</span>
|
|
456
|
+
</span>
|
|
457
|
+
</span>
|
|
458
|
+
</div>
|
|
459
|
+
</DocumentFragment>
|
|
460
|
+
`;
|
|
461
|
+
|
|
462
|
+
exports[`Bumper/Data Displays/Avatar/Features WithImage 1`] = `
|
|
463
|
+
<DocumentFragment>
|
|
464
|
+
<div
|
|
465
|
+
class="css-view-g5y9jx r-flex-13awgt0"
|
|
466
|
+
>
|
|
467
|
+
<span
|
|
468
|
+
class=""
|
|
469
|
+
style="display: contents;"
|
|
470
|
+
>
|
|
471
|
+
<span
|
|
472
|
+
class=" "
|
|
473
|
+
style="display: contents;"
|
|
474
|
+
>
|
|
475
|
+
<span
|
|
476
|
+
class=" t_light is_Theme"
|
|
477
|
+
style="display: contents;"
|
|
478
|
+
>
|
|
479
|
+
<div
|
|
480
|
+
class="is_Avatar _dsp-flex _fd-column _fb-auto _bxs-border-box _pos-relative _minHeight-0px _minWidth-0px _flexShrink-0 _justifyContent-center _alignItems-center _ox-hidden _oy-hidden _backgroundColor-avatar--bg _width-48px _height-48px _btlr-t-radius-ra1673638410 _btrr-t-radius-ra1673638410 _bbrr-t-radius-ra1673638410 _bblr-t-radius-ra1673638410"
|
|
481
|
+
data-disable-theme="true"
|
|
482
|
+
src="https://i.pravatar.cc/150?img=5"
|
|
483
|
+
>
|
|
484
|
+
<span
|
|
485
|
+
class="_dsp_contents"
|
|
486
|
+
>
|
|
487
|
+
<div
|
|
488
|
+
class="css-view-g5y9jx r-flexBasis-1mlwlqe r-overflow-1udh08x r-zIndex-417010 is_Image "
|
|
489
|
+
style="height: 100%; width: 100%;"
|
|
490
|
+
>
|
|
491
|
+
<div
|
|
492
|
+
class="css-view-g5y9jx r-backgroundColor-1niwhzg r-backgroundPosition-vvn4in r-backgroundRepeat-u6sd8q r-bottom-1p0dtai r-height-1pi2tsx r-left-1d2f490 r-position-u8s1d r-right-zchlnj r-top-ipm5af r-width-13qz1uu r-zIndex-1wyyakw r-backgroundSize-4gszlv"
|
|
493
|
+
style="background-image: url("https://i.pravatar.cc/150?img=5");"
|
|
494
|
+
/>
|
|
495
|
+
<img
|
|
496
|
+
alt=""
|
|
497
|
+
class="css-accessibilityImage-9pa8cd"
|
|
498
|
+
draggable="false"
|
|
499
|
+
src="https://i.pravatar.cc/150?img=5"
|
|
500
|
+
/>
|
|
501
|
+
</div>
|
|
502
|
+
</span>
|
|
503
|
+
</div>
|
|
504
|
+
</span>
|
|
505
|
+
</span>
|
|
506
|
+
</span>
|
|
507
|
+
</div>
|
|
508
|
+
</DocumentFragment>
|
|
509
|
+
`;
|
|
510
|
+
|
|
511
|
+
exports[`Bumper/Data Displays/Avatar/Features WithInitials 1`] = `
|
|
512
|
+
<DocumentFragment>
|
|
513
|
+
<div
|
|
514
|
+
class="css-view-g5y9jx r-flex-13awgt0"
|
|
515
|
+
>
|
|
516
|
+
<span
|
|
517
|
+
class=""
|
|
518
|
+
style="display: contents;"
|
|
519
|
+
>
|
|
520
|
+
<span
|
|
521
|
+
class=" "
|
|
522
|
+
style="display: contents;"
|
|
523
|
+
>
|
|
524
|
+
<span
|
|
525
|
+
class=" t_light is_Theme"
|
|
526
|
+
style="display: contents;"
|
|
527
|
+
>
|
|
528
|
+
<div
|
|
529
|
+
class="is_Avatar _dsp-flex _fd-column _fb-auto _bxs-border-box _pos-relative _minHeight-0px _minWidth-0px _flexShrink-0 _justifyContent-center _alignItems-center _ox-hidden _oy-hidden _backgroundColor-avatar--bg _width-48px _height-48px _btlr-t-radius-ra1673638410 _btrr-t-radius-ra1673638410 _bbrr-t-radius-ra1673638410 _bblr-t-radius-ra1673638410"
|
|
530
|
+
data-disable-theme="true"
|
|
531
|
+
firstname="John"
|
|
532
|
+
lastname="Doe"
|
|
533
|
+
>
|
|
534
|
+
<span
|
|
535
|
+
class="font_GTStandard _WebkitFontSmoothing-_platformweb_antialiased _dsp-inline _bxs-border-box _ww-break-word _ws-pre-wrap _marginTop-0px _marginRight-0px _marginBottom-0px _marginLeft-0px _ff-f-family _fs-f-size-labe105291 _lh-f-lineHeigh1842530170 _ls-f-letterSpa379059035 _fw-f-weight-se1074390495 _col-content--ac3049896 _textAlign-left"
|
|
536
|
+
>
|
|
537
|
+
JD
|
|
538
|
+
</span>
|
|
539
|
+
</div>
|
|
540
|
+
</span>
|
|
541
|
+
</span>
|
|
542
|
+
</span>
|
|
543
|
+
</div>
|
|
544
|
+
</DocumentFragment>
|
|
545
|
+
`;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
|
|
2
|
+
|
|
3
|
+
exports[`Bumper/Data Displays/Avatar Default 1`] = `
|
|
4
|
+
<DocumentFragment>
|
|
5
|
+
<div
|
|
6
|
+
class="css-view-g5y9jx r-flex-13awgt0"
|
|
7
|
+
>
|
|
8
|
+
<span
|
|
9
|
+
class=""
|
|
10
|
+
style="display: contents;"
|
|
11
|
+
>
|
|
12
|
+
<span
|
|
13
|
+
class=" "
|
|
14
|
+
style="display: contents;"
|
|
15
|
+
>
|
|
16
|
+
<span
|
|
17
|
+
class=" t_light is_Theme"
|
|
18
|
+
style="display: contents;"
|
|
19
|
+
>
|
|
20
|
+
<div
|
|
21
|
+
class="is_Avatar _dsp-flex _fd-column _fb-auto _bxs-border-box _pos-relative _minHeight-0px _minWidth-0px _flexShrink-0 _justifyContent-center _alignItems-center _ox-hidden _oy-hidden _backgroundColor-avatar--bg _width-48px _height-48px _btlr-t-radius-ra1673638410 _btrr-t-radius-ra1673638410 _bbrr-t-radius-ra1673638410 _bblr-t-radius-ra1673638410"
|
|
22
|
+
data-disable-theme="true"
|
|
23
|
+
firstname="John"
|
|
24
|
+
lastname="Doe"
|
|
25
|
+
>
|
|
26
|
+
<span
|
|
27
|
+
class="font_GTStandard _WebkitFontSmoothing-_platformweb_antialiased _dsp-inline _bxs-border-box _ww-break-word _ws-pre-wrap _marginTop-0px _marginRight-0px _marginBottom-0px _marginLeft-0px _ff-f-family _fs-f-size-labe105291 _lh-f-lineHeigh1842530170 _ls-f-letterSpa379059035 _fw-f-weight-se1074390495 _col-content--ac3049896 _textAlign-left"
|
|
28
|
+
>
|
|
29
|
+
JD
|
|
30
|
+
</span>
|
|
31
|
+
</div>
|
|
32
|
+
</span>
|
|
33
|
+
</span>
|
|
34
|
+
</span>
|
|
35
|
+
</div>
|
|
36
|
+
</DocumentFragment>
|
|
37
|
+
`;
|
|
Binary file
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { styled } from '@tamagui/core';
|
|
2
|
+
import type { ReactNode } from 'react';
|
|
3
|
+
import { Image } from '../../../core/primitives/Image/Image';
|
|
4
|
+
import { View } from '../../../core/primitives/View';
|
|
5
|
+
import type { AvatarProps } from '../Avatar';
|
|
6
|
+
import { context } from '../context';
|
|
7
|
+
|
|
8
|
+
export type AvatarImageProps = Required<Pick<AvatarProps, 'src'>>;
|
|
9
|
+
|
|
10
|
+
const StyledAvatarImage = styled(Image, {
|
|
11
|
+
width: '100%',
|
|
12
|
+
height: '100%',
|
|
13
|
+
objectFit: 'contain',
|
|
14
|
+
alt: '',
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
const DisabledOverlay = styled(View, {
|
|
18
|
+
position: 'absolute',
|
|
19
|
+
width: '100%',
|
|
20
|
+
height: '100%',
|
|
21
|
+
backgroundColor: '$bg.base.mid.default',
|
|
22
|
+
opacity: 0.5,
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
export function AvatarImage({ src }: AvatarImageProps): ReactNode {
|
|
26
|
+
const { disabled } = context.useStyledContext();
|
|
27
|
+
|
|
28
|
+
return (
|
|
29
|
+
<>
|
|
30
|
+
<StyledAvatarImage src={src} />
|
|
31
|
+
{disabled ? <DisabledOverlay /> : null}
|
|
32
|
+
</>
|
|
33
|
+
);
|
|
34
|
+
}
|