@aurodesignsystem/auro-dialog 1.0.6 → 1.0.7
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 +8 -0
- package/README.md +1 -1
- package/apiExamples/toggleDialog.js +7 -6
- package/demo/api.js +16 -0
- package/demo/api.min.js +25 -0
- package/demo/index.js +16 -0
- package/demo/index.md +8 -9
- package/demo/index.min.js +25 -0
- package/dist/toggleDialog.js +7 -6
- package/package.json +11 -10
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Semantic Release Automated Changelog
|
|
2
2
|
|
|
3
|
+
## [1.0.7](https://github.com/AlaskaAirlines/auro-dialog/compare/v1.0.6...v1.0.7) (2024-02-21)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Performance Improvements
|
|
7
|
+
|
|
8
|
+
* **deps:** update dependencies ([c16a351](https://github.com/AlaskaAirlines/auro-dialog/commit/c16a3511ab43356af8ef35138edc21679b6ab631))
|
|
9
|
+
* **examples:** implement minified js system [#10](https://github.com/AlaskaAirlines/auro-dialog/issues/10) ([0f336c2](https://github.com/AlaskaAirlines/auro-dialog/commit/0f336c2e30db48a2227b8394ca8cb12ec8899e5a))
|
|
10
|
+
|
|
3
11
|
## [1.0.6](https://github.com/AlaskaAirlines/auro-dialog/compare/v1.0.5...v1.0.6) (2024-02-13)
|
|
4
12
|
|
|
5
13
|
|
package/README.md
CHANGED
|
@@ -128,7 +128,7 @@ In cases where the project is not able to process JS assets, there are pre-proce
|
|
|
128
128
|
```html
|
|
129
129
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/design-tokens@4.3.0/dist/tokens/CSSCustomProperties.css" />
|
|
130
130
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/webcorestylesheets@5.0.8/dist/bundled/essentials.css" />
|
|
131
|
-
<script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-dialog@1.0.
|
|
131
|
+
<script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-dialog@1.0.7/dist/auro-dialog__bundled.js" type="module"></script>
|
|
132
132
|
```
|
|
133
133
|
|
|
134
134
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
function toggleDialog(
|
|
2
|
-
|
|
1
|
+
export function toggleDialog(dialogID) {
|
|
2
|
+
const dialog = document.querySelector(dialogID);
|
|
3
3
|
|
|
4
|
-
dialog.hasAttribute('open')
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
dialog.setAttribute(
|
|
4
|
+
if (dialog.hasAttribute('open')) {
|
|
5
|
+
dialog.removeAttribute('open');
|
|
6
|
+
} else {
|
|
7
|
+
dialog.setAttribute('open', true);
|
|
8
|
+
}
|
|
8
9
|
}
|
package/demo/api.js
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { toggleDialog } from "../apiExamples/toggleDialog";
|
|
2
|
+
|
|
3
|
+
export function initDialogApiExamples(initCount) {
|
|
4
|
+
initCount = initCount || 0;
|
|
5
|
+
|
|
6
|
+
try {
|
|
7
|
+
toggleDialog();
|
|
8
|
+
} catch (error) {
|
|
9
|
+
if (initCount <= 20) {
|
|
10
|
+
// setTimeout handles issue where content is sometimes loaded after the functions get called
|
|
11
|
+
setTimeout(() => {
|
|
12
|
+
initDialogApiExamples(initCount + 1);
|
|
13
|
+
}, 100);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}
|
package/demo/api.min.js
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
function toggleDialog(dialogID) {
|
|
2
|
+
const dialog = document.querySelector(dialogID);
|
|
3
|
+
|
|
4
|
+
if (dialog.hasAttribute('open')) {
|
|
5
|
+
dialog.removeAttribute('open');
|
|
6
|
+
} else {
|
|
7
|
+
dialog.setAttribute('open', true);
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
function initDialogApiExamples(initCount) {
|
|
12
|
+
initCount = initCount || 0;
|
|
13
|
+
|
|
14
|
+
try {
|
|
15
|
+
toggleDialog();
|
|
16
|
+
} catch (error) {
|
|
17
|
+
if (initCount <= 20) {
|
|
18
|
+
// setTimeout handles issue where content is sometimes loaded after the functions get called
|
|
19
|
+
setTimeout(() => {
|
|
20
|
+
initDialogApiExamples(initCount + 1);
|
|
21
|
+
}, 100);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
package/demo/index.js
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { toggleDialog } from "../apiExamples/toggleDialog";
|
|
2
|
+
|
|
3
|
+
export function initDialogIndexExamples(initCount) {
|
|
4
|
+
initCount = initCount || 0;
|
|
5
|
+
|
|
6
|
+
try {
|
|
7
|
+
toggleDialog();
|
|
8
|
+
} catch (error) {
|
|
9
|
+
if (initCount <= 20) {
|
|
10
|
+
// setTimeout handles issue where content is sometimes loaded after the functions get called
|
|
11
|
+
setTimeout(() => {
|
|
12
|
+
initDialogIndexExamples(initCount + 1);
|
|
13
|
+
}, 100);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}
|
package/demo/index.md
CHANGED
|
@@ -37,16 +37,15 @@ The `<auro-dialog>` component should be used in situations where users may:
|
|
|
37
37
|
Triggering the dialog relies on functions being installed. See the following example code that is installed into this demo.
|
|
38
38
|
|
|
39
39
|
```javascript
|
|
40
|
-
function toggleDialog(
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
dialog.hasAttribute('open')
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
dialog.setAttribute(
|
|
40
|
+
function toggleDialog(dialogID) {
|
|
41
|
+
const dialog = document.querySelector(dialogID);
|
|
42
|
+
|
|
43
|
+
if (dialog.hasAttribute('open')) {
|
|
44
|
+
dialog.removeAttribute('open');
|
|
45
|
+
} else {
|
|
46
|
+
dialog.setAttribute('open', true);
|
|
47
|
+
}
|
|
47
48
|
}
|
|
48
|
-
|
|
49
|
-
// This function can be retrieved from https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-dialog@latest/dist/toggleDialog.js
|
|
50
49
|
```
|
|
51
50
|
|
|
52
51
|
Once the JavaScript is added to the scope of the experience, the next part is adding a trigger. In this example, the button component will toggle a dialog with the ID of `#demo1`.
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
function toggleDialog(dialogID) {
|
|
2
|
+
const dialog = document.querySelector(dialogID);
|
|
3
|
+
|
|
4
|
+
if (dialog.hasAttribute('open')) {
|
|
5
|
+
dialog.removeAttribute('open');
|
|
6
|
+
} else {
|
|
7
|
+
dialog.setAttribute('open', true);
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
function initDialogIndexExamples(initCount) {
|
|
12
|
+
initCount = initCount || 0;
|
|
13
|
+
|
|
14
|
+
try {
|
|
15
|
+
toggleDialog();
|
|
16
|
+
} catch (error) {
|
|
17
|
+
if (initCount <= 20) {
|
|
18
|
+
// setTimeout handles issue where content is sometimes loaded after the functions get called
|
|
19
|
+
setTimeout(() => {
|
|
20
|
+
initDialogIndexExamples(initCount + 1);
|
|
21
|
+
}, 100);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
package/dist/toggleDialog.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
function toggleDialog(
|
|
2
|
-
|
|
1
|
+
export function toggleDialog(dialogID) {
|
|
2
|
+
const dialog = document.querySelector(dialogID);
|
|
3
3
|
|
|
4
|
-
dialog.hasAttribute('open')
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
dialog.setAttribute(
|
|
4
|
+
if (dialog.hasAttribute('open')) {
|
|
5
|
+
dialog.removeAttribute('open');
|
|
6
|
+
} else {
|
|
7
|
+
dialog.setAttribute('open', true);
|
|
8
|
+
}
|
|
8
9
|
}
|
package/package.json
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
"================================================================================"
|
|
8
8
|
],
|
|
9
9
|
"name": "@aurodesignsystem/auro-dialog",
|
|
10
|
-
"version": "1.0.
|
|
10
|
+
"version": "1.0.7",
|
|
11
11
|
"description": "auro-dialog HTML custom element",
|
|
12
12
|
"repository": {
|
|
13
13
|
"type": "git",
|
|
@@ -29,13 +29,13 @@
|
|
|
29
29
|
"@aurodesignsystem/webcorestylesheets": "^5.0.8"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"@alaskaairux/icons": "^4.
|
|
32
|
+
"@alaskaairux/icons": "^4.37.0",
|
|
33
33
|
"@aurodesignsystem/auro-library": "^2.5.1",
|
|
34
34
|
"@aurodesignsystem/design-tokens": "^4.3.0",
|
|
35
35
|
"@aurodesignsystem/eslint-config": "^1.3.0",
|
|
36
36
|
"@aurodesignsystem/webcorestylesheets": "^5.0.8",
|
|
37
|
-
"@commitlint/cli": "^18.
|
|
38
|
-
"@commitlint/config-conventional": "^18.
|
|
37
|
+
"@commitlint/cli": "^18.6.1",
|
|
38
|
+
"@commitlint/config-conventional": "^18.6.2",
|
|
39
39
|
"@open-wc/testing": "^4.0.0",
|
|
40
40
|
"@rollup/plugin-node-resolve": "^15.2.3",
|
|
41
41
|
"@semantic-release/changelog": "^6.0.3",
|
|
@@ -48,10 +48,10 @@
|
|
|
48
48
|
"concat": "^1.0.3",
|
|
49
49
|
"concurrently": "^8.2.2",
|
|
50
50
|
"copyfiles": "^2.4.1",
|
|
51
|
-
"core-js": "^3.
|
|
51
|
+
"core-js": "^3.36.0",
|
|
52
52
|
"eslint": "^8.56.0",
|
|
53
|
-
"eslint-plugin-jsdoc": "^48.0
|
|
54
|
-
"husky": "^9.0.
|
|
53
|
+
"eslint-plugin-jsdoc": "^48.1.0",
|
|
54
|
+
"husky": "^9.0.11",
|
|
55
55
|
"lodash": "^4.17.21",
|
|
56
56
|
"markdown-magic": "^2.6.1",
|
|
57
57
|
"nodemon": "^3.0.3",
|
|
@@ -59,9 +59,9 @@
|
|
|
59
59
|
"postcss": "^8.4.35",
|
|
60
60
|
"postcss-discard-comments": "^6.0.1",
|
|
61
61
|
"postcss-selector-replace": "^1.0.2",
|
|
62
|
-
"rollup": "^4.
|
|
62
|
+
"rollup": "^4.12.0",
|
|
63
63
|
"rollup-plugin-serve": "^1.1.1",
|
|
64
|
-
"sass": "^1.
|
|
64
|
+
"sass": "^1.71.0",
|
|
65
65
|
"semantic-release": "^23.0.2",
|
|
66
66
|
"stylelint": "^16.2.1",
|
|
67
67
|
"stylelint-config-idiomatic-order": "^10.0.0",
|
|
@@ -134,11 +134,12 @@
|
|
|
134
134
|
"web components"
|
|
135
135
|
],
|
|
136
136
|
"scripts": {
|
|
137
|
-
"build": "npm-run-all build:sass sass:render scssLint dist:js bundler build:api build:docs postinstall types",
|
|
137
|
+
"build": "npm-run-all build:sass sass:render scssLint dist:js bundler build:api build:docs postinstall build:demoScripts types",
|
|
138
138
|
"build:ci": "npm-run-all sweep build",
|
|
139
139
|
"build:api": "wca analyze 'src/auro-dialog.js' --outFiles docs/api.md",
|
|
140
140
|
"build:dev:assets": "npm-run-all build:sass:component postCss:component sass:render build:docs",
|
|
141
141
|
"build:docs": "node scripts/generateDocs.mjs",
|
|
142
|
+
"build:demoScripts": "node scripts/prepExampleFiles.mjs",
|
|
142
143
|
"build:sass": "npm-run-all build:sass:component postCss:component sass:render",
|
|
143
144
|
"build:sass:component": "sass --no-source-map src:src",
|
|
144
145
|
"build:watch": "nodemon -e scss,js,html --watch src --watch apiExamples/**/* --exec npm run build:dev:assets",
|