@wikicasa-dev/components 2.4.1-alpha.7 → 2.4.1-alpha.8

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,5 +1,5 @@
1
1
  import { Autoplay as t } from "swiper/modules";
2
- import '../assets/swiper-controller.css';/* empty css */
2
+ import '../assets/swiper-keyboard.css';/* empty css */
3
3
  export {
4
4
  t as Autoplay
5
5
  };
@@ -1,5 +1,5 @@
1
1
  import { Controller as e } from "swiper/modules";
2
- import '../assets/swiper-controller.css';/* empty css */
2
+ import '../assets/swiper-keyboard.css';/* empty css */
3
3
  export {
4
4
  e as Controller
5
5
  };
@@ -1,5 +1,5 @@
1
1
  import { Keyboard as m } from "swiper/modules";
2
- import '../assets/swiper-controller.css';/* empty css */
2
+ import '../assets/swiper-keyboard.css';/* empty css */
3
3
  export {
4
4
  m as Keyboard
5
5
  };
@@ -1,5 +1,5 @@
1
1
  import { Thumbs as p } from "swiper/modules";
2
- import '../assets/swiper-controller.css';/* empty css */
2
+ import '../assets/swiper-keyboard.css';/* empty css */
3
3
  export {
4
4
  p as Thumbs
5
5
  };
