@db-ux/react-core-components 2.4.4 → 3.0.1

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.
Files changed (47) hide show
  1. package/dist/components/brand/brand.js +2 -2
  2. package/dist/components/button/button.d.ts +1 -1
  3. package/dist/components/button/button.js +12 -2
  4. package/dist/components/button/model.d.ts +6 -22
  5. package/dist/components/button/model.js +0 -1
  6. package/dist/components/card/card.js +1 -1
  7. package/dist/components/checkbox/checkbox.js +3 -2
  8. package/dist/components/custom-select/custom-select.js +15 -7
  9. package/dist/components/custom-select/model.d.ts +1 -0
  10. package/dist/components/custom-select-list-item/custom-select-list-item.js +3 -3
  11. package/dist/components/custom-select-list-item/model.d.ts +1 -1
  12. package/dist/components/header/header.js +12 -17
  13. package/dist/components/infotext/infotext.js +2 -2
  14. package/dist/components/input/input.d.ts +1 -1
  15. package/dist/components/input/input.js +11 -10
  16. package/dist/components/input/model.d.ts +6 -2
  17. package/dist/components/link/link.d.ts +1 -1
  18. package/dist/components/link/link.js +2 -2
  19. package/dist/components/link/model.d.ts +3 -3
  20. package/dist/components/link/model.js +1 -1
  21. package/dist/components/navigation/model.d.ts +2 -2
  22. package/dist/components/navigation/navigation.d.ts +1 -1
  23. package/dist/components/navigation/navigation.js +1 -1
  24. package/dist/components/navigation-item/model.d.ts +2 -6
  25. package/dist/components/navigation-item/navigation-item.d.ts +1 -1
  26. package/dist/components/navigation-item/navigation-item.js +2 -2
  27. package/dist/components/notification/notification.js +2 -2
  28. package/dist/components/radio/radio.js +1 -2
  29. package/dist/components/select/select.js +4 -3
  30. package/dist/components/switch/model.d.ts +2 -2
  31. package/dist/components/switch/switch.d.ts +1 -1
  32. package/dist/components/switch/switch.js +1 -1
  33. package/dist/components/tab-item/model.d.ts +2 -2
  34. package/dist/components/tab-item/tab-item.d.ts +1 -1
  35. package/dist/components/tab-item/tab-item.js +4 -3
  36. package/dist/components/tab-panel/model.d.ts +2 -2
  37. package/dist/components/tab-panel/tab-panel.d.ts +1 -1
  38. package/dist/components/tab-panel/tab-panel.js +1 -1
  39. package/dist/components/tabs/tabs.js +1 -1
  40. package/dist/components/tag/model.d.ts +2 -6
  41. package/dist/components/tag/tag.js +3 -21
  42. package/dist/components/textarea/textarea.js +3 -2
  43. package/dist/index.d.ts +39 -0
  44. package/dist/index.js +39 -0
  45. package/dist/shared/model.d.ts +28 -27
  46. package/dist/shared/model.js +0 -1
  47. package/package.json +14 -14
