@warp-ds/elements 2.0.0-next.2 → 2.0.0-next.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. package/dist/api.js +3 -6
  2. package/dist/api.js.map +1 -1
  3. package/dist/index.js +519 -603
  4. package/dist/index.js.map +4 -4
  5. package/dist/packages/affix/index.d.ts +13 -6
  6. package/dist/packages/affix/index.js +66 -113
  7. package/dist/packages/affix/index.js.map +4 -4
  8. package/dist/packages/alert/index.js +48 -114
  9. package/dist/packages/alert/index.js.map +3 -3
  10. package/dist/packages/attention/index.js +147 -179
  11. package/dist/packages/attention/index.js.map +4 -4
  12. package/dist/packages/badge/index.js +27 -77
  13. package/dist/packages/badge/index.js.map +4 -4
  14. package/dist/packages/box/index.d.ts +1 -1
  15. package/dist/packages/box/index.js +26 -68
  16. package/dist/packages/box/index.js.map +4 -4
  17. package/dist/packages/breadcrumbs/index.js +42 -103
  18. package/dist/packages/breadcrumbs/index.js.map +3 -3
  19. package/dist/packages/broadcast/index.js +2 -6
  20. package/dist/packages/broadcast/index.js.map +1 -1
  21. package/dist/packages/button/index.d.ts +6 -0
  22. package/dist/packages/button/index.js +101 -156
  23. package/dist/packages/button/index.js.map +3 -3
  24. package/dist/packages/card/index.d.ts +5 -5
  25. package/dist/packages/card/index.js +1462 -96
  26. package/dist/packages/card/index.js.map +4 -4
  27. package/dist/packages/card/locales/da/messages.d.mts +1 -0
  28. package/dist/packages/card/locales/en/messages.d.mts +1 -0
  29. package/dist/packages/card/locales/fi/messages.d.mts +1 -0
  30. package/dist/packages/card/locales/nb/messages.d.mts +1 -0
  31. package/dist/packages/expandable/index.d.ts +1 -6
  32. package/dist/packages/expandable/index.js +104 -135
  33. package/dist/packages/expandable/index.js.map +4 -4
  34. package/dist/packages/modal/index.js +51 -119
  35. package/dist/packages/modal/index.js.map +3 -3
  36. package/dist/packages/modal/modal-header.d.ts +1 -1
  37. package/dist/packages/modal/modal-main.d.ts +3 -3
  38. package/dist/packages/pill/index.js +53 -119
  39. package/dist/packages/pill/index.js.map +3 -3
  40. package/dist/packages/select/index.d.ts +9 -0
  41. package/dist/packages/select/index.js +90 -155
  42. package/dist/packages/select/index.js.map +3 -3
  43. package/dist/packages/textfield/index.d.ts +9 -5
  44. package/dist/packages/textfield/index.js +54 -89
  45. package/dist/packages/textfield/index.js.map +4 -4
  46. package/dist/packages/toast/api.d.ts +1 -1
  47. package/dist/packages/toast/index.js +118 -195
  48. package/dist/packages/toast/index.js.map +4 -4
  49. package/dist/packages/toast/toast-container.d.ts +1 -1
  50. package/dist/packages/toast/toast.d.ts +1 -2
  51. package/dist/packages/utils/index.d.ts +1 -1
  52. package/dist/packages/utils/unstyled-heading.d.ts +1 -1
  53. package/package.json +29 -30
@@ -52,10 +52,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
52
52
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
53
53
  mod
54
54
  ));
55
- var __publicField = (obj, key, value) => {
56
- __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
57
- return value;
58
- };
55
+ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
59
56
 
60
57
  // node_modules/.pnpm/unraw@3.0.0/node_modules/unraw/dist/errors.js
