@wikicasa-dev/components 2.0.38 → 2.0.40

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,4 +1,4 @@
1
- import { _ as f } from "./chunks/BaseBreadcrumb.vue_vue_type_script_setup_true_lang.BH2c3gOe.js";
1
+ import { _ as f } from "./chunks/BaseBreadcrumb.vue_vue_type_script_setup_true_lang.BAE3i6sW.js";
2
2
  export {
3
3
  f as default
4
4
  };
package/dist/BaseModal.js CHANGED
@@ -1,4 +1,4 @@
1
- import { _ as f } from "./chunks/BaseModal.vue_vue_type_style_index_0_lang.Bfqji3sg.js";
1
+ import { _ as f } from "./chunks/BaseModal.vue_vue_type_style_index_0_lang.TtM_VyuR.js";
2
2
  export {
3
3
  f as default
4
4
  };
@@ -14,7 +14,7 @@ declare function __VLS_template(): {
14
14
  };
15
15
  refs: {
16
16
  backdropEl: HTMLDivElement;
17
- modalEl: HTMLDialogElement;
17
+ modalDialog: HTMLDialogElement;
18
18
  };
19
19
  attrs: Partial<{}>;
20
20
  };
@@ -67,7 +67,10 @@ declare const __VLS_component: import('vue').DefineComponent<{
67
67
  }> & Readonly<{
68
68
  onOpened?: (() => any) | undefined;
69
69
  onClosed?: (() => any) | undefined;
70
- }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
70
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
71
+ backdropEl: HTMLDivElement;
72
+ modalDialog: HTMLDialogElement;
73
+ }, any>;
71
74
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
72
75
  export default _default;
