@reliability-design/web 1.0.3 → 1.0.6
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/dist/components/rel-accordion/README.md +132 -0
- package/dist/components/rel-accordion/rel-accordion.ts +43 -16
- package/dist/components/rel-alert/README.md +141 -0
- package/dist/components/rel-alert/rel-alert.ts +18 -7
- package/dist/components/rel-avatar/README.md +119 -0
- package/dist/components/rel-badge/README.md +86 -0
- package/dist/components/rel-badge/rel-badge.ts +6 -6
- package/dist/components/rel-breadcrumb/README.md +102 -0
- package/dist/components/rel-breadcrumb/rel-breadcrumb.ts +12 -6
- package/dist/components/rel-button/README.md +130 -0
- package/dist/components/rel-calendar/README.md +109 -0
- package/dist/components/rel-calendar/index.ts +1 -0
- package/dist/components/rel-calendar/rel-calendar.ts +467 -0
- package/dist/components/rel-card/README.md +94 -0
- package/dist/components/rel-card/rel-card.ts +12 -3
- package/dist/components/rel-cardmedia/README.md +127 -0
- package/dist/components/rel-cardmedia/rel-cardmedia.ts +14 -4
- package/dist/components/rel-carousel/README.md +166 -0
- package/dist/components/rel-carousel/index.ts +1 -0
- package/dist/components/rel-carousel/rel-carousel.ts +469 -0
- package/dist/components/rel-chart/README.md +286 -0
- package/dist/components/rel-chart/index.ts +1 -0
- package/dist/components/rel-chart/rel-chart.ts +736 -0
- package/dist/components/rel-checkbox/README.md +77 -0
- package/dist/components/rel-checkbox/rel-checkbox.ts +18 -10
- package/dist/components/rel-chip/README.md +114 -0
- package/dist/components/rel-chip/rel-chip.ts +20 -4
- package/dist/components/rel-container/README.md +99 -0
- package/dist/components/rel-date-picker/README.md +253 -0
- package/dist/components/rel-date-picker/index.ts +1 -0
- package/dist/components/rel-date-picker/rel-date-picker.ts +916 -0
- package/dist/components/rel-divider/README.md +100 -0
- package/dist/components/rel-drawer/README.md +200 -0
- package/dist/components/rel-drawer/index.ts +1 -0
- package/dist/components/rel-drawer/rel-drawer.ts +621 -0
- package/dist/components/rel-kbd/README.md +151 -0
- package/dist/components/rel-kbd/rel-kbd.ts +118 -0
- package/dist/components/rel-layout/README.md +88 -0
- package/dist/components/rel-menu/README.md +151 -0
- package/dist/components/rel-menu/rel-menu.ts +18 -10
- package/dist/components/rel-menubar/README.md +329 -0
- package/dist/components/rel-menubar/index.ts +2 -0
- package/dist/components/rel-menubar/rel-menubar-menu.ts +16 -0
- package/dist/components/rel-menubar/rel-menubar.ts +576 -0
- package/dist/components/rel-nav-menu/README.md +289 -0
- package/dist/components/rel-nav-menu/index.ts +3 -0
- package/dist/components/rel-nav-menu/rel-nav-menu-item.ts +143 -0
- package/dist/components/rel-nav-menu/rel-nav-menu-panel.ts +53 -0
- package/dist/components/rel-nav-menu/rel-nav-menu.ts +331 -0
- package/dist/components/rel-navbar/README.md +126 -0
- package/dist/components/rel-navbar/rel-navbar.ts +91 -0
- package/dist/components/rel-otp/README.md +440 -0
- package/dist/components/rel-otp/index.ts +1 -0
- package/dist/components/rel-otp/rel-otp.ts +504 -0
- package/dist/components/rel-pagination/README.md +410 -0
- package/dist/components/rel-pagination/index.ts +1 -0
- package/dist/components/rel-pagination/rel-pagination.ts +376 -0
- package/dist/components/rel-popover/README.md +568 -0
- package/dist/components/rel-popover/index.ts +2 -0
- package/dist/components/rel-popover/rel-popover-content.ts +55 -0
- package/dist/components/rel-popover/rel-popover.ts +327 -0
- package/dist/components/rel-progress/README.md +110 -0
- package/dist/components/rel-progress/rel-progress.ts +32 -5
- package/dist/components/rel-quote-page/README.md +166 -0
- package/dist/components/rel-quote-page/rel-quote-page.ts +816 -0
- package/dist/components/rel-radio/README.md +120 -0
- package/dist/components/rel-radio/rel-radio.ts +13 -5
- package/dist/components/rel-resizable/README.md +140 -0
- package/dist/components/rel-resizable/index.ts +3 -0
- package/dist/components/rel-resizable/rel-resizable-group.ts +374 -0
- package/dist/components/rel-resizable/rel-resizable-handle.ts +149 -0
- package/dist/components/rel-resizable/rel-resizable-panel.ts +47 -0
- package/dist/components/rel-segmented-button/README.md +141 -0
- package/dist/components/rel-segmented-button/rel-segmented-button.ts +18 -13
- package/dist/components/rel-select/README.md +107 -0
- package/dist/components/rel-select/rel-select.ts +14 -14
- package/dist/components/rel-sheet/README.md +224 -0
- package/dist/components/rel-sheet/rel-sheet.ts +683 -0
- package/dist/components/rel-sidebar/README.md +209 -0
- package/dist/components/rel-sidebar/rel-sidebar.ts +1158 -0
- package/dist/components/rel-slider/README.md +135 -0
- package/dist/components/rel-slider/rel-slider.ts +19 -7
- package/dist/components/rel-snackbar/README.md +134 -0
- package/dist/components/rel-snackbar/rel-snackbar.ts +67 -2
- package/dist/components/rel-stepper/README.md +160 -0
- package/dist/components/rel-stepper/rel-stepper.ts +6 -6
- package/dist/components/rel-switch/README.md +102 -0
- package/dist/components/rel-switch/rel-switch.ts +15 -6
- package/dist/components/rel-tab/README.md +163 -0
- package/dist/components/rel-tab/rel-tab.ts +36 -14
- package/dist/components/rel-table/README.md +178 -0
- package/dist/components/rel-table/rel-table-body.ts +16 -0
- package/dist/components/rel-table/rel-table-caption.ts +22 -0
- package/dist/components/rel-table/rel-table-cell.ts +49 -0
- package/dist/components/rel-table/rel-table-footer.ts +18 -0
- package/dist/components/rel-table/rel-table-head.ts +33 -0
- package/dist/components/rel-table/rel-table-header.ts +16 -0
- package/dist/components/rel-table/rel-table-row.ts +32 -0
- package/dist/components/rel-table/rel-table.ts +47 -0
- package/dist/components/rel-textfield/README.md +90 -0
- package/dist/components/rel-textfield/rel-textfield.ts +35 -19
- package/dist/components/rel-toast/README.md +148 -0
- package/dist/components/rel-toast/rel-toast.ts +32 -14
- package/dist/components/rel-tooltip/README.md +103 -0
- package/dist/components/rel-tooltip/rel-tooltip.ts +9 -9
- package/dist/index.d.mts +836 -1
- package/dist/index.d.ts +836 -1
- package/dist/index.js +10658 -1493
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +10616 -1499
- package/dist/index.mjs.map +1 -1
- package/dist/styles/vars.css +293 -183
- package/dist/{vars-6ZIUPIU4.css → vars-ITL2K3KO.css} +293 -183
- package/package.json +1 -1
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
# rel-card-media
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
A media-rich card component combining an image, title, subtitle, and custom content area. Features automatic image sizing with object-fit, enhanced hover lift effect (4px), and semantic heading structure. Ideal for blog posts, product listings, or media galleries.
|
|
5
|
+
|
|
6
|
+
## Usage
|
|
7
|
+
```html
|
|
8
|
+
<!-- Basic media card -->
|
|
9
|
+
<rel-card-media
|
|
10
|
+
imageSrc="./photo.jpg"
|
|
11
|
+
imageAlt="Beautiful landscape"
|
|
12
|
+
title="Card Title"
|
|
13
|
+
subtitle="Card subtitle or description">
|
|
14
|
+
</rel-card-media>
|
|
15
|
+
|
|
16
|
+
<!-- With custom slotted content -->
|
|
17
|
+
<rel-card-media
|
|
18
|
+
imageSrc="./product.jpg"
|
|
19
|
+
imageAlt="Product image"
|
|
20
|
+
title="Premium Product"
|
|
21
|
+
subtitle="$99.99">
|
|
22
|
+
<p>Additional product details go here.</p>
|
|
23
|
+
<button>Buy Now</button>
|
|
24
|
+
</rel-card-media>
|
|
25
|
+
|
|
26
|
+
<!-- Without image -->
|
|
27
|
+
<rel-card-media
|
|
28
|
+
title="Text-Only Card"
|
|
29
|
+
subtitle="No image provided">
|
|
30
|
+
<p>This card has no image, just title, subtitle, and content.</p>
|
|
31
|
+
</rel-card-media>
|
|
32
|
+
|
|
33
|
+
<!-- With title only -->
|
|
34
|
+
<rel-card-media
|
|
35
|
+
imageSrc="./banner.jpg"
|
|
36
|
+
imageAlt="Banner"
|
|
37
|
+
title="Event Title">
|
|
38
|
+
<p>Event description and details.</p>
|
|
39
|
+
</rel-card-media>
|
|
40
|
+
|
|
41
|
+
<!-- Gallery layout -->
|
|
42
|
+
<div style="display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;">
|
|
43
|
+
<rel-card-media
|
|
44
|
+
imageSrc="./img1.jpg"
|
|
45
|
+
title="Gallery Item 1">
|
|
46
|
+
</rel-card-media>
|
|
47
|
+
<rel-card-media
|
|
48
|
+
imageSrc="./img2.jpg"
|
|
49
|
+
title="Gallery Item 2">
|
|
50
|
+
</rel-card-media>
|
|
51
|
+
<rel-card-media
|
|
52
|
+
imageSrc="./img3.jpg"
|
|
53
|
+
title="Gallery Item 3">
|
|
54
|
+
</rel-card-media>
|
|
55
|
+
</div>
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## API
|
|
59
|
+
|
|
60
|
+
### Attributes/Properties
|
|
61
|
+
| Name | Type | Default | Description |
|
|
62
|
+
|------|------|---------|-------------|
|
|
63
|
+
| `imageSrc` | `string` | `""` | URL of the card image (optional) |
|
|
64
|
+
| `imageAlt` | `string` | `"Card image"` | Alt text for the image (for accessibility) |
|
|
65
|
+
| `title` | `string` | `""` | Card title displayed as `<h3>` (optional) |
|
|
66
|
+
| `subtitle` | `string` | `""` | Card subtitle displayed as `<p>` (optional) |
|
|
67
|
+
|
|
68
|
+
## Events
|
|
69
|
+
None.
|
|
70
|
+
|
|
71
|
+
## Slots
|
|
72
|
+
| Slot | Description |
|
|
73
|
+
|------|-------------|
|
|
74
|
+
| (default) | Additional content rendered below title and subtitle |
|
|
75
|
+
|
|
76
|
+
## CSS Parts
|
|
77
|
+
None exposed.
|
|
78
|
+
|
|
79
|
+
## Tokens / CSS Variables
|
|
80
|
+
|
|
81
|
+
### Semantic Tokens
|
|
82
|
+
- `--rel-fontFamilies-primary` - Font family
|
|
83
|
+
- `--rel-fontSizes-md` - Title font size
|
|
84
|
+
- `--rel-fontSizes-sm` - Subtitle font size
|
|
85
|
+
- `--rel-fontWeights-semibold` - Title font weight
|
|
86
|
+
|
|
87
|
+
### Color Tokens
|
|
88
|
+
- `--rel-colors-white` - Card background color
|
|
89
|
+
- `--rel-text-primary` - General text color
|
|
90
|
+
- `--rel-text-heading` - Title color
|
|
91
|
+
|
|
92
|
+
### Shadow Tokens
|
|
93
|
+
- `--rel-shadows-shadow-200` - Default elevation shadow
|
|
94
|
+
- `--rel-shadows-shadow-300` - Hover elevation shadow (larger)
|
|
95
|
+
|
|
96
|
+
### Border Tokens
|
|
97
|
+
- `--rel-borders-radius-border-radius-300` - Card border radius
|
|
98
|
+
|
|
99
|
+
### Spacing Tokens
|
|
100
|
+
- `--rel-spacing-space-md` - Content area padding
|
|
101
|
+
|
|
102
|
+
## Accessibility
|
|
103
|
+
- Image has `alt` attribute for screen reader support
|
|
104
|
+
- Title uses semantic `<h3>` heading
|
|
105
|
+
- Subtitle uses `<p>` for proper text hierarchy
|
|
106
|
+
- Hover effect is purely visual and does not affect accessibility
|
|
107
|
+
|
|
108
|
+
### Keyboard Interactions
|
|
109
|
+
- None (purely presentational container)
|
|
110
|
+
- Ensure slotted interactive elements are keyboard accessible
|
|
111
|
+
|
|
112
|
+
### Focus Behavior
|
|
113
|
+
- Does not receive focus (container only)
|
|
114
|
+
|
|
115
|
+
## Notes / Edge Cases
|
|
116
|
+
- **Image rendering**: If `imageSrc` is not provided or empty, the image section is not rendered
|
|
117
|
+
- **Image sizing**: The image uses `width: 100%`, `height: auto`, and `object-fit: cover` for responsive scaling
|
|
118
|
+
- The image is `display: block` to remove default inline spacing
|
|
119
|
+
- **Title and subtitle**: Both are optional; if not provided, their respective elements are not rendered
|
|
120
|
+
- Title has `margin: 0 0 4px 0` for spacing from subtitle
|
|
121
|
+
- Subtitle has `margin: 0 0 8px 0` for spacing from slotted content
|
|
122
|
+
- **Hover effect**: Translates the card upward by 4px (`translateY(-4px)`) and increases shadow depth (1px more than rel-card)
|
|
123
|
+
- **Animation**: Uses `transition: transform 0.2s ease, box-shadow 0.2s ease`
|
|
124
|
+
- **Motion preferences**: When `prefers-reduced-motion: reduce`, both hover transform and transitions are disabled
|
|
125
|
+
- The card uses `overflow: hidden` to ensure image respects border radius
|
|
126
|
+
- The `.card-content` wrapper provides consistent padding for title, subtitle, and slotted content
|
|
127
|
+
- The component is `display: block` and takes full width of its container
|
|
@@ -11,11 +11,12 @@ export class RelCardMedia extends LitElement {
|
|
|
11
11
|
static styles = css`
|
|
12
12
|
:host {
|
|
13
13
|
display: block;
|
|
14
|
-
font-family: var(--rel-fontFamilies-primary);
|
|
14
|
+
font-family: var(--rel-fontFamilies-primary, sans-serif);
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
.card-media {
|
|
18
|
-
background-color: var(--rel-colors-white);
|
|
18
|
+
background-color: var(--rel-colors-white, #fff);
|
|
19
|
+
color: var(--rel-text-primary, #333);
|
|
19
20
|
border-radius: var(--rel-borders-radius-border-radius-300);
|
|
20
21
|
overflow: hidden;
|
|
21
22
|
box-shadow: var(--rel-shadows-shadow-200);
|
|
@@ -27,6 +28,15 @@ export class RelCardMedia extends LitElement {
|
|
|
27
28
|
box-shadow: var(--rel-shadows-shadow-300);
|
|
28
29
|
}
|
|
29
30
|
|
|
31
|
+
@media (prefers-reduced-motion: reduce) {
|
|
32
|
+
.card-media {
|
|
33
|
+
transition: none;
|
|
34
|
+
}
|
|
35
|
+
.card-media:hover {
|
|
36
|
+
transform: none;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
30
40
|
.card-image img {
|
|
31
41
|
display: block;
|
|
32
42
|
width: 100%;
|
|
@@ -42,13 +52,13 @@ export class RelCardMedia extends LitElement {
|
|
|
42
52
|
margin: 0 0 4px 0;
|
|
43
53
|
font-size: var(--rel-fontSizes-md);
|
|
44
54
|
font-weight: var(--rel-fontWeights-semibold);
|
|
45
|
-
color: var(--rel-
|
|
55
|
+
color: var(--rel-text-heading, #2b2b2b);
|
|
46
56
|
}
|
|
47
57
|
|
|
48
58
|
.card-content p {
|
|
49
59
|
margin: 0 0 8px 0;
|
|
50
60
|
font-size: var(--rel-fontSizes-sm);
|
|
51
|
-
color: var(--rel-
|
|
61
|
+
color: var(--rel-text-primary, #333);
|
|
52
62
|
}
|
|
53
63
|
`;
|
|
54
64
|
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
# rel-carousel
|
|
2
|
+
|
|
3
|
+
A fully accessible carousel component built with Lit for the Reliability Design System.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
- Horizontal sliding carousel
|
|
8
|
+
- Touch/mouse drag support
|
|
9
|
+
- Keyboard navigation
|
|
10
|
+
- Optional autoplay
|
|
11
|
+
- Navigation buttons and dot indicators
|
|
12
|
+
- Loop mode
|
|
13
|
+
- Smooth transitions with reduced motion support
|
|
14
|
+
- Full ARIA support
|
|
15
|
+
|
|
16
|
+
## Usage
|
|
17
|
+
|
|
18
|
+
```html
|
|
19
|
+
<rel-carousel>
|
|
20
|
+
<div>Slide 1</div>
|
|
21
|
+
<div>Slide 2</div>
|
|
22
|
+
<div>Slide 3</div>
|
|
23
|
+
</rel-carousel>
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
### With Loop
|
|
27
|
+
|
|
28
|
+
```html
|
|
29
|
+
<rel-carousel loop>
|
|
30
|
+
<div>Slide 1</div>
|
|
31
|
+
<div>Slide 2</div>
|
|
32
|
+
<div>Slide 3</div>
|
|
33
|
+
</rel-carousel>
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
### With Autoplay
|
|
37
|
+
|
|
38
|
+
```html
|
|
39
|
+
<rel-carousel autoplay interval="3000">
|
|
40
|
+
<div>Slide 1</div>
|
|
41
|
+
<div>Slide 2</div>
|
|
42
|
+
<div>Slide 3</div>
|
|
43
|
+
</rel-carousel>
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### Without Navigation
|
|
47
|
+
|
|
48
|
+
```html
|
|
49
|
+
<rel-carousel show-buttons="false" show-dots="false">
|
|
50
|
+
<div>Slide 1</div>
|
|
51
|
+
<div>Slide 2</div>
|
|
52
|
+
<div>Slide 3</div>
|
|
53
|
+
</rel-carousel>
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### Programmatic Control (JavaScript)
|
|
57
|
+
|
|
58
|
+
```javascript
|
|
59
|
+
const carousel = document.querySelector('rel-carousel');
|
|
60
|
+
|
|
61
|
+
// Navigate to specific slide
|
|
62
|
+
carousel.value = 2;
|
|
63
|
+
|
|
64
|
+
// Listen to changes
|
|
65
|
+
carousel.addEventListener('rel-change', (e) => {
|
|
66
|
+
console.log('Current slide:', e.detail.value);
|
|
67
|
+
});
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
## Attributes
|
|
71
|
+
|
|
72
|
+
| Attribute | Type | Default | Description |
|
|
73
|
+
|-----------|------|---------|-------------|
|
|
74
|
+
| `value` | `number` | `0` | Current slide index (0-based) |
|
|
75
|
+
| `loop` | `boolean` | `false` | Enable infinite loop |
|
|
76
|
+
| `autoplay` | `boolean` | `false` | Enable automatic slide advancement |
|
|
77
|
+
| `interval` | `number` | `5000` | Autoplay interval in milliseconds |
|
|
78
|
+
| `pause-on-hover` | `boolean` | `true` | Pause autoplay on mouse hover |
|
|
79
|
+
| `show-buttons` | `boolean` | `true` | Show prev/next navigation buttons |
|
|
80
|
+
| `show-dots` | `boolean` | `true` | Show dot indicators |
|
|
81
|
+
| `orientation` | `"horizontal" \| "vertical"` | `"horizontal"` | Carousel orientation (v1: horizontal only) |
|
|
82
|
+
| `align` | `"start" \| "center" \| "end"` | `"center"` | Slide alignment in viewport |
|
|
83
|
+
| `slides-per-view` | `number` | `1` | Number of slides visible at once (v1: 1 only) |
|
|
84
|
+
| `gap` | `number` | - | Gap between slides in pixels (optional) |
|
|
85
|
+
| `disabled` | `boolean` | `false` | Disable all interactions |
|
|
86
|
+
|
|
87
|
+
## Events
|
|
88
|
+
|
|
89
|
+
| Event | Detail | Description |
|
|
90
|
+
|-------|--------|-------------|
|
|
91
|
+
| `rel-change` | `{ value: number }` | Fired when active slide changes |
|
|
92
|
+
|
|
93
|
+
## Keyboard Navigation
|
|
94
|
+
|
|
95
|
+
- **Arrow Left**: Go to previous slide
|
|
96
|
+
- **Arrow Right**: Go to next slide
|
|
97
|
+
- **Home**: Go to first slide
|
|
98
|
+
- **End**: Go to last slide
|
|
99
|
+
- **Tab**: Navigate through carousel controls
|
|
100
|
+
|
|
101
|
+
## CSS Parts
|
|
102
|
+
|
|
103
|
+
Use `::part()` to customize carousel appearance:
|
|
104
|
+
|
|
105
|
+
```css
|
|
106
|
+
rel-carousel::part(viewport) {
|
|
107
|
+
border-radius: 12px;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
rel-carousel::part(prev-button),
|
|
111
|
+
rel-carousel::part(next-button) {
|
|
112
|
+
background: rgba(0, 0, 0, 0.5);
|
|
113
|
+
color: white;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
rel-carousel::part(dot) {
|
|
117
|
+
width: 10px;
|
|
118
|
+
height: 10px;
|
|
119
|
+
}
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
Available parts:
|
|
123
|
+
- `viewport` - The carousel viewport container
|
|
124
|
+
- `track` - The sliding track container
|
|
125
|
+
- `prev-button` - Previous navigation button
|
|
126
|
+
- `next-button` - Next navigation button
|
|
127
|
+
- `dots` - Dots container
|
|
128
|
+
- `dot` - Individual dot indicator
|
|
129
|
+
|
|
130
|
+
## Accessibility
|
|
131
|
+
|
|
132
|
+
- Carousel uses `role="region"` with `aria-roledescription="carousel"`
|
|
133
|
+
- Each slide has proper ARIA labels
|
|
134
|
+
- Navigation buttons have descriptive `aria-label` attributes
|
|
135
|
+
- Supports keyboard navigation
|
|
136
|
+
- Respects `prefers-reduced-motion` user preference
|
|
137
|
+
|
|
138
|
+
## Styling
|
|
139
|
+
|
|
140
|
+
The component uses design tokens from the Reliability Design System. All colors, spacing, and typography are inherited from CSS variables.
|
|
141
|
+
|
|
142
|
+
Key tokens used:
|
|
143
|
+
- `--rel-colors-*` for colors
|
|
144
|
+
- `--rel-spacing-*` for spacing
|
|
145
|
+
- `--rel-shadows-*` for shadows
|
|
146
|
+
- `--rel-border-*` for borders
|
|
147
|
+
- Focus outline uses `--rel-colors-blue-primary`
|
|
148
|
+
- Active dot uses `--rel-colors-green-primary`
|
|
149
|
+
|
|
150
|
+
## Interaction
|
|
151
|
+
|
|
152
|
+
### Mouse/Touch Drag
|
|
153
|
+
- Click and drag to swipe between slides
|
|
154
|
+
- Threshold-based snap: swipe 20% of slide width to trigger navigation
|
|
155
|
+
- Smooth animation on release
|
|
156
|
+
|
|
157
|
+
### Autoplay
|
|
158
|
+
- Automatically advances slides at specified interval
|
|
159
|
+
- Pauses on hover (configurable via `pause-on-hover`)
|
|
160
|
+
- Pauses during manual interaction
|
|
161
|
+
- Resumes after interaction ends
|
|
162
|
+
|
|
163
|
+
### Reduced Motion
|
|
164
|
+
- Component respects `prefers-reduced-motion` media query
|
|
165
|
+
- Disables or reduces transitions when user prefers reduced motion
|
|
166
|
+
- Drag interactions remain functional but with instant snap
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./rel-carousel";
|