@siemens/element-theme 50.0.0-rc.1 → 51.0.0-rc.10
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 +13 -0
- package/package.json +3 -2
- package/src/styles/_accessibility.scss +8 -2
- package/src/styles/_density.scss +144 -0
- package/src/styles/_reboot-shadow-dom.scss +5 -0
- package/src/styles/_root-font-size.scss +4 -2
- package/src/styles/_selectors.scss +3 -0
- package/src/styles/_themes.scss +15 -3
- package/src/styles/_utilities.scss +5 -0
- package/src/styles/_variables.scss +2 -0
- package/src/styles/bootstrap/_alert.scss +19 -19
- package/src/styles/bootstrap/_badges.scss +41 -41
- package/src/styles/bootstrap/_button-group.scss +12 -11
- package/src/styles/bootstrap/_buttons.scss +85 -85
- package/src/styles/bootstrap/_card.scss +23 -17
- package/src/styles/bootstrap/_dropdowns.scss +18 -18
- package/src/styles/bootstrap/_forms.scss +1 -0
- package/src/styles/bootstrap/_images.scss +4 -2
- package/src/styles/bootstrap/_list-group.scss +52 -14
- package/src/styles/bootstrap/_mixins.scss +1 -0
- package/src/styles/bootstrap/_modals.scss +11 -10
- package/src/styles/bootstrap/_nav.scss +17 -8
- package/src/styles/bootstrap/_pagination.scss +6 -5
- package/src/styles/bootstrap/_popovers.scss +3 -2
- package/src/styles/bootstrap/_reboot.scss +9 -3
- package/src/styles/bootstrap/_root.scss +2 -1
- package/src/styles/bootstrap/_tables.scss +8 -6
- package/src/styles/bootstrap/_type.scss +144 -36
- package/src/styles/bootstrap/_utilities.scss +41 -45
- package/src/styles/bootstrap/_variables.scss +154 -140
- package/src/styles/bootstrap/forms/_form-check.scss +43 -73
- package/src/styles/bootstrap/forms/_form-control.scss +35 -29
- package/src/styles/bootstrap/forms/_form-file.scss +9 -9
- package/src/styles/bootstrap/forms/_form-label.scss +1 -1
- package/src/styles/bootstrap/forms/_form-layout.scss +46 -0
- package/src/styles/bootstrap/forms/_form-range.scss +13 -14
- package/src/styles/bootstrap/forms/_validation.scss +3 -6
- package/src/styles/bootstrap/mixins/_badge-text.scss +3 -3
- package/src/styles/bootstrap/mixins/_form-layout.scss +62 -0
- package/src/styles/bootstrap/mixins/_grid.scss +3 -3
- package/src/styles/bootstrap/mixins/_utilities.scss +14 -3
- package/src/styles/components/_application-header.scss +30 -30
- package/src/styles/components/_datatable.scss +57 -48
- package/src/styles/components/_drag_drop.scss +7 -6
- package/src/styles/components/_elevation.scss +11 -6
- package/src/styles/components/_layout.scss +26 -13
- package/src/styles/components/_links.scss +2 -2
- package/src/styles/components/_list-item.scss +69 -30
- package/src/styles/components/_markdown.scss +33 -19
- package/src/styles/components/_pills.scss +6 -6
- package/src/styles/components/_scrollbar.scss +6 -5
- package/src/styles/components/_search-bar.scss +67 -0
- package/src/styles/components/_skeleton.scss +4 -3
- package/src/styles/components/_switch.scss +16 -18
- package/src/styles/components/_widgets.scss +12 -10
- package/src/styles/mixins/_utilities.scss +271 -0
- package/src/styles/variables/_elevation.scss +14 -12
- package/src/styles/variables/_focus.scss +4 -3
- package/src/styles/variables/_si-vars.scss +13 -7
- package/src/styles/variables/_sizing.scss +22 -0
- package/src/styles/variables/_spacers.scss +53 -25
- package/src/styles/variables/_system-tokens.scss +190 -0
- package/src/styles/variables/_typography.scss +112 -99
- package/src/styles/variables/_utilities.scss +64 -51
- package/src/theme/_theme-element.scss +386 -2
- package/src/theme-shadow-dom.scss +17 -0
- package/src/theme.scss +14 -3
- /package/{LICENSE.md → LICENSE} +0 -0
package/README.md
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<a href="https://element.siemens.io" target="_blank">
|
|
3
|
+
<img src="https://raw.githubusercontent.com/siemens/element/refs/heads/main/element-logo.svg" alt="Siemens Element" height="132" width="132">
|
|
4
|
+
</a>
|
|
5
|
+
</p>
|
|
6
|
+
|
|
7
|
+
<h1 align="center">@siemens/element-theme</h1>
|
|
8
|
+
|
|
9
|
+
The Element theme provides the CSS and SCSS that implement the Siemens Design Language.
|
|
10
|
+
It includes design tokens, typography, and color schemes with light and dark theme support.
|
|
11
|
+
It is used by the Element Angular components.
|
|
12
|
+
|
|
13
|
+
**Get started, explore components and read the docs at [element.siemens.io](https://element.siemens.io).**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@siemens/element-theme",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "51.0.0-rc.10",
|
|
4
4
|
"description": "Element CSS theme.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -24,5 +24,6 @@
|
|
|
24
24
|
"responsive",
|
|
25
25
|
"front-end",
|
|
26
26
|
"framework"
|
|
27
|
-
]
|
|
27
|
+
],
|
|
28
|
+
"readme": "<p align=\"center\">\n <a href=\"https://element.siemens.io\" target=\"_blank\">\n <img src=\"https://raw.githubusercontent.com/siemens/element/refs/heads/main/element-logo.svg\" alt=\"Siemens Element\" height=\"132\" width=\"132\">\n </a>\n</p>\n\n<h1 align=\"center\">@siemens/element-theme</h1>\n\nThe Element theme provides the CSS and SCSS that implement the Siemens Design Language.\nIt includes design tokens, typography, and color schemes with light and dark theme support.\nIt is used by the Element Angular components.\n\n**Get started, explore components and read the docs at [element.siemens.io](https://element.siemens.io).**\n"
|
|
28
29
|
}
|
|
@@ -1,9 +1,15 @@
|
|
|
1
|
-
|
|
1
|
+
@use 'selectors';
|
|
2
|
+
|
|
3
|
+
#{selectors.$root} {
|
|
2
4
|
--element-animations-enabled: 1;
|
|
3
5
|
}
|
|
4
6
|
|
|
7
|
+
.disable-animations {
|
|
8
|
+
--element-animations-enabled: 0;
|
|
9
|
+
}
|
|
10
|
+
|
|
5
11
|
@media (prefers-reduced-motion) {
|
|
6
|
-
|
|
12
|
+
#{selectors.$root} {
|
|
7
13
|
--element-animations-enabled: 0;
|
|
8
14
|
}
|
|
9
15
|
}
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
@use 'selectors';
|
|
2
|
+
@use 'variables/typography';
|
|
3
|
+
|
|
4
|
+
@mixin define-spacer($spacer, $block-size, $inline-size) {
|
|
5
|
+
--si-sys-sizing-spacing-y-#{$spacer}: #{$block-size};
|
|
6
|
+
--si-sys-sizing-spacing-x-#{$spacer}: #{$inline-size};
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
@mixin define-font($name, $font-size, $line-height) {
|
|
10
|
+
--si-sys-typography-font-size-#{$name}: #{typography.px-to-rem($font-size)};
|
|
11
|
+
--si-sys-typography-line-height-#{$name}: #{typography.px-to-ratio($font-size, $line-height)};
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
@mixin define-sizing($name, $size) {
|
|
15
|
+
--si-sys-sizing-sizing-#{$name}: #{$size};
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
@mixin define-icon-size($name, $size) {
|
|
19
|
+
--si-sys-sizing-icon-#{$name}: #{typography.px-to-rem($size)};
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
#{selectors.$root} {
|
|
23
|
+
@include define-spacer(10, 2px, 2px);
|
|
24
|
+
@include define-spacer(20, 4px, 4px);
|
|
25
|
+
@include define-spacer(30, 6px, 6px);
|
|
26
|
+
@include define-spacer(40, 8px, 8px);
|
|
27
|
+
@include define-spacer(50, 12px, 12px);
|
|
28
|
+
@include define-spacer(60, 16px, 16px);
|
|
29
|
+
@include define-spacer(70, 20px, 20px);
|
|
30
|
+
@include define-spacer(80, 24px, 24px);
|
|
31
|
+
@include define-spacer(90, 32px, 32px);
|
|
32
|
+
@include define-spacer(100, 40px, 40px);
|
|
33
|
+
@include define-spacer(110, 48px, 48px);
|
|
34
|
+
@include define-spacer(120, 56px, 56px);
|
|
35
|
+
@include define-spacer(130, 64px, 64px);
|
|
36
|
+
@include define-spacer(140, 96px, 96px);
|
|
37
|
+
|
|
38
|
+
@include define-font(body-sm, 12px, 16px);
|
|
39
|
+
@include define-font(body, 14px, 16px);
|
|
40
|
+
@include define-font(body-lg, 16px, 20px);
|
|
41
|
+
@include define-font(body-paragraph, 14px, 20px);
|
|
42
|
+
@include define-font(h1, 28px, 36px);
|
|
43
|
+
@include define-font(h2, 24px, 32px);
|
|
44
|
+
@include define-font(h3, 20px, 24px);
|
|
45
|
+
@include define-font(h4, 16px, 20px);
|
|
46
|
+
@include define-font(h5, 14px, 20px);
|
|
47
|
+
@include define-font(h6, 12px, 16px);
|
|
48
|
+
@include define-font(display, 32px, 40px);
|
|
49
|
+
@include define-font(display-lg, 40px, 52px);
|
|
50
|
+
@include define-font(display-xl, 48px, 64px);
|
|
51
|
+
@include define-font(display-xxl, 58px, 72px);
|
|
52
|
+
@include define-font(code-sm, 12px, 16px);
|
|
53
|
+
@include define-font(code, 14px, 20px);
|
|
54
|
+
@include define-font(code-lg, 16px, 20px);
|
|
55
|
+
|
|
56
|
+
@include define-sizing(10, 2px);
|
|
57
|
+
@include define-sizing(20, 4px);
|
|
58
|
+
@include define-sizing(30, 8px);
|
|
59
|
+
@include define-sizing(40, 12px);
|
|
60
|
+
@include define-sizing(50, 16px);
|
|
61
|
+
@include define-sizing(60, 20px);
|
|
62
|
+
@include define-sizing(70, 24px);
|
|
63
|
+
@include define-sizing(80, 32px);
|
|
64
|
+
@include define-sizing(90, 40px);
|
|
65
|
+
@include define-sizing(100, 48px);
|
|
66
|
+
@include define-sizing(110, 64px);
|
|
67
|
+
@include define-sizing(120, 80px);
|
|
68
|
+
@include define-sizing(130, 96px);
|
|
69
|
+
@include define-sizing(140, 120px);
|
|
70
|
+
@include define-sizing(150, 160px);
|
|
71
|
+
@include define-sizing(160, 240px);
|
|
72
|
+
@include define-sizing(170, 320px);
|
|
73
|
+
@include define-sizing(180, 480px);
|
|
74
|
+
@include define-sizing(190, 600px);
|
|
75
|
+
@include define-sizing(200, 720px);
|
|
76
|
+
|
|
77
|
+
@include define-icon-size(sm, 16px);
|
|
78
|
+
@include define-icon-size(md, 20px);
|
|
79
|
+
@include define-icon-size(lg, 24px);
|
|
80
|
+
@include define-icon-size(xl, 32px);
|
|
81
|
+
@include define-icon-size(xxl, 48px);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.density-compact {
|
|
85
|
+
@include define-spacer(10, 2px, 2px);
|
|
86
|
+
@include define-spacer(20, 2px, 2px);
|
|
87
|
+
@include define-spacer(30, 4px, 4px);
|
|
88
|
+
@include define-spacer(40, 6px, 6px);
|
|
89
|
+
@include define-spacer(50, 8px, 8px);
|
|
90
|
+
@include define-spacer(60, 12px, 12px);
|
|
91
|
+
@include define-spacer(70, 16px, 16px);
|
|
92
|
+
@include define-spacer(80, 20px, 20px);
|
|
93
|
+
@include define-spacer(90, 24px, 24px);
|
|
94
|
+
@include define-spacer(100, 32px, 32px);
|
|
95
|
+
@include define-spacer(110, 40px, 40px);
|
|
96
|
+
@include define-spacer(120, 48px, 48px);
|
|
97
|
+
@include define-spacer(130, 64px, 64px);
|
|
98
|
+
@include define-spacer(140, 80px, 80px);
|
|
99
|
+
|
|
100
|
+
@include define-font(body-sm, 10px, 12px);
|
|
101
|
+
@include define-font(body, 12px, 14px);
|
|
102
|
+
@include define-font(body-lg, 14px, 16px);
|
|
103
|
+
@include define-font(body-paragraph, 12px, 16px);
|
|
104
|
+
@include define-font(h1, 24px, 28px);
|
|
105
|
+
@include define-font(h2, 20px, 24px);
|
|
106
|
+
@include define-font(h3, 16px, 18px);
|
|
107
|
+
@include define-font(h4, 14px, 16px);
|
|
108
|
+
@include define-font(h5, 14px, 16px);
|
|
109
|
+
@include define-font(h6, 12px, 16px);
|
|
110
|
+
@include define-font(display, 28px, 32px);
|
|
111
|
+
@include define-font(display-lg, 32px, 40px);
|
|
112
|
+
@include define-font(display-xl, 40px, 48px);
|
|
113
|
+
@include define-font(display-xxl, 48px, 56px);
|
|
114
|
+
@include define-font(code-sm, 12px, 16px);
|
|
115
|
+
@include define-font(code, 14px, 20px);
|
|
116
|
+
@include define-font(code-lg, 16px, 20px);
|
|
117
|
+
|
|
118
|
+
@include define-sizing(10, 2px);
|
|
119
|
+
@include define-sizing(20, 2px);
|
|
120
|
+
@include define-sizing(30, 4px);
|
|
121
|
+
@include define-sizing(40, 8px);
|
|
122
|
+
@include define-sizing(50, 12px);
|
|
123
|
+
@include define-sizing(60, 16px);
|
|
124
|
+
@include define-sizing(70, 20px);
|
|
125
|
+
@include define-sizing(80, 24px);
|
|
126
|
+
@include define-sizing(90, 32px);
|
|
127
|
+
@include define-sizing(100, 40px);
|
|
128
|
+
@include define-sizing(110, 48px);
|
|
129
|
+
@include define-sizing(120, 64px);
|
|
130
|
+
@include define-sizing(130, 80px);
|
|
131
|
+
@include define-sizing(140, 96px);
|
|
132
|
+
@include define-sizing(150, 120px);
|
|
133
|
+
@include define-sizing(160, 160px);
|
|
134
|
+
@include define-sizing(170, 240px);
|
|
135
|
+
@include define-sizing(180, 320px);
|
|
136
|
+
@include define-sizing(190, 480px);
|
|
137
|
+
@include define-sizing(200, 600px);
|
|
138
|
+
|
|
139
|
+
@include define-icon-size(sm, 12px);
|
|
140
|
+
@include define-icon-size(md, 16px);
|
|
141
|
+
@include define-icon-size(lg, 20px);
|
|
142
|
+
@include define-icon-size(xl, 24px);
|
|
143
|
+
@include define-icon-size(xxl, 32px);
|
|
144
|
+
}
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
+
@use 'selectors';
|
|
2
|
+
|
|
1
3
|
$element-root-font-size: initial !default;
|
|
2
4
|
|
|
3
|
-
|
|
5
|
+
#{selectors.$document} {
|
|
4
6
|
// defines the default with low specificity, i.e. easy overridable with :root
|
|
5
7
|
--element-root-font-size: #{$element-root-font-size};
|
|
6
8
|
}
|
|
7
9
|
|
|
8
|
-
|
|
10
|
+
#{selectors.$root} {
|
|
9
11
|
font-size: var(--element-root-font-size);
|
|
10
12
|
}
|
|
11
13
|
|
package/src/styles/_themes.scss
CHANGED
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
$_theme-default: 'element';
|
|
4
4
|
$_themes: () !default;
|
|
5
|
+
$_root-selector: ':root';
|
|
5
6
|
|
|
6
|
-
@mixin configure($defaultTheme: null, $themes: ()) {
|
|
7
|
+
@mixin configure($defaultTheme: null, $themes: (), $rootSelector: null) {
|
|
7
8
|
@if $defaultTheme {
|
|
8
9
|
$_theme-default: $defaultTheme !global;
|
|
9
10
|
}
|
|
@@ -11,11 +12,17 @@ $_themes: () !default;
|
|
|
11
12
|
@if $themes {
|
|
12
13
|
$_themes: $themes !global;
|
|
13
14
|
}
|
|
15
|
+
|
|
16
|
+
@if $rootSelector {
|
|
17
|
+
$_root-selector: $rootSelector !global;
|
|
18
|
+
}
|
|
14
19
|
}
|
|
15
20
|
|
|
16
|
-
@mixin make-theme($vars, $name, $dark: false, $force-generate: false) {
|
|
21
|
+
@mixin make-theme($vars, $name, $dark: false, $force-generate: false, $root-selector: null) {
|
|
17
22
|
$theme-name: '';
|
|
18
23
|
$mode: '';
|
|
24
|
+
$actual-root-selector: $root-selector or $_root-selector;
|
|
25
|
+
$selector: '';
|
|
19
26
|
|
|
20
27
|
@if list.index($_themes, $name) or $name == $_theme-default or $force-generate {
|
|
21
28
|
@if $name != $_theme-default {
|
|
@@ -26,7 +33,12 @@ $_themes: () !default;
|
|
|
26
33
|
$mode: '.app--dark';
|
|
27
34
|
}
|
|
28
35
|
|
|
29
|
-
:root#{$theme-name}#{$mode}
|
|
36
|
+
$selector: '#{$actual-root-selector}#{$theme-name}#{$mode}';
|
|
37
|
+
@if $actual-root-selector == ':host' and ($theme-name != '' or $mode != '') {
|
|
38
|
+
$selector: ':host(#{$theme-name}#{$mode})';
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
#{$selector} {
|
|
30
42
|
@each $token, $val in $vars {
|
|
31
43
|
--#{$token}: #{$val};
|
|
32
44
|
}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
// the minimal set of variables w/o all the heavy bootstrap stuff
|
|
2
2
|
@forward './variables/animations';
|
|
3
3
|
@forward './variables/semantic-tokens';
|
|
4
|
+
@forward './variables/system-tokens';
|
|
4
5
|
@forward './variables/typography';
|
|
5
6
|
@forward './variables/elevation';
|
|
6
7
|
@forward './variables/focus';
|
|
7
8
|
@forward './variables/spacers';
|
|
9
|
+
@forward './variables/sizing';
|
|
8
10
|
@forward './variables/zindex';
|
|
9
11
|
@forward './variables/layout';
|
|
10
12
|
@forward './variables/si-vars';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
@use '../variables/
|
|
1
|
+
@use '../variables/system-tokens';
|
|
2
2
|
@use '../variables/typography';
|
|
3
3
|
@use 'variables';
|
|
4
4
|
|
|
@@ -36,37 +36,37 @@
|
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
.alert-success {
|
|
39
|
-
--color-bar: #{
|
|
40
|
-
color:
|
|
41
|
-
background:
|
|
39
|
+
--color-bar: #{system-tokens.$si-sys-border-success};
|
|
40
|
+
color: system-tokens.$si-sys-text-success;
|
|
41
|
+
background: system-tokens.$si-sys-background-success-subtle;
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
.alert-warning {
|
|
45
|
-
--color-bar: #{
|
|
46
|
-
color:
|
|
47
|
-
background:
|
|
45
|
+
--color-bar: #{system-tokens.$si-sys-border-warning};
|
|
46
|
+
color: system-tokens.$si-sys-text-warning;
|
|
47
|
+
background: system-tokens.$si-sys-background-warning-subtle;
|
|
48
48
|
}
|
|
49
49
|
|
|
50
50
|
.alert-caution {
|
|
51
|
-
--color-bar: #{
|
|
52
|
-
color:
|
|
53
|
-
background:
|
|
51
|
+
--color-bar: #{system-tokens.$si-sys-border-caution};
|
|
52
|
+
color: system-tokens.$si-sys-text-caution;
|
|
53
|
+
background: system-tokens.$si-sys-background-caution-subtle;
|
|
54
54
|
}
|
|
55
55
|
|
|
56
56
|
.alert-danger {
|
|
57
|
-
--color-bar: #{
|
|
58
|
-
color:
|
|
59
|
-
background:
|
|
57
|
+
--color-bar: #{system-tokens.$si-sys-border-danger};
|
|
58
|
+
color: system-tokens.$si-sys-text-danger;
|
|
59
|
+
background: system-tokens.$si-sys-background-danger-subtle;
|
|
60
60
|
}
|
|
61
61
|
|
|
62
62
|
.alert-critical {
|
|
63
|
-
--color-bar: #{
|
|
64
|
-
color:
|
|
65
|
-
background:
|
|
63
|
+
--color-bar: #{system-tokens.$si-sys-border-critical};
|
|
64
|
+
color: system-tokens.$si-sys-text-critical;
|
|
65
|
+
background: system-tokens.$si-sys-background-critical-subtle;
|
|
66
66
|
}
|
|
67
67
|
|
|
68
68
|
.alert-info {
|
|
69
|
-
--color-bar: #{
|
|
70
|
-
color:
|
|
71
|
-
background:
|
|
69
|
+
--color-bar: #{system-tokens.$si-sys-border-information};
|
|
70
|
+
color: system-tokens.$si-sys-text-information;
|
|
71
|
+
background: system-tokens.$si-sys-background-information-subtle;
|
|
72
72
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
@use '../variables/
|
|
1
|
+
@use '../variables/system-tokens';
|
|
2
2
|
@use '../variables/spacers';
|
|
3
3
|
@use '../variables/typography';
|
|
4
4
|
@use './mixins/badge-text';
|
|
@@ -15,11 +15,11 @@
|
|
|
15
15
|
|
|
16
16
|
.badge {
|
|
17
17
|
display: inline-block;
|
|
18
|
-
color:
|
|
18
|
+
color: system-tokens.$si-sys-text-primary;
|
|
19
19
|
padding-block: variables.$badge-padding-y;
|
|
20
20
|
padding-inline: variables.$badge-padding-x;
|
|
21
21
|
margin-block: 0;
|
|
22
|
-
margin-inline: map.get(spacers.$spacers, 4);
|
|
22
|
+
margin-inline: map.get(spacers.$spacers-inline, 4);
|
|
23
23
|
line-height: variables.$badge-line-height;
|
|
24
24
|
flex-shrink: 0;
|
|
25
25
|
font-size: typography.$si-font-size-body;
|
|
@@ -41,97 +41,97 @@
|
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
&.bg-default {
|
|
44
|
-
background-color:
|
|
45
|
-
color:
|
|
46
|
-
outline: 1px solid
|
|
44
|
+
background-color: system-tokens.$si-sys-background-0 !important;
|
|
45
|
+
color: system-tokens.$si-sys-text-primary;
|
|
46
|
+
outline: 1px solid system-tokens.$si-sys-border-4;
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
&.bg-primary {
|
|
50
|
-
background-color:
|
|
51
|
-
color:
|
|
50
|
+
background-color: system-tokens.$si-sys-background-accent !important;
|
|
51
|
+
color: system-tokens.$si-sys-text-on-accent;
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
&.bg-secondary {
|
|
55
|
-
background-color:
|
|
56
|
-
color:
|
|
55
|
+
background-color: system-tokens.$si-sys-background-neutral !important;
|
|
56
|
+
color: system-tokens.$si-sys-text-on-neutral;
|
|
57
57
|
}
|
|
58
58
|
|
|
59
59
|
&.bg-info {
|
|
60
|
-
background-color:
|
|
61
|
-
color:
|
|
60
|
+
background-color: system-tokens.$si-sys-background-information-subtle !important;
|
|
61
|
+
color: system-tokens.$si-sys-text-information;
|
|
62
62
|
}
|
|
63
63
|
|
|
64
64
|
&.bg-success {
|
|
65
|
-
background-color:
|
|
66
|
-
color:
|
|
65
|
+
background-color: system-tokens.$si-sys-background-success-subtle !important;
|
|
66
|
+
color: system-tokens.$si-sys-text-success;
|
|
67
67
|
}
|
|
68
68
|
|
|
69
69
|
&.bg-caution {
|
|
70
|
-
background-color:
|
|
71
|
-
color:
|
|
70
|
+
background-color: system-tokens.$si-sys-background-caution-subtle !important;
|
|
71
|
+
color: system-tokens.$si-sys-text-caution;
|
|
72
72
|
}
|
|
73
73
|
|
|
74
74
|
&.bg-warning {
|
|
75
|
-
background-color:
|
|
76
|
-
color:
|
|
75
|
+
background-color: system-tokens.$si-sys-background-warning-subtle !important;
|
|
76
|
+
color: system-tokens.$si-sys-text-warning;
|
|
77
77
|
}
|
|
78
78
|
|
|
79
79
|
&.bg-danger {
|
|
80
|
-
background-color:
|
|
81
|
-
color:
|
|
80
|
+
background-color: system-tokens.$si-sys-background-danger-subtle !important;
|
|
81
|
+
color: system-tokens.$si-sys-text-danger;
|
|
82
82
|
}
|
|
83
83
|
|
|
84
84
|
&.bg-critical {
|
|
85
|
-
background-color:
|
|
86
|
-
color:
|
|
85
|
+
background-color: system-tokens.$si-sys-background-critical-subtle !important;
|
|
86
|
+
color: system-tokens.$si-sys-text-critical;
|
|
87
87
|
}
|
|
88
88
|
|
|
89
89
|
&.bg-inverse {
|
|
90
|
-
background-color:
|
|
91
|
-
color:
|
|
90
|
+
background-color: system-tokens.$si-sys-background-inverse !important;
|
|
91
|
+
color: system-tokens.$si-sys-text-inverse;
|
|
92
92
|
}
|
|
93
93
|
|
|
94
94
|
&.bg-info-emphasis {
|
|
95
|
-
background:
|
|
96
|
-
color:
|
|
95
|
+
background: system-tokens.$si-sys-background-information;
|
|
96
|
+
color: system-tokens.$si-sys-text-on-information;
|
|
97
97
|
@extend %badge-text-emphasis;
|
|
98
98
|
}
|
|
99
99
|
|
|
100
100
|
&.bg-success-emphasis {
|
|
101
|
-
background:
|
|
102
|
-
color:
|
|
101
|
+
background: system-tokens.$si-sys-background-success;
|
|
102
|
+
color: system-tokens.$si-sys-text-on-success;
|
|
103
103
|
@extend %badge-text-emphasis;
|
|
104
104
|
}
|
|
105
105
|
|
|
106
106
|
&.bg-warning-emphasis {
|
|
107
|
-
background:
|
|
108
|
-
color:
|
|
107
|
+
background: system-tokens.$si-sys-background-warning;
|
|
108
|
+
color: system-tokens.$si-sys-text-on-warning;
|
|
109
109
|
@extend %badge-text-emphasis;
|
|
110
110
|
}
|
|
111
111
|
|
|
112
112
|
&.bg-danger-emphasis {
|
|
113
|
-
background:
|
|
114
|
-
color:
|
|
113
|
+
background: system-tokens.$si-sys-background-danger;
|
|
114
|
+
color: system-tokens.$si-sys-text-on-danger;
|
|
115
115
|
@extend %badge-text-emphasis;
|
|
116
116
|
}
|
|
117
117
|
|
|
118
118
|
&.bg-critical-emphasis {
|
|
119
|
-
background:
|
|
120
|
-
color:
|
|
119
|
+
background: system-tokens.$si-sys-background-critical;
|
|
120
|
+
color: system-tokens.$si-sys-text-on-critical;
|
|
121
121
|
@extend %badge-text-emphasis;
|
|
122
122
|
}
|
|
123
123
|
|
|
124
124
|
&.bg-caution-emphasis {
|
|
125
|
-
background:
|
|
126
|
-
color:
|
|
125
|
+
background: system-tokens.$si-sys-background-caution;
|
|
126
|
+
color: system-tokens.$si-sys-text-on-caution;
|
|
127
127
|
@extend %badge-text-emphasis;
|
|
128
128
|
}
|
|
129
129
|
|
|
130
130
|
&:has(> .icon) {
|
|
131
131
|
display: inline-flex;
|
|
132
132
|
align-items: center;
|
|
133
|
-
gap: map.get(spacers.$spacers, 1);
|
|
134
|
-
padding-inline: map.get(spacers.$spacers, 2) variables.$badge-padding-x;
|
|
133
|
+
gap: map.get(spacers.$spacers-block, 1) map.get(spacers.$spacers-inline, 1);
|
|
134
|
+
padding-inline: map.get(spacers.$spacers-inline, 2) variables.$badge-padding-x;
|
|
135
135
|
}
|
|
136
136
|
}
|
|
137
137
|
|
|
@@ -146,14 +146,14 @@
|
|
|
146
146
|
position: absolute;
|
|
147
147
|
inset-block-start: 0;
|
|
148
148
|
inset-inline-end: 0;
|
|
149
|
-
background-color:
|
|
149
|
+
background-color: system-tokens.$si-sys-background-danger;
|
|
150
150
|
}
|
|
151
151
|
}
|
|
152
152
|
|
|
153
153
|
.badge-text {
|
|
154
154
|
@include badge-text.badge-text();
|
|
155
|
-
background-color:
|
|
156
|
-
color:
|
|
155
|
+
background-color: system-tokens.$si-sys-background-danger;
|
|
156
|
+
color: system-tokens.$si-sys-text-on-danger;
|
|
157
157
|
position: relative;
|
|
158
158
|
}
|
|
159
159
|
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
@use '../variables/focus';
|
|
2
2
|
@use '../variables/semantic-tokens';
|
|
3
3
|
@use '../variables/spacers';
|
|
4
|
+
@use '../variables/system-tokens';
|
|
4
5
|
@use '../variables/typography';
|
|
5
6
|
@use './variables';
|
|
6
7
|
|
|
@@ -68,7 +69,7 @@
|
|
|
68
69
|
.btn.dropdown-toggle {
|
|
69
70
|
aspect-ratio: 0;
|
|
70
71
|
padding-block: 0;
|
|
71
|
-
padding-inline: calc(map.get(spacers.$spacers, 1) - var(--btn-border-width, 0px));
|
|
72
|
+
padding-inline: calc(map.get(spacers.$spacers-inline, 1) - var(--btn-border-width, 0px));
|
|
72
73
|
border-start-start-radius: 0;
|
|
73
74
|
border-end-start-radius: 0;
|
|
74
75
|
|
|
@@ -87,23 +88,23 @@
|
|
|
87
88
|
.btn-check + .btn,
|
|
88
89
|
label.btn:has(.btn-check) {
|
|
89
90
|
--btn-border-width: 1px;
|
|
90
|
-
--btn-border-color: #{
|
|
91
|
-
--btn-border-color-hover: #{
|
|
91
|
+
--btn-border-color: #{system-tokens.$si-sys-border-4};
|
|
92
|
+
--btn-border-color-hover: #{system-tokens.$si-sys-border-4};
|
|
92
93
|
cursor: pointer;
|
|
93
94
|
background: transparent;
|
|
94
|
-
color:
|
|
95
|
+
color: system-tokens.$si-sys-text-primary;
|
|
95
96
|
transition: none;
|
|
96
97
|
|
|
97
98
|
&.btn-icon {
|
|
98
99
|
inline-size: auto;
|
|
99
|
-
padding-inline: map.get(spacers.$spacers, 5) - 1px;
|
|
100
|
+
padding-inline: calc(map.get(spacers.$spacers-inline, 5) - 1px);
|
|
100
101
|
}
|
|
101
102
|
|
|
102
103
|
// @deprecated Will be removed in a future major version, use .btn-icon instead.
|
|
103
104
|
&.icon-only {
|
|
104
105
|
inline-size: auto;
|
|
105
106
|
min-inline-size: unset;
|
|
106
|
-
padding-inline: map.get(spacers.$spacers, 5) - 1px;
|
|
107
|
+
padding-inline: calc(map.get(spacers.$spacers-inline, 5) - 1px);
|
|
107
108
|
|
|
108
109
|
.icon {
|
|
109
110
|
margin-inline: 0;
|
|
@@ -113,20 +114,20 @@
|
|
|
113
114
|
|
|
114
115
|
.btn-check + .btn:hover,
|
|
115
116
|
label:has(.btn-check:not(:checked)):hover > * {
|
|
116
|
-
color:
|
|
117
|
+
color: system-tokens.$si-sys-text-accent-hover;
|
|
117
118
|
}
|
|
118
119
|
|
|
119
120
|
.btn-check:checked {
|
|
120
121
|
+ .btn {
|
|
121
|
-
background:
|
|
122
|
-
border-color:
|
|
123
|
-
color:
|
|
122
|
+
background: system-tokens.$si-sys-background-accent-secondary-active;
|
|
123
|
+
border-color: system-tokens.$si-sys-border-accent-active;
|
|
124
|
+
color: system-tokens.$si-sys-text-accent-active;
|
|
124
125
|
z-index: 2;
|
|
125
126
|
}
|
|
126
127
|
|
|
127
128
|
+ .btn:hover,
|
|
128
129
|
&:hover + .btn {
|
|
129
|
-
color:
|
|
130
|
+
color: system-tokens.$si-sys-text-primary;
|
|
130
131
|
}
|
|
131
132
|
}
|
|
132
133
|
|