@warp-ds/elements 1.3.0-next.1 → 1.3.0
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/dist/index.js +419 -91
- package/dist/index.js.map +4 -4
- package/dist/packages/affix/index.js +97 -15
- package/dist/packages/affix/index.js.map +4 -4
- package/dist/packages/alert/index.js +225 -61
- package/dist/packages/alert/index.js.map +4 -4
- package/dist/packages/attention/index.js +48 -7
- package/dist/packages/attention/index.js.map +3 -3
- package/dist/packages/expandable/index.js +96 -14
- package/dist/packages/expandable/index.js.map +4 -4
- package/dist/packages/pill/index.js +49 -8
- package/dist/packages/pill/index.js.map +3 -3
- package/dist/packages/select/index.js +48 -7
- package/dist/packages/select/index.js.map +3 -3
- package/dist/packages/toast/index.js +217 -53
- package/dist/packages/toast/index.js.map +4 -4
- package/package.json +2 -2
|
@@ -1339,7 +1339,7 @@ var collapse = (el, done) => {
|
|
|
1339
1339
|
return returnPromise;
|
|
1340
1340
|
};
|
|
1341
1341
|
|
|
1342
|
-
// node_modules/.pnpm/@warp-ds+icons@
|
|
1342
|
+
// node_modules/.pnpm/@warp-ds+icons@2.0.0/node_modules/@warp-ds/icons/dist/elements/warning-16.js
|
|
1343
1343
|
import { LitElement } from "lit";
|
|
1344
1344
|
import { unsafeStatic, html } from "lit/static-html.js";
|
|
1345
1345
|
|
|
@@ -1694,25 +1694,66 @@ function setupI18n(params = {}) {
|
|
|
1694
1694
|
}
|
|
1695
1695
|
var i18n = setupI18n();
|
|
1696
1696
|
|
|
1697
|
-
// node_modules/.pnpm/@warp-ds+icons@
|
|
1698
|
-
var messages = JSON.parse('{"icon.title.
|
|
1699
|
-
var messages2 = JSON.parse('{"icon.title.
|
|
1700
|
-
var messages3 = JSON.parse('{"icon.title.
|
|
1701
|
-
var supportedLocales = ["en", "nb", "fi"];
|
|
1697
|
+
// node_modules/.pnpm/@warp-ds+icons@2.0.0/node_modules/@warp-ds/icons/dist/elements/warning-16.js
|
|
1698
|
+
var messages = JSON.parse('{"icon.title.warning":"Varseltrekant med utropstegn"}');
|
|
1699
|
+
var messages2 = JSON.parse('{"icon.title.warning":"Warning triangle with exclamation point"}');
|
|
1700
|
+
var messages3 = JSON.parse('{"icon.title.warning":"Varoituskolmio, jonka sis\xE4ll\xE4 on huutomerkki"}');
|
|
1701
|
+
var supportedLocales = ["en", "nb", "fi", "da", "sv"];
|
|
1702
1702
|
var defaultLocale2 = "en";
|
|
1703
|
+
var detectByBrand = () => {
|
|
1704
|
+
let value;
|
|
1705
|
+
switch (process.env.NMP_BRAND) {
|
|
1706
|
+
case "FINN":
|
|
1707
|
+
value = "nb";
|
|
1708
|
+
break;
|
|
1709
|
+
case "TORI":
|
|
1710
|
+
value = "fi";
|
|
1711
|
+
break;
|
|
1712
|
+
case "BLOCKET":
|
|
1713
|
+
value = "sv";
|
|
1714
|
+
break;
|
|
1715
|
+
case "DBA":
|
|
1716
|
+
value = "da";
|
|
1717
|
+
break;
|
|
1718
|
+
default:
|
|
1719
|
+
value = "en";
|
|
1720
|
+
}
|
|
1721
|
+
return value;
|
|
1722
|
+
};
|
|
1723
|
+
var detectByHost = () => {
|
|
1724
|
+
var _a;
|
|
1725
|
+
const hostname = (_a = document == null ? void 0 : document.location) == null ? void 0 : _a.hostname;
|
|
1726
|
+
if (hostname.includes("finn")) {
|
|
1727
|
+
return "nb";
|
|
1728
|
+
} else if (hostname.includes("tori")) {
|
|
1729
|
+
return "fi";
|
|
1730
|
+
} else if (hostname.includes("blocket")) {
|
|
1731
|
+
return "sv";
|
|
1732
|
+
} else if (hostname.includes("dba")) {
|
|
1733
|
+
return "da";
|
|
1734
|
+
} else {
|
|
1735
|
+
return defaultLocale2;
|
|
1736
|
+
}
|
|
1737
|
+
};
|
|
1703
1738
|
var getSupportedLocale = (usedLocale) => {
|
|
1704
1739
|
return supportedLocales.find(
|
|
1705
1740
|
(locale) => usedLocale === locale || usedLocale.toLowerCase().includes(locale)
|
|
1706
|
-
) ||
|
|
1741
|
+
) || detectByHost();
|
|
1707
1742
|
};
|
|
1708
1743
|
function detectLocale() {
|
|
1744
|
+
var _a;
|
|
1709
1745
|
if (typeof window === "undefined") {
|
|
1710
|
-
const serverLocale =
|
|
1746
|
+
const serverLocale = detectByBrand();
|
|
1711
1747
|
return getSupportedLocale(serverLocale);
|
|
1712
1748
|
}
|
|
1713
1749
|
try {
|
|
1714
|
-
const htmlLocale = document.documentElement.lang;
|
|
1715
|
-
|
|
1750
|
+
const htmlLocale = (_a = document == null ? void 0 : document.documentElement) == null ? void 0 : _a.lang;
|
|
1751
|
+
const hostLocale = detectByHost();
|
|
1752
|
+
if (!supportedLocales.includes(htmlLocale)) {
|
|
1753
|
+
console.warn("Unsupported locale set in html lang tag, falling back to detection by hostname");
|
|
1754
|
+
return getSupportedLocale(hostLocale);
|
|
1755
|
+
}
|
|
1756
|
+
return getSupportedLocale(htmlLocale != null ? htmlLocale : hostLocale);
|
|
1716
1757
|
} catch (e) {
|
|
1717
1758
|
console.warn("could not detect locale, falling back to source locale", e);
|
|
1718
1759
|
return defaultLocale2;
|
|
@@ -1732,37 +1773,78 @@ var activateI18n = (enMessages, nbMessages, fiMessages) => {
|
|
|
1732
1773
|
i18n.activate(locale);
|
|
1733
1774
|
};
|
|
1734
1775
|
activateI18n(messages2, messages, messages3);
|
|
1735
|
-
var
|
|
1776
|
+
var IconWarning16 = class extends LitElement {
|
|
1736
1777
|
render() {
|
|
1737
|
-
const title = i18n.t({ message: `
|
|
1738
|
-
return html`<svg xmlns="http://www.w3.org/2000/svg"width="16"height="16"fill="none"viewBox="0 0 16 16" part="w-icon-
|
|
1778
|
+
const title = i18n.t({ message: `Warning triangle with exclamation point`, id: "icon.title.warning", comment: "Title for warning icon" });
|
|
1779
|
+
return html`<svg xmlns="http://www.w3.org/2000/svg"width="16"height="16"fill="none"viewBox="0 0 16 16" part="w-icon-warning-16-part">${unsafeStatic(`<title>${title}</title>`)}<path stroke="currentColor" d="m.712 14.07 6.25-12.994a1 1 0 0 1 1.792-.022l6.635 12.995a1 1 0 0 1-.89 1.455H1.613a1 1 0 0 1-.902-1.434Z"></path><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M8 6v4.992M8 13v.333"></path></svg>`;
|
|
1739
1780
|
}
|
|
1740
1781
|
};
|
|
1741
|
-
if (!customElements.get("w-icon-
|
|
1742
|
-
customElements.define("w-icon-
|
|
1782
|
+
if (!customElements.get("w-icon-warning-16")) {
|
|
1783
|
+
customElements.define("w-icon-warning-16", IconWarning16);
|
|
1743
1784
|
}
|
|
1744
1785
|
|
|
1745
|
-
// node_modules/.pnpm/@warp-ds+icons@
|
|
1786
|
+
// node_modules/.pnpm/@warp-ds+icons@2.0.0/node_modules/@warp-ds/icons/dist/elements/error-16.js
|
|
1746
1787
|
import { LitElement as LitElement2 } from "lit";
|
|
1747
1788
|
import { unsafeStatic as unsafeStatic2, html as html2 } from "lit/static-html.js";
|
|
1748
|
-
var messages4 = JSON.parse('{"icon.title.
|
|
1749
|
-
var messages22 = JSON.parse('{"icon.title.
|
|
1750
|
-
var messages32 = JSON.parse('{"icon.title.
|
|
1751
|
-
var supportedLocales2 = ["en", "nb", "fi"];
|
|
1789
|
+
var messages4 = JSON.parse('{"icon.title.error":"\xC5ttekant med utropstegn"}');
|
|
1790
|
+
var messages22 = JSON.parse('{"icon.title.error":"Octagon with exclamation point"}');
|
|
1791
|
+
var messages32 = JSON.parse('{"icon.title.error":"Kahdeksankulmio, jonka sis\xE4ll\xE4 on huutomerkki"}');
|
|
1792
|
+
var supportedLocales2 = ["en", "nb", "fi", "da", "sv"];
|
|
1752
1793
|
var defaultLocale3 = "en";
|
|
1794
|
+
var detectByBrand2 = () => {
|
|
1795
|
+
let value;
|
|
1796
|
+
switch (process.env.NMP_BRAND) {
|
|
1797
|
+
case "FINN":
|
|
1798
|
+
value = "nb";
|
|
1799
|
+
break;
|
|
1800
|
+
case "TORI":
|
|
1801
|
+
value = "fi";
|
|
1802
|
+
break;
|
|
1803
|
+
case "BLOCKET":
|
|
1804
|
+
value = "sv";
|
|
1805
|
+
break;
|
|
1806
|
+
case "DBA":
|
|
1807
|
+
value = "da";
|
|
1808
|
+
break;
|
|
1809
|
+
default:
|
|
1810
|
+
value = "en";
|
|
1811
|
+
}
|
|
1812
|
+
return value;
|
|
1813
|
+
};
|
|
1814
|
+
var detectByHost2 = () => {
|
|
1815
|
+
var _a;
|
|
1816
|
+
const hostname = (_a = document == null ? void 0 : document.location) == null ? void 0 : _a.hostname;
|
|
1817
|
+
if (hostname.includes("finn")) {
|
|
1818
|
+
return "nb";
|
|
1819
|
+
} else if (hostname.includes("tori")) {
|
|
1820
|
+
return "fi";
|
|
1821
|
+
} else if (hostname.includes("blocket")) {
|
|
1822
|
+
return "sv";
|
|
1823
|
+
} else if (hostname.includes("dba")) {
|
|
1824
|
+
return "da";
|
|
1825
|
+
} else {
|
|
1826
|
+
return defaultLocale3;
|
|
1827
|
+
}
|
|
1828
|
+
};
|
|
1753
1829
|
var getSupportedLocale2 = (usedLocale) => {
|
|
1754
1830
|
return supportedLocales2.find(
|
|
1755
1831
|
(locale) => usedLocale === locale || usedLocale.toLowerCase().includes(locale)
|
|
1756
|
-
) ||
|
|
1832
|
+
) || detectByHost2();
|
|
1757
1833
|
};
|
|
1758
1834
|
function detectLocale2() {
|
|
1835
|
+
var _a;
|
|
1759
1836
|
if (typeof window === "undefined") {
|
|
1760
|
-
const serverLocale =
|
|
1837
|
+
const serverLocale = detectByBrand2();
|
|
1761
1838
|
return getSupportedLocale2(serverLocale);
|
|
1762
1839
|
}
|
|
1763
1840
|
try {
|
|
1764
|
-
const htmlLocale = document.documentElement.lang;
|
|
1765
|
-
|
|
1841
|
+
const htmlLocale = (_a = document == null ? void 0 : document.documentElement) == null ? void 0 : _a.lang;
|
|
1842
|
+
const hostLocale = detectByHost2();
|
|
1843
|
+
if (!supportedLocales2.includes(htmlLocale)) {
|
|
1844
|
+
console.warn("Unsupported locale set in html lang tag, falling back to detection by hostname");
|
|
1845
|
+
return getSupportedLocale2(hostLocale);
|
|
1846
|
+
}
|
|
1847
|
+
return getSupportedLocale2(htmlLocale != null ? htmlLocale : hostLocale);
|
|
1766
1848
|
} catch (e) {
|
|
1767
1849
|
console.warn("could not detect locale, falling back to source locale", e);
|
|
1768
1850
|
return defaultLocale3;
|
|
@@ -1782,37 +1864,78 @@ var activateI18n2 = (enMessages, nbMessages, fiMessages) => {
|
|
|
1782
1864
|
i18n.activate(locale);
|
|
1783
1865
|
};
|
|
1784
1866
|
activateI18n2(messages22, messages4, messages32);
|
|
1785
|
-
var
|
|
1867
|
+
var IconError16 = class extends LitElement2 {
|
|
1786
1868
|
render() {
|
|
1787
|
-
const title = i18n.t({ message: `
|
|
1788
|
-
return html2`<svg xmlns="http://www.w3.org/2000/svg"width="16"height="16"fill="none"viewBox="0 0 16 16" part="w-icon-
|
|
1869
|
+
const title = i18n.t({ message: `Octagon with exclamation point`, id: "icon.title.error", comment: "Title for error icon" });
|
|
1870
|
+
return html2`<svg xmlns="http://www.w3.org/2000/svg"width="16"height="16"fill="none"viewBox="0 0 16 16" part="w-icon-error-16-part">${unsafeStatic2(`<title>${title}</title>`)}<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M.5 11.107 4.748 15.5h6.503l4.248-4.393V4.893L11.252.5H4.748L.5 4.893z"></path><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M8 11.398a.25.25 0 1 1 0-.5m0 .5a.25.25 0 1 0 0-.5"></path><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" d="M8 8.5V3"></path></svg>`;
|
|
1789
1871
|
}
|
|
1790
1872
|
};
|
|
1791
|
-
if (!customElements.get("w-icon-
|
|
1792
|
-
customElements.define("w-icon-
|
|
1873
|
+
if (!customElements.get("w-icon-error-16")) {
|
|
1874
|
+
customElements.define("w-icon-error-16", IconError16);
|
|
1793
1875
|
}
|
|
1794
1876
|
|
|
1795
|
-
// node_modules/.pnpm/@warp-ds+icons@
|
|
1877
|
+
// node_modules/.pnpm/@warp-ds+icons@2.0.0/node_modules/@warp-ds/icons/dist/elements/success-16.js
|
|
1796
1878
|
import { LitElement as LitElement3 } from "lit";
|
|
1797
1879
|
import { unsafeStatic as unsafeStatic3, html as html3 } from "lit/static-html.js";
|
|
1798
|
-
var messages5 = JSON.parse('{"icon.title.
|
|
1799
|
-
var messages23 = JSON.parse('{"icon.title.
|
|
1800
|
-
var messages33 = JSON.parse('{"icon.title.
|
|
1801
|
-
var supportedLocales3 = ["en", "nb", "fi"];
|
|
1880
|
+
var messages5 = JSON.parse('{"icon.title.success":"Sirkel med sjekkmerke"}');
|
|
1881
|
+
var messages23 = JSON.parse('{"icon.title.success":"Circle with checkmark"}');
|
|
1882
|
+
var messages33 = JSON.parse('{"icon.title.success":"Ympyr\xE4, jonka sis\xE4ll\xE4 on valintamerkki"}');
|
|
1883
|
+
var supportedLocales3 = ["en", "nb", "fi", "da", "sv"];
|
|
1802
1884
|
var defaultLocale4 = "en";
|
|
1885
|
+
var detectByBrand3 = () => {
|
|
1886
|
+
let value;
|
|
1887
|
+
switch (process.env.NMP_BRAND) {
|
|
1888
|
+
case "FINN":
|
|
1889
|
+
value = "nb";
|
|
1890
|
+
break;
|
|
1891
|
+
case "TORI":
|
|
1892
|
+
value = "fi";
|
|
1893
|
+
break;
|
|
1894
|
+
case "BLOCKET":
|
|
1895
|
+
value = "sv";
|
|
1896
|
+
break;
|
|
1897
|
+
case "DBA":
|
|
1898
|
+
value = "da";
|
|
1899
|
+
break;
|
|
1900
|
+
default:
|
|
1901
|
+
value = "en";
|
|
1902
|
+
}
|
|
1903
|
+
return value;
|
|
1904
|
+
};
|
|
1905
|
+
var detectByHost3 = () => {
|
|
1906
|
+
var _a;
|
|
1907
|
+
const hostname = (_a = document == null ? void 0 : document.location) == null ? void 0 : _a.hostname;
|
|
1908
|
+
if (hostname.includes("finn")) {
|
|
1909
|
+
return "nb";
|
|
1910
|
+
} else if (hostname.includes("tori")) {
|
|
1911
|
+
return "fi";
|
|
1912
|
+
} else if (hostname.includes("blocket")) {
|
|
1913
|
+
return "sv";
|
|
1914
|
+
} else if (hostname.includes("dba")) {
|
|
1915
|
+
return "da";
|
|
1916
|
+
} else {
|
|
1917
|
+
return defaultLocale4;
|
|
1918
|
+
}
|
|
1919
|
+
};
|
|
1803
1920
|
var getSupportedLocale3 = (usedLocale) => {
|
|
1804
1921
|
return supportedLocales3.find(
|
|
1805
1922
|
(locale) => usedLocale === locale || usedLocale.toLowerCase().includes(locale)
|
|
1806
|
-
) ||
|
|
1923
|
+
) || detectByHost3();
|
|
1807
1924
|
};
|
|
1808
1925
|
function detectLocale3() {
|
|
1926
|
+
var _a;
|
|
1809
1927
|
if (typeof window === "undefined") {
|
|
1810
|
-
const serverLocale =
|
|
1928
|
+
const serverLocale = detectByBrand3();
|
|
1811
1929
|
return getSupportedLocale3(serverLocale);
|
|
1812
1930
|
}
|
|
1813
1931
|
try {
|
|
1814
|
-
const htmlLocale = document.documentElement.lang;
|
|
1815
|
-
|
|
1932
|
+
const htmlLocale = (_a = document == null ? void 0 : document.documentElement) == null ? void 0 : _a.lang;
|
|
1933
|
+
const hostLocale = detectByHost3();
|
|
1934
|
+
if (!supportedLocales3.includes(htmlLocale)) {
|
|
1935
|
+
console.warn("Unsupported locale set in html lang tag, falling back to detection by hostname");
|
|
1936
|
+
return getSupportedLocale3(hostLocale);
|
|
1937
|
+
}
|
|
1938
|
+
return getSupportedLocale3(htmlLocale != null ? htmlLocale : hostLocale);
|
|
1816
1939
|
} catch (e) {
|
|
1817
1940
|
console.warn("could not detect locale, falling back to source locale", e);
|
|
1818
1941
|
return defaultLocale4;
|
|
@@ -1832,37 +1955,78 @@ var activateI18n3 = (enMessages, nbMessages, fiMessages) => {
|
|
|
1832
1955
|
i18n.activate(locale);
|
|
1833
1956
|
};
|
|
1834
1957
|
activateI18n3(messages23, messages5, messages33);
|
|
1835
|
-
var
|
|
1958
|
+
var IconSuccess16 = class extends LitElement3 {
|
|
1836
1959
|
render() {
|
|
1837
|
-
const title = i18n.t({ message: `
|
|
1838
|
-
return html3`<svg xmlns="http://www.w3.org/2000/svg"width="16"height="16"fill="none"viewBox="0 0 16 16" part="w-icon-
|
|
1960
|
+
const title = i18n.t({ message: `Circle with checkmark`, id: "icon.title.success", comment: "Title for success icon" });
|
|
1961
|
+
return html3`<svg xmlns="http://www.w3.org/2000/svg"width="16"height="16"fill="none"viewBox="0 0 16 16" part="w-icon-success-16-part">${unsafeStatic3(`<title>${title}</title>`)}<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="m4 8.815 1.633 2.318a.7.7 0 0 0 1.138.034l5.228-6.615"></path><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M.5 7.999a7.5 7.5 0 1 0 15 0 7.5 7.5 0 0 0-15 0"></path></svg>`;
|
|
1839
1962
|
}
|
|
1840
1963
|
};
|
|
1841
|
-
if (!customElements.get("w-icon-
|
|
1842
|
-
customElements.define("w-icon-
|
|
1964
|
+
if (!customElements.get("w-icon-success-16")) {
|
|
1965
|
+
customElements.define("w-icon-success-16", IconSuccess16);
|
|
1843
1966
|
}
|
|
1844
1967
|
|
|
1845
|
-
// node_modules/.pnpm/@warp-ds+icons@
|
|
1968
|
+
// node_modules/.pnpm/@warp-ds+icons@2.0.0/node_modules/@warp-ds/icons/dist/elements/close-16.js
|
|
1846
1969
|
import { LitElement as LitElement4 } from "lit";
|
|
1847
1970
|
import { unsafeStatic as unsafeStatic4, html as html4 } from "lit/static-html.js";
|
|
1848
1971
|
var messages6 = JSON.parse('{"icon.title.close":"Kryss"}');
|
|
1849
1972
|
var messages24 = JSON.parse('{"icon.title.close":"Cross"}');
|
|
1850
1973
|
var messages34 = JSON.parse('{"icon.title.close":"Rasti"}');
|
|
1851
|
-
var supportedLocales4 = ["en", "nb", "fi"];
|
|
1974
|
+
var supportedLocales4 = ["en", "nb", "fi", "da", "sv"];
|
|
1852
1975
|
var defaultLocale5 = "en";
|
|
1976
|
+
var detectByBrand4 = () => {
|
|
1977
|
+
let value;
|
|
1978
|
+
switch (process.env.NMP_BRAND) {
|
|
1979
|
+
case "FINN":
|
|
1980
|
+
value = "nb";
|
|
1981
|
+
break;
|
|
1982
|
+
case "TORI":
|
|
1983
|
+
value = "fi";
|
|
1984
|
+
break;
|
|
1985
|
+
case "BLOCKET":
|
|
1986
|
+
value = "sv";
|
|
1987
|
+
break;
|
|
1988
|
+
case "DBA":
|
|
1989
|
+
value = "da";
|
|
1990
|
+
break;
|
|
1991
|
+
default:
|
|
1992
|
+
value = "en";
|
|
1993
|
+
}
|
|
1994
|
+
return value;
|
|
1995
|
+
};
|
|
1996
|
+
var detectByHost4 = () => {
|
|
1997
|
+
var _a;
|
|
1998
|
+
const hostname = (_a = document == null ? void 0 : document.location) == null ? void 0 : _a.hostname;
|
|
1999
|
+
if (hostname.includes("finn")) {
|
|
2000
|
+
return "nb";
|
|
2001
|
+
} else if (hostname.includes("tori")) {
|
|
2002
|
+
return "fi";
|
|
2003
|
+
} else if (hostname.includes("blocket")) {
|
|
2004
|
+
return "sv";
|
|
2005
|
+
} else if (hostname.includes("dba")) {
|
|
2006
|
+
return "da";
|
|
2007
|
+
} else {
|
|
2008
|
+
return defaultLocale5;
|
|
2009
|
+
}
|
|
2010
|
+
};
|
|
1853
2011
|
var getSupportedLocale4 = (usedLocale) => {
|
|
1854
2012
|
return supportedLocales4.find(
|
|
1855
2013
|
(locale) => usedLocale === locale || usedLocale.toLowerCase().includes(locale)
|
|
1856
|
-
) ||
|
|
2014
|
+
) || detectByHost4();
|
|
1857
2015
|
};
|
|
1858
2016
|
function detectLocale4() {
|
|
2017
|
+
var _a;
|
|
1859
2018
|
if (typeof window === "undefined") {
|
|
1860
|
-
const serverLocale =
|
|
2019
|
+
const serverLocale = detectByBrand4();
|
|
1861
2020
|
return getSupportedLocale4(serverLocale);
|
|
1862
2021
|
}
|
|
1863
2022
|
try {
|
|
1864
|
-
const htmlLocale = document.documentElement.lang;
|
|
1865
|
-
|
|
2023
|
+
const htmlLocale = (_a = document == null ? void 0 : document.documentElement) == null ? void 0 : _a.lang;
|
|
2024
|
+
const hostLocale = detectByHost4();
|
|
2025
|
+
if (!supportedLocales4.includes(htmlLocale)) {
|
|
2026
|
+
console.warn("Unsupported locale set in html lang tag, falling back to detection by hostname");
|
|
2027
|
+
return getSupportedLocale4(hostLocale);
|
|
2028
|
+
}
|
|
2029
|
+
return getSupportedLocale4(htmlLocale != null ? htmlLocale : hostLocale);
|
|
1866
2030
|
} catch (e) {
|
|
1867
2031
|
console.warn("could not detect locale, falling back to source locale", e);
|
|
1868
2032
|
return defaultLocale5;
|
|
@@ -1885,7 +2049,7 @@ activateI18n4(messages24, messages6, messages34);
|
|
|
1885
2049
|
var IconClose16 = class extends LitElement4 {
|
|
1886
2050
|
render() {
|
|
1887
2051
|
const title = i18n.t({ message: `Cross`, id: "icon.title.close", comment: "Title for close icon" });
|
|
1888
|
-
return html4`<svg xmlns="http://www.w3.org/2000/svg"width="16"height="16"fill="none"viewBox="0 0 16 16" part="w-icon-close-16-part">${unsafeStatic4(`<title>${title}</title>`)}<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="m12.5 3.5-9
|
|
2052
|
+
return html4`<svg xmlns="http://www.w3.org/2000/svg"width="16"height="16"fill="none"viewBox="0 0 16 16" part="w-icon-close-16-part">${unsafeStatic4(`<title>${title}</title>`)}<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="m12.5 3.5-9 9m0-9 9 9"></path></svg>`;
|
|
1889
2053
|
}
|
|
1890
2054
|
};
|
|
1891
2055
|
if (!customElements.get("w-icon-close-16")) {
|
|
@@ -2020,11 +2184,11 @@ var WarpToast = class extends WarpElement {
|
|
|
2020
2184
|
}
|
|
2021
2185
|
get _iconMarkup() {
|
|
2022
2186
|
if (this._warning)
|
|
2023
|
-
return html5`<w-icon-
|
|
2187
|
+
return html5`<w-icon-warning-16></w-icon-warning-16>`;
|
|
2024
2188
|
if (this._error)
|
|
2025
|
-
return html5`<w-icon-
|
|
2189
|
+
return html5`<w-icon-error-16></w-icon-error-16>`;
|
|
2026
2190
|
else
|
|
2027
|
-
return html5`<w-icon-
|
|
2191
|
+
return html5`<w-icon-success-16></w-icon-success-16>`;
|
|
2028
2192
|
}
|
|
2029
2193
|
async collapse() {
|
|
2030
2194
|
return new Promise((resolve) => {
|