@aurodesignsystem-dev/auro-alert 0.0.0-pr121.0 → 0.0.0-pr123.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 +13 -26
- package/custom-elements.json +245 -0
- package/demo/api.md +110 -129
- package/demo/api.min.js +407 -1
- package/demo/index.md +6 -8
- package/demo/index.min.js +407 -1
- package/demo/readme.md +115 -0
- package/dist/auro-alert-Cxqj9ihp.js +35 -0
- package/dist/index.d.ts +134 -72
- package/dist/index.js +1 -1
- package/dist/registered.js +1 -1
- package/package.json +10 -8
- package/demo/auro-alert.min.js +0 -413
- package/dist/auro-alert-C5hNY0oc.js +0 -35
package/README.md
CHANGED
|
@@ -45,9 +45,7 @@ The `auro-alert` element should be used:
|
|
|
45
45
|
[](https://www.apache.org/licenses/LICENSE-2.0)
|
|
46
46
|

|
|
47
47
|
|
|
48
|
-
|
|
49
|
-
$ npm i @aurodesignsystem/auro-alert
|
|
50
|
-
```
|
|
48
|
+
<pre class="language-shell"><code class="language-shell">$ npm i @aurodesignsystem/auro-alert</code></pre>
|
|
51
49
|
|
|
52
50
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
53
51
|
|
|
@@ -59,9 +57,7 @@ Defining the dependency within each project that is using the `<auro-alert>` com
|
|
|
59
57
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
60
58
|
<!-- AURO-GENERATED-CONTENT:START (REMOTE:url=https://raw.githubusercontent.com/AlaskaAirlines/auro-templates/main/templates/default/partials/usage/componentImport.md) -->
|
|
61
59
|
|
|
62
|
-
|
|
63
|
-
import "@aurodesignsystem/auro-alert";
|
|
64
|
-
```
|
|
60
|
+
<pre class="language-js"><code class="language-js">import "@aurodesignsystem/auro-alert";</code></pre>
|
|
65
61
|
|
|
66
62
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
67
63
|
|
|
@@ -70,9 +66,7 @@ import "@aurodesignsystem/auro-alert";
|
|
|
70
66
|
<!-- AURO-GENERATED-CONTENT:START (REMOTE:url=https://raw.githubusercontent.com/AlaskaAirlines/auro-templates/main/templates/default/partials/usage/bundleInstallDescription.md) -->
|
|
71
67
|
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.
|
|
72
68
|
|
|
73
|
-
|
|
74
|
-
<script type="module" src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-alert@latest/+esm"></script>
|
|
75
|
-
```
|
|
69
|
+
<pre class="language-html"><code class="language-html"><script type="module" src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-alert@latest/+esm"></script></code></pre>
|
|
76
70
|
|
|
77
71
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
78
72
|
|
|
@@ -81,9 +75,7 @@ In cases where the project is not able to process JS assets, there are pre-proce
|
|
|
81
75
|
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./apiExamples/basic.html) -->
|
|
82
76
|
<!-- The below code snippet is automatically added from ./apiExamples/basic.html -->
|
|
83
77
|
|
|
84
|
-
|
|
85
|
-
<auro-alert>This is a default error with no error type specified.</auro-alert>
|
|
86
|
-
```
|
|
78
|
+
<pre class="language-html"><code class="language-html"><auro-alert>This is a default error with no error type specified.</auro-alert></code></pre>
|
|
87
79
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
88
80
|
|
|
89
81
|
## Custom Component Registration for Version Management
|
|
@@ -100,29 +92,24 @@ You can do this by importing only the component class and using the `register(na
|
|
|
100
92
|
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./docs/partials/customRegistration.md) -->
|
|
101
93
|
<!-- The below content is automatically added from ./docs/partials/customRegistration.md -->
|
|
102
94
|
|
|
103
|
-
|
|
104
|
-
// Import the class only
|
|
95
|
+
<pre class="language-js"><code class="language-js">// Import the class only
|
|
105
96
|
import { AuroAlert } from '@aurodesignsystem/auro-alert/class';
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
AuroAlert.register('custom-alert');
|
|
109
|
-
```
|
|
97
|
+
// Register with a custom name if desired
|
|
98
|
+
AuroAlert.register('custom-alert');</code></pre>
|
|
110
99
|
|
|
111
100
|
This will create a new custom element `<custom-alert>` that behaves exactly like `<auro-alert>`, allowing both to coexist on the same page without interfering with each other.
|
|
112
101
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
113
102
|
<div class="exampleWrapper exampleWrapper--flex">
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
103
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./apiExamples/custom.html) -->
|
|
104
|
+
<!-- The below content is automatically added from ./apiExamples/custom.html -->
|
|
105
|
+
<custom-alert type="warning">Salutations World!</custom-alert>
|
|
106
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
118
107
|
</div>
|
|
119
108
|
<auro-accordion alignRight>
|
|
120
|
-
|
|
109
|
+
<span slot="trigger">See code</span>
|
|
121
110
|
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./apiExamples/custom.html) -->
|
|
122
111
|
<!-- The below code snippet is automatically added from ./apiExamples/custom.html -->
|
|
123
112
|
|
|
124
|
-
|
|
125
|
-
<custom-alert type="warning">Salutations World!</custom-alert>
|
|
126
|
-
```
|
|
113
|
+
<pre class="language-html"><code class="language-html"><custom-alert type="warning">Salutations World!</custom-alert></code></pre>
|
|
127
114
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
128
115
|
</auro-accordion>
|
|
@@ -0,0 +1,245 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": "1.0.0",
|
|
3
|
+
"readme": "",
|
|
4
|
+
"modules": [
|
|
5
|
+
{
|
|
6
|
+
"kind": "javascript-module",
|
|
7
|
+
"path": "src/auro-alert.js",
|
|
8
|
+
"declarations": [
|
|
9
|
+
{
|
|
10
|
+
"kind": "class",
|
|
11
|
+
"description": "The `auro-alert` element is used to provide contextual feedback messages for typical user actions.",
|
|
12
|
+
"name": "AuroAlert",
|
|
13
|
+
"cssParts": [
|
|
14
|
+
{
|
|
15
|
+
"description": "Use for customizing the style of the alert container",
|
|
16
|
+
"name": "alert"
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"description": "Use for customizing the style of the alert content",
|
|
20
|
+
"name": "alert-content"
|
|
21
|
+
}
|
|
22
|
+
],
|
|
23
|
+
"slots": [
|
|
24
|
+
{
|
|
25
|
+
"description": "Provide text for the alert. If using multiple lines, separate each line with `<p>` tags.",
|
|
26
|
+
"name": ""
|
|
27
|
+
}
|
|
28
|
+
],
|
|
29
|
+
"members": [
|
|
30
|
+
{
|
|
31
|
+
"kind": "method",
|
|
32
|
+
"name": "generateIconHtml",
|
|
33
|
+
"parameters": [
|
|
34
|
+
{
|
|
35
|
+
"name": "category",
|
|
36
|
+
"description": "The category of the icon.",
|
|
37
|
+
"type": {
|
|
38
|
+
"text": "string"
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"name": "name",
|
|
43
|
+
"description": "The name of the icon.",
|
|
44
|
+
"type": {
|
|
45
|
+
"text": "string"
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
],
|
|
49
|
+
"privacy": "private",
|
|
50
|
+
"return": {
|
|
51
|
+
"type": {
|
|
52
|
+
"text": "string"
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"kind": "field",
|
|
58
|
+
"name": "hidden",
|
|
59
|
+
"privacy": "public",
|
|
60
|
+
"type": {
|
|
61
|
+
"text": "boolean"
|
|
62
|
+
},
|
|
63
|
+
"description": "If present, the component will be hidden both visually and from screen readers",
|
|
64
|
+
"attribute": "hidden",
|
|
65
|
+
"reflects": true
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"kind": "field",
|
|
69
|
+
"name": "hiddenAudible",
|
|
70
|
+
"privacy": "public",
|
|
71
|
+
"type": {
|
|
72
|
+
"text": "boolean"
|
|
73
|
+
},
|
|
74
|
+
"description": "If present, the component will be hidden from screen readers, but seen visually",
|
|
75
|
+
"attribute": "hiddenaudible",
|
|
76
|
+
"reflects": true
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"kind": "field",
|
|
80
|
+
"name": "hiddenVisually",
|
|
81
|
+
"privacy": "public",
|
|
82
|
+
"type": {
|
|
83
|
+
"text": "boolean"
|
|
84
|
+
},
|
|
85
|
+
"description": "If present, the component will be hidden visually, but still read by screen readers",
|
|
86
|
+
"attribute": "hiddenvisually",
|
|
87
|
+
"reflects": true
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"kind": "field",
|
|
91
|
+
"name": "iconTag",
|
|
92
|
+
"privacy": "private",
|
|
93
|
+
"type": {
|
|
94
|
+
"text": "string"
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
"kind": "field",
|
|
99
|
+
"name": "noIcon",
|
|
100
|
+
"privacy": "public",
|
|
101
|
+
"type": {
|
|
102
|
+
"text": "boolean"
|
|
103
|
+
},
|
|
104
|
+
"description": "Removes icon from alert UI when `type` attribute is set",
|
|
105
|
+
"attribute": "noicon",
|
|
106
|
+
"reflects": true
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
"kind": "method",
|
|
110
|
+
"name": "register",
|
|
111
|
+
"static": true,
|
|
112
|
+
"parameters": [
|
|
113
|
+
{
|
|
114
|
+
"name": "name",
|
|
115
|
+
"default": "\"auro-alert\"",
|
|
116
|
+
"description": "The name of the element that you want to register.",
|
|
117
|
+
"optional": true,
|
|
118
|
+
"type": {
|
|
119
|
+
"text": "string"
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
],
|
|
123
|
+
"description": "This will register this element with the browser.",
|
|
124
|
+
"type": {
|
|
125
|
+
"text": "register(name?: string = \"auro-alert\") => void"
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
"kind": "field",
|
|
130
|
+
"name": "runtimeUtils",
|
|
131
|
+
"privacy": "private",
|
|
132
|
+
"default": "new AuroLibraryRuntimeUtils()"
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
"kind": "field",
|
|
136
|
+
"name": "type",
|
|
137
|
+
"privacy": "public",
|
|
138
|
+
"type": {
|
|
139
|
+
"text": "'information' | 'error' | 'success' | 'warning'"
|
|
140
|
+
},
|
|
141
|
+
"description": "Component will render visually based on which type value is set",
|
|
142
|
+
"attribute": "type",
|
|
143
|
+
"reflects": true
|
|
144
|
+
}
|
|
145
|
+
],
|
|
146
|
+
"attributes": [
|
|
147
|
+
{
|
|
148
|
+
"name": "hidden",
|
|
149
|
+
"type": {
|
|
150
|
+
"text": "boolean"
|
|
151
|
+
},
|
|
152
|
+
"description": "If present, the component will be hidden both visually and from screen readers",
|
|
153
|
+
"fieldName": "hidden"
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
"name": "hiddenaudible",
|
|
157
|
+
"type": {
|
|
158
|
+
"text": "boolean"
|
|
159
|
+
},
|
|
160
|
+
"description": "If present, the component will be hidden from screen readers, but seen visually",
|
|
161
|
+
"fieldName": "hiddenAudible"
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
"name": "hiddenvisually",
|
|
165
|
+
"type": {
|
|
166
|
+
"text": "boolean"
|
|
167
|
+
},
|
|
168
|
+
"description": "If present, the component will be hidden visually, but still read by screen readers",
|
|
169
|
+
"fieldName": "hiddenVisually"
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
"name": "noicon",
|
|
173
|
+
"type": {
|
|
174
|
+
"text": "boolean"
|
|
175
|
+
},
|
|
176
|
+
"description": "Removes icon from alert UI when `type` attribute is set",
|
|
177
|
+
"fieldName": "noIcon"
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
"name": "type",
|
|
181
|
+
"type": {
|
|
182
|
+
"text": "'information' | 'error' | 'success' | 'warning'"
|
|
183
|
+
},
|
|
184
|
+
"description": "Component will render visually based on which type value is set",
|
|
185
|
+
"fieldName": "type"
|
|
186
|
+
}
|
|
187
|
+
],
|
|
188
|
+
"superclass": {
|
|
189
|
+
"name": "AuroElement",
|
|
190
|
+
"package": "@aurodesignsystem/webcorestylesheets/dist/auroElement/auroElement.mjs"
|
|
191
|
+
},
|
|
192
|
+
"tagName": "auro-alert",
|
|
193
|
+
"customElement": true,
|
|
194
|
+
"modulePath": "src/auro-alert.js"
|
|
195
|
+
}
|
|
196
|
+
],
|
|
197
|
+
"exports": [
|
|
198
|
+
{
|
|
199
|
+
"kind": "js",
|
|
200
|
+
"name": "AuroAlert",
|
|
201
|
+
"declaration": {
|
|
202
|
+
"name": "AuroAlert",
|
|
203
|
+
"module": "src/auro-alert.js"
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
]
|
|
207
|
+
},
|
|
208
|
+
{
|
|
209
|
+
"kind": "javascript-module",
|
|
210
|
+
"path": "src/iconVersion.js",
|
|
211
|
+
"declarations": [],
|
|
212
|
+
"exports": [
|
|
213
|
+
{
|
|
214
|
+
"kind": "js",
|
|
215
|
+
"name": "default",
|
|
216
|
+
"declaration": {
|
|
217
|
+
"name": "9.2.0",
|
|
218
|
+
"module": "src/iconVersion.js"
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
]
|
|
222
|
+
},
|
|
223
|
+
{
|
|
224
|
+
"kind": "javascript-module",
|
|
225
|
+
"path": "src/index.js",
|
|
226
|
+
"declarations": [],
|
|
227
|
+
"exports": [
|
|
228
|
+
{
|
|
229
|
+
"kind": "js",
|
|
230
|
+
"name": "AuroAlert",
|
|
231
|
+
"declaration": {
|
|
232
|
+
"name": "AuroAlert",
|
|
233
|
+
"module": "src/index.js"
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
]
|
|
237
|
+
},
|
|
238
|
+
{
|
|
239
|
+
"kind": "javascript-module",
|
|
240
|
+
"path": "src/registered.js",
|
|
241
|
+
"declarations": [],
|
|
242
|
+
"exports": []
|
|
243
|
+
}
|
|
244
|
+
]
|
|
245
|
+
}
|