@aurodesignsystem/auro-dialog 4.0.0 → 4.1.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/CHANGELOG.md +3 -6
- package/README.md +75 -69
- package/demo/api.html +6 -6
- package/demo/api.js +9 -7
- package/demo/api.md +290 -230
- package/demo/api.min.js +18 -4
- package/demo/auro-dialog.min.js +140 -61
- package/demo/index.html +3 -3
- package/demo/index.md +32 -81
- package/dist/{auro-dialog-GEQYCVM4.js → auro-dialog-BNnIwNXB.js} +42 -25
- package/dist/index.d.ts +230 -118
- package/dist/index.js +1 -1
- package/dist/registered.js +1 -1
- package/package.json +22 -13
package/demo/api.md
CHANGED
|
@@ -3,54 +3,56 @@
|
|
|
3
3
|
|
|
4
4
|
# auro-dialog
|
|
5
5
|
|
|
6
|
-
The auro-dialog appears
|
|
6
|
+
The `auro-dialog` appears on top of the page and presents information that requires the users immediate attention.
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
|
11
|
-
|
|
12
|
-
|
|
|
13
|
-
|
|
|
14
|
-
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
|
19
|
-
|
|
20
|
-
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
|
37
|
-
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
|
46
|
-
|
|
|
47
|
-
|
|
|
48
|
-
|
|
|
8
|
+
### Properties & Attributes
|
|
9
|
+
|
|
10
|
+
| Properties | Attributes | Modifiers | Type | Default | Description |
|
|
11
|
+
| --------------------- | ----------------------- | --------- | ---------------------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
12
|
+
| closeButtonAppearance | close-button-appearance | | `default` \| `inverse` | `default` | Defines whether the close button should be light colored for use on dark backgrounds. |
|
|
13
|
+
| lg | lg | | boolean | | Sets dialog box to large style. Adding both lg and sm/md will set the dialog to lg for mobile and sm/md for desktop.<br>Must be used in conjunction with sm or md to have an effect. |
|
|
14
|
+
| md | md | | boolean | | Sets dialog box to medium style. Adding both md and lg will set the dialog to md for desktop and lg for mobile. |
|
|
15
|
+
| modal | modal | | boolean | | Modal dialog restricts the user to take an action (no default close actions). |
|
|
16
|
+
| onDark | onDark | | boolean | | DEPRECATED - use `close-button-appearance="inverse" instead. |
|
|
17
|
+
| open | open | | boolean | | Sets state of dialog to open. |
|
|
18
|
+
| sm | sm | | boolean | | Sets dialog box to small style. Adding both sm and lg will set the dialog to sm for desktop and lg for mobile. |
|
|
19
|
+
| triggerElement | | | HTMLElement | | The element to focus when the dialog is closed. If not set, defaults to the value of document.activeElement when the dialog is opened. |
|
|
20
|
+
| unformatted | unformatted | | boolean | | Unformatted dialog window, edge-to-edge fill for content. |
|
|
21
|
+
|
|
22
|
+
### Methods
|
|
23
|
+
|
|
24
|
+
| Name | Parameters | Return | Description |
|
|
25
|
+
| -------- | -------------------------------------------------------------------- | ------ | ------------------------------------------------- |
|
|
26
|
+
| register | `name` (string) - The name of the element that you want to register. | | This will register this element with the browser. |
|
|
27
|
+
|
|
28
|
+
### Events
|
|
29
|
+
|
|
30
|
+
| Name | Description |
|
|
31
|
+
| ------ | -------------------------------------- |
|
|
32
|
+
| toggle | Event fires when the element is closed |
|
|
33
|
+
|
|
34
|
+
### Slots
|
|
35
|
+
|
|
36
|
+
| Name | Description |
|
|
37
|
+
| ---------------------- | -------------------------------------------------------------------------------- |
|
|
38
|
+
| ariaLabel.dialog.close | Text to describe the "x" icon close button for screen readers. Default: "Close". |
|
|
39
|
+
| content | Injects content into the body of the modal |
|
|
40
|
+
| footer | Used for action options, e.g. buttons |
|
|
41
|
+
| header | Text to display as the header of the modal |
|
|
42
|
+
|
|
43
|
+
### CSS Shadow Parts
|
|
44
|
+
|
|
45
|
+
| Name | Description |
|
|
46
|
+
| -------------- | -------------------------------------------------------- |
|
|
47
|
+
| close-button | adjust position of the close X icon in the dialog window |
|
|
48
|
+
| dialog | apply CSS to the entire dialog |
|
|
49
|
+
| dialog-content | apply CSS to the content of the dialog |
|
|
50
|
+
| dialog-footer | apply CSS to the footer of the dialog |
|
|
51
|
+
| dialog-header | apply CSS to the header of the dialog |
|
|
52
|
+
| dialog-overlay | apply CSS on the overlay of the dialog |
|
|
49
53
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
50
54
|
|
|
51
|
-
##
|
|
52
|
-
|
|
53
|
-
### Basic
|
|
55
|
+
## Basic
|
|
54
56
|
|
|
55
57
|
<div class="exampleWrapper">
|
|
56
58
|
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/basic.html) -->
|
|
@@ -107,15 +109,27 @@ The auro-dialog appears above the page and requires the user's attention.
|
|
|
107
109
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
108
110
|
</auro-accordion>
|
|
109
111
|
|
|
112
|
+
## Property & Attribute Examples
|
|
113
|
+
|
|
110
114
|
### Size Options
|
|
111
115
|
|
|
112
|
-
The auro-dialog supports three different sizes
|
|
116
|
+
The auro-dialog supports three different sizes via attribute, `sm`, `md`, and `lg`. The default size is `lg`.
|
|
117
|
+
|
|
118
|
+
#### Size Effects
|
|
119
|
+
|
|
120
|
+
##### Desktop
|
|
121
|
+
At desktop resolutions, size affects the width of the dialog, and its height is dictated by its contents with a max height of 80%.
|
|
122
|
+
|
|
123
|
+
##### Mobile
|
|
124
|
+
At mobile resolutions the size affects the maximum height the dialog will use of the browser viewport with a fixed width of 100%.
|
|
113
125
|
|
|
114
|
-
|
|
126
|
+
> *Note: `lg` may be added in addition to `sm` or `md` to force the `lg` size on mobile while using the other size for desktop.*
|
|
127
|
+
|
|
128
|
+
#### Single Size Examples:
|
|
115
129
|
|
|
116
130
|
<div class="exampleWrapper">
|
|
117
|
-
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/
|
|
118
|
-
<!-- The below content is automatically added from ./../apiExamples/
|
|
131
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/size-options.html) -->
|
|
132
|
+
<!-- The below content is automatically added from ./../apiExamples/size-options.html -->
|
|
119
133
|
<div>
|
|
120
134
|
<auro-button id="openDefaultSize">Open default dialog</auro-button>
|
|
121
135
|
<auro-button id="openMediumSize">Open medium dialog</auro-button>
|
|
@@ -176,8 +190,8 @@ The size attribute effects the `width` of the desktop dialog. Its `height` is di
|
|
|
176
190
|
</div>
|
|
177
191
|
<auro-accordion alignRight>
|
|
178
192
|
<span slot="trigger">See code</span>
|
|
179
|
-
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/
|
|
180
|
-
<!-- The below code snippet is automatically added from ./../apiExamples/
|
|
193
|
+
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/size-options.html) -->
|
|
194
|
+
<!-- The below code snippet is automatically added from ./../apiExamples/size-options.html -->
|
|
181
195
|
|
|
182
196
|
```html
|
|
183
197
|
<div>
|
|
@@ -240,9 +254,114 @@ The size attribute effects the `width` of the desktop dialog. Its `height` is di
|
|
|
240
254
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
241
255
|
</auro-accordion>
|
|
242
256
|
|
|
243
|
-
|
|
257
|
+
#### Mixed Size Examples:
|
|
258
|
+
|
|
259
|
+
<div class="exampleWrapper">
|
|
260
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/decoupled.html) -->
|
|
261
|
+
<!-- The below content is automatically added from ./../apiExamples/decoupled.html -->
|
|
262
|
+
<div>
|
|
263
|
+
<auro-button id="openSmLg">Open [sm lg] dialog</auro-button>
|
|
264
|
+
<auro-button id="openMdLg">Open [md lg] dialog</auro-button>
|
|
265
|
+
</div>
|
|
266
|
+
<auro-dialog id="smLgDialog" sm lg>
|
|
267
|
+
<span slot="header">Small Modal Dialog</span>
|
|
268
|
+
<div slot="content">
|
|
269
|
+
<p>When traveling on Alaska Airlines flights, Alaska Airlines checked baggage fees may apply. See <auro-hyperlink href="https://www.alaskaair.com/bagrules" target="_blank">alaskaair.com/bagrules</auro-hyperlink> for our rules. For itineraries that include other airlines, their checked baggage fees may apply, as displayed on their websites.</p>
|
|
270
|
+
<p>Baggage rules and fees will be based on the specific itinerary chosen. The applicable first and second bag fees will be displayed after you have added flights to the cart.</p>
|
|
271
|
+
<auro-header level="3" display="500">Before checking your bags, remember to:</auro-header>
|
|
272
|
+
<ul>
|
|
273
|
+
<li>Caerphilly croque monsieur fondue</li>
|
|
274
|
+
<li>Taleggio goat mascarpone cow manchego cheese and wine emmental cheese strings</li>
|
|
275
|
+
<li>Cheddar cheese and biscuits chalk and cheese</li>
|
|
276
|
+
<li>Camembert de normandie stinking bishop bavarian bergkase</li>
|
|
277
|
+
</ul>
|
|
278
|
+
</div>
|
|
279
|
+
<div slot="footer">
|
|
280
|
+
<auro-button id="closeSmLg">
|
|
281
|
+
I understand
|
|
282
|
+
<auro-icon category="interface" name="check-lg" emphasis appearance="inverse"></auro-icon>
|
|
283
|
+
</auro-button>
|
|
284
|
+
</div>
|
|
285
|
+
</auro-dialog>
|
|
286
|
+
<auro-dialog id="mdLgDialog" md lg>
|
|
287
|
+
<span slot="header">Medium Modal Dialog</span>
|
|
288
|
+
<div slot="content">
|
|
289
|
+
<p>When traveling on Alaska Airlines flights, Alaska Airlines checked baggage fees may apply. See <auro-hyperlink href="https://www.alaskaair.com/bagrules" target="_blank">alaskaair.com/bagrules</auro-hyperlink> for our rules. For itineraries that include other airlines, their checked baggage fees may apply, as displayed on their websites.</p>
|
|
290
|
+
<p>Baggage rules and fees will be based on the specific itinerary chosen. The applicable first and second bag fees will be displayed after you have added flights to the cart.</p>
|
|
291
|
+
<auro-header level="3" display="500">Before checking your bags, remember to:</auro-header>
|
|
292
|
+
<ul>
|
|
293
|
+
<li>Caerphilly croque monsieur fondue</li>
|
|
294
|
+
<li>Taleggio goat mascarpone cow manchego cheese and wine emmental cheese strings</li>
|
|
295
|
+
<li>Cheddar cheese and biscuits chalk and cheese</li>
|
|
296
|
+
<li>Camembert de normandie stinking bishop bavarian bergkase</li>
|
|
297
|
+
</ul>
|
|
298
|
+
</div>
|
|
299
|
+
<div slot="footer">
|
|
300
|
+
<auro-button id="closeMdLg">
|
|
301
|
+
I understand
|
|
302
|
+
<auro-icon category="interface" name="check-lg" emphasis appearance="inverse"></auro-icon>
|
|
303
|
+
</auro-button>
|
|
304
|
+
</div>
|
|
305
|
+
</auro-dialog>
|
|
306
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
307
|
+
</div>
|
|
308
|
+
<auro-accordion alignRight>
|
|
309
|
+
<span slot="trigger">See code</span>
|
|
310
|
+
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/decoupled.html) -->
|
|
311
|
+
<!-- The below code snippet is automatically added from ./../apiExamples/decoupled.html -->
|
|
312
|
+
|
|
313
|
+
```html
|
|
314
|
+
<div>
|
|
315
|
+
<auro-button id="openSmLg">Open [sm lg] dialog</auro-button>
|
|
316
|
+
<auro-button id="openMdLg">Open [md lg] dialog</auro-button>
|
|
317
|
+
</div>
|
|
318
|
+
<auro-dialog id="smLgDialog" sm lg>
|
|
319
|
+
<span slot="header">Small Modal Dialog</span>
|
|
320
|
+
<div slot="content">
|
|
321
|
+
<p>When traveling on Alaska Airlines flights, Alaska Airlines checked baggage fees may apply. See <auro-hyperlink href="https://www.alaskaair.com/bagrules" target="_blank">alaskaair.com/bagrules</auro-hyperlink> for our rules. For itineraries that include other airlines, their checked baggage fees may apply, as displayed on their websites.</p>
|
|
322
|
+
<p>Baggage rules and fees will be based on the specific itinerary chosen. The applicable first and second bag fees will be displayed after you have added flights to the cart.</p>
|
|
323
|
+
<auro-header level="3" display="500">Before checking your bags, remember to:</auro-header>
|
|
324
|
+
<ul>
|
|
325
|
+
<li>Caerphilly croque monsieur fondue</li>
|
|
326
|
+
<li>Taleggio goat mascarpone cow manchego cheese and wine emmental cheese strings</li>
|
|
327
|
+
<li>Cheddar cheese and biscuits chalk and cheese</li>
|
|
328
|
+
<li>Camembert de normandie stinking bishop bavarian bergkase</li>
|
|
329
|
+
</ul>
|
|
330
|
+
</div>
|
|
331
|
+
<div slot="footer">
|
|
332
|
+
<auro-button id="closeSmLg">
|
|
333
|
+
I understand
|
|
334
|
+
<auro-icon category="interface" name="check-lg" emphasis appearance="inverse"></auro-icon>
|
|
335
|
+
</auro-button>
|
|
336
|
+
</div>
|
|
337
|
+
</auro-dialog>
|
|
338
|
+
<auro-dialog id="mdLgDialog" md lg>
|
|
339
|
+
<span slot="header">Medium Modal Dialog</span>
|
|
340
|
+
<div slot="content">
|
|
341
|
+
<p>When traveling on Alaska Airlines flights, Alaska Airlines checked baggage fees may apply. See <auro-hyperlink href="https://www.alaskaair.com/bagrules" target="_blank">alaskaair.com/bagrules</auro-hyperlink> for our rules. For itineraries that include other airlines, their checked baggage fees may apply, as displayed on their websites.</p>
|
|
342
|
+
<p>Baggage rules and fees will be based on the specific itinerary chosen. The applicable first and second bag fees will be displayed after you have added flights to the cart.</p>
|
|
343
|
+
<auro-header level="3" display="500">Before checking your bags, remember to:</auro-header>
|
|
344
|
+
<ul>
|
|
345
|
+
<li>Caerphilly croque monsieur fondue</li>
|
|
346
|
+
<li>Taleggio goat mascarpone cow manchego cheese and wine emmental cheese strings</li>
|
|
347
|
+
<li>Cheddar cheese and biscuits chalk and cheese</li>
|
|
348
|
+
<li>Camembert de normandie stinking bishop bavarian bergkase</li>
|
|
349
|
+
</ul>
|
|
350
|
+
</div>
|
|
351
|
+
<div slot="footer">
|
|
352
|
+
<auro-button id="closeMdLg">
|
|
353
|
+
I understand
|
|
354
|
+
<auro-icon category="interface" name="check-lg" emphasis appearance="inverse"></auro-icon>
|
|
355
|
+
</auro-button>
|
|
356
|
+
</div>
|
|
357
|
+
</auro-dialog>
|
|
358
|
+
```
|
|
359
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
360
|
+
</auro-accordion>
|
|
361
|
+
|
|
362
|
+
### Modal
|
|
244
363
|
|
|
245
|
-
The auro-dialog supports a modal dialog state that will lock a user into interacting with the modal dialog
|
|
364
|
+
The auro-dialog supports a modal dialog state that will lock a user into interacting with the modal dialog via the `modal` attribute.
|
|
246
365
|
|
|
247
366
|
When using this state, the modal dialog must include a button action to dismiss the modal dialog as the closing icon will not be available and the user will not be able to click outside the `modal` dialog to dismiss.
|
|
248
367
|
|
|
@@ -269,7 +388,7 @@ When using this state, the modal dialog must include a button action to dismiss
|
|
|
269
388
|
</div>
|
|
270
389
|
<div slot="footer">
|
|
271
390
|
<auro-button id="closeDefaultModal">I understand
|
|
272
|
-
<auro-icon category="interface" name="chevron-right" emphasis
|
|
391
|
+
<auro-icon category="interface" name="chevron-right" emphasis appearance="inverse"></auro-icon>
|
|
273
392
|
</auro-button>
|
|
274
393
|
</div>
|
|
275
394
|
</auro-dialog>
|
|
@@ -288,7 +407,7 @@ When using this state, the modal dialog must include a button action to dismiss
|
|
|
288
407
|
</div>
|
|
289
408
|
<div slot="footer">
|
|
290
409
|
<auro-button id="closeMediumModal">I understand
|
|
291
|
-
<auro-icon category="interface" name="chevron-right" emphasis
|
|
410
|
+
<auro-icon category="interface" name="chevron-right" emphasis appearance="inverse"></auro-icon>
|
|
292
411
|
</auro-button>
|
|
293
412
|
</div>
|
|
294
413
|
</auro-dialog>
|
|
@@ -307,7 +426,7 @@ When using this state, the modal dialog must include a button action to dismiss
|
|
|
307
426
|
</div>
|
|
308
427
|
<div slot="footer">
|
|
309
428
|
<auro-button id="closeSmallModal">I understand
|
|
310
|
-
<auro-icon category="interface" name="chevron-right" emphasis
|
|
429
|
+
<auro-icon category="interface" name="chevron-right" emphasis appearance="inverse"></auro-icon>
|
|
311
430
|
</auro-button>
|
|
312
431
|
</div>
|
|
313
432
|
</auro-dialog>
|
|
@@ -339,7 +458,7 @@ When using this state, the modal dialog must include a button action to dismiss
|
|
|
339
458
|
</div>
|
|
340
459
|
<div slot="footer">
|
|
341
460
|
<auro-button id="closeDefaultModal">I understand
|
|
342
|
-
<auro-icon category="interface" name="chevron-right" emphasis
|
|
461
|
+
<auro-icon category="interface" name="chevron-right" emphasis appearance="inverse"></auro-icon>
|
|
343
462
|
</auro-button>
|
|
344
463
|
</div>
|
|
345
464
|
</auro-dialog>
|
|
@@ -358,7 +477,7 @@ When using this state, the modal dialog must include a button action to dismiss
|
|
|
358
477
|
</div>
|
|
359
478
|
<div slot="footer">
|
|
360
479
|
<auro-button id="closeMediumModal">I understand
|
|
361
|
-
<auro-icon category="interface" name="chevron-right" emphasis
|
|
480
|
+
<auro-icon category="interface" name="chevron-right" emphasis appearance="inverse"></auro-icon>
|
|
362
481
|
</auro-button>
|
|
363
482
|
</div>
|
|
364
483
|
</auro-dialog>
|
|
@@ -377,130 +496,133 @@ When using this state, the modal dialog must include a button action to dismiss
|
|
|
377
496
|
</div>
|
|
378
497
|
<div slot="footer">
|
|
379
498
|
<auro-button id="closeSmallModal">I understand
|
|
380
|
-
<auro-icon category="interface" name="chevron-right" emphasis
|
|
499
|
+
<auro-icon category="interface" name="chevron-right" emphasis appearance="inverse"></auro-icon>
|
|
381
500
|
</auro-button>
|
|
382
501
|
</div>
|
|
383
502
|
</auro-dialog>
|
|
384
503
|
```
|
|
385
|
-
<!-- AURO-GENERATED-CONTENT:END -->
|
|
504
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
386
505
|
</auro-accordion>
|
|
387
506
|
|
|
388
|
-
|
|
507
|
+
### Unformatted dialog
|
|
508
|
+
|
|
509
|
+
For use case where the use of a dialog is to be more freeform, but the experience and base tooling for the dialog are still requested, there is the `unformatted` property.
|
|
389
510
|
|
|
390
|
-
|
|
511
|
+
This property can be used in combination with any other use case of the dialog, but it will render an unformatted dialog window, allowing for full customization of content within the scope of the window.
|
|
512
|
+
|
|
513
|
+
## Slot Examples
|
|
514
|
+
|
|
515
|
+
### Close button aria-label slot
|
|
391
516
|
|
|
392
|
-
|
|
517
|
+
To customize the aria-label text for the close button, use the `ariaLabel.dialog.close` slot to provide custom text. If no text is provided, the default text `"Close"` will be used.
|
|
393
518
|
|
|
394
519
|
<div class="exampleWrapper">
|
|
395
|
-
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/
|
|
396
|
-
<!-- The below content is automatically added from ./../apiExamples/
|
|
520
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/aria-label.html) -->
|
|
521
|
+
<!-- The below content is automatically added from ./../apiExamples/aria-label.html -->
|
|
397
522
|
<div>
|
|
398
|
-
<auro-button id="
|
|
399
|
-
<auro-button id="openMdLg">Open [md lg] dialog</auro-button>
|
|
523
|
+
<auro-button id="openAriaLabelSlot">Unformatted Dialog w/ custom close button aria-label</auro-button>
|
|
400
524
|
</div>
|
|
401
|
-
<auro-dialog id="
|
|
402
|
-
<span slot="
|
|
403
|
-
<
|
|
404
|
-
<
|
|
405
|
-
<
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
<li>Cheddar cheese and biscuits chalk and cheese</li>
|
|
411
|
-
<li>Camembert de normandie stinking bishop bavarian bergkase</li>
|
|
412
|
-
</ul>
|
|
413
|
-
</div>
|
|
414
|
-
<div slot="footer">
|
|
415
|
-
<auro-button id="closeSmLg">
|
|
416
|
-
I understand
|
|
417
|
-
<auro-icon category="interface" name="check-lg" emphasis onDark></auro-icon>
|
|
418
|
-
</auro-button>
|
|
419
|
-
</div>
|
|
420
|
-
</auro-dialog>
|
|
421
|
-
<auro-dialog id="mdLgDialog" md lg>
|
|
422
|
-
<span slot="header">Medium Modal Dialog</span>
|
|
423
|
-
<div slot="content">
|
|
424
|
-
<p>When traveling on Alaska Airlines flights, Alaska Airlines checked baggage fees may apply. See <auro-hyperlink href="https://www.alaskaair.com/bagrules" target="_blank">alaskaair.com/bagrules</auro-hyperlink> for our rules. For itineraries that include other airlines, their checked baggage fees may apply, as displayed on their websites.</p>
|
|
425
|
-
<p>Baggage rules and fees will be based on the specific itinerary chosen. The applicable first and second bag fees will be displayed after you have added flights to the cart.</p>
|
|
426
|
-
<auro-header level="3" display="500">Before checking your bags, remember to:</auro-header>
|
|
427
|
-
<ul>
|
|
428
|
-
<li>Caerphilly croque monsieur fondue</li>
|
|
429
|
-
<li>Taleggio goat mascarpone cow manchego cheese and wine emmental cheese strings</li>
|
|
430
|
-
<li>Cheddar cheese and biscuits chalk and cheese</li>
|
|
431
|
-
<li>Camembert de normandie stinking bishop bavarian bergkase</li>
|
|
432
|
-
</ul>
|
|
433
|
-
</div>
|
|
434
|
-
<div slot="footer">
|
|
435
|
-
<auro-button id="closeMdLg">
|
|
436
|
-
I understand
|
|
437
|
-
<auro-icon category="interface" name="check-lg" emphasis onDark></auro-icon>
|
|
438
|
-
</auro-button>
|
|
439
|
-
</div>
|
|
525
|
+
<auro-dialog id="ariaLabelMdDialog" unformatted md lg ondark>
|
|
526
|
+
<span slot="ariaLabel.dialog.close">This will be the new aria label for the close button</span>
|
|
527
|
+
<span slot="content">
|
|
528
|
+
<img style="display: block; width: 100%" src="https://blog.alaskaair.com/wp-content/uploads/2020/11/111-psp-blog-img-guide.jpg" alt="alaska airlines pride lights" />
|
|
529
|
+
<div class="unformattedWrapper">
|
|
530
|
+
<h1 id="dialog-header" class="heading-lg">This is a header</h1>
|
|
531
|
+
These are words that are slotted into the scope of the custom element.
|
|
532
|
+
</div>
|
|
533
|
+
</span>
|
|
440
534
|
</auro-dialog>
|
|
441
535
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
442
536
|
</div>
|
|
443
537
|
<auro-accordion alignRight>
|
|
444
538
|
<span slot="trigger">See code</span>
|
|
445
|
-
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/
|
|
446
|
-
<!-- The below code snippet is automatically added from ./../apiExamples/
|
|
539
|
+
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/aria-label.html) -->
|
|
540
|
+
<!-- The below code snippet is automatically added from ./../apiExamples/aria-label.html -->
|
|
447
541
|
|
|
448
542
|
```html
|
|
449
543
|
<div>
|
|
450
|
-
<auro-button id="
|
|
451
|
-
<auro-button id="openMdLg">Open [md lg] dialog</auro-button>
|
|
544
|
+
<auro-button id="openAriaLabelSlot">Unformatted Dialog w/ custom close button aria-label</auro-button>
|
|
452
545
|
</div>
|
|
453
|
-
<auro-dialog id="
|
|
454
|
-
<span slot="
|
|
455
|
-
<
|
|
456
|
-
<
|
|
457
|
-
<
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
<li>Cheddar cheese and biscuits chalk and cheese</li>
|
|
463
|
-
<li>Camembert de normandie stinking bishop bavarian bergkase</li>
|
|
464
|
-
</ul>
|
|
465
|
-
</div>
|
|
466
|
-
<div slot="footer">
|
|
467
|
-
<auro-button id="closeSmLg">
|
|
468
|
-
I understand
|
|
469
|
-
<auro-icon category="interface" name="check-lg" emphasis onDark></auro-icon>
|
|
470
|
-
</auro-button>
|
|
471
|
-
</div>
|
|
546
|
+
<auro-dialog id="ariaLabelMdDialog" unformatted md lg ondark>
|
|
547
|
+
<span slot="ariaLabel.dialog.close">This will be the new aria label for the close button</span>
|
|
548
|
+
<span slot="content">
|
|
549
|
+
<img style="display: block; width: 100%" src="https://blog.alaskaair.com/wp-content/uploads/2020/11/111-psp-blog-img-guide.jpg" alt="alaska airlines pride lights" />
|
|
550
|
+
<div class="unformattedWrapper">
|
|
551
|
+
<h1 id="dialog-header" class="heading-lg">This is a header</h1>
|
|
552
|
+
These are words that are slotted into the scope of the custom element.
|
|
553
|
+
</div>
|
|
554
|
+
</span>
|
|
472
555
|
</auro-dialog>
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
<div
|
|
487
|
-
<auro-button id="
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
556
|
+
```
|
|
557
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
558
|
+
</auro-accordion>
|
|
559
|
+
|
|
560
|
+
## CSS Shadow Part Examples
|
|
561
|
+
|
|
562
|
+
### Close Button
|
|
563
|
+
|
|
564
|
+
The close button can be targetted via the `close-button` CSS part, e.g. `auro-dialog::part(close-button)`.
|
|
565
|
+
|
|
566
|
+
<div class="exampleWrapper">
|
|
567
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/close-button.html) -->
|
|
568
|
+
<!-- The below content is automatically added from ./../apiExamples/close-button.html -->
|
|
569
|
+
<div>
|
|
570
|
+
<auro-button id="openEditDialog">Unformatted w/custom close button</auro-button>
|
|
571
|
+
</div>
|
|
572
|
+
<style>
|
|
573
|
+
.example::part(close-button) {
|
|
574
|
+
top: var(--ds-size-400);
|
|
575
|
+
right: var(--ds-size-400);
|
|
576
|
+
}
|
|
577
|
+
</style>
|
|
578
|
+
<auro-dialog id="unformattedCustomMdDialog" unformatted md lg class="example">
|
|
579
|
+
<span slot="content">
|
|
580
|
+
<img style="display: block; width: 100%" src="https://worldairlinenews.files.wordpress.com/2022/05/alaska-737-800-sswl-n538as-22-star-warstko-sfo-mdblr-5.4.22.jpg" alt="alaska airlines pride lights" />
|
|
581
|
+
<div class="unformattedWrapper">
|
|
582
|
+
<h1 id="dialog-header" class="heading-lg">Unformatted w/custom close button</h1>
|
|
583
|
+
Notice the custom location of the close button as well as the custom color.
|
|
584
|
+
</div>
|
|
585
|
+
</span>
|
|
586
|
+
</auro-dialog>
|
|
587
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
588
|
+
</div>
|
|
589
|
+
<auro-accordion alignRight>
|
|
590
|
+
<span slot="trigger">See code</span>
|
|
591
|
+
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/close-button.html) -->
|
|
592
|
+
<!-- The below code snippet is automatically added from ./../apiExamples/close-button.html -->
|
|
593
|
+
|
|
594
|
+
```html
|
|
595
|
+
<div>
|
|
596
|
+
<auro-button id="openEditDialog">Unformatted w/custom close button</auro-button>
|
|
597
|
+
</div>
|
|
598
|
+
<style>
|
|
599
|
+
.example::part(close-button) {
|
|
600
|
+
top: var(--ds-size-400);
|
|
601
|
+
right: var(--ds-size-400);
|
|
602
|
+
}
|
|
603
|
+
</style>
|
|
604
|
+
<auro-dialog id="unformattedCustomMdDialog" unformatted md lg class="example">
|
|
605
|
+
<span slot="content">
|
|
606
|
+
<img style="display: block; width: 100%" src="https://worldairlinenews.files.wordpress.com/2022/05/alaska-737-800-sswl-n538as-22-star-warstko-sfo-mdblr-5.4.22.jpg" alt="alaska airlines pride lights" />
|
|
607
|
+
<div class="unformattedWrapper">
|
|
608
|
+
<h1 id="dialog-header" class="heading-lg">Unformatted w/custom close button</h1>
|
|
609
|
+
Notice the custom location of the close button as well as the custom color.
|
|
610
|
+
</div>
|
|
611
|
+
</span>
|
|
492
612
|
</auro-dialog>
|
|
493
613
|
```
|
|
494
614
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
495
615
|
</auro-accordion>
|
|
496
616
|
|
|
497
|
-
##
|
|
617
|
+
## Common Usage Patterns & Functional Examples
|
|
618
|
+
|
|
619
|
+
### Dialog with Popover and Dropdown Components
|
|
498
620
|
|
|
499
621
|
This is a use case where there is a popover and combobox component inside the dialog component, creating a stack of layered components.
|
|
500
622
|
|
|
501
623
|
<div class="exampleWrapper">
|
|
502
|
-
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/
|
|
503
|
-
<!-- The below content is automatically added from ./../apiExamples/
|
|
624
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/popover-and-dropdown.html) -->
|
|
625
|
+
<!-- The below content is automatically added from ./../apiExamples/popover-and-dropdown.html -->
|
|
504
626
|
<div>
|
|
505
627
|
<auro-button id="openPopAndDrop">Open dialog with popover</auro-button>
|
|
506
628
|
</div>
|
|
@@ -542,7 +664,7 @@ This is a use case where there is a popover and combobox component inside the di
|
|
|
542
664
|
<div slot="footer">
|
|
543
665
|
<auro-button id="closePopAndDrop">
|
|
544
666
|
I understand
|
|
545
|
-
<auro-icon category="interface" name="check-lg" emphasis
|
|
667
|
+
<auro-icon category="interface" name="check-lg" emphasis appearance="inverse"></auro-icon>
|
|
546
668
|
</auro-button>
|
|
547
669
|
</div>
|
|
548
670
|
</auro-dialog>
|
|
@@ -550,8 +672,8 @@ This is a use case where there is a popover and combobox component inside the di
|
|
|
550
672
|
</div>
|
|
551
673
|
<auro-accordion alignRight>
|
|
552
674
|
<span slot="trigger">See code</span>
|
|
553
|
-
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/
|
|
554
|
-
<!-- The below code snippet is automatically added from ./../apiExamples/
|
|
675
|
+
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/popover-and-dropdown.html) -->
|
|
676
|
+
<!-- The below code snippet is automatically added from ./../apiExamples/popover-and-dropdown.html -->
|
|
555
677
|
|
|
556
678
|
```html
|
|
557
679
|
<div>
|
|
@@ -595,7 +717,7 @@ This is a use case where there is a popover and combobox component inside the di
|
|
|
595
717
|
<div slot="footer">
|
|
596
718
|
<auro-button id="closePopAndDrop">
|
|
597
719
|
I understand
|
|
598
|
-
<auro-icon category="interface" name="check-lg" emphasis
|
|
720
|
+
<auro-icon category="interface" name="check-lg" emphasis appearance="inverse"></auro-icon>
|
|
599
721
|
</auro-button>
|
|
600
722
|
</div>
|
|
601
723
|
</auro-dialog>
|
|
@@ -603,24 +725,6 @@ This is a use case where there is a popover and combobox component inside the di
|
|
|
603
725
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
604
726
|
</auro-accordion>
|
|
605
727
|
|
|
606
|
-
## Unformatted dialog
|
|
607
|
-
|
|
608
|
-
For use case where the use of a dialog is to be more freeform, but the experience and base tooling for the dialog are still requested, there is the `unformatted` property.
|
|
609
|
-
|
|
610
|
-
This property can be used in combination of any other use case of the dialog, but it will render a unformatted dialog window allowing for full customization of content within the scope of the window.
|
|
611
|
-
|
|
612
|
-
### Responsive padding
|
|
613
|
-
|
|
614
|
-
Part of the dialog design spec is its responsive padding. To take advantage of this for your content within the scope of the dialog, be sure to use the selector `unformattedWrapper` that can be imported from the package here:
|
|
615
|
-
|
|
616
|
-
```css
|
|
617
|
-
import '@aurodesignsystem/auro-dialog/dist/style-unformatted.scss'
|
|
618
|
-
|
|
619
|
-
or
|
|
620
|
-
|
|
621
|
-
import '@aurodesignsystem/auro-dialog@/dist/style-unformatted.css'
|
|
622
|
-
```
|
|
623
|
-
|
|
624
728
|
### Accessibility
|
|
625
729
|
|
|
626
730
|
Within the scope of the auro-dialog there is `aria-labelledby="dialog-header"`. To make proper use of this, in an unformatted dialog, the developer is required to add `id="dialog-header"` to the content header within the dialog content.
|
|
@@ -631,7 +735,7 @@ Within the scope of the auro-dialog there is `aria-labelledby="dialog-header"`.
|
|
|
631
735
|
<div>
|
|
632
736
|
<auro-button id="openAccessibility">Unformatted Medium Dialog</auro-button>
|
|
633
737
|
</div>
|
|
634
|
-
<auro-dialog id="unformattedMdDialog" unformatted md lg
|
|
738
|
+
<auro-dialog id="unformattedMdDialog" unformatted md lg close-button-appearance="inverse">
|
|
635
739
|
<span slot="content">
|
|
636
740
|
<img style="display: block; width: 100%" src="https://blog.alaskaair.com/wp-content/uploads/2020/11/111-psp-blog-img-guide.jpg" alt="alaska airlines pride lights" />
|
|
637
741
|
<div class="unformattedWrapper">
|
|
@@ -651,7 +755,7 @@ Within the scope of the auro-dialog there is `aria-labelledby="dialog-header"`.
|
|
|
651
755
|
<div>
|
|
652
756
|
<auro-button id="openAccessibility">Unformatted Medium Dialog</auro-button>
|
|
653
757
|
</div>
|
|
654
|
-
<auro-dialog id="unformattedMdDialog" unformatted md lg
|
|
758
|
+
<auro-dialog id="unformattedMdDialog" unformatted md lg close-button-appearance="inverse">
|
|
655
759
|
<span slot="content">
|
|
656
760
|
<img style="display: block; width: 100%" src="https://blog.alaskaair.com/wp-content/uploads/2020/11/111-psp-blog-img-guide.jpg" alt="alaska airlines pride lights" />
|
|
657
761
|
<div class="unformattedWrapper">
|
|
@@ -664,67 +768,23 @@ Within the scope of the auro-dialog there is `aria-labelledby="dialog-header"`.
|
|
|
664
768
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
665
769
|
</auro-accordion>
|
|
666
770
|
|
|
667
|
-
###
|
|
771
|
+
### Responsive padding
|
|
668
772
|
|
|
669
|
-
|
|
773
|
+
Part of the dialog design spec is its responsive padding. To take advantage of this for your content within the scope of the dialog, be sure to use the selector `unformattedWrapper` that can be imported from the package here:
|
|
670
774
|
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
<style>
|
|
678
|
-
.example::part(close-button) {
|
|
679
|
-
top: var(--ds-size-400);
|
|
680
|
-
right: var(--ds-size-400);
|
|
681
|
-
color: var(--ds-color-brand-flamingo-500);
|
|
682
|
-
}
|
|
683
|
-
</style>
|
|
684
|
-
<auro-dialog id="unformattedCustomMdDialog" unformatted md lg class="example">
|
|
685
|
-
<span slot="content">
|
|
686
|
-
<img style="display: block; width: 100%" src="https://worldairlinenews.files.wordpress.com/2022/05/alaska-737-800-sswl-n538as-22-star-warstko-sfo-mdblr-5.4.22.jpg" alt="alaska airlines pride lights" />
|
|
687
|
-
<div class="unformattedWrapper">
|
|
688
|
-
<h1 id="dialog-header" class="heading-lg">Unformatted w/custom close button</h1>
|
|
689
|
-
Notice the custom location of the close button as well as the custom color.
|
|
690
|
-
</div>
|
|
691
|
-
</span>
|
|
692
|
-
</auro-dialog>
|
|
693
|
-
<!-- AURO-GENERATED-CONTENT:END -->
|
|
694
|
-
</div>
|
|
695
|
-
<auro-accordion alignRight>
|
|
696
|
-
<span slot="trigger">See code</span>
|
|
697
|
-
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/editCloseButton.html) -->
|
|
698
|
-
<!-- The below code snippet is automatically added from ./../apiExamples/editCloseButton.html -->
|
|
699
|
-
|
|
700
|
-
```html
|
|
701
|
-
<div>
|
|
702
|
-
<auro-button id="openEditDialog">Unformatted w/custom close button</auro-button>
|
|
703
|
-
</div>
|
|
704
|
-
<style>
|
|
705
|
-
.example::part(close-button) {
|
|
706
|
-
top: var(--ds-size-400);
|
|
707
|
-
right: var(--ds-size-400);
|
|
708
|
-
color: var(--ds-color-brand-flamingo-500);
|
|
709
|
-
}
|
|
710
|
-
</style>
|
|
711
|
-
<auro-dialog id="unformattedCustomMdDialog" unformatted md lg class="example">
|
|
712
|
-
<span slot="content">
|
|
713
|
-
<img style="display: block; width: 100%" src="https://worldairlinenews.files.wordpress.com/2022/05/alaska-737-800-sswl-n538as-22-star-warstko-sfo-mdblr-5.4.22.jpg" alt="alaska airlines pride lights" />
|
|
714
|
-
<div class="unformattedWrapper">
|
|
715
|
-
<h1 id="dialog-header" class="heading-lg">Unformatted w/custom close button</h1>
|
|
716
|
-
Notice the custom location of the close button as well as the custom color.
|
|
717
|
-
</div>
|
|
718
|
-
</span>
|
|
719
|
-
</auro-dialog>
|
|
775
|
+
```css
|
|
776
|
+
import '@aurodesignsystem/auro-dialog/dist/style-unformatted.scss'
|
|
777
|
+
|
|
778
|
+
or
|
|
779
|
+
|
|
780
|
+
import '@aurodesignsystem/auro-dialog/dist/style-unformatted.css'
|
|
720
781
|
```
|
|
721
|
-
<!-- AURO-GENERATED-CONTENT:END -->
|
|
722
|
-
</auro-accordion>
|
|
723
782
|
|
|
724
|
-
|
|
783
|
+
## Restyle Component with CSS Variables
|
|
725
784
|
|
|
726
|
-
The component may be restyled
|
|
785
|
+
The component may be restyled by changing the values of the following token(s).
|
|
727
786
|
|
|
787
|
+
<!-- Remove section if component does not have any component specific tokens -->
|
|
728
788
|
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../src/styles/tokens.scss) -->
|
|
729
789
|
<!-- The below code snippet is automatically added from ./../src/styles/tokens.scss -->
|
|
730
790
|
|