@warp-ds/elements 1.4.1-next.2 → 1.5.0-next.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/dist/index.d.ts +1 -0
  2. package/dist/index.js +748 -217
  3. package/dist/index.js.map +4 -4
  4. package/dist/packages/affix/index.js +1 -1
  5. package/dist/packages/affix/index.js.map +3 -3
  6. package/dist/packages/alert/index.js +1 -1
  7. package/dist/packages/alert/index.js.map +3 -3
  8. package/dist/packages/attention/index.js +26 -15
  9. package/dist/packages/attention/index.js.map +3 -3
  10. package/dist/packages/badge/index.js +1 -1
  11. package/dist/packages/badge/index.js.map +3 -3
  12. package/dist/packages/box/index.js +1 -1
  13. package/dist/packages/box/index.js.map +3 -3
  14. package/dist/packages/breadcrumbs/index.js +1 -1
  15. package/dist/packages/breadcrumbs/index.js.map +3 -3
  16. package/dist/packages/button/index.js +1 -1
  17. package/dist/packages/button/index.js.map +3 -3
  18. package/dist/packages/card/index.js +1 -1
  19. package/dist/packages/card/index.js.map +3 -3
  20. package/dist/packages/expandable/index.js +1 -1
  21. package/dist/packages/expandable/index.js.map +3 -3
  22. package/dist/packages/modal/index.d.ts +6 -0
  23. package/dist/packages/modal/index.js +2291 -0
  24. package/dist/packages/modal/index.js.map +7 -0
  25. package/dist/packages/modal/modal-footer.d.ts +14 -0
  26. package/dist/packages/modal/modal-header.d.ts +37 -0
  27. package/dist/packages/modal/modal-main.d.ts +37 -0
  28. package/dist/packages/modal/util.d.ts +17 -0
  29. package/dist/packages/pill/index.js +1 -1
  30. package/dist/packages/pill/index.js.map +3 -3
  31. package/dist/packages/select/index.js +1 -1
  32. package/dist/packages/select/index.js.map +3 -3
  33. package/dist/packages/textfield/index.js +1 -1
  34. package/dist/packages/textfield/index.js.map +3 -3
  35. package/dist/packages/toast/index.js +1 -1
  36. package/dist/packages/toast/index.js.map +3 -3
  37. package/package.json +6 -3
package/dist/index.js CHANGED
@@ -9,18 +9,18 @@ var __getProtoOf = Object.getPrototypeOf;
9
9
  var __hasOwnProp = Object.prototype.hasOwnProperty;
10
10
  var __propIsEnum = Object.prototype.propertyIsEnumerable;
11
11
  var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
