vue-dialog-view 1.4.2 → 1.4.3

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.
@@ -1,12 +1,12 @@
1
- (function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode("._b4102a3b79656a37{padding:20px;border-radius:5px;border:1px solid gray;outline:0!important;max-width:calc(100% - 2em);max-height:calc(100% - 2em);box-sizing:border-box;overflow:hidden}._b4102a3b79656a37[open]{display:flex;flex-direction:column}._b4102a3b79656a37::backdrop{background:#00000080}._4d394b1507fdc584{display:flex;flex-direction:row;align-items:center;margin-bottom:.5em;min-height:24px;white-space:pre;overflow:hidden}._088d860d2fd75292{flex:1;text-align:center;font-weight:700;font-size:large;overflow:hidden;text-overflow:ellipsis}._468ff1da37ead40a{margin-left:.5em;text-decoration:none;color:#666;font-size:1.5em;line-height:1;width:24px;height:24px;display:flex;align-items:center;justify-content:center;cursor:pointer;border:none;background:none}._468ff1da37ead40a:hover{color:#333;background-color:#f0f0f0;border-radius:3px}._da3b3b2a4aeed1ee{flex:1;overflow:auto;display:flex;flex-direction:column}._61879ba330d9a71c{margin-top:.5em}")),document.head.appendChild(e)}}catch(o){console.error("vite-plugin-css-injected-by-js",o)}})();
2
- import { defineComponent as V, ref as w, watch as g, nextTick as r, onMounted as b, createElementBlock as t, openBlock as s, mergeProps as B, createCommentVNode as i, createElementVNode as f, renderSlot as d, withModifiers as _ } from "vue";
1
+ (function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode("._b4102a3b79656a37{padding:20px;border-radius:5px;border:1px solid gray;outline:0!important;max-width:calc(100% - 2em);max-height:calc(100% - 2em);box-sizing:border-box;overflow:hidden}._b4102a3b79656a37[open]{display:flex;flex-direction:column}._b4102a3b79656a37::backdrop{background:#00000080}._4d394b1507fdc584{display:flex;flex-direction:row;align-items:center;margin-bottom:.5em;min-height:24px;white-space:pre;overflow:hidden}._088d860d2fd75292{flex:1;text-align:center;font-weight:700;font-size:large;overflow:hidden;text-overflow:ellipsis}._468ff1da37ead40a{margin-left:.5em;text-decoration:none;color:#666;font-size:1.5em;line-height:1;width:24px;height:24px;padding:10px;display:flex;align-items:center;justify-content:center;cursor:pointer;border:none;background:none}._468ff1da37ead40a:hover{color:#333;background-color:#f0f0f0;border-radius:3px}._468ff1da37ead40a:focus-visible{outline:2px solid rgb(160,207,255);outline-offset:-2px}._da3b3b2a4aeed1ee{flex:1;overflow:auto;display:flex;flex-direction:column}._61879ba330d9a71c{margin-top:.5em}")),document.head.appendChild(e)}}catch(o){console.error("vite-plugin-css-injected-by-js",o)}})();
2
+ import { defineComponent as h, ref as w, watch as g, nextTick as r, onMounted as b, createElementBlock as t, openBlock as s, mergeProps as B, createCommentVNode as d, createElementVNode as f, renderSlot as i, withModifiers as _ } from "vue";
3
3
  const y = {
4
4
  key: 0,
5
5
  class: "_4d394b1507fdc584"
6
6
  }, k = { class: "_088d860d2fd75292" }, C = { class: "_da3b3b2a4aeed1ee" }, D = {
7
7
  key: 1,
8
8
  class: "_61879ba330d9a71c"
9
- }, $ = /* @__PURE__ */ V({
9
+ }, $ = /* @__PURE__ */ h({
10
10
  __name: "DialogView.obf",
11
11
  props: {
12
12
  modelValue: { type: Boolean },
@@ -20,7 +20,7 @@ const y = {
20
20
  n("update:modelValue", !0);
21
21
  }, v = () => {
22
22
  n("update:modelValue", !1);
23
- }, h = () => {
23
+ }, V = () => {
24
24
  if (!a.closable && a.modelValue) {
25
25
  r(() => {
26
26
  e.value && !e.value.open && e.value.showModal();
@@ -40,26 +40,24 @@ const y = {
40
40
  ref_key: "dialogRef",
41
41
  ref: e,
42
42
  class: "_b4102a3b79656a37"
43
- }, o.$attrs, { onClose: h }), [
43
+ }, o.$attrs, { onClose: V }), [
44
44
  l.showTitleBar ? (s(), t("div", y, [
45
45
  f("span", k, [
46
- d(o.$slots, "title")
46
+ i(o.$slots, "title")
47
47
  ]),
48
- l.showCloseButton ? (s(), t("a", {
48
+ l.showCloseButton ? (s(), t("button", {
49
49
  key: 0,
50
- href: "javascript:void(0)",
51
- role: "button",
52
50
  "aria-label": "Close the dialog",
53
51
  class: "_468ff1da37ead40a",
54
52
  onClick: u[0] || (u[0] = _((M) => e.value?.close(), ["prevent"]))
55
- }, "×")) : i("", !0)
56
- ])) : i("", !0),
53
+ }, "×")) : d("", !0)
54
+ ])) : d("", !0),
57
55
  f("div", C, [
58
- d(o.$slots, "default")
56
+ i(o.$slots, "default")
59
57
  ]),
60
58
  o.$slots.footer ? (s(), t("div", D, [
61
- d(o.$slots, "footer")
62
- ])) : i("", !0)
59
+ i(o.$slots, "footer")
60
+ ])) : d("", !0)
63
61
  ], 16));
64
62
  }