73
76
  type __VLS_WithTemplateSlots<T, S> = T & {
@@ -1,7 +1,7 @@
1
- import { defineComponent as m, computed as d, openBlock as s, createElementBlock as i, createElementVNode as o, normalizeClass as a, Fragment as n, renderList as k, renderSlot as u, toDisplayString as p, createVNode as h, unref as f } from "vue";
2
- import { a as b } from "./ArrowIcon.CCFMdsq6.js";
1
+ import { defineComponent as d, computed as k, openBlock as s, createElementBlock as i, createElementVNode as n, normalizeClass as a, Fragment as u, renderList as p, renderSlot as c, toDisplayString as h, createVNode as b, unref as f } from "vue";
2
+ import { a as C } from "./ArrowIcon.CCFMdsq6.js";
3
3
  import "./PharmacyIcon.56ql_DYl.js";
4
- const C = { "aria-label": "Breadcrumb" }, g = ["data-tooltip"], w = ["href"], _ = /* @__PURE__ */ m({
4
+ const g = { "aria-label": "Breadcrumb" }, w = ["data-tooltip"], B = ["href"], $ = /* @__PURE__ */ d({
5
5
  __name: "BaseBreadcrumb",
6
6
  props: {
7
7
  items: {},
@@ -9,38 +9,38 @@ const C = { "aria-label": "Breadcrumb" }, g = ["data-tooltip"], w = ["href"], _
9
9
  listItemClasses: {}
10
10
  },
11
11
  setup(r) {
12
- const c = d(() => {
12
+ const m = k(() => {
13
13
  let e = 0;
14
14
  const l = [];
15
15
  for (; e < r.items.length; )
16
16
  l.push({ ...r.items[e], idx: e }), e < r.items.length - 1 && l.push({ arrowIcon: !0 }), e++;
17
17
  return l;
18
18
  });
19
- return (e, l) => (s(), i("nav", C, [
20
- o("ol", {
19
+ return (e, l) => (s(), i("nav", g, [
20
+ n("ol", {
21
21
  class: a(["uikit-flex uikit-items-center uikit-gap-10px uikit-p-0", e.listClasses])
22
22
  }, [
23
- (s(!0), i(n, null, k(c.value, (t) => (s(), i(n, null, [
23
+ (s(!0), i(u, null, p(m.value, (t, o) => (s(), i(u, null, [
24
24
  t?.label ? (s(), i("li", {
25
- key: 0,
25
+ key: `breadcrumb-li-${o}`,
26
26
  class: a(["uikit-list-none", e.listItemClasses]),
27
27
  "data-tooltip": t.dataTooltip
28
28
  }, [
29
- u(e.$slots, "item", {
29
+ c(e.$slots, "item", {
30
30
  item: t
31
31
  }, () => [
32
- o("a", {
32
+ n("a", {
33
33
  class: a(["uikit-text-w-black uikit-no-underline", { "uikit-text-w-primary": t.active }]),
34
34
  href: t.link
35
- }, p(t.label), 11, w)
35
+ }, h(t.label), 11, B)
36
36
  ])
37
- ], 10, g)) : (s(), i("li", {
38
- key: 1,
37
+ ], 10, w)) : (s(), i("li", {
38
+ key: `breadcrumb-li-no-label-${o}`,
39
39
  class: a(["uikit-list-none", e.listItemClasses]),
40
40
  "aria-hidden": "true"
41
41
  }, [
42
- u(e.$slots, "separator", {}, () => [
43
- h(f(b), {
42
+ c(e.$slots, "separator", {}, () => [
43
+ b(f(C), {
44
44
  class: "-uikit-rotate-90",
45
45
  "stroke-color": "#222",
46
46
  width: 10,
@@ -54,5 +54,5 @@ const C = { "aria-label": "Breadcrumb" }, g = ["data-tooltip"], w = ["href"], _
54
54
  }
55
55
  });
56
56
  export {
57
- _
57
+ $ as _
58
58
  };
@@ -1,16 +1,16 @@
1
- import { defineComponent as B, ref as u, onUnmounted as L, watch as x, openBlock as c, createBlock as E, Teleport as T, createElementVNode as l, normalizeClass as s, withModifiers as f, createElementBlock as y, createVNode as z, unref as H, createCommentVNode as v, renderSlot as n, nextTick as O } from "vue";
1
+ import { defineComponent as E, ref as d, useTemplateRef as T, onUnmounted as z, watch as H, openBlock as p, createBlock as O, Teleport as $, createElementVNode as l, normalizeClass as s, withModifiers as r, createElementBlock as h, createVNode as D, unref as I, createCommentVNode as w, renderSlot as c, nextTick as K } from "vue";
2
2
  import "./types-B0dZ7OiV.D29wNgoj.js";
3
- import { l as $ } from "./CloseIcon.DIkr4soH.js";
3
+ import { l as N } from "./CloseIcon.DIkr4soH.js";
4
4
  import "./PharmacyIcon.56ql_DYl.js";
5
- import '../assets/BaseModal.css';const h = () => navigator?.userAgent.includes("Windows"), I = (o, d) => new Promise((a, t) => {
5
+ import '../assets/BaseModal.css';const g = () => navigator?.userAgent.includes("Windows"), V = (o, k) => new Promise((a, t) => {
6
6
  setTimeout(() => {
7
7
  try {
8
8
  o && o(), a();
9
9
  } catch {
10
10
  t();
11
11
  }
12
- }, d);
13
- }), K = ["id", "data-cy"], N = ["innerHTML"], P = /* @__PURE__ */ B({
12
+ }, k);
13
+ }), A = ["id", "data-cy"], F = ["innerHTML"], R = /* @__PURE__ */ E({
14
14
  __name: "BaseModal",
15
15
  props: {
16
16
  id: { default: "base-bt-modal" },
@@ -32,38 +32,48 @@ import '../assets/BaseModal.css';const h = () => navigator?.userAgent.includes("
32
32
  titleClasses: {}
33
33
  },
34
34
  emits: ["closed", "opened"],
35
- setup(o, { emit: d }) {
36
- const a = d, t = u(!1), k = u(null), w = u(null), r = u(!1), m = ({ key: e }) => {
35
+ setup(o, { emit: k }) {
36
+ const a = k, t = d(!1), f = d(null), u = T("modalDialog"), m = d(!1), n = d(!1), b = ({ key: e }) => {
37
37
  e === "Escape" && i();
38
38
  }, C = () => {
39
- document?.body.addEventListener("keydown", m);
40
- }, b = () => {
41
- document?.body.removeEventListener("keydown", m);
42
- }, g = async () => {
43
- t.value = !0, O(() => {
44
- C(), document?.documentElement.classList.add("uikit-no-scrolling"), h() ? document?.body.classList.add("uikit-no-scrolling", "sm:uikit-pr-15px") : document?.body.classList.add("uikit-no-scrolling");
39
+ document?.body.addEventListener("keydown", b);
40
+ }, v = () => {
41
+ document?.body.removeEventListener("keydown", b);
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
45
  }), a("opened"), o.autoClose !== void 0 && setTimeout(() => {
46
46
  i();
47
47
  }, o.autoClose);
48
- }, M = async () => {
49
- o.closeOnClickOut && await i();
48
+ }, B = (e) => {
49
+ u.value && u.value.contains(e.target) && (n.value = !0);
50
+ }, L = (e) => {
51
+ u.value && u.value.contains(e.target) && (n.value = !1);
52
+ }, x = async () => {
53
+ if (o.closeOnClickOut) {
54
+ if (n.value) {
55
+ n.value = !1;
56
+ return;
57
+ }
58
+ await i();
59
+ }
50
60
  }, i = async () => {
51
- 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 I(() => {
52
- k.value?.classList.add("uikit-hidden"), a("closed");
61
+ t.value = !1, v(), 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");
53
63
  }, 250);
54
64
  };
55
- return L(() => {
56
- b(), document?.documentElement.classList.remove("uikit-no-scrolling"), h() ? document?.body.classList.remove("uikit-no-scrolling", "sm:uikit-pr-15px") : document?.body.classList.remove("uikit-no-scrolling");
57
- }), x(
65
+ return z(() => {
66
+ v(), 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(
58
68
  () => o.showModal,
59
69
  async (e) => {
60
- !e && !t.value ? r.value = !0 : r.value = !1, e && !t.value && await g(), !e && t.value && await i(), t.value = e;
70
+ !e && !t.value ? m.value = !0 : m.value = !1, e && !t.value && await M(), !e && t.value && await i(), t.value = e;
61
71
  },
62
72
  { immediate: !0 }
63
- ), (e, p) => (c(), E(T, { to: "body" }, [
73
+ ), (e, y) => (p(), O($, { to: "body" }, [
64
74
  l("div", {
65
75
  ref_key: "backdropEl",
66
- ref: k,
76
+ ref: f,
67
77
  class: s(["bbt-backdrop uikit-fixed uikit-left-0 uikit-top-0 uikit-h-full uikit-w-full", [
68
78
  e.customBackdropClasses,
69
79
  {
@@ -71,15 +81,16 @@ import '../assets/BaseModal.css';const h = () => navigator?.userAgent.includes("
71
81
  },
72
82
  { "uikit-bg-transparent": !t.value },
73
83
  { "sm:uikit-pt-[30px]": !e.centered },
74
- { hide: r.value }
84
+ { hide: m.value }
75
85
  ]]),
76
86
  style: { "z-index": "1062" },
77
- onClick: M
87
+ onClick: x,
88
+ onMousedown: r(B, ["stop"]),
89
+ onMouseup: r(L, ["stop"])
78
90
  }, [
79
91
  l("dialog", {
80
92
  id: e.id,
81
- ref_key: "modalEl",
82
- ref: w,
93
+ ref: "modalDialog",
83
94
  "data-cy": e.dataCy,
84
95
  class: s(["uikit-modal-dialog transition-y uikit-mx-auto uikit-block uikit-w-full uikit-overflow-y-auto uikit-overflow-x-hidden uikit-rounded uikit-border-none uikit-bg-transparent uikit-bg-white uikit-p-0 uikit-shadow-lg uikit-no-scrollbar uikit-safe-bottom max-sm:uikit-fixed max-sm:uikit-bottom-0 max-sm:uikit-max-h-[95%] max-sm:uikit-rounded-bl-none max-sm:uikit-rounded-br-none sm:uikit-h-auto", [
85
96
  e.customModalDialogClasses,
@@ -91,51 +102,51 @@ import '../assets/BaseModal.css';const h = () => navigator?.userAgent.includes("
91
102
  `base-${e.size}`,
92
103
  e.fullHeight ? "uikit-h-[95%]" : "uikit-h-auto"
93
104
  ]]),
94
- onClick: p[0] || (p[0] = f(() => {
105
+ onClick: y[0] || (y[0] = r(() => {
95
106
  }, ["stop"]))
96
107
  }, [
97
108
  l("div", {
98
109
  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]])
99
110
  }, [
100
- e.withCloseIcon ? (c(), y("button", {
111
+ e.withCloseIcon ? (p(), h("button", {
101
112
  key: 0,
102
113
  id: "close-icon-btn",
103
114
  "data-cy": "bbt-default-close-icon-btn",
104
115
  class: s(["uikit-absolute uikit-right-15px uikit-top-15px uikit-z-10 uikit-bg-transparent", e.closeIconBtnClasses]),
105
116
  type: "button",
106
117
  "aria-label": "Close",
107
- onClick: f(i, ["prevent", "stop"])
118
+ onClick: r(i, ["prevent", "stop"])
108
119
  }, [
109
- z(H($), {
120
+ D(I(N), {
110
121
  class: "bbt-close-icon uikit-box-border uikit-p-5px",
111
122
  width: 30,
112
123
  height: 30
113
124
  })
114
- ], 2)) : v("", !0),
115
- n(e.$slots, "header", { closeModal: i }, () => [
125
+ ], 2)) : w("", !0),
126
+ c(e.$slots, "header", { closeModal: i }, () => [
116
127
  l("span", {
117
128
  class: s(["uikit-w-auto uikit-text-18 uikit-font-semibold sm:uikit-text-22", e.titleClasses]),
118
129
  innerHTML: e.headerTitle
119
- }, null, 10, N)
130
+ }, null, 10, F)
120
131
  ])
121
132
  ], 2),
122
133
  l("div", {
123
134
  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]])
124
135
  }, [
125
- n(e.$slots, "body", { closeModal: i })
136
+ c(e.$slots, "body", { closeModal: i })
126
137
  ], 2),
127
- e.$slots.footer ? (c(), y("div", {
138
+ e.$slots.footer ? (p(), h("div", {
128
139
  key: 0,
129
140
  class: s(["uikit-bbt-footer uikit-sticky uikit-bottom-0 uikit-border-0 uikit-bg-white uikit-px-4 uikit-py-15px sm:uikit-px-6", e.customModalFooterClasses])
130
141
  }, [
131
- n(e.$slots, "footer", { closeModal: i })
132
- ], 2)) : v("", !0),
133
- n(e.$slots, "fixed-bottom")
134
- ], 10, K)
135
- ], 2)
142
+ c(e.$slots, "footer", { closeModal: i })
143
+ ], 2)) : w("", !0),
144
+ c(e.$slots, "fixed-bottom")
145
+ ], 10, A)
146
+ ], 34)
136
147
  ]));
137
148
  }
138
149
  });
139
150
  export {
140
- P as _
151
+ R as _
141
152
  };
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.Bfqji3sg.js";
30
+ import { _ as fe } from "./chunks/BaseModal.vue_vue_type_style_index_0_lang.TtM_VyuR.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";
@@ -39,7 +39,7 @@ import { _ as he } from "./chunks/IntersectionObservable.vue_vue_type_script_set
39
39
  import { _ as Ie } from "./chunks/IntersectionObserver.vue_vue_type_script_setup_true_lang.CQHjzQc3.js";
40
40
  import { S as we } from "./chunks/SwiperCarousel.DWUl3bgn.js";
41
41
  import { default as ke } from "./SwiperSlide.js";
42
- import { _ as ve } from "./chunks/BaseBreadcrumb.vue_vue_type_script_setup_true_lang.BH2c3gOe.js";
42
+ import { _ as ve } from "./chunks/BaseBreadcrumb.vue_vue_type_script_setup_true_lang.BAE3i6sW.js";
43
43
  import './assets/index.css';export {
44
44
  I as AccessibleSelect,
45
45
  r as BaseAccordion,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wikicasa-dev/components",
3
- "version": "2.0.38",
3
+ "version": "2.0.40",
4
4
  "description": "Wikicasa frontend components",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",