@aquera/nile-elements 1.4.2 → 1.4.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.js +405 -171
- package/dist/internal/animate.cjs.js +1 -1
- package/dist/internal/animate.cjs.js.map +1 -1
- package/dist/internal/animate.esm.js +1 -1
- package/dist/nile-auto-complete/nile-auto-complete.cjs.js +1 -1
- package/dist/nile-auto-complete/nile-auto-complete.cjs.js.map +1 -1
- package/dist/nile-auto-complete/nile-auto-complete.esm.js +1 -1
- package/dist/nile-carousel/carousel-helpers.cjs.js +2 -0
- package/dist/nile-carousel/carousel-helpers.cjs.js.map +1 -0
- package/dist/nile-carousel/carousel-helpers.esm.js +1 -0
- package/dist/nile-carousel/index.cjs.js +2 -0
- package/dist/nile-carousel/index.cjs.js.map +1 -0
- package/dist/nile-carousel/index.esm.js +1 -0
- package/dist/nile-carousel/nile-carousel-item/index.cjs.js +2 -0
- package/dist/nile-carousel/nile-carousel-item/index.cjs.js.map +1 -0
- package/dist/nile-carousel/nile-carousel-item/index.esm.js +1 -0
- package/dist/nile-carousel/nile-carousel-item/nile-carousel-item.cjs.js +2 -0
- package/dist/nile-carousel/nile-carousel-item/nile-carousel-item.cjs.js.map +1 -0
- package/dist/nile-carousel/nile-carousel-item/nile-carousel-item.css.cjs.js +2 -0
- package/dist/nile-carousel/nile-carousel-item/nile-carousel-item.css.cjs.js.map +1 -0
- package/dist/nile-carousel/nile-carousel-item/nile-carousel-item.css.esm.js +18 -0
- package/dist/nile-carousel/nile-carousel-item/nile-carousel-item.esm.js +5 -0
- package/dist/nile-carousel/nile-carousel.cjs.js +2 -0
- package/dist/nile-carousel/nile-carousel.cjs.js.map +1 -0
- package/dist/nile-carousel/nile-carousel.css.cjs.js +2 -0
- package/dist/nile-carousel/nile-carousel.css.cjs.js.map +1 -0
- package/dist/nile-carousel/nile-carousel.css.esm.js +146 -0
- package/dist/nile-carousel/nile-carousel.esm.js +58 -0
- package/dist/nile-skeleton-loader/nile-skeleton-loader.css.cjs.js +1 -1
- package/dist/nile-skeleton-loader/nile-skeleton-loader.css.cjs.js.map +1 -1
- package/dist/nile-skeleton-loader/nile-skeleton-loader.css.esm.js +2 -2
- package/dist/nile-tooltip/nile-tooltip.cjs.js +1 -1
- package/dist/nile-tooltip/nile-tooltip.esm.js +1 -1
- package/dist/src/index.d.ts +2 -0
- package/dist/src/index.js +2 -0
- package/dist/src/index.js.map +1 -1
- package/dist/src/nile-auto-complete/nile-auto-complete.js +1 -1
- package/dist/src/nile-auto-complete/nile-auto-complete.js.map +1 -1
- package/dist/src/nile-carousel/carousel-helpers.d.ts +23 -0
- package/dist/src/nile-carousel/carousel-helpers.js +103 -0
- package/dist/src/nile-carousel/carousel-helpers.js.map +1 -0
- package/dist/src/nile-carousel/index.d.ts +1 -0
- package/dist/src/nile-carousel/index.js +2 -0
- package/dist/src/nile-carousel/index.js.map +1 -0
- package/dist/src/nile-carousel/nile-carousel-item/index.d.ts +1 -0
- package/dist/src/nile-carousel/nile-carousel-item/index.js +2 -0
- package/dist/src/nile-carousel/nile-carousel-item/index.js.map +1 -0
- package/dist/src/nile-carousel/nile-carousel-item/nile-carousel-item.css.d.ts +12 -0
- package/dist/src/nile-carousel/nile-carousel-item/nile-carousel-item.css.js +30 -0
- package/dist/src/nile-carousel/nile-carousel-item/nile-carousel-item.css.js.map +1 -0
- package/dist/src/nile-carousel/nile-carousel-item/nile-carousel-item.d.ts +24 -0
- package/dist/src/nile-carousel/nile-carousel-item/nile-carousel-item.js +35 -0
- package/dist/src/nile-carousel/nile-carousel-item/nile-carousel-item.js.map +1 -0
- package/dist/src/nile-carousel/nile-carousel.css.d.ts +12 -0
- package/dist/src/nile-carousel/nile-carousel.css.js +158 -0
- package/dist/src/nile-carousel/nile-carousel.css.js.map +1 -0
- package/dist/src/nile-carousel/nile-carousel.d.ts +55 -0
- package/dist/src/nile-carousel/nile-carousel.js +336 -0
- package/dist/src/nile-carousel/nile-carousel.js.map +1 -0
- package/dist/src/nile-skeleton-loader/nile-skeleton-loader.css.js +2 -2
- package/dist/src/nile-skeleton-loader/nile-skeleton-loader.css.js.map +1 -1
- package/dist/src/version.js +2 -2
- package/dist/src/version.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/index.ts +2 -0
- package/src/nile-auto-complete/nile-auto-complete.ts +1 -1
- package/src/nile-carousel/carousel-helpers.ts +154 -0
- package/src/nile-carousel/index.ts +2 -0
- package/src/nile-carousel/nile-carousel-item/index.ts +2 -0
- package/src/nile-carousel/nile-carousel-item/nile-carousel-item.css.ts +33 -0
- package/src/nile-carousel/nile-carousel-item/nile-carousel-item.ts +42 -0
- package/src/nile-carousel/nile-carousel.css.ts +161 -0
- package/src/nile-carousel/nile-carousel.ts +391 -0
- package/src/nile-skeleton-loader/nile-skeleton-loader.css.ts +2 -2
- package/vscode-html-custom-data.json +34 -0
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -46,6 +46,8 @@ export { NileBreadcrumb } from './nile-breadcrumb';
|
|
|
46
46
|
export { NileBreadcrumbItem } from './nile-breadcrumb-item';
|
|
47
47
|
export { NileFormGroup } from './nile-form-group';
|
|
48
48
|
export { NileCard } from './nile-card';
|
|
49
|
+
export { NileCarousel } from './nile-carousel';
|
|
50
|
+
export { NileCarouselItem } from './nile-carousel/nile-carousel-item';
|
|
49
51
|
export { NilePopover } from './nile-popover';
|
|
50
52
|
export { NileButtonFilter } from './nile-button-filter';
|
|
51
53
|
export { NileCircularProgressbar } from './nile-circular-progressbar';
|
|
@@ -325,7 +325,7 @@ enableTabClose: this.enableTabClose,
|
|
|
325
325
|
}
|
|
326
326
|
|
|
327
327
|
private handleSearch(event: CustomEvent) {
|
|
328
|
-
this.value = event.detail.value
|
|
328
|
+
this.value = event.detail.value;
|
|
329
329
|
|
|
330
330
|
// Filter menu items based on the search value
|
|
331
331
|
this.menuItems = this.applyFilter(this.allMenuItems,this.filterFunction);
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright Aquera Inc 2025
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the BSD-3-Clause license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import type NileCarouselItem from './nile-carousel-item/nile-carousel-item';
|
|
9
|
+
import { clamp } from '../internal/math';
|
|
10
|
+
import { prefersReducedMotion } from '../internal/animate';
|
|
11
|
+
|
|
12
|
+
export function isCarouselItem(element: HTMLElement): boolean {
|
|
13
|
+
return element.tagName.toLowerCase() === 'nile-carousel-item';
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export function findMostVisibleSlide(
|
|
17
|
+
slides: NileCarouselItem[],
|
|
18
|
+
scrollContainer: HTMLElement
|
|
19
|
+
): NileCarouselItem | null {
|
|
20
|
+
if (!slides.length || !scrollContainer) {
|
|
21
|
+
return null;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
const scrollContainerRect = scrollContainer.getBoundingClientRect();
|
|
25
|
+
let mostVisibleSlide: NileCarouselItem | null = null;
|
|
26
|
+
let maxVisibleArea = 0;
|
|
27
|
+
|
|
28
|
+
slides.forEach((slide) => {
|
|
29
|
+
const slideRect = slide.getBoundingClientRect();
|
|
30
|
+
const visibleWidth = Math.max(
|
|
31
|
+
0,
|
|
32
|
+
Math.min(slideRect.right, scrollContainerRect.right) - Math.max(slideRect.left, scrollContainerRect.left)
|
|
33
|
+
);
|
|
34
|
+
|
|
35
|
+
if (visibleWidth > maxVisibleArea) {
|
|
36
|
+
maxVisibleArea = visibleWidth;
|
|
37
|
+
mostVisibleSlide = slide;
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
return mostVisibleSlide;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export function getPageCount(slidesCount: number, slidesPerPage: number, slidesPerMove: number): number {
|
|
45
|
+
const pages = (slidesCount - slidesPerPage) / slidesPerMove + 1;
|
|
46
|
+
return Math.ceil(pages);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export function getCurrentPage(activeSlide: number, slidesPerMove: number): number {
|
|
50
|
+
return Math.floor(activeSlide / slidesPerMove);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export function canScrollNext(currentPage: number, pageCount: number, loop: boolean = false): boolean {
|
|
54
|
+
if (loop) {
|
|
55
|
+
return true;
|
|
56
|
+
}
|
|
57
|
+
return currentPage < pageCount - 1;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export function canScrollPrev(currentPage: number, loop: boolean = false): boolean {
|
|
61
|
+
if (loop) {
|
|
62
|
+
return true;
|
|
63
|
+
}
|
|
64
|
+
return currentPage > 0;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export function shouldSnapToSlide(slideIndex: number, slidesPerMove: number): boolean {
|
|
68
|
+
return (slideIndex + slidesPerMove) % slidesPerMove === 0;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export function calculateScrollPosition(
|
|
72
|
+
slideRect: DOMRect,
|
|
73
|
+
containerRect: DOMRect,
|
|
74
|
+
containerScrollLeft: number,
|
|
75
|
+
containerScrollTop: number
|
|
76
|
+
): { left: number; top: number } {
|
|
77
|
+
const nextLeft = slideRect.left - containerRect.left;
|
|
78
|
+
const nextTop = slideRect.top - containerRect.top;
|
|
79
|
+
|
|
80
|
+
return {
|
|
81
|
+
left: nextLeft + containerScrollLeft,
|
|
82
|
+
top: nextTop + containerScrollTop
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export function scrollToSlide(
|
|
87
|
+
slide: HTMLElement,
|
|
88
|
+
scrollContainer: HTMLElement,
|
|
89
|
+
behavior: ScrollBehavior = 'smooth',
|
|
90
|
+
setPendingSlideChange: (value: boolean) => void
|
|
91
|
+
): void {
|
|
92
|
+
setPendingSlideChange(true);
|
|
93
|
+
window.requestAnimationFrame(() => {
|
|
94
|
+
if (!scrollContainer) {
|
|
95
|
+
return;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
const scrollContainerRect = scrollContainer.getBoundingClientRect();
|
|
99
|
+
const nextSlideRect = slide.getBoundingClientRect();
|
|
100
|
+
|
|
101
|
+
const nextLeft = nextSlideRect.left - scrollContainerRect.left;
|
|
102
|
+
const nextTop = nextSlideRect.top - scrollContainerRect.top;
|
|
103
|
+
|
|
104
|
+
if (nextLeft || nextTop) {
|
|
105
|
+
const scrollPosition = calculateScrollPosition(
|
|
106
|
+
nextSlideRect,
|
|
107
|
+
scrollContainerRect,
|
|
108
|
+
scrollContainer.scrollLeft,
|
|
109
|
+
scrollContainer.scrollTop
|
|
110
|
+
);
|
|
111
|
+
|
|
112
|
+
setPendingSlideChange(true);
|
|
113
|
+
scrollContainer.scrollTo({
|
|
114
|
+
left: scrollPosition.left,
|
|
115
|
+
top: scrollPosition.top,
|
|
116
|
+
behavior
|
|
117
|
+
});
|
|
118
|
+
} else {
|
|
119
|
+
setPendingSlideChange(false);
|
|
120
|
+
}
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
export function goToSlide(
|
|
125
|
+
index: number,
|
|
126
|
+
slides: HTMLElement[],
|
|
127
|
+
slidesPerPage: number,
|
|
128
|
+
behavior: ScrollBehavior = 'smooth',
|
|
129
|
+
loop: boolean = false
|
|
130
|
+
): { newActiveSlide: number; slideToScroll: HTMLElement } | null {
|
|
131
|
+
if (!slides.length) {
|
|
132
|
+
return null;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
let newActiveSlide: number;
|
|
136
|
+
let nextSlideIndex: number;
|
|
137
|
+
|
|
138
|
+
if (loop) {
|
|
139
|
+
const totalSlides = slides.length;
|
|
140
|
+
nextSlideIndex = ((index % totalSlides) + totalSlides) % totalSlides;
|
|
141
|
+
newActiveSlide = clamp(nextSlideIndex, 0, slides.length - slidesPerPage);
|
|
142
|
+
} else {
|
|
143
|
+
newActiveSlide = clamp(index, 0, slides.length - slidesPerPage);
|
|
144
|
+
nextSlideIndex = clamp(index, 0, slides.length - 1);
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
const nextSlide = slides[nextSlideIndex];
|
|
148
|
+
|
|
149
|
+
return {
|
|
150
|
+
newActiveSlide,
|
|
151
|
+
slideToScroll: nextSlide
|
|
152
|
+
};
|
|
153
|
+
}
|
|
154
|
+
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright Aquera Inc 2025
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the BSD-3-Clause license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import { css } from 'lit';
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* CarouselItem CSS
|
|
12
|
+
*/
|
|
13
|
+
export const styles = css`
|
|
14
|
+
:host {
|
|
15
|
+
display: block;
|
|
16
|
+
scroll-snap-align: start;
|
|
17
|
+
scroll-snap-stop: always;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.carousel-item {
|
|
21
|
+
display: flex;
|
|
22
|
+
flex-direction: column;
|
|
23
|
+
height: 100%;
|
|
24
|
+
width: 100%;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
:host([hidden]) {
|
|
28
|
+
display: none;
|
|
29
|
+
}
|
|
30
|
+
`;
|
|
31
|
+
|
|
32
|
+
export default [styles];
|
|
33
|
+
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright Aquera Inc 2025
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the BSD-3-Clause license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import { html, CSSResultArray, TemplateResult } from 'lit';
|
|
9
|
+
import { customElement } from 'lit/decorators.js';
|
|
10
|
+
import { styles } from './nile-carousel-item.css';
|
|
11
|
+
import NileElement from '../../internal/nile-element';
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Nile carousel-item component.
|
|
15
|
+
*
|
|
16
|
+
* @tag nile-carousel-item
|
|
17
|
+
*
|
|
18
|
+
*/
|
|
19
|
+
@customElement('nile-carousel-item')
|
|
20
|
+
export class NileCarouselItem extends NileElement {
|
|
21
|
+
|
|
22
|
+
public static get styles(): CSSResultArray {
|
|
23
|
+
return [styles];
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
public render(): TemplateResult {
|
|
27
|
+
return html`
|
|
28
|
+
<div part="base" class="carousel-item">
|
|
29
|
+
<slot></slot>
|
|
30
|
+
</div>
|
|
31
|
+
`;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export default NileCarouselItem;
|
|
36
|
+
|
|
37
|
+
declare global {
|
|
38
|
+
interface HTMLElementTagNameMap {
|
|
39
|
+
'nile-carousel-item': NileCarouselItem;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright Aquera Inc 2025
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the BSD-3-Clause license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import { css } from 'lit';
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Carousel CSS
|
|
12
|
+
*/
|
|
13
|
+
export const styles = css`
|
|
14
|
+
:host {
|
|
15
|
+
--slide-gap: var(--nile-spacing-md, var(--ng-spacing-md));
|
|
16
|
+
display: block;
|
|
17
|
+
position: relative;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.carousel {
|
|
21
|
+
display: flex;
|
|
22
|
+
flex-direction: column;
|
|
23
|
+
position: relative;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.carousel__content-wrapper {
|
|
27
|
+
display: flex;
|
|
28
|
+
align-items: center;
|
|
29
|
+
gap: var(--nile-spacing-sm, var(--ng-spacing-sm));
|
|
30
|
+
width: 100%;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.carousel__slides {
|
|
34
|
+
display: flex;
|
|
35
|
+
flex-direction: row;
|
|
36
|
+
overflow-x: auto;
|
|
37
|
+
overflow-y: hidden;
|
|
38
|
+
scroll-snap-type: x mandatory;
|
|
39
|
+
scroll-behavior: smooth;
|
|
40
|
+
gap: var(--slide-gap);
|
|
41
|
+
padding: 0;
|
|
42
|
+
scrollbar-width: none;
|
|
43
|
+
-ms-overflow-style: none;
|
|
44
|
+
flex: 1;
|
|
45
|
+
min-width: 0;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.carousel__slides::-webkit-scrollbar {
|
|
49
|
+
display: none;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.carousel__slides:focus {
|
|
53
|
+
outline: none;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.carousel__slides:focus-visible {
|
|
57
|
+
outline: 2px solid var(--nile-colors-primary-600, var(--ng-colors-text-brand-secondary-700));
|
|
58
|
+
outline-offset: 2px;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
::slotted(nile-carousel-item) {
|
|
62
|
+
flex: 0 0 calc((100% - (var(--slides-per-page) - 1) * var(--slide-gap)) / var(--slides-per-page));
|
|
63
|
+
min-width: 0;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.carousel__navigation-button {
|
|
67
|
+
display: inline-flex;
|
|
68
|
+
align-items: center;
|
|
69
|
+
justify-content: center;
|
|
70
|
+
width: 2.5rem;
|
|
71
|
+
height: 2.5rem;
|
|
72
|
+
padding: 0;
|
|
73
|
+
background: rgba(255, 255, 255, 0.9);
|
|
74
|
+
border: 1px solid var(--nile-colors-dark-200, var(--ng-colors-border-secondary));
|
|
75
|
+
border-radius: 50%;
|
|
76
|
+
color: var(--nile-colors-dark-900, var(--ng-colors-text-primary-900));
|
|
77
|
+
cursor: pointer;
|
|
78
|
+
flex-shrink: 0;
|
|
79
|
+
transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
|
|
80
|
+
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.carousel__navigation-button:hover:not(.carousel__navigation-button--disabled) {
|
|
84
|
+
background: rgba(255, 255, 255, 1);
|
|
85
|
+
border-color: var(--nile-colors-neutral-400, var(--ng-colors-border-tertiary));
|
|
86
|
+
transform: scale(1.1);
|
|
87
|
+
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.carousel__navigation-button:active:not(.carousel__navigation-button--disabled) {
|
|
91
|
+
background: rgba(255, 255, 255, 1);
|
|
92
|
+
transform: scale(0.95);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.carousel__navigation-button--disabled {
|
|
96
|
+
opacity: 0.4;
|
|
97
|
+
cursor: not-allowed;
|
|
98
|
+
pointer-events: none;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.carousel__navigation-button:focus {
|
|
102
|
+
outline: none;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.carousel__navigation-button:focus-visible {
|
|
106
|
+
outline: 2px solid var(--nile-colors-primary-600, var(--ng-colors-text-brand-secondary-700));
|
|
107
|
+
outline-offset: 2px;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.carousel__pagination {
|
|
111
|
+
display: flex;
|
|
112
|
+
align-items: center;
|
|
113
|
+
justify-content: center;
|
|
114
|
+
gap: var(--nile-spacing-xs, var(--ng-spacing-xs));
|
|
115
|
+
margin-top: var(--nile-spacing-md, var(--ng-spacing-md));
|
|
116
|
+
position: relative;
|
|
117
|
+
z-index: 2;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.carousel__pagination-item {
|
|
121
|
+
width: 0.75rem;
|
|
122
|
+
height: 0.75rem;
|
|
123
|
+
padding: 0;
|
|
124
|
+
background: var(--nile-colors-neutral-400, var(--ng-colors-border-secondary));
|
|
125
|
+
border: 2px solid var(--nile-colors-white-base, var(--ng-colors-bg-primary));
|
|
126
|
+
border-radius: 50%;
|
|
127
|
+
cursor: pointer;
|
|
128
|
+
transition: background-color 0.1s ease, transform 0.1s ease, border-color 0.1s ease, width 0.1s ease, height 0.1s ease;
|
|
129
|
+
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.carousel__pagination-item:hover {
|
|
133
|
+
background: var(--nile-colors-neutral-400, var(--ng-colors-border-tertiary));
|
|
134
|
+
transform: scale(1.15);
|
|
135
|
+
border-color: var(--nile-colors-dark-200, var(--ng-colors-border-secondary));
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
.carousel__pagination-item--active {
|
|
139
|
+
width: 0.875rem;
|
|
140
|
+
height: 0.875rem;
|
|
141
|
+
background: var(--nile-colors-primary-600, var(--ng-colors-text-brand-secondary-700));
|
|
142
|
+
border-color: var(--nile-colors-primary-600, var(--ng-colors-text-brand-secondary-700));
|
|
143
|
+
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
.carousel__pagination-item:focus {
|
|
147
|
+
outline: none;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
.carousel__pagination-item:focus-visible {
|
|
151
|
+
outline: 2px solid var(--nile-colors-primary-600, var(--ng-colors-text-brand-secondary-700));
|
|
152
|
+
outline-offset: 2px;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
:host([hidden]) {
|
|
156
|
+
display: none;
|
|
157
|
+
}
|
|
158
|
+
`;
|
|
159
|
+
|
|
160
|
+
export default [styles];
|
|
161
|
+
|