@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.esm.js
CHANGED
|
@@ -11156,7 +11156,7 @@ function create_if_block_4(ctx) {
|
|
|
11156
11156
|
}
|
|
11157
11157
|
|
|
11158
11158
|
};
|
|
11159
|
-
} // (
|
|
11159
|
+
} // (123:4) {#if leadingicon}
|
|
11160
11160
|
|
|
11161
11161
|
|
|
11162
11162
|
function create_if_block_3$4(ctx) {
|
|
@@ -11190,7 +11190,7 @@ function create_if_block_3$4(ctx) {
|
|
|
11190
11190
|
}
|
|
11191
11191
|
|
|
11192
11192
|
};
|
|
11193
|
-
} // (
|
|
11193
|
+
} // (157:4) {#if trailingicon && !handlesTrailingIconClick}
|
|
11194
11194
|
|
|
11195
11195
|
|
|
11196
11196
|
function create_if_block_2$4(ctx) {
|
|
@@ -11225,7 +11225,7 @@ function create_if_block_2$4(ctx) {
|
|
|
11225
11225
|
}
|
|
11226
11226
|
|
|
11227
11227
|
};
|
|
11228
|
-
} // (
|
|
11228
|
+
} // (167:4) {#if trailingicon && handlesTrailingIconClick}
|
|
11229
11229
|
|
|
11230
11230
|
|
|
11231
11231
|
function create_if_block_1$4(ctx) {
|
|
@@ -11237,7 +11237,7 @@ function create_if_block_1$4(ctx) {
|
|
|
11237
11237
|
goa_icon_button = element("goa-icon-button");
|
|
11238
11238
|
set_custom_element_data(goa_icon_button, "disabled",
|
|
11239
11239
|
/*isDisabled*/
|
|
11240
|
-
ctx[
|
|
11240
|
+
ctx[24]);
|
|
11241
11241
|
set_custom_element_data(goa_icon_button, "variant", "nocolor");
|
|
11242
11242
|
set_custom_element_data(goa_icon_button, "size", "medium");
|
|
11243
11243
|
set_custom_element_data(goa_icon_button, "icon",
|
|
@@ -11258,10 +11258,10 @@ function create_if_block_1$4(ctx) {
|
|
|
11258
11258
|
p(ctx, dirty) {
|
|
11259
11259
|
if (dirty[0] &
|
|
11260
11260
|
/*isDisabled*/
|
|
11261
|
-
|
|
11261
|
+
16777216) {
|
|
11262
11262
|
set_custom_element_data(goa_icon_button, "disabled",
|
|
11263
11263
|
/*isDisabled*/
|
|
11264
|
-
ctx[
|
|
11264
|
+
ctx[24]);
|
|
11265
11265
|
}
|
|
11266
11266
|
|
|
11267
11267
|
if (dirty[0] &
|
|
@@ -11280,7 +11280,7 @@ function create_if_block_1$4(ctx) {
|
|
|
11280
11280
|
}
|
|
11281
11281
|
|
|
11282
11282
|
};
|
|
11283
|
-
} // (
|
|
11283
|
+
} // (179:4) {#if suffix}
|
|
11284
11284
|
|
|
11285
11285
|
|
|
11286
11286
|
function create_if_block$a(ctx) {
|
|
@@ -11345,12 +11345,12 @@ function create_fragment$k(ctx) {
|
|
|
11345
11345
|
/*trailingicon*/
|
|
11346
11346
|
ctx[6] && !
|
|
11347
11347
|
/*handlesTrailingIconClick*/
|
|
11348
|
-
ctx[
|
|
11348
|
+
ctx[27] && create_if_block_2$4(ctx);
|
|
11349
11349
|
let if_block3 =
|
|
11350
11350
|
/*trailingicon*/
|
|
11351
11351
|
ctx[6] &&
|
|
11352
11352
|
/*handlesTrailingIconClick*/
|
|
11353
|
-
ctx[
|
|
11353
|
+
ctx[27] && create_if_block_1$4(ctx);
|
|
11354
11354
|
let if_block4 =
|
|
11355
11355
|
/*suffix*/
|
|
11356
11356
|
ctx[15] && create_if_block$a(ctx);
|
|
@@ -11377,18 +11377,30 @@ function create_fragment$k(ctx) {
|
|
|
11377
11377
|
div1.innerHTML = `<slot name="trailingContent"></slot>`;
|
|
11378
11378
|
this.c = noop;
|
|
11379
11379
|
attr(div0, "class", "leading-content");
|
|
11380
|
-
attr(input, "class", input_class_value = `
|
|
11380
|
+
attr(input, "class", input_class_value = `
|
|
11381
|
+
input--${
|
|
11381
11382
|
/*variant*/
|
|
11382
|
-
ctx[7]}
|
|
11383
|
+
ctx[7]}
|
|
11384
|
+
${
|
|
11385
|
+
/*_leadingContentSlot*/
|
|
11386
|
+
ctx[22] && !
|
|
11387
|
+
/*isDisabled*/
|
|
11388
|
+
ctx[24] ? "input-leading-content" : ""}
|
|
11389
|
+
${
|
|
11390
|
+
/*_trailingContentSlot*/
|
|
11391
|
+
ctx[23] && !
|
|
11392
|
+
/*isDisabled*/
|
|
11393
|
+
ctx[24] ? "input-trailing-content" : ""}
|
|
11394
|
+
`);
|
|
11383
11395
|
attr(input, "style", input_style_value = `--search-icon-offset: ${
|
|
11384
11396
|
/*trailingicon*/
|
|
11385
11397
|
ctx[6] ? "-0.5rem" : "0"}`);
|
|
11386
11398
|
input.readOnly =
|
|
11387
11399
|
/*isReadonly*/
|
|
11388
|
-
ctx[
|
|
11400
|
+
ctx[26];
|
|
11389
11401
|
input.disabled =
|
|
11390
11402
|
/*isDisabled*/
|
|
11391
|
-
ctx[
|
|
11403
|
+
ctx[24];
|
|
11392
11404
|
attr(input, "data-testid",
|
|
11393
11405
|
/*testid*/
|
|
11394
11406
|
ctx[8]);
|
|
@@ -11427,17 +11439,23 @@ function create_fragment$k(ctx) {
|
|
|
11427
11439
|
goa-input
|
|
11428
11440
|
${
|
|
11429
11441
|
/*isDisabled*/
|
|
11430
|
-
ctx[
|
|
11442
|
+
ctx[24] ? "goa-input--disabled" : ""}
|
|
11431
11443
|
variant--${
|
|
11432
11444
|
/*variant*/
|
|
11433
11445
|
ctx[7]}
|
|
11434
11446
|
type--${
|
|
11435
11447
|
/*type*/
|
|
11436
11448
|
ctx[1]}
|
|
11449
|
+
${
|
|
11450
|
+
/*_leadingContentSlot*/
|
|
11451
|
+
ctx[22] ? "goa-input-leading-content" : ""}
|
|
11452
|
+
${
|
|
11453
|
+
/*_trailingContentSlot*/
|
|
11454
|
+
ctx[23] ? "goa-input-trailing-content" : ""}
|
|
11437
11455
|
`);
|
|
11438
11456
|
toggle_class(div2, "error",
|
|
11439
11457
|
/*isError*/
|
|
11440
|
-
ctx[
|
|
11458
|
+
ctx[25]);
|
|
11441
11459
|
attr(div3, "class", "container");
|
|
11442
11460
|
attr(div3, "style", div3_style_value = `
|
|
11443
11461
|
${calculateMargin(
|
|
@@ -11467,7 +11485,7 @@ function create_fragment$k(ctx) {
|
|
|
11467
11485
|
append(div2, input);
|
|
11468
11486
|
/*input_binding*/
|
|
11469
11487
|
|
|
11470
|
-
ctx[
|
|
11488
|
+
ctx[36](input);
|
|
11471
11489
|
append(div2, t3);
|
|
11472
11490
|
if (if_block2) if_block2.m(div2, null);
|
|
11473
11491
|
append(div2, t4);
|
|
@@ -11476,13 +11494,16 @@ function create_fragment$k(ctx) {
|
|
|
11476
11494
|
if (if_block4) if_block4.m(div2, null);
|
|
11477
11495
|
append(div2, t6);
|
|
11478
11496
|
append(div2, div1);
|
|
11497
|
+
/*div3_binding*/
|
|
11498
|
+
|
|
11499
|
+
ctx[37](div3);
|
|
11479
11500
|
|
|
11480
11501
|
if (!mounted) {
|
|
11481
11502
|
dispose = [listen(input, "keyup",
|
|
11482
11503
|
/*onKeyUp*/
|
|
11483
|
-
ctx[
|
|
11504
|
+
ctx[28]), listen(input, "change",
|
|
11484
11505
|
/*onKeyUp*/
|
|
11485
|
-
ctx[
|
|
11506
|
+
ctx[28])];
|
|
11486
11507
|
mounted = true;
|
|
11487
11508
|
}
|
|
11488
11509
|
},
|
|
@@ -11519,10 +11540,22 @@ function create_fragment$k(ctx) {
|
|
|
11519
11540
|
}
|
|
11520
11541
|
|
|
11521
11542
|
if (dirty[0] &
|
|
11543
|
+
/*variant, _leadingContentSlot, isDisabled, _trailingContentSlot*/
|
|
11544
|
+
29360256 && input_class_value !== (input_class_value = `
|
|
11545
|
+
input--${
|
|
11522
11546
|
/*variant*/
|
|
11523
|
-
|
|
11524
|
-
|
|
11525
|
-
|
|
11547
|
+
ctx[7]}
|
|
11548
|
+
${
|
|
11549
|
+
/*_leadingContentSlot*/
|
|
11550
|
+
ctx[22] && !
|
|
11551
|
+
/*isDisabled*/
|
|
11552
|
+
ctx[24] ? "input-leading-content" : ""}
|
|
11553
|
+
${
|
|
11554
|
+
/*_trailingContentSlot*/
|
|
11555
|
+
ctx[23] && !
|
|
11556
|
+
/*isDisabled*/
|
|
11557
|
+
ctx[24] ? "input-trailing-content" : ""}
|
|
11558
|
+
`)) {
|
|
11526
11559
|
attr(input, "class", input_class_value);
|
|
11527
11560
|
}
|
|
11528
11561
|
|
|
@@ -11536,18 +11569,18 @@ function create_fragment$k(ctx) {
|
|
|
11536
11569
|
|
|
11537
11570
|
if (dirty[0] &
|
|
11538
11571
|
/*isReadonly*/
|
|
11539
|
-
|
|
11572
|
+
67108864) {
|
|
11540
11573
|
input.readOnly =
|
|
11541
11574
|
/*isReadonly*/
|
|
11542
|
-
ctx[
|
|
11575
|
+
ctx[26];
|
|
11543
11576
|
}
|
|
11544
11577
|
|
|
11545
11578
|
if (dirty[0] &
|
|
11546
11579
|
/*isDisabled*/
|
|
11547
|
-
|
|
11580
|
+
16777216) {
|
|
11548
11581
|
input.disabled =
|
|
11549
11582
|
/*isDisabled*/
|
|
11550
|
-
ctx[
|
|
11583
|
+
ctx[24];
|
|
11551
11584
|
}
|
|
11552
11585
|
|
|
11553
11586
|
if (dirty[0] &
|
|
@@ -11638,7 +11671,7 @@ function create_fragment$k(ctx) {
|
|
|
11638
11671
|
/*trailingicon*/
|
|
11639
11672
|
ctx[6] && !
|
|
11640
11673
|
/*handlesTrailingIconClick*/
|
|
11641
|
-
ctx[
|
|
11674
|
+
ctx[27]) {
|
|
11642
11675
|
if (if_block2) {
|
|
11643
11676
|
if_block2.p(ctx, dirty);
|
|
11644
11677
|
} else {
|
|
@@ -11655,7 +11688,7 @@ function create_fragment$k(ctx) {
|
|
|
11655
11688
|
/*trailingicon*/
|
|
11656
11689
|
ctx[6] &&
|
|
11657
11690
|
/*handlesTrailingIconClick*/
|
|
11658
|
-
ctx[
|
|
11691
|
+
ctx[27]) {
|
|
11659
11692
|
if (if_block3) {
|
|
11660
11693
|
if_block3.p(ctx, dirty);
|
|
11661
11694
|
} else {
|
|
@@ -11684,28 +11717,34 @@ function create_fragment$k(ctx) {
|
|
|
11684
11717
|
}
|
|
11685
11718
|
|
|
11686
11719
|
if (dirty[0] &
|
|
11687
|
-
/*isDisabled, variant, type*/
|
|
11688
|
-
|
|
11720
|
+
/*isDisabled, variant, type, _leadingContentSlot, _trailingContentSlot*/
|
|
11721
|
+
29360258 && div2_class_value !== (div2_class_value = `
|
|
11689
11722
|
goa-input
|
|
11690
11723
|
${
|
|
11691
11724
|
/*isDisabled*/
|
|
11692
|
-
ctx[
|
|
11725
|
+
ctx[24] ? "goa-input--disabled" : ""}
|
|
11693
11726
|
variant--${
|
|
11694
11727
|
/*variant*/
|
|
11695
11728
|
ctx[7]}
|
|
11696
11729
|
type--${
|
|
11697
11730
|
/*type*/
|
|
11698
11731
|
ctx[1]}
|
|
11732
|
+
${
|
|
11733
|
+
/*_leadingContentSlot*/
|
|
11734
|
+
ctx[22] ? "goa-input-leading-content" : ""}
|
|
11735
|
+
${
|
|
11736
|
+
/*_trailingContentSlot*/
|
|
11737
|
+
ctx[23] ? "goa-input-trailing-content" : ""}
|
|
11699
11738
|
`)) {
|
|
11700
11739
|
attr(div2, "class", div2_class_value);
|
|
11701
11740
|
}
|
|
11702
11741
|
|
|
11703
11742
|
if (dirty[0] &
|
|
11704
|
-
/*isDisabled, variant, type, isError*/
|
|
11705
|
-
|
|
11743
|
+
/*isDisabled, variant, type, _leadingContentSlot, _trailingContentSlot, isError*/
|
|
11744
|
+
62914690) {
|
|
11706
11745
|
toggle_class(div2, "error",
|
|
11707
11746
|
/*isError*/
|
|
11708
|
-
ctx[
|
|
11747
|
+
ctx[25]);
|
|
11709
11748
|
}
|
|
11710
11749
|
|
|
11711
11750
|
if (dirty[0] &
|
|
@@ -11737,10 +11776,13 @@ function create_fragment$k(ctx) {
|
|
|
11737
11776
|
if (if_block1) if_block1.d();
|
|
11738
11777
|
/*input_binding*/
|
|
11739
11778
|
|
|
11740
|
-
ctx[
|
|
11779
|
+
ctx[36](null);
|
|
11741
11780
|
if (if_block2) if_block2.d();
|
|
11742
11781
|
if (if_block3) if_block3.d();
|
|
11743
11782
|
if (if_block4) if_block4.d();
|
|
11783
|
+
/*div3_binding*/
|
|
11784
|
+
|
|
11785
|
+
ctx[37](null);
|
|
11744
11786
|
mounted = false;
|
|
11745
11787
|
run_all(dispose);
|
|
11746
11788
|
}
|
|
@@ -11841,6 +11883,11 @@ function instance$i($$self, $$props, $$invalidate) {
|
|
|
11841
11883
|
ml = null
|
|
11842
11884
|
} = $$props;
|
|
11843
11885
|
let inputEl;
|
|
11886
|
+
|
|
11887
|
+
let _rootEL;
|
|
11888
|
+
|
|
11889
|
+
let _leadingContentSlot = false;
|
|
11890
|
+
let _trailingContentSlot = false;
|
|
11844
11891
|
let _debounceId = null;
|
|
11845
11892
|
|
|
11846
11893
|
function onKeyUp(e) {
|
|
@@ -11872,6 +11919,18 @@ function instance$i($$self, $$props, $$invalidate) {
|
|
|
11872
11919
|
if (prefix != "" || suffix != "") {
|
|
11873
11920
|
console.warn("GoAInput [prefix] and [suffix] properties are deprecated. Instead use leadingContent and trailingContent.");
|
|
11874
11921
|
}
|
|
11922
|
+
|
|
11923
|
+
const leadingContentSlot = _rootEL.querySelector("slot[name=leadingContent]");
|
|
11924
|
+
|
|
11925
|
+
if (leadingContentSlot && leadingContentSlot.assignedNodes().length > 0) {
|
|
11926
|
+
$$invalidate(22, _leadingContentSlot = true);
|
|
11927
|
+
}
|
|
11928
|
+
|
|
11929
|
+
const trailingContentSlot = _rootEL.querySelector("slot[name=trailingContent]");
|
|
11930
|
+
|
|
11931
|
+
if (trailingContentSlot && trailingContentSlot.assignedNodes().length > 0) {
|
|
11932
|
+
$$invalidate(23, _trailingContentSlot = true);
|
|
11933
|
+
}
|
|
11875
11934
|
});
|
|
11876
11935
|
|
|
11877
11936
|
function input_binding($$value) {
|
|
@@ -11881,6 +11940,13 @@ function instance$i($$self, $$props, $$invalidate) {
|
|
|
11881
11940
|
});
|
|
11882
11941
|
}
|
|
11883
11942
|
|
|
11943
|
+
function div3_binding($$value) {
|
|
11944
|
+
binding_callbacks[$$value ? 'unshift' : 'push'](() => {
|
|
11945
|
+
_rootEL = $$value;
|
|
11946
|
+
$$invalidate(21, _rootEL);
|
|
11947
|
+
});
|
|
11948
|
+
}
|
|
11949
|
+
|
|
11884
11950
|
$$self.$$set = $$props => {
|
|
11885
11951
|
if ('type' in $$props) $$invalidate(1, type = $$props.type);
|
|
11886
11952
|
if ('name' in $$props) $$invalidate(2, name = $$props.name);
|
|
@@ -11890,11 +11956,11 @@ function instance$i($$self, $$props, $$invalidate) {
|
|
|
11890
11956
|
if ('leadingicon' in $$props) $$invalidate(5, leadingicon = $$props.leadingicon);
|
|
11891
11957
|
if ('trailingicon' in $$props) $$invalidate(6, trailingicon = $$props.trailingicon);
|
|
11892
11958
|
if ('variant' in $$props) $$invalidate(7, variant = $$props.variant);
|
|
11893
|
-
if ('disabled' in $$props) $$invalidate(
|
|
11894
|
-
if ('handletrailingiconclick' in $$props) $$invalidate(
|
|
11895
|
-
if ('focused' in $$props) $$invalidate(
|
|
11896
|
-
if ('readonly' in $$props) $$invalidate(
|
|
11897
|
-
if ('error' in $$props) $$invalidate(
|
|
11959
|
+
if ('disabled' in $$props) $$invalidate(29, disabled = $$props.disabled);
|
|
11960
|
+
if ('handletrailingiconclick' in $$props) $$invalidate(30, handletrailingiconclick = $$props.handletrailingiconclick);
|
|
11961
|
+
if ('focused' in $$props) $$invalidate(31, focused = $$props.focused);
|
|
11962
|
+
if ('readonly' in $$props) $$invalidate(32, readonly = $$props.readonly);
|
|
11963
|
+
if ('error' in $$props) $$invalidate(33, error = $$props.error);
|
|
11898
11964
|
if ('testid' in $$props) $$invalidate(8, testid = $$props.testid);
|
|
11899
11965
|
if ('width' in $$props) $$invalidate(9, width = $$props.width);
|
|
11900
11966
|
if ('arialabel' in $$props) $$invalidate(10, arialabel = $$props.arialabel);
|
|
@@ -11903,7 +11969,7 @@ function instance$i($$self, $$props, $$invalidate) {
|
|
|
11903
11969
|
if ('step' in $$props) $$invalidate(13, step = $$props.step);
|
|
11904
11970
|
if ('prefix' in $$props) $$invalidate(14, prefix = $$props.prefix);
|
|
11905
11971
|
if ('suffix' in $$props) $$invalidate(15, suffix = $$props.suffix);
|
|
11906
|
-
if ('debounce' in $$props) $$invalidate(
|
|
11972
|
+
if ('debounce' in $$props) $$invalidate(34, debounce = $$props.debounce);
|
|
11907
11973
|
if ('mt' in $$props) $$invalidate(16, mt = $$props.mt);
|
|
11908
11974
|
if ('mr' in $$props) $$invalidate(17, mr = $$props.mr);
|
|
11909
11975
|
if ('mb' in $$props) $$invalidate(18, mb = $$props.mb);
|
|
@@ -11913,39 +11979,39 @@ function instance$i($$self, $$props, $$invalidate) {
|
|
|
11913
11979
|
$$self.$$.update = () => {
|
|
11914
11980
|
if ($$self.$$.dirty[0] &
|
|
11915
11981
|
/*handletrailingiconclick*/
|
|
11916
|
-
|
|
11917
|
-
$$invalidate(
|
|
11982
|
+
1073741824) {
|
|
11983
|
+
$$invalidate(27, handlesTrailingIconClick = toBoolean(handletrailingiconclick));
|
|
11918
11984
|
}
|
|
11919
11985
|
|
|
11920
|
-
if ($$self.$$.dirty[
|
|
11986
|
+
if ($$self.$$.dirty[1] &
|
|
11921
11987
|
/*focused*/
|
|
11922
|
-
|
|
11923
|
-
$$invalidate(
|
|
11988
|
+
1) {
|
|
11989
|
+
$$invalidate(35, isFocused = toBoolean(focused));
|
|
11924
11990
|
}
|
|
11925
11991
|
|
|
11926
|
-
if ($$self.$$.dirty[
|
|
11992
|
+
if ($$self.$$.dirty[1] &
|
|
11927
11993
|
/*readonly*/
|
|
11928
|
-
|
|
11929
|
-
$$invalidate(
|
|
11994
|
+
2) {
|
|
11995
|
+
$$invalidate(26, isReadonly = toBoolean(readonly));
|
|
11930
11996
|
}
|
|
11931
11997
|
|
|
11932
|
-
if ($$self.$$.dirty[
|
|
11998
|
+
if ($$self.$$.dirty[1] &
|
|
11933
11999
|
/*error*/
|
|
11934
|
-
|
|
11935
|
-
$$invalidate(
|
|
12000
|
+
4) {
|
|
12001
|
+
$$invalidate(25, isError = toBoolean(error));
|
|
11936
12002
|
}
|
|
11937
12003
|
|
|
11938
12004
|
if ($$self.$$.dirty[0] &
|
|
11939
12005
|
/*disabled*/
|
|
11940
|
-
|
|
11941
|
-
$$invalidate(
|
|
12006
|
+
536870912) {
|
|
12007
|
+
$$invalidate(24, isDisabled = toBoolean(disabled));
|
|
11942
12008
|
}
|
|
11943
12009
|
|
|
11944
12010
|
if ($$self.$$.dirty[0] &
|
|
11945
12011
|
/*inputEl*/
|
|
11946
12012
|
1048576 | $$self.$$.dirty[1] &
|
|
11947
12013
|
/*isFocused*/
|
|
11948
|
-
|
|
12014
|
+
16) {
|
|
11949
12015
|
if (isFocused && inputEl) {
|
|
11950
12016
|
setTimeout(() => inputEl.focus(), 1);
|
|
11951
12017
|
}
|
|
@@ -11962,13 +12028,13 @@ function instance$i($$self, $$props, $$invalidate) {
|
|
|
11962
12028
|
}
|
|
11963
12029
|
};
|
|
11964
12030
|
|
|
11965
|
-
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];
|
|
12031
|
+
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];
|
|
11966
12032
|
}
|
|
11967
12033
|
|
|
11968
12034
|
class Input extends SvelteElement {
|
|
11969
12035
|
constructor(options) {
|
|
11970
12036
|
super();
|
|
11971
|
-
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>')
|
|
12037
|
+
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>')
|
|
11972
12038
|
center center no-repeat}</style>`;
|
|
11973
12039
|
init(this, {
|
|
11974
12040
|
target: this.shadowRoot,
|
|
@@ -11983,11 +12049,11 @@ class Input extends SvelteElement {
|
|
|
11983
12049
|
leadingicon: 5,
|
|
11984
12050
|
trailingicon: 6,
|
|
11985
12051
|
variant: 7,
|
|
11986
|
-
disabled:
|
|
11987
|
-
handletrailingiconclick:
|
|
11988
|
-
focused:
|
|
11989
|
-
readonly:
|
|
11990
|
-
error:
|
|
12052
|
+
disabled: 29,
|
|
12053
|
+
handletrailingiconclick: 30,
|
|
12054
|
+
focused: 31,
|
|
12055
|
+
readonly: 32,
|
|
12056
|
+
error: 33,
|
|
11991
12057
|
testid: 8,
|
|
11992
12058
|
width: 9,
|
|
11993
12059
|
arialabel: 10,
|
|
@@ -11996,7 +12062,7 @@ class Input extends SvelteElement {
|
|
|
11996
12062
|
step: 13,
|
|
11997
12063
|
prefix: 14,
|
|
11998
12064
|
suffix: 15,
|
|
11999
|
-
debounce:
|
|
12065
|
+
debounce: 34,
|
|
12000
12066
|
mt: 16,
|
|
12001
12067
|
mr: 17,
|
|
12002
12068
|
mb: 18,
|
|
@@ -12108,7 +12174,7 @@ class Input extends SvelteElement {
|
|
|
12108
12174
|
}
|
|
12109
12175
|
|
|
12110
12176
|
get disabled() {
|
|
12111
|
-
return this.$$.ctx[
|
|
12177
|
+
return this.$$.ctx[29];
|
|
12112
12178
|
}
|
|
12113
12179
|
|
|
12114
12180
|
set disabled(disabled) {
|
|
@@ -12119,7 +12185,7 @@ class Input extends SvelteElement {
|
|
|
12119
12185
|
}
|
|
12120
12186
|
|
|
12121
12187
|
get handletrailingiconclick() {
|
|
12122
|
-
return this.$$.ctx[
|
|
12188
|
+
return this.$$.ctx[30];
|
|
12123
12189
|
}
|
|
12124
12190
|
|
|
12125
12191
|
set handletrailingiconclick(handletrailingiconclick) {
|
|
@@ -12130,7 +12196,7 @@ class Input extends SvelteElement {
|
|
|
12130
12196
|
}
|
|
12131
12197
|
|
|
12132
12198
|
get focused() {
|
|
12133
|
-
return this.$$.ctx[
|
|
12199
|
+
return this.$$.ctx[31];
|
|
12134
12200
|
}
|
|
12135
12201
|
|
|
12136
12202
|
set focused(focused) {
|
|
@@ -12141,7 +12207,7 @@ class Input extends SvelteElement {
|
|
|
12141
12207
|
}
|
|
12142
12208
|
|
|
12143
12209
|
get readonly() {
|
|
12144
|
-
return this.$$.ctx[
|
|
12210
|
+
return this.$$.ctx[32];
|
|
12145
12211
|
}
|
|
12146
12212
|
|
|
12147
12213
|
set readonly(readonly) {
|
|
@@ -12152,7 +12218,7 @@ class Input extends SvelteElement {
|
|
|
12152
12218
|
}
|
|
12153
12219
|
|
|
12154
12220
|
get error() {
|
|
12155
|
-
return this.$$.ctx[
|
|
12221
|
+
return this.$$.ctx[33];
|
|
12156
12222
|
}
|
|
12157
12223
|
|
|
12158
12224
|
set error(error) {
|
|
@@ -12251,7 +12317,7 @@ class Input extends SvelteElement {
|
|
|
12251
12317
|
}
|
|
12252
12318
|
|
|
12253
12319
|
get debounce() {
|
|
12254
|
-
return this.$$.ctx[
|
|
12320
|
+
return this.$$.ctx[34];
|
|
12255
12321
|
}
|
|
12256
12322
|
|
|
12257
12323
|
set debounce(debounce) {
|
|
@@ -12746,7 +12812,7 @@ function create_if_block$8(ctx) {
|
|
|
12746
12812
|
let if_block1 = current_block_type(ctx);
|
|
12747
12813
|
let if_block2 =
|
|
12748
12814
|
/*_isClosable*/
|
|
12749
|
-
ctx[
|
|
12815
|
+
ctx[9] && create_if_block_1$2(ctx);
|
|
12750
12816
|
return {
|
|
12751
12817
|
c() {
|
|
12752
12818
|
goa_focus_trap = element("goa-focus-trap");
|
|
@@ -12808,31 +12874,34 @@ function create_if_block$8(ctx) {
|
|
|
12808
12874
|
if_block1.m(div1, null);
|
|
12809
12875
|
append(header, t2);
|
|
12810
12876
|
if (if_block2) if_block2.m(header, null);
|
|
12877
|
+
/*header_binding*/
|
|
12878
|
+
|
|
12879
|
+
ctx[16](header);
|
|
12811
12880
|
append(div4, t3);
|
|
12812
12881
|
append(div4, div2);
|
|
12813
12882
|
append(div2, goa_scrollable);
|
|
12814
12883
|
/*goa_scrollable_binding*/
|
|
12815
12884
|
|
|
12816
|
-
ctx[
|
|
12885
|
+
ctx[17](goa_scrollable);
|
|
12817
12886
|
/*div2_binding*/
|
|
12818
12887
|
|
|
12819
|
-
ctx[
|
|
12888
|
+
ctx[18](div2);
|
|
12820
12889
|
append(div4, t4);
|
|
12821
12890
|
append(div4, div3);
|
|
12822
12891
|
/*div6_binding*/
|
|
12823
12892
|
|
|
12824
|
-
ctx[
|
|
12893
|
+
ctx[19](div6);
|
|
12825
12894
|
current = true;
|
|
12826
12895
|
|
|
12827
12896
|
if (!mounted) {
|
|
12828
12897
|
dispose = [listen(div0, "click",
|
|
12829
12898
|
/*close*/
|
|
12830
|
-
ctx[
|
|
12899
|
+
ctx[12]), listen(goa_scrollable, "_scroll",
|
|
12831
12900
|
/*handleScroll*/
|
|
12832
|
-
ctx[
|
|
12901
|
+
ctx[13]), action_destroyer(noscroll_action = noscroll.call(null, div6, {
|
|
12833
12902
|
enable:
|
|
12834
12903
|
/*_isOpen*/
|
|
12835
|
-
ctx[
|
|
12904
|
+
ctx[7]
|
|
12836
12905
|
}))];
|
|
12837
12906
|
mounted = true;
|
|
12838
12907
|
}
|
|
@@ -12870,7 +12939,7 @@ function create_if_block$8(ctx) {
|
|
|
12870
12939
|
|
|
12871
12940
|
if (
|
|
12872
12941
|
/*_isClosable*/
|
|
12873
|
-
ctx[
|
|
12942
|
+
ctx[9]) {
|
|
12874
12943
|
if (if_block2) {
|
|
12875
12944
|
if_block2.p(ctx, dirty);
|
|
12876
12945
|
} else {
|
|
@@ -12895,10 +12964,10 @@ function create_if_block$8(ctx) {
|
|
|
12895
12964
|
|
|
12896
12965
|
if (noscroll_action && is_function(noscroll_action.update) && dirty &
|
|
12897
12966
|
/*_isOpen*/
|
|
12898
|
-
|
|
12967
|
+
128) noscroll_action.update.call(null, {
|
|
12899
12968
|
enable:
|
|
12900
12969
|
/*_isOpen*/
|
|
12901
|
-
ctx[
|
|
12970
|
+
ctx[7]
|
|
12902
12971
|
});
|
|
12903
12972
|
|
|
12904
12973
|
if (!current || dirty &
|
|
@@ -12917,7 +12986,7 @@ function create_if_block$8(ctx) {
|
|
|
12917
12986
|
div5_intro = create_in_transition(div5, fly, {
|
|
12918
12987
|
duration:
|
|
12919
12988
|
/*_transitionTime*/
|
|
12920
|
-
ctx[
|
|
12989
|
+
ctx[11],
|
|
12921
12990
|
y: 200
|
|
12922
12991
|
});
|
|
12923
12992
|
div5_intro.start();
|
|
@@ -12927,7 +12996,7 @@ function create_if_block$8(ctx) {
|
|
|
12927
12996
|
div6_intro = create_in_transition(div6, fade, {
|
|
12928
12997
|
duration:
|
|
12929
12998
|
/*_transitionTime*/
|
|
12930
|
-
ctx[
|
|
12999
|
+
ctx[11]
|
|
12931
13000
|
});
|
|
12932
13001
|
div6_intro.start();
|
|
12933
13002
|
});
|
|
@@ -12939,20 +13008,20 @@ function create_if_block$8(ctx) {
|
|
|
12939
13008
|
div5_outro = create_out_transition(div5, fly, {
|
|
12940
13009
|
delay:
|
|
12941
13010
|
/*_transitionTime*/
|
|
12942
|
-
ctx[
|
|
13011
|
+
ctx[11],
|
|
12943
13012
|
duration:
|
|
12944
13013
|
/*_transitionTime*/
|
|
12945
|
-
ctx[
|
|
13014
|
+
ctx[11],
|
|
12946
13015
|
y: -100
|
|
12947
13016
|
});
|
|
12948
13017
|
if (div6_intro) div6_intro.invalidate();
|
|
12949
13018
|
div6_outro = create_out_transition(div6, fade, {
|
|
12950
13019
|
delay:
|
|
12951
13020
|
/*_transitionTime*/
|
|
12952
|
-
ctx[
|
|
13021
|
+
ctx[11],
|
|
12953
13022
|
duration:
|
|
12954
13023
|
/*_transitionTime*/
|
|
12955
|
-
ctx[
|
|
13024
|
+
ctx[11]
|
|
12956
13025
|
});
|
|
12957
13026
|
current = false;
|
|
12958
13027
|
},
|
|
@@ -12962,23 +13031,26 @@ function create_if_block$8(ctx) {
|
|
|
12962
13031
|
if (if_block0) if_block0.d();
|
|
12963
13032
|
if_block1.d();
|
|
12964
13033
|
if (if_block2) if_block2.d();
|
|
13034
|
+
/*header_binding*/
|
|
13035
|
+
|
|
13036
|
+
ctx[16](null);
|
|
12965
13037
|
/*goa_scrollable_binding*/
|
|
12966
13038
|
|
|
12967
|
-
ctx[
|
|
13039
|
+
ctx[17](null);
|
|
12968
13040
|
/*div2_binding*/
|
|
12969
13041
|
|
|
12970
|
-
ctx[
|
|
13042
|
+
ctx[18](null);
|
|
12971
13043
|
if (detaching && div5_outro) div5_outro.end();
|
|
12972
13044
|
/*div6_binding*/
|
|
12973
13045
|
|
|
12974
|
-
ctx[
|
|
13046
|
+
ctx[19](null);
|
|
12975
13047
|
if (detaching && div6_outro) div6_outro.end();
|
|
12976
13048
|
mounted = false;
|
|
12977
13049
|
run_all(dispose);
|
|
12978
13050
|
}
|
|
12979
13051
|
|
|
12980
13052
|
};
|
|
12981
|
-
} // (
|
|
13053
|
+
} // (132:8) {#if calloutvariant !== null}
|
|
12982
13054
|
|
|
12983
13055
|
|
|
12984
13056
|
function create_if_block_3$2(ctx) {
|
|
@@ -12992,7 +13064,7 @@ function create_if_block_3$2(ctx) {
|
|
|
12992
13064
|
goa_icon = element("goa-icon");
|
|
12993
13065
|
set_custom_element_data(goa_icon, "type",
|
|
12994
13066
|
/*_iconType*/
|
|
12995
|
-
ctx[
|
|
13067
|
+
ctx[10]);
|
|
12996
13068
|
set_custom_element_data(goa_icon, "inverted", goa_icon_inverted_value =
|
|
12997
13069
|
/*calloutvariant*/
|
|
12998
13070
|
ctx[3] === "important" ? "false" : "true");
|
|
@@ -13009,10 +13081,10 @@ function create_if_block_3$2(ctx) {
|
|
|
13009
13081
|
p(ctx, dirty) {
|
|
13010
13082
|
if (dirty &
|
|
13011
13083
|
/*_iconType*/
|
|
13012
|
-
|
|
13084
|
+
1024) {
|
|
13013
13085
|
set_custom_element_data(goa_icon, "type",
|
|
13014
13086
|
/*_iconType*/
|
|
13015
|
-
ctx[
|
|
13087
|
+
ctx[10]);
|
|
13016
13088
|
}
|
|
13017
13089
|
|
|
13018
13090
|
if (dirty &
|
|
@@ -13037,7 +13109,7 @@ function create_if_block_3$2(ctx) {
|
|
|
13037
13109
|
}
|
|
13038
13110
|
|
|
13039
13111
|
};
|
|
13040
|
-
} // (
|
|
13112
|
+
} // (145:14) {:else}
|
|
13041
13113
|
|
|
13042
13114
|
|
|
13043
13115
|
function create_else_block$3(ctx) {
|
|
@@ -13059,7 +13131,7 @@ function create_else_block$3(ctx) {
|
|
|
13059
13131
|
}
|
|
13060
13132
|
|
|
13061
13133
|
};
|
|
13062
|
-
} // (
|
|
13134
|
+
} // (143:14) {#if heading}
|
|
13063
13135
|
|
|
13064
13136
|
|
|
13065
13137
|
function create_if_block_2$2(ctx) {
|
|
@@ -13088,7 +13160,7 @@ function create_if_block_2$2(ctx) {
|
|
|
13088
13160
|
}
|
|
13089
13161
|
|
|
13090
13162
|
};
|
|
13091
|
-
} // (
|
|
13163
|
+
} // (149:12) {#if _isClosable}
|
|
13092
13164
|
|
|
13093
13165
|
|
|
13094
13166
|
function create_if_block_1$2(ctx) {
|
|
@@ -13113,7 +13185,7 @@ function create_if_block_1$2(ctx) {
|
|
|
13113
13185
|
if (!mounted) {
|
|
13114
13186
|
dispose = listen(goa_icon_button, "click",
|
|
13115
13187
|
/*close*/
|
|
13116
|
-
ctx[
|
|
13188
|
+
ctx[12]);
|
|
13117
13189
|
mounted = true;
|
|
13118
13190
|
}
|
|
13119
13191
|
},
|
|
@@ -13134,7 +13206,7 @@ function create_fragment$i(ctx) {
|
|
|
13134
13206
|
let current;
|
|
13135
13207
|
let if_block =
|
|
13136
13208
|
/*_isOpen*/
|
|
13137
|
-
ctx[
|
|
13209
|
+
ctx[7] && create_if_block$8(ctx);
|
|
13138
13210
|
return {
|
|
13139
13211
|
c() {
|
|
13140
13212
|
if (if_block) if_block.c();
|
|
@@ -13151,13 +13223,13 @@ function create_fragment$i(ctx) {
|
|
|
13151
13223
|
p(ctx, [dirty]) {
|
|
13152
13224
|
if (
|
|
13153
13225
|
/*_isOpen*/
|
|
13154
|
-
ctx[
|
|
13226
|
+
ctx[7]) {
|
|
13155
13227
|
if (if_block) {
|
|
13156
13228
|
if_block.p(ctx, dirty);
|
|
13157
13229
|
|
|
13158
13230
|
if (dirty &
|
|
13159
13231
|
/*_isOpen*/
|
|
13160
|
-
|
|
13232
|
+
128) {
|
|
13161
13233
|
transition_in(if_block, 1);
|
|
13162
13234
|
}
|
|
13163
13235
|
} else {
|
|
@@ -13224,7 +13296,8 @@ function instance$g($$self, $$props, $$invalidate) {
|
|
|
13224
13296
|
|
|
13225
13297
|
let _rootEl = null;
|
|
13226
13298
|
let _contentEl = null;
|
|
13227
|
-
let _scrollEl = null;
|
|
13299
|
+
let _scrollEl = null;
|
|
13300
|
+
let _headerEl = null; // Type verification
|
|
13228
13301
|
|
|
13229
13302
|
const [CALLOUT_VARIANT, validateCalloutVariant] = typeValidator("Callout variant", ["emergency", "important", "information", "success", "event"]);
|
|
13230
13303
|
const [Transitions, validateTransition] = typeValidator("Modal transition", ["fast", "slow", "none"]); // Hooks
|
|
@@ -13273,32 +13346,49 @@ function instance$g($$self, $$props, $$invalidate) {
|
|
|
13273
13346
|
}
|
|
13274
13347
|
}
|
|
13275
13348
|
|
|
13349
|
+
function getChildren() {
|
|
13350
|
+
const slot = _headerEl.querySelector("slot");
|
|
13351
|
+
|
|
13352
|
+
if (slot) {
|
|
13353
|
+
return [...slot.assignedElements()];
|
|
13354
|
+
} else {
|
|
13355
|
+
return [..._headerEl.children]; // unit tests
|
|
13356
|
+
}
|
|
13357
|
+
}
|
|
13358
|
+
|
|
13359
|
+
function header_binding($$value) {
|
|
13360
|
+
binding_callbacks[$$value ? 'unshift' : 'push'](() => {
|
|
13361
|
+
_headerEl = $$value;
|
|
13362
|
+
($$invalidate(6, _headerEl), $$invalidate(7, _isOpen)), $$invalidate(1, open);
|
|
13363
|
+
});
|
|
13364
|
+
}
|
|
13365
|
+
|
|
13276
13366
|
function goa_scrollable_binding($$value) {
|
|
13277
13367
|
binding_callbacks[$$value ? 'unshift' : 'push'](() => {
|
|
13278
13368
|
_scrollEl = $$value;
|
|
13279
|
-
($$invalidate(5, _scrollEl), $$invalidate(
|
|
13369
|
+
($$invalidate(5, _scrollEl), $$invalidate(7, _isOpen)), $$invalidate(1, open);
|
|
13280
13370
|
});
|
|
13281
13371
|
}
|
|
13282
13372
|
|
|
13283
13373
|
function div2_binding($$value) {
|
|
13284
13374
|
binding_callbacks[$$value ? 'unshift' : 'push'](() => {
|
|
13285
13375
|
_contentEl = $$value;
|
|
13286
|
-
($$invalidate(4, _contentEl), $$invalidate(
|
|
13376
|
+
($$invalidate(4, _contentEl), $$invalidate(7, _isOpen)), $$invalidate(1, open);
|
|
13287
13377
|
});
|
|
13288
13378
|
}
|
|
13289
13379
|
|
|
13290
13380
|
function div6_binding($$value) {
|
|
13291
13381
|
binding_callbacks[$$value ? 'unshift' : 'push'](() => {
|
|
13292
13382
|
_rootEl = $$value;
|
|
13293
|
-
($$invalidate(
|
|
13383
|
+
($$invalidate(8, _rootEl), $$invalidate(7, _isOpen)), $$invalidate(1, open);
|
|
13294
13384
|
});
|
|
13295
13385
|
}
|
|
13296
13386
|
|
|
13297
13387
|
$$self.$$set = $$props => {
|
|
13298
13388
|
if ('heading' in $$props) $$invalidate(0, heading = $$props.heading);
|
|
13299
|
-
if ('closable' in $$props) $$invalidate(
|
|
13389
|
+
if ('closable' in $$props) $$invalidate(14, closable = $$props.closable);
|
|
13300
13390
|
if ('open' in $$props) $$invalidate(1, open = $$props.open);
|
|
13301
|
-
if ('transition' in $$props) $$invalidate(
|
|
13391
|
+
if ('transition' in $$props) $$invalidate(15, transition = $$props.transition);
|
|
13302
13392
|
if ('width' in $$props) $$invalidate(2, width = $$props.width);
|
|
13303
13393
|
if ('calloutvariant' in $$props) $$invalidate(3, calloutvariant = $$props.calloutvariant);
|
|
13304
13394
|
};
|
|
@@ -13306,30 +13396,30 @@ function instance$g($$self, $$props, $$invalidate) {
|
|
|
13306
13396
|
$$self.$$.update = () => {
|
|
13307
13397
|
if ($$self.$$.dirty &
|
|
13308
13398
|
/*closable*/
|
|
13309
|
-
|
|
13399
|
+
16384) {
|
|
13310
13400
|
// Reactive
|
|
13311
|
-
$$invalidate(
|
|
13401
|
+
$$invalidate(9, _isClosable = toBoolean(closable));
|
|
13312
13402
|
}
|
|
13313
13403
|
|
|
13314
13404
|
if ($$self.$$.dirty &
|
|
13315
13405
|
/*open*/
|
|
13316
13406
|
2) {
|
|
13317
|
-
$$invalidate(
|
|
13407
|
+
$$invalidate(7, _isOpen = toBoolean(open));
|
|
13318
13408
|
}
|
|
13319
13409
|
|
|
13320
13410
|
if ($$self.$$.dirty &
|
|
13321
13411
|
/*_isOpen*/
|
|
13322
|
-
|
|
13412
|
+
128) {
|
|
13323
13413
|
if (!_isOpen) {
|
|
13324
13414
|
// prevent null issues
|
|
13325
|
-
$$invalidate(4, _contentEl = $$invalidate(5, _scrollEl = $$invalidate(
|
|
13415
|
+
$$invalidate(4, _contentEl = $$invalidate(5, _scrollEl = $$invalidate(8, _rootEl = $$invalidate(6, _headerEl = null))));
|
|
13326
13416
|
window.removeEventListener('keydown', onInputKeyDown);
|
|
13327
13417
|
}
|
|
13328
13418
|
}
|
|
13329
13419
|
|
|
13330
13420
|
if ($$self.$$.dirty &
|
|
13331
13421
|
/*_isOpen, _scrollEl, _contentEl*/
|
|
13332
|
-
|
|
13422
|
+
176) {
|
|
13333
13423
|
if (_isOpen && _scrollEl && _contentEl) {
|
|
13334
13424
|
const hasScroll = _scrollEl.scrollHeight > _scrollEl.offsetHeight;
|
|
13335
13425
|
|
|
@@ -13340,42 +13430,47 @@ function instance$g($$self, $$props, $$invalidate) {
|
|
|
13340
13430
|
}
|
|
13341
13431
|
|
|
13342
13432
|
if ($$self.$$.dirty &
|
|
13343
|
-
/*_isOpen, _contentEl*/
|
|
13344
|
-
|
|
13433
|
+
/*_isOpen, _contentEl, _headerEl*/
|
|
13434
|
+
208) {
|
|
13345
13435
|
if (_isOpen && _contentEl) {
|
|
13346
13436
|
window.addEventListener('keydown', onInputKeyDown);
|
|
13437
|
+
const children = getChildren();
|
|
13438
|
+
|
|
13439
|
+
if (_headerEl.querySelector("div.modal-title").textContent || _headerEl.querySelector("div.modal-close") || children.length) {
|
|
13440
|
+
_headerEl.classList.add("has-content");
|
|
13441
|
+
}
|
|
13347
13442
|
}
|
|
13348
13443
|
}
|
|
13349
13444
|
|
|
13350
13445
|
if ($$self.$$.dirty &
|
|
13351
13446
|
/*transition*/
|
|
13352
|
-
|
|
13353
|
-
$$invalidate(
|
|
13447
|
+
32768) {
|
|
13448
|
+
$$invalidate(11, _transitionTime = transition === "none" ? 0 : transition === "slow" ? 400 : 200);
|
|
13354
13449
|
}
|
|
13355
13450
|
|
|
13356
13451
|
if ($$self.$$.dirty &
|
|
13357
13452
|
/*calloutvariant*/
|
|
13358
13453
|
8) {
|
|
13359
|
-
$$invalidate(
|
|
13454
|
+
$$invalidate(10, _iconType = calloutvariant === "emergency" ? "warning" : calloutvariant === "important" ? "alert-circle" : calloutvariant === "information" ? "information-circle" : calloutvariant === "success" ? "checkmark-circle" : calloutvariant === "event" ? "calendar" : "");
|
|
13360
13455
|
}
|
|
13361
13456
|
};
|
|
13362
13457
|
|
|
13363
|
-
return [heading, open, width, calloutvariant, _contentEl, _scrollEl, _isOpen, _rootEl, _isClosable, _iconType, _transitionTime, close, handleScroll, closable, transition, goa_scrollable_binding, div2_binding, div6_binding];
|
|
13458
|
+
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];
|
|
13364
13459
|
}
|
|
13365
13460
|
|
|
13366
13461
|
class Modal extends SvelteElement {
|
|
13367
13462
|
constructor(options) {
|
|
13368
13463
|
super();
|
|
13369
|
-
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;
|
|
13464
|
+
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>`;
|
|
13370
13465
|
init(this, {
|
|
13371
13466
|
target: this.shadowRoot,
|
|
13372
13467
|
props: attribute_to_object(this.attributes),
|
|
13373
13468
|
customElement: true
|
|
13374
13469
|
}, instance$g, create_fragment$i, safe_not_equal, {
|
|
13375
13470
|
heading: 0,
|
|
13376
|
-
closable:
|
|
13471
|
+
closable: 14,
|
|
13377
13472
|
open: 1,
|
|
13378
|
-
transition:
|
|
13473
|
+
transition: 15,
|
|
13379
13474
|
width: 2,
|
|
13380
13475
|
calloutvariant: 3
|
|
13381
13476
|
}, null);
|
|
@@ -13408,7 +13503,7 @@ class Modal extends SvelteElement {
|
|
|
13408
13503
|
}
|
|
13409
13504
|
|
|
13410
13505
|
get closable() {
|
|
13411
|
-
return this.$$.ctx[
|
|
13506
|
+
return this.$$.ctx[14];
|
|
13412
13507
|
}
|
|
13413
13508
|
|
|
13414
13509
|
set closable(closable) {
|
|
@@ -13430,7 +13525,7 @@ class Modal extends SvelteElement {
|
|
|
13430
13525
|
}
|
|
13431
13526
|
|
|
13432
13527
|
get transition() {
|
|
13433
|
-
return this.$$.ctx[
|
|
13528
|
+
return this.$$.ctx[15];
|
|
13434
13529
|
}
|
|
13435
13530
|
|
|
13436
13531
|
set transition(transition) {
|