@aurodesignsystem-dev/auro-carousel 0.0.0-pr142.1 → 0.0.0-pr142.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 +1 -1
- package/demo/api.md +17 -17
- package/demo/api.min.js +7 -7
- package/demo/index.md +5 -5
- package/demo/index.min.js +7 -7
- package/demo/readme.md +1 -1
- package/dist/{auro-carousel-acFfUyJs.js → auro-carousel-OBRWwlpL.js} +2 -2
- package/dist/index.d.ts +14 -14
- package/dist/index.js +1 -1
- package/dist/registered.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -34,7 +34,7 @@ The following sections are editable by making changes to the following files:
|
|
|
34
34
|
<!-- The below content is automatically added from ./docs/partials/useCases.md -->
|
|
35
35
|
Use `<auro-carousel>` when people need to:
|
|
36
36
|
|
|
37
|
-
* Scroll through flight date options
|
|
37
|
+
* Scroll through flight date options, such as dates just before and after a chosen date
|
|
38
38
|
* Scroll through images
|
|
39
39
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
40
40
|
|
package/demo/api.md
CHANGED
|
@@ -6,19 +6,19 @@
|
|
|
6
6
|
Displays a group of elements, such as flight date options or images, in a horizontally scrollable container with buttons to scroll left and right.
|
|
7
7
|
|
|
8
8
|
**Key capabilities:**
|
|
9
|
-
- **Scroll buttons**: Shows left and right buttons on
|
|
9
|
+
- **Scroll buttons**: Shows left and right buttons on screens at least 576 pixels wide when the carousel can scroll that way, or at all times when you add `displayArrows`.
|
|
10
10
|
- **Centered selection**: Scrolls the first element with the `selected` attribute to the center when you add `centerSelected`.
|
|
11
11
|
- **Custom scroll distance**: Sets how far each button press scrolls, in pixels, with `scrollDistance`.
|
|
12
12
|
- **Accessible names**: Names the carousel and its scroll buttons through the `ariaLabel`, `ariaLabel.scroll.left`, and `ariaLabel.scroll.right` slots.
|
|
13
13
|
|
|
14
14
|
### Properties and attributes
|
|
15
15
|
|
|
16
|
-
| Properties | Attributes | Modifiers | Type | Default | Description
|
|
17
|
-
| -------------- | -------------- | --------- | ------- | ------- |
|
|
18
|
-
| displayArrows | displayarrows | | boolean | | Shows the left and right scroll buttons at all times, instead of
|
|
19
|
-
| scrollDistance | scrolldistance | | number | `300` | Sets how many pixels the carousel scrolls when someone selects the left or right button.
|
|
20
|
-
| label | label | | string | | Deprecated: Use the `ariaLabel` slot instead.<br>Sets the text that screen readers announce as the carousel's name.
|
|
21
|
-
| | centerselected | | boolean | | Centers the carousel on the first element that has the `selected` attribute when the carousel first renders.
|
|
16
|
+
| Properties | Attributes | Modifiers | Type | Default | Description |
|
|
17
|
+
| -------------- | -------------- | --------- | ------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
18
|
+
| displayArrows | displayarrows | | boolean | | Shows the left and right scroll buttons at all times, instead of hiding each one when the carousel can't scroll further in that direction. The buttons stay hidden on small screens. |
|
|
19
|
+
| scrollDistance | scrolldistance | | number | `300` | Sets how many pixels the carousel scrolls when someone selects the left or right button. |
|
|
20
|
+
| label | label | | string | | Deprecated: Use the `ariaLabel` slot instead.<br>Sets the text that screen readers announce as the carousel's name. |
|
|
21
|
+
| | centerselected | | boolean | | Centers the carousel on the first element that has the `selected` attribute when the carousel first renders. |
|
|
22
22
|
|
|
23
23
|
### Methods
|
|
24
24
|
|
|
@@ -38,12 +38,12 @@ Displays a group of elements, such as flight date options or images, in a horizo
|
|
|
38
38
|
|
|
39
39
|
### Slots
|
|
40
40
|
|
|
41
|
-
| Name | Description
|
|
42
|
-
| ---------------------- |
|
|
43
|
-
| (default) | The elements to scroll through, such as `auro-pane` elements or images.
|
|
44
|
-
| ariaLabel
|
|
45
|
-
| ariaLabel.scroll.
|
|
46
|
-
| ariaLabel
|
|
41
|
+
| Name | Description |
|
|
42
|
+
| ---------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
43
|
+
| (default) | The elements to scroll through, such as `auro-pane` elements or images. |
|
|
44
|
+
| ariaLabel.scroll.left | Text that screen readers announce for the left scroll button, for example "Show earlier dates". Defaults to "Scroll left". |
|
|
45
|
+
| ariaLabel.scroll.right | Text that screen readers announce for the right scroll button, for example "Show later dates". Defaults to "Scroll right". |
|
|
46
|
+
| ariaLabel | Text that screen readers announce as the carousel's name, for example "Flight date options". Required unless you set the deprecated `label` attribute, and takes priority over it when both are set. |
|
|
47
47
|
|
|
48
48
|
### CSS shadow parts
|
|
49
49
|
|
|
@@ -108,7 +108,7 @@ Displays a group of elements, such as flight date options or images, in a horizo
|
|
|
108
108
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
109
109
|
</auro-accordion>
|
|
110
110
|
|
|
111
|
-
## Property
|
|
111
|
+
## Property and attribute examples
|
|
112
112
|
|
|
113
113
|
#### Center selected
|
|
114
114
|
|
|
@@ -291,11 +291,11 @@ Use the `scrollDistance` attribute to set how many pixels the carousel scrolls w
|
|
|
291
291
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
292
292
|
</auro-accordion>
|
|
293
293
|
|
|
294
|
-
## Method
|
|
294
|
+
## Method examples
|
|
295
295
|
|
|
296
296
|
#### Center element
|
|
297
297
|
|
|
298
|
-
Use the `centerElement` method to center an element inside the carousel, such as a pane when someone selects it. The element must be a descendant of the carousel, or the method throws an error. The carousel can only center
|
|
298
|
+
Use the `centerElement` method to center an element inside the carousel, such as a pane when someone selects it. The element must be a descendant of the carousel, or the method throws an error. The carousel can only center an element that has enough content on both sides of it.
|
|
299
299
|
|
|
300
300
|
This example doesn't use `centerSelected`, so it doesn't center the selected pane on load. The method doesn't run on its own, so call it from an event handler, such as a click listener. The code below shows a vanilla JS example and a React example.
|
|
301
301
|
|
|
@@ -415,7 +415,7 @@ This example doesn't use `centerSelected`, so it doesn't center the selected pan
|
|
|
415
415
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
416
416
|
</auro-accordion>
|
|
417
417
|
|
|
418
|
-
## Slot
|
|
418
|
+
## Slot examples
|
|
419
419
|
|
|
420
420
|
### Aria label slots
|
|
421
421
|
|
package/demo/api.min.js
CHANGED
|
@@ -317,7 +317,7 @@ var tokensCss = i$5`:host{--ds-auro-carousel-gradient-color-one: var(--ds-basic-
|
|
|
317
317
|
* Displays a group of elements, such as flight date options or images, in a horizontally scrollable container with buttons to scroll left and right.
|
|
318
318
|
*
|
|
319
319
|
* **Key capabilities:**
|
|
320
|
-
* - **Scroll buttons**: Shows left and right buttons on
|
|
320
|
+
* - **Scroll buttons**: Shows left and right buttons on screens at least 576 pixels wide when the carousel can scroll that way, or at all times when you add `displayArrows`.
|
|
321
321
|
* - **Centered selection**: Scrolls the first element with the `selected` attribute to the center when you add `centerSelected`.
|
|
322
322
|
* - **Custom scroll distance**: Sets how far each button press scrolls, in pixels, with `scrollDistance`.
|
|
323
323
|
* - **Accessible names**: Names the carousel and its scroll buttons through the `ariaLabel`, `ariaLabel.scroll.left`, and `ariaLabel.scroll.right` slots.
|
|
@@ -337,9 +337,9 @@ var tokensCss = i$5`:host{--ds-auro-carousel-gradient-color-one: var(--ds-basic-
|
|
|
337
337
|
* @attr {boolean} centerselected - Centers the carousel on the first element that has the `selected` attribute when the carousel first renders.
|
|
338
338
|
*
|
|
339
339
|
* @slot - The elements to scroll through, such as `auro-pane` elements or images.
|
|
340
|
-
* @slot ariaLabel - Text that screen readers announce as the carousel's name, for example "Flight date options".
|
|
341
|
-
* @slot ariaLabel.scroll.left - Text that screen readers announce for the left scroll button, for example "Show earlier dates". Defaults to "Scroll
|
|
342
|
-
* @slot ariaLabel.scroll.right - Text that screen readers announce for the right scroll button, for example "Show later dates". Defaults to "Scroll
|
|
340
|
+
* @slot ariaLabel - Text that screen readers announce as the carousel's name, for example "Flight date options". Required unless you set the deprecated `label` attribute, and takes priority over it when both are set.
|
|
341
|
+
* @slot ariaLabel.scroll.left - Text that screen readers announce for the left scroll button, for example "Show earlier dates". Defaults to "Scroll left".
|
|
342
|
+
* @slot ariaLabel.scroll.right - Text that screen readers announce for the right scroll button, for example "Show later dates". Defaults to "Scroll right".
|
|
343
343
|
*
|
|
344
344
|
* @csspart wrapper - The scrollable `<div>` that wraps the scroll buttons and the slotted elements.
|
|
345
345
|
*
|
|
@@ -397,7 +397,7 @@ class AuroCarousel extends i$2 {
|
|
|
397
397
|
static get properties() {
|
|
398
398
|
return {
|
|
399
399
|
/**
|
|
400
|
-
* Shows the left and right scroll buttons at all times, instead of
|
|
400
|
+
* Shows the left and right scroll buttons at all times, instead of hiding each one when the carousel can't scroll further in that direction. The buttons stay hidden on small screens.
|
|
401
401
|
*/
|
|
402
402
|
displayArrows: { type: Boolean, attribute: "displayarrows" },
|
|
403
403
|
|
|
@@ -705,7 +705,7 @@ class AuroCarousel extends i$2 {
|
|
|
705
705
|
|
|
706
706
|
<!-- Left button -->
|
|
707
707
|
<${this.buttonTag}
|
|
708
|
-
aria-label="${o(this.runtimeUtils.getSlotText(this, 'ariaLabel.scroll.left') || 'Scroll
|
|
708
|
+
aria-label="${o(this.runtimeUtils.getSlotText(this, 'ariaLabel.scroll.left') || 'Scroll left')}"
|
|
709
709
|
shape="circle"
|
|
710
710
|
variant="secondary"
|
|
711
711
|
@click=${() => this.handleClick(false)}
|
|
@@ -721,7 +721,7 @@ class AuroCarousel extends i$2 {
|
|
|
721
721
|
|
|
722
722
|
<!-- Right button -->
|
|
723
723
|
<${this.buttonTag}
|
|
724
|
-
aria-label="${o(this.runtimeUtils.getSlotText(this, 'ariaLabel.scroll.right') || 'Scroll
|
|
724
|
+
aria-label="${o(this.runtimeUtils.getSlotText(this, 'ariaLabel.scroll.right') || 'Scroll right')}"
|
|
725
725
|
shape="circle"
|
|
726
726
|
variant="secondary"
|
|
727
727
|
@click=${() => this.handleClick(true)}
|
package/demo/index.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<!--
|
|
2
2
|
THIS PAGE'S CONTENT SHOULD BE KEPT MINIMAL.
|
|
3
|
-
ONLY ADD EXAMPLES THAT ARE TRULY NECESSARY FOR THE INDEX PAGE
|
|
3
|
+
ONLY ADD EXAMPLES THAT ARE TRULY NECESSARY FOR THE INDEX PAGE. THE BASIC EXAMPLE IS USUALLY ENOUGH.
|
|
4
4
|
ALL OTHER EXAMPLES SHOULD GO IN THE API DOCUMENTATION.
|
|
5
5
|
-->
|
|
6
6
|
|
|
@@ -11,18 +11,18 @@
|
|
|
11
11
|
`<auro-carousel>` is an [HTML custom element](https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_custom_elements) that displays a group of elements in a scrollable container.
|
|
12
12
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
13
13
|
|
|
14
|
-
## Use
|
|
14
|
+
## Use cases
|
|
15
15
|
|
|
16
16
|
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../docs/partials/useCases.md) -->
|
|
17
17
|
<!-- The below content is automatically added from ./../docs/partials/useCases.md -->
|
|
18
18
|
Use `<auro-carousel>` when people need to:
|
|
19
19
|
|
|
20
|
-
* Scroll through flight date options
|
|
20
|
+
* Scroll through flight date options, such as dates just before and after a chosen date
|
|
21
21
|
* Scroll through images
|
|
22
22
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
23
23
|
|
|
24
|
-
##
|
|
25
|
-
|
|
24
|
+
## Examples
|
|
25
|
+
|
|
26
26
|
### Basic
|
|
27
27
|
|
|
28
28
|
<div class="exampleWrapper">
|
package/demo/index.min.js
CHANGED
|
@@ -299,7 +299,7 @@ var tokensCss = i$5`:host{--ds-auro-carousel-gradient-color-one: var(--ds-basic-
|
|
|
299
299
|
* Displays a group of elements, such as flight date options or images, in a horizontally scrollable container with buttons to scroll left and right.
|
|
300
300
|
*
|
|
301
301
|
* **Key capabilities:**
|
|
302
|
-
* - **Scroll buttons**: Shows left and right buttons on
|
|
302
|
+
* - **Scroll buttons**: Shows left and right buttons on screens at least 576 pixels wide when the carousel can scroll that way, or at all times when you add `displayArrows`.
|
|
303
303
|
* - **Centered selection**: Scrolls the first element with the `selected` attribute to the center when you add `centerSelected`.
|
|
304
304
|
* - **Custom scroll distance**: Sets how far each button press scrolls, in pixels, with `scrollDistance`.
|
|
305
305
|
* - **Accessible names**: Names the carousel and its scroll buttons through the `ariaLabel`, `ariaLabel.scroll.left`, and `ariaLabel.scroll.right` slots.
|
|
@@ -319,9 +319,9 @@ var tokensCss = i$5`:host{--ds-auro-carousel-gradient-color-one: var(--ds-basic-
|
|
|
319
319
|
* @attr {boolean} centerselected - Centers the carousel on the first element that has the `selected` attribute when the carousel first renders.
|
|
320
320
|
*
|
|
321
321
|
* @slot - The elements to scroll through, such as `auro-pane` elements or images.
|
|
322
|
-
* @slot ariaLabel - Text that screen readers announce as the carousel's name, for example "Flight date options".
|
|
323
|
-
* @slot ariaLabel.scroll.left - Text that screen readers announce for the left scroll button, for example "Show earlier dates". Defaults to "Scroll
|
|
324
|
-
* @slot ariaLabel.scroll.right - Text that screen readers announce for the right scroll button, for example "Show later dates". Defaults to "Scroll
|
|
322
|
+
* @slot ariaLabel - Text that screen readers announce as the carousel's name, for example "Flight date options". Required unless you set the deprecated `label` attribute, and takes priority over it when both are set.
|
|
323
|
+
* @slot ariaLabel.scroll.left - Text that screen readers announce for the left scroll button, for example "Show earlier dates". Defaults to "Scroll left".
|
|
324
|
+
* @slot ariaLabel.scroll.right - Text that screen readers announce for the right scroll button, for example "Show later dates". Defaults to "Scroll right".
|
|
325
325
|
*
|
|
326
326
|
* @csspart wrapper - The scrollable `<div>` that wraps the scroll buttons and the slotted elements.
|
|
327
327
|
*
|
|
@@ -379,7 +379,7 @@ class AuroCarousel extends i$2 {
|
|
|
379
379
|
static get properties() {
|
|
380
380
|
return {
|
|
381
381
|
/**
|
|
382
|
-
* Shows the left and right scroll buttons at all times, instead of
|
|
382
|
+
* Shows the left and right scroll buttons at all times, instead of hiding each one when the carousel can't scroll further in that direction. The buttons stay hidden on small screens.
|
|
383
383
|
*/
|
|
384
384
|
displayArrows: { type: Boolean, attribute: "displayarrows" },
|
|
385
385
|
|
|
@@ -687,7 +687,7 @@ class AuroCarousel extends i$2 {
|
|
|
687
687
|
|
|
688
688
|
<!-- Left button -->
|
|
689
689
|
<${this.buttonTag}
|
|
690
|
-
aria-label="${o(this.runtimeUtils.getSlotText(this, 'ariaLabel.scroll.left') || 'Scroll
|
|
690
|
+
aria-label="${o(this.runtimeUtils.getSlotText(this, 'ariaLabel.scroll.left') || 'Scroll left')}"
|
|
691
691
|
shape="circle"
|
|
692
692
|
variant="secondary"
|
|
693
693
|
@click=${() => this.handleClick(false)}
|
|
@@ -703,7 +703,7 @@ class AuroCarousel extends i$2 {
|
|
|
703
703
|
|
|
704
704
|
<!-- Right button -->
|
|
705
705
|
<${this.buttonTag}
|
|
706
|
-
aria-label="${o(this.runtimeUtils.getSlotText(this, 'ariaLabel.scroll.right') || 'Scroll
|
|
706
|
+
aria-label="${o(this.runtimeUtils.getSlotText(this, 'ariaLabel.scroll.right') || 'Scroll right')}"
|
|
707
707
|
shape="circle"
|
|
708
708
|
variant="secondary"
|
|
709
709
|
@click=${() => this.handleClick(true)}
|
package/demo/readme.md
CHANGED
|
@@ -34,7 +34,7 @@ The following sections are editable by making changes to the following files:
|
|
|
34
34
|
<!-- The below content is automatically added from ./docs/partials/useCases.md -->
|
|
35
35
|
Use `<auro-carousel>` when people need to:
|
|
36
36
|
|
|
37
|
-
* Scroll through flight date options
|
|
37
|
+
* Scroll through flight date options, such as dates just before and after a chosen date
|
|
38
38
|
* Scroll through images
|
|
39
39
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
40
40
|
|
|
@@ -117,7 +117,7 @@ import{css as e,LitElement as t,html as s}from"lit";import{unsafeStatic as o,lit
|
|
|
117
117
|
|
|
118
118
|
<!-- Left button -->
|
|
119
119
|
<${this.buttonTag}
|
|
120
|
-
aria-label="${n(this.runtimeUtils.getSlotText(this,"ariaLabel.scroll.left")||"Scroll
|
|
120
|
+
aria-label="${n(this.runtimeUtils.getSlotText(this,"ariaLabel.scroll.left")||"Scroll left")}"
|
|
121
121
|
shape="circle"
|
|
122
122
|
variant="secondary"
|
|
123
123
|
@click=${()=>this.handleClick(!1)}
|
|
@@ -133,7 +133,7 @@ import{css as e,LitElement as t,html as s}from"lit";import{unsafeStatic as o,lit
|
|
|
133
133
|
|
|
134
134
|
<!-- Right button -->
|
|
135
135
|
<${this.buttonTag}
|
|
136
|
-
aria-label="${n(this.runtimeUtils.getSlotText(this,"ariaLabel.scroll.right")||"Scroll
|
|
136
|
+
aria-label="${n(this.runtimeUtils.getSlotText(this,"ariaLabel.scroll.right")||"Scroll right")}"
|
|
137
137
|
shape="circle"
|
|
138
138
|
variant="secondary"
|
|
139
139
|
@click=${()=>this.handleClick(!0)}
|
package/dist/index.d.ts
CHANGED
|
@@ -81,9 +81,9 @@ export type AuroCarouselProps = {
|
|
|
81
81
|
centerselected?: unknown;
|
|
82
82
|
/** Centers the carousel on the first element that has the `selected` attribute when the carousel first renders. */
|
|
83
83
|
undefined?: unknown;
|
|
84
|
-
/** Shows the left and right scroll buttons at all times, instead of
|
|
84
|
+
/** Shows the left and right scroll buttons at all times, instead of hiding each one when the carousel can't scroll further in that direction. The buttons stay hidden on small screens. */
|
|
85
85
|
displayarrows?: AuroCarousel["displayArrows"];
|
|
86
|
-
/** Shows the left and right scroll buttons at all times, instead of
|
|
86
|
+
/** Shows the left and right scroll buttons at all times, instead of hiding each one when the carousel can't scroll further in that direction. The buttons stay hidden on small screens. */
|
|
87
87
|
displayArrows?: AuroCarousel["displayArrows"];
|
|
88
88
|
/** Sets how many pixels the carousel scrolls when someone selects the left or right button. */
|
|
89
89
|
scrolldistance?: AuroCarousel["scrollDistance"];
|
|
@@ -104,9 +104,9 @@ export type AuroCarouselSolidJsProps = {
|
|
|
104
104
|
"bool:centerselected"?: unknown;
|
|
105
105
|
/** Centers the carousel on the first element that has the `selected` attribute when the carousel first renders. */
|
|
106
106
|
"prop:undefined"?: unknown;
|
|
107
|
-
/** Shows the left and right scroll buttons at all times, instead of
|
|
107
|
+
/** Shows the left and right scroll buttons at all times, instead of hiding each one when the carousel can't scroll further in that direction. The buttons stay hidden on small screens. */
|
|
108
108
|
"bool:displayarrows"?: AuroCarousel["displayArrows"];
|
|
109
|
-
/** Shows the left and right scroll buttons at all times, instead of
|
|
109
|
+
/** Shows the left and right scroll buttons at all times, instead of hiding each one when the carousel can't scroll further in that direction. The buttons stay hidden on small screens. */
|
|
110
110
|
"prop:displayArrows"?: AuroCarousel["displayArrows"];
|
|
111
111
|
/** Sets how many pixels the carousel scrolls when someone selects the left or right button. */
|
|
112
112
|
"attr:scrolldistance"?: AuroCarousel["scrollDistance"];
|
|
@@ -131,7 +131,7 @@ export type CustomElements = {
|
|
|
131
131
|
* Displays a group of elements, such as flight date options or images, in a horizontally scrollable container with buttons to scroll left and right.
|
|
132
132
|
*
|
|
133
133
|
* **Key capabilities:**
|
|
134
|
-
* - **Scroll buttons**: Shows left and right buttons on
|
|
134
|
+
* - **Scroll buttons**: Shows left and right buttons on screens at least 576 pixels wide when the carousel can scroll that way, or at all times when you add `displayArrows`.
|
|
135
135
|
* - **Centered selection**: Scrolls the first element with the `selected` attribute to the center when you add `centerSelected`.
|
|
136
136
|
* - **Custom scroll distance**: Sets how far each button press scrolls, in pixels, with `scrollDistance`.
|
|
137
137
|
* - **Accessible names**: Names the carousel and its scroll buttons through the `ariaLabel`, `ariaLabel.scroll.left`, and `ariaLabel.scroll.right` slots.
|
|
@@ -141,7 +141,7 @@ export type CustomElements = {
|
|
|
141
141
|
* Component attributes and properties that can be applied to the element or by using JavaScript.
|
|
142
142
|
*
|
|
143
143
|
* - `centerselected`/`undefined`: Centers the carousel on the first element that has the `selected` attribute when the carousel first renders.
|
|
144
|
-
* - `displayarrows`/`displayArrows`: Shows the left and right scroll buttons at all times, instead of
|
|
144
|
+
* - `displayarrows`/`displayArrows`: Shows the left and right scroll buttons at all times, instead of hiding each one when the carousel can't scroll further in that direction. The buttons stay hidden on small screens.
|
|
145
145
|
* - `scrolldistance`/`scrollDistance`: Sets how many pixels the carousel scrolls when someone selects the left or right button.
|
|
146
146
|
* - `label`: Deprecated: Use the `ariaLabel` slot instead.
|
|
147
147
|
* Sets the text that screen readers announce as the carousel's name.
|
|
@@ -158,9 +158,9 @@ export type CustomElements = {
|
|
|
158
158
|
* Areas where markup can be added to the component.
|
|
159
159
|
*
|
|
160
160
|
* - `(default)`: The elements to scroll through, such as `auro-pane` elements or images.
|
|
161
|
-
* - `ariaLabel`: Text that screen readers announce
|
|
162
|
-
* - `ariaLabel.scroll.
|
|
163
|
-
* - `ariaLabel
|
|
161
|
+
* - `ariaLabel.scroll.left`: Text that screen readers announce for the left scroll button, for example "Show earlier dates". Defaults to "Scroll left".
|
|
162
|
+
* - `ariaLabel.scroll.right`: Text that screen readers announce for the right scroll button, for example "Show later dates". Defaults to "Scroll right".
|
|
163
|
+
* - `ariaLabel`: Text that screen readers announce as the carousel's name, for example "Flight date options". Required unless you set the deprecated `label` attribute, and takes priority over it when both are set.
|
|
164
164
|
*
|
|
165
165
|
* ## Methods
|
|
166
166
|
*
|
|
@@ -195,7 +195,7 @@ export type CustomElementsSolidJs = {
|
|
|
195
195
|
* Displays a group of elements, such as flight date options or images, in a horizontally scrollable container with buttons to scroll left and right.
|
|
196
196
|
*
|
|
197
197
|
* **Key capabilities:**
|
|
198
|
-
* - **Scroll buttons**: Shows left and right buttons on
|
|
198
|
+
* - **Scroll buttons**: Shows left and right buttons on screens at least 576 pixels wide when the carousel can scroll that way, or at all times when you add `displayArrows`.
|
|
199
199
|
* - **Centered selection**: Scrolls the first element with the `selected` attribute to the center when you add `centerSelected`.
|
|
200
200
|
* - **Custom scroll distance**: Sets how far each button press scrolls, in pixels, with `scrollDistance`.
|
|
201
201
|
* - **Accessible names**: Names the carousel and its scroll buttons through the `ariaLabel`, `ariaLabel.scroll.left`, and `ariaLabel.scroll.right` slots.
|
|
@@ -205,7 +205,7 @@ export type CustomElementsSolidJs = {
|
|
|
205
205
|
* Component attributes and properties that can be applied to the element or by using JavaScript.
|
|
206
206
|
*
|
|
207
207
|
* - `centerselected`/`undefined`: Centers the carousel on the first element that has the `selected` attribute when the carousel first renders.
|
|
208
|
-
* - `displayarrows`/`displayArrows`: Shows the left and right scroll buttons at all times, instead of
|
|
208
|
+
* - `displayarrows`/`displayArrows`: Shows the left and right scroll buttons at all times, instead of hiding each one when the carousel can't scroll further in that direction. The buttons stay hidden on small screens.
|
|
209
209
|
* - `scrolldistance`/`scrollDistance`: Sets how many pixels the carousel scrolls when someone selects the left or right button.
|
|
210
210
|
* - `label`: Deprecated: Use the `ariaLabel` slot instead.
|
|
211
211
|
* Sets the text that screen readers announce as the carousel's name.
|
|
@@ -222,9 +222,9 @@ export type CustomElementsSolidJs = {
|
|
|
222
222
|
* Areas where markup can be added to the component.
|
|
223
223
|
*
|
|
224
224
|
* - `(default)`: The elements to scroll through, such as `auro-pane` elements or images.
|
|
225
|
-
* - `ariaLabel`: Text that screen readers announce
|
|
226
|
-
* - `ariaLabel.scroll.
|
|
227
|
-
* - `ariaLabel
|
|
225
|
+
* - `ariaLabel.scroll.left`: Text that screen readers announce for the left scroll button, for example "Show earlier dates". Defaults to "Scroll left".
|
|
226
|
+
* - `ariaLabel.scroll.right`: Text that screen readers announce for the right scroll button, for example "Show later dates". Defaults to "Scroll right".
|
|
227
|
+
* - `ariaLabel`: Text that screen readers announce as the carousel's name, for example "Flight date options". Required unless you set the deprecated `label` attribute, and takes priority over it when both are set.
|
|
228
228
|
*
|
|
229
229
|
* ## Methods
|
|
230
230
|
*
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{A as AuroCarousel}from"./auro-carousel-
|
|
1
|
+
export{A as AuroCarousel}from"./auro-carousel-OBRWwlpL.js";import"lit";import"lit/static-html.js";import"lit/directives/class-map.js";import"lit/directives/if-defined.js";
|
package/dist/registered.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{A as i}from"./auro-carousel-
|
|
1
|
+
import{A as i}from"./auro-carousel-OBRWwlpL.js";import"lit";import"lit/static-html.js";import"lit/directives/class-map.js";import"lit/directives/if-defined.js";i.register();
|
package/package.json
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
"================================================================================"
|
|
8
8
|
],
|
|
9
9
|
"name": "@aurodesignsystem-dev/auro-carousel",
|
|
10
|
-
"version": "0.0.0-pr142.
|
|
10
|
+
"version": "0.0.0-pr142.3",
|
|
11
11
|
"description": "auro-carousel HTML custom element",
|
|
12
12
|
"repository": {
|
|
13
13
|
"type": "git",
|