@aurodesignsystem-dev/auro-hyperlink 0.0.0-pr316.0 → 0.0.0-pr316.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 CHANGED
@@ -15,130 +15,68 @@ The following sections are editable by making changes to the following files:
15
15
  | Use Cases | Examples for when to use this component | `./docs/partials/useCases.md` |
16
16
  | Additional Information | For use to add any component specific information | `./docs/partials/readmeAddlInfo.md` |
17
17
  | Component Example Code | HTML sample code of the components use | `./apiExamples/basic.html` |
18
- -->
19
-
20
- # Hyperlink
18
+ -->
19
+
20
+ # {{ capitalize name }}
21
21
 
22
22
  <!-- AURO-GENERATED-CONTENT:START (FILE:src=./docs/partials/description.md) -->
23
- <!-- The below content is automatically added from ./docs/partials/description.md -->
24
- `<auro-hyperlink>` is a wrapper components for an HTML `<a>` element containing styling and behavior.
25
- <!-- AURO-GENERATED-CONTENT:END -->
23
+ <!-- AURO-GENERATED-CONTENT:END -->
24
+
26
25
  <!-- AURO-GENERATED-CONTENT:START (FILE:src=./docs/partials/readmeAddlInfo.md) -->
27
- <!-- The below content is automatically added from ./docs/partials/readmeAddlInfo.md -->
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
- <!-- AURO-GENERATED-CONTENT:END -->
30
-
31
- ## UI development browser support
26
+ <!-- AURO-GENERATED-CONTENT:END -->
32
27
 
