Skip to content

Commit 20df690

Browse files
didimmovasimeonoff
andauthored
feat(button-group): update button group schemas and add new properties (#564)
* feat(button-group): update button group schemas * feat(button-group): add more necessary properties * fix(button-group): fix focused-hover-text-color for material * feat(button-group): fix schema values * fix(button-group): add latest schema updates --------- Co-authored-by: Simeon Simeonoff <sim.simeonoff@gmail.com>
1 parent 073fe43 commit 20df690

4 files changed

Lines changed: 437 additions & 150 deletions

File tree

packages/theming/sass/themes/components/button-group/_button-group-theme.scss

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,11 @@
3636
/// @param {Color} $item-focused-text-color [null] - The focused text color for button group items. Auto-derived from item-focused-background.
3737
/// @param {Color} $item-focused-background [null] - The focused background color for button group items. Auto-derived from item-hover-background.
3838
/// @param {Color} $item-focused-border-color [null] - The focused border color for an item from the button group. Auto-derived from item-border-color.
39+
/// @param {Color} $item-focused-hover-text-color [null] - The focused & hover text color for button group items. Auto-derived from item-focused-text-color.
40+
/// @param {Color} $item-focused-hover-border-color [null] - The focused & hover border color for an item from the button group. Auto-derived from item-focused-border-color.
3941
/// @param {Color} $item-focused-hover-background [null] - The focused & hover background color for button group items. Auto-derived from item-focused-background.
42+
/// @param {Color} $item-active-background [null] - The active background color for button group items. Auto-derived from item-hover-background.
43+
/// @param {Color} $item-active-border-color [null] - The active border color for button group items. Auto-derived from item-hover-border-color.
4044
/// @param {Color} $idle-shadow-color [null] - The outline color of focused button group items. Auto-derived from item-background or selected-shadow-color.
4145
/// @param {Color} $selected-shadow-color [null] - The outline color of focused/selected button group items. Auto-derived from idle-shadow-color.
4246
///
@@ -55,6 +59,8 @@
5559
/// @param {Color} $item-selected-hover-border-color [null] - The border color for a selected item in hover state in the button group. Auto-derived from item-border-color.
5660
/// @param {Color} $item-selected-focus-background [null] - The background color for a selected item in focused state in the button group. Auto-derived from item-selected-background.
5761
/// @param {Color} $item-selected-focus-hover-background [null] - The background color for a selected item in focused & hover state in the button group. Auto-derived from item-selected-hover-background.
62+
/// @param {Color} $item-selected-active-background [null] - The active background color for a selected item in the button group. Auto-derived from item-selected-hover-background.
63+
/// @param {Color} $item-selected-active-border-color [null] - The active border color for a selected item in the button group. Auto-derived from item-selected-hover-border-color.
5864
///
5965
/// @param {Color} $disabled-selected-text-color [null] - The disabled text color for a selected item in the button group. Auto-derived from disabled-text-color.
6066
/// @param {Color} $disabled-selected-icon-color [null] - The disabled icon color for a selected item in the button group. Auto-derived from disabled-selected-text-color.
@@ -89,8 +95,12 @@
8995
9096
$item-focused-text-color: null,
9197
$item-focused-border-color: null,
98+
$item-focused-hover-text-color: null,
99+
$item-focused-hover-border-color: null,
92100
$item-focused-background: null,
93101
$item-focused-hover-background: null,
102+
$item-active-background: null,
103+
$item-active-border-color: null,
94104
$idle-shadow-color: null,
95105
$selected-shadow-color: null,
96106
$border-radius: null,
@@ -110,6 +120,8 @@
110120
$item-selected-hover-border-color: null,
111121
$item-selected-focus-background: null,
112122
$item-selected-focus-hover-background: null,
123+
$item-selected-active-background: null,
124+
$item-selected-active-border-color: null,
113125
114126
$disabled-selected-text-color: null,
115127
$disabled-selected-icon-color: $disabled-selected-text-color,
@@ -161,6 +173,10 @@
161173
$item-selected-focus-hover-background: var(--item-selected-hover-background);
162174
}
163175

