@aurodesignsystem-dev/auro-carousel 0.0.0-pr142.0 → 0.0.0-pr142.2

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 CHANGED
@@ -13,8 +13,8 @@ The following sections are editable by making changes to the following files:
13
13
  |------------------------|---------------------------------------------------|-------------------------------------|
14
14
  | Description | Description of the component | `./docs/partials/description.md` |
15
15
  | Use cases | Examples for when to use this component | `./docs/partials/useCases.md` |
16
- | Additional Information | For use to add any component specific information | `./docs/partials/readmeAddlInfo.md` |
17
- | Component Example Code | HTML sample code of the components use | `./apiExamples/basic.html` |
16
+ | Additional information | For use to add any component specific information | `./docs/partials/readmeAddlInfo.md` |
17
+ | Component example code | HTML sample code of the components use | `./apiExamples/basic.html` |
18
18
  -->
19
19
 
20
20
  # Carousel
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 medium and larger screens when there's more content to scroll to. Add `displayArrows` to always show them.
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
- ### Properties & Attributes
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 only when there's more content to scroll to 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. |
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,20 +38,20 @@ 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 | Text that screen readers announce as the carousel's name, for example "Flight date options". Takes priority over the `label` attribute. |
45
- | ariaLabel.scroll.left | Text that screen readers announce for the left scroll button, for example "Show earlier dates". Defaults to "Scroll Left". |
46
- | ariaLabel.scroll.right | Text that screen readers announce for the right scroll button, for example "Show later dates". Defaults to "Scroll Right". |
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
- ### CSS Shadow Parts
48
+ ### CSS shadow parts
49
49
 
50
50
  | Name | Description |
51
51
  | ------- | ------------------------------------------------------------------------------ |
52
52
  | wrapper | The scrollable `<div>` that wraps the scroll buttons and the slotted elements. |
53
53
 
54
- ### CSS Custom Properties
54
+ ### CSS custom properties
55
55
 
56
56
  | Name | Description |
57
57
  | ------------------------------------- | -------------------------------------------------------------------- |
@@ -295,7 +295,7 @@ Use the `scrollDistance` attribute to set how many pixels the carousel scrolls w
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 the element when there's enough content on both sides of it.
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