@atom-learning/components 2.12.2 → 2.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 +3 -3
- package/dist/components/avatar/Avatar.d.ts +565 -0
- package/dist/components/avatar/Avatar.js +1 -0
- package/dist/components/avatar/AvatarIcon.d.ts +7 -0
- package/dist/components/avatar/AvatarIcon.js +1 -0
- package/dist/components/avatar/AvatarImage.d.ts +7 -0
- package/dist/components/avatar/AvatarImage.js +1 -0
- package/dist/components/avatar/AvatarInitial.d.ts +2 -0
- package/dist/components/avatar/AvatarInitial.js +1 -0
- package/dist/components/avatar/AvatarPlaceholder.d.ts +2 -0
- package/dist/components/avatar/AvatarPlaceholder.js +1 -0
- package/dist/components/avatar/index.d.ts +1 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/link/Link.js +1 -1
- package/dist/docgen.json +1 -1
- package/dist/docs/Avatar.mdx +129 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
# [2.14.0](https://github.com/Atom-Learning/components/compare/v2.13.0...v2.14.0) (2022-11-11)
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
###
|
|
4
|
+
### Features
|
|
5
5
|
|
|
6
|
-
*
|
|
6
|
+
* replace span element in link buttons with noCapsize ([5b5ff70](https://github.com/Atom-Learning/components/commit/5b5ff70b5e1e3d13287ea65610a8d41dfc90752f))
|
|
7
7
|
|
|
8
8
|
# [1.4.0](https://github.com/Atom-Learning/components/compare/v1.3.0...v1.4.0) (2022-04-11)
|
|
9
9
|
|
|
@@ -0,0 +1,565 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { AvatarPlaceholder } from './AvatarPlaceholder';
|
|
3
|
+
import { AvatarIcon } from './AvatarIcon';
|
|
4
|
+
import { AvatarInitial } from './AvatarInitial';
|
|
5
|
+
import { AvatarImage } from './AvatarImage';
|
|
6
|
+
declare const StyledDiv: import("@stitches/react/types/styled-component").StyledComponent<"div", {
|
|
7
|
+
size?: "sm" | "md" | "lg" | "xl" | "xs" | "xxl" | undefined;
|
|
8
|
+
}, {
|
|
9
|
+
sm: string;
|
|
10
|
+
md: string;
|
|
11
|
+
lg: string;
|
|
12
|
+
xl: string;
|
|
13
|
+
reducedMotion: string;
|
|
14
|
+
allowMotion: string;
|
|
15
|
+
hover: string;
|
|
16
|
+
}, import("@stitches/react/types/css-util").CSS<{
|
|
17
|
+
sm: string;
|
|
18
|
+
md: string;
|
|
19
|
+
lg: string;
|
|
20
|
+
xl: string;
|
|
21
|
+
reducedMotion: string;
|
|
22
|
+
allowMotion: string;
|
|
23
|
+
hover: string;
|
|
24
|
+
}, {
|
|
25
|
+
colors: {
|
|
26
|
+
textForeground: any;
|
|
27
|
+
textSubtle: any;
|
|
28
|
+
textPlaceholder: any;
|
|
29
|
+
background: any;
|
|
30
|
+
backgroundAccent: any;
|
|
31
|
+
tonal50: any;
|
|
32
|
+
tonal100: any;
|
|
33
|
+
tonal200: any;
|
|
34
|
+
tonal300: any;
|
|
35
|
+
tonal400: any;
|
|
36
|
+
tonal500: any;
|
|
37
|
+
tonal600: any;
|
|
38
|
+
alpha100: any;
|
|
39
|
+
alpha150: any;
|
|
40
|
+
alpha200: any;
|
|
41
|
+
alpha250: any;
|
|
42
|
+
alpha600: any;
|
|
43
|
+
primaryLight: any;
|
|
44
|
+
primary: any;
|
|
45
|
+
primaryMid: any;
|
|
46
|
+
primaryDark: any;
|
|
47
|
+
secondary: any;
|
|
48
|
+
brandRed: any;
|
|
49
|
+
brandRedAccent: any;
|
|
50
|
+
brandGreen: any;
|
|
51
|
+
brandGreenAccent: any;
|
|
52
|
+
brandPurple: any;
|
|
53
|
+
brandPurpleAccent: any;
|
|
54
|
+
brandYellow: any;
|
|
55
|
+
brandYellowAccent: any;
|
|
56
|
+
successLight: any;
|
|
57
|
+
success: any;
|
|
58
|
+
successMid: any;
|
|
59
|
+
successDark: any;
|
|
60
|
+
dangerLight: any;
|
|
61
|
+
danger: any;
|
|
62
|
+
dangerMid: any;
|
|
63
|
+
dangerDark: any;
|
|
64
|
+
warningLight: any;
|
|
65
|
+
warning: any;
|
|
66
|
+
warningMid: any;
|
|
67
|
+
warningDark: any;
|
|
68
|
+
warningText: any;
|
|
69
|
+
subjectEnglish: any;
|
|
70
|
+
subjectMaths: any;
|
|
71
|
+
subjectScience: any;
|
|
72
|
+
subjectVerbalReasoning: any;
|
|
73
|
+
subjectNonVerbalReasoning: any;
|
|
74
|
+
subjectCreativeWriting: any;
|
|
75
|
+
subjectExamSkills: any;
|
|
76
|
+
};
|
|
77
|
+
space: {
|
|
78
|
+
"0": any;
|
|
79
|
+
"1": any;
|
|
80
|
+
"2": any;
|
|
81
|
+
"3": any;
|
|
82
|
+
"4": any;
|
|
83
|
+
"5": any;
|
|
84
|
+
"6": any;
|
|
85
|
+
"7": any;
|
|
86
|
+
"8": any;
|
|
87
|
+
"9": any;
|
|
88
|
+
};
|
|
89
|
+
fontSizes: {
|
|
90
|
+
xs: any;
|
|
91
|
+
sm: any;
|
|
92
|
+
md: any;
|
|
93
|
+
lg: any;
|
|
94
|
+
xl: any;
|
|
95
|
+
"2xl": any;
|
|
96
|
+
"3xl": any;
|
|
97
|
+
"4xl": any;
|
|
98
|
+
};
|
|
99
|
+
fonts: {
|
|
100
|
+
sans: any;
|
|
101
|
+
mono: any;
|
|
102
|
+
display: any;
|
|
103
|
+
body: any;
|
|
104
|
+
};
|
|
105
|
+
sizes: {
|
|
106
|
+
"0": any;
|
|
107
|
+
"1": any;
|
|
108
|
+
"2": any;
|
|
109
|
+
"3": any;
|
|
110
|
+
"4": any;
|
|
111
|
+
"5": any;
|
|
112
|
+
"6": any;
|
|
113
|
+
"7": any;
|
|
114
|
+
"8": any;
|
|
115
|
+
};
|
|
116
|
+
radii: {
|
|
117
|
+
"0": any;
|
|
118
|
+
"1": any;
|
|
119
|
+
"2": any;
|
|
120
|
+
"3": any;
|
|
121
|
+
round: any;
|
|
122
|
+
};
|
|
123
|
+
shadows: {
|
|
124
|
+
"0": any;
|
|
125
|
+
"1": any;
|
|
126
|
+
"2": any;
|
|
127
|
+
"3": any;
|
|
128
|
+
};
|
|
129
|
+
}, import("@stitches/react/types/config").DefaultThemeMap, {
|
|
130
|
+
bg: (value: {
|
|
131
|
+
readonly [$$PropertyValue]: "background";
|
|
132
|
+
}) => {
|
|
133
|
+
background: {
|
|
134
|
+
readonly [$$PropertyValue]: "background";
|
|
135
|
+
};
|
|
136
|
+
};
|
|
137
|
+
inset: (value: string | number | {
|
|
138
|
+
readonly [$$ScaleValue]: "space";
|
|
139
|
+
}) => {
|
|
140
|
+
top: string | number | {
|
|
141
|
+
readonly [$$ScaleValue]: "space";
|
|
142
|
+
};
|
|
143
|
+
right: string | number | {
|
|
144
|
+
readonly [$$ScaleValue]: "space";
|
|
145
|
+
};
|
|
146
|
+
bottom: string | number | {
|
|
147
|
+
readonly [$$ScaleValue]: "space";
|
|
148
|
+
};
|
|
149
|
+
left: string | number | {
|
|
150
|
+
readonly [$$ScaleValue]: "space";
|
|
151
|
+
};
|
|
152
|
+
};
|
|
153
|
+
size: (value: string | number | {
|
|
154
|
+
readonly [$$ScaleValue]: "size";
|
|
155
|
+
}) => {
|
|
156
|
+
height: string | number | {
|
|
157
|
+
readonly [$$ScaleValue]: "size";
|
|
158
|
+
};
|
|
159
|
+
width: string | number | {
|
|
160
|
+
readonly [$$ScaleValue]: "size";
|
|
161
|
+
};
|
|
162
|
+
};
|
|
163
|
+
p: (value: string | number | {
|
|
164
|
+
readonly [$$ScaleValue]: "space";
|
|
165
|
+
}) => {
|
|
166
|
+
padding: string | number | {
|
|
167
|
+
readonly [$$ScaleValue]: "space";
|
|
168
|
+
};
|
|
169
|
+
};
|
|
170
|
+
pt: (value: string | number | {
|
|
171
|
+
readonly [$$ScaleValue]: "space";
|
|
172
|
+
}) => {
|
|
173
|
+
paddingTop: string | number | {
|
|
174
|
+
readonly [$$ScaleValue]: "space";
|
|
175
|
+
};
|
|
176
|
+
};
|
|
177
|
+
pr: (value: string | number | {
|
|
178
|
+
readonly [$$ScaleValue]: "space";
|
|
179
|
+
}) => {
|
|
180
|
+
paddingRight: string | number | {
|
|
181
|
+
readonly [$$ScaleValue]: "space";
|
|
182
|
+
};
|
|
183
|
+
};
|
|
184
|
+
pb: (value: string | number | {
|
|
185
|
+
readonly [$$ScaleValue]: "space";
|
|
186
|
+
}) => {
|
|
187
|
+
paddingBottom: string | number | {
|
|
188
|
+
readonly [$$ScaleValue]: "space";
|
|
189
|
+
};
|
|
190
|
+
};
|
|
191
|
+
pl: (value: string | number | {
|
|
192
|
+
readonly [$$ScaleValue]: "space";
|
|
193
|
+
}) => {
|
|
194
|
+
paddingLeft: string | number | {
|
|
195
|
+
readonly [$$ScaleValue]: "space";
|
|
196
|
+
};
|
|
197
|
+
};
|
|
198
|
+
px: (value: string | number | {
|
|
199
|
+
readonly [$$ScaleValue]: "space";
|
|
200
|
+
}) => {
|
|
201
|
+
paddingLeft: string | number | {
|
|
202
|
+
readonly [$$ScaleValue]: "space";
|
|
203
|
+
};
|
|
204
|
+
paddingRight: string | number | {
|
|
205
|
+
readonly [$$ScaleValue]: "space";
|
|
206
|
+
};
|
|
207
|
+
};
|
|
208
|
+
py: (value: string | number | {
|
|
209
|
+
readonly [$$ScaleValue]: "space";
|
|
210
|
+
}) => {
|
|
211
|
+
paddingTop: string | number | {
|
|
212
|
+
readonly [$$ScaleValue]: "space";
|
|
213
|
+
};
|
|
214
|
+
paddingBottom: string | number | {
|
|
215
|
+
readonly [$$ScaleValue]: "space";
|
|
216
|
+
};
|
|
217
|
+
};
|
|
218
|
+
m: (value: string | number | {
|
|
219
|
+
readonly [$$ScaleValue]: "space";
|
|
220
|
+
}) => {
|
|
221
|
+
margin: string | number | {
|
|
222
|
+
readonly [$$ScaleValue]: "space";
|
|
223
|
+
};
|
|
224
|
+
};
|
|
225
|
+
mt: (value: string | number | {
|
|
226
|
+
readonly [$$ScaleValue]: "space";
|
|
227
|
+
}) => {
|
|
228
|
+
marginTop: string | number | {
|
|
229
|
+
readonly [$$ScaleValue]: "space";
|
|
230
|
+
};
|
|
231
|
+
};
|
|
232
|
+
mr: (value: string | number | {
|
|
233
|
+
readonly [$$ScaleValue]: "space";
|
|
234
|
+
}) => {
|
|
235
|
+
marginRight: string | number | {
|
|
236
|
+
readonly [$$ScaleValue]: "space";
|
|
237
|
+
};
|
|
238
|
+
};
|
|
239
|
+
mb: (value: string | number | {
|
|
240
|
+
readonly [$$ScaleValue]: "space";
|
|
241
|
+
}) => {
|
|
242
|
+
marginBottom: string | number | {
|
|
243
|
+
readonly [$$ScaleValue]: "space";
|
|
244
|
+
};
|
|
245
|
+
};
|
|
246
|
+
ml: (value: string | number | {
|
|
247
|
+
readonly [$$ScaleValue]: "space";
|
|
248
|
+
}) => {
|
|
249
|
+
marginLeft: string | number | {
|
|
250
|
+
readonly [$$ScaleValue]: "space";
|
|
251
|
+
};
|
|
252
|
+
};
|
|
253
|
+
mx: (value: string | number | {
|
|
254
|
+
readonly [$$ScaleValue]: "space";
|
|
255
|
+
}) => {
|
|
256
|
+
marginLeft: string | number | {
|
|
257
|
+
readonly [$$ScaleValue]: "space";
|
|
258
|
+
};
|
|
259
|
+
marginRight: string | number | {
|
|
260
|
+
readonly [$$ScaleValue]: "space";
|
|
261
|
+
};
|
|
262
|
+
};
|
|
263
|
+
my: (value: string | number | {
|
|
264
|
+
readonly [$$ScaleValue]: "space";
|
|
265
|
+
}) => {
|
|
266
|
+
marginTop: string | number | {
|
|
267
|
+
readonly [$$ScaleValue]: "space";
|
|
268
|
+
};
|
|
269
|
+
marginBottom: string | number | {
|
|
270
|
+
readonly [$$ScaleValue]: "space";
|
|
271
|
+
};
|
|
272
|
+
};
|
|
273
|
+
}>>;
|
|
274
|
+
declare const StyledButton: import("@stitches/react/types/styled-component").StyledComponent<"button", {
|
|
275
|
+
size?: "sm" | "md" | "lg" | "xl" | "xs" | "xxl" | undefined;
|
|
276
|
+
}, {
|
|
277
|
+
sm: string;
|
|
278
|
+
md: string;
|
|
279
|
+
lg: string;
|
|
280
|
+
xl: string;
|
|
281
|
+
reducedMotion: string;
|
|
282
|
+
allowMotion: string;
|
|
283
|
+
hover: string;
|
|
284
|
+
}, import("@stitches/react/types/css-util").CSS<{
|
|
285
|
+
sm: string;
|
|
286
|
+
md: string;
|
|
287
|
+
lg: string;
|
|
288
|
+
xl: string;
|
|
289
|
+
reducedMotion: string;
|
|
290
|
+
allowMotion: string;
|
|
291
|
+
hover: string;
|
|
292
|
+
}, {
|
|
293
|
+
colors: {
|
|
294
|
+
textForeground: any;
|
|
295
|
+
textSubtle: any;
|
|
296
|
+
textPlaceholder: any;
|
|
297
|
+
background: any;
|
|
298
|
+
backgroundAccent: any;
|
|
299
|
+
tonal50: any;
|
|
300
|
+
tonal100: any;
|
|
301
|
+
tonal200: any;
|
|
302
|
+
tonal300: any;
|
|
303
|
+
tonal400: any;
|
|
304
|
+
tonal500: any;
|
|
305
|
+
tonal600: any;
|
|
306
|
+
alpha100: any;
|
|
307
|
+
alpha150: any;
|
|
308
|
+
alpha200: any;
|
|
309
|
+
alpha250: any;
|
|
310
|
+
alpha600: any;
|
|
311
|
+
primaryLight: any;
|
|
312
|
+
primary: any;
|
|
313
|
+
primaryMid: any;
|
|
314
|
+
primaryDark: any;
|
|
315
|
+
secondary: any;
|
|
316
|
+
brandRed: any;
|
|
317
|
+
brandRedAccent: any;
|
|
318
|
+
brandGreen: any;
|
|
319
|
+
brandGreenAccent: any;
|
|
320
|
+
brandPurple: any;
|
|
321
|
+
brandPurpleAccent: any;
|
|
322
|
+
brandYellow: any;
|
|
323
|
+
brandYellowAccent: any;
|
|
324
|
+
successLight: any;
|
|
325
|
+
success: any;
|
|
326
|
+
successMid: any;
|
|
327
|
+
successDark: any;
|
|
328
|
+
dangerLight: any;
|
|
329
|
+
danger: any;
|
|
330
|
+
dangerMid: any;
|
|
331
|
+
dangerDark: any;
|
|
332
|
+
warningLight: any;
|
|
333
|
+
warning: any;
|
|
334
|
+
warningMid: any;
|
|
335
|
+
warningDark: any;
|
|
336
|
+
warningText: any;
|
|
337
|
+
subjectEnglish: any;
|
|
338
|
+
subjectMaths: any;
|
|
339
|
+
subjectScience: any;
|
|
340
|
+
subjectVerbalReasoning: any;
|
|
341
|
+
subjectNonVerbalReasoning: any;
|
|
342
|
+
subjectCreativeWriting: any;
|
|
343
|
+
subjectExamSkills: any;
|
|
344
|
+
};
|
|
345
|
+
space: {
|
|
346
|
+
"0": any;
|
|
347
|
+
"1": any;
|
|
348
|
+
"2": any;
|
|
349
|
+
"3": any;
|
|
350
|
+
"4": any;
|
|
351
|
+
"5": any;
|
|
352
|
+
"6": any;
|
|
353
|
+
"7": any;
|
|
354
|
+
"8": any;
|
|
355
|
+
"9": any;
|
|
356
|
+
};
|
|
357
|
+
fontSizes: {
|
|
358
|
+
xs: any;
|
|
359
|
+
sm: any;
|
|
360
|
+
md: any;
|
|
361
|
+
lg: any;
|
|
362
|
+
xl: any;
|
|
363
|
+
"2xl": any;
|
|
364
|
+
"3xl": any;
|
|
365
|
+
"4xl": any;
|
|
366
|
+
};
|
|
367
|
+
fonts: {
|
|
368
|
+
sans: any;
|
|
369
|
+
mono: any;
|
|
370
|
+
display: any;
|
|
371
|
+
body: any;
|
|
372
|
+
};
|
|
373
|
+
sizes: {
|
|
374
|
+
"0": any;
|
|
375
|
+
"1": any;
|
|
376
|
+
"2": any;
|
|
377
|
+
"3": any;
|
|
378
|
+
"4": any;
|
|
379
|
+
"5": any;
|
|
380
|
+
"6": any;
|
|
381
|
+
"7": any;
|
|
382
|
+
"8": any;
|
|
383
|
+
};
|
|
384
|
+
radii: {
|
|
385
|
+
"0": any;
|
|
386
|
+
"1": any;
|
|
387
|
+
"2": any;
|
|
388
|
+
"3": any;
|
|
389
|
+
round: any;
|
|
390
|
+
};
|
|
391
|
+
shadows: {
|
|
392
|
+
"0": any;
|
|
393
|
+
"1": any;
|
|
394
|
+
"2": any;
|
|
395
|
+
"3": any;
|
|
396
|
+
};
|
|
397
|
+
}, import("@stitches/react/types/config").DefaultThemeMap, {
|
|
398
|
+
bg: (value: {
|
|
399
|
+
readonly [$$PropertyValue]: "background";
|
|
400
|
+
}) => {
|
|
401
|
+
background: {
|
|
402
|
+
readonly [$$PropertyValue]: "background";
|
|
403
|
+
};
|
|
404
|
+
};
|
|
405
|
+
inset: (value: string | number | {
|
|
406
|
+
readonly [$$ScaleValue]: "space";
|
|
407
|
+
}) => {
|
|
408
|
+
top: string | number | {
|
|
409
|
+
readonly [$$ScaleValue]: "space";
|
|
410
|
+
};
|
|
411
|
+
right: string | number | {
|
|
412
|
+
readonly [$$ScaleValue]: "space";
|
|
413
|
+
};
|
|
414
|
+
bottom: string | number | {
|
|
415
|
+
readonly [$$ScaleValue]: "space";
|
|
416
|
+
};
|
|
417
|
+
left: string | number | {
|
|
418
|
+
readonly [$$ScaleValue]: "space";
|
|
419
|
+
};
|
|
420
|
+
};
|
|
421
|
+
size: (value: string | number | {
|
|
422
|
+
readonly [$$ScaleValue]: "size";
|
|
423
|
+
}) => {
|
|
424
|
+
height: string | number | {
|
|
425
|
+
readonly [$$ScaleValue]: "size";
|
|
426
|
+
};
|
|
427
|
+
width: string | number | {
|
|
428
|
+
readonly [$$ScaleValue]: "size";
|
|
429
|
+
};
|
|
430
|
+
};
|
|
431
|
+
p: (value: string | number | {
|
|
432
|
+
readonly [$$ScaleValue]: "space";
|
|
433
|
+
}) => {
|
|
434
|
+
padding: string | number | {
|
|
435
|
+
readonly [$$ScaleValue]: "space";
|
|
436
|
+
};
|
|
437
|
+
};
|
|
438
|
+
pt: (value: string | number | {
|
|
439
|
+
readonly [$$ScaleValue]: "space";
|
|
440
|
+
}) => {
|
|
441
|
+
paddingTop: string | number | {
|
|
442
|
+
readonly [$$ScaleValue]: "space";
|
|
443
|
+
};
|
|
444
|
+
};
|
|
445
|
+
pr: (value: string | number | {
|
|
446
|
+
readonly [$$ScaleValue]: "space";
|
|
447
|
+
}) => {
|
|
448
|
+
paddingRight: string | number | {
|
|
449
|
+
readonly [$$ScaleValue]: "space";
|
|
450
|
+
};
|
|
451
|
+
};
|
|
452
|
+
pb: (value: string | number | {
|
|
453
|
+
readonly [$$ScaleValue]: "space";
|
|
454
|
+
}) => {
|
|
455
|
+
paddingBottom: string | number | {
|
|
456
|
+
readonly [$$ScaleValue]: "space";
|
|
457
|
+
};
|
|
458
|
+
};
|
|
459
|
+
pl: (value: string | number | {
|
|
460
|
+
readonly [$$ScaleValue]: "space";
|
|
461
|
+
}) => {
|
|
462
|
+
paddingLeft: string | number | {
|
|
463
|
+
readonly [$$ScaleValue]: "space";
|
|
464
|
+
};
|
|
465
|
+
};
|
|
466
|
+
px: (value: string | number | {
|
|
467
|
+
readonly [$$ScaleValue]: "space";
|
|
468
|
+
}) => {
|
|
469
|
+
paddingLeft: string | number | {
|
|
470
|
+
readonly [$$ScaleValue]: "space";
|
|
471
|
+
};
|
|
472
|
+
paddingRight: string | number | {
|
|
473
|
+
readonly [$$ScaleValue]: "space";
|
|
474
|
+
};
|
|
475
|
+
};
|
|
476
|
+
py: (value: string | number | {
|
|
477
|
+
readonly [$$ScaleValue]: "space";
|
|
478
|
+
}) => {
|
|
479
|
+
paddingTop: string | number | {
|
|
480
|
+
readonly [$$ScaleValue]: "space";
|
|
481
|
+
};
|
|
482
|
+
paddingBottom: string | number | {
|
|
483
|
+
readonly [$$ScaleValue]: "space";
|
|
484
|
+
};
|
|
485
|
+
};
|
|
486
|
+
m: (value: string | number | {
|
|
487
|
+
readonly [$$ScaleValue]: "space";
|
|
488
|
+
}) => {
|
|
489
|
+
margin: string | number | {
|
|
490
|
+
readonly [$$ScaleValue]: "space";
|
|
491
|
+
};
|
|
492
|
+
};
|
|
493
|
+
mt: (value: string | number | {
|
|
494
|
+
readonly [$$ScaleValue]: "space";
|
|
495
|
+
}) => {
|
|
496
|
+
marginTop: string | number | {
|
|
497
|
+
readonly [$$ScaleValue]: "space";
|
|
498
|
+
};
|
|
499
|
+
};
|
|
500
|
+
mr: (value: string | number | {
|
|
501
|
+
readonly [$$ScaleValue]: "space";
|
|
502
|
+
}) => {
|
|
503
|
+
marginRight: string | number | {
|
|
504
|
+
readonly [$$ScaleValue]: "space";
|
|
505
|
+
};
|
|
506
|
+
};
|
|
507
|
+
mb: (value: string | number | {
|
|
508
|
+
readonly [$$ScaleValue]: "space";
|
|
509
|
+
}) => {
|
|
510
|
+
marginBottom: string | number | {
|
|
511
|
+
readonly [$$ScaleValue]: "space";
|
|
512
|
+
};
|
|
513
|
+
};
|
|
514
|
+
ml: (value: string | number | {
|
|
515
|
+
readonly [$$ScaleValue]: "space";
|
|
516
|
+
}) => {
|
|
517
|
+
marginLeft: string | number | {
|
|
518
|
+
readonly [$$ScaleValue]: "space";
|
|
519
|
+
};
|
|
520
|
+
};
|
|
521
|
+
mx: (value: string | number | {
|
|
522
|
+
readonly [$$ScaleValue]: "space";
|
|
523
|
+
}) => {
|
|
524
|
+
marginLeft: string | number | {
|
|
525
|
+
readonly [$$ScaleValue]: "space";
|
|
526
|
+
};
|
|
527
|
+
marginRight: string | number | {
|
|
528
|
+
readonly [$$ScaleValue]: "space";
|
|
529
|
+
};
|
|
530
|
+
};
|
|
531
|
+
my: (value: string | number | {
|
|
532
|
+
readonly [$$ScaleValue]: "space";
|
|
533
|
+
}) => {
|
|
534
|
+
marginTop: string | number | {
|
|
535
|
+
readonly [$$ScaleValue]: "space";
|
|
536
|
+
};
|
|
537
|
+
marginBottom: string | number | {
|
|
538
|
+
readonly [$$ScaleValue]: "space";
|
|
539
|
+
};
|
|
540
|
+
};
|
|
541
|
+
}>>;
|
|
542
|
+
declare type TAvatarProps = React.ComponentProps<typeof StyledDiv | typeof StyledButton> & {
|
|
543
|
+
name?: string;
|
|
544
|
+
} & ({
|
|
545
|
+
onClick: React.MouseEventHandler<HTMLButtonElement>;
|
|
546
|
+
disabled?: boolean;
|
|
547
|
+
} | {
|
|
548
|
+
onClick?: never;
|
|
549
|
+
disabled?: never;
|
|
550
|
+
});
|
|
551
|
+
export declare type TAvatarRootContext = {
|
|
552
|
+
name?: TAvatarProps['name'];
|
|
553
|
+
size: TAvatarProps['size'];
|
|
554
|
+
};
|
|
555
|
+
export declare const AvatarRootContext: React.Context<TAvatarRootContext>;
|
|
556
|
+
export declare const AvatarRootProvider: React.FC<TAvatarProps>;
|
|
557
|
+
export declare const AvatarRoot: React.FC<TAvatarProps>;
|
|
558
|
+
declare type TAvatar = typeof AvatarRoot & {
|
|
559
|
+
Image: typeof AvatarImage;
|
|
560
|
+
Initial: typeof AvatarInitial;
|
|
561
|
+
Placeholder: typeof AvatarPlaceholder;
|
|
562
|
+
Icon: typeof AvatarIcon;
|
|
563
|
+
};
|
|
564
|
+
export declare const Avatar: TAvatar;
|
|
565
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import*as o from"react";import{styled as n}from"../../stitches.js";import{AvatarPlaceholder as v}from"./AvatarPlaceholder.js";import{AvatarIcon as u}from"./AvatarIcon.js";import{AvatarInitial as b}from"./AvatarInitial.js";import{AvatarImage as p}from"./AvatarImage.js";import{focusVisibleStyleBlock as z}from"../../utilities/style/focus-visible-style-block.js";const s={display:"flex",justifyContent:"center",alignItems:"center",color:"$tonal400",borderRadius:"$round",border:"2px solid $tonal100",backgroundColor:"$white",overflow:"hidden",variants:{size:{xs:{size:"$2"},sm:{size:"$3"},md:{size:"$4"},lg:{size:"$5"},xl:{size:"$6"},xxl:{size:"$7"}}}},f=n("div",s),$=n("button",{all:"unset",...s,"&:not([disabled])":{"&:hover":{borderColor:"$tonal400",backgroundColor:"$tonal50"},"&:active":{borderColor:"$primary",backgroundColor:"$tonal100"},"&:focus-visible":z()},"&[disabled]":{opacity:"30%",cursor:"not-allowed"}}),d=o.createContext({name:void 0,size:"lg"}),m=({children:a,name:e,size:i})=>{const t=o.useMemo(()=>({name:e,size:i}),[e,i]);return o.createElement(d.Provider,{value:t},a)},c=({children:a,size:e="lg",name:i,disabled:t=!1,onClick:l})=>o.createElement(m,{name:i,size:e},l?o.createElement($,{size:e,disabled:t,onClick:t?void 0:l,css:{cursor:t?"auto":"pointer"}},a):o.createElement(f,{size:e},a)),r=c;r.Image=p,r.Initial=b,r.Placeholder=v,r.Icon=u,r.displayName="Avatar";export{r as Avatar,c as AvatarRoot,d as AvatarRootContext,m as AvatarRootProvider};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import*as t from"react";import{overrideStitchesVariantValue as i}from"../../utilities/override-stitches-variant-value/overrideStitchesVariantValue.js";import{Icon as a}from"../icon/Icon.js";import{AvatarRootContext as n}from"./Avatar.js";const c={xs:"sm",sm:"sm",md:"md",lg:"md",xl:"lg",xxl:"lg"},l=({is:e})=>{const r=t.useContext(n),{size:o}=r,m=t.useMemo(()=>i(o,s=>c[s]),[o]);return t.createElement(a,{size:m,is:e})};export{l as AvatarIcon};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import*as e from"react";import{styled as o}from"../../stitches.js";import{Image as a}from"../image/Image.js";import{AvatarInitial as m}from"./AvatarInitial.js";const i=o(a,{size:"100%",objectFit:"cover"}),c=({src:t,alt:r})=>t?e.createElement(i,{src:t,alt:r}):e.createElement(m,null);export{c as AvatarImage};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import*as t from"react";import{overrideStitchesVariantValue as a}from"../../utilities/override-stitches-variant-value/overrideStitchesVariantValue.js";import{Text as l}from"../text/Text.js";import{AvatarRootContext as n}from"./Avatar.js";import{AvatarPlaceholder as i}from"./AvatarPlaceholder.js";const c={xs:"xs",sm:"sm",md:"sm",lg:"md",xl:"md",xxl:"lg"},x=()=>{const r=t.useContext(n),{name:e,size:o}=r,m=t.useMemo(()=>a(o,s=>c[s]),[o]);return e?t.createElement(l,{size:m,css:{color:"$tonal400"}},e[0].toUpperCase()):t.createElement(i,null)};export{x as AvatarInitial};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import*as e from"react";import{User as o}from"@atom-learning/icons";import{Box as r}from"../box/Box.js";import{Icon as t}from"../icon/Icon.js";const s=()=>e.createElement(r,{css:{position:"relative",size:"100%"}},e.createElement(t,{is:o,css:{size:"100%"}}));export{s as AvatarPlaceholder};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Avatar } from './Avatar';
|
|
@@ -3,6 +3,7 @@ export { Accordion } from './accordion';
|
|
|
3
3
|
export { EmptyState } from './empty-state';
|
|
4
4
|
export { ActionIcon } from './action-icon';
|
|
5
5
|
export { AlertDialog, useAlert, AlertProvider } from './alert-dialog';
|
|
6
|
+
export { Avatar } from './avatar';
|
|
6
7
|
export { Badge } from './badge';
|
|
7
8
|
export { Box } from './box';
|
|
8
9
|
export { Button, StyledButton } from './button';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as e from"react";import{styled as
|
|
1
|
+
import*as e from"react";import{styled as f}from"../../stitches.js";import{StyledHeading as l}from"../heading/Heading.js";import{StyledLi as s}from"../list/List.js";import{StyledText as c,textVariants as d}from"../text/Text.js";const r=f("a",{bg:"unset",border:"unset",p:"unset",color:"$primary",cursor:"pointer",fontFamily:"$body",textDecoration:"none","&:focus, &:hover":{color:"$primaryMid",textDecoration:"underline"},"&:active":{color:"$primaryDark"},[`${c} > &, ${l} > &, ${s} > &`]:{fontSize:"100%",lineHeight:1,"&::before, &::after":{content:"none"}},variants:d}),a=e.forwardRef(({size:o="md",onClick:m,href:t,...i},n)=>t?e.createElement(r,{size:o,...i,ref:n,href:t}):e.createElement(r,{as:"button",size:o,noCapsize:!0,...i,ref:n,onClick:m}));a.displayName="Link";export{a as Link,r as StyledLink};
|