@abgov/react-components 4.0.0-alpha.24 → 4.0.0-alpha.27
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/README.md +9 -42
- package/lib/circular-progress/circular-progress.d.ts +3 -6
- package/package.json +1 -1
- package/react-components.esm.js +183 -238
- package/react-components.umd.js +184 -239
package/react-components.esm.js
CHANGED
|
@@ -1355,7 +1355,7 @@ function instance$y($$self, $$props, $$invalidate) {
|
|
|
1355
1355
|
class AppHeader extends SvelteElement {
|
|
1356
1356
|
constructor(options) {
|
|
1357
1357
|
super();
|
|
1358
|
-
this.shadowRoot.innerHTML = `<style>:host{box-sizing:border-box;font-family:var(--font-family)}.app-header{display:flex;align-items:center;justify-content:space-between;margin:0 auto;padding:1rem
|
|
1358
|
+
this.shadowRoot.innerHTML = `<style>:host{box-sizing:border-box;font-family:var(--font-family)}.app-header{display:flex;align-items:center;justify-content:space-between;margin:0 auto;padding:1rem 1.5rem;border-bottom:1px solid var(--color-gray-100)}@media(max-width: 640px){.app-header{padding:1rem 1rem}}.app-link{display:flex;align-items:center;text-decoration:none;color:inherit}.title{margin-left:0.5rem;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.image-desktop{display:none}.image-mobile{display:block}@media(min-width: 768px){.image-desktop{display:block}.image-mobile{display:none}.title{margin-left:1.75rem}.image-desktop{display:block}.image-mobile{display:none}}</style>`;
|
|
1359
1359
|
init(this, {
|
|
1360
1360
|
target: this.shadowRoot,
|
|
1361
1361
|
props: attribute_to_object(this.attributes),
|
|
@@ -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: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:
|
|
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.danger{color:var(--color-white);background:var(--goa-color-status-emergency);border-color:var(--goa-color-status-emergency)}.primary.danger:hover{background:var(--goa-color-status-emergency-dark);border-color:var(--goa-color-status-emergency-dark)}.primary.danger:focus,.primary.danger:active{background:var(--goa-color-status-emergency-dark);border-color:var(--goa-color-status-emergency-dark)}.secondary.danger{color:var(--goa-color-status-emergency);border-color:var(--goa-color-status-emergency);background:var(--color-white)}.secondary.danger:hover{border-color:var(--goa-color-status-emergency-dark);color:var(--goa-color-status-emergency-dark);background:var(--color-white)}.secondary.danger:focus,.secondary.danger:active{color:var(--goa-color-status-emergency-dark);border-color:var(--goa-color-status-emergency-dark);background:var(--color-white)}.tertiary.danger{color:var(--goa-color-status-emergency);border-color:var(--color-gray-200);background:var(--color-white)}.tertiary.danger:hover{border-color:var(--goa-color-status-emergency-dark);color:var(--goa-color-status-emergency-dark);background:var(--color-white)}.tertiary.danger:focus,.tertiary.danger: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),
|
|
@@ -2594,7 +2594,7 @@ function instance$u($$self, $$props, $$invalidate) {
|
|
|
2594
2594
|
type
|
|
2595
2595
|
} = $$props;
|
|
2596
2596
|
let {
|
|
2597
|
-
heading
|
|
2597
|
+
heading = ""
|
|
2598
2598
|
} = $$props;
|
|
2599
2599
|
let {
|
|
2600
2600
|
testid = ""
|
|
@@ -7664,7 +7664,7 @@ function create_if_block$9(ctx) {
|
|
|
7664
7664
|
ctx[2] && `--width: ${
|
|
7665
7665
|
/*width*/
|
|
7666
7666
|
ctx[2]};`) + ";");
|
|
7667
|
-
set_custom_element_data(goa_focus_trap, "
|
|
7667
|
+
set_custom_element_data(goa_focus_trap, "active",
|
|
7668
7668
|
/*open*/
|
|
7669
7669
|
ctx[1]);
|
|
7670
7670
|
},
|
|
@@ -7765,7 +7765,7 @@ function create_if_block$9(ctx) {
|
|
|
7765
7765
|
if (!current || dirty &
|
|
7766
7766
|
/*open*/
|
|
7767
7767
|
2) {
|
|
7768
|
-
set_custom_element_data(goa_focus_trap, "
|
|
7768
|
+
set_custom_element_data(goa_focus_trap, "active",
|
|
7769
7769
|
/*open*/
|
|
7770
7770
|
ctx[1]);
|
|
7771
7771
|
}
|
|
@@ -8497,10 +8497,10 @@ function create_if_block$7(ctx) {
|
|
|
8497
8497
|
function select_block_type(ctx, dirty) {
|
|
8498
8498
|
if (
|
|
8499
8499
|
/*fullscreen*/
|
|
8500
|
-
ctx[
|
|
8500
|
+
ctx[3]) return 0;
|
|
8501
8501
|
if (
|
|
8502
8502
|
/*inline*/
|
|
8503
|
-
ctx[
|
|
8503
|
+
ctx[4]) return 1;
|
|
8504
8504
|
return -1;
|
|
8505
8505
|
}
|
|
8506
8506
|
|
|
@@ -8578,39 +8578,35 @@ function create_if_block$7(ctx) {
|
|
|
8578
8578
|
}
|
|
8579
8579
|
|
|
8580
8580
|
};
|
|
8581
|
-
} // (
|
|
8581
|
+
} // (38:19)
|
|
8582
8582
|
|
|
8583
8583
|
|
|
8584
8584
|
function create_if_block_3$1(ctx) {
|
|
8585
8585
|
let div;
|
|
8586
8586
|
let goa_spinner;
|
|
8587
|
-
let goa_spinner_progress_value;
|
|
8588
8587
|
let t;
|
|
8589
8588
|
let div_class_value;
|
|
8590
8589
|
let if_block =
|
|
8591
8590
|
/*message*/
|
|
8592
|
-
ctx[
|
|
8591
|
+
ctx[0] && create_if_block_4(ctx);
|
|
8593
8592
|
return {
|
|
8594
8593
|
c() {
|
|
8595
8594
|
div = element("div");
|
|
8596
8595
|
goa_spinner = element("goa-spinner");
|
|
8597
8596
|
t = space();
|
|
8598
8597
|
if (if_block) if_block.c();
|
|
8599
|
-
set_custom_element_data(goa_spinner, "type",
|
|
8600
|
-
/*type*/
|
|
8601
|
-
ctx[0]);
|
|
8602
8598
|
set_custom_element_data(goa_spinner, "size",
|
|
8603
8599
|
/*spinnerSize*/
|
|
8604
|
-
ctx[
|
|
8605
|
-
set_custom_element_data(goa_spinner, "progress",
|
|
8600
|
+
ctx[2]);
|
|
8601
|
+
set_custom_element_data(goa_spinner, "progress",
|
|
8606
8602
|
/*progress*/
|
|
8607
|
-
ctx[
|
|
8603
|
+
ctx[1]);
|
|
8608
8604
|
attr(div, "class", div_class_value = "spinner-" +
|
|
8609
8605
|
/*spinnerSize*/
|
|
8610
|
-
ctx[
|
|
8606
|
+
ctx[2]);
|
|
8611
8607
|
toggle_class(div, "inline",
|
|
8612
8608
|
/*inline*/
|
|
8613
|
-
ctx[
|
|
8609
|
+
ctx[4]);
|
|
8614
8610
|
},
|
|
8615
8611
|
|
|
8616
8612
|
m(target, anchor) {
|
|
@@ -8621,33 +8617,25 @@ function create_if_block_3$1(ctx) {
|
|
|
8621
8617
|
},
|
|
8622
8618
|
|
|
8623
8619
|
p(ctx, dirty) {
|
|
8624
|
-
if (dirty &
|
|
8625
|
-
/*type*/
|
|
8626
|
-
1) {
|
|
8627
|
-
set_custom_element_data(goa_spinner, "type",
|
|
8628
|
-
/*type*/
|
|
8629
|
-
ctx[0]);
|
|
8630
|
-
}
|
|
8631
|
-
|
|
8632
8620
|
if (dirty &
|
|
8633
8621
|
/*spinnerSize*/
|
|
8634
|
-
|
|
8622
|
+
4) {
|
|
8635
8623
|
set_custom_element_data(goa_spinner, "size",
|
|
8636
8624
|
/*spinnerSize*/
|
|
8637
|
-
ctx[
|
|
8625
|
+
ctx[2]);
|
|
8638
8626
|
}
|
|
8639
8627
|
|
|
8640
8628
|
if (dirty &
|
|
8641
8629
|
/*progress*/
|
|
8642
|
-
|
|
8643
|
-
|
|
8644
|
-
|
|
8645
|
-
|
|
8630
|
+
2) {
|
|
8631
|
+
set_custom_element_data(goa_spinner, "progress",
|
|
8632
|
+
/*progress*/
|
|
8633
|
+
ctx[1]);
|
|
8646
8634
|
}
|
|
8647
8635
|
|
|
8648
8636
|
if (
|
|
8649
8637
|
/*message*/
|
|
8650
|
-
ctx[
|
|
8638
|
+
ctx[0]) {
|
|
8651
8639
|
if (if_block) {
|
|
8652
8640
|
if_block.p(ctx, dirty);
|
|
8653
8641
|
} else {
|
|
@@ -8662,18 +8650,18 @@ function create_if_block_3$1(ctx) {
|
|
|
8662
8650
|
|
|
8663
8651
|
if (dirty &
|
|
8664
8652
|
/*spinnerSize*/
|
|
8665
|
-
|
|
8653
|
+
4 && div_class_value !== (div_class_value = "spinner-" +
|
|
8666
8654
|
/*spinnerSize*/
|
|
8667
|
-
ctx[
|
|
8655
|
+
ctx[2])) {
|
|
8668
8656
|
attr(div, "class", div_class_value);
|
|
8669
8657
|
}
|
|
8670
8658
|
|
|
8671
8659
|
if (dirty &
|
|
8672
8660
|
/*spinnerSize, inline*/
|
|
8673
|
-
|
|
8661
|
+
20) {
|
|
8674
8662
|
toggle_class(div, "inline",
|
|
8675
8663
|
/*inline*/
|
|
8676
|
-
ctx[
|
|
8664
|
+
ctx[4]);
|
|
8677
8665
|
}
|
|
8678
8666
|
},
|
|
8679
8667
|
|
|
@@ -8686,13 +8674,12 @@ function create_if_block_3$1(ctx) {
|
|
|
8686
8674
|
}
|
|
8687
8675
|
|
|
8688
8676
|
};
|
|
8689
|
-
} // (
|
|
8677
|
+
} // (27:2) {#if fullscreen}
|
|
8690
8678
|
|
|
8691
8679
|
|
|
8692
8680
|
function create_if_block_1$4(ctx) {
|
|
8693
8681
|
let div;
|
|
8694
8682
|
let goa_spinner;
|
|
8695
|
-
let goa_spinner_progress_value;
|
|
8696
8683
|
let t;
|
|
8697
8684
|
let div_transition;
|
|
8698
8685
|
let current;
|
|
@@ -8700,25 +8687,22 @@ function create_if_block_1$4(ctx) {
|
|
|
8700
8687
|
let dispose;
|
|
8701
8688
|
let if_block =
|
|
8702
8689
|
/*message*/
|
|
8703
|
-
ctx[
|
|
8690
|
+
ctx[0] && create_if_block_2$3(ctx);
|
|
8704
8691
|
return {
|
|
8705
8692
|
c() {
|
|
8706
8693
|
div = element("div");
|
|
8707
8694
|
goa_spinner = element("goa-spinner");
|
|
8708
8695
|
t = space();
|
|
8709
8696
|
if (if_block) if_block.c();
|
|
8710
|
-
set_custom_element_data(goa_spinner, "type",
|
|
8711
|
-
/*type*/
|
|
8712
|
-
ctx[0]);
|
|
8713
8697
|
set_custom_element_data(goa_spinner, "size",
|
|
8714
8698
|
/*spinnerSize*/
|
|
8715
|
-
ctx[
|
|
8716
|
-
set_custom_element_data(goa_spinner, "progress",
|
|
8699
|
+
ctx[2]);
|
|
8700
|
+
set_custom_element_data(goa_spinner, "progress",
|
|
8717
8701
|
/*progress*/
|
|
8718
|
-
ctx[
|
|
8702
|
+
ctx[1]);
|
|
8719
8703
|
toggle_class(div, "fullscreen",
|
|
8720
8704
|
/*fullscreen*/
|
|
8721
|
-
ctx[
|
|
8705
|
+
ctx[3]);
|
|
8722
8706
|
},
|
|
8723
8707
|
|
|
8724
8708
|
m(target, anchor) {
|
|
@@ -8737,33 +8721,25 @@ function create_if_block_1$4(ctx) {
|
|
|
8737
8721
|
},
|
|
8738
8722
|
|
|
8739
8723
|
p(ctx, dirty) {
|
|
8740
|
-
if (!current || dirty &
|
|
8741
|
-
/*type*/
|
|
8742
|
-
1) {
|
|
8743
|
-
set_custom_element_data(goa_spinner, "type",
|
|
8744
|
-
/*type*/
|
|
8745
|
-
ctx[0]);
|
|
8746
|
-
}
|
|
8747
|
-
|
|
8748
8724
|
if (!current || dirty &
|
|
8749
8725
|
/*spinnerSize*/
|
|
8750
|
-
|
|
8726
|
+
4) {
|
|
8751
8727
|
set_custom_element_data(goa_spinner, "size",
|
|
8752
8728
|
/*spinnerSize*/
|
|
8753
|
-
ctx[
|
|
8729
|
+
ctx[2]);
|
|
8754
8730
|
}
|
|
8755
8731
|
|
|
8756
8732
|
if (!current || dirty &
|
|
8757
8733
|
/*progress*/
|
|
8758
|
-
|
|
8759
|
-
|
|
8760
|
-
|
|
8761
|
-
|
|
8734
|
+
2) {
|
|
8735
|
+
set_custom_element_data(goa_spinner, "progress",
|
|
8736
|
+
/*progress*/
|
|
8737
|
+
ctx[1]);
|
|
8762
8738
|
}
|
|
8763
8739
|
|
|
8764
8740
|
if (
|
|
8765
8741
|
/*message*/
|
|
8766
|
-
ctx[
|
|
8742
|
+
ctx[0]) {
|
|
8767
8743
|
if (if_block) {
|
|
8768
8744
|
if_block.p(ctx, dirty);
|
|
8769
8745
|
} else {
|
|
@@ -8778,10 +8754,10 @@ function create_if_block_1$4(ctx) {
|
|
|
8778
8754
|
|
|
8779
8755
|
if (dirty &
|
|
8780
8756
|
/*fullscreen*/
|
|
8781
|
-
|
|
8757
|
+
8) {
|
|
8782
8758
|
toggle_class(div, "fullscreen",
|
|
8783
8759
|
/*fullscreen*/
|
|
8784
|
-
ctx[
|
|
8760
|
+
ctx[3]);
|
|
8785
8761
|
}
|
|
8786
8762
|
},
|
|
8787
8763
|
|
|
@@ -8813,7 +8789,7 @@ function create_if_block_1$4(ctx) {
|
|
|
8813
8789
|
}
|
|
8814
8790
|
|
|
8815
8791
|
};
|
|
8816
|
-
} // (
|
|
8792
|
+
} // (41:6) {#if message}
|
|
8817
8793
|
|
|
8818
8794
|
|
|
8819
8795
|
function create_if_block_4(ctx) {
|
|
@@ -8824,7 +8800,7 @@ function create_if_block_4(ctx) {
|
|
|
8824
8800
|
div = element("div");
|
|
8825
8801
|
t = text(
|
|
8826
8802
|
/*message*/
|
|
8827
|
-
ctx[
|
|
8803
|
+
ctx[0]);
|
|
8828
8804
|
attr(div, "class", "message");
|
|
8829
8805
|
},
|
|
8830
8806
|
|
|
@@ -8836,9 +8812,9 @@ function create_if_block_4(ctx) {
|
|
|
8836
8812
|
p(ctx, dirty) {
|
|
8837
8813
|
if (dirty &
|
|
8838
8814
|
/*message*/
|
|
8839
|
-
|
|
8815
|
+
1) set_data(t,
|
|
8840
8816
|
/*message*/
|
|
8841
|
-
ctx[
|
|
8817
|
+
ctx[0]);
|
|
8842
8818
|
},
|
|
8843
8819
|
|
|
8844
8820
|
d(detaching) {
|
|
@@ -8846,7 +8822,7 @@ function create_if_block_4(ctx) {
|
|
|
8846
8822
|
}
|
|
8847
8823
|
|
|
8848
8824
|
};
|
|
8849
|
-
} // (
|
|
8825
|
+
} // (34:6) {#if message}
|
|
8850
8826
|
|
|
8851
8827
|
|
|
8852
8828
|
function create_if_block_2$3(ctx) {
|
|
@@ -8857,7 +8833,7 @@ function create_if_block_2$3(ctx) {
|
|
|
8857
8833
|
div = element("div");
|
|
8858
8834
|
t = text(
|
|
8859
8835
|
/*message*/
|
|
8860
|
-
ctx[
|
|
8836
|
+
ctx[0]);
|
|
8861
8837
|
attr(div, "class", "message");
|
|
8862
8838
|
},
|
|
8863
8839
|
|
|
@@ -8869,9 +8845,9 @@ function create_if_block_2$3(ctx) {
|
|
|
8869
8845
|
p(ctx, dirty) {
|
|
8870
8846
|
if (dirty &
|
|
8871
8847
|
/*message*/
|
|
8872
|
-
|
|
8848
|
+
1) set_data(t,
|
|
8873
8849
|
/*message*/
|
|
8874
|
-
ctx[
|
|
8850
|
+
ctx[0]);
|
|
8875
8851
|
},
|
|
8876
8852
|
|
|
8877
8853
|
d(detaching) {
|
|
@@ -8886,7 +8862,7 @@ function create_fragment$f(ctx) {
|
|
|
8886
8862
|
let current;
|
|
8887
8863
|
let if_block =
|
|
8888
8864
|
/*isVisible*/
|
|
8889
|
-
ctx[
|
|
8865
|
+
ctx[5] && create_if_block$7(ctx);
|
|
8890
8866
|
return {
|
|
8891
8867
|
c() {
|
|
8892
8868
|
if (if_block) if_block.c();
|
|
@@ -8903,13 +8879,13 @@ function create_fragment$f(ctx) {
|
|
|
8903
8879
|
p(ctx, [dirty]) {
|
|
8904
8880
|
if (
|
|
8905
8881
|
/*isVisible*/
|
|
8906
|
-
ctx[
|
|
8882
|
+
ctx[5]) {
|
|
8907
8883
|
if (if_block) {
|
|
8908
8884
|
if_block.p(ctx, dirty);
|
|
8909
8885
|
|
|
8910
8886
|
if (dirty &
|
|
8911
8887
|
/*isVisible*/
|
|
8912
|
-
|
|
8888
|
+
32) {
|
|
8913
8889
|
transition_in(if_block, 1);
|
|
8914
8890
|
}
|
|
8915
8891
|
} else {
|
|
@@ -8948,9 +8924,6 @@ function create_fragment$f(ctx) {
|
|
|
8948
8924
|
|
|
8949
8925
|
function instance$e($$self, $$props, $$invalidate) {
|
|
8950
8926
|
let isVisible;
|
|
8951
|
-
let {
|
|
8952
|
-
type = "infinite"
|
|
8953
|
-
} = $$props;
|
|
8954
8927
|
let {
|
|
8955
8928
|
variant = "inline"
|
|
8956
8929
|
} = $$props;
|
|
@@ -8961,7 +8934,7 @@ function instance$e($$self, $$props, $$invalidate) {
|
|
|
8961
8934
|
message = ""
|
|
8962
8935
|
} = $$props;
|
|
8963
8936
|
let {
|
|
8964
|
-
progress =
|
|
8937
|
+
progress = -1
|
|
8965
8938
|
} = $$props;
|
|
8966
8939
|
let {
|
|
8967
8940
|
visible = "false"
|
|
@@ -8970,29 +8943,28 @@ function instance$e($$self, $$props, $$invalidate) {
|
|
|
8970
8943
|
let fullscreen;
|
|
8971
8944
|
let inline;
|
|
8972
8945
|
onMount(async () => {
|
|
8973
|
-
$$invalidate(
|
|
8974
|
-
$$invalidate(
|
|
8975
|
-
$$invalidate(
|
|
8946
|
+
$$invalidate(2, spinnerSize = size === "small" ? "large" : "xlarge");
|
|
8947
|
+
$$invalidate(3, fullscreen = variant === "fullscreen");
|
|
8948
|
+
$$invalidate(4, inline = variant === "inline");
|
|
8976
8949
|
});
|
|
8977
8950
|
|
|
8978
8951
|
$$self.$$set = $$props => {
|
|
8979
|
-
if ('
|
|
8980
|
-
if ('
|
|
8981
|
-
if ('
|
|
8982
|
-
if ('
|
|
8983
|
-
if ('
|
|
8984
|
-
if ('visible' in $$props) $$invalidate(9, visible = $$props.visible);
|
|
8952
|
+
if ('variant' in $$props) $$invalidate(6, variant = $$props.variant);
|
|
8953
|
+
if ('size' in $$props) $$invalidate(7, size = $$props.size);
|
|
8954
|
+
if ('message' in $$props) $$invalidate(0, message = $$props.message);
|
|
8955
|
+
if ('progress' in $$props) $$invalidate(1, progress = $$props.progress);
|
|
8956
|
+
if ('visible' in $$props) $$invalidate(8, visible = $$props.visible);
|
|
8985
8957
|
};
|
|
8986
8958
|
|
|
8987
8959
|
$$self.$$.update = () => {
|
|
8988
8960
|
if ($$self.$$.dirty &
|
|
8989
8961
|
/*visible*/
|
|
8990
|
-
|
|
8991
|
-
$$invalidate(
|
|
8962
|
+
256) {
|
|
8963
|
+
$$invalidate(5, isVisible = toBoolean(visible));
|
|
8992
8964
|
}
|
|
8993
8965
|
};
|
|
8994
8966
|
|
|
8995
|
-
return [
|
|
8967
|
+
return [message, progress, spinnerSize, fullscreen, inline, isVisible, variant, size, visible];
|
|
8996
8968
|
}
|
|
8997
8969
|
|
|
8998
8970
|
class CircularProgress extends SvelteElement {
|
|
@@ -9004,12 +8976,11 @@ class CircularProgress extends SvelteElement {
|
|
|
9004
8976
|
props: attribute_to_object(this.attributes),
|
|
9005
8977
|
customElement: true
|
|
9006
8978
|
}, instance$e, create_fragment$f, safe_not_equal, {
|
|
9007
|
-
|
|
9008
|
-
|
|
9009
|
-
|
|
9010
|
-
|
|
9011
|
-
|
|
9012
|
-
visible: 9
|
|
8979
|
+
variant: 6,
|
|
8980
|
+
size: 7,
|
|
8981
|
+
message: 0,
|
|
8982
|
+
progress: 1,
|
|
8983
|
+
visible: 8
|
|
9013
8984
|
}, null);
|
|
9014
8985
|
|
|
9015
8986
|
if (options) {
|
|
@@ -9025,22 +8996,11 @@ class CircularProgress extends SvelteElement {
|
|
|
9025
8996
|
}
|
|
9026
8997
|
|
|
9027
8998
|
static get observedAttributes() {
|
|
9028
|
-
return ["
|
|
9029
|
-
}
|
|
9030
|
-
|
|
9031
|
-
get type() {
|
|
9032
|
-
return this.$$.ctx[0];
|
|
9033
|
-
}
|
|
9034
|
-
|
|
9035
|
-
set type(type) {
|
|
9036
|
-
this.$$set({
|
|
9037
|
-
type
|
|
9038
|
-
});
|
|
9039
|
-
flush();
|
|
8999
|
+
return ["variant", "size", "message", "progress", "visible"];
|
|
9040
9000
|
}
|
|
9041
9001
|
|
|
9042
9002
|
get variant() {
|
|
9043
|
-
return this.$$.ctx[
|
|
9003
|
+
return this.$$.ctx[6];
|
|
9044
9004
|
}
|
|
9045
9005
|
|
|
9046
9006
|
set variant(variant) {
|
|
@@ -9051,7 +9011,7 @@ class CircularProgress extends SvelteElement {
|
|
|
9051
9011
|
}
|
|
9052
9012
|
|
|
9053
9013
|
get size() {
|
|
9054
|
-
return this.$$.ctx[
|
|
9014
|
+
return this.$$.ctx[7];
|
|
9055
9015
|
}
|
|
9056
9016
|
|
|
9057
9017
|
set size(size) {
|
|
@@ -9062,7 +9022,7 @@ class CircularProgress extends SvelteElement {
|
|
|
9062
9022
|
}
|
|
9063
9023
|
|
|
9064
9024
|
get message() {
|
|
9065
|
-
return this.$$.ctx[
|
|
9025
|
+
return this.$$.ctx[0];
|
|
9066
9026
|
}
|
|
9067
9027
|
|
|
9068
9028
|
set message(message) {
|
|
@@ -9073,7 +9033,7 @@ class CircularProgress extends SvelteElement {
|
|
|
9073
9033
|
}
|
|
9074
9034
|
|
|
9075
9035
|
get progress() {
|
|
9076
|
-
return this.$$.ctx[
|
|
9036
|
+
return this.$$.ctx[1];
|
|
9077
9037
|
}
|
|
9078
9038
|
|
|
9079
9039
|
set progress(progress) {
|
|
@@ -9084,7 +9044,7 @@ class CircularProgress extends SvelteElement {
|
|
|
9084
9044
|
}
|
|
9085
9045
|
|
|
9086
9046
|
get visible() {
|
|
9087
|
-
return this.$$.ctx[
|
|
9047
|
+
return this.$$.ctx[8];
|
|
9088
9048
|
}
|
|
9089
9049
|
|
|
9090
9050
|
set visible(visible) {
|
|
@@ -9876,7 +9836,7 @@ function create_if_block_3(ctx) {
|
|
|
9876
9836
|
}
|
|
9877
9837
|
|
|
9878
9838
|
};
|
|
9879
|
-
} // (
|
|
9839
|
+
} // (34:2) {#if ["alpha", "beta"].includes(level)}
|
|
9880
9840
|
|
|
9881
9841
|
|
|
9882
9842
|
function create_if_block_1$3(ctx) {
|
|
@@ -9903,7 +9863,7 @@ function create_if_block_1$3(ctx) {
|
|
|
9903
9863
|
t2 = text("This is a new ");
|
|
9904
9864
|
a = element("a");
|
|
9905
9865
|
a.textContent = "Alberta Government";
|
|
9906
|
-
t4 = text("
|
|
9866
|
+
t4 = text(" service\n ");
|
|
9907
9867
|
if (if_block) if_block.c();
|
|
9908
9868
|
attr(div0, "data-testid", "level");
|
|
9909
9869
|
attr(div0, "class", div0_class_value = "service-level service-level--" +
|
|
@@ -9964,7 +9924,7 @@ function create_if_block_1$3(ctx) {
|
|
|
9964
9924
|
}
|
|
9965
9925
|
|
|
9966
9926
|
};
|
|
9967
|
-
} // (
|
|
9927
|
+
} // (43:6) {#if feedbackurl}
|
|
9968
9928
|
|
|
9969
9929
|
|
|
9970
9930
|
function create_if_block_2$2(ctx) {
|
|
@@ -10006,7 +9966,7 @@ function create_if_block_2$2(ctx) {
|
|
|
10006
9966
|
}
|
|
10007
9967
|
|
|
10008
9968
|
};
|
|
10009
|
-
} // (
|
|
9969
|
+
} // (49:2) {#if version}
|
|
10010
9970
|
|
|
10011
9971
|
|
|
10012
9972
|
function create_if_block$6(ctx) {
|
|
@@ -10174,7 +10134,7 @@ function instance$a($$self, $$props, $$invalidate) {
|
|
|
10174
10134
|
class MicrositeHeader extends SvelteElement {
|
|
10175
10135
|
constructor(options) {
|
|
10176
10136
|
super();
|
|
10177
|
-
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-
|
|
10137
|
+
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-level{font-weight:bold;padding:0.25rem;display:flex;margin-right:1rem;line-height:initial}.service-level--alpha{background-color:var(--goa-color-status-warning);color:var(--goa-color-text)}.service-level--beta{background-color:var(--goa-color-brand);color:var(--goa-color-text-light)}.service-level--live{padding:0}.site-text{color:var(--goa-color-text);line-height:1.25rem}</style>`;
|
|
10178
10138
|
init(this, {
|
|
10179
10139
|
target: this.shadowRoot,
|
|
10180
10140
|
props: attribute_to_object(this.attributes),
|
|
@@ -11046,7 +11006,7 @@ function create_if_block$4(ctx) {
|
|
|
11046
11006
|
attr(path, "stroke-linecap", "round");
|
|
11047
11007
|
attr(svg, "class", svg_class_value = `spinner-${
|
|
11048
11008
|
/*type*/
|
|
11049
|
-
ctx[
|
|
11009
|
+
ctx[2]}`);
|
|
11050
11010
|
attr(svg, "fill", "none");
|
|
11051
11011
|
attr(svg, "viewBox", svg_viewBox_value = "0 0 " +
|
|
11052
11012
|
/*diameter*/
|
|
@@ -11061,7 +11021,7 @@ function create_if_block$4(ctx) {
|
|
|
11061
11021
|
ctx[5]);
|
|
11062
11022
|
attr(svg, "data-testid",
|
|
11063
11023
|
/*testid*/
|
|
11064
|
-
ctx[
|
|
11024
|
+
ctx[1]);
|
|
11065
11025
|
attr(svg, "xmlns", "http://www.w3.org/2000/svg");
|
|
11066
11026
|
},
|
|
11067
11027
|
|
|
@@ -11142,9 +11102,9 @@ function create_if_block$4(ctx) {
|
|
|
11142
11102
|
|
|
11143
11103
|
if (dirty &
|
|
11144
11104
|
/*type*/
|
|
11145
|
-
|
|
11105
|
+
4 && svg_class_value !== (svg_class_value = `spinner-${
|
|
11146
11106
|
/*type*/
|
|
11147
|
-
ctx[
|
|
11107
|
+
ctx[2]}`)) {
|
|
11148
11108
|
attr(svg, "class", svg_class_value);
|
|
11149
11109
|
}
|
|
11150
11110
|
|
|
@@ -11176,10 +11136,10 @@ function create_if_block$4(ctx) {
|
|
|
11176
11136
|
|
|
11177
11137
|
if (dirty &
|
|
11178
11138
|
/*testid*/
|
|
11179
|
-
|
|
11139
|
+
2) {
|
|
11180
11140
|
attr(svg, "data-testid",
|
|
11181
11141
|
/*testid*/
|
|
11182
|
-
ctx[
|
|
11142
|
+
ctx[1]);
|
|
11183
11143
|
}
|
|
11184
11144
|
},
|
|
11185
11145
|
|
|
@@ -11249,14 +11209,12 @@ function instance$8($$self, $$props, $$invalidate) {
|
|
|
11249
11209
|
invert = false
|
|
11250
11210
|
} = $$props;
|
|
11251
11211
|
let {
|
|
11252
|
-
|
|
11253
|
-
} = $$props;
|
|
11254
|
-
let {
|
|
11255
|
-
progress = "0"
|
|
11212
|
+
progress = -1
|
|
11256
11213
|
} = $$props;
|
|
11257
11214
|
let {
|
|
11258
11215
|
testid = ""
|
|
11259
11216
|
} = $$props;
|
|
11217
|
+
let type = "infinite";
|
|
11260
11218
|
|
|
11261
11219
|
const _progress = tweened(0, {
|
|
11262
11220
|
duration: 500,
|
|
@@ -11293,9 +11251,8 @@ function instance$8($$self, $$props, $$invalidate) {
|
|
|
11293
11251
|
$$self.$$set = $$props => {
|
|
11294
11252
|
if ('size' in $$props) $$invalidate(10, size = $$props.size);
|
|
11295
11253
|
if ('invert' in $$props) $$invalidate(0, invert = $$props.invert);
|
|
11296
|
-
if ('type' in $$props) $$invalidate(1, type = $$props.type);
|
|
11297
11254
|
if ('progress' in $$props) $$invalidate(11, progress = $$props.progress);
|
|
11298
|
-
if ('testid' in $$props) $$invalidate(
|
|
11255
|
+
if ('testid' in $$props) $$invalidate(1, testid = $$props.testid);
|
|
11299
11256
|
};
|
|
11300
11257
|
|
|
11301
11258
|
$$self.$$.update = () => {
|
|
@@ -11304,7 +11261,16 @@ function instance$8($$self, $$props, $$invalidate) {
|
|
|
11304
11261
|
2048) {
|
|
11305
11262
|
// Reactive
|
|
11306
11263
|
{
|
|
11307
|
-
|
|
11264
|
+
// Typescript recognizes `progress` as a number, but once compiled, due to it being a web component, progress is a string.
|
|
11265
|
+
// This line makes both sides happy.
|
|
11266
|
+
const p = parseFloat(progress + '');
|
|
11267
|
+
|
|
11268
|
+
if (p >= 0) {
|
|
11269
|
+
_progress.set(p || 1); // start at 1 to prevent incorrect arc calculations
|
|
11270
|
+
|
|
11271
|
+
|
|
11272
|
+
$$invalidate(2, type = "progress");
|
|
11273
|
+
}
|
|
11308
11274
|
}
|
|
11309
11275
|
}
|
|
11310
11276
|
|
|
@@ -11344,12 +11310,12 @@ function instance$8($$self, $$props, $$invalidate) {
|
|
|
11344
11310
|
|
|
11345
11311
|
if ($$self.$$.dirty &
|
|
11346
11312
|
/*type, pathRadius, progress*/
|
|
11347
|
-
|
|
11313
|
+
6148) {
|
|
11348
11314
|
$$invalidate(6, ready = type === "infinite" ? pathRadius : pathRadius && progress);
|
|
11349
11315
|
}
|
|
11350
11316
|
};
|
|
11351
11317
|
|
|
11352
|
-
return [invert,
|
|
11318
|
+
return [invert, testid, type, radius, strokewidth, diameter, ready, $_progress, _progress, getArc, size, progress, pathRadius];
|
|
11353
11319
|
}
|
|
11354
11320
|
|
|
11355
11321
|
class Spinner extends SvelteElement {
|
|
@@ -11363,9 +11329,8 @@ class Spinner extends SvelteElement {
|
|
|
11363
11329
|
}, instance$8, create_fragment$9, safe_not_equal, {
|
|
11364
11330
|
size: 10,
|
|
11365
11331
|
invert: 0,
|
|
11366
|
-
type: 1,
|
|
11367
11332
|
progress: 11,
|
|
11368
|
-
testid:
|
|
11333
|
+
testid: 1
|
|
11369
11334
|
}, null);
|
|
11370
11335
|
|
|
11371
11336
|
if (options) {
|
|
@@ -11381,7 +11346,7 @@ class Spinner extends SvelteElement {
|
|
|
11381
11346
|
}
|
|
11382
11347
|
|
|
11383
11348
|
static get observedAttributes() {
|
|
11384
|
-
return ["size", "invert", "
|
|
11349
|
+
return ["size", "invert", "progress", "testid"];
|
|
11385
11350
|
}
|
|
11386
11351
|
|
|
11387
11352
|
get size() {
|
|
@@ -11406,17 +11371,6 @@ class Spinner extends SvelteElement {
|
|
|
11406
11371
|
flush();
|
|
11407
11372
|
}
|
|
11408
11373
|
|
|
11409
|
-
get type() {
|
|
11410
|
-
return this.$$.ctx[1];
|
|
11411
|
-
}
|
|
11412
|
-
|
|
11413
|
-
set type(type) {
|
|
11414
|
-
this.$$set({
|
|
11415
|
-
type
|
|
11416
|
-
});
|
|
11417
|
-
flush();
|
|
11418
|
-
}
|
|
11419
|
-
|
|
11420
11374
|
get progress() {
|
|
11421
11375
|
return this.$$.ctx[11];
|
|
11422
11376
|
}
|
|
@@ -11429,7 +11383,7 @@ class Spinner extends SvelteElement {
|
|
|
11429
11383
|
}
|
|
11430
11384
|
|
|
11431
11385
|
get testid() {
|
|
11432
|
-
return this.$$.ctx[
|
|
11386
|
+
return this.$$.ctx[1];
|
|
11433
11387
|
}
|
|
11434
11388
|
|
|
11435
11389
|
set testid(testid) {
|
|
@@ -12025,7 +11979,9 @@ function create_fragment$7(ctx) {
|
|
|
12025
11979
|
return {
|
|
12026
11980
|
c() {
|
|
12027
11981
|
div = element("div");
|
|
12028
|
-
div.innerHTML = `<slot></slot
|
|
11982
|
+
div.innerHTML = `<slot></slot>
|
|
11983
|
+
|
|
11984
|
+
<span tabindex="0"></span>`;
|
|
12029
11985
|
this.c = noop;
|
|
12030
11986
|
},
|
|
12031
11987
|
|
|
@@ -12033,7 +11989,7 @@ function create_fragment$7(ctx) {
|
|
|
12033
11989
|
insert(target, div, anchor);
|
|
12034
11990
|
/*div_binding*/
|
|
12035
11991
|
|
|
12036
|
-
ctx[
|
|
11992
|
+
ctx[4](div);
|
|
12037
11993
|
},
|
|
12038
11994
|
|
|
12039
11995
|
p: noop,
|
|
@@ -12044,20 +12000,16 @@ function create_fragment$7(ctx) {
|
|
|
12044
12000
|
if (detaching) detach(div);
|
|
12045
12001
|
/*div_binding*/
|
|
12046
12002
|
|
|
12047
|
-
ctx[
|
|
12003
|
+
ctx[4](null);
|
|
12048
12004
|
}
|
|
12049
12005
|
|
|
12050
12006
|
};
|
|
12051
12007
|
}
|
|
12052
12008
|
|
|
12053
12009
|
function isFocusable(element) {
|
|
12054
|
-
|
|
12055
|
-
|
|
12056
|
-
|
|
12057
|
-
|
|
12058
|
-
if (element.disabled) {
|
|
12059
|
-
return false;
|
|
12060
|
-
}
|
|
12010
|
+
const isTabbable = element.tabIndex > 0 || element.tabIndex === 0 && element.getAttribute('tabIndex') !== null;
|
|
12011
|
+
if (isTabbable) return true;
|
|
12012
|
+
if (element.disabled) return false;
|
|
12061
12013
|
|
|
12062
12014
|
switch (element.nodeName) {
|
|
12063
12015
|
case 'A':
|
|
@@ -12077,13 +12029,14 @@ function isFocusable(element) {
|
|
|
12077
12029
|
}
|
|
12078
12030
|
|
|
12079
12031
|
function instance$6($$self, $$props, $$invalidate) {
|
|
12080
|
-
let
|
|
12032
|
+
let isActive;
|
|
12033
|
+
let {
|
|
12034
|
+
active
|
|
12035
|
+
} = $$props;
|
|
12081
12036
|
let ignoreFocusChanges = false;
|
|
12082
12037
|
let lastFocus;
|
|
12083
12038
|
let element;
|
|
12084
|
-
let
|
|
12085
|
-
open
|
|
12086
|
-
} = $$props;
|
|
12039
|
+
let hasListeners = false;
|
|
12087
12040
|
|
|
12088
12041
|
function removeListeners() {
|
|
12089
12042
|
document.removeEventListener('focus', trapFocus, true);
|
|
@@ -12091,15 +12044,18 @@ function instance$6($$self, $$props, $$invalidate) {
|
|
|
12091
12044
|
|
|
12092
12045
|
function addListeners() {
|
|
12093
12046
|
document.addEventListener('focus', trapFocus, true);
|
|
12094
|
-
}
|
|
12047
|
+
} // ====
|
|
12048
|
+
// First Node
|
|
12049
|
+
// ====
|
|
12095
12050
|
|
|
12096
|
-
function attemptFocusOnFirstDescendant(descendants) {
|
|
12097
|
-
if (!descendants) return false;
|
|
12098
12051
|
|
|
12099
|
-
|
|
12100
|
-
|
|
12052
|
+
function focusOnFirstNode(nodes) {
|
|
12053
|
+
if (!nodes) return false;
|
|
12101
12054
|
|
|
12102
|
-
|
|
12055
|
+
for (const node of nodes) {
|
|
12056
|
+
const isFocusable = focus(node) || focusOnFirstNode(node.childNodes) || focusOnFirstNodeOfSlot(node) || focusOnFirstNodeOfShadowDOM(node);
|
|
12057
|
+
|
|
12058
|
+
if (isFocusable) {
|
|
12103
12059
|
return true;
|
|
12104
12060
|
}
|
|
12105
12061
|
}
|
|
@@ -12107,37 +12063,34 @@ function instance$6($$self, $$props, $$invalidate) {
|
|
|
12107
12063
|
return false;
|
|
12108
12064
|
}
|
|
12109
12065
|
|
|
12110
|
-
function
|
|
12111
|
-
|
|
12112
|
-
|
|
12113
|
-
if (node instanceof HTMLSlotElement) {
|
|
12114
|
-
let assingedNodesOfSlotElement = (_a = node) === null || _a === void 0 ? void 0 : _a.assignedNodes();
|
|
12066
|
+
function focusOnFirstNodeOfSlot(node) {
|
|
12067
|
+
if (!(node instanceof HTMLSlotElement)) return false;
|
|
12115
12068
|
|
|
12116
|
-
|
|
12117
|
-
|
|
12118
|
-
}
|
|
12069
|
+
if (focusOnFirstNode(node.assignedNodes())) {
|
|
12070
|
+
return true;
|
|
12119
12071
|
}
|
|
12120
12072
|
}
|
|
12121
12073
|
|
|
12122
|
-
function
|
|
12123
|
-
var _a
|
|
12074
|
+
function focusOnFirstNodeOfShadowDOM(node) {
|
|
12075
|
+
var _a;
|
|
12124
12076
|
|
|
12125
|
-
if (node instanceof HTMLElement)
|
|
12126
|
-
let childNodesOfShadowRoot = (_b = (_a = node) === null || _a === void 0 ? void 0 : _a.shadowRoot) === null || _b === void 0 ? void 0 : _b.childNodes;
|
|
12077
|
+
if (!(node instanceof HTMLElement)) return false;
|
|
12127
12078
|
|
|
12128
|
-
|
|
12129
|
-
|
|
12130
|
-
}
|
|
12079
|
+
if (focusOnFirstNode((_a = node.shadowRoot) === null || _a === void 0 ? void 0 : _a.childNodes)) {
|
|
12080
|
+
return true;
|
|
12131
12081
|
}
|
|
12132
|
-
}
|
|
12082
|
+
} // ====
|
|
12083
|
+
// Last Node
|
|
12084
|
+
// ====
|
|
12085
|
+
|
|
12133
12086
|
|
|
12134
|
-
function
|
|
12135
|
-
if (!
|
|
12087
|
+
function focusOnLastNode(nodes) {
|
|
12088
|
+
if (!nodes) return false;
|
|
12136
12089
|
|
|
12137
|
-
for (let i =
|
|
12138
|
-
let
|
|
12090
|
+
for (let i = nodes.length - 1; i >= 0; i--) {
|
|
12091
|
+
let node = nodes[i];
|
|
12139
12092
|
|
|
12140
|
-
if (
|
|
12093
|
+
if (focus(node) || focusOnLastNode(node.childNodes) || focusOnLastNodeOfSlot(node) || focusOnLastNodeOfShadowDOM(node)) {
|
|
12141
12094
|
return true;
|
|
12142
12095
|
}
|
|
12143
12096
|
}
|
|
@@ -12145,67 +12098,57 @@ function instance$6($$self, $$props, $$invalidate) {
|
|
|
12145
12098
|
return false;
|
|
12146
12099
|
}
|
|
12147
12100
|
|
|
12148
|
-
function
|
|
12149
|
-
|
|
12150
|
-
|
|
12151
|
-
if (node instanceof HTMLSlotElement) {
|
|
12152
|
-
let assingedNodesOfSlotElement = (_a = node) === null || _a === void 0 ? void 0 : _a.assignedNodes();
|
|
12101
|
+
function focusOnLastNodeOfSlot(node) {
|
|
12102
|
+
if (!(node instanceof HTMLSlotElement)) return false;
|
|
12153
12103
|
|
|
12154
|
-
|
|
12155
|
-
|
|
12156
|
-
}
|
|
12104
|
+
if (focusOnLastNode(node.assignedNodes())) {
|
|
12105
|
+
return true;
|
|
12157
12106
|
}
|
|
12158
12107
|
}
|
|
12159
12108
|
|
|
12160
|
-
function
|
|
12161
|
-
var _a
|
|
12109
|
+
function focusOnLastNodeOfShadowDOM(node) {
|
|
12110
|
+
var _a;
|
|
12162
12111
|
|
|
12163
|
-
if (node instanceof HTMLElement)
|
|
12164
|
-
let childNodesOfShadowRoot = (_b = (_a = node) === null || _a === void 0 ? void 0 : _a.shadowRoot) === null || _b === void 0 ? void 0 : _b.childNodes;
|
|
12112
|
+
if (!(node instanceof HTMLElement)) return false;
|
|
12165
12113
|
|
|
12166
|
-
|
|
12167
|
-
|
|
12168
|
-
}
|
|
12114
|
+
if (focusOnLastNode((_a = node.shadowRoot) === null || _a === void 0 ? void 0 : _a.childNodes)) {
|
|
12115
|
+
return true;
|
|
12169
12116
|
}
|
|
12170
12117
|
}
|
|
12171
12118
|
|
|
12172
|
-
function
|
|
12173
|
-
if (!isFocusable(element))
|
|
12174
|
-
return false;
|
|
12175
|
-
}
|
|
12176
|
-
|
|
12177
|
-
ignoreFocusChanges = true;
|
|
12119
|
+
function focus(element) {
|
|
12120
|
+
if (!isFocusable(element)) return false;
|
|
12178
12121
|
|
|
12179
12122
|
try {
|
|
12123
|
+
ignoreFocusChanges = true;
|
|
12180
12124
|
element.focus();
|
|
12181
|
-
} catch (e) {}
|
|
12125
|
+
} catch (e) {} finally {
|
|
12126
|
+
ignoreFocusChanges = false;
|
|
12127
|
+
}
|
|
12182
12128
|
|
|
12183
|
-
ignoreFocusChanges = false;
|
|
12184
12129
|
return document.activeElement === element;
|
|
12185
12130
|
}
|
|
12186
12131
|
|
|
12187
12132
|
function trapFocus(event) {
|
|
12188
12133
|
var _a;
|
|
12189
12134
|
|
|
12190
|
-
if (ignoreFocusChanges)
|
|
12191
|
-
return;
|
|
12192
|
-
}
|
|
12193
|
-
|
|
12135
|
+
if (ignoreFocusChanges) return;
|
|
12194
12136
|
const slotElements = (_a = element.firstChild) === null || _a === void 0 ? void 0 : _a.assignedElements();
|
|
12195
12137
|
if (!(slotElements === null || slotElements === void 0 ? void 0 : slotElements.length)) return;
|
|
12196
12138
|
const contentRootElement = slotElements[0];
|
|
12197
12139
|
|
|
12198
12140
|
if (event.composedPath().includes(contentRootElement)) {
|
|
12199
12141
|
lastFocus = event.target;
|
|
12200
|
-
|
|
12201
|
-
|
|
12142
|
+
return;
|
|
12143
|
+
}
|
|
12202
12144
|
|
|
12203
|
-
|
|
12204
|
-
attemptFocusOnLastDescendant(contentRootElement.childNodes);
|
|
12205
|
-
}
|
|
12145
|
+
focusOnFirstNode(contentRootElement.childNodes);
|
|
12206
12146
|
|
|
12207
|
-
|
|
12147
|
+
if (lastFocus == document.activeElement) {
|
|
12148
|
+
focusOnLastNode(contentRootElement.childNodes);
|
|
12208
12149
|
}
|
|
12150
|
+
|
|
12151
|
+
lastFocus = document.activeElement;
|
|
12209
12152
|
}
|
|
12210
12153
|
|
|
12211
12154
|
function div_binding($$value) {
|
|
@@ -12216,30 +12159,34 @@ function instance$6($$self, $$props, $$invalidate) {
|
|
|
12216
12159
|
}
|
|
12217
12160
|
|
|
12218
12161
|
$$self.$$set = $$props => {
|
|
12219
|
-
if ('
|
|
12162
|
+
if ('active' in $$props) $$invalidate(1, active = $$props.active);
|
|
12220
12163
|
};
|
|
12221
12164
|
|
|
12222
12165
|
$$self.$$.update = () => {
|
|
12223
12166
|
if ($$self.$$.dirty &
|
|
12224
|
-
/*
|
|
12167
|
+
/*active*/
|
|
12225
12168
|
2) {
|
|
12226
|
-
$$invalidate(
|
|
12169
|
+
$$invalidate(3, isActive = toBoolean(active));
|
|
12227
12170
|
}
|
|
12228
12171
|
|
|
12229
12172
|
if ($$self.$$.dirty &
|
|
12230
|
-
/*
|
|
12231
|
-
|
|
12173
|
+
/*isActive, hasListeners*/
|
|
12174
|
+
12) {
|
|
12232
12175
|
{
|
|
12233
|
-
if (
|
|
12176
|
+
if (isActive && !hasListeners) {
|
|
12234
12177
|
addListeners();
|
|
12235
|
-
|
|
12178
|
+
$$invalidate(2, hasListeners = true);
|
|
12179
|
+
}
|
|
12180
|
+
|
|
12181
|
+
if (!isActive && hasListeners) {
|
|
12236
12182
|
removeListeners();
|
|
12183
|
+
$$invalidate(2, hasListeners = false);
|
|
12237
12184
|
}
|
|
12238
12185
|
}
|
|
12239
12186
|
}
|
|
12240
12187
|
};
|
|
12241
12188
|
|
|
12242
|
-
return [element,
|
|
12189
|
+
return [element, active, hasListeners, isActive, div_binding];
|
|
12243
12190
|
}
|
|
12244
12191
|
|
|
12245
12192
|
class FocusTrap extends SvelteElement {
|
|
@@ -12250,7 +12197,7 @@ class FocusTrap extends SvelteElement {
|
|
|
12250
12197
|
props: attribute_to_object(this.attributes),
|
|
12251
12198
|
customElement: true
|
|
12252
12199
|
}, instance$6, create_fragment$7, safe_not_equal, {
|
|
12253
|
-
|
|
12200
|
+
active: 1
|
|
12254
12201
|
}, null);
|
|
12255
12202
|
|
|
12256
12203
|
if (options) {
|
|
@@ -12266,16 +12213,16 @@ class FocusTrap extends SvelteElement {
|
|
|
12266
12213
|
}
|
|
12267
12214
|
|
|
12268
12215
|
static get observedAttributes() {
|
|
12269
|
-
return ["
|
|
12216
|
+
return ["active"];
|
|
12270
12217
|
}
|
|
12271
12218
|
|
|
12272
|
-
get
|
|
12219
|
+
get active() {
|
|
12273
12220
|
return this.$$.ctx[1];
|
|
12274
12221
|
}
|
|
12275
12222
|
|
|
12276
|
-
set
|
|
12223
|
+
set active(active) {
|
|
12277
12224
|
this.$$set({
|
|
12278
|
-
|
|
12225
|
+
active
|
|
12279
12226
|
});
|
|
12280
12227
|
flush();
|
|
12281
12228
|
}
|
|
@@ -13994,7 +13941,6 @@ const GoAChip = ({
|
|
|
13994
13941
|
};
|
|
13995
13942
|
|
|
13996
13943
|
const GoACircularProgress = ({
|
|
13997
|
-
type,
|
|
13998
13944
|
visible,
|
|
13999
13945
|
message,
|
|
14000
13946
|
progress,
|
|
@@ -14002,7 +13948,6 @@ const GoACircularProgress = ({
|
|
|
14002
13948
|
size
|
|
14003
13949
|
}) => {
|
|
14004
13950
|
return jsx("goa-circular-progress", {
|
|
14005
|
-
type: type,
|
|
14006
13951
|
visible: visible ? "true" : "false",
|
|
14007
13952
|
message: message,
|
|
14008
13953
|
progress: progress,
|