@warp-ds/elements 1.4.0 → 1.4.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.
@@ -1029,334 +1029,383 @@ var require_parser = __commonJS({
1029
1029
 
1030
1030
  // packages/attention/index.js
1031
1031
  import { css, html as html2, nothing } from "lit";
1032
- import WarpElement from "@warp-ds/elements-core";
1033
- import { ifDefined } from "lit/directives/if-defined.js";
1034
1032
 
1035
- // packages/utils/index.js
1036
- import { classMap } from "lit/directives/class-map.js";
1037
- var camelCaseToKebabCase = (str) => str.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
1038
- function kebabCaseAttributes(constructor) {
1039
- return class extends constructor {
1040
- static createProperty(name, options) {
1041
- let customOptions = options;
1042
- if (typeof (options == null ? void 0 : options.attribute) === "undefined" || (options == null ? void 0 : options.attribute) === true) {
1043
- customOptions = Object.assign({}, options, {
1044
- attribute: camelCaseToKebabCase(name.toString())
1045
- });
1033
+ // node_modules/.pnpm/@lingui+core@4.7.1/node_modules/@lingui/core/dist/index.mjs
1034
+ var import_unraw = __toESM(require_dist(), 1);
1035
+
1036
+ // node_modules/.pnpm/@lingui+message-utils@4.7.1/node_modules/@lingui/message-utils/dist/compileMessage.mjs
1037
+ var import_parser = __toESM(require_parser(), 1);
1038
+ function processTokens(tokens, mapText) {
1039
+ if (!tokens.filter((token) => token.type !== "content").length) {
1040
+ return tokens.map((token) => mapText(token.value)).join("");
1041
+ }
1042
+ return tokens.map((token) => {
1043
+ var _a;
1044
+ if (token.type === "content") {
1045
+ return mapText(token.value);
1046
+ } else if (token.type === "octothorpe") {
1047
+ return "#";
1048
+ } else if (token.type === "argument") {
1049
+ return [token.arg];
1050
+ } else if (token.type === "function") {
1051
+ const _param = (_a = token == null ? void 0 : token.param) == null ? void 0 : _a[0];
1052
+ if (_param) {
1053
+ return [token.arg, token.key, _param.value.trim()];
1054
+ } else {
1055
+ return [token.arg, token.key];
1046
1056
  }
1047
- super.createProperty(name, customOptions);
1048
1057
  }
1049
- };
1058
+ const offset2 = token.pluralOffset;
1059
+ const formatProps = {};
1060
+ token.cases.forEach((item) => {
1061
+ formatProps[item.key.replace(/^=(.)+/, "$1")] = processTokens(
1062
+ item.tokens,
1063
+ mapText
1064
+ );
1065
+ });
1066
+ return [
1067
+ token.arg,
1068
+ token.type,
1069
+ __spreadValues({
1070
+ offset: offset2
1071
+ }, formatProps)
1072
+ ];
1073
+ });
1050
1074
  }
1051
- function classes(defn) {
1052
- const classes2 = [];
1053
- for (const [key, value] of Object.entries(defn)) {
1054
- if (value)
1055
- classes2.push(key);
1075
+ function compileMessage(message, mapText = (v) => v) {
1076
+ try {
1077
+ return processTokens((0, import_parser.parse)(message), mapText);
1078
+ } catch (e) {
1079
+ console.error(`${e.message}
1080
+
1081
+ Message: ${message}`);
1082
+ return message;
1056
1083
  }
1057
- return classes2.join(" ");
1058
- }
1059
- function generateRandomId() {
1060
- return `m${Math.random().toString(36).slice(2)}`;
1061
1084
  }
1062
1085
 
1063
- // node_modules/.pnpm/@warp-ds+css@1.9.6/node_modules/@warp-ds/css/component-classes/index.js
1064
- var box = {
1065
- box: "group block relative break-words last-child:mb-0 p-16 rounded-8",
1066
- // Relative here enables w-clickable
1067
- bleed: "-mx-16 sm:mx-0 rounded-l-0 rounded-r-0 sm:rounded-8",
1068
- // We target L and R to override the default rounded-8
1069
- info: "s-bg-info-subtle",
1070
- neutral: "s-surface-sunken",
1071
- bordered: "border-2 s-border s-bg",
1072
- infoClickable: "hover:s-bg-info-subtle-hover active:s-bg-info-subtle-active",
1073
- // Deprecated - Remove in v2 (after removing Clickable prop in the Box components)
1074
- neutralClickable: "hover:s-bg-hover active:s-bg-active",
1075
- // Deprecated - Remove in v2 (after removing Clickable prop in the Box components)
1076
- borderedClickable: "hover:s-bg-hover active:s-bg-active hover:s-border-hover active:s-border-active"
1077
- // Deprecated - Remove in v2 (after removing Clickable prop in the Box components)
1086
+ // node_modules/.pnpm/@lingui+core@4.7.1/node_modules/@lingui/core/dist/index.mjs
1087
+ var isString = (s) => typeof s === "string";
1088
+ var isFunction = (f) => typeof f === "function";
1089
+ var cache = /* @__PURE__ */ new Map();
1090
+ var defaultLocale = "en";
1091
+ function normalizeLocales(locales) {
1092
+ const out = Array.isArray(locales) ? locales : [locales];
1093
+ return [...out, defaultLocale];
1094
+ }
1095
+ function date(locales, value, format) {
1096
+ const _locales = normalizeLocales(locales);
1097
+ const formatter = getMemoized(
1098
+ () => cacheKey("date", _locales, format),
1099
+ () => new Intl.DateTimeFormat(_locales, format)
1100
+ );
1101
+ return formatter.format(isString(value) ? new Date(value) : value);
1102
+ }
1103
+ function number(locales, value, format) {
1104
+ const _locales = normalizeLocales(locales);
1105
+ const formatter = getMemoized(
1106
+ () => cacheKey("number", _locales, format),
1107
+ () => new Intl.NumberFormat(_locales, format)
1108
+ );
1109
+ return formatter.format(value);
1110
+ }
1111
+ function plural(locales, ordinal, value, _a) {
1112
+ var _b = _a, { offset: offset2 = 0 } = _b, rules = __objRest(_b, ["offset"]);
1113
+ var _a2, _b2;
1114
+ const _locales = normalizeLocales(locales);
1115
+ const plurals = ordinal ? getMemoized(
1116
+ () => cacheKey("plural-ordinal", _locales),
1117
+ () => new Intl.PluralRules(_locales, { type: "ordinal" })
1118
+ ) : getMemoized(
1119
+ () => cacheKey("plural-cardinal", _locales),
1120
+ () => new Intl.PluralRules(_locales, { type: "cardinal" })
1121
+ );
1122
+ return (_b2 = (_a2 = rules[value]) != null ? _a2 : rules[plurals.select(value - offset2)]) != null ? _b2 : rules.other;
1123
+ }
1124
+ function getMemoized(getKey, construct) {
1125
+ const key = getKey();
1126
+ let formatter = cache.get(key);
1127
+ if (!formatter) {
1128
+ formatter = construct();
1129
+ cache.set(key, formatter);
1130
+ }
1131
+ return formatter;
1132
+ }
1133
+ function cacheKey(type, locales, options) {
1134
+ const localeKey = locales.join("-");
1135
+ return `${type}-${localeKey}-${JSON.stringify(options)}`;
1136
+ }
1137
+ var UNICODE_REGEX = /\\u[a-fA-F0-9]{4}|\\x[a-fA-F0-9]{2}/g;
1138
+ var OCTOTHORPE_PH = "%__lingui_octothorpe__%";
1139
+ var getDefaultFormats = (locale, passedLocales, formats = {}) => {
1140
+ const locales = passedLocales || locale;
1141
+ const style = (format) => {
1142
+ return typeof format === "object" ? format : formats[format] || { style: format };
1143
+ };
1144
+ const replaceOctothorpe = (value, message) => {
1145
+ const numberFormat = Object.keys(formats).length ? style("number") : void 0;
1146
+ const valueStr = number(locales, value, numberFormat);
1147
+ return message.replace(new RegExp(OCTOTHORPE_PH, "g"), valueStr);
1148
+ };
1149
+ return {
1150
+ plural: (value, cases) => {
1151
+ const { offset: offset2 = 0 } = cases;
1152
+ const message = plural(locales, false, value, cases);
1153
+ return replaceOctothorpe(value - offset2, message);
1154
+ },
1155
+ selectordinal: (value, cases) => {
1156
+ const { offset: offset2 = 0 } = cases;
1157
+ const message = plural(locales, true, value, cases);
1158
+ return replaceOctothorpe(value - offset2, message);
1159
+ },
1160
+ select: selectFormatter,
1161
+ number: (value, format) => number(locales, value, style(format)),
1162
+ date: (value, format) => date(locales, value, style(format))
1163
+ };
1078
1164
  };
1079
- var buttonReset = "focus:outline-none appearance-none cursor-pointer bg-transparent border-0 m-0 p-0 inline-block";
1080
- var expandable = {
1081
- expandable: "will-change-height",
1082
- expandableTitle: "font-bold s-text",
1083
- expandableBox: "s-surface-sunken hover:s-bg-hover active:s-bg-active py-0 px-0 " + box.box,
1084
- expandableInfo: "s-bg-info-subtle! hover:s-bg-info-subtle-hover!",
1085
- expandableBleed: box.bleed,
1086
- chevron: "inline-block align-middle s-icon",
1087
- chevronNonBox: "ml-8",
1088
- chevronBox: "",
1089
- chevronTransform: "transform transition-transform transform-gpu ease-in-out",
1090
- chevronExpand: "-rotate-180",
1091
- chevronCollapse: "rotate-180",
1092
- 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",
1093
- elementsChevronDownExpandPart: "part-[w-icon-chevron-down-16-part]:-rotate-180",
1094
- 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",
1095
- elementsChevronUpCollapsePart: "part-[w-icon-chevron-up-16-part]:rotate-180",
1096
- expansion: "overflow-hidden",
1097
- expansionNotExpanded: "h-0 invisible",
1098
- button: buttonReset + " hover:underline focus-visible:underline",
1099
- buttonBox: "w-full text-left relative inline-flex items-center justify-between " + box.box,
1100
- paddingTop: "pt-0",
1101
- title: "flex w-full justify-between items-center",
1102
- titleType: "h4"
1165
+ var selectFormatter = (value, rules) => {
1166
+ var _a;
1167
+ return (_a = rules[value]) != null ? _a : rules.other;
1103
1168
  };
1104
- var buttonDefaultStyling = "font-bold focusable justify-center transition-colors ease-in-out";
1105
- var buttonColors = {
1106
- 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]",
1107
- secondary: "s-text-link s-border s-bg hover:s-bg-hover hover:s-border-hover active:s-bg-active",
1108
- utility: "s-text s-bg hover:s-bg-hover active:s-bg-active s-border hover:s-border-hover active:s-border-active",
1109
- destructive: "s-bg-negative s-text-inverted hover:s-bg-negative-hover active:s-bg-negative-active",
1110
- pill: "s-icon hover:s-icon-hover active:s-icon-active bg-transparent hover:bg-[--w-color-button-pill-background-hover] active:bg-[--w-color-button-pill-background-active]",
1111
- disabled: "s-text-inverted s-bg-disabled",
1112
- quiet: "bg-transparent s-text-link hover:s-bg-hover active:s-bg-active",
1113
- utilityQuiet: "s-text bg-transparent hover:s-bg-hover active:s-bg-active",
1114
- negativeQuiet: "bg-transparent s-text-negative hover:s-bg-negative-subtle-hover active:s-bg-negative-subtle-active",
1115
- loading: "s-text s-bg-subtle",
1116
- link: "s-text-link"
1169
+ function interpolate(translation, locale, locales) {
1170
+ return (values = {}, formats) => {
1171
+ const formatters = getDefaultFormats(locale, locales, formats);
1172
+ const formatMessage = (tokens) => {
1173
+ if (!Array.isArray(tokens))
1174
+ return tokens;
1175
+ return tokens.reduce((message, token) => {
1176
+ if (token === "#") {
1177
+ return message + OCTOTHORPE_PH;
1178
+ }
1179
+ if (isString(token)) {
1180
+ return message + token;
1181
+ }
1182
+ const [name, type, format] = token;
1183
+ let interpolatedFormat = {};
1184
+ if (type === "plural" || type === "selectordinal" || type === "select") {
1185
+ Object.entries(format).forEach(
1186
+ ([key, value2]) => {
1187
+ interpolatedFormat[key] = formatMessage(value2);
1188
+ }
1189
+ );
1190
+ } else {
1191
+ interpolatedFormat = format;
1192
+ }
1193
+ let value;
1194
+ if (type) {
1195
+ const formatter = formatters[type];
1196
+ value = formatter(values[name], interpolatedFormat);
1197
+ } else {
1198
+ value = values[name];
1199
+ }
1200
+ if (value == null) {
1201
+ return message;
1202
+ }
1203
+ return message + value;
1204
+ }, "");
1205
+ };
1206
+ const result = formatMessage(translation);
1207
+ if (isString(result) && UNICODE_REGEX.test(result)) {
1208
+ return (0, import_unraw.unraw)(result.trim());
1209
+ }
1210
+ if (isString(result))
1211
+ return result.trim();
1212
+ return result ? String(result) : "";
1213
+ };
1214
+ }
1215
+ var __defProp$1 = Object.defineProperty;
1216
+ var __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1217
+ var __publicField$1 = (obj, key, value) => {
1218
+ __defNormalProp$1(obj, typeof key !== "symbol" ? key + "" : key, value);
1219
+ return value;
1117
1220
  };
1118
- var buttonTypes = {
1119
- primary: `border-0 rounded-8 ${buttonDefaultStyling}`,
1120
- secondary: `border-2 rounded-8 ${buttonDefaultStyling}`,
1121
- utility: `border rounded-4 ${buttonDefaultStyling}`,
1122
- negative: `border-0 rounded-8 ${buttonDefaultStyling}`,
1123
- pill: `p-4 rounded-full border-0 inline-flex items-center justify-center hover:bg-clip-padding ${buttonDefaultStyling}`,
1124
- link: `bg-transparent focusable ease-in-out inline active:underline hover:underline focus:underline ${buttonColors.link}`
1221
+ var EventEmitter = class {
1222
+ constructor() {
1223
+ __publicField$1(this, "_events", {});
1224
+ }
1225
+ on(event, listener) {
1226
+ var _a2;
1227
+ var _a;
1228
+ (_a2 = (_a = this._events)[event]) != null ? _a2 : _a[event] = [];
1229
+ this._events[event].push(listener);
1230
+ return () => this.removeListener(event, listener);
1231
+ }
1232
+ removeListener(event, listener) {
1233
+ const maybeListeners = this._getListeners(event);
1234
+ if (!maybeListeners)
1235
+ return;
1236
+ const index = maybeListeners.indexOf(listener);
1237
+ if (~index)
1238
+ maybeListeners.splice(index, 1);
1239
+ }
1240
+ emit(event, ...args) {
1241
+ const maybeListeners = this._getListeners(event);
1242
+ if (!maybeListeners)
1243
+ return;
1244
+ maybeListeners.map((listener) => listener.apply(this, args));
1245
+ }
1246
+ _getListeners(event) {
1247
+ const maybeListeners = this._events[event];
1248
+ return Array.isArray(maybeListeners) ? maybeListeners : false;
1249
+ }
1125
1250
  };
1126
- var buttonSizes = {
1127
- xsmall: "py-6 px-16",
1128
- small: "py-8 px-16",
1129
- medium: "py-10 px-14",
1130
- large: "py-12 px-16",
1131
- utility: "py-[11px] px-[15px]",
1132
- smallUtility: "py-[7px] px-[15px]",
1133
- pill: "min-h-[44px] min-w-[44px]",
1134
- pillSmall: "min-h-32 min-w-32",
1135
- link: "p-0"
1251
+ var __defProp2 = Object.defineProperty;
1252
+ var __defNormalProp2 = (obj, key, value) => key in obj ? __defProp2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1253
+ var __publicField2 = (obj, key, value) => {
1254
+ __defNormalProp2(obj, typeof key !== "symbol" ? key + "" : key, value);
1255
+ return value;
1136
1256
  };
1137
- var buttonTextSizes = {
1138
- medium: "text-m leading-[24]",
1139
- xsmall: "text-xs"
1257
+ var I18n = class extends EventEmitter {
1258
+ constructor(params) {
1259
+ var _a;
1260
+ super();
1261
+ __publicField2(this, "_locale", "");
1262
+ __publicField2(this, "_locales");
1263
+ __publicField2(this, "_localeData", {});
1264
+ __publicField2(this, "_messages", {});
1265
+ __publicField2(this, "_missing");
1266
+ __publicField2(this, "t", this._.bind(this));
1267
+ if (params.missing != null)
1268
+ this._missing = params.missing;
1269
+ if (params.messages != null)
1270
+ this.load(params.messages);
1271
+ if (params.localeData != null)
1272
+ this.loadLocaleData(params.localeData);
1273
+ if (typeof params.locale === "string" || params.locales) {
1274
+ this.activate((_a = params.locale) != null ? _a : defaultLocale, params.locales);
1275
+ }
1276
+ }
1277
+ get locale() {
1278
+ return this._locale;
1279
+ }
1280
+ get locales() {
1281
+ return this._locales;
1282
+ }
1283
+ get messages() {
1284
+ var _a;
1285
+ return (_a = this._messages[this._locale]) != null ? _a : {};
1286
+ }
1287
+ /**
1288
+ * @deprecated this has no effect. Please remove this from the code. Deprecated in v4
1289
+ */
1290
+ get localeData() {
1291
+ var _a;
1292
+ return (_a = this._localeData[this._locale]) != null ? _a : {};
1293
+ }
1294
+ _loadLocaleData(locale, localeData) {
1295
+ const maybeLocaleData = this._localeData[locale];
1296
+ if (!maybeLocaleData) {
1297
+ this._localeData[locale] = localeData;
1298
+ } else {
1299
+ Object.assign(maybeLocaleData, localeData);
1300
+ }
1301
+ }
1302
+ /**
1303
+ * @deprecated Plurals automatically used from Intl.PluralRules you can safely remove this call. Deprecated in v4
1304
+ */
1305
+ // @ts-ignore deprecated, so ignore the reported error
1306
+ loadLocaleData(localeOrAllData, localeData) {
1307
+ if (localeData != null) {
1308
+ this._loadLocaleData(localeOrAllData, localeData);
1309
+ } else {
1310
+ Object.keys(localeOrAllData).forEach(
1311
+ (locale) => this._loadLocaleData(locale, localeOrAllData[locale])
1312
+ );
1313
+ }
1314
+ this.emit("change");
1315
+ }
1316
+ _load(locale, messages5) {
1317
+ const maybeMessages = this._messages[locale];
1318
+ if (!maybeMessages) {
1319
+ this._messages[locale] = messages5;
1320
+ } else {
1321
+ Object.assign(maybeMessages, messages5);
1322
+ }
1323
+ }
1324
+ load(localeOrMessages, messages5) {
1325
+ if (typeof localeOrMessages == "string" && typeof messages5 === "object") {
1326
+ this._load(localeOrMessages, messages5);
1327
+ } else {
1328
+ Object.entries(localeOrMessages).forEach(
1329
+ ([locale, messages23]) => this._load(locale, messages23)
1330
+ );
1331
+ }
1332
+ this.emit("change");
1333
+ }
1334
+ /**
1335
+ * @param options {@link LoadAndActivateOptions}
1336
+ */
1337
+ loadAndActivate({ locale, locales, messages: messages5 }) {
1338
+ this._locale = locale;
1339
+ this._locales = locales || void 0;
1340
+ this._messages[this._locale] = messages5;
1341
+ this.emit("change");
1342
+ }
1343
+ activate(locale, locales) {
1344
+ if (true) {
1345
+ if (!this._messages[locale]) {
1346
+ console.warn(`Messages for locale "${locale}" not loaded.`);
1347
+ }
1348
+ }
1349
+ this._locale = locale;
1350
+ this._locales = locales;
1351
+ this.emit("change");
1352
+ }
1353
+ _(id, values, options) {
1354
+ let message = options == null ? void 0 : options.message;
1355
+ if (!isString(id)) {
1356
+ values = id.values || values;
1357
+ message = id.message;
1358
+ id = id.id;
1359
+ }
1360
+ const messageForId = this.messages[id];
1361
+ const messageMissing = messageForId === void 0;
1362
+ const missing = this._missing;
1363
+ if (missing && messageMissing) {
1364
+ return isFunction(missing) ? missing(this._locale, id) : missing;
1365
+ }
1366
+ if (messageMissing) {
1367
+ this.emit("missing", { id, locale: this._locale });
1368
+ }
1369
+ let translation = messageForId || message || id;
1370
+ if (true) {
1371
+ translation = isString(translation) ? compileMessage(translation) : translation;
1372
+ }
1373
+ if (isString(translation) && UNICODE_REGEX.test(translation))
1374
+ return JSON.parse(`"${translation}"`);
1375
+ if (isString(translation))
1376
+ return translation;
1377
+ return interpolate(
1378
+ translation,
1379
+ this._locale,
1380
+ this._locales
1381
+ )(values, options == null ? void 0 : options.formats);
1382
+ }
1383
+ date(value, format) {
1384
+ return date(this._locales || this._locale, value, format);
1385
+ }
1386
+ number(value, format) {
1387
+ return number(this._locales || this._locale, value, format);
1388
+ }
1140
1389
  };
1141
- var buttonVariants = {
1142
- inProgress: `border-transparent animate-inprogress pointer-events-none ${buttonColors.loading}`,
1143
- // .button--in-progress, a.button--in-progress:visited
1144
- quiet: `border-0 rounded-8 ${buttonDefaultStyling}`,
1145
- utilityQuiet: `border-0 rounded-4 ${buttonDefaultStyling}`,
1146
- negativeQuiet: `border-0 rounded-8 ${buttonDefaultStyling}`,
1147
- isDisabled: `font-bold justify-center transition-colors ease-in-out cursor-default pointer-events-none ${buttonColors.disabled}`
1148
- // .button:disabled, .button--is-disabled
1149
- };
1150
- var button = {
1151
- // Buttontypes
1152
- secondary: `${buttonSizes.medium} ${buttonTextSizes.medium} ${buttonTypes.secondary} ${buttonColors.secondary}`,
1153
- // .button--secondary, .button--default, .button
1154
- secondaryHref: `${buttonSizes.medium} ${buttonTextSizes.medium} ${buttonTypes.secondary} ${buttonColors.secondary}`,
1155
- secondaryDisabled: `${buttonSizes.medium} ${buttonTextSizes.medium} ${buttonTypes.secondary} ${buttonVariants.isDisabled}`,
1156
- secondarySmall: `${buttonTextSizes.xsmall} ${buttonSizes.xsmall} ${buttonTypes.secondary} ${buttonColors.secondary}`,
1157
- secondarySmallDisabled: `${buttonTextSizes.xsmall} ${buttonSizes.xsmall} ${buttonTypes.secondary} ${buttonVariants.isDisabled}`,
1158
- secondaryQuiet: `${buttonSizes.medium} ${buttonTextSizes.medium} ${buttonVariants.quiet} ${buttonColors.quiet}`,
1159
- secondaryQuietDisabled: `${buttonSizes.medium} ${buttonTextSizes.medium} ${buttonVariants.quiet} ${buttonVariants.isDisabled}`,
1160
- secondarySmallQuiet: `${buttonTextSizes.xsmall} ${buttonSizes.xsmall} ${buttonVariants.quiet} ${buttonColors.quiet}`,
1161
- secondarySmallQuietDisabled: `${buttonTextSizes.xsmall} ${buttonSizes.xsmall} ${buttonVariants.quiet} ${buttonVariants.isDisabled}`,
1162
- secondaryLoading: `${buttonSizes.medium} ${buttonTextSizes.medium} ${buttonTypes.secondary} ${buttonVariants.inProgress}`,
1163
- secondarySmallLoading: `${buttonTextSizes.xsmall} ${buttonSizes.xsmall} ${buttonTypes.secondary} ${buttonVariants.inProgress}`,
1164
- secondarySmallQuietLoading: `${buttonTextSizes.xsmall} ${buttonSizes.xsmall} ${buttonVariants.quiet} ${buttonVariants.inProgress}`,
1165
- secondaryQuietLoading: `${buttonSizes.medium} ${buttonTextSizes.medium} ${buttonVariants.quiet} ${buttonVariants.inProgress}`,
1166
- primary: `${buttonSizes.large} ${buttonTextSizes.medium} ${buttonTypes.primary} ${buttonColors.primary}`,
1167
- // .button--primary, .button--cta
1168
- primaryDisabled: `${buttonSizes.large} ${buttonTextSizes.medium} ${buttonVariants.isDisabled} ${buttonTypes.primary}`,
1169
- primarySmall: `${buttonSizes.small} ${buttonTextSizes.xsmall} ${buttonTypes.primary} ${buttonColors.primary}`,
1170
- primarySmallDisabled: `${buttonSizes.small} ${buttonTextSizes.xsmall} ${buttonVariants.isDisabled} ${buttonTypes.primary} `,
1171
- primaryQuiet: `${buttonSizes.large} ${buttonTextSizes.medium} ${buttonVariants.quiet} ${buttonColors.quiet}`,
1172
- primaryQuietDisabled: `${buttonSizes.large} ${buttonTextSizes.medium} ${buttonVariants.quiet} ${buttonVariants.isDisabled}`,
1173
- primarySmallQuiet: `${buttonSizes.small} ${buttonTextSizes.xsmall} ${buttonVariants.quiet} ${buttonColors.quiet}`,
1174
- primarySmallQuietDisabled: `${buttonSizes.small} ${buttonTextSizes.xsmall} ${buttonVariants.quiet} ${buttonVariants.isDisabled}`,
1175
- primaryLoading: `${buttonSizes.large} ${buttonTextSizes.medium} ${buttonVariants.inProgress} ${buttonTypes.primary}`,
1176
- primarySmallLoading: `${buttonSizes.small} ${buttonTextSizes.xsmall} ${buttonVariants.inProgress} ${buttonTypes.primary}`,
1177
- primarySmallQuietLoading: `${buttonSizes.small} ${buttonTextSizes.xsmall} ${buttonVariants.quiet} ${buttonVariants.inProgress} ${buttonTypes.primary}`,
1178
- primaryQuietLoading: `${buttonSizes.large} ${buttonTextSizes.medium} ${buttonVariants.quiet} ${buttonVariants.inProgress}`,
1179
- utility: `${buttonSizes.utility} ${buttonTextSizes.medium} ${buttonTypes.utility} ${buttonColors.utility}`,
1180
- // .button--utility
1181
- utilityDisabled: `${buttonSizes.utility} ${buttonTextSizes.medium} ${buttonTypes.utility} ${buttonVariants.isDisabled}`,
1182
- utilityQuiet: `${buttonSizes.large} ${buttonTextSizes.medium} ${buttonVariants.utilityQuiet} ${buttonColors.utilityQuiet}`,
1183
- // .button--utility-flat
1184
- utilityQuietDisabled: `${buttonSizes.large} ${buttonTextSizes.medium} ${buttonVariants.utilityQuiet} ${buttonVariants.isDisabled}`,
1185
- utilitySmall: `${buttonSizes.smallUtility} ${buttonTextSizes.xsmall} ${buttonTypes.utility} ${buttonColors.utility}`,
1186
- utilitySmallDisabled: `${buttonSizes.smallUtility} ${buttonTextSizes.xsmall} ${buttonTypes.utility} ${buttonVariants.isDisabled}`,
1187
- utilitySmallQuiet: `${buttonSizes.smallUtility} ${buttonTextSizes.xsmall} ${buttonVariants.utilityQuiet} ${buttonColors.utilityQuiet}`,
1188
- utilitySmallQuietDisabled: `${buttonSizes.smallUtility} ${buttonTextSizes.xsmall} ${buttonVariants.utilityQuiet} ${buttonVariants.isDisabled}`,
1189
- utilityLoading: `${buttonSizes.large} ${buttonTextSizes.medium} ${buttonTypes.utility} ${buttonVariants.inProgress}`,
1190
- utilitySmallLoading: `${buttonSizes.smallUtility} ${buttonTextSizes.xsmall} ${buttonTypes.utility} ${buttonVariants.inProgress}`,
1191
- utilityQuietLoading: `${buttonSizes.large} ${buttonTextSizes.medium} ${buttonVariants.inProgress} ${buttonVariants.utilityQuiet}`,
1192
- utilitySmallQuietLoading: `${buttonSizes.smallUtility} ${buttonTextSizes.xsmall} ${buttonVariants.inProgress} ${buttonVariants.utilityQuiet}`,
1193
- negative: `${buttonSizes.large} ${buttonTextSizes.medium} ${buttonTypes.negative} ${buttonColors.destructive}`,
1194
- // .button--destructive
1195
- negativeDisabled: `${buttonSizes.large} ${buttonTextSizes.medium} ${buttonTypes.negative} ${buttonVariants.isDisabled}`,
1196
- negativeQuiet: `${buttonSizes.large} ${buttonTextSizes.medium} ${buttonVariants.negativeQuiet} ${buttonColors.negativeQuiet}`,
1197
- // .button--destructive-flat
1198
- negativeQuietDisabled: `${buttonSizes.large} ${buttonTextSizes.medium} ${buttonVariants.negativeQuiet}${buttonVariants.isDisabled}`,
1199
- negativeSmall: `${buttonSizes.small} ${buttonTextSizes.xsmall} ${buttonTypes.negative} ${buttonColors.destructive}`,
1200
- negativeSmallDisabled: `${buttonSizes.small} ${buttonTextSizes.xsmall} ${buttonTypes.negative} ${buttonVariants.isDisabled}`,
1201
- negativeSmallQuiet: `${buttonSizes.small} ${buttonTextSizes.xsmall} ${buttonVariants.negativeQuiet} ${buttonColors.negativeQuiet}`,
1202
- negativeSmallQuietDisabled: `${buttonSizes.small} ${buttonTextSizes.xsmall} ${buttonVariants.negativeQuiet} ${buttonVariants.isDisabled}`,
1203
- negativeLoading: `${buttonSizes.large} ${buttonTextSizes.medium} ${buttonTypes.negative} ${buttonVariants.inProgress}`,
1204
- negativeSmallLoading: `${buttonSizes.small} ${buttonTextSizes.xsmall} ${buttonVariants.inProgress} ${buttonTypes.negative}`,
1205
- negativeQuietLoading: `${buttonSizes.large} ${buttonTextSizes.medium} ${buttonVariants.negativeQuiet} ${buttonTypes.negative} ${buttonVariants.inProgress}`,
1206
- negativeSmallQuietLoading: `${buttonSizes.small} ${buttonTextSizes.xsmall} ${buttonVariants.negativeQuiet} ${buttonVariants.inProgress}`,
1207
- pill: `${buttonSizes.pill} ${buttonTextSizes.medium} ${buttonTypes.pill} ${buttonColors.pill}`,
1208
- // .button--pill
1209
- pillSmall: `${buttonSizes.pillSmall} ${buttonTextSizes.xsmall} ${buttonTypes.pill} ${buttonColors.pill}`,
1210
- pillLoading: `${buttonSizes.pill} ${buttonTextSizes.medium} ${buttonTypes.pill} ${buttonVariants.inProgress}`,
1211
- pillSmallLoading: `${buttonSizes.pillSmall} ${buttonTextSizes.xsmall} ${buttonTypes.pill} ${buttonVariants.inProgress}`,
1212
- link: `${buttonSizes.link} ${buttonTextSizes.medium} ${buttonTypes.link}`,
1213
- linkSmall: `${buttonSizes.link} ${buttonTextSizes.xsmall} ${buttonTypes.link}`,
1214
- linkAsButton: "inline-block active:no-underline hover:no-underline focus:no-underline text-center",
1215
- a11y: "sr-only",
1216
- fullWidth: "w-full max-w-full",
1217
- contentWidth: "max-w-max"
1218
- };
1219
- var modal = {
1220
- transparentBg: "",
1221
- //TODO: Remove in v2 - previously used for opacity before changing to a rgba background in backdrop
1222
- 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]",
1223
- modal: "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",
1224
- content: "block overflow-y-auto overflow-x-hidden last-child:mb-0 grow shrink px-16 sm:px-32 relative",
1225
- footer: "flex justify-end shrink-0 px-16 sm:px-32",
1226
- transitionTitle: "transition-all duration-300",
1227
- transitionTitleCenter: "justify-self-center self-center",
1228
- transitionTitleColSpan: "col-span-2",
1229
- title: "py-8 sm:py-0 -mt-4 sm:-mt-8 min-h-40 sm:min-h-48 grid gap-8 sm:gap-16 grid-cols-[auto_1fr_auto] items-start px-16 sm:px-32 border-b sm:border-b-0 shrink-0",
1230
- titleText: "mb-0 h4 sm:h3",
1231
- titleButton: `${buttonTextSizes.medium} ${buttonTypes.pill} ${buttonColors.pill} sm:min-h-[44px] sm:min-w-[44px] min-h-[32px] min-w-[32px]`,
1232
- titleButtonLeft: "-ml-8 sm:-ml-12 justify-self-start",
1233
- titleButtonRight: "-mr-8 sm:-mr-12 justify-self-end",
1234
- titleButtonIcon: "h-16 w-16 sm:h-24 sm:w-24",
1235
- titleButtonIconRotated: "transform rotate-90"
1236
- };
1237
- var label = {
1238
- label: "antialiased block relative text-s font-bold pb-4 cursor-pointer s-text",
1239
- optional: "pl-8 font-normal text-s s-text-subtle",
1240
- labelInvalid: "s-text-negative"
1241
- // TODO: Remove in v2 - kept for backwards compatibility
1242
- };
1243
- var prefixSuffixWrapperBase = "absolute top-0 bottom-0 flex justify-center items-center focusable rounded-4 focus:[--w-outline-offset:-2px] bg-transparent ";
1244
- var suffix = {
1245
- wrapper: prefixSuffixWrapperBase + "right-0",
1246
- wrapperWithLabel: "w-max pr-12",
1247
- wrapperWithIcon: "w-40",
1248
- label: "antialiased block relative cursor-default pb-0 font-bold text-xs s-text"
1249
- };
1250
- var prefix = {
1251
- wrapper: prefixSuffixWrapperBase + "left-0",
1252
- wrapperWithLabel: "w-max pl-12",
1253
- wrapperWithIcon: "w-40",
1254
- label: "antialiased block relative cursor-default pb-0 font-bold text-xs s-text"
1255
- };
1256
- var toggle = {
1257
- // wrapper classes
1258
- field: "relative text-m",
1259
- // true
1260
- wrapper: "relative py-1",
1261
- // true
1262
- wrapperRadioButtons: "inline-flex font-bold rounded-8 focus-within:focusable",
1263
- // isRadioButton && !isEqualWidth
1264
- wrapperRadioButtonsJustified: "flex font-bold rounded-8 focus-within:focusable",
1265
- // isRadioButton && isEqualWidth,
1266
- // group classes
1267
- radioButtonsGroup: "group",
1268
- // isRadioButton
1269
- radioButtonsGroupJustified: "grow-1 shrink-0 basis-auto",
1270
- // isRadioButton && isEqualWidth
1271
- // input classes
1272
- input: "peer",
1273
- a11y: "sr-only",
1274
- // label classes
1275
- label: "peer-focus:focusable cursor-pointer text-m s-text s-border py-2 pl-28 select-none relative block before:border before:absolute before:transition-all before:left-0 before:w-20 before:h-20 before:top-2",
1276
- // !isRadioButton
1277
- labelBefore: 'before:content-[""] before:block',
1278
- // !isRadioButton && !isIndeterminate
1279
- checkbox: "before:s-bg before:rounded-2 hover:before:s-border-primary hover:before:s-bg-hover peer-checked:before:bg-center peer-checked:before:bg-[url(var(--w-form-check-mark))] peer-checked:before:s-border-primary peer-checked:before:s-bg-primary peer-checked:peer-hover:before:s-border-primary-hover peer-checked:peer-hover:before:s-bg-primary-hover",
1280
- // isCheckbox && !isIndeterminate && !isInvalid && !isDisabled
1281
- checkboxInvalid: "before:s-bg before:s-border-negative before:rounded-2 hover:before:s-bg-negative-subtle-hover hover:before:s-border-negative-hover peer-checked:before:bg-center peer-checked:before:bg-[url(var(--w-form-check-mark))] peer-checked:before:s-bg-negative peer-checked:before:s-border-negative peer-checked:peer-hover:before:s-bg-negative-hover peer-checked:peer-hover:before:s-border-negative-hover",
1282
- // isCheckbox && !isIndeterminate && isInvalid && !isDisabled
1283
- checkboxDisabled: "before:s-bg-disabled-subtle before:s-border-disabled pointer-events-none before:rounded-2 peer-checked:before:bg-center peer-checked:before:bg-[url(var(--w-form-check-mark))] peer-checked:before:s-border-disabled peer-checked:before:s-bg-disabled",
1284
- // isCheckbox && !isIndeterminate && !isInvalid && isDisabled
1285
- indeterminate: 'before:content-["\u2013"] before:rounded-2 before:leading-xs before:text-center before:font-bold before:s-icon-inverted peer-indeterminate:before:s-border-primary peer-indeterminate:before:s-bg-primary peer-indeterminate:hover:before:s-border-primary-hover peer-indeterminate:hover:before:s-bg-primary-hover',
1286
- // isCheckbox && isIndeterminate && !isInvalid && !isDisabled
1287
- indeterminateInvalid: 'before:content-["\u2013"] before:rounded-2 before:leading-xs before:text-center before:font-bold before:s-icon-inverted peer-indeterminate:before:s-border-negative peer-indeterminate:before:s-bg-negative peer-indeterminate:hover:before:s-border-negative-hover peer-indeterminate:hover:before:s-bg-negative-hover',
1288
- // isCheckbox && isIndeterminate && isInvalid && !isDisabled
1289
- indeterminateDisabled: 'before:content-["\u2013"] before:rounded-2 before:leading-xs before:text-center before:font-bold pointer-events-none before:s-icon-inverted peer-indeterminate:before:s-border-disabled peer-indeterminate:before:s-bg-disabled',
1290
- // isCheckbox && isIndeterminate && !isInvalid && isDisabled
1291
- radio: "before:s-bg before:rounded-full peer-checked:before:border-[6] peer-checked:before:s-border-selected peer-checked:peer-hover:before:s-border-selected-hover peer-hover:before:s-border-primary peer-hover:before:s-bg-hover",
1292
- // isRadio && !isDisabled && !isInvalid
1293
- radioInvalid: "before:s-bg before:s-border-negative before:rounded-full peer-checked:before:border-[6] peer-hover:before:s-bg-negative-subtle peer-hover:before:s-border-negative-hover peer-checked:before:s-border-negative peer-checked:peer-hover:before:s-border-negative-hover",
1294
- // isRadio && isInvalid && !isDisabled
1295
- radioDisabled: "before:s-bg-disabled-subtle before:s-border-disabled pointer-events-none before:rounded-full peer-checked:before:border-[6]",
1296
- // isRadio && !isInvalid && isDisabled
1297
- radioButtonsLabel: "peer-hover:peer-not-checked:s-bg-hover peer-checked:s-text-inverted peer-checked:s-bg-primary peer-checked:s-border-primary block relative font-bold cursor-pointer s-text-link text-center s-bg border-2 s-border group-first-of-type:rounded-tl-8 group-first-of-type:rounded-bl-8 group-last-of-type:rounded-tr-8 group-last-of-type:rounded-br-8 group-not-last-of-type:border-r-0 peer-checked:z-10 group-not-first:-ml-2",
1298
- // isRadioButtons
1299
- radioButtonsRegular: "text-s py-8 pl-12 pr-14",
1300
- // isRadioButtons && !isSmall
1301
- radioButtonsSmall: "text-xs py-[5px] px-[8px]"
1302
- // isRadioButtons && isSmall
1303
- };
1304
- var deadToggle = {
1305
- wrapper: `${toggle.wrapper} h-20 w-20 pointer-events-none`,
1306
- input: `${toggle.input} hidden`,
1307
- inputVue: "hidden",
1308
- labelRadio: `${toggle.label} ${toggle.labelBefore} ${toggle.radio}`,
1309
- labelCheckbox: `${toggle.label} ${toggle.labelBefore} ${toggle.checkbox}`,
1310
- labelVue: "-mt-2"
1311
- };
1312
- var clickable = {
1313
- toggle: "absolute inset-0 h-full w-full appearance-none cursor-pointer focusable focusable-inset",
1314
- label: `px-12 ${label.label} py-8! cursor-pointer focusable focusable-inset`,
1315
- buttonOrLink: "bg-transparent focusable",
1316
- buttonOrLinkStretch: "inset-0 absolute"
1317
- };
1318
- var attention = {
1319
- base: "border-2 relative flex items-start",
1320
- tooltip: "s-bg-inverted border-[--w-s-color-background-inverted] shadow-m s-text-inverted-static rounded-4 py-6 px-8",
1321
- callout: "bg-[--w-color-callout-background] border-[--w-color-callout-border] s-text py-8 px-16 rounded-8",
1322
- highlight: "bg-[--w-color-callout-background] border-[--w-color-callout-border] s-text py-8 px-16 rounded-8 drop-shadow-m translate-z-0",
1323
- popover: "bg-[--w-s-color-surface-elevated-300] border-[--w-s-color-surface-elevated-300] s-text rounded-8 p-16 drop-shadow-m translate-z-0",
1324
- arrowBase: "absolute h-[14px] w-[14px] border-2 border-b-0 border-r-0 rounded-tl-4 transform",
1325
- arrowDirectionLeftStart: "-left-[8px]",
1326
- arrowDirectionLeft: "-left-[8px]",
1327
- arrowDirectionLeftEnd: "-left-[8px]",
1328
- arrowDirectionRightStart: "-right-[8px]",
1329
- arrowDirectionRight: "-right-[8px]",
1330
- arrowDirectionRightEnd: "-right-[8px]",
1331
- arrowDirectionBottomStart: "-bottom-[8px]",
1332
- arrowDirectionBottom: "-bottom-[8px]",
1333
- arrowDirectionBottomEnd: "-bottom-[8px]",
1334
- arrowDirectionTopStart: "-top-[8px]",
1335
- arrowDirectionTop: "-top-[8px]",
1336
- arrowDirectionTopEnd: "-top-[8px]",
1337
- arrowTooltip: "s-bg-inverted border-[--w-s-color-background-inverted]",
1338
- arrowCallout: "bg-[--w-color-callout-background] border-[--w-color-callout-border]",
1339
- arrowPopover: "bg-[--w-s-color-surface-elevated-300] border-[--w-s-color-surface-elevated-300]",
1340
- arrowHighlight: "bg-[--w-color-callout-background] border-[--w-color-callout-border]",
1341
- content: "last-child:mb-0",
1342
- notCallout: "absolute z-50",
1343
- closeBtn: `${buttonTextSizes.medium} ${buttonTypes.pill} ${buttonColors.pill} justify-self-end -mr-8 ml-8`
1344
- };
1345
-
1346
- // node_modules/.pnpm/@floating-ui+utils@0.2.1/node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs
1347
- var sides = ["top", "right", "bottom", "left"];
1348
- var min = Math.min;
1349
- var max = Math.max;
1350
- var round = Math.round;
1351
- var createCoords = (v) => ({
1352
- x: v,
1353
- y: v
1354
- });
1355
- var oppositeSideMap = {
1356
- left: "right",
1357
- right: "left",
1358
- bottom: "top",
1359
- top: "bottom"
1390
+ function setupI18n(params = {}) {
1391
+ return new I18n(params);
1392
+ }
1393
+ var i18n = setupI18n();
1394
+
1395
+ // node_modules/.pnpm/@floating-ui+utils@0.2.1/node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs
1396
+ var sides = ["top", "right", "bottom", "left"];
1397
+ var min = Math.min;
1398
+ var max = Math.max;
1399
+ var round = Math.round;
1400
+ var createCoords = (v) => ({
1401
+ x: v,
1402
+ y: v
1403
+ });
1404
+ var oppositeSideMap = {
1405
+ left: "right",
1406
+ right: "left",
1407
+ bottom: "top",
1408
+ top: "bottom"
1360
1409
  };
1361
1410
  var oppositeAlignmentMap = {
1362
1411
  start: "end",
@@ -2471,7 +2520,7 @@ var computePosition2 = (reference, floating, options) => {
2471
2520
  }));
2472
2521
  };
2473
2522
 
2474
- // node_modules/.pnpm/@warp-ds+core@1.1.1_@floating-ui+dom@1.6.3/node_modules/@warp-ds/core/dist/attention/utils/helpers.js
2523
+ // node_modules/.pnpm/@warp-ds+core@1.1.2_@floating-ui+dom@1.6.3/node_modules/@warp-ds/core/dist/attention/utils/helpers.js
2475
2524
  var TOP_START = "top-start";
2476
2525
  var TOP = "top";
2477
2526
  var TOP_END = "top-end";
@@ -2526,8 +2575,6 @@ var rotation = {
2526
2575
  [BOTTOM]: -135,
2527
2576
  [BOTTOM_END]: -135
2528
2577
  };
2529
- var middlePosition = "calc(50% - 7px)";
2530
- var isDirectionVertical = (name) => [TOP_START, TOP, TOP_END, BOTTOM_START, BOTTOM, BOTTOM_END].includes(name);
2531
2578
  var arrowDirectionClassname = (dir) => {
2532
2579
  let direction;
2533
2580
  if (/-/.test(dir)) {
@@ -2550,17 +2597,6 @@ var applyArrowStyles = (arrowEl, arrowRotation2, dir) => {
2550
2597
  transform: `rotate(${arrowRotation2}deg)`
2551
2598
  });
2552
2599
  };
2553
- function computeCalloutArrow({ actualDirection, directionName = BOTTOM, arrowEl }) {
2554
- if (!arrowEl)
2555
- return;
2556
- actualDirection = directionName;
2557
- const directionIsVertical = isDirectionVertical(directionName);
2558
- Object.assign((arrowEl == null ? void 0 : arrowEl.style) || {}, {
2559
- left: directionIsVertical ? middlePosition : "",
2560
- top: !directionIsVertical ? middlePosition : ""
2561
- });
2562
- applyArrowStyles(arrowEl, arrowRotation(actualDirection), actualDirection);
2563
- }
2564
2600
  async function useRecompute(state) {
2565
2601
  var _a, _b, _c;
2566
2602
  if (!(state == null ? void 0 : state.isShowing))
@@ -2568,33 +2604,34 @@ async function useRecompute(state) {
2568
2604
  if (state == null ? void 0 : state.waitForDOM) {
2569
2605
  await (state == null ? void 0 : state.waitForDOM());
2570
2606
  }
2571
- if (state == null ? void 0 : state.isCallout)
2572
- return computeCalloutArrow(state);
2573
2607
  if (!(state == null ? void 0 : state.targetEl) || !(state == null ? void 0 : state.attentionEl))
2574
2608
  return;
2575
- const targetEl = state == null ? void 0 : state.targetEl;
2576
- const attentionEl = state == null ? void 0 : state.attentionEl;
2609
+ let targetEl = state == null ? void 0 : state.targetEl;
2610
+ const attentionEl = state.attentionEl;
2577
2611
  computePosition2(targetEl, attentionEl, {
2578
2612
  placement: (_a = state == null ? void 0 : state.directionName) != null ? _a : BOTTOM,
2579
2613
  middleware: [
2580
2614
  offset({ mainAxis: (_b = state == null ? void 0 : state.distance) != null ? _b : 8, crossAxis: (_c = state == null ? void 0 : state.skidding) != null ? _c : 0 }),
2581
2615
  (state == null ? void 0 : state.flip) && flip2({
2616
+ // when flip is set to true it will move the attentionEl's placement to its opposite side or to the preferred placements if fallbackPlacements has a value
2582
2617
  crossAxis: state == null ? void 0 : state.crossAxis,
2583
2618
  fallbackPlacements: state == null ? void 0 : state.fallbackPlacements
2584
2619
  }),
2585
2620
  !(state == null ? void 0 : state.noArrow) && (state == null ? void 0 : state.arrowEl) && arrow2({ element: state == null ? void 0 : state.arrowEl }),
2586
2621
  hide2()
2587
- //will hide the attentionEl when it appears detached from the targetEl. Can be called multiple times in the middleware-array if you want to use several strategies. Default strategy is 'referenceHidden'.
2622
+ // will hide the attentionEl when it appears detached from the targetEl. Can be called multiple times in the middleware-array if you want to use several strategies. Default strategy is 'referenceHidden'.
2588
2623
  ]
2589
2624
  }).then(({ x, y, middlewareData, placement }) => {
2590
2625
  state.actualDirection = placement;
2591
- Object.assign(attentionEl == null ? void 0 : attentionEl.style, {
2592
- left: `${x}px`,
2593
- top: `${y}px`
2594
- });
2626
+ if (!(state == null ? void 0 : state.isCallout)) {
2627
+ Object.assign(attentionEl.style, {
2628
+ left: `${x}px`,
2629
+ top: `${y}px`
2630
+ });
2631
+ }
2595
2632
  if ((middlewareData == null ? void 0 : middlewareData.hide) && !(state == null ? void 0 : state.isCallout)) {
2596
- const { referenceHidden } = middlewareData == null ? void 0 : middlewareData.hide;
2597
- Object.assign(attentionEl == null ? void 0 : attentionEl.style, {
2633
+ const { referenceHidden } = middlewareData.hide;
2634
+ Object.assign(attentionEl.style, {
2598
2635
  visibility: referenceHidden ? "hidden" : ""
2599
2636
  });
2600
2637
  }
@@ -2602,26 +2639,26 @@ async function useRecompute(state) {
2602
2639
  const arrowPlacement = arrowDirection(placement).split("-")[1];
2603
2640
  if ((middlewareData == null ? void 0 : middlewareData.arrow) && (state == null ? void 0 : state.arrowEl)) {
2604
2641
  const arrowEl = state == null ? void 0 : state.arrowEl;
2605
- const { x: x2, y: y2 } = middlewareData == null ? void 0 : middlewareData.arrow;
2642
+ const { x: arrowX, y: arrowY } = middlewareData.arrow;
2606
2643
  let top = "";
2607
2644
  let right = "";
2608
2645
  let bottom = "";
2609
2646
  let left = "";
2610
2647
  if (arrowPlacement === "start") {
2611
- const value = typeof x2 === "number" ? `calc(33px - ${(arrowEl == null ? void 0 : arrowEl.offsetWidth) / 2}px)` : "";
2612
- top = typeof y2 === "number" ? `calc(33px - ${(arrowEl == null ? void 0 : arrowEl.offsetWidth) / 2}px)` : "";
2648
+ const value = typeof arrowX === "number" ? `calc(24px - ${arrowEl.offsetWidth / 2}px)` : "";
2649
+ top = typeof arrowY === "number" ? `calc(24px - ${arrowEl.offsetWidth / 2}px)` : "";
2613
2650
  right = isRtl ? value : "";
2614
2651
  left = isRtl ? "" : value;
2615
2652
  } else if (arrowPlacement === "end") {
2616
- const value = typeof x2 === "number" ? `calc(33px - ${(arrowEl == null ? void 0 : arrowEl.offsetWidth) / 2}px)` : "";
2653
+ const value = typeof arrowX === "number" ? `calc(24px - ${arrowEl.offsetWidth / 2}px)` : "";
2617
2654
  right = isRtl ? "" : value;
2618
2655
  left = isRtl ? value : "";
2619
- bottom = typeof y2 === "number" ? `calc(33px - ${(arrowEl == null ? void 0 : arrowEl.offsetWidth) / 2}px)` : "";
2656
+ bottom = typeof arrowY === "number" ? `calc(24px - ${arrowEl.offsetWidth / 2}px)` : "";
2620
2657
  } else {
2621
- left = typeof x2 === "number" ? `${x2}px` : "";
2622
- top = typeof y2 === "number" ? `${y2}px` : "";
2658
+ left = typeof arrowX === "number" ? `${arrowX}px` : "";
2659
+ top = typeof arrowY === "number" ? `${arrowY}px` : "";
2623
2660
  }
2624
- Object.assign((arrowEl == null ? void 0 : arrowEl.style) || {}, {
2661
+ Object.assign(arrowEl.style, {
2625
2662
  top,
2626
2663
  right,
2627
2664
  bottom,
@@ -2633,376 +2670,292 @@ async function useRecompute(state) {
2633
2670
  return state;
2634
2671
  }
2635
2672
 
2636
- // node_modules/.pnpm/@lingui+core@4.7.1/node_modules/@lingui/core/dist/index.mjs
2637
- var import_unraw = __toESM(require_dist(), 1);
2638
-
2639
- // node_modules/.pnpm/@lingui+message-utils@4.7.1/node_modules/@lingui/message-utils/dist/compileMessage.mjs
2640
- var import_parser = __toESM(require_parser(), 1);
2641
- function processTokens(tokens, mapText) {
2642
- if (!tokens.filter((token) => token.type !== "content").length) {
2643
- return tokens.map((token) => mapText(token.value)).join("");
2644
- }
2645
- return tokens.map((token) => {
2646
- var _a;
2647
- if (token.type === "content") {
2648
- return mapText(token.value);
2649
- } else if (token.type === "octothorpe") {
2650
- return "#";
2651
- } else if (token.type === "argument") {
2652
- return [token.arg];
2653
- } else if (token.type === "function") {
2654
- const _param = (_a = token == null ? void 0 : token.param) == null ? void 0 : _a[0];
2655
- if (_param) {
2656
- return [token.arg, token.key, _param.value.trim()];
2657
- } else {
2658
- return [token.arg, token.key];
2659
- }
2660
- }
2661
- const offset2 = token.pluralOffset;
2662
- const formatProps = {};
2663
- token.cases.forEach((item) => {
2664
- formatProps[item.key.replace(/^=(.)+/, "$1")] = processTokens(
2665
- item.tokens,
2666
- mapText
2667
- );
2668
- });
2669
- return [
2670
- token.arg,
2671
- token.type,
2672
- __spreadValues({
2673
- offset: offset2
2674
- }, formatProps)
2675
- ];
2676
- });
2677
- }
2678
- function compileMessage(message, mapText = (v) => v) {
2679
- try {
2680
- return processTokens((0, import_parser.parse)(message), mapText);
2681
- } catch (e) {
2682
- console.error(`${e.message}
2683
-
2684
- Message: ${message}`);
2685
- return message;
2686
- }
2687
- }
2688
-
2689
- // node_modules/.pnpm/@lingui+core@4.7.1/node_modules/@lingui/core/dist/index.mjs
2690
- var isString = (s) => typeof s === "string";
2691
- var isFunction = (f) => typeof f === "function";
2692
- var cache = /* @__PURE__ */ new Map();
2693
- var defaultLocale = "en";
2694
- function normalizeLocales(locales) {
2695
- const out = Array.isArray(locales) ? locales : [locales];
2696
- return [...out, defaultLocale];
2697
- }
2698
- function date(locales, value, format) {
2699
- const _locales = normalizeLocales(locales);
2700
- const formatter = getMemoized(
2701
- () => cacheKey("date", _locales, format),
2702
- () => new Intl.DateTimeFormat(_locales, format)
2703
- );
2704
- return formatter.format(isString(value) ? new Date(value) : value);
2705
- }
2706
- function number(locales, value, format) {
2707
- const _locales = normalizeLocales(locales);
2708
- const formatter = getMemoized(
2709
- () => cacheKey("number", _locales, format),
2710
- () => new Intl.NumberFormat(_locales, format)
2711
- );
2712
- return formatter.format(value);
2713
- }
2714
- function plural(locales, ordinal, value, _a) {
2715
- var _b = _a, { offset: offset2 = 0 } = _b, rules = __objRest(_b, ["offset"]);
2716
- var _a2, _b2;
2717
- const _locales = normalizeLocales(locales);
2718
- const plurals = ordinal ? getMemoized(
2719
- () => cacheKey("plural-ordinal", _locales),
2720
- () => new Intl.PluralRules(_locales, { type: "ordinal" })
2721
- ) : getMemoized(
2722
- () => cacheKey("plural-cardinal", _locales),
2723
- () => new Intl.PluralRules(_locales, { type: "cardinal" })
2724
- );
2725
- return (_b2 = (_a2 = rules[value]) != null ? _a2 : rules[plurals.select(value - offset2)]) != null ? _b2 : rules.other;
2726
- }
2727
- function getMemoized(getKey, construct) {
2728
- const key = getKey();
2729
- let formatter = cache.get(key);
2730
- if (!formatter) {
2731
- formatter = construct();
2732
- cache.set(key, formatter);
2733
- }
2734
- return formatter;
2735
- }
2736
- function cacheKey(type, locales, options) {
2737
- const localeKey = locales.join("-");
2738
- return `${type}-${localeKey}-${JSON.stringify(options)}`;
2739
- }
2740
- var UNICODE_REGEX = /\\u[a-fA-F0-9]{4}|\\x[a-fA-F0-9]{2}/g;
2741
- var OCTOTHORPE_PH = "%__lingui_octothorpe__%";
2742
- var getDefaultFormats = (locale, passedLocales, formats = {}) => {
2743
- const locales = passedLocales || locale;
2744
- const style = (format) => {
2745
- return typeof format === "object" ? format : formats[format] || { style: format };
2746
- };
2747
- const replaceOctothorpe = (value, message) => {
2748
- const numberFormat = Object.keys(formats).length ? style("number") : void 0;
2749
- const valueStr = number(locales, value, numberFormat);
2750
- return message.replace(new RegExp(OCTOTHORPE_PH, "g"), valueStr);
2751
- };
2752
- return {
2753
- plural: (value, cases) => {
2754
- const { offset: offset2 = 0 } = cases;
2755
- const message = plural(locales, false, value, cases);
2756
- return replaceOctothorpe(value - offset2, message);
2757
- },
2758
- selectordinal: (value, cases) => {
2759
- const { offset: offset2 = 0 } = cases;
2760
- const message = plural(locales, true, value, cases);
2761
- return replaceOctothorpe(value - offset2, message);
2762
- },
2763
- select: selectFormatter,
2764
- number: (value, format) => number(locales, value, style(format)),
2765
- date: (value, format) => date(locales, value, style(format))
2766
- };
2673
+ // node_modules/.pnpm/@warp-ds+css@1.9.7/node_modules/@warp-ds/css/component-classes/index.js
2674
+ var box = {
2675
+ box: "group block relative break-words last-child:mb-0 p-16 rounded-8",
2676
+ // Relative here enables w-clickable
2677
+ bleed: "-mx-16 sm:mx-0 rounded-l-0 rounded-r-0 sm:rounded-8",
2678
+ // We target L and R to override the default rounded-8
2679
+ info: "s-bg-info-subtle",
2680
+ neutral: "s-surface-sunken",
2681
+ bordered: "border-2 s-border s-bg",
2682
+ infoClickable: "hover:s-bg-info-subtle-hover active:s-bg-info-subtle-active",
2683
+ // Deprecated - Remove in v2 (after removing Clickable prop in the Box components)
2684
+ neutralClickable: "hover:s-bg-hover active:s-bg-active",
2685
+ // Deprecated - Remove in v2 (after removing Clickable prop in the Box components)
2686
+ borderedClickable: "hover:s-bg-hover active:s-bg-active hover:s-border-hover active:s-border-active"
2687
+ // Deprecated - Remove in v2 (after removing Clickable prop in the Box components)
2767
2688
  };
2768
- var selectFormatter = (value, rules) => {
2769
- var _a;
2770
- return (_a = rules[value]) != null ? _a : rules.other;
2689
+ var buttonReset = "focus:outline-none appearance-none cursor-pointer bg-transparent border-0 m-0 p-0 inline-block";
2690
+ var expandable = {
2691
+ expandable: "will-change-height",
2692
+ expandableTitle: "font-bold s-text",
2693
+ expandableBox: "s-surface-sunken hover:s-bg-hover active:s-bg-active py-0 px-0 " + box.box,
2694
+ expandableInfo: "s-bg-info-subtle! hover:s-bg-info-subtle-hover!",
2695
+ expandableBleed: box.bleed,
2696
+ chevron: "inline-block align-middle s-icon",
2697
+ chevronNonBox: "ml-8",
2698
+ chevronBox: "",
2699
+ chevronTransform: "transform transition-transform transform-gpu ease-in-out",
2700
+ chevronExpand: "-rotate-180",
2701
+ chevronCollapse: "rotate-180",
2702
+ 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",
2703
+ elementsChevronDownExpandPart: "part-[w-icon-chevron-down-16-part]:-rotate-180",
2704
+ 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",
2705
+ elementsChevronUpCollapsePart: "part-[w-icon-chevron-up-16-part]:rotate-180",
2706
+ expansion: "overflow-hidden",
2707
+ expansionNotExpanded: "h-0 invisible",
2708
+ button: buttonReset + " hover:underline focus-visible:underline",
2709
+ buttonBox: "w-full text-left relative inline-flex items-center justify-between " + box.box,
2710
+ paddingTop: "pt-0",
2711
+ title: "flex w-full justify-between items-center",
2712
+ titleType: "h4"
2771
2713
  };
2772
- function interpolate(translation, locale, locales) {
2773
- return (values = {}, formats) => {
2774
- const formatters = getDefaultFormats(locale, locales, formats);
2775
- const formatMessage = (tokens) => {
2776
- if (!Array.isArray(tokens))
2777
- return tokens;
2778
- return tokens.reduce((message, token) => {
2779
- if (token === "#") {
2780
- return message + OCTOTHORPE_PH;
2781
- }
2782
- if (isString(token)) {
2783
- return message + token;
2784
- }
2785
- const [name, type, format] = token;
2786
- let interpolatedFormat = {};
2787
- if (type === "plural" || type === "selectordinal" || type === "select") {
2788
- Object.entries(format).forEach(
2789
- ([key, value2]) => {
2790
- interpolatedFormat[key] = formatMessage(value2);
2791
- }
2792
- );
2793
- } else {
2794
- interpolatedFormat = format;
2795
- }
2796
- let value;
2797
- if (type) {
2798
- const formatter = formatters[type];
2799
- value = formatter(values[name], interpolatedFormat);
2800
- } else {
2801
- value = values[name];
2802
- }
2803
- if (value == null) {
2804
- return message;
2805
- }
2806
- return message + value;
2807
- }, "");
2808
- };
2809
- const result = formatMessage(translation);
2810
- if (isString(result) && UNICODE_REGEX.test(result)) {
2811
- return (0, import_unraw.unraw)(result.trim());
2812
- }
2813
- if (isString(result))
2814
- return result.trim();
2815
- return result ? String(result) : "";
2816
- };
2817
- }
2818
- var __defProp$1 = Object.defineProperty;
2819
- var __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2820
- var __publicField$1 = (obj, key, value) => {
2821
- __defNormalProp$1(obj, typeof key !== "symbol" ? key + "" : key, value);
2822
- return value;
2714
+ var buttonDefaultStyling = "font-bold focusable justify-center transition-colors ease-in-out";
2715
+ var buttonColors = {
2716
+ 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]",
2717
+ secondary: "s-text-link s-border s-bg hover:s-bg-hover hover:s-border-hover active:s-bg-active",
2718
+ utility: "s-text s-bg hover:s-bg-hover active:s-bg-active s-border hover:s-border-hover active:s-border-active",
2719
+ destructive: "s-bg-negative s-text-inverted hover:s-bg-negative-hover active:s-bg-negative-active",
2720
+ pill: "s-icon hover:s-icon-hover active:s-icon-active bg-transparent hover:bg-[--w-color-button-pill-background-hover] active:bg-[--w-color-button-pill-background-active]",
2721
+ disabled: "s-text-inverted s-bg-disabled",
2722
+ quiet: "bg-transparent s-text-link hover:s-bg-hover active:s-bg-active",
2723
+ utilityQuiet: "s-text bg-transparent hover:s-bg-hover active:s-bg-active",
2724
+ negativeQuiet: "bg-transparent s-text-negative hover:s-bg-negative-subtle-hover active:s-bg-negative-subtle-active",
2725
+ loading: "s-text s-bg-subtle",
2726
+ link: "s-text-link"
2727
+ };
2728
+ var buttonTypes = {
2729
+ primary: `border-0 rounded-8 ${buttonDefaultStyling}`,
2730
+ secondary: `border-2 rounded-8 ${buttonDefaultStyling}`,
2731
+ utility: `border rounded-4 ${buttonDefaultStyling}`,
2732
+ negative: `border-0 rounded-8 ${buttonDefaultStyling}`,
2733
+ pill: `p-4 rounded-full border-0 inline-flex items-center justify-center hover:bg-clip-padding ${buttonDefaultStyling}`,
2734
+ link: `bg-transparent focusable ease-in-out inline active:underline hover:underline focus:underline ${buttonColors.link}`
2735
+ };
2736
+ var buttonSizes = {
2737
+ xsmall: "py-6 px-16",
2738
+ small: "py-8 px-16",
2739
+ medium: "py-10 px-14",
2740
+ large: "py-12 px-16",
2741
+ utility: "py-[11px] px-[15px]",
2742
+ smallUtility: "py-[7px] px-[15px]",
2743
+ pill: "min-h-[44px] min-w-[44px]",
2744
+ pillSmall: "min-h-32 min-w-32",
2745
+ link: "p-0"
2746
+ };
2747
+ var buttonTextSizes = {
2748
+ medium: "text-m leading-[24]",
2749
+ xsmall: "text-xs"
2750
+ };
2751
+ var buttonVariants = {
2752
+ inProgress: `border-transparent animate-inprogress pointer-events-none ${buttonColors.loading}`,
2753
+ // .button--in-progress, a.button--in-progress:visited
2754
+ quiet: `border-0 rounded-8 ${buttonDefaultStyling}`,
2755
+ utilityQuiet: `border-0 rounded-4 ${buttonDefaultStyling}`,
2756
+ negativeQuiet: `border-0 rounded-8 ${buttonDefaultStyling}`,
2757
+ isDisabled: `font-bold justify-center transition-colors ease-in-out cursor-default pointer-events-none ${buttonColors.disabled}`
2758
+ // .button:disabled, .button--is-disabled
2759
+ };
2760
+ var button = {
2761
+ // Buttontypes
2762
+ secondary: `${buttonSizes.medium} ${buttonTextSizes.medium} ${buttonTypes.secondary} ${buttonColors.secondary}`,
2763
+ // .button--secondary, .button--default, .button
2764
+ secondaryHref: `${buttonSizes.medium} ${buttonTextSizes.medium} ${buttonTypes.secondary} ${buttonColors.secondary}`,
2765
+ secondaryDisabled: `${buttonSizes.medium} ${buttonTextSizes.medium} ${buttonTypes.secondary} ${buttonVariants.isDisabled}`,
2766
+ secondarySmall: `${buttonTextSizes.xsmall} ${buttonSizes.xsmall} ${buttonTypes.secondary} ${buttonColors.secondary}`,
2767
+ secondarySmallDisabled: `${buttonTextSizes.xsmall} ${buttonSizes.xsmall} ${buttonTypes.secondary} ${buttonVariants.isDisabled}`,
2768
+ secondaryQuiet: `${buttonSizes.medium} ${buttonTextSizes.medium} ${buttonVariants.quiet} ${buttonColors.quiet}`,
2769
+ secondaryQuietDisabled: `${buttonSizes.medium} ${buttonTextSizes.medium} ${buttonVariants.quiet} ${buttonVariants.isDisabled}`,
2770
+ secondarySmallQuiet: `${buttonTextSizes.xsmall} ${buttonSizes.xsmall} ${buttonVariants.quiet} ${buttonColors.quiet}`,
2771
+ secondarySmallQuietDisabled: `${buttonTextSizes.xsmall} ${buttonSizes.xsmall} ${buttonVariants.quiet} ${buttonVariants.isDisabled}`,
2772
+ secondaryLoading: `${buttonSizes.medium} ${buttonTextSizes.medium} ${buttonTypes.secondary} ${buttonVariants.inProgress}`,
2773
+ secondarySmallLoading: `${buttonTextSizes.xsmall} ${buttonSizes.xsmall} ${buttonTypes.secondary} ${buttonVariants.inProgress}`,
2774
+ secondarySmallQuietLoading: `${buttonTextSizes.xsmall} ${buttonSizes.xsmall} ${buttonVariants.quiet} ${buttonVariants.inProgress}`,
2775
+ secondaryQuietLoading: `${buttonSizes.medium} ${buttonTextSizes.medium} ${buttonVariants.quiet} ${buttonVariants.inProgress}`,
2776
+ primary: `${buttonSizes.large} ${buttonTextSizes.medium} ${buttonTypes.primary} ${buttonColors.primary}`,
2777
+ // .button--primary, .button--cta
2778
+ primaryDisabled: `${buttonSizes.large} ${buttonTextSizes.medium} ${buttonVariants.isDisabled} ${buttonTypes.primary}`,
2779
+ primarySmall: `${buttonSizes.small} ${buttonTextSizes.xsmall} ${buttonTypes.primary} ${buttonColors.primary}`,
2780
+ primarySmallDisabled: `${buttonSizes.small} ${buttonTextSizes.xsmall} ${buttonVariants.isDisabled} ${buttonTypes.primary} `,
2781
+ primaryQuiet: `${buttonSizes.large} ${buttonTextSizes.medium} ${buttonVariants.quiet} ${buttonColors.quiet}`,
2782
+ primaryQuietDisabled: `${buttonSizes.large} ${buttonTextSizes.medium} ${buttonVariants.quiet} ${buttonVariants.isDisabled}`,
2783
+ primarySmallQuiet: `${buttonSizes.small} ${buttonTextSizes.xsmall} ${buttonVariants.quiet} ${buttonColors.quiet}`,
2784
+ primarySmallQuietDisabled: `${buttonSizes.small} ${buttonTextSizes.xsmall} ${buttonVariants.quiet} ${buttonVariants.isDisabled}`,
2785
+ primaryLoading: `${buttonSizes.large} ${buttonTextSizes.medium} ${buttonVariants.inProgress} ${buttonTypes.primary}`,
2786
+ primarySmallLoading: `${buttonSizes.small} ${buttonTextSizes.xsmall} ${buttonVariants.inProgress} ${buttonTypes.primary}`,
2787
+ primarySmallQuietLoading: `${buttonSizes.small} ${buttonTextSizes.xsmall} ${buttonVariants.quiet} ${buttonVariants.inProgress} ${buttonTypes.primary}`,
2788
+ primaryQuietLoading: `${buttonSizes.large} ${buttonTextSizes.medium} ${buttonVariants.quiet} ${buttonVariants.inProgress}`,
2789
+ utility: `${buttonSizes.utility} ${buttonTextSizes.medium} ${buttonTypes.utility} ${buttonColors.utility}`,
2790
+ // .button--utility
2791
+ utilityDisabled: `${buttonSizes.utility} ${buttonTextSizes.medium} ${buttonTypes.utility} ${buttonVariants.isDisabled}`,
2792
+ utilityQuiet: `${buttonSizes.large} ${buttonTextSizes.medium} ${buttonVariants.utilityQuiet} ${buttonColors.utilityQuiet}`,
2793
+ // .button--utility-flat
2794
+ utilityQuietDisabled: `${buttonSizes.large} ${buttonTextSizes.medium} ${buttonVariants.utilityQuiet} ${buttonVariants.isDisabled}`,
2795
+ utilitySmall: `${buttonSizes.smallUtility} ${buttonTextSizes.xsmall} ${buttonTypes.utility} ${buttonColors.utility}`,
2796
+ utilitySmallDisabled: `${buttonSizes.smallUtility} ${buttonTextSizes.xsmall} ${buttonTypes.utility} ${buttonVariants.isDisabled}`,
2797
+ utilitySmallQuiet: `${buttonSizes.smallUtility} ${buttonTextSizes.xsmall} ${buttonVariants.utilityQuiet} ${buttonColors.utilityQuiet}`,
2798
+ utilitySmallQuietDisabled: `${buttonSizes.smallUtility} ${buttonTextSizes.xsmall} ${buttonVariants.utilityQuiet} ${buttonVariants.isDisabled}`,
2799
+ utilityLoading: `${buttonSizes.large} ${buttonTextSizes.medium} ${buttonTypes.utility} ${buttonVariants.inProgress}`,
2800
+ utilitySmallLoading: `${buttonSizes.smallUtility} ${buttonTextSizes.xsmall} ${buttonTypes.utility} ${buttonVariants.inProgress}`,
2801
+ utilityQuietLoading: `${buttonSizes.large} ${buttonTextSizes.medium} ${buttonVariants.inProgress} ${buttonVariants.utilityQuiet}`,
2802
+ utilitySmallQuietLoading: `${buttonSizes.smallUtility} ${buttonTextSizes.xsmall} ${buttonVariants.inProgress} ${buttonVariants.utilityQuiet}`,
2803
+ negative: `${buttonSizes.large} ${buttonTextSizes.medium} ${buttonTypes.negative} ${buttonColors.destructive}`,
2804
+ // .button--destructive
2805
+ negativeDisabled: `${buttonSizes.large} ${buttonTextSizes.medium} ${buttonTypes.negative} ${buttonVariants.isDisabled}`,
2806
+ negativeQuiet: `${buttonSizes.large} ${buttonTextSizes.medium} ${buttonVariants.negativeQuiet} ${buttonColors.negativeQuiet}`,
2807
+ // .button--destructive-flat
2808
+ negativeQuietDisabled: `${buttonSizes.large} ${buttonTextSizes.medium} ${buttonVariants.negativeQuiet}${buttonVariants.isDisabled}`,
2809
+ negativeSmall: `${buttonSizes.small} ${buttonTextSizes.xsmall} ${buttonTypes.negative} ${buttonColors.destructive}`,
2810
+ negativeSmallDisabled: `${buttonSizes.small} ${buttonTextSizes.xsmall} ${buttonTypes.negative} ${buttonVariants.isDisabled}`,
2811
+ negativeSmallQuiet: `${buttonSizes.small} ${buttonTextSizes.xsmall} ${buttonVariants.negativeQuiet} ${buttonColors.negativeQuiet}`,
2812
+ negativeSmallQuietDisabled: `${buttonSizes.small} ${buttonTextSizes.xsmall} ${buttonVariants.negativeQuiet} ${buttonVariants.isDisabled}`,
2813
+ negativeLoading: `${buttonSizes.large} ${buttonTextSizes.medium} ${buttonTypes.negative} ${buttonVariants.inProgress}`,
2814
+ negativeSmallLoading: `${buttonSizes.small} ${buttonTextSizes.xsmall} ${buttonVariants.inProgress} ${buttonTypes.negative}`,
2815
+ negativeQuietLoading: `${buttonSizes.large} ${buttonTextSizes.medium} ${buttonVariants.negativeQuiet} ${buttonTypes.negative} ${buttonVariants.inProgress}`,
2816
+ negativeSmallQuietLoading: `${buttonSizes.small} ${buttonTextSizes.xsmall} ${buttonVariants.negativeQuiet} ${buttonVariants.inProgress}`,
2817
+ pill: `${buttonSizes.pill} ${buttonTextSizes.medium} ${buttonTypes.pill} ${buttonColors.pill}`,
2818
+ // .button--pill
2819
+ pillSmall: `${buttonSizes.pillSmall} ${buttonTextSizes.xsmall} ${buttonTypes.pill} ${buttonColors.pill}`,
2820
+ pillLoading: `${buttonSizes.pill} ${buttonTextSizes.medium} ${buttonTypes.pill} ${buttonVariants.inProgress}`,
2821
+ pillSmallLoading: `${buttonSizes.pillSmall} ${buttonTextSizes.xsmall} ${buttonTypes.pill} ${buttonVariants.inProgress}`,
2822
+ link: `${buttonSizes.link} ${buttonTextSizes.medium} ${buttonTypes.link}`,
2823
+ linkSmall: `${buttonSizes.link} ${buttonTextSizes.xsmall} ${buttonTypes.link}`,
2824
+ linkAsButton: "inline-block active:no-underline hover:no-underline focus:no-underline text-center",
2825
+ a11y: "sr-only",
2826
+ fullWidth: "w-full max-w-full",
2827
+ contentWidth: "max-w-max"
2828
+ };
2829
+ var modal = {
2830
+ transparentBg: "",
2831
+ //TODO: Remove in v2 - previously used for opacity before changing to a rgba background in backdrop
2832
+ 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]",
2833
+ modal: "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",
2834
+ content: "block overflow-y-auto overflow-x-hidden last-child:mb-0 grow shrink px-16 sm:px-32 relative",
2835
+ footer: "flex justify-end shrink-0 px-16 sm:px-32",
2836
+ transitionTitle: "transition-all duration-300",
2837
+ transitionTitleCenter: "justify-self-center self-center",
2838
+ transitionTitleColSpan: "col-span-2",
2839
+ title: "py-8 sm:py-0 -mt-4 sm:-mt-8 min-h-40 sm:min-h-48 grid gap-8 sm:gap-16 grid-cols-[auto_1fr_auto] items-start px-16 sm:px-32 border-b sm:border-b-0 shrink-0",
2840
+ titleText: "mb-0 h4 sm:h3",
2841
+ titleButton: `${buttonTextSizes.medium} ${buttonTypes.pill} ${buttonColors.pill} sm:min-h-[44px] sm:min-w-[44px] min-h-[32px] min-w-[32px]`,
2842
+ titleButtonLeft: "-ml-8 sm:-ml-12 justify-self-start",
2843
+ titleButtonRight: "-mr-8 sm:-mr-12 justify-self-end",
2844
+ titleButtonIcon: "h-16 w-16 sm:h-24 sm:w-24",
2845
+ titleButtonIconRotated: "transform rotate-90"
2846
+ };
2847
+ var label = {
2848
+ label: "antialiased block relative text-s font-bold pb-4 cursor-pointer s-text",
2849
+ optional: "pl-8 font-normal text-s s-text-subtle",
2850
+ labelInvalid: "s-text-negative"
2851
+ // TODO: Remove in v2 - kept for backwards compatibility
2852
+ };
2853
+ var prefixSuffixWrapperBase = "absolute top-0 bottom-0 flex justify-center items-center focusable rounded-4 focus:[--w-outline-offset:-2px] bg-transparent ";
2854
+ var suffix = {
2855
+ wrapper: prefixSuffixWrapperBase + "right-0",
2856
+ wrapperWithLabel: "w-max pr-12",
2857
+ wrapperWithIcon: "w-40",
2858
+ label: "antialiased block relative cursor-default pb-0 font-bold text-xs s-text"
2859
+ };
2860
+ var prefix = {
2861
+ wrapper: prefixSuffixWrapperBase + "left-0",
2862
+ wrapperWithLabel: "w-max pl-12",
2863
+ wrapperWithIcon: "w-40",
2864
+ label: "antialiased block relative cursor-default pb-0 font-bold text-xs s-text"
2865
+ };
2866
+ var toggle = {
2867
+ // wrapper classes
2868
+ field: "relative text-m",
2869
+ // true
2870
+ wrapper: "relative py-1",
2871
+ // true
2872
+ wrapperRadioButtons: "inline-flex font-bold rounded-8 focus-within:focusable",
2873
+ // isRadioButton && !isEqualWidth
2874
+ wrapperRadioButtonsJustified: "flex font-bold rounded-8 focus-within:focusable",
2875
+ // isRadioButton && isEqualWidth,
2876
+ // group classes
2877
+ radioButtonsGroup: "group",
2878
+ // isRadioButton
2879
+ radioButtonsGroupJustified: "grow-1 shrink-0 basis-auto",
2880
+ // isRadioButton && isEqualWidth
2881
+ // input classes
2882
+ input: "peer",
2883
+ a11y: "sr-only",
2884
+ // label classes
2885
+ label: "peer-focus:focusable cursor-pointer text-m s-text s-border py-2 pl-28 select-none relative block before:border before:absolute before:transition-all before:left-0 before:w-20 before:h-20 before:top-2",
2886
+ // !isRadioButton
2887
+ labelBefore: 'before:content-[""] before:block',
2888
+ // !isRadioButton && !isIndeterminate
2889
+ checkbox: "before:s-bg before:rounded-2 hover:before:s-border-primary hover:before:s-bg-hover peer-checked:before:bg-center peer-checked:before:bg-[url(var(--w-form-check-mark))] peer-checked:before:s-border-primary peer-checked:before:s-bg-primary peer-checked:peer-hover:before:s-border-primary-hover peer-checked:peer-hover:before:s-bg-primary-hover",
2890
+ // isCheckbox && !isIndeterminate && !isInvalid && !isDisabled
2891
+ checkboxInvalid: "before:s-bg before:s-border-negative before:rounded-2 hover:before:s-bg-negative-subtle-hover hover:before:s-border-negative-hover peer-checked:before:bg-center peer-checked:before:bg-[url(var(--w-form-check-mark))] peer-checked:before:s-bg-negative peer-checked:before:s-border-negative peer-checked:peer-hover:before:s-bg-negative-hover peer-checked:peer-hover:before:s-border-negative-hover",
2892
+ // isCheckbox && !isIndeterminate && isInvalid && !isDisabled
2893
+ checkboxDisabled: "before:s-bg-disabled-subtle before:s-border-disabled pointer-events-none before:rounded-2 peer-checked:before:bg-center peer-checked:before:bg-[url(var(--w-form-check-mark))] peer-checked:before:s-border-disabled peer-checked:before:s-bg-disabled",
2894
+ // isCheckbox && !isIndeterminate && !isInvalid && isDisabled
2895
+ indeterminate: 'before:content-["\u2013"] before:rounded-2 before:leading-xs before:text-center before:font-bold before:s-icon-inverted peer-indeterminate:before:s-border-primary peer-indeterminate:before:s-bg-primary peer-indeterminate:hover:before:s-border-primary-hover peer-indeterminate:hover:before:s-bg-primary-hover',
2896
+ // isCheckbox && isIndeterminate && !isInvalid && !isDisabled
2897
+ indeterminateInvalid: 'before:content-["\u2013"] before:rounded-2 before:leading-xs before:text-center before:font-bold before:s-icon-inverted peer-indeterminate:before:s-border-negative peer-indeterminate:before:s-bg-negative peer-indeterminate:hover:before:s-border-negative-hover peer-indeterminate:hover:before:s-bg-negative-hover',
2898
+ // isCheckbox && isIndeterminate && isInvalid && !isDisabled
2899
+ indeterminateDisabled: 'before:content-["\u2013"] before:rounded-2 before:leading-xs before:text-center before:font-bold pointer-events-none before:s-icon-inverted peer-indeterminate:before:s-border-disabled peer-indeterminate:before:s-bg-disabled',
2900
+ // isCheckbox && isIndeterminate && !isInvalid && isDisabled
2901
+ radio: "before:s-bg before:rounded-full peer-checked:before:border-[6] peer-checked:before:s-border-selected peer-checked:peer-hover:before:s-border-selected-hover peer-hover:before:s-border-primary peer-hover:before:s-bg-hover",
2902
+ // isRadio && !isDisabled && !isInvalid
2903
+ radioInvalid: "before:s-bg before:s-border-negative before:rounded-full peer-checked:before:border-[6] peer-hover:before:s-bg-negative-subtle peer-hover:before:s-border-negative-hover peer-checked:before:s-border-negative peer-checked:peer-hover:before:s-border-negative-hover",
2904
+ // isRadio && isInvalid && !isDisabled
2905
+ radioDisabled: "before:s-bg-disabled-subtle before:s-border-disabled pointer-events-none before:rounded-full peer-checked:before:border-[6]",
2906
+ // isRadio && !isInvalid && isDisabled
2907
+ radioButtonsLabel: "peer-hover:peer-not-checked:s-bg-hover peer-checked:s-text-inverted peer-checked:s-bg-primary peer-checked:s-border-primary block relative font-bold cursor-pointer s-text-link text-center s-bg border-2 s-border group-first-of-type:rounded-tl-8 group-first-of-type:rounded-bl-8 group-last-of-type:rounded-tr-8 group-last-of-type:rounded-br-8 group-not-last-of-type:border-r-0 peer-checked:z-10 group-not-first:-ml-2",
2908
+ // isRadioButtons
2909
+ radioButtonsRegular: "text-s py-8 pl-12 pr-14",
2910
+ // isRadioButtons && !isSmall
2911
+ radioButtonsSmall: "text-xs py-[5px] px-[8px]"
2912
+ // isRadioButtons && isSmall
2823
2913
  };
2824
- var EventEmitter = class {
2825
- constructor() {
2826
- __publicField$1(this, "_events", {});
2827
- }
2828
- on(event, listener) {
2829
- var _a2;
2830
- var _a;
2831
- (_a2 = (_a = this._events)[event]) != null ? _a2 : _a[event] = [];
2832
- this._events[event].push(listener);
2833
- return () => this.removeListener(event, listener);
2834
- }
2835
- removeListener(event, listener) {
2836
- const maybeListeners = this._getListeners(event);
2837
- if (!maybeListeners)
2838
- return;
2839
- const index = maybeListeners.indexOf(listener);
2840
- if (~index)
2841
- maybeListeners.splice(index, 1);
2842
- }
2843
- emit(event, ...args) {
2844
- const maybeListeners = this._getListeners(event);
2845
- if (!maybeListeners)
2846
- return;
2847
- maybeListeners.map((listener) => listener.apply(this, args));
2848
- }
2849
- _getListeners(event) {
2850
- const maybeListeners = this._events[event];
2851
- return Array.isArray(maybeListeners) ? maybeListeners : false;
2852
- }
2914
+ var deadToggle = {
2915
+ wrapper: `${toggle.wrapper} h-20 w-20 pointer-events-none`,
2916
+ input: `${toggle.input} hidden`,
2917
+ inputVue: "hidden",
2918
+ labelRadio: `${toggle.label} ${toggle.labelBefore} ${toggle.radio}`,
2919
+ labelCheckbox: `${toggle.label} ${toggle.labelBefore} ${toggle.checkbox}`,
2920
+ labelVue: "-mt-2"
2853
2921
  };
2854
- var __defProp2 = Object.defineProperty;
2855
- var __defNormalProp2 = (obj, key, value) => key in obj ? __defProp2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
2856
- var __publicField2 = (obj, key, value) => {
2857
- __defNormalProp2(obj, typeof key !== "symbol" ? key + "" : key, value);
2858
- return value;
2922
+ var clickable = {
2923
+ toggle: "absolute inset-0 h-full w-full appearance-none cursor-pointer focusable focusable-inset",
2924
+ label: `px-12 ${label.label} py-8! cursor-pointer focusable focusable-inset`,
2925
+ buttonOrLink: "bg-transparent focusable",
2926
+ buttonOrLinkStretch: "inset-0 absolute"
2859
2927
  };
2860
- var I18n = class extends EventEmitter {
2861
- constructor(params) {
2862
- var _a;
2863
- super();
2864
- __publicField2(this, "_locale", "");
2865
- __publicField2(this, "_locales");
2866
- __publicField2(this, "_localeData", {});
2867
- __publicField2(this, "_messages", {});
2868
- __publicField2(this, "_missing");
2869
- __publicField2(this, "t", this._.bind(this));
2870
- if (params.missing != null)
2871
- this._missing = params.missing;
2872
- if (params.messages != null)
2873
- this.load(params.messages);
2874
- if (params.localeData != null)
2875
- this.loadLocaleData(params.localeData);
2876
- if (typeof params.locale === "string" || params.locales) {
2877
- this.activate((_a = params.locale) != null ? _a : defaultLocale, params.locales);
2878
- }
2879
- }
2880
- get locale() {
2881
- return this._locale;
2882
- }
2883
- get locales() {
2884
- return this._locales;
2885
- }
2886
- get messages() {
2887
- var _a;
2888
- return (_a = this._messages[this._locale]) != null ? _a : {};
2889
- }
2890
- /**
2891
- * @deprecated this has no effect. Please remove this from the code. Deprecated in v4
2892
- */
2893
- get localeData() {
2894
- var _a;
2895
- return (_a = this._localeData[this._locale]) != null ? _a : {};
2896
- }
2897
- _loadLocaleData(locale, localeData) {
2898
- const maybeLocaleData = this._localeData[locale];
2899
- if (!maybeLocaleData) {
2900
- this._localeData[locale] = localeData;
2901
- } else {
2902
- Object.assign(maybeLocaleData, localeData);
2903
- }
2904
- }
2905
- /**
2906
- * @deprecated Plurals automatically used from Intl.PluralRules you can safely remove this call. Deprecated in v4
2907
- */
2908
- // @ts-ignore deprecated, so ignore the reported error
2909
- loadLocaleData(localeOrAllData, localeData) {
2910
- if (localeData != null) {
2911
- this._loadLocaleData(localeOrAllData, localeData);
2912
- } else {
2913
- Object.keys(localeOrAllData).forEach(
2914
- (locale) => this._loadLocaleData(locale, localeOrAllData[locale])
2915
- );
2916
- }
2917
- this.emit("change");
2918
- }
2919
- _load(locale, messages5) {
2920
- const maybeMessages = this._messages[locale];
2921
- if (!maybeMessages) {
2922
- this._messages[locale] = messages5;
2923
- } else {
2924
- Object.assign(maybeMessages, messages5);
2925
- }
2926
- }
2927
- load(localeOrMessages, messages5) {
2928
- if (typeof localeOrMessages == "string" && typeof messages5 === "object") {
2929
- this._load(localeOrMessages, messages5);
2930
- } else {
2931
- Object.entries(localeOrMessages).forEach(
2932
- ([locale, messages23]) => this._load(locale, messages23)
2933
- );
2934
- }
2935
- this.emit("change");
2936
- }
2937
- /**
2938
- * @param options {@link LoadAndActivateOptions}
2939
- */
2940
- loadAndActivate({ locale, locales, messages: messages5 }) {
2941
- this._locale = locale;
2942
- this._locales = locales || void 0;
2943
- this._messages[this._locale] = messages5;
2944
- this.emit("change");
2945
- }
2946
- activate(locale, locales) {
2947
- if (true) {
2948
- if (!this._messages[locale]) {
2949
- console.warn(`Messages for locale "${locale}" not loaded.`);
2950
- }
2951
- }
2952
- this._locale = locale;
2953
- this._locales = locales;
2954
- this.emit("change");
2955
- }
2956
- _(id, values, options) {
2957
- let message = options == null ? void 0 : options.message;
2958
- if (!isString(id)) {
2959
- values = id.values || values;
2960
- message = id.message;
2961
- id = id.id;
2962
- }
2963
- const messageForId = this.messages[id];
2964
- const messageMissing = messageForId === void 0;
2965
- const missing = this._missing;
2966
- if (missing && messageMissing) {
2967
- return isFunction(missing) ? missing(this._locale, id) : missing;
2968
- }
2969
- if (messageMissing) {
2970
- this.emit("missing", { id, locale: this._locale });
2971
- }
2972
- let translation = messageForId || message || id;
2973
- if (true) {
2974
- translation = isString(translation) ? compileMessage(translation) : translation;
2975
- }
2976
- if (isString(translation) && UNICODE_REGEX.test(translation))
2977
- return JSON.parse(`"${translation}"`);
2978
- if (isString(translation))
2979
- return translation;
2980
- return interpolate(
2981
- translation,
2982
- this._locale,
2983
- this._locales
2984
- )(values, options == null ? void 0 : options.formats);
2985
- }
2986
- date(value, format) {
2987
- return date(this._locales || this._locale, value, format);
2988
- }
2989
- number(value, format) {
2990
- return number(this._locales || this._locale, value, format);
2991
- }
2928
+ var attention = {
2929
+ base: "border-2 relative flex items-start",
2930
+ tooltip: "s-bg-inverted border-[--w-s-color-background-inverted] shadow-m s-text-inverted-static rounded-4 py-6 px-8",
2931
+ callout: "bg-[--w-color-callout-background] border-[--w-color-callout-border] s-text py-8 px-16 rounded-8",
2932
+ highlight: "bg-[--w-color-callout-background] border-[--w-color-callout-border] s-text py-8 px-16 rounded-8 drop-shadow-m translate-z-0",
2933
+ popover: "bg-[--w-s-color-surface-elevated-300] border-[--w-s-color-surface-elevated-300] s-text rounded-8 p-16 drop-shadow-m translate-z-0",
2934
+ arrowBase: "absolute h-[14px] w-[14px] border-2 border-b-0 border-r-0 rounded-tl-4 transform",
2935
+ arrowDirectionLeftStart: "-left-[8px]",
2936
+ arrowDirectionLeft: "-left-[8px]",
2937
+ arrowDirectionLeftEnd: "-left-[8px]",
2938
+ arrowDirectionRightStart: "-right-[8px]",
2939
+ arrowDirectionRight: "-right-[8px]",
2940
+ arrowDirectionRightEnd: "-right-[8px]",
2941
+ arrowDirectionBottomStart: "-bottom-[8px]",
2942
+ arrowDirectionBottom: "-bottom-[8px]",
2943
+ arrowDirectionBottomEnd: "-bottom-[8px]",
2944
+ arrowDirectionTopStart: "-top-[8px]",
2945
+ arrowDirectionTop: "-top-[8px]",
2946
+ arrowDirectionTopEnd: "-top-[8px]",
2947
+ arrowTooltip: "s-bg-inverted border-[--w-s-color-background-inverted]",
2948
+ arrowCallout: "bg-[--w-color-callout-background] border-[--w-color-callout-border]",
2949
+ arrowPopover: "bg-[--w-s-color-surface-elevated-300] border-[--w-s-color-surface-elevated-300]",
2950
+ arrowHighlight: "bg-[--w-color-callout-background] border-[--w-color-callout-border]",
2951
+ content: "last-child:mb-0",
2952
+ notCallout: "absolute z-50",
2953
+ closeBtn: `${buttonTextSizes.medium} ${buttonTypes.pill} ${buttonColors.pill} justify-self-end -mr-8 ml-8`
2992
2954
  };
2993
- function setupI18n(params = {}) {
2994
- return new I18n(params);
2995
- }
2996
- var i18n = setupI18n();
2997
-
2998
- // packages/attention/locales/en/messages.mjs
2999
- var messages = JSON.parse('{"attention.aria.callout":"callout speech bubble","attention.aria.close":"Close","attention.aria.highlight":"highlighted speech bubble","attention.aria.pointingDown":"pointing down","attention.aria.pointingLeft":"pointing left","attention.aria.pointingRight":"pointing right","attention.aria.pointingUp":"pointing up","attention.aria.popover":"popover speech bubble","attention.aria.tooltip":"tooltip"}');
3000
-
3001
- // packages/attention/locales/nb/messages.mjs
3002
- var messages2 = JSON.parse('{"attention.aria.callout":"callout speech bubble","attention.aria.close":"Lukk","attention.aria.highlight":"highlighted speech bubble","attention.aria.pointingDown":"pointing down","attention.aria.pointingLeft":"pointing left","attention.aria.pointingRight":"pointing right","attention.aria.pointingUp":"pointing up","attention.aria.popover":"popover speech bubble","attention.aria.tooltip":"tooltip"}');
3003
2955
 
3004
- // packages/attention/locales/fi/messages.mjs
3005
- var messages3 = JSON.parse('{"attention.aria.callout":"callout speech bubble","attention.aria.close":"Sulje","attention.aria.highlight":"highlighted speech bubble","attention.aria.pointingDown":"pointing down","attention.aria.pointingLeft":"pointing left","attention.aria.pointingRight":"pointing right","attention.aria.pointingUp":"pointing up","attention.aria.popover":"popover speech bubble","attention.aria.tooltip":"tooltip"}');
2956
+ // packages/attention/index.js
2957
+ import WarpElement from "@warp-ds/elements-core";
2958
+ import { ifDefined } from "lit/directives/if-defined.js";
3006
2959
 
3007
2960
  // packages/i18n.ts
3008
2961
  var supportedLocales = ["en", "nb", "fi"];
@@ -3039,7 +2992,44 @@ var activateI18n = (enMessages, nbMessages, fiMessages) => {
3039
2992
  i18n.activate(locale);
3040
2993
  };
3041
2994
 
3042
- // node_modules/.pnpm/@warp-ds+icons@2.0.0/node_modules/@warp-ds/icons/dist/elements/close-16.js
2995
+ // packages/utils/index.js
2996
+ import { classMap } from "lit/directives/class-map.js";
2997
+ var camelCaseToKebabCase = (str) => str.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
2998
+ function kebabCaseAttributes(constructor) {
2999
+ return class extends constructor {
3000
+ static createProperty(name, options) {
3001
+ let customOptions = options;
3002
+ if (typeof (options == null ? void 0 : options.attribute) === "undefined" || (options == null ? void 0 : options.attribute) === true) {
3003
+ customOptions = Object.assign({}, options, {
3004
+ attribute: camelCaseToKebabCase(name.toString())
3005
+ });
3006
+ }
3007
+ super.createProperty(name, customOptions);
3008
+ }
3009
+ };
3010
+ }
3011
+ function classes(defn) {
3012
+ const classes2 = [];
3013
+ for (const [key, value] of Object.entries(defn)) {
3014
+ if (value)
3015
+ classes2.push(key);
3016
+ }
3017
+ return classes2.join(" ");
3018
+ }
3019
+ function generateRandomId() {
3020
+ return `m${Math.random().toString(36).slice(2)}`;
3021
+ }
3022
+
3023
+ // packages/attention/locales/en/messages.mjs
3024
+ var messages = JSON.parse('{"attention.aria.callout":"callout speech bubble","attention.aria.close":"Close","attention.aria.highlight":"highlighted speech bubble","attention.aria.pointingDown":"pointing down","attention.aria.pointingLeft":"pointing left","attention.aria.pointingRight":"pointing right","attention.aria.pointingUp":"pointing up","attention.aria.popover":"popover speech bubble","attention.aria.tooltip":"tooltip"}');
3025
+
3026
+ // packages/attention/locales/fi/messages.mjs
3027
+ var messages2 = JSON.parse('{"attention.aria.callout":"callout speech bubble","attention.aria.close":"Sulje","attention.aria.highlight":"highlighted speech bubble","attention.aria.pointingDown":"pointing down","attention.aria.pointingLeft":"pointing left","attention.aria.pointingRight":"pointing right","attention.aria.pointingUp":"pointing up","attention.aria.popover":"popover speech bubble","attention.aria.tooltip":"tooltip"}');
3028
+
3029
+ // packages/attention/locales/nb/messages.mjs
3030
+ var messages3 = JSON.parse('{"attention.aria.callout":"callout speech bubble","attention.aria.close":"Lukk","attention.aria.highlight":"highlighted speech bubble","attention.aria.pointingDown":"pointing down","attention.aria.pointingLeft":"pointing left","attention.aria.pointingRight":"pointing right","attention.aria.pointingUp":"pointing up","attention.aria.popover":"popover speech bubble","attention.aria.tooltip":"tooltip"}');
3031
+
3032
+ // node_modules/.pnpm/@warp-ds+icons@2.0.1/node_modules/@warp-ds/icons/dist/elements/close-16.js
3043
3033
  import { LitElement } from "lit";
3044
3034
  import { unsafeStatic, html } from "lit/static-html.js";
3045
3035
  var messages4 = JSON.parse('{"icon.title.close":"Kryss"}');
@@ -3134,7 +3124,7 @@ if (!customElements.get("w-icon-close-16")) {
3134
3124
  var WarpAttention = class extends kebabCaseAttributes(WarpElement) {
3135
3125
  constructor() {
3136
3126
  super();
3137
- activateI18n(messages, messages2, messages3);
3127
+ activateI18n(messages, messages3, messages2);
3138
3128
  this.handleDone = this.handleDone.bind(this);
3139
3129
  this.show = false;
3140
3130
  this.placement = "bottom";
@@ -3158,8 +3148,10 @@ var WarpAttention = class extends kebabCaseAttributes(WarpElement) {
3158
3148
  ${JSON.stringify(Object.keys(opposites))}`);
3159
3149
  }
3160
3150
  if (this.fallbackPlacements && !this.fallbackPlacements.every((fallbackPlacement) => directions.includes(fallbackPlacement))) {
3161
- throw new Error(`Invalid "fallbackPlacements" attribute. Set its value to an array with one or more of the following:
3162
- ${JSON.stringify(directions)}`);
3151
+ throw new Error(
3152
+ `Invalid "fallbackPlacements" attribute. Set its value to an array with one or more of the following:
3153
+ ${JSON.stringify(directions)}`
3154
+ );
3163
3155
  }
3164
3156
  setTimeout(() => this.requestUpdate(), 0);
3165
3157
  if (!this.callout) {
@@ -3213,7 +3205,7 @@ ${JSON.stringify(directions)}`);
3213
3205
  });
3214
3206
  }
3215
3207
  get _arrowHtml() {
3216
- return this.noArrow ? "" : html2`<div id="arrow" role="img" class="${this._arrowClasses}" />`;
3208
+ return this.noArrow ? "" : html2`<div id="arrow" role="img" class="${this._arrowClasses}"></div>`;
3217
3209
  }
3218
3210
  get _activeVariantClasses() {
3219
3211
  const variantProps = {
@@ -3256,7 +3248,7 @@ ${JSON.stringify(directions)}`);
3256
3248
  get _closeBtnHtml() {
3257
3249
  return html2`
3258
3250
  <button aria-label="${this._ariaClose}" @click="${this.close}" @keydown=${this.keypressed} class="${attention.closeBtn}">
3259
- <w-icon-close-16 />
3251
+ <w-icon-close-16></w-icon-close-16>
3260
3252
  </button>
3261
3253
  `;
3262
3254
  }
@@ -3391,7 +3383,11 @@ ${JSON.stringify(directions)}`);
3391
3383
  ${this.placement === "right-start" || this.placement === "right" || this.placement === "right-end" || this.placement === "bottom-start" || this.placement === "bottom" || this.placement === "bottom-end" ? html2`
3392
3384
  <slot name="target"></slot>
3393
3385
 
3394
- <div id="attention" role="${this.tooltip ? "tooltip" : "img"}" aria-label="${this.defaultAriaLabel()}" class="${this._wrapperClasses}">
3386
+ <div
3387
+ id="attention"
3388
+ role="${this.tooltip ? "tooltip" : "img"}"
3389
+ aria-label="${this.defaultAriaLabel()}"
3390
+ class="${this._wrapperClasses}">
3395
3391
  ${this._arrowHtml}
3396
3392
  <slot name="message"></slot>
3397
3393
  ${this.canClose ? this._closeBtnHtml : nothing}