@db-ux/v-core-components 2.3.1 → 2.4.0-0-af2a02f
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/db-ux.es.js
CHANGED
|
@@ -222,7 +222,7 @@ const al = Object.entries(na).map(([, i]) => i), Ua = {
|
|
|
222
222
|
var t;
|
|
223
223
|
if (e.value && l.value && (t = a.placement) != null && t.startsWith("corner")) {
|
|
224
224
|
let p = e.value.parentElement;
|
|
225
|
-
p && p.localName.includes("badge") && (p = p.parentElement), p &&
|
|
225
|
+
p && p.localName.includes("badge") && (p = p.parentElement), p && p.setAttribute("data-has-badge", "true");
|
|
226
226
|
}
|
|
227
227
|
},
|
|
228
228
|
{
|
|
@@ -436,8 +436,8 @@ const al = Object.entries(na).map(([, i]) => i), Ua = {
|
|
|
436
436
|
return !!(e.validMessage ?? e.validation === "valid");
|
|
437
437
|
}
|
|
438
438
|
function f() {
|
|
439
|
-
var b,
|
|
440
|
-
!((b = g.value) != null && b.validity.valid) || e.validation === "invalid" ? (u.value = r.value, v.value = e.invalidMessage || ((
|
|
439
|
+
var b, w, W;
|
|
440
|
+
!((b = g.value) != null && b.validity.valid) || e.validation === "invalid" ? (u.value = r.value, v.value = e.invalidMessage || ((w = g.value) == null ? void 0 : w.validationMessage) || ie, ve() && (L.value = v.value, x(() => L.value = "", 1e3))) : h() && ((W = g.value) != null && W.validity.valid) && e.required ? (u.value = B.value, ve() && (L.value = e.validMessage ?? me, x(() => L.value = "", 1e3))) : ee(e.message, e.showMessage) ? u.value = d.value : u.value = "";
|
|
441
441
|
}
|
|
442
442
|
function c(b) {
|
|
443
443
|
e.onChange && e.onChange(b), se(l, b, "checked"), f();
|
|
@@ -448,7 +448,7 @@ const al = Object.entries(na).map(([, i]) => i), Ua = {
|
|
|
448
448
|
function C(b) {
|
|
449
449
|
e.onFocus && e.onFocus(b);
|
|
450
450
|
}
|
|
451
|
-
return (b,
|
|
451
|
+
return (b, w) => (m(), S("div", {
|
|
452
452
|
class: z(n(R)("db-checkbox", e.class)),
|
|
453
453
|
"data-size": b.size,
|
|
454
454
|
"data-hide-label": n(K)(b.showLabel)
|
|
@@ -466,9 +466,9 @@ const al = Object.entries(na).map(([, i]) => i), Ua = {
|
|
|
466
466
|
disabled: n(M)(b.disabled, "disabled"),
|
|
467
467
|
value: b.value,
|
|
468
468
|
required: n(M)(b.required, "required"),
|
|
469
|
-
onChange:
|
|
470
|
-
onBlur:
|
|
471
|
-
onFocus:
|
|
469
|
+
onChange: w[0] || (w[0] = async (W) => c(W)),
|
|
470
|
+
onBlur: w[1] || (w[1] = async (W) => I(W)),
|
|
471
|
+
onFocus: w[2] || (w[2] = async (W) => C(W)),
|
|
472
472
|
"aria-describedby": b.ariaDescribedBy ?? u.value
|
|
473
473
|
}, null, 40, Qa),
|
|
474
474
|
b.label ? (m(), S(U, { key: 0 }, [
|
|
@@ -770,7 +770,7 @@ const al = Object.entries(na).map(([, i]) => i), Ua = {
|
|
|
770
770
|
const c = L + B;
|
|
771
771
|
i.style.insetBlockStart = `calc(${L}px + ${e})`, i.style.insetBlockEnd = `calc(${c > f ? f : c}px + ${e})`;
|
|
772
772
|
}
|
|
773
|
-
i.style.position = "fixed", i.
|
|
773
|
+
i.style.position = "fixed", i.setAttribute("data-corrected-placement", g);
|
|
774
774
|
}, ra = (i) => {
|
|
775
775
|
var l, e;
|
|
776
776
|
const {
|
|
@@ -1004,7 +1004,7 @@ const rt = ["id", "data-width", "data-on-forcing-mobile"], ct = { class: "db-hea
|
|
|
1004
1004
|
], 64)) : A(e.$slots, "default", { key: 1 })
|
|
1005
1005
|
], 10, Bt));
|
|
1006
1006
|
}
|
|
1007
|
-
}), It = ["data-variant", "data-hide-label", "data-hide-icon", "data-icon", "data-icon-after", "data-hide-icon-after"], $t = ["for"], Lt = ["aria-invalid", "data-custom-validity", "data-field-sizing", "id", "name", "type", "placeholder", "disabled", "required", "step", "value", "maxLength", "minLength", "max", "min", "readOnly", "form", "pattern", "size", "autoComplete", "autoFocus", "list", "aria-describedby"], _t = ["id"], Tt = ["value"], Ct = {
|
|
1007
|
+
}), It = ["data-variant", "data-hide-label", "data-hide-icon", "data-icon", "data-icon-after", "data-hide-icon-after"], $t = ["for"], Lt = ["aria-invalid", "data-custom-validity", "data-field-sizing", "id", "name", "type", "placeholder", "disabled", "required", "step", "value", "maxLength", "minLength", "max", "min", "readOnly", "form", "pattern", "size", "autoComplete", "autoFocus", "list", "aria-describedby"], _t = ["id"], Tt = ["value", "data-value"], Ct = {
|
|
1008
1008
|
"data-visually-hidden": "true",
|
|
1009
1009
|
role: "status"
|
|
1010
1010
|
}, Et = /* @__PURE__ */ P({
|
|
@@ -1102,8 +1102,8 @@ const rt = ["id", "data-width", "data-on-forcing-mobile"], ct = { class: "db-hea
|
|
|
1102
1102
|
return !!(e.validMessage ?? e.validation === "valid");
|
|
1103
1103
|
}
|
|
1104
1104
|
function c() {
|
|
1105
|
-
var y, O,
|
|
1106
|
-
!((y = h.value) != null && y.validity.valid) || e.validation === "invalid" ? (u.value = B.value, r.value = e.invalidMessage || ((O = h.value) == null ? void 0 : O.validationMessage) || ie, ve() && (g.value = r.value, x(() => g.value = "", 1e3))) : f() && ((
|
|
1105
|
+
var y, O, k;
|
|
1106
|
+
!((y = h.value) != null && y.validity.valid) || e.validation === "invalid" ? (u.value = B.value, r.value = e.invalidMessage || ((O = h.value) == null ? void 0 : O.validationMessage) || ie, ve() && (g.value = r.value, x(() => g.value = "", 1e3))) : f() && ((k = h.value) != null && k.validity.valid) && (e.required || e.minLength || e.maxLength || e.pattern) ? (u.value = d.value, ve() && (g.value = e.validMessage ?? me, x(() => g.value = "", 1e3))) : ee(e.message, e.showMessage) ? u.value = p.value : u.value = "";
|
|
1107
1107
|
}
|
|
1108
1108
|
function I(y) {
|
|
1109
1109
|
e.input && e.input(y), L.value = y.target.value, e.onInput && e.onInput(y), se(l, y), c();
|
|
@@ -1114,7 +1114,7 @@ const rt = ["id", "data-width", "data-on-forcing-mobile"], ct = { class: "db-hea
|
|
|
1114
1114
|
function b(y) {
|
|
1115
1115
|
e.onBlur && e.onBlur(y);
|
|
1116
1116
|
}
|
|
1117
|
-
function
|
|
1117
|
+
function w(y) {
|
|
1118
1118
|
e.onFocus && e.onFocus(y);
|
|
1119
1119
|
}
|
|
1120
1120
|
function W() {
|
|
@@ -1160,10 +1160,10 @@ const rt = ["id", "data-width", "data-on-forcing-mobile"], ct = { class: "db-hea
|
|
|
1160
1160
|
size: y.size,
|
|
1161
1161
|
autoComplete: y.autocomplete,
|
|
1162
1162
|
autoFocus: n(M)(y.autofocus, "autofocus"),
|
|
1163
|
-
onInput: O[0] || (O[0] = async (
|
|
1164
|
-
onChange: O[1] || (O[1] = async (
|
|
1165
|
-
onBlur: O[2] || (O[2] = async (
|
|
1166
|
-
onFocus: O[3] || (O[3] = async (
|
|
1163
|
+
onInput: O[0] || (O[0] = async (k) => I(k)),
|
|
1164
|
+
onChange: O[1] || (O[1] = async (k) => C(k)),
|
|
1165
|
+
onBlur: O[2] || (O[2] = async (k) => b(k)),
|
|
1166
|
+
onFocus: O[3] || (O[3] = async (k) => w(k)),
|
|
1167
1167
|
list: y.dataList && v.value,
|
|
1168
1168
|
"aria-describedby": y.ariaDescribedBy ?? u.value
|
|
1169
1169
|
}, null, 40, Lt),
|
|
@@ -1171,10 +1171,11 @@ const rt = ["id", "data-width", "data-on-forcing-mobile"], ct = { class: "db-hea
|
|
|
1171
1171
|
key: 0,
|
|
1172
1172
|
id: v.value
|
|
1173
1173
|
}, [
|
|
1174
|
-
(m(!0), S(U, null, be(W(), (
|
|
1175
|
-
key: v.value + "-option-" +
|
|
1176
|
-
value:
|
|
1177
|
-
|
|
1174
|
+
(m(!0), S(U, null, be(W(), (k) => (m(), S("option", {
|
|
1175
|
+
key: v.value + "-option-" + k.value,
|
|
1176
|
+
value: k.value,
|
|
1177
|
+
"data-value": k.hiddenValue
|
|
1178
|
+
}, _(k.label), 9, Tt))), 128))
|
|
1178
1179
|
], 8, _t)) : V("", !0),
|
|
1179
1180
|
A(y.$slots, "default"),
|
|
1180
1181
|
n(ee)(y.message, y.showMessage) ? (m(), Z(te, {
|
|
@@ -1466,13 +1467,13 @@ const rt = ["id", "data-width", "data-on-forcing-mobile"], ct = { class: "db-hea
|
|
|
1466
1467
|
const l = a, e = i, t = s(void 0), p = s(void 0), d = s(void 0), B = s(void 0), r = s(void 0), v = s(""), u = s(""), L = s(""), g = s(!1), h = s(""), f = s(null);
|
|
1467
1468
|
Y(() => {
|
|
1468
1469
|
g.value = !0;
|
|
1469
|
-
const
|
|
1470
|
-
t.value =
|
|
1470
|
+
const k = e.id ?? `select-${Q()}`;
|
|
1471
|
+
t.value = k, p.value = k + fe, d.value = k + pe, B.value = k + he, v.value = k + ze, r.value = e.invalidMessage || ie;
|
|
1471
1472
|
}), D(
|
|
1472
1473
|
() => [f.value, e.invalidMessage],
|
|
1473
1474
|
() => {
|
|
1474
|
-
var
|
|
1475
|
-
r.value = e.invalidMessage || ((
|
|
1475
|
+
var k;
|
|
1476
|
+
r.value = e.invalidMessage || ((k = f.value) == null ? void 0 : k.validationMessage) || ie;
|
|
1476
1477
|
},
|
|
1477
1478
|
{
|
|
1478
1479
|
immediate: !0,
|
|
@@ -1482,8 +1483,8 @@ const rt = ["id", "data-width", "data-on-forcing-mobile"], ct = { class: "db-hea
|
|
|
1482
1483
|
() => [t.value, g.value],
|
|
1483
1484
|
() => {
|
|
1484
1485
|
if (t.value && g.value) {
|
|
1485
|
-
const
|
|
1486
|
-
p.value =
|
|
1486
|
+
const k = t.value + fe, H = t.value + ze;
|
|
1487
|
+
p.value = k, d.value = t.value + pe, B.value = t.value + he, v.value = H, ee(e.message, e.showMessage) ? u.value = k : u.value = H, g.value = !1;
|
|
1487
1488
|
}
|
|
1488
1489
|
},
|
|
1489
1490
|
{
|
|
@@ -1504,60 +1505,60 @@ const rt = ["id", "data-width", "data-on-forcing-mobile"], ct = { class: "db-hea
|
|
|
1504
1505
|
return !!(e.validMessage ?? e.validation === "valid");
|
|
1505
1506
|
}
|
|
1506
1507
|
function I() {
|
|
1507
|
-
var
|
|
1508
|
-
!((
|
|
1508
|
+
var k, H, le;
|
|
1509
|
+
!((k = f.value) != null && k.validity.valid) || e.validation === "invalid" ? (u.value = B.value, r.value = e.invalidMessage || ((H = f.value) == null ? void 0 : H.validationMessage) || ie, ve() && (h.value = r.value, x(() => h.value = "", 1e3))) : c() && ((le = f.value) != null && le.validity.valid) && e.required ? (u.value = d.value, ve() && (h.value = e.validMessage ?? me, x(() => h.value = "", 1e3))) : ee(e.message, e.showMessage) ? u.value = p.value : u.value = v.value;
|
|
1509
1510
|
}
|
|
1510
|
-
function C(
|
|
1511
|
-
e.onClick && e.onClick(
|
|
1511
|
+
function C(k) {
|
|
1512
|
+
e.onClick && e.onClick(k);
|
|
1512
1513
|
}
|
|
1513
|
-
function b(
|
|
1514
|
-
e.input && e.input(
|
|
1514
|
+
function b(k) {
|
|
1515
|
+
e.input && e.input(k), L.value = k.target.value, e.onInput && e.onInput(k), se(l, k), I();
|
|
1515
1516
|
}
|
|
1516
|
-
function k
|
|
1517
|
-
e.onChange && e.onChange(
|
|
1517
|
+
function w(k) {
|
|
1518
|
+
e.onChange && e.onChange(k), se(l, k), I();
|
|
1518
1519
|
}
|
|
1519
|
-
function W(
|
|
1520
|
-
e.onBlur && e.onBlur(
|
|
1520
|
+
function W(k) {
|
|
1521
|
+
e.onBlur && e.onBlur(k);
|
|
1521
1522
|
}
|
|
1522
|
-
function y(
|
|
1523
|
-
e.onFocus && e.onFocus(
|
|
1523
|
+
function y(k) {
|
|
1524
|
+
e.onFocus && e.onFocus(k);
|
|
1524
1525
|
}
|
|
1525
|
-
function O(
|
|
1526
|
+
function O(k) {
|
|
1526
1527
|
var H;
|
|
1527
|
-
return
|
|
1528
|
+
return k.label ?? ((H = k.value) == null ? void 0 : H.toString());
|
|
1528
1529
|
}
|
|
1529
|
-
return (
|
|
1530
|
+
return (k, H) => {
|
|
1530
1531
|
var le;
|
|
1531
1532
|
return m(), S("div", {
|
|
1532
1533
|
class: z(n(R)("db-select", e.class)),
|
|
1533
|
-
"data-variant":
|
|
1534
|
-
"data-hide-label": n(K)(
|
|
1535
|
-
"data-icon":
|
|
1536
|
-
"data-hide-icon": n(K)(
|
|
1534
|
+
"data-variant": k.variant,
|
|
1535
|
+
"data-hide-label": n(K)(k.showLabel),
|
|
1536
|
+
"data-icon": k.icon,
|
|
1537
|
+
"data-hide-icon": n(K)(k.showIcon)
|
|
1537
1538
|
}, [
|
|
1538
|
-
T("label", { for: t.value }, _(
|
|
1539
|
+
T("label", { for: t.value }, _(k.label ?? n(Se)), 9, Rt),
|
|
1539
1540
|
T("select", {
|
|
1540
|
-
"aria-invalid":
|
|
1541
|
-
"data-custom-validity":
|
|
1541
|
+
"aria-invalid": k.validation === "invalid",
|
|
1542
|
+
"data-custom-validity": k.validation,
|
|
1542
1543
|
ref_key: "_ref",
|
|
1543
1544
|
ref: f,
|
|
1544
|
-
required: n(M)(
|
|
1545
|
-
disabled: n(M)(
|
|
1545
|
+
required: n(M)(k.required, "required"),
|
|
1546
|
+
disabled: n(M)(k.disabled, "disabled"),
|
|
1546
1547
|
id: t.value,
|
|
1547
|
-
name:
|
|
1548
|
-
size:
|
|
1549
|
-
value:
|
|
1550
|
-
autocomplete:
|
|
1551
|
-
multiple:
|
|
1548
|
+
name: k.name,
|
|
1549
|
+
size: k.size,
|
|
1550
|
+
value: k.value ?? L.value,
|
|
1551
|
+
autocomplete: k.autocomplete,
|
|
1552
|
+
multiple: k.multiple,
|
|
1552
1553
|
onInput: H[0] || (H[0] = async (J) => b(J)),
|
|
1553
1554
|
onClick: H[1] || (H[1] = async (J) => C(J)),
|
|
1554
|
-
onChange: H[2] || (H[2] = async (J) =>
|
|
1555
|
+
onChange: H[2] || (H[2] = async (J) => w(J)),
|
|
1555
1556
|
onBlur: H[3] || (H[3] = async (J) => W(J)),
|
|
1556
1557
|
onFocus: H[4] || (H[4] = async (J) => y(J)),
|
|
1557
|
-
"aria-describedby":
|
|
1558
|
+
"aria-describedby": k.ariaDescribedBy ?? u.value
|
|
1558
1559
|
}, [
|
|
1559
1560
|
H[5] || (H[5] = T("option", { hidden: !0 }, null, -1)),
|
|
1560
|
-
(le =
|
|
1561
|
+
(le = k.options) != null && le.length ? (m(!0), S(U, { key: 0 }, be(k.options, (J, Fe) => (m(), S(U, { key: Fe }, [
|
|
1561
1562
|
J.options ? (m(), S("optgroup", {
|
|
1562
1563
|
key: 0,
|
|
1563
1564
|
label: O(J)
|
|
@@ -1574,17 +1575,17 @@ const rt = ["id", "data-width", "data-on-forcing-mobile"], ct = { class: "db-hea
|
|
|
1574
1575
|
disabled: J.disabled,
|
|
1575
1576
|
selected: J.selected
|
|
1576
1577
|
}, _(O(J)), 9, qt))
|
|
1577
|
-
], 64))), 128)) : A(
|
|
1578
|
+
], 64))), 128)) : A(k.$slots, "default", { key: 1 })
|
|
1578
1579
|
], 40, Vt),
|
|
1579
|
-
T("span", { id: v.value }, _(
|
|
1580
|
-
n(ee)(
|
|
1580
|
+
T("span", { id: v.value }, _(k.placeholder ?? k.label), 9, Gt),
|
|
1581
|
+
n(ee)(k.message, k.showMessage) ? (m(), Z(te, {
|
|
1581
1582
|
key: 0,
|
|
1582
1583
|
size: "small",
|
|
1583
|
-
icon:
|
|
1584
|
+
icon: k.messageIcon,
|
|
1584
1585
|
id: p.value
|
|
1585
1586
|
}, {
|
|
1586
1587
|
default: G(() => [
|
|
1587
|
-
F(_(
|
|
1588
|
+
F(_(k.message), 1)
|
|
1588
1589
|
]),
|
|
1589
1590
|
_: 1
|
|
1590
1591
|
}, 8, ["icon", "id"])) : V("", !0),
|
|
@@ -1595,7 +1596,7 @@ const rt = ["id", "data-width", "data-on-forcing-mobile"], ct = { class: "db-hea
|
|
|
1595
1596
|
id: d.value
|
|
1596
1597
|
}, {
|
|
1597
1598
|
default: G(() => [
|
|
1598
|
-
F(_(
|
|
1599
|
+
F(_(k.validMessage || n(me)), 1)
|
|
1599
1600
|
]),
|
|
1600
1601
|
_: 1
|
|
1601
1602
|
}, 8, ["id"])) : V("", !0),
|
|
@@ -1840,7 +1841,7 @@ const Kt = ["id", "data-emphasis", "data-animation", "data-delay", "data-width",
|
|
|
1840
1841
|
f.addEventListener(c, () => h(f));
|
|
1841
1842
|
}), f.addEventListener("keydown", (c) => r(c)), ["mouseleave", "focusout"].forEach((c) => {
|
|
1842
1843
|
f.addEventListener(c, () => g());
|
|
1843
|
-
}), f.
|
|
1844
|
+
}), f.setAttribute("data-has-tooltip", "true"), a.variant === "label" ? f.setAttribute("aria-labelledby", l.value) : f.setAttribute("aria-describedby", l.value)), typeof window < "u" && "IntersectionObserver" in window && (p.value = new IntersectionObserver((c) => {
|
|
1844
1845
|
const I = c.find(({ target: C }) => C === v());
|
|
1845
1846
|
I && !I.isIntersecting && r(!1);
|
|
1846
1847
|
})), e.value = !1;
|
|
@@ -2048,13 +2049,13 @@ const Kt = ["id", "data-emphasis", "data-animation", "data-delay", "data-width",
|
|
|
2048
2049
|
setup(i, { emit: a }) {
|
|
2049
2050
|
const l = a, e = i, t = s(void 0), p = s(void 0), d = s(void 0), B = s(void 0), r = s(void 0), v = s(""), u = s(""), L = s(""), g = s(null);
|
|
2050
2051
|
Y(() => {
|
|
2051
|
-
const
|
|
2052
|
-
t.value =
|
|
2052
|
+
const w = e.id ?? `textarea-${Q()}`;
|
|
2053
|
+
t.value = w, p.value = w + fe, d.value = w + pe, B.value = w + he, r.value = e.invalidMessage || ie;
|
|
2053
2054
|
}), D(
|
|
2054
2055
|
() => [g.value, e.invalidMessage],
|
|
2055
2056
|
() => {
|
|
2056
|
-
var
|
|
2057
|
-
r.value = e.invalidMessage || ((
|
|
2057
|
+
var w;
|
|
2058
|
+
r.value = e.invalidMessage || ((w = g.value) == null ? void 0 : w.validationMessage) || ie;
|
|
2058
2059
|
},
|
|
2059
2060
|
{
|
|
2060
2061
|
immediate: !0,
|
|
@@ -2064,8 +2065,8 @@ const Kt = ["id", "data-emphasis", "data-animation", "data-delay", "data-width",
|
|
|
2064
2065
|
() => [t.value],
|
|
2065
2066
|
() => {
|
|
2066
2067
|
if (t.value) {
|
|
2067
|
-
const
|
|
2068
|
-
p.value =
|
|
2068
|
+
const w = t.value + fe;
|
|
2069
|
+
p.value = w, d.value = t.value + pe, B.value = t.value + he, ee(e.message, e.showMessage) && (v.value = w);
|
|
2069
2070
|
}
|
|
2070
2071
|
},
|
|
2071
2072
|
{
|
|
@@ -2086,64 +2087,64 @@ const Kt = ["id", "data-emphasis", "data-animation", "data-delay", "data-width",
|
|
|
2086
2087
|
return !!(e.validMessage ?? e.validation === "valid");
|
|
2087
2088
|
}
|
|
2088
2089
|
function f() {
|
|
2089
|
-
var
|
|
2090
|
-
!((
|
|
2090
|
+
var w, W, y;
|
|
2091
|
+
!((w = g.value) != null && w.validity.valid) || e.validation === "invalid" ? (v.value = B.value, r.value = e.invalidMessage || ((W = g.value) == null ? void 0 : W.validationMessage) || ie, ve() && (L.value = r.value, x(() => L.value = "", 1e3))) : h() && ((y = g.value) != null && y.validity.valid) && (e.required || e.minLength || e.maxLength) ? (v.value = d.value, ve() && (L.value = e.validMessage ?? me, x(() => L.value = "", 1e3))) : ee(e.message, e.showMessage) ? v.value = p.value : v.value = "";
|
|
2091
2092
|
}
|
|
2092
|
-
function c(
|
|
2093
|
-
e.input && e.input(
|
|
2093
|
+
function c(w) {
|
|
2094
|
+
e.input && e.input(w), u.value = w.target.value, e.onInput && e.onInput(w), se(l, w), f();
|
|
2094
2095
|
}
|
|
2095
|
-
function I(
|
|
2096
|
-
e.onChange && e.onChange(
|
|
2096
|
+
function I(w) {
|
|
2097
|
+
e.onChange && e.onChange(w), se(l, w), f();
|
|
2097
2098
|
}
|
|
2098
|
-
function C(
|
|
2099
|
-
e.onBlur && e.onBlur(
|
|
2099
|
+
function C(w) {
|
|
2100
|
+
e.onBlur && e.onBlur(w);
|
|
2100
2101
|
}
|
|
2101
|
-
function b(
|
|
2102
|
-
e.onFocus && e.onFocus(
|
|
2102
|
+
function b(w) {
|
|
2103
|
+
e.onFocus && e.onFocus(w);
|
|
2103
2104
|
}
|
|
2104
|
-
return (
|
|
2105
|
+
return (w, W) => (m(), S("div", {
|
|
2105
2106
|
class: z(n(R)("db-textarea", e.class)),
|
|
2106
|
-
"data-variant":
|
|
2107
|
-
"data-hide-label": n(K)(
|
|
2107
|
+
"data-variant": w.variant,
|
|
2108
|
+
"data-hide-label": n(K)(w.showLabel)
|
|
2108
2109
|
}, [
|
|
2109
|
-
T("label", { for: t.value }, _(
|
|
2110
|
+
T("label", { for: t.value }, _(w.label ?? n(Se)), 9, xt),
|
|
2110
2111
|
T("textarea", {
|
|
2111
|
-
"aria-invalid":
|
|
2112
|
-
"data-custom-validity":
|
|
2113
|
-
"data-field-sizing":
|
|
2112
|
+
"aria-invalid": w.validation === "invalid",
|
|
2113
|
+
"data-custom-validity": w.validation,
|
|
2114
|
+
"data-field-sizing": w.fieldSizing,
|
|
2114
2115
|
ref_key: "_ref",
|
|
2115
2116
|
ref: g,
|
|
2116
2117
|
id: t.value,
|
|
2117
|
-
"data-resize":
|
|
2118
|
-
"data-hide-resizer": n(K)(
|
|
2119
|
-
disabled: n(M)(
|
|
2120
|
-
required: n(M)(
|
|
2121
|
-
readOnly: n(M)(
|
|
2122
|
-
form:
|
|
2123
|
-
maxLength: n(we)(
|
|
2124
|
-
minLength: n(we)(
|
|
2125
|
-
name:
|
|
2126
|
-
wrap:
|
|
2127
|
-
spellcheck:
|
|
2128
|
-
autocomplete:
|
|
2118
|
+
"data-resize": w.resize,
|
|
2119
|
+
"data-hide-resizer": n(K)(w.showResizer ?? !0),
|
|
2120
|
+
disabled: n(M)(w.disabled, "disabled"),
|
|
2121
|
+
required: n(M)(w.required, "required"),
|
|
2122
|
+
readOnly: n(M)(w.readOnly, "readOnly") || n(M)(w.readonly, "readonly"),
|
|
2123
|
+
form: w.form,
|
|
2124
|
+
maxLength: n(we)(w.maxLength, w.maxlength),
|
|
2125
|
+
minLength: n(we)(w.minLength, w.minlength),
|
|
2126
|
+
name: w.name,
|
|
2127
|
+
wrap: w.wrap,
|
|
2128
|
+
spellcheck: w.spellCheck,
|
|
2129
|
+
autocomplete: w.autocomplete,
|
|
2129
2130
|
onInput: W[0] || (W[0] = async (y) => c(y)),
|
|
2130
2131
|
onChange: W[1] || (W[1] = async (y) => I(y)),
|
|
2131
2132
|
onBlur: W[2] || (W[2] = async (y) => C(y)),
|
|
2132
2133
|
onFocus: W[3] || (W[3] = async (y) => b(y)),
|
|
2133
|
-
value:
|
|
2134
|
-
"aria-describedby":
|
|
2135
|
-
placeholder:
|
|
2136
|
-
rows: n(we)(
|
|
2137
|
-
cols: n(we)(
|
|
2134
|
+
value: w.value ?? u.value,
|
|
2135
|
+
"aria-describedby": w.ariaDescribedBy ?? v.value,
|
|
2136
|
+
placeholder: w.placeholder ?? n(ta),
|
|
2137
|
+
rows: n(we)(w.rows, n(Pa)),
|
|
2138
|
+
cols: n(we)(w.cols)
|
|
2138
2139
|
}, null, 40, ei),
|
|
2139
|
-
n(ee)(
|
|
2140
|
+
n(ee)(w.message, w.showMessage) ? (m(), Z(te, {
|
|
2140
2141
|
key: 0,
|
|
2141
2142
|
size: "small",
|
|
2142
|
-
icon:
|
|
2143
|
+
icon: w.messageIcon,
|
|
2143
2144
|
id: p.value
|
|
2144
2145
|
}, {
|
|
2145
2146
|
default: G(() => [
|
|
2146
|
-
F(_(
|
|
2147
|
+
F(_(w.message), 1)
|
|
2147
2148
|
]),
|
|
2148
2149
|
_: 1
|
|
2149
2150
|
}, 8, ["icon", "id"])) : V("", !0),
|
|
@@ -2154,7 +2155,7 @@ const Kt = ["id", "data-emphasis", "data-animation", "data-delay", "data-width",
|
|
|
2154
2155
|
id: d.value
|
|
2155
2156
|
}, {
|
|
2156
2157
|
default: G(() => [
|
|
2157
|
-
F(_(
|
|
2158
|
+
F(_(w.validMessage || n(me)), 1)
|
|
2158
2159
|
]),
|
|
2159
2160
|
_: 1
|
|
2160
2161
|
}, 8, ["id"])) : V("", !0),
|
|
@@ -2772,32 +2773,32 @@ const Kt = ["id", "data-emphasis", "data-animation", "data-delay", "data-width",
|
|
|
2772
2773
|
)
|
|
2773
2774
|
);
|
|
2774
2775
|
for (const b of I) {
|
|
2775
|
-
const
|
|
2776
|
+
const w = I.indexOf(b), W = b.querySelector("label"), y = b.querySelector("input");
|
|
2776
2777
|
if (y && W) {
|
|
2777
2778
|
if (!y.id) {
|
|
2778
|
-
const O = `${e.value}-tab-${
|
|
2779
|
-
W.setAttribute("for", O), y.id = O, y.setAttribute("name", e.value), C.length >
|
|
2779
|
+
const O = `${e.value}-tab-${w}`;
|
|
2780
|
+
W.setAttribute("for", O), y.id = O, y.setAttribute("name", e.value), C.length > w && y.setAttribute(
|
|
2780
2781
|
"aria-controls",
|
|
2781
|
-
`${e.value}-tab-panel-${
|
|
2782
|
+
`${e.value}-tab-panel-${w}`
|
|
2782
2783
|
);
|
|
2783
2784
|
}
|
|
2784
2785
|
if (c) {
|
|
2785
|
-
const O = !a.initialSelectedMode || a.initialSelectedMode === "auto",
|
|
2786
|
-
O &&
|
|
2786
|
+
const O = !a.initialSelectedMode || a.initialSelectedMode === "auto", k = a.initialSelectedIndex == null && w === 0 || Number(a.initialSelectedIndex) === w;
|
|
2787
|
+
O && k && y.click();
|
|
2787
2788
|
}
|
|
2788
2789
|
}
|
|
2789
2790
|
}
|
|
2790
2791
|
for (const b of C) {
|
|
2791
2792
|
if (b.id) continue;
|
|
2792
|
-
const
|
|
2793
|
-
b.id = `${e.value}-tab-panel-${
|
|
2793
|
+
const w = C.indexOf(b);
|
|
2794
|
+
b.id = `${e.value}-tab-panel-${w}`, b.setAttribute("aria-labelledby", `${e.value}-tab-${w}`);
|
|
2794
2795
|
}
|
|
2795
2796
|
}
|
|
2796
2797
|
}
|
|
2797
2798
|
function f(c) {
|
|
2798
|
-
var
|
|
2799
|
+
var w;
|
|
2799
2800
|
c.stopPropagation();
|
|
2800
|
-
const I = (
|
|
2801
|
+
const I = (w = c.target) == null ? void 0 : w.closest;
|
|
2801
2802
|
if (!I) return;
|
|
2802
2803
|
const C = I("ul"), b = (
|
|
2803
2804
|
// db-tab-item for angular and stencil wrapping elements
|
|
@@ -3129,7 +3130,7 @@ const Ai = ["id", "aria-invalid", "data-custom-validity", "data-width", "data-va
|
|
|
3129
3130
|
},
|
|
3130
3131
|
emits: ["update:values"],
|
|
3131
3132
|
setup(i, { emit: a }) {
|
|
3132
|
-
const l = a, e = i, t = s(void 0), p = s(void 0), d = s(void 0), B = s(void 0), r = s(void 0), v = s(void 0), u = s(void 0), L = s(void 0), g = s(void 0), h = s(void 0), f = s("no-validation"), c = s(""), I = s(""), C = s(void 0), b = s(""),
|
|
3133
|
+
const l = a, e = i, t = s(void 0), p = s(void 0), d = s(void 0), B = s(void 0), r = s(void 0), v = s(void 0), u = s(void 0), L = s(void 0), g = s(void 0), h = s(void 0), f = s("no-validation"), c = s(""), I = s(""), C = s(void 0), b = s(""), w = s([]), W = s(!1), y = s(!1), O = s(0), k = s([]), H = s([]), le = s(!1), J = s(void 0), Fe = s(0), ye = s(void 0), Te = s(void 0), Ve = s(void 0), Pe = s(!1), Ce = s(!1), va = s(null), N = s(null), ke = s(null), Ne = s(null), Ue = s(null);
|
|
3133
3134
|
Y(() => {
|
|
3134
3135
|
const o = e.id ?? `custom-select-${Q()}`;
|
|
3135
3136
|
t.value = o, p.value = o + fe, d.value = o + pe, B.value = o + he, v.value = o + xe, u.value = o + Ze, L.value = o + "-summary", g.value = o + ze, C.value = o + "-selected-labels", h.value = o + "-info", r.value = e.invalidMessage || ie, typeof window < "u" && "IntersectionObserver" in window && (Te.value = new IntersectionObserver(($) => {
|
|
@@ -3207,14 +3208,14 @@ const Ai = ["id", "aria-invalid", "data-custom-validity", "data-width", "data-va
|
|
|
3207
3208
|
), D(
|
|
3208
3209
|
() => [e.values],
|
|
3209
3210
|
() => {
|
|
3210
|
-
e.values && Array.isArray(e.values) && e.values !==
|
|
3211
|
+
e.values && Array.isArray(e.values) && e.values !== k.value && (k.value = e.values ?? []);
|
|
3211
3212
|
},
|
|
3212
3213
|
{
|
|
3213
3214
|
immediate: !0,
|
|
3214
3215
|
flush: "post"
|
|
3215
3216
|
}
|
|
3216
3217
|
), D(
|
|
3217
|
-
() => [
|
|
3218
|
+
() => [k.value],
|
|
3218
3219
|
() => {
|
|
3219
3220
|
pa();
|
|
3220
3221
|
},
|
|
@@ -3232,10 +3233,10 @@ const Ai = ["id", "aria-invalid", "data-custom-validity", "data-width", "data-va
|
|
|
3232
3233
|
flush: "post"
|
|
3233
3234
|
}
|
|
3234
3235
|
), D(
|
|
3235
|
-
() => [
|
|
3236
|
+
() => [k.value, O.value],
|
|
3236
3237
|
() => {
|
|
3237
3238
|
var o, $;
|
|
3238
|
-
((o =
|
|
3239
|
+
((o = k.value) == null ? void 0 : o.length) === 0 ? (Pe.value = !1, Ce.value = !1) : (($ = k.value) == null ? void 0 : $.length) === O.value ? (Ce.value = !1, Pe.value = !0) : k.value && (Ce.value = !0);
|
|
3239
3240
|
},
|
|
3240
3241
|
{
|
|
3241
3242
|
immediate: !0,
|
|
@@ -3264,13 +3265,13 @@ const Ai = ["id", "aria-invalid", "data-custom-validity", "data-width", "data-va
|
|
|
3264
3265
|
flush: "post"
|
|
3265
3266
|
}
|
|
3266
3267
|
), D(
|
|
3267
|
-
() => [e.options,
|
|
3268
|
+
() => [e.options, k.value],
|
|
3268
3269
|
() => {
|
|
3269
3270
|
var o, $;
|
|
3270
|
-
(o = e.options) != null && o.length && (
|
|
3271
|
+
(o = e.options) != null && o.length && (w.value = ($ = e.options) == null ? void 0 : $.filter(
|
|
3271
3272
|
(E) => {
|
|
3272
3273
|
var j, oe;
|
|
3273
|
-
return !E.value || !((j =
|
|
3274
|
+
return !E.value || !((j = k.value) != null && j.includes) ? !1 : !E.isGroupTitle && ((oe = k.value) == null ? void 0 : oe.includes(E.value));
|
|
3274
3275
|
}
|
|
3275
3276
|
));
|
|
3276
3277
|
},
|
|
@@ -3280,7 +3281,7 @@ const Ai = ["id", "aria-invalid", "data-custom-validity", "data-width", "data-va
|
|
|
3280
3281
|
}
|
|
3281
3282
|
), D(
|
|
3282
3283
|
() => [
|
|
3283
|
-
|
|
3284
|
+
w.value,
|
|
3284
3285
|
e.selectedType,
|
|
3285
3286
|
e.amountText,
|
|
3286
3287
|
e.selectedLabels,
|
|
@@ -3292,13 +3293,13 @@ const Ai = ["id", "aria-invalid", "data-custom-validity", "data-width", "data-va
|
|
|
3292
3293
|
I.value = e.selectedLabels;
|
|
3293
3294
|
return;
|
|
3294
3295
|
}
|
|
3295
|
-
if ((o =
|
|
3296
|
+
if ((o = w.value) != null && o.length) {
|
|
3296
3297
|
if (e.transformSelectedLabels) {
|
|
3297
|
-
const j =
|
|
3298
|
+
const j = w.value, oe = e.transformSelectedLabels;
|
|
3298
3299
|
I.value = oe(j);
|
|
3299
3300
|
return;
|
|
3300
3301
|
}
|
|
3301
|
-
e.selectedType === "amount" ? I.value = e.amountText ? e.amountText : `${($ =
|
|
3302
|
+
e.selectedType === "amount" ? I.value = e.amountText ? e.amountText : `${($ = w.value) == null ? void 0 : $.length} ${za}` : I.value = (E = w.value) == null ? void 0 : E.map((j) => $e(j)).join(", ");
|
|
3302
3303
|
} else
|
|
3303
3304
|
I.value = "";
|
|
3304
3305
|
},
|
|
@@ -3307,10 +3308,10 @@ const Ai = ["id", "aria-invalid", "data-custom-validity", "data-width", "data-va
|
|
|
3307
3308
|
flush: "post"
|
|
3308
3309
|
}
|
|
3309
3310
|
), D(
|
|
3310
|
-
() => [
|
|
3311
|
+
() => [w.value],
|
|
3311
3312
|
() => {
|
|
3312
3313
|
var o;
|
|
3313
|
-
e.onAmountChange && e.onAmountChange(((o =
|
|
3314
|
+
e.onAmountChange && e.onAmountChange(((o = w.value) == null ? void 0 : o.length) ?? 0);
|
|
3314
3315
|
},
|
|
3315
3316
|
{
|
|
3316
3317
|
immediate: !0,
|
|
@@ -3361,7 +3362,7 @@ const Ai = ["id", "aria-invalid", "data-custom-validity", "data-width", "data-va
|
|
|
3361
3362
|
}
|
|
3362
3363
|
function ma() {
|
|
3363
3364
|
var o;
|
|
3364
|
-
return (o =
|
|
3365
|
+
return (o = k.value) != null && o.length ? k.value.at(0) ?? "" : "";
|
|
3365
3366
|
}
|
|
3366
3367
|
function Oe(o) {
|
|
3367
3368
|
var E;
|
|
@@ -3377,10 +3378,10 @@ const Ai = ["id", "aria-invalid", "data-custom-validity", "data-width", "data-va
|
|
|
3377
3378
|
}
|
|
3378
3379
|
function ba(o) {
|
|
3379
3380
|
var $, E;
|
|
3380
|
-
return o && (($ =
|
|
3381
|
+
return o && (($ = k.value) != null && $.includes) ? (E = k.value) == null ? void 0 : E.includes(o) : !1;
|
|
3381
3382
|
}
|
|
3382
3383
|
function ya(o) {
|
|
3383
|
-
return e.removeTagsTexts && e.removeTagsTexts.length > o ? e.removeTagsTexts.at(o) : `${ia} ${
|
|
3384
|
+
return e.removeTagsTexts && e.removeTagsTexts.length > o ? e.removeTagsTexts.at(o) : `${ia} ${w.value ? $e(w.value[o]) : ""}`;
|
|
3384
3385
|
}
|
|
3385
3386
|
function ka(o, $) {
|
|
3386
3387
|
$ && $.stopPropagation(), He(o.value), Ae();
|
|
@@ -3454,7 +3455,7 @@ const Ai = ["id", "aria-invalid", "data-custom-validity", "data-width", "data-va
|
|
|
3454
3455
|
}
|
|
3455
3456
|
}
|
|
3456
3457
|
function _e(o) {
|
|
3457
|
-
(/* @__PURE__ */ new Date()).getTime() - Fe.value < 200 || (
|
|
3458
|
+
(/* @__PURE__ */ new Date()).getTime() - Fe.value < 200 || (k.value = o, e.onOptionSelected && e.onOptionSelected(o ?? []), se(
|
|
3458
3459
|
l,
|
|
3459
3460
|
{
|
|
3460
3461
|
target: {
|
|
@@ -3466,11 +3467,11 @@ const Ai = ["id", "aria-invalid", "data-custom-validity", "data-width", "data-va
|
|
|
3466
3467
|
}
|
|
3467
3468
|
function He(o) {
|
|
3468
3469
|
var $;
|
|
3469
|
-
o && (e.multiple ? ($ =
|
|
3470
|
+
o && (e.multiple ? ($ = k.value) != null && $.includes(o) ? _e(k.value.filter((E) => E !== o)) : _e([...k.value || [], o]) : (_e([o]), Ee(void 0, !0)));
|
|
3470
3471
|
}
|
|
3471
3472
|
function Ia(o) {
|
|
3472
3473
|
var $;
|
|
3473
|
-
if (o.stopPropagation(), (($ =
|
|
3474
|
+
if (o.stopPropagation(), (($ = k.value) == null ? void 0 : $.length) === O.value)
|
|
3474
3475
|
_e([]);
|
|
3475
3476
|
else {
|
|
3476
3477
|
const E = y.value && Ue.value ? Ue.value.value : void 0;
|
|
@@ -3595,7 +3596,7 @@ const Ai = ["id", "aria-invalid", "data-custom-validity", "data-width", "data-va
|
|
|
3595
3596
|
id: C.value
|
|
3596
3597
|
}, _(I.value), 9, Ri)) : V("", !0),
|
|
3597
3598
|
o.selectedType === "tag" ? (m(), S("div", Vi, [
|
|
3598
|
-
(m(!0), S(U, null, be(
|
|
3599
|
+
(m(!0), S(U, null, be(w.value, (q, ge) => (m(), Z(Qt, {
|
|
3599
3600
|
key: ge,
|
|
3600
3601
|
emphasis: "strong",
|
|
3601
3602
|
behavior: "removable",
|
|
@@ -3703,7 +3704,7 @@ const Ai = ["id", "aria-invalid", "data-custom-validity", "data-width", "data-va
|
|
|
3703
3704
|
}, 8, ["width"])
|
|
3704
3705
|
], 64)) : V("", !0)
|
|
3705
3706
|
], 40, Mi),
|
|
3706
|
-
(o.showClearSelection ?? !0) && ((oe =
|
|
3707
|
+
(o.showClearSelection ?? !0) && ((oe = k.value) != null && oe.length) ? (m(), Z(Be, {
|
|
3707
3708
|
key: 0,
|
|
3708
3709
|
icon: "cross",
|
|
3709
3710
|
variant: "ghost",
|