@db-ux/core-components 4.5.4-mcp-server-migrate-tool-test-1-eb724df → 4.5.4-postcss2-6de35db

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/README.md CHANGED
@@ -27,7 +27,7 @@ If you just need the styling follow this:
27
27
 
28
28
  **✅ Do I need foundations if I install components?**
29
29
 
30
- **No!** The `@db-ux/core-components` package **automatically includes** all the foundations (`@db-ux/core-foundations`) you need. You only need to install one package:
30
+ **No!** The `@db-ux/core-components` package **automatically includes** all the foundations (`@db-ux/core-foundations`) you need. You only need to include one package:
31
31
 
32
32
  - **Use `@db-ux/core-components`** - If you want to use UI components (buttons, inputs, etc.)
33
33
  - **Use `@db-ux/core-foundations`** - If you only need design tokens, colors, spacing, fonts, and assets without any component styles
@@ -36,11 +36,11 @@ If you just need the styling follow this:
36
36
 
37
37
  `npm i @db-ux/core-components`
38
38
 
39
- > **Note**: This automatically includes `@db-ux/core-foundations` as a dependency, so you don't need to install it separately.
39
+ > **Note**: This automatically includes `@db-ux/core-foundations` as a dependency, if you use `npm`. If you use `pnpm` you need to install `@db-ux/core-foundations` as well.
40
40
 
41
41
  ## Styling Dependencies
42
42
 
43
- Import the styles in `scss` or `css`. Based on your technology the file names could be different.
43
+ Import the styles in `css`. Based on your technology the file names could be different.
44
44
 
45
45
  - `relative`: asset path point to `../assets`
46
46
  - `webpack`: asset path point to `~@db-ux/core-foundations/assets`
@@ -48,27 +48,18 @@ Import the styles in `scss` or `css`. Based on your technology the file names co
48
48
 
