@siemens/element-theme 47.0.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.
Files changed (92) hide show
  1. package/package.json +28 -0
  2. package/src/styles/_accessibility.scss +9 -0
  3. package/src/styles/_all-variables.scss +7 -0
  4. package/src/styles/_bootstrap.scss +26 -0
  5. package/src/styles/_themes.scss +35 -0
  6. package/src/styles/_variables.scss +10 -0
  7. package/src/styles/bootstrap/_alert.scss +60 -0
  8. package/src/styles/bootstrap/_badges.scss +115 -0
  9. package/src/styles/bootstrap/_breadcrumb.scss +32 -0
  10. package/src/styles/bootstrap/_button-group.scss +101 -0
  11. package/src/styles/bootstrap/_buttons.scss +244 -0
  12. package/src/styles/bootstrap/_card.scss +208 -0
  13. package/src/styles/bootstrap/_containers.scss +44 -0
  14. package/src/styles/bootstrap/_dropdowns.scss +216 -0
  15. package/src/styles/bootstrap/_forms.scss +10 -0
  16. package/src/styles/bootstrap/_functions.scss +188 -0
  17. package/src/styles/bootstrap/_grid.scss +33 -0
  18. package/src/styles/bootstrap/_helpers.scss +6 -0
  19. package/src/styles/bootstrap/_images.scss +45 -0
  20. package/src/styles/bootstrap/_list-group.scss +197 -0
  21. package/src/styles/bootstrap/_mixins.scss +30 -0
  22. package/src/styles/bootstrap/_modals.scss +234 -0
  23. package/src/styles/bootstrap/_nav.scss +155 -0
  24. package/src/styles/bootstrap/_pagination.scss +58 -0
  25. package/src/styles/bootstrap/_popovers.scss +188 -0
  26. package/src/styles/bootstrap/_progress.scss +42 -0
  27. package/src/styles/bootstrap/_reboot.scss +618 -0
  28. package/src/styles/bootstrap/_root.scss +22 -0
  29. package/src/styles/bootstrap/_tables.scss +186 -0
  30. package/src/styles/bootstrap/_tooltip.scss +145 -0
  31. package/src/styles/bootstrap/_transitions.scss +28 -0
  32. package/src/styles/bootstrap/_type.scss +235 -0
  33. package/src/styles/bootstrap/_utilities.scss +105 -0
  34. package/src/styles/bootstrap/_variables.scss +654 -0
  35. package/src/styles/bootstrap/forms/_form-check.scss +249 -0
  36. package/src/styles/bootstrap/forms/_form-control.scss +151 -0
  37. package/src/styles/bootstrap/forms/_form-file.scss +29 -0
  38. package/src/styles/bootstrap/forms/_form-label.scss +39 -0
  39. package/src/styles/bootstrap/forms/_form-range.scss +68 -0
  40. package/src/styles/bootstrap/forms/_input-group.scss +103 -0
  41. package/src/styles/bootstrap/forms/_validation.scss +95 -0
  42. package/src/styles/bootstrap/helpers/_clearfix.scss +5 -0
  43. package/src/styles/bootstrap/helpers/_position.scss +34 -0
  44. package/src/styles/bootstrap/helpers/_stacks.scss +13 -0
  45. package/src/styles/bootstrap/helpers/_stretched-link.scss +14 -0
  46. package/src/styles/bootstrap/helpers/_text-truncation.scss +9 -0
  47. package/src/styles/bootstrap/helpers/_visually-hidden.scss +10 -0
  48. package/src/styles/bootstrap/mixins/_backdrop.scss +19 -0
  49. package/src/styles/bootstrap/mixins/_breakpoints.scss +136 -0
  50. package/src/styles/bootstrap/mixins/_clearfix.scss +7 -0
  51. package/src/styles/bootstrap/mixins/_container.scss +7 -0
  52. package/src/styles/bootstrap/mixins/_deprecate.scss +12 -0
  53. package/src/styles/bootstrap/mixins/_gradients.scss +14 -0
  54. package/src/styles/bootstrap/mixins/_grid.scss +171 -0
  55. package/src/styles/bootstrap/mixins/_image.scss +15 -0
  56. package/src/styles/bootstrap/mixins/_lists.scss +5 -0
  57. package/src/styles/bootstrap/mixins/_reset-text.scss +18 -0
  58. package/src/styles/bootstrap/mixins/_table-row.scss +31 -0
  59. package/src/styles/bootstrap/mixins/_text-truncate.scss +7 -0
  60. package/src/styles/bootstrap/mixins/_transition.scss +28 -0
  61. package/src/styles/bootstrap/mixins/_utilities.scss +86 -0
  62. package/src/styles/bootstrap/mixins/_visually-hidden.scss +29 -0
  63. package/src/styles/components/_application-header.scss +244 -0
  64. package/src/styles/components/_container-grid.scss +99 -0
  65. package/src/styles/components/_datatable.scss +328 -0
  66. package/src/styles/components/_drag_drop.scss +105 -0
  67. package/src/styles/components/_electron-titlebar.scss +5 -0
  68. package/src/styles/components/_elevation.scss +21 -0
  69. package/src/styles/components/_focus.scss +21 -0
  70. package/src/styles/components/_icons.scss +25 -0
  71. package/src/styles/components/_layout.scss +105 -0
  72. package/src/styles/components/_links.scss +34 -0
  73. package/src/styles/components/_pills.scss +45 -0
  74. package/src/styles/components/_scrollbar.scss +10 -0
  75. package/src/styles/components/_skeleton.scss +42 -0
  76. package/src/styles/components/_switch.scss +77 -0
  77. package/src/styles/components/_system-banner.scss +5 -0
  78. package/src/styles/components/_widgets.scss +58 -0
  79. package/src/styles/variables/_animations.scss +7 -0
  80. package/src/styles/variables/_elevation.scss +25 -0
  81. package/src/styles/variables/_focus.scss +55 -0
  82. package/src/styles/variables/_layout.scss +6 -0
  83. package/src/styles/variables/_semantic-tokens.scss +178 -0
  84. package/src/styles/variables/_si-vars.scss +19 -0
  85. package/src/styles/variables/_spacers.scss +28 -0
  86. package/src/styles/variables/_typography.scss +66 -0
  87. package/src/styles/variables/_utilities.scss +599 -0
  88. package/src/styles/variables/_zindex.scss +20 -0
  89. package/src/theme/_base-colors.scss +79 -0
  90. package/src/theme/_data-colors.scss +105 -0
  91. package/src/theme/_theme-element.scss +339 -0
  92. package/src/theme.scss +49 -0
