@aurodesignsystem-dev/auro-slideshow 0.0.0-pr66.0 → 0.0.0-pr68.0

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
@@ -23,11 +23,11 @@ The following sections are editable by making changes to the following files:
23
23
  <!-- The below content is automatically added from ./docs/partials/description.md -->
24
24
  `<auro-slideshow>` is an [HTML custom element](https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_custom_elements) for the purpose of displaying a sequence of slides, which can automatically advance through the content or be manually controlled by the user.
25
25
 
26
- The `<auro-slideshow>` component is a wrapper element. All slides are slotted content and must be direct children of the component. Slides must have assigned `width` and `height` properties to display properly.
26
+ The `<auro-slideshow>` element is a wrapper element. All slides are slotted content and must be direct children of the element. Slides must have assigned `width` and `height` properties to display properly.
27
27
 
28
- `<auro-slideshow>` is a fully customizable component and does not come with any features turned on by default. The features of `<auro-slideshow>` are turned on by including the proper attributes on the element.
28
+ `<auro-slideshow>` is a fully customizable element and does not come with any features turned on by default. The features of `<auro-slideshow>` are turned on by including the proper attributes on the element.
29
29
 
30
- **Note:** If all the slides can fit on the page at once, the slideshow will not activate.
30
+ **Note:** If all the slides can fit on the screen at once, the slideshow will not 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 -->
@@ -43,17 +43,21 @@ Both `navigation` and `pagination` can be used together, but at least one must b
43
43
  On mobile devices, `autoScroll` and `navigation` controls are automatically disabled. Users can navigate the slideshow by swiping left or right.
44
44
  <!-- AURO-GENERATED-CONTENT:END -->
45
45
 
46
- ## UI development browser support
46
+ ## Use Cases
47
47
 
