@aurodesignsystem-dev/auro-alert 0.0.0-pr122.0 → 0.0.0-pr124.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 CHANGED
@@ -12,9 +12,9 @@ The following sections are editable by making changes to the following files:
12
12
  | SECTION | DESCRIPTION | FILE LOCATION |
13
13
  |------------------------|---------------------------------------------------|-------------------------------------|
14
14
  | Description | Description of the component | `./docs/partials/description.md` |
15
- | Use Cases | Examples for when to use this component | `./docs/partials/useCases.md` |
16
- | Additional Information | For use to add any component specific information | `./docs/partials/readmeAddlInfo.md` |
17
- | Component Example Code | HTML sample code of the components use | `./apiExamples/basic.html` |
15
+ | Use cases | Examples for when to use this component | `./docs/partials/useCases.md` |
16
+ | Additional information | For use to add any component specific information | `./docs/partials/readmeAddlInfo.md` |
17
+ | Component example code | HTML sample code of the components use | `./apiExamples/basic.html` |
18
18
  -->
19
19
 
20
20
  # Alert
@@ -28,13 +28,13 @@ The `auro-alert` component renders inline notifications with automatic styling b
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
- ## Use Cases
31
+ ## Use cases
32
32
 
33
33
  <!-- AURO-GENERATED-CONTENT:START (FILE:src=./docs/partials/useCases.md) -->
34
34
  <!-- The below content is automatically added from ./docs/partials/useCases.md -->
35
- The `auro-alert` element should be used:
35
+ Use `auro-alert` to:
36
36
 
37
- * To communicate important, time-sensitive or state-changing information to users
37
+ * Communicate important, time-sensitive, or state-changing information to users.
38
38
  <!-- AURO-GENERATED-CONTENT:END -->
39
39
 
40
40
  ## Install
