@wikicasa-dev/components 2.2.1 → 2.2.2
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/BaseAutocomplete.d.ts +4 -0
- package/dist/index.d.ts +7 -9
- package/dist/packages/components/lib/UIKit/BaseAutocomplete.vue.js +46 -41
- package/dist/types/index.d.ts +9 -0
- package/dist/types/index.js +1 -0
- package/package.json +2 -2
- /package/dist/assets/{swiper-keyboard.css → swiper-autoplay.css} +0 -0
package/dist/Swiper/autoplay.js
CHANGED
package/dist/Swiper/keyboard.js
CHANGED
package/dist/Swiper/thumbs.js
CHANGED
|
@@ -38,6 +38,10 @@ declare const _default: <T, LabelID extends string | number | undefined>(__VLS_p
|
|
|
38
38
|
righticon?(_: {
|
|
39
39
|
handleClean: () => void;
|
|
40
40
|
}): any;
|
|
41
|
+
'item-content'?(_: {
|
|
42
|
+
option: import('@vue/reactivity').UnwrapRefSimple<AccessibleSelectOptions<T, LabelID>>;
|
|
43
|
+
idx: number;
|
|
44
|
+
}): any;
|
|
41
45
|
};
|
|
42
46
|
emit: (((evt: "click") => void) & ((evt: "update:dropdownState", args_0: boolean) => void) & ((evt: "keydown", args_0: KeyboardEvent) => void) & ((evt: "keydownEnterPressed") => void) & ((evt: "changedValue", args_0: string) => void)) & ((evt: "update:modelValue", value: AccessibleSelectOptions<T, LabelID> | undefined) => void);
|
|
43
47
|
}>) => import('vue').VNode & {
|
package/dist/index.d.ts
CHANGED
|
@@ -1,22 +1,21 @@
|
|
|
1
|
-
export
|
|
2
|
-
export { default as BaseAccordion, type AccordionItemDecorated, type AccordionItem, } from './UIKit/Accordion/BaseAccordion';
|
|
1
|
+
export { default as BaseAccordion } from './UIKit/Accordion/BaseAccordion';
|
|
3
2
|
export { default as BaseAccordionBtn } from './UIKit/Accordion/BaseAccordionBtn';
|
|
4
3
|
export { default as BaseAccordionContent } from './UIKit/Accordion/BaseAccordionContent';
|
|
5
4
|
export { default as BaseAccordionItem } from './UIKit/Accordion/BaseAccordionItem';
|
|
6
5
|
export { default as SelectItem } from './UIKit/BaseSelect/SelectItem';
|
|
7
6
|
export { default as CheckboxBtn } from './UIKit/Checkbox/CheckboxBtn';
|
|
8
|
-
export { default as CheckboxGroup
|
|
9
|
-
export { default as BaseTabView
|
|
7
|
+
export { default as CheckboxGroup } from './UIKit/Checkbox/CheckboxGroup';
|
|
8
|
+
export { default as BaseTabView } from './UIKit/Tab/BaseTabView';
|
|
10
9
|
export { default as BaseTab } from './UIKit/Tab/BaseTab';
|
|
11
10
|
export { default as RadioButton } from './UIKit/Radio/RadioButton';
|
|
12
|
-
export { default as RadioGroup
|
|
13
|
-
export { default as AccessibleSelect
|
|
11
|
+
export { default as RadioGroup } from './UIKit/Radio/RadioGroup';
|
|
12
|
+
export { default as AccessibleSelect } from './UIKit/AccessibleSelect';
|
|
14
13
|
export { default as BaseAlert } from './UIKit/BaseAlert';
|
|
15
14
|
export { default as BaseAutocomplete } from './UIKit/BaseAutocomplete';
|
|
16
15
|
export { default as BaseBadge } from './UIKit/BaseBadge';
|
|
17
16
|
export { default as BaseButton, type ButtonType } from './UIKit/BaseButton';
|
|
18
17
|
export { default as BaseCard } from './UIKit/BaseCard';
|
|
19
|
-
export { default as BaseComplexToggle
|
|
18
|
+
export { default as BaseComplexToggle } from './UIKit/BaseComplexToggle';
|
|
20
19
|
export { default as BaseDropDown } from './UIKit/BaseDropDown';
|
|
21
20
|
export { default as BaseFloatingLabel } from './UIKit/BaseFloatingLabel';
|
|
22
21
|
export { default as BaseInput } from './UIKit/BaseInput';
|
|
@@ -33,10 +32,9 @@ export { default as ShimmerMultiLine } from './UIKit/ShimmerLoader/ShimmerMultiL
|
|
|
33
32
|
export { default as DoughnutChart } from './chart/DoughnutChart';
|
|
34
33
|
export { default as LineChart } from './chart/LineChart';
|
|
35
34
|
export { default as SimpleSlider } from './UIKit/Slider/SimpleSlider';
|
|
36
|
-
export { default as BaseSnackbar
|
|
35
|
+
export { default as BaseSnackbar } from './UIKit/BaseSnackbar';
|
|
37
36
|
export { default as IntersectionObservable } from './components/IntersectionObserver/IntersectionObservable';
|
|
38
37
|
export { default as IntersectionObserver } from './components/IntersectionObserver/IntersectionObserver';
|
|
39
38
|
export { default as SwiperCarousel } from './components/carousel/SwiperCarousel';
|
|
40
39
|
export { default as SwiperSlide } from './components/carousel/SwiperSlide';
|
|
41
40
|
export { default as BaseBreadcrumb } from './UIKit/BaseBreadcrumb';
|
|
42
|
-
export type { ChartOptions, ChartData } from 'chart.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as P, mergeModels as
|
|
1
|
+
import { defineComponent as P, mergeModels as $, useModel as F, ref as d, computed as k, onBeforeMount as L, watch as f, createBlock as g, openBlock as w, normalizeClass as H, withCtx as c, createElementBlock as K, Fragment as T, renderList as z, unref as N, renderSlot as p, createElementVNode as U, createVNode as A } from "vue";
|
|
2
2
|
import W from "../../../../UIKit/BaseInput.js";
|
|
3
3
|
import j from "./BaseDropDown.vue.js";
|
|
4
4
|
import { debounce as q } from "@wikicasa-dev/utilities";
|
|
@@ -6,7 +6,7 @@ import G from "./BaseSelect/SelectItem.vue.js";
|
|
|
6
6
|
import { useKeyboardController as J } from "@wikicasa-dev/vue-composables";
|
|
7
7
|
const Q = ["innerHTML"], le = /* @__PURE__ */ P({
|
|
8
8
|
__name: "BaseAutocomplete",
|
|
9
|
-
props: /* @__PURE__ */
|
|
9
|
+
props: /* @__PURE__ */ $({
|
|
10
10
|
isValid: { type: [Boolean, null], default: null },
|
|
11
11
|
theme: { default: "" },
|
|
12
12
|
label: { default: "" },
|
|
@@ -28,12 +28,12 @@ const Q = ["innerHTML"], le = /* @__PURE__ */ P({
|
|
|
28
28
|
},
|
|
29
29
|
modelModifiers: {}
|
|
30
30
|
}),
|
|
31
|
-
emits: /* @__PURE__ */
|
|
31
|
+
emits: /* @__PURE__ */ $(["update:dropdownState", "changedValue", "click", "keydown", "keydownEnterPressed"], ["update:modelValue"]),
|
|
32
32
|
setup(t, { expose: S, emit: V }) {
|
|
33
33
|
const u = F(
|
|
34
34
|
t,
|
|
35
35
|
"modelValue"
|
|
36
|
-
), r = V, i = d(""),
|
|
36
|
+
), r = V, i = d(""), o = d([]), v = d(null), b = d(!1), n = d(!1), C = d(null), B = k(() => o.value.length);
|
|
37
37
|
L(() => {
|
|
38
38
|
v.value = q({ delay: 300 }, t.onInputChangeCb);
|
|
39
39
|
});
|
|
@@ -52,7 +52,7 @@ const Q = ["innerHTML"], le = /* @__PURE__ */ P({
|
|
|
52
52
|
default:
|
|
53
53
|
return "";
|
|
54
54
|
}
|
|
55
|
-
}),
|
|
55
|
+
}), I = k(() => {
|
|
56
56
|
switch (t.theme) {
|
|
57
57
|
case "bordered":
|
|
58
58
|
return "";
|
|
@@ -63,7 +63,7 @@ const Q = ["innerHTML"], le = /* @__PURE__ */ P({
|
|
|
63
63
|
default:
|
|
64
64
|
return "";
|
|
65
65
|
}
|
|
66
|
-
}),
|
|
66
|
+
}), M = k(() => {
|
|
67
67
|
const e = "uikit-rounded-b-xl uikit-shadow uikit-rounded-t-none uikit-mb-0 !uikit-mt-0 uikit-text-w-black !uikit-rounded-b-xl !uikit-rounded-t-none";
|
|
68
68
|
switch (t.theme) {
|
|
69
69
|
case "bordered":
|
|
@@ -75,18 +75,18 @@ const Q = ["innerHTML"], le = /* @__PURE__ */ P({
|
|
|
75
75
|
default:
|
|
76
76
|
return "";
|
|
77
77
|
}
|
|
78
|
-
}),
|
|
78
|
+
}), x = async (e) => {
|
|
79
79
|
if (i.value !== e && (r("changedValue", e), i.value = e, !!t.onInputChangeCb)) {
|
|
80
|
-
if (!e ||
|
|
81
|
-
|
|
80
|
+
if (!e || b.value) {
|
|
81
|
+
o.value = [], b.value = !1, h.value = -1, m.value = -1, u.value && (u.value.label = ""), n.value = !1, await v.value(null);
|
|
82
82
|
return;
|
|
83
83
|
}
|
|
84
|
-
t.disableCb || (
|
|
84
|
+
t.disableCb || (o.value = await v.value(e), n.value = !!o.value.length);
|
|
85
85
|
}
|
|
86
|
-
},
|
|
87
|
-
t.onOptionSelectedCb && t.onOptionSelectedCb(e), t.cleanupOnClose && (
|
|
86
|
+
}, y = (e, l) => {
|
|
87
|
+
t.onOptionSelectedCb && t.onOptionSelectedCb(e), t.cleanupOnClose && (o.value = []), b.value = !0, i.value = e.label, u.value = e, n.value = !1, h.value = l;
|
|
88
88
|
}, D = () => {
|
|
89
|
-
|
|
89
|
+
o.value.length && t.keepState !== "closed" && (n.value = !0);
|
|
90
90
|
};
|
|
91
91
|
return f(
|
|
92
92
|
u,
|
|
@@ -95,19 +95,19 @@ const Q = ["innerHTML"], le = /* @__PURE__ */ P({
|
|
|
95
95
|
},
|
|
96
96
|
{ immediate: !0 }
|
|
97
97
|
), f(h, (e) => {
|
|
98
|
-
if (e === -1 || !
|
|
99
|
-
const l =
|
|
100
|
-
|
|
98
|
+
if (e === -1 || !o.value.length) return;
|
|
99
|
+
const l = o.value[e];
|
|
100
|
+
b.value && l.label === u.value?.label || y(l, e);
|
|
101
101
|
}), f(
|
|
102
102
|
() => t.keepState,
|
|
103
103
|
(e) => {
|
|
104
|
-
e === "closed" ? (n.value = !1, t.cleanupOnClose && (
|
|
104
|
+
e === "closed" ? (n.value = !1, t.cleanupOnClose && (o.value = [])) : e === "open" && o.value.length && (n.value = !0);
|
|
105
105
|
}
|
|
106
106
|
), f(n, (e) => {
|
|
107
107
|
r("update:dropdownState", e);
|
|
108
108
|
}), S({
|
|
109
109
|
select: () => {
|
|
110
|
-
|
|
110
|
+
C.value?.select();
|
|
111
111
|
}
|
|
112
112
|
}), (e, l) => (w(), g(j, {
|
|
113
113
|
class: H(e.$attrs["root-classes"]),
|
|
@@ -120,24 +120,24 @@ const Q = ["innerHTML"], le = /* @__PURE__ */ P({
|
|
|
120
120
|
{
|
|
121
121
|
"uikit-mt-10px !uikit-border !uikit-border-w-secondary !uikit-rounded-xs": !t.theme
|
|
122
122
|
},
|
|
123
|
-
|
|
123
|
+
M.value,
|
|
124
124
|
"!uikit-max-h-[210px] uikit-z-30",
|
|
125
125
|
t.dropdownClasses
|
|
126
126
|
],
|
|
127
127
|
"open-dropdown": n.value,
|
|
128
|
-
"keep-state": !
|
|
128
|
+
"keep-state": !o.value.length || t.keepState === "closed" ? "closed" : "opened",
|
|
129
129
|
"close-when-clicked-outside": t.closeDropdownOnBodyPressed,
|
|
130
130
|
"activate-keyboard-controller": !1,
|
|
131
|
-
"onUpdate:dropdownState": l[3] || (l[3] = (
|
|
132
|
-
onClick: l[4] || (l[4] = (
|
|
131
|
+
"onUpdate:dropdownState": l[3] || (l[3] = (a) => n.value = a),
|
|
132
|
+
onClick: l[4] || (l[4] = (a) => {
|
|
133
133
|
r("click"), D();
|
|
134
134
|
})
|
|
135
135
|
}, {
|
|
136
|
-
btn_slot:
|
|
136
|
+
btn_slot: c(() => [
|
|
137
137
|
A(W, {
|
|
138
138
|
id: e.$attrs.id ? `ac_input_${e.$attrs.id}` : "",
|
|
139
139
|
ref_key: "baseInput",
|
|
140
|
-
ref:
|
|
140
|
+
ref: C,
|
|
141
141
|
"data-cy": t.dataCy ? `ac_input_${t.dataCy}` : `ac_input_${e.$attrs.id}`,
|
|
142
142
|
"label-text": t.label,
|
|
143
143
|
"model-value": i.value,
|
|
@@ -151,32 +151,37 @@ const Q = ["innerHTML"], le = /* @__PURE__ */ P({
|
|
|
151
151
|
t.inputClasses,
|
|
152
152
|
"!uikit-ml-0 !uikit-w-full"
|
|
153
153
|
],
|
|
154
|
-
"fieldset-classes": [
|
|
155
|
-
"onUpdate:modelValue": l[0] || (l[0] = (
|
|
156
|
-
onKeydown: l[1] || (l[1] = (
|
|
154
|
+
"fieldset-classes": [I.value, t.fieldsetClasses],
|
|
155
|
+
"onUpdate:modelValue": l[0] || (l[0] = (a) => x(a === void 0 ? "" : `${a}`)),
|
|
156
|
+
onKeydown: l[1] || (l[1] = (a) => r("keydown", a)),
|
|
157
157
|
onKeydownEnterPressed: l[2] || (l[2] = () => r("keydownEnterPressed"))
|
|
158
158
|
}, {
|
|
159
|
-
leftIcon:
|
|
160
|
-
|
|
159
|
+
leftIcon: c(() => [
|
|
160
|
+
p(e.$slots, "lefticon")
|
|
161
161
|
]),
|
|
162
|
-
righticon:
|
|
163
|
-
|
|
162
|
+
righticon: c(({ handleClean: a }) => [
|
|
163
|
+
p(e.$slots, "righticon", { handleClean: a })
|
|
164
164
|
]),
|
|
165
165
|
_: 3
|
|
166
166
|
}, 8, ["id", "data-cy", "label-text", "model-value", "is-valid", "disabled", "placeholder", "with-left-icon", "with-right-icon", "input-class", "fieldset-classes"])
|
|
167
167
|
]),
|
|
168
|
-
default:
|
|
169
|
-
(w(!0), K(T, null, z(
|
|
170
|
-
key:
|
|
171
|
-
active: N(m) ===
|
|
168
|
+
default: c(() => [
|
|
169
|
+
(w(!0), K(T, null, z(o.value, (a, s) => (w(), g(G, {
|
|
170
|
+
key: s,
|
|
171
|
+
active: N(m) === s,
|
|
172
172
|
class: "uikit-m-1 uikit-rounded-[5px] uikit-px-5 uikit-py-10px hover:uikit-cursor-pointer",
|
|
173
|
-
onClick: (E) =>
|
|
174
|
-
onMouseover: (E) => m.value =
|
|
173
|
+
onClick: (E) => y(a, s),
|
|
174
|
+
onMouseover: (E) => m.value = s
|
|
175
175
|
}, {
|
|
176
|
-
default:
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
176
|
+
default: c(() => [
|
|
177
|
+
p(e.$slots, "item-content", {
|
|
178
|
+
option: a,
|
|
179
|
+
idx: s
|
|
180
|
+
}, () => [
|
|
181
|
+
U("span", {
|
|
182
|
+
innerHTML: a.label
|
|
183
|
+
}, null, 8, Q)
|
|
184
|
+
])
|
|
180
185
|
]),
|
|
181
186
|
_: 2
|
|
182
187
|
}, 1032, ["active", "onClick", "onMouseover"]))), 128))
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from '../UIKit/types';
|
|
2
|
+
export type { AccordionItemDecorated, AccordionItem, } from '../UIKit/Accordion/BaseAccordion';
|
|
3
|
+
export type { CheckboxGroupProps, CheckboxButtonType, } from '../UIKit/Checkbox/CheckboxGroup';
|
|
4
|
+
export type { BaseTabProps } from '../UIKit/Tab/BaseTabView';
|
|
5
|
+
export type { RadioButtonType } from '../UIKit/Radio/RadioGroup';
|
|
6
|
+
export type { AccessibleSelectOptions } from '../UIKit/AccessibleSelect';
|
|
7
|
+
export type { BaseComplexToggleProps, ToggleType, } from '../UIKit/BaseComplexToggle';
|
|
8
|
+
export type { SnackbarProps } from '../UIKit/BaseSnackbar';
|
|
9
|
+
export type { ChartOptions, ChartData } from 'chart.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wikicasa-dev/components",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.2",
|
|
4
4
|
"description": "Wikicasa frontend components",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
],
|
|
14
14
|
"exports": {
|
|
15
15
|
".": {
|
|
16
|
-
"types": "./dist/index.d.ts",
|
|
16
|
+
"types": "./dist/types/index.d.ts",
|
|
17
17
|
"default": "./dist/index.js"
|
|
18
18
|
},
|
|
19
19
|
"./style": "./dist/assets/tailwind.css",
|
|
File without changes
|