12
- var __spreadValues = (a, b) => {
13
- for (var prop in b || (b = {}))
14
- if (__hasOwnProp.call(b, prop))
15
- __defNormalProp(a, prop, b[prop]);
12
+ var __spreadValues = (a2, b2) => {
13
+ for (var prop in b2 || (b2 = {}))
14
+ if (__hasOwnProp.call(b2, prop))
15
+ __defNormalProp(a2, prop, b2[prop]);
16
16
  if (__getOwnPropSymbols)
17
- for (var prop of __getOwnPropSymbols(b)) {
18
- if (__propIsEnum.call(b, prop))
19
- __defNormalProp(a, prop, b[prop]);
17
+ for (var prop of __getOwnPropSymbols(b2)) {
18
+ if (__propIsEnum.call(b2, prop))
19
+ __defNormalProp(a2, prop, b2[prop]);
20
20
  }
21
- return a;
21
+ return a2;
22
22
  };
23
- var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
23
+ var __spreadProps = (a2, b2) => __defProps(a2, __getOwnPropDescs(b2));
24
24
  var __objRest = (source, exclude) => {
25
25
  var target = {};
26
26
  for (var prop in source)
@@ -295,8 +295,8 @@ var require_moo = __commonJS({
295
295
  function objectToRules(object) {
296
296
  var keys2 = Object.getOwnPropertyNames(object);
297
297
  var result = [];
298
- for (var i = 0; i < keys2.length; i++) {
299
- var key = keys2[i];
298
+ for (var i2 = 0; i2 < keys2.length; i2++) {
299
+ var key = keys2[i2];
300
300
  var thing = object[key];
301
301
  var rules = [].concat(thing);
302
302
  if (key === "include") {
@@ -323,8 +323,8 @@ var require_moo = __commonJS({
323
323
  }
324
324
  function arrayToRules(array) {
325
325
  var result = [];
326
- for (var i = 0; i < array.length; i++) {
327
- var obj = array[i];
326
+ for (var i2 = 0; i2 < array.length; i2++) {
327
+ var obj = array[i2];
328
328
  if (obj.include) {
329
329
  var include = [].concat(obj.include);
330
330
  for (var j = 0; j < include.length; j++) {
@@ -368,8 +368,8 @@ var require_moo = __commonJS({
368
368
  }
369
369
  var match = options.match;
370
370
  options.match = Array.isArray(match) ? match : match ? [match] : [];
371
- options.match.sort(function(a, b) {
372
- return isRegExp(a) && isRegExp(b) ? 0 : isRegExp(b) ? -1 : isRegExp(a) ? 1 : b.length - a.length;
371
+ options.match.sort(function(a2, b2) {
372
+ return isRegExp(a2) && isRegExp(b2) ? 0 : isRegExp(b2) ? -1 : isRegExp(a2) ? 1 : b2.length - a2.length;
373
373
  });
374
374
  return options;
375
375
  }
@@ -384,13 +384,13 @@ var require_moo = __commonJS({
384
384
  var unicodeFlag = null;
385
385
  var groups = [];
386
386
  var parts = [];
387
- for (var i = 0; i < rules.length; i++) {
388
- if (rules[i].fallback) {
387
+ for (var i2 = 0; i2 < rules.length; i2++) {
388
+ if (rules[i2].fallback) {
389
389
  fastAllowed = false;
390
390
  }
391
391
  }
392
- for (var i = 0; i < rules.length; i++) {
393
- var options = rules[i];
392
+ for (var i2 = 0; i2 < rules.length; i2++) {
393
+ var options = rules[i2];
394
394
  if (options.include) {
395
395
  throw new Error("Inheritance is not allowed in stateless lexers");
396
396
  }
@@ -461,13 +461,13 @@ var require_moo = __commonJS({
461
461
  var result = compileRules(toRules(rules));
462
462
  return new Lexer({ start: result }, "start");
463
463
  }
464
- function checkStateGroup(g, name, map) {
465
- var state = g && (g.push || g.next);
464
+ function checkStateGroup(g2, name, map) {
465
+ var state = g2 && (g2.push || g2.next);
466
466
  if (state && !map[state]) {
467
- throw new Error("Missing state '" + state + "' (in token '" + g.defaultType + "' of state '" + name + "')");
467
+ throw new Error("Missing state '" + state + "' (in token '" + g2.defaultType + "' of state '" + name + "')");
468
468
  }
469
- if (g && g.pop && +g.pop !== 1) {
470
- throw new Error("pop must be 1 (in token '" + g.defaultType + "' of state '" + name + "')");
469
+ if (g2 && g2.pop && +g2.pop !== 1) {
470
+ throw new Error("pop must be 1 (in token '" + g2.defaultType + "' of state '" + name + "')");
471
471
  }
472
472
  }
473
473
  function compileStates(states, start) {
@@ -477,12 +477,12 @@ var require_moo = __commonJS({
477
477
  if (!start)
478
478
  start = keys2[0];
479
479
  var ruleMap = /* @__PURE__ */ Object.create(null);
480
- for (var i = 0; i < keys2.length; i++) {
481
- var key = keys2[i];
480
+ for (var i2 = 0; i2 < keys2.length; i2++) {
481
+ var key = keys2[i2];
482
482
  ruleMap[key] = toRules(states[key]).concat(all);
483
483
  }
484
- for (var i = 0; i < keys2.length; i++) {
485
- var key = keys2[i];
484
+ for (var i2 = 0; i2 < keys2.length; i2++) {
485
+ var key = keys2[i2];
486
486
  var rules = ruleMap[key];
487
487
  var included = /* @__PURE__ */ Object.create(null);
488
488
  for (var j = 0; j < rules.length; j++) {
@@ -508,12 +508,12 @@ var require_moo = __commonJS({
508
508
  }
509
509
  }
510
510
  var map = /* @__PURE__ */ Object.create(null);
511
- for (var i = 0; i < keys2.length; i++) {
512
- var key = keys2[i];
511
+ for (var i2 = 0; i2 < keys2.length; i2++) {
512
+ var key = keys2[i2];
513
513
  map[key] = compileRules(ruleMap[key], true);
514
514
  }
515
- for (var i = 0; i < keys2.length; i++) {
516
- var name = keys2[i];
515
+ for (var i2 = 0; i2 < keys2.length; i2++) {
516
+ var name = keys2[i2];
517
517
  var state = map[name];
518
518
  var groups = state.groups;
519
519
  for (var j = 0; j < groups.length; j++) {
@@ -530,8 +530,8 @@ var require_moo = __commonJS({
530
530
  var isMap = typeof Map !== "undefined";
531
531
  var reverseMap = isMap ? /* @__PURE__ */ new Map() : /* @__PURE__ */ Object.create(null);
532
532
  var types = Object.getOwnPropertyNames(map);
533
- for (var i = 0; i < types.length; i++) {
534
- var tokenType = types[i];
533
+ for (var i2 = 0; i2 < types.length; i2++) {
534
+ var tokenType = types[i2];
535
535
  var item = map[tokenType];
536
536
  var keywordList = Array.isArray(item) ? item : [item];
537
537
  keywordList.forEach(function(keyword) {
@@ -607,9 +607,9 @@ var require_moo = __commonJS({
607
607
  };
608
608
  Lexer.prototype._getGroup = function(match) {
609
609
  var groupCount = this.groups.length;
610
- for (var i = 0; i < groupCount; i++) {
611
- if (match[i + 1] !== void 0) {
612
- return this.groups[i];
610
+ for (var i2 = 0; i2 < groupCount; i2++) {
611
+ if (match[i2 + 1] !== void 0) {
612
+ return this.groups[i2];
613
613
  }
614
614
  }
615
615
  throw new Error("Cannot find token type for matched text");
@@ -730,9 +730,9 @@ var require_moo = __commonJS({
730
730
  var errorLines = [];
731
731
  errorLines.push(message + " at line " + token.line + " col " + token.col + ":");
732
732
  errorLines.push("");
733
- for (var i = 0; i < displayedLines.length; i++) {
734
- var line = displayedLines[i];
735
- var lineNo = firstDisplayedLine + i;
733
+ for (var i2 = 0; i2 < displayedLines.length; i2++) {
734
+ var line = displayedLines[i2];
735
+ var lineNo = firstDisplayedLine + i2;
736
736
  errorLines.push(pad(String(lineNo), lastLineDigits) + " " + line);
737
737
  if (lineNo === token.line) {
738
738
  errorLines.push(pad("", lastLineDigits + token.col + 1) + "^");
@@ -842,12 +842,12 @@ var require_parser = __commonJS({
842
842
  function strictArgStyleParam(lt, param) {
843
843
  let value = "";
844
844
  let text = "";
845
- for (const p of param) {
846
- const pText = p.ctx.text;
845
+ for (const p2 of param) {
846
+ const pText = p2.ctx.text;
847
847
  text += pText;
848
- switch (p.type) {
848
+ switch (p2.type) {
849
849
  case "content":
850
- value += p.value;
850
+ value += p2.value;
851
851
  break;
852
852
  case "argument":
853
853
  case "function":
@@ -858,12 +858,12 @@ var require_parser = __commonJS({
858
858
  throw new ParseError(lt, `Unsupported part in strict mode function arg style: ${pText}`);
859
859
  }
860
860
  }
861
- const c = {
861
+ const c2 = {
862
862
  type: "content",
863
863
  value: value.trim(),
864
864
  ctx: Object.assign({}, param[0].ctx, { text })
865
865
  };
866
- return [c];
866
+ return [c2];
867
867
  }
868
868
  var strictArgTypes = [
869
869
  "number",
@@ -1043,7 +1043,7 @@ var require_parser = __commonJS({
1043
1043
  // packages/affix/index.js
1044
1044
  import { html as html3 } from "lit";
1045
1045
 
1046
- // node_modules/.pnpm/@warp-ds+css@1.9.7/node_modules/@warp-ds/css/component-classes/index.js
1046
+ // node_modules/.pnpm/@warp-ds+css@1.10.1/node_modules/@warp-ds/css/component-classes/index.js
1047
1047
  var badge = {
1048
1048
  base: "py-4 px-8 border-0 rounded-4 text-xs inline-flex",
1049
1049
  neutral: "bg-[--w-color-badge-neutral-background] s-text",
@@ -1279,6 +1279,23 @@ var modal = {
1279
1279
  titleButtonIcon: "h-16 w-16 sm:h-24 sm:w-24",
1280
1280
  titleButtonIconRotated: "transform rotate-90"
1281
1281
  };
1282
+ var modalElement = {
1283
+ // several items in here are 'resets' for the <dialog> element
1284
+ dialogEl: "bg-transparent backface-hidden w-unset h-unset max-w-unset max-h-unset p-0 m-auto border-0 inset-0 open:flex open:fixed sm:place-content-center sm:place-items-center items-end [--w-modal-max-height:80%] [--w-modal-width:640px]",
1285
+ dialogInner: "transition-all relative pb-safe-[32] sm:pb-32 shadow-m max-h-[--w-modal-max-height] min-h-[--w-modal-min-height] w-[--w-modal-width] h-[--w-modal-height] ease-in-out backface-hidden will-change-height rounded-8 sm:mx-16 s-bg flex flex-col overflow-hidden lt-sm:rounded-b-0",
1286
+ contentSlot: "block overflow-y-auto overflow-x-hidden last-child:mb-0 grow shrink px-16 sm:px-32 relative",
1287
+ header: "relative pb-8",
1288
+ headerTitleBar: "pt-16 sm:pt-24 px-16 sm:px-32 grid gap-12 grid-cols-[auto_1fr_auto] items-start shrink-0!",
1289
+ headerButton: "sm:min-h-[32px] sm:min-w-[32px] min-h-[40px] min-w-[40px] text-m leading-[24] p-4 rounded-full border-0 inline-flex items-center justify-center hover:bg-clip-padding font-bold focusable transition-colors ease-in-out",
1290
+ headerButtonLeft: "-ml-8 s-icon bg-transparent hover:bg-[--w-color-button-pill-background-hover] active:bg-[--w-color-button-pill-background-active]",
1291
+ headerCloseButton: "-mr-8 s-icon bg-transparent hover:bg-[--w-color-button-pill-background-hover] active:bg-[--w-color-button-pill-background-active]",
1292
+ headerCloseButtonOnImage: `absolute right-8 top-8 z-10 s-color-inverted bg-[var(--w-black)/70] hover:bg-[var(--w-black)/85] active:bg-[var(--w-black)] s-text-inverted`,
1293
+ headerTitle: "mb-0 t3 self-center",
1294
+ headerTitleWithBackButton: "justify-self-center",
1295
+ headerTitleWithoutBackButton: "col-span-2",
1296
+ headerTitleWithTopArea: "pt-16 px-16 sm:px-32",
1297
+ footer: "flex justify-end shrink-0 px-16 sm:px-32 pt-24"
1298
+ };
1282
1299
  var alert = {
1283
1300
  alert: "flex p-16 border border-l-4 rounded-4 s-text",
1284
1301
  willChangeHeight: "will-change-height",
@@ -1511,7 +1528,7 @@ Message: ${message}`);
1511
1528
 
1512
1529
  // node_modules/.pnpm/@lingui+core@4.7.1/node_modules/@lingui/core/dist/index.mjs
1513
1530
  var isString = (s) => typeof s === "string";
1514
- var isFunction = (f) => typeof f === "function";
1531
+ var isFunction = (f2) => typeof f2 === "function";
1515
1532
  var cache = /* @__PURE__ */ new Map();
1516
1533
  var defaultLocale = "en";
1517
1534
  function normalizeLocales(locales) {
@@ -1739,17 +1756,17 @@ var I18n = class extends EventEmitter {
1739
1756
  }
1740
1757
  this.emit("change");
1741
1758
  }
1742
- _load(locale, messages43) {
1759
+ _load(locale, messages46) {
1743
1760
  const maybeMessages = this._messages[locale];
1744
1761
  if (!maybeMessages) {
1745
- this._messages[locale] = messages43;
1762
+ this._messages[locale] = messages46;
1746
1763
  } else {
1747
- Object.assign(maybeMessages, messages43);
1764
+ Object.assign(maybeMessages, messages46);
1748
1765
  }
1749
1766
  }
1750
- load(localeOrMessages, messages43) {
1751
- if (typeof localeOrMessages == "string" && typeof messages43 === "object") {
1752
- this._load(localeOrMessages, messages43);
1767
+ load(localeOrMessages, messages46) {
1768
+ if (typeof localeOrMessages == "string" && typeof messages46 === "object") {
1769
+ this._load(localeOrMessages, messages46);
1753
1770
  } else {
1754
1771
  Object.entries(localeOrMessages).forEach(
1755
1772
  ([locale, messages210]) => this._load(locale, messages210)
@@ -1760,10 +1777,10 @@ var I18n = class extends EventEmitter {
1760
1777
  /**
1761
1778
  * @param options {@link LoadAndActivateOptions}
1762
1779
  */
1763
- loadAndActivate({ locale, locales, messages: messages43 }) {
1780
+ loadAndActivate({ locale, locales, messages: messages46 }) {
1764
1781
  this._locale = locale;
1765
1782
  this._locales = locales || void 0;
1766
- this._messages[this._locale] = messages43;
1783
+ this._messages[this._locale] = messages46;
1767
1784
  this.emit("change");
1768
1785
  }
1769
1786
  activate(locale, locales) {
@@ -1892,8 +1909,8 @@ var getMessages = (locale, enMsg, nbMsg, fiMsg) => {
1892
1909
  };
1893
1910
  var activateI18n = (enMessages, nbMessages, fiMessages) => {
1894
1911
  const locale = detectLocale();
1895
- const messages43 = getMessages(locale, enMessages, nbMessages, fiMessages);
1896
- i18n.load(locale, messages43);
1912
+ const messages46 = getMessages(locale, enMessages, nbMessages, fiMessages);
1913
+ i18n.load(locale, messages46);
1897
1914
  i18n.activate(locale);
1898
1915
  };
1899
1916
  activateI18n(messages2, messages, messages3);
@@ -1983,8 +2000,8 @@ var getMessages2 = (locale, enMsg, nbMsg, fiMsg) => {
1983
2000
  };
1984
2001
  var activateI18n2 = (enMessages, nbMessages, fiMessages) => {
1985
2002
  const locale = detectLocale2();
1986
- const messages43 = getMessages2(locale, enMessages, nbMessages, fiMessages);
1987
- i18n.load(locale, messages43);
2003
+ const messages46 = getMessages2(locale, enMessages, nbMessages, fiMessages);
2004
+ i18n.load(locale, messages46);
1988
2005
  i18n.activate(locale);
1989
2006
  };
1990
2007
  activateI18n2(messages22, messages4, messages32);
@@ -2097,11 +2114,11 @@ import { css, html as html8 } from "lit";
2097
2114
 
2098
2115
  // node_modules/.pnpm/@chbphone55+classnames@2.0.0/node_modules/@chbphone55/classnames/dist/index.m.js
2099
2116
  var r = function() {
2100
- for (var t = [], n = arguments.length; n--; )
2101
- t[n] = arguments[n];
2102
- return t.reduce(function(t2, n2) {
2103
- return t2.concat("string" == typeof n2 ? n2 : Array.isArray(n2) ? r.apply(void 0, n2) : "object" == typeof n2 && n2 ? Object.keys(n2).map(function(r2) {
2104
- return n2[r2] ? r2 : "";
2117
+ for (var t = [], n2 = arguments.length; n2--; )
2118
+ t[n2] = arguments[n2];
2119
+ return t.reduce(function(t2, n3) {
2120
+ return t2.concat("string" == typeof n3 ? n3 : Array.isArray(n3) ? r.apply(void 0, n3) : "object" == typeof n3 && n3 ? Object.keys(n3).map(function(r3) {
2121
+ return n3[r3] ? r3 : "";
2105
2122
  }) : "");
2106
2123
  }, []).join(" ");
2107
2124
  };
@@ -2185,8 +2202,8 @@ var getMessages3 = (locale, enMsg, nbMsg, fiMsg) => {
2185
2202
  };
2186
2203
  var activateI18n3 = (enMessages, nbMessages, fiMessages) => {
2187
2204
  const locale = detectLocale3();
2188
- const messages43 = getMessages3(locale, enMessages, nbMessages, fiMessages);
2189
- i18n.load(locale, messages43);
2205
+ const messages46 = getMessages3(locale, enMessages, nbMessages, fiMessages);
2206
+ i18n.load(locale, messages46);
2190
2207
  i18n.activate(locale);
2191
2208
  };
2192
2209
  activateI18n3(messages23, messages5, messages33);
@@ -2276,8 +2293,8 @@ var getMessages4 = (locale, enMsg, nbMsg, fiMsg) => {
2276
2293
  };
2277
2294
  var activateI18n4 = (enMessages, nbMessages, fiMessages) => {
2278
2295
  const locale = detectLocale4();
2279
- const messages43 = getMessages4(locale, enMessages, nbMessages, fiMessages);
2280
- i18n.load(locale, messages43);
2296
+ const messages46 = getMessages4(locale, enMessages, nbMessages, fiMessages);
2297
+ i18n.load(locale, messages46);
2281
2298
  i18n.activate(locale);
2282
2299
  };
2283
2300
  activateI18n4(messages24, messages6, messages34);
@@ -2367,8 +2384,8 @@ var getMessages5 = (locale, enMsg, nbMsg, fiMsg) => {
2367
2384
  };
2368
2385
  var activateI18n5 = (enMessages, nbMessages, fiMessages) => {
2369
2386
  const locale = detectLocale5();
2370
- const messages43 = getMessages5(locale, enMessages, nbMessages, fiMessages);
2371
- i18n.load(locale, messages43);
2387
+ const messages46 = getMessages5(locale, enMessages, nbMessages, fiMessages);
2388
+ i18n.load(locale, messages46);
2372
2389
  i18n.activate(locale);
2373
2390
  };
2374
2391
  activateI18n5(messages25, messages7, messages35);
@@ -2458,8 +2475,8 @@ var getMessages6 = (locale, enMsg, nbMsg, fiMsg) => {
2458
2475
  };
2459
2476
  var activateI18n6 = (enMessages, nbMessages, fiMessages) => {
2460
2477
  const locale = detectLocale6();
2461
- const messages43 = getMessages6(locale, enMessages, nbMessages, fiMessages);
2462
- i18n.load(locale, messages43);
2478
+ const messages46 = getMessages6(locale, enMessages, nbMessages, fiMessages);
2479
+ i18n.load(locale, messages46);
2463
2480
  i18n.activate(locale);
2464
2481
  };
2465
2482
  activateI18n6(messages26, messages8, messages36);
@@ -2563,7 +2580,7 @@ if (!customElements.get("w-alert")) {
2563
2580
  // packages/attention/index.js
2564
2581
  import { css as css2, html as html9, nothing } from "lit";
2565
2582
 
2566
- // node_modules/.pnpm/@floating-ui+utils@0.2.1/node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs
2583
+ // node_modules/.pnpm/@floating-ui+utils@0.2.2/node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs
2567
2584
  var sides = ["top", "right", "bottom", "left"];
2568
2585
  var min = Math.min;
2569
2586
  var max = Math.max;
@@ -2675,15 +2692,25 @@ function getPaddingObject(padding) {
2675
2692
  };
2676
2693
  }
2677
2694
  function rectToClientRect(rect) {
2678
- return __spreadProps(__spreadValues({}, rect), {
2679
- top: rect.y,
2680
- left: rect.x,
2681
- right: rect.x + rect.width,
2682
- bottom: rect.y + rect.height
2683
- });
2695
+ const {
2696
+ x,
2697
+ y: y2,
2698
+ width,
2699
+ height
2700
+ } = rect;
2701
+ return {
2702
+ width,
2703
+ height,
2704
+ top: y2,
2705
+ left: x,
2706
+ right: x + width,
2707
+ bottom: y2 + height,
2708
+ x,
2709
+ y: y2
2710
+ };
2684
2711
  }
2685
2712
 
2686
- // node_modules/.pnpm/@floating-ui+core@1.6.0/node_modules/@floating-ui/core/dist/floating-ui.core.mjs
2713
+ // node_modules/.pnpm/@floating-ui+core@1.6.2/node_modules/@floating-ui/core/dist/floating-ui.core.mjs
2687
2714
  function computeCoordsFromPlacement(_ref, placement, rtl) {
2688
2715
  let {
2689
2716
  reference,
@@ -2755,16 +2782,16 @@ var computePosition = async (reference, floating, config) => {
2755
2782
  });
2756
2783
  let {
2757
2784
  x,
2758
- y
2785
+ y: y2
2759
2786
  } = computeCoordsFromPlacement(rects, placement, rtl);
2760
2787
  let statefulPlacement = placement;
2761
2788
  let middlewareData = {};
2762
2789
  let resetCount = 0;
2763
- for (let i = 0; i < validMiddleware.length; i++) {
2790
+ for (let i2 = 0; i2 < validMiddleware.length; i2++) {
2764
2791
  const {
2765
2792
  name,
2766
2793
  fn
2767
- } = validMiddleware[i];
2794
+ } = validMiddleware[i2];
2768
2795
  const {
2769
2796
  x: nextX,
2770
2797
  y: nextY,
@@ -2772,7 +2799,7 @@ var computePosition = async (reference, floating, config) => {
2772
2799
  reset
2773
2800
  } = await fn({
2774
2801
  x,
2775
- y,
2802
+ y: y2,
2776
2803
  initialPlacement: placement,
2777
2804
  placement: statefulPlacement,
2778
2805
  strategy,
@@ -2785,7 +2812,7 @@ var computePosition = async (reference, floating, config) => {
2785
2812
  }
2786
2813
  });
2787
2814
  x = nextX != null ? nextX : x;
2788
- y = nextY != null ? nextY : y;
2815
+ y2 = nextY != null ? nextY : y2;
2789
2816
  middlewareData = __spreadProps(__spreadValues({}, middlewareData), {
2790
2817
  [name]: __spreadValues(__spreadValues({}, middlewareData[name]), data)
2791
2818
  });
@@ -2804,15 +2831,15 @@ var computePosition = async (reference, floating, config) => {
2804
2831
  }
2805
2832
  ({
2806
2833
  x,
2807
- y
2834
+ y: y2
2808
2835
  } = computeCoordsFromPlacement(rects, statefulPlacement, rtl));
2809
2836
  }
2810
- i = -1;
2837
+ i2 = -1;
2811
2838
  }
2812
2839
  }
2813
2840
  return {
2814
2841
  x,
2815
- y,
2842
+ y: y2,
2816
2843
  placement: statefulPlacement,
2817
2844
  strategy,
2818
2845
  middlewareData
@@ -2825,7 +2852,7 @@ async function detectOverflow(state, options) {
2825
2852
  }
2826
2853
  const {
2827
2854
  x,
2828
- y,
2855
+ y: y2,
2829
2856
  platform: platform2,
2830
2857
  rects,
2831
2858
  elements,
@@ -2847,10 +2874,12 @@ async function detectOverflow(state, options) {
2847
2874
  rootBoundary,
2848
2875
  strategy
2849
2876
  }));
2850
- const rect = elementContext === "floating" ? __spreadProps(__spreadValues({}, rects.floating), {
2877
+ const rect = elementContext === "floating" ? {
2851
2878
  x,
2852
- y
2853
- }) : rects.reference;
2879
+ y: y2,
2880
+ width: rects.floating.width,
2881
+ height: rects.floating.height
2882
+ } : rects.reference;
2854
2883
  const offsetParent = await (platform2.getOffsetParent == null ? void 0 : platform2.getOffsetParent(elements.floating));
2855
2884
  const offsetScale = await (platform2.isElement == null ? void 0 : platform2.isElement(offsetParent)) ? await (platform2.getScale == null ? void 0 : platform2.getScale(offsetParent)) || {
2856
2885
  x: 1,
@@ -2878,7 +2907,7 @@ var arrow = (options) => ({
2878
2907
  async fn(state) {
2879
2908
  const {
2880
2909
  x,
2881
- y,
2910
+ y: y2,
2882
2911
  placement,
2883
2912
  rects,
2884
2913
  platform: platform2,
@@ -2895,7 +2924,7 @@ var arrow = (options) => ({
2895
2924
  const paddingObject = getPaddingObject(padding);
2896
2925
  const coords = {
2897
2926
  x,
2898
- y
2927
+ y: y2
2899
2928
  };
2900
2929
  const axis = getAlignmentAxis(placement);
2901
2930
  const length = getAxisLength(axis);
@@ -3005,12 +3034,12 @@ var flip = function(options) {
3005
3034
  }
3006
3035
  };
3007
3036
  }
3008
- let resetPlacement = (_overflowsData$filter = overflowsData.filter((d) => d.overflows[0] <= 0).sort((a, b) => a.overflows[1] - b.overflows[1])[0]) == null ? void 0 : _overflowsData$filter.placement;
3037
+ let resetPlacement = (_overflowsData$filter = overflowsData.filter((d2) => d2.overflows[0] <= 0).sort((a2, b2) => a2.overflows[1] - b2.overflows[1])[0]) == null ? void 0 : _overflowsData$filter.placement;
3009
3038
  if (!resetPlacement) {
3010
3039
  switch (fallbackStrategy) {
3011
3040
  case "bestFit": {
3012
3041
  var _overflowsData$map$so;
3013
- const placement2 = (_overflowsData$map$so = overflowsData.map((d) => [d.placement, d.overflows.filter((overflow2) => overflow2 > 0).reduce((acc, overflow2) => acc + overflow2, 0)]).sort((a, b) => a[1] - b[1])[0]) == null ? void 0 : _overflowsData$map$so[0];
3042
+ const placement2 = (_overflowsData$map$so = overflowsData.map((d2) => [d2.placement, d2.overflows.filter((overflow2) => overflow2 > 0).reduce((acc, overflow2) => acc + overflow2, 0)]).sort((a2, b2) => a2[1] - b2[1])[0]) == null ? void 0 : _overflowsData$map$so[0];
3014
3043
  if (placement2) {
3015
3044
  resetPlacement = placement2;
3016
3045
  }
@@ -3140,7 +3169,7 @@ var offset = function(options) {
3140
3169
  var _middlewareData$offse, _middlewareData$arrow;
3141
3170
  const {
3142
3171
  x,
3143
- y,
3172
+ y: y2,
3144
3173
  placement,
3145
3174
  middlewareData
3146
3175
  } = state;
@@ -3150,7 +3179,7 @@ var offset = function(options) {
3150
3179
  }
3151
3180
  return {
3152
3181
  x: x + diffCoords.x,
3153
- y: y + diffCoords.y,
3182
+ y: y2 + diffCoords.y,
3154
3183
  data: __spreadProps(__spreadValues({}, diffCoords), {
3155
3184
  placement
3156
3185
  })
@@ -3159,7 +3188,7 @@ var offset = function(options) {
3159
3188
  };
3160
3189
  };
3161
3190
 
3162
- // node_modules/.pnpm/@floating-ui+utils@0.2.1/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs
3191
+ // node_modules/.pnpm/@floating-ui+utils@0.2.2/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs
3163
3192
  function getNodeName(node) {
3164
3193
  if (isNode(node)) {
3165
3194
  return (node.nodeName || "").toLowerCase();
@@ -3203,17 +3232,16 @@ function isTableElement(element) {
3203
3232
  }
3204
3233
  function isContainingBlock(element) {
3205
3234
  const webkit = isWebKit();
3206
- const css10 = getComputedStyle(element);
3207
- return css10.transform !== "none" || css10.perspective !== "none" || (css10.containerType ? css10.containerType !== "normal" : false) || !webkit && (css10.backdropFilter ? css10.backdropFilter !== "none" : false) || !webkit && (css10.filter ? css10.filter !== "none" : false) || ["transform", "perspective", "filter"].some((value) => (css10.willChange || "").includes(value)) || ["paint", "layout", "strict", "content"].some((value) => (css10.contain || "").includes(value));
3235
+ const css11 = getComputedStyle(element);
3236
+ return css11.transform !== "none" || css11.perspective !== "none" || (css11.containerType ? css11.containerType !== "normal" : false) || !webkit && (css11.backdropFilter ? css11.backdropFilter !== "none" : false) || !webkit && (css11.filter ? css11.filter !== "none" : false) || ["transform", "perspective", "filter"].some((value) => (css11.willChange || "").includes(value)) || ["paint", "layout", "strict", "content"].some((value) => (css11.contain || "").includes(value));
3208
3237
  }
3209
3238
  function getContainingBlock(element) {
3210
3239
  let currentNode = getParentNode(element);
3211
3240
  while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) {
3212
3241
  if (isContainingBlock(currentNode)) {
3213
3242
  return currentNode;
3214
- } else {
3215
- currentNode = getParentNode(currentNode);
3216
3243
  }
3244
+ currentNode = getParentNode(currentNode);
3217
3245
  }
3218
3246
  return null;
3219
3247
  }
@@ -3282,9 +3310,9 @@ function getOverflowAncestors(node, list, traverseIframes) {
3282
3310
 
3283
3311
  // node_modules/.pnpm/@floating-ui+dom@1.6.3/node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs
3284
3312
  function getCssDimensions(element) {
3285
- const css10 = getComputedStyle(element);
3286
- let width = parseFloat(css10.width) || 0;
3287
- let height = parseFloat(css10.height) || 0;
3313
+ const css11 = getComputedStyle(element);
3314
+ let width = parseFloat(css11.width) || 0;
3315
+ let height = parseFloat(css11.height) || 0;
3288
3316
  const hasOffset = isHTMLElement(element);
3289
3317
  const offsetWidth = hasOffset ? element.offsetWidth : width;
3290
3318
  const offsetHeight = hasOffset ? element.offsetHeight : height;
@@ -3314,16 +3342,16 @@ function getScale(element) {
3314
3342
  $
3315
3343
  } = getCssDimensions(domElement);
3316
3344
  let x = ($ ? round(rect.width) : rect.width) / width;
3317
- let y = ($ ? round(rect.height) : rect.height) / height;
3345
+ let y2 = ($ ? round(rect.height) : rect.height) / height;
3318
3346
  if (!x || !Number.isFinite(x)) {
3319
3347
  x = 1;
3320
3348
  }
3321
- if (!y || !Number.isFinite(y)) {
3322
- y = 1;
3349
+ if (!y2 || !Number.isFinite(y2)) {
3350
+ y2 = 1;
3323
3351
  }
3324
3352
  return {
3325
3353
  x,
3326
- y
3354
+ y: y2
3327
3355
  };
3328
3356
  }
3329
3357
  var noOffsets = /* @__PURE__ */ createCoords(0);
@@ -3367,7 +3395,7 @@ function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetPar
3367
3395
  }
3368
3396
  const visualOffsets = shouldAddVisualOffsets(domElement, isFixedStrategy, offsetParent) ? getVisualOffsets(domElement) : createCoords(0);
3369
3397
  let x = (clientRect.left + visualOffsets.x) / scale.x;
3370
- let y = (clientRect.top + visualOffsets.y) / scale.y;
3398
+ let y2 = (clientRect.top + visualOffsets.y) / scale.y;
3371
3399
  let width = clientRect.width / scale.x;
3372
3400
  let height = clientRect.height / scale.y;
3373
3401
  if (domElement) {
@@ -3378,15 +3406,15 @@ function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetPar
3378
3406
  while (currentIFrame && offsetParent && offsetWin !== currentWin) {
3379
3407
  const iframeScale = getScale(currentIFrame);
3380
3408
  const iframeRect = currentIFrame.getBoundingClientRect();
3381
- const css10 = getComputedStyle(currentIFrame);
3382
- const left = iframeRect.left + (currentIFrame.clientLeft + parseFloat(css10.paddingLeft)) * iframeScale.x;
3383
- const top = iframeRect.top + (currentIFrame.clientTop + parseFloat(css10.paddingTop)) * iframeScale.y;
3409
+ const css11 = getComputedStyle(currentIFrame);
3410
+ const left = iframeRect.left + (currentIFrame.clientLeft + parseFloat(css11.paddingLeft)) * iframeScale.x;
3411
+ const top = iframeRect.top + (currentIFrame.clientTop + parseFloat(css11.paddingTop)) * iframeScale.y;
3384
3412
  x *= iframeScale.x;
3385
- y *= iframeScale.y;
3413
+ y2 *= iframeScale.y;
3386
3414
  width *= iframeScale.x;
3387
3415
  height *= iframeScale.y;
3388
3416
  x += left;
3389
- y += top;
3417
+ y2 += top;
3390
3418
  currentWin = getWindow(currentIFrame);
3391
3419
  currentIFrame = currentWin.frameElement;
3392
3420
  }
@@ -3395,7 +3423,7 @@ function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetPar
3395
3423
  width,
3396
3424
  height,
3397
3425
  x,
3398
- y
3426
+ y: y2
3399
3427
  });
3400
3428
  }
3401
3429
  var topLayerSelectors = [":popover-open", ":modal"];
@@ -3453,45 +3481,45 @@ function getWindowScrollBarX(element) {
3453
3481
  return getBoundingClientRect(getDocumentElement(element)).left + getNodeScroll(element).scrollLeft;
3454
3482
  }
3455
3483
  function getDocumentRect(element) {
3456
- const html26 = getDocumentElement(element);
3484
+ const html30 = getDocumentElement(element);
3457
3485
  const scroll = getNodeScroll(element);
3458
3486
  const body = element.ownerDocument.body;
3459
- const width = max(html26.scrollWidth, html26.clientWidth, body.scrollWidth, body.clientWidth);
3460
- const height = max(html26.scrollHeight, html26.clientHeight, body.scrollHeight, body.clientHeight);
3487
+ const width = max(html30.scrollWidth, html30.clientWidth, body.scrollWidth, body.clientWidth);
3488
+ const height = max(html30.scrollHeight, html30.clientHeight, body.scrollHeight, body.clientHeight);
3461
3489
  let x = -scroll.scrollLeft + getWindowScrollBarX(element);
3462
- const y = -scroll.scrollTop;
3490
+ const y2 = -scroll.scrollTop;
3463
3491
  if (getComputedStyle(body).direction === "rtl") {
3464
- x += max(html26.clientWidth, body.clientWidth) - width;
3492
+ x += max(html30.clientWidth, body.clientWidth) - width;
3465
3493
  }
3466
3494
  return {
3467
3495
  width,
3468
3496
  height,
3469
3497
  x,
3470
- y
3498
+ y: y2
3471
3499
  };
3472
3500
  }
3473
3501
  function getViewportRect(element, strategy) {
3474
3502
  const win = getWindow(element);
3475
- const html26 = getDocumentElement(element);
3503
+ const html30 = getDocumentElement(element);
3476
3504
  const visualViewport = win.visualViewport;
3477
- let width = html26.clientWidth;
3478
- let height = html26.clientHeight;
3505
+ let width = html30.clientWidth;
3506
+ let height = html30.clientHeight;
3479
3507
  let x = 0;
3480
- let y = 0;
3508
+ let y2 = 0;
3481
3509
  if (visualViewport) {
3482
3510
  width = visualViewport.width;
3483
3511
  height = visualViewport.height;
3484
3512
  const visualViewportBased = isWebKit();
3485
3513
  if (!visualViewportBased || visualViewportBased && strategy === "fixed") {
3486
3514
  x = visualViewport.offsetLeft;
3487
- y = visualViewport.offsetTop;
3515
+ y2 = visualViewport.offsetTop;
3488
3516
  }
3489
3517
  }
3490
3518
  return {
3491
3519
  width,
3492
3520
  height,
3493
3521
  x,
3494
- y
3522
+ y: y2
3495
3523
  };
3496
3524
  }
3497
3525
  function getInnerBoundingClientRect(element, strategy) {
@@ -3502,12 +3530,12 @@ function getInnerBoundingClientRect(element, strategy) {
3502
3530
  const width = element.clientWidth * scale.x;
3503
3531
  const height = element.clientHeight * scale.y;
3504
3532
  const x = left * scale.x;
3505
- const y = top * scale.y;
3533
+ const y2 = top * scale.y;
3506
3534
  return {
3507
3535
  width,
3508
3536
  height,
3509
3537
  x,
3510
- y
3538
+ y: y2
3511
3539
  };
3512
3540
  }
3513
3541
  function getClientRectFromClippingAncestor(element, clippingAncestor, strategy) {
@@ -3618,10 +3646,10 @@ function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
3618
3646
  }
3619
3647
  }
3620
3648
  const x = rect.left + scroll.scrollLeft - offsets.x;
3621
- const y = rect.top + scroll.scrollTop - offsets.y;
3649
+ const y2 = rect.top + scroll.scrollTop - offsets.y;
3622
3650
  return {
3623
3651
  x,
3624
- y,
3652
+ y: y2,
3625
3653
  width: rect.width,
3626
3654
  height: rect.height
3627
3655
  };
@@ -3749,7 +3777,7 @@ var rotation = {
3749
3777
  var arrowDirectionClassname = (dir) => {
3750
3778
  let direction;
3751
3779
  if (/-/.test(dir)) {
3752
- direction = dir.split("-").map((d) => d.charAt(0).toUpperCase() + d.slice(1)).join("");
3780
+ direction = dir.split("-").map((d2) => d2.charAt(0).toUpperCase() + d2.slice(1)).join("");
3753
3781
  } else {
3754
3782
  direction = dir.charAt(0).toUpperCase() + dir.slice(1);
3755
3783
  }
@@ -3792,12 +3820,12 @@ async function useRecompute(state) {
3792
3820
  hide2()
3793
3821
  // 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'.
3794
3822
  ]
3795
- }).then(({ x, y, middlewareData, placement }) => {
3823
+ }).then(({ x, y: y2, middlewareData, placement }) => {
3796
3824
  state.actualDirection = placement;
3797
3825
  if (!(state == null ? void 0 : state.isCallout)) {
3798
3826
  Object.assign(attentionEl.style, {
3799
3827
  left: `${x}px`,
3800
- top: `${y}px`
3828
+ top: `${y2}px`
3801
3829
  });
3802
3830
  }
3803
3831
  if ((middlewareData == null ? void 0 : middlewareData.hide) && !(state == null ? void 0 : state.isCallout)) {
@@ -3875,8 +3903,8 @@ var getMessages7 = (locale, enMsg, nbMsg, fiMsg) => {
3875
3903
  };
3876
3904
  var activateI18n7 = (enMessages, nbMessages, fiMessages) => {
3877
3905
  const locale = detectLocale7();
3878
- const messages43 = getMessages7(locale, enMessages, nbMessages, fiMessages);
3879
- i18n.load(locale, messages43);
3906
+ const messages46 = getMessages7(locale, enMessages, nbMessages, fiMessages);
3907
+ i18n.load(locale, messages46);
3880
3908
  i18n.activate(locale);
3881
3909
  };
3882
3910
 
@@ -3983,7 +4011,7 @@ ${JSON.stringify(directions)}`
3983
4011
  tooltip: this.tooltip,
3984
4012
  highlight: this.highlight
3985
4013
  };
3986
- const activeVariant = Object.keys(variantProps).find((b) => !!variantProps[b]) || "";
4014
+ const activeVariant = Object.keys(variantProps).find((b2) => !!variantProps[b2]) || "";
3987
4015
  return {
3988
4016
  wrapper: attention[activeVariant],
3989
4017
  arrow: attention[`arrow${activeVariant.charAt(0).toUpperCase() + activeVariant.slice(1)}`]
@@ -4416,11 +4444,11 @@ var WarpBroadcast = class extends WarpElement7 {
4416
4444
  this._hiddenMessageIds = [.../* @__PURE__ */ new Set([...this._hiddenMessageIds, id])];
4417
4445
  }
4418
4446
  render() {
4419
- const messages43 = this._messages.filter((item) => !this._hiddenMessageIds.includes(item.id));
4447
+ const messages46 = this._messages.filter((item) => !this._hiddenMessageIds.includes(item.id));
4420
4448
  return html13`
4421
- <aside class=${`${messages43.length === 0 ? "hidden" : "mb-16"}`}>
4449
+ <aside class=${`${messages46.length === 0 ? "hidden" : "mb-16"}`}>
4422
4450
  ${repeat(
4423
- messages43,
4451
+ messages46,
4424
4452
  ({ id }) => `broadcast-${id}`,
4425
4453
  ({ id, message }) => html13`<w-toast id="broadcast-${id}" type="warning" text="${message}" canclose @close=${() => this._del(id)}> </w-toast>`
4426
4454
  )}
@@ -4740,8 +4768,8 @@ var getMessages8 = (locale, enMsg, nbMsg, fiMsg) => {
4740
4768
  };
4741
4769
  var activateI18n8 = (enMessages, nbMessages, fiMessages) => {
4742
4770
  const locale = detectLocale8();
4743
- const messages43 = getMessages8(locale, enMessages, nbMessages, fiMessages);
4744
- i18n.load(locale, messages43);
4771
+ const messages46 = getMessages8(locale, enMessages, nbMessages, fiMessages);
4772
+ i18n.load(locale, messages46);
4745
4773
  i18n.activate(locale);
4746
4774
  };
4747
4775
  activateI18n8(messages27, messages18, messages37);
@@ -4831,8 +4859,8 @@ var getMessages9 = (locale, enMsg, nbMsg, fiMsg) => {
4831
4859
  };
4832
4860
  var activateI18n9 = (enMessages, nbMessages, fiMessages) => {
4833
4861
  const locale = detectLocale9();
4834
- const messages43 = getMessages9(locale, enMessages, nbMessages, fiMessages);
4835
- i18n.load(locale, messages43);
4862
+ const messages46 = getMessages9(locale, enMessages, nbMessages, fiMessages);
4863
+ i18n.load(locale, messages46);
4836
4864
  i18n.activate(locale);
4837
4865
  };
4838
4866
  activateI18n9(messages28, messages19, messages38);
@@ -4965,24 +4993,522 @@ if (!customElements.get("w-expandable")) {
4965
4993
  customElements.define("w-expandable", WarpExpandable);
4966
4994
  }
4967
4995
 
4968
- // packages/pill/index.js
4996
+ // packages/modal/modal-footer.js
4969
4997
  import { html as html19 } from "lit";
4970
4998
  import WarpElement11 from "@warp-ds/elements-core";
4971
4999
 
5000
+ // packages/modal/util.js
5001
+ var CanCloseMixin = (superClass) => class extends superClass {
5002
+ constructor() {
5003
+ super(...arguments);
5004
+ __publicField(this, "patchClose", true);
5005
+ __publicField(this, "_close", null);
5006
+ }
5007
+ close() {
5008
+ this._close();
5009
+ }
5010
+ };
5011
+ var ProvidesCanCloseToSlotsMixin = (superClass) => class extends superClass {
5012
+ // HACK: slot-props don't seem to exist and neither does the context pattern for this
5013
+ /** @param {Event} evt */
5014
+ handleSlotChange(evt) {
5015
+ const children2 = evt.target.assignedNodes({ flatten: true });
5016
+ for (const child of children2.filter((e) => e.patchClose)) {
5017
+ child._close = () => this.close();
5018
+ }
5019
+ }
5020
+ };
5021
+
5022
+ // packages/modal/modal-footer.js
5023
+ var ModalFooter = class extends CanCloseMixin(ProvidesCanCloseToSlotsMixin(WarpElement11)) {
5024
+ render() {
5025
+ return html19`
5026
+ <div class="${modalElement.footer}">
5027
+ <slot @slotchange="${this.handleSlotChange}"></slot>
5028
+ </div>
5029
+ `;
5030
+ }
5031
+ };
5032
+ __publicField(ModalFooter, "styles", [WarpElement11.styles]);
5033
+
5034
+ // packages/modal/modal-header.js
5035
+ import { html as html21, nothing as nothing3 } from "lit";
5036
+
5037
+ // node_modules/.pnpm/@itsy+animate@0.0.9/node_modules/@itsy/animate/src/utility.js
5038
+ var computeDeltas = (first, last) => ({
5039
+ dx: first.left - last.left,
5040
+ dy: first.top - last.top,
5041
+ dw: first.width / last.width,
5042
+ dh: first.height / last.height,
5043
+ first,
5044
+ last
5045
+ });
5046
+ var moveKeyframes = ({ dx, dy }) => [
5047
+ { transform: `translate(${dx}px, ${dy}px)` },
5048
+ { transform: "none" }
5049
+ ];
5050
+ var animationDefaults = { easing: "ease", duration: 300 };
5051
+
5052
+ // node_modules/.pnpm/@itsy+animate@0.0.9/node_modules/@itsy/animate/src/reduce-motion.js
5053
+ var reduceMotion = false;
5054
+ var windowExists2 = typeof window !== "undefined";
5055
+ if (windowExists2) {
5056
+ const query = window.matchMedia("(prefers-reduced-motion: reduce)");
5057
+ const callback = ({ matches }) => reduceMotion = matches;
5058
+ if (query.addEventListener)
5059
+ query.addEventListener("change", callback);
5060
+ callback(query);
5061
+ }
5062
+
5063
+ // node_modules/.pnpm/@itsy+animate@0.0.9/node_modules/@itsy/animate/src/move.js
5064
+ var Move = class {
5065
+ constructor(el, { animation = {}, keyframes, respectReduceMotion = true } = {}) {
5066
+ /** @type {DOMRect | {}} */
5067
+ __publicField(this, "first");
5068
+ /** @type {DOMRect | {}} */
5069
+ __publicField(this, "last");
5070
+ /** @type {HTMLElement} */
5071
+ __publicField(this, "el");
5072
+ this.el = el;
5073
+ this.first = {};
5074
+ this.last = {};
5075
+ this.userAnimationOptions = animation;
5076
+ this.keyframeGenerator = keyframes || moveKeyframes;
5077
+ this.shouldReduceMotion = respectReduceMotion;
5078
+ }
5079
+ async when(cb) {
5080
+ this.prep();
5081
+ const v = await cb();
5082
+ await this.play();
5083
+ return v;
5084
+ }
5085
+ prep() {
5086
+ this.first = this.el.getBoundingClientRect();
5087
+ }
5088
+ async play() {
5089
+ this.last = this.el.getBoundingClientRect();
5090
+ if (!this.el.animate)
5091
+ return;
5092
+ const animation = this.el.animate(this.keyframes, this.animationOptions);
5093
+ await animation.finished;
5094
+ }
5095
+ get keyframes() {
5096
+ return this.keyframeGenerator(computeDeltas(this.first, this.last));
5097
+ }
5098
+ get defaults() {
5099
+ return animationDefaults;
5100
+ }
5101
+ get mergedOptions() {
5102
+ return __spreadValues(__spreadValues({}, this.defaults), this.userAnimationOptions);
5103
+ }
5104
+ get animationOptions() {
5105
+ if (!this.shouldReduceMotion)
5106
+ return this.mergedOptions;
5107
+ if (!reduceMotion)
5108
+ return this.mergedOptions;
5109
+ return __spreadProps(__spreadValues({}, this.mergedOptions), { duration: 0 });
5110
+ }
5111
+ };
5112
+
5113
+ // node_modules/.pnpm/@warp-ds+icons@2.0.1/node_modules/@warp-ds/icons/dist/elements/arrow-left-16.js
5114
+ import { LitElement as LitElement9 } from "lit";
5115
+ import { unsafeStatic as unsafeStatic9, html as html20 } from "lit/static-html.js";
5116
+ var messages20 = JSON.parse('{"icon.title.arrow-left":"Pil som peker mot venstre"}');
5117
+ var messages29 = JSON.parse('{"icon.title.arrow-left":"Leftward-pointing arrow"}');
5118
+ var messages39 = JSON.parse('{"icon.title.arrow-left":"Vasemmalle osoittava nuoli"}');
5119
+ var supportedLocales10 = ["en", "nb", "fi", "da", "sv"];
5120
+ var defaultLocale11 = "en";
5121
+ var detectByBrand9 = () => {
5122
+ let value;
5123
+ switch (process.env.NMP_BRAND) {
5124
+ case "FINN":
5125
+ value = "nb";
5126
+ break;
5127
+ case "TORI":
5128
+ value = "fi";
5129
+ break;
5130
+ case "BLOCKET":
5131
+ value = "sv";
5132
+ break;
5133
+ case "DBA":
5134
+ value = "da";
5135
+ break;
5136
+ default:
5137
+ value = "en";
5138
+ }
5139
+ return value;
5140
+ };
5141
+ var detectByHost9 = () => {
5142
+ var _a;
5143
+ const hostname = (_a = document == null ? void 0 : document.location) == null ? void 0 : _a.hostname;
5144
+ if (hostname.includes("finn")) {
5145
+ return "nb";
5146
+ } else if (hostname.includes("tori")) {
5147
+ return "fi";
5148
+ } else if (hostname.includes("blocket")) {
5149
+ return "sv";
5150
+ } else if (hostname.includes("dba")) {
5151
+ return "da";
5152
+ } else {
5153
+ return defaultLocale11;
5154
+ }
5155
+ };
5156
+ var getSupportedLocale10 = (usedLocale) => {
5157
+ return supportedLocales10.find(
5158
+ (locale) => usedLocale === locale || usedLocale.toLowerCase().includes(locale)
5159
+ ) || detectByHost9();
5160
+ };
5161
+ function detectLocale10() {
5162
+ var _a;
5163
+ if (typeof window === "undefined") {
5164
+ const serverLocale = detectByBrand9();
5165
+ return getSupportedLocale10(serverLocale);
5166
+ }
5167
+ try {
5168
+ const htmlLocale = (_a = document == null ? void 0 : document.documentElement) == null ? void 0 : _a.lang;
5169
+ const hostLocale = detectByHost9();
5170
+ if (!supportedLocales10.includes(htmlLocale)) {
5171
+ console.warn("Unsupported locale set in html lang tag, falling back to detection by hostname");
5172
+ return getSupportedLocale10(hostLocale);
5173
+ }
5174
+ return getSupportedLocale10(htmlLocale != null ? htmlLocale : hostLocale);
5175
+ } catch (e) {
5176
+ console.warn("could not detect locale, falling back to source locale", e);
5177
+ return defaultLocale11;
5178
+ }
5179
+ }
5180
+ var getMessages10 = (locale, enMsg, nbMsg, fiMsg) => {
5181
+ if (locale === "nb")
5182
+ return nbMsg;
5183
+ if (locale === "fi")
5184
+ return fiMsg;
5185
+ return enMsg;
5186
+ };
5187
+ var activateI18n10 = (enMessages, nbMessages, fiMessages) => {
5188
+ const locale = detectLocale10();
5189
+ const messages46 = getMessages10(locale, enMessages, nbMessages, fiMessages);
5190
+ i18n.load(locale, messages46);
5191
+ i18n.activate(locale);
5192
+ };
5193
+ activateI18n10(messages29, messages20, messages39);
5194
+ var IconArrowLeft16 = class extends LitElement9 {
5195
+ render() {
5196
+ const title = i18n.t({ message: `Leftward-pointing arrow`, id: "icon.title.arrow-left", comment: "Title for table arrow left icon" });
5197
+ return html20`<svg xmlns="http://www.w3.org/2000/svg"width="16"height="16"fill="none"viewBox="0 0 16 16" part="w-icon-arrow-left-16-part">${unsafeStatic9(`<title>${title}</title>`)}<path stroke="currentColor" stroke-linecap="round" stroke-width="1.5" d="M5.222 8h6.667"></path><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M7.444 11.75 4.111 8l3.333-3.75"></path></svg>`;
5198
+ }
5199
+ };
5200
+ if (!customElements.get("w-icon-arrow-left-16")) {
5201
+ customElements.define("w-icon-arrow-left-16", IconArrowLeft16);
5202
+ }
5203
+
5204
+ // packages/modal/modal-header.js
5205
+ import WarpElement12 from "@warp-ds/elements-core";
5206
+ import { createRef, ref } from "lit/directives/ref.js";
5207
+ var NO_CLOSE_BUTTON = "no-close";
5208
+ var ModalHeader = class extends CanCloseMixin(WarpElement12) {
5209
+ constructor() {
5210
+ super();
5211
+ __publicField(this, "titleEl", createRef());
5212
+ this._hasTopContent = false;
5213
+ }
5214
+ render() {
5215
+ return html21`
5216
+ <div class="${modalElement.header}">
5217
+ <slot name="top" @slotchange=${this.handleTopSlotChange}></slot>
5218
+ <div class="${this._hasTopContent ? "" : modalElement.headerTitleBar}">
5219
+ ${this.backButton}
5220
+ <h1 ${ref(this.titleEl)} class="${this.titleClasses}">${this.title}</h1>
5221
+ ${this.closeButton}
5222
+ </div>
5223
+ </div>
5224
+ `;
5225
+ }
5226
+ async willUpdate(changedProperties) {
5227
+ if (changedProperties.has("back")) {
5228
+ const move = new Move(this.titleEl.value);
5229
+ move.when(async () => {
5230
+ await this.updateComplete;
5231
+ });
5232
+ }
5233
+ }
5234
+ get titleClasses() {
5235
+ return [
5236
+ modalElement.headerTitle,
5237
+ this.back ? modalElement.headerTitleWithBackButton : modalElement.headerTitleWithoutBackButton,
5238
+ this._hasTopContent ? modalElement.headerTitleWithTopArea : ""
5239
+ ].join(" ");
5240
+ }
5241
+ get backButton() {
5242
+ return this.back && !this._hasTopContent ? html21` <button type="button" class="${modalElement.headerButton} ${modalElement.headerButtonLeft}" @click="${this.emitBack}">
5243
+ <w-icon-arrow-left-16></w-icon-arrow-left-16>
5244
+ </button>` : nothing3;
5245
+ }
5246
+ get closeButton() {
5247
+ if (this[NO_CLOSE_BUTTON])
5248
+ return nothing3;
5249
+ return html21` <button
5250
+ type="button"
5251
+ class="${modalElement.headerButton} ${this._hasTopContent ? modalElement.headerCloseButtonOnImage : modalElement.headerCloseButton}"
5252
+ @click="${this.close}">
5253
+ <w-icon-close-16></w-icon-close-16>
5254
+ </button>`;
5255
+ }
5256
+ emitBack() {
5257
+ this.dispatchEvent(new CustomEvent("backClicked", { bubbles: true, composed: true }));
5258
+ }
5259
+ handleTopSlotChange(slotEvent) {
5260
+ const topContent = slotEvent.target.assignedElements({ flatten: true });
5261
+ this._hasTopContent = !!topContent.length;
5262
+ }
5263
+ };
5264
+ __publicField(ModalHeader, "properties", {
5265
+ title: { type: String },
5266
+ back: { type: Boolean },
5267
+ [NO_CLOSE_BUTTON]: { type: Boolean },
5268
+ _hasTopContent: { state: true }
5269
+ });
5270
+ __publicField(ModalHeader, "styles", [WarpElement12.styles]);
5271
+
5272
+ // packages/modal/modal-main.js
5273
+ import { css as css6, html as html22 } from "lit";
5274
+ import WarpElement13 from "@warp-ds/elements-core";
5275
+ import { createRef as createRef2, ref as ref2 } from "lit/directives/ref.js";
5276
+
5277
+ // node_modules/.pnpm/scroll-doctor@2.0.2/node_modules/scroll-doctor/dist/scroll-doctor.js
5278
+ var n = [];
5279
+ var c = { documentElement: {}, body: {} };
5280
+ var i = Object.freeze({
5281
+ // html
5282
+ documentElement: {
5283
+ "scrollbar-gutter": "stable"
5284
+ },
5285
+ body: {
5286
+ overflow: "hidden",
5287
+ position: "relative",
5288
+ height: "100%"
5289
+ }
5290
+ });
5291
+ var r2 = (t) => {
5292
+ var _a;
5293
+ t.touches.length > 1 || ((_a = t.preventDefault) == null ? void 0 : _a.call(t));
5294
+ };
5295
+ var h = (t) => ([e, s]) => {
5296
+ c[t][e] = document[t].style[e], document[t].style[e] = s;
5297
+ };
5298
+ var a = () => Object.entries(i).forEach(([t, e]) => {
5299
+ Object.entries(e).forEach(h(t));
5300
+ });
5301
+ var d = (t) => ([e, s]) => {
5302
+ document[t].style[e] = c[t][e];
5303
+ };
5304
+ var f = () => Object.entries(c).forEach(([t, e]) => {
5305
+ Object.entries(e).forEach(d(t));
5306
+ });
5307
+ var m = (t) => t.scrollHeight - Math.abs(t.scrollTop) === t.clientHeight;
5308
+ function y(t) {
5309
+ let e = -1;
5310
+ const s = (o) => {
5311
+ if (o.targetTouches.length !== 1)
5312
+ return;
5313
+ const l = o.targetTouches[0].clientY - e;
5314
+ return t.scrollTop === 0 && l > 0 || m(t) && l < 0 ? r2(o) : (o.stopPropagation(), true);
5315
+ };
5316
+ t.ontouchstart = (o) => {
5317
+ o.targetTouches.length === 1 && (e = o.targetTouches[0].clientY);
5318
+ }, t.ontouchmove = s;
5319
+ }
5320
+ function p(t) {
5321
+ t.ontouchstart = null, t.ontouchmove = null;
5322
+ }
5323
+ var u = (t) => () => document[t ? "addEventListener" : "removeEventListener"]("touchmove", r2, { passive: false });
5324
+ var b = u(true);
5325
+ var g = u();
5326
+ function E(t) {
5327
+ if (!t)
5328
+ throw Error("Could not run setup, an element must be provided");
5329
+ n.some((e) => e === t) || (n.length || (a(), b()), y(t), n.push(t));
5330
+ }
5331
+ function T() {
5332
+ n.forEach(p), g(), f(), n = [];
5333
+ }
5334
+
5335
+ // packages/modal/modal-main.js
5336
+ var NO_BACKDROP_CLICKS = "ignore-backdrop-clicks";
5337
+ var CONTENT_ID = "content-id";
5338
+ var ModalMain = class extends ProvidesCanCloseToSlotsMixin(WarpElement13) {
5339
+ constructor() {
5340
+ super();
5341
+ __publicField(this, "dialogEl", createRef2());
5342
+ __publicField(this, "dialogInnerEl", createRef2());
5343
+ __publicField(this, "contentEl", createRef2());
5344
+ this.interceptEscape = this.interceptEscape.bind(this);
5345
+ this.closeOnBackdropClick = this.closeOnBackdropClick.bind(this);
5346
+ this.eventPreventer = this.eventPreventer.bind(this);
5347
+ this.modifyBorderRadius = this.modifyBorderRadius.bind(this);
5348
+ }
5349
+ async open() {
5350
+ this.dialogEl.value.showModal();
5351
+ this.handleListeners();
5352
+ E(this.contentEl.value);
5353
+ await this.updateComplete;
5354
+ this.dispatchEvent(new CustomEvent("shown", { bubbles: true, composed: true }));
5355
+ }
5356
+ close() {
5357
+ this.handleListeners("removeEventListener");
5358
+ this.dialogEl.value.classList.add("close");
5359
+ this.dialogEl.value.addEventListener(
5360
+ "animationend",
5361
+ async () => {
5362
+ this.dialogEl.value.classList.remove("close");
5363
+ this.dialogEl.value.close();
5364
+ T();
5365
+ await this.updateComplete;
5366
+ this.dispatchEvent(new CustomEvent("hidden", { bubbles: true, composed: true }));
5367
+ },
5368
+ { once: true }
5369
+ );
5370
+ }
5371
+ render() {
5372
+ return html22`
5373
+ <dialog ${ref2(this.dialogEl)} class="w-modal ${modalElement.dialogEl}">
5374
+ <div ${ref2(this.dialogInnerEl)} class="${modalElement.dialogInner}">
5375
+ <slot name="header" @slotchange="${this.handleSlotChange}"></slot>
5376
+ <div ${ref2(this.contentEl)} class="${modalElement.contentSlot}" id=${this[CONTENT_ID]}>
5377
+ <slot name="content" @slotchange="${this.handleSlotChange}"></slot>
5378
+ </div>
5379
+ <slot name="footer" @slotchange="${this.handleSlotChange}"></slot>
5380
+ </div>
5381
+ </dialog>
5382
+ `;
5383
+ }
5384
+ willUpdate(changedProperties) {
5385
+ if (changedProperties.has("show"))
5386
+ this[this.show ? "open" : "close"]();
5387
+ }
5388
+ handleListeners(verb = "addEventListener") {
5389
+ document[verb]("keydown", this.interceptEscape);
5390
+ if (!this[NO_BACKDROP_CLICKS])
5391
+ this.dialogEl.value[verb]("mousedown", this.closeOnBackdropClick);
5392
+ this.dialogEl.value[verb]("close", this.eventPreventer);
5393
+ this.dialogEl.value[verb]("cancel", this.eventPreventer);
5394
+ this.dialogInnerEl.value[verb]("transitionend", this.modifyBorderRadius);
5395
+ }
5396
+ /** @param {Event} evt */
5397
+ eventPreventer(evt) {
5398
+ evt.preventDefault();
5399
+ }
5400
+ /** @param {MouseEvent} evt */
5401
+ closeOnBackdropClick(evt) {
5402
+ if (this.dialogEl.value === evt.target)
5403
+ this.close();
5404
+ }
5405
+ /** @param {KeyboardEvent} evt */
5406
+ interceptEscape(evt) {
5407
+ if (evt.key === "Escape") {
5408
+ evt.preventDefault();
5409
+ this.close();
5410
+ }
5411
+ }
5412
+ modifyBorderRadius() {
5413
+ if (this.dialogInnerEl.value.scrollHeight * 1.02 > innerHeight)
5414
+ this.dialogInnerEl.value.style.borderRadius = "0px";
5415
+ else
5416
+ this.dialogInnerEl.value.style.borderRadius = null;
5417
+ }
5418
+ };
5419
+ __publicField(ModalMain, "properties", {
5420
+ show: { type: Boolean },
5421
+ [CONTENT_ID]: { type: String },
5422
+ [NO_BACKDROP_CLICKS]: { type: Boolean }
5423
+ });
5424
+ __publicField(ModalMain, "styles", [
5425
+ WarpElement13.styles,
5426
+ css6`
5427
+ .w-modal {
5428
+ --w-modal-translate-distance: 100%;
5429
+ }
5430
+ @media (min-width: 480px) {
5431
+ .w-modal {
5432
+ --w-modal-translate-distance: 50%;
5433
+ }
5434
+ }
5435
+ .w-modal[open] {
5436
+ animation: w-modal-in 0.3s ease-in-out forwards;
5437
+ }
5438
+ .w-modal.close {
5439
+ animation: w-modal-out 0.3s ease-in-out forwards;
5440
+ }
5441
+ .w-modal[open]::backdrop {
5442
+ animation: backdrop-in 0.3s ease-in-out forwards;
5443
+ }
5444
+ .w-modal.close::backdrop {
5445
+ animation: backdrop-out 0.3s ease-in-out forwards;
5446
+ }
5447
+ /* shouldn't need two (in/out) animations declared here, but reversing is being weird */
5448
+ @keyframes w-modal-in {
5449
+ from {
5450
+ transform: translateY(var(--w-modal-translate-distance));
5451
+ opacity: 0;
5452
+ }
5453
+ to {
5454
+ transform: translateY(0);
5455
+ opacity: 1;
5456
+ }
5457
+ }
5458
+ @keyframes w-modal-out {
5459
+ from {
5460
+ transform: translateY(0);
5461
+ opacity: 1;
5462
+ }
5463
+ to {
5464
+ transform: translateY(var(--w-modal-translate-distance));
5465
+ opacity: 0;
5466
+ }
5467
+ }
5468
+ @keyframes backdrop-in {
5469
+ from {
5470
+ background: transparent;
5471
+ }
5472
+ to {
5473
+ background: rgba(0, 0, 0, 0.25);
5474
+ }
5475
+ }
5476
+ @keyframes backdrop-out {
5477
+ from {
5478
+ background: rgba(0, 0, 0, 0.25);
5479
+ }
5480
+ to {
5481
+ background: transparent;
5482
+ }
5483
+ }
5484
+ `
5485
+ ]);
5486
+
5487
+ // packages/modal/index.js
5488
+ if (!customElements.get("w-modal")) {
5489
+ customElements.define("w-modal", ModalMain);
5490
+ customElements.define("w-modal-header", ModalHeader);
5491
+ customElements.define("w-modal-footer", ModalFooter);
5492
+ }
5493
+
5494
+ // packages/pill/index.js
5495
+ import { html as html23 } from "lit";
5496
+ import WarpElement14 from "@warp-ds/elements-core";
5497
+
4972
5498
  // packages/pill/locales/en/messages.mjs
4973
- var messages20 = JSON.parse('{"pill.aria.openFilter":"Open filter","pill.aria.removeFilter":["Remove filter ",["label"]]}');
5499
+ var messages21 = JSON.parse('{"pill.aria.openFilter":"Open filter","pill.aria.removeFilter":["Remove filter ",["label"]]}');
4974
5500
 
4975
5501
  // packages/pill/locales/fi/messages.mjs
4976
- var messages21 = JSON.parse('{"pill.aria.openFilter":"Avaa suodatin","pill.aria.removeFilter":["Tyhjenn\xE4 suodatin ",["label"]]}');
5502
+ var messages30 = JSON.parse('{"pill.aria.openFilter":"Avaa suodatin","pill.aria.removeFilter":["Tyhjenn\xE4 suodatin ",["label"]]}');
4977
5503
 
4978
5504
  // packages/pill/locales/nb/messages.mjs
4979
- var messages29 = JSON.parse('{"pill.aria.openFilter":"\xC5pne filter","pill.aria.removeFilter":["Fjern filter ",["label"]]}');
5505
+ var messages31 = JSON.parse('{"pill.aria.openFilter":"\xC5pne filter","pill.aria.removeFilter":["Fjern filter ",["label"]]}');
4980
5506
 
4981
5507
  // packages/pill/index.js
4982
- var WarpPill = class extends kebabCaseAttributes(WarpElement11) {
5508
+ var WarpPill = class extends kebabCaseAttributes(WarpElement14) {
4983
5509
  constructor() {
4984
5510
  super();
4985
- activateI18n7(messages20, messages29, messages21);
5511
+ activateI18n7(messages21, messages31, messages30);
4986
5512
  this.canClose = false;
4987
5513
  this.suggestion = false;
4988
5514
  this.openFilterSrText = i18n._({
@@ -5018,13 +5544,13 @@ var WarpPill = class extends kebabCaseAttributes(WarpElement11) {
5018
5544
  this.dispatchEvent(new CustomEvent("w-pill-close", { bubbles: true, composed: true }));
5019
5545
  }
5020
5546
  render() {
5021
- return html19`
5547
+ return html23`
5022
5548
  <div class="${pill.pill}">
5023
5549
  <button type="button" class="${this._labelClasses}" @click="${this._onClick}">
5024
5550
  <span class="${pill.a11y}">${this.openSrLabel ? this.openSrLabel : this.openFilterSrText}</span>
5025
5551
  <slot></slot>
5026
5552
  </button>
5027
- ${this.canClose ? html19`<button type="button" class="${this._closeClasses}" @click="${this._onClose}">
5553
+ ${this.canClose ? html23`<button type="button" class="${this._closeClasses}" @click="${this._onClose}">
5028
5554
  <span class="${pill.a11y}">${this.closeSrLabel ? this.closeSrLabel : this.removeFilterSrText}</span>
5029
5555
  <w-icon-close-16></w-icon-close-16>
5030
5556
  </button>` : null}
@@ -5032,7 +5558,7 @@ var WarpPill = class extends kebabCaseAttributes(WarpElement11) {
5032
5558
  `;
5033
5559
  }
5034
5560
  };
5035
- __publicField(WarpPill, "styles", [WarpElement11.styles]);
5561
+ __publicField(WarpPill, "styles", [WarpElement14.styles]);
5036
5562
  __publicField(WarpPill, "properties", {
5037
5563
  canClose: { type: Boolean },
5038
5564
  suggestion: { type: Boolean },
@@ -5044,24 +5570,24 @@ if (!customElements.get("w-pill")) {
5044
5570
  }
5045
5571
 
5046
5572
  // packages/select/index.js
5047
- import { html as html20 } from "lit";
5048
- import WarpElement12 from "@warp-ds/elements-core";
5573
+ import { html as html24 } from "lit";
5574
+ import WarpElement15 from "@warp-ds/elements-core";
5049
5575
  import { ifDefined as ifDefined5 } from "lit/directives/if-defined.js";
5050
5576
  import { unsafeHTML } from "lit/directives/unsafe-html.js";
5051
5577
  import { when } from "lit/directives/when.js";
5052
5578
 
5053
5579
  // packages/select/locales/en/messages.mjs
5054
- var messages30 = JSON.parse('{"select.label.optional":"(optional)"}');
5580
+ var messages40 = JSON.parse('{"select.label.optional":"(optional)"}');
5055
5581
 
5056
5582
  // packages/select/locales/fi/messages.mjs
5057
- var messages31 = JSON.parse('{"select.label.optional":"(vapaaehtoinen)"}');
5583
+ var messages41 = JSON.parse('{"select.label.optional":"(vapaaehtoinen)"}');
5058
5584
 
5059
5585
  // packages/select/locales/nb/messages.mjs
5060
- var messages39 = JSON.parse('{"select.label.optional":"(valgfritt)"}');
5586
+ var messages42 = JSON.parse('{"select.label.optional":"(valgfritt)"}');
5061
5587
 
5062
5588
  // packages/select/index.js
5063
5589
  var _classes, classes_get, _helpTextClasses, helpTextClasses_get, _chevronClasses, chevronClasses_get, _id, id_get, _helpId, helpId_get;
5064
- var WarpSelect = class extends kebabCaseAttributes(WarpElement12) {
5590
+ var WarpSelect = class extends kebabCaseAttributes(WarpElement15) {
5065
5591
  constructor() {
5066
5592
  super();
5067
5593
  __privateAdd(this, _classes);
@@ -5069,18 +5595,18 @@ var WarpSelect = class extends kebabCaseAttributes(WarpElement12) {
5069
5595
  __privateAdd(this, _chevronClasses);
5070
5596
  __privateAdd(this, _id);
5071
5597
  __privateAdd(this, _helpId);
5072
- activateI18n7(messages30, messages39, messages31);
5598
+ activateI18n7(messages40, messages42, messages41);
5073
5599
  this._options = this.innerHTML;
5074
5600
  }
5075
5601
  render() {
5076
- return html20`<div class="${select.wrapper}">
5602
+ return html24`<div class="${select.wrapper}">
5077
5603
  ${when(
5078
5604
  this.label,
5079
- () => html20`<label class="${label.label}" for="${__privateGet(this, _id, id_get)}">
5605
+ () => html24`<label class="${label.label}" for="${__privateGet(this, _id, id_get)}">
5080
5606
  ${this.label}
5081
5607
  ${when(
5082
5608
  this.optional,
5083
- () => html20`<span class="${label.optional}"
5609
+ () => html24`<span class="${label.optional}"
5084
5610
  >${i18n._({
5085
5611
  id: "select.label.optional",
5086
5612
  message: "(optional)",
@@ -5104,7 +5630,7 @@ var WarpSelect = class extends kebabCaseAttributes(WarpElement12) {
5104
5630
  <w-icon-chevron-down-16></w-icon-chevron-down-16>
5105
5631
  </div>
5106
5632
  </div>
5107
- ${when(this.always || this.invalid, () => html20`<div id="${__privateGet(this, _helpId, helpId_get)}" class="${__privateGet(this, _helpTextClasses, helpTextClasses_get)}">${this.hint}</div>`)}
5633
+ ${when(this.always || this.invalid, () => html24`<div id="${__privateGet(this, _helpId, helpId_get)}" class="${__privateGet(this, _helpTextClasses, helpTextClasses_get)}">${this.hint}</div>`)}
5108
5634
  </div>`;
5109
5635
  }
5110
5636
  };
@@ -5153,16 +5679,16 @@ __publicField(WarpSelect, "properties", {
5153
5679
  optional: { type: Boolean, reflect: true },
5154
5680
  _options: { state: true }
5155
5681
  });
5156
- __publicField(WarpSelect, "styles", [WarpElement12.styles]);
5682
+ __publicField(WarpSelect, "styles", [WarpElement15.styles]);
5157
5683
  if (!customElements.get("w-select")) {
5158
5684
  customElements.define("w-select", WarpSelect);
5159
5685
  }
5160
5686
 
5161
5687
  // packages/textfield/index.js
5162
- import { css as css6, html as html21 } from "lit";
5163
- import WarpElement13 from "@warp-ds/elements-core";
5688
+ import { css as css7, html as html25 } from "lit";
5689
+ import WarpElement16 from "@warp-ds/elements-core";
5164
5690
  import { ifDefined as ifDefined6 } from "lit/directives/if-defined.js";
5165
- var WarpTextField = class extends WarpElement13 {
5691
+ var WarpTextField = class extends WarpElement16 {
5166
5692
  constructor() {
5167
5693
  super();
5168
5694
  this.type = "text";
@@ -5187,7 +5713,7 @@ var WarpTextField = class extends WarpElement13 {
5187
5713
  }
5188
5714
  get _label() {
5189
5715
  if (this.label) {
5190
- return html21`<label for="${this._id}" class=${label.label}>${this.label}</label>`;
5716
+ return html25`<label for="${this._id}" class=${label.label}>${this.label}</label>`;
5191
5717
  }
5192
5718
  }
5193
5719
  get _helpId() {
@@ -5225,7 +5751,7 @@ var WarpTextField = class extends WarpElement13 {
5225
5751
  this._hasSuffix = true;
5226
5752
  }
5227
5753
  render() {
5228
- return html21`
5754
+ return html25`
5229
5755
  ${this._label}
5230
5756
  <div class="${input.wrapper}">
5231
5757
  <slot @slotchange="${this.prefixSlotChange}" name="prefix"></slot>
@@ -5253,7 +5779,7 @@ var WarpTextField = class extends WarpElement13 {
5253
5779
  @focus="${this.handler}" />
5254
5780
  <slot @slotchange="${this.suffixSlotChange}" name="suffix"></slot>
5255
5781
  </div>
5256
- ${this.helpText && html21`<div class="${this._helpTextStyles}" id="${this._helpId}">${this.helpText}</div>`}
5782
+ ${this.helpText && html25`<div class="${this._helpTextStyles}" id="${this._helpId}">${this.helpText}</div>`}
5257
5783
  `;
5258
5784
  }
5259
5785
  };
@@ -5283,8 +5809,8 @@ __publicField(WarpTextField, "properties", {
5283
5809
  // so never gets higher Specificity. Thus in order to overwrite style linked within shadowDOM, we need to use !important.
5284
5810
  // https://stackoverflow.com/a/61631668
5285
5811
  __publicField(WarpTextField, "styles", [
5286
- WarpElement13.styles,
5287
- css6`
5812
+ WarpElement16.styles,
5813
+ css7`
5288
5814
  :host {
5289
5815
  display: block;
5290
5816
  }
@@ -5326,10 +5852,10 @@ function updateToast(id, options) {
5326
5852
  }
5327
5853
 
5328
5854
  // packages/toast/toast-container.js
5329
- import { css as css7, html as html22 } from "lit";
5330
- import WarpElement14 from "@warp-ds/elements-core";
5855
+ import { css as css8, html as html26 } from "lit";
5856
+ import WarpElement17 from "@warp-ds/elements-core";
5331
5857
  import { repeat as repeat2 } from "lit/directives/repeat.js";
5332
- var WarpToastContainer = class extends WarpElement14 {
5858
+ var WarpToastContainer = class extends WarpElement17 {
5333
5859
  constructor() {
5334
5860
  super();
5335
5861
  this._toasts = /* @__PURE__ */ new Map();
@@ -5419,13 +5945,13 @@ var WarpToastContainer = class extends WarpElement14 {
5419
5945
  return result;
5420
5946
  }
5421
5947
  render() {
5422
- return html22`
5948
+ return html26`
5423
5949
  <aside class="${toaster.container}">
5424
5950
  <div class="${toaster.toaster}" id="w-toast-container-list">
5425
5951
  ${repeat2(
5426
5952
  this._toastsArray,
5427
5953
  (toast3) => toast3.id,
5428
- (toast3) => html22` <w-toast
5954
+ (toast3) => html26` <w-toast
5429
5955
  class="${toaster.content}"
5430
5956
  id="${toast3.id}"
5431
5957
  type="${toast3.type}"
@@ -5440,8 +5966,8 @@ var WarpToastContainer = class extends WarpElement14 {
5440
5966
  }
5441
5967
  };
5442
5968
  __publicField(WarpToastContainer, "styles", [
5443
- WarpElement14.styles,
5444
- css7`
5969
+ WarpElement17.styles,
5970
+ css8`
5445
5971
  :host {
5446
5972
  display: block;
5447
5973
  }
@@ -5455,13 +5981,13 @@ if (!customElements.get("w-toast-container")) {
5455
5981
  }
5456
5982
 
5457
5983
  // packages/toast/toast.js
5458
- import { css as css8, html as html23 } from "lit";
5459
- import WarpElement15 from "@warp-ds/elements-core";
5984
+ import { css as css9, html as html27 } from "lit";
5985
+ import WarpElement18 from "@warp-ds/elements-core";
5460
5986
 
5461
5987
  // node_modules/.pnpm/element-collapse@1.1.0/node_modules/element-collapse/index.js
5462
- var windowExists2 = typeof window !== "undefined";
5988
+ var windowExists3 = typeof window !== "undefined";
5463
5989
  var prefersMotion = true;
5464
- if (windowExists2) {
5990
+ if (windowExists3) {
5465
5991
  const query = window.matchMedia("(prefers-reduced-motion: reduce)");
5466
5992
  const callback = ({ matches }) => prefersMotion = !matches;
5467
5993
  if (query.addEventListener)
@@ -5492,15 +6018,15 @@ var getAfterCollapseCallback = (done) => () => {
5492
6018
  var expand = (el, done) => {
5493
6019
  const returnPromise = (() => {
5494
6020
  if (!done)
5495
- return new Promise((r2) => {
5496
- done = r2;
6021
+ return new Promise((r3) => {
6022
+ done = r3;
5497
6023
  });
5498
6024
  })();
5499
6025
  const afterExpandCallback = getAfterExpandCallback(el, done);
5500
6026
  removeTransition(el);
5501
6027
  el.style.height = "auto";
5502
6028
  let dest = el.scrollHeight;
5503
- windowExists2 && requestAnimationFrame(() => {
6029
+ windowExists3 && requestAnimationFrame(() => {
5504
6030
  el.addEventListener("transitionend", afterExpandCallback, { once: true });
5505
6031
  el.style.height = "0px";
5506
6032
  el.style.transitionTimingFunction = "ease-out";
@@ -5513,14 +6039,14 @@ var expand = (el, done) => {
5513
6039
  var collapse = (el, done) => {
5514
6040
  const returnPromise = (() => {
5515
6041
  if (!done)
5516
- return new Promise((r2) => {
5517
- done = r2;
6042
+ return new Promise((r3) => {
6043
+ done = r3;
5518
6044
  });
5519
6045
  })();
5520
6046
  const afterCollapseCallback = getAfterCollapseCallback(done);
5521
6047
  removeTransition(el);
5522
6048
  let original = el.scrollHeight;
5523
- windowExists2 && requestAnimationFrame(() => {
6049
+ windowExists3 && requestAnimationFrame(() => {
5524
6050
  el.addEventListener("transitionend", afterCollapseCallback, { once: true });
5525
6051
  el.style.height = original + "px";
5526
6052
  el.style.transitionTimingFunction = "ease-in";
@@ -5536,13 +6062,13 @@ import { classMap as classMap2 } from "lit/directives/class-map.js";
5536
6062
  import { when as when2 } from "lit/directives/when.js";
5537
6063
 
5538
6064
  // packages/toast/locales/en/messages.mjs
5539
- var messages40 = JSON.parse('{"toast.aria.error":"Error","toast.aria.successful":"Successful","toast.aria.warning":"Warning"}');
6065
+ var messages43 = JSON.parse('{"toast.aria.error":"Error","toast.aria.successful":"Successful","toast.aria.warning":"Warning"}');
5540
6066
 
5541
6067
  // packages/toast/locales/fi/messages.mjs
5542
- var messages41 = JSON.parse('{"toast.aria.error":"Error","toast.aria.successful":"Successful","toast.aria.warning":"Warning"}');
6068
+ var messages44 = JSON.parse('{"toast.aria.error":"Error","toast.aria.successful":"Successful","toast.aria.warning":"Warning"}');
5543
6069
 
5544
6070
  // packages/toast/locales/nb/messages.mjs
5545
- var messages42 = JSON.parse('{"toast.aria.error":"Varsel","toast.aria.successful":"Vellykket","toast.aria.warning":"Feil"}');
6071
+ var messages45 = JSON.parse('{"toast.aria.error":"Varsel","toast.aria.successful":"Vellykket","toast.aria.warning":"Feil"}');
5546
6072
 
5547
6073
  // packages/toast/toast.js
5548
6074
  var classes2 = (definition) => {
@@ -5559,10 +6085,10 @@ var toastType = {
5559
6085
  error: "error",
5560
6086
  warning: "warning"
5561
6087
  };
5562
- var WarpToast = class extends WarpElement15 {
6088
+ var WarpToast = class extends WarpElement18 {
5563
6089
  constructor() {
5564
6090
  super();
5565
- activateI18n7(messages40, messages42, messages41);
6091
+ activateI18n7(messages43, messages45, messages44);
5566
6092
  this.id = Date.now().toString(36) + Math.random().toString(36).slice(2, 5);
5567
6093
  this.type = "success";
5568
6094
  this.text = "";
@@ -5631,11 +6157,11 @@ var WarpToast = class extends WarpElement15 {
5631
6157
  }
5632
6158
  get _iconMarkup() {
5633
6159
  if (this._warning)
5634
- return html23`<w-icon-warning-16></w-icon-warning-16>`;
6160
+ return html27`<w-icon-warning-16></w-icon-warning-16>`;
5635
6161
  if (this._error)
5636
- return html23`<w-icon-error-16></w-icon-error-16>`;
6162
+ return html27`<w-icon-error-16></w-icon-error-16>`;
5637
6163
  else
5638
- return html23`<w-icon-success-16></w-icon-success-16>`;
6164
+ return html27`<w-icon-success-16></w-icon-success-16>`;
5639
6165
  }
5640
6166
  async collapse() {
5641
6167
  return new Promise((resolve) => {
@@ -5655,8 +6181,8 @@ var WarpToast = class extends WarpElement15 {
5655
6181
  }
5656
6182
  render() {
5657
6183
  if (!this.text)
5658
- return html23``;
5659
- return html23` <section class="${toast.wrapper}" aria-label="${this._typeLabel}">
6184
+ return html27``;
6185
+ return html27` <section class="${toast.wrapper}" aria-label="${this._typeLabel}">
5660
6186
  <div class="${this._primaryClasses}">
5661
6187
  <div class="${this._iconClasses}">${this._iconMarkup}</div>
5662
6188
  <div role="${this._role}" class="${toast.content}">
@@ -5664,7 +6190,7 @@ var WarpToast = class extends WarpElement15 {
5664
6190
  </div>
5665
6191
  ${when2(
5666
6192
  this.canclose === true,
5667
- () => html23`
6193
+ () => html27`
5668
6194
  <button class="${toast.close}" @click="${this.close}">
5669
6195
  <w-icon-close-16></w-icon-close-16>
5670
6196
  </button>
@@ -5675,8 +6201,8 @@ var WarpToast = class extends WarpElement15 {
5675
6201
  }
5676
6202
  };
5677
6203
  __publicField(WarpToast, "styles", [
5678
- WarpElement15.styles,
5679
- css8`
6204
+ WarpElement18.styles,
6205
+ css9`
5680
6206
  :host {
5681
6207
  display: block;
5682
6208
  }
@@ -5693,10 +6219,10 @@ if (!customElements.get("w-toast")) {
5693
6219
  }
5694
6220
 
5695
6221
  // packages/utils/expand-transition.js
5696
- import { css as css9, html as html24 } from "lit";
5697
- import WarpElement16 from "@warp-ds/elements-core";
6222
+ import { css as css10, html as html28 } from "lit";
6223
+ import WarpElement19 from "@warp-ds/elements-core";
5698
6224
  import { ifDefined as ifDefined7 } from "lit/directives/if-defined.js";
5699
- var ExpandTransition = class extends WarpElement16 {
6225
+ var ExpandTransition = class extends WarpElement19 {
5700
6226
  constructor() {
5701
6227
  super();
5702
6228
  this.show = false;
@@ -5729,7 +6255,7 @@ var ExpandTransition = class extends WarpElement16 {
5729
6255
  return this != null ? this : null;
5730
6256
  }
5731
6257
  render() {
5732
- return html24`<div aria-hidden=${ifDefined7(!this.show ? "true" : void 0)}>${this._removeElement ? html24`` : html24`<slot></slot>`}</div>`;
6258
+ return html28`<div aria-hidden=${ifDefined7(!this.show ? "true" : void 0)}>${this._removeElement ? html28`` : html28`<slot></slot>`}</div>`;
5733
6259
  }
5734
6260
  };
5735
6261
  __publicField(ExpandTransition, "properties", {
@@ -5740,8 +6266,8 @@ __publicField(ExpandTransition, "properties", {
5740
6266
  _removeElement: { type: Boolean, state: true }
5741
6267
  });
5742
6268
  __publicField(ExpandTransition, "styles", [
5743
- WarpElement16.styles,
5744
- css9`
6269
+ WarpElement19.styles,
6270
+ css10`
5745
6271
  :host {
5746
6272
  display: block;
5747
6273
  }
@@ -5752,10 +6278,10 @@ if (!customElements.get("w-expand-transition")) {
5752
6278
  }
5753
6279
 
5754
6280
  // packages/utils/unstyled-heading.js
5755
- import { html as html25 } from "lit";
5756
- import WarpElement17 from "@warp-ds/elements-core";
6281
+ import { html as html29 } from "lit";
6282
+ import WarpElement20 from "@warp-ds/elements-core";
5757
6283
  import { unsafeHTML as unsafeHTML2 } from "lit/directives/unsafe-html.js";
5758
- var UnstyledHeading = class extends WarpElement17 {
6284
+ var UnstyledHeading = class extends WarpElement20 {
5759
6285
  get _markup() {
5760
6286
  return `<h${this.level}
5761
6287
  style="margin: 0; font-weight: unset; font-size: unset; line-height: unset;"
@@ -5765,18 +6291,20 @@ var UnstyledHeading = class extends WarpElement17 {
5765
6291
  `;
5766
6292
  }
5767
6293
  render() {
5768
- return !this.level ? html25`<slot></slot>` : unsafeHTML2(this._markup);
6294
+ return !this.level ? html29`<slot></slot>` : unsafeHTML2(this._markup);
5769
6295
  }
5770
6296
  };
5771
6297
  __publicField(UnstyledHeading, "properties", {
5772
6298
  level: { type: Number }
5773
6299
  });
5774
- __publicField(UnstyledHeading, "styles", [WarpElement17.styles]);
6300
+ __publicField(UnstyledHeading, "styles", [WarpElement20.styles]);
5775
6301
  if (!customElements.get("w-unstyled-heading")) {
5776
6302
  customElements.define("w-unstyled-heading", UnstyledHeading);
5777
6303
  }
5778
6304
  export {
5779
6305
  ExpandTransition,
6306
+ CanCloseMixin as ModalCanCloseMixin,
6307
+ ProvidesCanCloseToSlotsMixin as ModalProvidesCanCloseToSlotsMixin,
5780
6308
  UnstyledHeading,
5781
6309
  WarpAffix,
5782
6310
  WarpAlert,
@@ -5788,6 +6316,9 @@ export {
5788
6316
  WarpButton,
5789
6317
  WarpCard,
5790
6318
  WarpExpandable,
6319
+ ModalMain as WarpModal,
6320
+ ModalFooter as WarpModalFooter,
6321
+ ModalHeader as WarpModalHeader,
5791
6322
  WarpPill,
5792
6323
  WarpSelect,
5793
6324
  WarpTextField,