@abgov/web-components 2.2.0-dev.39 → 2.2.0-dev.40
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/index.js +41 -38
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -1016,7 +1016,7 @@ function Ht(t, e) {
|
|
|
1016
1016
|
function Be(t) {
|
|
1017
1017
|
return t === "false" ? !1 : t === "" ? !0 : !!t;
|
|
1018
1018
|
}
|
|
1019
|
-
function
|
|
1019
|
+
function bt(t) {
|
|
1020
1020
|
return t ? "true" : "false";
|
|
1021
1021
|
}
|
|
1022
1022
|
function vo(t, e) {
|
|
@@ -9468,7 +9468,7 @@ function du(t, e, o) {
|
|
|
9468
9468
|
var qe;
|
|
9469
9469
|
S.focus();
|
|
9470
9470
|
const Fe = !n, ae = Fe ? `${O || "checked"}` : "";
|
|
9471
|
-
o(27, f =
|
|
9471
|
+
o(27, f = bt(Fe)), (qe = Ce.target) == null || qe.dispatchEvent(new CustomEvent(
|
|
9472
9472
|
"_change",
|
|
9473
9473
|
{
|
|
9474
9474
|
composed: !0,
|
|
@@ -11363,7 +11363,7 @@ function Ou(t, e, o) {
|
|
|
11363
11363
|
const rt = Xe.getAttribute("data-grid");
|
|
11364
11364
|
return rt === "cell" || (rt == null ? void 0 : rt.startsWith("cell-"));
|
|
11365
11365
|
}).sort((Xe, rt) => {
|
|
11366
|
-
const gt = Xe.getAttribute("data-grid") || "cell-0",
|
|
11366
|
+
const gt = Xe.getAttribute("data-grid") || "cell-0", pt = rt.getAttribute("data-grid") || "cell-0", zt = gt === "cell" ? 0 : parseInt(gt.split("-")[1] || "0"), _t = pt === "cell" ? 0 : parseInt(pt.split("-")[1] || "0");
|
|
11367
11367
|
return zt - _t;
|
|
11368
11368
|
}), Ke = [];
|
|
11369
11369
|
Ue.forEach((Xe) => {
|
|
@@ -13969,7 +13969,7 @@ function bf(t) {
|
|
|
13969
13969
|
), m(o, "data-testid", "option-list"), m(o, "width", L = /*_popoverMaxWidth*/
|
|
13970
13970
|
t[26] || /*_width*/
|
|
13971
13971
|
t[25] || void 0), m(o, "open", D = /*_isMenuVisible*/
|
|
13972
|
-
t[17] ? "true" : "false"), m(o, "padded", "false"), m(o, "tabindex", "-1"), m(o, "filterablecontext", j =
|
|
13972
|
+
t[17] ? "true" : "false"), m(o, "padded", "false"), m(o, "tabindex", "-1"), m(o, "filterablecontext", j = bt(
|
|
13973
13973
|
/*_filterable*/
|
|
13974
13974
|
t[31]
|
|
13975
13975
|
)), m(o, "class", "svelte-4fk67h");
|
|
@@ -14141,7 +14141,7 @@ function bf(t) {
|
|
|
14141
14141
|
H[25] || void 0)) && m(o, "width", L), (!T || X[0] & /*_isMenuVisible*/
|
|
14142
14142
|
131072 && D !== (D = /*_isMenuVisible*/
|
|
14143
14143
|
H[17] ? "true" : "false")) && m(o, "open", D), (!T || X[1] & /*_filterable*/
|
|
14144
|
-
1 && j !== (j =
|
|
14144
|
+
1 && j !== (j = bt(
|
|
14145
14145
|
/*_filterable*/
|
|
14146
14146
|
H[31]
|
|
14147
14147
|
))) && m(o, "filterablecontext", j);
|
|
@@ -14850,10 +14850,10 @@ function Lf(t, e, o) {
|
|
|
14850
14850
|
if (!(xe instanceof ShadowRoot) || !($e instanceof ShadowRoot))
|
|
14851
14851
|
return;
|
|
14852
14852
|
const Lt = xe.host;
|
|
14853
|
-
let
|
|
14854
|
-
for (;
|
|
14855
|
-
|
|
14856
|
-
|
|
14853
|
+
let mt = $e.host;
|
|
14854
|
+
for (; mt && mt.parentElement !== Lt; )
|
|
14855
|
+
mt = mt.parentElement;
|
|
14856
|
+
mt == null || mt.setAttribute("slot", `option-${de.value}`);
|
|
14857
14857
|
}
|
|
14858
14858
|
function pe(de) {
|
|
14859
14859
|
o(16, P = P.filter((xe) => xe.value !== de.value)), gt();
|
|
@@ -14862,7 +14862,10 @@ function Lf(t, e, o) {
|
|
|
14862
14862
|
o(24, ee = P.find((de) => de.value == we[0]));
|
|
14863
14863
|
}
|
|
14864
14864
|
function Ue(de) {
|
|
14865
|
-
const xe = Math.max(...de.map((Lt) =>
|
|
14865
|
+
const xe = Math.max(...de.map((Lt) => {
|
|
14866
|
+
const mt = Lt.label || (Lt.hasSlotContent ? Lt.filter : "") || Lt.value || "";
|
|
14867
|
+
return String(mt).length;
|
|
14868
|
+
}));
|
|
14866
14869
|
let $e = Math.max(xe || 0, p.length) + 7;
|
|
14867
14870
|
return b && ($e += 4), `${$e}ch`;
|
|
14868
14871
|
}
|
|
@@ -14893,7 +14896,7 @@ function Lf(t, e, o) {
|
|
|
14893
14896
|
function gt() {
|
|
14894
14897
|
o(21, ne = r ? P.filter((de) => po(de, (K == null ? void 0 : K.value) || "")) : P);
|
|
14895
14898
|
}
|
|
14896
|
-
function
|
|
14899
|
+
function pt() {
|
|
14897
14900
|
i || setTimeout(
|
|
14898
14901
|
async () => {
|
|
14899
14902
|
gt(), o(17, Z = !0), K == null || K.focus(), setTimeout(
|
|
@@ -14926,8 +14929,8 @@ function Lf(t, e, o) {
|
|
|
14926
14929
|
function it(de) {
|
|
14927
14930
|
if (i || !r || !(S === "test-autofill" || K.matches(":-webkit-autofill") || K.matches(":autofill"))) return;
|
|
14928
14931
|
gt();
|
|
14929
|
-
const $e = (K == null ? void 0 : K.value) || "",
|
|
14930
|
-
ee || (
|
|
14932
|
+
const $e = (K == null ? void 0 : K.value) || "", mt = $e !== "" ? ne.find((I1) => po(I1, $e, !1)) : null;
|
|
14933
|
+
ee || (mt ? ke(mt) : Yt()), setTimeout(
|
|
14931
14934
|
() => {
|
|
14932
14935
|
zt();
|
|
14933
14936
|
},
|
|
@@ -14941,10 +14944,10 @@ function Lf(t, e, o) {
|
|
|
14941
14944
|
i || (J = !0, le.handleKeyDown(de));
|
|
14942
14945
|
}
|
|
14943
14946
|
function Ft(de) {
|
|
14944
|
-
(de.key === "Enter" || de.key === " ") && (Yt(),
|
|
14947
|
+
(de.key === "Enter" || de.key === " ") && (Yt(), pt(), de.stopPropagation());
|
|
14945
14948
|
}
|
|
14946
14949
|
function Jt(de) {
|
|
14947
|
-
Yt(),
|
|
14950
|
+
Yt(), pt(), de.stopPropagation();
|
|
14948
14951
|
}
|
|
14949
14952
|
function Jo(de) {
|
|
14950
14953
|
const xe = de.currentTarget, $e = P[xe.selectedIndex];
|
|
@@ -14965,20 +14968,20 @@ function Lf(t, e, o) {
|
|
|
14965
14968
|
}
|
|
14966
14969
|
onEnter(xe) {
|
|
14967
14970
|
const $e = ne[H];
|
|
14968
|
-
$e && (J = $e.value !== (ee == null ? void 0 : ee.value), kt($e)), ee ? zt() :
|
|
14971
|
+
$e && (J = $e.value !== (ee == null ? void 0 : ee.value), kt($e)), ee ? zt() : pt(), xe.stopPropagation();
|
|
14969
14972
|
}
|
|
14970
14973
|
onArrow(xe, $e) {
|
|
14971
|
-
Z ||
|
|
14974
|
+
Z || pt(), Xe($e === "up" ? -1 : 1), xe.stopPropagation();
|
|
14972
14975
|
}
|
|
14973
14976
|
onTab(xe) {
|
|
14974
14977
|
const $e = ne.find((Lt) => {
|
|
14975
|
-
var
|
|
14976
|
-
return ((
|
|
14978
|
+
var mt;
|
|
14979
|
+
return ((mt = Lt.label) == null ? void 0 : mt.toLowerCase()) === this.input.value.toLowerCase();
|
|
14977
14980
|
});
|
|
14978
14981
|
$e && kt($e), zt();
|
|
14979
14982
|
}
|
|
14980
14983
|
onKeyUp(xe) {
|
|
14981
|
-
this.input.value === "" && ee && (o(24, ee = void 0), o(18, H = -1)),
|
|
14984
|
+
this.input.value === "" && ee && (o(24, ee = void 0), o(18, H = -1)), pt();
|
|
14982
14985
|
}
|
|
14983
14986
|
handleKeyUp(xe) {
|
|
14984
14987
|
switch (xe.key) {
|
|
@@ -15022,11 +15025,11 @@ function Lf(t, e, o) {
|
|
|
15022
15025
|
const $e = ne[H];
|
|
15023
15026
|
$e && kt($e), zt();
|
|
15024
15027
|
} else
|
|
15025
|
-
|
|
15028
|
+
pt();
|
|
15026
15029
|
xe.preventDefault(), xe.stopPropagation();
|
|
15027
15030
|
}
|
|
15028
15031
|
onArrow(xe, $e) {
|
|
15029
|
-
Z ||
|
|
15032
|
+
Z || pt(), Xe($e === "up" ? -1 : 1), xe.preventDefault(), xe.stopPropagation();
|
|
15030
15033
|
}
|
|
15031
15034
|
handleKeyDown(xe) {
|
|
15032
15035
|
switch (xe.key) {
|
|
@@ -16125,13 +16128,13 @@ function sl(t) {
|
|
|
16125
16128
|
c() {
|
|
16126
16129
|
e = C("goa-checkbox"), r = Y(), a = C("hr"), m(e, "name", "select-all"), m(e, "value", "select-all"), m(e, "text", "Select all"), m(e, "data-testid", o = /*testid*/
|
|
16127
16130
|
t[7] ? `${/*testid*/
|
|
16128
|
-
t[7]}-select-all` : void 0), m(e, "version", "2"), m(e, "checked", i =
|
|
16131
|
+
t[7]}-select-all` : void 0), m(e, "version", "2"), m(e, "checked", i = bt(
|
|
16129
16132
|
/*_allVisibleSelected*/
|
|
16130
16133
|
t[22]
|
|
16131
|
-
)), m(e, "indeterminate", n =
|
|
16134
|
+
)), m(e, "indeterminate", n = bt(
|
|
16132
16135
|
/*_someVisibleSelected*/
|
|
16133
16136
|
t[31]
|
|
16134
|
-
)), m(e, "disabled", l =
|
|
16137
|
+
)), m(e, "disabled", l = bt(
|
|
16135
16138
|
/*disabled*/
|
|
16136
16139
|
t[6]
|
|
16137
16140
|
)), m(
|
|
@@ -16154,15 +16157,15 @@ function sl(t) {
|
|
|
16154
16157
|
128 && o !== (o = /*testid*/
|
|
16155
16158
|
s[7] ? `${/*testid*/
|
|
16156
16159
|
s[7]}-select-all` : void 0) && m(e, "data-testid", o), f[0] & /*_allVisibleSelected*/
|
|
16157
|
-
4194304 && i !== (i =
|
|
16160
|
+
4194304 && i !== (i = bt(
|
|
16158
16161
|
/*_allVisibleSelected*/
|
|
16159
16162
|
s[22]
|
|
16160
16163
|
)) && m(e, "checked", i), f[1] & /*_someVisibleSelected*/
|
|
16161
|
-
1 && n !== (n =
|
|
16164
|
+
1 && n !== (n = bt(
|
|
16162
16165
|
/*_someVisibleSelected*/
|
|
16163
16166
|
s[31]
|
|
16164
16167
|
)) && m(e, "indeterminate", n), f[0] & /*disabled*/
|
|
16165
|
-
64 && l !== (l =
|
|
16168
|
+
64 && l !== (l = bt(
|
|
16166
16169
|
/*disabled*/
|
|
16167
16170
|
s[6]
|
|
16168
16171
|
)) && m(e, "disabled", l), f[0] & /*size*/
|
|
@@ -16206,7 +16209,7 @@ function cl(t) {
|
|
|
16206
16209
|
"value",
|
|
16207
16210
|
/*value*/
|
|
16208
16211
|
t[0]
|
|
16209
|
-
), m(e, "disabled", n =
|
|
16212
|
+
), m(e, "disabled", n = bt(
|
|
16210
16213
|
/*disabled*/
|
|
16211
16214
|
t[6]
|
|
16212
16215
|
)), m(e, "version", "2"), m(
|
|
@@ -16247,7 +16250,7 @@ function cl(t) {
|
|
|
16247
16250
|
/*value*/
|
|
16248
16251
|
s[0]
|
|
16249
16252
|
), f[0] & /*disabled*/
|
|
16250
|
-
64 && n !== (n =
|
|
16253
|
+
64 && n !== (n = bt(
|
|
16251
16254
|
/*disabled*/
|
|
16252
16255
|
s[6]
|
|
16253
16256
|
)) && m(e, "disabled", n), f[0] & /*size*/
|
|
@@ -16279,7 +16282,7 @@ function dl(t, e) {
|
|
|
16279
16282
|
e[82].value), m(o, "value", n = /*option*/
|
|
16280
16283
|
e[82].value), m(o, "text", l = /*option*/
|
|
16281
16284
|
e[82].label || /*option*/
|
|
16282
|
-
e[82].value), m(o, "version", "2"), m(o, "checked", r =
|
|
16285
|
+
e[82].value), m(o, "version", "2"), m(o, "checked", r = bt(
|
|
16283
16286
|
/*value*/
|
|
16284
16287
|
e[0].includes(
|
|
16285
16288
|
/*option*/
|
|
@@ -16304,7 +16307,7 @@ function dl(t, e) {
|
|
|
16304
16307
|
2097152 && l !== (l = /*option*/
|
|
16305
16308
|
e[82].label || /*option*/
|
|
16306
16309
|
e[82].value) && m(o, "text", l), c[0] & /*value, _visibleOptions*/
|
|
16307
|
-
2097153 && r !== (r =
|
|
16310
|
+
2097153 && r !== (r = bt(
|
|
16308
16311
|
/*value*/
|
|
16309
16312
|
e[0].includes(
|
|
16310
16313
|
/*option*/
|
|
@@ -16725,7 +16728,7 @@ function Zf(t, e, o) {
|
|
|
16725
16728
|
const be = Ke();
|
|
16726
16729
|
be.length !== 0 && Xe(be.length - 1);
|
|
16727
16730
|
}
|
|
16728
|
-
function
|
|
16731
|
+
function pt() {
|
|
16729
16732
|
const be = Ke();
|
|
16730
16733
|
if (be.length === 0) return;
|
|
16731
16734
|
const nt = Math.min(te + 1, be.length - 1);
|
|
@@ -16789,7 +16792,7 @@ function Zf(t, e, o) {
|
|
|
16789
16792
|
G && o(26, G = !1);
|
|
16790
16793
|
break;
|
|
16791
16794
|
case "ArrowDown":
|
|
16792
|
-
G ? (be.preventDefault(),
|
|
16795
|
+
G ? (be.preventDefault(), pt()) : (be.preventDefault(), o(26, G = !0));
|
|
16793
16796
|
break;
|
|
16794
16797
|
case "ArrowUp":
|
|
16795
16798
|
G && (be.preventDefault(), zt());
|
|
@@ -25285,7 +25288,7 @@ function w5(t, e, o) {
|
|
|
25285
25288
|
}
|
|
25286
25289
|
)), Ee(Fe, "help-text::announce", void 0, { bubbles: !0 });
|
|
25287
25290
|
}
|
|
25288
|
-
function
|
|
25291
|
+
function pt(ke) {
|
|
25289
25292
|
o(42, V = "false");
|
|
25290
25293
|
const it = ke.target;
|
|
25291
25294
|
it.dispatchEvent(new CustomEvent(
|
|
@@ -25373,7 +25376,7 @@ function w5(t, e, o) {
|
|
|
25373
25376
|
Xe,
|
|
25374
25377
|
rt,
|
|
25375
25378
|
gt,
|
|
25376
|
-
|
|
25379
|
+
pt,
|
|
25377
25380
|
d,
|
|
25378
25381
|
V,
|
|
25379
25382
|
B,
|
|
@@ -31710,7 +31713,7 @@ function d4(t, e, o) {
|
|
|
31710
31713
|
function X() {
|
|
31711
31714
|
T.addEventListener("radio-group:init", (J) => {
|
|
31712
31715
|
const ne = J.detail;
|
|
31713
|
-
o(16, i = ne.disabled || Be(h)), o(21, b =
|
|
31716
|
+
o(16, i = ne.disabled || Be(h)), o(21, b = bt(ne.error)), o(22, w = bt(ne.checked)), o(1, v = ne.description), o(0, f = ne.name), o(23, _ = ne.revealAriaLabel || ""), o(13, O = ne.version || "1"), o(14, B = ne.compact || !1);
|
|
31714
31717
|
});
|
|
31715
31718
|
}
|
|
31716
31719
|
function U() {
|
|
@@ -35781,7 +35784,7 @@ function xv(t, e, o) {
|
|
|
35781
35784
|
[...g.querySelectorAll("[role=tab]")].map((me, We) => {
|
|
35782
35785
|
var Ce;
|
|
35783
35786
|
const ye = We + 1 === +h;
|
|
35784
|
-
me.setAttribute("aria-selected",
|
|
35787
|
+
me.setAttribute("aria-selected", bt(ye)), me.setAttribute("tabindex", ye ? "0" : "-1");
|
|
35785
35788
|
const Qe = (Ce = me.getAttribute("href")) == null ? void 0 : Ce.split("#")[1];
|
|
35786
35789
|
Qe && re.add(Qe), ye && (te = me.href, ne || me.focus({ preventScroll: !0 }));
|
|
35787
35790
|
});
|