@abgov/web-components 1.0.0-alpha.93 → 1.0.0-alpha.96
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/web-components.es.js +427 -274
- package/web-components.umd.js +33 -33
package/web-components.es.js
CHANGED
|
@@ -1492,8 +1492,8 @@ function create_else_block$2(ctx) {
|
|
|
1492
1492
|
let div;
|
|
1493
1493
|
let t1;
|
|
1494
1494
|
let if_block1_anchor;
|
|
1495
|
-
let if_block0 = /*leadingicon*/ ctx[
|
|
1496
|
-
let if_block1 = /*trailingicon*/ ctx[
|
|
1495
|
+
let if_block0 = /*leadingicon*/ ctx[3] && create_if_block_2$7(ctx);
|
|
1496
|
+
let if_block1 = /*trailingicon*/ ctx[4] && create_if_block_1$a(ctx);
|
|
1497
1497
|
|
|
1498
1498
|
return {
|
|
1499
1499
|
c() {
|
|
@@ -1515,7 +1515,7 @@ function create_else_block$2(ctx) {
|
|
|
1515
1515
|
insert(target, if_block1_anchor, anchor);
|
|
1516
1516
|
},
|
|
1517
1517
|
p(ctx, dirty) {
|
|
1518
|
-
if (/*leadingicon*/ ctx[
|
|
1518
|
+
if (/*leadingicon*/ ctx[3]) {
|
|
1519
1519
|
if (if_block0) {
|
|
1520
1520
|
if_block0.p(ctx, dirty);
|
|
1521
1521
|
} else {
|
|
@@ -1528,7 +1528,7 @@ function create_else_block$2(ctx) {
|
|
|
1528
1528
|
if_block0 = null;
|
|
1529
1529
|
}
|
|
1530
1530
|
|
|
1531
|
-
if (/*trailingicon*/ ctx[
|
|
1531
|
+
if (/*trailingicon*/ ctx[4]) {
|
|
1532
1532
|
if (if_block1) {
|
|
1533
1533
|
if_block1.p(ctx, dirty);
|
|
1534
1534
|
} else {
|
|
@@ -1552,7 +1552,7 @@ function create_else_block$2(ctx) {
|
|
|
1552
1552
|
};
|
|
1553
1553
|
}
|
|
1554
1554
|
|
|
1555
|
-
// (
|
|
1555
|
+
// (53:2) {#if type === "start"}
|
|
1556
1556
|
function create_if_block$h(ctx) {
|
|
1557
1557
|
let div;
|
|
1558
1558
|
let t;
|
|
@@ -1583,7 +1583,7 @@ function create_if_block$h(ctx) {
|
|
|
1583
1583
|
};
|
|
1584
1584
|
}
|
|
1585
1585
|
|
|
1586
|
-
// (
|
|
1586
|
+
// (59:4) {#if leadingicon}
|
|
1587
1587
|
function create_if_block_2$7(ctx) {
|
|
1588
1588
|
let goa_icon;
|
|
1589
1589
|
|
|
@@ -1591,19 +1591,19 @@ function create_if_block_2$7(ctx) {
|
|
|
1591
1591
|
c() {
|
|
1592
1592
|
goa_icon = element("goa-icon");
|
|
1593
1593
|
set_custom_element_data(goa_icon, "id", "leading-icon");
|
|
1594
|
-
set_custom_element_data(goa_icon, "type", /*leadingicon*/ ctx[
|
|
1595
|
-
set_custom_element_data(goa_icon, "inverted", /*isButtonDark*/ ctx[
|
|
1594
|
+
set_custom_element_data(goa_icon, "type", /*leadingicon*/ ctx[3]);
|
|
1595
|
+
set_custom_element_data(goa_icon, "inverted", /*isButtonDark*/ ctx[6]);
|
|
1596
1596
|
},
|
|
1597
1597
|
m(target, anchor) {
|
|
1598
1598
|
insert(target, goa_icon, anchor);
|
|
1599
1599
|
},
|
|
1600
1600
|
p(ctx, dirty) {
|
|
1601
|
-
if (dirty & /*leadingicon*/
|
|
1602
|
-
set_custom_element_data(goa_icon, "type", /*leadingicon*/ ctx[
|
|
1601
|
+
if (dirty & /*leadingicon*/ 8) {
|
|
1602
|
+
set_custom_element_data(goa_icon, "type", /*leadingicon*/ ctx[3]);
|
|
1603
1603
|
}
|
|
1604
1604
|
|
|
1605
|
-
if (dirty & /*isButtonDark*/
|
|
1606
|
-
set_custom_element_data(goa_icon, "inverted", /*isButtonDark*/ ctx[
|
|
1605
|
+
if (dirty & /*isButtonDark*/ 64) {
|
|
1606
|
+
set_custom_element_data(goa_icon, "inverted", /*isButtonDark*/ ctx[6]);
|
|
1607
1607
|
}
|
|
1608
1608
|
},
|
|
1609
1609
|
d(detaching) {
|
|
@@ -1612,7 +1612,7 @@ function create_if_block_2$7(ctx) {
|
|
|
1612
1612
|
};
|
|
1613
1613
|
}
|
|
1614
1614
|
|
|
1615
|
-
// (
|
|
1615
|
+
// (65:4) {#if trailingicon}
|
|
1616
1616
|
function create_if_block_1$a(ctx) {
|
|
1617
1617
|
let goa_icon;
|
|
1618
1618
|
|
|
@@ -1620,19 +1620,19 @@ function create_if_block_1$a(ctx) {
|
|
|
1620
1620
|
c() {
|
|
1621
1621
|
goa_icon = element("goa-icon");
|
|
1622
1622
|
set_custom_element_data(goa_icon, "id", "trailing-icon");
|
|
1623
|
-
set_custom_element_data(goa_icon, "type", /*trailingicon*/ ctx[
|
|
1624
|
-
set_custom_element_data(goa_icon, "inverted", /*isButtonDark*/ ctx[
|
|
1623
|
+
set_custom_element_data(goa_icon, "type", /*trailingicon*/ ctx[4]);
|
|
1624
|
+
set_custom_element_data(goa_icon, "inverted", /*isButtonDark*/ ctx[6]);
|
|
1625
1625
|
},
|
|
1626
1626
|
m(target, anchor) {
|
|
1627
1627
|
insert(target, goa_icon, anchor);
|
|
1628
1628
|
},
|
|
1629
1629
|
p(ctx, dirty) {
|
|
1630
|
-
if (dirty & /*trailingicon*/
|
|
1631
|
-
set_custom_element_data(goa_icon, "type", /*trailingicon*/ ctx[
|
|
1630
|
+
if (dirty & /*trailingicon*/ 16) {
|
|
1631
|
+
set_custom_element_data(goa_icon, "type", /*trailingicon*/ ctx[4]);
|
|
1632
1632
|
}
|
|
1633
1633
|
|
|
1634
|
-
if (dirty & /*isButtonDark*/
|
|
1635
|
-
set_custom_element_data(goa_icon, "inverted", /*isButtonDark*/ ctx[
|
|
1634
|
+
if (dirty & /*isButtonDark*/ 64) {
|
|
1635
|
+
set_custom_element_data(goa_icon, "inverted", /*isButtonDark*/ ctx[6]);
|
|
1636
1636
|
}
|
|
1637
1637
|
},
|
|
1638
1638
|
d(detaching) {
|
|
@@ -1661,11 +1661,10 @@ function create_fragment$B(ctx) {
|
|
|
1661
1661
|
if_block.c();
|
|
1662
1662
|
this.c = noop;
|
|
1663
1663
|
attr(button, "class", button_class_value = "" + (/*type*/ ctx[0] + " " + /*size*/ ctx[1] + " " + /*variant*/ ctx[2]));
|
|
1664
|
-
|
|
1665
|
-
button
|
|
1666
|
-
|
|
1667
|
-
toggle_class(button, "
|
|
1668
|
-
toggle_class(button, "trailing", /*trailingicon*/ ctx[5] || /*type*/ ctx[0] === "start");
|
|
1664
|
+
button.disabled = /*isDisabled*/ ctx[7];
|
|
1665
|
+
attr(button, "data-testid", /*testid*/ ctx[5]);
|
|
1666
|
+
toggle_class(button, "leading", /*leadingicon*/ ctx[3]);
|
|
1667
|
+
toggle_class(button, "trailing", /*trailingicon*/ ctx[4] || /*type*/ ctx[0] === "start");
|
|
1669
1668
|
},
|
|
1670
1669
|
m(target, anchor) {
|
|
1671
1670
|
insert(target, button, anchor);
|
|
@@ -1693,24 +1692,20 @@ function create_fragment$B(ctx) {
|
|
|
1693
1692
|
attr(button, "class", button_class_value);
|
|
1694
1693
|
}
|
|
1695
1694
|
|
|
1696
|
-
if (dirty & /*
|
|
1697
|
-
|
|
1698
|
-
}
|
|
1699
|
-
|
|
1700
|
-
if (dirty & /*isDisabled*/ 256) {
|
|
1701
|
-
button.disabled = /*isDisabled*/ ctx[8];
|
|
1695
|
+
if (dirty & /*isDisabled*/ 128) {
|
|
1696
|
+
button.disabled = /*isDisabled*/ ctx[7];
|
|
1702
1697
|
}
|
|
1703
1698
|
|
|
1704
|
-
if (dirty & /*testid*/
|
|
1705
|
-
attr(button, "data-testid", /*testid*/ ctx[
|
|
1699
|
+
if (dirty & /*testid*/ 32) {
|
|
1700
|
+
attr(button, "data-testid", /*testid*/ ctx[5]);
|
|
1706
1701
|
}
|
|
1707
1702
|
|
|
1708
|
-
if (dirty & /*type, size, variant, leadingicon*/
|
|
1709
|
-
toggle_class(button, "leading", /*leadingicon*/ ctx[
|
|
1703
|
+
if (dirty & /*type, size, variant, leadingicon*/ 15) {
|
|
1704
|
+
toggle_class(button, "leading", /*leadingicon*/ ctx[3]);
|
|
1710
1705
|
}
|
|
1711
1706
|
|
|
1712
|
-
if (dirty & /*type, size, variant, trailingicon, type*/
|
|
1713
|
-
toggle_class(button, "trailing", /*trailingicon*/ ctx[
|
|
1707
|
+
if (dirty & /*type, size, variant, trailingicon, type*/ 23) {
|
|
1708
|
+
toggle_class(button, "trailing", /*trailingicon*/ ctx[4] || /*type*/ ctx[0] === "start");
|
|
1714
1709
|
}
|
|
1715
1710
|
},
|
|
1716
1711
|
i: noop,
|
|
@@ -1732,7 +1727,7 @@ function clickHandler(e) {
|
|
|
1732
1727
|
function instance$w($$self, $$props, $$invalidate) {
|
|
1733
1728
|
let isDisabled;
|
|
1734
1729
|
let isButtonDark;
|
|
1735
|
-
const BUTTON_TYPES = ["primary", "secondary", "tertiary", "start"];
|
|
1730
|
+
const BUTTON_TYPES = ["primary", "submit", "secondary", "tertiary", "start"];
|
|
1736
1731
|
const SIZES = ["normal", "compact"];
|
|
1737
1732
|
const VARIANTS = ["normal", "destructive"];
|
|
1738
1733
|
|
|
@@ -1752,7 +1747,6 @@ function instance$w($$self, $$props, $$invalidate) {
|
|
|
1752
1747
|
let { type = "primary" } = $$props;
|
|
1753
1748
|
let { size = "normal" } = $$props;
|
|
1754
1749
|
let { variant = "normal" } = $$props;
|
|
1755
|
-
let { title = "" } = $$props;
|
|
1756
1750
|
let { disabled = "false" } = $$props;
|
|
1757
1751
|
let { leadingicon = null } = $$props;
|
|
1758
1752
|
let { trailingicon = null } = $$props;
|
|
@@ -1776,20 +1770,19 @@ function instance$w($$self, $$props, $$invalidate) {
|
|
|
1776
1770
|
if ('type' in $$props) $$invalidate(0, type = $$props.type);
|
|
1777
1771
|
if ('size' in $$props) $$invalidate(1, size = $$props.size);
|
|
1778
1772
|
if ('variant' in $$props) $$invalidate(2, variant = $$props.variant);
|
|
1779
|
-
if ('
|
|
1780
|
-
if ('
|
|
1781
|
-
if ('
|
|
1782
|
-
if ('
|
|
1783
|
-
if ('testid' in $$props) $$invalidate(6, testid = $$props.testid);
|
|
1773
|
+
if ('disabled' in $$props) $$invalidate(8, disabled = $$props.disabled);
|
|
1774
|
+
if ('leadingicon' in $$props) $$invalidate(3, leadingicon = $$props.leadingicon);
|
|
1775
|
+
if ('trailingicon' in $$props) $$invalidate(4, trailingicon = $$props.trailingicon);
|
|
1776
|
+
if ('testid' in $$props) $$invalidate(5, testid = $$props.testid);
|
|
1784
1777
|
};
|
|
1785
1778
|
|
|
1786
1779
|
$$self.$$.update = () => {
|
|
1787
|
-
if ($$self.$$.dirty & /*disabled*/
|
|
1788
|
-
$$invalidate(
|
|
1780
|
+
if ($$self.$$.dirty & /*disabled*/ 256) {
|
|
1781
|
+
$$invalidate(7, isDisabled = toBoolean(disabled));
|
|
1789
1782
|
}
|
|
1790
1783
|
|
|
1791
1784
|
if ($$self.$$.dirty & /*type*/ 1) {
|
|
1792
|
-
$$invalidate(
|
|
1785
|
+
$$invalidate(6, isButtonDark = type === "primary" || type === "start");
|
|
1793
1786
|
}
|
|
1794
1787
|
};
|
|
1795
1788
|
|
|
@@ -1797,7 +1790,6 @@ function instance$w($$self, $$props, $$invalidate) {
|
|
|
1797
1790
|
type,
|
|
1798
1791
|
size,
|
|
1799
1792
|
variant,
|
|
1800
|
-
title,
|
|
1801
1793
|
leadingicon,
|
|
1802
1794
|
trailingicon,
|
|
1803
1795
|
testid,
|
|
@@ -1812,7 +1804,7 @@ class Button extends SvelteElement {
|
|
|
1812
1804
|
super();
|
|
1813
1805
|
|
|
1814
1806
|
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,
|
|
1815
|
-
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>`;
|
|
1807
|
+
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.submit,button.primary{border:2px solid var(--goa-color-interactive);background:var(--goa-color-interactive);color:var(--goa-color-text-light)}button.start:hover,button.submit:hover,button.primary:hover{border-color:var(--goa-color-interactive--hover);background:var(--goa-color-interactive--hover)}button.start:focus,button.start:active,button.submit:focus,button.submit: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}.submit.destructive,.primary.destructive{color:var(--color-white);background:var(--goa-color-status-emergency);border-color:var(--goa-color-status-emergency)}.submit.destructive:hover,.primary.destructive:hover{background:var(--goa-color-status-emergency-dark);border-color:var(--goa-color-status-emergency-dark)}.submit.destructive:focus,.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>`;
|
|
1816
1808
|
|
|
1817
1809
|
init(
|
|
1818
1810
|
this,
|
|
@@ -1828,11 +1820,10 @@ class Button extends SvelteElement {
|
|
|
1828
1820
|
type: 0,
|
|
1829
1821
|
size: 1,
|
|
1830
1822
|
variant: 2,
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
testid: 6
|
|
1823
|
+
disabled: 8,
|
|
1824
|
+
leadingicon: 3,
|
|
1825
|
+
trailingicon: 4,
|
|
1826
|
+
testid: 5
|
|
1836
1827
|
},
|
|
1837
1828
|
null
|
|
1838
1829
|
);
|
|
@@ -1854,7 +1845,6 @@ class Button extends SvelteElement {
|
|
|
1854
1845
|
"type",
|
|
1855
1846
|
"size",
|
|
1856
1847
|
"variant",
|
|
1857
|
-
"title",
|
|
1858
1848
|
"disabled",
|
|
1859
1849
|
"leadingicon",
|
|
1860
1850
|
"trailingicon",
|
|
@@ -1889,17 +1879,8 @@ class Button extends SvelteElement {
|
|
|
1889
1879
|
flush();
|
|
1890
1880
|
}
|
|
1891
1881
|
|
|
1892
|
-
get title() {
|
|
1893
|
-
return this.$$.ctx[3];
|
|
1894
|
-
}
|
|
1895
|
-
|
|
1896
|
-
set title(title) {
|
|
1897
|
-
this.$$set({ title });
|
|
1898
|
-
flush();
|
|
1899
|
-
}
|
|
1900
|
-
|
|
1901
1882
|
get disabled() {
|
|
1902
|
-
return this.$$.ctx[
|
|
1883
|
+
return this.$$.ctx[8];
|
|
1903
1884
|
}
|
|
1904
1885
|
|
|
1905
1886
|
set disabled(disabled) {
|
|
@@ -1908,7 +1889,7 @@ class Button extends SvelteElement {
|
|
|
1908
1889
|
}
|
|
1909
1890
|
|
|
1910
1891
|
get leadingicon() {
|
|
1911
|
-
return this.$$.ctx[
|
|
1892
|
+
return this.$$.ctx[3];
|
|
1912
1893
|
}
|
|
1913
1894
|
|
|
1914
1895
|
set leadingicon(leadingicon) {
|
|
@@ -1917,7 +1898,7 @@ class Button extends SvelteElement {
|
|
|
1917
1898
|
}
|
|
1918
1899
|
|
|
1919
1900
|
get trailingicon() {
|
|
1920
|
-
return this.$$.ctx[
|
|
1901
|
+
return this.$$.ctx[4];
|
|
1921
1902
|
}
|
|
1922
1903
|
|
|
1923
1904
|
set trailingicon(trailingicon) {
|
|
@@ -1926,7 +1907,7 @@ class Button extends SvelteElement {
|
|
|
1926
1907
|
}
|
|
1927
1908
|
|
|
1928
1909
|
get testid() {
|
|
1929
|
-
return this.$$.ctx[
|
|
1910
|
+
return this.$$.ctx[5];
|
|
1930
1911
|
}
|
|
1931
1912
|
|
|
1932
1913
|
set testid(testid) {
|
|
@@ -3527,7 +3508,7 @@ function writable(value, start = noop) {
|
|
|
3527
3508
|
}
|
|
3528
3509
|
|
|
3529
3510
|
const stores = {};
|
|
3530
|
-
class
|
|
3511
|
+
class ContextStoreInternal {
|
|
3531
3512
|
constructor() {
|
|
3532
3513
|
this.store = writable();
|
|
3533
3514
|
}
|
|
@@ -3541,22 +3522,12 @@ class ContextStore {
|
|
|
3541
3522
|
}
|
|
3542
3523
|
}
|
|
3543
3524
|
function createContext(name) {
|
|
3544
|
-
const ctx = new
|
|
3525
|
+
const ctx = new ContextStoreInternal();
|
|
3545
3526
|
stores[name] = ctx;
|
|
3546
3527
|
return ctx;
|
|
3547
3528
|
}
|
|
3548
|
-
|
|
3549
|
-
return
|
|
3550
|
-
}
|
|
3551
|
-
async function _getContext(name, attempts) {
|
|
3552
|
-
if (attempts > 10) {
|
|
3553
|
-
throw new Error(`Could not find context ${name}`);
|
|
3554
|
-
}
|
|
3555
|
-
if (stores[name]) {
|
|
3556
|
-
return stores[name];
|
|
3557
|
-
}
|
|
3558
|
-
await tick();
|
|
3559
|
-
return _getContext(name, attempts + 1);
|
|
3529
|
+
function getContext(name) {
|
|
3530
|
+
return stores[name];
|
|
3560
3531
|
}
|
|
3561
3532
|
function deleteContext(name) {
|
|
3562
3533
|
const store = stores[name];
|
|
@@ -3571,12 +3542,12 @@ const BIND$1 = "bind";
|
|
|
3571
3542
|
|
|
3572
3543
|
function get_each_context$4(ctx, list, i) {
|
|
3573
3544
|
const child_ctx = ctx.slice();
|
|
3574
|
-
child_ctx[
|
|
3575
|
-
child_ctx[
|
|
3545
|
+
child_ctx[39] = list[i];
|
|
3546
|
+
child_ctx[41] = i;
|
|
3576
3547
|
return child_ctx;
|
|
3577
3548
|
}
|
|
3578
3549
|
|
|
3579
|
-
// (
|
|
3550
|
+
// (198:2) {#if isMenuVisible}
|
|
3580
3551
|
function create_if_block$d(ctx) {
|
|
3581
3552
|
let div;
|
|
3582
3553
|
let div_data_testid_value;
|
|
@@ -3610,10 +3581,10 @@ function create_if_block$d(ctx) {
|
|
|
3610
3581
|
};
|
|
3611
3582
|
}
|
|
3612
3583
|
|
|
3613
|
-
// (
|
|
3614
|
-
function create_each_block$4(
|
|
3584
|
+
// (234:4) {#each options as option, index}
|
|
3585
|
+
function create_each_block$4(ctx) {
|
|
3615
3586
|
let li;
|
|
3616
|
-
let t0_value = /*option*/ ctx[
|
|
3587
|
+
let t0_value = (/*option*/ ctx[39].label || /*option*/ ctx[39].value) + "";
|
|
3617
3588
|
let t0;
|
|
3618
3589
|
let t1;
|
|
3619
3590
|
let li_aria_label_value;
|
|
@@ -3624,25 +3595,22 @@ function create_each_block$4(key_1, ctx) {
|
|
|
3624
3595
|
let dispose;
|
|
3625
3596
|
|
|
3626
3597
|
function click_handler() {
|
|
3627
|
-
return /*click_handler*/ ctx[22](/*option*/ ctx[
|
|
3598
|
+
return /*click_handler*/ ctx[22](/*option*/ ctx[39]);
|
|
3628
3599
|
}
|
|
3629
3600
|
|
|
3630
3601
|
return {
|
|
3631
|
-
key: key_1,
|
|
3632
|
-
first: null,
|
|
3633
3602
|
c() {
|
|
3634
3603
|
li = element("li");
|
|
3635
3604
|
t0 = text(t0_value);
|
|
3636
3605
|
t1 = space();
|
|
3637
|
-
attr(li, "aria-label", li_aria_label_value = /*option*/ ctx[
|
|
3638
|
-
attr(li, "data-testid", li_data_testid_value = `${/*option*/ ctx[
|
|
3639
|
-
attr(li, "data-index", li_data_index_value = /*index*/ ctx[
|
|
3606
|
+
attr(li, "aria-label", li_aria_label_value = /*option*/ ctx[39].label || /*option*/ ctx[39].value);
|
|
3607
|
+
attr(li, "data-testid", li_data_testid_value = `${/*option*/ ctx[39].value}-dropdown-item`);
|
|
3608
|
+
attr(li, "data-index", li_data_index_value = /*index*/ ctx[41]);
|
|
3640
3609
|
attr(li, "class", "goa-dropdown-option");
|
|
3641
3610
|
attr(li, "style", li_style_value = `display: ${"block"}`);
|
|
3642
3611
|
toggle_class(li, "goa-dropdown-option--disabled", false);
|
|
3643
|
-
toggle_class(li, "goa-dropdown-option--tabbed", /*index*/ ctx[
|
|
3644
|
-
toggle_class(li, "goa-dropdown-option--selected", /*_values*/ ctx[9].includes(/*option*/ ctx[
|
|
3645
|
-
this.first = li;
|
|
3612
|
+
toggle_class(li, "goa-dropdown-option--tabbed", /*index*/ ctx[41] === /*highlightedIndex*/ ctx[13]);
|
|
3613
|
+
toggle_class(li, "goa-dropdown-option--selected", /*_values*/ ctx[9].includes(/*option*/ ctx[39].value));
|
|
3646
3614
|
},
|
|
3647
3615
|
m(target, anchor) {
|
|
3648
3616
|
insert(target, li, anchor);
|
|
@@ -3656,26 +3624,22 @@ function create_each_block$4(key_1, ctx) {
|
|
|
3656
3624
|
},
|
|
3657
3625
|
p(new_ctx, dirty) {
|
|
3658
3626
|
ctx = new_ctx;
|
|
3659
|
-
if (dirty[0] & /*options*/ 1024 && t0_value !== (t0_value = /*option*/ ctx[
|
|
3627
|
+
if (dirty[0] & /*options*/ 1024 && t0_value !== (t0_value = (/*option*/ ctx[39].label || /*option*/ ctx[39].value) + "")) set_data(t0, t0_value);
|
|
3660
3628
|
|
|
3661
|
-
if (dirty[0] & /*options*/ 1024 && li_aria_label_value !== (li_aria_label_value = /*option*/ ctx[
|
|
3629
|
+
if (dirty[0] & /*options*/ 1024 && li_aria_label_value !== (li_aria_label_value = /*option*/ ctx[39].label || /*option*/ ctx[39].value)) {
|
|
3662
3630
|
attr(li, "aria-label", li_aria_label_value);
|
|
3663
3631
|
}
|
|
3664
3632
|
|
|
3665
|
-
if (dirty[0] & /*options*/ 1024 && li_data_testid_value !== (li_data_testid_value = `${/*option*/ ctx[
|
|
3633
|
+
if (dirty[0] & /*options*/ 1024 && li_data_testid_value !== (li_data_testid_value = `${/*option*/ ctx[39].value}-dropdown-item`)) {
|
|
3666
3634
|
attr(li, "data-testid", li_data_testid_value);
|
|
3667
3635
|
}
|
|
3668
3636
|
|
|
3669
|
-
if (dirty[0] & /*
|
|
3670
|
-
|
|
3671
|
-
}
|
|
3672
|
-
|
|
3673
|
-
if (dirty[0] & /*options, highlightedIndex*/ 9216) {
|
|
3674
|
-
toggle_class(li, "goa-dropdown-option--tabbed", /*index*/ ctx[38] === /*highlightedIndex*/ ctx[13]);
|
|
3637
|
+
if (dirty[0] & /*highlightedIndex*/ 8192) {
|
|
3638
|
+
toggle_class(li, "goa-dropdown-option--tabbed", /*index*/ ctx[41] === /*highlightedIndex*/ ctx[13]);
|
|
3675
3639
|
}
|
|
3676
3640
|
|
|
3677
3641
|
if (dirty[0] & /*_values, options*/ 1536) {
|
|
3678
|
-
toggle_class(li, "goa-dropdown-option--selected", /*_values*/ ctx[9].includes(/*option*/ ctx[
|
|
3642
|
+
toggle_class(li, "goa-dropdown-option--selected", /*_values*/ ctx[9].includes(/*option*/ ctx[39].value));
|
|
3679
3643
|
}
|
|
3680
3644
|
},
|
|
3681
3645
|
d(detaching) {
|
|
@@ -3698,20 +3662,16 @@ function create_fragment$q(ctx) {
|
|
|
3698
3662
|
let ul;
|
|
3699
3663
|
let slot;
|
|
3700
3664
|
let t2;
|
|
3701
|
-
let each_blocks = [];
|
|
3702
|
-
let each_1_lookup = new Map();
|
|
3703
3665
|
let ul_style_value;
|
|
3704
3666
|
let div1_style_value;
|
|
3705
3667
|
let mounted;
|
|
3706
3668
|
let dispose;
|
|
3707
3669
|
let if_block = /*isMenuVisible*/ ctx[12] && create_if_block$d(ctx);
|
|
3708
3670
|
let each_value = /*options*/ ctx[10];
|
|
3709
|
-
|
|
3671
|
+
let each_blocks = [];
|
|
3710
3672
|
|
|
3711
3673
|
for (let i = 0; i < each_value.length; i += 1) {
|
|
3712
|
-
|
|
3713
|
-
let key = get_key(child_ctx);
|
|
3714
|
-
each_1_lookup.set(key, each_blocks[i] = create_each_block$4(key, child_ctx));
|
|
3674
|
+
each_blocks[i] = create_each_block$4(get_each_context$4(ctx, each_value, i));
|
|
3715
3675
|
}
|
|
3716
3676
|
|
|
3717
3677
|
return {
|
|
@@ -3823,7 +3783,25 @@ function create_fragment$q(ctx) {
|
|
|
3823
3783
|
|
|
3824
3784
|
if (dirty[0] & /*options, highlightedIndex, _values, onSelect*/ 534016) {
|
|
3825
3785
|
each_value = /*options*/ ctx[10];
|
|
3826
|
-
|
|
3786
|
+
let i;
|
|
3787
|
+
|
|
3788
|
+
for (i = 0; i < each_value.length; i += 1) {
|
|
3789
|
+
const child_ctx = get_each_context$4(ctx, each_value, i);
|
|
3790
|
+
|
|
3791
|
+
if (each_blocks[i]) {
|
|
3792
|
+
each_blocks[i].p(child_ctx, dirty);
|
|
3793
|
+
} else {
|
|
3794
|
+
each_blocks[i] = create_each_block$4(child_ctx);
|
|
3795
|
+
each_blocks[i].c();
|
|
3796
|
+
each_blocks[i].m(ul, null);
|
|
3797
|
+
}
|
|
3798
|
+
}
|
|
3799
|
+
|
|
3800
|
+
for (; i < each_blocks.length; i += 1) {
|
|
3801
|
+
each_blocks[i].d(1);
|
|
3802
|
+
}
|
|
3803
|
+
|
|
3804
|
+
each_blocks.length = each_value.length;
|
|
3827
3805
|
}
|
|
3828
3806
|
|
|
3829
3807
|
if (dirty[0] & /*maxheight*/ 8 && ul_style_value !== (ul_style_value = `overflow-y: auto; max-height: ${/*maxheight*/ ctx[3]}`)) {
|
|
@@ -3847,11 +3825,7 @@ function create_fragment$q(ctx) {
|
|
|
3847
3825
|
d(detaching) {
|
|
3848
3826
|
if (detaching) detach(div1);
|
|
3849
3827
|
if (if_block) if_block.d();
|
|
3850
|
-
|
|
3851
|
-
for (let i = 0; i < each_blocks.length; i += 1) {
|
|
3852
|
-
each_blocks[i].d();
|
|
3853
|
-
}
|
|
3854
|
-
|
|
3828
|
+
destroy_each(each_blocks, detaching);
|
|
3855
3829
|
/*ul_binding*/ ctx[23](null);
|
|
3856
3830
|
/*div1_binding*/ ctx[24](null);
|
|
3857
3831
|
mounted = false;
|
|
@@ -3891,15 +3865,47 @@ function instance$o($$self, $$props, $$invalidate) {
|
|
|
3891
3865
|
let ctx;
|
|
3892
3866
|
|
|
3893
3867
|
// Hooks
|
|
3894
|
-
onMount(
|
|
3895
|
-
|
|
3896
|
-
|
|
3897
|
-
|
|
3898
|
-
|
|
3868
|
+
onMount(() => {
|
|
3869
|
+
const maxAttempts = 10;
|
|
3870
|
+
let attempts = 0;
|
|
3871
|
+
|
|
3872
|
+
const fn = setInterval(
|
|
3873
|
+
async () => {
|
|
3874
|
+
attempts++;
|
|
3875
|
+
|
|
3876
|
+
if (name && el) {
|
|
3877
|
+
addEventListeners();
|
|
3878
|
+
parseValues();
|
|
3879
|
+
bindContext();
|
|
3880
|
+
clearInterval(fn);
|
|
3881
|
+
}
|
|
3899
3882
|
|
|
3883
|
+
if (attempts > maxAttempts) {
|
|
3884
|
+
console.error("goa-dropdown: missing the required `name` attribute. It must match the children's name attribute.");
|
|
3885
|
+
clearInterval(fn);
|
|
3886
|
+
}
|
|
3887
|
+
},
|
|
3888
|
+
10
|
|
3889
|
+
);
|
|
3890
|
+
});
|
|
3891
|
+
|
|
3892
|
+
onDestroy(() => {
|
|
3893
|
+
removeEventListeners();
|
|
3894
|
+
deleteContext(name);
|
|
3895
|
+
});
|
|
3896
|
+
|
|
3897
|
+
// Functions
|
|
3898
|
+
function addEventListeners() {
|
|
3900
3899
|
el.addEventListener("focus", onFocus, true);
|
|
3901
3900
|
el.addEventListener("blur", onBlur, true);
|
|
3901
|
+
}
|
|
3902
|
+
|
|
3903
|
+
function removeEventListeners() {
|
|
3904
|
+
el.removeEventListener("focus", onFocus, true);
|
|
3905
|
+
el.removeEventListener("blur", onBlur, true);
|
|
3906
|
+
}
|
|
3902
3907
|
|
|
3908
|
+
function parseValues() {
|
|
3903
3909
|
// parse and convert values to strings to avoid later type comparison issues
|
|
3904
3910
|
let rawValue;
|
|
3905
3911
|
|
|
@@ -3913,17 +3919,8 @@ function instance$o($$self, $$props, $$invalidate) {
|
|
|
3913
3919
|
|
|
3914
3920
|
// convert all values to strings to avoid later type comparison issues
|
|
3915
3921
|
$$invalidate(9, _values = rawValues.map(val => `${val}`));
|
|
3922
|
+
}
|
|
3916
3923
|
|
|
3917
|
-
bindContext();
|
|
3918
|
-
});
|
|
3919
|
-
|
|
3920
|
-
onDestroy(() => {
|
|
3921
|
-
el.removeEventListener("focus", onFocus, true);
|
|
3922
|
-
el.removeEventListener("blur", onBlur, true);
|
|
3923
|
-
deleteContext(name);
|
|
3924
|
-
});
|
|
3925
|
-
|
|
3926
|
-
// Functions
|
|
3927
3924
|
function bindContext() {
|
|
3928
3925
|
ctx = createContext(name);
|
|
3929
3926
|
|
|
@@ -4311,15 +4308,23 @@ function instance$n($$self, $$props, $$invalidate) {
|
|
|
4311
4308
|
// private
|
|
4312
4309
|
let ctx;
|
|
4313
4310
|
|
|
4314
|
-
|
|
4315
|
-
|
|
4316
|
-
|
|
4317
|
-
|
|
4318
|
-
|
|
4319
|
-
|
|
4311
|
+
onMount(() => {
|
|
4312
|
+
|
|
4313
|
+
const fn = setInterval(
|
|
4314
|
+
() => {
|
|
4315
|
+
if (name && value) {
|
|
4316
|
+
ctx = getContext(name);
|
|
4317
|
+
|
|
4318
|
+
if (!ctx) {
|
|
4319
|
+
return;
|
|
4320
|
+
}
|
|
4320
4321
|
|
|
4321
|
-
|
|
4322
|
-
|
|
4322
|
+
ctx.notify({ type: BIND$1, name, label, value });
|
|
4323
|
+
clearInterval(fn);
|
|
4324
|
+
}
|
|
4325
|
+
},
|
|
4326
|
+
10
|
|
4327
|
+
);
|
|
4323
4328
|
});
|
|
4324
4329
|
|
|
4325
4330
|
$$self.$$set = $$props => {
|
|
@@ -5482,7 +5487,31 @@ customElements.define("goa-icon-button", IconButton);
|
|
|
5482
5487
|
|
|
5483
5488
|
/* libs/web-components/src/components/input/Input.svelte generated by Svelte v3.49.0 */
|
|
5484
5489
|
|
|
5485
|
-
function
|
|
5490
|
+
function create_if_block_7(ctx) {
|
|
5491
|
+
let div;
|
|
5492
|
+
let t;
|
|
5493
|
+
|
|
5494
|
+
return {
|
|
5495
|
+
c() {
|
|
5496
|
+
div = element("div");
|
|
5497
|
+
t = text(/*prefix*/ ctx[13]);
|
|
5498
|
+
attr(div, "class", "prefix");
|
|
5499
|
+
},
|
|
5500
|
+
m(target, anchor) {
|
|
5501
|
+
insert(target, div, anchor);
|
|
5502
|
+
append(div, t);
|
|
5503
|
+
},
|
|
5504
|
+
p(ctx, dirty) {
|
|
5505
|
+
if (dirty & /*prefix*/ 8192) set_data(t, /*prefix*/ ctx[13]);
|
|
5506
|
+
},
|
|
5507
|
+
d(detaching) {
|
|
5508
|
+
if (detaching) detach(div);
|
|
5509
|
+
}
|
|
5510
|
+
};
|
|
5511
|
+
}
|
|
5512
|
+
|
|
5513
|
+
// (81:4) {#if leadingicon}
|
|
5514
|
+
function create_if_block_6(ctx) {
|
|
5486
5515
|
let goa_icon;
|
|
5487
5516
|
|
|
5488
5517
|
return {
|
|
@@ -5506,8 +5535,8 @@ function create_if_block_5(ctx) {
|
|
|
5506
5535
|
};
|
|
5507
5536
|
}
|
|
5508
5537
|
|
|
5509
|
-
// (
|
|
5510
|
-
function
|
|
5538
|
+
// (110:4) {#if trailingicon && !handlesTrailingIconClick}
|
|
5539
|
+
function create_if_block_5(ctx) {
|
|
5511
5540
|
let goa_icon;
|
|
5512
5541
|
|
|
5513
5542
|
return {
|
|
@@ -5532,8 +5561,8 @@ function create_if_block_4$1(ctx) {
|
|
|
5532
5561
|
};
|
|
5533
5562
|
}
|
|
5534
5563
|
|
|
5535
|
-
// (
|
|
5536
|
-
function
|
|
5564
|
+
// (120:4) {#if trailingicon && handlesTrailingIconClick}
|
|
5565
|
+
function create_if_block_4$1(ctx) {
|
|
5537
5566
|
let goa_icon_button;
|
|
5538
5567
|
let mounted;
|
|
5539
5568
|
let dispose;
|
|
@@ -5541,7 +5570,7 @@ function create_if_block_3$3(ctx) {
|
|
|
5541
5570
|
return {
|
|
5542
5571
|
c() {
|
|
5543
5572
|
goa_icon_button = element("goa-icon-button");
|
|
5544
|
-
set_custom_element_data(goa_icon_button, "disabled", /*isDisabled*/ ctx[
|
|
5573
|
+
set_custom_element_data(goa_icon_button, "disabled", /*isDisabled*/ ctx[18]);
|
|
5545
5574
|
set_custom_element_data(goa_icon_button, "variant", "nocolor");
|
|
5546
5575
|
set_custom_element_data(goa_icon_button, "size", "medium");
|
|
5547
5576
|
set_custom_element_data(goa_icon_button, "type", /*trailingicon*/ ctx[5]);
|
|
@@ -5556,8 +5585,8 @@ function create_if_block_3$3(ctx) {
|
|
|
5556
5585
|
}
|
|
5557
5586
|
},
|
|
5558
5587
|
p(ctx, dirty) {
|
|
5559
|
-
if (dirty & /*isDisabled*/
|
|
5560
|
-
set_custom_element_data(goa_icon_button, "disabled", /*isDisabled*/ ctx[
|
|
5588
|
+
if (dirty & /*isDisabled*/ 262144) {
|
|
5589
|
+
set_custom_element_data(goa_icon_button, "disabled", /*isDisabled*/ ctx[18]);
|
|
5561
5590
|
}
|
|
5562
5591
|
|
|
5563
5592
|
if (dirty & /*trailingicon*/ 32) {
|
|
@@ -5572,12 +5601,36 @@ function create_if_block_3$3(ctx) {
|
|
|
5572
5601
|
};
|
|
5573
5602
|
}
|
|
5574
5603
|
|
|
5575
|
-
// (
|
|
5604
|
+
// (131:4) {#if suffix}
|
|
5605
|
+
function create_if_block_3$3(ctx) {
|
|
5606
|
+
let span;
|
|
5607
|
+
let t;
|
|
5608
|
+
|
|
5609
|
+
return {
|
|
5610
|
+
c() {
|
|
5611
|
+
span = element("span");
|
|
5612
|
+
t = text(/*suffix*/ ctx[14]);
|
|
5613
|
+
attr(span, "class", "suffix");
|
|
5614
|
+
},
|
|
5615
|
+
m(target, anchor) {
|
|
5616
|
+
insert(target, span, anchor);
|
|
5617
|
+
append(span, t);
|
|
5618
|
+
},
|
|
5619
|
+
p(ctx, dirty) {
|
|
5620
|
+
if (dirty & /*suffix*/ 16384) set_data(t, /*suffix*/ ctx[14]);
|
|
5621
|
+
},
|
|
5622
|
+
d(detaching) {
|
|
5623
|
+
if (detaching) detach(span);
|
|
5624
|
+
}
|
|
5625
|
+
};
|
|
5626
|
+
}
|
|
5627
|
+
|
|
5628
|
+
// (137:2) {#if showCounter}
|
|
5576
5629
|
function create_if_block$a(ctx) {
|
|
5577
5630
|
let if_block_anchor;
|
|
5578
5631
|
|
|
5579
5632
|
function select_block_type(ctx, dirty) {
|
|
5580
|
-
if (/*maxcharcount*/ ctx[
|
|
5633
|
+
if (/*maxcharcount*/ ctx[15] > 0) return create_if_block_1$6;
|
|
5581
5634
|
if (/*value*/ ctx[0].length > 0) return create_if_block_2$5;
|
|
5582
5635
|
}
|
|
5583
5636
|
|
|
@@ -5616,7 +5669,7 @@ function create_if_block$a(ctx) {
|
|
|
5616
5669
|
};
|
|
5617
5670
|
}
|
|
5618
5671
|
|
|
5619
|
-
// (
|
|
5672
|
+
// (142:31)
|
|
5620
5673
|
function create_if_block_2$5(ctx) {
|
|
5621
5674
|
let div;
|
|
5622
5675
|
let t_value = /*value*/ ctx[0].length + "";
|
|
@@ -5641,12 +5694,12 @@ function create_if_block_2$5(ctx) {
|
|
|
5641
5694
|
};
|
|
5642
5695
|
}
|
|
5643
5696
|
|
|
5644
|
-
// (
|
|
5697
|
+
// (138:4) {#if maxcharcount > 0}
|
|
5645
5698
|
function create_if_block_1$6(ctx) {
|
|
5646
5699
|
let div;
|
|
5647
5700
|
let t0_value = /*value*/ ctx[0].length + "";
|
|
5648
5701
|
let t0;
|
|
5649
|
-
let t1_value = `/${/*maxcharcount*/ ctx[
|
|
5702
|
+
let t1_value = `/${/*maxcharcount*/ ctx[15]}` + "";
|
|
5650
5703
|
let t1;
|
|
5651
5704
|
|
|
5652
5705
|
return {
|
|
@@ -5655,7 +5708,7 @@ function create_if_block_1$6(ctx) {
|
|
|
5655
5708
|
t0 = text(t0_value);
|
|
5656
5709
|
t1 = text(t1_value);
|
|
5657
5710
|
attr(div, "class", "counter");
|
|
5658
|
-
toggle_class(div, "counter-error", /*value*/ ctx[0].length > /*maxcharcount*/ ctx[
|
|
5711
|
+
toggle_class(div, "counter-error", /*value*/ ctx[0].length > /*maxcharcount*/ ctx[15]);
|
|
5659
5712
|
},
|
|
5660
5713
|
m(target, anchor) {
|
|
5661
5714
|
insert(target, div, anchor);
|
|
@@ -5664,10 +5717,10 @@ function create_if_block_1$6(ctx) {
|
|
|
5664
5717
|
},
|
|
5665
5718
|
p(ctx, dirty) {
|
|
5666
5719
|
if (dirty & /*value*/ 1 && t0_value !== (t0_value = /*value*/ ctx[0].length + "")) set_data(t0, t0_value);
|
|
5667
|
-
if (dirty & /*maxcharcount*/
|
|
5720
|
+
if (dirty & /*maxcharcount*/ 32768 && t1_value !== (t1_value = `/${/*maxcharcount*/ ctx[15]}` + "")) set_data(t1, t1_value);
|
|
5668
5721
|
|
|
5669
|
-
if (dirty & /*value, maxcharcount*/
|
|
5670
|
-
toggle_class(div, "counter-error", /*value*/ ctx[0].length > /*maxcharcount*/ ctx[
|
|
5722
|
+
if (dirty & /*value, maxcharcount*/ 32769) {
|
|
5723
|
+
toggle_class(div, "counter-error", /*value*/ ctx[0].length > /*maxcharcount*/ ctx[15]);
|
|
5671
5724
|
}
|
|
5672
5725
|
},
|
|
5673
5726
|
d(detaching) {
|
|
@@ -5680,21 +5733,25 @@ function create_fragment$j(ctx) {
|
|
|
5680
5733
|
let div1;
|
|
5681
5734
|
let div0;
|
|
5682
5735
|
let t0;
|
|
5736
|
+
let t1;
|
|
5683
5737
|
let input;
|
|
5684
5738
|
let input_class_value;
|
|
5685
5739
|
let input_style_value;
|
|
5686
5740
|
let input_aria_label_value;
|
|
5687
|
-
let t1;
|
|
5688
5741
|
let t2;
|
|
5689
|
-
let div0_class_value;
|
|
5690
5742
|
let t3;
|
|
5743
|
+
let t4;
|
|
5744
|
+
let div0_class_value;
|
|
5745
|
+
let t5;
|
|
5691
5746
|
let div1_style_value;
|
|
5692
5747
|
let mounted;
|
|
5693
5748
|
let dispose;
|
|
5694
|
-
let if_block0 = /*
|
|
5695
|
-
let if_block1 = /*
|
|
5696
|
-
let if_block2 = /*trailingicon*/ ctx[5] &&
|
|
5697
|
-
let if_block3 = /*
|
|
5749
|
+
let if_block0 = /*prefix*/ ctx[13] && create_if_block_7(ctx);
|
|
5750
|
+
let if_block1 = /*leadingicon*/ ctx[4] && create_if_block_6(ctx);
|
|
5751
|
+
let if_block2 = /*trailingicon*/ ctx[5] && !/*handlesTrailingIconClick*/ ctx[21] && create_if_block_5(ctx);
|
|
5752
|
+
let if_block3 = /*trailingicon*/ ctx[5] && /*handlesTrailingIconClick*/ ctx[21] && create_if_block_4$1(ctx);
|
|
5753
|
+
let if_block4 = /*suffix*/ ctx[14] && create_if_block_3$3(ctx);
|
|
5754
|
+
let if_block5 = /*showCounter*/ ctx[17] && create_if_block$a(ctx);
|
|
5698
5755
|
|
|
5699
5756
|
return {
|
|
5700
5757
|
c() {
|
|
@@ -5702,18 +5759,22 @@ function create_fragment$j(ctx) {
|
|
|
5702
5759
|
div0 = element("div");
|
|
5703
5760
|
if (if_block0) if_block0.c();
|
|
5704
5761
|
t0 = space();
|
|
5705
|
-
input = element("input");
|
|
5706
|
-
t1 = space();
|
|
5707
5762
|
if (if_block1) if_block1.c();
|
|
5763
|
+
t1 = space();
|
|
5764
|
+
input = element("input");
|
|
5708
5765
|
t2 = space();
|
|
5709
5766
|
if (if_block2) if_block2.c();
|
|
5710
5767
|
t3 = space();
|
|
5711
5768
|
if (if_block3) if_block3.c();
|
|
5769
|
+
t4 = space();
|
|
5770
|
+
if (if_block4) if_block4.c();
|
|
5771
|
+
t5 = space();
|
|
5772
|
+
if (if_block5) if_block5.c();
|
|
5712
5773
|
this.c = noop;
|
|
5713
5774
|
attr(input, "class", input_class_value = `input--${/*variant*/ ctx[6]}`);
|
|
5714
5775
|
attr(input, "style", input_style_value = `--search-icon-offset: ${/*trailingicon*/ ctx[5] ? "-0.5rem" : "0"}`);
|
|
5715
|
-
input.readOnly = /*isReadonly*/ ctx[
|
|
5716
|
-
input.disabled = /*isDisabled*/ ctx[
|
|
5776
|
+
input.readOnly = /*isReadonly*/ ctx[20];
|
|
5777
|
+
input.disabled = /*isDisabled*/ ctx[18];
|
|
5717
5778
|
attr(input, "data-testid", /*testid*/ ctx[7]);
|
|
5718
5779
|
attr(input, "name", /*name*/ ctx[2]);
|
|
5719
5780
|
attr(input, "type", /*type*/ ctx[1]);
|
|
@@ -5727,12 +5788,12 @@ function create_fragment$j(ctx) {
|
|
|
5727
5788
|
|
|
5728
5789
|
attr(div0, "class", div0_class_value = `
|
|
5729
5790
|
goa-input
|
|
5730
|
-
${/*isDisabled*/ ctx[
|
|
5791
|
+
${/*isDisabled*/ ctx[18] ? "goa-input--disabled" : ""}
|
|
5731
5792
|
variant--${/*variant*/ ctx[6]}
|
|
5732
5793
|
type--${/*type*/ ctx[1]}
|
|
5733
5794
|
`);
|
|
5734
5795
|
|
|
5735
|
-
toggle_class(div0, "error", /*isError*/ ctx[
|
|
5796
|
+
toggle_class(div0, "error", /*isError*/ ctx[19]);
|
|
5736
5797
|
attr(div1, "class", "container");
|
|
5737
5798
|
|
|
5738
5799
|
attr(div1, "style", div1_style_value = `
|
|
@@ -5744,30 +5805,34 @@ function create_fragment$j(ctx) {
|
|
|
5744
5805
|
append(div1, div0);
|
|
5745
5806
|
if (if_block0) if_block0.m(div0, null);
|
|
5746
5807
|
append(div0, t0);
|
|
5747
|
-
append(div0, input);
|
|
5748
|
-
/*input_binding*/ ctx[28](input);
|
|
5749
|
-
append(div0, t1);
|
|
5750
5808
|
if (if_block1) if_block1.m(div0, null);
|
|
5809
|
+
append(div0, t1);
|
|
5810
|
+
append(div0, input);
|
|
5811
|
+
/*input_binding*/ ctx[30](input);
|
|
5751
5812
|
append(div0, t2);
|
|
5752
5813
|
if (if_block2) if_block2.m(div0, null);
|
|
5753
|
-
append(
|
|
5754
|
-
if (if_block3) if_block3.m(
|
|
5814
|
+
append(div0, t3);
|
|
5815
|
+
if (if_block3) if_block3.m(div0, null);
|
|
5816
|
+
append(div0, t4);
|
|
5817
|
+
if (if_block4) if_block4.m(div0, null);
|
|
5818
|
+
append(div1, t5);
|
|
5819
|
+
if (if_block5) if_block5.m(div1, null);
|
|
5755
5820
|
|
|
5756
5821
|
if (!mounted) {
|
|
5757
5822
|
dispose = [
|
|
5758
|
-
listen(input, "keyup", /*onKeyUp*/ ctx[
|
|
5759
|
-
listen(input, "change", /*onKeyUp*/ ctx[
|
|
5823
|
+
listen(input, "keyup", /*onKeyUp*/ ctx[22]),
|
|
5824
|
+
listen(input, "change", /*onKeyUp*/ ctx[22])
|
|
5760
5825
|
];
|
|
5761
5826
|
|
|
5762
5827
|
mounted = true;
|
|
5763
5828
|
}
|
|
5764
5829
|
},
|
|
5765
5830
|
p(ctx, [dirty]) {
|
|
5766
|
-
if (/*
|
|
5831
|
+
if (/*prefix*/ ctx[13]) {
|
|
5767
5832
|
if (if_block0) {
|
|
5768
5833
|
if_block0.p(ctx, dirty);
|
|
5769
5834
|
} else {
|
|
5770
|
-
if_block0 =
|
|
5835
|
+
if_block0 = create_if_block_7(ctx);
|
|
5771
5836
|
if_block0.c();
|
|
5772
5837
|
if_block0.m(div0, t0);
|
|
5773
5838
|
}
|
|
@@ -5776,6 +5841,19 @@ function create_fragment$j(ctx) {
|
|
|
5776
5841
|
if_block0 = null;
|
|
5777
5842
|
}
|
|
5778
5843
|
|
|
5844
|
+
if (/*leadingicon*/ ctx[4]) {
|
|
5845
|
+
if (if_block1) {
|
|
5846
|
+
if_block1.p(ctx, dirty);
|
|
5847
|
+
} else {
|
|
5848
|
+
if_block1 = create_if_block_6(ctx);
|
|
5849
|
+
if_block1.c();
|
|
5850
|
+
if_block1.m(div0, t1);
|
|
5851
|
+
}
|
|
5852
|
+
} else if (if_block1) {
|
|
5853
|
+
if_block1.d(1);
|
|
5854
|
+
if_block1 = null;
|
|
5855
|
+
}
|
|
5856
|
+
|
|
5779
5857
|
if (dirty & /*variant*/ 64 && input_class_value !== (input_class_value = `input--${/*variant*/ ctx[6]}`)) {
|
|
5780
5858
|
attr(input, "class", input_class_value);
|
|
5781
5859
|
}
|
|
@@ -5784,12 +5862,12 @@ function create_fragment$j(ctx) {
|
|
|
5784
5862
|
attr(input, "style", input_style_value);
|
|
5785
5863
|
}
|
|
5786
5864
|
|
|
5787
|
-
if (dirty & /*isReadonly*/
|
|
5788
|
-
input.readOnly = /*isReadonly*/ ctx[
|
|
5865
|
+
if (dirty & /*isReadonly*/ 1048576) {
|
|
5866
|
+
input.readOnly = /*isReadonly*/ ctx[20];
|
|
5789
5867
|
}
|
|
5790
5868
|
|
|
5791
|
-
if (dirty & /*isDisabled*/
|
|
5792
|
-
input.disabled = /*isDisabled*/ ctx[
|
|
5869
|
+
if (dirty & /*isDisabled*/ 262144) {
|
|
5870
|
+
input.disabled = /*isDisabled*/ ctx[18];
|
|
5793
5871
|
}
|
|
5794
5872
|
|
|
5795
5873
|
if (dirty & /*testid*/ 128) {
|
|
@@ -5828,56 +5906,69 @@ function create_fragment$j(ctx) {
|
|
|
5828
5906
|
attr(input, "aria-label", input_aria_label_value);
|
|
5829
5907
|
}
|
|
5830
5908
|
|
|
5831
|
-
if (/*trailingicon*/ ctx[5] && !/*handlesTrailingIconClick*/ ctx[
|
|
5832
|
-
if (if_block1) {
|
|
5833
|
-
if_block1.p(ctx, dirty);
|
|
5834
|
-
} else {
|
|
5835
|
-
if_block1 = create_if_block_4$1(ctx);
|
|
5836
|
-
if_block1.c();
|
|
5837
|
-
if_block1.m(div0, t2);
|
|
5838
|
-
}
|
|
5839
|
-
} else if (if_block1) {
|
|
5840
|
-
if_block1.d(1);
|
|
5841
|
-
if_block1 = null;
|
|
5842
|
-
}
|
|
5843
|
-
|
|
5844
|
-
if (/*trailingicon*/ ctx[5] && /*handlesTrailingIconClick*/ ctx[19]) {
|
|
5909
|
+
if (/*trailingicon*/ ctx[5] && !/*handlesTrailingIconClick*/ ctx[21]) {
|
|
5845
5910
|
if (if_block2) {
|
|
5846
5911
|
if_block2.p(ctx, dirty);
|
|
5847
5912
|
} else {
|
|
5848
|
-
if_block2 =
|
|
5913
|
+
if_block2 = create_if_block_5(ctx);
|
|
5849
5914
|
if_block2.c();
|
|
5850
|
-
if_block2.m(div0,
|
|
5915
|
+
if_block2.m(div0, t3);
|
|
5851
5916
|
}
|
|
5852
5917
|
} else if (if_block2) {
|
|
5853
5918
|
if_block2.d(1);
|
|
5854
5919
|
if_block2 = null;
|
|
5855
5920
|
}
|
|
5856
5921
|
|
|
5857
|
-
if (
|
|
5922
|
+
if (/*trailingicon*/ ctx[5] && /*handlesTrailingIconClick*/ ctx[21]) {
|
|
5923
|
+
if (if_block3) {
|
|
5924
|
+
if_block3.p(ctx, dirty);
|
|
5925
|
+
} else {
|
|
5926
|
+
if_block3 = create_if_block_4$1(ctx);
|
|
5927
|
+
if_block3.c();
|
|
5928
|
+
if_block3.m(div0, t4);
|
|
5929
|
+
}
|
|
5930
|
+
} else if (if_block3) {
|
|
5931
|
+
if_block3.d(1);
|
|
5932
|
+
if_block3 = null;
|
|
5933
|
+
}
|
|
5934
|
+
|
|
5935
|
+
if (/*suffix*/ ctx[14]) {
|
|
5936
|
+
if (if_block4) {
|
|
5937
|
+
if_block4.p(ctx, dirty);
|
|
5938
|
+
} else {
|
|
5939
|
+
if_block4 = create_if_block_3$3(ctx);
|
|
5940
|
+
if_block4.c();
|
|
5941
|
+
if_block4.m(div0, null);
|
|
5942
|
+
}
|
|
5943
|
+
} else if (if_block4) {
|
|
5944
|
+
if_block4.d(1);
|
|
5945
|
+
if_block4 = null;
|
|
5946
|
+
}
|
|
5947
|
+
|
|
5948
|
+
if (dirty & /*isDisabled, variant, type*/ 262210 && div0_class_value !== (div0_class_value = `
|
|
5858
5949
|
goa-input
|
|
5859
|
-
${/*isDisabled*/ ctx[
|
|
5950
|
+
${/*isDisabled*/ ctx[18] ? "goa-input--disabled" : ""}
|
|
5860
5951
|
variant--${/*variant*/ ctx[6]}
|
|
5861
5952
|
type--${/*type*/ ctx[1]}
|
|
5862
5953
|
`)) {
|
|
5863
5954
|
attr(div0, "class", div0_class_value);
|
|
5864
5955
|
}
|
|
5865
5956
|
|
|
5866
|
-
if (dirty & /*isDisabled, variant, type, isError*/
|
|
5867
|
-
toggle_class(div0, "error", /*isError*/ ctx[
|
|
5957
|
+
if (dirty & /*isDisabled, variant, type, isError*/ 786498) {
|
|
5958
|
+
toggle_class(div0, "error", /*isError*/ ctx[19]);
|
|
5868
5959
|
}
|
|
5869
5960
|
|
|
5870
|
-
if (/*showCounter*/ ctx[
|
|
5871
|
-
if (
|
|
5872
|
-
|
|
5961
|
+
if (/*showCounter*/ ctx[17]) {
|
|
5962
|
+
if (if_block5) {
|
|
5963
|
+
if_block5.p(ctx, dirty);
|
|
5873
5964
|
} else {
|
|
5874
|
-
|
|
5875
|
-
|
|
5876
|
-
|
|
5965
|
+
if_block5 = create_if_block$a(ctx);
|
|
5966
|
+
if_block5.c();
|
|
5967
|
+
if_block5.m(div1, null);
|
|
5877
5968
|
}
|
|
5878
|
-
} else if (
|
|
5879
|
-
|
|
5880
|
-
|
|
5969
|
+
} else if (if_block5) {
|
|
5970
|
+
if_block5.d(1);
|
|
5971
|
+
if_block5 = null;
|
|
5881
5972
|
}
|
|
5882
5973
|
|
|
5883
5974
|
if (dirty & /*width*/ 256 && div1_style_value !== (div1_style_value = `
|
|
@@ -5891,10 +5982,12 @@ function create_fragment$j(ctx) {
|
|
|
5891
5982
|
d(detaching) {
|
|
5892
5983
|
if (detaching) detach(div1);
|
|
5893
5984
|
if (if_block0) if_block0.d();
|
|
5894
|
-
/*input_binding*/ ctx[28](null);
|
|
5895
5985
|
if (if_block1) if_block1.d();
|
|
5986
|
+
/*input_binding*/ ctx[30](null);
|
|
5896
5987
|
if (if_block2) if_block2.d();
|
|
5897
5988
|
if (if_block3) if_block3.d();
|
|
5989
|
+
if (if_block4) if_block4.d();
|
|
5990
|
+
if (if_block5) if_block5.d();
|
|
5898
5991
|
mounted = false;
|
|
5899
5992
|
run_all(dispose);
|
|
5900
5993
|
}
|
|
@@ -5930,6 +6023,8 @@ function instance$h($$self, $$props, $$invalidate) {
|
|
|
5930
6023
|
let { min = null } = $$props;
|
|
5931
6024
|
let { max = null } = $$props;
|
|
5932
6025
|
let { step = null } = $$props;
|
|
6026
|
+
let { prefix = "" } = $$props;
|
|
6027
|
+
let { suffix = "" } = $$props;
|
|
5933
6028
|
let { showcounter = "false" } = $$props;
|
|
5934
6029
|
let { maxcharcount = 0 } = $$props;
|
|
5935
6030
|
let inputEl;
|
|
@@ -5949,7 +6044,7 @@ function instance$h($$self, $$props, $$invalidate) {
|
|
|
5949
6044
|
function input_binding($$value) {
|
|
5950
6045
|
binding_callbacks[$$value ? 'unshift' : 'push'](() => {
|
|
5951
6046
|
inputEl = $$value;
|
|
5952
|
-
$$invalidate(
|
|
6047
|
+
$$invalidate(16, inputEl);
|
|
5953
6048
|
});
|
|
5954
6049
|
}
|
|
5955
6050
|
|
|
@@ -5961,53 +6056,55 @@ function instance$h($$self, $$props, $$invalidate) {
|
|
|
5961
6056
|
if ('leadingicon' in $$props) $$invalidate(4, leadingicon = $$props.leadingicon);
|
|
5962
6057
|
if ('trailingicon' in $$props) $$invalidate(5, trailingicon = $$props.trailingicon);
|
|
5963
6058
|
if ('variant' in $$props) $$invalidate(6, variant = $$props.variant);
|
|
5964
|
-
if ('disabled' in $$props) $$invalidate(
|
|
5965
|
-
if ('handletrailingiconclick' in $$props) $$invalidate(
|
|
5966
|
-
if ('focused' in $$props) $$invalidate(
|
|
5967
|
-
if ('readonly' in $$props) $$invalidate(
|
|
5968
|
-
if ('error' in $$props) $$invalidate(
|
|
6059
|
+
if ('disabled' in $$props) $$invalidate(23, disabled = $$props.disabled);
|
|
6060
|
+
if ('handletrailingiconclick' in $$props) $$invalidate(24, handletrailingiconclick = $$props.handletrailingiconclick);
|
|
6061
|
+
if ('focused' in $$props) $$invalidate(25, focused = $$props.focused);
|
|
6062
|
+
if ('readonly' in $$props) $$invalidate(26, readonly = $$props.readonly);
|
|
6063
|
+
if ('error' in $$props) $$invalidate(27, error = $$props.error);
|
|
5969
6064
|
if ('testid' in $$props) $$invalidate(7, testid = $$props.testid);
|
|
5970
6065
|
if ('width' in $$props) $$invalidate(8, width = $$props.width);
|
|
5971
6066
|
if ('arialabel' in $$props) $$invalidate(9, arialabel = $$props.arialabel);
|
|
5972
6067
|
if ('min' in $$props) $$invalidate(10, min = $$props.min);
|
|
5973
6068
|
if ('max' in $$props) $$invalidate(11, max = $$props.max);
|
|
5974
6069
|
if ('step' in $$props) $$invalidate(12, step = $$props.step);
|
|
5975
|
-
if ('
|
|
5976
|
-
if ('
|
|
6070
|
+
if ('prefix' in $$props) $$invalidate(13, prefix = $$props.prefix);
|
|
6071
|
+
if ('suffix' in $$props) $$invalidate(14, suffix = $$props.suffix);
|
|
6072
|
+
if ('showcounter' in $$props) $$invalidate(28, showcounter = $$props.showcounter);
|
|
6073
|
+
if ('maxcharcount' in $$props) $$invalidate(15, maxcharcount = $$props.maxcharcount);
|
|
5977
6074
|
};
|
|
5978
6075
|
|
|
5979
6076
|
$$self.$$.update = () => {
|
|
5980
|
-
if ($$self.$$.dirty & /*handletrailingiconclick*/
|
|
5981
|
-
$$invalidate(
|
|
6077
|
+
if ($$self.$$.dirty & /*handletrailingiconclick*/ 16777216) {
|
|
6078
|
+
$$invalidate(21, handlesTrailingIconClick = toBoolean(handletrailingiconclick));
|
|
5982
6079
|
}
|
|
5983
6080
|
|
|
5984
|
-
if ($$self.$$.dirty & /*focused*/
|
|
5985
|
-
$$invalidate(
|
|
6081
|
+
if ($$self.$$.dirty & /*focused*/ 33554432) {
|
|
6082
|
+
$$invalidate(29, isFocused = toBoolean(focused));
|
|
5986
6083
|
}
|
|
5987
6084
|
|
|
5988
|
-
if ($$self.$$.dirty & /*readonly*/
|
|
5989
|
-
$$invalidate(
|
|
6085
|
+
if ($$self.$$.dirty & /*readonly*/ 67108864) {
|
|
6086
|
+
$$invalidate(20, isReadonly = toBoolean(readonly));
|
|
5990
6087
|
}
|
|
5991
6088
|
|
|
5992
|
-
if ($$self.$$.dirty & /*error*/
|
|
5993
|
-
$$invalidate(
|
|
6089
|
+
if ($$self.$$.dirty & /*error*/ 134217728) {
|
|
6090
|
+
$$invalidate(19, isError = toBoolean(error));
|
|
5994
6091
|
}
|
|
5995
6092
|
|
|
5996
|
-
if ($$self.$$.dirty & /*disabled*/
|
|
5997
|
-
$$invalidate(
|
|
6093
|
+
if ($$self.$$.dirty & /*disabled*/ 8388608) {
|
|
6094
|
+
$$invalidate(18, isDisabled = toBoolean(disabled));
|
|
5998
6095
|
}
|
|
5999
6096
|
|
|
6000
|
-
if ($$self.$$.dirty & /*showcounter*/
|
|
6001
|
-
$$invalidate(
|
|
6097
|
+
if ($$self.$$.dirty & /*showcounter*/ 268435456) {
|
|
6098
|
+
$$invalidate(17, showCounter = toBoolean(showcounter));
|
|
6002
6099
|
}
|
|
6003
6100
|
|
|
6004
|
-
if ($$self.$$.dirty & /*isFocused, inputEl*/
|
|
6101
|
+
if ($$self.$$.dirty & /*isFocused, inputEl*/ 536936448) {
|
|
6005
6102
|
if (isFocused && inputEl) {
|
|
6006
6103
|
setTimeout(() => inputEl.focus(), 1);
|
|
6007
6104
|
}
|
|
6008
6105
|
}
|
|
6009
6106
|
|
|
6010
|
-
if ($$self.$$.dirty & /*inputEl, type*/
|
|
6107
|
+
if ($$self.$$.dirty & /*inputEl, type*/ 65538) {
|
|
6011
6108
|
if (inputEl && type === "search") {
|
|
6012
6109
|
inputEl.addEventListener("search", e => {
|
|
6013
6110
|
onKeyUp(e);
|
|
@@ -6030,6 +6127,8 @@ function instance$h($$self, $$props, $$invalidate) {
|
|
|
6030
6127
|
min,
|
|
6031
6128
|
max,
|
|
6032
6129
|
step,
|
|
6130
|
+
prefix,
|
|
6131
|
+
suffix,
|
|
6033
6132
|
maxcharcount,
|
|
6034
6133
|
inputEl,
|
|
6035
6134
|
showCounter,
|
|
@@ -6053,7 +6152,7 @@ class Input extends SvelteElement {
|
|
|
6053
6152
|
constructor(options) {
|
|
6054
6153
|
super();
|
|
6055
6154
|
|
|
6056
|
-
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:
|
|
6155
|
+
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:stretch;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}.prefix,.suffix{background-color:var(--color-gray-100);padding:0 0.75rem;display:flex;align-items:center}.prefix{border-top-left-radius:var(--input-border-radius);border-bottom-left-radius:var(--input-border-radius);border-right:1px solid var(--color-gray-600)}.suffix{border-top-right-radius:var(--input-border-radius);border-bottom-right-radius:var(--input-border-radius);border-left:1px solid var(--color-gray-600)}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>')
|
|
6057
6156
|
center center no-repeat}</style>`;
|
|
6058
6157
|
|
|
6059
6158
|
init(
|
|
@@ -6074,19 +6173,21 @@ class Input extends SvelteElement {
|
|
|
6074
6173
|
leadingicon: 4,
|
|
6075
6174
|
trailingicon: 5,
|
|
6076
6175
|
variant: 6,
|
|
6077
|
-
disabled:
|
|
6078
|
-
handletrailingiconclick:
|
|
6079
|
-
focused:
|
|
6080
|
-
readonly:
|
|
6081
|
-
error:
|
|
6176
|
+
disabled: 23,
|
|
6177
|
+
handletrailingiconclick: 24,
|
|
6178
|
+
focused: 25,
|
|
6179
|
+
readonly: 26,
|
|
6180
|
+
error: 27,
|
|
6082
6181
|
testid: 7,
|
|
6083
6182
|
width: 8,
|
|
6084
6183
|
arialabel: 9,
|
|
6085
6184
|
min: 10,
|
|
6086
6185
|
max: 11,
|
|
6087
6186
|
step: 12,
|
|
6088
|
-
|
|
6089
|
-
|
|
6187
|
+
prefix: 13,
|
|
6188
|
+
suffix: 14,
|
|
6189
|
+
showcounter: 28,
|
|
6190
|
+
maxcharcount: 15
|
|
6090
6191
|
},
|
|
6091
6192
|
null
|
|
6092
6193
|
);
|
|
@@ -6123,6 +6224,8 @@ class Input extends SvelteElement {
|
|
|
6123
6224
|
"min",
|
|
6124
6225
|
"max",
|
|
6125
6226
|
"step",
|
|
6227
|
+
"prefix",
|
|
6228
|
+
"suffix",
|
|
6126
6229
|
"showcounter",
|
|
6127
6230
|
"maxcharcount"
|
|
6128
6231
|
];
|
|
@@ -6192,7 +6295,7 @@ class Input extends SvelteElement {
|
|
|
6192
6295
|
}
|
|
6193
6296
|
|
|
6194
6297
|
get disabled() {
|
|
6195
|
-
return this.$$.ctx[
|
|
6298
|
+
return this.$$.ctx[23];
|
|
6196
6299
|
}
|
|
6197
6300
|
|
|
6198
6301
|
set disabled(disabled) {
|
|
@@ -6201,7 +6304,7 @@ class Input extends SvelteElement {
|
|
|
6201
6304
|
}
|
|
6202
6305
|
|
|
6203
6306
|
get handletrailingiconclick() {
|
|
6204
|
-
return this.$$.ctx[
|
|
6307
|
+
return this.$$.ctx[24];
|
|
6205
6308
|
}
|
|
6206
6309
|
|
|
6207
6310
|
set handletrailingiconclick(handletrailingiconclick) {
|
|
@@ -6210,7 +6313,7 @@ class Input extends SvelteElement {
|
|
|
6210
6313
|
}
|
|
6211
6314
|
|
|
6212
6315
|
get focused() {
|
|
6213
|
-
return this.$$.ctx[
|
|
6316
|
+
return this.$$.ctx[25];
|
|
6214
6317
|
}
|
|
6215
6318
|
|
|
6216
6319
|
set focused(focused) {
|
|
@@ -6219,7 +6322,7 @@ class Input extends SvelteElement {
|
|
|
6219
6322
|
}
|
|
6220
6323
|
|
|
6221
6324
|
get readonly() {
|
|
6222
|
-
return this.$$.ctx[
|
|
6325
|
+
return this.$$.ctx[26];
|
|
6223
6326
|
}
|
|
6224
6327
|
|
|
6225
6328
|
set readonly(readonly) {
|
|
@@ -6228,7 +6331,7 @@ class Input extends SvelteElement {
|
|
|
6228
6331
|
}
|
|
6229
6332
|
|
|
6230
6333
|
get error() {
|
|
6231
|
-
return this.$$.ctx[
|
|
6334
|
+
return this.$$.ctx[27];
|
|
6232
6335
|
}
|
|
6233
6336
|
|
|
6234
6337
|
set error(error) {
|
|
@@ -6290,8 +6393,26 @@ class Input extends SvelteElement {
|
|
|
6290
6393
|
flush();
|
|
6291
6394
|
}
|
|
6292
6395
|
|
|
6396
|
+
get prefix() {
|
|
6397
|
+
return this.$$.ctx[13];
|
|
6398
|
+
}
|
|
6399
|
+
|
|
6400
|
+
set prefix(prefix) {
|
|
6401
|
+
this.$$set({ prefix });
|
|
6402
|
+
flush();
|
|
6403
|
+
}
|
|
6404
|
+
|
|
6405
|
+
get suffix() {
|
|
6406
|
+
return this.$$.ctx[14];
|
|
6407
|
+
}
|
|
6408
|
+
|
|
6409
|
+
set suffix(suffix) {
|
|
6410
|
+
this.$$set({ suffix });
|
|
6411
|
+
flush();
|
|
6412
|
+
}
|
|
6413
|
+
|
|
6293
6414
|
get showcounter() {
|
|
6294
|
-
return this.$$.ctx[
|
|
6415
|
+
return this.$$.ctx[28];
|
|
6295
6416
|
}
|
|
6296
6417
|
|
|
6297
6418
|
set showcounter(showcounter) {
|
|
@@ -6300,7 +6421,7 @@ class Input extends SvelteElement {
|
|
|
6300
6421
|
}
|
|
6301
6422
|
|
|
6302
6423
|
get maxcharcount() {
|
|
6303
|
-
return this.$$.ctx[
|
|
6424
|
+
return this.$$.ctx[15];
|
|
6304
6425
|
}
|
|
6305
6426
|
|
|
6306
6427
|
set maxcharcount(maxcharcount) {
|
|
@@ -7614,7 +7735,7 @@ function get_each_context$3(ctx, list, i) {
|
|
|
7614
7735
|
return child_ctx;
|
|
7615
7736
|
}
|
|
7616
7737
|
|
|
7617
|
-
// (
|
|
7738
|
+
// (63:2) {#each options as option (option.value) }
|
|
7618
7739
|
function create_each_block$3(key_1, ctx) {
|
|
7619
7740
|
let label;
|
|
7620
7741
|
let input;
|
|
@@ -7802,21 +7923,35 @@ function instance$d($$self, $$props, $$invalidate) {
|
|
|
7802
7923
|
let el;
|
|
7803
7924
|
|
|
7804
7925
|
onMount(() => {
|
|
7805
|
-
|
|
7806
|
-
|
|
7807
|
-
|
|
7808
|
-
|
|
7926
|
+
const maxAttempts = 10;
|
|
7927
|
+
let attempts = 0;
|
|
7928
|
+
|
|
7929
|
+
const fn = setInterval(
|
|
7930
|
+
async () => {
|
|
7931
|
+
attempts++;
|
|
7932
|
+
|
|
7933
|
+
if (name) {
|
|
7934
|
+
ctx = createContext(name);
|
|
7935
|
+
|
|
7936
|
+
ctx.subscribe(msg => {
|
|
7937
|
+
switch (msg === null || msg === void 0 ? void 0 : msg.type) {
|
|
7938
|
+
case BIND:
|
|
7939
|
+
{
|
|
7940
|
+
$$invalidate(4, options = [...options, msg]);
|
|
7941
|
+
}
|
|
7942
|
+
}
|
|
7943
|
+
});
|
|
7809
7944
|
|
|
7810
|
-
|
|
7945
|
+
clearInterval(fn);
|
|
7946
|
+
}
|
|
7811
7947
|
|
|
7812
|
-
|
|
7813
|
-
|
|
7814
|
-
|
|
7815
|
-
|
|
7816
|
-
|
|
7817
|
-
|
|
7818
|
-
|
|
7819
|
-
});
|
|
7948
|
+
if (attempts > maxAttempts) {
|
|
7949
|
+
console.error("goa-radio: missing the required `name` attribute. It must match the children's name attribute.");
|
|
7950
|
+
clearInterval(fn);
|
|
7951
|
+
}
|
|
7952
|
+
},
|
|
7953
|
+
10
|
|
7954
|
+
);
|
|
7820
7955
|
});
|
|
7821
7956
|
|
|
7822
7957
|
function onChange(newValue) {
|
|
@@ -7994,14 +8129,32 @@ function instance$c($$self, $$props, $$invalidate) {
|
|
|
7994
8129
|
let { name } = $$props;
|
|
7995
8130
|
let ctx;
|
|
7996
8131
|
|
|
7997
|
-
onMount(
|
|
7998
|
-
|
|
7999
|
-
|
|
8000
|
-
|
|
8001
|
-
|
|
8132
|
+
onMount(() => {
|
|
8133
|
+
const maxAttempts = 10;
|
|
8134
|
+
let attempts = 0;
|
|
8135
|
+
|
|
8136
|
+
const fn = setInterval(
|
|
8137
|
+
() => {
|
|
8138
|
+
attempts++;
|
|
8002
8139
|
|
|
8003
|
-
|
|
8004
|
-
|
|
8140
|
+
if (name) {
|
|
8141
|
+
ctx = getContext(name);
|
|
8142
|
+
|
|
8143
|
+
if (!ctx) {
|
|
8144
|
+
return;
|
|
8145
|
+
}
|
|
8146
|
+
|
|
8147
|
+
ctx.notify({ type: BIND, value, label });
|
|
8148
|
+
clearInterval(fn);
|
|
8149
|
+
}
|
|
8150
|
+
|
|
8151
|
+
if (attempts > maxAttempts) {
|
|
8152
|
+
console.error("goa-radio-item: missing the required `name` attribute. It must match the parent's name attribute.");
|
|
8153
|
+
clearInterval(fn);
|
|
8154
|
+
}
|
|
8155
|
+
},
|
|
8156
|
+
10
|
|
8157
|
+
);
|
|
8005
8158
|
});
|
|
8006
8159
|
|
|
8007
8160
|
$$self.$$set = $$props => {
|
|
@@ -8235,7 +8388,7 @@ function create_if_block_3(ctx) {
|
|
|
8235
8388
|
t0 = space();
|
|
8236
8389
|
div1 = element("div");
|
|
8237
8390
|
div1.innerHTML = `An official site of the <a href="https://www.alberta.ca/index.aspx">Alberta Government</a>`;
|
|
8238
|
-
attr(div0, "class", "service-
|
|
8391
|
+
attr(div0, "class", "service-type service-type--live");
|
|
8239
8392
|
attr(div1, "data-testid", "type");
|
|
8240
8393
|
attr(div1, "class", "site-text");
|
|
8241
8394
|
},
|
|
@@ -8277,7 +8430,7 @@ function create_if_block_1$3(ctx) {
|
|
|
8277
8430
|
t4 = text(" service\n ");
|
|
8278
8431
|
if (if_block) if_block.c();
|
|
8279
8432
|
attr(div0, "data-testid", "type");
|
|
8280
|
-
attr(div0, "class", div0_class_value = "service-
|
|
8433
|
+
attr(div0, "class", div0_class_value = "service-type service-type--" + /*type*/ ctx[0].toLowerCase());
|
|
8281
8434
|
attr(a, "href", "https://www.alberta.ca/index.aspx");
|
|
8282
8435
|
attr(div1, "data-testid", "site-text");
|
|
8283
8436
|
attr(div1, "class", "site-text");
|
|
@@ -8295,7 +8448,7 @@ function create_if_block_1$3(ctx) {
|
|
|
8295
8448
|
p(ctx, dirty) {
|
|
8296
8449
|
if (dirty & /*type*/ 1 && t0_value !== (t0_value = capitalize(/*type*/ ctx[0]) + "")) set_data(t0, t0_value);
|
|
8297
8450
|
|
|
8298
|
-
if (dirty & /*type*/ 1 && div0_class_value !== (div0_class_value = "service-
|
|
8451
|
+
if (dirty & /*type*/ 1 && div0_class_value !== (div0_class_value = "service-type service-type--" + /*type*/ ctx[0].toLowerCase())) {
|
|
8299
8452
|
attr(div0, "class", div0_class_value);
|
|
8300
8453
|
}
|
|
8301
8454
|
|