@db-ux/core-components 4.5.4-mcp-server-migrate-tool-test-8fcd884 → 4.5.4-postcss-a42fe67
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 +5 -1
- package/agent/Best-Practise_Common-AI-Mistakes.md +79 -1
- package/build/styles/absolute.css +10 -38
- package/build/styles/dialog-init.css +1 -1
- package/build/styles/index.css +7 -35
- package/build/styles/relative.css +10 -38
- package/build/styles/rollup.css +10 -38
- package/build/styles/webpack.css +10 -38
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -95,7 +95,11 @@ import browserslist from "browserslist";
|
|
|
95
95
|
export default defineConfig({
|
|
96
96
|
css: {
|
|
97
97
|
lightningcss: {
|
|
98
|
-
targets: browserslistToTargets(
|
|
98
|
+
targets: browserslistToTargets(
|
|
99
|
+
browserslist(
|
|
100
|
+
">= 0.5%, last 2 major versions, Firefox ESR, not dead"
|
|
101
|
+
)
|
|
102
|
+
)
|
|
99
103
|
}
|
|
100
104
|
}
|
|
101
105
|
});
|
|
@@ -6,10 +6,88 @@
|
|
|
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
|
+
## `DBAccordion` or `db-accordion`
|
|
20
|
+
|
|
21
|
+
- never nest a `DBAccordion`/`db-accordion` inside another `DBAccordion`/`db-accordion` — it confuses users
|
|
22
|
+
|
|
23
|
+
## `DBAccordionItem` or `db-accordion-item`
|
|
24
|
+
|
|
25
|
+
- always provide either a `headline`, `headlinePlain` attribute, or a headline slot
|
|
26
|
+
- must have children content (text or child elements)
|
|
27
|
+
|
|
28
|
+
## `DBBadge` or `db-badge`
|
|
29
|
+
|
|
30
|
+
- when using corner placement (`corner-top-left`, `corner-top-right`, `corner-bottom-left`, `corner-bottom-right`), text/children must be max 3 characters
|
|
31
|
+
- when using corner placement, a `label` attribute is required for accessibility
|
|
32
|
+
- inside interactive elements (`DBButton`, `DBLink`, `button`, `a`), do not use `placement="inline"` — use corner placement instead
|
|
33
|
+
- when no `placement` is set, the default is `inline`
|
|
34
|
+
|
|
35
|
+
## `DBLink` or `db-link`
|
|
36
|
+
|
|
37
|
+
- when using `content="external"`, always add `target="_blank"` and `referrerPolicy` (e.g. `"no-referrer"`)
|
|
38
|
+
- when using `target="_blank"`, always set `content="external"`
|
|
39
|
+
|
|
40
|
+
## `DBInput` or `db-input`
|
|
41
|
+
|
|
42
|
+
- always add a `type` attribute (e.g. `text`, `email`, `password`, `file`) for better developer experience
|
|
43
|
+
- when `type="file"`, always add an `accept` attribute (e.g. `".pdf"`, `"image/*"`)
|
|
44
|
+
- `multiple` and `accept` attributes are only valid for `type="file"` — do not use them with other types
|
|
45
|
+
|
|
46
|
+
## `DBSelect` or `db-select`
|
|
47
|
+
|
|
48
|
+
- must have either an `options` property or `<option>` children — never leave it empty
|
|
49
|
+
|
|
50
|
+
## `DBCustomSelect` or `db-custom-select`
|
|
51
|
+
|
|
52
|
+
- always provide `mobileCloseButtonText` for accessibility
|
|
53
|
+
- when using `selectedType="tag"`, always provide `removeTagsTexts` attribute for accessibility
|
|
54
|
+
|
|
55
|
+
## `DBNotification` or `db-notification`
|
|
56
|
+
|
|
57
|
+
- always provide `closeButtonText` attribute for accessibility
|
|
58
|
+
- must have children content (text or child elements)
|
|
59
|
+
|
|
60
|
+
## `DBDrawer` or `db-drawer`
|
|
61
|
+
|
|
62
|
+
- always provide `closeButtonText` attribute for accessibility
|
|
63
|
+
|
|
64
|
+
## `DBHeader` or `db-header`
|
|
65
|
+
|
|
66
|
+
- always provide `burgerMenuLabel` attribute for accessibility
|
|
67
|
+
|
|
68
|
+
## `DBNavigationItem` or `db-navigation-item`
|
|
69
|
+
|
|
70
|
+
- always provide `backButtonText` attribute for accessibility
|
|
71
|
+
- must have children content (text or child elements)
|
|
72
|
+
|
|
73
|
+
## `DBTag` or `db-tag`
|
|
74
|
+
|
|
75
|
+
- when using `behavior="removable"`, always provide `removeButton` attribute for accessibility
|
|
76
|
+
|
|
77
|
+
## `DBTooltip` or `db-tooltip`
|
|
78
|
+
|
|
79
|
+
- must not contain interactive elements (buttons, links, inputs, etc.) — use `DBPopover` for interactive content
|
|
80
|
+
- must be a child of an interactive element (`button`, `a`, `DBButton`, `DBLink`, `DBNavigationItem`, `DBTabItem`, `input`, `select`, `textarea`, etc.) for accessibility
|
|
81
|
+
|
|
82
|
+
## `DBIcon` or `db-icon`
|
|
83
|
+
|
|
84
|
+
- prefer using the `icon` attribute on the parent component (`DBButton`, `DBInput`, `DBLink`, `DBTag`, etc.) instead of nesting a `DBIcon`/`db-icon` child
|
|
85
|
+
|
|
86
|
+
## Form components (`DBInput`, `DBTextarea`, `DBSelect`, `DBCustomSelect`, `DBCheckbox`, `DBRadio`, `DBSwitch`)
|
|
87
|
+
|
|
88
|
+
- always provide a `label` attribute for accessibility (for `DBCheckbox`, `DBRadio`, `DBSwitch` children text content also counts as label)
|
|
89
|
+
- 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`)
|
|
90
|
+
|
|
91
|
+
## Content components (`DBButton`, `DBLink`, `DBBadge`, `DBIcon`, `DBInfotext`, `DBNavigationItem`, `DBNotification`, `DBAccordionItem`)
|
|
92
|
+
|
|
93
|
+
- must have either a `text` property or children content — never leave them empty
|