winduum 1.2.3 → 1.2.4

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "winduum",
3
- "version": "1.2.3",
3
+ "version": "1.2.4",
4
4
  "type": "module",
5
5
  "types": "types/index.d.ts",
6
6
  "main": "plugin/index.cjs",
@@ -1,6 +1,7 @@
1
1
  export interface DefaultOptions {
2
2
  remove?: boolean | null
3
3
  closable?: boolean | null
4
+ modal?: boolean | null
4
5
  openClass?: string
5
6
  scrollbarWidthProperty?: string
6
7
  }
@@ -43,6 +43,7 @@ export const dismissDialog = async (element, options = defaultOptions) => {
43
43
  export const showDialog = async (element, options = {}) => {
44
44
  options = {
45
45
  closable: true,
46
+ modal: true,
46
47
  ...defaultOptions,
47
48
  ...options
48
49
  }
@@ -72,7 +73,7 @@ export const showDialog = async (element, options = {}) => {
72
73
  await nextRepaint()
73
74
 
74
75
  window.HTMLDialogElement
75
- ? element.showModal()
76
+ ? options.modal ? element.showModal() : element.show()
76
77
  : element.setAttribute('open', '')
77
78
  }
78
79