@abgov/react-components 4.0.0-alpha.33 → 4.0.0-alpha.36
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/experimental/package.json +2 -1
- package/index.d.ts +2 -2
- package/lib/badge/badge.d.ts +4 -5
- package/lib/button/button.d.ts +1 -1
- package/lib/input/input.d.ts +18 -17
- package/lib/microsite-header/microsite-header.d.ts +2 -2
- package/package.json +5 -3
- package/react-components.esm.js +268 -134
- package/react-components.umd.js +263 -139
package/react-components.esm.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
2
|
import { useRef, useEffect } from 'react';
|
|
3
|
+
import { format } from 'date-fns';
|
|
3
4
|
|
|
4
5
|
function noop() {}
|
|
5
6
|
|
|
@@ -1453,7 +1454,7 @@ function create_else_block$3(ctx) {
|
|
|
1453
1454
|
}
|
|
1454
1455
|
|
|
1455
1456
|
};
|
|
1456
|
-
} // (
|
|
1457
|
+
} // (40:2) {#if showIcon}
|
|
1457
1458
|
|
|
1458
1459
|
|
|
1459
1460
|
function create_if_block_1$b(ctx) {
|
|
@@ -1486,7 +1487,7 @@ function create_if_block_1$b(ctx) {
|
|
|
1486
1487
|
}
|
|
1487
1488
|
|
|
1488
1489
|
};
|
|
1489
|
-
} // (
|
|
1490
|
+
} // (45:2) {#if content}
|
|
1490
1491
|
|
|
1491
1492
|
|
|
1492
1493
|
function create_if_block$i(ctx) {
|
|
@@ -1674,10 +1675,9 @@ function instance$x($$self, $$props, $$invalidate) {
|
|
|
1674
1675
|
1) {
|
|
1675
1676
|
$$invalidate(4, iconType = {
|
|
1676
1677
|
success: "checkmark-circle",
|
|
1677
|
-
|
|
1678
|
+
important: "alert-circle",
|
|
1678
1679
|
information: "information-circle",
|
|
1679
1680
|
emergency: "warning",
|
|
1680
|
-
inactive: "information-circle",
|
|
1681
1681
|
dark: "information-circle",
|
|
1682
1682
|
midtone: "information-circle",
|
|
1683
1683
|
light: "information-circle"
|
|
@@ -1691,7 +1691,7 @@ function instance$x($$self, $$props, $$invalidate) {
|
|
|
1691
1691
|
class Badge extends SvelteElement {
|
|
1692
1692
|
constructor(options) {
|
|
1693
1693
|
super();
|
|
1694
|
-
this.shadowRoot.innerHTML = `<style>:host{box-sizing:border-box;font-family:var(--font-family)}.goa-badge{display:inline-flex;align-items:center;border-radius:0.25rem;padding:3px 0.5rem;gap:0.25rem;font-weight:var(--fw-regular);margin:0.25rem}.icon-only{padding:0.25rem}.goa-badge-content{text-transform:capitalize;font-size:var(--fs-sm);line-height:var(--lh-sm);padding-bottom:var(--font-valign-fix)}.goa-badge.badge-information{background-color:var(--color-gray-100);color:var(--goa-color-status-info)}.goa-badge.badge-success{background-color:var(--goa-color-status-success);color:var(--goa-color-text-light)}.goa-badge.badge-
|
|
1694
|
+
this.shadowRoot.innerHTML = `<style>:host{box-sizing:border-box;font-family:var(--font-family)}.goa-badge{display:inline-flex;align-items:center;border-radius:0.25rem;padding:3px 0.5rem;gap:0.25rem;font-weight:var(--fw-regular);margin:0.25rem}.icon-only{padding:0.25rem}.goa-badge-content{text-transform:capitalize;font-size:var(--fs-sm);line-height:var(--lh-sm);padding-bottom:var(--font-valign-fix)}.goa-badge.badge-information{background-color:var(--color-gray-100);color:var(--goa-color-status-info)}.goa-badge.badge-success{background-color:var(--goa-color-status-success);color:var(--goa-color-text-light)}.goa-badge.badge-important{background-color:var(--goa-color-status-warning);color:var(--goa-color-text)}.goa-badge.badge-emergency{background-color:var(--goa-color-status-emergency);color:var(--goa-color-text-light)}.goa-badge.badge-dark{background-color:var(--color-black);color:var(--goa-color-text-light)}.goa-badge.badge-midtone{background-color:var(--color-gray-600);color:var(--goa-color-text-light)}.goa-badge.badge-light{background-color:var(--color-white);color:var(--goa-color-text)}</style>`;
|
|
1695
1695
|
init(this, {
|
|
1696
1696
|
target: this.shadowRoot,
|
|
1697
1697
|
props: attribute_to_object(this.attributes),
|
|
@@ -2116,7 +2116,7 @@ function instance$w($$self, $$props, $$invalidate) {
|
|
|
2116
2116
|
let isButtonDark;
|
|
2117
2117
|
const BUTTON_TYPES = ["primary", "secondary", "tertiary", "start"];
|
|
2118
2118
|
const SIZES = ["", "compact"];
|
|
2119
|
-
const VARIANTS = ["", "
|
|
2119
|
+
const VARIANTS = ["", "destructive"]; // type check functions
|
|
2120
2120
|
|
|
2121
2121
|
function isButtonType(value) {
|
|
2122
2122
|
return BUTTON_TYPES.includes(value);
|
|
@@ -2200,7 +2200,7 @@ class Button extends SvelteElement {
|
|
|
2200
2200
|
constructor(options) {
|
|
2201
2201
|
super();
|
|
2202
2202
|
this.shadowRoot.innerHTML = `<style>:host{box-sizing:border-box;font-family:var(--font-family)}@media(max-width: 480px){:host{width:100%}button{width:100%}}button{display:inline-flex;box-sizing:border-box;border-radius:0.25rem;border:2px solid var(--goa-color-interactive);box-sizing:border-box;cursor:pointer;font-family:var(--font-family);font-size:var(--fs-lg);font-weight:400;height:var(--button-height);letter-spacing:0.5px;line-height:100%;padding:0 0.75rem;gap:0.5rem;align-items:center;justify-content:center;transition:transform 0.1s ease-in-out, background-color 0.2s ease-in-out,
|
|
2203
|
-
border-color 0.2s ease-in-out}.text{padding-bottom:var(--font-valign-fix)}button:disabled{pointer-events:none;opacity:0.5}button.compact{height:var(--button-height-compact);font-size:var(--fs-base)}button.start{height:var(--button-height-tall);font-weight:var(--fw-bold)}button.start,button.primary{border:2px solid var(--goa-color-interactive);background:var(--goa-color-interactive);color:var(--goa-color-text-light)}button.start:hover,button.primary:hover{border-color:var(--goa-color-interactive--hover);background:var(--goa-color-interactive--hover)}button.start:focus,button.start:active,button.primary:focus,button.primary:active{box-shadow:0 0 0 3px var(--goa-color-interactive--focus);border-color:var(--goa-color-interactive--active);background:var(--goa-color-interactive--active);outline:none}button.secondary{border:2px solid var(--goa-color-interactive);background:var(--color-white);color:var(--goa-color-interactive)}button.secondary:hover{border-color:var(--goa-color-interactive--hover);color:var(--goa-color-interactive--hover);background:var(--color-gray-100)}button.secondary:focus,button.secondary:active{border-color:var(--goa-color-interactive--active);box-shadow:0 0 0 3px var(--goa-color-interactive--focus);background:var(--color-gray-100);outline:none}button.tertiary{border:1px solid transparent;background:transparent;color:var(--goa-color-interactive);text-decoration:underline}button.tertiary:hover{border-color:var(--color-gray-100);color:var(--goa-color-interactive--hover);background:var(--color-gray-100)}button.tertiary:focus,button.tertiary:active{border-color:var(--color-gray-100);background:var(--color-gray-100);color:var(--goa-color-interactive--active);box-shadow:0 0 0 3px var(--goa-color-interactive--focus);outline:none}.primary.
|
|
2203
|
+
border-color 0.2s ease-in-out}.text{padding-bottom:var(--font-valign-fix)}button:disabled{pointer-events:none;opacity:0.5}button.compact{height:var(--button-height-compact);font-size:var(--fs-base)}button.start{height:var(--button-height-tall);font-weight:var(--fw-bold)}button.start,button.primary{border:2px solid var(--goa-color-interactive);background:var(--goa-color-interactive);color:var(--goa-color-text-light)}button.start:hover,button.primary:hover{border-color:var(--goa-color-interactive--hover);background:var(--goa-color-interactive--hover)}button.start:focus,button.start:active,button.primary:focus,button.primary:active{box-shadow:0 0 0 3px var(--goa-color-interactive--focus);border-color:var(--goa-color-interactive--active);background:var(--goa-color-interactive--active);outline:none}button.secondary{border:2px solid var(--goa-color-interactive);background:var(--color-white);color:var(--goa-color-interactive)}button.secondary:hover{border-color:var(--goa-color-interactive--hover);color:var(--goa-color-interactive--hover);background:var(--color-gray-100)}button.secondary:focus,button.secondary:active{border-color:var(--goa-color-interactive--active);box-shadow:0 0 0 3px var(--goa-color-interactive--focus);background:var(--color-gray-100);outline:none}button.tertiary{border:1px solid transparent;background:transparent;color:var(--goa-color-interactive);text-decoration:underline}button.tertiary:hover{border-color:var(--color-gray-100);color:var(--goa-color-interactive--hover);background:var(--color-gray-100)}button.tertiary:focus,button.tertiary:active{border-color:var(--color-gray-100);background:var(--color-gray-100);color:var(--goa-color-interactive--active);box-shadow:0 0 0 3px var(--goa-color-interactive--focus);outline:none}.primary.destructive{color:var(--color-white);background:var(--goa-color-status-emergency);border-color:var(--goa-color-status-emergency)}.primary.destructive:hover{background:var(--goa-color-status-emergency-dark);border-color:var(--goa-color-status-emergency-dark)}.primary.destructive:focus,.primary.destructive:active{background:var(--goa-color-status-emergency-dark);border-color:var(--goa-color-status-emergency-dark)}.secondary.destructive{color:var(--goa-color-status-emergency);border-color:var(--goa-color-status-emergency);background:var(--color-white)}.secondary.destructive:hover{border-color:var(--goa-color-status-emergency-dark);color:var(--goa-color-status-emergency-dark);background:var(--color-white)}.secondary.destructive:focus,.secondary.destructive:active{color:var(--goa-color-status-emergency-dark);border-color:var(--goa-color-status-emergency-dark);background:var(--color-white)}.tertiary.destructive{color:var(--goa-color-status-emergency);border-color:var(--color-gray-200);background:var(--color-white)}.tertiary.destructive:hover{border-color:var(--goa-color-status-emergency-dark);color:var(--goa-color-status-emergency-dark);background:var(--color-white)}.tertiary.destructive:focus,.tertiary.destructive:active{color:var(--goa-color-status-emergency-dark);border-color:var(--goa-color-status-emergency-dark);background:var(--color-white)}</style>`;
|
|
2204
2204
|
init(this, {
|
|
2205
2205
|
target: this.shadowRoot,
|
|
2206
2206
|
props: attribute_to_object(this.attributes),
|
|
@@ -6433,7 +6433,7 @@ function instance$i($$self, $$props, $$invalidate) {
|
|
|
6433
6433
|
/*variant, isInverted*/
|
|
6434
6434
|
544) {
|
|
6435
6435
|
// private
|
|
6436
|
-
$$invalidate(8, css =
|
|
6436
|
+
$$invalidate(8, css = `${variant} ${isInverted ? "inverted" : ""}`);
|
|
6437
6437
|
}
|
|
6438
6438
|
|
|
6439
6439
|
if ($$self.$$.dirty &
|
|
@@ -6459,7 +6459,7 @@ function instance$i($$self, $$props, $$invalidate) {
|
|
|
6459
6459
|
class IconButton extends SvelteElement {
|
|
6460
6460
|
constructor(options) {
|
|
6461
6461
|
super();
|
|
6462
|
-
this.shadowRoot.innerHTML = `<style>:host{display:inline-flex;align-items:center;box-sizing:border-box;font-family:var(--font-family)}
|
|
6462
|
+
this.shadowRoot.innerHTML = `<style>:host{display:inline-flex;align-items:center;box-sizing:border-box;font-family:var(--font-family)}button,button *{box-sizing:border-box}button{display:inline-flex;align-items:center;justify-content:center;background:transparent;cursor:pointer;border:none}.color{border-radius:0.5rem;padding:calc(var(--size) / 4)}.color{border-radius:0.5rem;color:var(--goa-color-interactive);fill:var(--goa-color-interactive);cursor:pointer;transition:background-color 100ms ease-in, transform 100ms ease-in}.color:active,.nocolor:active{transform:scale(0.9);border:none}.color:hover{background-color:var(--goa-color-primary-light)}.color.inverted:hover{background-color:var(--goa-color-primary-dark)}button:disabled{color:var(--color-gray-200);fill:var(--color-gray-200);transform:none;cursor:default}button:disabled:hover{background-color:transparent}</style>`;
|
|
6463
6463
|
init(this, {
|
|
6464
6464
|
target: this.shadowRoot,
|
|
6465
6465
|
props: attribute_to_object(this.attributes),
|
|
@@ -6615,7 +6615,7 @@ function create_if_block_5(ctx) {
|
|
|
6615
6615
|
}
|
|
6616
6616
|
|
|
6617
6617
|
};
|
|
6618
|
-
} // (
|
|
6618
|
+
} // (102:4) {#if trailingicon && !handlesTrailingIconClick}
|
|
6619
6619
|
|
|
6620
6620
|
|
|
6621
6621
|
function create_if_block_4$1(ctx) {
|
|
@@ -6650,7 +6650,7 @@ function create_if_block_4$1(ctx) {
|
|
|
6650
6650
|
}
|
|
6651
6651
|
|
|
6652
6652
|
};
|
|
6653
|
-
} // (
|
|
6653
|
+
} // (112:4) {#if trailingicon && handlesTrailingIconClick}
|
|
6654
6654
|
|
|
6655
6655
|
|
|
6656
6656
|
function create_if_block_3$3(ctx) {
|
|
@@ -6660,10 +6660,9 @@ function create_if_block_3$3(ctx) {
|
|
|
6660
6660
|
return {
|
|
6661
6661
|
c() {
|
|
6662
6662
|
goa_icon_button = element("goa-icon-button");
|
|
6663
|
-
set_custom_element_data(goa_icon_button, "class", "goa-input-trailing-icon");
|
|
6664
6663
|
set_custom_element_data(goa_icon_button, "disabled",
|
|
6665
6664
|
/*isDisabled*/
|
|
6666
|
-
ctx[
|
|
6665
|
+
ctx[16]);
|
|
6667
6666
|
set_custom_element_data(goa_icon_button, "variant", "nocolor");
|
|
6668
6667
|
set_custom_element_data(goa_icon_button, "size", "medium");
|
|
6669
6668
|
set_custom_element_data(goa_icon_button, "type",
|
|
@@ -6684,10 +6683,10 @@ function create_if_block_3$3(ctx) {
|
|
|
6684
6683
|
p(ctx, dirty) {
|
|
6685
6684
|
if (dirty &
|
|
6686
6685
|
/*isDisabled*/
|
|
6687
|
-
|
|
6686
|
+
65536) {
|
|
6688
6687
|
set_custom_element_data(goa_icon_button, "disabled",
|
|
6689
6688
|
/*isDisabled*/
|
|
6690
|
-
ctx[
|
|
6689
|
+
ctx[16]);
|
|
6691
6690
|
}
|
|
6692
6691
|
|
|
6693
6692
|
if (dirty &
|
|
@@ -6706,7 +6705,7 @@ function create_if_block_3$3(ctx) {
|
|
|
6706
6705
|
}
|
|
6707
6706
|
|
|
6708
6707
|
};
|
|
6709
|
-
} // (
|
|
6708
|
+
} // (125:2) {#if showCounter}
|
|
6710
6709
|
|
|
6711
6710
|
|
|
6712
6711
|
function create_if_block$a(ctx) {
|
|
@@ -6715,7 +6714,7 @@ function create_if_block$a(ctx) {
|
|
|
6715
6714
|
function select_block_type(ctx, dirty) {
|
|
6716
6715
|
if (
|
|
6717
6716
|
/*maxcharcount*/
|
|
6718
|
-
ctx[
|
|
6717
|
+
ctx[13] > 0) return create_if_block_1$6;
|
|
6719
6718
|
if (
|
|
6720
6719
|
/*value*/
|
|
6721
6720
|
ctx[0].length > 0) return create_if_block_2$5;
|
|
@@ -6757,7 +6756,7 @@ function create_if_block$a(ctx) {
|
|
|
6757
6756
|
}
|
|
6758
6757
|
|
|
6759
6758
|
};
|
|
6760
|
-
} // (
|
|
6759
|
+
} // (130:31)
|
|
6761
6760
|
|
|
6762
6761
|
|
|
6763
6762
|
function create_if_block_2$5(ctx) {
|
|
@@ -6791,7 +6790,7 @@ function create_if_block_2$5(ctx) {
|
|
|
6791
6790
|
}
|
|
6792
6791
|
|
|
6793
6792
|
};
|
|
6794
|
-
} // (
|
|
6793
|
+
} // (126:4) {#if maxcharcount > 0}
|
|
6795
6794
|
|
|
6796
6795
|
|
|
6797
6796
|
function create_if_block_1$6(ctx) {
|
|
@@ -6802,7 +6801,7 @@ function create_if_block_1$6(ctx) {
|
|
|
6802
6801
|
let t0;
|
|
6803
6802
|
let t1_value = `/${
|
|
6804
6803
|
/*maxcharcount*/
|
|
6805
|
-
ctx[
|
|
6804
|
+
ctx[13]}` + "";
|
|
6806
6805
|
let t1;
|
|
6807
6806
|
return {
|
|
6808
6807
|
c() {
|
|
@@ -6814,7 +6813,7 @@ function create_if_block_1$6(ctx) {
|
|
|
6814
6813
|
/*value*/
|
|
6815
6814
|
ctx[0].length >
|
|
6816
6815
|
/*maxcharcount*/
|
|
6817
|
-
ctx[
|
|
6816
|
+
ctx[13]);
|
|
6818
6817
|
},
|
|
6819
6818
|
|
|
6820
6819
|
m(target, anchor) {
|
|
@@ -6831,18 +6830,18 @@ function create_if_block_1$6(ctx) {
|
|
|
6831
6830
|
ctx[0].length + "")) set_data(t0, t0_value);
|
|
6832
6831
|
if (dirty &
|
|
6833
6832
|
/*maxcharcount*/
|
|
6834
|
-
|
|
6833
|
+
8192 && t1_value !== (t1_value = `/${
|
|
6835
6834
|
/*maxcharcount*/
|
|
6836
|
-
ctx[
|
|
6835
|
+
ctx[13]}` + "")) set_data(t1, t1_value);
|
|
6837
6836
|
|
|
6838
6837
|
if (dirty &
|
|
6839
6838
|
/*value, maxcharcount*/
|
|
6840
|
-
|
|
6839
|
+
8193) {
|
|
6841
6840
|
toggle_class(div, "counter-error",
|
|
6842
6841
|
/*value*/
|
|
6843
6842
|
ctx[0].length >
|
|
6844
6843
|
/*maxcharcount*/
|
|
6845
|
-
ctx[
|
|
6844
|
+
ctx[13]);
|
|
6846
6845
|
}
|
|
6847
6846
|
},
|
|
6848
6847
|
|
|
@@ -6875,15 +6874,15 @@ function create_fragment$j(ctx) {
|
|
|
6875
6874
|
/*trailingicon*/
|
|
6876
6875
|
ctx[5] && !
|
|
6877
6876
|
/*handlesTrailingIconClick*/
|
|
6878
|
-
ctx[
|
|
6877
|
+
ctx[19] && create_if_block_4$1(ctx);
|
|
6879
6878
|
let if_block2 =
|
|
6880
6879
|
/*trailingicon*/
|
|
6881
6880
|
ctx[5] &&
|
|
6882
6881
|
/*handlesTrailingIconClick*/
|
|
6883
|
-
ctx[
|
|
6882
|
+
ctx[19] && create_if_block_3$3(ctx);
|
|
6884
6883
|
let if_block3 =
|
|
6885
6884
|
/*showCounter*/
|
|
6886
|
-
ctx[
|
|
6885
|
+
ctx[15] && create_if_block$a(ctx);
|
|
6887
6886
|
return {
|
|
6888
6887
|
c() {
|
|
6889
6888
|
div1 = element("div");
|
|
@@ -6906,10 +6905,10 @@ function create_fragment$j(ctx) {
|
|
|
6906
6905
|
ctx[5] ? "-0.5rem" : "0"}`);
|
|
6907
6906
|
input.readOnly =
|
|
6908
6907
|
/*isReadonly*/
|
|
6909
|
-
ctx[
|
|
6908
|
+
ctx[18];
|
|
6910
6909
|
input.disabled =
|
|
6911
6910
|
/*isDisabled*/
|
|
6912
|
-
ctx[
|
|
6911
|
+
ctx[16];
|
|
6913
6912
|
attr(input, "data-testid",
|
|
6914
6913
|
/*testid*/
|
|
6915
6914
|
ctx[7]);
|
|
@@ -6925,6 +6924,15 @@ function create_fragment$j(ctx) {
|
|
|
6925
6924
|
attr(input, "placeholder",
|
|
6926
6925
|
/*placeholder*/
|
|
6927
6926
|
ctx[3]);
|
|
6927
|
+
attr(input, "min",
|
|
6928
|
+
/*min*/
|
|
6929
|
+
ctx[10]);
|
|
6930
|
+
attr(input, "max",
|
|
6931
|
+
/*max*/
|
|
6932
|
+
ctx[11]);
|
|
6933
|
+
attr(input, "step",
|
|
6934
|
+
/*step*/
|
|
6935
|
+
ctx[12]);
|
|
6928
6936
|
attr(input, "role", "textbox");
|
|
6929
6937
|
attr(input, "aria-label", input_aria_label_value =
|
|
6930
6938
|
/*arialabel*/
|
|
@@ -6935,7 +6943,7 @@ function create_fragment$j(ctx) {
|
|
|
6935
6943
|
goa-input
|
|
6936
6944
|
${
|
|
6937
6945
|
/*isDisabled*/
|
|
6938
|
-
ctx[
|
|
6946
|
+
ctx[16] ? "goa-input--disabled" : ""}
|
|
6939
6947
|
variant--${
|
|
6940
6948
|
/*variant*/
|
|
6941
6949
|
ctx[6]}
|
|
@@ -6945,7 +6953,7 @@ function create_fragment$j(ctx) {
|
|
|
6945
6953
|
`);
|
|
6946
6954
|
toggle_class(div0, "error",
|
|
6947
6955
|
/*isError*/
|
|
6948
|
-
ctx[
|
|
6956
|
+
ctx[17]);
|
|
6949
6957
|
attr(div1, "class", "container");
|
|
6950
6958
|
attr(div1, "style", div1_style_value = `
|
|
6951
6959
|
--width: ${
|
|
@@ -6962,7 +6970,7 @@ function create_fragment$j(ctx) {
|
|
|
6962
6970
|
append(div0, input);
|
|
6963
6971
|
/*input_binding*/
|
|
6964
6972
|
|
|
6965
|
-
ctx[
|
|
6973
|
+
ctx[28](input);
|
|
6966
6974
|
append(div0, t1);
|
|
6967
6975
|
if (if_block1) if_block1.m(div0, null);
|
|
6968
6976
|
append(div0, t2);
|
|
@@ -6973,9 +6981,9 @@ function create_fragment$j(ctx) {
|
|
|
6973
6981
|
if (!mounted) {
|
|
6974
6982
|
dispose = [listen(input, "keyup",
|
|
6975
6983
|
/*onKeyUp*/
|
|
6976
|
-
ctx[
|
|
6984
|
+
ctx[20]), listen(input, "change",
|
|
6977
6985
|
/*onKeyUp*/
|
|
6978
|
-
ctx[
|
|
6986
|
+
ctx[20])];
|
|
6979
6987
|
mounted = true;
|
|
6980
6988
|
}
|
|
6981
6989
|
},
|
|
@@ -7014,18 +7022,18 @@ function create_fragment$j(ctx) {
|
|
|
7014
7022
|
|
|
7015
7023
|
if (dirty &
|
|
7016
7024
|
/*isReadonly*/
|
|
7017
|
-
|
|
7025
|
+
262144) {
|
|
7018
7026
|
input.readOnly =
|
|
7019
7027
|
/*isReadonly*/
|
|
7020
|
-
ctx[
|
|
7028
|
+
ctx[18];
|
|
7021
7029
|
}
|
|
7022
7030
|
|
|
7023
7031
|
if (dirty &
|
|
7024
7032
|
/*isDisabled*/
|
|
7025
|
-
|
|
7033
|
+
65536) {
|
|
7026
7034
|
input.disabled =
|
|
7027
7035
|
/*isDisabled*/
|
|
7028
|
-
ctx[
|
|
7036
|
+
ctx[16];
|
|
7029
7037
|
}
|
|
7030
7038
|
|
|
7031
7039
|
if (dirty &
|
|
@@ -7070,6 +7078,30 @@ function create_fragment$j(ctx) {
|
|
|
7070
7078
|
ctx[3]);
|
|
7071
7079
|
}
|
|
7072
7080
|
|
|
7081
|
+
if (dirty &
|
|
7082
|
+
/*min*/
|
|
7083
|
+
1024) {
|
|
7084
|
+
attr(input, "min",
|
|
7085
|
+
/*min*/
|
|
7086
|
+
ctx[10]);
|
|
7087
|
+
}
|
|
7088
|
+
|
|
7089
|
+
if (dirty &
|
|
7090
|
+
/*max*/
|
|
7091
|
+
2048) {
|
|
7092
|
+
attr(input, "max",
|
|
7093
|
+
/*max*/
|
|
7094
|
+
ctx[11]);
|
|
7095
|
+
}
|
|
7096
|
+
|
|
7097
|
+
if (dirty &
|
|
7098
|
+
/*step*/
|
|
7099
|
+
4096) {
|
|
7100
|
+
attr(input, "step",
|
|
7101
|
+
/*step*/
|
|
7102
|
+
ctx[12]);
|
|
7103
|
+
}
|
|
7104
|
+
|
|
7073
7105
|
if (dirty &
|
|
7074
7106
|
/*arialabel, name*/
|
|
7075
7107
|
516 && input_aria_label_value !== (input_aria_label_value =
|
|
@@ -7084,7 +7116,7 @@ function create_fragment$j(ctx) {
|
|
|
7084
7116
|
/*trailingicon*/
|
|
7085
7117
|
ctx[5] && !
|
|
7086
7118
|
/*handlesTrailingIconClick*/
|
|
7087
|
-
ctx[
|
|
7119
|
+
ctx[19]) {
|
|
7088
7120
|
if (if_block1) {
|
|
7089
7121
|
if_block1.p(ctx, dirty);
|
|
7090
7122
|
} else {
|
|
@@ -7101,7 +7133,7 @@ function create_fragment$j(ctx) {
|
|
|
7101
7133
|
/*trailingicon*/
|
|
7102
7134
|
ctx[5] &&
|
|
7103
7135
|
/*handlesTrailingIconClick*/
|
|
7104
|
-
ctx[
|
|
7136
|
+
ctx[19]) {
|
|
7105
7137
|
if (if_block2) {
|
|
7106
7138
|
if_block2.p(ctx, dirty);
|
|
7107
7139
|
} else {
|
|
@@ -7116,11 +7148,11 @@ function create_fragment$j(ctx) {
|
|
|
7116
7148
|
|
|
7117
7149
|
if (dirty &
|
|
7118
7150
|
/*isDisabled, variant, type*/
|
|
7119
|
-
|
|
7151
|
+
65602 && div0_class_value !== (div0_class_value = `
|
|
7120
7152
|
goa-input
|
|
7121
7153
|
${
|
|
7122
7154
|
/*isDisabled*/
|
|
7123
|
-
ctx[
|
|
7155
|
+
ctx[16] ? "goa-input--disabled" : ""}
|
|
7124
7156
|
variant--${
|
|
7125
7157
|
/*variant*/
|
|
7126
7158
|
ctx[6]}
|
|
@@ -7133,15 +7165,15 @@ function create_fragment$j(ctx) {
|
|
|
7133
7165
|
|
|
7134
7166
|
if (dirty &
|
|
7135
7167
|
/*isDisabled, variant, type, isError*/
|
|
7136
|
-
|
|
7168
|
+
196674) {
|
|
7137
7169
|
toggle_class(div0, "error",
|
|
7138
7170
|
/*isError*/
|
|
7139
|
-
ctx[
|
|
7171
|
+
ctx[17]);
|
|
7140
7172
|
}
|
|
7141
7173
|
|
|
7142
7174
|
if (
|
|
7143
7175
|
/*showCounter*/
|
|
7144
|
-
ctx[
|
|
7176
|
+
ctx[15]) {
|
|
7145
7177
|
if (if_block3) {
|
|
7146
7178
|
if_block3.p(ctx, dirty);
|
|
7147
7179
|
} else {
|
|
@@ -7173,7 +7205,7 @@ function create_fragment$j(ctx) {
|
|
|
7173
7205
|
if (if_block0) if_block0.d();
|
|
7174
7206
|
/*input_binding*/
|
|
7175
7207
|
|
|
7176
|
-
ctx[
|
|
7208
|
+
ctx[28](null);
|
|
7177
7209
|
if (if_block1) if_block1.d();
|
|
7178
7210
|
if (if_block2) if_block2.d();
|
|
7179
7211
|
if (if_block3) if_block3.d();
|
|
@@ -7240,7 +7272,16 @@ function instance$h($$self, $$props, $$invalidate) {
|
|
|
7240
7272
|
width = "30ch"
|
|
7241
7273
|
} = $$props;
|
|
7242
7274
|
let {
|
|
7243
|
-
arialabel =
|
|
7275
|
+
arialabel = null
|
|
7276
|
+
} = $$props;
|
|
7277
|
+
let {
|
|
7278
|
+
min = null
|
|
7279
|
+
} = $$props;
|
|
7280
|
+
let {
|
|
7281
|
+
max = null
|
|
7282
|
+
} = $$props;
|
|
7283
|
+
let {
|
|
7284
|
+
step = null
|
|
7244
7285
|
} = $$props;
|
|
7245
7286
|
let {
|
|
7246
7287
|
showcounter = "false"
|
|
@@ -7266,7 +7307,7 @@ function instance$h($$self, $$props, $$invalidate) {
|
|
|
7266
7307
|
function input_binding($$value) {
|
|
7267
7308
|
binding_callbacks[$$value ? 'unshift' : 'push'](() => {
|
|
7268
7309
|
inputEl = $$value;
|
|
7269
|
-
$$invalidate(
|
|
7310
|
+
$$invalidate(14, inputEl);
|
|
7270
7311
|
});
|
|
7271
7312
|
}
|
|
7272
7313
|
|
|
@@ -7278,58 +7319,61 @@ function instance$h($$self, $$props, $$invalidate) {
|
|
|
7278
7319
|
if ('leadingicon' in $$props) $$invalidate(4, leadingicon = $$props.leadingicon);
|
|
7279
7320
|
if ('trailingicon' in $$props) $$invalidate(5, trailingicon = $$props.trailingicon);
|
|
7280
7321
|
if ('variant' in $$props) $$invalidate(6, variant = $$props.variant);
|
|
7281
|
-
if ('disabled' in $$props) $$invalidate(
|
|
7282
|
-
if ('handletrailingiconclick' in $$props) $$invalidate(
|
|
7283
|
-
if ('focused' in $$props) $$invalidate(
|
|
7284
|
-
if ('readonly' in $$props) $$invalidate(
|
|
7285
|
-
if ('error' in $$props) $$invalidate(
|
|
7322
|
+
if ('disabled' in $$props) $$invalidate(21, disabled = $$props.disabled);
|
|
7323
|
+
if ('handletrailingiconclick' in $$props) $$invalidate(22, handletrailingiconclick = $$props.handletrailingiconclick);
|
|
7324
|
+
if ('focused' in $$props) $$invalidate(23, focused = $$props.focused);
|
|
7325
|
+
if ('readonly' in $$props) $$invalidate(24, readonly = $$props.readonly);
|
|
7326
|
+
if ('error' in $$props) $$invalidate(25, error = $$props.error);
|
|
7286
7327
|
if ('testid' in $$props) $$invalidate(7, testid = $$props.testid);
|
|
7287
7328
|
if ('width' in $$props) $$invalidate(8, width = $$props.width);
|
|
7288
7329
|
if ('arialabel' in $$props) $$invalidate(9, arialabel = $$props.arialabel);
|
|
7289
|
-
if ('
|
|
7290
|
-
if ('
|
|
7330
|
+
if ('min' in $$props) $$invalidate(10, min = $$props.min);
|
|
7331
|
+
if ('max' in $$props) $$invalidate(11, max = $$props.max);
|
|
7332
|
+
if ('step' in $$props) $$invalidate(12, step = $$props.step);
|
|
7333
|
+
if ('showcounter' in $$props) $$invalidate(26, showcounter = $$props.showcounter);
|
|
7334
|
+
if ('maxcharcount' in $$props) $$invalidate(13, maxcharcount = $$props.maxcharcount);
|
|
7291
7335
|
};
|
|
7292
7336
|
|
|
7293
7337
|
$$self.$$.update = () => {
|
|
7294
7338
|
if ($$self.$$.dirty &
|
|
7295
7339
|
/*handletrailingiconclick*/
|
|
7296
|
-
|
|
7297
|
-
$$invalidate(
|
|
7340
|
+
4194304) {
|
|
7341
|
+
$$invalidate(19, handlesTrailingIconClick = toBoolean(handletrailingiconclick));
|
|
7298
7342
|
}
|
|
7299
7343
|
|
|
7300
7344
|
if ($$self.$$.dirty &
|
|
7301
7345
|
/*focused*/
|
|
7302
|
-
|
|
7303
|
-
$$invalidate(
|
|
7346
|
+
8388608) {
|
|
7347
|
+
$$invalidate(27, isFocused = toBoolean(focused));
|
|
7304
7348
|
}
|
|
7305
7349
|
|
|
7306
7350
|
if ($$self.$$.dirty &
|
|
7307
7351
|
/*readonly*/
|
|
7308
|
-
|
|
7309
|
-
$$invalidate(
|
|
7352
|
+
16777216) {
|
|
7353
|
+
$$invalidate(18, isReadonly = toBoolean(readonly));
|
|
7310
7354
|
}
|
|
7311
7355
|
|
|
7312
7356
|
if ($$self.$$.dirty &
|
|
7313
7357
|
/*error*/
|
|
7314
|
-
|
|
7315
|
-
$$invalidate(
|
|
7358
|
+
33554432) {
|
|
7359
|
+
$$invalidate(17, isError = toBoolean(error));
|
|
7316
7360
|
}
|
|
7317
7361
|
|
|
7318
7362
|
if ($$self.$$.dirty &
|
|
7319
7363
|
/*disabled*/
|
|
7320
|
-
|
|
7321
|
-
$$invalidate(
|
|
7364
|
+
2097152) {
|
|
7365
|
+
$$invalidate(16, isDisabled = toBoolean(disabled));
|
|
7322
7366
|
}
|
|
7323
7367
|
|
|
7324
7368
|
if ($$self.$$.dirty &
|
|
7325
7369
|
/*showcounter*/
|
|
7326
|
-
|
|
7327
|
-
$$invalidate(
|
|
7370
|
+
67108864) {
|
|
7371
|
+
$$invalidate(15, showCounter = toBoolean(showcounter));
|
|
7328
7372
|
}
|
|
7329
7373
|
|
|
7330
7374
|
if ($$self.$$.dirty &
|
|
7331
7375
|
/*isFocused, inputEl*/
|
|
7332
|
-
|
|
7376
|
+
134234112) {
|
|
7333
7377
|
if (isFocused && inputEl) {
|
|
7334
7378
|
setTimeout(() => inputEl.focus(), 1);
|
|
7335
7379
|
}
|
|
@@ -7337,7 +7381,7 @@ function instance$h($$self, $$props, $$invalidate) {
|
|
|
7337
7381
|
|
|
7338
7382
|
if ($$self.$$.dirty &
|
|
7339
7383
|
/*inputEl, type*/
|
|
7340
|
-
|
|
7384
|
+
16386) {
|
|
7341
7385
|
if (inputEl && type === "search") {
|
|
7342
7386
|
inputEl.addEventListener("search", e => {
|
|
7343
7387
|
onKeyUp(e);
|
|
@@ -7346,13 +7390,13 @@ function instance$h($$self, $$props, $$invalidate) {
|
|
|
7346
7390
|
}
|
|
7347
7391
|
};
|
|
7348
7392
|
|
|
7349
|
-
return [value, type, name, placeholder, leadingicon, trailingicon, variant, testid, width, arialabel, maxcharcount, inputEl, showCounter, isDisabled, isError, isReadonly, handlesTrailingIconClick, onKeyUp, disabled, handletrailingiconclick, focused, readonly, error, showcounter, isFocused, input_binding];
|
|
7393
|
+
return [value, type, name, placeholder, leadingicon, trailingicon, variant, testid, width, arialabel, min, max, step, maxcharcount, inputEl, showCounter, isDisabled, isError, isReadonly, handlesTrailingIconClick, onKeyUp, disabled, handletrailingiconclick, focused, readonly, error, showcounter, isFocused, input_binding];
|
|
7350
7394
|
}
|
|
7351
7395
|
|
|
7352
7396
|
class Input extends SvelteElement {
|
|
7353
7397
|
constructor(options) {
|
|
7354
7398
|
super();
|
|
7355
|
-
this.shadowRoot.innerHTML = `<style>:host{box-sizing:border-box;font-family:var(--font-family)}.container{position:relative;width:100%}@media(min-width: 640px){.container{width:var(--width)}}.goa-input,.goa-input *{box-sizing:border-box}.goa-input{box-sizing:border-box;outline:none;transition:box-shadow 0.1s ease-in;border:1px solid var(--color-gray-600);border-radius:var(--input-border-radius);background:white;display:inline-flex;align-items:center;vertical-align:middle;min-width:100%}.goa-input:hover{border-color: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{
|
|
7399
|
+
this.shadowRoot.innerHTML = `<style>:host{box-sizing:border-box;font-family:var(--font-family)}.container{position:relative;width:100%}@media(min-width: 640px){.container{width:var(--width)}}.goa-input,.goa-input *{box-sizing:border-box}.goa-input{box-sizing:border-box;outline:none;transition:box-shadow 0.1s ease-in;border:1px solid var(--color-gray-600);border-radius:var(--input-border-radius);background:white;display:inline-flex;align-items:center;vertical-align:middle;min-width:100%}.goa-input:hover{border-color: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);font-size:var(--input-font-size);padding:var(--input-padding);line-height:calc(40px - calc(var(--input-padding) * 2));background-color:transparent;width:0;flex:1 1 auto}input[type=date],input[type="datetime-local"],input[type=number]{font-family:var(--font-family)}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(--color-gray-100);border-color:var(--color-gray-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}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}.counter{position:absolute;padding-top:0.25rem;right:0;font-size:var(--fs-sm)}.counter-error{color:var(--goa-color-interactive--error)}.error:hover,.error:focus,.error{border:2px solid var(--goa-color-interactive--error)}input[type="search" i]: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>')
|
|
7356
7400
|
center center no-repeat}</style>`;
|
|
7357
7401
|
init(this, {
|
|
7358
7402
|
target: this.shadowRoot,
|
|
@@ -7366,16 +7410,19 @@ class Input extends SvelteElement {
|
|
|
7366
7410
|
leadingicon: 4,
|
|
7367
7411
|
trailingicon: 5,
|
|
7368
7412
|
variant: 6,
|
|
7369
|
-
disabled:
|
|
7370
|
-
handletrailingiconclick:
|
|
7371
|
-
focused:
|
|
7372
|
-
readonly:
|
|
7373
|
-
error:
|
|
7413
|
+
disabled: 21,
|
|
7414
|
+
handletrailingiconclick: 22,
|
|
7415
|
+
focused: 23,
|
|
7416
|
+
readonly: 24,
|
|
7417
|
+
error: 25,
|
|
7374
7418
|
testid: 7,
|
|
7375
7419
|
width: 8,
|
|
7376
7420
|
arialabel: 9,
|
|
7377
|
-
|
|
7378
|
-
|
|
7421
|
+
min: 10,
|
|
7422
|
+
max: 11,
|
|
7423
|
+
step: 12,
|
|
7424
|
+
showcounter: 26,
|
|
7425
|
+
maxcharcount: 13
|
|
7379
7426
|
}, null);
|
|
7380
7427
|
|
|
7381
7428
|
if (options) {
|
|
@@ -7391,7 +7438,7 @@ class Input extends SvelteElement {
|
|
|
7391
7438
|
}
|
|
7392
7439
|
|
|
7393
7440
|
static get observedAttributes() {
|
|
7394
|
-
return ["type", "name", "value", "placeholder", "leadingicon", "trailingicon", "variant", "disabled", "handletrailingiconclick", "focused", "readonly", "error", "testid", "width", "arialabel", "showcounter", "maxcharcount"];
|
|
7441
|
+
return ["type", "name", "value", "placeholder", "leadingicon", "trailingicon", "variant", "disabled", "handletrailingiconclick", "focused", "readonly", "error", "testid", "width", "arialabel", "min", "max", "step", "showcounter", "maxcharcount"];
|
|
7395
7442
|
}
|
|
7396
7443
|
|
|
7397
7444
|
get type() {
|
|
@@ -7472,7 +7519,7 @@ class Input extends SvelteElement {
|
|
|
7472
7519
|
}
|
|
7473
7520
|
|
|
7474
7521
|
get disabled() {
|
|
7475
|
-
return this.$$.ctx[
|
|
7522
|
+
return this.$$.ctx[21];
|
|
7476
7523
|
}
|
|
7477
7524
|
|
|
7478
7525
|
set disabled(disabled) {
|
|
@@ -7483,7 +7530,7 @@ class Input extends SvelteElement {
|
|
|
7483
7530
|
}
|
|
7484
7531
|
|
|
7485
7532
|
get handletrailingiconclick() {
|
|
7486
|
-
return this.$$.ctx[
|
|
7533
|
+
return this.$$.ctx[22];
|
|
7487
7534
|
}
|
|
7488
7535
|
|
|
7489
7536
|
set handletrailingiconclick(handletrailingiconclick) {
|
|
@@ -7494,7 +7541,7 @@ class Input extends SvelteElement {
|
|
|
7494
7541
|
}
|
|
7495
7542
|
|
|
7496
7543
|
get focused() {
|
|
7497
|
-
return this.$$.ctx[
|
|
7544
|
+
return this.$$.ctx[23];
|
|
7498
7545
|
}
|
|
7499
7546
|
|
|
7500
7547
|
set focused(focused) {
|
|
@@ -7505,7 +7552,7 @@ class Input extends SvelteElement {
|
|
|
7505
7552
|
}
|
|
7506
7553
|
|
|
7507
7554
|
get readonly() {
|
|
7508
|
-
return this.$$.ctx[
|
|
7555
|
+
return this.$$.ctx[24];
|
|
7509
7556
|
}
|
|
7510
7557
|
|
|
7511
7558
|
set readonly(readonly) {
|
|
@@ -7516,7 +7563,7 @@ class Input extends SvelteElement {
|
|
|
7516
7563
|
}
|
|
7517
7564
|
|
|
7518
7565
|
get error() {
|
|
7519
|
-
return this.$$.ctx[
|
|
7566
|
+
return this.$$.ctx[25];
|
|
7520
7567
|
}
|
|
7521
7568
|
|
|
7522
7569
|
set error(error) {
|
|
@@ -7559,8 +7606,41 @@ class Input extends SvelteElement {
|
|
|
7559
7606
|
flush();
|
|
7560
7607
|
}
|
|
7561
7608
|
|
|
7609
|
+
get min() {
|
|
7610
|
+
return this.$$.ctx[10];
|
|
7611
|
+
}
|
|
7612
|
+
|
|
7613
|
+
set min(min) {
|
|
7614
|
+
this.$$set({
|
|
7615
|
+
min
|
|
7616
|
+
});
|
|
7617
|
+
flush();
|
|
7618
|
+
}
|
|
7619
|
+
|
|
7620
|
+
get max() {
|
|
7621
|
+
return this.$$.ctx[11];
|
|
7622
|
+
}
|
|
7623
|
+
|
|
7624
|
+
set max(max) {
|
|
7625
|
+
this.$$set({
|
|
7626
|
+
max
|
|
7627
|
+
});
|
|
7628
|
+
flush();
|
|
7629
|
+
}
|
|
7630
|
+
|
|
7631
|
+
get step() {
|
|
7632
|
+
return this.$$.ctx[12];
|
|
7633
|
+
}
|
|
7634
|
+
|
|
7635
|
+
set step(step) {
|
|
7636
|
+
this.$$set({
|
|
7637
|
+
step
|
|
7638
|
+
});
|
|
7639
|
+
flush();
|
|
7640
|
+
}
|
|
7641
|
+
|
|
7562
7642
|
get showcounter() {
|
|
7563
|
-
return this.$$.ctx[
|
|
7643
|
+
return this.$$.ctx[26];
|
|
7564
7644
|
}
|
|
7565
7645
|
|
|
7566
7646
|
set showcounter(showcounter) {
|
|
@@ -7571,7 +7651,7 @@ class Input extends SvelteElement {
|
|
|
7571
7651
|
}
|
|
7572
7652
|
|
|
7573
7653
|
get maxcharcount() {
|
|
7574
|
-
return this.$$.ctx[
|
|
7654
|
+
return this.$$.ctx[13];
|
|
7575
7655
|
}
|
|
7576
7656
|
|
|
7577
7657
|
set maxcharcount(maxcharcount) {
|
|
@@ -9877,7 +9957,7 @@ function create_if_block_3(ctx) {
|
|
|
9877
9957
|
div1 = element("div");
|
|
9878
9958
|
div1.innerHTML = `An official site of the <a href="https://www.alberta.ca/index.aspx">Alberta Government</a>`;
|
|
9879
9959
|
attr(div0, "class", "service-level service-level--live");
|
|
9880
|
-
attr(div1, "data-testid", "
|
|
9960
|
+
attr(div1, "data-testid", "type");
|
|
9881
9961
|
attr(div1, "class", "site-text");
|
|
9882
9962
|
},
|
|
9883
9963
|
|
|
@@ -9894,13 +9974,13 @@ function create_if_block_3(ctx) {
|
|
|
9894
9974
|
}
|
|
9895
9975
|
|
|
9896
9976
|
};
|
|
9897
|
-
} // (34:2) {#if ["alpha", "beta"].includes(
|
|
9977
|
+
} // (34:2) {#if ["alpha", "beta"].includes(type)}
|
|
9898
9978
|
|
|
9899
9979
|
|
|
9900
9980
|
function create_if_block_1$3(ctx) {
|
|
9901
9981
|
let div0;
|
|
9902
9982
|
let t0_value = capitalize(
|
|
9903
|
-
/*
|
|
9983
|
+
/*type*/
|
|
9904
9984
|
ctx[0]) + "";
|
|
9905
9985
|
let t0;
|
|
9906
9986
|
let div0_class_value;
|
|
@@ -9923,9 +10003,9 @@ function create_if_block_1$3(ctx) {
|
|
|
9923
10003
|
a.textContent = "Alberta Government";
|
|
9924
10004
|
t4 = text(" service\n ");
|
|
9925
10005
|
if (if_block) if_block.c();
|
|
9926
|
-
attr(div0, "data-testid", "
|
|
10006
|
+
attr(div0, "data-testid", "type");
|
|
9927
10007
|
attr(div0, "class", div0_class_value = "service-level service-level--" +
|
|
9928
|
-
/*
|
|
10008
|
+
/*type*/
|
|
9929
10009
|
ctx[0].toLowerCase());
|
|
9930
10010
|
attr(a, "href", "https://www.alberta.ca/index.aspx");
|
|
9931
10011
|
attr(div1, "data-testid", "site-text");
|
|
@@ -9945,15 +10025,15 @@ function create_if_block_1$3(ctx) {
|
|
|
9945
10025
|
|
|
9946
10026
|
p(ctx, dirty) {
|
|
9947
10027
|
if (dirty &
|
|
9948
|
-
/*
|
|
10028
|
+
/*type*/
|
|
9949
10029
|
1 && t0_value !== (t0_value = capitalize(
|
|
9950
|
-
/*
|
|
10030
|
+
/*type*/
|
|
9951
10031
|
ctx[0]) + "")) set_data(t0, t0_value);
|
|
9952
10032
|
|
|
9953
10033
|
if (dirty &
|
|
9954
|
-
/*
|
|
10034
|
+
/*type*/
|
|
9955
10035
|
1 && div0_class_value !== (div0_class_value = "service-level service-level--" +
|
|
9956
|
-
/*
|
|
10036
|
+
/*type*/
|
|
9957
10037
|
ctx[0].toLowerCase())) {
|
|
9958
10038
|
attr(div0, "class", div0_class_value);
|
|
9959
10039
|
}
|
|
@@ -10064,13 +10144,13 @@ function create_fragment$c(ctx) {
|
|
|
10064
10144
|
let header;
|
|
10065
10145
|
let t0;
|
|
10066
10146
|
let show_if = ["alpha", "beta"].includes(
|
|
10067
|
-
/*
|
|
10147
|
+
/*type*/
|
|
10068
10148
|
ctx[0]);
|
|
10069
10149
|
let t1;
|
|
10070
10150
|
let div;
|
|
10071
10151
|
let t2;
|
|
10072
10152
|
let if_block0 =
|
|
10073
|
-
/*
|
|
10153
|
+
/*type*/
|
|
10074
10154
|
ctx[0] === "live" && create_if_block_3();
|
|
10075
10155
|
let if_block1 = show_if && create_if_block_1$3(ctx);
|
|
10076
10156
|
let if_block2 =
|
|
@@ -10104,7 +10184,7 @@ function create_fragment$c(ctx) {
|
|
|
10104
10184
|
|
|
10105
10185
|
p(ctx, [dirty]) {
|
|
10106
10186
|
if (
|
|
10107
|
-
/*
|
|
10187
|
+
/*type*/
|
|
10108
10188
|
ctx[0] === "live") {
|
|
10109
10189
|
if (if_block0) ;else {
|
|
10110
10190
|
if_block0 = create_if_block_3();
|
|
@@ -10117,9 +10197,9 @@ function create_fragment$c(ctx) {
|
|
|
10117
10197
|
}
|
|
10118
10198
|
|
|
10119
10199
|
if (dirty &
|
|
10120
|
-
/*
|
|
10200
|
+
/*type*/
|
|
10121
10201
|
1) show_if = ["alpha", "beta"].includes(
|
|
10122
|
-
/*
|
|
10202
|
+
/*type*/
|
|
10123
10203
|
ctx[0]);
|
|
10124
10204
|
|
|
10125
10205
|
if (show_if) {
|
|
@@ -10171,7 +10251,7 @@ function capitalize(val) {
|
|
|
10171
10251
|
|
|
10172
10252
|
function instance$a($$self, $$props, $$invalidate) {
|
|
10173
10253
|
let {
|
|
10174
|
-
|
|
10254
|
+
type
|
|
10175
10255
|
} = $$props;
|
|
10176
10256
|
let {
|
|
10177
10257
|
version
|
|
@@ -10181,24 +10261,24 @@ function instance$a($$self, $$props, $$invalidate) {
|
|
|
10181
10261
|
} = $$props;
|
|
10182
10262
|
|
|
10183
10263
|
$$self.$$set = $$props => {
|
|
10184
|
-
if ('
|
|
10264
|
+
if ('type' in $$props) $$invalidate(0, type = $$props.type);
|
|
10185
10265
|
if ('version' in $$props) $$invalidate(1, version = $$props.version);
|
|
10186
10266
|
if ('feedbackurl' in $$props) $$invalidate(2, feedbackurl = $$props.feedbackurl);
|
|
10187
10267
|
};
|
|
10188
10268
|
|
|
10189
|
-
return [
|
|
10269
|
+
return [type, version, feedbackurl];
|
|
10190
10270
|
}
|
|
10191
10271
|
|
|
10192
10272
|
class MicrositeHeader extends SvelteElement {
|
|
10193
10273
|
constructor(options) {
|
|
10194
10274
|
super();
|
|
10195
|
-
this.shadowRoot.innerHTML = `<style>:host{box-sizing:border-box;font-family:var(--font-family)}a{color:var(--goa-color-interactive);cursor:pointer}a:hover{color:var(--goa-color-interactive--hover)}a:focus{outline-width:thin;outline-style:solid;outline-color:var(--goa-color-interactive--hover);outline-offset:0px}.goa-official-site-header{display:flex;font-size:var(--fs-sm);background-color:var(--color-gray-100);align-items:center;justify-content:space-between;padding:0.5rem 1.5rem}@media(max-width: 640px){.goa-official-site-header{padding:0.5rem 1rem;align-items:start}}.spacer{flex:1 1 auto}.version{color:var(--goa-color-text-secondary);padding-left:1rem;line-height:1.25rem}.service-
|
|
10275
|
+
this.shadowRoot.innerHTML = `<style>:host{box-sizing:border-box;font-family:var(--font-family)}a{color:var(--goa-color-interactive);cursor:pointer}a:hover{color:var(--goa-color-interactive--hover)}a:focus{outline-width:thin;outline-style:solid;outline-color:var(--goa-color-interactive--hover);outline-offset:0px}.goa-official-site-header{display:flex;font-size:var(--fs-sm);background-color:var(--color-gray-100);align-items:center;justify-content:space-between;padding:0.5rem 1.5rem}@media(max-width: 640px){.goa-official-site-header{padding:0.5rem 1rem;align-items:start}}.spacer{flex:1 1 auto}.version{color:var(--goa-color-text-secondary);padding-left:1rem;line-height:1.25rem}.service-type{font-weight:bold;padding:0.25rem;display:flex;margin-right:1rem;line-height:initial}.service-type--alpha{background-color:var(--goa-color-status-warning);color:var(--goa-color-text)}.service-type--beta{background-color:var(--goa-color-brand);color:var(--goa-color-text-light)}.service-type--live{padding:0}.site-text{color:var(--goa-color-text);line-height:1.25rem}</style>`;
|
|
10196
10276
|
init(this, {
|
|
10197
10277
|
target: this.shadowRoot,
|
|
10198
10278
|
props: attribute_to_object(this.attributes),
|
|
10199
10279
|
customElement: true
|
|
10200
10280
|
}, instance$a, create_fragment$c, safe_not_equal, {
|
|
10201
|
-
|
|
10281
|
+
type: 0,
|
|
10202
10282
|
version: 1,
|
|
10203
10283
|
feedbackurl: 2
|
|
10204
10284
|
}, null);
|
|
@@ -10216,16 +10296,16 @@ class MicrositeHeader extends SvelteElement {
|
|
|
10216
10296
|
}
|
|
10217
10297
|
|
|
10218
10298
|
static get observedAttributes() {
|
|
10219
|
-
return ["
|
|
10299
|
+
return ["type", "version", "feedbackurl"];
|
|
10220
10300
|
}
|
|
10221
10301
|
|
|
10222
|
-
get
|
|
10302
|
+
get type() {
|
|
10223
10303
|
return this.$$.ctx[0];
|
|
10224
10304
|
}
|
|
10225
10305
|
|
|
10226
|
-
set
|
|
10306
|
+
set type(type) {
|
|
10227
10307
|
this.$$set({
|
|
10228
|
-
|
|
10308
|
+
type
|
|
10229
10309
|
});
|
|
10230
10310
|
flush();
|
|
10231
10311
|
}
|
|
@@ -13686,44 +13766,48 @@ const GoABadge = ({
|
|
|
13686
13766
|
};
|
|
13687
13767
|
const GoAInfoBadge = ({
|
|
13688
13768
|
content,
|
|
13689
|
-
testId
|
|
13769
|
+
testId,
|
|
13770
|
+
icon
|
|
13690
13771
|
}) => {
|
|
13691
13772
|
return jsx(GoABadge, {
|
|
13692
13773
|
type: "information",
|
|
13693
|
-
icon:
|
|
13774
|
+
icon: icon,
|
|
13694
13775
|
content: content,
|
|
13695
13776
|
testId: testId
|
|
13696
13777
|
}, void 0);
|
|
13697
13778
|
};
|
|
13698
13779
|
const GoASuccessBadge = ({
|
|
13699
13780
|
content,
|
|
13700
|
-
testId
|
|
13781
|
+
testId,
|
|
13782
|
+
icon
|
|
13701
13783
|
}) => {
|
|
13702
13784
|
return jsx(GoABadge, {
|
|
13703
13785
|
type: "success",
|
|
13704
|
-
icon:
|
|
13786
|
+
icon: icon,
|
|
13705
13787
|
content: content,
|
|
13706
13788
|
testId: testId
|
|
13707
13789
|
}, void 0);
|
|
13708
13790
|
};
|
|
13709
|
-
const
|
|
13791
|
+
const GoAImportantBadge = ({
|
|
13710
13792
|
content,
|
|
13711
|
-
testId
|
|
13793
|
+
testId,
|
|
13794
|
+
icon
|
|
13712
13795
|
}) => {
|
|
13713
13796
|
return jsx(GoABadge, {
|
|
13714
|
-
type: "
|
|
13715
|
-
icon:
|
|
13797
|
+
type: "important",
|
|
13798
|
+
icon: icon,
|
|
13716
13799
|
content: content,
|
|
13717
13800
|
testId: testId
|
|
13718
13801
|
}, void 0);
|
|
13719
13802
|
};
|
|
13720
13803
|
const GoAEmergencyBadge = ({
|
|
13721
13804
|
content,
|
|
13722
|
-
testId
|
|
13805
|
+
testId,
|
|
13806
|
+
icon
|
|
13723
13807
|
}) => {
|
|
13724
13808
|
return jsx(GoABadge, {
|
|
13725
13809
|
type: "emergency",
|
|
13726
|
-
icon:
|
|
13810
|
+
icon: icon,
|
|
13727
13811
|
content: content,
|
|
13728
13812
|
testId: testId
|
|
13729
13813
|
}, void 0);
|
|
@@ -13773,6 +13857,9 @@ const GoAInput = ({
|
|
|
13773
13857
|
showCounter,
|
|
13774
13858
|
maxCharCount,
|
|
13775
13859
|
testId,
|
|
13860
|
+
min,
|
|
13861
|
+
max,
|
|
13862
|
+
step,
|
|
13776
13863
|
onTrailingIconClick,
|
|
13777
13864
|
onChange
|
|
13778
13865
|
}) => {
|
|
@@ -13819,6 +13906,9 @@ const GoAInput = ({
|
|
|
13819
13906
|
"data-testid": testId,
|
|
13820
13907
|
value: value,
|
|
13821
13908
|
width: width,
|
|
13909
|
+
min: min,
|
|
13910
|
+
max: max,
|
|
13911
|
+
step: step,
|
|
13822
13912
|
showcounter: showCounter,
|
|
13823
13913
|
maxcharcount: maxCharCount,
|
|
13824
13914
|
handletrailingiconclick: !!onTrailingIconClick
|
|
@@ -13834,18 +13924,55 @@ const GoAInputPassword = props => {
|
|
|
13834
13924
|
type: "password"
|
|
13835
13925
|
}), void 0);
|
|
13836
13926
|
};
|
|
13837
|
-
const GoAInputDate =
|
|
13927
|
+
const GoAInputDate = _a => {
|
|
13928
|
+
var {
|
|
13929
|
+
value,
|
|
13930
|
+
min,
|
|
13931
|
+
max
|
|
13932
|
+
} = _a,
|
|
13933
|
+
props = __rest(_a, ["value", "min", "max"]);
|
|
13934
|
+
|
|
13935
|
+
const _value = typeof value === "string" ? new Date(value) : value;
|
|
13936
|
+
|
|
13937
|
+
const _min = min ? format(new Date(min), "yyyy-MM-dd") : "";
|
|
13938
|
+
|
|
13939
|
+
const _max = max ? format(new Date(max), "yyyy-MM-dd") : "";
|
|
13940
|
+
|
|
13838
13941
|
return jsx(GoAInput, Object.assign({}, props, {
|
|
13942
|
+
min: _min,
|
|
13943
|
+
max: _max,
|
|
13944
|
+
value: format(_value, "yyyy-MM-dd"),
|
|
13839
13945
|
type: "date"
|
|
13840
13946
|
}), void 0);
|
|
13841
13947
|
};
|
|
13842
|
-
const GoAInputTime =
|
|
13843
|
-
|
|
13844
|
-
|
|
13845
|
-
}
|
|
13948
|
+
const GoAInputTime = _a => {
|
|
13949
|
+
var {
|
|
13950
|
+
value
|
|
13951
|
+
} = _a,
|
|
13952
|
+
props = __rest(_a, ["value"]);
|
|
13953
|
+
|
|
13954
|
+
try {
|
|
13955
|
+
const d = typeof value === "string" ? new Date(value) : value;
|
|
13956
|
+
return jsx(GoAInput, Object.assign({}, props, {
|
|
13957
|
+
value: format(d, "hh:mm"),
|
|
13958
|
+
type: "time"
|
|
13959
|
+
}), void 0);
|
|
13960
|
+
} catch (e) {
|
|
13961
|
+
return jsx(GoAInput, Object.assign({}, props, {
|
|
13962
|
+
value: value,
|
|
13963
|
+
type: "time"
|
|
13964
|
+
}), void 0);
|
|
13965
|
+
}
|
|
13846
13966
|
};
|
|
13847
|
-
const GoAInputDateTime =
|
|
13967
|
+
const GoAInputDateTime = _a => {
|
|
13968
|
+
var {
|
|
13969
|
+
value
|
|
13970
|
+
} = _a,
|
|
13971
|
+
props = __rest(_a, ["value"]);
|
|
13972
|
+
|
|
13973
|
+
const d = typeof value === "string" ? new Date(value) : value;
|
|
13848
13974
|
return jsx(GoAInput, Object.assign({}, props, {
|
|
13975
|
+
value: format(d, "yyyy-MM-dd'T'hh:mm"),
|
|
13849
13976
|
type: "datetime-local"
|
|
13850
13977
|
}), void 0);
|
|
13851
13978
|
};
|
|
@@ -13886,15 +14013,22 @@ const GoAInputMonth = props => {
|
|
|
13886
14013
|
type: "month"
|
|
13887
14014
|
}), void 0);
|
|
13888
14015
|
};
|
|
13889
|
-
const GoAInputNumber =
|
|
14016
|
+
const GoAInputNumber = _a => {
|
|
14017
|
+
var {
|
|
14018
|
+
min,
|
|
14019
|
+
max,
|
|
14020
|
+
value
|
|
14021
|
+
} = _a,
|
|
14022
|
+
props = __rest(_a, ["min", "max", "value"]);
|
|
14023
|
+
|
|
13890
14024
|
return jsx(GoAInput, Object.assign({}, props, {
|
|
13891
|
-
|
|
14025
|
+
min: min === null || min === void 0 ? void 0 : min.toString(),
|
|
14026
|
+
max: max === null || max === void 0 ? void 0 : max.toString(),
|
|
14027
|
+
value: value.toString(),
|
|
13892
14028
|
type: "number"
|
|
13893
14029
|
}), void 0);
|
|
13894
14030
|
};
|
|
13895
|
-
const GoAInputRange =
|
|
13896
|
-
var props = __rest(_a, ["step"]);
|
|
13897
|
-
|
|
14031
|
+
const GoAInputRange = props => {
|
|
13898
14032
|
return jsx(GoAInput, Object.assign({}, props, {
|
|
13899
14033
|
type: "range"
|
|
13900
14034
|
}), void 0);
|
|
@@ -14285,12 +14419,12 @@ const GoAIconButton = ({
|
|
|
14285
14419
|
};
|
|
14286
14420
|
|
|
14287
14421
|
const GoAMicrositeHeader = ({
|
|
14288
|
-
|
|
14422
|
+
type,
|
|
14289
14423
|
version,
|
|
14290
14424
|
feedbackUrl
|
|
14291
14425
|
}) => {
|
|
14292
14426
|
return jsx("goa-microsite-header", {
|
|
14293
|
-
|
|
14427
|
+
type: type,
|
|
14294
14428
|
version: version,
|
|
14295
14429
|
feedbackurl: feedbackUrl
|
|
14296
14430
|
}, void 0);
|
|
@@ -14555,4 +14689,4 @@ function GoADivider(props) {
|
|
|
14555
14689
|
}, void 0);
|
|
14556
14690
|
}
|
|
14557
14691
|
|
|
14558
|
-
export { GoAAppFooter, GoAAppFooterMetaSection, GoAAppFooterNavSection, GoAAppHeader, GoABadge, GoAButton, GoAButtonGroup, GoACallout, GoACheckbox, GoAChip, GoACircularProgress, GoAContainer, GoADivider, GoADropdown, GoADropdownOption, GoAEmergencyBadge, GoAFlexCol, GoAFlexRow, GoAFormItem, GoAHeroBanner, GoAHeroBannerActions, GoAIcon, GoAIconButton, GoAInfoBadge, GoAInput, GoAInputDate, GoAInputDateTime, GoAInputEmail, GoAInputFile, GoAInputMonth, GoAInputNumber, GoAInputPassword, GoAInputRange, GoAInputSearch, GoAInputTel, GoAInputText, GoAInputTime, GoAInputUrl, GoAMicrositeHeader, GoAModal, GoANotification, GoAPage, GoAPageBlock, GoARadioGroup, GoARadioItem, GoASkeleton, GoASpinner, GoASuccessBadge, GoATextArea
|
|
14692
|
+
export { GoAAppFooter, GoAAppFooterMetaSection, GoAAppFooterNavSection, GoAAppHeader, GoABadge, GoAButton, GoAButtonGroup, GoACallout, GoACheckbox, GoAChip, GoACircularProgress, GoAContainer, GoADivider, GoADropdown, GoADropdownOption, GoAEmergencyBadge, GoAFlexCol, GoAFlexRow, GoAFormItem, GoAHeroBanner, GoAHeroBannerActions, GoAIcon, GoAIconButton, GoAImportantBadge, GoAInfoBadge, GoAInput, GoAInputDate, GoAInputDateTime, GoAInputEmail, GoAInputFile, GoAInputMonth, GoAInputNumber, GoAInputPassword, GoAInputRange, GoAInputSearch, GoAInputTel, GoAInputText, GoAInputTime, GoAInputUrl, GoAMicrositeHeader, GoAModal, GoANotification, GoAPage, GoAPageBlock, GoARadioGroup, GoARadioItem, GoASkeleton, GoASpinner, GoASuccessBadge, GoATextArea };
|