@wikicasa-dev/components 2.6.8 → 2.6.9-alpha.1
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/BaseAutocomplete.vue.js +37 -35
- package/dist/UIKit/BaseInput.d.ts +58 -60
- package/dist/UIKit/BaseInput.js +2 -2
- package/dist/assets/BaseInput2.css +1 -1
- package/dist/index.d.ts +1 -0
- 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 +1 -1
- /package/dist/assets/{swiper-thumbs.css → swiper-keyboard.css} +0 -0
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { defineComponent as x, useModel as F, shallowRef as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import { defineComponent as x, useModel as F, shallowRef as s, useTemplateRef as L, computed as k, onBeforeMount as T, watch as f, openBlock as w, createBlock as y, normalizeClass as H, withCtx as c, createElementBlock as K, Fragment as R, renderList as z, unref as N, renderSlot as p, createElementVNode as U, createVNode as A, mergeModels as $ } from "vue";
|
|
2
|
+
import W from "./BaseInput.js";
|
|
3
|
+
import j from "./BaseDropDown.vue.js";
|
|
4
4
|
import '../assets/BaseDropDown.css';/* empty css */
|
|
5
|
-
import { debounce as
|
|
6
|
-
import
|
|
7
|
-
import { useKeyboardController as
|
|
8
|
-
const
|
|
5
|
+
import { debounce as q } from "@wikicasa-dev/utilities";
|
|
6
|
+
import G from "./BaseSelect/SelectItem.vue.js";
|
|
7
|
+
import { useKeyboardController as J } from "@wikicasa-dev/vue-composables";
|
|
8
|
+
const Q = ["innerHTML"], ae = /* @__PURE__ */ x({
|
|
9
9
|
__name: "BaseAutocomplete",
|
|
10
|
-
props: /* @__PURE__ */
|
|
10
|
+
props: /* @__PURE__ */ $({
|
|
11
11
|
isValid: { type: [Boolean, null], default: null },
|
|
12
12
|
theme: { default: "" },
|
|
13
13
|
label: { default: "" },
|
|
@@ -29,13 +29,13 @@ const J = ["innerHTML"], ne = /* @__PURE__ */ x({
|
|
|
29
29
|
},
|
|
30
30
|
modelModifiers: {}
|
|
31
31
|
}),
|
|
32
|
-
emits: /* @__PURE__ */
|
|
33
|
-
setup(t, { expose:
|
|
34
|
-
const u = F(t, "modelValue"),
|
|
35
|
-
|
|
36
|
-
v.value =
|
|
32
|
+
emits: /* @__PURE__ */ $(["update:dropdownState", "changedValue", "click", "keydown", "keydownEnterPressed"], ["update:modelValue"]),
|
|
33
|
+
setup(t, { expose: g, emit: V }) {
|
|
34
|
+
const u = F(t, "modelValue"), d = V, i = s(""), o = s([]), v = s(null), b = s(!1), n = s(!1), B = L("baseInput"), S = k(() => o.value.length);
|
|
35
|
+
T(() => {
|
|
36
|
+
v.value = q({ delay: 300 }, t.onInputChangeCb);
|
|
37
37
|
});
|
|
38
|
-
const { activeIdx: m, selectedIdx: h } =
|
|
38
|
+
const { activeIdx: m, selectedIdx: h } = J({
|
|
39
39
|
optionsLength: S,
|
|
40
40
|
isDropdownOpen: n,
|
|
41
41
|
disableSpaceHandler: !0
|
|
@@ -74,14 +74,14 @@ const J = ["innerHTML"], ne = /* @__PURE__ */ x({
|
|
|
74
74
|
return "";
|
|
75
75
|
}
|
|
76
76
|
}), D = async (e) => {
|
|
77
|
-
if (i.value !== e && (
|
|
77
|
+
if (i.value !== e && (d("changedValue", e), i.value = e, !!t.onInputChangeCb)) {
|
|
78
78
|
if (!e || b.value) {
|
|
79
79
|
o.value = [], b.value = !1, h.value = -1, m.value = -1, u.value && (u.value.label = ""), n.value = !1, await v.value?.(null);
|
|
80
80
|
return;
|
|
81
81
|
}
|
|
82
82
|
t.disableCb || (o.value = await v.value?.(e) || [], n.value = !!o.value.length);
|
|
83
83
|
}
|
|
84
|
-
},
|
|
84
|
+
}, C = (e, l) => {
|
|
85
85
|
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;
|
|
86
86
|
}, E = () => {
|
|
87
87
|
o.value.length && t.keepState !== "closed" && (n.value = !0);
|
|
@@ -95,19 +95,19 @@ const J = ["innerHTML"], ne = /* @__PURE__ */ x({
|
|
|
95
95
|
), f(h, (e) => {
|
|
96
96
|
if (e === -1 || !o.value.length) return;
|
|
97
97
|
const l = o.value[e];
|
|
98
|
-
b.value && l.label === u.value?.label ||
|
|
98
|
+
b.value && l.label === u.value?.label || C(l, e);
|
|
99
99
|
}), f(
|
|
100
100
|
() => t.keepState,
|
|
101
101
|
(e) => {
|
|
102
102
|
e === "closed" ? (n.value = !1, t.cleanupOnClose && (o.value = [])) : e === "open" && o.value.length && (n.value = !0);
|
|
103
103
|
}
|
|
104
104
|
), f(n, (e) => {
|
|
105
|
-
|
|
106
|
-
}),
|
|
105
|
+
d("update:dropdownState", e);
|
|
106
|
+
}), g({
|
|
107
107
|
select: () => {
|
|
108
|
-
|
|
108
|
+
B.value?.select();
|
|
109
109
|
}
|
|
110
|
-
}), (e, l) => (w(),
|
|
110
|
+
}), (e, l) => (w(), y(j, {
|
|
111
111
|
class: H(["uikit-autocomplete", e.$attrs["root-classes"]]),
|
|
112
112
|
"data-cy": t.dataCy ? t.dataCy : `ac_${e.$attrs.id}`,
|
|
113
113
|
"dropdown-element": "ul",
|
|
@@ -128,14 +128,13 @@ const J = ["innerHTML"], ne = /* @__PURE__ */ x({
|
|
|
128
128
|
"activate-keyboard-controller": !1,
|
|
129
129
|
"onUpdate:open": l[3] || (l[3] = (a) => n.value = a),
|
|
130
130
|
onClick: l[4] || (l[4] = (a) => {
|
|
131
|
-
|
|
131
|
+
d("click"), E();
|
|
132
132
|
})
|
|
133
133
|
}, {
|
|
134
134
|
btn_slot: c(() => [
|
|
135
|
-
A(
|
|
135
|
+
A(W, {
|
|
136
136
|
id: e.$attrs.id ? `ac_input_${e.$attrs.id}` : "",
|
|
137
|
-
|
|
138
|
-
ref: C,
|
|
137
|
+
ref: "baseInput",
|
|
139
138
|
"data-cy": t.dataCy ? `ac_input_${t.dataCy}` : `ac_input_${e.$attrs.id}`,
|
|
140
139
|
"label-text": t.label,
|
|
141
140
|
"model-value": i.value,
|
|
@@ -151,8 +150,8 @@ const J = ["innerHTML"], ne = /* @__PURE__ */ x({
|
|
|
151
150
|
],
|
|
152
151
|
"fieldset-classes": [I.value, t.fieldsetClasses],
|
|
153
152
|
"onUpdate:modelValue": l[0] || (l[0] = (a) => D(a === void 0 ? "" : `${a}`)),
|
|
154
|
-
onKeydown: l[1] || (l[1] = (a) =>
|
|
155
|
-
onKeydownEnterPressed: l[2] || (l[2] = () =>
|
|
153
|
+
onKeydown: l[1] || (l[1] = (a) => d("keydown", a)),
|
|
154
|
+
onKeydownEnterPressed: l[2] || (l[2] = () => d("keydownEnterPressed"))
|
|
156
155
|
}, {
|
|
157
156
|
leftIcon: c(() => [
|
|
158
157
|
p(e.$slots, "lefticon")
|
|
@@ -164,21 +163,24 @@ const J = ["innerHTML"], ne = /* @__PURE__ */ x({
|
|
|
164
163
|
}, 8, ["id", "data-cy", "label-text", "model-value", "is-valid", "disabled", "placeholder", "with-left-icon", "with-right-icon", "input-class", "fieldset-classes"])
|
|
165
164
|
]),
|
|
166
165
|
default: c(() => [
|
|
167
|
-
(w(!0), K(
|
|
168
|
-
key:
|
|
169
|
-
active: N(m) ===
|
|
166
|
+
(w(!0), K(R, null, z(o.value, (a, r) => (w(), y(G, {
|
|
167
|
+
key: r,
|
|
168
|
+
active: N(m) === r,
|
|
170
169
|
class: "uikit-m-1 uikit-rounded-[5px] uikit-px-5 uikit-py-10px hover:uikit-cursor-pointer",
|
|
171
|
-
onClick: (P) =>
|
|
172
|
-
|
|
170
|
+
onClick: (P) => C(
|
|
171
|
+
a,
|
|
172
|
+
r
|
|
173
|
+
),
|
|
174
|
+
onMouseover: (P) => m.value = r
|
|
173
175
|
}, {
|
|
174
176
|
default: c(() => [
|
|
175
177
|
p(e.$slots, "option-content", {
|
|
176
178
|
option: a,
|
|
177
|
-
idx:
|
|
179
|
+
idx: r
|
|
178
180
|
}, () => [
|
|
179
181
|
U("span", {
|
|
180
182
|
innerHTML: a.label
|
|
181
|
-
}, null, 8,
|
|
183
|
+
}, null, 8, Q)
|
|
182
184
|
])
|
|
183
185
|
]),
|
|
184
186
|
_: 2
|
|
@@ -189,5 +191,5 @@ const J = ["innerHTML"], ne = /* @__PURE__ */ x({
|
|
|
189
191
|
}
|
|
190
192
|
});
|
|
191
193
|
export {
|
|
192
|
-
|
|
194
|
+
ae as default
|
|
193
195
|
};
|
|
@@ -1,65 +1,63 @@
|
|
|
1
|
-
import { Nullable,
|
|
1
|
+
import { InputTypeHTMLAttribute, Nullable, Numberish } from '@wikicasa-dev/types';
|
|
2
2
|
import { ClassType, ClassTypeProp, FeedbackLabels } from './types';
|
|
3
|
-
type
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
isValid?: Nullable<boolean>;
|
|
9
|
-
keepFloatingLabel?: boolean;
|
|
10
|
-
formatter?: Nullable<Partial<{
|
|
11
|
-
formatFn: (n: number | string) => string;
|
|
12
|
-
unFormatFn: (v: string) => string | number | null;
|
|
13
|
-
}>>;
|
|
14
|
-
labelClasses?: ClassTypeProp;
|
|
15
|
-
fieldsetClasses?: ClassTypeProp;
|
|
16
|
-
labelTextClasses?: ClassTypeProp;
|
|
17
|
-
withLeftIcon?: boolean;
|
|
18
|
-
withRightIcon?: boolean;
|
|
19
|
-
dataCy?: string;
|
|
20
|
-
};
|
|
21
|
-
type __VLS_ModelProps = {
|
|
22
|
-
modelValue?: string | number | undefined;
|
|
23
|
-
};
|
|
24
|
-
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
25
|
-
declare var __VLS_1: {}, __VLS_3: {
|
|
26
|
-
handleClean: () => void;
|
|
27
|
-
handleShowPasswd: () => void;
|
|
28
|
-
curType: InputTypeHTMLAttribute;
|
|
29
|
-
}, __VLS_10: {}, __VLS_12: {};
|
|
30
|
-
type __VLS_Slots = {} & {
|
|
31
|
-
leftIcon?: (props: typeof __VLS_1) => any;
|
|
32
|
-
} & {
|
|
33
|
-
righticon?: (props: typeof __VLS_3) => any;
|
|
34
|
-
} & {
|
|
35
|
-
feedback?: (props: typeof __VLS_10) => any;
|
|
36
|
-
} & {
|
|
37
|
-
'under-label'?: (props: typeof __VLS_12) => any;
|
|
38
|
-
};
|
|
39
|
-
declare const __VLS_base: import('vue').DefineComponent<__VLS_PublicProps, {
|
|
40
|
-
select: () => void;
|
|
41
|
-
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
42
|
-
"update:modelValue": (value: string | number | undefined) => any;
|
|
43
|
-
click: (args_0: MouseEvent) => any;
|
|
44
|
-
keydown: (args_0: KeyboardEvent) => any;
|
|
45
|
-
focusin: () => any;
|
|
46
|
-
focusout: () => any;
|
|
47
|
-
keyup: (args_0: KeyboardEvent) => any;
|
|
48
|
-
keydownEnterPressed: () => any;
|
|
49
|
-
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
50
|
-
"onUpdate:modelValue"?: ((value: string | number | undefined) => any) | undefined;
|
|
51
|
-
onClick?: ((args_0: MouseEvent) => any) | undefined;
|
|
52
|
-
onKeydown?: ((args_0: KeyboardEvent) => any) | undefined;
|
|
53
|
-
onFocusin?: (() => any) | undefined;
|
|
54
|
-
onFocusout?: (() => any) | undefined;
|
|
55
|
-
onKeyup?: ((args_0: KeyboardEvent) => any) | undefined;
|
|
56
|
-
onKeydownEnterPressed?: (() => any) | undefined;
|
|
57
|
-
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
58
|
-
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
3
|
+
export type BaseInputModelValue = Numberish | undefined;
|
|
4
|
+
export type BaseInputFormatter<ModelValue extends BaseInputModelValue> = Partial<{
|
|
5
|
+
formatFn: (value: string) => string;
|
|
6
|
+
unFormatFn: (value: string) => Nullable<ModelValue>;
|
|
7
|
+
}>;
|
|
59
8
|
declare const _default: typeof __VLS_export;
|
|
60
9
|
export default _default;
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
10
|
+
declare const __VLS_export: <ModelValue extends BaseInputModelValue = string>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
11
|
+
props: import('vue').PublicProps & __VLS_PrettifyLocal<({
|
|
12
|
+
id?: string;
|
|
13
|
+
inputClass?: ClassType | ClassType[];
|
|
14
|
+
labelText?: string;
|
|
15
|
+
feedback?: FeedbackLabels;
|
|
16
|
+
isValid?: Nullable<boolean>;
|
|
17
|
+
keepFloatingLabel?: boolean;
|
|
18
|
+
formatter?: Nullable<BaseInputFormatter<ModelValue>>;
|
|
19
|
+
labelClasses?: ClassTypeProp;
|
|
20
|
+
fieldsetClasses?: ClassTypeProp;
|
|
21
|
+
labelTextClasses?: ClassTypeProp;
|
|
22
|
+
withLeftIcon?: boolean;
|
|
23
|
+
withRightIcon?: boolean;
|
|
24
|
+
dataCy?: string;
|
|
25
|
+
} & {
|
|
26
|
+
modelValue?: ModelValue;
|
|
27
|
+
}) & {
|
|
28
|
+
"onUpdate:modelValue"?: ((value: ModelValue) => any) | undefined;
|
|
29
|
+
onClick?: ((args_0: MouseEvent) => any) | undefined;
|
|
30
|
+
onKeydown?: ((args_0: KeyboardEvent) => any) | undefined;
|
|
31
|
+
onFocusin?: (() => any) | undefined;
|
|
32
|
+
onFocusout?: (() => any) | undefined;
|
|
33
|
+
onKeyup?: ((args_0: KeyboardEvent) => any) | undefined;
|
|
34
|
+
onKeydownEnterPressed?: (() => any) | undefined;
|
|
35
|
+
}> & (typeof globalThis extends {
|
|
36
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
37
|
+
} ? P : {});
|
|
38
|
+
expose: (exposed: import('vue').ShallowUnwrapRef<{
|
|
39
|
+
select: () => void;
|
|
40
|
+
}>) => void;
|
|
41
|
+
attrs: any;
|
|
42
|
+
slots: {
|
|
43
|
+
leftIcon?: (props: {}) => any;
|
|
44
|
+
} & {
|
|
45
|
+
righticon?: (props: {
|
|
46
|
+
handleClean: () => void;
|
|
47
|
+
handleShowPasswd: () => void;
|
|
48
|
+
curType: InputTypeHTMLAttribute;
|
|
49
|
+
}) => any;
|
|
50
|
+
} & {
|
|
51
|
+
feedback?: (props: {}) => any;
|
|
52
|
+
} & {
|
|
53
|
+
'under-label'?: (props: {}) => any;
|
|
64
54
|
};
|
|
55
|
+
emit: (((evt: "click", args_0: MouseEvent) => void) & ((evt: "keydown", args_0: KeyboardEvent) => void) & ((evt: "focusin") => void) & ((evt: "focusout") => void) & ((evt: "keyup", args_0: KeyboardEvent) => void) & ((evt: "keydownEnterPressed") => void)) & ((event: "update:modelValue", value: ModelValue) => void);
|
|
56
|
+
}>) => import('vue').VNode & {
|
|
57
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
65
58
|
};
|
|
59
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? {
|
|
60
|
+
[K in keyof T]: T[K];
|
|
61
|
+
} : {
|
|
62
|
+
[K in keyof T as K]: T[K];
|
|
63
|
+
}) & {};
|
package/dist/UIKit/BaseInput.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./BaseInput.vue.js";
|
|
2
2
|
import '../assets/BaseInput2.css';/* empty css */
|
|
3
3
|
import t from "../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const e = /* @__PURE__ */ t(o, [["__scopeId", "data-v-5a2b700e"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
e as default
|
|
7
7
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.input-wrapper[data-v-
|
|
1
|
+
.input-wrapper[data-v-5a2b700e]{--icon-default-size: 44px}.invalid-bg[data-v-5a2b700e]{--invalid-img: url(data:image/svg+xml;charset=utf-8;base64,PHN2ZyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnIHdpZHRoPScxMicgaGVpZ2h0PScxMicgZmlsbD0nbm9uZScgc3Ryb2tlPScjRkE0RjY0Jz48Y2lyY2xlIGN4PSc2JyBjeT0nNicgcj0nNC41Jy8+PHBhdGggc3Ryb2tlLWxpbmVqb2luPSdyb3VuZCcgZD0nTTUuOCAzLjZoLjRMNiA2LjV6Jy8+PGNpcmNsZSBjeD0nNicgY3k9JzguMicgcj0nLjYnIGZpbGw9JyNGQTRGNjQnIHN0cm9rZT0nbm9uZScvPjwvc3ZnPg==);background-image:var(--invalid-img)}.valid-bg[data-v-5a2b700e]{--valid-img: url(data:image/svg+xml;charset=utf-8;base64,PHN2ZyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnIHZpZXdCb3g9JzAgMCA4IDgnPjxwYXRoIGZpbGw9JyMyQjVERkYnIGQ9J00yLjMgNi43My42IDQuNTNjLS40LTEuMDQuNDYtMS40IDEuMS0uOGwxLjEgMS40IDMuNC0zLjhjLjYtLjYzIDEuNi0uMjcgMS4yLjdsLTQgNC42Yy0uNDMuNS0uOC40LTEuMS4xeicvPjwvc3ZnPg==);background-image:var(--valid-img)}.invalid-bg[data-v-5a2b700e],.valid-bg[data-v-5a2b700e]{background-position:top 10px right 12px;background-size:20px}.has-right-icon[data-v-5a2b700e]>label.inline-label{right:var(--icon-default-size)}.has-left-icon[data-v-5a2b700e]>label.inline-label{left:var(--icon-default-size)}[data-v-5a2b700e] .text-input-icon{position:absolute;z-index:20;box-sizing:border-box;--icon-size-sm: 16px;--icon-size-md: 20px;--icon-size-lg: 25px}[data-v-5a2b700e] .text-input-icon.left{left:5px}[data-v-5a2b700e] .text-input-icon.right{right:5px}[data-v-5a2b700e] .text-input-icon{--icon-top: 5px;--icon-size: var(--icon-size-sm);width:var(--icon-default-size);height:var(--icon-default-size);padding:calc((var(--icon-default-size) - var(--icon-size)) / 2);top:var(--icon-top)}[data-v-5a2b700e] .text-input-icon.md{--icon-size: var(--icon-size-md)}[data-v-5a2b700e] .text-input-icon.lg{--icon-top: 0;--icon-size: var(--icon-size-lg)}.under-label[data-v-5a2b700e]{left:4px;font-style:italic}
|
package/dist/index.d.ts
CHANGED
|
@@ -34,6 +34,7 @@ export { default as BaseComplexToggle } from './UIKit/BaseComplexToggle';
|
|
|
34
34
|
export { default as BaseDropDown } from './UIKit/BaseDropDown';
|
|
35
35
|
export { default as BaseFloatingLabel } from './UIKit/BaseFloatingLabel';
|
|
36
36
|
export { default as BaseInput } from './UIKit/BaseInput';
|
|
37
|
+
export type { BaseInputModelValue, BaseInputFormatter, } from './UIKit/BaseInput';
|
|
37
38
|
export { default as BasePagination } from './UIKit/BasePagination';
|
|
38
39
|
export { default as BaseSlider } from './UIKit/BaseSlider';
|
|
39
40
|
export { default as BaseTextarea } from './UIKit/BaseTextarea';
|
package/package.json
CHANGED
|
File without changes
|