Skip to content

Commit 732b58f

Browse files
authored
fix(calendar): Make all date states to react to radius factor (#16031)
1 parent 315a249 commit 732b58f

File tree

4 files changed

+45
-17
lines changed

4 files changed

+45
-17
lines changed

package-lock.json

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

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@
7474
"@types/source-map": "0.5.2",
7575
"express": "^5.1.0",
7676
"fflate": "^0.8.1",
77-
"igniteui-theming": "^18.0.1",
77+
"igniteui-theming": "^19.1.2",
7878
"igniteui-trial-watermark": "^3.1.0",
7979
"lodash-es": "^4.17.21",
8080
"rxjs": "^7.8.2",
@@ -120,7 +120,7 @@
120120
"ig-typedoc-theme": "^6.0.0",
121121
"igniteui-dockmanager": "^1.16.1",
122122
"igniteui-sassdoc-theme": "^2.0.0",
123-
"igniteui-webcomponents": "6.0.1",
123+
"igniteui-webcomponents": "6.1.1",
124124
"jasmine": "^5.6.0",
125125
"jasmine-core": "^5.6.0",
126126
"karma": "^6.4.4",

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.1.0",
7575
"lodash-es": "^4.17.21",
76-
"igniteui-theming": "^18.0.1",
76+
"igniteui-theming": "^19.1.2",
7777
"@igniteui/material-icons-extended": "^3.1.0"
7878
},
7979
"peerDependencies": {

projects/igniteui-angular/src/lib/core/styles/components/calendar/_calendar-theme.scss

Lines changed: 33 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,8 @@
157157
/// @param {List} $border-radius [null] - The border radius used for the calendar.
158158
/// @param {List} $date-border-radius [null] - The border radius used for the date.
159159
/// @param {List} $date-range-border-radius [null] - The border radius used for the date range selection.
160+
/// @param {List} $date-current-border-radius [null] - The border radius used for the current date .
161+
/// @param {List} $date-special-border-radius [null] - The border radius used for the special date.
160162
/// @param {List} $ym-border-radius [null] - The border radius used for the month/year.
161163
///
162164
/// @param {Color} $actions-divider-color [null] - The border color used for the date-picker actions divider.
@@ -310,6 +312,8 @@
310312
$date-border-radius: null,
311313
$week-number-border-radius: null,
312314
$date-range-border-radius: null,
315+
$date-current-border-radius: null,
316+
$date-special-border-radius: null,
313317
$ym-border-radius: null,
314318
315319
$actions-divider-color: null,
@@ -330,6 +334,22 @@
330334
$theme: digest-schema($calendar-schema);
331335
$variant: map.get($schema, '_meta', 'theme');
332336

337+
@if not($date-range-border-radius) and $date-border-radius {
338+
$date-range-border-radius: $date-border-radius;
339+
}
340+
341+
@if not($date-border-radius) and $date-range-border-radius {
342+
$date-border-radius: $date-range-border-radius;
343+
}
344+
345+
@if not($date-current-border-radius) and $date-border-radius {
346+
$date-current-border-radius: $date-border-radius;
347+
}
348+
349+
@if not($date-special-border-radius) and $date-border-radius {
350+
$date-special-border-radius: $date-border-radius;
351+
}
352+
333353
//base start
334354
@if not($header-foreground) and $header-background {
335355
$header-foreground: adaptive-contrast(var(--header-background));
@@ -1031,6 +1051,8 @@
10311051
border-radius: $border-radius,
10321052
date-border-radius: $date-border-radius,
10331053
date-range-border-radius: $date-range-border-radius,
1054+
date-current-border-radius: $date-current-border-radius,
1055+
date-special-border-radius: $date-special-border-radius,
10341056
ym-border-radius: $ym-border-radius,
10351057
week-number-border-radius: $week-number-border-radius,
10361058
date-border-color: $date-border-color,
@@ -1827,13 +1849,12 @@
18271849
position: absolute;
18281850
z-index: 0;
18291851
border: $border-size solid transparent;
1852+
border-radius: calc(var-get($theme, 'date-special-border-radius') - $border-size);
18301853

18311854
@if $variant == 'fluent' {
1832-
border-radius: 50%;
18331855
width: $date-inner-size;
18341856
height: $date-inner-size;
18351857
} @else {
1836-
border-radius: inherit;
18371858
// By default initial size of the inner element is the same as the date size
18381859
width: $date-size;
18391860
height: $date-size;
@@ -1964,6 +1985,7 @@
19641985
background: var-get($theme, 'date-special-range-hover-background');
19651986

19661987
@if $variant == 'indigo' {
1988+
// stylelint-disable-next-line
19671989
&::after {
19681990
border-color: var-get($theme, 'date-special-hover-border-color');
19691991
}
@@ -2041,9 +2063,13 @@
20412063
z-index: -1;
20422064
width: $date-inner-size;
20432065
height: $date-inner-size;
2044-
border-radius: 50%;
2066+
border-radius: calc(var-get($theme, 'date-current-border-radius') - ($border-size * 2));
20452067
background: var-get($theme, 'date-current-background');
20462068
}
2069+
2070+
&::after {
2071+
border-radius: calc(var-get($theme, 'date-current-border-radius') - $border-size);
2072+
}
20472073
}
20482074

20492075
@if $variant == 'indigo' {
@@ -2089,8 +2115,8 @@
20892115
&::after {
20902116
border-color: var-get($theme, 'date-special-border-color');
20912117

2092-
@if $variant == 'bootstrap' {
2093-
border-radius: $date-size;
2118+
@if $variant == 'bootstrap' or $variant == 'fluent' {
2119+
border-radius: calc(var-get($theme, 'date-special-border-radius') - ($border-size * 2));
20942120
}
20952121
}
20962122

@@ -2232,6 +2258,7 @@
22322258
}
22332259

22342260
&:hover {
2261+
// stylelint-disable-next-line
22352262
&::after {
22362263
border-color: var-get($theme, 'date-selected-special-hover-border-color');
22372264
}
@@ -2343,6 +2370,7 @@
23432370
}
23442371

23452372
&:hover {
2373+
// stylelint-disable-next-line
23462374
&::after {
23472375
border-color: var-get($theme, 'date-current-hover-border-color');
23482376
}

0 commit comments

Comments
 (0)