61
58
  var require_errors = __commonJS({
@@ -228,8 +225,7 @@ var require_moo = __commonJS({
228
225
  return "(" + s + ")";
229
226
  }
230
227
  function reUnion(regexps) {
231
- if (!regexps.length)
232
- return "(?!)";
228
+ if (!regexps.length) return "(?!)";
233
229
  var source = regexps.map(function(s) {
234
230
  return "(?:" + s + ")";
235
231
  }).join("|");
@@ -239,14 +235,10 @@ var require_moo = __commonJS({
239
235
  if (typeof obj === "string") {
240
236
  return "(?:" + reEscape(obj) + ")";
241
237
  } else if (isRegExp(obj)) {
242
- if (obj.ignoreCase)
243
- throw new Error("RegExp /i flag not allowed");
244
- if (obj.global)
245
- throw new Error("RegExp /g flag is implied");
246
- if (obj.sticky)
247
- throw new Error("RegExp /y flag is implied");
248
- if (obj.multiline)
249
- throw new Error("RegExp /m flag is implied");
238
+ if (obj.ignoreCase) throw new Error("RegExp /i flag not allowed");
239
+ if (obj.global) throw new Error("RegExp /g flag is implied");
240
+ if (obj.sticky) throw new Error("RegExp /y flag is implied");
241
+ if (obj.multiline) throw new Error("RegExp /m flag is implied");
250
242
  return obj.source;
251
243
  } else {
252
244
  throw new Error("Not a pattern: " + obj);
@@ -295,16 +287,14 @@ var require_moo = __commonJS({
295
287
  var match = [];
296
288
  rules.forEach(function(rule) {
297
289
  if (isObject(rule)) {
298
- if (match.length)
299
- result.push(ruleOptions(key, match));
290
+ if (match.length) result.push(ruleOptions(key, match));
300
291
  result.push(ruleOptions(key, rule));
301
292
  match = [];
302
293
  } else {
303
294
  match.push(rule);
304
295
  }
305
296
  });
306
- if (match.length)
307
- result.push(ruleOptions(key, match));
297
+ if (match.length) result.push(ruleOptions(key, match));
308
298
  }
309
299
  return result;
310
300
  }
@@ -439,8 +429,7 @@ var require_moo = __commonJS({
439
429
  var fallbackRule = errorRule && errorRule.fallback;
440
430
  var flags = hasSticky && !fallbackRule ? "ym" : "gm";
441
431
  var suffix2 = hasSticky || fallbackRule ? "" : "|";
442
- if (unicodeFlag === true)
443
- flags += "u";
432
+ if (unicodeFlag === true) flags += "u";
444
433
  var combined = new RegExp(reUnion(parts) + suffix2, flags);
445
434
  return { regexp: combined, groups, fast, error: errorRule || defaultErrorRule };
446
435
  }
@@ -461,8 +450,7 @@ var require_moo = __commonJS({
461
450
  var all = states.$all ? toRules(states.$all) : [];
462
451
  delete states.$all;
463
452
  var keys = Object.getOwnPropertyNames(states);
464
- if (!start)
465
- start = keys[0];
453
+ if (!start) start = keys[0];
466
454
  var ruleMap = /* @__PURE__ */ Object.create(null);
467
455
  for (var i2 = 0; i2 < keys.length; i2++) {
468
456
  var key = keys[i2];
@@ -474,8 +462,7 @@ var require_moo = __commonJS({
474
462
  var included = /* @__PURE__ */ Object.create(null);
475
463
  for (var j = 0; j < rules.length; j++) {
476
464
  var rule = rules[j];
477
- if (!rule.include)
478
- continue;
465
+ if (!rule.include) continue;
479
466
  var splice = [j, 1];
480
467
  if (rule.include !== key && !included[rule.include]) {
481
468
  included[rule.include] = true;
@@ -485,8 +472,7 @@ var require_moo = __commonJS({
485
472
  }
486
473
  for (var k = 0; k < newRules.length; k++) {
487
474
  var newRule = newRules[k];
488
- if (rules.indexOf(newRule) !== -1)
489
- continue;
475
+ if (rules.indexOf(newRule) !== -1) continue;
490
476
  splice.push(newRule);
491
477
  }
492
478
  }
@@ -567,8 +553,7 @@ var require_moo = __commonJS({
567
553
  };
568
554
  };
569
555
  Lexer.prototype.setState = function(state) {
570
- if (!state || this.state === state)
571
- return;
556
+ if (!state || this.state === state) return;
572
557
  this.state = state;
573
558
  var info = this.states[state];
574
559
  this.groups = info.groups;
@@ -672,12 +657,9 @@ var require_moo = __commonJS({
672
657
  var err = new Error(this.formatError(token, "invalid syntax"));
673
658
  throw err;
674
659
  }
675
- if (group.pop)
676
- this.popState();
677
- else if (group.push)
678
- this.pushState(group.push);
679
- else if (group.next)
680
- this.setState(group.next);
660
+ if (group.pop) this.popState();
661
+ else if (group.push) this.pushState(group.push);
662
+ else if (group.next) this.setState(group.next);
681
663
  return token;
682
664
  };
683
665
  if (typeof Symbol !== "undefined" && Symbol.iterator) {
@@ -1030,41 +1012,7 @@ var require_parser = __commonJS({
1030
1012
  // packages/modal/modal-footer.js
1031
1013
  import { html } from "lit";
1032
1014
 
1033
- // node_modules/.pnpm/@warp-ds+css@2.0.0-next.4_@warp-ds+uno@2.0.0_unocss@0.58.5_postcss@8.4.38_rollup@4.18.0_vite@_d2fzbudswaxjysaqn4v4imsdwy/node_modules/@warp-ds/css/component-classes/index.js
1034
- var box = {
1035
- box: "group block relative break-words last-child:mb-0 p-16 rounded-8",
1036
- // Relative here enables w-clickable
1037
- bleed: "-mx-16 sm:mx-0 rounded-l-0 rounded-r-0 sm:rounded-8",
1038
- // We target L and R to override the default rounded-8
1039
- info: "s-bg-info-subtle",
1040
- neutral: "s-surface-sunken",
1041
- bordered: "border-2 s-border s-bg"
1042
- };
1043
- var buttonReset = "focus:outline-none appearance-none cursor-pointer bg-transparent border-0 m-0 p-0 inline-block";
1044
- var expandable = {
1045
- expandable: "will-change-height",
1046
- expandableTitle: "font-bold s-text",
1047
- expandableBox: "s-surface-sunken hover:s-bg-hover active:s-bg-active py-0 px-0 " + box.box,
1048
- expandableInfo: "s-bg-info-subtle! hover:s-bg-info-subtle-hover!",
1049
- expandableBleed: box.bleed,
1050
- chevron: "inline-block align-middle s-icon",
1051
- chevronNonBox: "ml-8",
1052
- chevronBox: "",
1053
- chevronTransform: "transform transition-transform transform-gpu ease-in-out",
1054
- chevronExpand: "-rotate-180",
1055
- chevronCollapse: "rotate-180",
1056
- 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",
1057
- elementsChevronDownExpandPart: "part-[w-icon-chevron-down-16-part]:-rotate-180",
1058
- 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",
1059
- elementsChevronUpCollapsePart: "part-[w-icon-chevron-up-16-part]:rotate-180",
1060
- expansion: "overflow-hidden",
1061
- expansionNotExpanded: "h-0 invisible",
1062
- button: buttonReset + " hover:underline focus-visible:underline",
1063
- buttonBox: "w-full text-left relative inline-flex items-center justify-between " + box.box,
1064
- paddingTop: "pt-0",
1065
- title: "flex w-full justify-between items-center",
1066
- titleType: "h4"
1067
- };
1015
+ // node_modules/.pnpm/@warp-ds+css@2.0.0_@warp-ds+uno@2.0.0_unocss@0.62.0_postcss@8.4.41_rollup@4.20.0_vite@5.3.3_@_vyiy5vwpqfzwy5hpmfkwp3zmle/node_modules/@warp-ds/css/component-classes/index.js
1068
1016
  var buttonDefaultStyling = "font-bold focusable justify-center transition-colors ease-in-out";
1069
1017
  var buttonColors = {
1070
1018
  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]",
@@ -1182,7 +1130,7 @@ var button = {
1182
1130
  };
1183
1131
  var modal = {
1184
1132
  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]",
1185
- 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",
1133
+ base: "pb-safe-[32] shadow-m max-h-[--w-modal-max-height] min-h-[--w-modal-min-height] w-[--w-modal-width] h-[--w-modal-height] relative transition-300 ease-in-out backface-hidden will-change-height rounded-8 mx-0 sm:mx-16 bg-[--w-s-color-surface-elevated-100] flex flex-col overflow-hidden outline-none space-y-16 pt-8 sm:pt-32 sm:pb-32 rounded-b-0 sm:rounded-b-8",
1186
1134
  content: "block overflow-y-auto overflow-x-hidden last-child:mb-0 grow shrink px-16 sm:px-32 relative",
1187
1135
  footer: "flex justify-end shrink-0 px-16 sm:px-32",
1188
1136
  transitionTitle: "transition-all duration-300",
@@ -1213,19 +1161,15 @@ var modalElement = {
1213
1161
  headerTitleWithTopArea: "pt-16 px-16 sm:px-32",
1214
1162
  footer: "flex justify-end shrink-0 px-16 sm:px-32 pt-24"
1215
1163
  };
1216
- var label = {
1217
- label: "antialiased block relative text-s font-bold pb-4 cursor-pointer s-text",
1218
- optional: "pl-8 font-normal text-s s-text-subtle"
1219
- };
1220
- var prefixSuffixWrapperBase = "absolute top-0 bottom-0 flex justify-center items-center focusable rounded-4 focus:[--w-outline-offset:-2px] bg-transparent ";
1164
+ var prefixSuffixWrapper = "absolute top-0 bottom-0 flex justify-center items-center focusable rounded-4 focus:[--w-outline-offset:-2px] bg-transparent ";
1221
1165
  var suffix = {
1222
- wrapper: prefixSuffixWrapperBase + "right-0",
1166
+ wrapper: prefixSuffixWrapper + "right-0",
1223
1167
  wrapperWithLabel: "w-max pr-12",
1224
1168
  wrapperWithIcon: "w-40",
1225
1169
  label: "antialiased block relative cursor-default pb-0 font-bold text-xs s-text"
1226
1170
  };
1227
1171
  var prefix = {
1228
- wrapper: prefixSuffixWrapperBase + "left-0",
1172
+ wrapper: prefixSuffixWrapper + "left-0",
1229
1173
  wrapperWithLabel: "w-max pl-12",
1230
1174
  wrapperWithIcon: "w-40",
1231
1175
  label: "antialiased block relative cursor-default pb-0 font-bold text-xs s-text"
@@ -1282,15 +1226,9 @@ var deadToggle = {
1282
1226
  wrapper: `${toggle.wrapper} h-20 w-20 pointer-events-none`,
1283
1227
  input: `${toggle.input} hidden`,
1284
1228
  inputVue: "hidden",
1229
+ labelVue: "-mt-2",
1285
1230
  labelRadio: `${toggle.label} ${toggle.labelBefore} ${toggle.radio}`,
1286
- labelCheckbox: `${toggle.label} ${toggle.labelBefore} ${toggle.checkbox}`,
1287
- labelVue: "-mt-2"
1288
- };
1289
- var clickable = {
1290
- toggle: "absolute inset-0 h-full w-full appearance-none cursor-pointer focusable focusable-inset",
1291
- label: `px-12 ${label.label} py-8! cursor-pointer focusable focusable-inset`,
1292
- buttonOrLink: "bg-transparent focusable",
1293
- buttonOrLinkStretch: "inset-0 absolute"
1231
+ labelCheckbox: `${toggle.label} ${toggle.labelBefore} ${toggle.checkbox}`
1294
1232
  };
1295
1233
  var attention = {
1296
1234
  base: "border-2 relative flex items-start",
@@ -1381,8 +1319,7 @@ var windowExists = typeof window !== "undefined";
1381
1319
  if (windowExists) {
1382
1320
  const query = window.matchMedia("(prefers-reduced-motion: reduce)");
1383
1321
  const callback = ({ matches }) => reduceMotion = matches;
1384
- if (query.addEventListener)
1385
- query.addEventListener("change", callback);
1322
+ if (query.addEventListener) query.addEventListener("change", callback);
1386
1323
  callback(query);
1387
1324
  }
1388
1325
 
@@ -1413,8 +1350,7 @@ var Move = class {
1413
1350
  }
1414
1351
  async play() {
1415
1352
  this.last = this.el.getBoundingClientRect();
1416
- if (!this.el.animate)
1417
- return;
1353
+ if (!this.el.animate) return;
1418
1354
  const animation = this.el.animate(this.keyframes, this.animationOptions);
1419
1355
  await animation.finished;
1420
1356
  }
@@ -1428,22 +1364,20 @@ var Move = class {
1428
1364
  return __spreadValues(__spreadValues({}, this.defaults), this.userAnimationOptions);
1429
1365
  }
1430
1366
  get animationOptions() {
1431
- if (!this.shouldReduceMotion)
1432
- return this.mergedOptions;
1433
- if (!reduceMotion)
1434
- return this.mergedOptions;
1367
+ if (!this.shouldReduceMotion) return this.mergedOptions;
1368
+ if (!reduceMotion) return this.mergedOptions;
1435
1369
  return __spreadProps(__spreadValues({}, this.mergedOptions), { duration: 0 });
1436
1370
  }
1437
1371
  };
1438
1372
 
1439
- // node_modules/.pnpm/@warp-ds+icons@2.0.1/node_modules/@warp-ds/icons/dist/elements/arrow-left-16.js
1373
+ // node_modules/.pnpm/@warp-ds+icons@2.0.2/node_modules/@warp-ds/icons/dist/elements/arrow-left-16.js
1440
1374
  import { LitElement } from "lit";
1441
1375
  import { unsafeStatic, html as html2 } from "lit/static-html.js";
1442
1376
 
1443
- // node_modules/.pnpm/@lingui+core@4.7.1/node_modules/@lingui/core/dist/index.mjs
1377
+ // node_modules/.pnpm/@lingui+core@4.11.2/node_modules/@lingui/core/dist/index.mjs
1444
1378
  var import_unraw = __toESM(require_dist(), 1);
1445
1379
 
1446
- // node_modules/.pnpm/@lingui+message-utils@4.7.1/node_modules/@lingui/message-utils/dist/compileMessage.mjs
1380
+ // node_modules/.pnpm/@lingui+message-utils@4.11.2/node_modules/@lingui/message-utils/dist/compileMessage.mjs
1447
1381
  var import_parser = __toESM(require_parser(), 1);
1448
1382
  function processTokens(tokens, mapText) {
1449
1383
  if (!tokens.filter((token) => token.type !== "content").length) {
@@ -1467,11 +1401,9 @@ function processTokens(tokens, mapText) {
1467
1401
  }
1468
1402
  const offset = token.pluralOffset;
1469
1403
  const formatProps = {};
1470
- token.cases.forEach((item) => {
1471
- formatProps[item.key.replace(/^=(.)+/, "$1")] = processTokens(
1472
- item.tokens,
1473
- mapText
1474
- );
1404
+ token.cases.forEach(({ key, tokens: tokens2 }) => {
1405
+ const prop = key[0] === "=" ? key.slice(1) : key;
1406
+ formatProps[prop] = processTokens(tokens2, mapText);
1475
1407
  });
1476
1408
  return [
1477
1409
  token.arg,
@@ -1493,7 +1425,7 @@ Message: ${message}`);
1493
1425
  }
1494
1426
  }
1495
1427
 
1496
- // node_modules/.pnpm/@lingui+core@4.7.1/node_modules/@lingui/core/dist/index.mjs
1428
+ // node_modules/.pnpm/@lingui+core@4.11.2/node_modules/@lingui/core/dist/index.mjs
1497
1429
  var isString = (s) => typeof s === "string";
1498
1430
  var isFunction = (f2) => typeof f2 === "function";
1499
1431
  var cache = /* @__PURE__ */ new Map();
@@ -1579,11 +1511,11 @@ var selectFormatter = (value, rules) => {
1579
1511
  function interpolate(translation, locale, locales) {
1580
1512
  return (values = {}, formats) => {
1581
1513
  const formatters = getDefaultFormats(locale, locales, formats);
1582
- const formatMessage = (tokens) => {
1514
+ const formatMessage = (tokens, replaceOctothorpe = false) => {
1583
1515
  if (!Array.isArray(tokens))
1584
1516
  return tokens;
1585
1517
  return tokens.reduce((message, token) => {
1586
- if (token === "#") {
1518
+ if (token === "#" && replaceOctothorpe) {
1587
1519
  return message + OCTOTHORPE_PH;
1588
1520
  }
1589
1521
  if (isString(token)) {
@@ -1594,7 +1526,10 @@ function interpolate(translation, locale, locales) {
1594
1526
  if (type === "plural" || type === "selectordinal" || type === "select") {
1595
1527
  Object.entries(format).forEach(
1596
1528
  ([key, value2]) => {
1597
- interpolatedFormat[key] = formatMessage(value2);
1529
+ interpolatedFormat[key] = formatMessage(
1530
+ value2,
1531
+ type === "plural" || type === "selectordinal"
1532
+ );
1598
1533
  }
1599
1534
  );
1600
1535
  } else {
@@ -1762,6 +1697,9 @@ var I18n = class extends EventEmitter {
1762
1697
  }
1763
1698
  _(id, values, options) {
1764
1699
  let message = options == null ? void 0 : options.message;
1700
+ if (!id) {
1701
+ id = "";
1702
+ }
1765
1703
  if (!isString(id)) {
1766
1704
  values = id.values || values;
1767
1705
  message = id.message;
@@ -1802,7 +1740,7 @@ function setupI18n(params = {}) {
1802
1740
  }
1803
1741
  var i18n = setupI18n();
1804
1742
 
1805
- // node_modules/.pnpm/@warp-ds+icons@2.0.1/node_modules/@warp-ds/icons/dist/elements/arrow-left-16.js
1743
+ // node_modules/.pnpm/@warp-ds+icons@2.0.2/node_modules/@warp-ds/icons/dist/elements/arrow-left-16.js
1806
1744
  var messages = JSON.parse('{"icon.title.arrow-left":"Pil som peker mot venstre"}');
1807
1745
  var messages2 = JSON.parse('{"icon.title.arrow-left":"Leftward-pointing arrow"}');
1808
1746
  var messages3 = JSON.parse('{"icon.title.arrow-left":"Vasemmalle osoittava nuoli"}');
@@ -1891,7 +1829,7 @@ if (!customElements.get("w-icon-arrow-left-16")) {
1891
1829
  customElements.define("w-icon-arrow-left-16", IconArrowLeft16);
1892
1830
  }
1893
1831
 
1894
- // node_modules/.pnpm/@warp-ds+icons@2.0.1/node_modules/@warp-ds/icons/dist/elements/close-16.js
1832
+ // node_modules/.pnpm/@warp-ds+icons@2.0.2/node_modules/@warp-ds/icons/dist/elements/close-16.js
1895
1833
  import { LitElement as LitElement2 } from "lit";
1896
1834
  import { unsafeStatic as unsafeStatic2, html as html3 } from "lit/static-html.js";
1897
1835
  var messages4 = JSON.parse('{"icon.title.close":"Kryss"}');
@@ -2025,8 +1963,7 @@ var ModalHeader = class extends CanCloseMixin(WarpElement2) {
2025
1963
  </button>` : nothing;
2026
1964
  }
2027
1965
  get closeButton() {
2028
- if (this[NO_CLOSE_BUTTON])
2029
- return nothing;
1966
+ if (this[NO_CLOSE_BUTTON]) return nothing;
2030
1967
  return html4` <button
2031
1968
  type="button"
2032
1969
  class="${modalElement.headerButton} ${this._hasTopContent ? modalElement.headerCloseButtonOnImage : modalElement.headerCloseButton}"
@@ -2163,13 +2100,11 @@ var ModalMain = class extends ProvidesCanCloseToSlotsMixin(WarpElement3) {
2163
2100
  `;
2164
2101
  }
2165
2102
  willUpdate(changedProperties) {
2166
- if (changedProperties.has("show"))
2167
- this[this.show ? "open" : "close"]();
2103
+ if (changedProperties.has("show")) this[this.show ? "open" : "close"]();
2168
2104
  }
2169
2105
  handleListeners(verb = "addEventListener") {
2170
2106
  document[verb]("keydown", this.interceptEscape);
2171
- if (!this[NO_BACKDROP_CLICKS])
2172
- this.dialogEl.value[verb]("mousedown", this.closeOnBackdropClick);
2107
+ if (!this[NO_BACKDROP_CLICKS]) this.dialogEl.value[verb]("mousedown", this.closeOnBackdropClick);
2173
2108
  this.dialogEl.value[verb]("close", this.eventPreventer);
2174
2109
  this.dialogEl.value[verb]("cancel", this.eventPreventer);
2175
2110
  this.dialogInnerEl.value[verb]("transitionend", this.modifyBorderRadius);
@@ -2180,8 +2115,7 @@ var ModalMain = class extends ProvidesCanCloseToSlotsMixin(WarpElement3) {
2180
2115
  }
2181
2116
  /** @param {MouseEvent} evt */
2182
2117
  closeOnBackdropClick(evt) {
2183
- if (this.dialogEl.value === evt.target)
2184
- this.close();
2118
+ if (this.dialogEl.value === evt.target) this.close();
2185
2119
  }
2186
2120
  /** @param {KeyboardEvent} evt */
2187
2121
  interceptEscape(evt) {
@@ -2191,10 +2125,8 @@ var ModalMain = class extends ProvidesCanCloseToSlotsMixin(WarpElement3) {
2191
2125
  }
2192
2126
  }
2193
2127
  modifyBorderRadius() {
2194
- if (this.dialogInnerEl.value.scrollHeight * 1.02 > innerHeight)
2195
- this.dialogInnerEl.value.style.borderRadius = "0px";
2196
- else
2197
- this.dialogInnerEl.value.style.borderRadius = null;
2128
+ if (this.dialogInnerEl.value.scrollHeight * 1.02 > innerHeight) this.dialogInnerEl.value.style.borderRadius = "0px";
2129
+ else this.dialogInnerEl.value.style.borderRadius = null;
2198
2130
  }
2199
2131
  };
2200
2132
  __publicField(ModalMain, "properties", {