@aurodesignsystem-dev/auro-button 0.0.0-pr378.0 → 0.0.0-pr381.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 +41 -61
- package/custom-elements.json +1474 -910
- package/demo/api.html +1 -0
- package/demo/api.md +24 -29
- package/demo/auro-button.min.js +20 -16
- package/demo/button-sheet.html +1 -0
- package/demo/form.html +1 -0
- package/demo/icon-sheet.html +1 -0
- package/demo/index.html +1 -0
- package/dist/{auro-button-CvWxpTkj.js → auro-button-waZOsuy7.js} +6 -6
- package/dist/index.d.ts +338 -63
- package/dist/index.js +1 -1
- package/dist/registered.js +1 -1
- package/package.json +7 -7
package/README.md
CHANGED
|
@@ -40,17 +40,22 @@ If the desired appearance of the `<auro-button>` is to be placed in the reverse
|
|
|
40
40
|
When the UI requires the use of multiple buttons within the same space, with the use of the [Auro Web Core Style Sheets](https://alaskaairlines.github.io/WebCoreStyleSheets/#utility-auro-css-#{$scope}.auro_containedButtons), and the `auro_containedButtons`.
|
|
41
41
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
42
42
|
|
|
43
|
-
##
|
|
43
|
+
## Use Cases
|
|
44
44
|
|
|
45
|
-
<!-- AURO-GENERATED-CONTENT:START (
|
|
46
|
-
|
|
45
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./docs/partials/useCases.md) -->
|
|
46
|
+
<!-- The below content is automatically added from ./docs/partials/useCases.md -->
|
|
47
|
+
The auro-button element should be used in situations where users may:
|
|
47
48
|
|
|
49
|
+
* submit a form
|
|
50
|
+
* begin a new task
|
|
51
|
+
* trigger a new UI element to appear to the page
|
|
52
|
+
* specify a new or next step in a process
|
|
48
53
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
49
54
|
|
|
50
55
|
## Install
|
|
51
56
|
|
|
52
57
|
<!-- AURO-GENERATED-CONTENT:START (REMOTE:url=https://raw.githubusercontent.com/AlaskaAirlines/auro-templates/main/templates/default/partials/usage/componentInstall.md) -->
|
|
53
|
-
[](https://github.com/AlaskaAirlines/auro-button/actions/workflows/release.yml)
|
|
54
59
|
[](https://www.npmjs.com/package/@aurodesignsystem/auro-button)
|
|
55
60
|
[](https://www.apache.org/licenses/LICENSE-2.0)
|
|
56
61
|

|
|
@@ -61,17 +66,10 @@ $ npm i @aurodesignsystem/auro-button
|
|
|
61
66
|
|
|
62
67
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
63
68
|
|
|
64
|
-
###
|
|
65
|
-
|
|
66
|
-
<!-- AURO-GENERATED-CONTENT:START (REMOTE:url=https://raw.githubusercontent.com/AlaskaAirlines/auro-templates/main/templates/default/partials/development/designTokens.md) -->
|
|
67
|
-
The use of any Auro custom element has a dependency on the [Auro Design Tokens](https://auro.alaskaair.com/getting-started/developers/design-tokens).
|
|
68
|
-
|
|
69
|
-
<!-- AURO-GENERATED-CONTENT:END -->
|
|
70
|
-
|
|
71
|
-
### Define dependency in project component
|
|
69
|
+
### Define Dependency in Project
|
|
72
70
|
|
|
73
71
|
<!-- AURO-GENERATED-CONTENT:START (REMOTE:url=https://raw.githubusercontent.com/AlaskaAirlines/auro-templates/main/templates/default/partials/usage/componentImportDescription.md) -->
|
|
74
|
-
Defining the
|
|
72
|
+
Defining the dependency within each project that is using the `<auro-button>` component.
|
|
75
73
|
|
|
76
74
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
77
75
|
<!-- AURO-GENERATED-CONTENT:START (REMOTE:url=https://raw.githubusercontent.com/AlaskaAirlines/auro-templates/main/templates/default/partials/usage/componentImport.md) -->
|
|
@@ -81,19 +79,8 @@ import "@aurodesignsystem/auro-button";
|
|
|
81
79
|
```
|
|
82
80
|
|
|
83
81
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
84
|
-
**Reference component in HTML**
|
|
85
|
-
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./apiExamples/basic.html) -->
|
|
86
|
-
<!-- The below code snippet is automatically added from ./apiExamples/basic.html -->
|
|
87
82
|
|
|
88
|
-
|
|
89
|
-
<auro-button>Primary</auro-button>
|
|
90
|
-
<auro-button variant="secondary">Secondary</auro-button>
|
|
91
|
-
<auro-button variant="tertiary">Tertiary</auro-button>
|
|
92
|
-
<auro-button variant="ghost">Ghost</auro-button>
|
|
93
|
-
```
|
|
94
|
-
<!-- AURO-GENERATED-CONTENT:END -->
|
|
95
|
-
|
|
96
|
-
## Use CDN
|
|
83
|
+
### Use CDN
|
|
97
84
|
|
|
98
85
|
<!-- AURO-GENERATED-CONTENT:START (REMOTE:url=https://raw.githubusercontent.com/AlaskaAirlines/auro-templates/main/templates/default/partials/usage/bundleInstallDescription.md) -->
|
|
99
86
|
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.
|
|
@@ -104,21 +91,7 @@ In cases where the project is not able to process JS assets, there are pre-proce
|
|
|
104
91
|
|
|
105
92
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
106
93
|
|
|
107
|
-
##
|
|
108
|
-
|
|
109
|
-
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./docs/partials/useCases.md) -->
|
|
110
|
-
<!-- The below content is automatically added from ./docs/partials/useCases.md -->
|
|
111
|
-
The auro-button element should be used in situations where users may:
|
|
112
|
-
|
|
113
|
-
* submit a form
|
|
114
|
-
* begin a new task
|
|
115
|
-
* trigger a new UI element to appear to the page
|
|
116
|
-
* specify a new or next step in a process
|
|
117
|
-
<!-- AURO-GENERATED-CONTENT:END -->
|
|
118
|
-
|
|
119
|
-
## API Code Examples
|
|
120
|
-
|
|
121
|
-
### Default auro-button
|
|
94
|
+
## Basic Example
|
|
122
95
|
|
|
123
96
|
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./apiExamples/basic.html) -->
|
|
124
97
|
<!-- The below code snippet is automatically added from ./apiExamples/basic.html -->
|
|
@@ -131,31 +104,38 @@ The auro-button element should be used in situations where users may:
|
|
|
131
104
|
```
|
|
132
105
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
133
106
|
|
|
134
|
-
##
|
|
107
|
+
## Custom Component Registration for Version Management
|
|
135
108
|
|
|
136
|
-
|
|
137
|
-
|
|
109
|
+
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.
|
|
110
|
+
The class defines the component’s behavior, while the custom element registers it under a specific name so it can be used in HTML.
|
|
138
111
|
|
|
139
|
-
|
|
112
|
+
When you install the component as described on the `Install` page, the class is imported automatically, and the component is registered globally for you.
|
|
140
113
|
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
### Start development environment
|
|
144
|
-
|
|
145
|
-
<!-- AURO-GENERATED-CONTENT:START (REMOTE:url=https://raw.githubusercontent.com/AlaskaAirlines/auro-templates/main/templates/default/partials/development/localhost.md) -->
|
|
146
|
-
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**.
|
|
114
|
+
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.
|
|
147
115
|
|
|
148
|
-
|
|
149
|
-
$ npm run dev
|
|
150
|
-
```
|
|
116
|
+
You can do this by importing only the component class and using the `register(name)` method with a unique name:
|
|
151
117
|
|
|
152
|
-
|
|
153
|
-
|
|
118
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./docs/partials/customRegistration.md) -->
|
|
119
|
+
<!-- The below content is automatically added from ./docs/partials/customRegistration.md -->
|
|
120
|
+
<!-- add custom registration content here -->
|
|
154
121
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
122
|
+
<div class="exampleWrapper exampleWrapper--flex">
|
|
123
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./apiExamples/custom.html) -->
|
|
124
|
+
<!-- The below content is automatically added from ./apiExamples/custom.html -->
|
|
125
|
+
<custom-button>Primary</custom-button>
|
|
126
|
+
<custom-button variant="secondary">Secondary</custom-button>
|
|
127
|
+
<custom-button variant="tertiary">Tertiary</custom-button>
|
|
128
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
129
|
+
</div>
|
|
130
|
+
<auro-accordion alignRight>
|
|
131
|
+
<span slot="trigger">See code</span>
|
|
132
|
+
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./apiExamples/custom.html) -->
|
|
133
|
+
<!-- The below code snippet is automatically added from ./apiExamples/custom.html -->
|
|
155
134
|
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
<!-- AURO-GENERATED-CONTENT:END -->
|
|
135
|
+
```html
|
|
136
|
+
<custom-button>Primary</custom-button>
|
|
137
|
+
<custom-button variant="secondary">Secondary</custom-button>
|
|
138
|
+
<custom-button variant="tertiary">Tertiary</custom-button>
|
|
139
|
+
```
|
|
140
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
141
|
+
</auro-accordion>
|