@wikicasa-dev/components 2.2.8-alpha.20 → 2.2.8-alpha.21

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,8 +1,8 @@
1
- import { defineComponent as L, mergeModels as C, useId as E, useModel as h, ref as O, shallowRef as W, computed as $, useTemplateRef as T, watch as a, onBeforeMount as H, onMounted as N, onUnmounted as V, nextTick as R, createElementBlock as q, openBlock as f, withModifiers as g, normalizeClass as n, renderSlot as D, createBlock as x, createVNode as z, unref as d, withCtx as B, createElementVNode as U, createCommentVNode as j, resolveDynamicComponent as F } from "vue";
2
- import G from "./BaseButton.vue.js";
3
- import { ArrowIcon as J } from "@wikicasa-dev/svg-icons";
4
- import { useKeyboardController as P } from "@wikicasa-dev/vue-composables";
5
- const Q = ["innerHTML"], te = /* @__PURE__ */ L({
1
+ import { defineComponent as L, mergeModels as C, useId as E, useModel as h, shallowRef as g, computed as O, useTemplateRef as W, watch as a, onBeforeMount as $, onMounted as T, onUnmounted as H, nextTick as N, createElementBlock as V, openBlock as f, normalizeClass as n, renderSlot as D, createBlock as x, createVNode as R, unref as d, withCtx as B, createElementVNode as q, createCommentVNode as z, resolveDynamicComponent as U, withModifiers as j } from "vue";
2
+ import F from "./BaseButton.vue.js";
3
+ import { ArrowIcon as G } from "@wikicasa-dev/svg-icons";
4
+ import { useKeyboardController as J } from "@wikicasa-dev/vue-composables";
5
+ const P = ["innerHTML"], ee = /* @__PURE__ */ L({
6
6
  inheritAttrs: !1,
7
7
  __name: "BaseDropDown",
8
8
  props: /* @__PURE__ */ C({
@@ -32,7 +32,7 @@ const Q = ["innerHTML"], te = /* @__PURE__ */ L({
32
32
  const l = t, k = E(), w = S, v = h(t, "toggleDropdown"), m = h(
33
33
  t,
34
34
  "resetKeyboardController"
35
- ), o = O(!1), s = W([]), M = $(() => s.value.length), p = T("dropdown"), { activeIdx: r, selectedIdx: i } = P({
35
+ ), o = g(!1), s = g([]), M = O(() => s.value.length), p = W("dropdown"), { activeIdx: r, selectedIdx: i } = J({
36
36
  optionsLength: M,
37
37
  isDropdownOpen: o,
38
38
  activate: l.activateKeyboardController
@@ -61,34 +61,31 @@ const Q = ["innerHTML"], te = /* @__PURE__ */ L({
61
61
  }, K = (e) => {
62
62
  e != null && (i.value = e);
63
63
  };
64
- H(() => {
65
- l.closeWhenClickedOutside && document.body.addEventListener("click", b);
64
+ $(() => {
65
+ l.closeWhenClickedOutside && document.addEventListener("click", b);
66
66
  });
67
67
  const y = () => {
68
68
  p.value && (s.value = Array.from(p.value.children));
69
69
  };
70
- return N(() => {
70
+ return T(() => {
71
71
  y();
72
- }), V(() => {
73
- l.closeWhenClickedOutside && document.body.removeEventListener("click", b);
72
+ }), H(() => {
73
+ l.closeWhenClickedOutside && document.removeEventListener("click", b);
74
74
  }), a(m, (e) => {
75
- e && (r.value = -1, i.value = -1, R(() => {
75
+ e && (r.value = -1, i.value = -1, N(() => {
76
76
  y(), m.value = !1;
77
77
  }));
78
78
  }), I({
79
79
  activeIdx: r,
80
80
  selectedIdx: i
81
- }), (e, u) => (f(), q("div", {
82
- class: n(["uikit-relative uikit-block", e.$attrs.class]),
83
- onClick: u[1] || (u[1] = g((X) => {
84
- w("click"), c();
85
- }, ["stop"]))
81
+ }), (e, u) => (f(), V("div", {
82
+ class: n(["uikit-relative uikit-block", e.$attrs.class])
86
83
  }, [
87
84
  D(e.$slots, "btn_slot", {
88
85
  toggleDropdown: c,
89
86
  isOpen: o.value
90
87
  }, () => [
91
- z(G, {
88
+ R(F, {
92
89
  id: d(k),
93
90
  type: "button",
94
91
  "data-cy": t.dataCy,
@@ -97,25 +94,28 @@ const Q = ["innerHTML"], te = /* @__PURE__ */ L({
97
94
  t.btnClasses
98
95
  ]),
99
96
  "aria-expanded": o.value,
100
- "btn-class": "uikit-btn-single-selection"
97
+ "btn-class": "uikit-btn-single-selection",
98
+ onClick: u[0] || (u[0] = (Q) => {
99
+ w("click"), c();
100
+ })
101
101
  }, {
102
102
  default: B(() => [
103
- U("span", {
103
+ q("span", {
104
104
  class: n(["uikit-mr-5px", t.labelClasses]),
105
105
  innerHTML: t.btnLabel
106
- }, null, 10, Q),
107
- t.withArrowIcon ? (f(), x(d(J), {
106
+ }, null, 10, P),
107
+ t.withArrowIcon ? (f(), x(d(G), {
108
108
  key: 0,
109
109
  class: n(["uikit-shrink-0 uikit-transition-transform motion-reduce:uikit-transition-none", o.value ? "uikit-rotate-180" : ""]),
110
110
  width: t.arrowWidth,
111
111
  height: t.arrowWidth,
112
112
  "stroke-color": t.arrowStrokeColor
113
- }, null, 8, ["class", "width", "height", "stroke-color"])) : j("", !0)
113
+ }, null, 8, ["class", "width", "height", "stroke-color"])) : z("", !0)
114
114
  ]),
115
115
  _: 1
116
116
  }, 8, ["id", "data-cy", "class", "aria-expanded"])
117
117
  ]),
118
- (f(), x(F(t.dropdownElement), {
118
+ (f(), x(U(t.dropdownElement), {
119
119
  id: "dropdown_" + d(k),
120
120
  ref: "dropdown",
121
121
  "data-cy": t.dataCy && `${t.dataCy}_dropdown`,
@@ -127,7 +127,7 @@ const Q = ["innerHTML"], te = /* @__PURE__ */ L({
127
127
  { "uikit-absolute": t.isAbsolute }
128
128
  ]]),
129
129
  "aria-hidden": !o.value,
130
- onClick: u[0] || (u[0] = g(() => {
130
+ onClick: u[1] || (u[1] = j(() => {
131
131
  }, ["stop"]))
132
132
  }, {
133
133
  default: B(() => [
@@ -146,5 +146,5 @@ const Q = ["innerHTML"], te = /* @__PURE__ */ L({
146
146
  }
147
147
  });
148
148
  export {
149
- te as default
149
+ ee as default
150
150
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wikicasa-dev/components",
3
- "version": "2.2.8-alpha.20",
3
+ "version": "2.2.8-alpha.21",
4
4
  "description": "Wikicasa frontend components",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",