@@ -45,84 +45,71 @@ The `auro-alert` element should be used:
45
45
  [![License](https://img.shields.io/npm/l/@aurodesignsystem/auro-alert?color=blue&style=for-the-badge)](https://www.apache.org/licenses/LICENSE-2.0)
46
46
  ![ESM supported](https://img.shields.io/badge/ESM-compatible-FFE900?style=for-the-badge)
47
47
 
48
- ```shell
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
 
54
- ### Define Dependency in Project
52
+ ### Define dependency in project
55
53
 
56
54
  <!-- AURO-GENERATED-CONTENT:START (REMOTE:url=https://raw.githubusercontent.com/AlaskaAirlines/auro-templates/main/templates/default/partials/usage/componentImportDescription.md) -->
57
- Defining the dependency within each project that is using the `<auro-alert>` component.
55
+ Import the component in each project that uses `<auro-alert>`.
58
56
 
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
- ```js
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
 
68
64
  ### Use CDN
69
65
 
70
66
  <!-- AURO-GENERATED-CONTENT:START (REMOTE:url=https://raw.githubusercontent.com/AlaskaAirlines/auro-templates/main/templates/default/partials/usage/bundleInstallDescription.md) -->
71
- 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.
67
+ If your project can't process JS assets, use the pre-processed assets. Legacy browsers, such as IE11, aren't supported.
72
68
 
73
- ```html
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">&lt;script type="module" src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-alert@latest/+esm"&gt;&lt;/script&gt;</code></pre>
76
70
 
77
71
  <!-- AURO-GENERATED-CONTENT:END -->
78
72
 
79
- ## Basic Example
73
+ ## Basic example
80
74
 
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
- ```html
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">&lt;auro-alert&gt;This is a default alert with no type set.&lt;/auro-alert&gt;</code></pre>
87
79
  <!-- AURO-GENERATED-CONTENT:END -->
88
80
 
89
- ## Custom Component Registration for Version Management
81
+ ## Custom component registration for version management
90
82
 
91
- 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.
83
+ Every Auro component has two key parts: the <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes">class</a> and the custom element definition.
92
84
  The class defines the component’s behavior, while the custom element registers it under a specific name so it can be used in HTML.
93
85
 
94
- When you install the component as described on the `Install` page, the class is imported automatically, and the component is registered globally for you.
86
+ Installing the component as described in the Install section imports the class and registers the component globally for you.
95
87
 
96
- 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.
88
+ 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), register the class manually under a custom element name to avoid conflicts.
97
89
 
98
- You can do this by importing only the component class and using the `register(name)` method with a unique name:
90
+ To do this, import only the component class and call the `register(name)` method with a unique name:
99
91
 
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
- ```js
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';
97
+ &#10;// Register with a custom name if desired
98
+ AuroAlert.register('custom-alert');</code></pre>
106
99
 
107
- // Register with a custom name if desired
108
- AuroAlert.register('custom-alert');
109
- ```
110
-
111
- 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.
100
+ This creates a `<custom-alert>` element that behaves exactly like `<auro-alert>`, so both can exist on the same page without interfering with each other.
112
101
  <!-- AURO-GENERATED-CONTENT:END -->
113
102
  <div class="exampleWrapper exampleWrapper--flex">
114
- <!-- AURO-GENERATED-CONTENT:START (FILE:src=./apiExamples/custom.html) -->
115
- <!-- The below content is automatically added from ./apiExamples/custom.html -->
116
- <custom-alert type="warning">Salutations World!</custom-alert>
117
- <!-- AURO-GENERATED-CONTENT:END -->
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
- <span slot="trigger">See code</span>
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
- ```html
125
- <custom-alert type="warning">Salutations World!</custom-alert>
126
- ```
113
+ <pre class="language-html"><code class="language-html">&lt;custom-alert type="warning"&gt;Salutations World!&lt;/custom-alert&gt;</code></pre>
127
114
  <!-- AURO-GENERATED-CONTENT:END -->
128
115
  </auro-accordion>
package/demo/api.md CHANGED
@@ -3,23 +3,32 @@
3
3
 
4
4
  # auro-alert
5
5
 
6
- The `auro-alert` element is used to provide contextual feedback messages for typical user actions.
6
+ Shows an inline message that gives feedback about a user action, such as an error, success, warning, or information message.
7
+
8
+ **Key capabilities**
9
+ - **Alert types**: Set `type` to `error`, `information`, `success`, or `warning` to change the icon and border color.
10
+ - **Optional icon**: Set `noIcon` to remove the icon.
11
+ - **Hiding**: Set `hidden` to hide the alert from everyone, `hiddenVisually` to hide it visually but keep it available to screen readers, or `hiddenAudible` to keep it visible but hidden from screen readers.
12
+ - **Custom content**: The default slot accepts any content, and each `<p>` tag starts a new line.
13
+
14
+ **Example**
15
+ <pre class="language-html"><code class="language-html">&lt;auro-alert type="success"&gt;Your changes are saved.&lt;/auro-alert&gt;</code></pre>
7
16
 
8
- ### Properties & Attributes
17
+ ### Properties and attributes
9
18
 
10
- | Properties | Attributes | Modifiers | Type | Default | Description |
11
- | -------------- | -------------- | --------- | -------------------------------------------------- | ------- | ----------------------------------------------------------------------------------- |
12
- | hidden | hidden | | boolean | | If present, the component will be hidden both visually and from screen readers |
13
- | hiddenAudible | hiddenAudible | | boolean | | If present, the component will be hidden from screen readers, but seen visually |
14
- | hiddenVisually | hiddenVisually | | boolean | | If present, the component will be hidden visually, but still read by screen readers |
15
- | noIcon | noIcon | | boolean | | Removes icon from alert UI when `type` attribute is set |
16
- | type | type | | `information` \| `error` \| `success` \| `warning` | | Component will render visually based on which type value is set |
19
+ | Properties | Attributes | Modifiers | Type | Default | Relevant when | Description |
20
+ | -------------- | -------------- | --------- | -------------------------------------------------- | ------- | ------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
21
+ | hidden | hidden | | boolean | | | Hides the alert both visually and from screen readers. |
22
+ | hiddenAudible | hiddenAudible | | boolean | | | Hides the alert from screen readers while keeping it visible. |
23
+ | hiddenVisually | hiddenVisually | | boolean | | | Hides the alert visually while keeping it available to screen readers. |
24
+ | noIcon | noIcon | | boolean | | `type` | Removes the icon from the alert. Applies only when `type` is set, because an alert without a type has no icon. |
25
+ | type | type | | `information` \| `error` \| `success` \| `warning` | | | Sets the alert's purpose, which controls its icon and border color: `error`, `warning`, `success`, or `information`. Without a value, the alert shows no icon and uses a default border color. |
17
26
 
18
27
  ### Methods
19
28
 
20
- | Name | Parameters | Return | Description |
21
- | -------- | -------------------------------------------------------------------- | ------ | ------------------------------------------------- |
22
- | register | `name` (string) - The name of the element that you want to register. | | This will register this element with the browser. |
29
+ | Name | Parameters | Return | Description |
30
+ | -------- | ------------------------------------------------------------- | ------ | -------------------------------------------------------- |
31
+ | register | `name` (string) - The tag name to register the element under. | | Registers the element with the browser under a tag name. |
23
32
 
24
33
  ### Slots
25
34
 
@@ -27,128 +36,118 @@ The `auro-alert` element is used to provide contextual feedback messages for typ
27
36
  | --------- | ---------------------------------------------------------------------------------------- |
28
37
  | (default) | Provide text for the alert. If using multiple lines, separate each line with `<p>` tags. |
29
38
 
30
- ### CSS Shadow Parts
39
+ ### CSS shadow parts
31
40
 
32
- | Name | Description |
33
- | ------------- | ---------------------------------------------------- |
34
- | alert | Use for customizing the style of the alert container |
35
- | alert-content | Use for customizing the style of the alert content |
41
+ | Name | Description |
42
+ | ------------- | -------------------------------------------------------- |
43
+ | alert | The outer container that holds the icon and the message. |
44
+ | alert-content | The area next to the icon that holds the alert message. |
36
45
  <!-- AURO-GENERATED-CONTENT:END -->
37
46
 
38
47
  ## Basic
39
48
 
40
49
  <div class="exampleWrapper">
41
- <!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/basic.html) -->
42
- <!-- The below content is automatically added from ./../apiExamples/basic.html -->
43
- <auro-alert>This is a default error with no error type specified.</auro-alert>
44
- <!-- AURO-GENERATED-CONTENT:END -->
50
+ <!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/basic.html) -->
51
+ <!-- The below content is automatically added from ./../apiExamples/basic.html -->
52
+ <auro-alert>This is a default alert with no type set.</auro-alert>
53
+ <!-- AURO-GENERATED-CONTENT:END -->
45
54
  </div>
46
55
  <auro-accordion alignRight>
47
- <span slot="trigger">See code</span>
56
+ <span slot="trigger">See code</span>
48
57
  <!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/basic.html) -->
