@aurodesignsystem-dev/auro-icon 0.0.0-pr224.1 → 0.0.0-pr228.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,24 +23,28 @@ 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
  Icons can be used to represent concepts or provide context to options and/or actions within an experience.
25
25
 
26
- The `<auro-icon>` web component comes pre-configured with all the available [Auro Icons](https://auro.alaskaair.com/icons) . Simply add the `category` and `name` of the icon for quick and easy results.
26
+ The `<auro-icon>` element comes pre-configured with all the available [Auro Icons](https://auro.alaskaair.com/icons) . Simply add the `category` and `name` of the icon for quick and easy results.
27
27
  <!-- AURO-GENERATED-CONTENT:END -->
28
28
  <!-- AURO-GENERATED-CONTENT:START (FILE:src=./docs/partials/readmeAddlInfo.md) -->
29
29
  <!-- The below content is automatically added from ./docs/partials/readmeAddlInfo.md -->
30
30
  <!-- 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. -->
31
31
  <!-- AURO-GENERATED-CONTENT:END -->
32
32
 
33
- ## UI development browser support
33
+ ## Use Cases
34
34
 
35
- <!-- AURO-GENERATED-CONTENT:START (REMOTE:url=https://raw.githubusercontent.com/AlaskaAirlines/auro-templates/main/templates/default/partials/browserSupport.md) -->
36
- For the most up to date information on [UI development browser support](https://auro.alaskaair.com/support/browsersSupport)
35
+ <!-- AURO-GENERATED-CONTENT:START (FILE:src=./docs/partials/useCases.md) -->
36
+ <!-- The below content is automatically added from ./docs/partials/useCases.md -->
37
+ The `<auro-icon>` element should be used in situations where users may:
37
38
 
39
+ * Benefit from additional context provided by an icon alongside text
40
+ * Need to quickly identify actions or options represented by icons
41
+ * Require visual indicators to enhance usability and navigation within an interface
38
42
  <!-- AURO-GENERATED-CONTENT:END -->
39
43
 
40
44
  ## Install
41
45
 
42
46
  <!-- AURO-GENERATED-CONTENT:START (REMOTE:url=https://raw.githubusercontent.com/AlaskaAirlines/auro-templates/main/templates/default/partials/usage/componentInstall.md) -->
43
- [![Build Status](https://img.shields.io/github/actions/workflow/status/AlaskaAirlines/auro-icon/testPublish.yml?style=for-the-badge)](https://github.com/AlaskaAirlines/auro-icon/actions/workflows/testPublish.yml)
47
+ [![Build Status](https://img.shields.io/github/actions/workflow/status/AlaskaAirlines/auro-icon/release.yml?style=for-the-badge)](https://github.com/AlaskaAirlines/auro-icon/actions/workflows/release.yml)
44
48
  [![See it on NPM!](https://img.shields.io/npm/v/@aurodesignsystem/auro-icon?style=for-the-badge&color=orange)](https://www.npmjs.com/package/@aurodesignsystem/auro-icon)
45
49
  [![License](https://img.shields.io/npm/l/@aurodesignsystem/auro-icon?color=blue&style=for-the-badge)](https://www.apache.org/licenses/LICENSE-2.0)
46
50
  ![ESM supported](https://img.shields.io/badge/ESM-compatible-FFE900?style=for-the-badge)
@@ -51,17 +55,10 @@ $ npm i @aurodesignsystem/auro-icon
51
55
 
52
56
  <!-- AURO-GENERATED-CONTENT:END -->
53
57
 
54
- ### Design Token CSS Custom Property dependency
55
-
56
- <!-- AURO-GENERATED-CONTENT:START (REMOTE:url=https://raw.githubusercontent.com/AlaskaAirlines/auro-templates/main/templates/default/partials/development/designTokens.md) -->
57
- The use of any Auro custom element has a dependency on the [Auro Design Tokens](https://auro.alaskaair.com/getting-started/developers/design-tokens).
58
-
59
- <!-- AURO-GENERATED-CONTENT:END -->
60
-
61
- ### Define dependency in project component
58
+ ### Define Dependency in Project
62
59
 
63
60
  <!-- AURO-GENERATED-CONTENT:START (REMOTE:url=https://raw.githubusercontent.com/AlaskaAirlines/auro-templates/main/templates/default/partials/usage/componentImportDescription.md) -->
64
- Defining the component dependency within each component that is using the `<auro-icon>` component.
61
+ Defining the dependency within each project that is using the `<auro-icon>` component.
65
62
 
66
63
  <!-- AURO-GENERATED-CONTENT:END -->
67
64
  <!-- AURO-GENERATED-CONTENT:START (REMOTE:url=https://raw.githubusercontent.com/AlaskaAirlines/auro-templates/main/templates/default/partials/usage/componentImport.md) -->
@@ -71,16 +68,8 @@ import "@aurodesignsystem/auro-icon";
71
68
  ```
72
69
 
73
70
  <!-- AURO-GENERATED-CONTENT:END -->
74
- **Reference component in HTML**
75
- <!-- AURO-GENERATED-CONTENT:START (CODE:src=./apiExamples/basic.html) -->
76
- <!-- The below code snippet is automatically added from ./apiExamples/basic.html -->
77
71
 
78
- ```html
79
- <auro-icon category="interface" name="pin-trip"></auro-icon>
80
- ```
81
- <!-- AURO-GENERATED-CONTENT:END -->
82
-
83
- ## Use CDN
72
+ ### Use CDN
84
73
 
85
74
  <!-- AURO-GENERATED-CONTENT:START (REMOTE:url=https://raw.githubusercontent.com/AlaskaAirlines/auro-templates/main/templates/default/partials/usage/bundleInstallDescription.md) -->
86
75
  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.
@@ -91,15 +80,7 @@ In cases where the project is not able to process JS assets, there are pre-proce
91
80
 
92
81
  <!-- AURO-GENERATED-CONTENT:END -->
93
82
 
94
- ## auro-icon use cases
95
-
96
- <!-- AURO-GENERATED-CONTENT:START (FILE:src=./docs/partials/useCases.md) -->
97
- <!-- The below content is automatically added from ./docs/partials/useCases.md -->
98
- <!-- AURO-GENERATED-CONTENT:END -->
99
-
100
- ## API Code Examples
101
-
102
- ### Default auro-icon
83
+ ## Basic Example
103
84
 
104
85
  <!-- AURO-GENERATED-CONTENT:START (CODE:src=./apiExamples/basic.html) -->
105
86
  <!-- The below code snippet is automatically added from ./apiExamples/basic.html -->
@@ -109,31 +90,43 @@ In cases where the project is not able to process JS assets, there are pre-proce
109
90
  ```
110
91
  <!-- AURO-GENERATED-CONTENT:END -->
111
92
 
112
- ## Development
93
+ ## Custom Component Registration for Version Management
113
94
 
114
- <!-- AURO-GENERATED-CONTENT:START (REMOTE:url=https://raw.githubusercontent.com/AlaskaAirlines/auro-templates/main/templates/default/partials/development/developmentDescription.md) -->
115
- 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.
95
+ 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.
96
+ The class defines the component’s behavior, while the custom element registers it under a specific name so it can be used in HTML.
116
97
 
117
- 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.
98
+ When you install the component as described on the `Install` page, the class is imported automatically, and the component is registered globally for you.
118
99
 
119
- <!-- AURO-GENERATED-CONTENT:END -->
120
-
121
- ### Start development environment
100
+ 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.
122
101
 
123
- <!-- AURO-GENERATED-CONTENT:START (REMOTE:url=https://raw.githubusercontent.com/AlaskaAirlines/auro-templates/main/templates/default/partials/development/localhost.md) -->
124
- 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**.
102
+ You can do this by importing only the component class and using the `register(name)` method with a unique name:
125
103
 
126
- ```shell
127
- $ npm run dev
104
+ <!-- AURO-GENERATED-CONTENT:START (FILE:src=./docs/partials/customRegistration.md) -->
105
+ <!-- The below content is automatically added from ./docs/partials/customRegistration.md -->
106
+
107
+ ```js
108
+ // Import the class only
109
+ import { AuroIcon } from '@aurodesignsystem/auro-icon/class';
110
+
111
+ // Register with a custom name if desired
112
+ AuroIcon.register('custom-icon');
128
113
  ```
129
114
 
130
- Open [localhost:8000](http://localhost:8000/)
131
-
115
+ This will create a new custom element `<custom-icon>` that behaves exactly like `<auro-icon>`, allowing both to coexist on the same page without interfering with each other.
132
116
  <!-- AURO-GENERATED-CONTENT:END -->
117
+ <div class="exampleWrapper exampleWrapper--flex">
118
+ <!-- AURO-GENERATED-CONTENT:START (FILE:src=./apiExamples/custom.html) -->
119
+ <!-- The below content is automatically added from ./apiExamples/custom.html -->
120
+ <custom-icon category="interface" name="pin-trip"></custom-icon>
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 -->
133
127
 
134
- ### Testing
135
-
136
- <!-- AURO-GENERATED-CONTENT:START (REMOTE:url=https://raw.githubusercontent.com/AlaskaAirlines/auro-templates/main/templates/default/partials/development/testing.md) -->
137
- Automated tests are required for every Auro component. See `.\test\auro-icon.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.
138
-
139
- <!-- AURO-GENERATED-CONTENT:END -->
128
+ ```html
129
+ <custom-icon category="interface" name="pin-trip"></custom-icon>
130
+ ```
131
+ <!-- AURO-GENERATED-CONTENT:END -->
132
+ </auro-accordion>
package/demo/alaska.html CHANGED
@@ -51,6 +51,6 @@
51
51
  <script type="module" data-demo-script="true" src="./alaska.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>
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>