@db-ux/react-core-components 4.7.3 → 4.8.1-fix-publish-f7808e2

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 CHANGED
@@ -1,9 +1,18 @@
1
1
  # @db-ux/react-core-components
2
2
 
3
- ## 4.7.3
3
+ ## 4.8.1
4
4
 
5
5
  _version bump_
6
6
 
7
+ ## 4.8.0
8
+
9
+ ### Minor Changes
10
+
11
+ - Notification content now supports additional inline elements like `span` without styling collisions. And added the possibility to set the duration as a machine-readable value via the new `timestampDatetime` property - [see commit dae5149](https://github.com/db-ux-design-system/core-web/commit/dae514902f92a74cb95a3a3adab205d560174692)
12
+
13
+ ## 4.7.3
14
+
15
+ _version bump_
7
16
 
8
17
  ## 4.7.2
9
18
 
@@ -42,7 +51,7 @@ _version bump_
42
51
  - docs(vite): mentioning version 8 configuration in `README.md` file - [see commit 4c5fc92](https://github.com/db-ux-design-system/core-web/commit/4c5fc9266402d9585087f4738a1a800cff1515f1)
43
52
 
44
53
  - fix(number input): prevent from clearing on intermediate decimal entry - [see commit aa85967](https://github.com/db-ux-design-system/core-web/commit/aa85967ffeaa685f6b647069d0e1d415d812dc87):
45
- - fix(input,textarea): allow using `undefined` as `value`
54
+ - fix(input,textarea): allow using `undefined` as `value`
46
55
 
47
56
  ## 4.5.4
48
57
 
@@ -184,7 +193,7 @@ _version bump_
184
193
 
185
194
  - fix: set DBTabItem internal state `_selected` correctly - [see commit f7625cb](https://github.com/db-ux-design-system/core-web/commit/f7625cbd9d64513527e826c9d2c1ef42b2734a4b):
186
195
 
187
- - Now also sets aria-selected=true|false correctly which improves screen reader behaviour
196
+ - Now also sets aria-selected=true|false correctly which improves screen reader behaviour
188
197
 
189
198
  ## 4.2.1
190
199
 
@@ -205,14 +214,14 @@ _version bump_
205
214
  - refactor(notification): update and simplify grid layout for block link variant - [see commit cb83f96](https://github.com/db-ux-design-system/core-web/commit/cb83f966eaf29c85b4cf0079750bdd563f216d6e)
206
215
 
207
216
  - fix(DBCustomSelect): properly announce selected options - [see commit 773edeb](https://github.com/db-ux-design-system/core-web/commit/773edeb943a085eb79e1c8d59059137b2830fbf0):
208
- - feat(DBCustomSelect): introduce new property `selectedPrefix`
217
+ - feat(DBCustomSelect): introduce new property `selectedPrefix`
209
218
 
210
219
  ### Patch Changes
211
220
 
212
221
  - fix(DBCustomSelect): automatically handle form reset events - [see commit 6af5246](https://github.com/db-ux-design-system/core-web/commit/6af5246b3b2e6febdc6ff6342ba1a8eb10184d14):
213
- - An event listener is now added for every form component (input, custom-select, etc.) when a `form` property is passed.
214
- - This listener detects form resets and updates the component's internal value/checked state accordingly.
215
- - > **Note**: This does not work for `ngModel` in Angular.
222
+ - An event listener is now added for every form component (input, custom-select, etc.) when a `form` property is passed.
223
+ - This listener detects form resets and updates the component's internal value/checked state accordingly.
224
+ - > **Note**: This does not work for `ngModel` in Angular.
216
225
 
217
226
  - fix(button): Replace fixed height with min-height for buttons to allow dynamic height adjustment when text wraps - [see commit d1fd2c4](https://github.com/db-ux-design-system/core-web/commit/d1fd2c4e58a5ed6f75fab44700cd2d93c7232474)
218
227
 
@@ -247,9 +256,9 @@ _version bump_
247
256
  ### Major Changes
248
257
 
249
258
  - feat: Switch stable rework - [see commit cb2deb0](https://github.com/db-ux-design-system/core-web/commit/cb2deb0f1c54900d1967483aea05d81279c02f59):
250
- - **BREAKING CHANGE**: remove `emphasis` property
251
- - introduce validation (invalid and valid)
252
- - configurable label position
259
+ - **BREAKING CHANGE**: remove `emphasis` property
260
+ - introduce validation (invalid and valid)
261
+ - configurable label position
253
262
 
254
263
  - **BREAKING CHANGE**: refactor(Custom Select): renamed `ariaListLabel` property to `listLabel` - [see commit 966d5ad](https://github.com/db-ux-design-system/core-web/commit/966d5ad01f00d0ca1707cc316a63e2d431fff1e9)
255
264
 
@@ -268,12 +277,12 @@ _version bump_
268
277
  ### Patch Changes
269
278
 
270
279
  - fix(DBTabs): ensure navigation arrows appear correctly on window resize - [see commit 4e65e00](https://github.com/db-ux-design-system/core-web/commit/4e65e00d280cae18baee03b5a7a9b13eec063835):
271
- - This update resolves an issue where navigation arrows in DBTabs would not appear or update correctly when the window was resized. The component now properly responds to resize events, ensuring arrows are always shown or hidden as needed.
280
+ - This update resolves an issue where navigation arrows in DBTabs would not appear or update correctly when the window was resized. The component now properly responds to resize events, ensuring arrows are always shown or hidden as needed.
272
281
 
273
282
  - fix(select): jumping placeholder for label above - [see commit 7ed8d22](https://github.com/db-ux-design-system/core-web/commit/7ed8d2225102e0e9044437e95917e11eef4bc73f)
274
283
 
275
284
  - enabled [`@db-ux/agent-cli`](https://www.npmjs.com/package/@db-ux/agent-cli) for every package - [see commit 0233048](https://github.com/db-ux-design-system/core-web/commit/023304869e61f5a506dca66a22d69e5f3d70f4d0):
276
- - auto-generate/auto-update `.github/copilot-instructions.md`, to ensure GitHub Copilot uses DB UX Components for code generation
285
+ - auto-generate/auto-update `.github/copilot-instructions.md`, to ensure GitHub Copilot uses DB UX Components for code generation
277
286
 
278
287
  ## 3.1.17
279
288
 
@@ -287,8 +296,8 @@ _version bump_
287
296
  ### Patch Changes
288
297
 
289
298
  - a28eb71: fix(custom-select): keyboard navigation for option groups in single-select mode - [see commit 6d60bab](https://github.com/db-ux-design-system/core-web/commit/6d60bab2eb87f16a9ffa942085bffd658564769c):
290
- - Fixes a keyboard accessibility issue where users could not navigate to options in subsequent option groups using arrow keys in single-select mode.
291
- - Now, all options are accessible via keyboard regardless of group boundaries.
299
+ - Fixes a keyboard accessibility issue where users could not navigate to options in subsequent option groups using arrow keys in single-select mode.
300
+ - Now, all options are accessible via keyboard regardless of group boundaries.
292
301
  - fix: JS framework core-components packages are missing `@db-ux` dependencies - [see commit 49df866](https://github.com/db-ux-design-system/core-web/commit/49df866e753a9459f5acdca4ad1e19141b477471)
293
302
 
294
303
  ## 3.1.15
package/README.md CHANGED
@@ -21,16 +21,19 @@ npm i @db-ux/react-core-components
21
21
 
22
22
  Import the styles in scss or css. Based on your technology the file names could be different.
23
23
 
24
- - Default (relative): points to `../assets`
25
- - Rollup (rollup): points to `@db-ux/core-foundations/assets`
26
- - Webpack (webpack): points to `~@db-ux/core-foundations/assets`
24
+ - Default (relative): points to `../assets`
25
+ - Rollup (rollup): points to `@db-ux/core-foundations/assets`
26
+ - Webpack (webpack): points to `~@db-ux/core-foundations/assets`
27
27
 
28
28
  <details>
29
29
  <summary><strong>SCSS</strong></summary>
30
30
 
31
31
  ```scss
32
32
  // index.scss
33
- @forward "@db-ux/core-components/build/styles/rollup";
33
+ @forward "@db-ux/core-foundations/build/styles/theme/rollup"; // Palette tokens
34
+ @forward "@db-ux/core-foundations/build/styles/bundle"; // Semantic tokens
35
+ @forward "@db-ux/core-foundations/build/styles/icons/rollup"; // Icon fonts
36
+ @forward "@db-ux/core-components/build/styles/rollup"; // Component styling
34
37
  ```
35
38
 
36
39
  </details>
@@ -38,8 +41,11 @@ Import the styles in scss or css. Based on your technology the file names could
38
41
  <summary><strong>CSS</strong></summary>
39
42
 
40
43
  ```tsx
41
- // main.tsx
42
- import "@db-ux/core-components/build/styles/rollup.css";
44
+ // main.tsx — order matters!
45
+ import "@db-ux/core-foundations/build/styles/theme/rollup.css"; // Palette tokens
46
+ import "@db-ux/core-foundations/build/styles/bundle.css"; // Semantic tokens
47
+ import "@db-ux/core-foundations/build/styles/icons/rollup.css"; // Icon fonts
48
+ import "@db-ux/core-components/build/styles/rollup.css"; // Component styling
43
49
  ```
44
50
 
45
51
  </details>
@@ -51,9 +57,9 @@ Starting with Vite 8, the default CSS minifier was changed to [LightningCSS](htt
51
57
  ```ts
52
58
  // vite.config.ts
53
59
  export default defineConfig({
54
- build: {
55
- cssMinify: "esbuild"
56
- }
60
+ build: {
61
+ cssMinify: "esbuild"
62
+ }
57
63
  });
58
64
  ```
59
65
 
@@ -68,11 +74,15 @@ import { browserslistToTargets } from "lightningcss";
68
74
  import browserslist from "browserslist";
69
75
 
70
76
  export default defineConfig({
71
- css: {
72
- lightningcss: {
73
- targets: browserslistToTargets(browserslist(">= 0.5%, last 2 major versions, Firefox ESR, not dead"))
74
- }
75
- }
77
+ css: {
78
+ lightningcss: {
79
+ targets: browserslistToTargets(
80
+ browserslist(
81
+ ">= 0.5%, last 2 major versions, Firefox ESR, not dead"
82
+ )
83
+ )
84
+ }
85
+ }
76
86
  });
77
87
  ```
78
88
 
@@ -82,22 +92,22 @@ export default defineConfig({
82
92
 
83
93
  Starting with Next 16, the default CSS minifier was changed to [LightningCSS](https://lightningcss.dev/), which provides buggy transformations for modern CSS features used by the DB UX Design System (e.g. `light-dark()` CSS function). We might provide a specific configuration necessary to mitigate those problems in the near future. To keep CSS output stable in the meantime, configure `next.config.ts` like this:
84
94
 
85
- ````ts
95
+ ```ts
86
96
  // next.config.ts
87
97
 
88
- import type { NextConfig } from 'next'
98
+ import type { NextConfig } from "next";
89
99
 
90
100
  const nextConfig: NextConfig = {
91
101
  experimental: {
92
102
  useLightningcss: true,
93
103
  lightningCssFeatures: {
94
- exclude: ['light-dark'],
95
- },
96
- },
97
- }
104
+ exclude: ["light-dark"]
105
+ }
106
+ }
107
+ };
98
108
 
99
- export default nextConfig
100
- ````
109
+ export default nextConfig;
110
+ ```
101
111
 
102
112
  ### DB Theme
103
113
 
@@ -50,7 +50,9 @@ function DBAccordionItemFn(props, component) {
50
50
  React.createElement("summary", { onClick: (event) => handleToggle(event) },
51
51
  props.headlinePlain ? React.createElement(React.Fragment, null, props.headlinePlain) : null,
52
52
  !props.headlinePlain ? React.createElement(React.Fragment, null, props.headline) : null),
53
- React.createElement("div", null, props.text ? React.createElement(React.Fragment, null, props.text) : React.createElement(React.Fragment, null, props.children)))));
53
+ React.createElement("div", null,
54
+ props.text ? React.createElement(React.Fragment, null, props.text) : null,
55
+ props.children))));
54
56
  }
55
57
  const DBAccordionItem = forwardRef(DBAccordionItemFn);
56
58
  export default DBAccordionItem;
@@ -26,7 +26,9 @@ function DBBadgeFn(props, component) {
26
26
  }
27
27
  }
28
28
  }, [_ref.current, initialized]);
29
- return (React.createElement("span", Object.assign({ ref: _ref }, filterPassingProps(props, ["data-icon-variant", "data-icon-variant-before", "data-icon-variant-after", "data-icon-weight", "data-icon-weight-before", "data-icon-weight-after", "data-interactive", "data-force-mobile", "data-color", "data-container-color", "data-bg-color", "data-on-bg-color", "data-color-scheme", "data-font-size", "data-headline-size", "data-divider", "data-focus", "data-font", "data-density"]), { id: (_a = props.id) !== null && _a !== void 0 ? _a : (_b = props.propOverrides) === null || _b === void 0 ? void 0 : _b.id }, getRootProps(props, ["data-icon-variant", "data-icon-variant-before", "data-icon-variant-after", "data-icon-weight", "data-icon-weight-before", "data-icon-weight-after", "data-interactive", "data-force-mobile", "data-color", "data-container-color", "data-bg-color", "data-on-bg-color", "data-color-scheme", "data-font-size", "data-headline-size", "data-divider", "data-focus", "data-font", "data-density"]), { className: cls("db-badge", props.className), "data-semantic": props.semantic, "data-size": props.size, "data-emphasis": props.emphasis, "data-placement": props.placement, "data-wrap": getBooleanAsString(props.wrap), "data-label": ((_c = props.placement) === null || _c === void 0 ? void 0 : _c.startsWith("corner")) && ((_d = props.label) !== null && _d !== void 0 ? _d : DEFAULT_LABEL) }), props.text ? React.createElement(React.Fragment, null, props.text) : React.createElement(React.Fragment, null, props.children)));
29
+ return (React.createElement("span", Object.assign({ ref: _ref }, filterPassingProps(props, ["data-icon-variant", "data-icon-variant-before", "data-icon-variant-after", "data-icon-weight", "data-icon-weight-before", "data-icon-weight-after", "data-interactive", "data-force-mobile", "data-color", "data-container-color", "data-bg-color", "data-on-bg-color", "data-color-scheme", "data-font-size", "data-headline-size", "data-divider", "data-focus", "data-font", "data-density"]), { id: (_a = props.id) !== null && _a !== void 0 ? _a : (_b = props.propOverrides) === null || _b === void 0 ? void 0 : _b.id }, getRootProps(props, ["data-icon-variant", "data-icon-variant-before", "data-icon-variant-after", "data-icon-weight", "data-icon-weight-before", "data-icon-weight-after", "data-interactive", "data-force-mobile", "data-color", "data-container-color", "data-bg-color", "data-on-bg-color", "data-color-scheme", "data-font-size", "data-headline-size", "data-divider", "data-focus", "data-font", "data-density"]), { className: cls("db-badge", props.className), "data-semantic": props.semantic, "data-size": props.size, "data-emphasis": props.emphasis, "data-placement": props.placement, "data-wrap": getBooleanAsString(props.wrap), "data-label": ((_c = props.placement) === null || _c === void 0 ? void 0 : _c.startsWith("corner")) && ((_d = props.label) !== null && _d !== void 0 ? _d : DEFAULT_LABEL) }),
30
+ props.text ? React.createElement(React.Fragment, null, props.text) : null,
31
+ props.children));
30
32
  }
31
33
  const DBBadge = forwardRef(DBBadgeFn);
32
34
  export default DBBadge;
@@ -7,7 +7,9 @@ import { cls, getBooleanAsString } from "../../utils";
7
7
  function DBBrandFn(props, component) {
8
8
  var _a, _b, _c;
9
9
  const _ref = component || useRef(component);
10
- return (React.createElement("div", Object.assign({ ref: _ref }, filterPassingProps(props, ["data-icon-variant", "data-icon-variant-before", "data-icon-variant-after", "data-icon-weight", "data-icon-weight-before", "data-icon-weight-after", "data-interactive", "data-force-mobile", "data-color", "data-container-color", "data-bg-color", "data-on-bg-color", "data-color-scheme", "data-font-size", "data-headline-size", "data-divider", "data-focus", "data-font", "data-density"]), { "data-icon": props.hideLogo ? "none" : (_a = props.icon) !== null && _a !== void 0 ? _a : DEFAULT_ICON, "data-show-icon": getBooleanAsString(props.showIcon), id: (_b = props.id) !== null && _b !== void 0 ? _b : (_c = props.propOverrides) === null || _c === void 0 ? void 0 : _c.id }, getRootProps(props, ["data-icon-variant", "data-icon-variant-before", "data-icon-variant-after", "data-icon-weight", "data-icon-weight-before", "data-icon-weight-after", "data-interactive", "data-force-mobile", "data-color", "data-container-color", "data-bg-color", "data-on-bg-color", "data-color-scheme", "data-font-size", "data-headline-size", "data-divider", "data-focus", "data-font", "data-density"]), { className: cls("db-brand", props.className) }), props.text ? React.createElement(React.Fragment, null, props.text) : React.createElement(React.Fragment, null, props.children)));
10
+ return (React.createElement("div", Object.assign({ ref: _ref }, filterPassingProps(props, ["data-icon-variant", "data-icon-variant-before", "data-icon-variant-after", "data-icon-weight", "data-icon-weight-before", "data-icon-weight-after", "data-interactive", "data-force-mobile", "data-color", "data-container-color", "data-bg-color", "data-on-bg-color", "data-color-scheme", "data-font-size", "data-headline-size", "data-divider", "data-focus", "data-font", "data-density"]), { "data-icon": props.hideLogo ? "none" : (_a = props.icon) !== null && _a !== void 0 ? _a : DEFAULT_ICON, "data-show-icon": getBooleanAsString(props.showIcon), id: (_b = props.id) !== null && _b !== void 0 ? _b : (_c = props.propOverrides) === null || _c === void 0 ? void 0 : _c.id }, getRootProps(props, ["data-icon-variant", "data-icon-variant-before", "data-icon-variant-after", "data-icon-weight", "data-icon-weight-before", "data-icon-weight-after", "data-interactive", "data-force-mobile", "data-color", "data-container-color", "data-bg-color", "data-on-bg-color", "data-color-scheme", "data-font-size", "data-headline-size", "data-divider", "data-focus", "data-font", "data-density"]), { className: cls("db-brand", props.className) }),
11
+ props.children,
12
+ props.text ? React.createElement(React.Fragment, null, props.text) : null));
11
13
  }
12
14
  const DBBrand = forwardRef(DBBrandFn);
13
15
  export default DBBrand;
@@ -15,7 +15,9 @@ function DBButtonFn(props, component) {
15
15
  }
16
16
  return "submit";
17
17
  }
18
- return (React.createElement("button", Object.assign({ ref: _ref }, filterPassingProps(props, ["data-icon-variant", "data-icon-variant-before", "data-icon-variant-after", "data-icon-weight", "data-icon-weight-before", "data-icon-weight-after", "data-interactive", "data-force-mobile", "data-color", "data-container-color", "data-bg-color", "data-on-bg-color", "data-color-scheme", "data-font-size", "data-headline-size", "data-divider", "data-focus", "data-font", "data-density"]), { id: (_a = props.id) !== null && _a !== void 0 ? _a : (_b = props.propOverrides) === null || _b === void 0 ? void 0 : _b.id }, getRootProps(props, ["data-icon-variant", "data-icon-variant-before", "data-icon-variant-after", "data-icon-weight", "data-icon-weight-before", "data-icon-weight-after", "data-interactive", "data-force-mobile", "data-color", "data-container-color", "data-bg-color", "data-on-bg-color", "data-color-scheme", "data-font-size", "data-headline-size", "data-divider", "data-focus", "data-font", "data-density"]), { className: cls("db-button", props.className), type: getButtonType(), disabled: getBoolean(props.disabled, "disabled"), "data-icon": (_c = props.iconLeading) !== null && _c !== void 0 ? _c : props.icon, "data-show-icon": getBooleanAsString((_d = props.showIconLeading) !== null && _d !== void 0 ? _d : props.showIcon), "data-icon-trailing": props.iconTrailing, "data-show-icon-trailing": getBooleanAsString(props.showIconTrailing), "data-size": props.size, "data-width": props.width, "data-variant": props.variant, "data-wrap": getBooleanAsString(props.wrap), "data-no-text": getBooleanAsString(props.noText), name: props.name, form: props.form, value: props.value }), props.text ? React.createElement(React.Fragment, null, props.text) : React.createElement(React.Fragment, null, props.children)));
18
+ return (React.createElement("button", Object.assign({ ref: _ref }, filterPassingProps(props, ["data-icon-variant", "data-icon-variant-before", "data-icon-variant-after", "data-icon-weight", "data-icon-weight-before", "data-icon-weight-after", "data-interactive", "data-force-mobile", "data-color", "data-container-color", "data-bg-color", "data-on-bg-color", "data-color-scheme", "data-font-size", "data-headline-size", "data-divider", "data-focus", "data-font", "data-density"]), { id: (_a = props.id) !== null && _a !== void 0 ? _a : (_b = props.propOverrides) === null || _b === void 0 ? void 0 : _b.id }, getRootProps(props, ["data-icon-variant", "data-icon-variant-before", "data-icon-variant-after", "data-icon-weight", "data-icon-weight-before", "data-icon-weight-after", "data-interactive", "data-force-mobile", "data-color", "data-container-color", "data-bg-color", "data-on-bg-color", "data-color-scheme", "data-font-size", "data-headline-size", "data-divider", "data-focus", "data-font", "data-density"]), { className: cls("db-button", props.className), type: getButtonType(), disabled: getBoolean(props.disabled, "disabled"), "data-icon": (_c = props.iconLeading) !== null && _c !== void 0 ? _c : props.icon, "data-show-icon": getBooleanAsString((_d = props.showIconLeading) !== null && _d !== void 0 ? _d : props.showIcon), "data-icon-trailing": props.iconTrailing, "data-show-icon-trailing": getBooleanAsString(props.showIconTrailing), "data-size": props.size, "data-width": props.width, "data-variant": props.variant, "data-wrap": getBooleanAsString(props.wrap), "data-no-text": getBooleanAsString(props.noText), name: props.name, form: props.form, value: props.value }),
19
+ props.text ? React.createElement(React.Fragment, null, props.text) : null,
20
+ props.children));
19
21
  }
20
22
  const DBButton = forwardRef(DBButtonFn);
21
23
  export default DBButton;
@@ -148,7 +148,8 @@ function DBCheckboxFn(props, component) {
148
148
  return (React.createElement("div", Object.assign({}, getRootProps(props, ["data-icon-variant", "data-icon-variant-before", "data-icon-variant-after", "data-icon-weight", "data-icon-weight-before", "data-icon-weight-after", "data-interactive", "data-force-mobile", "data-color", "data-container-color", "data-bg-color", "data-on-bg-color", "data-color-scheme", "data-font-size", "data-headline-size", "data-divider", "data-focus", "data-font", "data-density"]), { className: cls("db-checkbox", props.className), "data-size": props.size, "data-hide-asterisk": getHideProp(props.showRequiredAsterisk), "data-hide-label": getHideProp(props.showLabel) }),
149
149
  React.createElement("label", { htmlFor: _id },
150
150
  React.createElement("input", Object.assign({ type: "checkbox", "aria-invalid": props.validation === "invalid", "data-custom-validity": props.validation, ref: _ref }, filterPassingProps(props, ["data-icon-variant", "data-icon-variant-before", "data-icon-variant-after", "data-icon-weight", "data-icon-weight-before", "data-icon-weight-after", "data-interactive", "data-force-mobile", "data-color", "data-container-color", "data-bg-color", "data-on-bg-color", "data-color-scheme", "data-font-size", "data-headline-size", "data-divider", "data-focus", "data-font", "data-density"]), { id: _id, name: props.name, checked: getBoolean(props.checked, "checked"), disabled: getBoolean(props.disabled, "disabled"), value: props.value, required: getBoolean(props.required, "required"), onChange: (event) => handleChange(event), onBlur: (event) => handleBlur(event), onFocus: (event) => handleFocus(event), "aria-describedby": (_b = props.ariaDescribedBy) !== null && _b !== void 0 ? _b : _descByIds })),
151
- props.label ? React.createElement(React.Fragment, null, props.label) : React.createElement(React.Fragment, null, props.children)),
151
+ props.label ? React.createElement(React.Fragment, null, props.label) : null,
152
+ props.children),
152
153
  stringPropVisible(props.message, props.showMessage) ? (React.createElement(DBInfotext, { size: "small", icon: props.messageIcon, id: _messageId }, props.message)) : null,
153
154
  hasValidState() ? (React.createElement(DBInfotext, { size: "small", semantic: "successful", id: _validMessageId }, props.validMessage || DEFAULT_VALID_MESSAGE)) : null,
154
155
  React.createElement(DBInfotext, { size: "small", semantic: "critical", id: _invalidMessageId }, _invalidMessage),
@@ -27,7 +27,8 @@ function DBCustomSelectListItemFn(props, component) {
27
27
  "db-radio": props.type !== "checkbox" && !props.isGroupTitle,
28
28
  }), "data-divider": getBooleanAsString(hasDivider) }), !props.isGroupTitle ? (React.createElement("label", { "data-icon": props.type !== "checkbox" && props.icon ? props.icon : undefined, "data-show-icon": getBooleanAsString(props.showIcon), "data-icon-trailing": getIconTrailing() },
29
29
  React.createElement("input", { className: "db-custom-select-list-item-checkbox", "data-disable-focus": "true", type: props.type, name: props.name, form: props.name, checked: getBoolean(props.checked, "checked"), disabled: getBoolean(props.disabled, "disabled"), value: props.value, onChange: (event) => handleChange(event) }),
30
- props.label ? React.createElement(React.Fragment, null, props.label) : React.createElement(React.Fragment, null, props.children))) : (React.createElement("span", null, props.groupTitle))));
30
+ props.label ? React.createElement(React.Fragment, null, props.label) : null,
31
+ props.children)) : (React.createElement("span", null, props.groupTitle))));
31
32
  }
32
33
  const DBCustomSelectListItem = forwardRef(DBCustomSelectListItemFn);
33
34
  export default DBCustomSelectListItem;
@@ -6,7 +6,9 @@ import { cls } from "../../utils";
6
6
  function DBIconFn(props, component) {
7
7
  var _a, _b;
8
8
  const _ref = component || useRef(component);
9
- return (React.createElement("span", Object.assign({ "aria-hidden": "true", ref: _ref }, filterPassingProps(props, ["data-icon-variant", "data-icon-variant-before", "data-icon-variant-after", "data-icon-weight", "data-icon-weight-before", "data-icon-weight-after", "data-interactive", "data-force-mobile", "data-color", "data-container-color", "data-bg-color", "data-on-bg-color", "data-color-scheme", "data-font-size", "data-headline-size", "data-divider", "data-focus", "data-font", "data-density"]), { id: (_a = props.id) !== null && _a !== void 0 ? _a : (_b = props.propOverrides) === null || _b === void 0 ? void 0 : _b.id }, getRootProps(props, ["data-icon-variant", "data-icon-variant-before", "data-icon-variant-after", "data-icon-weight", "data-icon-weight-before", "data-icon-weight-after", "data-interactive", "data-force-mobile", "data-color", "data-container-color", "data-bg-color", "data-on-bg-color", "data-color-scheme", "data-font-size", "data-headline-size", "data-divider", "data-focus", "data-font", "data-density"]), { className: cls("db-icon", props.className), "data-icon": props.icon, "data-icon-weight": props.weight, "data-icon-variant": props.variant }), props.text ? React.createElement(React.Fragment, null, props.text) : React.createElement(React.Fragment, null, props.children)));
9
+ return (React.createElement("span", Object.assign({ "aria-hidden": "true", ref: _ref }, filterPassingProps(props, ["data-icon-variant", "data-icon-variant-before", "data-icon-variant-after", "data-icon-weight", "data-icon-weight-before", "data-icon-weight-after", "data-interactive", "data-force-mobile", "data-color", "data-container-color", "data-bg-color", "data-on-bg-color", "data-color-scheme", "data-font-size", "data-headline-size", "data-divider", "data-focus", "data-font", "data-density"]), { id: (_a = props.id) !== null && _a !== void 0 ? _a : (_b = props.propOverrides) === null || _b === void 0 ? void 0 : _b.id }, getRootProps(props, ["data-icon-variant", "data-icon-variant-before", "data-icon-variant-after", "data-icon-weight", "data-icon-weight-before", "data-icon-weight-after", "data-interactive", "data-force-mobile", "data-color", "data-container-color", "data-bg-color", "data-on-bg-color", "data-color-scheme", "data-font-size", "data-headline-size", "data-divider", "data-focus", "data-font", "data-density"]), { className: cls("db-icon", props.className), "data-icon": props.icon, "data-icon-weight": props.weight, "data-icon-variant": props.variant }),
10
+ props.text ? React.createElement(React.Fragment, null, props.text) : null,
11
+ props.children));
10
12
  }
11
13
  const DBIcon = forwardRef(DBIconFn);
12
14
  export default DBIcon;
@@ -6,7 +6,9 @@ import { cls, getBooleanAsString } from "../../utils";
6
6
  function DBInfotextFn(props, component) {
7
7
  var _a, _b, _c;
8
8
  const _ref = component || useRef(component);
9
- return (React.createElement("span", Object.assign({ ref: _ref }, filterPassingProps(props, ["data-icon-variant", "data-icon-variant-before", "data-icon-variant-after", "data-icon-weight", "data-icon-weight-before", "data-icon-weight-after", "data-interactive", "data-force-mobile", "data-color", "data-container-color", "data-bg-color", "data-on-bg-color", "data-color-scheme", "data-font-size", "data-headline-size", "data-divider", "data-focus", "data-font", "data-density"]), { id: (_a = props.id) !== null && _a !== void 0 ? _a : (_b = props.propOverrides) === null || _b === void 0 ? void 0 : _b.id }, getRootProps(props, ["data-icon-variant", "data-icon-variant-before", "data-icon-variant-after", "data-icon-weight", "data-icon-weight-before", "data-icon-weight-after", "data-interactive", "data-force-mobile", "data-color", "data-container-color", "data-bg-color", "data-on-bg-color", "data-color-scheme", "data-font-size", "data-headline-size", "data-divider", "data-focus", "data-font", "data-density"]), { className: cls("db-infotext", props.className), "data-icon": props.icon, "data-semantic": props.semantic, "data-size": props.size, "data-wrap": getBooleanAsString(props.wrap), "data-show-icon-leading": getBooleanAsString((_c = props.showIcon) !== null && _c !== void 0 ? _c : true) }), props.text ? React.createElement(React.Fragment, null, props.text) : React.createElement(React.Fragment, null, props.children)));
9
+ return (React.createElement("span", Object.assign({ ref: _ref }, filterPassingProps(props, ["data-icon-variant", "data-icon-variant-before", "data-icon-variant-after", "data-icon-weight", "data-icon-weight-before", "data-icon-weight-after", "data-interactive", "data-force-mobile", "data-color", "data-container-color", "data-bg-color", "data-on-bg-color", "data-color-scheme", "data-font-size", "data-headline-size", "data-divider", "data-focus", "data-font", "data-density"]), { id: (_a = props.id) !== null && _a !== void 0 ? _a : (_b = props.propOverrides) === null || _b === void 0 ? void 0 : _b.id }, getRootProps(props, ["data-icon-variant", "data-icon-variant-before", "data-icon-variant-after", "data-icon-weight", "data-icon-weight-before", "data-icon-weight-after", "data-interactive", "data-force-mobile", "data-color", "data-container-color", "data-bg-color", "data-on-bg-color", "data-color-scheme", "data-font-size", "data-headline-size", "data-divider", "data-focus", "data-font", "data-density"]), { className: cls("db-infotext", props.className), "data-icon": props.icon, "data-semantic": props.semantic, "data-size": props.size, "data-wrap": getBooleanAsString(props.wrap), "data-show-icon-leading": getBooleanAsString((_c = props.showIcon) !== null && _c !== void 0 ? _c : true) }),
10
+ props.text ? React.createElement(React.Fragment, null, props.text) : null,
11
+ props.children));
10
12
  }
11
13
  const DBInfotext = forwardRef(DBInfotextFn);
12
14
  export default DBInfotext;
@@ -6,7 +6,9 @@ import { cls, getBooleanAsString } from "../../utils";
6
6
  function DBLinkFn(props, component) {
7
7
  var _a, _b, _c, _d;
8
8
  const _ref = component || useRef(component);
9
- return (React.createElement("a", Object.assign({ ref: _ref }, filterPassingProps(props, ["data-icon-variant", "data-icon-variant-before", "data-icon-variant-after", "data-icon-weight", "data-icon-weight-before", "data-icon-weight-after", "data-interactive", "data-force-mobile", "data-color", "data-container-color", "data-bg-color", "data-on-bg-color", "data-color-scheme", "data-font-size", "data-headline-size", "data-divider", "data-focus", "data-font", "data-density"]), { id: (_a = props.id) !== null && _a !== void 0 ? _a : (_b = props.propOverrides) === null || _b === void 0 ? void 0 : _b.id }, getRootProps(props, ["data-icon-variant", "data-icon-variant-before", "data-icon-variant-after", "data-icon-weight", "data-icon-weight-before", "data-icon-weight-after", "data-interactive", "data-force-mobile", "data-color", "data-container-color", "data-bg-color", "data-on-bg-color", "data-color-scheme", "data-font-size", "data-headline-size", "data-divider", "data-focus", "data-font", "data-density"]), { className: cls("db-link", props.className), href: props.href, target: props.target, rel: props.rel, role: props.role, referrerPolicy: (_c = props.referrerpolicy) !== null && _c !== void 0 ? _c : props.referrerPolicy, hrefLang: props.hreflang, "aria-disabled": getBooleanAsString(props.disabled), tabIndex: props.disabled ? -1 : 0, "data-size": props.size, "data-show-icon-trailing": getBooleanAsString((_d = props.showIcon) !== null && _d !== void 0 ? _d : true), "data-variant": props.variant, "data-content": props.content || "internal", "data-wrap": getBooleanAsString(props.wrap) }), props.text ? React.createElement(React.Fragment, null, props.text) : React.createElement(React.Fragment, null, props.children)));
9
+ return (React.createElement("a", Object.assign({ ref: _ref }, filterPassingProps(props, ["data-icon-variant", "data-icon-variant-before", "data-icon-variant-after", "data-icon-weight", "data-icon-weight-before", "data-icon-weight-after", "data-interactive", "data-force-mobile", "data-color", "data-container-color", "data-bg-color", "data-on-bg-color", "data-color-scheme", "data-font-size", "data-headline-size", "data-divider", "data-focus", "data-font", "data-density"]), { id: (_a = props.id) !== null && _a !== void 0 ? _a : (_b = props.propOverrides) === null || _b === void 0 ? void 0 : _b.id }, getRootProps(props, ["data-icon-variant", "data-icon-variant-before", "data-icon-variant-after", "data-icon-weight", "data-icon-weight-before", "data-icon-weight-after", "data-interactive", "data-force-mobile", "data-color", "data-container-color", "data-bg-color", "data-on-bg-color", "data-color-scheme", "data-font-size", "data-headline-size", "data-divider", "data-focus", "data-font", "data-density"]), { className: cls("db-link", props.className), href: props.href, target: props.target, rel: props.rel, role: props.role, referrerPolicy: (_c = props.referrerpolicy) !== null && _c !== void 0 ? _c : props.referrerPolicy, hrefLang: props.hreflang, "aria-disabled": getBooleanAsString(props.disabled), tabIndex: props.disabled ? -1 : 0, "data-size": props.size, "data-show-icon-trailing": getBooleanAsString((_d = props.showIcon) !== null && _d !== void 0 ? _d : true), "data-variant": props.variant, "data-content": props.content || "internal", "data-wrap": getBooleanAsString(props.wrap) }),
10
+ props.text ? React.createElement(React.Fragment, null, props.text) : null,
11
+ props.children));
10
12
  }
11
13
  const DBLink = forwardRef(DBLinkFn);
12
14
  export default DBLink;
@@ -40,6 +40,17 @@ export type DBNotificationDefaultProps = {
40
40
  * The timestamp attribute can be set for overlay notifications
41
41
  */
42
42
  timestamp?: string;
43
+ /**
44
+ * Machine-readable value for the `datetime` attribute of the rendered `<time>` element.
45
+ *
46
+ * Accepts any valid HTML datetime string:
47
+ * - Absolute moment: ISO 8601 date/time, e.g. `"2024-06-01T12:30:00"`
48
+ * - Duration: ISO 8601 duration, e.g. `"PT5M"` (5 minutes), `"PT1H30M"` (1 h 30 min)
49
+ *
50
+ * When omitted the `datetime` attribute is not rendered and assistive technologies
51
+ * fall back to the visible `timestamp` text.
52
+ */
53
+ timestampDatetime?: string;
43
54
  /**
44
55
  * Enables or disables the visibility of the timestamp.
45
56
  */
@@ -22,9 +22,11 @@ function DBNotificationFn(props, component) {
22
22
  ariaLive: props.ariaLive,
23
23
  }), "aria-live": props.ariaLive, "data-semantic": props.semantic, "data-variant": props.variant, "data-icon": getBoolean(props.showIcon) !== false ? props.icon : undefined, "data-show-icon": getBooleanAsString(props.showIcon), "data-link-variant": props.linkVariant }),
24
24
  React.createElement(React.Fragment, null, props.image),
25
- stringPropVisible(props.headline, props.showHeadline) ? (React.createElement("header", null, props.headline)) : null,
26
- React.createElement("div", { "data-area": "content" }, props.text ? React.createElement(React.Fragment, null, props.text) : React.createElement(React.Fragment, null, props.children)),
27
- stringPropVisible(props.timestamp, props.showTimestamp) ? (React.createElement("span", null, props.timestamp)) : null,
25
+ stringPropVisible(props.headline, props.showHeadline) ? (React.createElement("header", { "data-area": "head" }, props.headline)) : null,
26
+ React.createElement("div", { "data-area": "content" },
27
+ props.text ? React.createElement(React.Fragment, null, props.text) : null,
28
+ props.children),
29
+ stringPropVisible(props.timestamp, props.showTimestamp) ? (React.createElement("time", { "data-area": "timestamp", dateTime: props.timestampDatetime }, props.timestamp)) : null,
28
30
  React.createElement(React.Fragment, null, props.link),
29
31
  getBoolean(props.closeable, "closeable") ? (React.createElement(DBButton, { icon: "cross", variant: "ghost", size: "small", id: props.closeButtonId, noText: true, onClick: (event) => handleClose(event) }, (_c = props.closeButtonText) !== null && _c !== void 0 ? _c : DEFAULT_CLOSE_BUTTON)) : null));
30
32
  }
@@ -80,7 +80,8 @@ function DBRadioFn(props, component) {
80
80
  }, []);
81
81
  return (React.createElement("label", Object.assign({ "data-size": props.size, "data-hide-label": getHideProp(props.showLabel), "data-hide-asterisk": getHideProp(props.showRequiredAsterisk) }, getRootProps(props, ["data-icon-variant", "data-icon-variant-before", "data-icon-variant-after", "data-icon-weight", "data-icon-weight-before", "data-icon-weight-after", "data-interactive", "data-force-mobile", "data-color", "data-container-color", "data-bg-color", "data-on-bg-color", "data-color-scheme", "data-font-size", "data-headline-size", "data-divider", "data-focus", "data-font", "data-density"]), { className: cls("db-radio", props.className), htmlFor: _id }),
82
82
  React.createElement("input", Object.assign({ type: "radio", "aria-invalid": props.validation === "invalid", "data-custom-validity": props.validation, ref: _ref }, filterPassingProps(props, ["data-icon-variant", "data-icon-variant-before", "data-icon-variant-after", "data-icon-weight", "data-icon-weight-before", "data-icon-weight-after", "data-interactive", "data-force-mobile", "data-color", "data-container-color", "data-bg-color", "data-on-bg-color", "data-color-scheme", "data-font-size", "data-headline-size", "data-divider", "data-focus", "data-font", "data-density"]), { id: _id, name: props.name, checked: getBoolean(props.checked, "checked"), disabled: getBoolean(props.disabled, "disabled"), value: props.value, required: getBoolean(props.required, "required"), onInput: (event) => handleInput(event), onChange: (event) => handleChange(event), onBlur: (event) => handleBlur(event), onFocus: (event) => handleFocus(event) })),
83
- props.label ? React.createElement(React.Fragment, null, props.label) : React.createElement(React.Fragment, null, props.children)));
83
+ props.label ? React.createElement(React.Fragment, null, props.label) : null,
84
+ props.children));
84
85
  }
85
86
  const DBRadio = forwardRef(DBRadioFn);
86
87
  export default DBRadio;
@@ -141,7 +141,8 @@ function DBSwitchFn(props, component) {
141
141
  return (React.createElement("div", Object.assign({ "data-visual-aid": getBooleanAsString(props.visualAid), "data-size": props.size, "data-hide-label": getHideProp(props.showLabel), "data-variant": props.variant, "data-hide-asterisk": getHideProp(props.showRequiredAsterisk), "data-custom-validity": props.validation }, getRootProps(props, ["data-icon-variant", "data-icon-variant-before", "data-icon-variant-after", "data-icon-weight", "data-icon-weight-before", "data-icon-weight-after", "data-interactive", "data-force-mobile", "data-color", "data-container-color", "data-bg-color", "data-on-bg-color", "data-color-scheme", "data-font-size", "data-headline-size", "data-divider", "data-focus", "data-font", "data-density"]), { className: cls("db-switch", props.className) }),
142
142
  React.createElement("label", { htmlFor: _id },
143
143
  React.createElement("input", Object.assign({ type: "checkbox", role: "switch", id: _id, ref: _ref }, filterPassingProps(props, ["data-icon-variant", "data-icon-variant-before", "data-icon-variant-after", "data-icon-weight", "data-icon-weight-before", "data-icon-weight-after", "data-interactive", "data-force-mobile", "data-color", "data-container-color", "data-bg-color", "data-on-bg-color", "data-color-scheme", "data-font-size", "data-headline-size", "data-divider", "data-focus", "data-font", "data-density"]), { checked: getBoolean(props.checked, "checked"), value: props.value, disabled: getBoolean(props.disabled, "disabled"), "aria-invalid": props.validation === "invalid" ? "true" : undefined, "aria-describedby": _descByIds, name: props.name, required: getBoolean(props.required, "required"), "data-aid-icon": (_b = props.iconLeading) !== null && _b !== void 0 ? _b : props.icon, "data-aid-icon-trailing": props.iconTrailing, onChange: (event) => handleChange(event), onBlur: (event) => handleBlur(event), onFocus: (event) => handleFocus(event), onKeyDown: (event) => handleKeyDown(event) })),
144
- props.label ? React.createElement(React.Fragment, null, props.label) : React.createElement(React.Fragment, null, props.children)),
144
+ props.label ? React.createElement(React.Fragment, null, props.label) : null,
145
+ props.children),
145
146
  stringPropVisible(props.message, props.showMessage) ? (React.createElement(DBInfotext, { size: "small", semantic: "adaptive", id: _messageId, icon: props.messageIcon }, props.message)) : null,
146
147
  hasValidState() ? (React.createElement(DBInfotext, { size: "small", semantic: "successful", id: _validMessageId }, (_c = props.validMessage) !== null && _c !== void 0 ? _c : DEFAULT_VALID_MESSAGE)) : null,
147
148
  React.createElement(DBInfotext, { size: "small", semantic: "critical", id: _invalidMessageId }, _invalidMessage),
@@ -25,8 +25,8 @@ function DBTagFn(props, component) {
25
25
  }
26
26
  return (React.createElement("div", Object.assign({ ref: _ref }, filterPassingProps(props, ["data-icon-variant", "data-icon-variant-before", "data-icon-variant-after", "data-icon-weight", "data-icon-weight-before", "data-icon-weight-after", "data-interactive", "data-force-mobile", "data-color", "data-container-color", "data-bg-color", "data-on-bg-color", "data-color-scheme", "data-font-size", "data-headline-size", "data-divider", "data-focus", "data-font", "data-density", "onRemove"]), { id: (_a = props.id) !== null && _a !== void 0 ? _a : (_b = props.propOverrides) === null || _b === void 0 ? void 0 : _b.id }, getRootProps(props, ["data-icon-variant", "data-icon-variant-before", "data-icon-variant-after", "data-icon-weight", "data-icon-weight-before", "data-icon-weight-after", "data-interactive", "data-force-mobile", "data-color", "data-container-color", "data-bg-color", "data-on-bg-color", "data-color-scheme", "data-font-size", "data-headline-size", "data-divider", "data-focus", "data-font", "data-density"]), { className: cls("db-tag", props.className), "data-semantic": props.semantic, "data-emphasis": props.emphasis, "data-icon": props.icon, "data-show-check-state": getBooleanAsString((_c = props.showCheckState) !== null && _c !== void 0 ? _c : true), "data-show-icon": getBooleanAsString(props.showIcon), "data-no-text": getBooleanAsString(props.noText), "data-overflow": getBooleanAsString(props.overflow) }),
27
27
  React.createElement(React.Fragment, null, props.content),
28
- props.children,
29
28
  props.text ? React.createElement(React.Fragment, null, props.text) : null,
29
+ props.children,
30
30
  props.behavior === "removable" ? (React.createElement("button", { className: "db-button db-tab-remove-button", "data-icon": "cross", "data-size": "small", "data-no-text": "true", "data-variant": "ghost", type: "button", onClick: (event) => handleRemove(event) },
31
31
  React.createElement(DBTooltip, { variant: "label" }, getRemoveButtonText()))) : null));
32
32
  }
@@ -1,4 +1,4 @@
1
- import { ClickEventState, DocumentScrollState, EmphasisProps, GlobalProps, GlobalState, InitializedState, PlacementProps, PopoverProps, PopoverState, ResetIdState, WrapProps } from '../../shared/model';
1
+ import { ClickEventState, DocumentScrollState, EmphasisProps, GlobalProps, GlobalState, InitializedState, PlacementProps, PopoverProps, PopoverState, ResetIdState, TextProps, WrapProps } from '../../shared/model';
2
2
  export declare const TooltipVariantList: readonly ["description", "label"];
3
3
  export type TooltipVariantType = (typeof TooltipVariantList)[number];
4
4
  export type DBTooltipDefaultProps = {
@@ -13,7 +13,7 @@ export type DBTooltipDefaultProps = {
13
13
  */
14
14
  variant?: TooltipVariantType;
15
15
  };
16
- export type DBTooltipProps = DBTooltipDefaultProps & GlobalProps & EmphasisProps & PlacementProps & PopoverProps & WrapProps;
16
+ export type DBTooltipProps = DBTooltipDefaultProps & GlobalProps & EmphasisProps & PlacementProps & PopoverProps & WrapProps & TextProps;
17
17
  export type DBTooltipDefaultState = {
18
18
  getParent: () => HTMLElement;
19
19
  };
@@ -1,3 +1,3 @@
1
1
  import * as React from "react";
2
- declare const DBTooltip: React.ForwardRefExoticComponent<Omit<React.HTMLAttributes<any>, keyof import("../../shared/model").GlobalProps | "placement" | "emphasis" | "wrap" | keyof import("./model").DBTooltipDefaultProps | keyof import("../../shared/model").PopoverProps> & import("./model").DBTooltipDefaultProps & import("../../shared/model").GlobalProps & import("../../shared/model").EmphasisProps & import("../../shared/model").PlacementProps & import("../../shared/model").PopoverProps & import("../../shared/model").WrapProps & React.RefAttributes<any>>;
2
+ declare const DBTooltip: React.ForwardRefExoticComponent<Omit<React.HTMLAttributes<any>, keyof import("../../shared/model").GlobalProps | "text" | "placement" | "emphasis" | "wrap" | keyof import("./model").DBTooltipDefaultProps | keyof import("../../shared/model").PopoverProps> & import("./model").DBTooltipDefaultProps & import("../../shared/model").GlobalProps & import("../../shared/model").EmphasisProps & import("../../shared/model").PlacementProps & import("../../shared/model").PopoverProps & import("../../shared/model").WrapProps & import("../../shared/model").TextProps & React.RefAttributes<any>>;
3
3
  export default DBTooltip;
@@ -109,7 +109,9 @@ function DBTooltipFn(props, component) {
109
109
  setInitialized(false);
110
110
  }
111
111
  }, [_ref.current, initialized, _id]);
112
- return (React.createElement("i", Object.assign({ role: "tooltip", "aria-hidden": "true", "data-gap": "true", ref: _ref }, filterPassingProps(props, ["data-icon-variant", "data-icon-variant-before", "data-icon-variant-after", "data-icon-weight", "data-icon-weight-before", "data-icon-weight-after", "data-interactive", "data-force-mobile", "data-color", "data-container-color", "data-bg-color", "data-on-bg-color", "data-color-scheme", "data-font-size", "data-headline-size", "data-divider", "data-focus", "data-font", "data-density"]), getRootProps(props, ["data-icon-variant", "data-icon-variant-before", "data-icon-variant-after", "data-icon-weight", "data-icon-weight-before", "data-icon-weight-after", "data-interactive", "data-force-mobile", "data-color", "data-container-color", "data-bg-color", "data-on-bg-color", "data-color-scheme", "data-font-size", "data-headline-size", "data-divider", "data-focus", "data-font", "data-density"]), { className: cls("db-tooltip", props.className), id: _id, "data-emphasis": props.emphasis, "data-wrap": getBooleanAsString(props.wrap), "data-animation": getBooleanAsString((_b = props.animation) !== null && _b !== void 0 ? _b : true), "data-delay": props.delay, "data-width": props.width, "data-show-arrow": getBooleanAsString((_c = props.showArrow) !== null && _c !== void 0 ? _c : true), "data-placement": props.placement, onClick: (event) => handleClick(event) }), props.children));
112
+ return (React.createElement("i", Object.assign({ role: "tooltip", "aria-hidden": "true", "data-gap": "true", ref: _ref }, filterPassingProps(props, ["data-icon-variant", "data-icon-variant-before", "data-icon-variant-after", "data-icon-weight", "data-icon-weight-before", "data-icon-weight-after", "data-interactive", "data-force-mobile", "data-color", "data-container-color", "data-bg-color", "data-on-bg-color", "data-color-scheme", "data-font-size", "data-headline-size", "data-divider", "data-focus", "data-font", "data-density"]), getRootProps(props, ["data-icon-variant", "data-icon-variant-before", "data-icon-variant-after", "data-icon-weight", "data-icon-weight-before", "data-icon-weight-after", "data-interactive", "data-force-mobile", "data-color", "data-container-color", "data-bg-color", "data-on-bg-color", "data-color-scheme", "data-font-size", "data-headline-size", "data-divider", "data-focus", "data-font", "data-density"]), { className: cls("db-tooltip", props.className), id: _id, "data-emphasis": props.emphasis, "data-wrap": getBooleanAsString(props.wrap), "data-animation": getBooleanAsString((_b = props.animation) !== null && _b !== void 0 ? _b : true), "data-delay": props.delay, "data-width": props.width, "data-show-arrow": getBooleanAsString((_c = props.showArrow) !== null && _c !== void 0 ? _c : true), "data-placement": props.placement, onClick: (event) => handleClick(event) }),
113
+ props.text ? React.createElement(React.Fragment, null, props.text) : null,
114
+ props.children));
113
115
  }
114
116
  const DBTooltip = forwardRef(DBTooltipFn);
115
117
  export default DBTooltip;
@@ -0,0 +1,111 @@
1
+ /** A nested Figma instance swap prop (e.g. icon components). */
2
+ export type FigmaInstanceProp = {
3
+ /** Use 'instance' for generic instance swaps, 'iconSwap' for icon instances that resolve to a string name. */
4
+ type: 'instance' | 'iconSwap';
5
+ /** The Figma property key of the instance swap (e.g. '🔄 Icon Small'). */
6
+ key: string;
7
+ };
8
+ /** An enum prop mapping Figma variant values to code values. */
9
+ export type FigmaEnumProp = {
10
+ type: 'enum';
11
+ /** The Figma property key (e.g. 'Size', '💻 Variant'). */
12
+ key: string;
13
+ /** Map of Figma variant value → code value. Values can be strings, booleans, numbers, or instance swaps. */
14
+ value: Record<string, string | boolean | number | FigmaInstanceProp>;
15
+ };
16
+ /** A simple scalar prop. */
17
+ export type FigmaSimpleProp = {
18
+ /**
19
+ * - 'string': maps to instance.getString()
20
+ * - 'boolean': maps to instance.getBoolean()
21
+ * - 'children': maps to instance.getSlot() — replaces slot content
22
+ * - 'textContent': maps to instance.getString() — used for text content rendered as children
23
+ */
24
+ type: 'string' | 'boolean' | 'children' | 'textContent';
25
+ /** The Figma property key (e.g. '✏️ Text', '✏️ Label'). */
26
+ key: string;
27
+ };
28
+ /** Reads a text property from a named nested instance via instance.findInstance(layerName)?.getString(key). */
29
+ export type FigmaNestedTextProp = {
30
+ type: 'nestedText';
31
+ /** The exact Figma layer name of the nested instance to find. */
32
+ layerName: string;
33
+ /** The Figma property key on the nested instance (e.g. '✏️ Text'). */
34
+ key: string;
35
+ };
36
+ /**
37
+ * Reads a text property from the first code-connected child instance.
38
+ * Generates: instance.findConnectedInstances((node) => node.hasCodeConnect())
39
+ * .filter((node) => node.type === 'INSTANCE')
40
+ * .filter((node) => !!node.properties[key])[0]
41
+ * .getString(key)
42
+ */
43
+ export type FigmaConnectedTextProp = {
44
+ type: 'connectedText';
45
+ /** The Figma property key to read from each connected instance (e.g. '✏️ Text'). */
46
+ key: string;
47
+ /** Index into the array of connected instances. Defaults to 0. */
48
+ index?: number;
49
+ };
50
+ /**
51
+ * Generates a single message variable from a connected instance's text,
52
+ * then maps it to different attribute names based on another prop's value.
53
+ *
54
+ * @example
55
+ * validationMessage: { type: 'validationMessage', key: '✏️ Text', conditionProp: 'validation', map: { 'invalid': 'invalidMessage', 'valid': 'validMessage', default: 'message' } }
56
+ */
57
+ export type FigmaValidationMessageProp = {
58
+ type: 'validationMessage';
59
+ /** The Figma property key to read from the connected instance (e.g. '✏️ Text'). */
60
+ key: string;
61
+ /** The prop name whose value determines which attribute to use. */
62
+ conditionProp: string;
63
+ /** Map of condition prop values to attribute names, plus a 'default' fallback. */
64
+ map: Record<string, string>;
65
+ };
66
+ /**
67
+ * Renders all direct code-connected child instances as children.
68
+ * Generates: instance.findConnectedInstances((node) => node.hasCodeConnect())
69
+ * .map((child) => child.executeTemplate().example)
70
+ */
71
+ export type FigmaConnectedInstancesProp = {
72
+ type: 'connectedInstances';
73
+ };
74
+ /**
75
+ * Renders code-connected child instances recursively, filtered by a nestedImports string.
76
+ * Uses traverseInstances: true to find all descendants, then filters by checking whether
77
+ * the instance's template nestedImports contains the given filter string.
78
+ *
79
+ * @example filter: 'DBAccordionItem' generates:
80
+ * instance
81
+ * .findConnectedInstances((node) => node.hasCodeConnect(), { traverseInstances: true })
82
+ * .filter((node) => node.type === 'INSTANCE')
83
+ * .filter((node) => node.executeTemplate().example
84
+ * .some((section) => section.nestedImports?.some((i) => i.includes('DBAccordionItem'))))
85
+ * .map((child) => child.executeTemplate().example)
86
+ */
87
+ export type FigmaNestedConnectedInstancesProp = {
88
+ type: 'nestedConnectedInstances';
89
+ /** Import string to filter by (e.g. 'DBAccordionItem'). Only instances whose template nestedImports contain this string are included. */
90
+ filter: string;
91
+ };
92
+ /**
93
+ * Wraps an iconSwap prop so it is only rendered when a boolean guard prop is true.
94
+ * Generates: let icon = ''; if (showIconLeading) { icon = `\n\t\ticon="${iconLeading}"` }
95
+ */
96
+ export type FigmaConditionalProp = {
97
+ type: 'conditionalProp';
98
+ /** The Figma property key of the icon instance swap. */
99
+ key: string;
100
+ /** The prop name of the boolean guard (e.g. 'showIconLeading'). */
101
+ guardProp: string;
102
+ /** The attribute name to render (e.g. 'icon'). */
103
+ attrName: string;
104
+ };
105
+ export type FigmaProp = FigmaEnumProp | FigmaInstanceProp | FigmaNestedTextProp | FigmaConnectedTextProp | FigmaValidationMessageProp | FigmaConditionalProp | FigmaConnectedInstancesProp | FigmaNestedConnectedInstancesProp | FigmaSimpleProp;
106
+ export type FigmaCodeConnect = {
107
+ /** Figma node URLs this component connects to. Use 'FIGMA_FILE' as placeholder for the file key. */
108
+ urls: string[];
109
+ /** Map of prop name → Figma prop definition. */
110
+ props: Record<string, FigmaProp>;
111
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -424,7 +424,7 @@ export type RoleProps = {
424
424
  };
425
425
  export type TextProps = {
426
426
  /**
427
- * Alternative for default slot/children.
427
+ * Alternative for default slot/children. Do not use together with a text children/slot, as both will be rendered and result in duplicate labels.
428
428
  */
429
429
  text?: string;
430
430
  };
package/package.json CHANGED
@@ -1,29 +1,33 @@
1
1
  {
2
2
  "name": "@db-ux/react-core-components",
3
- "version": "4.7.3",
3
+ "version": "4.8.1-fix-publish-f7808e2",
4
+ "type": "module",
4
5
  "description": "React components for @db-ux/core-components",
5
6
  "repository": {
6
7
  "type": "git",
7
8
  "url": "git+https://github.com/db-ux-design-system/core-web.git"
8
9
  },
9
10
  "license": "Apache-2.0",
10
- "type": "module",
11
11
  "main": "./dist/index.js",
12
- "module": "./dist/index.js",
13
12
  "types": "./dist/index.d.ts",
13
+ "module": "./dist/index.js",
14
14
  "files": [
15
- "dist/",
15
+ "CHANGELOG.md",
16
16
  "agent",
17
- "CHANGELOG.md"
17
+ "dist/"
18
18
  ],
19
+ "dependencies": {
20
+ "@db-ux/core-components": "4.8.1-fix-publish-f7808e2",
21
+ "@db-ux/core-foundations": "4.8.1-fix-publish-f7808e2"
22
+ },
19
23
  "devDependencies": {
20
- "npm-run-all2": "8.0.4",
21
24
  "@playwright/experimental-ct-react": "1.59.1",
22
25
  "@types/react": "19.2.14",
23
26
  "cpr": "3.0.1",
27
+ "npm-run-all2": "8.0.4",
24
28
  "playwright": "1.59.1",
25
- "react": "19.2.5",
26
- "react-dom": "19.2.5",
29
+ "react": "19.2.6",
30
+ "react-dom": "19.2.6",
27
31
  "typescript": "5.9.3"
28
32
  },
29
33
  "publishConfig": {
@@ -31,22 +35,18 @@
31
35
  "access": "public"
32
36
  },
33
37
  "sideEffects": false,
34
- "dependencies": {
35
- "@db-ux/core-components": "4.7.3",
36
- "@db-ux/core-foundations": "4.7.3"
37
- },
38
38
  "scripts": {
39
39
  "build": "npm-run-all tsc --parallel mv:*",
40
- "mv:dist": "cpr dist ../../build-outputs/react/dist --overwrite",
41
40
  "mv:agent": "cpr agent ../../build-outputs/react/agent --overwrite",
42
41
  "mv:changelog": "cpr CHANGELOG.md ../../build-outputs/react/CHANGELOG.md --overwrite",
42
+ "mv:dist": "cpr dist ../../build-outputs/react/dist --overwrite",
43
43
  "mv:package.json": "cpr package.json ../../build-outputs/react/package.json --overwrite",
44
44
  "mv:readme": "cpr README.md ../../build-outputs/react/README.md --overwrite",
45
45
  "open:report": "npx playwright show-report",
46
46
  "regenerate:screenshots": "playwright test --config playwright.config.ts --update-snapshots",
47
47
  "test:components": "playwright test --config playwright.config.ts",
48
- "test:windows": "playwright test --config playwright.screen-reader.win.ts",
49
48
  "test:components:ui": "playwright test --config playwright.config.ts --ui",
49
+ "test:windows": "playwright test --config playwright.screen-reader.win.ts",
50
50
  "tsc": "tsc --project . --sourceMap false"
51
51
  }
52
52
  }