49
58
  <!-- The below code snippet is automatically added from ./../apiExamples/basic.html -->
50
59
 
51
- ```html
52
- <auro-alert>This is a default error with no error type specified.</auro-alert>
53
- ```
60
+ <pre class="language-html"><code class="language-html">&lt;auro-alert&gt;This is a default alert with no type set.&lt;/auro-alert&gt;</code></pre>
54
61
  <!-- AURO-GENERATED-CONTENT:END -->
55
62
  </auro-accordion>
56
63
 
57
- ## Property & Attribute Examples
64
+ ## Property and attribute examples
58
65
 
59
66
  ### Hidden
60
67
 
61
- Use the `hidden` attribute to hide the `auro-alert` component from the user and screenreader.
68
+ Use the `hidden` attribute to hide the alert both visually and from screen readers.
62
69
 
63
70
  <div class="exampleWrapper">
64
- <!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/hidden.html) -->
65
- <!-- The below content is automatically added from ./../apiExamples/hidden.html -->
66
- <auro-alert hidden type="error">This content will be hidden visually and from screen readers.</auro-alert>
67
- <!-- AURO-GENERATED-CONTENT:END -->
71
+ <!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/hidden.html) -->
72
+ <!-- The below content is automatically added from ./../apiExamples/hidden.html -->
73
+ <auro-alert hidden type="error">This content is hidden visually and from screen readers.</auro-alert>
74
+ <!-- AURO-GENERATED-CONTENT:END -->
68
75
  </div>
69
76
  <auro-accordion alignRight>
70
- <span slot="trigger">See code</span>
77
+ <span slot="trigger">See code</span>
71
78
  <!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/hidden.html) -->
72
79
  <!-- The below code snippet is automatically added from ./../apiExamples/hidden.html -->
73
80
 
74
- ```html
75
- <auro-alert hidden type="error">This content will be hidden visually and from screen readers.</auro-alert>
76
- ```
81
+ <pre class="language-html"><code class="language-html">&lt;auro-alert hidden type="error"&gt;This content is hidden visually and from screen readers.&lt;/auro-alert&gt;</code></pre>
77
82
  <!-- AURO-GENERATED-CONTENT:END -->
