@wikicasa-dev/components 2.0.45 → 2.0.46

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/dist/BaseModal.js CHANGED
@@ -1,4 +1,4 @@
1
- import { _ as f } from "./chunks/BaseModal.vue_vue_type_style_index_0_lang.Bn6P4cIx.js";
1
+ import { _ as f } from "./chunks/BaseModal.vue_vue_type_style_index_0_lang.CeKWAwpg.js";
2
2
  export {
3
3
  f as default
4
4
  };
@@ -43,6 +43,7 @@ declare const __VLS_component: import('vue').DefineComponent<{
43
43
  }, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
44
44
  opened: () => any;
45
45
  closed: () => any;
46
+ dialogClick: (args_0: MouseEvent) => any;
46
47
  }, string, import('vue').PublicProps, Readonly<{
47
48
  id?: string;
48
49
  size?: "modal-sm" | "modal-md" | "modal-lg" | "modal-xxl" | "modal-full";
@@ -67,6 +68,7 @@ declare const __VLS_component: import('vue').DefineComponent<{
67
68
  }> & Readonly<{
68
69
  onOpened?: (() => any) | undefined;
69
70
  onClosed?: (() => any) | undefined;
71
+ onDialogClick?: ((args_0: MouseEvent) => any) | undefined;
70
72
  }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
71
73
  backdropEl: HTMLDivElement;
72
74
  modalDialog: HTMLDialogElement;
@@ -1,16 +1,16 @@
1
- import { defineComponent as E, ref as d, useTemplateRef as T, onUnmounted as z, watch as H, openBlock as m, createBlock as O, Teleport as $, createElementVNode as l, normalizeClass as s, withModifiers as y, createElementBlock as h, createVNode as D, unref as I, createCommentVNode as w, renderSlot as r, nextTick as K } from "vue";
1
+ import { defineComponent as T, ref as d, useTemplateRef as z, onUnmounted as H, watch as O, openBlock as m, createBlock as $, Teleport as D, createElementVNode as a, normalizeClass as s, withModifiers as y, createElementBlock as h, createVNode as I, unref as K, createCommentVNode as w, renderSlot as r, nextTick as N } from "vue";
2
2
  import "./types-B0dZ7OiV.D29wNgoj.js";
3
- import { l as N } from "./CloseIcon.DIkr4soH.js";
3
+ import { l as V } from "./CloseIcon.DIkr4soH.js";
4
4
  import "./PharmacyIcon.56ql_DYl.js";
5
- import '../assets/BaseModal.css';const g = () => navigator?.userAgent.includes("Windows"), V = (o, c) => new Promise((a, t) => {
5
+ import '../assets/BaseModal.css';const g = () => navigator?.userAgent.includes("Windows"), A = (o, c) => new Promise((l, t) => {
6
6
  setTimeout(() => {
7
7
  try {
8
- o && o(), a();
8
+ o && o(), l();
9
9
  } catch {
10
10
  t();
11
11
  }
12
12
  }, c);
13
- }), A = ["id", "data-cy"], F = ["innerHTML"], R = /* @__PURE__ */ E({
13
+ }), F = ["id", "data-cy"], P = ["innerHTML"], j = /* @__PURE__ */ T({
14
14
  __name: "BaseModal",
15
15
  props: {
16
16
  id: { default: "base-bt-modal" },
@@ -31,25 +31,25 @@ import '../assets/BaseModal.css';const g = () => navigator?.userAgent.includes("
31
31
  closeIconBtnClasses: {},
32
32
  titleClasses: {}
33
33
  },
34
- emits: ["closed", "opened"],
34
+ emits: ["closed", "opened", "dialogClick"],
35
35
  setup(o, { emit: c }) {
36
- const a = c, t = d(!1), f = d(null), u = T("modalDialog"), k = d(!1), n = d(!1), p = ({ key: e }) => {
36
+ const l = c, t = d(!1), f = d(null), u = z("modalDialog"), k = d(!1), n = d(!1), p = ({ key: e }) => {
37
37
  e === "Escape" && i();
38
38
  }, C = () => {
39
39
  document?.body.addEventListener("keydown", p);
40
40
  }, b = () => {
41
41
  document?.body.removeEventListener("keydown", p);
42
42
  }, M = async () => {
43
- t.value = !0, K(() => {
44
- C(), document?.documentElement.classList.add("uikit-no-scrolling"), g() ? document?.body.classList.add("uikit-no-scrolling", "sm:uikit-pr-15px") : document?.body.classList.add("uikit-no-scrolling");
45
- }), a("opened"), o.autoClose !== void 0 && setTimeout(() => {
43
+ t.value = !0, N(() => {
44
+ C(), g() ? document?.body.classList.add("uikit-no-scrolling", "sm:uikit-pr-15px") : document?.body.classList.add("uikit-no-scrolling");
45
+ }), l("opened"), o.autoClose !== void 0 && setTimeout(() => {
46
46
  i();
47
47
  }, o.autoClose);
48
48
  }, B = (e) => {
49
49
  u.value && u.value.contains(e.target) && (n.value = !0);
50
- }, L = (e) => {
50
+ }, x = (e) => {
51
51
  u.value && u.value.contains(e.target) && (n.value = !1);
52
- }, x = async () => {
52
+ }, L = async () => {
53
53
  if (o.closeOnClickOut) {
54
54
  if (n.value) {
55
55
  n.value = !1;
@@ -58,20 +58,20 @@ import '../assets/BaseModal.css';const g = () => navigator?.userAgent.includes("
58
58
  await i();
59
59
  }
60
60
  }, i = async () => {
61
- t.value = !1, b(), document?.documentElement.classList.remove("uikit-no-scrolling"), navigator.userAgent.includes("Windows") ? document?.body.classList.remove("uikit-no-scrolling", "sm:uikit-pr-15px") : document?.body.classList.remove("uikit-no-scrolling"), await V(() => {
62
- f.value?.classList.add("uikit-hidden"), a("closed");
61
+ t.value = !1, b(), document?.documentElement.classList.remove("uikit-no-scrolling"), navigator.userAgent.includes("Windows") ? document?.body.classList.remove("uikit-no-scrolling", "sm:uikit-pr-15px") : document?.body.classList.remove("uikit-no-scrolling"), await A(() => {
62
+ f.value?.classList.add("uikit-hidden"), l("closed");
63
63
  }, 250);
64
64
  };
65
- return z(() => {
65
+ return H(() => {
66
66
  b(), document?.documentElement.classList.remove("uikit-no-scrolling"), g() ? document?.body.classList.remove("uikit-no-scrolling", "sm:uikit-pr-15px") : document?.body.classList.remove("uikit-no-scrolling");
67
- }), H(
67
+ }), O(
68
68
  () => o.showModal,
69
69
  async (e) => {
70
70
  !e && !t.value ? k.value = !0 : k.value = !1, e && !t.value && await M(), !e && t.value && await i(), t.value = e;
71
71
  },
72
72
  { immediate: !0 }
73
- ), (e, v) => (m(), O($, { to: "body" }, [
74
- l("div", {
73
+ ), (e, v) => (m(), $(D, { to: "body" }, [
74
+ a("div", {
75
75
  ref_key: "backdropEl",
76
76
  ref: f,
77
77
  class: s(["bbt-backdrop uikit-fixed uikit-left-0 uikit-top-0 uikit-h-full uikit-w-full", [
@@ -84,11 +84,11 @@ import '../assets/BaseModal.css';const g = () => navigator?.userAgent.includes("
84
84
  { hide: k.value }
85
85
  ]]),
86
86
  style: { "z-index": "1062" },
87
- onClick: x,
87
+ onClick: L,
88
88
  onMousedown: B,
89
- onMouseup: L
89
+ onMouseup: x
90
90
  }, [
91
- l("dialog", {
91
+ a("dialog", {
92
92
  id: e.id,
93
93
  ref: "modalDialog",
94
94
  "data-cy": e.dataCy,
@@ -102,10 +102,9 @@ import '../assets/BaseModal.css';const g = () => navigator?.userAgent.includes("
102
102
  `base-${e.size}`,
103
103
  e.fullHeight ? "uikit-h-[95%]" : "uikit-h-auto"
104
104
  ]]),
105
- onClick: v[0] || (v[0] = y(() => {
106
- }, ["stop"]))
105
+ onClick: v[0] || (v[0] = y((E) => l("dialogClick", E), ["stop"]))
107
106
  }, [
108
- l("div", {
107
+ a("div", {
109
108
  class: s(["default-header uikit-sticky uikit-top-0 uikit-z-10 uikit-rounded-t uikit-border-0 uikit-bg-white uikit-px-4 uikit-pb-10px uikit-pt-20px sm:uikit-px-6", [e.customModalHeaderClasses]])
110
109
  }, [
111
110
  e.withCloseIcon ? (m(), h("button", {
@@ -117,20 +116,20 @@ import '../assets/BaseModal.css';const g = () => navigator?.userAgent.includes("
117
116
  "aria-label": "Close",
118
117
  onClick: y(i, ["prevent", "stop"])
119
118
  }, [
120
- D(I(N), {
119
+ I(K(V), {
121
120
  class: "bbt-close-icon uikit-box-border uikit-p-5px",
122
121
  width: 30,
123
122
  height: 30
124
123
  })
125
124
  ], 2)) : w("", !0),
126
125
  r(e.$slots, "header", { closeModal: i }, () => [
127
- l("span", {
126
+ a("span", {
128
127
  class: s(["uikit-w-auto uikit-text-18 uikit-font-semibold sm:uikit-text-22", e.titleClasses]),
129
128
  innerHTML: e.headerTitle
130
- }, null, 10, F)
129
+ }, null, 10, P)
131
130
  ])
132
131
  ], 2),
133
- l("div", {
132
+ a("div", {
134
133
  class: s(["uikit-bbt-body uikit-flex-auto uikit-overflow-y-auto uikit-overflow-x-hidden uikit-px-4 uikit-pb-0 uikit-no-scrollbar sm:uikit-px-6 sm:uikit-pb-25px", [e.customModalBodyClasses]])
135
134
  }, [
136
135
  r(e.$slots, "body", { closeModal: i })
@@ -142,11 +141,11 @@ import '../assets/BaseModal.css';const g = () => navigator?.userAgent.includes("
142
141
  r(e.$slots, "footer", { closeModal: i })
143
142
  ], 2)) : w("", !0),
144
143
  r(e.$slots, "fixed-bottom")
145
- ], 10, A)
144
+ ], 10, F)
146
145
  ], 34)
147
146
  ]));
148
147
  }
149
148
  });
150
149
  export {
151
- R as _
150
+ j as _
152
151
  };
package/dist/index.js CHANGED
@@ -27,7 +27,7 @@ import { default as Z } from "./BaseTextarea.js";
27
27
  import { default as ee } from "./BaseToggle.js";
28
28
  import { default as re } from "./BaseTooltip.js";
29
29
  import { _ as te } from "./chunks/BaseUploadFile.vue_vue_type_script_setup_true_lang.2elmVcZt.js";
30
- import { _ as fe } from "./chunks/BaseModal.vue_vue_type_style_index_0_lang.Bn6P4cIx.js";
30
+ import { _ as fe } from "./chunks/BaseModal.vue_vue_type_style_index_0_lang.CeKWAwpg.js";
31
31
  import { default as me } from "./BaseSnackbar.js";
32
32
  import { default as le } from "./StaticSpinner.js";
33
33
  import { default as de } from "./BaseShimmerLoader.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wikicasa-dev/components",
3
- "version": "2.0.45",
3
+ "version": "2.0.46",
4
4
  "description": "Wikicasa frontend components",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",