@db-ux/core-components 4.5.4-postcss-a42fe67 → 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:
@@ -116,7 +107,7 @@ In the case you want to include only some components, and you could do it like t
116
107
 
117
108
  ```css
118
109
  /* The theme contains all props required for components like spacings, colors, ... */
119
- @import "@db-ux/core-foundations/build/styles/defaults/default-theme.css";
110
+ @import "@db-ux/core-foundations/build/styles/bundle.css";
120
111
  /* The font include uses default font families based on your bundling paths (relative, absolute, webpack, rollup) */
121
112
  @import "@db-ux/core-foundations/build/styles/fonts/rollup.css";
122
113
  /* The required styles will normalize css and add focus and default font to body */
@@ -16,6 +16,10 @@
16
16
  - there is no property `gap="fix-md"`, available values are `small`, `medium`, etc.
17
17
  - there is no property `direction="horizontal"`, available values are `row`, `column`, etc.
18
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
+
19
23
  ## `DBAccordion` or `db-accordion`
20
24
 
21
25
  - never nest a `DBAccordion`/`db-accordion` inside another `DBAccordion`/`db-accordion` — it confuses users
@@ -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