78
83
  </auro-accordion>
79
84
 
80
- ### Hidden Audibly
85
+ ### Hidden audibly
81
86
 
82
- Use the `hiddenAudible` attribute to hide the `auro-alert` component from the screenreader only.
87
+ Use the `hiddenAudible` attribute to hide the alert from screen readers while keeping it visible.
83
88
 
84
89
  <div class="exampleWrapper">
85
- <!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/hidden-audible.html) -->
86
- <!-- The below content is automatically added from ./../apiExamples/hidden-audible.html -->
87
- <auro-alert hiddenAudible type="error">This content will be hidden from screen readers.</auro-alert>
88
- <!-- AURO-GENERATED-CONTENT:END -->
90
+ <!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/hidden-audible.html) -->
91
+ <!-- The below content is automatically added from ./../apiExamples/hidden-audible.html -->
92
+ <auro-alert hiddenAudible type="error">This content is hidden from screen readers.</auro-alert>
93
+ <!-- AURO-GENERATED-CONTENT:END -->
89
94
  </div>
90
95
  <auro-accordion alignRight>
91
- <span slot="trigger">See code</span>
96
+ <span slot="trigger">See code</span>
92
97
  <!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/hidden-audible.html) -->
93
98
  <!-- The below code snippet is automatically added from ./../apiExamples/hidden-audible.html -->
94
99
 
95
- ```html
96
- <auro-alert hiddenAudible type="error">This content will be hidden from screen readers.</auro-alert>
97
- ```
100
+ <pre class="language-html"><code class="language-html">&lt;auro-alert hiddenAudible type="error"&gt;This content is hidden from screen readers.&lt;/auro-alert&gt;</code></pre>
98
101
  <!-- AURO-GENERATED-CONTENT:END -->
99
102
  </auro-accordion>
100
103
 
101
- ### Hidden Visually
104
+ ### Hidden visually
102
105
 
103
- Use the `hiddenVisually` attribute to visually hide the `auro-alert` component from the user only.
106
+ Use the `hiddenVisually` attribute to hide the alert visually while screen readers still read it.
104
107
 
105
108
  <div class="exampleWrapper">
106
- <!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/hidden-visually.html) -->
107
- <!-- The below content is automatically added from ./../apiExamples/hidden-visually.html -->
108
- <auro-alert hiddenVisually type="error">This content will be hidden visually, but screen readers will still pick it up.</auro-alert>
109
- <!-- AURO-GENERATED-CONTENT:END -->
109
+ <!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/hidden-visually.html) -->
110
+ <!-- The below content is automatically added from ./../apiExamples/hidden-visually.html -->
111
+ <auro-alert hiddenVisually type="error">This content is hidden visually, but screen readers still read it.</auro-alert>
112
+ <!-- AURO-GENERATED-CONTENT:END -->
110
113
  </div>
111
114
  <auro-accordion alignRight>
112
- <span slot="trigger">See code</span>
115
+ <span slot="trigger">See code</span>
113
116
  <!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/hidden-visually.html) -->
114
117
  <!-- The below code snippet is automatically added from ./../apiExamples/hidden-visually.html -->
115
118
 
116
- ```html
117
- <auro-alert hiddenVisually type="error">This content will be hidden visually, but screen readers will still pick it up.</auro-alert>
118
- ```
119
+ <pre class="language-html"><code class="language-html">&lt;auro-alert hiddenVisually type="error"&gt;This content is hidden visually, but screen readers still read it.&lt;/auro-alert&gt;</code></pre>
119
120
  <!-- AURO-GENERATED-CONTENT:END -->
120
121
  </auro-accordion>
121
122
 
122
- ### No Icon
123
+ ### No icon
123
124
 
124
125
  Use the `noIcon` attribute to remove the icon from the alert UI when the `type` attribute is set.
125
126
 
126
127
  <div class="exampleWrapper">
