@aurodesignsystem-dev/auro-carousel 0.0.0-pr140.0 → 0.0.0-pr142.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 +79 -89
- package/demo/api.md +368 -367
- package/demo/api.min.js +717 -2
- package/demo/index.md +42 -42
- package/demo/index.min.js +716 -1
- package/demo/readme.md +164 -0
- package/dist/auro-carousel-acFfUyJs.js +144 -0
- package/dist/index.d.ts +207 -83
- package/dist/index.js +1 -1
- package/dist/registered.js +1 -1
- package/package.json +9 -9
- package/demo/auro-carousel.min.js +0 -677
- package/dist/auro-carousel-D1ntQpGY.js +0 -121
package/README.md
CHANGED
|
@@ -12,30 +12,30 @@ 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
|
# Carousel
|
|
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-carousel>` is
|
|
24
|
+
`<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.
|
|
25
25
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
26
26
|
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./docs/partials/readmeAddlInfo.md) -->
|
|
27
27
|
<!-- The below content is automatically added from ./docs/partials/readmeAddlInfo.md -->
|
|
28
28
|
<!-- AURO-GENERATED-CONTENT This file is to be used for any additional content that should be included in the README.md which is specific to this component. -->
|
|
29
29
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
30
30
|
|
|
31
|
-
## Use
|
|
31
|
+
## Use cases
|
|
32
32
|
|
|
33
33
|
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./docs/partials/useCases.md) -->
|
|
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
|
|
38
|
-
* Scroll through
|
|
37
|
+
* Scroll through flight date options or shoulder dates
|
|
38
|
+
* Scroll through images
|
|
39
39
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
40
40
|
|
|
41
41
|
## Install
|
|
@@ -46,129 +46,119 @@ The `<auro-carousel>` element should be used in situations where users may:
|
|
|
46
46
|
[](https://www.apache.org/licenses/LICENSE-2.0)
|
|
47
47
|

|
|
48
48
|
|
|
49
|
-
|
|
50
|
-
$ npm i @aurodesignsystem/auro-carousel
|
|
51
|
-
```
|
|
49
|
+
<pre class="language-shell"><code class="language-shell">$ npm i @aurodesignsystem/auro-carousel</code></pre>
|
|
52
50
|
|
|
53
51
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
54
52
|
|
|
55
|
-
### Define
|
|
53
|
+
### Define dependency in project
|
|
56
54
|
|
|
57
55
|
<!-- AURO-GENERATED-CONTENT:START (REMOTE:url=https://raw.githubusercontent.com/AlaskaAirlines/auro-templates/main/templates/default/partials/usage/componentImportDescription.md) -->
|
|
58
|
-
|
|
56
|
+
Import the component in each project that uses `<auro-carousel>`.
|
|
59
57
|
|
|
60
58
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
61
59
|
<!-- AURO-GENERATED-CONTENT:START (REMOTE:url=https://raw.githubusercontent.com/AlaskaAirlines/auro-templates/main/templates/default/partials/usage/componentImport.md) -->
|
|
62
60
|
|
|
63
|
-
|
|
64
|
-
import "@aurodesignsystem/auro-carousel";
|
|
65
|
-
```
|
|
61
|
+
<pre class="language-js"><code class="language-js">import "@aurodesignsystem/auro-carousel";</code></pre>
|
|
66
62
|
|
|
67
63
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
68
64
|
|
|
69
65
|
### Use CDN
|
|
70
66
|
|
|
71
67
|
<!-- AURO-GENERATED-CONTENT:START (REMOTE:url=https://raw.githubusercontent.com/AlaskaAirlines/auro-templates/main/templates/default/partials/usage/bundleInstallDescription.md) -->
|
|
72
|
-
|
|
68
|
+
If your project can't process JS assets, use the pre-processed assets. Legacy browsers, such as IE11, aren't supported.
|
|
73
69
|
|
|
74
|
-
|
|
75
|
-
<script type="module" src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-carousel@latest/+esm"></script>
|
|
76
|
-
```
|
|
70
|
+
<pre class="language-html"><code class="language-html"><script type="module" src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-carousel@latest/+esm"></script></code></pre>
|
|
77
71
|
|
|
78
72
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
79
73
|
|
|
80
|
-
## Basic
|
|
74
|
+
## Basic example
|
|
81
75
|
|
|
82
76
|
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./apiExamples/basic.html) -->
|
|
83
77
|
<!-- The below code snippet is automatically added from ./apiExamples/basic.html -->
|
|
84
78
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
```
|
|
79
|
+
<pre class="language-html"><code class="language-html"><auro-carousel>
|
|
80
|
+
<span slot="ariaLabel">Flight date options</span>
|
|
81
|
+
<auro-pane date="2020-10-10" price="$435"></auro-pane>
|
|
82
|
+
<auro-pane date="2020-10-11" price="$435"></auro-pane>
|
|
83
|
+
<auro-pane date="2020-10-12" price="$435"></auro-pane>
|
|
84
|
+
<auro-pane date="2020-10-13" price="$435"></auro-pane>
|
|
85
|
+
<auro-pane date="2020-10-14" price="$435"></auro-pane>
|
|
86
|
+
<auro-pane date="2020-10-15" price="$435"></auro-pane>
|
|
87
|
+
<auro-pane date="2020-10-16" price="$435"></auro-pane>
|
|
88
|
+
<auro-pane date="2020-10-17" price="$435"></auro-pane>
|
|
89
|
+
<auro-pane date="2020-10-18" selected price="$435"></auro-pane>
|
|
90
|
+
<auro-pane date="2020-10-19" price="$435"></auro-pane>
|
|
91
|
+
<auro-pane date="2020-10-20" price="$435"></auro-pane>
|
|
92
|
+
<auro-pane date="2020-10-21" price="$435"></auro-pane>
|
|
93
|
+
<auro-pane date="2020-10-22" price="$435"></auro-pane>
|
|
94
|
+
<auro-pane date="2020-10-23" price="$435"></auro-pane>
|
|
95
|
+
</auro-carousel></code></pre>
|
|
103
96
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
104
97
|
|
|
105
|
-
## Custom
|
|
98
|
+
## Custom component registration for version management
|
|
106
99
|
|
|
107
|
-
|
|
100
|
+
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.
|
|
108
101
|
The class defines the component’s behavior, while the custom element registers it under a specific name so it can be used in HTML.
|
|
109
102
|
|
|
110
|
-
|
|
103
|
+
Installing the component as described in the Install section imports the class and registers the component globally for you.
|
|
111
104
|
|
|
112
|
-
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),
|
|
105
|
+
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.
|
|
113
106
|
|
|
114
|
-
|
|
107
|
+
To do this, import only the component class and call the `register(name)` method with a unique name:
|
|
115
108
|
|
|
116
109
|
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./docs/partials/customRegistration.md) -->
|
|
117
110
|
<!-- The below content is automatically added from ./docs/partials/customRegistration.md -->
|
|
118
111
|
|
|
119
|
-
|
|
120
|
-
// Import the class only
|
|
112
|
+
<pre class="language-js"><code class="language-js">// Import the class only
|
|
121
113
|
import { AuroCarousel } from '@aurodesignsystem/auro-carousel/class';
|
|
114
|
+
// Register with a custom name if desired
|
|
115
|
+
AuroCarousel.register('custom-carousel');</code></pre>
|
|
122
116
|
|
|
123
|
-
|
|
124
|
-
AuroCarousel.register('custom-carousel');
|
|
125
|
-
```
|
|
126
|
-
|
|
127
|
-
This will create a new custom element `<custom-carousel>` that behaves exactly like `<auro-carousel>`, allowing both to coexist on the same page without interfering with each other.
|
|
117
|
+
This creates a new custom element `<custom-carousel>` that behaves like `<auro-carousel>`, so both can be on the same page without interfering with each other.
|
|
128
118
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
129
119
|
<div class="exampleWrapper exampleWrapper--flex">
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
120
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./apiExamples/custom.html) -->
|
|
121
|
+
<!-- The below content is automatically added from ./apiExamples/custom.html -->
|
|
122
|
+
<custom-carousel scrollDistance="420" id="demo1">
|
|
123
|
+
<span slot="ariaLabel">Flight date options</span>
|
|
124
|
+
<auro-pane date="2020-10-10" price="$435"></auro-pane>
|
|
125
|
+
<auro-pane date="2020-10-11" price="$435"></auro-pane>
|
|
126
|
+
<auro-pane date="2020-10-12" price="$435"></auro-pane>
|
|
127
|
+
<auro-pane date="2020-10-13" selected price="$435"></auro-pane>
|
|
128
|
+
<auro-pane date="2020-10-14" price="$435" disabled></auro-pane>
|
|
129
|
+
<auro-pane date="2020-10-15" price="$435"></auro-pane>
|
|
130
|
+
<auro-pane date="2020-10-16" price="$435"></auro-pane>
|
|
131
|
+
<auro-pane date="2020-10-17" price="$435"></auro-pane>
|
|
132
|
+
<auro-pane date="2020-10-18" price="$435"></auro-pane>
|
|
133
|
+
<auro-pane date="2020-10-19" price="$435"></auro-pane>
|
|
134
|
+
<auro-pane date="2020-10-20" price="$435"></auro-pane>
|
|
135
|
+
<auro-pane date="2020-10-21" price="$435"></auro-pane>
|
|
136
|
+
<auro-pane date="2020-10-22" price="$435"></auro-pane>
|
|
137
|
+
<auro-pane date="2020-10-23" price="$435"></auro-pane>
|
|
138
|
+
</custom-carousel>
|
|
139
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
149
140
|
</div>
|
|
150
141
|
<auro-accordion alignRight>
|
|
151
|
-
|
|
142
|
+
<span slot="trigger">See code</span>
|
|
152
143
|
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./apiExamples/custom.html) -->
|
|
153
144
|
<!-- The below code snippet is automatically added from ./apiExamples/custom.html -->
|
|
154
145
|
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
```
|
|
146
|
+
<pre class="language-html"><code class="language-html"><custom-carousel scrollDistance="420" id="demo1">
|
|
147
|
+
<span slot="ariaLabel">Flight date options</span>
|
|
148
|
+
<auro-pane date="2020-10-10" price="$435"></auro-pane>
|
|
149
|
+
<auro-pane date="2020-10-11" price="$435"></auro-pane>
|
|
150
|
+
<auro-pane date="2020-10-12" price="$435"></auro-pane>
|
|
151
|
+
<auro-pane date="2020-10-13" selected price="$435"></auro-pane>
|
|
152
|
+
<auro-pane date="2020-10-14" price="$435" disabled></auro-pane>
|
|
153
|
+
<auro-pane date="2020-10-15" price="$435"></auro-pane>
|
|
154
|
+
<auro-pane date="2020-10-16" price="$435"></auro-pane>
|
|
155
|
+
<auro-pane date="2020-10-17" price="$435"></auro-pane>
|
|
156
|
+
<auro-pane date="2020-10-18" price="$435"></auro-pane>
|
|
157
|
+
<auro-pane date="2020-10-19" price="$435"></auro-pane>
|
|
158
|
+
<auro-pane date="2020-10-20" price="$435"></auro-pane>
|
|
159
|
+
<auro-pane date="2020-10-21" price="$435"></auro-pane>
|
|
160
|
+
<auro-pane date="2020-10-22" price="$435"></auro-pane>
|
|
161
|
+
<auro-pane date="2020-10-23" price="$435"></auro-pane>
|
|
162
|
+
</custom-carousel></code></pre>
|
|
173
163
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
174
164
|
</auro-accordion>
|