@db-ux/core-components 4.5.4 → 4.6.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.
- package/CHANGELOG.md +38 -15
- package/README.md +44 -19
- package/agent/Best-Practise_Common-AI-Mistakes.md +83 -1
- package/agent/_instructions.md +19 -0
- package/build/components/accordion/accordion.css +0 -34
- package/build/components/accordion-item/accordion-item.css +3 -94
- package/build/components/badge/badge.css +6 -102
- package/build/components/brand/brand.css +3 -94
- package/build/components/button/button.css +6 -100
- package/build/components/card/card.css +0 -34
- package/build/components/checkbox/checkbox.css +6 -100
- package/build/components/custom-button/custom-button.css +6 -100
- package/build/components/custom-select/custom-select.css +459 -572
- package/build/components/custom-select-dropdown/custom-select-dropdown.css +147 -238
- package/build/components/custom-select-form-field/custom-select-form-field.css +0 -88
- package/build/components/custom-select-list/custom-select-list.css +0 -88
- package/build/components/custom-select-list-item/custom-select-list-item.css +3 -94
- package/build/components/divider/divider.css +0 -34
- package/build/components/drawer/drawer.css +10 -44
- package/build/components/drawer/drawer.scss +4 -10
- package/build/components/header/header.css +255 -373
- package/build/components/icon/icon.css +0 -34
- package/build/components/infotext/infotext.css +6 -100
- package/build/components/input/input.css +306 -416
- package/build/components/link/link.css +6 -100
- package/build/components/navigation/navigation.css +0 -88
- package/build/components/navigation-item/navigation-item.css +21 -101
- package/build/components/navigation-item/navigation-item.scss +9 -12
- package/build/components/notification/notification.css +741 -868
- package/build/components/page/page.css +0 -34
- package/build/components/popover/popover.css +0 -34
- package/build/components/radio/radio.css +6 -100
- package/build/components/section/section.css +0 -34
- package/build/components/select/select.css +306 -416
- package/build/components/stack/stack-web-component.css +0 -34
- package/build/components/stack/stack.css +0 -34
- package/build/components/switch/switch.css +9 -106
- package/build/components/tab-item/tab-item.css +0 -88
- package/build/components/tab-list/tab-list.css +3 -94
- package/build/components/tab-panel/tab-panel.css +0 -34
- package/build/components/tabs/tabs.css +0 -88
- package/build/components/tag/tag.css +741 -854
- package/build/components/textarea/textarea.css +12 -116
- package/build/components/tooltip/tooltip.css +3 -94
- package/build/styles/absolute.css +1641 -1669
- package/build/styles/absolute.scss +2 -4
- package/build/styles/bundle.css +1989 -0
- package/build/styles/bundle.scss +15 -0
- package/build/styles/dialog-init.css +1 -1
- package/build/styles/dialog-init.scss +1 -1
- package/build/styles/index.css +487 -515
- package/build/styles/relative.css +1641 -1669
- package/build/styles/relative.scss +2 -15
- package/build/styles/rollup.css +1641 -1669
- package/build/styles/rollup.scss +2 -4
- package/build/styles/visually-hidden.css +1 -1
- package/build/styles/webpack.css +1641 -1669
- package/build/styles/webpack.scss +2 -4
- package/package.json +7 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,28 @@
|
|
|
1
1
|
# @db-ux/core-components
|
|
2
2
|
|
|
3
|
+
## 4.6.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- fix(navigation): issue with changed transform inside drawer lead to broken sub-navigation for mobile view - [see commit 1762975](https://github.com/db-ux-design-system/core-web/commit/17629755c0c249808c0bb69686f167677d4181ee)
|
|
8
|
+
|
|
9
|
+
## 4.6.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- refactor: exclude whitelabel-theme from default bundle to reduce size and to align with "how to import a theme" - [see commit f272967](https://github.com/db-ux-design-system/core-web/commit/f272967acb7a37dc9b07d9786134e437b284e9b6)
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- fix: issue with tailwind duplicating some classes by using `@theme` inline - [see commit 92de4e6](https://github.com/db-ux-design-system/core-web/commit/92de4e6e5fdad3be5629d7457944d3b9b7396cf4)
|
|
18
|
+
|
|
19
|
+
- fix: the drawer ignored custom `max-width` and `max-height` properties due to internal `min-width` overrides. Additionally, resolved a bug where nested fixed-position elements (like DBCustomSelect dropdowns) were incorrectly positioned while the drawer was open. - [see commit d40e651](https://github.com/db-ux-design-system/core-web/commit/d40e6516c147c5e0f62bd049cf9bc1928ed6b36f)
|
|
20
|
+
|
|
21
|
+
- docs(vite): mentioning version 8 configuration in `README.md` file - [see commit 4c5fc92](https://github.com/db-ux-design-system/core-web/commit/4c5fc9266402d9585087f4738a1a800cff1515f1)
|
|
22
|
+
|
|
23
|
+
- fix(number input): prevent from clearing on intermediate decimal entry - [see commit aa85967](https://github.com/db-ux-design-system/core-web/commit/aa85967ffeaa685f6b647069d0e1d415d812dc87):
|
|
24
|
+
- fix(input,textarea): allow using `undefined` as `value`
|
|
25
|
+
|
|
3
26
|
## 4.5.4
|
|
4
27
|
|
|
5
28
|
### Patch Changes
|
|
@@ -139,14 +162,14 @@ _version bump_
|
|
|
139
162
|
- 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)
|
|
140
163
|
|
|
141
164
|
- fix(DBCustomSelect): properly announce selected options - [see commit 773edeb](https://github.com/db-ux-design-system/core-web/commit/773edeb943a085eb79e1c8d59059137b2830fbf0):
|
|
142
|
-
|
|
165
|
+
- feat(DBCustomSelect): introduce new property `selectedPrefix`
|
|
143
166
|
|
|
144
167
|
### Patch Changes
|
|
145
168
|
|
|
146
169
|
- fix(DBCustomSelect): automatically handle form reset events - [see commit 6af5246](https://github.com/db-ux-design-system/core-web/commit/6af5246b3b2e6febdc6ff6342ba1a8eb10184d14):
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
170
|
+
- An event listener is now added for every form component (input, custom-select, etc.) when a `form` property is passed.
|
|
171
|
+
- This listener detects form resets and updates the component's internal value/checked state accordingly.
|
|
172
|
+
- > **Note**: This does not work for `ngModel` in Angular.
|
|
150
173
|
|
|
151
174
|
- 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)
|
|
152
175
|
|
|
@@ -169,7 +192,7 @@ _version bump_
|
|
|
169
192
|
### Patch Changes
|
|
170
193
|
|
|
171
194
|
- chore: update instructions files for better copilot outputs - [see commit e4bc905](https://github.com/db-ux-design-system/core-web/commit/e4bc90508479387371d816d5776f9f568aa5fb82):
|
|
172
|
-
|
|
195
|
+
- fix: add some missing variables
|
|
173
196
|
|
|
174
197
|
- fix(card): Remove the obsolete but harmful declaration regarding wrapping button and link styles. - [see commit 34c78df](https://github.com/db-ux-design-system/core-web/commit/34c78dffd4f43b0ac740574358b426a562e05cd0)
|
|
175
198
|
|
|
@@ -184,9 +207,9 @@ _version bump_
|
|
|
184
207
|
### Major Changes
|
|
185
208
|
|
|
186
209
|
- feat: Switch stable rework - [see commit cb2deb0](https://github.com/db-ux-design-system/core-web/commit/cb2deb0f1c54900d1967483aea05d81279c02f59):
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
210
|
+
- **BREAKING CHANGE**: remove `emphasis` property
|
|
211
|
+
- introduce validation (invalid and valid)
|
|
212
|
+
- configurable label position
|
|
190
213
|
|
|
191
214
|
- **BREAKING CHANGE**: refactor(Custom Select): renamed `ariaListLabel` property to `listLabel` - [see commit 966d5ad](https://github.com/db-ux-design-system/core-web/commit/966d5ad01f00d0ca1707cc316a63e2d431fff1e9)
|
|
192
215
|
|
|
@@ -205,12 +228,12 @@ _version bump_
|
|
|
205
228
|
### Patch Changes
|
|
206
229
|
|
|
207
230
|
- fix(DBTabs): ensure navigation arrows appear correctly on window resize - [see commit 4e65e00](https://github.com/db-ux-design-system/core-web/commit/4e65e00d280cae18baee03b5a7a9b13eec063835):
|
|
208
|
-
|
|
231
|
+
- 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.
|
|
209
232
|
|
|
210
233
|
- fix(select): jumping placeholder for label above - [see commit 7ed8d22](https://github.com/db-ux-design-system/core-web/commit/7ed8d2225102e0e9044437e95917e11eef4bc73f)
|
|
211
234
|
|
|
212
235
|
- 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):
|
|
213
|
-
|
|
236
|
+
- auto-generate/auto-update `.github/copilot-instructions.md`, to ensure GitHub Copilot uses DB UX Components for code generation
|
|
214
237
|
|
|
215
238
|
## 3.1.17
|
|
216
239
|
|
|
@@ -218,17 +241,17 @@ _version bump_
|
|
|
218
241
|
|
|
219
242
|
- fix: color mode for textarea resizer control set by color-mode-switch documentation UI component - [see commit 354e270](https://github.com/db-ux-design-system/core-web/commit/354e27029a4378288a97ed5e31b75c11758f0c01)
|
|
220
243
|
- refactor: enabling `hidden` HTML attribute in every context in which we need to set overwriting styling declarations (`display`) - [see commit 4826455](https://github.com/db-ux-design-system/core-web/commit/4826455637590b6ae780afb93abb9effe9380342)
|
|
221
|
-
|
|
244
|
+
- @db-ux/core-foundations@3.1.17
|
|
222
245
|
|
|
223
246
|
## 3.1.16
|
|
224
247
|
|
|
225
248
|
### Patch Changes
|
|
226
249
|
|
|
227
250
|
- 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):
|
|
228
|
-
|
|
229
|
-
|
|
251
|
+
- Fixes a keyboard accessibility issue where users could not navigate to options in subsequent option groups using arrow keys in single-select mode.
|
|
252
|
+
- Now, all options are accessible via keyboard regardless of group boundaries.
|
|
230
253
|
- 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)
|
|
231
|
-
|
|
254
|
+
- @db-ux/core-foundations@3.1.16
|
|
232
255
|
|
|
233
256
|
## 3.1.15
|
|
234
257
|
|
|
@@ -237,4 +260,4 @@ _version bump_
|
|
|
237
260
|
- 262964b: fix(Switch): double event firing with Angular signals
|
|
238
261
|
- 262964b: fix(CustomSelect): tags remaining visible when form values are reset
|
|
239
262
|
- 262964b: fix(CustomSelect): custom removeTagsTexts are not applied correctly
|
|
240
|
-
|
|
263
|
+
- @db-ux/core-foundations@3.1.15
|
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
|
|
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,
|
|
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 `
|
|
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,52 @@ 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
|
-
|
|
51
|
+
### Import
|
|
52
52
|
|
|
53
|
-
|
|
54
|
-
// index.scss
|
|
55
|
-
@forward "@db-ux/core-components/build/styles/rollup";
|
|
56
|
-
```
|
|
57
|
-
|
|
58
|
-
**CSS**
|
|
53
|
+
Import the styles in your main `.css` file.
|
|
59
54
|
|
|
60
|
-
|
|
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);
|
|
61
61
|
|
|
62
|
-
|
|
63
|
-
<!-- index.html //-->
|
|
64
|
-
<link rel="stylesheet" href="/styles/rollup.css" />
|
|
62
|
+
@import "@db-ux/core-components/build/styles/bundle.css" layer(db-ux);
|
|
65
63
|
```
|
|
66
64
|
|
|
67
|
-
|
|
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:
|
|
66
|
+
|
|
67
|
+
```ts
|
|
68
|
+
// vite.config.ts
|
|
69
|
+
export default defineConfig({
|
|
70
|
+
build: {
|
|
71
|
+
cssMinify: "esbuild"
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
```
|
|
68
75
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
76
|
+
> Alternatively, you could define a [browserslist](https://browsersl.ist/) based on your individual browser support strategy — which might be totally different from the list Vite 8 defines by default (targeting browsers from the early 2020s):
|
|
77
|
+
|
|
78
|
+
```ts
|
|
79
|
+
// Note: You need to install the required packages first:
|
|
80
|
+
// npm install -D lightningcss browserslist
|
|
81
|
+
|
|
82
|
+
// vite.config.ts
|
|
83
|
+
import { browserslistToTargets } from "lightningcss";
|
|
84
|
+
import browserslist from "browserslist";
|
|
85
|
+
|
|
86
|
+
export default defineConfig({
|
|
87
|
+
css: {
|
|
88
|
+
lightningcss: {
|
|
89
|
+
targets: browserslistToTargets(
|
|
90
|
+
browserslist(
|
|
91
|
+
">= 0.5%, last 2 major versions, Firefox ESR, not dead"
|
|
92
|
+
)
|
|
93
|
+
)
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
});
|
|
72
97
|
```
|
|
73
98
|
|
|
74
99
|
### DB Theme
|
|
@@ -82,7 +107,7 @@ In the case you want to include only some components, and you could do it like t
|
|
|
82
107
|
|
|
83
108
|
```css
|
|
84
109
|
/* The theme contains all props required for components like spacings, colors, ... */
|
|
85
|
-
@import "@db-ux/core-foundations/build/styles/
|
|
110
|
+
@import "@db-ux/core-foundations/build/styles/bundle.css";
|
|
86
111
|
/* The font include uses default font families based on your bundling paths (relative, absolute, webpack, rollup) */
|
|
87
112
|
@import "@db-ux/core-foundations/build/styles/fonts/rollup.css";
|
|
88
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
|
-
-
|
|
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
|
package/agent/_instructions.md
CHANGED
|
@@ -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
|
|
@@ -1,38 +1,4 @@
|
|
|
1
1
|
/* Variants for adaptive components like input, select, notification, ... */
|
|
2
|
-
@layer variables {}
|
|
3
|
-
|
|
4
|
-
@layer variables {}
|
|
5
|
-
|
|
6
|
-
@layer variables {}
|
|
7
|
-
|
|
8
|
-
@layer variables {}
|
|
9
|
-
|
|
10
|
-
@layer variables {}
|
|
11
|
-
|
|
12
|
-
@layer variables {}
|
|
13
|
-
|
|
14
|
-
@layer variables {}
|
|
15
|
-
|
|
16
|
-
@layer variables {}
|
|
17
|
-
|
|
18
|
-
@layer variables {}
|
|
19
|
-
|
|
20
|
-
@layer variables {}
|
|
21
|
-
|
|
22
|
-
@layer variables {}
|
|
23
|
-
|
|
24
|
-
@layer variables {}
|
|
25
|
-
|
|
26
|
-
@layer variables {}
|
|
27
|
-
|
|
28
|
-
@layer variables {}
|
|
29
|
-
|
|
30
|
-
@layer variables {}
|
|
31
|
-
|
|
32
|
-
@layer variables {}
|
|
33
|
-
|
|
34
|
-
@layer variables {}
|
|
35
|
-
|
|
36
2
|
.db-accordion[data-variant=card] .db-accordion-item::after {
|
|
37
3
|
border: var(--db-border-width-3xs) solid var(--db-adaptive-on-bg-basic-emphasis-60-default);
|
|
38
4
|
}
|
|
@@ -18,40 +18,6 @@
|
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
/* Variants for adaptive components like input, select, notification, ... */
|
|
21
|
-
@layer variables {}
|
|
22
|
-
|
|
23
|
-
@layer variables {}
|
|
24
|
-
|
|
25
|
-
@layer variables {}
|
|
26
|
-
|
|
27
|
-
@layer variables {}
|
|
28
|
-
|
|
29
|
-
@layer variables {}
|
|
30
|
-
|
|
31
|
-
@layer variables {}
|
|
32
|
-
|
|
33
|
-
@layer variables {}
|
|
34
|
-
|
|
35
|
-
@layer variables {}
|
|
36
|
-
|
|
37
|
-
@layer variables {}
|
|
38
|
-
|
|
39
|
-
@layer variables {}
|
|
40
|
-
|
|
41
|
-
@layer variables {}
|
|
42
|
-
|
|
43
|
-
@layer variables {}
|
|
44
|
-
|
|
45
|
-
@layer variables {}
|
|
46
|
-
|
|
47
|
-
@layer variables {}
|
|
48
|
-
|
|
49
|
-
@layer variables {}
|
|
50
|
-
|
|
51
|
-
@layer variables {}
|
|
52
|
-
|
|
53
|
-
@layer variables {}
|
|
54
|
-
|
|
55
21
|
@keyframes popover-animation {
|
|
56
22
|
0% {
|
|
57
23
|
pointer-events: none;
|
|
@@ -110,70 +76,13 @@
|
|
|
110
76
|
}
|
|
111
77
|
}
|
|
112
78
|
|
|
113
|
-
@layer variables {}
|
|
114
|
-
|
|
115
|
-
@layer variables {}
|
|
116
|
-
|
|
117
|
-
@layer variables {}
|
|
118
|
-
|
|
119
|
-
@layer variables {}
|
|
120
|
-
|
|
121
|
-
@layer variables {}
|
|
122
|
-
|
|
123
|
-
@layer variables {}
|
|
124
|
-
|
|
125
|
-
@layer variables {}
|
|
126
|
-
|
|
127
|
-
@layer variables {}
|
|
128
|
-
|
|
129
|
-
@layer variables {}
|
|
130
|
-
|
|
131
|
-
@layer variables {}
|
|
132
|
-
|
|
133
|
-
@layer variables {}
|
|
134
|
-
|
|
135
|
-
@layer variables {}
|
|
136
|
-
|
|
137
|
-
@layer variables {}
|
|
138
|
-
|
|
139
79
|
.db-accordion-item > details > summary {
|
|
140
80
|
font: var(--db-type-body-md);
|
|
141
|
-
/*
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
.db-accordion-item > details > summary {
|
|
145
|
-
/* Those variables are only for components to calculate heights and change icons */
|
|
146
|
-
--db-icon-font-weight: var(--db-base-body-icon-weight-md);
|
|
147
|
-
--db-icon-font-size: var(--db-base-body-icon-font-size-md);
|
|
148
|
-
}
|
|
81
|
+
/* Those variables are only for components to calculate heights and change icons */
|
|
82
|
+
--db-icon-font-weight: var(--db-base-body-icon-weight-md);
|
|
83
|
+
--db-icon-font-size: var(--db-base-body-icon-font-size-md);
|
|
149
84
|
}
|
|
150
85
|
|
|
151
|
-
@layer variables {}
|
|
152
|
-
|
|
153
|
-
@layer variables {}
|
|
154
|
-
|
|
155
|
-
@layer variables {}
|
|
156
|
-
|
|
157
|
-
@layer variables {}
|
|
158
|
-
|
|
159
|
-
@layer variables {}
|
|
160
|
-
|
|
161
|
-
@layer variables {}
|
|
162
|
-
|
|
163
|
-
@layer variables {}
|
|
164
|
-
|
|
165
|
-
@layer variables {}
|
|
166
|
-
|
|
167
|
-
@layer variables {}
|
|
168
|
-
|
|
169
|
-
@layer variables {}
|
|
170
|
-
|
|
171
|
-
@layer variables {}
|
|
172
|
-
|
|
173
|
-
@layer variables {}
|
|
174
|
-
|
|
175
|
-
@layer variables {}
|
|
176
|
-
|
|
177
86
|
.db-accordion-item > details > summary:not([data-show-icon-trailing=false])::after {
|
|
178
87
|
--db-icon-trailing: "chevron_down";
|
|
179
88
|
margin-inline-start: var(--db-icon-margin-start, var(--db-spacing-fixed-xs));
|
|
@@ -1,115 +1,19 @@
|
|
|
1
1
|
/* Variants for adaptive components like input, select, notification, ... */
|
|
2
|
-
@layer variables {}
|
|
3
|
-
|
|
4
|
-
@layer variables {}
|
|
5
|
-
|
|
6
|
-
@layer variables {}
|
|
7
|
-
|
|
8
|
-
@layer variables {}
|
|
9
|
-
|
|
10
|
-
@layer variables {}
|
|
11
|
-
|
|
12
|
-
@layer variables {}
|
|
13
|
-
|
|
14
|
-
@layer variables {}
|
|
15
|
-
|
|
16
|
-
@layer variables {}
|
|
17
|
-
|
|
18
|
-
@layer variables {}
|
|
19
|
-
|
|
20
|
-
@layer variables {}
|
|
21
|
-
|
|
22
|
-
@layer variables {}
|
|
23
|
-
|
|
24
|
-
@layer variables {}
|
|
25
|
-
|
|
26
|
-
@layer variables {}
|
|
27
|
-
|
|
28
|
-
@layer variables {}
|
|
29
|
-
|
|
30
|
-
@layer variables {}
|
|
31
|
-
|
|
32
|
-
@layer variables {}
|
|
33
|
-
|
|
34
|
-
@layer variables {}
|
|
35
|
-
|
|
36
|
-
@layer variables {}
|
|
37
|
-
|
|
38
|
-
@layer variables {}
|
|
39
|
-
|
|
40
|
-
@layer variables {}
|
|
41
|
-
|
|
42
|
-
@layer variables {}
|
|
43
|
-
|
|
44
|
-
@layer variables {}
|
|
45
|
-
|
|
46
|
-
@layer variables {}
|
|
47
|
-
|
|
48
|
-
@layer variables {}
|
|
49
|
-
|
|
50
|
-
@layer variables {}
|
|
51
|
-
|
|
52
|
-
@layer variables {}
|
|
53
|
-
|
|
54
|
-
@layer variables {}
|
|
55
|
-
|
|
56
|
-
@layer variables {}
|
|
57
|
-
|
|
58
|
-
@layer variables {}
|
|
59
|
-
|
|
60
|
-
@layer variables {}
|
|
61
|
-
|
|
62
|
-
@layer variables {}
|
|
63
|
-
|
|
64
|
-
@layer variables {}
|
|
65
|
-
|
|
66
|
-
@layer variables {}
|
|
67
|
-
|
|
68
2
|
.db-badge[data-size=medium], .db-badge[data-size=medium] > *,
|
|
69
3
|
.db-badge[data-size=medium] .db-icon {
|
|
70
4
|
font: var(--db-type-body-sm);
|
|
71
|
-
/*
|
|
5
|
+
/* Those variables are only for components to calculate heights and change icons */
|
|
6
|
+
--db-icon-font-weight: var(--db-base-body-icon-weight-sm);
|
|
7
|
+
--db-icon-font-size: var(--db-base-body-icon-font-size-sm);
|
|
72
8
|
}
|
|
73
|
-
@layer variables {
|
|
74
|
-
.db-badge[data-size=medium], .db-badge[data-size=medium] > *,
|
|
75
|
-
.db-badge[data-size=medium] .db-icon {
|
|
76
|
-
/* Those variables are only for components to calculate heights and change icons */
|
|
77
|
-
--db-icon-font-weight: var(--db-base-body-icon-weight-sm);
|
|
78
|
-
--db-icon-font-size: var(--db-base-body-icon-font-size-sm);
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
@layer variables {}
|
|
83
|
-
|
|
84
|
-
@layer variables {}
|
|
85
|
-
|
|
86
|
-
@layer variables {}
|
|
87
|
-
|
|
88
|
-
@layer variables {}
|
|
89
|
-
|
|
90
|
-
@layer variables {}
|
|
91
9
|
|
|
92
10
|
.db-badge, .db-badge > *,
|
|
93
11
|
.db-badge .db-icon {
|
|
94
12
|
font: var(--db-type-body-2xs);
|
|
95
|
-
/*
|
|
13
|
+
/* Those variables are only for components to calculate heights and change icons */
|
|
14
|
+
--db-icon-font-weight: var(--db-base-body-icon-weight-2xs);
|
|
15
|
+
--db-icon-font-size: var(--db-base-body-icon-font-size-2xs);
|
|
96
16
|
}
|
|
97
|
-
@layer variables {
|
|
98
|
-
.db-badge, .db-badge > *,
|
|
99
|
-
.db-badge .db-icon {
|
|
100
|
-
/* Those variables are only for components to calculate heights and change icons */
|
|
101
|
-
--db-icon-font-weight: var(--db-base-body-icon-weight-2xs);
|
|
102
|
-
--db-icon-font-size: var(--db-base-body-icon-font-size-2xs);
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
@layer variables {}
|
|
107
|
-
|
|
108
|
-
@layer variables {}
|
|
109
|
-
|
|
110
|
-
@layer variables {}
|
|
111
|
-
|
|
112
|
-
@layer variables {}
|
|
113
17
|
|
|
114
18
|
.db-badge {
|
|
115
19
|
border: var(--db-border-width-3xs) solid var(--db-adaptive-on-bg-basic-emphasis-60-default);
|