@aurodesignsystem-dev/auro-banner 0.0.0-pr134.0 → 0.0.0-pr135.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,26 +12,26 @@ 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
  # Banner
21
21
 
22
22
  <!-- AURO-GENERATED-CONTENT:START (FILE:src=./docs/partials/description.md) -->
23
23
  <!-- The below content is automatically added from ./docs/partials/description.md -->
24
- The `<auro-banner>` element provides users a flexible way to convey a summary of information. The primary elements of a banner include an image, and details.
24
+ The `<auro-banner>` element highlights a short message to draw attention or point people to more information. A banner combines an image with text, and the layout decides which parts it shows.
25
25
 
26
- The details are broken down into `prefix`, `title`, `description`, `action`, and `disclaimer`.
26
+ The text goes in the `prefix`, `title`, `description`, `action`, and `disclaimer` slots.
27
27
  <!-- AURO-GENERATED-CONTENT:END -->
28
28
  <!-- AURO-GENERATED-CONTENT:START (FILE:src=./docs/partials/readmeAddlInfo.md) -->
29
29
  <!-- The below content is automatically added from ./docs/partials/readmeAddlInfo.md -->
30
30
  <!-- 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. -->
31
- **Do not** use `<auro-banner>` as a primary source of information.
31
+ **Don't** use `<auro-banner>` as the main source of information on a page.
32
32
  <!-- AURO-GENERATED-CONTENT:END -->
33
33
 
34
- ## Use Cases
34
+ ## Use cases
35
35
 
36
36
  <!-- AURO-GENERATED-CONTENT:START (FILE:src=./docs/partials/useCases.md) -->
37
37
  <!-- The below content is automatically added from ./docs/partials/useCases.md -->
