@db-ux/core-foundations 5.7.1 → 6.0.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 +28 -0
- package/README.md +2 -2
- package/build/styles/bundle.css +979 -967
- package/build/styles/bundle.scss +1 -1
- package/build/styles/defaults/default-fonts.css +1 -25
- package/build/styles/defaults/default-fonts.scss +0 -29
- package/build/styles/defaults/default-required.css +25 -1
- package/build/styles/defaults/default-required.scss +48 -1
- package/build/styles/helpers/_a11y.scss +5 -1
- package/build/styles/helpers/_focus.scss +27 -0
- package/build/styles/helpers/classes/all.css +7 -0
- package/build/styles/helpers/classes/focus.css +7 -0
- package/build/styles/helpers/classes/focus.scss +5 -0
- package/package.json +7 -7
package/build/styles/bundle.scss
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
@forward "defaults/default-required";
|
|
1
2
|
@forward "defaults/default-root";
|
|
2
3
|
@forward "defaults/default-elevation";
|
|
3
4
|
@forward "defaults/default-fonts";
|
|
4
5
|
@forward "defaults/default-code";
|
|
5
6
|
@forward "defaults/default-icons";
|
|
6
|
-
@forward "defaults/default-required";
|
|
7
7
|
@forward "defaults/default-container-properties";
|
|
8
8
|
|
|
9
9
|
[data-mode] {
|
|
@@ -1,25 +1 @@
|
|
|
1
|
-
code,small{font:var(--db-type-body-sm);--db-icon-font-weight:var(--db-base-body-icon-weight-sm);--db-icon-font-size:var(--db-base-body-icon-font-size-sm)}h1{font:
|
|
2
|
-
--db-base-headline-icon-font-size-xl
|
|
3
|
-
);--db-icon-font-weight:var(
|
|
4
|
-
--db-base-headline-icon-weight-xl
|
|
5
|
-
)}h2{font:var(--db-type-headline-lg);margin-block:var(--db-spacing-fixed-lg)}h2:after,h2:before{--db-icon-font-size:var(
|
|
6
|
-
--db-base-headline-icon-font-size-lg
|
|
7
|
-
);--db-icon-font-weight:var(
|
|
8
|
-
--db-base-headline-icon-weight-lg
|
|
9
|
-
)}h3{font:var(--db-type-headline-md);margin-block:var(--db-spacing-fixed-md)}h3:after,h3:before{--db-icon-font-size:var(
|
|
10
|
-
--db-base-headline-icon-font-size-md
|
|
11
|
-
);--db-icon-font-weight:var(
|
|
12
|
-
--db-base-headline-icon-weight-md
|
|
13
|
-
)}h4{font:var(--db-type-headline-sm);margin-block:var(--db-spacing-fixed-sm)}h4:after,h4:before{--db-icon-font-size:var(
|
|
14
|
-
--db-base-headline-icon-font-size-sm
|
|
15
|
-
);--db-icon-font-weight:var(
|
|
16
|
-
--db-base-headline-icon-weight-sm
|
|
17
|
-
)}h5{font:var(--db-type-headline-xs);margin-block:var(--db-spacing-fixed-xs)}h5:after,h5:before{--db-icon-font-size:var(
|
|
18
|
-
--db-base-headline-icon-font-size-xs
|
|
19
|
-
);--db-icon-font-weight:var(
|
|
20
|
-
--db-base-headline-icon-weight-xs
|
|
21
|
-
)}h6{font:var(--db-type-headline-2xs);margin-block:var(--db-spacing-fixed-2xs)}h6:after,h6:before{--db-icon-font-size:var(
|
|
22
|
-
--db-base-headline-icon-font-size-2xs
|
|
23
|
-
);--db-icon-font-weight:var(
|
|
24
|
-
--db-base-headline-icon-weight-2xs
|
|
25
|
-
)}:is(h1,h2,h3,h4,h5,h6){font-family:var(--db-font-family-head);font-weight:bolder;text-wrap:balance}:is(h1,h2,h3,h4,h5,h6)[data-variant=light]{font-weight:300}:is(h1,h2,h3,h4,h5,h6)[data-variant=regular]{font-weight:400}p{margin-block:var(--db-spacing-fixed-md)}[data-font=digital]{font-weight:300}[data-font=regular]{font-weight:400}[data-font=medium]{font-weight:500}[data-font=semibold]{font-weight:600}[data-font=bold],strong{font-weight:700}
|
|
1
|
+
code,small{font:var(--db-type-body-sm);--db-icon-font-weight:var(--db-base-body-icon-weight-sm);--db-icon-font-size:var(--db-base-body-icon-font-size-sm)}:is(h1,h2,h3,h4,h5,h6)[data-variant=light]{font-weight:300}:is(h1,h2,h3,h4,h5,h6)[data-variant=regular]{font-weight:400}[data-font=digital]{font-weight:300}[data-font=regular]{font-weight:400}[data-font=medium]{font-weight:500}[data-font=semibold]{font-weight:600}[data-font=bold],strong{font-weight:700}
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
/* Use this file if you want the default fonts for paragraph and headlines in your project */
|
|
2
|
-
@use "sass:string";
|
|
3
|
-
@use "../variables";
|
|
4
2
|
@use "../fonts";
|
|
5
3
|
|
|
6
4
|
small,
|
|
@@ -8,30 +6,7 @@ code {
|
|
|
8
6
|
@extend %db-overwrite-font-size-sm;
|
|
9
7
|
}
|
|
10
8
|
|
|
11
|
-
@each $headline, $size in fonts.$headlines {
|
|
12
|
-
#{string.unquote($headline)} {
|
|
13
|
-
/* stylelint-disable custom-property-pattern */
|
|
14
|
-
font: var(--db-type-headline-#{string.unquote($size)});
|
|
15
|
-
margin-block: var(--db-spacing-fixed-#{string.unquote($size)});
|
|
16
|
-
|
|
17
|
-
&::before,
|
|
18
|
-
&::after {
|
|
19
|
-
--db-icon-font-size: var(
|
|
20
|
-
--db-base-headline-icon-font-size-#{string.unquote($size)}
|
|
21
|
-
);
|
|
22
|
-
--db-icon-font-weight: var(
|
|
23
|
-
--db-base-headline-icon-weight-#{string.unquote($size)}
|
|
24
|
-
);
|
|
25
|
-
}
|
|
26
|
-
/* stylelint-enable custom-property-pattern */
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
|
|
30
9
|
:is(h1, h2, h3, h4, h5, h6) {
|
|
31
|
-
font-family: var(--db-font-family-head);
|
|
32
|
-
font-weight: bolder;
|
|
33
|
-
text-wrap: balance;
|
|
34
|
-
|
|
35
10
|
&[data-variant="light"] {
|
|
36
11
|
font-weight: 300;
|
|
37
12
|
}
|
|
@@ -41,10 +16,6 @@ code {
|
|
|
41
16
|
}
|
|
42
17
|
}
|
|
43
18
|
|
|
44
|
-
p {
|
|
45
|
-
margin-block: variables.$db-spacing-fixed-md;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
19
|
[data-font="digital"] {
|
|
49
20
|
font-weight: 300;
|
|
50
21
|
}
|
|
@@ -2590,4 +2590,28 @@
|
|
|
2590
2590
|
);--db-burgundy-bg-vibrant-pressed:light-dark(
|
|
2591
2591
|
var(--db-burgundy-10),
|
|
2592
2592
|
var(--db-burgundy-10)
|
|
2593
|
-
)}:where(html){line-height:1.15;-webkit-text-size-adjust:100%;text-size-adjust:100%}:where(h1){font-size:2em;margin-block
|
|
2593
|
+
)}:where(html){line-height:1.15;-webkit-text-size-adjust:100%;text-size-adjust:100%}:where(h1){font-size:2em;margin-block:.67em}:where(dl,ol,ul) :where(dl,ol,ul){margin-block:0}:where(hr){box-sizing:initial;color:inherit;height:0}:where(abbr[title]){text-decoration:underline;text-decoration:underline dotted}:where(b,strong){font-weight:bolder}:where(code,kbd,pre,samp){font-family:monospace,monospace;font-size:1em}:where(small){font-size:80%}:where(table){border-color:currentColor;text-indent:0}:where(button,input,select),:where(textarea){margin:0}:where(button),:where(select){text-transform:none}:where(button,input:is([type=button i],[type=reset i],[type=submit i])){-webkit-appearance:button}:where(progress){vertical-align:initial}:where(input[type=search i]){-webkit-appearance:textfield;outline-offset:-2px}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}::-webkit-input-placeholder{color:inherit;opacity:.54}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}:where(button,input:is([type=button i],[type=color i],[type=reset i],[type=submit i]))::-moz-focus-inner{border-style:none;padding:0}:where(button,input:is([type=button i],[type=color i],[type=reset i],[type=submit i]))::-moz-focusring{outline:1px dotted ButtonText}:where(:-moz-ui-invalid){box-shadow:none}:where(dialog){background-color:#fff;border:solid;color:#000;height:-moz-fit-content;height:fit-content;left:0;margin:auto;padding:1em;position:absolute;right:0;width:-moz-fit-content;width:fit-content}:where(dialog:not([open])){display:none}:where(summary){display:list-item}@property --db-screen-xs{syntax:"*";inherits:true;initial-value:20em}@property --db-screen-sm{syntax:"*";inherits:true;initial-value:48em}@property --db-screen-md{syntax:"*";inherits:true;initial-value:64em}@property --db-screen-lg{syntax:"*";inherits:true;initial-value:90em}@property --db-screen-xl{syntax:"*";inherits:true;initial-value:120em}:root{color-scheme:var(--db-color-scheme,light dark)}:root:has([name=color-scheme]:is([content~=light],[content~=dark])){color-scheme:var(--db-color-scheme)}[data-mode=light]{color-scheme:light}[data-mode=dark]{color-scheme:dark}[data-pride=true]{--db-pride-red:var(--db-red-origin-default);--db-pride-orange:var(--db-orange-origin-default);--db-pride-yellow:var(--db-yellow-origin-default);--db-pride-green:var(--db-light-green-origin-default);--db-pride-blue:var(--db-blue-origin-default);--db-pride-violet:var(--db-violet-origin-default)}body,html{margin:0;padding:0}[data-text-spacing=true]{--db-text-spacing:0.5}[data-text-spacing=false]{--db-text-spacing:0}:where(h1,h2,h3,h4,h5,h6,p){margin-block:calc(1lh * var(--db-text-spacing,0))}:where(h1){font:var(--db-type-headline-xl)}:where(h1):after,:where(h1):before{--db-icon-font-size:var(
|
|
2594
|
+
--db-base-headline-icon-font-size-xl
|
|
2595
|
+
);--db-icon-font-weight:var(
|
|
2596
|
+
--db-base-headline-icon-weight-xl
|
|
2597
|
+
)}:where(h2){font:var(--db-type-headline-lg)}:where(h2):after,:where(h2):before{--db-icon-font-size:var(
|
|
2598
|
+
--db-base-headline-icon-font-size-lg
|
|
2599
|
+
);--db-icon-font-weight:var(
|
|
2600
|
+
--db-base-headline-icon-weight-lg
|
|
2601
|
+
)}:where(h3){font:var(--db-type-headline-md)}:where(h3):after,:where(h3):before{--db-icon-font-size:var(
|
|
2602
|
+
--db-base-headline-icon-font-size-md
|
|
2603
|
+
);--db-icon-font-weight:var(
|
|
2604
|
+
--db-base-headline-icon-weight-md
|
|
2605
|
+
)}:where(h4){font:var(--db-type-headline-sm)}:where(h4):after,:where(h4):before{--db-icon-font-size:var(
|
|
2606
|
+
--db-base-headline-icon-font-size-sm
|
|
2607
|
+
);--db-icon-font-weight:var(
|
|
2608
|
+
--db-base-headline-icon-weight-sm
|
|
2609
|
+
)}:where(h5){font:var(--db-type-headline-xs)}:where(h5):after,:where(h5):before{--db-icon-font-size:var(
|
|
2610
|
+
--db-base-headline-icon-font-size-xs
|
|
2611
|
+
);--db-icon-font-weight:var(
|
|
2612
|
+
--db-base-headline-icon-weight-xs
|
|
2613
|
+
)}:where(h6){font:var(--db-type-headline-2xs)}:where(h6):after,:where(h6):before{--db-icon-font-size:var(
|
|
2614
|
+
--db-base-headline-icon-font-size-2xs
|
|
2615
|
+
);--db-icon-font-weight:var(
|
|
2616
|
+
--db-base-headline-icon-weight-2xs
|
|
2617
|
+
)}body{font-family:var(--db-font-family-sans)}:where(h1,h2,h3,h4,h5,h6){font-family:var(--db-font-family-head);font-weight:bolder;text-wrap:balance}html{-webkit-tap-highlight-color:var(--db-informational-bg-basic-transparent-semi-default)}*,:after,:before,details>*,details>:after,details>:before{box-sizing:var(--db-box-sizing,border-box)}*{-webkit-font-smoothing:antialiased;font-synthesis:none;text-rendering:optimizelegibility}a,body,button,input,select,summary,textarea{color:inherit}embed,iframe,img,object,video{block-size:auto;max-inline-size:100%}fieldset,iframe{border:0}:where(ul){padding-inline-start:var(--db-spacing-fixed-md);list-style-type:var(--db-list-bullet)}:where(ul) li::marker{color:var(--db-brand-origin-default)}[role=navigation] :is(ol,ul),nav ol,nav ul{list-style-type:"";margin:0;padding:0}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* Required styles to normalize default css */
|
|
2
|
-
|
|
2
|
+
@use "sass:string";
|
|
3
3
|
@use "../variables";
|
|
4
4
|
@use "../colors";
|
|
5
5
|
@use "../helpers";
|
|
@@ -50,10 +50,57 @@ body {
|
|
|
50
50
|
padding: 0;
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
+
$block-text-elements: "h1, h2, h3, h4, h5, h6, p";
|
|
54
|
+
|
|
55
|
+
/* Block-level text carries no `margin-block` by default. The opt-in is driven
|
|
56
|
+
* through the inheriting `--db-text-spacing` custom property rather than
|
|
57
|
+
* descendant selectors, so the nearest `data-text-spacing` ancestor - or the
|
|
58
|
+
* element itself - wins by proximity instead of by source order. That makes
|
|
59
|
+
* `true` win when it is the closer ancestor and `false` opt a subtree back out,
|
|
60
|
+
* and it covers the attribute sitting on the block-text element itself. The
|
|
61
|
+
* property only carries the half-line-height multiplier; `1lh` is resolved on
|
|
62
|
+
* the text element in `margin-block`, so the spacing stays derived from each
|
|
63
|
+
* element's own line height rather than the ancestor's. */
|
|
64
|
+
[data-text-spacing="true"] {
|
|
65
|
+
--db-text-spacing: 0.5;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
[data-text-spacing="false"] {
|
|
69
|
+
--db-text-spacing: 0;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
:where(#{$block-text-elements}) {
|
|
73
|
+
margin-block: calc(1lh * var(--db-text-spacing, 0));
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
@each $headline, $size in fonts.$headlines {
|
|
77
|
+
:where(#{string.unquote($headline)}) {
|
|
78
|
+
/* stylelint-disable custom-property-pattern */
|
|
79
|
+
font: var(--db-type-headline-#{string.unquote($size)});
|
|
80
|
+
|
|
81
|
+
&::before,
|
|
82
|
+
&::after {
|
|
83
|
+
--db-icon-font-size: var(
|
|
84
|
+
--db-base-headline-icon-font-size-#{string.unquote($size)}
|
|
85
|
+
);
|
|
86
|
+
--db-icon-font-weight: var(
|
|
87
|
+
--db-base-headline-icon-weight-#{string.unquote($size)}
|
|
88
|
+
);
|
|
89
|
+
}
|
|
90
|
+
/* stylelint-enable custom-property-pattern */
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
53
94
|
body {
|
|
54
95
|
font-family: var(--db-font-family-sans);
|
|
55
96
|
}
|
|
56
97
|
|
|
98
|
+
:where(h1, h2, h3, h4, h5, h6) {
|
|
99
|
+
font-family: var(--db-font-family-head);
|
|
100
|
+
font-weight: bolder;
|
|
101
|
+
text-wrap: balance;
|
|
102
|
+
}
|
|
103
|
+
|
|
57
104
|
html {
|
|
58
105
|
-webkit-tap-highlight-color: #{colors.$db-informational-bg-basic-transparent-semi-default};
|
|
59
106
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// stylelint-disable property-no-deprecated, db-ux/use-sizing
|
|
2
|
-
|
|
2
|
+
@mixin a11y-visually-hidden {
|
|
3
3
|
position: absolute !important;
|
|
4
4
|
inset-block-start: 0 !important;
|
|
5
5
|
inline-size: 1px !important;
|
|
@@ -12,6 +12,10 @@
|
|
|
12
12
|
pointer-events: none !important;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
+
%a11y-visually-hidden {
|
|
16
|
+
@include a11y-visually-hidden;
|
|
17
|
+
}
|
|
18
|
+
|
|
15
19
|
// Hides text while keeping the element visible (e.g. for background images).
|
|
16
20
|
// RTL-safe alternative to text-indent: -9999px.
|
|
17
21
|
@mixin a11y-visually-hidden-text {
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
@use "../variables";
|
|
2
2
|
@use "../colors";
|
|
3
3
|
|
|
4
|
+
// Room the focus ring needs outside the border box, for scroll containers to reserve.
|
|
5
|
+
$db-focus-outline-reach: calc(
|
|
6
|
+
#{variables.$db-border-width-xs} + #{variables.$db-border-width-2xs}
|
|
7
|
+
);
|
|
8
|
+
|
|
4
9
|
@mixin get-focus-placeholder {
|
|
5
10
|
outline: #{variables.$db-border-width-2xs} solid
|
|
6
11
|
var(
|
|
@@ -21,3 +26,25 @@
|
|
|
21
26
|
}
|
|
22
27
|
}
|
|
23
28
|
}
|
|
29
|
+
|
|
30
|
+
// Reserves ring space inside a clipping container, margin compensating it.
|
|
31
|
+
// This owns the `padding` and `margin` of the element it sits on. CSS cannot
|
|
32
|
+
// read an existing value, so there is nothing to add to: the shorthands either
|
|
33
|
+
// replace all four sides of a container's own spacing, or lose against a more
|
|
34
|
+
// specific selector and silently reserve nothing. The padding and the
|
|
35
|
+
// `content-box` are also what keeps the reserve layout-neutral, and that only
|
|
36
|
+
// works out while the padding is ours alone. So this belongs on a container
|
|
37
|
+
// without spacing or a fixed size of its own; for anything else, move the clip
|
|
38
|
+
// to a wrapper and put this on the wrapper, keeping the spacing inside.
|
|
39
|
+
@mixin get-focus-container {
|
|
40
|
+
// `border-box` would absorb the padding, leaving the margin to displace.
|
|
41
|
+
box-sizing: content-box;
|
|
42
|
+
// stylelint-disable-next-line db-ux/use-spacings
|
|
43
|
+
padding: $db-focus-outline-reach;
|
|
44
|
+
// stylelint-disable-next-line db-ux/use-spacings
|
|
45
|
+
margin: calc(-1 * #{$db-focus-outline-reach});
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
%focus-container-placeholder {
|
|
49
|
+
@include get-focus-container;
|
|
50
|
+
}
|
|
@@ -12,6 +12,13 @@
|
|
|
12
12
|
border-radius: var(--db-border-radius-xs);
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
+
.db-focus-container,
|
|
16
|
+
[data-focus-container=true] {
|
|
17
|
+
box-sizing: content-box;
|
|
18
|
+
padding: calc(var(--db-border-width-xs) + var(--db-border-width-2xs));
|
|
19
|
+
margin: calc(-1 * calc(var(--db-border-width-xs) + var(--db-border-width-2xs)));
|
|
20
|
+
}
|
|
21
|
+
|
|
15
22
|
.db-divider-top-before,
|
|
16
23
|
[data-divider=top-before] {
|
|
17
24
|
--db-divider-bg-color: var(--db-adaptive-on-bg-basic-emphasis-60-default);
|
|
@@ -11,3 +11,10 @@
|
|
|
11
11
|
[data-focus=default]:not([data-disable-focus=true]):not([type=radio], [role=switch]) {
|
|
12
12
|
border-radius: var(--db-border-radius-xs);
|
|
13
13
|
}
|
|
14
|
+
|
|
15
|
+
.db-focus-container,
|
|
16
|
+
[data-focus-container=true] {
|
|
17
|
+
box-sizing: content-box;
|
|
18
|
+
padding: calc(var(--db-border-width-xs) + var(--db-border-width-2xs));
|
|
19
|
+
margin: calc(-1 * calc(var(--db-border-width-xs) + var(--db-border-width-2xs)));
|
|
20
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@db-ux/core-foundations",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "6.0.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Provides basic tokens and assets based on DB UX Design System – Generation 3",
|
|
6
6
|
"repository": {
|
|
@@ -20,18 +20,18 @@
|
|
|
20
20
|
"devDependencies": {
|
|
21
21
|
"@csstools/normalize.css": "12.1.1",
|
|
22
22
|
"@db-ux/icon-font-tools": "0.3.6",
|
|
23
|
-
"@playwright/test": "1.
|
|
23
|
+
"@playwright/test": "1.64.1",
|
|
24
24
|
"cpy-cli": "7.0.0",
|
|
25
|
-
"cssnano": "9.
|
|
25
|
+
"cssnano": "9.9.0",
|
|
26
26
|
"glob": "13.0.6",
|
|
27
27
|
"nodemon": "3.1.14",
|
|
28
|
-
"postcss": "8.5.
|
|
28
|
+
"postcss": "8.5.30",
|
|
29
29
|
"postcss-cli": "12.0.0",
|
|
30
|
-
"prettier": "3.9.
|
|
31
|
-
"sass": "1.105.
|
|
30
|
+
"prettier": "3.9.10",
|
|
31
|
+
"sass": "1.105.2",
|
|
32
32
|
"tsx": "4.23.15",
|
|
33
33
|
"typescript": "5.9.3",
|
|
34
|
-
"vite": "8.3.
|
|
34
|
+
"vite": "8.3.4"
|
|
35
35
|
},
|
|
36
36
|
"publishConfig": {
|
|
37
37
|
"registry": "https://registry.npmjs.org/",
|