@warp-ds/elements 2.0.0-next.2 → 2.0.0-next.4
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/api.js +3 -6
- package/dist/api.js.map +1 -1
- package/dist/index.js +519 -603
- package/dist/index.js.map +4 -4
- package/dist/packages/affix/index.d.ts +13 -6
- package/dist/packages/affix/index.js +66 -113
- package/dist/packages/affix/index.js.map +4 -4
- package/dist/packages/alert/index.js +48 -114
- package/dist/packages/alert/index.js.map +3 -3
- package/dist/packages/attention/index.js +147 -179
- package/dist/packages/attention/index.js.map +4 -4
- package/dist/packages/badge/index.js +27 -77
- package/dist/packages/badge/index.js.map +4 -4
- package/dist/packages/box/index.d.ts +1 -1
- package/dist/packages/box/index.js +26 -68
- package/dist/packages/box/index.js.map +4 -4
- package/dist/packages/breadcrumbs/index.js +42 -103
- package/dist/packages/breadcrumbs/index.js.map +3 -3
- package/dist/packages/broadcast/index.js +2 -6
- package/dist/packages/broadcast/index.js.map +1 -1
- package/dist/packages/button/index.d.ts +6 -0
- package/dist/packages/button/index.js +101 -156
- package/dist/packages/button/index.js.map +3 -3
- package/dist/packages/card/index.d.ts +5 -5
- package/dist/packages/card/index.js +1462 -96
- package/dist/packages/card/index.js.map +4 -4
- package/dist/packages/card/locales/da/messages.d.mts +1 -0
- package/dist/packages/card/locales/en/messages.d.mts +1 -0
- package/dist/packages/card/locales/fi/messages.d.mts +1 -0
- package/dist/packages/card/locales/nb/messages.d.mts +1 -0
- package/dist/packages/expandable/index.d.ts +1 -6
- package/dist/packages/expandable/index.js +104 -135
- package/dist/packages/expandable/index.js.map +4 -4
- package/dist/packages/modal/index.js +51 -119
- package/dist/packages/modal/index.js.map +3 -3
- package/dist/packages/modal/modal-header.d.ts +1 -1
- package/dist/packages/modal/modal-main.d.ts +3 -3
- package/dist/packages/pill/index.js +53 -119
- package/dist/packages/pill/index.js.map +3 -3
- package/dist/packages/select/index.d.ts +9 -0
- package/dist/packages/select/index.js +90 -155
- package/dist/packages/select/index.js.map +3 -3
- package/dist/packages/textfield/index.d.ts +9 -5
- package/dist/packages/textfield/index.js +54 -89
- package/dist/packages/textfield/index.js.map +4 -4
- package/dist/packages/toast/api.d.ts +1 -1
- package/dist/packages/toast/index.js +118 -195
- package/dist/packages/toast/index.js.map +4 -4
- package/dist/packages/toast/toast-container.d.ts +1 -1
- package/dist/packages/toast/toast.d.ts +1 -2
- package/dist/packages/utils/index.d.ts +1 -1
- package/dist/packages/utils/unstyled-heading.d.ts +1 -1
- package/package.json +29 -30
|
@@ -49,10 +49,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
49
49
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
50
50
|
mod
|
|
51
51
|
));
|
|
52
|
-
var __publicField = (obj, key, value) =>
|
|
53
|
-
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
54
|
-
return value;
|
|
55
|
-
};
|
|
52
|
+
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
56
53
|
|
|
57
54
|
// node_modules/.pnpm/unraw@3.0.0/node_modules/unraw/dist/errors.js
|
|
58
55
|
var require_errors = __commonJS({
|
|
@@ -225,8 +222,7 @@ var require_moo = __commonJS({
|
|
|
225
222
|
return "(" + s + ")";
|
|
226
223
|
}
|
|
227
224
|
function reUnion(regexps) {
|
|
228
|
-
if (!regexps.length)
|
|
229
|
-
return "(?!)";
|
|
225
|
+
if (!regexps.length) return "(?!)";
|
|
230
226
|
var source = regexps.map(function(s) {
|
|
231
227
|
return "(?:" + s + ")";
|
|
232
228
|
}).join("|");
|
|
@@ -236,14 +232,10 @@ var require_moo = __commonJS({
|
|
|
236
232
|
if (typeof obj === "string") {
|
|
237
233
|
return "(?:" + reEscape(obj) + ")";
|
|
238
234
|
} else if (isRegExp(obj)) {
|
|
239
|
-
if (obj.ignoreCase)
|
|
240
|
-
|
|
241
|
-
if (obj.
|
|
242
|
-
|
|
243
|
-
if (obj.sticky)
|
|
244
|
-
throw new Error("RegExp /y flag is implied");
|
|
245
|
-
if (obj.multiline)
|
|
246
|
-
throw new Error("RegExp /m flag is implied");
|
|
235
|
+
if (obj.ignoreCase) throw new Error("RegExp /i flag not allowed");
|
|
236
|
+
if (obj.global) throw new Error("RegExp /g flag is implied");
|
|
237
|
+
if (obj.sticky) throw new Error("RegExp /y flag is implied");
|
|
238
|
+
if (obj.multiline) throw new Error("RegExp /m flag is implied");
|
|
247
239
|
return obj.source;
|
|
248
240
|
} else {
|
|
249
241
|
throw new Error("Not a pattern: " + obj);
|
|
@@ -292,16 +284,14 @@ var require_moo = __commonJS({
|
|
|
292
284
|
var match = [];
|
|
293
285
|
rules.forEach(function(rule) {
|
|
294
286
|
if (isObject(rule)) {
|
|
295
|
-
if (match.length)
|
|
296
|
-
result.push(ruleOptions(key, match));
|
|
287
|
+
if (match.length) result.push(ruleOptions(key, match));
|
|
297
288
|
result.push(ruleOptions(key, rule));
|
|
298
289
|
match = [];
|
|
299
290
|
} else {
|
|
300
291
|
match.push(rule);
|
|
301
292
|
}
|
|
302
293
|
});
|
|
303
|
-
if (match.length)
|
|
304
|
-
result.push(ruleOptions(key, match));
|
|
294
|
+
if (match.length) result.push(ruleOptions(key, match));
|
|
305
295
|
}
|
|
306
296
|
return result;
|
|
307
297
|
}
|
|
@@ -436,8 +426,7 @@ var require_moo = __commonJS({
|
|
|
436
426
|
var fallbackRule = errorRule && errorRule.fallback;
|
|
437
427
|
var flags = hasSticky && !fallbackRule ? "ym" : "gm";
|
|
438
428
|
var suffix2 = hasSticky || fallbackRule ? "" : "|";
|
|
439
|
-
if (unicodeFlag === true)
|
|
440
|
-
flags += "u";
|
|
429
|
+
if (unicodeFlag === true) flags += "u";
|
|
441
430
|
var combined = new RegExp(reUnion(parts) + suffix2, flags);
|
|
442
431
|
return { regexp: combined, groups, fast, error: errorRule || defaultErrorRule };
|
|
443
432
|
}
|
|
@@ -458,8 +447,7 @@ var require_moo = __commonJS({
|
|
|
458
447
|
var all = states.$all ? toRules(states.$all) : [];
|
|
459
448
|
delete states.$all;
|
|
460
449
|
var keys = Object.getOwnPropertyNames(states);
|
|
461
|
-
if (!start)
|
|
462
|
-
start = keys[0];
|
|
450
|
+
if (!start) start = keys[0];
|
|
463
451
|
var ruleMap = /* @__PURE__ */ Object.create(null);
|
|
464
452
|
for (var i = 0; i < keys.length; i++) {
|
|
465
453
|
var key = keys[i];
|
|
@@ -471,8 +459,7 @@ var require_moo = __commonJS({
|
|
|
471
459
|
var included = /* @__PURE__ */ Object.create(null);
|
|
472
460
|
for (var j = 0; j < rules.length; j++) {
|
|
473
461
|
var rule = rules[j];
|
|
474
|
-
if (!rule.include)
|
|
475
|
-
continue;
|
|
462
|
+
if (!rule.include) continue;
|
|
476
463
|
var splice = [j, 1];
|
|
477
464
|
if (rule.include !== key && !included[rule.include]) {
|
|
478
465
|
included[rule.include] = true;
|
|
@@ -482,8 +469,7 @@ var require_moo = __commonJS({
|
|
|
482
469
|
}
|
|
483
470
|
for (var k = 0; k < newRules.length; k++) {
|
|
484
471
|
var newRule = newRules[k];
|
|
485
|
-
if (rules.indexOf(newRule) !== -1)
|
|
486
|
-
continue;
|
|
472
|
+
if (rules.indexOf(newRule) !== -1) continue;
|
|
487
473
|
splice.push(newRule);
|
|
488
474
|
}
|
|
489
475
|
}
|
|
@@ -564,8 +550,7 @@ var require_moo = __commonJS({
|
|
|
564
550
|
};
|
|
565
551
|
};
|
|
566
552
|
Lexer.prototype.setState = function(state) {
|
|
567
|
-
if (!state || this.state === state)
|
|
568
|
-
return;
|
|
553
|
+
if (!state || this.state === state) return;
|
|
569
554
|
this.state = state;
|
|
570
555
|
var info = this.states[state];
|
|
571
556
|
this.groups = info.groups;
|
|
@@ -669,12 +654,9 @@ var require_moo = __commonJS({
|
|
|
669
654
|
var err = new Error(this.formatError(token, "invalid syntax"));
|
|
670
655
|
throw err;
|
|
671
656
|
}
|
|
672
|
-
if (group.pop)
|
|
673
|
-
|
|
674
|
-
else if (group.
|
|
675
|
-
this.pushState(group.push);
|
|
676
|
-
else if (group.next)
|
|
677
|
-
this.setState(group.next);
|
|
657
|
+
if (group.pop) this.popState();
|
|
658
|
+
else if (group.push) this.pushState(group.push);
|
|
659
|
+
else if (group.next) this.setState(group.next);
|
|
678
660
|
return token;
|
|
679
661
|
};
|
|
680
662
|
if (typeof Symbol !== "undefined" && Symbol.iterator) {
|
|
@@ -1029,8 +1011,7 @@ import { css, html as html5 } from "lit";
|
|
|
1029
1011
|
|
|
1030
1012
|
// node_modules/.pnpm/@chbphone55+classnames@2.0.0/node_modules/@chbphone55/classnames/dist/index.m.js
|
|
1031
1013
|
var r = function() {
|
|
1032
|
-
for (var t = [], n = arguments.length; n--; )
|
|
1033
|
-
t[n] = arguments[n];
|
|
1014
|
+
for (var t = [], n = arguments.length; n--; ) t[n] = arguments[n];
|
|
1034
1015
|
return t.reduce(function(t2, n2) {
|
|
1035
1016
|
return t2.concat("string" == typeof n2 ? n2 : Array.isArray(n2) ? r.apply(void 0, n2) : "object" == typeof n2 && n2 ? Object.keys(n2).map(function(r2) {
|
|
1036
1017
|
return n2[r2] ? r2 : "";
|
|
@@ -1038,41 +1019,7 @@ var r = function() {
|
|
|
1038
1019
|
}, []).join(" ");
|
|
1039
1020
|
};
|
|
1040
1021
|
|
|
1041
|
-
// node_modules/.pnpm/@warp-ds+css@2.0.
|
|
1042
|
-
var box = {
|
|
1043
|
-
box: "group block relative break-words last-child:mb-0 p-16 rounded-8",
|
|
1044
|
-
// Relative here enables w-clickable
|
|
1045
|
-
bleed: "-mx-16 sm:mx-0 rounded-l-0 rounded-r-0 sm:rounded-8",
|
|
1046
|
-
// We target L and R to override the default rounded-8
|
|
1047
|
-
info: "s-bg-info-subtle",
|
|
1048
|
-
neutral: "s-surface-sunken",
|
|
1049
|
-
bordered: "border-2 s-border s-bg"
|
|
1050
|
-
};
|
|
1051
|
-
var buttonReset = "focus:outline-none appearance-none cursor-pointer bg-transparent border-0 m-0 p-0 inline-block";
|
|
1052
|
-
var expandable = {
|
|
1053
|
-
expandable: "will-change-height",
|
|
1054
|
-
expandableTitle: "font-bold s-text",
|
|
1055
|
-
expandableBox: "s-surface-sunken hover:s-bg-hover active:s-bg-active py-0 px-0 " + box.box,
|
|
1056
|
-
expandableInfo: "s-bg-info-subtle! hover:s-bg-info-subtle-hover!",
|
|
1057
|
-
expandableBleed: box.bleed,
|
|
1058
|
-
chevron: "inline-block align-middle s-icon",
|
|
1059
|
-
chevronNonBox: "ml-8",
|
|
1060
|
-
chevronBox: "",
|
|
1061
|
-
chevronTransform: "transform transition-transform transform-gpu ease-in-out",
|
|
1062
|
-
chevronExpand: "-rotate-180",
|
|
1063
|
-
chevronCollapse: "rotate-180",
|
|
1064
|
-
elementsTransformChevronDownPart: "part-[w-icon-chevron-down-16-part]:transform part-[w-icon-chevron-down-16-part]:transition-transform part-[w-icon-chevron-down-16-part]:transform-gpu part-[w-icon-chevron-down-16-part]:ease-in-out",
|
|
1065
|
-
elementsChevronDownExpandPart: "part-[w-icon-chevron-down-16-part]:-rotate-180",
|
|
1066
|
-
elementsTransformChevronUpPart: "part-[w-icon-chevron-up-16-part]:transform part-[w-icon-chevron-up-16-part]:transition-transform part-[w-icon-chevron-up-16-part]:transform-gpu part-[w-icon-chevron-up-16-part]:ease-in-out",
|
|
1067
|
-
elementsChevronUpCollapsePart: "part-[w-icon-chevron-up-16-part]:rotate-180",
|
|
1068
|
-
expansion: "overflow-hidden",
|
|
1069
|
-
expansionNotExpanded: "h-0 invisible",
|
|
1070
|
-
button: buttonReset + " hover:underline focus-visible:underline",
|
|
1071
|
-
buttonBox: "w-full text-left relative inline-flex items-center justify-between " + box.box,
|
|
1072
|
-
paddingTop: "pt-0",
|
|
1073
|
-
title: "flex w-full justify-between items-center",
|
|
1074
|
-
titleType: "h4"
|
|
1075
|
-
};
|
|
1022
|
+
// node_modules/.pnpm/@warp-ds+css@2.0.0_@warp-ds+uno@2.0.0_unocss@0.62.0_postcss@8.4.41_rollup@4.20.0_vite@5.3.3_@_vyiy5vwpqfzwy5hpmfkwp3zmle/node_modules/@warp-ds/css/component-classes/index.js
|
|
1076
1023
|
var buttonDefaultStyling = "font-bold focusable justify-center transition-colors ease-in-out";
|
|
1077
1024
|
var buttonColors = {
|
|
1078
1025
|
primary: "s-text-inverted bg-[--w-color-button-primary-background] hover:bg-[--w-color-button-primary-background-hover] active:bg-[--w-color-button-primary-background-active]",
|
|
@@ -1190,7 +1137,7 @@ var button = {
|
|
|
1190
1137
|
};
|
|
1191
1138
|
var modal = {
|
|
1192
1139
|
backdrop: "fixed inset-0 flex sm:place-content-center sm:place-items-center items-end z-30 [--w-modal-max-height:80%] [--w-modal-width:640px] bg-[--w-black/25]",
|
|
1193
|
-
|
|
1140
|
+
base: "pb-safe-[32] shadow-m max-h-[--w-modal-max-height] min-h-[--w-modal-min-height] w-[--w-modal-width] h-[--w-modal-height] relative transition-300 ease-in-out backface-hidden will-change-height rounded-8 mx-0 sm:mx-16 bg-[--w-s-color-surface-elevated-100] flex flex-col overflow-hidden outline-none space-y-16 pt-8 sm:pt-32 sm:pb-32 rounded-b-0 sm:rounded-b-8",
|
|
1194
1141
|
content: "block overflow-y-auto overflow-x-hidden last-child:mb-0 grow shrink px-16 sm:px-32 relative",
|
|
1195
1142
|
footer: "flex justify-end shrink-0 px-16 sm:px-32",
|
|
1196
1143
|
transitionTitle: "transition-all duration-300",
|
|
@@ -1205,7 +1152,7 @@ var modal = {
|
|
|
1205
1152
|
titleButtonIconRotated: "transform rotate-90"
|
|
1206
1153
|
};
|
|
1207
1154
|
var alert = {
|
|
1208
|
-
|
|
1155
|
+
wrapper: "flex p-16 border border-l-4 rounded-4 s-text",
|
|
1209
1156
|
willChangeHeight: "will-change-height",
|
|
1210
1157
|
textWrapper: "last-child:mb-0 text-s",
|
|
1211
1158
|
title: "text-s",
|
|
@@ -1219,19 +1166,15 @@ var alert = {
|
|
|
1219
1166
|
info: "s-border-info-subtle s-border-l-info s-bg-info-subtle",
|
|
1220
1167
|
infoIcon: "s-icon-info"
|
|
1221
1168
|
};
|
|
1222
|
-
var
|
|
1223
|
-
label: "antialiased block relative text-s font-bold pb-4 cursor-pointer s-text",
|
|
1224
|
-
optional: "pl-8 font-normal text-s s-text-subtle"
|
|
1225
|
-
};
|
|
1226
|
-
var prefixSuffixWrapperBase = "absolute top-0 bottom-0 flex justify-center items-center focusable rounded-4 focus:[--w-outline-offset:-2px] bg-transparent ";
|
|
1169
|
+
var prefixSuffixWrapper = "absolute top-0 bottom-0 flex justify-center items-center focusable rounded-4 focus:[--w-outline-offset:-2px] bg-transparent ";
|
|
1227
1170
|
var suffix = {
|
|
1228
|
-
wrapper:
|
|
1171
|
+
wrapper: prefixSuffixWrapper + "right-0",
|
|
1229
1172
|
wrapperWithLabel: "w-max pr-12",
|
|
1230
1173
|
wrapperWithIcon: "w-40",
|
|
1231
1174
|
label: "antialiased block relative cursor-default pb-0 font-bold text-xs s-text"
|
|
1232
1175
|
};
|
|
1233
1176
|
var prefix = {
|
|
1234
|
-
wrapper:
|
|
1177
|
+
wrapper: prefixSuffixWrapper + "left-0",
|
|
1235
1178
|
wrapperWithLabel: "w-max pl-12",
|
|
1236
1179
|
wrapperWithIcon: "w-40",
|
|
1237
1180
|
label: "antialiased block relative cursor-default pb-0 font-bold text-xs s-text"
|
|
@@ -1288,15 +1231,9 @@ var deadToggle = {
|
|
|
1288
1231
|
wrapper: `${toggle.wrapper} h-20 w-20 pointer-events-none`,
|
|
1289
1232
|
input: `${toggle.input} hidden`,
|
|
1290
1233
|
inputVue: "hidden",
|
|
1234
|
+
labelVue: "-mt-2",
|
|
1291
1235
|
labelRadio: `${toggle.label} ${toggle.labelBefore} ${toggle.radio}`,
|
|
1292
|
-
labelCheckbox: `${toggle.label} ${toggle.labelBefore} ${toggle.checkbox}
|
|
1293
|
-
labelVue: "-mt-2"
|
|
1294
|
-
};
|
|
1295
|
-
var clickable = {
|
|
1296
|
-
toggle: "absolute inset-0 h-full w-full appearance-none cursor-pointer focusable focusable-inset",
|
|
1297
|
-
label: `px-12 ${label.label} py-8! cursor-pointer focusable focusable-inset`,
|
|
1298
|
-
buttonOrLink: "bg-transparent focusable",
|
|
1299
|
-
buttonOrLinkStretch: "inset-0 absolute"
|
|
1236
|
+
labelCheckbox: `${toggle.label} ${toggle.labelBefore} ${toggle.checkbox}`
|
|
1300
1237
|
};
|
|
1301
1238
|
var attention = {
|
|
1302
1239
|
base: "border-2 relative flex items-start",
|
|
@@ -1329,14 +1266,14 @@ var attention = {
|
|
|
1329
1266
|
// packages/alert/index.js
|
|
1330
1267
|
import WarpElement from "@warp-ds/elements-core";
|
|
1331
1268
|
|
|
1332
|
-
// node_modules/.pnpm/@warp-ds+icons@2.0.
|
|
1269
|
+
// node_modules/.pnpm/@warp-ds+icons@2.0.2/node_modules/@warp-ds/icons/dist/elements/info-16.js
|
|
1333
1270
|
import { LitElement } from "lit";
|
|
1334
1271
|
import { unsafeStatic, html } from "lit/static-html.js";
|
|
1335
1272
|
|
|
1336
|
-
// node_modules/.pnpm/@lingui+core@4.
|
|
1273
|
+
// node_modules/.pnpm/@lingui+core@4.11.2/node_modules/@lingui/core/dist/index.mjs
|
|
1337
1274
|
var import_unraw = __toESM(require_dist(), 1);
|
|
1338
1275
|
|
|
1339
|
-
// node_modules/.pnpm/@lingui+message-utils@4.
|
|
1276
|
+
// node_modules/.pnpm/@lingui+message-utils@4.11.2/node_modules/@lingui/message-utils/dist/compileMessage.mjs
|
|
1340
1277
|
var import_parser = __toESM(require_parser(), 1);
|
|
1341
1278
|
function processTokens(tokens, mapText) {
|
|
1342
1279
|
if (!tokens.filter((token) => token.type !== "content").length) {
|
|
@@ -1360,11 +1297,9 @@ function processTokens(tokens, mapText) {
|
|
|
1360
1297
|
}
|
|
1361
1298
|
const offset = token.pluralOffset;
|
|
1362
1299
|
const formatProps = {};
|
|
1363
|
-
token.cases.forEach((
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
mapText
|
|
1367
|
-
);
|
|
1300
|
+
token.cases.forEach(({ key, tokens: tokens2 }) => {
|
|
1301
|
+
const prop = key[0] === "=" ? key.slice(1) : key;
|
|
1302
|
+
formatProps[prop] = processTokens(tokens2, mapText);
|
|
1368
1303
|
});
|
|
1369
1304
|
return [
|
|
1370
1305
|
token.arg,
|
|
@@ -1386,7 +1321,7 @@ Message: ${message}`);
|
|
|
1386
1321
|
}
|
|
1387
1322
|
}
|
|
1388
1323
|
|
|
1389
|
-
// node_modules/.pnpm/@lingui+core@4.
|
|
1324
|
+
// node_modules/.pnpm/@lingui+core@4.11.2/node_modules/@lingui/core/dist/index.mjs
|
|
1390
1325
|
var isString = (s) => typeof s === "string";
|
|
1391
1326
|
var isFunction = (f) => typeof f === "function";
|
|
1392
1327
|
var cache = /* @__PURE__ */ new Map();
|
|
@@ -1472,11 +1407,11 @@ var selectFormatter = (value, rules) => {
|
|
|
1472
1407
|
function interpolate(translation, locale, locales) {
|
|
1473
1408
|
return (values = {}, formats) => {
|
|
1474
1409
|
const formatters = getDefaultFormats(locale, locales, formats);
|
|
1475
|
-
const formatMessage = (tokens) => {
|
|
1410
|
+
const formatMessage = (tokens, replaceOctothorpe = false) => {
|
|
1476
1411
|
if (!Array.isArray(tokens))
|
|
1477
1412
|
return tokens;
|
|
1478
1413
|
return tokens.reduce((message, token) => {
|
|
1479
|
-
if (token === "#") {
|
|
1414
|
+
if (token === "#" && replaceOctothorpe) {
|
|
1480
1415
|
return message + OCTOTHORPE_PH;
|
|
1481
1416
|
}
|
|
1482
1417
|
if (isString(token)) {
|
|
@@ -1487,7 +1422,10 @@ function interpolate(translation, locale, locales) {
|
|
|
1487
1422
|
if (type === "plural" || type === "selectordinal" || type === "select") {
|
|
1488
1423
|
Object.entries(format).forEach(
|
|
1489
1424
|
([key, value2]) => {
|
|
1490
|
-
interpolatedFormat[key] = formatMessage(
|
|
1425
|
+
interpolatedFormat[key] = formatMessage(
|
|
1426
|
+
value2,
|
|
1427
|
+
type === "plural" || type === "selectordinal"
|
|
1428
|
+
);
|
|
1491
1429
|
}
|
|
1492
1430
|
);
|
|
1493
1431
|
} else {
|
|
@@ -1655,6 +1593,9 @@ var I18n = class extends EventEmitter {
|
|
|
1655
1593
|
}
|
|
1656
1594
|
_(id, values, options) {
|
|
1657
1595
|
let message = options == null ? void 0 : options.message;
|
|
1596
|
+
if (!id) {
|
|
1597
|
+
id = "";
|
|
1598
|
+
}
|
|
1658
1599
|
if (!isString(id)) {
|
|
1659
1600
|
values = id.values || values;
|
|
1660
1601
|
message = id.message;
|
|
@@ -1695,7 +1636,7 @@ function setupI18n(params = {}) {
|
|
|
1695
1636
|
}
|
|
1696
1637
|
var i18n = setupI18n();
|
|
1697
1638
|
|
|
1698
|
-
// node_modules/.pnpm/@warp-ds+icons@2.0.
|
|
1639
|
+
// node_modules/.pnpm/@warp-ds+icons@2.0.2/node_modules/@warp-ds/icons/dist/elements/info-16.js
|
|
1699
1640
|
var messages = JSON.parse('{"icon.title.info":"Informasjonssirkel"}');
|
|
1700
1641
|
var messages2 = JSON.parse('{"icon.title.info":"Information circle"}');
|
|
1701
1642
|
var messages3 = JSON.parse('{"icon.title.info":"Ympyr\xE4, jonka sis\xE4ll\xE4 on i-kirjain"}');
|
|
@@ -1784,7 +1725,7 @@ if (!customElements.get("w-icon-info-16")) {
|
|
|
1784
1725
|
customElements.define("w-icon-info-16", IconInfo16);
|
|
1785
1726
|
}
|
|
1786
1727
|
|
|
1787
|
-
// node_modules/.pnpm/@warp-ds+icons@2.0.
|
|
1728
|
+
// node_modules/.pnpm/@warp-ds+icons@2.0.2/node_modules/@warp-ds/icons/dist/elements/warning-16.js
|
|
1788
1729
|
import { LitElement as LitElement2 } from "lit";
|
|
1789
1730
|
import { unsafeStatic as unsafeStatic2, html as html2 } from "lit/static-html.js";
|
|
1790
1731
|
var messages4 = JSON.parse('{"icon.title.warning":"Varseltrekant med utropstegn"}');
|
|
@@ -1875,7 +1816,7 @@ if (!customElements.get("w-icon-warning-16")) {
|
|
|
1875
1816
|
customElements.define("w-icon-warning-16", IconWarning16);
|
|
1876
1817
|
}
|
|
1877
1818
|
|
|
1878
|
-
// node_modules/.pnpm/@warp-ds+icons@2.0.
|
|
1819
|
+
// node_modules/.pnpm/@warp-ds+icons@2.0.2/node_modules/@warp-ds/icons/dist/elements/error-16.js
|
|
1879
1820
|
import { LitElement as LitElement3 } from "lit";
|
|
1880
1821
|
import { unsafeStatic as unsafeStatic3, html as html3 } from "lit/static-html.js";
|
|
1881
1822
|
var messages5 = JSON.parse('{"icon.title.error":"\xC5ttekant med utropstegn"}');
|
|
@@ -1966,7 +1907,7 @@ if (!customElements.get("w-icon-error-16")) {
|
|
|
1966
1907
|
customElements.define("w-icon-error-16", IconError16);
|
|
1967
1908
|
}
|
|
1968
1909
|
|
|
1969
|
-
// node_modules/.pnpm/@warp-ds+icons@2.0.
|
|
1910
|
+
// node_modules/.pnpm/@warp-ds+icons@2.0.2/node_modules/@warp-ds/icons/dist/elements/success-16.js
|
|
1970
1911
|
import { LitElement as LitElement4 } from "lit";
|
|
1971
1912
|
import { unsafeStatic as unsafeStatic4, html as html4 } from "lit/static-html.js";
|
|
1972
1913
|
var messages6 = JSON.parse('{"icon.title.success":"Sirkel med sjekkmerke"}');
|
|
@@ -2077,17 +2018,11 @@ var WarpAlert = class extends WarpElement {
|
|
|
2077
2018
|
}
|
|
2078
2019
|
}
|
|
2079
2020
|
get _wrapperClasses() {
|
|
2080
|
-
return r(
|
|
2081
|
-
[alert.alert]: true,
|
|
2082
|
-
[alert[this.variant]]: true
|
|
2083
|
-
});
|
|
2021
|
+
return r([alert.wrapper, alert[this.variant]]);
|
|
2084
2022
|
}
|
|
2085
2023
|
get _iconClasses() {
|
|
2086
2024
|
const activeIconClassNames = alert[`${this.variant}Icon`];
|
|
2087
|
-
return r(
|
|
2088
|
-
[alert.icon]: true,
|
|
2089
|
-
[activeIconClassNames]: true
|
|
2090
|
-
});
|
|
2025
|
+
return r([alert.icon, activeIconClassNames]);
|
|
2091
2026
|
}
|
|
2092
2027
|
get _icon() {
|
|
2093
2028
|
if (this.variant === variants.info) {
|
|
@@ -2101,8 +2036,7 @@ var WarpAlert = class extends WarpElement {
|
|
|
2101
2036
|
}
|
|
2102
2037
|
if (this.variant === variants.positive) {
|
|
2103
2038
|
return html5`<w-icon-success-16></w-icon-success-16>`;
|
|
2104
|
-
} else
|
|
2105
|
-
return "";
|
|
2039
|
+
} else return "";
|
|
2106
2040
|
}
|
|
2107
2041
|
render() {
|
|
2108
2042
|
return html5`
|