@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
package/dist/index.js
CHANGED
|
@@ -1366,7 +1366,7 @@ var attention = {
|
|
|
1366
1366
|
closeBtn: `${buttonTextSizes.medium} ${buttonTypes.pill} ${buttonColors.pill} justify-self-end -mr-8 ml-8`
|
|
1367
1367
|
};
|
|
1368
1368
|
|
|
1369
|
-
// node_modules/.pnpm/@warp-ds+icons@
|
|
1369
|
+
// node_modules/.pnpm/@warp-ds+icons@2.0.0/node_modules/@warp-ds/icons/dist/elements/search-16.js
|
|
1370
1370
|
import { LitElement } from "lit";
|
|
1371
1371
|
import { unsafeStatic, html } from "lit/static-html.js";
|
|
1372
1372
|
|
|
@@ -1721,25 +1721,66 @@ function setupI18n(params = {}) {
|
|
|
1721
1721
|
}
|
|
1722
1722
|
var i18n = setupI18n();
|
|
1723
1723
|
|
|
1724
|
-
// node_modules/.pnpm/@warp-ds+icons@
|
|
1724
|
+
// node_modules/.pnpm/@warp-ds+icons@2.0.0/node_modules/@warp-ds/icons/dist/elements/search-16.js
|
|
1725
1725
|
var messages = JSON.parse('{"icon.title.search":"Forst\xF8rrelsesglass"}');
|
|
1726
1726
|
var messages2 = JSON.parse('{"icon.title.search":"Magnifying glass"}');
|
|
1727
1727
|
var messages3 = JSON.parse('{"icon.title.search":"Suurennuslasi"}');
|
|
1728
|
-
var supportedLocales = ["en", "nb", "fi"];
|
|
1728
|
+
var supportedLocales = ["en", "nb", "fi", "da", "sv"];
|
|
1729
1729
|
var defaultLocale2 = "en";
|
|
1730
|
+
var detectByBrand = () => {
|
|
1731
|
+
let value;
|
|
1732
|
+
switch (process.env.NMP_BRAND) {
|
|
1733
|
+
case "FINN":
|
|
1734
|
+
value = "nb";
|
|
1735
|
+
break;
|
|
1736
|
+
case "TORI":
|
|
1737
|
+
value = "fi";
|
|
1738
|
+
break;
|
|
1739
|
+
case "BLOCKET":
|
|
1740
|
+
value = "sv";
|
|
1741
|
+
break;
|
|
1742
|
+
case "DBA":
|
|
1743
|
+
value = "da";
|
|
1744
|
+
break;
|
|
1745
|
+
default:
|
|
1746
|
+
value = "en";
|
|
1747
|
+
}
|
|
1748
|
+
return value;
|
|
1749
|
+
};
|
|
1750
|
+
var detectByHost = () => {
|
|
1751
|
+
var _a;
|
|
1752
|
+
const hostname = (_a = document == null ? void 0 : document.location) == null ? void 0 : _a.hostname;
|
|
1753
|
+
if (hostname.includes("finn")) {
|
|
1754
|
+
return "nb";
|
|
1755
|
+
} else if (hostname.includes("tori")) {
|
|
1756
|
+
return "fi";
|
|
1757
|
+
} else if (hostname.includes("blocket")) {
|
|
1758
|
+
return "sv";
|
|
1759
|
+
} else if (hostname.includes("dba")) {
|
|
1760
|
+
return "da";
|
|
1761
|
+
} else {
|
|
1762
|
+
return defaultLocale2;
|
|
1763
|
+
}
|
|
1764
|
+
};
|
|
1730
1765
|
var getSupportedLocale = (usedLocale) => {
|
|
1731
1766
|
return supportedLocales.find(
|
|
1732
1767
|
(locale) => usedLocale === locale || usedLocale.toLowerCase().includes(locale)
|
|
1733
|
-
) ||
|
|
1768
|
+
) || detectByHost();
|
|
1734
1769
|
};
|
|
1735
1770
|
function detectLocale() {
|
|
1771
|
+
var _a;
|
|
1736
1772
|
if (typeof window === "undefined") {
|
|
1737
|
-
const serverLocale =
|
|
1773
|
+
const serverLocale = detectByBrand();
|
|
1738
1774
|
return getSupportedLocale(serverLocale);
|
|
1739
1775
|
}
|
|
1740
1776
|
try {
|
|
1741
|
-
const htmlLocale = document.documentElement.lang;
|
|
1742
|
-
|
|
1777
|
+
const htmlLocale = (_a = document == null ? void 0 : document.documentElement) == null ? void 0 : _a.lang;
|
|
1778
|
+
const hostLocale = detectByHost();
|
|
1779
|
+
if (!supportedLocales.includes(htmlLocale)) {
|
|
1780
|
+
console.warn("Unsupported locale set in html lang tag, falling back to detection by hostname");
|
|
1781
|
+
return getSupportedLocale(hostLocale);
|
|
1782
|
+
}
|
|
1783
|
+
return getSupportedLocale(htmlLocale != null ? htmlLocale : hostLocale);
|
|
1743
1784
|
} catch (e2) {
|
|
1744
1785
|
console.warn("could not detect locale, falling back to source locale", e2);
|
|
1745
1786
|
return defaultLocale2;
|
|
@@ -1762,34 +1803,75 @@ activateI18n(messages2, messages, messages3);
|
|
|
1762
1803
|
var IconSearch16 = class extends LitElement {
|
|
1763
1804
|
render() {
|
|
1764
1805
|
const title = i18n.t({ message: `Magnifying glass`, id: "icon.title.search", comment: "Title for search icon" });
|
|
1765
|
-
return html`<svg xmlns="http://www.w3.org/2000/svg"width="16"height="16"fill="none"viewBox="0 0 16 16" part="w-icon-search-16-part">${unsafeStatic(`<title>${title}</title>`)}<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"
|
|
1806
|
+
return html`<svg xmlns="http://www.w3.org/2000/svg"width="16"height="16"fill="none"viewBox="0 0 16 16" part="w-icon-search-16-part">${unsafeStatic(`<title>${title}</title>`)}<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M8.905 12.102A6.042 6.042 0 1 0 4.18.981a6.042 6.042 0 0 0 4.726 11.121Zm1.909-1.289L15.5 15.5"></path></svg>`;
|
|
1766
1807
|
}
|
|
1767
1808
|
};
|
|
1768
1809
|
if (!customElements.get("w-icon-search-16")) {
|
|
1769
1810
|
customElements.define("w-icon-search-16", IconSearch16);
|
|
1770
1811
|
}
|
|
1771
1812
|
|
|
1772
|
-
// node_modules/.pnpm/@warp-ds+icons@
|
|
1813
|
+
// node_modules/.pnpm/@warp-ds+icons@2.0.0/node_modules/@warp-ds/icons/dist/elements/close-16.js
|
|
1773
1814
|
import { LitElement as LitElement2 } from "lit";
|
|
1774
1815
|
import { unsafeStatic as unsafeStatic2, html as html2 } from "lit/static-html.js";
|
|
1775
1816
|
var messages4 = JSON.parse('{"icon.title.close":"Kryss"}');
|
|
1776
1817
|
var messages22 = JSON.parse('{"icon.title.close":"Cross"}');
|
|
1777
1818
|
var messages32 = JSON.parse('{"icon.title.close":"Rasti"}');
|
|
1778
|
-
var supportedLocales2 = ["en", "nb", "fi"];
|
|
1819
|
+
var supportedLocales2 = ["en", "nb", "fi", "da", "sv"];
|
|
1779
1820
|
var defaultLocale3 = "en";
|
|
1821
|
+
var detectByBrand2 = () => {
|
|
1822
|
+
let value;
|
|
1823
|
+
switch (process.env.NMP_BRAND) {
|
|
1824
|
+
case "FINN":
|
|
1825
|
+
value = "nb";
|
|
1826
|
+
break;
|
|
1827
|
+
case "TORI":
|
|
1828
|
+
value = "fi";
|
|
1829
|
+
break;
|
|
1830
|
+
case "BLOCKET":
|
|
1831
|
+
value = "sv";
|
|
1832
|
+
break;
|
|
1833
|
+
case "DBA":
|
|
1834
|
+
value = "da";
|
|
1835
|
+
break;
|
|
1836
|
+
default:
|
|
1837
|
+
value = "en";
|
|
1838
|
+
}
|
|
1839
|
+
return value;
|
|
1840
|
+
};
|
|
1841
|
+
var detectByHost2 = () => {
|
|
1842
|
+
var _a;
|
|
1843
|
+
const hostname = (_a = document == null ? void 0 : document.location) == null ? void 0 : _a.hostname;
|
|
1844
|
+
if (hostname.includes("finn")) {
|
|
1845
|
+
return "nb";
|
|
1846
|
+
} else if (hostname.includes("tori")) {
|
|
1847
|
+
return "fi";
|
|
1848
|
+
} else if (hostname.includes("blocket")) {
|
|
1849
|
+
return "sv";
|
|
1850
|
+
} else if (hostname.includes("dba")) {
|
|
1851
|
+
return "da";
|
|
1852
|
+
} else {
|
|
1853
|
+
return defaultLocale3;
|
|
1854
|
+
}
|
|
1855
|
+
};
|
|
1780
1856
|
var getSupportedLocale2 = (usedLocale) => {
|
|
1781
1857
|
return supportedLocales2.find(
|
|
1782
1858
|
(locale) => usedLocale === locale || usedLocale.toLowerCase().includes(locale)
|
|
1783
|
-
) ||
|
|
1859
|
+
) || detectByHost2();
|
|
1784
1860
|
};
|
|
1785
1861
|
function detectLocale2() {
|
|
1862
|
+
var _a;
|
|
1786
1863
|
if (typeof window === "undefined") {
|
|
1787
|
-
const serverLocale =
|
|
1864
|
+
const serverLocale = detectByBrand2();
|
|
1788
1865
|
return getSupportedLocale2(serverLocale);
|
|
1789
1866
|
}
|
|
1790
1867
|
try {
|
|
1791
|
-
const htmlLocale = document.documentElement.lang;
|
|
1792
|
-
|
|
1868
|
+
const htmlLocale = (_a = document == null ? void 0 : document.documentElement) == null ? void 0 : _a.lang;
|
|
1869
|
+
const hostLocale = detectByHost2();
|
|
1870
|
+
if (!supportedLocales2.includes(htmlLocale)) {
|
|
1871
|
+
console.warn("Unsupported locale set in html lang tag, falling back to detection by hostname");
|
|
1872
|
+
return getSupportedLocale2(hostLocale);
|
|
1873
|
+
}
|
|
1874
|
+
return getSupportedLocale2(htmlLocale != null ? htmlLocale : hostLocale);
|
|
1793
1875
|
} catch (e2) {
|
|
1794
1876
|
console.warn("could not detect locale, falling back to source locale", e2);
|
|
1795
1877
|
return defaultLocale3;
|
|
@@ -1812,7 +1894,7 @@ activateI18n2(messages22, messages4, messages32);
|
|
|
1812
1894
|
var IconClose16 = class extends LitElement2 {
|
|
1813
1895
|
render() {
|
|
1814
1896
|
const title = i18n.t({ message: `Cross`, id: "icon.title.close", comment: "Title for close icon" });
|
|
1815
|
-
return html2`<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">${unsafeStatic2(`<title>${title}</title>`)}<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="m12.5 3.5-9
|
|
1897
|
+
return html2`<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">${unsafeStatic2(`<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>`;
|
|
1816
1898
|
}
|
|
1817
1899
|
};
|
|
1818
1900
|
if (!customElements.get("w-icon-close-16")) {
|
|
@@ -1928,27 +2010,68 @@ var r = function() {
|
|
|
1928
2010
|
}, []).join(" ");
|
|
1929
2011
|
};
|
|
1930
2012
|
|
|
1931
|
-
// node_modules/.pnpm/@warp-ds+icons@
|
|
2013
|
+
// node_modules/.pnpm/@warp-ds+icons@2.0.0/node_modules/@warp-ds/icons/dist/elements/info-16.js
|
|
1932
2014
|
import { LitElement as LitElement3 } from "lit";
|
|
1933
2015
|
import { unsafeStatic as unsafeStatic3, html as html4 } from "lit/static-html.js";
|
|
1934
|
-
var messages5 = JSON.parse('{"icon.title.
|
|
1935
|
-
var messages23 = JSON.parse('{"icon.title.
|
|
1936
|
-
var messages33 = JSON.parse('{"icon.title.
|
|
1937
|
-
var supportedLocales3 = ["en", "nb", "fi"];
|
|
2016
|
+
var messages5 = JSON.parse('{"icon.title.info":"Informasjonssirkel"}');
|
|
2017
|
+
var messages23 = JSON.parse('{"icon.title.info":"Information circle"}');
|
|
2018
|
+
var messages33 = JSON.parse('{"icon.title.info":"Ympyr\xE4, jonka sis\xE4ll\xE4 on i-kirjain"}');
|
|
2019
|
+
var supportedLocales3 = ["en", "nb", "fi", "da", "sv"];
|
|
1938
2020
|
var defaultLocale4 = "en";
|
|
2021
|
+
var detectByBrand3 = () => {
|
|
2022
|
+
let value;
|
|
2023
|
+
switch (process.env.NMP_BRAND) {
|
|
2024
|
+
case "FINN":
|
|
2025
|
+
value = "nb";
|
|
2026
|
+
break;
|
|
2027
|
+
case "TORI":
|
|
2028
|
+
value = "fi";
|
|
2029
|
+
break;
|
|
2030
|
+
case "BLOCKET":
|
|
2031
|
+
value = "sv";
|
|
2032
|
+
break;
|
|
2033
|
+
case "DBA":
|
|
2034
|
+
value = "da";
|
|
2035
|
+
break;
|
|
2036
|
+
default:
|
|
2037
|
+
value = "en";
|
|
2038
|
+
}
|
|
2039
|
+
return value;
|
|
2040
|
+
};
|
|
2041
|
+
var detectByHost3 = () => {
|
|
2042
|
+
var _a;
|
|
2043
|
+
const hostname = (_a = document == null ? void 0 : document.location) == null ? void 0 : _a.hostname;
|
|
2044
|
+
if (hostname.includes("finn")) {
|
|
2045
|
+
return "nb";
|
|
2046
|
+
} else if (hostname.includes("tori")) {
|
|
2047
|
+
return "fi";
|
|
2048
|
+
} else if (hostname.includes("blocket")) {
|
|
2049
|
+
return "sv";
|
|
2050
|
+
} else if (hostname.includes("dba")) {
|
|
2051
|
+
return "da";
|
|
2052
|
+
} else {
|
|
2053
|
+
return defaultLocale4;
|
|
2054
|
+
}
|
|
2055
|
+
};
|
|
1939
2056
|
var getSupportedLocale3 = (usedLocale) => {
|
|
1940
2057
|
return supportedLocales3.find(
|
|
1941
2058
|
(locale) => usedLocale === locale || usedLocale.toLowerCase().includes(locale)
|
|
1942
|
-
) ||
|
|
2059
|
+
) || detectByHost3();
|
|
1943
2060
|
};
|
|
1944
2061
|
function detectLocale3() {
|
|
2062
|
+
var _a;
|
|
1945
2063
|
if (typeof window === "undefined") {
|
|
1946
|
-
const serverLocale =
|
|
2064
|
+
const serverLocale = detectByBrand3();
|
|
1947
2065
|
return getSupportedLocale3(serverLocale);
|
|
1948
2066
|
}
|
|
1949
2067
|
try {
|
|
1950
|
-
const htmlLocale = document.documentElement.lang;
|
|
1951
|
-
|
|
2068
|
+
const htmlLocale = (_a = document == null ? void 0 : document.documentElement) == null ? void 0 : _a.lang;
|
|
2069
|
+
const hostLocale = detectByHost3();
|
|
2070
|
+
if (!supportedLocales3.includes(htmlLocale)) {
|
|
2071
|
+
console.warn("Unsupported locale set in html lang tag, falling back to detection by hostname");
|
|
2072
|
+
return getSupportedLocale3(hostLocale);
|
|
2073
|
+
}
|
|
2074
|
+
return getSupportedLocale3(htmlLocale != null ? htmlLocale : hostLocale);
|
|
1952
2075
|
} catch (e2) {
|
|
1953
2076
|
console.warn("could not detect locale, falling back to source locale", e2);
|
|
1954
2077
|
return defaultLocale4;
|
|
@@ -1968,37 +2091,78 @@ var activateI18n3 = (enMessages, nbMessages, fiMessages) => {
|
|
|
1968
2091
|
i18n.activate(locale);
|
|
1969
2092
|
};
|
|
1970
2093
|
activateI18n3(messages23, messages5, messages33);
|
|
1971
|
-
var
|
|
2094
|
+
var IconInfo16 = class extends LitElement3 {
|
|
1972
2095
|
render() {
|
|
1973
|
-
const title = i18n.t({ message: `
|
|
1974
|
-
return html4`<svg xmlns="http://www.w3.org/2000/svg"width="16"height="16"fill="none"viewBox="0 0 16 16" part="w-icon-
|
|
2096
|
+
const title = i18n.t({ message: `Information circle`, id: "icon.title.info", comment: "Title for info icon" });
|
|
2097
|
+
return html4`<svg xmlns="http://www.w3.org/2000/svg"width="16"height="16"fill="none"viewBox="0 0 16 16" part="w-icon-info-16-part">${unsafeStatic3(`<title>${title}</title>`)}<path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" d="M8 6.5v5"></path><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M8 4v.5"></path><path stroke="currentColor" stroke-miterlimit="10" d="M8 .5a7.5 7.5 0 1 1 0 15 7.5 7.5 0 0 1 0-15Z"></path></svg>`;
|
|
1975
2098
|
}
|
|
1976
2099
|
};
|
|
1977
|
-
if (!customElements.get("w-icon-
|
|
1978
|
-
customElements.define("w-icon-
|
|
2100
|
+
if (!customElements.get("w-icon-info-16")) {
|
|
2101
|
+
customElements.define("w-icon-info-16", IconInfo16);
|
|
1979
2102
|
}
|
|
1980
2103
|
|
|
1981
|
-
// node_modules/.pnpm/@warp-ds+icons@
|
|
2104
|
+
// node_modules/.pnpm/@warp-ds+icons@2.0.0/node_modules/@warp-ds/icons/dist/elements/warning-16.js
|
|
1982
2105
|
import { LitElement as LitElement4 } from "lit";
|
|
1983
2106
|
import { unsafeStatic as unsafeStatic4, html as html5 } from "lit/static-html.js";
|
|
1984
|
-
var messages6 = JSON.parse('{"icon.title.
|
|
1985
|
-
var messages24 = JSON.parse('{"icon.title.
|
|
1986
|
-
var messages34 = JSON.parse('{"icon.title.
|
|
1987
|
-
var supportedLocales4 = ["en", "nb", "fi"];
|
|
2107
|
+
var messages6 = JSON.parse('{"icon.title.warning":"Varseltrekant med utropstegn"}');
|
|
2108
|
+
var messages24 = JSON.parse('{"icon.title.warning":"Warning triangle with exclamation point"}');
|
|
2109
|
+
var messages34 = JSON.parse('{"icon.title.warning":"Varoituskolmio, jonka sis\xE4ll\xE4 on huutomerkki"}');
|
|
2110
|
+
var supportedLocales4 = ["en", "nb", "fi", "da", "sv"];
|
|
1988
2111
|
var defaultLocale5 = "en";
|
|
2112
|
+
var detectByBrand4 = () => {
|
|
2113
|
+
let value;
|
|
2114
|
+
switch (process.env.NMP_BRAND) {
|
|
2115
|
+
case "FINN":
|
|
2116
|
+
value = "nb";
|
|
2117
|
+
break;
|
|
2118
|
+
case "TORI":
|
|
2119
|
+
value = "fi";
|
|
2120
|
+
break;
|
|
2121
|
+
case "BLOCKET":
|
|
2122
|
+
value = "sv";
|
|
2123
|
+
break;
|
|
2124
|
+
case "DBA":
|
|
2125
|
+
value = "da";
|
|
2126
|
+
break;
|
|
2127
|
+
default:
|
|
2128
|
+
value = "en";
|
|
2129
|
+
}
|
|
2130
|
+
return value;
|
|
2131
|
+
};
|
|
2132
|
+
var detectByHost4 = () => {
|
|
2133
|
+
var _a;
|
|
2134
|
+
const hostname = (_a = document == null ? void 0 : document.location) == null ? void 0 : _a.hostname;
|
|
2135
|
+
if (hostname.includes("finn")) {
|
|
2136
|
+
return "nb";
|
|
2137
|
+
} else if (hostname.includes("tori")) {
|
|
2138
|
+
return "fi";
|
|
2139
|
+
} else if (hostname.includes("blocket")) {
|
|
2140
|
+
return "sv";
|
|
2141
|
+
} else if (hostname.includes("dba")) {
|
|
2142
|
+
return "da";
|
|
2143
|
+
} else {
|
|
2144
|
+
return defaultLocale5;
|
|
2145
|
+
}
|
|
2146
|
+
};
|
|
1989
2147
|
var getSupportedLocale4 = (usedLocale) => {
|
|
1990
2148
|
return supportedLocales4.find(
|
|
1991
2149
|
(locale) => usedLocale === locale || usedLocale.toLowerCase().includes(locale)
|
|
1992
|
-
) ||
|
|
2150
|
+
) || detectByHost4();
|
|
1993
2151
|
};
|
|
1994
2152
|
function detectLocale4() {
|
|
2153
|
+
var _a;
|
|
1995
2154
|
if (typeof window === "undefined") {
|
|
1996
|
-
const serverLocale =
|
|
2155
|
+
const serverLocale = detectByBrand4();
|
|
1997
2156
|
return getSupportedLocale4(serverLocale);
|
|
1998
2157
|
}
|
|
1999
2158
|
try {
|
|
2000
|
-
const htmlLocale = document.documentElement.lang;
|
|
2001
|
-
|
|
2159
|
+
const htmlLocale = (_a = document == null ? void 0 : document.documentElement) == null ? void 0 : _a.lang;
|
|
2160
|
+
const hostLocale = detectByHost4();
|
|
2161
|
+
if (!supportedLocales4.includes(htmlLocale)) {
|
|
2162
|
+
console.warn("Unsupported locale set in html lang tag, falling back to detection by hostname");
|
|
2163
|
+
return getSupportedLocale4(hostLocale);
|
|
2164
|
+
}
|
|
2165
|
+
return getSupportedLocale4(htmlLocale != null ? htmlLocale : hostLocale);
|
|
2002
2166
|
} catch (e2) {
|
|
2003
2167
|
console.warn("could not detect locale, falling back to source locale", e2);
|
|
2004
2168
|
return defaultLocale5;
|
|
@@ -2018,37 +2182,78 @@ var activateI18n4 = (enMessages, nbMessages, fiMessages) => {
|
|
|
2018
2182
|
i18n.activate(locale);
|
|
2019
2183
|
};
|
|
2020
2184
|
activateI18n4(messages24, messages6, messages34);
|
|
2021
|
-
var
|
|
2185
|
+
var IconWarning16 = class extends LitElement4 {
|
|
2022
2186
|
render() {
|
|
2023
|
-
const title = i18n.t({ message: `
|
|
2024
|
-
return html5`<svg xmlns="http://www.w3.org/2000/svg"width="16"height="16"fill="none"viewBox="0 0 16 16" part="w-icon-
|
|
2187
|
+
const title = i18n.t({ message: `Warning triangle with exclamation point`, id: "icon.title.warning", comment: "Title for warning icon" });
|
|
2188
|
+
return html5`<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">${unsafeStatic4(`<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>`;
|
|
2025
2189
|
}
|
|
2026
2190
|
};
|
|
2027
|
-
if (!customElements.get("w-icon-
|
|
2028
|
-
customElements.define("w-icon-
|
|
2191
|
+
if (!customElements.get("w-icon-warning-16")) {
|
|
2192
|
+
customElements.define("w-icon-warning-16", IconWarning16);
|
|
2029
2193
|
}
|
|
2030
2194
|
|
|
2031
|
-
// node_modules/.pnpm/@warp-ds+icons@
|
|
2195
|
+
// node_modules/.pnpm/@warp-ds+icons@2.0.0/node_modules/@warp-ds/icons/dist/elements/error-16.js
|
|
2032
2196
|
import { LitElement as LitElement5 } from "lit";
|
|
2033
2197
|
import { unsafeStatic as unsafeStatic5, html as html6 } from "lit/static-html.js";
|
|
2034
|
-
var messages7 = JSON.parse('{"icon.title.
|
|
2035
|
-
var messages25 = JSON.parse('{"icon.title.
|
|
2036
|
-
var messages35 = JSON.parse('{"icon.title.
|
|
2037
|
-
var supportedLocales5 = ["en", "nb", "fi"];
|
|
2198
|
+
var messages7 = JSON.parse('{"icon.title.error":"\xC5ttekant med utropstegn"}');
|
|
2199
|
+
var messages25 = JSON.parse('{"icon.title.error":"Octagon with exclamation point"}');
|
|
2200
|
+
var messages35 = JSON.parse('{"icon.title.error":"Kahdeksankulmio, jonka sis\xE4ll\xE4 on huutomerkki"}');
|
|
2201
|
+
var supportedLocales5 = ["en", "nb", "fi", "da", "sv"];
|
|
2038
2202
|
var defaultLocale6 = "en";
|
|
2203
|
+
var detectByBrand5 = () => {
|
|
2204
|
+
let value;
|
|
2205
|
+
switch (process.env.NMP_BRAND) {
|
|
2206
|
+
case "FINN":
|
|
2207
|
+
value = "nb";
|
|
2208
|
+
break;
|
|
2209
|
+
case "TORI":
|
|
2210
|
+
value = "fi";
|
|
2211
|
+
break;
|
|
2212
|
+
case "BLOCKET":
|
|
2213
|
+
value = "sv";
|
|
2214
|
+
break;
|
|
2215
|
+
case "DBA":
|
|
2216
|
+
value = "da";
|
|
2217
|
+
break;
|
|
2218
|
+
default:
|
|
2219
|
+
value = "en";
|
|
2220
|
+
}
|
|
2221
|
+
return value;
|
|
2222
|
+
};
|
|
2223
|
+
var detectByHost5 = () => {
|
|
2224
|
+
var _a;
|
|
2225
|
+
const hostname = (_a = document == null ? void 0 : document.location) == null ? void 0 : _a.hostname;
|
|
2226
|
+
if (hostname.includes("finn")) {
|
|
2227
|
+
return "nb";
|
|
2228
|
+
} else if (hostname.includes("tori")) {
|
|
2229
|
+
return "fi";
|
|
2230
|
+
} else if (hostname.includes("blocket")) {
|
|
2231
|
+
return "sv";
|
|
2232
|
+
} else if (hostname.includes("dba")) {
|
|
2233
|
+
return "da";
|
|
2234
|
+
} else {
|
|
2235
|
+
return defaultLocale6;
|
|
2236
|
+
}
|
|
2237
|
+
};
|
|
2039
2238
|
var getSupportedLocale5 = (usedLocale) => {
|
|
2040
2239
|
return supportedLocales5.find(
|
|
2041
2240
|
(locale) => usedLocale === locale || usedLocale.toLowerCase().includes(locale)
|
|
2042
|
-
) ||
|
|
2241
|
+
) || detectByHost5();
|
|
2043
2242
|
};
|
|
2044
2243
|
function detectLocale5() {
|
|
2244
|
+
var _a;
|
|
2045
2245
|
if (typeof window === "undefined") {
|
|
2046
|
-
const serverLocale =
|
|
2246
|
+
const serverLocale = detectByBrand5();
|
|
2047
2247
|
return getSupportedLocale5(serverLocale);
|
|
2048
2248
|
}
|
|
2049
2249
|
try {
|
|
2050
|
-
const htmlLocale = document.documentElement.lang;
|
|
2051
|
-
|
|
2250
|
+
const htmlLocale = (_a = document == null ? void 0 : document.documentElement) == null ? void 0 : _a.lang;
|
|
2251
|
+
const hostLocale = detectByHost5();
|
|
2252
|
+
if (!supportedLocales5.includes(htmlLocale)) {
|
|
2253
|
+
console.warn("Unsupported locale set in html lang tag, falling back to detection by hostname");
|
|
2254
|
+
return getSupportedLocale5(hostLocale);
|
|
2255
|
+
}
|
|
2256
|
+
return getSupportedLocale5(htmlLocale != null ? htmlLocale : hostLocale);
|
|
2052
2257
|
} catch (e2) {
|
|
2053
2258
|
console.warn("could not detect locale, falling back to source locale", e2);
|
|
2054
2259
|
return defaultLocale6;
|
|
@@ -2068,37 +2273,78 @@ var activateI18n5 = (enMessages, nbMessages, fiMessages) => {
|
|
|
2068
2273
|
i18n.activate(locale);
|
|
2069
2274
|
};
|
|
2070
2275
|
activateI18n5(messages25, messages7, messages35);
|
|
2071
|
-
var
|
|
2276
|
+
var IconError16 = class extends LitElement5 {
|
|
2072
2277
|
render() {
|
|
2073
|
-
const title = i18n.t({ message: `
|
|
2074
|
-
return html6`<svg xmlns="http://www.w3.org/2000/svg"width="16"height="16"fill="none"viewBox="0 0 16 16" part="w-icon-
|
|
2278
|
+
const title = i18n.t({ message: `Octagon with exclamation point`, id: "icon.title.error", comment: "Title for error icon" });
|
|
2279
|
+
return html6`<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">${unsafeStatic5(`<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>`;
|
|
2075
2280
|
}
|
|
2076
2281
|
};
|
|
2077
|
-
if (!customElements.get("w-icon-
|
|
2078
|
-
customElements.define("w-icon-
|
|
2282
|
+
if (!customElements.get("w-icon-error-16")) {
|
|
2283
|
+
customElements.define("w-icon-error-16", IconError16);
|
|
2079
2284
|
}
|
|
2080
2285
|
|
|
2081
|
-
// node_modules/.pnpm/@warp-ds+icons@
|
|
2286
|
+
// node_modules/.pnpm/@warp-ds+icons@2.0.0/node_modules/@warp-ds/icons/dist/elements/success-16.js
|
|
2082
2287
|
import { LitElement as LitElement6 } from "lit";
|
|
2083
2288
|
import { unsafeStatic as unsafeStatic6, html as html7 } from "lit/static-html.js";
|
|
2084
|
-
var messages8 = JSON.parse('{"icon.title.
|
|
2085
|
-
var messages26 = JSON.parse('{"icon.title.
|
|
2086
|
-
var messages36 = JSON.parse('{"icon.title.
|
|
2087
|
-
var supportedLocales6 = ["en", "nb", "fi"];
|
|
2289
|
+
var messages8 = JSON.parse('{"icon.title.success":"Sirkel med sjekkmerke"}');
|
|
2290
|
+
var messages26 = JSON.parse('{"icon.title.success":"Circle with checkmark"}');
|
|
2291
|
+
var messages36 = JSON.parse('{"icon.title.success":"Ympyr\xE4, jonka sis\xE4ll\xE4 on valintamerkki"}');
|
|
2292
|
+
var supportedLocales6 = ["en", "nb", "fi", "da", "sv"];
|
|
2088
2293
|
var defaultLocale7 = "en";
|
|
2294
|
+
var detectByBrand6 = () => {
|
|
2295
|
+
let value;
|
|
2296
|
+
switch (process.env.NMP_BRAND) {
|
|
2297
|
+
case "FINN":
|
|
2298
|
+
value = "nb";
|
|
2299
|
+
break;
|
|
2300
|
+
case "TORI":
|
|
2301
|
+
value = "fi";
|
|
2302
|
+
break;
|
|
2303
|
+
case "BLOCKET":
|
|
2304
|
+
value = "sv";
|
|
2305
|
+
break;
|
|
2306
|
+
case "DBA":
|
|
2307
|
+
value = "da";
|
|
2308
|
+
break;
|
|
2309
|
+
default:
|
|
2310
|
+
value = "en";
|
|
2311
|
+
}
|
|
2312
|
+
return value;
|
|
2313
|
+
};
|
|
2314
|
+
var detectByHost6 = () => {
|
|
2315
|
+
var _a;
|
|
2316
|
+
const hostname = (_a = document == null ? void 0 : document.location) == null ? void 0 : _a.hostname;
|
|
2317
|
+
if (hostname.includes("finn")) {
|
|
2318
|
+
return "nb";
|
|
2319
|
+
} else if (hostname.includes("tori")) {
|
|
2320
|
+
return "fi";
|
|
2321
|
+
} else if (hostname.includes("blocket")) {
|
|
2322
|
+
return "sv";
|
|
2323
|
+
} else if (hostname.includes("dba")) {
|
|
2324
|
+
return "da";
|
|
2325
|
+
} else {
|
|
2326
|
+
return defaultLocale7;
|
|
2327
|
+
}
|
|
2328
|
+
};
|
|
2089
2329
|
var getSupportedLocale6 = (usedLocale) => {
|
|
2090
2330
|
return supportedLocales6.find(
|
|
2091
2331
|
(locale) => usedLocale === locale || usedLocale.toLowerCase().includes(locale)
|
|
2092
|
-
) ||
|
|
2332
|
+
) || detectByHost6();
|
|
2093
2333
|
};
|
|
2094
2334
|
function detectLocale6() {
|
|
2335
|
+
var _a;
|
|
2095
2336
|
if (typeof window === "undefined") {
|
|
2096
|
-
const serverLocale =
|
|
2337
|
+
const serverLocale = detectByBrand6();
|
|
2097
2338
|
return getSupportedLocale6(serverLocale);
|
|
2098
2339
|
}
|
|
2099
2340
|
try {
|
|
2100
|
-
const htmlLocale = document.documentElement.lang;
|
|
2101
|
-
|
|
2341
|
+
const htmlLocale = (_a = document == null ? void 0 : document.documentElement) == null ? void 0 : _a.lang;
|
|
2342
|
+
const hostLocale = detectByHost6();
|
|
2343
|
+
if (!supportedLocales6.includes(htmlLocale)) {
|
|
2344
|
+
console.warn("Unsupported locale set in html lang tag, falling back to detection by hostname");
|
|
2345
|
+
return getSupportedLocale6(hostLocale);
|
|
2346
|
+
}
|
|
2347
|
+
return getSupportedLocale6(htmlLocale != null ? htmlLocale : hostLocale);
|
|
2102
2348
|
} catch (e2) {
|
|
2103
2349
|
console.warn("could not detect locale, falling back to source locale", e2);
|
|
2104
2350
|
return defaultLocale7;
|
|
@@ -2118,14 +2364,14 @@ var activateI18n6 = (enMessages, nbMessages, fiMessages) => {
|
|
|
2118
2364
|
i18n.activate(locale);
|
|
2119
2365
|
};
|
|
2120
2366
|
activateI18n6(messages26, messages8, messages36);
|
|
2121
|
-
var
|
|
2367
|
+
var IconSuccess16 = class extends LitElement6 {
|
|
2122
2368
|
render() {
|
|
2123
|
-
const title = i18n.t({ message: `
|
|
2124
|
-
return html7`<svg xmlns="http://www.w3.org/2000/svg"width="16"height="16"fill="none"viewBox="0 0 16 16" part="w-icon-
|
|
2369
|
+
const title = i18n.t({ message: `Circle with checkmark`, id: "icon.title.success", comment: "Title for success icon" });
|
|
2370
|
+
return html7`<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">${unsafeStatic6(`<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>`;
|
|
2125
2371
|
}
|
|
2126
2372
|
};
|
|
2127
|
-
if (!customElements.get("w-icon-
|
|
2128
|
-
customElements.define("w-icon-
|
|
2373
|
+
if (!customElements.get("w-icon-success-16")) {
|
|
2374
|
+
customElements.define("w-icon-success-16", IconSuccess16);
|
|
2129
2375
|
}
|
|
2130
2376
|
|
|
2131
2377
|
// packages/alert/index.js
|
|
@@ -2164,13 +2410,13 @@ var WarpAlert = class extends WarpElement2 {
|
|
|
2164
2410
|
}
|
|
2165
2411
|
get _icon() {
|
|
2166
2412
|
if (this.variant === variants.info)
|
|
2167
|
-
return html8`<w-icon-
|
|
2413
|
+
return html8`<w-icon-info-16></w-icon-info-16>`;
|
|
2168
2414
|
if (this.variant === variants.warning)
|
|
2169
|
-
return html8`<w-icon-
|
|
2415
|
+
return html8`<w-icon-warning-16></w-icon-warning-16>`;
|
|
2170
2416
|
if (this.variant === variants.negative)
|
|
2171
|
-
return html8`<w-icon-
|
|
2417
|
+
return html8`<w-icon-error-16></w-icon-error-16>`;
|
|
2172
2418
|
if (this.variant === variants.positive)
|
|
2173
|
-
return html8`<w-icon-
|
|
2419
|
+
return html8`<w-icon-success-16></w-icon-success-16>`;
|
|
2174
2420
|
else
|
|
2175
2421
|
return "";
|
|
2176
2422
|
}
|
|
@@ -3453,27 +3699,68 @@ if (!customElements.get("w-card")) {
|
|
|
3453
3699
|
import { css as css5, html as html18 } from "lit";
|
|
3454
3700
|
import WarpElement10 from "@warp-ds/elements-core";
|
|
3455
3701
|
|
|
3456
|
-
// node_modules/.pnpm/@warp-ds+icons@
|
|
3702
|
+
// node_modules/.pnpm/@warp-ds+icons@2.0.0/node_modules/@warp-ds/icons/dist/elements/chevron-down-16.js
|
|
3457
3703
|
import { LitElement as LitElement7 } from "lit";
|
|
3458
3704
|
import { unsafeStatic as unsafeStatic7, html as html16 } from "lit/static-html.js";
|
|
3459
3705
|
var messages18 = JSON.parse('{"icon.title.chevron-down":"Nedoverpil"}');
|
|
3460
3706
|
var messages27 = JSON.parse('{"icon.title.chevron-down":"Downward arrow"}');
|
|
3461
3707
|
var messages37 = JSON.parse('{"icon.title.chevron-down":"Nuoli alasp\xE4in"}');
|
|
3462
|
-
var supportedLocales8 = ["en", "nb", "fi"];
|
|
3708
|
+
var supportedLocales8 = ["en", "nb", "fi", "da", "sv"];
|
|
3463
3709
|
var defaultLocale9 = "en";
|
|
3710
|
+
var detectByBrand7 = () => {
|
|
3711
|
+
let value;
|
|
3712
|
+
switch (process.env.NMP_BRAND) {
|
|
3713
|
+
case "FINN":
|
|
3714
|
+
value = "nb";
|
|
3715
|
+
break;
|
|
3716
|
+
case "TORI":
|
|
3717
|
+
value = "fi";
|
|
3718
|
+
break;
|
|
3719
|
+
case "BLOCKET":
|
|
3720
|
+
value = "sv";
|
|
3721
|
+
break;
|
|
3722
|
+
case "DBA":
|
|
3723
|
+
value = "da";
|
|
3724
|
+
break;
|
|
3725
|
+
default:
|
|
3726
|
+
value = "en";
|
|
3727
|
+
}
|
|
3728
|
+
return value;
|
|
3729
|
+
};
|
|
3730
|
+
var detectByHost7 = () => {
|
|
3731
|
+
var _a;
|
|
3732
|
+
const hostname = (_a = document == null ? void 0 : document.location) == null ? void 0 : _a.hostname;
|
|
3733
|
+
if (hostname.includes("finn")) {
|
|
3734
|
+
return "nb";
|
|
3735
|
+
} else if (hostname.includes("tori")) {
|
|
3736
|
+
return "fi";
|
|
3737
|
+
} else if (hostname.includes("blocket")) {
|
|
3738
|
+
return "sv";
|
|
3739
|
+
} else if (hostname.includes("dba")) {
|
|
3740
|
+
return "da";
|
|
3741
|
+
} else {
|
|
3742
|
+
return defaultLocale9;
|
|
3743
|
+
}
|
|
3744
|
+
};
|
|
3464
3745
|
var getSupportedLocale8 = (usedLocale) => {
|
|
3465
3746
|
return supportedLocales8.find(
|
|
3466
3747
|
(locale) => usedLocale === locale || usedLocale.toLowerCase().includes(locale)
|
|
3467
|
-
) ||
|
|
3748
|
+
) || detectByHost7();
|
|
3468
3749
|
};
|
|
3469
3750
|
function detectLocale8() {
|
|
3751
|
+
var _a;
|
|
3470
3752
|
if (typeof window === "undefined") {
|
|
3471
|
-
const serverLocale =
|
|
3753
|
+
const serverLocale = detectByBrand7();
|
|
3472
3754
|
return getSupportedLocale8(serverLocale);
|
|
3473
3755
|
}
|
|
3474
3756
|
try {
|
|
3475
|
-
const htmlLocale = document.documentElement.lang;
|
|
3476
|
-
|
|
3757
|
+
const htmlLocale = (_a = document == null ? void 0 : document.documentElement) == null ? void 0 : _a.lang;
|
|
3758
|
+
const hostLocale = detectByHost7();
|
|
3759
|
+
if (!supportedLocales8.includes(htmlLocale)) {
|
|
3760
|
+
console.warn("Unsupported locale set in html lang tag, falling back to detection by hostname");
|
|
3761
|
+
return getSupportedLocale8(hostLocale);
|
|
3762
|
+
}
|
|
3763
|
+
return getSupportedLocale8(htmlLocale != null ? htmlLocale : hostLocale);
|
|
3477
3764
|
} catch (e2) {
|
|
3478
3765
|
console.warn("could not detect locale, falling back to source locale", e2);
|
|
3479
3766
|
return defaultLocale9;
|
|
@@ -3496,34 +3783,75 @@ activateI18n8(messages27, messages18, messages37);
|
|
|
3496
3783
|
var IconChevronDown16 = class extends LitElement7 {
|
|
3497
3784
|
render() {
|
|
3498
3785
|
const title = i18n.t({ message: `Downward arrow`, id: "icon.title.chevron-down", comment: "Title for chevron-down icon" });
|
|
3499
|
-
return html16`<svg xmlns="http://www.w3.org/2000/svg"width="16"height="16"fill="none"viewBox="0 0 16 16" part="w-icon-chevron-down-16-part">${unsafeStatic7(`<title>${title}</title>`)}<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="
|
|
3786
|
+
return html16`<svg xmlns="http://www.w3.org/2000/svg"width="16"height="16"fill="none"viewBox="0 0 16 16" part="w-icon-chevron-down-16-part">${unsafeStatic7(`<title>${title}</title>`)}<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="m2.667 5.333 5.5 5.5 5.5-5.5"></path></svg>`;
|
|
3500
3787
|
}
|
|
3501
3788
|
};
|
|
3502
3789
|
if (!customElements.get("w-icon-chevron-down-16")) {
|
|
3503
3790
|
customElements.define("w-icon-chevron-down-16", IconChevronDown16);
|
|
3504
3791
|
}
|
|
3505
3792
|
|
|
3506
|
-
// node_modules/.pnpm/@warp-ds+icons@
|
|
3793
|
+
// node_modules/.pnpm/@warp-ds+icons@2.0.0/node_modules/@warp-ds/icons/dist/elements/chevron-up-16.js
|
|
3507
3794
|
import { LitElement as LitElement8 } from "lit";
|
|
3508
3795
|
import { unsafeStatic as unsafeStatic8, html as html17 } from "lit/static-html.js";
|
|
3509
3796
|
var messages19 = JSON.parse('{"icon.title.chevron-up":"Oppoverpil"}');
|
|
3510
3797
|
var messages28 = JSON.parse('{"icon.title.chevron-up":"Upward arrow"}');
|
|
3511
3798
|
var messages38 = JSON.parse('{"icon.title.chevron-up":"Nuoli yl\xF6sp\xE4in"}');
|
|
3512
|
-
var supportedLocales9 = ["en", "nb", "fi"];
|
|
3799
|
+
var supportedLocales9 = ["en", "nb", "fi", "da", "sv"];
|
|
3513
3800
|
var defaultLocale10 = "en";
|
|
3801
|
+
var detectByBrand8 = () => {
|
|
3802
|
+
let value;
|
|
3803
|
+
switch (process.env.NMP_BRAND) {
|
|
3804
|
+
case "FINN":
|
|
3805
|
+
value = "nb";
|
|
3806
|
+
break;
|
|
3807
|
+
case "TORI":
|
|
3808
|
+
value = "fi";
|
|
3809
|
+
break;
|
|
3810
|
+
case "BLOCKET":
|
|
3811
|
+
value = "sv";
|
|
3812
|
+
break;
|
|
3813
|
+
case "DBA":
|
|
3814
|
+
value = "da";
|
|
3815
|
+
break;
|
|
3816
|
+
default:
|
|
3817
|
+
value = "en";
|
|
3818
|
+
}
|
|
3819
|
+
return value;
|
|
3820
|
+
};
|
|
3821
|
+
var detectByHost8 = () => {
|
|
3822
|
+
var _a;
|
|
3823
|
+
const hostname = (_a = document == null ? void 0 : document.location) == null ? void 0 : _a.hostname;
|
|
3824
|
+
if (hostname.includes("finn")) {
|
|
3825
|
+
return "nb";
|
|
3826
|
+
} else if (hostname.includes("tori")) {
|
|
3827
|
+
return "fi";
|
|
3828
|
+
} else if (hostname.includes("blocket")) {
|
|
3829
|
+
return "sv";
|
|
3830
|
+
} else if (hostname.includes("dba")) {
|
|
3831
|
+
return "da";
|
|
3832
|
+
} else {
|
|
3833
|
+
return defaultLocale10;
|
|
3834
|
+
}
|
|
3835
|
+
};
|
|
3514
3836
|
var getSupportedLocale9 = (usedLocale) => {
|
|
3515
3837
|
return supportedLocales9.find(
|
|
3516
3838
|
(locale) => usedLocale === locale || usedLocale.toLowerCase().includes(locale)
|
|
3517
|
-
) ||
|
|
3839
|
+
) || detectByHost8();
|
|
3518
3840
|
};
|
|
3519
3841
|
function detectLocale9() {
|
|
3842
|
+
var _a;
|
|
3520
3843
|
if (typeof window === "undefined") {
|
|
3521
|
-
const serverLocale =
|
|
3844
|
+
const serverLocale = detectByBrand8();
|
|
3522
3845
|
return getSupportedLocale9(serverLocale);
|
|
3523
3846
|
}
|
|
3524
3847
|
try {
|
|
3525
|
-
const htmlLocale = document.documentElement.lang;
|
|
3526
|
-
|
|
3848
|
+
const htmlLocale = (_a = document == null ? void 0 : document.documentElement) == null ? void 0 : _a.lang;
|
|
3849
|
+
const hostLocale = detectByHost8();
|
|
3850
|
+
if (!supportedLocales9.includes(htmlLocale)) {
|
|
3851
|
+
console.warn("Unsupported locale set in html lang tag, falling back to detection by hostname");
|
|
3852
|
+
return getSupportedLocale9(hostLocale);
|
|
3853
|
+
}
|
|
3854
|
+
return getSupportedLocale9(htmlLocale != null ? htmlLocale : hostLocale);
|
|
3527
3855
|
} catch (e2) {
|
|
3528
3856
|
console.warn("could not detect locale, falling back to source locale", e2);
|
|
3529
3857
|
return defaultLocale10;
|
|
@@ -4385,11 +4713,11 @@ var WarpToast = class extends WarpElement15 {
|
|
|
4385
4713
|
}
|
|
4386
4714
|
get _iconMarkup() {
|
|
4387
4715
|
if (this._warning)
|
|
4388
|
-
return html23`<w-icon-
|
|
4716
|
+
return html23`<w-icon-warning-16></w-icon-warning-16>`;
|
|
4389
4717
|
if (this._error)
|
|
4390
|
-
return html23`<w-icon-
|
|
4718
|
+
return html23`<w-icon-error-16></w-icon-error-16>`;
|
|
4391
4719
|
else
|
|
4392
|
-
return html23`<w-icon-
|
|
4720
|
+
return html23`<w-icon-success-16></w-icon-success-16>`;
|
|
4393
4721
|
}
|
|
4394
4722
|
async collapse() {
|
|
4395
4723
|
return new Promise((resolve) => {
|