Skip to content

Commit d1feefe

Browse files
authored
fix(checkbox): disabled state issues (#15197)
1 parent 5ee60f7 commit d1feefe

File tree

5 files changed

+49
-18
lines changed

5 files changed

+49
-18
lines changed

package-lock.json

Lines changed: 4 additions & 5 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
@@ -74,7 +74,7 @@
7474
"@types/source-map": "0.5.2",
7575
"express": "^4.21.1",
7676
"fflate": "^0.8.1",
77-
"igniteui-theming": "^14.3.0",
77+
"igniteui-theming": "^14.3.1",
7878
"igniteui-trial-watermark": "^3.0.2",
7979
"lodash-es": "^4.17.21",
8080
"rxjs": "^7.8.0",

projects/igniteui-angular/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373
"tslib": "^2.3.0",
7474
"igniteui-trial-watermark": "^3.0.2",
7575
"lodash-es": "^4.17.21",
76-
"igniteui-theming": "^14.3.0",
76+
"igniteui-theming": "^14.3.1",
7777
"@igniteui/material-icons-extended": "^3.1.0"
7878
},
7979
"peerDependencies": {

projects/igniteui-angular/src/lib/core/styles/components/checkbox/_checkbox-component.scss

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -232,10 +232,6 @@
232232
@extend %igx-checkbox--indeterminate-fluent !optional;
233233
}
234234

235-
@include mx(material, indeterminate) {
236-
@extend %igx-checkbox--indeterminate-material !optional;
237-
}
238-
239235
@include mx(invalid, indeterminate) {
240236
@extend %igx-checkbox--indeterminate--invalid !optional;
241237

@@ -246,6 +242,18 @@
246242
}
247243
}
248244

245+
@include mx(material, disabled, indeterminate) {
246+
@extend %igx-checkbox--disabled-indeterminate-material !optional;
247+
}
248+
249+
@include mx(fluent, disabled, indeterminate) {
250+
@extend %igx-checkbox--disabled-indeterminate-fluent !optional;
251+
}
252+
253+
@include mx(indigo, disabled, indeterminate) {
254+
@extend %igx-checkbox--disabled-indeterminate-indigo !optional;
255+
}
256+
249257
@include mx(indigo, focused, indeterminate) {
250258
@extend %igx-checkbox--focused-checked-indigo !optional;
251259
}

projects/igniteui-angular/src/lib/core/styles/components/checkbox/_checkbox-theme.scss

Lines changed: 31 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
/// @param {Color} $tick-color [null] - The checked mark color.
2424
/// @param {Color} $tick-color-hover [null] - The checked mark color on hover.
2525
/// @param {Color} $disabled-color [null] - The disabled border and fill colors.
26+
/// @param {Color} $disabled-tick-color [null] - The checked mark color in disabled state.
2627
/// @param {Color} $disabled-indeterminate-color [null] - The disabled border and fill colors in indeterminate state.
2728
/// @param {Color} $disabled-color-label [null] - The disabled label color.
2829
/// @param {List} $border-radius [null] - The border radius used for checkbox component.
@@ -52,6 +53,7 @@
5253
$tick-color: null,
5354
$tick-color-hover: null,
5455
$disabled-color: null,
56+
$disabled-tick-color: null,
5557
$disabled-indeterminate-color: null,
5658
$disabled-color-label: null,
5759
$border-radius-ripple: null,
@@ -83,6 +85,7 @@
8385
tick-color: $tick-color,
8486
tick-color-hover: $tick-color-hover,
8587
disabled-color: $disabled-color,
88+
disabled-tick-color: $disabled-tick-color,
8689
disabled-indeterminate-color: $disabled-indeterminate-color,
8790
disabled-color-label: $disabled-color-label,
8891
border-radius: $border-radius,
@@ -278,15 +281,20 @@
278281
background: var-get($theme, 'disabled-color');
279282
}
280283

281-
@if $variant == 'indigo' {
284+
@if $variant == 'indigo' or $variant == 'bootstrap' {
282285
background: var-get($theme, 'disabled-indeterminate-color');
283286
border-color: transparent;
284-
stroke-opacity: 40%;
285287
}
286288

287-
@if $bootstrap-theme {
288-
background: var-get($theme, 'disabled-indeterminate-color');
289-
border-color: transparent;
289+
@if $variant != 'indigo' {
290+
%cbx-composite-mark {
291+
stroke: var-get($theme, 'disabled-tick-color');
292+
}
293+
} @else {
294+
%cbx-composite-mark {
295+
stroke: unset;
296+
fill: var-get($theme, 'disabled-tick-color');
297+
}
290298
}
291299
}
292300

@@ -346,7 +354,7 @@
346354

347355
%igx-checkbox--indeterminate-indigo {
348356
%cbx-composite-mark {
349-
fill: none;
357+
fill: none !important;
350358
stroke-dashoffset: unset !important;
351359
transform: none !important;
352360

@@ -357,6 +365,16 @@
357365
}
358366
}
359367

368+
%igx-checkbox--disabled-indeterminate-indigo {
369+
@extend %igx-checkbox--indeterminate-indigo;
370+
371+
%cbx-composite-mark {
372+
rect {
373+
fill: var-get($theme, 'disabled-tick-color');
374+
}
375+
}
376+
}
377+
360378
%igx-checkbox--indeterminate-fluent {
361379
%cbx-composite-mark {
362380
stroke: transparent;
@@ -377,6 +395,12 @@
377395
z-index: 1;
378396
}
379397
}
398+
}
399+
400+
%igx-checkbox--disabled-indeterminate-fluent {
401+
%cbx-composite-mark {
402+
stroke: transparent;
403+
}
380404

381405
%cbx-composite--x--disabled {
382406
background: transparent;
@@ -387,7 +411,7 @@
387411
}
388412
}
389413

390-
%igx-checkbox--indeterminate-material {
414+
%igx-checkbox--disabled-indeterminate-material {
391415
%cbx-composite--x--disabled {
392416
border-color: var-get($theme, 'disabled-indeterminate-color');
393417
background: var-get($theme, 'disabled-indeterminate-color');

0 commit comments

Comments
 (0)