@gooddata/sdk-ui-kit 11.50.0 → 11.51.0-alpha.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.
@@ -0,0 +1,169 @@
1
+ // (C) 2007-2026 GoodData Corporation
2
+ @use "../mixins.scss";
3
+ @use "_variables" as button-variables;
4
+ @use "../variables";
5
+
6
+ // ==========================================================================
7
+ // Silent classes - more clever mixins
8
+ // ==========================================================================
9
+ //
10
+ // Keep placeholders out of Button/_mixins.scss. A stylesheet that is pulled in through
11
+ // legacy `@import` gets its own import context, and every module `@use`d below it is
12
+ // re-evaluated in that context — so a placeholder extended by button.scss is emitted once
13
+ // per import context. In an entry point that `@import`s several SDK packages (the Modeler's
14
+ // app.scss) the extra copies land after the variant rules and reset them at equal
15
+ // specificity, e.g. `border: 1px solid transparent` overriding `.gd-button-secondary`'s
16
+ // border-color (LX-2773). Only button.scss should load this file; anything that needs a
17
+ // button mixin loads Button/mixins, which stays placeholder-free and therefore emits no CSS.
18
+
19
+ %btn {
20
+ position: relative;
21
+ display: inline-flex;
22
+ justify-content: space-between;
23
+ align-items: center;
24
+ padding: 5px 14px;
25
+ border: 1px solid transparent;
26
+ font: 400 14px/20px variables.$gd-font-primary;
27
+ white-space: nowrap;
28
+ vertical-align: middle;
29
+ cursor: pointer;
30
+ text-align: left;
31
+ border-radius: button-variables.$button-border-radius;
32
+ text-transform: button-variables.$button-text-capitalization;
33
+
34
+ @include mixins.transition(all, 0.25s, ease-in-out);
35
+
36
+ &::before,
37
+ &::after {
38
+ position: absolute;
39
+ top: 50%;
40
+ height: 20px;
41
+ line-height: 20px;
42
+ color: variables.$gd-color-text-dimmed;
43
+ transform: translateY(-50%);
44
+ font-size: 18px;
45
+ text-align: center;
46
+
47
+ @include mixins.transition(color, 0.25s, ease-in-out);
48
+ }
49
+
50
+ &::before {
51
+ left: 10px;
52
+ margin-right: 0.5em;
53
+ }
54
+
55
+ &::after {
56
+ right: 7px;
57
+ margin-left: 0.5em;
58
+ }
59
+
60
+ .gd-button-text,
61
+ .gd-button-icon {
62
+ position: relative;
63
+ display: block;
64
+ justify-content: space-between;
65
+ align-items: center;
66
+ }
67
+
68
+ .gd-button-text {
69
+ top: 1px;
70
+ flex: 1 1 auto;
71
+ overflow: hidden;
72
+ width: 100%;
73
+ text-overflow: ellipsis;
74
+ }
75
+
76
+ .gd-button-icon {
77
+ flex: 0 0 auto;
78
+ width: button-variables.$button-icon-width;
79
+ height: button-variables.$button-icon-width;
80
+ margin: 0 0.5em;
81
+ line-height: button-variables.$button-icon-width;
82
+ color: variables.$gd-color-text-dimmed;
83
+ font-size: button-variables.$button-icon-width;
84
+ text-align: center;
85
+ text-decoration: none;
86
+ background-size: contain;
87
+ background-repeat: no-repeat;
88
+ background-position: center;
89
+
90
+ &::before,
91
+ &::after {
92
+ color: inherit;
93
+
94
+ @include mixins.transition(color, 0.25s, ease-in-out);
95
+ }
96
+ }
97
+
98
+ &:not(.gd-button-link) .gd-button-icon {
99
+ &:first-child {
100
+ margin-left: -4px;
101
+ }
102
+
103
+ &:last-child {
104
+ margin-right: -4px;
105
+ }
106
+
107
+ &:only-child {
108
+ width: 19px;
109
+ height: 17px;
110
+ line-height: 17px;
111
+ margin-right: -9px;
112
+ margin-left: -9px;
113
+ font-size: 16px;
114
+ }
115
+ }
116
+
117
+ &:not(.disabled):not(.gd-button-link) {
118
+ &:active {
119
+ &::before,
120
+ &::after {
121
+ top: calc(50% + 1px);
122
+ }
123
+
124
+ .gd-button-text {
125
+ top: 2px;
126
+ }
127
+
128
+ .gd-button-icon {
129
+ margin-top: 2px;
130
+ }
131
+ }
132
+
133
+ .gd-button-icon {
134
+ &:only-child {
135
+ color: button-variables.$button-normal-color;
136
+ }
137
+ }
138
+ }
139
+
140
+ &:hover {
141
+ &::before,
142
+ &::after,
143
+ .gd-button-icon {
144
+ color: button-variables.$button-action-color;
145
+ }
146
+ }
147
+
148
+ &:focus-visible {
149
+ transition: none;
150
+ }
151
+
152
+ &[class*="gd-icon-"] {
153
+ padding-left: 37px;
154
+
155
+ &.gd-icon-right {
156
+ padding-left: 11px;
157
+ padding-right: 32px;
158
+ }
159
+ }
160
+ }
161
+
162
+ // Temporary:
163
+ // refactor
164
+ // stylelint-disable-next-line no-duplicate-selectors
165
+ %btn {
166
+ .ss-icon {
167
+ vertical-align: middle;
168
+ }
169
+ }
@@ -1,6 +1,7 @@
1
1
  // (C) 2007-2025 GoodData Corporation
2
2
  @use "sass:color";
3
3
  @use "Button/_mixins" as button-mixins;
4
+ @use "Button/placeholders"; // defines %btn, extended below
4
5
  @use "Button/variables" as button-variables;
5
6
  @use "mixins";
6
7
  @use "variables";
@@ -519,7 +519,10 @@ a.gd-list-help-menu-item.gd-list-item {
519
519
  }
520
520
 
521
521
  .gd-header-chat {
522
- --gd-icon-fill-color: #fff;
522
+ // Follow the header foreground colour instead of hardcoding white, which was only correct
523
+ // while the header was always black. `.gd-header-button` sets `color: inherit`, so this
524
+ // resolves to the (themeable) colour AppHeader puts on the header root.
525
+ --gd-icon-fill-color: currentColor;
523
526
  height: 100%;
524
527
  margin: 0;
525
528
  width: 32px;
@@ -685,12 +688,14 @@ a.gd-list-help-menu-item.gd-list-item {
685
688
  .anchor-tag-header-help,
686
689
  .anchor-tag-header-help:active,
687
690
  .anchor-tag-header-help:focus {
688
- color: #fff;
691
+ // Inherit the themeable header foreground rather than hardcoding white. Applies only when
692
+ // `helpRedirectUrl` is configured (see HeaderHelp.tsx); the dropdown variant never had this rule.
693
+ color: inherit;
689
694
  opacity: 0.8;
690
695
  text-decoration: none;
691
696
 
692
697
  &:hover {
693
- color: #fff;
698
+ color: inherit;
694
699
  text-decoration: none;
695
700
  opacity: 1;
696
701
  }