@wikicasa-dev/components 2.1.4-alpha.1 → 2.1.4-alpha.10
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/BaseBadge.d.ts +2 -2
- package/dist/UIKit/BasePin.d.ts +22 -0
- package/dist/UIKit/BaseSelect.d.ts +26 -0
- package/dist/UIKit/BaseSelect.js +5 -0
- package/dist/UIKit/BaseTextarea.js +2 -2
- package/dist/assets/packages/components/lib/UIKit/BaseAlert.css +1 -1
- package/dist/assets/packages/components/lib/UIKit/BaseBadge.css +1 -1
- package/dist/assets/packages/components/lib/UIKit/BaseComplexToggle.css +1 -1
- package/dist/assets/packages/components/lib/UIKit/{NativeSelect.css → BaseSelect.css} +1 -1
- package/dist/assets/packages/components/lib/UIKit/BaseTextarea.css +1 -1
- package/dist/assets/packages/components/src/tailwind.css +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +93 -87
- package/dist/packages/components/lib/UIKit/AccessibleSelect.vue.js +20 -20
- package/dist/packages/components/lib/UIKit/BaseBadge.vue.js +5 -5
- package/dist/packages/components/lib/UIKit/BaseBanner.vue.js +9 -9
- package/dist/packages/components/lib/UIKit/BaseButton.vue.js +15 -15
- package/dist/packages/components/lib/UIKit/BaseFloatingLabel.vue.js +4 -4
- package/dist/packages/components/lib/UIKit/BaseInput.vue.js +8 -8
- package/dist/packages/components/lib/UIKit/{NativeSelect.vue.js → BaseSelect.vue.js} +12 -12
- package/dist/packages/components/lib/UIKit/BaseTextarea.vue.js +8 -8
- package/dist/packages/components/lib/UIKit/BaseUploadFile.vue.js +1 -1
- package/dist/packages/components/lib/UIKit/Checkbox/CheckboxBtn.vue.js +1 -1
- package/dist/packages/components/lib/UIKit/Checkbox/CheckboxGroup.vue.js +7 -9
- package/dist/packages/components/lib/UIKit/DatePicker.vue.js +2 -2
- package/package.json +6 -2
- package/plugins/buttonPlugin.ts +290 -0
- package/dist/UIKit/NativeSelect.js +0 -5
|
@@ -36,27 +36,27 @@ const R = ["id", "innerHTML"], U = ["id", "data-cy", "aria-required", "aria-cont
|
|
|
36
36
|
toggleDropdownModifiers: {}
|
|
37
37
|
}),
|
|
38
38
|
emits: /* @__PURE__ */ $(["click", "update:dropdownState"], ["update:modelValue", "update:toggleDropdown"]),
|
|
39
|
-
setup(
|
|
40
|
-
const h = B, k = M(
|
|
41
|
-
optionsLength:
|
|
39
|
+
setup(r, { emit: B }) {
|
|
40
|
+
const h = B, k = M(r, "modelValue"), g = M(r, "toggleDropdown"), H = A(), t = V(() => r.namespace || H), i = L(!1), I = L(null), f = V(() => !!k.value.label), { activeIdx: v, selectedIdx: D } = q({
|
|
41
|
+
optionsLength: r.options.length,
|
|
42
42
|
isDropdownOpen: i
|
|
43
43
|
}), m = (e) => {
|
|
44
44
|
i.value = !1, k.value = e;
|
|
45
45
|
};
|
|
46
46
|
w(D, (e) => {
|
|
47
|
-
m(
|
|
48
|
-
}), w(
|
|
49
|
-
e && (i.value = !i.value,
|
|
47
|
+
m(r.options[e]), i.value = !1;
|
|
48
|
+
}), w(g, (e) => {
|
|
49
|
+
e && (i.value = !i.value, g.value = !1);
|
|
50
50
|
}), w(i, (e) => {
|
|
51
51
|
h("update:dropdownState", e);
|
|
52
52
|
});
|
|
53
|
-
const
|
|
53
|
+
const y = ({ target: e }) => {
|
|
54
54
|
`${t.value}_btn` !== e.id && (i.value = !1);
|
|
55
55
|
};
|
|
56
56
|
return E(() => {
|
|
57
|
-
|
|
57
|
+
r.closeOnBodyPressed && document.addEventListener("click", y);
|
|
58
58
|
}), P(() => {
|
|
59
|
-
|
|
59
|
+
r.closeOnBodyPressed && document.removeEventListener("click", y);
|
|
60
60
|
}), (e, n) => (a(), s("div", {
|
|
61
61
|
class: l(e.$attrs.class)
|
|
62
62
|
}, [
|
|
@@ -77,7 +77,7 @@ const R = ["id", "innerHTML"], U = ["id", "data-cy", "aria-required", "aria-cont
|
|
|
77
77
|
e.$slots.lefticon ? (a(), s("span", {
|
|
78
78
|
key: 1,
|
|
79
79
|
class: "uikit-z-20 uikit-mt-2 uikit-pl-2",
|
|
80
|
-
onClick: n[0] || (n[0] = p((
|
|
80
|
+
onClick: n[0] || (n[0] = p((u) => i.value = !i.value, ["stop"]))
|
|
81
81
|
}, [
|
|
82
82
|
z(e.$slots, "lefticon")
|
|
83
83
|
])) : d("", !0),
|
|
@@ -97,8 +97,8 @@ const R = ["id", "innerHTML"], U = ["id", "data-cy", "aria-required", "aria-cont
|
|
|
97
97
|
"aria-activedescendant": b(v) >= 0 && i.value ? `${t.value}_element_${e.options[b(v)].label}` : "",
|
|
98
98
|
"aria-invalid": e.isValid === !1,
|
|
99
99
|
"aria-describedby": e.isValid === !1 ? `${t.value}_invalid_msg` : void 0,
|
|
100
|
-
onClick: n[1] || (n[1] = (
|
|
101
|
-
i.value = !i.value, h("click",
|
|
100
|
+
onClick: n[1] || (n[1] = (u) => {
|
|
101
|
+
i.value = !i.value, h("click", u);
|
|
102
102
|
})
|
|
103
103
|
}, [
|
|
104
104
|
o("span", {
|
|
@@ -128,9 +128,9 @@ const R = ["id", "innerHTML"], U = ["id", "data-cy", "aria-required", "aria-cont
|
|
|
128
128
|
"aria-hidden": "true",
|
|
129
129
|
class: l(["uikit-pointer-events-none uikit-absolute uikit-bottom-0 uikit-left-0 uikit-right-0 uikit-m-0 uikit-box-border uikit-h-12 uikit-cursor-pointer uikit-rounded-xs uikit-bg-white uikit-px-2 uikit-py-0 peer-focus:uikit-border-2", [
|
|
130
130
|
e.fieldsetClasses,
|
|
131
|
-
e.isValid ? "uikit-border-w-
|
|
131
|
+
e.isValid ? "uikit-border-w-pink" : e.isValid === !1 ? "uikit-border-w-danger" : "uikit-border-w-lightgray",
|
|
132
132
|
{
|
|
133
|
-
"peer-aria-invalid:uikit-border-w-danger uikit-border uikit-border-solid peer-focus:uikit-border-w-
|
|
133
|
+
"peer-aria-invalid:uikit-border-w-danger uikit-border uikit-border-solid peer-focus:uikit-border-w-pink peer-focus-visible:uikit-border-2 peer-focus-visible:uikit-border-w-pink": e.border
|
|
134
134
|
},
|
|
135
135
|
{ "uikit-border-0 peer-focus:uikit-border-0": !e.border }
|
|
136
136
|
]])
|
|
@@ -162,13 +162,13 @@ const R = ["id", "innerHTML"], U = ["id", "data-cy", "aria-required", "aria-cont
|
|
|
162
162
|
onClick: n[3] || (n[3] = p(() => {
|
|
163
163
|
}, ["stop"]))
|
|
164
164
|
}, [
|
|
165
|
-
(a(!0), s(T, null, S(e.options, (
|
|
165
|
+
(a(!0), s(T, null, S(e.options, (u, c) => (a(), s("li", {
|
|
166
166
|
id: `${t.value}_element_${e.options[c].label}`,
|
|
167
|
-
key: `${
|
|
167
|
+
key: `${u.label}_${c}`,
|
|
168
168
|
role: "option",
|
|
169
169
|
"aria-selected": b(v) === c,
|
|
170
170
|
class: l(["uikit-px-20px uikit-m-1 uikit-cursor-pointer uikit-py-xs uikit-text aria-selected:uikit-rounded-xs aria-selected:uikit-bg-w-cultured", e.dropdownItemClasses]),
|
|
171
|
-
onClick: p((C) => m(
|
|
171
|
+
onClick: p((C) => m(u), ["stop"]),
|
|
172
172
|
onMouseover: p((C) => v.value = c, ["stop"]),
|
|
173
173
|
onBlur: n[2] || (n[2] = p(() => {
|
|
174
174
|
}, ["stop"]))
|
|
@@ -179,11 +179,11 @@ const R = ["id", "innerHTML"], U = ["id", "data-cy", "aria-required", "aria-cont
|
|
|
179
179
|
class: "uikit-m-0 uikit-appearance-none",
|
|
180
180
|
name: `${t.value}_radio`,
|
|
181
181
|
type: "radio",
|
|
182
|
-
checked:
|
|
183
|
-
onInput: p((C) => m(
|
|
182
|
+
checked: u.label === k.value.label,
|
|
183
|
+
onInput: p((C) => m(u), ["stop"])
|
|
184
184
|
}, null, 40, Z),
|
|
185
185
|
o("span", {
|
|
186
|
-
innerHTML:
|
|
186
|
+
innerHTML: u.label
|
|
187
187
|
}, null, 8, x)
|
|
188
188
|
])
|
|
189
189
|
], 42, X))), 128))
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as a, createElementBlock as t, openBlock as u, normalizeClass as
|
|
1
|
+
import { defineComponent as a, createElementBlock as t, openBlock as u, normalizeClass as d, renderSlot as r } from "vue";
|
|
2
2
|
const l = /* @__PURE__ */ a({
|
|
3
3
|
__name: "BaseBadge",
|
|
4
4
|
props: {
|
|
@@ -25,11 +25,11 @@ const l = /* @__PURE__ */ a({
|
|
|
25
25
|
/**
|
|
26
26
|
* @deprecated Old style
|
|
27
27
|
*/
|
|
28
|
-
"primary-sm": "uikit-badge-w-
|
|
28
|
+
"primary-sm": "uikit-badge-w-pink-sm",
|
|
29
29
|
/**
|
|
30
30
|
* @deprecated Old style
|
|
31
31
|
*/
|
|
32
|
-
"dark-primary": "uikit-badge-w-
|
|
32
|
+
"dark-primary": "uikit-badge-w-darkblue",
|
|
33
33
|
/**
|
|
34
34
|
* @deprecated Old style
|
|
35
35
|
*/
|
|
@@ -43,9 +43,9 @@ const l = /* @__PURE__ */ a({
|
|
|
43
43
|
discount: "uikit-badge-discount"
|
|
44
44
|
};
|
|
45
45
|
return (i, s) => (u(), t("span", {
|
|
46
|
-
class:
|
|
46
|
+
class: d(["uikit-badge uikit-rounded-2xs uikit-px-xs uikit-py-2xs uikit-text uikit-font-medium uikit-shadow-sm", e[i.badgeClass]])
|
|
47
47
|
}, [
|
|
48
|
-
|
|
48
|
+
r(i.$slots, "default")
|
|
49
49
|
], 2));
|
|
50
50
|
}
|
|
51
51
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as d, createElementBlock as
|
|
1
|
+
import { defineComponent as d, createElementBlock as k, openBlock as e, normalizeClass as m, createElementVNode as a, renderSlot as o, createVNode as t, createBlock as s, resolveDynamicComponent as r, withCtx as l, createTextVNode as u, toDisplayString as n } from "vue";
|
|
2
2
|
import c from "./BaseBanner/Background/BaseBannerBgElement1.vue.js";
|
|
3
3
|
import b from "./BaseBanner/Background/BaseBannerBgElement2.vue.js";
|
|
4
4
|
import h from "./BaseBanner/Background/BaseBannerBgElement3.vue.js";
|
|
@@ -15,30 +15,30 @@ const f = ["aria-label"], g = { class: "uikit-relative uikit-z-[2]" }, v = { cla
|
|
|
15
15
|
bannerClass: {}
|
|
16
16
|
},
|
|
17
17
|
setup(C) {
|
|
18
|
-
return (i,
|
|
18
|
+
return (i, _) => (e(), k("section", {
|
|
19
19
|
"aria-label": i.ariaLabel,
|
|
20
|
-
class:
|
|
20
|
+
class: m([
|
|
21
21
|
"uikit-relative uikit-overflow-hidden uikit-rounded-xs uikit-p-md uikit-text-white sm:uikit-p-lg",
|
|
22
|
-
i.bannerClass === "secondary" ? "uikit-bg-w-blue" : "uikit-bg-w-
|
|
22
|
+
i.bannerClass === "secondary" ? "uikit-bg-w-blue" : "uikit-bg-w-pink"
|
|
23
23
|
])
|
|
24
24
|
}, [
|
|
25
|
-
|
|
25
|
+
a("div", g, [
|
|
26
26
|
o(i.$slots, "title", {}, () => [
|
|
27
27
|
(e(), s(r(i.headerTag || "h2"), { class: "uikit-m-0 uikit-text-20 max-sm:uikit-mb-xs" }, {
|
|
28
28
|
default: l(() => [
|
|
29
|
-
u(
|
|
29
|
+
u(n(i.title), 1)
|
|
30
30
|
]),
|
|
31
31
|
_: 1
|
|
32
32
|
}))
|
|
33
33
|
]),
|
|
34
34
|
o(i.$slots, "description", {}, () => [
|
|
35
|
-
|
|
35
|
+
a("p", v, n(i.description), 1)
|
|
36
36
|
])
|
|
37
37
|
]),
|
|
38
38
|
o(i.$slots, "cta", {}, () => [
|
|
39
|
-
(e(), s(r(i.ctaComponent || "button"), { class: "uikit-btn uikit-btn-
|
|
39
|
+
(e(), s(r(i.ctaComponent || "button"), { class: "uikit-btn uikit-btn-ternary uikit-relative uikit-z-[2]" }, {
|
|
40
40
|
default: l(() => [
|
|
41
|
-
u(
|
|
41
|
+
u(n(i.ctaLabel), 1)
|
|
42
42
|
]),
|
|
43
43
|
_: 1
|
|
44
44
|
}))
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as f, ref as
|
|
2
|
-
import
|
|
1
|
+
import { defineComponent as f, ref as v, computed as s, createElementBlock as c, openBlock as g, withModifiers as l, normalizeStyle as B, normalizeClass as h, renderSlot as r, createVNode as C } from "vue";
|
|
2
|
+
import w from "../../../../UIKit/StaticSpinner.js";
|
|
3
3
|
const M = ["id", "data-cy", "type", "data-active", "disabled", "aria-label", "title"], S = /* @__PURE__ */ f({
|
|
4
4
|
__name: "BaseButton",
|
|
5
5
|
props: {
|
|
@@ -19,12 +19,12 @@ const M = ["id", "data-cy", "type", "data-active", "disabled", "aria-label", "ti
|
|
|
19
19
|
emits: ["mouseover", "mouseout", "click"],
|
|
20
20
|
setup(a, { emit: u }) {
|
|
21
21
|
const n = u, d = {
|
|
22
|
-
primary: "uikit-btn-
|
|
23
|
-
secondary: "uikit-btn-
|
|
24
|
-
ternary: "uikit-btn-
|
|
25
|
-
quaternary: "uikit-btn-
|
|
26
|
-
warning: "uikit-btn-
|
|
27
|
-
danger: "uikit-btn-
|
|
22
|
+
primary: "uikit-btn-primary",
|
|
23
|
+
secondary: "uikit-btn-secondary",
|
|
24
|
+
ternary: "uikit-btn-ternary",
|
|
25
|
+
quaternary: "uikit-btn-quaternary",
|
|
26
|
+
warning: "uikit-btn-warning",
|
|
27
|
+
danger: "uikit-btn-danger",
|
|
28
28
|
transparent: "uikit-btn-transparent",
|
|
29
29
|
light: "uikit-btn-light",
|
|
30
30
|
"show-more": "uikit-btn-show-more",
|
|
@@ -34,19 +34,19 @@ const M = ["id", "data-cy", "type", "data-active", "disabled", "aria-label", "ti
|
|
|
34
34
|
}, k = {
|
|
35
35
|
sm: "uikit-btn-sm",
|
|
36
36
|
lg: "uikit-btn-lg"
|
|
37
|
-
}, o =
|
|
38
|
-
() => k[a.size]
|
|
37
|
+
}, o = v(!1), b = s(
|
|
38
|
+
() => k[a.size]
|
|
39
39
|
), m = s(() => a.outlined ? "uikit-btn-outline" : ""), p = () => {
|
|
40
40
|
o.value = !0;
|
|
41
41
|
}, y = () => {
|
|
42
42
|
o.value = !1;
|
|
43
43
|
};
|
|
44
|
-
return (t, e) => (g(),
|
|
44
|
+
return (t, e) => (g(), c("button", {
|
|
45
45
|
id: t.$attrs.id,
|
|
46
46
|
"data-cy": t.dataCy,
|
|
47
47
|
type: t.type,
|
|
48
|
-
class:
|
|
49
|
-
"uikit-
|
|
48
|
+
class: h([
|
|
49
|
+
"uikit-btn",
|
|
50
50
|
{
|
|
51
51
|
"uikit-btn-empty": !t.withMinWidth,
|
|
52
52
|
"active uikit-font-medium": t.keepActive,
|
|
@@ -57,7 +57,7 @@ const M = ["id", "data-cy", "type", "data-active", "disabled", "aria-label", "ti
|
|
|
57
57
|
m.value,
|
|
58
58
|
{ "uikit-btn-rounded": t.rounded }
|
|
59
59
|
]),
|
|
60
|
-
style:
|
|
60
|
+
style: B(t.$attrs.style),
|
|
61
61
|
"data-active": t.keepActive,
|
|
62
62
|
disabled: t.isLoading || t.disabled,
|
|
63
63
|
"aria-label": t.ariaLabel,
|
|
@@ -71,7 +71,7 @@ const M = ["id", "data-cy", "type", "data-active", "disabled", "aria-label", "ti
|
|
|
71
71
|
onClick: e[2] || (e[2] = (i) => n("click", i))
|
|
72
72
|
}, [
|
|
73
73
|
t.isLoading ? r(t.$slots, "spinner", { key: 1 }, () => [
|
|
74
|
-
|
|
74
|
+
C(w, {
|
|
75
75
|
"stroke-color": t.outlined ? "#ACB4C3" : "#fff"
|
|
76
76
|
}, null, 8, ["stroke-color"])
|
|
77
77
|
]) : r(t.$slots, "default", {
|
|
@@ -10,23 +10,23 @@ const k = ["for"], b = ["innerHTML"], C = /* @__PURE__ */ o({
|
|
|
10
10
|
labelTextClasses: {}
|
|
11
11
|
},
|
|
12
12
|
emits: ["click"],
|
|
13
|
-
setup(
|
|
13
|
+
setup(p, { emit: a }) {
|
|
14
14
|
const n = a;
|
|
15
15
|
return (e, t) => (s(), i("label", {
|
|
16
16
|
for: e.$attrs.for,
|
|
17
17
|
class: l(["uikit-floating-label uikit-h-5 uikit-pointer-events-none uikit-absolute uikit-left-sm uikit-text-16 uikit-text-w-gray", [e.labelState, { "uikit-text-w-secondary": e.disabled }, e.labelClasses]]),
|
|
18
|
-
onClick: t[0] || (t[0] = r((
|
|
18
|
+
onClick: t[0] || (t[0] = r((f) => n("click"), ["stop"]))
|
|
19
19
|
}, [
|
|
20
20
|
d("span", {
|
|
21
21
|
class: l([{ "uikit-text-w-secondary": e.disabled }, e.labelTextClasses]),
|
|
22
22
|
innerHTML: e.labelText
|
|
23
23
|
}, null, 10, b),
|
|
24
|
-
e.$attrs.required ? (s(), i("
|
|
24
|
+
e.$attrs.required ? (s(), i("span", {
|
|
25
25
|
key: 0,
|
|
26
26
|
class: l(["uikit-absolute -uikit-top-[0.3rem]", [
|
|
27
27
|
{ "uikit-text-w-secondary": e.disabled },
|
|
28
28
|
{ "uikit-text-w-red": e.isValid === !1 },
|
|
29
|
-
{ "uikit-text-w-
|
|
29
|
+
{ "uikit-text-w-pink": (e.isValid || e.isValid === null) && !e.disabled }
|
|
30
30
|
]])
|
|
31
31
|
}, " *", 2)) : u("", !0)
|
|
32
32
|
], 10, k));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as A, mergeModels as L, useModel as N, ref as v, useAttrs as O, useId as j, computed as D, watch as p, createElementBlock as o, openBlock as s, normalizeClass as T, unref as k, renderSlot as m, createElementVNode as G, createBlock as J, createCommentVNode as h, withKeys as Q, withModifiers as
|
|
1
|
+
import { defineComponent as A, mergeModels as L, useModel as N, ref as v, useAttrs as O, useId as j, computed as D, watch as p, createElementBlock as o, openBlock as s, normalizeClass as T, unref as k, renderSlot as m, createElementVNode as G, createBlock as J, createCommentVNode as h, withKeys as Q, withModifiers as g, Fragment as B, renderList as E } from "vue";
|
|
2
2
|
import W from "./BaseFloatingLabel.vue.js";
|
|
3
3
|
import '../../../../assets/packages/components/lib/UIKit/BaseFloatingLabel.css';/* empty css */
|
|
4
4
|
import { useFloatingLabel as X } from "../../../../composables/useFloatingLabel.js";
|
|
@@ -31,7 +31,7 @@ const Y = ["id", "data-cy", "name", "data-validation", "autocomplete", "disabled
|
|
|
31
31
|
const u = N(l, "modelValue"), i = v(""), d = H, {
|
|
32
32
|
labelState: c,
|
|
33
33
|
handleFocusIn: P,
|
|
34
|
-
handleFocusOut:
|
|
34
|
+
handleFocusOut: w,
|
|
35
35
|
setInlineLabel: $,
|
|
36
36
|
setFloatingLabel: V
|
|
37
37
|
} = X(), I = O(), q = j(), r = D(() => I.id || q), n = v("text"), f = v({}), b = v(null), K = () => {
|
|
@@ -80,7 +80,7 @@ const Y = ["id", "data-cy", "name", "data-validation", "autocomplete", "disabled
|
|
|
80
80
|
), p(
|
|
81
81
|
() => l.keepFloatingLabel,
|
|
82
82
|
(e) => {
|
|
83
|
-
e ? V() :
|
|
83
|
+
e ? V() : w(u.value);
|
|
84
84
|
}
|
|
85
85
|
), n.value = I.type || "text", M({
|
|
86
86
|
select: () => {
|
|
@@ -112,7 +112,7 @@ const Y = ["id", "data-cy", "name", "data-validation", "autocomplete", "disabled
|
|
|
112
112
|
ref: b,
|
|
113
113
|
"data-cy": e.dataCy,
|
|
114
114
|
name: e.$attrs.name,
|
|
115
|
-
class: T(["input-element disabled:uikit-text-w-secondary uikit-peer uikit-relative uikit-box-border uikit-block uikit-h-[56px] uikit-w-full uikit-appearance-none uikit-truncate uikit-rounded-2xs uikit-border uikit-border-solid uikit-bg-white uikit-px-sm uikit-pb-0 uikit-pt-md uikit-text-16 uikit-outline-none focus-visible:uikit-border-w-blue disabled:uikit-bg-w-cultured data-[validation='invalid']:uikit-border-w-red data-[validation='valid']:uikit-border-w-blue", [
|
|
115
|
+
class: T(["input-element disabled:uikit-text-w-secondary uikit-peer uikit-relative uikit-box-border uikit-block uikit-h-[56px] uikit-w-full uikit-appearance-none uikit-truncate uikit-rounded-2xs uikit-border uikit-border-solid uikit-border-w-lightgray uikit-bg-white uikit-px-sm uikit-pb-0 uikit-pt-md uikit-text-16 uikit-outline-none focus-visible:uikit-border-w-blue disabled:uikit-bg-w-cultured data-[validation='invalid']:uikit-border-w-red data-[validation='valid']:uikit-border-w-blue", [
|
|
116
116
|
{
|
|
117
117
|
"is-invalid": e.isValid === !1,
|
|
118
118
|
"is-valid": e.isValid
|
|
@@ -133,19 +133,19 @@ const Y = ["id", "data-cy", "name", "data-validation", "autocomplete", "disabled
|
|
|
133
133
|
placeholder: e.$attrs.placeholder,
|
|
134
134
|
value: i.value,
|
|
135
135
|
onClick: a[0] || (a[0] = (t) => d("click", t)),
|
|
136
|
-
onFocusin: a[1] || (a[1] =
|
|
136
|
+
onFocusin: a[1] || (a[1] = g(
|
|
137
137
|
(t) => {
|
|
138
138
|
d("focusin", t), e.labelText && k(P)();
|
|
139
139
|
},
|
|
140
140
|
["stop"]
|
|
141
141
|
)),
|
|
142
|
-
onFocusout: a[2] || (a[2] =
|
|
142
|
+
onFocusout: a[2] || (a[2] = g(
|
|
143
143
|
(t) => {
|
|
144
|
-
d("focusout", t), e.labelText && !e.keepFloatingLabel && k(
|
|
144
|
+
d("focusout", t), e.labelText && !e.keepFloatingLabel && k(w)(i.value);
|
|
145
145
|
},
|
|
146
146
|
["stop"]
|
|
147
147
|
)),
|
|
148
|
-
onInput:
|
|
148
|
+
onInput: g(R, ["stop"]),
|
|
149
149
|
onKeydown: [
|
|
150
150
|
a[3] || (a[3] = Q(() => d("keydownEnterPressed"), ["enter"])),
|
|
151
151
|
a[4] || (a[4] = (t) => d("keydown", t))
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent as x, mergeModels as u, useCssVars as
|
|
2
|
-
const
|
|
3
|
-
__name: "
|
|
1
|
+
import { defineComponent as x, mergeModels as u, useCssVars as w, computed as C, useModel as v, useId as y, watch as S, createElementBlock as a, openBlock as d, createCommentVNode as V, createElementVNode as O, normalizeClass as c, unref as m, toDisplayString as p, Fragment as z, renderList as B } from "vue";
|
|
2
|
+
const E = { class: "select-wrapper" }, D = ["for"], M = ["id"], T = ["data-idx", "selected"], N = /* @__PURE__ */ x({
|
|
3
|
+
__name: "BaseSelect",
|
|
4
4
|
props: /* @__PURE__ */ u({
|
|
5
5
|
labelText: { default: "" },
|
|
6
6
|
options: { default: () => [] },
|
|
@@ -18,10 +18,10 @@ const B = { class: "select-wrapper" }, D = ["for"], M = ["id"], N = ["data-idx",
|
|
|
18
18
|
}),
|
|
19
19
|
emits: /* @__PURE__ */ u(["change"], ["update:modelValue"]),
|
|
20
20
|
setup(o, { emit: f }) {
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
w((e) => ({
|
|
22
|
+
"7c189782": b.value
|
|
23
23
|
}));
|
|
24
|
-
const s =
|
|
24
|
+
const s = v(o, "modelValue"), k = f, n = y(), b = C(() => `${o.arrowSize}px`), g = ({ target: e }) => {
|
|
25
25
|
const i = (e.selectedOptions?.[0]).dataset.idx;
|
|
26
26
|
if (i === void 0) return;
|
|
27
27
|
const h = o.options[i];
|
|
@@ -36,7 +36,7 @@ const B = { class: "select-wrapper" }, D = ["for"], M = ["id"], N = ["data-idx",
|
|
|
36
36
|
t && (s.value = t);
|
|
37
37
|
},
|
|
38
38
|
{ immediate: !0 }
|
|
39
|
-
), (e, t) => (d(), a("div",
|
|
39
|
+
), (e, t) => (d(), a("div", E, [
|
|
40
40
|
e.labelText ? (d(), a("label", {
|
|
41
41
|
key: 0,
|
|
42
42
|
for: m(n),
|
|
@@ -44,22 +44,22 @@ const B = { class: "select-wrapper" }, D = ["for"], M = ["id"], N = ["data-idx",
|
|
|
44
44
|
}, p(e.labelText), 11, D)) : V("", !0),
|
|
45
45
|
O("select", {
|
|
46
46
|
id: m(n),
|
|
47
|
-
class: c(["uikit-cursor-pointer uikit-bg-white uikit-pr-xl uikit-text-16 uikit-font-regular", {
|
|
47
|
+
class: c(["uikit-w-full uikit-cursor-pointer uikit-bg-white uikit-pr-xl uikit-text-16 uikit-font-regular", {
|
|
48
48
|
"uikit-rounded-2xs uikit-border uikit-border-solid uikit-border-w-lightgray uikit-py-md uikit-pl-sm": e.border
|
|
49
49
|
}]),
|
|
50
50
|
onChange: t[0] || (t[0] = (l) => {
|
|
51
|
-
|
|
51
|
+
k("change", l), g(l);
|
|
52
52
|
})
|
|
53
53
|
}, [
|
|
54
|
-
(d(!0), a(z, null,
|
|
54
|
+
(d(!0), a(z, null, B(e.options, (l, i) => (d(), a("option", {
|
|
55
55
|
key: `option-${i}`,
|
|
56
56
|
"data-idx": i,
|
|
57
57
|
selected: r(l, s.value)
|
|
58
|
-
}, p(l.label), 9,
|
|
58
|
+
}, p(l.label), 9, T))), 128))
|
|
59
59
|
], 42, M)
|
|
60
60
|
]));
|
|
61
61
|
}
|
|
62
62
|
});
|
|
63
63
|
export {
|
|
64
|
-
|
|
64
|
+
N as default
|
|
65
65
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as $, mergeModels as n, useModel as T, ref as h, watch as C, createElementBlock as f, openBlock as b, normalizeClass as r, createElementVNode as v, createCommentVNode as L, unref as o, createVNode as x, withModifiers as u, nextTick as F } from "vue";
|
|
2
2
|
import M from "./BaseFloatingLabel.vue.js";
|
|
3
3
|
import '../../../../assets/packages/components/lib/UIKit/BaseFloatingLabel.css';/* empty css */
|
|
4
4
|
import { useFloatingLabel as E } from "../../../../composables/useFloatingLabel.js";
|
|
5
|
-
const z = ["id", "data-cy", "data-validation", "rows", "disabled", "aria-labelledby", "readonly", "value"], B = ["innerHTML"], q = "peer-data-[validation='invalid']/fieldset:uikit-text-w-red peer-data-[validation='valid']/fieldset:uikit-text-w-blue", S = /* @__PURE__ */
|
|
5
|
+
const z = ["id", "data-cy", "data-validation", "rows", "disabled", "aria-labelledby", "readonly", "value"], B = ["innerHTML"], q = "peer-data-[validation='invalid']/fieldset:uikit-text-w-red peer-data-[validation='valid']/fieldset:uikit-text-w-blue", S = /* @__PURE__ */ $({
|
|
6
6
|
inheritAttrs: !1,
|
|
7
7
|
__name: "BaseTextarea",
|
|
8
8
|
props: /* @__PURE__ */ n({
|
|
@@ -17,21 +17,21 @@ const z = ["id", "data-cy", "data-validation", "rows", "disabled", "aria-labelle
|
|
|
17
17
|
}),
|
|
18
18
|
emits: /* @__PURE__ */ n(["focusin", "focusout", "click", "keydown"], ["update:modelValue"]),
|
|
19
19
|
setup(k, { expose: m, emit: p }) {
|
|
20
|
-
const t =
|
|
20
|
+
const t = T(k, "modelValue"), s = p, {
|
|
21
21
|
labelState: d,
|
|
22
22
|
handleFocusIn: c,
|
|
23
23
|
handleFocusOut: w,
|
|
24
24
|
setFloatingLabel: y,
|
|
25
25
|
setInlineLabel: V
|
|
26
|
-
} = E(), a =
|
|
27
|
-
|
|
26
|
+
} = E(), a = h(null);
|
|
27
|
+
C(
|
|
28
28
|
t,
|
|
29
29
|
(e) => {
|
|
30
30
|
`${e}`.length && d.value !== "floating-label" ? y() : !e?.length && d.value !== "inline-label" && document.activeElement !== a.value && V();
|
|
31
31
|
},
|
|
32
32
|
{ immediate: !0 }
|
|
33
33
|
);
|
|
34
|
-
const
|
|
34
|
+
const g = ({ target: e }) => {
|
|
35
35
|
t.value = e.value;
|
|
36
36
|
};
|
|
37
37
|
return m({
|
|
@@ -59,7 +59,7 @@ const z = ["id", "data-cy", "data-validation", "rows", "disabled", "aria-labelle
|
|
|
59
59
|
ref_key: "textarea",
|
|
60
60
|
ref: a,
|
|
61
61
|
"data-cy": e.$attrs["data-cy"],
|
|
62
|
-
class: r(["textarea-scrollbar uikit-peer/fieldset uikit-relative uikit-min-h-[130px] uikit-min-w-[343px] uikit-overflow-y-auto uikit-whitespace-pre-wrap uikit-rounded-2xs uikit-border uikit-border-solid uikit-bg-white uikit-px-sm uikit-py-lg uikit-text-16 uikit-outline-none focus-visible:uikit-border-w-blue data-[validation='invalid']:uikit-border-w-red data-[validation='valid']:uikit-border-w-blue", [
|
|
62
|
+
class: r(["textarea-scrollbar uikit-peer/fieldset uikit-relative uikit-min-h-[130px] uikit-min-w-[343px] uikit-overflow-y-auto uikit-whitespace-pre-wrap uikit-rounded-2xs uikit-border uikit-border-solid uikit-border-w-lightgray uikit-bg-white uikit-px-sm uikit-py-lg uikit-text-16 uikit-outline-none focus-visible:uikit-border-w-blue data-[validation='invalid']:uikit-border-w-red data-[validation='valid']:uikit-border-w-blue", [
|
|
63
63
|
{ "is-invalid": e.isValid === !1 },
|
|
64
64
|
{ "is-valid": e.isValid },
|
|
65
65
|
{ "uikit-resize-none": !e.resize },
|
|
@@ -82,7 +82,7 @@ const z = ["id", "data-cy", "data-validation", "rows", "disabled", "aria-labelle
|
|
|
82
82
|
},
|
|
83
83
|
["stop"]
|
|
84
84
|
)),
|
|
85
|
-
onInput: u(
|
|
85
|
+
onInput: u(g, ["stop"]),
|
|
86
86
|
onKeydown: i[2] || (i[2] = u((l) => s("keydown", l), ["stop"])),
|
|
87
87
|
onClick: i[3] || (i[3] = (l) => s("click", l)),
|
|
88
88
|
value: t.value
|
|
@@ -29,7 +29,7 @@ const h = ["for"], k = ["id", "multiple", "accept"], B = /* @__PURE__ */ p({
|
|
|
29
29
|
class: s(["base-upload-file-wrapper uikit-relative", [e.$attrs.class]])
|
|
30
30
|
}, [
|
|
31
31
|
i("label", {
|
|
32
|
-
class: s(["uikit-btn uikit-btn-
|
|
32
|
+
class: s(["uikit-btn uikit-btn-ternary", e.labelClasses]),
|
|
33
33
|
for: e.id
|
|
34
34
|
}, [
|
|
35
35
|
i("input", {
|
|
@@ -19,7 +19,7 @@ const N = ["for"], q = /* @__PURE__ */ m({
|
|
|
19
19
|
},
|
|
20
20
|
emits: ["click", "change", "update:modelValue"],
|
|
21
21
|
setup(t, { emit: r }) {
|
|
22
|
-
const i = f(), d = h(() => `${t.id
|
|
22
|
+
const i = f(), d = h(() => `${t.id ?? i}`), a = r;
|
|
23
23
|
b(
|
|
24
24
|
() => t.checked,
|
|
25
25
|
(e) => {
|
|
@@ -13,15 +13,13 @@ const w = ["id", "data-cy"], F = /* @__PURE__ */ x({
|
|
|
13
13
|
autoCheckResetAll: { type: Boolean, default: !1 },
|
|
14
14
|
autoCheckResetEmpty: { type: Boolean, default: !1 },
|
|
15
15
|
manualToggleResetButton: { type: Boolean, default: !1 },
|
|
16
|
-
getKey: { type: Function, default() {
|
|
17
|
-
return (n) => typeof n == "string" || typeof n == "number" ? `${n}` : `${n.id}`;
|
|
18
|
-
} },
|
|
16
|
+
getKey: { type: Function, default: (n) => typeof n == "string" || typeof n == "number" ? `${n}` : `${n.id}` },
|
|
19
17
|
groupId: { default: "" },
|
|
20
18
|
dataCy: { default: "" }
|
|
21
19
|
},
|
|
22
20
|
emits: ["resetted", "update:modelValue", "checkedGroup"],
|
|
23
21
|
setup(n, { emit: g }) {
|
|
24
|
-
const C = (e = "") => !e || !e.trim() ? "" : (e = e.trim(), e.replace(" ", "-").toLowerCase()), y = (e) => !e?.length, o = n,
|
|
22
|
+
const C = (e = "") => !e || !e.trim() ? "" : (e = e.trim(), e.replace(" ", "-").toLowerCase()), y = (e) => !e?.length, o = n, s = g, c = D(/* @__PURE__ */ new Map()), r = h(() => {
|
|
25
23
|
for (const e of o.checkboxData)
|
|
26
24
|
if (e.reset) return e;
|
|
27
25
|
return null;
|
|
@@ -38,7 +36,7 @@ const w = ["id", "data-cy"], F = /* @__PURE__ */ x({
|
|
|
38
36
|
`${t.id}`,
|
|
39
37
|
t
|
|
40
38
|
), t.checked && e.push(t);
|
|
41
|
-
|
|
39
|
+
s("update:modelValue", e);
|
|
42
40
|
})();
|
|
43
41
|
const u = (e, t) => {
|
|
44
42
|
const a = c.value.get(e);
|
|
@@ -54,17 +52,17 @@ const w = ["id", "data-cy"], F = /* @__PURE__ */ x({
|
|
|
54
52
|
e.checked = !1;
|
|
55
53
|
});
|
|
56
54
|
}, p = () => {
|
|
57
|
-
k(),
|
|
55
|
+
k(), s("update:modelValue", []), s("resetted");
|
|
58
56
|
}, d = (e) => c.value.get(o.getKey(e))?.checked ?? !1, i = (e) => {
|
|
59
57
|
if (y(o.checkboxData)) return;
|
|
60
58
|
const t = c.value.get(e.id);
|
|
61
|
-
t?.reset && e.checked ? k() :
|
|
59
|
+
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 === v.value - 1 && c.value.forEach((l) => {
|
|
62
60
|
l.checked = !!l.reset;
|
|
63
|
-
}), o.autoCheckResetEmpty &&
|
|
61
|
+
}), o.autoCheckResetEmpty && r.value && !f.value && (!o.manualToggleResetButton || !t?.reset) && u(o.getKey(r.value), { checked: !0 });
|
|
64
62
|
const a = [];
|
|
65
63
|
c.value.forEach((l) => {
|
|
66
64
|
l.checked && a.push(l);
|
|
67
|
-
}),
|
|
65
|
+
}), s("update:modelValue", a), s("checkedGroup", o.groupId);
|
|
68
66
|
};
|
|
69
67
|
return E(
|
|
70
68
|
() => o.reset,
|
|
@@ -2,8 +2,8 @@ import { defineComponent as N, ref as T, watch as V, computed as x, createBlock
|
|
|
2
2
|
import { ArrowIcon as C } from "../../../../node_modules/.pnpm/@wikicasa-dev_svg-icons@1.2.12_typescript@5.8.3/node_modules/@wikicasa-dev/svg-icons/dist/ArrowIcon.js";
|
|
3
3
|
import "../../../../node_modules/.pnpm/@wikicasa-dev_svg-icons@1.2.12_typescript@5.8.3/node_modules/@wikicasa-dev/svg-icons/dist/PharmacyIcon.js";
|
|
4
4
|
import j from "@vuepic/vue-datepicker";
|
|
5
|
-
import y from "./
|
|
6
|
-
import '../../../../assets/packages/components/lib/UIKit/BaseInput.css';import '../../../../assets/node_modules/.pnpm/@vuepic_vue-datepicker@11.0.2_vue@3.5.16_typescript@5.8.3_/node_modules/@vuepic/vue-datepicker/dist/main.css';import '../../../../assets/packages/components/lib/UIKit/
|
|
5
|
+
import y from "./BaseSelect.vue.js";
|
|
6
|
+
import '../../../../assets/packages/components/lib/UIKit/BaseInput.css';import '../../../../assets/node_modules/.pnpm/@vuepic_vue-datepicker@11.0.2_vue@3.5.16_typescript@5.8.3_/node_modules/@vuepic/vue-datepicker/dist/main.css';import '../../../../assets/packages/components/lib/UIKit/BaseSelect.css';/* empty css */
|
|
7
7
|
/* empty css */
|
|
8
8
|
import z from "./BaseButton.vue.js";
|
|
9
9
|
import R from "./BaseInput.vue.js";
|
package/package.json
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wikicasa-dev/components",
|
|
3
|
-
"version": "2.1.4-alpha.
|
|
3
|
+
"version": "2.1.4-alpha.10",
|
|
4
4
|
"description": "Wikicasa frontend components",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
7
7
|
"types": "./dist/index.d.ts",
|
|
8
8
|
"files": [
|
|
9
|
-
"dist"
|
|
9
|
+
"dist",
|
|
10
|
+
"plugins"
|
|
10
11
|
],
|
|
11
12
|
"sideEffects": [
|
|
12
13
|
"**/*.css"
|
|
@@ -28,6 +29,9 @@
|
|
|
28
29
|
"./chart/*": {
|
|
29
30
|
"import": "./dist/chart/*.js",
|
|
30
31
|
"types": "./dist/chart/*.d.ts"
|
|
32
|
+
},
|
|
33
|
+
"./plugins/*": {
|
|
34
|
+
"import": "./plugins/*.ts"
|
|
31
35
|
}
|
|
32
36
|
},
|
|
33
37
|
"repository": {
|