@@ -13,11 +13,6 @@ export type GlobalProps = {
13
13
  * Workaround for TypeScript using class for all components.
14
14
  */
15
15
  class?: string | any;
16
- /**
17
- * @deprecated
18
- * [`aria-describedby`](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-describedby) is used to link to the elements that describe the element with the set attribute.
19
- */
20
- describedbyid?: string;
21
16
  /**
22
17
  * [ID](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/id) of the component, generated automatically for some components as a fallback if unset.
23
18
  */
@@ -51,11 +46,31 @@ export type ShowIconProps = {
51
46
  */
52
47
  showIcon?: boolean | string;
53
48
  };
54
- export type IconAfterProps = {
49
+ export type ShowIconLeadingProps = {
50
+ /**
51
+ * Enables or disables the visibility of the leading icon.
52
+ * For many components this property is optional to reflect Figma properties.
53
+ */
54
+ showIconLeading?: boolean | string;
55
+ };
56
+ export type ShowIconTrailingProps = {
57
+ /**
58
+ * Enables or disables the visibility of the trailing icon.
59
+ * For many components this property is optional to reflect Figma properties.
60
+ */
61
+ showIconTrailing?: boolean | string;
62
+ };
63
+ export type IconLeadingProps = {
64
+ /**
65
+ * Define an icon by its identifier (like e.g. _user_, compare to [Icons](https://design-system.deutschebahn.com/core-web/review/main/foundations/icons/overview)) to get displayed in front of the elements content.
66
+ */
67
+ iconLeading?: IconTypes;
68
+ };
69
+ export type IconTrailingProps = {
55
70
  /**
56
71
  * Define an icon by its identifier (like e.g. _user_, compare to [Icons](https://design-system.deutschebahn.com/core-web/review/main/foundations/icons/overview)) to get displayed in front of the elements content.
57
72
  */
58
- iconAfter?: IconTypes;
73
+ iconTrailing?: IconTypes;
59
74
  };
60
75
  export declare const SpacingList: readonly ["medium", "small", "large", "none"];
61
76
  export type SpacingType = (typeof SpacingList)[number];
@@ -108,6 +123,12 @@ export type OverflowProps = {
108
123
  */
109
124
  overflow?: boolean | string;
110
125
  };
126
+ export type WrapProps = {
127
+ /**
128
+ * Determines whether the text should wrap when its parent container is too small, preventing overflow.
129
+ */
130
+ wrap?: boolean | string;
131
+ };
111
132
  export declare const OrientationList: readonly ["horizontal", "vertical"];
112
133
  export type OrientationType = (typeof OrientationList)[number];
113
134
  export type OrientationProps = {
@@ -346,17 +367,11 @@ export type FormState = {
346
367
  export type InitializedState = {
347
368
  initialized: boolean;
348
369
  };
349
- export declare const LinkCurrentList: readonly ["time", "true", "false", "date", "page", "step", "location"];
350
- export type LinkCurrentType = (typeof LinkCurrentList)[number];
351
370
  export declare const LinkTargetList: readonly ["_self", "_blank", "_parent", "_top"];
352
371
  export type LinkTargetType = (typeof LinkTargetList)[number];
353
372
  export declare const LinkReferrerPolicyList: readonly ["no-referrer", "no-referrer-when-downgrade", "origin", "origin-when-cross-origin", "same-origin", "strict-origin", "strict-origin-when-cross-origin", "unsafe-url"];
354
373
  export type LinkReferrerPolicyType = (typeof LinkReferrerPolicyList)[number];
355
374
  export type LinkProps = {
356
- /**
357
- * Sets aria attribute based on [`aria-current`](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-current).
358
- */
359
- current?: boolean | LinkCurrentType;
360
375
  /**
361
376
  * Disables the link.
362
377
  */
@@ -369,10 +384,6 @@ export type LinkProps = {
369
384
  * Hints for the human [language of the linked page or document](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#hreflang).
370
385
  */
371
386
  hreflang?: string;
372
- /**
373
- * Sets aria attribute based on [`aria-label`](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-label).
374
- */
375
- label?: string;
376
387
  /**
377
388
  * Where to open the linked URL, as the name for a [browsing context](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#target).
378
389
  */
@@ -389,10 +400,6 @@ export type LinkProps = {
389
400
  * How much of the referrer to send when following the link.
390
401
  */
391
402
  referrerpolicy?: LinkReferrerPolicyType;
392
- /**
393
- * Sets aria role based on [`aria-selected`](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-selected).
394
- */
395
- selected?: boolean | string;
396
403
  };
397
404
  export type TextProps = {
398
405
  /**
@@ -493,12 +500,6 @@ export type NavigationBackButtonProps = {
493
500
  */
494
501
  backButtonText?: string;
495
502
  };
496
- export type AriaLabelledByProps = {
497
- /**
498
- * Pass `aria-labelledby` to inner element
499
- */
500
- labelledBy?: string;
501
- };
502
503
  export type AriaControlsProps = {
503
504
  /**
504
505
  * Pass `aria-controls` to inner element
@@ -16,7 +16,6 @@ export const ValidationList = ['invalid', 'valid', 'no-validation'];
16
16
  export const FieldSizingList = ['fixed', 'content'];
17
17
  export const LabelVariantList = ['above', 'floating'];
18
18
  export const AutoCompleteList = ['off', 'on', 'name', 'honorific-prefix', 'given-name', 'additional-name', 'family-name', 'honorific-suffix', 'nickname', 'email', 'username', 'new-password', 'current-password', 'one-time-code', 'organization-title', 'organization', 'street-address', 'shipping', 'billing', 'address-line1', 'address-line2', 'address-line3', 'address-level4', 'address-level3', 'address-level2', 'address-level1', 'country', 'country-name', 'postal-code', 'cc-name', 'cc-given-name', 'cc-additional-name', 'cc-family-name', 'cc-number', 'cc-exp', 'cc-exp-month', 'cc-exp-year', 'cc-csc', 'cc-type', 'transaction-currency', 'transaction-amount', 'language', 'bday', 'bday-day', 'bday-month', 'bday-year', 'sex', 'tel', 'tel-country-code', 'tel-national', 'tel-area-code', 'tel-local', 'tel-extension', 'impp', 'url', 'photo', 'webauthn'];
19
- export const LinkCurrentList = ['time', 'true', 'false', 'date', 'page', 'step', 'location'];
20
19
  export const LinkTargetList = ['_self', '_blank', '_parent', '_top'];
21
20
  export const LinkReferrerPolicyList = ['no-referrer', 'no-referrer-when-downgrade', 'origin', 'origin-when-cross-origin', 'same-origin', 'strict-origin', 'strict-origin-when-cross-origin', 'unsafe-url'];
22
21
  export const AlignmentList = ['start', 'center'];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@db-ux/react-core-components",
3
- "version": "2.4.4",
3
+ "version": "3.0.1",
4
4
  "description": "React components for @db-ux/core-components",
5
5
  "repository": {
6
6
  "type": "git",
@@ -15,22 +15,22 @@
15
15
  ],
16
16
  "scripts": {
17
17
  "build": "npm-run-all tsc",
18
- "mv:dist": "cpr dist ../../build-outputs/react/dist -o",
19
- "mv:package.json": "cpr package.json ../../build-outputs/react/package.json -o",
20
- "mv:readme": "cpr README.md ../../build-outputs/react/README.md -o",
18
+ "mv:dist": "cpr dist ../../build-outputs/react/dist --overwrite",
19
+ "mv:package.json": "cpr package.json ../../build-outputs/react/package.json --overwrite",
20
+ "mv:readme": "cpr README.md ../../build-outputs/react/README.md --overwrite",
21
21
  "open:report": "npx playwright show-report",
22
22
  "postbuild": "npm-run-all --parallel mv:*",
23
- "regenerate:screenshots": "playwright test -c playwright.config.ts --update-snapshots",
24
- "test:components": "playwright test -c playwright.config.ts",
25
- "test:windows": "playwright test -c playwright.screen-reader.win.ts",
26
- "test:components:ui": "playwright test -c playwright.config.ts --ui",
27
- "tsc": "tsc -p . --sourceMap false"
23
+ "regenerate:screenshots": "playwright test --config playwright.config.ts --update-snapshots",
24
+ "test:components": "playwright test --config playwright.config.ts",
25
+ "test:windows": "playwright test --config playwright.screen-reader.win.ts",
26
+ "test:components:ui": "playwright test --config playwright.config.ts --ui",
27
+ "tsc": "tsc --project . --sourceMap false"
28
28
  },
29
29
  "devDependencies": {
30
30
  "@playwright/experimental-ct-react": "1.54.1",
31
- "@types/react": "^18.3.13",
32
- "react": "^18.3.1",
33
- "react-dom": "^18.3.1"
31
+ "@types/react": "18.3.13",
32
+ "react": "18.3.1",
33
+ "react-dom": "18.3.1"
34
34
  },
35
35
  "publishConfig": {
36
36
  "registry": "https://registry.npmjs.org/",
@@ -38,7 +38,7 @@
38
38
  },
39
39
  "sideEffects": false,
40
40
  "dependencies": {
41
- "@db-ux/core-components": "2.4.4",
42
- "@db-ux/core-foundations": "2.4.4"
41
+ "@db-ux/core-components": "3.0.1",
42
+ "@db-ux/core-foundations": "3.0.1"
43
43
  }
44
44
  }