@db-ux/core-components 4.0.3 → 4.1.0
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 +33 -8
- package/build/assets/fonts/OpenSans-Bold-EU.woff2 +0 -0
- package/build/assets/fonts/OpenSans-ExtraBold-EU.woff2 +0 -0
- package/build/assets/fonts/OpenSans-Light-EU.woff2 +0 -0
- package/build/assets/fonts/OpenSans-Medium-EU.woff2 +0 -0
- package/build/assets/fonts/OpenSans-Regular-EU.woff2 +0 -0
- package/build/assets/fonts/OpenSans-SemiBold-EU.woff2 +0 -0
- package/build/assets/fonts/generate-eu-fonts.ts +1 -1
- package/build/assets/fonts/unicode-eu.txt +1 -0
- package/build/components/badge/badge.css +2 -1
- package/build/components/brand/brand.scss +2 -2
- package/build/components/button/button.css +10 -5
- package/build/components/button/button.scss +10 -5
- package/build/components/custom-select/custom-select.css +47 -4
- package/build/components/custom-select/custom-select.scss +4 -0
- package/build/components/custom-select-list/custom-select-list.css +1 -3
- package/build/components/custom-select-list/custom-select-list.scss +2 -4
- package/build/components/drawer/drawer.css +4 -8
- package/build/components/drawer/drawer.scss +5 -4
- package/build/components/icon/icon.scss +2 -2
- package/build/components/infotext/infotext.scss +2 -2
- package/build/components/input/input.css +46 -5
- package/build/components/navigation/navigation.css +1 -3
- package/build/components/navigation/navigation.scss +3 -4
- package/build/components/notification/notification-grid-default.scss +50 -0
- package/build/components/notification/notification-grid-non-overlay.scss +70 -58
- package/build/components/notification/notification-grid-overlay.scss +153 -52
- package/build/components/notification/notification-grid-shared.css +1 -0
- package/build/components/notification/notification-grid-shared.scss +80 -0
- package/build/components/notification/notification.css +165 -67
- package/build/components/notification/notification.scss +56 -68
- package/build/components/page/page.css +35 -0
- package/build/components/page/page.scss +4 -4
- package/build/components/popover/popover.scss +2 -2
- package/build/components/select/select.css +45 -5
- package/build/components/select/select.scss +1 -2
- package/build/components/tab-list/tab-list.css +1 -3
- package/build/components/tab-list/tab-list.scss +1 -2
- package/build/components/tab-panel/tab-panel.css +35 -0
- package/build/components/tab-panel/tab-panel.scss +2 -2
- package/build/components/tabs/tabs.scss +4 -4
- package/build/components/tag/tag.css +2 -1
- package/build/components/textarea/textarea.css +44 -4
- package/build/styles/absolute.css +7 -7
- package/build/styles/index.css +7 -7
- package/build/styles/internal/_button-components.scss +4 -3
- package/build/styles/internal/_form-components.scss +14 -1
- package/build/styles/relative.css +7 -7
- package/build/styles/rollup.css +7 -7
- package/build/styles/webpack.css +7 -7
- package/package.json +3 -3
|
@@ -3,9 +3,21 @@
|
|
|
3
3
|
grid-template-areas: "content";
|
|
4
4
|
grid-template-columns: 1fr;
|
|
5
5
|
|
|
6
|
+
// Add a layout for inline links
|
|
7
|
+
&[data-link-variant="inline"] {
|
|
8
|
+
grid-template-columns: 1fr min-content;
|
|
9
|
+
grid-template-areas: "content timestamp";
|
|
10
|
+
}
|
|
11
|
+
|
|
6
12
|
&:has(.db-button) {
|
|
7
13
|
grid-template-columns: 1fr min-content;
|
|
8
14
|
grid-template-areas: "content close";
|
|
15
|
+
|
|
16
|
+
// Inline link + close button
|
|
17
|
+
&[data-link-variant="inline"] {
|
|
18
|
+
grid-template-columns: 1fr min-content min-content;
|
|
19
|
+
grid-template-areas: "content timestamp close";
|
|
20
|
+
}
|
|
9
21
|
}
|
|
10
22
|
|
|
11
23
|
// 2. headline
|
|
@@ -15,11 +27,25 @@
|
|
|
15
27
|
"head"
|
|
16
28
|
"content";
|
|
17
29
|
|
|
30
|
+
&[data-link-variant="inline"] {
|
|
31
|
+
grid-template-columns: 1fr min-content;
|
|
32
|
+
grid-template-areas:
|
|
33
|
+
"head timestamp"
|
|
34
|
+
"content content";
|
|
35
|
+
}
|
|
36
|
+
|
|
18
37
|
&:has(.db-button) {
|
|
19
38
|
grid-template-columns: 1fr min-content;
|
|
20
39
|
grid-template-areas:
|
|
21
40
|
"head close"
|
|
22
41
|
"content content";
|
|
42
|
+
|
|
43
|
+
&[data-link-variant="inline"] {
|
|
44
|
+
grid-template-columns: 1fr min-content min-content;
|
|
45
|
+
grid-template-areas:
|
|
46
|
+
"head timestamp close"
|
|
47
|
+
"content content ."; // Empty cell aligns content column with head row
|
|
48
|
+
}
|
|
23
49
|
}
|
|
24
50
|
}
|
|
25
51
|
|
|
@@ -30,9 +56,19 @@
|
|
|
30
56
|
grid-template-areas: "icon content";
|
|
31
57
|
grid-template-columns: min-content 1fr;
|
|
32
58
|
|
|
59
|
+
&[data-link-variant="inline"] {
|
|
60
|
+
grid-template-columns: min-content 1fr min-content;
|
|
61
|
+
grid-template-areas: "icon content timestamp";
|
|
62
|
+
}
|
|
63
|
+
|
|
33
64
|
&:has(.db-button) {
|
|
34
65
|
grid-template-columns: min-content 1fr min-content;
|
|
35
66
|
grid-template-areas: "icon content close";
|
|
67
|
+
|
|
68
|
+
&[data-link-variant="inline"] {
|
|
69
|
+
grid-template-columns: min-content 1fr min-content min-content;
|
|
70
|
+
grid-template-areas: "icon content timestamp close";
|
|
71
|
+
}
|
|
36
72
|
}
|
|
37
73
|
|
|
38
74
|
&:has(header) {
|
|
@@ -41,11 +77,25 @@
|
|
|
41
77
|
"icon head"
|
|
42
78
|
"icon content";
|
|
43
79
|
|
|
80
|
+
&[data-link-variant="inline"] {
|
|
81
|
+
grid-template-columns: min-content 1fr min-content;
|
|
82
|
+
grid-template-areas:
|
|
83
|
+
"icon head timestamp"
|
|
84
|
+
"icon content content";
|
|
85
|
+
}
|
|
86
|
+
|
|
44
87
|
&:has(.db-button) {
|
|
45
88
|
grid-template-columns: min-content 1fr min-content;
|
|
46
89
|
grid-template-areas:
|
|
47
90
|
"icon head close"
|
|
48
91
|
"icon content content";
|
|
92
|
+
|
|
93
|
+
&[data-link-variant="inline"] {
|
|
94
|
+
grid-template-columns: min-content 1fr min-content min-content;
|
|
95
|
+
grid-template-areas:
|
|
96
|
+
"icon head timestamp close"
|
|
97
|
+
"icon content content ."; // Empty cell aligns content column with head row
|
|
98
|
+
}
|
|
49
99
|
}
|
|
50
100
|
}
|
|
51
101
|
}
|
|
@@ -1,68 +1,80 @@
|
|
|
1
|
-
@use "
|
|
1
|
+
@use "notification-grid-shared" as shared;
|
|
2
2
|
|
|
3
|
-
%grid-layout-variant-not-overlay {
|
|
4
|
-
span {
|
|
5
|
-
@include display.display(none);
|
|
6
|
-
}
|
|
7
3
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
grid-template-areas:
|
|
13
|
-
"content"
|
|
14
|
-
"link";
|
|
15
|
-
grid-template-columns: 1fr;
|
|
4
|
+
// Wrapper mixins for non-overlay variants that use shared grid logic
|
|
5
|
+
@mixin non-overlay-base-grid($areas, $columns) {
|
|
6
|
+
@include shared.shared-base-grid($areas, $columns);
|
|
7
|
+
}
|
|
16
8
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
"content close"
|
|
21
|
-
"link link";
|
|
22
|
-
}
|
|
9
|
+
@mixin non-overlay-with-close($areas, $columns) {
|
|
10
|
+
@include shared.shared-with-close($areas, $columns);
|
|
11
|
+
}
|
|
23
12
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
grid-template-areas:
|
|
28
|
-
"head"
|
|
29
|
-
"content"
|
|
30
|
-
"link";
|
|
13
|
+
@mixin non-overlay-with-header($areas, $columns) {
|
|
14
|
+
@include shared.shared-with-header($areas, $columns);
|
|
15
|
+
}
|
|
31
16
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
"head close"
|
|
36
|
-
"content content"
|
|
37
|
-
"link link";
|
|
38
|
-
}
|
|
39
|
-
}
|
|
17
|
+
@mixin non-overlay-with-header-close($areas, $columns) {
|
|
18
|
+
@include shared.shared-with-header-close($areas, $columns);
|
|
19
|
+
}
|
|
40
20
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
&:has(img) {
|
|
45
|
-
grid-template-areas:
|
|
46
|
-
"icon content"
|
|
47
|
-
"icon link";
|
|
48
|
-
grid-template-columns: min-content 1fr;
|
|
21
|
+
@mixin non-overlay-with-icon($areas, $columns) {
|
|
22
|
+
@include shared.shared-with-icon($areas, $columns);
|
|
23
|
+
}
|
|
49
24
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
25
|
+
@mixin non-overlay-with-icon-close($areas, $columns) {
|
|
26
|
+
@include shared.shared-with-icon-close($areas, $columns);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
@mixin non-overlay-with-icon-header($areas, $columns) {
|
|
30
|
+
@include shared.shared-with-icon-header($areas, $columns);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
@mixin non-overlay-with-icon-header-close($areas, $columns) {
|
|
34
|
+
@include shared.shared-with-icon-header-close($areas, $columns);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
@mixin non-overlay-block-link-layouts() {
|
|
38
|
+
// 1. Base: content + block link (no additional elements)
|
|
39
|
+
@include non-overlay-base-grid("content" "link", 1fr);
|
|
40
|
+
@include non-overlay-with-close(
|
|
41
|
+
"content close" "link link",
|
|
42
|
+
1fr min-content
|
|
43
|
+
);
|
|
44
|
+
|
|
45
|
+
// 2. Adds: headline
|
|
46
|
+
@include non-overlay-with-header("head" "content" "link", 1fr);
|
|
47
|
+
@include non-overlay-with-header-close(
|
|
48
|
+
"head close" "content content" "link link",
|
|
49
|
+
1fr min-content
|
|
50
|
+
);
|
|
51
|
+
|
|
52
|
+
// 3. Adds: icon or image
|
|
53
|
+
@include non-overlay-with-icon("icon content" "icon link", min-content 1fr);
|
|
54
|
+
@include non-overlay-with-icon-close(
|
|
55
|
+
"icon content close" "icon link link",
|
|
56
|
+
min-content 1fr min-content
|
|
57
|
+
);
|
|
58
|
+
@include non-overlay-with-icon-header(
|
|
59
|
+
"icon head" "icon content" "icon link",
|
|
60
|
+
min-content 1fr
|
|
61
|
+
);
|
|
62
|
+
@include non-overlay-with-icon-header-close(
|
|
63
|
+
"icon head close" "icon content content" "icon link link",
|
|
64
|
+
min-content 1fr min-content
|
|
65
|
+
);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
%grid-layout-variant-not-overlay {
|
|
69
|
+
// Hide timestamp for non-overlay variants only
|
|
70
|
+
span {
|
|
71
|
+
display: none;
|
|
72
|
+
}
|
|
56
73
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
"icon link link";
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
}
|
|
74
|
+
// Apply block link layout when linkVariant is "block" (explicit or default)
|
|
75
|
+
// Only applies to non-overlay variants with block links
|
|
76
|
+
&[data-link-variant="block"],
|
|
77
|
+
&:not([data-link-variant]):has(a) {
|
|
78
|
+
@include non-overlay-block-link-layouts;
|
|
67
79
|
}
|
|
68
80
|
}
|
|
@@ -1,55 +1,156 @@
|
|
|
1
|
+
@use "notification-grid-shared" as shared;
|
|
2
|
+
|
|
3
|
+
// Wrapper mixins for overlay variants that use shared grid logic
|
|
4
|
+
@mixin overlay-base-grid($areas, $columns) {
|
|
5
|
+
@include shared.shared-base-grid($areas, $columns);
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
@mixin overlay-with-close($areas, $columns) {
|
|
9
|
+
@include shared.shared-with-close($areas, $columns);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
@mixin overlay-with-header($areas, $columns) {
|
|
13
|
+
@include shared.shared-with-header($areas, $columns);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
@mixin overlay-with-header-close($areas, $columns) {
|
|
17
|
+
@include shared.shared-with-header-close($areas, $columns);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
@mixin overlay-with-icon($areas, $columns) {
|
|
21
|
+
@include shared.shared-with-icon($areas, $columns);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
@mixin overlay-with-icon-close($areas, $columns) {
|
|
25
|
+
@include shared.shared-with-icon-close($areas, $columns);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
@mixin overlay-with-icon-header($areas, $columns) {
|
|
29
|
+
@include shared.shared-with-icon-header($areas, $columns);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
@mixin overlay-with-icon-header-close($areas, $columns) {
|
|
33
|
+
@include shared.shared-with-icon-header-close($areas, $columns);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
@mixin overlay-timestamp-area-layouts() {
|
|
37
|
+
// 1. Base layout: content + timestamp
|
|
38
|
+
@include overlay-base-grid("content timestamp", 1fr min-content);
|
|
39
|
+
@include overlay-with-close(
|
|
40
|
+
"content timestamp close",
|
|
41
|
+
1fr min-content min-content
|
|
42
|
+
);
|
|
43
|
+
|
|
44
|
+
// 2. Progressive enhancement: adds headline
|
|
45
|
+
@include overlay-with-header(
|
|
46
|
+
"head timestamp" "content content",
|
|
47
|
+
1fr min-content
|
|
48
|
+
);
|
|
49
|
+
@include overlay-with-header-close(
|
|
50
|
+
"head timestamp close" "content content content",
|
|
51
|
+
1fr min-content min-content
|
|
52
|
+
);
|
|
53
|
+
|
|
54
|
+
// 3. Progressive enhancement: adds icon or image
|
|
55
|
+
@include overlay-with-icon(
|
|
56
|
+
"icon content timestamp",
|
|
57
|
+
min-content 1fr min-content
|
|
58
|
+
);
|
|
59
|
+
@include overlay-with-icon-close(
|
|
60
|
+
"icon content timestamp close",
|
|
61
|
+
min-content 1fr min-content min-content
|
|
62
|
+
);
|
|
63
|
+
@include overlay-with-icon-header(
|
|
64
|
+
"icon head timestamp" "icon content content",
|
|
65
|
+
min-content 1fr min-content
|
|
66
|
+
);
|
|
67
|
+
@include overlay-with-icon-header-close(
|
|
68
|
+
"icon head timestamp close" "icon content content content",
|
|
69
|
+
min-content 1fr min-content min-content
|
|
70
|
+
);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
@mixin overlay-block-layouts-without-timestamp() {
|
|
74
|
+
// 1. Base layout: content + block link (overridden by subsequent mixins when additional elements detected)
|
|
75
|
+
@include overlay-base-grid("content" "link", 1fr);
|
|
76
|
+
@include overlay-with-close("content close" "link link", 1fr min-content);
|
|
77
|
+
|
|
78
|
+
// 2. Progressive enhancement: adds headline
|
|
79
|
+
@include overlay-with-header("head" "content" "link", 1fr);
|
|
80
|
+
@include overlay-with-header-close(
|
|
81
|
+
"head close" "content content" "link link",
|
|
82
|
+
1fr min-content
|
|
83
|
+
);
|
|
84
|
+
|
|
85
|
+
// 3. Progressive enhancement: adds icon or image
|
|
86
|
+
@include overlay-with-icon("icon content" "icon link", min-content 1fr);
|
|
87
|
+
@include overlay-with-icon-close(
|
|
88
|
+
"icon content close" "icon link link",
|
|
89
|
+
min-content 1fr min-content
|
|
90
|
+
);
|
|
91
|
+
@include overlay-with-icon-header(
|
|
92
|
+
"icon head" "icon content" "icon link",
|
|
93
|
+
min-content 1fr
|
|
94
|
+
);
|
|
95
|
+
@include overlay-with-icon-header-close(
|
|
96
|
+
"icon head close" "icon content content" "icon link link",
|
|
97
|
+
min-content 1fr min-content
|
|
98
|
+
);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
@mixin overlay-block-layouts() {
|
|
102
|
+
// 1. Base layout when content, timestamp, and block link are present (more specific rules apply when additional elements are detected)
|
|
103
|
+
@include overlay-base-grid(
|
|
104
|
+
"content timestamp" "link link",
|
|
105
|
+
1fr min-content
|
|
106
|
+
);
|
|
107
|
+
@include overlay-with-close(
|
|
108
|
+
"content timestamp close" "link link link",
|
|
109
|
+
1fr min-content min-content
|
|
110
|
+
);
|
|
111
|
+
|
|
112
|
+
// 2. Progressive enhancement: adds headline
|
|
113
|
+
@include overlay-with-header(
|
|
114
|
+
"head timestamp" "content content" "link link",
|
|
115
|
+
1fr min-content
|
|
116
|
+
);
|
|
117
|
+
@include overlay-with-header-close(
|
|
118
|
+
"head timestamp close" "content content content" "link link link",
|
|
119
|
+
1fr min-content min-content
|
|
120
|
+
);
|
|
121
|
+
|
|
122
|
+
// 3. Progressive enhancement: adds icon or image
|
|
123
|
+
@include overlay-with-icon(
|
|
124
|
+
"icon content timestamp" "icon link link",
|
|
125
|
+
min-content 1fr min-content
|
|
126
|
+
);
|
|
127
|
+
@include overlay-with-icon-close(
|
|
128
|
+
"icon content timestamp close" "icon link link link",
|
|
129
|
+
min-content 1fr min-content min-content
|
|
130
|
+
);
|
|
131
|
+
@include overlay-with-icon-header(
|
|
132
|
+
"icon head timestamp" "icon content content" "icon link link",
|
|
133
|
+
min-content 1fr min-content
|
|
134
|
+
);
|
|
135
|
+
@include overlay-with-icon-header-close(
|
|
136
|
+
"icon head timestamp close" "icon content content content"
|
|
137
|
+
"icon link link link",
|
|
138
|
+
min-content 1fr min-content min-content
|
|
139
|
+
);
|
|
140
|
+
}
|
|
141
|
+
|
|
1
142
|
%grid-layout-variant-overlay {
|
|
2
|
-
//
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
&:has(header) {
|
|
15
|
-
grid-template-columns: 1fr min-content;
|
|
16
|
-
grid-template-areas:
|
|
17
|
-
"head timestamp"
|
|
18
|
-
"content content";
|
|
19
|
-
|
|
20
|
-
&:has(.db-button) {
|
|
21
|
-
grid-template-columns: 1fr min-content min-content;
|
|
22
|
-
grid-template-areas:
|
|
23
|
-
"head timestamp close"
|
|
24
|
-
"content content content";
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
// 3. icon or img
|
|
29
|
-
&[data-icon],
|
|
30
|
-
&[data-semantic]:not([data-semantic="adaptive"]),
|
|
31
|
-
&:has(img) {
|
|
32
|
-
grid-template-areas: "icon content timestamp";
|
|
33
|
-
grid-template-columns: min-content 1fr min-content;
|
|
34
|
-
|
|
35
|
-
&:has(.db-button) {
|
|
36
|
-
grid-template-columns: min-content 1fr min-content min-content;
|
|
37
|
-
grid-template-areas: "icon content timestamp close";
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
&:has(header) {
|
|
41
|
-
grid-template-columns: min-content 1fr min-content;
|
|
42
|
-
grid-template-areas:
|
|
43
|
-
"icon head timestamp"
|
|
44
|
-
"icon content content";
|
|
45
|
-
|
|
46
|
-
&:has(.db-button) {
|
|
47
|
-
grid-template-columns: min-content 1fr min-content min-content;
|
|
48
|
-
grid-template-areas:
|
|
49
|
-
"icon head timestamp close"
|
|
50
|
-
"icon content content content";
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
}
|
|
143
|
+
// 1. Standard: Layout for inline links AND timestamps
|
|
144
|
+
// Both use the 'timestamp' area, which moves to the header when a header is present.
|
|
145
|
+
@include overlay-timestamp-area-layouts;
|
|
146
|
+
|
|
147
|
+
// 2. Override: When explicitly "block" link variant with timestamp
|
|
148
|
+
&:has(span)[data-link-variant="block"] {
|
|
149
|
+
@include overlay-block-layouts;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
// 3. Override: When "block" link variant WITHOUT timestamp
|
|
153
|
+
&:not(:has(span))[data-link-variant="block"] {
|
|
154
|
+
@include overlay-block-layouts-without-timestamp;
|
|
54
155
|
}
|
|
55
156
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
// Shared grid mixins for notification layouts
|
|
2
|
+
// These mixins contain the common grid logic used by both overlay and non-overlay variants
|
|
3
|
+
|
|
4
|
+
@mixin shared-base-grid($areas, $columns) {
|
|
5
|
+
grid-template-areas: $areas;
|
|
6
|
+
grid-template-columns: $columns;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
@mixin shared-with-close($areas, $columns) {
|
|
10
|
+
&:has(.db-button) {
|
|
11
|
+
grid-template-areas: $areas;
|
|
12
|
+
grid-template-columns: $columns;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
@mixin shared-with-header($areas, $columns) {
|
|
17
|
+
&:has(header) {
|
|
18
|
+
grid-template-areas: $areas;
|
|
19
|
+
grid-template-columns: $columns;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
@mixin shared-with-header-close($areas, $columns) {
|
|
24
|
+
&:has(header):has(.db-button) {
|
|
25
|
+
grid-template-areas: $areas;
|
|
26
|
+
grid-template-columns: $columns;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
@mixin shared-with-icon($areas, $columns) {
|
|
31
|
+
// Only treat the element as having an icon when the "data-show-icon"
|
|
32
|
+
// attribute is not explicitly set to "false". This prevents reserving
|
|
33
|
+
// grid space for an icon when the component has an `icon` prop but
|
|
34
|
+
// `showIcon` is false (the common cause for unintended left padding).
|
|
35
|
+
&[data-icon]:not([data-show-icon="false"]),
|
|
36
|
+
&[data-semantic]:not([data-semantic="adaptive"], [data-show-icon="false"]),
|
|
37
|
+
&:has(img) {
|
|
38
|
+
grid-template-areas: $areas;
|
|
39
|
+
grid-template-columns: $columns;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
@mixin shared-with-icon-close($areas, $columns) {
|
|
44
|
+
// Same as shared-with-icon but for variants that also have a close button
|
|
45
|
+
&[data-icon]:not([data-show-icon="false"]):has(.db-button),
|
|
46
|
+
&[data-semantic]:not(
|
|
47
|
+
[data-semantic="adaptive"],
|
|
48
|
+
[data-show-icon="false"]
|
|
49
|
+
):has(.db-button),
|
|
50
|
+
&:has(img):has(.db-button) {
|
|
51
|
+
grid-template-areas: $areas;
|
|
52
|
+
grid-template-columns: $columns;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
@mixin shared-with-icon-header($areas, $columns) {
|
|
57
|
+
// Same as shared-with-icon but for variants that also have a header
|
|
58
|
+
&[data-icon]:not([data-show-icon="false"]):has(header),
|
|
59
|
+
&[data-semantic]:not(
|
|
60
|
+
[data-semantic="adaptive"],
|
|
61
|
+
[data-show-icon="false"]
|
|
62
|
+
):has(header),
|
|
63
|
+
&:has(img):has(header) {
|
|
64
|
+
grid-template-areas: $areas;
|
|
65
|
+
grid-template-columns: $columns;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
@mixin shared-with-icon-header-close($areas, $columns) {
|
|
70
|
+
// Same as shared-with-icon but for variants that have a header and close button
|
|
71
|
+
&[data-icon]:not([data-show-icon="false"]):has(header):has(.db-button),
|
|
72
|
+
&[data-semantic]:not(
|
|
73
|
+
[data-semantic="adaptive"],
|
|
74
|
+
[data-show-icon="false"]
|
|
75
|
+
):has(header):has(.db-button),
|
|
76
|
+
&:has(img):has(header):has(.db-button) {
|
|
77
|
+
grid-template-areas: $areas;
|
|
78
|
+
grid-template-columns: $columns;
|
|
79
|
+
}
|
|
80
|
+
}
|