@warp-ds/elements 1.2.3-next.1 → 1.3.0-next.1
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.d.ts +2 -1
- package/dist/index.js +412 -296
- package/dist/index.js.map +4 -4
- package/dist/packages/affix/index.js +72 -58
- package/dist/packages/affix/index.js.map +4 -4
- package/dist/packages/alert/index.js +80 -66
- package/dist/packages/alert/index.js.map +4 -4
- package/dist/packages/attention/index.js +71 -57
- package/dist/packages/attention/index.js.map +4 -4
- package/dist/packages/badge/index.js +3 -3
- package/dist/packages/badge/index.js.map +2 -2
- package/dist/packages/box/index.js +3 -3
- package/dist/packages/box/index.js.map +2 -2
- package/dist/packages/breadcrumbs/index.js +67 -53
- package/dist/packages/breadcrumbs/index.js.map +4 -4
- package/dist/packages/button/index.js +66 -52
- package/dist/packages/button/index.js.map +4 -4
- package/dist/packages/card/index.js +3 -3
- package/dist/packages/card/index.js.map +2 -2
- package/dist/packages/expandable/index.js +72 -58
- package/dist/packages/expandable/index.js.map +4 -4
- package/dist/packages/pill/index.d.ts +34 -0
- package/dist/packages/pill/index.js +1810 -0
- package/dist/packages/pill/index.js.map +7 -0
- package/dist/packages/pill/locales/en/messages.d.mts +1 -0
- package/dist/packages/pill/locales/fi/messages.d.mts +1 -0
- package/dist/packages/pill/locales/nb/messages.d.mts +1 -0
- package/dist/packages/select/index.js +70 -56
- package/dist/packages/select/index.js.map +4 -4
- package/dist/packages/textfield/index.js +3 -3
- package/dist/packages/textfield/index.js.map +2 -2
- package/dist/packages/toast/index.js +83 -69
- package/dist/packages/toast/index.js.map +4 -4
- package/package.json +7 -18
|
@@ -1028,7 +1028,7 @@ var require_parser = __commonJS({
|
|
|
1028
1028
|
import WarpElement from "@warp-ds/elements-core";
|
|
1029
1029
|
import { css, html as html5 } from "lit";
|
|
1030
1030
|
|
|
1031
|
-
// node_modules/.pnpm/@warp-ds+css@1.
|
|
1031
|
+
// node_modules/.pnpm/@warp-ds+css@1.7.0/node_modules/@warp-ds/css/component-classes/index.js
|
|
1032
1032
|
var box = {
|
|
1033
1033
|
box: "group block relative break-words last-child:mb-0 p-16 rounded-8",
|
|
1034
1034
|
// Relative here enables w-clickable
|
|
@@ -1188,9 +1188,9 @@ var modal = {
|
|
|
1188
1188
|
content: "block overflow-y-auto overflow-x-hidden last-child:mb-0 grow shrink px-16 sm:px-32 relative",
|
|
1189
1189
|
footer: "flex justify-end shrink-0 px-16 sm:px-32",
|
|
1190
1190
|
transitionTitle: "transition-all duration-300",
|
|
1191
|
-
transitionTitleCenter: "justify-self-center",
|
|
1191
|
+
transitionTitleCenter: "justify-self-center self-center",
|
|
1192
1192
|
transitionTitleColSpan: "col-span-2",
|
|
1193
|
-
title: "-mt-4 sm:-mt-8 h-40 sm:h-48 grid gap-8 sm:gap-16 grid-cols-[auto_1fr_auto] items-
|
|
1193
|
+
title: "py-8 sm:py-0 -mt-4 sm:-mt-8 min-h-40 sm:min-h-48 grid gap-8 sm:gap-16 grid-cols-[auto_1fr_auto] items-start px-16 sm:px-32 border-b sm:border-b-0 shrink-0",
|
|
1194
1194
|
titleText: "mb-0 h4 sm:h3",
|
|
1195
1195
|
titleButton: `${buttonTextSizes.medium} ${buttonTypes.pill} ${buttonColors.pill} sm:min-h-[44px] sm:min-w-[44px] min-h-[32px] min-w-[32px]`,
|
|
1196
1196
|
titleButtonLeft: "-ml-8 sm:-ml-12 justify-self-start",
|
|
@@ -1268,14 +1268,14 @@ var r = function() {
|
|
|
1268
1268
|
}, []).join(" ");
|
|
1269
1269
|
};
|
|
1270
1270
|
|
|
1271
|
-
// node_modules/.pnpm/@warp-ds+icons@1.
|
|
1271
|
+
// node_modules/.pnpm/@warp-ds+icons@1.4.0/node_modules/@warp-ds/icons/dist/elements/alert-info-16.js
|
|
1272
1272
|
import { LitElement } from "lit";
|
|
1273
1273
|
import { unsafeStatic, html } from "lit/static-html.js";
|
|
1274
1274
|
|
|
1275
|
-
// node_modules/.pnpm/@lingui+core@4.
|
|
1275
|
+
// node_modules/.pnpm/@lingui+core@4.7.0/node_modules/@lingui/core/dist/index.mjs
|
|
1276
1276
|
var import_unraw = __toESM(require_dist(), 1);
|
|
1277
1277
|
|
|
1278
|
-
// node_modules/.pnpm/@lingui+message-utils@4.
|
|
1278
|
+
// node_modules/.pnpm/@lingui+message-utils@4.7.0/node_modules/@lingui/message-utils/dist/compileMessage.mjs
|
|
1279
1279
|
var import_parser = __toESM(require_parser(), 1);
|
|
1280
1280
|
function processTokens(tokens, mapText) {
|
|
1281
1281
|
if (!tokens.filter((token) => token.type !== "content").length) {
|
|
@@ -1325,13 +1325,14 @@ Message: ${message}`);
|
|
|
1325
1325
|
}
|
|
1326
1326
|
}
|
|
1327
1327
|
|
|
1328
|
-
// node_modules/.pnpm/@lingui+core@4.
|
|
1328
|
+
// node_modules/.pnpm/@lingui+core@4.7.0/node_modules/@lingui/core/dist/index.mjs
|
|
1329
1329
|
var isString = (s) => typeof s === "string";
|
|
1330
1330
|
var isFunction = (f) => typeof f === "function";
|
|
1331
1331
|
var cache = /* @__PURE__ */ new Map();
|
|
1332
|
+
var defaultLocale = "en";
|
|
1332
1333
|
function normalizeLocales(locales) {
|
|
1333
1334
|
const out = Array.isArray(locales) ? locales : [locales];
|
|
1334
|
-
return [...out,
|
|
1335
|
+
return [...out, defaultLocale];
|
|
1335
1336
|
}
|
|
1336
1337
|
function date(locales, value, format) {
|
|
1337
1338
|
const _locales = normalizeLocales(locales);
|
|
@@ -1376,11 +1377,13 @@ function cacheKey(type, locales, options) {
|
|
|
1376
1377
|
return `${type}-${localeKey}-${JSON.stringify(options)}`;
|
|
1377
1378
|
}
|
|
1378
1379
|
var UNICODE_REGEX = /\\u[a-fA-F0-9]{4}|\\x[a-fA-F0-9]{2}/g;
|
|
1379
|
-
var getDefaultFormats = (locale,
|
|
1380
|
-
locales =
|
|
1381
|
-
const style = (format) =>
|
|
1380
|
+
var getDefaultFormats = (locale, passedLocales, formats = {}) => {
|
|
1381
|
+
const locales = passedLocales || locale;
|
|
1382
|
+
const style = (format) => {
|
|
1383
|
+
return typeof format === "object" ? format : formats[format] || { style: format };
|
|
1384
|
+
};
|
|
1382
1385
|
const replaceOctothorpe = (value, message) => {
|
|
1383
|
-
const numberFormat = Object.keys(formats).length ? style("number") :
|
|
1386
|
+
const numberFormat = Object.keys(formats).length ? style("number") : void 0;
|
|
1384
1387
|
const valueStr = number(locales, value, numberFormat);
|
|
1385
1388
|
return message.replace("#", valueStr);
|
|
1386
1389
|
};
|
|
@@ -1395,17 +1398,19 @@ var getDefaultFormats = (locale, locales, formats = {}) => {
|
|
|
1395
1398
|
const message = plural(locales, true, value, cases);
|
|
1396
1399
|
return replaceOctothorpe(value - offset, message);
|
|
1397
1400
|
},
|
|
1398
|
-
select:
|
|
1399
|
-
var _a;
|
|
1400
|
-
return (_a = rules[value]) != null ? _a : rules.other;
|
|
1401
|
-
},
|
|
1401
|
+
select: selectFormatter,
|
|
1402
1402
|
number: (value, format) => number(locales, value, style(format)),
|
|
1403
1403
|
date: (value, format) => date(locales, value, style(format)),
|
|
1404
|
-
undefined:
|
|
1404
|
+
undefined: undefinedFormatter
|
|
1405
1405
|
};
|
|
1406
1406
|
};
|
|
1407
|
+
var selectFormatter = (value, rules) => {
|
|
1408
|
+
var _a;
|
|
1409
|
+
return (_a = rules[value]) != null ? _a : rules.other;
|
|
1410
|
+
};
|
|
1411
|
+
var undefinedFormatter = (value) => value;
|
|
1407
1412
|
function interpolate(translation, locale, locales) {
|
|
1408
|
-
return (values
|
|
1413
|
+
return (values = {}, formats) => {
|
|
1409
1414
|
const formatters = getDefaultFormats(locale, locales, formats);
|
|
1410
1415
|
const formatMessage = (message) => {
|
|
1411
1416
|
if (!Array.isArray(message))
|
|
@@ -1415,14 +1420,15 @@ function interpolate(translation, locale, locales) {
|
|
|
1415
1420
|
return message2 + token;
|
|
1416
1421
|
const [name, type, format] = token;
|
|
1417
1422
|
let interpolatedFormat = {};
|
|
1418
|
-
if (format != null &&
|
|
1419
|
-
Object.
|
|
1420
|
-
interpolatedFormat[key] = formatMessage(
|
|
1423
|
+
if (format != null && typeof format === "object") {
|
|
1424
|
+
Object.entries(format).forEach(([key, value2]) => {
|
|
1425
|
+
interpolatedFormat[key] = formatMessage(value2);
|
|
1421
1426
|
});
|
|
1422
1427
|
} else {
|
|
1423
1428
|
interpolatedFormat = format;
|
|
1424
1429
|
}
|
|
1425
|
-
const
|
|
1430
|
+
const formatter = formatters[type];
|
|
1431
|
+
const value = formatter(values[name], interpolatedFormat);
|
|
1426
1432
|
if (value == null)
|
|
1427
1433
|
return message2;
|
|
1428
1434
|
return message2 + value;
|
|
@@ -1434,7 +1440,7 @@ function interpolate(translation, locale, locales) {
|
|
|
1434
1440
|
}
|
|
1435
1441
|
if (isString(result))
|
|
1436
1442
|
return result.trim();
|
|
1437
|
-
return result;
|
|
1443
|
+
return result ? String(result) : "";
|
|
1438
1444
|
};
|
|
1439
1445
|
}
|
|
1440
1446
|
var __defProp$1 = Object.defineProperty;
|
|
@@ -1448,25 +1454,29 @@ var EventEmitter = class {
|
|
|
1448
1454
|
__publicField$1(this, "_events", {});
|
|
1449
1455
|
}
|
|
1450
1456
|
on(event, listener) {
|
|
1451
|
-
|
|
1452
|
-
|
|
1457
|
+
var _a2;
|
|
1458
|
+
var _a;
|
|
1459
|
+
(_a2 = (_a = this._events)[event]) != null ? _a2 : _a[event] = [];
|
|
1453
1460
|
this._events[event].push(listener);
|
|
1454
1461
|
return () => this.removeListener(event, listener);
|
|
1455
1462
|
}
|
|
1456
1463
|
removeListener(event, listener) {
|
|
1457
|
-
|
|
1464
|
+
const maybeListeners = this._getListeners(event);
|
|
1465
|
+
if (!maybeListeners)
|
|
1458
1466
|
return;
|
|
1459
|
-
const index =
|
|
1467
|
+
const index = maybeListeners.indexOf(listener);
|
|
1460
1468
|
if (~index)
|
|
1461
|
-
|
|
1469
|
+
maybeListeners.splice(index, 1);
|
|
1462
1470
|
}
|
|
1463
1471
|
emit(event, ...args) {
|
|
1464
|
-
|
|
1472
|
+
const maybeListeners = this._getListeners(event);
|
|
1473
|
+
if (!maybeListeners)
|
|
1465
1474
|
return;
|
|
1466
|
-
|
|
1475
|
+
maybeListeners.map((listener) => listener.apply(this, args));
|
|
1467
1476
|
}
|
|
1468
|
-
|
|
1469
|
-
|
|
1477
|
+
_getListeners(event) {
|
|
1478
|
+
const maybeListeners = this._events[event];
|
|
1479
|
+
return Array.isArray(maybeListeners) ? maybeListeners : false;
|
|
1470
1480
|
}
|
|
1471
1481
|
};
|
|
1472
1482
|
var __defProp2 = Object.defineProperty;
|
|
@@ -1477,23 +1487,22 @@ var __publicField2 = (obj, key, value) => {
|
|
|
1477
1487
|
};
|
|
1478
1488
|
var I18n = class extends EventEmitter {
|
|
1479
1489
|
constructor(params) {
|
|
1490
|
+
var _a;
|
|
1480
1491
|
super();
|
|
1481
|
-
__publicField2(this, "_locale");
|
|
1492
|
+
__publicField2(this, "_locale", "");
|
|
1482
1493
|
__publicField2(this, "_locales");
|
|
1483
|
-
__publicField2(this, "_localeData");
|
|
1484
|
-
__publicField2(this, "_messages");
|
|
1494
|
+
__publicField2(this, "_localeData", {});
|
|
1495
|
+
__publicField2(this, "_messages", {});
|
|
1485
1496
|
__publicField2(this, "_missing");
|
|
1486
1497
|
__publicField2(this, "t", this._.bind(this));
|
|
1487
|
-
this._messages = {};
|
|
1488
|
-
this._localeData = {};
|
|
1489
1498
|
if (params.missing != null)
|
|
1490
1499
|
this._missing = params.missing;
|
|
1491
1500
|
if (params.messages != null)
|
|
1492
1501
|
this.load(params.messages);
|
|
1493
1502
|
if (params.localeData != null)
|
|
1494
1503
|
this.loadLocaleData(params.localeData);
|
|
1495
|
-
if (params.locale
|
|
1496
|
-
this.activate(params.locale, params.locales);
|
|
1504
|
+
if (typeof params.locale === "string" || params.locales) {
|
|
1505
|
+
this.activate((_a = params.locale) != null ? _a : defaultLocale, params.locales);
|
|
1497
1506
|
}
|
|
1498
1507
|
}
|
|
1499
1508
|
get locale() {
|
|
@@ -1514,15 +1523,17 @@ var I18n = class extends EventEmitter {
|
|
|
1514
1523
|
return (_a = this._localeData[this._locale]) != null ? _a : {};
|
|
1515
1524
|
}
|
|
1516
1525
|
_loadLocaleData(locale, localeData) {
|
|
1517
|
-
|
|
1526
|
+
const maybeLocaleData = this._localeData[locale];
|
|
1527
|
+
if (!maybeLocaleData) {
|
|
1518
1528
|
this._localeData[locale] = localeData;
|
|
1519
1529
|
} else {
|
|
1520
|
-
Object.assign(
|
|
1530
|
+
Object.assign(maybeLocaleData, localeData);
|
|
1521
1531
|
}
|
|
1522
1532
|
}
|
|
1523
1533
|
/**
|
|
1524
1534
|
* @deprecated Plurals automatically used from Intl.PluralRules you can safely remove this call. Deprecated in v4
|
|
1525
1535
|
*/
|
|
1536
|
+
// @ts-ignore deprecated, so ignore the reported error
|
|
1526
1537
|
loadLocaleData(localeOrAllData, localeData) {
|
|
1527
1538
|
if (localeData != null) {
|
|
1528
1539
|
this._loadLocaleData(localeOrAllData, localeData);
|
|
@@ -1534,18 +1545,19 @@ var I18n = class extends EventEmitter {
|
|
|
1534
1545
|
this.emit("change");
|
|
1535
1546
|
}
|
|
1536
1547
|
_load(locale, messages7) {
|
|
1537
|
-
|
|
1548
|
+
const maybeMessages = this._messages[locale];
|
|
1549
|
+
if (!maybeMessages) {
|
|
1538
1550
|
this._messages[locale] = messages7;
|
|
1539
1551
|
} else {
|
|
1540
|
-
Object.assign(
|
|
1552
|
+
Object.assign(maybeMessages, messages7);
|
|
1541
1553
|
}
|
|
1542
1554
|
}
|
|
1543
1555
|
load(localeOrMessages, messages7) {
|
|
1544
|
-
if (messages7
|
|
1556
|
+
if (typeof localeOrMessages == "string" && typeof messages7 === "object") {
|
|
1545
1557
|
this._load(localeOrMessages, messages7);
|
|
1546
1558
|
} else {
|
|
1547
|
-
Object.
|
|
1548
|
-
(locale) => this._load(locale,
|
|
1559
|
+
Object.entries(localeOrMessages).forEach(
|
|
1560
|
+
([locale, messages25]) => this._load(locale, messages25)
|
|
1549
1561
|
);
|
|
1550
1562
|
}
|
|
1551
1563
|
this.emit("change");
|
|
@@ -1569,13 +1581,15 @@ var I18n = class extends EventEmitter {
|
|
|
1569
1581
|
this._locales = locales;
|
|
1570
1582
|
this.emit("change");
|
|
1571
1583
|
}
|
|
1572
|
-
_(id, values
|
|
1584
|
+
_(id, values, options) {
|
|
1585
|
+
let message = options == null ? void 0 : options.message;
|
|
1573
1586
|
if (!isString(id)) {
|
|
1574
1587
|
values = id.values || values;
|
|
1575
1588
|
message = id.message;
|
|
1576
1589
|
id = id.id;
|
|
1577
1590
|
}
|
|
1578
|
-
const
|
|
1591
|
+
const messageForId = this.messages[id];
|
|
1592
|
+
const messageMissing = messageForId === void 0;
|
|
1579
1593
|
const missing = this._missing;
|
|
1580
1594
|
if (missing && messageMissing) {
|
|
1581
1595
|
return isFunction(missing) ? missing(this._locale, id) : missing;
|
|
@@ -1583,7 +1597,7 @@ var I18n = class extends EventEmitter {
|
|
|
1583
1597
|
if (messageMissing) {
|
|
1584
1598
|
this.emit("missing", { id, locale: this._locale });
|
|
1585
1599
|
}
|
|
1586
|
-
let translation =
|
|
1600
|
+
let translation = messageForId || message || id;
|
|
1587
1601
|
if (true) {
|
|
1588
1602
|
translation = isString(translation) ? compileMessage(translation) : translation;
|
|
1589
1603
|
}
|
|
@@ -1595,7 +1609,7 @@ var I18n = class extends EventEmitter {
|
|
|
1595
1609
|
translation,
|
|
1596
1610
|
this._locale,
|
|
1597
1611
|
this._locales
|
|
1598
|
-
)(values, formats);
|
|
1612
|
+
)(values, options == null ? void 0 : options.formats);
|
|
1599
1613
|
}
|
|
1600
1614
|
date(value, format) {
|
|
1601
1615
|
return date(this._locales || this._locale, value, format);
|
|
@@ -1609,16 +1623,16 @@ function setupI18n(params = {}) {
|
|
|
1609
1623
|
}
|
|
1610
1624
|
var i18n = setupI18n();
|
|
1611
1625
|
|
|
1612
|
-
// node_modules/.pnpm/@warp-ds+icons@1.
|
|
1626
|
+
// node_modules/.pnpm/@warp-ds+icons@1.4.0/node_modules/@warp-ds/icons/dist/elements/alert-info-16.js
|
|
1613
1627
|
var messages = JSON.parse('{"icon.title.alert-info":"Bl\xE5 sirkel med bokstaven \\"I\\""}');
|
|
1614
1628
|
var messages2 = JSON.parse('{"icon.title.alert-info":"Blue circle with the letter I"}');
|
|
1615
1629
|
var messages3 = JSON.parse('{"icon.title.alert-info":"Ympyr\xE4, jonka sis\xE4ll\xE4 on i-kirjain"}');
|
|
1616
1630
|
var supportedLocales = ["en", "nb", "fi"];
|
|
1617
|
-
var
|
|
1631
|
+
var defaultLocale2 = "en";
|
|
1618
1632
|
var getSupportedLocale = (usedLocale) => {
|
|
1619
1633
|
return supportedLocales.find(
|
|
1620
1634
|
(locale) => usedLocale === locale || usedLocale.toLowerCase().includes(locale)
|
|
1621
|
-
) ||
|
|
1635
|
+
) || defaultLocale2;
|
|
1622
1636
|
};
|
|
1623
1637
|
function detectLocale() {
|
|
1624
1638
|
if (typeof window === "undefined") {
|
|
@@ -1630,7 +1644,7 @@ function detectLocale() {
|
|
|
1630
1644
|
return getSupportedLocale(htmlLocale);
|
|
1631
1645
|
} catch (e) {
|
|
1632
1646
|
console.warn("could not detect locale, falling back to source locale", e);
|
|
1633
|
-
return
|
|
1647
|
+
return defaultLocale2;
|
|
1634
1648
|
}
|
|
1635
1649
|
}
|
|
1636
1650
|
var getMessages = (locale, enMsg, nbMsg, fiMsg) => {
|
|
@@ -1657,18 +1671,18 @@ if (!customElements.get("w-icon-alert-info-16")) {
|
|
|
1657
1671
|
customElements.define("w-icon-alert-info-16", IconAlertInfo16);
|
|
1658
1672
|
}
|
|
1659
1673
|
|
|
1660
|
-
// node_modules/.pnpm/@warp-ds+icons@1.
|
|
1674
|
+
// node_modules/.pnpm/@warp-ds+icons@1.4.0/node_modules/@warp-ds/icons/dist/elements/alert-warning-16.js
|
|
1661
1675
|
import { LitElement as LitElement2 } from "lit";
|
|
1662
1676
|
import { unsafeStatic as unsafeStatic2, html as html2 } from "lit/static-html.js";
|
|
1663
1677
|
var messages4 = JSON.parse('{"icon.title.alert-warning":"Gul varseltrekant med utropstegn"}');
|
|
1664
1678
|
var messages22 = JSON.parse('{"icon.title.alert-warning":"Yellow warning triangle with exclamation point"}');
|
|
1665
1679
|
var messages32 = JSON.parse('{"icon.title.alert-warning":"Keltainen varoituskolmio, jonka sis\xE4ll\xE4 on huutomerkki"}');
|
|
1666
1680
|
var supportedLocales2 = ["en", "nb", "fi"];
|
|
1667
|
-
var
|
|
1681
|
+
var defaultLocale3 = "en";
|
|
1668
1682
|
var getSupportedLocale2 = (usedLocale) => {
|
|
1669
1683
|
return supportedLocales2.find(
|
|
1670
1684
|
(locale) => usedLocale === locale || usedLocale.toLowerCase().includes(locale)
|
|
1671
|
-
) ||
|
|
1685
|
+
) || defaultLocale3;
|
|
1672
1686
|
};
|
|
1673
1687
|
function detectLocale2() {
|
|
1674
1688
|
if (typeof window === "undefined") {
|
|
@@ -1680,7 +1694,7 @@ function detectLocale2() {
|
|
|
1680
1694
|
return getSupportedLocale2(htmlLocale);
|
|
1681
1695
|
} catch (e) {
|
|
1682
1696
|
console.warn("could not detect locale, falling back to source locale", e);
|
|
1683
|
-
return
|
|
1697
|
+
return defaultLocale3;
|
|
1684
1698
|
}
|
|
1685
1699
|
}
|
|
1686
1700
|
var getMessages2 = (locale, enMsg, nbMsg, fiMsg) => {
|
|
@@ -1707,18 +1721,18 @@ if (!customElements.get("w-icon-alert-warning-16")) {
|
|
|
1707
1721
|
customElements.define("w-icon-alert-warning-16", IconAlertWarning16);
|
|
1708
1722
|
}
|
|
1709
1723
|
|
|
1710
|
-
// node_modules/.pnpm/@warp-ds+icons@1.
|
|
1724
|
+
// node_modules/.pnpm/@warp-ds+icons@1.4.0/node_modules/@warp-ds/icons/dist/elements/alert-error-16.js
|
|
1711
1725
|
import { LitElement as LitElement3 } from "lit";
|
|
1712
1726
|
import { unsafeStatic as unsafeStatic3, html as html3 } from "lit/static-html.js";
|
|
1713
1727
|
var messages5 = JSON.parse('{"icon.title.alert-error":"R\xF8d \xE5ttekant med hvitt utropstegn"}');
|
|
1714
1728
|
var messages23 = JSON.parse('{"icon.title.alert-error":"Red octagon with white exclamation point"}');
|
|
1715
1729
|
var messages33 = JSON.parse('{"icon.title.alert-error":"Punainen kahdeksankulmio, jonka sis\xE4ll\xE4 on valkoinen huutomerkki"}');
|
|
1716
1730
|
var supportedLocales3 = ["en", "nb", "fi"];
|
|
1717
|
-
var
|
|
1731
|
+
var defaultLocale4 = "en";
|
|
1718
1732
|
var getSupportedLocale3 = (usedLocale) => {
|
|
1719
1733
|
return supportedLocales3.find(
|
|
1720
1734
|
(locale) => usedLocale === locale || usedLocale.toLowerCase().includes(locale)
|
|
1721
|
-
) ||
|
|
1735
|
+
) || defaultLocale4;
|
|
1722
1736
|
};
|
|
1723
1737
|
function detectLocale3() {
|
|
1724
1738
|
if (typeof window === "undefined") {
|
|
@@ -1730,7 +1744,7 @@ function detectLocale3() {
|
|
|
1730
1744
|
return getSupportedLocale3(htmlLocale);
|
|
1731
1745
|
} catch (e) {
|
|
1732
1746
|
console.warn("could not detect locale, falling back to source locale", e);
|
|
1733
|
-
return
|
|
1747
|
+
return defaultLocale4;
|
|
1734
1748
|
}
|
|
1735
1749
|
}
|
|
1736
1750
|
var getMessages3 = (locale, enMsg, nbMsg, fiMsg) => {
|
|
@@ -1757,18 +1771,18 @@ if (!customElements.get("w-icon-alert-error-16")) {
|
|
|
1757
1771
|
customElements.define("w-icon-alert-error-16", IconAlertError16);
|
|
1758
1772
|
}
|
|
1759
1773
|
|
|
1760
|
-
// node_modules/.pnpm/@warp-ds+icons@1.
|
|
1774
|
+
// node_modules/.pnpm/@warp-ds+icons@1.4.0/node_modules/@warp-ds/icons/dist/elements/alert-success-16.js
|
|
1761
1775
|
import { LitElement as LitElement4 } from "lit";
|
|
1762
1776
|
import { unsafeStatic as unsafeStatic4, html as html4 } from "lit/static-html.js";
|
|
1763
1777
|
var messages6 = JSON.parse('{"icon.title.alert-success":"Gr\xF8nn sirkel med sjekkmerke"}');
|
|
1764
1778
|
var messages24 = JSON.parse('{"icon.title.alert-success":"Green circle with checkmark"}');
|
|
1765
1779
|
var messages34 = JSON.parse('{"icon.title.alert-success":"Vihre\xE4 ympyr\xE4, jonka sis\xE4ll\xE4 on valintamerkki"}');
|
|
1766
1780
|
var supportedLocales4 = ["en", "nb", "fi"];
|
|
1767
|
-
var
|
|
1781
|
+
var defaultLocale5 = "en";
|
|
1768
1782
|
var getSupportedLocale4 = (usedLocale) => {
|
|
1769
1783
|
return supportedLocales4.find(
|
|
1770
1784
|
(locale) => usedLocale === locale || usedLocale.toLowerCase().includes(locale)
|
|
1771
|
-
) ||
|
|
1785
|
+
) || defaultLocale5;
|
|
1772
1786
|
};
|
|
1773
1787
|
function detectLocale4() {
|
|
1774
1788
|
if (typeof window === "undefined") {
|
|
@@ -1780,7 +1794,7 @@ function detectLocale4() {
|
|
|
1780
1794
|
return getSupportedLocale4(htmlLocale);
|
|
1781
1795
|
} catch (e) {
|
|
1782
1796
|
console.warn("could not detect locale, falling back to source locale", e);
|
|
1783
|
-
return
|
|
1797
|
+
return defaultLocale5;
|
|
1784
1798
|
}
|
|
1785
1799
|
}
|
|
1786
1800
|
var getMessages4 = (locale, enMsg, nbMsg, fiMsg) => {
|