@@ -1,6 +1,6 @@
1
- import { defineComponent as z, mergeModels as w, useModel as T, useTemplateRef as y, shallowRef as $, onUnmounted as H, createBlock as O, openBlock as n, Teleport as F, createVNode as C, Transition as U, withCtx as K, createElementBlock as k, createCommentVNode as m, normalizeClass as i, createElementVNode as d, renderSlot as r, withModifiers as N, unref as V } from "vue";
2
- import { CloseIcon as A } from "@wikicasa-dev/svg-icons";
3
- const G = ["id", "data-cy"], P = ["innerHTML"], j = /* @__PURE__ */ z({
1
+ import { defineComponent as $, mergeModels as w, useModel as H, useTemplateRef as C, shallowRef as p, onUnmounted as O, createBlock as F, openBlock as n, Teleport as A, createVNode as x, Transition as K, withCtx as N, createElementBlock as m, createCommentVNode as f, normalizeClass as i, createElementVNode as d, renderSlot as r, withModifiers as U, unref as V } from "vue";
2
+ import { CloseIcon as P } from "@wikicasa-dev/svg-icons";
3
+ const R = ["id", "data-cy"], S = ["innerHTML"], q = /* @__PURE__ */ $({
4
4
  __name: "BaseModal",
5
5
  props: /* @__PURE__ */ w({
6
6
  id: { default: "base-bt-modal" },
@@ -26,46 +26,41 @@ const G = ["id", "data-cy"], P = ["innerHTML"], j = /* @__PURE__ */ z({
26
26
  showModalModifiers: {}
27
27
  }),
28
28
  emits: /* @__PURE__ */ w(["closed", "opened", "dialogClick"], ["update:showModal"]),
29
- setup(e, { emit: p }) {
30
- const c = p, o = T(e, "showModal"), f = y("backdrop"), s = y("modalDialog"), l = $(!1), b = ({ key: t }) => {
29
+ setup(e, { emit: g }) {
30
+ const c = g, o = H(e, "showModal"), b = C("backdrop"), s = C("modalDialog"), l = p(!1), k = p(!1), v = ({ key: t }) => {
31
31
  t === "Escape" && a();
32
- }, x = () => {
33
- document?.body.addEventListener("keydown", b);
32
+ }, M = () => {
33
+ document?.body.addEventListener("keydown", v);
34
34
  }, h = () => {
35
- document?.body.removeEventListener("keydown", b);
36
- };
37
- console.log("DEBUG: BaseModal setup called", {
38
- showModal: o.value,
39
- timestamp: Date.now()
40
- });
41
- const g = () => {
42
- console.log("DEBUG:onBeforeEnter called", {
35
+ document?.body.removeEventListener("keydown", v);
36
+ }, B = () => {
37
+ k.value || (console.log("DEBUG:onBeforeEnter called", {
43
38
  timestamp: Date.now(),
44
39
  showModal: o.value,
45
40
  stack: new Error().stack
46
- }), x(), document?.body.classList.add(
41
+ }), M(), document?.body.classList.add(
47
42
  "sm:uikit-pr-15px",
48
43
  "sm:uikit-mr-0",
49
44
  "uikit-overflow-hidden"
50
- );
51
- }, M = () => {
45
+ ), k.value = !0);
46
+ }, E = () => {
52
47
  c("opened"), e.autoClose !== void 0 && setTimeout(() => {
53
48
  a();
54
49
  }, e.autoClose);
55
- }, B = () => {
50
+ }, I = () => {
56
51
  h(), document?.body.classList.remove(
57
52
  "sm:uikit-pr-15px",
58
53
  "sm:uikit-mr-0",
59
54
  "uikit-overflow-hidden"
60
- ), c("closed");
55
+ ), k.value = !1, c("closed");
61
56
  }, a = () => {
62
57
  o.value = !1;
63
- }, E = (t) => {
58
+ }, L = (t) => {
64
59
  s.value && s.value.contains(t.target) && (l.value = !0);
65
- }, I = (t) => {
60
+ }, z = (t) => {
66
61
  s.value && s.value.contains(t.target) && (l.value = !1);
67
- }, L = async (t) => {
68
- if (!(t.target !== f.value && f.value?.contains(t.target)) && e.closeOnClickOut) {
62
+ }, T = async (t) => {
63
+ if (!(t.target !== b.value && b.value?.contains(t.target)) && e.closeOnClickOut) {
69
64
  if (l.value) {
70
65
  l.value = !1;
71
66
  return;
@@ -73,7 +68,7 @@ const G = ["id", "data-cy"], P = ["innerHTML"], j = /* @__PURE__ */ z({
73
68
  a();
74
69
  }
75
70
  };
76
- H(() => {
71
+ O(() => {
77
72
  h(), document?.body.classList.remove(
78
73
  "sm:uikit-pr-15px",
79
74
  "sm:uikit-mr-0",
@@ -83,17 +78,17 @@ const G = ["id", "data-cy"], P = ["innerHTML"], j = /* @__PURE__ */ z({
83
78
  const D = (t) => {
84
79
  s.value === t.target && t.stopPropagation();
85
80
  };
86
- return (t, u) => (n(), O(F, { to: "body" }, [
87
- C(U, {
81
+ return (t, u) => (n(), F(A, { to: "body" }, [
82
+ x(K, {
88
83
  appear: e.appear,
89
84
  name: "modal-transition",
90
85
  duration: { enter: 500, leave: 250 },
91
- onBeforeEnter: g,
92
- onAfterEnter: M,
93
- onAfterLeave: B
86
+ onBeforeEnter: B,
87
+ onAfterEnter: E,
88
+ onAfterLeave: I
94
89
  }, {
95
- default: K(() => [
96
- o.value ? (n(), k("div", {
90
+ default: N(() => [
91
+ o.value ? (n(), m("div", {
97
92
  key: 0,
98
93
  ref: "backdrop",
99
94
  class: i(["bbt-backdrop uikit-fixed uikit-left-0 uikit-top-0 uikit-z-50 uikit-h-full uikit-w-full", [
@@ -104,9 +99,9 @@ const G = ["id", "data-cy"], P = ["innerHTML"], j = /* @__PURE__ */ z({
104
99
  { "uikit-bg-transparent": !o.value },
105
100
  { "sm:uikit-pt-[30px]": !e.centered }
106
101
  ]]),
107
- onClick: L,
108
- onMousedown: E,
109
- onMouseup: I
102
+ onClick: T,
103
+ onMousedown: L,
104
+ onMouseup: z
110
105
  }, [
111
106
  d("dialog", {
112
107
  id: e.id,
@@ -122,32 +117,32 @@ const G = ["id", "data-cy"], P = ["innerHTML"], j = /* @__PURE__ */ z({
122
117
  e.fullHeight ? "uikit-h-[95%]" : "uikit-h-auto"
123
118
  ]]),
124
119
  tabindex: "-1",
125
- onClick: u[1] || (u[1] = (v) => c("dialogClick", v)),
120
+ onClick: u[1] || (u[1] = (y) => c("dialogClick", y)),
126
121
  onFocusin: D
127
122
  }, [
128
123
  d("div", {
129
124
  class: i(["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]])
130
125
  }, [
131
- e.withCloseIcon ? (n(), k("button", {
126
+ e.withCloseIcon ? (n(), m("button", {
132
127
  key: 0,
133
128
  id: "close-icon-btn",
134
129
  "data-cy": "bbt-default-close-icon-btn",
135
130
  class: i(["uikit-absolute uikit-right-15px uikit-top-15px uikit-z-10 uikit-bg-transparent uikit-p-5px", e.closeIconBtnClasses]),
136
131
  type: "button",
137
132
  "aria-label": "Close",
138
- onClick: u[0] || (u[0] = N((v) => o.value = !1, ["prevent", "stop"]))
133
+ onClick: u[0] || (u[0] = U((y) => o.value = !1, ["prevent", "stop"]))
139
134
  }, [
140
- C(V(A), {
135
+ x(V(P), {
141
136
  class: i(["bbt-close-icon uikit-box-border", e.closeIcon?.classes]),
142
137
  width: e.closeIcon?.size || 20,
143
138
  height: e.closeIcon?.size || 20
144
139
  }, null, 8, ["class", "width", "height"])
145
- ], 2)) : m("", !0),
140
+ ], 2)) : f("", !0),
146
141
  r(t.$slots, "header", { closeModal: a }, () => [
147
142
  d("span", {
148
143
  class: i(["uikit-w-auto uikit-text-18 uikit-font-semibold sm:uikit-text-22", e.titleClasses]),
149
144
  innerHTML: e.headerTitle
150
- }, null, 10, P)
145
+ }, null, 10, S)
151
146
  ])
152
147
  ], 2),
153
148
  d("div", {
@@ -155,15 +150,15 @@ const G = ["id", "data-cy"], P = ["innerHTML"], j = /* @__PURE__ */ z({
155
150
  }, [
156
151
  r(t.$slots, "body", { closeModal: a })
157
152
  ], 2),
158
- t.$slots.footer ? (n(), k("div", {
153
+ t.$slots.footer ? (n(), m("div", {
159
154
  key: 0,
160
155
  class: i(["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])
161
156
  }, [
162
157
  r(t.$slots, "footer", { closeModal: a })
163
- ], 2)) : m("", !0),
158
+ ], 2)) : f("", !0),
164
159
  r(t.$slots, "fixed-bottom")
165
- ], 42, G)
166
- ], 34)) : m("", !0)
160
+ ], 42, R)
161
+ ], 34)) : f("", !0)
167
162
  ]),
168
163
  _: 3
169
164
  }, 8, ["appear"])
@@ -171,5 +166,5 @@ const G = ["id", "data-cy"], P = ["innerHTML"], j = /* @__PURE__ */ z({
171
166
  }
172
167
  });
173
168
  export {
174
- j as default
169
+ q as default
175
170
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wikicasa-dev/components",
3
- "version": "2.4.1-alpha.7",
3
+ "version": "2.4.1-alpha.8",
4
4
  "description": "Wikicasa frontend components",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",