@dt-dds/react-tag 1.0.0-beta.43

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,395 @@
1
+ # @dt-ui/react-tag
2
+
3
+ ## 1.0.0-beta.43
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.42
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.41
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.40
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.39
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.38
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.37
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.36
75
+
76
+ ### Minor Changes
77
+
78
+ - feat: update tag according to designs
79
+
80
+ ## 0.1.0-beta.35
81
+
82
+ ### Patch Changes
83
+
84
+ - fix: change content.light contextual color
85
+ - Updated dependencies
86
+ - @dt-ui/react-core@0.1.0-beta.35
87
+
88
+ ## 0.1.0-beta.34
89
+
90
+ ### Patch Changes
91
+
92
+ - fix: add accent to colors type
93
+ - Updated dependencies
94
+ - @dt-ui/react-core@0.1.0-beta.34
95
+
96
+ ## 0.1.0-beta.33
97
+
98
+ ### Patch Changes
99
+
100
+ - fix: change button text according to ux
101
+ - Updated dependencies
102
+ - @dt-ui/react-core@0.1.0-beta.33
103
+
104
+ ## 0.1.0-beta.32
105
+
106
+ ### Patch Changes
107
+
108
+ - chore: update contexual colors
109
+ - Updated dependencies
110
+ - @dt-ui/react-core@0.1.0-beta.32
111
+
112
+ ## 0.1.0-beta.31
113
+
114
+ ### Patch Changes
115
+
116
+ - style: update responsive font styles
117
+ - Updated dependencies
118
+ - @dt-ui/react-core@0.1.0-beta.31
119
+
120
+ ## 0.1.0-beta.30
121
+
122
+ ### Minor Changes
123
+
124
+ - feat: add spinner size 'extra-small' & update specs
125
+
126
+ ### Patch Changes
127
+
128
+ - Updated dependencies
129
+ - @dt-ui/react-core@0.1.0-beta.30
130
+
131
+ ## 0.1.0-beta.29
132
+
133
+ ### Patch Changes
134
+
135
+ - chore: add theme breakpoints
136
+ - Updated dependencies
137
+ - @dt-ui/react-core@0.1.0-beta.29
138
+
139
+ ## 0.1.0-beta.28
140
+
141
+ ### Minor Changes
142
+
143
+ - feat: add id to base props
144
+
145
+ ### Patch Changes
146
+
147
+ - Updated dependencies
148
+ - @dt-ui/react-core@0.1.0-beta.28
149
+
150
+ ## 0.1.0-beta.27
151
+
152
+ ### Minor Changes
153
+
154
+ - feat: change breakpoints values
155
+
156
+ ### Patch Changes
157
+
158
+ - Updated dependencies
159
+ - @dt-ui/react-core@0.1.0-beta.27
160
+
161
+ ## 0.1.0-beta.26
162
+
163
+ ### Patch Changes
164
+
165
+ - fix: replace body to correct one
166
+ - Updated dependencies
167
+ - @dt-ui/react-core@0.1.0-beta.26
168
+
169
+ ## 0.1.0-beta.25
170
+
171
+ ### Patch Changes
172
+
173
+ - chore: add theme colors missing types
174
+ - Updated dependencies
175
+ - @dt-ui/react-core@0.1.0-beta.25
176
+
177
+ ## 0.1.0-beta.24
178
+
179
+ ### Patch Changes
180
+
181
+ - refactor: drop truckapi theme
182
+ - Updated dependencies
183
+ - @dt-ui/react-core@0.1.0-beta.24
184
+
185
+ ## 0.1.0-beta.23
186
+
187
+ ### Minor Changes
188
+
189
+ - feat: update core and semantic colors
190
+ - feat: remove greenlane theme
191
+
192
+ ### Patch Changes
193
+
194
+ - Updated dependencies
195
+ - Updated dependencies
196
+ - @dt-ui/react-core@0.1.0-beta.23
197
+
198
+ ## 0.1.0-beta.22
199
+
200
+ ### Minor Changes
201
+
202
+ - feat: add icon option for truckapi theme
203
+
204
+ ### Patch Changes
205
+
206
+ - Updated dependencies
207
+ - @dt-ui/react-core@0.1.0-beta.22
208
+
209
+ ## 0.1.0-beta.21
210
+
211
+ ### Patch Changes
212
+
213
+ - fix: tooltip z index
214
+ - Updated dependencies
215
+ - @dt-ui/react-core@0.1.0-beta.21
216
+
217
+ ## 0.1.0-beta.20
218
+
219
+ ### Minor Changes
220
+
221
+ - feat: add segmented control component
222
+
223
+ ### Patch Changes
224
+
225
+ - Updated dependencies
226
+ - @dt-ui/react-core@0.1.0-beta.20
227
+
228
+ ## 0.1.0-beta.19
229
+
230
+ ### Patch Changes
231
+
232
+ - fix: add shape for tooltip on truckapi theme
233
+ - Updated dependencies
234
+ - @dt-ui/react-core@0.1.0-beta.19
235
+
236
+ ## 0.1.0-beta.18
237
+
238
+ ### Patch Changes
239
+
240
+ - fix: remove devDependecy export
241
+ - Updated dependencies
242
+ - @dt-ui/react-core@0.1.0-beta.18
243
+
244
+ ## 0.1.0-beta.17
245
+
246
+ ### Patch Changes
247
+
248
+ - test: add test custom render
249
+ - Updated dependencies
250
+ - @dt-ui/react-core@0.1.0-beta.17
251
+
252
+ ## 0.1.0-beta.16
253
+
254
+ ### Minor Changes
255
+
256
+ - feat: create select
257
+
258
+ ### Patch Changes
259
+
260
+ - Updated dependencies
261
+ - @dt-ui/react-core@0.1.0-beta.16
262
+
263
+ ## 0.1.0-beta.15
264
+
265
+ ### Patch Changes
266
+
267
+ - fix: show shadows only when scroll is visible
268
+ - Updated dependencies
269
+ - @dt-ui/react-core@0.1.0-beta.15
270
+
271
+ ## 0.1.0-beta.14
272
+
273
+ ### Patch Changes
274
+
275
+ - fix: update border radius theme specifications
276
+ - Updated dependencies
277
+ - @dt-ui/react-core@0.1.0-beta.14
278
+
279
+ ## 0.1.0-beta.13
280
+
281
+ ### Patch Changes
282
+
283
+ - fix: match accordion design
284
+ - Updated dependencies
285
+ - @dt-ui/react-core@0.1.0-beta.13
286
+
287
+ ## 0.1.0-beta.12
288
+
289
+ ### Patch Changes
290
+
291
+ - fix: make icons an optional property in theme
292
+ - Updated dependencies
293
+ - @dt-ui/react-core@0.1.0-beta.12
294
+
295
+ ## 0.1.0-beta.11
296
+
297
+ ### Patch Changes
298
+
299
+ - refactor: extract text-field to new package with greenlane theme
300
+ - Updated dependencies
301
+ - @dt-ui/react-core@0.1.0-beta.11
302
+
303
+ ## 0.1.0-beta.10
304
+
305
+ ### Patch Changes
306
+
307
+ - refactor: move and refactor checkbox refactor checkbox according to design
308
+ - Updated dependencies
309
+ - @dt-ui/react-core@0.1.0-beta.10
310
+
311
+ ## 0.1.0-beta.9
312
+
313
+ ### Patch Changes
314
+
315
+ - fix(icons): export css and update imports on deps
316
+ - Updated dependencies
317
+ - @dt-ui/react-core@0.1.0-beta.9
318
+
319
+ ## 0.1.0-beta.8
320
+
321
+ ### Patch Changes
322
+
323
+ - chore: update component generator and lint fixes
324
+
325
+ ## 0.1.0-beta.7
326
+
327
+ ### Patch Changes
328
+
329
+ - chore: move util functions to the core
330
+ - Updated dependencies
331
+ - @dt-ui/react-core@0.1.0-beta.8
332
+
333
+ ## 0.1.0-beta.6
334
+
335
+ ### Minor Changes
336
+
337
+ - feat: add contextual color add content tertiary to palette
338
+
339
+ ### Patch Changes
340
+
341
+ - Updated dependencies
342
+ - @dt-ui/react-core@0.1.0-beta.7
343
+
344
+ ## 0.1.0-beta.5
345
+
346
+ ### Minor Changes
347
+
348
+ - feat: create Icons package
349
+ - feat: add icons to theme Provider
350
+
351
+ ### Patch Changes
352
+
353
+ - Updated dependencies
354
+ - Updated dependencies
355
+ - @dt-ui/react-core@0.1.0-beta.6
356
+
357
+ ## 0.1.0-beta.4
358
+
359
+ ### Minor Changes
360
+
361
+ - feat: create TruckAPI theme and update default
362
+
363
+ ### Patch Changes
364
+
365
+ - Updated dependencies
366
+ - @dt-ui/react-core@0.1.0-beta.5
367
+
368
+ ## 0.1.0-beta.3
369
+
370
+ ### Minor Changes
371
+
372
+ - feat: update contextual color to follow figma spec
373
+
374
+ ### Patch Changes
375
+
376
+ - Updated dependencies
377
+ - @dt-ui/react-core@0.1.0-beta.4
378
+
379
+ ## 0.1.0-beta.2
380
+
381
+ ### Minor Changes
382
+
383
+ - feat: review Message designs based on designs
384
+
385
+ ### Patch Changes
386
+
387
+ - Updated dependencies
388
+ - @dt-ui/react-core@0.1.0-beta.3
389
+
390
+ ## 0.1.0-beta.1
391
+
392
+ ### Patch Changes
393
+
394
+ - fix: drop tag group
395
+ - chore: convert tag to 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,75 @@
1
+ # Tag Package
2
+
3
+ Tags can be used to display states (Active, Cancelled...) in lists, tables, etc.
4
+
5
+ ## Tag Usage
6
+
7
+ ```jsx
8
+ import { Tag } from '@dt-dds/react-tag';
9
+
10
+ export const App = () => {
11
+ return <Tag>Active</Tag>;
12
+ };
13
+ ```
14
+
15
+ ## Properties
16
+
17
+ ### Tag
18
+
19
+ | Property | Type | Default | Description |
20
+ | ------------- | ------------ | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ |
21
+ | `children` | `ReactNode` | - | Child components to be rendered |
22
+ | `dataTestId` | `string` | tag | Customizable test identifier |
23
+ | `variant` | `TagVariant` | solid | Determines the variant of the tag |
24
+ | `color` | `TagColor` | primary | Determines the color of the tag |
25
+ | `size` | `TagSize` | small | Determines the size of the tag |
26
+ | `border` | `TagBorder` | squared | Determines the border style of the tag |
27
+ | `isDisabled` | `boolean` | false | Specifies if the element should be disabled |
28
+ | `isClickable` | `boolean` | false | Specifies if the element should have the clickable styles |
29
+ | `onClick` | `function` | - | The triggered function when the tag is clicked. This also applies the clickable styles. If the component has the onClose property this will not be triggered |
30
+ | `onClose` | `function` | - | The triggered function when closing the tag |
31
+
32
+ ## Stack
33
+
34
+ - [TypeScript](https://www.typescriptlang.org/) for static type checking
35
+ - [React](https://reactjs.org/) — JavaScript library for user interfaces
36
+ - [Emotion](https://emotion.sh/docs/introduction) — for writing css styles with JavaScript
37
+ - [Storybook](https://storybook.js.org/) — UI component environment powered by Vite
38
+ - [Jest](https://jestjs.io/) - JavaScript Testing Framework
39
+ - [React Testing Library](https://testing-library.com/) - to test UI components in a user-centric way
40
+ - [ESLint](https://eslint.org/) for code linting
41
+ - [Prettier](https://prettier.io) for code formatting
42
+ - [Tsup](https://github.com/egoist/tsup) — TypeScript bundler powered by esbuild
43
+ - [Yarn](https://yarnpkg.com/) from managing packages
44
+
45
+ ## Commands
46
+
47
+ - `yarn build` - Build the package
48
+ - `yarn dev` - Run the package locally
49
+ - `yarn lint` - Lint all files within this package
50
+ - `yarn test` - Run all unit tests
51
+ - `yarn test:report` - Open the test coverage report
52
+ - `yarn test:update:snapshot` - Run all unit tests and update the snapshot
53
+
54
+ ## Compilation
55
+
56
+ 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.
57
+
58
+ The `/dist` folder contains the compiled output.
59
+
60
+ ```bash
61
+ tag
62
+ └── dist
63
+ ├── index.d.ts <-- Types
64
+ ├── index.js <-- CommonJS version
65
+ └── index.mjs <-- ES Modules version
66
+ ...
67
+ ```
68
+
69
+ ## Versioning
70
+
71
+ Follows [semantic versioning](https://semver.org/)
72
+
73
+ ## &copy; License
74
+
75
+ Licensed under [MIT License](LICENSE.md)
@@ -0,0 +1,38 @@
1
+ import { ComponentSize, BaseProps, Theme } from '@dt-dds/react-core';
2
+ import * as react from 'react';
3
+ import { TooltipBackground } from '@dt-dds/react-tooltip';
4
+
5
+ type TagColor = 'primary' | 'secondary' | 'informative' | 'warning' | 'success' | 'error';
6
+ type TagVariant = 'solid' | 'outlined';
7
+ type TagBorder = 'rounded' | 'squared';
8
+ type TagSize = Extract<ComponentSize, 'small' | 'medium'>;
9
+
10
+ type TagProps = {
11
+ variant?: TagVariant;
12
+ color?: TagColor;
13
+ border?: TagBorder;
14
+ size?: TagSize;
15
+ isDisabled?: boolean;
16
+ isClickable?: boolean;
17
+ onClick?: (event: React.MouseEvent<HTMLDivElement> | React.KeyboardEvent<HTMLDivElement>) => void;
18
+ onClose?: (event: React.MouseEvent<HTMLButtonElement> | React.KeyboardEvent<HTMLButtonElement>) => void;
19
+ tooltipVariant?: TooltipBackground;
20
+ } & BaseProps;
21
+ declare const Tag: react.ForwardRefExoticComponent<{
22
+ variant?: TagVariant | undefined;
23
+ color?: TagColor | undefined;
24
+ border?: TagBorder | undefined;
25
+ size?: TagSize | undefined;
26
+ isDisabled?: boolean | undefined;
27
+ isClickable?: boolean | undefined;
28
+ onClick?: ((event: React.MouseEvent<HTMLDivElement> | React.KeyboardEvent<HTMLDivElement>) => void) | undefined;
29
+ onClose?: ((event: React.MouseEvent<HTMLButtonElement> | React.KeyboardEvent<HTMLButtonElement>) => void) | undefined;
30
+ tooltipVariant?: TooltipBackground | undefined;
31
+ } & BaseProps & react.RefAttributes<HTMLDivElement>>;
32
+
33
+ declare module '@emotion/react' {
34
+ interface Theme extends Theme {
35
+ }
36
+ }
37
+
38
+ export { Tag, TagBorder, TagColor, TagProps, TagSize, TagVariant };