@dt-dds/react-message 1.0.0-beta.55
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 +532 -0
- package/LICENSE.md +21 -0
- package/README.md +107 -0
- package/dist/index.d.ts +32 -0
- package/dist/index.js +434 -0
- package/dist/index.mjs +399 -0
- package/package.json +56 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,532 @@
|
|
|
1
|
+
# @dt-ui/react-message
|
|
2
|
+
|
|
3
|
+
## 1.0.0-beta.55
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- chore: fix publish after npmjs.org pkg unpublish
|
|
8
|
+
- Updated dependencies
|
|
9
|
+
- @dt-dds/react-link@1.0.0-beta.16
|
|
10
|
+
|
|
11
|
+
## 1.0.0-beta.54
|
|
12
|
+
|
|
13
|
+
### Major Changes
|
|
14
|
+
|
|
15
|
+
- refactor!: rename pkg and publish to npmjs
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- Updated dependencies
|
|
20
|
+
- @dt-dds/react-core@1.0.0-beta.41
|
|
21
|
+
- @dt-dds/react-link@1.0.0-beta.15
|
|
22
|
+
- @dt-dds/react-typography@1.0.0-beta.32
|
|
23
|
+
|
|
24
|
+
## 0.1.0-beta.53
|
|
25
|
+
|
|
26
|
+
### Patch Changes
|
|
27
|
+
|
|
28
|
+
- refactor: drop icon funcional state
|
|
29
|
+
- Updated dependencies
|
|
30
|
+
- @dt-ui/react-link@0.1.0-beta.14
|
|
31
|
+
|
|
32
|
+
## 0.1.0-beta.52
|
|
33
|
+
|
|
34
|
+
### Patch Changes
|
|
35
|
+
|
|
36
|
+
- refactor: theme typography values
|
|
37
|
+
- Updated dependencies
|
|
38
|
+
- @dt-ui/react-core@0.1.0-beta.40
|
|
39
|
+
- @dt-ui/react-link@0.1.0-beta.13
|
|
40
|
+
- @dt-ui/react-typography@0.1.0-beta.31
|
|
41
|
+
|
|
42
|
+
## 0.1.0-beta.51
|
|
43
|
+
|
|
44
|
+
### Minor Changes
|
|
45
|
+
|
|
46
|
+
- feat: update shadow theme values
|
|
47
|
+
|
|
48
|
+
### Patch Changes
|
|
49
|
+
|
|
50
|
+
- Updated dependencies
|
|
51
|
+
- @dt-ui/react-core@0.1.0-beta.39
|
|
52
|
+
- @dt-ui/react-link@0.1.0-beta.12
|
|
53
|
+
- @dt-ui/react-typography@0.1.0-beta.30
|
|
54
|
+
|
|
55
|
+
## 0.1.0-beta.50
|
|
56
|
+
|
|
57
|
+
### Minor Changes
|
|
58
|
+
|
|
59
|
+
- feat: add new icon font sizes
|
|
60
|
+
|
|
61
|
+
### Patch Changes
|
|
62
|
+
|
|
63
|
+
- Updated dependencies
|
|
64
|
+
- @dt-ui/react-link@0.1.0-beta.11
|
|
65
|
+
|
|
66
|
+
## 0.1.0-beta.49
|
|
67
|
+
|
|
68
|
+
### Patch Changes
|
|
69
|
+
|
|
70
|
+
- chore: update theme font-styles
|
|
71
|
+
- Updated dependencies
|
|
72
|
+
- @dt-ui/react-core@0.1.0-beta.38
|
|
73
|
+
- @dt-ui/react-link@0.1.0-beta.10
|
|
74
|
+
- @dt-ui/react-typography@0.1.0-beta.29
|
|
75
|
+
|
|
76
|
+
## 0.1.0-beta.48
|
|
77
|
+
|
|
78
|
+
### Patch Changes
|
|
79
|
+
|
|
80
|
+
- chore: review OSS files
|
|
81
|
+
- Updated dependencies
|
|
82
|
+
- @dt-ui/react-core@0.1.0-beta.37
|
|
83
|
+
- @dt-ui/react-link@0.1.0-beta.9
|
|
84
|
+
- @dt-ui/react-typography@0.1.0-beta.28
|
|
85
|
+
|
|
86
|
+
## 0.1.0-beta.47
|
|
87
|
+
|
|
88
|
+
### Minor Changes
|
|
89
|
+
|
|
90
|
+
- feat: add mobile breakpoint for button
|
|
91
|
+
|
|
92
|
+
### Patch Changes
|
|
93
|
+
|
|
94
|
+
- Updated dependencies
|
|
95
|
+
- @dt-ui/react-link@0.1.0-beta.8
|
|
96
|
+
|
|
97
|
+
## 0.1.0-beta.46
|
|
98
|
+
|
|
99
|
+
### Patch Changes
|
|
100
|
+
|
|
101
|
+
- refactor: repalce enum with type
|
|
102
|
+
- Updated dependencies
|
|
103
|
+
- @dt-ui/react-link@0.1.0-beta.7
|
|
104
|
+
|
|
105
|
+
## 0.1.0-beta.45
|
|
106
|
+
|
|
107
|
+
### Patch Changes
|
|
108
|
+
|
|
109
|
+
- fix: link build
|
|
110
|
+
- Updated dependencies
|
|
111
|
+
- @dt-ui/react-link@0.1.0-beta.6
|
|
112
|
+
|
|
113
|
+
## 0.1.0-beta.44
|
|
114
|
+
|
|
115
|
+
### Minor Changes
|
|
116
|
+
|
|
117
|
+
- feat: add icon to link
|
|
118
|
+
|
|
119
|
+
### Patch Changes
|
|
120
|
+
|
|
121
|
+
- Updated dependencies
|
|
122
|
+
- @dt-ui/react-link@0.1.0-beta.5
|
|
123
|
+
|
|
124
|
+
## 0.1.0-beta.43
|
|
125
|
+
|
|
126
|
+
### Patch Changes
|
|
127
|
+
|
|
128
|
+
- chore: update contextual colors
|
|
129
|
+
- Updated dependencies
|
|
130
|
+
- @dt-ui/react-core@0.1.0-beta.36
|
|
131
|
+
- @dt-ui/react-link@0.1.0-beta.4
|
|
132
|
+
- @dt-ui/react-typography@0.1.0-beta.27
|
|
133
|
+
|
|
134
|
+
## 0.1.0-beta.42
|
|
135
|
+
|
|
136
|
+
### Minor Changes
|
|
137
|
+
|
|
138
|
+
- feat: add active state to link
|
|
139
|
+
|
|
140
|
+
### Patch Changes
|
|
141
|
+
|
|
142
|
+
- Updated dependencies
|
|
143
|
+
- @dt-ui/react-link@0.1.0-beta.3
|
|
144
|
+
|
|
145
|
+
## 0.1.0-beta.41
|
|
146
|
+
|
|
147
|
+
### Minor Changes
|
|
148
|
+
|
|
149
|
+
- feat: update link according to design
|
|
150
|
+
|
|
151
|
+
### Patch Changes
|
|
152
|
+
|
|
153
|
+
- Updated dependencies
|
|
154
|
+
- @dt-ui/react-link@0.1.0-beta.2
|
|
155
|
+
|
|
156
|
+
## 0.1.0-beta.40
|
|
157
|
+
|
|
158
|
+
### Patch Changes
|
|
159
|
+
|
|
160
|
+
- chore: link independent pkg
|
|
161
|
+
- Updated dependencies
|
|
162
|
+
- @dt-ui/react-link@0.1.0-beta.1
|
|
163
|
+
|
|
164
|
+
## 0.1.0-beta.39
|
|
165
|
+
|
|
166
|
+
### Patch Changes
|
|
167
|
+
|
|
168
|
+
- fix: change content.light contextual color
|
|
169
|
+
- Updated dependencies
|
|
170
|
+
- @dt-ui/react-core@0.1.0-beta.35
|
|
171
|
+
- @dt-ui/react-typography@0.1.0-beta.26
|
|
172
|
+
|
|
173
|
+
## 0.1.0-beta.38
|
|
174
|
+
|
|
175
|
+
### Patch Changes
|
|
176
|
+
|
|
177
|
+
- fix: add accent to colors type
|
|
178
|
+
- Updated dependencies
|
|
179
|
+
- @dt-ui/react-core@0.1.0-beta.34
|
|
180
|
+
- @dt-ui/react-typography@0.1.0-beta.25
|
|
181
|
+
|
|
182
|
+
## 0.1.0-beta.37
|
|
183
|
+
|
|
184
|
+
### Patch Changes
|
|
185
|
+
|
|
186
|
+
- fix: change button text according to ux
|
|
187
|
+
- Updated dependencies
|
|
188
|
+
- @dt-ui/react-core@0.1.0-beta.33
|
|
189
|
+
- @dt-ui/react-typography@0.1.0-beta.24
|
|
190
|
+
|
|
191
|
+
## 0.1.0-beta.36
|
|
192
|
+
|
|
193
|
+
### Patch Changes
|
|
194
|
+
|
|
195
|
+
- chore: update contexual colors
|
|
196
|
+
- Updated dependencies
|
|
197
|
+
- @dt-ui/react-core@0.1.0-beta.32
|
|
198
|
+
- @dt-ui/react-typography@0.1.0-beta.23
|
|
199
|
+
|
|
200
|
+
## 0.1.0-beta.35
|
|
201
|
+
|
|
202
|
+
### Patch Changes
|
|
203
|
+
|
|
204
|
+
- style: update responsive font styles
|
|
205
|
+
- Updated dependencies
|
|
206
|
+
- @dt-ui/react-core@0.1.0-beta.31
|
|
207
|
+
- @dt-ui/react-typography@0.1.0-beta.22
|
|
208
|
+
|
|
209
|
+
## 0.1.0-beta.34
|
|
210
|
+
|
|
211
|
+
### Minor Changes
|
|
212
|
+
|
|
213
|
+
- feat: add spinner size 'extra-small' & update specs
|
|
214
|
+
|
|
215
|
+
### Patch Changes
|
|
216
|
+
|
|
217
|
+
- Updated dependencies
|
|
218
|
+
- @dt-ui/react-core@0.1.0-beta.30
|
|
219
|
+
- @dt-ui/react-typography@0.1.0-beta.21
|
|
220
|
+
|
|
221
|
+
## 0.1.0-beta.33
|
|
222
|
+
|
|
223
|
+
### Patch Changes
|
|
224
|
+
|
|
225
|
+
- chore: add theme breakpoints
|
|
226
|
+
- Updated dependencies
|
|
227
|
+
- @dt-ui/react-core@0.1.0-beta.29
|
|
228
|
+
- @dt-ui/react-typography@0.1.0-beta.20
|
|
229
|
+
|
|
230
|
+
## 0.1.0-beta.32
|
|
231
|
+
|
|
232
|
+
### Minor Changes
|
|
233
|
+
|
|
234
|
+
- feat: add id to base props
|
|
235
|
+
|
|
236
|
+
### Patch Changes
|
|
237
|
+
|
|
238
|
+
- Updated dependencies
|
|
239
|
+
- @dt-ui/react-core@0.1.0-beta.28
|
|
240
|
+
- @dt-ui/react-typography@0.1.0-beta.19
|
|
241
|
+
|
|
242
|
+
## 0.1.0-beta.31
|
|
243
|
+
|
|
244
|
+
### Minor Changes
|
|
245
|
+
|
|
246
|
+
- feat: change breakpoints values
|
|
247
|
+
|
|
248
|
+
### Patch Changes
|
|
249
|
+
|
|
250
|
+
- Updated dependencies
|
|
251
|
+
- @dt-ui/react-core@0.1.0-beta.27
|
|
252
|
+
- @dt-ui/react-typography@0.1.0-beta.18
|
|
253
|
+
|
|
254
|
+
## 0.1.0-beta.30
|
|
255
|
+
|
|
256
|
+
### Patch Changes
|
|
257
|
+
|
|
258
|
+
- fix: replace body to correct one
|
|
259
|
+
- Updated dependencies
|
|
260
|
+
- @dt-ui/react-core@0.1.0-beta.26
|
|
261
|
+
- @dt-ui/react-typography@0.1.0-beta.17
|
|
262
|
+
|
|
263
|
+
## 0.1.0-beta.29
|
|
264
|
+
|
|
265
|
+
### Patch Changes
|
|
266
|
+
|
|
267
|
+
- chore: add theme colors missing types
|
|
268
|
+
- Updated dependencies
|
|
269
|
+
- @dt-ui/react-core@0.1.0-beta.25
|
|
270
|
+
- @dt-ui/react-typography@0.1.0-beta.16
|
|
271
|
+
|
|
272
|
+
## 0.1.0-beta.28
|
|
273
|
+
|
|
274
|
+
### Patch Changes
|
|
275
|
+
|
|
276
|
+
- refactor: drop truckapi theme
|
|
277
|
+
- Updated dependencies
|
|
278
|
+
- @dt-ui/react-core@0.1.0-beta.24
|
|
279
|
+
- @dt-ui/react-typography@0.1.0-beta.15
|
|
280
|
+
|
|
281
|
+
## 0.1.0-beta.27
|
|
282
|
+
|
|
283
|
+
### Minor Changes
|
|
284
|
+
|
|
285
|
+
- feat: update core and semantic colors
|
|
286
|
+
- feat: remove greenlane theme
|
|
287
|
+
|
|
288
|
+
### Patch Changes
|
|
289
|
+
|
|
290
|
+
- Updated dependencies
|
|
291
|
+
- Updated dependencies
|
|
292
|
+
- @dt-ui/react-core@0.1.0-beta.23
|
|
293
|
+
- @dt-ui/react-typography@0.1.0-beta.14
|
|
294
|
+
|
|
295
|
+
## 0.1.0-beta.26
|
|
296
|
+
|
|
297
|
+
### Minor Changes
|
|
298
|
+
|
|
299
|
+
- feat: add icon option for truckapi theme
|
|
300
|
+
|
|
301
|
+
### Patch Changes
|
|
302
|
+
|
|
303
|
+
- Updated dependencies
|
|
304
|
+
- @dt-ui/react-core@0.1.0-beta.22
|
|
305
|
+
- @dt-ui/react-typography@0.1.0-beta.13
|
|
306
|
+
|
|
307
|
+
## 0.1.0-beta.25
|
|
308
|
+
|
|
309
|
+
### Patch Changes
|
|
310
|
+
|
|
311
|
+
- fix: tooltip z index
|
|
312
|
+
- Updated dependencies
|
|
313
|
+
- @dt-ui/react-core@0.1.0-beta.21
|
|
314
|
+
- @dt-ui/react-typography@0.1.0-beta.12
|
|
315
|
+
|
|
316
|
+
## 0.1.0-beta.24
|
|
317
|
+
|
|
318
|
+
### Minor Changes
|
|
319
|
+
|
|
320
|
+
- feat: add segmented control component
|
|
321
|
+
|
|
322
|
+
### Patch Changes
|
|
323
|
+
|
|
324
|
+
- Updated dependencies
|
|
325
|
+
- @dt-ui/react-core@0.1.0-beta.20
|
|
326
|
+
- @dt-ui/react-typography@0.1.0-beta.11
|
|
327
|
+
|
|
328
|
+
## 0.1.0-beta.23
|
|
329
|
+
|
|
330
|
+
### Patch Changes
|
|
331
|
+
|
|
332
|
+
- fix: add shape for tooltip on truckapi theme
|
|
333
|
+
- Updated dependencies
|
|
334
|
+
- @dt-ui/react-core@0.1.0-beta.19
|
|
335
|
+
- @dt-ui/react-typography@0.1.0-beta.10
|
|
336
|
+
|
|
337
|
+
## 0.1.0-beta.22
|
|
338
|
+
|
|
339
|
+
### Patch Changes
|
|
340
|
+
|
|
341
|
+
- fix: remove devDependecy export
|
|
342
|
+
- Updated dependencies
|
|
343
|
+
- @dt-ui/react-core@0.1.0-beta.18
|
|
344
|
+
- @dt-ui/react-typography@0.1.0-beta.9
|
|
345
|
+
|
|
346
|
+
## 0.1.0-beta.21
|
|
347
|
+
|
|
348
|
+
### Patch Changes
|
|
349
|
+
|
|
350
|
+
- test: add test custom render
|
|
351
|
+
- Updated dependencies
|
|
352
|
+
- @dt-ui/react-core@0.1.0-beta.17
|
|
353
|
+
- @dt-ui/react-typography@0.1.0-beta.8
|
|
354
|
+
|
|
355
|
+
## 0.1.0-beta.20
|
|
356
|
+
|
|
357
|
+
### Minor Changes
|
|
358
|
+
|
|
359
|
+
- feat: create select
|
|
360
|
+
|
|
361
|
+
### Patch Changes
|
|
362
|
+
|
|
363
|
+
- Updated dependencies
|
|
364
|
+
- @dt-ui/react-core@0.1.0-beta.16
|
|
365
|
+
- @dt-ui/react-typography@0.1.0-beta.7
|
|
366
|
+
|
|
367
|
+
## 0.1.0-beta.19
|
|
368
|
+
|
|
369
|
+
### Patch Changes
|
|
370
|
+
|
|
371
|
+
- fix: show shadows only when scroll is visible
|
|
372
|
+
- Updated dependencies
|
|
373
|
+
- @dt-ui/react-core@0.1.0-beta.15
|
|
374
|
+
- @dt-ui/react-typography@0.1.0-beta.6
|
|
375
|
+
|
|
376
|
+
## 0.1.0-beta.18
|
|
377
|
+
|
|
378
|
+
### Patch Changes
|
|
379
|
+
|
|
380
|
+
- fix: update border radius theme specifications
|
|
381
|
+
- Updated dependencies
|
|
382
|
+
- @dt-ui/react-core@0.1.0-beta.14
|
|
383
|
+
- @dt-ui/react-typography@0.1.0-beta.5
|
|
384
|
+
|
|
385
|
+
## 0.1.0-beta.17
|
|
386
|
+
|
|
387
|
+
### Patch Changes
|
|
388
|
+
|
|
389
|
+
- fix: match accordion design
|
|
390
|
+
- Updated dependencies
|
|
391
|
+
- @dt-ui/react-core@0.1.0-beta.13
|
|
392
|
+
- @dt-ui/react-typography@0.1.0-beta.4
|
|
393
|
+
|
|
394
|
+
## 0.1.0-beta.16
|
|
395
|
+
|
|
396
|
+
### Patch Changes
|
|
397
|
+
|
|
398
|
+
- fix: make icons an optional property in theme
|
|
399
|
+
- Updated dependencies
|
|
400
|
+
- @dt-ui/react-core@0.1.0-beta.12
|
|
401
|
+
- @dt-ui/react-typography@0.1.0-beta.3
|
|
402
|
+
|
|
403
|
+
## 0.1.0-beta.15
|
|
404
|
+
|
|
405
|
+
### Patch Changes
|
|
406
|
+
|
|
407
|
+
- refactor: extract text-field to new package with greenlane theme
|
|
408
|
+
- Updated dependencies
|
|
409
|
+
- @dt-ui/react-core@0.1.0-beta.11
|
|
410
|
+
- @dt-ui/react-typography@0.1.0-beta.2
|
|
411
|
+
|
|
412
|
+
## 0.1.0-beta.14
|
|
413
|
+
|
|
414
|
+
### Patch Changes
|
|
415
|
+
|
|
416
|
+
- chore: make Typography component independent
|
|
417
|
+
- Updated dependencies
|
|
418
|
+
- @dt-ui/react-typography@0.1.0-beta.1
|
|
419
|
+
|
|
420
|
+
## 0.1.0-beta.13
|
|
421
|
+
|
|
422
|
+
### Patch Changes
|
|
423
|
+
|
|
424
|
+
- refactor: move and refactor checkbox refactor checkbox according to design
|
|
425
|
+
- Updated dependencies
|
|
426
|
+
- @dt-ui/react-core@0.1.0-beta.10
|
|
427
|
+
|
|
428
|
+
## 0.1.0-beta.12
|
|
429
|
+
|
|
430
|
+
### Patch Changes
|
|
431
|
+
|
|
432
|
+
- fix(icons): export css and update imports on deps
|
|
433
|
+
- Updated dependencies
|
|
434
|
+
- @dt-ui/react-core@0.1.0-beta.9
|
|
435
|
+
|
|
436
|
+
## 0.1.0-beta.11
|
|
437
|
+
|
|
438
|
+
### Patch Changes
|
|
439
|
+
|
|
440
|
+
- chore: update component generator and lint fixes
|
|
441
|
+
|
|
442
|
+
## 0.1.0-beta.10
|
|
443
|
+
|
|
444
|
+
### Patch Changes
|
|
445
|
+
|
|
446
|
+
- chore: move util functions to the core
|
|
447
|
+
- Updated dependencies
|
|
448
|
+
- @dt-ui/react-core@0.1.0-beta.8
|
|
449
|
+
|
|
450
|
+
## 0.1.0-beta.9
|
|
451
|
+
|
|
452
|
+
### Minor Changes
|
|
453
|
+
|
|
454
|
+
- feat: add contextual color add content tertiary to palette
|
|
455
|
+
|
|
456
|
+
### Patch Changes
|
|
457
|
+
|
|
458
|
+
- Updated dependencies
|
|
459
|
+
- @dt-ui/react-core@0.1.0-beta.7
|
|
460
|
+
|
|
461
|
+
## 0.1.0-beta.8
|
|
462
|
+
|
|
463
|
+
### Minor Changes
|
|
464
|
+
|
|
465
|
+
- feat: create Icons package
|
|
466
|
+
- feat: add icons to theme Provider
|
|
467
|
+
|
|
468
|
+
### Patch Changes
|
|
469
|
+
|
|
470
|
+
- Updated dependencies
|
|
471
|
+
- Updated dependencies
|
|
472
|
+
- @dt-ui/react-core@0.1.0-beta.6
|
|
473
|
+
|
|
474
|
+
## 0.1.0-beta.7
|
|
475
|
+
|
|
476
|
+
### Minor Changes
|
|
477
|
+
|
|
478
|
+
- feat: create TruckAPI theme and update default
|
|
479
|
+
|
|
480
|
+
### Patch Changes
|
|
481
|
+
|
|
482
|
+
- Updated dependencies
|
|
483
|
+
- @dt-ui/react-core@0.1.0-beta.5
|
|
484
|
+
|
|
485
|
+
## 0.1.0-beta.6
|
|
486
|
+
|
|
487
|
+
### Minor Changes
|
|
488
|
+
|
|
489
|
+
- feat: update contextual color to follow figma spec
|
|
490
|
+
|
|
491
|
+
### Patch Changes
|
|
492
|
+
|
|
493
|
+
- Updated dependencies
|
|
494
|
+
- @dt-ui/react-core@0.1.0-beta.4
|
|
495
|
+
|
|
496
|
+
## 0.1.0-beta.5
|
|
497
|
+
|
|
498
|
+
### Minor Changes
|
|
499
|
+
|
|
500
|
+
- feat: review Message designs based on designs
|
|
501
|
+
|
|
502
|
+
### Patch Changes
|
|
503
|
+
|
|
504
|
+
- fix: move react-core to main dependencies
|
|
505
|
+
- Updated dependencies
|
|
506
|
+
- @dt-ui/react-core@0.1.0-beta.3
|
|
507
|
+
|
|
508
|
+
## 0.1.0-beta.4
|
|
509
|
+
|
|
510
|
+
### Patch Changes
|
|
511
|
+
|
|
512
|
+
- chore: migrate jest setup file to jest package
|
|
513
|
+
- chore: migrate jest configuration to typescript
|
|
514
|
+
|
|
515
|
+
## 0.1.0-beta.3
|
|
516
|
+
|
|
517
|
+
### Patch Changes
|
|
518
|
+
|
|
519
|
+
- chore: create core package
|
|
520
|
+
|
|
521
|
+
## 0.1.0-beta.2
|
|
522
|
+
|
|
523
|
+
### Patch Changes
|
|
524
|
+
|
|
525
|
+
- fix: change warning icons names
|
|
526
|
+
- refactor: remove dismiss logic from message component
|
|
527
|
+
|
|
528
|
+
## 0.1.0-beta.1
|
|
529
|
+
|
|
530
|
+
### Patch Changes
|
|
531
|
+
|
|
532
|
+
- chore: make message component 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,107 @@
|
|
|
1
|
+
# Message Package
|
|
2
|
+
|
|
3
|
+
This component fills the width of the container where is placed and its height varies depending on the content in it.
|
|
4
|
+
The usage of this component is to show a message to call attention to something, be it useful information or a warning message. They should be used to provide context in proximity to a piece of content.
|
|
5
|
+
Furthermore, it can be used to add an action like a link, by passing it as a children.
|
|
6
|
+
|
|
7
|
+
## Usage
|
|
8
|
+
|
|
9
|
+
```jsx
|
|
10
|
+
import { Message } from '@dt-dds/react';
|
|
11
|
+
|
|
12
|
+
export const App = () => {
|
|
13
|
+
const title = 'Some Title';
|
|
14
|
+
const description = 'Some Description';
|
|
15
|
+
const type = 'Error';
|
|
16
|
+
|
|
17
|
+
return (
|
|
18
|
+
<Message type={type}>
|
|
19
|
+
<Message.Title>{title}</Message.Title>
|
|
20
|
+
<Message.Description>{description}</Message.Description>
|
|
21
|
+
<Message.Action>
|
|
22
|
+
<Link textSize='small' href='/'>
|
|
23
|
+
View action
|
|
24
|
+
</Link>
|
|
25
|
+
</Message.Action>
|
|
26
|
+
</Message>
|
|
27
|
+
);
|
|
28
|
+
};
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## API
|
|
32
|
+
|
|
33
|
+
### Message
|
|
34
|
+
|
|
35
|
+
| Property | Type | Default | Description |
|
|
36
|
+
| ------------- | --------------------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
37
|
+
| `children` | `ReactNode` | - | Child components to be rendered. There is flexibility on what the content can be, but the recommendation is that it should be a link with a character count limit of 25. |
|
|
38
|
+
| `dataTestId` | `string` | `'message'` | Customizable test identifier. |
|
|
39
|
+
| `style` | `React.CSSProperties` | - | Customizable styles |
|
|
40
|
+
| `type` | `MessageType` | `'default'` | Sets the type of the Message, responsible for the icon and It's color, the background color and color of the dashed border |
|
|
41
|
+
| `title` | `string` | - | Optional Text to be presented as Title within the Message.Content, It should have text character count limit: 50. |
|
|
42
|
+
| `description` | `string` | - | Text to be presented as Description within the Message.Content, It should have text character count limit: 230. |
|
|
43
|
+
| `onClose` | `function` | - | When provided, a close button is displayed and, when clicked, it triggers this function. |
|
|
44
|
+
|
|
45
|
+
### Message.Title
|
|
46
|
+
|
|
47
|
+
| Property | Type | Default | Description |
|
|
48
|
+
| ---------- | ----------- | ------- | -------------------------------------------------------------------- |
|
|
49
|
+
| `children` | `ReactNode` | - | Child components to be rendered within the action. Text is expected. |
|
|
50
|
+
|
|
51
|
+
### Message.Description
|
|
52
|
+
|
|
53
|
+
| Property | Type | Default | Description |
|
|
54
|
+
| ---------- | ----------- | ------- | -------------------------------------------------------------------- |
|
|
55
|
+
| `children` | `ReactNode` | - | Child components to be rendered within the action. Text is expected. |
|
|
56
|
+
|
|
57
|
+
### Message.Action
|
|
58
|
+
|
|
59
|
+
| Property | Type | Default | Description |
|
|
60
|
+
| ------------ | ----------- | ------------------ | -------------------------------------------------- |
|
|
61
|
+
| `children` | `ReactNode` | - | Child components to be rendered within the action. |
|
|
62
|
+
| `dataTestId` | `string` | `'message-action'` | Customizable test identifier for the action. |
|
|
63
|
+
|
|
64
|
+
## Stack
|
|
65
|
+
|
|
66
|
+
- [TypeScript](https://www.typescriptlang.org/) for static type checking
|
|
67
|
+
- [React](https://reactjs.org/) — JavaScript library for user interfaces
|
|
68
|
+
- [Emotion](https://emotion.sh/docs/introduction) — for writing css styles with JavaScript
|
|
69
|
+
- [Storybook](https://storybook.js.org/) — UI component environment powered by Vite
|
|
70
|
+
- [Jest](https://jestjs.io/) - JavaScript Testing Framework
|
|
71
|
+
- [React Testing Library](https://testing-library.com/) - to test UI components in a user-centric way
|
|
72
|
+
- [ESLint](https://eslint.org/) for code linting
|
|
73
|
+
- [Prettier](https://prettier.io) for code formatting
|
|
74
|
+
- [Tsup](https://github.com/egoist/tsup) — TypeScript bundler powered by esbuild
|
|
75
|
+
- [Yarn](https://yarnpkg.com/) from managing packages
|
|
76
|
+
|
|
77
|
+
## Commands
|
|
78
|
+
|
|
79
|
+
- `yarn build` - Build the package
|
|
80
|
+
- `yarn dev` - Run the package locally
|
|
81
|
+
- `yarn lint` - Lint all files within this package
|
|
82
|
+
- `yarn test` - Run all unit tests
|
|
83
|
+
- `yarn test:report` - Open the test coverage report
|
|
84
|
+
- `yarn test:update:snapshot` - Run all unit tests and update the snapshot
|
|
85
|
+
|
|
86
|
+
## Compilation
|
|
87
|
+
|
|
88
|
+
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.
|
|
89
|
+
|
|
90
|
+
The `/dist` folder contains the compiled output.
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
message
|
|
94
|
+
└── dist
|
|
95
|
+
├── index.d.ts <-- Types
|
|
96
|
+
├── index.js <-- CommonJS version
|
|
97
|
+
└── index.mjs <-- ES Modules version
|
|
98
|
+
...
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
## Versioning
|
|
102
|
+
|
|
103
|
+
Follows [semantic versioning](https://semver.org/)
|
|
104
|
+
|
|
105
|
+
## © License
|
|
106
|
+
|
|
107
|
+
Licensed under [MIT License](LICENSE.md)
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { BaseProps, Theme } from '@dt-dds/react-core';
|
|
2
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
|
+
import { SVGProps, ReactElement } from 'react';
|
|
4
|
+
|
|
5
|
+
declare const OMessageType: {
|
|
6
|
+
readonly Default: "default";
|
|
7
|
+
readonly Error: "error";
|
|
8
|
+
readonly Info: "informative";
|
|
9
|
+
readonly Success: "success";
|
|
10
|
+
readonly Warning: "warning";
|
|
11
|
+
};
|
|
12
|
+
type MessageType = (typeof OMessageType)[keyof typeof OMessageType];
|
|
13
|
+
|
|
14
|
+
interface MessageProps extends BaseProps {
|
|
15
|
+
type: MessageType;
|
|
16
|
+
onClose?: (event: React.MouseEvent<HTMLButtonElement>) => void;
|
|
17
|
+
}
|
|
18
|
+
type MessageIcon = (props: SVGProps<SVGSVGElement>) => ReactElement;
|
|
19
|
+
declare const MessageIcons: Record<MessageType, MessageIcon | null>;
|
|
20
|
+
declare const Message: {
|
|
21
|
+
({ children, dataTestId, style, type, onClose, }: MessageProps): react_jsx_runtime.JSX.Element;
|
|
22
|
+
Title({ children }: BaseProps): react_jsx_runtime.JSX.Element;
|
|
23
|
+
Description({ children }: BaseProps): react_jsx_runtime.JSX.Element;
|
|
24
|
+
Action({ children, dataTestId }: BaseProps): react_jsx_runtime.JSX.Element;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
declare module '@emotion/react' {
|
|
28
|
+
interface Theme extends Theme {
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export { Message, MessageIcons, MessageProps };
|