@abgov/web-components 1.0.0-alpha.62 → 1.0.0-alpha.63
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/web-components.es.js +219 -83
- package/web-components.umd.js +26 -24
package/package.json
CHANGED
package/web-components.es.js
CHANGED
|
@@ -3849,11 +3849,12 @@ function create_if_block_1$8(ctx) {
|
|
|
3849
3849
|
};
|
|
3850
3850
|
}
|
|
3851
3851
|
|
|
3852
|
-
// (
|
|
3852
|
+
// (40:2) {#if _deletable}
|
|
3853
3853
|
function create_if_block$c(ctx) {
|
|
3854
3854
|
let goa_icon;
|
|
3855
|
-
let
|
|
3856
|
-
let
|
|
3855
|
+
let goa_icon_fillcolor_value;
|
|
3856
|
+
let goa_icon_hovercolor_value;
|
|
3857
|
+
let goa_icon_opacity_value;
|
|
3857
3858
|
|
|
3858
3859
|
return {
|
|
3859
3860
|
c() {
|
|
@@ -3861,23 +3862,40 @@ function create_if_block$c(ctx) {
|
|
|
3861
3862
|
set_custom_element_data(goa_icon, "class", "delete-icon");
|
|
3862
3863
|
set_custom_element_data(goa_icon, "size", "medium");
|
|
3863
3864
|
set_custom_element_data(goa_icon, "theme", "filled");
|
|
3864
|
-
set_custom_element_data(goa_icon, "fillcolor", "var(--color-gray-600)");
|
|
3865
|
-
set_custom_element_data(goa_icon, "hovercolor", "var(--goa-color-interactive--hover)");
|
|
3866
3865
|
set_custom_element_data(goa_icon, "type", "close-circle");
|
|
3866
|
+
|
|
3867
|
+
set_custom_element_data(goa_icon, "fillcolor", goa_icon_fillcolor_value = /*_error*/ ctx[4]
|
|
3868
|
+
? "var(--goa-color-status-emergency)"
|
|
3869
|
+
: "var(--color-gray-600)");
|
|
3870
|
+
|
|
3871
|
+
set_custom_element_data(goa_icon, "hovercolor", goa_icon_hovercolor_value = /*_error*/ ctx[4]
|
|
3872
|
+
? "var(--goa-color-status-emergency-dark)"
|
|
3873
|
+
: "var(--goa-color-interactive--hover)");
|
|
3874
|
+
|
|
3875
|
+
set_custom_element_data(goa_icon, "opacity", goa_icon_opacity_value = /*_error*/ ctx[4] ? /*_hovering*/ ctx[3] ? 1 : 0.5 : 1);
|
|
3867
3876
|
},
|
|
3868
3877
|
m(target, anchor) {
|
|
3869
3878
|
insert(target, goa_icon, anchor);
|
|
3879
|
+
},
|
|
3880
|
+
p(ctx, dirty) {
|
|
3881
|
+
if (dirty & /*_error*/ 16 && goa_icon_fillcolor_value !== (goa_icon_fillcolor_value = /*_error*/ ctx[4]
|
|
3882
|
+
? "var(--goa-color-status-emergency)"
|
|
3883
|
+
: "var(--color-gray-600)")) {
|
|
3884
|
+
set_custom_element_data(goa_icon, "fillcolor", goa_icon_fillcolor_value);
|
|
3885
|
+
}
|
|
3870
3886
|
|
|
3871
|
-
if (
|
|
3872
|
-
|
|
3873
|
-
|
|
3887
|
+
if (dirty & /*_error*/ 16 && goa_icon_hovercolor_value !== (goa_icon_hovercolor_value = /*_error*/ ctx[4]
|
|
3888
|
+
? "var(--goa-color-status-emergency-dark)"
|
|
3889
|
+
: "var(--goa-color-interactive--hover)")) {
|
|
3890
|
+
set_custom_element_data(goa_icon, "hovercolor", goa_icon_hovercolor_value);
|
|
3891
|
+
}
|
|
3892
|
+
|
|
3893
|
+
if (dirty & /*_error, _hovering*/ 24 && goa_icon_opacity_value !== (goa_icon_opacity_value = /*_error*/ ctx[4] ? /*_hovering*/ ctx[3] ? 1 : 0.5 : 1)) {
|
|
3894
|
+
set_custom_element_data(goa_icon, "opacity", goa_icon_opacity_value);
|
|
3874
3895
|
}
|
|
3875
3896
|
},
|
|
3876
|
-
p: noop,
|
|
3877
3897
|
d(detaching) {
|
|
3878
3898
|
if (detaching) detach(goa_icon);
|
|
3879
|
-
mounted = false;
|
|
3880
|
-
dispose();
|
|
3881
3899
|
}
|
|
3882
3900
|
};
|
|
3883
3901
|
}
|
|
@@ -3887,8 +3905,10 @@ function create_fragment$l(ctx) {
|
|
|
3887
3905
|
let t0;
|
|
3888
3906
|
let t1;
|
|
3889
3907
|
let t2;
|
|
3908
|
+
let mounted;
|
|
3909
|
+
let dispose;
|
|
3890
3910
|
let if_block0 = /*leadingicon*/ ctx[0] && create_if_block_1$8(ctx);
|
|
3891
|
-
let if_block1 = /*_deletable*/ ctx[
|
|
3911
|
+
let if_block1 = /*_deletable*/ ctx[5] && create_if_block$c(ctx);
|
|
3892
3912
|
|
|
3893
3913
|
return {
|
|
3894
3914
|
c() {
|
|
@@ -3899,8 +3919,11 @@ function create_fragment$l(ctx) {
|
|
|
3899
3919
|
t2 = space();
|
|
3900
3920
|
if (if_block1) if_block1.c();
|
|
3901
3921
|
this.c = noop;
|
|
3922
|
+
attr(div, "data-testid", "chip");
|
|
3902
3923
|
attr(div, "class", "chip");
|
|
3903
3924
|
attr(div, "tabindex", "0");
|
|
3925
|
+
toggle_class(div, "deletable", /*_deletable*/ ctx[5]);
|
|
3926
|
+
toggle_class(div, "error", /*_error*/ ctx[4]);
|
|
3904
3927
|
},
|
|
3905
3928
|
m(target, anchor) {
|
|
3906
3929
|
insert(target, div, anchor);
|
|
@@ -3909,6 +3932,19 @@ function create_fragment$l(ctx) {
|
|
|
3909
3932
|
append(div, t1);
|
|
3910
3933
|
append(div, t2);
|
|
3911
3934
|
if (if_block1) if_block1.m(div, null);
|
|
3935
|
+
/*div_binding*/ ctx[9](div);
|
|
3936
|
+
|
|
3937
|
+
if (!mounted) {
|
|
3938
|
+
dispose = [
|
|
3939
|
+
listen(div, "click", /*click_handler*/ ctx[10]),
|
|
3940
|
+
listen(div, "mouseover", /*mouseover_handler*/ ctx[11]),
|
|
3941
|
+
listen(div, "mouseout", /*mouseout_handler*/ ctx[12]),
|
|
3942
|
+
listen(div, "focus", /*focus_handler*/ ctx[13]),
|
|
3943
|
+
listen(div, "blur", /*blur_handler*/ ctx[14])
|
|
3944
|
+
];
|
|
3945
|
+
|
|
3946
|
+
mounted = true;
|
|
3947
|
+
}
|
|
3912
3948
|
},
|
|
3913
3949
|
p(ctx, [dirty]) {
|
|
3914
3950
|
if (/*leadingicon*/ ctx[0]) {
|
|
@@ -3926,11 +3962,11 @@ function create_fragment$l(ctx) {
|
|
|
3926
3962
|
|
|
3927
3963
|
if (dirty & /*content*/ 2) set_data(t1, /*content*/ ctx[1]);
|
|
3928
3964
|
|
|
3929
|
-
if (/*_deletable*/ ctx[
|
|
3965
|
+
if (/*_deletable*/ ctx[5]) {
|
|
3930
3966
|
if (if_block1) {
|
|
3931
3967
|
if_block1.p(ctx, dirty);
|
|
3932
3968
|
} else {
|
|
3933
|
-
if_block1 = create_if_block$c();
|
|
3969
|
+
if_block1 = create_if_block$c(ctx);
|
|
3934
3970
|
if_block1.c();
|
|
3935
3971
|
if_block1.m(div, null);
|
|
3936
3972
|
}
|
|
@@ -3938,6 +3974,14 @@ function create_fragment$l(ctx) {
|
|
|
3938
3974
|
if_block1.d(1);
|
|
3939
3975
|
if_block1 = null;
|
|
3940
3976
|
}
|
|
3977
|
+
|
|
3978
|
+
if (dirty & /*_deletable*/ 32) {
|
|
3979
|
+
toggle_class(div, "deletable", /*_deletable*/ ctx[5]);
|
|
3980
|
+
}
|
|
3981
|
+
|
|
3982
|
+
if (dirty & /*_error*/ 16) {
|
|
3983
|
+
toggle_class(div, "error", /*_error*/ ctx[4]);
|
|
3984
|
+
}
|
|
3941
3985
|
},
|
|
3942
3986
|
i: noop,
|
|
3943
3987
|
o: noop,
|
|
@@ -3945,45 +3989,84 @@ function create_fragment$l(ctx) {
|
|
|
3945
3989
|
if (detaching) detach(div);
|
|
3946
3990
|
if (if_block0) if_block0.d();
|
|
3947
3991
|
if (if_block1) if_block1.d();
|
|
3992
|
+
/*div_binding*/ ctx[9](null);
|
|
3993
|
+
mounted = false;
|
|
3994
|
+
run_all(dispose);
|
|
3948
3995
|
}
|
|
3949
3996
|
};
|
|
3950
3997
|
}
|
|
3951
3998
|
|
|
3952
|
-
function onDelete(e) {
|
|
3953
|
-
this.dispatchEvent(new CustomEvent("_onDeleteIconClick", { composed: true, bubbles: true }));
|
|
3954
|
-
e.stopPropagation();
|
|
3955
|
-
}
|
|
3956
|
-
|
|
3957
3999
|
function instance$k($$self, $$props, $$invalidate) {
|
|
3958
|
-
let { leadingicon } = $$props;
|
|
3959
|
-
let { error } = $$props;
|
|
3960
|
-
let { deletable } = $$props;
|
|
4000
|
+
let { leadingicon = null } = $$props;
|
|
4001
|
+
let { error = "false" } = $$props;
|
|
4002
|
+
let { deletable = "false" } = $$props;
|
|
3961
4003
|
let { content } = $$props;
|
|
4004
|
+
let el;
|
|
4005
|
+
let _hovering = false;
|
|
4006
|
+
|
|
4007
|
+
// booleans
|
|
4008
|
+
let _error;
|
|
3962
4009
|
|
|
3963
4010
|
let _deletable;
|
|
3964
4011
|
|
|
4012
|
+
function onDelete(e) {
|
|
4013
|
+
el.dispatchEvent(new CustomEvent("_click", { composed: true, bubbles: true }));
|
|
4014
|
+
e.stopPropagation();
|
|
4015
|
+
}
|
|
4016
|
+
|
|
4017
|
+
function div_binding($$value) {
|
|
4018
|
+
binding_callbacks[$$value ? 'unshift' : 'push'](() => {
|
|
4019
|
+
el = $$value;
|
|
4020
|
+
$$invalidate(2, el);
|
|
4021
|
+
});
|
|
4022
|
+
}
|
|
4023
|
+
|
|
4024
|
+
const click_handler = e => _deletable && onDelete(e);
|
|
4025
|
+
const mouseover_handler = () => $$invalidate(3, _hovering = true);
|
|
4026
|
+
const mouseout_handler = () => $$invalidate(3, _hovering = false);
|
|
4027
|
+
const focus_handler = () => $$invalidate(3, _hovering = true);
|
|
4028
|
+
const blur_handler = () => $$invalidate(3, _hovering = false);
|
|
4029
|
+
|
|
3965
4030
|
$$self.$$set = $$props => {
|
|
3966
4031
|
if ('leadingicon' in $$props) $$invalidate(0, leadingicon = $$props.leadingicon);
|
|
3967
|
-
if ('error' in $$props) $$invalidate(
|
|
3968
|
-
if ('deletable' in $$props) $$invalidate(
|
|
4032
|
+
if ('error' in $$props) $$invalidate(7, error = $$props.error);
|
|
4033
|
+
if ('deletable' in $$props) $$invalidate(8, deletable = $$props.deletable);
|
|
3969
4034
|
if ('content' in $$props) $$invalidate(1, content = $$props.content);
|
|
3970
4035
|
};
|
|
3971
4036
|
|
|
3972
4037
|
$$self.$$.update = () => {
|
|
3973
|
-
if ($$self.$$.dirty & /*error*/
|
|
4038
|
+
if ($$self.$$.dirty & /*error*/ 128) {
|
|
4039
|
+
$$invalidate(4, _error = toBoolean(error));
|
|
4040
|
+
}
|
|
3974
4041
|
|
|
3975
|
-
if ($$self.$$.dirty & /*deletable*/
|
|
3976
|
-
$$invalidate(
|
|
4042
|
+
if ($$self.$$.dirty & /*deletable*/ 256) {
|
|
4043
|
+
$$invalidate(5, _deletable = toBoolean(deletable));
|
|
3977
4044
|
}
|
|
3978
4045
|
};
|
|
3979
4046
|
|
|
3980
|
-
return [
|
|
4047
|
+
return [
|
|
4048
|
+
leadingicon,
|
|
4049
|
+
content,
|
|
4050
|
+
el,
|
|
4051
|
+
_hovering,
|
|
4052
|
+
_error,
|
|
4053
|
+
_deletable,
|
|
4054
|
+
onDelete,
|
|
4055
|
+
error,
|
|
4056
|
+
deletable,
|
|
4057
|
+
div_binding,
|
|
4058
|
+
click_handler,
|
|
4059
|
+
mouseover_handler,
|
|
4060
|
+
mouseout_handler,
|
|
4061
|
+
focus_handler,
|
|
4062
|
+
blur_handler
|
|
4063
|
+
];
|
|
3981
4064
|
}
|
|
3982
4065
|
|
|
3983
4066
|
class Chip extends SvelteElement {
|
|
3984
4067
|
constructor(options) {
|
|
3985
4068
|
super();
|
|
3986
|
-
this.shadowRoot.innerHTML = `<style>.leading-icon{margin-left:-0.25rem}.chip{vertical-align:middle;align-items:center;background-color:var(--color-gray-100);border-radius:99px;box-sizing:border-box;color:var(--goa-color-text);display:inline-flex;flex-direction:row;font-size:var(--
|
|
4069
|
+
this.shadowRoot.innerHTML = `<style>.leading-icon{margin-left:-0.25rem}.chip{vertical-align:middle;align-items:center;background-color:var(--color-gray-100);border-radius:99px;box-sizing:border-box;color:var(--goa-color-text);display:inline-flex;flex-direction:row;font-size:var(--chip-font-size);font-weight:var(--fw-regular);gap:0.25rem;height:2rem;justify-content:center;margin:0.25rem;padding:0 0.75rem}.chip:hover{background-color:var(--color-gray-200)}.chip:focus{outline:2px solid var(--goa-color-interactive--focus)}.deletable{cursor:pointer}.delete-icon{margin-right:-0.25rem}.error,.error:hover{background-color:var(--goa-color-status-emergency-light)}</style>`;
|
|
3987
4070
|
|
|
3988
4071
|
init(
|
|
3989
4072
|
this,
|
|
@@ -3997,8 +4080,8 @@ class Chip extends SvelteElement {
|
|
|
3997
4080
|
safe_not_equal,
|
|
3998
4081
|
{
|
|
3999
4082
|
leadingicon: 0,
|
|
4000
|
-
error:
|
|
4001
|
-
deletable:
|
|
4083
|
+
error: 7,
|
|
4084
|
+
deletable: 8,
|
|
4002
4085
|
content: 1
|
|
4003
4086
|
},
|
|
4004
4087
|
null
|
|
@@ -4030,7 +4113,7 @@ class Chip extends SvelteElement {
|
|
|
4030
4113
|
}
|
|
4031
4114
|
|
|
4032
4115
|
get error() {
|
|
4033
|
-
return this.$$.ctx[
|
|
4116
|
+
return this.$$.ctx[7];
|
|
4034
4117
|
}
|
|
4035
4118
|
|
|
4036
4119
|
set error(error) {
|
|
@@ -4039,7 +4122,7 @@ class Chip extends SvelteElement {
|
|
|
4039
4122
|
}
|
|
4040
4123
|
|
|
4041
4124
|
get deletable() {
|
|
4042
|
-
return this.$$.ctx[
|
|
4125
|
+
return this.$$.ctx[8];
|
|
4043
4126
|
}
|
|
4044
4127
|
|
|
4045
4128
|
set deletable(deletable) {
|
|
@@ -5497,12 +5580,13 @@ function create_fragment$e(ctx) {
|
|
|
5497
5580
|
attr(div, "data-testid", div_data_testid_value = `icon-${/*type*/ ctx[0]}`);
|
|
5498
5581
|
|
|
5499
5582
|
attr(div, "style", div_style_value = `
|
|
5500
|
-
--size: ${/*_size*/ ctx[
|
|
5583
|
+
--size: ${/*_size*/ ctx[5]};
|
|
5501
5584
|
--fill-color: ${/*fillcolor*/ ctx[2]};
|
|
5502
5585
|
--hover-color: ${/*hovercolor*/ ctx[3]};
|
|
5586
|
+
--opacity: ${/*opacity*/ ctx[4]};
|
|
5503
5587
|
`);
|
|
5504
5588
|
|
|
5505
|
-
toggle_class(div, "inverted", /*isInverted*/ ctx[
|
|
5589
|
+
toggle_class(div, "inverted", /*isInverted*/ ctx[6]);
|
|
5506
5590
|
},
|
|
5507
5591
|
m(target, anchor) {
|
|
5508
5592
|
insert(target, div, anchor);
|
|
@@ -5526,16 +5610,17 @@ function create_fragment$e(ctx) {
|
|
|
5526
5610
|
attr(div, "data-testid", div_data_testid_value);
|
|
5527
5611
|
}
|
|
5528
5612
|
|
|
5529
|
-
if (dirty & /*_size, fillcolor, hovercolor*/
|
|
5530
|
-
--size: ${/*_size*/ ctx[
|
|
5613
|
+
if (dirty & /*_size, fillcolor, hovercolor, opacity*/ 60 && div_style_value !== (div_style_value = `
|
|
5614
|
+
--size: ${/*_size*/ ctx[5]};
|
|
5531
5615
|
--fill-color: ${/*fillcolor*/ ctx[2]};
|
|
5532
5616
|
--hover-color: ${/*hovercolor*/ ctx[3]};
|
|
5617
|
+
--opacity: ${/*opacity*/ ctx[4]};
|
|
5533
5618
|
`)) {
|
|
5534
5619
|
attr(div, "style", div_style_value);
|
|
5535
5620
|
}
|
|
5536
5621
|
|
|
5537
|
-
if (dirty & /*isInverted*/
|
|
5538
|
-
toggle_class(div, "inverted", /*isInverted*/ ctx[
|
|
5622
|
+
if (dirty & /*isInverted*/ 64) {
|
|
5623
|
+
toggle_class(div, "inverted", /*isInverted*/ ctx[6]);
|
|
5539
5624
|
}
|
|
5540
5625
|
},
|
|
5541
5626
|
i: noop,
|
|
@@ -5556,23 +5641,25 @@ function instance$d($$self, $$props, $$invalidate) {
|
|
|
5556
5641
|
let { inverted } = $$props;
|
|
5557
5642
|
let { fillcolor } = $$props;
|
|
5558
5643
|
let { hovercolor } = $$props;
|
|
5644
|
+
let { opacity = 1 } = $$props;
|
|
5559
5645
|
|
|
5560
5646
|
$$self.$$set = $$props => {
|
|
5561
5647
|
if ('type' in $$props) $$invalidate(0, type = $$props.type);
|
|
5562
|
-
if ('size' in $$props) $$invalidate(
|
|
5648
|
+
if ('size' in $$props) $$invalidate(7, size = $$props.size);
|
|
5563
5649
|
if ('theme' in $$props) $$invalidate(1, theme = $$props.theme);
|
|
5564
|
-
if ('inverted' in $$props) $$invalidate(
|
|
5650
|
+
if ('inverted' in $$props) $$invalidate(8, inverted = $$props.inverted);
|
|
5565
5651
|
if ('fillcolor' in $$props) $$invalidate(2, fillcolor = $$props.fillcolor);
|
|
5566
5652
|
if ('hovercolor' in $$props) $$invalidate(3, hovercolor = $$props.hovercolor);
|
|
5653
|
+
if ('opacity' in $$props) $$invalidate(4, opacity = $$props.opacity);
|
|
5567
5654
|
};
|
|
5568
5655
|
|
|
5569
5656
|
$$self.$$.update = () => {
|
|
5570
|
-
if ($$self.$$.dirty & /*inverted*/
|
|
5571
|
-
$$invalidate(
|
|
5657
|
+
if ($$self.$$.dirty & /*inverted*/ 256) {
|
|
5658
|
+
$$invalidate(6, isInverted = toBoolean(inverted));
|
|
5572
5659
|
}
|
|
5573
5660
|
|
|
5574
|
-
if ($$self.$$.dirty & /*size*/
|
|
5575
|
-
$$invalidate(
|
|
5661
|
+
if ($$self.$$.dirty & /*size*/ 128) {
|
|
5662
|
+
$$invalidate(5, _size = ({
|
|
5576
5663
|
small: "1.25rem",
|
|
5577
5664
|
medium: "1.5rem",
|
|
5578
5665
|
large: "2rem"
|
|
@@ -5580,13 +5667,13 @@ function instance$d($$self, $$props, $$invalidate) {
|
|
|
5580
5667
|
}
|
|
5581
5668
|
};
|
|
5582
5669
|
|
|
5583
|
-
return [type, theme, fillcolor, hovercolor, _size, isInverted, size, inverted];
|
|
5670
|
+
return [type, theme, fillcolor, hovercolor, opacity, _size, isInverted, size, inverted];
|
|
5584
5671
|
}
|
|
5585
5672
|
|
|
5586
5673
|
class Icon extends SvelteElement {
|
|
5587
5674
|
constructor(options) {
|
|
5588
5675
|
super();
|
|
5589
|
-
this.shadowRoot.innerHTML = `<style>:host{display:inline-flex;align-items:center}.goa-icon{width:var(--size);height:var(--size);fill:var(--fill-color);color:var(--fill-color);display:inline-flex;align-items:center;justify-content:center}.goa-icon:hover ion-icon{fill:var(--hover-color);color:var(--hover-color)}.inverted{color:#fff;fill:#fff}</style>`;
|
|
5676
|
+
this.shadowRoot.innerHTML = `<style>:host{display:inline-flex;align-items:center}.goa-icon{width:var(--size);height:var(--size);fill:var(--fill-color);color:var(--fill-color);opacity:var(--opacity);display:inline-flex;align-items:center;justify-content:center}.goa-icon:hover ion-icon{fill:var(--hover-color);color:var(--hover-color)}.inverted{color:#fff;fill:#fff}</style>`;
|
|
5590
5677
|
|
|
5591
5678
|
init(
|
|
5592
5679
|
this,
|
|
@@ -5600,11 +5687,12 @@ class Icon extends SvelteElement {
|
|
|
5600
5687
|
safe_not_equal,
|
|
5601
5688
|
{
|
|
5602
5689
|
type: 0,
|
|
5603
|
-
size:
|
|
5690
|
+
size: 7,
|
|
5604
5691
|
theme: 1,
|
|
5605
|
-
inverted:
|
|
5692
|
+
inverted: 8,
|
|
5606
5693
|
fillcolor: 2,
|
|
5607
|
-
hovercolor: 3
|
|
5694
|
+
hovercolor: 3,
|
|
5695
|
+
opacity: 4
|
|
5608
5696
|
},
|
|
5609
5697
|
null
|
|
5610
5698
|
);
|
|
@@ -5622,7 +5710,7 @@ class Icon extends SvelteElement {
|
|
|
5622
5710
|
}
|
|
5623
5711
|
|
|
5624
5712
|
static get observedAttributes() {
|
|
5625
|
-
return ["type", "size", "theme", "inverted", "fillcolor", "hovercolor"];
|
|
5713
|
+
return ["type", "size", "theme", "inverted", "fillcolor", "hovercolor", "opacity"];
|
|
5626
5714
|
}
|
|
5627
5715
|
|
|
5628
5716
|
get type() {
|
|
@@ -5635,7 +5723,7 @@ class Icon extends SvelteElement {
|
|
|
5635
5723
|
}
|
|
5636
5724
|
|
|
5637
5725
|
get size() {
|
|
5638
|
-
return this.$$.ctx[
|
|
5726
|
+
return this.$$.ctx[7];
|
|
5639
5727
|
}
|
|
5640
5728
|
|
|
5641
5729
|
set size(size) {
|
|
@@ -5653,7 +5741,7 @@ class Icon extends SvelteElement {
|
|
|
5653
5741
|
}
|
|
5654
5742
|
|
|
5655
5743
|
get inverted() {
|
|
5656
|
-
return this.$$.ctx[
|
|
5744
|
+
return this.$$.ctx[8];
|
|
5657
5745
|
}
|
|
5658
5746
|
|
|
5659
5747
|
set inverted(inverted) {
|
|
@@ -5678,6 +5766,15 @@ class Icon extends SvelteElement {
|
|
|
5678
5766
|
this.$$set({ hovercolor });
|
|
5679
5767
|
flush();
|
|
5680
5768
|
}
|
|
5769
|
+
|
|
5770
|
+
get opacity() {
|
|
5771
|
+
return this.$$.ctx[4];
|
|
5772
|
+
}
|
|
5773
|
+
|
|
5774
|
+
set opacity(opacity) {
|
|
5775
|
+
this.$$set({ opacity });
|
|
5776
|
+
flush();
|
|
5777
|
+
}
|
|
5681
5778
|
}
|
|
5682
5779
|
|
|
5683
5780
|
customElements.define("goa-icon", Icon);
|
|
@@ -6743,7 +6840,7 @@ function fly(node, { delay = 0, duration = 400, easing = cubicOut, x = 0, y = 0,
|
|
|
6743
6840
|
};
|
|
6744
6841
|
}
|
|
6745
6842
|
|
|
6746
|
-
function noScroll(
|
|
6843
|
+
function noScroll(_node, opts) {
|
|
6747
6844
|
function hideScrollbars() {
|
|
6748
6845
|
const scrollbarWidth = calculateScrollbarWidth();
|
|
6749
6846
|
document.body.style.overflow = "hidden";
|
|
@@ -6753,7 +6850,7 @@ function noScroll(node, opts) {
|
|
|
6753
6850
|
setTimeout(() => {
|
|
6754
6851
|
document.body.style.overflow = "";
|
|
6755
6852
|
document.body.style.paddingRight = "0";
|
|
6756
|
-
},
|
|
6853
|
+
}, 200);
|
|
6757
6854
|
}
|
|
6758
6855
|
function calculateScrollbarWidth() {
|
|
6759
6856
|
if (document.body.clientHeight <= document.documentElement.clientHeight) {
|
|
@@ -6813,7 +6910,7 @@ function create_if_block$7(ctx) {
|
|
|
6813
6910
|
let if_block1 = /*isClosable*/ ctx[4] && create_if_block_2$3(ctx);
|
|
6814
6911
|
|
|
6815
6912
|
function select_block_type(ctx, dirty) {
|
|
6816
|
-
if (/*isScrollable*/ ctx[
|
|
6913
|
+
if (/*isScrollable*/ ctx[6]) return create_if_block_1$5;
|
|
6817
6914
|
return create_else_block$1;
|
|
6818
6915
|
}
|
|
6819
6916
|
|
|
@@ -6867,14 +6964,16 @@ function create_if_block$7(ctx) {
|
|
|
6867
6964
|
|
|
6868
6965
|
if (!mounted) {
|
|
6869
6966
|
dispose = [
|
|
6870
|
-
listen(div0, "click", /*close*/ ctx[
|
|
6967
|
+
listen(div0, "click", /*close*/ ctx[7]),
|
|
6871
6968
|
action_destroyer(noscroll_action = noScroll.call(null, div4, { enable: /*isOpen*/ ctx[2] }))
|
|
6872
6969
|
];
|
|
6873
6970
|
|
|
6874
6971
|
mounted = true;
|
|
6875
6972
|
}
|
|
6876
6973
|
},
|
|
6877
|
-
p(
|
|
6974
|
+
p(new_ctx, dirty) {
|
|
6975
|
+
ctx = new_ctx;
|
|
6976
|
+
|
|
6878
6977
|
if (/*heading*/ ctx[0]) {
|
|
6879
6978
|
if (if_block0) {
|
|
6880
6979
|
if_block0.p(ctx, dirty);
|
|
@@ -6922,13 +7021,18 @@ function create_if_block$7(ctx) {
|
|
|
6922
7021
|
|
|
6923
7022
|
add_render_callback(() => {
|
|
6924
7023
|
if (div3_outro) div3_outro.end(1);
|
|
6925
|
-
|
|
7024
|
+
|
|
7025
|
+
div3_intro = create_in_transition(div3, fly, {
|
|
7026
|
+
duration: /*_transitionTime*/ ctx[5],
|
|
7027
|
+
y: 200
|
|
7028
|
+
});
|
|
7029
|
+
|
|
6926
7030
|
div3_intro.start();
|
|
6927
7031
|
});
|
|
6928
7032
|
|
|
6929
7033
|
add_render_callback(() => {
|
|
6930
7034
|
if (div4_outro) div4_outro.end(1);
|
|
6931
|
-
div4_intro = create_in_transition(div4, fade, { duration:
|
|
7035
|
+
div4_intro = create_in_transition(div4, fade, { duration: /*_transitionTime*/ ctx[5] });
|
|
6932
7036
|
div4_intro.start();
|
|
6933
7037
|
});
|
|
6934
7038
|
|
|
@@ -6936,9 +7040,20 @@ function create_if_block$7(ctx) {
|
|
|
6936
7040
|
},
|
|
6937
7041
|
o(local) {
|
|
6938
7042
|
if (div3_intro) div3_intro.invalidate();
|
|
6939
|
-
|
|
7043
|
+
|
|
7044
|
+
div3_outro = create_out_transition(div3, fly, {
|
|
7045
|
+
delay: /*_transitionTime*/ ctx[5],
|
|
7046
|
+
duration: /*_transitionTime*/ ctx[5],
|
|
7047
|
+
y: -100
|
|
7048
|
+
});
|
|
7049
|
+
|
|
6940
7050
|
if (div4_intro) div4_intro.invalidate();
|
|
6941
|
-
|
|
7051
|
+
|
|
7052
|
+
div4_outro = create_out_transition(div4, fade, {
|
|
7053
|
+
delay: /*_transitionTime*/ ctx[5],
|
|
7054
|
+
duration: /*_transitionTime*/ ctx[5]
|
|
7055
|
+
});
|
|
7056
|
+
|
|
6942
7057
|
current = false;
|
|
6943
7058
|
},
|
|
6944
7059
|
d(detaching) {
|
|
@@ -6954,7 +7069,7 @@ function create_if_block$7(ctx) {
|
|
|
6954
7069
|
};
|
|
6955
7070
|
}
|
|
6956
7071
|
|
|
6957
|
-
// (
|
|
7072
|
+
// (60:6) {#if heading}
|
|
6958
7073
|
function create_if_block_3$2(ctx) {
|
|
6959
7074
|
let div;
|
|
6960
7075
|
let t;
|
|
@@ -6979,7 +7094,7 @@ function create_if_block_3$2(ctx) {
|
|
|
6979
7094
|
};
|
|
6980
7095
|
}
|
|
6981
7096
|
|
|
6982
|
-
// (
|
|
7097
|
+
// (63:6) {#if isClosable}
|
|
6983
7098
|
function create_if_block_2$3(ctx) {
|
|
6984
7099
|
let div;
|
|
6985
7100
|
let goa_icon_button;
|
|
@@ -6999,7 +7114,7 @@ function create_if_block_2$3(ctx) {
|
|
|
6999
7114
|
append(div, goa_icon_button);
|
|
7000
7115
|
|
|
7001
7116
|
if (!mounted) {
|
|
7002
|
-
dispose = listen(goa_icon_button, "click", /*close*/ ctx[
|
|
7117
|
+
dispose = listen(goa_icon_button, "click", /*close*/ ctx[7]);
|
|
7003
7118
|
mounted = true;
|
|
7004
7119
|
}
|
|
7005
7120
|
},
|
|
@@ -7012,7 +7127,7 @@ function create_if_block_2$3(ctx) {
|
|
|
7012
7127
|
};
|
|
7013
7128
|
}
|
|
7014
7129
|
|
|
7015
|
-
// (
|
|
7130
|
+
// (77:8) {:else}
|
|
7016
7131
|
function create_else_block$1(ctx) {
|
|
7017
7132
|
let div;
|
|
7018
7133
|
|
|
@@ -7031,7 +7146,7 @@ function create_else_block$1(ctx) {
|
|
|
7031
7146
|
};
|
|
7032
7147
|
}
|
|
7033
7148
|
|
|
7034
|
-
// (
|
|
7149
|
+
// (73:8) {#if isScrollable}
|
|
7035
7150
|
function create_if_block_1$5(ctx) {
|
|
7036
7151
|
let goa_scrollable;
|
|
7037
7152
|
|
|
@@ -7112,10 +7227,12 @@ function instance$a($$self, $$props, $$invalidate) {
|
|
|
7112
7227
|
let isClosable;
|
|
7113
7228
|
let isScrollable;
|
|
7114
7229
|
let isOpen;
|
|
7230
|
+
let _transitionTime;
|
|
7115
7231
|
let { heading } = $$props;
|
|
7116
7232
|
let { closable } = $$props;
|
|
7117
7233
|
let { scrollable } = $$props;
|
|
7118
7234
|
let { open } = $$props;
|
|
7235
|
+
let { transition } = $$props;
|
|
7119
7236
|
let { width } = $$props;
|
|
7120
7237
|
let scrollOffset = 0;
|
|
7121
7238
|
|
|
@@ -7130,22 +7247,23 @@ function instance$a($$self, $$props, $$invalidate) {
|
|
|
7130
7247
|
|
|
7131
7248
|
$$self.$$set = $$props => {
|
|
7132
7249
|
if ('heading' in $$props) $$invalidate(0, heading = $$props.heading);
|
|
7133
|
-
if ('closable' in $$props) $$invalidate(
|
|
7134
|
-
if ('scrollable' in $$props) $$invalidate(
|
|
7135
|
-
if ('open' in $$props) $$invalidate(
|
|
7250
|
+
if ('closable' in $$props) $$invalidate(8, closable = $$props.closable);
|
|
7251
|
+
if ('scrollable' in $$props) $$invalidate(9, scrollable = $$props.scrollable);
|
|
7252
|
+
if ('open' in $$props) $$invalidate(10, open = $$props.open);
|
|
7253
|
+
if ('transition' in $$props) $$invalidate(11, transition = $$props.transition);
|
|
7136
7254
|
if ('width' in $$props) $$invalidate(1, width = $$props.width);
|
|
7137
7255
|
};
|
|
7138
7256
|
|
|
7139
7257
|
$$self.$$.update = () => {
|
|
7140
|
-
if ($$self.$$.dirty & /*closable*/
|
|
7258
|
+
if ($$self.$$.dirty & /*closable*/ 256) {
|
|
7141
7259
|
$$invalidate(4, isClosable = toBoolean(closable));
|
|
7142
7260
|
}
|
|
7143
7261
|
|
|
7144
|
-
if ($$self.$$.dirty & /*scrollable*/
|
|
7145
|
-
$$invalidate(
|
|
7262
|
+
if ($$self.$$.dirty & /*scrollable*/ 512) {
|
|
7263
|
+
$$invalidate(6, isScrollable = toBoolean(scrollable));
|
|
7146
7264
|
}
|
|
7147
7265
|
|
|
7148
|
-
if ($$self.$$.dirty & /*open*/
|
|
7266
|
+
if ($$self.$$.dirty & /*open*/ 1024) {
|
|
7149
7267
|
$$invalidate(2, isOpen = toBoolean(open));
|
|
7150
7268
|
}
|
|
7151
7269
|
|
|
@@ -7156,6 +7274,12 @@ function instance$a($$self, $$props, $$invalidate) {
|
|
|
7156
7274
|
}
|
|
7157
7275
|
}
|
|
7158
7276
|
}
|
|
7277
|
+
|
|
7278
|
+
if ($$self.$$.dirty & /*transition*/ 2048) {
|
|
7279
|
+
$$invalidate(5, _transitionTime = transition === "none"
|
|
7280
|
+
? 0
|
|
7281
|
+
: transition === "slow" ? 400 : 200);
|
|
7282
|
+
}
|
|
7159
7283
|
};
|
|
7160
7284
|
|
|
7161
7285
|
return [
|
|
@@ -7164,18 +7288,20 @@ function instance$a($$self, $$props, $$invalidate) {
|
|
|
7164
7288
|
isOpen,
|
|
7165
7289
|
scrollOffset,
|
|
7166
7290
|
isClosable,
|
|
7291
|
+
_transitionTime,
|
|
7167
7292
|
isScrollable,
|
|
7168
7293
|
close,
|
|
7169
7294
|
closable,
|
|
7170
7295
|
scrollable,
|
|
7171
|
-
open
|
|
7296
|
+
open,
|
|
7297
|
+
transition
|
|
7172
7298
|
];
|
|
7173
7299
|
}
|
|
7174
7300
|
|
|
7175
7301
|
class Modal extends SvelteElement {
|
|
7176
7302
|
constructor(options) {
|
|
7177
7303
|
super();
|
|
7178
|
-
this.shadowRoot.innerHTML = `<style>:host{box-sizing:border-box;font-family:var(--font-family)}.modal{font-family:var(--font-family);position:absolute;top:var(--scroll-offset, 0);left: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}.modal-pane{position:relative;background-color:#fff;z-index:1001;width:
|
|
7304
|
+
this.shadowRoot.innerHTML = `<style>:host{box-sizing:border-box;font-family:var(--font-family)}.modal{font-family:var(--font-family);position:absolute;top:var(--scroll-offset, 0);left: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}.modal-pane{position:relative;background-color:#fff;z-index:1001;width:90%;margin:1rem;box-shadow:var(--shadow-2);border-radius:4px;max-height:90%}@media(min-width: 640px){.modal-pane{width:var(--width, 60ch);max-height:80%}}.modal-actions{text-align:right;padding:0 1.75rem;margin:1.75rem 0;flex:1 1 auto}.modal-close{position:absolute;top:1rem;right:1rem}.modal-title{font-size:var(--fs-xl);padding-bottom:1rem;padding:0 1.75rem;margin:1.75rem 0;margin-right:40px;flex:0 0 auto}</style>`;
|
|
7179
7305
|
|
|
7180
7306
|
init(
|
|
7181
7307
|
this,
|
|
@@ -7189,9 +7315,10 @@ class Modal extends SvelteElement {
|
|
|
7189
7315
|
safe_not_equal,
|
|
7190
7316
|
{
|
|
7191
7317
|
heading: 0,
|
|
7192
|
-
closable:
|
|
7193
|
-
scrollable:
|
|
7194
|
-
open:
|
|
7318
|
+
closable: 8,
|
|
7319
|
+
scrollable: 9,
|
|
7320
|
+
open: 10,
|
|
7321
|
+
transition: 11,
|
|
7195
7322
|
width: 1
|
|
7196
7323
|
},
|
|
7197
7324
|
null
|
|
@@ -7210,7 +7337,7 @@ class Modal extends SvelteElement {
|
|
|
7210
7337
|
}
|
|
7211
7338
|
|
|
7212
7339
|
static get observedAttributes() {
|
|
7213
|
-
return ["heading", "closable", "scrollable", "open", "width"];
|
|
7340
|
+
return ["heading", "closable", "scrollable", "open", "transition", "width"];
|
|
7214
7341
|
}
|
|
7215
7342
|
|
|
7216
7343
|
get heading() {
|
|
@@ -7223,7 +7350,7 @@ class Modal extends SvelteElement {
|
|
|
7223
7350
|
}
|
|
7224
7351
|
|
|
7225
7352
|
get closable() {
|
|
7226
|
-
return this.$$.ctx[
|
|
7353
|
+
return this.$$.ctx[8];
|
|
7227
7354
|
}
|
|
7228
7355
|
|
|
7229
7356
|
set closable(closable) {
|
|
@@ -7232,7 +7359,7 @@ class Modal extends SvelteElement {
|
|
|
7232
7359
|
}
|
|
7233
7360
|
|
|
7234
7361
|
get scrollable() {
|
|
7235
|
-
return this.$$.ctx[
|
|
7362
|
+
return this.$$.ctx[9];
|
|
7236
7363
|
}
|
|
7237
7364
|
|
|
7238
7365
|
set scrollable(scrollable) {
|
|
@@ -7241,7 +7368,7 @@ class Modal extends SvelteElement {
|
|
|
7241
7368
|
}
|
|
7242
7369
|
|
|
7243
7370
|
get open() {
|
|
7244
|
-
return this.$$.ctx[
|
|
7371
|
+
return this.$$.ctx[10];
|
|
7245
7372
|
}
|
|
7246
7373
|
|
|
7247
7374
|
set open(open) {
|
|
@@ -7249,6 +7376,15 @@ class Modal extends SvelteElement {
|
|
|
7249
7376
|
flush();
|
|
7250
7377
|
}
|
|
7251
7378
|
|
|
7379
|
+
get transition() {
|
|
7380
|
+
return this.$$.ctx[11];
|
|
7381
|
+
}
|
|
7382
|
+
|
|
7383
|
+
set transition(transition) {
|
|
7384
|
+
this.$$set({ transition });
|
|
7385
|
+
flush();
|
|
7386
|
+
}
|
|
7387
|
+
|
|
7252
7388
|
get width() {
|
|
7253
7389
|
return this.$$.ctx[1];
|
|
7254
7390
|
}
|