@aurodesignsystem-dev/auro-hyperlink 0.0.0-pr318.0 → 0.0.0-pr322.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 +38 -58
- package/custom-elements.json +1833 -1513
- package/demo/api.md +28 -29
- package/demo/auro-hyperlink.min.js +47 -60
- package/demo/index.md +0 -12
- package/dist/{auro-hyperlink-BbOKgPQQ.js → auro-hyperlink-isNf5eLk.js} +8 -8
- package/dist/index.d.ts +8 -8
- package/dist/index.js +1 -1
- package/dist/registered.js +1 -1
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -28,17 +28,21 @@ The following sections are editable by making changes to the following files:
|
|
|
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
|
-
##
|
|
31
|
+
## Use Cases
|
|
32
32
|
|
|
33
|
-
<!-- AURO-GENERATED-CONTENT:START (
|
|
34
|
-
|
|
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-hyperlink>` elements should be used in situations where users may:
|
|
35
36
|
|
|
37
|
+
* stand-alone link element for navigation
|
|
38
|
+
* inline link element for navigation
|
|
39
|
+
* optional role as button when hyperlink UI is needed for submit action
|
|
36
40
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
37
41
|
|
|
38
42
|
## Install
|
|
39
43
|
|
|
40
44
|
<!-- AURO-GENERATED-CONTENT:START (REMOTE:url=https://raw.githubusercontent.com/AlaskaAirlines/auro-templates/main/templates/default/partials/usage/componentInstall.md) -->
|
|
41
|
-
[](https://github.com/AlaskaAirlines/auro-hyperlink/actions/workflows/release.yml)
|
|
42
46
|
[](https://www.npmjs.com/package/@aurodesignsystem/auro-hyperlink)
|
|
43
47
|
[](https://www.apache.org/licenses/LICENSE-2.0)
|
|
44
48
|

|
|
@@ -49,17 +53,10 @@ $ npm i @aurodesignsystem/auro-hyperlink
|
|
|
49
53
|
|
|
50
54
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
51
55
|
|
|
52
|
-
###
|
|
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
|
|
56
|
+
### Define Dependency in Project
|
|
60
57
|
|
|
61
58
|
<!-- AURO-GENERATED-CONTENT:START (REMOTE:url=https://raw.githubusercontent.com/AlaskaAirlines/auro-templates/main/templates/default/partials/usage/componentImportDescription.md) -->
|
|
62
|
-
Defining the
|
|
59
|
+
Defining the dependency within each project that is using the `<auro-hyperlink>` component.
|
|
63
60
|
|
|
64
61
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
65
62
|
<!-- AURO-GENERATED-CONTENT:START (REMOTE:url=https://raw.githubusercontent.com/AlaskaAirlines/auro-templates/main/templates/default/partials/usage/componentImport.md) -->
|
|
@@ -68,18 +65,9 @@ Defining the component dependency within each component that is using the `<auro
|
|
|
68
65
|
import "@aurodesignsystem/auro-hyperlink";
|
|
69
66
|
```
|
|
70
67
|
|
|
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
68
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
81
69
|
|
|
82
|
-
|
|
70
|
+
### Use CDN
|
|
83
71
|
|
|
84
72
|
<!-- AURO-GENERATED-CONTENT:START (REMOTE:url=https://raw.githubusercontent.com/AlaskaAirlines/auro-templates/main/templates/default/partials/usage/bundleInstallDescription.md) -->
|
|
85
73
|
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.
|
|
@@ -90,20 +78,7 @@ In cases where the project is not able to process JS assets, there are pre-proce
|
|
|
90
78
|
|
|
91
79
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
92
80
|
|
|
93
|
-
##
|
|
94
|
-
|
|
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
|
|
81
|
+
## Basic Example
|
|
107
82
|
|
|
108
83
|
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./apiExamples/basic.html) -->
|
|
109
84
|
<!-- The below code snippet is automatically added from ./apiExamples/basic.html -->
|
|
@@ -114,31 +89,36 @@ Welcome to <auro-hyperlink href="https://www.alaskaair.com">Alaska Airlines</aur
|
|
|
114
89
|
```
|
|
115
90
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
116
91
|
|
|
117
|
-
##
|
|
118
|
-
|
|
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.
|
|
92
|
+
## Custom Component Registration for Version Management
|
|
121
93
|
|
|
122
|
-
|
|
94
|
+
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.
|
|
95
|
+
The class defines the component’s behavior, while the custom element registers it under a specific name so it can be used in HTML.
|
|
123
96
|
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
### Start development environment
|
|
97
|
+
When you install the component as described on the `Install` page, the class is imported automatically, and the component is registered globally for you.
|
|
127
98
|
|
|
128
|
-
|
|
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**.
|
|
99
|
+
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.
|
|
130
100
|
|
|
131
|
-
|
|
132
|
-
$ npm run dev
|
|
133
|
-
```
|
|
101
|
+
You can do this by importing only the component class and using the `register(name)` method with a unique name:
|
|
134
102
|
|
|
135
|
-
|
|
136
|
-
|
|
103
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./docs/partials/customRegistration.md) -->
|
|
104
|
+
<!-- The below content is automatically added from ./docs/partials/customRegistration.md -->
|
|
105
|
+
<!-- add custom registration content here -->
|
|
137
106
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
107
|
+
<div class="exampleWrapper exampleWrapper--flex">
|
|
108
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./apiExamples/custom.html) -->
|
|
109
|
+
<!-- The below content is automatically added from ./apiExamples/custom.html -->
|
|
110
|
+
<custom-hyperlink>No href supplied</custom-hyperlink><br>
|
|
111
|
+
Welcome to <custom-hyperlink href="https://www.alaskaair.com">Alaska Airlines</custom-hyperlink>.
|
|
112
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
113
|
+
</div>
|
|
114
|
+
<auro-accordion alignRight>
|
|
115
|
+
<span slot="trigger">See code</span>
|
|
116
|
+
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./apiExamples/custom.html) -->
|
|
117
|
+
<!-- The below code snippet is automatically added from ./apiExamples/custom.html -->
|
|
138
118
|
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
119
|
+
```html
|
|
120
|
+
<custom-hyperlink>No href supplied</custom-hyperlink><br>
|
|
121
|
+
Welcome to <custom-hyperlink href="https://www.alaskaair.com">Alaska Airlines</custom-hyperlink>.
|
|
122
|
+
```
|
|
123
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
124
|
+
</auro-accordion>
|