@wikicasa-dev/components 2.2.8-alpha.21 → 2.2.8-alpha.22
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.
- package/dist/Swiper/autoplay.js +1 -1
- package/dist/Swiper/controller.js +1 -1
- package/dist/Swiper/keyboard.js +1 -1
- package/dist/Swiper/thumbs.js +1 -1
- package/dist/packages/components/lib/UIKit/BaseDropDown.vue.js +55 -57
- package/package.json +1 -1
- /package/dist/assets/{swiper-keyboard.css → swiper-thumbs.css} +0 -0
package/dist/Swiper/autoplay.js
CHANGED
package/dist/Swiper/keyboard.js
CHANGED
package/dist/Swiper/thumbs.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as O, mergeModels as h, useId as W, useModel as g, shallowRef as D, computed as $, useTemplateRef as T, onMounted as H, onUnmounted as N, watch as i, nextTick as V, createElementBlock as z, openBlock as f, normalizeClass as n, renderSlot as x, createBlock as I, createVNode as R, withModifiers as B, unref as r, withCtx as S, createElementVNode as q, createCommentVNode as U, resolveDynamicComponent as j } from "vue";
|
|
2
2
|
import F from "./BaseButton.vue.js";
|
|
3
3
|
import { ArrowIcon as G } from "@wikicasa-dev/svg-icons";
|
|
4
4
|
import { useKeyboardController as J } from "@wikicasa-dev/vue-composables";
|
|
5
|
-
const P = ["innerHTML"], ee = /* @__PURE__ */
|
|
5
|
+
const P = ["innerHTML"], ee = /* @__PURE__ */ O({
|
|
6
6
|
inheritAttrs: !1,
|
|
7
7
|
__name: "BaseDropDown",
|
|
8
|
-
props: /* @__PURE__ */
|
|
8
|
+
props: /* @__PURE__ */ h({
|
|
9
9
|
dropdownClasses: { default: "" },
|
|
10
10
|
btnClasses: { default: "" },
|
|
11
11
|
withArrowIcon: { type: Boolean, default: !1 },
|
|
@@ -27,17 +27,37 @@ const P = ["innerHTML"], ee = /* @__PURE__ */ L({
|
|
|
27
27
|
resetKeyboardController: { type: Boolean, default: !1 },
|
|
28
28
|
resetKeyboardControllerModifiers: {}
|
|
29
29
|
}),
|
|
30
|
-
emits: /* @__PURE__ */
|
|
31
|
-
setup(t, { expose:
|
|
32
|
-
const l = t, k =
|
|
30
|
+
emits: /* @__PURE__ */ h(["click", "update:dropdownState"], ["update:toggleDropdown", "update:resetKeyboardController"]),
|
|
31
|
+
setup(t, { expose: A, emit: E }) {
|
|
32
|
+
const l = t, k = W(), w = E, v = g(t, "toggleDropdown"), m = g(
|
|
33
33
|
t,
|
|
34
34
|
"resetKeyboardController"
|
|
35
|
-
)
|
|
36
|
-
|
|
35
|
+
);
|
|
36
|
+
let p = !1;
|
|
37
|
+
const o = D(!1), s = D([]), K = $(() => s.value.length), b = T("dropdown"), { activeIdx: d, selectedIdx: a } = J({
|
|
38
|
+
optionsLength: K,
|
|
37
39
|
isDropdownOpen: o,
|
|
38
40
|
activate: l.activateKeyboardController
|
|
39
|
-
})
|
|
40
|
-
|
|
41
|
+
}), C = () => {
|
|
42
|
+
o.value = !1;
|
|
43
|
+
}, c = () => {
|
|
44
|
+
l.keepState === "closed" && !o.value || l.keepState === "opened" && o.value || (o.value = !o.value);
|
|
45
|
+
}, L = (e) => {
|
|
46
|
+
e != null && (d.value = e);
|
|
47
|
+
}, M = (e) => {
|
|
48
|
+
e != null && (a.value = e);
|
|
49
|
+
}, y = () => {
|
|
50
|
+
b.value && (s.value = Array.from(b.value.children));
|
|
51
|
+
};
|
|
52
|
+
return H(() => {
|
|
53
|
+
y();
|
|
54
|
+
}), N(() => {
|
|
55
|
+
l.closeWhenClickedOutside && document.removeEventListener("click", C);
|
|
56
|
+
}), i(m, (e) => {
|
|
57
|
+
e && (d.value = -1, a.value = -1, V(() => {
|
|
58
|
+
y(), m.value = !1;
|
|
59
|
+
}));
|
|
60
|
+
}), i(
|
|
41
61
|
() => l.openDropdown,
|
|
42
62
|
(e) => {
|
|
43
63
|
o.value = e;
|
|
@@ -45,48 +65,26 @@ const P = ["innerHTML"], ee = /* @__PURE__ */ L({
|
|
|
45
65
|
{
|
|
46
66
|
immediate: !0
|
|
47
67
|
}
|
|
48
|
-
),
|
|
68
|
+
), i(o, (e) => {
|
|
49
69
|
w("update:dropdownState", e);
|
|
50
|
-
}),
|
|
70
|
+
}), i(o, (e) => {
|
|
71
|
+
!e || p || !l.closeWhenClickedOutside || (document.addEventListener("click", C), p = !0);
|
|
72
|
+
}), i(v, (e) => {
|
|
51
73
|
e && (o.value = !o.value, v.value = !1);
|
|
52
|
-
}), a
|
|
74
|
+
}), i(a, (e) => {
|
|
53
75
|
e !== -1 && s.value[e].querySelector("a")?.click();
|
|
54
|
-
})
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
},
|
|
58
|
-
l.keepState === "closed" && !o.value || l.keepState === "opened" && o.value || (o.value = !o.value);
|
|
59
|
-
}, A = (e) => {
|
|
60
|
-
e != null && (r.value = e);
|
|
61
|
-
}, K = (e) => {
|
|
62
|
-
e != null && (i.value = e);
|
|
63
|
-
};
|
|
64
|
-
$(() => {
|
|
65
|
-
l.closeWhenClickedOutside && document.addEventListener("click", b);
|
|
66
|
-
});
|
|
67
|
-
const y = () => {
|
|
68
|
-
p.value && (s.value = Array.from(p.value.children));
|
|
69
|
-
};
|
|
70
|
-
return T(() => {
|
|
71
|
-
y();
|
|
72
|
-
}), H(() => {
|
|
73
|
-
l.closeWhenClickedOutside && document.removeEventListener("click", b);
|
|
74
|
-
}), a(m, (e) => {
|
|
75
|
-
e && (r.value = -1, i.value = -1, N(() => {
|
|
76
|
-
y(), m.value = !1;
|
|
77
|
-
}));
|
|
78
|
-
}), I({
|
|
79
|
-
activeIdx: r,
|
|
80
|
-
selectedIdx: i
|
|
81
|
-
}), (e, u) => (f(), V("div", {
|
|
76
|
+
}), A({
|
|
77
|
+
activeIdx: d,
|
|
78
|
+
selectedIdx: a
|
|
79
|
+
}), (e, u) => (f(), z("div", {
|
|
82
80
|
class: n(["uikit-relative uikit-block", e.$attrs.class])
|
|
83
81
|
}, [
|
|
84
|
-
|
|
82
|
+
x(e.$slots, "btn_slot", {
|
|
85
83
|
toggleDropdown: c,
|
|
86
84
|
isOpen: o.value
|
|
87
85
|
}, () => [
|
|
88
86
|
R(F, {
|
|
89
|
-
id:
|
|
87
|
+
id: r(k),
|
|
90
88
|
type: "button",
|
|
91
89
|
"data-cy": t.dataCy,
|
|
92
90
|
class: n([
|
|
@@ -95,28 +93,28 @@ const P = ["innerHTML"], ee = /* @__PURE__ */ L({
|
|
|
95
93
|
]),
|
|
96
94
|
"aria-expanded": o.value,
|
|
97
95
|
"btn-class": "uikit-btn-single-selection",
|
|
98
|
-
onClick: u[0] || (u[0] = (Q) => {
|
|
96
|
+
onClick: u[0] || (u[0] = B((Q) => {
|
|
99
97
|
w("click"), c();
|
|
100
|
-
})
|
|
98
|
+
}, ["stop"]))
|
|
101
99
|
}, {
|
|
102
|
-
default:
|
|
100
|
+
default: S(() => [
|
|
103
101
|
q("span", {
|
|
104
102
|
class: n(["uikit-mr-5px", t.labelClasses]),
|
|
105
103
|
innerHTML: t.btnLabel
|
|
106
104
|
}, null, 10, P),
|
|
107
|
-
t.withArrowIcon ? (f(),
|
|
105
|
+
t.withArrowIcon ? (f(), I(r(G), {
|
|
108
106
|
key: 0,
|
|
109
107
|
class: n(["uikit-shrink-0 uikit-transition-transform motion-reduce:uikit-transition-none", o.value ? "uikit-rotate-180" : ""]),
|
|
110
108
|
width: t.arrowWidth,
|
|
111
109
|
height: t.arrowWidth,
|
|
112
110
|
"stroke-color": t.arrowStrokeColor
|
|
113
|
-
}, null, 8, ["class", "width", "height", "stroke-color"])) :
|
|
111
|
+
}, null, 8, ["class", "width", "height", "stroke-color"])) : U("", !0)
|
|
114
112
|
]),
|
|
115
113
|
_: 1
|
|
116
114
|
}, 8, ["id", "data-cy", "class", "aria-expanded"])
|
|
117
115
|
]),
|
|
118
|
-
(f(),
|
|
119
|
-
id: "dropdown_" +
|
|
116
|
+
(f(), I(j(t.dropdownElement), {
|
|
117
|
+
id: "dropdown_" + r(k),
|
|
120
118
|
ref: "dropdown",
|
|
121
119
|
"data-cy": t.dataCy && `${t.dataCy}_dropdown`,
|
|
122
120
|
class: n(["uikit-dropdown-content uikit-w-full uikit-flex-col uikit-overflow-y-auto uikit-border uikit-border-solid uikit-bg-white uikit-pl-0 uikit-opacity-100 uikit-shadow uikit-no-scrollbar", [
|
|
@@ -127,17 +125,17 @@ const P = ["innerHTML"], ee = /* @__PURE__ */ L({
|
|
|
127
125
|
{ "uikit-absolute": t.isAbsolute }
|
|
128
126
|
]]),
|
|
129
127
|
"aria-hidden": !o.value,
|
|
130
|
-
onClick: u[1] || (u[1] =
|
|
128
|
+
onClick: u[1] || (u[1] = B(() => {
|
|
131
129
|
}, ["stop"]))
|
|
132
130
|
}, {
|
|
133
|
-
default:
|
|
134
|
-
|
|
131
|
+
default: S(() => [
|
|
132
|
+
x(e.$slots, "default", {
|
|
135
133
|
isOpen: o.value,
|
|
136
134
|
toggleDropdown: c,
|
|
137
|
-
activeIdx: d
|
|
138
|
-
selectedIdx:
|
|
139
|
-
setActiveIdx:
|
|
140
|
-
setSelectedIdx:
|
|
135
|
+
activeIdx: r(d),
|
|
136
|
+
selectedIdx: r(a),
|
|
137
|
+
setActiveIdx: L,
|
|
138
|
+
setSelectedIdx: M
|
|
141
139
|
})
|
|
142
140
|
]),
|
|
143
141
|
_: 3
|
package/package.json
CHANGED
|
File without changes
|