@aurodesignsystem-dev/auro-slideshow 0.0.0-pr80.0 → 0.0.0-pr80.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 +35 -35
- package/custom-elements.json +69 -52
- package/demo/api.md +104 -91
- package/demo/api.min.js +119 -69
- package/demo/index.md +15 -15
- package/demo/index.min.js +119 -69
- package/demo/readme.md +22 -22
- package/dist/auro-slideshow-1sJeRJNM.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
|
@@ -21,37 +21,37 @@ The following sections are editable by making changes to the following files:
|
|
|
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
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
|
|
@@ -83,7 +83,7 @@ Import the component in each project that uses `<auro-slideshow>`.
|
|
|
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
|
|
|
@@ -108,7 +108,7 @@ If your project can't process JS assets, use the pre-processed assets. Legacy br
|
|
|
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
114
|
## Custom component registration for version management
|
|
@@ -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>
|