@wikicasa-dev/components 2.1.4-alpha.4 → 2.1.4-alpha.5
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
.select-wrapper{position:relative;display:inline-block}.select-wrapper select{appearance:none;-webkit-appearance:none;-moz-appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' width='16' height='16' viewBox='0 0 16 16'%3E%3Cg%3E%3Cpath d='M21.006,9.708l-7.448,7.448a.543.543,0,0,1-.779,0L5.331,9.708a.548.548,0,0,1,.384-.932H20.622A.543.543,0,0,1,21.006,9.708Z' transform='translate(-5.172 -5.048)' fill='%230e1d34'/%3E%3C/g%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 12px center;background-size:var(--
|
|
1
|
+
.select-wrapper{position:relative;display:inline-block}.select-wrapper select{appearance:none;-webkit-appearance:none;-moz-appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' width='16' height='16' viewBox='0 0 16 16'%3E%3Cg%3E%3Cpath d='M21.006,9.708l-7.448,7.448a.543.543,0,0,1-.779,0L5.331,9.708a.548.548,0,0,1,.384-.932H20.622A.543.543,0,0,1,21.006,9.708Z' transform='translate(-5.172 -5.048)' fill='%230e1d34'/%3E%3C/g%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 12px center;background-size:var(--7c189782)}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as f, ref as
|
|
1
|
+
import { defineComponent as f, ref as v, computed as s, createElementBlock as c, openBlock as g, withModifiers as l, normalizeStyle as w, normalizeClass as B, renderSlot as r, createVNode as h } from "vue";
|
|
2
2
|
import C 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",
|
|
@@ -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 =
|
|
37
|
+
}, o = v(!1), b = s(
|
|
38
38
|
() => k[a.size] || "uikit-btn-md"
|
|
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
48
|
class: B([
|
|
49
|
-
"uikit-
|
|
49
|
+
"uikit-btn",
|
|
50
50
|
{
|
|
51
51
|
"uikit-btn-empty": !t.withMinWidth,
|
|
52
52
|
"active uikit-font-medium": t.keepActive,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as x, mergeModels as u, useCssVars as
|
|
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
2
|
const E = { class: "select-wrapper" }, D = ["for"], M = ["id"], T = ["data-idx", "selected"], N = /* @__PURE__ */ x({
|
|
3
3
|
__name: "BaseSelect",
|
|
4
4
|
props: /* @__PURE__ */ u({
|
|
@@ -17,20 +17,20 @@ const E = { class: "select-wrapper" }, D = ["for"], M = ["id"], T = ["data-idx",
|
|
|
17
17
|
modelModifiers: {}
|
|
18
18
|
}),
|
|
19
19
|
emits: /* @__PURE__ */ u(["change"], ["update:modelValue"]),
|
|
20
|
-
setup(
|
|
21
|
-
|
|
22
|
-
"
|
|
20
|
+
setup(o, { emit: f }) {
|
|
21
|
+
w((e) => ({
|
|
22
|
+
"7c189782": b.value
|
|
23
23
|
}));
|
|
24
|
-
const s = v(
|
|
25
|
-
const
|
|
26
|
-
if (
|
|
27
|
-
const h =
|
|
24
|
+
const s = v(o, "modelValue"), k = f, n = y(), b = C(() => `${o.arrowSize}px`), g = ({ target: e }) => {
|
|
25
|
+
const i = (e.selectedOptions?.[0]).dataset.idx;
|
|
26
|
+
if (i === void 0) return;
|
|
27
|
+
const h = o.options[i];
|
|
28
28
|
s.value = h;
|
|
29
29
|
}, r = (e, t) => e.id === t?.id || e.label === t?.label;
|
|
30
30
|
return S(
|
|
31
31
|
s,
|
|
32
32
|
(e) => {
|
|
33
|
-
const t =
|
|
33
|
+
const t = o.options.find(
|
|
34
34
|
(l) => r(l, e)
|
|
35
35
|
);
|
|
36
36
|
t && (s.value = t);
|
|
@@ -44,16 +44,16 @@ const E = { class: "select-wrapper" }, D = ["for"], M = ["id"], T = ["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, B(e.options, (l,
|
|
55
|
-
key: `option-${
|
|
56
|
-
"data-idx":
|
|
54
|
+
(d(!0), a(z, null, B(e.options, (l, i) => (d(), a("option", {
|
|
55
|
+
key: `option-${i}`,
|
|
56
|
+
"data-idx": i,
|
|
57
57
|
selected: r(l, s.value)
|
|
58
58
|
}, p(l.label), 9, T))), 128))
|
|
59
59
|
], 42, M)
|