@dt-dds/react-avatar 1.0.0-beta.50

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 ADDED
@@ -0,0 +1,492 @@
1
+ # @dt-ui/react-avatar
2
+
3
+ ## 1.0.0-beta.50
4
+
5
+ ### Major Changes
6
+
7
+ - refactor!: rename pkg and publish to npmjs
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies
12
+ - @dt-dds/react-core@1.0.0-beta.41
13
+ - @dt-dds/react-tooltip@1.0.0-beta.49
14
+
15
+ ## 0.1.0-beta.49
16
+
17
+ ### Patch Changes
18
+
19
+ - refactor: theme typography values
20
+ - Updated dependencies
21
+ - @dt-ui/react-core@0.1.0-beta.40
22
+ - @dt-ui/react-tooltip@0.1.0-beta.48
23
+
24
+ ## 0.1.0-beta.48
25
+
26
+ ### Minor Changes
27
+
28
+ - feat: update shadow theme values
29
+
30
+ ### Patch Changes
31
+
32
+ - Updated dependencies
33
+ - @dt-ui/react-core@0.1.0-beta.39
34
+ - @dt-ui/react-tooltip@0.1.0-beta.47
35
+
36
+ ## 0.1.0-beta.47
37
+
38
+ ### Patch Changes
39
+
40
+ - chore: update theme font-styles
41
+ - Updated dependencies
42
+ - @dt-ui/react-core@0.1.0-beta.38
43
+ - @dt-ui/react-tooltip@0.1.0-beta.46
44
+
45
+ ## 0.1.0-beta.46
46
+
47
+ ### Patch Changes
48
+
49
+ - chore: review OSS files
50
+ - Updated dependencies
51
+ - @dt-ui/react-core@0.1.0-beta.37
52
+ - @dt-ui/react-tooltip@0.1.0-beta.45
53
+
54
+ ## 0.1.0-beta.45
55
+
56
+ ### Patch Changes
57
+
58
+ - chore: update contextual colors
59
+ - Updated dependencies
60
+ - @dt-ui/react-core@0.1.0-beta.36
61
+ - @dt-ui/react-tooltip@0.1.0-beta.44
62
+
63
+ ## 0.1.0-beta.44
64
+
65
+ ### Minor Changes
66
+
67
+ - feat: implement IconButton contrast and size
68
+
69
+ ### Patch Changes
70
+
71
+ - Updated dependencies
72
+ - @dt-ui/react-tooltip@0.1.0-beta.43
73
+
74
+ ## 0.1.0-beta.43
75
+
76
+ ### Patch Changes
77
+
78
+ - fix: circular dependencies
79
+ - Updated dependencies
80
+ - @dt-ui/react-tooltip@0.1.0-beta.42
81
+
82
+ ## 0.1.0-beta.42
83
+
84
+ ### Patch Changes
85
+
86
+ - fix: change content.light contextual color
87
+ - Updated dependencies
88
+ - @dt-ui/react-core@0.1.0-beta.35
89
+ - @dt-ui/react-tooltip@0.1.0-beta.41
90
+
91
+ ## 0.1.0-beta.41
92
+
93
+ ### Minor Changes
94
+
95
+ - feat: move icon-button to independent
96
+
97
+ ### Patch Changes
98
+
99
+ - Updated dependencies
100
+ - @dt-ui/react-tooltip@0.1.0-beta.40
101
+
102
+ ## 0.1.0-beta.40
103
+
104
+ ### Patch Changes
105
+
106
+ - fix: add accent to colors type
107
+ - Updated dependencies
108
+ - @dt-ui/react-core@0.1.0-beta.34
109
+ - @dt-ui/react-tooltip@0.1.0-beta.39
110
+
111
+ ## 0.1.0-beta.39
112
+
113
+ ### Patch Changes
114
+
115
+ - fix: change button text according to ux
116
+ - Updated dependencies
117
+ - @dt-ui/react-core@0.1.0-beta.33
118
+ - @dt-ui/react-tooltip@0.1.0-beta.38
119
+
120
+ ## 0.1.0-beta.38
121
+
122
+ ### Patch Changes
123
+
124
+ - chore: update contexual colors
125
+ - Updated dependencies
126
+ - @dt-ui/react-core@0.1.0-beta.32
127
+ - @dt-ui/react-tooltip@0.1.0-beta.37
128
+
129
+ ## 0.1.0-beta.37
130
+
131
+ ### Patch Changes
132
+
133
+ - style: update responsive font styles
134
+ - Updated dependencies
135
+ - @dt-ui/react-core@0.1.0-beta.31
136
+ - @dt-ui/react-tooltip@0.1.0-beta.36
137
+
138
+ ## 0.1.0-beta.36
139
+
140
+ ### Minor Changes
141
+
142
+ - feat: add spinner size 'extra-small' & update specs
143
+
144
+ ### Patch Changes
145
+
146
+ - Updated dependencies
147
+ - @dt-ui/react-core@0.1.0-beta.30
148
+ - @dt-ui/react-tooltip@0.1.0-beta.35
149
+
150
+ ## 0.1.0-beta.35
151
+
152
+ ### Minor Changes
153
+
154
+ - feat: add customInitias to avatar
155
+
156
+ ## 0.1.0-beta.34
157
+
158
+ ### Patch Changes
159
+
160
+ - chore: add theme breakpoints
161
+ - Updated dependencies
162
+ - @dt-ui/react-core@0.1.0-beta.29
163
+ - @dt-ui/react-tooltip@0.1.0-beta.34
164
+
165
+ ## 0.1.0-beta.33
166
+
167
+ ### Patch Changes
168
+
169
+ - fix(DOMRect API): prevent breaking consumers CI/CD pipeline
170
+ - Updated dependencies
171
+ - @dt-ui/react-tooltip@0.1.0-beta.33
172
+
173
+ ## 0.1.0-beta.32
174
+
175
+ ### Patch Changes
176
+
177
+ - fix(tooltip): avoid browser window crop
178
+ - Updated dependencies
179
+ - @dt-ui/react-tooltip@0.1.0-beta.32
180
+
181
+ ## 0.1.0-beta.31
182
+
183
+ ### Minor Changes
184
+
185
+ - feat: add id to base props
186
+
187
+ ### Patch Changes
188
+
189
+ - Updated dependencies
190
+ - @dt-ui/react-core@0.1.0-beta.28
191
+ - @dt-ui/react-tooltip@0.1.0-beta.31
192
+
193
+ ## 0.1.0-beta.30
194
+
195
+ ### Minor Changes
196
+
197
+ - feat: change breakpoints values
198
+
199
+ ### Patch Changes
200
+
201
+ - Updated dependencies
202
+ - @dt-ui/react-core@0.1.0-beta.27
203
+ - @dt-ui/react-tooltip@0.1.0-beta.30
204
+
205
+ ## 0.1.0-beta.29
206
+
207
+ ### Patch Changes
208
+
209
+ - fix: replace body to correct one
210
+ - Updated dependencies
211
+ - @dt-ui/react-core@0.1.0-beta.26
212
+ - @dt-ui/react-tooltip@0.1.0-beta.29
213
+
214
+ ## 0.1.0-beta.28
215
+
216
+ ### Patch Changes
217
+
218
+ - chore: add theme colors missing types
219
+ - Updated dependencies
220
+ - @dt-ui/react-core@0.1.0-beta.25
221
+ - @dt-ui/react-tooltip@0.1.0-beta.28
222
+
223
+ ## 0.1.0-beta.27
224
+
225
+ ### Patch Changes
226
+
227
+ - refactor: drop truckapi theme
228
+ - Updated dependencies
229
+ - @dt-ui/react-core@0.1.0-beta.24
230
+ - @dt-ui/react-tooltip@0.1.0-beta.27
231
+
232
+ ## 0.1.0-beta.26
233
+
234
+ ### Minor Changes
235
+
236
+ - feat: update core and semantic colors
237
+ - feat: remove greenlane theme
238
+
239
+ ### Patch Changes
240
+
241
+ - Updated dependencies
242
+ - Updated dependencies
243
+ - @dt-ui/react-core@0.1.0-beta.23
244
+ - @dt-ui/react-tooltip@0.1.0-beta.26
245
+
246
+ ## 0.1.0-beta.25
247
+
248
+ ### Minor Changes
249
+
250
+ - feat: add icon option for truckapi theme
251
+
252
+ ### Patch Changes
253
+
254
+ - Updated dependencies
255
+ - @dt-ui/react-core@0.1.0-beta.22
256
+ - @dt-ui/react-tooltip@0.1.0-beta.25
257
+
258
+ ## 0.1.0-beta.24
259
+
260
+ ### Patch Changes
261
+
262
+ - fix: tooltip z index
263
+ - Updated dependencies
264
+ - @dt-ui/react-core@0.1.0-beta.21
265
+ - @dt-ui/react-tooltip@0.1.0-beta.24
266
+
267
+ ## 0.1.0-beta.23
268
+
269
+ ### Minor Changes
270
+
271
+ - feat: add segmented control component
272
+
273
+ ### Patch Changes
274
+
275
+ - Updated dependencies
276
+ - @dt-ui/react-core@0.1.0-beta.20
277
+ - @dt-ui/react-tooltip@0.1.0-beta.23
278
+
279
+ ## 0.1.0-beta.22
280
+
281
+ ### Patch Changes
282
+
283
+ - fix: add shape for tooltip on truckapi theme
284
+ - Updated dependencies
285
+ - @dt-ui/react-core@0.1.0-beta.19
286
+ - @dt-ui/react-tooltip@0.1.0-beta.22
287
+
288
+ ## 0.1.0-beta.21
289
+
290
+ ### Patch Changes
291
+
292
+ - fix: remove devDependecy export
293
+ - Updated dependencies
294
+ - @dt-ui/react-core@0.1.0-beta.18
295
+ - @dt-ui/react-tooltip@0.1.0-beta.21
296
+
297
+ ## 0.1.0-beta.20
298
+
299
+ ### Patch Changes
300
+
301
+ - test: add test custom render
302
+ - Updated dependencies
303
+ - @dt-ui/react-core@0.1.0-beta.17
304
+ - @dt-ui/react-tooltip@0.1.0-beta.20
305
+
306
+ ## 0.1.0-beta.19
307
+
308
+ ### Minor Changes
309
+
310
+ - feat: create select
311
+
312
+ ### Patch Changes
313
+
314
+ - Updated dependencies
315
+ - @dt-ui/react-core@0.1.0-beta.16
316
+ - @dt-ui/react-tooltip@0.1.0-beta.19
317
+
318
+ ## 0.1.0-beta.18
319
+
320
+ ### Patch Changes
321
+
322
+ - fix: show shadows only when scroll is visible
323
+ - Updated dependencies
324
+ - @dt-ui/react-core@0.1.0-beta.15
325
+ - @dt-ui/react-tooltip@0.1.0-beta.18
326
+
327
+ ## 0.1.0-beta.17
328
+
329
+ ### Patch Changes
330
+
331
+ - fix: update border radius theme specifications
332
+ - Updated dependencies
333
+ - @dt-ui/react-core@0.1.0-beta.14
334
+ - @dt-ui/react-tooltip@0.1.0-beta.17
335
+
336
+ ## 0.1.0-beta.16
337
+
338
+ ### Patch Changes
339
+
340
+ - fix: match accordion design
341
+ - Updated dependencies
342
+ - @dt-ui/react-core@0.1.0-beta.13
343
+ - @dt-ui/react-tooltip@0.1.0-beta.16
344
+
345
+ ## 0.1.0-beta.15
346
+
347
+ ### Patch Changes
348
+
349
+ - fix: make icons an optional property in theme
350
+ - Updated dependencies
351
+ - @dt-ui/react-core@0.1.0-beta.12
352
+ - @dt-ui/react-tooltip@0.1.0-beta.15
353
+
354
+ ## 0.1.0-beta.14
355
+
356
+ ### Patch Changes
357
+
358
+ - refactor: extract text-field to new package with greenlane theme
359
+ - Updated dependencies
360
+ - @dt-ui/react-core@0.1.0-beta.11
361
+ - @dt-ui/react-tooltip@0.1.0-beta.14
362
+
363
+ ## 0.1.0-beta.13
364
+
365
+ ### Patch Changes
366
+
367
+ - refactor: move and refactor checkbox refactor checkbox according to design
368
+ - Updated dependencies
369
+ - @dt-ui/react-core@0.1.0-beta.10
370
+ - @dt-ui/react-tooltip@0.1.0-beta.13
371
+
372
+ ## 0.1.0-beta.12
373
+
374
+ ### Patch Changes
375
+
376
+ - fix(icons): export css and update imports on deps
377
+ - Updated dependencies
378
+ - @dt-ui/react-core@0.1.0-beta.9
379
+ - @dt-ui/react-tooltip@0.1.0-beta.12
380
+
381
+ ## 0.1.0-beta.11
382
+
383
+ ### Patch Changes
384
+
385
+ - chore: update component generator and lint fixes
386
+ - Updated dependencies
387
+ - @dt-ui/react-tooltip@0.1.0-beta.11
388
+
389
+ ## 0.1.0-beta.10
390
+
391
+ ### Patch Changes
392
+
393
+ - chore: move util functions to the core
394
+ - Updated dependencies
395
+ - @dt-ui/react-core@0.1.0-beta.8
396
+ - @dt-ui/react-tooltip@0.1.0-beta.10
397
+
398
+ ## 0.1.0-beta.9
399
+
400
+ ### Minor Changes
401
+
402
+ - feat: add contextual color add content tertiary to palette
403
+
404
+ ### Patch Changes
405
+
406
+ - Updated dependencies
407
+ - @dt-ui/react-core@0.1.0-beta.7
408
+ - @dt-ui/react-tooltip@0.1.0-beta.9
409
+
410
+ ## 0.1.0-beta.8
411
+
412
+ ### Minor Changes
413
+
414
+ - feat: create Icons package
415
+ - feat: add icons to theme Provider
416
+
417
+ ### Patch Changes
418
+
419
+ - Updated dependencies
420
+ - Updated dependencies
421
+ - @dt-ui/react-core@0.1.0-beta.6
422
+ - @dt-ui/react-tooltip@0.1.0-beta.8
423
+
424
+ ## 0.1.0-beta.7
425
+
426
+ ### Minor Changes
427
+
428
+ - feat: create TruckAPI theme and update default
429
+
430
+ ### Patch Changes
431
+
432
+ - Updated dependencies
433
+ - @dt-ui/react-core@0.1.0-beta.5
434
+ - @dt-ui/react-tooltip@0.1.0-beta.7
435
+
436
+ ## 0.1.0-beta.6
437
+
438
+ ### Minor Changes
439
+
440
+ - feat: update contextual color to follow figma spec
441
+
442
+ ### Patch Changes
443
+
444
+ - Updated dependencies
445
+ - @dt-ui/react-core@0.1.0-beta.4
446
+ - @dt-ui/react-tooltip@0.1.0-beta.6
447
+
448
+ ## 0.1.0-beta.5
449
+
450
+ ### Minor Changes
451
+
452
+ - feat: review Message designs based on designs
453
+
454
+ ### Patch Changes
455
+
456
+ - fix: move react-core to main dependencies
457
+ - Updated dependencies
458
+ - Updated dependencies
459
+ - @dt-ui/react-tooltip@0.1.0-beta.5
460
+ - @dt-ui/react-core@0.1.0-beta.3
461
+
462
+ ## 0.1.0-beta.4
463
+
464
+ ### Patch Changes
465
+
466
+ - chore: migrate jest setup file to jest package
467
+ - chore: migrate jest configuration to typescript
468
+ - Updated dependencies
469
+ - Updated dependencies
470
+ - @dt-ui/react-tooltip@0.1.0-beta.4
471
+
472
+ ## 0.1.0-beta.3
473
+
474
+ ### Patch Changes
475
+
476
+ - chore: create core package
477
+ - Updated dependencies
478
+ - @dt-ui/react-tooltip@0.1.0-beta.3
479
+
480
+ ## 0.1.0-beta.2
481
+
482
+ ### Patch Changes
483
+
484
+ - refactor: change storybook template names to default
485
+ - Updated dependencies
486
+ - @dt-ui/react-tooltip@0.1.0-beta.2
487
+
488
+ ## 0.1.0-beta.1
489
+
490
+ ### Patch Changes
491
+
492
+ - chore: make avatar an independent package
package/LICENSE.md ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Daimler Truck AG.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,80 @@
1
+ # Avatar Package
2
+
3
+ Avatars can be used to display circular user profile in user menu, tables etc.
4
+
5
+ ## Avatar Usage
6
+
7
+ ```jsx
8
+ import { Avatar, AvatarType, AvatarSize } from '@dt-dds/react';
9
+
10
+ export const App = () => {
11
+ return (
12
+ <div>
13
+ <Avatar
14
+ type={AvatarType.Primary}
15
+ size={AvatarSize.Medium}
16
+ title='User Name'
17
+ />
18
+ </div>
19
+ );
20
+ };
21
+ ```
22
+
23
+ ## API
24
+
25
+ ### Avatar
26
+
27
+ This component can contain upto two simple characters by passing a string in prop `title`
28
+
29
+ | Property | Type | Default | Description |
30
+ | ------------ | ------------------ | ------- | ------------------------------------------------------------------ |
31
+ | `title` | `ReactNode` | - | Letter characters shown in the avatar |
32
+ | `type` | `enum<AvatarType>` | primary | You can choose type of the Avatar you want for different use cases |
33
+ | `size` | `enum<AvatarSize>` | medium | Sets the Avatar size given the available options |
34
+ | `imageSrc` | `string` | - | Optional profile image path (will only work with "Profile" type) |
35
+ | `dataTestId` | `string` | avatar | Avatar test identifier |
36
+
37
+ ## Stack
38
+
39
+ - [TypeScript](https://www.typescriptlang.org/) for static type checking
40
+ - [React](https://reactjs.org/) — JavaScript library for user interfaces
41
+ - [Emotion](https://emotion.sh/docs/introduction) — for writing css styles with JavaScript
42
+ - [Storybook](https://storybook.js.org/) — UI component environment powered by Vite
43
+ - [Jest](https://jestjs.io/) - JavaScript Testing Framework
44
+ - [React Testing Library](https://testing-library.com/) - to test UI components in a user-centric way
45
+ - [ESLint](https://eslint.org/) for code linting
46
+ - [Prettier](https://prettier.io) for code formatting
47
+ - [Tsup](https://github.com/egoist/tsup) — TypeScript bundler powered by esbuild
48
+ - [Yarn](https://yarnpkg.com/) from managing packages
49
+
50
+ ## Commands
51
+
52
+ - `yarn build` - Build the package
53
+ - `yarn dev` - Run the package locally
54
+ - `yarn lint` - Lint all files within this package
55
+ - `yarn test` - Run all unit tests
56
+ - `yarn test:report` - Open the test coverage report
57
+ - `yarn test:update:snapshot` - Run all unit tests and update the snapshot
58
+
59
+ ## Compilation
60
+
61
+ Running `yarn build` from the root of the package will use [tsup](https://tsup.egoist.dev/) to compile the raw TypeScript and React code to plain JavaScript.
62
+
63
+ The `/dist` folder contains the compiled output.
64
+
65
+ ```bash
66
+ avatar
67
+ └── dist
68
+ ├── index.d.ts <-- Types
69
+ ├── index.js <-- CommonJS version
70
+ └── index.mjs <-- ES Modules version
71
+ ...
72
+ ```
73
+
74
+ ## Versioning
75
+
76
+ Follows [semantic versioning](https://semver.org/)
77
+
78
+ ## &copy; License
79
+
80
+ Licensed under [MIT License](LICENSE.md)
@@ -0,0 +1,37 @@
1
+ import { Theme } from '@dt-dds/react-core';
2
+ import * as react_jsx_runtime from 'react/jsx-runtime';
3
+
4
+ declare const AvatarType: {
5
+ readonly Primary: "primary";
6
+ readonly Secondary: "secondary";
7
+ readonly Tertiary: "tertiary";
8
+ readonly Profile: "profile";
9
+ };
10
+ type AvatarType = (typeof AvatarType)[keyof typeof AvatarType];
11
+
12
+ declare const AvatarSize: {
13
+ readonly Small: "small";
14
+ readonly Medium: "medium";
15
+ readonly Large: "large";
16
+ };
17
+ type AvatarSize = (typeof AvatarSize)[keyof typeof AvatarSize];
18
+
19
+ interface AvatarStyledProps {
20
+ type: AvatarType;
21
+ size: AvatarSize;
22
+ }
23
+
24
+ interface AvatarProps extends AvatarStyledProps {
25
+ title: string;
26
+ imageSrc?: string;
27
+ dataTestId?: string;
28
+ customInitials?: string;
29
+ }
30
+ declare const Avatar: ({ title, type, size, imageSrc, dataTestId, customInitials, }: AvatarProps) => react_jsx_runtime.JSX.Element;
31
+
32
+ declare module '@emotion/react' {
33
+ interface Theme extends Theme {
34
+ }
35
+ }
36
+
37
+ export { Avatar, AvatarSize, AvatarType };