@abgov/react-components 4.0.0-alpha.135 → 4.0.0-alpha.137
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/react-components.esm.js +216 -121
- package/react-components.umd.js +216 -121
package/react-components.umd.js
CHANGED
|
@@ -11202,7 +11202,7 @@
|
|
|
11202
11202
|
}
|
|
11203
11203
|
|
|
11204
11204
|
};
|
|
11205
|
-
} // (
|
|
11205
|
+
} // (123:4) {#if leadingicon}
|
|
11206
11206
|
|
|
11207
11207
|
|
|
11208
11208
|
function create_if_block_3$4(ctx) {
|
|
@@ -11236,7 +11236,7 @@
|
|
|
11236
11236
|
}
|
|
11237
11237
|
|
|
11238
11238
|
};
|
|
11239
|
-
} // (
|
|
11239
|
+
} // (157:4) {#if trailingicon && !handlesTrailingIconClick}
|
|
11240
11240
|
|
|
11241
11241
|
|
|
11242
11242
|
function create_if_block_2$4(ctx) {
|
|
@@ -11271,7 +11271,7 @@
|
|
|
11271
11271
|
}
|
|
11272
11272
|
|
|
11273
11273
|
};
|
|
11274
|
-
} // (
|
|
11274
|
+
} // (167:4) {#if trailingicon && handlesTrailingIconClick}
|
|
11275
11275
|
|
|
11276
11276
|
|
|
11277
11277
|
function create_if_block_1$4(ctx) {
|
|
@@ -11283,7 +11283,7 @@
|
|
|
11283
11283
|
goa_icon_button = element("goa-icon-button");
|
|
11284
11284
|
set_custom_element_data(goa_icon_button, "disabled",
|
|
11285
11285
|
/*isDisabled*/
|
|
11286
|
-
ctx[
|
|
11286
|
+
ctx[24]);
|
|
11287
11287
|
set_custom_element_data(goa_icon_button, "variant", "nocolor");
|
|
11288
11288
|
set_custom_element_data(goa_icon_button, "size", "medium");
|
|
11289
11289
|
set_custom_element_data(goa_icon_button, "icon",
|
|
@@ -11304,10 +11304,10 @@
|
|
|
11304
11304
|
p(ctx, dirty) {
|
|
11305
11305
|
if (dirty[0] &
|
|
11306
11306
|
/*isDisabled*/
|
|
11307
|
-
|
|
11307
|
+
16777216) {
|
|
11308
11308
|
set_custom_element_data(goa_icon_button, "disabled",
|
|
11309
11309
|
/*isDisabled*/
|
|
11310
|
-
ctx[
|
|
11310
|
+
ctx[24]);
|
|
11311
11311
|
}
|
|
11312
11312
|
|
|
11313
11313
|
if (dirty[0] &
|
|
@@ -11326,7 +11326,7 @@
|
|
|
11326
11326
|
}
|
|
11327
11327
|
|
|
11328
11328
|
};
|
|
11329
|
-
} // (
|
|
11329
|
+
} // (179:4) {#if suffix}
|
|
11330
11330
|
|
|
11331
11331
|
|
|
11332
11332
|
function create_if_block$a(ctx) {
|
|
@@ -11391,12 +11391,12 @@
|
|
|
11391
11391
|
/*trailingicon*/
|
|
11392
11392
|
ctx[6] && !
|
|
11393
11393
|
/*handlesTrailingIconClick*/
|
|
11394
|
-
ctx[
|
|
11394
|
+
ctx[27] && create_if_block_2$4(ctx);
|
|
11395
11395
|
let if_block3 =
|
|
11396
11396
|
/*trailingicon*/
|
|
11397
11397
|
ctx[6] &&
|
|
11398
11398
|
/*handlesTrailingIconClick*/
|
|
11399
|
-
ctx[
|
|
11399
|
+
ctx[27] && create_if_block_1$4(ctx);
|
|
11400
11400
|
let if_block4 =
|
|
11401
11401
|
/*suffix*/
|
|
11402
11402
|
ctx[15] && create_if_block$a(ctx);
|
|
@@ -11423,18 +11423,30 @@
|
|
|
11423
11423
|
div1.innerHTML = `<slot name="trailingContent"></slot>`;
|
|
11424
11424
|
this.c = noop;
|
|
11425
11425
|
attr(div0, "class", "leading-content");
|
|
11426
|
-
attr(input, "class", input_class_value = `
|
|
11426
|
+
attr(input, "class", input_class_value = `
|
|
11427
|
+
input--${
|
|
11427
11428
|
/*variant*/
|
|
11428
|
-
ctx[7]}
|
|
11429
|
+
ctx[7]}
|
|
11430
|
+
${
|
|
11431
|
+
/*_leadingContentSlot*/
|
|
11432
|
+
ctx[22] && !
|
|
11433
|
+
/*isDisabled*/
|
|
11434
|
+
ctx[24] ? "input-leading-content" : ""}
|
|
11435
|
+
${
|
|
11436
|
+
/*_trailingContentSlot*/
|
|
11437
|
+
ctx[23] && !
|
|
11438
|
+
/*isDisabled*/
|
|
11439
|
+
ctx[24] ? "input-trailing-content" : ""}
|
|
11440
|
+
`);
|
|
11429
11441
|
attr(input, "style", input_style_value = `--search-icon-offset: ${
|
|
11430
11442
|
/*trailingicon*/
|
|
11431
11443
|
ctx[6] ? "-0.5rem" : "0"}`);
|
|
11432
11444
|
input.readOnly =
|
|
11433
11445
|
/*isReadonly*/
|
|
11434
|
-
ctx[
|
|
11446
|
+
ctx[26];
|
|
11435
11447
|
input.disabled =
|
|
11436
11448
|
/*isDisabled*/
|
|
11437
|
-
ctx[
|
|
11449
|
+
ctx[24];
|
|
11438
11450
|
attr(input, "data-testid",
|
|
11439
11451
|
/*testid*/
|
|
11440
11452
|
ctx[8]);
|
|
@@ -11473,17 +11485,23 @@
|
|
|
11473
11485
|
goa-input
|
|
11474
11486
|
${
|
|
11475
11487
|
/*isDisabled*/
|
|
11476
|
-
ctx[
|
|
11488
|
+
ctx[24] ? "goa-input--disabled" : ""}
|
|
11477
11489
|
variant--${
|
|
11478
11490
|
/*variant*/
|
|
11479
11491
|
ctx[7]}
|
|
11480
11492
|
type--${
|
|
11481
11493
|
/*type*/
|
|
11482
11494
|
ctx[1]}
|
|
11495
|
+
${
|
|
11496
|
+
/*_leadingContentSlot*/
|
|
11497
|
+
ctx[22] ? "goa-input-leading-content" : ""}
|
|
11498
|
+
${
|
|
11499
|
+
/*_trailingContentSlot*/
|
|
11500
|
+
ctx[23] ? "goa-input-trailing-content" : ""}
|
|
11483
11501
|
`);
|
|
11484
11502
|
toggle_class(div2, "error",
|
|
11485
11503
|
/*isError*/
|
|
11486
|
-
ctx[
|
|
11504
|
+
ctx[25]);
|
|
11487
11505
|
attr(div3, "class", "container");
|
|
11488
11506
|
attr(div3, "style", div3_style_value = `
|
|
11489
11507
|
${calculateMargin(
|
|
@@ -11513,7 +11531,7 @@
|
|
|
11513
11531
|
append(div2, input);
|
|
11514
11532
|
/*input_binding*/
|
|
11515
11533
|
|
|
11516
|
-
ctx[
|
|
11534
|
+
ctx[36](input);
|
|
11517
11535
|
append(div2, t3);
|
|
11518
11536
|
if (if_block2) if_block2.m(div2, null);
|
|
11519
11537
|
append(div2, t4);
|
|
@@ -11522,13 +11540,16 @@
|
|
|
11522
11540
|
if (if_block4) if_block4.m(div2, null);
|
|
11523
11541
|
append(div2, t6);
|
|
11524
11542
|
append(div2, div1);
|
|
11543
|
+
/*div3_binding*/
|
|
11544
|
+
|
|
11545
|
+
ctx[37](div3);
|
|
11525
11546
|
|
|
11526
11547
|
if (!mounted) {
|
|
11527
11548
|
dispose = [listen(input, "keyup",
|
|
11528
11549
|
/*onKeyUp*/
|
|
11529
|
-
ctx[
|
|
11550
|
+
ctx[28]), listen(input, "change",
|
|
11530
11551
|
/*onKeyUp*/
|
|
11531
|
-
ctx[
|
|
11552
|
+
ctx[28])];
|
|
11532
11553
|
mounted = true;
|
|
11533
11554
|
}
|
|
11534
11555
|
},
|
|
@@ -11565,10 +11586,22 @@
|
|
|
11565
11586
|
}
|
|
11566
11587
|
|
|
11567
11588
|
if (dirty[0] &
|
|
11568
|
-
/*variant*/
|
|
11569
|
-
|
|
11589
|
+
/*variant, _leadingContentSlot, isDisabled, _trailingContentSlot*/
|
|
11590
|
+
29360256 && input_class_value !== (input_class_value = `
|
|
11591
|
+
input--${
|
|
11570
11592
|
/*variant*/
|
|
11571
|
-
ctx[7]}
|
|
11593
|
+
ctx[7]}
|
|
11594
|
+
${
|
|
11595
|
+
/*_leadingContentSlot*/
|
|
11596
|
+
ctx[22] && !
|
|
11597
|
+
/*isDisabled*/
|
|
11598
|
+
ctx[24] ? "input-leading-content" : ""}
|
|
11599
|
+
${
|
|
11600
|
+
/*_trailingContentSlot*/
|
|
11601
|
+
ctx[23] && !
|
|
11602
|
+
/*isDisabled*/
|
|
11603
|
+
ctx[24] ? "input-trailing-content" : ""}
|
|
11604
|
+
`)) {
|
|
11572
11605
|
attr(input, "class", input_class_value);
|
|
11573
11606
|
}
|
|
11574
11607
|
|
|
@@ -11582,18 +11615,18 @@
|
|
|
11582
11615
|
|
|
11583
11616
|
if (dirty[0] &
|
|
11584
11617
|
/*isReadonly*/
|
|
11585
|
-
|
|
11618
|
+
67108864) {
|
|
11586
11619
|
input.readOnly =
|
|
11587
11620
|
/*isReadonly*/
|
|
11588
|
-
ctx[
|
|
11621
|
+
ctx[26];
|
|
11589
11622
|
}
|
|
11590
11623
|
|
|
11591
11624
|
if (dirty[0] &
|
|
11592
11625
|
/*isDisabled*/
|
|
11593
|
-
|
|
11626
|
+
16777216) {
|
|
11594
11627
|
input.disabled =
|
|
11595
11628
|
/*isDisabled*/
|
|
11596
|
-
ctx[
|
|
11629
|
+
ctx[24];
|
|
11597
11630
|
}
|
|
11598
11631
|
|
|
11599
11632
|
if (dirty[0] &
|
|
@@ -11684,7 +11717,7 @@
|
|
|
11684
11717
|
/*trailingicon*/
|
|
11685
11718
|
ctx[6] && !
|
|
11686
11719
|
/*handlesTrailingIconClick*/
|
|
11687
|
-
ctx[
|
|
11720
|
+
ctx[27]) {
|
|
11688
11721
|
if (if_block2) {
|
|
11689
11722
|
if_block2.p(ctx, dirty);
|
|
11690
11723
|
} else {
|
|
@@ -11701,7 +11734,7 @@
|
|
|
11701
11734
|
/*trailingicon*/
|
|
11702
11735
|
ctx[6] &&
|
|
11703
11736
|
/*handlesTrailingIconClick*/
|
|
11704
|
-
ctx[
|
|
11737
|
+
ctx[27]) {
|
|
11705
11738
|
if (if_block3) {
|
|
11706
11739
|
if_block3.p(ctx, dirty);
|
|
11707
11740
|
} else {
|
|
@@ -11730,28 +11763,34 @@
|
|
|
11730
11763
|
}
|
|
11731
11764
|
|
|
11732
11765
|
if (dirty[0] &
|
|
11733
|
-
/*isDisabled, variant, type*/
|
|
11734
|
-
|
|
11766
|
+
/*isDisabled, variant, type, _leadingContentSlot, _trailingContentSlot*/
|
|
11767
|
+
29360258 && div2_class_value !== (div2_class_value = `
|
|
11735
11768
|
goa-input
|
|
11736
11769
|
${
|
|
11737
11770
|
/*isDisabled*/
|
|
11738
|
-
ctx[
|
|
11771
|
+
ctx[24] ? "goa-input--disabled" : ""}
|
|
11739
11772
|
variant--${
|
|
11740
11773
|
/*variant*/
|
|
11741
11774
|
ctx[7]}
|
|
11742
11775
|
type--${
|
|
11743
11776
|
/*type*/
|
|
11744
11777
|
ctx[1]}
|
|
11778
|
+
${
|
|
11779
|
+
/*_leadingContentSlot*/
|
|
11780
|
+
ctx[22] ? "goa-input-leading-content" : ""}
|
|
11781
|
+
${
|
|
11782
|
+
/*_trailingContentSlot*/
|
|
11783
|
+
ctx[23] ? "goa-input-trailing-content" : ""}
|
|
11745
11784
|
`)) {
|
|
11746
11785
|
attr(div2, "class", div2_class_value);
|
|
11747
11786
|
}
|
|
11748
11787
|
|
|
11749
11788
|
if (dirty[0] &
|
|
11750
|
-
/*isDisabled, variant, type, isError*/
|
|
11751
|
-
|
|
11789
|
+
/*isDisabled, variant, type, _leadingContentSlot, _trailingContentSlot, isError*/
|
|
11790
|
+
62914690) {
|
|
11752
11791
|
toggle_class(div2, "error",
|
|
11753
11792
|
/*isError*/
|
|
11754
|
-
ctx[
|
|
11793
|
+
ctx[25]);
|
|
11755
11794
|
}
|
|
11756
11795
|
|
|
11757
11796
|
if (dirty[0] &
|
|
@@ -11783,10 +11822,13 @@
|
|
|
11783
11822
|
if (if_block1) if_block1.d();
|
|
11784
11823
|
/*input_binding*/
|
|
11785
11824
|
|
|
11786
|
-
ctx[
|
|
11825
|
+
ctx[36](null);
|
|
11787
11826
|
if (if_block2) if_block2.d();
|
|
11788
11827
|
if (if_block3) if_block3.d();
|
|
11789
11828
|
if (if_block4) if_block4.d();
|
|
11829
|
+
/*div3_binding*/
|
|
11830
|
+
|
|
11831
|
+
ctx[37](null);
|
|
11790
11832
|
mounted = false;
|
|
11791
11833
|
run_all(dispose);
|
|
11792
11834
|
}
|
|
@@ -11887,6 +11929,11 @@
|
|
|
11887
11929
|
ml = null
|
|
11888
11930
|
} = $$props;
|
|
11889
11931
|
let inputEl;
|
|
11932
|
+
|
|
11933
|
+
let _rootEL;
|
|
11934
|
+
|
|
11935
|
+
let _leadingContentSlot = false;
|
|
11936
|
+
let _trailingContentSlot = false;
|
|
11890
11937
|
let _debounceId = null;
|
|
11891
11938
|
|
|
11892
11939
|
function onKeyUp(e) {
|
|
@@ -11918,6 +11965,18 @@
|
|
|
11918
11965
|
if (prefix != "" || suffix != "") {
|
|
11919
11966
|
console.warn("GoAInput [prefix] and [suffix] properties are deprecated. Instead use leadingContent and trailingContent.");
|
|
11920
11967
|
}
|
|
11968
|
+
|
|
11969
|
+
const leadingContentSlot = _rootEL.querySelector("slot[name=leadingContent]");
|
|
11970
|
+
|
|
11971
|
+
if (leadingContentSlot && leadingContentSlot.assignedNodes().length > 0) {
|
|
11972
|
+
$$invalidate(22, _leadingContentSlot = true);
|
|
11973
|
+
}
|
|
11974
|
+
|
|
11975
|
+
const trailingContentSlot = _rootEL.querySelector("slot[name=trailingContent]");
|
|
11976
|
+
|
|
11977
|
+
if (trailingContentSlot && trailingContentSlot.assignedNodes().length > 0) {
|
|
11978
|
+
$$invalidate(23, _trailingContentSlot = true);
|
|
11979
|
+
}
|
|
11921
11980
|
});
|
|
11922
11981
|
|
|
11923
11982
|
function input_binding($$value) {
|
|
@@ -11927,6 +11986,13 @@
|
|
|
11927
11986
|
});
|
|
11928
11987
|
}
|
|
11929
11988
|
|
|
11989
|
+
function div3_binding($$value) {
|
|
11990
|
+
binding_callbacks[$$value ? 'unshift' : 'push'](() => {
|
|
11991
|
+
_rootEL = $$value;
|
|
11992
|
+
$$invalidate(21, _rootEL);
|
|
11993
|
+
});
|
|
11994
|
+
}
|
|
11995
|
+
|
|
11930
11996
|
$$self.$$set = $$props => {
|
|
11931
11997
|
if ('type' in $$props) $$invalidate(1, type = $$props.type);
|
|
11932
11998
|
if ('name' in $$props) $$invalidate(2, name = $$props.name);
|
|
@@ -11936,11 +12002,11 @@
|
|
|
11936
12002
|
if ('leadingicon' in $$props) $$invalidate(5, leadingicon = $$props.leadingicon);
|
|
11937
12003
|
if ('trailingicon' in $$props) $$invalidate(6, trailingicon = $$props.trailingicon);
|
|
11938
12004
|
if ('variant' in $$props) $$invalidate(7, variant = $$props.variant);
|
|
11939
|
-
if ('disabled' in $$props) $$invalidate(
|
|
11940
|
-
if ('handletrailingiconclick' in $$props) $$invalidate(
|
|
11941
|
-
if ('focused' in $$props) $$invalidate(
|
|
11942
|
-
if ('readonly' in $$props) $$invalidate(
|
|
11943
|
-
if ('error' in $$props) $$invalidate(
|
|
12005
|
+
if ('disabled' in $$props) $$invalidate(29, disabled = $$props.disabled);
|
|
12006
|
+
if ('handletrailingiconclick' in $$props) $$invalidate(30, handletrailingiconclick = $$props.handletrailingiconclick);
|
|
12007
|
+
if ('focused' in $$props) $$invalidate(31, focused = $$props.focused);
|
|
12008
|
+
if ('readonly' in $$props) $$invalidate(32, readonly = $$props.readonly);
|
|
12009
|
+
if ('error' in $$props) $$invalidate(33, error = $$props.error);
|
|
11944
12010
|
if ('testid' in $$props) $$invalidate(8, testid = $$props.testid);
|
|
11945
12011
|
if ('width' in $$props) $$invalidate(9, width = $$props.width);
|
|
11946
12012
|
if ('arialabel' in $$props) $$invalidate(10, arialabel = $$props.arialabel);
|
|
@@ -11949,7 +12015,7 @@
|
|
|
11949
12015
|
if ('step' in $$props) $$invalidate(13, step = $$props.step);
|
|
11950
12016
|
if ('prefix' in $$props) $$invalidate(14, prefix = $$props.prefix);
|
|
11951
12017
|
if ('suffix' in $$props) $$invalidate(15, suffix = $$props.suffix);
|
|
11952
|
-
if ('debounce' in $$props) $$invalidate(
|
|
12018
|
+
if ('debounce' in $$props) $$invalidate(34, debounce = $$props.debounce);
|
|
11953
12019
|
if ('mt' in $$props) $$invalidate(16, mt = $$props.mt);
|
|
11954
12020
|
if ('mr' in $$props) $$invalidate(17, mr = $$props.mr);
|
|
11955
12021
|
if ('mb' in $$props) $$invalidate(18, mb = $$props.mb);
|
|
@@ -11959,39 +12025,39 @@
|
|
|
11959
12025
|
$$self.$$.update = () => {
|
|
11960
12026
|
if ($$self.$$.dirty[0] &
|
|
11961
12027
|
/*handletrailingiconclick*/
|
|
11962
|
-
|
|
11963
|
-
$$invalidate(
|
|
12028
|
+
1073741824) {
|
|
12029
|
+
$$invalidate(27, handlesTrailingIconClick = toBoolean(handletrailingiconclick));
|
|
11964
12030
|
}
|
|
11965
12031
|
|
|
11966
|
-
if ($$self.$$.dirty[
|
|
12032
|
+
if ($$self.$$.dirty[1] &
|
|
11967
12033
|
/*focused*/
|
|
11968
|
-
|
|
11969
|
-
$$invalidate(
|
|
12034
|
+
1) {
|
|
12035
|
+
$$invalidate(35, isFocused = toBoolean(focused));
|
|
11970
12036
|
}
|
|
11971
12037
|
|
|
11972
|
-
if ($$self.$$.dirty[
|
|
12038
|
+
if ($$self.$$.dirty[1] &
|
|
11973
12039
|
/*readonly*/
|
|
11974
|
-
|
|
11975
|
-
$$invalidate(
|
|
12040
|
+
2) {
|
|
12041
|
+
$$invalidate(26, isReadonly = toBoolean(readonly));
|
|
11976
12042
|
}
|
|
11977
12043
|
|
|
11978
|
-
if ($$self.$$.dirty[
|
|
12044
|
+
if ($$self.$$.dirty[1] &
|
|
11979
12045
|
/*error*/
|
|
11980
|
-
|
|
11981
|
-
$$invalidate(
|
|
12046
|
+
4) {
|
|
12047
|
+
$$invalidate(25, isError = toBoolean(error));
|
|
11982
12048
|
}
|
|
11983
12049
|
|
|
11984
12050
|
if ($$self.$$.dirty[0] &
|
|
11985
12051
|
/*disabled*/
|
|
11986
|
-
|
|
11987
|
-
$$invalidate(
|
|
12052
|
+
536870912) {
|
|
12053
|
+
$$invalidate(24, isDisabled = toBoolean(disabled));
|
|
11988
12054
|
}
|
|
11989
12055
|
|
|
11990
12056
|
if ($$self.$$.dirty[0] &
|
|
11991
12057
|
/*inputEl*/
|
|
11992
12058
|
1048576 | $$self.$$.dirty[1] &
|
|
11993
12059
|
/*isFocused*/
|
|
11994
|
-
|
|
12060
|
+
16) {
|
|
11995
12061
|
if (isFocused && inputEl) {
|
|
11996
12062
|
setTimeout(() => inputEl.focus(), 1);
|
|
11997
12063
|
}
|
|
@@ -12008,13 +12074,13 @@
|
|
|
12008
12074
|
}
|
|
12009
12075
|
};
|
|
12010
12076
|
|
|
12011
|
-
return [value, type, name, autocapitalize, placeholder, leadingicon, trailingicon, variant, testid, width, arialabel, min, max, step, prefix, suffix, mt, mr, mb, ml, inputEl, isDisabled, isError, isReadonly, handlesTrailingIconClick, onKeyUp, disabled, handletrailingiconclick, focused, readonly, error, debounce, isFocused, input_binding];
|
|
12077
|
+
return [value, type, name, autocapitalize, placeholder, leadingicon, trailingicon, variant, testid, width, arialabel, min, max, step, prefix, suffix, mt, mr, mb, ml, inputEl, _rootEL, _leadingContentSlot, _trailingContentSlot, isDisabled, isError, isReadonly, handlesTrailingIconClick, onKeyUp, disabled, handletrailingiconclick, focused, readonly, error, debounce, isFocused, input_binding, div3_binding];
|
|
12012
12078
|
}
|
|
12013
12079
|
|
|
12014
12080
|
class Input extends SvelteElement {
|
|
12015
12081
|
constructor(options) {
|
|
12016
12082
|
super();
|
|
12017
|
-
this.shadowRoot.innerHTML = `<style>:host{box-sizing:border-box}.container{position:relative;width:100%;display:inline-block}@media(min-width: 640px){.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{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,.goa-input:focus,.goa-input:focus-within{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}.goa-input-leading-icon{margin-left:0.5rem}.goa-input-trailing-icon{margin-right:0.5rem}input{display:inline-block;color:var(--goa-color-text-default);font-size:var(--goa-font-size-4);padding:var(--goa-space-xs);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)}input[readonly]{cursor:pointer}.goa-input-leading-icon+input{padding-left:0.5rem}input,input:focus,input:hover,input:active{outline:none;border:none}.goa-input--disabled,.goa-input--disabled:hover,.goa-input--disabled:active,.goa-input--disabled:focus{background-color:var(--goa-color-greyscale-100);border-color:var(--goa-color-greyscale-200);cursor:default;box-shadow:none}.goa-input--disabled input,.goa-input--disabled input:hover,.goa-input--disabled input:active,.goa-input--disabled input:focus{color:var(--goa-color-text-secondary)}.goa-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)}.goa-input--disabled .prefix,.goa-input--disabled .leading-content ::slotted(div){border-right:1px solid var(--goa-color-greyscale-200)}.goa-input--disabled .suffix,.goa-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,.error:hover{border:2px solid var(--goa-color-interactive-error);box-shadow:0 0 0 1px var(--goa-color-interactive-error)}.error:focus-within:hover{border:2px solid var(--goa-color-interactive-error);box-shadow:0 0 0 3px var(--goa-color-interactive-focus)}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>')
|
|
12083
|
+
this.shadowRoot.innerHTML = `<style>:host{box-sizing:border-box}.container{position:relative;width:100%;display:inline-block}@media(min-width: 640px){.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(.goa-input-leading-content):not(.goa-input-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(.goa-input-leading-content):not(.goa-input-trailing-content),.goa-input:focus:not(.goa-input-leading-content):not(.goa-input-trailing-content),.goa-input:focus-within:not(.goa-input-leading-content):not(.goa-input-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}.goa-input-leading-icon{margin-left:0.5rem}.goa-input-trailing-icon{margin-right:0.5rem}input{display:inline-block;color:var(--goa-color-text-default);font-size:var(--goa-font-size-4);padding:var(--goa-space-xs);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}.goa-input-leading-icon+input{padding-left:0.5rem}input,input:focus,input:hover,input:active{outline:none;border:none}.goa-input--disabled,.goa-input--disabled:hover,.goa-input--disabled:active,.goa-input--disabled:focus{background-color:var(--goa-color-greyscale-100);border-color:var(--goa-color-greyscale-200) !important;cursor:default;box-shadow:none !important}.goa-input--disabled input,.goa-input--disabled input:hover,.goa-input--disabled input:active,.goa-input--disabled input:focus{color:var(--goa-color-text-secondary)}.goa-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)}.goa-input--disabled .prefix,.goa-input--disabled .leading-content ::slotted(div){border-right:1px solid var(--goa-color-greyscale-200)}.goa-input--disabled .suffix,.goa-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(.goa-input-leading-content):not(.goa-input-trailing-content),.error:hover:not(.goa-input-leading-content):not(.goa-input-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(.goa-input-leading-content):not(.goa-input-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>')
|
|
12018
12084
|
center center no-repeat}</style>`;
|
|
12019
12085
|
init(this, {
|
|
12020
12086
|
target: this.shadowRoot,
|
|
@@ -12029,11 +12095,11 @@
|
|
|
12029
12095
|
leadingicon: 5,
|
|
12030
12096
|
trailingicon: 6,
|
|
12031
12097
|
variant: 7,
|
|
12032
|
-
disabled:
|
|
12033
|
-
handletrailingiconclick:
|
|
12034
|
-
focused:
|
|
12035
|
-
readonly:
|
|
12036
|
-
error:
|
|
12098
|
+
disabled: 29,
|
|
12099
|
+
handletrailingiconclick: 30,
|
|
12100
|
+
focused: 31,
|
|
12101
|
+
readonly: 32,
|
|
12102
|
+
error: 33,
|
|
12037
12103
|
testid: 8,
|
|
12038
12104
|
width: 9,
|
|
12039
12105
|
arialabel: 10,
|
|
@@ -12042,7 +12108,7 @@
|
|
|
12042
12108
|
step: 13,
|
|
12043
12109
|
prefix: 14,
|
|
12044
12110
|
suffix: 15,
|
|
12045
|
-
debounce:
|
|
12111
|
+
debounce: 34,
|
|
12046
12112
|
mt: 16,
|
|
12047
12113
|
mr: 17,
|
|
12048
12114
|
mb: 18,
|
|
@@ -12154,7 +12220,7 @@
|
|
|
12154
12220
|
}
|
|
12155
12221
|
|
|
12156
12222
|
get disabled() {
|
|
12157
|
-
return this.$$.ctx[
|
|
12223
|
+
return this.$$.ctx[29];
|
|
12158
12224
|
}
|
|
12159
12225
|
|
|
12160
12226
|
set disabled(disabled) {
|
|
@@ -12165,7 +12231,7 @@
|
|
|
12165
12231
|
}
|
|
12166
12232
|
|
|
12167
12233
|
get handletrailingiconclick() {
|
|
12168
|
-
return this.$$.ctx[
|
|
12234
|
+
return this.$$.ctx[30];
|
|
12169
12235
|
}
|
|
12170
12236
|
|
|
12171
12237
|
set handletrailingiconclick(handletrailingiconclick) {
|
|
@@ -12176,7 +12242,7 @@
|
|
|
12176
12242
|
}
|
|
12177
12243
|
|
|
12178
12244
|
get focused() {
|
|
12179
|
-
return this.$$.ctx[
|
|
12245
|
+
return this.$$.ctx[31];
|
|
12180
12246
|
}
|
|
12181
12247
|
|
|
12182
12248
|
set focused(focused) {
|
|
@@ -12187,7 +12253,7 @@
|
|
|
12187
12253
|
}
|
|
12188
12254
|
|
|
12189
12255
|
get readonly() {
|
|
12190
|
-
return this.$$.ctx[
|
|
12256
|
+
return this.$$.ctx[32];
|
|
12191
12257
|
}
|
|
12192
12258
|
|
|
12193
12259
|
set readonly(readonly) {
|
|
@@ -12198,7 +12264,7 @@
|
|
|
12198
12264
|
}
|
|
12199
12265
|
|
|
12200
12266
|
get error() {
|
|
12201
|
-
return this.$$.ctx[
|
|
12267
|
+
return this.$$.ctx[33];
|
|
12202
12268
|
}
|
|
12203
12269
|
|
|
12204
12270
|
set error(error) {
|
|
@@ -12297,7 +12363,7 @@
|
|
|
12297
12363
|
}
|
|
12298
12364
|
|
|
12299
12365
|
get debounce() {
|
|
12300
|
-
return this.$$.ctx[
|
|
12366
|
+
return this.$$.ctx[34];
|
|
12301
12367
|
}
|
|
12302
12368
|
|
|
12303
12369
|
set debounce(debounce) {
|
|
@@ -12792,7 +12858,7 @@
|
|
|
12792
12858
|
let if_block1 = current_block_type(ctx);
|
|
12793
12859
|
let if_block2 =
|
|
12794
12860
|
/*_isClosable*/
|
|
12795
|
-
ctx[
|
|
12861
|
+
ctx[9] && create_if_block_1$2(ctx);
|
|
12796
12862
|
return {
|
|
12797
12863
|
c() {
|
|
12798
12864
|
goa_focus_trap = element("goa-focus-trap");
|
|
@@ -12854,31 +12920,34 @@
|
|
|
12854
12920
|
if_block1.m(div1, null);
|
|
12855
12921
|
append(header, t2);
|
|
12856
12922
|
if (if_block2) if_block2.m(header, null);
|
|
12923
|
+
/*header_binding*/
|
|
12924
|
+
|
|
12925
|
+
ctx[16](header);
|
|
12857
12926
|
append(div4, t3);
|
|
12858
12927
|
append(div4, div2);
|
|
12859
12928
|
append(div2, goa_scrollable);
|
|
12860
12929
|
/*goa_scrollable_binding*/
|
|
12861
12930
|
|
|
12862
|
-
ctx[
|
|
12931
|
+
ctx[17](goa_scrollable);
|
|
12863
12932
|
/*div2_binding*/
|
|
12864
12933
|
|
|
12865
|
-
ctx[
|
|
12934
|
+
ctx[18](div2);
|
|
12866
12935
|
append(div4, t4);
|
|
12867
12936
|
append(div4, div3);
|
|
12868
12937
|
/*div6_binding*/
|
|
12869
12938
|
|
|
12870
|
-
ctx[
|
|
12939
|
+
ctx[19](div6);
|
|
12871
12940
|
current = true;
|
|
12872
12941
|
|
|
12873
12942
|
if (!mounted) {
|
|
12874
12943
|
dispose = [listen(div0, "click",
|
|
12875
12944
|
/*close*/
|
|
12876
|
-
ctx[
|
|
12945
|
+
ctx[12]), listen(goa_scrollable, "_scroll",
|
|
12877
12946
|
/*handleScroll*/
|
|
12878
|
-
ctx[
|
|
12947
|
+
ctx[13]), action_destroyer(noscroll_action = noscroll.call(null, div6, {
|
|
12879
12948
|
enable:
|
|
12880
12949
|
/*_isOpen*/
|
|
12881
|
-
ctx[
|
|
12950
|
+
ctx[7]
|
|
12882
12951
|
}))];
|
|
12883
12952
|
mounted = true;
|
|
12884
12953
|
}
|
|
@@ -12916,7 +12985,7 @@
|
|
|
12916
12985
|
|
|
12917
12986
|
if (
|
|
12918
12987
|
/*_isClosable*/
|
|
12919
|
-
ctx[
|
|
12988
|
+
ctx[9]) {
|
|
12920
12989
|
if (if_block2) {
|
|
12921
12990
|
if_block2.p(ctx, dirty);
|
|
12922
12991
|
} else {
|
|
@@ -12941,10 +13010,10 @@
|
|
|
12941
13010
|
|
|
12942
13011
|
if (noscroll_action && is_function(noscroll_action.update) && dirty &
|
|
12943
13012
|
/*_isOpen*/
|
|
12944
|
-
|
|
13013
|
+
128) noscroll_action.update.call(null, {
|
|
12945
13014
|
enable:
|
|
12946
13015
|
/*_isOpen*/
|
|
12947
|
-
ctx[
|
|
13016
|
+
ctx[7]
|
|
12948
13017
|
});
|
|
12949
13018
|
|
|
12950
13019
|
if (!current || dirty &
|
|
@@ -12963,7 +13032,7 @@
|
|
|
12963
13032
|
div5_intro = create_in_transition(div5, fly, {
|
|
12964
13033
|
duration:
|
|
12965
13034
|
/*_transitionTime*/
|
|
12966
|
-
ctx[
|
|
13035
|
+
ctx[11],
|
|
12967
13036
|
y: 200
|
|
12968
13037
|
});
|
|
12969
13038
|
div5_intro.start();
|
|
@@ -12973,7 +13042,7 @@
|
|
|
12973
13042
|
div6_intro = create_in_transition(div6, fade, {
|
|
12974
13043
|
duration:
|
|
12975
13044
|
/*_transitionTime*/
|
|
12976
|
-
ctx[
|
|
13045
|
+
ctx[11]
|
|
12977
13046
|
});
|
|
12978
13047
|
div6_intro.start();
|
|
12979
13048
|
});
|
|
@@ -12985,20 +13054,20 @@
|
|
|
12985
13054
|
div5_outro = create_out_transition(div5, fly, {
|
|
12986
13055
|
delay:
|
|
12987
13056
|
/*_transitionTime*/
|
|
12988
|
-
ctx[
|
|
13057
|
+
ctx[11],
|
|
12989
13058
|
duration:
|
|
12990
13059
|
/*_transitionTime*/
|
|
12991
|
-
ctx[
|
|
13060
|
+
ctx[11],
|
|
12992
13061
|
y: -100
|
|
12993
13062
|
});
|
|
12994
13063
|
if (div6_intro) div6_intro.invalidate();
|
|
12995
13064
|
div6_outro = create_out_transition(div6, fade, {
|
|
12996
13065
|
delay:
|
|
12997
13066
|
/*_transitionTime*/
|
|
12998
|
-
ctx[
|
|
13067
|
+
ctx[11],
|
|
12999
13068
|
duration:
|
|
13000
13069
|
/*_transitionTime*/
|
|
13001
|
-
ctx[
|
|
13070
|
+
ctx[11]
|
|
13002
13071
|
});
|
|
13003
13072
|
current = false;
|
|
13004
13073
|
},
|
|
@@ -13008,23 +13077,26 @@
|
|
|
13008
13077
|
if (if_block0) if_block0.d();
|
|
13009
13078
|
if_block1.d();
|
|
13010
13079
|
if (if_block2) if_block2.d();
|
|
13080
|
+
/*header_binding*/
|
|
13081
|
+
|
|
13082
|
+
ctx[16](null);
|
|
13011
13083
|
/*goa_scrollable_binding*/
|
|
13012
13084
|
|
|
13013
|
-
ctx[
|
|
13085
|
+
ctx[17](null);
|
|
13014
13086
|
/*div2_binding*/
|
|
13015
13087
|
|
|
13016
|
-
ctx[
|
|
13088
|
+
ctx[18](null);
|
|
13017
13089
|
if (detaching && div5_outro) div5_outro.end();
|
|
13018
13090
|
/*div6_binding*/
|
|
13019
13091
|
|
|
13020
|
-
ctx[
|
|
13092
|
+
ctx[19](null);
|
|
13021
13093
|
if (detaching && div6_outro) div6_outro.end();
|
|
13022
13094
|
mounted = false;
|
|
13023
13095
|
run_all(dispose);
|
|
13024
13096
|
}
|
|
13025
13097
|
|
|
13026
13098
|
};
|
|
13027
|
-
} // (
|
|
13099
|
+
} // (132:8) {#if calloutvariant !== null}
|
|
13028
13100
|
|
|
13029
13101
|
|
|
13030
13102
|
function create_if_block_3$2(ctx) {
|
|
@@ -13038,7 +13110,7 @@
|
|
|
13038
13110
|
goa_icon = element("goa-icon");
|
|
13039
13111
|
set_custom_element_data(goa_icon, "type",
|
|
13040
13112
|
/*_iconType*/
|
|
13041
|
-
ctx[
|
|
13113
|
+
ctx[10]);
|
|
13042
13114
|
set_custom_element_data(goa_icon, "inverted", goa_icon_inverted_value =
|
|
13043
13115
|
/*calloutvariant*/
|
|
13044
13116
|
ctx[3] === "important" ? "false" : "true");
|
|
@@ -13055,10 +13127,10 @@
|
|
|
13055
13127
|
p(ctx, dirty) {
|
|
13056
13128
|
if (dirty &
|
|
13057
13129
|
/*_iconType*/
|
|
13058
|
-
|
|
13130
|
+
1024) {
|
|
13059
13131
|
set_custom_element_data(goa_icon, "type",
|
|
13060
13132
|
/*_iconType*/
|
|
13061
|
-
ctx[
|
|
13133
|
+
ctx[10]);
|
|
13062
13134
|
}
|
|
13063
13135
|
|
|
13064
13136
|
if (dirty &
|
|
@@ -13083,7 +13155,7 @@
|
|
|
13083
13155
|
}
|
|
13084
13156
|
|
|
13085
13157
|
};
|
|
13086
|
-
} // (
|
|
13158
|
+
} // (145:14) {:else}
|
|
13087
13159
|
|
|
13088
13160
|
|
|
13089
13161
|
function create_else_block$3(ctx) {
|
|
@@ -13105,7 +13177,7 @@
|
|
|
13105
13177
|
}
|
|
13106
13178
|
|
|
13107
13179
|
};
|
|
13108
|
-
} // (
|
|
13180
|
+
} // (143:14) {#if heading}
|
|
13109
13181
|
|
|
13110
13182
|
|
|
13111
13183
|
function create_if_block_2$2(ctx) {
|
|
@@ -13134,7 +13206,7 @@
|
|
|
13134
13206
|
}
|
|
13135
13207
|
|
|
13136
13208
|
};
|
|
13137
|
-
} // (
|
|
13209
|
+
} // (149:12) {#if _isClosable}
|
|
13138
13210
|
|
|
13139
13211
|
|
|
13140
13212
|
function create_if_block_1$2(ctx) {
|
|
@@ -13159,7 +13231,7 @@
|
|
|
13159
13231
|
if (!mounted) {
|
|
13160
13232
|
dispose = listen(goa_icon_button, "click",
|
|
13161
13233
|
/*close*/
|
|
13162
|
-
ctx[
|
|
13234
|
+
ctx[12]);
|
|
13163
13235
|
mounted = true;
|
|
13164
13236
|
}
|
|
13165
13237
|
},
|
|
@@ -13180,7 +13252,7 @@
|
|
|
13180
13252
|
let current;
|
|
13181
13253
|
let if_block =
|
|
13182
13254
|
/*_isOpen*/
|
|
13183
|
-
ctx[
|
|
13255
|
+
ctx[7] && create_if_block$8(ctx);
|
|
13184
13256
|
return {
|
|
13185
13257
|
c() {
|
|
13186
13258
|
if (if_block) if_block.c();
|
|
@@ -13197,13 +13269,13 @@
|
|
|
13197
13269
|
p(ctx, [dirty]) {
|
|
13198
13270
|
if (
|
|
13199
13271
|
/*_isOpen*/
|
|
13200
|
-
ctx[
|
|
13272
|
+
ctx[7]) {
|
|
13201
13273
|
if (if_block) {
|
|
13202
13274
|
if_block.p(ctx, dirty);
|
|
13203
13275
|
|
|
13204
13276
|
if (dirty &
|
|
13205
13277
|
/*_isOpen*/
|
|
13206
|
-
|
|
13278
|
+
128) {
|
|
13207
13279
|
transition_in(if_block, 1);
|
|
13208
13280
|
}
|
|
13209
13281
|
} else {
|
|
@@ -13270,7 +13342,8 @@
|
|
|
13270
13342
|
|
|
13271
13343
|
let _rootEl = null;
|
|
13272
13344
|
let _contentEl = null;
|
|
13273
|
-
let _scrollEl = null;
|
|
13345
|
+
let _scrollEl = null;
|
|
13346
|
+
let _headerEl = null; // Type verification
|
|
13274
13347
|
|
|
13275
13348
|
const [CALLOUT_VARIANT, validateCalloutVariant] = typeValidator("Callout variant", ["emergency", "important", "information", "success", "event"]);
|
|
13276
13349
|
const [Transitions, validateTransition] = typeValidator("Modal transition", ["fast", "slow", "none"]); // Hooks
|
|
@@ -13319,32 +13392,49 @@
|
|
|
13319
13392
|
}
|
|
13320
13393
|
}
|
|
13321
13394
|
|
|
13395
|
+
function getChildren() {
|
|
13396
|
+
const slot = _headerEl.querySelector("slot");
|
|
13397
|
+
|
|
13398
|
+
if (slot) {
|
|
13399
|
+
return [...slot.assignedElements()];
|
|
13400
|
+
} else {
|
|
13401
|
+
return [..._headerEl.children]; // unit tests
|
|
13402
|
+
}
|
|
13403
|
+
}
|
|
13404
|
+
|
|
13405
|
+
function header_binding($$value) {
|
|
13406
|
+
binding_callbacks[$$value ? 'unshift' : 'push'](() => {
|
|
13407
|
+
_headerEl = $$value;
|
|
13408
|
+
($$invalidate(6, _headerEl), $$invalidate(7, _isOpen)), $$invalidate(1, open);
|
|
13409
|
+
});
|
|
13410
|
+
}
|
|
13411
|
+
|
|
13322
13412
|
function goa_scrollable_binding($$value) {
|
|
13323
13413
|
binding_callbacks[$$value ? 'unshift' : 'push'](() => {
|
|
13324
13414
|
_scrollEl = $$value;
|
|
13325
|
-
($$invalidate(5, _scrollEl), $$invalidate(
|
|
13415
|
+
($$invalidate(5, _scrollEl), $$invalidate(7, _isOpen)), $$invalidate(1, open);
|
|
13326
13416
|
});
|
|
13327
13417
|
}
|
|
13328
13418
|
|
|
13329
13419
|
function div2_binding($$value) {
|
|
13330
13420
|
binding_callbacks[$$value ? 'unshift' : 'push'](() => {
|
|
13331
13421
|
_contentEl = $$value;
|
|
13332
|
-
($$invalidate(4, _contentEl), $$invalidate(
|
|
13422
|
+
($$invalidate(4, _contentEl), $$invalidate(7, _isOpen)), $$invalidate(1, open);
|
|
13333
13423
|
});
|
|
13334
13424
|
}
|
|
13335
13425
|
|
|
13336
13426
|
function div6_binding($$value) {
|
|
13337
13427
|
binding_callbacks[$$value ? 'unshift' : 'push'](() => {
|
|
13338
13428
|
_rootEl = $$value;
|
|
13339
|
-
($$invalidate(
|
|
13429
|
+
($$invalidate(8, _rootEl), $$invalidate(7, _isOpen)), $$invalidate(1, open);
|
|
13340
13430
|
});
|
|
13341
13431
|
}
|
|
13342
13432
|
|
|
13343
13433
|
$$self.$$set = $$props => {
|
|
13344
13434
|
if ('heading' in $$props) $$invalidate(0, heading = $$props.heading);
|
|
13345
|
-
if ('closable' in $$props) $$invalidate(
|
|
13435
|
+
if ('closable' in $$props) $$invalidate(14, closable = $$props.closable);
|
|
13346
13436
|
if ('open' in $$props) $$invalidate(1, open = $$props.open);
|
|
13347
|
-
if ('transition' in $$props) $$invalidate(
|
|
13437
|
+
if ('transition' in $$props) $$invalidate(15, transition = $$props.transition);
|
|
13348
13438
|
if ('width' in $$props) $$invalidate(2, width = $$props.width);
|
|
13349
13439
|
if ('calloutvariant' in $$props) $$invalidate(3, calloutvariant = $$props.calloutvariant);
|
|
13350
13440
|
};
|
|
@@ -13352,30 +13442,30 @@
|
|
|
13352
13442
|
$$self.$$.update = () => {
|
|
13353
13443
|
if ($$self.$$.dirty &
|
|
13354
13444
|
/*closable*/
|
|
13355
|
-
|
|
13445
|
+
16384) {
|
|
13356
13446
|
// Reactive
|
|
13357
|
-
$$invalidate(
|
|
13447
|
+
$$invalidate(9, _isClosable = toBoolean(closable));
|
|
13358
13448
|
}
|
|
13359
13449
|
|
|
13360
13450
|
if ($$self.$$.dirty &
|
|
13361
13451
|
/*open*/
|
|
13362
13452
|
2) {
|
|
13363
|
-
$$invalidate(
|
|
13453
|
+
$$invalidate(7, _isOpen = toBoolean(open));
|
|
13364
13454
|
}
|
|
13365
13455
|
|
|
13366
13456
|
if ($$self.$$.dirty &
|
|
13367
13457
|
/*_isOpen*/
|
|
13368
|
-
|
|
13458
|
+
128) {
|
|
13369
13459
|
if (!_isOpen) {
|
|
13370
13460
|
// prevent null issues
|
|
13371
|
-
$$invalidate(4, _contentEl = $$invalidate(5, _scrollEl = $$invalidate(
|
|
13461
|
+
$$invalidate(4, _contentEl = $$invalidate(5, _scrollEl = $$invalidate(8, _rootEl = $$invalidate(6, _headerEl = null))));
|
|
13372
13462
|
window.removeEventListener('keydown', onInputKeyDown);
|
|
13373
13463
|
}
|
|
13374
13464
|
}
|
|
13375
13465
|
|
|
13376
13466
|
if ($$self.$$.dirty &
|
|
13377
13467
|
/*_isOpen, _scrollEl, _contentEl*/
|
|
13378
|
-
|
|
13468
|
+
176) {
|
|
13379
13469
|
if (_isOpen && _scrollEl && _contentEl) {
|
|
13380
13470
|
const hasScroll = _scrollEl.scrollHeight > _scrollEl.offsetHeight;
|
|
13381
13471
|
|
|
@@ -13386,42 +13476,47 @@
|
|
|
13386
13476
|
}
|
|
13387
13477
|
|
|
13388
13478
|
if ($$self.$$.dirty &
|
|
13389
|
-
/*_isOpen, _contentEl*/
|
|
13390
|
-
|
|
13479
|
+
/*_isOpen, _contentEl, _headerEl*/
|
|
13480
|
+
208) {
|
|
13391
13481
|
if (_isOpen && _contentEl) {
|
|
13392
13482
|
window.addEventListener('keydown', onInputKeyDown);
|
|
13483
|
+
const children = getChildren();
|
|
13484
|
+
|
|
13485
|
+
if (_headerEl.querySelector("div.modal-title").textContent || _headerEl.querySelector("div.modal-close") || children.length) {
|
|
13486
|
+
_headerEl.classList.add("has-content");
|
|
13487
|
+
}
|
|
13393
13488
|
}
|
|
13394
13489
|
}
|
|
13395
13490
|
|
|
13396
13491
|
if ($$self.$$.dirty &
|
|
13397
13492
|
/*transition*/
|
|
13398
|
-
|
|
13399
|
-
$$invalidate(
|
|
13493
|
+
32768) {
|
|
13494
|
+
$$invalidate(11, _transitionTime = transition === "none" ? 0 : transition === "slow" ? 400 : 200);
|
|
13400
13495
|
}
|
|
13401
13496
|
|
|
13402
13497
|
if ($$self.$$.dirty &
|
|
13403
13498
|
/*calloutvariant*/
|
|
13404
13499
|
8) {
|
|
13405
|
-
$$invalidate(
|
|
13500
|
+
$$invalidate(10, _iconType = calloutvariant === "emergency" ? "warning" : calloutvariant === "important" ? "alert-circle" : calloutvariant === "information" ? "information-circle" : calloutvariant === "success" ? "checkmark-circle" : calloutvariant === "event" ? "calendar" : "");
|
|
13406
13501
|
}
|
|
13407
13502
|
};
|
|
13408
13503
|
|
|
13409
|
-
return [heading, open, width, calloutvariant, _contentEl, _scrollEl, _isOpen, _rootEl, _isClosable, _iconType, _transitionTime, close, handleScroll, closable, transition, goa_scrollable_binding, div2_binding, div6_binding];
|
|
13504
|
+
return [heading, open, width, calloutvariant, _contentEl, _scrollEl, _headerEl, _isOpen, _rootEl, _isClosable, _iconType, _transitionTime, close, handleScroll, closable, transition, header_binding, goa_scrollable_binding, div2_binding, div6_binding];
|
|
13410
13505
|
}
|
|
13411
13506
|
|
|
13412
13507
|
class Modal extends SvelteElement {
|
|
13413
13508
|
constructor(options) {
|
|
13414
13509
|
super();
|
|
13415
|
-
this.shadowRoot.innerHTML = `<style>: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:2rem}.content header{display:flex;
|
|
13510
|
+
this.shadowRoot.innerHTML = `<style>: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:2rem}.content header{display:flex;justify-content:space-between}.content header.has-content{margin-bottom:2rem}.modal-pane{position:relative;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)}@media(min-width: 640px){.modal-pane{width:var(--width, 60ch)}}.modal-actions ::slotted(*){padding:1.5rem 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)}</style>`;
|
|
13416
13511
|
init(this, {
|
|
13417
13512
|
target: this.shadowRoot,
|
|
13418
13513
|
props: attribute_to_object(this.attributes),
|
|
13419
13514
|
customElement: true
|
|
13420
13515
|
}, instance$g, create_fragment$i, safe_not_equal, {
|
|
13421
13516
|
heading: 0,
|
|
13422
|
-
closable:
|
|
13517
|
+
closable: 14,
|
|
13423
13518
|
open: 1,
|
|
13424
|
-
transition:
|
|
13519
|
+
transition: 15,
|
|
13425
13520
|
width: 2,
|
|
13426
13521
|
calloutvariant: 3
|
|
13427
13522
|
}, null);
|
|
@@ -13454,7 +13549,7 @@
|
|
|
13454
13549
|
}
|
|
13455
13550
|
|
|
13456
13551
|
get closable() {
|
|
13457
|
-
return this.$$.ctx[
|
|
13552
|
+
return this.$$.ctx[14];
|
|
13458
13553
|
}
|
|
13459
13554
|
|
|
13460
13555
|
set closable(closable) {
|
|
@@ -13476,7 +13571,7 @@
|
|
|
13476
13571
|
}
|
|
13477
13572
|
|
|
13478
13573
|
get transition() {
|
|
13479
|
-
return this.$$.ctx[
|
|
13574
|
+
return this.$$.ctx[15];
|
|
13480
13575
|
}
|
|
13481
13576
|
|
|
13482
13577
|
set transition(transition) {
|