@wikicasa-dev/components 1.5.0 → 1.5.2

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/BaseAccordionContent.vue_vue_type_script_setup_true_lang.N7oILwdv.js";
1
+ import { _ as f } from "./chunks/BaseAccordionContent.vue_vue_type_script_setup_true_lang.8ErZghvk.js";
2
2
  export {
3
3
  f as default
4
4
  };
@@ -1,4 +1,4 @@
1
- import { _ as f } from "./chunks/BaseAccordionItem.vue_vue_type_script_setup_true_lang.ofUooWrJ.js";
1
+ import { _ as f } from "./chunks/BaseAccordionItem.vue_vue_type_script_setup_true_lang.cWFIcTGL.js";
2
2
  export {
3
3
  f as default
4
4
  };
package/dist/BaseModal.js CHANGED
@@ -1,19 +1,19 @@
1
1
  import './assets/BaseModal.css';
2
- import { defineComponent as v, ref as r, onBeforeMount as C, onMounted as M, watch as x, openBlock as k, createBlock as f, Teleport as B, createElementVNode as l, normalizeClass as i, withModifiers as g, withCtx as E, createVNode as $, unref as L, createCommentVNode as p, renderSlot as d, createElementBlock as H } from "vue";
2
+ import { defineComponent as x, ref as r, watch as M, openBlock as k, createBlock as f, Teleport as B, createElementVNode as s, normalizeClass as i, withModifiers as g, withCtx as E, createVNode as L, unref as $, createCommentVNode as p, renderSlot as d, createElementBlock as T } from "vue";
3
3
  import "./chunks/js.cookie.BQua9eWh.js";
4
- import { _ as T } from "./chunks/BaseButton.vue_vue_type_script_setup_true_lang.BrJbAMJ8.js";
5
- import { l as z } from "./chunks/CloseIcon.DiRdm5zi.js";
6
- import { useBreakpoints as O } from "./useBreakpoints.js";
4
+ import { _ as H } from "./chunks/BaseButton.vue_vue_type_script_setup_true_lang.BrJbAMJ8.js";
5
+ import { l as O } from "./chunks/CloseIcon.DiRdm5zi.js";
6
+ import { useBreakpoints as z } from "./useBreakpoints.js";
7
7
  import { _ as F } from "./chunks/_plugin-vue_export-helper.CHgC5LLL.js";