176+
@if not($item-selected-active-background) and $item-selected-hover-background {
177+
$item-selected-active-background: dynamic-shade(var(--item-selected-hover-background));
178+
}
179+
164180
@if not($item-focused-background) and $item-background {
165181
$item-focused-background: var(--item-hover-background);
166182
}
@@ -169,6 +185,18 @@
169185
$item-focused-hover-background: dynamic-shade(var(--item-focused-background));
170186
}
171187

188+
@if not($item-active-background) and $item-hover-background {
189+
$item-active-background: dynamic-shade(var(--item-hover-background));
190+
}
191+
192+
@if not($item-active-border-color) and $item-hover-border-color {
193+
$item-active-border-color: var(--item-hover-border-color);
194+
}
195+
196+
@if not($item-selected-active-border-color) and $item-selected-hover-border-color {
197+
$item-selected-active-border-color: var(--item-selected-hover-border-color);
198+
}
199+
172200
@if not($disabled-background-color) and $item-background {
173201
$disabled-background-color: var(--item-background);
174202
}
@@ -190,6 +218,10 @@
190218
$item-focused-border-color: var(--item-border-color);
191219
}
192220

221+
@if not($item-focused-hover-border-color) and $item-focused-border-color {
222+
$item-focused-hover-border-color: var(--item-focused-border-color);
223+
}
224+
193225
@if not($item-selected-border-color) and $item-border-color {
194226
$item-selected-border-color: var(--item-border-color);
195227
}
@@ -227,6 +259,10 @@
227259
$item-focused-text-color: adaptive-contrast(var(--item-focused-background));
228260
}
229261

262+
@if not($item-focused-hover-text-color) and $item-focused-text-color {
263+
$item-focused-hover-text-color: var(--item-focused-text-color);
264+
}
265+
230266
@if not($item-selected-text-color) and $item-selected-background {
231267
$item-selected-text-color: adaptive-contrast(var(--item-selected-background));
232268
}
@@ -285,9 +321,13 @@
285321
item-background: $item-background,
286322
item-border-color: $item-border-color,
287323
item-focused-text-color: $item-focused-text-color,
324+
item-focused-hover-text-color: $item-focused-hover-text-color,
288325
item-focused-background: $item-focused-background,
289326
item-focused-border-color: $item-focused-border-color,
327+
item-focused-hover-border-color: $item-focused-hover-border-color,
290328
item-focused-hover-background: $item-focused-hover-background,
329+
item-active-background: $item-active-background,
330+
item-active-border-color: $item-active-border-color,
291331
border-radius: $border-radius,
292332
item-hover-text-color: $item-hover-text-color,
293333
item-hover-icon-color: $item-hover-icon-color,
@@ -306,6 +346,8 @@
306346
item-selected-hover-border-color: $item-selected-hover-border-color,
307347
item-selected-focus-background: $item-selected-focus-background,
308348
item-selected-focus-hover-background: $item-selected-focus-hover-background,
349+
item-selected-active-background: $item-selected-active-background,
350+
item-selected-active-border-color: $item-selected-active-border-color,
309351
disabled-selected-text-color: $disabled-selected-text-color,
310352
disabled-selected-icon-color: $disabled-selected-icon-color,
311353
disabled-selected-background: $disabled-selected-background,

packages/theming/sass/themes/components/grid/_grid-theme.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,7 @@
445445
}
446446

447447
@if not($drop-area-background) and $grouparea-background {
448-
$drop-area-background: adaptive-contrast(var(--grouparea-background));
448+
$drop-area-background: dynamic-shade(var(--grouparea-background));
449449
}
450450

451451
@if not($drop-area-on-drop-background) and $drop-area-background {

0 commit comments

Comments
 (0)