@wikicasa-dev/components 2.4.1-alpha.10 → 2.4.1-alpha.12

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