Skip to content

Commit ed199ec

Browse files
authored
Merge pull request #13853 from IgniteUI/didimmova/update-button-states
feat(button/icon-button): refactor buttons and add new states
2 parents 1ece5cd + 9c1ade1 commit ed199ec

File tree

6 files changed

+234
-163
lines changed

6 files changed

+234
-163
lines changed

package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
"express": "^4.18.2",
7373
"fflate": "^0.8.1",
7474
"hammerjs": "^2.0.8",
75-
"igniteui-theming": "^4.2.0",
75+
"igniteui-theming": "^4.4.0",
7676
"igniteui-trial-watermark": "^3.0.2",
7777
"lodash-es": "^4.17.21",
7878
"rxjs": "^7.8.0",

projects/igniteui-angular/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@
7676
"igniteui-trial-watermark": "^3.0.2",
7777
"lodash-es": "^4.17.21",
7878
"uuid": "^9.0.0",
79-
"igniteui-theming": "^4.2.0",
79+
"igniteui-theming": "^4.4.0",
8080
"@igniteui/material-icons-extended": "^3.0.0"
8181
},
8282
"peerDependencies": {

projects/igniteui-angular/src/lib/core/styles/components/button-group/_button-group-theme.scss

Lines changed: 34 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,16 @@
250250
}
251251
}
252252

253+
@if $variant != 'fluent' {
254+
&:focus,
255+
&:focus-visible {
256+
&:hover {
257+
color: var-get($theme, 'item-hover-text-color');
258+
background: var-get($theme, 'item-hover-background');
259+
}
260+
}
261+
}
262+
253263
@if $variant == 'fluent' {
254264
min-width: rem(50px);
255265
min-height: rem(32px);
@@ -263,17 +273,20 @@
263273
--igx-icon-size: #{$icon-size};
264274
}
265275

266-
&:focus {
276+
&:focus,
277+
&:focus-visible {
267278
background: var-get($theme, 'item-background');
268-
}
269279

270-
&:active {
271-
background: var-get($theme, 'item-focused-background');
280+
&:hover {
281+
background: var-get($theme, 'item-hover-background');
282+
}
283+
284+
&:active {
285+
background: var-get($theme, 'item-focused-background');
286+
}
272287
}
273288

274289
&:focus-visible {
275-
background: var-get($theme, 'item-background');
276-
277290
&::after {
278291
content: '';
279292
position: absolute;
@@ -284,14 +297,6 @@
284297
height: calc(100% - (#{$outline-btn-indent} * 2));
285298
box-shadow: 0 0 0 rem(1px) var-get($theme, 'item-focused-border-color');
286299
}
287-
288-
&:hover {
289-
background: var-get($theme, 'item-hover-background');
290-
}
291-
292-
&:active {
293-
background: var-get($theme, 'item-focused-background');
294-
}
295300
}
296301
}
297302
}
@@ -342,6 +347,20 @@
342347
}
343348
}
344349

350+
@if $variant != 'fluent' {
351+
&:focus,
352+
&:focus-visible {
353+
&:hover {
354+
color: var-get($theme, 'item-selected-text-color');
355+
background: var-get($theme, 'item-selected-hover-background');
356+
}
357+
358+
&:active {
359+
background: var-get($theme, 'item-selected-hover-background');
360+
}
361+
}
362+
}
363+
345364
@if $variant == 'fluent' {
346365
&:hover,
347366
&:focus,
@@ -353,6 +372,7 @@
353372
background: var-get($theme, 'item-selected-hover-background');
354373
}
355374

375+
&:focus,
356376
&:focus-visible {
357377
&:hover {
358378
background: var-get($theme, 'item-selected-background');

0 commit comments

Comments
 (0)