@abgov/web-components 1.18.0 → 1.18.1
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/package.json +1 -1
- package/web-components.es.js +328 -344
- package/web-components.umd.js +103 -105
package/web-components.es.js
CHANGED
|
@@ -5322,7 +5322,7 @@ function noscroll(_node, opts) {
|
|
|
5322
5322
|
const scrollbarWidth = calculateScrollbarWidth();
|
|
5323
5323
|
toggledScrolling = true;
|
|
5324
5324
|
document.body.style.overflow = "hidden";
|
|
5325
|
-
document.body.style.
|
|
5325
|
+
document.body.style.borderRight = `${scrollbarWidth}px solid #eee`;
|
|
5326
5326
|
}
|
|
5327
5327
|
function isScrollable() {
|
|
5328
5328
|
return document.body.style.overflow !== "hidden";
|
|
@@ -5334,7 +5334,7 @@ function noscroll(_node, opts) {
|
|
|
5334
5334
|
toggledScrolling = false;
|
|
5335
5335
|
setTimeout(() => {
|
|
5336
5336
|
document.body.style.overflow = "";
|
|
5337
|
-
document.body.style.
|
|
5337
|
+
document.body.style.borderRight = "";
|
|
5338
5338
|
}, 200);
|
|
5339
5339
|
}
|
|
5340
5340
|
function calculateScrollbarWidth() {
|
|
@@ -6490,7 +6490,7 @@ function get_each_context$8(ctx, list, i) {
|
|
|
6490
6490
|
return child_ctx;
|
|
6491
6491
|
}
|
|
6492
6492
|
|
|
6493
|
-
// (
|
|
6493
|
+
// (458:2) {:else}
|
|
6494
6494
|
function create_else_block$a(ctx) {
|
|
6495
6495
|
let slot;
|
|
6496
6496
|
let t0;
|
|
@@ -6504,7 +6504,6 @@ function create_else_block$a(ctx) {
|
|
|
6504
6504
|
let input_aria_owns_value;
|
|
6505
6505
|
let input_readonly_value;
|
|
6506
6506
|
let t2;
|
|
6507
|
-
let div_style_value;
|
|
6508
6507
|
let t3;
|
|
6509
6508
|
let ul;
|
|
6510
6509
|
let each_blocks = [];
|
|
@@ -6517,13 +6516,13 @@ function create_else_block$a(ctx) {
|
|
|
6517
6516
|
let if_block0 = /*leadingicon*/ ctx[4] && create_if_block_2$b(ctx);
|
|
6518
6517
|
|
|
6519
6518
|
function select_block_type_1(ctx, dirty) {
|
|
6520
|
-
if (/*_inputEl*/ ctx[
|
|
6519
|
+
if (/*_inputEl*/ ctx[22]?.value && /*_filterable*/ ctx[23]) return create_if_block_1$d;
|
|
6521
6520
|
return create_else_block_2;
|
|
6522
6521
|
}
|
|
6523
6522
|
|
|
6524
6523
|
let current_block_type = select_block_type_1(ctx);
|
|
6525
6524
|
let if_block1 = current_block_type(ctx);
|
|
6526
|
-
let each_value_1 = /*_filteredOptions*/ ctx[
|
|
6525
|
+
let each_value_1 = /*_filteredOptions*/ ctx[14];
|
|
6527
6526
|
const get_key = ctx => /*index*/ ctx[65];
|
|
6528
6527
|
|
|
6529
6528
|
for (let i = 0; i < each_value_1.length; i += 1) {
|
|
@@ -6561,8 +6560,8 @@ function create_else_block$a(ctx) {
|
|
|
6561
6560
|
}
|
|
6562
6561
|
|
|
6563
6562
|
attr(input, "style", input_style_value = `
|
|
6564
|
-
cursor: ${!/*_disabled*/ ctx[
|
|
6565
|
-
? /*_filterable*/ ctx[
|
|
6563
|
+
cursor: ${!/*_disabled*/ ctx[25]
|
|
6564
|
+
? /*_filterable*/ ctx[23] ? "auto" : "pointer"
|
|
6566
6565
|
: "default"};
|
|
6567
6566
|
`);
|
|
6568
6567
|
|
|
@@ -6572,27 +6571,26 @@ function create_else_block$a(ctx) {
|
|
|
6572
6571
|
attr(input, "autocomplete", "off");
|
|
6573
6572
|
attr(input, "aria-autocomplete", "list");
|
|
6574
6573
|
attr(input, "aria-controls", input_aria_controls_value = `menu-${/*name*/ ctx[0]}`);
|
|
6575
|
-
attr(input, "aria-expanded", /*_isMenuVisible*/ ctx[
|
|
6574
|
+
attr(input, "aria-expanded", /*_isMenuVisible*/ ctx[17]);
|
|
6576
6575
|
attr(input, "aria-label", input_aria_label_value = /*arialabel*/ ctx[1] || /*name*/ ctx[0]);
|
|
6577
6576
|
attr(input, "aria-labelledby", /*arialabelledby*/ ctx[2]);
|
|
6578
6577
|
attr(input, "id", /*name*/ ctx[0]);
|
|
6579
|
-
attr(input, "aria-activedescendant", /*_activeDescendantId*/ ctx[
|
|
6580
|
-
attr(input, "aria-disabled", /*_disabled*/ ctx[
|
|
6578
|
+
attr(input, "aria-activedescendant", /*_activeDescendantId*/ ctx[24]);
|
|
6579
|
+
attr(input, "aria-disabled", /*_disabled*/ ctx[25]);
|
|
6581
6580
|
|
|
6582
|
-
attr(input, "aria-owns", input_aria_owns_value = /*_isMenuVisible*/ ctx[
|
|
6581
|
+
attr(input, "aria-owns", input_aria_owns_value = /*_isMenuVisible*/ ctx[17]
|
|
6583
6582
|
? `menu-${/*name*/ ctx[0]}`
|
|
6584
6583
|
: undefined);
|
|
6585
6584
|
|
|
6586
6585
|
attr(input, "aria-haspopup", "listbox");
|
|
6587
|
-
input.disabled = /*_disabled*/ ctx[
|
|
6588
|
-
input.readOnly = input_readonly_value = !/*_filterable*/ ctx[
|
|
6586
|
+
input.disabled = /*_disabled*/ ctx[25];
|
|
6587
|
+
input.readOnly = input_readonly_value = !/*_filterable*/ ctx[23];
|
|
6589
6588
|
attr(input, "placeholder", /*placeholder*/ ctx[6]);
|
|
6590
6589
|
attr(input, "name", /*name*/ ctx[0]);
|
|
6591
6590
|
attr(div, "slot", "target");
|
|
6592
|
-
attr(div, "style", div_style_value = cssVar("width", /*width*/ ctx[7]));
|
|
6593
6591
|
attr(div, "class", "dropdown-input-group");
|
|
6594
|
-
toggle_class(div, "dropdown-input-group--disabled", /*_disabled*/ ctx[
|
|
6595
|
-
toggle_class(div, "error", /*_error*/ ctx[
|
|
6592
|
+
toggle_class(div, "dropdown-input-group--disabled", /*_disabled*/ ctx[25]);
|
|
6593
|
+
toggle_class(div, "error", /*_error*/ ctx[26]);
|
|
6596
6594
|
attr(ul, "id", ul_id_value = `menu-${/*name*/ ctx[0]}`);
|
|
6597
6595
|
attr(ul, "role", "listbox");
|
|
6598
6596
|
attr(ul, "tabindex", "-1");
|
|
@@ -6601,20 +6599,19 @@ function create_else_block$a(ctx) {
|
|
|
6601
6599
|
attr(ul, "aria-labelledby", /*arialabelledby*/ ctx[2]);
|
|
6602
6600
|
|
|
6603
6601
|
attr(ul, "style", ul_style_value = `
|
|
6604
|
-
width: ${/*_width*/ ctx[19]};
|
|
6605
6602
|
outline: none;
|
|
6606
6603
|
overflow-y: auto;
|
|
6607
6604
|
max-height: ${/*maxheight*/ ctx[5]};
|
|
6608
6605
|
`);
|
|
6609
6606
|
|
|
6610
|
-
set_custom_element_data(goa_popover, "disabled", /*disabled*/ ctx[
|
|
6611
|
-
set_custom_element_data(goa_popover, "relative", /*relative*/ ctx[
|
|
6607
|
+
set_custom_element_data(goa_popover, "disabled", /*disabled*/ ctx[7]);
|
|
6608
|
+
set_custom_element_data(goa_popover, "relative", /*relative*/ ctx[8]);
|
|
6612
6609
|
set_custom_element_data(goa_popover, "data-testid", "option-list");
|
|
6613
|
-
set_custom_element_data(goa_popover, "maxwidth", "
|
|
6614
|
-
set_custom_element_data(goa_popover, "open", /*_isMenuVisible*/ ctx[
|
|
6610
|
+
set_custom_element_data(goa_popover, "maxwidth", "99999px");
|
|
6611
|
+
set_custom_element_data(goa_popover, "open", /*_isMenuVisible*/ ctx[17]);
|
|
6615
6612
|
set_custom_element_data(goa_popover, "padded", "false");
|
|
6616
6613
|
set_custom_element_data(goa_popover, "tabindex", "-1");
|
|
6617
|
-
set_custom_element_data(goa_popover, "width", /*_width*/ ctx[
|
|
6614
|
+
set_custom_element_data(goa_popover, "width", /*_width*/ ctx[18]);
|
|
6618
6615
|
},
|
|
6619
6616
|
m(target, anchor) {
|
|
6620
6617
|
insert(target, slot, anchor);
|
|
@@ -6644,10 +6641,10 @@ function create_else_block$a(ctx) {
|
|
|
6644
6641
|
|
|
6645
6642
|
if (!mounted) {
|
|
6646
6643
|
dispose = [
|
|
6647
|
-
listen(input, "keydown", /*onInputKeyDown*/ ctx[
|
|
6648
|
-
listen(input, "keyup", /*onInputKeyUp*/ ctx[
|
|
6649
|
-
listen(goa_popover, "_open", /*showMenu*/ ctx[
|
|
6650
|
-
listen(goa_popover, "_close", /*hideMenu*/ ctx[
|
|
6644
|
+
listen(input, "keydown", /*onInputKeyDown*/ ctx[31]),
|
|
6645
|
+
listen(input, "keyup", /*onInputKeyUp*/ ctx[30]),
|
|
6646
|
+
listen(goa_popover, "_open", /*showMenu*/ ctx[27]),
|
|
6647
|
+
listen(goa_popover, "_close", /*hideMenu*/ ctx[28])
|
|
6651
6648
|
];
|
|
6652
6649
|
|
|
6653
6650
|
mounted = true;
|
|
@@ -6667,9 +6664,9 @@ function create_else_block$a(ctx) {
|
|
|
6667
6664
|
if_block0 = null;
|
|
6668
6665
|
}
|
|
6669
6666
|
|
|
6670
|
-
if (dirty[0] & /*_disabled, _filterable*/
|
|
6671
|
-
cursor: ${!/*_disabled*/ ctx[
|
|
6672
|
-
? /*_filterable*/ ctx[
|
|
6667
|
+
if (dirty[0] & /*_disabled, _filterable*/ 41943040 && input_style_value !== (input_style_value = `
|
|
6668
|
+
cursor: ${!/*_disabled*/ ctx[25]
|
|
6669
|
+
? /*_filterable*/ ctx[23] ? "auto" : "pointer"
|
|
6673
6670
|
: "default"};
|
|
6674
6671
|
`)) {
|
|
6675
6672
|
attr(input, "style", input_style_value);
|
|
@@ -6679,8 +6676,8 @@ function create_else_block$a(ctx) {
|
|
|
6679
6676
|
attr(input, "aria-controls", input_aria_controls_value);
|
|
6680
6677
|
}
|
|
6681
6678
|
|
|
6682
|
-
if (dirty[0] & /*_isMenuVisible*/
|
|
6683
|
-
attr(input, "aria-expanded", /*_isMenuVisible*/ ctx[
|
|
6679
|
+
if (dirty[0] & /*_isMenuVisible*/ 131072) {
|
|
6680
|
+
attr(input, "aria-expanded", /*_isMenuVisible*/ ctx[17]);
|
|
6684
6681
|
}
|
|
6685
6682
|
|
|
6686
6683
|
if (dirty[0] & /*arialabel, name*/ 3 && input_aria_label_value !== (input_aria_label_value = /*arialabel*/ ctx[1] || /*name*/ ctx[0])) {
|
|
@@ -6695,25 +6692,25 @@ function create_else_block$a(ctx) {
|
|
|
6695
6692
|
attr(input, "id", /*name*/ ctx[0]);
|
|
6696
6693
|
}
|
|
6697
6694
|
|
|
6698
|
-
if (dirty[0] & /*_activeDescendantId*/
|
|
6699
|
-
attr(input, "aria-activedescendant", /*_activeDescendantId*/ ctx[
|
|
6695
|
+
if (dirty[0] & /*_activeDescendantId*/ 16777216) {
|
|
6696
|
+
attr(input, "aria-activedescendant", /*_activeDescendantId*/ ctx[24]);
|
|
6700
6697
|
}
|
|
6701
6698
|
|
|
6702
|
-
if (dirty[0] & /*_disabled*/
|
|
6703
|
-
attr(input, "aria-disabled", /*_disabled*/ ctx[
|
|
6699
|
+
if (dirty[0] & /*_disabled*/ 33554432) {
|
|
6700
|
+
attr(input, "aria-disabled", /*_disabled*/ ctx[25]);
|
|
6704
6701
|
}
|
|
6705
6702
|
|
|
6706
|
-
if (dirty[0] & /*_isMenuVisible, name*/
|
|
6703
|
+
if (dirty[0] & /*_isMenuVisible, name*/ 131073 && input_aria_owns_value !== (input_aria_owns_value = /*_isMenuVisible*/ ctx[17]
|
|
6707
6704
|
? `menu-${/*name*/ ctx[0]}`
|
|
6708
6705
|
: undefined)) {
|
|
6709
6706
|
attr(input, "aria-owns", input_aria_owns_value);
|
|
6710
6707
|
}
|
|
6711
6708
|
|
|
6712
|
-
if (dirty[0] & /*_disabled*/
|
|
6713
|
-
input.disabled = /*_disabled*/ ctx[
|
|
6709
|
+
if (dirty[0] & /*_disabled*/ 33554432) {
|
|
6710
|
+
input.disabled = /*_disabled*/ ctx[25];
|
|
6714
6711
|
}
|
|
6715
6712
|
|
|
6716
|
-
if (dirty[0] & /*_filterable*/
|
|
6713
|
+
if (dirty[0] & /*_filterable*/ 8388608 && input_readonly_value !== (input_readonly_value = !/*_filterable*/ ctx[23])) {
|
|
6717
6714
|
input.readOnly = input_readonly_value;
|
|
6718
6715
|
}
|
|
6719
6716
|
|
|
@@ -6737,20 +6734,16 @@ function create_else_block$a(ctx) {
|
|
|
6737
6734
|
}
|
|
6738
6735
|
}
|
|
6739
6736
|
|
|
6740
|
-
if (dirty[0] & /*
|
|
6741
|
-
|
|
6742
|
-
}
|
|
6743
|
-
|
|
6744
|
-
if (dirty[0] & /*_disabled*/ 67108864) {
|
|
6745
|
-
toggle_class(div, "dropdown-input-group--disabled", /*_disabled*/ ctx[26]);
|
|
6737
|
+
if (dirty[0] & /*_disabled*/ 33554432) {
|
|
6738
|
+
toggle_class(div, "dropdown-input-group--disabled", /*_disabled*/ ctx[25]);
|
|
6746
6739
|
}
|
|
6747
6740
|
|
|
6748
|
-
if (dirty[0] & /*_error*/
|
|
6749
|
-
toggle_class(div, "error", /*_error*/ ctx[
|
|
6741
|
+
if (dirty[0] & /*_error*/ 67108864) {
|
|
6742
|
+
toggle_class(div, "error", /*_error*/ ctx[26]);
|
|
6750
6743
|
}
|
|
6751
6744
|
|
|
6752
|
-
if (dirty[0] & /*_filteredOptions, _inputEl, _highlightedIndex, onSelect*/
|
|
6753
|
-
each_value_1 = /*_filteredOptions*/ ctx[
|
|
6745
|
+
if (dirty[0] & /*_filteredOptions, _inputEl, _highlightedIndex, onSelect*/ 541089792) {
|
|
6746
|
+
each_value_1 = /*_filteredOptions*/ ctx[14];
|
|
6754
6747
|
each_blocks = update_keyed_each(each_blocks, dirty, get_key, 1, ctx, each_value_1, each_1_lookup, ul, destroy_block, create_each_block_1$1, null, get_each_context_1$1);
|
|
6755
6748
|
|
|
6756
6749
|
if (!each_value_1.length && each_1_else) {
|
|
@@ -6777,8 +6770,7 @@ function create_else_block$a(ctx) {
|
|
|
6777
6770
|
attr(ul, "aria-labelledby", /*arialabelledby*/ ctx[2]);
|
|
6778
6771
|
}
|
|
6779
6772
|
|
|
6780
|
-
if (dirty[0] & /*
|
|
6781
|
-
width: ${/*_width*/ ctx[19]};
|
|
6773
|
+
if (dirty[0] & /*maxheight*/ 32 && ul_style_value !== (ul_style_value = `
|
|
6782
6774
|
outline: none;
|
|
6783
6775
|
overflow-y: auto;
|
|
6784
6776
|
max-height: ${/*maxheight*/ ctx[5]};
|
|
@@ -6786,20 +6778,20 @@ function create_else_block$a(ctx) {
|
|
|
6786
6778
|
attr(ul, "style", ul_style_value);
|
|
6787
6779
|
}
|
|
6788
6780
|
|
|
6789
|
-
if (dirty[0] & /*disabled*/
|
|
6790
|
-
set_custom_element_data(goa_popover, "disabled", /*disabled*/ ctx[
|
|
6781
|
+
if (dirty[0] & /*disabled*/ 128) {
|
|
6782
|
+
set_custom_element_data(goa_popover, "disabled", /*disabled*/ ctx[7]);
|
|
6791
6783
|
}
|
|
6792
6784
|
|
|
6793
|
-
if (dirty[0] & /*relative*/
|
|
6794
|
-
set_custom_element_data(goa_popover, "relative", /*relative*/ ctx[
|
|
6785
|
+
if (dirty[0] & /*relative*/ 256) {
|
|
6786
|
+
set_custom_element_data(goa_popover, "relative", /*relative*/ ctx[8]);
|
|
6795
6787
|
}
|
|
6796
6788
|
|
|
6797
|
-
if (dirty[0] & /*_isMenuVisible*/
|
|
6798
|
-
set_custom_element_data(goa_popover, "open", /*_isMenuVisible*/ ctx[
|
|
6789
|
+
if (dirty[0] & /*_isMenuVisible*/ 131072) {
|
|
6790
|
+
set_custom_element_data(goa_popover, "open", /*_isMenuVisible*/ ctx[17]);
|
|
6799
6791
|
}
|
|
6800
6792
|
|
|
6801
|
-
if (dirty[0] & /*_width*/
|
|
6802
|
-
set_custom_element_data(goa_popover, "width", /*_width*/ ctx[
|
|
6793
|
+
if (dirty[0] & /*_width*/ 262144) {
|
|
6794
|
+
set_custom_element_data(goa_popover, "width", /*_width*/ ctx[18]);
|
|
6803
6795
|
}
|
|
6804
6796
|
},
|
|
6805
6797
|
d(detaching) {
|
|
@@ -6822,14 +6814,14 @@ function create_else_block$a(ctx) {
|
|
|
6822
6814
|
};
|
|
6823
6815
|
}
|
|
6824
6816
|
|
|
6825
|
-
// (
|
|
6817
|
+
// (438:2) {#if _native}
|
|
6826
6818
|
function create_if_block$p(ctx) {
|
|
6827
6819
|
let select;
|
|
6828
6820
|
let slot;
|
|
6829
6821
|
let select_aria_label_value;
|
|
6830
6822
|
let mounted;
|
|
6831
6823
|
let dispose;
|
|
6832
|
-
let each_value = /*_options*/ ctx[
|
|
6824
|
+
let each_value = /*_options*/ ctx[16];
|
|
6833
6825
|
let each_blocks = [];
|
|
6834
6826
|
|
|
6835
6827
|
for (let i = 0; i < each_value.length; i += 1) {
|
|
@@ -6848,9 +6840,9 @@ function create_if_block$p(ctx) {
|
|
|
6848
6840
|
attr(select, "name", /*name*/ ctx[0]);
|
|
6849
6841
|
attr(select, "aria-label", select_aria_label_value = /*arialabel*/ ctx[1] || /*name*/ ctx[0]);
|
|
6850
6842
|
attr(select, "aria-labelledby", /*arialabelledby*/ ctx[2]);
|
|
6851
|
-
select.disabled = /*_disabled*/ ctx[
|
|
6843
|
+
select.disabled = /*_disabled*/ ctx[25];
|
|
6852
6844
|
attr(select, "id", /*name*/ ctx[0]);
|
|
6853
|
-
toggle_class(select, "error", /*_error*/ ctx[
|
|
6845
|
+
toggle_class(select, "error", /*_error*/ ctx[26]);
|
|
6854
6846
|
},
|
|
6855
6847
|
m(target, anchor) {
|
|
6856
6848
|
insert(target, select, anchor);
|
|
@@ -6865,13 +6857,13 @@ function create_if_block$p(ctx) {
|
|
|
6865
6857
|
/*select_binding*/ ctx[41](select);
|
|
6866
6858
|
|
|
6867
6859
|
if (!mounted) {
|
|
6868
|
-
dispose = listen(select, "change", /*onNativeSelect*/ ctx[
|
|
6860
|
+
dispose = listen(select, "change", /*onNativeSelect*/ ctx[34]);
|
|
6869
6861
|
mounted = true;
|
|
6870
6862
|
}
|
|
6871
6863
|
},
|
|
6872
6864
|
p(ctx, dirty) {
|
|
6873
|
-
if (dirty[0] & /*value, _options*/
|
|
6874
|
-
each_value = /*_options*/ ctx[
|
|
6865
|
+
if (dirty[0] & /*value, _options*/ 65544) {
|
|
6866
|
+
each_value = /*_options*/ ctx[16];
|
|
6875
6867
|
let i;
|
|
6876
6868
|
|
|
6877
6869
|
for (i = 0; i < each_value.length; i += 1) {
|
|
@@ -6905,16 +6897,16 @@ function create_if_block$p(ctx) {
|
|
|
6905
6897
|
attr(select, "aria-labelledby", /*arialabelledby*/ ctx[2]);
|
|
6906
6898
|
}
|
|
6907
6899
|
|
|
6908
|
-
if (dirty[0] & /*_disabled*/
|
|
6909
|
-
select.disabled = /*_disabled*/ ctx[
|
|
6900
|
+
if (dirty[0] & /*_disabled*/ 33554432) {
|
|
6901
|
+
select.disabled = /*_disabled*/ ctx[25];
|
|
6910
6902
|
}
|
|
6911
6903
|
|
|
6912
6904
|
if (dirty[0] & /*name*/ 1) {
|
|
6913
6905
|
attr(select, "id", /*name*/ ctx[0]);
|
|
6914
6906
|
}
|
|
6915
6907
|
|
|
6916
|
-
if (dirty[0] & /*_error*/
|
|
6917
|
-
toggle_class(select, "error", /*_error*/ ctx[
|
|
6908
|
+
if (dirty[0] & /*_error*/ 67108864) {
|
|
6909
|
+
toggle_class(select, "error", /*_error*/ ctx[26]);
|
|
6918
6910
|
}
|
|
6919
6911
|
},
|
|
6920
6912
|
d(detaching) {
|
|
@@ -6927,7 +6919,7 @@ function create_if_block$p(ctx) {
|
|
|
6927
6919
|
};
|
|
6928
6920
|
}
|
|
6929
6921
|
|
|
6930
|
-
// (
|
|
6922
|
+
// (480:8) {#if leadingicon}
|
|
6931
6923
|
function create_if_block_2$b(ctx) {
|
|
6932
6924
|
let goa_icon;
|
|
6933
6925
|
|
|
@@ -6952,7 +6944,7 @@ function create_if_block_2$b(ctx) {
|
|
|
6952
6944
|
};
|
|
6953
6945
|
}
|
|
6954
6946
|
|
|
6955
|
-
// (
|
|
6947
|
+
// (530:8) {:else}
|
|
6956
6948
|
function create_else_block_2(ctx) {
|
|
6957
6949
|
let goa_icon;
|
|
6958
6950
|
let goa_icon_arialabel_value;
|
|
@@ -6970,11 +6962,11 @@ function create_else_block_2(ctx) {
|
|
|
6970
6962
|
set_custom_element_data(goa_icon, "id", /*name*/ ctx[0]);
|
|
6971
6963
|
set_custom_element_data(goa_icon, "arialabel", goa_icon_arialabel_value = /*arialabel*/ ctx[1] || /*name*/ ctx[0]);
|
|
6972
6964
|
set_custom_element_data(goa_icon, "ariacontrols", goa_icon_ariacontrols_value = `menu-${/*name*/ ctx[0]}`);
|
|
6973
|
-
set_custom_element_data(goa_icon, "ariaexpanded", goa_icon_ariaexpanded_value = fromBoolean(/*_isMenuVisible*/ ctx[
|
|
6965
|
+
set_custom_element_data(goa_icon, "ariaexpanded", goa_icon_ariaexpanded_value = fromBoolean(/*_isMenuVisible*/ ctx[17]));
|
|
6974
6966
|
set_custom_element_data(goa_icon, "class", "dropdown-icon--arrow");
|
|
6975
6967
|
set_custom_element_data(goa_icon, "size", "medium");
|
|
6976
6968
|
|
|
6977
|
-
set_custom_element_data(goa_icon, "type", goa_icon_type_value = /*_isMenuVisible*/ ctx[
|
|
6969
|
+
set_custom_element_data(goa_icon, "type", goa_icon_type_value = /*_isMenuVisible*/ ctx[17]
|
|
6978
6970
|
? "chevron-up"
|
|
6979
6971
|
: "chevron-down");
|
|
6980
6972
|
},
|
|
@@ -6982,7 +6974,7 @@ function create_else_block_2(ctx) {
|
|
|
6982
6974
|
insert(target, goa_icon, anchor);
|
|
6983
6975
|
|
|
6984
6976
|
if (!mounted) {
|
|
6985
|
-
dispose = listen(goa_icon, "click", /*onChevronClick*/ ctx[
|
|
6977
|
+
dispose = listen(goa_icon, "click", /*onChevronClick*/ ctx[35]);
|
|
6986
6978
|
mounted = true;
|
|
6987
6979
|
}
|
|
6988
6980
|
},
|
|
@@ -6999,11 +6991,11 @@ function create_else_block_2(ctx) {
|
|
|
6999
6991
|
set_custom_element_data(goa_icon, "ariacontrols", goa_icon_ariacontrols_value);
|
|
7000
6992
|
}
|
|
7001
6993
|
|
|
7002
|
-
if (dirty[0] & /*_isMenuVisible*/
|
|
6994
|
+
if (dirty[0] & /*_isMenuVisible*/ 131072 && goa_icon_ariaexpanded_value !== (goa_icon_ariaexpanded_value = fromBoolean(/*_isMenuVisible*/ ctx[17]))) {
|
|
7003
6995
|
set_custom_element_data(goa_icon, "ariaexpanded", goa_icon_ariaexpanded_value);
|
|
7004
6996
|
}
|
|
7005
6997
|
|
|
7006
|
-
if (dirty[0] & /*_isMenuVisible*/
|
|
6998
|
+
if (dirty[0] & /*_isMenuVisible*/ 131072 && goa_icon_type_value !== (goa_icon_type_value = /*_isMenuVisible*/ ctx[17]
|
|
7007
6999
|
? "chevron-up"
|
|
7008
7000
|
: "chevron-down")) {
|
|
7009
7001
|
set_custom_element_data(goa_icon, "type", goa_icon_type_value);
|
|
@@ -7017,7 +7009,7 @@ function create_else_block_2(ctx) {
|
|
|
7017
7009
|
};
|
|
7018
7010
|
}
|
|
7019
7011
|
|
|
7020
|
-
// (
|
|
7012
|
+
// (515:8) {#if _inputEl?.value && _filterable}
|
|
7021
7013
|
function create_if_block_1$d(ctx) {
|
|
7022
7014
|
let goa_icon;
|
|
7023
7015
|
let goa_icon_tabindex_value;
|
|
@@ -7031,23 +7023,23 @@ function create_if_block_1$d(ctx) {
|
|
|
7031
7023
|
c() {
|
|
7032
7024
|
goa_icon = element("goa-icon");
|
|
7033
7025
|
set_custom_element_data(goa_icon, "id", /*name*/ ctx[0]);
|
|
7034
|
-
set_custom_element_data(goa_icon, "tabindex", goa_icon_tabindex_value = /*_disabled*/ ctx[
|
|
7026
|
+
set_custom_element_data(goa_icon, "tabindex", goa_icon_tabindex_value = /*_disabled*/ ctx[25] ? -1 : 0);
|
|
7035
7027
|
set_custom_element_data(goa_icon, "role", "button");
|
|
7036
7028
|
set_custom_element_data(goa_icon, "arialabel", goa_icon_arialabel_value = `clear ${/*arialabel*/ ctx[1] || /*name*/ ctx[0]}`);
|
|
7037
7029
|
set_custom_element_data(goa_icon, "ariacontrols", goa_icon_ariacontrols_value = `menu-${/*name*/ ctx[0]}`);
|
|
7038
|
-
set_custom_element_data(goa_icon, "ariaexpanded", goa_icon_ariaexpanded_value = fromBoolean(/*_isMenuVisible*/ ctx[
|
|
7030
|
+
set_custom_element_data(goa_icon, "ariaexpanded", goa_icon_ariaexpanded_value = fromBoolean(/*_isMenuVisible*/ ctx[17]));
|
|
7039
7031
|
set_custom_element_data(goa_icon, "class", "dropdown-icon--clear");
|
|
7040
7032
|
set_custom_element_data(goa_icon, "size", "medium");
|
|
7041
7033
|
set_custom_element_data(goa_icon, "type", "close");
|
|
7042
|
-
toggle_class(goa_icon, "disabled", /*_disabled*/ ctx[
|
|
7034
|
+
toggle_class(goa_icon, "disabled", /*_disabled*/ ctx[25]);
|
|
7043
7035
|
},
|
|
7044
7036
|
m(target, anchor) {
|
|
7045
7037
|
insert(target, goa_icon, anchor);
|
|
7046
7038
|
|
|
7047
7039
|
if (!mounted) {
|
|
7048
7040
|
dispose = [
|
|
7049
|
-
listen(goa_icon, "click", stop_propagation(/*onClearIconClick*/ ctx[
|
|
7050
|
-
listen(goa_icon, "keydown", /*onClearIconKeyDown*/ ctx[
|
|
7041
|
+
listen(goa_icon, "click", stop_propagation(/*onClearIconClick*/ ctx[33])),
|
|
7042
|
+
listen(goa_icon, "keydown", /*onClearIconKeyDown*/ ctx[32])
|
|
7051
7043
|
];
|
|
7052
7044
|
|
|
7053
7045
|
mounted = true;
|
|
@@ -7058,7 +7050,7 @@ function create_if_block_1$d(ctx) {
|
|
|
7058
7050
|
set_custom_element_data(goa_icon, "id", /*name*/ ctx[0]);
|
|
7059
7051
|
}
|
|
7060
7052
|
|
|
7061
|
-
if (dirty[0] & /*_disabled*/
|
|
7053
|
+
if (dirty[0] & /*_disabled*/ 33554432 && goa_icon_tabindex_value !== (goa_icon_tabindex_value = /*_disabled*/ ctx[25] ? -1 : 0)) {
|
|
7062
7054
|
set_custom_element_data(goa_icon, "tabindex", goa_icon_tabindex_value);
|
|
7063
7055
|
}
|
|
7064
7056
|
|
|
@@ -7070,12 +7062,12 @@ function create_if_block_1$d(ctx) {
|
|
|
7070
7062
|
set_custom_element_data(goa_icon, "ariacontrols", goa_icon_ariacontrols_value);
|
|
7071
7063
|
}
|
|
7072
7064
|
|
|
7073
|
-
if (dirty[0] & /*_isMenuVisible*/
|
|
7065
|
+
if (dirty[0] & /*_isMenuVisible*/ 131072 && goa_icon_ariaexpanded_value !== (goa_icon_ariaexpanded_value = fromBoolean(/*_isMenuVisible*/ ctx[17]))) {
|
|
7074
7066
|
set_custom_element_data(goa_icon, "ariaexpanded", goa_icon_ariaexpanded_value);
|
|
7075
7067
|
}
|
|
7076
7068
|
|
|
7077
|
-
if (dirty[0] & /*_disabled*/
|
|
7078
|
-
toggle_class(goa_icon, "disabled", /*_disabled*/ ctx[
|
|
7069
|
+
if (dirty[0] & /*_disabled*/ 33554432) {
|
|
7070
|
+
toggle_class(goa_icon, "disabled", /*_disabled*/ ctx[25]);
|
|
7079
7071
|
}
|
|
7080
7072
|
},
|
|
7081
7073
|
d(detaching) {
|
|
@@ -7086,7 +7078,7 @@ function create_if_block_1$d(ctx) {
|
|
|
7086
7078
|
};
|
|
7087
7079
|
}
|
|
7088
7080
|
|
|
7089
|
-
// (
|
|
7081
|
+
// (577:8) {:else}
|
|
7090
7082
|
function create_else_block_1(ctx) {
|
|
7091
7083
|
let li;
|
|
7092
7084
|
|
|
@@ -7107,7 +7099,7 @@ function create_else_block_1(ctx) {
|
|
|
7107
7099
|
};
|
|
7108
7100
|
}
|
|
7109
7101
|
|
|
7110
|
-
// (
|
|
7102
|
+
// (561:8) {#each _filteredOptions as option, index (index)}
|
|
7111
7103
|
function create_each_block_1$1(key_1, ctx) {
|
|
7112
7104
|
let li;
|
|
7113
7105
|
let t0_value = (/*option*/ ctx[61].label || /*option*/ ctx[61].value) + "";
|
|
@@ -7133,15 +7125,15 @@ function create_each_block_1$1(key_1, ctx) {
|
|
|
7133
7125
|
t0 = text(t0_value);
|
|
7134
7126
|
t1 = space();
|
|
7135
7127
|
attr(li, "id", li_id_value = /*option*/ ctx[61].value);
|
|
7136
|
-
attr(li, "aria-selected", li_aria_selected_value = /*_inputEl*/ ctx[
|
|
7128
|
+
attr(li, "aria-selected", li_aria_selected_value = /*_inputEl*/ ctx[22].value === (/*option*/ ctx[61].label || /*option*/ ctx[61].value));
|
|
7137
7129
|
attr(li, "class", "dropdown-item");
|
|
7138
7130
|
attr(li, "data-index", li_data_index_value = /*index*/ ctx[65]);
|
|
7139
7131
|
attr(li, "data-testid", li_data_testid_value = `dropdown-item-${/*option*/ ctx[61].value}`);
|
|
7140
7132
|
attr(li, "data-value", li_data_value_value = /*option*/ ctx[61].value);
|
|
7141
7133
|
attr(li, "role", "option");
|
|
7142
7134
|
set_style(li, "display", "block");
|
|
7143
|
-
toggle_class(li, "dropdown-item--highlighted", /*index*/ ctx[65] === /*_highlightedIndex*/ ctx[
|
|
7144
|
-
toggle_class(li, "selected", /*_inputEl*/ ctx[
|
|
7135
|
+
toggle_class(li, "dropdown-item--highlighted", /*index*/ ctx[65] === /*_highlightedIndex*/ ctx[13]);
|
|
7136
|
+
toggle_class(li, "selected", /*_inputEl*/ ctx[22].value === (/*option*/ ctx[61].label || /*option*/ ctx[61].value));
|
|
7145
7137
|
this.first = li;
|
|
7146
7138
|
},
|
|
7147
7139
|
m(target, anchor) {
|
|
@@ -7156,34 +7148,34 @@ function create_each_block_1$1(key_1, ctx) {
|
|
|
7156
7148
|
},
|
|
7157
7149
|
p(new_ctx, dirty) {
|
|
7158
7150
|
ctx = new_ctx;
|
|
7159
|
-
if (dirty[0] & /*_filteredOptions*/
|
|
7151
|
+
if (dirty[0] & /*_filteredOptions*/ 16384 && t0_value !== (t0_value = (/*option*/ ctx[61].label || /*option*/ ctx[61].value) + "")) set_data(t0, t0_value);
|
|
7160
7152
|
|
|
7161
|
-
if (dirty[0] & /*_filteredOptions*/
|
|
7153
|
+
if (dirty[0] & /*_filteredOptions*/ 16384 && li_id_value !== (li_id_value = /*option*/ ctx[61].value)) {
|
|
7162
7154
|
attr(li, "id", li_id_value);
|
|
7163
7155
|
}
|
|
7164
7156
|
|
|
7165
|
-
if (dirty[0] & /*_inputEl, _filteredOptions*/
|
|
7157
|
+
if (dirty[0] & /*_inputEl, _filteredOptions*/ 4210688 && li_aria_selected_value !== (li_aria_selected_value = /*_inputEl*/ ctx[22].value === (/*option*/ ctx[61].label || /*option*/ ctx[61].value))) {
|
|
7166
7158
|
attr(li, "aria-selected", li_aria_selected_value);
|
|
7167
7159
|
}
|
|
7168
7160
|
|
|
7169
|
-
if (dirty[0] & /*_filteredOptions*/
|
|
7161
|
+
if (dirty[0] & /*_filteredOptions*/ 16384 && li_data_index_value !== (li_data_index_value = /*index*/ ctx[65])) {
|
|
7170
7162
|
attr(li, "data-index", li_data_index_value);
|
|
7171
7163
|
}
|
|
7172
7164
|
|
|
7173
|
-
if (dirty[0] & /*_filteredOptions*/
|
|
7165
|
+
if (dirty[0] & /*_filteredOptions*/ 16384 && li_data_testid_value !== (li_data_testid_value = `dropdown-item-${/*option*/ ctx[61].value}`)) {
|
|
7174
7166
|
attr(li, "data-testid", li_data_testid_value);
|
|
7175
7167
|
}
|
|
7176
7168
|
|
|
7177
|
-
if (dirty[0] & /*_filteredOptions*/
|
|
7169
|
+
if (dirty[0] & /*_filteredOptions*/ 16384 && li_data_value_value !== (li_data_value_value = /*option*/ ctx[61].value)) {
|
|
7178
7170
|
attr(li, "data-value", li_data_value_value);
|
|
7179
7171
|
}
|
|
7180
7172
|
|
|
7181
|
-
if (dirty[0] & /*_filteredOptions, _highlightedIndex*/
|
|
7182
|
-
toggle_class(li, "dropdown-item--highlighted", /*index*/ ctx[65] === /*_highlightedIndex*/ ctx[
|
|
7173
|
+
if (dirty[0] & /*_filteredOptions, _highlightedIndex*/ 24576) {
|
|
7174
|
+
toggle_class(li, "dropdown-item--highlighted", /*index*/ ctx[65] === /*_highlightedIndex*/ ctx[13]);
|
|
7183
7175
|
}
|
|
7184
7176
|
|
|
7185
|
-
if (dirty[0] & /*_inputEl, _filteredOptions*/
|
|
7186
|
-
toggle_class(li, "selected", /*_inputEl*/ ctx[
|
|
7177
|
+
if (dirty[0] & /*_inputEl, _filteredOptions*/ 4210688) {
|
|
7178
|
+
toggle_class(li, "selected", /*_inputEl*/ ctx[22].value === (/*option*/ ctx[61].label || /*option*/ ctx[61].value));
|
|
7187
7179
|
}
|
|
7188
7180
|
},
|
|
7189
7181
|
d(detaching) {
|
|
@@ -7194,7 +7186,7 @@ function create_each_block_1$1(key_1, ctx) {
|
|
|
7194
7186
|
};
|
|
7195
7187
|
}
|
|
7196
7188
|
|
|
7197
|
-
// (
|
|
7189
|
+
// (450:6) {#each _options as option}
|
|
7198
7190
|
function create_each_block$8(ctx) {
|
|
7199
7191
|
let option;
|
|
7200
7192
|
let t0_value = /*option*/ ctx[61].label + "";
|
|
@@ -7218,13 +7210,13 @@ function create_each_block$8(ctx) {
|
|
|
7218
7210
|
append(option, t1);
|
|
7219
7211
|
},
|
|
7220
7212
|
p(ctx, dirty) {
|
|
7221
|
-
if (dirty[0] & /*_options*/
|
|
7213
|
+
if (dirty[0] & /*_options*/ 65536 && t0_value !== (t0_value = /*option*/ ctx[61].label + "")) set_data(t0, t0_value);
|
|
7222
7214
|
|
|
7223
|
-
if (dirty[0] & /*value, _options*/
|
|
7215
|
+
if (dirty[0] & /*value, _options*/ 65544 && option_selected_value !== (option_selected_value = /*value*/ ctx[3] === /*option*/ ctx[61].value)) {
|
|
7224
7216
|
option.selected = option_selected_value;
|
|
7225
7217
|
}
|
|
7226
7218
|
|
|
7227
|
-
if (dirty[0] & /*_options*/
|
|
7219
|
+
if (dirty[0] & /*_options*/ 65536 && option_value_value !== (option_value_value = /*option*/ ctx[61].value)) {
|
|
7228
7220
|
option.__value = option_value_value;
|
|
7229
7221
|
option.value = option.__value;
|
|
7230
7222
|
}
|
|
@@ -7241,7 +7233,7 @@ function create_fragment$J(ctx) {
|
|
|
7241
7233
|
let div_style_value;
|
|
7242
7234
|
|
|
7243
7235
|
function select_block_type(ctx, dirty) {
|
|
7244
|
-
if (/*_native*/ ctx[
|
|
7236
|
+
if (/*_native*/ ctx[15]) return create_if_block$p;
|
|
7245
7237
|
return create_else_block$a;
|
|
7246
7238
|
}
|
|
7247
7239
|
|
|
@@ -7257,11 +7249,11 @@ function create_fragment$J(ctx) {
|
|
|
7257
7249
|
attr(div, "class", "dropdown");
|
|
7258
7250
|
|
|
7259
7251
|
attr(div, "style", div_style_value = `
|
|
7260
|
-
|
|
7261
|
-
${
|
|
7252
|
+
${calculateMargin(/*mt*/ ctx[9], /*mr*/ ctx[10], /*mb*/ ctx[11], /*ml*/ ctx[12])};
|
|
7253
|
+
--width: ${/*_width*/ ctx[18]};
|
|
7262
7254
|
`);
|
|
7263
7255
|
|
|
7264
|
-
toggle_class(div, "dropdown-native", /*_native*/ ctx[
|
|
7256
|
+
toggle_class(div, "dropdown-native", /*_native*/ ctx[15]);
|
|
7265
7257
|
},
|
|
7266
7258
|
m(target, anchor) {
|
|
7267
7259
|
insert(target, div, anchor);
|
|
@@ -7285,15 +7277,15 @@ function create_fragment$J(ctx) {
|
|
|
7285
7277
|
attr(div, "data-testid", div_data_testid_value);
|
|
7286
7278
|
}
|
|
7287
7279
|
|
|
7288
|
-
if (dirty[0] & /*
|
|
7289
|
-
|
|
7290
|
-
${
|
|
7280
|
+
if (dirty[0] & /*mt, mr, mb, ml, _width*/ 269824 && div_style_value !== (div_style_value = `
|
|
7281
|
+
${calculateMargin(/*mt*/ ctx[9], /*mr*/ ctx[10], /*mb*/ ctx[11], /*ml*/ ctx[12])};
|
|
7282
|
+
--width: ${/*_width*/ ctx[18]};
|
|
7291
7283
|
`)) {
|
|
7292
7284
|
attr(div, "style", div_style_value);
|
|
7293
7285
|
}
|
|
7294
7286
|
|
|
7295
|
-
if (dirty[0] & /*_native*/
|
|
7296
|
-
toggle_class(div, "dropdown-native", /*_native*/ ctx[
|
|
7287
|
+
if (dirty[0] & /*_native*/ 32768) {
|
|
7288
|
+
toggle_class(div, "dropdown-native", /*_native*/ ctx[15]);
|
|
7297
7289
|
}
|
|
7298
7290
|
},
|
|
7299
7291
|
i: noop,
|
|
@@ -7357,7 +7349,7 @@ function instance$G($$self, $$props, $$invalidate) {
|
|
|
7357
7349
|
|
|
7358
7350
|
//
|
|
7359
7351
|
// Private
|
|
7360
|
-
//
|
|
7352
|
+
//
|
|
7361
7353
|
let _options = [];
|
|
7362
7354
|
|
|
7363
7355
|
let _isMenuVisible = false;
|
|
@@ -7384,11 +7376,11 @@ function instance$G($$self, $$props, $$invalidate) {
|
|
|
7384
7376
|
|
|
7385
7377
|
// the following is required to appease the jest testing gods in that they don't respond
|
|
7386
7378
|
// to the slotchange event
|
|
7387
|
-
$$invalidate(
|
|
7379
|
+
$$invalidate(16, _options = getOptions());
|
|
7388
7380
|
|
|
7389
7381
|
if (!_native) {
|
|
7390
7382
|
$$invalidate(
|
|
7391
|
-
|
|
7383
|
+
22,
|
|
7392
7384
|
_inputEl.value = (_b = (_a = _options.find(o => o.value === value)) === null || _a === void 0
|
|
7393
7385
|
? void 0
|
|
7394
7386
|
: _a.label) !== null && _b !== void 0
|
|
@@ -7397,7 +7389,20 @@ function instance$G($$self, $$props, $$invalidate) {
|
|
|
7397
7389
|
_inputEl
|
|
7398
7390
|
);
|
|
7399
7391
|
|
|
7400
|
-
|
|
7392
|
+
if (width) {
|
|
7393
|
+
if (width.endsWith("%")) {
|
|
7394
|
+
const percent = parseInt(width) / 100;
|
|
7395
|
+
const rootRect = _rootEl.getBoundingClientRect();
|
|
7396
|
+
$$invalidate(18, _width = percent * rootRect.width + "px");
|
|
7397
|
+
} else {
|
|
7398
|
+
$$invalidate(18, _width = width);
|
|
7399
|
+
}
|
|
7400
|
+
}
|
|
7401
|
+
|
|
7402
|
+
// This is only here to allow the Jest tests to pass :(
|
|
7403
|
+
if (!width && _options.length > 0) {
|
|
7404
|
+
$$invalidate(18, _width = getLongestChildWidth(_options));
|
|
7405
|
+
}
|
|
7401
7406
|
}
|
|
7402
7407
|
|
|
7403
7408
|
syncFilteredOptions();
|
|
@@ -7408,21 +7413,15 @@ function instance$G($$self, $$props, $$invalidate) {
|
|
|
7408
7413
|
slot === null || slot === void 0
|
|
7409
7414
|
? void 0
|
|
7410
7415
|
: slot.addEventListener("slotchange", _ => {
|
|
7411
|
-
|
|
7412
|
-
$$invalidate(17, _options = getOptions());
|
|
7416
|
+
$$invalidate(16, _options = getOptions());
|
|
7413
7417
|
syncFilteredOptions();
|
|
7414
|
-
|
|
7418
|
+
|
|
7419
|
+
if (!width) {
|
|
7420
|
+
$$invalidate(18, _width = getLongestChildWidth(_options));
|
|
7421
|
+
}
|
|
7415
7422
|
|
|
7416
7423
|
if (!_native) {
|
|
7417
|
-
|
|
7418
|
-
23,
|
|
7419
|
-
_inputEl.value = (_b = (_a = _options.find(o => o.value === value)) === null || _a === void 0
|
|
7420
|
-
? void 0
|
|
7421
|
-
: _a.label) !== null && _b !== void 0
|
|
7422
|
-
? _b
|
|
7423
|
-
: "",
|
|
7424
|
-
_inputEl
|
|
7425
|
-
);
|
|
7424
|
+
setDisplayedValue();
|
|
7426
7425
|
}
|
|
7427
7426
|
});
|
|
7428
7427
|
});
|
|
@@ -7438,7 +7437,7 @@ function instance$G($$self, $$props, $$invalidate) {
|
|
|
7438
7437
|
const option = _options.find(o => o.value == _values[0]); // possible string number comparison
|
|
7439
7438
|
|
|
7440
7439
|
$$invalidate(
|
|
7441
|
-
|
|
7440
|
+
22,
|
|
7442
7441
|
_inputEl.value = (_b = (_a = option === null || option === void 0
|
|
7443
7442
|
? void 0
|
|
7444
7443
|
: option.label) !== null && _a !== void 0
|
|
@@ -7481,7 +7480,7 @@ function instance$G($$self, $$props, $$invalidate) {
|
|
|
7481
7480
|
}
|
|
7482
7481
|
|
|
7483
7482
|
// compute the required width to ensure all children fit
|
|
7484
|
-
function
|
|
7483
|
+
function getLongestChildWidth(options) {
|
|
7485
7484
|
// set width to longest item
|
|
7486
7485
|
const optionsWidth = options.map(option => {
|
|
7487
7486
|
const label = `${option.label}` || `${option.value}` || "";
|
|
@@ -7518,7 +7517,7 @@ function instance$G($$self, $$props, $$invalidate) {
|
|
|
7518
7517
|
index = _filterable ? 0 : items.length - 1;
|
|
7519
7518
|
}
|
|
7520
7519
|
|
|
7521
|
-
$$invalidate(
|
|
7520
|
+
$$invalidate(13, _highlightedIndex = index);
|
|
7522
7521
|
scrollToOption(index);
|
|
7523
7522
|
}
|
|
7524
7523
|
|
|
@@ -7533,7 +7532,7 @@ function instance$G($$self, $$props, $$invalidate) {
|
|
|
7533
7532
|
}
|
|
7534
7533
|
|
|
7535
7534
|
function syncFilteredOptions() {
|
|
7536
|
-
$$invalidate(
|
|
7535
|
+
$$invalidate(14, _filteredOptions = _filterable
|
|
7537
7536
|
? _options.filter(option => isFilterMatch(option, _inputEl.value))
|
|
7538
7537
|
: _options);
|
|
7539
7538
|
}
|
|
@@ -7546,7 +7545,7 @@ function instance$G($$self, $$props, $$invalidate) {
|
|
|
7546
7545
|
setTimeout(
|
|
7547
7546
|
() => {
|
|
7548
7547
|
syncFilteredOptions();
|
|
7549
|
-
$$invalidate(
|
|
7548
|
+
$$invalidate(17, _isMenuVisible = true);
|
|
7550
7549
|
_inputEl.focus();
|
|
7551
7550
|
},
|
|
7552
7551
|
0
|
|
@@ -7554,7 +7553,7 @@ function instance$G($$self, $$props, $$invalidate) {
|
|
|
7554
7553
|
}
|
|
7555
7554
|
|
|
7556
7555
|
function hideMenu() {
|
|
7557
|
-
$$invalidate(
|
|
7556
|
+
$$invalidate(17, _isMenuVisible = false);
|
|
7558
7557
|
}
|
|
7559
7558
|
|
|
7560
7559
|
function dispatchValue(value) {
|
|
@@ -7571,16 +7570,16 @@ function instance$G($$self, $$props, $$invalidate) {
|
|
|
7571
7570
|
);
|
|
7572
7571
|
}
|
|
7573
7572
|
|
|
7574
|
-
//
|
|
7573
|
+
//
|
|
7575
7574
|
// Event handlers
|
|
7576
|
-
//
|
|
7575
|
+
//
|
|
7577
7576
|
function onSelect(option) {
|
|
7578
7577
|
if (_disabled) return;
|
|
7579
7578
|
|
|
7580
7579
|
if (!_native) {
|
|
7581
7580
|
_isDirty = true;
|
|
7582
7581
|
hideMenu();
|
|
7583
|
-
$$invalidate(
|
|
7582
|
+
$$invalidate(22, _inputEl.value = option.label, _inputEl);
|
|
7584
7583
|
}
|
|
7585
7584
|
|
|
7586
7585
|
dispatchValue(option.value);
|
|
@@ -7618,9 +7617,9 @@ function instance$G($$self, $$props, $$invalidate) {
|
|
|
7618
7617
|
|
|
7619
7618
|
function reset() {
|
|
7620
7619
|
if (_disabled) return;
|
|
7621
|
-
$$invalidate(
|
|
7622
|
-
$$invalidate(
|
|
7623
|
-
$$invalidate(
|
|
7620
|
+
$$invalidate(24, _activeDescendantId = undefined);
|
|
7621
|
+
$$invalidate(13, _highlightedIndex = -1);
|
|
7622
|
+
$$invalidate(22, _inputEl.value = "", _inputEl);
|
|
7624
7623
|
_isDirty = false;
|
|
7625
7624
|
syncFilteredOptions();
|
|
7626
7625
|
dispatchValue("");
|
|
@@ -7791,15 +7790,15 @@ function instance$G($$self, $$props, $$invalidate) {
|
|
|
7791
7790
|
function select_binding($$value) {
|
|
7792
7791
|
binding_callbacks[$$value ? 'unshift' : 'push'](() => {
|
|
7793
7792
|
_selectEl = $$value;
|
|
7794
|
-
$$invalidate(
|
|
7795
|
-
$$invalidate(
|
|
7793
|
+
$$invalidate(21, _selectEl);
|
|
7794
|
+
$$invalidate(16, _options);
|
|
7796
7795
|
});
|
|
7797
7796
|
}
|
|
7798
7797
|
|
|
7799
7798
|
function input_binding($$value) {
|
|
7800
7799
|
binding_callbacks[$$value ? 'unshift' : 'push'](() => {
|
|
7801
7800
|
_inputEl = $$value;
|
|
7802
|
-
$$invalidate(
|
|
7801
|
+
$$invalidate(22, _inputEl);
|
|
7803
7802
|
});
|
|
7804
7803
|
}
|
|
7805
7804
|
|
|
@@ -7808,14 +7807,14 @@ function instance$G($$self, $$props, $$invalidate) {
|
|
|
7808
7807
|
function ul_binding($$value) {
|
|
7809
7808
|
binding_callbacks[$$value ? 'unshift' : 'push'](() => {
|
|
7810
7809
|
_menuEl = $$value;
|
|
7811
|
-
$$invalidate(
|
|
7810
|
+
$$invalidate(20, _menuEl);
|
|
7812
7811
|
});
|
|
7813
7812
|
}
|
|
7814
7813
|
|
|
7815
7814
|
function div_binding($$value) {
|
|
7816
7815
|
binding_callbacks[$$value ? 'unshift' : 'push'](() => {
|
|
7817
7816
|
_rootEl = $$value;
|
|
7818
|
-
$$invalidate(
|
|
7817
|
+
$$invalidate(19, _rootEl);
|
|
7819
7818
|
});
|
|
7820
7819
|
}
|
|
7821
7820
|
|
|
@@ -7824,32 +7823,32 @@ function instance$G($$self, $$props, $$invalidate) {
|
|
|
7824
7823
|
if ('arialabel' in $$props) $$invalidate(1, arialabel = $$props.arialabel);
|
|
7825
7824
|
if ('arialabelledby' in $$props) $$invalidate(2, arialabelledby = $$props.arialabelledby);
|
|
7826
7825
|
if ('value' in $$props) $$invalidate(3, value = $$props.value);
|
|
7827
|
-
if ('filterable' in $$props) $$invalidate(
|
|
7826
|
+
if ('filterable' in $$props) $$invalidate(36, filterable = $$props.filterable);
|
|
7828
7827
|
if ('leadingicon' in $$props) $$invalidate(4, leadingicon = $$props.leadingicon);
|
|
7829
7828
|
if ('maxheight' in $$props) $$invalidate(5, maxheight = $$props.maxheight);
|
|
7830
7829
|
if ('placeholder' in $$props) $$invalidate(6, placeholder = $$props.placeholder);
|
|
7831
|
-
if ('width' in $$props) $$invalidate(
|
|
7832
|
-
if ('disabled' in $$props) $$invalidate(
|
|
7830
|
+
if ('width' in $$props) $$invalidate(37, width = $$props.width);
|
|
7831
|
+
if ('disabled' in $$props) $$invalidate(7, disabled = $$props.disabled);
|
|
7833
7832
|
if ('error' in $$props) $$invalidate(38, error = $$props.error);
|
|
7834
7833
|
if ('multiselect' in $$props) $$invalidate(39, multiselect = $$props.multiselect);
|
|
7835
7834
|
if ('native' in $$props) $$invalidate(40, native = $$props.native);
|
|
7836
|
-
if ('relative' in $$props) $$invalidate(
|
|
7837
|
-
if ('mt' in $$props) $$invalidate(
|
|
7838
|
-
if ('mr' in $$props) $$invalidate(
|
|
7839
|
-
if ('mb' in $$props) $$invalidate(
|
|
7840
|
-
if ('ml' in $$props) $$invalidate(
|
|
7835
|
+
if ('relative' in $$props) $$invalidate(8, relative = $$props.relative);
|
|
7836
|
+
if ('mt' in $$props) $$invalidate(9, mt = $$props.mt);
|
|
7837
|
+
if ('mr' in $$props) $$invalidate(10, mr = $$props.mr);
|
|
7838
|
+
if ('mb' in $$props) $$invalidate(11, mb = $$props.mb);
|
|
7839
|
+
if ('ml' in $$props) $$invalidate(12, ml = $$props.ml);
|
|
7841
7840
|
};
|
|
7842
7841
|
|
|
7843
7842
|
$$self.$$.update = () => {
|
|
7844
|
-
if ($$self.$$.dirty[0] & /*disabled*/
|
|
7845
|
-
//
|
|
7843
|
+
if ($$self.$$.dirty[0] & /*disabled*/ 128) {
|
|
7844
|
+
//
|
|
7846
7845
|
// Reactive
|
|
7847
|
-
//
|
|
7848
|
-
$$invalidate(
|
|
7846
|
+
//
|
|
7847
|
+
$$invalidate(25, _disabled = toBoolean(disabled));
|
|
7849
7848
|
}
|
|
7850
7849
|
|
|
7851
7850
|
if ($$self.$$.dirty[1] & /*error*/ 128) {
|
|
7852
|
-
$$invalidate(
|
|
7851
|
+
$$invalidate(26, _error = toBoolean(error));
|
|
7853
7852
|
}
|
|
7854
7853
|
|
|
7855
7854
|
if ($$self.$$.dirty[1] & /*multiselect*/ 256) {
|
|
@@ -7857,16 +7856,16 @@ function instance$G($$self, $$props, $$invalidate) {
|
|
|
7857
7856
|
}
|
|
7858
7857
|
|
|
7859
7858
|
if ($$self.$$.dirty[1] & /*native*/ 512) {
|
|
7860
|
-
$$invalidate(
|
|
7859
|
+
$$invalidate(15, _native = toBoolean(native));
|
|
7861
7860
|
}
|
|
7862
7861
|
|
|
7863
|
-
if ($$self.$$.dirty[0] & /*_native*/
|
|
7864
|
-
$$invalidate(
|
|
7862
|
+
if ($$self.$$.dirty[0] & /*_native*/ 32768 | $$self.$$.dirty[1] & /*filterable*/ 32) {
|
|
7863
|
+
$$invalidate(23, _filterable = toBoolean(filterable) && !_native);
|
|
7865
7864
|
}
|
|
7866
7865
|
|
|
7867
|
-
if ($$self.$$.dirty[0] & /*_filteredOptions, _highlightedIndex*/
|
|
7866
|
+
if ($$self.$$.dirty[0] & /*_filteredOptions, _highlightedIndex*/ 24576) {
|
|
7868
7867
|
// To keep track of active descendant for the accessibility
|
|
7869
|
-
$$invalidate(
|
|
7868
|
+
$$invalidate(24, _activeDescendantId = _filteredOptions[_highlightedIndex]
|
|
7870
7869
|
? _filteredOptions[_highlightedIndex].value
|
|
7871
7870
|
: undefined);
|
|
7872
7871
|
}
|
|
@@ -7890,7 +7889,6 @@ function instance$G($$self, $$props, $$invalidate) {
|
|
|
7890
7889
|
leadingicon,
|
|
7891
7890
|
maxheight,
|
|
7892
7891
|
placeholder,
|
|
7893
|
-
width,
|
|
7894
7892
|
disabled,
|
|
7895
7893
|
relative,
|
|
7896
7894
|
mt,
|
|
@@ -7921,6 +7919,7 @@ function instance$G($$self, $$props, $$invalidate) {
|
|
|
7921
7919
|
onNativeSelect,
|
|
7922
7920
|
onChevronClick,
|
|
7923
7921
|
filterable,
|
|
7922
|
+
width,
|
|
7924
7923
|
error,
|
|
7925
7924
|
multiselect,
|
|
7926
7925
|
native,
|
|
@@ -7936,7 +7935,7 @@ class Dropdown extends SvelteElement {
|
|
|
7936
7935
|
constructor(options) {
|
|
7937
7936
|
super();
|
|
7938
7937
|
const style = document.createElement('style');
|
|
7939
|
-
style.textContent = `:host{box-sizing:border-box;font-family:var(--goa-font-family-sans)}.dropdown{cursor:pointer;
|
|
7938
|
+
style.textContent = `:host{box-sizing:border-box;font-family:var(--goa-font-family-sans)}.dropdown{cursor:pointer;width:var(--width, 100%)}.dropdown-input-group{box-sizing:border-box;outline:none;transition:box-shadow 0.1s ease-in;border:1px solid var(--goa-color-greyscale-700);border-radius:var(--goa-border-radius-m);display:inline-flex;align-items:stretch;vertical-align:middle;background-color:var(--goa-color-greyscale-white);cursor:pointer;width:var(--width, 100%)}.dropdown-input-group:hover{border-color:var(--goa-color-interactive-hover);box-shadow:0 0 0 var(--goa-border-width-m) var(--goa-color-interactive-hover)}.dropdown-input-group:focus,.dropdown-input-group:focus-within{box-shadow:0 0 0 3px var(--goa-color-interactive-focus)}@media screen and (max-width: 623px){@media not (max-color:2147477350){.dropdown-input-group{width:var(--width)}}}@media not screen and (max-width: 623px){@media not (color:2147477350){.dropdown-input-group{width:var(--width)}}}.dropdown-input-group.error,.dropdown-input-group.error:hover{border:2px solid var(--goa-color-interactive-error);box-shadow:0 0 0 1px var(--goa-color-interactive-error)}.dropdown-input-group.error:focus-within,.dropdown-input-group.error:focus{border:2px solid var(--goa-color-interactive-error);box-shadow:0 0 0 3px var(--goa-color-interactive-focus)}.dropdown-icon--arrow,.dropdown-icon--clear{margin-right:var(--goa-space-s)}.dropdown-icon--clear:focus:not(.disabled),.dropdown-icon--clear:active:not(.disabled){color:var(--goa-color-interactive-focus);outline:none}.dropdown-input--leading-icon{margin-left:0.75rem}.dropdown-input--leading-icon+input{padding-left:0.5rem}input{display:inline-block;color:var(--goa-color-text-default);font-size:var(--goa-font-size-4);padding:var(--goa-space-xs);padding-left:var(--goa-space-s);line-height:calc(40px - calc(var(--goa-space-xs) * 2));background-color:transparent;width:100%;flex:1 1 auto;font-family:var(--goa-font-family-sans);z-index:1}input,input:focus,input:hover,input:active{outline:none;border:none}input[aria-disabled="true"]{color:var(--goa-color-text-secondary)}.dropdown-input-group--disabled,.dropdown-input-group--disabled:hover,.dropdown-input-group--disabled:active,.dropdown-input-group--disabled:focus{background-color:var(--goa-color-greyscale-100);border-color:var(--goa-color-greyscale-200) !important;cursor:default;box-shadow:none !important}ul[role="listbox"]{border-radius:var(--goa-border-radius-m)}.dropdown-item{margin:0;padding:0.5rem;cursor:pointer;color:var(--goa-color-greyscale-black);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dropdown-item:hover,.dropdown-item--highlighted{background:var(--goa-color-greyscale-100);color:var(--goa-color-interactive-hover)}.dropdown-item[aria-selected="true"]{background:var(--goa-color-interactive-default);color:var(--goa-color-greyscale-white)}.dropdown-item[aria-selected="true"]:hover,.dropdown-item[aria-selected="true"].dropdown-item--highlighted{background:var(--goa-color-interactive-hover);color:var(--goa-color-greyscale-white)}.dropdown-native{position:relative;border:1px solid var(--goa-color-greyscale-700);border-radius:var(--goa-border-radius-m);background-color:var(--goa-color-greyscale-white);transition:box-shadow 0.1s ease-in}.dropdown-native:has(select:disabled){background-color:var(--goa-color-greyscale-100);border-color:var(--goa-color-greyscale-200);box-shadow:none;color:var(--goa-color-text-secondary);cursor:default}.dropdown-native:has(select.error){border:2px solid var(--goa-color-interactive-error)}.dropdown-native:hover{border-color:var(--goa-color-interactive-hover);box-shadow:0 0 0 var(--goa-border-width-m) var(--goa-color-interactive-hover)}select{border:none;font:var(--goa-font-family-sans);background-color:transparent;color:var(--goa-color-text-default);font-size:var(--goa-font-size-4);-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:calc(var(--goa-space-xs) + 1px);padding-left:var(--goa-space-s);padding-right:3rem;outline:none;width:100%}.dropdown-native::after{content:"";position:absolute;right:0.6rem;top:0.6rem;pointer-events:none;width:1.5rem;height:1.5rem;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'><path fill='none' stroke='%23333333' stroke-linecap='round' stroke-linejoin='round' stroke-width='48' d='M112 184l144 144 144-144' /%3E%3C/svg%3E");background-repeat:none}.dropdown-native:focus-within{box-shadow:0 0 0 3px var(--goa-color-interactive-focus)}`;
|
|
7940
7939
|
this.shadowRoot.appendChild(style);
|
|
7941
7940
|
|
|
7942
7941
|
init(
|
|
@@ -7954,20 +7953,20 @@ class Dropdown extends SvelteElement {
|
|
|
7954
7953
|
arialabel: 1,
|
|
7955
7954
|
arialabelledby: 2,
|
|
7956
7955
|
value: 3,
|
|
7957
|
-
filterable:
|
|
7956
|
+
filterable: 36,
|
|
7958
7957
|
leadingicon: 4,
|
|
7959
7958
|
maxheight: 5,
|
|
7960
7959
|
placeholder: 6,
|
|
7961
|
-
width:
|
|
7962
|
-
disabled:
|
|
7960
|
+
width: 37,
|
|
7961
|
+
disabled: 7,
|
|
7963
7962
|
error: 38,
|
|
7964
7963
|
multiselect: 39,
|
|
7965
7964
|
native: 40,
|
|
7966
|
-
relative:
|
|
7967
|
-
mt:
|
|
7968
|
-
mr:
|
|
7969
|
-
mb:
|
|
7970
|
-
ml:
|
|
7965
|
+
relative: 8,
|
|
7966
|
+
mt: 9,
|
|
7967
|
+
mr: 10,
|
|
7968
|
+
mb: 11,
|
|
7969
|
+
ml: 12
|
|
7971
7970
|
},
|
|
7972
7971
|
null,
|
|
7973
7972
|
[-1, -1, -1]
|
|
@@ -8045,7 +8044,7 @@ class Dropdown extends SvelteElement {
|
|
|
8045
8044
|
}
|
|
8046
8045
|
|
|
8047
8046
|
get filterable() {
|
|
8048
|
-
return this.$$.ctx[
|
|
8047
|
+
return this.$$.ctx[36];
|
|
8049
8048
|
}
|
|
8050
8049
|
|
|
8051
8050
|
set filterable(filterable) {
|
|
@@ -8081,7 +8080,7 @@ class Dropdown extends SvelteElement {
|
|
|
8081
8080
|
}
|
|
8082
8081
|
|
|
8083
8082
|
get width() {
|
|
8084
|
-
return this.$$.ctx[
|
|
8083
|
+
return this.$$.ctx[37];
|
|
8085
8084
|
}
|
|
8086
8085
|
|
|
8087
8086
|
set width(width) {
|
|
@@ -8090,7 +8089,7 @@ class Dropdown extends SvelteElement {
|
|
|
8090
8089
|
}
|
|
8091
8090
|
|
|
8092
8091
|
get disabled() {
|
|
8093
|
-
return this.$$.ctx[
|
|
8092
|
+
return this.$$.ctx[7];
|
|
8094
8093
|
}
|
|
8095
8094
|
|
|
8096
8095
|
set disabled(disabled) {
|
|
@@ -8126,7 +8125,7 @@ class Dropdown extends SvelteElement {
|
|
|
8126
8125
|
}
|
|
8127
8126
|
|
|
8128
8127
|
get relative() {
|
|
8129
|
-
return this.$$.ctx[
|
|
8128
|
+
return this.$$.ctx[8];
|
|
8130
8129
|
}
|
|
8131
8130
|
|
|
8132
8131
|
set relative(relative) {
|
|
@@ -8135,7 +8134,7 @@ class Dropdown extends SvelteElement {
|
|
|
8135
8134
|
}
|
|
8136
8135
|
|
|
8137
8136
|
get mt() {
|
|
8138
|
-
return this.$$.ctx[
|
|
8137
|
+
return this.$$.ctx[9];
|
|
8139
8138
|
}
|
|
8140
8139
|
|
|
8141
8140
|
set mt(mt) {
|
|
@@ -8144,7 +8143,7 @@ class Dropdown extends SvelteElement {
|
|
|
8144
8143
|
}
|
|
8145
8144
|
|
|
8146
8145
|
get mr() {
|
|
8147
|
-
return this.$$.ctx[
|
|
8146
|
+
return this.$$.ctx[10];
|
|
8148
8147
|
}
|
|
8149
8148
|
|
|
8150
8149
|
set mr(mr) {
|
|
@@ -8153,7 +8152,7 @@ class Dropdown extends SvelteElement {
|
|
|
8153
8152
|
}
|
|
8154
8153
|
|
|
8155
8154
|
get mb() {
|
|
8156
|
-
return this.$$.ctx[
|
|
8155
|
+
return this.$$.ctx[11];
|
|
8157
8156
|
}
|
|
8158
8157
|
|
|
8159
8158
|
set mb(mb) {
|
|
@@ -8162,7 +8161,7 @@ class Dropdown extends SvelteElement {
|
|
|
8162
8161
|
}
|
|
8163
8162
|
|
|
8164
8163
|
get ml() {
|
|
8165
|
-
return this.$$.ctx[
|
|
8164
|
+
return this.$$.ctx[12];
|
|
8166
8165
|
}
|
|
8167
8166
|
|
|
8168
8167
|
set ml(ml) {
|
|
@@ -9415,7 +9414,7 @@ class FormItem extends SvelteElement {
|
|
|
9415
9414
|
constructor(options) {
|
|
9416
9415
|
super();
|
|
9417
9416
|
const style = document.createElement('style');
|
|
9418
|
-
style.textContent = `:host{box-sizing:border-box;font-family:var(--goa-font-family-sans)}*{box-sizing:border-box}.label{display:block;font-weight:var(--goa-font-weight-bold);color:var(--goa-color-text-default);font-size:var(--goa-font-size-4);padding-bottom:0.5rem}.label.large{font:var(--goa-typography-heading-l)}.label em{color:var(--goa-color-greyscale-700);font-weight:var(--goa-font-weight-regular);font-size:var(--goa-font-size-2);line-height:var(--goa-line-height-1);font-style:normal}.form-item-input{margin-bottom:0.25rem}.help-msg{font-size:var(--goa-font-size-2);color:var(--goa-color-text-default)
|
|
9417
|
+
style.textContent = `:host{box-sizing:border-box;font-family:var(--goa-font-family-sans)}*{box-sizing:border-box}.label{display:block;font-weight:var(--goa-font-weight-bold);color:var(--goa-color-text-default);font-size:var(--goa-font-size-4);padding-bottom:0.5rem}.label.large{font:var(--goa-typography-heading-l)}.label em{color:var(--goa-color-greyscale-700);font-weight:var(--goa-font-weight-regular);font-size:var(--goa-font-size-2);line-height:var(--goa-line-height-1);font-style:normal}.form-item-input{margin-bottom:0.25rem}.help-msg{font-size:var(--goa-font-size-2);color:var(--goa-color-text-default)}.error-msg{display:inline-flex;align-items:flex-start;gap:0.25rem;font-size:var(--goa-font-size-2);color:var(--goa-color-interactive-error);margin-bottom:0.25rem}`;
|
|
9419
9418
|
this.shadowRoot.appendChild(style);
|
|
9420
9419
|
|
|
9421
9420
|
init(
|
|
@@ -11519,7 +11518,7 @@ class Input extends SvelteElement {
|
|
|
11519
11518
|
const style = document.createElement('style');
|
|
11520
11519
|
|
|
11521
11520
|
style.textContent = `:host{box-sizing:border-box}.container{position:relative;width:100%;display:inline-block}@media screen and (max-width: 623px){@media not (max-color:2147477350){.container{width:var(--width)}}}@media not screen and (max-width: 623px){@media not (color:2147477350){.container{width:var(--width)}}}.goa-input,.goa-input *{box-sizing:border-box;line-height:normal}.goa-input{box-sizing:border-box;outline:none;transition:box-shadow 0.1s ease-in;border:1px solid var(--goa-color-greyscale-700);border-radius:var(--goa-border-radius-m);display:inline-flex;align-items:stretch;vertical-align:middle;min-width:100%;background-color:var(--goa-color-greyscale-white)}.goa-input:hover:not(.leading-content):not(.trailing-content){border-color:var(--goa-color-interactive-hover);box-shadow:0 0 0 var(--goa-border-width-m) var(--goa-color-interactive-hover)}.goa-input:active:not(.leading-content):not(.trailing-content),.goa-input:focus:not(.leading-content):not(.trailing-content),.goa-input:focus-within:not(.leading-content):not(.trailing-content){box-shadow:0 0 0 3px var(--goa-color-interactive-focus)}.goa-input.type--range{border:none}.goa-input.type--range:active,.goa-input.type--range:focus,.goa-input.type--range:focus-within{box-shadow:none}.leading-icon{margin-left:0.75rem}.trailing-icon{margin-right:var(--goa-space-s)}.trailing-icon-button{margin-right:var(--goa-space-xs)}input{display:inline-block;color:var(--goa-color-text-default);font-size:var(--goa-font-size-4);padding:var(--goa-space-xs) var(--goa-space-s);line-height:calc(40px - calc(var(--goa-space-xs) * 2));background-color:transparent;width:100%;flex:1 1 auto;font-family:var(--goa-font-family-sans);z-index:1}input[readonly]{cursor:pointer}.leading-icon+input{padding-left:0.5rem}input,input:focus,input:hover,input:active{outline:none;border:none}.input--disabled,.input--disabled:hover,.input--disabled:active,.input--disabled:focus{background-color:var(--goa-color-greyscale-100);border-color:var(--goa-color-greyscale-200) !important;cursor:default;box-shadow:none !important}.input--disabled input,.input--disabled input:hover,.input--disabled input:active,.input--disabled input:focus{color:var(--goa-color-text-secondary)}.input--disabled input:hover{cursor:default !important}.prefix,.suffix,.leading-content ::slotted(div),.trailing-content ::slotted(div){background-color:var(--goa-color-greyscale-100);padding:0 0.75rem;display:flex;align-items:center}.leading-content ::slotted(div),.trailing-content ::slotted(div){padding:0.5rem 0.75rem}.prefix,.leading-content ::slotted(div){border-top-left-radius:var(--goa-border-radius-m);border-bottom-left-radius:var(--goa-border-radius-m);border-right:1px solid var(--goa-color-greyscale-700)}.suffix,.trailing-content ::slotted(div){border-top-right-radius:var(--goa-border-radius-m);border-bottom-right-radius:var(--goa-border-radius-m);border-left:1px solid var(--goa-color-greyscale-700)}.input--disabled .prefix,.input--disabled .leading-content ::slotted(div){border-right:1px solid var(--goa-color-greyscale-200)}.input--disabled .suffix,.input--disabled .trailing-content ::slotted(div){border-left:1px solid var(--goa-color-greyscale-200)}input.input--goa{display:block;border:none;flex:1 1 auto}.variant--bare{border:none}.variant--bare:focus,.variant--bare:active,.variant--bare:focus-within{box-shadow:none}.error:not(.leading-content):not(.trailing-content),.error:hover:not(.leading-content):not(.trailing-content){border:2px solid var(--goa-color-interactive-error);box-shadow:0 0 0 1px var(--goa-color-interactive-error)}.error:focus-within:hover:not(.leading-content):not(.trailing-content){border:2px solid var(--goa-color-interactive-error);box-shadow:0 0 0 3px var(--goa-color-interactive-focus)}.error .input-leading-content,.error .input-leading-content:hover,.error .input-trailing-content,.error .input-trailing-content:hover{outline:var(--goa-border-width-s) solid var(--goa-color-interactive-error);box-shadow:inset 0 0 0 var(--goa-border-width-m) var(--goa-color-interactive-error)}.error .input-leading-content:focus,.error .input-trailing-content:focus,.error .input-leading-content:active,.error .input-trailing-content:active{outline:var(--goa-border-width-s) solid var(--goa-color-interactive-error);box-shadow:0 0 0 var(--goa-border-width-l) var(--goa-color-interactive-focus)}.input-leading-content:hover,.input-trailing-content:hover{box-shadow:inset 0 0 0 var(--goa-border-width-m) var(--goa-color-interactive-hover);outline:var(--goa-border-width-s) solid var(--goa-color-interactive-hover)}.input-leading-content:active,.input-leading-content:focus,.input-leading-content:focus-within,.input-trailing-content:active,.input-trailing-content:focus,.input-trailing-content:focus-within{box-shadow:0 0 0 var(--goa-border-width-l) var(--goa-color-interactive-focus);outline:var(--goa-border-width-s) solid var(--goa-color-greyscale-700)}.error .input-trailing-content,.input-trailing-content:hover,.input-trailing-content:active,.input-trailing-content:focus,.input-trailing-content:focus-within{border-top-left-radius:var(--goa-border-radius-m);border-bottom-left-radius:var(--goa-border-radius-m)}.error .input-leading-content,.input-leading-content:hover,.input-leading-content:active,.input-leading-content:focus,.input-leading-content:focus-within{border-top-right-radius:var(--goa-border-radius-m);border-bottom-right-radius:var(--goa-border-radius-m)}.input-leading-content.input-trailing-content,.input-leading-content.input-trailing-content:hover,.input-leading-content.input-trailing-content:active,.input-leading-content.input-trailing-content:focus,.input-leading-content.input-trailing-content:focus-within{border-radius:0}input[type="search"]:enabled:read-write:-webkit-any(:focus, :hover)::-webkit-search-cancel-button{position:relative;right:var(--search-icon-offset);cursor:pointer;-webkit-appearance:none;height:1.2rem;width:1.2rem;background:url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="%23333" d="M405 136.798L375.202 107 256 226.202 136.798 107 107 136.798 226.202 256 107 375.202 136.798 405 256 285.798 375.202 405 405 375.202 285.798 256z"/></svg>')
|
|
11522
|
-
center center no-repeat}`;
|
|
11521
|
+
center center no-repeat}::-ms-reveal{display:none}`;
|
|
11523
11522
|
|
|
11524
11523
|
this.shadowRoot.appendChild(style);
|
|
11525
11524
|
|
|
@@ -12328,6 +12327,7 @@ function create_if_block$i(ctx) {
|
|
|
12328
12327
|
let div3;
|
|
12329
12328
|
let div5_intro;
|
|
12330
12329
|
let div5_outro;
|
|
12330
|
+
let div6_class_value;
|
|
12331
12331
|
let div6_style_value;
|
|
12332
12332
|
let noscroll_action;
|
|
12333
12333
|
let div6_intro;
|
|
@@ -12344,7 +12344,7 @@ function create_if_block$i(ctx) {
|
|
|
12344
12344
|
|
|
12345
12345
|
let current_block_type = select_block_type(ctx);
|
|
12346
12346
|
let if_block1 = current_block_type(ctx);
|
|
12347
|
-
let if_block2 = /*_isClosable*/ ctx[
|
|
12347
|
+
let if_block2 = /*_isClosable*/ ctx[10] && create_if_block_1$8(ctx);
|
|
12348
12348
|
|
|
12349
12349
|
return {
|
|
12350
12350
|
c() {
|
|
@@ -12372,6 +12372,7 @@ function create_if_block$i(ctx) {
|
|
|
12372
12372
|
attr(div0, "class", "modal-overlay");
|
|
12373
12373
|
attr(div1, "data-testid", "modal-title");
|
|
12374
12374
|
attr(div1, "class", "modal-title");
|
|
12375
|
+
toggle_class(header, "has-content", /*_requiresTopPadding*/ ctx[9]);
|
|
12375
12376
|
set_custom_element_data(goa_scrollable, "direction", "vertical");
|
|
12376
12377
|
set_custom_element_data(goa_scrollable, "hpadding", "1.9rem");
|
|
12377
12378
|
set_custom_element_data(goa_scrollable, "maxheight", "70vh");
|
|
@@ -12382,7 +12383,7 @@ function create_if_block$i(ctx) {
|
|
|
12382
12383
|
attr(div4, "class", "content");
|
|
12383
12384
|
attr(div5, "class", "modal-pane");
|
|
12384
12385
|
attr(div6, "data-testid", "modal");
|
|
12385
|
-
attr(div6, "class",
|
|
12386
|
+
attr(div6, "class", div6_class_value = `modal ${/*_scrollPos*/ ctx[8]}`);
|
|
12386
12387
|
attr(div6, "style", div6_style_value = `--maxwidth: ${/*maxwidth*/ ctx[0]};`);
|
|
12387
12388
|
set_custom_element_data(goa_focus_trap, "open", /*open*/ ctx[2]);
|
|
12388
12389
|
},
|
|
@@ -12400,12 +12401,11 @@ function create_if_block$i(ctx) {
|
|
|
12400
12401
|
if_block1.m(div1, null);
|
|
12401
12402
|
append(header, t2);
|
|
12402
12403
|
if (if_block2) if_block2.m(header, null);
|
|
12403
|
-
/*header_binding*/ ctx[
|
|
12404
|
+
/*header_binding*/ ctx[18](header);
|
|
12404
12405
|
append(div4, t3);
|
|
12405
12406
|
append(div4, div2);
|
|
12406
12407
|
append(div2, goa_scrollable);
|
|
12407
|
-
/*goa_scrollable_binding*/ ctx[
|
|
12408
|
-
/*div2_binding*/ ctx[19](div2);
|
|
12408
|
+
/*goa_scrollable_binding*/ ctx[19](goa_scrollable);
|
|
12409
12409
|
append(div4, t4);
|
|
12410
12410
|
append(div4, div3);
|
|
12411
12411
|
/*div6_binding*/ ctx[20](div6);
|
|
@@ -12413,8 +12413,8 @@ function create_if_block$i(ctx) {
|
|
|
12413
12413
|
|
|
12414
12414
|
if (!mounted) {
|
|
12415
12415
|
dispose = [
|
|
12416
|
-
listen(div0, "click", /*close*/ ctx[
|
|
12417
|
-
listen(goa_scrollable, "_scroll", /*handleScroll*/ ctx[
|
|
12416
|
+
listen(div0, "click", /*close*/ ctx[13]),
|
|
12417
|
+
listen(goa_scrollable, "_scroll", /*handleScroll*/ ctx[14]),
|
|
12418
12418
|
action_destroyer(noscroll_action = noscroll.call(null, div6, { enable: /*_isOpen*/ ctx[7] }))
|
|
12419
12419
|
];
|
|
12420
12420
|
|
|
@@ -12449,7 +12449,7 @@ function create_if_block$i(ctx) {
|
|
|
12449
12449
|
}
|
|
12450
12450
|
}
|
|
12451
12451
|
|
|
12452
|
-
if (/*_isClosable*/ ctx[
|
|
12452
|
+
if (/*_isClosable*/ ctx[10]) {
|
|
12453
12453
|
if (if_block2) {
|
|
12454
12454
|
if_block2.p(ctx, dirty);
|
|
12455
12455
|
} else {
|
|
@@ -12462,6 +12462,14 @@ function create_if_block$i(ctx) {
|
|
|
12462
12462
|
if_block2 = null;
|
|
12463
12463
|
}
|
|
12464
12464
|
|
|
12465
|
+
if (!current || dirty & /*_requiresTopPadding*/ 512) {
|
|
12466
|
+
toggle_class(header, "has-content", /*_requiresTopPadding*/ ctx[9]);
|
|
12467
|
+
}
|
|
12468
|
+
|
|
12469
|
+
if (!current || dirty & /*_scrollPos*/ 256 && div6_class_value !== (div6_class_value = `modal ${/*_scrollPos*/ ctx[8]}`)) {
|
|
12470
|
+
attr(div6, "class", div6_class_value);
|
|
12471
|
+
}
|
|
12472
|
+
|
|
12465
12473
|
if (!current || dirty & /*maxwidth*/ 1 && div6_style_value !== (div6_style_value = `--maxwidth: ${/*maxwidth*/ ctx[0]};`)) {
|
|
12466
12474
|
attr(div6, "style", div6_style_value);
|
|
12467
12475
|
}
|
|
@@ -12480,7 +12488,7 @@ function create_if_block$i(ctx) {
|
|
|
12480
12488
|
if (div5_outro) div5_outro.end(1);
|
|
12481
12489
|
|
|
12482
12490
|
div5_intro = create_in_transition(div5, fly, {
|
|
12483
|
-
duration: /*_transitionTime*/ ctx[
|
|
12491
|
+
duration: /*_transitionTime*/ ctx[12],
|
|
12484
12492
|
y: 200
|
|
12485
12493
|
});
|
|
12486
12494
|
|
|
@@ -12490,7 +12498,7 @@ function create_if_block$i(ctx) {
|
|
|
12490
12498
|
add_render_callback(() => {
|
|
12491
12499
|
if (!current) return;
|
|
12492
12500
|
if (div6_outro) div6_outro.end(1);
|
|
12493
|
-
div6_intro = create_in_transition(div6, fade, { duration: /*_transitionTime*/ ctx[
|
|
12501
|
+
div6_intro = create_in_transition(div6, fade, { duration: /*_transitionTime*/ ctx[12] });
|
|
12494
12502
|
div6_intro.start();
|
|
12495
12503
|
});
|
|
12496
12504
|
|
|
@@ -12500,16 +12508,16 @@ function create_if_block$i(ctx) {
|
|
|
12500
12508
|
if (div5_intro) div5_intro.invalidate();
|
|
12501
12509
|
|
|
12502
12510
|
div5_outro = create_out_transition(div5, fly, {
|
|
12503
|
-
delay: /*_transitionTime*/ ctx[
|
|
12504
|
-
duration: /*_transitionTime*/ ctx[
|
|
12511
|
+
delay: /*_transitionTime*/ ctx[12],
|
|
12512
|
+
duration: /*_transitionTime*/ ctx[12],
|
|
12505
12513
|
y: -100
|
|
12506
12514
|
});
|
|
12507
12515
|
|
|
12508
12516
|
if (div6_intro) div6_intro.invalidate();
|
|
12509
12517
|
|
|
12510
12518
|
div6_outro = create_out_transition(div6, fade, {
|
|
12511
|
-
delay: /*_transitionTime*/ ctx[
|
|
12512
|
-
duration: /*_transitionTime*/ ctx[
|
|
12519
|
+
delay: /*_transitionTime*/ ctx[12],
|
|
12520
|
+
duration: /*_transitionTime*/ ctx[12]
|
|
12513
12521
|
});
|
|
12514
12522
|
|
|
12515
12523
|
current = false;
|
|
@@ -12519,9 +12527,8 @@ function create_if_block$i(ctx) {
|
|
|
12519
12527
|
if (if_block0) if_block0.d();
|
|
12520
12528
|
if_block1.d();
|
|
12521
12529
|
if (if_block2) if_block2.d();
|
|
12522
|
-
/*header_binding*/ ctx[
|
|
12523
|
-
/*goa_scrollable_binding*/ ctx[
|
|
12524
|
-
/*div2_binding*/ ctx[19](null);
|
|
12530
|
+
/*header_binding*/ ctx[18](null);
|
|
12531
|
+
/*goa_scrollable_binding*/ ctx[19](null);
|
|
12525
12532
|
if (detaching && div5_outro) div5_outro.end();
|
|
12526
12533
|
/*div6_binding*/ ctx[20](null);
|
|
12527
12534
|
if (detaching && div6_outro) div6_outro.end();
|
|
@@ -12531,7 +12538,7 @@ function create_if_block$i(ctx) {
|
|
|
12531
12538
|
};
|
|
12532
12539
|
}
|
|
12533
12540
|
|
|
12534
|
-
// (
|
|
12541
|
+
// (156:8) {#if calloutvariant !== null}
|
|
12535
12542
|
function create_if_block_3$7(ctx) {
|
|
12536
12543
|
let div;
|
|
12537
12544
|
let goa_icon;
|
|
@@ -12542,7 +12549,7 @@ function create_if_block_3$7(ctx) {
|
|
|
12542
12549
|
c() {
|
|
12543
12550
|
div = element("div");
|
|
12544
12551
|
goa_icon = element("goa-icon");
|
|
12545
|
-
set_custom_element_data(goa_icon, "type", /*_iconType*/ ctx[
|
|
12552
|
+
set_custom_element_data(goa_icon, "type", /*_iconType*/ ctx[11]);
|
|
12546
12553
|
|
|
12547
12554
|
set_custom_element_data(goa_icon, "inverted", goa_icon_inverted_value = /*calloutvariant*/ ctx[3] === "important"
|
|
12548
12555
|
? "false"
|
|
@@ -12555,8 +12562,8 @@ function create_if_block_3$7(ctx) {
|
|
|
12555
12562
|
append(div, goa_icon);
|
|
12556
12563
|
},
|
|
12557
12564
|
p(ctx, dirty) {
|
|
12558
|
-
if (dirty & /*_iconType*/
|
|
12559
|
-
set_custom_element_data(goa_icon, "type", /*_iconType*/ ctx[
|
|
12565
|
+
if (dirty & /*_iconType*/ 2048) {
|
|
12566
|
+
set_custom_element_data(goa_icon, "type", /*_iconType*/ ctx[11]);
|
|
12560
12567
|
}
|
|
12561
12568
|
|
|
12562
12569
|
if (dirty & /*calloutvariant*/ 8 && goa_icon_inverted_value !== (goa_icon_inverted_value = /*calloutvariant*/ ctx[3] === "important"
|
|
@@ -12575,7 +12582,7 @@ function create_if_block_3$7(ctx) {
|
|
|
12575
12582
|
};
|
|
12576
12583
|
}
|
|
12577
12584
|
|
|
12578
|
-
// (
|
|
12585
|
+
// (172:14) {:else}
|
|
12579
12586
|
function create_else_block$8(ctx) {
|
|
12580
12587
|
let slot;
|
|
12581
12588
|
|
|
@@ -12594,7 +12601,7 @@ function create_else_block$8(ctx) {
|
|
|
12594
12601
|
};
|
|
12595
12602
|
}
|
|
12596
12603
|
|
|
12597
|
-
// (
|
|
12604
|
+
// (170:14) {#if heading}
|
|
12598
12605
|
function create_if_block_2$7(ctx) {
|
|
12599
12606
|
let t;
|
|
12600
12607
|
|
|
@@ -12614,7 +12621,7 @@ function create_if_block_2$7(ctx) {
|
|
|
12614
12621
|
};
|
|
12615
12622
|
}
|
|
12616
12623
|
|
|
12617
|
-
// (
|
|
12624
|
+
// (176:12) {#if _isClosable}
|
|
12618
12625
|
function create_if_block_1$8(ctx) {
|
|
12619
12626
|
let div;
|
|
12620
12627
|
let goa_icon_button;
|
|
@@ -12635,7 +12642,7 @@ function create_if_block_1$8(ctx) {
|
|
|
12635
12642
|
append(div, goa_icon_button);
|
|
12636
12643
|
|
|
12637
12644
|
if (!mounted) {
|
|
12638
|
-
dispose = listen(goa_icon_button, "click", /*close*/ ctx[
|
|
12645
|
+
dispose = listen(goa_icon_button, "click", /*close*/ ctx[13]);
|
|
12639
12646
|
mounted = true;
|
|
12640
12647
|
}
|
|
12641
12648
|
},
|
|
@@ -12716,36 +12723,42 @@ function instance$t($$self, $$props, $$invalidate) {
|
|
|
12716
12723
|
let { maxwidth = "60ch" } = $$props;
|
|
12717
12724
|
let { width = "" } = $$props;
|
|
12718
12725
|
|
|
12726
|
+
// *******
|
|
12719
12727
|
// Private
|
|
12728
|
+
// *******
|
|
12720
12729
|
let _rootEl = null;
|
|
12721
12730
|
|
|
12722
|
-
let
|
|
12731
|
+
let _scrollPos = "top";
|
|
12723
12732
|
let _scrollEl = null;
|
|
12724
12733
|
let _headerEl = null;
|
|
12734
|
+
let _isOpen = false;
|
|
12735
|
+
let _requiresTopPadding;
|
|
12725
12736
|
|
|
12726
12737
|
// Type verification
|
|
12727
12738
|
const [CALLOUT_VARIANT, validateCalloutVariant] = typeValidator("Callout variant", ["emergency", "important", "information", "success", "event"]);
|
|
12728
12739
|
|
|
12729
12740
|
const [Transitions, validateTransition] = typeValidator("Modal transition", ["fast", "slow", "none"]);
|
|
12730
12741
|
|
|
12731
|
-
//
|
|
12732
|
-
// reference to allow for creation of the @keyframes for the in:fade and out:fade transitions.
|
|
12733
|
-
// DDIDS-1288
|
|
12734
|
-
let _isOpen = false;
|
|
12735
|
-
|
|
12742
|
+
// *****
|
|
12736
12743
|
// Hooks
|
|
12744
|
+
// *****
|
|
12737
12745
|
onMount(async () => {
|
|
12738
12746
|
await tick();
|
|
12739
12747
|
validateCalloutVariant(calloutvariant);
|
|
12740
12748
|
validateTransition(transition);
|
|
12741
12749
|
|
|
12750
|
+
// event listenerts
|
|
12751
|
+
window.addEventListener('keydown', onInputKeyDown);
|
|
12752
|
+
|
|
12742
12753
|
if (width) {
|
|
12743
12754
|
$$invalidate(0, maxwidth = width);
|
|
12744
12755
|
console.warn("`width` is deprecated. Please use `maxwidth` instead.");
|
|
12745
12756
|
}
|
|
12746
12757
|
});
|
|
12747
12758
|
|
|
12759
|
+
// *********
|
|
12748
12760
|
// Functions
|
|
12761
|
+
// *********
|
|
12749
12762
|
function close(e) {
|
|
12750
12763
|
if (!_isClosable) {
|
|
12751
12764
|
return;
|
|
@@ -12759,6 +12772,10 @@ function instance$t($$self, $$props, $$invalidate) {
|
|
|
12759
12772
|
}
|
|
12760
12773
|
|
|
12761
12774
|
const onInputKeyDown = e => {
|
|
12775
|
+
if (!_isOpen) {
|
|
12776
|
+
return;
|
|
12777
|
+
}
|
|
12778
|
+
|
|
12762
12779
|
switch (e.key) {
|
|
12763
12780
|
case "Escape":
|
|
12764
12781
|
close(e);
|
|
@@ -12769,20 +12786,21 @@ function instance$t($$self, $$props, $$invalidate) {
|
|
|
12769
12786
|
|
|
12770
12787
|
function handleScroll(e) {
|
|
12771
12788
|
const hasScroll = e.detail.scrollHeight > e.detail.offsetHeight;
|
|
12789
|
+
if (!_isOpen || !hasScroll) return;
|
|
12772
12790
|
|
|
12773
|
-
|
|
12774
|
-
|
|
12775
|
-
|
|
12776
|
-
|
|
12791
|
+
// top
|
|
12792
|
+
if (e.detail.scrollTop == 0) {
|
|
12793
|
+
$$invalidate(8, _scrollPos = "top");
|
|
12794
|
+
return;
|
|
12795
|
+
}
|
|
12777
12796
|
|
|
12778
|
-
|
|
12779
|
-
|
|
12780
|
-
|
|
12781
|
-
|
|
12782
|
-
} else {
|
|
12783
|
-
_contentEl.classList.add("scroll-middle");
|
|
12784
|
-
}
|
|
12797
|
+
// bottom
|
|
12798
|
+
if (Math.abs(e.detail.scrollHeight - e.detail.scrollTop - e.detail.offsetHeight) < 1) {
|
|
12799
|
+
$$invalidate(8, _scrollPos = "bottom");
|
|
12800
|
+
return;
|
|
12785
12801
|
}
|
|
12802
|
+
|
|
12803
|
+
$$invalidate(8, _scrollPos = "middle");
|
|
12786
12804
|
}
|
|
12787
12805
|
|
|
12788
12806
|
function getChildren() {
|
|
@@ -12798,89 +12816,74 @@ function instance$t($$self, $$props, $$invalidate) {
|
|
|
12798
12816
|
function header_binding($$value) {
|
|
12799
12817
|
binding_callbacks[$$value ? 'unshift' : 'push'](() => {
|
|
12800
12818
|
_headerEl = $$value;
|
|
12801
|
-
|
|
12819
|
+
$$invalidate(6, _headerEl);
|
|
12802
12820
|
});
|
|
12803
12821
|
}
|
|
12804
12822
|
|
|
12805
12823
|
function goa_scrollable_binding($$value) {
|
|
12806
12824
|
binding_callbacks[$$value ? 'unshift' : 'push'](() => {
|
|
12807
12825
|
_scrollEl = $$value;
|
|
12808
|
-
|
|
12809
|
-
});
|
|
12810
|
-
}
|
|
12811
|
-
|
|
12812
|
-
function div2_binding($$value) {
|
|
12813
|
-
binding_callbacks[$$value ? 'unshift' : 'push'](() => {
|
|
12814
|
-
_contentEl = $$value;
|
|
12815
|
-
(($$invalidate(4, _contentEl), $$invalidate(7, _isOpen)), $$invalidate(2, open));
|
|
12826
|
+
$$invalidate(5, _scrollEl);
|
|
12816
12827
|
});
|
|
12817
12828
|
}
|
|
12818
12829
|
|
|
12819
12830
|
function div6_binding($$value) {
|
|
12820
12831
|
binding_callbacks[$$value ? 'unshift' : 'push'](() => {
|
|
12821
12832
|
_rootEl = $$value;
|
|
12822
|
-
|
|
12833
|
+
$$invalidate(4, _rootEl);
|
|
12823
12834
|
});
|
|
12824
12835
|
}
|
|
12825
12836
|
|
|
12826
12837
|
$$self.$$set = $$props => {
|
|
12827
12838
|
if ('heading' in $$props) $$invalidate(1, heading = $$props.heading);
|
|
12828
|
-
if ('closable' in $$props) $$invalidate(
|
|
12839
|
+
if ('closable' in $$props) $$invalidate(15, closable = $$props.closable);
|
|
12829
12840
|
if ('open' in $$props) $$invalidate(2, open = $$props.open);
|
|
12830
|
-
if ('transition' in $$props) $$invalidate(
|
|
12841
|
+
if ('transition' in $$props) $$invalidate(16, transition = $$props.transition);
|
|
12831
12842
|
if ('calloutvariant' in $$props) $$invalidate(3, calloutvariant = $$props.calloutvariant);
|
|
12832
12843
|
if ('maxwidth' in $$props) $$invalidate(0, maxwidth = $$props.maxwidth);
|
|
12833
|
-
if ('width' in $$props) $$invalidate(
|
|
12844
|
+
if ('width' in $$props) $$invalidate(17, width = $$props.width);
|
|
12834
12845
|
};
|
|
12835
12846
|
|
|
12836
12847
|
$$self.$$.update = () => {
|
|
12837
|
-
if ($$self.$$.dirty & /*closable*/
|
|
12848
|
+
if ($$self.$$.dirty & /*closable*/ 32768) {
|
|
12849
|
+
// ********
|
|
12838
12850
|
// Reactive
|
|
12839
|
-
|
|
12851
|
+
// ********
|
|
12852
|
+
$$invalidate(10, _isClosable = toBoolean(closable));
|
|
12840
12853
|
}
|
|
12841
12854
|
|
|
12842
12855
|
if ($$self.$$.dirty & /*open*/ 4) {
|
|
12856
|
+
// Moving the reactive var into a timeout prevents accessing null stylesheet
|
|
12857
|
+
// reference to allow for creation of the @keyframes for the in:fade and out:fade transitions.
|
|
12858
|
+
// DDIDS-1288
|
|
12843
12859
|
setTimeout(() => $$invalidate(7, _isOpen = toBoolean(open)), 1);
|
|
12844
12860
|
}
|
|
12845
12861
|
|
|
12846
|
-
if ($$self.$$.dirty & /*_isOpen*/
|
|
12847
|
-
|
|
12848
|
-
|
|
12849
|
-
$$invalidate(4, _contentEl = $$invalidate(5, _scrollEl = $$invalidate(8, _rootEl = $$invalidate(6, _headerEl = null))));
|
|
12850
|
-
|
|
12851
|
-
window.removeEventListener('keydown', onInputKeyDown);
|
|
12852
|
-
}
|
|
12853
|
-
}
|
|
12854
|
-
|
|
12855
|
-
if ($$self.$$.dirty & /*_isOpen, _scrollEl, _contentEl*/ 176) {
|
|
12856
|
-
if (_isOpen && _scrollEl && _contentEl) {
|
|
12862
|
+
if ($$self.$$.dirty & /*_isOpen, _scrollEl*/ 160) {
|
|
12863
|
+
// Show the shadow at the top of the content after scrolling down
|
|
12864
|
+
if (_isOpen && _scrollEl) {
|
|
12857
12865
|
const hasScroll = _scrollEl.scrollHeight > _scrollEl.offsetHeight;
|
|
12858
12866
|
|
|
12859
12867
|
if (hasScroll) {
|
|
12860
|
-
|
|
12868
|
+
$$invalidate(8, _scrollPos = "top");
|
|
12861
12869
|
}
|
|
12862
12870
|
}
|
|
12863
12871
|
}
|
|
12864
12872
|
|
|
12865
|
-
if ($$self.$$.dirty & /*_isOpen,
|
|
12866
|
-
if (_isOpen &&
|
|
12867
|
-
|
|
12868
|
-
const children = getChildren();
|
|
12869
|
-
|
|
12870
|
-
if (_headerEl.querySelector("div.modal-title").textContent || _headerEl.querySelector("div.modal-close") || children.length) {
|
|
12871
|
-
_headerEl.classList.add("has-content");
|
|
12872
|
-
}
|
|
12873
|
+
if ($$self.$$.dirty & /*_isOpen, _rootEl, _headerEl*/ 208) {
|
|
12874
|
+
if (_isOpen && _rootEl) {
|
|
12875
|
+
$$invalidate(9, _requiresTopPadding = !!_headerEl.querySelector("div.modal-title").textContent || !!_headerEl.querySelector("div.modal-close") || getChildren().length > 0);
|
|
12873
12876
|
}
|
|
12874
12877
|
}
|
|
12875
12878
|
|
|
12876
|
-
if ($$self.$$.dirty & /*transition*/
|
|
12877
|
-
$$invalidate(
|
|
12879
|
+
if ($$self.$$.dirty & /*transition*/ 65536) {
|
|
12880
|
+
$$invalidate(12, _transitionTime = transition === "none"
|
|
12878
12881
|
? 0
|
|
12879
12882
|
: transition === "slow" ? 400 : 200);
|
|
12880
12883
|
}
|
|
12881
12884
|
|
|
12882
12885
|
if ($$self.$$.dirty & /*calloutvariant*/ 8) {
|
|
12883
|
-
$$invalidate(
|
|
12886
|
+
$$invalidate(11, _iconType = calloutvariant === "emergency"
|
|
12884
12887
|
? "warning"
|
|
12885
12888
|
: calloutvariant === "important"
|
|
12886
12889
|
? "alert-circle"
|
|
@@ -12897,11 +12900,12 @@ function instance$t($$self, $$props, $$invalidate) {
|
|
|
12897
12900
|
heading,
|
|
12898
12901
|
open,
|
|
12899
12902
|
calloutvariant,
|
|
12900
|
-
|
|
12903
|
+
_rootEl,
|
|
12901
12904
|
_scrollEl,
|
|
12902
12905
|
_headerEl,
|
|
12903
12906
|
_isOpen,
|
|
12904
|
-
|
|
12907
|
+
_scrollPos,
|
|
12908
|
+
_requiresTopPadding,
|
|
12905
12909
|
_isClosable,
|
|
12906
12910
|
_iconType,
|
|
12907
12911
|
_transitionTime,
|
|
@@ -12912,7 +12916,6 @@ function instance$t($$self, $$props, $$invalidate) {
|
|
|
12912
12916
|
width,
|
|
12913
12917
|
header_binding,
|
|
12914
12918
|
goa_scrollable_binding,
|
|
12915
|
-
div2_binding,
|
|
12916
12919
|
div6_binding
|
|
12917
12920
|
];
|
|
12918
12921
|
}
|
|
@@ -12921,7 +12924,7 @@ class Modal extends SvelteElement {
|
|
|
12921
12924
|
constructor(options) {
|
|
12922
12925
|
super();
|
|
12923
12926
|
const style = document.createElement('style');
|
|
12924
|
-
style.textContent = `:host{box-sizing:border-box;font-family:var(--goa-font-family-sans)}:host *{box-sizing:border-box}.modal{font-family:var(--goa-font-family-sans);position:fixed;inset:0;display:flex;align-items:center;justify-content:center;height:100vh;width:100%;z-index:100}.modal-overlay{position:absolute;top:0;left:0;width:100%;height:100%;background-color:rgba(0, 0, 0, 0.2);z-index:1000}.emergency{background-color:var(--goa-color-emergency-default)}.important{background-color:var(--goa-color-warning-default)}.information{background-color:var(--goa-color-info-default)}.event{background-color:var(--goa-color-info-default)}.success{background-color:var(--goa-color-success-default)}.callout-bar{flex:0 0 3rem;text-align:center;padding-top:2rem;border-radius:4px 0px 0px 4px}.content{flex:1 1 auto;width:100%;margin:var(--goa-space-xl)}.content header{display:flex;justify-content:space-between}
|
|
12927
|
+
style.textContent = `:host{box-sizing:border-box;font-family:var(--goa-font-family-sans)}:host *{box-sizing:border-box}.modal{font-family:var(--goa-font-family-sans);position:fixed;inset:0;display:flex;align-items:center;justify-content:center;height:100vh;width:100%;z-index:100}.modal-overlay{position:absolute;top:0;left:0;width:100%;height:100%;background-color:rgba(0, 0, 0, 0.2);z-index:1000}.emergency{background-color:var(--goa-color-emergency-default)}.important{background-color:var(--goa-color-warning-default)}.information{background-color:var(--goa-color-info-default)}.event{background-color:var(--goa-color-info-default)}.success{background-color:var(--goa-color-success-default)}.callout-bar{flex:0 0 3rem;text-align:center;padding-top:2rem;border-radius:4px 0px 0px 4px}.content{flex:1 1 auto;width:100%;margin:var(--goa-space-xl)}.content header{display:flex;justify-content:space-between}header.has-content{margin-bottom:var(--goa-space-l)}@media screen and (max-width: 623px){.content{margin:var(--goa-space-l)}header.has-content{margin-bottom:var(--goa-space-m)}.modal-actions ::slotted(*){padding:var(--goa-space-l) 0 0}}@media screen and (min-width: 1024px){.modal-pane{max-width:var(--maxwidth)}}.modal-pane{background-color:#fff;z-index:1001;width:90%;display:flex;box-shadow:var(--goa-shadow-modal);border-radius:4px;border:1px solid var(--goa-color-greyscale-700)}.modal-actions ::slotted(*){padding:var(--goa-space-xl) 0 0}.modal-content{margin:0 -2rem;line-height:1.75rem}.modal-content ::slotted(:last-child){margin-bottom:0 !important}.modal-title{font:var(--goa-typography-heading-m)}.modal-close{padding-left:var(--goa-space-m);margin-top:var(--goa-space-2xs)}.scroll-top{box-shadow:inset 0px -8px 6px -6px rgba(0, 0, 0, 0.1)}.scroll-middle{box-shadow:inset 0px -8px 6px -6px rgba(0, 0, 0, 0.1), inset 0px 8px 6px -6px rgba(0, 0, 0, 0.1)}.scroll-bottom{box-shadow:inset 0px 8px 6px -6px rgba(0, 0, 0, 0.1)}`;
|
|
12925
12928
|
this.shadowRoot.appendChild(style);
|
|
12926
12929
|
|
|
12927
12930
|
init(
|
|
@@ -12936,12 +12939,12 @@ class Modal extends SvelteElement {
|
|
|
12936
12939
|
safe_not_equal,
|
|
12937
12940
|
{
|
|
12938
12941
|
heading: 1,
|
|
12939
|
-
closable:
|
|
12942
|
+
closable: 15,
|
|
12940
12943
|
open: 2,
|
|
12941
|
-
transition:
|
|
12944
|
+
transition: 16,
|
|
12942
12945
|
calloutvariant: 3,
|
|
12943
12946
|
maxwidth: 0,
|
|
12944
|
-
width:
|
|
12947
|
+
width: 17
|
|
12945
12948
|
},
|
|
12946
12949
|
null
|
|
12947
12950
|
);
|
|
@@ -12980,7 +12983,7 @@ class Modal extends SvelteElement {
|
|
|
12980
12983
|
}
|
|
12981
12984
|
|
|
12982
12985
|
get closable() {
|
|
12983
|
-
return this.$$.ctx[
|
|
12986
|
+
return this.$$.ctx[15];
|
|
12984
12987
|
}
|
|
12985
12988
|
|
|
12986
12989
|
set closable(closable) {
|
|
@@ -12998,7 +13001,7 @@ class Modal extends SvelteElement {
|
|
|
12998
13001
|
}
|
|
12999
13002
|
|
|
13000
13003
|
get transition() {
|
|
13001
|
-
return this.$$.ctx[
|
|
13004
|
+
return this.$$.ctx[16];
|
|
13002
13005
|
}
|
|
13003
13006
|
|
|
13004
13007
|
set transition(transition) {
|
|
@@ -13025,7 +13028,7 @@ class Modal extends SvelteElement {
|
|
|
13025
13028
|
}
|
|
13026
13029
|
|
|
13027
13030
|
get width() {
|
|
13028
|
-
return this.$$.ctx[
|
|
13031
|
+
return this.$$.ctx[17];
|
|
13029
13032
|
}
|
|
13030
13033
|
|
|
13031
13034
|
set width(width) {
|
|
@@ -14028,7 +14031,8 @@ function create_fragment$s(ctx) {
|
|
|
14028
14031
|
attr(div1, "data-testid", /*testid*/ ctx[0]);
|
|
14029
14032
|
|
|
14030
14033
|
attr(div1, "style", div1_style_value = `
|
|
14031
|
-
${/*
|
|
14034
|
+
${/*width*/ ctx[2] && `width: ${/*width*/ ctx[2]};`}
|
|
14035
|
+
${/*_relative*/ ctx[18] && "position: relative;" || ""}
|
|
14032
14036
|
${calculateMargin(/*mt*/ ctx[3], /*mr*/ ctx[4], /*mb*/ ctx[5], /*ml*/ ctx[6])}
|
|
14033
14037
|
${cssVar("--offset-top", /*voffset*/ ctx[8])}
|
|
14034
14038
|
${cssVar("--offset-bottom", /*voffset*/ ctx[8])}
|
|
@@ -14036,8 +14040,7 @@ function create_fragment$s(ctx) {
|
|
|
14036
14040
|
${cssVar("--offset-right", /*hoffset*/ ctx[9])}
|
|
14037
14041
|
${cssVar("--focus-border-width", /*focusborderwidth*/ ctx[10])}
|
|
14038
14042
|
${cssVar("--border-radius", /*borderradius*/ ctx[11])}
|
|
14039
|
-
|
|
14040
|
-
`);
|
|
14043
|
+
`);
|
|
14041
14044
|
},
|
|
14042
14045
|
m(target, anchor) {
|
|
14043
14046
|
insert(target, div1, anchor);
|
|
@@ -14075,8 +14078,9 @@ function create_fragment$s(ctx) {
|
|
|
14075
14078
|
attr(div1, "data-testid", /*testid*/ ctx[0]);
|
|
14076
14079
|
}
|
|
14077
14080
|
|
|
14078
|
-
if (dirty[0] & /*_relative, mt, mr, mb, ml, voffset, hoffset, focusborderwidth, borderradius*/
|
|
14079
|
-
${/*
|
|
14081
|
+
if (dirty[0] & /*width, _relative, mt, mr, mb, ml, voffset, hoffset, focusborderwidth, borderradius*/ 266108 && div1_style_value !== (div1_style_value = `
|
|
14082
|
+
${/*width*/ ctx[2] && `width: ${/*width*/ ctx[2]};`}
|
|
14083
|
+
${/*_relative*/ ctx[18] && "position: relative;" || ""}
|
|
14080
14084
|
${calculateMargin(/*mt*/ ctx[3], /*mr*/ ctx[4], /*mb*/ ctx[5], /*ml*/ ctx[6])}
|
|
14081
14085
|
${cssVar("--offset-top", /*voffset*/ ctx[8])}
|
|
14082
14086
|
${cssVar("--offset-bottom", /*voffset*/ ctx[8])}
|
|
@@ -14084,8 +14088,7 @@ function create_fragment$s(ctx) {
|
|
|
14084
14088
|
${cssVar("--offset-right", /*hoffset*/ ctx[9])}
|
|
14085
14089
|
${cssVar("--focus-border-width", /*focusborderwidth*/ ctx[10])}
|
|
14086
14090
|
${cssVar("--border-radius", /*borderradius*/ ctx[11])}
|
|
14087
|
-
|
|
14088
|
-
`)) {
|
|
14091
|
+
`)) {
|
|
14089
14092
|
attr(div1, "style", div1_style_value);
|
|
14090
14093
|
}
|
|
14091
14094
|
},
|
|
@@ -15025,8 +15028,8 @@ class RadioGroup extends SvelteElement {
|
|
|
15025
15028
|
super();
|
|
15026
15029
|
const style = document.createElement('style');
|
|
15027
15030
|
|
|
15028
|
-
style.textContent = `:host{box-sizing:border-box;font-family:var(--goa-font-family-sans)}.goa-radio-group--horizontal{display:flex;flex-direction:row}.goa-radio-group--vertical{display:inline-block}label.goa-radio{--goa-radio-outline-width:3px;--goa-radio-diameter:1.5rem;--goa-radio-border-width:1px;--goa-radio-border-width--checked:7px;display:inline-block;box-sizing:border-box;display:flex}.goa-radio-container{padding-bottom:1rem}.goa-radio:hover{cursor:pointer}.goa-radio *,.goa-radio *:before,.goa-radio *:after{box-sizing:border-box}.goa-radio input[type="radio"]{width:0;height:0;margin:0;opacity:0}.goa-radio-label{padding:0 0.5rem;font-weight:var(--goa-font-weight-regular)}.goa-radio-description{font:var(--goa-typography-body-xs);margin-left:var(--goa-space-xl);margin-top:var(--goa-space-2xs)}.goa-radio-icon{display:inline-block;height:var(--goa-radio-diameter);width:var(--goa-radio-diameter);border-radius:50%;background-color:#fff;transition:box-shadow 100ms ease-in-out;flex:0 0 auto;margin-top:var(--font-valign-fix)}.goa-radio:focus>input:not(:disabled)~.goa-radio-icon{box-shadow:0 0 0 var(--goa-radio-outline-width) var(--goa-color-interactive-focus)}.goa-radio--disabled .goa-radio-label{opacity:0.4}.goa-radio--disabled:hover{cursor:default}input[type="radio"]:not(:checked)~.goa-radio-icon{border:var(--goa-radio-border-width) solid var(--goa-color-greyscale-700)}input[type="radio"]:hover~.goa-radio-icon{border:1px solid var(--goa-color-interactive-hover);box-shadow:0 0 0 1px var(--goa-color-interactive-hover)}input[type="radio"]:checked:hover~.goa-radio-icon{border:7px solid var(--goa-color-interactive-hover);box-shadow:0 0 0 1px var(--goa-color-interactive-hover)}input[type="radio"]:focus~.goa-radio-icon,input[type="radio"]:hover:active~.goa-radio-icon,input[type="radio"]:hover:focus~.goa-radio-icon,input[type="radio"]:active~.goa-radio-icon{box-shadow:0 0 0 var(--goa-radio-outline-width) var(--goa-color-interactive-focus)}input[type="radio"]:checked~.goa-radio-icon{border:var(--goa-radio-border-width--checked) solid var(--goa-color-interactive-default)}input[type="radio"]:disabled~.goa-radio-icon{border:var(--goa-radio-border-width) solid var(--goa-color-greyscale-700);box-shadow:none;opacity:40%}input[type="radio"]:disabled:checked~.goa-radio-icon{border:var(--goa-radio-border-width--checked) solid
|
|
15029
|
-
var(--goa-color-interactive-hover);box-shadow:none}.goa-radio--error input[type="radio"]:checked~.goa-radio-icon{border:7px solid var(--goa-color-emergency-default)}.goa-radio--error input[type="radio"]:hover~.goa-radio-icon{box-shadow:0 0 0 1px var(--goa-color-emergency-default)}.goa-radio--error input[type="radio"]:disabled:hover~.goa-radio-icon{box-shadow:none}.goa-radio--error input[type="radio"]:not(:checked)~.goa-radio-icon{border:2px solid var(--goa-color-emergency-default)}`;
|
|
15031
|
+
style.textContent = `:host{box-sizing:border-box;font-family:var(--goa-font-family-sans)}.goa-radio-group--horizontal{display:flex;flex-direction:row}.goa-radio-group--vertical{display:inline-block}label.goa-radio{--goa-radio-outline-width:3px;--goa-radio-diameter:1.5rem;--goa-radio-border-width:1px;--goa-radio-border-width--checked:7px;display:inline-block;box-sizing:border-box;display:flex}.goa-radio-container{padding-bottom:1rem}.goa-radio:hover{cursor:pointer}.goa-radio *,.goa-radio *:before,.goa-radio *:after{box-sizing:border-box}.goa-radio input[type="radio"]{width:0;height:0;margin:0;opacity:0}.goa-radio-label{padding:0 0.5rem;font-weight:var(--goa-font-weight-regular)}.goa-radio-description{font:var(--goa-typography-body-xs);margin-left:var(--goa-space-xl);margin-top:var(--goa-space-2xs)}.goa-radio-icon{display:inline-block;height:var(--goa-radio-diameter);width:var(--goa-radio-diameter);border-radius:50%;background-color:#fff;transition:box-shadow 100ms ease-in-out;flex:0 0 auto;margin-top:var(--font-valign-fix)}.goa-radio:focus>input:not(:disabled)~.goa-radio-icon{box-shadow:0 0 0 var(--goa-radio-outline-width) var(--goa-color-interactive-focus)}.goa-radio--disabled .goa-radio-label{opacity:0.4}.goa-radio--disabled:hover{cursor:default}input[type="radio"]:not(:checked)~.goa-radio-icon{border:var(--goa-radio-border-width) solid var(--goa-color-greyscale-700)}input[type="radio"]:hover~.goa-radio-icon{border:1px solid var(--goa-color-interactive-hover);box-shadow:0 0 0 1px var(--goa-color-interactive-hover)}input[type="radio"]:checked:hover~.goa-radio-icon{border:7px solid var(--goa-color-interactive-hover);box-shadow:0 0 0 1px var(--goa-color-interactive-hover)}input[type="radio"]:focus~.goa-radio-icon,input[type="radio"]:hover:active~.goa-radio-icon,input[type="radio"]:hover:focus~.goa-radio-icon,input[type="radio"]:active~.goa-radio-icon{box-shadow:0 0 0 var(--goa-radio-outline-width) var(--goa-color-interactive-focus)}input[type="radio"]:checked~.goa-radio-icon{border:var(--goa-radio-border-width--checked) solid var(--goa-color-interactive-default)}input[type="radio"]:disabled~.goa-radio-icon,input[type="radio"]:disabled:focus~.goa-radio-icon,input[type="radio"]:disabled:active~.goa-radio-icon{border:var(--goa-radio-border-width) solid var(--goa-color-greyscale-700);box-shadow:none;opacity:40%}input[type="radio"]:disabled:checked~.goa-radio-icon,input[type="radio"]:disabled:checked:focus~.goa-radio-icon,input[type="radio"]:disabled:checked:active~.goa-radio-icon{border:var(--goa-radio-border-width--checked) solid
|
|
15032
|
+
var(--goa-color-interactive-hover);box-shadow:none}.goa-radio--error input[type="radio"]:checked~.goa-radio-icon,.goa-radio--error input[type="radio"]:disabled:checked~.goa-radio-icon{border:7px solid var(--goa-color-emergency-default)}.goa-radio--error input[type="radio"]:hover~.goa-radio-icon{box-shadow:0 0 0 1px var(--goa-color-emergency-default)}.goa-radio--error input[type="radio"]:hover:active~.goa-radio-icon,.goa-radio--error input[type="radio"]:hover:focus~.goa-radio-icon{box-shadow:0 0 0 var(--goa-radio-outline-width) var(--goa-color-interactive-focus)}.goa-radio--error input[type="radio"]:disabled:hover~.goa-radio-icon{box-shadow:none}.goa-radio--error input[type="radio"]:not(:checked)~.goa-radio-icon{border:2px solid var(--goa-color-emergency-default)}`;
|
|
15030
15033
|
|
|
15031
15034
|
this.shadowRoot.appendChild(style);
|
|
15032
15035
|
|
|
@@ -17296,7 +17299,7 @@ function create_if_block_1$5(ctx) {
|
|
|
17296
17299
|
};
|
|
17297
17300
|
}
|
|
17298
17301
|
|
|
17299
|
-
// (
|
|
17302
|
+
// (84:33)
|
|
17300
17303
|
function create_if_block_3$5(ctx) {
|
|
17301
17304
|
let t0_value = /*maxcount*/ ctx[8] - /*count*/ ctx[15] + "";
|
|
17302
17305
|
let t0;
|
|
@@ -17331,7 +17334,7 @@ function create_if_block_3$5(ctx) {
|
|
|
17331
17334
|
};
|
|
17332
17335
|
}
|
|
17333
17336
|
|
|
17334
|
-
// (
|
|
17337
|
+
// (82:6) {#if count > maxcount}
|
|
17335
17338
|
function create_if_block_2$5(ctx) {
|
|
17336
17339
|
let t0_value = /*count*/ ctx[15] - /*maxcount*/ ctx[8] + "";
|
|
17337
17340
|
let t0;
|
|
@@ -17366,7 +17369,7 @@ function create_if_block_2$5(ctx) {
|
|
|
17366
17369
|
};
|
|
17367
17370
|
}
|
|
17368
17371
|
|
|
17369
|
-
// (
|
|
17372
|
+
// (90:2) {#if countby && maxcount < 0 && count > 0 && !isDisabled}
|
|
17370
17373
|
function create_if_block$9(ctx) {
|
|
17371
17374
|
let div;
|
|
17372
17375
|
let t0;
|
|
@@ -17408,7 +17411,7 @@ function create_fragment$k(ctx) {
|
|
|
17408
17411
|
let mounted;
|
|
17409
17412
|
let dispose;
|
|
17410
17413
|
let if_block0 = /*maxcount*/ ctx[8] > 0 && !/*isDisabled*/ ctx[14] && create_if_block_1$5(ctx);
|
|
17411
|
-
let if_block1 = /*
|
|
17414
|
+
let if_block1 = /*countby*/ ctx[7] && /*maxcount*/ ctx[8] < 0 && /*count*/ ctx[15] > 0 && !/*isDisabled*/ ctx[14] && create_if_block$9(ctx);
|
|
17412
17415
|
|
|
17413
17416
|
return {
|
|
17414
17417
|
c() {
|
|
@@ -17424,7 +17427,7 @@ function create_fragment$k(ctx) {
|
|
|
17424
17427
|
attr(textarea, "rows", /*rows*/ ctx[3]);
|
|
17425
17428
|
attr(textarea, "aria-label", textarea_aria_label_value = /*arialabel*/ ctx[6] || /*name*/ ctx[1]);
|
|
17426
17429
|
textarea.disabled = /*isDisabled*/ ctx[14];
|
|
17427
|
-
textarea.readOnly = /*isReadonly*/ ctx[
|
|
17430
|
+
textarea.readOnly = /*isReadonly*/ ctx[16];
|
|
17428
17431
|
attr(textarea, "data-testid", /*testid*/ ctx[4]);
|
|
17429
17432
|
attr(div, "data-testid", "root");
|
|
17430
17433
|
attr(div, "class", "root");
|
|
@@ -17432,18 +17435,16 @@ function create_fragment$k(ctx) {
|
|
|
17432
17435
|
attr(div, "style", div_style_value = `
|
|
17433
17436
|
${calculateMargin(/*mt*/ ctx[9], /*mr*/ ctx[10], /*mb*/ ctx[11], /*ml*/ ctx[12])};
|
|
17434
17437
|
--width: ${/*width*/ ctx[5]};
|
|
17435
|
-
--char-count-padding: ${/*
|
|
17436
|
-
? "2rem"
|
|
17437
|
-
: "0"};
|
|
17438
|
+
--char-count-padding: ${/*countby*/ ctx[7] ? "2rem" : "0"};
|
|
17438
17439
|
`);
|
|
17439
17440
|
|
|
17440
|
-
toggle_class(div, "error", /*isError*/ ctx[
|
|
17441
|
+
toggle_class(div, "error", /*isError*/ ctx[17] || /*maxcount*/ ctx[8] > 0 && /*count*/ ctx[15] > /*maxcount*/ ctx[8]);
|
|
17441
17442
|
toggle_class(div, "disabled", /*isDisabled*/ ctx[14]);
|
|
17442
17443
|
},
|
|
17443
17444
|
m(target, anchor) {
|
|
17444
17445
|
insert(target, div, anchor);
|
|
17445
17446
|
append(div, textarea);
|
|
17446
|
-
/*textarea_binding*/ ctx[
|
|
17447
|
+
/*textarea_binding*/ ctx[23](textarea);
|
|
17447
17448
|
set_input_value(textarea, /*value*/ ctx[0]);
|
|
17448
17449
|
append(div, t0);
|
|
17449
17450
|
if (if_block0) if_block0.m(div, null);
|
|
@@ -17452,9 +17453,9 @@ function create_fragment$k(ctx) {
|
|
|
17452
17453
|
|
|
17453
17454
|
if (!mounted) {
|
|
17454
17455
|
dispose = [
|
|
17455
|
-
listen(textarea, "input", /*textarea_input_handler*/ ctx[
|
|
17456
|
-
listen(textarea, "keyup", /*onKeyPress*/ ctx[
|
|
17457
|
-
listen(textarea, "change", /*onChange*/ ctx[
|
|
17456
|
+
listen(textarea, "input", /*textarea_input_handler*/ ctx[24]),
|
|
17457
|
+
listen(textarea, "keyup", /*onKeyPress*/ ctx[19]),
|
|
17458
|
+
listen(textarea, "change", /*onChange*/ ctx[18])
|
|
17458
17459
|
];
|
|
17459
17460
|
|
|
17460
17461
|
mounted = true;
|
|
@@ -17481,8 +17482,8 @@ function create_fragment$k(ctx) {
|
|
|
17481
17482
|
textarea.disabled = /*isDisabled*/ ctx[14];
|
|
17482
17483
|
}
|
|
17483
17484
|
|
|
17484
|
-
if (dirty & /*isReadonly*/
|
|
17485
|
-
textarea.readOnly = /*isReadonly*/ ctx[
|
|
17485
|
+
if (dirty & /*isReadonly*/ 65536) {
|
|
17486
|
+
textarea.readOnly = /*isReadonly*/ ctx[16];
|
|
17486
17487
|
}
|
|
17487
17488
|
|
|
17488
17489
|
if (dirty & /*testid*/ 16) {
|
|
@@ -17506,7 +17507,7 @@ function create_fragment$k(ctx) {
|
|
|
17506
17507
|
if_block0 = null;
|
|
17507
17508
|
}
|
|
17508
17509
|
|
|
17509
|
-
if (/*
|
|
17510
|
+
if (/*countby*/ ctx[7] && /*maxcount*/ ctx[8] < 0 && /*count*/ ctx[15] > 0 && !/*isDisabled*/ ctx[14]) {
|
|
17510
17511
|
if (if_block1) {
|
|
17511
17512
|
if_block1.p(ctx, dirty);
|
|
17512
17513
|
} else {
|
|
@@ -17519,18 +17520,16 @@ function create_fragment$k(ctx) {
|
|
|
17519
17520
|
if_block1 = null;
|
|
17520
17521
|
}
|
|
17521
17522
|
|
|
17522
|
-
if (dirty & /*mt, mr, mb, ml, width,
|
|
17523
|
+
if (dirty & /*mt, mr, mb, ml, width, countby*/ 7840 && div_style_value !== (div_style_value = `
|
|
17523
17524
|
${calculateMargin(/*mt*/ ctx[9], /*mr*/ ctx[10], /*mb*/ ctx[11], /*ml*/ ctx[12])};
|
|
17524
17525
|
--width: ${/*width*/ ctx[5]};
|
|
17525
|
-
--char-count-padding: ${/*
|
|
17526
|
-
? "2rem"
|
|
17527
|
-
: "0"};
|
|
17526
|
+
--char-count-padding: ${/*countby*/ ctx[7] ? "2rem" : "0"};
|
|
17528
17527
|
`)) {
|
|
17529
17528
|
attr(div, "style", div_style_value);
|
|
17530
17529
|
}
|
|
17531
17530
|
|
|
17532
|
-
if (dirty & /*isError, maxcount, count*/
|
|
17533
|
-
toggle_class(div, "error", /*isError*/ ctx[
|
|
17531
|
+
if (dirty & /*isError, maxcount, count*/ 164096) {
|
|
17532
|
+
toggle_class(div, "error", /*isError*/ ctx[17] || /*maxcount*/ ctx[8] > 0 && /*count*/ ctx[15] > /*maxcount*/ ctx[8]);
|
|
17534
17533
|
}
|
|
17535
17534
|
|
|
17536
17535
|
if (dirty & /*isDisabled*/ 16384) {
|
|
@@ -17541,7 +17540,7 @@ function create_fragment$k(ctx) {
|
|
|
17541
17540
|
o: noop,
|
|
17542
17541
|
d(detaching) {
|
|
17543
17542
|
if (detaching) detach(div);
|
|
17544
|
-
/*textarea_binding*/ ctx[
|
|
17543
|
+
/*textarea_binding*/ ctx[23](null);
|
|
17545
17544
|
if (if_block0) if_block0.d();
|
|
17546
17545
|
if (if_block1) if_block1.d();
|
|
17547
17546
|
mounted = false;
|
|
@@ -17554,7 +17553,6 @@ function instance$h($$self, $$props, $$invalidate) {
|
|
|
17554
17553
|
let isError;
|
|
17555
17554
|
let isDisabled;
|
|
17556
17555
|
let isReadonly;
|
|
17557
|
-
let showCount;
|
|
17558
17556
|
let count;
|
|
17559
17557
|
let { name } = $$props;
|
|
17560
17558
|
let { value = "" } = $$props;
|
|
@@ -17567,7 +17565,6 @@ function instance$h($$self, $$props, $$invalidate) {
|
|
|
17567
17565
|
let { disabled = "false" } = $$props;
|
|
17568
17566
|
let { arialabel = "" } = $$props;
|
|
17569
17567
|
let { countby } = $$props;
|
|
17570
|
-
let { showcount = "false" } = $$props;
|
|
17571
17568
|
let { maxcount = -1 } = $$props;
|
|
17572
17569
|
let { mt = null } = $$props;
|
|
17573
17570
|
let { mr = null } = $$props;
|
|
@@ -17618,12 +17615,11 @@ function instance$h($$self, $$props, $$invalidate) {
|
|
|
17618
17615
|
if ('rows' in $$props) $$invalidate(3, rows = $$props.rows);
|
|
17619
17616
|
if ('testid' in $$props) $$invalidate(4, testid = $$props.testid);
|
|
17620
17617
|
if ('width' in $$props) $$invalidate(5, width = $$props.width);
|
|
17621
|
-
if ('error' in $$props) $$invalidate(
|
|
17622
|
-
if ('readonly' in $$props) $$invalidate(
|
|
17623
|
-
if ('disabled' in $$props) $$invalidate(
|
|
17618
|
+
if ('error' in $$props) $$invalidate(20, error = $$props.error);
|
|
17619
|
+
if ('readonly' in $$props) $$invalidate(21, readonly = $$props.readonly);
|
|
17620
|
+
if ('disabled' in $$props) $$invalidate(22, disabled = $$props.disabled);
|
|
17624
17621
|
if ('arialabel' in $$props) $$invalidate(6, arialabel = $$props.arialabel);
|
|
17625
17622
|
if ('countby' in $$props) $$invalidate(7, countby = $$props.countby);
|
|
17626
|
-
if ('showcount' in $$props) $$invalidate(24, showcount = $$props.showcount);
|
|
17627
17623
|
if ('maxcount' in $$props) $$invalidate(8, maxcount = $$props.maxcount);
|
|
17628
17624
|
if ('mt' in $$props) $$invalidate(9, mt = $$props.mt);
|
|
17629
17625
|
if ('mr' in $$props) $$invalidate(10, mr = $$props.mr);
|
|
@@ -17632,21 +17628,17 @@ function instance$h($$self, $$props, $$invalidate) {
|
|
|
17632
17628
|
};
|
|
17633
17629
|
|
|
17634
17630
|
$$self.$$.update = () => {
|
|
17635
|
-
if ($$self.$$.dirty & /*error*/
|
|
17631
|
+
if ($$self.$$.dirty & /*error*/ 1048576) {
|
|
17636
17632
|
// reactive
|
|
17637
|
-
$$invalidate(
|
|
17633
|
+
$$invalidate(17, isError = toBoolean(error));
|
|
17638
17634
|
}
|
|
17639
17635
|
|
|
17640
|
-
if ($$self.$$.dirty & /*disabled*/
|
|
17636
|
+
if ($$self.$$.dirty & /*disabled*/ 4194304) {
|
|
17641
17637
|
$$invalidate(14, isDisabled = toBoolean(disabled));
|
|
17642
17638
|
}
|
|
17643
17639
|
|
|
17644
|
-
if ($$self.$$.dirty & /*readonly*/
|
|
17645
|
-
$$invalidate(
|
|
17646
|
-
}
|
|
17647
|
-
|
|
17648
|
-
if ($$self.$$.dirty & /*showcount*/ 16777216) {
|
|
17649
|
-
$$invalidate(16, showCount = toBoolean(showcount));
|
|
17640
|
+
if ($$self.$$.dirty & /*readonly*/ 2097152) {
|
|
17641
|
+
$$invalidate(16, isReadonly = toBoolean(readonly));
|
|
17650
17642
|
}
|
|
17651
17643
|
|
|
17652
17644
|
if ($$self.$$.dirty & /*countby, value*/ 129) {
|
|
@@ -17673,7 +17665,6 @@ function instance$h($$self, $$props, $$invalidate) {
|
|
|
17673
17665
|
_textareaEl,
|
|
17674
17666
|
isDisabled,
|
|
17675
17667
|
count,
|
|
17676
|
-
showCount,
|
|
17677
17668
|
isReadonly,
|
|
17678
17669
|
isError,
|
|
17679
17670
|
onChange,
|
|
@@ -17681,7 +17672,6 @@ function instance$h($$self, $$props, $$invalidate) {
|
|
|
17681
17672
|
error,
|
|
17682
17673
|
readonly,
|
|
17683
17674
|
disabled,
|
|
17684
|
-
showcount,
|
|
17685
17675
|
textarea_binding,
|
|
17686
17676
|
textarea_input_handler
|
|
17687
17677
|
];
|
|
@@ -17692,7 +17682,7 @@ class TextArea extends SvelteElement {
|
|
|
17692
17682
|
super();
|
|
17693
17683
|
const style = document.createElement('style');
|
|
17694
17684
|
|
|
17695
|
-
style.textContent = `:host{--textarea-padding-vertical:0.625rem;--textarea-padding-horizontal:var(--goa-space-s);box-sizing:border-box;font-family:var(--goa-font-family-sans)}.root{position:relative;width:100%;padding-bottom:var(--char-count-padding);border:var(--goa-border-width-s) solid var(--goa-color-greyscale-700);border-radius:3px}.root:has(textarea:disabled){background-color:var(--goa-color-greyscale-100);border-color:var(--goa-color-greyscale-200);cursor:default;box-shadow:none}@media screen and (max-width: 623px){@media not (max-color:2147477350){.root{max-width:var(--width)}}}@media not screen and (max-width: 623px){@media not (color:2147477350){.root{max-width:var(--width)}}}textarea{display:block;width:100%;box-sizing:border-box;outline:none;border:none;color:var(--goa-color-greyscale-black, #ccc);padding:var(--textarea-padding-vertical) var(--textarea-padding-horizontal);font-size:var(--goa-font-size-4);font-family:var(--goa-font-family-sans);min-width:100%;resize:vertical}@media screen and (max-width: 623px){@media not (max-color:2147477350){}}@media not screen and (max-width: 623px){@media not (color:2147477350){}}.root:hover{box-shadow:0 0 0 var(--goa-border-width-m) var(--goa-color-interactive-hover)}.root:focus-within{box-shadow:0 0 0 var(--goa-border-width-l) var(--goa-color-interactive-focus)}.counter-error{color:var(--goa-color-interactive-error)
|
|
17685
|
+
style.textContent = `:host{--textarea-padding-vertical:0.625rem;--textarea-padding-horizontal:var(--goa-space-s);box-sizing:border-box;font-family:var(--goa-font-family-sans)}.root{position:relative;width:100%;padding-bottom:var(--char-count-padding);border:var(--goa-border-width-s) solid var(--goa-color-greyscale-700);border-radius:3px}.root:has(textarea:disabled){background-color:var(--goa-color-greyscale-100);border-color:var(--goa-color-greyscale-200);cursor:default;box-shadow:none}@media screen and (max-width: 623px){@media not (max-color:2147477350){.root{max-width:var(--width)}}}@media not screen and (max-width: 623px){@media not (color:2147477350){.root{max-width:var(--width)}}}textarea{display:block;width:100%;box-sizing:border-box;outline:none;border:none;border-radius:3px;color:var(--goa-color-greyscale-black, #ccc);padding:var(--textarea-padding-vertical) var(--textarea-padding-horizontal);font-size:var(--goa-font-size-4);font-family:var(--goa-font-family-sans);min-width:100%;resize:vertical}@media screen and (max-width: 623px){@media not (max-color:2147477350){}}@media not screen and (max-width: 623px){@media not (color:2147477350){}}.root:hover{box-shadow:0 0 0 var(--goa-border-width-m) var(--goa-color-interactive-hover)}.root:focus-within{box-shadow:0 0 0 var(--goa-border-width-l) var(--goa-color-interactive-focus)}.counter-error{color:var(--goa-color-interactive-error)
|
|
17696
17686
|
}.counter{position:absolute;right:0.75rem;font-size:var(--goa-font-size-2)}textarea{resize:none;scroll-behavior:smooth;max-height:calc(100vh * var(--max-height, 100) / 100)}textarea::-webkit-scrollbar{width:6px}textarea::-webkit-scrollbar-track{background:#f1f1f1}textarea::-webkit-scrollbar-thumb{background:#888}textarea::-webkit-scrollbar-thumb:hover{background:#555}.error{border-color:var(--goa-color-interactive-error);box-shadow:0 0 0 var(--goa-border-width-m) var(--goa-color-interactive-error)}.error:hover{box-shadow:0 0 0 var(--goa-border-width-m) var(--goa-color-interactive-error)}.error:active,.error:focus{box-shadow:0 0 0 var(--goa-border-width-l) var(--goa-color-interactive-focus)}`;
|
|
17697
17687
|
|
|
17698
17688
|
this.shadowRoot.appendChild(style);
|
|
@@ -17714,12 +17704,11 @@ class TextArea extends SvelteElement {
|
|
|
17714
17704
|
rows: 3,
|
|
17715
17705
|
testid: 4,
|
|
17716
17706
|
width: 5,
|
|
17717
|
-
error:
|
|
17718
|
-
readonly:
|
|
17719
|
-
disabled:
|
|
17707
|
+
error: 20,
|
|
17708
|
+
readonly: 21,
|
|
17709
|
+
disabled: 22,
|
|
17720
17710
|
arialabel: 6,
|
|
17721
17711
|
countby: 7,
|
|
17722
|
-
showcount: 24,
|
|
17723
17712
|
maxcount: 8,
|
|
17724
17713
|
mt: 9,
|
|
17725
17714
|
mr: 10,
|
|
@@ -17754,7 +17743,6 @@ class TextArea extends SvelteElement {
|
|
|
17754
17743
|
"disabled",
|
|
17755
17744
|
"arialabel",
|
|
17756
17745
|
"countby",
|
|
17757
|
-
"showcount",
|
|
17758
17746
|
"maxcount",
|
|
17759
17747
|
"mt",
|
|
17760
17748
|
"mr",
|
|
@@ -17818,7 +17806,7 @@ class TextArea extends SvelteElement {
|
|
|
17818
17806
|
}
|
|
17819
17807
|
|
|
17820
17808
|
get error() {
|
|
17821
|
-
return this.$$.ctx[
|
|
17809
|
+
return this.$$.ctx[20];
|
|
17822
17810
|
}
|
|
17823
17811
|
|
|
17824
17812
|
set error(error) {
|
|
@@ -17827,7 +17815,7 @@ class TextArea extends SvelteElement {
|
|
|
17827
17815
|
}
|
|
17828
17816
|
|
|
17829
17817
|
get readonly() {
|
|
17830
|
-
return this.$$.ctx[
|
|
17818
|
+
return this.$$.ctx[21];
|
|
17831
17819
|
}
|
|
17832
17820
|
|
|
17833
17821
|
set readonly(readonly) {
|
|
@@ -17836,7 +17824,7 @@ class TextArea extends SvelteElement {
|
|
|
17836
17824
|
}
|
|
17837
17825
|
|
|
17838
17826
|
get disabled() {
|
|
17839
|
-
return this.$$.ctx[
|
|
17827
|
+
return this.$$.ctx[22];
|
|
17840
17828
|
}
|
|
17841
17829
|
|
|
17842
17830
|
set disabled(disabled) {
|
|
@@ -17862,15 +17850,6 @@ class TextArea extends SvelteElement {
|
|
|
17862
17850
|
flush();
|
|
17863
17851
|
}
|
|
17864
17852
|
|
|
17865
|
-
get showcount() {
|
|
17866
|
-
return this.$$.ctx[24];
|
|
17867
|
-
}
|
|
17868
|
-
|
|
17869
|
-
set showcount(showcount) {
|
|
17870
|
-
this.$$set({ showcount });
|
|
17871
|
-
flush();
|
|
17872
|
-
}
|
|
17873
|
-
|
|
17874
17853
|
get maxcount() {
|
|
17875
17854
|
return this.$$.ctx[8];
|
|
17876
17855
|
}
|
|
@@ -27376,6 +27355,11 @@ function instance($$self, $$props, $$invalidate) {
|
|
|
27376
27355
|
|
|
27377
27356
|
function onKeyDown(e) {
|
|
27378
27357
|
let isHandled = false;
|
|
27358
|
+
const isTabButtonFocused = e.target && _tabs.contains(e.target);
|
|
27359
|
+
|
|
27360
|
+
if (!isTabButtonFocused) {
|
|
27361
|
+
return;
|
|
27362
|
+
}
|
|
27379
27363
|
|
|
27380
27364
|
switch (e.key) {
|
|
27381
27365
|
case 'ArrowUp':
|