@@ -49,156 +49,143 @@ Use the `<auro-banner>` element to:
49
49
  [![License](https://img.shields.io/npm/l/@aurodesignsystem/auro-banner?color=blue&style=for-the-badge)](https://www.apache.org/licenses/LICENSE-2.0)
50
50
  ![ESM supported](https://img.shields.io/badge/ESM-compatible-FFE900?style=for-the-badge)
51
51
 
52
- ```shell
53
- $ npm i @aurodesignsystem/auro-banner
54
- ```
52
+ <pre class="language-shell"><code class="language-shell">$ npm i @aurodesignsystem/auro-banner</code></pre>
55
53
 
56
54
  <!-- AURO-GENERATED-CONTENT:END -->
57
55
 
58
- ### Define Dependency in Project
56
+ ### Define dependency in project
59
57
 
60
58
  <!-- AURO-GENERATED-CONTENT:START (REMOTE:url=https://raw.githubusercontent.com/AlaskaAirlines/auro-templates/main/templates/default/partials/usage/componentImportDescription.md) -->
61
- Defining the dependency within each project that is using the `<auro-banner>` component.
59
+ Import the component in each project that uses `<auro-banner>`.
62
60
 
63
61
  <!-- AURO-GENERATED-CONTENT:END -->
64
62
  <!-- AURO-GENERATED-CONTENT:START (REMOTE:url=https://raw.githubusercontent.com/AlaskaAirlines/auro-templates/main/templates/default/partials/usage/componentImport.md) -->
65
63
 
66
- ```js
67
- import "@aurodesignsystem/auro-banner";
68
- ```
64
+ <pre class="language-js"><code class="language-js">import "@aurodesignsystem/auro-banner";</code></pre>
69
65
 
70
66
  <!-- AURO-GENERATED-CONTENT:END -->
71
67
 
72
68
  ### Use CDN
73
69
 
74
70
  <!-- AURO-GENERATED-CONTENT:START (REMOTE:url=https://raw.githubusercontent.com/AlaskaAirlines/auro-templates/main/templates/default/partials/usage/bundleInstallDescription.md) -->
75
- 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.
71
+ If your project can't process JS assets, use the pre-processed assets. Legacy browsers, such as IE11, aren't supported.
76
72
 
77
- ```html
78
- <script type="module" src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-banner@latest/+esm"></script>
79
- ```
73
+ <pre class="language-html"><code class="language-html">&lt;script type="module" src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-banner@latest/+esm"&gt;&lt;/script&gt;</code></pre>
80
74
 
81
75
  <!-- AURO-GENERATED-CONTENT:END -->
82
76
 
83
- ## Basic Example
77
+ ## Basic example
84
78
 
85
79
  <!-- AURO-GENERATED-CONTENT:START (CODE:src=./apiExamples/basic.html) -->
86
80
  <!-- The below code snippet is automatically added from ./apiExamples/basic.html -->
87
81
 
88
- ```html
89
- <auro-banner billboard>
90
- <picture slot="displayImage">
91
- <source srcset="https://picsum.photos/id/196/1124/800" media="(min-width: 1024px)">
92
- <source srcset="https://picsum.photos/id/196/1124/1000" media="(min-width: 768px)">
93
- <source srcset="https://picsum.photos/id/196/736/750" media="(min-width: 736px)">
94
- <source srcset="https://picsum.photos/id/196/736/1400" media="(min-width: 375px)">
95
- <source srcset="https://picsum.photos/id/196/320/700" media="(min-width: 320px)">
96
- <img src="https://picsum.photos/id/196/225/550" alt="" />
97
- </picture>
98
- <img
82
+ <pre class="language-html"><code class="language-html">&lt;auro-banner billboard&gt;
83
+ &lt;picture slot="displayImage"&gt;
84
+ &lt;source srcset="https://picsum.photos/id/196/1124/800" media="(min-width: 1024px)"&gt;
85
+ &lt;source srcset="https://picsum.photos/id/196/1124/1000" media="(min-width: 768px)"&gt;
86
+ &lt;source srcset="https://picsum.photos/id/196/736/750" media="(min-width: 736px)"&gt;
87
+ &lt;source srcset="https://picsum.photos/id/196/736/1400" media="(min-width: 375px)"&gt;
88
+ &lt;source srcset="https://picsum.photos/id/196/320/700" media="(min-width: 320px)"&gt;
89
+ &lt;img src="https://picsum.photos/id/196/225/550" alt="" /&gt;
90
+ &lt;/picture&gt;
91
+ &lt;img
99
92
  slot="contentImage"
100
93
  src="https://images.contentstack.io/v3/assets/blt2cefe12c88e9dd91/bltc1fa673bb196d177/6633f3de693c294c708b20de/oneworld-travel-bright-Horizontal-300.png"
101
- alt="Random insert"/>
102
- <p slot="description">
103
- We’ll explain any additional costs before you book your car rental. More details on what’s included? Just check the Ts&Cs of any car.
104
- </p>
105
- <auro-hyperlink
94
+ alt="oneworld"/&gt;
95
+ &lt;p slot="description"&gt;
96
+ We’ll explain any additional costs before you book your car rental. More details on what’s included? Just check the Ts&amp;Cs of any car.
97
+ &lt;/p&gt;
98
+ &lt;auro-hyperlink
106
99
  type="cta"
107
100
  variant="secondary"
108
101
  href="/"
109
102
  slot="action"
110
- target="_blank">
103
+ target="_blank"&gt;
111
104
  More info
112
- </auro-hyperlink>
113
- </auro-banner>
114
- ```
105
+ &lt;/auro-hyperlink&gt;
106
+ &lt;/auro-banner&gt;</code></pre>
115
107
  <!-- AURO-GENERATED-CONTENT:END -->
116
108
 
117
- ## Custom Component Registration for Version Management
109
+ ## Custom component registration for version management
118
110
 
119
- 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.
111
+ 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.
120
112
  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
113
 
122
- When you install the component as described on the `Install` page, the class is imported automatically, and the component is registered globally for you.
114
+ Installing the component as described in the Install section imports the class and registers the component globally for you.
123
115
 
124
- 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.
116
+ 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.
125
117
 
126
- You can do this by importing only the component class and using the `register(name)` method with a unique name:
118
+ To do this, import only the component class and call the `register(name)` method with a unique name:
127
119
 
128
120
  <!-- AURO-GENERATED-CONTENT:START (FILE:src=./docs/partials/customRegistration.md) -->
129
121
  <!-- The below content is automatically added from ./docs/partials/customRegistration.md -->
130
122
 
131
- ```js
132
- // Import the class only
123
+ <pre class="language-js"><code class="language-js">// Import the class only
133
124
  import { AuroBanner } from '@aurodesignsystem/auro-banner/class';
125
+ &#10;// Register with a custom name if desired
126
+ AuroBanner.register('custom-banner');</code></pre>
134
127
 
135
- // Register with a custom name if desired
136
- AuroBanner.register('custom-banner');
137
- ```
138
-
139
- This will create a new custom element `<custom-banner>` that behaves exactly like `<auro-banner>`, allowing both sets of components to coexist on the same page without interfering with each other.
128
+ This creates a `<custom-banner>` element that works exactly like `<auro-banner>`, so both can be used on the same page without affecting each other.
140
129
  <!-- AURO-GENERATED-CONTENT:END -->
141
130
  <div class="exampleWrapper exampleWrapper--flex">
142
- <!-- AURO-GENERATED-CONTENT:START (FILE:src=./apiExamples/custom.html) -->
143
- <!-- The below content is automatically added from ./apiExamples/custom.html -->
144
- <custom-banner billboard>
145
- <picture slot="displayImage">
146
- <source srcset="https://picsum.photos/id/196/1124/800" media="(min-width: 1024px)">
147
- <source srcset="https://picsum.photos/id/196/1124/1000" media="(min-width: 768px)">
148
- <source srcset="https://picsum.photos/id/196/736/750" media="(min-width: 736px)">
149
- <source srcset="https://picsum.photos/id/196/736/1400" media="(min-width: 375px)">
150
- <source srcset="https://picsum.photos/id/196/320/700" media="(min-width: 320px)">
151
- <img src="https://picsum.photos/id/196/225/550" alt="" />
152
- </picture>
153
- <img
131
+ <!-- AURO-GENERATED-CONTENT:START (FILE:src=./apiExamples/custom.html) -->
132
+ <!-- The below content is automatically added from ./apiExamples/custom.html -->
133
+ <custom-banner billboard>
134
+ <picture slot="displayImage">
135
+ <source srcset="https://picsum.photos/id/196/1124/800" media="(min-width: 1024px)">
136
+ <source srcset="https://picsum.photos/id/196/1124/1000" media="(min-width: 768px)">
137
+ <source srcset="https://picsum.photos/id/196/736/750" media="(min-width: 736px)">
138
+ <source srcset="https://picsum.photos/id/196/736/1400" media="(min-width: 375px)">
139
+ <source srcset="https://picsum.photos/id/196/320/700" media="(min-width: 320px)">
140
+ <img src="https://picsum.photos/id/196/225/550" alt="" />
141
+ </picture>
142
+ <img
154
143
  slot="contentImage"
155
144
  src="https://images.contentstack.io/v3/assets/blt2cefe12c88e9dd91/bltc1fa673bb196d177/6633f3de693c294c708b20de/oneworld-travel-bright-Horizontal-300.png"
156
- alt="Random insert"/>
157
- <p slot="description">
145
+ alt="oneworld"/>
146
+ <p slot="description">
158
147
  We’ll explain any additional costs before you book your car rental. More details on what’s included? Just check the Ts&Cs of any car.
159
- </p>
160
- <auro-hyperlink
148
+ </p>
149
+ <auro-hyperlink
161
150
  type="cta"
162
151
  variant="secondary"
163
152
  href="/"
164
153
  slot="action"
165
154
  target="_blank">
166
155
  More info
167
- </auro-hyperlink>
168
- </custom-banner>
169
- <!-- AURO-GENERATED-CONTENT:END -->
156
+ </auro-hyperlink>
157
+ </custom-banner>
158
+ <!-- AURO-GENERATED-CONTENT:END -->
170
159
  </div>
171
160
  <auro-accordion alignRight>
172
- <span slot="trigger">See code</span>
161
+ <span slot="trigger">See code</span>
173
162
  <!-- AURO-GENERATED-CONTENT:START (CODE:src=./apiExamples/custom.html) -->
174
163
  <!-- The below code snippet is automatically added from ./apiExamples/custom.html -->
175
164
 
176
- ```html
177
- <custom-banner billboard>
178
- <picture slot="displayImage">
179
- <source srcset="https://picsum.photos/id/196/1124/800" media="(min-width: 1024px)">
180
- <source srcset="https://picsum.photos/id/196/1124/1000" media="(min-width: 768px)">
181
- <source srcset="https://picsum.photos/id/196/736/750" media="(min-width: 736px)">
182
- <source srcset="https://picsum.photos/id/196/736/1400" media="(min-width: 375px)">
183
- <source srcset="https://picsum.photos/id/196/320/700" media="(min-width: 320px)">
184
- <img src="https://picsum.photos/id/196/225/550" alt="" />
185
- </picture>
186
- <img
165
+ <pre class="language-html"><code class="language-html">&lt;custom-banner billboard&gt;
166
+ &lt;picture slot="displayImage"&gt;
167
+ &lt;source srcset="https://picsum.photos/id/196/1124/800" media="(min-width: 1024px)"&gt;
168
+ &lt;source srcset="https://picsum.photos/id/196/1124/1000" media="(min-width: 768px)"&gt;
169
+ &lt;source srcset="https://picsum.photos/id/196/736/750" media="(min-width: 736px)"&gt;
170
+ &lt;source srcset="https://picsum.photos/id/196/736/1400" media="(min-width: 375px)"&gt;
171
+ &lt;source srcset="https://picsum.photos/id/196/320/700" media="(min-width: 320px)"&gt;
172
+ &lt;img src="https://picsum.photos/id/196/225/550" alt="" /&gt;
173
+ &lt;/picture&gt;
174
+ &lt;img
187
175
  slot="contentImage"
188
176
  src="https://images.contentstack.io/v3/assets/blt2cefe12c88e9dd91/bltc1fa673bb196d177/6633f3de693c294c708b20de/oneworld-travel-bright-Horizontal-300.png"
189
- alt="Random insert"/>
190
- <p slot="description">
191
- We’ll explain any additional costs before you book your car rental. More details on what’s included? Just check the Ts&Cs of any car.
192
- </p>
193
- <auro-hyperlink
177
+ alt="oneworld"/&gt;
178
+ &lt;p slot="description"&gt;
179
+ We’ll explain any additional costs before you book your car rental. More details on what’s included? Just check the Ts&amp;Cs of any car.
180
+ &lt;/p&gt;
181
+ &lt;auro-hyperlink
194
182
  type="cta"
195
183
  variant="secondary"
196
184
  href="/"
197
185
  slot="action"
198
- target="_blank">
186
+ target="_blank"&gt;
199
187
  More info
200
- </auro-hyperlink>
201
- </custom-banner>
202
- ```
188
+ &lt;/auro-hyperlink&gt;
189
+ &lt;/custom-banner&gt;</code></pre>
203
190
  <!-- AURO-GENERATED-CONTENT:END -->
204
191
  </auro-accordion>