127
- <!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/type-noicon.html) -->
128
- <!-- The below content is automatically added from ./../apiExamples/type-noicon.html -->
129
- <auro-alert noIcon type="error">Transaction failed.</auro-alert>
130
- <br />
131
- <auro-alert noIcon type="information">You are confirmed on Flight 20 to Aruba.</auro-alert>
132
- <br />
133
- <auro-alert noIcon type="success">Your status with flight 20 to Aruba had been updated.</auro-alert>
134
- <br />
135
- <auro-alert noIcon type="warning">Warning. Session timed out. Look for a confirmation email to verify your transaction.</auro-alert>
136
- <!-- AURO-GENERATED-CONTENT:END -->
137
- </div>
138
- <auro-accordion alignRight>
139
- <span slot="trigger">See code</span>
140
- <!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/type-noicon.html) -->
141
- <!-- The below code snippet is automatically added from ./../apiExamples/type-noicon.html -->
142
-
143
- ```html
128
+ <!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/type-noicon.html) -->
129
+ <!-- The below content is automatically added from ./../apiExamples/type-noicon.html -->
144
130
  <auro-alert noIcon type="error">Transaction failed.</auro-alert>
145
131
  <br />
146
132
  <auro-alert noIcon type="information">You are confirmed on Flight 20 to Aruba.</auro-alert>
147
133
  <br />
148
- <auro-alert noIcon type="success">Your status with flight 20 to Aruba had been updated.</auro-alert>
134
+ <auro-alert noIcon type="success">Your status for Flight 20 to Aruba has been updated.</auro-alert>
149
135
  <br />
150
- <auro-alert noIcon type="warning">Warning. Session timed out. Look for a confirmation email to verify your transaction.</auro-alert>
151
- ```
136
+ <auro-alert noIcon type="warning">Warning. Session timed out. Look for a confirmation email to verify your transaction.</auro-alert>
137
+ <!-- AURO-GENERATED-CONTENT:END -->
138
+ </div>
139
+ <auro-accordion alignRight>
140
+ <span slot="trigger">See code</span>
141
+ <!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/type-noicon.html) -->
142
+ <!-- The below code snippet is automatically added from ./../apiExamples/type-noicon.html -->
143
+
144
+ <pre class="language-html"><code class="language-html">&lt;auro-alert noIcon type="error"&gt;Transaction failed.&lt;/auro-alert&gt;
145
+ &lt;br /&gt;
146
+ &lt;auro-alert noIcon type="information"&gt;You are confirmed on Flight 20 to Aruba.&lt;/auro-alert&gt;
147
+ &lt;br /&gt;
148
+ &lt;auro-alert noIcon type="success"&gt;Your status for Flight 20 to Aruba has been updated.&lt;/auro-alert&gt;
149
+ &lt;br /&gt;
150
+ &lt;auro-alert noIcon type="warning"&gt;Warning. Session timed out. Look for a confirmation email to verify your transaction.&lt;/auro-alert&gt;</code></pre>
152
151
  <!-- AURO-GENERATED-CONTENT:END -->
153
152
  </auro-accordion>
154
153
 
@@ -157,137 +156,128 @@ Use the `noIcon` attribute to remove the icon from the alert UI when the `type`
157
156
  Use the `type` attribute to apply an icon and border color that match the alert’s purpose. It supports the following values: `error`, `information`, `success`, and `warning`.
158
157
 
159
158
  <div class="exampleWrapper">
