@aurodesignsystem-dev/auro-loader 0.0.0-pr83.1 → 0.0.0-pr87.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
@@ -22,31 +22,23 @@ The following sections are editable by making changes to the following files:
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
24
  `<auro-loader>` is a [HTML custom element](https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_custom_elements) for the purpose of illustrating animated loaders.
25
-
26
- Things take time. Sometimes we just need to take a second for some data to show up. For this Auro supports the `<auro-loader>` custom element. This powerful element supports multiple modes for use, `ringworm`, `orbit`, `pulse`, and `laser`.
27
-
28
- And each of these modes support five size settings, `default`, `sm`, `md`, `lg`, and `xl`.
29
-
30
- For color support `<auro-loader>` supports `currentColor`, this allows for any color set on the parent element to influence the color of the loader.
31
-
32
- The `<auro-loader>` custom element also supports two pre-defined appearance modes: `appearance="brand"` and `appearance="inverse"`.
33
25
  <!-- AURO-GENERATED-CONTENT:END -->
34
26
  <!-- AURO-GENERATED-CONTENT:START (FILE:src=./docs/partials/readmeAddlInfo.md) -->
35
27
  <!-- The below content is automatically added from ./docs/partials/readmeAddlInfo.md -->
36
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. -->
37
29
  <!-- AURO-GENERATED-CONTENT:END -->
38
30
 
