@wikicasa-dev/components 2.2.9-alpha.38 → 2.2.9-alpha.4
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/UIKit/AccessibleSelect.d.ts +4 -4
- package/dist/UIKit/AccessibleSelect.js +2 -3
- package/dist/UIKit/Autocomplete/ClearableAutocomplete.d.ts +3 -9
- package/dist/UIKit/BaseAutocomplete.d.ts +2 -2
- package/dist/UIKit/BaseButton.d.ts +8 -14
- package/dist/UIKit/BaseDropDown.d.ts +11 -17
- package/dist/UIKit/BaseInput.d.ts +2 -2
- package/dist/UIKit/BaseInput.js +2 -2
- package/dist/UIKit/BaseTextarea.d.ts +2 -2
- package/dist/assets/BaseDropDown.css +1 -1
- package/dist/assets/BaseInput.css +1 -1
- package/dist/assets/tailwind.css +1 -1
- package/dist/index.js +83 -84
- package/dist/packages/components/lib/UIKit/AccessibleSelect.vue.js +157 -150
- package/dist/packages/components/lib/UIKit/Autocomplete/ClearableAutocomplete.vue.js +100 -116
- package/dist/packages/components/lib/UIKit/BaseAutocomplete.vue.js +5 -5
- package/dist/packages/components/lib/UIKit/BaseButton.vue.js +24 -28
- package/dist/packages/components/lib/UIKit/BaseDropDown.vue.js +105 -102
- package/dist/packages/components/lib/UIKit/BaseModal.vue.js +36 -42
- package/dist/packages/components/lib/UIKit/BaseSelect/SelectItem.vue.js +17 -18
- package/dist/packages/components/lib/UIKit/Checkbox/CheckboxBtn.vue.js +26 -24
- package/dist/packages/components/lib/UIKit/Checkbox/CheckboxGroup.vue.js +14 -14
- package/package.json +5 -6
- package/dist/assets/AccessibleSelect.css +0 -1
- package/dist/composables/mock.d.ts +0 -25
- package/dist/composables/mock.js +0 -49
- /package/dist/assets/{swiper-thumbs.css → swiper-controller.css} +0 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as p, ref as v, computed as h, watch as D, renderSlot as b, createElementVNode as E, normalizeClass as $, createElementBlock as B, createCommentVNode as A, openBlock as g, Fragment as I, renderList as R, createBlock as K, unref as V } from "vue";
|
|
2
2
|
import { stringToHyphened as L, isArrNullOrEmpty as G } from "@wikicasa-dev/utilities";
|
|
3
3
|
import N from "./CheckboxBtn.vue.js";
|
|
4
4
|
import '../../../../../assets/CheckboxBtn.css';/* empty css */
|
|
5
|
-
const T = ["id", "data-cy"], j = /* @__PURE__ */
|
|
5
|
+
const T = ["id", "data-cy"], j = /* @__PURE__ */ p({
|
|
6
6
|
inheritAttrs: !1,
|
|
7
7
|
__name: "CheckboxGroup",
|
|
8
8
|
props: {
|
|
@@ -20,14 +20,14 @@ const T = ["id", "data-cy"], j = /* @__PURE__ */ v({
|
|
|
20
20
|
dataCy: { default: "" }
|
|
21
21
|
},
|
|
22
22
|
emits: ["resetted", "update:modelValue", "checkedGroup"],
|
|
23
|
-
setup(a, { emit:
|
|
24
|
-
const o = a, s =
|
|
23
|
+
setup(a, { emit: C }) {
|
|
24
|
+
const o = a, s = C, l = v(
|
|
25
25
|
/* @__PURE__ */ new Map()
|
|
26
26
|
), r = h(() => {
|
|
27
27
|
for (const e of o.checkboxData)
|
|
28
28
|
if (e.reset) return e;
|
|
29
29
|
return null;
|
|
30
|
-
}),
|
|
30
|
+
}), y = h(() => o.checkboxData.length), f = h(() => {
|
|
31
31
|
let e = 0;
|
|
32
32
|
return l.value.forEach((t) => {
|
|
33
33
|
t.checked && e++;
|
|
@@ -60,7 +60,7 @@ const T = ["id", "data-cy"], j = /* @__PURE__ */ v({
|
|
|
60
60
|
}, d = (e) => l.value.get(o.getKey(e))?.checked ?? !1, i = (e) => {
|
|
61
61
|
if (G(o.checkboxData)) return;
|
|
62
62
|
const t = l.value.get(e.id);
|
|
63
|
-
t?.reset && e.checked ? k() : r.value && !t?.reset && u(o.getKey(r.value), { checked: !1 }), u(`${e.id}`), o.autoCheckResetAll && r.value && f.value ===
|
|
63
|
+
t?.reset && e.checked ? k() : r.value && !t?.reset && u(o.getKey(r.value), { checked: !1 }), u(`${e.id}`), o.autoCheckResetAll && r.value && f.value === y.value - 1 && l.value.forEach((n) => {
|
|
64
64
|
n.checked = !!n.reset;
|
|
65
65
|
}), o.autoCheckResetEmpty && r.value && !f.value && (!o.manualToggleResetButton || !t?.reset) && u(o.getKey(r.value), { checked: !0 });
|
|
66
66
|
const c = [];
|
|
@@ -68,7 +68,7 @@ const T = ["id", "data-cy"], j = /* @__PURE__ */ v({
|
|
|
68
68
|
n.checked && c.push(n);
|
|
69
69
|
}), s("update:modelValue", c), s("checkedGroup", o.groupId);
|
|
70
70
|
};
|
|
71
|
-
return
|
|
71
|
+
return D(
|
|
72
72
|
() => o.reset,
|
|
73
73
|
(e) => {
|
|
74
74
|
e && m();
|
|
@@ -78,9 +78,9 @@ const T = ["id", "data-cy"], j = /* @__PURE__ */ v({
|
|
|
78
78
|
handleChange: i,
|
|
79
79
|
checkboxesData: a.checkboxData
|
|
80
80
|
}, () => [
|
|
81
|
-
|
|
81
|
+
E("div", {
|
|
82
82
|
id: a.groupId,
|
|
83
|
-
class:
|
|
83
|
+
class: $(["checkbox-group-container", e.$attrs.class || ""]),
|
|
84
84
|
"data-cy": a.dataCy
|
|
85
85
|
}, [
|
|
86
86
|
b(e.$slots, "checkbox_elements", {
|
|
@@ -89,19 +89,19 @@ const T = ["id", "data-cy"], j = /* @__PURE__ */ v({
|
|
|
89
89
|
checkboxesData: a.checkboxData,
|
|
90
90
|
reset: m
|
|
91
91
|
}, () => [
|
|
92
|
-
a.checkboxData ? (
|
|
92
|
+
a.checkboxData ? (g(!0), B(I, { key: 0 }, R(a.checkboxData, (c, n) => (g(), K(N, {
|
|
93
93
|
id: a.getKey(c),
|
|
94
94
|
key: n,
|
|
95
95
|
"data-cy": c.dataCy ?? `checkbox_${V(L)(`${c.label}`)}`,
|
|
96
96
|
label: c.label,
|
|
97
97
|
inline: a.formCheckInline,
|
|
98
98
|
"model-value": d(c),
|
|
99
|
-
class:
|
|
99
|
+
"container-class": [
|
|
100
100
|
a.formCheckInline ? "uikit-mr-10px" : "uikit-mb-10px",
|
|
101
101
|
a.checkboxContainerClasses
|
|
102
|
-
]
|
|
103
|
-
onChange: t[0] || (t[0] = (
|
|
104
|
-
}, null, 8, ["id", "data-cy", "label", "inline", "model-value", "class"]))), 128)) : A("", !0)
|
|
102
|
+
],
|
|
103
|
+
onChange: t[0] || (t[0] = (x) => i(x))
|
|
104
|
+
}, null, 8, ["id", "data-cy", "label", "inline", "model-value", "container-class"]))), 128)) : A("", !0)
|
|
105
105
|
])
|
|
106
106
|
], 10, T)
|
|
107
107
|
]);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wikicasa-dev/components",
|
|
3
|
-
"version": "2.2.9-alpha.
|
|
3
|
+
"version": "2.2.9-alpha.4",
|
|
4
4
|
"description": "Wikicasa frontend components",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -17,7 +17,6 @@
|
|
|
17
17
|
"default": "./dist/index.js"
|
|
18
18
|
},
|
|
19
19
|
"./style": "./dist/assets/tailwind.css",
|
|
20
|
-
"./css/*": "./dist/assets/*.css",
|
|
21
20
|
"./generic/*": {
|
|
22
21
|
"import": "./dist/components/*.js",
|
|
23
22
|
"types": "./dist/components/*.d.ts"
|
|
@@ -44,8 +43,8 @@
|
|
|
44
43
|
"peerDependencies": {
|
|
45
44
|
"vue": "^3.5.0",
|
|
46
45
|
"date-fns": "^4.0.0",
|
|
47
|
-
"@wikicasa-dev/svg-icons": "^1.2.
|
|
48
|
-
"@wikicasa-dev/vue-composables": "0.0.
|
|
46
|
+
"@wikicasa-dev/svg-icons": "^1.2.24",
|
|
47
|
+
"@wikicasa-dev/vue-composables": "^0.0.29",
|
|
49
48
|
"@wikicasa-dev/types": "^2.4.0",
|
|
50
49
|
"@wikicasa-dev/utilities": "^1.2.0"
|
|
51
50
|
},
|
|
@@ -64,8 +63,8 @@
|
|
|
64
63
|
"@vitejs/plugin-vue": "^6.0.2",
|
|
65
64
|
"@vue/eslint-config-prettier": "^10.2.0",
|
|
66
65
|
"@vue/eslint-config-typescript": "^14.6.0",
|
|
67
|
-
"@wikicasa-dev/svg-icons": "1.2.
|
|
68
|
-
"@wikicasa-dev/vue-composables": "0.0.
|
|
66
|
+
"@wikicasa-dev/svg-icons": "1.2.24",
|
|
67
|
+
"@wikicasa-dev/vue-composables": "0.0.29",
|
|
69
68
|
"@wikicasa-dev/tailwind-plugins": "^0.0.3",
|
|
70
69
|
"@wikicasa-dev/types": "2.4.6",
|
|
71
70
|
"@wikicasa-dev/utilities": "1.2.0",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.uikit-select-dropdown.uikit-dropdown-content{--dropdown-border-color: #B4C2F0;--dropdown-max-height: 225px;--dropdown-min-width: unset;--dropdown-margin-top: 10px;margin-top:var(--dropdown-margin-top)}.uikit-select-dropdown.uikit-dropdown-content[data-side=down]{--dropdown-border-top-width: 1px;--dropdown-border-top-left-radius: 12px;--dropdown-border-top-right-radius: 12px;--dropdown-border-bottom-left-radius: 12px;--dropdown-border-bottom-right-radius: 12px}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { Ref } from 'vue';
|
|
2
|
-
interface KeyboardControllerProps {
|
|
3
|
-
optionsLength: Ref<number> | number;
|
|
4
|
-
isDropdownOpen?: Ref<boolean>;
|
|
5
|
-
disableSpaceHandler?: boolean;
|
|
6
|
-
activate?: boolean;
|
|
7
|
-
/**
|
|
8
|
-
* If true, the listener will be initialized on the document element
|
|
9
|
-
*/
|
|
10
|
-
global?: boolean;
|
|
11
|
-
/**
|
|
12
|
-
* List of keys that will close the dropdown.
|
|
13
|
-
* For the full list of keys, see
|
|
14
|
-
* @link https://developer.mozilla.org/en-US/docs/Web/API/UI_Events/Keyboard_event_key_values
|
|
15
|
-
* @default "Escape" and "Enter"
|
|
16
|
-
*/
|
|
17
|
-
closeKeys?: string[];
|
|
18
|
-
}
|
|
19
|
-
export declare const useKeyboardController: (props: KeyboardControllerProps) => {
|
|
20
|
-
activeIdx: Ref<number, number>;
|
|
21
|
-
selectedIdx: Ref<number, number>;
|
|
22
|
-
$reset: () => void;
|
|
23
|
-
onKeyDownHandler: (e: KeyboardEvent) => void;
|
|
24
|
-
};
|
|
25
|
-
export {};
|
package/dist/composables/mock.js
DELETED
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { ref as _, onMounted as A, onUnmounted as D, unref as p } from "vue";
|
|
2
|
-
const u = "ArrowUp", a = "ArrowDown", c = "Enter", i = "Escape", v = " ", d = "PageUp", K = "Home", E = "PageDown", m = "End", O = (l) => {
|
|
3
|
-
const {
|
|
4
|
-
isDropdownOpen: t,
|
|
5
|
-
disableSpaceHandler: P,
|
|
6
|
-
global: f = !0,
|
|
7
|
-
closeKeys: Y = [i, c]
|
|
8
|
-
} = l, n = _(-1), o = _(-1), w = l.activate === void 0 ? !0 : l.activate, y = () => {
|
|
9
|
-
n.value = -1, o.value = -1, t && (t.value = !1);
|
|
10
|
-
}, k = (e) => {
|
|
11
|
-
t && Y.includes(e) && (t.value = !1);
|
|
12
|
-
}, r = (e) => {
|
|
13
|
-
if (!t?.value || ![
|
|
14
|
-
u,
|
|
15
|
-
a,
|
|
16
|
-
c,
|
|
17
|
-
i,
|
|
18
|
-
v,
|
|
19
|
-
d,
|
|
20
|
-
K,
|
|
21
|
-
E,
|
|
22
|
-
m
|
|
23
|
-
].includes(e.key))
|
|
24
|
-
return;
|
|
25
|
-
const s = p(l.optionsLength);
|
|
26
|
-
if ([u, a, d, E].includes(e.key) && e.preventDefault(), e.key === u)
|
|
27
|
-
n.value = n.value === 0 ? s - 1 : n.value - 1;
|
|
28
|
-
else if (e.key === a)
|
|
29
|
-
n.value = (n.value + 1) % s;
|
|
30
|
-
else if (e.key === c || e.key === v) {
|
|
31
|
-
if (e.key === v && P) return;
|
|
32
|
-
o.value = n.value, k(e.key);
|
|
33
|
-
} else e.key === i ? (n.value = o.value, k(e.key)) : e.key === d || e.key === K ? n.value = 0 : (e.key === E || e.key === m) && (n.value = s - 1);
|
|
34
|
-
e.stopPropagation();
|
|
35
|
-
};
|
|
36
|
-
return w ? (A(() => {
|
|
37
|
-
!document || !f || document.addEventListener("keydown", r);
|
|
38
|
-
}), D(() => {
|
|
39
|
-
!document || !f || document.removeEventListener("keydown", r);
|
|
40
|
-
}), {
|
|
41
|
-
activeIdx: n,
|
|
42
|
-
selectedIdx: o,
|
|
43
|
-
onKeyDownHandler: r,
|
|
44
|
-
$reset: y
|
|
45
|
-
}) : { activeIdx: n, selectedIdx: o, $reset: y, onKeyDownHandler: r };
|
|
46
|
-
};
|
|
47
|
-
export {
|
|
48
|
-
O as useKeyboardController
|
|
49
|
-
};
|
|
File without changes
|