49
49
  **Important**: These bundled files automatically include **all dependencies from [foundations](https://www.npmjs.com/package/@db-ux/core-foundations)** (design tokens, colors, fonts, etc.) **and all [components](https://github.com/db-ux-design-system/core-web/blob/main/packages/components/src/styles/db-ux-components.scss)** - everything you need in one import!
50
50
 
51
- **SCSS**
51
+ ### Import
52
52
 
53
- ```scss
54
- // index.scss
55
- @forward "@db-ux/core-components/build/styles/rollup";
56
- ```
57
-
58
- **CSS**
59
-
60
- Within HTML files directly:
53
+ Import the styles in your main `.css` file.
61
54
 
62
- ```html
63
- <!-- index.html //-->
64
- <link rel="stylesheet" href="/styles/rollup.css" />
65
- ```
66
-
67
- Or within your JavaScript files, with the related bundler as a prefix (in this case rollup and equivalents like Vite):
55
+ ```css
56
+ /* index.css */
57
+ @layer whitelabel-theme, db-ux;
58
+ /* You may want to include another theme here, this is a whitelabel theme! So instead of including the following line of code, please have a look at the DB Theme section */
59
+ @import "@db-ux/core-foundations/build/styles/theme/rollup.css"
60
+ layer(whitelabel-theme);
68
61
 
69
- ```js
70
- // main.js
71
- import "@db-ux/core-components/build/styles/rollup.css";
62
+ @import "@db-ux/core-components/build/styles/bundle.css" layer(db-ux);
72
63
  ```
73
64
 
74
65
  > **Vite 8 Note:** Starting with Vite 8, 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 `vite.config.ts` like this:
@@ -95,7 +86,11 @@ import browserslist from "browserslist";
95
86
  export default defineConfig({
96
87
  css: {
97
88
  lightningcss: {
98
- targets: browserslistToTargets(browserslist(">= 0.5%, last 2 major versions, Firefox ESR, not dead"))
89
+ targets: browserslistToTargets(
90
+ browserslist(
91
+ ">= 0.5%, last 2 major versions, Firefox ESR, not dead"
92
+ )
93
+ )
99
94
  }
100
95
  }
101
96
  });
@@ -112,7 +107,7 @@ In the case you want to include only some components, and you could do it like t
112
107
 
113
108
  ```css
114
109
  /* The theme contains all props required for components like spacings, colors, ... */
115
- @import "@db-ux/core-foundations/build/styles/defaults/default-theme.css";
110
+ @import "@db-ux/core-foundations/build/styles/bundle.css";
116
111
  /* The font include uses default font families based on your bundling paths (relative, absolute, webpack, rollup) */
117
112
  @import "@db-ux/core-foundations/build/styles/fonts/rollup.css";
118
113
  /* The required styles will normalize css and add focus and default font to body */
@@ -6,10 +6,92 @@
6
6
  - always use variant `outlined` as default
7
7
  - use variant `brand` as CTA or primary action
8
8
  - if `noText`/`no-text` property is used add a `DBTooltip` or `db-tooltip` inside the Button
9
- - always add a `type` as property as best practise
9
+ - if `noText`/`no-text` property is used, an icon attribute (`icon`, `iconLeading`, or `iconTrailing`) is also required
10
+ - always add a `type` as property as best practise (`button`, `submit`, or `reset`)
10
11
  - there is no `size=large` button
12
+ - only use one icon attribute at a time: `icon`, `iconLeading`, or `iconTrailing` — never combine them
11
13
 
12
14
  ## `DBStack` or `db-stack`
13
15
 
14
16
  - there is no property `gap="fix-md"`, available values are `small`, `medium`, etc.
15
17
  - there is no property `direction="horizontal"`, available values are `row`, `column`, etc.
18
+
19
+ ## `DBPage` or `db-page`
20
+
21
+ - If you use `DBHeader` or a footer use `<DBPage variant="fixed">`, without a header use `DBPage variant="auto"`
22
+
23
+ ## `DBAccordion` or `db-accordion`
24
+
25
+ - never nest a `DBAccordion`/`db-accordion` inside another `DBAccordion`/`db-accordion` — it confuses users
26
+
27
+ ## `DBAccordionItem` or `db-accordion-item`
28
+
29
+ - always provide either a `headline`, `headlinePlain` attribute, or a headline slot
30
+ - must have children content (text or child elements)
31
+
32
+ ## `DBBadge` or `db-badge`
33
+
34
+ - when using corner placement (`corner-top-left`, `corner-top-right`, `corner-bottom-left`, `corner-bottom-right`), text/children must be max 3 characters
35
+ - when using corner placement, a `label` attribute is required for accessibility
36
+ - inside interactive elements (`DBButton`, `DBLink`, `button`, `a`), do not use `placement="inline"` — use corner placement instead
37
+ - when no `placement` is set, the default is `inline`
38
+
39
+ ## `DBLink` or `db-link`
40
+
41
+ - when using `content="external"`, always add `target="_blank"` and `referrerPolicy` (e.g. `"no-referrer"`)
42
+ - when using `target="_blank"`, always set `content="external"`
43
+
44
+ ## `DBInput` or `db-input`
45
+
46
+ - always add a `type` attribute (e.g. `text`, `email`, `password`, `file`) for better developer experience
47
+ - when `type="file"`, always add an `accept` attribute (e.g. `".pdf"`, `"image/*"`)
48
+ - `multiple` and `accept` attributes are only valid for `type="file"` — do not use them with other types
49
+
50
+ ## `DBSelect` or `db-select`
51
+
52
+ - must have either an `options` property or `<option>` children — never leave it empty
53
+
54
+ ## `DBCustomSelect` or `db-custom-select`
55
+
56
+ - always provide `mobileCloseButtonText` for accessibility
57
+ - when using `selectedType="tag"`, always provide `removeTagsTexts` attribute for accessibility
58
+
59
+ ## `DBNotification` or `db-notification`
60
+
61
+ - always provide `closeButtonText` attribute for accessibility
62
+ - must have children content (text or child elements)
63
+
64
+ ## `DBDrawer` or `db-drawer`
65
+
66
+ - always provide `closeButtonText` attribute for accessibility
67
+
68
+ ## `DBHeader` or `db-header`
69
+
70
+ - always provide `burgerMenuLabel` attribute for accessibility
71
+
72
+ ## `DBNavigationItem` or `db-navigation-item`
73
+
74
+ - always provide `backButtonText` attribute for accessibility
75
+ - must have children content (text or child elements)
76
+
77
+ ## `DBTag` or `db-tag`
78
+
79
+ - when using `behavior="removable"`, always provide `removeButton` attribute for accessibility
80
+
81
+ ## `DBTooltip` or `db-tooltip`
82
+
83
+ - must not contain interactive elements (buttons, links, inputs, etc.) — use `DBPopover` for interactive content
84
+ - must be a child of an interactive element (`button`, `a`, `DBButton`, `DBLink`, `DBNavigationItem`, `DBTabItem`, `input`, `select`, `textarea`, etc.) for accessibility
85
+
86
+ ## `DBIcon` or `db-icon`
87
+
88
+ - prefer using the `icon` attribute on the parent component (`DBButton`, `DBInput`, `DBLink`, `DBTag`, etc.) instead of nesting a `DBIcon`/`db-icon` child
89
+
90
+ ## Form components (`DBInput`, `DBTextarea`, `DBSelect`, `DBCustomSelect`, `DBCheckbox`, `DBRadio`, `DBSwitch`)
91
+
92
+ - always provide a `label` attribute for accessibility (for `DBCheckbox`, `DBRadio`, `DBSwitch` children text content also counts as label)
93
+ - when using validation attributes (`required`, `minLength`, `maxLength`, `min`, `max`, `pattern`), always provide an `invalidMessage` attribute for better UX (exception: `DBRadio` with `required` does not need `invalidMessage`)
94
+
95
+ ## Content components (`DBButton`, `DBLink`, `DBBadge`, `DBIcon`, `DBInfotext`, `DBNavigationItem`, `DBNotification`, `DBAccordionItem`)
96
+
97
+ - must have either a `text` property or children content — never leave them empty
@@ -1,3 +1,22 @@
1
1
  ## Best Practise / Common AI mistakes
2
2
 
3
3
  - always read this file if you use Components: `**agent-path**/agent/Best-Practise_Common-AI-Mistakes.md`
4
+
5
+ ## Styling Dependencies
6
+
7
+ Import the styles in `scss` or `css`. Based on your technology the file names could be different.
8
+
9
+ - `relative`: asset path point to `../assets`
10
+ - `webpack`: asset path point to `~@db-ux/core-foundations/assets`
11
+ - `rollup`: asset path point to `@db-ux/core-foundations/assets`
12
+
13
+ **Important**: These bundled files automatically include **all dependencies from [foundations](https://www.npmjs.com/package/@db-ux/core-foundations)** (design tokens, colors, fonts, etc.) **and all [components](https://github.com/db-ux-design-system/core-web/blob/main/packages/components/src/styles/db-ux-components.scss)** - everything you need in one import!
14
+
15
+ **CSS**
16
+
17
+ ```css
18
+ // index.css
19
+ @import "@db-ux/core-components/build/styles/rollup.css";
20
+ ```
21
+
22
+ > **Note:** Create a new `.css` file if not present to include the styles
@@ -99,7 +99,7 @@ dialog:not([data-backdrop=none])[data-backdrop=weak]::backdrop, dialog:not([data
99
99
  /* stylelint-disable-next-line db-ux/use-sizing */
100
100
  max-block-size: var(--db-drawer-max-height, calc(100% - var(--db-spacing-fixed-xl)));
101
101
  /* stylelint-disable-next-line db-ux/use-sizing */
102
- min-block-size: var(--db-drawer-min-height, calc(100% - var(--db-spacing-fixed-xl)));
102
+ min-block-size: var(--db-drawer-min-height, auto);
103
103
  max-inline-size: none;
104
104
  }
105
105
 
@@ -220,7 +220,7 @@ dialog:not([data-backdrop=none])[data-backdrop=weak]::backdrop, dialog:not([data
220
220
  /* stylelint-disable-next-line db-ux/use-sizing */
221
221
  max-inline-size: var(--db-drawer-max-width, calc(100% - var(--db-spacing-fixed-xl)));
222
222
  /* stylelint-disable-next-line db-ux/use-sizing */
223
- min-inline-size: var(--db-drawer-min-width, calc(100% - var(--db-spacing-fixed-xl)));
223
+ min-inline-size: var(--db-drawer-min-width, auto);
224
224
  }
225
225
  .db-drawer .db-drawer-container:not([data-width=full]):not([data-direction]), .db-drawer .db-drawer-container:not([data-width=full])[data-direction=right] {
226
226
  border-inline-start: var(--db-border-width-3xs) solid var(--db-adaptive-on-bg-basic-emphasis-60-default);
@@ -302,10 +302,10 @@ dialog:not([data-backdrop=none])[data-backdrop=weak]::backdrop, dialog:not([data
302
302
  position: relative;
303
303
  }
304
304
  .db-drawer[open] .db-drawer-container[data-transition=open]:not([data-direction]), .db-drawer[open] .db-drawer-container[data-transition=open][data-direction=right], .db-drawer[open] .db-drawer-container[data-transition=open][data-direction=left] {
305
- transform: translateX(0%);
305
+ transform: none;
306
306
  }
307
307
  .db-drawer[open] .db-drawer-container[data-transition=open][data-direction=up], .db-drawer[open] .db-drawer-container[data-transition=open][data-direction=down] {
308
- transform: translateY(0%);
308
+ transform: none;
309
309
  }
310
310
  @media (prefers-reduced-motion: no-preference) {
311
311
  .db-drawer[open] .db-drawer-container[data-transition=close] {
@@ -40,7 +40,7 @@
40
40
  /* stylelint-disable-next-line db-ux/use-sizing */
41
41
  min-block-size: var(
42
42
  --db-drawer-min-height,
43
- calc(100% - #{variables.$db-spacing-fixed-xl})
43
+ auto
44
44
  );
45
45
  max-inline-size: none;
46
46
  }
@@ -173,7 +173,7 @@ $spacings: (
173
173
  /* stylelint-disable-next-line db-ux/use-sizing */
174
174
  min-inline-size: var(
175
175
  --db-drawer-min-width,
176
- calc(100% - #{variables.$db-spacing-fixed-xl})
176
+ auto
177
177
  );
178
178
 
179
179
  &:not([data-direction]),
@@ -287,12 +287,12 @@ $spacings: (
287
287
  &:not([data-direction]),
288
288
  &[data-direction="right"],
289
289
  &[data-direction="left"] {
290
- transform: translateX(0%);
290
+ transform: none;
291
291
  }
292
292
 
293
293
  &[data-direction="up"],
294
294
  &[data-direction="down"] {
295
- transform: translateY(0%);
295
+ transform: none;
296
296
  }
297
297
  }
298
298