8
- const I = (a, n) => new Promise((o, u) => {
8
+ const I = (a, n) => new Promise((l, u) => {
9
9
  setTimeout(() => {
10
10
  try {
11
- a && a(), o();
11
+ a && a(), l();
12
12
  } catch {
13
13
  u();
14
14
  }
15
15
  }, n);
16
- }), D = ["id", "data-cy"], N = ["innerHTML"], V = /* @__PURE__ */ v({
16
+ }), K = ["id", "data-cy"], N = ["innerHTML"], V = /* @__PURE__ */ x({
17
17
  __name: "BaseModal",
18
18
  props: {
19
19
  id: { default: "base-bt-modal" },
@@ -36,35 +36,32 @@ const I = (a, n) => new Promise((o, u) => {
36
36
  },
37
37
  emits: ["closed", "opened"],
38
38
  setup(a, { emit: n }) {
39
- const o = a, u = n, { isSmall: m } = O(), e = r(!1), b = r(null), h = r(null);
40
- C(() => {
41
- e.value = o.showModal;
42
- }), M(() => {
43
- const t = (c) => {
44
- c.key === "Escape" && (s(), document.body?.removeEventListener("keydown", t));
45
- };
46
- document.body?.addEventListener("keydown", t);
47
- });
48
- const y = async () => {
49
- e.value = !0, document.body.classList.add("uikit-no-scrolling", "sm:uikit-pr-15px"), u("opened"), o.autoClose !== void 0 && setTimeout(() => {
50
- s();
51
- }, o.autoClose);
52
- }, w = async ({ target: t }) => {
53
- !o.closeOnClickOut || m.value && !t.classList.contains("bbt-modal-wrapper") || //In mobile mode, the wrapper will be touched
54
- !m.value && !t.classList.contains("bbt-backdrop") || await s();
55
- }, s = async () => {
56
- e.value = !1, document.body.classList.remove("uikit-no-scrolling", "sm:uikit-pr-15px"), await I(() => {
39
+ const l = a, u = n, { isSmall: m } = z(), e = r(!1), b = r(null), y = r(null), c = ({ key: t }) => {
40
+ t === "Escape" && o();
41
+ }, h = () => {
42
+ document.body.addEventListener("keydown", c);
43
+ }, v = () => {
44
+ document.body.removeEventListener("keydown", c);
45
+ }, w = async () => {
46
+ e.value = !0, h(), document.body.classList.add("uikit-no-scrolling", "sm:uikit-pr-15px"), u("opened"), l.autoClose !== void 0 && setTimeout(() => {
47
+ o();
48
+ }, l.autoClose);
49
+ }, C = async ({ target: t }) => {
50
+ !l.closeOnClickOut || m.value && !t.classList.contains("bbt-modal-wrapper") || //In mobile mode, the wrapper will be touched
51
+ !m.value && !t.classList.contains("bbt-backdrop") || await o();
52
+ }, o = async () => {
53
+ e.value = !1, v(), document.body.classList.remove("uikit-no-scrolling", "sm:uikit-pr-15px"), await I(() => {
57
54
  u("closed");
58
55
  }, 250);
59
56
  };
60
- return x(
61
- () => o.showModal,
57
+ return M(
58
+ () => l.showModal,
62
59
  (t) => {
63
- t ? y() : s();
60
+ t && !e.value && w(), !t && e.value && o(), e.value = t;
64
61
  },
65
62
  { immediate: !0 }
66
- ), (t, c) => (k(), f(B, { to: "body" }, [
67
- l("div", {
63
+ ), (t, _) => (k(), f(B, { to: "body" }, [
64
+ s("div", {
68
65
  ref_key: "backdropEl",
69
66
  ref: b,
70
67
  class: i(["bbt-backdrop uikit-fixed uikit-left-0 uikit-start-0 uikit-top-0 uikit-h-full uikit-w-full uikit-items-start uikit-justify-center uikit-overflow-y-auto uikit-px-0 uikit-pt-0 sm:uikit-px-5 sm:uikit-pt-[30px]", [
@@ -74,12 +71,12 @@ const I = (a, n) => new Promise((o, u) => {
74
71
  { "uikit-flex uikit-bg-transparent": !e.value }
75
72
  ]]),
76
73
  style: { "z-index": "1062" },
77
- onClick: w
74
+ onClick: C
78
75
  }, [
79
- l("dialog", {
76
+ s("dialog", {
80
77
  id: t.id,
81
78
  ref_key: "modalEl",
82
- ref: h,
79
+ ref: y,
83
80
  "data-cy": t.$attrs["data-cy"],
84
81
  class: i(["custom-modal safe-bottom base-bt-modal transition-y !uikit-relative uikit-m-0 uikit-block uikit-h-full uikit-w-full uikit-overflow-x-hidden uikit-overflow-y-hidden uikit-rounded uikit-border-none uikit-bg-transparent uikit-p-0 uikit-no-scrollbar max-sm:uikit-fixed max-sm:uikit-w-full max-sm:uikit-max-w-full max-sm:uikit-rounded-bl-none max-sm:uikit-rounded-br-none max-sm:uikit-border-0 sm:uikit-h-auto", [
85
82
  t.customModalClasses,
@@ -88,20 +85,20 @@ const I = (a, n) => new Promise((o, u) => {
88
85
  `base-${t.size}`
89
86
  ]])
90
87
  }, [
91
- l("div", {
88
+ s("div", {
92
89
  class: i(["bbt-modal-wrapper uikit-relative uikit-h-full", [t.customModalDialogClasses]])
93
90
  }, [
94
- l("div", {
91
+ s("div", {
95
92
  class: i(["uikit-modal-content uikit-fixed uikit-bottom-0 uikit-h-auto uikit-max-h-[90%] uikit-w-full uikit-overflow-x-hidden uikit-rounded uikit-bg-white uikit-py-0 uikit-no-scrollbar max-sm:uikit-rounded-bl-none max-sm:uikit-rounded-br-none sm:uikit-relative sm:uikit-flex sm:uikit-flex-col sm:uikit-overflow-y-auto sm:uikit-py-0 sm:uikit-shadow-[0_3px_6px_#00000029]", [
96
93
  t.customModalContentClasses,
97
94
  "transition-y",
98
95
  { "full-height-mobile": t.fullHeight }
99
96
  ]])
100
97
  }, [
101
- l("div", {
98
+ s("div", {
102
99
  class: i(["default-header uikit-border-0 uikit-px-4 sm:uikit-px-6", [t.customModalHeaderClasses]])
103
100
  }, [
104
- t.withCloseIcon ? (k(), f(T, {
101
+ t.withCloseIcon ? (k(), f(H, {
105
102
  key: 0,
106
103
  id: "close-icon-btn",
107
104
  "data-cy": "bbt-default-close-icon-btn",
@@ -109,10 +106,10 @@ const I = (a, n) => new Promise((o, u) => {
109
106
  type: "button",
110
107
  "aria-label": "Close",
111
108
  "is-empty": !0,
112
- onClick: g(s, ["prevent", "stop"])
109
+ onClick: g(o, ["prevent", "stop"])
113
110
  }, {
114
111
  default: E(() => [
115
- $(L(z), {
112
+ L($(O), {
116
113
  class: "bbt-close-icon uikit-p-5px",
117
114
  width: 30,
118
115
  height: 30
@@ -120,32 +117,32 @@ const I = (a, n) => new Promise((o, u) => {
120
117
  ]),
121
118
  _: 1
122
119
  }, 8, ["class"])) : p("", !0),
123
- d(t.$slots, "header", { closeModal: s }, () => [
124
- l("span", {
120
+ d(t.$slots, "header", { closeModal: o }, () => [
121
+ s("span", {
125
122
  class: i(["uikit-w-auto uikit-text-18 uikit-font-semibold sm:uikit-text-22", t.$attrs["title-classes"]]),
126
123
  innerHTML: t.headerTitle
127
124
  }, null, 10, N)
128
125
  ], !0)
129
126
  ], 2),
130
- l("div", {
127
+ s("div", {
131
128
  class: i(["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", [t.customModalBodyClasses]])
132
129
  }, [
133
130
  d(t.$slots, "body", {}, void 0, !0)
134
131
  ], 2),
135
- t.withCustomFooter ? (k(), H("div", {
132
+ t.withCustomFooter ? (k(), T("div", {
136
133
  key: 0,
137
134
  class: i(["uikit-bbt-footer uikit-border-0 uikit-bg-white uikit-px-4 uikit-py-15px sm:uikit-px-6", t.customModalFooterClasses])
138
135
  }, [
139
- d(t.$slots, "footer", { closeModal: s }, void 0, !0)
136
+ d(t.$slots, "footer", { closeModal: o }, void 0, !0)
140
137
  ], 2)) : p("", !0)
141
138
  ], 2)
142
139
  ], 2),
143
140
  d(t.$slots, "fixed-bottom", {}, void 0, !0)
144
- ], 10, D)
141
+ ], 10, K)
145
142
  ], 2)
146
143
  ]));
147
144
  }
148
- }), A = /* @__PURE__ */ F(V, [["__scopeId", "data-v-9a5fbdbf"]]);
145
+ }), G = /* @__PURE__ */ F(V, [["__scopeId", "data-v-7fc1eaab"]]);
149
146
  export {
150
- A as default
147
+ G as default
151
148
  };
@@ -1 +1 @@
1
- .custom-modal[data-v-9a5fbdbf]{--modal-max-height: 690px;--modal-width-sm: 496px;--modal-width-md: 592px;--modal-width-lg: 670px;--modal-max-width: var(--modal-width-sm);max-width:var(--modal-max-width)}.base-modal-md[data-v-9a5fbdbf]{--modal-max-width: var(--modal-width-md)}.base-modal-lg[data-v-9a5fbdbf]{--modal-max-width: var(--modal-width-lg)}.base-modal-sm[data-v-9a5fbdbf],.base-modal-md[data-v-9a5fbdbf],.base-modal-lg[data-v-9a5fbdbf]{max-height:var(--modal-max-height)}@media not all and (min-width: 576px){.base-modal-sm[data-v-9a5fbdbf],.base-modal-md[data-v-9a5fbdbf],.base-modal-lg[data-v-9a5fbdbf]{max-height:none;max-width:none}}@media screen and (max-width: 576px){.base-modal-sm[data-v-9a5fbdbf],.base-modal-md[data-v-9a5fbdbf],.base-modal-lg[data-v-9a5fbdbf]{width:100%!important}}.base-modal-xxl[data-v-9a5fbdbf]{max-width:1500px}.base-modal-full[data-v-9a5fbdbf]{width:100%}.default-header[data-v-9a5fbdbf]{justify-content:space-between;padding-top:25px}.colored-backdrop[data-v-9a5fbdbf]{animation:backdrop-opacity-9a5fbdbf .3s ease-out 0s backwards;background-color:#b4c2f0b3}.custom-modal[data-v-9a5fbdbf]{will-change:transform}@media (min-width: 576px){.custom-modal.show.transition-y[data-v-9a5fbdbf]{animation:slide-down-9a5fbdbf .5s ease-out 0s backwards}}@media not all and (min-width: 576px){.custom-modal.show .uikit-modal-content.transition-y[data-v-9a5fbdbf]{animation:slide-up-9a5fbdbf .5s ease-out 0s backwards}}.custom-modal.closed[data-v-9a5fbdbf]{overflow-y:hidden!important}@media (min-width: 576px){.custom-modal.closed.transition-y[data-v-9a5fbdbf]{animation:slide-down-back-9a5fbdbf .25s both}}@media not all and (min-width: 576px){.custom-modal.closed .uikit-modal-content.transition-y[data-v-9a5fbdbf]{animation:slide-up-back-9a5fbdbf .25s both}}[data-v-9a5fbdbf] #close-icon-btn{position:absolute;right:15px;top:15px}@media not all and (min-width: 576px){.full-height-mobile[data-v-9a5fbdbf]{height:95%;max-height:none}}@keyframes slide-up-9a5fbdbf{0%{transform:translateY(100%)}to{transform:translateY(0)}}@keyframes slide-up-back-9a5fbdbf{0%{transform:translateY(0)}to{transform:translateY(100%)}}@keyframes slide-down-9a5fbdbf{0%{transform:translateY(-110%);opacity:0}to{transform:translateY(0);opacity:1}}@keyframes slide-down-back-9a5fbdbf{0%{transform:translateY(0)}to{transform:translateY(-110%)}}@keyframes backdrop-opacity-9a5fbdbf{0%{opacity:0}to{opacity:1}}
1
+ .custom-modal[data-v-7fc1eaab]{--modal-max-height: 690px;--modal-width-sm: 496px;--modal-width-md: 592px;--modal-width-lg: 670px;--modal-max-width: var(--modal-width-sm);max-width:var(--modal-max-width)}.base-modal-md[data-v-7fc1eaab]{--modal-max-width: var(--modal-width-md)}.base-modal-lg[data-v-7fc1eaab]{--modal-max-width: var(--modal-width-lg)}.base-modal-sm[data-v-7fc1eaab],.base-modal-md[data-v-7fc1eaab],.base-modal-lg[data-v-7fc1eaab]{max-height:var(--modal-max-height)}@media not all and (min-width: 576px){.base-modal-sm[data-v-7fc1eaab],.base-modal-md[data-v-7fc1eaab],.base-modal-lg[data-v-7fc1eaab]{max-height:none;max-width:none}}@media screen and (max-width: 576px){.base-modal-sm[data-v-7fc1eaab],.base-modal-md[data-v-7fc1eaab],.base-modal-lg[data-v-7fc1eaab]{width:100%!important}}.base-modal-xxl[data-v-7fc1eaab]{max-width:1500px}.base-modal-full[data-v-7fc1eaab]{width:100%}.default-header[data-v-7fc1eaab]{justify-content:space-between;padding-top:25px}.colored-backdrop[data-v-7fc1eaab]{animation:backdrop-opacity-7fc1eaab .3s ease-out 0s backwards;background-color:#b4c2f0b3}.custom-modal[data-v-7fc1eaab]{will-change:transform}@media (min-width: 576px){.custom-modal.show.transition-y[data-v-7fc1eaab]{animation:slide-down-7fc1eaab .5s ease-out 0s backwards}}@media not all and (min-width: 576px){.custom-modal.show .uikit-modal-content.transition-y[data-v-7fc1eaab]{animation:slide-up-7fc1eaab .5s ease-out 0s backwards}}.custom-modal.closed[data-v-7fc1eaab]{overflow-y:hidden!important}@media (min-width: 576px){.custom-modal.closed.transition-y[data-v-7fc1eaab]{animation:slide-down-back-7fc1eaab .25s both}}@media not all and (min-width: 576px){.custom-modal.closed .uikit-modal-content.transition-y[data-v-7fc1eaab]{animation:slide-up-back-7fc1eaab .25s both}}[data-v-7fc1eaab] #close-icon-btn{position:absolute;right:15px;top:15px}@media not all and (min-width: 576px){.full-height-mobile[data-v-7fc1eaab]{height:95%;max-height:none}}@keyframes slide-up-7fc1eaab{0%{transform:translateY(100%)}to{transform:translateY(0)}}@keyframes slide-up-back-7fc1eaab{0%{transform:translateY(0)}to{transform:translateY(100%)}}@keyframes slide-down-7fc1eaab{0%{transform:translateY(-110%);opacity:0}to{transform:translateY(0);opacity:1}}@keyframes slide-down-back-7fc1eaab{0%{transform:translateY(0)}to{transform:translateY(-110%)}}@keyframes backdrop-opacity-7fc1eaab{0%{opacity:0}to{opacity:1}}
@@ -1,32 +1,30 @@
1
- import { defineComponent as t, openBlock as n, createElementBlock as r, normalizeClass as s, renderSlot as o, createElementVNode as e } from "vue";
2
- const a = ["id", "aria-labelledby"], d = { class: "uikit-overflow-hidden" }, c = { class: "uikit-mb-0" }, k = /* @__PURE__ */ t({
1
+ import { defineComponent as e, openBlock as t, createElementBlock as n, normalizeClass as r, renderSlot as o, createElementVNode as a } from "vue";
2
+ const s = ["id", "aria-labelledby"], d = { class: "uikit-overflow-hidden" }, u = /* @__PURE__ */ e({
3
3
  inheritAttrs: !1,
4
4
  __name: "BaseAccordionContent",
5
5
  props: {
6
6
  id: {},
7
7
  accordionOpen: { type: Boolean }
8
8
  },
9
- setup(l) {
10
- return (i, p) => (n(), r("div", {
9
+ setup(c) {
10
+ return (i, l) => (t(), n("div", {
11
11
  id: `accordion-text-${i.id}`,
12
12
  role: "region",
13
13
  "aria-labelledby": `accordion-title-${i.id}`,
14
- class: s(["uikit-grid uikit-overflow-hidden uikit-px-5 uikit-text-sm uikit-text-w-black uikit-transition-[grid-template-rows,opacity,padding,margin] uikit-duration-300 uikit-ease-in-out", [
14
+ class: r(["uikit-grid uikit-overflow-hidden uikit-px-5 uikit-text-sm uikit-text-w-black uikit-transition-[grid-template-rows,opacity,padding,margin] uikit-duration-300 uikit-ease-in-out", [
15
15
  i.accordionOpen ? i.$attrs["accordion-open-classes"] : i.$attrs["accordion-close-classes"],
16
16
  i.accordionOpen ? "uikit-grid-rows-[1fr] uikit-opacity-100" : "uikit-grid-rows-[0fr] uikit-opacity-0",
17
17
  i.$attrs["accordion-classes"]
18
18
  ]])
19
19
  }, [
20
20
  o(i.$slots, "custom_accordion_content", { isOpen: i.accordionOpen }, () => [
21
- e("div", d, [
22
- e("p", c, [
23
- o(i.$slots, "default", { isOpen: i.accordionOpen })
24
- ])
21
+ a("div", d, [
22
+ o(i.$slots, "default", { isOpen: i.accordionOpen })
25
23
  ])
26
24
  ])
27
- ], 10, a));
25
+ ], 10, s));
28
26
  }
29
27
  });
30
28
  export {
31
- k as _
29
+ u as _
32
30
  };
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as f, ref as w, watch as d, openBlock as r, createElementBlock as u, normalizeClass as c, createElementVNode as p, withModifiers as b, createVNode as m, unref as v, createBlock as h, withCtx as i, renderSlot as s, createCommentVNode as C } from "vue";
2
2
  import { d as y } from "./ArrowIcon.CklBXJPN.js";
3
- import { _ as g } from "./BaseAccordionContent.vue_vue_type_script_setup_true_lang.N7oILwdv.js";
3
+ import { _ as g } from "./BaseAccordionContent.vue_vue_type_script_setup_true_lang.8ErZghvk.js";
4
4
  import { _ as O } from "./BaseAccordionBtn.vue_vue_type_script_setup_true_lang.CrVwjQqr.js";
5
5
  const B = { key: 0 }, E = ["id", "data-cy", "aria-expanded", "aria-controls"], A = ["itemprop", "innerHTML"], H = /* @__PURE__ */ f({
6
6
  inheritAttrs: !1,
package/dist/index.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import './assets/index.css';
2
2
  import { _ as a } from "./chunks/BaseAccordion.vue_vue_type_script_setup_true_lang.CoE2D2rV.js";
3
3
  import { _ as t } from "./chunks/BaseAccordionBtn.vue_vue_type_script_setup_true_lang.CrVwjQqr.js";
4
- import { _ as f } from "./chunks/BaseAccordionContent.vue_vue_type_script_setup_true_lang.N7oILwdv.js";
5
- import { _ as m } from "./chunks/BaseAccordionItem.vue_vue_type_script_setup_true_lang.ofUooWrJ.js";
4
+ import { _ as f } from "./chunks/BaseAccordionContent.vue_vue_type_script_setup_true_lang.8ErZghvk.js";
5
+ import { _ as m } from "./chunks/BaseAccordionItem.vue_vue_type_script_setup_true_lang.cWFIcTGL.js";
6
6
  import { _ as l } from "./chunks/SelectItem.vue_vue_type_script_setup_true_lang.Colhxc7n.js";
7
7
  import { default as B } from "./CheckboxBtn.js";
8
8
  import { _ as n } from "./chunks/CheckboxGroup.vue_vue_type_script_setup_true_lang.DDtN9_Bg.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wikicasa-dev/components",
3
- "version": "1.5.0",
3
+ "version": "1.5.2",
4
4
  "description": "Wikicasa frontend components",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",