@warp-ds/elements 2.1.1-next.1 → 2.1.1-next.2
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 +351 -22
- package/dist/index.js.map +4 -4
- package/dist/packages/affix/index.js +344 -15
- package/dist/packages/affix/index.js.map +4 -4
- package/dist/packages/alert/index.js +346 -17
- package/dist/packages/alert/index.js.map +4 -4
- package/dist/packages/attention/index.js +342 -13
- package/dist/packages/attention/index.js.map +4 -4
- package/dist/packages/badge/index.js +1 -1
- package/dist/packages/badge/index.js.map +2 -2
- package/dist/packages/box/index.js +1 -1
- package/dist/packages/box/index.js.map +2 -2
- package/dist/packages/breadcrumbs/index.js +341 -12
- package/dist/packages/breadcrumbs/index.js.map +4 -4
- package/dist/packages/button/index.js +341 -12
- package/dist/packages/button/index.js.map +4 -4
- package/dist/packages/card/index.js +341 -12
- package/dist/packages/card/index.js.map +4 -4
- package/dist/packages/expandable/index.js +344 -15
- package/dist/packages/expandable/index.js.map +4 -4
- package/dist/packages/modal/index.js +343 -14
- package/dist/packages/modal/index.js.map +4 -4
- package/dist/packages/pill/index.js +343 -14
- package/dist/packages/pill/index.js.map +4 -4
- package/dist/packages/select/index.js +342 -13
- package/dist/packages/select/index.js.map +4 -4
- package/dist/packages/textfield/index.js +1 -1
- package/dist/packages/textfield/index.js.map +2 -2
- package/dist/packages/toast/index.js +345 -16
- package/dist/packages/toast/index.js.map +4 -4
- package/package.json +9 -8
|
@@ -1029,11 +1029,269 @@ var r = function() {
|
|
|
1029
1029
|
}, []).join(" ");
|
|
1030
1030
|
};
|
|
1031
1031
|
|
|
1032
|
-
// node_modules/.pnpm/@lingui+core@5.
|
|
1032
|
+
// node_modules/.pnpm/@lingui+core@5.2.0_@lingui+babel-plugin-lingui-macro@5.2.0_babel-plugin-macros@3.1.0_typescri_qfhfd5z2jpd4amxt2golzdalsi/node_modules/@lingui/core/dist/index.mjs
|
|
1033
1033
|
var import_unraw = __toESM(require_dist(), 1);
|
|
1034
1034
|
|
|
1035
|
-
// node_modules/.pnpm/@lingui+message-utils@5.
|
|
1035
|
+
// node_modules/.pnpm/@lingui+message-utils@5.2.0/node_modules/@lingui/message-utils/dist/compileMessage.mjs
|
|
1036
1036
|
var import_parser = __toESM(require_parser(), 1);
|
|
1037
|
+
var DateFormatError = class extends Error {
|
|
1038
|
+
/** @internal */
|
|
1039
|
+
constructor(msg, token, type) {
|
|
1040
|
+
super(msg);
|
|
1041
|
+
this.token = token;
|
|
1042
|
+
this.type = type || "error";
|
|
1043
|
+
}
|
|
1044
|
+
};
|
|
1045
|
+
var alpha = (width) => width < 4 ? "short" : width === 4 ? "long" : "narrow";
|
|
1046
|
+
var numeric = (width) => width % 2 === 0 ? "2-digit" : "numeric";
|
|
1047
|
+
function yearOptions(token, onError) {
|
|
1048
|
+
switch (token.char) {
|
|
1049
|
+
case "y":
|
|
1050
|
+
return { year: numeric(token.width) };
|
|
1051
|
+
case "r":
|
|
1052
|
+
return { calendar: "gregory", year: "numeric" };
|
|
1053
|
+
case "u":
|
|
1054
|
+
case "U":
|
|
1055
|
+
case "Y":
|
|
1056
|
+
default:
|
|
1057
|
+
onError(`${token.desc} is not supported; falling back to year:numeric`, DateFormatError.WARNING);
|
|
1058
|
+
return { year: "numeric" };
|
|
1059
|
+
}
|
|
1060
|
+
}
|
|
1061
|
+
function monthStyle(token, onError) {
|
|
1062
|
+
switch (token.width) {
|
|
1063
|
+
case 1:
|
|
1064
|
+
return "numeric";
|
|
1065
|
+
case 2:
|
|
1066
|
+
return "2-digit";
|
|
1067
|
+
case 3:
|
|
1068
|
+
return "short";
|
|
1069
|
+
case 4:
|
|
1070
|
+
return "long";
|
|
1071
|
+
case 5:
|
|
1072
|
+
return "narrow";
|
|
1073
|
+
default:
|
|
1074
|
+
onError(`${token.desc} is not supported with width ${token.width}`);
|
|
1075
|
+
return void 0;
|
|
1076
|
+
}
|
|
1077
|
+
}
|
|
1078
|
+
function dayStyle(token, onError) {
|
|
1079
|
+
const { char, desc, width } = token;
|
|
1080
|
+
if (char === "d") {
|
|
1081
|
+
return numeric(width);
|
|
1082
|
+
} else {
|
|
1083
|
+
onError(`${desc} is not supported`);
|
|
1084
|
+
return void 0;
|
|
1085
|
+
}
|
|
1086
|
+
}
|
|
1087
|
+
function weekdayStyle(token, onError) {
|
|
1088
|
+
const { char, desc, width } = token;
|
|
1089
|
+
if ((char === "c" || char === "e") && width < 3) {
|
|
1090
|
+
const msg = `Numeric value is not supported for ${desc}; falling back to weekday:short`;
|
|
1091
|
+
onError(msg, DateFormatError.WARNING);
|
|
1092
|
+
}
|
|
1093
|
+
return alpha(width);
|
|
1094
|
+
}
|
|
1095
|
+
function hourOptions(token) {
|
|
1096
|
+
const hour = numeric(token.width);
|
|
1097
|
+
let hourCycle;
|
|
1098
|
+
switch (token.char) {
|
|
1099
|
+
case "h":
|
|
1100
|
+
hourCycle = "h12";
|
|
1101
|
+
break;
|
|
1102
|
+
case "H":
|
|
1103
|
+
hourCycle = "h23";
|
|
1104
|
+
break;
|
|
1105
|
+
case "k":
|
|
1106
|
+
hourCycle = "h24";
|
|
1107
|
+
break;
|
|
1108
|
+
case "K":
|
|
1109
|
+
hourCycle = "h11";
|
|
1110
|
+
break;
|
|
1111
|
+
}
|
|
1112
|
+
return hourCycle ? { hour, hourCycle } : { hour };
|
|
1113
|
+
}
|
|
1114
|
+
function timeZoneNameStyle(token, onError) {
|
|
1115
|
+
const { char, desc, width } = token;
|
|
1116
|
+
switch (char) {
|
|
1117
|
+
case "v":
|
|
1118
|
+
case "z":
|
|
1119
|
+
return width === 4 ? "long" : "short";
|
|
1120
|
+
case "V":
|
|
1121
|
+
if (width === 4)
|
|
1122
|
+
return "long";
|
|
1123
|
+
onError(`${desc} is not supported with width ${width}`);
|
|
1124
|
+
return void 0;
|
|
1125
|
+
case "X":
|
|
1126
|
+
onError(`${desc} is not supported`);
|
|
1127
|
+
return void 0;
|
|
1128
|
+
}
|
|
1129
|
+
return "short";
|
|
1130
|
+
}
|
|
1131
|
+
function compileOptions(token, onError) {
|
|
1132
|
+
switch (token.field) {
|
|
1133
|
+
case "era":
|
|
1134
|
+
return { era: alpha(token.width) };
|
|
1135
|
+
case "year":
|
|
1136
|
+
return yearOptions(token, onError);
|
|
1137
|
+
case "month":
|
|
1138
|
+
return { month: monthStyle(token, onError) };
|
|
1139
|
+
case "day":
|
|
1140
|
+
return { day: dayStyle(token, onError) };
|
|
1141
|
+
case "weekday":
|
|
1142
|
+
return { weekday: weekdayStyle(token, onError) };
|
|
1143
|
+
case "period":
|
|
1144
|
+
return void 0;
|
|
1145
|
+
case "hour":
|
|
1146
|
+
return hourOptions(token);
|
|
1147
|
+
case "min":
|
|
1148
|
+
return { minute: numeric(token.width) };
|
|
1149
|
+
case "sec":
|
|
1150
|
+
return { second: numeric(token.width) };
|
|
1151
|
+
case "tz":
|
|
1152
|
+
return { timeZoneName: timeZoneNameStyle(token, onError) };
|
|
1153
|
+
case "quarter":
|
|
1154
|
+
case "week":
|
|
1155
|
+
case "sec-frac":
|
|
1156
|
+
case "ms":
|
|
1157
|
+
onError(`${token.desc} is not supported`);
|
|
1158
|
+
}
|
|
1159
|
+
return void 0;
|
|
1160
|
+
}
|
|
1161
|
+
function getDateFormatOptions(tokens, timeZone, onError = (error) => {
|
|
1162
|
+
throw error;
|
|
1163
|
+
}) {
|
|
1164
|
+
const options = {
|
|
1165
|
+
timeZone
|
|
1166
|
+
};
|
|
1167
|
+
const fields2 = [];
|
|
1168
|
+
for (const token of tokens) {
|
|
1169
|
+
const { error, field, str } = token;
|
|
1170
|
+
if (error) {
|
|
1171
|
+
const dte = new DateFormatError(error.message, token);
|
|
1172
|
+
dte.stack = error.stack;
|
|
1173
|
+
onError(dte);
|
|
1174
|
+
}
|
|
1175
|
+
if (str) {
|
|
1176
|
+
const msg = `Ignoring string part: ${str}`;
|
|
1177
|
+
onError(new DateFormatError(msg, token, DateFormatError.WARNING));
|
|
1178
|
+
}
|
|
1179
|
+
if (field) {
|
|
1180
|
+
if (fields2.indexOf(field) === -1)
|
|
1181
|
+
fields2.push(field);
|
|
1182
|
+
else
|
|
1183
|
+
onError(new DateFormatError(`Duplicate ${field} token`, token));
|
|
1184
|
+
}
|
|
1185
|
+
const opt = compileOptions(token, (msg, isWarning) => onError(new DateFormatError(msg, token, isWarning)));
|
|
1186
|
+
if (opt)
|
|
1187
|
+
Object.assign(options, opt);
|
|
1188
|
+
}
|
|
1189
|
+
return options;
|
|
1190
|
+
}
|
|
1191
|
+
var fields = {
|
|
1192
|
+
G: { field: "era", desc: "Era" },
|
|
1193
|
+
y: { field: "year", desc: "Year" },
|
|
1194
|
+
Y: { field: "year", desc: 'Year of "Week of Year"' },
|
|
1195
|
+
u: { field: "year", desc: "Extended year" },
|
|
1196
|
+
U: { field: "year", desc: "Cyclic year name" },
|
|
1197
|
+
r: { field: "year", desc: "Related Gregorian year" },
|
|
1198
|
+
Q: { field: "quarter", desc: "Quarter" },
|
|
1199
|
+
q: { field: "quarter", desc: "Stand-alone quarter" },
|
|
1200
|
+
M: { field: "month", desc: "Month in year" },
|
|
1201
|
+
L: { field: "month", desc: "Stand-alone month in year" },
|
|
1202
|
+
w: { field: "week", desc: "Week of year" },
|
|
1203
|
+
W: { field: "week", desc: "Week of month" },
|
|
1204
|
+
d: { field: "day", desc: "Day in month" },
|
|
1205
|
+
D: { field: "day", desc: "Day of year" },
|
|
1206
|
+
F: { field: "day", desc: "Day of week in month" },
|
|
1207
|
+
g: { field: "day", desc: "Modified julian day" },
|
|
1208
|
+
E: { field: "weekday", desc: "Day of week" },
|
|
1209
|
+
e: { field: "weekday", desc: "Local day of week" },
|
|
1210
|
+
c: { field: "weekday", desc: "Stand-alone local day of week" },
|
|
1211
|
+
a: { field: "period", desc: "AM/PM marker" },
|
|
1212
|
+
b: { field: "period", desc: "AM/PM/noon/midnight marker" },
|
|
1213
|
+
B: { field: "period", desc: "Flexible day period" },
|
|
1214
|
+
h: { field: "hour", desc: "Hour in AM/PM (1~12)" },
|
|
1215
|
+
H: { field: "hour", desc: "Hour in day (0~23)" },
|
|
1216
|
+
k: { field: "hour", desc: "Hour in day (1~24)" },
|
|
1217
|
+
K: { field: "hour", desc: "Hour in AM/PM (0~11)" },
|
|
1218
|
+
j: { field: "hour", desc: "Hour in preferred cycle" },
|
|
1219
|
+
J: { field: "hour", desc: "Hour in preferred cycle without marker" },
|
|
1220
|
+
C: { field: "hour", desc: "Hour in preferred cycle with flexible marker" },
|
|
1221
|
+
m: { field: "min", desc: "Minute in hour" },
|
|
1222
|
+
s: { field: "sec", desc: "Second in minute" },
|
|
1223
|
+
S: { field: "sec-frac", desc: "Fractional second" },
|
|
1224
|
+
A: { field: "ms", desc: "Milliseconds in day" },
|
|
1225
|
+
z: { field: "tz", desc: "Time Zone: specific non-location" },
|
|
1226
|
+
Z: { field: "tz", desc: "Time Zone" },
|
|
1227
|
+
O: { field: "tz", desc: "Time Zone: localized" },
|
|
1228
|
+
v: { field: "tz", desc: "Time Zone: generic non-location" },
|
|
1229
|
+
V: { field: "tz", desc: "Time Zone: ID" },
|
|
1230
|
+
X: { field: "tz", desc: "Time Zone: ISO8601 with Z" },
|
|
1231
|
+
x: { field: "tz", desc: "Time Zone: ISO8601" }
|
|
1232
|
+
};
|
|
1233
|
+
var isLetter = (char) => char >= "A" && char <= "Z" || char >= "a" && char <= "z";
|
|
1234
|
+
function readFieldToken(src, pos) {
|
|
1235
|
+
const char = src[pos];
|
|
1236
|
+
let width = 1;
|
|
1237
|
+
while (src[++pos] === char)
|
|
1238
|
+
++width;
|
|
1239
|
+
const field = fields[char];
|
|
1240
|
+
if (!field) {
|
|
1241
|
+
const msg = `The letter ${char} is not a valid field identifier`;
|
|
1242
|
+
return { char, error: new Error(msg), width };
|
|
1243
|
+
}
|
|
1244
|
+
return { char, field: field.field, desc: field.desc, width };
|
|
1245
|
+
}
|
|
1246
|
+
function readQuotedToken(src, pos) {
|
|
1247
|
+
let str = src[++pos];
|
|
1248
|
+
let width = 2;
|
|
1249
|
+
if (str === "'")
|
|
1250
|
+
return { char: "'", str, width };
|
|
1251
|
+
while (true) {
|
|
1252
|
+
const next = src[++pos];
|
|
1253
|
+
++width;
|
|
1254
|
+
if (next === void 0) {
|
|
1255
|
+
const msg = `Unterminated quoted literal in pattern: ${str || src}`;
|
|
1256
|
+
return { char: "'", error: new Error(msg), str, width };
|
|
1257
|
+
} else if (next === "'") {
|
|
1258
|
+
if (src[++pos] !== "'")
|
|
1259
|
+
return { char: "'", str, width };
|
|
1260
|
+
else
|
|
1261
|
+
++width;
|
|
1262
|
+
}
|
|
1263
|
+
str += next;
|
|
1264
|
+
}
|
|
1265
|
+
}
|
|
1266
|
+
function readToken(src, pos) {
|
|
1267
|
+
const char = src[pos];
|
|
1268
|
+
if (!char)
|
|
1269
|
+
return null;
|
|
1270
|
+
if (isLetter(char))
|
|
1271
|
+
return readFieldToken(src, pos);
|
|
1272
|
+
if (char === "'")
|
|
1273
|
+
return readQuotedToken(src, pos);
|
|
1274
|
+
let str = char;
|
|
1275
|
+
let width = 1;
|
|
1276
|
+
while (true) {
|
|
1277
|
+
const next = src[++pos];
|
|
1278
|
+
if (!next || isLetter(next) || next === "'")
|
|
1279
|
+
return { char, str, width };
|
|
1280
|
+
str += next;
|
|
1281
|
+
width += 1;
|
|
1282
|
+
}
|
|
1283
|
+
}
|
|
1284
|
+
function parseDateTokens(src) {
|
|
1285
|
+
const tokens = [];
|
|
1286
|
+
let pos = 0;
|
|
1287
|
+
while (true) {
|
|
1288
|
+
const token = readToken(src, pos);
|
|
1289
|
+
if (!token)
|
|
1290
|
+
return tokens;
|
|
1291
|
+
tokens.push(token);
|
|
1292
|
+
pos += token.width;
|
|
1293
|
+
}
|
|
1294
|
+
}
|
|
1037
1295
|
function processTokens(tokens, mapText) {
|
|
1038
1296
|
if (!tokens.filter((token) => token.type !== "content").length) {
|
|
1039
1297
|
return tokens.map((token) => mapText(token.value));
|
|
@@ -1048,6 +1306,12 @@ function processTokens(tokens, mapText) {
|
|
|
1048
1306
|
return [token.arg];
|
|
1049
1307
|
} else if (token.type === "function") {
|
|
1050
1308
|
const _param = (_a = token == null ? void 0 : token.param) == null ? void 0 : _a[0];
|
|
1309
|
+
if (token.key === "date" && _param) {
|
|
1310
|
+
const opts = compileDateExpression(_param.value.trim(), (e) => {
|
|
1311
|
+
throw new Error(`Unable to compile date expression: ${e.message}`);
|
|
1312
|
+
});
|
|
1313
|
+
return [token.arg, token.key, opts];
|
|
1314
|
+
}
|
|
1051
1315
|
if (_param) {
|
|
1052
1316
|
return [token.arg, token.key, _param.value.trim()];
|
|
1053
1317
|
} else {
|
|
@@ -1069,6 +1333,13 @@ function processTokens(tokens, mapText) {
|
|
|
1069
1333
|
];
|
|
1070
1334
|
});
|
|
1071
1335
|
}
|
|
1336
|
+
function compileDateExpression(format, onError) {
|
|
1337
|
+
if (/^::/.test(format)) {
|
|
1338
|
+
const tokens = parseDateTokens(format.substring(2));
|
|
1339
|
+
return getDateFormatOptions(tokens, void 0, onError);
|
|
1340
|
+
}
|
|
1341
|
+
return format;
|
|
1342
|
+
}
|
|
1072
1343
|
function compileMessage(message, mapText = (v) => v) {
|
|
1073
1344
|
try {
|
|
1074
1345
|
return processTokens((0, import_parser.parse)(message), mapText);
|
|
@@ -1080,7 +1351,7 @@ Message: ${message}`);
|
|
|
1080
1351
|
}
|
|
1081
1352
|
}
|
|
1082
1353
|
|
|
1083
|
-
// node_modules/.pnpm/@lingui+core@5.
|
|
1354
|
+
// node_modules/.pnpm/@lingui+core@5.2.0_@lingui+babel-plugin-lingui-macro@5.2.0_babel-plugin-macros@3.1.0_typescri_qfhfd5z2jpd4amxt2golzdalsi/node_modules/@lingui/core/dist/index.mjs
|
|
1084
1355
|
var isString = (s) => typeof s === "string";
|
|
1085
1356
|
var isFunction = (f) => typeof f === "function";
|
|
1086
1357
|
var cache = /* @__PURE__ */ new Map();
|
|
@@ -1091,12 +1362,59 @@ function normalizeLocales(locales) {
|
|
|
1091
1362
|
}
|
|
1092
1363
|
function date(locales, value, format) {
|
|
1093
1364
|
const _locales = normalizeLocales(locales);
|
|
1365
|
+
if (!format) {
|
|
1366
|
+
format = "default";
|
|
1367
|
+
}
|
|
1368
|
+
let o;
|
|
1369
|
+
if (typeof format === "string") {
|
|
1370
|
+
o = {
|
|
1371
|
+
day: "numeric",
|
|
1372
|
+
month: "short",
|
|
1373
|
+
year: "numeric"
|
|
1374
|
+
};
|
|
1375
|
+
switch (format) {
|
|
1376
|
+
case "full":
|
|
1377
|
+
o.weekday = "long";
|
|
1378
|
+
case "long":
|
|
1379
|
+
o.month = "long";
|
|
1380
|
+
break;
|
|
1381
|
+
case "short":
|
|
1382
|
+
o.month = "numeric";
|
|
1383
|
+
break;
|
|
1384
|
+
}
|
|
1385
|
+
} else {
|
|
1386
|
+
o = format;
|
|
1387
|
+
}
|
|
1094
1388
|
const formatter = getMemoized(
|
|
1095
1389
|
() => cacheKey("date", _locales, format),
|
|
1096
|
-
() => new Intl.DateTimeFormat(_locales,
|
|
1390
|
+
() => new Intl.DateTimeFormat(_locales, o)
|
|
1097
1391
|
);
|
|
1098
1392
|
return formatter.format(isString(value) ? new Date(value) : value);
|
|
1099
1393
|
}
|
|
1394
|
+
function time(locales, value, format) {
|
|
1395
|
+
let o;
|
|
1396
|
+
if (!format) {
|
|
1397
|
+
format = "default";
|
|
1398
|
+
}
|
|
1399
|
+
if (typeof format === "string") {
|
|
1400
|
+
o = {
|
|
1401
|
+
second: "numeric",
|
|
1402
|
+
minute: "numeric",
|
|
1403
|
+
hour: "numeric"
|
|
1404
|
+
};
|
|
1405
|
+
switch (format) {
|
|
1406
|
+
case "full":
|
|
1407
|
+
case "long":
|
|
1408
|
+
o.timeZoneName = "short";
|
|
1409
|
+
break;
|
|
1410
|
+
case "short":
|
|
1411
|
+
delete o.second;
|
|
1412
|
+
}
|
|
1413
|
+
} else {
|
|
1414
|
+
o = format;
|
|
1415
|
+
}
|
|
1416
|
+
return date(locales, value, o);
|
|
1417
|
+
}
|
|
1100
1418
|
function number(locales, value, format) {
|
|
1101
1419
|
const _locales = normalizeLocales(locales);
|
|
1102
1420
|
const formatter = getMemoized(
|
|
@@ -1136,7 +1454,9 @@ var OCTOTHORPE_PH = "%__lingui_octothorpe__%";
|
|
|
1136
1454
|
var getDefaultFormats = (locale, passedLocales, formats = {}) => {
|
|
1137
1455
|
const locales = passedLocales || locale;
|
|
1138
1456
|
const style = (format) => {
|
|
1139
|
-
|
|
1457
|
+
if (typeof format === "object")
|
|
1458
|
+
return format;
|
|
1459
|
+
return formats[format];
|
|
1140
1460
|
};
|
|
1141
1461
|
const replaceOctothorpe = (value, message) => {
|
|
1142
1462
|
const numberFormat = Object.keys(formats).length ? style("number") : void 0;
|
|
@@ -1155,8 +1475,13 @@ var getDefaultFormats = (locale, passedLocales, formats = {}) => {
|
|
|
1155
1475
|
return replaceOctothorpe(value - offset3, message);
|
|
1156
1476
|
},
|
|
1157
1477
|
select: selectFormatter,
|
|
1158
|
-
number: (value, format) => number(
|
|
1159
|
-
|
|
1478
|
+
number: (value, format) => number(
|
|
1479
|
+
locales,
|
|
1480
|
+
value,
|
|
1481
|
+
style(format) || { style: format }
|
|
1482
|
+
),
|
|
1483
|
+
date: (value, format) => date(locales, value, style(format) || format),
|
|
1484
|
+
time: (value, format) => time(locales, value, style(format) || format)
|
|
1160
1485
|
};
|
|
1161
1486
|
};
|
|
1162
1487
|
var selectFormatter = (value, rules) => {
|
|
@@ -1205,10 +1530,10 @@ function interpolate(translation, locale, locales) {
|
|
|
1205
1530
|
};
|
|
1206
1531
|
const result = formatMessage(translation);
|
|
1207
1532
|
if (isString(result) && UNICODE_REGEX.test(result)) {
|
|
1208
|
-
return (0, import_unraw.unraw)(result
|
|
1533
|
+
return (0, import_unraw.unraw)(result);
|
|
1209
1534
|
}
|
|
1210
1535
|
if (isString(result))
|
|
1211
|
-
return result
|
|
1536
|
+
return result;
|
|
1212
1537
|
return result ? String(result) : "";
|
|
1213
1538
|
};
|
|
1214
1539
|
}
|
|
@@ -1325,9 +1650,8 @@ var I18n = class extends EventEmitter {
|
|
|
1325
1650
|
/**
|
|
1326
1651
|
* @deprecated Plurals automatically used from Intl.PluralRules you can safely remove this call. Deprecated in v4
|
|
1327
1652
|
*/
|
|
1328
|
-
// @ts-ignore deprecated, so ignore the reported error
|
|
1329
1653
|
loadLocaleData(localeOrAllData, localeData) {
|
|
1330
|
-
if (
|
|
1654
|
+
if (typeof localeOrAllData === "string") {
|
|
1331
1655
|
this._loadLocaleData(localeOrAllData, localeData);
|
|
1332
1656
|
} else {
|
|
1333
1657
|
Object.keys(localeOrAllData).forEach(
|
|
@@ -1374,6 +1698,11 @@ var I18n = class extends EventEmitter {
|
|
|
1374
1698
|
this.emit("change");
|
|
1375
1699
|
}
|
|
1376
1700
|
_(id, values, options) {
|
|
1701
|
+
if (!this.locale) {
|
|
1702
|
+
throw new Error(
|
|
1703
|
+
"Lingui: Attempted to call a translation function without setting a locale.\nMake sure to call `i18n.activate(locale)` before using Lingui functions.\nThis issue may also occur due to a race condition in your initialization logic."
|
|
1704
|
+
);
|
|
1705
|
+
}
|
|
1377
1706
|
let message = options == null ? void 0 : options.message;
|
|
1378
1707
|
if (!id) {
|
|
1379
1708
|
id = "";
|
|
@@ -2952,7 +3281,7 @@ async function useRecompute(state) {
|
|
|
2952
3281
|
return state;
|
|
2953
3282
|
}
|
|
2954
3283
|
|
|
2955
|
-
// node_modules/.pnpm/@warp-ds+css@2.
|
|
3284
|
+
// node_modules/.pnpm/@warp-ds+css@2.1.1_@warp-ds+uno@2.1.0_unocss@0.62.0_postcss@8.5.1_rollup@4.32.1_vite@5.3.3_@t_sgrraibu65gdmqpe655kfrpl6a/node_modules/@warp-ds/css/component-classes/index.js
|
|
2956
3285
|
var buttonDefaultStyling = "font-bold focusable justify-center transition-colors ease-in-out";
|
|
2957
3286
|
var buttonColors = {
|
|
2958
3287
|
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]",
|
|
@@ -3255,7 +3584,7 @@ var messages4 = JSON.parse('{"attention.aria.callout":["Gr\xF8nn taleboble som i
|
|
|
3255
3584
|
// packages/attention/locales/sv/messages.mjs
|
|
3256
3585
|
var messages5 = JSON.parse('{"attention.aria.callout":["En gr\xF6n pratbubbla som introducerar n\xE5got nytt"],"attention.aria.close":["St\xE4ng"],"attention.aria.highlight":["En pratbubbla med viktig information"],"attention.aria.pointingDown":["pekar ned"],"attention.aria.pointingLeft":["pekar v\xE4nster"],"attention.aria.pointingRight":["pekar h\xF6ger"],"attention.aria.pointingUp":["pekar upp"],"attention.aria.popover":["En vit pratbubbla som ger ytterligare information"],"attention.aria.tooltip":["En svart pratbubbla som ger kompletterande information"]}');
|
|
3257
3586
|
|
|
3258
|
-
// node_modules/.pnpm/@warp-ds+icons@2.5.
|
|
3587
|
+
// node_modules/.pnpm/@warp-ds+icons@2.5.0_@lingui+core@5.2.0_@lingui+babel-plugin-lingui-macro@5.2.0_babel-plugin-_hyhbgchrkasknlbocfng7geeci/node_modules/@warp-ds/icons/dist/elements/close-16.js
|
|
3259
3588
|
import { LitElement } from "lit";
|
|
3260
3589
|
import { unsafeStatic, html } from "lit/static-html.js";
|
|
3261
3590
|
var messages6 = JSON.parse('{"icon.title.close":["Kryss"]}');
|