winduum 0.1.11 → 0.1.13
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/package.json +3 -3
- package/src/libraries/dialog.js +3 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "winduum",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.13",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -16,9 +16,9 @@
|
|
|
16
16
|
},
|
|
17
17
|
"devDependencies": {
|
|
18
18
|
"@vitejs/plugin-vue": "^4.0.0",
|
|
19
|
-
"autoprefixer": "^10.4.
|
|
19
|
+
"autoprefixer": "^10.4.14",
|
|
20
20
|
"css-has-pseudo": "^5.0.2",
|
|
21
|
-
"eslint": "^8.
|
|
21
|
+
"eslint": "^8.36.0",
|
|
22
22
|
"eslint-config-standard": "^17.0.0",
|
|
23
23
|
"postcss": "^8.4.21",
|
|
24
24
|
"postcss-import": "^15.1.0",
|
package/src/libraries/dialog.js
CHANGED
|
@@ -9,7 +9,7 @@ const defaultOptions = {
|
|
|
9
9
|
class: 'lib-dialog' ?? null
|
|
10
10
|
},
|
|
11
11
|
close: {
|
|
12
|
-
selector: '.lib-dialog.is-inserted
|
|
12
|
+
selector: '.lib-dialog.is-inserted' ?? null,
|
|
13
13
|
remove: false ?? null
|
|
14
14
|
}
|
|
15
15
|
}
|
|
@@ -20,8 +20,8 @@ const dialogSelector = selector => typeof selector === 'string'
|
|
|
20
20
|
|
|
21
21
|
const dialogDismiss = async (options) => {
|
|
22
22
|
await Promise.allSettled(dialogSelector(options.selector).getAnimations().map(animation => animation.finished))
|
|
23
|
-
options.remove && dialogSelector(options.selector).remove()
|
|
24
23
|
dialogSelector(options.selector).setAttribute('inert', '')
|
|
24
|
+
options.remove && dialogSelector(options.selector).remove()
|
|
25
25
|
|
|
26
26
|
if (!document.querySelector('dialog[open]')) {
|
|
27
27
|
document.documentElement.classList.remove(defaultOptions.openClass)
|
|
@@ -85,4 +85,4 @@ const fetchDialog = async ({ url, showOptions = {} }) => {
|
|
|
85
85
|
.then(async ({ content }) => await showDialog({ content, ...showOptions }))
|
|
86
86
|
}
|
|
87
87
|
|
|
88
|
-
export { showDialog, closeDialog, fetchDialog }
|
|
88
|
+
export { showDialog, closeDialog, fetchDialog, dialogSelector, dialogDismiss }
|