@aurodesignsystem/auro-dialog 3.1.8 → 4.0.0-rc-88.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 +16 -0
- package/NOTICE +2 -0
- package/README.md +16 -50
- package/demo/api.html +64 -0
- package/demo/api.js +6 -4
- package/demo/api.md +73 -26
- package/demo/api.min.js +110 -2235
- package/demo/auro-dialog.min.js +915 -0
- package/demo/index.html +63 -0
- package/demo/index.js +4 -3
- package/demo/index.md +1 -1
- package/demo/index.min.js +13 -2176
- package/dist/auro-dialog-a7_PNy6-.js +128 -0
- package/dist/index.d.ts +135 -0
- package/dist/index.js +1 -0
- package/dist/registered.js +1 -0
- package/package.json +43 -131
- package/.husky/commit-msg +0 -1
- package/.husky/pre-commit +0 -1
- package/.vscode/settings.json +0 -2
- package/apiExamples/accessibility.js +0 -12
- package/apiExamples/basic.js +0 -14
- package/apiExamples/custom.js +0 -14
- package/apiExamples/decoupled.js +0 -27
- package/apiExamples/editCloseButton.js +0 -12
- package/apiExamples/modal.js +0 -40
- package/apiExamples/popoverAndDropdown.js +0 -14
- package/apiExamples/sizeOptions.js +0 -40
- package/dist/auro-dialog.d.ts +0 -34
- package/dist/auro-dialog.d.ts.map +0 -1
- package/dist/auro-dialog__bundled.js +0 -2155
- package/dist/buttonVersion.d.ts +0 -3
- package/dist/buttonVersion.d.ts.map +0 -1
- package/dist/componentBase.d.ts +0 -117
- package/dist/componentBase.d.ts.map +0 -1
- package/dist/iconVersion.d.ts +0 -3
- package/dist/iconVersion.d.ts.map +0 -1
- package/dist/styles/color-css.d.ts +0 -3
- package/dist/styles/color-css.d.ts.map +0 -1
- package/dist/styles/style-css.d.ts +0 -3
- package/dist/styles/style-css.d.ts.map +0 -1
- package/dist/styles/style-unformatted-css.d.ts +0 -3
- package/dist/styles/style-unformatted-css.d.ts.map +0 -1
- package/dist/styles/tokens-css.d.ts +0 -3
- package/dist/styles/tokens-css.d.ts.map +0 -1
- package/index.js +0 -3
- package/packageScripts/postinstall.mjs +0 -28
- package/src/auro-dialog.js +0 -46
- package/src/buttonVersion.js +0 -1
- package/src/componentBase.js +0 -308
- package/src/iconVersion.js +0 -1
- package/src/styles/color-css.js +0 -2
- package/src/styles/style-css.js +0 -2
- package/src/styles/style-unformatted-css.js +0 -2
- package/src/styles/tokens-css.js +0 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,19 @@
|
|
|
1
|
+
# [4.0.0-rc-88.1](https://github.com/AlaskaAirlines/auro-dialog/compare/v3.1.8...v4.0.0-rc-88.1) (2025-10-21)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
* feat!: upgrade package tooling to use auro-cli ([8c9303d](https://github.com/AlaskaAirlines/auro-dialog/commit/8c9303dfd9cd89003fcb8b7db83ed683a067ee6a)), closes [AlaskaAirlines/auro-cli#108](https://github.com/AlaskaAirlines/auro-cli/issues/108) [AlaskaAirlines/auro-cli#109](https://github.com/AlaskaAirlines/auro-cli/issues/109) [AlaskaAirlines/auro-cli#110](https://github.com/AlaskaAirlines/auro-cli/issues/110) [AlaskaAirlines/auro-cli#111](https://github.com/AlaskaAirlines/auro-cli/issues/111)
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* add `appearance` deprecated `ondark` [#81](https://github.com/AlaskaAirlines/auro-dialog/issues/81) ([0bbc2b1](https://github.com/AlaskaAirlines/auro-dialog/commit/0bbc2b1057595a08a57b4f91371a53d0800f5a5c))
|
|
10
|
+
* add slot for close button aria label [#86](https://github.com/AlaskaAirlines/auro-dialog/issues/86) ([f46da4e](https://github.com/AlaskaAirlines/auro-dialog/commit/f46da4e278747952aefbd09b908ab9a88e64faed))
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### BREAKING CHANGES
|
|
14
|
+
|
|
15
|
+
* Package exports have changed. To access the component class add /class to the end of the import. See "exports" in the package.json for more details.
|
|
16
|
+
|
|
1
17
|
# Semantic Release Automated Changelog
|
|
2
18
|
|
|
3
19
|
## [3.1.8](https://github.com/AlaskaAirlines/auro-dialog/compare/v3.1.7...v3.1.8) (2025-09-29)
|
package/NOTICE
ADDED
package/README.md
CHANGED
|
@@ -4,8 +4,8 @@ The README.md file is a compiled document. No edits should be made directly to t
|
|
|
4
4
|
README.md is created by running `npm run build:docs`.
|
|
5
5
|
|
|
6
6
|
This file is generated based on a template fetched from
|
|
7
|
-
`https://raw.githubusercontent.com/AlaskaAirlines/
|
|
8
|
-
and copied to `./componentDocs/README.md` each time the
|
|
7
|
+
`https://raw.githubusercontent.com/AlaskaAirlines/auro-templates/main/templates/default/README.md`
|
|
8
|
+
and copied to `./componentDocs/README.md` each time the docs are compiled.
|
|
9
9
|
|
|
10
10
|
The following sections are editable by making changes to the following files:
|
|
11
11
|
|
|
@@ -34,14 +34,14 @@ Auro holds the opinions of the [Nielsen Norman Group](https://www.nngroup.com/ar
|
|
|
34
34
|
|
|
35
35
|
## UI development browser support
|
|
36
36
|
|
|
37
|
-
<!-- AURO-GENERATED-CONTENT:START (REMOTE:url=https://raw.githubusercontent.com/AlaskaAirlines/
|
|
37
|
+
<!-- AURO-GENERATED-CONTENT:START (REMOTE:url=https://raw.githubusercontent.com/AlaskaAirlines/auro-templates/main/templates/default/partials/browserSupport.md) -->
|
|
38
38
|
For the most up to date information on [UI development browser support](https://auro.alaskaair.com/support/browsersSupport)
|
|
39
39
|
|
|
40
40
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
41
41
|
|
|
42
42
|
## Install
|
|
43
43
|
|
|
44
|
-
<!-- AURO-GENERATED-CONTENT:START (REMOTE:url=https://raw.githubusercontent.com/AlaskaAirlines/
|
|
44
|
+
<!-- AURO-GENERATED-CONTENT:START (REMOTE:url=https://raw.githubusercontent.com/AlaskaAirlines/auro-templates/main/templates/default/partials/usage/componentInstall.md) -->
|
|
45
45
|
[](https://github.com/AlaskaAirlines/auro-dialog/actions/workflows/testPublish.yml)
|
|
46
46
|
[](https://www.npmjs.com/package/@aurodesignsystem/auro-dialog)
|
|
47
47
|
[](https://www.apache.org/licenses/LICENSE-2.0)
|
|
@@ -51,24 +51,22 @@ For the most up to date information on [UI development browser support](https://
|
|
|
51
51
|
$ npm i @aurodesignsystem/auro-dialog
|
|
52
52
|
```
|
|
53
53
|
|
|
54
|
-
Installing as a direct, dev or peer dependency is up to the user installing the package. If you are unsure as to what type of dependency you should use, consider reading this [stack overflow](https://stackoverflow.com/questions/18875674/whats-the-difference-between-dependencies-devdependencies-and-peerdependencies) answer.
|
|
55
|
-
|
|
56
54
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
57
55
|
|
|
58
56
|
### Design Token CSS Custom Property dependency
|
|
59
57
|
|
|
60
|
-
<!-- AURO-GENERATED-CONTENT:START (REMOTE:url=https://raw.githubusercontent.com/AlaskaAirlines/
|
|
58
|
+
<!-- AURO-GENERATED-CONTENT:START (REMOTE:url=https://raw.githubusercontent.com/AlaskaAirlines/auro-templates/main/templates/default/partials/development/designTokens.md) -->
|
|
61
59
|
The use of any Auro custom element has a dependency on the [Auro Design Tokens](https://auro.alaskaair.com/getting-started/developers/design-tokens).
|
|
62
60
|
|
|
63
61
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
64
62
|
|
|
65
63
|
### Define dependency in project component
|
|
66
64
|
|
|
67
|
-
<!-- AURO-GENERATED-CONTENT:START (REMOTE:url=https://raw.githubusercontent.com/AlaskaAirlines/
|
|
65
|
+
<!-- AURO-GENERATED-CONTENT:START (REMOTE:url=https://raw.githubusercontent.com/AlaskaAirlines/auro-templates/main/templates/default/partials/usage/componentImportDescription.md) -->
|
|
68
66
|
Defining the component dependency within each component that is using the `<auro-dialog>` component.
|
|
69
67
|
|
|
70
68
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
71
|
-
<!-- AURO-GENERATED-CONTENT:START (REMOTE:url=https://raw.githubusercontent.com/AlaskaAirlines/
|
|
69
|
+
<!-- AURO-GENERATED-CONTENT:START (REMOTE:url=https://raw.githubusercontent.com/AlaskaAirlines/auro-templates/main/templates/default/partials/usage/componentImport.md) -->
|
|
72
70
|
|
|
73
71
|
```js
|
|
74
72
|
import "@aurodesignsystem/auro-dialog";
|
|
@@ -103,23 +101,13 @@ import "@aurodesignsystem/auro-dialog";
|
|
|
103
101
|
```
|
|
104
102
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
105
103
|
|
|
106
|
-
##
|
|
107
|
-
|
|
108
|
-
<!-- AURO-GENERATED-CONTENT:START (REMOTE:url=https://raw.githubusercontent.com/AlaskaAirlines/WC-Generator/master/componentDocs/partials/usage/bundleInstallDescription.md) -->
|
|
109
|
-
In cases where the project is not able to process JS assets, there are pre-processed assets available for use. See -- `auro-dialog__bundled.js` for modern browsers. Legacy browsers such as IE11 are no longer supported.
|
|
110
|
-
|
|
111
|
-
**WARNING!** When installing into your application environment, DO NOT use `@latest` for the requested version. Risks include unknown MAJOR version releases and instant adoption of any new features and possible bugs without developer knowledge. The `@latest` wildcard should NEVER be used for production customer-facing applications. You have been warned.
|
|
104
|
+
## Use CDN
|
|
112
105
|
|
|
113
|
-
<!-- AURO-GENERATED-CONTENT:
|
|
114
|
-
|
|
115
|
-
### Bundle example code
|
|
106
|
+
<!-- AURO-GENERATED-CONTENT:START (REMOTE:url=https://raw.githubusercontent.com/AlaskaAirlines/auro-templates/main/templates/default/partials/usage/bundleInstallDescription.md) -->
|
|
107
|
+
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.
|
|
116
108
|
|
|
117
|
-
<!-- AURO-GENERATED-CONTENT:START (REMOTE:url=https://raw.githubusercontent.com/AlaskaAirlines/WC-Generator/master/componentDocs/partials/usage/bundleUseModBrowsers.md) -->
|
|
118
|
-
|
|
119
109
|
```html
|
|
120
|
-
<
|
|
121
|
-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/webcorestylesheets@/dist/bundled/essentials.css" />
|
|
122
|
-
<script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-dialog@3.1.8/dist/auro-dialog__bundled.js" type="module"></script>
|
|
110
|
+
<script type="module" src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-dialog@latest/+esm"></script>
|
|
123
111
|
```
|
|
124
112
|
|
|
125
113
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
@@ -167,7 +155,7 @@ The `<auro-dialog>` component should be used in situations where users may:
|
|
|
167
155
|
|
|
168
156
|
## Development
|
|
169
157
|
|
|
170
|
-
<!-- AURO-GENERATED-CONTENT:START (REMOTE:url=https://raw.githubusercontent.com/AlaskaAirlines/
|
|
158
|
+
<!-- AURO-GENERATED-CONTENT:START (REMOTE:url=https://raw.githubusercontent.com/AlaskaAirlines/auro-templates/main/templates/default/partials/development/developmentDescription.md) -->
|
|
171
159
|
In order to develop against this project, if you are not part of the core team, you will be required to fork the project prior to submitting a pull request.
|
|
172
160
|
|
|
173
161
|
Please be sure to review the [contribution guidelines](https://auro.alaskaair.com/contributing) for this project. Please make sure to **pay special attention** to the **conventional commits** section of the document.
|
|
@@ -176,42 +164,20 @@ Please be sure to review the [contribution guidelines](https://auro.alaskaair.co
|
|
|
176
164
|
|
|
177
165
|
### Start development environment
|
|
178
166
|
|
|
179
|
-
<!-- AURO-GENERATED-CONTENT:START (REMOTE:url=https://raw.githubusercontent.com/AlaskaAirlines/
|
|
167
|
+
<!-- AURO-GENERATED-CONTENT:START (REMOTE:url=https://raw.githubusercontent.com/AlaskaAirlines/auro-templates/main/templates/default/partials/development/localhost.md) -->
|
|
180
168
|
Once the project has been cloned to your local resource and you have installed all the dependencies you will need to open a shell session to run the **dev server**.
|
|
181
169
|
|
|
182
170
|
```shell
|
|
183
171
|
$ npm run dev
|
|
184
172
|
```
|
|
185
173
|
|
|
186
|
-
Open [localhost:8000](http://localhost:8000/)
|
|
187
|
-
|
|
188
|
-
If running separate sessions is preferred, please run the following commands in individual terminal shells.
|
|
189
|
-
|
|
190
|
-
```shell
|
|
191
|
-
$ npm run build:watch
|
|
192
|
-
|
|
193
|
-
$ npm run serve
|
|
194
|
-
```
|
|
195
|
-
|
|
196
|
-
<!-- AURO-GENERATED-CONTENT:END -->
|
|
174
|
+
Open [localhost:8000](http://localhost:8000/)
|
|
197
175
|
|
|
198
|
-
### API generation
|
|
199
|
-
|
|
200
|
-
<!-- AURO-GENERATED-CONTENT:START (REMOTE:url=https://raw.githubusercontent.com/AlaskaAirlines/WC-Generator/master/componentDocs/partials/development/api.md) -->
|
|
201
|
-
The custom element API file is generated in the build and committed back to the repo with a version change. If the API doc has changed without a version change, author's are to run `npm run build:api` to generate the doc and commit to version control.
|
|
202
|
-
|
|
203
176
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
204
177
|
|
|
205
178
|
### Testing
|
|
206
179
|
|
|
207
|
-
<!-- AURO-GENERATED-CONTENT:START (REMOTE:url=https://raw.githubusercontent.com/AlaskaAirlines/
|
|
208
|
-
Automated tests are required for every Auro component. See `.\test\auro-dialog.test.js` for the tests for this component. Run `npm test` to run the tests and check code coverage. Tests must pass and meet a certain coverage threshold to commit. See [the testing documentation](https://auro.alaskaair.com/support/tests) for more details.
|
|
209
|
-
|
|
210
|
-
<!-- AURO-GENERATED-CONTENT:END -->
|
|
211
|
-
|
|
212
|
-
### Bundled assets
|
|
213
|
-
|
|
214
|
-
<!-- AURO-GENERATED-CONTENT:START (REMOTE:url=https://raw.githubusercontent.com/AlaskaAirlines/WC-Generator/master/componentDocs/partials/development/bundles.md) -->
|
|
215
|
-
Bundled assets are only generated in the remote and not merged back to this repo. To review and/or test a bundled asset locally, run `$ npm run bundler` to generate assets.
|
|
180
|
+
<!-- AURO-GENERATED-CONTENT:START (REMOTE:url=https://raw.githubusercontent.com/AlaskaAirlines/auro-templates/main/templates/default/partials/development/testing.md) -->
|
|
181
|
+
Automated tests are required for every Auro component. See `.\test\auro-dialog.test.js` for the tests for this component. Run `npm run test` to run the tests and check code coverage. Tests must pass and meet a certain coverage threshold to commit. See [the testing documentation](https://auro.alaskaair.com/support/tests) for more details.
|
|
216
182
|
|
|
217
183
|
<!-- AURO-GENERATED-CONTENT:END -->
|
package/demo/api.html
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
3
|
+
See LICENSE in the project root for license information.
|
|
4
|
+
|
|
5
|
+
HTML in this document is standardized and NOT to be edited.
|
|
6
|
+
All demo code should be added/edited in ./demo/api.md
|
|
7
|
+
|
|
8
|
+
With the exception of adding custom elements if needed for the demo.
|
|
9
|
+
|
|
10
|
+
----------------------- DO NOT EDIT -----------------------------
|
|
11
|
+
|
|
12
|
+
-->
|
|
13
|
+
|
|
14
|
+
<!DOCTYPE html>
|
|
15
|
+
<html lang="en">
|
|
16
|
+
<head>
|
|
17
|
+
<meta charset="UTF-8" />
|
|
18
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
19
|
+
<title>Auro Web Component Demo | auro-dialog</title>
|
|
20
|
+
|
|
21
|
+
<!-- Prism.js Stylesheet -->
|
|
22
|
+
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/prismjs@1.24.1/themes/prism.css"/>
|
|
23
|
+
|
|
24
|
+
<!-- Legacy reference is still needed to support auro-dialog's use of legacy token values at this time -->
|
|
25
|
+
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/design-tokens@latest/dist/legacy/auro-classic/CSSCustomProperties.css"/>
|
|
26
|
+
|
|
27
|
+
<!-- Design Token Alaska Theme -->
|
|
28
|
+
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/design-tokens@latest/dist/themes/alaska/CSSCustomProperties--alaska.min.css"/>
|
|
29
|
+
|
|
30
|
+
<!-- Webcore Stylesheet Alaska Theme -->
|
|
31
|
+
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/webcorestylesheets@latest/dist/bundled/themes/alaska.global.min.css" />
|
|
32
|
+
|
|
33
|
+
<!-- Demo Specific Styles -->
|
|
34
|
+
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/webcorestylesheets@latest/dist/demoWrapper.css" />
|
|
35
|
+
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/webcorestylesheets@latest/dist/elementDemoStyles.css" />
|
|
36
|
+
</head>
|
|
37
|
+
<body class="auro-markdown">
|
|
38
|
+
<main></main>
|
|
39
|
+
|
|
40
|
+
<script type="module">
|
|
41
|
+
import 'https://cdn.jsdelivr.net/npm/marked@latest/marked.min.js';
|
|
42
|
+
import 'https://cdn.jsdelivr.net/npm/prismjs@latest/prism.js';
|
|
43
|
+
fetch('./api.md')
|
|
44
|
+
.then((response) => response.text())
|
|
45
|
+
.then((text) => {
|
|
46
|
+
const rawHtml = marked.parse(text);
|
|
47
|
+
document.querySelector('main').innerHTML = rawHtml;
|
|
48
|
+
Prism.highlightAll();
|
|
49
|
+
});
|
|
50
|
+
</script>
|
|
51
|
+
<script type="module" data-demo-script="true">
|
|
52
|
+
import { initExamples } from './api.min.js';
|
|
53
|
+
initExamples();
|
|
54
|
+
</script>
|
|
55
|
+
|
|
56
|
+
<!-- If additional elements are needed for the demo, add them here. -->
|
|
57
|
+
<script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-accordion@latest/dist/auro-accordion__bundled.js" type="module"></script>
|
|
58
|
+
<script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-menu@latest/dist/auro-menu__bundled.js" type="module"></script>
|
|
59
|
+
<script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-combobox@latest/dist/auro-combobox__bundled.js" type="module"></script>
|
|
60
|
+
<script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-hyperlink@latest/dist/auro-hyperlink__bundled.js" type="module"></script>
|
|
61
|
+
<script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-popover@latest/dist/auro-popover__bundled.js" type="module"></script>
|
|
62
|
+
<script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-button@latest/dist/auro-button__bundled.js" type="module"></script>
|
|
63
|
+
</body>
|
|
64
|
+
</html>
|
package/demo/api.js
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
import { initBasicExample } from "../apiExamples/basic";
|
|
2
1
|
import { initAccessibilityExample } from "../apiExamples/accessibility";
|
|
2
|
+
import { initBasicExample } from "../apiExamples/basic";
|
|
3
3
|
import { initDecoupledExample } from "../apiExamples/decoupled";
|
|
4
4
|
import { initEditCloseButtonExample } from "../apiExamples/editCloseButton";
|
|
5
5
|
import { initModalExample } from "../apiExamples/modal";
|
|
6
6
|
import { initPopoverAndDropdownExample } from "../apiExamples/popoverAndDropdown";
|
|
7
7
|
import { initSizeOptionsExample } from "../apiExamples/sizeOptions";
|
|
8
|
-
import {
|
|
8
|
+
import { initAriaLabelSlotExample } from "../apiExamples/ariaLabelSlot";
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
import "../src/registered"
|
|
11
11
|
|
|
12
12
|
export function initExamples(initCount) {
|
|
13
|
+
// biome-ignore lint/style/noParameterAssign: legacy error handling
|
|
13
14
|
initCount = initCount || 0;
|
|
14
15
|
|
|
15
16
|
try {
|
|
@@ -20,7 +21,8 @@ export function initExamples(initCount) {
|
|
|
20
21
|
initModalExample();
|
|
21
22
|
initPopoverAndDropdownExample();
|
|
22
23
|
initSizeOptionsExample();
|
|
23
|
-
|
|
24
|
+
initAriaLabelSlotExample();
|
|
25
|
+
} catch (_err) {
|
|
24
26
|
if (initCount <= 20) {
|
|
25
27
|
// setTimeout handles issue where content is sometimes loaded after the functions get called
|
|
26
28
|
setTimeout(() => {
|
package/demo/api.md
CHANGED
|
@@ -10,17 +10,18 @@ The auro-dialog appears above the page and requires the user's attention.
|
|
|
10
10
|
| Attribute | Type | Description |
|
|
11
11
|
|-----------|-----------|--------------------------------------------------|
|
|
12
12
|
| [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. |
|
|
13
|
-
| [onDark](#onDark) | `Boolean` |
|
|
13
|
+
| [onDark](#onDark) | `Boolean` | DEPRECATED - use `close-button-appearance="inverse" instead. |
|
|
14
14
|
| [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. |
|
|
15
15
|
|
|
16
16
|
## Properties
|
|
17
17
|
|
|
18
|
-
| Property
|
|
19
|
-
|
|
20
|
-
| [
|
|
21
|
-
| [
|
|
22
|
-
| [
|
|
23
|
-
| [
|
|
18
|
+
| Property | Attribute | Type | Default | Description |
|
|
19
|
+
|-------------------------|---------------------------|---------------|-------------|--------------------------------------------------|
|
|
20
|
+
| [closeButtonAppearance](#closeButtonAppearance) | `close-button-appearance` | `string` | "'default'" | Defines whether the close button should be light colored for use on dark backgrounds. |
|
|
21
|
+
| [modal](#modal) | `modal` | `Boolean` | false | Modal dialog restricts the user to take an action (no default close actions) |
|
|
22
|
+
| [open](#open) | `open` | `Boolean` | | Sets state of dialog to open |
|
|
23
|
+
| [triggerElement](#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. |
|
|
24
|
+
| [unformatted](#unformatted) | `unformatted` | `Boolean` | false | Unformatted dialog window, edge-to-edge fill for content |
|
|
24
25
|
|
|
25
26
|
## Events
|
|
26
27
|
|
|
@@ -30,11 +31,12 @@ The auro-dialog appears above the page and requires the user's attention.
|
|
|
30
31
|
|
|
31
32
|
## Slots
|
|
32
33
|
|
|
33
|
-
| Name
|
|
34
|
-
|
|
35
|
-
|
|
|
36
|
-
| [
|
|
37
|
-
| [
|
|
34
|
+
| Name | Description |
|
|
35
|
+
|--------------------------|--------------------------------------------------|
|
|
36
|
+
| `ariaLabel.dialog.close` | Text to describe the "x" icon close button for screen readers. Default: "Close". |
|
|
37
|
+
| [content](#content) | Injects content into the body of the modal |
|
|
38
|
+
| [footer](#footer) | Used for action options, e.g. buttons |
|
|
39
|
+
| [header](#header) | Text to display as the header of the modal |
|
|
38
40
|
|
|
39
41
|
## CSS Shadow Parts
|
|
40
42
|
|
|
@@ -269,7 +271,7 @@ When using this state, the modal dialog must include a button action to dismiss
|
|
|
269
271
|
</div>
|
|
270
272
|
<div slot="footer">
|
|
271
273
|
<auro-button id="closeDefaultModal">I understand
|
|
272
|
-
<auro-icon category="interface" name="chevron-right" emphasis
|
|
274
|
+
<auro-icon category="interface" name="chevron-right" emphasis appearance="inverse"></auro-icon>
|
|
273
275
|
</auro-button>
|
|
274
276
|
</div>
|
|
275
277
|
</auro-dialog>
|
|
@@ -288,7 +290,7 @@ When using this state, the modal dialog must include a button action to dismiss
|
|
|
288
290
|
</div>
|
|
289
291
|
<div slot="footer">
|
|
290
292
|
<auro-button id="closeMediumModal">I understand
|
|
291
|
-
<auro-icon category="interface" name="chevron-right" emphasis
|
|
293
|
+
<auro-icon category="interface" name="chevron-right" emphasis appearance="inverse"></auro-icon>
|
|
292
294
|
</auro-button>
|
|
293
295
|
</div>
|
|
294
296
|
</auro-dialog>
|
|
@@ -307,7 +309,7 @@ When using this state, the modal dialog must include a button action to dismiss
|
|
|
307
309
|
</div>
|
|
308
310
|
<div slot="footer">
|
|
309
311
|
<auro-button id="closeSmallModal">I understand
|
|
310
|
-
<auro-icon category="interface" name="chevron-right" emphasis
|
|
312
|
+
<auro-icon category="interface" name="chevron-right" emphasis appearance="inverse"></auro-icon>
|
|
311
313
|
</auro-button>
|
|
312
314
|
</div>
|
|
313
315
|
</auro-dialog>
|
|
@@ -339,7 +341,7 @@ When using this state, the modal dialog must include a button action to dismiss
|
|
|
339
341
|
</div>
|
|
340
342
|
<div slot="footer">
|
|
341
343
|
<auro-button id="closeDefaultModal">I understand
|
|
342
|
-
<auro-icon category="interface" name="chevron-right" emphasis
|
|
344
|
+
<auro-icon category="interface" name="chevron-right" emphasis appearance="inverse"></auro-icon>
|
|
343
345
|
</auro-button>
|
|
344
346
|
</div>
|
|
345
347
|
</auro-dialog>
|
|
@@ -358,7 +360,7 @@ When using this state, the modal dialog must include a button action to dismiss
|
|
|
358
360
|
</div>
|
|
359
361
|
<div slot="footer">
|
|
360
362
|
<auro-button id="closeMediumModal">I understand
|
|
361
|
-
<auro-icon category="interface" name="chevron-right" emphasis
|
|
363
|
+
<auro-icon category="interface" name="chevron-right" emphasis appearance="inverse"></auro-icon>
|
|
362
364
|
</auro-button>
|
|
363
365
|
</div>
|
|
364
366
|
</auro-dialog>
|
|
@@ -377,7 +379,7 @@ When using this state, the modal dialog must include a button action to dismiss
|
|
|
377
379
|
</div>
|
|
378
380
|
<div slot="footer">
|
|
379
381
|
<auro-button id="closeSmallModal">I understand
|
|
380
|
-
<auro-icon category="interface" name="chevron-right" emphasis
|
|
382
|
+
<auro-icon category="interface" name="chevron-right" emphasis appearance="inverse"></auro-icon>
|
|
381
383
|
</auro-button>
|
|
382
384
|
</div>
|
|
383
385
|
</auro-dialog>
|
|
@@ -414,7 +416,7 @@ The use of these combinations will set the first value to the dialog for a deskt
|
|
|
414
416
|
<div slot="footer">
|
|
415
417
|
<auro-button id="closeSmLg">
|
|
416
418
|
I understand
|
|
417
|
-
<auro-icon category="interface" name="check-lg" emphasis
|
|
419
|
+
<auro-icon category="interface" name="check-lg" emphasis appearance="inverse"></auro-icon>
|
|
418
420
|
</auro-button>
|
|
419
421
|
</div>
|
|
420
422
|
</auro-dialog>
|
|
@@ -434,7 +436,7 @@ The use of these combinations will set the first value to the dialog for a deskt
|
|
|
434
436
|
<div slot="footer">
|
|
435
437
|
<auro-button id="closeMdLg">
|
|
436
438
|
I understand
|
|
437
|
-
<auro-icon category="interface" name="check-lg" emphasis
|
|
439
|
+
<auro-icon category="interface" name="check-lg" emphasis appearance="inverse"></auro-icon>
|
|
438
440
|
</auro-button>
|
|
439
441
|
</div>
|
|
440
442
|
</auro-dialog>
|
|
@@ -466,7 +468,7 @@ The use of these combinations will set the first value to the dialog for a deskt
|
|
|
466
468
|
<div slot="footer">
|
|
467
469
|
<auro-button id="closeSmLg">
|
|
468
470
|
I understand
|
|
469
|
-
<auro-icon category="interface" name="check-lg" emphasis
|
|
471
|
+
<auro-icon category="interface" name="check-lg" emphasis appearance="inverse"></auro-icon>
|
|
470
472
|
</auro-button>
|
|
471
473
|
</div>
|
|
472
474
|
</auro-dialog>
|
|
@@ -486,7 +488,7 @@ The use of these combinations will set the first value to the dialog for a deskt
|
|
|
486
488
|
<div slot="footer">
|
|
487
489
|
<auro-button id="closeMdLg">
|
|
488
490
|
I understand
|
|
489
|
-
<auro-icon category="interface" name="check-lg" emphasis
|
|
491
|
+
<auro-icon category="interface" name="check-lg" emphasis appearance="inverse"></auro-icon>
|
|
490
492
|
</auro-button>
|
|
491
493
|
</div>
|
|
492
494
|
</auro-dialog>
|
|
@@ -542,7 +544,7 @@ This is a use case where there is a popover and combobox component inside the di
|
|
|
542
544
|
<div slot="footer">
|
|
543
545
|
<auro-button id="closePopAndDrop">
|
|
544
546
|
I understand
|
|
545
|
-
<auro-icon category="interface" name="check-lg" emphasis
|
|
547
|
+
<auro-icon category="interface" name="check-lg" emphasis appearance="inverse"></auro-icon>
|
|
546
548
|
</auro-button>
|
|
547
549
|
</div>
|
|
548
550
|
</auro-dialog>
|
|
@@ -595,7 +597,7 @@ This is a use case where there is a popover and combobox component inside the di
|
|
|
595
597
|
<div slot="footer">
|
|
596
598
|
<auro-button id="closePopAndDrop">
|
|
597
599
|
I understand
|
|
598
|
-
<auro-icon category="interface" name="check-lg" emphasis
|
|
600
|
+
<auro-icon category="interface" name="check-lg" emphasis appearance="inverse"></auro-icon>
|
|
599
601
|
</auro-button>
|
|
600
602
|
</div>
|
|
601
603
|
</auro-dialog>
|
|
@@ -631,7 +633,7 @@ Within the scope of the auro-dialog there is `aria-labelledby="dialog-header"`.
|
|
|
631
633
|
<div>
|
|
632
634
|
<auro-button id="openAccessibility">Unformatted Medium Dialog</auro-button>
|
|
633
635
|
</div>
|
|
634
|
-
<auro-dialog id="unformattedMdDialog" unformatted md lg
|
|
636
|
+
<auro-dialog id="unformattedMdDialog" unformatted md lg close-button-appearance="inverse">
|
|
635
637
|
<span slot="content">
|
|
636
638
|
<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
639
|
<div class="unformattedWrapper">
|
|
@@ -651,7 +653,7 @@ Within the scope of the auro-dialog there is `aria-labelledby="dialog-header"`.
|
|
|
651
653
|
<div>
|
|
652
654
|
<auro-button id="openAccessibility">Unformatted Medium Dialog</auro-button>
|
|
653
655
|
</div>
|
|
654
|
-
<auro-dialog id="unformattedMdDialog" unformatted md lg
|
|
656
|
+
<auro-dialog id="unformattedMdDialog" unformatted md lg close-button-appearance="inverse">
|
|
655
657
|
<span slot="content">
|
|
656
658
|
<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
659
|
<div class="unformattedWrapper">
|
|
@@ -721,6 +723,51 @@ When using the dialog with the `unformatted` attribute, some may want to adjust
|
|
|
721
723
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
722
724
|
</auro-accordion>
|
|
723
725
|
|
|
726
|
+
### Close button aria-label slot
|
|
727
|
+
|
|
728
|
+
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.
|
|
729
|
+
|
|
730
|
+
<div class="exampleWrapper">
|
|
731
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/ariaLabelSlot.html) -->
|
|
732
|
+
<!-- The below content is automatically added from ./../apiExamples/ariaLabelSlot.html -->
|
|
733
|
+
<div>
|
|
734
|
+
<auro-button id="openAriaLabelSlot">Unformatted Dialog w/ custom close button aria-label</auro-button>
|
|
735
|
+
</div>
|
|
736
|
+
<auro-dialog id="ariaLabelMdDialog" unformatted md lg ondark>
|
|
737
|
+
<span slot="ariaLabel.dialog.close">This will be the new aria label for the close button</span>
|
|
738
|
+
<span slot="content">
|
|
739
|
+
<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" />
|
|
740
|
+
<div class="unformattedWrapper">
|
|
741
|
+
<h1 id="dialog-header" class="heading-lg">This is a header</h1>
|
|
742
|
+
These are words that are slotted into the scope of the custom element.
|
|
743
|
+
</div>
|
|
744
|
+
</span>
|
|
745
|
+
</auro-dialog>
|
|
746
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
747
|
+
</div>
|
|
748
|
+
<auro-accordion alignRight>
|
|
749
|
+
<span slot="trigger">See code</span>
|
|
750
|
+
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/ariaLabelSlot.html) -->
|
|
751
|
+
<!-- The below code snippet is automatically added from ./../apiExamples/ariaLabelSlot.html -->
|
|
752
|
+
|
|
753
|
+
```html
|
|
754
|
+
<div>
|
|
755
|
+
<auro-button id="openAriaLabelSlot">Unformatted Dialog w/ custom close button aria-label</auro-button>
|
|
756
|
+
</div>
|
|
757
|
+
<auro-dialog id="ariaLabelMdDialog" unformatted md lg ondark>
|
|
758
|
+
<span slot="ariaLabel.dialog.close">This will be the new aria label for the close button</span>
|
|
759
|
+
<span slot="content">
|
|
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" />
|
|
761
|
+
<div class="unformattedWrapper">
|
|
762
|
+
<h1 id="dialog-header" class="heading-lg">This is a header</h1>
|
|
763
|
+
These are words that are slotted into the scope of the custom element.
|
|
764
|
+
</div>
|
|
765
|
+
</span>
|
|
766
|
+
</auro-dialog>
|
|
767
|
+
```
|
|
768
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
769
|
+
</auro-accordion>
|
|
770
|
+
|
|
724
771
|
### Theme Support
|
|
725
772
|
|
|
726
773
|
The component may be restyled using the following code sample and changing the values of the following token(s).
|