@abgov/web-components 1.17.0-alpha.113 → 1.17.0-alpha.115
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 +99 -73
- package/index.js.map +1 -1
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -13174,7 +13174,7 @@ function create_else_block$a(ctx) {
|
|
|
13174
13174
|
let if_block1 = current_block_type(ctx);
|
|
13175
13175
|
let each_value_1 = ensure_array_like(
|
|
13176
13176
|
/*_filteredOptions*/
|
|
13177
|
-
ctx[
|
|
13177
|
+
ctx[16]
|
|
13178
13178
|
);
|
|
13179
13179
|
const get_key = (ctx2) => (
|
|
13180
13180
|
/*index*/
|
|
@@ -13329,7 +13329,7 @@ function create_else_block$a(ctx) {
|
|
|
13329
13329
|
);
|
|
13330
13330
|
set_custom_element_data(goa_popover, "data-testid", "option-list");
|
|
13331
13331
|
set_custom_element_data(goa_popover, "width", goa_popover_width_value = `${/*_popoverMaxWidth*/
|
|
13332
|
-
ctx[21] ||
|
|
13332
|
+
ctx[21] || 300}px`);
|
|
13333
13333
|
set_custom_element_data(
|
|
13334
13334
|
goa_popover,
|
|
13335
13335
|
"open",
|
|
@@ -13575,11 +13575,11 @@ function create_else_block$a(ctx) {
|
|
|
13575
13575
|
);
|
|
13576
13576
|
}
|
|
13577
13577
|
if (dirty[0] & /*_filteredOptions, _selectedOption, _highlightedIndex, _isDirty, _filterable*/
|
|
13578
|
-
|
|
13578
|
+
302350336 | dirty[1] & /*onSelect*/
|
|
13579
13579
|
2) {
|
|
13580
13580
|
each_value_1 = ensure_array_like(
|
|
13581
13581
|
/*_filteredOptions*/
|
|
13582
|
-
ctx2[
|
|
13582
|
+
ctx2[16]
|
|
13583
13583
|
);
|
|
13584
13584
|
each_blocks = update_keyed_each(each_blocks, dirty, get_key, 1, ctx2, each_value_1, each_1_lookup, ul, destroy_block, create_each_block_1$1, null, get_each_context_1$1);
|
|
13585
13585
|
if (!each_value_1.length && each_1_else) {
|
|
@@ -13642,7 +13642,7 @@ function create_else_block$a(ctx) {
|
|
|
13642
13642
|
}
|
|
13643
13643
|
if (!current || dirty[0] & /*_popoverMaxWidth*/
|
|
13644
13644
|
2097152 && goa_popover_width_value !== (goa_popover_width_value = `${/*_popoverMaxWidth*/
|
|
13645
|
-
ctx2[21] ||
|
|
13645
|
+
ctx2[21] || 300}px`)) {
|
|
13646
13646
|
set_custom_element_data(goa_popover, "width", goa_popover_width_value);
|
|
13647
13647
|
}
|
|
13648
13648
|
if (!current || dirty[0] & /*_isMenuVisible*/
|
|
@@ -13702,7 +13702,7 @@ function create_if_block$s(ctx) {
|
|
|
13702
13702
|
);
|
|
13703
13703
|
let each_value = ensure_array_like(
|
|
13704
13704
|
/*_options*/
|
|
13705
|
-
ctx[
|
|
13705
|
+
ctx[14]
|
|
13706
13706
|
);
|
|
13707
13707
|
let each_blocks = [];
|
|
13708
13708
|
for (let i = 0; i < each_value.length; i += 1) {
|
|
@@ -13792,10 +13792,10 @@ function create_if_block$s(ctx) {
|
|
|
13792
13792
|
}
|
|
13793
13793
|
}
|
|
13794
13794
|
if (dirty[0] & /*value, _options*/
|
|
13795
|
-
|
|
13795
|
+
16385) {
|
|
13796
13796
|
each_value = ensure_array_like(
|
|
13797
13797
|
/*_options*/
|
|
13798
|
-
ctx2[
|
|
13798
|
+
ctx2[14]
|
|
13799
13799
|
);
|
|
13800
13800
|
let i;
|
|
13801
13801
|
for (i = 0; i < each_value.length; i += 1) {
|
|
@@ -14235,7 +14235,7 @@ function create_each_block_1$1(key_1, ctx) {
|
|
|
14235
14235
|
"dropdown-item--highlighted",
|
|
14236
14236
|
/*index*/
|
|
14237
14237
|
ctx[77] === /*_highlightedIndex*/
|
|
14238
|
-
ctx[
|
|
14238
|
+
ctx[15]
|
|
14239
14239
|
);
|
|
14240
14240
|
this.first = li;
|
|
14241
14241
|
},
|
|
@@ -14252,38 +14252,38 @@ function create_each_block_1$1(key_1, ctx) {
|
|
|
14252
14252
|
var _a, _b;
|
|
14253
14253
|
ctx = new_ctx;
|
|
14254
14254
|
if (dirty[0] & /*_filteredOptions*/
|
|
14255
|
-
|
|
14255
|
+
65536 && t0_value !== (t0_value = /*option*/
|
|
14256
14256
|
(ctx[73].label || /*option*/
|
|
14257
14257
|
ctx[73].value) + "")) set_data(t0, t0_value);
|
|
14258
14258
|
if (dirty[0] & /*_filteredOptions*/
|
|
14259
|
-
|
|
14259
|
+
65536 && li_id_value !== (li_id_value = /*option*/
|
|
14260
14260
|
ctx[73].value)) {
|
|
14261
14261
|
attr(li, "id", li_id_value);
|
|
14262
14262
|
}
|
|
14263
14263
|
if (dirty[0] & /*_selectedOption, _filteredOptions*/
|
|
14264
|
-
|
|
14264
|
+
327680 && li_aria_selected_value !== (li_aria_selected_value = /*_selectedOption*/
|
|
14265
14265
|
((_a = ctx[18]) == null ? void 0 : _a.value) === /*option*/
|
|
14266
14266
|
(ctx[73].label || /*option*/
|
|
14267
14267
|
ctx[73].value))) {
|
|
14268
14268
|
attr(li, "aria-selected", li_aria_selected_value);
|
|
14269
14269
|
}
|
|
14270
14270
|
if (dirty[0] & /*_filteredOptions*/
|
|
14271
|
-
|
|
14271
|
+
65536 && li_data_index_value !== (li_data_index_value = /*index*/
|
|
14272
14272
|
ctx[77])) {
|
|
14273
14273
|
attr(li, "data-index", li_data_index_value);
|
|
14274
14274
|
}
|
|
14275
14275
|
if (dirty[0] & /*_filteredOptions*/
|
|
14276
|
-
|
|
14276
|
+
65536 && li_data_testid_value !== (li_data_testid_value = `dropdown-item-${/*option*/
|
|
14277
14277
|
ctx[73].value}`)) {
|
|
14278
14278
|
attr(li, "data-testid", li_data_testid_value);
|
|
14279
14279
|
}
|
|
14280
14280
|
if (dirty[0] & /*_filteredOptions*/
|
|
14281
|
-
|
|
14281
|
+
65536 && li_data_value_value !== (li_data_value_value = /*option*/
|
|
14282
14282
|
ctx[73].value)) {
|
|
14283
14283
|
attr(li, "data-value", li_data_value_value);
|
|
14284
14284
|
}
|
|
14285
14285
|
if (dirty[0] & /*_selectedOption, _filteredOptions*/
|
|
14286
|
-
|
|
14286
|
+
327680) {
|
|
14287
14287
|
toggle_class(
|
|
14288
14288
|
li,
|
|
14289
14289
|
"selected",
|
|
@@ -14294,13 +14294,13 @@ function create_each_block_1$1(key_1, ctx) {
|
|
|
14294
14294
|
);
|
|
14295
14295
|
}
|
|
14296
14296
|
if (dirty[0] & /*_filteredOptions, _highlightedIndex*/
|
|
14297
|
-
|
|
14297
|
+
98304) {
|
|
14298
14298
|
toggle_class(
|
|
14299
14299
|
li,
|
|
14300
14300
|
"dropdown-item--highlighted",
|
|
14301
14301
|
/*index*/
|
|
14302
14302
|
ctx[77] === /*_highlightedIndex*/
|
|
14303
|
-
ctx[
|
|
14303
|
+
ctx[15]
|
|
14304
14304
|
);
|
|
14305
14305
|
}
|
|
14306
14306
|
},
|
|
@@ -14342,16 +14342,16 @@ function create_each_block$7(ctx) {
|
|
|
14342
14342
|
},
|
|
14343
14343
|
p(ctx2, dirty) {
|
|
14344
14344
|
if (dirty[0] & /*_options*/
|
|
14345
|
-
|
|
14345
|
+
16384 && t0_value !== (t0_value = /*option*/
|
|
14346
14346
|
ctx2[73].label + "")) set_data(t0, t0_value);
|
|
14347
14347
|
if (dirty[0] & /*value, _options*/
|
|
14348
|
-
|
|
14348
|
+
16385 && option_1_selected_value !== (option_1_selected_value = /*value*/
|
|
14349
14349
|
ctx2[0] === /*option*/
|
|
14350
14350
|
ctx2[73].value)) {
|
|
14351
14351
|
option_1.selected = option_1_selected_value;
|
|
14352
14352
|
}
|
|
14353
14353
|
if (dirty[0] & /*_options*/
|
|
14354
|
-
|
|
14354
|
+
16384 && option_1_value_value !== (option_1_value_value = /*option*/
|
|
14355
14355
|
ctx2[73].value)) {
|
|
14356
14356
|
option_1.__value = option_1_value_value;
|
|
14357
14357
|
set_input_value(option_1, option_1.__value);
|
|
@@ -14377,7 +14377,7 @@ function create_fragment$N(ctx) {
|
|
|
14377
14377
|
function select_block_type(ctx2, dirty) {
|
|
14378
14378
|
if (
|
|
14379
14379
|
/*_native*/
|
|
14380
|
-
ctx2[
|
|
14380
|
+
ctx2[17]
|
|
14381
14381
|
) return 0;
|
|
14382
14382
|
return 1;
|
|
14383
14383
|
}
|
|
@@ -14413,7 +14413,7 @@ function create_fragment$N(ctx) {
|
|
|
14413
14413
|
div,
|
|
14414
14414
|
"dropdown-native",
|
|
14415
14415
|
/*_native*/
|
|
14416
|
-
ctx[
|
|
14416
|
+
ctx[17]
|
|
14417
14417
|
);
|
|
14418
14418
|
},
|
|
14419
14419
|
m(target, anchor) {
|
|
@@ -14472,12 +14472,12 @@ function create_fragment$N(ctx) {
|
|
|
14472
14472
|
attr(div, "style", div_style_value);
|
|
14473
14473
|
}
|
|
14474
14474
|
if (!current || dirty[0] & /*_native*/
|
|
14475
|
-
|
|
14475
|
+
131072) {
|
|
14476
14476
|
toggle_class(
|
|
14477
14477
|
div,
|
|
14478
14478
|
"dropdown-native",
|
|
14479
14479
|
/*_native*/
|
|
14480
|
-
ctx2[
|
|
14480
|
+
ctx2[17]
|
|
14481
14481
|
);
|
|
14482
14482
|
}
|
|
14483
14483
|
},
|
|
@@ -14593,19 +14593,19 @@ function instance$N($$self, $$props, $$invalidate) {
|
|
|
14593
14593
|
const detail = e.detail;
|
|
14594
14594
|
if (_mountStatus === "ready") {
|
|
14595
14595
|
if (detail.mountType === "reset") {
|
|
14596
|
-
$$invalidate(
|
|
14596
|
+
$$invalidate(14, _options = []);
|
|
14597
14597
|
}
|
|
14598
14598
|
_mountStatus = "active";
|
|
14599
14599
|
}
|
|
14600
14600
|
switch (detail.mountType) {
|
|
14601
14601
|
case "append":
|
|
14602
|
-
$$invalidate(
|
|
14602
|
+
$$invalidate(14, _options = [..._options, detail]);
|
|
14603
14603
|
break;
|
|
14604
14604
|
case "prepend":
|
|
14605
|
-
$$invalidate(
|
|
14605
|
+
$$invalidate(14, _options = [detail, ..._options]);
|
|
14606
14606
|
break;
|
|
14607
14607
|
case "reset":
|
|
14608
|
-
$$invalidate(
|
|
14608
|
+
$$invalidate(14, _options = [..._options, detail]);
|
|
14609
14609
|
break;
|
|
14610
14610
|
}
|
|
14611
14611
|
if (_mountTimeoutId) {
|
|
@@ -14661,7 +14661,7 @@ function instance$N($$self, $$props, $$invalidate) {
|
|
|
14661
14661
|
} else if (index >= items.length) {
|
|
14662
14662
|
index = _filterable ? 0 : items.length - 1;
|
|
14663
14663
|
}
|
|
14664
|
-
$$invalidate(
|
|
14664
|
+
$$invalidate(15, _highlightedIndex = index);
|
|
14665
14665
|
scrollToOption(index);
|
|
14666
14666
|
}
|
|
14667
14667
|
function scrollToOption(index) {
|
|
@@ -14674,7 +14674,7 @@ function instance$N($$self, $$props, $$invalidate) {
|
|
|
14674
14674
|
liNode.scrollIntoView({ behavior: "smooth", block: "nearest" });
|
|
14675
14675
|
}
|
|
14676
14676
|
function syncFilteredOptions() {
|
|
14677
|
-
$$invalidate(
|
|
14677
|
+
$$invalidate(16, _filteredOptions = _filterable ? _options.filter((option) => isFilterMatch(option, (_inputEl == null ? void 0 : _inputEl.value) || "")) : _options);
|
|
14678
14678
|
}
|
|
14679
14679
|
function showMenu() {
|
|
14680
14680
|
if (_disabled) {
|
|
@@ -14770,7 +14770,7 @@ function instance$N($$self, $$props, $$invalidate) {
|
|
|
14770
14770
|
function reset() {
|
|
14771
14771
|
if (_disabled) return;
|
|
14772
14772
|
$$invalidate(26, _activeDescendantId = void 0);
|
|
14773
|
-
$$invalidate(
|
|
14773
|
+
$$invalidate(15, _highlightedIndex = -1);
|
|
14774
14774
|
$$invalidate(18, _selectedOption = void 0);
|
|
14775
14775
|
$$invalidate(25, _isDirty = true);
|
|
14776
14776
|
syncFilteredOptions();
|
|
@@ -14969,15 +14969,15 @@ function instance$N($$self, $$props, $$invalidate) {
|
|
|
14969
14969
|
}
|
|
14970
14970
|
if ($$self.$$.dirty[1] & /*native*/
|
|
14971
14971
|
8192) {
|
|
14972
|
-
$$invalidate(
|
|
14972
|
+
$$invalidate(17, _native = toBoolean(native));
|
|
14973
14973
|
}
|
|
14974
14974
|
if ($$self.$$.dirty[0] & /*_native*/
|
|
14975
|
-
|
|
14975
|
+
131072 | $$self.$$.dirty[1] & /*filterable*/
|
|
14976
14976
|
1024) {
|
|
14977
14977
|
$$invalidate(28, _filterable = toBoolean(filterable) && !_native);
|
|
14978
14978
|
}
|
|
14979
14979
|
if ($$self.$$.dirty[0] & /*_filteredOptions, _highlightedIndex*/
|
|
14980
|
-
|
|
14980
|
+
98304) {
|
|
14981
14981
|
$$invalidate(26, _activeDescendantId = _filteredOptions[_highlightedIndex] ? _filteredOptions[_highlightedIndex].value : void 0);
|
|
14982
14982
|
}
|
|
14983
14983
|
if ($$self.$$.dirty[0] & /*value*/
|
|
@@ -14987,6 +14987,13 @@ function instance$N($$self, $$props, $$invalidate) {
|
|
|
14987
14987
|
setSelected();
|
|
14988
14988
|
}
|
|
14989
14989
|
}
|
|
14990
|
+
if ($$self.$$.dirty[0] & /*_options*/
|
|
14991
|
+
16384 | $$self.$$.dirty[1] & /*width*/
|
|
14992
|
+
2048) {
|
|
14993
|
+
{
|
|
14994
|
+
$$invalidate(20, _width = width || getLongestChildWidth(_options));
|
|
14995
|
+
}
|
|
14996
|
+
}
|
|
14990
14997
|
};
|
|
14991
14998
|
return [
|
|
14992
14999
|
value,
|
|
@@ -15003,10 +15010,10 @@ function instance$N($$self, $$props, $$invalidate) {
|
|
|
15003
15010
|
mb,
|
|
15004
15011
|
ml,
|
|
15005
15012
|
testid,
|
|
15013
|
+
_options,
|
|
15006
15014
|
_highlightedIndex,
|
|
15007
15015
|
_filteredOptions,
|
|
15008
15016
|
_native,
|
|
15009
|
-
_options,
|
|
15010
15017
|
_selectedOption,
|
|
15011
15018
|
_isMenuVisible,
|
|
15012
15019
|
_width,
|
|
@@ -29147,23 +29154,33 @@ function create_if_block$9(ctx) {
|
|
|
29147
29154
|
set_custom_element_data(goa_focus_trap, "open", "true");
|
|
29148
29155
|
attr(section, "data-testid", "popover-content");
|
|
29149
29156
|
attr(section, "class", "popover-content svelte-n86i0p");
|
|
29150
|
-
attr(section, "style", section_style_value = styles(
|
|
29151
|
-
|
|
29152
|
-
|
|
29153
|
-
|
|
29154
|
-
|
|
29155
|
-
|
|
29156
|
-
|
|
29157
|
-
|
|
29158
|
-
|
|
29159
|
-
|
|
29160
|
-
|
|
29161
|
-
|
|
29162
|
-
|
|
29163
|
-
|
|
29164
|
-
|
|
29165
|
-
|
|
29166
|
-
|
|
29157
|
+
attr(section, "style", section_style_value = styles(
|
|
29158
|
+
style(
|
|
29159
|
+
"width",
|
|
29160
|
+
/*width*/
|
|
29161
|
+
ctx[3]
|
|
29162
|
+
),
|
|
29163
|
+
style(
|
|
29164
|
+
"min-width",
|
|
29165
|
+
/*minwidth*/
|
|
29166
|
+
ctx[2]
|
|
29167
|
+
),
|
|
29168
|
+
style(
|
|
29169
|
+
"max-width",
|
|
29170
|
+
/*width*/
|
|
29171
|
+
ctx[3] ? `max(${/*width*/
|
|
29172
|
+
ctx[3]}, ${/*maxwidth*/
|
|
29173
|
+
ctx[1]})` : (
|
|
29174
|
+
/*maxwidth*/
|
|
29175
|
+
ctx[1]
|
|
29176
|
+
)
|
|
29177
|
+
),
|
|
29178
|
+
style(
|
|
29179
|
+
"padding",
|
|
29180
|
+
/*_padded*/
|
|
29181
|
+
ctx[21] ? "var(--goa-space-m)" : "0"
|
|
29182
|
+
)
|
|
29183
|
+
));
|
|
29167
29184
|
add_render_callback(() => (
|
|
29168
29185
|
/*section_elementresize_handler*/
|
|
29169
29186
|
ctx[33].call(section)
|
|
@@ -29223,23 +29240,33 @@ function create_if_block$9(ctx) {
|
|
|
29223
29240
|
}
|
|
29224
29241
|
}
|
|
29225
29242
|
if (!current || dirty[0] & /*width, minwidth, maxwidth, _padded*/
|
|
29226
|
-
2097166 && section_style_value !== (section_style_value = styles(
|
|
29227
|
-
|
|
29228
|
-
|
|
29229
|
-
|
|
29230
|
-
|
|
29231
|
-
|
|
29232
|
-
|
|
29233
|
-
|
|
29234
|
-
|
|
29235
|
-
|
|
29236
|
-
|
|
29237
|
-
|
|
29238
|
-
|
|
29239
|
-
|
|
29240
|
-
|
|
29241
|
-
|
|
29242
|
-
|
|
29243
|
+
2097166 && section_style_value !== (section_style_value = styles(
|
|
29244
|
+
style(
|
|
29245
|
+
"width",
|
|
29246
|
+
/*width*/
|
|
29247
|
+
ctx2[3]
|
|
29248
|
+
),
|
|
29249
|
+
style(
|
|
29250
|
+
"min-width",
|
|
29251
|
+
/*minwidth*/
|
|
29252
|
+
ctx2[2]
|
|
29253
|
+
),
|
|
29254
|
+
style(
|
|
29255
|
+
"max-width",
|
|
29256
|
+
/*width*/
|
|
29257
|
+
ctx2[3] ? `max(${/*width*/
|
|
29258
|
+
ctx2[3]}, ${/*maxwidth*/
|
|
29259
|
+
ctx2[1]})` : (
|
|
29260
|
+
/*maxwidth*/
|
|
29261
|
+
ctx2[1]
|
|
29262
|
+
)
|
|
29263
|
+
),
|
|
29264
|
+
style(
|
|
29265
|
+
"padding",
|
|
29266
|
+
/*_padded*/
|
|
29267
|
+
ctx2[21] ? "var(--goa-space-m)" : "0"
|
|
29268
|
+
)
|
|
29269
|
+
))) {
|
|
29243
29270
|
attr(section, "style", section_style_value);
|
|
29244
29271
|
}
|
|
29245
29272
|
},
|
|
@@ -31631,6 +31658,7 @@ function instance$d($$self, $$props, $$invalidate) {
|
|
|
31631
31658
|
onMount(async () => {
|
|
31632
31659
|
await tick();
|
|
31633
31660
|
getChildren();
|
|
31661
|
+
setCurrentUrl();
|
|
31634
31662
|
addEventListeners();
|
|
31635
31663
|
});
|
|
31636
31664
|
onDestroy(() => {
|
|
@@ -31642,6 +31670,7 @@ function instance$d($$self, $$props, $$invalidate) {
|
|
|
31642
31670
|
if (slotChildren.length === 0) return;
|
|
31643
31671
|
_sideMenuLinks = slotChildren.filter((el) => el.tagName === "A").map((el) => {
|
|
31644
31672
|
el.classList.remove("current");
|
|
31673
|
+
el.addEventListener("click", setCurrentUrl);
|
|
31645
31674
|
return el;
|
|
31646
31675
|
});
|
|
31647
31676
|
_rootEl.addEventListener("sidemenugroup:mounted", handleSideMenuGroupMount);
|
|
@@ -31683,9 +31712,6 @@ function instance$d($$self, $$props, $$invalidate) {
|
|
|
31683
31712
|
observer = null;
|
|
31684
31713
|
}
|
|
31685
31714
|
window.removeEventListener("popstate", setCurrentUrl);
|
|
31686
|
-
if (_rootEl) {
|
|
31687
|
-
_rootEl.removeEventListener("sidemenugroup:mounted", handleSideMenuGroupMount);
|
|
31688
|
-
}
|
|
31689
31715
|
}
|
|
31690
31716
|
function div_binding($$value) {
|
|
31691
31717
|
binding_callbacks[$$value ? "unshift" : "push"](() => {
|