160
- <!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/type.html) -->
161
- <!-- The below content is automatically added from ./../apiExamples/type.html -->
162
- <auro-alert type="error">Transaction failed.</auro-alert>
163
- <br />
164
- <auro-alert type="information">You are confirmed on Flight 20 to Aruba.</auro-alert>
165
- <br />
166
- <auro-alert type="success">Your status with flight 20 to Aruba had been updated.</auro-alert>
167
- <br />
168
- <auro-alert type="warning">Warning. Session timed out. Look for a confirmation email to verify your transaction.</auro-alert>
169
- <!-- AURO-GENERATED-CONTENT:END -->
170
- </div>
171
- <auro-accordion alignRight>
172
- <span slot="trigger">See code</span>
173
- <!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/type.html) -->
174
- <!-- The below code snippet is automatically added from ./../apiExamples/type.html -->
175
-
176
- ```html
159
+ <!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/type.html) -->
160
+ <!-- The below content is automatically added from ./../apiExamples/type.html -->
177
161
  <auro-alert type="error">Transaction failed.</auro-alert>
178
162
  <br />
179
163
  <auro-alert type="information">You are confirmed on Flight 20 to Aruba.</auro-alert>
180
164
  <br />
181
- <auro-alert type="success">Your status with flight 20 to Aruba had been updated.</auro-alert>
165
+ <auro-alert type="success">Your status for Flight 20 to Aruba has been updated.</auro-alert>
182
166
  <br />
183
- <auro-alert type="warning">Warning. Session timed out. Look for a confirmation email to verify your transaction.</auro-alert>
184
- ```
167
+ <auro-alert type="warning">Warning. Session timed out. Look for a confirmation email to verify your transaction.</auro-alert>
168
+ <!-- AURO-GENERATED-CONTENT:END -->
169
+ </div>
170
+ <auro-accordion alignRight>
171
+ <span slot="trigger">See code</span>
172
+ <!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/type.html) -->
173
+ <!-- The below code snippet is automatically added from ./../apiExamples/type.html -->
174
+
175
+ <pre class="language-html"><code class="language-html">&lt;auro-alert type="error"&gt;Transaction failed.&lt;/auro-alert&gt;
176
+ &lt;br /&gt;
177
+ &lt;auro-alert type="information"&gt;You are confirmed on Flight 20 to Aruba.&lt;/auro-alert&gt;
178
+ &lt;br /&gt;
179
+ &lt;auro-alert type="success"&gt;Your status for Flight 20 to Aruba has been updated.&lt;/auro-alert&gt;
180
+ &lt;br /&gt;
181
+ &lt;auro-alert type="warning"&gt;Warning. Session timed out. Look for a confirmation email to verify your transaction.&lt;/auro-alert&gt;</code></pre>
185
182
  <!-- AURO-GENERATED-CONTENT:END -->
186
183
  </auro-accordion>
187
184
 
188
- ## Common Usage Patterns & Functional Examples
185
+ ## Common usage patterns
189
186
 
190
- ### Multi-line Alert
187
+ ### Multi-line alert
191
188
 
192
189
  If you need to present multiple lines in the same alert, wrap each line in a `<p>` tag.
193
190
 
194
191
  <div class="exampleWrapper">
195
- <!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/multiline.html) -->
196
- <!-- The below content is automatically added from ./../apiExamples/multiline.html -->
197
- <auro-alert type="error">
198
- <p>This is error message 1.</p>
199
- <p>This is error message 2.</p>
200
- </auro-alert>
201
- <!-- AURO-GENERATED-CONTENT:END -->
192
+ <!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/multiline.html) -->
193
+ <!-- The below content is automatically added from ./../apiExamples/multiline.html -->
194
+ <auro-alert type="error">
195
+ <p>This is error message 1.</p>
196
+ <p>This is error message 2.</p>
197
+ </auro-alert>
198
+ <!-- AURO-GENERATED-CONTENT:END -->
202
199
  </div>
203
200
  <auro-accordion alignRight>
204
- <span slot="trigger">See code</span>
201
+ <span slot="trigger">See code</span>
205
202
  <!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/multiline.html) -->
206
203
  <!-- The below code snippet is automatically added from ./../apiExamples/multiline.html -->
207
204
 
208
- ```html
209
- <auro-alert type="error">
210
- <p>This is error message 1.</p>
211
- <p>This is error message 2.</p>
212
- </auro-alert>
213
- ```
205
+ <pre class="language-html"><code class="language-html">&lt;auro-alert type="error"&gt;
206
+ &lt;p&gt;This is error message 1.&lt;/p&gt;
207
+ &lt;p&gt;This is error message 2.&lt;/p&gt;
208
+ &lt;/auro-alert&gt;</code></pre>
214
209
  <!-- AURO-GENERATED-CONTENT:END -->
215
210
  </auro-accordion>
216
211
 
217
212
  ### Customize content
218
213
 
219
- While Auro components, `auro-alert` included, come with a pre-defined UI opinion, another feature that is fully supported is a user's ability to customize any content in the slot. The following example illustrates how a user can completely customize the content in the `<slot>` of the element, while not needing to recreate the `auro-alert` UI.
214
+ Put your own content in the default slot to replace the standard alert text. The following example customizes the slot content and keeps the alert's icon and border.
220
215
 
221
216
  <div class="exampleWrapper">