39
- ## UI development browser support
40
-
41
- <!-- AURO-GENERATED-CONTENT:START (REMOTE:url=https://raw.githubusercontent.com/AlaskaAirlines/auro-templates/main/templates/default/partials/browserSupport.md) -->
42
- For the most up to date information on [UI development browser support](https://auro.alaskaair.com/support/browsersSupport)
31
+ ## Use Cases
43
32
 
33
+ <!-- AURO-GENERATED-CONTENT:START (FILE:src=./docs/partials/useCases.md) -->
34
+ <!-- The below content is automatically added from ./docs/partials/useCases.md -->
35
+ The `<auro-loader>` element should be used in situations where developers may need to illustrate a wait time for their users.
44
36
  <!-- AURO-GENERATED-CONTENT:END -->
45
37
 
46
38
  ## Install
47
39
 
48
40
  <!-- AURO-GENERATED-CONTENT:START (REMOTE:url=https://raw.githubusercontent.com/AlaskaAirlines/auro-templates/main/templates/default/partials/usage/componentInstall.md) -->
49
- [![Build Status](https://img.shields.io/github/actions/workflow/status/AlaskaAirlines/auro-loader/testPublish.yml?style=for-the-badge)](https://github.com/AlaskaAirlines/auro-loader/actions/workflows/testPublish.yml)
41
+ [![Build Status](https://img.shields.io/github/actions/workflow/status/AlaskaAirlines/auro-loader/release.yml?style=for-the-badge)](https://github.com/AlaskaAirlines/auro-loader/actions/workflows/release.yml)
50
42
  [![See it on NPM!](https://img.shields.io/npm/v/@aurodesignsystem/auro-loader?style=for-the-badge&color=orange)](https://www.npmjs.com/package/@aurodesignsystem/auro-loader)
51
43
  [![License](https://img.shields.io/npm/l/@aurodesignsystem/auro-loader?color=blue&style=for-the-badge)](https://www.apache.org/licenses/LICENSE-2.0)
52
44
  ![ESM supported](https://img.shields.io/badge/ESM-compatible-FFE900?style=for-the-badge)
@@ -57,17 +49,10 @@ $ npm i @aurodesignsystem/auro-loader
57
49
 
58
50
  <!-- AURO-GENERATED-CONTENT:END -->
59
51
 
60
- ### Design Token CSS Custom Property dependency
61
-
62
- <!-- AURO-GENERATED-CONTENT:START (REMOTE:url=https://raw.githubusercontent.com/AlaskaAirlines/auro-templates/main/templates/default/partials/development/designTokens.md) -->
63
- The use of any Auro custom element has a dependency on the [Auro Design Tokens](https://auro.alaskaair.com/getting-started/developers/design-tokens).
64
-
65
- <!-- AURO-GENERATED-CONTENT:END -->
66
-
67
- ### Define dependency in project component
52
+ ### Define Dependency in Project
68
53
 
69
54
  <!-- AURO-GENERATED-CONTENT:START (REMOTE:url=https://raw.githubusercontent.com/AlaskaAirlines/auro-templates/main/templates/default/partials/usage/componentImportDescription.md) -->
70
- Defining the component dependency within each component that is using the `<auro-loader>` component.
55
+ Defining the dependency within each project that is using the `<auro-loader>` component.
71
56
 
72
57
  <!-- AURO-GENERATED-CONTENT:END -->
73
58
  <!-- AURO-GENERATED-CONTENT:START (REMOTE:url=https://raw.githubusercontent.com/AlaskaAirlines/auro-templates/main/templates/default/partials/usage/componentImport.md) -->
@@ -77,19 +62,8 @@ import "@aurodesignsystem/auro-loader";
77
62
  ```
78
63
 
79
64
  <!-- AURO-GENERATED-CONTENT:END -->
80
- **Reference component in HTML**
81
- <!-- AURO-GENERATED-CONTENT:START (CODE:src=./apiExamples/basic.html) -->
82
- <!-- The below code snippet is automatically added from ./apiExamples/basic.html -->
83
65
 
84
- ```html
85
- <auro-loader ringworm></auro-loader>
86
- <auro-loader orbit></auro-loader>
87
- <auro-loader pulse></auro-loader>
88
- <auro-loader laser></auro-loader>
89
- ```
90
- <!-- AURO-GENERATED-CONTENT:END -->
91
-
92
- ## Use CDN
66
+ ### Use CDN
93
67
 
94
68
  <!-- AURO-GENERATED-CONTENT:START (REMOTE:url=https://raw.githubusercontent.com/AlaskaAirlines/auro-templates/main/templates/default/partials/usage/bundleInstallDescription.md) -->
95
69
  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.
@@ -100,16 +74,7 @@ In cases where the project is not able to process JS assets, there are pre-proce
100
74
 
101
75
  <!-- AURO-GENERATED-CONTENT:END -->
102
76
 
103
- ## auro-loader use cases
104
-
105
- <!-- AURO-GENERATED-CONTENT:START (FILE:src=./docs/partials/useCases.md) -->
106
- <!-- The below content is automatically added from ./docs/partials/useCases.md -->
107
- The `<auro-loader>` element should be used in situations where developers may need to illustrate a wait time for their users.
108
- <!-- AURO-GENERATED-CONTENT:END -->
109
-
110
- ## API Code Examples
111
-
112
- ### Default auro-loader
77
+ ## Basic Example
113
78
 
114
79
  <!-- AURO-GENERATED-CONTENT:START (CODE:src=./apiExamples/basic.html) -->
115
80
  <!-- The below code snippet is automatically added from ./apiExamples/basic.html -->
@@ -122,31 +87,49 @@ The `<auro-loader>` element should be used in situations where developers may ne
122
87
  ```
123
88
  <!-- AURO-GENERATED-CONTENT:END -->
124
89
 
125
- ## Development
90
+ ## Custom Component Registration for Version Management
126
91
 
127
- <!-- AURO-GENERATED-CONTENT:START (REMOTE:url=https://raw.githubusercontent.com/AlaskaAirlines/auro-templates/main/templates/default/partials/development/developmentDescription.md) -->
128
- 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.
92
+ 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.
93
+ The class defines the component’s behavior, while the custom element registers it under a specific name so it can be used in HTML.
129
94
 
130
- 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.
95
+ When you install the component as described on the `Install` page, the class is imported automatically, and the component is registered globally for you.
131
96
 
132
- <!-- AURO-GENERATED-CONTENT:END -->
133
-
134
- ### Start development environment
97
+ 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.
135
98
 
136
- <!-- AURO-GENERATED-CONTENT:START (REMOTE:url=https://raw.githubusercontent.com/AlaskaAirlines/auro-templates/main/templates/default/partials/development/localhost.md) -->
137
- 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**.
99
+ You can do this by importing only the component class and using the `register(name)` method with a unique name:
138
100
 
139
- ```shell
140
- $ npm run dev
101
+ <!-- AURO-GENERATED-CONTENT:START (FILE:src=./docs/partials/customRegistration.md) -->
102
+ <!-- The below content is automatically added from ./docs/partials/customRegistration.md -->
103
+
104
+ ```js
105
+ // Import the class only
106
+ import { AuroLoader } from '@aurodesignsystem/auro-loader/class';
107
+
108
+ // Register with a custom name if desired
109
+ AuroLoader.register('custom-loader');
141
110
  ```
142
111
 
143
- Open [localhost:8000](http://localhost:8000/)
144
-
112
+ This will create a new custom element `<custom-loader>` that behaves exactly like `<auro-loader>`, allowing both to coexist on the same page without interfering with each other.
145
113
  <!-- AURO-GENERATED-CONTENT:END -->
114
+ <div class="exampleWrapper exampleWrapper--flex">
115
+ <!-- AURO-GENERATED-CONTENT:START (FILE:src=./apiExamples/custom.html) -->
116
+ <!-- The below content is automatically added from ./apiExamples/custom.html -->
117
+ <custom-loader ringworm></custom-loader>
118
+ <custom-loader orbit></custom-loader>
119
+ <custom-loader pulse></custom-loader>
120
+ <custom-loader laser></custom-loader>
121
+ <!-- AURO-GENERATED-CONTENT:END -->
122
+ </div>
123
+ <auro-accordion alignRight>
124
+ <span slot="trigger">See code</span>
125
+ <!-- AURO-GENERATED-CONTENT:START (CODE:src=./apiExamples/custom.html) -->
126
+ <!-- The below code snippet is automatically added from ./apiExamples/custom.html -->
146
127
 
147
- ### Testing
148
-
149
- <!-- AURO-GENERATED-CONTENT:START (REMOTE:url=https://raw.githubusercontent.com/AlaskaAirlines/auro-templates/main/templates/default/partials/development/testing.md) -->
150
- Automated tests are required for every Auro component. See `.\test\auro-loader.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.
151
-
152
- <!-- AURO-GENERATED-CONTENT:END -->
128
+ ```html
129
+ <custom-loader ringworm></custom-loader>
130
+ <custom-loader orbit></custom-loader>
131
+ <custom-loader pulse></custom-loader>
132
+ <custom-loader laser></custom-loader>
133
+ ```
134
+ <!-- AURO-GENERATED-CONTENT:END -->
135
+ </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>