Skip to content

Commit 6feb0aa

Browse files
didimmovasimeonoff
andauthored
feat(carousel): update carousel theme and schema (#479)
* feat(carousel): fix theme to set idle dot color only for indigo * feat(carousel): remove action-strip theme added by mistake * feat(carousel): update carousel theme and schema --------- Co-authored-by: Simeon Simeonoff <sim.simeonoff@gmail.com>
1 parent 5907c21 commit 6feb0aa

File tree

2 files changed

+30
-11
lines changed

2 files changed

+30
-11
lines changed

sass/themes/components/carousel/_carousel-theme.scss

Lines changed: 22 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -138,24 +138,35 @@
138138
$button-disabled-arrow-color: hsla(from adaptive-contrast(var(--button-disabled-background)) h s l / 0.4);
139139
}
140140

141-
@if not($indicator-dot-color) and $indicator-background {
142-
$indicator-dot-color: hsla(from adaptive-contrast(var(--indicator-background)) h s l / 0.8);
143-
}
144-
145141
@if not($indicator-hover-dot-color) and $indicator-dot-color {
146-
$indicator-hover-dot-color: hsla(from var(--indicator-dot-color) h s l / 1);
142+
$indicator-hover-dot-color: dynamic-shade(var(--indicator-dot-color));
147143
}
148144

149-
@if not($indicator-border-color) and $indicator-dot-color {
150-
$indicator-border-color: var(--indicator-dot-color);
151-
}
145+
@if $variant == 'indigo' {
146+
@if not($indicator-dot-color) and $indicator-background {
147+
$indicator-dot-color: hsla(from adaptive-contrast(var(--indicator-background)) h s l / 0.8);
148+
}
152149

153-
@if not($indicator-active-dot-color) and $indicator-background {
154-
$indicator-active-dot-color: hsl(from adaptive-contrast(var(--indicator-background)) h s calc(l * 0.9));
150+
@if not($indicator-hover-dot-color) and $indicator-dot-color {
151+
$indicator-hover-dot-color: hsla(from var(--indicator-dot-color) h s l / 1);
152+
}
153+
154+
@if not($indicator-border-color) and $indicator-dot-color {
155+
$indicator-border-color: var(--indicator-dot-color);
156+
}
157+
} @else {
158+
@if not($indicator-border-color) and $indicator-background {
159+
$indicator-border-color: hsla(from adaptive-contrast(var(--indicator-background)) h s l / 0.8);
160+
}
155161
}
156162

157163
@if not($indicator-active-hover-dot-color) and $indicator-active-dot-color {
158-
$indicator-active-hover-dot-color: hsl(from var(--indicator-active-dot-color) h s calc(l * 1.1));
164+
$indicator-active-hover-dot-color: dynamic-shade(var(--indicator-active-dot-color));
165+
}
166+
167+
@if not($indicator-active-dot-color) and $indicator-background {
168+
$indicator-active-dot-color: adaptive-contrast(var(--indicator-background));
169+
$indicator-active-hover-dot-color: var(--indicator-active-dot-color);
159170
}
160171

161172
@if not($indicator-active-border-color) and $indicator-active-dot-color {

sass/themes/schemas/components/light/_carousel.scss

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -312,6 +312,7 @@ $bootstrap-carousel: extend(
312312
/// @prop {Map} button-disabled-arrow-color [color: ('gray' 900, .2)] - The previous/next buttons disabled color.
313313
/// @prop {Map} indicator-dot-color [color: ('gray', 500)] - The idle indicator dot color.
314314
/// @prop {Map} indicator-hover-dot-color [color: ('gray', 600)] - The hover indicator dot color.
315+
/// @prop {Map} indicator-active-border-color [color: ('primary', 500)] - The active indicator border color.
315316
/// @prop {Map} indicator-active-dot-color [color: ('primary', 500)] - The active indicator dot color.
316317
/// @prop {Map} indicator-active-hover-dot-color [color: ('primary', 400)] - The active indicator dot color on hover.
317318
/// @prop {Map} indicator-focus-color [color: ('primary', 400, .5)] - The indicators border and dot color on focus.
@@ -402,6 +403,13 @@ $indigo-carousel: extend(
402403
),
403404
),
404405

406+
indicator-active-border-color: (
407+
color: (
408+
'primary',
409+
500,
410+
),
411+
),
412+
405413
indicator-active-dot-color: (
406414
color: (
407415
'primary',

0 commit comments

Comments
 (0)