222
- <!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/custom-content.html) -->
223
- <!-- The below content is automatically added from ./../apiExamples/custom-content.html -->
224
- <auro-alert type="information">
225
- <style>
217
+ <!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/custom-content.html) -->
218
+ <!-- The below content is automatically added from ./../apiExamples/custom-content.html -->
219
+ <auro-alert type="information">
220
+ <style>
226
221
  .contentWrapper { padding-top: .25rem; }
227
222
  .contentWrapper * { line-height: 1.2 !important; font-size: var(--ds-text-body-size-sm); }
228
223
  .leanPara { margin: 0 0 var(--ds-size-xs) 0 !important; }
229
224
  .unstyled { padding-left: 20px; }
230
- </style>
231
- <div class="contentWrapper leanPara">
232
- <p class="leanPara">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Interdum varius sit amet mattis vulputate.</p>
233
- <p>Eu nisl nunc mi ipsum faucibus vitae. Tristique senectus et netus et malesuada fames ac turpis. Nunc sed velit dignissim sodales ut. Commodo quis imperdiet massa tincidunt nunc pulvinar sapien et ligula. Vel pharetra vel turpis nunc eget lorem. Vitae sapien pellentesque habitant morbi tristique senectus et. </p>
234
- <ul class="unstyled">
235
- <li>Varius sit amet mattis vulputate enim. </li>
236
- <li>Amet risus nullam eget felis eget nunc. Id consectetur purus ut faucibus pulvinar.</li>
237
- </ul>
238
- <p class="leanPara">Sem viverra aliquet eget sit amet tellus cras adipiscing enim. Porttitor rhoncus dolor purus non enim. Sit amet nulla facilisi morbi tempus iaculis urna id. Nec ullamcorper sit amet risus nullam eget felis.</p>
239
- <p class="fineprint" style="margin: 0;">
225
+ </style>
226
+ <div class="contentWrapper leanPara">
227
+ <p class="leanPara">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Interdum varius sit amet mattis vulputate.</p>
228
+ <p>Eu nisl nunc mi ipsum faucibus vitae. Tristique senectus et netus et malesuada fames ac turpis. Nunc sed velit dignissim sodales ut. Commodo quis imperdiet massa tincidunt nunc pulvinar sapien et ligula. Vel pharetra vel turpis nunc eget lorem. Vitae sapien pellentesque habitant morbi tristique senectus et. </p>
229
+ <ul class="unstyled">
230
+ <li>Varius sit amet mattis vulputate enim. </li>
231
+ <li>Amet risus nullam eget felis eget nunc. Id consectetur purus ut faucibus pulvinar.</li>
232
+ </ul>
233
+ <p class="leanPara">Sem viverra aliquet eget sit amet tellus cras adipiscing enim. Porttitor rhoncus dolor purus non enim. Sit amet nulla facilisi morbi tempus iaculis urna id. Nec ullamcorper sit amet risus nullam eget felis.</p>
234
+ <p class="fineprint" style="margin: 0;">
240
235
  * Non arcu risus quis varius quam quisque id. Euismod elementum nisi quis eleifend quam adipiscing vitae proin sagittis. Nec feugiat nisl pretium fusce id velit ut tortor.
241
- </p>
242
- </div>
243
- </auro-alert>
244
- <!-- AURO-GENERATED-CONTENT:END -->
236
+ </p>
237
+ </div>
238
+ </auro-alert>
239
+ <!-- AURO-GENERATED-CONTENT:END -->
245
240
  </div>
246
241
  <auro-accordion alignRight>
247
- <span slot="trigger">See code</span>
242
+ <span slot="trigger">See code</span>
248
243
  <!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/custom-content.html) -->
249
244
  <!-- The below code snippet is automatically added from ./../apiExamples/custom-content.html -->
250
245
 