33
- <!-- AURO-GENERATED-CONTENT:START (REMOTE:url=https://raw.githubusercontent.com/AlaskaAirlines/auro-templates/main/templates/default/partials/browserSupport.md) -->
34
- For the most up to date information on [UI development browser support](https://auro.alaskaair.com/support/browsersSupport)
28
+ ## Use Cases
29
+
30
+ <!-- AURO-GENERATED-CONTENT:START (FILE:src=./docs/partials/useCases.md) -->
31
+ <!-- AURO-GENERATED-CONTENT:END -->
35
32
 
36
- <!-- AURO-GENERATED-CONTENT:END -->
37
-
38
33
  ## Install
39
34
 
40
35
  <!-- AURO-GENERATED-CONTENT:START (REMOTE:url=https://raw.githubusercontent.com/AlaskaAirlines/auro-templates/main/templates/default/partials/usage/componentInstall.md) -->
41
- [![Build Status](https://img.shields.io/github/actions/workflow/status/AlaskaAirlines/auro-hyperlink/testPublish.yml?style=for-the-badge)](https://github.com/AlaskaAirlines/auro-hyperlink/actions/workflows/testPublish.yml)
42
- [![See it on NPM!](https://img.shields.io/npm/v/@aurodesignsystem/auro-hyperlink?style=for-the-badge&color=orange)](https://www.npmjs.com/package/@aurodesignsystem/auro-hyperlink)
43
- [![License](https://img.shields.io/npm/l/@aurodesignsystem/auro-hyperlink?color=blue&style=for-the-badge)](https://www.apache.org/licenses/LICENSE-2.0)
44
- ![ESM supported](https://img.shields.io/badge/ESM-compatible-FFE900?style=for-the-badge)
45
-
46
- ```shell
47
- $ npm i @aurodesignsystem/auro-hyperlink
48
- ```
49
-
50
- <!-- AURO-GENERATED-CONTENT:END -->
51
-
52
- ### Design Token CSS Custom Property dependency
53
-
54
- <!-- AURO-GENERATED-CONTENT:START (REMOTE:url=https://raw.githubusercontent.com/AlaskaAirlines/auro-templates/main/templates/default/partials/development/designTokens.md) -->
55
- The use of any Auro custom element has a dependency on the [Auro Design Tokens](https://auro.alaskaair.com/getting-started/developers/design-tokens).
56
-
57
- <!-- AURO-GENERATED-CONTENT:END -->
58
-
59
- ### Define dependency in project component
36
+ <!-- AURO-GENERATED-CONTENT:END -->
37
+
38
+ ### Define Dependency in Project
60
39
 
61
40
  <!-- AURO-GENERATED-CONTENT:START (REMOTE:url=https://raw.githubusercontent.com/AlaskaAirlines/auro-templates/main/templates/default/partials/usage/componentImportDescription.md) -->
62
- Defining the component dependency within each component that is using the `<auro-hyperlink>` component.
41
+ <!-- AURO-GENERATED-CONTENT:END -->
63
42
 
64
- <!-- AURO-GENERATED-CONTENT:END -->
65
- <!-- AURO-GENERATED-CONTENT:START (REMOTE:url=https://raw.githubusercontent.com/AlaskaAirlines/auro-templates/main/templates/default/partials/usage/componentImport.md) -->
66
-
67
- ```js
68
- import "@aurodesignsystem/auro-hyperlink";
69
- ```
43
+ <!-- AURO-GENERATED-CONTENT:START (REMOTE:url=https://raw.githubusercontent.com/AlaskaAirlines/auro-templates/main/templates/default/partials/usage/componentImport.md) -->
44
+ <!-- AURO-GENERATED-CONTENT:END -->
70
45
 
71
- <!-- AURO-GENERATED-CONTENT:END -->
72
- **Reference component in HTML**
73
- <!-- AURO-GENERATED-CONTENT:START (CODE:src=./apiExamples/basic.html) -->
74
- <!-- The below code snippet is automatically added from ./apiExamples/basic.html -->
75
-
76
- ```html
77
- <auro-hyperlink>No href supplied</auro-hyperlink><br>
78
- Welcome to <auro-hyperlink href="https://www.alaskaair.com">Alaska Airlines</auro-hyperlink>.
79
- ```
80
- <!-- AURO-GENERATED-CONTENT:END -->
81
-
82
- ## Use CDN
46
+ ### Use CDN
83
47
 
84
48
  <!-- AURO-GENERATED-CONTENT:START (REMOTE:url=https://raw.githubusercontent.com/AlaskaAirlines/auro-templates/main/templates/default/partials/usage/bundleInstallDescription.md) -->
85
- 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.
86
-
87
- ```html
88
- <script type="module" src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-hyperlink@latest/+esm"></script>
89
- ```
90
-
91
- <!-- AURO-GENERATED-CONTENT:END -->
92
-
93
- ## auro-hyperlink use cases
49
+ <!-- AURO-GENERATED-CONTENT:END -->
94
50
 
95
- <!-- AURO-GENERATED-CONTENT:START (FILE:src=./docs/partials/useCases.md) -->
96
- <!-- The below content is automatically added from ./docs/partials/useCases.md -->
97
- The `<auro-hyperlink>` elements should be used in situations where users may:
98
-
99
- * stand-alone link element for navigation
100
- * inline link element for navigation
101
- * optional role as button when hyperlink UI is needed for submit action
102
- <!-- AURO-GENERATED-CONTENT:END -->
103
-
104
- ## API Code Examples
105
-
106
- ### Default auro-hyperlink
51
+ ## Basic Example
107
52
 
108
53
  <!-- AURO-GENERATED-CONTENT:START (CODE:src=./apiExamples/basic.html) -->
109
- <!-- The below code snippet is automatically added from ./apiExamples/basic.html -->
110
-
111
- ```html
112
- <auro-hyperlink>No href supplied</auro-hyperlink><br>
113
- Welcome to <auro-hyperlink href="https://www.alaskaair.com">Alaska Airlines</auro-hyperlink>.
114
- ```
115
- <!-- AURO-GENERATED-CONTENT:END -->
116
-
117
- ## Development
54
+ <!-- AURO-GENERATED-CONTENT:END -->
55
+
56
+ ## Custom Component Registration for Version Management
118
57
 
119
- <!-- AURO-GENERATED-CONTENT:START (REMOTE:url=https://raw.githubusercontent.com/AlaskaAirlines/auro-templates/main/templates/default/partials/development/developmentDescription.md) -->
120
- 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.
58
+ 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.
59
+ The class defines the component’s behavior, while the custom element registers it under a specific name so it can be used in HTML.
121
60
 
122
- 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.
61
+ When you install the component as described on the `Install` page, the class is imported automatically, and the component is registered globally for you.
123
62
 
124
- <!-- AURO-GENERATED-CONTENT:END -->
125
-
126
- ### Start development environment
63
+ 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.
127
64
 
128
- <!-- AURO-GENERATED-CONTENT:START (REMOTE:url=https://raw.githubusercontent.com/AlaskaAirlines/auro-templates/main/templates/default/partials/development/localhost.md) -->
129
- 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**.
65
+ You can do this by importing only the component class and using the `register(name)` method with a unique name:
130
66
 
131
- ```shell
132
- $ npm run dev
133
- ```
67
+ <!-- AURO-GENERATED-CONTENT:START (FILE:src=./docs/partials/customRegistration.md) -->
68
+ <!-- AURO-GENERATED-CONTENT:END -->
134
69
 
135
- Open [localhost:8000](http://localhost:8000/)
136
-
137
- <!-- AURO-GENERATED-CONTENT:END -->
138
-
139
- ### Testing
70
+ <div class="exampleWrapper exampleWrapper--flex">
71
+ <!-- AURO-GENERATED-CONTENT:START (FILE:src=./apiExamples/custom.html) -->
72
+ <!-- AURO-GENERATED-CONTENT:END -->
73
+ </div>
140
74
 
141
- <!-- AURO-GENERATED-CONTENT:START (REMOTE:url=https://raw.githubusercontent.com/AlaskaAirlines/auro-templates/main/templates/default/partials/development/testing.md) -->
142
- Automated tests are required for every Auro component. See `.\test\auro-hyperlink.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.
75
+ <auro-accordion alignRight>
76
+ <span slot="trigger">See code</span>
143
77
 
78
+ <!-- AURO-GENERATED-CONTENT:START (CODE:src=./apiExamples/custom.html) -->
144
79
  <!-- AURO-GENERATED-CONTENT:END -->
80
+
81
+ </auro-accordion>
82
+