@aurodesignsystem-dev/auro-slideshow 0.0.0-pr79.1 → 0.0.0-pr80.1
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 +35 -35
- package/custom-elements.json +68 -50
- package/demo/api.md +104 -91
- package/demo/api.min.js +117 -67
- package/demo/index.md +15 -15
- package/demo/index.min.js +117 -67
- package/demo/readme.md +35 -35
- package/dist/auro-slideshow-CtRX3auP.js +156 -0
- package/dist/index.d.ts +128 -94
- package/dist/index.js +1 -1
- package/dist/registered.js +1 -1
- package/package.json +11 -11
- package/dist/auro-slideshow-Di9AtYIy.js +0 -133
package/demo/readme.md
CHANGED
|
@@ -12,46 +12,46 @@ The following sections are editable by making changes to the following files:
|
|
|
12
12
|
| SECTION | DESCRIPTION | FILE LOCATION |
|
|
13
13
|
|------------------------|---------------------------------------------------|-------------------------------------|
|
|
14
14
|
| Description | Description of the component | `./docs/partials/description.md` |
|
|
15
|
-
| Use
|
|
16
|
-
| Additional
|
|
17
|
-
| Component
|
|
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` |
|
|
18
18
|
-->
|
|
19
19
|
|
|
20
20
|
# Slideshow
|
|
21
21
|
|
|
22
22
|
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./docs/partials/description.md) -->
|
|
23
23
|
<!-- The below content is automatically added from ./docs/partials/description.md -->
|
|
24
|
-
`<auro-slideshow>` is an [HTML custom element](https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_custom_elements)
|
|
24
|
+
`<auro-slideshow>` is an [HTML custom element](https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_custom_elements) that displays a sequence of slides. Slides can advance on their own or be controlled by the user.
|
|
25
25
|
|
|
26
|
-
The `<auro-slideshow>` element is a wrapper
|
|
26
|
+
The `<auro-slideshow>` element is a wrapper. Slides are slotted content and must be direct children of the element. Slides fill the width of the slideshow by default. To show more than one slide at a time, set a `max-width` on each slide.
|
|
27
27
|
|
|
28
|
-
|
|
28
|
+
No features are on by default. Turn on a feature by adding its attribute to the element.
|
|
29
29
|
|
|
30
|
-
**Note:** If all the slides
|
|
30
|
+
**Note:** If all the slides fit on the screen at once, the slideshow doesn't activate.
|
|
31
31
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
32
32
|
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./docs/partials/readmeAddlInfo.md) -->
|
|
33
33
|
<!-- The below content is automatically added from ./docs/partials/readmeAddlInfo.md -->
|
|
34
34
|
|
|
35
|
-
###
|
|
35
|
+
### Properties usage
|
|
36
36
|
|
|
37
|
-
`autoplay` and `autoScroll`
|
|
37
|
+
`autoplay` and `autoScroll` can't be used together. If you set both, the slideshow turns off `autoScroll` and logs a warning in the console.
|
|
38
38
|
|
|
39
|
-
|
|
39
|
+
Use `navigation`, `pagination`, or both, so users have a clear way to move through the slides manually.
|
|
40
40
|
|
|
41
41
|
### Mobile behavior
|
|
42
42
|
|
|
43
|
-
On
|
|
43
|
+
On touch devices, where the primary pointer is coarse, `autoScroll` and `navigation` are turned off. Users can swipe left or right to move through the slides.
|
|
44
44
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
45
45
|
|
|
46
|
-
## Use
|
|
46
|
+
## Use cases
|
|
47
47
|
|
|
48
48
|
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./docs/partials/useCases.md) -->
|
|
49
49
|
<!-- The below content is automatically added from ./docs/partials/useCases.md -->
|
|
50
|
-
|
|
50
|
+
Use `<auro-slideshow>` when you need to:
|
|
51
51
|
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
*
|
|
52
|
+
* Show a series of images or content in a space-saving way
|
|
53
|
+
* Advance slides automatically or scroll them continuously
|
|
54
|
+
* Show which slide is current
|
|
55
55
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
56
56
|
|
|
57
57
|
## Install
|
|
@@ -66,10 +66,10 @@ The `<auro-slideshow>` element should be used in situations where:
|
|
|
66
66
|
|
|
67
67
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
68
68
|
|
|
69
|
-
### Define
|
|
69
|
+
### Define dependency in project
|
|
70
70
|
|
|
71
71
|
<!-- AURO-GENERATED-CONTENT:START (REMOTE:url=https://raw.githubusercontent.com/AlaskaAirlines/auro-templates/main/templates/default/partials/usage/componentImportDescription.md) -->
|
|
72
|
-
|
|
72
|
+
Import the component in each project that uses `<auro-slideshow>`.
|
|
73
73
|
|
|
74
74
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
75
75
|
<!-- AURO-GENERATED-CONTENT:START (REMOTE:url=https://raw.githubusercontent.com/AlaskaAirlines/auro-templates/main/templates/default/partials/usage/componentImport.md) -->
|
|
@@ -81,13 +81,13 @@ Defining the dependency within each project that is using the `<auro-slideshow>`
|
|
|
81
81
|
### Use CDN
|
|
82
82
|
|
|
83
83
|
<!-- AURO-GENERATED-CONTENT:START (REMOTE:url=https://raw.githubusercontent.com/AlaskaAirlines/auro-templates/main/templates/default/partials/usage/bundleInstallDescription.md) -->
|
|
84
|
-
|
|
84
|
+
If your project can't process JS assets, use the pre-processed assets. Legacy browsers, such as IE11, aren't supported.
|
|
85
85
|
|
|
86
|
-
<pre class="language-html"><code class="language-html"><script type="module" src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-slideshow@latest/+esm"></script></code></pre>
|
|
86
|
+
<pre class="language-html"><code class="language-html"><script type="module" src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-slideshow@latest/+esm"></script></code></pre>
|
|
87
87
|
|
|
88
88
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
89
89
|
|
|
90
|
-
## Basic
|
|
90
|
+
## Basic example
|
|
91
91
|
|
|
92
92
|
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./apiExamples/basic.html) -->
|
|
93
93
|
<!-- The below code snippet is automatically added from ./apiExamples/basic.html -->
|
|
@@ -108,19 +108,19 @@ In cases where the project is not able to process JS assets, there are pre-proce
|
|
|
108
108
|
<div style="height: 480px">
|
|
109
109
|
<img style="object-fit: cover;" src="https://picsum.photos/1000/480?random=5" alt="Random image 5">
|
|
110
110
|
</div>
|
|
111
|
-
</auro-slideshow></code></pre>
|
|
111
|
+
</auro-slideshow></code></pre>
|
|
112
112
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
113
113
|
|
|
114
|
-
## Custom
|
|
114
|
+
## Custom component registration for version management
|
|
115
115
|
|
|
116
|
-
|
|
116
|
+
Every Auro component has two key parts: the <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes">class</a> and the custom element definition.
|
|
117
117
|
The class defines the component’s behavior, while the custom element registers it under a specific name so it can be used in HTML.
|
|
118
118
|
|
|
119
|
-
|
|
119
|
+
Installing the component as described in the Install section imports the class and registers the component globally for you.
|
|
120
120
|
|
|
121
|
-
However, if you need to load multiple versions of the same component on a single page (for example, when two projects depend on different versions),
|
|
121
|
+
However, if you need to load multiple versions of the same component on a single page (for example, when two projects depend on different versions), register the class manually under a custom element name to avoid conflicts.
|
|
122
122
|
|
|
123
|
-
|
|
123
|
+
To do this, import only the component class and call the `register(name)` method with a unique name:
|
|
124
124
|
|
|
125
125
|
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./docs/partials/customRegistration.md) -->
|
|
126
126
|
<!-- The below content is automatically added from ./docs/partials/customRegistration.md -->
|
|
@@ -130,19 +130,19 @@ import { AuroSlideshow } from '@aurodesignsystem/auro-slideshow/class';
|
|
|
130
130
|
// Register with a custom name if desired
|
|
131
131
|
AuroSlideshow.register('custom-slideshow');</code></pre>
|
|
132
132
|
|
|
133
|
-
This
|
|
133
|
+
This registers a new custom element, `<custom-slideshow>`, that behaves like `<auro-slideshow>`. Both can be on the same page without interfering with each other.
|
|
134
134
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
135
135
|
<div class="exampleWrapper exampleWrapper--flex">
|
|
136
136
|
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./apiExamples/custom.html) -->
|
|
137
137
|
<!-- The below content is automatically added from ./apiExamples/custom.html -->
|
|
138
138
|
<custom-slideshow navigation>
|
|
139
|
-
<div style="width: 400px; border: 2px solid #000; display: flex; justify-content: center;">
|
|
139
|
+
<div style="max-width: 400px; border: 2px solid #000; display: flex; justify-content: center;">
|
|
140
140
|
<p>Slide 1</p>
|
|
141
141
|
</div>
|
|
142
|
-
<div style="width: 400px; border: 2px solid #000; display: flex; justify-content: center;">
|
|
142
|
+
<div style="max-width: 400px; border: 2px solid #000; display: flex; justify-content: center;">
|
|
143
143
|
<p>Slide 2</p>
|
|
144
144
|
</div>
|
|
145
|
-
<div style="width: 400px; border: 2px solid #000; display: flex; justify-content: center;">
|
|
145
|
+
<div style="max-width: 400px; border: 2px solid #000; display: flex; justify-content: center;">
|
|
146
146
|
<p>Slide 3</p>
|
|
147
147
|
</div>
|
|
148
148
|
</custom-slideshow>
|
|
@@ -154,15 +154,15 @@ This will create a new custom element `<custom-slideshow>` that behaves exactly
|
|
|
154
154
|
<!-- The below code snippet is automatically added from ./apiExamples/custom.html -->
|
|
155
155
|
|
|
156
156
|
<pre class="language-html"><code class="language-html"><custom-slideshow navigation>
|
|
157
|
-
<div style="width: 400px; border: 2px solid #000; display: flex; justify-content: center;">
|
|
157
|
+
<div style="max-width: 400px; border: 2px solid #000; display: flex; justify-content: center;">
|
|
158
158
|
<p>Slide 1</p>
|
|
159
159
|
</div>
|
|
160
|
-
<div style="width: 400px; border: 2px solid #000; display: flex; justify-content: center;">
|
|
160
|
+
<div style="max-width: 400px; border: 2px solid #000; display: flex; justify-content: center;">
|
|
161
161
|
<p>Slide 2</p>
|
|
162
162
|
</div>
|
|
163
|
-
<div style="width: 400px; border: 2px solid #000; display: flex; justify-content: center;">
|
|
163
|
+
<div style="max-width: 400px; border: 2px solid #000; display: flex; justify-content: center;">
|
|
164
164
|
<p>Slide 3</p>
|
|
165
165
|
</div>
|
|
166
|
-
</custom-slideshow></code></pre>
|
|
166
|
+
</custom-slideshow></code></pre>
|
|
167
167
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
168
168
|
</auro-accordion>
|