@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 +39 -101
- package/custom-elements.json +1837 -1511
- package/demo/api.md +28 -29
- package/demo/auro-hyperlink.min.js +39 -35
- package/demo/index.md +0 -12
- package/dist/{auro-hyperlink-CKGl5UlS.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
|
@@ -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
|
-
#
|
|
18
|
+
-->
|
|
19
|
+
|
|
20
|
+
# {{ capitalize name }}
|
|
21
21
|
|
|
22
22
|
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./docs/partials/description.md) -->
|
|
23
|
-
<!--
|
|
24
|
-
|
|
25
|
-
<!-- AURO-GENERATED-CONTENT:END -->
|
|
23
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
24
|
+
|
|
26
25
|
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./docs/partials/readmeAddlInfo.md) -->
|
|
27
|
-
<!--
|
|
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
|
-
|
|
34
|
-
|
|
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
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-

|
|
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
|
-
|
|
41
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
63
42
|
|
|
64
|
-
<!-- AURO-GENERATED-CONTENT:
|
|
65
|
-
<!-- AURO-GENERATED-CONTENT:
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
<!--
|
|
110
|
-
|
|
111
|
-
|
|
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
|
-
|
|
120
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
132
|
-
|
|
133
|
-
```
|
|
67
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./docs/partials/customRegistration.md) -->
|
|
68
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
134
69
|
|
|
135
|
-
|
|
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
|
-
|
|
142
|
-
|
|
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
|
+
|