Skip to content

Commit c2d7167

Browse files
authored
Merge branch 'dbux-3' into feat-dbswc-323-link
2 parents 7eb7eba + ec947ca commit c2d7167

24 files changed

+757
-664
lines changed

docs/migrationGuide.adoc

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,20 @@ We've remove the deprecated previous HTML implementation of the label by an `out
3636
- The `id`-attributes value on that `label` element needs to match the following attributes values that needs to get added onto the `progress` HTML tag itself:
3737
`aria-describedby="{{ id }}-label"`
3838

39+
=== `input`
40+
41+
- The input background style variations `semitransparent`, `solid`, `white` and `outline` have been removed. Input fields have only one background style left.
42+
- Introducing 3 different sizes of input fields according to our `tonality` introduction: `functional`, `regular`, `expressive
43+
- Integration of `data-icon-before` and `data-icon-after` property for enabling use of custom icons in input fields
44+
- Introducing new variations: `error`, `warning`, `success` and `information` following the new guidelines 3.0 color system
45+
3946
=== `link`
4047

4148
- Removed the ability for custom icons according to guidelines 3.0
4249
- Added `primary` as variant for highlighting links
4350
- Changed use of `data-variant` to use with `primary` and used `data-content` attribute for differentiation between `internal` and `external`
4451
- Font-size definition has moved to DB UI Base due to our `tonality` introduction (default and for `data-size=small`)
4552

46-
4753
== DB UI Core 2.2.0 Migration Guide
4854

4955
=== progress element

helpers/unique-id.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
/* eslint unicorn/prefer-module: 0, eqeqeq: 0 */
2+
module.exports = function (Handlebars) {
3+
Handlebars.registerHelper('unique-id', function () {
4+
// Adapted from https://www.codingdeft.com/posts/generate-uuid-javascript/
5+
const crypto = require('node:crypto');
6+
7+
const buf = crypto.randomBytes(16);
8+
9+
// Convert the buffer to a hexadecimal string
10+
const hex = buf.toString('hex');
11+
12+
// Return the hexadecimal string as a UUID
13+
return `id-${hex.slice(
14+
0,
15+
7
16+
)}-${hex.slice(8, 15)}-${hex.slice(16, 23)}-${hex.slice(24, 31)}`;
17+
});
18+
};

package-lock.json

Lines changed: 302 additions & 329 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
"license": "Apache-2.0",
5757
"dependencies": {
5858
"@csstools/normalize.css": "^12.0.0",
59-
"@db-ui/base": "2.0.0-17-7e98291"
59+
"@db-ui/base": "2.0.0-18-812537f"
6060
},
6161
"devDependencies": {
6262
"@babel/cli": "^7.19.3",
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
// TODO common styles for formfields adopted from input

source/_patterns/01-elements/_form-elements.scss

Lines changed: 0 additions & 85 deletions
This file was deleted.

source/_patterns/01-elements/_form-elements.variables.scss

Lines changed: 0 additions & 40 deletions
This file was deleted.

source/_patterns/01-elements/input/_input.variables.scss

Lines changed: 0 additions & 5 deletions
This file was deleted.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<dl>
2+
{{#each sizes}}
3+
<dt>{{size}}:</dt>
4+
<dd class="db-ui-{{size}}">{{> elements-input type=../type label=../label placeholder=../placeholder id=(unique-id) }}</dd>
5+
{{/each }}
6+
</dl>
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"sizes": [
3+
{
4+
"size": "functional",
5+
"label": "Functional"
6+
},
7+
{
8+
"size": "regular",
9+
"label": "Regular (default, data-size attribute is optional)"
10+
},
11+
{
12+
"size": "expressive",
13+
"label": "Expressive"
14+
}
15+
],
16+
"type": "text",
17+
"placeholder": "e.g. DB User",
18+
"label": "Textlabel"
19+
}

0 commit comments

Comments
 (0)