@wikicasa-dev/components 2.6.12 → 2.6.13
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/UIKit/BaseDropDown.vue.js +34 -33
- package/dist/lazyModules/Swiper/Autoplay/index.js +1 -1
- package/dist/lazyModules/Swiper/Controller/index.js +1 -1
- package/dist/lazyModules/Swiper/Keyboard/index.js +1 -1
- package/dist/lazyModules/Swiper/Thumbs/index.js +1 -1
- package/package.json +6 -6
- /package/dist/assets/{swiper-controller.css → swiper-thumbs.css} +0 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as N, useId as T, useModel as I, shallowRef as R, computed as V, useTemplateRef as x, onMounted as z, onUnmounted as P, watch as v, nextTick as q, openBlock as m, createElementBlock as F, normalizeClass as s, renderSlot as A, unref as l, createVNode as U, withCtx as B, createElementVNode as j, createBlock as L, createCommentVNode as G, resolveDynamicComponent as J, mergeProps as Q, mergeModels as D } from "vue";
|
|
2
2
|
import X from "./BaseButton.vue.js";
|
|
3
3
|
import { ArrowIcon as Y } from "@wikicasa-dev/svg-icons";
|
|
4
4
|
import { useKeyboardController as Z } from "../composables/mock.js";
|
|
5
|
-
const _ = ["innerHTML"], le = /* @__PURE__ */
|
|
5
|
+
const _ = ["innerHTML"], le = /* @__PURE__ */ N({
|
|
6
6
|
inheritAttrs: !1,
|
|
7
7
|
__name: "BaseDropDown",
|
|
8
8
|
props: /* @__PURE__ */ D({
|
|
@@ -30,12 +30,12 @@ const _ = ["innerHTML"], le = /* @__PURE__ */ T({
|
|
|
30
30
|
}),
|
|
31
31
|
emits: /* @__PURE__ */ D(["click"], ["update:resetKeyboardController", "update:open"]),
|
|
32
32
|
setup(t, { expose: S, emit: M }) {
|
|
33
|
-
const n = t, y =
|
|
33
|
+
const n = t, y = T(), O = M, w = I(
|
|
34
34
|
t,
|
|
35
35
|
"resetKeyboardController"
|
|
36
36
|
), o = I(t, "open");
|
|
37
37
|
let C = !1;
|
|
38
|
-
const
|
|
38
|
+
const u = R([]), W = V(() => u.value.length), a = x("container"), c = x("dropdown"), { activeIdx: i, selectedIdx: r, onKeyDownHandler: $ } = Z({
|
|
39
39
|
optionsLength: W,
|
|
40
40
|
isDropdownOpen: o,
|
|
41
41
|
global: !1,
|
|
@@ -43,74 +43,74 @@ const _ = ["innerHTML"], le = /* @__PURE__ */ T({
|
|
|
43
43
|
}), b = () => {
|
|
44
44
|
o.value = !1;
|
|
45
45
|
}, h = ({ target: e }) => {
|
|
46
|
-
|
|
47
|
-
}, p = (e) => {
|
|
48
|
-
o.value && (
|
|
46
|
+
a.value?.contains(e) || b();
|
|
47
|
+
}, p = ({ target: e }) => {
|
|
48
|
+
o.value && e instanceof Node && (a.value?.contains(e) || a.value && e.contains(a.value) || b());
|
|
49
49
|
}, H = (e) => {
|
|
50
50
|
n.activateKeyboardController && $(e);
|
|
51
51
|
}, f = () => {
|
|
52
52
|
n.keepState === "closed" && !o.value || n.keepState === "opened" && o.value || (o.value = !o.value);
|
|
53
|
-
}, g = (e) => {
|
|
54
|
-
e != null && (a.value = e);
|
|
55
53
|
}, K = (e) => {
|
|
56
54
|
e != null && (i.value = e);
|
|
55
|
+
}, g = (e) => {
|
|
56
|
+
e != null && (r.value = e);
|
|
57
57
|
}, E = () => {
|
|
58
|
-
c.value && (
|
|
58
|
+
c.value && (u.value = Array.from(c.value.children));
|
|
59
59
|
};
|
|
60
60
|
return z(() => {
|
|
61
61
|
E();
|
|
62
62
|
}), P(() => {
|
|
63
63
|
n.closeWhenClickedOutside && (document.removeEventListener("click", h), document.removeEventListener("focusin", p));
|
|
64
64
|
}), v(w, (e) => {
|
|
65
|
-
e && (
|
|
65
|
+
e && (i.value = -1, r.value = -1, q(() => {
|
|
66
66
|
E(), w.value = !1;
|
|
67
67
|
}));
|
|
68
68
|
}), v(o, (e) => {
|
|
69
69
|
!e || C || !n.closeWhenClickedOutside || (document.addEventListener("click", h), document.addEventListener("focusin", p), C = !0);
|
|
70
|
-
}), v(
|
|
71
|
-
e !== -1 &&
|
|
70
|
+
}), v(r, (e) => {
|
|
71
|
+
e !== -1 && u.value[e]?.querySelector("a")?.click();
|
|
72
72
|
}), S({
|
|
73
|
-
activeIdx:
|
|
74
|
-
selectedIdx:
|
|
75
|
-
getRootElement: () =>
|
|
73
|
+
activeIdx: i,
|
|
74
|
+
selectedIdx: r,
|
|
75
|
+
getRootElement: () => a.value,
|
|
76
76
|
getContentElement: () => c.value
|
|
77
|
-
}), (e,
|
|
77
|
+
}), (e, d) => (m(), F("div", {
|
|
78
78
|
ref: "container",
|
|
79
|
-
class:
|
|
79
|
+
class: s(["uikit-relative uikit-block", e.$attrs.class]),
|
|
80
80
|
onKeydown: H
|
|
81
81
|
}, [
|
|
82
|
-
|
|
82
|
+
A(e.$slots, "btn_slot", {
|
|
83
83
|
toggleDropdown: f,
|
|
84
84
|
isOpen: o.value,
|
|
85
|
-
activeIdx: l(
|
|
86
|
-
setActiveIdx:
|
|
87
|
-
setSelectedIdx:
|
|
85
|
+
activeIdx: l(i),
|
|
86
|
+
setActiveIdx: K,
|
|
87
|
+
setSelectedIdx: g
|
|
88
88
|
}, () => [
|
|
89
89
|
U(X, {
|
|
90
90
|
id: l(y),
|
|
91
91
|
type: "button",
|
|
92
92
|
"data-cy": t.dataCy,
|
|
93
|
-
class:
|
|
93
|
+
class: s([
|
|
94
94
|
"!uikit-flex uikit-w-full uikit-items-center uikit-truncate",
|
|
95
95
|
t.btnClasses
|
|
96
96
|
]),
|
|
97
97
|
"aria-expanded": o.value,
|
|
98
98
|
"btn-class": "uikit-btn-single-selection",
|
|
99
|
-
onClick:
|
|
99
|
+
onClick: d[0] || (d[0] = (k) => {
|
|
100
100
|
O("click"), f();
|
|
101
101
|
}),
|
|
102
|
-
onKeydown:
|
|
102
|
+
onKeydown: d[1] || (d[1] = (k) => {
|
|
103
103
|
Array.isArray(t.closeKeys) && !t.closeKeys.includes(k.key) || k.stopPropagation();
|
|
104
104
|
})
|
|
105
105
|
}, {
|
|
106
106
|
default: B(() => [
|
|
107
107
|
j("span", {
|
|
108
|
-
class:
|
|
108
|
+
class: s(["uikit-mr-5px", t.labelClasses]),
|
|
109
109
|
innerHTML: t.btnLabel
|
|
110
110
|
}, null, 10, _),
|
|
111
111
|
t.withArrowIcon ? (m(), L(l(Y), {
|
|
112
112
|
key: 0,
|
|
113
|
-
class:
|
|
113
|
+
class: s(["uikit-shrink-0 uikit-transition-transform motion-reduce:uikit-transition-none", o.value ? "uikit-rotate-180" : ""]),
|
|
114
114
|
width: t.arrowWidth,
|
|
115
115
|
height: t.arrowWidth,
|
|
116
116
|
"stroke-color": t.arrowStrokeColor
|
|
@@ -130,16 +130,17 @@ const _ = ["innerHTML"], le = /* @__PURE__ */ T({
|
|
|
130
130
|
{ "uikit-absolute": t.isAbsolute }
|
|
131
131
|
]],
|
|
132
132
|
"aria-hidden": !o.value,
|
|
133
|
-
"data-side": t.direction
|
|
133
|
+
"data-side": t.direction,
|
|
134
|
+
tabindex: "-1"
|
|
134
135
|
}, t.dropdownAttrs), {
|
|
135
136
|
default: B(() => [
|
|
136
|
-
|
|
137
|
+
A(e.$slots, "default", {
|
|
137
138
|
isOpen: o.value,
|
|
138
139
|
toggleDropdown: f,
|
|
139
|
-
activeIdx: l(
|
|
140
|
-
selectedIdx: l(
|
|
141
|
-
setActiveIdx:
|
|
142
|
-
setSelectedIdx:
|
|
140
|
+
activeIdx: l(i),
|
|
141
|
+
selectedIdx: l(r),
|
|
142
|
+
setActiveIdx: K,
|
|
143
|
+
setSelectedIdx: g
|
|
143
144
|
})
|
|
144
145
|
]),
|
|
145
146
|
_: 3
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wikicasa-dev/components",
|
|
3
|
-
"version": "2.6.
|
|
3
|
+
"version": "2.6.13",
|
|
4
4
|
"description": "Wikicasa frontend components",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"homepage": "https://bitbucket.org/wikicasa/wikicasa-fe#readme",
|
|
44
44
|
"peerDependencies": {
|
|
45
45
|
"@wikicasa-dev/svg-icons": "^1.3.7",
|
|
46
|
-
"@wikicasa-dev/types": "^2.
|
|
46
|
+
"@wikicasa-dev/types": "^2.8.0",
|
|
47
47
|
"@wikicasa-dev/utilities": "^1.2.11",
|
|
48
48
|
"@wikicasa-dev/vue-composables": "^0.2.0",
|
|
49
49
|
"date-fns": "^4.0.0",
|
|
@@ -82,13 +82,13 @@
|
|
|
82
82
|
"vitest-browser-vue": "^2.1.0",
|
|
83
83
|
"vue-router": "^5.1.0",
|
|
84
84
|
"vue-tsc": "^3.3.3",
|
|
85
|
-
"@wikicasa-dev/tsconfig": "0.0.0",
|
|
86
|
-
"@wikicasa-dev/svg-icons": "1.3.7",
|
|
87
85
|
"@wikicasa-dev/eslint-config": "0.0.0",
|
|
88
86
|
"@wikicasa-dev/tailwind-plugins": "0.0.7",
|
|
89
|
-
"@wikicasa-dev/
|
|
87
|
+
"@wikicasa-dev/svg-icons": "1.3.7",
|
|
88
|
+
"@wikicasa-dev/tsconfig": "0.0.0",
|
|
90
89
|
"@wikicasa-dev/utilities": "1.2.11",
|
|
91
|
-
"@wikicasa-dev/
|
|
90
|
+
"@wikicasa-dev/vue-composables": "0.2.0",
|
|
91
|
+
"@wikicasa-dev/types": "2.8.0"
|
|
92
92
|
},
|
|
93
93
|
"readme": "ERROR: No README data found!",
|
|
94
94
|
"scripts": {
|
|
File without changes
|