48
- <!-- AURO-GENERATED-CONTENT:START (REMOTE:url=https://raw.githubusercontent.com/AlaskaAirlines/auro-templates/main/templates/default/partials/browserSupport.md) -->
49
- For the most up to date information on [UI development browser support](https://auro.alaskaair.com/support/browsersSupport)
48
+ <!-- AURO-GENERATED-CONTENT:START (FILE:src=./docs/partials/useCases.md) -->
49
+ <!-- The below content is automatically added from ./docs/partials/useCases.md -->
50
+ The `<auro-slideshow>` element should be used in situations where:
50
51
 
52
+ * A series of images or content needs to be displayed in a space-saving way
53
+ * Autoplaying or autoscrolling functionality is needed
54
+ * A current slide indicator is required
51
55
  <!-- AURO-GENERATED-CONTENT:END -->
52
56
 
53
57
  ## Install
54
58
 
55
59
  <!-- AURO-GENERATED-CONTENT:START (REMOTE:url=https://raw.githubusercontent.com/AlaskaAirlines/auro-templates/main/templates/default/partials/usage/componentInstall.md) -->
56
- [![Build Status](https://img.shields.io/github/actions/workflow/status/AlaskaAirlines/auro-slideshow/testPublish.yml?style=for-the-badge)](https://github.com/AlaskaAirlines/auro-slideshow/actions/workflows/testPublish.yml)
60
+ [![Build Status](https://img.shields.io/github/actions/workflow/status/AlaskaAirlines/auro-slideshow/release.yml?style=for-the-badge)](https://github.com/AlaskaAirlines/auro-slideshow/actions/workflows/release.yml)
57
61
  [![See it on NPM!](https://img.shields.io/npm/v/@aurodesignsystem/auro-slideshow?style=for-the-badge&color=orange)](https://www.npmjs.com/package/@aurodesignsystem/auro-slideshow)
58
62
  [![License](https://img.shields.io/npm/l/@aurodesignsystem/auro-slideshow?color=blue&style=for-the-badge)](https://www.apache.org/licenses/LICENSE-2.0)
59
63
  ![ESM supported](https://img.shields.io/badge/ESM-compatible-FFE900?style=for-the-badge)
@@ -64,17 +68,10 @@ $ npm i @aurodesignsystem/auro-slideshow
64
68
 
65
69
  <!-- AURO-GENERATED-CONTENT:END -->
66
70
 
67
- ### Design Token CSS Custom Property dependency
68
-
69
- <!-- AURO-GENERATED-CONTENT:START (REMOTE:url=https://raw.githubusercontent.com/AlaskaAirlines/auro-templates/main/templates/default/partials/development/designTokens.md) -->
70
- The use of any Auro custom element has a dependency on the [Auro Design Tokens](https://auro.alaskaair.com/getting-started/developers/design-tokens).
71
-
72
- <!-- AURO-GENERATED-CONTENT:END -->
73
-
74
- ### Define dependency in project component
71
+ ### Define Dependency in Project
75
72
 
76
73
  <!-- AURO-GENERATED-CONTENT:START (REMOTE:url=https://raw.githubusercontent.com/AlaskaAirlines/auro-templates/main/templates/default/partials/usage/componentImportDescription.md) -->
77
- Defining the component dependency within each component that is using the `<auro-slideshow>` component.
74
+ Defining the dependency within each project that is using the `<auro-slideshow>` component.
78
75
 
79
76
  <!-- AURO-GENERATED-CONTENT:END -->
80
77
  <!-- AURO-GENERATED-CONTENT:START (REMOTE:url=https://raw.githubusercontent.com/AlaskaAirlines/auro-templates/main/templates/default/partials/usage/componentImport.md) -->
@@ -84,32 +81,8 @@ import "@aurodesignsystem/auro-slideshow";
84
81
  ```
85
82
 
86
83
  <!-- AURO-GENERATED-CONTENT:END -->
87
- **Reference component in HTML**
88
- <!-- AURO-GENERATED-CONTENT:START (CODE:src=./apiExamples/basic.html) -->
89
- <!-- The below code snippet is automatically added from ./apiExamples/basic.html -->
90
84
 
91
- ```html
92
- <auro-slideshow>
93
- <div style="height: 480px">
94
- <img style="object-fit: cover;" src="https://picsum.photos/1000/480?random=1" alt="Random image 1">
95
- </div>
96
- <div style="height: 480px">
97
- <img style="object-fit: cover;" src="https://picsum.photos/1000/480?random=2" alt="Random image 2">
98
- </div>
99
- <div style="height: 480px">
100
- <img style="object-fit: cover;" src="https://picsum.photos/1000/480?random=3" alt="Random image 3">
101
- </div>
102
- <div style="height: 480px">
103
- <img style="object-fit: cover;" src="https://picsum.photos/1000/480?random=4" alt="Random image 4">
104
- </div>
105
- <div style="height: 480px">
106
- <img style="object-fit: cover;" src="https://picsum.photos/1000/480?random=5" alt="Random image 5">
107
- </div>
108
- </auro-slideshow>
109
- ```
110
- <!-- AURO-GENERATED-CONTENT:END -->
111
-
112
- ## Use CDN
85
+ ### Use CDN
113
86
 
114
87
  <!-- AURO-GENERATED-CONTENT:START (REMOTE:url=https://raw.githubusercontent.com/AlaskaAirlines/auro-templates/main/templates/default/partials/usage/bundleInstallDescription.md) -->
115
88
  In cases where the project is not able to process JS assets, there are pre-processed assets available for use. Legacy browsers such as IE11 are no longer supported.
@@ -120,20 +93,7 @@ In cases where the project is not able to process JS assets, there are pre-proce
120
93
 
121
94
  <!-- AURO-GENERATED-CONTENT:END -->
122
95
 
123
- ## auro-slideshow use cases
124
-
125
- <!-- AURO-GENERATED-CONTENT:START (FILE:src=./docs/partials/useCases.md) -->
126
- <!-- The below content is automatically added from ./docs/partials/useCases.md -->
127
- The `<auro-slideshow>` element should be used in situations where:
128
-
129
- * A series of images or content needs to be displayed in a space-saving way
130
- * Autoplaying or autoscrolling functionality is needed
131
- * A current slide indicator is required
132
- <!-- AURO-GENERATED-CONTENT:END -->
133
-
134
- ## API Code Examples
135
-
136
- ### Default auro-slideshow
96
+ ## Basic Example
137
97
 
138
98
  <!-- AURO-GENERATED-CONTENT:START (CODE:src=./apiExamples/basic.html) -->
139
99
  <!-- The below code snippet is automatically added from ./apiExamples/basic.html -->
@@ -159,31 +119,63 @@ The `<auro-slideshow>` element should be used in situations where:
159
119
  ```
160
120
  <!-- AURO-GENERATED-CONTENT:END -->
161
121
 
162
- ## Development
122
+ ## Custom Component Registration for Version Management
163
123
 
164
- <!-- AURO-GENERATED-CONTENT:START (REMOTE:url=https://raw.githubusercontent.com/AlaskaAirlines/auro-templates/main/templates/default/partials/development/developmentDescription.md) -->
165
- In order to develop against this project, if you are not part of the core team, you will be required to fork the project prior to submitting a pull request.
124
+ There are two key parts to every Auro component: the <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes">class</a> and the custom element definition.
125
+ The class defines the component’s behavior, while the custom element registers it under a specific name so it can be used in HTML.
166
126
 
167
- Please be sure to review the [contribution guidelines](https://auro.alaskaair.com/contributing) for this project. Please make sure to **pay special attention** to the **conventional commits** section of the document.
127
+ When you install the component as described on the `Install` page, the class is imported automatically, and the component is registered globally for you.
168
128
 
169
- <!-- AURO-GENERATED-CONTENT:END -->
170
-
171
- ### Start development environment
129
+ 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), you can manually register the class under a custom element name to avoid conflicts.
172
130
 
173
- <!-- AURO-GENERATED-CONTENT:START (REMOTE:url=https://raw.githubusercontent.com/AlaskaAirlines/auro-templates/main/templates/default/partials/development/localhost.md) -->
174
- Once the project has been cloned to your local resource and you have installed all the dependencies you will need to open a shell session to run the **dev server**.
131
+ You can do this by importing only the component class and using the `register(name)` method with a unique name:
175
132
 
176
- ```shell
177
- $ npm run dev
133
+ <!-- AURO-GENERATED-CONTENT:START (FILE:src=./docs/partials/customRegistration.md) -->
134
+ <!-- The below content is automatically added from ./docs/partials/customRegistration.md -->
135
+
136
+ ```js
137
+ // Import the class only
138
+ import { AuroSlideshow } from '@aurodesignsystem/auro-slideshow/class';
139
+
140
+ // Register with a custom name if desired
141
+ AuroSlideshow.register('custom-slideshow');
178
142
  ```
179
143
 
180
- Open [localhost:8000](http://localhost:8000/)
181
-
144
+ This will create a new custom element `<custom-slideshow>` that behaves exactly like `<auro-slideshow>`, allowing both to coexist on the same page without interfering with each other.
182
145
  <!-- AURO-GENERATED-CONTENT:END -->
146
+ <div class="exampleWrapper exampleWrapper--flex">
147
+ <!-- AURO-GENERATED-CONTENT:START (FILE:src=./apiExamples/custom.html) -->
148
+ <!-- The below content is automatically added from ./apiExamples/custom.html -->
149
+ <custom-slideshow navigation>
150
+ <div style="width: 400px; border: 2px solid #000; display: flex; justify-content: center;">
151
+ <p>Slide 1</p>
152
+ </div>
153
+ <div style="width: 400px; border: 2px solid #000; display: flex; justify-content: center;">
154
+ <p>Slide 2</p>
155
+ </div>
156
+ <div style="width: 400px; border: 2px solid #000; display: flex; justify-content: center;">
157
+ <p>Slide 3</p>
158
+ </div>
159
+ </custom-slideshow>
160
+ <!-- AURO-GENERATED-CONTENT:END -->
161
+ </div>
162
+ <auro-accordion alignRight>
163
+ <span slot="trigger">See code</span>
164
+ <!-- AURO-GENERATED-CONTENT:START (CODE:src=./apiExamples/custom.html) -->
165
+ <!-- The below code snippet is automatically added from ./apiExamples/custom.html -->
183
166
 
184
- ### Testing
185
-
186
- <!-- AURO-GENERATED-CONTENT:START (REMOTE:url=https://raw.githubusercontent.com/AlaskaAirlines/auro-templates/main/templates/default/partials/development/testing.md) -->
187
- Automated tests are required for every Auro component. See `.\test\auro-slideshow.test.js` for the tests for this component. Run `npm run test` to run the tests and check code coverage. Tests must pass and meet a certain coverage threshold to commit. See [the testing documentation](https://auro.alaskaair.com/support/tests) for more details.
188
-
189
- <!-- AURO-GENERATED-CONTENT:END -->
167
+ ```html
168
+ <custom-slideshow navigation>
169
+ <div style="width: 400px; border: 2px solid #000; display: flex; justify-content: center;">
170
+ <p>Slide 1</p>
171
+ </div>
172
+ <div style="width: 400px; border: 2px solid #000; display: flex; justify-content: center;">
173
+ <p>Slide 2</p>
174
+ </div>
175
+ <div style="width: 400px; border: 2px solid #000; display: flex; justify-content: center;">
176
+ <p>Slide 3</p>
177
+ </div>
178
+ </custom-slideshow>
179
+ ```
180
+ <!-- AURO-GENERATED-CONTENT:END -->
181
+ </auro-accordion>
package/demo/api.html CHANGED
@@ -51,6 +51,6 @@
51
51
  <script type="module" data-demo-script="true" src="./api.min.js"></script>
52
52
 
53
53
  <!-- If additional elements are needed for the demo, add them here. -->
54
- <script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-accordion@latest/dist/auro-accordion__bundled.js" type="module"></script>
54
+ <script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-accordion@latest/+esm" type="module"></script>
55
55
  </body>
56
56
  </html>