package/package.json ADDED
@@ -0,0 +1,28 @@
1
+ {
2
+ "name": "@siemens/element-theme",
3
+ "version": "47.0.0",
4
+ "description": "Element CSS theme.",
5
+ "license": "MIT",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git@github.com:siemens/element.git"
9
+ },
10
+ "author": {
11
+ "name": "Siemens AG",
12
+ "email": "info@siemens.com"
13
+ },
14
+ "homepage": "https://github.com/siemens/element",
15
+ "bugs": "https://github.com/siemens/element/issues/new",
16
+ "publishConfig": {
17
+ "access": "public"
18
+ },
19
+ "keywords": [
20
+ "siemens",
21
+ "theme",
22
+ "css",
23
+ "less",
24
+ "responsive",
25
+ "front-end",
26
+ "framework"
27
+ ]
28
+ }
@@ -0,0 +1,9 @@
1
+ :root {
2
+ --element-animations-enabled: 1;
3
+ }
4
+
5
+ @media (prefers-reduced-motion) {
6
+ :root {
7
+ --element-animations-enabled: 0;
8
+ }
9
+ }
@@ -0,0 +1,7 @@
1
+ // The following provide general theme variables
2
+
3
+ @forward './variables';
4
+ @forward './bootstrap/functions';
5
+ @forward './bootstrap/variables';
6
+ @forward './bootstrap/mixins';
7
+ @forward './variables/utilities';
@@ -0,0 +1,26 @@
1
+ @use './bootstrap/root';
2
+ @use './bootstrap/reboot';
3
+ @use './bootstrap/type';
4
+ @use './bootstrap/images';
5
+ @use './bootstrap/containers';
6
+ @use './bootstrap/grid';
7
+ @use './bootstrap/tables';
8
+ @use './bootstrap/forms';
9
+ @use './bootstrap/buttons';
10
+ @use './bootstrap/transitions';
11
+ @use './bootstrap/dropdowns';
12
+ @use './bootstrap/button-group';
13
+ @use './bootstrap/nav';
14
+ @use './bootstrap/card';
15
+ @use './bootstrap/breadcrumb';
16
+ @use './bootstrap/pagination';
17
+ @use './bootstrap/badges';
18
+ @use './bootstrap/alert';
19
+ @use './bootstrap/progress';
20
+ @use './bootstrap/list-group';
21
+ @use './bootstrap/modals';
22
+ @use './bootstrap/tooltip';
23
+ @use './bootstrap/popovers';
24
+ @use './bootstrap/utilities';
25
+
26
+ @use './bootstrap/helpers';
@@ -0,0 +1,35 @@
1
+ @use 'sass:list';
2
+
3
+ $_theme-default: 'element';
4
+ $_themes: () !default;
5
+
6
+ @mixin configure($defaultTheme: null, $themes: ()) {
7
+ @if $defaultTheme {
8
+ $_theme-default: $defaultTheme !global;
9
+ }
10
+
11
+ @if $themes {
12
+ $_themes: $themes !global;
13
+ }
14
+ }
15
+
16
+ @mixin make-theme($vars, $name, $dark: false, $force-generate: false) {
17
+ $theme-name: '';
18
+ $mode: '';
19
+
20
+ @if list.index($_themes, $name) or $name == $_theme-default or $force-generate {
21
+ @if $name != $_theme-default {
22
+ $theme-name: '.theme-#{$name}';
23
+ }
24
+
25
+ @if $dark {
26
+ $mode: '.app--dark';
27
+ }
28
+
29
+ :root#{$theme-name}#{$mode} {
30
+ @each $token, $val in $vars {
31
+ --element-#{$token}: #{$val};
32
+ }
33
+ }
34
+ }
35
+ }
@@ -0,0 +1,10 @@
1
+ // the minimal set of variables w/o all the heavy bootstrap stuff
2
+ @forward './variables/animations';
3
+ @forward './variables/semantic-tokens';
4
+ @forward './variables/typography';
5
+ @forward './variables/elevation';
6
+ @forward './variables/focus';
7
+ @forward './variables/spacers';
8
+ @forward './variables/zindex';
9
+ @forward './variables/layout';
10
+ @forward './variables/si-vars';
@@ -0,0 +1,60 @@
1
+ @use '../variables/semantic-tokens';
2
+ @use '../variables/typography';
3
+ @use 'variables';
4
+
5
+ .alert {
6
+ position: relative;
7
+ overflow: hidden;
8
+ padding-block: variables.$alert-padding-y;
9
+ padding-inline: variables.$alert-padding-x;
10
+ margin-block-end: variables.$alert-margin-bottom;
11
+
12
+ &::before {
13
+ content: '';
14
+ inset-block-start: 0;
15
+ inset-inline-start: 0;
16
+ position: absolute;
17
+ inline-size: 4px;
18
+ block-size: 100%;
19
+ background: var(--color-bar);
20
+ }
21
+ }
22
+
23
+ .alert,
24
+ .alert-link {
25
+ font-size: typography.$si-font-size-title-1;
26
+ line-height: typography.$si-line-height-title-1;
27
+ }
28
+
29
+ .alert-link {
30
+ font-weight: typography.$si-font-weight-title-1;
31
+ color: inherit;
32
+
33
+ &:hover {
34
+ color: inherit;
35
+ }
36
+ }
37
+
38
+ .alert-success {
39
+ --color-bar: #{semantic-tokens.$element-status-success};
40
+ color: semantic-tokens.$element-text-success;
41
+ background: semantic-tokens.$element-base-success;
42
+ }
43
+
44
+ .alert-warning {
45
+ --color-bar: #{semantic-tokens.$element-status-warning};
46
+ color: semantic-tokens.$element-text-warning;
47
+ background: semantic-tokens.$element-base-warning;
48
+ }
49
+
50
+ .alert-danger {
51
+ --color-bar: #{semantic-tokens.$element-status-danger};
52
+ color: semantic-tokens.$element-text-danger;
53
+ background: semantic-tokens.$element-base-danger;
54
+ }
55
+
56
+ .alert-info {
57
+ --color-bar: #{semantic-tokens.$element-status-information};
58
+ color: semantic-tokens.$element-text-information;
59
+ background: semantic-tokens.$element-base-information;
60
+ }
@@ -0,0 +1,115 @@
1
+ @use '../variables/semantic-tokens';
2
+ @use '../variables/spacers';
3
+ @use '../variables/typography';
4
+ @use './variables';
5
+
6
+ @use 'sass:map';
7
+
8
+ // stylelint-disable declaration-no-important
9
+
10
+ .badge {
11
+ display: inline-block;
12
+ color: semantic-tokens.$element-text-primary;
13
+ padding-block: variables.$badge-padding-y;
14
+ padding-inline: variables.$badge-padding-x;
15
+ margin-block: 0;
16
+ margin-inline: map.get(spacers.$spacers, 4);
17
+ block-size: map.get(spacers.$spacers, 8);
18
+ line-height: map.get(spacers.$spacers, 8);
19
+ flex-shrink: 0;
20
+ font-size: typography.$si-font-size-title-2;
21
+ font-weight: typography.$si-font-weight-title-2;
22
+ max-inline-size: 196px;
23
+ min-inline-size: map.get(spacers.$spacers, 8);
24
+ text-overflow: ellipsis;
25
+ overflow: hidden;
26
+ text-align: center;
27
+ white-space: nowrap;
28
+ vertical-align: baseline;
29
+ border-radius: variables.$badge-border-radius;
30
+
31
+ &:empty {
32
+ display: none;
33
+ }
34
+
35
+ &.bg-default {
36
+ background-color: semantic-tokens.$element-base-0 !important;
37
+ color: semantic-tokens.$element-text-primary;
38
+ }
39
+
40
+ &.bg-primary {
41
+ background-color: semantic-tokens.$element-ui-0 !important;
42
+ color: semantic-tokens.$element-text-inverse;
43
+ }
44
+
45
+ &.bg-secondary {
46
+ background-color: semantic-tokens.$element-ui-4 !important;
47
+ color: semantic-tokens.$element-text-primary;
48
+ }
49
+
50
+ &.bg-info {
51
+ background-color: semantic-tokens.$element-base-information !important;
52
+ color: semantic-tokens.$element-text-information;
53
+ }
54
+
55
+ &.bg-success {
56
+ background-color: semantic-tokens.$element-base-success !important;
57
+ color: semantic-tokens.$element-text-success;
58
+ }
59
+
60
+ &.bg-caution {
61
+ background-color: semantic-tokens.$element-base-caution !important;
62
+ color: semantic-tokens.$element-text-caution;
63
+ }
64
+
65
+ &.bg-warning {
66
+ background-color: semantic-tokens.$element-base-warning !important;
67
+ color: semantic-tokens.$element-text-warning;
68
+ }
69
+
70
+ &.bg-danger {
71
+ background-color: semantic-tokens.$element-base-danger !important;
72
+ color: semantic-tokens.$element-text-danger;
73
+ }
74
+
75
+ &.bg-inverse {
76
+ background-color: semantic-tokens.$element-ui-1 !important;
77
+ color: semantic-tokens.$element-text-inverse;
78
+ }
79
+ }
80
+
81
+ .badge-dot {
82
+ position: relative;
83
+
84
+ &::after {
85
+ content: '';
86
+ inline-size: 10px;
87
+ block-size: 10px;
88
+ border-radius: 5px;
89
+ position: absolute;
90
+ inset-block-start: 0;
91
+ inset-inline-end: 0;
92
+ background-color: semantic-tokens.$element-status-danger;
93
+ }
94
+ }
95
+
96
+ .badge-text {
97
+ block-size: 14px;
98
+ min-inline-size: 14px;
99
+ border-radius: 7px;
100
+ position: relative;
101
+ background-color: semantic-tokens.$element-action-danger;
102
+ color: semantic-tokens.$element-action-danger-text;
103
+ font-size: typography.$si-font-size-caption-1;
104
+ line-height: 13px;
105
+ padding-block: 0;
106
+ padding-inline: map.get(spacers.$spacers, 2);
107
+ font-family: variables.$font-family-sans-serif;
108
+ font-weight: typography.$si-font-weight-bold;
109
+ }
110
+
111
+ .icon + .badge-text {
112
+ inset-block-start: -5px;
113
+ inset-inline-start: -12px;
114
+ margin-inline-end: -12px;
115
+ }
@@ -0,0 +1,32 @@
1
+ @use './functions';
2
+ @use './variables';
3
+
4
+ // FIXME: drop this completely as Element styling has a different separator
5
+ .breadcrumb {
6
+ display: flex;
7
+ flex-wrap: wrap;
8
+ padding-block: variables.$breadcrumb-padding-y;
9
+ padding-inline: variables.$breadcrumb-padding-x;
10
+ margin-block-end: variables.$breadcrumb-margin-bottom;
11
+ font-size: variables.$breadcrumb-font-size;
12
+ list-style: none;
13
+ background-color: variables.$breadcrumb-bg;
14
+ }
15
+
16
+ .breadcrumb-item {
17
+ // The separator between breadcrumbs (by default, a forward-slash: "/")
18
+ + .breadcrumb-item {
19
+ &::before {
20
+ display: inline-flex;
21
+ align-items: center;
22
+ justify-content: center;
23
+ inline-size: 24px;
24
+ color: variables.$breadcrumb-divider-color;
25
+ content: functions.escape-svg(variables.$breadcrumb-divider);
26
+ }
27
+ }
28
+
29
+ &.active {
30
+ color: variables.$breadcrumb-active-color;
31
+ }
32
+ }
@@ -0,0 +1,101 @@
1
+ @use '../variables/focus';
2
+ @use '../variables/semantic-tokens';
3
+ @use '../variables/spacers';
4
+ @use '../variables/typography';
5
+ @use './variables';
6
+
7
+ @use 'sass:map';
8
+
9
+ .btn-group {
10
+ position: relative;
11
+ display: inline-flex;
12
+ vertical-align: middle;
13
+
14
+ .btn {
15
+ border-radius: 0;
16
+ }
17
+
18
+ > .btn:first-of-type,
19
+ > label:first-of-type .btn {
20
+ border-start-start-radius: semantic-tokens.$element-button-radius;
21
+ border-end-start-radius: semantic-tokens.$element-button-radius;
22
+ }
23
+
24
+ > .btn:last-of-type,
25
+ > label:last-of-type .btn {
26
+ border-start-end-radius: semantic-tokens.$element-button-radius;
27
+ border-end-end-radius: semantic-tokens.$element-button-radius;
28
+ }
29
+
30
+ > .btn,
31
+ label > .btn {
32
+ position: relative;
33
+ flex: 1 1 auto;
34
+ }
35
+
36
+ > .btn-check:focus + .btn,
37
+ > .btn:is(:hover, :active, .active) {
38
+ z-index: 1;
39
+ }
40
+
41
+ > .btn:not(:first-of-type),
42
+ label + label {
43
+ margin-inline-start: -1px;
44
+ }
45
+ }
46
+
47
+ .btn-group .btn-check {
48
+ + .btn {
49
+ background: transparent;
50
+ color: semantic-tokens.$element-text-primary;
51
+ padding-block: map.get(spacers.$spacers, 5) - 1px;
52
+ border: 1px solid semantic-tokens.$element-ui-4;
53
+ transition: none;
54
+
55
+ &.icon-only {
56
+ min-inline-size: unset;
57
+ padding-inline: map.get(spacers.$spacers, 5) - 1px;
58
+
59
+ .icon {
60
+ margin-inline: 0;
61
+ }
62
+ }
63
+
64
+ &.btn-sm {
65
+ padding-block: map.get(spacers.$spacers, 4) - 1px;
66
+ font-size: typography.$si-font-size-body-2;
67
+ line-height: typography.$si-line-height-body-2;
68
+ }
69
+ }
70
+
71
+ &:checked + .btn,
72
+ + .btn:hover {
73
+ color: semantic-tokens.$element-action-secondary-text-hover;
74
+ }
75
+
76
+ &:checked + .btn {
77
+ background: semantic-tokens.$element-action-secondary-hover;
78
+ border-color: semantic-tokens.$element-action-secondary-border-hover;
79
+ z-index: 2;
80
+
81
+ &:hover {
82
+ color: semantic-tokens.$element-text-primary;
83
+ }
84
+ }
85
+
86
+ &:focus-visible + .btn {
87
+ @include focus.make-outline-focus();
88
+ z-index: 3;
89
+ }
90
+ }
91
+
92
+ // Optional: Group multiple button groups together for a toolbar
93
+ .btn-toolbar {
94
+ display: flex;
95
+ flex-wrap: wrap;
96
+ justify-content: flex-start;
97
+
98
+ .input-group {
99
+ inline-size: auto;
100
+ }
101
+ }
@@ -0,0 +1,244 @@
1
+ @use '../variables';
2
+ @use '../variables/focus';
3
+ @use '../variables/semantic-tokens';
4
+ @use '../variables/spacers';
5
+ @use '../variables/typography';
6
+ @use './mixins/transition';
7
+ @use './variables' as bootstrap-variables;
8
+
9
+ @use 'sass:map';
10
+
11
+ $btn-circle-font-size-default: 32px !default;
12
+ $btn-circle-font-size-sm: 24px !default;
13
+ $btn-circle-size-default: 40px !default;
14
+ $btn-circle-size-sm: 32px !default;
15
+ $btn-circle-size-xs: 24px !default;
16
+
17
+ // there are some non .btn buttons used in element
18
+ button {
19
+ color: semantic-tokens.$element-text-primary;
20
+ }
21
+
22
+ @mixin button-circle-size($btn-size, $font-size) {
23
+ inline-size: $btn-size;
24
+ block-size: $btn-size;
25
+ font-size: $font-size;
26
+ }
27
+
28
+ :is(.btn, .btn-close) {
29
+ line-height: bootstrap-variables.$btn-line-height;
30
+ font-weight: typography.$si-font-weight-title-2;
31
+ padding-block: calc(bootstrap-variables.$btn-padding-y - var(--btn-border-width, 0px));
32
+ padding-inline: calc(bootstrap-variables.$btn-padding-x - var(--btn-border-width, 0px));
33
+ font-size: bootstrap-variables.$btn-font-size;
34
+ display: inline-flex;
35
+ align-items: center;
36
+ justify-content: center;
37
+ user-select: none;
38
+ vertical-align: middle;
39
+ background-color: var(--btn-bg, transparent);
40
+ color: var(--btn-color, inherit);
41
+ border: var(--btn-border-width, 0) solid var(--btn-border-color, transparent);
42
+ border-radius: bootstrap-variables.$btn-border-radius;
43
+ @include transition.transition(bootstrap-variables.$btn-transition);
44
+
45
+ &:is(:disabled, .disabled),
46
+ fieldset:disabled & {
47
+ pointer-events: none;
48
+ opacity: semantic-tokens.$element-action-disabled-opacity;
49
+ }
50
+
51
+ // If the case of a link looking like a button <a class="btn btn-primary" href="#" target="_blank">Go Back</a>,
52
+ // the hover effect from the <a> element needs to be reset.
53
+ &:hover {
54
+ text-decoration: none;
55
+ }
56
+
57
+ &:not(:is(:disabled, .disabled)):is(:active, .active, :hover, .hover) {
58
+ color: var(--btn-color-hover, inherit);
59
+ background: var(--btn-bg-hover, inherit);
60
+ border-color: var(--btn-border-color-hover);
61
+ }
62
+
63
+ .icon {
64
+ margin-block: -#{map.get(spacers.$spacers, 2)};
65
+ margin-inline: -#{map.get(spacers.$spacers, 2)} #{map.get(spacers.$spacers, 2)};
66
+ }
67
+ }
68
+
69
+ .btn:not(:is(.btn-circle, .btn-link, .btn-close)) {
70
+ min-inline-size: variables.$btn-width-normal;
71
+ }
72
+
73
+ .btn-primary {
74
+ --btn-bg: #{semantic-tokens.$element-action-primary};
75
+ --btn-bg-hover: #{semantic-tokens.$element-action-primary-hover};
76
+ --btn-color: #{semantic-tokens.$element-action-primary-text};
77
+ --btn-color-hover: #{semantic-tokens.$element-action-primary-text};
78
+ }
79
+
80
+ .btn-danger {
81
+ --btn-bg: #{semantic-tokens.$element-action-danger};
82
+ --btn-bg-hover: #{semantic-tokens.$element-action-danger-hover};
83
+ --btn-color: #{semantic-tokens.$element-action-danger-text};
84
+ --btn-color-hover: #{semantic-tokens.$element-action-danger-text};
85
+ }
86
+
87
+ .btn-warning {
88
+ --btn-bg: #{semantic-tokens.$element-action-warning};
89
+ --btn-bg-hover: #{semantic-tokens.$element-action-warning-hover};
90
+ --btn-color: #{semantic-tokens.$element-action-warning-text};
91
+ --btn-color-hover: #{semantic-tokens.$element-action-warning-text};
92
+ }
93
+
94
+ .btn-secondary,
95
+ .btn-secondary-warning,
96
+ .btn-secondary-danger {
97
+ --btn-bg: #{semantic-tokens.$element-action-secondary};
98
+ --btn-bg-hover: #{semantic-tokens.$element-action-secondary-hover};
99
+ --btn-color: #{semantic-tokens.$element-action-secondary-text};
100
+ --btn-color-hover: #{semantic-tokens.$element-action-secondary-text-hover};
101
+ --btn-border-width: 1px;
102
+ --btn-border-color: #{semantic-tokens.$element-action-secondary-border};
103
+ --btn-border-color-hover: #{semantic-tokens.$element-action-secondary-border-hover};
104
+ }
105
+
106
+ .btn-tertiary,
107
+ .btn-tertiary-warning,
108
+ .btn-tertiary-danger {
109
+ --btn-bg: transparent;
110
+ --btn-bg-hover: #{semantic-tokens.$element-action-secondary-hover};
111
+ --btn-color: #{semantic-tokens.$element-action-secondary-text};
112
+ --btn-color-hover: #{semantic-tokens.$element-action-secondary-text-hover};
113
+ }
114
+
115
+ .btn-secondary-warning,
116
+ .btn-tertiary-warning {
117
+ --btn-bg-hover: #{semantic-tokens.$element-action-warning-hover};
118
+ --btn-color: #{semantic-tokens.$element-action-secondary-warning};
119
+ --btn-color-hover: #{semantic-tokens.$element-action-warning-text};
120
+ --btn-border-color: #{semantic-tokens.$element-action-secondary-warning};
121
+ --btn-border-color-hover: #{semantic-tokens.$element-action-warning-hover};
122
+ }
123
+
124
+ .btn-secondary-danger,
125
+ .btn-tertiary-danger {
126
+ --btn-bg-hover: #{semantic-tokens.$element-action-danger-hover};
127
+ --btn-color: #{semantic-tokens.$element-action-secondary-danger};
128
+ --btn-color-hover: #{semantic-tokens.$element-action-danger-text};
129
+ --btn-border-color: #{semantic-tokens.$element-action-secondary-danger};
130
+ --btn-border-color-hover: #{semantic-tokens.$element-action-danger-hover};
131
+ }
132
+
133
+ .btn-link {
134
+ --btn-color: #{bootstrap-variables.$btn-link-color};
135
+ --btn-color-hover: #{bootstrap-variables.$btn-link-hover-color};
136
+ font-weight: typography.$si-font-weight-body-2;
137
+ justify-content: flex-start;
138
+ text-decoration: bootstrap-variables.$link-decoration;
139
+ padding: 0;
140
+
141
+ &:hover {
142
+ text-decoration: bootstrap-variables.$link-hover-decoration;
143
+ }
144
+
145
+ &:is(:disabled, .disabled) {
146
+ --btn-color: #{bootstrap-variables.$btn-link-disabled-color};
147
+ opacity: 1;
148
+ }
149
+ }
150
+
151
+ // Circle Buttons
152
+ // --------------
153
+ :is(.btn-circle, .btn-close) {
154
+ padding: 0 !important; // stylelint-disable-line declaration-no-important
155
+ border-radius: 50%;
156
+ flex-shrink: 0;
157
+ }
158
+
159
+ .btn-circle {
160
+ &,
161
+ &.btn-lg {
162
+ @include button-circle-size($btn-circle-size-default, $btn-circle-font-size-default);
163
+ }
164
+
165
+ &.btn-sm {
166
+ @include button-circle-size($btn-circle-size-sm, $btn-circle-font-size-sm);
167
+ }
168
+
169
+ &.btn-xs {
170
+ @include button-circle-size($btn-circle-size-xs, $btn-circle-font-size-sm);
171
+ }
172
+
173
+ .icon {
174
+ margin-block: 0;
175
+ margin-inline: 0;
176
+ }
177
+ }
178
+
179
+ .btn-circle.btn-ghost,
180
+ .btn-close {
181
+ --btn-bg: transparent;
182
+ --btn-bg-hover: #{semantic-tokens.$element-action-secondary-hover};
183
+ --btn-color: #{semantic-tokens.$element-ui-2};
184
+ --btn-color-hover: #{semantic-tokens.$element-ui-1};
185
+ }
186
+
187
+ .btn-lg {
188
+ font-size: bootstrap-variables.$btn-font-size-lg;
189
+ line-height: 1.5;
190
+ }
191
+
192
+ .btn-sm {
193
+ font-size: bootstrap-variables.$btn-font-size-sm;
194
+ line-height: 1;
195
+ }
196
+
197
+ // this is for compatibility so that old markup looks ok-ish
198
+ .btn-close {
199
+ @include button-circle-size($btn-circle-size-sm, $btn-circle-font-size-sm);
200
+
201
+ font-weight: typography.$si-font-weight-normal;
202
+
203
+ &::before {
204
+ content: '\002715';
205
+ font-size: 1rem;
206
+ margin-block-start: 2px;
207
+ }
208
+
209
+ > * {
210
+ display: none !important; // stylelint-disable-line declaration-no-important
211
+ }
212
+ }
213
+
214
+ // This button should look like an input field. See .form-control.
215
+ .btn-input {
216
+ --btn-bg: #{bootstrap-variables.$input-bg};
217
+ --btn-bg-hover: #{bootstrap-variables.$input-bg};
218
+ --btn-color: #{bootstrap-variables.$input-color};
219
+ --btn-color-hover: #{bootstrap-variables.$input-color};
220
+ --btn-border-width: 1px;
221
+ --btn-border-color: #{semantic-tokens.$element-ui-2};
222
+ --btn-border-color-hover: #{semantic-tokens.$element-ui-1};
223
+
224
+ @include typography.si-font(
225
+ typography.$si-font-size-body-2,
226
+ typography.$si-line-height-body-2,
227
+ typography.$si-font-weight-body-2
228
+ );
229
+ padding-block: bootstrap-variables.$input-padding-y;
230
+ padding-inline: 7px;
231
+
232
+ border-radius: bootstrap-variables.$input-border-radius;
233
+ justify-content: flex-start;
234
+
235
+ &:is(:disabled, .disabled) {
236
+ --btn-border-color: #{semantic-tokens.$element-ui-3};
237
+ --btn-color: #{semantic-tokens.$element-text-disabled};
238
+ opacity: unset;
239
+ }
240
+
241
+ &:focus {
242
+ --btn-border-color: #{semantic-tokens.$element-ui-1};
243
+ }
244
+ }