251
- ```html
252
- <auro-alert type="information">
253
- <style>
246
+ <pre class="language-html"><code class="language-html">&lt;auro-alert type="information"&gt;
247
+ &lt;style&gt;
254
248
  .contentWrapper { padding-top: .25rem; }
255
249
  .contentWrapper * { line-height: 1.2 !important; font-size: var(--ds-text-body-size-sm); }
256
250
  .leanPara { margin: 0 0 var(--ds-size-xs) 0 !important; }
257
251
  .unstyled { padding-left: 20px; }
258
- </style>
259
- <div class="contentWrapper leanPara">
260
- <p class="leanPara">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Interdum varius sit amet mattis vulputate.</p>
261
- <p>Eu nisl nunc mi ipsum faucibus vitae. Tristique senectus et netus et malesuada fames ac turpis. Nunc sed velit dignissim sodales ut. Commodo quis imperdiet massa tincidunt nunc pulvinar sapien et ligula. Vel pharetra vel turpis nunc eget lorem. Vitae sapien pellentesque habitant morbi tristique senectus et. </p>
262
- <ul class="unstyled">
263
- <li>Varius sit amet mattis vulputate enim. </li>
264
- <li>Amet risus nullam eget felis eget nunc. Id consectetur purus ut faucibus pulvinar.</li>
265
- </ul>
266
- <p class="leanPara">Sem viverra aliquet eget sit amet tellus cras adipiscing enim. Porttitor rhoncus dolor purus non enim. Sit amet nulla facilisi morbi tempus iaculis urna id. Nec ullamcorper sit amet risus nullam eget felis.</p>
267
- <p class="fineprint" style="margin: 0;">
252
+ &lt;/style&gt;
253
+ &lt;div class="contentWrapper leanPara"&gt;
254
+ &lt;p class="leanPara"&gt;Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Interdum varius sit amet mattis vulputate.&lt;/p&gt;
255
+ &lt;p&gt;Eu nisl nunc mi ipsum faucibus vitae. Tristique senectus et netus et malesuada fames ac turpis. Nunc sed velit dignissim sodales ut. Commodo quis imperdiet massa tincidunt nunc pulvinar sapien et ligula. Vel pharetra vel turpis nunc eget lorem. Vitae sapien pellentesque habitant morbi tristique senectus et. &lt;/p&gt;
256
+ &lt;ul class="unstyled"&gt;
257
+ &lt;li&gt;Varius sit amet mattis vulputate enim. &lt;/li&gt;
258
+ &lt;li&gt;Amet risus nullam eget felis eget nunc. Id consectetur purus ut faucibus pulvinar.&lt;/li&gt;
259
+ &lt;/ul&gt;
260
+ &lt;p class="leanPara"&gt;Sem viverra aliquet eget sit amet tellus cras adipiscing enim. Porttitor rhoncus dolor purus non enim. Sit amet nulla facilisi morbi tempus iaculis urna id. Nec ullamcorper sit amet risus nullam eget felis.&lt;/p&gt;
261
+ &lt;p class="fineprint" style="margin: 0;"&gt;
268
262
  * Non arcu risus quis varius quam quisque id. Euismod elementum nisi quis eleifend quam adipiscing vitae proin sagittis. Nec feugiat nisl pretium fusce id velit ut tortor.
269
- </p>
270
- </div>
271
- </auro-alert>
272
- ```
263
+ &lt;/p&gt;
264
+ &lt;/div&gt;
265
+ &lt;/auro-alert&gt;</code></pre>
273
266
  <!-- AURO-GENERATED-CONTENT:END -->
274
267
  </auro-accordion>
275
268
 
276
- ## Restyle Component with CSS Variables
269
+ ## Restyle with CSS custom properties
277
270
 
278
- The component may be restyled by changing the values of the following token(s).
271
+ Restyle the component by changing the values of the following tokens.
279
272
 
280
273
  <!-- AURO-GENERATED-CONTENT:START (CODE:src=./../src/styles/tokens.scss) -->
281
274
  <!-- The below code snippet is automatically added from ./../src/styles/tokens.scss -->
282
275
 
283
- ```scss
284
- @use '@aurodesignsystem/design-tokens/dist/themes/alaska/SCSSVariables--alaska' as v;
285
-
286
- :host {
276
+ <pre class="language-scss"><code class="language-scss">@use '@aurodesignsystem/design-tokens/dist/themes/alaska/SCSSVariables--alaska' as v;
277
+ &#10;:host {
287
278
  --ds-auro-alert-border-color: var(--ds-basic-color-status-default, #{v.$ds-basic-color-status-default});
288
279
  --ds-auro-alert-container-color: var(--ds-basic-color-surface-default, #{v.$ds-basic-color-surface-default});
289
280
  --ds-auro-alert-icon-color: transparent;
290
281
  --ds-auro-alert-text-color: var(--ds-basic-color-texticon-default, #{v.$ds-basic-color-texticon-default});
291
- }
292
- ```
282
+ }</code></pre>
293
283
  <!-- AURO-GENERATED-CONTENT:END -->