65
63
  }), E = {
@@ -1 +1 @@
1
- {"version":3,"file":"dialog-view.es.js","sources":["../src/DialogView.obf.vue","../src/index.ts"],"sourcesContent":["<template>\n <dialog\n ref=\"dialogRef\"\n class=\"_b4102a3b79656a37\"\n v-bind=\"$attrs\"\n @close=\"handleDialogClose\"\n >\n <div v-if=\"showTitleBar\" class=\"_4d394b1507fdc584\">\n <span class=\"_088d860d2fd75292\">\n <slot name=\"title\"></slot>\n </span>\n <a\n v-if=\"showCloseButton\"\n href=\"javascript:void(0)\"\n role=\"button\"\n aria-label=\"Close the dialog\"\n class=\"_468ff1da37ead40a\"\n @click.prevent=\"dialogRef?.close()\"\n >×</a>\n </div>\n <div class=\"_da3b3b2a4aeed1ee\">\n <slot></slot>\n </div>\n\n <div v-if=\"$slots.footer\" class=\"_61879ba330d9a71c\">\n <slot name=\"footer\"></slot>\n </div>\n </dialog>\n</template>\n\n<script setup lang=\"ts\">\nimport { ref, watch, nextTick, onMounted } from 'vue'\n\ninterface Props {\n modelValue: boolean\n showTitleBar?: boolean\n showCloseButton?: boolean\n closable?: boolean\n}\n\nconst props = withDefaults(defineProps<Props>(), {\n showTitleBar: true,\n showCloseButton: true,\n closable: true,\n})\n\nconst emit = defineEmits<{\n (e: 'update:modelValue', value: boolean): void\n}>()\n\nconst dialogRef = ref<HTMLDialogElement | null>(null)\n\nconst openDialog = (): void => {\n emit('update:modelValue', true)\n}\n\nconst closeDialog = (): void => {\n emit('update:modelValue', false)\n}\n\nconst handleDialogClose = (): void => {\n if (!props.closable) {\n if (props.modelValue) {\n // not programmatically close\n // re-open the dialog\n nextTick(() => {\n if (dialogRef.value && !dialogRef.value.open) {\n dialogRef.value.showModal()\n }\n }) // Avoid using 'cancel' event because some browsers handle it incorrectly\n return;\n }\n }\n if (props.modelValue) {\n emit('update:modelValue', false)\n }\n}\n\nwatch(() => props.modelValue, async (newValue: boolean) => {\n await nextTick()\n \n if (newValue) {\n if (dialogRef.value && !dialogRef.value.open) {\n dialogRef.value.showModal()\n }\n } else {\n if (dialogRef.value && dialogRef.value.open) {\n dialogRef.value.close()\n }\n }\n})\n\nonMounted(() => {\n if (props.modelValue) {\n if (dialogRef.value && !dialogRef.value.open) {\n dialogRef.value.showModal()\n }\n }\n})\n\ndefineExpose({\n open: openDialog,\n close: closeDialog,\n})\n</script>\n\n<style>\n._b4102a3b79656a37 {\n padding: 20px;\n border-radius: 5px;\n border: 1px solid gray;\n outline: 0 !important;\n max-width: calc(100% - 2em);\n max-height: calc(100% - 2em);\n box-sizing: border-box;\n overflow: hidden;\n}\n\n._b4102a3b79656a37[open] {\n display: flex;\n flex-direction: column;\n}\n\n._b4102a3b79656a37::backdrop {\n background: rgba(0, 0, 0, 0.5);\n}\n\n._4d394b1507fdc584 {\n display: flex;\n flex-direction: row;\n align-items: center;\n margin-bottom: 0.5em;\n min-height: 24px;\n white-space: pre;\n overflow: hidden;\n}\n\n._088d860d2fd75292 {\n flex: 1;\n text-align: center;\n font-weight: bold;\n font-size: large;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n._468ff1da37ead40a {\n margin-left: 0.5em;\n text-decoration: none;\n color: #666;\n font-size: 1.5em;\n line-height: 1;\n width: 24px;\n height: 24px;\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n border: none;\n background: none;\n}\n\n._468ff1da37ead40a:hover {\n color: #333;\n background-color: #f0f0f0;\n border-radius: 3px;\n}\n\n._da3b3b2a4aeed1ee {\n flex: 1;\n overflow: auto;\n display: flex;\n flex-direction: column;\n}\n\n._61879ba330d9a71c {\n margin-top: 0.5em;\n}\n</style>","import { App, Plugin } from 'vue'\nimport DialogViewComponent from './DialogView.obf.vue'\n\nexport { default as DialogView } from './DialogView.obf.vue'\n\nexport const DialogViewPlugin: Plugin = {\n install: (app: App) => {\n app.component('DialogView', DialogViewComponent)\n }\n}\n\nexport default DialogViewPlugin\n"],"names":["props","__props","emit","__emit","dialogRef","ref","openDialog","closeDialog","handleDialogClose","nextTick","watch","newValue","onMounted","__expose","_openBlock","_createElementBlock","_mergeProps","$attrs","_hoisted_1","_createElementVNode","_hoisted_2","_renderSlot","_ctx","_cache","_withModifiers","$event","_hoisted_3","$slots","_hoisted_4","DialogViewPlugin","app","DialogViewComponent"],"mappings":";;;;;;;;;;;;;;;;;AAwCA,UAAMA,IAAQC,GAMRC,IAAOC,GAIPC,IAAYC,EAA8B,IAAI,GAE9CC,IAAa,MAAY;AAC7B,MAAAJ,EAAK,qBAAqB,EAAI;AAAA,IAChC,GAEMK,IAAc,MAAY;AAC9B,MAAAL,EAAK,qBAAqB,EAAK;AAAA,IACjC,GAEMM,IAAoB,MAAY;AACpC,UAAI,CAACR,EAAM,YACLA,EAAM,YAAY;AAGpB,QAAAS,EAAS,MAAM;AACb,UAAIL,EAAU,SAAS,CAACA,EAAU,MAAM,QACtCA,EAAU,MAAM,UAAA;AAAA,QAEpB,CAAC;AACD;AAAA,MACF;AAEF,MAAIJ,EAAM,cACRE,EAAK,qBAAqB,EAAK;AAAA,IAEnC;AAEA,WAAAQ,EAAM,MAAMV,EAAM,YAAY,OAAOW,MAAsB;AACzD,YAAMF,EAAA,GAEFE,IACEP,EAAU,SAAS,CAACA,EAAU,MAAM,QACtCA,EAAU,MAAM,UAAA,IAGdA,EAAU,SAASA,EAAU,MAAM,QACrCA,EAAU,MAAM,MAAA;AAAA,IAGtB,CAAC,GAEDQ,EAAU,MAAM;AACd,MAAIZ,EAAM,cACJI,EAAU,SAAS,CAACA,EAAU,MAAM,QACtCA,EAAU,MAAM,UAAA;AAAA,IAGtB,CAAC,GAEDS,EAAa;AAAA,MACX,MAAMP;AAAA,MACN,OAAOC;AAAA,IAAA,CACR,cAtGCO,EAAA,GAAAC,EA0BS,UA1BTC,EA0BS;AAAA,eAzBH;AAAA,MAAJ,KAAIZ;AAAA,MACJ,OAAM;AAAA,IAAA,GACEa,EAAAA,QAAM,EACb,SAAOT,EAAA,CAAiB,GAAA;AAAA,MAEdP,EAAA,gBAAXa,EAAA,GAAAC,EAYM,OAZNG,GAYM;AAAA,QAXJC,EAEO,QAFPC,GAEO;AAAA,UADLC,EAA0BC,EAAA,QAAA,OAAA;AAAA,QAAA;QAGpBrB,EAAA,wBADRc,EAOM,KAAA;AAAA;UALJ,MAAK;AAAA,UACL,MAAK;AAAA,UACL,cAAW;AAAA,UACX,OAAM;AAAA,UACL,SAAKQ,EAAA,CAAA,MAAAA,EAAA,CAAA,IAAAC,EAAA,CAAAC,MAAUrB,EAAA,OAAW,MAAA,GAAK,CAAA,SAAA,CAAA;AAAA,QAAA,GACjC,GAAC;;MAEJe,EAEM,OAFNO,GAEM;AAAA,QADJL,EAAaC,EAAA,QAAA,SAAA;AAAA,MAAA;MAGJK,EAAAA,OAAO,UAAlBb,KAAAC,EAEM,OAFNa,GAEM;AAAA,QADJP,EAA2BC,EAAA,QAAA,QAAA;AAAA,MAAA;;;ICpBpBO,IAA2B;AAAA,EACtC,SAAS,CAACC,MAAa;AACrB,IAAAA,EAAI,UAAU,cAAcC,CAAmB;AAAA,EACjD;AACF;"}
1
+ {"version":3,"file":"dialog-view.es.js","sources":["../src/DialogView.obf.vue","../src/index.ts"],"sourcesContent":["<template>\n <dialog\n ref=\"dialogRef\"\n class=\"_b4102a3b79656a37\"\n v-bind=\"$attrs\"\n @close=\"handleDialogClose\"\n >\n <div v-if=\"showTitleBar\" class=\"_4d394b1507fdc584\">\n <span class=\"_088d860d2fd75292\">\n <slot name=\"title\"></slot>\n </span>\n <button\n v-if=\"showCloseButton\"\n aria-label=\"Close the dialog\"\n class=\"_468ff1da37ead40a\"\n @click.prevent=\"dialogRef?.close()\"\n >×</button>\n </div>\n <div class=\"_da3b3b2a4aeed1ee\">\n <slot></slot>\n </div>\n\n <div v-if=\"$slots.footer\" class=\"_61879ba330d9a71c\">\n <slot name=\"footer\"></slot>\n </div>\n </dialog>\n</template>\n\n<script setup lang=\"ts\">\nimport { ref, watch, nextTick, onMounted } from 'vue'\n\ninterface Props {\n modelValue: boolean\n showTitleBar?: boolean\n showCloseButton?: boolean\n closable?: boolean\n}\n\nconst props = withDefaults(defineProps<Props>(), {\n showTitleBar: true,\n showCloseButton: true,\n closable: true,\n})\n\nconst emit = defineEmits<{\n (e: 'update:modelValue', value: boolean): void\n}>()\n\nconst dialogRef = ref<HTMLDialogElement | null>(null)\n\nconst openDialog = (): void => {\n emit('update:modelValue', true)\n}\n\nconst closeDialog = (): void => {\n emit('update:modelValue', false)\n}\n\nconst handleDialogClose = (): void => {\n if (!props.closable) {\n if (props.modelValue) {\n // not programmatically close\n // re-open the dialog\n nextTick(() => {\n if (dialogRef.value && !dialogRef.value.open) {\n dialogRef.value.showModal()\n }\n }) // Avoid using 'cancel' event because some browsers handle it incorrectly\n return;\n }\n }\n if (props.modelValue) {\n emit('update:modelValue', false)\n }\n}\n\nwatch(() => props.modelValue, async (newValue: boolean) => {\n await nextTick()\n \n if (newValue) {\n if (dialogRef.value && !dialogRef.value.open) {\n dialogRef.value.showModal()\n }\n } else {\n if (dialogRef.value && dialogRef.value.open) {\n dialogRef.value.close()\n }\n }\n})\n\nonMounted(() => {\n if (props.modelValue) {\n if (dialogRef.value && !dialogRef.value.open) {\n dialogRef.value.showModal()\n }\n }\n})\n\ndefineExpose({\n open: openDialog,\n close: closeDialog,\n})\n</script>\n\n<style>\n._b4102a3b79656a37 {\n padding: 20px;\n border-radius: 5px;\n border: 1px solid gray;\n outline: 0 !important;\n max-width: calc(100% - 2em);\n max-height: calc(100% - 2em);\n box-sizing: border-box;\n overflow: hidden;\n}\n\n._b4102a3b79656a37[open] {\n display: flex;\n flex-direction: column;\n}\n\n._b4102a3b79656a37::backdrop {\n background: rgba(0, 0, 0, 0.5);\n}\n\n._4d394b1507fdc584 {\n display: flex;\n flex-direction: row;\n align-items: center;\n margin-bottom: 0.5em;\n min-height: 24px;\n white-space: pre;\n overflow: hidden;\n}\n\n._088d860d2fd75292 {\n flex: 1;\n text-align: center;\n font-weight: bold;\n font-size: large;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n._468ff1da37ead40a {\n margin-left: 0.5em;\n text-decoration: none;\n color: #666;\n font-size: 1.5em;\n line-height: 1;\n width: 24px;\n height: 24px;\n padding: 10px;\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n border: none;\n background: none;\n}\n\n._468ff1da37ead40a:hover {\n color: #333;\n background-color: #f0f0f0;\n border-radius: 3px;\n}\n\n._468ff1da37ead40a:focus-visible {\n outline: 2px solid rgb(160, 207, 255);\n outline-offset: -2px;\n}\n\n._da3b3b2a4aeed1ee {\n flex: 1;\n overflow: auto;\n display: flex;\n flex-direction: column;\n}\n\n._61879ba330d9a71c {\n margin-top: 0.5em;\n}\n</style>","import { App, Plugin } from 'vue'\nimport DialogViewComponent from './DialogView.obf.vue'\n\nexport { default as DialogView } from './DialogView.obf.vue'\n\nexport const DialogViewPlugin: Plugin = {\n install: (app: App) => {\n app.component('DialogView', DialogViewComponent)\n }\n}\n\nexport default DialogViewPlugin\n"],"names":["props","__props","emit","__emit","dialogRef","ref","openDialog","closeDialog","handleDialogClose","nextTick","watch","newValue","onMounted","__expose","_openBlock","_createElementBlock","_mergeProps","$attrs","_hoisted_1","_createElementVNode","_hoisted_2","_renderSlot","_ctx","_cache","_withModifiers","$event","_hoisted_3","$slots","_hoisted_4","DialogViewPlugin","app","DialogViewComponent"],"mappings":";;;;;;;;;;;;;;;;;AAsCA,UAAMA,IAAQC,GAMRC,IAAOC,GAIPC,IAAYC,EAA8B,IAAI,GAE9CC,IAAa,MAAY;AAC7B,MAAAJ,EAAK,qBAAqB,EAAI;AAAA,IAChC,GAEMK,IAAc,MAAY;AAC9B,MAAAL,EAAK,qBAAqB,EAAK;AAAA,IACjC,GAEMM,IAAoB,MAAY;AACpC,UAAI,CAACR,EAAM,YACLA,EAAM,YAAY;AAGpB,QAAAS,EAAS,MAAM;AACb,UAAIL,EAAU,SAAS,CAACA,EAAU,MAAM,QACtCA,EAAU,MAAM,UAAA;AAAA,QAEpB,CAAC;AACD;AAAA,MACF;AAEF,MAAIJ,EAAM,cACRE,EAAK,qBAAqB,EAAK;AAAA,IAEnC;AAEA,WAAAQ,EAAM,MAAMV,EAAM,YAAY,OAAOW,MAAsB;AACzD,YAAMF,EAAA,GAEFE,IACEP,EAAU,SAAS,CAACA,EAAU,MAAM,QACtCA,EAAU,MAAM,UAAA,IAGdA,EAAU,SAASA,EAAU,MAAM,QACrCA,EAAU,MAAM,MAAA;AAAA,IAGtB,CAAC,GAEDQ,EAAU,MAAM;AACd,MAAIZ,EAAM,cACJI,EAAU,SAAS,CAACA,EAAU,MAAM,QACtCA,EAAU,MAAM,UAAA;AAAA,IAGtB,CAAC,GAEDS,EAAa;AAAA,MACX,MAAMP;AAAA,MACN,OAAOC;AAAA,IAAA,CACR,cApGCO,EAAA,GAAAC,EAwBS,UAxBTC,EAwBS;AAAA,eAvBH;AAAA,MAAJ,KAAIZ;AAAA,MACJ,OAAM;AAAA,IAAA,GACEa,EAAAA,QAAM,EACb,SAAOT,EAAA,CAAiB,GAAA;AAAA,MAEdP,EAAA,gBAAXa,EAAA,GAAAC,EAUM,OAVNG,GAUM;AAAA,QATJC,EAEO,QAFPC,GAEO;AAAA,UADLC,EAA0BC,EAAA,QAAA,OAAA;AAAA,QAAA;QAGpBrB,EAAA,wBADRc,EAKW,UAAA;AAAA;UAHT,cAAW;AAAA,UACX,OAAM;AAAA,UACL,SAAKQ,EAAA,CAAA,MAAAA,EAAA,CAAA,IAAAC,EAAA,CAAAC,MAAUrB,EAAA,OAAW,MAAA,GAAK,CAAA,SAAA,CAAA;AAAA,QAAA,GACjC,GAAC;;MAEJe,EAEM,OAFNO,GAEM;AAAA,QADJL,EAAaC,EAAA,QAAA,SAAA;AAAA,MAAA;MAGJK,EAAAA,OAAO,UAAlBb,KAAAC,EAEM,OAFNa,GAEM;AAAA,QADJP,EAA2BC,EAAA,QAAA,QAAA;AAAA,MAAA;;;IClBpBO,IAA2B;AAAA,EACtC,SAAS,CAACC,MAAa;AACrB,IAAAA,EAAI,UAAU,cAAcC,CAAmB;AAAA,EACjD;AACF;"}
@@ -1,3 +1,3 @@
1
- (function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode("._b4102a3b79656a37{padding:20px;border-radius:5px;border:1px solid gray;outline:0!important;max-width:calc(100% - 2em);max-height:calc(100% - 2em);box-sizing:border-box;overflow:hidden}._b4102a3b79656a37[open]{display:flex;flex-direction:column}._b4102a3b79656a37::backdrop{background:#00000080}._4d394b1507fdc584{display:flex;flex-direction:row;align-items:center;margin-bottom:.5em;min-height:24px;white-space:pre;overflow:hidden}._088d860d2fd75292{flex:1;text-align:center;font-weight:700;font-size:large;overflow:hidden;text-overflow:ellipsis}._468ff1da37ead40a{margin-left:.5em;text-decoration:none;color:#666;font-size:1.5em;line-height:1;width:24px;height:24px;display:flex;align-items:center;justify-content:center;cursor:pointer;border:none;background:none}._468ff1da37ead40a:hover{color:#333;background-color:#f0f0f0;border-radius:3px}._da3b3b2a4aeed1ee{flex:1;overflow:auto;display:flex;flex-direction:column}._61879ba330d9a71c{margin-top:.5em}")),document.head.appendChild(e)}}catch(o){console.error("vite-plugin-css-injected-by-js",o)}})();
2
- (function(l,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(l=typeof globalThis<"u"?globalThis:l||self,e(l.DialogView={},l.Vue))})(this,(function(l,e){"use strict";const r={key:0,class:"_4d394b1507fdc584"},f={class:"_088d860d2fd75292"},u={class:"_da3b3b2a4aeed1ee"},m={key:1,class:"_61879ba330d9a71c"},i=e.defineComponent({__name:"DialogView.obf",props:{modelValue:{type:Boolean},showTitleBar:{type:Boolean,default:!0},showCloseButton:{type:Boolean,default:!0},closable:{type:Boolean,default:!0}},emits:["update:modelValue"],setup(a,{expose:p,emit:V}){const n=a,s=V,o=e.ref(null),h=()=>{s("update:modelValue",!0)},g=()=>{s("update:modelValue",!1)},w=()=>{if(!n.closable&&n.modelValue){e.nextTick(()=>{o.value&&!o.value.open&&o.value.showModal()});return}n.modelValue&&s("update:modelValue",!1)};return e.watch(()=>n.modelValue,async t=>{await e.nextTick(),t?o.value&&!o.value.open&&o.value.showModal():o.value&&o.value.open&&o.value.close()}),e.onMounted(()=>{n.modelValue&&o.value&&!o.value.open&&o.value.showModal()}),p({open:h,close:g}),(t,c)=>(e.openBlock(),e.createElementBlock("dialog",e.mergeProps({ref_key:"dialogRef",ref:o,class:"_b4102a3b79656a37"},t.$attrs,{onClose:w}),[a.showTitleBar?(e.openBlock(),e.createElementBlock("div",r,[e.createElementVNode("span",f,[e.renderSlot(t.$slots,"title")]),a.showCloseButton?(e.openBlock(),e.createElementBlock("a",{key:0,href:"javascript:void(0)",role:"button","aria-label":"Close the dialog",class:"_468ff1da37ead40a",onClick:c[0]||(c[0]=e.withModifiers(B=>o.value?.close(),["prevent"]))},"×")):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",u,[e.renderSlot(t.$slots,"default")]),t.$slots.footer?(e.openBlock(),e.createElementBlock("div",m,[e.renderSlot(t.$slots,"footer")])):e.createCommentVNode("",!0)],16))}}),d={install:a=>{a.component("DialogView",i)}};l.DialogView=i,l.DialogViewPlugin=d,l.default=d,Object.defineProperties(l,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
1
+ (function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode("._b4102a3b79656a37{padding:20px;border-radius:5px;border:1px solid gray;outline:0!important;max-width:calc(100% - 2em);max-height:calc(100% - 2em);box-sizing:border-box;overflow:hidden}._b4102a3b79656a37[open]{display:flex;flex-direction:column}._b4102a3b79656a37::backdrop{background:#00000080}._4d394b1507fdc584{display:flex;flex-direction:row;align-items:center;margin-bottom:.5em;min-height:24px;white-space:pre;overflow:hidden}._088d860d2fd75292{flex:1;text-align:center;font-weight:700;font-size:large;overflow:hidden;text-overflow:ellipsis}._468ff1da37ead40a{margin-left:.5em;text-decoration:none;color:#666;font-size:1.5em;line-height:1;width:24px;height:24px;padding:10px;display:flex;align-items:center;justify-content:center;cursor:pointer;border:none;background:none}._468ff1da37ead40a:hover{color:#333;background-color:#f0f0f0;border-radius:3px}._468ff1da37ead40a:focus-visible{outline:2px solid rgb(160,207,255);outline-offset:-2px}._da3b3b2a4aeed1ee{flex:1;overflow:auto;display:flex;flex-direction:column}._61879ba330d9a71c{margin-top:.5em}")),document.head.appendChild(e)}}catch(o){console.error("vite-plugin-css-injected-by-js",o)}})();
2
+ (function(l,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(l=typeof globalThis<"u"?globalThis:l||self,e(l.DialogView={},l.Vue))})(this,(function(l,e){"use strict";const r={key:0,class:"_4d394b1507fdc584"},f={class:"_088d860d2fd75292"},u={class:"_da3b3b2a4aeed1ee"},m={key:1,class:"_61879ba330d9a71c"},i=e.defineComponent({__name:"DialogView.obf",props:{modelValue:{type:Boolean},showTitleBar:{type:Boolean,default:!0},showCloseButton:{type:Boolean,default:!0},closable:{type:Boolean,default:!0}},emits:["update:modelValue"],setup(a,{expose:p,emit:V}){const n=a,s=V,o=e.ref(null),g=()=>{s("update:modelValue",!0)},h=()=>{s("update:modelValue",!1)},w=()=>{if(!n.closable&&n.modelValue){e.nextTick(()=>{o.value&&!o.value.open&&o.value.showModal()});return}n.modelValue&&s("update:modelValue",!1)};return e.watch(()=>n.modelValue,async t=>{await e.nextTick(),t?o.value&&!o.value.open&&o.value.showModal():o.value&&o.value.open&&o.value.close()}),e.onMounted(()=>{n.modelValue&&o.value&&!o.value.open&&o.value.showModal()}),p({open:g,close:h}),(t,c)=>(e.openBlock(),e.createElementBlock("dialog",e.mergeProps({ref_key:"dialogRef",ref:o,class:"_b4102a3b79656a37"},t.$attrs,{onClose:w}),[a.showTitleBar?(e.openBlock(),e.createElementBlock("div",r,[e.createElementVNode("span",f,[e.renderSlot(t.$slots,"title")]),a.showCloseButton?(e.openBlock(),e.createElementBlock("button",{key:0,"aria-label":"Close the dialog",class:"_468ff1da37ead40a",onClick:c[0]||(c[0]=e.withModifiers(B=>o.value?.close(),["prevent"]))},"×")):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",u,[e.renderSlot(t.$slots,"default")]),t.$slots.footer?(e.openBlock(),e.createElementBlock("div",m,[e.renderSlot(t.$slots,"footer")])):e.createCommentVNode("",!0)],16))}}),d={install:a=>{a.component("DialogView",i)}};l.DialogView=i,l.DialogViewPlugin=d,l.default=d,Object.defineProperties(l,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
3
3
  //# sourceMappingURL=dialog-view.umd.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"dialog-view.umd.js","sources":["../src/DialogView.obf.vue","../src/index.ts"],"sourcesContent":["<template>\n <dialog\n ref=\"dialogRef\"\n class=\"_b4102a3b79656a37\"\n v-bind=\"$attrs\"\n @close=\"handleDialogClose\"\n >\n <div v-if=\"showTitleBar\" class=\"_4d394b1507fdc584\">\n <span class=\"_088d860d2fd75292\">\n <slot name=\"title\"></slot>\n </span>\n <a\n v-if=\"showCloseButton\"\n href=\"javascript:void(0)\"\n role=\"button\"\n aria-label=\"Close the dialog\"\n class=\"_468ff1da37ead40a\"\n @click.prevent=\"dialogRef?.close()\"\n >×</a>\n </div>\n <div class=\"_da3b3b2a4aeed1ee\">\n <slot></slot>\n </div>\n\n <div v-if=\"$slots.footer\" class=\"_61879ba330d9a71c\">\n <slot name=\"footer\"></slot>\n </div>\n </dialog>\n</template>\n\n<script setup lang=\"ts\">\nimport { ref, watch, nextTick, onMounted } from 'vue'\n\ninterface Props {\n modelValue: boolean\n showTitleBar?: boolean\n showCloseButton?: boolean\n closable?: boolean\n}\n\nconst props = withDefaults(defineProps<Props>(), {\n showTitleBar: true,\n showCloseButton: true,\n closable: true,\n})\n\nconst emit = defineEmits<{\n (e: 'update:modelValue', value: boolean): void\n}>()\n\nconst dialogRef = ref<HTMLDialogElement | null>(null)\n\nconst openDialog = (): void => {\n emit('update:modelValue', true)\n}\n\nconst closeDialog = (): void => {\n emit('update:modelValue', false)\n}\n\nconst handleDialogClose = (): void => {\n if (!props.closable) {\n if (props.modelValue) {\n // not programmatically close\n // re-open the dialog\n nextTick(() => {\n if (dialogRef.value && !dialogRef.value.open) {\n dialogRef.value.showModal()\n }\n }) // Avoid using 'cancel' event because some browsers handle it incorrectly\n return;\n }\n }\n if (props.modelValue) {\n emit('update:modelValue', false)\n }\n}\n\nwatch(() => props.modelValue, async (newValue: boolean) => {\n await nextTick()\n \n if (newValue) {\n if (dialogRef.value && !dialogRef.value.open) {\n dialogRef.value.showModal()\n }\n } else {\n if (dialogRef.value && dialogRef.value.open) {\n dialogRef.value.close()\n }\n }\n})\n\nonMounted(() => {\n if (props.modelValue) {\n if (dialogRef.value && !dialogRef.value.open) {\n dialogRef.value.showModal()\n }\n }\n})\n\ndefineExpose({\n open: openDialog,\n close: closeDialog,\n})\n</script>\n\n<style>\n._b4102a3b79656a37 {\n padding: 20px;\n border-radius: 5px;\n border: 1px solid gray;\n outline: 0 !important;\n max-width: calc(100% - 2em);\n max-height: calc(100% - 2em);\n box-sizing: border-box;\n overflow: hidden;\n}\n\n._b4102a3b79656a37[open] {\n display: flex;\n flex-direction: column;\n}\n\n._b4102a3b79656a37::backdrop {\n background: rgba(0, 0, 0, 0.5);\n}\n\n._4d394b1507fdc584 {\n display: flex;\n flex-direction: row;\n align-items: center;\n margin-bottom: 0.5em;\n min-height: 24px;\n white-space: pre;\n overflow: hidden;\n}\n\n._088d860d2fd75292 {\n flex: 1;\n text-align: center;\n font-weight: bold;\n font-size: large;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n._468ff1da37ead40a {\n margin-left: 0.5em;\n text-decoration: none;\n color: #666;\n font-size: 1.5em;\n line-height: 1;\n width: 24px;\n height: 24px;\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n border: none;\n background: none;\n}\n\n._468ff1da37ead40a:hover {\n color: #333;\n background-color: #f0f0f0;\n border-radius: 3px;\n}\n\n._da3b3b2a4aeed1ee {\n flex: 1;\n overflow: auto;\n display: flex;\n flex-direction: column;\n}\n\n._61879ba330d9a71c {\n margin-top: 0.5em;\n}\n</style>","import { App, Plugin } from 'vue'\nimport DialogViewComponent from './DialogView.obf.vue'\n\nexport { default as DialogView } from './DialogView.obf.vue'\n\nexport const DialogViewPlugin: Plugin = {\n install: (app: App) => {\n app.component('DialogView', DialogViewComponent)\n }\n}\n\nexport default DialogViewPlugin\n"],"names":["props","__props","emit","__emit","dialogRef","ref","openDialog","closeDialog","handleDialogClose","nextTick","watch","newValue","onMounted","__expose","_openBlock","_createElementBlock","_mergeProps","$attrs","_hoisted_1","_createElementVNode","_hoisted_2","_renderSlot","_ctx","_cache","_withModifiers","$event","_hoisted_3","$slots","_hoisted_4","DialogViewPlugin","app","DialogViewComponent"],"mappings":"ooBAwCA,MAAMA,EAAQC,EAMRC,EAAOC,EAIPC,EAAYC,EAAAA,IAA8B,IAAI,EAE9CC,EAAa,IAAY,CAC7BJ,EAAK,oBAAqB,EAAI,CAChC,EAEMK,EAAc,IAAY,CAC9BL,EAAK,oBAAqB,EAAK,CACjC,EAEMM,EAAoB,IAAY,CACpC,GAAI,CAACR,EAAM,UACLA,EAAM,WAAY,CAGpBS,EAAAA,SAAS,IAAM,CACTL,EAAU,OAAS,CAACA,EAAU,MAAM,MACtCA,EAAU,MAAM,UAAA,CAEpB,CAAC,EACD,MACF,CAEEJ,EAAM,YACRE,EAAK,oBAAqB,EAAK,CAEnC,EAEAQ,OAAAA,EAAAA,MAAM,IAAMV,EAAM,WAAY,MAAOW,GAAsB,CACzD,MAAMF,WAAA,EAEFE,EACEP,EAAU,OAAS,CAACA,EAAU,MAAM,MACtCA,EAAU,MAAM,UAAA,EAGdA,EAAU,OAASA,EAAU,MAAM,MACrCA,EAAU,MAAM,MAAA,CAGtB,CAAC,EAEDQ,EAAAA,UAAU,IAAM,CACVZ,EAAM,YACJI,EAAU,OAAS,CAACA,EAAU,MAAM,MACtCA,EAAU,MAAM,UAAA,CAGtB,CAAC,EAEDS,EAAa,CACX,KAAMP,EACN,MAAOC,CAAA,CACR,UAtGCO,YAAA,EAAAC,qBA0BS,SA1BTC,EAAAA,WA0BS,SAzBH,YAAJ,IAAIZ,EACJ,MAAM,mBAAA,EACEa,EAAAA,OAAM,CACb,QAAOT,CAAA,CAAiB,EAAA,CAEdP,EAAA,cAAXa,EAAAA,UAAA,EAAAC,EAAAA,mBAYM,MAZNG,EAYM,CAXJC,EAAAA,mBAEO,OAFPC,EAEO,CADLC,aAA0BC,EAAA,OAAA,OAAA,CAAA,GAGpBrB,EAAA,+BADRc,EAAAA,mBAOM,IAAA,OALJ,KAAK,qBACL,KAAK,SACL,aAAW,mBACX,MAAM,oBACL,QAAKQ,EAAA,CAAA,IAAAA,EAAA,CAAA,EAAAC,EAAAA,cAAAC,GAAUrB,EAAA,OAAW,MAAA,EAAK,CAAA,SAAA,CAAA,EAAA,EACjC,GAAC,8DAEJe,EAAAA,mBAEM,MAFNO,EAEM,CADJL,aAAaC,EAAA,OAAA,SAAA,CAAA,GAGJK,EAAAA,OAAO,QAAlBb,EAAAA,YAAAC,EAAAA,mBAEM,MAFNa,EAEM,CADJP,aAA2BC,EAAA,OAAA,QAAA,CAAA,yCCpBpBO,EAA2B,CACtC,QAAUC,GAAa,CACrBA,EAAI,UAAU,aAAcC,CAAmB,CACjD,CACF"}
1
+ {"version":3,"file":"dialog-view.umd.js","sources":["../src/DialogView.obf.vue","../src/index.ts"],"sourcesContent":["<template>\n <dialog\n ref=\"dialogRef\"\n class=\"_b4102a3b79656a37\"\n v-bind=\"$attrs\"\n @close=\"handleDialogClose\"\n >\n <div v-if=\"showTitleBar\" class=\"_4d394b1507fdc584\">\n <span class=\"_088d860d2fd75292\">\n <slot name=\"title\"></slot>\n </span>\n <button\n v-if=\"showCloseButton\"\n aria-label=\"Close the dialog\"\n class=\"_468ff1da37ead40a\"\n @click.prevent=\"dialogRef?.close()\"\n >×</button>\n </div>\n <div class=\"_da3b3b2a4aeed1ee\">\n <slot></slot>\n </div>\n\n <div v-if=\"$slots.footer\" class=\"_61879ba330d9a71c\">\n <slot name=\"footer\"></slot>\n </div>\n </dialog>\n</template>\n\n<script setup lang=\"ts\">\nimport { ref, watch, nextTick, onMounted } from 'vue'\n\ninterface Props {\n modelValue: boolean\n showTitleBar?: boolean\n showCloseButton?: boolean\n closable?: boolean\n}\n\nconst props = withDefaults(defineProps<Props>(), {\n showTitleBar: true,\n showCloseButton: true,\n closable: true,\n})\n\nconst emit = defineEmits<{\n (e: 'update:modelValue', value: boolean): void\n}>()\n\nconst dialogRef = ref<HTMLDialogElement | null>(null)\n\nconst openDialog = (): void => {\n emit('update:modelValue', true)\n}\n\nconst closeDialog = (): void => {\n emit('update:modelValue', false)\n}\n\nconst handleDialogClose = (): void => {\n if (!props.closable) {\n if (props.modelValue) {\n // not programmatically close\n // re-open the dialog\n nextTick(() => {\n if (dialogRef.value && !dialogRef.value.open) {\n dialogRef.value.showModal()\n }\n }) // Avoid using 'cancel' event because some browsers handle it incorrectly\n return;\n }\n }\n if (props.modelValue) {\n emit('update:modelValue', false)\n }\n}\n\nwatch(() => props.modelValue, async (newValue: boolean) => {\n await nextTick()\n \n if (newValue) {\n if (dialogRef.value && !dialogRef.value.open) {\n dialogRef.value.showModal()\n }\n } else {\n if (dialogRef.value && dialogRef.value.open) {\n dialogRef.value.close()\n }\n }\n})\n\nonMounted(() => {\n if (props.modelValue) {\n if (dialogRef.value && !dialogRef.value.open) {\n dialogRef.value.showModal()\n }\n }\n})\n\ndefineExpose({\n open: openDialog,\n close: closeDialog,\n})\n</script>\n\n<style>\n._b4102a3b79656a37 {\n padding: 20px;\n border-radius: 5px;\n border: 1px solid gray;\n outline: 0 !important;\n max-width: calc(100% - 2em);\n max-height: calc(100% - 2em);\n box-sizing: border-box;\n overflow: hidden;\n}\n\n._b4102a3b79656a37[open] {\n display: flex;\n flex-direction: column;\n}\n\n._b4102a3b79656a37::backdrop {\n background: rgba(0, 0, 0, 0.5);\n}\n\n._4d394b1507fdc584 {\n display: flex;\n flex-direction: row;\n align-items: center;\n margin-bottom: 0.5em;\n min-height: 24px;\n white-space: pre;\n overflow: hidden;\n}\n\n._088d860d2fd75292 {\n flex: 1;\n text-align: center;\n font-weight: bold;\n font-size: large;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n._468ff1da37ead40a {\n margin-left: 0.5em;\n text-decoration: none;\n color: #666;\n font-size: 1.5em;\n line-height: 1;\n width: 24px;\n height: 24px;\n padding: 10px;\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n border: none;\n background: none;\n}\n\n._468ff1da37ead40a:hover {\n color: #333;\n background-color: #f0f0f0;\n border-radius: 3px;\n}\n\n._468ff1da37ead40a:focus-visible {\n outline: 2px solid rgb(160, 207, 255);\n outline-offset: -2px;\n}\n\n._da3b3b2a4aeed1ee {\n flex: 1;\n overflow: auto;\n display: flex;\n flex-direction: column;\n}\n\n._61879ba330d9a71c {\n margin-top: 0.5em;\n}\n</style>","import { App, Plugin } from 'vue'\nimport DialogViewComponent from './DialogView.obf.vue'\n\nexport { default as DialogView } from './DialogView.obf.vue'\n\nexport const DialogViewPlugin: Plugin = {\n install: (app: App) => {\n app.component('DialogView', DialogViewComponent)\n }\n}\n\nexport default DialogViewPlugin\n"],"names":["props","__props","emit","__emit","dialogRef","ref","openDialog","closeDialog","handleDialogClose","nextTick","watch","newValue","onMounted","__expose","_openBlock","_createElementBlock","_mergeProps","$attrs","_hoisted_1","_createElementVNode","_hoisted_2","_renderSlot","_ctx","_cache","_withModifiers","$event","_hoisted_3","$slots","_hoisted_4","DialogViewPlugin","app","DialogViewComponent"],"mappings":"ooBAsCA,MAAMA,EAAQC,EAMRC,EAAOC,EAIPC,EAAYC,EAAAA,IAA8B,IAAI,EAE9CC,EAAa,IAAY,CAC7BJ,EAAK,oBAAqB,EAAI,CAChC,EAEMK,EAAc,IAAY,CAC9BL,EAAK,oBAAqB,EAAK,CACjC,EAEMM,EAAoB,IAAY,CACpC,GAAI,CAACR,EAAM,UACLA,EAAM,WAAY,CAGpBS,EAAAA,SAAS,IAAM,CACTL,EAAU,OAAS,CAACA,EAAU,MAAM,MACtCA,EAAU,MAAM,UAAA,CAEpB,CAAC,EACD,MACF,CAEEJ,EAAM,YACRE,EAAK,oBAAqB,EAAK,CAEnC,EAEAQ,OAAAA,EAAAA,MAAM,IAAMV,EAAM,WAAY,MAAOW,GAAsB,CACzD,MAAMF,WAAA,EAEFE,EACEP,EAAU,OAAS,CAACA,EAAU,MAAM,MACtCA,EAAU,MAAM,UAAA,EAGdA,EAAU,OAASA,EAAU,MAAM,MACrCA,EAAU,MAAM,MAAA,CAGtB,CAAC,EAEDQ,EAAAA,UAAU,IAAM,CACVZ,EAAM,YACJI,EAAU,OAAS,CAACA,EAAU,MAAM,MACtCA,EAAU,MAAM,UAAA,CAGtB,CAAC,EAEDS,EAAa,CACX,KAAMP,EACN,MAAOC,CAAA,CACR,UApGCO,YAAA,EAAAC,qBAwBS,SAxBTC,EAAAA,WAwBS,SAvBH,YAAJ,IAAIZ,EACJ,MAAM,mBAAA,EACEa,EAAAA,OAAM,CACb,QAAOT,CAAA,CAAiB,EAAA,CAEdP,EAAA,cAAXa,EAAAA,UAAA,EAAAC,EAAAA,mBAUM,MAVNG,EAUM,CATJC,EAAAA,mBAEO,OAFPC,EAEO,CADLC,aAA0BC,EAAA,OAAA,OAAA,CAAA,GAGpBrB,EAAA,+BADRc,EAAAA,mBAKW,SAAA,OAHT,aAAW,mBACX,MAAM,oBACL,QAAKQ,EAAA,CAAA,IAAAA,EAAA,CAAA,EAAAC,EAAAA,cAAAC,GAAUrB,EAAA,OAAW,MAAA,EAAK,CAAA,SAAA,CAAA,EAAA,EACjC,GAAC,8DAEJe,EAAAA,mBAEM,MAFNO,EAEM,CADJL,aAAaC,EAAA,OAAA,SAAA,CAAA,GAGJK,EAAAA,OAAO,QAAlBb,EAAAA,YAAAC,EAAAA,mBAEM,MAFNa,EAEM,CADJP,aAA2BC,EAAA,OAAA,QAAA,CAAA,yCClBpBO,EAA2B,CACtC,QAAUC,GAAa,CACrBA,EAAI,UAAU,aAAcC,CAAmB,CACjD,CACF"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vue-dialog-view",
3
- "version": "1.4.2",
3
+ "version": "1.4.3",
4
4
  "description": "A modern Vue 3 dialog component using native dialog element",
5
5
  "type": "module",
6
6
  "main": "./dist/dialog-view.umd.js",
@@ -9,14 +9,12 @@
9
9
  <span class="_088d860d2fd75292">
10
10
  <slot name="title"></slot>
11
11
  </span>
12
- <a
12
+ <button
13
13
  v-if="showCloseButton"
14
- href="javascript:void(0)"
15
- role="button"
16
14
  aria-label="Close the dialog"
17
15
  class="_468ff1da37ead40a"
18
16
  @click.prevent="dialogRef?.close()"
19
- >×</a>
17
+ >×</button>
20
18
  </div>
21
19
  <div class="_da3b3b2a4aeed1ee">
22
20
  <slot></slot>
@@ -152,6 +150,7 @@ defineExpose({
152
150
  line-height: 1;
153
151
  width: 24px;
154
152
  height: 24px;
153
+ padding: 10px;
155
154
  display: flex;
156
155
  align-items: center;
157
156
  justify-content: center;
@@ -166,6 +165,11 @@ defineExpose({
166
165
  border-radius: 3px;
167
166
  }
168
167
 
168
+ ._468ff1da37ead40a:focus-visible {
169
+ outline: 2px solid rgb(160, 207, 255);
170
+ outline-offset: -2px;
171
+ }
172
+
169
173
  ._da3b3b2a4aeed1ee {
170
174
  flex: 1;
171
175
  overflow: auto;
@@ -9,14 +9,12 @@
9
9
  <span class="dialog-title">
10
10
  <slot name="title"></slot>
11
11
  </span>
12
- <a
12
+ <button
13
13
  v-if="showCloseButton"
14
- href="javascript:void(0)"
15
- role="button"
16
14
  aria-label="Close the dialog"
17
15
  class="dialog-close-button"
18
16
  @click.prevent="dialogRef?.close()"
19
- >×</a>
17
+ >×</button>
20
18
  </div>
21
19
  <div class="dialog-content">
22
20
  <slot></slot>
@@ -152,6 +150,7 @@ defineExpose({
152
150
  line-height: 1;
153
151
  width: 24px;
154
152
  height: 24px;
153
+ padding: 10px;
155
154
  display: flex;
156
155
  align-items: center;
157
156
  justify-content: center;
@@ -166,6 +165,11 @@ defineExpose({
166
165
  border-radius: 3px;
167
166
  }
168
167
 
168
+ .dialog-close-button:focus-visible {
169
+ outline: 2px solid rgb(160, 207, 255);
170
+ outline-offset: -2px;
171
+ }
172
+
169
173
  .dialog-content {
170
174
  flex: 1;
171
175
  overflow: auto;