@warp-ds/elements 2.1.0 → 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 +572 -156
- package/dist/index.js.map +4 -4
- package/dist/packages/affix/index.js +416 -45
- package/dist/packages/affix/index.js.map +4 -4
- package/dist/packages/alert/index.js +428 -57
- package/dist/packages/alert/index.js.map +4 -4
- package/dist/packages/attention/index.js +487 -71
- 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 +409 -38
- package/dist/packages/breadcrumbs/index.js.map +4 -4
- package/dist/packages/button/index.js +408 -37
- package/dist/packages/button/index.js.map +4 -4
- package/dist/packages/card/index.js +408 -37
- package/dist/packages/card/index.js.map +4 -4
- package/dist/packages/expandable/index.js +416 -45
- package/dist/packages/expandable/index.js.map +4 -4
- package/dist/packages/modal/index.js +420 -49
- package/dist/packages/modal/index.js.map +4 -4
- package/dist/packages/pill/index.js +415 -44
- package/dist/packages/pill/index.js.map +4 -4
- package/dist/packages/select/index.js +414 -43
- 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 +432 -61
- package/dist/packages/toast/index.js.map +4 -4
- package/package.json +13 -12
|
@@ -726,9 +726,9 @@ var require_moo = __commonJS({
|
|
|
726
726
|
}
|
|
727
727
|
});
|
|
728
728
|
|
|
729
|
-
// node_modules/.pnpm/@messageformat+parser@5.1.
|
|
729
|
+
// node_modules/.pnpm/@messageformat+parser@5.1.1/node_modules/@messageformat/parser/lib/lexer.js
|
|
730
730
|
var require_lexer = __commonJS({
|
|
731
|
-
"node_modules/.pnpm/@messageformat+parser@5.1.
|
|
731
|
+
"node_modules/.pnpm/@messageformat+parser@5.1.1/node_modules/@messageformat/parser/lib/lexer.js"(exports) {
|
|
732
732
|
"use strict";
|
|
733
733
|
var __importDefault = exports && exports.__importDefault || function(mod) {
|
|
734
734
|
return mod && mod.__esModule ? mod : { "default": mod };
|
|
@@ -741,7 +741,7 @@ var require_lexer = __commonJS({
|
|
|
741
741
|
doubleapos: { match: "''", value: () => "'" },
|
|
742
742
|
quoted: {
|
|
743
743
|
lineBreaks: true,
|
|
744
|
-
match: /'[{}#](?:[^]
|
|
744
|
+
match: /'[{}#](?:[^']|'')*'(?!')/u,
|
|
745
745
|
value: (src) => src.slice(1, -1).replace(/''/g, "'")
|
|
746
746
|
},
|
|
747
747
|
argument: {
|
|
@@ -793,12 +793,13 @@ var require_lexer = __commonJS({
|
|
|
793
793
|
}
|
|
794
794
|
});
|
|
795
795
|
|
|
796
|
-
// node_modules/.pnpm/@messageformat+parser@5.1.
|
|
796
|
+
// node_modules/.pnpm/@messageformat+parser@5.1.1/node_modules/@messageformat/parser/lib/parser.js
|
|
797
797
|
var require_parser = __commonJS({
|
|
798
|
-
"node_modules/.pnpm/@messageformat+parser@5.1.
|
|
798
|
+
"node_modules/.pnpm/@messageformat+parser@5.1.1/node_modules/@messageformat/parser/lib/parser.js"(exports) {
|
|
799
799
|
"use strict";
|
|
800
800
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
801
|
-
exports.
|
|
801
|
+
exports.ParseError = void 0;
|
|
802
|
+
exports.parse = parse2;
|
|
802
803
|
var lexer_js_1 = require_lexer();
|
|
803
804
|
var getContext = (lt) => ({
|
|
804
805
|
offset: lt.offset,
|
|
@@ -864,8 +865,9 @@ var require_parser = __commonJS({
|
|
|
864
865
|
}
|
|
865
866
|
checkSelectKey(lt, type, key) {
|
|
866
867
|
if (key[0] === "=") {
|
|
867
|
-
if (type === "select")
|
|
868
|
+
if (type === "select") {
|
|
868
869
|
throw new ParseError(lt, `The case ${key} is not valid with select`);
|
|
870
|
+
}
|
|
869
871
|
} else if (type !== "select") {
|
|
870
872
|
const keys = type === "plural" ? this.cardinalKeys : this.ordinalKeys;
|
|
871
873
|
if (this.strictPluralKeys && keys.length > 0 && !keys.includes(key)) {
|
|
@@ -883,10 +885,12 @@ var require_parser = __commonJS({
|
|
|
883
885
|
for (const lt of this.lexer) {
|
|
884
886
|
switch (lt.type) {
|
|
885
887
|
case "offset":
|
|
886
|
-
if (type === "select")
|
|
888
|
+
if (type === "select") {
|
|
887
889
|
throw new ParseError(lt, "Unexpected plural offset for select");
|
|
888
|
-
|
|
890
|
+
}
|
|
891
|
+
if (sel.cases.length > 0) {
|
|
889
892
|
throw new ParseError(lt, "Plural offset must be set before cases");
|
|
893
|
+
}
|
|
890
894
|
sel.pluralOffset = Number(lt.value);
|
|
891
895
|
ctx.text += lt.text;
|
|
892
896
|
ctx.lineBreaks += lt.lineBreaks;
|
|
@@ -926,11 +930,13 @@ var require_parser = __commonJS({
|
|
|
926
930
|
const end = this.lexer.next();
|
|
927
931
|
if (!end)
|
|
928
932
|
throw new ParseError(null, "Unexpected message end");
|
|
929
|
-
if (end.type !== "end")
|
|
933
|
+
if (end.type !== "end") {
|
|
930
934
|
throw new ParseError(end, `Unexpected lexer token: ${end.type}`);
|
|
935
|
+
}
|
|
931
936
|
ctx.text += end.text;
|
|
932
|
-
if (isSelectType(argType.value.toLowerCase()))
|
|
937
|
+
if (isSelectType(argType.value.toLowerCase())) {
|
|
933
938
|
throw new ParseError(argType, `Invalid type identifier: ${argType.value}`);
|
|
939
|
+
}
|
|
934
940
|
return {
|
|
935
941
|
type: "function",
|
|
936
942
|
arg: lt.value,
|
|
@@ -944,8 +950,9 @@ var require_parser = __commonJS({
|
|
|
944
950
|
throw new ParseError(argType, msg);
|
|
945
951
|
}
|
|
946
952
|
let param = this.parseBody(this.strict ? false : inPlural);
|
|
947
|
-
if (this.strict && param.length > 0)
|
|
953
|
+
if (this.strict && param.length > 0) {
|
|
948
954
|
param = strictArgStyleParam(lt, param);
|
|
955
|
+
}
|
|
949
956
|
return {
|
|
950
957
|
type: "function",
|
|
951
958
|
arg: lt.value,
|
|
@@ -955,10 +962,11 @@ var require_parser = __commonJS({
|
|
|
955
962
|
};
|
|
956
963
|
}
|
|
957
964
|
case "select":
|
|
958
|
-
if (isSelectType(argType.value))
|
|
965
|
+
if (isSelectType(argType.value)) {
|
|
959
966
|
return this.parseSelect(lt, inPlural, ctx, argType.value);
|
|
960
|
-
else
|
|
967
|
+
} else {
|
|
961
968
|
throw new ParseError(argType, `Unexpected select type ${argType.value}`);
|
|
969
|
+
}
|
|
962
970
|
default:
|
|
963
971
|
throw new ParseError(argType, `Unexpected lexer token: ${argType.type}`);
|
|
964
972
|
}
|
|
@@ -1005,7 +1013,6 @@ var require_parser = __commonJS({
|
|
|
1005
1013
|
const parser = new Parser(src, options);
|
|
1006
1014
|
return parser.parse();
|
|
1007
1015
|
}
|
|
1008
|
-
exports.parse = parse2;
|
|
1009
1016
|
}
|
|
1010
1017
|
});
|
|
1011
1018
|
|
|
@@ -1022,14 +1029,272 @@ var r = function() {
|
|
|
1022
1029
|
}, []).join(" ");
|
|
1023
1030
|
};
|
|
1024
1031
|
|
|
1025
|
-
// node_modules/.pnpm/@lingui+core@
|
|
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
|
|
1026
1033
|
var import_unraw = __toESM(require_dist(), 1);
|
|
1027
1034
|
|
|
1028
|
-
// node_modules/.pnpm/@lingui+message-utils@
|
|
1035
|
+
// node_modules/.pnpm/@lingui+message-utils@5.2.0/node_modules/@lingui/message-utils/dist/compileMessage.mjs
|
|
1029
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
|
+
}
|
|
1030
1295
|
function processTokens(tokens, mapText) {
|
|
1031
1296
|
if (!tokens.filter((token) => token.type !== "content").length) {
|
|
1032
|
-
return tokens.map((token) => mapText(token.value))
|
|
1297
|
+
return tokens.map((token) => mapText(token.value));
|
|
1033
1298
|
}
|
|
1034
1299
|
return tokens.map((token) => {
|
|
1035
1300
|
var _a;
|
|
@@ -1041,6 +1306,12 @@ function processTokens(tokens, mapText) {
|
|
|
1041
1306
|
return [token.arg];
|
|
1042
1307
|
} else if (token.type === "function") {
|
|
1043
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
|
+
}
|
|
1044
1315
|
if (_param) {
|
|
1045
1316
|
return [token.arg, token.key, _param.value.trim()];
|
|
1046
1317
|
} else {
|
|
@@ -1062,6 +1333,13 @@ function processTokens(tokens, mapText) {
|
|
|
1062
1333
|
];
|
|
1063
1334
|
});
|
|
1064
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
|
+
}
|
|
1065
1343
|
function compileMessage(message, mapText = (v) => v) {
|
|
1066
1344
|
try {
|
|
1067
1345
|
return processTokens((0, import_parser.parse)(message), mapText);
|
|
@@ -1069,11 +1347,11 @@ function compileMessage(message, mapText = (v) => v) {
|
|
|
1069
1347
|
console.error(`${e.message}
|
|
1070
1348
|
|
|
1071
1349
|
Message: ${message}`);
|
|
1072
|
-
return message;
|
|
1350
|
+
return [message];
|
|
1073
1351
|
}
|
|
1074
1352
|
}
|
|
1075
1353
|
|
|
1076
|
-
// node_modules/.pnpm/@lingui+core@
|
|
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
|
|
1077
1355
|
var isString = (s) => typeof s === "string";
|
|
1078
1356
|
var isFunction = (f) => typeof f === "function";
|
|
1079
1357
|
var cache = /* @__PURE__ */ new Map();
|
|
@@ -1084,12 +1362,59 @@ function normalizeLocales(locales) {
|
|
|
1084
1362
|
}
|
|
1085
1363
|
function date(locales, value, format) {
|
|
1086
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
|
+
}
|
|
1087
1388
|
const formatter = getMemoized(
|
|
1088
1389
|
() => cacheKey("date", _locales, format),
|
|
1089
|
-
() => new Intl.DateTimeFormat(_locales,
|
|
1390
|
+
() => new Intl.DateTimeFormat(_locales, o)
|
|
1090
1391
|
);
|
|
1091
1392
|
return formatter.format(isString(value) ? new Date(value) : value);
|
|
1092
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
|
+
}
|
|
1093
1418
|
function number(locales, value, format) {
|
|
1094
1419
|
const _locales = normalizeLocales(locales);
|
|
1095
1420
|
const formatter = getMemoized(
|
|
@@ -1124,12 +1449,14 @@ function cacheKey(type, locales, options) {
|
|
|
1124
1449
|
const localeKey = locales.join("-");
|
|
1125
1450
|
return `${type}-${localeKey}-${JSON.stringify(options)}`;
|
|
1126
1451
|
}
|
|
1127
|
-
var UNICODE_REGEX = /\\u[a-fA-F0-9]{4}|\\x[a-fA-F0-9]{2}
|
|
1452
|
+
var UNICODE_REGEX = /\\u[a-fA-F0-9]{4}|\\x[a-fA-F0-9]{2}/;
|
|
1128
1453
|
var OCTOTHORPE_PH = "%__lingui_octothorpe__%";
|
|
1129
1454
|
var getDefaultFormats = (locale, passedLocales, formats = {}) => {
|
|
1130
1455
|
const locales = passedLocales || locale;
|
|
1131
1456
|
const style = (format) => {
|
|
1132
|
-
|
|
1457
|
+
if (typeof format === "object")
|
|
1458
|
+
return format;
|
|
1459
|
+
return formats[format];
|
|
1133
1460
|
};
|
|
1134
1461
|
const replaceOctothorpe = (value, message) => {
|
|
1135
1462
|
const numberFormat = Object.keys(formats).length ? style("number") : void 0;
|
|
@@ -1148,8 +1475,13 @@ var getDefaultFormats = (locale, passedLocales, formats = {}) => {
|
|
|
1148
1475
|
return replaceOctothorpe(value - offset3, message);
|
|
1149
1476
|
},
|
|
1150
1477
|
select: selectFormatter,
|
|
1151
|
-
number: (value, format) => number(
|
|
1152
|
-
|
|
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)
|
|
1153
1485
|
};
|
|
1154
1486
|
};
|
|
1155
1487
|
var selectFormatter = (value, rules) => {
|
|
@@ -1198,10 +1530,10 @@ function interpolate(translation, locale, locales) {
|
|
|
1198
1530
|
};
|
|
1199
1531
|
const result = formatMessage(translation);
|
|
1200
1532
|
if (isString(result) && UNICODE_REGEX.test(result)) {
|
|
1201
|
-
return (0, import_unraw.unraw)(result
|
|
1533
|
+
return (0, import_unraw.unraw)(result);
|
|
1202
1534
|
}
|
|
1203
1535
|
if (isString(result))
|
|
1204
|
-
return result
|
|
1536
|
+
return result;
|
|
1205
1537
|
return result ? String(result) : "";
|
|
1206
1538
|
};
|
|
1207
1539
|
}
|
|
@@ -1256,7 +1588,11 @@ var I18n = class extends EventEmitter {
|
|
|
1256
1588
|
__publicField2(this, "_localeData", {});
|
|
1257
1589
|
__publicField2(this, "_messages", {});
|
|
1258
1590
|
__publicField2(this, "_missing");
|
|
1591
|
+
__publicField2(this, "_messageCompiler");
|
|
1259
1592
|
__publicField2(this, "t", this._.bind(this));
|
|
1593
|
+
if (true) {
|
|
1594
|
+
this.setMessagesCompiler(compileMessage);
|
|
1595
|
+
}
|
|
1260
1596
|
if (params.missing != null)
|
|
1261
1597
|
this._missing = params.missing;
|
|
1262
1598
|
if (params.messages != null)
|
|
@@ -1292,12 +1628,30 @@ var I18n = class extends EventEmitter {
|
|
|
1292
1628
|
Object.assign(maybeLocaleData, localeData);
|
|
1293
1629
|
}
|
|
1294
1630
|
}
|
|
1631
|
+
/**
|
|
1632
|
+
* Registers a `MessageCompiler` to enable the use of uncompiled catalogs at runtime.
|
|
1633
|
+
*
|
|
1634
|
+
* In production builds, the `MessageCompiler` is typically excluded to reduce bundle size.
|
|
1635
|
+
* By default, message catalogs should be precompiled during the build process. However,
|
|
1636
|
+
* if you need to compile catalogs at runtime, you can use this method to set a message compiler.
|
|
1637
|
+
*
|
|
1638
|
+
* Example usage:
|
|
1639
|
+
*
|
|
1640
|
+
* ```ts
|
|
1641
|
+
* import { compileMessage } from "@lingui/message-utils/compileMessage";
|
|
1642
|
+
*
|
|
1643
|
+
* i18n.setMessagesCompiler(compileMessage);
|
|
1644
|
+
* ```
|
|
1645
|
+
*/
|
|
1646
|
+
setMessagesCompiler(compiler) {
|
|
1647
|
+
this._messageCompiler = compiler;
|
|
1648
|
+
return this;
|
|
1649
|
+
}
|
|
1295
1650
|
/**
|
|
1296
1651
|
* @deprecated Plurals automatically used from Intl.PluralRules you can safely remove this call. Deprecated in v4
|
|
1297
1652
|
*/
|
|
1298
|
-
// @ts-ignore deprecated, so ignore the reported error
|
|
1299
1653
|
loadLocaleData(localeOrAllData, localeData) {
|
|
1300
|
-
if (
|
|
1654
|
+
if (typeof localeOrAllData === "string") {
|
|
1301
1655
|
this._loadLocaleData(localeOrAllData, localeData);
|
|
1302
1656
|
} else {
|
|
1303
1657
|
Object.keys(localeOrAllData).forEach(
|
|
@@ -1344,6 +1698,11 @@ var I18n = class extends EventEmitter {
|
|
|
1344
1698
|
this.emit("change");
|
|
1345
1699
|
}
|
|
1346
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
|
+
}
|
|
1347
1706
|
let message = options == null ? void 0 : options.message;
|
|
1348
1707
|
if (!id) {
|
|
1349
1708
|
id = "";
|
|
@@ -1363,8 +1722,20 @@ var I18n = class extends EventEmitter {
|
|
|
1363
1722
|
this.emit("missing", { id, locale: this._locale });
|
|
1364
1723
|
}
|
|
1365
1724
|
let translation = messageForId || message || id;
|
|
1366
|
-
if (
|
|
1367
|
-
|
|
1725
|
+
if (isString(translation)) {
|
|
1726
|
+
if (this._messageCompiler) {
|
|
1727
|
+
translation = this._messageCompiler(translation);
|
|
1728
|
+
} else {
|
|
1729
|
+
console.warn(`Uncompiled message detected! Message:
|
|
1730
|
+
|
|
1731
|
+
> ${translation}
|
|
1732
|
+
|
|
1733
|
+
That means you use raw catalog or your catalog doesn't have a translation for the message and fallback was used.
|
|
1734
|
+
ICU features such as interpolation and plurals will not work properly for that message.
|
|
1735
|
+
|
|
1736
|
+
Please compile your catalog first.
|
|
1737
|
+
`);
|
|
1738
|
+
}
|
|
1368
1739
|
}
|
|
1369
1740
|
if (isString(translation) && UNICODE_REGEX.test(translation))
|
|
1370
1741
|
return JSON.parse(`"${translation}"`);
|
|
@@ -1388,7 +1759,7 @@ function setupI18n(params = {}) {
|
|
|
1388
1759
|
}
|
|
1389
1760
|
var i18n = setupI18n();
|
|
1390
1761
|
|
|
1391
|
-
// node_modules/.pnpm/@floating-ui+utils@0.2.
|
|
1762
|
+
// node_modules/.pnpm/@floating-ui+utils@0.2.9/node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs
|
|
1392
1763
|
var sides = ["top", "right", "bottom", "left"];
|
|
1393
1764
|
var min = Math.min;
|
|
1394
1765
|
var max = Math.max;
|
|
@@ -1517,7 +1888,7 @@ function rectToClientRect(rect) {
|
|
|
1517
1888
|
};
|
|
1518
1889
|
}
|
|
1519
1890
|
|
|
1520
|
-
// node_modules/.pnpm/@floating-ui+core@1.6.
|
|
1891
|
+
// node_modules/.pnpm/@floating-ui+core@1.6.9/node_modules/@floating-ui/core/dist/floating-ui.core.mjs
|
|
1521
1892
|
function computeCoordsFromPlacement(_ref, placement, rtl) {
|
|
1522
1893
|
let {
|
|
1523
1894
|
reference,
|
|
@@ -1959,11 +2330,11 @@ async function convertValueToCoords(state, options) {
|
|
|
1959
2330
|
mainAxis: rawValue,
|
|
1960
2331
|
crossAxis: 0,
|
|
1961
2332
|
alignmentAxis: null
|
|
1962
|
-
} :
|
|
1963
|
-
mainAxis: 0,
|
|
1964
|
-
crossAxis: 0,
|
|
1965
|
-
alignmentAxis:
|
|
1966
|
-
}
|
|
2333
|
+
} : {
|
|
2334
|
+
mainAxis: rawValue.mainAxis || 0,
|
|
2335
|
+
crossAxis: rawValue.crossAxis || 0,
|
|
2336
|
+
alignmentAxis: rawValue.alignmentAxis
|
|
2337
|
+
};
|
|
1967
2338
|
if (alignment && typeof alignmentAxis === "number") {
|
|
1968
2339
|
crossAxis = alignment === "end" ? alignmentAxis * -1 : alignmentAxis;
|
|
1969
2340
|
}
|
|
@@ -2067,7 +2438,11 @@ var shift = function(options) {
|
|
|
2067
2438
|
return __spreadProps(__spreadValues({}, limitedCoords), {
|
|
2068
2439
|
data: {
|
|
2069
2440
|
x: limitedCoords.x - x,
|
|
2070
|
-
y: limitedCoords.y - y
|
|
2441
|
+
y: limitedCoords.y - y,
|
|
2442
|
+
enabled: {
|
|
2443
|
+
[mainAxis]: checkMainAxis,
|
|
2444
|
+
[crossAxis]: checkCrossAxis
|
|
2445
|
+
}
|
|
2071
2446
|
}
|
|
2072
2447
|
});
|
|
2073
2448
|
}
|
|
@@ -2081,6 +2456,7 @@ var size = function(options) {
|
|
|
2081
2456
|
name: "size",
|
|
2082
2457
|
options,
|
|
2083
2458
|
async fn(state) {
|
|
2459
|
+
var _state$middlewareData, _state$middlewareData2;
|
|
2084
2460
|
const {
|
|
2085
2461
|
placement,
|
|
2086
2462
|
rects,
|
|
@@ -2117,10 +2493,11 @@ var size = function(options) {
|
|
|
2117
2493
|
const noShift = !state.middlewareData.shift;
|
|
2118
2494
|
let availableHeight = overflowAvailableHeight;
|
|
2119
2495
|
let availableWidth = overflowAvailableWidth;
|
|
2120
|
-
if (
|
|
2121
|
-
availableWidth =
|
|
2122
|
-
}
|
|
2123
|
-
|
|
2496
|
+
if ((_state$middlewareData = state.middlewareData.shift) != null && _state$middlewareData.enabled.x) {
|
|
2497
|
+
availableWidth = maximumClippingWidth;
|
|
2498
|
+
}
|
|
2499
|
+
if ((_state$middlewareData2 = state.middlewareData.shift) != null && _state$middlewareData2.enabled.y) {
|
|
2500
|
+
availableHeight = maximumClippingHeight;
|
|
2124
2501
|
}
|
|
2125
2502
|
if (noShift && !alignment) {
|
|
2126
2503
|
const xMin = max(overflow.left, 0);
|
|
@@ -2150,7 +2527,10 @@ var size = function(options) {
|
|
|
2150
2527
|
};
|
|
2151
2528
|
};
|
|
2152
2529
|
|
|
2153
|
-
// node_modules/.pnpm/@floating-ui+utils@0.2.
|
|
2530
|
+
// node_modules/.pnpm/@floating-ui+utils@0.2.9/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs
|
|
2531
|
+
function hasWindow() {
|
|
2532
|
+
return typeof window !== "undefined";
|
|
2533
|
+
}
|
|
2154
2534
|
function getNodeName(node) {
|
|
2155
2535
|
if (isNode(node)) {
|
|
2156
2536
|
return (node.nodeName || "").toLowerCase();
|
|
@@ -2166,16 +2546,25 @@ function getDocumentElement(node) {
|
|
|
2166
2546
|
return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement;
|
|
2167
2547
|
}
|
|
2168
2548
|
function isNode(value) {
|
|
2549
|
+
if (!hasWindow()) {
|
|
2550
|
+
return false;
|
|
2551
|
+
}
|
|
2169
2552
|
return value instanceof Node || value instanceof getWindow(value).Node;
|
|
2170
2553
|
}
|
|
2171
2554
|
function isElement(value) {
|
|
2555
|
+
if (!hasWindow()) {
|
|
2556
|
+
return false;
|
|
2557
|
+
}
|
|
2172
2558
|
return value instanceof Element || value instanceof getWindow(value).Element;
|
|
2173
2559
|
}
|
|
2174
2560
|
function isHTMLElement(value) {
|
|
2561
|
+
if (!hasWindow()) {
|
|
2562
|
+
return false;
|
|
2563
|
+
}
|
|
2175
2564
|
return value instanceof HTMLElement || value instanceof getWindow(value).HTMLElement;
|
|
2176
2565
|
}
|
|
2177
2566
|
function isShadowRoot(value) {
|
|
2178
|
-
if (typeof ShadowRoot === "undefined") {
|
|
2567
|
+
if (!hasWindow() || typeof ShadowRoot === "undefined") {
|
|
2179
2568
|
return false;
|
|
2180
2569
|
}
|
|
2181
2570
|
return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;
|
|
@@ -2204,7 +2593,7 @@ function isTopLayer(element) {
|
|
|
2204
2593
|
function isContainingBlock(elementOrCss) {
|
|
2205
2594
|
const webkit = isWebKit();
|
|
2206
2595
|
const css2 = isElement(elementOrCss) ? getComputedStyle(elementOrCss) : elementOrCss;
|
|
2207
|
-
return
|
|
2596
|
+
return ["transform", "translate", "scale", "rotate", "perspective"].some((value) => css2[value] ? css2[value] !== "none" : false) || (css2.containerType ? css2.containerType !== "normal" : false) || !webkit && (css2.backdropFilter ? css2.backdropFilter !== "none" : false) || !webkit && (css2.filter ? css2.filter !== "none" : false) || ["transform", "translate", "scale", "rotate", "perspective", "filter"].some((value) => (css2.willChange || "").includes(value)) || ["paint", "layout", "strict", "content"].some((value) => (css2.contain || "").includes(value));
|
|
2208
2597
|
}
|
|
2209
2598
|
function getContainingBlock(element) {
|
|
2210
2599
|
let currentNode = getParentNode(element);
|
|
@@ -2284,7 +2673,7 @@ function getFrameElement(win) {
|
|
|
2284
2673
|
return win.parent && Object.getPrototypeOf(win.parent) ? win.frameElement : null;
|
|
2285
2674
|
}
|
|
2286
2675
|
|
|
2287
|
-
// node_modules/.pnpm/@floating-ui+dom@1.6.
|
|
2676
|
+
// node_modules/.pnpm/@floating-ui+dom@1.6.13/node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs
|
|
2288
2677
|
function getCssDimensions(element) {
|
|
2289
2678
|
const css2 = getComputedStyle(element);
|
|
2290
2679
|
let width = parseFloat(css2.width) || 0;
|
|
@@ -2402,6 +2791,28 @@ function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetPar
|
|
|
2402
2791
|
y
|
|
2403
2792
|
});
|
|
2404
2793
|
}
|
|
2794
|
+
function getWindowScrollBarX(element, rect) {
|
|
2795
|
+
const leftScroll = getNodeScroll(element).scrollLeft;
|
|
2796
|
+
if (!rect) {
|
|
2797
|
+
return getBoundingClientRect(getDocumentElement(element)).left + leftScroll;
|
|
2798
|
+
}
|
|
2799
|
+
return rect.left + leftScroll;
|
|
2800
|
+
}
|
|
2801
|
+
function getHTMLOffset(documentElement, scroll, ignoreScrollbarX) {
|
|
2802
|
+
if (ignoreScrollbarX === void 0) {
|
|
2803
|
+
ignoreScrollbarX = false;
|
|
2804
|
+
}
|
|
2805
|
+
const htmlRect = documentElement.getBoundingClientRect();
|
|
2806
|
+
const x = htmlRect.left + scroll.scrollLeft - (ignoreScrollbarX ? 0 : (
|
|
2807
|
+
// RTL <body> scrollbar.
|
|
2808
|
+
getWindowScrollBarX(documentElement, htmlRect)
|
|
2809
|
+
));
|
|
2810
|
+
const y = htmlRect.top + scroll.scrollTop;
|
|
2811
|
+
return {
|
|
2812
|
+
x,
|
|
2813
|
+
y
|
|
2814
|
+
};
|
|
2815
|
+
}
|
|
2405
2816
|
function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
|
|
2406
2817
|
let {
|
|
2407
2818
|
elements,
|
|
@@ -2433,19 +2844,17 @@ function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
|
|
|
2433
2844
|
offsets.y = offsetRect.y + offsetParent.clientTop;
|
|
2434
2845
|
}
|
|
2435
2846
|
}
|
|
2847
|
+
const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll, true) : createCoords(0);
|
|
2436
2848
|
return {
|
|
2437
2849
|
width: rect.width * scale.x,
|
|
2438
2850
|
height: rect.height * scale.y,
|
|
2439
|
-
x: rect.x * scale.x - scroll.scrollLeft * scale.x + offsets.x,
|
|
2440
|
-
y: rect.y * scale.y - scroll.scrollTop * scale.y + offsets.y
|
|
2851
|
+
x: rect.x * scale.x - scroll.scrollLeft * scale.x + offsets.x + htmlOffset.x,
|
|
2852
|
+
y: rect.y * scale.y - scroll.scrollTop * scale.y + offsets.y + htmlOffset.y
|
|
2441
2853
|
};
|
|
2442
2854
|
}
|
|
2443
2855
|
function getClientRects(element) {
|
|
2444
2856
|
return Array.from(element.getClientRects());
|
|
2445
2857
|
}
|
|
2446
|
-
function getWindowScrollBarX(element) {
|
|
2447
|
-
return getBoundingClientRect(getDocumentElement(element)).left + getNodeScroll(element).scrollLeft;
|
|
2448
|
-
}
|
|
2449
2858
|
function getDocumentRect(element) {
|
|
2450
2859
|
const html3 = getDocumentElement(element);
|
|
2451
2860
|
const scroll = getNodeScroll(element);
|
|
@@ -2514,10 +2923,12 @@ function getClientRectFromClippingAncestor(element, clippingAncestor, strategy)
|
|
|
2514
2923
|
rect = getInnerBoundingClientRect(clippingAncestor, strategy);
|
|
2515
2924
|
} else {
|
|
2516
2925
|
const visualOffsets = getVisualOffsets(element);
|
|
2517
|
-
rect =
|
|
2926
|
+
rect = {
|
|
2518
2927
|
x: clippingAncestor.x - visualOffsets.x,
|
|
2519
|
-
y: clippingAncestor.y - visualOffsets.y
|
|
2520
|
-
|
|
2928
|
+
y: clippingAncestor.y - visualOffsets.y,
|
|
2929
|
+
width: clippingAncestor.width,
|
|
2930
|
+
height: clippingAncestor.height
|
|
2931
|
+
};
|
|
2521
2932
|
}
|
|
2522
2933
|
return rectToClientRect(rect);
|
|
2523
2934
|
}
|
|
@@ -2611,8 +3022,9 @@ function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
|
|
|
2611
3022
|
offsets.x = getWindowScrollBarX(documentElement);
|
|
2612
3023
|
}
|
|
2613
3024
|
}
|
|
2614
|
-
const
|
|
2615
|
-
const
|
|
3025
|
+
const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);
|
|
3026
|
+
const x = rect.left + scroll.scrollLeft - offsets.x - htmlOffset.x;
|
|
3027
|
+
const y = rect.top + scroll.scrollTop - offsets.y - htmlOffset.y;
|
|
2616
3028
|
return {
|
|
2617
3029
|
x,
|
|
2618
3030
|
y,
|
|
@@ -2630,7 +3042,11 @@ function getTrueOffsetParent(element, polyfill) {
|
|
|
2630
3042
|
if (polyfill) {
|
|
2631
3043
|
return polyfill(element);
|
|
2632
3044
|
}
|
|
2633
|
-
|
|
3045
|
+
let rawOffsetParent = element.offsetParent;
|
|
3046
|
+
if (getDocumentElement(element) === rawOffsetParent) {
|
|
3047
|
+
rawOffsetParent = rawOffsetParent.ownerDocument.body;
|
|
3048
|
+
}
|
|
3049
|
+
return rawOffsetParent;
|
|
2634
3050
|
}
|
|
2635
3051
|
function getOffsetParent(element, polyfill) {
|
|
2636
3052
|
const win = getWindow(element);
|
|
@@ -2704,7 +3120,7 @@ var computePosition2 = (reference, floating, options) => {
|
|
|
2704
3120
|
}));
|
|
2705
3121
|
};
|
|
2706
3122
|
|
|
2707
|
-
// node_modules/.pnpm/@warp-ds+core@1.1.8_@floating-ui+dom@1.6.
|
|
3123
|
+
// node_modules/.pnpm/@warp-ds+core@1.1.8_@floating-ui+dom@1.6.13/node_modules/@warp-ds/core/dist/attention/utils/helpers.js
|
|
2708
3124
|
var TOP_START = "top-start";
|
|
2709
3125
|
var TOP = "top";
|
|
2710
3126
|
var TOP_END = "top-end";
|
|
@@ -2865,7 +3281,7 @@ async function useRecompute(state) {
|
|
|
2865
3281
|
return state;
|
|
2866
3282
|
}
|
|
2867
3283
|
|
|
2868
|
-
// 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
|
|
2869
3285
|
var buttonDefaultStyling = "font-bold focusable justify-center transition-colors ease-in-out";
|
|
2870
3286
|
var buttonColors = {
|
|
2871
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]",
|
|
@@ -3154,28 +3570,28 @@ function generateRandomId() {
|
|
|
3154
3570
|
}
|
|
3155
3571
|
|
|
3156
3572
|
// packages/attention/locales/da/messages.mjs
|
|
3157
|
-
var messages = JSON.parse('{"attention.aria.callout":"En gr\xF8n taleboble der introducerer noget nyt","attention.aria.close":"Luk","attention.aria.highlight":"En opm\xE6rksomhedsskabende taleboble med vigtig information","attention.aria.pointingDown":"peger nedad","attention.aria.pointingLeft":"peger til venstre","attention.aria.pointingRight":"peger til h\xF8jre","attention.aria.pointingUp":"peger opad","attention.aria.popover":"En hvid taleboble med mere information","attention.aria.tooltip":"En sort taleboble med flere oplysninger"}');
|
|
3573
|
+
var messages = JSON.parse('{"attention.aria.callout":["En gr\xF8n taleboble der introducerer noget nyt"],"attention.aria.close":["Luk"],"attention.aria.highlight":["En opm\xE6rksomhedsskabende taleboble med vigtig information"],"attention.aria.pointingDown":["peger nedad"],"attention.aria.pointingLeft":["peger til venstre"],"attention.aria.pointingRight":["peger til h\xF8jre"],"attention.aria.pointingUp":["peger opad"],"attention.aria.popover":["En hvid taleboble med mere information"],"attention.aria.tooltip":["En sort taleboble med flere oplysninger"]}');
|
|
3158
3574
|
|
|
3159
3575
|
// packages/attention/locales/en/messages.mjs
|
|
3160
|
-
var messages2 = JSON.parse('{"attention.aria.callout":"A green speech bubble introducing something new","attention.aria.close":"Close","attention.aria.highlight":"An attention speech bubble with important information","attention.aria.pointingDown":"pointing down","attention.aria.pointingLeft":"pointing left","attention.aria.pointingRight":"pointing right","attention.aria.pointingUp":"pointing up","attention.aria.popover":"A white speech bubble providing additional information","attention.aria.tooltip":"A black speech bubble providing complementary information"}');
|
|
3576
|
+
var messages2 = JSON.parse('{"attention.aria.callout":["A green speech bubble introducing something new"],"attention.aria.close":["Close"],"attention.aria.highlight":["An attention speech bubble with important information"],"attention.aria.pointingDown":["pointing down"],"attention.aria.pointingLeft":["pointing left"],"attention.aria.pointingRight":["pointing right"],"attention.aria.pointingUp":["pointing up"],"attention.aria.popover":["A white speech bubble providing additional information"],"attention.aria.tooltip":["A black speech bubble providing complementary information"]}');
|
|
3161
3577
|
|
|
3162
3578
|
// packages/attention/locales/fi/messages.mjs
|
|
3163
|
-
var messages3 = JSON.parse('{"attention.aria.callout":"Vihre\xE4 puhekupla, joka esittelee jotain uutta","attention.aria.close":"Sulje","attention.aria.highlight":"Puhekupla, joka sis\xE4lt\xE4\xE4 t\xE4rke\xE4\xE4 tietoa","attention.aria.pointingDown":"osoittaa alas","attention.aria.pointingLeft":"osoittaa vasemmalle","attention.aria.pointingRight":"osoittaa oikealle","attention.aria.pointingUp":"osoittaa yl\xF6s","attention.aria.popover":"Valkoinen puhekupla, joka tarjoaa lis\xE4tietoa","attention.aria.tooltip":"Musta puhekupla, joka tarjoaa t\xE4ydent\xE4v\xE4\xE4 tietoa"}');
|
|
3579
|
+
var messages3 = JSON.parse('{"attention.aria.callout":["Vihre\xE4 puhekupla, joka esittelee jotain uutta"],"attention.aria.close":["Sulje"],"attention.aria.highlight":["Puhekupla, joka sis\xE4lt\xE4\xE4 t\xE4rke\xE4\xE4 tietoa"],"attention.aria.pointingDown":["osoittaa alas"],"attention.aria.pointingLeft":["osoittaa vasemmalle"],"attention.aria.pointingRight":["osoittaa oikealle"],"attention.aria.pointingUp":["osoittaa yl\xF6s"],"attention.aria.popover":["Valkoinen puhekupla, joka tarjoaa lis\xE4tietoa"],"attention.aria.tooltip":["Musta puhekupla, joka tarjoaa t\xE4ydent\xE4v\xE4\xE4 tietoa"]}');
|
|
3164
3580
|
|
|
3165
3581
|
// packages/attention/locales/nb/messages.mjs
|
|
3166
|
-
var messages4 = JSON.parse('{"attention.aria.callout":"Gr\xF8nn taleboble som introduserer noe nytt","attention.aria.close":"Lukk","attention.aria.highlight":"En uthevet taleboble med viktig informasjon","attention.aria.pointingDown":"peker ned","attention.aria.pointingLeft":"peker til venstre","attention.aria.pointingRight":"peker til h\xF8yre","attention.aria.pointingUp":"peker opp","attention.aria.popover":"En hvit taleboble som gir tilleggsinformasjon","attention.aria.tooltip":"En svart taleboble som forklarer konteksten"}');
|
|
3582
|
+
var messages4 = JSON.parse('{"attention.aria.callout":["Gr\xF8nn taleboble som introduserer noe nytt"],"attention.aria.close":["Lukk"],"attention.aria.highlight":["En uthevet taleboble med viktig informasjon"],"attention.aria.pointingDown":["peker ned"],"attention.aria.pointingLeft":["peker til venstre"],"attention.aria.pointingRight":["peker til h\xF8yre"],"attention.aria.pointingUp":["peker opp"],"attention.aria.popover":["En hvit taleboble som gir tilleggsinformasjon"],"attention.aria.tooltip":["En svart taleboble som forklarer konteksten"]}');
|
|
3167
3583
|
|
|
3168
3584
|
// packages/attention/locales/sv/messages.mjs
|
|
3169
|
-
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"}');
|
|
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"]}');
|
|
3170
3586
|
|
|
3171
|
-
// node_modules/.pnpm/@warp-ds+icons@2.
|
|
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
|
|
3172
3588
|
import { LitElement } from "lit";
|
|
3173
3589
|
import { unsafeStatic, html } from "lit/static-html.js";
|
|
3174
|
-
var messages6 = JSON.parse('{"icon.title.close":"Kryss"}');
|
|
3175
|
-
var messages22 = JSON.parse('{"icon.title.close":"Cross"}');
|
|
3176
|
-
var messages32 = JSON.parse('{"icon.title.close":"Rasti"}');
|
|
3177
|
-
var messages42 = JSON.parse('{"icon.title.close":"Kryds"}');
|
|
3178
|
-
var messages52 = JSON.parse('{"icon.title.close":"Kryss"}');
|
|
3590
|
+
var messages6 = JSON.parse('{"icon.title.close":["Kryss"]}');
|
|
3591
|
+
var messages22 = JSON.parse('{"icon.title.close":["Cross"]}');
|
|
3592
|
+
var messages32 = JSON.parse('{"icon.title.close":["Rasti"]}');
|
|
3593
|
+
var messages42 = JSON.parse('{"icon.title.close":["Kryds"]}');
|
|
3594
|
+
var messages52 = JSON.parse('{"icon.title.close":["Kryss"]}');
|
|
3179
3595
|
var supportedLocales2 = ["en", "nb", "fi", "da", "sv"];
|
|
3180
3596
|
var defaultLocale3 = "en";
|
|
3181
3597
|
var detectByBrand = () => {
|